diff --git a/CHANGELOG.md b/CHANGELOG.md index 15e06f19..a14c74ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ -## v2.4.0 (unreleased) +## v2.4.0 +Target azurerm version: v4.28.0 ENHANCEMENTS: - Support specifying the provider version used in the migration in the `terraform` block. diff --git a/azurerm/schema/provider_gen.go b/azurerm/schema/provider_gen.go index 580af035..3cb79b8e 100644 --- a/azurerm/schema/provider_gen.go +++ b/azurerm/schema/provider_gen.go @@ -7,12 +7,12 @@ import ( "os" ) -var ProviderVersion = "tags/v4.20.0" +var ProviderVersion = "tags/v4.28.0" var ProviderSchemaInfo ProviderSchema func init() { - b := []byte(`{"Version":"","resource_schemas":{"azurerm_aadb2c_directory":{"block":{"attributes":{"billing_type":{"type":"string","computed":true},"country_code":{"type":"string","optional":true,"computed":true},"data_residency_location":{"type":"string","required":true},"display_name":{"type":"string","optional":true,"computed":true},"domain_name":{"type":"string","required":true},"effective_start_date":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_active_directory_domain_service":{"block":{"attributes":{"deployment_id":{"type":"string","computed":true},"domain_configuration_type":{"type":"string","optional":true},"domain_name":{"type":"string","required":true},"filtered_sync_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","computed":true},"sku":{"type":"string","required":true},"sync_owner":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true},"version":{"type":"number","computed":true}},"block_types":{"initial_replica_set":{"nesting_mode":3,"block":{"attributes":{"domain_controller_ip_addresses":{"type":["list","string"],"computed":true},"external_access_ip_address":{"type":"string","computed":true},"id":{"type":"string","computed":true},"location":{"type":"string","computed":true},"service_status":{"type":"string","computed":true},"subnet_id":{"type":"string","required":true}}},"required":true},"notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true},"notify_dc_admins":{"type":"bool","optional":true,"default":false},"notify_global_admins":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"secure_ldap":{"nesting_mode":3,"block":{"attributes":{"certificate_expiry":{"type":"string","computed":true},"certificate_thumbprint":{"type":"string","computed":true},"enabled":{"type":"bool","required":true},"external_access_enabled":{"type":"bool","optional":true,"default":false},"pfx_certificate":{"type":"string","required":true},"pfx_certificate_password":{"type":"string","required":true},"public_certificate":{"type":"string","computed":true}}},"optional":true,"computed":true},"security":{"nesting_mode":3,"block":{"attributes":{"kerberos_armoring_enabled":{"type":"bool","optional":true,"default":false},"kerberos_rc4_encryption_enabled":{"type":"bool","optional":true,"default":false},"ntlm_v1_enabled":{"type":"bool","optional":true,"default":false},"sync_kerberos_passwords":{"type":"bool","optional":true,"default":false},"sync_ntlm_passwords":{"type":"bool","optional":true,"default":false},"sync_on_prem_passwords":{"type":"bool","optional":true,"default":false},"tls_v1_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_active_directory_domain_service_replica_set":{"block":{"attributes":{"domain_controller_ip_addresses":{"type":["list","string"],"computed":true},"domain_service_id":{"type":"string","required":true},"external_access_ip_address":{"type":"string","computed":true},"location":{"type":"string","required":true},"service_status":{"type":"string","computed":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_active_directory_domain_service_trust":{"block":{"attributes":{"domain_service_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"trusted_domain_dns_ips":{"type":["list","string"],"required":true},"trusted_domain_fqdn":{"type":"string","required":true}}}},"azurerm_advanced_threat_protection":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_advisor_suppression":{"block":{"attributes":{"name":{"type":"string","required":true},"recommendation_id":{"type":"string","required":true},"resource_id":{"type":"string","required":true},"suppression_id":{"type":"string","computed":true},"ttl":{"type":"string","optional":true}}}},"azurerm_ai_foundry":{"block":{"attributes":{"application_insights_id":{"type":"string","optional":true},"container_registry_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"discovery_url":{"type":"string","computed":true},"friendly_name":{"type":"string","optional":true},"high_business_impact_enabled":{"type":"bool","optional":true,"computed":true},"key_vault_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_user_assigned_identity":{"type":"string","optional":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_id":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"managed_network":{"nesting_mode":3,"block":{"attributes":{"isolation_mode":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_ai_foundry_project":{"block":{"attributes":{"ai_services_hub_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"high_business_impact_enabled":{"type":"bool","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"project_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_ai_services":{"block":{"attributes":{"custom_subdomain_name":{"type":"string","optional":true},"endpoint":{"type":"string","computed":true},"fqdns":{"type":["list","string"],"optional":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"required_with":["custom_subdomain_name"]},"storage":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"storage_account_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_analysis_services_server":{"block":{"attributes":{"admin_users":{"type":["set","string"],"optional":true},"backup_blob_container_uri":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"power_bi_service_enabled":{"type":"bool","optional":true},"querypool_connection_mode":{"type":"string","optional":true,"default":"All"},"resource_group_name":{"type":"string","required":true},"server_full_name":{"type":"string","computed":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ipv4_firewall_rule":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"range_end":{"type":"string","required":true},"range_start":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_connection":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"default":"Service Bus"},"managed_api_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameter_values":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_api_management":{"block":{"attributes":{"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"developer_portal_url":{"type":"string","computed":true},"gateway_disabled":{"type":"bool","optional":true,"default":false},"gateway_regional_url":{"type":"string","computed":true},"gateway_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"management_api_url":{"type":"string","computed":true},"min_api_version":{"type":"string","optional":true},"name":{"type":"string","required":true},"notification_sender_email":{"type":"string","optional":true,"computed":true},"portal_url":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_id":{"type":"string","optional":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"publisher_email":{"type":"string","required":true},"publisher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scm_url":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_type":{"type":"string","optional":true,"default":"None"},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_location":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"gateway_disabled":{"type":"bool","optional":true,"default":false},"gateway_regional_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_id":{"type":"string","optional":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"certificate_password":{"type":"string","optional":true},"encoded_certificate":{"type":"string","required":true},"expiry":{"type":"string","computed":true},"store_name":{"type":"string","required":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true},"delegation":{"nesting_mode":3,"block":{"attributes":{"subscriptions_enabled":{"type":"bool","optional":true,"default":false},"url":{"type":"string","optional":true},"user_registration_enabled":{"type":"bool","optional":true,"default":false},"validation_key":{"type":"string","optional":true}}},"optional":true,"computed":true},"hostname_configuration":{"nesting_mode":3,"block":{"block_types":{"developer_portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"management":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"proxy":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"default_ssl_binding":{"type":"bool","optional":true,"computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"scm":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"protocols":{"nesting_mode":3,"block":{"attributes":{"enable_http2":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"security":{"nesting_mode":3,"block":{"attributes":{"enable_backend_ssl30":{"type":"bool","optional":true,"default":false},"enable_backend_tls10":{"type":"bool","optional":true,"default":false},"enable_backend_tls11":{"type":"bool","optional":true,"default":false},"enable_frontend_ssl30":{"type":"bool","optional":true,"default":false},"enable_frontend_tls10":{"type":"bool","optional":true,"default":false},"enable_frontend_tls11":{"type":"bool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_gcm_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_gcm_sha384_ciphers_enabled":{"type":"bool","optional":true,"default":false},"triple_des_ciphers_enabled":{"type":"bool","optional":true}}},"optional":true,"computed":true},"sign_in":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true}}},"optional":true,"computed":true},"sign_up":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true}},"block_types":{"terms_of_service":{"nesting_mode":3,"block":{"attributes":{"consent_required":{"type":"bool","required":true},"enabled":{"type":"bool","required":true},"text":{"type":"string","optional":true}}},"required":true}}},"optional":true,"computed":true},"tenant_access":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"primary_key":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true}}},"optional":true,"computed":true},"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_management_api":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_type":{"type":"string","optional":true,"computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"is_current":{"type":"bool","computed":true},"is_online":{"type":"bool","computed":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"computed":true},"protocols":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"revision":{"type":"string","required":true},"revision_description":{"type":"string","optional":true},"service_url":{"type":"string","optional":true,"computed":true},"source_api_id":{"type":"string","optional":true},"subscription_required":{"type":"bool","optional":true,"default":true},"terms_of_service_url":{"type":"string","optional":true},"version":{"type":"string","optional":true,"computed":true},"version_description":{"type":"string","optional":true},"version_set_id":{"type":"string","optional":true,"computed":true}},"block_types":{"contact":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"import":{"nesting_mode":3,"block":{"attributes":{"content_format":{"type":"string","required":true},"content_value":{"type":"string","required":true}},"block_types":{"wsdl_selector":{"nesting_mode":3,"block":{"attributes":{"endpoint_name":{"type":"string","required":true},"service_name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"license":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"oauth2_authorization":{"nesting_mode":3,"block":{"attributes":{"authorization_server_name":{"type":"string","required":true},"scope":{"type":"string","optional":true}}},"optional":true},"openid_authentication":{"nesting_mode":3,"block":{"attributes":{"bearer_token_sending_methods":{"type":["set","string"],"optional":true},"openid_provider_name":{"type":"string","required":true}}},"optional":true},"subscription_key_parameter_names":{"nesting_mode":3,"block":{"attributes":{"header":{"type":"string","required":true},"query":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_api_diagnostic":{"block":{"attributes":{"always_log_errors":{"type":"bool","optional":true,"computed":true},"api_management_logger_id":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"http_correlation_protocol":{"type":"string","optional":true,"computed":true},"identifier":{"type":"string","required":true},"log_client_ip":{"type":"bool","optional":true,"computed":true},"operation_name_format":{"type":"string","optional":true,"default":"Name"},"resource_group_name":{"type":"string","required":true},"sampling_percentage":{"type":"number","optional":true,"computed":true},"verbosity":{"type":"string","optional":true,"computed":true}},"block_types":{"backend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"backend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_api_operation":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"method":{"type":"string","required":true},"operation_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"url_template":{"type":"string","required":true}},"block_types":{"request":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"query_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"representation":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true},"schema_id":{"type":"string","optional":true},"type_name":{"type":"string","optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"form_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"response":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"status_code":{"type":"number","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"representation":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true},"schema_id":{"type":"string","optional":true},"type_name":{"type":"string","optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"form_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"template_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_api_management_api_operation_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"operation_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_api_operation_tag":{"block":{"attributes":{"api_operation_id":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_api_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_api_release":{"block":{"attributes":{"api_id":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true}}}},"azurerm_api_management_api_schema":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"components":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]},"content_type":{"type":"string","required":true},"definitions":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]},"resource_group_name":{"type":"string","required":true},"schema_id":{"type":"string","required":true},"value":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]}}}},"azurerm_api_management_api_tag":{"block":{"attributes":{"api_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_api_tag_description":{"block":{"attributes":{"api_tag_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"external_documentation_description":{"type":"string","optional":true},"external_documentation_url":{"type":"string","optional":true}}}},"azurerm_api_management_api_version_set":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"version_header_name":{"type":"string","optional":true,"conflicts_with":["version_query_name"]},"version_query_name":{"type":"string","optional":true,"conflicts_with":["version_header_name"]},"versioning_scheme":{"type":"string","required":true}}}},"azurerm_api_management_authorization_server":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"authorization_endpoint":{"type":"string","required":true},"authorization_methods":{"type":["set","string"],"required":true},"bearer_token_sending_methods":{"type":["set","string"],"optional":true},"client_authentication_method":{"type":["set","string"],"optional":true},"client_id":{"type":"string","required":true},"client_registration_endpoint":{"type":"string","required":true},"client_secret":{"type":"string","optional":true},"default_scope":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"grant_types":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_owner_password":{"type":"string","optional":true},"resource_owner_username":{"type":"string","optional":true},"support_state":{"type":"bool","optional":true},"token_endpoint":{"type":"string","optional":true}},"block_types":{"token_body_parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_management_backend":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","optional":true},"title":{"type":"string","optional":true},"url":{"type":"string","required":true}},"block_types":{"credentials":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":["list","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]},"header":{"type":["map","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]},"query":{"type":["map","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]}},"block_types":{"authorization":{"nesting_mode":3,"block":{"attributes":{"parameter":{"type":"string","optional":true,"at_least_one_of":["credentials.0.authorization.0.parameter","credentials.0.authorization.0.scheme"]},"scheme":{"type":"string","optional":true,"at_least_one_of":["credentials.0.authorization.0.parameter","credentials.0.authorization.0.scheme"]}}},"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]}}},"optional":true},"proxy":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"url":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"service_fabric_cluster":{"nesting_mode":3,"block":{"attributes":{"client_certificate_id":{"type":"string","optional":true,"computed":true},"client_certificate_thumbprint":{"type":"string","optional":true,"computed":true},"management_endpoints":{"type":["set","string"],"required":true},"max_partition_resolution_retries":{"type":"number","required":true},"server_certificate_thumbprints":{"type":["set","string"],"optional":true,"conflicts_with":["service_fabric_cluster.0.server_x509_name"]}},"block_types":{"server_x509_name":{"nesting_mode":4,"block":{"attributes":{"issuer_certificate_thumbprint":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["service_fabric_cluster.0.server_certificate_thumbprints"]}}},"optional":true},"tls":{"nesting_mode":3,"block":{"attributes":{"validate_certificate_chain":{"type":"bool","optional":true,"at_least_one_of":["tls.0.validate_certificate_chain","tls.0.validate_certificate_name"]},"validate_certificate_name":{"type":"bool","optional":true,"at_least_one_of":["tls.0.validate_certificate_chain","tls.0.validate_certificate_name"]}}},"optional":true}}}},"azurerm_api_management_certificate":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"data":{"type":"string","optional":true,"conflicts_with":["key_vault_secret_id","key_vault_identity_client_id"],"at_least_one_of":["data","key_vault_secret_id"]},"expiration":{"type":"string","computed":true},"key_vault_identity_client_id":{"type":"string","optional":true,"required_with":["key_vault_secret_id"]},"key_vault_secret_id":{"type":"string","optional":true,"conflicts_with":["data","password"],"at_least_one_of":["data","key_vault_secret_id"]},"name":{"type":"string","required":true},"password":{"type":"string","optional":true,"required_with":["data"]},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_api_management_custom_domain":{"block":{"attributes":{"api_management_id":{"type":"string","required":true}},"block_types":{"developer_portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"gateway":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"default_ssl_binding":{"type":"bool","optional":true,"computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"management":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"scm":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]}}}},"azurerm_api_management_diagnostic":{"block":{"attributes":{"always_log_errors":{"type":"bool","optional":true,"computed":true},"api_management_logger_id":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"http_correlation_protocol":{"type":"string","optional":true,"computed":true},"identifier":{"type":"string","required":true},"log_client_ip":{"type":"bool","optional":true,"computed":true},"operation_name_format":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sampling_percentage":{"type":"number","optional":true,"computed":true},"verbosity":{"type":"string","optional":true,"computed":true}},"block_types":{"backend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"backend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_email_template":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"body":{"type":"string","required":true},"description":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","required":true},"template_name":{"type":"string","required":true},"title":{"type":"string","computed":true}}}},"azurerm_api_management_gateway":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"location_data":{"nesting_mode":3,"block":{"attributes":{"city":{"type":"string","optional":true},"district":{"type":"string","optional":true},"name":{"type":"string","required":true},"region":{"type":"string","optional":true}}},"required":true}}}},"azurerm_api_management_gateway_api":{"block":{"attributes":{"api_id":{"type":"string","required":true},"gateway_id":{"type":"string","required":true}}}},"azurerm_api_management_gateway_certificate_authority":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"certificate_name":{"type":"string","required":true},"gateway_name":{"type":"string","required":true},"is_trusted":{"type":"bool","optional":true}}}},"azurerm_api_management_gateway_host_name_configuration":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"certificate_id":{"type":"string","required":true},"gateway_name":{"type":"string","required":true},"host_name":{"type":"string","required":true},"http2_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"request_client_certificate_enabled":{"type":"bool","optional":true},"tls10_enabled":{"type":"bool","optional":true},"tls11_enabled":{"type":"bool","optional":true}}}},"azurerm_api_management_global_schema":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"schema_id":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_api_management_group":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"external_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"custom"}}}},"azurerm_api_management_group_user":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"group_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"user_id":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_aad":{"block":{"attributes":{"allowed_tenants":{"type":["list","string"],"required":true},"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_library":{"type":"string","optional":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"signin_tenant":{"type":"string","optional":true}}}},"azurerm_api_management_identity_provider_aadb2c":{"block":{"attributes":{"allowed_tenant":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"authority":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_library":{"type":"string","optional":true},"client_secret":{"type":"string","required":true},"password_reset_policy":{"type":"string","optional":true},"profile_editing_policy":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"signin_policy":{"type":"string","required":true},"signin_tenant":{"type":"string","required":true},"signup_policy":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_facebook":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_google":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_microsoft":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_twitter":{"block":{"attributes":{"api_key":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"api_secret_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_logger":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"buffered":{"type":"bool","optional":true,"default":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","optional":true}},"block_types":{"application_insights":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true,"conflicts_with":["application_insights.0.instrumentation_key"],"at_least_one_of":["application_insights.0.connection_string","application_insights.0.instrumentation_key"]},"instrumentation_key":{"type":"string","optional":true,"conflicts_with":["application_insights.0.connection_string"],"at_least_one_of":["application_insights.0.connection_string","application_insights.0.instrumentation_key"]}}},"optional":true,"conflicts_with":["eventhub"]},"eventhub":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true,"conflicts_with":["eventhub.0.endpoint_uri","eventhub.0.user_assigned_identity_client_id"],"at_least_one_of":["eventhub.0.connection_string","eventhub.0.endpoint_uri"]},"endpoint_uri":{"type":"string","optional":true,"conflicts_with":["eventhub.0.connection_string"],"at_least_one_of":["eventhub.0.connection_string","eventhub.0.endpoint_uri"]},"name":{"type":"string","required":true},"user_assigned_identity_client_id":{"type":"string","optional":true,"conflicts_with":["eventhub.0.connection_string"]}}},"optional":true,"conflicts_with":["application_insights"]}}}},"azurerm_api_management_named_value":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true,"default":false},"tags":{"type":["list","string"],"optional":true},"value":{"type":"string","optional":true,"exactly_one_of":["value","value_from_key_vault"]}},"block_types":{"value_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"secret_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["value","value_from_key_vault"],"required_with":["secret"]}}}},"azurerm_api_management_notification_recipient_email":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"email":{"type":"string","required":true},"notification_type":{"type":"string","required":true}}}},"azurerm_api_management_notification_recipient_user":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"notification_type":{"type":"string","required":true},"user_id":{"type":"string","required":true}}}},"azurerm_api_management_openid_connect_provider":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"metadata_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_policy":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"],"exactly_one_of":["xml_link","xml_content"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"],"exactly_one_of":["xml_link","xml_content"]}}}},"azurerm_api_management_policy_fragment":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"format":{"type":"string","optional":true,"default":"xml"},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_api_management_product":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"approval_required":{"type":"bool","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"published":{"type":"bool","required":true},"resource_group_name":{"type":"string","required":true},"subscription_required":{"type":"bool","optional":true,"default":true},"subscriptions_limit":{"type":"number","optional":true},"terms":{"type":"string","optional":true}}}},"azurerm_api_management_product_api":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_product_group":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"group_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_product_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_product_tag":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_management_product_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_redis_cache":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"cache_location":{"type":"string","optional":true,"default":"default"},"connection_string":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"redis_cache_id":{"type":"string","optional":true}}}},"azurerm_api_management_subscription":{"block":{"attributes":{"allow_tracing":{"type":"bool","optional":true,"default":true},"api_id":{"type":"string","optional":true,"conflicts_with":["product_id"]},"api_management_name":{"type":"string","required":true},"display_name":{"type":"string","required":true},"primary_key":{"type":"string","optional":true,"computed":true},"product_id":{"type":"string","optional":true,"conflicts_with":["api_id"]},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","optional":true,"computed":true},"state":{"type":"string","optional":true,"default":"submitted"},"subscription_id":{"type":"string","optional":true,"computed":true},"user_id":{"type":"string","optional":true}}}},"azurerm_api_management_tag":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"display_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_user":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"confirmation":{"type":"string","optional":true},"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"note":{"type":"string","optional":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"state":{"type":"string","optional":true,"computed":true},"user_id":{"type":"string","required":true}}}},"azurerm_app_configuration":{"block":{"attributes":{"data_plane_proxy_authentication_mode":{"type":"string","optional":true,"default":"Local"},"data_plane_proxy_private_link_delegation_enabled":{"type":"bool","optional":true,"default":false},"endpoint":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_read_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"primary_write_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"public_network_access":{"type":"string","optional":true},"purge_protection_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_read_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"secondary_write_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"sku":{"type":"string","optional":true,"default":"free"},"soft_delete_retention_days":{"type":"number","optional":true,"default":7},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_identifier":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"replica":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","computed":true},"id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_app_configuration_feature":{"block":{"attributes":{"configuration_store_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"etag":{"type":"string","optional":true,"computed":true},"key":{"type":"string","optional":true,"computed":true},"label":{"type":"string","optional":true},"locked":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"percentage_filter_value":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"targeting_filter":{"nesting_mode":3,"block":{"attributes":{"default_rollout_percentage":{"type":"number","required":true},"users":{"type":["list","string"],"optional":true}},"block_types":{"groups":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"rollout_percentage":{"type":"number","required":true}}},"optional":true}}},"optional":true},"timewindow_filter":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","optional":true},"start":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_app_configuration_key":{"block":{"attributes":{"configuration_store_id":{"type":"string","required":true},"content_type":{"type":"string","optional":true,"computed":true},"etag":{"type":"string","optional":true,"computed":true},"key":{"type":"string","required":true},"label":{"type":"string","optional":true},"locked":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","optional":true,"default":"kv"},"value":{"type":"string","optional":true,"conflicts_with":["vault_key_reference"]},"vault_key_reference":{"type":"string","optional":true,"conflicts_with":["value"]}}}},"azurerm_app_service":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_cert_enabled":{"type":"bool","optional":true,"default":false},"client_cert_mode":{"type":"string","optional":true,"computed":true},"custom_domain_verification_id":{"type":"string","computed":true},"default_site_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"retention_period_in_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages_enabled":{"type":"bool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","optional":true,"default":"Off"}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"acr_use_managed_identity_credentials":{"type":"bool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"string","optional":true},"always_on":{"type":"bool","optional":true,"default":false},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_container":{"type":"string","optional":true},"java_container_version":{"type":"string","optional":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"local_mysql_enabled":{"type":"bool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"number_of_workers":{"type":"number","optional":true,"computed":true},"php_version":{"type":"string","optional":true},"python_version":{"type":"string","optional":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"computed":true},"windows_fx_version":{"type":"string","optional":true,"computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"source_control":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"manual_integration":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"repo_url":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"rollback_enabled":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"use_mercurial":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]}}},"optional":true,"computed":true,"conflicts_with":["site_config.0.scm_type"]},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_active_slot":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"app_service_slot_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_app_service_certificate":{"block":{"attributes":{"app_service_plan_id":{"type":"string","optional":true},"expiration_date":{"type":"string","computed":true},"friendly_name":{"type":"string","computed":true},"host_names":{"type":["list","string"],"computed":true},"hosting_environment_profile_id":{"type":"string","computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"key_vault_id":{"type":"string","optional":true,"required_with":["key_vault_secret_id"]},"key_vault_secret_id":{"type":"string","optional":true,"conflicts_with":["pfx_blob","password"],"exactly_one_of":["key_vault_secret_id","pfx_blob"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"pfx_blob":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_certificate_binding":{"block":{"attributes":{"app_service_name":{"type":"string","computed":true},"certificate_id":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"hostname_binding_id":{"type":"string","required":true},"ssl_state":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_certificate_order":{"block":{"attributes":{"app_service_certificate_not_renewable_reasons":{"type":["list","string"],"computed":true},"auto_renew":{"type":"bool","optional":true,"default":true},"certificates":{"type":["list",["object",{"certificate_name":"string","key_vault_id":"string","key_vault_secret_name":"string","provisioning_state":"string"}]],"computed":true},"csr":{"type":"string","optional":true,"computed":true,"conflicts_with":["distinguished_name"]},"distinguished_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["csr"]},"domain_verification_token":{"type":"string","computed":true},"expiration_time":{"type":"string","computed":true},"intermediate_thumbprint":{"type":"string","computed":true},"is_private_key_external":{"type":"bool","computed":true},"key_size":{"type":"number","optional":true,"default":2048},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"product_type":{"type":"string","optional":true,"default":"Standard"},"resource_group_name":{"type":"string","required":true},"root_thumbprint":{"type":"string","computed":true},"signed_certificate_thumbprint":{"type":"string","computed":true},"status":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"validity_in_years":{"type":"number","optional":true,"default":1}}}},"azurerm_app_service_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"client_type":{"type":"string","optional":true,"default":"none"},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_app_service_custom_hostname_binding":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"hostname":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssl_state":{"type":"string","optional":true,"computed":true},"thumbprint":{"type":"string","optional":true,"computed":true},"virtual_ip":{"type":"string","computed":true}}}},"azurerm_app_service_environment_v3":{"block":{"attributes":{"allow_new_private_endpoint_connections":{"type":"bool","optional":true,"default":true},"dedicated_host_count":{"type":"number","optional":true,"conflicts_with":["zone_redundant"]},"dns_suffix":{"type":"string","computed":true},"external_inbound_ip_addresses":{"type":["list","string"],"computed":true},"inbound_network_dependencies":{"type":["list",["object",{"description":"string","ip_addresses":["list","string"],"ports":["list","string"]}]],"computed":true},"internal_inbound_ip_addresses":{"type":["list","string"],"computed":true},"internal_load_balancing_mode":{"type":"string","optional":true,"default":"None"},"ip_ssl_address_count":{"type":"number","computed":true},"linux_outbound_ip_addresses":{"type":["list","string"],"computed":true},"location":{"type":"string","computed":true},"name":{"type":"string","required":true},"pricing_tier":{"type":"string","computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"windows_outbound_ip_addresses":{"type":["list","string"],"computed":true},"zone_redundant":{"type":"bool","optional":true,"default":false,"conflicts_with":["dedicated_host_count"]}},"block_types":{"cluster_setting":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_hybrid_connection":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true}}}},"azurerm_app_service_managed_certificate":{"block":{"attributes":{"canonical_name":{"type":"string","computed":true},"custom_hostname_binding_id":{"type":"string","required":true},"expiration_date":{"type":"string","computed":true},"friendly_name":{"type":"string","computed":true},"host_names":{"type":["list","string"],"computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_plan":{"block":{"attributes":{"app_service_environment_id":{"type":"string","optional":true},"is_xenon":{"type":"bool","optional":true},"kind":{"type":"string","optional":true,"default":"Windows"},"location":{"type":"string","required":true},"maximum_elastic_worker_count":{"type":"number","optional":true,"computed":true},"maximum_number_of_workers":{"type":"number","computed":true},"name":{"type":"string","required":true},"per_site_scaling":{"type":"bool","optional":true},"reserved":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"size":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_app_service_public_certificate":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"blob":{"type":"string","required":true},"certificate_location":{"type":"string","required":true},"certificate_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_slot":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_affinity_enabled":{"type":"bool","optional":true,"computed":true},"default_site_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages_enabled":{"type":"bool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","optional":true,"default":"Off"}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"acr_use_managed_identity_credentials":{"type":"bool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"string","optional":true},"always_on":{"type":"bool","optional":true,"default":false},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_container":{"type":"string","optional":true},"java_container_version":{"type":"string","optional":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"local_mysql_enabled":{"type":"bool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"number_of_workers":{"type":"number","optional":true,"computed":true},"php_version":{"type":"string","optional":true},"python_version":{"type":"string","optional":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"computed":true},"windows_fx_version":{"type":"string","optional":true,"computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_slot_custom_hostname_binding":{"block":{"attributes":{"app_service_slot_id":{"type":"string","required":true},"hostname":{"type":"string","required":true},"ssl_state":{"type":"string","optional":true,"computed":true},"thumbprint":{"type":"string","optional":true,"computed":true},"virtual_ip":{"type":"string","computed":true}}}},"azurerm_app_service_slot_virtual_network_swift_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"slot_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_app_service_source_control":{"block":{"attributes":{"app_id":{"type":"string","required":true},"branch":{"type":"string","optional":true,"computed":true,"required_with":["repo_url"]},"repo_url":{"type":"string","optional":true,"computed":true,"required_with":["branch"]},"rollback_enabled":{"type":"bool","optional":true,"default":false},"scm_type":{"type":"string","computed":true},"use_local_git":{"type":"bool","optional":true,"default":false,"conflicts_with":["repo_url","branch","use_manual_integration","uses_github_action","github_action_configuration","use_mercurial","rollback_enabled"]},"use_manual_integration":{"type":"bool","optional":true,"default":false},"use_mercurial":{"type":"bool","optional":true,"default":false},"uses_github_action":{"type":"bool","computed":true}},"block_types":{"github_action_configuration":{"nesting_mode":3,"block":{"attributes":{"generate_workflow_file":{"type":"bool","optional":true,"default":true},"linux_action":{"type":"bool","computed":true}},"block_types":{"code_configuration":{"nesting_mode":3,"block":{"attributes":{"runtime_stack":{"type":"string","required":true},"runtime_version":{"type":"string","required":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_app_service_source_control_slot":{"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"required_with":["repo_url"]},"repo_url":{"type":"string","optional":true,"computed":true,"required_with":["branch"]},"rollback_enabled":{"type":"bool","optional":true,"default":false},"scm_type":{"type":"string","computed":true},"slot_id":{"type":"string","required":true},"use_local_git":{"type":"bool","optional":true,"default":false,"conflicts_with":["repo_url","branch","use_manual_integration","uses_github_action","github_action_configuration","use_mercurial","rollback_enabled"]},"use_manual_integration":{"type":"bool","optional":true,"default":false},"use_mercurial":{"type":"bool","optional":true,"default":false},"uses_github_action":{"type":"bool","computed":true}},"block_types":{"github_action_configuration":{"nesting_mode":3,"block":{"attributes":{"generate_workflow_file":{"type":"bool","optional":true,"default":true},"linux_action":{"type":"bool","computed":true}},"block_types":{"code_configuration":{"nesting_mode":3,"block":{"attributes":{"runtime_stack":{"type":"string","required":true},"runtime_version":{"type":"string","required":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_app_service_source_control_token":{"block":{"attributes":{"token":{"type":"string","required":true},"token_secret":{"type":"string","optional":true},"type":{"type":"string","required":true}}}},"azurerm_app_service_virtual_network_swift_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_application_gateway":{"block":{"attributes":{"enable_http2":{"type":"bool","optional":true},"fips_enabled":{"type":"bool","optional":true},"firewall_policy_id":{"type":"string","optional":true},"force_firewall_policy_association":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"authentication_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"autoscale_configuration":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","optional":true},"min_capacity":{"type":"number","required":true}}},"optional":true},"backend_address_pool":{"nesting_mode":4,"block":{"attributes":{"fqdns":{"type":["set","string"],"optional":true},"id":{"type":"string","computed":true},"ip_addresses":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true},"backend_http_settings":{"nesting_mode":4,"block":{"attributes":{"affinity_cookie_name":{"type":"string","optional":true},"cookie_based_affinity":{"type":"string","required":true},"host_name":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"pick_host_name_from_backend_address":{"type":"bool","optional":true,"default":false},"port":{"type":"number","required":true},"probe_id":{"type":"string","computed":true},"probe_name":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"request_timeout":{"type":"number","optional":true,"default":30},"trusted_root_certificate_names":{"type":["list","string"],"optional":true}},"block_types":{"authentication_certificate":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"connection_draining":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_sec":{"type":"number","required":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"required":true},"custom_error_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_error_page_url":{"type":"string","required":true},"id":{"type":"string","computed":true},"status_code":{"type":"string","required":true}}},"optional":true},"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","optional":true,"default":"Dynamic"},"private_link_configuration_id":{"type":"string","computed":true},"private_link_configuration_name":{"type":"string","optional":true},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true},"frontend_port":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"port":{"type":"number","required":true}}},"required":true},"gateway_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true},"global":{"nesting_mode":3,"block":{"attributes":{"request_buffering_enabled":{"type":"bool","required":true},"response_buffering_enabled":{"type":"bool","required":true}}},"optional":true},"http_listener":{"nesting_mode":4,"block":{"attributes":{"firewall_policy_id":{"type":"string","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port_id":{"type":"string","computed":true},"frontend_port_name":{"type":"string","required":true},"host_name":{"type":"string","optional":true},"host_names":{"type":["set","string"],"optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"require_sni":{"type":"bool","optional":true},"ssl_certificate_id":{"type":"string","computed":true},"ssl_certificate_name":{"type":"string","optional":true},"ssl_profile_id":{"type":"string","computed":true},"ssl_profile_name":{"type":"string","optional":true}},"block_types":{"custom_error_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_error_page_url":{"type":"string","required":true},"id":{"type":"string","computed":true},"status_code":{"type":"string","required":true}}},"optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"private_link_configuration":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}},"optional":true},"probe":{"nesting_mode":4,"block":{"attributes":{"host":{"type":"string","optional":true},"id":{"type":"string","computed":true},"interval":{"type":"number","required":true},"minimum_servers":{"type":"number","optional":true,"default":0},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"pick_host_name_from_backend_http_settings":{"type":"bool","optional":true,"default":false},"port":{"type":"number","optional":true},"protocol":{"type":"string","required":true},"timeout":{"type":"number","required":true},"unhealthy_threshold":{"type":"number","required":true}},"block_types":{"match":{"nesting_mode":3,"block":{"attributes":{"body":{"type":"string","optional":true},"status_code":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"redirect_configuration":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"include_path":{"type":"bool","optional":true,"default":false},"include_query_string":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"redirect_type":{"type":"string","required":true},"target_listener_id":{"type":"string","computed":true},"target_listener_name":{"type":"string","optional":true},"target_url":{"type":"string","optional":true}}},"optional":true},"request_routing_rule":{"nesting_mode":4,"block":{"attributes":{"backend_address_pool_id":{"type":"string","computed":true},"backend_address_pool_name":{"type":"string","optional":true},"backend_http_settings_id":{"type":"string","computed":true},"backend_http_settings_name":{"type":"string","optional":true},"http_listener_id":{"type":"string","computed":true},"http_listener_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true},"redirect_configuration_id":{"type":"string","computed":true},"redirect_configuration_name":{"type":"string","optional":true},"rewrite_rule_set_id":{"type":"string","computed":true},"rewrite_rule_set_name":{"type":"string","optional":true},"rule_type":{"type":"string","required":true},"url_path_map_id":{"type":"string","computed":true},"url_path_map_name":{"type":"string","optional":true}}},"required":true},"rewrite_rule_set":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"rewrite_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"rule_sequence":{"type":"number","required":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"attributes":{"ignore_case":{"type":"bool","optional":true,"default":false},"negate":{"type":"bool","optional":true,"default":false},"pattern":{"type":"string","required":true},"variable":{"type":"string","required":true}}},"optional":true},"request_header_configuration":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"header_value":{"type":"string","required":true}}},"optional":true},"response_header_configuration":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"header_value":{"type":"string","required":true}}},"optional":true},"url":{"nesting_mode":3,"block":{"attributes":{"components":{"type":"string","optional":true},"path":{"type":"string","optional":true},"query_string":{"type":"string","optional":true},"reroute":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true},"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true},"ssl_certificate":{"nesting_mode":4,"block":{"attributes":{"data":{"type":"string","optional":true},"id":{"type":"string","computed":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"public_cert_data":{"type":"string","computed":true}}},"optional":true},"ssl_policy":{"nesting_mode":3,"block":{"attributes":{"cipher_suites":{"type":["list","string"],"optional":true},"disabled_protocols":{"type":["list","string"],"optional":true},"min_protocol_version":{"type":"string","optional":true},"policy_name":{"type":"string","optional":true},"policy_type":{"type":"string","optional":true}}},"optional":true,"computed":true},"ssl_profile":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"trusted_client_certificate_names":{"type":["list","string"],"optional":true},"verify_client_cert_issuer_dn":{"type":"bool","optional":true,"default":false},"verify_client_certificate_revocation":{"type":"string","optional":true}},"block_types":{"ssl_policy":{"nesting_mode":3,"block":{"attributes":{"cipher_suites":{"type":["list","string"],"optional":true},"disabled_protocols":{"type":["list","string"],"optional":true},"min_protocol_version":{"type":"string","optional":true},"policy_name":{"type":"string","optional":true},"policy_type":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"trusted_client_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"trusted_root_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","optional":true},"id":{"type":"string","computed":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true}}},"optional":true},"url_path_map":{"nesting_mode":3,"block":{"attributes":{"default_backend_address_pool_id":{"type":"string","computed":true},"default_backend_address_pool_name":{"type":"string","optional":true},"default_backend_http_settings_id":{"type":"string","computed":true},"default_backend_http_settings_name":{"type":"string","optional":true},"default_redirect_configuration_id":{"type":"string","computed":true},"default_redirect_configuration_name":{"type":"string","optional":true},"default_rewrite_rule_set_id":{"type":"string","computed":true},"default_rewrite_rule_set_name":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"path_rule":{"nesting_mode":3,"block":{"attributes":{"backend_address_pool_id":{"type":"string","computed":true},"backend_address_pool_name":{"type":"string","optional":true},"backend_http_settings_id":{"type":"string","computed":true},"backend_http_settings_name":{"type":"string","optional":true},"firewall_policy_id":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"paths":{"type":["list","string"],"required":true},"redirect_configuration_id":{"type":"string","computed":true},"redirect_configuration_name":{"type":"string","optional":true},"rewrite_rule_set_id":{"type":"string","computed":true},"rewrite_rule_set_name":{"type":"string","optional":true}}},"required":true}}},"optional":true},"waf_configuration":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"file_upload_limit_mb":{"type":"number","optional":true,"default":100},"firewall_mode":{"type":"string","required":true},"max_request_body_size_kb":{"type":"number","optional":true,"default":128},"request_body_check":{"type":"bool","optional":true,"default":true},"rule_set_type":{"type":"string","optional":true,"default":"OWASP"},"rule_set_version":{"type":"string","required":true}},"block_types":{"disabled_rule_group":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true},"rules":{"type":["list","number"],"optional":true}}},"optional":true},"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"selector":{"type":"string","optional":true},"selector_match_operator":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_application_insights":{"block":{"attributes":{"app_id":{"type":"string","computed":true},"application_type":{"type":"string","required":true},"connection_string":{"type":"string","computed":true},"daily_data_cap_in_gb":{"type":"number","optional":true,"default":100},"daily_data_cap_notifications_disabled":{"type":"bool","optional":true},"disable_ip_masking":{"type":"bool","optional":true,"default":false},"force_customer_storage_for_profiler":{"type":"bool","optional":true,"default":false},"instrumentation_key":{"type":"string","computed":true},"internet_ingestion_enabled":{"type":"bool","optional":true,"default":true},"internet_query_enabled":{"type":"bool","optional":true,"default":true},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_in_days":{"type":"number","optional":true,"default":90},"sampling_percentage":{"type":"number","optional":true,"default":100},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","optional":true}}}},"azurerm_application_insights_analytics_item":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"content":{"type":"string","required":true},"function_alias":{"type":"string","optional":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true},"time_created":{"type":"string","computed":true},"time_modified":{"type":"string","computed":true},"type":{"type":"string","required":true},"version":{"type":"string","computed":true}}}},"azurerm_application_insights_api_key":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"application_insights_id":{"type":"string","required":true},"name":{"type":"string","required":true},"read_permissions":{"type":["set","string"],"optional":true},"write_permissions":{"type":["set","string"],"optional":true}}}},"azurerm_application_insights_smart_detection_rule":{"block":{"attributes":{"additional_email_recipients":{"type":["set","string"],"optional":true},"application_insights_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"send_emails_to_subscription_owners":{"type":"bool","optional":true,"default":true}}}},"azurerm_application_insights_standard_web_test":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"frequency":{"type":"number","optional":true,"default":300},"geo_locations":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retry_enabled":{"type":"bool","optional":true},"synthetic_monitor_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"number","optional":true,"default":30}},"block_types":{"request":{"nesting_mode":3,"block":{"attributes":{"body":{"type":"string","optional":true},"follow_redirects_enabled":{"type":"bool","optional":true,"default":true},"http_verb":{"type":"string","optional":true,"default":"GET"},"parse_dependent_requests_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true},"validation_rules":{"nesting_mode":3,"block":{"attributes":{"expected_status_code":{"type":"number","optional":true,"default":200},"ssl_cert_remaining_lifetime":{"type":"number","optional":true},"ssl_check_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"content":{"nesting_mode":3,"block":{"attributes":{"content_match":{"type":"string","required":true},"ignore_case":{"type":"bool","optional":true,"default":false},"pass_if_text_found":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}}},"azurerm_application_insights_web_test":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"configuration":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"frequency":{"type":"number","optional":true,"default":300},"geo_locations":{"type":["list","string"],"required":true},"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retry_enabled":{"type":"bool","optional":true},"synthetic_monitor_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"number","optional":true,"default":30}}}},"azurerm_application_insights_workbook":{"block":{"attributes":{"category":{"type":"string","optional":true,"default":"workbook"},"data_json":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_id":{"type":"string","optional":true,"default":"azure monitor"},"storage_container_id":{"type":"string","optional":true,"required_with":["identity"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_application_insights_workbook_template":{"block":{"attributes":{"author":{"type":"string","optional":true},"localized":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template_data":{"type":"string","required":true}},"block_types":{"galleries":{"nesting_mode":3,"block":{"attributes":{"category":{"type":"string","required":true},"name":{"type":"string","required":true},"order":{"type":"number","optional":true,"default":0},"resource_type":{"type":"string","optional":true,"default":"Azure Monitor"},"type":{"type":"string","optional":true,"default":"workbook"}}},"required":true}}}},"azurerm_application_load_balancer":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_configuration_endpoint":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_load_balancer_frontend":{"block":{"attributes":{"application_load_balancer_id":{"type":"string","required":true},"fully_qualified_domain_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_load_balancer_subnet_association":{"block":{"attributes":{"application_load_balancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_security_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_arc_kubernetes_cluster":{"block":{"attributes":{"agent_public_key_certificate":{"type":"string","required":true},"agent_version":{"type":"string","computed":true},"distribution":{"type":"string","computed":true},"infrastructure":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"offering":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_core_count":{"type":"number","computed":true},"total_node_count":{"type":"number","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_kubernetes_cluster_extension":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"configuration_protected_settings":{"type":["map","string"],"optional":true},"configuration_settings":{"type":["map","string"],"optional":true},"current_version":{"type":"string","computed":true},"extension_type":{"type":"string","required":true},"name":{"type":"string","required":true},"release_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["target_namespace"]},"release_train":{"type":"string","optional":true,"computed":true},"target_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["release_namespace"]},"version":{"type":"string","optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_kubernetes_flux_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"continuous_reconciliation_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"namespace"}},"block_types":{"blob_storage":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"container_id":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sas_token":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}},"block_types":{"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_certificate_base64":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"client_certificate_password":{"type":"string","optional":true,"required_with":["blob_storage.0.service_principal.0.client_certificate_base64"]},"client_certificate_send_chain":{"type":"bool","optional":true,"default":false},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"tenant_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"bucket":{"nesting_mode":3,"block":{"attributes":{"access_key":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"],"required_with":["bucket.0.secret_key_base64"]},"bucket_name":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"]},"secret_key_base64":{"type":"string","optional":true,"required_with":["bucket.0.access_key"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"tls_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"git_repository":{"nesting_mode":3,"block":{"attributes":{"https_ca_cert_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_key_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_user":{"type":"string","optional":true,"conflicts_with":["git_repository.0.local_auth_reference","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"],"required_with":["git_repository.0.https_key_base64"]},"local_auth_reference":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"]},"reference_type":{"type":"string","required":true},"reference_value":{"type":"string","required":true},"ssh_known_hosts_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"ssh_private_key_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"kustomizations":{"nesting_mode":4,"block":{"attributes":{"depends_on":{"type":["list","string"],"optional":true},"garbage_collection_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"recreating_enabled":{"type":"bool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"number","optional":true,"default":600},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}}},"required":true}}}},"azurerm_arc_kubernetes_provisioned_cluster":{"block":{"attributes":{"agent_version":{"type":"string","computed":true},"arc_agent_auto_upgrade_enabled":{"type":"bool","optional":true,"default":true},"arc_agent_desired_version":{"type":"string","optional":true},"distribution":{"type":"string","computed":true},"infrastructure":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"offering":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_core_count":{"type":"number","computed":true},"total_node_count":{"type":"number","computed":true}},"block_types":{"azure_active_directory":{"nesting_mode":3,"block":{"attributes":{"admin_group_object_ids":{"type":["list","string"],"optional":true},"azure_rbac_enabled":{"type":"bool","optional":true,"default":false},"tenant_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_machine":{"block":{"attributes":{"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_arc_machine_automanage_configuration_assignment":{"block":{"attributes":{"arc_machine_id":{"type":"string","required":true},"configuration_id":{"type":"string","required":true}}}},"azurerm_arc_machine_extension":{"block":{"attributes":{"arc_machine_id":{"type":"string","required":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}}},"azurerm_arc_private_link_scope":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_arc_resource_bridge_appliance":{"block":{"attributes":{"distro":{"type":"string","required":true},"infrastructure_provider":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_key_base64":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_attestation_provider":{"block":{"attributes":{"attestation_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"open_enclave_policy_base64":{"type":"string","optional":true},"policy_signing_certificate_data":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sev_snp_policy_base64":{"type":"string","optional":true},"sgx_enclave_policy_base64":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"tpm_policy_base64":{"type":"string","optional":true},"trust_model":{"type":"string","computed":true}}}},"azurerm_automanage_configuration":{"block":{"attributes":{"automation_account_enabled":{"type":"bool","optional":true,"default":false},"boot_diagnostics_enabled":{"type":"bool","optional":true,"default":false},"defender_for_cloud_enabled":{"type":"bool","optional":true,"default":false},"guest_configuration_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"log_analytics_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"status_change_alert_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}},"block_types":{"antimalware":{"nesting_mode":3,"block":{"attributes":{"real_time_protection_enabled":{"type":"bool","optional":true,"default":false},"scheduled_scan_day":{"type":"number","optional":true,"default":8},"scheduled_scan_enabled":{"type":"bool","optional":true,"default":false},"scheduled_scan_time_in_minutes":{"type":"number","optional":true,"default":0},"scheduled_scan_type":{"type":"string","optional":true,"default":"Quick"}},"block_types":{"exclusions":{"nesting_mode":3,"block":{"attributes":{"extensions":{"type":"string","optional":true},"paths":{"type":"string","optional":true},"processes":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"azure_security_baseline":{"nesting_mode":3,"block":{"attributes":{"assignment_type":{"type":"string","optional":true,"default":"ApplyAndAutoCorrect"}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"instant_rp_retention_range_in_days":{"type":"number","optional":true,"default":5},"policy_name":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"retention_policy_type":{"type":"string","optional":true,"default":"LongTermRetentionPolicy"}},"block_types":{"daily_schedule":{"nesting_mode":3,"block":{"attributes":{"retention_times":{"type":["list","string"],"optional":true}},"block_types":{"retention_duration":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true,"default":"Days"}}},"optional":true}}},"optional":true},"weekly_schedule":{"nesting_mode":3,"block":{"attributes":{"retention_times":{"type":["list","string"],"optional":true}},"block_types":{"retention_duration":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true,"default":"Weeks"}}},"optional":true}}},"optional":true}}},"optional":true},"schedule_policy":{"nesting_mode":3,"block":{"attributes":{"schedule_policy_type":{"type":"string","optional":true,"default":"SimpleSchedulePolicy"},"schedule_run_days":{"type":["list","string"],"optional":true},"schedule_run_frequency":{"type":"string","optional":true,"default":"Daily"},"schedule_run_times":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_automation_account":{"block":{"attributes":{"dsc_primary_access_key":{"type":"string","computed":true},"dsc_secondary_access_key":{"type":"string","computed":true},"dsc_server_endpoint":{"type":"string","computed":true},"hybrid_service_url":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["list",["object",{"id":"string","name":"string"}]],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_source":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_automation_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"base64":{"type":"string","required":true},"description":{"type":"string","optional":true},"exportable":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_automation_connection":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","required":true},"values":{"type":["map","string"],"required":true}}}},"azurerm_automation_connection_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"automation_certificate_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_automation_connection_classic_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"certificate_asset_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"subscription_name":{"type":"string","required":true}}}},"azurerm_automation_connection_service_principal":{"block":{"attributes":{"application_id":{"type":"string","required":true},"automation_account_name":{"type":"string","required":true},"certificate_thumbprint":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_automation_connection_type":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"is_global":{"type":"bool","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"field":{"nesting_mode":3,"block":{"attributes":{"is_encrypted":{"type":"bool","optional":true},"is_optional":{"type":"bool","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_automation_credential":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_automation_dsc_configuration":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content_embedded":{"type":"string","required":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"log_verbose":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"state":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_dsc_nodeconfiguration":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"configuration_name":{"type":"string","computed":true},"content_embedded":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_automation_hybrid_runbook_worker":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"ip":{"type":"string","computed":true},"last_seen_date_time":{"type":"string","computed":true},"registration_date_time":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"vm_resource_id":{"type":"string","required":true},"worker_group_name":{"type":"string","required":true},"worker_id":{"type":"string","required":true},"worker_name":{"type":"string","computed":true},"worker_type":{"type":"string","computed":true}}}},"azurerm_automation_hybrid_runbook_worker_group":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"credential_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_automation_job_schedule":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"job_schedule_id":{"type":"string","optional":true,"computed":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"run_on":{"type":"string","optional":true},"runbook_name":{"type":"string","required":true},"schedule_name":{"type":"string","required":true}}}},"azurerm_automation_module":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"module_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_automation_powershell72_module":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"module_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_automation_python3_package":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content_uri":{"type":"string","required":true},"content_version":{"type":"string","optional":true},"hash_algorithm":{"type":"string","optional":true,"required_with":["hash_value"]},"hash_value":{"type":"string","optional":true,"required_with":["hash_algorithm"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_runbook":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content":{"type":"string","optional":true,"computed":true,"at_least_one_of":["content","publish_content_link","draft"]},"description":{"type":"string","optional":true},"job_schedule":{"type":["set",["object",{"job_schedule_id":"string","parameters":["map","string"],"run_on":"string","schedule_name":"string"}]],"optional":true,"computed":true},"location":{"type":"string","required":true},"log_activity_trace_level":{"type":"number","optional":true},"log_progress":{"type":"bool","required":true},"log_verbose":{"type":"bool","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"runbook_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"draft":{"nesting_mode":3,"block":{"attributes":{"creation_time":{"type":"string","computed":true},"edit_mode_enabled":{"type":"bool","optional":true},"last_modified_time":{"type":"string","computed":true},"output_types":{"type":["list","string"],"optional":true}},"block_types":{"content_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true},"version":{"type":"string","optional":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"parameters":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"key":{"type":"string","required":true},"mandatory":{"type":"bool","optional":true,"default":false},"position":{"type":"number","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"publish_content_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true},"version":{"type":"string","optional":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["content","publish_content_link","draft"]}}}},"azurerm_automation_schedule":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"expiry_time":{"type":"string","optional":true,"computed":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","optional":true,"computed":true},"month_days":{"type":["set","number"],"optional":true,"conflicts_with":["week_days","monthly_occurrence"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"timezone":{"type":"string","optional":true,"default":"Etc/UTC"},"week_days":{"type":["set","string"],"optional":true,"conflicts_with":["month_days","monthly_occurrence"]}},"block_types":{"monthly_occurrence":{"nesting_mode":3,"block":{"attributes":{"day":{"type":"string","required":true},"occurrence":{"type":"number","required":true}}},"optional":true,"conflicts_with":["week_days","month_days"]}}}},"azurerm_automation_software_update_configuration":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"duration":{"type":"string","optional":true,"default":"PT2H"},"error_code":{"type":"string","computed":true},"error_message":{"type":"string","computed":true},"name":{"type":"string","required":true},"non_azure_computer_names":{"type":["list","string"],"optional":true},"virtual_machine_ids":{"type":["list","string"],"optional":true}},"block_types":{"linux":{"nesting_mode":3,"block":{"attributes":{"classifications_included":{"type":["list","string"],"required":true},"excluded_packages":{"type":["list","string"],"optional":true},"included_packages":{"type":["list","string"],"optional":true},"reboot":{"type":"string","optional":true,"default":"IfRequired"}}},"optional":true,"exactly_one_of":["windows","linux"]},"post_task":{"nesting_mode":3,"block":{"attributes":{"parameters":{"type":["map","string"],"optional":true},"source":{"type":"string","optional":true}}},"optional":true},"pre_task":{"nesting_mode":3,"block":{"attributes":{"parameters":{"type":["map","string"],"optional":true},"source":{"type":"string","optional":true}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"advanced_month_days":{"type":["list","number"],"optional":true},"advanced_week_days":{"type":["list","string"],"optional":true},"creation_time":{"type":"string","computed":true},"description":{"type":"string","optional":true},"expiry_time":{"type":"string","optional":true,"computed":true},"expiry_time_offset_minutes":{"type":"number","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","optional":true},"is_enabled":{"type":"bool","optional":true,"default":true},"last_modified_time":{"type":"string","computed":true},"next_run":{"type":"string","optional":true,"computed":true},"next_run_offset_minutes":{"type":"number","optional":true},"start_time":{"type":"string","optional":true,"computed":true},"start_time_offset_minutes":{"type":"number","optional":true},"time_zone":{"type":"string","optional":true,"default":"Etc/UTC"}},"block_types":{"monthly_occurrence":{"nesting_mode":3,"block":{"attributes":{"day":{"type":"string","required":true},"occurrence":{"type":"number","required":true}}},"optional":true}}},"required":true},"target":{"nesting_mode":3,"block":{"block_types":{"azure_query":{"nesting_mode":3,"block":{"attributes":{"locations":{"type":["list","string"],"optional":true},"scope":{"type":["list","string"],"optional":true},"tag_filter":{"type":"string","optional":true}},"block_types":{"tags":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"non_azure_query":{"nesting_mode":3,"block":{"attributes":{"function_alias":{"type":"string","optional":true},"workspace_id":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"classifications_included":{"type":["list","string"],"required":true},"excluded_knowledge_base_numbers":{"type":["list","string"],"optional":true},"included_knowledge_base_numbers":{"type":["list","string"],"optional":true},"reboot":{"type":"string","optional":true,"default":"IfRequired"}}},"optional":true,"exactly_one_of":["windows","linux"]}}}},"azurerm_automation_source_control":{"block":{"attributes":{"automatic_sync":{"type":"bool","optional":true,"default":false},"automation_account_id":{"type":"string","required":true},"branch":{"type":"string","optional":true},"description":{"type":"string","optional":true},"folder_path":{"type":"string","required":true},"name":{"type":"string","required":true},"publish_runbook_enabled":{"type":"bool","optional":true,"default":true},"repository_url":{"type":"string","required":true},"source_control_type":{"type":"string","required":true}},"block_types":{"security":{"nesting_mode":3,"block":{"attributes":{"refresh_token":{"type":"string","optional":true},"token":{"type":"string","required":true},"token_type":{"type":"string","required":true}}},"required":true}}}},"azurerm_automation_variable_bool":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"bool","optional":true}}}},"azurerm_automation_variable_datetime":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_variable_int":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"number","optional":true}}}},"azurerm_automation_variable_object":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_variable_string":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_watcher":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"etag":{"type":"string","optional":true},"execution_frequency_in_seconds":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"script_name":{"type":"string","required":true},"script_parameters":{"type":["map","string"],"optional":true},"script_run_on":{"type":"string","required":true},"status":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_webhook":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"expiry_time":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"run_on_worker_group":{"type":"string","optional":true},"runbook_name":{"type":"string","required":true},"uri":{"type":"string","optional":true,"computed":true}}}},"azurerm_availability_set":{"block":{"attributes":{"location":{"type":"string","required":true},"managed":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","optional":true,"default":3},"platform_update_domain_count":{"type":"number","optional":true,"default":5},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_backup_container_storage_account":{"block":{"attributes":{"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_backup_policy_file_share":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","required":true},"time":{"type":"string","optional":true,"conflicts_with":["backup.0.hourly"],"at_least_one_of":["backup.0.time","backup.0.hourly"]}},"block_types":{"hourly":{"nesting_mode":3,"block":{"attributes":{"interval":{"type":"number","required":true},"start_time":{"type":"string","required":true},"window_duration":{"type":"number","required":true}}},"optional":true,"conflicts_with":["backup.0.time"],"at_least_one_of":["backup.0.time","backup.0.hourly"]}}},"required":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"required":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weekdays"]}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weekdays"]}}},"optional":true}}}},"azurerm_backup_policy_vm":{"block":{"attributes":{"instant_restore_retention_days":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_type":{"type":"string","optional":true,"default":"V1"},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","required":true},"hour_duration":{"type":"number","optional":true},"hour_interval":{"type":"number","optional":true},"time":{"type":"string","required":true},"weekdays":{"type":["set","string"],"optional":true}}},"required":true},"instant_restore_resource_group":{"nesting_mode":3,"block":{"attributes":{"prefix":{"type":"string","required":true},"suffix":{"type":"string","optional":true}}},"optional":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weekdays"]}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weekdays"]}}},"optional":true},"tiering_policy":{"nesting_mode":3,"block":{"block_types":{"archived_restore_point":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_backup_policy_vm_workload":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workload_type":{"type":"string","required":true}},"block_types":{"protection_policy":{"nesting_mode":4,"block":{"attributes":{"policy_type":{"type":"string","required":true}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","optional":true},"frequency_in_minutes":{"type":"number","optional":true},"time":{"type":"string","optional":true},"weekdays":{"type":["set","string"],"optional":true}}},"required":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"format_type":{"type":"string","required":true},"monthdays":{"type":["set","number"],"optional":true},"weekdays":{"type":["set","string"],"optional":true},"weeks":{"type":["set","string"],"optional":true}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"format_type":{"type":"string","required":true},"monthdays":{"type":["set","number"],"optional":true},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true},"weeks":{"type":["set","string"],"optional":true}}},"optional":true},"simple_retention":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true}}},"required":true},"settings":{"nesting_mode":3,"block":{"attributes":{"compression_enabled":{"type":"bool","optional":true,"default":false},"time_zone":{"type":"string","required":true}}},"required":true}}}},"azurerm_backup_protected_file_share":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_file_share_name":{"type":"string","required":true},"source_storage_account_id":{"type":"string","required":true}}}},"azurerm_backup_protected_vm":{"block":{"attributes":{"backup_policy_id":{"type":"string","optional":true},"exclude_disk_luns":{"type":["set","number"],"optional":true,"conflicts_with":["include_disk_luns"]},"include_disk_luns":{"type":["set","number"],"optional":true,"conflicts_with":["exclude_disk_luns"]},"protection_state":{"type":"string","optional":true,"computed":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_vm_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_bastion_host":{"block":{"attributes":{"copy_paste_enabled":{"type":"bool","optional":true,"default":true},"dns_name":{"type":"string","computed":true},"file_copy_enabled":{"type":"bool","optional":true,"default":false},"ip_connect_enabled":{"type":"bool","optional":true,"default":false},"kerberos_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scale_units":{"type":"number","optional":true,"default":2},"session_recording_enabled":{"type":"bool","optional":true,"default":false},"shareable_link_enabled":{"type":"bool","optional":true,"default":false},"sku":{"type":"string","optional":true,"default":"Basic"},"tags":{"type":["map","string"],"optional":true},"tunneling_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_id":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_batch_account":{"block":{"attributes":{"account_endpoint":{"type":"string","computed":true},"allowed_authentication_modes":{"type":["set","string"],"optional":true,"computed":true},"encryption":{"type":["list",["object",{"key_vault_key_id":"string"}]],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"pool_allocation_mode":{"type":"string","optional":true,"default":"BatchService"},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"storage_account_authentication_mode":{"type":"string","optional":true,"required_with":["storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"required_with":["storage_account_authentication_mode"]},"storage_account_node_identity":{"type":"string","optional":true,"required_with":["storage_account_id"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"key_vault_reference":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"url":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"block_types":{"account_access":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_range":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["network_profile.0.account_access","network_profile.0.node_management_access"]},"node_management_access":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_range":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["network_profile.0.account_access","network_profile.0.node_management_access"]}}},"optional":true}}}},"azurerm_batch_application":{"block":{"attributes":{"account_name":{"type":"string","required":true},"allow_updates":{"type":"bool","optional":true,"default":true},"default_version":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_batch_certificate":{"block":{"attributes":{"account_name":{"type":"string","required":true},"certificate":{"type":"string","required":true},"format":{"type":"string","required":true},"name":{"type":"string","computed":true},"password":{"type":"string","optional":true},"public_data":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true},"thumbprint_algorithm":{"type":"string","required":true}}}},"azurerm_batch_job":{"block":{"attributes":{"batch_pool_id":{"type":"string","required":true},"common_environment_properties":{"type":["map","string"],"optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"task_retry_maximum":{"type":"number","optional":true}}}},"azurerm_batch_pool":{"block":{"attributes":{"account_name":{"type":"string","required":true},"display_name":{"type":"string","optional":true},"inter_node_communication":{"type":"string","optional":true,"default":"Enabled"},"license_type":{"type":"string","optional":true},"max_tasks_per_node":{"type":"number","optional":true,"default":1},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"node_agent_sku_id":{"type":"string","required":true},"os_disk_placement":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"stop_pending_resize_operation":{"type":"bool","optional":true,"default":false},"target_node_communication_mode":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"auto_scale":{"nesting_mode":3,"block":{"attributes":{"evaluation_interval":{"type":"string","optional":true,"default":"PT15M"},"formula":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"store_location":{"type":"string","required":true},"store_name":{"type":"string","optional":true},"visibility":{"type":["set","string"],"optional":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"container_image_names":{"type":["set","string"],"optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]},"container_registries":{"type":["list",["object",{"password":"string","registry_server":"string","user_assigned_identity_id":"string","user_name":"string"}]],"optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]},"type":{"type":"string","optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]}}},"optional":true},"data_disks":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"default":"ReadOnly"},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_target":{"type":"string","required":true}}},"optional":true},"extensions":{"nesting_mode":3,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["set","string"],"optional":true},"publisher":{"type":"string","required":true},"settings_json":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}},"optional":true},"fixed_scale":{"nesting_mode":3,"block":{"attributes":{"node_deallocation_method":{"type":"string","optional":true},"resize_timeout":{"type":"string","optional":true,"default":"PT15M"},"target_dedicated_nodes":{"type":"number","optional":true,"default":1},"target_low_priority_nodes":{"type":"number","optional":true,"default":0}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"mount":{"nesting_mode":3,"block":{"block_types":{"azure_blob_file_system":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true},"account_name":{"type":"string","required":true},"blobfuse_options":{"type":"string","optional":true},"container_name":{"type":"string","required":true},"identity_id":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true},"sas_key":{"type":"string","optional":true}}},"optional":true},"azure_file_share":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"azure_file_url":{"type":"string","required":true},"mount_options":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true}}},"optional":true},"cifs_mount":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":"string","optional":true},"password":{"type":"string","required":true},"relative_mount_path":{"type":"string","required":true},"source":{"type":"string","required":true},"user_name":{"type":"string","required":true}}},"optional":true},"nfs_mount":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true},"source":{"type":"string","required":true}}},"optional":true}}},"optional":true},"network_configuration":{"nesting_mode":3,"block":{"attributes":{"accelerated_networking_enabled":{"type":"bool","optional":true,"default":false},"dynamic_vnet_assignment_scope":{"type":"string","optional":true,"default":"none"},"public_address_provisioning_type":{"type":"string","optional":true},"public_ips":{"type":["set","string"],"optional":true},"subnet_id":{"type":"string","optional":true}},"block_types":{"endpoint_configuration":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port_range":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"network_security_group_rules":{"nesting_mode":3,"block":{"attributes":{"access":{"type":"string","required":true},"priority":{"type":"number","required":true},"source_address_prefix":{"type":"string","required":true},"source_port_ranges":{"type":["list","string"],"optional":true,"computed":true}}},"optional":true}}},"optional":true}}},"optional":true},"node_placement":{"nesting_mode":3,"block":{"attributes":{"policy":{"type":"string","optional":true,"default":"Regional"}}},"optional":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"host_encryption_enabled":{"type":"bool","optional":true},"secure_boot_enabled":{"type":"bool","optional":true,"required_with":["security_profile.0.security_type"]},"security_type":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true,"required_with":["security_profile.0.security_type"]}}},"optional":true},"start_task":{"nesting_mode":3,"block":{"attributes":{"command_line":{"type":"string","required":true},"common_environment_properties":{"type":["map","string"],"optional":true},"task_retry_maximum":{"type":"number","optional":true},"wait_for_success":{"type":"bool","optional":true,"default":false}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"run_options":{"type":"string","optional":true},"working_directory":{"type":"string","optional":true}},"block_types":{"registry":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"registry_server":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true},"user_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"resource_file":{"nesting_mode":3,"block":{"attributes":{"auto_storage_container_name":{"type":"string","optional":true},"blob_prefix":{"type":"string","optional":true},"file_mode":{"type":"string","optional":true},"file_path":{"type":"string","optional":true},"http_url":{"type":"string","optional":true},"storage_container_url":{"type":"string","optional":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"user_identity":{"nesting_mode":3,"block":{"attributes":{"user_name":{"type":"string","optional":true,"at_least_one_of":["start_task.0.user_identity.0.user_name","start_task.0.user_identity.0.auto_user"]}},"block_types":{"auto_user":{"nesting_mode":3,"block":{"attributes":{"elevation_level":{"type":"string","optional":true,"default":"NonAdmin"},"scope":{"type":"string","optional":true,"default":"Task"}}},"optional":true,"at_least_one_of":["start_task.0.user_identity.0.user_name","start_task.0.user_identity.0.auto_user"]}}},"required":true}}},"optional":true},"storage_image_reference":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"offer":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"publisher":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"sku":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"version":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]}}},"required":true},"task_scheduling_policy":{"nesting_mode":3,"block":{"attributes":{"node_fill_type":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"user_accounts":{"nesting_mode":3,"block":{"attributes":{"elevation_level":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true}},"block_types":{"linux_user_configuration":{"nesting_mode":3,"block":{"attributes":{"gid":{"type":"number","optional":true},"ssh_private_key":{"type":"string","optional":true},"uid":{"type":"number","optional":true}}},"optional":true},"windows_user_configuration":{"nesting_mode":3,"block":{"attributes":{"login_mode":{"type":"string","required":true}}},"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"enable_automatic_updates":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_billing_account_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"billing_account_id":{"type":"string","required":true},"file_format":{"type":"string","optional":true,"default":"Csv"},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_blueprint_assignment":{"block":{"attributes":{"blueprint_name":{"type":"string","computed":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"lock_exclude_actions":{"type":["list","string"],"optional":true},"lock_exclude_principals":{"type":["list","string"],"optional":true},"lock_mode":{"type":"string","optional":true,"default":"None"},"name":{"type":"string","required":true},"parameter_values":{"type":"string","optional":true},"resource_groups":{"type":"string","optional":true},"target_subscription_id":{"type":"string","required":true},"type":{"type":"string","computed":true},"version_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_alexa":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"skill_id":{"type":"string","required":true}}}},"azurerm_bot_channel_direct_line_speech":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"cognitive_account_id":{"type":"string","optional":true},"cognitive_service_access_key":{"type":"string","required":true},"cognitive_service_location":{"type":"string","required":true},"custom_speech_model_id":{"type":"string","optional":true},"custom_voice_deployment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_directline":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"site":{"nesting_mode":4,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"endpoint_parameters_enabled":{"type":"bool","optional":true},"enhanced_authentication_enabled":{"type":"bool","optional":true,"default":false},"id":{"type":"string","computed":true},"key":{"type":"string","computed":true},"key2":{"type":"string","computed":true},"name":{"type":"string","required":true},"storage_enabled":{"type":"bool","optional":true,"default":true},"trusted_origins":{"type":["set","string"],"optional":true},"user_upload_enabled":{"type":"bool","optional":true,"default":true},"v1_allowed":{"type":"bool","optional":true,"default":true},"v3_allowed":{"type":"bool","optional":true,"default":true}}},"required":true}}}},"azurerm_bot_channel_email":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"email_address":{"type":"string","required":true},"email_password":{"type":"string","optional":true,"exactly_one_of":["email_password","magic_code"]},"location":{"type":"string","required":true},"magic_code":{"type":"string","optional":true,"exactly_one_of":["email_password","magic_code"]},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_facebook":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"facebook_application_id":{"type":"string","required":true},"facebook_application_secret":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"page":{"nesting_mode":4,"block":{"attributes":{"access_token":{"type":"string","required":true},"id":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_line":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"line_channel":{"nesting_mode":4,"block":{"attributes":{"access_token":{"type":"string","required":true},"secret":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_ms_teams":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"calling_web_hook":{"type":"string","optional":true,"computed":true},"deployment_environment":{"type":"string","optional":true,"default":"CommercialDeployment"},"enable_calling":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_slack":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"landing_page_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"signing_secret":{"type":"string","optional":true},"verification_token":{"type":"string","required":true}}}},"azurerm_bot_channel_sms":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"phone_number":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sms_channel_account_security_id":{"type":"string","required":true},"sms_channel_auth_token":{"type":"string","required":true}}}},"azurerm_bot_channel_web_chat":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"site":{"nesting_mode":4,"block":{"attributes":{"endpoint_parameters_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"storage_enabled":{"type":"bool","optional":true,"default":true},"user_upload_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_bot_channels_registration":{"block":{"attributes":{"cmk_key_vault_url":{"type":"string","optional":true},"description":{"type":"string","optional":true},"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"location":{"type":"string","required":true},"microsoft_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"streaming_endpoint_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_bot_connection":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":"string","optional":true},"service_provider_name":{"type":"string","required":true}}}},"azurerm_bot_service_azure_bot":{"block":{"attributes":{"cmk_key_vault_key_url":{"type":"string","optional":true},"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"luis_app_ids":{"type":["list","string"],"optional":true},"luis_key":{"type":"string","optional":true},"microsoft_app_id":{"type":"string","required":true},"microsoft_app_msi_id":{"type":"string","optional":true},"microsoft_app_tenant_id":{"type":"string","optional":true},"microsoft_app_type":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"streaming_endpoint_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_bot_web_app":{"block":{"attributes":{"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"location":{"type":"string","required":true},"luis_app_ids":{"type":["list","string"],"optional":true},"luis_key":{"type":"string","optional":true},"microsoft_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_capacity_reservation":{"block":{"attributes":{"capacity_reservation_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_capacity_reservation_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_cdn_endpoint":{"block":{"attributes":{"content_types_to_compress":{"type":["set","string"],"optional":true},"fqdn":{"type":"string","computed":true},"is_compression_enabled":{"type":"bool","optional":true},"is_http_allowed":{"type":"bool","optional":true,"default":true},"is_https_allowed":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"optimization_type":{"type":"string","optional":true},"origin_host_header":{"type":"string","optional":true},"origin_path":{"type":"string","optional":true},"probe_path":{"type":"string","optional":true},"profile_name":{"type":"string","required":true},"querystring_caching_behaviour":{"type":"string","optional":true,"default":"IgnoreQueryString"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"delivery_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"order":{"type":"number","required":true}},"block_types":{"cache_expiration_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"duration":{"type":"string","optional":true}}},"optional":true},"cache_key_query_string_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true},"cookies_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"device_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"http_version_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"modify_request_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"modify_response_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"post_arg_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"query_string_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"remote_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"request_body_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"request_header_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"request_method_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_scheme_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_uri_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_file_extension_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_file_name_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_path_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"fragment":{"type":"string","optional":true},"hostname":{"type":"string","optional":true},"path":{"type":"string","optional":true},"protocol":{"type":"string","optional":true,"default":"MatchRequest"},"query_string":{"type":"string","optional":true},"redirect_type":{"type":"string","required":true}}},"optional":true},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":true},"source_pattern":{"type":"string","required":true}}},"optional":true}}},"optional":true},"geo_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"country_codes":{"type":["list","string"],"required":true},"relative_path":{"type":"string","required":true}}},"optional":true},"global_delivery_rule":{"nesting_mode":3,"block":{"block_types":{"cache_expiration_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"duration":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"cache_key_query_string_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"modify_request_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"modify_response_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"fragment":{"type":"string","optional":true},"hostname":{"type":"string","optional":true},"path":{"type":"string","optional":true},"protocol":{"type":"string","optional":true,"default":"MatchRequest"},"query_string":{"type":"string","optional":true},"redirect_type":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":true},"source_pattern":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]}}},"optional":true},"origin":{"nesting_mode":4,"block":{"attributes":{"host_name":{"type":"string","required":true},"http_port":{"type":"number","optional":true,"default":80},"https_port":{"type":"number","optional":true,"default":443},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_cdn_endpoint_custom_domain":{"block":{"attributes":{"cdn_endpoint_id":{"type":"string","required":true},"host_name":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"cdn_managed_https":{"nesting_mode":3,"block":{"attributes":{"certificate_type":{"type":"string","required":true},"protocol_type":{"type":"string","required":true},"tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"optional":true,"conflicts_with":["user_managed_https"]},"user_managed_https":{"nesting_mode":3,"block":{"attributes":{"key_vault_secret_id":{"type":"string","required":true},"tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"optional":true,"conflicts_with":["cdn_managed_https"]}}}},"azurerm_cdn_frontdoor_custom_domain":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"dns_zone_id":{"type":"string","optional":true},"expiration_date":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"name":{"type":"string","required":true},"validation_token":{"type":"string","computed":true}},"block_types":{"tls":{"nesting_mode":3,"block":{"attributes":{"cdn_frontdoor_secret_id":{"type":"string","optional":true,"computed":true},"certificate_type":{"type":"string","optional":true,"default":"ManagedCertificate"},"minimum_tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"required":true}}}},"azurerm_cdn_frontdoor_custom_domain_association":{"block":{"attributes":{"cdn_frontdoor_custom_domain_id":{"type":"string","required":true},"cdn_frontdoor_route_ids":{"type":["list","string"],"required":true}}}},"azurerm_cdn_frontdoor_endpoint":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_cdn_frontdoor_firewall_policy":{"block":{"attributes":{"custom_block_response_body":{"type":"string","optional":true},"custom_block_response_status_code":{"type":"number","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoint_ids":{"type":["list","string"],"computed":true},"js_challenge_cookie_expiration_in_minutes":{"type":"number","optional":true,"computed":true},"mode":{"type":"string","required":true},"name":{"type":"string","required":true},"redirect_url":{"type":"string","optional":true},"request_body_check_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"number","optional":true,"default":1},"rate_limit_threshold":{"type":"number","optional":true,"default":10},"type":{"type":"string","required":true}},"block_types":{"match_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"match_variable":{"type":"string","required":true},"negation_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"managed_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"type":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"rule_id":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_origin":{"block":{"attributes":{"cdn_frontdoor_origin_group_id":{"type":"string","required":true},"certificate_name_check_enabled":{"type":"bool","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_name":{"type":"string","required":true},"http_port":{"type":"number","optional":true,"default":80},"https_port":{"type":"number","optional":true,"default":443},"name":{"type":"string","required":true},"origin_host_header":{"type":"string","optional":true},"priority":{"type":"number","optional":true,"default":1},"weight":{"type":"number","optional":true,"default":500}},"block_types":{"private_link":{"nesting_mode":3,"block":{"attributes":{"location":{"type":"string","required":true},"private_link_target_id":{"type":"string","required":true},"request_message":{"type":"string","optional":true,"default":"Access request for CDN FrontDoor Private Link Origin"},"target_type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_origin_group":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true},"restore_traffic_time_to_healed_or_new_endpoint_in_minutes":{"type":"number","optional":true,"default":10},"session_affinity_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"health_probe":{"nesting_mode":3,"block":{"attributes":{"interval_in_seconds":{"type":"number","required":true},"path":{"type":"string","optional":true,"default":"/"},"protocol":{"type":"string","required":true},"request_type":{"type":"string","optional":true,"default":"HEAD"}}},"optional":true},"load_balancing":{"nesting_mode":3,"block":{"attributes":{"additional_latency_in_milliseconds":{"type":"number","optional":true,"default":50},"sample_size":{"type":"number","optional":true,"default":4},"successful_samples_required":{"type":"number","optional":true,"default":3}}},"required":true}}}},"azurerm_cdn_frontdoor_profile":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_guid":{"type":"string","computed":true},"response_timeout_seconds":{"type":"number","optional":true,"default":120},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_route":{"block":{"attributes":{"cdn_frontdoor_custom_domain_ids":{"type":["set","string"],"optional":true},"cdn_frontdoor_endpoint_id":{"type":"string","required":true},"cdn_frontdoor_origin_group_id":{"type":"string","required":true},"cdn_frontdoor_origin_ids":{"type":["list","string"],"required":true},"cdn_frontdoor_origin_path":{"type":"string","optional":true},"cdn_frontdoor_rule_set_ids":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"forwarding_protocol":{"type":"string","optional":true,"default":"MatchRequest"},"https_redirect_enabled":{"type":"bool","optional":true,"default":true},"link_to_default_domain":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"patterns_to_match":{"type":["list","string"],"required":true},"supported_protocols":{"type":["set","string"],"required":true}},"block_types":{"cache":{"nesting_mode":3,"block":{"attributes":{"compression_enabled":{"type":"bool","optional":true,"default":false},"content_types_to_compress":{"type":["list","string"],"optional":true},"query_string_caching_behavior":{"type":"string","optional":true,"default":"IgnoreQueryString"},"query_strings":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_rule":{"block":{"attributes":{"behavior_on_match":{"type":"string","optional":true,"default":"Continue"},"cdn_frontdoor_rule_set_id":{"type":"string","required":true},"cdn_frontdoor_rule_set_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"order":{"type":"number","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"block_types":{"request_header_action":{"nesting_mode":3,"block":{"attributes":{"header_action":{"type":"string","required":true},"header_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"response_header_action":{"nesting_mode":3,"block":{"attributes":{"header_action":{"type":"string","required":true},"header_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"route_configuration_override_action":{"nesting_mode":3,"block":{"attributes":{"cache_behavior":{"type":"string","optional":true},"cache_duration":{"type":"string","optional":true},"cdn_frontdoor_origin_group_id":{"type":"string","optional":true},"compression_enabled":{"type":"bool","optional":true},"forwarding_protocol":{"type":"string","optional":true},"query_string_caching_behavior":{"type":"string","optional":true},"query_string_parameters":{"type":["list","string"],"optional":true}}},"optional":true},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"destination_fragment":{"type":"string","optional":true,"default":""},"destination_hostname":{"type":"string","required":true},"destination_path":{"type":"string","optional":true,"default":""},"query_string":{"type":"string","optional":true,"default":""},"redirect_protocol":{"type":"string","optional":true,"default":"MatchRequest"},"redirect_type":{"type":"string","required":true}}},"optional":true},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":false},"source_pattern":{"type":"string","required":true}}},"optional":true}}},"required":true},"conditions":{"nesting_mode":3,"block":{"block_types":{"client_port_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"cookies_condition":{"nesting_mode":3,"block":{"attributes":{"cookie_name":{"type":"string","required":true},"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"host_name_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"http_version_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"is_device_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"post_args_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"post_args_name":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"query_string_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"remote_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"IPMatch"}}},"optional":true},"request_body_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"request_header_condition":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"request_method_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_scheme_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_uri_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"server_port_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"socket_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"IPMatch"}}},"optional":true},"ssl_protocol_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"url_file_extension_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"url_filename_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"url_path_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_rule_set":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_cdn_frontdoor_secret":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"cdn_frontdoor_profile_name":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"secret":{"nesting_mode":3,"block":{"block_types":{"customer_certificate":{"nesting_mode":3,"block":{"attributes":{"key_vault_certificate_id":{"type":"string","required":true},"subject_alternative_names":{"type":["list","string"],"computed":true}}},"required":true}}},"required":true}}}},"azurerm_cdn_frontdoor_security_policy":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"security_policies":{"nesting_mode":3,"block":{"block_types":{"firewall":{"nesting_mode":3,"block":{"attributes":{"cdn_frontdoor_firewall_policy_id":{"type":"string","required":true}},"block_types":{"association":{"nesting_mode":3,"block":{"attributes":{"patterns_to_match":{"type":["list","string"],"required":true}},"block_types":{"domain":{"nesting_mode":3,"block":{"attributes":{"active":{"type":"bool","computed":true},"cdn_frontdoor_domain_id":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_cdn_profile":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_chaos_studio_capability":{"block":{"attributes":{"capability_type":{"type":"string","required":true},"chaos_studio_target_id":{"type":"string","required":true},"urn":{"type":"string","computed":true}}}},"azurerm_chaos_studio_experiment":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"selectors":{"nesting_mode":3,"block":{"attributes":{"chaos_studio_target_ids":{"type":["list","string"],"required":true},"name":{"type":"string","required":true}}},"required":true},"steps":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"branch":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"duration":{"type":"string","optional":true},"parameters":{"type":["map","string"],"optional":true},"selector_name":{"type":"string","optional":true},"urn":{"type":"string","optional":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_chaos_studio_target":{"block":{"attributes":{"location":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"target_type":{"type":"string","required":true}}}},"azurerm_cognitive_account":{"block":{"attributes":{"custom_question_answering_search_service_id":{"type":"string","optional":true},"custom_question_answering_search_service_key":{"type":"string","optional":true},"custom_subdomain_name":{"type":"string","optional":true},"dynamic_throttling_enabled":{"type":"bool","optional":true},"endpoint":{"type":"string","computed":true},"fqdns":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"metrics_advisor_aad_client_id":{"type":"string","optional":true},"metrics_advisor_aad_tenant_id":{"type":"string","optional":true},"metrics_advisor_super_user_name":{"type":"string","optional":true},"metrics_advisor_website_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"qna_runtime_endpoint":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","optional":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"required_with":["custom_subdomain_name"]},"storage":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"storage_account_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cognitive_account_customer_managed_key":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true}}}},"azurerm_cognitive_account_rai_blocklist":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true}}}},"azurerm_cognitive_account_rai_policy":{"block":{"attributes":{"base_policy_name":{"type":"string","required":true},"cognitive_account_id":{"type":"string","required":true},"mode":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"content_filter":{"nesting_mode":3,"block":{"attributes":{"block_enabled":{"type":"bool","required":true},"filter_enabled":{"type":"bool","required":true},"name":{"type":"string","required":true},"severity_threshold":{"type":"string","required":true},"source":{"type":"string","required":true}}},"required":true}}}},"azurerm_cognitive_deployment":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"dynamic_throttling_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"rai_policy_name":{"type":"string","optional":true},"version_upgrade_option":{"type":"string","optional":true,"default":"OnceNewDefaultVersionAvailable"}},"block_types":{"model":{"nesting_mode":3,"block":{"attributes":{"format":{"type":"string","required":true},"name":{"type":"string","required":true},"version":{"type":"string","optional":true}}},"required":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":1},"family":{"type":"string","optional":true},"name":{"type":"string","required":true},"size":{"type":"string","optional":true},"tier":{"type":"string","optional":true}}},"required":true}}}},"azurerm_communication_service":{"block":{"attributes":{"data_location":{"type":"string","optional":true,"default":"United States"},"hostname":{"type":"string","computed":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_communication_service_email_domain_association":{"block":{"attributes":{"communication_service_id":{"type":"string","required":true},"email_service_domain_id":{"type":"string","required":true}}}},"azurerm_confidential_ledger":{"block":{"attributes":{"identity_service_endpoint":{"type":"string","computed":true},"ledger_endpoint":{"type":"string","computed":true},"ledger_type":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azuread_based_service_principal":{"nesting_mode":3,"block":{"attributes":{"ledger_role_name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"required":true},"certificate_based_security_principal":{"nesting_mode":3,"block":{"attributes":{"ledger_role_name":{"type":"string","required":true},"pem_public_key":{"type":"string","required":true}}},"optional":true}}}},"azurerm_consumption_budget_management_group":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_consumption_budget_resource_group":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"optional":true},"contact_groups":{"type":["list","string"],"optional":true},"contact_roles":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_consumption_budget_subscription":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"optional":true},"contact_groups":{"type":["list","string"],"optional":true},"contact_roles":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_container_app":{"block":{"attributes":{"container_app_environment_id":{"type":"string","required":true},"custom_domain_verification_id":{"type":"string","computed":true},"latest_revision_fqdn":{"type":"string","computed":true},"latest_revision_name":{"type":"string","computed":true},"location":{"type":"string","computed":true},"max_inactive_revisions":{"type":"number","optional":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"revision_mode":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workload_profile_name":{"type":"string","optional":true}},"block_types":{"dapr":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_port":{"type":"number","optional":true},"app_protocol":{"type":"string","optional":true,"default":"http"}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress":{"nesting_mode":3,"block":{"attributes":{"allow_insecure_connections":{"type":"bool","optional":true,"default":false},"client_certificate_mode":{"type":"string","optional":true},"custom_domain":{"type":["list",["object",{"certificate_binding_type":"string","certificate_id":"string","name":"string"}]],"computed":true},"exposed_port":{"type":"number","optional":true},"external_enabled":{"type":"bool","optional":true,"default":false},"fqdn":{"type":"string","computed":true},"target_port":{"type":"number","required":true},"transport":{"type":"string","optional":true,"default":"auto"}},"block_types":{"ip_security_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"description":{"type":"string","optional":true},"ip_address_range":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"traffic_weight":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"latest_revision":{"type":"bool","optional":true,"default":false},"percentage":{"type":"number","required":true},"revision_suffix":{"type":"string","optional":true}}},"required":true}}},"optional":true},"registry":{"nesting_mode":3,"block":{"attributes":{"identity":{"type":"string","optional":true},"password_secret_name":{"type":"string","optional":true},"server":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"template":{"nesting_mode":3,"block":{"attributes":{"max_replicas":{"type":"number","optional":true,"default":10},"min_replicas":{"type":"number","optional":true,"default":0},"revision_suffix":{"type":"string","optional":true,"computed":true},"termination_grace_period_seconds":{"type":"number","optional":true,"default":0}},"block_types":{"azure_queue_scale_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"queue_length":{"type":"number","required":true},"queue_name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"required":true}}},"optional":true},"container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","required":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":1},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"success_count_threshold":{"type":"number","optional":true,"default":3},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"startup_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"required":true},"custom_scale_rule":{"nesting_mode":3,"block":{"attributes":{"custom_rule_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_scale_rule":{"nesting_mode":3,"block":{"attributes":{"concurrent_requests":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","optional":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"tcp_scale_rule":{"nesting_mode":3,"block":{"attributes":{"concurrent_requests":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"storage_name":{"type":"string","optional":true},"storage_type":{"type":"string","optional":true,"default":"EmptyDir"}}},"optional":true}}},"required":true}}}},"azurerm_container_app_custom_domain":{"block":{"attributes":{"certificate_binding_type":{"type":"string","optional":true},"container_app_environment_certificate_id":{"type":"string","optional":true,"required_with":["certificate_binding_type"]},"container_app_environment_managed_certificate_id":{"type":"string","computed":true},"container_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_container_app_environment":{"block":{"attributes":{"custom_domain_verification_id":{"type":"string","computed":true},"dapr_application_insights_connection_string":{"type":"string","optional":true},"default_domain":{"type":"string","computed":true},"docker_bridge_cidr":{"type":"string","computed":true},"infrastructure_resource_group_name":{"type":"string","optional":true,"required_with":["workload_profile"]},"infrastructure_subnet_id":{"type":"string","optional":true},"internal_load_balancer_enabled":{"type":"bool","optional":true,"default":false,"required_with":["infrastructure_subnet_id"]},"location":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","optional":true},"logs_destination":{"type":"string","optional":true,"computed":true},"mutual_tls_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"platform_reserved_cidr":{"type":"string","computed":true},"platform_reserved_dns_ip_address":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"static_ip_address":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false,"required_with":["infrastructure_subnet_id"]}},"block_types":{"workload_profile":{"nesting_mode":4,"block":{"attributes":{"maximum_count":{"type":"number","optional":true},"minimum_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"workload_profile_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_app_environment_certificate":{"block":{"attributes":{"certificate_blob_base64":{"type":"string","required":true},"certificate_password":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"expiration_date":{"type":"string","computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"name":{"type":"string","required":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_container_app_environment_custom_domain":{"block":{"attributes":{"certificate_blob_base64":{"type":"string","required":true},"certificate_password":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"dns_suffix":{"type":"string","required":true}}}},"azurerm_container_app_environment_dapr_component":{"block":{"attributes":{"component_type":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"ignore_errors":{"type":"bool","optional":true,"default":false},"init_timeout":{"type":"string","optional":true,"default":"5s"},"name":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"metadata":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_container_app_environment_storage":{"block":{"attributes":{"access_key":{"type":"string","required":true},"access_mode":{"type":"string","required":true},"account_name":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true}}}},"azurerm_container_app_job":{"block":{"attributes":{"container_app_environment_id":{"type":"string","required":true},"event_stream_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":["list","string"],"computed":true},"replica_retry_limit":{"type":"number","optional":true},"replica_timeout_in_seconds":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workload_profile_name":{"type":"string","optional":true}},"block_types":{"event_trigger_config":{"nesting_mode":3,"block":{"attributes":{"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}},"block_types":{"scale":{"nesting_mode":3,"block":{"attributes":{"max_executions":{"type":"number","optional":true,"default":100},"min_executions":{"type":"number","optional":true,"default":0},"polling_interval_in_seconds":{"type":"number","optional":true,"default":30}},"block_types":{"rules":{"nesting_mode":3,"block":{"attributes":{"custom_rule_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"manual_trigger_config":{"nesting_mode":3,"block":{"attributes":{"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"registry":{"nesting_mode":3,"block":{"attributes":{"identity":{"type":"string","optional":true},"password_secret_name":{"type":"string","optional":true},"server":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true},"schedule_trigger_config":{"nesting_mode":3,"block":{"attributes":{"cron_expression":{"type":"string","required":true},"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"template":{"nesting_mode":3,"block":{"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","required":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":1},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"success_count_threshold":{"type":"number","optional":true,"default":3},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"startup_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"required":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","optional":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"storage_name":{"type":"string","optional":true},"storage_type":{"type":"string","optional":true,"default":"EmptyDir"}}},"optional":true}}},"required":true}}}},"azurerm_container_connected_registry":{"block":{"attributes":{"audit_log_enabled":{"type":"bool","optional":true,"default":false},"client_token_ids":{"type":["list","string"],"optional":true},"container_registry_id":{"type":"string","required":true},"log_level":{"type":"string","optional":true,"default":"None"},"mode":{"type":"string","optional":true,"default":"ReadWrite"},"name":{"type":"string","required":true},"parent_registry_id":{"type":"string","optional":true},"sync_message_ttl":{"type":"string","optional":true,"default":"P1D"},"sync_schedule":{"type":"string","optional":true,"default":"* * * * *"},"sync_token_id":{"type":"string","required":true},"sync_window":{"type":"string","optional":true}},"block_types":{"notification":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"digest":{"type":"string","optional":true},"name":{"type":"string","required":true},"tag":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_container_group":{"block":{"attributes":{"dns_name_label":{"type":"string","optional":true},"dns_name_label_reuse_policy":{"type":"string","optional":true,"default":"Unsecure"},"exposed_port":{"type":["set",["object",{"port":"number","protocol":"string"}]],"optional":true,"computed":true},"fqdn":{"type":"string","computed":true},"ip_address":{"type":"string","computed":true},"ip_address_type":{"type":"string","optional":true,"default":"Public"},"key_vault_key_id":{"type":"string","optional":true},"key_vault_user_assigned_identity_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_profile_id":{"type":"string","optional":true,"computed":true},"os_type":{"type":"string","required":true},"priority":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"restart_policy":{"type":"string","optional":true,"default":"Always"},"sku":{"type":"string","optional":true,"default":"Standard"},"subnet_ids":{"type":["set","string"],"optional":true,"conflicts_with":["dns_name_label"]},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"commands":{"type":["list","string"],"optional":true,"computed":true},"cpu":{"type":"number","required":true},"cpu_limit":{"type":"number","optional":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"memory":{"type":"number","required":true},"memory_limit":{"type":"number","optional":true},"name":{"type":"string","required":true},"secure_environment_variables":{"type":["map","string"],"optional":true}},"block_types":{"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"exec":{"type":["list","string"],"optional":true},"failure_threshold":{"type":"number","optional":true},"initial_delay_seconds":{"type":"number","optional":true},"period_seconds":{"type":"number","optional":true},"success_threshold":{"type":"number","optional":true},"timeout_seconds":{"type":"number","optional":true}},"block_types":{"http_get":{"nesting_mode":3,"block":{"attributes":{"http_headers":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"scheme":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"ports":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","optional":true},"protocol":{"type":"string","optional":true,"default":"TCP"}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"exec":{"type":["list","string"],"optional":true},"failure_threshold":{"type":"number","optional":true},"initial_delay_seconds":{"type":"number","optional":true},"period_seconds":{"type":"number","optional":true},"success_threshold":{"type":"number","optional":true},"timeout_seconds":{"type":"number","optional":true}},"block_types":{"http_get":{"nesting_mode":3,"block":{"attributes":{"http_headers":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"scheme":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"security":{"nesting_mode":3,"block":{"attributes":{"privilege_enabled":{"type":"bool","required":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"empty_dir":{"type":"bool","optional":true,"default":false},"mount_path":{"type":"string","required":true},"name":{"type":"string","required":true},"read_only":{"type":"bool","optional":true,"default":false},"secret":{"type":["map","string"],"optional":true},"share_name":{"type":"string","optional":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}},"block_types":{"git_repo":{"nesting_mode":3,"block":{"attributes":{"directory":{"type":"string","optional":true},"revision":{"type":"string","optional":true},"url":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true},"diagnostics":{"nesting_mode":3,"block":{"block_types":{"log_analytics":{"nesting_mode":3,"block":{"attributes":{"log_type":{"type":"string","optional":true},"metadata":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true},"workspace_key":{"type":"string","required":true}}},"required":true}}},"optional":true},"dns_config":{"nesting_mode":3,"block":{"attributes":{"nameservers":{"type":["list","string"],"required":true},"options":{"type":["set","string"],"optional":true},"search_domains":{"type":["set","string"],"optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"image_registry_credential":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"server":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true},"username":{"type":"string","optional":true}}},"optional":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"commands":{"type":["list","string"],"optional":true,"computed":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"name":{"type":"string","required":true},"secure_environment_variables":{"type":["map","string"],"optional":true}},"block_types":{"security":{"nesting_mode":3,"block":{"attributes":{"privilege_enabled":{"type":"bool","required":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"empty_dir":{"type":"bool","optional":true,"default":false},"mount_path":{"type":"string","required":true},"name":{"type":"string","required":true},"read_only":{"type":"bool","optional":true,"default":false},"secret":{"type":["map","string"],"optional":true},"share_name":{"type":"string","optional":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}},"block_types":{"git_repo":{"nesting_mode":3,"block":{"attributes":{"directory":{"type":"string","optional":true},"revision":{"type":"string","optional":true},"url":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_container_registry":{"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"admin_password":{"type":"string","computed":true},"admin_username":{"type":"string","computed":true},"anonymous_pull_enabled":{"type":"bool","optional":true},"data_endpoint_enabled":{"type":"bool","optional":true},"encryption":{"type":["list",["object",{"identity_client_id":"string","key_vault_key_id":"string"}]],"optional":true,"computed":true},"export_policy_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"login_server":{"type":"string","computed":true},"name":{"type":"string","required":true},"network_rule_bypass_option":{"type":"string","optional":true,"default":"AzureServices"},"network_rule_set":{"type":["list",["object",{"default_action":"string","ip_rule":["set",["object",{"action":"string","ip_range":"string"}]]}]],"optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"quarantine_policy_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"retention_policy_in_days":{"type":"number","optional":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"trust_policy_enabled":{"type":"bool","optional":true,"default":false},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"georeplications":{"nesting_mode":3,"block":{"attributes":{"location":{"type":"string","required":true},"regional_endpoint_enabled":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_registry_agent_pool":{"block":{"attributes":{"container_registry_name":{"type":"string","required":true},"instance_count":{"type":"number","optional":true,"default":1},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","optional":true,"default":"S1"},"virtual_network_subnet_id":{"type":"string","optional":true}}}},"azurerm_container_registry_cache_rule":{"block":{"attributes":{"container_registry_id":{"type":"string","required":true},"credential_set_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"source_repo":{"type":"string","required":true},"target_repo":{"type":"string","required":true}}}},"azurerm_container_registry_credential_set":{"block":{"attributes":{"container_registry_id":{"type":"string","required":true},"login_server":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication_credentials":{"nesting_mode":3,"block":{"attributes":{"password_secret_id":{"type":"string","required":true},"username_secret_id":{"type":"string","required":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_container_registry_scope_map":{"block":{"attributes":{"actions":{"type":["list","string"],"required":true},"container_registry_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_container_registry_task":{"block":{"attributes":{"agent_pool_name":{"type":"string","optional":true,"conflicts_with":["agent_setting"]},"container_registry_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"is_system_task":{"type":"bool","optional":true,"default":false},"log_template":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timeout_in_seconds":{"type":"number","optional":true,"default":3600}},"block_types":{"agent_setting":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"number","required":true}}},"optional":true,"conflicts_with":["agent_pool_name"]},"base_image_trigger":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"type":{"type":"string","required":true},"update_trigger_endpoint":{"type":"string","optional":true},"update_trigger_payload_type":{"type":"string","optional":true}}},"optional":true},"docker_step":{"nesting_mode":3,"block":{"attributes":{"arguments":{"type":["map","string"],"optional":true},"cache_enabled":{"type":"bool","optional":true,"default":true},"context_access_token":{"type":"string","required":true},"context_path":{"type":"string","required":true},"dockerfile_path":{"type":"string","required":true},"image_names":{"type":["list","string"],"optional":true},"push_enabled":{"type":"bool","optional":true,"default":true},"secret_arguments":{"type":["map","string"],"optional":true},"target":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["file_step","encoded_step"]},"encoded_step":{"nesting_mode":3,"block":{"attributes":{"context_access_token":{"type":"string","optional":true},"context_path":{"type":"string","optional":true},"secret_values":{"type":["map","string"],"optional":true},"task_content":{"type":"string","required":true},"value_content":{"type":"string","optional":true},"values":{"type":["map","string"],"optional":true}}},"optional":true,"conflicts_with":["docker_step","file_step"]},"file_step":{"nesting_mode":3,"block":{"attributes":{"context_access_token":{"type":"string","optional":true},"context_path":{"type":"string","optional":true},"secret_values":{"type":["map","string"],"optional":true},"task_file_path":{"type":"string","required":true},"value_file_path":{"type":"string","optional":true},"values":{"type":["map","string"],"optional":true}}},"optional":true,"conflicts_with":["docker_step","encoded_step"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"platform":{"nesting_mode":3,"block":{"attributes":{"architecture":{"type":"string","optional":true},"os":{"type":"string","required":true},"variant":{"type":"string","optional":true}}},"optional":true},"registry_credential":{"nesting_mode":3,"block":{"block_types":{"custom":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"login_server":{"type":"string","required":true},"password":{"type":"string","optional":true},"username":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["registry_credential.0.source","registry_credential.0.custom"]},"source":{"nesting_mode":3,"block":{"attributes":{"login_mode":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["registry_credential.0.source","registry_credential.0.custom"]}}},"optional":true},"source_trigger":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"events":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"repository_url":{"type":"string","required":true},"source_type":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"expire_in_seconds":{"type":"number","optional":true},"refresh_token":{"type":"string","optional":true},"scope":{"type":"string","optional":true},"token":{"type":"string","required":true},"token_type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"timer_trigger":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"schedule":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_registry_task_schedule_run_now":{"block":{"attributes":{"container_registry_task_id":{"type":"string","required":true}}}},"azurerm_container_registry_token":{"block":{"attributes":{"container_registry_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_map_id":{"type":"string","required":true}}}},"azurerm_container_registry_token_password":{"block":{"attributes":{"container_registry_token_id":{"type":"string","required":true}},"block_types":{"password1":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"value":{"type":"string","computed":true}}},"required":true},"password2":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"value":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_container_registry_webhook":{"block":{"attributes":{"actions":{"type":["set","string"],"required":true},"custom_headers":{"type":["map","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"registry_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":""},"service_uri":{"type":"string","required":true},"status":{"type":"string","optional":true,"default":"enabled"},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_cosmosdb_account":{"block":{"attributes":{"access_key_metadata_writes_enabled":{"type":"bool","optional":true,"default":true},"analytical_storage_enabled":{"type":"bool","optional":true,"default":false},"automatic_failover_enabled":{"type":"bool","optional":true,"default":false},"burst_capacity_enabled":{"type":"bool","optional":true,"default":false},"create_mode":{"type":"string","optional":true,"computed":true},"default_identity_type":{"type":"string","optional":true,"default":"FirstPartyIdentity"},"endpoint":{"type":"string","computed":true},"free_tier_enabled":{"type":"bool","optional":true,"default":false},"ip_range_filter":{"type":["set","string"],"optional":true},"is_virtual_network_filter_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true,"conflicts_with":["managed_hsm_key_id"]},"kind":{"type":"string","optional":true,"default":"GlobalDocumentDB"},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","optional":true,"conflicts_with":["key_vault_key_id"]},"minimal_tls_version":{"type":"string","optional":true,"default":"Tls12"},"mongo_server_version":{"type":"string","optional":true,"computed":true},"multiple_write_locations_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_acl_bypass_for_azure_services":{"type":"bool","optional":true,"default":false},"network_acl_bypass_ids":{"type":["list","string"],"optional":true},"offer_type":{"type":"string","required":true},"partition_merge_enabled":{"type":"bool","optional":true,"default":false},"primary_key":{"type":"string","computed":true},"primary_mongodb_connection_string":{"type":"string","computed":true},"primary_readonly_key":{"type":"string","computed":true},"primary_readonly_mongodb_connection_string":{"type":"string","computed":true},"primary_readonly_sql_connection_string":{"type":"string","computed":true},"primary_sql_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"read_endpoints":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"secondary_mongodb_connection_string":{"type":"string","computed":true},"secondary_readonly_key":{"type":"string","computed":true},"secondary_readonly_mongodb_connection_string":{"type":"string","computed":true},"secondary_readonly_sql_connection_string":{"type":"string","computed":true},"secondary_sql_connection_string":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"write_endpoints":{"type":["list","string"],"computed":true}},"block_types":{"analytical_storage":{"nesting_mode":3,"block":{"attributes":{"schema_type":{"type":"string","required":true}}},"optional":true,"computed":true},"backup":{"nesting_mode":3,"block":{"attributes":{"interval_in_minutes":{"type":"number","optional":true,"computed":true},"retention_in_hours":{"type":"number","optional":true,"computed":true},"storage_redundancy":{"type":"string","optional":true,"computed":true},"tier":{"type":"string","optional":true,"computed":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true},"capabilities":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true}}},"optional":true,"computed":true},"capacity":{"nesting_mode":3,"block":{"attributes":{"total_throughput_limit":{"type":"number","required":true}}},"optional":true,"computed":true},"consistency_policy":{"nesting_mode":3,"block":{"attributes":{"consistency_level":{"type":"string","required":true},"max_interval_in_seconds":{"type":"number","optional":true,"default":5},"max_staleness_prefix":{"type":"number","optional":true,"default":100}}},"required":true},"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true},"geo_location":{"nesting_mode":4,"block":{"attributes":{"failover_priority":{"type":"number","required":true},"id":{"type":"string","computed":true},"location":{"type":"string","required":true},"zone_redundant":{"type":"bool","optional":true,"default":false}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"restore":{"nesting_mode":3,"block":{"attributes":{"restore_timestamp_in_utc":{"type":"string","required":true},"source_cosmosdb_account_id":{"type":"string","required":true},"tables_to_restore":{"type":["list","string"],"optional":true}},"block_types":{"database":{"nesting_mode":4,"block":{"attributes":{"collection_names":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true},"gremlin_database":{"nesting_mode":3,"block":{"attributes":{"graph_names":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"virtual_network_rule":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true},"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_cluster":{"block":{"attributes":{"authentication_method":{"type":"string","optional":true,"default":"Cassandra"},"client_certificate_pems":{"type":["list","string"],"optional":true},"default_admin_password":{"type":"string","required":true},"delegated_management_subnet_id":{"type":"string","required":true},"external_gossip_certificate_pems":{"type":["list","string"],"optional":true},"external_seed_node_ip_addresses":{"type":["list","string"],"optional":true},"hours_between_backups":{"type":"number","optional":true,"default":24},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"repair_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"3.11"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_datacenter":{"block":{"attributes":{"availability_zones_enabled":{"type":"bool","optional":true,"default":true},"backup_storage_customer_key_uri":{"type":"string","optional":true},"base64_encoded_yaml_fragment":{"type":"string","optional":true},"cassandra_cluster_id":{"type":"string","required":true},"delegated_management_subnet_id":{"type":"string","required":true},"disk_count":{"type":"number","optional":true},"disk_sku":{"type":"string","optional":true,"default":"P30"},"location":{"type":"string","required":true},"managed_disk_customer_key_uri":{"type":"string","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"default":3},"seed_node_ip_addresses":{"type":["list","string"],"computed":true},"sku_name":{"type":"string","optional":true,"default":"Standard_E16s_v5"}}}},"azurerm_cosmosdb_cassandra_keyspace":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_table":{"block":{"attributes":{"analytical_storage_ttl":{"type":"number","optional":true},"cassandra_keyspace_id":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"schema":{"nesting_mode":3,"block":{"block_types":{"cluster_key":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"order_by":{"type":"string","required":true}}},"optional":true},"column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"partition_key":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_cosmosdb_gremlin_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_gremlin_graph":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"partition_key_path":{"type":"string","required":true},"partition_key_version":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"conflict_resolution_policy":{"nesting_mode":3,"block":{"attributes":{"conflict_resolution_path":{"type":"string","optional":true},"conflict_resolution_procedure":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"optional":true,"computed":true},"index_policy":{"nesting_mode":3,"block":{"attributes":{"automatic":{"type":"bool","optional":true,"default":true},"excluded_paths":{"type":["set","string"],"optional":true,"computed":true},"included_paths":{"type":["set","string"],"optional":true,"computed":true},"indexing_mode":{"type":"string","required":true}},"block_types":{"composite_index":{"nesting_mode":3,"block":{"block_types":{"index":{"nesting_mode":3,"block":{"attributes":{"order":{"type":"string","required":true},"path":{"type":"string","required":true}}},"required":true}}},"optional":true},"spatial_index":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true},"types":{"type":["set","string"],"computed":true}}},"optional":true}}},"optional":true,"computed":true},"unique_key":{"nesting_mode":4,"block":{"attributes":{"paths":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_cosmosdb_mongo_collection":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shard_key":{"type":"string","optional":true},"system_indexes":{"type":["list",["object",{"keys":["list","string"],"unique":"bool"}]],"computed":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"index":{"nesting_mode":4,"block":{"attributes":{"keys":{"type":["list","string"],"required":true},"unique":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_cosmosdb_mongo_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_mongo_role_definition":{"block":{"attributes":{"cosmos_mongo_database_id":{"type":"string","required":true},"inherited_role_names":{"type":["list","string"],"optional":true},"role_name":{"type":"string","required":true}},"block_types":{"privilege":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"required":true}},"block_types":{"resource":{"nesting_mode":3,"block":{"attributes":{"collection_name":{"type":"string","optional":true},"db_name":{"type":"string","optional":true}}},"required":true}}},"optional":true}}}},"azurerm_cosmosdb_mongo_user_definition":{"block":{"attributes":{"cosmos_mongo_database_id":{"type":"string","required":true},"inherited_role_names":{"type":["list","string"],"optional":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_cluster":{"block":{"attributes":{"administrator_login_password":{"type":"string","optional":true},"citus_version":{"type":"string","optional":true,"computed":true},"coordinator_public_ip_access_enabled":{"type":"bool","optional":true,"default":true},"coordinator_server_edition":{"type":"string","optional":true,"default":"GeneralPurpose"},"coordinator_storage_quota_in_mb":{"type":"number","optional":true},"coordinator_vcore_count":{"type":"number","optional":true},"earliest_restore_time":{"type":"string","computed":true},"ha_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"node_count":{"type":"number","required":true},"node_public_ip_access_enabled":{"type":"bool","optional":true,"default":false},"node_server_edition":{"type":"string","optional":true,"default":"MemoryOptimized"},"node_storage_quota_in_mb":{"type":"number","optional":true,"computed":true},"node_vcores":{"type":"number","optional":true,"computed":true},"point_in_time_in_utc":{"type":"string","optional":true,"required_with":["source_location","source_resource_id"]},"preferred_primary_zone":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"servers":{"type":["list",["object",{"fqdn":"string","name":"string"}]],"computed":true},"shards_on_coordinator_enabled":{"type":"bool","optional":true,"computed":true},"source_location":{"type":"string","optional":true,"required_with":["source_resource_id"]},"source_resource_id":{"type":"string","optional":true,"required_with":["source_location"]},"sql_version":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true}}}},"azurerm_cosmosdb_postgresql_coordinator_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_firewall_rule":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_node_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_role":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_container":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"partition_key_kind":{"type":"string","optional":true,"default":"Hash"},"partition_key_paths":{"type":["list","string"],"required":true},"partition_key_version":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"conflict_resolution_policy":{"nesting_mode":3,"block":{"attributes":{"conflict_resolution_path":{"type":"string","optional":true},"conflict_resolution_procedure":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"optional":true,"computed":true},"indexing_policy":{"nesting_mode":3,"block":{"attributes":{"indexing_mode":{"type":"string","optional":true,"default":"consistent"}},"block_types":{"composite_index":{"nesting_mode":3,"block":{"block_types":{"index":{"nesting_mode":3,"block":{"attributes":{"order":{"type":"string","required":true},"path":{"type":"string","required":true}}},"required":true}}},"optional":true},"excluded_path":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true}}},"optional":true},"included_path":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true}}},"optional":true},"spatial_index":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true},"types":{"type":["set","string"],"computed":true}}},"optional":true}}},"optional":true,"computed":true},"unique_key":{"nesting_mode":4,"block":{"attributes":{"paths":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_cosmosdb_sql_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_sql_dedicated_gateway":{"block":{"attributes":{"cosmosdb_account_id":{"type":"string","required":true},"instance_count":{"type":"number","required":true},"instance_size":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_function":{"block":{"attributes":{"body":{"type":"string","required":true},"container_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_role_assignment":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_role_definition":{"block":{"attributes":{"account_name":{"type":"string","required":true},"assignable_scopes":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role_definition_id":{"type":"string","optional":true,"computed":true},"type":{"type":"string","optional":true,"default":"CustomRole"}},"block_types":{"permissions":{"nesting_mode":4,"block":{"attributes":{"data_actions":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_cosmosdb_sql_stored_procedure":{"block":{"attributes":{"account_name":{"type":"string","required":true},"body":{"type":"string","required":true},"container_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_trigger":{"block":{"attributes":{"body":{"type":"string","required":true},"container_id":{"type":"string","required":true},"name":{"type":"string","required":true},"operation":{"type":"string","required":true},"type":{"type":"string","required":true}}}},"azurerm_cosmosdb_table":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cost_anomaly_alert":{"block":{"attributes":{"display_name":{"type":"string","required":true},"email_addresses":{"type":["set","string"],"required":true},"email_subject":{"type":"string","required":true},"message":{"type":"string","optional":true},"name":{"type":"string","required":true},"notification_email":{"type":"string","optional":true,"computed":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_cost_management_scheduled_action":{"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"days_of_week":{"type":["list","string"],"optional":true},"display_name":{"type":"string","required":true},"email_address_sender":{"type":"string","required":true},"email_addresses":{"type":["list","string"],"required":true},"email_subject":{"type":"string","required":true},"end_date":{"type":"string","required":true},"frequency":{"type":"string","required":true},"hour_of_day":{"type":"number","optional":true},"message":{"type":"string","optional":true},"name":{"type":"string","required":true},"start_date":{"type":"string","required":true},"view_id":{"type":"string","required":true},"weeks_of_month":{"type":["list","string"],"optional":true}}}},"azurerm_custom_ip_prefix":{"block":{"attributes":{"cidr":{"type":"string","required":true},"commissioning_enabled":{"type":"bool","optional":true,"default":false},"internet_advertising_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"parent_custom_ip_prefix_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"roa_validity_end_date":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"wan_validation_signed_message":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_custom_provider":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["resource_type","action"]},"resource_type":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"routing_type":{"type":"string","optional":true,"default":"Proxy"}}},"optional":true,"at_least_one_of":["resource_type","action"]},"validation":{"nesting_mode":4,"block":{"attributes":{"specification":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dashboard_grafana":{"block":{"attributes":{"api_key_enabled":{"type":"bool","optional":true,"default":false},"auto_generated_domain_name_label_scope":{"type":"string","optional":true,"default":"TenantReuse"},"deterministic_outbound_ip_enabled":{"type":"bool","optional":true,"default":false},"endpoint":{"type":"string","computed":true},"grafana_major_version":{"type":"string","required":true},"grafana_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip":{"type":["list","string"],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"azure_monitor_workspace_integrations":{"nesting_mode":3,"block":{"attributes":{"resource_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"smtp":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"from_address":{"type":"string","required":true},"from_name":{"type":"string","optional":true,"default":"Azure Managed Grafana Notification"},"host":{"type":"string","required":true},"password":{"type":"string","required":true},"start_tls_policy":{"type":"string","required":true},"user":{"type":"string","required":true},"verification_skip_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_dashboard_grafana_managed_private_endpoint":{"block":{"attributes":{"grafana_id":{"type":"string","required":true},"group_ids":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_resource_id":{"type":"string","required":true},"private_link_resource_region":{"type":"string","optional":true},"request_message":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory":{"block":{"attributes":{"customer_managed_key_id":{"type":"string","optional":true},"customer_managed_key_identity_id":{"type":"string","optional":true,"required_with":["customer_managed_key_id"]},"location":{"type":"string","required":true},"managed_virtual_network_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"public_network_enabled":{"type":"bool","optional":true,"default":true},"purview_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"github_configuration":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"git_url":{"type":"string","optional":true},"publishing_enabled":{"type":"bool","optional":true,"default":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true}}},"optional":true,"conflicts_with":["vsts_configuration"]},"global_parameter":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"vsts_configuration":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"project_name":{"type":"string","required":true},"publishing_enabled":{"type":"bool","optional":true,"default":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["github_configuration"]}}}},"azurerm_data_factory_credential_service_principal":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"service_principal_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}},"block_types":{"service_principal_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_credential_user_managed_identity":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"identity_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_data_factory_custom_dataset":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema_json":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_data_flow":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"script":{"type":"string","optional":true,"at_least_one_of":["script","script_lines"]},"script_lines":{"type":["list","string"],"optional":true,"at_least_one_of":["script","script_lines"]}},"block_types":{"sink":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"required":true},"transformation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_azure_blob":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_azure_sql_table":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema":{"type":"string","optional":true},"table":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_binary":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["http_server_location","sftp_server_location"]},"compression":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location","sftp_server_location"]},"sftp_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location","http_server_location"]}}}},"azurerm_data_factory_dataset_cosmosdb_sqlapi":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"collection_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_delimited_text":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"column_delimiter":{"type":"string","optional":true,"default":","},"compression_codec":{"type":"string","optional":true},"compression_level":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encoding":{"type":"string","optional":true},"escape_character":{"type":"string","optional":true,"default":"\\"},"first_row_as_header":{"type":"bool","optional":true,"default":false},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"null_value":{"type":"string","optional":true,"default":""},"parameters":{"type":["map","string"],"optional":true},"quote_character":{"type":"string","optional":true,"default":"\""},"row_delimiter":{"type":"string","optional":true}},"block_types":{"azure_blob_fs_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_file_system_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"file_system":{"type":"string","optional":true},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_http":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"relative_url":{"type":"string","optional":true},"request_body":{"type":"string","optional":true},"request_method":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_json":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encoding":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true,"conflicts_with":["http_server_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_mysql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_parquet":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"compression_codec":{"type":"string","optional":true},"compression_level":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_fs_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_file_system_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"file_system":{"type":"string","optional":true},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","optional":true},"relative_url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_postgresql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_snowflake":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema_name":{"type":"string","optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"precision":{"type":"number","optional":true},"scale":{"type":"number","optional":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_sql_server_table":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_flowlet_data_flow":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"script":{"type":"string","optional":true,"at_least_one_of":["script","script_lines"]},"script_lines":{"type":["list","string"],"optional":true,"at_least_one_of":["script","script_lines"]}},"block_types":{"sink":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true},"transformation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_integration_runtime_azure":{"block":{"attributes":{"cleanup_enabled":{"type":"bool","optional":true,"default":true},"compute_type":{"type":"string","optional":true,"default":"General"},"core_count":{"type":"number","optional":true,"default":8},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"time_to_live_min":{"type":"number","optional":true,"default":0},"virtual_network_enabled":{"type":"bool","optional":true}}}},"azurerm_data_factory_integration_runtime_azure_ssis":{"block":{"attributes":{"credential_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"edition":{"type":"string","optional":true,"default":"Standard"},"license_type":{"type":"string","optional":true,"default":"LicenseIncluded"},"location":{"type":"string","required":true},"max_parallel_executions_per_node":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"node_size":{"type":"string","required":true},"number_of_nodes":{"type":"number","optional":true,"default":1}},"block_types":{"catalog_info":{"nesting_mode":3,"block":{"attributes":{"administrator_login":{"type":"string","optional":true},"administrator_password":{"type":"string","optional":true},"dual_standby_pair_name":{"type":"string","optional":true},"elastic_pool_name":{"type":"string","optional":true,"conflicts_with":["catalog_info.0.pricing_tier"]},"pricing_tier":{"type":"string","optional":true,"conflicts_with":["catalog_info.0.elastic_pool_name"]},"server_endpoint":{"type":"string","required":true}}},"optional":true},"copy_compute_scale":{"nesting_mode":3,"block":{"attributes":{"data_integration_unit":{"type":"number","optional":true},"time_to_live":{"type":"number","optional":true}}},"optional":true},"custom_setup_script":{"nesting_mode":3,"block":{"attributes":{"blob_container_uri":{"type":"string","required":true},"sas_token":{"type":"string","required":true}}},"optional":true},"express_custom_setup":{"nesting_mode":3,"block":{"attributes":{"environment":{"type":["map","string"],"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]},"powershell_version":{"type":"string","optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]}},"block_types":{"command_key":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"target_name":{"type":"string","required":true},"user_name":{"type":"string","required":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}},"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]},"component":{"nesting_mode":3,"block":{"attributes":{"license":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"key_vault_license":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}},"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]}}},"optional":true},"express_vnet_integration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true},"package_store":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"pipeline_external_compute_scale":{"nesting_mode":3,"block":{"attributes":{"number_of_external_nodes":{"type":"number","optional":true},"number_of_pipeline_nodes":{"type":"number","optional":true},"time_to_live":{"type":"number","optional":true}}},"optional":true},"proxy":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","optional":true},"self_hosted_integration_runtime_name":{"type":"string","required":true},"staging_storage_linked_service_name":{"type":"string","required":true}}},"optional":true},"vnet_integration":{"nesting_mode":3,"block":{"attributes":{"public_ips":{"type":["list","string"],"optional":true},"subnet_id":{"type":"string","optional":true,"exactly_one_of":["vnet_integration.0.vnet_id","vnet_integration.0.subnet_id"]},"subnet_name":{"type":"string","optional":true,"required_with":["vnet_integration.0.vnet_id"]},"vnet_id":{"type":"string","optional":true,"exactly_one_of":["vnet_integration.0.vnet_id","vnet_integration.0.subnet_id"]}}},"optional":true}}}},"azurerm_data_factory_integration_runtime_self_hosted":{"block":{"attributes":{"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"primary_authorization_key":{"type":"string","computed":true},"secondary_authorization_key":{"type":"string","computed":true},"self_contained_interactive_authoring_enabled":{"type":"bool","optional":true}},"block_types":{"rbac_authorization":{"nesting_mode":4,"block":{"attributes":{"resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_custom_service":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"integration_runtime":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_blob_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"connection_string_insecure":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"sas_uri":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"service_endpoint":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["use_managed_identity"]},"service_principal_key":{"type":"string","optional":true},"storage_kind":{"type":"string","optional":true},"tenant_id":{"type":"string","optional":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_id"]}},"block_types":{"key_vault_sas_token":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true},"service_principal_linked_key_vault_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_databricks":{"block":{"attributes":{"access_token":{"type":"string","optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"adb_domain":{"type":"string","required":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"existing_cluster_id":{"type":"string","optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]},"integration_runtime_name":{"type":"string","optional":true},"msi_work_space_resource_id":{"type":"string","optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"instance_pool":{"nesting_mode":3,"block":{"attributes":{"cluster_version":{"type":"string","required":true},"instance_pool_id":{"type":"string","required":true},"max_number_of_workers":{"type":"number","optional":true},"min_number_of_workers":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"new_cluster_config":{"nesting_mode":3,"block":{"attributes":{"cluster_version":{"type":"string","required":true},"custom_tags":{"type":["map","string"],"optional":true},"driver_node_type":{"type":"string","optional":true},"init_scripts":{"type":["list","string"],"optional":true},"log_destination":{"type":"string","optional":true},"max_number_of_workers":{"type":"number","optional":true},"min_number_of_workers":{"type":"number","optional":true,"default":"1"},"node_type":{"type":"string","required":true},"spark_config":{"type":["map","string"],"optional":true},"spark_environment_variables":{"type":["map","string"],"optional":true}}},"optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]}}}},"azurerm_data_factory_linked_service_azure_file_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"file_share":{"type":"string","optional":true},"host":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","optional":true},"user_id":{"type":"string","optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_function":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"key":{"type":"string","optional":true,"exactly_one_of":["key","key_vault_key"]},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"url":{"type":"string","required":true}},"block_types":{"key_vault_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["key","key_vault_key"]}}}},"azurerm_data_factory_linked_service_azure_search":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted_credential":{"type":"string","computed":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"search_service_key":{"type":"string","required":true},"url":{"type":"string","required":true}}}},"azurerm_data_factory_linked_service_azure_sql_database":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"credential_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["use_managed_identity"],"required_with":["service_principal_key"]},"service_principal_key":{"type":"string","optional":true,"required_with":["service_principal_id"]},"tenant_id":{"type":"string","optional":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_id"]}},"block_types":{"key_vault_connection_string":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_table_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_cosmosdb":{"block":{"attributes":{"account_endpoint":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"account_key":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"conflicts_with":["account_endpoint","account_key"]},"data_factory_id":{"type":"string","required":true},"database":{"type":"string","optional":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_cosmosdb_mongoapi":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"database":{"type":"string","optional":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"server_version_is_32_or_higher":{"type":"bool","optional":true,"default":false}}}},"azurerm_data_factory_linked_service_data_lake_storage_gen2":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_key","tenant"]},"service_principal_key":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_id","tenant"]},"storage_account_key":{"type":"string","optional":true,"conflicts_with":["service_principal_id","service_principal_key","use_managed_identity","tenant"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"]},"tenant":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_id","service_principal_key"]},"url":{"type":"string","required":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_key","service_principal_id","storage_account_key","tenant"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"]}}}},"azurerm_data_factory_linked_service_key_vault":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_kusto":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"kusto_database_name":{"type":"string","required":true},"kusto_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"exactly_one_of":["service_principal_id","use_managed_identity"],"required_with":["service_principal_key"]},"service_principal_key":{"type":"string","optional":true,"required_with":["service_principal_id"]},"tenant":{"type":"string","optional":true,"required_with":["service_principal_id"]},"use_managed_identity":{"type":"bool","optional":true,"default":false,"exactly_one_of":["service_principal_id","use_managed_identity"]}}}},"azurerm_data_factory_linked_service_mysql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_odata":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"url":{"type":"string","required":true}},"block_types":{"basic_authentication":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_odbc":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"basic_authentication":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_postgresql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_sftp":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"authentication_type":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"host":{"type":"string","required":true},"host_key_fingerprint":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","required":true},"port":{"type":"number","required":true},"skip_host_key_validation":{"type":"bool","optional":true},"username":{"type":"string","required":true}}}},"azurerm_data_factory_linked_service_snowflake":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_sql_server":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"user_name":{"type":"string","optional":true}},"block_types":{"key_vault_connection_string":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_synapse":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_web":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"authentication_type":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","optional":true},"url":{"type":"string","required":true},"username":{"type":"string","optional":true}}}},"azurerm_data_factory_managed_private_endpoint":{"block":{"attributes":{"data_factory_id":{"type":"string","required":true},"fqdns":{"type":["list","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"subresource_name":{"type":"string","optional":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_data_factory_pipeline":{"block":{"attributes":{"activities_json":{"type":"string","optional":true},"annotations":{"type":["list","string"],"optional":true},"concurrency":{"type":"number","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"moniter_metrics_after_duration":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"variables":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_trigger_blob_event":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"blob_path_begins_with":{"type":"string","optional":true,"at_least_one_of":["blob_path_begins_with","blob_path_ends_with"]},"blob_path_ends_with":{"type":"string","optional":true,"at_least_one_of":["blob_path_begins_with","blob_path_ends_with"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"events":{"type":["set","string"],"required":true},"ignore_empty_blobs":{"type":"bool","optional":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"pipeline":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_trigger_custom_event":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"eventgrid_topic_id":{"type":"string","required":true},"events":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"subject_begins_with":{"type":"string","optional":true},"subject_ends_with":{"type":"string","optional":true}},"block_types":{"pipeline":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_trigger_schedule":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"frequency":{"type":"string","optional":true,"default":"Minute"},"interval":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"pipeline_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["pipeline","pipeline_name"]},"pipeline_parameters":{"type":["map","string"],"optional":true,"computed":true,"conflicts_with":["pipeline"]},"start_time":{"type":"string","optional":true,"computed":true},"time_zone":{"type":"string","optional":true}},"block_types":{"pipeline":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["pipeline_parameters"],"exactly_one_of":["pipeline","pipeline_name"]},"schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"optional":true},"days_of_week":{"type":["list","string"],"optional":true},"hours":{"type":["list","number"],"optional":true},"minutes":{"type":["list","number"],"optional":true}},"block_types":{"monthly":{"nesting_mode":3,"block":{"attributes":{"week":{"type":"number","optional":true},"weekday":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_trigger_tumbling_window":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"delay":{"type":"string","optional":true},"description":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"max_concurrency":{"type":"number","optional":true,"default":50},"name":{"type":"string","required":true},"start_time":{"type":"string","required":true}},"block_types":{"pipeline":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true},"retry":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"number","optional":true,"default":30}}},"optional":true},"trigger_dependency":{"nesting_mode":4,"block":{"attributes":{"offset":{"type":"string","optional":true},"size":{"type":"string","optional":true},"trigger_name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_protection_backup_instance_blob_storage":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_container_names":{"type":["list","string"],"optional":true},"storage_account_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_disk":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"disk_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"snapshot_resource_group_name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_kubernetes_cluster":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"kubernetes_cluster_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"snapshot_resource_group_name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}},"block_types":{"backup_datasource_parameters":{"nesting_mode":3,"block":{"attributes":{"cluster_scoped_resources_enabled":{"type":"bool","optional":true,"default":false},"excluded_namespaces":{"type":["list","string"],"optional":true},"excluded_resource_types":{"type":["list","string"],"optional":true},"included_namespaces":{"type":["list","string"],"optional":true},"included_resource_types":{"type":["list","string"],"optional":true},"label_selectors":{"type":["list","string"],"optional":true},"volume_snapshot_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_data_protection_backup_instance_mysql_flexible_server":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_postgresql":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"database_credential_key_vault_secret_id":{"type":"string","optional":true},"database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_postgresql_flexible_server":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_policy_blob_storage":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"operational_default_retention_duration":{"type":"string","optional":true,"at_least_one_of":["operational_default_retention_duration","vault_default_retention_duration"]},"time_zone":{"type":"string","optional":true},"vault_default_retention_duration":{"type":"string","optional":true,"at_least_one_of":["operational_default_retention_duration","vault_default_retention_duration"],"required_with":["backup_repeating_time_intervals"]},"vault_id":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_month":{"type":["set","number"],"optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true,"required_with":["vault_default_retention_duration"]}}}},"azurerm_data_protection_backup_policy_disk":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"default_retention_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_kubernetes_cluster":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_name":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_mysql_flexible_server":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_postgresql":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"default_retention_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_name":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_postgresql_flexible_server":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_vault":{"block":{"attributes":{"cross_region_restore_enabled":{"type":"bool","optional":true},"datastore_type":{"type":"string","required":true},"immutability":{"type":"string","optional":true,"default":"Disabled"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"redundancy":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_duration_in_days":{"type":"number","optional":true,"default":14},"soft_delete":{"type":"string","optional":true,"default":"On"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_protection_backup_vault_customer_managed_key":{"block":{"attributes":{"data_protection_backup_vault_id":{"type":"string","required":true},"key_vault_key_id":{"type":"string","required":true}}}},"azurerm_data_protection_resource_guard":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vault_critical_operation_exclusion_list":{"type":["list","string"],"optional":true}}}},"azurerm_data_share":{"block":{"attributes":{"account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"kind":{"type":"string","required":true},"name":{"type":"string","required":true},"terms":{"type":"string","optional":true}},"block_types":{"snapshot_schedule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"recurrence":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_share_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_data_share_dataset_blob_storage":{"block":{"attributes":{"container_name":{"type":"string","required":true},"data_share_id":{"type":"string","required":true},"display_name":{"type":"string","computed":true},"file_path":{"type":"string","optional":true,"conflicts_with":["folder_path"]},"folder_path":{"type":"string","optional":true,"conflicts_with":["file_path"]},"name":{"type":"string","required":true}},"block_types":{"storage_account":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_data_share_dataset_data_lake_gen2":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"file_path":{"type":"string","optional":true,"conflicts_with":["folder_path"]},"file_system_name":{"type":"string","required":true},"folder_path":{"type":"string","optional":true,"conflicts_with":["file_path"]},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_data_share_dataset_kusto_cluster":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"kusto_cluster_id":{"type":"string","required":true},"kusto_cluster_location":{"type":"string","computed":true},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true}}}},"azurerm_data_share_dataset_kusto_database":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"kusto_cluster_location":{"type":"string","computed":true},"kusto_database_id":{"type":"string","required":true},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true}}}},"azurerm_database_migration_project":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"source_platform":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_platform":{"type":"string","required":true}}}},"azurerm_database_migration_service":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_databox_edge_device":{"block":{"attributes":{"device_properties":{"type":["list",["object",{"capacity":"number","configured_role_types":["list","string"],"culture":"string","hcs_version":"string","model":"string","node_count":"number","serial_number":"string","software_version":"string","status":"string","time_zone":"string","type":"string"}]],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_databricks_access_connector":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_databricks_virtual_network_peering":{"block":{"attributes":{"address_space_prefixes":{"type":["list","string"],"computed":true},"allow_forwarded_traffic":{"type":"bool","optional":true,"default":false},"allow_gateway_transit":{"type":"bool","optional":true,"default":false},"allow_virtual_network_access":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"remote_address_space_prefixes":{"type":["list","string"],"required":true},"remote_virtual_network_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"use_remote_gateways":{"type":"bool","optional":true,"default":false},"virtual_network_id":{"type":"string","computed":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_databricks_workspace":{"block":{"attributes":{"access_connector_id":{"type":"string","optional":true,"required_with":["default_storage_firewall_enabled"]},"customer_managed_key_enabled":{"type":"bool","optional":true,"default":false},"default_storage_firewall_enabled":{"type":"bool","optional":true,"required_with":["access_connector_id"]},"disk_encryption_set_id":{"type":"string","computed":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"load_balancer_backend_address_pool_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"managed_disk_cmk_key_vault_id":{"type":"string","optional":true},"managed_disk_cmk_key_vault_key_id":{"type":"string","optional":true},"managed_disk_cmk_rotation_to_latest_version_enabled":{"type":"bool","optional":true,"required_with":["managed_disk_cmk_key_vault_key_id"]},"managed_disk_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"managed_resource_group_id":{"type":"string","computed":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_services_cmk_key_vault_id":{"type":"string","optional":true},"managed_services_cmk_key_vault_key_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_security_group_rules_required":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"storage_account_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true},"workspace_url":{"type":"string","computed":true}},"block_types":{"custom_parameters":{"nesting_mode":3,"block":{"attributes":{"machine_learning_workspace_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"nat_gateway_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"no_public_ip":{"type":"bool","optional":true,"default":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"private_subnet_name":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"private_subnet_network_security_group_association_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_ip_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_subnet_name":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_subnet_network_security_group_association_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"storage_account_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"storage_account_sku_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"virtual_network_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"vnet_address_prefix":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]}}},"optional":true,"computed":true},"enhanced_security_compliance":{"nesting_mode":3,"block":{"attributes":{"automatic_cluster_update_enabled":{"type":"bool","optional":true,"default":false},"compliance_security_profile_enabled":{"type":"bool","optional":true,"default":false},"compliance_security_profile_standards":{"type":["set","string"],"optional":true},"enhanced_security_monitoring_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_databricks_workspace_customer_managed_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_databricks_workspace_root_dbfs_customer_managed_key":{"block":{"attributes":{"key_vault_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_datadog_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_subscription_status":{"type":"string","computed":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"datadog_organization":{"nesting_mode":3,"block":{"attributes":{"api_key":{"type":"string","required":true},"application_key":{"type":"string","required":true},"enterprise_app_id":{"type":"string","optional":true},"id":{"type":"string","computed":true},"linking_auth_code":{"type":"string","optional":true},"linking_client_id":{"type":"string","optional":true},"name":{"type":"string","computed":true},"redirect_uri":{"type":"string","optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"user":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","optional":true}}},"required":true}}}},"azurerm_datadog_monitor_sso_configuration":{"block":{"attributes":{"datadog_monitor_id":{"type":"string","required":true},"enterprise_application_id":{"type":"string","required":true},"login_url":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"default"},"single_sign_on_enabled":{"type":"string","required":true}}}},"azurerm_datadog_monitor_tag_rule":{"block":{"attributes":{"datadog_monitor_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"default":"default"}},"block_types":{"log":{"nesting_mode":3,"block":{"attributes":{"aad_log_enabled":{"type":"bool","optional":true},"resource_log_enabled":{"type":"bool","optional":true},"subscription_log_enabled":{"type":"bool","optional":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"metric":{"nesting_mode":3,"block":{"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_dedicated_hardware_security_module":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"stamp_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"management_network_profile":{"nesting_mode":3,"block":{"attributes":{"network_interface_private_ip_addresses":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"network_interface_private_ip_addresses":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_dedicated_host":{"block":{"attributes":{"auto_replace_on_failure":{"type":"bool","optional":true,"default":true},"dedicated_host_group_id":{"type":"string","required":true},"license_type":{"type":"string","optional":true,"default":"None"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"platform_fault_domain":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dedicated_host_group":{"block":{"attributes":{"automatic_placement_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true}}}},"azurerm_dev_center":{"block":{"attributes":{"dev_center_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_attached_network":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_connection_id":{"type":"string","required":true}}}},"azurerm_dev_center_catalog":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"catalog_adogit":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","required":true},"key_vault_key_url":{"type":"string","required":true},"path":{"type":"string","required":true},"uri":{"type":"string","required":true}}},"optional":true},"catalog_github":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","required":true},"key_vault_key_url":{"type":"string","required":true},"path":{"type":"string","required":true},"uri":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_dev_box_definition":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"image_reference_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_environment_type":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_gallery":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"shared_gallery_id":{"type":"string","required":true}}}},"azurerm_dev_center_network_connection":{"block":{"attributes":{"domain_join_type":{"type":"string","required":true},"domain_name":{"type":"string","optional":true},"domain_password":{"type":"string","optional":true},"domain_username":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"organization_unit":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_project":{"block":{"attributes":{"description":{"type":"string","optional":true},"dev_center_id":{"type":"string","required":true},"dev_center_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"maximum_dev_boxes_per_user":{"type":"number","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_project_environment_type":{"block":{"attributes":{"creator_role_assignment_roles":{"type":["set","string"],"optional":true},"deployment_target_id":{"type":"string","required":true},"dev_center_project_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"user_role_assignment":{"nesting_mode":4,"block":{"attributes":{"roles":{"type":["set","string"],"required":true},"user_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_project_pool":{"block":{"attributes":{"dev_box_definition_name":{"type":"string","required":true},"dev_center_attached_network_name":{"type":"string","required":true},"dev_center_project_id":{"type":"string","required":true},"local_administrator_enabled":{"type":"bool","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"stop_on_disconnect_grace_period_minutes":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_test_global_vm_shutdown_schedule":{"block":{"attributes":{"daily_recurrence_time":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"notification_settings":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"time_in_minutes":{"type":"number","optional":true,"default":30},"webhook_url":{"type":"string","optional":true}}},"required":true}}}},"azurerm_dev_test_lab":{"block":{"attributes":{"artifacts_storage_account_id":{"type":"string","computed":true},"default_premium_storage_account_id":{"type":"string","computed":true},"default_storage_account_id":{"type":"string","computed":true},"key_vault_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"premium_data_disk_storage_account_id":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true}}}},"azurerm_dev_test_linux_virtual_machine":{"block":{"attributes":{"allow_claim":{"type":"bool","optional":true,"default":true},"disallow_public_ip_address":{"type":"bool","optional":true},"fqdn":{"type":"string","computed":true},"lab_name":{"type":"string","required":true},"lab_subnet_name":{"type":"string","required":true},"lab_virtual_network_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"string","required":true},"ssh_key":{"type":"string","optional":true},"storage_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true},"username":{"type":"string","required":true}},"block_types":{"gallery_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"inbound_nat_rule":{"nesting_mode":4,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","computed":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_test_policy":{"block":{"attributes":{"description":{"type":"string","optional":true},"evaluator_type":{"type":"string","required":true},"fact_data":{"type":"string","optional":true},"lab_name":{"type":"string","required":true},"name":{"type":"string","required":true},"policy_set_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"threshold":{"type":"string","required":true}}}},"azurerm_dev_test_schedule":{"block":{"attributes":{"lab_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"status":{"type":"string","optional":true,"default":"Disabled"},"tags":{"type":["map","string"],"optional":true},"task_type":{"type":"string","required":true},"time_zone_id":{"type":"string","required":true}},"block_types":{"daily_recurrence":{"nesting_mode":3,"block":{"attributes":{"time":{"type":"string","required":true}}},"optional":true},"hourly_recurrence":{"nesting_mode":3,"block":{"attributes":{"minute":{"type":"number","required":true}}},"optional":true},"notification_settings":{"nesting_mode":3,"block":{"attributes":{"status":{"type":"string","optional":true,"default":"Disabled"},"time_in_minutes":{"type":"number","optional":true},"webhook_url":{"type":"string","optional":true}}},"required":true},"weekly_recurrence":{"nesting_mode":3,"block":{"attributes":{"time":{"type":"string","required":true},"week_days":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_dev_test_virtual_network":{"block":{"attributes":{"description":{"type":"string","optional":true},"lab_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true}},"block_types":{"subnet":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","computed":true},"use_in_virtual_machine_creation":{"type":"string","optional":true,"default":"Allow"},"use_public_ip_address":{"type":"string","optional":true,"default":"Allow"}},"block_types":{"shared_public_ip_address":{"nesting_mode":3,"block":{"block_types":{"allowed_ports":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","optional":true},"transport_protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_dev_test_windows_virtual_machine":{"block":{"attributes":{"allow_claim":{"type":"bool","optional":true,"default":true},"disallow_public_ip_address":{"type":"bool","optional":true},"fqdn":{"type":"string","computed":true},"lab_name":{"type":"string","required":true},"lab_subnet_name":{"type":"string","required":true},"lab_virtual_network_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"string","required":true},"storage_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true},"username":{"type":"string","required":true}},"block_types":{"gallery_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"inbound_nat_rule":{"nesting_mode":4,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","computed":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_digital_twins_endpoint_eventgrid":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"eventgrid_topic_endpoint":{"type":"string","required":true},"eventgrid_topic_primary_access_key":{"type":"string","required":true},"eventgrid_topic_secondary_access_key":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_digital_twins_endpoint_eventhub":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"eventhub_primary_connection_string":{"type":"string","required":true},"eventhub_secondary_connection_string":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_digital_twins_endpoint_servicebus":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"name":{"type":"string","required":true},"servicebus_primary_connection_string":{"type":"string","required":true},"servicebus_secondary_connection_string":{"type":"string","required":true}}}},"azurerm_digital_twins_instance":{"block":{"attributes":{"host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_digital_twins_time_series_database_connection":{"block":{"attributes":{"digital_twins_id":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","optional":true,"default":"$Default"},"eventhub_name":{"type":"string","required":true},"eventhub_namespace_endpoint_uri":{"type":"string","required":true},"eventhub_namespace_id":{"type":"string","required":true},"kusto_cluster_id":{"type":"string","required":true},"kusto_cluster_uri":{"type":"string","required":true},"kusto_database_name":{"type":"string","required":true},"kusto_table_name":{"type":"string","optional":true,"default":"AdtPropertyEvents"},"name":{"type":"string","required":true}}}},"azurerm_disk_access":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_disk_encryption_set":{"block":{"attributes":{"auto_key_rotation_enabled":{"type":"bool","optional":true,"default":false},"encryption_type":{"type":"string","optional":true,"default":"EncryptionAtRestWithCustomerKey"},"federated_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_key_id"]},"key_vault_key_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_key_id"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_a_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"optional":true,"conflicts_with":["target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"conflicts_with":["records"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_aaaa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"optional":true,"conflicts_with":["target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"conflicts_with":["records"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_caa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"flags":{"type":"number","required":true},"tag":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_cname_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"record":{"type":"string","optional":true,"exactly_one_of":["record","target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"exactly_one_of":["record","target_resource_id"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_mx_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"@"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"exchange":{"type":"string","required":true},"preference":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_ns_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_ptr_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_srv_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","required":true},"priority":{"type":"number","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","required":true}}},"required":true}}}},"azurerm_dns_txt_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_zone":{"block":{"attributes":{"max_number_of_record_sets":{"type":"number","computed":true},"name":{"type":"string","required":true},"name_servers":{"type":["set","string"],"computed":true},"number_of_record_sets":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"soa_record":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"expire_time":{"type":"number","optional":true,"default":2419200},"fqdn":{"type":"string","computed":true},"host_name":{"type":"string","computed":true},"minimum_ttl":{"type":"number","optional":true,"default":300},"refresh_time":{"type":"number","optional":true,"default":3600},"retry_time":{"type":"number","optional":true,"default":300},"serial_number":{"type":"number","optional":true,"default":1},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","optional":true,"default":3600}}},"optional":true,"computed":true}}}},"azurerm_dynatrace_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_subscription":{"type":"string","required":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"billing_cycle":{"type":"string","optional":true},"effective_date":{"type":"string","computed":true},"plan":{"type":"string","required":true},"usage_type":{"type":"string","optional":true}}},"required":true},"user":{"nesting_mode":3,"block":{"attributes":{"country":{"type":"string","required":true},"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"required":true}}}},"azurerm_dynatrace_tag_rules":{"block":{"attributes":{"monitor_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"log_rule":{"nesting_mode":3,"block":{"attributes":{"send_activity_logs_enabled":{"type":"bool","optional":true,"default":false},"send_azure_active_directory_logs_enabled":{"type":"bool","optional":true,"default":false},"send_subscription_logs_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"filtering_tag":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true},"metric_rule":{"nesting_mode":3,"block":{"block_types":{"filtering_tag":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_elastic_cloud_elasticsearch":{"block":{"attributes":{"elastic_cloud_deployment_id":{"type":"string","computed":true},"elastic_cloud_email_address":{"type":"string","required":true},"elastic_cloud_sso_default_url":{"type":"string","computed":true},"elastic_cloud_user_id":{"type":"string","computed":true},"elasticsearch_service_url":{"type":"string","computed":true},"kibana_service_url":{"type":"string","computed":true},"kibana_sso_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"logs":{"nesting_mode":3,"block":{"attributes":{"send_activity_logs":{"type":"bool","optional":true,"default":false},"send_azuread_logs":{"type":"bool","optional":true,"default":false},"send_subscription_logs":{"type":"bool","optional":true,"default":false}},"block_types":{"filtering_tag":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_elastic_san":{"block":{"attributes":{"base_size_in_tib":{"type":"number","required":true},"extended_size_in_tib":{"type":"number","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_iops":{"type":"number","computed":true},"total_mbps":{"type":"number","computed":true},"total_size_in_tib":{"type":"number","computed":true},"total_volume_size_in_gib":{"type":"number","computed":true},"volume_group_count":{"type":"number","computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"tier":{"type":"string","optional":true,"default":"Premium"}}},"required":true}}}},"azurerm_elastic_san_volume":{"block":{"attributes":{"name":{"type":"string","required":true},"size_in_gib":{"type":"number","required":true},"target_iqn":{"type":"string","computed":true},"target_portal_hostname":{"type":"string","computed":true},"target_portal_port":{"type":"number","computed":true},"volume_group_id":{"type":"string","required":true},"volume_id":{"type":"string","computed":true}},"block_types":{"create_source":{"nesting_mode":3,"block":{"attributes":{"source_id":{"type":"string","required":true},"source_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_elastic_san_volume_group":{"block":{"attributes":{"elastic_san_id":{"type":"string","required":true},"encryption_type":{"type":"string","optional":true,"default":"EncryptionAtRestWithPlatformKey"},"name":{"type":"string","required":true},"protocol_type":{"type":"string","optional":true,"default":"Iscsi"}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"current_versioned_key_expiration_timestamp":{"type":"string","computed":true},"current_versioned_key_id":{"type":"string","computed":true},"key_vault_key_id":{"type":"string","required":true},"last_key_rotation_timestamp":{"type":"string","computed":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_email_communication_service":{"block":{"attributes":{"data_location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_email_communication_service_domain":{"block":{"attributes":{"domain_management":{"type":"string","required":true},"email_service_id":{"type":"string","required":true},"from_sender_domain":{"type":"string","computed":true},"mail_from_sender_domain":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_engagement_tracking_enabled":{"type":"bool","optional":true},"verification_records":{"type":["list",["object",{"dkim":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"dkim2":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"dmarc":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"domain":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"spf":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]]}]],"computed":true}}}},"azurerm_eventgrid_domain":{"block":{"attributes":{"auto_create_topic_with_first_subscription":{"type":"bool","optional":true,"default":true},"auto_delete_topic_with_last_subscription":{"type":"bool","optional":true,"default":true},"endpoint":{"type":"string","computed":true},"inbound_ip_rule":{"type":["list",["object",{"action":"string","ip_mask":"string"}]],"optional":true},"input_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"input_mapping_default_values":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"subject":{"type":"string","optional":true}}},"optional":true},"input_mapping_fields":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_time":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"id":{"type":"string","optional":true},"subject":{"type":"string","optional":true},"topic":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_eventgrid_domain_topic":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_eventgrid_event_subscription":{"block":{"attributes":{"advanced_filtering_on_arrays_enabled":{"type":"bool","optional":true,"default":false},"event_delivery_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"eventhub_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"expiration_time_utc":{"type":"string","optional":true},"hybrid_connection_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"included_event_types":{"type":["list","string"],"optional":true,"computed":true},"labels":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true},"service_bus_queue_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"service_bus_topic_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","storage_queue_endpoint","webhook_endpoint"]}},"block_types":{"advanced_filter":{"nesting_mode":3,"block":{"block_types":{"bool_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"bool","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_not_null":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_null_or_undefined":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]}}},"optional":true},"azure_function_endpoint":{"nesting_mode":3,"block":{"attributes":{"function_id":{"type":"string","required":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true}}},"optional":true,"conflicts_with":["eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"dead_letter_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_property":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true},"source_field":{"type":"string","optional":true},"type":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"retry_policy":{"nesting_mode":3,"block":{"attributes":{"event_time_to_live":{"type":"number","required":true},"max_delivery_attempts":{"type":"number","required":true}}},"optional":true,"computed":true},"storage_blob_dead_letter_destination":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"storage_blob_container_name":{"type":"string","required":true}}},"optional":true},"storage_queue_endpoint":{"nesting_mode":3,"block":{"attributes":{"queue_message_time_to_live_in_seconds":{"type":"number","optional":true},"queue_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","webhook_endpoint"]},"subject_filter":{"nesting_mode":3,"block":{"attributes":{"case_sensitive":{"type":"bool","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_begins_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_ends_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]}}},"optional":true},"webhook_endpoint":{"nesting_mode":3,"block":{"attributes":{"active_directory_app_id_or_uri":{"type":"string","optional":true},"active_directory_tenant_id":{"type":"string","optional":true},"base_url":{"type":"string","computed":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true},"url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint"]}}}},"azurerm_eventgrid_namespace":{"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":1},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"inbound_ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_mask":{"type":"string","required":true}}},"optional":true},"topic_spaces_configuration":{"nesting_mode":3,"block":{"attributes":{"alternative_authentication_name_source":{"type":["list","string"],"optional":true},"maximum_client_sessions_per_authentication_name":{"type":"number","optional":true,"default":1},"maximum_session_expiry_in_hours":{"type":"number","optional":true,"default":1},"route_topic_id":{"type":"string","optional":true}},"block_types":{"dynamic_routing_enrichment":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"static_routing_enrichment":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_eventgrid_system_topic":{"block":{"attributes":{"location":{"type":"string","required":true},"metric_arm_resource_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_arm_resource_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"topic_type":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_eventgrid_system_topic_event_subscription":{"block":{"attributes":{"advanced_filtering_on_arrays_enabled":{"type":"bool","optional":true,"default":false},"event_delivery_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"eventhub_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"expiration_time_utc":{"type":"string","optional":true},"hybrid_connection_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"included_event_types":{"type":["list","string"],"optional":true,"computed":true},"labels":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_bus_queue_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"service_bus_topic_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"system_topic":{"type":"string","required":true}},"block_types":{"advanced_filter":{"nesting_mode":3,"block":{"block_types":{"bool_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"bool","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_not_null":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_null_or_undefined":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]}}},"optional":true},"azure_function_endpoint":{"nesting_mode":3,"block":{"attributes":{"function_id":{"type":"string","required":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true}}},"optional":true,"conflicts_with":["eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"dead_letter_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_property":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true},"source_field":{"type":"string","optional":true},"type":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"retry_policy":{"nesting_mode":3,"block":{"attributes":{"event_time_to_live":{"type":"number","required":true},"max_delivery_attempts":{"type":"number","required":true}}},"optional":true,"computed":true},"storage_blob_dead_letter_destination":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"storage_blob_container_name":{"type":"string","required":true}}},"optional":true},"storage_queue_endpoint":{"nesting_mode":3,"block":{"attributes":{"queue_message_time_to_live_in_seconds":{"type":"number","optional":true},"queue_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","webhook_endpoint"]},"subject_filter":{"nesting_mode":3,"block":{"attributes":{"case_sensitive":{"type":"bool","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_begins_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_ends_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]}}},"optional":true},"webhook_endpoint":{"nesting_mode":3,"block":{"attributes":{"active_directory_app_id_or_uri":{"type":"string","optional":true},"active_directory_tenant_id":{"type":"string","optional":true},"base_url":{"type":"string","computed":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true},"url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint"]}}}},"azurerm_eventgrid_topic":{"block":{"attributes":{"endpoint":{"type":"string","computed":true},"inbound_ip_rule":{"type":["list",["object",{"action":"string","ip_mask":"string"}]],"optional":true},"input_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"input_mapping_default_values":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"subject":{"type":"string","optional":true}}},"optional":true},"input_mapping_fields":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_time":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"id":{"type":"string","optional":true},"subject":{"type":"string","optional":true},"topic":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_eventhub":{"block":{"attributes":{"message_retention":{"type":"number","required":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["namespace_id","namespace_name"]},"namespace_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["namespace_id","namespace_name"]},"partition_count":{"type":"number","required":true},"partition_ids":{"type":["set","string"],"computed":true},"resource_group_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["namespace_id","resource_group_name"]},"status":{"type":"string","optional":true,"default":"Active"}},"block_types":{"capture_description":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"encoding":{"type":"string","required":true},"interval_in_seconds":{"type":"number","optional":true,"default":300},"size_limit_in_bytes":{"type":"number","optional":true,"default":314572800},"skip_empty_archives":{"type":"bool","optional":true,"default":false}},"block_types":{"destination":{"nesting_mode":3,"block":{"attributes":{"archive_name_format":{"type":"string","required":true},"blob_container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_eventhub_authorization_rule":{"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_eventhub_cluster":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_eventhub_consumer_group":{"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"user_metadata":{"type":"string","optional":true}}}},"azurerm_eventhub_namespace":{"block":{"attributes":{"auto_inflate_enabled":{"type":"bool","optional":true,"default":false},"capacity":{"type":"number","optional":true,"default":1},"dedicated_cluster_id":{"type":"string","optional":true},"default_primary_connection_string":{"type":"string","computed":true},"default_primary_connection_string_alias":{"type":"string","computed":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_connection_string":{"type":"string","computed":true},"default_secondary_connection_string_alias":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"maximum_throughput_units":{"type":"number","optional":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"network_rulesets":{"type":["list",["object",{"default_action":"string","ip_rule":["list",["object",{"action":"string","ip_mask":"string"}]],"public_network_access_enabled":"bool","trusted_service_access_enabled":"bool","virtual_network_rule":["set",["object",{"ignore_missing_virtual_network_service_endpoint":"bool","subnet_id":"string"}]]}]],"optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_eventhub_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_eventhub_namespace_customer_managed_key":{"block":{"attributes":{"eventhub_namespace_id":{"type":"string","required":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_ids":{"type":["set","string"],"required":true},"user_assigned_identity_id":{"type":"string","optional":true}}}},"azurerm_eventhub_namespace_disaster_recovery_config":{"block":{"attributes":{"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"partner_namespace_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_eventhub_namespace_schema_group":{"block":{"attributes":{"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"schema_compatibility":{"type":"string","required":true},"schema_type":{"type":"string","required":true}}}},"azurerm_express_route_circuit":{"block":{"attributes":{"allow_classic_operations":{"type":"bool","optional":true,"default":false},"authorization_key":{"type":"string","optional":true},"bandwidth_in_gbps":{"type":"number","optional":true,"conflicts_with":["bandwidth_in_mbps","peering_location","service_provider_name"],"required_with":["express_route_port_id"]},"bandwidth_in_mbps":{"type":"number","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["peering_location","service_provider_name"]},"express_route_port_id":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_mbps","peering_location","service_provider_name"],"required_with":["bandwidth_in_gbps"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"peering_location":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["bandwidth_in_mbps","service_provider_name"]},"rate_limiting_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"service_key":{"type":"string","computed":true},"service_provider_name":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["bandwidth_in_mbps","peering_location"]},"service_provider_provisioning_state":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"family":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_express_route_circuit_authorization":{"block":{"attributes":{"authorization_key":{"type":"string","computed":true},"authorization_use_status":{"type":"string","computed":true},"express_route_circuit_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_express_route_circuit_connection":{"block":{"attributes":{"address_prefix_ipv4":{"type":"string","required":true},"address_prefix_ipv6":{"type":"string","optional":true},"authorization_key":{"type":"string","optional":true},"name":{"type":"string","required":true},"peer_peering_id":{"type":"string","required":true},"peering_id":{"type":"string","required":true}}}},"azurerm_express_route_circuit_peering":{"block":{"attributes":{"azure_asn":{"type":"number","computed":true},"express_route_circuit_name":{"type":"string","required":true},"gateway_manager_etag":{"type":"string","computed":true},"ipv4_enabled":{"type":"bool","optional":true,"default":true},"peer_asn":{"type":"number","optional":true,"computed":true},"peering_type":{"type":"string","required":true},"primary_azure_port":{"type":"string","computed":true},"primary_peer_address_prefix":{"type":"string","optional":true,"required_with":["secondary_peer_address_prefix"]},"resource_group_name":{"type":"string","required":true},"route_filter_id":{"type":"string","optional":true},"secondary_azure_port":{"type":"string","computed":true},"secondary_peer_address_prefix":{"type":"string","optional":true,"required_with":["primary_peer_address_prefix"]},"shared_key":{"type":"string","optional":true},"vlan_id":{"type":"number","required":true}},"block_types":{"ipv6":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"primary_peer_address_prefix":{"type":"string","required":true},"route_filter_id":{"type":"string","optional":true},"secondary_peer_address_prefix":{"type":"string","required":true}},"block_types":{"microsoft_peering":{"nesting_mode":3,"block":{"attributes":{"advertised_communities":{"type":["list","string"],"optional":true},"advertised_public_prefixes":{"type":["list","string"],"optional":true},"customer_asn":{"type":"number","optional":true,"default":0},"routing_registry_name":{"type":"string","optional":true,"default":"NONE"}}},"optional":true}}},"optional":true},"microsoft_peering_config":{"nesting_mode":3,"block":{"attributes":{"advertised_communities":{"type":["list","string"],"optional":true},"advertised_public_prefixes":{"type":["list","string"],"required":true},"customer_asn":{"type":"number","optional":true,"default":0},"routing_registry_name":{"type":"string","optional":true,"default":"NONE"}}},"optional":true}}}},"azurerm_express_route_connection":{"block":{"attributes":{"authorization_key":{"type":"string","optional":true},"enable_internet_security":{"type":"bool","optional":true},"express_route_circuit_peering_id":{"type":"string","required":true},"express_route_gateway_bypass_enabled":{"type":"bool","optional":true,"default":false},"express_route_gateway_id":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_fast_path_enabled":{"type":"bool","optional":true},"routing_weight":{"type":"number","optional":true,"default":0}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table"]},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]},"route_table_ids":{"type":["list","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]}}},"optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table"]}}},"optional":true,"computed":true}}}},"azurerm_express_route_gateway":{"block":{"attributes":{"allow_non_virtual_wan_traffic":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scale_units":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_express_route_port":{"block":{"attributes":{"bandwidth_in_gbps":{"type":"number","required":true},"billing_type":{"type":"string","optional":true,"default":"MeteredData"},"encapsulation":{"type":"string","required":true},"ethertype":{"type":"string","computed":true},"guid":{"type":"string","computed":true},"location":{"type":"string","required":true},"mtu":{"type":"string","computed":true},"name":{"type":"string","required":true},"peering_location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"link1":{"nesting_mode":3,"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"connector_type":{"type":"string","computed":true},"id":{"type":"string","computed":true},"interface_name":{"type":"string","computed":true},"macsec_cak_keyvault_secret_id":{"type":"string","optional":true},"macsec_cipher":{"type":"string","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"string","optional":true},"macsec_sci_enabled":{"type":"bool","optional":true,"default":false},"patch_panel_id":{"type":"string","computed":true},"rack_id":{"type":"string","computed":true},"router_name":{"type":"string","computed":true}}},"optional":true,"computed":true},"link2":{"nesting_mode":3,"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"connector_type":{"type":"string","computed":true},"id":{"type":"string","computed":true},"interface_name":{"type":"string","computed":true},"macsec_cak_keyvault_secret_id":{"type":"string","optional":true},"macsec_cipher":{"type":"string","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"string","optional":true},"macsec_sci_enabled":{"type":"bool","optional":true,"default":false},"patch_panel_id":{"type":"string","computed":true},"rack_id":{"type":"string","computed":true},"router_name":{"type":"string","computed":true}}},"optional":true,"computed":true}}}},"azurerm_express_route_port_authorization":{"block":{"attributes":{"authorization_key":{"type":"string","computed":true},"authorization_use_status":{"type":"string","computed":true},"express_route_port_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_extended_custom_location":{"block":{"attributes":{"cluster_extension_ids":{"type":["list","string"],"required":true},"display_name":{"type":"string","optional":true},"host_resource_id":{"type":"string","required":true},"host_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_fabric_capacity":{"block":{"attributes":{"administration_members":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_federated_identity_credential":{"block":{"attributes":{"audience":{"type":["list","string"],"required":true},"issuer":{"type":"string","required":true},"name":{"type":"string","required":true},"parent_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","required":true}}}},"azurerm_firewall":{"block":{"attributes":{"dns_proxy_enabled":{"type":"bool","optional":true,"computed":true},"dns_servers":{"type":["list","string"],"optional":true},"firewall_policy_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_ranges":{"type":["set","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"sku_tier":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"threat_intel_mode":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"optional":true},"management_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true},"virtual_hub":{"nesting_mode":3,"block":{"attributes":{"private_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_count":{"type":"number","optional":true,"default":1},"virtual_hub_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_firewall_application_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"fqdn_tags":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"target_fqdns":{"type":["list","string"],"optional":true}},"block_types":{"protocol":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_firewall_nat_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"required":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"translated_address":{"type":"string","required":true},"translated_port":{"type":"string","required":true}}},"required":true}}}},"azurerm_firewall_network_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_ip_groups":{"type":["list","string"],"optional":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true}}},"required":true}}}},"azurerm_firewall_policy":{"block":{"attributes":{"auto_learn_private_ranges_enabled":{"type":"bool","optional":true},"base_policy_id":{"type":"string","optional":true},"child_policies":{"type":["list","string"],"computed":true},"firewalls":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_ranges":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"rule_collection_groups":{"type":["list","string"],"computed":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sql_redirect_allowed":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"threat_intelligence_mode":{"type":"string","optional":true,"default":"Alert"}},"block_types":{"dns":{"nesting_mode":3,"block":{"attributes":{"proxy_enabled":{"type":"bool","optional":true,"default":false},"servers":{"type":["list","string"],"optional":true}}},"optional":true},"explicit_proxy":{"nesting_mode":3,"block":{"attributes":{"enable_pac_file":{"type":"bool","optional":true},"enabled":{"type":"bool","optional":true},"http_port":{"type":"number","optional":true},"https_port":{"type":"number","optional":true},"pac_file":{"type":"string","optional":true},"pac_file_port":{"type":"number","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"insights":{"nesting_mode":3,"block":{"attributes":{"default_log_analytics_workspace_id":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"retention_in_days":{"type":"number","optional":true}},"block_types":{"log_analytics_workspace":{"nesting_mode":3,"block":{"attributes":{"firewall_location":{"type":"string","required":true},"id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"intrusion_detection":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","optional":true},"private_ranges":{"type":["list","string"],"optional":true}},"block_types":{"signature_overrides":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true},"state":{"type":"string","optional":true}}},"optional":true},"traffic_bypass":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["set","string"],"optional":true},"destination_ip_groups":{"type":["set","string"],"optional":true},"destination_ports":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"source_addresses":{"type":["set","string"],"optional":true},"source_ip_groups":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true},"threat_intelligence_allowlist":{"nesting_mode":3,"block":{"attributes":{"fqdns":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_intelligence_allowlist.0.ip_addresses","threat_intelligence_allowlist.0.fqdns"]},"ip_addresses":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_intelligence_allowlist.0.ip_addresses","threat_intelligence_allowlist.0.fqdns"]}}},"optional":true},"tls_certificate":{"nesting_mode":3,"block":{"attributes":{"key_vault_secret_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_firewall_policy_rule_collection_group":{"block":{"attributes":{"firewall_policy_id":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"application_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdn_tags":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_urls":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"terminate_tls":{"type":"bool","optional":true},"web_categories":{"type":["list","string"],"optional":true}},"block_types":{"http_headers":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"protocols":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"optional":true},"nat_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_address":{"type":"string","optional":true},"destination_ports":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"translated_address":{"type":"string","optional":true},"translated_fqdn":{"type":"string","optional":true},"translated_port":{"type":"number","required":true}}},"required":true}}},"optional":true},"network_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_ip_groups":{"type":["list","string"],"optional":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_fluid_relay_server":{"block":{"attributes":{"frs_tenant_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"orderer_endpoints":{"type":["list","string"],"computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"service_endpoints":{"type":["list","string"],"computed":true},"storage_endpoints":{"type":["list","string"],"computed":true},"storage_sku":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_frontdoor":{"block":{"attributes":{"backend_pool_health_probes":{"type":["map","string"],"computed":true},"backend_pool_load_balancing_settings":{"type":["map","string"],"computed":true},"backend_pools":{"type":["map","string"],"computed":true},"cname":{"type":"string","computed":true},"explicit_resource_order":{"type":["list",["object",{"backend_pool_health_probe_ids":["list","string"],"backend_pool_ids":["list","string"],"backend_pool_load_balancing_ids":["list","string"],"frontend_endpoint_ids":["list","string"],"routing_rule_ids":["list","string"]}]],"computed":true},"friendly_name":{"type":"string","optional":true},"frontend_endpoints":{"type":["map","string"],"computed":true},"header_frontdoor_id":{"type":"string","computed":true},"load_balancer_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_rules":{"type":["map","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"backend_pool":{"nesting_mode":3,"block":{"attributes":{"health_probe_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"load_balancing_name":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"backend":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_header":{"type":"string","required":true},"http_port":{"type":"number","required":true},"https_port":{"type":"number","required":true},"priority":{"type":"number","optional":true,"default":1},"weight":{"type":"number","optional":true,"default":50}}},"required":true}}},"required":true},"backend_pool_health_probe":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"id":{"type":"string","computed":true},"interval_in_seconds":{"type":"number","optional":true,"default":120},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"default":"/"},"probe_method":{"type":"string","optional":true,"default":"GET"},"protocol":{"type":"string","optional":true,"default":"Http"}}},"required":true},"backend_pool_load_balancing":{"nesting_mode":3,"block":{"attributes":{"additional_latency_milliseconds":{"type":"number","optional":true,"default":0},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"sample_size":{"type":"number","optional":true,"default":4},"successful_samples_required":{"type":"number","optional":true,"default":2}}},"required":true},"backend_pool_settings":{"nesting_mode":3,"block":{"attributes":{"backend_pools_send_receive_timeout_seconds":{"type":"number","optional":true,"default":60},"enforce_backend_pools_certificate_name_check":{"type":"bool","required":true}}},"optional":true},"frontend_endpoint":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"session_affinity_enabled":{"type":"bool","optional":true,"default":false},"session_affinity_ttl_seconds":{"type":"number","optional":true,"default":0},"web_application_firewall_policy_link_id":{"type":"string","optional":true}}},"required":true},"routing_rule":{"nesting_mode":3,"block":{"attributes":{"accepted_protocols":{"type":["list","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoints":{"type":["list","string"],"required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"patterns_to_match":{"type":["list","string"],"required":true}},"block_types":{"forwarding_configuration":{"nesting_mode":3,"block":{"attributes":{"backend_pool_name":{"type":"string","required":true},"cache_duration":{"type":"string","optional":true},"cache_enabled":{"type":"bool","optional":true,"default":false},"cache_query_parameter_strip_directive":{"type":"string","optional":true,"default":"StripAll"},"cache_query_parameters":{"type":["list","string"],"optional":true},"cache_use_dynamic_compression":{"type":"bool","optional":true,"default":false},"custom_forwarding_path":{"type":"string","optional":true},"forwarding_protocol":{"type":"string","optional":true,"default":"HttpsOnly"}}},"optional":true},"redirect_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_fragment":{"type":"string","optional":true},"custom_host":{"type":"string","optional":true},"custom_path":{"type":"string","optional":true},"custom_query_string":{"type":"string","optional":true},"redirect_protocol":{"type":"string","required":true},"redirect_type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_frontdoor_custom_https_configuration":{"block":{"attributes":{"custom_https_provisioning_enabled":{"type":"bool","required":true},"frontend_endpoint_id":{"type":"string","required":true}},"block_types":{"custom_https_configuration":{"nesting_mode":3,"block":{"attributes":{"azure_key_vault_certificate_secret_name":{"type":"string","optional":true},"azure_key_vault_certificate_secret_version":{"type":"string","optional":true},"azure_key_vault_certificate_vault_id":{"type":"string","optional":true},"certificate_source":{"type":"string","optional":true,"default":"FrontDoor"},"minimum_tls_version":{"type":"string","computed":true},"provisioning_state":{"type":"string","computed":true},"provisioning_substate":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_frontdoor_firewall_policy":{"block":{"attributes":{"custom_block_response_body":{"type":"string","optional":true},"custom_block_response_status_code":{"type":"number","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoint_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","computed":true},"mode":{"type":"string","optional":true,"default":"Prevention"},"name":{"type":"string","required":true},"redirect_url":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"number","optional":true,"default":1},"rate_limit_threshold":{"type":"number","optional":true,"default":10},"type":{"type":"string","required":true}},"block_types":{"match_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"match_variable":{"type":"string","required":true},"negation_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"managed_rule":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"rule_id":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_frontdoor_rules_engine":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"frontdoor_name":{"type":"string","required":true},"location":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"action":{"nesting_mode":3,"block":{"block_types":{"request_header":{"nesting_mode":3,"block":{"attributes":{"header_action_type":{"type":"string","optional":true},"header_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"response_header":{"nesting_mode":3,"block":{"attributes":{"header_action_type":{"type":"string","optional":true},"header_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"match_condition":{"nesting_mode":3,"block":{"attributes":{"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transform":{"type":["list","string"],"optional":true},"value":{"type":["list","string"],"optional":true},"variable":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_function_app":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_cert_mode":{"type":"string","optional":true},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true},"default_hostname":{"type":"string","computed":true},"enable_builtin_logging":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true,"default":""},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"~1"}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"source_control":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"manual_integration":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"repo_url":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"rollback_enabled":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"use_mercurial":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]}}},"optional":true,"computed":true,"conflicts_with":["site_config.0.scm_type"]}}}},"azurerm_function_app_active_slot":{"block":{"attributes":{"last_successful_swap":{"type":"string","computed":true},"overwrite_network_config":{"type":"bool","optional":true,"default":true},"slot_id":{"type":"string","required":true}}}},"azurerm_function_app_connection":{"block":{"attributes":{"client_type":{"type":"string","optional":true,"default":"none"},"function_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_function_app_function":{"block":{"attributes":{"config_json":{"type":"string","required":true},"config_url":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"invocation_url":{"type":"string","computed":true},"language":{"type":"string","optional":true},"name":{"type":"string","required":true},"script_root_path_url":{"type":"string","computed":true},"script_url":{"type":"string","computed":true},"secrets_file_url":{"type":"string","computed":true},"test_data":{"type":"string","optional":true},"test_data_url":{"type":"string","computed":true},"url":{"type":"string","computed":true}},"block_types":{"file":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_function_app_hybrid_connection":{"block":{"attributes":{"function_app_id":{"type":"string","required":true},"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true}}}},"azurerm_function_app_slot":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"daily_memory_time_quota":{"type":"number","optional":true},"default_hostname":{"type":"string","computed":true},"enable_builtin_logging":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"function_app_name":{"type":"string","required":true},"https_only":{"type":"bool","optional":true,"default":false},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"~1"}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_gallery_application":{"block":{"attributes":{"description":{"type":"string","optional":true},"end_of_life_date":{"type":"string","optional":true},"eula":{"type":"string","optional":true},"gallery_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"privacy_statement_uri":{"type":"string","optional":true},"release_note_uri":{"type":"string","optional":true},"supported_os_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_gallery_application_version":{"block":{"attributes":{"config_file":{"type":"string","optional":true},"enable_health_check":{"type":"bool","optional":true,"default":false},"end_of_life_date":{"type":"string","optional":true},"exclude_from_latest":{"type":"bool","optional":true,"default":false},"gallery_application_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"package_file":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"manage_action":{"nesting_mode":3,"block":{"attributes":{"install":{"type":"string","required":true},"remove":{"type":"string","required":true},"update":{"type":"string","optional":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"default_configuration_link":{"type":"string","optional":true},"media_link":{"type":"string","required":true}}},"required":true},"target_region":{"nesting_mode":3,"block":{"attributes":{"exclude_from_latest":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"regional_replica_count":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"required":true}}}},"azurerm_graph_services_account":{"block":{"attributes":{"application_id":{"type":"string","required":true},"billing_plan_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_hdinsight_hadoop_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"hadoop":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"edge_node":{"nesting_mode":3,"block":{"attributes":{"target_instance_count":{"type":"number","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"https_endpoints":{"nesting_mode":3,"block":{"attributes":{"access_modes":{"type":["list","string"],"optional":true},"destination_port":{"type":"number","optional":true},"disable_gateway_auth":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"sub_domain_suffix":{"type":"string","optional":true}}},"optional":true},"install_script_action":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"required":true},"uninstall_script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"optional":true},"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"max_instance_count":{"type":"number","required":true},"min_instance_count":{"type":"number","required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.recurrence"]},"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.capacity"]}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_hbase_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"hbase":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_interactive_query_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"interactive_hive":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_kafka_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"kafka_rest_proxy_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"kafka":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"rest_proxy":{"nesting_mode":3,"block":{"attributes":{"security_group_id":{"type":"string","required":true},"security_group_name":{"type":"string","required":true}}},"optional":true,"required_with":["roles.0.kafka_management_node"]},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"kafka_management_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.kafka_management_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","computed":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"optional":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"number_of_disks_per_node":{"type":"number","required":true},"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_spark_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"spark":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"max_instance_count":{"type":"number","required":true},"min_instance_count":{"type":"number","required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.recurrence"]},"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.capacity"]}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthbot":{"block":{"attributes":{"bot_management_portal_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_healthcare_dicom_service":{"block":{"attributes":{"authentication":{"type":["list",["object",{"audience":["list","string"],"authority":"string"}]],"computed":true},"data_partitions_enabled":{"type":"bool","optional":true,"default":false},"encryption_key_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_url":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allow_credentials":{"type":"bool","optional":true,"default":false},"allowed_headers":{"type":["list","string"],"optional":true},"allowed_methods":{"type":["list","string"],"optional":true},"allowed_origins":{"type":["list","string"],"optional":true},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"storage":{"nesting_mode":3,"block":{"attributes":{"file_system_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_healthcare_fhir_service":{"block":{"attributes":{"access_policy_object_ids":{"type":["set","string"],"optional":true},"configuration_export_storage_account_name":{"type":"string","optional":true},"container_registry_login_server_url":{"type":["set","string"],"optional":true},"kind":{"type":"string","optional":true,"default":"fhir-R4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","required":true},"authority":{"type":"string","required":true},"smart_proxy_enabled":{"type":"bool","optional":true}}},"required":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["set","string"],"required":true},"allowed_methods":{"type":["set","string"],"required":true},"allowed_origins":{"type":["set","string"],"required":true},"credentials_allowed":{"type":"bool","optional":true,"default":false},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"oci_artifact":{"nesting_mode":3,"block":{"attributes":{"digest":{"type":"string","optional":true},"image_name":{"type":"string","optional":true},"login_server":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_medtech_service":{"block":{"attributes":{"device_mapping_json":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","required":true},"eventhub_name":{"type":"string","required":true},"eventhub_namespace_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_medtech_service_fhir_destination":{"block":{"attributes":{"destination_fhir_mapping_json":{"type":"string","required":true},"destination_fhir_service_id":{"type":"string","required":true},"destination_identity_resolution_type":{"type":"string","required":true},"location":{"type":"string","required":true},"medtech_service_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_healthcare_service":{"block":{"attributes":{"access_policy_object_ids":{"type":["set","string"],"optional":true},"configuration_export_storage_account_name":{"type":"string","optional":true},"cosmosdb_key_vault_key_versionless_id":{"type":"string","optional":true},"cosmosdb_throughput":{"type":"number","optional":true,"default":1000},"kind":{"type":"string","optional":true,"default":"fhir"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"authentication_configuration":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]},"authority":{"type":"string","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]},"smart_proxy_enabled":{"type":"bool","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]}}},"optional":true,"computed":true},"cors_configuration":{"nesting_mode":3,"block":{"attributes":{"allow_credentials":{"type":"bool","optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_headers":{"type":["set","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_methods":{"type":["list","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_origins":{"type":["set","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"max_age_in_seconds":{"type":"number","optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_workspace":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_hpc_cache":{"block":{"attributes":{"automatically_rotate_key_to_latest_enabled":{"type":"bool","optional":true,"required_with":["key_vault_key_id"]},"cache_size_in_gb":{"type":"number","required":true},"key_vault_key_id":{"type":"string","optional":true,"required_with":["identity"]},"location":{"type":"string","required":true},"mount_addresses":{"type":["list","string"],"computed":true},"mtu":{"type":"number","optional":true,"default":1500},"name":{"type":"string","required":true},"ntp_server":{"type":"string","optional":true,"default":"time.windows.com"},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"default_access_policy":{"nesting_mode":3,"block":{"block_types":{"access_rule":{"nesting_mode":4,"block":{"attributes":{"access":{"type":"string","required":true},"anonymous_gid":{"type":"number","optional":true},"anonymous_uid":{"type":"number","optional":true},"filter":{"type":"string","optional":true},"root_squash_enabled":{"type":"bool","optional":true},"scope":{"type":"string","required":true},"submount_access_enabled":{"type":"bool","optional":true},"suid_enabled":{"type":"bool","optional":true}}},"required":true}}},"optional":true,"computed":true},"directory_active_directory":{"nesting_mode":3,"block":{"attributes":{"cache_netbios_name":{"type":"string","required":true},"dns_primary_ip":{"type":"string","required":true},"dns_secondary_ip":{"type":"string","optional":true},"domain_name":{"type":"string","required":true},"domain_netbios_name":{"type":"string","required":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["directory_flat_file","directory_ldap"]},"directory_flat_file":{"nesting_mode":3,"block":{"attributes":{"group_file_uri":{"type":"string","required":true},"password_file_uri":{"type":"string","required":true}}},"optional":true,"conflicts_with":["directory_active_directory","directory_ldap"]},"directory_ldap":{"nesting_mode":3,"block":{"attributes":{"base_dn":{"type":"string","required":true},"certificate_validation_uri":{"type":"string","optional":true},"download_certificate_automatically":{"type":"bool","optional":true,"required_with":["directory_ldap.0.certificate_validation_uri"]},"encrypted":{"type":"bool","optional":true},"server":{"type":"string","required":true}},"block_types":{"bind":{"nesting_mode":3,"block":{"attributes":{"dn":{"type":"string","required":true},"password":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"conflicts_with":["directory_active_directory","directory_flat_file"]},"dns":{"nesting_mode":3,"block":{"attributes":{"search_domain":{"type":"string","optional":true},"servers":{"type":["list","string"],"required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hpc_cache_access_policy":{"block":{"attributes":{"hpc_cache_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"access_rule":{"nesting_mode":4,"block":{"attributes":{"access":{"type":"string","required":true},"anonymous_gid":{"type":"number","optional":true},"anonymous_uid":{"type":"number","optional":true},"filter":{"type":"string","optional":true},"root_squash_enabled":{"type":"bool","optional":true},"scope":{"type":"string","required":true},"submount_access_enabled":{"type":"bool","optional":true},"suid_enabled":{"type":"bool","optional":true}}},"required":true}}}},"azurerm_hpc_cache_blob_nfs_target":{"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"usage_model":{"type":"string","required":true},"verification_timer_in_seconds":{"type":"number","optional":true},"write_back_timer_in_seconds":{"type":"number","optional":true}}}},"azurerm_hpc_cache_blob_target":{"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true}}}},"azurerm_hpc_cache_nfs_target":{"block":{"attributes":{"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"target_host_name":{"type":"string","required":true},"usage_model":{"type":"string","required":true},"verification_timer_in_seconds":{"type":"number","optional":true},"write_back_timer_in_seconds":{"type":"number","optional":true}},"block_types":{"namespace_junction":{"nesting_mode":4,"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"namespace_path":{"type":"string","required":true},"nfs_export":{"type":"string","required":true},"target_path":{"type":"string","optional":true,"default":""}}},"required":true}}}},"azurerm_image":{"block":{"attributes":{"hyper_v_generation":{"type":"string","optional":true,"default":"V1"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"zone_resilient":{"type":"bool","optional":true,"default":false}},"block_types":{"data_disk":{"nesting_mode":3,"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"computed":true},"caching":{"type":"string","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"string","optional":true},"lun":{"type":"number","optional":true},"managed_disk_id":{"type":"string","optional":true},"size_gb":{"type":"number","optional":true,"computed":true},"storage_type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"computed":true},"caching":{"type":"string","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"string","optional":true},"managed_disk_id":{"type":"string","optional":true,"computed":true},"os_state":{"type":"string","optional":true},"os_type":{"type":"string","optional":true},"size_gb":{"type":"number","optional":true,"computed":true},"storage_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iot_security_device_group":{"block":{"attributes":{"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"allow_rule":{"nesting_mode":3,"block":{"attributes":{"connection_from_ips_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"connection_to_ips_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"local_users_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"processes_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]}}},"optional":true},"range_rule":{"nesting_mode":4,"block":{"attributes":{"duration":{"type":"string","required":true},"max":{"type":"number","required":true},"min":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iot_security_solution":{"block":{"attributes":{"disabled_data_sources":{"type":["set","string"],"optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"events_to_export":{"type":["set","string"],"optional":true},"iothub_ids":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","optional":true},"log_unmasked_ips_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"query_for_resources":{"type":"string","optional":true,"computed":true},"query_subscription_ids":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"additional_workspace":{"nesting_mode":4,"block":{"attributes":{"data_types":{"type":["set","string"],"required":true},"workspace_id":{"type":"string","required":true}}},"optional":true},"recommendations_enabled":{"nesting_mode":3,"block":{"attributes":{"acr_authentication":{"type":"bool","optional":true,"default":true},"agent_send_unutilized_msg":{"type":"bool","optional":true,"default":true},"baseline":{"type":"bool","optional":true,"default":true},"edge_hub_mem_optimize":{"type":"bool","optional":true,"default":true},"edge_logging_option":{"type":"bool","optional":true,"default":true},"inconsistent_module_settings":{"type":"bool","optional":true,"default":true},"install_agent":{"type":"bool","optional":true,"default":true},"ip_filter_deny_all":{"type":"bool","optional":true,"default":true},"ip_filter_permissive_rule":{"type":"bool","optional":true,"default":true},"open_ports":{"type":"bool","optional":true,"default":true},"permissive_firewall_policy":{"type":"bool","optional":true,"default":true},"permissive_input_firewall_rules":{"type":"bool","optional":true,"default":true},"permissive_output_firewall_rules":{"type":"bool","optional":true,"default":true},"privileged_docker_options":{"type":"bool","optional":true,"default":true},"shared_credentials":{"type":"bool","optional":true,"default":true},"vulnerable_tls_cipher_suite":{"type":"bool","optional":true,"default":true}}},"optional":true,"computed":true}}}},"azurerm_iotcentral_application":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"ST1"},"sub_domain":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template":{"type":"string","optional":true,"default":"iotc-pnp-preview@1.0.0"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iotcentral_application_network_rule_set":{"block":{"attributes":{"apply_to_device":{"type":"bool","optional":true,"default":true},"default_action":{"type":"string","optional":true,"default":"Deny"},"iotcentral_application_id":{"type":"string","required":true}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iotcentral_organization":{"block":{"attributes":{"display_name":{"type":"string","required":true},"iotcentral_application_id":{"type":"string","required":true},"organization_id":{"type":"string","required":true},"parent_organization_id":{"type":"string","optional":true}}}},"azurerm_iothub":{"block":{"attributes":{"endpoint":{"type":["list",["object",{"authentication_type":"string","batch_frequency_in_seconds":"number","connection_string":"string","container_name":"string","encoding":"string","endpoint_uri":"string","entity_path":"string","file_name_format":"string","identity_id":"string","max_chunk_size_in_bytes":"number","name":"string","resource_group_name":"string","type":"string"}]],"optional":true,"computed":true},"enrichment":{"type":["list",["object",{"endpoint_names":["list","string"],"key":"string","value":"string"}]],"optional":true,"computed":true},"event_hub_events_endpoint":{"type":"string","computed":true},"event_hub_events_namespace":{"type":"string","computed":true},"event_hub_events_path":{"type":"string","computed":true},"event_hub_operations_endpoint":{"type":"string","computed":true},"event_hub_operations_path":{"type":"string","computed":true},"event_hub_partition_count":{"type":"number","optional":true,"default":4},"event_hub_retention_in_days":{"type":"number","optional":true,"default":1},"hostname":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"min_tls_version":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"route":{"type":["list",["object",{"condition":"string","enabled":"bool","endpoint_names":["list","string"],"name":"string","source":"string"}]],"optional":true,"computed":true},"shared_access_policy":{"type":["list",["object",{"key_name":"string","permissions":"string","primary_key":"string","secondary_key":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","computed":true}},"block_types":{"cloud_to_device":{"nesting_mode":3,"block":{"attributes":{"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"max_delivery_count":{"type":"number","optional":true,"default":10}},"block_types":{"feedback":{"nesting_mode":3,"block":{"attributes":{"lock_duration":{"type":"string","optional":true,"default":"PT60S"},"max_delivery_count":{"type":"number","optional":true,"default":10},"time_to_live":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true}}},"optional":true,"computed":true},"fallback_route":{"nesting_mode":3,"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","optional":true,"default":true},"endpoint_names":{"type":["list","string"],"optional":true,"computed":true},"source":{"type":"string","optional":true,"default":"DeviceMessages"}}},"optional":true,"computed":true},"file_upload":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","required":true},"container_name":{"type":"string","required":true},"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"identity_id":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"notifications":{"type":"bool","optional":true,"default":false},"sas_ttl":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule_set":{"nesting_mode":3,"block":{"attributes":{"apply_to_builtin_eventhub_endpoint":{"type":"bool","optional":true,"default":false},"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_iothub_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","required":true},"iothub_name":{"type":"string","required":true},"is_verified":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_consumer_group":{"block":{"attributes":{"eventhub_endpoint_name":{"type":"string","required":true},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_device_update_account":{"block":{"attributes":{"host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iothub_device_update_instance":{"block":{"attributes":{"device_update_account_id":{"type":"string","required":true},"diagnostic_enabled":{"type":"bool","optional":true,"default":false},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"diagnostic_storage_account":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","required":true},"id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iothub_dps":{"block":{"attributes":{"allocation_policy":{"type":"string","optional":true,"default":"Hashed"},"data_residency_enabled":{"type":"bool","optional":true,"default":false},"device_provisioning_host_name":{"type":"string","computed":true},"id_scope":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_operations_host_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_filter_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true},"target":{"type":"string","optional":true}}},"optional":true},"linked_hub":{"nesting_mode":3,"block":{"attributes":{"allocation_weight":{"type":"number","optional":true,"default":1},"apply_allocation_policy":{"type":"bool","optional":true,"default":true},"connection_string":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_iothub_dps_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","required":true},"iot_dps_name":{"type":"string","required":true},"is_verified":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_dps_shared_access_policy":{"block":{"attributes":{"enrollment_read":{"type":"bool","optional":true,"default":false},"enrollment_write":{"type":"bool","optional":true,"default":false},"iothub_dps_name":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"registration_read":{"type":"bool","optional":true,"default":false},"registration_write":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"service_config":{"type":"bool","optional":true,"default":false}}}},"azurerm_iothub_endpoint_cosmosdb_account":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"container_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"endpoint_uri":{"type":"string","required":true},"identity_id":{"type":"string","optional":true,"conflicts_with":["primary_key","secondary_key"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key_name":{"type":"string","optional":true,"required_with":["partition_key_template"]},"partition_key_template":{"type":"string","optional":true,"required_with":["partition_key_name"]},"primary_key":{"type":"string","optional":true,"conflicts_with":["identity_id"],"required_with":["secondary_key"]},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","optional":true,"conflicts_with":["identity_id"],"required_with":["primary_key"]}}}},"azurerm_iothub_endpoint_eventhub":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_servicebus_queue":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_servicebus_topic":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_storage_container":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"batch_frequency_in_seconds":{"type":"number","optional":true,"default":300},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"container_name":{"type":"string","required":true},"encoding":{"type":"string","optional":true,"default":"Avro"},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"]},"file_name_format":{"type":"string","optional":true,"default":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}"},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"max_chunk_size_in_bytes":{"type":"number","optional":true,"default":314572800},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_enrichment":{"block":{"attributes":{"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_iothub_fallback_route":{"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","required":true},"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source":{"type":"string","optional":true,"default":"DeviceMessages"}}}},"azurerm_iothub_file_upload":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","required":true},"container_name":{"type":"string","required":true},"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"identity_id":{"type":"string","optional":true},"iothub_id":{"type":"string","required":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"notifications_enabled":{"type":"bool","optional":true,"default":false},"sas_ttl":{"type":"string","optional":true,"default":"PT1H"}}}},"azurerm_iothub_route":{"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","required":true},"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source":{"type":"string","required":true}}}},"azurerm_iothub_shared_access_policy":{"block":{"attributes":{"device_connect":{"type":"bool","optional":true,"default":false},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"registry_read":{"type":"bool","optional":true,"default":false},"registry_write":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"service_connect":{"type":"bool","optional":true,"default":false}}}},"azurerm_ip_group":{"block":{"attributes":{"cidrs":{"type":["set","string"],"optional":true},"firewall_ids":{"type":["list","string"],"computed":true},"firewall_policy_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_ip_group_cidr":{"block":{"attributes":{"cidr":{"type":"string","required":true},"ip_group_id":{"type":"string","required":true}}}},"azurerm_key_vault":{"block":{"attributes":{"access_policy":{"type":["list",["object",{"application_id":"string","certificate_permissions":["list","string"],"key_permissions":["list","string"],"object_id":"string","secret_permissions":["list","string"],"storage_permissions":["list","string"],"tenant_id":"string"}]],"optional":true,"computed":true},"enable_rbac_authorization":{"type":"bool","optional":true},"enabled_for_deployment":{"type":"bool","optional":true},"enabled_for_disk_encryption":{"type":"bool","optional":true},"enabled_for_template_deployment":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_protection_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"soft_delete_retention_days":{"type":"number","optional":true,"default":90},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","required":true},"vault_uri":{"type":"string","computed":true}},"block_types":{"contact":{"nesting_mode":4,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true,"computed":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","required":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true}}}},"azurerm_key_vault_access_policy":{"block":{"attributes":{"application_id":{"type":"string","optional":true},"certificate_permissions":{"type":["list","string"],"optional":true},"key_permissions":{"type":["list","string"],"optional":true},"key_vault_id":{"type":"string","required":true},"object_id":{"type":"string","required":true},"secret_permissions":{"type":["list","string"],"optional":true},"storage_permissions":{"type":["list","string"],"optional":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_key_vault_certificate":{"block":{"attributes":{"certificate_attribute":{"type":["list",["object",{"created":"string","enabled":"bool","expires":"string","not_before":"string","recovery_level":"string","updated":"string"}]],"computed":true},"certificate_data":{"type":"string","computed":true},"certificate_data_base64":{"type":"string","computed":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"resource_manager_versionless_id":{"type":"string","computed":true},"secret_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true},"versionless_secret_id":{"type":"string","computed":true}},"block_types":{"certificate":{"nesting_mode":3,"block":{"attributes":{"contents":{"type":"string","required":true},"password":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["certificate_policy","certificate"]},"certificate_policy":{"nesting_mode":3,"block":{"block_types":{"issuer_parameters":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true},"key_properties":{"nesting_mode":3,"block":{"attributes":{"curve":{"type":"string","optional":true,"computed":true},"exportable":{"type":"bool","required":true},"key_size":{"type":"number","optional":true,"computed":true},"key_type":{"type":"string","required":true},"reuse_key":{"type":"bool","required":true}}},"required":true},"lifetime_action":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"days_before_expiry":{"type":"number","optional":true},"lifetime_percentage":{"type":"number","optional":true}}},"required":true}}},"optional":true},"secret_properties":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true}}},"required":true},"x509_certificate_properties":{"nesting_mode":3,"block":{"attributes":{"extended_key_usage":{"type":["list","string"],"optional":true,"computed":true},"key_usage":{"type":["set","string"],"required":true},"subject":{"type":"string","required":true},"validity_in_months":{"type":"number","required":true}},"block_types":{"subject_alternative_names":{"nesting_mode":3,"block":{"attributes":{"dns_names":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]},"emails":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]},"upns":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true,"at_least_one_of":["certificate_policy","certificate"]}}}},"azurerm_key_vault_certificate_contacts":{"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"contact":{"nesting_mode":4,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_key_vault_certificate_issuer":{"block":{"attributes":{"account_id":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"org_id":{"type":"string","optional":true},"password":{"type":"string","optional":true},"provider_name":{"type":"string","required":true}},"block_types":{"admin":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"first_name":{"type":"string","optional":true},"last_name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_key_vault_key":{"block":{"attributes":{"curve":{"type":"string","optional":true,"computed":true,"conflicts_with":["key_size"]},"e":{"type":"string","computed":true},"expiration_date":{"type":"string","optional":true},"key_opts":{"type":["list","string"],"required":true},"key_size":{"type":"number","optional":true,"conflicts_with":["curve"]},"key_type":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"n":{"type":"string","computed":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"public_key_openssh":{"type":"string","computed":true},"public_key_pem":{"type":"string","computed":true},"resource_id":{"type":"string","computed":true},"resource_versionless_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true},"x":{"type":"string","computed":true},"y":{"type":"string","computed":true}},"block_types":{"rotation_policy":{"nesting_mode":3,"block":{"attributes":{"expire_after":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.expire_after","rotation_policy.0.automatic"],"required_with":["rotation_policy.0.expire_after","rotation_policy.0.notify_before_expiry"]},"notify_before_expiry":{"type":"string","optional":true,"required_with":["rotation_policy.0.expire_after","rotation_policy.0.notify_before_expiry"]}},"block_types":{"automatic":{"nesting_mode":3,"block":{"attributes":{"time_after_creation":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.automatic.0.time_after_creation","rotation_policy.0.automatic.0.time_before_expiry"]},"time_before_expiry":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.automatic.0.time_after_creation","rotation_policy.0.automatic.0.time_before_expiry"]}}},"optional":true}}},"optional":true}}}},"azurerm_key_vault_managed_hardware_security_module":{"block":{"attributes":{"admin_object_ids":{"type":["set","string"],"required":true},"hsm_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_protection_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"security_domain_encrypted_data":{"type":"string","computed":true},"security_domain_key_vault_certificate_ids":{"type":["list","string"],"optional":true,"required_with":["security_domain_quorum"]},"security_domain_quorum":{"type":"number","optional":true,"required_with":["security_domain_key_vault_certificate_ids"]},"sku_name":{"type":"string","required":true},"soft_delete_retention_days":{"type":"number","optional":true,"default":90},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","required":true}},"block_types":{"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","required":true},"default_action":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_key_vault_managed_hardware_security_module_key":{"block":{"attributes":{"curve":{"type":"string","optional":true,"exactly_one_of":["key_size"]},"expiration_date":{"type":"string","optional":true},"key_opts":{"type":["set","string"],"required":true},"key_size":{"type":"number","optional":true,"exactly_one_of":["curve"]},"key_type":{"type":"string","required":true},"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"versioned_id":{"type":"string","computed":true}}}},"azurerm_key_vault_managed_hardware_security_module_key_rotation_policy":{"block":{"attributes":{"expire_after":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","required":true},"time_after_creation":{"type":"string","optional":true,"exactly_one_of":["time_after_creation","time_before_expiry"]},"time_before_expiry":{"type":"string","optional":true,"exactly_one_of":["time_after_creation","time_before_expiry"]}}}},"azurerm_key_vault_managed_hardware_security_module_role_assignment":{"block":{"attributes":{"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"resource_id":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}}}},"azurerm_key_vault_managed_hardware_security_module_role_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"role_name":{"type":"string","optional":true},"role_type":{"type":"string","computed":true}},"block_types":{"permission":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"optional":true},"data_actions":{"type":["set","string"],"optional":true},"not_actions":{"type":["list","string"],"optional":true},"not_data_actions":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_key_vault_managed_storage_account":{"block":{"attributes":{"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"regenerate_key_automatically":{"type":"bool","optional":true,"default":false,"required_with":["regeneration_period"]},"regeneration_period":{"type":"string","optional":true,"required_with":["regenerate_key_automatically"]},"storage_account_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_key_vault_managed_storage_account_sas_token_definition":{"block":{"attributes":{"managed_storage_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sas_template_uri":{"type":"string","required":true},"sas_type":{"type":"string","required":true},"secret_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"validity_period":{"type":"string","required":true}}}},"azurerm_key_vault_secret":{"block":{"attributes":{"content_type":{"type":"string","optional":true},"expiration_date":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"resource_id":{"type":"string","computed":true},"resource_versionless_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"value":{"type":"string","required":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true}}}},"azurerm_kubernetes_cluster":{"block":{"attributes":{"automatic_upgrade_channel":{"type":"string","optional":true},"azure_policy_enabled":{"type":"bool","optional":true},"cost_analysis_enabled":{"type":"bool","optional":true},"current_kubernetes_version":{"type":"string","computed":true},"disk_encryption_set_id":{"type":"string","optional":true},"dns_prefix":{"type":"string","optional":true,"exactly_one_of":["dns_prefix","dns_prefix_private_cluster"]},"dns_prefix_private_cluster":{"type":"string","optional":true,"exactly_one_of":["dns_prefix","dns_prefix_private_cluster"]},"edge_zone":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"http_application_routing_enabled":{"type":"bool","optional":true},"http_application_routing_zone_name":{"type":"string","computed":true},"image_cleaner_enabled":{"type":"bool","optional":true},"image_cleaner_interval_hours":{"type":"number","optional":true},"kube_admin_config":{"type":["list",["object",{"client_certificate":"string","client_key":"string","cluster_ca_certificate":"string","host":"string","password":"string","username":"string"}]],"computed":true},"kube_admin_config_raw":{"type":"string","computed":true},"kube_config":{"type":["list",["object",{"client_certificate":"string","client_key":"string","cluster_ca_certificate":"string","host":"string","password":"string","username":"string"}]],"computed":true},"kube_config_raw":{"type":"string","computed":true},"kubernetes_version":{"type":"string","optional":true,"computed":true},"local_account_disabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"node_os_upgrade_channel":{"type":"string","optional":true,"default":"NodeImage"},"node_resource_group":{"type":"string","optional":true,"computed":true},"node_resource_group_id":{"type":"string","computed":true},"oidc_issuer_enabled":{"type":"bool","optional":true},"oidc_issuer_url":{"type":"string","computed":true},"open_service_mesh_enabled":{"type":"bool","optional":true},"portal_fqdn":{"type":"string","computed":true},"private_cluster_enabled":{"type":"bool","optional":true,"default":false},"private_cluster_public_fqdn_enabled":{"type":"bool","optional":true,"default":false},"private_dns_zone_id":{"type":"string","optional":true,"computed":true},"private_fqdn":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"role_based_access_control_enabled":{"type":"bool","optional":true,"default":true},"run_command_enabled":{"type":"bool","optional":true,"default":true},"sku_tier":{"type":"string","optional":true,"default":"Free"},"support_plan":{"type":"string","optional":true,"default":"KubernetesOfficial"},"tags":{"type":["map","string"],"optional":true},"workload_identity_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"aci_connector_linux":{"nesting_mode":3,"block":{"attributes":{"connector_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"subnet_name":{"type":"string","required":true}}},"optional":true},"api_server_access_profile":{"nesting_mode":3,"block":{"attributes":{"authorized_ip_ranges":{"type":["set","string"],"optional":true}}},"optional":true},"auto_scaler_profile":{"nesting_mode":3,"block":{"attributes":{"balance_similar_node_groups":{"type":"bool","optional":true,"default":false},"daemonset_eviction_for_empty_nodes_enabled":{"type":"bool","optional":true,"default":false},"daemonset_eviction_for_occupied_nodes_enabled":{"type":"bool","optional":true,"default":true},"empty_bulk_delete_max":{"type":"string","optional":true,"computed":true},"expander":{"type":"string","optional":true,"default":"random"},"ignore_daemonsets_utilization_enabled":{"type":"bool","optional":true,"default":false},"max_graceful_termination_sec":{"type":"string","optional":true,"computed":true},"max_node_provisioning_time":{"type":"string","optional":true,"default":"15m"},"max_unready_nodes":{"type":"number","optional":true,"default":3},"max_unready_percentage":{"type":"number","optional":true,"default":45},"new_pod_scale_up_delay":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_add":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_delete":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_failure":{"type":"string","optional":true,"computed":true},"scale_down_unneeded":{"type":"string","optional":true,"computed":true},"scale_down_unready":{"type":"string","optional":true,"computed":true},"scale_down_utilization_threshold":{"type":"string","optional":true,"computed":true},"scan_interval":{"type":"string","optional":true,"computed":true},"skip_nodes_with_local_storage":{"type":"bool","optional":true},"skip_nodes_with_system_pods":{"type":"bool","optional":true,"default":true}}},"optional":true,"computed":true},"azure_active_directory_role_based_access_control":{"nesting_mode":3,"block":{"attributes":{"admin_group_object_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["azure_active_directory_role_based_access_control.0.tenant_id","azure_active_directory_role_based_access_control.0.admin_group_object_ids"]},"azure_rbac_enabled":{"type":"bool","optional":true},"tenant_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["azure_active_directory_role_based_access_control.0.tenant_id","azure_active_directory_role_based_access_control.0.admin_group_object_ids"]}}},"optional":true},"confidential_computing":{"nesting_mode":3,"block":{"attributes":{"sgx_quote_helper_enabled":{"type":"bool","required":true}}},"optional":true},"default_node_pool":{"nesting_mode":3,"block":{"attributes":{"auto_scaling_enabled":{"type":"bool","optional":true},"capacity_reservation_group_id":{"type":"string","optional":true},"fips_enabled":{"type":"bool","optional":true},"gpu_instance":{"type":"string","optional":true},"host_encryption_enabled":{"type":"bool","optional":true},"host_group_id":{"type":"string","optional":true},"kubelet_disk_type":{"type":"string","optional":true,"computed":true},"max_count":{"type":"number","optional":true},"max_pods":{"type":"number","optional":true,"computed":true},"min_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true},"node_labels":{"type":["map","string"],"optional":true,"computed":true},"node_public_ip_enabled":{"type":"bool","optional":true},"node_public_ip_prefix_id":{"type":"string","optional":true,"required_with":["default_node_pool.0.node_public_ip_enabled"]},"only_critical_addons_enabled":{"type":"bool","optional":true},"orchestrator_version":{"type":"string","optional":true,"computed":true},"os_disk_size_gb":{"type":"number","optional":true,"computed":true},"os_disk_type":{"type":"string","optional":true,"default":"Managed"},"os_sku":{"type":"string","optional":true,"computed":true},"pod_subnet_id":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"scale_down_mode":{"type":"string","optional":true,"default":"Delete"},"snapshot_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"temporary_name_for_rotation":{"type":"string","optional":true},"type":{"type":"string","optional":true,"default":"VirtualMachineScaleSets"},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false},"vm_size":{"type":"string","required":true},"vnet_subnet_id":{"type":"string","optional":true},"workload_runtime":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"kubelet_config":{"nesting_mode":3,"block":{"attributes":{"allowed_unsafe_sysctls":{"type":["set","string"],"optional":true},"container_log_max_line":{"type":"number","optional":true},"container_log_max_size_mb":{"type":"number","optional":true},"cpu_cfs_quota_enabled":{"type":"bool","optional":true,"default":true},"cpu_cfs_quota_period":{"type":"string","optional":true},"cpu_manager_policy":{"type":"string","optional":true},"image_gc_high_threshold":{"type":"number","optional":true},"image_gc_low_threshold":{"type":"number","optional":true},"pod_max_pid":{"type":"number","optional":true},"topology_manager_policy":{"type":"string","optional":true}}},"optional":true},"linux_os_config":{"nesting_mode":3,"block":{"attributes":{"swap_file_size_mb":{"type":"number","optional":true},"transparent_huge_page_defrag":{"type":"string","optional":true},"transparent_huge_page_enabled":{"type":"string","optional":true}},"block_types":{"sysctl_config":{"nesting_mode":3,"block":{"attributes":{"fs_aio_max_nr":{"type":"number","optional":true},"fs_file_max":{"type":"number","optional":true},"fs_inotify_max_user_watches":{"type":"number","optional":true},"fs_nr_open":{"type":"number","optional":true},"kernel_threads_max":{"type":"number","optional":true},"net_core_netdev_max_backlog":{"type":"number","optional":true},"net_core_optmem_max":{"type":"number","optional":true},"net_core_rmem_default":{"type":"number","optional":true},"net_core_rmem_max":{"type":"number","optional":true},"net_core_somaxconn":{"type":"number","optional":true},"net_core_wmem_default":{"type":"number","optional":true},"net_core_wmem_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_min":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"number","optional":true},"net_ipv4_tcp_fin_timeout":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_intvl":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_probes":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_time":{"type":"number","optional":true},"net_ipv4_tcp_max_syn_backlog":{"type":"number","optional":true},"net_ipv4_tcp_max_tw_buckets":{"type":"number","optional":true},"net_ipv4_tcp_tw_reuse":{"type":"bool","optional":true},"net_netfilter_nf_conntrack_buckets":{"type":"number","optional":true},"net_netfilter_nf_conntrack_max":{"type":"number","optional":true},"vm_max_map_count":{"type":"number","optional":true},"vm_swappiness":{"type":"number","optional":true},"vm_vfs_cache_pressure":{"type":"number","optional":true}}},"optional":true}}},"optional":true},"node_network_profile":{"nesting_mode":3,"block":{"attributes":{"application_security_group_ids":{"type":["list","string"],"optional":true},"node_public_ip_tags":{"type":["map","string"],"optional":true}},"block_types":{"allowed_host_ports":{"nesting_mode":3,"block":{"attributes":{"port_end":{"type":"number","optional":true},"port_start":{"type":"number","optional":true},"protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"upgrade_settings":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_in_minutes":{"type":"number","optional":true},"max_surge":{"type":"string","required":true},"node_soak_duration_in_minutes":{"type":"number","optional":true}}},"optional":true}}},"required":true},"http_proxy_config":{"nesting_mode":3,"block":{"attributes":{"http_proxy":{"type":"string","optional":true},"https_proxy":{"type":"string","optional":true},"no_proxy":{"type":["set","string"],"optional":true},"trusted_ca":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress_application_gateway":{"nesting_mode":3,"block":{"attributes":{"effective_gateway_id":{"type":"string","computed":true},"gateway_id":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]},"gateway_name":{"type":"string","optional":true},"ingress_application_gateway_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"subnet_cidr":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_id"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]},"subnet_id":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]}}},"optional":true},"key_management_service":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"key_vault_network_access":{"type":"string","optional":true,"default":"Public"}}},"optional":true},"key_vault_secrets_provider":{"nesting_mode":3,"block":{"attributes":{"secret_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"secret_rotation_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["key_vault_secrets_provider.0.secret_rotation_enabled","key_vault_secrets_provider.0.secret_rotation_interval"]},"secret_rotation_interval":{"type":"string","optional":true,"default":"2m","at_least_one_of":["key_vault_secrets_provider.0.secret_rotation_enabled","key_vault_secrets_provider.0.secret_rotation_interval"]}}},"optional":true},"kubelet_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.object_id","kubelet_identity.0.user_assigned_identity_id","identity.0.identity_ids"]},"object_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.client_id","kubelet_identity.0.user_assigned_identity_id","identity.0.identity_ids"]},"user_assigned_identity_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.client_id","kubelet_identity.0.object_id","identity.0.identity_ids"]}}},"optional":true,"computed":true},"linux_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true}},"block_types":{"ssh_key":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","required":true}}},"required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"block_types":{"allowed":{"nesting_mode":4,"block":{"attributes":{"day":{"type":"string","required":true},"hours":{"type":["set","number"],"required":true}}},"optional":true,"at_least_one_of":["maintenance_window.0.allowed","maintenance_window.0.not_allowed"]},"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["maintenance_window.0.allowed","maintenance_window.0.not_allowed"]}}},"optional":true},"maintenance_window_auto_upgrade":{"nesting_mode":3,"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"day_of_week":{"type":"string","optional":true},"duration":{"type":"number","required":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_date":{"type":"string","optional":true,"computed":true},"start_time":{"type":"string","optional":true},"utc_offset":{"type":"string","optional":true},"week_index":{"type":"string","optional":true}},"block_types":{"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true},"maintenance_window_node_os":{"nesting_mode":3,"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"day_of_week":{"type":"string","optional":true},"duration":{"type":"number","required":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_date":{"type":"string","optional":true,"computed":true},"start_time":{"type":"string","optional":true},"utc_offset":{"type":"string","optional":true},"week_index":{"type":"string","optional":true}},"block_types":{"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true},"microsoft_defender":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true}}},"optional":true},"monitor_metrics":{"nesting_mode":3,"block":{"attributes":{"annotations_allowed":{"type":"string","optional":true},"labels_allowed":{"type":"string","optional":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"dns_service_ip":{"type":"string","optional":true,"computed":true},"ip_versions":{"type":["list","string"],"optional":true,"computed":true},"load_balancer_sku":{"type":"string","optional":true,"default":"standard"},"network_data_plane":{"type":"string","optional":true,"default":"azure"},"network_mode":{"type":"string","optional":true,"computed":true},"network_plugin":{"type":"string","required":true},"network_plugin_mode":{"type":"string","optional":true},"network_policy":{"type":"string","optional":true,"computed":true},"outbound_type":{"type":"string","optional":true,"default":"loadBalancer"},"pod_cidr":{"type":"string","optional":true,"computed":true},"pod_cidrs":{"type":["list","string"],"optional":true,"computed":true},"service_cidr":{"type":"string","optional":true,"computed":true},"service_cidrs":{"type":["list","string"],"optional":true,"computed":true}},"block_types":{"load_balancer_profile":{"nesting_mode":3,"block":{"attributes":{"backend_pool_type":{"type":"string","optional":true,"default":"NodeIPConfiguration"},"effective_outbound_ips":{"type":["set","string"],"computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":30},"managed_outbound_ip_count":{"type":"number","optional":true,"computed":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"managed_outbound_ipv6_count":{"type":"number","optional":true,"computed":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"outbound_ip_address_ids":{"type":["set","string"],"optional":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.managed_outbound_ip_count","network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids"]},"outbound_ip_prefix_ids":{"type":["set","string"],"optional":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.managed_outbound_ip_count","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"outbound_ports_allocated":{"type":"number","optional":true,"default":0}}},"optional":true,"computed":true},"nat_gateway_profile":{"nesting_mode":3,"block":{"attributes":{"effective_outbound_ips":{"type":["set","string"],"computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"managed_outbound_ip_count":{"type":"number","optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"oms_agent":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"msi_auth_for_monitoring_enabled":{"type":"bool","optional":true},"oms_agent_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true}}},"optional":true},"service_mesh_profile":{"nesting_mode":3,"block":{"attributes":{"external_ingress_gateway_enabled":{"type":"bool","optional":true},"internal_ingress_gateway_enabled":{"type":"bool","optional":true},"mode":{"type":"string","required":true},"revisions":{"type":["list","string"],"required":true}},"block_types":{"certificate_authority":{"nesting_mode":3,"block":{"attributes":{"cert_chain_object_name":{"type":"string","required":true},"cert_object_name":{"type":"string","required":true},"key_object_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"root_cert_object_name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["identity","service_principal"]},"storage_profile":{"nesting_mode":3,"block":{"attributes":{"blob_driver_enabled":{"type":"bool","optional":true,"default":false},"disk_driver_enabled":{"type":"bool","optional":true,"default":true},"file_driver_enabled":{"type":"bool","optional":true,"default":true},"snapshot_controller_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"web_app_routing":{"nesting_mode":3,"block":{"attributes":{"dns_zone_ids":{"type":["list","string"],"required":true},"web_app_routing_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true}}},"optional":true},"windows_profile":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"license":{"type":"string","optional":true}},"block_types":{"gmsa":{"nesting_mode":3,"block":{"attributes":{"dns_server":{"type":"string","required":true},"root_domain":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"workload_autoscaler_profile":{"nesting_mode":3,"block":{"attributes":{"keda_enabled":{"type":"bool","optional":true,"default":false},"vertical_pod_autoscaler_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_kubernetes_cluster_extension":{"block":{"attributes":{"aks_assigned_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"cluster_id":{"type":"string","required":true},"configuration_protected_settings":{"type":["map","string"],"optional":true},"configuration_settings":{"type":["map","string"],"optional":true},"current_version":{"type":"string","computed":true},"extension_type":{"type":"string","required":true},"name":{"type":"string","required":true},"release_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["target_namespace"]},"release_train":{"type":"string","optional":true,"computed":true,"conflicts_with":["version"]},"target_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["release_namespace"]},"version":{"type":"string","optional":true,"conflicts_with":["release_train"]}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"version":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_kubernetes_cluster_node_pool":{"block":{"attributes":{"auto_scaling_enabled":{"type":"bool","optional":true},"capacity_reservation_group_id":{"type":"string","optional":true},"eviction_policy":{"type":"string","optional":true},"fips_enabled":{"type":"bool","optional":true},"gpu_instance":{"type":"string","optional":true},"host_encryption_enabled":{"type":"bool","optional":true},"host_group_id":{"type":"string","optional":true},"kubelet_disk_type":{"type":"string","optional":true,"computed":true},"kubernetes_cluster_id":{"type":"string","required":true},"max_count":{"type":"number","optional":true},"max_pods":{"type":"number","optional":true,"computed":true},"min_count":{"type":"number","optional":true},"mode":{"type":"string","optional":true,"default":"User"},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true},"node_labels":{"type":["map","string"],"optional":true,"computed":true},"node_public_ip_enabled":{"type":"bool","optional":true},"node_public_ip_prefix_id":{"type":"string","optional":true,"required_with":["node_public_ip_enabled"]},"node_taints":{"type":["list","string"],"optional":true},"orchestrator_version":{"type":"string","optional":true,"computed":true},"os_disk_size_gb":{"type":"number","optional":true,"computed":true},"os_disk_type":{"type":"string","optional":true,"default":"Managed"},"os_sku":{"type":"string","optional":true,"computed":true},"os_type":{"type":"string","optional":true,"default":"Linux"},"pod_subnet_id":{"type":"string","optional":true},"priority":{"type":"string","optional":true,"default":"Regular"},"proximity_placement_group_id":{"type":"string","optional":true},"scale_down_mode":{"type":"string","optional":true,"default":"Delete"},"snapshot_id":{"type":"string","optional":true},"spot_max_price":{"type":"number","optional":true,"default":-1},"tags":{"type":["map","string"],"optional":true},"temporary_name_for_rotation":{"type":"string","optional":true},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false},"vm_size":{"type":"string","required":true},"vnet_subnet_id":{"type":"string","optional":true},"workload_runtime":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"kubelet_config":{"nesting_mode":3,"block":{"attributes":{"allowed_unsafe_sysctls":{"type":["set","string"],"optional":true},"container_log_max_line":{"type":"number","optional":true},"container_log_max_size_mb":{"type":"number","optional":true},"cpu_cfs_quota_enabled":{"type":"bool","optional":true,"default":true},"cpu_cfs_quota_period":{"type":"string","optional":true},"cpu_manager_policy":{"type":"string","optional":true},"image_gc_high_threshold":{"type":"number","optional":true},"image_gc_low_threshold":{"type":"number","optional":true},"pod_max_pid":{"type":"number","optional":true},"topology_manager_policy":{"type":"string","optional":true}}},"optional":true},"linux_os_config":{"nesting_mode":3,"block":{"attributes":{"swap_file_size_mb":{"type":"number","optional":true},"transparent_huge_page_defrag":{"type":"string","optional":true},"transparent_huge_page_enabled":{"type":"string","optional":true}},"block_types":{"sysctl_config":{"nesting_mode":3,"block":{"attributes":{"fs_aio_max_nr":{"type":"number","optional":true},"fs_file_max":{"type":"number","optional":true},"fs_inotify_max_user_watches":{"type":"number","optional":true},"fs_nr_open":{"type":"number","optional":true},"kernel_threads_max":{"type":"number","optional":true},"net_core_netdev_max_backlog":{"type":"number","optional":true},"net_core_optmem_max":{"type":"number","optional":true},"net_core_rmem_default":{"type":"number","optional":true},"net_core_rmem_max":{"type":"number","optional":true},"net_core_somaxconn":{"type":"number","optional":true},"net_core_wmem_default":{"type":"number","optional":true},"net_core_wmem_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_min":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"number","optional":true},"net_ipv4_tcp_fin_timeout":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_intvl":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_probes":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_time":{"type":"number","optional":true},"net_ipv4_tcp_max_syn_backlog":{"type":"number","optional":true},"net_ipv4_tcp_max_tw_buckets":{"type":"number","optional":true},"net_ipv4_tcp_tw_reuse":{"type":"bool","optional":true},"net_netfilter_nf_conntrack_buckets":{"type":"number","optional":true},"net_netfilter_nf_conntrack_max":{"type":"number","optional":true},"vm_max_map_count":{"type":"number","optional":true},"vm_swappiness":{"type":"number","optional":true},"vm_vfs_cache_pressure":{"type":"number","optional":true}}},"optional":true}}},"optional":true},"node_network_profile":{"nesting_mode":3,"block":{"attributes":{"application_security_group_ids":{"type":["list","string"],"optional":true},"node_public_ip_tags":{"type":["map","string"],"optional":true}},"block_types":{"allowed_host_ports":{"nesting_mode":3,"block":{"attributes":{"port_end":{"type":"number","optional":true},"port_start":{"type":"number","optional":true},"protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"upgrade_settings":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_in_minutes":{"type":"number","optional":true},"max_surge":{"type":"string","required":true},"node_soak_duration_in_minutes":{"type":"number","optional":true}}},"optional":true},"windows_profile":{"nesting_mode":3,"block":{"attributes":{"outbound_nat_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_kubernetes_cluster_trusted_access_role_binding":{"block":{"attributes":{"kubernetes_cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"roles":{"type":["list","string"],"required":true},"source_resource_id":{"type":"string","required":true}}}},"azurerm_kubernetes_fleet_manager":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"hub_profile":{"nesting_mode":3,"block":{"attributes":{"dns_prefix":{"type":"string","required":true},"fqdn":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_kubernetes_fleet_member":{"block":{"attributes":{"group":{"type":"string","optional":true},"kubernetes_cluster_id":{"type":"string","required":true},"kubernetes_fleet_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_kubernetes_fleet_update_run":{"block":{"attributes":{"fleet_update_strategy_id":{"type":"string","optional":true,"conflicts_with":["stage"]},"kubernetes_fleet_manager_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"managed_cluster_update":{"nesting_mode":3,"block":{"block_types":{"node_image_selection":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"upgrade":{"nesting_mode":3,"block":{"attributes":{"kubernetes_version":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}},"required":true},"stage":{"nesting_mode":3,"block":{"attributes":{"after_stage_wait_in_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true}},"block_types":{"group":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["fleet_update_strategy_id"]}}}},"azurerm_kubernetes_fleet_update_strategy":{"block":{"attributes":{"kubernetes_fleet_manager_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"stage":{"nesting_mode":3,"block":{"attributes":{"after_stage_wait_in_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true}},"block_types":{"group":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_kubernetes_flux_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"continuous_reconciliation_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"namespace"}},"block_types":{"blob_storage":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"container_id":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sas_token":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}},"block_types":{"managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_certificate_base64":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"client_certificate_password":{"type":"string","optional":true,"required_with":["blob_storage.0.service_principal.0.client_certificate_base64"]},"client_certificate_send_chain":{"type":"bool","optional":true,"default":false},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"tenant_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"bucket":{"nesting_mode":3,"block":{"attributes":{"access_key":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"],"required_with":["bucket.0.secret_key_base64"]},"bucket_name":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"]},"secret_key_base64":{"type":"string","optional":true,"required_with":["bucket.0.access_key"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"tls_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"git_repository":{"nesting_mode":3,"block":{"attributes":{"https_ca_cert_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_key_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_user":{"type":"string","optional":true,"conflicts_with":["git_repository.0.local_auth_reference","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"],"required_with":["git_repository.0.https_key_base64"]},"local_auth_reference":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"]},"reference_type":{"type":"string","required":true},"reference_value":{"type":"string","required":true},"ssh_known_hosts_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"ssh_private_key_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"kustomizations":{"nesting_mode":4,"block":{"attributes":{"depends_on":{"type":["list","string"],"optional":true},"garbage_collection_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"recreating_enabled":{"type":"bool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"number","optional":true,"default":600},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"wait":{"type":"bool","optional":true,"default":true}},"block_types":{"post_build":{"nesting_mode":3,"block":{"attributes":{"substitute":{"type":["map","string"],"optional":true}},"block_types":{"substitute_from":{"nesting_mode":3,"block":{"attributes":{"kind":{"type":"string","required":true},"name":{"type":"string","required":true},"optional":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}},"required":true}}}},"azurerm_kusto_attached_database_configuration":{"block":{"attributes":{"attached_database_names":{"type":["list","string"],"computed":true},"cluster_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["cluster_id","cluster_resource_id"]},"cluster_name":{"type":"string","required":true},"cluster_resource_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["cluster_id","cluster_resource_id"]},"database_name":{"type":"string","required":true},"default_principal_modification_kind":{"type":"string","optional":true,"default":"None"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"sharing":{"nesting_mode":3,"block":{"attributes":{"external_tables_to_exclude":{"type":["set","string"],"optional":true},"external_tables_to_include":{"type":["set","string"],"optional":true},"materialized_views_to_exclude":{"type":["set","string"],"optional":true},"materialized_views_to_include":{"type":["set","string"],"optional":true},"tables_to_exclude":{"type":["set","string"],"optional":true},"tables_to_include":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_kusto_cluster":{"block":{"attributes":{"allowed_fqdns":{"type":["list","string"],"optional":true},"allowed_ip_ranges":{"type":["list","string"],"optional":true},"auto_stop_enabled":{"type":"bool","optional":true,"default":true},"data_ingestion_uri":{"type":"string","computed":true},"disk_encryption_enabled":{"type":"bool","optional":true,"default":false},"double_encryption_enabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"public_ip_type":{"type":"string","optional":true,"default":"IPv4"},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"streaming_ingestion_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"trusted_external_tenants":{"type":["list","string"],"optional":true,"computed":true},"uri":{"type":"string","computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"language_extensions":{"nesting_mode":3,"block":{"attributes":{"image":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"optimized_auto_scale":{"nesting_mode":3,"block":{"attributes":{"maximum_instances":{"type":"number","required":true},"minimum_instances":{"type":"number","required":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true}}},"required":true},"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"data_management_public_ip_id":{"type":"string","required":true},"engine_public_ip_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_kusto_cluster_customer_managed_key":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"key_version":{"type":"string","optional":true},"user_identity":{"type":"string","optional":true}}}},"azurerm_kusto_cluster_managed_private_endpoint":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_resource_id":{"type":"string","required":true},"private_link_resource_region":{"type":"string","optional":true},"request_message":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_kusto_cluster_principal_assignment":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"principal_name":{"type":"string","computed":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role":{"type":"string","required":true},"tenant_id":{"type":"string","required":true},"tenant_name":{"type":"string","computed":true}}}},"azurerm_kusto_cosmosdb_data_connection":{"block":{"attributes":{"cosmosdb_container_id":{"type":"string","required":true},"kusto_database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_identity_id":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"retrieval_start_date":{"type":"string","optional":true},"table_name":{"type":"string","required":true}}}},"azurerm_kusto_database":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"hot_cache_period":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"number","computed":true},"soft_delete_period":{"type":"string","optional":true}}}},"azurerm_kusto_database_principal_assignment":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"principal_name":{"type":"string","computed":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role":{"type":"string","required":true},"tenant_id":{"type":"string","required":true},"tenant_name":{"type":"string","computed":true}}}},"azurerm_kusto_eventgrid_data_connection":{"block":{"attributes":{"blob_storage_event_type":{"type":"string","optional":true,"default":"Microsoft.Storage.BlobCreated"},"cluster_name":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"eventgrid_event_subscription_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["eventgrid_resource_id"]},"eventgrid_resource_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["eventgrid_event_subscription_id"]},"eventhub_consumer_group_name":{"type":"string","required":true},"eventhub_id":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_identity_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["managed_identity_resource_id"]},"managed_identity_resource_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["managed_identity_id"]},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"skip_first_record":{"type":"bool","optional":true,"default":false},"storage_account_id":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_eventhub_data_connection":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"compression":{"type":"string","optional":true,"default":"None"},"consumer_group":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"event_system_properties":{"type":["list","string"],"optional":true,"computed":true},"eventhub_id":{"type":"string","required":true},"identity_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_iothub_data_connection":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"consumer_group":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"event_system_properties":{"type":["set","string"],"optional":true},"iothub_id":{"type":"string","required":true},"location":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shared_access_policy_name":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_script":{"block":{"attributes":{"continue_on_errors_enabled":{"type":"bool","optional":true,"default":false},"database_id":{"type":"string","required":true},"force_an_update_when_value_changed":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"sas_token":{"type":"string","optional":true,"required_with":["url"]},"script_content":{"type":"string","optional":true,"exactly_one_of":["url","script_content"]},"url":{"type":"string","optional":true,"exactly_one_of":["url","script_content"],"required_with":["sas_token"]}}}},"azurerm_lb":{"block":{"attributes":{"edge_zone":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"string","optional":true,"computed":true},"id":{"type":"string","computed":true},"inbound_nat_rules":{"type":["set","string"],"computed":true},"load_balancer_rules":{"type":["set","string"],"computed":true},"name":{"type":"string","required":true},"outbound_rules":{"type":["set","string"],"computed":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","optional":true,"computed":true},"private_ip_address_version":{"type":"string","optional":true,"computed":true},"public_ip_address_id":{"type":"string","optional":true,"computed":true},"public_ip_prefix_id":{"type":"string","optional":true,"computed":true},"subnet_id":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_lb_backend_address_pool":{"block":{"attributes":{"backend_ip_configurations":{"type":["list","string"],"computed":true},"inbound_nat_rules":{"type":["list","string"],"computed":true},"load_balancing_rules":{"type":["list","string"],"computed":true},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_rules":{"type":["list","string"],"computed":true},"synchronous_mode":{"type":"string","optional":true,"required_with":["virtual_network_id"]},"virtual_network_id":{"type":"string","optional":true}},"block_types":{"tunnel_interface":{"nesting_mode":3,"block":{"attributes":{"identifier":{"type":"number","required":true},"port":{"type":"number","required":true},"protocol":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_lb_backend_address_pool_address":{"block":{"attributes":{"backend_address_ip_configuration_id":{"type":"string","optional":true,"conflicts_with":["virtual_network_id"]},"backend_address_pool_id":{"type":"string","required":true},"inbound_nat_rule_port_mapping":{"type":["list",["object",{"backend_port":"number","frontend_port":"number","inbound_nat_rule_name":"string"}]],"computed":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true,"conflicts_with":["backend_address_ip_configuration_id"]}}}},"azurerm_lb_nat_pool":{"block":{"attributes":{"backend_port":{"type":"number","required":true},"floating_ip_enabled":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port_end":{"type":"number","required":true},"frontend_port_start":{"type":"number","required":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tcp_reset_enabled":{"type":"bool","optional":true}}}},"azurerm_lb_nat_rule":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","optional":true,"conflicts_with":["frontend_port"],"required_with":["frontend_port_start","frontend_port_end"]},"backend_ip_configuration_id":{"type":"string","computed":true},"backend_port":{"type":"number","required":true},"enable_floating_ip":{"type":"bool","optional":true,"computed":true},"enable_tcp_reset":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port":{"type":"number","optional":true,"conflicts_with":["frontend_port_start","frontend_port_end","backend_address_pool_id"]},"frontend_port_end":{"type":"number","optional":true,"conflicts_with":["frontend_port"],"required_with":["backend_address_pool_id","frontend_port_start"]},"frontend_port_start":{"type":"number","optional":true,"conflicts_with":["frontend_port"],"required_with":["backend_address_pool_id","frontend_port_end"]},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_lb_outbound_rule":{"block":{"attributes":{"allocated_outbound_ports":{"type":"number","optional":true,"default":1024},"backend_address_pool_id":{"type":"string","required":true},"enable_tcp_reset":{"type":"bool","optional":true,"default":false},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_lb_probe":{"block":{"attributes":{"interval_in_seconds":{"type":"number","optional":true,"default":15},"load_balancer_rules":{"type":["set","string"],"computed":true},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"number_of_probes":{"type":"number","optional":true,"default":2},"port":{"type":"number","required":true},"probe_threshold":{"type":"number","optional":true,"default":1},"protocol":{"type":"string","optional":true,"default":"Tcp"},"request_path":{"type":"string","optional":true}}}},"azurerm_lb_rule":{"block":{"attributes":{"backend_address_pool_ids":{"type":["list","string"],"optional":true},"backend_port":{"type":"number","required":true},"disable_outbound_snat":{"type":"bool","optional":true,"default":false},"enable_floating_ip":{"type":"bool","optional":true,"default":false},"enable_tcp_reset":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port":{"type":"number","required":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"load_distribution":{"type":"string","optional":true,"default":"Default"},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"probe_id":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}}},"azurerm_lighthouse_assignment":{"block":{"attributes":{"lighthouse_definition_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"scope":{"type":"string","required":true}}}},"azurerm_lighthouse_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"lighthouse_definition_id":{"type":"string","optional":true,"computed":true},"managing_tenant_id":{"type":"string","required":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"authorization":{"nesting_mode":4,"block":{"attributes":{"delegated_role_definition_ids":{"type":["set","string"],"optional":true},"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true}}},"required":true},"eligible_authorization":{"nesting_mode":4,"block":{"attributes":{"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true}},"block_types":{"just_in_time_access_policy":{"nesting_mode":3,"block":{"attributes":{"maximum_activation_duration":{"type":"string","optional":true,"default":"PT8H"},"multi_factor_auth_provider":{"type":"string","optional":true}},"block_types":{"approver":{"nesting_mode":4,"block":{"attributes":{"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_function_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":false},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"default":false,"conflicts_with":["site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}},"block_types":{"docker":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"image_tag":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_function_app_slot":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"default":0},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":false},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"default":false,"conflicts_with":["site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}},"block_types":{"docker":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"image_tag":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_virtual_machine":{"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"allow_extension_operations":{"type":"bool","optional":true,"default":true},"availability_set_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id","virtual_machine_scale_set_id","zone"]},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"bool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id","proximity_placement_group_id"]},"computer_name":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"dedicated_host_group_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_id"]},"dedicated_host_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_group_id"]},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"disk_controller_type":{"type":"string","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"ImageDefault"},"platform_fault_domain":{"type":"number","optional":true,"default":-1,"required_with":["virtual_machine_scale_set_id"]},"priority":{"type":"string","optional":true,"default":"Regular"},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"public_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"reboot_setting":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"size":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"user_data":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","computed":true},"virtual_machine_scale_set_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id"]},"vm_agent_platform_updates_enabled":{"type":"bool","optional":true,"default":false},"vtpm_enabled":{"type":"bool","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"hibernation_enabled":{"type":"bool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"bool","optional":true,"default":false},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"id":{"type":"string","computed":true},"name":{"type":"string","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"os_image_notification":{"nesting_mode":3,"block":{"attributes":{"timeout":{"type":"string","optional":true,"default":"PT15M"}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_linux_virtual_machine_scale_set":{"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"do_not_run_extensions_on_overprovisioned_machines":{"type":"bool","optional":true,"default":false},"edge_zone":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"health_probe_id":{"type":"string","optional":true},"host_group_id":{"type":"string","optional":true},"instances":{"type":"number","optional":true,"default":0},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"platform_fault_domain_count":{"type":"number","optional":true,"computed":true},"priority":{"type":"string","optional":true,"default":"Regular"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"sku":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"unique_id":{"type":"string","computed":true},"upgrade_mode":{"type":"string","optional":true,"default":"Manual"},"user_data":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"automatic_os_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"disable_automatic_rollback":{"type":"bool","required":true},"enable_automatic_os_upgrade":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"cross_zone_upgrades_enabled":{"type":"bool","optional":true},"max_batch_instance_percent":{"type":"number","required":true},"max_unhealthy_instance_percent":{"type":"number","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"number","required":true},"maximum_surge_instances_enabled":{"type":"bool","optional":true},"pause_time_between_batches":{"type":"string","required":true},"prioritize_unhealthy_instances_enabled":{"type":"bool","optional":true}}},"optional":true},"scale_in":{"nesting_mode":3,"block":{"attributes":{"force_deletion_enabled":{"type":"bool","optional":true,"default":false},"rule":{"type":"string","optional":true,"default":"Default"}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"spot_restore":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timeout":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true,"computed":true},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_linux_web_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"docker_image_name":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"go_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"java_server":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server_version"]},"java_server_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"],"required_with":["site_config.0.application_stack.0.java_server_version","site_config.0.application_stack.0.java_server"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"php_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"ruby_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_web_app_slot":{"block":{"attributes":{"app_metadata":{"type":["map","string"],"computed":true},"app_service_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"docker_image_name":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"go_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"java_server":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server_version"]},"java_server_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"],"required_with":["site_config.0.application_stack.0.java_server_version","site_config.0.application_stack.0.java_server"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"php_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"ruby_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_load_test":{"block":{"attributes":{"data_plane_uri":{"type":"string","computed":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_id":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_local_network_gateway":{"block":{"attributes":{"address_space":{"type":["list","string"],"optional":true},"gateway_address":{"type":"string","optional":true,"exactly_one_of":["gateway_address","gateway_fqdn"]},"gateway_fqdn":{"type":"string","optional":true,"exactly_one_of":["gateway_address","gateway_fqdn"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"bgp_peering_address":{"type":"string","required":true},"peer_weight":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_log_analytics_cluster":{"block":{"attributes":{"cluster_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size_gb":{"type":"number","optional":true,"default":100},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_log_analytics_cluster_customer_managed_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"log_analytics_cluster_id":{"type":"string","required":true}}}},"azurerm_log_analytics_data_export_rule":{"block":{"attributes":{"destination_resource_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"export_rule_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"table_names":{"type":["set","string"],"required":true},"workspace_resource_id":{"type":"string","required":true}}}},"azurerm_log_analytics_datasource_windows_event":{"block":{"attributes":{"event_log_name":{"type":"string","required":true},"event_types":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workspace_name":{"type":"string","required":true}}}},"azurerm_log_analytics_datasource_windows_performance_counter":{"block":{"attributes":{"counter_name":{"type":"string","required":true},"instance_name":{"type":"string","required":true},"interval_seconds":{"type":"number","required":true},"name":{"type":"string","required":true},"object_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workspace_name":{"type":"string","required":true}}}},"azurerm_log_analytics_linked_service":{"block":{"attributes":{"name":{"type":"string","computed":true},"read_access_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["read_access_id","write_access_id"]},"resource_group_name":{"type":"string","required":true},"workspace_id":{"type":"string","required":true},"write_access_id":{"type":"string","optional":true,"exactly_one_of":["read_access_id","write_access_id"]}}}},"azurerm_log_analytics_linked_storage_account":{"block":{"attributes":{"data_source_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_ids":{"type":["set","string"],"required":true},"workspace_resource_id":{"type":"string","required":true}}}},"azurerm_log_analytics_query_pack":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_query_pack_query":{"block":{"attributes":{"additional_settings_json":{"type":"string","optional":true},"body":{"type":"string","required":true},"categories":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"query_pack_id":{"type":"string","required":true},"resource_types":{"type":["list","string"],"optional":true},"solutions":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_saved_search":{"block":{"attributes":{"category":{"type":"string","required":true},"display_name":{"type":"string","required":true},"function_alias":{"type":"string","optional":true},"function_parameters":{"type":["list","string"],"optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_solution":{"block":{"attributes":{"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"solution_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_name":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","computed":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true}}},"required":true}}}},"azurerm_log_analytics_storage_insights":{"block":{"attributes":{"blob_container_names":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"table_names":{"type":["set","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_log_analytics_workspace":{"block":{"attributes":{"allow_resource_only_permissions":{"type":"bool","optional":true,"default":true},"cmk_for_query_forced":{"type":"bool","optional":true},"daily_quota_gb":{"type":"number","optional":true,"default":-1},"data_collection_rule_id":{"type":"string","optional":true},"immediate_data_purge_on_30_days_enabled":{"type":"bool","optional":true},"internet_ingestion_enabled":{"type":"bool","optional":true,"default":true},"internet_query_enabled":{"type":"bool","optional":true,"default":true},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_shared_key":{"type":"string","computed":true},"reservation_capacity_in_gb_per_day":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"retention_in_days":{"type":"number","optional":true,"computed":true},"secondary_shared_key":{"type":"string","computed":true},"sku":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_log_analytics_workspace_table":{"block":{"attributes":{"name":{"type":"string","required":true},"plan":{"type":"string","optional":true,"default":"Analytics"},"retention_in_days":{"type":"number","optional":true},"total_retention_in_days":{"type":"number","optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_logic_app_action_custom":{"block":{"attributes":{"body":{"type":"string","required":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_logic_app_action_http":{"block":{"attributes":{"body":{"type":"string","optional":true},"headers":{"type":["map","string"],"optional":true},"logic_app_id":{"type":"string","required":true},"method":{"type":"string","required":true},"name":{"type":"string","required":true},"queries":{"type":["map","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"run_after":{"nesting_mode":4,"block":{"attributes":{"action_name":{"type":"string","required":true},"action_result":{"type":"string","required":true}}},"optional":true}}}},"azurerm_logic_app_integration_account":{"block":{"attributes":{"integration_service_environment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_logic_app_integration_account_agreement":{"block":{"attributes":{"agreement_type":{"type":"string","required":true},"content":{"type":"string","required":true},"guest_partner_name":{"type":"string","required":true},"host_partner_name":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"guest_identity":{"nesting_mode":3,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true},"host_identity":{"nesting_mode":3,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_logic_app_integration_account_assembly":{"block":{"attributes":{"assembly_name":{"type":"string","required":true},"assembly_version":{"type":"string","optional":true,"default":"0.0.0.0"},"content":{"type":"string","optional":true,"at_least_one_of":["content","content_link_uri"]},"content_link_uri":{"type":"string","optional":true,"at_least_one_of":["content","content_link_uri"]},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_batch_configuration":{"block":{"attributes":{"batch_group_name":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"release_criteria":{"nesting_mode":3,"block":{"attributes":{"batch_size":{"type":"number","optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]},"message_count":{"type":"number","optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_time":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"hours":{"type":["set","number"],"optional":true},"minutes":{"type":["set","number"],"optional":true},"month_days":{"type":["set","number"],"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.week_days"]},"week_days":{"type":["set","string"],"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.month_days","release_criteria.0.recurrence.0.schedule.0.monthly"]}},"block_types":{"monthly":{"nesting_mode":4,"block":{"attributes":{"week":{"type":"number","required":true},"weekday":{"type":"string","required":true}}},"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.week_days"]}}},"optional":true}}},"optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]}}},"required":true}}}},"azurerm_logic_app_integration_account_certificate":{"block":{"attributes":{"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_certificate":{"type":"string","optional":true,"at_least_one_of":["key_vault_key"]},"resource_group_name":{"type":"string","required":true}},"block_types":{"key_vault_key":{"nesting_mode":3,"block":{"attributes":{"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"key_version":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["public_certificate"]}}}},"azurerm_logic_app_integration_account_map":{"block":{"attributes":{"content":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"map_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_partner":{"block":{"attributes":{"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"business_identity":{"nesting_mode":4,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_logic_app_integration_account_schema":{"block":{"attributes":{"content":{"type":"string","required":true},"file_name":{"type":"string","optional":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_session":{"block":{"attributes":{"content":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_standard":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"bundle_version":{"type":"string","optional":true,"default":"[1.*, 2.0.0)"},"client_affinity_enabled":{"type":"bool","optional":true,"computed":true},"client_certificate_mode":{"type":"string","optional":true},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"scm_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"storage_account_share_name":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"use_extension_bundle":{"type":"bool","optional":true,"default":true},"version":{"type":"string","optional":true,"default":"~4"},"virtual_network_subnet_id":{"type":"string","optional":true}},"block_types":{"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","computed":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_min_tls_version":{"type":"string","optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_logic_app_trigger_custom":{"block":{"attributes":{"body":{"type":"string","required":true},"callback_url":{"type":"string","computed":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_logic_app_trigger_http_request":{"block":{"attributes":{"callback_url":{"type":"string","computed":true},"logic_app_id":{"type":"string","required":true},"method":{"type":"string","optional":true},"name":{"type":"string","required":true},"relative_path":{"type":"string","optional":true},"schema":{"type":"string","required":true}}}},"azurerm_logic_app_trigger_recurrence":{"block":{"attributes":{"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"start_time":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"computed":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"at_these_hours":{"type":["set","number"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]},"at_these_minutes":{"type":["set","number"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]},"on_these_days":{"type":["set","string"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]}}},"optional":true}}}},"azurerm_logic_app_workflow":{"block":{"attributes":{"access_endpoint":{"type":"string","computed":true},"connector_endpoint_ip_addresses":{"type":["list","string"],"computed":true},"connector_outbound_ip_addresses":{"type":["list","string"],"computed":true},"enabled":{"type":"bool","optional":true,"default":true},"integration_service_environment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"logic_app_integration_account_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workflow_endpoint_ip_addresses":{"type":["list","string"],"computed":true},"workflow_outbound_ip_addresses":{"type":["list","string"],"computed":true},"workflow_parameters":{"type":["map","string"],"optional":true},"workflow_schema":{"type":"string","optional":true,"default":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#"},"workflow_version":{"type":"string","optional":true,"default":"1.0.0.0"}},"block_types":{"access_control":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true},"content":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}},"block_types":{"open_authentication_policy":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"claim":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"workflow_management":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_machine_learning_compute_cluster":{"block":{"attributes":{"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"node_public_ip_enabled":{"type":"bool","optional":true,"default":true},"ssh_public_access_enabled":{"type":"bool","optional":true,"default":false},"subnet_resource_id":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"vm_priority":{"type":"string","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"scale_settings":{"nesting_mode":3,"block":{"attributes":{"max_node_count":{"type":"number","required":true},"min_node_count":{"type":"number","required":true},"scale_down_nodes_after_idle_duration":{"type":"string","required":true}}},"required":true},"ssh":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true,"at_least_one_of":["ssh.0.admin_password","ssh.0.key_value"]},"admin_username":{"type":"string","required":true},"key_value":{"type":"string","optional":true,"at_least_one_of":["ssh.0.admin_password","ssh.0.key_value"]}}},"optional":true}}}},"azurerm_machine_learning_compute_instance":{"block":{"attributes":{"authorization_type":{"type":"string","optional":true},"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"node_public_ip_enabled":{"type":"bool","optional":true,"default":true},"subnet_resource_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_size":{"type":"string","required":true}},"block_types":{"assign_to_user":{"nesting_mode":3,"block":{"attributes":{"object_id":{"type":"string","optional":true},"tenant_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ssh":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","computed":true},"public_key":{"type":"string","required":true},"username":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_machine_learning_datastore_blobstorage":{"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["account_key","shared_access_signature"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"service_data_auth_identity":{"type":"string","optional":true,"default":"None"},"shared_access_signature":{"type":"string","optional":true,"at_least_one_of":["account_key","shared_access_signature"]},"storage_container_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_datastore_datalake_gen2":{"block":{"attributes":{"authority_url":{"type":"string","optional":true},"client_id":{"type":"string","optional":true,"required_with":["tenant_id","client_secret"]},"client_secret":{"type":"string","optional":true,"required_with":["tenant_id","client_id"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","computed":true},"name":{"type":"string","required":true},"service_data_identity":{"type":"string","optional":true,"default":"None"},"storage_container_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","optional":true,"required_with":["client_id","client_secret"]},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_datastore_fileshare":{"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["account_key","shared_access_signature"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","computed":true},"name":{"type":"string","required":true},"service_data_identity":{"type":"string","optional":true,"default":"None"},"shared_access_signature":{"type":"string","optional":true,"at_least_one_of":["account_key","shared_access_signature"]},"storage_fileshare_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_inference_cluster":{"block":{"attributes":{"cluster_purpose":{"type":"string","optional":true,"default":"FastProd"},"description":{"type":"string","optional":true},"kubernetes_cluster_id":{"type":"string","required":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ssl":{"nesting_mode":3,"block":{"attributes":{"cert":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"cname":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"key":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"leaf_domain_label":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.cert","ssl.0.key","ssl.0.cname"]},"overwrite_existing_domain":{"type":"bool","optional":true,"default":"","conflicts_with":["ssl.0.cert","ssl.0.key","ssl.0.cname"]}}},"optional":true}}}},"azurerm_machine_learning_synapse_spark":{"block":{"attributes":{"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"synapse_spark_pool_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_machine_learning_workspace":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"container_registry_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"discovery_url":{"type":"string","computed":true},"friendly_name":{"type":"string","optional":true},"high_business_impact":{"type":"bool","optional":true},"image_build_compute_name":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"kind":{"type":"string","optional":true,"default":"Default"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_user_assigned_identity":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"default":"Basic"},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"v1_legacy_mode_enabled":{"type":"bool","optional":true,"default":false},"workspace_id":{"type":"string","computed":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_id":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"feature_store":{"nesting_mode":3,"block":{"attributes":{"computer_spark_runtime_version":{"type":"string","optional":true},"offline_connection_name":{"type":"string","optional":true},"online_connection_name":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"managed_network":{"nesting_mode":3,"block":{"attributes":{"isolation_mode":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"serverless_compute":{"nesting_mode":3,"block":{"attributes":{"public_ip_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_machine_learning_workspace_network_outbound_rule_fqdn":{"block":{"attributes":{"destination_fqdn":{"type":"string","required":true},"name":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_workspace_network_outbound_rule_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"service_resource_id":{"type":"string","required":true},"spark_enabled":{"type":"bool","optional":true,"default":false},"sub_resource_target":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_workspace_network_outbound_rule_service_tag":{"block":{"attributes":{"name":{"type":"string","required":true},"port_ranges":{"type":"string","required":true},"protocol":{"type":"string","required":true},"service_tag":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_dedicated_host":{"block":{"attributes":{"dedicated_host_id":{"type":"string","required":true},"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_dynamic_scope":{"block":{"attributes":{"maintenance_configuration_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"locations":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"os_types":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"resource_groups":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"resource_types":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"tag_filter":{"type":"string","optional":true,"default":"Any","required_with":["filter.0.tags"]}},"block_types":{"tags":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]}}},"required":true}}}},"azurerm_maintenance_assignment_virtual_machine":{"block":{"attributes":{"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_virtual_machine_scale_set":{"block":{"attributes":{"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}}}},"azurerm_maintenance_configuration":{"block":{"attributes":{"in_guest_user_patch_mode":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"properties":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"scope":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"visibility":{"type":"string","optional":true,"default":"Custom"}},"block_types":{"install_patches":{"nesting_mode":3,"block":{"attributes":{"reboot":{"type":"string","optional":true}},"block_types":{"linux":{"nesting_mode":3,"block":{"attributes":{"classifications_to_include":{"type":["list","string"],"optional":true},"package_names_mask_to_exclude":{"type":["list","string"],"optional":true},"package_names_mask_to_include":{"type":["list","string"],"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"classifications_to_include":{"type":["list","string"],"optional":true},"kb_numbers_to_exclude":{"type":["list","string"],"optional":true},"kb_numbers_to_include":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"window":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","optional":true},"expiration_date_time":{"type":"string","optional":true},"recur_every":{"type":"string","optional":true},"start_date_time":{"type":"string","required":true},"time_zone":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_application":{"block":{"attributes":{"application_definition_id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":["map","string"],"computed":true},"parameter_values":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_application_definition":{"block":{"attributes":{"create_ui_definition":{"type":"string","optional":true,"conflicts_with":["package_file_uri"],"required_with":["main_template"]},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"lock_level":{"type":"string","required":true},"main_template":{"type":"string","optional":true,"conflicts_with":["package_file_uri"],"required_with":["create_ui_definition"]},"name":{"type":"string","required":true},"package_enabled":{"type":"bool","optional":true,"default":true},"package_file_uri":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"authorization":{"nesting_mode":4,"block":{"attributes":{"role_definition_id":{"type":"string","required":true},"service_principal_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_disk":{"block":{"attributes":{"create_option":{"type":"string","required":true},"disk_access_id":{"type":"string","optional":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["secure_vm_disk_encryption_set_id"]},"disk_iops_read_only":{"type":"number","optional":true,"computed":true},"disk_iops_read_write":{"type":"number","optional":true,"computed":true},"disk_mbps_read_only":{"type":"number","optional":true,"computed":true},"disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"gallery_image_reference_id":{"type":"string","optional":true,"conflicts_with":["image_reference_id"]},"hyper_v_generation":{"type":"string","optional":true},"image_reference_id":{"type":"string","optional":true,"conflicts_with":["gallery_image_reference_id"]},"location":{"type":"string","required":true},"logical_sector_size":{"type":"number","optional":true,"computed":true},"max_shares":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"network_access_policy":{"type":"string","optional":true},"on_demand_bursting_enabled":{"type":"bool","optional":true},"optimized_frequent_attach_enabled":{"type":"bool","optional":true,"default":false},"os_type":{"type":"string","optional":true},"performance_plus_enabled":{"type":"bool","optional":true,"default":false},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["disk_encryption_set_id"]},"security_type":{"type":"string","optional":true},"source_resource_id":{"type":"string","optional":true},"source_uri":{"type":"string","optional":true,"computed":true},"storage_account_id":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","optional":true,"computed":true},"trusted_launch_enabled":{"type":"bool","optional":true},"upload_size_bytes":{"type":"number","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"encryption_settings":{"nesting_mode":3,"block":{"block_types":{"disk_encryption_key":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"required":true},"key_encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_managed_disk_sas_token":{"block":{"attributes":{"access_level":{"type":"string","required":true},"duration_in_seconds":{"type":"number","required":true},"managed_disk_id":{"type":"string","required":true},"sas_url":{"type":"string","computed":true}}}},"azurerm_managed_lustre_file_system":{"block":{"attributes":{"location":{"type":"string","required":true},"mgs_address":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"storage_capacity_in_tb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"required":true}},"block_types":{"encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true},"hsm_setting":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"import_prefix":{"type":"string","optional":true},"logging_container_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"time_of_day_in_utc":{"type":"string","required":true}}},"required":true}}}},"azurerm_management_group":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","optional":true,"computed":true},"parent_management_group_id":{"type":"string","optional":true,"computed":true},"subscription_ids":{"type":["set","string"],"optional":true,"computed":true},"tenant_scoped_id":{"type":"string","computed":true}}}},"azurerm_management_group_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_management_group_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true}}}},"azurerm_management_group_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true}}}},"azurerm_management_group_subscription_association":{"block":{"attributes":{"management_group_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_management_group_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_management_lock":{"block":{"attributes":{"lock_level":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"scope":{"type":"string","required":true}}}},"azurerm_maps_account":{"block":{"attributes":{"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"x_ms_client_id":{"type":"string","computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["list","string"],"required":true}}},"optional":true},"data_store":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","optional":true},"unique_name":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_maps_creator":{"block":{"attributes":{"location":{"type":"string","required":true},"maps_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_units":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_marketplace_agreement":{"block":{"attributes":{"license_text_link":{"type":"string","computed":true},"offer":{"type":"string","required":true},"plan":{"type":"string","required":true},"privacy_policy_link":{"type":"string","computed":true},"publisher":{"type":"string","required":true}}}},"azurerm_marketplace_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true,"required_with":["condition_version"]},"condition_version":{"type":"string","optional":true,"required_with":["condition"]},"delegated_managed_identity_resource_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","optional":true,"conflicts_with":["role_definition_name"]},"role_definition_name":{"type":"string","optional":true,"conflicts_with":["role_definition_id"]},"skip_service_principal_aad_check":{"type":"bool","optional":true,"default":false}}}},"azurerm_mobile_network":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_country_code":{"type":"string","required":true},"mobile_network_code":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_attached_data_network":{"block":{"attributes":{"dns_addresses":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"mobile_network_data_network_name":{"type":"string","required":true},"mobile_network_packet_core_data_plane_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_equipment_address_pool_prefixes":{"type":["list","string"],"optional":true,"at_least_one_of":["user_equipment_address_pool_prefixes","user_equipment_static_address_pool_prefixes"]},"user_equipment_static_address_pool_prefixes":{"type":["list","string"],"optional":true,"at_least_one_of":["user_equipment_address_pool_prefixes","user_equipment_static_address_pool_prefixes"]},"user_plane_access_ipv4_address":{"type":"string","optional":true},"user_plane_access_ipv4_gateway":{"type":"string","optional":true},"user_plane_access_ipv4_subnet":{"type":"string","optional":true},"user_plane_access_name":{"type":"string","optional":true}},"block_types":{"network_address_port_translation":{"nesting_mode":3,"block":{"attributes":{"icmp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"pinhole_maximum_number":{"type":"number","optional":true,"default":65536},"tcp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"tcp_port_reuse_minimum_hold_time_in_seconds":{"type":"number","optional":true,"default":120},"udp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"udp_port_reuse_minimum_hold_time_in_seconds":{"type":"number","optional":true,"default":60}},"block_types":{"port_range":{"nesting_mode":3,"block":{"attributes":{"maximum":{"type":"number","optional":true,"default":49999},"minimum":{"type":"number","optional":true,"default":1024}}},"optional":true}}},"optional":true}}}},"azurerm_mobile_network_data_network":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_packet_core_control_plane":{"block":{"attributes":{"control_plane_access_ipv4_address":{"type":"string","optional":true},"control_plane_access_ipv4_gateway":{"type":"string","optional":true},"control_plane_access_ipv4_subnet":{"type":"string","optional":true},"control_plane_access_name":{"type":"string","optional":true},"core_network_technology":{"type":"string","optional":true},"interoperability_settings_json":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"site_ids":{"type":["list","string"],"required":true},"sku":{"type":"string","required":true},"software_version":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"user_equipment_mtu_in_bytes":{"type":"number","optional":true,"default":1440}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"local_diagnostics_access":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","required":true},"https_server_certificate_url":{"type":"string","optional":true}}},"required":true},"platform":{"nesting_mode":3,"block":{"attributes":{"arc_kubernetes_cluster_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"custom_location_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"edge_device_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"stack_hci_cluster_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mobile_network_packet_core_data_plane":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_packet_core_control_plane_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_plane_access_ipv4_address":{"type":"string","optional":true},"user_plane_access_ipv4_gateway":{"type":"string","optional":true},"user_plane_access_ipv4_subnet":{"type":"string","optional":true},"user_plane_access_name":{"type":"string","optional":true}}}},"azurerm_mobile_network_service":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"service_precedence":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"pcc_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"precedence":{"type":"number","required":true},"traffic_control_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"qos_policy":{"nesting_mode":3,"block":{"attributes":{"allocation_and_retention_priority_level":{"type":"number","optional":true},"preemption_capability":{"type":"string","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"string","optional":true,"default":"Preemptable"},"qos_indicator":{"type":"number","required":true}},"block_types":{"guaranteed_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"optional":true},"maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"optional":true},"service_data_flow_template":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"ports":{"type":["list","string"],"optional":true},"protocol":{"type":["list","string"],"required":true},"remote_ip_list":{"type":["list","string"],"required":true}}},"required":true}}},"required":true},"service_qos_policy":{"nesting_mode":3,"block":{"attributes":{"allocation_and_retention_priority_level":{"type":"number","optional":true,"default":9},"preemption_capability":{"type":"string","optional":true},"preemption_vulnerability":{"type":"string","optional":true},"qos_indicator":{"type":"number","optional":true}},"block_types":{"maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_mobile_network_sim":{"block":{"attributes":{"authentication_key":{"type":"string","required":true},"device_type":{"type":"string","optional":true},"integrated_circuit_card_identifier":{"type":"string","required":true},"international_mobile_subscriber_identity":{"type":"string","required":true},"mobile_network_sim_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"operator_key_code":{"type":"string","required":true},"sim_policy_id":{"type":"string","optional":true},"sim_state":{"type":"string","computed":true},"vendor_key_fingerprint":{"type":"string","computed":true},"vendor_name":{"type":"string","computed":true}},"block_types":{"static_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"attached_data_network_id":{"type":"string","required":true},"slice_id":{"type":"string","required":true},"static_ipv4_address":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_mobile_network_sim_group":{"block":{"attributes":{"encryption_key_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mobile_network_sim_policy":{"block":{"attributes":{"default_slice_id":{"type":"string","required":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"rat_frequency_selection_priority_index":{"type":"number","optional":true},"registration_timer_in_seconds":{"type":"number","optional":true,"default":3240},"tags":{"type":["map","string"],"optional":true}},"block_types":{"slice":{"nesting_mode":3,"block":{"attributes":{"default_data_network_id":{"type":"string","required":true},"slice_id":{"type":"string","required":true}},"block_types":{"data_network":{"nesting_mode":3,"block":{"attributes":{"additional_allowed_session_types":{"type":["list","string"],"optional":true},"allocation_and_retention_priority_level":{"type":"number","optional":true,"default":0},"allowed_services_ids":{"type":["list","string"],"required":true},"data_network_id":{"type":"string","required":true},"default_session_type":{"type":"string","optional":true,"default":"IPv4"},"max_buffered_packets":{"type":"number","optional":true,"default":10},"preemption_capability":{"type":"string","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"string","optional":true,"default":"NotPreemptable"},"qos_indicator":{"type":"number","required":true}},"block_types":{"session_aggregate_maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"user_equipment_aggregate_maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}}},"azurerm_mobile_network_site":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_function_ids":{"type":["list","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_slice":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"single_network_slice_selection_assistance_information":{"nesting_mode":3,"block":{"attributes":{"slice_differentiator":{"type":"string","optional":true},"slice_service_type":{"type":"number","required":true}}},"required":true}}}},"azurerm_mongo_cluster":{"block":{"attributes":{"administrator_password":{"type":"string","optional":true,"required_with":["administrator_username"]},"administrator_username":{"type":"string","optional":true,"required_with":["administrator_password"]},"compute_tier":{"type":"string","optional":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"high_availability_mode":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"preview_features":{"type":["list","string"],"optional":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"shard_count":{"type":"number","optional":true},"source_location":{"type":"string","optional":true,"required_with":["source_server_id"]},"source_server_id":{"type":"string","optional":true},"storage_size_in_gb":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true}}}},"azurerm_monitor_aad_diagnostic_setting":{"block":{"attributes":{"eventhub_authorization_rule_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]},"eventhub_name":{"type":"string","optional":true},"log_analytics_workspace_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]}},"block_types":{"enabled_log":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","required":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":0},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_action_group":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true,"default":"global"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"short_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"arm_role_receiver":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"role_id":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"automation_runbook_receiver":{"nesting_mode":3,"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"is_global_runbook":{"type":"bool","required":true},"name":{"type":"string","required":true},"runbook_name":{"type":"string","required":true},"service_uri":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true,"default":false},"webhook_resource_id":{"type":"string","required":true}}},"optional":true},"azure_app_push_receiver":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"azure_function_receiver":{"nesting_mode":3,"block":{"attributes":{"function_app_resource_id":{"type":"string","required":true},"function_name":{"type":"string","required":true},"http_trigger_url":{"type":"string","required":true},"name":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"email_receiver":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"name":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"event_hub_receiver":{"nesting_mode":3,"block":{"attributes":{"event_hub_name":{"type":"string","required":true},"event_hub_namespace":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true},"tenant_id":{"type":"string","optional":true,"computed":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"itsm_receiver":{"nesting_mode":3,"block":{"attributes":{"connection_id":{"type":"string","required":true},"name":{"type":"string","required":true},"region":{"type":"string","required":true},"ticket_configuration":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}},"optional":true},"logic_app_receiver":{"nesting_mode":3,"block":{"attributes":{"callback_url":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_id":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"sms_receiver":{"nesting_mode":3,"block":{"attributes":{"country_code":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"optional":true},"voice_receiver":{"nesting_mode":3,"block":{"attributes":{"country_code":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"optional":true},"webhook_receiver":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"service_uri":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}},"block_types":{"aad_auth":{"nesting_mode":3,"block":{"attributes":{"identifier_uri":{"type":"string","optional":true,"computed":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_activity_log_alert":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["set","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"webhook_properties":{"type":["map","string"],"optional":true}}},"optional":true},"criteria":{"nesting_mode":3,"block":{"attributes":{"caller":{"type":"string","optional":true},"category":{"type":"string","required":true},"level":{"type":"string","optional":true,"conflicts_with":["criteria.0.levels"]},"levels":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.level"]},"operation_name":{"type":"string","optional":true},"recommendation_category":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_type"]},"recommendation_impact":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_type"]},"recommendation_type":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_category","criteria.0.recommendation_impact"]},"resource_group":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_groups"]},"resource_groups":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_group"]},"resource_id":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_ids"]},"resource_ids":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_id"]},"resource_provider":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_providers"]},"resource_providers":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_provider"]},"resource_type":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_types"]},"resource_types":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_type"]},"status":{"type":"string","optional":true,"conflicts_with":["criteria.0.statuses"]},"statuses":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.status"]},"sub_status":{"type":"string","optional":true,"conflicts_with":["criteria.0.sub_statuses"]},"sub_statuses":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.sub_status"]}},"block_types":{"resource_health":{"nesting_mode":3,"block":{"attributes":{"current":{"type":["set","string"],"optional":true},"previous":{"type":["set","string"],"optional":true},"reason":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["criteria.0.caller","criteria.0.service_health"]},"service_health":{"nesting_mode":3,"block":{"attributes":{"events":{"type":["set","string"],"optional":true},"locations":{"type":["set","string"],"optional":true},"services":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["criteria.0.caller","criteria.0.resource_health"]}}},"required":true}}}},"azurerm_monitor_alert_processing_rule_action_group":{"block":{"attributes":{"add_action_group_ids":{"type":["list","string"],"required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"block_types":{"alert_context":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_id":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_name":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"description":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_condition":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_service":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"severity":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"signal_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_group":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"effective_from":{"type":"string","optional":true},"effective_until":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"block_types":{"daily":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true},"monthly":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true},"weekly":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_alert_processing_rule_suppression":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"block_types":{"alert_context":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_id":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_name":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"description":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_condition":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_service":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"severity":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"signal_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_group":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"effective_from":{"type":"string","optional":true},"effective_until":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"block_types":{"daily":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true},"monthly":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true},"weekly":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_alert_prometheus_rule_group":{"block":{"attributes":{"cluster_name":{"type":"string","optional":true},"description":{"type":"string","optional":true},"interval":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"rule_group_enabled":{"type":"bool","optional":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"alert":{"type":"string","optional":true},"annotations":{"type":["map","string"],"optional":true},"enabled":{"type":"bool","optional":true},"expression":{"type":"string","required":true},"for":{"type":"string","optional":true},"labels":{"type":["map","string"],"optional":true},"record":{"type":"string","optional":true},"severity":{"type":"number","optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"action_properties":{"type":["map","string"],"optional":true}}},"optional":true},"alert_resolution":{"nesting_mode":3,"block":{"attributes":{"auto_resolved":{"type":"bool","optional":true},"time_to_resolve":{"type":"string","optional":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_autoscale_setting":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"notification":{"nesting_mode":3,"block":{"block_types":{"email":{"nesting_mode":3,"block":{"attributes":{"custom_emails":{"type":["list","string"],"optional":true},"send_to_subscription_administrator":{"type":"bool","optional":true,"default":false},"send_to_subscription_co_administrator":{"type":"bool","optional":true,"default":false}}},"optional":true,"at_least_one_of":["notification.0.email","notification.0.webhook"]},"webhook":{"nesting_mode":3,"block":{"attributes":{"properties":{"type":["map","string"],"optional":true},"service_uri":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["notification.0.email","notification.0.webhook"]}}},"optional":true},"predictive":{"nesting_mode":3,"block":{"attributes":{"look_ahead_time":{"type":"string","optional":true},"scale_mode":{"type":"string","required":true}}},"optional":true},"profile":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"default":{"type":"number","required":true},"maximum":{"type":"number","required":true},"minimum":{"type":"number","required":true}}},"required":true},"fixed_date":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}}},"optional":true},"recurrence":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"hours":{"type":["list","number"],"required":true},"minutes":{"type":["list","number"],"required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}}},"optional":true},"rule":{"nesting_mode":3,"block":{"block_types":{"metric_trigger":{"nesting_mode":3,"block":{"attributes":{"divide_by_instance_count":{"type":"bool","optional":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","optional":true},"metric_resource_id":{"type":"string","required":true},"operator":{"type":"string","required":true},"statistic":{"type":"string","required":true},"threshold":{"type":"number","required":true},"time_aggregation":{"type":"string","required":true},"time_grain":{"type":"string","required":true},"time_window":{"type":"string","required":true}},"block_types":{"dimensions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"required":true},"scale_action":{"nesting_mode":3,"block":{"attributes":{"cooldown":{"type":"string","required":true},"direction":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"number","required":true}}},"required":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_data_collection_endpoint":{"block":{"attributes":{"configuration_access_endpoint":{"type":"string","computed":true},"description":{"type":"string","optional":true},"immutable_id":{"type":"string","computed":true},"kind":{"type":"string","optional":true},"location":{"type":"string","required":true},"logs_ingestion_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_monitor_data_collection_rule":{"block":{"attributes":{"data_collection_endpoint_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"immutable_id":{"type":"string","computed":true},"kind":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"data_flow":{"nesting_mode":3,"block":{"attributes":{"built_in_transform":{"type":"string","optional":true},"destinations":{"type":["list","string"],"required":true},"output_stream":{"type":"string","optional":true},"streams":{"type":["list","string"],"required":true},"transform_kql":{"type":"string","optional":true}}},"required":true},"data_sources":{"nesting_mode":3,"block":{"block_types":{"data_import":{"nesting_mode":3,"block":{"block_types":{"event_hub_data_source":{"nesting_mode":3,"block":{"attributes":{"consumer_group":{"type":"string","optional":true},"name":{"type":"string","required":true},"stream":{"type":"string","required":true}}},"required":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"extension_json":{"type":"string","optional":true},"extension_name":{"type":"string","required":true},"input_data_sources":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"iis_log":{"nesting_mode":3,"block":{"attributes":{"log_directories":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"log_file":{"nesting_mode":3,"block":{"attributes":{"file_patterns":{"type":["list","string"],"required":true},"format":{"type":"string","required":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}},"block_types":{"settings":{"nesting_mode":3,"block":{"block_types":{"text":{"nesting_mode":3,"block":{"attributes":{"record_start_timestamp_format":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"performance_counter":{"nesting_mode":3,"block":{"attributes":{"counter_specifiers":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"sampling_frequency_in_seconds":{"type":"number","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"platform_telemetry":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"prometheus_forwarder":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}},"block_types":{"label_include_filter":{"nesting_mode":4,"block":{"attributes":{"label":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"syslog":{"nesting_mode":3,"block":{"attributes":{"facility_names":{"type":["list","string"],"required":true},"log_levels":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"windows_event_log":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true},"x_path_queries":{"type":["list","string"],"required":true}}},"optional":true},"windows_firewall_log":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"destinations":{"nesting_mode":3,"block":{"block_types":{"azure_monitor_metrics":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"event_hub":{"nesting_mode":3,"block":{"attributes":{"event_hub_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"event_hub_direct":{"nesting_mode":3,"block":{"attributes":{"event_hub_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"log_analytics":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"monitor_account":{"nesting_mode":3,"block":{"attributes":{"monitor_account_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_blob":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_blob_direct":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_table_direct":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"table_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"stream_declaration":{"nesting_mode":4,"block":{"attributes":{"stream_name":{"type":"string","required":true}},"block_types":{"column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_monitor_data_collection_rule_association":{"block":{"attributes":{"data_collection_endpoint_id":{"type":"string","optional":true,"exactly_one_of":["data_collection_endpoint_id","data_collection_rule_id"]},"data_collection_rule_id":{"type":"string","optional":true,"exactly_one_of":["data_collection_endpoint_id","data_collection_rule_id"],"required_with":["name"]},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true,"default":"configurationAccessEndpoint"},"target_resource_id":{"type":"string","required":true}}}},"azurerm_monitor_diagnostic_setting":{"block":{"attributes":{"eventhub_authorization_rule_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"eventhub_name":{"type":"string","optional":true},"log_analytics_destination_type":{"type":"string","optional":true,"computed":true},"log_analytics_workspace_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"name":{"type":"string","required":true},"partner_solution_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"target_resource_id":{"type":"string","required":true}},"block_types":{"enabled_log":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","optional":true},"category_group":{"type":"string","optional":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["enabled_log","metric"]},"metric":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["enabled_log","metric"]}}}},"azurerm_monitor_metric_alert":{"block":{"attributes":{"auto_mitigate":{"type":"bool","optional":true,"default":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"string","optional":true,"default":"PT1M"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["set","string"],"required":true},"severity":{"type":"number","optional":true,"default":3},"tags":{"type":["map","string"],"optional":true},"target_resource_location":{"type":"string","optional":true,"computed":true},"target_resource_type":{"type":"string","optional":true,"computed":true},"window_size":{"type":"string","optional":true,"default":"PT5M"}},"block_types":{"action":{"nesting_mode":4,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"webhook_properties":{"type":["map","string"],"optional":true}}},"optional":true},"application_insights_web_test_location_availability_criteria":{"nesting_mode":3,"block":{"attributes":{"component_id":{"type":"string","required":true},"failed_location_count":{"type":"number","required":true},"web_test_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]},"criteria":{"nesting_mode":3,"block":{"attributes":{"aggregation":{"type":"string","required":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","required":true},"operator":{"type":"string","required":true},"skip_metric_validation":{"type":"bool","optional":true,"default":false},"threshold":{"type":"number","required":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]},"dynamic_criteria":{"nesting_mode":3,"block":{"attributes":{"aggregation":{"type":"string","required":true},"alert_sensitivity":{"type":"string","required":true},"evaluation_failure_count":{"type":"number","optional":true,"default":4},"evaluation_total_count":{"type":"number","optional":true,"default":4},"ignore_data_before":{"type":"string","optional":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","required":true},"operator":{"type":"string","required":true},"skip_metric_validation":{"type":"bool","optional":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]}}}},"azurerm_monitor_private_link_scope":{"block":{"attributes":{"ingestion_access_mode":{"type":"string","optional":true,"default":"Open"},"name":{"type":"string","required":true},"query_access_mode":{"type":"string","optional":true,"default":"Open"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_monitor_private_link_scoped_service":{"block":{"attributes":{"linked_resource_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_name":{"type":"string","required":true}}}},"azurerm_monitor_scheduled_query_rules_alert":{"block":{"attributes":{"authorized_resource_ids":{"type":["set","string"],"optional":true},"auto_mitigation_enabled":{"type":"bool","optional":true,"default":false,"conflicts_with":["throttling"]},"data_source_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"query_type":{"type":"string","optional":true,"default":"ResultCount"},"resource_group_name":{"type":"string","required":true},"severity":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"throttling":{"type":"number","optional":true,"conflicts_with":["auto_mitigation_enabled"]},"time_window":{"type":"number","required":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group":{"type":["set","string"],"required":true},"custom_webhook_payload":{"type":"string","optional":true},"email_subject":{"type":"string","optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true}},"block_types":{"metric_trigger":{"nesting_mode":3,"block":{"attributes":{"metric_column":{"type":"string","optional":true},"metric_trigger_type":{"type":"string","required":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_scheduled_query_rules_alert_v2":{"block":{"attributes":{"auto_mitigation_enabled":{"type":"bool","optional":true,"default":false},"created_with_api_version":{"type":"string","computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"evaluation_frequency":{"type":"string","required":true},"is_a_legacy_log_analytics_rule":{"type":"bool","computed":true},"is_workspace_alerts_storage_configured":{"type":"bool","computed":true},"location":{"type":"string","required":true},"mute_actions_after_alert_duration":{"type":"string","optional":true},"name":{"type":"string","required":true},"query_time_range_override":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"severity":{"type":"number","required":true},"skip_query_validation":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"target_resource_types":{"type":["list","string"],"optional":true},"window_duration":{"type":"string","required":true},"workspace_alerts_storage_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_groups":{"type":["list","string"],"optional":true},"custom_properties":{"type":["map","string"],"optional":true}}},"optional":true},"criteria":{"nesting_mode":3,"block":{"attributes":{"metric_measure_column":{"type":"string","optional":true},"operator":{"type":"string","required":true},"query":{"type":"string","required":true},"resource_id_column":{"type":"string","optional":true},"threshold":{"type":"number","required":true},"time_aggregation_method":{"type":"string","required":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true},"failing_periods":{"nesting_mode":3,"block":{"attributes":{"minimum_failing_periods_to_trigger_alert":{"type":"number","required":true},"number_of_evaluation_periods":{"type":"number","required":true}}},"optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_monitor_scheduled_query_rules_log":{"block":{"attributes":{"authorized_resource_ids":{"type":["set","string"],"optional":true},"data_source_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"metric_name":{"type":"string","required":true}},"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"Include"},"values":{"type":["list","string"],"required":true}}},"required":true}}},"required":true}}}},"azurerm_monitor_smart_detector_alert_rule":{"block":{"attributes":{"description":{"type":"string","optional":true},"detector_type":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_resource_ids":{"type":["set","string"],"required":true},"severity":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throttling_duration":{"type":"string","optional":true}},"block_types":{"action_group":{"nesting_mode":3,"block":{"attributes":{"email_subject":{"type":"string","optional":true},"ids":{"type":["set","string"],"required":true},"webhook_payload":{"type":"string","optional":true}}},"required":true}}}},"azurerm_monitor_workspace":{"block":{"attributes":{"default_data_collection_endpoint_id":{"type":"string","computed":true},"default_data_collection_rule_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"query_endpoint":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mssql_database":{"block":{"attributes":{"auto_pause_delay_in_minutes":{"type":"number","optional":true,"computed":true},"collation":{"type":"string","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default","conflicts_with":["import"]},"creation_source_database_id":{"type":"string","optional":true,"computed":true},"elastic_pool_id":{"type":"string","optional":true},"enclave_type":{"type":"string","optional":true,"computed":true},"geo_backup_enabled":{"type":"bool","optional":true,"default":true},"ledger_enabled":{"type":"bool","optional":true,"computed":true},"license_type":{"type":"string","optional":true,"computed":true},"maintenance_configuration_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["elastic_pool_id"]},"max_size_gb":{"type":"number","optional":true,"computed":true},"min_capacity":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"read_replica_count":{"type":"number","optional":true,"computed":true},"read_scale":{"type":"bool","optional":true,"computed":true},"recover_database_id":{"type":"string","optional":true},"recovery_point_id":{"type":"string","optional":true},"restore_dropped_database_id":{"type":"string","optional":true},"restore_long_term_retention_backup_id":{"type":"string","optional":true},"restore_point_in_time":{"type":"string","optional":true,"computed":true},"sample_name":{"type":"string","optional":true,"computed":true},"secondary_type":{"type":"string","optional":true,"computed":true},"server_id":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"storage_account_type":{"type":"string","optional":true,"default":"Geo"},"tags":{"type":["map","string"],"optional":true},"transparent_data_encryption_enabled":{"type":"bool","optional":true,"default":true},"transparent_data_encryption_key_automatic_rotation_enabled":{"type":"bool","optional":true,"default":false,"required_with":["transparent_data_encryption_key_vault_key_id"]},"transparent_data_encryption_key_vault_key_id":{"type":"string","optional":true},"zone_redundant":{"type":"bool","optional":true,"computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"import":{"nesting_mode":3,"block":{"attributes":{"administrator_login":{"type":"string","required":true},"administrator_login_password":{"type":"string","required":true},"authentication_type":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true},"storage_key":{"type":"string","required":true},"storage_key_type":{"type":"string","required":true},"storage_uri":{"type":"string","required":true}}},"optional":true,"conflicts_with":["create_mode"]},"long_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"immutable_backups_enabled":{"type":"bool","optional":true,"default":false},"monthly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"week_of_year":{"type":"number","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"weekly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"yearly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]}}},"optional":true,"computed":true},"short_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"backup_interval_in_hours":{"type":"number","optional":true,"computed":true},"retention_days":{"type":"number","required":true}}},"optional":true,"computed":true},"threat_detection_policy":{"nesting_mode":3,"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins":{"type":"string","optional":true,"default":"Disabled"},"email_addresses":{"type":["set","string"],"optional":true},"retention_days":{"type":"number","optional":true},"state":{"type":"string","optional":true,"default":"Disabled"},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_mssql_database_extended_auditing_policy":{"block":{"attributes":{"database_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_database_vulnerability_assessment_rule_baseline":{"block":{"attributes":{"baseline_name":{"type":"string","optional":true,"default":"default"},"database_name":{"type":"string","required":true},"rule_id":{"type":"string","required":true},"server_vulnerability_assessment_id":{"type":"string","required":true}},"block_types":{"baseline_result":{"nesting_mode":4,"block":{"attributes":{"result":{"type":["list","string"],"required":true}}},"required":true}}}},"azurerm_mssql_elasticpool":{"block":{"attributes":{"enclave_type":{"type":"string","optional":true,"computed":true},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"maintenance_configuration_name":{"type":"string","optional":true,"default":"SQL_Default"},"max_size_bytes":{"type":"number","optional":true,"computed":true,"conflicts_with":["max_size_gb"]},"max_size_gb":{"type":"number","optional":true,"computed":true,"conflicts_with":["max_size_bytes"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true}},"block_types":{"per_database_settings":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","required":true},"min_capacity":{"type":"number","required":true}}},"required":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"family":{"type":"string","optional":true},"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_failover_group":{"block":{"attributes":{"databases":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"readonly_endpoint_failover_policy_enabled":{"type":"bool","optional":true,"computed":true},"server_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"partner_server":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"location":{"type":"string","computed":true},"role":{"type":"string","computed":true}}},"required":true},"read_write_endpoint_failover_policy":{"nesting_mode":3,"block":{"attributes":{"grace_minutes":{"type":"number","optional":true},"mode":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_mssql_job":{"block":{"attributes":{"description":{"type":"string","optional":true},"job_agent_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_mssql_job_agent":{"block":{"attributes":{"database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mssql_job_credential":{"block":{"attributes":{"job_agent_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_mssql_job_schedule":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"computed":true},"end_time":{"type":"string","optional":true,"computed":true},"interval":{"type":"string","optional":true},"job_id":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"type":{"type":"string","required":true}}}},"azurerm_mssql_job_step":{"block":{"attributes":{"initial_retry_interval_seconds":{"type":"number","optional":true,"default":1},"job_credential_id":{"type":"string","required":true},"job_id":{"type":"string","required":true},"job_step_index":{"type":"number","required":true},"job_target_group_id":{"type":"string","required":true},"maximum_retry_interval_seconds":{"type":"number","optional":true,"default":120},"name":{"type":"string","required":true},"retry_attempts":{"type":"number","optional":true,"default":10},"retry_interval_backoff_multiplier":{"type":"number","optional":true,"default":2},"sql_script":{"type":"string","required":true},"timeout_seconds":{"type":"number","optional":true,"default":43200}},"block_types":{"output_target":{"nesting_mode":3,"block":{"attributes":{"job_credential_id":{"type":"string","required":true},"mssql_database_id":{"type":"string","required":true},"schema_name":{"type":"string","optional":true,"default":"dbo"},"table_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_job_target_group":{"block":{"attributes":{"job_agent_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"job_target":{"nesting_mode":4,"block":{"attributes":{"database_name":{"type":"string","optional":true},"elastic_pool_name":{"type":"string","optional":true},"job_credential_id":{"type":"string","optional":true},"membership_type":{"type":"string","optional":true,"default":"Include"},"server_name":{"type":"string","required":true},"type":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_mssql_managed_database":{"block":{"attributes":{"managed_instance_id":{"type":"string","required":true},"name":{"type":"string","required":true},"short_term_retention_days":{"type":"number","optional":true,"default":7},"tags":{"type":["map","string"],"optional":true}},"block_types":{"long_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"immutable_backups_enabled":{"type":"bool","optional":true,"default":false},"monthly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"week_of_year":{"type":"number","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"weekly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"yearly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]}}},"optional":true,"computed":true},"point_in_time_restore":{"nesting_mode":3,"block":{"attributes":{"restore_point_in_time":{"type":"string","required":true},"source_database_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_managed_instance":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"at_least_one_of":["administrator_login","azure_active_directory_administrator"],"required_with":["administrator_login","administrator_login_password"]},"administrator_login_password":{"type":"string","optional":true,"at_least_one_of":["administrator_login_password","azure_active_directory_administrator"],"required_with":["administrator_login","administrator_login_password"]},"collation":{"type":"string","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS"},"dns_zone":{"type":"string","computed":true},"dns_zone_partner_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"license_type":{"type":"string","required":true},"location":{"type":"string","required":true},"maintenance_configuration_name":{"type":"string","optional":true,"default":"SQL_Default"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"proxy_override":{"type":"string","optional":true,"default":"Default"},"public_data_endpoint_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"service_principal_type":{"type":"string","optional":true},"sku_name":{"type":"string","required":true},"storage_account_type":{"type":"string","optional":true,"default":"GRS"},"storage_size_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timezone_id":{"type":"string","optional":true,"default":"UTC"},"vcores":{"type":"number","required":true},"zone_redundant_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"azure_active_directory_administrator":{"nesting_mode":3,"block":{"attributes":{"azuread_authentication_only_enabled":{"type":"bool","optional":true,"default":false},"login_username":{"type":"string","required":true},"object_id":{"type":"string","required":true},"principal_type":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_managed_instance_active_directory_administrator":{"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true},"login_username":{"type":"string","required":true},"managed_instance_id":{"type":"string","required":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_mssql_managed_instance_failover_group":{"block":{"attributes":{"location":{"type":"string","required":true},"managed_instance_id":{"type":"string","required":true},"name":{"type":"string","required":true},"partner_managed_instance_id":{"type":"string","required":true},"partner_region":{"type":["list",["object",{"location":"string","role":"string"}]],"computed":true},"readonly_endpoint_failover_policy_enabled":{"type":"bool","optional":true,"default":true},"role":{"type":"string","computed":true},"secondary_type":{"type":"string","optional":true,"default":"Geo"}},"block_types":{"read_write_endpoint_failover_policy":{"nesting_mode":3,"block":{"attributes":{"grace_minutes":{"type":"number","optional":true},"mode":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_managed_instance_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true},"managed_instance_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_managed_instance_transparent_data_encryption":{"block":{"attributes":{"auto_rotation_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true,"conflicts_with":["managed_hsm_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"conflicts_with":["key_vault_key_id"]},"managed_instance_id":{"type":"string","required":true}}}},"azurerm_mssql_managed_instance_vulnerability_assessment":{"block":{"attributes":{"managed_instance_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_mssql_outbound_firewall_rule":{"block":{"attributes":{"name":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_mssql_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true,"at_least_one_of":["administrator_login","azuread_administrator.0.azuread_authentication_only"],"required_with":["administrator_login","administrator_login_password"]},"administrator_login_password":{"type":"string","optional":true,"at_least_one_of":["administrator_login_password","azuread_administrator.0.azuread_authentication_only"],"required_with":["administrator_login","administrator_login_password"]},"connection_policy":{"type":"string","optional":true,"default":"Default"},"fully_qualified_domain_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"outbound_network_restriction_enabled":{"type":"bool","optional":true,"default":false},"primary_user_assigned_identity_id":{"type":"string","optional":true,"computed":true,"required_with":["identity"]},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"restorable_dropped_database_ids":{"type":["list","string"],"computed":true},"tags":{"type":["map","string"],"optional":true},"transparent_data_encryption_key_vault_key_id":{"type":"string","optional":true},"version":{"type":"string","required":true}},"block_types":{"azuread_administrator":{"nesting_mode":3,"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true,"computed":true},"login_username":{"type":"string","required":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_server_dns_alias":{"block":{"attributes":{"dns_record":{"type":"string","computed":true},"mssql_server_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_mssql_server_extended_auditing_policy":{"block":{"attributes":{"audit_actions_and_groups":{"type":["list","string"],"optional":true,"computed":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"predicate_expression":{"type":"string","optional":true},"retention_in_days":{"type":"number","optional":true,"default":0},"server_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_account_subscription_id":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_server_microsoft_support_auditing_policy":{"block":{"attributes":{"blob_storage_endpoint":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"server_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_subscription_id":{"type":"string","optional":true}}}},"azurerm_mssql_server_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"server_name":{"type":"string","required":true},"state":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_server_transparent_data_encryption":{"block":{"attributes":{"auto_rotation_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true,"conflicts_with":["managed_hsm_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"conflicts_with":["key_vault_key_id"]},"server_id":{"type":"string","required":true}}}},"azurerm_mssql_server_vulnerability_assessment":{"block":{"attributes":{"server_security_alert_policy_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins":{"type":"bool","optional":true,"default":false},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_mssql_virtual_machine":{"block":{"attributes":{"r_services_enabled":{"type":"bool","optional":true},"sql_connectivity_port":{"type":"number","optional":true,"default":1433},"sql_connectivity_type":{"type":"string","optional":true,"default":"PRIVATE"},"sql_connectivity_update_password":{"type":"string","optional":true},"sql_connectivity_update_username":{"type":"string","optional":true},"sql_license_type":{"type":"string","optional":true},"sql_virtual_machine_group_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"assessment":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"run_immediately":{"type":"bool","optional":true,"default":false}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"monthly_occurrence":{"type":"number","optional":true,"exactly_one_of":["assessment.0.schedule.0.weekly_interval"]},"start_time":{"type":"string","required":true},"weekly_interval":{"type":"number","optional":true,"exactly_one_of":["assessment.0.schedule.0.monthly_occurrence"]}}},"optional":true}}},"optional":true},"auto_backup":{"nesting_mode":3,"block":{"attributes":{"encryption_enabled":{"type":"bool","optional":true,"computed":true},"encryption_password":{"type":"string","optional":true},"retention_period_in_days":{"type":"number","required":true},"storage_account_access_key":{"type":"string","required":true},"storage_blob_endpoint":{"type":"string","required":true},"system_databases_backup_enabled":{"type":"bool","optional":true}},"block_types":{"manual_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"optional":true},"full_backup_frequency":{"type":"string","required":true},"full_backup_start_hour":{"type":"number","required":true},"full_backup_window_in_hours":{"type":"number","required":true},"log_backup_frequency_in_minutes":{"type":"number","required":true}}},"optional":true}}},"optional":true},"auto_patching":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"maintenance_window_duration_in_minutes":{"type":"number","required":true},"maintenance_window_starting_hour":{"type":"number","required":true}}},"optional":true},"key_vault_credential":{"nesting_mode":3,"block":{"attributes":{"key_vault_url":{"type":"string","required":true},"name":{"type":"string","required":true},"service_principal_name":{"type":"string","required":true},"service_principal_secret":{"type":"string","required":true}}},"optional":true},"sql_instance":{"nesting_mode":3,"block":{"attributes":{"adhoc_workloads_optimization_enabled":{"type":"bool","optional":true,"default":false},"collation":{"type":"string","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS"},"instant_file_initialization_enabled":{"type":"bool","optional":true,"default":false},"lock_pages_in_memory_enabled":{"type":"bool","optional":true,"default":false},"max_dop":{"type":"number","optional":true,"default":0},"max_server_memory_mb":{"type":"number","optional":true,"default":2147483647},"min_server_memory_mb":{"type":"number","optional":true,"default":0}}},"optional":true},"storage_configuration":{"nesting_mode":3,"block":{"attributes":{"disk_type":{"type":"string","required":true},"storage_workload_type":{"type":"string","required":true},"system_db_on_data_disk_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"data_settings":{"nesting_mode":3,"block":{"attributes":{"default_file_path":{"type":"string","required":true},"luns":{"type":["list","number"],"required":true}}},"optional":true},"log_settings":{"nesting_mode":3,"block":{"attributes":{"default_file_path":{"type":"string","required":true},"luns":{"type":["list","number"],"required":true}}},"optional":true},"temp_db_settings":{"nesting_mode":3,"block":{"attributes":{"data_file_count":{"type":"number","optional":true,"default":8},"data_file_growth_in_mb":{"type":"number","optional":true,"default":512},"data_file_size_mb":{"type":"number","optional":true,"default":256},"default_file_path":{"type":"string","required":true},"log_file_growth_mb":{"type":"number","optional":true,"default":512},"log_file_size_mb":{"type":"number","optional":true,"default":256},"luns":{"type":["list","number"],"required":true}}},"optional":true}}},"optional":true},"wsfc_domain_credential":{"nesting_mode":3,"block":{"attributes":{"cluster_bootstrap_account_password":{"type":"string","required":true},"cluster_operator_account_password":{"type":"string","required":true},"sql_service_account_password":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_virtual_machine_availability_group_listener":{"block":{"attributes":{"availability_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"port":{"type":"number","optional":true},"sql_virtual_machine_group_id":{"type":"string","required":true}},"block_types":{"load_balancer_configuration":{"nesting_mode":3,"block":{"attributes":{"load_balancer_id":{"type":"string","required":true},"private_ip_address":{"type":"string","required":true},"probe_port":{"type":"number","required":true},"sql_virtual_machine_ids":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["load_balancer_configuration","multi_subnet_ip_configuration"]},"multi_subnet_ip_configuration":{"nesting_mode":4,"block":{"attributes":{"private_ip_address":{"type":"string","required":true},"sql_virtual_machine_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["load_balancer_configuration","multi_subnet_ip_configuration"]},"replica":{"nesting_mode":4,"block":{"attributes":{"commit":{"type":"string","required":true},"failover_mode":{"type":"string","required":true},"readable_secondary":{"type":"string","required":true},"role":{"type":"string","required":true},"sql_virtual_machine_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_virtual_machine_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sql_image_offer":{"type":"string","required":true},"sql_image_sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"wsfc_domain_profile":{"nesting_mode":3,"block":{"attributes":{"cluster_bootstrap_account_name":{"type":"string","optional":true},"cluster_operator_account_name":{"type":"string","optional":true},"cluster_subnet_type":{"type":"string","required":true},"fqdn":{"type":"string","required":true},"organizational_unit_path":{"type":"string","optional":true},"sql_service_account_name":{"type":"string","optional":true},"storage_account_primary_key":{"type":"string","optional":true},"storage_account_url":{"type":"string","optional":true}}},"required":true}}}},"azurerm_mssql_virtual_network_rule":{"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_mysql_flexible_database":{"block":{"attributes":{"charset":{"type":"string","required":true},"collation":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_password":{"type":"string","optional":true},"backup_retention_days":{"type":"number","optional":true,"default":7},"create_mode":{"type":"string","optional":true},"delegated_subnet_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"point_in_time_restore_time_in_utc":{"type":"string","optional":true},"private_dns_zone_id":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","computed":true},"replica_capacity":{"type":"number","computed":true},"replication_role":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"source_server_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"computed":true},"zone":{"type":"string","optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"geo_backup_key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.geo_backup_user_assigned_identity_id"]},"geo_backup_user_assigned_identity_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.primary_user_assigned_identity_id"]},"primary_user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"high_availability":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"standby_availability_zone":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true},"storage":{"nesting_mode":3,"block":{"attributes":{"auto_grow_enabled":{"type":"bool","optional":true,"default":true},"io_scaling_enabled":{"type":"bool","optional":true,"default":false},"iops":{"type":"number","optional":true,"computed":true},"size_gb":{"type":"number","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_mysql_flexible_server_active_directory_administrator":{"block":{"attributes":{"identity_id":{"type":"string","required":true},"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"server_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_nat_gateway":{"block":{"attributes":{"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_guid":{"type":"string","computed":true},"sku_name":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_nat_gateway_public_ip_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true}}}},"azurerm_nat_gateway_public_ip_prefix_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","required":true}}}},"azurerm_netapp_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"aes_encryption_enabled":{"type":"bool","optional":true,"default":false},"dns_servers":{"type":["list","string"],"required":true},"domain":{"type":"string","required":true},"kerberos_ad_name":{"type":"string","optional":true},"kerberos_kdc_ip":{"type":"string","optional":true},"ldap_over_tls_enabled":{"type":"bool","optional":true,"default":false,"required_with":["active_directory.0.server_root_ca_certificate"]},"ldap_signing_enabled":{"type":"bool","optional":true,"default":false},"local_nfs_users_with_ldap_allowed":{"type":"bool","optional":true,"default":false},"organizational_unit":{"type":"string","optional":true,"default":"CN=Computers"},"password":{"type":"string","required":true},"server_root_ca_certificate":{"type":"string","optional":true,"required_with":["active_directory.0.ldap_over_tls_enabled"]},"site_name":{"type":"string","optional":true,"default":"Default-First-Site-Name"},"smb_server_name":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_netapp_account_encryption":{"block":{"attributes":{"encryption_key":{"type":"string","required":true},"netapp_account_id":{"type":"string","required":true},"system_assigned_identity_principal_id":{"type":"string","optional":true,"conflicts_with":["user_assigned_identity_id"]},"user_assigned_identity_id":{"type":"string","optional":true,"conflicts_with":["system_assigned_identity_principal_id"]}}}},"azurerm_netapp_backup_policy":{"block":{"attributes":{"account_name":{"type":"string","required":true},"daily_backups_to_keep":{"type":"number","optional":true,"default":2},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"monthly_backups_to_keep":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"weekly_backups_to_keep":{"type":"number","optional":true,"default":1}}}},"azurerm_netapp_backup_vault":{"block":{"attributes":{"account_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_netapp_pool":{"block":{"attributes":{"account_name":{"type":"string","required":true},"encryption_type":{"type":"string","optional":true,"default":"Single"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"qos_type":{"type":"string","optional":true,"default":"Auto"},"resource_group_name":{"type":"string","required":true},"service_level":{"type":"string","required":true},"size_in_tb":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_netapp_snapshot":{"block":{"attributes":{"account_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"pool_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}}},"azurerm_netapp_snapshot_policy":{"block":{"attributes":{"account_name":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"daily_schedule":{"nesting_mode":3,"block":{"attributes":{"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"hourly_schedule":{"nesting_mode":3,"block":{"attributes":{"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"monthly_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["set","number"],"required":true},"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"weekly_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"required":true},"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true}}}},"azurerm_netapp_volume":{"block":{"attributes":{"account_name":{"type":"string","required":true},"azure_vmware_data_store_enabled":{"type":"bool","optional":true,"default":false},"create_from_snapshot_resource_id":{"type":"string","optional":true},"encryption_key_source":{"type":"string","optional":true,"computed":true},"kerberos_enabled":{"type":"bool","optional":true},"key_vault_private_endpoint_id":{"type":"string","optional":true,"computed":true,"required_with":["encryption_key_source"]},"location":{"type":"string","required":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"network_features":{"type":"string","optional":true,"computed":true},"pool_name":{"type":"string","required":true},"protocols":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"security_style":{"type":"string","optional":true,"computed":true},"service_level":{"type":"string","required":true},"smb3_protocol_encryption_enabled":{"type":"bool","optional":true},"smb_access_based_enumeration_enabled":{"type":"bool","optional":true,"default":false},"smb_continuous_availability_enabled":{"type":"bool","optional":true},"smb_non_browsable_enabled":{"type":"bool","optional":true,"default":false},"snapshot_directory_visible":{"type":"bool","optional":true,"default":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","optional":true,"computed":true},"volume_path":{"type":"string","required":true},"zone":{"type":"string","optional":true}},"block_types":{"data_protection_backup_policy":{"nesting_mode":3,"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"backup_vault_id":{"type":"string","required":true},"policy_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"data_protection_replication":{"nesting_mode":3,"block":{"attributes":{"endpoint_type":{"type":"string","optional":true,"default":"dst"},"remote_volume_location":{"type":"string","required":true},"remote_volume_resource_id":{"type":"string","required":true},"replication_frequency":{"type":"string","required":true}}},"optional":true},"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":["set","string"],"required":true},"kerberos_5_read_only_enabled":{"type":"bool","optional":true},"kerberos_5_read_write_enabled":{"type":"bool","optional":true},"kerberos_5i_read_only_enabled":{"type":"bool","optional":true},"kerberos_5i_read_write_enabled":{"type":"bool","optional":true},"kerberos_5p_read_only_enabled":{"type":"bool","optional":true},"kerberos_5p_read_write_enabled":{"type":"bool","optional":true},"protocols_enabled":{"type":["list","string"],"optional":true},"root_access_enabled":{"type":"bool","optional":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true},"unix_read_write":{"type":"bool","optional":true}}},"optional":true}}}},"azurerm_netapp_volume_group_oracle":{"block":{"attributes":{"account_name":{"type":"string","required":true},"application_identifier":{"type":"string","required":true},"group_description":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"volume":{"nesting_mode":3,"block":{"attributes":{"capacity_pool_id":{"type":"string","required":true},"encryption_key_source":{"type":"string","optional":true,"computed":true},"id":{"type":"string","computed":true},"key_vault_private_endpoint_id":{"type":"string","optional":true,"computed":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"network_features":{"type":"string","optional":true,"computed":true},"protocols":{"type":["list","string"],"required":true},"proximity_placement_group_id":{"type":"string","optional":true},"security_style":{"type":"string","required":true},"service_level":{"type":"string","required":true},"snapshot_directory_visible":{"type":"bool","required":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","required":true},"volume_path":{"type":"string","required":true},"volume_spec_name":{"type":"string","required":true},"zone":{"type":"string","optional":true}},"block_types":{"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true,"computed":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","required":true},"nfsv41_enabled":{"type":"bool","required":true},"root_access_enabled":{"type":"bool","optional":true,"default":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true,"default":false},"unix_read_write":{"type":"bool","optional":true,"default":true}}},"required":true}}},"required":true}}}},"azurerm_netapp_volume_group_sap_hana":{"block":{"attributes":{"account_name":{"type":"string","required":true},"application_identifier":{"type":"string","required":true},"group_description":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"volume":{"nesting_mode":3,"block":{"attributes":{"capacity_pool_id":{"type":"string","required":true},"id":{"type":"string","computed":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"proximity_placement_group_id":{"type":"string","optional":true},"security_style":{"type":"string","required":true},"service_level":{"type":"string","required":true},"snapshot_directory_visible":{"type":"bool","required":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","required":true},"volume_path":{"type":"string","required":true},"volume_spec_name":{"type":"string","required":true}},"block_types":{"data_protection_replication":{"nesting_mode":3,"block":{"attributes":{"endpoint_type":{"type":"string","optional":true,"default":"dst"},"remote_volume_location":{"type":"string","required":true},"remote_volume_resource_id":{"type":"string","required":true},"replication_frequency":{"type":"string","required":true}}},"optional":true},"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true,"computed":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","required":true},"nfsv41_enabled":{"type":"bool","required":true},"root_access_enabled":{"type":"bool","optional":true,"default":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true,"default":false},"unix_read_write":{"type":"bool","optional":true,"default":true}}},"required":true}}},"required":true}}}},"azurerm_netapp_volume_quota_rule":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"quota_size_in_kib":{"type":"number","required":true},"quota_target":{"type":"string","optional":true},"quota_type":{"type":"string","required":true},"volume_id":{"type":"string","required":true}}}},"azurerm_network_connection_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"notes":{"type":"string","optional":true},"output_workspace_resource_ids":{"type":["set","string"],"optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"endpoint":{"nesting_mode":4,"block":{"attributes":{"address":{"type":"string","optional":true},"coverage_level":{"type":"string","optional":true},"excluded_ip_addresses":{"type":["set","string"],"optional":true},"included_ip_addresses":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","optional":true},"target_resource_type":{"type":"string","optional":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"Include"}},"block_types":{"item":{"nesting_mode":4,"block":{"attributes":{"address":{"type":"string","optional":true},"type":{"type":"string","optional":true,"default":"AgentAddress"}}},"optional":true}}},"optional":true}}},"required":true},"test_configuration":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"preferred_ip_version":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"test_frequency_in_seconds":{"type":"number","optional":true,"default":60}},"block_types":{"http_configuration":{"nesting_mode":3,"block":{"attributes":{"method":{"type":"string","optional":true,"default":"Get"},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"prefer_https":{"type":"bool","optional":true,"default":false},"valid_status_code_ranges":{"type":["set","string"],"optional":true}},"block_types":{"request_header":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"icmp_configuration":{"nesting_mode":3,"block":{"attributes":{"trace_route_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"success_threshold":{"nesting_mode":3,"block":{"attributes":{"checks_failed_percent":{"type":"number","optional":true},"round_trip_time_ms":{"type":"number","optional":true}}},"optional":true},"tcp_configuration":{"nesting_mode":3,"block":{"attributes":{"destination_port_behavior":{"type":"string","optional":true},"port":{"type":"number","required":true},"trace_route_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}},"required":true},"test_group":{"nesting_mode":4,"block":{"attributes":{"destination_endpoints":{"type":["set","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"source_endpoints":{"type":["set","string"],"required":true},"test_configuration_names":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_network_ddos_protection_plan":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_ids":{"type":["list","string"],"computed":true}}}},"azurerm_network_function_azure_traffic_collector":{"block":{"attributes":{"collector_policy_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":["list","string"],"computed":true}}}},"azurerm_network_function_collector_policy":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"traffic_collector_id":{"type":"string","required":true}},"block_types":{"ipfx_emission":{"nesting_mode":3,"block":{"attributes":{"destination_types":{"type":["list","string"],"required":true}}},"required":true},"ipfx_ingestion":{"nesting_mode":3,"block":{"attributes":{"source_resource_ids":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_network_interface":{"block":{"attributes":{"accelerated_networking_enabled":{"type":"bool","optional":true,"default":false},"applied_dns_servers":{"type":["list","string"],"computed":true},"auxiliary_mode":{"type":"string","optional":true,"required_with":["auxiliary_sku"]},"auxiliary_sku":{"type":"string","optional":true,"required_with":["auxiliary_mode"]},"dns_servers":{"type":["list","string"],"optional":true},"edge_zone":{"type":"string","optional":true},"internal_dns_name_label":{"type":"string","optional":true},"internal_domain_name_suffix":{"type":"string","computed":true},"ip_forwarding_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"mac_address":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","computed":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"computed":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","required":true},"private_ip_address_version":{"type":"string","optional":true,"default":"IPv4"},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}}},"azurerm_network_interface_application_gateway_backend_address_pool_association":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","required":true},"ip_configuration_name":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_application_security_group_association":{"block":{"attributes":{"application_security_group_id":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_backend_address_pool_association":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","required":true},"ip_configuration_name":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_nat_rule_association":{"block":{"attributes":{"ip_configuration_name":{"type":"string","required":true},"nat_rule_id":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_security_group_association":{"block":{"attributes":{"network_interface_id":{"type":"string","required":true},"network_security_group_id":{"type":"string","required":true}}}},"azurerm_network_manager":{"block":{"attributes":{"cross_tenant_scopes":{"type":["list",["object",{"management_groups":["list","string"],"subscriptions":["list","string"],"tenant_id":"string"}]],"computed":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_accesses":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"scope":{"nesting_mode":3,"block":{"attributes":{"management_group_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["scope.0.management_group_ids","scope.0.subscription_ids"]},"subscription_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["scope.0.management_group_ids","scope.0.subscription_ids"]}}},"required":true}}}},"azurerm_network_manager_admin_rule":{"block":{"attributes":{"action":{"type":"string","required":true},"admin_rule_collection_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"destination_port_ranges":{"type":["list","string"],"optional":true},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"protocol":{"type":"string","required":true},"source_port_ranges":{"type":["list","string"],"optional":true}},"block_types":{"destination":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"address_prefix_type":{"type":"string","required":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"address_prefix_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_network_manager_admin_rule_collection":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_group_ids":{"type":["list","string"],"required":true},"security_admin_configuration_id":{"type":"string","required":true}}}},"azurerm_network_manager_connectivity_configuration":{"block":{"attributes":{"connectivity_topology":{"type":"string","required":true},"delete_existing_peering_enabled":{"type":"bool","optional":true},"description":{"type":"string","optional":true},"global_mesh_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}},"block_types":{"applies_to_group":{"nesting_mode":3,"block":{"attributes":{"global_mesh_enabled":{"type":"bool","optional":true},"group_connectivity":{"type":"string","required":true},"network_group_id":{"type":"string","required":true},"use_hub_gateway":{"type":"bool","optional":true}}},"required":true},"hub":{"nesting_mode":3,"block":{"attributes":{"resource_id":{"type":"string","required":true},"resource_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_network_manager_deployment":{"block":{"attributes":{"configuration_ids":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"scope_access":{"type":"string","required":true},"triggers":{"type":["map","string"],"optional":true}}}},"azurerm_network_manager_management_group_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_network_group":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_scope_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"target_scope_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_network_manager_security_admin_configuration":{"block":{"attributes":{"apply_on_network_intent_policy_based_services":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_static_member":{"block":{"attributes":{"name":{"type":"string","required":true},"network_group_id":{"type":"string","required":true},"region":{"type":"string","computed":true},"target_virtual_network_id":{"type":"string","required":true}}}},"azurerm_network_manager_subscription_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_network_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_network_profile":{"block":{"attributes":{"container_network_interface_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"container_network_interface":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_network_security_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"security_rule":{"type":["set",["object",{"access":"string","description":"string","destination_address_prefix":"string","destination_address_prefixes":["set","string"],"destination_application_security_group_ids":["set","string"],"destination_port_range":"string","destination_port_ranges":["set","string"],"direction":"string","name":"string","priority":"number","protocol":"string","source_address_prefix":"string","source_address_prefixes":["set","string"],"source_application_security_group_ids":["set","string"],"source_port_range":"string","source_port_ranges":["set","string"]}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_network_security_rule":{"block":{"attributes":{"access":{"type":"string","required":true},"description":{"type":"string","optional":true},"destination_address_prefix":{"type":"string","optional":true,"conflicts_with":["destination_address_prefixes"]},"destination_address_prefixes":{"type":["set","string"],"optional":true,"conflicts_with":["destination_address_prefix"]},"destination_application_security_group_ids":{"type":["set","string"],"optional":true},"destination_port_range":{"type":"string","optional":true,"conflicts_with":["destination_port_ranges"]},"destination_port_ranges":{"type":["set","string"],"optional":true,"conflicts_with":["destination_port_range"]},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"network_security_group_name":{"type":"string","required":true},"priority":{"type":"number","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_address_prefix":{"type":"string","optional":true,"conflicts_with":["source_address_prefixes"]},"source_address_prefixes":{"type":["set","string"],"optional":true,"conflicts_with":["source_address_prefix"]},"source_application_security_group_ids":{"type":["set","string"],"optional":true},"source_port_range":{"type":"string","optional":true,"conflicts_with":["source_port_ranges"]},"source_port_ranges":{"type":["set","string"],"optional":true,"conflicts_with":["source_port_range"]}}}},"azurerm_network_watcher":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_network_watcher_flow_log":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"location":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["network_security_group_id","target_resource_id"]},"network_watcher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["network_security_group_id","target_resource_id"]},"version":{"type":"number","optional":true,"default":1}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","required":true},"enabled":{"type":"bool","required":true}}},"required":true},"traffic_analytics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"interval_in_minutes":{"type":"number","optional":true,"default":60},"workspace_id":{"type":"string","required":true},"workspace_region":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_new_relic_monitor":{"block":{"attributes":{"account_creation_source":{"type":"string","optional":true,"default":"LIFTR"},"account_id":{"type":"string","optional":true,"computed":true},"ingestion_key":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"org_creation_source":{"type":"string","optional":true,"default":"LIFTR"},"organization_id":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"user_id":{"type":"string","optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"billing_cycle":{"type":"string","optional":true,"default":"MONTHLY"},"effective_date":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"newrelic-pay-as-you-go-free-live"},"usage_type":{"type":"string","optional":true,"default":"PAYG"}}},"required":true},"user":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"required":true}}}},"azurerm_new_relic_tag_rule":{"block":{"attributes":{"activity_log_enabled":{"type":"bool","optional":true,"default":false},"azure_active_directory_log_enabled":{"type":"bool","optional":true,"default":false},"metric_enabled":{"type":"bool","optional":true,"default":false},"monitor_id":{"type":"string","required":true},"subscription_log_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"log_tag_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"metric_tag_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_nginx_certificate":{"block":{"attributes":{"certificate_virtual_path":{"type":"string","required":true},"key_vault_secret_id":{"type":"string","required":true},"key_virtual_path":{"type":"string","required":true},"name":{"type":"string","required":true},"nginx_deployment_id":{"type":"string","required":true}}}},"azurerm_nginx_configuration":{"block":{"attributes":{"nginx_deployment_id":{"type":"string","required":true},"package_data":{"type":"string","optional":true,"conflicts_with":["protected_file","config_file"],"at_least_one_of":["config_file","package_data"]},"root_file":{"type":"string","required":true}},"block_types":{"config_file":{"nesting_mode":4,"block":{"attributes":{"content":{"type":"string","required":true},"virtual_path":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["config_file","package_data"]},"protected_file":{"nesting_mode":4,"block":{"attributes":{"content":{"type":"string","required":true},"content_hash":{"type":"string","computed":true},"virtual_path":{"type":"string","required":true}}},"optional":true,"required_with":["config_file"]}}}},"azurerm_nginx_deployment":{"block":{"attributes":{"automatic_upgrade_channel":{"type":"string","optional":true,"default":"stable"},"capacity":{"type":"number","optional":true,"conflicts_with":["auto_scale_profile"]},"dataplane_api_endpoint":{"type":"string","computed":true},"diagnose_support_enabled":{"type":"bool","optional":true},"email":{"type":"string","optional":true},"ip_address":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_resource_group":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"nginx_version":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auto_scale_profile":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","required":true},"min_capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["capacity"]},"frontend_private":{"nesting_mode":3,"block":{"attributes":{"allocation_method":{"type":"string","required":true},"ip_address":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["frontend_public"]},"frontend_public":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":["list","string"],"optional":true}}},"optional":true,"conflicts_with":["frontend_private"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logging_storage_account":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","optional":true},"name":{"type":"string","optional":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_notification_hub":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"apns_credential":{"nesting_mode":3,"block":{"attributes":{"application_mode":{"type":"string","required":true},"bundle_id":{"type":"string","required":true},"key_id":{"type":"string","required":true},"team_id":{"type":"string","required":true},"token":{"type":"string","required":true}}},"optional":true},"browser_credential":{"nesting_mode":3,"block":{"attributes":{"subject":{"type":"string","required":true},"vapid_private_key":{"type":"string","required":true},"vapid_public_key":{"type":"string","required":true}}},"optional":true},"gcm_credential":{"nesting_mode":3,"block":{"attributes":{"api_key":{"type":"string","required":true}}},"optional":true}}}},"azurerm_notification_hub_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"notification_hub_name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_notification_hub_namespace":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"servicebus_endpoint":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_oracle_autonomous_database":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"auto_scaling_enabled":{"type":"bool","required":true},"auto_scaling_for_storage_enabled":{"type":"bool","required":true},"backup_retention_period_in_days":{"type":"number","required":true},"character_set":{"type":"string","required":true},"compute_count":{"type":"number","required":true},"compute_model":{"type":"string","required":true},"customer_contacts":{"type":["list","string"],"optional":true,"computed":true},"data_storage_size_in_tbs":{"type":"number","required":true},"db_version":{"type":"string","required":true},"db_workload":{"type":"string","required":true},"display_name":{"type":"string","required":true},"license_model":{"type":"string","required":true},"location":{"type":"string","required":true},"mtls_connection_required":{"type":"bool","required":true},"name":{"type":"string","required":true},"national_character_set":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_oracle_cloud_vm_cluster":{"block":{"attributes":{"backup_subnet_cidr":{"type":"string","optional":true},"cloud_exadata_infrastructure_id":{"type":"string","required":true},"cluster_name":{"type":"string","optional":true,"computed":true},"cpu_core_count":{"type":"number","required":true},"data_storage_percentage":{"type":"number","optional":true,"computed":true},"data_storage_size_in_tbs":{"type":"number","optional":true,"computed":true},"db_node_storage_size_in_gbs":{"type":"number","optional":true,"computed":true},"db_servers":{"type":["list","string"],"required":true},"display_name":{"type":"string","required":true},"domain":{"type":"string","optional":true,"computed":true},"gi_version":{"type":"string","required":true},"hostname":{"type":"string","required":true},"hostname_actual":{"type":"string","computed":true},"license_model":{"type":"string","required":true},"local_backup_enabled":{"type":"bool","optional":true,"computed":true},"location":{"type":"string","required":true},"memory_size_in_gbs":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"ocid":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"scan_listener_port_tcp":{"type":"number","optional":true,"default":1521},"scan_listener_port_tcp_ssl":{"type":"number","optional":true,"default":2484},"sparse_diskgroup_enabled":{"type":"bool","optional":true,"computed":true},"ssh_public_keys":{"type":["list","string"],"required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"time_zone":{"type":"string","optional":true,"computed":true},"virtual_network_id":{"type":"string","required":true},"zone_id":{"type":"string","optional":true,"computed":true}},"block_types":{"data_collection_options":{"nesting_mode":3,"block":{"attributes":{"diagnostics_events_enabled":{"type":"bool","optional":true,"computed":true},"health_monitoring_enabled":{"type":"bool","optional":true,"computed":true},"incident_logs_enabled":{"type":"bool","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_oracle_exadata_infrastructure":{"block":{"attributes":{"compute_count":{"type":"number","required":true},"customer_contacts":{"type":["list","string"],"optional":true,"computed":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shape":{"type":"string","required":true},"storage_count":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"required":true}},"block_types":{"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"optional":true,"computed":true},"hours_of_day":{"type":["list","number"],"optional":true,"computed":true},"lead_time_in_weeks":{"type":"number","optional":true,"computed":true},"months":{"type":["list","string"],"optional":true,"computed":true},"patching_mode":{"type":"string","optional":true,"computed":true},"preference":{"type":"string","optional":true,"computed":true},"weeks_of_month":{"type":["list","number"],"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_orbital_contact":{"block":{"attributes":{"contact_profile_id":{"type":"string","required":true},"ground_station_name":{"type":"string","required":true},"name":{"type":"string","required":true},"reservation_end_time":{"type":"string","required":true},"reservation_start_time":{"type":"string","required":true},"spacecraft_id":{"type":"string","required":true}}}},"azurerm_orbital_contact_profile":{"block":{"attributes":{"auto_tracking":{"type":"string","required":true},"event_hub_uri":{"type":"string","optional":true},"location":{"type":"string","required":true},"minimum_elevation_degrees":{"type":"number","optional":true},"minimum_variable_contact_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"network_configuration_subnet_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"links":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"polarization":{"type":"string","required":true}},"block_types":{"channels":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mhz":{"type":"number","required":true},"center_frequency_mhz":{"type":"number","required":true},"demodulation_configuration":{"type":"string","optional":true},"modulation_configuration":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"end_point":{"nesting_mode":4,"block":{"attributes":{"end_point_name":{"type":"string","required":true},"ip_address":{"type":"string","optional":true},"port":{"type":"string","required":true},"protocol":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_orbital_spacecraft":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"norad_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"title_line":{"type":"string","required":true},"two_line_elements":{"type":["list","string"],"required":true}},"block_types":{"links":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mhz":{"type":"number","required":true},"center_frequency_mhz":{"type":"number","required":true},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"polarization":{"type":"string","required":true}}},"required":true}}}},"azurerm_orchestrated_virtual_machine_scale_set":{"block":{"attributes":{"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"instances":{"type":"number","optional":true,"computed":true},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","required":true},"priority":{"type":"string","optional":true,"default":"Regular"},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"single_placement_group":{"type":"bool","optional":true,"computed":true},"sku_name":{"type":"string","optional":true},"source_image_id":{"type":"string","optional":true,"conflicts_with":["source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"unique_id":{"type":"string","computed":true},"user_data_base64":{"type":"string","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","optional":true,"computed":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version_enabled":{"type":"bool","optional":true,"default":true},"extensions_to_provision_after_vm_creation":{"type":["list","string"],"optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"force_extension_execution_on_change":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"sku_name":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"optional":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"custom_data":{"type":"string","optional":true}},"block_types":{"linux_configuration":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"ImageDefault"},"provision_vm_agent":{"type":"bool","optional":true,"default":true}},"block_types":{"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"windows_configuration":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"hotpatching_enabled":{"type":"bool","optional":true,"default":false},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"AutomaticByOS"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"timezone":{"type":"string","optional":true}},"block_types":{"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"priority_mix":{"nesting_mode":3,"block":{"attributes":{"base_regular_count":{"type":"number","optional":true,"default":0},"regular_percentage_above_base":{"type":"number","optional":true,"default":0}}},"optional":true},"sku_profile":{"nesting_mode":3,"block":{"attributes":{"allocation_strategy":{"type":"string","required":true},"vm_sizes":{"type":["set","string"],"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"conflicts_with":["source_image_id"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_palo_alto_local_rulestack":{"block":{"attributes":{"anti_spyware_profile":{"type":"string","optional":true},"anti_virus_profile":{"type":"string","optional":true},"description":{"type":"string","optional":true},"dns_subscription":{"type":"string","optional":true},"file_blocking_profile":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"url_filtering_profile":{"type":"string","optional":true},"vulnerability_profile":{"type":"string","optional":true}}}},"azurerm_palo_alto_local_rulestack_certificate":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"key_vault_certificate_id":{"type":"string","optional":true,"exactly_one_of":["self_signed","key_vault_certificate_id"]},"name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"self_signed":{"type":"bool","optional":true,"default":false,"exactly_one_of":["key_vault_certificate_id","self_signed"]}}}},"azurerm_palo_alto_local_rulestack_fqdn_list":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"fully_qualified_domain_names":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_outbound_trust_certificate_association":{"block":{"attributes":{"certificate_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_outbound_untrust_certificate_association":{"block":{"attributes":{"certificate_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_prefix_list":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"prefix_list":{"type":["list","string"],"required":true},"rulestack_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_rule":{"block":{"attributes":{"action":{"type":"string","required":true},"applications":{"type":["list","string"],"required":true},"audit_comment":{"type":"string","optional":true},"decryption_rule_type":{"type":"string","optional":true,"default":"None"},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"inspection_certificate_id":{"type":"string","optional":true},"logging_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"negate_destination":{"type":"bool","optional":true,"default":false},"negate_source":{"type":"bool","optional":true,"default":false},"priority":{"type":"number","required":true},"protocol":{"type":"string","optional":true,"exactly_one_of":["protocol","protocol_ports"]},"protocol_ports":{"type":["list","string"],"optional":true,"exactly_one_of":["protocol","protocol_ports"]},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"category":{"nesting_mode":3,"block":{"attributes":{"custom_urls":{"type":["list","string"],"required":true},"feeds":{"type":["list","string"],"optional":true}}},"optional":true},"destination":{"nesting_mode":3,"block":{"attributes":{"cidrs":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"countries":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"feeds":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"local_rulestack_fqdn_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"local_rulestack_prefix_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"cidrs":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"countries":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"feeds":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"local_rulestack_prefix_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack":{"block":{"attributes":{"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"network_virtual_appliance_id":{"type":"string","required":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true},"trusted_subnet_id":{"type":"string","computed":true},"untrusted_subnet_id":{"type":"string","computed":true},"virtual_hub_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"panorama":{"type":["list",["object",{"device_group_name":"string","host_name":"string","name":"string","panorama_server_1":"string","panorama_server_2":"string","template_name":"string","virtual_machine_ssh_key":"string"}]],"computed":true},"panorama_base64_config":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"network_virtual_appliance_id":{"type":"string","required":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true},"trusted_subnet_id":{"type":"string","computed":true},"untrusted_subnet_id":{"type":"string","computed":true},"virtual_hub_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack":{"block":{"attributes":{"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true}},"block_types":{"vnet_configuration":{"nesting_mode":3,"block":{"attributes":{"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"trusted_subnet_id":{"type":"string","optional":true},"untrusted_subnet_id":{"type":"string","optional":true},"virtual_network_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_network_panorama":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"panorama":{"type":["list",["object",{"device_group_name":"string","host_name":"string","name":"string","panorama_server_1":"string","panorama_server_2":"string","template_name":"string","virtual_machine_ssh_key":"string"}]],"computed":true},"panorama_base64_config":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true}},"block_types":{"vnet_configuration":{"nesting_mode":3,"block":{"attributes":{"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"trusted_subnet_id":{"type":"string","optional":true},"untrusted_subnet_id":{"type":"string","optional":true},"virtual_network_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_palo_alto_virtual_network_appliance":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_pim_active_role_assignment":{"block":{"attributes":{"justification":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"start_date_time":{"type":"string","optional":true,"computed":true}},"block_types":{"expiration":{"nesting_mode":3,"block":{"attributes":{"duration_days":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_hours","schedule.0.expiration.0.end_date_time"]},"duration_hours":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.end_date_time"]},"end_date_time":{"type":"string","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.duration_hours"]}}},"optional":true}}},"optional":true,"computed":true},"ticket":{"nesting_mode":3,"block":{"attributes":{"number":{"type":"string","optional":true},"system":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_pim_eligible_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true,"required_with":["condition_version"]},"condition_version":{"type":"string","optional":true,"required_with":["condition"]},"justification":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"start_date_time":{"type":"string","optional":true,"computed":true}},"block_types":{"expiration":{"nesting_mode":3,"block":{"attributes":{"duration_days":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_hours","schedule.0.expiration.0.end_date_time"]},"duration_hours":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.end_date_time"]},"end_date_time":{"type":"string","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.duration_hours"]}}},"optional":true}}},"optional":true,"computed":true},"ticket":{"nesting_mode":3,"block":{"attributes":{"number":{"type":"string","optional":true},"system":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_point_to_site_vpn_gateway":{"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_preference_internet_enabled":{"type":"bool","optional":true,"default":false},"scale_unit":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true},"vpn_server_configuration_id":{"type":"string","required":true}},"block_types":{"connection_configuration":{"nesting_mode":3,"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true}},"block_types":{"route":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","required":true},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"ids":{"type":["list","string"],"required":true},"labels":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true,"computed":true},"vpn_client_address_pool":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"required":true}}},"required":true}}},"required":true}}}},"azurerm_policy_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"management_group_id":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"mode":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"policy_rule":{"type":"string","optional":true},"policy_type":{"type":"string","required":true},"role_definition_ids":{"type":["list","string"],"computed":true}}}},"azurerm_policy_set_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"management_group_id":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"policy_type":{"type":"string","required":true}},"block_types":{"policy_definition_group":{"nesting_mode":4,"block":{"attributes":{"additional_metadata_resource_id":{"type":"string","optional":true},"category":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true}}},"optional":true},"policy_definition_reference":{"nesting_mode":3,"block":{"attributes":{"parameter_values":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"policy_group_names":{"type":["set","string"],"optional":true},"reference_id":{"type":"string","optional":true,"computed":true}}},"required":true}}}},"azurerm_policy_virtual_machine_configuration_assignment":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"configuration":{"nesting_mode":3,"block":{"attributes":{"assignment_type":{"type":"string","optional":true},"content_hash":{"type":"string","optional":true,"computed":true},"content_uri":{"type":"string","optional":true,"computed":true},"version":{"type":"string","optional":true}},"block_types":{"parameter":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_portal_dashboard":{"block":{"attributes":{"dashboard_properties":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_portal_tenant_configuration":{"block":{"attributes":{"private_markdown_storage_enforced":{"type":"bool","required":true}}}},"azurerm_postgresql_active_directory_administrator":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_postgresql_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_postgresql_database":{"block":{"attributes":{"charset":{"type":"string","required":true},"collation":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true}}}},"azurerm_postgresql_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_password":{"type":"string","optional":true},"auto_grow_enabled":{"type":"bool","optional":true,"default":false},"backup_retention_days":{"type":"number","optional":true,"computed":true},"create_mode":{"type":"string","optional":true},"delegated_subnet_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"point_in_time_restore_time_in_utc":{"type":"string","optional":true},"private_dns_zone_id":{"type":"string","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"replication_role":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"source_server_id":{"type":"string","optional":true},"storage_mb":{"type":"number","optional":true,"computed":true},"storage_tier":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"computed":true},"zone":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"active_directory_auth_enabled":{"type":"bool","optional":true,"default":false},"password_auth_enabled":{"type":"bool","optional":true,"default":true},"tenant_id":{"type":"string","optional":true,"required_with":["authentication.0.active_directory_auth_enabled"]}}},"optional":true,"computed":true},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"geo_backup_key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.geo_backup_user_assigned_identity_id"]},"geo_backup_user_assigned_identity_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true,"required_with":["identity","customer_managed_key.0.primary_user_assigned_identity_id"]},"primary_user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"high_availability":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"standby_availability_zone":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true}}}},"azurerm_postgresql_flexible_server_active_directory_administrator":{"block":{"attributes":{"object_id":{"type":"string","required":true},"principal_name":{"type":"string","required":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_database":{"block":{"attributes":{"charset":{"type":"string","optional":true,"default":"UTF8"},"collation":{"type":"string","optional":true,"default":"en_US.utf8"},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_virtual_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"replica_server_id":{"type":"string","required":true},"source_server_id":{"type":"string","required":true},"type":{"type":"string","required":true}}}},"azurerm_postgresql_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_login_password":{"type":"string","optional":true},"auto_grow_enabled":{"type":"bool","optional":true,"default":true},"backup_retention_days":{"type":"number","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"creation_source_server_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"infrastructure_encryption_enabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"restore_point_in_time":{"type":"string","optional":true},"sku_name":{"type":"string","required":true},"ssl_enforcement_enabled":{"type":"bool","required":true},"ssl_minimal_tls_version_enforced":{"type":"string","optional":true,"default":"TLS1_2"},"storage_mb":{"type":"number","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"threat_detection_policy":{"nesting_mode":3,"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"email_account_admins":{"type":"bool","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"email_addresses":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"enabled":{"type":"bool","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"retention_days":{"type":"number","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"storage_account_access_key":{"type":"string","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"storage_endpoint":{"type":"string","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]}}},"optional":true}}}},"azurerm_postgresql_server_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_postgresql_virtual_network_rule":{"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_powerbi_embedded":{"block":{"attributes":{"administrators":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"mode":{"type":"string","optional":true,"default":"Gen1"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_a_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_aaaa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_cname_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"record":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_mx_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"@"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"exchange":{"type":"string","required":true},"preference":{"type":"number","required":true}}},"required":true}}}},"azurerm_private_dns_ptr_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_resolver":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_dns_resolver_dns_forwarding_ruleset":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_outbound_endpoint_ids":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_resolver_forwarding_rule":{"block":{"attributes":{"dns_forwarding_ruleset_id":{"type":"string","required":true},"domain_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true}},"block_types":{"target_dns_servers":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","required":true},"port":{"type":"number","optional":true}}},"required":true}}}},"azurerm_private_dns_resolver_inbound_endpoint":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configurations":{"nesting_mode":3,"block":{"attributes":{"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_allocation_method":{"type":"string","optional":true,"default":"Dynamic"},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_private_dns_resolver_outbound_endpoint":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_resolver_virtual_network_link":{"block":{"attributes":{"dns_forwarding_ruleset_id":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_dns_srv_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","required":true},"priority":{"type":"number","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","required":true}}},"required":true}}}},"azurerm_private_dns_txt_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_private_dns_zone":{"block":{"attributes":{"max_number_of_record_sets":{"type":"number","computed":true},"max_number_of_virtual_network_links":{"type":"number","computed":true},"max_number_of_virtual_network_links_with_registration":{"type":"number","computed":true},"name":{"type":"string","required":true},"number_of_record_sets":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"soa_record":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"expire_time":{"type":"number","optional":true,"default":2419200},"fqdn":{"type":"string","computed":true},"host_name":{"type":"string","computed":true},"minimum_ttl":{"type":"number","optional":true,"default":10},"refresh_time":{"type":"number","optional":true,"default":3600},"retry_time":{"type":"number","optional":true,"default":300},"serial_number":{"type":"number","computed":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","optional":true,"default":3600}}},"optional":true,"computed":true}}}},"azurerm_private_dns_zone_virtual_network_link":{"block":{"attributes":{"name":{"type":"string","required":true},"private_dns_zone_name":{"type":"string","required":true},"registration_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_endpoint":{"block":{"attributes":{"custom_dns_configs":{"type":["list",["object",{"fqdn":"string","ip_addresses":["list","string"]}]],"computed":true},"custom_network_interface_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_interface":{"type":["list",["object",{"id":"string","name":"string"}]],"computed":true},"private_dns_zone_configs":{"type":["list",["object",{"id":"string","name":"string","private_dns_zone_id":"string","record_sets":["list",["object",{"fqdn":"string","ip_addresses":["list","string"],"name":"string","ttl":"number","type":"string"}]]}]],"computed":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"member_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","required":true},"subresource_name":{"type":"string","optional":true}}},"optional":true},"private_dns_zone_group":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_dns_zone_ids":{"type":["list","string"],"required":true}}},"optional":true},"private_service_connection":{"nesting_mode":3,"block":{"attributes":{"is_manual_connection":{"type":"bool","required":true},"name":{"type":"string","required":true},"private_connection_resource_alias":{"type":"string","optional":true,"exactly_one_of":["private_service_connection.0.private_connection_resource_alias","private_service_connection.0.private_connection_resource_id"]},"private_connection_resource_id":{"type":"string","optional":true,"exactly_one_of":["private_service_connection.0.private_connection_resource_alias","private_service_connection.0.private_connection_resource_id"]},"private_ip_address":{"type":"string","computed":true},"request_message":{"type":"string","optional":true},"subresource_names":{"type":["list","string"],"optional":true}}},"required":true}}}},"azurerm_private_endpoint_application_security_group_association":{"block":{"attributes":{"application_security_group_id":{"type":"string","required":true},"private_endpoint_id":{"type":"string","required":true}}}},"azurerm_private_link_service":{"block":{"attributes":{"alias":{"type":"string","computed":true},"auto_approval_subscription_ids":{"type":["set","string"],"optional":true},"enable_proxy_protocol":{"type":"bool","optional":true},"fqdns":{"type":["list","string"],"optional":true},"load_balancer_frontend_ip_configuration_ids":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"visibility_subscription_ids":{"type":["set","string"],"optional":true}},"block_types":{"nat_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"private_ip_address":{"type":"string","optional":true},"private_ip_address_version":{"type":"string","optional":true,"default":"IPv4"},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_proximity_placement_group":{"block":{"attributes":{"allowed_vm_sizes":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true,"required_with":["allowed_vm_sizes"]}}}},"azurerm_public_ip":{"block":{"attributes":{"allocation_method":{"type":"string","required":true},"ddos_protection_mode":{"type":"string","optional":true,"default":"VirtualNetworkInherited"},"ddos_protection_plan_id":{"type":"string","optional":true},"domain_name_label":{"type":"string","optional":true},"domain_name_label_scope":{"type":"string","optional":true},"edge_zone":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"ip_address":{"type":"string","computed":true},"ip_tags":{"type":["map","string"],"optional":true},"ip_version":{"type":"string","optional":true,"default":"IPv4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"reverse_fqdn":{"type":"string","optional":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_public_ip_prefix":{"block":{"attributes":{"ip_prefix":{"type":"string","computed":true},"ip_version":{"type":"string","optional":true,"default":"IPv4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"prefix_length":{"type":"number","optional":true,"default":28},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_purview_account":{"block":{"attributes":{"atlas_kafka_endpoint_primary_connection_string":{"type":"string","computed":true},"atlas_kafka_endpoint_secondary_connection_string":{"type":"string","computed":true},"catalog_endpoint":{"type":"string","computed":true},"guardian_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_resources":{"type":["list",["object",{"event_hub_namespace_id":"string","resource_group_id":"string","storage_account_id":"string"}]],"computed":true},"name":{"type":"string","required":true},"public_network_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"scan_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_recovery_services_vault":{"block":{"attributes":{"classic_vmware_replication_enabled":{"type":"bool","optional":true},"cross_region_restore_enabled":{"type":"bool","optional":true,"default":false},"immutability":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"soft_delete_enabled":{"type":"bool","optional":true,"default":true},"storage_mode_type":{"type":"string","optional":true,"default":"GeoRedundant"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"infrastructure_encryption_enabled":{"type":"bool","required":true},"key_id":{"type":"string","required":true},"use_system_assigned_identity":{"type":"bool","optional":true,"default":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true,"required_with":["identity"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"monitoring":{"nesting_mode":3,"block":{"attributes":{"alerts_for_all_job_failures_enabled":{"type":"bool","optional":true,"default":true},"alerts_for_critical_operation_failures_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_recovery_services_vault_resource_guard_association":{"block":{"attributes":{"resource_guard_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_redhat_openshift_cluster":{"block":{"attributes":{"console_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"api_server_profile":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","computed":true},"url":{"type":"string","computed":true},"visibility":{"type":"string","required":true}}},"required":true},"cluster_profile":{"nesting_mode":3,"block":{"attributes":{"domain":{"type":"string","required":true},"fips_enabled":{"type":"bool","optional":true,"default":false},"managed_resource_group_name":{"type":"string","optional":true},"pull_secret":{"type":"string","optional":true},"resource_group_id":{"type":"string","computed":true},"version":{"type":"string","required":true}}},"required":true},"ingress_profile":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","computed":true},"name":{"type":"string","computed":true},"visibility":{"type":"string","required":true}}},"required":true},"main_profile":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true},"vm_size":{"type":"string","required":true}}},"required":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"outbound_type":{"type":"string","optional":true,"default":"Loadbalancer"},"pod_cidr":{"type":"string","required":true},"preconfigured_network_security_group_enabled":{"type":"bool","optional":true,"default":false},"service_cidr":{"type":"string","required":true}}},"required":true},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true}}},"required":true},"worker_profile":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"encryption_at_host_enabled":{"type":"bool","optional":true,"default":false},"node_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"vm_size":{"type":"string","required":true}}},"required":true}}}},"azurerm_redis_cache":{"block":{"attributes":{"access_keys_authentication_enabled":{"type":"bool","optional":true,"default":true},"capacity":{"type":"number","required":true},"family":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"non_ssl_port_enabled":{"type":"bool","optional":true,"default":false},"port":{"type":"number","computed":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"private_static_ip_address":{"type":"string","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"redis_version":{"type":"string","optional":true,"default":6},"replicas_per_master":{"type":"number","optional":true,"computed":true},"replicas_per_primary":{"type":"number","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"shard_count":{"type":"number","optional":true},"sku_name":{"type":"string","required":true},"ssl_port":{"type":"number","computed":true},"subnet_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"tenant_settings":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"patch_schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"maintenance_window":{"type":"string","optional":true,"default":"PT5H"},"start_hour_utc":{"type":"number","optional":true}}},"optional":true},"redis_configuration":{"nesting_mode":3,"block":{"attributes":{"active_directory_authentication_enabled":{"type":"bool","optional":true},"aof_backup_enabled":{"type":"bool","optional":true},"aof_storage_connection_string_0":{"type":"string","optional":true},"aof_storage_connection_string_1":{"type":"string","optional":true},"authentication_enabled":{"type":"bool","optional":true,"default":true},"data_persistence_authentication_method":{"type":"string","optional":true},"maxclients":{"type":"number","computed":true},"maxfragmentationmemory_reserved":{"type":"number","optional":true,"computed":true},"maxmemory_delta":{"type":"number","optional":true,"computed":true},"maxmemory_policy":{"type":"string","optional":true,"default":"volatile-lru"},"maxmemory_reserved":{"type":"number","optional":true,"computed":true},"notify_keyspace_events":{"type":"string","optional":true},"rdb_backup_enabled":{"type":"bool","optional":true},"rdb_backup_frequency":{"type":"number","optional":true},"rdb_backup_max_snapshot_count":{"type":"number","optional":true},"rdb_storage_connection_string":{"type":"string","optional":true},"storage_account_subscription_id":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_redis_cache_access_policy":{"block":{"attributes":{"name":{"type":"string","required":true},"permissions":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true}}}},"azurerm_redis_cache_access_policy_assignment":{"block":{"attributes":{"access_policy_name":{"type":"string","required":true},"name":{"type":"string","required":true},"object_id":{"type":"string","required":true},"object_id_alias":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true}}}},"azurerm_redis_enterprise_cluster":{"block":{"attributes":{"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_redis_enterprise_database":{"block":{"attributes":{"client_protocol":{"type":"string","optional":true,"default":"Encrypted"},"cluster_id":{"type":"string","required":true},"clustering_policy":{"type":"string","optional":true,"default":"OSSCluster"},"eviction_policy":{"type":"string","optional":true,"default":"VolatileLRU"},"linked_database_group_nickname":{"type":"string","optional":true,"required_with":["linked_database_id"]},"linked_database_id":{"type":["set","string"],"optional":true},"name":{"type":"string","optional":true,"default":"default"},"port":{"type":"number","optional":true,"default":10000},"primary_access_key":{"type":"string","computed":true},"secondary_access_key":{"type":"string","computed":true}},"block_types":{"module":{"nesting_mode":3,"block":{"attributes":{"args":{"type":"string","optional":true,"default":""},"name":{"type":"string","required":true},"version":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_redis_firewall_rule":{"block":{"attributes":{"end_ip":{"type":"string","required":true},"name":{"type":"string","required":true},"redis_cache_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"start_ip":{"type":"string","required":true}}}},"azurerm_redis_linked_server":{"block":{"attributes":{"geo_replicated_primary_host_name":{"type":"string","computed":true},"linked_redis_cache_id":{"type":"string","required":true},"linked_redis_cache_location":{"type":"string","required":true},"name":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"server_role":{"type":"string","required":true},"target_redis_cache_name":{"type":"string","required":true}}}},"azurerm_relay_hybrid_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"relay_namespace_name":{"type":"string","required":true},"requires_client_authorization":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"user_metadata":{"type":"string","optional":true}}}},"azurerm_relay_hybrid_connection_authorization_rule":{"block":{"attributes":{"hybrid_connection_name":{"type":"string","required":true},"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_relay_namespace":{"block":{"attributes":{"location":{"type":"string","required":true},"metric_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_relay_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_resource_deployment_script_azure_cli":{"block":{"attributes":{"cleanup_preference":{"type":"string","optional":true,"default":"Always"},"command_line":{"type":"string","optional":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":"string","computed":true},"primary_script_uri":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"resource_group_name":{"type":"string","required":true},"retention_interval":{"type":"string","required":true},"script_content":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"supporting_script_uris":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"string","optional":true,"default":"P1D"},"version":{"type":"string","required":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"container_group_name":{"type":"string","optional":true}}},"optional":true},"environment_variable":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"secure_value":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_deployment_script_azure_power_shell":{"block":{"attributes":{"cleanup_preference":{"type":"string","optional":true,"default":"Always"},"command_line":{"type":"string","optional":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":"string","computed":true},"primary_script_uri":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"resource_group_name":{"type":"string","required":true},"retention_interval":{"type":"string","required":true},"script_content":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"supporting_script_uris":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"string","optional":true,"default":"P1D"},"version":{"type":"string","required":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"container_group_name":{"type":"string","optional":true}}},"optional":true},"environment_variable":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"secure_value":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_group":{"block":{"attributes":{"location":{"type":"string","required":true},"managed_by":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_resource_group_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"file_format":{"type":"string","optional":true,"default":"Csv"},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_resource_group_cost_management_view":{"block":{"attributes":{"accumulated":{"type":"bool","required":true},"chart_type":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"report_type":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true},"timeframe":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"granularity":{"type":"string","required":true}},"block_types":{"aggregation":{"nesting_mode":4,"block":{"attributes":{"column_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"grouping":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true},"sorting":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true},"kpi":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"pivot":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_group_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_resource_group_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"resource_group_id":{"type":"string","required":true}}}},"azurerm_resource_group_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"resource_group_id":{"type":"string","required":true}}}},"azurerm_resource_group_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"deployment_mode":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_resource_management_private_link":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_resource_management_private_link_association":{"block":{"attributes":{"management_group_id":{"type":"string","required":true},"name":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","required":true},"resource_management_private_link_id":{"type":"string","required":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_resource_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"resource_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_resource_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"resource_id":{"type":"string","required":true}}}},"azurerm_resource_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"resource_id":{"type":"string","required":true}}}},"azurerm_resource_provider_registration":{"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"feature":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"registered":{"type":"bool","required":true}}},"optional":true}}}},"azurerm_restore_point_collection":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true},"condition_version":{"type":"string","optional":true,"computed":true},"delegated_managed_identity_resource_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","optional":true,"computed":true},"role_definition_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["role_definition_name"]},"role_definition_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["role_definition_id"]},"scope":{"type":"string","required":true},"skip_service_principal_aad_check":{"type":"bool","optional":true,"computed":true}}}},"azurerm_role_definition":{"block":{"attributes":{"assignable_scopes":{"type":["list","string"],"optional":true,"computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"role_definition_id":{"type":"string","optional":true,"computed":true},"role_definition_resource_id":{"type":"string","computed":true},"scope":{"type":"string","required":true}},"block_types":{"permissions":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"optional":true},"data_actions":{"type":["set","string"],"optional":true},"not_actions":{"type":["list","string"],"optional":true},"not_data_actions":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_role_management_policy":{"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"activation_rules":{"nesting_mode":3,"block":{"attributes":{"maximum_duration":{"type":"string","optional":true,"computed":true},"require_approval":{"type":"bool","optional":true,"computed":true},"require_justification":{"type":"bool","optional":true,"computed":true},"require_multifactor_authentication":{"type":"bool","optional":true,"computed":true,"conflicts_with":["activation_rules.0.required_conditional_access_authentication_context"]},"require_ticket_info":{"type":"bool","optional":true,"computed":true},"required_conditional_access_authentication_context":{"type":"string","optional":true,"computed":true,"conflicts_with":["activation_rules.0.require_multifactor_authentication"]}},"block_types":{"approval_stage":{"nesting_mode":3,"block":{"block_types":{"primary_approver":{"nesting_mode":4,"block":{"attributes":{"object_id":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true,"computed":true},"active_assignment_rules":{"nesting_mode":3,"block":{"attributes":{"expiration_required":{"type":"bool","optional":true,"computed":true},"expire_after":{"type":"string","optional":true,"computed":true},"require_justification":{"type":"bool","optional":true,"computed":true},"require_multifactor_authentication":{"type":"bool","optional":true,"computed":true},"require_ticket_info":{"type":"bool","optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_assignment_rules":{"nesting_mode":3,"block":{"attributes":{"expiration_required":{"type":"bool","optional":true,"computed":true},"expire_after":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"notification_rules":{"nesting_mode":3,"block":{"block_types":{"active_assignments":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_activations":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_assignments":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_route":{"block":{"attributes":{"address_prefix":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop_in_ip_address":{"type":"string","optional":true},"next_hop_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"route_table_name":{"type":"string","required":true}}}},"azurerm_route_filter":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"rule":{"type":["list",["object",{"access":"string","communities":["list","string"],"name":"string","rule_type":"string"}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_route_map":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"next_step_if_matched":{"type":"string","optional":true,"default":"Unknown"}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}},"block_types":{"parameter":{"nesting_mode":3,"block":{"attributes":{"as_path":{"type":["list","string"],"optional":true},"community":{"type":["list","string"],"optional":true},"route_prefix":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"match_criterion":{"nesting_mode":3,"block":{"attributes":{"as_path":{"type":["list","string"],"optional":true},"community":{"type":["list","string"],"optional":true},"match_condition":{"type":"string","required":true},"route_prefix":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_route_server":{"block":{"attributes":{"branch_to_branch_traffic_enabled":{"type":"bool","optional":true,"default":false},"hub_routing_preference":{"type":"string","optional":true,"default":"ExpressRoute"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_state":{"type":"string","computed":true},"sku":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_router_asn":{"type":"number","computed":true},"virtual_router_ips":{"type":["set","string"],"computed":true}}}},"azurerm_route_server_bgp_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"peer_asn":{"type":"number","required":true},"peer_ip":{"type":"string","required":true},"route_server_id":{"type":"string","required":true}}}},"azurerm_route_table":{"block":{"attributes":{"bgp_route_propagation_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"route":{"type":["set",["object",{"address_prefix":"string","name":"string","next_hop_in_ip_address":"string","next_hop_type":"string"}]],"optional":true,"computed":true},"subnets":{"type":["set","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_search_service":{"block":{"attributes":{"allowed_ips":{"type":["set","string"],"optional":true},"authentication_failure_mode":{"type":"string","optional":true},"customer_managed_key_encryption_compliance_status":{"type":"string","computed":true},"customer_managed_key_enforcement_enabled":{"type":"bool","optional":true,"default":false},"hosting_mode":{"type":"string","optional":true,"default":"default"},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_rule_bypass_option":{"type":"string","optional":true,"default":"None"},"partition_count":{"type":"number","optional":true,"default":1},"primary_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"query_keys":{"type":["list",["object",{"key":"string","name":"string"}]],"computed":true},"replica_count":{"type":"number","optional":true,"default":1},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"semantic_search_sku":{"type":"string","optional":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_search_shared_private_link_service":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"search_service_id":{"type":"string","required":true},"status":{"type":"string","computed":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_security_center_assessment":{"block":{"attributes":{"additional_data":{"type":["map","string"],"optional":true},"assessment_policy_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"status":{"nesting_mode":3,"block":{"attributes":{"cause":{"type":"string","optional":true},"code":{"type":"string","required":true},"description":{"type":"string","optional":true}}},"required":true}}}},"azurerm_security_center_assessment_policy":{"block":{"attributes":{"categories":{"type":["set","string"],"optional":true,"computed":true},"description":{"type":"string","required":true},"display_name":{"type":"string","required":true},"implementation_effort":{"type":"string","optional":true},"name":{"type":"string","computed":true},"remediation_description":{"type":"string","optional":true},"severity":{"type":"string","optional":true,"default":"Medium"},"threats":{"type":["set","string"],"optional":true},"user_impact":{"type":"string","optional":true}}}},"azurerm_security_center_auto_provisioning":{"block":{"attributes":{"auto_provision":{"type":"string","required":true}}}},"azurerm_security_center_automation":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true},"resource_id":{"type":"string","required":true},"trigger_url":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"event_source":{"type":"string","required":true}},"block_types":{"rule_set":{"nesting_mode":3,"block":{"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"expected_value":{"type":"string","required":true},"operator":{"type":"string","required":true},"property_path":{"type":"string","required":true},"property_type":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"required":true}}}},"azurerm_security_center_contact":{"block":{"attributes":{"alert_notifications":{"type":"bool","required":true},"alerts_to_admins":{"type":"bool","required":true},"email":{"type":"string","required":true},"name":{"type":"string","required":true},"phone":{"type":"string","optional":true}}}},"azurerm_security_center_server_vulnerability_assessment_virtual_machine":{"block":{"attributes":{"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_security_center_server_vulnerability_assessments_setting":{"block":{"attributes":{"vulnerability_assessment_provider":{"type":"string","required":true}}}},"azurerm_security_center_setting":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"setting_name":{"type":"string","required":true}}}},"azurerm_security_center_storage_defender":{"block":{"attributes":{"malware_scanning_on_upload_cap_gb_per_month":{"type":"number","optional":true,"default":-1},"malware_scanning_on_upload_enabled":{"type":"bool","optional":true,"default":false},"override_subscription_settings_enabled":{"type":"bool","optional":true,"default":false},"scan_results_event_grid_topic_id":{"type":"string","optional":true},"sensitive_data_discovery_enabled":{"type":"bool","optional":true,"default":false},"storage_account_id":{"type":"string","required":true}}}},"azurerm_security_center_subscription_pricing":{"block":{"attributes":{"resource_type":{"type":"string","optional":true,"default":"VirtualMachines"},"subplan":{"type":"string","optional":true},"tier":{"type":"string","required":true}},"block_types":{"extension":{"nesting_mode":4,"block":{"attributes":{"additional_extension_properties":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_security_center_workspace":{"block":{"attributes":{"scope":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_sentinel_alert_rule_anomaly_built_in":{"block":{"attributes":{"anomaly_settings_version":{"type":"number","computed":true},"anomaly_version":{"type":"string","computed":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["name","display_name"]},"enabled":{"type":"bool","required":true},"frequency":{"type":"string","computed":true},"log_analytics_workspace_id":{"type":"string","required":true},"mode":{"type":"string","required":true},"multi_select_observation":{"type":["list",["object",{"description":"string","name":"string","supported_values":["list","string"],"values":["list","string"]}]],"computed":true},"name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["name","display_name"]},"prioritized_exclude_observation":{"type":["list",["object",{"description":"string","exclude":"string","name":"string","prioritize":"string"}]],"computed":true},"required_data_connector":{"type":["list",["object",{"connector_id":"string","data_types":["list","string"]}]],"computed":true},"settings_definition_id":{"type":"string","computed":true},"single_select_observation":{"type":["list",["object",{"description":"string","name":"string","supported_values":["list","string"],"value":"string"}]],"computed":true},"tactics":{"type":["list","string"],"computed":true},"techniques":{"type":["list","string"],"computed":true},"threshold_observation":{"type":["list",["object",{"description":"string","max":"string","min":"string","name":"string","value":"string"}]],"computed":true}}}},"azurerm_sentinel_alert_rule_anomaly_duplicate":{"block":{"attributes":{"anomaly_settings_version":{"type":"number","computed":true},"anomaly_version":{"type":"string","computed":true},"built_in_rule_id":{"type":"string","required":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"frequency":{"type":"string","computed":true},"is_default_settings":{"type":"bool","computed":true},"log_analytics_workspace_id":{"type":"string","required":true},"mode":{"type":"string","required":true},"name":{"type":"string","computed":true},"required_data_connector":{"type":["list",["object",{"connector_id":"string","data_types":["list","string"]}]],"computed":true},"settings_definition_id":{"type":"string","computed":true},"tactics":{"type":["list","string"],"computed":true},"techniques":{"type":["list","string"],"computed":true}},"block_types":{"multi_select_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","required":true},"supported_values":{"type":["list","string"],"computed":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"computed":true},"prioritized_exclude_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"exclude":{"type":"string","optional":true},"name":{"type":"string","required":true},"prioritize":{"type":"string","optional":true}}},"optional":true,"computed":true},"single_select_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","required":true},"supported_values":{"type":["list","string"],"computed":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"threshold_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"max":{"type":"string","computed":true},"min":{"type":"string","computed":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_sentinel_alert_rule_fusion":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"default":"BuiltInFusion"}},"block_types":{"source":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true}},"block_types":{"sub_type":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"severities_allowed":{"type":["set","string"],"required":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_sentinel_alert_rule_machine_learning_behavior_analytics":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_alert_rule_ms_security_incident":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"display_name_exclude_filter":{"type":["set","string"],"optional":true},"display_name_filter":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"product_filter":{"type":"string","required":true},"severity_filter":{"type":["set","string"],"required":true}}}},"azurerm_sentinel_alert_rule_nrt":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"alert_rule_template_version":{"type":"string","optional":true},"custom_details":{"type":["map","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"severity":{"type":"string","required":true},"suppression_duration":{"type":"string","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"bool","optional":true,"default":false},"tactics":{"type":["set","string"],"optional":true},"techniques":{"type":["set","string"],"optional":true}},"block_types":{"alert_details_override":{"nesting_mode":3,"block":{"attributes":{"description_format":{"type":"string","optional":true},"display_name_format":{"type":"string","optional":true},"severity_column_name":{"type":"string","optional":true},"tactics_column_name":{"type":"string","optional":true}},"block_types":{"dynamic_property":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"entity_mapping":{"nesting_mode":3,"block":{"attributes":{"entity_type":{"type":"string","required":true}},"block_types":{"field_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true},"identifier":{"type":"string","required":true}}},"required":true}}},"optional":true},"event_grouping":{"nesting_mode":3,"block":{"attributes":{"aggregation_method":{"type":"string","required":true}}},"required":true},"incident":{"nesting_mode":3,"block":{"attributes":{"create_incident_enabled":{"type":"bool","required":true}},"block_types":{"grouping":{"nesting_mode":3,"block":{"attributes":{"by_alert_details":{"type":["list","string"],"optional":true},"by_custom_details":{"type":["list","string"],"optional":true},"by_entities":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"entity_matching_method":{"type":"string","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"string","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true,"computed":true},"sentinel_entity_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_alert_rule_scheduled":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"alert_rule_template_version":{"type":"string","optional":true},"custom_details":{"type":["map","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"query_frequency":{"type":"string","optional":true,"default":"PT5H"},"query_period":{"type":"string","optional":true,"default":"PT5H"},"severity":{"type":"string","required":true},"suppression_duration":{"type":"string","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"bool","optional":true,"default":false},"tactics":{"type":["set","string"],"optional":true},"techniques":{"type":["set","string"],"optional":true},"trigger_operator":{"type":"string","optional":true,"default":"GreaterThan"},"trigger_threshold":{"type":"number","optional":true,"default":0}},"block_types":{"alert_details_override":{"nesting_mode":3,"block":{"attributes":{"description_format":{"type":"string","optional":true},"display_name_format":{"type":"string","optional":true},"severity_column_name":{"type":"string","optional":true},"tactics_column_name":{"type":"string","optional":true}},"block_types":{"dynamic_property":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"entity_mapping":{"nesting_mode":3,"block":{"attributes":{"entity_type":{"type":"string","required":true}},"block_types":{"field_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true},"identifier":{"type":"string","required":true}}},"required":true}}},"optional":true},"event_grouping":{"nesting_mode":3,"block":{"attributes":{"aggregation_method":{"type":"string","required":true}}},"optional":true},"incident":{"nesting_mode":3,"block":{"attributes":{"create_incident_enabled":{"type":"bool","required":true}},"block_types":{"grouping":{"nesting_mode":3,"block":{"attributes":{"by_alert_details":{"type":["list","string"],"optional":true},"by_custom_details":{"type":["list","string"],"optional":true},"by_entities":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"entity_matching_method":{"type":"string","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"string","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true,"computed":true},"sentinel_entity_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_alert_rule_threat_intelligence":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_automation_rule":{"block":{"attributes":{"condition_json":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"expiration":{"type":"string","optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"order":{"type":"number","required":true},"triggers_on":{"type":"string","optional":true,"default":"Incidents"},"triggers_when":{"type":"string","optional":true,"default":"Created"}},"block_types":{"action_incident":{"nesting_mode":3,"block":{"attributes":{"classification":{"type":"string","optional":true},"classification_comment":{"type":"string","optional":true},"labels":{"type":["list","string"],"optional":true},"order":{"type":"number","required":true},"owner_id":{"type":"string","optional":true},"severity":{"type":"string","optional":true},"status":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["action_incident","action_playbook"]},"action_playbook":{"nesting_mode":3,"block":{"attributes":{"logic_app_id":{"type":"string","required":true},"order":{"type":"number","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true,"at_least_one_of":["action_incident","action_playbook"]}}}},"azurerm_sentinel_data_connector_aws_cloud_trail":{"block":{"attributes":{"aws_role_arn":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_data_connector_aws_s3":{"block":{"attributes":{"aws_role_arn":{"type":"string","required":true},"destination_table":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sqs_urls":{"type":["list","string"],"required":true}}}},"azurerm_sentinel_data_connector_azure_active_directory":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_azure_advanced_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_azure_security_center":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_dynamics_365":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_iot":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_cloud_app_security":{"block":{"attributes":{"alerts_enabled":{"type":"bool","optional":true,"default":true},"discovery_logs_enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_defender_advanced_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_threat_intelligence":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"microsoft_emerging_threat_feed_lookback_date":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_365":{"block":{"attributes":{"exchange_enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sharepoint_enabled":{"type":"bool","optional":true,"default":true},"teams_enabled":{"type":"bool","optional":true,"default":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_365_project":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_atp":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_irm":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_power_bi":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_threat_intelligence":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"lookback_date":{"type":"string","optional":true,"default":"1970-01-01T00:00:00Z"},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_threat_intelligence_taxii":{"block":{"attributes":{"api_root_url":{"type":"string","required":true},"collection_id":{"type":"string","required":true},"display_name":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"lookback_date":{"type":"string","optional":true,"default":"1970-01-01T00:00:00Z"},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"polling_frequency":{"type":"string","optional":true,"default":"OnceAnHour"},"tenant_id":{"type":"string","optional":true,"computed":true},"user_name":{"type":"string","optional":true}}}},"azurerm_sentinel_log_analytics_workspace_onboarding":{"block":{"attributes":{"customer_managed_key_enabled":{"type":"bool","optional":true,"default":false},"workspace_id":{"type":"string","required":true}}}},"azurerm_sentinel_metadata":{"block":{"attributes":{"content_id":{"type":"string","required":true},"content_schema_version":{"type":"string","optional":true,"default":"2.0"},"custom_version":{"type":"string","optional":true},"dependency":{"type":"string","optional":true},"first_publish_date":{"type":"string","optional":true},"icon_id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"last_publish_date":{"type":"string","optional":true},"name":{"type":"string","required":true},"parent_id":{"type":"string","required":true},"preview_images":{"type":["list","string"],"optional":true},"preview_images_dark":{"type":["list","string"],"optional":true},"providers":{"type":["list","string"],"optional":true},"threat_analysis_tactics":{"type":["list","string"],"optional":true},"threat_analysis_techniques":{"type":["list","string"],"optional":true},"version":{"type":"string","optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"author":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"link":{"type":"string","optional":true},"name":{"type":"string","optional":true}}},"optional":true},"category":{"nesting_mode":3,"block":{"attributes":{"domains":{"type":["list","string"],"optional":true},"verticals":{"type":["list","string"],"optional":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"name":{"type":"string","optional":true}}},"optional":true,"computed":true},"support":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"link":{"type":"string","optional":true},"name":{"type":"string","optional":true},"tier":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_threat_intelligence_indicator":{"block":{"attributes":{"confidence":{"type":"number","optional":true,"default":-1},"created_by":{"type":"string","optional":true},"created_on":{"type":"string","computed":true},"defanged":{"type":"bool","computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"extension":{"type":"string","optional":true,"computed":true},"external_id":{"type":"string","computed":true},"external_last_updated_time_utc":{"type":"string","computed":true},"guid":{"type":"string","computed":true},"indicator_type":{"type":["list","string"],"computed":true},"language":{"type":"string","optional":true},"last_updated_time_utc":{"type":"string","computed":true},"object_marking_refs":{"type":["list","string"],"optional":true},"parsed_pattern":{"type":["list",["object",{"pattern_type_key":"string","pattern_type_values":["list",["object",{"value":"string","value_type":"string"}]]}]],"computed":true},"pattern":{"type":"string","required":true},"pattern_type":{"type":"string","required":true},"pattern_version":{"type":"string","optional":true},"revoked":{"type":"bool","optional":true,"default":false},"source":{"type":"string","required":true},"tags":{"type":["list","string"],"optional":true},"threat_types":{"type":["list","string"],"optional":true},"validate_from_utc":{"type":"string","required":true},"validate_until_utc":{"type":"string","optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"external_reference":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"hashes":{"type":["map","string"],"optional":true},"id":{"type":"string","computed":true},"source_name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"granular_marking":{"nesting_mode":3,"block":{"attributes":{"language":{"type":"string","optional":true},"marking_ref":{"type":"string","optional":true},"selectors":{"type":["list","string"],"optional":true}}},"optional":true},"kill_chain_phase":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_sentinel_watchlist":{"block":{"attributes":{"default_duration":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"item_search_key":{"type":"string","required":true},"labels":{"type":["list","string"],"optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_watchlist_item":{"block":{"attributes":{"name":{"type":"string","optional":true,"computed":true},"properties":{"type":["map","string"],"required":true},"watchlist_id":{"type":"string","required":true}}}},"azurerm_service_fabric_cluster":{"block":{"attributes":{"add_on_features":{"type":["set","string"],"optional":true},"cluster_code_version":{"type":"string","optional":true,"computed":true},"cluster_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"management_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"reliability_level":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_fabric_zonal_upgrade_mode":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"upgrade_mode":{"type":"string","required":true},"vm_image":{"type":"string","required":true},"vmss_zonal_upgrade_mode":{"type":"string","optional":true}},"block_types":{"azure_active_directory":{"nesting_mode":3,"block":{"attributes":{"client_application_id":{"type":"string","required":true},"cluster_application_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"thumbprint":{"type":"string","required":true},"thumbprint_secondary":{"type":"string","optional":true},"x509_store_name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["certificate_common_names"]},"certificate_common_names":{"nesting_mode":3,"block":{"attributes":{"x509_store_name":{"type":"string","required":true}},"block_types":{"common_names":{"nesting_mode":4,"block":{"attributes":{"certificate_common_name":{"type":"string","required":true},"certificate_issuer_thumbprint":{"type":"string","optional":true}}},"required":true}}},"optional":true,"conflicts_with":["certificate"]},"client_certificate_common_name":{"nesting_mode":3,"block":{"attributes":{"common_name":{"type":"string","required":true},"is_admin":{"type":"bool","required":true},"issuer_thumbprint":{"type":"string","optional":true}}},"optional":true},"client_certificate_thumbprint":{"nesting_mode":3,"block":{"attributes":{"is_admin":{"type":"bool","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"diagnostics_config":{"nesting_mode":3,"block":{"attributes":{"blob_endpoint":{"type":"string","required":true},"protected_account_key_name":{"type":"string","required":true},"queue_endpoint":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"table_endpoint":{"type":"string","required":true}}},"optional":true},"fabric_settings":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"node_type":{"nesting_mode":3,"block":{"attributes":{"capacities":{"type":["map","string"],"optional":true},"client_endpoint_port":{"type":"number","required":true},"durability_level":{"type":"string","optional":true,"default":"Bronze"},"http_endpoint_port":{"type":"number","required":true},"instance_count":{"type":"number","required":true},"is_primary":{"type":"bool","required":true},"is_stateless":{"type":"bool","optional":true},"multiple_availability_zones":{"type":"bool","optional":true},"name":{"type":"string","required":true},"placement_properties":{"type":["map","string"],"optional":true},"reverse_proxy_endpoint_port":{"type":"number","optional":true}},"block_types":{"application_ports":{"nesting_mode":3,"block":{"attributes":{"end_port":{"type":"number","required":true},"start_port":{"type":"number","required":true}}},"optional":true,"computed":true},"ephemeral_ports":{"nesting_mode":3,"block":{"attributes":{"end_port":{"type":"number","required":true},"start_port":{"type":"number","required":true}}},"optional":true,"computed":true}}},"required":true},"reverse_proxy_certificate":{"nesting_mode":3,"block":{"attributes":{"thumbprint":{"type":"string","required":true},"thumbprint_secondary":{"type":"string","optional":true},"x509_store_name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["reverse_proxy_certificate_common_names"]},"reverse_proxy_certificate_common_names":{"nesting_mode":3,"block":{"attributes":{"x509_store_name":{"type":"string","required":true}},"block_types":{"common_names":{"nesting_mode":4,"block":{"attributes":{"certificate_common_name":{"type":"string","required":true},"certificate_issuer_thumbprint":{"type":"string","optional":true}}},"required":true}}},"optional":true,"conflicts_with":["reverse_proxy_certificate"]},"upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"force_restart_enabled":{"type":"bool","optional":true},"health_check_retry_timeout":{"type":"string","optional":true,"default":"00:45:00"},"health_check_stable_duration":{"type":"string","optional":true,"default":"00:01:00"},"health_check_wait_duration":{"type":"string","optional":true,"default":"00:00:30"},"upgrade_domain_timeout":{"type":"string","optional":true,"default":"02:00:00"},"upgrade_replica_set_check_timeout":{"type":"string","optional":true,"default":"10675199.02:48:05.4775807"},"upgrade_timeout":{"type":"string","optional":true,"default":"12:00:00"}},"block_types":{"delta_health_policy":{"nesting_mode":3,"block":{"attributes":{"max_delta_unhealthy_applications_percent":{"type":"number","optional":true,"default":0},"max_delta_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0},"max_upgrade_domain_delta_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0}}},"optional":true},"health_policy":{"nesting_mode":3,"block":{"attributes":{"max_unhealthy_applications_percent":{"type":"number","optional":true,"default":0},"max_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0}}},"optional":true}}},"optional":true}}}},"azurerm_service_fabric_managed_cluster":{"block":{"attributes":{"backup_service_enabled":{"type":"bool","optional":true},"client_connection_port":{"type":"number","required":true},"dns_name":{"type":"string","optional":true,"computed":true},"dns_service_enabled":{"type":"bool","optional":true},"http_gateway_port":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Basic"},"tags":{"type":["map","string"],"optional":true},"upgrade_wave":{"type":"string","optional":true,"default":"Wave0"},"username":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"client_application_id":{"type":"string","required":true},"cluster_application_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"common_name":{"type":"string","optional":true},"thumbprint":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"custom_fabric_setting":{"nesting_mode":3,"block":{"attributes":{"parameter":{"type":"string","required":true},"section":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"lb_rule":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","required":true},"probe_protocol":{"type":"string","required":true},"probe_request_path":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"required":true},"node_type":{"nesting_mode":3,"block":{"attributes":{"application_port_range":{"type":"string","required":true},"capacities":{"type":["map","string"],"optional":true},"data_disk_size_gb":{"type":"number","required":true},"data_disk_type":{"type":"string","optional":true,"default":"Standard_LRS"},"ephemeral_port_range":{"type":"string","required":true},"id":{"type":"string","computed":true},"multiple_placement_groups_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"placement_properties":{"type":["map","string"],"optional":true},"primary":{"type":"bool","optional":true},"stateless":{"type":"bool","optional":true},"vm_image_offer":{"type":"string","required":true},"vm_image_publisher":{"type":"string","required":true},"vm_image_sku":{"type":"string","required":true},"vm_image_version":{"type":"string","required":true},"vm_instance_count":{"type":"number","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"vm_secrets":{"nesting_mode":3,"block":{"attributes":{"vault_id":{"type":"string","required":true}},"block_types":{"certificates":{"nesting_mode":3,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true}}}},"azurerm_service_plan":{"block":{"attributes":{"app_service_environment_id":{"type":"string","optional":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"maximum_elastic_worker_count":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"per_site_scaling_enabled":{"type":"bool","optional":true,"default":false},"premium_plan_auto_scale_enabled":{"type":"bool","optional":true,"default":false},"reserved":{"type":"bool","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"worker_count":{"type":"number","optional":true,"computed":true},"zone_balancing_enabled":{"type":"bool","optional":true}}}},"azurerm_servicebus_namespace":{"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":0},"default_primary_connection_string":{"type":"string","computed":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_connection_string":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"endpoint":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"premium_messaging_partitions":{"type":"number","optional":true,"default":0},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_id":{"type":"string","required":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule_set":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Allow"},"ip_rules":{"type":["set","string"],"optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"trusted_services_allowed":{"type":"bool","optional":true,"default":false}},"block_types":{"network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_servicebus_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_servicebus_namespace_disaster_recovery_config":{"block":{"attributes":{"alias_authorization_rule_id":{"type":"string","optional":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"name":{"type":"string","required":true},"partner_namespace_id":{"type":"string","required":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_namespace_id":{"type":"string","required":true},"secondary_connection_string_alias":{"type":"string","computed":true}}}},"azurerm_servicebus_queue":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"computed":true},"batched_operations_enabled":{"type":"bool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"bool","optional":true,"default":false},"default_message_ttl":{"type":"string","optional":true,"computed":true},"duplicate_detection_history_time_window":{"type":"string","optional":true,"default":"PT10M"},"express_enabled":{"type":"bool","optional":true,"default":false},"forward_dead_lettered_messages_to":{"type":"string","optional":true},"forward_to":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"max_message_size_in_kilobytes":{"type":"number","optional":true,"computed":true},"max_size_in_megabytes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"partitioning_enabled":{"type":"bool","optional":true,"default":false},"requires_duplicate_detection":{"type":"bool","optional":true,"default":false},"requires_session":{"type":"bool","optional":true,"default":false},"status":{"type":"string","optional":true,"default":"Active"}}}},"azurerm_servicebus_queue_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"queue_id":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_servicebus_subscription":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"bool","optional":true},"client_scoped_subscription_enabled":{"type":"bool","optional":true,"default":false},"dead_lettering_on_filter_evaluation_error":{"type":"bool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"bool","optional":true},"default_message_ttl":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"forward_dead_lettered_messages_to":{"type":"string","optional":true},"forward_to":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","required":true},"name":{"type":"string","required":true},"requires_session":{"type":"bool","optional":true},"status":{"type":"string","optional":true,"default":"Active"},"topic_id":{"type":"string","required":true}},"block_types":{"client_scoped_subscription":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"is_client_scoped_subscription_durable":{"type":"bool","computed":true},"is_client_scoped_subscription_shareable":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_servicebus_subscription_rule":{"block":{"attributes":{"action":{"type":"string","optional":true},"filter_type":{"type":"string","required":true},"name":{"type":"string","required":true},"sql_filter":{"type":"string","optional":true},"sql_filter_compatibility_level":{"type":"number","computed":true},"subscription_id":{"type":"string","required":true}},"block_types":{"correlation_filter":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"correlation_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"label":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"message_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"properties":{"type":["map","string"],"optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"reply_to":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"reply_to_session_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"session_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"to":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]}}},"optional":true,"conflicts_with":["sql_filter"]}}}},"azurerm_servicebus_topic":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"bool","optional":true},"default_message_ttl":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"duplicate_detection_history_time_window":{"type":"string","optional":true,"default":"PT10M"},"express_enabled":{"type":"bool","optional":true},"max_message_size_in_kilobytes":{"type":"number","optional":true,"computed":true},"max_size_in_megabytes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"partitioning_enabled":{"type":"bool","optional":true},"requires_duplicate_detection":{"type":"bool","optional":true},"status":{"type":"string","optional":true,"default":"Active"},"support_ordering":{"type":"bool","optional":true}}}},"azurerm_servicebus_topic_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false},"topic_id":{"type":"string","required":true}}}},"azurerm_shared_image":{"block":{"attributes":{"accelerated_network_support_enabled":{"type":"bool","optional":true},"architecture":{"type":"string","optional":true,"default":"x64"},"confidential_vm_enabled":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","trusted_launch_enabled","confidential_vm_supported"]},"confidential_vm_supported":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","trusted_launch_enabled","confidential_vm_enabled"]},"description":{"type":"string","optional":true},"disk_controller_type_nvme_enabled":{"type":"bool","optional":true},"disk_types_not_allowed":{"type":["set","string"],"optional":true},"end_of_life_date":{"type":"string","optional":true},"eula":{"type":"string","optional":true},"gallery_name":{"type":"string","required":true},"hibernation_enabled":{"type":"bool","optional":true},"hyper_v_generation":{"type":"string","optional":true,"default":"V1"},"location":{"type":"string","required":true},"max_recommended_memory_in_gb":{"type":"number","optional":true},"max_recommended_vcpu_count":{"type":"number","optional":true},"min_recommended_memory_in_gb":{"type":"number","optional":true},"min_recommended_vcpu_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"privacy_statement_uri":{"type":"string","optional":true},"release_note_uri":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"specialized":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"trusted_launch_enabled":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","confidential_vm_supported","confidential_vm_enabled"]},"trusted_launch_supported":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_enabled","confidential_vm_supported","confidential_vm_enabled"]}},"block_types":{"identifier":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true}}},"required":true},"purchase_plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","optional":true},"publisher":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_shared_image_gallery":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_name":{"type":"string","computed":true}},"block_types":{"sharing":{"nesting_mode":3,"block":{"attributes":{"permission":{"type":"string","required":true}},"block_types":{"community_gallery":{"nesting_mode":3,"block":{"attributes":{"eula":{"type":"string","required":true},"name":{"type":"string","computed":true},"prefix":{"type":"string","required":true},"publisher_email":{"type":"string","required":true},"publisher_uri":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_shared_image_version":{"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"],"required_with":["storage_account_id"]},"deletion_of_replicated_locations_enabled":{"type":"bool","optional":true,"default":false},"end_of_life_date":{"type":"string","optional":true},"exclude_from_latest":{"type":"bool","optional":true,"default":false},"gallery_name":{"type":"string","required":true},"image_name":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_image_id":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"]},"name":{"type":"string","required":true},"os_disk_snapshot_id":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"]},"replication_mode":{"type":"string","optional":true,"default":"Full"},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true,"required_with":["blob_uri"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"target_region":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"exclude_from_latest_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"regional_replica_count":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"required":true}}}},"azurerm_signalr_service":{"block":{"attributes":{"aad_auth_enabled":{"type":"bool","optional":true,"default":true},"connectivity_logs_enabled":{"type":"bool","optional":true,"default":false},"hostname":{"type":"string","computed":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":false},"ip_address":{"type":"string","computed":true},"live_trace_enabled":{"type":"bool","optional":true,"default":false},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"public_port":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"server_port":{"type":"number","computed":true},"serverless_connection_timeout_in_seconds":{"type":"number","optional":true,"default":30},"service_mode":{"type":"string","optional":true,"default":"Default"},"tags":{"type":["map","string"],"optional":true},"tls_client_cert_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"live_trace":{"nesting_mode":3,"block":{"attributes":{"connectivity_logs_enabled":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true},"upstream_endpoint":{"nesting_mode":4,"block":{"attributes":{"category_pattern":{"type":["list","string"],"required":true},"event_pattern":{"type":["list","string"],"required":true},"hub_pattern":{"type":["list","string"],"required":true},"url_template":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_signalr_service_custom_certificate":{"block":{"attributes":{"certificate_version":{"type":"string","computed":true},"custom_certificate_id":{"type":"string","required":true},"name":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}}}},"azurerm_signalr_service_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"signalr_custom_certificate_id":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}}}},"azurerm_signalr_service_network_acl":{"block":{"attributes":{"default_action":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}},"block_types":{"private_endpoint":{"nesting_mode":4,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true},"denied_request_types":{"type":["set","string"],"optional":true},"id":{"type":"string","required":true}}},"optional":true},"public_network":{"nesting_mode":3,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.denied_request_types"]},"denied_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.allowed_request_types"]}}},"required":true}}}},"azurerm_signalr_shared_private_link_resource":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"signalr_service_id":{"type":"string","required":true},"status":{"type":"string","computed":true},"sub_resource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_site_recovery_fabric":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_hyperv_network_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_network_name":{"type":"string","required":true},"source_system_center_virtual_machine_manager_name":{"type":"string","required":true},"target_network_id":{"type":"string","required":true}}}},"azurerm_site_recovery_hyperv_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_hours":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_hours":{"type":"number","required":true},"recovery_vault_id":{"type":"string","required":true},"replication_interval_in_seconds":{"type":"number","required":true}}}},"azurerm_site_recovery_hyperv_replication_policy_association":{"block":{"attributes":{"hyperv_site_id":{"type":"string","required":true},"name":{"type":"string","required":true},"policy_id":{"type":"string","required":true}}}},"azurerm_site_recovery_network_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_network_id":{"type":"string","required":true},"source_recovery_fabric_name":{"type":"string","required":true},"target_network_id":{"type":"string","required":true},"target_recovery_fabric_name":{"type":"string","required":true}}}},"azurerm_site_recovery_protection_container":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_fabric_name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_protection_container_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_fabric_name":{"type":"string","required":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_source_protection_container_name":{"type":"string","required":true},"recovery_target_protection_container_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"automatic_update":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"SystemAssignedIdentity"},"automation_account_id":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_site_recovery_replicated_vm":{"block":{"attributes":{"managed_disk":{"type":["set",["object",{"disk_id":"string","staging_storage_account_id":"string","target_disk_encryption":["list",["object",{"disk_encryption_key":["list",["object",{"secret_url":"string","vault_id":"string"}]],"key_encryption_key":["list",["object",{"key_url":"string","vault_id":"string"}]]}]],"target_disk_encryption_set_id":"string","target_disk_type":"string","target_replica_disk_type":"string","target_resource_group_id":"string"}]],"optional":true,"computed":true},"multi_vm_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_interface":{"type":["set",["object",{"failover_test_public_ip_address_id":"string","failover_test_static_ip":"string","failover_test_subnet_name":"string","recovery_load_balancer_backend_address_pool_ids":["set","string"],"recovery_public_ip_address_id":"string","source_network_interface_id":"string","target_static_ip":"string","target_subnet_name":"string"}]],"optional":true,"computed":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_recovery_fabric_name":{"type":"string","required":true},"source_recovery_protection_container_name":{"type":"string","required":true},"source_vm_id":{"type":"string","required":true},"target_availability_set_id":{"type":"string","optional":true,"conflicts_with":["target_zone"]},"target_boot_diagnostic_storage_account_id":{"type":"string","optional":true},"target_capacity_reservation_group_id":{"type":"string","optional":true},"target_edge_zone":{"type":"string","optional":true},"target_network_id":{"type":"string","optional":true,"computed":true},"target_proximity_placement_group_id":{"type":"string","optional":true},"target_recovery_fabric_id":{"type":"string","required":true},"target_recovery_protection_container_id":{"type":"string","required":true},"target_resource_group_id":{"type":"string","required":true},"target_virtual_machine_scale_set_id":{"type":"string","optional":true},"target_virtual_machine_size":{"type":"string","optional":true,"computed":true},"target_zone":{"type":"string","optional":true},"test_network_id":{"type":"string","optional":true,"computed":true},"unmanaged_disk":{"type":["set",["object",{"disk_uri":"string","staging_storage_account_id":"string","target_storage_account_id":"string"}]],"optional":true,"computed":true}}}},"azurerm_site_recovery_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_minutes":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_minutes":{"type":"number","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_replication_recovery_plan":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_recovery_fabric_id":{"type":"string","required":true},"target_recovery_fabric_id":{"type":"string","required":true}},"block_types":{"azure_to_azure_settings":{"nesting_mode":3,"block":{"attributes":{"primary_edge_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.recovery_edge_zone"]},"primary_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.recovery_zone"]},"recovery_edge_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.primary_edge_zone"]},"recovery_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.primary_zone"]}}},"optional":true},"boot_recovery_group":{"nesting_mode":3,"block":{"attributes":{"replicated_protected_items":{"type":["list","string"],"optional":true}},"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true},"failover_recovery_group":{"nesting_mode":3,"block":{"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true},"shutdown_recovery_group":{"nesting_mode":3,"block":{"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_site_recovery_services_vault_hyperv_site":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_site_recovery_vmware_replicated_vm":{"block":{"attributes":{"appliance_name":{"type":"string","required":true},"default_log_storage_account_id":{"type":"string","optional":true,"exactly_one_of":["managed_disk","default_log_storage_account_id"]},"default_recovery_disk_type":{"type":"string","optional":true,"exactly_one_of":["managed_disk","default_recovery_disk_type"]},"default_target_disk_encryption_set_id":{"type":"string","optional":true},"license_type":{"type":"string","optional":true,"default":"NotSpecified"},"multi_vm_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"physical_server_credential_name":{"type":"string","required":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_vm_name":{"type":"string","required":true},"target_availability_set_id":{"type":"string","optional":true,"conflicts_with":["target_zone"]},"target_boot_diagnostics_storage_account_id":{"type":"string","optional":true},"target_network_id":{"type":"string","optional":true,"required_with":["network_interface"]},"target_proximity_placement_group_id":{"type":"string","optional":true},"target_resource_group_id":{"type":"string","required":true},"target_vm_name":{"type":"string","required":true},"target_vm_size":{"type":"string","optional":true},"target_zone":{"type":"string","optional":true,"conflicts_with":["target_availability_set_id"]},"test_network_id":{"type":"string","optional":true}},"block_types":{"managed_disk":{"nesting_mode":3,"block":{"attributes":{"disk_id":{"type":"string","required":true},"log_storage_account_id":{"type":"string","optional":true},"target_disk_encryption_set_id":{"type":"string","optional":true},"target_disk_type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"is_primary":{"type":"bool","required":true},"source_mac_address":{"type":"string","required":true},"target_static_ip":{"type":"string","optional":true},"target_subnet_name":{"type":"string","optional":true},"test_subnet_name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_site_recovery_vmware_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_minutes":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_minutes":{"type":"number","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_site_recovery_vmware_replication_policy_association":{"block":{"attributes":{"name":{"type":"string","required":true},"policy_id":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_snapshot":{"block":{"attributes":{"create_option":{"type":"string","required":true},"disk_access_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"incremental_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_access_policy":{"type":"string","optional":true,"default":"AllowAll"},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"source_resource_id":{"type":"string","optional":true},"source_uri":{"type":"string","optional":true},"storage_account_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"trusted_launch_enabled":{"type":"bool","computed":true}},"block_types":{"encryption_settings":{"nesting_mode":3,"block":{"block_types":{"disk_encryption_key":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"required":true},"key_encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_source_control_token":{"block":{"attributes":{"token":{"type":"string","required":true},"token_secret":{"type":"string","optional":true},"type":{"type":"string","required":true}}}},"azurerm_spatial_anchors_account":{"block":{"attributes":{"account_domain":{"type":"string","computed":true},"account_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_spring_cloud_accelerator":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_active_deployment":{"block":{"attributes":{"deployment_name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_api_portal":{"block":{"attributes":{"api_try_out_enabled":{"type":"bool","optional":true},"gateway_ids":{"type":["set","string"],"optional":true},"https_only_enabled":{"type":"bool","optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"spring_cloud_service_id":{"type":"string","required":true},"url":{"type":"string","computed":true}},"block_types":{"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"issuer_uri":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_api_portal_custom_domain":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_api_portal_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true}}}},"azurerm_spring_cloud_app":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"fqdn":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"is_public":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"public_endpoint_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"tls_enabled":{"type":"bool","optional":true,"default":false},"url":{"type":"string","computed":true}},"block_types":{"custom_persistent_disk":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":["set","string"],"optional":true},"mount_path":{"type":"string","required":true},"read_only_enabled":{"type":"bool","optional":true,"default":false},"share_name":{"type":"string","required":true},"storage_name":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress_settings":{"nesting_mode":3,"block":{"attributes":{"backend_protocol":{"type":"string","optional":true,"default":"Default"},"read_timeout_in_seconds":{"type":"number","optional":true,"default":300},"send_timeout_in_seconds":{"type":"number","optional":true,"default":60},"session_affinity":{"type":"string","optional":true,"default":"None"},"session_cookie_max_age":{"type":"number","optional":true}}},"optional":true,"computed":true},"persistent_disk":{"nesting_mode":3,"block":{"attributes":{"mount_path":{"type":"string","optional":true,"default":"/persistent"},"size_in_gb":{"type":"number","required":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_app_cosmosdb_association":{"block":{"attributes":{"api_type":{"type":"string","required":true},"cosmosdb_access_key":{"type":"string","required":true},"cosmosdb_account_id":{"type":"string","required":true},"cosmosdb_cassandra_keyspace_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"]},"cosmosdb_gremlin_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"],"required_with":["cosmosdb_gremlin_graph_name"]},"cosmosdb_gremlin_graph_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"],"required_with":["cosmosdb_gremlin_database_name"]},"cosmosdb_mongo_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_sql_database_name"]},"cosmosdb_sql_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_mongo_database_name"]},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_dynamics_application_performance_monitoring":{"block":{"attributes":{"agent_account_access_key":{"type":"string","required":true},"agent_account_name":{"type":"string","required":true},"agent_application_name":{"type":"string","optional":true},"agent_node_name":{"type":"string","optional":true},"agent_tier_name":{"type":"string","optional":true},"agent_unique_host_id":{"type":"string","optional":true},"controller_host_name":{"type":"string","required":true},"controller_port":{"type":"number","optional":true},"controller_ssl_enabled":{"type":"bool","optional":true},"globally_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_mysql_association":{"block":{"attributes":{"database_name":{"type":"string","required":true},"mysql_server_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_redis_association":{"block":{"attributes":{"name":{"type":"string","required":true},"redis_access_key":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"ssl_enabled":{"type":"bool","optional":true,"default":true}}}},"azurerm_spring_cloud_application_insights_application_performance_monitoring":{"block":{"attributes":{"connection_string":{"type":"string","optional":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"role_instance":{"type":"string","optional":true},"role_name":{"type":"string","optional":true},"sampling_percentage":{"type":"number","optional":true},"sampling_requests_per_second":{"type":"number","optional":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_application_live_view":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_build_deployment":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"build_result_id":{"type":"string","required":true},"environment_variables":{"type":["map","string"],"optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_build_pack_binding":{"block":{"attributes":{"binding_type":{"type":"string","optional":true},"name":{"type":"string","required":true},"spring_cloud_builder_id":{"type":"string","required":true}},"block_types":{"launch":{"nesting_mode":3,"block":{"attributes":{"properties":{"type":["map","string"],"optional":true},"secrets":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_builder":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"build_pack_group":{"nesting_mode":4,"block":{"attributes":{"build_pack_ids":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true},"stack":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true}}}},"azurerm_spring_cloud_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","optional":true,"at_least_one_of":["key_vault_certificate_id","certificate_content"]},"exclude_private_key":{"type":"bool","optional":true},"key_vault_certificate_id":{"type":"string","optional":true,"at_least_one_of":["key_vault_certificate_id","certificate_content"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_spring_cloud_configuration_service":{"block":{"attributes":{"generation":{"type":"string","optional":true},"name":{"type":"string","required":true},"refresh_interval_in_seconds":{"type":"number","optional":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"repository":{"nesting_mode":3,"block":{"attributes":{"ca_certificate_id":{"type":"string","optional":true},"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"label":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"patterns":{"type":["set","string"],"required":true},"private_key":{"type":"string","optional":true},"search_paths":{"type":["set","string"],"optional":true},"strict_host_key_checking":{"type":"bool","optional":true},"uri":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_spring_cloud_connection":{"block":{"attributes":{"client_type":{"type":"string","optional":true,"default":"none"},"name":{"type":"string","required":true},"spring_cloud_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_spring_cloud_container_deployment":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"arguments":{"type":["list","string"],"optional":true},"commands":{"type":["list","string"],"optional":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"instance_count":{"type":"number","optional":true,"default":1},"language_framework":{"type":"string","optional":true},"name":{"type":"string","required":true},"server":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_custom_domain":{"block":{"attributes":{"certificate_name":{"type":"string","optional":true,"required_with":["thumbprint"]},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true,"required_with":["certificate_name"]}}}},"azurerm_spring_cloud_customized_accelerator":{"block":{"attributes":{"accelerator_tags":{"type":["list","string"],"optional":true},"accelerator_type":{"type":"string","optional":true,"default":"Accelerator"},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true},"name":{"type":"string","required":true},"spring_cloud_accelerator_id":{"type":"string","required":true}},"block_types":{"git_repository":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"ca_certificate_id":{"type":"string","optional":true},"commit":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"git_tag":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"interval_in_seconds":{"type":"number","optional":true},"path":{"type":"string","optional":true},"url":{"type":"string","required":true}},"block_types":{"basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["git_repository.0.ssh_auth"]},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true}}},"optional":true,"conflicts_with":["git_repository.0.basic_auth"]}}},"required":true}}}},"azurerm_spring_cloud_dev_tool_portal":{"block":{"attributes":{"application_accelerator_enabled":{"type":"bool","optional":true,"computed":true},"application_live_view_enabled":{"type":"bool","optional":true,"computed":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"metadata_url":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_dynatrace_application_performance_monitoring":{"block":{"attributes":{"api_token":{"type":"string","optional":true},"api_url":{"type":"string","optional":true},"connection_point":{"type":"string","required":true},"environment_id":{"type":"string","optional":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true},"tenant":{"type":"string","required":true},"tenant_token":{"type":"string","required":true}}}},"azurerm_spring_cloud_elastic_application_performance_monitoring":{"block":{"attributes":{"application_packages":{"type":["list","string"],"required":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"server_url":{"type":"string","required":true},"service_name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_gateway":{"block":{"attributes":{"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"application_performance_monitoring_types":{"type":["list","string"],"optional":true},"environment_variables":{"type":["map","string"],"optional":true},"https_only":{"type":"bool","optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"sensitive_environment_variables":{"type":["map","string"],"optional":true},"spring_cloud_service_id":{"type":"string","required":true},"url":{"type":"string","computed":true}},"block_types":{"api_metadata":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"documentation_url":{"type":"string","optional":true},"server_url":{"type":"string","optional":true},"title":{"type":"string","optional":true},"version":{"type":"string","optional":true}}},"optional":true},"client_authorization":{"nesting_mode":3,"block":{"attributes":{"certificate_ids":{"type":["list","string"],"optional":true},"verification_enabled":{"type":"bool","optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["set","string"],"optional":true},"allowed_methods":{"type":["set","string"],"optional":true},"allowed_origin_patterns":{"type":["set","string"],"optional":true},"allowed_origins":{"type":["set","string"],"optional":true},"credentials_allowed":{"type":"bool","optional":true},"exposed_headers":{"type":["set","string"],"optional":true},"max_age_seconds":{"type":"number","optional":true}}},"optional":true},"local_response_cache_per_instance":{"nesting_mode":3,"block":{"attributes":{"size":{"type":"string","optional":true},"time_to_live":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["local_response_cache_per_route"]},"local_response_cache_per_route":{"nesting_mode":3,"block":{"attributes":{"size":{"type":"string","optional":true},"time_to_live":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["local_response_cache_per_instance"]},"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"default":"1"},"memory":{"type":"string","optional":true,"default":"2Gi"}}},"optional":true,"computed":true},"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"issuer_uri":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_gateway_custom_domain":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_gateway_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true}}}},"azurerm_spring_cloud_gateway_route_config":{"block":{"attributes":{"filters":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"predicates":{"type":["set","string"],"optional":true},"protocol":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","optional":true},"spring_cloud_gateway_id":{"type":"string","required":true},"sso_validation_enabled":{"type":"bool","optional":true}},"block_types":{"open_api":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","optional":true}}},"optional":true},"route":{"nesting_mode":4,"block":{"attributes":{"classification_tags":{"type":["set","string"],"optional":true},"description":{"type":"string","optional":true},"filters":{"type":["set","string"],"optional":true},"order":{"type":"number","required":true},"predicates":{"type":["set","string"],"optional":true},"sso_validation_enabled":{"type":"bool","optional":true},"title":{"type":"string","optional":true},"token_relay":{"type":"bool","optional":true},"uri":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_spring_cloud_java_deployment":{"block":{"attributes":{"environment_variables":{"type":["map","string"],"optional":true},"instance_count":{"type":"number","optional":true,"default":1},"jvm_options":{"type":"string","optional":true},"name":{"type":"string","required":true},"runtime_version":{"type":"string","optional":true,"default":"Java_8"},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_new_relic_application_performance_monitoring":{"block":{"attributes":{"agent_enabled":{"type":"bool","optional":true,"default":true},"app_name":{"type":"string","required":true},"app_server_port":{"type":"number","optional":true},"audit_mode_enabled":{"type":"bool","optional":true},"auto_app_naming_enabled":{"type":"bool","optional":true},"auto_transaction_naming_enabled":{"type":"bool","optional":true,"default":true},"custom_tracing_enabled":{"type":"bool","optional":true,"default":true},"globally_enabled":{"type":"bool","optional":true},"labels":{"type":["map","string"],"optional":true},"license_key":{"type":"string","required":true},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_service":{"block":{"attributes":{"build_agent_pool_size":{"type":"string","optional":true},"location":{"type":"string","required":true},"log_stream_public_endpoint_enabled":{"type":"bool","optional":true},"managed_environment_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"outbound_public_ip_addresses":{"type":["list","string"],"computed":true},"required_network_traffic_rules":{"type":["list",["object",{"direction":"string","fqdns":["list","string"],"ip_addresses":["list","string"],"port":"number","protocol":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"service_registry_enabled":{"type":"bool","optional":true},"service_registry_id":{"type":"string","computed":true},"sku_name":{"type":"string","optional":true,"default":"S0"},"sku_tier":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true,"default":false}},"block_types":{"config_server_git_setting":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"search_paths":{"type":["list","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"http_basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["config_server_git_setting.0.ssh_auth"]},"repository":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"name":{"type":"string","required":true},"pattern":{"type":["list","string"],"optional":true},"search_paths":{"type":["list","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"http_basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true},"strict_host_key_checking_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}},"optional":true},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true},"strict_host_key_checking_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true,"conflicts_with":["config_server_git_setting.0.http_basic_auth"]}}},"optional":true},"container_registry":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"default_build_service":{"nesting_mode":3,"block":{"attributes":{"container_registry_name":{"type":"string","optional":true}}},"optional":true},"marketplace":{"nesting_mode":3,"block":{"attributes":{"plan":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true,"computed":true},"network":{"nesting_mode":3,"block":{"attributes":{"app_network_resource_group":{"type":"string","optional":true,"computed":true},"app_subnet_id":{"type":"string","required":true},"cidr_ranges":{"type":["list","string"],"required":true},"outbound_type":{"type":"string","optional":true,"default":"loadBalancer"},"read_timeout_seconds":{"type":"number","optional":true},"service_runtime_network_resource_group":{"type":"string","optional":true,"computed":true},"service_runtime_subnet_id":{"type":"string","required":true}}},"optional":true},"trace":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true},"sample_rate":{"type":"number","optional":true,"default":10}}},"optional":true}}}},"azurerm_spring_cloud_storage":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true}}}},"azurerm_ssh_public_key":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stack_hci_cluster":{"block":{"attributes":{"automanage_configuration_id":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"cloud_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_provider_object_id":{"type":"string","computed":true},"service_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","optional":true,"computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_stack_hci_deployment_setting":{"block":{"attributes":{"arc_resource_ids":{"type":["list","string"],"required":true},"stack_hci_cluster_id":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"scale_unit":{"nesting_mode":3,"block":{"attributes":{"active_directory_organizational_unit_path":{"type":"string","required":true},"bitlocker_boot_volume_enabled":{"type":"bool","optional":true,"default":true},"bitlocker_data_volume_enabled":{"type":"bool","optional":true,"default":true},"credential_guard_enabled":{"type":"bool","optional":true,"default":false},"domain_fqdn":{"type":"string","required":true},"drift_control_enabled":{"type":"bool","optional":true,"default":true},"drtm_protection_enabled":{"type":"bool","optional":true,"default":true},"episodic_data_upload_enabled":{"type":"bool","optional":true,"default":true},"eu_location_enabled":{"type":"bool","optional":true,"default":false},"hvci_protection_enabled":{"type":"bool","optional":true,"default":true},"name_prefix":{"type":"string","required":true},"secrets_location":{"type":"string","required":true},"side_channel_mitigation_enabled":{"type":"bool","optional":true,"default":true},"smb_cluster_encryption_enabled":{"type":"bool","optional":true,"default":false},"smb_signing_enabled":{"type":"bool","optional":true,"default":true},"streaming_data_client_enabled":{"type":"bool","optional":true,"default":true},"wdac_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"cluster":{"nesting_mode":3,"block":{"attributes":{"azure_service_endpoint":{"type":"string","required":true},"cloud_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"witness_path":{"type":"string","required":true},"witness_type":{"type":"string","required":true}}},"required":true},"host_network":{"nesting_mode":3,"block":{"attributes":{"storage_auto_ip_enabled":{"type":"bool","optional":true,"default":true},"storage_connectivity_switchless_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"intent":{"nesting_mode":3,"block":{"attributes":{"adapter":{"type":["list","string"],"required":true},"adapter_property_override_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"qos_policy_override_enabled":{"type":"bool","optional":true,"default":false},"traffic_type":{"type":["list","string"],"required":true},"virtual_switch_configuration_override_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"adapter_property_override":{"nesting_mode":3,"block":{"attributes":{"jumbo_packet":{"type":"string","optional":true},"network_direct":{"type":"string","optional":true},"network_direct_technology":{"type":"string","optional":true}}},"optional":true},"qos_policy_override":{"nesting_mode":3,"block":{"attributes":{"bandwidth_percentage_smb":{"type":"string","optional":true},"priority_value8021_action_cluster":{"type":"string","optional":true},"priority_value8021_action_smb":{"type":"string","optional":true}}},"optional":true},"virtual_switch_configuration_override":{"nesting_mode":3,"block":{"attributes":{"enable_iov":{"type":"string","optional":true},"load_balancing_algorithm":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_network":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"network_adapter_name":{"type":"string","required":true},"vlan_id":{"type":"string","required":true}}},"required":true}}},"required":true},"infrastructure_network":{"nesting_mode":3,"block":{"attributes":{"dhcp_enabled":{"type":"bool","optional":true,"default":false},"dns_server":{"type":["list","string"],"required":true},"gateway":{"type":"string","required":true},"subnet_mask":{"type":"string","required":true}},"block_types":{"ip_pool":{"nesting_mode":3,"block":{"attributes":{"ending_address":{"type":"string","required":true},"starting_address":{"type":"string","required":true}}},"required":true}}},"required":true},"optional_service":{"nesting_mode":3,"block":{"attributes":{"custom_location":{"type":"string","required":true}}},"required":true},"physical_node":{"nesting_mode":3,"block":{"attributes":{"ipv4_address":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"storage":{"nesting_mode":3,"block":{"attributes":{"configuration_mode":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_stack_hci_extension":{"block":{"attributes":{"arc_setting_id":{"type":"string","required":true},"auto_upgrade_minor_version_enabled":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}}},"azurerm_stack_hci_logical_network":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_switch_name":{"type":"string","required":true}},"block_types":{"subnet":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","optional":true},"ip_allocation_method":{"type":"string","required":true},"vlan_id":{"type":"number","optional":true}},"block_types":{"ip_pool":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true},"route":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"name":{"type":"string","optional":true},"next_hop_ip_address":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_stack_hci_marketplace_gallery_image":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"hyperv_generation":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_path_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"identifier":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true}}},"required":true}}}},"azurerm_stack_hci_network_interface":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"mac_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway":{"type":"string","computed":true},"prefix_length":{"type":"string","computed":true},"private_ip_address":{"type":"string","optional":true},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_stack_hci_storage_path":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stack_hci_virtual_hard_disk":{"block":{"attributes":{"block_size_in_bytes":{"type":"number","optional":true},"custom_location_id":{"type":"string","required":true},"disk_file_format":{"type":"string","optional":true},"disk_size_in_gb":{"type":"number","required":true},"dynamic_enabled":{"type":"bool","optional":true,"default":false},"hyperv_generation":{"type":"string","optional":true},"location":{"type":"string","required":true},"logical_sector_in_bytes":{"type":"number","optional":true},"name":{"type":"string","required":true},"physical_sector_in_bytes":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"storage_path_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_static_site":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"app_settings":{"type":["map","string"],"optional":true},"default_host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_size":{"type":"string","optional":true,"default":"Free"},"sku_tier":{"type":"string","optional":true,"default":"Free"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_static_site_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"static_site_id":{"type":"string","required":true},"validation_token":{"type":"string","computed":true},"validation_type":{"type":"string","optional":true}}}},"azurerm_static_web_app":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"app_settings":{"type":["map","string"],"optional":true},"configuration_file_changes_enabled":{"type":"bool","optional":true,"default":true},"default_host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"preview_environments_enabled":{"type":"bool","optional":true,"default":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"repository_branch":{"type":"string","optional":true,"required_with":["repository_url","repository_token"]},"repository_token":{"type":"string","optional":true,"required_with":["repository_url","repository_branch"]},"repository_url":{"type":"string","optional":true,"required_with":["repository_token","repository_branch"]},"resource_group_name":{"type":"string","required":true},"sku_size":{"type":"string","optional":true,"default":"Free"},"sku_tier":{"type":"string","optional":true,"default":"Free"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"basic_auth":{"nesting_mode":3,"block":{"attributes":{"environments":{"type":"string","required":true},"password":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_static_web_app_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"static_web_app_id":{"type":"string","required":true},"validation_token":{"type":"string","computed":true},"validation_type":{"type":"string","required":true}}}},"azurerm_static_web_app_function_app_registration":{"block":{"attributes":{"function_app_id":{"type":"string","required":true},"static_web_app_id":{"type":"string","required":true}}}},"azurerm_storage_account":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"account_kind":{"type":"string","optional":true,"default":"StorageV2"},"account_replication_type":{"type":"string","required":true},"account_tier":{"type":"string","required":true},"allow_nested_items_to_be_public":{"type":"bool","optional":true,"default":true},"allowed_copy_scope":{"type":"string","optional":true},"cross_tenant_replication_enabled":{"type":"bool","optional":true,"default":false},"default_to_oauth_authentication":{"type":"bool","optional":true,"default":false},"dns_endpoint_type":{"type":"string","optional":true,"default":"Standard"},"edge_zone":{"type":"string","optional":true},"https_traffic_only_enabled":{"type":"bool","optional":true,"default":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"is_hns_enabled":{"type":"bool","optional":true,"default":false},"large_file_share_enabled":{"type":"bool","optional":true,"computed":true},"local_user_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"min_tls_version":{"type":"string","optional":true,"default":"TLS1_2"},"name":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"primary_blob_connection_string":{"type":"string","computed":true},"primary_blob_endpoint":{"type":"string","computed":true},"primary_blob_host":{"type":"string","computed":true},"primary_blob_internet_endpoint":{"type":"string","computed":true},"primary_blob_internet_host":{"type":"string","computed":true},"primary_blob_microsoft_endpoint":{"type":"string","computed":true},"primary_blob_microsoft_host":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"primary_dfs_endpoint":{"type":"string","computed":true},"primary_dfs_host":{"type":"string","computed":true},"primary_dfs_internet_endpoint":{"type":"string","computed":true},"primary_dfs_internet_host":{"type":"string","computed":true},"primary_dfs_microsoft_endpoint":{"type":"string","computed":true},"primary_dfs_microsoft_host":{"type":"string","computed":true},"primary_file_endpoint":{"type":"string","computed":true},"primary_file_host":{"type":"string","computed":true},"primary_file_internet_endpoint":{"type":"string","computed":true},"primary_file_internet_host":{"type":"string","computed":true},"primary_file_microsoft_endpoint":{"type":"string","computed":true},"primary_file_microsoft_host":{"type":"string","computed":true},"primary_location":{"type":"string","computed":true},"primary_queue_endpoint":{"type":"string","computed":true},"primary_queue_host":{"type":"string","computed":true},"primary_queue_microsoft_endpoint":{"type":"string","computed":true},"primary_queue_microsoft_host":{"type":"string","computed":true},"primary_table_endpoint":{"type":"string","computed":true},"primary_table_host":{"type":"string","computed":true},"primary_table_microsoft_endpoint":{"type":"string","computed":true},"primary_table_microsoft_host":{"type":"string","computed":true},"primary_web_endpoint":{"type":"string","computed":true},"primary_web_host":{"type":"string","computed":true},"primary_web_internet_endpoint":{"type":"string","computed":true},"primary_web_internet_host":{"type":"string","computed":true},"primary_web_microsoft_endpoint":{"type":"string","computed":true},"primary_web_microsoft_host":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"queue_encryption_key_type":{"type":"string","optional":true,"default":"Service"},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_blob_connection_string":{"type":"string","computed":true},"secondary_blob_endpoint":{"type":"string","computed":true},"secondary_blob_host":{"type":"string","computed":true},"secondary_blob_internet_endpoint":{"type":"string","computed":true},"secondary_blob_internet_host":{"type":"string","computed":true},"secondary_blob_microsoft_endpoint":{"type":"string","computed":true},"secondary_blob_microsoft_host":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_dfs_endpoint":{"type":"string","computed":true},"secondary_dfs_host":{"type":"string","computed":true},"secondary_dfs_internet_endpoint":{"type":"string","computed":true},"secondary_dfs_internet_host":{"type":"string","computed":true},"secondary_dfs_microsoft_endpoint":{"type":"string","computed":true},"secondary_dfs_microsoft_host":{"type":"string","computed":true},"secondary_file_endpoint":{"type":"string","computed":true},"secondary_file_host":{"type":"string","computed":true},"secondary_file_internet_endpoint":{"type":"string","computed":true},"secondary_file_internet_host":{"type":"string","computed":true},"secondary_file_microsoft_endpoint":{"type":"string","computed":true},"secondary_file_microsoft_host":{"type":"string","computed":true},"secondary_location":{"type":"string","computed":true},"secondary_queue_endpoint":{"type":"string","computed":true},"secondary_queue_host":{"type":"string","computed":true},"secondary_queue_microsoft_endpoint":{"type":"string","computed":true},"secondary_queue_microsoft_host":{"type":"string","computed":true},"secondary_table_endpoint":{"type":"string","computed":true},"secondary_table_host":{"type":"string","computed":true},"secondary_table_microsoft_endpoint":{"type":"string","computed":true},"secondary_table_microsoft_host":{"type":"string","computed":true},"secondary_web_endpoint":{"type":"string","computed":true},"secondary_web_host":{"type":"string","computed":true},"secondary_web_internet_endpoint":{"type":"string","computed":true},"secondary_web_internet_host":{"type":"string","computed":true},"secondary_web_microsoft_endpoint":{"type":"string","computed":true},"secondary_web_microsoft_host":{"type":"string","computed":true},"sftp_enabled":{"type":"bool","optional":true,"default":false},"shared_access_key_enabled":{"type":"bool","optional":true,"default":true},"table_encryption_key_type":{"type":"string","optional":true,"default":"Service"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azure_files_authentication":{"nesting_mode":3,"block":{"attributes":{"default_share_level_permission":{"type":"string","optional":true,"default":"None"},"directory_type":{"type":"string","required":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"domain_guid":{"type":"string","required":true},"domain_name":{"type":"string","required":true},"domain_sid":{"type":"string","optional":true},"forest_name":{"type":"string","optional":true},"netbios_domain_name":{"type":"string","optional":true},"storage_sid":{"type":"string","optional":true}}},"optional":true,"computed":true}}},"optional":true},"blob_properties":{"nesting_mode":3,"block":{"attributes":{"change_feed_enabled":{"type":"bool","optional":true,"default":false},"change_feed_retention_in_days":{"type":"number","optional":true},"default_service_version":{"type":"string","optional":true,"computed":true},"last_access_time_enabled":{"type":"bool","optional":true,"default":false},"versioning_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"container_delete_retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7}}},"optional":true},"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"delete_retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7},"permanent_delete_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"restore_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","required":true}}},"optional":true,"required_with":["blob_properties.0.delete_retention_policy"]}}},"optional":true,"computed":true},"custom_domain":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"use_subdomain":{"type":"bool","optional":true,"default":false}}},"optional":true},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"user_assigned_identity_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"immutability_policy":{"nesting_mode":3,"block":{"attributes":{"allow_protected_append_writes":{"type":"bool","required":true},"period_since_creation_in_days":{"type":"number","required":true},"state":{"type":"string","required":true}}},"optional":true},"network_rules":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":["set","string"],"optional":true,"computed":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true,"computed":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"private_link_access":{"nesting_mode":3,"block":{"attributes":{"endpoint_resource_id":{"type":"string","required":true},"endpoint_tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}},"optional":true,"computed":true},"queue_properties":{"nesting_mode":3,"block":{"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"hour_metrics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"include_apis":{"type":"bool","optional":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true},"logging":{"nesting_mode":3,"block":{"attributes":{"delete":{"type":"bool","required":true},"read":{"type":"bool","required":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true},"write":{"type":"bool","required":true}}},"optional":true,"computed":true},"minute_metrics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"include_apis":{"type":"bool","optional":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"routing":{"nesting_mode":3,"block":{"attributes":{"choice":{"type":"string","optional":true,"default":"MicrosoftRouting"},"publish_internet_endpoints":{"type":"bool","optional":true,"default":false},"publish_microsoft_endpoints":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"sas_policy":{"nesting_mode":3,"block":{"attributes":{"expiration_action":{"type":"string","optional":true,"default":"Log"},"expiration_period":{"type":"string","required":true}}},"optional":true},"share_properties":{"nesting_mode":3,"block":{"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7}}},"optional":true},"smb":{"nesting_mode":3,"block":{"attributes":{"authentication_types":{"type":["set","string"],"optional":true},"channel_encryption_type":{"type":["set","string"],"optional":true},"kerberos_ticket_encryption_type":{"type":["set","string"],"optional":true},"multichannel_enabled":{"type":"bool","optional":true,"default":false},"versions":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true,"computed":true},"static_website":{"nesting_mode":3,"block":{"attributes":{"error_404_document":{"type":"string","optional":true},"index_document":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_storage_account_customer_managed_key":{"block":{"attributes":{"federated_identity_client_id":{"type":"string","optional":true,"required_with":["user_assigned_identity_id"]},"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"key_vault_uri":{"type":"string","optional":true,"computed":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"key_version":{"type":"string","optional":true},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"storage_account_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}}},"azurerm_storage_account_local_user":{"block":{"attributes":{"home_directory":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","computed":true},"sid":{"type":"string","computed":true},"ssh_key_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["ssh_key_enabled","ssh_password_enabled"]},"ssh_password_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["ssh_key_enabled","ssh_password_enabled"]},"storage_account_id":{"type":"string","required":true}},"block_types":{"permission_scope":{"nesting_mode":3,"block":{"attributes":{"resource_name":{"type":"string","required":true},"service":{"type":"string","required":true}},"block_types":{"permissions":{"nesting_mode":3,"block":{"attributes":{"create":{"type":"bool","optional":true,"default":false},"delete":{"type":"bool","optional":true,"default":false},"list":{"type":"bool","optional":true,"default":false},"read":{"type":"bool","optional":true,"default":false},"write":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true},"ssh_authorized_key":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"key":{"type":"string","required":true}}},"optional":true,"required_with":["ssh_key_enabled"]}}}},"azurerm_storage_account_network_rules":{"block":{"attributes":{"bypass":{"type":["set","string"],"optional":true,"computed":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true},"storage_account_id":{"type":"string","required":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true}},"block_types":{"private_link_access":{"nesting_mode":3,"block":{"attributes":{"endpoint_resource_id":{"type":"string","required":true},"endpoint_tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}}},"azurerm_storage_account_queue_properties":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]},"hour_metrics":{"nesting_mode":3,"block":{"attributes":{"include_apis":{"type":"bool","optional":true,"default":false},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]},"logging":{"nesting_mode":3,"block":{"attributes":{"delete":{"type":"bool","required":true},"read":{"type":"bool","required":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true},"write":{"type":"bool","required":true}}},"optional":true,"computed":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]},"minute_metrics":{"nesting_mode":3,"block":{"attributes":{"include_apis":{"type":"bool","optional":true,"default":false},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]}}}},"azurerm_storage_account_static_website":{"block":{"attributes":{"error_404_document":{"type":"string","optional":true,"at_least_one_of":["error_404_document","index_document"]},"index_document":{"type":"string","optional":true,"at_least_one_of":["error_404_document","index_document"]},"storage_account_id":{"type":"string","required":true}}}},"azurerm_storage_blob":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"cache_control":{"type":"string","optional":true},"content_md5":{"type":"string","optional":true,"conflicts_with":["source_uri"]},"content_type":{"type":"string","optional":true,"default":"application/octet-stream"},"encryption_scope":{"type":"string","optional":true},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"parallelism":{"type":"number","optional":true,"default":8},"size":{"type":"number","optional":true,"default":0},"source":{"type":"string","optional":true,"conflicts_with":["source_uri","source_content"]},"source_content":{"type":"string","optional":true,"conflicts_with":["source","source_uri"]},"source_uri":{"type":"string","optional":true,"conflicts_with":["source","source_content"]},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"type":{"type":"string","required":true},"url":{"type":"string","computed":true}}}},"azurerm_storage_blob_inventory_policy":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"rules":{"nesting_mode":4,"block":{"attributes":{"format":{"type":"string","required":true},"name":{"type":"string","required":true},"schedule":{"type":"string","required":true},"schema_fields":{"type":["list","string"],"required":true},"scope":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"blob_types":{"type":["set","string"],"required":true},"exclude_prefixes":{"type":["set","string"],"optional":true},"include_blob_versions":{"type":"bool","optional":true,"default":false},"include_deleted":{"type":"bool","optional":true,"default":false},"include_snapshots":{"type":"bool","optional":true,"default":false},"prefix_match":{"type":["set","string"],"optional":true}}},"optional":true}}},"required":true}}}},"azurerm_storage_container":{"block":{"attributes":{"container_access_type":{"type":"string","optional":true,"default":"private"},"default_encryption_scope":{"type":"string","optional":true,"computed":true},"encryption_scope_override_enabled":{"type":"bool","optional":true,"default":true,"required_with":["default_encryption_scope"]},"has_immutability_policy":{"type":"bool","computed":true},"has_legal_hold":{"type":"bool","computed":true},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_id","storage_account_name"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_id","storage_account_name"]}}}},"azurerm_storage_container_immutability_policy":{"block":{"attributes":{"immutability_period_in_days":{"type":"number","required":true},"locked":{"type":"bool","optional":true,"default":false},"protected_append_writes_all_enabled":{"type":"bool","optional":true,"default":false},"protected_append_writes_enabled":{"type":"bool","optional":true,"default":false},"storage_container_resource_manager_id":{"type":"string","required":true}}}},"azurerm_storage_data_lake_gen2_filesystem":{"block":{"attributes":{"default_encryption_scope":{"type":"string","optional":true,"computed":true},"group":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"owner":{"type":"string","optional":true,"computed":true},"properties":{"type":["map","string"],"optional":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"ace":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"access"},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_storage_data_lake_gen2_path":{"block":{"attributes":{"filesystem_name":{"type":"string","required":true},"group":{"type":"string","optional":true,"computed":true},"owner":{"type":"string","optional":true,"computed":true},"path":{"type":"string","required":true},"resource":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"ace":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"access"},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_storage_encryption_scope":{"block":{"attributes":{"infrastructure_encryption_required":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"source":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_storage_management_policy":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"name":{"type":"string","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"block_types":{"base_blob":{"nesting_mode":3,"block":{"attributes":{"auto_tier_to_hot_from_cool_enabled":{"type":"bool","optional":true},"delete_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"delete_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"delete_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true},"snapshot":{"nesting_mode":3,"block":{"attributes":{"change_tier_to_archive_after_days_since_creation":{"type":"number","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"number","optional":true,"default":-1},"delete_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true},"version":{"nesting_mode":3,"block":{"attributes":{"change_tier_to_archive_after_days_since_creation":{"type":"number","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"number","optional":true,"default":-1},"delete_after_days_since_creation":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true}}},"required":true},"filters":{"nesting_mode":3,"block":{"attributes":{"blob_types":{"type":["set","string"],"required":true},"prefix_match":{"type":["set","string"],"optional":true}},"block_types":{"match_blob_index_tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operation":{"type":"string","optional":true,"default":"=="},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_storage_mover":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_storage_mover_agent":{"block":{"attributes":{"arc_virtual_machine_id":{"type":"string","required":true},"arc_virtual_machine_uuid":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_job_definition":{"block":{"attributes":{"agent_name":{"type":"string","optional":true},"copy_mode":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"source_name":{"type":"string","required":true},"source_sub_path":{"type":"string","optional":true},"storage_mover_project_id":{"type":"string","required":true},"target_name":{"type":"string","required":true},"target_sub_path":{"type":"string","optional":true}}}},"azurerm_storage_mover_project":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_source_endpoint":{"block":{"attributes":{"description":{"type":"string","optional":true},"export":{"type":"string","optional":true},"host":{"type":"string","required":true},"name":{"type":"string","required":true},"nfs_version":{"type":"string","optional":true,"default":"NFSauto"},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_target_endpoint":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_object_replication":{"block":{"attributes":{"destination_object_replication_id":{"type":"string","computed":true},"destination_storage_account_id":{"type":"string","required":true},"source_object_replication_id":{"type":"string","computed":true},"source_storage_account_id":{"type":"string","required":true}},"block_types":{"rules":{"nesting_mode":4,"block":{"attributes":{"copy_blobs_created_after":{"type":"string","optional":true,"default":"OnlyNewObjects"},"destination_container_name":{"type":"string","required":true},"filter_out_blobs_with_prefix":{"type":["set","string"],"optional":true},"name":{"type":"string","computed":true},"source_container_name":{"type":"string","required":true}}},"required":true}}}},"azurerm_storage_queue":{"block":{"attributes":{"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_name":{"type":"string","required":true}}}},"azurerm_storage_share":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"enabled_protocol":{"type":"string","optional":true,"default":"SMB"},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"quota":{"type":"number","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_account_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_account_id"]},"url":{"type":"string","computed":true}},"block_types":{"acl":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true}},"block_types":{"access_policy":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"start":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_storage_share_directory":{"block":{"attributes":{"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"storage_share_id":{"type":"string","required":true}}}},"azurerm_storage_share_file":{"block":{"attributes":{"content_disposition":{"type":"string","optional":true},"content_encoding":{"type":"string","optional":true},"content_length":{"type":"number","computed":true},"content_md5":{"type":"string","optional":true},"content_type":{"type":"string","optional":true,"default":"application/octet-stream"},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"default":""},"source":{"type":"string","optional":true},"storage_share_id":{"type":"string","required":true}}}},"azurerm_storage_sync":{"block":{"attributes":{"incoming_traffic_policy":{"type":"string","optional":true,"default":"AllowAllTraffic"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"registered_servers":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_storage_sync_cloud_endpoint":{"block":{"attributes":{"file_share_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_account_tenant_id":{"type":"string","optional":true,"computed":true},"storage_sync_group_id":{"type":"string","required":true}}}},"azurerm_storage_sync_group":{"block":{"attributes":{"name":{"type":"string","required":true},"storage_sync_id":{"type":"string","required":true}}}},"azurerm_storage_sync_server_endpoint":{"block":{"attributes":{"cloud_tiering_enabled":{"type":"bool","optional":true,"default":false},"initial_download_policy":{"type":"string","optional":true,"default":"NamespaceThenModifiedFiles"},"local_cache_mode":{"type":"string","optional":true,"default":"UpdateLocallyCachedFiles"},"name":{"type":"string","required":true},"registered_server_id":{"type":"string","required":true},"server_local_path":{"type":"string","required":true},"storage_sync_group_id":{"type":"string","required":true},"tier_files_older_than_days":{"type":"number","optional":true},"volume_free_space_percent":{"type":"number","optional":true,"default":20}}}},"azurerm_storage_table":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_name":{"type":"string","required":true}},"block_types":{"acl":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true}},"block_types":{"access_policy":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","required":true},"permissions":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_storage_table_entity":{"block":{"attributes":{"entity":{"type":["map","string"],"required":true},"partition_key":{"type":"string","required":true},"row_key":{"type":"string","required":true},"storage_table_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_cluster":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"streaming_capacity":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stream_analytics_function_javascript_uda":{"block":{"attributes":{"name":{"type":"string","required":true},"script":{"type":"string","required":true},"stream_analytics_job_id":{"type":"string","required":true}},"block_types":{"input":{"nesting_mode":3,"block":{"attributes":{"configuration_parameter":{"type":"bool","optional":true,"default":false},"type":{"type":"string","required":true}}},"required":true},"output":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_function_javascript_udf":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"script":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"input":{"nesting_mode":3,"block":{"attributes":{"configuration_parameter":{"type":"bool","optional":true,"default":false},"type":{"type":"string","required":true}}},"required":true},"output":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_job":{"block":{"attributes":{"compatibility_level":{"type":"string","optional":true,"computed":true},"content_storage_policy":{"type":"string","optional":true,"default":"SystemAccount"},"data_locale":{"type":"string","optional":true,"default":"en-US"},"events_late_arrival_max_delay_in_seconds":{"type":"number","optional":true,"default":5},"events_out_of_order_max_delay_in_seconds":{"type":"number","optional":true,"default":0},"events_out_of_order_policy":{"type":"string","optional":true,"default":"Adjust"},"job_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_error_policy":{"type":"string","optional":true,"default":"Drop"},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"default":"Standard"},"stream_analytics_cluster_id":{"type":"string","optional":true},"streaming_units":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"transformation_query":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Cloud"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"job_storage_account":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"}}},"optional":true}}}},"azurerm_stream_analytics_job_schedule":{"block":{"attributes":{"last_output_time":{"type":"string","computed":true},"start_mode":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"stream_analytics_job_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_managed_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"stream_analytics_cluster_name":{"type":"string","required":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"batch_max_wait_time":{"type":"string","optional":true},"batch_min_rows":{"type":"number","optional":true},"blob_write_mode":{"type":"string","optional":true,"default":"Append"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_cosmosdb":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"container_name":{"type":"string","required":true},"cosmosdb_account_key":{"type":"string","required":true},"cosmosdb_sql_database_id":{"type":"string","required":true},"document_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"stream_analytics_job_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_eventhub":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"property_columns":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_function":{"block":{"attributes":{"api_key":{"type":"string","required":true},"batch_max_count":{"type":"number","optional":true,"default":100},"batch_max_in_bytes":{"type":"number","optional":true,"default":262144},"function_app":{"type":"string","required":true},"function_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_mssql":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"database":{"type":"string","required":true},"max_batch_count":{"type":"number","optional":true,"default":10000},"max_writer_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true},"user":{"type":"string","optional":true}}}},"azurerm_stream_analytics_output_powerbi":{"block":{"attributes":{"dataset":{"type":"string","required":true},"group_id":{"type":"string","required":true},"group_name":{"type":"string","required":true},"name":{"type":"string","required":true},"stream_analytics_job_id":{"type":"string","required":true},"table":{"type":"string","required":true},"token_user_display_name":{"type":"string","optional":true},"token_user_principal_name":{"type":"string","optional":true}}}},"azurerm_stream_analytics_output_servicebus_queue":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"name":{"type":"string","required":true},"property_columns":{"type":["list","string"],"optional":true},"queue_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true},"system_property_columns":{"type":["map","string"],"optional":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_servicebus_topic":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"name":{"type":"string","required":true},"property_columns":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true},"system_property_columns":{"type":["map","string"],"optional":true},"topic_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_synapse":{"block":{"attributes":{"database":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true},"user":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_table":{"block":{"attributes":{"batch_size":{"type":"number","required":true},"columns_to_remove":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"row_key":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true}}}},"azurerm_stream_analytics_reference_input_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_reference_input_mssql":{"block":{"attributes":{"database":{"type":"string","required":true},"delta_snapshot_query":{"type":"string","optional":true},"full_snapshot_query":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"refresh_interval_duration":{"type":"string","optional":true},"refresh_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","optional":true},"username":{"type":"string","required":true}}}},"azurerm_stream_analytics_stream_input_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_eventhub":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"string","optional":true},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_eventhub_v2":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"string","optional":true},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_id":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_iothub":{"block":{"attributes":{"endpoint":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","required":true},"iothub_namespace":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","required":true},"shared_access_policy_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_subnet":{"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"default_outbound_access_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"private_endpoint_network_policies":{"type":"string","optional":true,"default":"Disabled"},"private_link_service_network_policies_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_endpoint_policy_ids":{"type":["set","string"],"optional":true},"service_endpoints":{"type":["set","string"],"optional":true},"virtual_network_name":{"type":"string","required":true}},"block_types":{"delegation":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"service_delegation":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_subnet_nat_gateway_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_network_security_group_association":{"block":{"attributes":{"network_security_group_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_route_table_association":{"block":{"attributes":{"route_table_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_service_endpoint_storage_policy":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"definition":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"service":{"type":"string","optional":true,"default":"Microsoft.Storage"},"service_resources":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_subscription":{"block":{"attributes":{"alias":{"type":"string","optional":true,"computed":true},"billing_scope_id":{"type":"string","optional":true,"exactly_one_of":["subscription_id","billing_scope_id"]},"subscription_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["subscription_id","billing_scope_id"]},"subscription_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true},"workload":{"type":"string","optional":true}}}},"azurerm_subscription_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"file_format":{"type":"string","optional":true,"default":"Csv"},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_subscription_cost_management_view":{"block":{"attributes":{"accumulated":{"type":"bool","required":true},"chart_type":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"report_type":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"timeframe":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"granularity":{"type":"string","required":true}},"block_types":{"aggregation":{"nesting_mode":4,"block":{"attributes":{"column_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"grouping":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true},"sorting":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true},"kpi":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"pivot":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_subscription_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_subscription_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_subscription_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"subscription_id":{"type":"string","required":true}}}},"azurerm_subscription_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_synapse_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_integration_runtime_azure":{"block":{"attributes":{"compute_type":{"type":"string","optional":true,"default":"General"},"core_count":{"type":"number","optional":true,"default":8},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"time_to_live_min":{"type":"number","optional":true,"default":0}}}},"azurerm_synapse_integration_runtime_self_hosted":{"block":{"attributes":{"authorization_key_primary":{"type":"string","computed":true},"authorization_key_secondary":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_linked_service":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"synapse_workspace_id":{"type":"string","required":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"integration_runtime":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_synapse_managed_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"subresource_name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_synapse_private_link_hub":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_synapse_role_assignment":{"block":{"attributes":{"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","optional":true},"role_name":{"type":"string","required":true},"synapse_spark_pool_id":{"type":"string","optional":true,"exactly_one_of":["synapse_workspace_id","synapse_spark_pool_id"]},"synapse_workspace_id":{"type":"string","optional":true,"exactly_one_of":["synapse_workspace_id","synapse_spark_pool_id"]}}}},"azurerm_synapse_spark_pool":{"block":{"attributes":{"cache_size":{"type":"number","optional":true},"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"dynamic_executor_allocation_enabled":{"type":"bool","optional":true,"default":false},"max_executors":{"type":"number","optional":true},"min_executors":{"type":"number","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true,"exactly_one_of":["node_count","auto_scale"]},"node_size":{"type":"string","required":true},"node_size_family":{"type":"string","required":true},"session_level_packages_enabled":{"type":"bool","optional":true,"default":false},"spark_events_folder":{"type":"string","optional":true,"default":"/events"},"spark_log_folder":{"type":"string","optional":true,"default":"/logs"},"spark_version":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auto_pause":{"nesting_mode":3,"block":{"attributes":{"delay_in_minutes":{"type":"number","required":true}}},"optional":true},"auto_scale":{"nesting_mode":3,"block":{"attributes":{"max_node_count":{"type":"number","required":true},"min_node_count":{"type":"number","required":true}}},"optional":true,"exactly_one_of":["node_count","auto_scale"]},"library_requirement":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"filename":{"type":"string","required":true}}},"optional":true},"spark_config":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"filename":{"type":"string","required":true}}},"optional":true}}}},"azurerm_synapse_sql_pool":{"block":{"attributes":{"collation":{"type":"string","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"data_encrypted":{"type":"bool","optional":true},"geo_backup_policy_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"recovery_database_id":{"type":"string","optional":true,"conflicts_with":["restore"]},"sku_name":{"type":"string","required":true},"storage_account_type":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"restore":{"nesting_mode":3,"block":{"attributes":{"point_in_time":{"type":"string","required":true},"source_database_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["recovery_database_id"]}}}},"azurerm_synapse_sql_pool_extended_auditing_policy":{"block":{"attributes":{"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"sql_pool_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_synapse_sql_pool_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"policy_state":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"sql_pool_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_synapse_sql_pool_vulnerability_assessment":{"block":{"attributes":{"sql_pool_security_alert_policy_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins_enabled":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_synapse_sql_pool_vulnerability_assessment_baseline":{"block":{"attributes":{"name":{"type":"string","required":true},"rule_name":{"type":"string","required":true},"sql_pool_vulnerability_assessment_id":{"type":"string","required":true}},"block_types":{"baseline":{"nesting_mode":3,"block":{"attributes":{"result":{"type":["list","string"],"required":true}}},"optional":true}}}},"azurerm_synapse_sql_pool_workload_classifier":{"block":{"attributes":{"context":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"importance":{"type":"string","optional":true},"label":{"type":"string","optional":true},"member_name":{"type":"string","required":true},"name":{"type":"string","required":true},"start_time":{"type":"string","optional":true},"workload_group_id":{"type":"string","required":true}}}},"azurerm_synapse_sql_pool_workload_group":{"block":{"attributes":{"importance":{"type":"string","optional":true,"default":"normal"},"max_resource_percent":{"type":"number","required":true},"max_resource_percent_per_request":{"type":"number","optional":true,"default":3},"min_resource_percent":{"type":"number","required":true},"min_resource_percent_per_request":{"type":"number","optional":true},"name":{"type":"string","required":true},"query_execution_timeout_in_seconds":{"type":"number","optional":true},"sql_pool_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace":{"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true,"default":false},"compute_subnet_id":{"type":"string","optional":true},"connectivity_endpoints":{"type":["map","string"],"computed":true},"data_exfiltration_protection_enabled":{"type":"bool","optional":true},"linking_allowed_for_aad_tenant_ids":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_virtual_network_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purview_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sql_administrator_login":{"type":"string","optional":true},"sql_administrator_login_password":{"type":"string","optional":true},"sql_identity_control_enabled":{"type":"bool","optional":true},"storage_data_lake_gen2_filesystem_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azure_devops_repo":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"last_commit_id":{"type":"string","optional":true},"project_name":{"type":"string","required":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true,"conflicts_with":["github_repo"]},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_name":{"type":"string","optional":true,"default":"cmk"},"key_versionless_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"github_repo":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"git_url":{"type":"string","optional":true},"last_commit_id":{"type":"string","optional":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_devops_repo"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_synapse_workspace_aad_admin":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_extended_auditing_policy":{"block":{"attributes":{"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_key":{"block":{"attributes":{"active":{"type":"bool","required":true},"customer_managed_key_name":{"type":"string","required":true},"customer_managed_key_versionless_id":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"policy_state":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_sql_aad_admin":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_vulnerability_assessment":{"block":{"attributes":{"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true},"workspace_security_alert_policy_id":{"type":"string","required":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins_enabled":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_system_center_virtual_machine_manager_availability_set":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_cloud":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_server":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"fqdn":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"port":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"username":{"type":"string","required":true}}}},"azurerm_system_center_virtual_machine_manager_virtual_machine_template":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_virtual_network":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_tenant_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_traffic_manager_azure_endpoint":{"block":{"attributes":{"always_serve_enabled":{"type":"bool","optional":true,"default":false},"enabled":{"type":"bool","optional":true,"default":true},"geo_mappings":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"computed":true},"profile_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_external_endpoint":{"block":{"attributes":{"always_serve_enabled":{"type":"bool","optional":true,"default":false},"enabled":{"type":"bool","optional":true,"default":true},"endpoint_location":{"type":"string","optional":true,"computed":true},"geo_mappings":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"computed":true},"profile_id":{"type":"string","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_nested_endpoint":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"endpoint_location":{"type":"string","optional":true,"computed":true},"geo_mappings":{"type":["list","string"],"optional":true},"minimum_child_endpoints":{"type":"number","required":true},"minimum_required_child_endpoints_ipv4":{"type":"number","optional":true},"minimum_required_child_endpoints_ipv6":{"type":"number","optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"profile_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_profile":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"max_return":{"type":"number","optional":true},"name":{"type":"string","required":true},"profile_status":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"traffic_routing_method":{"type":"string","required":true},"traffic_view_enabled":{"type":"bool","optional":true}},"block_types":{"dns_config":{"nesting_mode":3,"block":{"attributes":{"relative_name":{"type":"string","required":true},"ttl":{"type":"number","required":true}}},"required":true},"monitor_config":{"nesting_mode":3,"block":{"attributes":{"expected_status_code_ranges":{"type":["list","string"],"optional":true},"interval_in_seconds":{"type":"number","optional":true,"default":30},"path":{"type":"string","optional":true},"port":{"type":"number","required":true},"protocol":{"type":"string","required":true},"timeout_in_seconds":{"type":"number","optional":true,"default":10},"tolerated_number_of_failures":{"type":"number","optional":true,"default":3}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_trusted_signing_account":{"block":{"attributes":{"account_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_user_assigned_identity":{"block":{"attributes":{"client_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_video_indexer_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"storage":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"required":true}}}},"azurerm_virtual_desktop_application":{"block":{"attributes":{"application_group_id":{"type":"string","required":true},"command_line_argument_policy":{"type":"string","required":true},"command_line_arguments":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true,"computed":true},"icon_index":{"type":"number","optional":true},"icon_path":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"show_in_portal":{"type":"bool","optional":true}}}},"azurerm_virtual_desktop_application_group":{"block":{"attributes":{"default_desktop_display_name":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"host_pool_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true}}}},"azurerm_virtual_desktop_host_pool":{"block":{"attributes":{"custom_rdp_properties":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"load_balancer_type":{"type":"string","required":true},"location":{"type":"string","required":true},"maximum_sessions_allowed":{"type":"number","optional":true,"default":999999},"name":{"type":"string","required":true},"personal_desktop_assignment_type":{"type":"string","optional":true},"preferred_app_group_type":{"type":"string","optional":true,"default":"Desktop"},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"start_vm_on_connect":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"validate_environment":{"type":"bool","optional":true,"default":false},"vm_template":{"type":"string","optional":true}},"block_types":{"scheduled_agent_updates":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timezone":{"type":"string","optional":true,"default":"UTC"},"use_session_host_timezone":{"type":"bool","optional":true,"default":false}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"hour_of_day":{"type":"number","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_virtual_desktop_host_pool_registration_info":{"block":{"attributes":{"expiration_date":{"type":"string","required":true},"hostpool_id":{"type":"string","required":true},"token":{"type":"string","computed":true}}}},"azurerm_virtual_desktop_scaling_plan":{"block":{"attributes":{"description":{"type":"string","optional":true},"exclusion_tag":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"time_zone":{"type":"string","required":true}},"block_types":{"host_pool":{"nesting_mode":3,"block":{"attributes":{"hostpool_id":{"type":"string","required":true},"scaling_plan_enabled":{"type":"bool","required":true}}},"optional":true,"computed":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"off_peak_load_balancing_algorithm":{"type":"string","required":true},"off_peak_start_time":{"type":"string","required":true},"peak_load_balancing_algorithm":{"type":"string","required":true},"peak_start_time":{"type":"string","required":true},"ramp_down_capacity_threshold_percent":{"type":"number","required":true},"ramp_down_force_logoff_users":{"type":"bool","required":true},"ramp_down_load_balancing_algorithm":{"type":"string","required":true},"ramp_down_minimum_hosts_percent":{"type":"number","required":true},"ramp_down_notification_message":{"type":"string","required":true},"ramp_down_start_time":{"type":"string","required":true},"ramp_down_stop_hosts_when":{"type":"string","required":true},"ramp_down_wait_time_minutes":{"type":"number","required":true},"ramp_up_capacity_threshold_percent":{"type":"number","optional":true},"ramp_up_load_balancing_algorithm":{"type":"string","required":true},"ramp_up_minimum_hosts_percent":{"type":"number","optional":true},"ramp_up_start_time":{"type":"string","required":true}}},"required":true}}}},"azurerm_virtual_desktop_scaling_plan_host_pool_association":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"host_pool_id":{"type":"string","required":true},"scaling_plan_id":{"type":"string","required":true}}}},"azurerm_virtual_desktop_workspace":{"block":{"attributes":{"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_virtual_desktop_workspace_application_group_association":{"block":{"attributes":{"application_group_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_virtual_hub":{"block":{"attributes":{"address_prefix":{"type":"string","optional":true},"default_route_table_id":{"type":"string","computed":true},"hub_routing_preference":{"type":"string","optional":true,"default":"ExpressRoute"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_router_asn":{"type":"number","computed":true},"virtual_router_auto_scale_min_capacity":{"type":"number","optional":true,"default":2},"virtual_router_ips":{"type":["list","string"],"computed":true},"virtual_wan_id":{"type":"string","optional":true}},"block_types":{"route":{"nesting_mode":4,"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"next_hop_ip_address":{"type":"string","required":true}}},"optional":true}}}},"azurerm_virtual_hub_bgp_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"peer_asn":{"type":"number","required":true},"peer_ip":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true},"virtual_network_connection_id":{"type":"string","optional":true}}}},"azurerm_virtual_hub_connection":{"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"remote_virtual_network_id":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true},"static_vnet_local_route_override_criteria":{"type":"string","optional":true,"default":"Contains"}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]},"route_table_ids":{"type":["list","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]}}},"optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]},"static_vnet_route":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"optional":true},"name":{"type":"string","optional":true},"next_hop_ip_address":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]}}},"optional":true,"computed":true}}}},"azurerm_virtual_hub_ip":{"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_virtual_hub_route_table":{"block":{"attributes":{"labels":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"route":{"nesting_mode":4,"block":{"attributes":{"destinations":{"type":["set","string"],"required":true},"destinations_type":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true},"next_hop_type":{"type":"string","optional":true,"default":"ResourceId"}}},"optional":true,"computed":true}}}},"azurerm_virtual_hub_route_table_route":{"block":{"attributes":{"destinations":{"type":["set","string"],"required":true},"destinations_type":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true},"next_hop_type":{"type":"string","optional":true,"default":"ResourceId"},"route_table_id":{"type":"string","required":true}}}},"azurerm_virtual_hub_routing_intent":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"routing_policy":{"nesting_mode":3,"block":{"attributes":{"destinations":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true}}},"required":true}}}},"azurerm_virtual_hub_security_partner_provider":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"security_provider_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","optional":true}}}},"azurerm_virtual_machine":{"block":{"attributes":{"availability_set_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["zones"]},"delete_data_disks_on_termination":{"type":"bool","optional":true,"default":false},"delete_os_disk_on_termination":{"type":"bool","optional":true,"default":false},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"primary_network_interface_id":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vm_size":{"type":"string","required":true},"zones":{"type":["list","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"storage_uri":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_profile":{"nesting_mode":4,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name":{"type":"string","required":true},"custom_data":{"type":"string","optional":true,"computed":true}}},"optional":true},"os_profile_linux_config":{"nesting_mode":4,"block":{"attributes":{"disable_password_authentication":{"type":"bool","required":true}},"block_types":{"ssh_keys":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true}}},"optional":true,"conflicts_with":["os_profile_windows_config"]},"os_profile_secrets":{"nesting_mode":3,"block":{"attributes":{"source_vault_id":{"type":"string","required":true}},"block_types":{"vault_certificates":{"nesting_mode":3,"block":{"attributes":{"certificate_store":{"type":"string","optional":true},"certificate_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"os_profile_windows_config":{"nesting_mode":4,"block":{"attributes":{"enable_automatic_upgrades":{"type":"bool","optional":true,"default":false},"provision_vm_agent":{"type":"bool","optional":true,"default":false},"timezone":{"type":"string","optional":true}},"block_types":{"additional_unattend_config":{"nesting_mode":3,"block":{"attributes":{"component":{"type":"string","required":true},"content":{"type":"string","required":true},"pass":{"type":"string","required":true},"setting_name":{"type":"string","required":true}}},"optional":true},"winrm":{"nesting_mode":3,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true,"conflicts_with":["os_profile_linux_config"]},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"storage_data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","required":true},"managed_disk_id":{"type":"string","optional":true,"computed":true},"managed_disk_type":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"vhd_uri":{"type":"string","optional":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"storage_image_reference":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"offer":{"type":"string","optional":true},"publisher":{"type":"string","optional":true},"sku":{"type":"string","optional":true},"version":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"storage_os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"image_uri":{"type":"string","optional":true},"managed_disk_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["storage_os_disk.0.vhd_uri"]},"managed_disk_type":{"type":"string","optional":true,"computed":true,"conflicts_with":["storage_os_disk.0.vhd_uri"]},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true,"computed":true},"vhd_uri":{"type":"string","optional":true,"conflicts_with":["storage_os_disk.0.managed_disk_id","storage_os_disk.0.managed_disk_type"]},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"required":true}}}},"azurerm_virtual_machine_automanage_configuration_assignment":{"block":{"attributes":{"configuration_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_data_disk_attachment":{"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Attach"},"lun":{"type":"number","required":true},"managed_disk_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}}},"azurerm_virtual_machine_extension":{"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true,"conflicts_with":["protected_settings_from_key_vault"]},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["protected_settings"]}}}},"azurerm_virtual_machine_gallery_application_assignment":{"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"gallery_application_version_id":{"type":"string","required":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_implicit_data_disk_from_source":{"block":{"attributes":{"caching":{"type":"string","optional":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","required":true},"source_resource_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}}},"azurerm_virtual_machine_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration_in_seconds":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_virtual_machine_restore_point":{"block":{"attributes":{"crash_consistency_mode_enabled":{"type":"bool","optional":true,"default":false},"excluded_disks":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"virtual_machine_restore_point_collection_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_restore_point_collection":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_virtual_machine_run_command":{"block":{"attributes":{"error_blob_uri":{"type":"string","optional":true},"instance_view":{"type":["list",["object",{"end_time":"string","error_message":"string","execution_message":"string","execution_state":"string","exit_code":"number","output":"string","start_time":"string"}]],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_blob_uri":{"type":"string","optional":true},"run_as_password":{"type":"string","optional":true},"run_as_user":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"error_blob_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["error_blob_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["error_blob_managed_identity.0.client_id"]}}},"optional":true,"required_with":["error_blob_uri"]},"output_blob_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["output_blob_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["output_blob_managed_identity.0.client_id"]}}},"optional":true,"required_with":["output_blob_uri"]},"parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"protected_parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"command_id":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]},"script":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]},"script_uri":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]}},"block_types":{"script_uri_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["source.0.script_uri_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["source.0.script_uri_managed_identity.0.client_id"]}}},"optional":true,"required_with":["source.0.script_uri"]}}},"required":true}}}},"azurerm_virtual_machine_scale_set":{"block":{"attributes":{"automatic_os_upgrade":{"type":"bool","optional":true,"default":false},"eviction_policy":{"type":"string","optional":true},"health_probe_id":{"type":"string","optional":true},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"priority":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"tags":{"type":["map","string"],"optional":true},"upgrade_policy_mode":{"type":"string","required":true},"zones":{"type":["list","string"],"optional":true}},"block_types":{"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"storage_uri":{"type":"string","required":true}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["set","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":4,"block":{"attributes":{"accelerated_networking":{"type":"bool","optional":true},"ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","required":true}},"block_types":{"dns_settings":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"required":true}}},"optional":true},"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"public_ip_address_configuration":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","required":true},"idle_timeout":{"type":"number","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","required":true},"custom_data":{"type":"string","optional":true}}},"required":true},"os_profile_linux_config":{"nesting_mode":4,"block":{"attributes":{"disable_password_authentication":{"type":"bool","optional":true,"default":false}},"block_types":{"ssh_keys":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","optional":true},"path":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"os_profile_secrets":{"nesting_mode":4,"block":{"attributes":{"source_vault_id":{"type":"string","required":true}},"block_types":{"vault_certificates":{"nesting_mode":3,"block":{"attributes":{"certificate_store":{"type":"string","optional":true},"certificate_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"os_profile_windows_config":{"nesting_mode":4,"block":{"attributes":{"enable_automatic_upgrades":{"type":"bool","optional":true},"provision_vm_agent":{"type":"bool","optional":true}},"block_types":{"additional_unattend_config":{"nesting_mode":3,"block":{"attributes":{"component":{"type":"string","required":true},"content":{"type":"string","required":true},"pass":{"type":"string","required":true},"setting_name":{"type":"string","required":true}}},"optional":true},"winrm":{"nesting_mode":3,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"max_batch_instance_percent":{"type":"number","optional":true,"default":20},"max_unhealthy_instance_percent":{"type":"number","optional":true,"default":20},"max_unhealthy_upgraded_instance_percent":{"type":"number","optional":true,"default":20},"pause_time_between_batches":{"type":"string","optional":true,"default":"PT0S"}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true},"tier":{"type":"string","optional":true,"computed":true}}},"required":true},"storage_profile_data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","required":true},"managed_disk_type":{"type":"string","optional":true,"computed":true}}},"optional":true},"storage_profile_image_reference":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"offer":{"type":"string","optional":true},"publisher":{"type":"string","optional":true},"sku":{"type":"string","optional":true},"version":{"type":"string","optional":true}}},"optional":true,"computed":true},"storage_profile_os_disk":{"nesting_mode":4,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"image":{"type":"string","optional":true},"managed_disk_type":{"type":"string","optional":true,"computed":true},"name":{"type":"string","optional":true},"os_type":{"type":"string","optional":true},"vhd_containers":{"type":["set","string"],"optional":true}}},"required":true}}}},"azurerm_virtual_machine_scale_set_extension":{"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["protected_settings"]}}}},"azurerm_virtual_machine_scale_set_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration_in_seconds":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"machine_scope":{"nesting_mode":3,"block":{"attributes":{"exclude_instance_ids":{"type":["list","string"],"optional":true,"conflicts_with":["machine_scope.0.include_instance_ids"]},"include_instance_ids":{"type":["list","string"],"optional":true,"conflicts_with":["machine_scope.0.exclude_instance_ids"]}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_virtual_machine_scale_set_standby_pool":{"block":{"attributes":{"attached_virtual_machine_scale_set_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_state":{"type":"string","required":true}},"block_types":{"elasticity_profile":{"nesting_mode":3,"block":{"attributes":{"max_ready_capacity":{"type":"number","required":true},"min_ready_capacity":{"type":"number","required":true}}},"required":true}}}},"azurerm_virtual_network":{"block":{"attributes":{"address_space":{"type":["set","string"],"required":true},"bgp_community":{"type":"string","optional":true},"dns_servers":{"type":["list","string"],"optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"flow_timeout_in_minutes":{"type":"number","optional":true},"guid":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_vnet_policies":{"type":"string","optional":true,"default":"Disabled"},"resource_group_name":{"type":"string","required":true},"subnet":{"type":["set",["object",{"address_prefixes":["list","string"],"default_outbound_access_enabled":"bool","delegation":["list",["object",{"name":"string","service_delegation":["list",["object",{"actions":["set","string"],"name":"string"}]]}]],"id":"string","name":"string","private_endpoint_network_policies":"string","private_link_service_network_policies_enabled":"bool","route_table_id":"string","security_group":"string","service_endpoint_policy_ids":["set","string"],"service_endpoints":["set","string"]}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ddos_protection_plan":{"nesting_mode":3,"block":{"attributes":{"enable":{"type":"bool","required":true},"id":{"type":"string","required":true}}},"optional":true},"encryption":{"nesting_mode":3,"block":{"attributes":{"enforcement":{"type":"string","required":true}}},"optional":true}}}},"azurerm_virtual_network_dns_servers":{"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_virtual_network_gateway":{"block":{"attributes":{"active_active":{"type":"bool","optional":true,"computed":true},"bgp_route_translation_for_nat_enabled":{"type":"bool","optional":true,"default":false},"default_local_network_gateway_id":{"type":"string","optional":true},"dns_forwarding_enabled":{"type":"bool","optional":true},"edge_zone":{"type":"string","optional":true},"enable_bgp":{"type":"bool","optional":true,"computed":true},"generation":{"type":"string","optional":true,"computed":true},"ip_sec_replay_protection_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_address_enabled":{"type":"bool","optional":true},"remote_vnet_traffic_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"virtual_wan_traffic_enabled":{"type":"bool","optional":true,"default":false},"vpn_type":{"type":"string","optional":true,"default":"RouteBased"}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","optional":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]},"peer_weight":{"type":"number","optional":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]}},"block_types":{"peering_addresses":{"nesting_mode":3,"block":{"attributes":{"apipa_addresses":{"type":["list","string"],"optional":true},"default_addresses":{"type":["list","string"],"computed":true},"ip_configuration_name":{"type":"string","optional":true,"computed":true},"tunnel_ip_addresses":{"type":["list","string"],"computed":true}}},"optional":true,"computed":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]}}},"optional":true,"computed":true},"custom_route":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"optional":true}}},"optional":true},"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true,"default":"vnetGatewayConfig"},"private_ip_address_allocation":{"type":"string","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true},"policy_group":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0}},"block_types":{"policy_member":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true},"vpn_client_configuration":{"nesting_mode":3,"block":{"attributes":{"aad_audience":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_issuer","vpn_client_configuration.0.aad_tenant"]},"aad_issuer":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_audience","vpn_client_configuration.0.aad_tenant"]},"aad_tenant":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_audience","vpn_client_configuration.0.aad_issuer"]},"address_space":{"type":["list","string"],"required":true},"radius_server_address":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.radius_server_secret"]},"radius_server_secret":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.radius_server_address"]},"vpn_auth_types":{"type":["set","string"],"optional":true,"computed":true},"vpn_client_protocols":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_in_kilobytes":{"type":"number","required":true},"sa_lifetime_in_seconds":{"type":"number","required":true}}},"optional":true},"radius_server":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"score":{"type":"number","required":true},"secret":{"type":"string","required":true}}},"optional":true},"revoked_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true},"virtual_network_gateway_client_connection":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"policy_group_names":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true}}}},"azurerm_virtual_network_gateway_connection":{"block":{"attributes":{"authorization_key":{"type":"string","optional":true},"connection_mode":{"type":"string","optional":true,"default":"Default"},"connection_protocol":{"type":"string","optional":true,"computed":true},"dpd_timeout_seconds":{"type":"number","optional":true},"egress_nat_rule_ids":{"type":["set","string"],"optional":true},"enable_bgp":{"type":"bool","optional":true,"computed":true},"express_route_circuit_id":{"type":"string","optional":true},"express_route_gateway_bypass":{"type":"bool","optional":true,"computed":true},"ingress_nat_rule_ids":{"type":["set","string"],"optional":true},"local_azure_ip_address_enabled":{"type":"bool","optional":true},"local_network_gateway_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"peer_virtual_network_gateway_id":{"type":"string","optional":true},"private_link_fast_path_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"routing_weight":{"type":"number","optional":true,"computed":true},"shared_key":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"use_policy_based_traffic_selectors":{"type":"bool","optional":true,"computed":true},"virtual_network_gateway_id":{"type":"string","required":true}},"block_types":{"custom_bgp_addresses":{"nesting_mode":3,"block":{"attributes":{"primary":{"type":"string","required":true},"secondary":{"type":"string","optional":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_datasize":{"type":"number","optional":true,"computed":true},"sa_lifetime":{"type":"number","optional":true,"computed":true}}},"optional":true},"traffic_selector_policy":{"nesting_mode":3,"block":{"attributes":{"local_address_cidrs":{"type":["list","string"],"required":true},"remote_address_cidrs":{"type":["list","string"],"required":true}}},"optional":true}}}},"azurerm_virtual_network_gateway_nat_rule":{"block":{"attributes":{"ip_configuration_id":{"type":"string","optional":true},"mode":{"type":"string","optional":true,"default":"EgressSnat"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Static"},"virtual_network_gateway_id":{"type":"string","required":true}},"block_types":{"external_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"required":true},"internal_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"required":true}}}},"azurerm_virtual_network_peering":{"block":{"attributes":{"allow_forwarded_traffic":{"type":"bool","optional":true,"default":false},"allow_gateway_transit":{"type":"bool","optional":true,"default":false},"allow_virtual_network_access":{"type":"bool","optional":true,"default":true},"local_subnet_names":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"only_ipv6_peering_enabled":{"type":"bool","optional":true},"peer_complete_virtual_networks_enabled":{"type":"bool","optional":true,"default":true},"remote_subnet_names":{"type":["list","string"],"optional":true},"remote_virtual_network_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"triggers":{"type":["map","string"],"optional":true},"use_remote_gateways":{"type":"bool","optional":true,"default":false},"virtual_network_name":{"type":"string","required":true}}}},"azurerm_virtual_wan":{"block":{"attributes":{"allow_branch_to_branch_traffic":{"type":"bool","optional":true,"default":true},"disable_vpn_encryption":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"office365_local_breakout_category":{"type":"string","optional":true,"default":"None"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","optional":true,"default":"Standard"}}}},"azurerm_vmware_cluster":{"block":{"attributes":{"cluster_node_count":{"type":"number","required":true},"cluster_number":{"type":"number","computed":true},"hosts":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"vmware_cloud_id":{"type":"string","required":true}}}},"azurerm_vmware_express_route_authorization":{"block":{"attributes":{"express_route_authorization_id":{"type":"string","computed":true},"express_route_authorization_key":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_cloud_id":{"type":"string","required":true}}}},"azurerm_vmware_netapp_volume_attachment":{"block":{"attributes":{"name":{"type":"string","required":true},"netapp_volume_id":{"type":"string","required":true},"vmware_cluster_id":{"type":"string","required":true}}}},"azurerm_vmware_private_cloud":{"block":{"attributes":{"circuit":{"type":["list",["object",{"express_route_id":"string","express_route_private_peering_id":"string","primary_subnet_cidr":"string","secondary_subnet_cidr":"string"}]],"computed":true},"hcx_cloud_manager_endpoint":{"type":"string","computed":true},"internet_connection_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"management_subnet_cidr":{"type":"string","computed":true},"name":{"type":"string","required":true},"network_subnet_cidr":{"type":"string","required":true},"nsxt_certificate_thumbprint":{"type":"string","computed":true},"nsxt_manager_endpoint":{"type":"string","computed":true},"nsxt_password":{"type":"string","optional":true},"provisioning_subnet_cidr":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vcenter_certificate_thumbprint":{"type":"string","computed":true},"vcenter_password":{"type":"string","optional":true},"vcsa_endpoint":{"type":"string","computed":true},"vmotion_subnet_cidr":{"type":"string","computed":true}},"block_types":{"management_cluster":{"nesting_mode":3,"block":{"attributes":{"hosts":{"type":["list","string"],"computed":true},"id":{"type":"number","computed":true},"size":{"type":"number","required":true}}},"required":true}}}},"azurerm_voice_services_communications_gateway":{"block":{"attributes":{"api_bridge":{"type":"string","optional":true},"auto_generated_domain_name_label_scope":{"type":"string","optional":true,"default":"TenantReuse"},"codecs":{"type":"string","required":true},"connectivity":{"type":"string","required":true},"e911_type":{"type":"string","required":true},"emergency_dial_strings":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"microsoft_teams_voicemail_pilot_number":{"type":"string","optional":true},"name":{"type":"string","required":true},"on_prem_mcp_enabled":{"type":"bool","optional":true},"platforms":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"service_location":{"nesting_mode":4,"block":{"attributes":{"allowed_media_source_address_prefixes":{"type":["set","string"],"optional":true},"allowed_signaling_source_address_prefixes":{"type":["set","string"],"optional":true},"esrp_addresses":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"operator_addresses":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_voice_services_communications_gateway_test_line":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true},"purpose":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"voice_services_communications_gateway_id":{"type":"string","required":true}}}},"azurerm_vpn_gateway":{"block":{"attributes":{"bgp_route_translation_for_nat_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_preference":{"type":"string","optional":true,"default":"Microsoft Network"},"scale_unit":{"type":"number","optional":true,"default":1},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"bgp_peering_address":{"type":"string","computed":true},"peer_weight":{"type":"number","required":true}},"block_types":{"instance_0_bgp_peering_address":{"nesting_mode":3,"block":{"attributes":{"custom_ips":{"type":["set","string"],"required":true},"default_ips":{"type":["set","string"],"computed":true},"ip_configuration_id":{"type":"string","computed":true},"tunnel_ips":{"type":["set","string"],"computed":true}}},"optional":true,"computed":true},"instance_1_bgp_peering_address":{"nesting_mode":3,"block":{"attributes":{"custom_ips":{"type":["set","string"],"required":true},"default_ips":{"type":["set","string"],"computed":true},"ip_configuration_id":{"type":"string","computed":true},"tunnel_ips":{"type":["set","string"],"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_vpn_gateway_connection":{"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"remote_vpn_site_id":{"type":"string","required":true},"vpn_gateway_id":{"type":"string","required":true}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table":{"type":"string","required":true},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true},"route_table_ids":{"type":["list","string"],"required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"traffic_selector_policy":{"nesting_mode":4,"block":{"attributes":{"local_address_ranges":{"type":["set","string"],"required":true},"remote_address_ranges":{"type":["set","string"],"required":true}}},"optional":true},"vpn_link":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mbps":{"type":"number","optional":true,"default":10},"bgp_enabled":{"type":"bool","optional":true,"default":false},"connection_mode":{"type":"string","optional":true,"default":"Default"},"egress_nat_rule_ids":{"type":["set","string"],"optional":true},"ingress_nat_rule_ids":{"type":["set","string"],"optional":true},"local_azure_ip_address_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"policy_based_traffic_selector_enabled":{"type":"bool","optional":true,"default":false},"protocol":{"type":"string","optional":true,"default":"IKEv2"},"ratelimit_enabled":{"type":"bool","optional":true,"default":false},"route_weight":{"type":"number","optional":true,"default":0},"shared_key":{"type":"string","optional":true},"vpn_site_link_id":{"type":"string","required":true}},"block_types":{"custom_bgp_address":{"nesting_mode":4,"block":{"attributes":{"ip_address":{"type":"string","required":true},"ip_configuration_id":{"type":"string","required":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"encryption_algorithm":{"type":"string","required":true},"ike_encryption_algorithm":{"type":"string","required":true},"ike_integrity_algorithm":{"type":"string","required":true},"integrity_algorithm":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_kb":{"type":"number","required":true},"sa_lifetime_sec":{"type":"number","required":true}}},"optional":true}}},"required":true}}}},"azurerm_vpn_gateway_nat_rule":{"block":{"attributes":{"ip_configuration_id":{"type":"string","optional":true},"mode":{"type":"string","optional":true,"default":"EgressSnat"},"name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Static"},"vpn_gateway_id":{"type":"string","required":true}},"block_types":{"external_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"optional":true},"internal_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_vpn_server_configuration":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vpn_authentication_types":{"type":["list","string"],"required":true},"vpn_protocols":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"azure_active_directory_authentication":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","required":true},"issuer":{"type":"string","required":true},"tenant":{"type":"string","required":true}}},"optional":true},"client_revoked_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"client_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_kilobytes":{"type":"number","required":true},"sa_lifetime_seconds":{"type":"number","required":true}}},"optional":true},"radius":{"nesting_mode":3,"block":{"block_types":{"client_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"server":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"score":{"type":"number","required":true},"secret":{"type":"string","required":true}}},"optional":true},"server_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_vpn_server_configuration_policy_group":{"block":{"attributes":{"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"vpn_server_configuration_id":{"type":"string","required":true}},"block_types":{"policy":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_vpn_site":{"block":{"attributes":{"address_cidrs":{"type":["set","string"],"optional":true},"device_model":{"type":"string","optional":true},"device_vendor":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_wan_id":{"type":"string","required":true}},"block_types":{"link":{"nesting_mode":3,"block":{"attributes":{"fqdn":{"type":"string","optional":true},"id":{"type":"string","computed":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"provider_name":{"type":"string","optional":true},"speed_in_mbps":{"type":"number","optional":true,"default":0}},"block_types":{"bgp":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"peering_address":{"type":"string","required":true}}},"optional":true}}},"optional":true},"o365_policy":{"nesting_mode":3,"block":{"block_types":{"traffic_category":{"nesting_mode":3,"block":{"attributes":{"allow_endpoint_enabled":{"type":"bool","optional":true,"default":false},"default_endpoint_enabled":{"type":"bool","optional":true,"default":false},"optimize_endpoint_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_web_app_active_slot":{"block":{"attributes":{"last_successful_swap":{"type":"string","computed":true},"overwrite_network_config":{"type":"bool","optional":true,"default":true},"slot_id":{"type":"string","required":true}}}},"azurerm_web_app_hybrid_connection":{"block":{"attributes":{"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true},"web_app_id":{"type":"string","required":true}}}},"azurerm_web_application_firewall_policy":{"block":{"attributes":{"http_listener_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"path_based_rule_ids":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rules":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"group_rate_limit_by":{"type":"string","optional":true},"name":{"type":"string","optional":true},"priority":{"type":"number","required":true},"rate_limit_duration":{"type":"string","optional":true},"rate_limit_threshold":{"type":"number","optional":true},"rule_type":{"type":"string","required":true}},"block_types":{"match_conditions":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negation_condition":{"type":"bool","optional":true},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}},"block_types":{"match_variables":{"nesting_mode":3,"block":{"attributes":{"selector":{"type":"string","optional":true},"variable_name":{"type":"string","required":true}}},"required":true}}},"required":true}}},"optional":true},"managed_rules":{"nesting_mode":3,"block":{"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"selector":{"type":"string","required":true},"selector_match_operator":{"type":"string","required":true}},"block_types":{"excluded_rule_set":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"OWASP"},"version":{"type":"string","optional":true,"default":"3.2"}},"block_types":{"rule_group":{"nesting_mode":3,"block":{"attributes":{"excluded_rules":{"type":["list","string"],"optional":true},"rule_group_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"managed_rule_set":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"OWASP"},"version":{"type":"string","required":true}},"block_types":{"rule_group_override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":false},"id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"policy_settings":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"file_upload_enforcement":{"type":"bool","optional":true,"computed":true},"file_upload_limit_in_mb":{"type":"number","optional":true,"default":100},"js_challenge_cookie_expiration_in_minutes":{"type":"number","optional":true,"default":30},"max_request_body_size_in_kb":{"type":"number","optional":true,"default":128},"mode":{"type":"string","optional":true,"default":"Prevention"},"request_body_check":{"type":"bool","optional":true,"default":true},"request_body_enforcement":{"type":"bool","optional":true,"default":true},"request_body_inspect_limit_in_kb":{"type":"number","optional":true,"default":128}},"block_types":{"log_scrubbing":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"match_variable":{"type":"string","required":true},"selector":{"type":"string","optional":true},"selector_match_operator":{"type":"string","optional":true,"default":"Equals"}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_web_pubsub":{"block":{"attributes":{"aad_auth_enabled":{"type":"bool","optional":true,"default":true},"capacity":{"type":"number","optional":true,"default":1},"external_ip":{"type":"string","computed":true},"hostname":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"public_port":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"server_port":{"type":"number","computed":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tls_client_cert_enabled":{"type":"bool","optional":true,"default":false},"version":{"type":"string","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"live_trace":{"nesting_mode":3,"block":{"attributes":{"connectivity_logs_enabled":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_web_pubsub_custom_certificate":{"block":{"attributes":{"certificate_version":{"type":"string","computed":true},"custom_certificate_id":{"type":"string","required":true},"name":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_web_pubsub_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"web_pubsub_custom_certificate_id":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_web_pubsub_hub":{"block":{"attributes":{"anonymous_connections_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}},"block_types":{"event_handler":{"nesting_mode":3,"block":{"attributes":{"system_events":{"type":["set","string"],"optional":true},"url_template":{"type":"string","required":true},"user_event_pattern":{"type":"string","optional":true}},"block_types":{"auth":{"nesting_mode":3,"block":{"attributes":{"managed_identity_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"event_listener":{"nesting_mode":3,"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"eventhub_namespace_name":{"type":"string","required":true},"system_event_name_filter":{"type":["list","string"],"optional":true},"user_event_name_filter":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_web_pubsub_network_acl":{"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"},"web_pubsub_id":{"type":"string","required":true}},"block_types":{"private_endpoint":{"nesting_mode":4,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true},"denied_request_types":{"type":["set","string"],"optional":true},"id":{"type":"string","required":true}}},"optional":true},"public_network":{"nesting_mode":3,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.denied_request_types"]},"denied_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.allowed_request_types"]}}},"required":true}}}},"azurerm_web_pubsub_shared_private_link_resource":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"status":{"type":"string","computed":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_windows_function_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"computed":true},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"default":"v4.0","exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"computed":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true,"computed":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_function_app_slot":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"default":0},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"default":"v4.0","exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"computed":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true,"computed":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_virtual_machine":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"allow_extension_operations":{"type":"bool","optional":true,"default":true},"availability_set_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id","virtual_machine_scale_set_id","zone"]},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"bool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id","proximity_placement_group_id"]},"computer_name":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"dedicated_host_group_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_id"]},"dedicated_host_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_group_id"]},"disk_controller_type":{"type":"string","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"hotpatching_enabled":{"type":"bool","optional":true,"default":false},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"AutomaticByOS"},"platform_fault_domain":{"type":"number","optional":true,"default":-1,"required_with":["virtual_machine_scale_set_id"]},"priority":{"type":"string","optional":true,"default":"Regular"},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"public_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"reboot_setting":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"size":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","optional":true},"user_data":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","computed":true},"virtual_machine_scale_set_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id"]},"vm_agent_platform_updates_enabled":{"type":"bool","optional":true,"default":false},"vtpm_enabled":{"type":"bool","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"hibernation_enabled":{"type":"bool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"bool","optional":true,"default":false},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"id":{"type":"string","computed":true},"name":{"type":"string","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"os_image_notification":{"nesting_mode":3,"block":{"attributes":{"timeout":{"type":"string","optional":true,"default":"PT15M"}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_virtual_machine_scale_set":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"do_not_run_extensions_on_overprovisioned_machines":{"type":"bool","optional":true,"default":false},"edge_zone":{"type":"string","optional":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"health_probe_id":{"type":"string","optional":true},"host_group_id":{"type":"string","optional":true},"instances":{"type":"number","required":true},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"platform_fault_domain_count":{"type":"number","optional":true,"computed":true},"priority":{"type":"string","optional":true,"default":"Regular"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"sku":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","optional":true},"unique_id":{"type":"string","computed":true},"upgrade_mode":{"type":"string","optional":true,"default":"Manual"},"user_data":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"automatic_os_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"disable_automatic_rollback":{"type":"bool","required":true},"enable_automatic_os_upgrade":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"cross_zone_upgrades_enabled":{"type":"bool","optional":true},"max_batch_instance_percent":{"type":"number","required":true},"max_unhealthy_instance_percent":{"type":"number","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"number","required":true},"maximum_surge_instances_enabled":{"type":"bool","optional":true},"pause_time_between_batches":{"type":"string","required":true},"prioritize_unhealthy_instances_enabled":{"type":"bool","optional":true}}},"optional":true},"scale_in":{"nesting_mode":3,"block":{"attributes":{"force_deletion_enabled":{"type":"bool","optional":true,"default":false},"rule":{"type":"string","optional":true,"default":"Default"}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"spot_restore":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timeout":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true,"computed":true},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_web_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"current_stack":{"type":"string","optional":true,"computed":true},"docker_image_name":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_core_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"dotnet_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"java_container":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_container_version"]},"java_container_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_container"]},"java_embedded_server_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_version"]},"java_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"node_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"php_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"python":{"type":"bool","optional":true,"default":false,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"tomcat_version":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.java_embedded_server_enabled"],"required_with":["site_config.0.application_stack.0.java_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}},"block_types":{"custom_action":{"nesting_mode":3,"block":{"attributes":{"executable":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"private_memory_kb":{"type":"number","optional":true}},"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"required":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"handler_mapping":{"nesting_mode":4,"block":{"attributes":{"arguments":{"type":"string","optional":true},"extension":{"type":"string","required":true},"script_processor_path":{"type":"string","required":true}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"virtual_application":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","required":true},"preload":{"type":"bool","required":true},"virtual_path":{"type":"string","required":true}},"block_types":{"virtual_directory":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","optional":true},"virtual_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_web_app_slot":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"computed":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"current_stack":{"type":"string","optional":true,"computed":true},"docker_image_name":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_core_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"dotnet_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"java_container":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_container_version"]},"java_container_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_container"]},"java_embedded_server_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_version"]},"java_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"node_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"php_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"python":{"type":"bool","optional":true,"default":false,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"tomcat_version":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.java_embedded_server_enabled"],"required_with":["site_config.0.application_stack.0.java_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}},"block_types":{"custom_action":{"nesting_mode":3,"block":{"attributes":{"executable":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"private_memory_kb":{"type":"number","optional":true}},"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"required":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"handler_mapping":{"nesting_mode":4,"block":{"attributes":{"arguments":{"type":"string","optional":true},"extension":{"type":"string","required":true},"script_processor_path":{"type":"string","required":true}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"virtual_application":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","required":true},"preload":{"type":"bool","required":true},"virtual_path":{"type":"string","required":true}},"block_types":{"virtual_directory":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","optional":true},"virtual_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_workloads_sap_discovery_virtual_instance":{"block":{"attributes":{"central_server_virtual_machine_id":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"managed_storage_account_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_workloads_sap_single_node_virtual_instance":{"block":{"attributes":{"app_location":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_fqdn":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"single_server_configuration":{"nesting_mode":3,"block":{"attributes":{"app_resource_group_name":{"type":"string","required":true},"database_type":{"type":"string","optional":true},"secondary_ip_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}},"block_types":{"disk_volume_configuration":{"nesting_mode":4,"block":{"attributes":{"number_of_disks":{"type":"number","required":true},"size_in_gb":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}},"optional":true},"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true},"virtual_machine_resource_names":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"network_interface_names":{"type":["list","string"],"optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"os_disk_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"virtual_machine_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]}}},"optional":true}}},"required":true}}}},"azurerm_workloads_sap_three_tier_virtual_instance":{"block":{"attributes":{"app_location":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_fqdn":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"three_tier_configuration":{"nesting_mode":3,"block":{"attributes":{"app_resource_group_name":{"type":"string","required":true},"high_availability_type":{"type":"string","optional":true},"secondary_ip_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_server_configuration":{"nesting_mode":3,"block":{"attributes":{"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"central_server_configuration":{"nesting_mode":3,"block":{"attributes":{"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"database_server_configuration":{"nesting_mode":3,"block":{"attributes":{"database_type":{"type":"string","optional":true},"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"disk_volume_configuration":{"nesting_mode":4,"block":{"attributes":{"number_of_disks":{"type":"number","required":true},"size_in_gb":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}},"optional":true},"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"resource_names":{"nesting_mode":3,"block":{"block_types":{"application_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"central_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"load_balancer":{"nesting_mode":3,"block":{"attributes":{"backend_pool_names":{"type":["list","string"],"optional":true},"frontend_ip_configuration_names":{"type":["list","string"],"optional":true},"health_probe_names":{"type":["list","string"],"optional":true},"name":{"type":"string","optional":true}}},"optional":true},"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"database_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"load_balancer":{"nesting_mode":3,"block":{"attributes":{"backend_pool_names":{"type":["list","string"],"optional":true},"frontend_ip_configuration_names":{"type":["list","string"],"optional":true},"health_probe_names":{"type":["list","string"],"optional":true},"name":{"type":"string","optional":true}}},"optional":true},"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"shared_storage":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","optional":true},"private_endpoint_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"transport_create_and_mount":{"nesting_mode":3,"block":{"attributes":{"resource_group_id":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}}},"optional":true}}},"required":true}}}}}}`) + b := []byte(`{"Version":"","resource_schemas":{"azurerm_aadb2c_directory":{"block":{"attributes":{"billing_type":{"type":"string","computed":true},"country_code":{"type":"string","optional":true,"computed":true},"data_residency_location":{"type":"string","required":true},"display_name":{"type":"string","optional":true,"computed":true},"domain_name":{"type":"string","required":true},"effective_start_date":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_active_directory_domain_service":{"block":{"attributes":{"deployment_id":{"type":"string","computed":true},"domain_configuration_type":{"type":"string","optional":true},"domain_name":{"type":"string","required":true},"filtered_sync_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","computed":true},"sku":{"type":"string","required":true},"sync_owner":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true},"version":{"type":"number","computed":true}},"block_types":{"initial_replica_set":{"nesting_mode":3,"block":{"attributes":{"domain_controller_ip_addresses":{"type":["list","string"],"computed":true},"external_access_ip_address":{"type":"string","computed":true},"id":{"type":"string","computed":true},"location":{"type":"string","computed":true},"service_status":{"type":"string","computed":true},"subnet_id":{"type":"string","required":true}}},"required":true},"notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true},"notify_dc_admins":{"type":"bool","optional":true,"default":false},"notify_global_admins":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"secure_ldap":{"nesting_mode":3,"block":{"attributes":{"certificate_expiry":{"type":"string","computed":true},"certificate_thumbprint":{"type":"string","computed":true},"enabled":{"type":"bool","required":true},"external_access_enabled":{"type":"bool","optional":true,"default":false},"pfx_certificate":{"type":"string","required":true},"pfx_certificate_password":{"type":"string","required":true},"public_certificate":{"type":"string","computed":true}}},"optional":true,"computed":true},"security":{"nesting_mode":3,"block":{"attributes":{"kerberos_armoring_enabled":{"type":"bool","optional":true,"default":false},"kerberos_rc4_encryption_enabled":{"type":"bool","optional":true,"default":false},"ntlm_v1_enabled":{"type":"bool","optional":true,"default":false},"sync_kerberos_passwords":{"type":"bool","optional":true,"default":false},"sync_ntlm_passwords":{"type":"bool","optional":true,"default":false},"sync_on_prem_passwords":{"type":"bool","optional":true,"default":false},"tls_v1_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_active_directory_domain_service_replica_set":{"block":{"attributes":{"domain_controller_ip_addresses":{"type":["list","string"],"computed":true},"domain_service_id":{"type":"string","required":true},"external_access_ip_address":{"type":"string","computed":true},"location":{"type":"string","required":true},"service_status":{"type":"string","computed":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_active_directory_domain_service_trust":{"block":{"attributes":{"domain_service_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"trusted_domain_dns_ips":{"type":["list","string"],"required":true},"trusted_domain_fqdn":{"type":"string","required":true}}}},"azurerm_advanced_threat_protection":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_advisor_suppression":{"block":{"attributes":{"name":{"type":"string","required":true},"recommendation_id":{"type":"string","required":true},"resource_id":{"type":"string","required":true},"suppression_id":{"type":"string","computed":true},"ttl":{"type":"string","optional":true}}}},"azurerm_ai_foundry":{"block":{"attributes":{"application_insights_id":{"type":"string","optional":true},"container_registry_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"discovery_url":{"type":"string","computed":true},"friendly_name":{"type":"string","optional":true},"high_business_impact_enabled":{"type":"bool","optional":true,"computed":true},"key_vault_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_user_assigned_identity":{"type":"string","optional":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_id":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"managed_network":{"nesting_mode":3,"block":{"attributes":{"isolation_mode":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_ai_foundry_project":{"block":{"attributes":{"ai_services_hub_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"high_business_impact_enabled":{"type":"bool","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_user_assigned_identity":{"type":"string","optional":true,"required_with":["identity"]},"project_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_ai_services":{"block":{"attributes":{"custom_subdomain_name":{"type":"string","optional":true},"endpoint":{"type":"string","computed":true},"fqdns":{"type":["list","string"],"optional":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","optional":true,"default":"AzureServices"},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"required_with":["custom_subdomain_name"]},"storage":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"storage_account_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_analysis_services_server":{"block":{"attributes":{"admin_users":{"type":["set","string"],"optional":true},"backup_blob_container_uri":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"power_bi_service_enabled":{"type":"bool","optional":true},"querypool_connection_mode":{"type":"string","optional":true,"default":"All"},"resource_group_name":{"type":"string","required":true},"server_full_name":{"type":"string","computed":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ipv4_firewall_rule":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"range_end":{"type":"string","required":true},"range_start":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_connection":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"computed":true},"managed_api_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameter_values":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_api_management":{"block":{"attributes":{"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"developer_portal_url":{"type":"string","computed":true},"gateway_disabled":{"type":"bool","optional":true,"default":false},"gateway_regional_url":{"type":"string","computed":true},"gateway_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"management_api_url":{"type":"string","computed":true},"min_api_version":{"type":"string","optional":true},"name":{"type":"string","required":true},"notification_sender_email":{"type":"string","optional":true,"computed":true},"portal_url":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_id":{"type":"string","optional":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"publisher_email":{"type":"string","required":true},"publisher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scm_url":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_type":{"type":"string","optional":true,"default":"None"},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_location":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"gateway_disabled":{"type":"bool","optional":true,"default":false},"gateway_regional_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_id":{"type":"string","optional":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"certificate_password":{"type":"string","optional":true},"encoded_certificate":{"type":"string","required":true},"expiry":{"type":"string","computed":true},"store_name":{"type":"string","required":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true},"delegation":{"nesting_mode":3,"block":{"attributes":{"subscriptions_enabled":{"type":"bool","optional":true,"default":false},"url":{"type":"string","optional":true},"user_registration_enabled":{"type":"bool","optional":true,"default":false},"validation_key":{"type":"string","optional":true}}},"optional":true,"computed":true},"hostname_configuration":{"nesting_mode":3,"block":{"block_types":{"developer_portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_certificate_id":{"type":"string","optional":true,"computed":true},"key_vault_id":{"type":"string","optional":true,"computed":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"management":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_certificate_id":{"type":"string","optional":true,"computed":true},"key_vault_id":{"type":"string","optional":true,"computed":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_certificate_id":{"type":"string","optional":true,"computed":true},"key_vault_id":{"type":"string","optional":true,"computed":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"proxy":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"default_ssl_binding":{"type":"bool","optional":true,"computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_certificate_id":{"type":"string","optional":true,"computed":true},"key_vault_id":{"type":"string","optional":true,"computed":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]},"scm":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_certificate_id":{"type":"string","optional":true,"computed":true},"key_vault_id":{"type":"string","optional":true,"computed":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["hostname_configuration.0.management","hostname_configuration.0.portal","hostname_configuration.0.developer_portal","hostname_configuration.0.proxy","hostname_configuration.0.scm"]}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"protocols":{"nesting_mode":3,"block":{"attributes":{"enable_http2":{"type":"bool","optional":true,"computed":true,"conflicts_with":["protocols.0.http2_enabled"]},"http2_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["protocols.0.enable_http2"]}}},"optional":true,"computed":true},"security":{"nesting_mode":3,"block":{"attributes":{"backend_ssl30_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.enable_backend_ssl30"]},"backend_tls10_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.enable_backend_tls10"]},"backend_tls11_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.enable_backend_tls11"]},"enable_backend_ssl30":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.backend_ssl30_enabled"]},"enable_backend_tls10":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.backend_tls10_enabled"]},"enable_backend_tls11":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.backend_tls11_enabled"]},"enable_frontend_ssl30":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.frontend_ssl30_enabled"]},"enable_frontend_tls10":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.frontend_tls10_enabled"]},"enable_frontend_tls11":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.frontend_tls11_enabled"]},"frontend_ssl30_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.enable_frontend_ssl30"]},"frontend_tls10_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.enable_frontend_tls10"]},"frontend_tls11_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["security.0.enable_frontend_tls11"]},"tls_ecdhe_ecdsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_ecdsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_ecdhe_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes128_gcm_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha256_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_cbc_sha_ciphers_enabled":{"type":"bool","optional":true,"default":false},"tls_rsa_with_aes256_gcm_sha384_ciphers_enabled":{"type":"bool","optional":true,"default":false},"triple_des_ciphers_enabled":{"type":"bool","optional":true}}},"optional":true,"computed":true},"sign_in":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true}}},"optional":true,"computed":true},"sign_up":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true}},"block_types":{"terms_of_service":{"nesting_mode":3,"block":{"attributes":{"consent_required":{"type":"bool","required":true},"enabled":{"type":"bool","required":true},"text":{"type":"string","optional":true}}},"required":true}}},"optional":true,"computed":true},"tenant_access":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"primary_key":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true}}},"optional":true,"computed":true},"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_management_api":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_type":{"type":"string","optional":true,"computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"is_current":{"type":"bool","computed":true},"is_online":{"type":"bool","computed":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"computed":true},"protocols":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"revision":{"type":"string","required":true},"revision_description":{"type":"string","optional":true},"service_url":{"type":"string","optional":true,"computed":true},"source_api_id":{"type":"string","optional":true},"subscription_required":{"type":"bool","optional":true,"default":true},"terms_of_service_url":{"type":"string","optional":true},"version":{"type":"string","optional":true,"computed":true},"version_description":{"type":"string","optional":true},"version_set_id":{"type":"string","optional":true,"computed":true}},"block_types":{"contact":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"import":{"nesting_mode":3,"block":{"attributes":{"content_format":{"type":"string","required":true},"content_value":{"type":"string","required":true}},"block_types":{"wsdl_selector":{"nesting_mode":3,"block":{"attributes":{"endpoint_name":{"type":"string","required":true},"service_name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"license":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"oauth2_authorization":{"nesting_mode":3,"block":{"attributes":{"authorization_server_name":{"type":"string","required":true},"scope":{"type":"string","optional":true}}},"optional":true},"openid_authentication":{"nesting_mode":3,"block":{"attributes":{"bearer_token_sending_methods":{"type":["set","string"],"optional":true},"openid_provider_name":{"type":"string","required":true}}},"optional":true},"subscription_key_parameter_names":{"nesting_mode":3,"block":{"attributes":{"header":{"type":"string","required":true},"query":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_api_diagnostic":{"block":{"attributes":{"always_log_errors":{"type":"bool","optional":true,"computed":true},"api_management_logger_id":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"http_correlation_protocol":{"type":"string","optional":true,"computed":true},"identifier":{"type":"string","required":true},"log_client_ip":{"type":"bool","optional":true,"computed":true},"operation_name_format":{"type":"string","optional":true,"default":"Name"},"resource_group_name":{"type":"string","required":true},"sampling_percentage":{"type":"number","optional":true,"computed":true},"verbosity":{"type":"string","optional":true,"computed":true}},"block_types":{"backend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"backend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_api_operation":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"method":{"type":"string","required":true},"operation_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"url_template":{"type":"string","required":true}},"block_types":{"request":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"query_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"representation":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true},"schema_id":{"type":"string","optional":true},"type_name":{"type":"string","optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"form_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"response":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"status_code":{"type":"number","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"representation":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true},"schema_id":{"type":"string","optional":true},"type_name":{"type":"string","optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"form_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"template_parameter":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"required":{"type":"bool","required":true},"schema_id":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_name":{"type":"string","optional":true},"values":{"type":["set","string"],"optional":true}},"block_types":{"example":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"external_value":{"type":"string","optional":true},"name":{"type":"string","required":true},"summary":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_api_management_api_operation_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"operation_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_api_operation_tag":{"block":{"attributes":{"api_operation_id":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_api_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_api_release":{"block":{"attributes":{"api_id":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true}}}},"azurerm_api_management_api_schema":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"components":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]},"content_type":{"type":"string","required":true},"definitions":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]},"resource_group_name":{"type":"string","required":true},"schema_id":{"type":"string","required":true},"value":{"type":"string","optional":true,"exactly_one_of":["value","definitions","components"]}}}},"azurerm_api_management_api_tag":{"block":{"attributes":{"api_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_api_tag_description":{"block":{"attributes":{"api_tag_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"external_documentation_description":{"type":"string","optional":true},"external_documentation_url":{"type":"string","optional":true}}}},"azurerm_api_management_api_version_set":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"version_header_name":{"type":"string","optional":true,"conflicts_with":["version_query_name"]},"version_query_name":{"type":"string","optional":true,"conflicts_with":["version_header_name"]},"versioning_scheme":{"type":"string","required":true}}}},"azurerm_api_management_authorization_server":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"authorization_endpoint":{"type":"string","required":true},"authorization_methods":{"type":["set","string"],"required":true},"bearer_token_sending_methods":{"type":["set","string"],"optional":true},"client_authentication_method":{"type":["set","string"],"optional":true},"client_id":{"type":"string","required":true},"client_registration_endpoint":{"type":"string","required":true},"client_secret":{"type":"string","optional":true},"default_scope":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"grant_types":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_owner_password":{"type":"string","optional":true},"resource_owner_username":{"type":"string","optional":true},"support_state":{"type":"bool","optional":true},"token_endpoint":{"type":"string","optional":true}},"block_types":{"token_body_parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_api_management_backend":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","optional":true},"title":{"type":"string","optional":true},"url":{"type":"string","required":true}},"block_types":{"credentials":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":["list","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]},"header":{"type":["map","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]},"query":{"type":["map","string"],"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]}},"block_types":{"authorization":{"nesting_mode":3,"block":{"attributes":{"parameter":{"type":"string","optional":true,"at_least_one_of":["credentials.0.authorization.0.parameter","credentials.0.authorization.0.scheme"]},"scheme":{"type":"string","optional":true,"at_least_one_of":["credentials.0.authorization.0.parameter","credentials.0.authorization.0.scheme"]}}},"optional":true,"at_least_one_of":["credentials.0.authorization","credentials.0.certificate","credentials.0.header","credentials.0.query"]}}},"optional":true},"proxy":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"url":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"service_fabric_cluster":{"nesting_mode":3,"block":{"attributes":{"client_certificate_id":{"type":"string","optional":true,"computed":true},"client_certificate_thumbprint":{"type":"string","optional":true,"computed":true},"management_endpoints":{"type":["set","string"],"required":true},"max_partition_resolution_retries":{"type":"number","required":true},"server_certificate_thumbprints":{"type":["set","string"],"optional":true,"conflicts_with":["service_fabric_cluster.0.server_x509_name"]}},"block_types":{"server_x509_name":{"nesting_mode":4,"block":{"attributes":{"issuer_certificate_thumbprint":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["service_fabric_cluster.0.server_certificate_thumbprints"]}}},"optional":true},"tls":{"nesting_mode":3,"block":{"attributes":{"validate_certificate_chain":{"type":"bool","optional":true,"at_least_one_of":["tls.0.validate_certificate_chain","tls.0.validate_certificate_name"]},"validate_certificate_name":{"type":"bool","optional":true,"at_least_one_of":["tls.0.validate_certificate_chain","tls.0.validate_certificate_name"]}}},"optional":true}}}},"azurerm_api_management_certificate":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"data":{"type":"string","optional":true,"conflicts_with":["key_vault_secret_id","key_vault_identity_client_id"],"at_least_one_of":["data","key_vault_secret_id"]},"expiration":{"type":"string","computed":true},"key_vault_identity_client_id":{"type":"string","optional":true,"required_with":["key_vault_secret_id"]},"key_vault_secret_id":{"type":"string","optional":true,"conflicts_with":["data","password"],"at_least_one_of":["data","key_vault_secret_id"]},"name":{"type":"string","required":true},"password":{"type":"string","optional":true,"required_with":["data"]},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_api_management_custom_domain":{"block":{"attributes":{"api_management_id":{"type":"string","required":true}},"block_types":{"developer_portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_certificate_id":{"type":"string","optional":true,"computed":true},"key_vault_id":{"type":"string","optional":true,"computed":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"gateway":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"default_ssl_binding":{"type":"bool","optional":true,"computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_certificate_id":{"type":"string","optional":true,"computed":true},"key_vault_id":{"type":"string","optional":true,"computed":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"management":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_certificate_id":{"type":"string","optional":true,"computed":true},"key_vault_id":{"type":"string","optional":true,"computed":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"portal":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_certificate_id":{"type":"string","optional":true,"computed":true},"key_vault_id":{"type":"string","optional":true,"computed":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]},"scm":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"certificate_password":{"type":"string","optional":true},"certificate_source":{"type":"string","computed":true},"certificate_status":{"type":"string","computed":true},"expiry":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"key_vault_certificate_id":{"type":"string","optional":true,"computed":true},"key_vault_id":{"type":"string","optional":true,"computed":true},"negotiate_client_certificate":{"type":"bool","optional":true,"default":false},"ssl_keyvault_identity_client_id":{"type":"string","optional":true},"subject":{"type":"string","computed":true},"thumbprint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["management","portal","developer_portal","gateway","scm"]}}}},"azurerm_api_management_diagnostic":{"block":{"attributes":{"always_log_errors":{"type":"bool","optional":true,"computed":true},"api_management_logger_id":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"http_correlation_protocol":{"type":"string","optional":true,"computed":true},"identifier":{"type":"string","required":true},"log_client_ip":{"type":"bool","optional":true,"computed":true},"operation_name_format":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sampling_percentage":{"type":"number","optional":true,"computed":true},"verbosity":{"type":"string","optional":true,"computed":true}},"block_types":{"backend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"backend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_request":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true},"frontend_response":{"nesting_mode":3,"block":{"attributes":{"body_bytes":{"type":"number","optional":true},"headers_to_log":{"type":["set","string"],"optional":true}},"block_types":{"data_masking":{"nesting_mode":3,"block":{"block_types":{"headers":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"query_params":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_api_management_email_template":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"body":{"type":"string","required":true},"description":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","required":true},"template_name":{"type":"string","required":true},"title":{"type":"string","computed":true}}}},"azurerm_api_management_gateway":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"location_data":{"nesting_mode":3,"block":{"attributes":{"city":{"type":"string","optional":true},"district":{"type":"string","optional":true},"name":{"type":"string","required":true},"region":{"type":"string","optional":true}}},"required":true}}}},"azurerm_api_management_gateway_api":{"block":{"attributes":{"api_id":{"type":"string","required":true},"gateway_id":{"type":"string","required":true}}}},"azurerm_api_management_gateway_certificate_authority":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"certificate_name":{"type":"string","required":true},"gateway_name":{"type":"string","required":true},"is_trusted":{"type":"bool","optional":true}}}},"azurerm_api_management_gateway_host_name_configuration":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"certificate_id":{"type":"string","required":true},"gateway_name":{"type":"string","required":true},"host_name":{"type":"string","required":true},"http2_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"request_client_certificate_enabled":{"type":"bool","optional":true},"tls10_enabled":{"type":"bool","optional":true},"tls11_enabled":{"type":"bool","optional":true}}}},"azurerm_api_management_global_schema":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"schema_id":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_api_management_group":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"external_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"custom"}}}},"azurerm_api_management_group_user":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"group_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"user_id":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_aad":{"block":{"attributes":{"allowed_tenants":{"type":["list","string"],"required":true},"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_library":{"type":"string","optional":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"signin_tenant":{"type":"string","optional":true}}}},"azurerm_api_management_identity_provider_aadb2c":{"block":{"attributes":{"allowed_tenant":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"authority":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_library":{"type":"string","optional":true},"client_secret":{"type":"string","required":true},"password_reset_policy":{"type":"string","optional":true},"profile_editing_policy":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"signin_policy":{"type":"string","required":true},"signin_tenant":{"type":"string","required":true},"signup_policy":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_facebook":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_google":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_microsoft":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_identity_provider_twitter":{"block":{"attributes":{"api_key":{"type":"string","required":true},"api_management_name":{"type":"string","required":true},"api_secret_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_logger":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"buffered":{"type":"bool","optional":true,"default":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_id":{"type":"string","optional":true}},"block_types":{"application_insights":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true,"conflicts_with":["application_insights.0.instrumentation_key"],"at_least_one_of":["application_insights.0.connection_string","application_insights.0.instrumentation_key"]},"instrumentation_key":{"type":"string","optional":true,"conflicts_with":["application_insights.0.connection_string"],"at_least_one_of":["application_insights.0.connection_string","application_insights.0.instrumentation_key"]}}},"optional":true,"conflicts_with":["eventhub"]},"eventhub":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true,"conflicts_with":["eventhub.0.endpoint_uri","eventhub.0.user_assigned_identity_client_id"],"at_least_one_of":["eventhub.0.connection_string","eventhub.0.endpoint_uri"]},"endpoint_uri":{"type":"string","optional":true,"conflicts_with":["eventhub.0.connection_string"],"at_least_one_of":["eventhub.0.connection_string","eventhub.0.endpoint_uri"]},"name":{"type":"string","required":true},"user_assigned_identity_client_id":{"type":"string","optional":true,"conflicts_with":["eventhub.0.connection_string"]}}},"optional":true,"conflicts_with":["application_insights"]}}}},"azurerm_api_management_named_value":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true,"default":false},"tags":{"type":["list","string"],"optional":true},"value":{"type":"string","optional":true,"exactly_one_of":["value","value_from_key_vault"]}},"block_types":{"value_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"secret_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["value","value_from_key_vault"],"required_with":["secret"]}}}},"azurerm_api_management_notification_recipient_email":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"email":{"type":"string","required":true},"notification_type":{"type":"string","required":true}}}},"azurerm_api_management_notification_recipient_user":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"notification_type":{"type":"string","required":true},"user_id":{"type":"string","required":true}}}},"azurerm_api_management_openid_connect_provider":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"metadata_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_policy":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"],"exactly_one_of":["xml_link","xml_content"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"],"exactly_one_of":["xml_link","xml_content"]}}}},"azurerm_api_management_policy_fragment":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"format":{"type":"string","optional":true,"default":"xml"},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_api_management_product":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"approval_required":{"type":"bool","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"published":{"type":"bool","required":true},"resource_group_name":{"type":"string","required":true},"subscription_required":{"type":"bool","optional":true,"default":true},"subscriptions_limit":{"type":"number","optional":true},"terms":{"type":"string","optional":true}}}},"azurerm_api_management_product_api":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_product_group":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"group_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_product_policy":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"product_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"xml_content":{"type":"string","optional":true,"computed":true,"conflicts_with":["xml_link"]},"xml_link":{"type":"string","optional":true,"conflicts_with":["xml_content"]}}}},"azurerm_api_management_product_tag":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"api_management_product_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_api_management_redis_cache":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"cache_location":{"type":"string","optional":true,"default":"default"},"connection_string":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"redis_cache_id":{"type":"string","optional":true}}}},"azurerm_api_management_subscription":{"block":{"attributes":{"allow_tracing":{"type":"bool","optional":true,"default":true},"api_id":{"type":"string","optional":true,"conflicts_with":["product_id"]},"api_management_name":{"type":"string","required":true},"display_name":{"type":"string","required":true},"primary_key":{"type":"string","optional":true,"computed":true},"product_id":{"type":"string","optional":true,"conflicts_with":["api_id"]},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","optional":true,"computed":true},"state":{"type":"string","optional":true,"default":"submitted"},"subscription_id":{"type":"string","optional":true,"computed":true},"user_id":{"type":"string","optional":true}}}},"azurerm_api_management_tag":{"block":{"attributes":{"api_management_id":{"type":"string","required":true},"display_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true}}}},"azurerm_api_management_user":{"block":{"attributes":{"api_management_name":{"type":"string","required":true},"confirmation":{"type":"string","optional":true},"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"note":{"type":"string","optional":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"state":{"type":"string","optional":true,"computed":true},"user_id":{"type":"string","required":true}}}},"azurerm_app_configuration":{"block":{"attributes":{"data_plane_proxy_authentication_mode":{"type":"string","optional":true,"default":"Local"},"data_plane_proxy_private_link_delegation_enabled":{"type":"bool","optional":true,"default":false},"endpoint":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_read_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"primary_write_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"public_network_access":{"type":"string","optional":true},"purge_protection_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_read_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"secondary_write_key":{"type":["list",["object",{"connection_string":"string","id":"string","secret":"string"}]],"computed":true},"sku":{"type":"string","optional":true,"default":"free"},"soft_delete_retention_days":{"type":"number","optional":true,"default":7},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_identifier":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"replica":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","computed":true},"id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_app_configuration_feature":{"block":{"attributes":{"configuration_store_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"etag":{"type":"string","optional":true,"computed":true},"key":{"type":"string","optional":true,"computed":true},"label":{"type":"string","optional":true},"locked":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"percentage_filter_value":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"targeting_filter":{"nesting_mode":3,"block":{"attributes":{"default_rollout_percentage":{"type":"number","required":true},"users":{"type":["list","string"],"optional":true}},"block_types":{"groups":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"rollout_percentage":{"type":"number","required":true}}},"optional":true}}},"optional":true},"timewindow_filter":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","optional":true},"start":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_app_configuration_key":{"block":{"attributes":{"configuration_store_id":{"type":"string","required":true},"content_type":{"type":"string","optional":true,"computed":true},"etag":{"type":"string","optional":true,"computed":true},"key":{"type":"string","required":true},"label":{"type":"string","optional":true},"locked":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","optional":true,"default":"kv"},"value":{"type":"string","optional":true,"conflicts_with":["vault_key_reference"]},"vault_key_reference":{"type":"string","optional":true,"conflicts_with":["value"]}}}},"azurerm_app_service":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_cert_enabled":{"type":"bool","optional":true,"default":false},"client_cert_mode":{"type":"string","optional":true,"computed":true},"custom_domain_verification_id":{"type":"string","computed":true},"default_site_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"retention_period_in_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages_enabled":{"type":"bool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","optional":true,"default":"Off"}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"acr_use_managed_identity_credentials":{"type":"bool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"string","optional":true},"always_on":{"type":"bool","optional":true,"default":false},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_container":{"type":"string","optional":true},"java_container_version":{"type":"string","optional":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"local_mysql_enabled":{"type":"bool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"number_of_workers":{"type":"number","optional":true,"computed":true},"php_version":{"type":"string","optional":true},"python_version":{"type":"string","optional":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"computed":true},"windows_fx_version":{"type":"string","optional":true,"computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"source_control":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"manual_integration":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"repo_url":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"rollback_enabled":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"use_mercurial":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]}}},"optional":true,"computed":true,"conflicts_with":["site_config.0.scm_type"]},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_active_slot":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"app_service_slot_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_app_service_certificate":{"block":{"attributes":{"app_service_plan_id":{"type":"string","optional":true},"expiration_date":{"type":"string","computed":true},"friendly_name":{"type":"string","computed":true},"host_names":{"type":["list","string"],"computed":true},"hosting_environment_profile_id":{"type":"string","computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"key_vault_id":{"type":"string","optional":true,"required_with":["key_vault_secret_id"]},"key_vault_secret_id":{"type":"string","optional":true,"conflicts_with":["pfx_blob","password"],"exactly_one_of":["key_vault_secret_id","pfx_blob"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"pfx_blob":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_certificate_binding":{"block":{"attributes":{"app_service_name":{"type":"string","computed":true},"certificate_id":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"hostname_binding_id":{"type":"string","required":true},"ssl_state":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_certificate_order":{"block":{"attributes":{"app_service_certificate_not_renewable_reasons":{"type":["list","string"],"computed":true},"auto_renew":{"type":"bool","optional":true,"default":true},"certificates":{"type":["list",["object",{"certificate_name":"string","key_vault_id":"string","key_vault_secret_name":"string","provisioning_state":"string"}]],"computed":true},"csr":{"type":"string","optional":true,"computed":true,"conflicts_with":["distinguished_name"]},"distinguished_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["csr"]},"domain_verification_token":{"type":"string","computed":true},"expiration_time":{"type":"string","computed":true},"intermediate_thumbprint":{"type":"string","computed":true},"is_private_key_external":{"type":"bool","computed":true},"key_size":{"type":"number","optional":true,"default":2048},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"product_type":{"type":"string","optional":true,"default":"Standard"},"resource_group_name":{"type":"string","required":true},"root_thumbprint":{"type":"string","computed":true},"signed_certificate_thumbprint":{"type":"string","computed":true},"status":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"validity_in_years":{"type":"number","optional":true,"default":1}}}},"azurerm_app_service_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"client_type":{"type":"string","optional":true,"default":"none"},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_app_service_custom_hostname_binding":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"hostname":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssl_state":{"type":"string","optional":true,"computed":true},"thumbprint":{"type":"string","optional":true,"computed":true},"virtual_ip":{"type":"string","computed":true}}}},"azurerm_app_service_environment_v3":{"block":{"attributes":{"allow_new_private_endpoint_connections":{"type":"bool","optional":true,"default":true},"dedicated_host_count":{"type":"number","optional":true,"conflicts_with":["zone_redundant"]},"dns_suffix":{"type":"string","computed":true},"external_inbound_ip_addresses":{"type":["list","string"],"computed":true},"inbound_network_dependencies":{"type":["list",["object",{"description":"string","ip_addresses":["list","string"],"ports":["list","string"]}]],"computed":true},"internal_inbound_ip_addresses":{"type":["list","string"],"computed":true},"internal_load_balancing_mode":{"type":"string","optional":true,"default":"None"},"ip_ssl_address_count":{"type":"number","computed":true},"linux_outbound_ip_addresses":{"type":["list","string"],"computed":true},"location":{"type":"string","computed":true},"name":{"type":"string","required":true},"pricing_tier":{"type":"string","computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"windows_outbound_ip_addresses":{"type":["list","string"],"computed":true},"zone_redundant":{"type":"bool","optional":true,"default":false,"conflicts_with":["dedicated_host_count"]}},"block_types":{"cluster_setting":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_hybrid_connection":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true}}}},"azurerm_app_service_managed_certificate":{"block":{"attributes":{"canonical_name":{"type":"string","computed":true},"custom_hostname_binding_id":{"type":"string","required":true},"expiration_date":{"type":"string","computed":true},"friendly_name":{"type":"string","computed":true},"host_names":{"type":["list","string"],"computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_plan":{"block":{"attributes":{"app_service_environment_id":{"type":"string","optional":true},"is_xenon":{"type":"bool","optional":true},"kind":{"type":"string","optional":true,"default":"Windows"},"location":{"type":"string","required":true},"maximum_elastic_worker_count":{"type":"number","optional":true,"computed":true},"maximum_number_of_workers":{"type":"number","computed":true},"name":{"type":"string","required":true},"per_site_scaling":{"type":"bool","optional":true},"reserved":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"size":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_app_service_public_certificate":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"blob":{"type":"string","required":true},"certificate_location":{"type":"string","required":true},"certificate_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_app_service_slot":{"block":{"attributes":{"app_service_name":{"type":"string","required":true},"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_affinity_enabled":{"type":"bool","optional":true,"computed":true},"default_site_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages_enabled":{"type":"bool","optional":true,"default":false},"failed_request_tracing_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","optional":true,"default":"Off"}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"],"at_least_one_of":["logs.0.http_logs.0.azure_blob_storage","logs.0.http_logs.0.file_system"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"acr_use_managed_identity_credentials":{"type":"bool","optional":true,"default":false},"acr_user_managed_identity_client_id":{"type":"string","optional":true},"always_on":{"type":"bool","optional":true,"default":false},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_container":{"type":"string","optional":true},"java_container_version":{"type":"string","optional":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"local_mysql_enabled":{"type":"bool","optional":true,"computed":true},"managed_pipeline_mode":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"number_of_workers":{"type":"number","optional":true,"computed":true},"php_version":{"type":"string","optional":true},"python_version":{"type":"string","optional":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"computed":true},"windows_fx_version":{"type":"string","optional":true,"computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_app_service_slot_custom_hostname_binding":{"block":{"attributes":{"app_service_slot_id":{"type":"string","required":true},"hostname":{"type":"string","required":true},"ssl_state":{"type":"string","optional":true,"computed":true},"thumbprint":{"type":"string","optional":true,"computed":true},"virtual_ip":{"type":"string","computed":true}}}},"azurerm_app_service_slot_virtual_network_swift_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"slot_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_app_service_source_control":{"block":{"attributes":{"app_id":{"type":"string","required":true},"branch":{"type":"string","optional":true,"computed":true,"required_with":["repo_url"]},"repo_url":{"type":"string","optional":true,"computed":true,"required_with":["branch"]},"rollback_enabled":{"type":"bool","optional":true,"default":false},"scm_type":{"type":"string","computed":true},"use_local_git":{"type":"bool","optional":true,"default":false,"conflicts_with":["repo_url","branch","use_manual_integration","uses_github_action","github_action_configuration","use_mercurial","rollback_enabled"]},"use_manual_integration":{"type":"bool","optional":true,"default":false},"use_mercurial":{"type":"bool","optional":true,"default":false},"uses_github_action":{"type":"bool","computed":true}},"block_types":{"github_action_configuration":{"nesting_mode":3,"block":{"attributes":{"generate_workflow_file":{"type":"bool","optional":true,"default":true},"linux_action":{"type":"bool","computed":true}},"block_types":{"code_configuration":{"nesting_mode":3,"block":{"attributes":{"runtime_stack":{"type":"string","required":true},"runtime_version":{"type":"string","required":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_app_service_source_control_slot":{"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"required_with":["repo_url"]},"repo_url":{"type":"string","optional":true,"computed":true,"required_with":["branch"]},"rollback_enabled":{"type":"bool","optional":true,"default":false},"scm_type":{"type":"string","computed":true},"slot_id":{"type":"string","required":true},"use_local_git":{"type":"bool","optional":true,"default":false,"conflicts_with":["repo_url","branch","use_manual_integration","uses_github_action","github_action_configuration","use_mercurial","rollback_enabled"]},"use_manual_integration":{"type":"bool","optional":true,"default":false},"use_mercurial":{"type":"bool","optional":true,"default":false},"uses_github_action":{"type":"bool","computed":true}},"block_types":{"github_action_configuration":{"nesting_mode":3,"block":{"attributes":{"generate_workflow_file":{"type":"bool","optional":true,"default":true},"linux_action":{"type":"bool","computed":true}},"block_types":{"code_configuration":{"nesting_mode":3,"block":{"attributes":{"runtime_stack":{"type":"string","required":true},"runtime_version":{"type":"string","required":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_app_service_source_control_token":{"block":{"attributes":{"token":{"type":"string","required":true},"token_secret":{"type":"string","optional":true},"type":{"type":"string","required":true}}}},"azurerm_app_service_virtual_network_swift_connection":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_application_gateway":{"block":{"attributes":{"enable_http2":{"type":"bool","optional":true},"fips_enabled":{"type":"bool","optional":true},"firewall_policy_id":{"type":"string","optional":true},"force_firewall_policy_association":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"authentication_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"autoscale_configuration":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","optional":true},"min_capacity":{"type":"number","required":true}}},"optional":true},"backend_address_pool":{"nesting_mode":4,"block":{"attributes":{"fqdns":{"type":["set","string"],"optional":true},"id":{"type":"string","computed":true},"ip_addresses":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true},"backend_http_settings":{"nesting_mode":4,"block":{"attributes":{"affinity_cookie_name":{"type":"string","optional":true},"cookie_based_affinity":{"type":"string","required":true},"host_name":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"pick_host_name_from_backend_address":{"type":"bool","optional":true,"default":false},"port":{"type":"number","required":true},"probe_id":{"type":"string","computed":true},"probe_name":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"request_timeout":{"type":"number","optional":true,"default":30},"trusted_root_certificate_names":{"type":["list","string"],"optional":true}},"block_types":{"authentication_certificate":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"connection_draining":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_sec":{"type":"number","required":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"required":true},"custom_error_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_error_page_url":{"type":"string","required":true},"id":{"type":"string","computed":true},"status_code":{"type":"string","required":true}}},"optional":true},"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","optional":true,"default":"Dynamic"},"private_link_configuration_id":{"type":"string","computed":true},"private_link_configuration_name":{"type":"string","optional":true},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true},"frontend_port":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"port":{"type":"number","required":true}}},"required":true},"gateway_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true},"global":{"nesting_mode":3,"block":{"attributes":{"request_buffering_enabled":{"type":"bool","required":true},"response_buffering_enabled":{"type":"bool","required":true}}},"optional":true},"http_listener":{"nesting_mode":4,"block":{"attributes":{"firewall_policy_id":{"type":"string","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port_id":{"type":"string","computed":true},"frontend_port_name":{"type":"string","required":true},"host_name":{"type":"string","optional":true},"host_names":{"type":["set","string"],"optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"require_sni":{"type":"bool","optional":true},"ssl_certificate_id":{"type":"string","computed":true},"ssl_certificate_name":{"type":"string","optional":true},"ssl_profile_id":{"type":"string","computed":true},"ssl_profile_name":{"type":"string","optional":true}},"block_types":{"custom_error_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_error_page_url":{"type":"string","required":true},"id":{"type":"string","computed":true},"status_code":{"type":"string","required":true}}},"optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"private_link_configuration":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}},"optional":true},"probe":{"nesting_mode":4,"block":{"attributes":{"host":{"type":"string","optional":true},"id":{"type":"string","computed":true},"interval":{"type":"number","required":true},"minimum_servers":{"type":"number","optional":true,"default":0},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"pick_host_name_from_backend_http_settings":{"type":"bool","optional":true,"default":false},"port":{"type":"number","optional":true},"protocol":{"type":"string","required":true},"timeout":{"type":"number","required":true},"unhealthy_threshold":{"type":"number","required":true}},"block_types":{"match":{"nesting_mode":3,"block":{"attributes":{"body":{"type":"string","optional":true},"status_code":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"redirect_configuration":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","computed":true},"include_path":{"type":"bool","optional":true,"default":false},"include_query_string":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"redirect_type":{"type":"string","required":true},"target_listener_id":{"type":"string","computed":true},"target_listener_name":{"type":"string","optional":true},"target_url":{"type":"string","optional":true}}},"optional":true},"request_routing_rule":{"nesting_mode":4,"block":{"attributes":{"backend_address_pool_id":{"type":"string","computed":true},"backend_address_pool_name":{"type":"string","optional":true},"backend_http_settings_id":{"type":"string","computed":true},"backend_http_settings_name":{"type":"string","optional":true},"http_listener_id":{"type":"string","computed":true},"http_listener_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true},"redirect_configuration_id":{"type":"string","computed":true},"redirect_configuration_name":{"type":"string","optional":true},"rewrite_rule_set_id":{"type":"string","computed":true},"rewrite_rule_set_name":{"type":"string","optional":true},"rule_type":{"type":"string","required":true},"url_path_map_id":{"type":"string","computed":true},"url_path_map_name":{"type":"string","optional":true}}},"required":true},"rewrite_rule_set":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"rewrite_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"rule_sequence":{"type":"number","required":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"attributes":{"ignore_case":{"type":"bool","optional":true,"default":false},"negate":{"type":"bool","optional":true,"default":false},"pattern":{"type":"string","required":true},"variable":{"type":"string","required":true}}},"optional":true},"request_header_configuration":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"header_value":{"type":"string","required":true}}},"optional":true},"response_header_configuration":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"header_value":{"type":"string","required":true}}},"optional":true},"url":{"nesting_mode":3,"block":{"attributes":{"components":{"type":"string","optional":true},"path":{"type":"string","optional":true},"query_string":{"type":"string","optional":true},"reroute":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true},"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true},"ssl_certificate":{"nesting_mode":4,"block":{"attributes":{"data":{"type":"string","optional":true},"id":{"type":"string","computed":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"public_cert_data":{"type":"string","computed":true}}},"optional":true},"ssl_policy":{"nesting_mode":3,"block":{"attributes":{"cipher_suites":{"type":["list","string"],"optional":true},"disabled_protocols":{"type":["list","string"],"optional":true},"min_protocol_version":{"type":"string","optional":true},"policy_name":{"type":"string","optional":true},"policy_type":{"type":"string","optional":true}}},"optional":true,"computed":true},"ssl_profile":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"trusted_client_certificate_names":{"type":["list","string"],"optional":true},"verify_client_cert_issuer_dn":{"type":"bool","optional":true,"default":false},"verify_client_certificate_revocation":{"type":"string","optional":true}},"block_types":{"ssl_policy":{"nesting_mode":3,"block":{"attributes":{"cipher_suites":{"type":["list","string"],"optional":true},"disabled_protocols":{"type":["list","string"],"optional":true},"min_protocol_version":{"type":"string","optional":true},"policy_name":{"type":"string","optional":true},"policy_type":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"trusted_client_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true},"trusted_root_certificate":{"nesting_mode":3,"block":{"attributes":{"data":{"type":"string","optional":true},"id":{"type":"string","computed":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true}}},"optional":true},"url_path_map":{"nesting_mode":3,"block":{"attributes":{"default_backend_address_pool_id":{"type":"string","computed":true},"default_backend_address_pool_name":{"type":"string","optional":true},"default_backend_http_settings_id":{"type":"string","computed":true},"default_backend_http_settings_name":{"type":"string","optional":true},"default_redirect_configuration_id":{"type":"string","computed":true},"default_redirect_configuration_name":{"type":"string","optional":true},"default_rewrite_rule_set_id":{"type":"string","computed":true},"default_rewrite_rule_set_name":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"path_rule":{"nesting_mode":3,"block":{"attributes":{"backend_address_pool_id":{"type":"string","computed":true},"backend_address_pool_name":{"type":"string","optional":true},"backend_http_settings_id":{"type":"string","computed":true},"backend_http_settings_name":{"type":"string","optional":true},"firewall_policy_id":{"type":"string","optional":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"paths":{"type":["list","string"],"required":true},"redirect_configuration_id":{"type":"string","computed":true},"redirect_configuration_name":{"type":"string","optional":true},"rewrite_rule_set_id":{"type":"string","computed":true},"rewrite_rule_set_name":{"type":"string","optional":true}}},"required":true}}},"optional":true},"waf_configuration":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"file_upload_limit_mb":{"type":"number","optional":true,"default":100},"firewall_mode":{"type":"string","required":true},"max_request_body_size_kb":{"type":"number","optional":true,"default":128},"request_body_check":{"type":"bool","optional":true,"default":true},"rule_set_type":{"type":"string","optional":true,"default":"OWASP"},"rule_set_version":{"type":"string","required":true}},"block_types":{"disabled_rule_group":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true},"rules":{"type":["list","number"],"optional":true}}},"optional":true},"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"selector":{"type":"string","optional":true},"selector_match_operator":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_application_insights":{"block":{"attributes":{"app_id":{"type":"string","computed":true},"application_type":{"type":"string","required":true},"connection_string":{"type":"string","computed":true},"daily_data_cap_in_gb":{"type":"number","optional":true,"default":100},"daily_data_cap_notifications_disabled":{"type":"bool","optional":true},"disable_ip_masking":{"type":"bool","optional":true,"default":false},"force_customer_storage_for_profiler":{"type":"bool","optional":true,"default":false},"instrumentation_key":{"type":"string","computed":true},"internet_ingestion_enabled":{"type":"bool","optional":true,"default":true},"internet_query_enabled":{"type":"bool","optional":true,"default":true},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_in_days":{"type":"number","optional":true,"default":90},"sampling_percentage":{"type":"number","optional":true,"default":100},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_application_insights_analytics_item":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"content":{"type":"string","required":true},"function_alias":{"type":"string","optional":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true},"time_created":{"type":"string","computed":true},"time_modified":{"type":"string","computed":true},"type":{"type":"string","required":true},"version":{"type":"string","computed":true}}}},"azurerm_application_insights_api_key":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"application_insights_id":{"type":"string","required":true},"name":{"type":"string","required":true},"read_permissions":{"type":["set","string"],"optional":true},"write_permissions":{"type":["set","string"],"optional":true}}}},"azurerm_application_insights_smart_detection_rule":{"block":{"attributes":{"additional_email_recipients":{"type":["set","string"],"optional":true},"application_insights_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"send_emails_to_subscription_owners":{"type":"bool","optional":true,"default":true}}}},"azurerm_application_insights_standard_web_test":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"frequency":{"type":"number","optional":true,"default":300},"geo_locations":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retry_enabled":{"type":"bool","optional":true},"synthetic_monitor_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"number","optional":true,"default":30}},"block_types":{"request":{"nesting_mode":3,"block":{"attributes":{"body":{"type":"string","optional":true},"follow_redirects_enabled":{"type":"bool","optional":true,"default":true},"http_verb":{"type":"string","optional":true,"default":"GET"},"parse_dependent_requests_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true},"validation_rules":{"nesting_mode":3,"block":{"attributes":{"expected_status_code":{"type":"number","optional":true,"default":200},"ssl_cert_remaining_lifetime":{"type":"number","optional":true},"ssl_check_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"content":{"nesting_mode":3,"block":{"attributes":{"content_match":{"type":"string","required":true},"ignore_case":{"type":"bool","optional":true,"default":false},"pass_if_text_found":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}}},"azurerm_application_insights_web_test":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"configuration":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true},"frequency":{"type":"number","optional":true,"default":300},"geo_locations":{"type":["list","string"],"required":true},"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retry_enabled":{"type":"bool","optional":true},"synthetic_monitor_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"number","optional":true,"default":30}}}},"azurerm_application_insights_workbook":{"block":{"attributes":{"category":{"type":"string","optional":true,"default":"workbook"},"data_json":{"type":"string","required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_id":{"type":"string","optional":true,"default":"azure monitor"},"storage_container_id":{"type":"string","optional":true,"required_with":["identity"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_application_insights_workbook_template":{"block":{"attributes":{"author":{"type":"string","optional":true},"localized":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template_data":{"type":"string","required":true}},"block_types":{"galleries":{"nesting_mode":3,"block":{"attributes":{"category":{"type":"string","required":true},"name":{"type":"string","required":true},"order":{"type":"number","optional":true,"default":0},"resource_type":{"type":"string","optional":true,"default":"Azure Monitor"},"type":{"type":"string","optional":true,"default":"workbook"}}},"required":true}}}},"azurerm_application_load_balancer":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_configuration_endpoint":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_load_balancer_frontend":{"block":{"attributes":{"application_load_balancer_id":{"type":"string","required":true},"fully_qualified_domain_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_load_balancer_subnet_association":{"block":{"attributes":{"application_load_balancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_application_security_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_arc_kubernetes_cluster":{"block":{"attributes":{"agent_public_key_certificate":{"type":"string","required":true},"agent_version":{"type":"string","computed":true},"distribution":{"type":"string","computed":true},"infrastructure":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"offering":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_core_count":{"type":"number","computed":true},"total_node_count":{"type":"number","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_kubernetes_cluster_extension":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"configuration_protected_settings":{"type":["map","string"],"optional":true},"configuration_settings":{"type":["map","string"],"optional":true},"current_version":{"type":"string","computed":true},"extension_type":{"type":"string","required":true},"name":{"type":"string","required":true},"release_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["target_namespace"]},"release_train":{"type":"string","optional":true,"computed":true},"target_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["release_namespace"]},"version":{"type":"string","optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_kubernetes_flux_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"continuous_reconciliation_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"namespace"}},"block_types":{"blob_storage":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"container_id":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sas_token":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}},"block_types":{"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_certificate_base64":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"client_certificate_password":{"type":"string","optional":true,"required_with":["blob_storage.0.service_principal.0.client_certificate_base64"]},"client_certificate_send_chain":{"type":"bool","optional":true,"default":false},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"tenant_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.sas_token","blob_storage.0.service_principal"]}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"bucket":{"nesting_mode":3,"block":{"attributes":{"access_key":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"],"required_with":["bucket.0.secret_key_base64"]},"bucket_name":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"]},"secret_key_base64":{"type":"string","optional":true,"required_with":["bucket.0.access_key"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"tls_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"git_repository":{"nesting_mode":3,"block":{"attributes":{"https_ca_cert_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_key_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_user":{"type":"string","optional":true,"conflicts_with":["git_repository.0.local_auth_reference","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"],"required_with":["git_repository.0.https_key_base64"]},"local_auth_reference":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"]},"reference_type":{"type":"string","required":true},"reference_value":{"type":"string","required":true},"ssh_known_hosts_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"ssh_private_key_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"kustomizations":{"nesting_mode":4,"block":{"attributes":{"depends_on":{"type":["list","string"],"optional":true},"garbage_collection_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"recreating_enabled":{"type":"bool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"number","optional":true,"default":600},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}}},"required":true}}}},"azurerm_arc_kubernetes_provisioned_cluster":{"block":{"attributes":{"agent_version":{"type":"string","computed":true},"arc_agent_auto_upgrade_enabled":{"type":"bool","optional":true,"default":true},"arc_agent_desired_version":{"type":"string","optional":true},"distribution":{"type":"string","computed":true},"infrastructure":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"offering":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_core_count":{"type":"number","computed":true},"total_node_count":{"type":"number","computed":true}},"block_types":{"azure_active_directory":{"nesting_mode":3,"block":{"attributes":{"admin_group_object_ids":{"type":["list","string"],"optional":true},"azure_rbac_enabled":{"type":"bool","optional":true,"default":false},"tenant_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_arc_machine":{"block":{"attributes":{"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_arc_machine_automanage_configuration_assignment":{"block":{"attributes":{"arc_machine_id":{"type":"string","required":true},"configuration_id":{"type":"string","required":true}}}},"azurerm_arc_machine_extension":{"block":{"attributes":{"arc_machine_id":{"type":"string","required":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}}},"azurerm_arc_private_link_scope":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_arc_resource_bridge_appliance":{"block":{"attributes":{"distro":{"type":"string","required":true},"infrastructure_provider":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_key_base64":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_attestation_provider":{"block":{"attributes":{"attestation_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"open_enclave_policy_base64":{"type":"string","optional":true},"policy_signing_certificate_data":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sev_snp_policy_base64":{"type":"string","optional":true},"sgx_enclave_policy_base64":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"tpm_policy_base64":{"type":"string","optional":true},"trust_model":{"type":"string","computed":true}}}},"azurerm_automanage_configuration":{"block":{"attributes":{"automation_account_enabled":{"type":"bool","optional":true,"default":false},"boot_diagnostics_enabled":{"type":"bool","optional":true,"default":false},"defender_for_cloud_enabled":{"type":"bool","optional":true,"default":false},"guest_configuration_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"log_analytics_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"status_change_alert_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}},"block_types":{"antimalware":{"nesting_mode":3,"block":{"attributes":{"real_time_protection_enabled":{"type":"bool","optional":true,"default":false},"scheduled_scan_day":{"type":"number","optional":true,"default":8},"scheduled_scan_enabled":{"type":"bool","optional":true,"default":false},"scheduled_scan_time_in_minutes":{"type":"number","optional":true,"default":0},"scheduled_scan_type":{"type":"string","optional":true,"default":"Quick"}},"block_types":{"exclusions":{"nesting_mode":3,"block":{"attributes":{"extensions":{"type":"string","optional":true},"paths":{"type":"string","optional":true},"processes":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"azure_security_baseline":{"nesting_mode":3,"block":{"attributes":{"assignment_type":{"type":"string","optional":true,"default":"ApplyAndAutoCorrect"}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"instant_rp_retention_range_in_days":{"type":"number","optional":true,"default":5},"policy_name":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"retention_policy_type":{"type":"string","optional":true,"default":"LongTermRetentionPolicy"}},"block_types":{"daily_schedule":{"nesting_mode":3,"block":{"attributes":{"retention_times":{"type":["list","string"],"optional":true}},"block_types":{"retention_duration":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true,"default":"Days"}}},"optional":true}}},"optional":true},"weekly_schedule":{"nesting_mode":3,"block":{"attributes":{"retention_times":{"type":["list","string"],"optional":true}},"block_types":{"retention_duration":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true,"default":"Weeks"}}},"optional":true}}},"optional":true}}},"optional":true},"schedule_policy":{"nesting_mode":3,"block":{"attributes":{"schedule_policy_type":{"type":"string","optional":true,"default":"SimpleSchedulePolicy"},"schedule_run_days":{"type":["list","string"],"optional":true},"schedule_run_frequency":{"type":"string","optional":true,"default":"Daily"},"schedule_run_times":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_automation_account":{"block":{"attributes":{"dsc_primary_access_key":{"type":"string","computed":true},"dsc_secondary_access_key":{"type":"string","computed":true},"dsc_server_endpoint":{"type":"string","computed":true},"hybrid_service_url":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["list",["object",{"id":"string","name":"string"}]],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_source":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_automation_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"base64":{"type":"string","required":true},"description":{"type":"string","optional":true},"exportable":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_automation_connection":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","required":true},"values":{"type":["map","string"],"required":true}}}},"azurerm_automation_connection_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"automation_certificate_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_automation_connection_classic_certificate":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"certificate_asset_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"subscription_name":{"type":"string","required":true}}}},"azurerm_automation_connection_service_principal":{"block":{"attributes":{"application_id":{"type":"string","required":true},"automation_account_name":{"type":"string","required":true},"certificate_thumbprint":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_automation_connection_type":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"is_global":{"type":"bool","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"field":{"nesting_mode":3,"block":{"attributes":{"is_encrypted":{"type":"bool","optional":true},"is_optional":{"type":"bool","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_automation_credential":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_automation_dsc_configuration":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content_embedded":{"type":"string","required":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"log_verbose":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"state":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_dsc_nodeconfiguration":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"configuration_name":{"type":"string","computed":true},"content_embedded":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_automation_hybrid_runbook_worker":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"ip":{"type":"string","computed":true},"last_seen_date_time":{"type":"string","computed":true},"registration_date_time":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"vm_resource_id":{"type":"string","required":true},"worker_group_name":{"type":"string","required":true},"worker_id":{"type":"string","required":true},"worker_name":{"type":"string","computed":true},"worker_type":{"type":"string","computed":true}}}},"azurerm_automation_hybrid_runbook_worker_group":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"credential_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_automation_job_schedule":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"job_schedule_id":{"type":"string","optional":true,"computed":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"run_on":{"type":"string","optional":true},"runbook_name":{"type":"string","required":true},"schedule_name":{"type":"string","required":true}}}},"azurerm_automation_module":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"module_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_automation_powershell72_module":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"module_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_automation_python3_package":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content_uri":{"type":"string","required":true},"content_version":{"type":"string","optional":true},"hash_algorithm":{"type":"string","optional":true,"required_with":["hash_value"]},"hash_value":{"type":"string","optional":true,"required_with":["hash_algorithm"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_runbook":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"content":{"type":"string","optional":true,"computed":true,"at_least_one_of":["content","publish_content_link","draft"]},"description":{"type":"string","optional":true},"job_schedule":{"type":["set",["object",{"job_schedule_id":"string","parameters":["map","string"],"run_on":"string","schedule_name":"string"}]],"optional":true,"computed":true},"location":{"type":"string","required":true},"log_activity_trace_level":{"type":"number","optional":true},"log_progress":{"type":"bool","required":true},"log_verbose":{"type":"bool","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"runbook_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"draft":{"nesting_mode":3,"block":{"attributes":{"creation_time":{"type":"string","computed":true},"edit_mode_enabled":{"type":"bool","optional":true},"last_modified_time":{"type":"string","computed":true},"output_types":{"type":["list","string"],"optional":true}},"block_types":{"content_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true},"version":{"type":"string","optional":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"parameters":{"nesting_mode":3,"block":{"attributes":{"default_value":{"type":"string","optional":true},"key":{"type":"string","required":true},"mandatory":{"type":"bool","optional":true,"default":false},"position":{"type":"number","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"publish_content_link":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","required":true},"version":{"type":"string","optional":true}},"block_types":{"hash":{"nesting_mode":3,"block":{"attributes":{"algorithm":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["content","publish_content_link","draft"]}}}},"azurerm_automation_schedule":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"expiry_time":{"type":"string","optional":true,"computed":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","optional":true,"computed":true},"month_days":{"type":["set","number"],"optional":true,"conflicts_with":["week_days","monthly_occurrence"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"timezone":{"type":"string","optional":true,"default":"Etc/UTC"},"week_days":{"type":["set","string"],"optional":true,"conflicts_with":["month_days","monthly_occurrence"]}},"block_types":{"monthly_occurrence":{"nesting_mode":3,"block":{"attributes":{"day":{"type":"string","required":true},"occurrence":{"type":"number","required":true}}},"optional":true,"conflicts_with":["week_days","month_days"]}}}},"azurerm_automation_software_update_configuration":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"duration":{"type":"string","optional":true,"default":"PT2H"},"error_code":{"type":"string","computed":true},"error_message":{"type":"string","computed":true},"name":{"type":"string","required":true},"non_azure_computer_names":{"type":["list","string"],"optional":true},"virtual_machine_ids":{"type":["list","string"],"optional":true}},"block_types":{"linux":{"nesting_mode":3,"block":{"attributes":{"classifications_included":{"type":["list","string"],"required":true},"excluded_packages":{"type":["list","string"],"optional":true},"included_packages":{"type":["list","string"],"optional":true},"reboot":{"type":"string","optional":true,"default":"IfRequired"}}},"optional":true,"exactly_one_of":["windows","linux"]},"post_task":{"nesting_mode":3,"block":{"attributes":{"parameters":{"type":["map","string"],"optional":true},"source":{"type":"string","optional":true}}},"optional":true},"pre_task":{"nesting_mode":3,"block":{"attributes":{"parameters":{"type":["map","string"],"optional":true},"source":{"type":"string","optional":true}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"advanced_month_days":{"type":["list","number"],"optional":true},"advanced_week_days":{"type":["list","string"],"optional":true},"creation_time":{"type":"string","computed":true},"description":{"type":"string","optional":true},"expiry_time":{"type":"string","optional":true,"computed":true},"expiry_time_offset_minutes":{"type":"number","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","optional":true},"is_enabled":{"type":"bool","optional":true,"default":true},"last_modified_time":{"type":"string","computed":true},"next_run":{"type":"string","optional":true,"computed":true},"next_run_offset_minutes":{"type":"number","optional":true},"start_time":{"type":"string","optional":true,"computed":true},"start_time_offset_minutes":{"type":"number","optional":true},"time_zone":{"type":"string","optional":true,"default":"Etc/UTC"}},"block_types":{"monthly_occurrence":{"nesting_mode":3,"block":{"attributes":{"day":{"type":"string","required":true},"occurrence":{"type":"number","required":true}}},"optional":true}}},"required":true},"target":{"nesting_mode":3,"block":{"block_types":{"azure_query":{"nesting_mode":3,"block":{"attributes":{"locations":{"type":["list","string"],"optional":true},"scope":{"type":["list","string"],"optional":true},"tag_filter":{"type":"string","optional":true}},"block_types":{"tags":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"non_azure_query":{"nesting_mode":3,"block":{"attributes":{"function_alias":{"type":"string","optional":true},"workspace_id":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"classifications_included":{"type":["list","string"],"required":true},"excluded_knowledge_base_numbers":{"type":["list","string"],"optional":true},"included_knowledge_base_numbers":{"type":["list","string"],"optional":true},"reboot":{"type":"string","optional":true,"default":"IfRequired"}}},"optional":true,"exactly_one_of":["windows","linux"]}}}},"azurerm_automation_source_control":{"block":{"attributes":{"automatic_sync":{"type":"bool","optional":true,"default":false},"automation_account_id":{"type":"string","required":true},"branch":{"type":"string","optional":true},"description":{"type":"string","optional":true},"folder_path":{"type":"string","required":true},"name":{"type":"string","required":true},"publish_runbook_enabled":{"type":"bool","optional":true,"default":true},"repository_url":{"type":"string","required":true},"source_control_type":{"type":"string","required":true}},"block_types":{"security":{"nesting_mode":3,"block":{"attributes":{"refresh_token":{"type":"string","optional":true},"token":{"type":"string","required":true},"token_type":{"type":"string","required":true}}},"required":true}}}},"azurerm_automation_variable_bool":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"bool","optional":true}}}},"azurerm_automation_variable_datetime":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_variable_int":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"number","optional":true}}}},"azurerm_automation_variable_object":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_variable_string":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}}},"azurerm_automation_watcher":{"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"etag":{"type":"string","optional":true},"execution_frequency_in_seconds":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"script_name":{"type":"string","required":true},"script_parameters":{"type":["map","string"],"optional":true},"script_run_on":{"type":"string","required":true},"status":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_automation_webhook":{"block":{"attributes":{"automation_account_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"expiry_time":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"run_on_worker_group":{"type":"string","optional":true},"runbook_name":{"type":"string","required":true},"uri":{"type":"string","optional":true,"computed":true}}}},"azurerm_availability_set":{"block":{"attributes":{"location":{"type":"string","required":true},"managed":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","optional":true,"default":3},"platform_update_domain_count":{"type":"number","optional":true,"default":5},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_backup_container_storage_account":{"block":{"attributes":{"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_backup_policy_file_share":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","required":true},"time":{"type":"string","optional":true,"conflicts_with":["backup.0.hourly"],"at_least_one_of":["backup.0.time","backup.0.hourly"]}},"block_types":{"hourly":{"nesting_mode":3,"block":{"attributes":{"interval":{"type":"number","required":true},"start_time":{"type":"string","required":true},"window_duration":{"type":"number","required":true}}},"optional":true,"conflicts_with":["backup.0.time"],"at_least_one_of":["backup.0.time","backup.0.hourly"]}}},"required":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"required":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weekdays"]}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weekdays"]}}},"optional":true}}}},"azurerm_backup_policy_vm":{"block":{"attributes":{"instant_restore_retention_days":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_type":{"type":"string","optional":true,"default":"V1"},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","required":true},"hour_duration":{"type":"number","optional":true},"hour_interval":{"type":"number","optional":true},"time":{"type":"string","required":true},"weekdays":{"type":["set","string"],"optional":true}}},"required":true},"instant_restore_resource_group":{"nesting_mode":3,"block":{"attributes":{"prefix":{"type":"string","required":true},"suffix":{"type":"string","optional":true}}},"optional":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_monthly.0.weeks","retention_monthly.0.weekdays"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"]},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_monthly.0.days","retention_monthly.0.include_last_days"],"at_least_one_of":["retention_monthly.0.weekdays","retention_monthly.0.weeks","retention_monthly.0.days","retention_monthly.0.include_last_days"],"required_with":["retention_monthly.0.weekdays"]}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"days":{"type":["set","number"],"optional":true,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"include_last_days":{"type":"bool","optional":true,"default":false,"conflicts_with":["retention_yearly.0.weeks","retention_yearly.0.weekdays"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"]},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weeks"]},"weeks":{"type":["set","string"],"optional":true,"conflicts_with":["retention_yearly.0.days","retention_yearly.0.include_last_days"],"at_least_one_of":["retention_yearly.0.weeks","retention_yearly.0.weekdays","retention_yearly.0.days","retention_yearly.0.include_last_days"],"required_with":["retention_yearly.0.weekdays"]}}},"optional":true},"tiering_policy":{"nesting_mode":3,"block":{"block_types":{"archived_restore_point":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"number","optional":true},"duration_type":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_backup_policy_vm_workload":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workload_type":{"type":"string","required":true}},"block_types":{"protection_policy":{"nesting_mode":4,"block":{"attributes":{"policy_type":{"type":"string","required":true}},"block_types":{"backup":{"nesting_mode":3,"block":{"attributes":{"frequency":{"type":"string","optional":true},"frequency_in_minutes":{"type":"number","optional":true},"time":{"type":"string","optional":true},"weekdays":{"type":["set","string"],"optional":true}}},"required":true},"retention_daily":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true},"retention_monthly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"format_type":{"type":"string","required":true},"monthdays":{"type":["set","number"],"optional":true},"weekdays":{"type":["set","string"],"optional":true},"weeks":{"type":["set","string"],"optional":true}}},"optional":true},"retention_weekly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"weekdays":{"type":["set","string"],"required":true}}},"optional":true},"retention_yearly":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"format_type":{"type":"string","required":true},"monthdays":{"type":["set","number"],"optional":true},"months":{"type":["set","string"],"required":true},"weekdays":{"type":["set","string"],"optional":true},"weeks":{"type":["set","string"],"optional":true}}},"optional":true},"simple_retention":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true}}},"optional":true}}},"required":true},"settings":{"nesting_mode":3,"block":{"attributes":{"compression_enabled":{"type":"bool","optional":true,"default":false},"time_zone":{"type":"string","required":true}}},"required":true}}}},"azurerm_backup_protected_file_share":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_file_share_name":{"type":"string","required":true},"source_storage_account_id":{"type":"string","required":true}}}},"azurerm_backup_protected_vm":{"block":{"attributes":{"backup_policy_id":{"type":"string","optional":true},"exclude_disk_luns":{"type":["set","number"],"optional":true,"conflicts_with":["include_disk_luns"]},"include_disk_luns":{"type":["set","number"],"optional":true,"conflicts_with":["exclude_disk_luns"]},"protection_state":{"type":"string","optional":true,"computed":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_vm_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_bastion_host":{"block":{"attributes":{"copy_paste_enabled":{"type":"bool","optional":true,"default":true},"dns_name":{"type":"string","computed":true},"file_copy_enabled":{"type":"bool","optional":true,"default":false},"ip_connect_enabled":{"type":"bool","optional":true,"default":false},"kerberos_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scale_units":{"type":"number","optional":true,"default":2},"session_recording_enabled":{"type":"bool","optional":true,"default":false},"shareable_link_enabled":{"type":"bool","optional":true,"default":false},"sku":{"type":"string","optional":true,"default":"Basic"},"tags":{"type":["map","string"],"optional":true},"tunneling_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_id":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_batch_account":{"block":{"attributes":{"account_endpoint":{"type":"string","computed":true},"allowed_authentication_modes":{"type":["set","string"],"optional":true,"computed":true},"encryption":{"type":["list",["object",{"key_vault_key_id":"string"}]],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"pool_allocation_mode":{"type":"string","optional":true,"default":"BatchService"},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"storage_account_authentication_mode":{"type":"string","optional":true,"required_with":["storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"required_with":["storage_account_authentication_mode"]},"storage_account_node_identity":{"type":"string","optional":true,"required_with":["storage_account_id"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"key_vault_reference":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"url":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"block_types":{"account_access":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_range":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["network_profile.0.account_access","network_profile.0.node_management_access"]},"node_management_access":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_range":{"type":"string","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["network_profile.0.account_access","network_profile.0.node_management_access"]}}},"optional":true}}}},"azurerm_batch_application":{"block":{"attributes":{"account_name":{"type":"string","required":true},"allow_updates":{"type":"bool","optional":true,"default":true},"default_version":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_batch_certificate":{"block":{"attributes":{"account_name":{"type":"string","required":true},"certificate":{"type":"string","required":true},"format":{"type":"string","required":true},"name":{"type":"string","computed":true},"password":{"type":"string","optional":true},"public_data":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true},"thumbprint_algorithm":{"type":"string","required":true}}}},"azurerm_batch_job":{"block":{"attributes":{"batch_pool_id":{"type":"string","required":true},"common_environment_properties":{"type":["map","string"],"optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"task_retry_maximum":{"type":"number","optional":true}}}},"azurerm_batch_pool":{"block":{"attributes":{"account_name":{"type":"string","required":true},"display_name":{"type":"string","optional":true},"inter_node_communication":{"type":"string","optional":true,"default":"Enabled"},"license_type":{"type":"string","optional":true},"max_tasks_per_node":{"type":"number","optional":true,"default":1},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"node_agent_sku_id":{"type":"string","required":true},"os_disk_placement":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"stop_pending_resize_operation":{"type":"bool","optional":true,"default":false},"target_node_communication_mode":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"auto_scale":{"nesting_mode":3,"block":{"attributes":{"evaluation_interval":{"type":"string","optional":true,"default":"PT15M"},"formula":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"store_location":{"type":"string","required":true},"store_name":{"type":"string","optional":true},"visibility":{"type":["set","string"],"optional":true}}},"optional":true},"container_configuration":{"nesting_mode":3,"block":{"attributes":{"container_image_names":{"type":["set","string"],"optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]},"container_registries":{"type":["list",["object",{"password":"string","registry_server":"string","user_assigned_identity_id":"string","user_name":"string"}]],"optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]},"type":{"type":"string","optional":true,"at_least_one_of":["container_configuration.0.type","container_configuration.0.container_image_names","container_configuration.0.container_registries"]}}},"optional":true},"data_disks":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"default":"ReadOnly"},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_target":{"type":"string","required":true}}},"optional":true},"extensions":{"nesting_mode":3,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["set","string"],"optional":true},"publisher":{"type":"string","required":true},"settings_json":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}},"optional":true},"fixed_scale":{"nesting_mode":3,"block":{"attributes":{"node_deallocation_method":{"type":"string","optional":true},"resize_timeout":{"type":"string","optional":true,"default":"PT15M"},"target_dedicated_nodes":{"type":"number","optional":true,"default":1},"target_low_priority_nodes":{"type":"number","optional":true,"default":0}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"mount":{"nesting_mode":3,"block":{"block_types":{"azure_blob_file_system":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true},"account_name":{"type":"string","required":true},"blobfuse_options":{"type":"string","optional":true},"container_name":{"type":"string","required":true},"identity_id":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true},"sas_key":{"type":"string","optional":true}}},"optional":true},"azure_file_share":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"azure_file_url":{"type":"string","required":true},"mount_options":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true}}},"optional":true},"cifs_mount":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":"string","optional":true},"password":{"type":"string","required":true},"relative_mount_path":{"type":"string","required":true},"source":{"type":"string","required":true},"user_name":{"type":"string","required":true}}},"optional":true},"nfs_mount":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":"string","optional":true},"relative_mount_path":{"type":"string","required":true},"source":{"type":"string","required":true}}},"optional":true}}},"optional":true},"network_configuration":{"nesting_mode":3,"block":{"attributes":{"accelerated_networking_enabled":{"type":"bool","optional":true,"default":false},"dynamic_vnet_assignment_scope":{"type":"string","optional":true,"default":"none"},"public_address_provisioning_type":{"type":"string","optional":true},"public_ips":{"type":["set","string"],"optional":true},"subnet_id":{"type":"string","optional":true}},"block_types":{"endpoint_configuration":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port_range":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"network_security_group_rules":{"nesting_mode":3,"block":{"attributes":{"access":{"type":"string","required":true},"priority":{"type":"number","required":true},"source_address_prefix":{"type":"string","required":true},"source_port_ranges":{"type":["list","string"],"optional":true,"computed":true}}},"optional":true}}},"optional":true}}},"optional":true},"node_placement":{"nesting_mode":3,"block":{"attributes":{"policy":{"type":"string","optional":true,"default":"Regional"}}},"optional":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"host_encryption_enabled":{"type":"bool","optional":true},"secure_boot_enabled":{"type":"bool","optional":true,"required_with":["security_profile.0.security_type"]},"security_type":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true,"required_with":["security_profile.0.security_type"]}}},"optional":true},"start_task":{"nesting_mode":3,"block":{"attributes":{"command_line":{"type":"string","required":true},"common_environment_properties":{"type":["map","string"],"optional":true},"task_retry_maximum":{"type":"number","optional":true},"wait_for_success":{"type":"bool","optional":true,"default":false}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"run_options":{"type":"string","optional":true},"working_directory":{"type":"string","optional":true}},"block_types":{"registry":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"registry_server":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true},"user_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"resource_file":{"nesting_mode":3,"block":{"attributes":{"auto_storage_container_name":{"type":"string","optional":true},"blob_prefix":{"type":"string","optional":true},"file_mode":{"type":"string","optional":true},"file_path":{"type":"string","optional":true},"http_url":{"type":"string","optional":true},"storage_container_url":{"type":"string","optional":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"user_identity":{"nesting_mode":3,"block":{"attributes":{"user_name":{"type":"string","optional":true,"at_least_one_of":["start_task.0.user_identity.0.user_name","start_task.0.user_identity.0.auto_user"]}},"block_types":{"auto_user":{"nesting_mode":3,"block":{"attributes":{"elevation_level":{"type":"string","optional":true,"default":"NonAdmin"},"scope":{"type":"string","optional":true,"default":"Task"}}},"optional":true,"at_least_one_of":["start_task.0.user_identity.0.user_name","start_task.0.user_identity.0.auto_user"]}}},"required":true}}},"optional":true},"storage_image_reference":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"offer":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"publisher":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"sku":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]},"version":{"type":"string","optional":true,"at_least_one_of":["storage_image_reference.0.id","storage_image_reference.0.publisher","storage_image_reference.0.offer","storage_image_reference.0.sku","storage_image_reference.0.version"]}}},"required":true},"task_scheduling_policy":{"nesting_mode":3,"block":{"attributes":{"node_fill_type":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"user_accounts":{"nesting_mode":3,"block":{"attributes":{"elevation_level":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true}},"block_types":{"linux_user_configuration":{"nesting_mode":3,"block":{"attributes":{"gid":{"type":"number","optional":true},"ssh_private_key":{"type":"string","optional":true},"uid":{"type":"number","optional":true}}},"optional":true},"windows_user_configuration":{"nesting_mode":3,"block":{"attributes":{"login_mode":{"type":"string","required":true}}},"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"enable_automatic_updates":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_billing_account_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"billing_account_id":{"type":"string","required":true},"file_format":{"type":"string","optional":true,"default":"Csv"},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_blueprint_assignment":{"block":{"attributes":{"blueprint_name":{"type":"string","computed":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"lock_exclude_actions":{"type":["list","string"],"optional":true},"lock_exclude_principals":{"type":["list","string"],"optional":true},"lock_mode":{"type":"string","optional":true,"default":"None"},"name":{"type":"string","required":true},"parameter_values":{"type":"string","optional":true},"resource_groups":{"type":"string","optional":true},"target_subscription_id":{"type":"string","required":true},"type":{"type":"string","computed":true},"version_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_alexa":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"skill_id":{"type":"string","required":true}}}},"azurerm_bot_channel_direct_line_speech":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"cognitive_account_id":{"type":"string","optional":true},"cognitive_service_access_key":{"type":"string","required":true},"cognitive_service_location":{"type":"string","required":true},"custom_speech_model_id":{"type":"string","optional":true},"custom_voice_deployment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_directline":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"site":{"nesting_mode":4,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"endpoint_parameters_enabled":{"type":"bool","optional":true},"enhanced_authentication_enabled":{"type":"bool","optional":true,"default":false},"id":{"type":"string","computed":true},"key":{"type":"string","computed":true},"key2":{"type":"string","computed":true},"name":{"type":"string","required":true},"storage_enabled":{"type":"bool","optional":true,"default":true},"trusted_origins":{"type":["set","string"],"optional":true},"user_upload_enabled":{"type":"bool","optional":true,"default":true},"v1_allowed":{"type":"bool","optional":true,"default":true},"v3_allowed":{"type":"bool","optional":true,"default":true}}},"required":true}}}},"azurerm_bot_channel_email":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"email_address":{"type":"string","required":true},"email_password":{"type":"string","optional":true,"exactly_one_of":["email_password","magic_code"]},"location":{"type":"string","required":true},"magic_code":{"type":"string","optional":true,"exactly_one_of":["email_password","magic_code"]},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_facebook":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"facebook_application_id":{"type":"string","required":true},"facebook_application_secret":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"page":{"nesting_mode":4,"block":{"attributes":{"access_token":{"type":"string","required":true},"id":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_line":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"line_channel":{"nesting_mode":4,"block":{"attributes":{"access_token":{"type":"string","required":true},"secret":{"type":"string","required":true}}},"required":true}}}},"azurerm_bot_channel_ms_teams":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"calling_web_hook":{"type":"string","optional":true,"computed":true},"deployment_environment":{"type":"string","optional":true,"default":"CommercialDeployment"},"enable_calling":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_bot_channel_slack":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"landing_page_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"signing_secret":{"type":"string","optional":true},"verification_token":{"type":"string","required":true}}}},"azurerm_bot_channel_sms":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"phone_number":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sms_channel_account_security_id":{"type":"string","required":true},"sms_channel_auth_token":{"type":"string","required":true}}}},"azurerm_bot_channel_web_chat":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"site":{"nesting_mode":4,"block":{"attributes":{"endpoint_parameters_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"storage_enabled":{"type":"bool","optional":true,"default":true},"user_upload_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_bot_channels_registration":{"block":{"attributes":{"cmk_key_vault_url":{"type":"string","optional":true},"description":{"type":"string","optional":true},"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"location":{"type":"string","required":true},"microsoft_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"streaming_endpoint_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_bot_connection":{"block":{"attributes":{"bot_name":{"type":"string","required":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":"string","optional":true},"service_provider_name":{"type":"string","required":true}}}},"azurerm_bot_service_azure_bot":{"block":{"attributes":{"cmk_key_vault_key_url":{"type":"string","optional":true},"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true,"default":"https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png"},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"luis_app_ids":{"type":["list","string"],"optional":true},"luis_key":{"type":"string","optional":true},"microsoft_app_id":{"type":"string","required":true},"microsoft_app_msi_id":{"type":"string","optional":true},"microsoft_app_tenant_id":{"type":"string","optional":true},"microsoft_app_type":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"streaming_endpoint_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_bot_web_app":{"block":{"attributes":{"developer_app_insights_api_key":{"type":"string","optional":true},"developer_app_insights_application_id":{"type":"string","optional":true},"developer_app_insights_key":{"type":"string","optional":true},"display_name":{"type":"string","optional":true,"computed":true},"endpoint":{"type":"string","optional":true},"location":{"type":"string","required":true},"luis_app_ids":{"type":["list","string"],"optional":true},"luis_key":{"type":"string","optional":true},"microsoft_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_capacity_reservation":{"block":{"attributes":{"capacity_reservation_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_capacity_reservation_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_cdn_endpoint":{"block":{"attributes":{"content_types_to_compress":{"type":["set","string"],"optional":true},"fqdn":{"type":"string","computed":true},"is_compression_enabled":{"type":"bool","optional":true},"is_http_allowed":{"type":"bool","optional":true,"default":true},"is_https_allowed":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"optimization_type":{"type":"string","optional":true},"origin_host_header":{"type":"string","optional":true},"origin_path":{"type":"string","optional":true},"probe_path":{"type":"string","optional":true},"profile_name":{"type":"string","required":true},"querystring_caching_behaviour":{"type":"string","optional":true,"default":"IgnoreQueryString"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"delivery_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"order":{"type":"number","required":true}},"block_types":{"cache_expiration_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"duration":{"type":"string","optional":true}}},"optional":true},"cache_key_query_string_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true},"cookies_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"device_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"http_version_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"modify_request_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"modify_response_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"post_arg_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"query_string_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"remote_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"request_body_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"request_header_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"request_method_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_scheme_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_uri_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_file_extension_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_file_name_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_path_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"fragment":{"type":"string","optional":true},"hostname":{"type":"string","optional":true},"path":{"type":"string","optional":true},"protocol":{"type":"string","optional":true,"default":"MatchRequest"},"query_string":{"type":"string","optional":true},"redirect_type":{"type":"string","required":true}}},"optional":true},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":true},"source_pattern":{"type":"string","required":true}}},"optional":true}}},"optional":true},"geo_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"country_codes":{"type":["list","string"],"required":true},"relative_path":{"type":"string","required":true}}},"optional":true},"global_delivery_rule":{"nesting_mode":3,"block":{"block_types":{"cache_expiration_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"duration":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"cache_key_query_string_action":{"nesting_mode":3,"block":{"attributes":{"behavior":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"modify_request_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"modify_response_header_action":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"fragment":{"type":"string","optional":true},"hostname":{"type":"string","optional":true},"path":{"type":"string","optional":true},"protocol":{"type":"string","optional":true,"default":"MatchRequest"},"query_string":{"type":"string","optional":true},"redirect_type":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":true},"source_pattern":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["global_delivery_rule.0.cache_expiration_action","global_delivery_rule.0.cache_key_query_string_action","global_delivery_rule.0.modify_request_header_action","global_delivery_rule.0.modify_response_header_action","global_delivery_rule.0.url_redirect_action","global_delivery_rule.0.url_rewrite_action"]}}},"optional":true},"origin":{"nesting_mode":4,"block":{"attributes":{"host_name":{"type":"string","required":true},"http_port":{"type":"number","optional":true,"default":80},"https_port":{"type":"number","optional":true,"default":443},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_cdn_endpoint_custom_domain":{"block":{"attributes":{"cdn_endpoint_id":{"type":"string","required":true},"host_name":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"cdn_managed_https":{"nesting_mode":3,"block":{"attributes":{"certificate_type":{"type":"string","required":true},"protocol_type":{"type":"string","required":true},"tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"optional":true,"conflicts_with":["user_managed_https"]},"user_managed_https":{"nesting_mode":3,"block":{"attributes":{"key_vault_secret_id":{"type":"string","required":true},"tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"optional":true,"conflicts_with":["cdn_managed_https"]}}}},"azurerm_cdn_frontdoor_custom_domain":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"dns_zone_id":{"type":"string","optional":true},"expiration_date":{"type":"string","computed":true},"host_name":{"type":"string","required":true},"name":{"type":"string","required":true},"validation_token":{"type":"string","computed":true}},"block_types":{"tls":{"nesting_mode":3,"block":{"attributes":{"cdn_frontdoor_secret_id":{"type":"string","optional":true,"computed":true},"certificate_type":{"type":"string","optional":true,"default":"ManagedCertificate"},"minimum_tls_version":{"type":"string","optional":true,"default":"TLS12"}}},"required":true}}}},"azurerm_cdn_frontdoor_custom_domain_association":{"block":{"attributes":{"cdn_frontdoor_custom_domain_id":{"type":"string","required":true},"cdn_frontdoor_route_ids":{"type":["list","string"],"required":true}}}},"azurerm_cdn_frontdoor_endpoint":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_cdn_frontdoor_firewall_policy":{"block":{"attributes":{"custom_block_response_body":{"type":"string","optional":true},"custom_block_response_status_code":{"type":"number","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoint_ids":{"type":["list","string"],"computed":true},"js_challenge_cookie_expiration_in_minutes":{"type":"number","optional":true,"computed":true},"mode":{"type":"string","required":true},"name":{"type":"string","required":true},"redirect_url":{"type":"string","optional":true},"request_body_check_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"number","optional":true,"default":1},"rate_limit_threshold":{"type":"number","optional":true,"default":10},"type":{"type":"string","required":true}},"block_types":{"match_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"match_variable":{"type":"string","required":true},"negation_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"log_scrubbing":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"scrubbing_rule":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"match_variable":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"Equals"},"selector":{"type":"string","optional":true}}},"required":true}}},"optional":true},"managed_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"type":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"rule_id":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_origin":{"block":{"attributes":{"cdn_frontdoor_origin_group_id":{"type":"string","required":true},"certificate_name_check_enabled":{"type":"bool","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_name":{"type":"string","required":true},"http_port":{"type":"number","optional":true,"default":80},"https_port":{"type":"number","optional":true,"default":443},"name":{"type":"string","required":true},"origin_host_header":{"type":"string","optional":true},"priority":{"type":"number","optional":true,"default":1},"weight":{"type":"number","optional":true,"default":500}},"block_types":{"private_link":{"nesting_mode":3,"block":{"attributes":{"location":{"type":"string","required":true},"private_link_target_id":{"type":"string","required":true},"request_message":{"type":"string","optional":true,"default":"Access request for CDN FrontDoor Private Link Origin"},"target_type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_origin_group":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true},"restore_traffic_time_to_healed_or_new_endpoint_in_minutes":{"type":"number","optional":true,"default":10},"session_affinity_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"health_probe":{"nesting_mode":3,"block":{"attributes":{"interval_in_seconds":{"type":"number","required":true},"path":{"type":"string","optional":true,"default":"/"},"protocol":{"type":"string","required":true},"request_type":{"type":"string","optional":true,"default":"HEAD"}}},"optional":true},"load_balancing":{"nesting_mode":3,"block":{"attributes":{"additional_latency_in_milliseconds":{"type":"number","optional":true,"default":50},"sample_size":{"type":"number","optional":true,"default":4},"successful_samples_required":{"type":"number","optional":true,"default":3}}},"required":true}}}},"azurerm_cdn_frontdoor_profile":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_guid":{"type":"string","computed":true},"response_timeout_seconds":{"type":"number","optional":true,"default":120},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_route":{"block":{"attributes":{"cdn_frontdoor_custom_domain_ids":{"type":["set","string"],"optional":true},"cdn_frontdoor_endpoint_id":{"type":"string","required":true},"cdn_frontdoor_origin_group_id":{"type":"string","required":true},"cdn_frontdoor_origin_ids":{"type":["list","string"],"required":true},"cdn_frontdoor_origin_path":{"type":"string","optional":true},"cdn_frontdoor_rule_set_ids":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"forwarding_protocol":{"type":"string","optional":true,"default":"MatchRequest"},"https_redirect_enabled":{"type":"bool","optional":true,"default":true},"link_to_default_domain":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"patterns_to_match":{"type":["list","string"],"required":true},"supported_protocols":{"type":["set","string"],"required":true}},"block_types":{"cache":{"nesting_mode":3,"block":{"attributes":{"compression_enabled":{"type":"bool","optional":true,"default":false},"content_types_to_compress":{"type":["list","string"],"optional":true},"query_string_caching_behavior":{"type":"string","optional":true,"default":"IgnoreQueryString"},"query_strings":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_rule":{"block":{"attributes":{"behavior_on_match":{"type":"string","optional":true,"default":"Continue"},"cdn_frontdoor_rule_set_id":{"type":"string","required":true},"cdn_frontdoor_rule_set_name":{"type":"string","computed":true},"name":{"type":"string","required":true},"order":{"type":"number","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"block_types":{"request_header_action":{"nesting_mode":3,"block":{"attributes":{"header_action":{"type":"string","required":true},"header_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"response_header_action":{"nesting_mode":3,"block":{"attributes":{"header_action":{"type":"string","required":true},"header_name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"route_configuration_override_action":{"nesting_mode":3,"block":{"attributes":{"cache_behavior":{"type":"string","optional":true},"cache_duration":{"type":"string","optional":true},"cdn_frontdoor_origin_group_id":{"type":"string","optional":true},"compression_enabled":{"type":"bool","optional":true},"forwarding_protocol":{"type":"string","optional":true},"query_string_caching_behavior":{"type":"string","optional":true},"query_string_parameters":{"type":["list","string"],"optional":true}}},"optional":true},"url_redirect_action":{"nesting_mode":3,"block":{"attributes":{"destination_fragment":{"type":"string","optional":true,"default":""},"destination_hostname":{"type":"string","required":true},"destination_path":{"type":"string","optional":true,"default":""},"query_string":{"type":"string","optional":true,"default":""},"redirect_protocol":{"type":"string","optional":true,"default":"MatchRequest"},"redirect_type":{"type":"string","required":true}}},"optional":true},"url_rewrite_action":{"nesting_mode":3,"block":{"attributes":{"destination":{"type":"string","required":true},"preserve_unmatched_path":{"type":"bool","optional":true,"default":false},"source_pattern":{"type":"string","required":true}}},"optional":true}}},"required":true},"conditions":{"nesting_mode":3,"block":{"block_types":{"client_port_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"cookies_condition":{"nesting_mode":3,"block":{"attributes":{"cookie_name":{"type":"string","required":true},"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"host_name_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"http_version_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"is_device_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"post_args_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"post_args_name":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"query_string_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"remote_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"IPMatch"}}},"optional":true},"request_body_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"request_header_condition":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"request_method_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_scheme_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"request_uri_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"server_port_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true}}},"optional":true},"socket_address_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"IPMatch"}}},"optional":true},"ssl_protocol_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["set","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","optional":true,"default":"Equal"}}},"optional":true},"url_file_extension_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"url_filename_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true},"url_path_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_cdn_frontdoor_rule_set":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_cdn_frontdoor_secret":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"cdn_frontdoor_profile_name":{"type":"string","computed":true},"name":{"type":"string","required":true}},"block_types":{"secret":{"nesting_mode":3,"block":{"block_types":{"customer_certificate":{"nesting_mode":3,"block":{"attributes":{"key_vault_certificate_id":{"type":"string","required":true},"subject_alternative_names":{"type":["list","string"],"computed":true}}},"required":true}}},"required":true}}}},"azurerm_cdn_frontdoor_security_policy":{"block":{"attributes":{"cdn_frontdoor_profile_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"security_policies":{"nesting_mode":3,"block":{"block_types":{"firewall":{"nesting_mode":3,"block":{"attributes":{"cdn_frontdoor_firewall_policy_id":{"type":"string","required":true}},"block_types":{"association":{"nesting_mode":3,"block":{"attributes":{"patterns_to_match":{"type":["list","string"],"required":true}},"block_types":{"domain":{"nesting_mode":3,"block":{"attributes":{"active":{"type":"bool","computed":true},"cdn_frontdoor_domain_id":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_cdn_profile":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_chaos_studio_capability":{"block":{"attributes":{"capability_type":{"type":"string","required":true},"chaos_studio_target_id":{"type":"string","required":true},"urn":{"type":"string","computed":true}}}},"azurerm_chaos_studio_experiment":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"selectors":{"nesting_mode":3,"block":{"attributes":{"chaos_studio_target_ids":{"type":["list","string"],"required":true},"name":{"type":"string","required":true}}},"required":true},"steps":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"branch":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"duration":{"type":"string","optional":true},"parameters":{"type":["map","string"],"optional":true},"selector_name":{"type":"string","optional":true},"urn":{"type":"string","optional":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_chaos_studio_target":{"block":{"attributes":{"location":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"target_type":{"type":"string","required":true}}}},"azurerm_cognitive_account":{"block":{"attributes":{"custom_question_answering_search_service_id":{"type":"string","optional":true},"custom_question_answering_search_service_key":{"type":"string","optional":true},"custom_subdomain_name":{"type":"string","optional":true},"dynamic_throttling_enabled":{"type":"bool","optional":true},"endpoint":{"type":"string","computed":true},"fqdns":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"metrics_advisor_aad_client_id":{"type":"string","optional":true},"metrics_advisor_aad_tenant_id":{"type":"string","optional":true},"metrics_advisor_super_user_name":{"type":"string","optional":true},"metrics_advisor_website_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"qna_runtime_endpoint":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","optional":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true}},"block_types":{"virtual_network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"required_with":["custom_subdomain_name"]},"storage":{"nesting_mode":3,"block":{"attributes":{"identity_client_id":{"type":"string","optional":true},"storage_account_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cognitive_account_customer_managed_key":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"identity_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true}}}},"azurerm_cognitive_account_rai_blocklist":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true}}}},"azurerm_cognitive_account_rai_policy":{"block":{"attributes":{"base_policy_name":{"type":"string","required":true},"cognitive_account_id":{"type":"string","required":true},"mode":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"content_filter":{"nesting_mode":3,"block":{"attributes":{"block_enabled":{"type":"bool","required":true},"filter_enabled":{"type":"bool","required":true},"name":{"type":"string","required":true},"severity_threshold":{"type":"string","required":true},"source":{"type":"string","required":true}}},"required":true}}}},"azurerm_cognitive_deployment":{"block":{"attributes":{"cognitive_account_id":{"type":"string","required":true},"dynamic_throttling_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"rai_policy_name":{"type":"string","optional":true},"version_upgrade_option":{"type":"string","optional":true,"default":"OnceNewDefaultVersionAvailable"}},"block_types":{"model":{"nesting_mode":3,"block":{"attributes":{"format":{"type":"string","required":true},"name":{"type":"string","required":true},"version":{"type":"string","optional":true}}},"required":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":1},"family":{"type":"string","optional":true},"name":{"type":"string","required":true},"size":{"type":"string","optional":true},"tier":{"type":"string","optional":true}}},"required":true}}}},"azurerm_communication_service":{"block":{"attributes":{"data_location":{"type":"string","optional":true,"default":"United States"},"hostname":{"type":"string","computed":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_communication_service_email_domain_association":{"block":{"attributes":{"communication_service_id":{"type":"string","required":true},"email_service_domain_id":{"type":"string","required":true}}}},"azurerm_confidential_ledger":{"block":{"attributes":{"identity_service_endpoint":{"type":"string","computed":true},"ledger_endpoint":{"type":"string","computed":true},"ledger_type":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azuread_based_service_principal":{"nesting_mode":3,"block":{"attributes":{"ledger_role_name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"required":true},"certificate_based_security_principal":{"nesting_mode":3,"block":{"attributes":{"ledger_role_name":{"type":"string","required":true},"pem_public_key":{"type":"string","required":true}}},"optional":true}}}},"azurerm_consumption_budget_management_group":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_consumption_budget_resource_group":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"optional":true},"contact_groups":{"type":["list","string"],"optional":true},"contact_roles":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_consumption_budget_subscription":{"block":{"attributes":{"amount":{"type":"number","required":true},"etag":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"time_grain":{"type":"string","optional":true,"default":"Monthly"}},"block_types":{"filter":{"nesting_mode":3,"block":{"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]},"tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"In"},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.dimension","filter.0.tag"]}}},"optional":true},"notification":{"nesting_mode":4,"block":{"attributes":{"contact_emails":{"type":["list","string"],"optional":true},"contact_groups":{"type":["list","string"],"optional":true},"contact_roles":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true},"threshold_type":{"type":"string","optional":true,"default":"Actual"}}},"required":true},"time_period":{"nesting_mode":3,"block":{"attributes":{"end_date":{"type":"string","optional":true,"computed":true},"start_date":{"type":"string","required":true}}},"required":true}}}},"azurerm_container_app":{"block":{"attributes":{"container_app_environment_id":{"type":"string","required":true},"custom_domain_verification_id":{"type":"string","computed":true},"latest_revision_fqdn":{"type":"string","computed":true},"latest_revision_name":{"type":"string","computed":true},"location":{"type":"string","computed":true},"max_inactive_revisions":{"type":"number","optional":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"revision_mode":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workload_profile_name":{"type":"string","optional":true}},"block_types":{"dapr":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_port":{"type":"number","optional":true},"app_protocol":{"type":"string","optional":true,"default":"http"}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress":{"nesting_mode":3,"block":{"attributes":{"allow_insecure_connections":{"type":"bool","optional":true,"default":false},"client_certificate_mode":{"type":"string","optional":true},"custom_domain":{"type":["list",["object",{"certificate_binding_type":"string","certificate_id":"string","name":"string"}]],"computed":true},"exposed_port":{"type":"number","optional":true},"external_enabled":{"type":"bool","optional":true,"default":false},"fqdn":{"type":"string","computed":true},"target_port":{"type":"number","required":true},"transport":{"type":"string","optional":true,"default":"auto"}},"block_types":{"ip_security_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"description":{"type":"string","optional":true},"ip_address_range":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"traffic_weight":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"latest_revision":{"type":"bool","optional":true,"default":false},"percentage":{"type":"number","required":true},"revision_suffix":{"type":"string","optional":true}}},"required":true}}},"optional":true},"registry":{"nesting_mode":3,"block":{"attributes":{"identity":{"type":"string","optional":true},"password_secret_name":{"type":"string","optional":true},"server":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"template":{"nesting_mode":3,"block":{"attributes":{"max_replicas":{"type":"number","optional":true,"default":10},"min_replicas":{"type":"number","optional":true,"default":0},"revision_suffix":{"type":"string","optional":true,"computed":true},"termination_grace_period_seconds":{"type":"number","optional":true,"default":0}},"block_types":{"azure_queue_scale_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"queue_length":{"type":"number","required":true},"queue_name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"required":true}}},"optional":true},"container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","required":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":1},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"success_count_threshold":{"type":"number","optional":true,"default":3},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"startup_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"required":true},"custom_scale_rule":{"nesting_mode":3,"block":{"attributes":{"custom_rule_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_scale_rule":{"nesting_mode":3,"block":{"attributes":{"concurrent_requests":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","optional":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"tcp_scale_rule":{"nesting_mode":3,"block":{"attributes":{"concurrent_requests":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_name":{"type":"string","optional":true},"storage_type":{"type":"string","optional":true,"default":"EmptyDir"}}},"optional":true}}},"required":true}}}},"azurerm_container_app_custom_domain":{"block":{"attributes":{"certificate_binding_type":{"type":"string","optional":true},"container_app_environment_certificate_id":{"type":"string","optional":true,"required_with":["certificate_binding_type"]},"container_app_environment_managed_certificate_id":{"type":"string","computed":true},"container_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_container_app_environment":{"block":{"attributes":{"custom_domain_verification_id":{"type":"string","computed":true},"dapr_application_insights_connection_string":{"type":"string","optional":true},"default_domain":{"type":"string","computed":true},"docker_bridge_cidr":{"type":"string","computed":true},"infrastructure_resource_group_name":{"type":"string","optional":true,"required_with":["workload_profile"]},"infrastructure_subnet_id":{"type":"string","optional":true},"internal_load_balancer_enabled":{"type":"bool","optional":true,"default":false,"required_with":["infrastructure_subnet_id"]},"location":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","optional":true},"logs_destination":{"type":"string","optional":true,"computed":true},"mutual_tls_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"platform_reserved_cidr":{"type":"string","computed":true},"platform_reserved_dns_ip_address":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"static_ip_address":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false,"required_with":["infrastructure_subnet_id"]}},"block_types":{"workload_profile":{"nesting_mode":4,"block":{"attributes":{"maximum_count":{"type":"number","optional":true},"minimum_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"workload_profile_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_app_environment_certificate":{"block":{"attributes":{"certificate_blob_base64":{"type":"string","required":true},"certificate_password":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"expiration_date":{"type":"string","computed":true},"issue_date":{"type":"string","computed":true},"issuer":{"type":"string","computed":true},"name":{"type":"string","required":true},"subject_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_container_app_environment_custom_domain":{"block":{"attributes":{"certificate_blob_base64":{"type":"string","required":true},"certificate_password":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"dns_suffix":{"type":"string","required":true}}}},"azurerm_container_app_environment_dapr_component":{"block":{"attributes":{"component_type":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"ignore_errors":{"type":"bool","optional":true,"default":false},"init_timeout":{"type":"string","optional":true,"default":"5s"},"name":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"metadata":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_container_app_environment_storage":{"block":{"attributes":{"access_key":{"type":"string","required":true},"access_mode":{"type":"string","required":true},"account_name":{"type":"string","required":true},"container_app_environment_id":{"type":"string","required":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true}}}},"azurerm_container_app_job":{"block":{"attributes":{"container_app_environment_id":{"type":"string","required":true},"event_stream_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":["list","string"],"computed":true},"replica_retry_limit":{"type":"number","optional":true},"replica_timeout_in_seconds":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workload_profile_name":{"type":"string","optional":true}},"block_types":{"event_trigger_config":{"nesting_mode":3,"block":{"attributes":{"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}},"block_types":{"scale":{"nesting_mode":3,"block":{"attributes":{"max_executions":{"type":"number","optional":true,"default":100},"min_executions":{"type":"number","optional":true,"default":0},"polling_interval_in_seconds":{"type":"number","optional":true,"default":30}},"block_types":{"rules":{"nesting_mode":3,"block":{"attributes":{"custom_rule_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"required":true},"name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"secret_name":{"type":"string","required":true},"trigger_parameter":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"manual_trigger_config":{"nesting_mode":3,"block":{"attributes":{"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"registry":{"nesting_mode":3,"block":{"attributes":{"identity":{"type":"string","optional":true},"password_secret_name":{"type":"string","optional":true},"server":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true},"schedule_trigger_config":{"nesting_mode":3,"block":{"attributes":{"cron_expression":{"type":"string","required":true},"parallelism":{"type":"number","optional":true,"default":1},"replica_completion_count":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["event_trigger_config","manual_trigger_config","schedule_trigger_config"]},"secret":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"key_vault_secret_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"template":{"nesting_mode":3,"block":{"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","required":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":1},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"success_count_threshold":{"type":"number","optional":true,"default":3},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"startup_probe":{"nesting_mode":3,"block":{"attributes":{"failure_count_threshold":{"type":"number","optional":true,"default":3},"host":{"type":"string","optional":true},"initial_delay":{"type":"number","optional":true,"default":0},"interval_seconds":{"type":"number","optional":true,"default":10},"path":{"type":"string","optional":true,"computed":true},"port":{"type":"number","required":true},"termination_grace_period_seconds":{"type":"number","computed":true},"timeout":{"type":"number","optional":true,"default":1},"transport":{"type":"string","required":true}},"block_types":{"header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"required":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"args":{"type":["list","string"],"optional":true},"command":{"type":["list","string"],"optional":true},"cpu":{"type":"number","optional":true},"ephemeral_storage":{"type":"string","computed":true},"image":{"type":"string","required":true},"memory":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"env":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"secret_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"volume_mounts":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"path":{"type":"string","required":true},"sub_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_name":{"type":"string","optional":true},"storage_type":{"type":"string","optional":true,"default":"EmptyDir"}}},"optional":true}}},"required":true}}}},"azurerm_container_connected_registry":{"block":{"attributes":{"audit_log_enabled":{"type":"bool","optional":true,"default":false},"client_token_ids":{"type":["list","string"],"optional":true},"container_registry_id":{"type":"string","required":true},"log_level":{"type":"string","optional":true,"default":"None"},"mode":{"type":"string","optional":true,"default":"ReadWrite"},"name":{"type":"string","required":true},"parent_registry_id":{"type":"string","optional":true},"sync_message_ttl":{"type":"string","optional":true,"default":"P1D"},"sync_schedule":{"type":"string","optional":true,"default":"* * * * *"},"sync_token_id":{"type":"string","required":true},"sync_window":{"type":"string","optional":true}},"block_types":{"notification":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"digest":{"type":"string","optional":true},"name":{"type":"string","required":true},"tag":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_container_group":{"block":{"attributes":{"dns_name_label":{"type":"string","optional":true},"dns_name_label_reuse_policy":{"type":"string","optional":true,"default":"Unsecure"},"exposed_port":{"type":["set",["object",{"port":"number","protocol":"string"}]],"optional":true,"computed":true},"fqdn":{"type":"string","computed":true},"ip_address":{"type":"string","computed":true},"ip_address_type":{"type":"string","optional":true,"default":"Public"},"key_vault_key_id":{"type":"string","optional":true},"key_vault_user_assigned_identity_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_profile_id":{"type":"string","optional":true,"computed":true},"os_type":{"type":"string","required":true},"priority":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"restart_policy":{"type":"string","optional":true,"default":"Always"},"sku":{"type":"string","optional":true,"default":"Standard"},"subnet_ids":{"type":["set","string"],"optional":true,"conflicts_with":["dns_name_label"]},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"commands":{"type":["list","string"],"optional":true,"computed":true},"cpu":{"type":"number","required":true},"cpu_limit":{"type":"number","optional":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"memory":{"type":"number","required":true},"memory_limit":{"type":"number","optional":true},"name":{"type":"string","required":true},"secure_environment_variables":{"type":["map","string"],"optional":true}},"block_types":{"liveness_probe":{"nesting_mode":3,"block":{"attributes":{"exec":{"type":["list","string"],"optional":true},"failure_threshold":{"type":"number","optional":true},"initial_delay_seconds":{"type":"number","optional":true},"period_seconds":{"type":"number","optional":true},"success_threshold":{"type":"number","optional":true},"timeout_seconds":{"type":"number","optional":true}},"block_types":{"http_get":{"nesting_mode":3,"block":{"attributes":{"http_headers":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"scheme":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"ports":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","optional":true},"protocol":{"type":"string","optional":true,"default":"TCP"}}},"optional":true},"readiness_probe":{"nesting_mode":3,"block":{"attributes":{"exec":{"type":["list","string"],"optional":true},"failure_threshold":{"type":"number","optional":true},"initial_delay_seconds":{"type":"number","optional":true},"period_seconds":{"type":"number","optional":true},"success_threshold":{"type":"number","optional":true},"timeout_seconds":{"type":"number","optional":true}},"block_types":{"http_get":{"nesting_mode":3,"block":{"attributes":{"http_headers":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"scheme":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"security":{"nesting_mode":3,"block":{"attributes":{"privilege_enabled":{"type":"bool","required":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"empty_dir":{"type":"bool","optional":true,"default":false},"mount_path":{"type":"string","required":true},"name":{"type":"string","required":true},"read_only":{"type":"bool","optional":true,"default":false},"secret":{"type":["map","string"],"optional":true},"share_name":{"type":"string","optional":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}},"block_types":{"git_repo":{"nesting_mode":3,"block":{"attributes":{"directory":{"type":"string","optional":true},"revision":{"type":"string","optional":true},"url":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true},"diagnostics":{"nesting_mode":3,"block":{"block_types":{"log_analytics":{"nesting_mode":3,"block":{"attributes":{"log_type":{"type":"string","optional":true},"metadata":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true},"workspace_key":{"type":"string","required":true}}},"required":true}}},"optional":true},"dns_config":{"nesting_mode":3,"block":{"attributes":{"nameservers":{"type":["list","string"],"required":true},"options":{"type":["set","string"],"optional":true},"search_domains":{"type":["set","string"],"optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"image_registry_credential":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"server":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true},"username":{"type":"string","optional":true}}},"optional":true},"init_container":{"nesting_mode":3,"block":{"attributes":{"commands":{"type":["list","string"],"optional":true,"computed":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"name":{"type":"string","required":true},"secure_environment_variables":{"type":["map","string"],"optional":true}},"block_types":{"security":{"nesting_mode":3,"block":{"attributes":{"privilege_enabled":{"type":"bool","required":true}}},"optional":true},"volume":{"nesting_mode":3,"block":{"attributes":{"empty_dir":{"type":"bool","optional":true,"default":false},"mount_path":{"type":"string","required":true},"name":{"type":"string","required":true},"read_only":{"type":"bool","optional":true,"default":false},"secret":{"type":["map","string"],"optional":true},"share_name":{"type":"string","optional":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}},"block_types":{"git_repo":{"nesting_mode":3,"block":{"attributes":{"directory":{"type":"string","optional":true},"revision":{"type":"string","optional":true},"url":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_container_registry":{"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"admin_password":{"type":"string","computed":true},"admin_username":{"type":"string","computed":true},"anonymous_pull_enabled":{"type":"bool","optional":true},"data_endpoint_enabled":{"type":"bool","optional":true},"encryption":{"type":["list",["object",{"identity_client_id":"string","key_vault_key_id":"string"}]],"optional":true,"computed":true},"export_policy_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"login_server":{"type":"string","computed":true},"name":{"type":"string","required":true},"network_rule_bypass_option":{"type":"string","optional":true,"default":"AzureServices"},"network_rule_set":{"type":["list",["object",{"default_action":"string","ip_rule":["set",["object",{"action":"string","ip_range":"string"}]]}]],"optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"quarantine_policy_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"retention_policy_in_days":{"type":"number","optional":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"trust_policy_enabled":{"type":"bool","optional":true,"default":false},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"georeplications":{"nesting_mode":3,"block":{"attributes":{"location":{"type":"string","required":true},"regional_endpoint_enabled":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_registry_agent_pool":{"block":{"attributes":{"container_registry_name":{"type":"string","required":true},"instance_count":{"type":"number","optional":true,"default":1},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","optional":true,"default":"S1"},"virtual_network_subnet_id":{"type":"string","optional":true}}}},"azurerm_container_registry_cache_rule":{"block":{"attributes":{"container_registry_id":{"type":"string","required":true},"credential_set_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"source_repo":{"type":"string","required":true},"target_repo":{"type":"string","required":true}}}},"azurerm_container_registry_credential_set":{"block":{"attributes":{"container_registry_id":{"type":"string","required":true},"login_server":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"authentication_credentials":{"nesting_mode":3,"block":{"attributes":{"password_secret_id":{"type":"string","required":true},"username_secret_id":{"type":"string","required":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_container_registry_scope_map":{"block":{"attributes":{"actions":{"type":["list","string"],"required":true},"container_registry_name":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_container_registry_task":{"block":{"attributes":{"agent_pool_name":{"type":"string","optional":true,"conflicts_with":["agent_setting"]},"container_registry_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"is_system_task":{"type":"bool","optional":true,"default":false},"log_template":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timeout_in_seconds":{"type":"number","optional":true,"default":3600}},"block_types":{"agent_setting":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"number","required":true}}},"optional":true,"conflicts_with":["agent_pool_name"]},"base_image_trigger":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"type":{"type":"string","required":true},"update_trigger_endpoint":{"type":"string","optional":true},"update_trigger_payload_type":{"type":"string","optional":true}}},"optional":true},"docker_step":{"nesting_mode":3,"block":{"attributes":{"arguments":{"type":["map","string"],"optional":true},"cache_enabled":{"type":"bool","optional":true,"default":true},"context_access_token":{"type":"string","required":true},"context_path":{"type":"string","required":true},"dockerfile_path":{"type":"string","required":true},"image_names":{"type":["list","string"],"optional":true},"push_enabled":{"type":"bool","optional":true,"default":true},"secret_arguments":{"type":["map","string"],"optional":true},"target":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["file_step","encoded_step"]},"encoded_step":{"nesting_mode":3,"block":{"attributes":{"context_access_token":{"type":"string","optional":true},"context_path":{"type":"string","optional":true},"secret_values":{"type":["map","string"],"optional":true},"task_content":{"type":"string","required":true},"value_content":{"type":"string","optional":true},"values":{"type":["map","string"],"optional":true}}},"optional":true,"conflicts_with":["docker_step","file_step"]},"file_step":{"nesting_mode":3,"block":{"attributes":{"context_access_token":{"type":"string","optional":true},"context_path":{"type":"string","optional":true},"secret_values":{"type":["map","string"],"optional":true},"task_file_path":{"type":"string","required":true},"value_file_path":{"type":"string","optional":true},"values":{"type":["map","string"],"optional":true}}},"optional":true,"conflicts_with":["docker_step","encoded_step"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"platform":{"nesting_mode":3,"block":{"attributes":{"architecture":{"type":"string","optional":true},"os":{"type":"string","required":true},"variant":{"type":"string","optional":true}}},"optional":true},"registry_credential":{"nesting_mode":3,"block":{"block_types":{"custom":{"nesting_mode":4,"block":{"attributes":{"identity":{"type":"string","optional":true},"login_server":{"type":"string","required":true},"password":{"type":"string","optional":true},"username":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["registry_credential.0.source","registry_credential.0.custom"]},"source":{"nesting_mode":3,"block":{"attributes":{"login_mode":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["registry_credential.0.source","registry_credential.0.custom"]}}},"optional":true},"source_trigger":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"events":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"repository_url":{"type":"string","required":true},"source_type":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"expire_in_seconds":{"type":"number","optional":true},"refresh_token":{"type":"string","optional":true},"scope":{"type":"string","optional":true},"token":{"type":"string","required":true},"token_type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"timer_trigger":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"schedule":{"type":"string","required":true}}},"optional":true}}}},"azurerm_container_registry_task_schedule_run_now":{"block":{"attributes":{"container_registry_task_id":{"type":"string","required":true}}}},"azurerm_container_registry_token":{"block":{"attributes":{"container_registry_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_map_id":{"type":"string","required":true}}}},"azurerm_container_registry_token_password":{"block":{"attributes":{"container_registry_token_id":{"type":"string","required":true}},"block_types":{"password1":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"value":{"type":"string","computed":true}}},"required":true},"password2":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"value":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_container_registry_webhook":{"block":{"attributes":{"actions":{"type":["set","string"],"required":true},"custom_headers":{"type":["map","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"registry_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":""},"service_uri":{"type":"string","required":true},"status":{"type":"string","optional":true,"default":"enabled"},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_cosmosdb_account":{"block":{"attributes":{"access_key_metadata_writes_enabled":{"type":"bool","optional":true,"default":true},"analytical_storage_enabled":{"type":"bool","optional":true,"default":false},"automatic_failover_enabled":{"type":"bool","optional":true,"default":false},"burst_capacity_enabled":{"type":"bool","optional":true,"default":false},"create_mode":{"type":"string","optional":true,"computed":true},"default_identity_type":{"type":"string","optional":true,"default":"FirstPartyIdentity"},"endpoint":{"type":"string","computed":true},"free_tier_enabled":{"type":"bool","optional":true,"default":false},"ip_range_filter":{"type":["set","string"],"optional":true},"is_virtual_network_filter_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true,"conflicts_with":["managed_hsm_key_id"]},"kind":{"type":"string","optional":true,"default":"GlobalDocumentDB"},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","optional":true,"conflicts_with":["key_vault_key_id"]},"minimal_tls_version":{"type":"string","optional":true,"default":"Tls12"},"mongo_server_version":{"type":"string","optional":true,"computed":true},"multiple_write_locations_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_acl_bypass_for_azure_services":{"type":"bool","optional":true,"default":false},"network_acl_bypass_ids":{"type":["list","string"],"optional":true},"offer_type":{"type":"string","required":true},"partition_merge_enabled":{"type":"bool","optional":true,"default":false},"primary_key":{"type":"string","computed":true},"primary_mongodb_connection_string":{"type":"string","computed":true},"primary_readonly_key":{"type":"string","computed":true},"primary_readonly_mongodb_connection_string":{"type":"string","computed":true},"primary_readonly_sql_connection_string":{"type":"string","computed":true},"primary_sql_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"read_endpoints":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"secondary_mongodb_connection_string":{"type":"string","computed":true},"secondary_readonly_key":{"type":"string","computed":true},"secondary_readonly_mongodb_connection_string":{"type":"string","computed":true},"secondary_readonly_sql_connection_string":{"type":"string","computed":true},"secondary_sql_connection_string":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"write_endpoints":{"type":["list","string"],"computed":true}},"block_types":{"analytical_storage":{"nesting_mode":3,"block":{"attributes":{"schema_type":{"type":"string","required":true}}},"optional":true,"computed":true},"backup":{"nesting_mode":3,"block":{"attributes":{"interval_in_minutes":{"type":"number","optional":true,"computed":true},"retention_in_hours":{"type":"number","optional":true,"computed":true},"storage_redundancy":{"type":"string","optional":true,"computed":true},"tier":{"type":"string","optional":true,"computed":true},"type":{"type":"string","required":true}}},"optional":true,"computed":true},"capabilities":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true}}},"optional":true,"computed":true},"capacity":{"nesting_mode":3,"block":{"attributes":{"total_throughput_limit":{"type":"number","required":true}}},"optional":true,"computed":true},"consistency_policy":{"nesting_mode":3,"block":{"attributes":{"consistency_level":{"type":"string","required":true},"max_interval_in_seconds":{"type":"number","optional":true,"default":5},"max_staleness_prefix":{"type":"number","optional":true,"default":100}}},"required":true},"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true},"geo_location":{"nesting_mode":4,"block":{"attributes":{"failover_priority":{"type":"number","required":true},"id":{"type":"string","computed":true},"location":{"type":"string","required":true},"zone_redundant":{"type":"bool","optional":true,"default":false}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"restore":{"nesting_mode":3,"block":{"attributes":{"restore_timestamp_in_utc":{"type":"string","required":true},"source_cosmosdb_account_id":{"type":"string","required":true},"tables_to_restore":{"type":["list","string"],"optional":true}},"block_types":{"database":{"nesting_mode":4,"block":{"attributes":{"collection_names":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true},"gremlin_database":{"nesting_mode":3,"block":{"attributes":{"graph_names":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"virtual_network_rule":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true},"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_cluster":{"block":{"attributes":{"authentication_method":{"type":"string","optional":true,"default":"Cassandra"},"client_certificate_pems":{"type":["list","string"],"optional":true},"default_admin_password":{"type":"string","required":true},"delegated_management_subnet_id":{"type":"string","required":true},"external_gossip_certificate_pems":{"type":["list","string"],"optional":true},"external_seed_node_ip_addresses":{"type":["list","string"],"optional":true},"hours_between_backups":{"type":"number","optional":true,"default":24},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"repair_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"3.11"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_datacenter":{"block":{"attributes":{"availability_zones_enabled":{"type":"bool","optional":true,"default":true},"backup_storage_customer_key_uri":{"type":"string","optional":true},"base64_encoded_yaml_fragment":{"type":"string","optional":true},"cassandra_cluster_id":{"type":"string","required":true},"delegated_management_subnet_id":{"type":"string","required":true},"disk_count":{"type":"number","optional":true},"disk_sku":{"type":"string","optional":true,"default":"P30"},"location":{"type":"string","required":true},"managed_disk_customer_key_uri":{"type":"string","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"default":3},"seed_node_ip_addresses":{"type":["list","string"],"computed":true},"sku_name":{"type":"string","optional":true,"default":"Standard_E16s_v5"}}}},"azurerm_cosmosdb_cassandra_keyspace":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_cassandra_table":{"block":{"attributes":{"analytical_storage_ttl":{"type":"number","optional":true},"cassandra_keyspace_id":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"schema":{"nesting_mode":3,"block":{"block_types":{"cluster_key":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"order_by":{"type":"string","required":true}}},"optional":true},"column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"partition_key":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_cosmosdb_gremlin_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_gremlin_graph":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"partition_key_path":{"type":"string","required":true},"partition_key_version":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"conflict_resolution_policy":{"nesting_mode":3,"block":{"attributes":{"conflict_resolution_path":{"type":"string","optional":true},"conflict_resolution_procedure":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"optional":true,"computed":true},"index_policy":{"nesting_mode":3,"block":{"attributes":{"automatic":{"type":"bool","optional":true,"default":true},"excluded_paths":{"type":["set","string"],"optional":true,"computed":true},"included_paths":{"type":["set","string"],"optional":true,"computed":true},"indexing_mode":{"type":"string","required":true}},"block_types":{"composite_index":{"nesting_mode":3,"block":{"block_types":{"index":{"nesting_mode":3,"block":{"attributes":{"order":{"type":"string","required":true},"path":{"type":"string","required":true}}},"required":true}}},"optional":true},"spatial_index":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true},"types":{"type":["set","string"],"computed":true}}},"optional":true}}},"optional":true,"computed":true},"unique_key":{"nesting_mode":4,"block":{"attributes":{"paths":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_cosmosdb_mongo_collection":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shard_key":{"type":"string","optional":true},"system_indexes":{"type":["list",["object",{"keys":["list","string"],"unique":"bool"}]],"computed":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"index":{"nesting_mode":4,"block":{"attributes":{"keys":{"type":["list","string"],"required":true},"unique":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_cosmosdb_mongo_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_mongo_role_definition":{"block":{"attributes":{"cosmos_mongo_database_id":{"type":"string","required":true},"inherited_role_names":{"type":["list","string"],"optional":true},"role_name":{"type":"string","required":true}},"block_types":{"privilege":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"required":true}},"block_types":{"resource":{"nesting_mode":3,"block":{"attributes":{"collection_name":{"type":"string","optional":true},"db_name":{"type":"string","optional":true}}},"required":true}}},"optional":true}}}},"azurerm_cosmosdb_mongo_user_definition":{"block":{"attributes":{"cosmos_mongo_database_id":{"type":"string","required":true},"inherited_role_names":{"type":["list","string"],"optional":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_cluster":{"block":{"attributes":{"administrator_login_password":{"type":"string","optional":true},"citus_version":{"type":"string","optional":true,"computed":true},"coordinator_public_ip_access_enabled":{"type":"bool","optional":true,"default":true},"coordinator_server_edition":{"type":"string","optional":true,"default":"GeneralPurpose"},"coordinator_storage_quota_in_mb":{"type":"number","optional":true},"coordinator_vcore_count":{"type":"number","optional":true},"earliest_restore_time":{"type":"string","computed":true},"ha_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"node_count":{"type":"number","required":true},"node_public_ip_access_enabled":{"type":"bool","optional":true,"default":false},"node_server_edition":{"type":"string","optional":true,"default":"MemoryOptimized"},"node_storage_quota_in_mb":{"type":"number","optional":true,"computed":true},"node_vcores":{"type":"number","optional":true,"computed":true},"point_in_time_in_utc":{"type":"string","optional":true,"required_with":["source_location","source_resource_id"]},"preferred_primary_zone":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"servers":{"type":["list",["object",{"fqdn":"string","name":"string"}]],"computed":true},"shards_on_coordinator_enabled":{"type":"bool","optional":true,"computed":true},"source_location":{"type":"string","optional":true,"required_with":["source_resource_id"]},"source_resource_id":{"type":"string","optional":true,"required_with":["source_location"]},"sql_version":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true}}}},"azurerm_cosmosdb_postgresql_coordinator_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_firewall_rule":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_node_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_cosmosdb_postgresql_role":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_container":{"block":{"attributes":{"account_name":{"type":"string","required":true},"analytical_storage_ttl":{"type":"number","optional":true},"database_name":{"type":"string","required":true},"default_ttl":{"type":"number","optional":true},"name":{"type":"string","required":true},"partition_key_kind":{"type":"string","optional":true,"default":"Hash"},"partition_key_paths":{"type":["list","string"],"required":true},"partition_key_version":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true},"conflict_resolution_policy":{"nesting_mode":3,"block":{"attributes":{"conflict_resolution_path":{"type":"string","optional":true},"conflict_resolution_procedure":{"type":"string","optional":true},"mode":{"type":"string","required":true}}},"optional":true,"computed":true},"indexing_policy":{"nesting_mode":3,"block":{"attributes":{"indexing_mode":{"type":"string","optional":true,"default":"consistent"}},"block_types":{"composite_index":{"nesting_mode":3,"block":{"block_types":{"index":{"nesting_mode":3,"block":{"attributes":{"order":{"type":"string","required":true},"path":{"type":"string","required":true}}},"required":true}}},"optional":true},"excluded_path":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true}}},"optional":true},"included_path":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true}}},"optional":true},"spatial_index":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","required":true},"types":{"type":["set","string"],"computed":true}}},"optional":true}}},"optional":true,"computed":true},"unique_key":{"nesting_mode":4,"block":{"attributes":{"paths":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_cosmosdb_sql_database":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cosmosdb_sql_dedicated_gateway":{"block":{"attributes":{"cosmosdb_account_id":{"type":"string","required":true},"instance_count":{"type":"number","required":true},"instance_size":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_function":{"block":{"attributes":{"body":{"type":"string","required":true},"container_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_role_assignment":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_role_definition":{"block":{"attributes":{"account_name":{"type":"string","required":true},"assignable_scopes":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role_definition_id":{"type":"string","optional":true,"computed":true},"type":{"type":"string","optional":true,"default":"CustomRole"}},"block_types":{"permissions":{"nesting_mode":4,"block":{"attributes":{"data_actions":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_cosmosdb_sql_stored_procedure":{"block":{"attributes":{"account_name":{"type":"string","required":true},"body":{"type":"string","required":true},"container_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_cosmosdb_sql_trigger":{"block":{"attributes":{"body":{"type":"string","required":true},"container_id":{"type":"string","required":true},"name":{"type":"string","required":true},"operation":{"type":"string","required":true},"type":{"type":"string","required":true}}}},"azurerm_cosmosdb_table":{"block":{"attributes":{"account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"throughput":{"type":"number","optional":true,"computed":true}},"block_types":{"autoscale_settings":{"nesting_mode":3,"block":{"attributes":{"max_throughput":{"type":"number","optional":true,"computed":true,"conflicts_with":["throughput"]}}},"optional":true}}}},"azurerm_cost_anomaly_alert":{"block":{"attributes":{"display_name":{"type":"string","required":true},"email_addresses":{"type":["set","string"],"required":true},"email_subject":{"type":"string","required":true},"message":{"type":"string","optional":true},"name":{"type":"string","required":true},"notification_email":{"type":"string","optional":true,"computed":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_cost_management_scheduled_action":{"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"days_of_week":{"type":["list","string"],"optional":true},"display_name":{"type":"string","required":true},"email_address_sender":{"type":"string","required":true},"email_addresses":{"type":["list","string"],"required":true},"email_subject":{"type":"string","required":true},"end_date":{"type":"string","required":true},"frequency":{"type":"string","required":true},"hour_of_day":{"type":"number","optional":true},"message":{"type":"string","optional":true},"name":{"type":"string","required":true},"start_date":{"type":"string","required":true},"view_id":{"type":"string","required":true},"weeks_of_month":{"type":["list","string"],"optional":true}}}},"azurerm_custom_ip_prefix":{"block":{"attributes":{"cidr":{"type":"string","required":true},"commissioning_enabled":{"type":"bool","optional":true,"default":false},"internet_advertising_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"parent_custom_ip_prefix_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"roa_validity_end_date":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"wan_validation_signed_message":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_custom_provider":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["resource_type","action"]},"resource_type":{"nesting_mode":4,"block":{"attributes":{"endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"routing_type":{"type":"string","optional":true,"default":"Proxy"}}},"optional":true,"at_least_one_of":["resource_type","action"]},"validation":{"nesting_mode":4,"block":{"attributes":{"specification":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dashboard_grafana":{"block":{"attributes":{"api_key_enabled":{"type":"bool","optional":true,"default":false},"auto_generated_domain_name_label_scope":{"type":"string","optional":true,"default":"TenantReuse"},"deterministic_outbound_ip_enabled":{"type":"bool","optional":true,"default":false},"endpoint":{"type":"string","computed":true},"grafana_major_version":{"type":"string","required":true},"grafana_version":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip":{"type":["list","string"],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true},"zone_redundancy_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"azure_monitor_workspace_integrations":{"nesting_mode":3,"block":{"attributes":{"resource_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"smtp":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"from_address":{"type":"string","required":true},"from_name":{"type":"string","optional":true,"default":"Azure Managed Grafana Notification"},"host":{"type":"string","required":true},"password":{"type":"string","required":true},"start_tls_policy":{"type":"string","required":true},"user":{"type":"string","required":true},"verification_skip_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_dashboard_grafana_managed_private_endpoint":{"block":{"attributes":{"grafana_id":{"type":"string","required":true},"group_ids":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_resource_id":{"type":"string","required":true},"private_link_resource_region":{"type":"string","optional":true},"request_message":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory":{"block":{"attributes":{"customer_managed_key_id":{"type":"string","optional":true},"customer_managed_key_identity_id":{"type":"string","optional":true,"required_with":["customer_managed_key_id"]},"location":{"type":"string","required":true},"managed_virtual_network_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"public_network_enabled":{"type":"bool","optional":true,"default":true},"purview_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"github_configuration":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"git_url":{"type":"string","optional":true},"publishing_enabled":{"type":"bool","optional":true,"default":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true}}},"optional":true,"conflicts_with":["vsts_configuration"]},"global_parameter":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"vsts_configuration":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"project_name":{"type":"string","required":true},"publishing_enabled":{"type":"bool","optional":true,"default":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["github_configuration"]}}}},"azurerm_data_factory_credential_service_principal":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"service_principal_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}},"block_types":{"service_principal_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_credential_user_managed_identity":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"identity_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_data_factory_custom_dataset":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema_json":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_data_flow":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"script":{"type":"string","optional":true,"at_least_one_of":["script","script_lines"]},"script_lines":{"type":["list","string"],"optional":true,"at_least_one_of":["script","script_lines"]}},"block_types":{"sink":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"required":true},"transformation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_azure_blob":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"path":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_azure_sql_table":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema":{"type":"string","optional":true},"table":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_binary":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["http_server_location","sftp_server_location"]},"compression":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location","sftp_server_location"]},"sftp_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location","http_server_location"]}}}},"azurerm_data_factory_dataset_cosmosdb_sqlapi":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"collection_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_delimited_text":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"column_delimiter":{"type":"string","optional":true,"default":","},"compression_codec":{"type":"string","optional":true},"compression_level":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encoding":{"type":"string","optional":true},"escape_character":{"type":"string","optional":true,"default":"\\"},"first_row_as_header":{"type":"bool","optional":true,"default":false},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"null_value":{"type":"string","optional":true,"default":""},"parameters":{"type":["map","string"],"optional":true},"quote_character":{"type":"string","optional":true,"default":"\""},"row_delimiter":{"type":"string","optional":true}},"block_types":{"azure_blob_fs_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_file_system_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"file_system":{"type":"string","optional":true},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["http_server_location","azure_blob_storage_location","azure_blob_fs_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_http":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"relative_url":{"type":"string","optional":true},"request_body":{"type":"string","optional":true},"request_method":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_json":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encoding":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true,"conflicts_with":["http_server_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","required":true},"relative_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_blob_storage_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_mysql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_parquet":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"compression_codec":{"type":"string","optional":true},"compression_level":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"azure_blob_fs_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_file_system_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"file_system":{"type":"string","optional":true},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"azure_blob_storage_location":{"nesting_mode":3,"block":{"attributes":{"container":{"type":"string","required":true},"dynamic_container_enabled":{"type":"bool","optional":true,"default":false},"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","optional":true},"path":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"http_server_location":{"nesting_mode":3,"block":{"attributes":{"dynamic_filename_enabled":{"type":"bool","optional":true,"default":false},"dynamic_path_enabled":{"type":"bool","optional":true,"default":false},"filename":{"type":"string","required":true},"path":{"type":"string","optional":true},"relative_url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["azure_blob_fs_location","azure_blob_storage_location","http_server_location"]},"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_postgresql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_snowflake":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"schema_name":{"type":"string","optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"precision":{"type":"number","optional":true},"scale":{"type":"number","optional":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_dataset_sql_server_table":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"table_name":{"type":"string","optional":true}},"block_types":{"schema_column":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_factory_flowlet_data_flow":{"block":{"attributes":{"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"name":{"type":"string","required":true},"script":{"type":"string","optional":true,"at_least_one_of":["script","script_lines"]},"script_lines":{"type":["list","string"],"optional":true,"at_least_one_of":["script","script_lines"]}},"block_types":{"sink":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"rejected_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"schema_linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true},"transformation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"flowlet":{"nesting_mode":3,"block":{"attributes":{"dataset_parameters":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"linked_service":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_integration_runtime_azure":{"block":{"attributes":{"cleanup_enabled":{"type":"bool","optional":true,"default":true},"compute_type":{"type":"string","optional":true,"default":"General"},"core_count":{"type":"number","optional":true,"default":8},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"time_to_live_min":{"type":"number","optional":true,"default":0},"virtual_network_enabled":{"type":"bool","optional":true}}}},"azurerm_data_factory_integration_runtime_azure_ssis":{"block":{"attributes":{"credential_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"edition":{"type":"string","optional":true,"default":"Standard"},"license_type":{"type":"string","optional":true,"default":"LicenseIncluded"},"location":{"type":"string","required":true},"max_parallel_executions_per_node":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"node_size":{"type":"string","required":true},"number_of_nodes":{"type":"number","optional":true,"default":1}},"block_types":{"catalog_info":{"nesting_mode":3,"block":{"attributes":{"administrator_login":{"type":"string","optional":true},"administrator_password":{"type":"string","optional":true},"dual_standby_pair_name":{"type":"string","optional":true},"elastic_pool_name":{"type":"string","optional":true,"conflicts_with":["catalog_info.0.pricing_tier"]},"pricing_tier":{"type":"string","optional":true,"conflicts_with":["catalog_info.0.elastic_pool_name"]},"server_endpoint":{"type":"string","required":true}}},"optional":true},"copy_compute_scale":{"nesting_mode":3,"block":{"attributes":{"data_integration_unit":{"type":"number","optional":true},"time_to_live":{"type":"number","optional":true}}},"optional":true},"custom_setup_script":{"nesting_mode":3,"block":{"attributes":{"blob_container_uri":{"type":"string","required":true},"sas_token":{"type":"string","required":true}}},"optional":true},"express_custom_setup":{"nesting_mode":3,"block":{"attributes":{"environment":{"type":["map","string"],"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]},"powershell_version":{"type":"string","optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]}},"block_types":{"command_key":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"target_name":{"type":"string","required":true},"user_name":{"type":"string","required":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}},"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]},"component":{"nesting_mode":3,"block":{"attributes":{"license":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"key_vault_license":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"secret_name":{"type":"string","required":true},"secret_version":{"type":"string","optional":true}}},"optional":true}}},"optional":true,"at_least_one_of":["express_custom_setup.0.environment","express_custom_setup.0.powershell_version","express_custom_setup.0.component","express_custom_setup.0.command_key"]}}},"optional":true},"express_vnet_integration":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true},"package_store":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"pipeline_external_compute_scale":{"nesting_mode":3,"block":{"attributes":{"number_of_external_nodes":{"type":"number","optional":true},"number_of_pipeline_nodes":{"type":"number","optional":true},"time_to_live":{"type":"number","optional":true}}},"optional":true},"proxy":{"nesting_mode":3,"block":{"attributes":{"path":{"type":"string","optional":true},"self_hosted_integration_runtime_name":{"type":"string","required":true},"staging_storage_linked_service_name":{"type":"string","required":true}}},"optional":true},"vnet_integration":{"nesting_mode":3,"block":{"attributes":{"public_ips":{"type":["list","string"],"optional":true},"subnet_id":{"type":"string","optional":true,"exactly_one_of":["vnet_integration.0.vnet_id","vnet_integration.0.subnet_id"]},"subnet_name":{"type":"string","optional":true,"required_with":["vnet_integration.0.vnet_id"]},"vnet_id":{"type":"string","optional":true,"exactly_one_of":["vnet_integration.0.vnet_id","vnet_integration.0.subnet_id"]}}},"optional":true}}}},"azurerm_data_factory_integration_runtime_self_hosted":{"block":{"attributes":{"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"primary_authorization_key":{"type":"string","computed":true},"secondary_authorization_key":{"type":"string","computed":true},"self_contained_interactive_authoring_enabled":{"type":"bool","optional":true}},"block_types":{"rbac_authorization":{"nesting_mode":4,"block":{"attributes":{"resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_custom_service":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"integration_runtime":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_blob_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"connection_string_insecure":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"sas_uri":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"service_endpoint":{"type":"string","optional":true,"exactly_one_of":["connection_string","connection_string_insecure","sas_uri","service_endpoint"]},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["use_managed_identity"]},"service_principal_key":{"type":"string","optional":true},"storage_kind":{"type":"string","optional":true},"tenant_id":{"type":"string","optional":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_id"]}},"block_types":{"key_vault_sas_token":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true},"service_principal_linked_key_vault_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_databricks":{"block":{"attributes":{"access_token":{"type":"string","optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"adb_domain":{"type":"string","required":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"existing_cluster_id":{"type":"string","optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]},"integration_runtime_name":{"type":"string","optional":true},"msi_work_space_resource_id":{"type":"string","optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"instance_pool":{"nesting_mode":3,"block":{"attributes":{"cluster_version":{"type":"string","required":true},"instance_pool_id":{"type":"string","required":true},"max_number_of_workers":{"type":"number","optional":true},"min_number_of_workers":{"type":"number","optional":true,"default":1}}},"optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["access_token","msi_work_space_resource_id","key_vault_password"]},"new_cluster_config":{"nesting_mode":3,"block":{"attributes":{"cluster_version":{"type":"string","required":true},"custom_tags":{"type":["map","string"],"optional":true},"driver_node_type":{"type":"string","optional":true},"init_scripts":{"type":["list","string"],"optional":true},"log_destination":{"type":"string","optional":true},"max_number_of_workers":{"type":"number","optional":true},"min_number_of_workers":{"type":"number","optional":true,"default":1},"node_type":{"type":"string","required":true},"spark_config":{"type":["map","string"],"optional":true},"spark_environment_variables":{"type":["map","string"],"optional":true}}},"optional":true,"exactly_one_of":["existing_cluster_id","new_cluster_config","instance_pool"]}}}},"azurerm_data_factory_linked_service_azure_file_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"file_share":{"type":"string","optional":true},"host":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","optional":true},"user_id":{"type":"string","optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_function":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"key":{"type":"string","optional":true,"exactly_one_of":["key","key_vault_key"]},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"url":{"type":"string","required":true}},"block_types":{"key_vault_key":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["key","key_vault_key"]}}}},"azurerm_data_factory_linked_service_azure_search":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"encrypted_credential":{"type":"string","computed":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"search_service_key":{"type":"string","required":true},"url":{"type":"string","required":true}}}},"azurerm_data_factory_linked_service_azure_sql_database":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"credential_name":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["use_managed_identity"],"required_with":["service_principal_key"]},"service_principal_key":{"type":"string","optional":true,"required_with":["service_principal_id"]},"tenant_id":{"type":"string","optional":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_id"]}},"block_types":{"key_vault_connection_string":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_azure_table_storage":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_cosmosdb":{"block":{"attributes":{"account_endpoint":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"account_key":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"conflicts_with":["account_endpoint","account_key"]},"data_factory_id":{"type":"string","required":true},"database":{"type":"string","optional":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_cosmosdb_mongoapi":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true},"data_factory_id":{"type":"string","required":true},"database":{"type":"string","optional":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"server_version_is_32_or_higher":{"type":"bool","optional":true,"default":false}}}},"azurerm_data_factory_linked_service_data_lake_storage_gen2":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_key","tenant"]},"service_principal_key":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_id","tenant"]},"storage_account_key":{"type":"string","optional":true,"conflicts_with":["service_principal_id","service_principal_key","use_managed_identity","tenant"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"]},"tenant":{"type":"string","optional":true,"conflicts_with":["storage_account_key","use_managed_identity"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"],"required_with":["service_principal_id","service_principal_key"]},"url":{"type":"string","required":true},"use_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["service_principal_key","service_principal_id","storage_account_key","tenant"],"at_least_one_of":["service_principal_key","service_principal_id","tenant","storage_account_key","use_managed_identity"]}}}},"azurerm_data_factory_linked_service_key_vault":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_kusto":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"kusto_database_name":{"type":"string","required":true},"kusto_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"service_principal_id":{"type":"string","optional":true,"exactly_one_of":["service_principal_id","use_managed_identity"],"required_with":["service_principal_key"]},"service_principal_key":{"type":"string","optional":true,"required_with":["service_principal_id"]},"tenant":{"type":"string","optional":true,"required_with":["service_principal_id"]},"use_managed_identity":{"type":"bool","optional":true,"default":false,"exactly_one_of":["service_principal_id","use_managed_identity"]}}}},"azurerm_data_factory_linked_service_mysql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_odata":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"url":{"type":"string","required":true}},"block_types":{"basic_authentication":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_odbc":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"basic_authentication":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_postgresql":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_linked_service_sftp":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"authentication_type":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"host":{"type":"string","required":true},"host_key_fingerprint":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","optional":true,"exactly_one_of":["password","key_vault_password","private_key_content_base64","key_vault_private_key_content_base64","private_key_path"]},"port":{"type":"number","required":true},"private_key_content_base64":{"type":"string","optional":true},"private_key_passphrase":{"type":"string","optional":true,"conflicts_with":["password","key_vault_password","key_vault_private_key_passphrase"]},"private_key_path":{"type":"string","optional":true},"skip_host_key_validation":{"type":"bool","optional":true},"username":{"type":"string","required":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true},"key_vault_private_key_content_base64":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true},"key_vault_private_key_passphrase":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["password","key_vault_password","private_key_passphrase"]}}}},"azurerm_data_factory_linked_service_snowflake":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_sql_server":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"user_name":{"type":"string","optional":true}},"block_types":{"key_vault_connection_string":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["connection_string","key_vault_connection_string"]},"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_synapse":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"connection_string":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}},"block_types":{"key_vault_password":{"nesting_mode":3,"block":{"attributes":{"linked_service_name":{"type":"string","required":true},"secret_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_factory_linked_service_web":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"authentication_type":{"type":"string","required":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"integration_runtime_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"password":{"type":"string","optional":true},"url":{"type":"string","required":true},"username":{"type":"string","optional":true}}}},"azurerm_data_factory_managed_private_endpoint":{"block":{"attributes":{"data_factory_id":{"type":"string","required":true},"fqdns":{"type":["list","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"subresource_name":{"type":"string","optional":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_data_factory_pipeline":{"block":{"attributes":{"activities_json":{"type":"string","optional":true},"annotations":{"type":["list","string"],"optional":true},"concurrency":{"type":"number","optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"folder":{"type":"string","optional":true},"moniter_metrics_after_duration":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"variables":{"type":["map","string"],"optional":true}}}},"azurerm_data_factory_trigger_blob_event":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"blob_path_begins_with":{"type":"string","optional":true,"at_least_one_of":["blob_path_begins_with","blob_path_ends_with"]},"blob_path_ends_with":{"type":"string","optional":true,"at_least_one_of":["blob_path_begins_with","blob_path_ends_with"]},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"events":{"type":["set","string"],"required":true},"ignore_empty_blobs":{"type":"bool","optional":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"pipeline":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_trigger_custom_event":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"eventgrid_topic_id":{"type":"string","required":true},"events":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"subject_begins_with":{"type":"string","optional":true},"subject_ends_with":{"type":"string","optional":true}},"block_types":{"pipeline":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true}}}},"azurerm_data_factory_trigger_schedule":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"frequency":{"type":"string","optional":true,"default":"Minute"},"interval":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"pipeline_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["pipeline","pipeline_name"]},"pipeline_parameters":{"type":["map","string"],"optional":true,"computed":true,"conflicts_with":["pipeline"]},"start_time":{"type":"string","optional":true,"computed":true},"time_zone":{"type":"string","optional":true}},"block_types":{"pipeline":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["pipeline_parameters"],"exactly_one_of":["pipeline","pipeline_name"]},"schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"optional":true},"days_of_week":{"type":["list","string"],"optional":true},"hours":{"type":["list","number"],"optional":true},"minutes":{"type":["list","number"],"optional":true}},"block_types":{"monthly":{"nesting_mode":3,"block":{"attributes":{"week":{"type":"number","optional":true},"weekday":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_data_factory_trigger_tumbling_window":{"block":{"attributes":{"activated":{"type":"bool","optional":true,"default":true},"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"data_factory_id":{"type":"string","required":true},"delay":{"type":"string","optional":true},"description":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"max_concurrency":{"type":"number","optional":true,"default":50},"name":{"type":"string","required":true},"start_time":{"type":"string","required":true}},"block_types":{"pipeline":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"required":true},"retry":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"number","optional":true,"default":30}}},"optional":true},"trigger_dependency":{"nesting_mode":4,"block":{"attributes":{"offset":{"type":"string","optional":true},"size":{"type":"string","optional":true},"trigger_name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_data_protection_backup_instance_blob_storage":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_container_names":{"type":["list","string"],"optional":true},"storage_account_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_disk":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"disk_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"snapshot_resource_group_name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_kubernetes_cluster":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"kubernetes_cluster_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"snapshot_resource_group_name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}},"block_types":{"backup_datasource_parameters":{"nesting_mode":3,"block":{"attributes":{"cluster_scoped_resources_enabled":{"type":"bool","optional":true,"default":false},"excluded_namespaces":{"type":["list","string"],"optional":true},"excluded_resource_types":{"type":["list","string"],"optional":true},"included_namespaces":{"type":["list","string"],"optional":true},"included_resource_types":{"type":["list","string"],"optional":true},"label_selectors":{"type":["list","string"],"optional":true},"volume_snapshot_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_data_protection_backup_instance_mysql_flexible_server":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_postgresql":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"database_credential_key_vault_secret_id":{"type":"string","optional":true},"database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_instance_postgresql_flexible_server":{"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_data_protection_backup_policy_blob_storage":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"operational_default_retention_duration":{"type":"string","optional":true,"at_least_one_of":["operational_default_retention_duration","vault_default_retention_duration"]},"time_zone":{"type":"string","optional":true},"vault_default_retention_duration":{"type":"string","optional":true,"at_least_one_of":["operational_default_retention_duration","vault_default_retention_duration"],"required_with":["backup_repeating_time_intervals"]},"vault_id":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_month":{"type":["set","number"],"optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true,"required_with":["vault_default_retention_duration"]}}}},"azurerm_data_protection_backup_policy_disk":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"default_retention_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_kubernetes_cluster":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_name":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_mysql_flexible_server":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_postgresql":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"default_retention_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_name":{"type":"string","required":true}},"block_types":{"retention_rule":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_policy_postgresql_flexible_server":{"block":{"attributes":{"backup_repeating_time_intervals":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"time_zone":{"type":"string","optional":true},"vault_id":{"type":"string","required":true}},"block_types":{"default_retention_rule":{"nesting_mode":3,"block":{"block_types":{"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"required":true},"retention_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"absolute_criteria":{"type":"string","optional":true},"days_of_week":{"type":["set","string"],"optional":true},"months_of_year":{"type":["set","string"],"optional":true},"scheduled_backup_times":{"type":["set","string"],"optional":true},"weeks_of_month":{"type":["set","string"],"optional":true}}},"required":true},"life_cycle":{"nesting_mode":3,"block":{"attributes":{"data_store_type":{"type":"string","required":true},"duration":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_data_protection_backup_vault":{"block":{"attributes":{"cross_region_restore_enabled":{"type":"bool","optional":true},"datastore_type":{"type":"string","required":true},"immutability":{"type":"string","optional":true,"default":"Disabled"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"redundancy":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_duration_in_days":{"type":"number","optional":true,"default":14},"soft_delete":{"type":"string","optional":true,"default":"On"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_protection_backup_vault_customer_managed_key":{"block":{"attributes":{"data_protection_backup_vault_id":{"type":"string","required":true},"key_vault_key_id":{"type":"string","required":true}}}},"azurerm_data_protection_resource_guard":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vault_critical_operation_exclusion_list":{"type":["list","string"],"optional":true}}}},"azurerm_data_share":{"block":{"attributes":{"account_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"kind":{"type":"string","required":true},"name":{"type":"string","required":true},"terms":{"type":"string","optional":true}},"block_types":{"snapshot_schedule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"recurrence":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true}}}},"azurerm_data_share_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_data_share_dataset_blob_storage":{"block":{"attributes":{"container_name":{"type":"string","required":true},"data_share_id":{"type":"string","required":true},"display_name":{"type":"string","computed":true},"file_path":{"type":"string","optional":true,"conflicts_with":["folder_path"]},"folder_path":{"type":"string","optional":true,"conflicts_with":["file_path"]},"name":{"type":"string","required":true}},"block_types":{"storage_account":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_data_share_dataset_data_lake_gen2":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"file_path":{"type":"string","optional":true,"conflicts_with":["folder_path"]},"file_system_name":{"type":"string","required":true},"folder_path":{"type":"string","optional":true,"conflicts_with":["file_path"]},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_data_share_dataset_kusto_cluster":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"kusto_cluster_id":{"type":"string","required":true},"kusto_cluster_location":{"type":"string","computed":true},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true}}}},"azurerm_data_share_dataset_kusto_database":{"block":{"attributes":{"display_name":{"type":"string","computed":true},"kusto_cluster_location":{"type":"string","computed":true},"kusto_database_id":{"type":"string","required":true},"name":{"type":"string","required":true},"share_id":{"type":"string","required":true}}}},"azurerm_database_migration_project":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"source_platform":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_platform":{"type":"string","required":true}}}},"azurerm_database_migration_service":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_databox_edge_device":{"block":{"attributes":{"device_properties":{"type":["list",["object",{"capacity":"number","configured_role_types":["list","string"],"culture":"string","hcs_version":"string","model":"string","node_count":"number","serial_number":"string","software_version":"string","status":"string","time_zone":"string","type":"string"}]],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_databricks_access_connector":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_databricks_virtual_network_peering":{"block":{"attributes":{"address_space_prefixes":{"type":["list","string"],"computed":true},"allow_forwarded_traffic":{"type":"bool","optional":true,"default":false},"allow_gateway_transit":{"type":"bool","optional":true,"default":false},"allow_virtual_network_access":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"remote_address_space_prefixes":{"type":["list","string"],"required":true},"remote_virtual_network_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"use_remote_gateways":{"type":"bool","optional":true,"default":false},"virtual_network_id":{"type":"string","computed":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_databricks_workspace":{"block":{"attributes":{"access_connector_id":{"type":"string","optional":true,"required_with":["default_storage_firewall_enabled"]},"customer_managed_key_enabled":{"type":"bool","optional":true,"default":false},"default_storage_firewall_enabled":{"type":"bool","optional":true,"required_with":["access_connector_id"]},"disk_encryption_set_id":{"type":"string","computed":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"load_balancer_backend_address_pool_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"managed_disk_cmk_key_vault_id":{"type":"string","optional":true},"managed_disk_cmk_key_vault_key_id":{"type":"string","optional":true},"managed_disk_cmk_rotation_to_latest_version_enabled":{"type":"bool","optional":true,"required_with":["managed_disk_cmk_key_vault_key_id"]},"managed_disk_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"managed_resource_group_id":{"type":"string","computed":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_services_cmk_key_vault_id":{"type":"string","optional":true},"managed_services_cmk_key_vault_key_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_security_group_rules_required":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"storage_account_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true},"workspace_url":{"type":"string","computed":true}},"block_types":{"custom_parameters":{"nesting_mode":3,"block":{"attributes":{"machine_learning_workspace_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"nat_gateway_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"no_public_ip":{"type":"bool","optional":true,"default":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"private_subnet_name":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"private_subnet_network_security_group_association_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_ip_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_subnet_name":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"public_subnet_network_security_group_association_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"storage_account_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"storage_account_sku_name":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"virtual_network_id":{"type":"string","optional":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]},"vnet_address_prefix":{"type":"string","optional":true,"computed":true,"at_least_one_of":["custom_parameters.0.machine_learning_workspace_id","custom_parameters.0.no_public_ip","custom_parameters.0.public_subnet_name","custom_parameters.0.private_subnet_name","custom_parameters.0.virtual_network_id","custom_parameters.0.public_subnet_network_security_group_association_id","custom_parameters.0.private_subnet_network_security_group_association_id","custom_parameters.0.nat_gateway_name","custom_parameters.0.public_ip_name","custom_parameters.0.storage_account_name","custom_parameters.0.storage_account_sku_name","custom_parameters.0.vnet_address_prefix"]}}},"optional":true,"computed":true},"enhanced_security_compliance":{"nesting_mode":3,"block":{"attributes":{"automatic_cluster_update_enabled":{"type":"bool","optional":true,"default":false},"compliance_security_profile_enabled":{"type":"bool","optional":true,"default":false},"compliance_security_profile_standards":{"type":["set","string"],"optional":true},"enhanced_security_monitoring_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_databricks_workspace_customer_managed_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_databricks_workspace_root_dbfs_customer_managed_key":{"block":{"attributes":{"key_vault_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_datadog_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_subscription_status":{"type":"string","computed":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"datadog_organization":{"nesting_mode":3,"block":{"attributes":{"api_key":{"type":"string","required":true},"application_key":{"type":"string","required":true},"enterprise_app_id":{"type":"string","optional":true},"id":{"type":"string","computed":true},"linking_auth_code":{"type":"string","optional":true},"linking_client_id":{"type":"string","optional":true},"name":{"type":"string","computed":true},"redirect_uri":{"type":"string","optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"user":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","optional":true}}},"required":true}}}},"azurerm_datadog_monitor_sso_configuration":{"block":{"attributes":{"datadog_monitor_id":{"type":"string","required":true},"enterprise_application_id":{"type":"string","required":true},"login_url":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"default"},"single_sign_on":{"type":"string","optional":true,"computed":true},"single_sign_on_enabled":{"type":"string","optional":true,"computed":true,"exactly_one_of":["single_sign_on","single_sign_on_enabled"]}}}},"azurerm_datadog_monitor_tag_rule":{"block":{"attributes":{"datadog_monitor_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"default":"default"}},"block_types":{"log":{"nesting_mode":3,"block":{"attributes":{"aad_log_enabled":{"type":"bool","optional":true},"resource_log_enabled":{"type":"bool","optional":true},"subscription_log_enabled":{"type":"bool","optional":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"metric":{"nesting_mode":3,"block":{"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_dedicated_hardware_security_module":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"stamp_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"management_network_profile":{"nesting_mode":3,"block":{"attributes":{"network_interface_private_ip_addresses":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"network_interface_private_ip_addresses":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_dedicated_host":{"block":{"attributes":{"auto_replace_on_failure":{"type":"bool","optional":true,"default":true},"dedicated_host_group_id":{"type":"string","required":true},"license_type":{"type":"string","optional":true,"default":"None"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"platform_fault_domain":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dedicated_host_group":{"block":{"attributes":{"automatic_placement_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true}}}},"azurerm_dev_center":{"block":{"attributes":{"dev_center_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_attached_network":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_connection_id":{"type":"string","required":true}}}},"azurerm_dev_center_catalog":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"catalog_adogit":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","required":true},"key_vault_key_url":{"type":"string","required":true},"path":{"type":"string","required":true},"uri":{"type":"string","required":true}}},"optional":true},"catalog_github":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","required":true},"key_vault_key_url":{"type":"string","required":true},"path":{"type":"string","required":true},"uri":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_dev_box_definition":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"image_reference_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_environment_type":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_gallery":{"block":{"attributes":{"dev_center_id":{"type":"string","required":true},"name":{"type":"string","required":true},"shared_gallery_id":{"type":"string","required":true}}}},"azurerm_dev_center_network_connection":{"block":{"attributes":{"domain_join_type":{"type":"string","required":true},"domain_name":{"type":"string","optional":true},"domain_password":{"type":"string","optional":true},"domain_username":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"organization_unit":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_center_project":{"block":{"attributes":{"description":{"type":"string","optional":true},"dev_center_id":{"type":"string","required":true},"dev_center_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"maximum_dev_boxes_per_user":{"type":"number","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_project_environment_type":{"block":{"attributes":{"creator_role_assignment_roles":{"type":["set","string"],"optional":true},"deployment_target_id":{"type":"string","required":true},"dev_center_project_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"user_role_assignment":{"nesting_mode":4,"block":{"attributes":{"roles":{"type":["set","string"],"required":true},"user_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_center_project_pool":{"block":{"attributes":{"dev_box_definition_name":{"type":"string","required":true},"dev_center_attached_network_name":{"type":"string","required":true},"dev_center_project_id":{"type":"string","required":true},"local_administrator_enabled":{"type":"bool","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"stop_on_disconnect_grace_period_minutes":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_dev_test_global_vm_shutdown_schedule":{"block":{"attributes":{"daily_recurrence_time":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"notification_settings":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"time_in_minutes":{"type":"number","optional":true,"default":30},"webhook_url":{"type":"string","optional":true}}},"required":true}}}},"azurerm_dev_test_lab":{"block":{"attributes":{"artifacts_storage_account_id":{"type":"string","computed":true},"default_premium_storage_account_id":{"type":"string","computed":true},"default_storage_account_id":{"type":"string","computed":true},"key_vault_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"premium_data_disk_storage_account_id":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true}}}},"azurerm_dev_test_linux_virtual_machine":{"block":{"attributes":{"allow_claim":{"type":"bool","optional":true,"default":true},"disallow_public_ip_address":{"type":"bool","optional":true},"fqdn":{"type":"string","computed":true},"lab_name":{"type":"string","required":true},"lab_subnet_name":{"type":"string","required":true},"lab_virtual_network_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"string","required":true},"ssh_key":{"type":"string","optional":true},"storage_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true},"username":{"type":"string","required":true}},"block_types":{"gallery_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"inbound_nat_rule":{"nesting_mode":4,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","computed":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_dev_test_policy":{"block":{"attributes":{"description":{"type":"string","optional":true},"evaluator_type":{"type":"string","required":true},"fact_data":{"type":"string","optional":true},"lab_name":{"type":"string","required":true},"name":{"type":"string","required":true},"policy_set_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"threshold":{"type":"string","required":true}}}},"azurerm_dev_test_schedule":{"block":{"attributes":{"lab_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"status":{"type":"string","optional":true,"default":"Disabled"},"tags":{"type":["map","string"],"optional":true},"task_type":{"type":"string","required":true},"time_zone_id":{"type":"string","required":true}},"block_types":{"daily_recurrence":{"nesting_mode":3,"block":{"attributes":{"time":{"type":"string","required":true}}},"optional":true},"hourly_recurrence":{"nesting_mode":3,"block":{"attributes":{"minute":{"type":"number","required":true}}},"optional":true},"notification_settings":{"nesting_mode":3,"block":{"attributes":{"status":{"type":"string","optional":true,"default":"Disabled"},"time_in_minutes":{"type":"number","optional":true},"webhook_url":{"type":"string","optional":true}}},"required":true},"weekly_recurrence":{"nesting_mode":3,"block":{"attributes":{"time":{"type":"string","required":true},"week_days":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_dev_test_virtual_network":{"block":{"attributes":{"description":{"type":"string","optional":true},"lab_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true}},"block_types":{"subnet":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","computed":true},"use_in_virtual_machine_creation":{"type":"string","optional":true,"default":"Allow"},"use_public_ip_address":{"type":"string","optional":true,"default":"Allow"}},"block_types":{"shared_public_ip_address":{"nesting_mode":3,"block":{"block_types":{"allowed_ports":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","optional":true},"transport_protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_dev_test_windows_virtual_machine":{"block":{"attributes":{"allow_claim":{"type":"bool","optional":true,"default":true},"disallow_public_ip_address":{"type":"bool","optional":true},"fqdn":{"type":"string","computed":true},"lab_name":{"type":"string","required":true},"lab_subnet_name":{"type":"string","required":true},"lab_virtual_network_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"string","required":true},"storage_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_identifier":{"type":"string","computed":true},"username":{"type":"string","required":true}},"block_types":{"gallery_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"inbound_nat_rule":{"nesting_mode":4,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","computed":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_digital_twins_endpoint_eventgrid":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"eventgrid_topic_endpoint":{"type":"string","required":true},"eventgrid_topic_primary_access_key":{"type":"string","required":true},"eventgrid_topic_secondary_access_key":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_digital_twins_endpoint_eventhub":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"eventhub_primary_connection_string":{"type":"string","required":true},"eventhub_secondary_connection_string":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_digital_twins_endpoint_servicebus":{"block":{"attributes":{"dead_letter_storage_secret":{"type":"string","optional":true},"digital_twins_id":{"type":"string","required":true},"name":{"type":"string","required":true},"servicebus_primary_connection_string":{"type":"string","required":true},"servicebus_secondary_connection_string":{"type":"string","required":true}}}},"azurerm_digital_twins_instance":{"block":{"attributes":{"host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_digital_twins_time_series_database_connection":{"block":{"attributes":{"digital_twins_id":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","optional":true,"default":"$Default"},"eventhub_name":{"type":"string","required":true},"eventhub_namespace_endpoint_uri":{"type":"string","required":true},"eventhub_namespace_id":{"type":"string","required":true},"kusto_cluster_id":{"type":"string","required":true},"kusto_cluster_uri":{"type":"string","required":true},"kusto_database_name":{"type":"string","required":true},"kusto_table_name":{"type":"string","optional":true,"default":"AdtPropertyEvents"},"name":{"type":"string","required":true}}}},"azurerm_disk_access":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_disk_encryption_set":{"block":{"attributes":{"auto_key_rotation_enabled":{"type":"bool","optional":true,"default":false},"encryption_type":{"type":"string","optional":true,"default":"EncryptionAtRestWithCustomerKey"},"federated_client_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_key_id"]},"key_vault_key_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_key_id"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_a_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"optional":true,"conflicts_with":["target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"conflicts_with":["records"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_aaaa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"optional":true,"conflicts_with":["target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"conflicts_with":["records"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_caa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"flags":{"type":"number","required":true},"tag":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_cname_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"record":{"type":"string","optional":true,"exactly_one_of":["record","target_resource_id"]},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"exactly_one_of":["record","target_resource_id"]},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_mx_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"@"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"exchange":{"type":"string","required":true},"preference":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_ns_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_ptr_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_dns_srv_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","required":true},"priority":{"type":"number","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","required":true}}},"required":true}}}},"azurerm_dns_txt_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_dns_zone":{"block":{"attributes":{"max_number_of_record_sets":{"type":"number","computed":true},"name":{"type":"string","required":true},"name_servers":{"type":["set","string"],"computed":true},"number_of_record_sets":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"soa_record":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"expire_time":{"type":"number","optional":true,"default":2419200},"fqdn":{"type":"string","computed":true},"host_name":{"type":"string","computed":true},"minimum_ttl":{"type":"number","optional":true,"default":300},"refresh_time":{"type":"number","optional":true,"default":3600},"retry_time":{"type":"number","optional":true,"default":300},"serial_number":{"type":"number","optional":true,"default":1},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","optional":true,"default":3600}}},"optional":true,"computed":true}}}},"azurerm_dynatrace_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_subscription":{"type":"string","required":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"billing_cycle":{"type":"string","optional":true},"effective_date":{"type":"string","computed":true},"plan":{"type":"string","required":true},"usage_type":{"type":"string","optional":true}}},"required":true},"user":{"nesting_mode":3,"block":{"attributes":{"country":{"type":"string","required":true},"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"required":true}}}},"azurerm_dynatrace_tag_rules":{"block":{"attributes":{"monitor_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"log_rule":{"nesting_mode":3,"block":{"attributes":{"send_activity_logs_enabled":{"type":"bool","optional":true,"default":false},"send_azure_active_directory_logs_enabled":{"type":"bool","optional":true,"default":false},"send_subscription_logs_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"filtering_tag":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true},"metric_rule":{"nesting_mode":3,"block":{"block_types":{"filtering_tag":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_elastic_cloud_elasticsearch":{"block":{"attributes":{"elastic_cloud_deployment_id":{"type":"string","computed":true},"elastic_cloud_email_address":{"type":"string","required":true},"elastic_cloud_sso_default_url":{"type":"string","computed":true},"elastic_cloud_user_id":{"type":"string","computed":true},"elasticsearch_service_url":{"type":"string","computed":true},"kibana_service_url":{"type":"string","computed":true},"kibana_sso_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"monitoring_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"logs":{"nesting_mode":3,"block":{"attributes":{"send_activity_logs":{"type":"bool","optional":true,"default":false},"send_azuread_logs":{"type":"bool","optional":true,"default":false},"send_subscription_logs":{"type":"bool","optional":true,"default":false}},"block_types":{"filtering_tag":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_elastic_san":{"block":{"attributes":{"base_size_in_tib":{"type":"number","required":true},"extended_size_in_tib":{"type":"number","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"total_iops":{"type":"number","computed":true},"total_mbps":{"type":"number","computed":true},"total_size_in_tib":{"type":"number","computed":true},"total_volume_size_in_gib":{"type":"number","computed":true},"volume_group_count":{"type":"number","computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"tier":{"type":"string","optional":true,"default":"Premium"}}},"required":true}}}},"azurerm_elastic_san_volume":{"block":{"attributes":{"name":{"type":"string","required":true},"size_in_gib":{"type":"number","required":true},"target_iqn":{"type":"string","computed":true},"target_portal_hostname":{"type":"string","computed":true},"target_portal_port":{"type":"number","computed":true},"volume_group_id":{"type":"string","required":true},"volume_id":{"type":"string","computed":true}},"block_types":{"create_source":{"nesting_mode":3,"block":{"attributes":{"source_id":{"type":"string","required":true},"source_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_elastic_san_volume_group":{"block":{"attributes":{"elastic_san_id":{"type":"string","required":true},"encryption_type":{"type":"string","optional":true,"default":"EncryptionAtRestWithPlatformKey"},"name":{"type":"string","required":true},"protocol_type":{"type":"string","optional":true,"default":"Iscsi"}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"current_versioned_key_expiration_timestamp":{"type":"string","computed":true},"current_versioned_key_id":{"type":"string","computed":true},"key_vault_key_id":{"type":"string","required":true},"last_key_rotation_timestamp":{"type":"string","computed":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_email_communication_service":{"block":{"attributes":{"data_location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_email_communication_service_domain":{"block":{"attributes":{"domain_management":{"type":"string","required":true},"email_service_id":{"type":"string","required":true},"from_sender_domain":{"type":"string","computed":true},"mail_from_sender_domain":{"type":"string","computed":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_engagement_tracking_enabled":{"type":"bool","optional":true},"verification_records":{"type":["list",["object",{"dkim":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"dkim2":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"dmarc":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"domain":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]],"spf":["list",["object",{"name":"string","ttl":"number","type":"string","value":"string"}]]}]],"computed":true}}}},"azurerm_eventgrid_domain":{"block":{"attributes":{"auto_create_topic_with_first_subscription":{"type":"bool","optional":true,"default":true},"auto_delete_topic_with_last_subscription":{"type":"bool","optional":true,"default":true},"endpoint":{"type":"string","computed":true},"inbound_ip_rule":{"type":["list",["object",{"action":"string","ip_mask":"string"}]],"optional":true},"input_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"input_mapping_default_values":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"subject":{"type":"string","optional":true}}},"optional":true},"input_mapping_fields":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_time":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"id":{"type":"string","optional":true},"subject":{"type":"string","optional":true},"topic":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_eventgrid_domain_topic":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_eventgrid_event_subscription":{"block":{"attributes":{"advanced_filtering_on_arrays_enabled":{"type":"bool","optional":true,"default":false},"event_delivery_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"eventhub_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"expiration_time_utc":{"type":"string","optional":true},"hybrid_connection_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"included_event_types":{"type":["list","string"],"optional":true,"computed":true},"labels":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true},"service_bus_queue_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"service_bus_topic_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","storage_queue_endpoint","webhook_endpoint"]}},"block_types":{"advanced_filter":{"nesting_mode":3,"block":{"block_types":{"bool_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"bool","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_not_null":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_null_or_undefined":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]}}},"optional":true},"azure_function_endpoint":{"nesting_mode":3,"block":{"attributes":{"function_id":{"type":"string","required":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true}}},"optional":true,"conflicts_with":["eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"dead_letter_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_property":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true},"source_field":{"type":"string","optional":true},"type":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"retry_policy":{"nesting_mode":3,"block":{"attributes":{"event_time_to_live":{"type":"number","required":true},"max_delivery_attempts":{"type":"number","required":true}}},"optional":true,"computed":true},"storage_blob_dead_letter_destination":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"storage_blob_container_name":{"type":"string","required":true}}},"optional":true},"storage_queue_endpoint":{"nesting_mode":3,"block":{"attributes":{"queue_message_time_to_live_in_seconds":{"type":"number","optional":true},"queue_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","webhook_endpoint"]},"subject_filter":{"nesting_mode":3,"block":{"attributes":{"case_sensitive":{"type":"bool","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_begins_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_ends_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]}}},"optional":true},"webhook_endpoint":{"nesting_mode":3,"block":{"attributes":{"active_directory_app_id_or_uri":{"type":"string","optional":true},"active_directory_tenant_id":{"type":"string","optional":true},"base_url":{"type":"string","computed":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true},"url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint"]}}}},"azurerm_eventgrid_namespace":{"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":1},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"inbound_ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_mask":{"type":"string","required":true}}},"optional":true},"topic_spaces_configuration":{"nesting_mode":3,"block":{"attributes":{"alternative_authentication_name_source":{"type":["list","string"],"optional":true},"maximum_client_sessions_per_authentication_name":{"type":"number","optional":true,"default":1},"maximum_session_expiry_in_hours":{"type":"number","optional":true,"default":1},"route_topic_id":{"type":"string","optional":true}},"block_types":{"dynamic_routing_enrichment":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"static_routing_enrichment":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_eventgrid_partner_configuration":{"block":{"attributes":{"default_maximum_expiration_time_in_days":{"type":"number","optional":true,"default":7},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"partner_authorization":{"nesting_mode":3,"block":{"attributes":{"authorization_expiration_time_in_utc":{"type":"string","optional":true},"partner_name":{"type":"string","required":true},"partner_registration_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_eventgrid_system_topic":{"block":{"attributes":{"location":{"type":"string","required":true},"metric_arm_resource_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_arm_resource_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"topic_type":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_eventgrid_system_topic_event_subscription":{"block":{"attributes":{"advanced_filtering_on_arrays_enabled":{"type":"bool","optional":true,"default":false},"event_delivery_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"eventhub_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"expiration_time_utc":{"type":"string","optional":true},"hybrid_connection_endpoint_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"included_event_types":{"type":["list","string"],"optional":true,"computed":true},"labels":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_bus_queue_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"service_bus_topic_endpoint_id":{"type":"string","optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"system_topic":{"type":"string","required":true}},"block_types":{"advanced_filter":{"nesting_mode":3,"block":{"block_types":{"bool_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"bool","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_not_null":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"is_null_or_undefined":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_greater_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_less_than_or_equals":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"value":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","number"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"number_not_in_range":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list",["list","number"]],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_begins_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_contains":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_ends_with":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]},"string_not_in":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["advanced_filter.0.bool_equals","advanced_filter.0.number_greater_than","advanced_filter.0.number_greater_than_or_equals","advanced_filter.0.number_less_than","advanced_filter.0.number_less_than_or_equals","advanced_filter.0.number_in","advanced_filter.0.number_not_in","advanced_filter.0.string_begins_with","advanced_filter.0.string_not_begins_with","advanced_filter.0.string_ends_with","advanced_filter.0.string_not_ends_with","advanced_filter.0.string_contains","advanced_filter.0.string_not_contains","advanced_filter.0.string_in","advanced_filter.0.string_not_in","advanced_filter.0.is_not_null","advanced_filter.0.is_null_or_undefined","advanced_filter.0.number_in_range","advanced_filter.0.number_not_in_range"]}}},"optional":true},"azure_function_endpoint":{"nesting_mode":3,"block":{"attributes":{"function_id":{"type":"string","required":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true}}},"optional":true,"conflicts_with":["eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint","webhook_endpoint"]},"dead_letter_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_identity":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"user_assigned_identity":{"type":"string","optional":true}}},"optional":true},"delivery_property":{"nesting_mode":3,"block":{"attributes":{"header_name":{"type":"string","required":true},"secret":{"type":"bool","optional":true},"source_field":{"type":"string","optional":true},"type":{"type":"string","required":true},"value":{"type":"string","optional":true}}},"optional":true},"retry_policy":{"nesting_mode":3,"block":{"attributes":{"event_time_to_live":{"type":"number","required":true},"max_delivery_attempts":{"type":"number","required":true}}},"optional":true,"computed":true},"storage_blob_dead_letter_destination":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"storage_blob_container_name":{"type":"string","required":true}}},"optional":true},"storage_queue_endpoint":{"nesting_mode":3,"block":{"attributes":{"queue_message_time_to_live_in_seconds":{"type":"number","optional":true},"queue_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","webhook_endpoint"]},"subject_filter":{"nesting_mode":3,"block":{"attributes":{"case_sensitive":{"type":"bool","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_begins_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]},"subject_ends_with":{"type":"string","optional":true,"at_least_one_of":["subject_filter.0.subject_begins_with","subject_filter.0.subject_ends_with","subject_filter.0.case_sensitive"]}}},"optional":true},"webhook_endpoint":{"nesting_mode":3,"block":{"attributes":{"active_directory_app_id_or_uri":{"type":"string","optional":true},"active_directory_tenant_id":{"type":"string","optional":true},"base_url":{"type":"string","computed":true},"max_events_per_batch":{"type":"number","optional":true},"preferred_batch_size_in_kilobytes":{"type":"number","optional":true},"url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_function_endpoint","eventhub_endpoint_id","hybrid_connection_endpoint_id","service_bus_queue_endpoint_id","service_bus_topic_endpoint_id","storage_queue_endpoint"]}}}},"azurerm_eventgrid_topic":{"block":{"attributes":{"endpoint":{"type":"string","computed":true},"inbound_ip_rule":{"type":["list",["object",{"action":"string","ip_mask":"string"}]],"optional":true},"input_schema":{"type":"string","optional":true,"default":"EventGridSchema"},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"input_mapping_default_values":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"subject":{"type":"string","optional":true}}},"optional":true},"input_mapping_fields":{"nesting_mode":3,"block":{"attributes":{"data_version":{"type":"string","optional":true},"event_time":{"type":"string","optional":true},"event_type":{"type":"string","optional":true},"id":{"type":"string","optional":true},"subject":{"type":"string","optional":true},"topic":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_eventhub":{"block":{"attributes":{"message_retention":{"type":"number","required":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["namespace_id","namespace_name"]},"namespace_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["namespace_id","namespace_name"]},"partition_count":{"type":"number","required":true},"partition_ids":{"type":["set","string"],"computed":true},"resource_group_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["namespace_id","resource_group_name"]},"status":{"type":"string","optional":true,"default":"Active"}},"block_types":{"capture_description":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"encoding":{"type":"string","required":true},"interval_in_seconds":{"type":"number","optional":true,"default":300},"size_limit_in_bytes":{"type":"number","optional":true,"default":314572800},"skip_empty_archives":{"type":"bool","optional":true,"default":false}},"block_types":{"destination":{"nesting_mode":3,"block":{"attributes":{"archive_name_format":{"type":"string","required":true},"blob_container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_eventhub_authorization_rule":{"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_eventhub_cluster":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_eventhub_consumer_group":{"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"user_metadata":{"type":"string","optional":true}}}},"azurerm_eventhub_namespace":{"block":{"attributes":{"auto_inflate_enabled":{"type":"bool","optional":true,"default":false},"capacity":{"type":"number","optional":true,"default":1},"dedicated_cluster_id":{"type":"string","optional":true},"default_primary_connection_string":{"type":"string","computed":true},"default_primary_connection_string_alias":{"type":"string","computed":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_connection_string":{"type":"string","computed":true},"default_secondary_connection_string_alias":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"maximum_throughput_units":{"type":"number","optional":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"network_rulesets":{"type":["list",["object",{"default_action":"string","ip_rule":["list",["object",{"action":"string","ip_mask":"string"}]],"public_network_access_enabled":"bool","trusted_service_access_enabled":"bool","virtual_network_rule":["set",["object",{"ignore_missing_virtual_network_service_endpoint":"bool","subnet_id":"string"}]]}]],"optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_eventhub_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_eventhub_namespace_customer_managed_key":{"block":{"attributes":{"eventhub_namespace_id":{"type":"string","required":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_ids":{"type":["set","string"],"required":true},"user_assigned_identity_id":{"type":"string","optional":true}}}},"azurerm_eventhub_namespace_disaster_recovery_config":{"block":{"attributes":{"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"partner_namespace_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_eventhub_namespace_schema_group":{"block":{"attributes":{"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"schema_compatibility":{"type":"string","required":true},"schema_type":{"type":"string","required":true}}}},"azurerm_express_route_circuit":{"block":{"attributes":{"allow_classic_operations":{"type":"bool","optional":true,"default":false},"authorization_key":{"type":"string","optional":true},"bandwidth_in_gbps":{"type":"number","optional":true,"conflicts_with":["bandwidth_in_mbps","peering_location","service_provider_name"],"required_with":["express_route_port_id"]},"bandwidth_in_mbps":{"type":"number","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["peering_location","service_provider_name"]},"express_route_port_id":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_mbps","peering_location","service_provider_name"],"required_with":["bandwidth_in_gbps"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"peering_location":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["bandwidth_in_mbps","service_provider_name"]},"rate_limiting_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"service_key":{"type":"string","computed":true},"service_provider_name":{"type":"string","optional":true,"conflicts_with":["bandwidth_in_gbps","express_route_port_id"],"required_with":["bandwidth_in_mbps","peering_location"]},"service_provider_provisioning_state":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"family":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_express_route_circuit_authorization":{"block":{"attributes":{"authorization_key":{"type":"string","computed":true},"authorization_use_status":{"type":"string","computed":true},"express_route_circuit_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_express_route_circuit_connection":{"block":{"attributes":{"address_prefix_ipv4":{"type":"string","required":true},"address_prefix_ipv6":{"type":"string","optional":true},"authorization_key":{"type":"string","optional":true},"name":{"type":"string","required":true},"peer_peering_id":{"type":"string","required":true},"peering_id":{"type":"string","required":true}}}},"azurerm_express_route_circuit_peering":{"block":{"attributes":{"azure_asn":{"type":"number","computed":true},"express_route_circuit_name":{"type":"string","required":true},"gateway_manager_etag":{"type":"string","computed":true},"ipv4_enabled":{"type":"bool","optional":true,"default":true},"peer_asn":{"type":"number","optional":true,"computed":true},"peering_type":{"type":"string","required":true},"primary_azure_port":{"type":"string","computed":true},"primary_peer_address_prefix":{"type":"string","optional":true,"required_with":["secondary_peer_address_prefix"]},"resource_group_name":{"type":"string","required":true},"route_filter_id":{"type":"string","optional":true},"secondary_azure_port":{"type":"string","computed":true},"secondary_peer_address_prefix":{"type":"string","optional":true,"required_with":["primary_peer_address_prefix"]},"shared_key":{"type":"string","optional":true},"vlan_id":{"type":"number","required":true}},"block_types":{"ipv6":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"primary_peer_address_prefix":{"type":"string","required":true},"route_filter_id":{"type":"string","optional":true},"secondary_peer_address_prefix":{"type":"string","required":true}},"block_types":{"microsoft_peering":{"nesting_mode":3,"block":{"attributes":{"advertised_communities":{"type":["list","string"],"optional":true},"advertised_public_prefixes":{"type":["list","string"],"optional":true},"customer_asn":{"type":"number","optional":true,"default":0},"routing_registry_name":{"type":"string","optional":true,"default":"NONE"}}},"optional":true}}},"optional":true},"microsoft_peering_config":{"nesting_mode":3,"block":{"attributes":{"advertised_communities":{"type":["list","string"],"optional":true},"advertised_public_prefixes":{"type":["list","string"],"required":true},"customer_asn":{"type":"number","optional":true,"default":0},"routing_registry_name":{"type":"string","optional":true,"default":"NONE"}}},"optional":true}}}},"azurerm_express_route_connection":{"block":{"attributes":{"authorization_key":{"type":"string","optional":true},"enable_internet_security":{"type":"bool","optional":true},"express_route_circuit_peering_id":{"type":"string","required":true},"express_route_gateway_bypass_enabled":{"type":"bool","optional":true,"default":false},"express_route_gateway_id":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_fast_path_enabled":{"type":"bool","optional":true},"routing_weight":{"type":"number","optional":true,"default":0}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table"]},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]},"route_table_ids":{"type":["list","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]}}},"optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table"]}}},"optional":true,"computed":true}}}},"azurerm_express_route_gateway":{"block":{"attributes":{"allow_non_virtual_wan_traffic":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scale_units":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_express_route_port":{"block":{"attributes":{"bandwidth_in_gbps":{"type":"number","required":true},"billing_type":{"type":"string","optional":true,"default":"MeteredData"},"encapsulation":{"type":"string","required":true},"ethertype":{"type":"string","computed":true},"guid":{"type":"string","computed":true},"location":{"type":"string","required":true},"mtu":{"type":"string","computed":true},"name":{"type":"string","required":true},"peering_location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"link1":{"nesting_mode":3,"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"connector_type":{"type":"string","computed":true},"id":{"type":"string","computed":true},"interface_name":{"type":"string","computed":true},"macsec_cak_keyvault_secret_id":{"type":"string","optional":true},"macsec_cipher":{"type":"string","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"string","optional":true},"macsec_sci_enabled":{"type":"bool","optional":true,"default":false},"patch_panel_id":{"type":"string","computed":true},"rack_id":{"type":"string","computed":true},"router_name":{"type":"string","computed":true}}},"optional":true,"computed":true},"link2":{"nesting_mode":3,"block":{"attributes":{"admin_enabled":{"type":"bool","optional":true,"default":false},"connector_type":{"type":"string","computed":true},"id":{"type":"string","computed":true},"interface_name":{"type":"string","computed":true},"macsec_cak_keyvault_secret_id":{"type":"string","optional":true},"macsec_cipher":{"type":"string","optional":true,"default":"GcmAes128"},"macsec_ckn_keyvault_secret_id":{"type":"string","optional":true},"macsec_sci_enabled":{"type":"bool","optional":true,"default":false},"patch_panel_id":{"type":"string","computed":true},"rack_id":{"type":"string","computed":true},"router_name":{"type":"string","computed":true}}},"optional":true,"computed":true}}}},"azurerm_express_route_port_authorization":{"block":{"attributes":{"authorization_key":{"type":"string","computed":true},"authorization_use_status":{"type":"string","computed":true},"express_route_port_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_extended_custom_location":{"block":{"attributes":{"cluster_extension_ids":{"type":["list","string"],"required":true},"display_name":{"type":"string","optional":true},"host_resource_id":{"type":"string","required":true},"host_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_extended_location_custom_location":{"block":{"attributes":{"cluster_extension_ids":{"type":["list","string"],"required":true},"display_name":{"type":"string","optional":true},"host_resource_id":{"type":"string","required":true},"host_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_fabric_capacity":{"block":{"attributes":{"administration_members":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"sku":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_federated_identity_credential":{"block":{"attributes":{"audience":{"type":["list","string"],"required":true},"issuer":{"type":"string","required":true},"name":{"type":"string","required":true},"parent_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subject":{"type":"string","required":true}}}},"azurerm_firewall":{"block":{"attributes":{"dns_proxy_enabled":{"type":"bool","optional":true,"computed":true},"dns_servers":{"type":["list","string"],"optional":true},"firewall_policy_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_ranges":{"type":["set","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"sku_tier":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"threat_intel_mode":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"optional":true},"management_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true},"virtual_hub":{"nesting_mode":3,"block":{"attributes":{"private_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_count":{"type":"number","optional":true,"default":1},"virtual_hub_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_firewall_application_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"fqdn_tags":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"target_fqdns":{"type":["list","string"],"optional":true}},"block_types":{"protocol":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_firewall_nat_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"required":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"translated_address":{"type":"string","required":true},"translated_port":{"type":"string","required":true}}},"required":true}}}},"azurerm_firewall_network_rule_collection":{"block":{"attributes":{"action":{"type":"string","required":true},"azure_firewall_name":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_ip_groups":{"type":["list","string"],"optional":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true}}},"required":true}}}},"azurerm_firewall_policy":{"block":{"attributes":{"auto_learn_private_ranges_enabled":{"type":"bool","optional":true},"base_policy_id":{"type":"string","optional":true},"child_policies":{"type":["list","string"],"computed":true},"firewalls":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_ranges":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"rule_collection_groups":{"type":["list","string"],"computed":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sql_redirect_allowed":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"threat_intelligence_mode":{"type":"string","optional":true,"default":"Alert"}},"block_types":{"dns":{"nesting_mode":3,"block":{"attributes":{"proxy_enabled":{"type":"bool","optional":true,"default":false},"servers":{"type":["list","string"],"optional":true}}},"optional":true},"explicit_proxy":{"nesting_mode":3,"block":{"attributes":{"enable_pac_file":{"type":"bool","optional":true},"enabled":{"type":"bool","optional":true},"http_port":{"type":"number","optional":true},"https_port":{"type":"number","optional":true},"pac_file":{"type":"string","optional":true},"pac_file_port":{"type":"number","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"insights":{"nesting_mode":3,"block":{"attributes":{"default_log_analytics_workspace_id":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"retention_in_days":{"type":"number","optional":true}},"block_types":{"log_analytics_workspace":{"nesting_mode":3,"block":{"attributes":{"firewall_location":{"type":"string","required":true},"id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"intrusion_detection":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","optional":true},"private_ranges":{"type":["list","string"],"optional":true}},"block_types":{"signature_overrides":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true},"state":{"type":"string","optional":true}}},"optional":true},"traffic_bypass":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["set","string"],"optional":true},"destination_ip_groups":{"type":["set","string"],"optional":true},"destination_ports":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"source_addresses":{"type":["set","string"],"optional":true},"source_ip_groups":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true},"threat_intelligence_allowlist":{"nesting_mode":3,"block":{"attributes":{"fqdns":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_intelligence_allowlist.0.ip_addresses","threat_intelligence_allowlist.0.fqdns"]},"ip_addresses":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_intelligence_allowlist.0.ip_addresses","threat_intelligence_allowlist.0.fqdns"]}}},"optional":true},"tls_certificate":{"nesting_mode":3,"block":{"attributes":{"key_vault_secret_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_firewall_policy_rule_collection_group":{"block":{"attributes":{"firewall_policy_id":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"application_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdn_tags":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_urls":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"terminate_tls":{"type":"bool","optional":true},"web_categories":{"type":["list","string"],"optional":true}},"block_types":{"http_headers":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"protocols":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"optional":true},"nat_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_address":{"type":"string","optional":true},"destination_ports":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true},"translated_address":{"type":"string","optional":true},"translated_fqdn":{"type":"string","optional":true},"translated_port":{"type":"number","required":true}}},"required":true}}},"optional":true},"network_rule_collection":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"destination_addresses":{"type":["list","string"],"optional":true},"destination_fqdns":{"type":["list","string"],"optional":true},"destination_ip_groups":{"type":["list","string"],"optional":true},"destination_ports":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"source_addresses":{"type":["list","string"],"optional":true},"source_ip_groups":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_fluid_relay_server":{"block":{"attributes":{"frs_tenant_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"orderer_endpoints":{"type":["list","string"],"computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"service_endpoints":{"type":["list","string"],"computed":true},"storage_endpoints":{"type":["list","string"],"computed":true},"storage_sku":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_frontdoor":{"block":{"attributes":{"backend_pool_health_probes":{"type":["map","string"],"computed":true},"backend_pool_load_balancing_settings":{"type":["map","string"],"computed":true},"backend_pools":{"type":["map","string"],"computed":true},"cname":{"type":"string","computed":true},"explicit_resource_order":{"type":["list",["object",{"backend_pool_health_probe_ids":["list","string"],"backend_pool_ids":["list","string"],"backend_pool_load_balancing_ids":["list","string"],"frontend_endpoint_ids":["list","string"],"routing_rule_ids":["list","string"]}]],"computed":true},"friendly_name":{"type":"string","optional":true},"frontend_endpoints":{"type":["map","string"],"computed":true},"header_frontdoor_id":{"type":"string","computed":true},"load_balancer_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_rules":{"type":["map","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"backend_pool":{"nesting_mode":3,"block":{"attributes":{"health_probe_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"load_balancing_name":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"backend":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"host_header":{"type":"string","required":true},"http_port":{"type":"number","required":true},"https_port":{"type":"number","required":true},"priority":{"type":"number","optional":true,"default":1},"weight":{"type":"number","optional":true,"default":50}}},"required":true}}},"required":true},"backend_pool_health_probe":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"id":{"type":"string","computed":true},"interval_in_seconds":{"type":"number","optional":true,"default":120},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"default":"/"},"probe_method":{"type":"string","optional":true,"default":"GET"},"protocol":{"type":"string","optional":true,"default":"Http"}}},"required":true},"backend_pool_load_balancing":{"nesting_mode":3,"block":{"attributes":{"additional_latency_milliseconds":{"type":"number","optional":true,"default":0},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"sample_size":{"type":"number","optional":true,"default":4},"successful_samples_required":{"type":"number","optional":true,"default":2}}},"required":true},"backend_pool_settings":{"nesting_mode":3,"block":{"attributes":{"backend_pools_send_receive_timeout_seconds":{"type":"number","optional":true,"default":60},"enforce_backend_pools_certificate_name_check":{"type":"bool","required":true}}},"optional":true},"frontend_endpoint":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"session_affinity_enabled":{"type":"bool","optional":true,"default":false},"session_affinity_ttl_seconds":{"type":"number","optional":true,"default":0},"web_application_firewall_policy_link_id":{"type":"string","optional":true}}},"required":true},"routing_rule":{"nesting_mode":3,"block":{"attributes":{"accepted_protocols":{"type":["list","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoints":{"type":["list","string"],"required":true},"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"patterns_to_match":{"type":["list","string"],"required":true}},"block_types":{"forwarding_configuration":{"nesting_mode":3,"block":{"attributes":{"backend_pool_name":{"type":"string","required":true},"cache_duration":{"type":"string","optional":true},"cache_enabled":{"type":"bool","optional":true,"default":false},"cache_query_parameter_strip_directive":{"type":"string","optional":true,"default":"StripAll"},"cache_query_parameters":{"type":["list","string"],"optional":true},"cache_use_dynamic_compression":{"type":"bool","optional":true,"default":false},"custom_forwarding_path":{"type":"string","optional":true},"forwarding_protocol":{"type":"string","optional":true,"default":"HttpsOnly"}}},"optional":true},"redirect_configuration":{"nesting_mode":3,"block":{"attributes":{"custom_fragment":{"type":"string","optional":true},"custom_host":{"type":"string","optional":true},"custom_path":{"type":"string","optional":true},"custom_query_string":{"type":"string","optional":true},"redirect_protocol":{"type":"string","required":true},"redirect_type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_frontdoor_custom_https_configuration":{"block":{"attributes":{"custom_https_provisioning_enabled":{"type":"bool","required":true},"frontend_endpoint_id":{"type":"string","required":true}},"block_types":{"custom_https_configuration":{"nesting_mode":3,"block":{"attributes":{"azure_key_vault_certificate_secret_name":{"type":"string","optional":true},"azure_key_vault_certificate_secret_version":{"type":"string","optional":true},"azure_key_vault_certificate_vault_id":{"type":"string","optional":true},"certificate_source":{"type":"string","optional":true,"default":"FrontDoor"},"minimum_tls_version":{"type":"string","computed":true},"provisioning_state":{"type":"string","computed":true},"provisioning_substate":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_frontdoor_firewall_policy":{"block":{"attributes":{"custom_block_response_body":{"type":"string","optional":true},"custom_block_response_status_code":{"type":"number","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frontend_endpoint_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","computed":true},"mode":{"type":"string","optional":true,"default":"Prevention"},"name":{"type":"string","required":true},"redirect_url":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":1},"rate_limit_duration_in_minutes":{"type":"number","optional":true,"default":1},"rate_limit_threshold":{"type":"number","optional":true,"default":10},"type":{"type":"string","required":true}},"block_types":{"match_condition":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"required":true},"match_variable":{"type":"string","required":true},"negation_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transforms":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"managed_rule":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true},"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"rule_id":{"type":"string","required":true}},"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"operator":{"type":"string","required":true},"selector":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_frontdoor_rules_engine":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"frontdoor_name":{"type":"string","required":true},"location":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"priority":{"type":"number","required":true}},"block_types":{"action":{"nesting_mode":3,"block":{"block_types":{"request_header":{"nesting_mode":3,"block":{"attributes":{"header_action_type":{"type":"string","optional":true},"header_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"response_header":{"nesting_mode":3,"block":{"attributes":{"header_action_type":{"type":"string","optional":true},"header_name":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"match_condition":{"nesting_mode":3,"block":{"attributes":{"negate_condition":{"type":"bool","optional":true,"default":false},"operator":{"type":"string","required":true},"selector":{"type":"string","optional":true},"transform":{"type":["list","string"],"optional":true},"value":{"type":["list","string"],"optional":true},"variable":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_function_app":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"client_cert_mode":{"type":"string","optional":true},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true},"default_hostname":{"type":"string","computed":true},"enable_builtin_logging":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true,"default":""},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"~1"}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"source_control":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"manual_integration":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"repo_url":{"type":"string","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"rollback_enabled":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]},"use_mercurial":{"type":"bool","optional":true,"computed":true,"at_least_one_of":["source_control.0.repo_url","source_control.0.branch","source_control.0.manual_integration","source_control.0.use_mercurial","source_control.0.rollback_enabled"]}}},"optional":true,"computed":true,"conflicts_with":["site_config.0.scm_type"]}}}},"azurerm_function_app_active_slot":{"block":{"attributes":{"last_successful_swap":{"type":"string","computed":true},"overwrite_network_config":{"type":"bool","optional":true,"default":true},"slot_id":{"type":"string","required":true}}}},"azurerm_function_app_connection":{"block":{"attributes":{"client_type":{"type":"string","optional":true,"default":"none"},"function_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_function_app_flex_consumption":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"instance_memory_in_mb":{"type":"number","optional":true,"default":2048},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"maximum_instance_count":{"type":"number","optional":true,"default":100},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"runtime_name":{"type":"string","required":true},"runtime_version":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_access_key":{"type":"string","optional":true},"storage_authentication_type":{"type":"string","required":true},"storage_container_endpoint":{"type":"string","required":true},"storage_container_type":{"type":"string","required":true},"storage_user_assigned_identity_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true}}}},"azurerm_function_app_function":{"block":{"attributes":{"config_json":{"type":"string","required":true},"config_url":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"invocation_url":{"type":"string","computed":true},"language":{"type":"string","optional":true},"name":{"type":"string","required":true},"script_root_path_url":{"type":"string","computed":true},"script_url":{"type":"string","computed":true},"secrets_file_url":{"type":"string","computed":true},"test_data":{"type":"string","optional":true},"test_data_url":{"type":"string","computed":true},"url":{"type":"string","computed":true}},"block_types":{"file":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_function_app_hybrid_connection":{"block":{"attributes":{"function_app_id":{"type":"string","required":true},"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true}}}},"azurerm_function_app_slot":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"daily_memory_time_quota":{"type":"number","optional":true},"default_hostname":{"type":"string","computed":true},"enable_builtin_logging":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"function_app_name":{"type":"string","required":true},"https_only":{"type":"bool","optional":true,"default":false},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"default":"~1"}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_params":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"default_provider":{"type":"string","optional":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","optional":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"java_version":{"type":"string","optional":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_gallery_application":{"block":{"attributes":{"description":{"type":"string","optional":true},"end_of_life_date":{"type":"string","optional":true},"eula":{"type":"string","optional":true},"gallery_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"privacy_statement_uri":{"type":"string","optional":true},"release_note_uri":{"type":"string","optional":true},"supported_os_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_gallery_application_version":{"block":{"attributes":{"config_file":{"type":"string","optional":true},"enable_health_check":{"type":"bool","optional":true,"default":false},"end_of_life_date":{"type":"string","optional":true},"exclude_from_latest":{"type":"bool","optional":true,"default":false},"gallery_application_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"package_file":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"manage_action":{"nesting_mode":3,"block":{"attributes":{"install":{"type":"string","required":true},"remove":{"type":"string","required":true},"update":{"type":"string","optional":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"default_configuration_link":{"type":"string","optional":true},"media_link":{"type":"string","required":true}}},"required":true},"target_region":{"nesting_mode":3,"block":{"attributes":{"exclude_from_latest":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"regional_replica_count":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"required":true}}}},"azurerm_graph_services_account":{"block":{"attributes":{"application_id":{"type":"string","required":true},"billing_plan_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_hdinsight_hadoop_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"hadoop":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"edge_node":{"nesting_mode":3,"block":{"attributes":{"target_instance_count":{"type":"number","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"https_endpoints":{"nesting_mode":3,"block":{"attributes":{"access_modes":{"type":["list","string"],"optional":true},"destination_port":{"type":"number","optional":true},"disable_gateway_auth":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"sub_domain_suffix":{"type":"string","optional":true}}},"optional":true},"install_script_action":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"required":true},"uninstall_script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"optional":true},"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"max_instance_count":{"type":"number","required":true},"min_instance_count":{"type":"number","required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.recurrence"]},"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.capacity"]}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_hbase_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"hbase":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_interactive_query_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"interactive_hive":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_kafka_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"kafka_rest_proxy_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"kafka":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"rest_proxy":{"nesting_mode":3,"block":{"attributes":{"security_group_id":{"type":"string","required":true},"security_group_name":{"type":"string","required":true}}},"optional":true,"required_with":["roles.0.kafka_management_node"]},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"kafka_management_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.kafka_management_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","computed":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"optional":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"number_of_disks_per_node":{"type":"number","required":true},"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hdinsight_spark_cluster":{"block":{"attributes":{"cluster_version":{"type":"string","required":true},"encryption_in_transit_enabled":{"type":"bool","optional":true},"https_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"ssh_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","required":true},"tls_min_version":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"component_version":{"nesting_mode":3,"block":{"attributes":{"spark":{"type":"string","required":true}}},"required":true},"compute_isolation":{"nesting_mode":3,"block":{"attributes":{"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"host_sku":{"type":"string","optional":true}}},"optional":true},"disk_encryption":{"nesting_mode":3,"block":{"attributes":{"encryption_algorithm":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"key_vault_managed_identity_id":{"type":"string","optional":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"gateway":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"required":true},"metastores":{"nesting_mode":3,"block":{"block_types":{"ambari":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"hive":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"oozie":{"nesting_mode":3,"block":{"attributes":{"database_name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true}}},"optional":true},"monitor":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"primary_key":{"type":"string","required":true}}},"optional":true},"network":{"nesting_mode":3,"block":{"attributes":{"connection_direction":{"type":"string","optional":true,"default":"Inbound"},"private_link_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"private_link_configuration":{"nesting_mode":3,"block":{"attributes":{"group_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}},"optional":true},"roles":{"nesting_mode":3,"block":{"block_types":{"head_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.head_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"worker_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.worker_node.0.password"]},"subnet_id":{"type":"string","optional":true},"target_instance_count":{"type":"number","required":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"autoscale":{"nesting_mode":3,"block":{"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"max_instance_count":{"type":"number","required":true},"min_instance_count":{"type":"number","required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.recurrence"]},"recurrence":{"nesting_mode":3,"block":{"attributes":{"timezone":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"target_instance_count":{"type":"number","required":true},"time":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["roles.0.worker_node.0.autoscale.0.capacity"]}}},"optional":true},"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true},"zookeeper_node":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","optional":true},"ssh_keys":{"type":["set","string"],"optional":true,"conflicts_with":["roles.0.zookeeper_node.0.password"]},"subnet_id":{"type":"string","optional":true},"username":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true},"vm_size":{"type":"string","required":true}},"block_types":{"script_actions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"uri":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"security_profile":{"nesting_mode":3,"block":{"attributes":{"aadds_resource_id":{"type":"string","required":true},"cluster_users_group_dns":{"type":["set","string"],"optional":true},"domain_name":{"type":"string","required":true},"domain_user_password":{"type":"string","required":true},"domain_username":{"type":"string","required":true},"ldaps_urls":{"type":["set","string"],"required":true},"msi_resource_id":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","required":true},"storage_account_key":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","optional":true}}},"optional":true},"storage_account_gen2":{"nesting_mode":3,"block":{"attributes":{"filesystem_id":{"type":"string","required":true},"is_default":{"type":"bool","required":true},"managed_identity_resource_id":{"type":"string","required":true},"storage_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthbot":{"block":{"attributes":{"bot_management_portal_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_healthcare_dicom_service":{"block":{"attributes":{"authentication":{"type":["list",["object",{"audience":["list","string"],"authority":"string"}]],"computed":true},"data_partitions_enabled":{"type":"bool","optional":true,"default":false},"encryption_key_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_url":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allow_credentials":{"type":"bool","optional":true,"default":false},"allowed_headers":{"type":["list","string"],"optional":true},"allowed_methods":{"type":["list","string"],"optional":true},"allowed_origins":{"type":["list","string"],"optional":true},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"storage":{"nesting_mode":3,"block":{"attributes":{"file_system_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_healthcare_fhir_service":{"block":{"attributes":{"access_policy_object_ids":{"type":["set","string"],"optional":true},"configuration_export_storage_account_name":{"type":"string","optional":true},"container_registry_login_server_url":{"type":["set","string"],"optional":true},"kind":{"type":"string","optional":true,"default":"fhir-R4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","required":true},"authority":{"type":"string","required":true},"smart_proxy_enabled":{"type":"bool","optional":true}}},"required":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["set","string"],"required":true},"allowed_methods":{"type":["set","string"],"required":true},"allowed_origins":{"type":["set","string"],"required":true},"credentials_allowed":{"type":"bool","optional":true,"default":false},"max_age_in_seconds":{"type":"number","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"oci_artifact":{"nesting_mode":3,"block":{"attributes":{"digest":{"type":"string","optional":true},"image_name":{"type":"string","optional":true},"login_server":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_medtech_service":{"block":{"attributes":{"device_mapping_json":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","required":true},"eventhub_name":{"type":"string","required":true},"eventhub_namespace_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_medtech_service_fhir_destination":{"block":{"attributes":{"destination_fhir_mapping_json":{"type":"string","required":true},"destination_fhir_service_id":{"type":"string","required":true},"destination_identity_resolution_type":{"type":"string","required":true},"location":{"type":"string","required":true},"medtech_service_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_healthcare_service":{"block":{"attributes":{"access_policy_object_ids":{"type":["set","string"],"optional":true},"configuration_export_storage_account_name":{"type":"string","optional":true},"cosmosdb_key_vault_key_versionless_id":{"type":"string","optional":true},"cosmosdb_throughput":{"type":"number","optional":true,"default":1000},"kind":{"type":"string","optional":true,"default":"fhir"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"authentication_configuration":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]},"authority":{"type":"string","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]},"smart_proxy_enabled":{"type":"bool","optional":true,"at_least_one_of":["authentication_configuration.0.authority","authentication_configuration.0.audience","authentication_configuration.0.smart_proxy_enabled"]}}},"optional":true,"computed":true},"cors_configuration":{"nesting_mode":3,"block":{"attributes":{"allow_credentials":{"type":"bool","optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_headers":{"type":["set","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_methods":{"type":["list","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"allowed_origins":{"type":["set","string"],"optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]},"max_age_in_seconds":{"type":"number","optional":true,"at_least_one_of":["cors_configuration.0.allowed_origins","cors_configuration.0.allowed_headers","cors_configuration.0.allowed_methods","cors_configuration.0.max_age_in_seconds","cors_configuration.0.allow_credentials"]}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_healthcare_workspace":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_connection":{"type":["set",["object",{"id":"string","name":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_hpc_cache":{"block":{"attributes":{"automatically_rotate_key_to_latest_enabled":{"type":"bool","optional":true,"required_with":["key_vault_key_id"]},"cache_size_in_gb":{"type":"number","required":true},"key_vault_key_id":{"type":"string","optional":true,"required_with":["identity"]},"location":{"type":"string","required":true},"mount_addresses":{"type":["list","string"],"computed":true},"mtu":{"type":"number","optional":true,"default":1500},"name":{"type":"string","required":true},"ntp_server":{"type":"string","optional":true,"default":"time.windows.com"},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"default_access_policy":{"nesting_mode":3,"block":{"block_types":{"access_rule":{"nesting_mode":4,"block":{"attributes":{"access":{"type":"string","required":true},"anonymous_gid":{"type":"number","optional":true},"anonymous_uid":{"type":"number","optional":true},"filter":{"type":"string","optional":true},"root_squash_enabled":{"type":"bool","optional":true},"scope":{"type":"string","required":true},"submount_access_enabled":{"type":"bool","optional":true},"suid_enabled":{"type":"bool","optional":true}}},"required":true}}},"optional":true,"computed":true},"directory_active_directory":{"nesting_mode":3,"block":{"attributes":{"cache_netbios_name":{"type":"string","required":true},"dns_primary_ip":{"type":"string","required":true},"dns_secondary_ip":{"type":"string","optional":true},"domain_name":{"type":"string","required":true},"domain_netbios_name":{"type":"string","required":true},"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["directory_flat_file","directory_ldap"]},"directory_flat_file":{"nesting_mode":3,"block":{"attributes":{"group_file_uri":{"type":"string","required":true},"password_file_uri":{"type":"string","required":true}}},"optional":true,"conflicts_with":["directory_active_directory","directory_ldap"]},"directory_ldap":{"nesting_mode":3,"block":{"attributes":{"base_dn":{"type":"string","required":true},"certificate_validation_uri":{"type":"string","optional":true},"download_certificate_automatically":{"type":"bool","optional":true,"required_with":["directory_ldap.0.certificate_validation_uri"]},"encrypted":{"type":"bool","optional":true},"server":{"type":"string","required":true}},"block_types":{"bind":{"nesting_mode":3,"block":{"attributes":{"dn":{"type":"string","required":true},"password":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"conflicts_with":["directory_active_directory","directory_flat_file"]},"dns":{"nesting_mode":3,"block":{"attributes":{"search_domain":{"type":"string","optional":true},"servers":{"type":["list","string"],"required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_hpc_cache_access_policy":{"block":{"attributes":{"hpc_cache_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"access_rule":{"nesting_mode":4,"block":{"attributes":{"access":{"type":"string","required":true},"anonymous_gid":{"type":"number","optional":true},"anonymous_uid":{"type":"number","optional":true},"filter":{"type":"string","optional":true},"root_squash_enabled":{"type":"bool","optional":true},"scope":{"type":"string","required":true},"submount_access_enabled":{"type":"bool","optional":true},"suid_enabled":{"type":"bool","optional":true}}},"required":true}}}},"azurerm_hpc_cache_blob_nfs_target":{"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true},"usage_model":{"type":"string","required":true},"verification_timer_in_seconds":{"type":"number","optional":true},"write_back_timer_in_seconds":{"type":"number","optional":true}}}},"azurerm_hpc_cache_blob_target":{"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_container_id":{"type":"string","required":true}}}},"azurerm_hpc_cache_nfs_target":{"block":{"attributes":{"cache_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"target_host_name":{"type":"string","required":true},"usage_model":{"type":"string","required":true},"verification_timer_in_seconds":{"type":"number","optional":true},"write_back_timer_in_seconds":{"type":"number","optional":true}},"block_types":{"namespace_junction":{"nesting_mode":4,"block":{"attributes":{"access_policy_name":{"type":"string","optional":true,"default":"default"},"namespace_path":{"type":"string","required":true},"nfs_export":{"type":"string","required":true},"target_path":{"type":"string","optional":true,"default":""}}},"required":true}}}},"azurerm_image":{"block":{"attributes":{"hyper_v_generation":{"type":"string","optional":true,"default":"V1"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"zone_resilient":{"type":"bool","optional":true,"default":false}},"block_types":{"data_disk":{"nesting_mode":3,"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"computed":true},"caching":{"type":"string","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"string","optional":true},"lun":{"type":"number","optional":true},"managed_disk_id":{"type":"string","optional":true},"size_gb":{"type":"number","optional":true,"computed":true},"storage_type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"computed":true},"caching":{"type":"string","optional":true,"default":"None"},"disk_encryption_set_id":{"type":"string","optional":true},"managed_disk_id":{"type":"string","optional":true,"computed":true},"os_state":{"type":"string","optional":true},"os_type":{"type":"string","optional":true},"size_gb":{"type":"number","optional":true,"computed":true},"storage_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iot_security_device_group":{"block":{"attributes":{"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"allow_rule":{"nesting_mode":3,"block":{"attributes":{"connection_from_ips_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"connection_to_ips_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"local_users_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]},"processes_not_allowed":{"type":["set","string"],"optional":true,"at_least_one_of":["allow_rule.0.connection_from_ips_not_allowed","allow_rule.0.connection_to_ips_not_allowed","allow_rule.0.local_users_not_allowed","allow_rule.0.processes_not_allowed"]}}},"optional":true},"range_rule":{"nesting_mode":4,"block":{"attributes":{"duration":{"type":"string","required":true},"max":{"type":"number","required":true},"min":{"type":"number","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iot_security_solution":{"block":{"attributes":{"disabled_data_sources":{"type":["set","string"],"optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"events_to_export":{"type":["set","string"],"optional":true},"iothub_ids":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","optional":true},"log_unmasked_ips_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"query_for_resources":{"type":"string","optional":true,"computed":true},"query_subscription_ids":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"additional_workspace":{"nesting_mode":4,"block":{"attributes":{"data_types":{"type":["set","string"],"required":true},"workspace_id":{"type":"string","required":true}}},"optional":true},"recommendations_enabled":{"nesting_mode":3,"block":{"attributes":{"acr_authentication":{"type":"bool","optional":true,"default":true},"agent_send_unutilized_msg":{"type":"bool","optional":true,"default":true},"baseline":{"type":"bool","optional":true,"default":true},"edge_hub_mem_optimize":{"type":"bool","optional":true,"default":true},"edge_logging_option":{"type":"bool","optional":true,"default":true},"inconsistent_module_settings":{"type":"bool","optional":true,"default":true},"install_agent":{"type":"bool","optional":true,"default":true},"ip_filter_deny_all":{"type":"bool","optional":true,"default":true},"ip_filter_permissive_rule":{"type":"bool","optional":true,"default":true},"open_ports":{"type":"bool","optional":true,"default":true},"permissive_firewall_policy":{"type":"bool","optional":true,"default":true},"permissive_input_firewall_rules":{"type":"bool","optional":true,"default":true},"permissive_output_firewall_rules":{"type":"bool","optional":true,"default":true},"privileged_docker_options":{"type":"bool","optional":true,"default":true},"shared_credentials":{"type":"bool","optional":true,"default":true},"vulnerable_tls_cipher_suite":{"type":"bool","optional":true,"default":true}}},"optional":true,"computed":true}}}},"azurerm_iotcentral_application":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"ST1"},"sub_domain":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template":{"type":"string","optional":true,"default":"iotc-pnp-preview@1.0.0"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iotcentral_application_network_rule_set":{"block":{"attributes":{"apply_to_device":{"type":"bool","optional":true,"default":true},"default_action":{"type":"string","optional":true,"default":"Deny"},"iotcentral_application_id":{"type":"string","required":true}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iotcentral_organization":{"block":{"attributes":{"display_name":{"type":"string","required":true},"iotcentral_application_id":{"type":"string","required":true},"organization_id":{"type":"string","required":true},"parent_organization_id":{"type":"string","optional":true}}}},"azurerm_iothub":{"block":{"attributes":{"endpoint":{"type":["list",["object",{"authentication_type":"string","batch_frequency_in_seconds":"number","connection_string":"string","container_name":"string","encoding":"string","endpoint_uri":"string","entity_path":"string","file_name_format":"string","identity_id":"string","max_chunk_size_in_bytes":"number","name":"string","resource_group_name":"string","type":"string"}]],"optional":true,"computed":true},"enrichment":{"type":["list",["object",{"endpoint_names":["list","string"],"key":"string","value":"string"}]],"optional":true,"computed":true},"event_hub_events_endpoint":{"type":"string","computed":true},"event_hub_events_namespace":{"type":"string","computed":true},"event_hub_events_path":{"type":"string","computed":true},"event_hub_operations_endpoint":{"type":"string","computed":true},"event_hub_operations_path":{"type":"string","computed":true},"event_hub_partition_count":{"type":"number","optional":true,"default":4},"event_hub_retention_in_days":{"type":"number","optional":true,"default":1},"hostname":{"type":"string","computed":true},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"min_tls_version":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"route":{"type":["list",["object",{"condition":"string","enabled":"bool","endpoint_names":["list","string"],"name":"string","source":"string"}]],"optional":true,"computed":true},"shared_access_policy":{"type":["list",["object",{"key_name":"string","permissions":"string","primary_key":"string","secondary_key":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","computed":true}},"block_types":{"cloud_to_device":{"nesting_mode":3,"block":{"attributes":{"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"max_delivery_count":{"type":"number","optional":true,"default":10}},"block_types":{"feedback":{"nesting_mode":3,"block":{"attributes":{"lock_duration":{"type":"string","optional":true,"default":"PT60S"},"max_delivery_count":{"type":"number","optional":true,"default":10},"time_to_live":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true}}},"optional":true,"computed":true},"fallback_route":{"nesting_mode":3,"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","optional":true,"default":true},"endpoint_names":{"type":["list","string"],"optional":true,"computed":true},"source":{"type":"string","optional":true,"default":"DeviceMessages"}}},"optional":true,"computed":true},"file_upload":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","required":true},"container_name":{"type":"string","required":true},"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"identity_id":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"notifications":{"type":"bool","optional":true,"default":false},"sas_ttl":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule_set":{"nesting_mode":3,"block":{"attributes":{"apply_to_builtin_eventhub_endpoint":{"type":"bool","optional":true,"default":false},"default_action":{"type":"string","optional":true,"default":"Deny"}},"block_types":{"ip_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_iothub_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","required":true},"iothub_name":{"type":"string","required":true},"is_verified":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_consumer_group":{"block":{"attributes":{"eventhub_endpoint_name":{"type":"string","required":true},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_device_update_account":{"block":{"attributes":{"host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iothub_device_update_instance":{"block":{"attributes":{"device_update_account_id":{"type":"string","required":true},"diagnostic_enabled":{"type":"bool","optional":true,"default":false},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"diagnostic_storage_account":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","required":true},"id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_iothub_dps":{"block":{"attributes":{"allocation_policy":{"type":"string","optional":true,"default":"Hashed"},"data_residency_enabled":{"type":"bool","optional":true,"default":false},"device_provisioning_host_name":{"type":"string","computed":true},"id_scope":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_operations_host_name":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_filter_rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"ip_mask":{"type":"string","required":true},"name":{"type":"string","required":true},"target":{"type":"string","optional":true}}},"optional":true},"linked_hub":{"nesting_mode":3,"block":{"attributes":{"allocation_weight":{"type":"number","optional":true,"default":1},"apply_allocation_policy":{"type":"bool","optional":true,"default":true},"connection_string":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_iothub_dps_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","required":true},"iot_dps_name":{"type":"string","required":true},"is_verified":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_dps_shared_access_policy":{"block":{"attributes":{"enrollment_read":{"type":"bool","optional":true,"default":false},"enrollment_write":{"type":"bool","optional":true,"default":false},"iothub_dps_name":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"registration_read":{"type":"bool","optional":true,"default":false},"registration_write":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"service_config":{"type":"bool","optional":true,"default":false}}}},"azurerm_iothub_endpoint_cosmosdb_account":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"container_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"endpoint_uri":{"type":"string","required":true},"identity_id":{"type":"string","optional":true,"conflicts_with":["primary_key","secondary_key"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key_name":{"type":"string","optional":true,"required_with":["partition_key_template"]},"partition_key_template":{"type":"string","optional":true,"required_with":["partition_key_name"]},"primary_key":{"type":"string","optional":true,"conflicts_with":["identity_id"],"required_with":["secondary_key"]},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","optional":true,"conflicts_with":["identity_id"],"required_with":["primary_key"]}}}},"azurerm_iothub_endpoint_eventhub":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_servicebus_queue":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_servicebus_topic":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"],"required_with":["entity_path"]},"entity_path":{"type":"string","optional":true,"required_with":["endpoint_uri"]},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_endpoint_storage_container":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"batch_frequency_in_seconds":{"type":"number","optional":true,"default":300},"connection_string":{"type":"string","optional":true,"conflicts_with":["identity_id"],"exactly_one_of":["endpoint_uri","connection_string"]},"container_name":{"type":"string","required":true},"encoding":{"type":"string","optional":true,"default":"Avro"},"endpoint_uri":{"type":"string","optional":true,"exactly_one_of":["endpoint_uri","connection_string"]},"file_name_format":{"type":"string","optional":true,"default":"{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}"},"identity_id":{"type":"string","optional":true,"conflicts_with":["connection_string"]},"iothub_id":{"type":"string","required":true},"max_chunk_size_in_bytes":{"type":"number","optional":true,"default":314572800},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_iothub_enrichment":{"block":{"attributes":{"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_iothub_fallback_route":{"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","required":true},"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source":{"type":"string","optional":true,"default":"DeviceMessages"}}}},"azurerm_iothub_file_upload":{"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"keyBased"},"connection_string":{"type":"string","required":true},"container_name":{"type":"string","required":true},"default_ttl":{"type":"string","optional":true,"default":"PT1H"},"identity_id":{"type":"string","optional":true},"iothub_id":{"type":"string","required":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"notifications_enabled":{"type":"bool","optional":true,"default":false},"sas_ttl":{"type":"string","optional":true,"default":"PT1H"}}}},"azurerm_iothub_route":{"block":{"attributes":{"condition":{"type":"string","optional":true,"default":"true"},"enabled":{"type":"bool","required":true},"endpoint_names":{"type":["list","string"],"required":true},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source":{"type":"string","required":true}}}},"azurerm_iothub_shared_access_policy":{"block":{"attributes":{"device_connect":{"type":"bool","optional":true,"default":false},"iothub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"registry_read":{"type":"bool","optional":true,"default":false},"registry_write":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"service_connect":{"type":"bool","optional":true,"default":false}}}},"azurerm_ip_group":{"block":{"attributes":{"cidrs":{"type":["set","string"],"optional":true},"firewall_ids":{"type":["list","string"],"computed":true},"firewall_policy_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_ip_group_cidr":{"block":{"attributes":{"cidr":{"type":"string","required":true},"ip_group_id":{"type":"string","required":true}}}},"azurerm_key_vault":{"block":{"attributes":{"access_policy":{"type":["list",["object",{"application_id":"string","certificate_permissions":["list","string"],"key_permissions":["list","string"],"object_id":"string","secret_permissions":["list","string"],"storage_permissions":["list","string"],"tenant_id":"string"}]],"optional":true,"computed":true},"enable_rbac_authorization":{"type":"bool","optional":true},"enabled_for_deployment":{"type":"bool","optional":true},"enabled_for_disk_encryption":{"type":"bool","optional":true},"enabled_for_template_deployment":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_protection_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"soft_delete_retention_days":{"type":"number","optional":true,"default":90},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","required":true},"vault_uri":{"type":"string","computed":true}},"block_types":{"contact":{"nesting_mode":4,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true,"computed":true},"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","required":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true}}}},"azurerm_key_vault_access_policy":{"block":{"attributes":{"application_id":{"type":"string","optional":true},"certificate_permissions":{"type":["list","string"],"optional":true},"key_permissions":{"type":["list","string"],"optional":true},"key_vault_id":{"type":"string","required":true},"object_id":{"type":"string","required":true},"secret_permissions":{"type":["list","string"],"optional":true},"storage_permissions":{"type":["list","string"],"optional":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_key_vault_certificate":{"block":{"attributes":{"certificate_attribute":{"type":["list",["object",{"created":"string","enabled":"bool","expires":"string","not_before":"string","recovery_level":"string","updated":"string"}]],"computed":true},"certificate_data":{"type":"string","computed":true},"certificate_data_base64":{"type":"string","computed":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"resource_manager_versionless_id":{"type":"string","computed":true},"secret_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"thumbprint":{"type":"string","computed":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true},"versionless_secret_id":{"type":"string","computed":true}},"block_types":{"certificate":{"nesting_mode":3,"block":{"attributes":{"contents":{"type":"string","required":true},"password":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["certificate_policy","certificate"]},"certificate_policy":{"nesting_mode":3,"block":{"block_types":{"issuer_parameters":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true},"key_properties":{"nesting_mode":3,"block":{"attributes":{"curve":{"type":"string","optional":true,"computed":true},"exportable":{"type":"bool","required":true},"key_size":{"type":"number","optional":true,"computed":true},"key_type":{"type":"string","required":true},"reuse_key":{"type":"bool","required":true}}},"required":true},"lifetime_action":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"days_before_expiry":{"type":"number","optional":true},"lifetime_percentage":{"type":"number","optional":true}}},"required":true}}},"optional":true},"secret_properties":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","required":true}}},"required":true},"x509_certificate_properties":{"nesting_mode":3,"block":{"attributes":{"extended_key_usage":{"type":["list","string"],"optional":true,"computed":true},"key_usage":{"type":["set","string"],"required":true},"subject":{"type":"string","required":true},"validity_in_months":{"type":"number","required":true}},"block_types":{"subject_alternative_names":{"nesting_mode":3,"block":{"attributes":{"dns_names":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]},"emails":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]},"upns":{"type":["set","string"],"optional":true,"at_least_one_of":["certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.emails","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.dns_names","certificate_policy.0.x509_certificate_properties.0.subject_alternative_names.0.upns"]}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true,"at_least_one_of":["certificate_policy","certificate"]}}}},"azurerm_key_vault_certificate_contacts":{"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"contact":{"nesting_mode":4,"block":{"attributes":{"email":{"type":"string","required":true},"name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_key_vault_certificate_issuer":{"block":{"attributes":{"account_id":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"org_id":{"type":"string","optional":true},"password":{"type":"string","optional":true},"provider_name":{"type":"string","required":true}},"block_types":{"admin":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"first_name":{"type":"string","optional":true},"last_name":{"type":"string","optional":true},"phone":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_key_vault_key":{"block":{"attributes":{"curve":{"type":"string","optional":true,"computed":true,"conflicts_with":["key_size"]},"e":{"type":"string","computed":true},"expiration_date":{"type":"string","optional":true},"key_opts":{"type":["list","string"],"required":true},"key_size":{"type":"number","optional":true,"conflicts_with":["curve"]},"key_type":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"n":{"type":"string","computed":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"public_key_openssh":{"type":"string","computed":true},"public_key_pem":{"type":"string","computed":true},"resource_id":{"type":"string","computed":true},"resource_versionless_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true},"x":{"type":"string","computed":true},"y":{"type":"string","computed":true}},"block_types":{"rotation_policy":{"nesting_mode":3,"block":{"attributes":{"expire_after":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.expire_after","rotation_policy.0.automatic"],"required_with":["rotation_policy.0.expire_after","rotation_policy.0.notify_before_expiry"]},"notify_before_expiry":{"type":"string","optional":true,"required_with":["rotation_policy.0.expire_after","rotation_policy.0.notify_before_expiry"]}},"block_types":{"automatic":{"nesting_mode":3,"block":{"attributes":{"time_after_creation":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.automatic.0.time_after_creation","rotation_policy.0.automatic.0.time_before_expiry"]},"time_before_expiry":{"type":"string","optional":true,"at_least_one_of":["rotation_policy.0.automatic.0.time_after_creation","rotation_policy.0.automatic.0.time_before_expiry"]}}},"optional":true}}},"optional":true}}}},"azurerm_key_vault_managed_hardware_security_module":{"block":{"attributes":{"admin_object_ids":{"type":["set","string"],"required":true},"hsm_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_protection_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"security_domain_encrypted_data":{"type":"string","computed":true},"security_domain_key_vault_certificate_ids":{"type":["list","string"],"optional":true,"required_with":["security_domain_quorum"]},"security_domain_quorum":{"type":"number","optional":true,"required_with":["security_domain_key_vault_certificate_ids"]},"sku_name":{"type":"string","required":true},"soft_delete_retention_days":{"type":"number","optional":true,"default":90},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","required":true}},"block_types":{"network_acls":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":"string","required":true},"default_action":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_key_vault_managed_hardware_security_module_key":{"block":{"attributes":{"curve":{"type":"string","optional":true,"exactly_one_of":["key_size"]},"expiration_date":{"type":"string","optional":true},"key_opts":{"type":["set","string"],"required":true},"key_size":{"type":"number","optional":true,"exactly_one_of":["curve"]},"key_type":{"type":"string","required":true},"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"versioned_id":{"type":"string","computed":true}}}},"azurerm_key_vault_managed_hardware_security_module_key_rotation_policy":{"block":{"attributes":{"expire_after":{"type":"string","required":true},"managed_hsm_key_id":{"type":"string","required":true},"time_after_creation":{"type":"string","optional":true,"exactly_one_of":["time_after_creation","time_before_expiry"]},"time_before_expiry":{"type":"string","optional":true,"exactly_one_of":["time_after_creation","time_before_expiry"]}}}},"azurerm_key_vault_managed_hardware_security_module_role_assignment":{"block":{"attributes":{"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"resource_id":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}}}},"azurerm_key_vault_managed_hardware_security_module_role_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"managed_hsm_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"role_name":{"type":"string","optional":true},"role_type":{"type":"string","computed":true}},"block_types":{"permission":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"optional":true},"data_actions":{"type":["set","string"],"optional":true},"not_actions":{"type":["list","string"],"optional":true},"not_data_actions":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_key_vault_managed_storage_account":{"block":{"attributes":{"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"regenerate_key_automatically":{"type":"bool","optional":true,"default":false,"required_with":["regeneration_period"]},"regeneration_period":{"type":"string","optional":true,"required_with":["regenerate_key_automatically"]},"storage_account_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_key_vault_managed_storage_account_sas_token_definition":{"block":{"attributes":{"managed_storage_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sas_template_uri":{"type":"string","required":true},"sas_type":{"type":"string","required":true},"secret_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"validity_period":{"type":"string","required":true}}}},"azurerm_key_vault_secret":{"block":{"attributes":{"content_type":{"type":"string","optional":true},"expiration_date":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"name":{"type":"string","required":true},"not_before_date":{"type":"string","optional":true},"resource_id":{"type":"string","computed":true},"resource_versionless_id":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"value":{"type":"string","optional":true,"exactly_one_of":["value","value_wo"]},"value_wo":{"type":"string","optional":true,"exactly_one_of":["value","value_wo"],"required_with":["value_wo_version"]},"value_wo_version":{"type":"number","optional":true,"required_with":["value_wo"]},"version":{"type":"string","computed":true},"versionless_id":{"type":"string","computed":true}}}},"azurerm_kubernetes_cluster":{"block":{"attributes":{"automatic_upgrade_channel":{"type":"string","optional":true},"azure_policy_enabled":{"type":"bool","optional":true},"cost_analysis_enabled":{"type":"bool","optional":true},"current_kubernetes_version":{"type":"string","computed":true},"disk_encryption_set_id":{"type":"string","optional":true},"dns_prefix":{"type":"string","optional":true,"exactly_one_of":["dns_prefix","dns_prefix_private_cluster"]},"dns_prefix_private_cluster":{"type":"string","optional":true,"exactly_one_of":["dns_prefix","dns_prefix_private_cluster"]},"edge_zone":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"http_application_routing_enabled":{"type":"bool","optional":true},"http_application_routing_zone_name":{"type":"string","computed":true},"image_cleaner_enabled":{"type":"bool","optional":true},"image_cleaner_interval_hours":{"type":"number","optional":true},"kube_admin_config":{"type":["list",["object",{"client_certificate":"string","client_key":"string","cluster_ca_certificate":"string","host":"string","password":"string","username":"string"}]],"computed":true},"kube_admin_config_raw":{"type":"string","computed":true},"kube_config":{"type":["list",["object",{"client_certificate":"string","client_key":"string","cluster_ca_certificate":"string","host":"string","password":"string","username":"string"}]],"computed":true},"kube_config_raw":{"type":"string","computed":true},"kubernetes_version":{"type":"string","optional":true,"computed":true},"local_account_disabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"node_os_upgrade_channel":{"type":"string","optional":true,"default":"NodeImage"},"node_resource_group":{"type":"string","optional":true,"computed":true},"node_resource_group_id":{"type":"string","computed":true},"oidc_issuer_enabled":{"type":"bool","optional":true},"oidc_issuer_url":{"type":"string","computed":true},"open_service_mesh_enabled":{"type":"bool","optional":true},"portal_fqdn":{"type":"string","computed":true},"private_cluster_enabled":{"type":"bool","optional":true,"default":false},"private_cluster_public_fqdn_enabled":{"type":"bool","optional":true,"default":false},"private_dns_zone_id":{"type":"string","optional":true,"computed":true},"private_fqdn":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"role_based_access_control_enabled":{"type":"bool","optional":true,"default":true},"run_command_enabled":{"type":"bool","optional":true,"default":true},"sku_tier":{"type":"string","optional":true,"default":"Free"},"support_plan":{"type":"string","optional":true,"default":"KubernetesOfficial"},"tags":{"type":["map","string"],"optional":true},"workload_identity_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"aci_connector_linux":{"nesting_mode":3,"block":{"attributes":{"connector_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"subnet_name":{"type":"string","required":true}}},"optional":true},"api_server_access_profile":{"nesting_mode":3,"block":{"attributes":{"authorized_ip_ranges":{"type":["set","string"],"optional":true}}},"optional":true},"auto_scaler_profile":{"nesting_mode":3,"block":{"attributes":{"balance_similar_node_groups":{"type":"bool","optional":true,"default":false},"daemonset_eviction_for_empty_nodes_enabled":{"type":"bool","optional":true,"default":false},"daemonset_eviction_for_occupied_nodes_enabled":{"type":"bool","optional":true,"default":true},"empty_bulk_delete_max":{"type":"string","optional":true,"computed":true},"expander":{"type":"string","optional":true,"default":"random"},"ignore_daemonsets_utilization_enabled":{"type":"bool","optional":true,"default":false},"max_graceful_termination_sec":{"type":"string","optional":true,"computed":true},"max_node_provisioning_time":{"type":"string","optional":true,"default":"15m"},"max_unready_nodes":{"type":"number","optional":true,"default":3},"max_unready_percentage":{"type":"number","optional":true,"default":45},"new_pod_scale_up_delay":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_add":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_delete":{"type":"string","optional":true,"computed":true},"scale_down_delay_after_failure":{"type":"string","optional":true,"computed":true},"scale_down_unneeded":{"type":"string","optional":true,"computed":true},"scale_down_unready":{"type":"string","optional":true,"computed":true},"scale_down_utilization_threshold":{"type":"string","optional":true,"computed":true},"scan_interval":{"type":"string","optional":true,"computed":true},"skip_nodes_with_local_storage":{"type":"bool","optional":true},"skip_nodes_with_system_pods":{"type":"bool","optional":true,"default":true}}},"optional":true,"computed":true},"azure_active_directory_role_based_access_control":{"nesting_mode":3,"block":{"attributes":{"admin_group_object_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["azure_active_directory_role_based_access_control.0.tenant_id","azure_active_directory_role_based_access_control.0.admin_group_object_ids"]},"azure_rbac_enabled":{"type":"bool","optional":true},"tenant_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["azure_active_directory_role_based_access_control.0.tenant_id","azure_active_directory_role_based_access_control.0.admin_group_object_ids"]}}},"optional":true},"confidential_computing":{"nesting_mode":3,"block":{"attributes":{"sgx_quote_helper_enabled":{"type":"bool","required":true}}},"optional":true},"default_node_pool":{"nesting_mode":3,"block":{"attributes":{"auto_scaling_enabled":{"type":"bool","optional":true},"capacity_reservation_group_id":{"type":"string","optional":true},"fips_enabled":{"type":"bool","optional":true},"gpu_instance":{"type":"string","optional":true},"host_encryption_enabled":{"type":"bool","optional":true},"host_group_id":{"type":"string","optional":true},"kubelet_disk_type":{"type":"string","optional":true,"computed":true},"max_count":{"type":"number","optional":true},"max_pods":{"type":"number","optional":true,"computed":true},"min_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true},"node_labels":{"type":["map","string"],"optional":true,"computed":true},"node_public_ip_enabled":{"type":"bool","optional":true},"node_public_ip_prefix_id":{"type":"string","optional":true,"required_with":["default_node_pool.0.node_public_ip_enabled"]},"only_critical_addons_enabled":{"type":"bool","optional":true},"orchestrator_version":{"type":"string","optional":true,"computed":true},"os_disk_size_gb":{"type":"number","optional":true,"computed":true},"os_disk_type":{"type":"string","optional":true,"default":"Managed"},"os_sku":{"type":"string","optional":true,"computed":true},"pod_subnet_id":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"scale_down_mode":{"type":"string","optional":true,"default":"Delete"},"snapshot_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"temporary_name_for_rotation":{"type":"string","optional":true},"type":{"type":"string","optional":true,"default":"VirtualMachineScaleSets"},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false},"vm_size":{"type":"string","required":true},"vnet_subnet_id":{"type":"string","optional":true},"workload_runtime":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"kubelet_config":{"nesting_mode":3,"block":{"attributes":{"allowed_unsafe_sysctls":{"type":["set","string"],"optional":true},"container_log_max_line":{"type":"number","optional":true},"container_log_max_size_mb":{"type":"number","optional":true},"cpu_cfs_quota_enabled":{"type":"bool","optional":true,"default":true},"cpu_cfs_quota_period":{"type":"string","optional":true},"cpu_manager_policy":{"type":"string","optional":true},"image_gc_high_threshold":{"type":"number","optional":true},"image_gc_low_threshold":{"type":"number","optional":true},"pod_max_pid":{"type":"number","optional":true},"topology_manager_policy":{"type":"string","optional":true}}},"optional":true},"linux_os_config":{"nesting_mode":3,"block":{"attributes":{"swap_file_size_mb":{"type":"number","optional":true},"transparent_huge_page_defrag":{"type":"string","optional":true},"transparent_huge_page_enabled":{"type":"string","optional":true}},"block_types":{"sysctl_config":{"nesting_mode":3,"block":{"attributes":{"fs_aio_max_nr":{"type":"number","optional":true},"fs_file_max":{"type":"number","optional":true},"fs_inotify_max_user_watches":{"type":"number","optional":true},"fs_nr_open":{"type":"number","optional":true},"kernel_threads_max":{"type":"number","optional":true},"net_core_netdev_max_backlog":{"type":"number","optional":true},"net_core_optmem_max":{"type":"number","optional":true},"net_core_rmem_default":{"type":"number","optional":true},"net_core_rmem_max":{"type":"number","optional":true},"net_core_somaxconn":{"type":"number","optional":true},"net_core_wmem_default":{"type":"number","optional":true},"net_core_wmem_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_min":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"number","optional":true},"net_ipv4_tcp_fin_timeout":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_intvl":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_probes":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_time":{"type":"number","optional":true},"net_ipv4_tcp_max_syn_backlog":{"type":"number","optional":true},"net_ipv4_tcp_max_tw_buckets":{"type":"number","optional":true},"net_ipv4_tcp_tw_reuse":{"type":"bool","optional":true},"net_netfilter_nf_conntrack_buckets":{"type":"number","optional":true},"net_netfilter_nf_conntrack_max":{"type":"number","optional":true},"vm_max_map_count":{"type":"number","optional":true},"vm_swappiness":{"type":"number","optional":true},"vm_vfs_cache_pressure":{"type":"number","optional":true}}},"optional":true}}},"optional":true},"node_network_profile":{"nesting_mode":3,"block":{"attributes":{"application_security_group_ids":{"type":["list","string"],"optional":true},"node_public_ip_tags":{"type":["map","string"],"optional":true}},"block_types":{"allowed_host_ports":{"nesting_mode":3,"block":{"attributes":{"port_end":{"type":"number","optional":true},"port_start":{"type":"number","optional":true},"protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"upgrade_settings":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_in_minutes":{"type":"number","optional":true},"max_surge":{"type":"string","required":true},"node_soak_duration_in_minutes":{"type":"number","optional":true}}},"optional":true}}},"required":true},"http_proxy_config":{"nesting_mode":3,"block":{"attributes":{"http_proxy":{"type":"string","optional":true},"https_proxy":{"type":"string","optional":true},"no_proxy":{"type":["set","string"],"optional":true},"trusted_ca":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress_application_gateway":{"nesting_mode":3,"block":{"attributes":{"effective_gateway_id":{"type":"string","computed":true},"gateway_id":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]},"gateway_name":{"type":"string","optional":true},"ingress_application_gateway_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"subnet_cidr":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_id"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]},"subnet_id":{"type":"string","optional":true,"conflicts_with":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr"],"at_least_one_of":["ingress_application_gateway.0.gateway_id","ingress_application_gateway.0.subnet_cidr","ingress_application_gateway.0.subnet_id"]}}},"optional":true},"key_management_service":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"key_vault_network_access":{"type":"string","optional":true,"default":"Public"}}},"optional":true},"key_vault_secrets_provider":{"nesting_mode":3,"block":{"attributes":{"secret_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true},"secret_rotation_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["key_vault_secrets_provider.0.secret_rotation_enabled","key_vault_secrets_provider.0.secret_rotation_interval"]},"secret_rotation_interval":{"type":"string","optional":true,"default":"2m","at_least_one_of":["key_vault_secrets_provider.0.secret_rotation_enabled","key_vault_secrets_provider.0.secret_rotation_interval"]}}},"optional":true},"kubelet_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.object_id","kubelet_identity.0.user_assigned_identity_id","identity.0.identity_ids"]},"object_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.client_id","kubelet_identity.0.user_assigned_identity_id","identity.0.identity_ids"]},"user_assigned_identity_id":{"type":"string","optional":true,"computed":true,"required_with":["kubelet_identity.0.client_id","kubelet_identity.0.object_id","identity.0.identity_ids"]}}},"optional":true,"computed":true},"linux_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true}},"block_types":{"ssh_key":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","required":true}}},"required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"block_types":{"allowed":{"nesting_mode":4,"block":{"attributes":{"day":{"type":"string","required":true},"hours":{"type":["set","number"],"required":true}}},"optional":true,"at_least_one_of":["maintenance_window.0.allowed","maintenance_window.0.not_allowed"]},"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["maintenance_window.0.allowed","maintenance_window.0.not_allowed"]}}},"optional":true},"maintenance_window_auto_upgrade":{"nesting_mode":3,"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"day_of_week":{"type":"string","optional":true},"duration":{"type":"number","required":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_date":{"type":"string","optional":true,"computed":true},"start_time":{"type":"string","optional":true},"utc_offset":{"type":"string","optional":true},"week_index":{"type":"string","optional":true}},"block_types":{"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true},"maintenance_window_node_os":{"nesting_mode":3,"block":{"attributes":{"day_of_month":{"type":"number","optional":true},"day_of_week":{"type":"string","optional":true},"duration":{"type":"number","required":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_date":{"type":"string","optional":true,"computed":true},"start_time":{"type":"string","optional":true},"utc_offset":{"type":"string","optional":true},"week_index":{"type":"string","optional":true}},"block_types":{"not_allowed":{"nesting_mode":4,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true},"microsoft_defender":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true}}},"optional":true},"monitor_metrics":{"nesting_mode":3,"block":{"attributes":{"annotations_allowed":{"type":"string","optional":true},"labels_allowed":{"type":"string","optional":true}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"dns_service_ip":{"type":"string","optional":true,"computed":true},"ip_versions":{"type":["list","string"],"optional":true,"computed":true},"load_balancer_sku":{"type":"string","optional":true,"default":"standard"},"network_data_plane":{"type":"string","optional":true,"default":"azure"},"network_mode":{"type":"string","optional":true,"computed":true},"network_plugin":{"type":"string","required":true},"network_plugin_mode":{"type":"string","optional":true},"network_policy":{"type":"string","optional":true,"computed":true},"outbound_type":{"type":"string","optional":true,"default":"loadBalancer"},"pod_cidr":{"type":"string","optional":true,"computed":true},"pod_cidrs":{"type":["list","string"],"optional":true,"computed":true},"service_cidr":{"type":"string","optional":true,"computed":true},"service_cidrs":{"type":["list","string"],"optional":true,"computed":true}},"block_types":{"load_balancer_profile":{"nesting_mode":3,"block":{"attributes":{"backend_pool_type":{"type":"string","optional":true,"default":"NodeIPConfiguration"},"effective_outbound_ips":{"type":["set","string"],"computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":30},"managed_outbound_ip_count":{"type":"number","optional":true,"computed":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"managed_outbound_ipv6_count":{"type":"number","optional":true,"computed":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"outbound_ip_address_ids":{"type":["set","string"],"optional":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.managed_outbound_ip_count","network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids"]},"outbound_ip_prefix_ids":{"type":["set","string"],"optional":true,"conflicts_with":["network_profile.0.load_balancer_profile.0.managed_outbound_ip_count","network_profile.0.load_balancer_profile.0.outbound_ip_address_ids"]},"outbound_ports_allocated":{"type":"number","optional":true,"default":0}}},"optional":true,"computed":true},"nat_gateway_profile":{"nesting_mode":3,"block":{"attributes":{"effective_outbound_ips":{"type":["set","string"],"computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"managed_outbound_ip_count":{"type":"number","optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"oms_agent":{"nesting_mode":3,"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"msi_auth_for_monitoring_enabled":{"type":"bool","optional":true},"oms_agent_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true}}},"optional":true},"service_mesh_profile":{"nesting_mode":3,"block":{"attributes":{"external_ingress_gateway_enabled":{"type":"bool","optional":true},"internal_ingress_gateway_enabled":{"type":"bool","optional":true},"mode":{"type":"string","required":true},"revisions":{"type":["list","string"],"required":true}},"block_types":{"certificate_authority":{"nesting_mode":3,"block":{"attributes":{"cert_chain_object_name":{"type":"string","required":true},"cert_object_name":{"type":"string","required":true},"key_object_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"root_cert_object_name":{"type":"string","required":true}}},"optional":true}}},"optional":true},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["identity","service_principal"]},"storage_profile":{"nesting_mode":3,"block":{"attributes":{"blob_driver_enabled":{"type":"bool","optional":true,"default":false},"disk_driver_enabled":{"type":"bool","optional":true,"default":true},"file_driver_enabled":{"type":"bool","optional":true,"default":true},"snapshot_controller_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"upgrade_override":{"nesting_mode":3,"block":{"attributes":{"effective_until":{"type":"string","optional":true},"force_upgrade_enabled":{"type":"bool","required":true}}},"optional":true},"web_app_routing":{"nesting_mode":3,"block":{"attributes":{"dns_zone_ids":{"type":["list","string"],"required":true},"web_app_routing_identity":{"type":["list",["object",{"client_id":"string","object_id":"string","user_assigned_identity_id":"string"}]],"computed":true}}},"optional":true},"windows_profile":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"license":{"type":"string","optional":true}},"block_types":{"gmsa":{"nesting_mode":3,"block":{"attributes":{"dns_server":{"type":"string","required":true},"root_domain":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"workload_autoscaler_profile":{"nesting_mode":3,"block":{"attributes":{"keda_enabled":{"type":"bool","optional":true,"default":false},"vertical_pod_autoscaler_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}}},"azurerm_kubernetes_cluster_extension":{"block":{"attributes":{"aks_assigned_identity":{"type":["list",["object",{"principal_id":"string","tenant_id":"string","type":"string"}]],"computed":true},"cluster_id":{"type":"string","required":true},"configuration_protected_settings":{"type":["map","string"],"optional":true},"configuration_settings":{"type":["map","string"],"optional":true},"current_version":{"type":"string","computed":true},"extension_type":{"type":"string","required":true},"name":{"type":"string","required":true},"release_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["target_namespace"]},"release_train":{"type":"string","optional":true,"computed":true,"conflicts_with":["version"]},"target_namespace":{"type":"string","optional":true,"computed":true,"conflicts_with":["release_namespace"]},"version":{"type":"string","optional":true,"conflicts_with":["release_train"]}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"version":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_kubernetes_cluster_node_pool":{"block":{"attributes":{"auto_scaling_enabled":{"type":"bool","optional":true},"capacity_reservation_group_id":{"type":"string","optional":true},"eviction_policy":{"type":"string","optional":true},"fips_enabled":{"type":"bool","optional":true},"gpu_instance":{"type":"string","optional":true},"host_encryption_enabled":{"type":"bool","optional":true},"host_group_id":{"type":"string","optional":true},"kubelet_disk_type":{"type":"string","optional":true,"computed":true},"kubernetes_cluster_id":{"type":"string","required":true},"max_count":{"type":"number","optional":true},"max_pods":{"type":"number","optional":true,"computed":true},"min_count":{"type":"number","optional":true},"mode":{"type":"string","optional":true,"default":"User"},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true},"node_labels":{"type":["map","string"],"optional":true,"computed":true},"node_public_ip_enabled":{"type":"bool","optional":true},"node_public_ip_prefix_id":{"type":"string","optional":true,"required_with":["node_public_ip_enabled"]},"node_taints":{"type":["list","string"],"optional":true},"orchestrator_version":{"type":"string","optional":true,"computed":true},"os_disk_size_gb":{"type":"number","optional":true,"computed":true},"os_disk_type":{"type":"string","optional":true,"default":"Managed"},"os_sku":{"type":"string","optional":true,"computed":true},"os_type":{"type":"string","optional":true,"default":"Linux"},"pod_subnet_id":{"type":"string","optional":true},"priority":{"type":"string","optional":true,"default":"Regular"},"proximity_placement_group_id":{"type":"string","optional":true},"scale_down_mode":{"type":"string","optional":true,"default":"Delete"},"snapshot_id":{"type":"string","optional":true},"spot_max_price":{"type":"number","optional":true,"default":-1},"tags":{"type":["map","string"],"optional":true},"temporary_name_for_rotation":{"type":"string","optional":true},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false},"vm_size":{"type":"string","required":true},"vnet_subnet_id":{"type":"string","optional":true},"workload_runtime":{"type":"string","optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"kubelet_config":{"nesting_mode":3,"block":{"attributes":{"allowed_unsafe_sysctls":{"type":["set","string"],"optional":true},"container_log_max_line":{"type":"number","optional":true},"container_log_max_size_mb":{"type":"number","optional":true},"cpu_cfs_quota_enabled":{"type":"bool","optional":true,"default":true},"cpu_cfs_quota_period":{"type":"string","optional":true},"cpu_manager_policy":{"type":"string","optional":true},"image_gc_high_threshold":{"type":"number","optional":true},"image_gc_low_threshold":{"type":"number","optional":true},"pod_max_pid":{"type":"number","optional":true},"topology_manager_policy":{"type":"string","optional":true}}},"optional":true},"linux_os_config":{"nesting_mode":3,"block":{"attributes":{"swap_file_size_mb":{"type":"number","optional":true},"transparent_huge_page_defrag":{"type":"string","optional":true},"transparent_huge_page_enabled":{"type":"string","optional":true}},"block_types":{"sysctl_config":{"nesting_mode":3,"block":{"attributes":{"fs_aio_max_nr":{"type":"number","optional":true},"fs_file_max":{"type":"number","optional":true},"fs_inotify_max_user_watches":{"type":"number","optional":true},"fs_nr_open":{"type":"number","optional":true},"kernel_threads_max":{"type":"number","optional":true},"net_core_netdev_max_backlog":{"type":"number","optional":true},"net_core_optmem_max":{"type":"number","optional":true},"net_core_rmem_default":{"type":"number","optional":true},"net_core_rmem_max":{"type":"number","optional":true},"net_core_somaxconn":{"type":"number","optional":true},"net_core_wmem_default":{"type":"number","optional":true},"net_core_wmem_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_max":{"type":"number","optional":true},"net_ipv4_ip_local_port_range_min":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh1":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh2":{"type":"number","optional":true},"net_ipv4_neigh_default_gc_thresh3":{"type":"number","optional":true},"net_ipv4_tcp_fin_timeout":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_intvl":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_probes":{"type":"number","optional":true},"net_ipv4_tcp_keepalive_time":{"type":"number","optional":true},"net_ipv4_tcp_max_syn_backlog":{"type":"number","optional":true},"net_ipv4_tcp_max_tw_buckets":{"type":"number","optional":true},"net_ipv4_tcp_tw_reuse":{"type":"bool","optional":true},"net_netfilter_nf_conntrack_buckets":{"type":"number","optional":true},"net_netfilter_nf_conntrack_max":{"type":"number","optional":true},"vm_max_map_count":{"type":"number","optional":true},"vm_swappiness":{"type":"number","optional":true},"vm_vfs_cache_pressure":{"type":"number","optional":true}}},"optional":true}}},"optional":true},"node_network_profile":{"nesting_mode":3,"block":{"attributes":{"application_security_group_ids":{"type":["list","string"],"optional":true},"node_public_ip_tags":{"type":["map","string"],"optional":true}},"block_types":{"allowed_host_ports":{"nesting_mode":3,"block":{"attributes":{"port_end":{"type":"number","optional":true},"port_start":{"type":"number","optional":true},"protocol":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"upgrade_settings":{"nesting_mode":3,"block":{"attributes":{"drain_timeout_in_minutes":{"type":"number","optional":true},"max_surge":{"type":"string","required":true},"node_soak_duration_in_minutes":{"type":"number","optional":true}}},"optional":true},"windows_profile":{"nesting_mode":3,"block":{"attributes":{"outbound_nat_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_kubernetes_cluster_trusted_access_role_binding":{"block":{"attributes":{"kubernetes_cluster_id":{"type":"string","required":true},"name":{"type":"string","required":true},"roles":{"type":["list","string"],"required":true},"source_resource_id":{"type":"string","required":true}}}},"azurerm_kubernetes_fleet_manager":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"hub_profile":{"nesting_mode":3,"block":{"attributes":{"dns_prefix":{"type":"string","required":true},"fqdn":{"type":"string","computed":true},"kubernetes_version":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_kubernetes_fleet_member":{"block":{"attributes":{"group":{"type":"string","optional":true},"kubernetes_cluster_id":{"type":"string","required":true},"kubernetes_fleet_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_kubernetes_fleet_update_run":{"block":{"attributes":{"fleet_update_strategy_id":{"type":"string","optional":true,"conflicts_with":["stage"]},"kubernetes_fleet_manager_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"managed_cluster_update":{"nesting_mode":3,"block":{"block_types":{"node_image_selection":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"upgrade":{"nesting_mode":3,"block":{"attributes":{"kubernetes_version":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}},"required":true},"stage":{"nesting_mode":3,"block":{"attributes":{"after_stage_wait_in_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true}},"block_types":{"group":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"optional":true,"conflicts_with":["fleet_update_strategy_id"]}}}},"azurerm_kubernetes_fleet_update_strategy":{"block":{"attributes":{"kubernetes_fleet_manager_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"stage":{"nesting_mode":3,"block":{"attributes":{"after_stage_wait_in_seconds":{"type":"number","optional":true},"name":{"type":"string","required":true}},"block_types":{"group":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_kubernetes_flux_configuration":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"continuous_reconciliation_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"namespace":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"namespace"}},"block_types":{"blob_storage":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"container_id":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sas_token":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600}},"block_types":{"managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_certificate_base64":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"client_certificate_password":{"type":"string","optional":true,"required_with":["blob_storage.0.service_principal.0.client_certificate_base64"]},"client_certificate_send_chain":{"type":"bool","optional":true,"default":false},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["blob_storage.0.service_principal.0.client_certificate_base64","blob_storage.0.service_principal.0.client_secret"]},"tenant_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage.0.account_key","blob_storage.0.local_auth_reference","blob_storage.0.managed_identity","blob_storage.0.sas_token","blob_storage.0.service_principal"]}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"bucket":{"nesting_mode":3,"block":{"attributes":{"access_key":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"],"required_with":["bucket.0.secret_key_base64"]},"bucket_name":{"type":"string","required":true},"local_auth_reference":{"type":"string","optional":true,"exactly_one_of":["bucket.0.access_key","bucket.0.local_auth_reference"]},"secret_key_base64":{"type":"string","optional":true,"required_with":["bucket.0.access_key"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"tls_enabled":{"type":"bool","optional":true,"default":true},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"git_repository":{"nesting_mode":3,"block":{"attributes":{"https_ca_cert_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_key_base64":{"type":"string","optional":true,"required_with":["git_repository.0.https_user"]},"https_user":{"type":"string","optional":true,"conflicts_with":["git_repository.0.local_auth_reference","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"],"required_with":["git_repository.0.https_key_base64"]},"local_auth_reference":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.ssh_private_key_base64","git_repository.0.ssh_known_hosts_base64"]},"reference_type":{"type":"string","required":true},"reference_value":{"type":"string","required":true},"ssh_known_hosts_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"ssh_private_key_base64":{"type":"string","optional":true,"conflicts_with":["git_repository.0.https_user","git_repository.0.local_auth_reference"]},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"url":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["blob_storage","bucket","git_repository"]},"kustomizations":{"nesting_mode":4,"block":{"attributes":{"depends_on":{"type":["list","string"],"optional":true},"garbage_collection_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"path":{"type":"string","optional":true},"recreating_enabled":{"type":"bool","optional":true,"default":false},"retry_interval_in_seconds":{"type":"number","optional":true,"default":600},"sync_interval_in_seconds":{"type":"number","optional":true,"default":600},"timeout_in_seconds":{"type":"number","optional":true,"default":600},"wait":{"type":"bool","optional":true,"default":true}},"block_types":{"post_build":{"nesting_mode":3,"block":{"attributes":{"substitute":{"type":["map","string"],"optional":true}},"block_types":{"substitute_from":{"nesting_mode":3,"block":{"attributes":{"kind":{"type":"string","required":true},"name":{"type":"string","required":true},"optional":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}},"required":true}}}},"azurerm_kusto_attached_database_configuration":{"block":{"attributes":{"attached_database_names":{"type":["list","string"],"computed":true},"cluster_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["cluster_id","cluster_resource_id"]},"cluster_name":{"type":"string","required":true},"cluster_resource_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["cluster_id","cluster_resource_id"]},"database_name":{"type":"string","required":true},"default_principal_modification_kind":{"type":"string","optional":true,"default":"None"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"sharing":{"nesting_mode":3,"block":{"attributes":{"external_tables_to_exclude":{"type":["set","string"],"optional":true},"external_tables_to_include":{"type":["set","string"],"optional":true},"materialized_views_to_exclude":{"type":["set","string"],"optional":true},"materialized_views_to_include":{"type":["set","string"],"optional":true},"tables_to_exclude":{"type":["set","string"],"optional":true},"tables_to_include":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_kusto_cluster":{"block":{"attributes":{"allowed_fqdns":{"type":["list","string"],"optional":true},"allowed_ip_ranges":{"type":["list","string"],"optional":true},"auto_stop_enabled":{"type":"bool","optional":true,"default":true},"data_ingestion_uri":{"type":"string","computed":true},"disk_encryption_enabled":{"type":"bool","optional":true,"default":false},"double_encryption_enabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_network_access_restricted":{"type":"bool","optional":true,"default":false},"public_ip_type":{"type":"string","optional":true,"default":"IPv4"},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purge_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"streaming_ingestion_enabled":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"trusted_external_tenants":{"type":["list","string"],"optional":true,"computed":true},"uri":{"type":"string","computed":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"language_extensions":{"nesting_mode":3,"block":{"attributes":{"image":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"optimized_auto_scale":{"nesting_mode":3,"block":{"attributes":{"maximum_instances":{"type":"number","required":true},"minimum_instances":{"type":"number","required":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true}}},"required":true},"virtual_network_configuration":{"nesting_mode":3,"block":{"attributes":{"data_management_public_ip_id":{"type":"string","required":true},"engine_public_ip_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_kusto_cluster_customer_managed_key":{"block":{"attributes":{"cluster_id":{"type":"string","required":true},"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"key_version":{"type":"string","optional":true},"user_identity":{"type":"string","optional":true}}}},"azurerm_kusto_cluster_managed_private_endpoint":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"private_link_resource_id":{"type":"string","required":true},"private_link_resource_region":{"type":"string","optional":true},"request_message":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_kusto_cluster_principal_assignment":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"principal_name":{"type":"string","computed":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role":{"type":"string","required":true},"tenant_id":{"type":"string","required":true},"tenant_name":{"type":"string","computed":true}}}},"azurerm_kusto_cosmosdb_data_connection":{"block":{"attributes":{"cosmosdb_container_id":{"type":"string","required":true},"kusto_database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_identity_id":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"retrieval_start_date":{"type":"string","optional":true},"table_name":{"type":"string","required":true}}}},"azurerm_kusto_database":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"hot_cache_period":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size":{"type":"number","computed":true},"soft_delete_period":{"type":"string","optional":true}}}},"azurerm_kusto_database_principal_assignment":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"database_name":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","required":true},"principal_name":{"type":"string","computed":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"role":{"type":"string","required":true},"tenant_id":{"type":"string","required":true},"tenant_name":{"type":"string","computed":true}}}},"azurerm_kusto_eventgrid_data_connection":{"block":{"attributes":{"blob_storage_event_type":{"type":"string","optional":true,"default":"Microsoft.Storage.BlobCreated"},"cluster_name":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"eventgrid_event_subscription_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["eventgrid_resource_id"]},"eventgrid_resource_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["eventgrid_event_subscription_id"]},"eventhub_consumer_group_name":{"type":"string","required":true},"eventhub_id":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_identity_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["managed_identity_resource_id"]},"managed_identity_resource_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["managed_identity_id"]},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"skip_first_record":{"type":"bool","optional":true,"default":false},"storage_account_id":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_eventhub_data_connection":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"compression":{"type":"string","optional":true,"default":"None"},"consumer_group":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"event_system_properties":{"type":["list","string"],"optional":true,"computed":true},"eventhub_id":{"type":"string","required":true},"identity_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_iothub_data_connection":{"block":{"attributes":{"cluster_name":{"type":"string","required":true},"consumer_group":{"type":"string","required":true},"data_format":{"type":"string","optional":true},"database_name":{"type":"string","required":true},"database_routing_type":{"type":"string","optional":true,"default":"Single"},"event_system_properties":{"type":["set","string"],"optional":true},"iothub_id":{"type":"string","required":true},"location":{"type":"string","required":true},"mapping_rule_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shared_access_policy_name":{"type":"string","required":true},"table_name":{"type":"string","optional":true}}}},"azurerm_kusto_script":{"block":{"attributes":{"continue_on_errors_enabled":{"type":"bool","optional":true,"default":false},"database_id":{"type":"string","required":true},"force_an_update_when_value_changed":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"sas_token":{"type":"string","optional":true,"required_with":["url"]},"script_content":{"type":"string","optional":true,"exactly_one_of":["url","script_content"]},"url":{"type":"string","optional":true,"exactly_one_of":["url","script_content"],"required_with":["sas_token"]}}}},"azurerm_lb":{"block":{"attributes":{"edge_zone":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"string","optional":true,"computed":true},"id":{"type":"string","computed":true},"inbound_nat_rules":{"type":["set","string"],"computed":true},"load_balancer_rules":{"type":["set","string"],"computed":true},"name":{"type":"string","required":true},"outbound_rules":{"type":["set","string"],"computed":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","optional":true,"computed":true},"private_ip_address_version":{"type":"string","optional":true,"computed":true},"public_ip_address_id":{"type":"string","optional":true,"computed":true},"public_ip_prefix_id":{"type":"string","optional":true,"computed":true},"subnet_id":{"type":"string","optional":true,"computed":true},"zones":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_lb_backend_address_pool":{"block":{"attributes":{"backend_ip_configurations":{"type":["list","string"],"computed":true},"inbound_nat_rules":{"type":["list","string"],"computed":true},"load_balancing_rules":{"type":["list","string"],"computed":true},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_rules":{"type":["list","string"],"computed":true},"synchronous_mode":{"type":"string","optional":true,"required_with":["virtual_network_id"]},"virtual_network_id":{"type":"string","optional":true}},"block_types":{"tunnel_interface":{"nesting_mode":3,"block":{"attributes":{"identifier":{"type":"number","required":true},"port":{"type":"number","required":true},"protocol":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_lb_backend_address_pool_address":{"block":{"attributes":{"backend_address_ip_configuration_id":{"type":"string","optional":true,"conflicts_with":["virtual_network_id"]},"backend_address_pool_id":{"type":"string","required":true},"inbound_nat_rule_port_mapping":{"type":["list",["object",{"backend_port":"number","frontend_port":"number","inbound_nat_rule_name":"string"}]],"computed":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true,"conflicts_with":["backend_address_ip_configuration_id"]}}}},"azurerm_lb_nat_pool":{"block":{"attributes":{"backend_port":{"type":"number","required":true},"floating_ip_enabled":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port_end":{"type":"number","required":true},"frontend_port_start":{"type":"number","required":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tcp_reset_enabled":{"type":"bool","optional":true}}}},"azurerm_lb_nat_rule":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","optional":true,"conflicts_with":["frontend_port"],"required_with":["frontend_port_start","frontend_port_end"]},"backend_ip_configuration_id":{"type":"string","computed":true},"backend_port":{"type":"number","required":true},"enable_floating_ip":{"type":"bool","optional":true,"computed":true},"enable_tcp_reset":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port":{"type":"number","optional":true,"conflicts_with":["frontend_port_start","frontend_port_end","backend_address_pool_id"]},"frontend_port_end":{"type":"number","optional":true,"conflicts_with":["frontend_port"],"required_with":["backend_address_pool_id","frontend_port_start"]},"frontend_port_start":{"type":"number","optional":true,"conflicts_with":["frontend_port"],"required_with":["backend_address_pool_id","frontend_port_end"]},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_lb_outbound_rule":{"block":{"attributes":{"allocated_outbound_ports":{"type":"number","optional":true,"default":1024},"backend_address_pool_id":{"type":"string","required":true},"enable_tcp_reset":{"type":"bool","optional":true,"default":false},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"frontend_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_lb_probe":{"block":{"attributes":{"interval_in_seconds":{"type":"number","optional":true,"default":15},"load_balancer_rules":{"type":["set","string"],"computed":true},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"number_of_probes":{"type":"number","optional":true,"default":2},"port":{"type":"number","required":true},"probe_threshold":{"type":"number","optional":true,"default":1},"protocol":{"type":"string","optional":true,"default":"Tcp"},"request_path":{"type":"string","optional":true}}}},"azurerm_lb_rule":{"block":{"attributes":{"backend_address_pool_ids":{"type":["list","string"],"optional":true},"backend_port":{"type":"number","required":true},"disable_outbound_snat":{"type":"bool","optional":true,"default":false},"enable_floating_ip":{"type":"bool","optional":true,"default":false},"enable_tcp_reset":{"type":"bool","optional":true},"frontend_ip_configuration_id":{"type":"string","computed":true},"frontend_ip_configuration_name":{"type":"string","required":true},"frontend_port":{"type":"number","required":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"load_distribution":{"type":"string","optional":true,"default":"Default"},"loadbalancer_id":{"type":"string","required":true},"name":{"type":"string","required":true},"probe_id":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}}},"azurerm_lighthouse_assignment":{"block":{"attributes":{"lighthouse_definition_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"scope":{"type":"string","required":true}}}},"azurerm_lighthouse_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"lighthouse_definition_id":{"type":"string","optional":true,"computed":true},"managing_tenant_id":{"type":"string","required":true},"name":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"authorization":{"nesting_mode":4,"block":{"attributes":{"delegated_role_definition_ids":{"type":["set","string"],"optional":true},"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true}}},"required":true},"eligible_authorization":{"nesting_mode":4,"block":{"attributes":{"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"role_definition_id":{"type":"string","required":true}},"block_types":{"just_in_time_access_policy":{"nesting_mode":3,"block":{"attributes":{"maximum_activation_duration":{"type":"string","optional":true,"default":"PT8H"},"multi_factor_auth_provider":{"type":"string","optional":true}},"block_types":{"approver":{"nesting_mode":4,"block":{"attributes":{"principal_display_name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_function_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_backup_restore_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":false},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"default":false,"conflicts_with":["site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}},"block_types":{"docker":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"image_tag":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_function_app_slot":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_backup_restore_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"default":0},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":false},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"default":false,"conflicts_with":["site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}},"block_types":{"docker":{"nesting_mode":3,"block":{"attributes":{"image_name":{"type":"string","required":true},"image_tag":{"type":"string","required":true},"registry_password":{"type":"string","optional":true},"registry_url":{"type":"string","required":true},"registry_username":{"type":"string","optional":true}}},"optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.docker","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_virtual_machine":{"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"allow_extension_operations":{"type":"bool","optional":true,"default":true},"availability_set_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id","virtual_machine_scale_set_id","zone"]},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"bool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id","proximity_placement_group_id"]},"computer_name":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"dedicated_host_group_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_id"]},"dedicated_host_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_group_id"]},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"disk_controller_type":{"type":"string","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"ImageDefault"},"platform_fault_domain":{"type":"number","optional":true,"default":-1,"required_with":["virtual_machine_scale_set_id"]},"priority":{"type":"string","optional":true,"default":"Regular"},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"public_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"reboot_setting":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"size":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"user_data":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","computed":true},"virtual_machine_scale_set_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id"]},"vm_agent_platform_updates_enabled":{"type":"bool","optional":true,"computed":true},"vtpm_enabled":{"type":"bool","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"hibernation_enabled":{"type":"bool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"bool","optional":true,"default":false},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"id":{"type":"string","computed":true},"name":{"type":"string","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"os_image_notification":{"nesting_mode":3,"block":{"attributes":{"timeout":{"type":"string","optional":true,"default":"PT15M"}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_linux_virtual_machine_scale_set":{"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"do_not_run_extensions_on_overprovisioned_machines":{"type":"bool","optional":true,"default":false},"edge_zone":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"health_probe_id":{"type":"string","optional":true},"host_group_id":{"type":"string","optional":true},"instances":{"type":"number","optional":true,"default":0},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"platform_fault_domain_count":{"type":"number","optional":true,"computed":true},"priority":{"type":"string","optional":true,"default":"Regular"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"sku":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"unique_id":{"type":"string","computed":true},"upgrade_mode":{"type":"string","optional":true,"default":"Manual"},"user_data":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"automatic_os_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"disable_automatic_rollback":{"type":"bool","required":true},"enable_automatic_os_upgrade":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"cross_zone_upgrades_enabled":{"type":"bool","optional":true},"max_batch_instance_percent":{"type":"number","required":true},"max_unhealthy_instance_percent":{"type":"number","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"number","required":true},"maximum_surge_instances_enabled":{"type":"bool","optional":true},"pause_time_between_batches":{"type":"string","required":true},"prioritize_unhealthy_instances_enabled":{"type":"bool","optional":true}}},"optional":true},"scale_in":{"nesting_mode":3,"block":{"attributes":{"force_deletion_enabled":{"type":"bool","optional":true,"default":false},"rule":{"type":"string","optional":true,"default":"Default"}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"spot_restore":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timeout":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true,"computed":true},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_linux_web_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_backup_restore_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"docker_image_name":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"go_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"java_server":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server_version"]},"java_server_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"],"required_with":["site_config.0.application_stack.0.java_server_version","site_config.0.application_stack.0.java_server"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"php_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"ruby_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_linux_web_app_slot":{"block":{"attributes":{"app_metadata":{"type":["map","string"],"computed":true},"app_service_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_backup_restore_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"docker_image_name":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"go_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"java_server":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server_version"]},"java_server_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.java_server"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"],"required_with":["site_config.0.application_stack.0.java_server_version","site_config.0.application_stack.0.java_server"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"php_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"python_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]},"ruby_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python_version","site_config.0.application_stack.0.ruby_version","site_config.0.application_stack.0.go_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_load_test":{"block":{"attributes":{"data_plane_uri":{"type":"string","computed":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_id":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_local_network_gateway":{"block":{"attributes":{"address_space":{"type":["list","string"],"optional":true},"gateway_address":{"type":"string","optional":true,"exactly_one_of":["gateway_address","gateway_fqdn"]},"gateway_fqdn":{"type":"string","optional":true,"exactly_one_of":["gateway_address","gateway_fqdn"]},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"bgp_peering_address":{"type":"string","required":true},"peer_weight":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_log_analytics_cluster":{"block":{"attributes":{"cluster_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"size_gb":{"type":"number","optional":true,"default":100},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_log_analytics_cluster_customer_managed_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"log_analytics_cluster_id":{"type":"string","required":true}}}},"azurerm_log_analytics_data_export_rule":{"block":{"attributes":{"destination_resource_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":false},"export_rule_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"table_names":{"type":["set","string"],"required":true},"workspace_resource_id":{"type":"string","required":true}}}},"azurerm_log_analytics_datasource_windows_event":{"block":{"attributes":{"event_log_name":{"type":"string","required":true},"event_types":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workspace_name":{"type":"string","required":true}}}},"azurerm_log_analytics_datasource_windows_performance_counter":{"block":{"attributes":{"counter_name":{"type":"string","required":true},"instance_name":{"type":"string","required":true},"interval_seconds":{"type":"number","required":true},"name":{"type":"string","required":true},"object_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"workspace_name":{"type":"string","required":true}}}},"azurerm_log_analytics_linked_service":{"block":{"attributes":{"name":{"type":"string","computed":true},"read_access_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["read_access_id","write_access_id"]},"resource_group_name":{"type":"string","required":true},"workspace_id":{"type":"string","required":true},"write_access_id":{"type":"string","optional":true,"exactly_one_of":["read_access_id","write_access_id"]}}}},"azurerm_log_analytics_linked_storage_account":{"block":{"attributes":{"data_source_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_ids":{"type":["set","string"],"required":true},"workspace_resource_id":{"type":"string","required":true}}}},"azurerm_log_analytics_query_pack":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_query_pack_query":{"block":{"attributes":{"additional_settings_json":{"type":"string","optional":true},"body":{"type":"string","required":true},"categories":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"name":{"type":"string","optional":true,"computed":true},"query_pack_id":{"type":"string","required":true},"resource_types":{"type":["list","string"],"optional":true},"solutions":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_saved_search":{"block":{"attributes":{"category":{"type":"string","required":true},"display_name":{"type":"string","required":true},"function_alias":{"type":"string","optional":true},"function_parameters":{"type":["list","string"],"optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_log_analytics_solution":{"block":{"attributes":{"location":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"solution_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_name":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","computed":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true}}},"required":true}}}},"azurerm_log_analytics_storage_insights":{"block":{"attributes":{"blob_container_names":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"table_names":{"type":["set","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_log_analytics_workspace":{"block":{"attributes":{"allow_resource_only_permissions":{"type":"bool","optional":true,"default":true},"cmk_for_query_forced":{"type":"bool","optional":true},"daily_quota_gb":{"type":"number","optional":true,"default":-1},"data_collection_rule_id":{"type":"string","optional":true},"immediate_data_purge_on_30_days_enabled":{"type":"bool","optional":true},"internet_ingestion_enabled":{"type":"bool","optional":true,"default":true},"internet_query_enabled":{"type":"bool","optional":true,"default":true},"local_authentication_disabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_shared_key":{"type":"string","computed":true},"reservation_capacity_in_gb_per_day":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"retention_in_days":{"type":"number","optional":true,"computed":true},"secondary_shared_key":{"type":"string","computed":true},"sku":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_log_analytics_workspace_table":{"block":{"attributes":{"name":{"type":"string","required":true},"plan":{"type":"string","optional":true,"default":"Analytics"},"retention_in_days":{"type":"number","optional":true},"total_retention_in_days":{"type":"number","optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_logic_app_action_custom":{"block":{"attributes":{"body":{"type":"string","required":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_logic_app_action_http":{"block":{"attributes":{"body":{"type":"string","optional":true},"headers":{"type":["map","string"],"optional":true},"logic_app_id":{"type":"string","required":true},"method":{"type":"string","required":true},"name":{"type":"string","required":true},"queries":{"type":["map","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"run_after":{"nesting_mode":4,"block":{"attributes":{"action_name":{"type":"string","required":true},"action_result":{"type":"string","required":true}}},"optional":true}}}},"azurerm_logic_app_integration_account":{"block":{"attributes":{"integration_service_environment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_logic_app_integration_account_agreement":{"block":{"attributes":{"agreement_type":{"type":"string","required":true},"content":{"type":"string","required":true},"guest_partner_name":{"type":"string","required":true},"host_partner_name":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"guest_identity":{"nesting_mode":3,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true},"host_identity":{"nesting_mode":3,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_logic_app_integration_account_assembly":{"block":{"attributes":{"assembly_name":{"type":"string","required":true},"assembly_version":{"type":"string","optional":true,"default":"0.0.0.0"},"content":{"type":"string","optional":true,"at_least_one_of":["content","content_link_uri"]},"content_link_uri":{"type":"string","optional":true,"at_least_one_of":["content","content_link_uri"]},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_batch_configuration":{"block":{"attributes":{"batch_group_name":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"release_criteria":{"nesting_mode":3,"block":{"attributes":{"batch_size":{"type":"number","optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]},"message_count":{"type":"number","optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","optional":true},"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"start_time":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"hours":{"type":["set","number"],"optional":true},"minutes":{"type":["set","number"],"optional":true},"month_days":{"type":["set","number"],"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.week_days"]},"week_days":{"type":["set","string"],"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.month_days","release_criteria.0.recurrence.0.schedule.0.monthly"]}},"block_types":{"monthly":{"nesting_mode":4,"block":{"attributes":{"week":{"type":"number","required":true},"weekday":{"type":"string","required":true}}},"optional":true,"conflicts_with":["release_criteria.0.recurrence.0.schedule.0.week_days"]}}},"optional":true}}},"optional":true,"at_least_one_of":["release_criteria.0.batch_size","release_criteria.0.message_count","release_criteria.0.recurrence"]}}},"required":true}}}},"azurerm_logic_app_integration_account_certificate":{"block":{"attributes":{"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"public_certificate":{"type":"string","optional":true,"at_least_one_of":["key_vault_key"]},"resource_group_name":{"type":"string","required":true}},"block_types":{"key_vault_key":{"nesting_mode":3,"block":{"attributes":{"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"key_version":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["public_certificate"]}}}},"azurerm_logic_app_integration_account_map":{"block":{"attributes":{"content":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"map_type":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_partner":{"block":{"attributes":{"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"business_identity":{"nesting_mode":4,"block":{"attributes":{"qualifier":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_logic_app_integration_account_schema":{"block":{"attributes":{"content":{"type":"string","required":true},"file_name":{"type":"string","optional":true},"integration_account_name":{"type":"string","required":true},"metadata":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_integration_account_session":{"block":{"attributes":{"content":{"type":"string","required":true},"integration_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_logic_app_standard":{"block":{"attributes":{"app_service_plan_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true,"computed":true},"bundle_version":{"type":"string","optional":true,"default":"[1.*, 2.0.0)"},"client_affinity_enabled":{"type":"bool","optional":true,"computed":true},"client_certificate_mode":{"type":"string","optional":true},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"https_only":{"type":"bool","optional":true,"default":false},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"scm_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"site_credential":{"type":["list",["object",{"password":"string","username":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"storage_account_share_name":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"use_extension_bundle":{"type":"bool","optional":true,"default":true},"version":{"type":"string","optional":true,"default":"~4"},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_content_share_enabled":{"type":"bool","optional":true}},"block_types":{"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":false},"app_scale_limit":{"type":"number","optional":true,"computed":true},"auto_swap_slot_name":{"type":"string","computed":true},"dotnet_framework_version":{"type":"string","optional":true,"default":"v4.0"},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"computed":true},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"linux_fx_version":{"type":"string","optional":true,"computed":true},"min_tls_version":{"type":"string","optional":true,"computed":true},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true,"default":false},"scm_ip_restriction":{"type":["list",["object",{"action":"string","headers":["list",["object",{"x_azure_fdid":["set","string"],"x_fd_health_probe":["set","string"],"x_forwarded_for":["set","string"],"x_forwarded_host":["set","string"]}]],"ip_address":"string","name":"string","priority":"number","service_tag":"string","virtual_network_subnet_id":"string"}]],"optional":true,"computed":true},"scm_min_tls_version":{"type":"string","optional":true,"computed":true},"scm_type":{"type":"string","optional":true,"computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker_process":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"computed":true},"websockets_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_logic_app_trigger_custom":{"block":{"attributes":{"body":{"type":"string","required":true},"callback_url":{"type":"string","computed":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_logic_app_trigger_http_request":{"block":{"attributes":{"callback_url":{"type":"string","computed":true},"logic_app_id":{"type":"string","required":true},"method":{"type":"string","optional":true},"name":{"type":"string","required":true},"relative_path":{"type":"string","optional":true},"schema":{"type":"string","required":true}}}},"azurerm_logic_app_trigger_recurrence":{"block":{"attributes":{"frequency":{"type":"string","required":true},"interval":{"type":"number","required":true},"logic_app_id":{"type":"string","required":true},"name":{"type":"string","required":true},"start_time":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"computed":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"at_these_hours":{"type":["set","number"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]},"at_these_minutes":{"type":["set","number"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]},"on_these_days":{"type":["set","string"],"optional":true,"at_least_one_of":["schedule.0.at_these_hours","schedule.0.at_these_minutes","schedule.0.on_these_days"]}}},"optional":true}}}},"azurerm_logic_app_workflow":{"block":{"attributes":{"access_endpoint":{"type":"string","computed":true},"connector_endpoint_ip_addresses":{"type":["list","string"],"computed":true},"connector_outbound_ip_addresses":{"type":["list","string"],"computed":true},"enabled":{"type":"bool","optional":true,"default":true},"integration_service_environment_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"logic_app_integration_account_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workflow_endpoint_ip_addresses":{"type":["list","string"],"computed":true},"workflow_outbound_ip_addresses":{"type":["list","string"],"computed":true},"workflow_parameters":{"type":["map","string"],"optional":true},"workflow_schema":{"type":"string","optional":true,"default":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#"},"workflow_version":{"type":"string","optional":true,"default":"1.0.0.0"}},"block_types":{"access_control":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true},"content":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}},"block_types":{"open_authentication_policy":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"claim":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"workflow_management":{"nesting_mode":3,"block":{"attributes":{"allowed_caller_ip_address_range":{"type":["set","string"],"required":true}}},"optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_machine_learning_compute_cluster":{"block":{"attributes":{"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"node_public_ip_enabled":{"type":"bool","optional":true,"default":true},"ssh_public_access_enabled":{"type":"bool","optional":true,"default":false},"subnet_resource_id":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"vm_priority":{"type":"string","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"scale_settings":{"nesting_mode":3,"block":{"attributes":{"max_node_count":{"type":"number","required":true},"min_node_count":{"type":"number","required":true},"scale_down_nodes_after_idle_duration":{"type":"string","required":true}}},"required":true},"ssh":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true,"at_least_one_of":["ssh.0.admin_password","ssh.0.key_value"]},"admin_username":{"type":"string","required":true},"key_value":{"type":"string","optional":true,"at_least_one_of":["ssh.0.admin_password","ssh.0.key_value"]}}},"optional":true}}}},"azurerm_machine_learning_compute_instance":{"block":{"attributes":{"authorization_type":{"type":"string","optional":true},"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"node_public_ip_enabled":{"type":"bool","optional":true,"default":true},"subnet_resource_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_size":{"type":"string","required":true}},"block_types":{"assign_to_user":{"nesting_mode":3,"block":{"attributes":{"object_id":{"type":"string","optional":true},"tenant_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ssh":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","computed":true},"public_key":{"type":"string","required":true},"username":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_machine_learning_datastore_blobstorage":{"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["account_key","shared_access_signature"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"service_data_auth_identity":{"type":"string","optional":true,"default":"None"},"shared_access_signature":{"type":"string","optional":true,"at_least_one_of":["account_key","shared_access_signature"]},"storage_container_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_datastore_datalake_gen2":{"block":{"attributes":{"authority_url":{"type":"string","optional":true},"client_id":{"type":"string","optional":true,"required_with":["tenant_id","client_secret"]},"client_secret":{"type":"string","optional":true,"required_with":["tenant_id","client_id"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","computed":true},"name":{"type":"string","required":true},"service_data_identity":{"type":"string","optional":true,"default":"None"},"storage_container_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","optional":true,"required_with":["client_id","client_secret"]},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_datastore_fileshare":{"block":{"attributes":{"account_key":{"type":"string","optional":true,"exactly_one_of":["account_key","shared_access_signature"]},"description":{"type":"string","optional":true},"is_default":{"type":"bool","computed":true},"name":{"type":"string","required":true},"service_data_identity":{"type":"string","optional":true,"default":"None"},"shared_access_signature":{"type":"string","optional":true,"at_least_one_of":["account_key","shared_access_signature"]},"storage_fileshare_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_inference_cluster":{"block":{"attributes":{"cluster_purpose":{"type":"string","optional":true,"default":"FastProd"},"description":{"type":"string","optional":true},"kubernetes_cluster_id":{"type":"string","required":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ssl":{"nesting_mode":3,"block":{"attributes":{"cert":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"cname":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"key":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.leaf_domain_label","ssl.0.overwrite_existing_domain"]},"leaf_domain_label":{"type":"string","optional":true,"default":"","conflicts_with":["ssl.0.cert","ssl.0.key","ssl.0.cname"]},"overwrite_existing_domain":{"type":"bool","optional":true,"conflicts_with":["ssl.0.cert","ssl.0.key","ssl.0.cname"]}}},"optional":true}}}},"azurerm_machine_learning_synapse_spark":{"block":{"attributes":{"description":{"type":"string","optional":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"machine_learning_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"synapse_spark_pool_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_machine_learning_workspace":{"block":{"attributes":{"application_insights_id":{"type":"string","required":true},"container_registry_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"discovery_url":{"type":"string","computed":true},"friendly_name":{"type":"string","optional":true},"high_business_impact":{"type":"bool","optional":true},"image_build_compute_name":{"type":"string","optional":true},"key_vault_id":{"type":"string","required":true},"kind":{"type":"string","optional":true,"default":"Default"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_user_assigned_identity":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"default":"Basic"},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"v1_legacy_mode_enabled":{"type":"bool","optional":true,"default":false},"workspace_id":{"type":"string","computed":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"key_id":{"type":"string","required":true},"key_vault_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"feature_store":{"nesting_mode":3,"block":{"attributes":{"computer_spark_runtime_version":{"type":"string","optional":true},"offline_connection_name":{"type":"string","optional":true},"online_connection_name":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"managed_network":{"nesting_mode":3,"block":{"attributes":{"isolation_mode":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"serverless_compute":{"nesting_mode":3,"block":{"attributes":{"public_ip_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_machine_learning_workspace_network_outbound_rule_fqdn":{"block":{"attributes":{"destination_fqdn":{"type":"string","required":true},"name":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_workspace_network_outbound_rule_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"service_resource_id":{"type":"string","required":true},"spark_enabled":{"type":"bool","optional":true,"default":false},"sub_resource_target":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_machine_learning_workspace_network_outbound_rule_service_tag":{"block":{"attributes":{"name":{"type":"string","required":true},"port_ranges":{"type":"string","required":true},"protocol":{"type":"string","required":true},"service_tag":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_dedicated_host":{"block":{"attributes":{"dedicated_host_id":{"type":"string","required":true},"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_dynamic_scope":{"block":{"attributes":{"maintenance_configuration_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"locations":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"os_types":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"resource_groups":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"resource_types":{"type":["list","string"],"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]},"tag_filter":{"type":"string","optional":true,"default":"Any","required_with":["filter.0.tags"]}},"block_types":{"tags":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["filter.0.locations","filter.0.os_types","filter.0.resource_groups","filter.0.resource_types","filter.0.tags"]}}},"required":true}}}},"azurerm_maintenance_assignment_virtual_machine":{"block":{"attributes":{"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_maintenance_assignment_virtual_machine_scale_set":{"block":{"attributes":{"location":{"type":"string","required":true},"maintenance_configuration_id":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}}}},"azurerm_maintenance_configuration":{"block":{"attributes":{"in_guest_user_patch_mode":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"properties":{"type":["map","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"scope":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"visibility":{"type":"string","optional":true,"default":"Custom"}},"block_types":{"install_patches":{"nesting_mode":3,"block":{"attributes":{"reboot":{"type":"string","optional":true}},"block_types":{"linux":{"nesting_mode":3,"block":{"attributes":{"classifications_to_include":{"type":["list","string"],"optional":true},"package_names_mask_to_exclude":{"type":["list","string"],"optional":true},"package_names_mask_to_include":{"type":["list","string"],"optional":true}}},"optional":true},"windows":{"nesting_mode":3,"block":{"attributes":{"classifications_to_include":{"type":["list","string"],"optional":true},"kb_numbers_to_exclude":{"type":["list","string"],"optional":true},"kb_numbers_to_include":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"window":{"nesting_mode":3,"block":{"attributes":{"duration":{"type":"string","optional":true},"expiration_date_time":{"type":"string","optional":true},"recur_every":{"type":"string","optional":true},"start_date_time":{"type":"string","required":true},"time_zone":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_application":{"block":{"attributes":{"application_definition_id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":["map","string"],"computed":true},"parameter_values":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"promotion_code":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_application_definition":{"block":{"attributes":{"create_ui_definition":{"type":"string","optional":true,"conflicts_with":["package_file_uri"],"required_with":["main_template"]},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"lock_level":{"type":"string","required":true},"main_template":{"type":"string","optional":true,"conflicts_with":["package_file_uri"],"required_with":["create_ui_definition"]},"name":{"type":"string","required":true},"package_enabled":{"type":"bool","optional":true,"default":true},"package_file_uri":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"authorization":{"nesting_mode":4,"block":{"attributes":{"role_definition_id":{"type":"string","required":true},"service_principal_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_managed_disk":{"block":{"attributes":{"create_option":{"type":"string","required":true},"disk_access_id":{"type":"string","optional":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["secure_vm_disk_encryption_set_id"]},"disk_iops_read_only":{"type":"number","optional":true,"computed":true},"disk_iops_read_write":{"type":"number","optional":true,"computed":true},"disk_mbps_read_only":{"type":"number","optional":true,"computed":true},"disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"gallery_image_reference_id":{"type":"string","optional":true,"conflicts_with":["image_reference_id"]},"hyper_v_generation":{"type":"string","optional":true},"image_reference_id":{"type":"string","optional":true,"conflicts_with":["gallery_image_reference_id"]},"location":{"type":"string","required":true},"logical_sector_size":{"type":"number","optional":true,"computed":true},"max_shares":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"network_access_policy":{"type":"string","optional":true,"default":"AllowAll"},"on_demand_bursting_enabled":{"type":"bool","optional":true},"optimized_frequent_attach_enabled":{"type":"bool","optional":true,"default":false},"os_type":{"type":"string","optional":true},"performance_plus_enabled":{"type":"bool","optional":true,"default":false},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["disk_encryption_set_id"]},"security_type":{"type":"string","optional":true},"source_resource_id":{"type":"string","optional":true},"source_uri":{"type":"string","optional":true,"computed":true},"storage_account_id":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tier":{"type":"string","optional":true,"computed":true},"trusted_launch_enabled":{"type":"bool","optional":true},"upload_size_bytes":{"type":"number","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"encryption_settings":{"nesting_mode":3,"block":{"block_types":{"disk_encryption_key":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"required":true},"key_encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_managed_disk_sas_token":{"block":{"attributes":{"access_level":{"type":"string","required":true},"duration_in_seconds":{"type":"number","required":true},"managed_disk_id":{"type":"string","required":true},"sas_url":{"type":"string","computed":true}}}},"azurerm_managed_lustre_file_system":{"block":{"attributes":{"location":{"type":"string","required":true},"mgs_address":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"storage_capacity_in_tb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"required":true}},"block_types":{"encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true},"hsm_setting":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"import_prefix":{"type":"string","optional":true},"logging_container_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"time_of_day_in_utc":{"type":"string","required":true}}},"required":true}}}},"azurerm_management_group":{"block":{"attributes":{"display_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","optional":true,"computed":true},"parent_management_group_id":{"type":"string","optional":true,"computed":true},"subscription_ids":{"type":["set","string"],"optional":true,"computed":true},"tenant_scoped_id":{"type":"string","computed":true}}}},"azurerm_management_group_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_management_group_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true}}}},"azurerm_management_group_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true}}}},"azurerm_management_group_subscription_association":{"block":{"attributes":{"management_group_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_management_group_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_management_lock":{"block":{"attributes":{"lock_level":{"type":"string","required":true},"name":{"type":"string","required":true},"notes":{"type":"string","optional":true},"scope":{"type":"string","required":true}}}},"azurerm_maps_account":{"block":{"attributes":{"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"x_ms_client_id":{"type":"string","computed":true}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["list","string"],"required":true}}},"optional":true},"data_store":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","optional":true},"unique_name":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_maps_creator":{"block":{"attributes":{"location":{"type":"string","required":true},"maps_account_id":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_units":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_marketplace_agreement":{"block":{"attributes":{"license_text_link":{"type":"string","computed":true},"offer":{"type":"string","required":true},"plan":{"type":"string","required":true},"privacy_policy_link":{"type":"string","computed":true},"publisher":{"type":"string","required":true}}}},"azurerm_marketplace_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true,"required_with":["condition_version"]},"condition_version":{"type":"string","optional":true,"required_with":["condition"]},"delegated_managed_identity_resource_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","optional":true,"conflicts_with":["role_definition_name"]},"role_definition_name":{"type":"string","optional":true,"conflicts_with":["role_definition_id"]},"skip_service_principal_aad_check":{"type":"bool","optional":true,"default":false}}}},"azurerm_mobile_network":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_country_code":{"type":"string","required":true},"mobile_network_code":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_key":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_attached_data_network":{"block":{"attributes":{"dns_addresses":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"mobile_network_data_network_name":{"type":"string","required":true},"mobile_network_packet_core_data_plane_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_equipment_address_pool_prefixes":{"type":["list","string"],"optional":true,"at_least_one_of":["user_equipment_address_pool_prefixes","user_equipment_static_address_pool_prefixes"]},"user_equipment_static_address_pool_prefixes":{"type":["list","string"],"optional":true,"at_least_one_of":["user_equipment_address_pool_prefixes","user_equipment_static_address_pool_prefixes"]},"user_plane_access_ipv4_address":{"type":"string","optional":true},"user_plane_access_ipv4_gateway":{"type":"string","optional":true},"user_plane_access_ipv4_subnet":{"type":"string","optional":true},"user_plane_access_name":{"type":"string","optional":true}},"block_types":{"network_address_port_translation":{"nesting_mode":3,"block":{"attributes":{"icmp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"pinhole_maximum_number":{"type":"number","optional":true,"default":65536},"tcp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"tcp_port_reuse_minimum_hold_time_in_seconds":{"type":"number","optional":true,"default":120},"udp_pinhole_timeout_in_seconds":{"type":"number","optional":true,"default":180},"udp_port_reuse_minimum_hold_time_in_seconds":{"type":"number","optional":true,"default":60}},"block_types":{"port_range":{"nesting_mode":3,"block":{"attributes":{"maximum":{"type":"number","optional":true,"default":49999},"minimum":{"type":"number","optional":true,"default":1024}}},"optional":true}}},"optional":true}}}},"azurerm_mobile_network_data_network":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_packet_core_control_plane":{"block":{"attributes":{"control_plane_access_ipv4_address":{"type":"string","optional":true},"control_plane_access_ipv4_gateway":{"type":"string","optional":true},"control_plane_access_ipv4_subnet":{"type":"string","optional":true},"control_plane_access_name":{"type":"string","optional":true},"core_network_technology":{"type":"string","optional":true},"interoperability_settings_json":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"site_ids":{"type":["list","string"],"required":true},"sku":{"type":"string","required":true},"software_version":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"user_equipment_mtu_in_bytes":{"type":"number","optional":true,"default":1440}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"local_diagnostics_access":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","required":true},"https_server_certificate_url":{"type":"string","optional":true}}},"required":true},"platform":{"nesting_mode":3,"block":{"attributes":{"arc_kubernetes_cluster_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"custom_location_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"edge_device_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"stack_hci_cluster_id":{"type":"string","optional":true,"at_least_one_of":["platform.0.edge_device_id","platform.0.stack_hci_cluster_id","platform.0.arc_kubernetes_cluster_id","platform.0.custom_location_id"]},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mobile_network_packet_core_data_plane":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_packet_core_control_plane_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"user_plane_access_ipv4_address":{"type":"string","optional":true},"user_plane_access_ipv4_gateway":{"type":"string","optional":true},"user_plane_access_ipv4_subnet":{"type":"string","optional":true},"user_plane_access_name":{"type":"string","optional":true}}}},"azurerm_mobile_network_service":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"service_precedence":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"pcc_rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"precedence":{"type":"number","required":true},"traffic_control_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"qos_policy":{"nesting_mode":3,"block":{"attributes":{"allocation_and_retention_priority_level":{"type":"number","optional":true},"preemption_capability":{"type":"string","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"string","optional":true,"default":"Preemptable"},"qos_indicator":{"type":"number","required":true}},"block_types":{"guaranteed_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"optional":true},"maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"optional":true},"service_data_flow_template":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"ports":{"type":["list","string"],"optional":true},"protocol":{"type":["list","string"],"required":true},"remote_ip_list":{"type":["list","string"],"required":true}}},"required":true}}},"required":true},"service_qos_policy":{"nesting_mode":3,"block":{"attributes":{"allocation_and_retention_priority_level":{"type":"number","optional":true,"default":9},"preemption_capability":{"type":"string","optional":true},"preemption_vulnerability":{"type":"string","optional":true},"qos_indicator":{"type":"number","optional":true}},"block_types":{"maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_mobile_network_sim":{"block":{"attributes":{"authentication_key":{"type":"string","required":true},"device_type":{"type":"string","optional":true},"integrated_circuit_card_identifier":{"type":"string","required":true},"international_mobile_subscriber_identity":{"type":"string","required":true},"mobile_network_sim_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"operator_key_code":{"type":"string","required":true},"sim_policy_id":{"type":"string","optional":true},"sim_state":{"type":"string","computed":true},"vendor_key_fingerprint":{"type":"string","computed":true},"vendor_name":{"type":"string","computed":true}},"block_types":{"static_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"attached_data_network_id":{"type":"string","required":true},"slice_id":{"type":"string","required":true},"static_ipv4_address":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_mobile_network_sim_group":{"block":{"attributes":{"encryption_key_url":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mobile_network_sim_policy":{"block":{"attributes":{"default_slice_id":{"type":"string","required":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"rat_frequency_selection_priority_index":{"type":"number","optional":true},"registration_timer_in_seconds":{"type":"number","optional":true,"default":3240},"tags":{"type":["map","string"],"optional":true}},"block_types":{"slice":{"nesting_mode":3,"block":{"attributes":{"default_data_network_id":{"type":"string","required":true},"slice_id":{"type":"string","required":true}},"block_types":{"data_network":{"nesting_mode":3,"block":{"attributes":{"additional_allowed_session_types":{"type":["list","string"],"optional":true},"allocation_and_retention_priority_level":{"type":"number","optional":true,"default":0},"allowed_services_ids":{"type":["list","string"],"required":true},"data_network_id":{"type":"string","required":true},"default_session_type":{"type":"string","optional":true,"default":"IPv4"},"max_buffered_packets":{"type":"number","optional":true,"default":10},"preemption_capability":{"type":"string","optional":true,"default":"NotPreempt"},"preemption_vulnerability":{"type":"string","optional":true,"default":"NotPreemptable"},"qos_indicator":{"type":"number","required":true}},"block_types":{"session_aggregate_maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"user_equipment_aggregate_maximum_bit_rate":{"nesting_mode":3,"block":{"attributes":{"downlink":{"type":"string","required":true},"uplink":{"type":"string","required":true}}},"required":true}}}},"azurerm_mobile_network_site":{"block":{"attributes":{"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_function_ids":{"type":["list","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mobile_network_slice":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"mobile_network_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"single_network_slice_selection_assistance_information":{"nesting_mode":3,"block":{"attributes":{"slice_differentiator":{"type":"string","optional":true},"slice_service_type":{"type":"number","required":true}}},"required":true}}}},"azurerm_mongo_cluster":{"block":{"attributes":{"administrator_password":{"type":"string","optional":true,"required_with":["administrator_username"]},"administrator_username":{"type":"string","optional":true,"required_with":["administrator_password"]},"compute_tier":{"type":"string","optional":true},"connection_strings":{"type":["list",["object",{"description":"string","name":"string","value":"string"}]],"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"high_availability_mode":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"preview_features":{"type":["list","string"],"optional":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"shard_count":{"type":"number","optional":true},"source_location":{"type":"string","optional":true,"required_with":["source_server_id"]},"source_server_id":{"type":"string","optional":true},"storage_size_in_gb":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true}}}},"azurerm_monitor_aad_diagnostic_setting":{"block":{"attributes":{"eventhub_authorization_rule_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]},"eventhub_name":{"type":"string","optional":true},"log_analytics_workspace_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id"]}},"block_types":{"enabled_log":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","required":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":0},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_action_group":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true,"default":"global"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"short_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"arm_role_receiver":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"role_id":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"automation_runbook_receiver":{"nesting_mode":3,"block":{"attributes":{"automation_account_id":{"type":"string","required":true},"is_global_runbook":{"type":"bool","required":true},"name":{"type":"string","required":true},"runbook_name":{"type":"string","required":true},"service_uri":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true,"default":false},"webhook_resource_id":{"type":"string","required":true}}},"optional":true},"azure_app_push_receiver":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true},"azure_function_receiver":{"nesting_mode":3,"block":{"attributes":{"function_app_resource_id":{"type":"string","required":true},"function_name":{"type":"string","required":true},"http_trigger_url":{"type":"string","required":true},"name":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"email_receiver":{"nesting_mode":3,"block":{"attributes":{"email_address":{"type":"string","required":true},"name":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"event_hub_receiver":{"nesting_mode":3,"block":{"attributes":{"event_hub_name":{"type":"string","required":true},"event_hub_namespace":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true},"tenant_id":{"type":"string","optional":true,"computed":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"itsm_receiver":{"nesting_mode":3,"block":{"attributes":{"connection_id":{"type":"string","required":true},"name":{"type":"string","required":true},"region":{"type":"string","required":true},"ticket_configuration":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}},"optional":true},"logic_app_receiver":{"nesting_mode":3,"block":{"attributes":{"callback_url":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_id":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}}},"optional":true},"sms_receiver":{"nesting_mode":3,"block":{"attributes":{"country_code":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"optional":true},"voice_receiver":{"nesting_mode":3,"block":{"attributes":{"country_code":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"optional":true},"webhook_receiver":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"service_uri":{"type":"string","required":true},"use_common_alert_schema":{"type":"bool","optional":true}},"block_types":{"aad_auth":{"nesting_mode":3,"block":{"attributes":{"identifier_uri":{"type":"string","optional":true,"computed":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_activity_log_alert":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["set","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"webhook_properties":{"type":["map","string"],"optional":true}}},"optional":true},"criteria":{"nesting_mode":3,"block":{"attributes":{"caller":{"type":"string","optional":true},"category":{"type":"string","required":true},"level":{"type":"string","optional":true,"conflicts_with":["criteria.0.levels"]},"levels":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.level"]},"operation_name":{"type":"string","optional":true},"recommendation_category":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_type"]},"recommendation_impact":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_type"]},"recommendation_type":{"type":"string","optional":true,"conflicts_with":["criteria.0.recommendation_category","criteria.0.recommendation_impact"]},"resource_group":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_groups"]},"resource_groups":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_group"]},"resource_id":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_ids"]},"resource_ids":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_id"]},"resource_provider":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_providers"]},"resource_providers":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_provider"]},"resource_type":{"type":"string","optional":true,"conflicts_with":["criteria.0.resource_types"]},"resource_types":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.resource_type"]},"status":{"type":"string","optional":true,"conflicts_with":["criteria.0.statuses"]},"statuses":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.status"]},"sub_status":{"type":"string","optional":true,"conflicts_with":["criteria.0.sub_statuses"]},"sub_statuses":{"type":["list","string"],"optional":true,"conflicts_with":["criteria.0.sub_status"]}},"block_types":{"resource_health":{"nesting_mode":3,"block":{"attributes":{"current":{"type":["set","string"],"optional":true},"previous":{"type":["set","string"],"optional":true},"reason":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["criteria.0.caller","criteria.0.service_health"]},"service_health":{"nesting_mode":3,"block":{"attributes":{"events":{"type":["set","string"],"optional":true},"locations":{"type":["set","string"],"optional":true},"services":{"type":["set","string"],"optional":true}}},"optional":true,"computed":true,"conflicts_with":["criteria.0.caller","criteria.0.resource_health"]}}},"required":true}}}},"azurerm_monitor_alert_processing_rule_action_group":{"block":{"attributes":{"add_action_group_ids":{"type":["list","string"],"required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"block_types":{"alert_context":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_id":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_name":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"description":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_condition":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_service":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"severity":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"signal_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_group":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"effective_from":{"type":"string","optional":true},"effective_until":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"block_types":{"daily":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true},"monthly":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true},"weekly":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_alert_processing_rule_suppression":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"condition":{"nesting_mode":3,"block":{"block_types":{"alert_context":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_id":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"alert_rule_name":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"description":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_condition":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"monitor_service":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"severity":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"signal_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_group":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]},"target_resource_type":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"at_least_one_of":["condition.0.alert_context","condition.0.alert_rule_id","condition.0.alert_rule_name","condition.0.description","condition.0.monitor_condition","condition.0.monitor_service","condition.0.severity","condition.0.signal_type","condition.0.target_resource","condition.0.target_resource_group","condition.0.target_resource_type"]}}},"optional":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"effective_from":{"type":"string","optional":true},"effective_until":{"type":"string","optional":true},"time_zone":{"type":"string","optional":true,"default":"UTC"}},"block_types":{"recurrence":{"nesting_mode":3,"block":{"block_types":{"daily":{"nesting_mode":3,"block":{"attributes":{"end_time":{"type":"string","required":true},"start_time":{"type":"string","required":true}}},"optional":true},"monthly":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["list","number"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true},"weekly":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"required":true},"end_time":{"type":"string","optional":true},"start_time":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_monitor_alert_prometheus_rule_group":{"block":{"attributes":{"cluster_name":{"type":"string","optional":true},"description":{"type":"string","optional":true},"interval":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"rule_group_enabled":{"type":"bool","optional":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"alert":{"type":"string","optional":true},"annotations":{"type":["map","string"],"optional":true},"enabled":{"type":"bool","optional":true},"expression":{"type":"string","required":true},"for":{"type":"string","optional":true},"labels":{"type":["map","string"],"optional":true},"record":{"type":"string","optional":true},"severity":{"type":"number","optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"action_properties":{"type":["map","string"],"optional":true}}},"optional":true},"alert_resolution":{"nesting_mode":3,"block":{"attributes":{"auto_resolved":{"type":"bool","optional":true},"time_to_resolve":{"type":"string","optional":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_autoscale_setting":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"notification":{"nesting_mode":3,"block":{"block_types":{"email":{"nesting_mode":3,"block":{"attributes":{"custom_emails":{"type":["list","string"],"optional":true},"send_to_subscription_administrator":{"type":"bool","optional":true,"default":false},"send_to_subscription_co_administrator":{"type":"bool","optional":true,"default":false}}},"optional":true,"at_least_one_of":["notification.0.email","notification.0.webhook"]},"webhook":{"nesting_mode":3,"block":{"attributes":{"properties":{"type":["map","string"],"optional":true},"service_uri":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["notification.0.email","notification.0.webhook"]}}},"optional":true},"predictive":{"nesting_mode":3,"block":{"attributes":{"look_ahead_time":{"type":"string","optional":true},"scale_mode":{"type":"string","required":true}}},"optional":true},"profile":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"capacity":{"nesting_mode":3,"block":{"attributes":{"default":{"type":"number","required":true},"maximum":{"type":"number","required":true},"minimum":{"type":"number","required":true}}},"required":true},"fixed_date":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}}},"optional":true},"recurrence":{"nesting_mode":3,"block":{"attributes":{"days":{"type":["list","string"],"required":true},"hours":{"type":["list","number"],"required":true},"minutes":{"type":["list","number"],"required":true},"timezone":{"type":"string","optional":true,"default":"UTC"}}},"optional":true},"rule":{"nesting_mode":3,"block":{"block_types":{"metric_trigger":{"nesting_mode":3,"block":{"attributes":{"divide_by_instance_count":{"type":"bool","optional":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","optional":true},"metric_resource_id":{"type":"string","required":true},"operator":{"type":"string","required":true},"statistic":{"type":"string","required":true},"threshold":{"type":"number","required":true},"time_aggregation":{"type":"string","required":true},"time_grain":{"type":"string","required":true},"time_window":{"type":"string","required":true}},"block_types":{"dimensions":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"required":true},"scale_action":{"nesting_mode":3,"block":{"attributes":{"cooldown":{"type":"string","required":true},"direction":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"number","required":true}}},"required":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_data_collection_endpoint":{"block":{"attributes":{"configuration_access_endpoint":{"type":"string","computed":true},"description":{"type":"string","optional":true},"immutable_id":{"type":"string","computed":true},"kind":{"type":"string","optional":true},"location":{"type":"string","required":true},"logs_ingestion_endpoint":{"type":"string","computed":true},"metrics_ingestion_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_monitor_data_collection_rule":{"block":{"attributes":{"data_collection_endpoint_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"immutable_id":{"type":"string","computed":true},"kind":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"data_flow":{"nesting_mode":3,"block":{"attributes":{"built_in_transform":{"type":"string","optional":true},"destinations":{"type":["list","string"],"required":true},"output_stream":{"type":"string","optional":true},"streams":{"type":["list","string"],"required":true},"transform_kql":{"type":"string","optional":true}}},"required":true},"data_sources":{"nesting_mode":3,"block":{"block_types":{"data_import":{"nesting_mode":3,"block":{"block_types":{"event_hub_data_source":{"nesting_mode":3,"block":{"attributes":{"consumer_group":{"type":"string","optional":true},"name":{"type":"string","required":true},"stream":{"type":"string","required":true}}},"required":true}}},"optional":true},"extension":{"nesting_mode":3,"block":{"attributes":{"extension_json":{"type":"string","optional":true},"extension_name":{"type":"string","required":true},"input_data_sources":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"iis_log":{"nesting_mode":3,"block":{"attributes":{"log_directories":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"log_file":{"nesting_mode":3,"block":{"attributes":{"file_patterns":{"type":["list","string"],"required":true},"format":{"type":"string","required":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}},"block_types":{"settings":{"nesting_mode":3,"block":{"block_types":{"text":{"nesting_mode":3,"block":{"attributes":{"record_start_timestamp_format":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"performance_counter":{"nesting_mode":3,"block":{"attributes":{"counter_specifiers":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"sampling_frequency_in_seconds":{"type":"number","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"platform_telemetry":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"prometheus_forwarder":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}},"block_types":{"label_include_filter":{"nesting_mode":4,"block":{"attributes":{"label":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"syslog":{"nesting_mode":3,"block":{"attributes":{"facility_names":{"type":["list","string"],"required":true},"log_levels":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true},"windows_event_log":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true},"x_path_queries":{"type":["list","string"],"required":true}}},"optional":true},"windows_firewall_log":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"streams":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true},"destinations":{"nesting_mode":3,"block":{"block_types":{"azure_monitor_metrics":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"event_hub":{"nesting_mode":3,"block":{"attributes":{"event_hub_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"event_hub_direct":{"nesting_mode":3,"block":{"attributes":{"event_hub_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"log_analytics":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"monitor_account":{"nesting_mode":3,"block":{"attributes":{"monitor_account_id":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_blob":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_blob_direct":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]},"storage_table_direct":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"table_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["destinations.0.azure_monitor_metrics","destinations.0.event_hub","destinations.0.event_hub_direct","destinations.0.log_analytics","destinations.0.monitor_account","destinations.0.storage_blob","destinations.0.storage_blob_direct","destinations.0.storage_table_direct"]}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"stream_declaration":{"nesting_mode":4,"block":{"attributes":{"stream_name":{"type":"string","required":true}},"block_types":{"column":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_monitor_data_collection_rule_association":{"block":{"attributes":{"data_collection_endpoint_id":{"type":"string","optional":true,"exactly_one_of":["data_collection_endpoint_id","data_collection_rule_id"]},"data_collection_rule_id":{"type":"string","optional":true,"exactly_one_of":["data_collection_endpoint_id","data_collection_rule_id"],"required_with":["name"]},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true,"default":"configurationAccessEndpoint"},"target_resource_id":{"type":"string","required":true}}}},"azurerm_monitor_diagnostic_setting":{"block":{"attributes":{"eventhub_authorization_rule_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"eventhub_name":{"type":"string","optional":true},"log_analytics_destination_type":{"type":"string","optional":true,"computed":true},"log_analytics_workspace_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"name":{"type":"string","required":true},"partner_solution_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["eventhub_authorization_rule_id","log_analytics_workspace_id","storage_account_id","partner_solution_id"]},"target_resource_id":{"type":"string","required":true}},"block_types":{"enabled_log":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","optional":true},"category_group":{"type":"string","optional":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["enabled_log","metric"]},"metric":{"nesting_mode":4,"block":{"attributes":{"category":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true},"enabled":{"type":"bool","required":true}}},"optional":true}}},"optional":true,"at_least_one_of":["enabled_log","metric"]}}}},"azurerm_monitor_metric_alert":{"block":{"attributes":{"auto_mitigate":{"type":"bool","optional":true,"default":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"string","optional":true,"default":"PT1M"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["set","string"],"required":true},"severity":{"type":"number","optional":true,"default":3},"tags":{"type":["map","string"],"optional":true},"target_resource_location":{"type":"string","optional":true,"computed":true},"target_resource_type":{"type":"string","optional":true,"computed":true},"window_size":{"type":"string","optional":true,"default":"PT5M"}},"block_types":{"action":{"nesting_mode":4,"block":{"attributes":{"action_group_id":{"type":"string","required":true},"webhook_properties":{"type":["map","string"],"optional":true}}},"optional":true},"application_insights_web_test_location_availability_criteria":{"nesting_mode":3,"block":{"attributes":{"component_id":{"type":"string","required":true},"failed_location_count":{"type":"number","required":true},"web_test_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]},"criteria":{"nesting_mode":3,"block":{"attributes":{"aggregation":{"type":"string","required":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","required":true},"operator":{"type":"string","required":true},"skip_metric_validation":{"type":"bool","optional":true,"default":false},"threshold":{"type":"number","required":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]},"dynamic_criteria":{"nesting_mode":3,"block":{"attributes":{"aggregation":{"type":"string","required":true},"alert_sensitivity":{"type":"string","required":true},"evaluation_failure_count":{"type":"number","optional":true,"default":4},"evaluation_total_count":{"type":"number","optional":true,"default":4},"ignore_data_before":{"type":"string","optional":true},"metric_name":{"type":"string","required":true},"metric_namespace":{"type":"string","required":true},"operator":{"type":"string","required":true},"skip_metric_validation":{"type":"bool","optional":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true,"exactly_one_of":["criteria","dynamic_criteria","application_insights_web_test_location_availability_criteria"]}}}},"azurerm_monitor_private_link_scope":{"block":{"attributes":{"ingestion_access_mode":{"type":"string","optional":true,"default":"Open"},"name":{"type":"string","required":true},"query_access_mode":{"type":"string","optional":true,"default":"Open"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_monitor_private_link_scoped_service":{"block":{"attributes":{"linked_resource_id":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_name":{"type":"string","required":true}}}},"azurerm_monitor_scheduled_query_rules_alert":{"block":{"attributes":{"authorized_resource_ids":{"type":["set","string"],"optional":true},"auto_mitigation_enabled":{"type":"bool","optional":true,"default":false,"conflicts_with":["throttling"]},"data_source_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"query_type":{"type":"string","optional":true,"default":"ResultCount"},"resource_group_name":{"type":"string","required":true},"severity":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"throttling":{"type":"number","optional":true,"conflicts_with":["auto_mitigation_enabled"]},"time_window":{"type":"number","required":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_group":{"type":["set","string"],"required":true},"custom_webhook_payload":{"type":"string","optional":true},"email_subject":{"type":"string","optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true}},"block_types":{"metric_trigger":{"nesting_mode":3,"block":{"attributes":{"metric_column":{"type":"string","optional":true},"metric_trigger_type":{"type":"string","required":true},"operator":{"type":"string","required":true},"threshold":{"type":"number","required":true}}},"optional":true}}},"required":true}}}},"azurerm_monitor_scheduled_query_rules_alert_v2":{"block":{"attributes":{"auto_mitigation_enabled":{"type":"bool","optional":true,"default":false},"created_with_api_version":{"type":"string","computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"evaluation_frequency":{"type":"string","required":true},"is_a_legacy_log_analytics_rule":{"type":"bool","computed":true},"is_workspace_alerts_storage_configured":{"type":"bool","computed":true},"location":{"type":"string","required":true},"mute_actions_after_alert_duration":{"type":"string","optional":true},"name":{"type":"string","required":true},"query_time_range_override":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"severity":{"type":"number","required":true},"skip_query_validation":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"target_resource_types":{"type":["list","string"],"optional":true},"window_duration":{"type":"string","required":true},"workspace_alerts_storage_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_groups":{"type":["list","string"],"optional":true},"custom_properties":{"type":["map","string"],"optional":true}}},"optional":true},"criteria":{"nesting_mode":3,"block":{"attributes":{"metric_measure_column":{"type":"string","optional":true},"operator":{"type":"string","required":true},"query":{"type":"string","required":true},"resource_id_column":{"type":"string","optional":true},"threshold":{"type":"number","required":true},"time_aggregation_method":{"type":"string","required":true}},"block_types":{"dimension":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","required":true},"values":{"type":["list","string"],"required":true}}},"optional":true},"failing_periods":{"nesting_mode":3,"block":{"attributes":{"minimum_failing_periods_to_trigger_alert":{"type":"number","required":true},"number_of_evaluation_periods":{"type":"number","required":true}}},"optional":true}}},"required":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_monitor_scheduled_query_rules_log":{"block":{"attributes":{"authorized_resource_ids":{"type":["set","string"],"optional":true},"data_source_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"criteria":{"nesting_mode":3,"block":{"attributes":{"metric_name":{"type":"string","required":true}},"block_types":{"dimension":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operator":{"type":"string","optional":true,"default":"Include"},"values":{"type":["list","string"],"required":true}}},"required":true}}},"required":true}}}},"azurerm_monitor_smart_detector_alert_rule":{"block":{"attributes":{"description":{"type":"string","optional":true},"detector_type":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"frequency":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_resource_ids":{"type":["set","string"],"required":true},"severity":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throttling_duration":{"type":"string","optional":true}},"block_types":{"action_group":{"nesting_mode":3,"block":{"attributes":{"email_subject":{"type":"string","optional":true},"ids":{"type":["set","string"],"required":true},"webhook_payload":{"type":"string","optional":true}}},"required":true}}}},"azurerm_monitor_workspace":{"block":{"attributes":{"default_data_collection_endpoint_id":{"type":"string","computed":true},"default_data_collection_rule_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"query_endpoint":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_mssql_database":{"block":{"attributes":{"auto_pause_delay_in_minutes":{"type":"number","optional":true,"computed":true},"collation":{"type":"string","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default","conflicts_with":["import"]},"creation_source_database_id":{"type":"string","optional":true,"computed":true},"elastic_pool_id":{"type":"string","optional":true},"enclave_type":{"type":"string","optional":true,"computed":true},"geo_backup_enabled":{"type":"bool","optional":true,"default":true},"ledger_enabled":{"type":"bool","optional":true,"computed":true},"license_type":{"type":"string","optional":true,"computed":true},"maintenance_configuration_name":{"type":"string","optional":true,"computed":true,"conflicts_with":["elastic_pool_id"]},"max_size_gb":{"type":"number","optional":true,"computed":true},"min_capacity":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"read_replica_count":{"type":"number","optional":true,"computed":true},"read_scale":{"type":"bool","optional":true,"computed":true},"recover_database_id":{"type":"string","optional":true},"recovery_point_id":{"type":"string","optional":true},"restore_dropped_database_id":{"type":"string","optional":true},"restore_long_term_retention_backup_id":{"type":"string","optional":true},"restore_point_in_time":{"type":"string","optional":true,"computed":true},"sample_name":{"type":"string","optional":true,"computed":true},"secondary_type":{"type":"string","optional":true,"computed":true},"server_id":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"storage_account_type":{"type":"string","optional":true,"default":"Geo"},"tags":{"type":["map","string"],"optional":true},"transparent_data_encryption_enabled":{"type":"bool","optional":true,"default":true},"transparent_data_encryption_key_automatic_rotation_enabled":{"type":"bool","optional":true,"default":false,"required_with":["transparent_data_encryption_key_vault_key_id"]},"transparent_data_encryption_key_vault_key_id":{"type":"string","optional":true},"zone_redundant":{"type":"bool","optional":true,"computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"import":{"nesting_mode":3,"block":{"attributes":{"administrator_login":{"type":"string","required":true},"administrator_login_password":{"type":"string","required":true},"authentication_type":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true},"storage_key":{"type":"string","required":true},"storage_key_type":{"type":"string","required":true},"storage_uri":{"type":"string","required":true}}},"optional":true,"conflicts_with":["create_mode"]},"long_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"immutable_backups_enabled":{"type":"bool","optional":true,"default":false},"monthly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"week_of_year":{"type":"number","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"weekly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"yearly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]}}},"optional":true,"computed":true},"short_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"backup_interval_in_hours":{"type":"number","optional":true,"computed":true},"retention_days":{"type":"number","required":true}}},"optional":true,"computed":true},"threat_detection_policy":{"nesting_mode":3,"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins":{"type":"string","optional":true,"default":"Disabled"},"email_addresses":{"type":["set","string"],"optional":true},"retention_days":{"type":"number","optional":true},"state":{"type":"string","optional":true,"default":"Disabled"},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_mssql_database_extended_auditing_policy":{"block":{"attributes":{"database_id":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_database_vulnerability_assessment_rule_baseline":{"block":{"attributes":{"baseline_name":{"type":"string","optional":true,"default":"default"},"database_name":{"type":"string","required":true},"rule_id":{"type":"string","required":true},"server_vulnerability_assessment_id":{"type":"string","required":true}},"block_types":{"baseline_result":{"nesting_mode":4,"block":{"attributes":{"result":{"type":["list","string"],"required":true}}},"required":true}}}},"azurerm_mssql_elasticpool":{"block":{"attributes":{"enclave_type":{"type":"string","optional":true,"computed":true},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"maintenance_configuration_name":{"type":"string","optional":true,"default":"SQL_Default"},"max_size_bytes":{"type":"number","optional":true,"computed":true,"conflicts_with":["max_size_gb"]},"max_size_gb":{"type":"number","optional":true,"computed":true,"conflicts_with":["max_size_bytes"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true}},"block_types":{"per_database_settings":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","required":true},"min_capacity":{"type":"number","required":true}}},"required":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"family":{"type":"string","optional":true},"name":{"type":"string","required":true},"tier":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_failover_group":{"block":{"attributes":{"databases":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"readonly_endpoint_failover_policy_enabled":{"type":"bool","optional":true,"computed":true},"server_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"partner_server":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"location":{"type":"string","computed":true},"role":{"type":"string","computed":true}}},"required":true},"read_write_endpoint_failover_policy":{"nesting_mode":3,"block":{"attributes":{"grace_minutes":{"type":"number","optional":true},"mode":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_mssql_job":{"block":{"attributes":{"description":{"type":"string","optional":true},"job_agent_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_mssql_job_agent":{"block":{"attributes":{"database_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"JA100"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_job_credential":{"block":{"attributes":{"job_agent_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true,"conflicts_with":["password_wo"],"exactly_one_of":["password","password_wo"]},"password_wo":{"type":"string","optional":true,"conflicts_with":["password"],"exactly_one_of":["password_wo","password"],"required_with":["password_wo_version"]},"password_wo_version":{"type":"number","optional":true,"required_with":["password_wo"]},"username":{"type":"string","required":true}}}},"azurerm_mssql_job_schedule":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"computed":true},"end_time":{"type":"string","optional":true,"computed":true},"interval":{"type":"string","optional":true},"job_id":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"type":{"type":"string","required":true}}}},"azurerm_mssql_job_step":{"block":{"attributes":{"initial_retry_interval_seconds":{"type":"number","optional":true,"default":1},"job_credential_id":{"type":"string","required":true},"job_id":{"type":"string","required":true},"job_step_index":{"type":"number","required":true},"job_target_group_id":{"type":"string","required":true},"maximum_retry_interval_seconds":{"type":"number","optional":true,"default":120},"name":{"type":"string","required":true},"retry_attempts":{"type":"number","optional":true,"default":10},"retry_interval_backoff_multiplier":{"type":"number","optional":true,"default":2},"sql_script":{"type":"string","required":true},"timeout_seconds":{"type":"number","optional":true,"default":43200}},"block_types":{"output_target":{"nesting_mode":3,"block":{"attributes":{"job_credential_id":{"type":"string","required":true},"mssql_database_id":{"type":"string","required":true},"schema_name":{"type":"string","optional":true,"default":"dbo"},"table_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_job_target_group":{"block":{"attributes":{"job_agent_id":{"type":"string","required":true},"name":{"type":"string","required":true}},"block_types":{"job_target":{"nesting_mode":4,"block":{"attributes":{"database_name":{"type":"string","optional":true},"elastic_pool_name":{"type":"string","optional":true},"job_credential_id":{"type":"string","optional":true},"membership_type":{"type":"string","optional":true,"default":"Include"},"server_name":{"type":"string","required":true},"type":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_mssql_managed_database":{"block":{"attributes":{"managed_instance_id":{"type":"string","required":true},"name":{"type":"string","required":true},"short_term_retention_days":{"type":"number","optional":true,"default":7},"tags":{"type":["map","string"],"optional":true}},"block_types":{"long_term_retention_policy":{"nesting_mode":3,"block":{"attributes":{"immutable_backups_enabled":{"type":"bool","optional":true,"default":false},"monthly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"week_of_year":{"type":"number","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"weekly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]},"yearly_retention":{"type":"string","optional":true,"computed":true,"at_least_one_of":["long_term_retention_policy.0.weekly_retention","long_term_retention_policy.0.monthly_retention","long_term_retention_policy.0.yearly_retention","long_term_retention_policy.0.week_of_year"]}}},"optional":true,"computed":true},"point_in_time_restore":{"nesting_mode":3,"block":{"attributes":{"restore_point_in_time":{"type":"string","required":true},"source_database_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_managed_instance":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"at_least_one_of":["administrator_login","azure_active_directory_administrator"],"required_with":["administrator_login","administrator_login_password"]},"administrator_login_password":{"type":"string","optional":true,"at_least_one_of":["administrator_login_password","azure_active_directory_administrator"],"required_with":["administrator_login","administrator_login_password"]},"collation":{"type":"string","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS"},"database_format":{"type":"string","optional":true,"default":"SQLServer2022"},"dns_zone":{"type":"string","computed":true},"dns_zone_partner_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"hybrid_secondary_usage":{"type":"string","optional":true,"default":"Active"},"license_type":{"type":"string","required":true},"location":{"type":"string","required":true},"maintenance_configuration_name":{"type":"string","optional":true,"default":"SQL_Default"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"proxy_override":{"type":"string","optional":true,"default":"Default"},"public_data_endpoint_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"service_principal_type":{"type":"string","optional":true},"sku_name":{"type":"string","required":true},"storage_account_type":{"type":"string","optional":true,"default":"GRS"},"storage_size_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"timezone_id":{"type":"string","optional":true,"default":"UTC"},"vcores":{"type":"number","required":true},"zone_redundant_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"azure_active_directory_administrator":{"nesting_mode":3,"block":{"attributes":{"azuread_authentication_only_enabled":{"type":"bool","optional":true,"default":false},"login_username":{"type":"string","required":true},"object_id":{"type":"string","required":true},"principal_type":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_managed_instance_active_directory_administrator":{"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true},"login_username":{"type":"string","required":true},"managed_instance_id":{"type":"string","required":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_mssql_managed_instance_failover_group":{"block":{"attributes":{"location":{"type":"string","required":true},"managed_instance_id":{"type":"string","required":true},"name":{"type":"string","required":true},"partner_managed_instance_id":{"type":"string","required":true},"partner_region":{"type":["list",["object",{"location":"string","role":"string"}]],"computed":true},"readonly_endpoint_failover_policy_enabled":{"type":"bool","optional":true,"default":true},"role":{"type":"string","computed":true},"secondary_type":{"type":"string","optional":true,"default":"Geo"}},"block_types":{"read_write_endpoint_failover_policy":{"nesting_mode":3,"block":{"attributes":{"grace_minutes":{"type":"number","optional":true},"mode":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_managed_instance_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true},"managed_instance_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_managed_instance_transparent_data_encryption":{"block":{"attributes":{"auto_rotation_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true,"conflicts_with":["managed_hsm_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"conflicts_with":["key_vault_key_id"]},"managed_instance_id":{"type":"string","required":true}}}},"azurerm_mssql_managed_instance_vulnerability_assessment":{"block":{"attributes":{"managed_instance_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_mssql_outbound_firewall_rule":{"block":{"attributes":{"name":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_mssql_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true,"at_least_one_of":["administrator_login","azuread_administrator.0.azuread_authentication_only"]},"administrator_login_password":{"type":"string","optional":true,"conflicts_with":["administrator_login_password_wo"],"at_least_one_of":["administrator_login_password","administrator_login_password_wo","azuread_administrator.0.azuread_authentication_only"]},"administrator_login_password_wo":{"type":"string","optional":true,"conflicts_with":["administrator_login_password"],"at_least_one_of":["administrator_login_password_wo","administrator_login_password","azuread_administrator.0.azuread_authentication_only"],"required_with":["administrator_login_password_wo_version"]},"administrator_login_password_wo_version":{"type":"number","optional":true,"required_with":["administrator_login_password_wo"]},"connection_policy":{"type":"string","optional":true,"default":"Default"},"express_vulnerability_assessment_enabled":{"type":"bool","optional":true,"default":false},"fully_qualified_domain_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"outbound_network_restriction_enabled":{"type":"bool","optional":true,"default":false},"primary_user_assigned_identity_id":{"type":"string","optional":true,"computed":true,"required_with":["identity"]},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"restorable_dropped_database_ids":{"type":["list","string"],"computed":true},"tags":{"type":["map","string"],"optional":true},"transparent_data_encryption_key_vault_key_id":{"type":"string","optional":true},"version":{"type":"string","required":true}},"block_types":{"azuread_administrator":{"nesting_mode":3,"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true,"computed":true},"login_username":{"type":"string","required":true},"object_id":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_server_dns_alias":{"block":{"attributes":{"dns_record":{"type":"string","computed":true},"mssql_server_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_mssql_server_extended_auditing_policy":{"block":{"attributes":{"audit_actions_and_groups":{"type":["list","string"],"optional":true,"computed":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"predicate_expression":{"type":"string","optional":true},"retention_in_days":{"type":"number","optional":true,"default":0},"server_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_account_subscription_id":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_mssql_server_microsoft_support_auditing_policy":{"block":{"attributes":{"blob_storage_endpoint":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"server_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_subscription_id":{"type":"string","optional":true}}}},"azurerm_mssql_server_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"server_name":{"type":"string","required":true},"state":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true,"required_with":["storage_endpoint"]},"storage_endpoint":{"type":"string","optional":true,"required_with":["storage_account_access_key"]}}}},"azurerm_mssql_server_transparent_data_encryption":{"block":{"attributes":{"auto_rotation_enabled":{"type":"bool","optional":true,"default":false},"key_vault_key_id":{"type":"string","optional":true,"conflicts_with":["managed_hsm_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"conflicts_with":["key_vault_key_id"]},"server_id":{"type":"string","required":true}}}},"azurerm_mssql_server_vulnerability_assessment":{"block":{"attributes":{"server_security_alert_policy_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins":{"type":"bool","optional":true,"default":false},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_mssql_virtual_machine":{"block":{"attributes":{"r_services_enabled":{"type":"bool","optional":true},"sql_connectivity_port":{"type":"number","optional":true,"default":1433},"sql_connectivity_type":{"type":"string","optional":true,"default":"PRIVATE"},"sql_connectivity_update_password":{"type":"string","optional":true},"sql_connectivity_update_username":{"type":"string","optional":true},"sql_license_type":{"type":"string","optional":true},"sql_virtual_machine_group_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"assessment":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"run_immediately":{"type":"bool","optional":true,"default":false}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"monthly_occurrence":{"type":"number","optional":true,"exactly_one_of":["assessment.0.schedule.0.weekly_interval"]},"start_time":{"type":"string","required":true},"weekly_interval":{"type":"number","optional":true,"exactly_one_of":["assessment.0.schedule.0.monthly_occurrence"]}}},"optional":true}}},"optional":true},"auto_backup":{"nesting_mode":3,"block":{"attributes":{"encryption_enabled":{"type":"bool","optional":true,"computed":true},"encryption_password":{"type":"string","optional":true},"retention_period_in_days":{"type":"number","required":true},"storage_account_access_key":{"type":"string","required":true},"storage_blob_endpoint":{"type":"string","required":true},"system_databases_backup_enabled":{"type":"bool","optional":true}},"block_types":{"manual_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"optional":true},"full_backup_frequency":{"type":"string","required":true},"full_backup_start_hour":{"type":"number","required":true},"full_backup_window_in_hours":{"type":"number","required":true},"log_backup_frequency_in_minutes":{"type":"number","required":true}}},"optional":true}}},"optional":true},"auto_patching":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"maintenance_window_duration_in_minutes":{"type":"number","required":true},"maintenance_window_starting_hour":{"type":"number","required":true}}},"optional":true},"key_vault_credential":{"nesting_mode":3,"block":{"attributes":{"key_vault_url":{"type":"string","required":true},"name":{"type":"string","required":true},"service_principal_name":{"type":"string","required":true},"service_principal_secret":{"type":"string","required":true}}},"optional":true},"sql_instance":{"nesting_mode":3,"block":{"attributes":{"adhoc_workloads_optimization_enabled":{"type":"bool","optional":true,"default":false},"collation":{"type":"string","optional":true,"default":"SQL_Latin1_General_CP1_CI_AS"},"instant_file_initialization_enabled":{"type":"bool","optional":true,"default":false},"lock_pages_in_memory_enabled":{"type":"bool","optional":true,"default":false},"max_dop":{"type":"number","optional":true,"default":0},"max_server_memory_mb":{"type":"number","optional":true,"default":2147483647},"min_server_memory_mb":{"type":"number","optional":true,"default":0}}},"optional":true},"storage_configuration":{"nesting_mode":3,"block":{"attributes":{"disk_type":{"type":"string","required":true},"storage_workload_type":{"type":"string","required":true},"system_db_on_data_disk_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"data_settings":{"nesting_mode":3,"block":{"attributes":{"default_file_path":{"type":"string","required":true},"luns":{"type":["list","number"],"required":true}}},"optional":true},"log_settings":{"nesting_mode":3,"block":{"attributes":{"default_file_path":{"type":"string","required":true},"luns":{"type":["list","number"],"required":true}}},"optional":true},"temp_db_settings":{"nesting_mode":3,"block":{"attributes":{"data_file_count":{"type":"number","optional":true,"default":8},"data_file_growth_in_mb":{"type":"number","optional":true,"default":512},"data_file_size_mb":{"type":"number","optional":true,"default":256},"default_file_path":{"type":"string","required":true},"log_file_growth_mb":{"type":"number","optional":true,"default":512},"log_file_size_mb":{"type":"number","optional":true,"default":256},"luns":{"type":["list","number"],"required":true}}},"optional":true}}},"optional":true},"wsfc_domain_credential":{"nesting_mode":3,"block":{"attributes":{"cluster_bootstrap_account_password":{"type":"string","required":true},"cluster_operator_account_password":{"type":"string","required":true},"sql_service_account_password":{"type":"string","required":true}}},"optional":true}}}},"azurerm_mssql_virtual_machine_availability_group_listener":{"block":{"attributes":{"availability_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"port":{"type":"number","optional":true},"sql_virtual_machine_group_id":{"type":"string","required":true}},"block_types":{"load_balancer_configuration":{"nesting_mode":3,"block":{"attributes":{"load_balancer_id":{"type":"string","required":true},"private_ip_address":{"type":"string","required":true},"probe_port":{"type":"number","required":true},"sql_virtual_machine_ids":{"type":["set","string"],"required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["load_balancer_configuration","multi_subnet_ip_configuration"]},"multi_subnet_ip_configuration":{"nesting_mode":4,"block":{"attributes":{"private_ip_address":{"type":"string","required":true},"sql_virtual_machine_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["load_balancer_configuration","multi_subnet_ip_configuration"]},"replica":{"nesting_mode":4,"block":{"attributes":{"commit":{"type":"string","required":true},"failover_mode":{"type":"string","required":true},"readable_secondary":{"type":"string","required":true},"role":{"type":"string","required":true},"sql_virtual_machine_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_mssql_virtual_machine_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sql_image_offer":{"type":"string","required":true},"sql_image_sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"wsfc_domain_profile":{"nesting_mode":3,"block":{"attributes":{"cluster_bootstrap_account_name":{"type":"string","optional":true},"cluster_operator_account_name":{"type":"string","optional":true},"cluster_subnet_type":{"type":"string","required":true},"fqdn":{"type":"string","required":true},"organizational_unit_path":{"type":"string","optional":true},"sql_service_account_name":{"type":"string","optional":true},"storage_account_primary_key":{"type":"string","optional":true},"storage_account_url":{"type":"string","optional":true}}},"required":true}}}},"azurerm_mssql_virtual_network_rule":{"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_mysql_flexible_database":{"block":{"attributes":{"charset":{"type":"string","required":true},"collation":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_password":{"type":"string","optional":true,"conflicts_with":["administrator_password_wo"]},"administrator_password_wo":{"type":"string","optional":true,"conflicts_with":["administrator_password"],"required_with":["administrator_password_wo_version"]},"administrator_password_wo_version":{"type":"number","optional":true,"required_with":["administrator_password_wo"]},"backup_retention_days":{"type":"number","optional":true,"default":7},"create_mode":{"type":"string","optional":true},"delegated_subnet_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"point_in_time_restore_time_in_utc":{"type":"string","optional":true},"private_dns_zone_id":{"type":"string","optional":true},"public_network_access":{"type":"string","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","computed":true},"replica_capacity":{"type":"number","computed":true},"replication_role":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"source_server_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"computed":true},"zone":{"type":"string","optional":true,"computed":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"geo_backup_key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.geo_backup_user_assigned_identity_id"]},"geo_backup_user_assigned_identity_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.primary_user_assigned_identity_id"]},"primary_user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"high_availability":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"standby_availability_zone":{"type":"string","optional":true,"computed":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true},"storage":{"nesting_mode":3,"block":{"attributes":{"auto_grow_enabled":{"type":"bool","optional":true,"default":true},"io_scaling_enabled":{"type":"bool","optional":true,"default":false},"iops":{"type":"number","optional":true,"computed":true},"log_on_disk_enabled":{"type":"bool","optional":true,"default":false},"size_gb":{"type":"number","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_mysql_flexible_server_active_directory_administrator":{"block":{"attributes":{"identity_id":{"type":"string","required":true},"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"server_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_mysql_flexible_server_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_nat_gateway":{"block":{"attributes":{"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_guid":{"type":"string","computed":true},"sku_name":{"type":"string","optional":true,"default":"Standard"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_nat_gateway_public_ip_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true}}}},"azurerm_nat_gateway_public_ip_prefix_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","required":true}}}},"azurerm_netapp_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"aes_encryption_enabled":{"type":"bool","optional":true,"default":false},"dns_servers":{"type":["list","string"],"required":true},"domain":{"type":"string","required":true},"kerberos_ad_name":{"type":"string","optional":true},"kerberos_kdc_ip":{"type":"string","optional":true},"ldap_over_tls_enabled":{"type":"bool","optional":true,"default":false,"required_with":["active_directory.0.server_root_ca_certificate"]},"ldap_signing_enabled":{"type":"bool","optional":true,"default":false},"local_nfs_users_with_ldap_allowed":{"type":"bool","optional":true,"default":false},"organizational_unit":{"type":"string","optional":true,"default":"CN=Computers"},"password":{"type":"string","required":true},"server_root_ca_certificate":{"type":"string","optional":true,"required_with":["active_directory.0.ldap_over_tls_enabled"]},"site_name":{"type":"string","optional":true,"default":"Default-First-Site-Name"},"smb_server_name":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_netapp_account_encryption":{"block":{"attributes":{"encryption_key":{"type":"string","required":true},"netapp_account_id":{"type":"string","required":true},"system_assigned_identity_principal_id":{"type":"string","optional":true,"conflicts_with":["user_assigned_identity_id"]},"user_assigned_identity_id":{"type":"string","optional":true,"conflicts_with":["system_assigned_identity_principal_id"]}}}},"azurerm_netapp_backup_policy":{"block":{"attributes":{"account_name":{"type":"string","required":true},"daily_backups_to_keep":{"type":"number","optional":true,"default":2},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"monthly_backups_to_keep":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"weekly_backups_to_keep":{"type":"number","optional":true,"default":1}}}},"azurerm_netapp_backup_vault":{"block":{"attributes":{"account_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_netapp_pool":{"block":{"attributes":{"account_name":{"type":"string","required":true},"encryption_type":{"type":"string","optional":true,"default":"Single"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"qos_type":{"type":"string","optional":true,"default":"Auto"},"resource_group_name":{"type":"string","required":true},"service_level":{"type":"string","required":true},"size_in_tb":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_netapp_snapshot":{"block":{"attributes":{"account_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"pool_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}}},"azurerm_netapp_snapshot_policy":{"block":{"attributes":{"account_name":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"daily_schedule":{"nesting_mode":3,"block":{"attributes":{"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"hourly_schedule":{"nesting_mode":3,"block":{"attributes":{"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"monthly_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_month":{"type":["set","number"],"required":true},"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true},"weekly_schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"required":true},"hour":{"type":"number","required":true},"minute":{"type":"number","required":true},"snapshots_to_keep":{"type":"number","required":true}}},"optional":true}}}},"azurerm_netapp_volume":{"block":{"attributes":{"account_name":{"type":"string","required":true},"azure_vmware_data_store_enabled":{"type":"bool","optional":true,"default":false},"create_from_snapshot_resource_id":{"type":"string","optional":true},"encryption_key_source":{"type":"string","optional":true,"computed":true},"kerberos_enabled":{"type":"bool","optional":true},"key_vault_private_endpoint_id":{"type":"string","optional":true,"computed":true,"required_with":["encryption_key_source"]},"location":{"type":"string","required":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"network_features":{"type":"string","optional":true,"computed":true},"pool_name":{"type":"string","required":true},"protocols":{"type":["set","string"],"optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"security_style":{"type":"string","optional":true,"computed":true},"service_level":{"type":"string","required":true},"smb3_protocol_encryption_enabled":{"type":"bool","optional":true},"smb_access_based_enumeration_enabled":{"type":"bool","optional":true,"default":false},"smb_continuous_availability_enabled":{"type":"bool","optional":true},"smb_non_browsable_enabled":{"type":"bool","optional":true,"default":false},"snapshot_directory_visible":{"type":"bool","optional":true,"default":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","optional":true,"computed":true},"volume_path":{"type":"string","required":true},"zone":{"type":"string","optional":true}},"block_types":{"data_protection_backup_policy":{"nesting_mode":3,"block":{"attributes":{"backup_policy_id":{"type":"string","required":true},"backup_vault_id":{"type":"string","required":true},"policy_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"data_protection_replication":{"nesting_mode":3,"block":{"attributes":{"endpoint_type":{"type":"string","optional":true,"default":"dst"},"remote_volume_location":{"type":"string","required":true},"remote_volume_resource_id":{"type":"string","required":true},"replication_frequency":{"type":"string","required":true}}},"optional":true},"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":["set","string"],"required":true},"kerberos_5_read_only_enabled":{"type":"bool","optional":true},"kerberos_5_read_write_enabled":{"type":"bool","optional":true},"kerberos_5i_read_only_enabled":{"type":"bool","optional":true},"kerberos_5i_read_write_enabled":{"type":"bool","optional":true},"kerberos_5p_read_only_enabled":{"type":"bool","optional":true},"kerberos_5p_read_write_enabled":{"type":"bool","optional":true},"protocols_enabled":{"type":["list","string"],"optional":true},"root_access_enabled":{"type":"bool","optional":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true},"unix_read_write":{"type":"bool","optional":true}}},"optional":true}}}},"azurerm_netapp_volume_group_oracle":{"block":{"attributes":{"account_name":{"type":"string","required":true},"application_identifier":{"type":"string","required":true},"group_description":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"volume":{"nesting_mode":3,"block":{"attributes":{"capacity_pool_id":{"type":"string","required":true},"encryption_key_source":{"type":"string","optional":true,"computed":true},"id":{"type":"string","computed":true},"key_vault_private_endpoint_id":{"type":"string","optional":true,"computed":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"network_features":{"type":"string","optional":true,"computed":true},"protocols":{"type":["list","string"],"required":true},"proximity_placement_group_id":{"type":"string","optional":true},"security_style":{"type":"string","required":true},"service_level":{"type":"string","required":true},"snapshot_directory_visible":{"type":"bool","required":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","required":true},"volume_path":{"type":"string","required":true},"volume_spec_name":{"type":"string","required":true},"zone":{"type":"string","optional":true}},"block_types":{"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true,"computed":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","required":true},"nfsv41_enabled":{"type":"bool","required":true},"root_access_enabled":{"type":"bool","optional":true,"default":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true,"default":false},"unix_read_write":{"type":"bool","optional":true,"default":true}}},"required":true}}},"required":true}}}},"azurerm_netapp_volume_group_sap_hana":{"block":{"attributes":{"account_name":{"type":"string","required":true},"application_identifier":{"type":"string","required":true},"group_description":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"volume":{"nesting_mode":3,"block":{"attributes":{"capacity_pool_id":{"type":"string","required":true},"id":{"type":"string","computed":true},"mount_ip_addresses":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"protocols":{"type":["list","string"],"required":true},"proximity_placement_group_id":{"type":"string","optional":true},"security_style":{"type":"string","required":true},"service_level":{"type":"string","required":true},"snapshot_directory_visible":{"type":"bool","required":true},"storage_quota_in_gb":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"throughput_in_mibps":{"type":"number","required":true},"volume_path":{"type":"string","required":true},"volume_spec_name":{"type":"string","required":true}},"block_types":{"data_protection_replication":{"nesting_mode":3,"block":{"attributes":{"endpoint_type":{"type":"string","optional":true,"default":"dst"},"remote_volume_location":{"type":"string","required":true},"remote_volume_resource_id":{"type":"string","required":true},"replication_frequency":{"type":"string","required":true}}},"optional":true},"data_protection_snapshot_policy":{"nesting_mode":3,"block":{"attributes":{"snapshot_policy_id":{"type":"string","required":true}}},"optional":true,"computed":true},"export_policy_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_clients":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","required":true},"nfsv41_enabled":{"type":"bool","required":true},"root_access_enabled":{"type":"bool","optional":true,"default":true},"rule_index":{"type":"number","required":true},"unix_read_only":{"type":"bool","optional":true,"default":false},"unix_read_write":{"type":"bool","optional":true,"default":true}}},"required":true}}},"required":true}}}},"azurerm_netapp_volume_quota_rule":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"quota_size_in_kib":{"type":"number","required":true},"quota_target":{"type":"string","optional":true},"quota_type":{"type":"string","required":true},"volume_id":{"type":"string","required":true}}}},"azurerm_network_connection_monitor":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"notes":{"type":"string","optional":true},"output_workspace_resource_ids":{"type":["set","string"],"optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"endpoint":{"nesting_mode":4,"block":{"attributes":{"address":{"type":"string","optional":true},"coverage_level":{"type":"string","optional":true},"excluded_ip_addresses":{"type":["set","string"],"optional":true},"included_ip_addresses":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"target_resource_id":{"type":"string","optional":true},"target_resource_type":{"type":"string","optional":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"Include"}},"block_types":{"item":{"nesting_mode":4,"block":{"attributes":{"address":{"type":"string","optional":true},"type":{"type":"string","optional":true,"default":"AgentAddress"}}},"optional":true}}},"optional":true}}},"required":true},"test_configuration":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"preferred_ip_version":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"test_frequency_in_seconds":{"type":"number","optional":true,"default":60}},"block_types":{"http_configuration":{"nesting_mode":3,"block":{"attributes":{"method":{"type":"string","optional":true,"default":"Get"},"path":{"type":"string","optional":true},"port":{"type":"number","optional":true},"prefer_https":{"type":"bool","optional":true,"default":false},"valid_status_code_ranges":{"type":["set","string"],"optional":true}},"block_types":{"request_header":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"icmp_configuration":{"nesting_mode":3,"block":{"attributes":{"trace_route_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"success_threshold":{"nesting_mode":3,"block":{"attributes":{"checks_failed_percent":{"type":"number","optional":true},"round_trip_time_ms":{"type":"number","optional":true}}},"optional":true},"tcp_configuration":{"nesting_mode":3,"block":{"attributes":{"destination_port_behavior":{"type":"string","optional":true},"port":{"type":"number","required":true},"trace_route_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}},"required":true},"test_group":{"nesting_mode":4,"block":{"attributes":{"destination_endpoints":{"type":["set","string"],"required":true},"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"source_endpoints":{"type":["set","string"],"required":true},"test_configuration_names":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_network_ddos_protection_plan":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_ids":{"type":["list","string"],"computed":true}}}},"azurerm_network_function_azure_traffic_collector":{"block":{"attributes":{"collector_policy_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":["list","string"],"computed":true}}}},"azurerm_network_function_collector_policy":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"traffic_collector_id":{"type":"string","required":true}},"block_types":{"ipfx_emission":{"nesting_mode":3,"block":{"attributes":{"destination_types":{"type":["list","string"],"required":true}}},"required":true},"ipfx_ingestion":{"nesting_mode":3,"block":{"attributes":{"source_resource_ids":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_network_interface":{"block":{"attributes":{"accelerated_networking_enabled":{"type":"bool","optional":true,"default":false},"applied_dns_servers":{"type":["list","string"],"computed":true},"auxiliary_mode":{"type":"string","optional":true,"required_with":["auxiliary_sku"]},"auxiliary_sku":{"type":"string","optional":true,"required_with":["auxiliary_mode"]},"dns_servers":{"type":["list","string"],"optional":true},"edge_zone":{"type":"string","optional":true},"internal_dns_name_label":{"type":"string","optional":true},"internal_domain_name_suffix":{"type":"string","computed":true},"ip_forwarding_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"mac_address":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","computed":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway_load_balancer_frontend_ip_configuration_id":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"computed":true},"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_address_allocation":{"type":"string","required":true},"private_ip_address_version":{"type":"string","optional":true,"default":"IPv4"},"public_ip_address_id":{"type":"string","optional":true},"subnet_id":{"type":"string","optional":true}}},"required":true}}}},"azurerm_network_interface_application_gateway_backend_address_pool_association":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","required":true},"ip_configuration_name":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_application_security_group_association":{"block":{"attributes":{"application_security_group_id":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_backend_address_pool_association":{"block":{"attributes":{"backend_address_pool_id":{"type":"string","required":true},"ip_configuration_name":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_nat_rule_association":{"block":{"attributes":{"ip_configuration_name":{"type":"string","required":true},"nat_rule_id":{"type":"string","required":true},"network_interface_id":{"type":"string","required":true}}}},"azurerm_network_interface_security_group_association":{"block":{"attributes":{"network_interface_id":{"type":"string","required":true},"network_security_group_id":{"type":"string","required":true}}}},"azurerm_network_manager":{"block":{"attributes":{"cross_tenant_scopes":{"type":["list",["object",{"management_groups":["list","string"],"subscriptions":["list","string"],"tenant_id":"string"}]],"computed":true},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scope_accesses":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"scope":{"nesting_mode":3,"block":{"attributes":{"management_group_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["scope.0.management_group_ids","scope.0.subscription_ids"]},"subscription_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["scope.0.management_group_ids","scope.0.subscription_ids"]}}},"required":true}}}},"azurerm_network_manager_admin_rule":{"block":{"attributes":{"action":{"type":"string","required":true},"admin_rule_collection_id":{"type":"string","required":true},"description":{"type":"string","optional":true},"destination_port_ranges":{"type":["list","string"],"optional":true},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"priority":{"type":"number","required":true},"protocol":{"type":"string","required":true},"source_port_ranges":{"type":["list","string"],"optional":true}},"block_types":{"destination":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"address_prefix_type":{"type":"string","required":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"address_prefix_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_network_manager_admin_rule_collection":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_group_ids":{"type":["list","string"],"required":true},"security_admin_configuration_id":{"type":"string","required":true}}}},"azurerm_network_manager_connectivity_configuration":{"block":{"attributes":{"connectivity_topology":{"type":"string","required":true},"delete_existing_peering_enabled":{"type":"bool","optional":true},"description":{"type":"string","optional":true},"global_mesh_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}},"block_types":{"applies_to_group":{"nesting_mode":3,"block":{"attributes":{"global_mesh_enabled":{"type":"bool","optional":true},"group_connectivity":{"type":"string","required":true},"network_group_id":{"type":"string","required":true},"use_hub_gateway":{"type":"bool","optional":true}}},"required":true},"hub":{"nesting_mode":3,"block":{"attributes":{"resource_id":{"type":"string","required":true},"resource_type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_network_manager_deployment":{"block":{"attributes":{"configuration_ids":{"type":["list","string"],"required":true},"location":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"scope_access":{"type":"string","required":true},"triggers":{"type":["map","string"],"optional":true}}}},"azurerm_network_manager_ipam_pool":{"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"parent_pool_name":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_network_manager_management_group_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"management_group_id":{"type":"string","required":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_network_group":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_scope_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"target_scope_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_network_manager_security_admin_configuration":{"block":{"attributes":{"apply_on_network_intent_policy_based_services":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true}}}},"azurerm_network_manager_static_member":{"block":{"attributes":{"name":{"type":"string","required":true},"network_group_id":{"type":"string","required":true},"region":{"type":"string","computed":true},"target_virtual_network_id":{"type":"string","required":true}}}},"azurerm_network_manager_subscription_connection":{"block":{"attributes":{"connection_state":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_network_manager_verifier_workspace":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_manager_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_network_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_network_profile":{"block":{"attributes":{"container_network_interface_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"container_network_interface":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_network_security_group":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"security_rule":{"type":["set",["object",{"access":"string","description":"string","destination_address_prefix":"string","destination_address_prefixes":["set","string"],"destination_application_security_group_ids":["set","string"],"destination_port_range":"string","destination_port_ranges":["set","string"],"direction":"string","name":"string","priority":"number","protocol":"string","source_address_prefix":"string","source_address_prefixes":["set","string"],"source_application_security_group_ids":["set","string"],"source_port_range":"string","source_port_ranges":["set","string"]}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_network_security_rule":{"block":{"attributes":{"access":{"type":"string","required":true},"description":{"type":"string","optional":true},"destination_address_prefix":{"type":"string","optional":true,"conflicts_with":["destination_address_prefixes"]},"destination_address_prefixes":{"type":["set","string"],"optional":true,"conflicts_with":["destination_address_prefix"]},"destination_application_security_group_ids":{"type":["set","string"],"optional":true},"destination_port_range":{"type":"string","optional":true,"conflicts_with":["destination_port_ranges"]},"destination_port_ranges":{"type":["set","string"],"optional":true,"conflicts_with":["destination_port_range"]},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"network_security_group_name":{"type":"string","required":true},"priority":{"type":"number","required":true},"protocol":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_address_prefix":{"type":"string","optional":true,"conflicts_with":["source_address_prefixes"]},"source_address_prefixes":{"type":["set","string"],"optional":true,"conflicts_with":["source_address_prefix"]},"source_application_security_group_ids":{"type":["set","string"],"optional":true},"source_port_range":{"type":"string","optional":true,"conflicts_with":["source_port_ranges"]},"source_port_ranges":{"type":["set","string"],"optional":true,"conflicts_with":["source_port_range"]}}}},"azurerm_network_watcher":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_network_watcher_flow_log":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"location":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["network_security_group_id","target_resource_id"]},"network_watcher_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"target_resource_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["network_security_group_id","target_resource_id"]},"version":{"type":"number","optional":true,"default":1}},"block_types":{"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","required":true},"enabled":{"type":"bool","required":true}}},"required":true},"traffic_analytics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"interval_in_minutes":{"type":"number","optional":true,"default":60},"workspace_id":{"type":"string","required":true},"workspace_region":{"type":"string","required":true},"workspace_resource_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_new_relic_monitor":{"block":{"attributes":{"account_creation_source":{"type":"string","optional":true,"default":"LIFTR"},"account_id":{"type":"string","optional":true,"computed":true},"ingestion_key":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"org_creation_source":{"type":"string","optional":true,"default":"LIFTR"},"organization_id":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"user_id":{"type":"string","optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"billing_cycle":{"type":"string","optional":true,"default":"MONTHLY"},"effective_date":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"newrelic-pay-as-you-go-free-live"},"usage_type":{"type":"string","optional":true,"default":"PAYG"}}},"required":true},"user":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"first_name":{"type":"string","required":true},"last_name":{"type":"string","required":true},"phone_number":{"type":"string","required":true}}},"required":true}}}},"azurerm_new_relic_tag_rule":{"block":{"attributes":{"activity_log_enabled":{"type":"bool","optional":true,"default":false},"azure_active_directory_log_enabled":{"type":"bool","optional":true,"default":false},"metric_enabled":{"type":"bool","optional":true,"default":false},"monitor_id":{"type":"string","required":true},"subscription_log_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"log_tag_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"metric_tag_filter":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}}},"azurerm_nginx_api_key":{"block":{"attributes":{"end_date_time":{"type":"string","required":true},"hint":{"type":"string","computed":true},"name":{"type":"string","required":true},"nginx_deployment_id":{"type":"string","required":true},"secret_text":{"type":"string","required":true}}}},"azurerm_nginx_certificate":{"block":{"attributes":{"certificate_virtual_path":{"type":"string","required":true},"key_vault_secret_id":{"type":"string","required":true},"key_virtual_path":{"type":"string","required":true},"name":{"type":"string","required":true},"nginx_deployment_id":{"type":"string","required":true}}}},"azurerm_nginx_configuration":{"block":{"attributes":{"nginx_deployment_id":{"type":"string","required":true},"package_data":{"type":"string","optional":true,"conflicts_with":["protected_file","config_file"],"at_least_one_of":["config_file","package_data"]},"root_file":{"type":"string","required":true}},"block_types":{"config_file":{"nesting_mode":4,"block":{"attributes":{"content":{"type":"string","required":true},"virtual_path":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["config_file","package_data"]},"protected_file":{"nesting_mode":4,"block":{"attributes":{"content":{"type":"string","required":true},"content_hash":{"type":"string","computed":true},"virtual_path":{"type":"string","required":true}}},"optional":true,"required_with":["config_file"]}}}},"azurerm_nginx_deployment":{"block":{"attributes":{"automatic_upgrade_channel":{"type":"string","optional":true,"default":"stable"},"capacity":{"type":"number","optional":true,"conflicts_with":["auto_scale_profile"]},"dataplane_api_endpoint":{"type":"string","computed":true},"diagnose_support_enabled":{"type":"bool","optional":true},"email":{"type":"string","optional":true},"ip_address":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_resource_group":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"nginx_version":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auto_scale_profile":{"nesting_mode":3,"block":{"attributes":{"max_capacity":{"type":"number","required":true},"min_capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["capacity"]},"frontend_private":{"nesting_mode":3,"block":{"attributes":{"allocation_method":{"type":"string","required":true},"ip_address":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["frontend_public"]},"frontend_public":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":["list","string"],"optional":true}}},"optional":true,"conflicts_with":["frontend_private"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logging_storage_account":{"nesting_mode":3,"block":{"attributes":{"container_name":{"type":"string","optional":true},"name":{"type":"string","optional":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"subnet_id":{"type":"string","required":true}}},"optional":true},"web_application_firewall":{"nesting_mode":3,"block":{"attributes":{"activation_state_enabled":{"type":"bool","required":true},"status":{"type":["list",["object",{"attack_signatures_package":["list",["object",{"revision_datetime":"string","version":"string"}]],"bot_signatures_package":["list",["object",{"revision_datetime":"string","version":"string"}]],"component_versions":["list",["object",{"waf_engine_version":"string","waf_nginx_version":"string"}]],"threat_campaigns_package":["list",["object",{"revision_datetime":"string","version":"string"}]]}]],"computed":true}}},"optional":true}}}},"azurerm_notification_hub":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"apns_credential":{"nesting_mode":3,"block":{"attributes":{"application_mode":{"type":"string","required":true},"bundle_id":{"type":"string","required":true},"key_id":{"type":"string","required":true},"team_id":{"type":"string","required":true},"token":{"type":"string","required":true}}},"optional":true},"browser_credential":{"nesting_mode":3,"block":{"attributes":{"subject":{"type":"string","required":true},"vapid_private_key":{"type":"string","required":true},"vapid_public_key":{"type":"string","required":true}}},"optional":true},"gcm_credential":{"nesting_mode":3,"block":{"attributes":{"api_key":{"type":"string","required":true}}},"optional":true}}}},"azurerm_notification_hub_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"notification_hub_name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_notification_hub_namespace":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"namespace_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"servicebus_endpoint":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_oracle_autonomous_database":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"auto_scaling_enabled":{"type":"bool","required":true},"auto_scaling_for_storage_enabled":{"type":"bool","required":true},"backup_retention_period_in_days":{"type":"number","required":true},"character_set":{"type":"string","required":true},"compute_count":{"type":"number","required":true},"compute_model":{"type":"string","required":true},"customer_contacts":{"type":["list","string"],"optional":true,"computed":true},"data_storage_size_in_tbs":{"type":"number","required":true},"db_version":{"type":"string","required":true},"db_workload":{"type":"string","required":true},"display_name":{"type":"string","required":true},"license_model":{"type":"string","required":true},"location":{"type":"string","required":true},"mtls_connection_required":{"type":"bool","required":true},"name":{"type":"string","required":true},"national_character_set":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_oracle_cloud_vm_cluster":{"block":{"attributes":{"backup_subnet_cidr":{"type":"string","optional":true},"cloud_exadata_infrastructure_id":{"type":"string","required":true},"cluster_name":{"type":"string","optional":true,"computed":true},"cpu_core_count":{"type":"number","required":true},"data_storage_percentage":{"type":"number","optional":true,"computed":true},"data_storage_size_in_tbs":{"type":"number","optional":true,"computed":true},"db_node_storage_size_in_gbs":{"type":"number","optional":true,"computed":true},"db_servers":{"type":["list","string"],"required":true},"display_name":{"type":"string","required":true},"domain":{"type":"string","optional":true,"computed":true},"gi_version":{"type":"string","required":true},"hostname":{"type":"string","required":true},"hostname_actual":{"type":"string","computed":true},"license_model":{"type":"string","required":true},"local_backup_enabled":{"type":"bool","optional":true,"computed":true},"location":{"type":"string","required":true},"memory_size_in_gbs":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"ocid":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"scan_listener_port_tcp":{"type":"number","optional":true,"default":1521},"scan_listener_port_tcp_ssl":{"type":"number","optional":true,"default":2484},"sparse_diskgroup_enabled":{"type":"bool","optional":true,"computed":true},"ssh_public_keys":{"type":["list","string"],"required":true},"subnet_id":{"type":"string","required":true},"system_version":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"time_zone":{"type":"string","optional":true,"computed":true},"virtual_network_id":{"type":"string","required":true},"zone_id":{"type":"string","optional":true,"computed":true}},"block_types":{"data_collection_options":{"nesting_mode":3,"block":{"attributes":{"diagnostics_events_enabled":{"type":"bool","optional":true,"computed":true},"health_monitoring_enabled":{"type":"bool","optional":true,"computed":true},"incident_logs_enabled":{"type":"bool","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_oracle_exadata_infrastructure":{"block":{"attributes":{"compute_count":{"type":"number","required":true},"customer_contacts":{"type":["list","string"],"optional":true,"computed":true},"display_name":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shape":{"type":"string","required":true},"storage_count":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"required":true}},"block_types":{"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["list","string"],"optional":true,"computed":true},"hours_of_day":{"type":["list","number"],"optional":true,"computed":true},"lead_time_in_weeks":{"type":"number","optional":true,"computed":true},"months":{"type":["list","string"],"optional":true,"computed":true},"patching_mode":{"type":"string","optional":true,"computed":true},"preference":{"type":"string","optional":true,"computed":true},"weeks_of_month":{"type":["list","number"],"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_orbital_contact":{"block":{"attributes":{"contact_profile_id":{"type":"string","required":true},"ground_station_name":{"type":"string","required":true},"name":{"type":"string","required":true},"reservation_end_time":{"type":"string","required":true},"reservation_start_time":{"type":"string","required":true},"spacecraft_id":{"type":"string","required":true}}}},"azurerm_orbital_contact_profile":{"block":{"attributes":{"auto_tracking":{"type":"string","required":true},"event_hub_uri":{"type":"string","optional":true},"location":{"type":"string","required":true},"minimum_elevation_degrees":{"type":"number","optional":true},"minimum_variable_contact_duration":{"type":"string","required":true},"name":{"type":"string","required":true},"network_configuration_subnet_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"links":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"polarization":{"type":"string","required":true}},"block_types":{"channels":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mhz":{"type":"number","required":true},"center_frequency_mhz":{"type":"number","required":true},"demodulation_configuration":{"type":"string","optional":true},"modulation_configuration":{"type":"string","optional":true},"name":{"type":"string","required":true}},"block_types":{"end_point":{"nesting_mode":4,"block":{"attributes":{"end_point_name":{"type":"string","required":true},"ip_address":{"type":"string","optional":true},"port":{"type":"string","required":true},"protocol":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true}}}},"azurerm_orbital_spacecraft":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"norad_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"title_line":{"type":"string","required":true},"two_line_elements":{"type":["list","string"],"required":true}},"block_types":{"links":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mhz":{"type":"number","required":true},"center_frequency_mhz":{"type":"number","required":true},"direction":{"type":"string","required":true},"name":{"type":"string","required":true},"polarization":{"type":"string","required":true}}},"required":true}}}},"azurerm_orchestrated_virtual_machine_scale_set":{"block":{"attributes":{"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"instances":{"type":"number","optional":true,"computed":true},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"platform_fault_domain_count":{"type":"number","required":true},"priority":{"type":"string","optional":true,"default":"Regular"},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"single_placement_group":{"type":"bool","optional":true,"computed":true},"sku_name":{"type":"string","optional":true},"source_image_id":{"type":"string","optional":true,"conflicts_with":["source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"unique_id":{"type":"string","computed":true},"upgrade_mode":{"type":"string","optional":true,"default":"Manual"},"user_data_base64":{"type":"string","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","optional":true,"computed":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version_enabled":{"type":"bool","optional":true,"default":true},"extensions_to_provision_after_vm_creation":{"type":["list","string"],"optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"force_extension_execution_on_change":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"sku_name":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"optional":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"custom_data":{"type":"string","optional":true}},"block_types":{"linux_configuration":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"disable_password_authentication":{"type":"bool","optional":true,"default":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"ImageDefault"},"provision_vm_agent":{"type":"bool","optional":true,"default":true}},"block_types":{"admin_ssh_key":{"nesting_mode":4,"block":{"attributes":{"public_key":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"url":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true},"windows_configuration":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"hotpatching_enabled":{"type":"bool","optional":true,"default":false},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"AutomaticByOS"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"timezone":{"type":"string","optional":true}},"block_types":{"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"priority_mix":{"nesting_mode":3,"block":{"attributes":{"base_regular_count":{"type":"number","optional":true,"default":0},"regular_percentage_above_base":{"type":"number","optional":true,"default":0}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"cross_zone_upgrades_enabled":{"type":"bool","optional":true},"max_batch_instance_percent":{"type":"number","required":true},"max_unhealthy_instance_percent":{"type":"number","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"number","required":true},"maximum_surge_instances_enabled":{"type":"bool","optional":true},"pause_time_between_batches":{"type":"string","required":true},"prioritize_unhealthy_instances_enabled":{"type":"bool","optional":true}}},"optional":true},"sku_profile":{"nesting_mode":3,"block":{"attributes":{"allocation_strategy":{"type":"string","required":true},"vm_sizes":{"type":["set","string"],"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"conflicts_with":["source_image_id"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true}}}},"azurerm_palo_alto_local_rulestack":{"block":{"attributes":{"anti_spyware_profile":{"type":"string","optional":true},"anti_virus_profile":{"type":"string","optional":true},"description":{"type":"string","optional":true},"dns_subscription":{"type":"string","optional":true},"file_blocking_profile":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"url_filtering_profile":{"type":"string","optional":true},"vulnerability_profile":{"type":"string","optional":true}}}},"azurerm_palo_alto_local_rulestack_certificate":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"key_vault_certificate_id":{"type":"string","optional":true,"exactly_one_of":["self_signed","key_vault_certificate_id"]},"name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"self_signed":{"type":"bool","optional":true,"default":false,"exactly_one_of":["key_vault_certificate_id","self_signed"]}}}},"azurerm_palo_alto_local_rulestack_fqdn_list":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"fully_qualified_domain_names":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_outbound_trust_certificate_association":{"block":{"attributes":{"certificate_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_outbound_untrust_certificate_association":{"block":{"attributes":{"certificate_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_prefix_list":{"block":{"attributes":{"audit_comment":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"prefix_list":{"type":["list","string"],"required":true},"rulestack_id":{"type":"string","required":true}}}},"azurerm_palo_alto_local_rulestack_rule":{"block":{"attributes":{"action":{"type":"string","required":true},"applications":{"type":["list","string"],"required":true},"audit_comment":{"type":"string","optional":true},"decryption_rule_type":{"type":"string","optional":true,"default":"None"},"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"inspection_certificate_id":{"type":"string","optional":true},"logging_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"negate_destination":{"type":"bool","optional":true,"default":false},"negate_source":{"type":"bool","optional":true,"default":false},"priority":{"type":"number","required":true},"protocol":{"type":"string","optional":true,"exactly_one_of":["protocol","protocol_ports"]},"protocol_ports":{"type":["list","string"],"optional":true,"exactly_one_of":["protocol","protocol_ports"]},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"category":{"nesting_mode":3,"block":{"attributes":{"custom_urls":{"type":["list","string"],"required":true},"feeds":{"type":["list","string"],"optional":true}}},"optional":true},"destination":{"nesting_mode":3,"block":{"attributes":{"cidrs":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"countries":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"feeds":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"local_rulestack_fqdn_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]},"local_rulestack_prefix_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["destination.0.cidrs","destination.0.countries","destination.0.feeds","destination.0.local_rulestack_fqdn_list_ids","destination.0.local_rulestack_prefix_list_ids"]}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"cidrs":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"countries":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"feeds":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]},"local_rulestack_prefix_list_ids":{"type":["list","string"],"optional":true,"at_least_one_of":["source.0.cidrs","source.0.countries","source.0.feeds","source.0.local_rulestack_prefix_list_ids"]}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack":{"block":{"attributes":{"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"network_virtual_appliance_id":{"type":"string","required":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true},"trusted_subnet_id":{"type":"string","computed":true},"untrusted_subnet_id":{"type":"string","computed":true},"virtual_hub_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"panorama":{"type":["list",["object",{"device_group_name":"string","host_name":"string","name":"string","panorama_server_1":"string","panorama_server_2":"string","template_name":"string","virtual_machine_ssh_key":"string"}]],"computed":true},"panorama_base64_config":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"network_virtual_appliance_id":{"type":"string","required":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true},"trusted_subnet_id":{"type":"string","computed":true},"untrusted_subnet_id":{"type":"string","computed":true},"virtual_hub_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack":{"block":{"attributes":{"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"rulestack_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true}},"block_types":{"vnet_configuration":{"nesting_mode":3,"block":{"attributes":{"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"trusted_subnet_id":{"type":"string","optional":true},"untrusted_subnet_id":{"type":"string","optional":true},"virtual_network_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_palo_alto_next_generation_firewall_virtual_network_panorama":{"block":{"attributes":{"location":{"type":"string","required":true},"marketplace_offer_id":{"type":"string","optional":true,"default":"pan_swfw_cloud_ngfw"},"name":{"type":"string","required":true},"panorama":{"type":["list",["object",{"device_group_name":"string","host_name":"string","name":"string","panorama_server_1":"string","panorama_server_2":"string","template_name":"string","virtual_machine_ssh_key":"string"}]],"computed":true},"panorama_base64_config":{"type":"string","required":true},"plan_id":{"type":"string","optional":true,"default":"panw-cloud-ngfw-payg"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"destination_nat":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"protocol":{"type":"string","required":true}},"block_types":{"backend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address":{"type":"string","required":true}}},"optional":true},"frontend_config":{"nesting_mode":3,"block":{"attributes":{"port":{"type":"number","required":true},"public_ip_address_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"dns_settings":{"nesting_mode":3,"block":{"attributes":{"azure_dns_servers":{"type":["list","string"],"computed":true},"dns_servers":{"type":["list","string"],"optional":true,"conflicts_with":["dns_settings.0.use_azure_dns"]},"use_azure_dns":{"type":"bool","optional":true,"default":false,"conflicts_with":["dns_settings.0.dns_servers"]}}},"optional":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"egress_nat_ip_address_ids":{"type":["list","string"],"optional":true},"egress_nat_ip_addresses":{"type":["list","string"],"computed":true},"public_ip_address_ids":{"type":["list","string"],"required":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"trusted_address_ranges":{"type":["list","string"],"optional":true}},"block_types":{"vnet_configuration":{"nesting_mode":3,"block":{"attributes":{"ip_of_trust_for_user_defined_routes":{"type":"string","computed":true},"trusted_subnet_id":{"type":"string","optional":true},"untrusted_subnet_id":{"type":"string","optional":true},"virtual_network_id":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_palo_alto_virtual_network_appliance":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_pim_active_role_assignment":{"block":{"attributes":{"justification":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"start_date_time":{"type":"string","optional":true,"computed":true}},"block_types":{"expiration":{"nesting_mode":3,"block":{"attributes":{"duration_days":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_hours","schedule.0.expiration.0.end_date_time"]},"duration_hours":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.end_date_time"]},"end_date_time":{"type":"string","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.duration_hours"]}}},"optional":true}}},"optional":true,"computed":true},"ticket":{"nesting_mode":3,"block":{"attributes":{"number":{"type":"string","optional":true},"system":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_pim_eligible_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true,"required_with":["condition_version"]},"condition_version":{"type":"string","optional":true,"required_with":["condition"]},"justification":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"start_date_time":{"type":"string","optional":true,"computed":true}},"block_types":{"expiration":{"nesting_mode":3,"block":{"attributes":{"duration_days":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_hours","schedule.0.expiration.0.end_date_time"]},"duration_hours":{"type":"number","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.end_date_time"]},"end_date_time":{"type":"string","optional":true,"computed":true,"conflicts_with":["schedule.0.expiration.0.duration_days","schedule.0.expiration.0.duration_hours"]}}},"optional":true}}},"optional":true,"computed":true},"ticket":{"nesting_mode":3,"block":{"attributes":{"number":{"type":"string","optional":true},"system":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_point_to_site_vpn_gateway":{"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_preference_internet_enabled":{"type":"bool","optional":true,"default":false},"scale_unit":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true},"vpn_server_configuration_id":{"type":"string","required":true}},"block_types":{"connection_configuration":{"nesting_mode":3,"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true}},"block_types":{"route":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","required":true},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"ids":{"type":["list","string"],"required":true},"labels":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true,"computed":true},"vpn_client_address_pool":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"required":true}}},"required":true}}},"required":true}}}},"azurerm_policy_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"management_group_id":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"mode":{"type":"string","required":true},"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"policy_rule":{"type":"string","optional":true},"policy_type":{"type":"string","required":true},"role_definition_ids":{"type":["list","string"],"computed":true}}}},"azurerm_policy_set_definition":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"management_group_id":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"parameters":{"type":"string","optional":true},"policy_type":{"type":"string","required":true}},"block_types":{"policy_definition_group":{"nesting_mode":4,"block":{"attributes":{"additional_metadata_resource_id":{"type":"string","optional":true},"category":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"name":{"type":"string","required":true}}},"optional":true},"policy_definition_reference":{"nesting_mode":3,"block":{"attributes":{"parameter_values":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"policy_group_names":{"type":["set","string"],"optional":true},"reference_id":{"type":"string","optional":true,"computed":true}}},"required":true}}}},"azurerm_policy_virtual_machine_configuration_assignment":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"configuration":{"nesting_mode":3,"block":{"attributes":{"assignment_type":{"type":"string","optional":true},"content_hash":{"type":"string","optional":true,"computed":true},"content_uri":{"type":"string","optional":true,"computed":true},"version":{"type":"string","optional":true}},"block_types":{"parameter":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_portal_dashboard":{"block":{"attributes":{"dashboard_properties":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_portal_tenant_configuration":{"block":{"attributes":{"private_markdown_storage_enforced":{"type":"bool","required":true}}}},"azurerm_postgresql_active_directory_administrator":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_postgresql_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_postgresql_database":{"block":{"attributes":{"charset":{"type":"string","required":true},"collation":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true}}}},"azurerm_postgresql_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_password":{"type":"string","optional":true,"conflicts_with":["administrator_password_wo"]},"administrator_password_wo":{"type":"string","optional":true,"conflicts_with":["administrator_password"],"required_with":["administrator_password_wo_version"]},"administrator_password_wo_version":{"type":"number","optional":true,"required_with":["administrator_password_wo"]},"auto_grow_enabled":{"type":"bool","optional":true,"default":false},"backup_retention_days":{"type":"number","optional":true,"computed":true},"create_mode":{"type":"string","optional":true},"delegated_subnet_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"point_in_time_restore_time_in_utc":{"type":"string","optional":true},"private_dns_zone_id":{"type":"string","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"replication_role":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"computed":true},"source_server_id":{"type":"string","optional":true},"storage_mb":{"type":"number","optional":true,"computed":true},"storage_tier":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","optional":true,"computed":true},"zone":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"active_directory_auth_enabled":{"type":"bool","optional":true,"default":false},"password_auth_enabled":{"type":"bool","optional":true,"default":true},"tenant_id":{"type":"string","optional":true,"required_with":["authentication.0.active_directory_auth_enabled"]}}},"optional":true,"computed":true},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"geo_backup_key_vault_key_id":{"type":"string","optional":true,"required_with":["identity","customer_managed_key.0.geo_backup_user_assigned_identity_id"]},"geo_backup_user_assigned_identity_id":{"type":"string","optional":true},"key_vault_key_id":{"type":"string","required":true,"required_with":["identity","customer_managed_key.0.primary_user_assigned_identity_id"]},"primary_user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"high_availability":{"nesting_mode":3,"block":{"attributes":{"mode":{"type":"string","required":true},"standby_availability_zone":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"maintenance_window":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"number","optional":true,"default":0},"start_hour":{"type":"number","optional":true,"default":0},"start_minute":{"type":"number","optional":true,"default":0}}},"optional":true}}}},"azurerm_postgresql_flexible_server_active_directory_administrator":{"block":{"attributes":{"object_id":{"type":"string","required":true},"principal_name":{"type":"string","required":true},"principal_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_configuration":{"block":{"attributes":{"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"value":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_database":{"block":{"attributes":{"charset":{"type":"string","optional":true,"default":"UTF8"},"collation":{"type":"string","optional":true,"default":"en_US.utf8"},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"server_id":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true}}}},"azurerm_postgresql_flexible_server_virtual_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"replica_server_id":{"type":"string","required":true},"source_server_id":{"type":"string","required":true},"type":{"type":"string","required":true}}}},"azurerm_postgresql_server":{"block":{"attributes":{"administrator_login":{"type":"string","optional":true,"computed":true},"administrator_login_password":{"type":"string","optional":true,"conflicts_with":["administrator_login_password_wo"]},"administrator_login_password_wo":{"type":"string","optional":true,"conflicts_with":["administrator_login_password"],"required_with":["administrator_login_password_wo_version"]},"administrator_login_password_wo_version":{"type":"number","optional":true,"required_with":["administrator_login_password_wo"]},"auto_grow_enabled":{"type":"bool","optional":true,"default":true},"backup_retention_days":{"type":"number","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"creation_source_server_id":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"geo_redundant_backup_enabled":{"type":"bool","optional":true,"default":false},"infrastructure_encryption_enabled":{"type":"bool","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"restore_point_in_time":{"type":"string","optional":true},"sku_name":{"type":"string","required":true},"ssl_enforcement_enabled":{"type":"bool","required":true},"ssl_minimal_tls_version_enforced":{"type":"string","optional":true,"default":"TLS1_2"},"storage_mb":{"type":"number","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"threat_detection_policy":{"nesting_mode":3,"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"email_account_admins":{"type":"bool","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"email_addresses":{"type":["set","string"],"optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"enabled":{"type":"bool","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"retention_days":{"type":"number","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"storage_account_access_key":{"type":"string","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]},"storage_endpoint":{"type":"string","optional":true,"at_least_one_of":["threat_detection_policy.0.enabled","threat_detection_policy.0.disabled_alerts","threat_detection_policy.0.email_account_admins","threat_detection_policy.0.email_addresses","threat_detection_policy.0.retention_days","threat_detection_policy.0.storage_account_access_key","threat_detection_policy.0.storage_endpoint"]}}},"optional":true}}}},"azurerm_postgresql_server_key":{"block":{"attributes":{"key_vault_key_id":{"type":"string","required":true},"server_id":{"type":"string","required":true}}}},"azurerm_postgresql_virtual_network_rule":{"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_powerbi_embedded":{"block":{"attributes":{"administrators":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"mode":{"type":"string","optional":true,"default":"Gen1"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_a_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_aaaa_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_cname_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"record":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_mx_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","optional":true,"default":"@"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"exchange":{"type":"string","required":true},"preference":{"type":"number","required":true}}},"required":true}}}},"azurerm_private_dns_ptr_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"records":{"type":["set","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}}}},"azurerm_private_dns_resolver":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_dns_resolver_dns_forwarding_ruleset":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_outbound_endpoint_ids":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_resolver_forwarding_rule":{"block":{"attributes":{"dns_forwarding_ruleset_id":{"type":"string","required":true},"domain_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true}},"block_types":{"target_dns_servers":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","required":true},"port":{"type":"number","optional":true}}},"required":true}}}},"azurerm_private_dns_resolver_inbound_endpoint":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configurations":{"nesting_mode":3,"block":{"attributes":{"private_ip_address":{"type":"string","optional":true,"computed":true},"private_ip_allocation_method":{"type":"string","optional":true,"default":"Dynamic"},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_private_dns_resolver_outbound_endpoint":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_dns_resolver_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_private_dns_resolver_virtual_network_link":{"block":{"attributes":{"dns_forwarding_ruleset_id":{"type":"string","required":true},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_dns_srv_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"port":{"type":"number","required":true},"priority":{"type":"number","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","required":true}}},"required":true}}}},"azurerm_private_dns_txt_record":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","required":true},"zone_name":{"type":"string","required":true}},"block_types":{"record":{"nesting_mode":4,"block":{"attributes":{"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_private_dns_zone":{"block":{"attributes":{"max_number_of_record_sets":{"type":"number","computed":true},"max_number_of_virtual_network_links":{"type":"number","computed":true},"max_number_of_virtual_network_links_with_registration":{"type":"number","computed":true},"name":{"type":"string","required":true},"number_of_record_sets":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"soa_record":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","required":true},"expire_time":{"type":"number","optional":true,"default":2419200},"fqdn":{"type":"string","computed":true},"host_name":{"type":"string","computed":true},"minimum_ttl":{"type":"number","optional":true,"default":10},"refresh_time":{"type":"number","optional":true,"default":3600},"retry_time":{"type":"number","optional":true,"default":300},"serial_number":{"type":"number","computed":true},"tags":{"type":["map","string"],"optional":true},"ttl":{"type":"number","optional":true,"default":3600}}},"optional":true,"computed":true}}}},"azurerm_private_dns_zone_virtual_network_link":{"block":{"attributes":{"name":{"type":"string","required":true},"private_dns_zone_name":{"type":"string","required":true},"registration_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_private_endpoint":{"block":{"attributes":{"custom_dns_configs":{"type":["list",["object",{"fqdn":"string","ip_addresses":["list","string"]}]],"computed":true},"custom_network_interface_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_interface":{"type":["list",["object",{"id":"string","name":"string"}]],"computed":true},"private_dns_zone_configs":{"type":["list",["object",{"id":"string","name":"string","private_dns_zone_id":"string","record_sets":["list",["object",{"fqdn":"string","ip_addresses":["list","string"],"name":"string","ttl":"number","type":"string"}]]}]],"computed":true},"resource_group_name":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"member_name":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"private_ip_address":{"type":"string","required":true},"subresource_name":{"type":"string","optional":true}}},"optional":true},"private_dns_zone_group":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_dns_zone_ids":{"type":["list","string"],"required":true}}},"optional":true},"private_service_connection":{"nesting_mode":3,"block":{"attributes":{"is_manual_connection":{"type":"bool","required":true},"name":{"type":"string","required":true},"private_connection_resource_alias":{"type":"string","optional":true,"exactly_one_of":["private_service_connection.0.private_connection_resource_alias","private_service_connection.0.private_connection_resource_id"]},"private_connection_resource_id":{"type":"string","optional":true,"exactly_one_of":["private_service_connection.0.private_connection_resource_alias","private_service_connection.0.private_connection_resource_id"]},"private_ip_address":{"type":"string","computed":true},"request_message":{"type":"string","optional":true},"subresource_names":{"type":["list","string"],"optional":true}}},"required":true}}}},"azurerm_private_endpoint_application_security_group_association":{"block":{"attributes":{"application_security_group_id":{"type":"string","required":true},"private_endpoint_id":{"type":"string","required":true}}}},"azurerm_private_link_service":{"block":{"attributes":{"alias":{"type":"string","computed":true},"auto_approval_subscription_ids":{"type":["set","string"],"optional":true},"enable_proxy_protocol":{"type":"bool","optional":true},"fqdns":{"type":["list","string"],"optional":true},"load_balancer_frontend_ip_configuration_ids":{"type":["set","string"],"required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"visibility_subscription_ids":{"type":["set","string"],"optional":true}},"block_types":{"nat_ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"private_ip_address":{"type":"string","optional":true},"private_ip_address_version":{"type":"string","optional":true,"default":"IPv4"},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_proximity_placement_group":{"block":{"attributes":{"allowed_vm_sizes":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zone":{"type":"string","optional":true,"required_with":["allowed_vm_sizes"]}}}},"azurerm_public_ip":{"block":{"attributes":{"allocation_method":{"type":"string","required":true},"ddos_protection_mode":{"type":"string","optional":true,"default":"VirtualNetworkInherited"},"ddos_protection_plan_id":{"type":"string","optional":true},"domain_name_label":{"type":"string","optional":true},"domain_name_label_scope":{"type":"string","optional":true},"edge_zone":{"type":"string","optional":true},"fqdn":{"type":"string","computed":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"default":4},"ip_address":{"type":"string","computed":true},"ip_tags":{"type":["map","string"],"optional":true},"ip_version":{"type":"string","optional":true,"default":"IPv4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"reverse_fqdn":{"type":"string","optional":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_public_ip_prefix":{"block":{"attributes":{"ip_prefix":{"type":"string","computed":true},"ip_version":{"type":"string","optional":true,"default":"IPv4"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"prefix_length":{"type":"number","optional":true,"default":28},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Standard"},"sku_tier":{"type":"string","optional":true,"default":"Regional"},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_purview_account":{"block":{"attributes":{"atlas_kafka_endpoint_primary_connection_string":{"type":"string","computed":true},"atlas_kafka_endpoint_secondary_connection_string":{"type":"string","computed":true},"catalog_endpoint":{"type":"string","computed":true},"guardian_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_resources":{"type":["list",["object",{"event_hub_namespace_id":"string","resource_group_id":"string","storage_account_id":"string"}]],"computed":true},"name":{"type":"string","required":true},"public_network_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"scan_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_recovery_services_vault":{"block":{"attributes":{"classic_vmware_replication_enabled":{"type":"bool","optional":true},"cross_region_restore_enabled":{"type":"bool","optional":true,"default":false},"immutability":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"soft_delete_enabled":{"type":"bool","optional":true,"default":true},"storage_mode_type":{"type":"string","optional":true,"default":"GeoRedundant"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"encryption":{"nesting_mode":3,"block":{"attributes":{"infrastructure_encryption_enabled":{"type":"bool","required":true},"key_id":{"type":"string","required":true},"use_system_assigned_identity":{"type":"bool","optional":true,"default":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true,"required_with":["identity"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"monitoring":{"nesting_mode":3,"block":{"attributes":{"alerts_for_all_job_failures_enabled":{"type":"bool","optional":true,"default":true},"alerts_for_critical_operation_failures_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_recovery_services_vault_resource_guard_association":{"block":{"attributes":{"resource_guard_id":{"type":"string","required":true},"vault_id":{"type":"string","required":true}}}},"azurerm_redhat_openshift_cluster":{"block":{"attributes":{"console_url":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"api_server_profile":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","computed":true},"url":{"type":"string","computed":true},"visibility":{"type":"string","required":true}}},"required":true},"cluster_profile":{"nesting_mode":3,"block":{"attributes":{"domain":{"type":"string","required":true},"fips_enabled":{"type":"bool","optional":true,"default":false},"managed_resource_group_name":{"type":"string","optional":true},"pull_secret":{"type":"string","optional":true},"resource_group_id":{"type":"string","computed":true},"version":{"type":"string","required":true}}},"required":true},"ingress_profile":{"nesting_mode":3,"block":{"attributes":{"ip_address":{"type":"string","computed":true},"name":{"type":"string","computed":true},"visibility":{"type":"string","required":true}}},"required":true},"main_profile":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"encryption_at_host_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true},"vm_size":{"type":"string","required":true}}},"required":true},"network_profile":{"nesting_mode":3,"block":{"attributes":{"outbound_type":{"type":"string","optional":true,"default":"Loadbalancer"},"pod_cidr":{"type":"string","required":true},"preconfigured_network_security_group_enabled":{"type":"bool","optional":true,"default":false},"service_cidr":{"type":"string","required":true}}},"required":true},"service_principal":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","required":true}}},"required":true},"worker_profile":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"encryption_at_host_enabled":{"type":"bool","optional":true,"default":false},"node_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true},"vm_size":{"type":"string","required":true}}},"required":true}}}},"azurerm_redis_cache":{"block":{"attributes":{"access_keys_authentication_enabled":{"type":"bool","optional":true,"default":true},"capacity":{"type":"number","required":true},"family":{"type":"string","required":true},"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"non_ssl_port_enabled":{"type":"bool","optional":true,"default":false},"port":{"type":"number","computed":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"private_static_ip_address":{"type":"string","optional":true,"computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"redis_version":{"type":"string","optional":true,"default":"6"},"replicas_per_master":{"type":"number","optional":true,"computed":true},"replicas_per_primary":{"type":"number","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"shard_count":{"type":"number","optional":true},"sku_name":{"type":"string","required":true},"ssl_port":{"type":"number","computed":true},"subnet_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"tenant_settings":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"patch_schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"maintenance_window":{"type":"string","optional":true,"default":"PT5H"},"start_hour_utc":{"type":"number","optional":true}}},"optional":true},"redis_configuration":{"nesting_mode":3,"block":{"attributes":{"active_directory_authentication_enabled":{"type":"bool","optional":true},"aof_backup_enabled":{"type":"bool","optional":true},"aof_storage_connection_string_0":{"type":"string","optional":true},"aof_storage_connection_string_1":{"type":"string","optional":true},"authentication_enabled":{"type":"bool","optional":true,"default":true},"data_persistence_authentication_method":{"type":"string","optional":true},"maxclients":{"type":"number","computed":true},"maxfragmentationmemory_reserved":{"type":"number","optional":true,"computed":true},"maxmemory_delta":{"type":"number","optional":true,"computed":true},"maxmemory_policy":{"type":"string","optional":true,"default":"volatile-lru"},"maxmemory_reserved":{"type":"number","optional":true,"computed":true},"notify_keyspace_events":{"type":"string","optional":true},"rdb_backup_enabled":{"type":"bool","optional":true},"rdb_backup_frequency":{"type":"number","optional":true},"rdb_backup_max_snapshot_count":{"type":"number","optional":true},"rdb_storage_connection_string":{"type":"string","optional":true},"storage_account_subscription_id":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_redis_cache_access_policy":{"block":{"attributes":{"name":{"type":"string","required":true},"permissions":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true}}}},"azurerm_redis_cache_access_policy_assignment":{"block":{"attributes":{"access_policy_name":{"type":"string","required":true},"name":{"type":"string","required":true},"object_id":{"type":"string","required":true},"object_id_alias":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true}}}},"azurerm_redis_enterprise_cluster":{"block":{"attributes":{"hostname":{"type":"string","computed":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"zones":{"type":["set","string"],"optional":true}}}},"azurerm_redis_enterprise_database":{"block":{"attributes":{"client_protocol":{"type":"string","optional":true,"default":"Encrypted"},"cluster_id":{"type":"string","required":true},"clustering_policy":{"type":"string","optional":true,"default":"OSSCluster"},"eviction_policy":{"type":"string","optional":true,"default":"VolatileLRU"},"linked_database_group_nickname":{"type":"string","optional":true,"required_with":["linked_database_id"]},"linked_database_id":{"type":["set","string"],"optional":true},"name":{"type":"string","optional":true,"default":"default"},"port":{"type":"number","optional":true,"default":10000},"primary_access_key":{"type":"string","computed":true},"secondary_access_key":{"type":"string","computed":true}},"block_types":{"module":{"nesting_mode":3,"block":{"attributes":{"args":{"type":"string","optional":true,"default":""},"name":{"type":"string","required":true},"version":{"type":"string","computed":true}}},"optional":true}}}},"azurerm_redis_firewall_rule":{"block":{"attributes":{"end_ip":{"type":"string","required":true},"name":{"type":"string","required":true},"redis_cache_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"start_ip":{"type":"string","required":true}}}},"azurerm_redis_linked_server":{"block":{"attributes":{"geo_replicated_primary_host_name":{"type":"string","computed":true},"linked_redis_cache_id":{"type":"string","required":true},"linked_redis_cache_location":{"type":"string","required":true},"name":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"server_role":{"type":"string","required":true},"target_redis_cache_name":{"type":"string","required":true}}}},"azurerm_relay_hybrid_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"relay_namespace_name":{"type":"string","required":true},"requires_client_authorization":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"user_metadata":{"type":"string","optional":true}}}},"azurerm_relay_hybrid_connection_authorization_rule":{"block":{"attributes":{"hybrid_connection_name":{"type":"string","required":true},"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_relay_namespace":{"block":{"attributes":{"location":{"type":"string","required":true},"metric_id":{"type":"string","computed":true},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_relay_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_resource_deployment_script_azure_cli":{"block":{"attributes":{"cleanup_preference":{"type":"string","optional":true,"default":"Always"},"command_line":{"type":"string","optional":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":"string","computed":true},"primary_script_uri":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"resource_group_name":{"type":"string","required":true},"retention_interval":{"type":"string","required":true},"script_content":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"supporting_script_uris":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"string","optional":true,"default":"P1D"},"version":{"type":"string","required":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"container_group_name":{"type":"string","optional":true}}},"optional":true},"environment_variable":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"secure_value":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_deployment_script_azure_power_shell":{"block":{"attributes":{"cleanup_preference":{"type":"string","optional":true,"default":"Always"},"command_line":{"type":"string","optional":true},"force_update_tag":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outputs":{"type":"string","computed":true},"primary_script_uri":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"resource_group_name":{"type":"string","required":true},"retention_interval":{"type":"string","required":true},"script_content":{"type":"string","optional":true,"exactly_one_of":["primary_script_uri","script_content"]},"supporting_script_uris":{"type":["list","string"],"optional":true},"tags":{"type":["map","string"],"optional":true},"timeout":{"type":"string","optional":true,"default":"P1D"},"version":{"type":"string","required":true}},"block_types":{"container":{"nesting_mode":3,"block":{"attributes":{"container_group_name":{"type":"string","optional":true}}},"optional":true},"environment_variable":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"secure_value":{"type":"string","optional":true},"value":{"type":"string","optional":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"storage_account":{"nesting_mode":3,"block":{"attributes":{"key":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_group":{"block":{"attributes":{"location":{"type":"string","required":true},"managed_by":{"type":"string","optional":true},"name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_resource_group_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"file_format":{"type":"string","optional":true,"default":"Csv"},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_resource_group_cost_management_view":{"block":{"attributes":{"accumulated":{"type":"bool","required":true},"chart_type":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"report_type":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true},"timeframe":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"granularity":{"type":"string","required":true}},"block_types":{"aggregation":{"nesting_mode":4,"block":{"attributes":{"column_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"grouping":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true},"sorting":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true},"kpi":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"pivot":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_resource_group_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"resource_group_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_resource_group_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"resource_group_id":{"type":"string","required":true}}}},"azurerm_resource_group_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"resource_group_id":{"type":"string","required":true}}}},"azurerm_resource_group_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"deployment_mode":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_resource_management_private_link":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_resource_management_private_link_association":{"block":{"attributes":{"management_group_id":{"type":"string","required":true},"name":{"type":"string","optional":true},"public_network_access_enabled":{"type":"bool","required":true},"resource_management_private_link_id":{"type":"string","required":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_resource_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"resource_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_resource_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"resource_id":{"type":"string","required":true}}}},"azurerm_resource_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"resource_id":{"type":"string","required":true}}}},"azurerm_resource_provider_registration":{"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"feature":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"registered":{"type":"bool","required":true}}},"optional":true}}}},"azurerm_restore_point_collection":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_role_assignment":{"block":{"attributes":{"condition":{"type":"string","optional":true},"condition_version":{"type":"string","optional":true,"computed":true},"delegated_managed_identity_resource_id":{"type":"string","optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","optional":true,"computed":true},"role_definition_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["role_definition_id","role_definition_name"]},"role_definition_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["role_definition_name","role_definition_id"]},"scope":{"type":"string","required":true},"skip_service_principal_aad_check":{"type":"bool","optional":true,"computed":true}}}},"azurerm_role_definition":{"block":{"attributes":{"assignable_scopes":{"type":["list","string"],"optional":true,"computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"role_definition_id":{"type":"string","optional":true,"computed":true},"role_definition_resource_id":{"type":"string","computed":true},"scope":{"type":"string","required":true}},"block_types":{"permissions":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["list","string"],"optional":true},"data_actions":{"type":["set","string"],"optional":true},"not_actions":{"type":["list","string"],"optional":true},"not_data_actions":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_role_management_policy":{"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","computed":true},"role_definition_id":{"type":"string","required":true},"scope":{"type":"string","required":true}},"block_types":{"activation_rules":{"nesting_mode":3,"block":{"attributes":{"maximum_duration":{"type":"string","optional":true,"computed":true},"require_approval":{"type":"bool","optional":true,"computed":true},"require_justification":{"type":"bool","optional":true,"computed":true},"require_multifactor_authentication":{"type":"bool","optional":true,"computed":true,"conflicts_with":["activation_rules.0.required_conditional_access_authentication_context"]},"require_ticket_info":{"type":"bool","optional":true,"computed":true},"required_conditional_access_authentication_context":{"type":"string","optional":true,"computed":true,"conflicts_with":["activation_rules.0.require_multifactor_authentication"]}},"block_types":{"approval_stage":{"nesting_mode":3,"block":{"block_types":{"primary_approver":{"nesting_mode":4,"block":{"attributes":{"object_id":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true,"computed":true},"active_assignment_rules":{"nesting_mode":3,"block":{"attributes":{"expiration_required":{"type":"bool","optional":true,"computed":true},"expire_after":{"type":"string","optional":true,"computed":true},"require_justification":{"type":"bool","optional":true,"computed":true},"require_multifactor_authentication":{"type":"bool","optional":true,"computed":true},"require_ticket_info":{"type":"bool","optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_assignment_rules":{"nesting_mode":3,"block":{"attributes":{"expiration_required":{"type":"bool","optional":true,"computed":true},"expire_after":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"notification_rules":{"nesting_mode":3,"block":{"block_types":{"active_assignments":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_activations":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"eligible_assignments":{"nesting_mode":3,"block":{"block_types":{"admin_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"approver_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true},"assignee_notifications":{"nesting_mode":3,"block":{"attributes":{"additional_recipients":{"type":["set","string"],"optional":true,"computed":true},"default_recipients":{"type":"bool","required":true},"notification_level":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_route":{"block":{"attributes":{"address_prefix":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop_in_ip_address":{"type":"string","optional":true},"next_hop_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"route_table_name":{"type":"string","required":true}}}},"azurerm_route_filter":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"rule":{"type":["list",["object",{"access":"string","communities":["list","string"],"name":"string","rule_type":"string"}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_route_map":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"next_step_if_matched":{"type":"string","optional":true,"default":"Unknown"}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}},"block_types":{"parameter":{"nesting_mode":3,"block":{"attributes":{"as_path":{"type":["list","string"],"optional":true},"community":{"type":["list","string"],"optional":true},"route_prefix":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"match_criterion":{"nesting_mode":3,"block":{"attributes":{"as_path":{"type":["list","string"],"optional":true},"community":{"type":["list","string"],"optional":true},"match_condition":{"type":"string","required":true},"route_prefix":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_route_server":{"block":{"attributes":{"branch_to_branch_traffic_enabled":{"type":"bool","optional":true,"default":false},"hub_routing_preference":{"type":"string","optional":true,"default":"ExpressRoute"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_ip_address_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_state":{"type":"string","computed":true},"sku":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_router_asn":{"type":"number","computed":true},"virtual_router_ips":{"type":["set","string"],"computed":true}}}},"azurerm_route_server_bgp_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"peer_asn":{"type":"number","required":true},"peer_ip":{"type":"string","required":true},"route_server_id":{"type":"string","required":true}}}},"azurerm_route_table":{"block":{"attributes":{"bgp_route_propagation_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"route":{"type":["set",["object",{"address_prefix":"string","name":"string","next_hop_in_ip_address":"string","next_hop_type":"string"}]],"optional":true,"computed":true},"subnets":{"type":["set","string"],"computed":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_search_service":{"block":{"attributes":{"allowed_ips":{"type":["set","string"],"optional":true},"authentication_failure_mode":{"type":"string","optional":true},"customer_managed_key_encryption_compliance_status":{"type":"string","computed":true},"customer_managed_key_enforcement_enabled":{"type":"bool","optional":true,"default":false},"hosting_mode":{"type":"string","optional":true,"default":"default"},"local_authentication_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_rule_bypass_option":{"type":"string","optional":true,"default":"None"},"partition_count":{"type":"number","optional":true,"default":1},"primary_key":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"query_keys":{"type":["list",["object",{"key":"string","name":"string"}]],"computed":true},"replica_count":{"type":"number","optional":true,"default":1},"resource_group_name":{"type":"string","required":true},"secondary_key":{"type":"string","computed":true},"semantic_search_sku":{"type":"string","optional":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_search_shared_private_link_service":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"search_service_id":{"type":"string","required":true},"status":{"type":"string","computed":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_security_center_assessment":{"block":{"attributes":{"additional_data":{"type":["map","string"],"optional":true},"assessment_policy_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}},"block_types":{"status":{"nesting_mode":3,"block":{"attributes":{"cause":{"type":"string","optional":true},"code":{"type":"string","required":true},"description":{"type":"string","optional":true}}},"required":true}}}},"azurerm_security_center_assessment_policy":{"block":{"attributes":{"categories":{"type":["set","string"],"optional":true,"computed":true},"description":{"type":"string","required":true},"display_name":{"type":"string","required":true},"implementation_effort":{"type":"string","optional":true},"name":{"type":"string","computed":true},"remediation_description":{"type":"string","optional":true},"severity":{"type":"string","optional":true,"default":"Medium"},"threats":{"type":["set","string"],"optional":true},"user_impact":{"type":"string","optional":true}}}},"azurerm_security_center_auto_provisioning":{"block":{"attributes":{"auto_provision":{"type":"string","required":true}}}},"azurerm_security_center_automation":{"block":{"attributes":{"description":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"scopes":{"type":["list","string"],"required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true},"resource_id":{"type":"string","required":true},"trigger_url":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"source":{"nesting_mode":3,"block":{"attributes":{"event_source":{"type":"string","required":true}},"block_types":{"rule_set":{"nesting_mode":3,"block":{"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"expected_value":{"type":"string","required":true},"operator":{"type":"string","required":true},"property_path":{"type":"string","required":true},"property_type":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"required":true}}}},"azurerm_security_center_contact":{"block":{"attributes":{"alert_notifications":{"type":"bool","required":true},"alerts_to_admins":{"type":"bool","required":true},"email":{"type":"string","required":true},"name":{"type":"string","required":true},"phone":{"type":"string","optional":true}}}},"azurerm_security_center_server_vulnerability_assessment_virtual_machine":{"block":{"attributes":{"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_security_center_server_vulnerability_assessments_setting":{"block":{"attributes":{"vulnerability_assessment_provider":{"type":"string","required":true}}}},"azurerm_security_center_setting":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"setting_name":{"type":"string","required":true}}}},"azurerm_security_center_storage_defender":{"block":{"attributes":{"malware_scanning_on_upload_cap_gb_per_month":{"type":"number","optional":true,"default":-1},"malware_scanning_on_upload_enabled":{"type":"bool","optional":true,"default":false},"override_subscription_settings_enabled":{"type":"bool","optional":true,"default":false},"scan_results_event_grid_topic_id":{"type":"string","optional":true},"sensitive_data_discovery_enabled":{"type":"bool","optional":true,"default":false},"storage_account_id":{"type":"string","required":true}}}},"azurerm_security_center_subscription_pricing":{"block":{"attributes":{"resource_type":{"type":"string","optional":true,"default":"VirtualMachines"},"subplan":{"type":"string","optional":true},"tier":{"type":"string","required":true}},"block_types":{"extension":{"nesting_mode":4,"block":{"attributes":{"additional_extension_properties":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_security_center_workspace":{"block":{"attributes":{"scope":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_sentinel_alert_rule_anomaly_built_in":{"block":{"attributes":{"anomaly_settings_version":{"type":"number","computed":true},"anomaly_version":{"type":"string","computed":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["name","display_name"]},"enabled":{"type":"bool","required":true},"frequency":{"type":"string","computed":true},"log_analytics_workspace_id":{"type":"string","required":true},"mode":{"type":"string","required":true},"multi_select_observation":{"type":["list",["object",{"description":"string","name":"string","supported_values":["list","string"],"values":["list","string"]}]],"computed":true},"name":{"type":"string","optional":true,"computed":true,"exactly_one_of":["name","display_name"]},"prioritized_exclude_observation":{"type":["list",["object",{"description":"string","exclude":"string","name":"string","prioritize":"string"}]],"computed":true},"required_data_connector":{"type":["list",["object",{"connector_id":"string","data_types":["list","string"]}]],"computed":true},"settings_definition_id":{"type":"string","computed":true},"single_select_observation":{"type":["list",["object",{"description":"string","name":"string","supported_values":["list","string"],"value":"string"}]],"computed":true},"tactics":{"type":["list","string"],"computed":true},"techniques":{"type":["list","string"],"computed":true},"threshold_observation":{"type":["list",["object",{"description":"string","max":"string","min":"string","name":"string","value":"string"}]],"computed":true}}}},"azurerm_sentinel_alert_rule_anomaly_duplicate":{"block":{"attributes":{"anomaly_settings_version":{"type":"number","computed":true},"anomaly_version":{"type":"string","computed":true},"built_in_rule_id":{"type":"string","required":true},"description":{"type":"string","computed":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","required":true},"frequency":{"type":"string","computed":true},"is_default_settings":{"type":"bool","computed":true},"log_analytics_workspace_id":{"type":"string","required":true},"mode":{"type":"string","required":true},"name":{"type":"string","computed":true},"required_data_connector":{"type":["list",["object",{"connector_id":"string","data_types":["list","string"]}]],"computed":true},"settings_definition_id":{"type":"string","computed":true},"tactics":{"type":["list","string"],"computed":true},"techniques":{"type":["list","string"],"computed":true}},"block_types":{"multi_select_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","required":true},"supported_values":{"type":["list","string"],"computed":true},"values":{"type":["list","string"],"required":true}}},"optional":true,"computed":true},"prioritized_exclude_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"exclude":{"type":"string","optional":true},"name":{"type":"string","required":true},"prioritize":{"type":"string","optional":true}}},"optional":true,"computed":true},"single_select_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"name":{"type":"string","required":true},"supported_values":{"type":["list","string"],"computed":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true},"threshold_observation":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","computed":true},"max":{"type":"string","computed":true},"min":{"type":"string","computed":true},"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_sentinel_alert_rule_fusion":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","optional":true,"default":"BuiltInFusion"}},"block_types":{"source":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true}},"block_types":{"sub_type":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"severities_allowed":{"type":["set","string"],"required":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_sentinel_alert_rule_machine_learning_behavior_analytics":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_alert_rule_ms_security_incident":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"display_name_exclude_filter":{"type":["set","string"],"optional":true},"display_name_filter":{"type":["set","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"product_filter":{"type":"string","required":true},"severity_filter":{"type":["set","string"],"required":true}}}},"azurerm_sentinel_alert_rule_nrt":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"alert_rule_template_version":{"type":"string","optional":true},"custom_details":{"type":["map","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"severity":{"type":"string","required":true},"suppression_duration":{"type":"string","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"bool","optional":true,"default":false},"tactics":{"type":["set","string"],"optional":true},"techniques":{"type":["set","string"],"optional":true}},"block_types":{"alert_details_override":{"nesting_mode":3,"block":{"attributes":{"description_format":{"type":"string","optional":true},"display_name_format":{"type":"string","optional":true},"severity_column_name":{"type":"string","optional":true},"tactics_column_name":{"type":"string","optional":true}},"block_types":{"dynamic_property":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"entity_mapping":{"nesting_mode":3,"block":{"attributes":{"entity_type":{"type":"string","required":true}},"block_types":{"field_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true},"identifier":{"type":"string","required":true}}},"required":true}}},"optional":true},"event_grouping":{"nesting_mode":3,"block":{"attributes":{"aggregation_method":{"type":"string","required":true}}},"required":true},"incident":{"nesting_mode":3,"block":{"attributes":{"create_incident_enabled":{"type":"bool","required":true}},"block_types":{"grouping":{"nesting_mode":3,"block":{"attributes":{"by_alert_details":{"type":["list","string"],"optional":true},"by_custom_details":{"type":["list","string"],"optional":true},"by_entities":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"entity_matching_method":{"type":"string","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"string","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true,"computed":true},"sentinel_entity_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_alert_rule_scheduled":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","optional":true},"alert_rule_template_version":{"type":"string","optional":true},"custom_details":{"type":["map","string"],"optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"query":{"type":"string","required":true},"query_frequency":{"type":"string","optional":true,"default":"PT5H"},"query_period":{"type":"string","optional":true,"default":"PT5H"},"severity":{"type":"string","required":true},"suppression_duration":{"type":"string","optional":true,"default":"PT5H"},"suppression_enabled":{"type":"bool","optional":true,"default":false},"tactics":{"type":["set","string"],"optional":true},"techniques":{"type":["set","string"],"optional":true},"trigger_operator":{"type":"string","optional":true,"default":"GreaterThan"},"trigger_threshold":{"type":"number","optional":true,"default":0}},"block_types":{"alert_details_override":{"nesting_mode":3,"block":{"attributes":{"description_format":{"type":"string","optional":true},"display_name_format":{"type":"string","optional":true},"severity_column_name":{"type":"string","optional":true},"tactics_column_name":{"type":"string","optional":true}},"block_types":{"dynamic_property":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"optional":true},"entity_mapping":{"nesting_mode":3,"block":{"attributes":{"entity_type":{"type":"string","required":true}},"block_types":{"field_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true},"identifier":{"type":"string","required":true}}},"required":true}}},"optional":true},"event_grouping":{"nesting_mode":3,"block":{"attributes":{"aggregation_method":{"type":"string","required":true}}},"optional":true},"incident":{"nesting_mode":3,"block":{"attributes":{"create_incident_enabled":{"type":"bool","required":true}},"block_types":{"grouping":{"nesting_mode":3,"block":{"attributes":{"by_alert_details":{"type":["list","string"],"optional":true},"by_custom_details":{"type":["list","string"],"optional":true},"by_entities":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":true},"entity_matching_method":{"type":"string","optional":true,"default":"AnyAlert"},"lookback_duration":{"type":"string","optional":true,"default":"PT5M"},"reopen_closed_incidents":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true,"computed":true},"sentinel_entity_mapping":{"nesting_mode":3,"block":{"attributes":{"column_name":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_alert_rule_threat_intelligence":{"block":{"attributes":{"alert_rule_template_guid":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_automation_rule":{"block":{"attributes":{"condition_json":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"expiration":{"type":"string","optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"order":{"type":"number","required":true},"triggers_on":{"type":"string","optional":true,"default":"Incidents"},"triggers_when":{"type":"string","optional":true,"default":"Created"}},"block_types":{"action_incident":{"nesting_mode":3,"block":{"attributes":{"classification":{"type":"string","optional":true},"classification_comment":{"type":"string","optional":true},"labels":{"type":["list","string"],"optional":true},"order":{"type":"number","required":true},"owner_id":{"type":"string","optional":true},"severity":{"type":"string","optional":true},"status":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["action_incident","action_playbook"]},"action_playbook":{"nesting_mode":3,"block":{"attributes":{"logic_app_id":{"type":"string","required":true},"order":{"type":"number","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true,"at_least_one_of":["action_incident","action_playbook"]}}}},"azurerm_sentinel_data_connector_aws_cloud_trail":{"block":{"attributes":{"aws_role_arn":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_data_connector_aws_s3":{"block":{"attributes":{"aws_role_arn":{"type":"string","required":true},"destination_table":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sqs_urls":{"type":["list","string"],"required":true}}}},"azurerm_sentinel_data_connector_azure_active_directory":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_azure_advanced_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_azure_security_center":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_dynamics_365":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_iot":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"subscription_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_cloud_app_security":{"block":{"attributes":{"alerts_enabled":{"type":"bool","optional":true,"default":true},"discovery_logs_enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_defender_advanced_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_threat_intelligence":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"microsoft_emerging_threat_feed_lookback_date":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_microsoft_threat_protection":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_365":{"block":{"attributes":{"exchange_enabled":{"type":"bool","optional":true,"default":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"sharepoint_enabled":{"type":"bool","optional":true,"default":true},"teams_enabled":{"type":"bool","optional":true,"default":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_365_project":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_atp":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_irm":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_office_power_bi":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_threat_intelligence":{"block":{"attributes":{"log_analytics_workspace_id":{"type":"string","required":true},"lookback_date":{"type":"string","optional":true,"default":"1970-01-01T00:00:00Z"},"name":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}}},"azurerm_sentinel_data_connector_threat_intelligence_taxii":{"block":{"attributes":{"api_root_url":{"type":"string","required":true},"collection_id":{"type":"string","required":true},"display_name":{"type":"string","required":true},"log_analytics_workspace_id":{"type":"string","required":true},"lookback_date":{"type":"string","optional":true,"default":"1970-01-01T00:00:00Z"},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"polling_frequency":{"type":"string","optional":true,"default":"OnceAnHour"},"tenant_id":{"type":"string","optional":true,"computed":true},"user_name":{"type":"string","optional":true}}}},"azurerm_sentinel_log_analytics_workspace_onboarding":{"block":{"attributes":{"customer_managed_key_enabled":{"type":"bool","optional":true,"default":false},"workspace_id":{"type":"string","required":true}}}},"azurerm_sentinel_metadata":{"block":{"attributes":{"content_id":{"type":"string","required":true},"content_schema_version":{"type":"string","optional":true,"default":"2.0"},"custom_version":{"type":"string","optional":true},"dependency":{"type":"string","optional":true},"first_publish_date":{"type":"string","optional":true},"icon_id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"last_publish_date":{"type":"string","optional":true},"name":{"type":"string","required":true},"parent_id":{"type":"string","required":true},"preview_images":{"type":["list","string"],"optional":true},"preview_images_dark":{"type":["list","string"],"optional":true},"providers":{"type":["list","string"],"optional":true},"threat_analysis_tactics":{"type":["list","string"],"optional":true},"threat_analysis_techniques":{"type":["list","string"],"optional":true},"version":{"type":"string","optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"author":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"link":{"type":"string","optional":true},"name":{"type":"string","optional":true}}},"optional":true},"category":{"nesting_mode":3,"block":{"attributes":{"domains":{"type":["list","string"],"optional":true},"verticals":{"type":["list","string"],"optional":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","optional":true},"kind":{"type":"string","required":true},"name":{"type":"string","optional":true}}},"optional":true,"computed":true},"support":{"nesting_mode":3,"block":{"attributes":{"email":{"type":"string","optional":true},"link":{"type":"string","optional":true},"name":{"type":"string","optional":true},"tier":{"type":"string","required":true}}},"optional":true}}}},"azurerm_sentinel_threat_intelligence_indicator":{"block":{"attributes":{"confidence":{"type":"number","optional":true,"default":-1},"created_by":{"type":"string","optional":true},"created_on":{"type":"string","computed":true},"defanged":{"type":"bool","computed":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"extension":{"type":"string","optional":true,"computed":true},"external_id":{"type":"string","computed":true},"external_last_updated_time_utc":{"type":"string","computed":true},"guid":{"type":"string","computed":true},"indicator_type":{"type":["list","string"],"computed":true},"language":{"type":"string","optional":true},"last_updated_time_utc":{"type":"string","computed":true},"object_marking_refs":{"type":["list","string"],"optional":true},"parsed_pattern":{"type":["list",["object",{"pattern_type_key":"string","pattern_type_values":["list",["object",{"value":"string","value_type":"string"}]]}]],"computed":true},"pattern":{"type":"string","required":true},"pattern_type":{"type":"string","required":true},"pattern_version":{"type":"string","optional":true},"revoked":{"type":"bool","optional":true,"default":false},"source":{"type":"string","required":true},"tags":{"type":["list","string"],"optional":true},"threat_types":{"type":["list","string"],"optional":true},"validate_from_utc":{"type":"string","required":true},"validate_until_utc":{"type":"string","optional":true},"workspace_id":{"type":"string","required":true}},"block_types":{"external_reference":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"hashes":{"type":["map","string"],"optional":true},"id":{"type":"string","computed":true},"source_name":{"type":"string","optional":true},"url":{"type":"string","optional":true}}},"optional":true},"granular_marking":{"nesting_mode":3,"block":{"attributes":{"language":{"type":"string","optional":true},"marking_ref":{"type":"string","optional":true},"selectors":{"type":["list","string"],"optional":true}}},"optional":true},"kill_chain_phase":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_sentinel_watchlist":{"block":{"attributes":{"default_duration":{"type":"string","optional":true},"description":{"type":"string","optional":true},"display_name":{"type":"string","required":true},"item_search_key":{"type":"string","required":true},"labels":{"type":["list","string"],"optional":true},"log_analytics_workspace_id":{"type":"string","required":true},"name":{"type":"string","required":true}}}},"azurerm_sentinel_watchlist_item":{"block":{"attributes":{"name":{"type":"string","optional":true,"computed":true},"properties":{"type":["map","string"],"required":true},"watchlist_id":{"type":"string","required":true}}}},"azurerm_service_fabric_cluster":{"block":{"attributes":{"add_on_features":{"type":["set","string"],"optional":true},"cluster_code_version":{"type":"string","optional":true,"computed":true},"cluster_endpoint":{"type":"string","computed":true},"location":{"type":"string","required":true},"management_endpoint":{"type":"string","required":true},"name":{"type":"string","required":true},"reliability_level":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_fabric_zonal_upgrade_mode":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"upgrade_mode":{"type":"string","required":true},"vm_image":{"type":"string","required":true},"vmss_zonal_upgrade_mode":{"type":"string","optional":true}},"block_types":{"azure_active_directory":{"nesting_mode":3,"block":{"attributes":{"client_application_id":{"type":"string","required":true},"cluster_application_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"thumbprint":{"type":"string","required":true},"thumbprint_secondary":{"type":"string","optional":true},"x509_store_name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["certificate_common_names"]},"certificate_common_names":{"nesting_mode":3,"block":{"attributes":{"x509_store_name":{"type":"string","required":true}},"block_types":{"common_names":{"nesting_mode":4,"block":{"attributes":{"certificate_common_name":{"type":"string","required":true},"certificate_issuer_thumbprint":{"type":"string","optional":true}}},"required":true}}},"optional":true,"conflicts_with":["certificate"]},"client_certificate_common_name":{"nesting_mode":3,"block":{"attributes":{"common_name":{"type":"string","required":true},"is_admin":{"type":"bool","required":true},"issuer_thumbprint":{"type":"string","optional":true}}},"optional":true},"client_certificate_thumbprint":{"nesting_mode":3,"block":{"attributes":{"is_admin":{"type":"bool","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"diagnostics_config":{"nesting_mode":3,"block":{"attributes":{"blob_endpoint":{"type":"string","required":true},"protected_account_key_name":{"type":"string","required":true},"queue_endpoint":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"table_endpoint":{"type":"string","required":true}}},"optional":true},"fabric_settings":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true},"node_type":{"nesting_mode":3,"block":{"attributes":{"capacities":{"type":["map","string"],"optional":true},"client_endpoint_port":{"type":"number","required":true},"durability_level":{"type":"string","optional":true,"default":"Bronze"},"http_endpoint_port":{"type":"number","required":true},"instance_count":{"type":"number","required":true},"is_primary":{"type":"bool","required":true},"is_stateless":{"type":"bool","optional":true},"multiple_availability_zones":{"type":"bool","optional":true},"name":{"type":"string","required":true},"placement_properties":{"type":["map","string"],"optional":true},"reverse_proxy_endpoint_port":{"type":"number","optional":true}},"block_types":{"application_ports":{"nesting_mode":3,"block":{"attributes":{"end_port":{"type":"number","required":true},"start_port":{"type":"number","required":true}}},"optional":true,"computed":true},"ephemeral_ports":{"nesting_mode":3,"block":{"attributes":{"end_port":{"type":"number","required":true},"start_port":{"type":"number","required":true}}},"optional":true,"computed":true}}},"required":true},"reverse_proxy_certificate":{"nesting_mode":3,"block":{"attributes":{"thumbprint":{"type":"string","required":true},"thumbprint_secondary":{"type":"string","optional":true},"x509_store_name":{"type":"string","required":true}}},"optional":true,"conflicts_with":["reverse_proxy_certificate_common_names"]},"reverse_proxy_certificate_common_names":{"nesting_mode":3,"block":{"attributes":{"x509_store_name":{"type":"string","required":true}},"block_types":{"common_names":{"nesting_mode":4,"block":{"attributes":{"certificate_common_name":{"type":"string","required":true},"certificate_issuer_thumbprint":{"type":"string","optional":true}}},"required":true}}},"optional":true,"conflicts_with":["reverse_proxy_certificate"]},"upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"force_restart_enabled":{"type":"bool","optional":true},"health_check_retry_timeout":{"type":"string","optional":true,"default":"00:45:00"},"health_check_stable_duration":{"type":"string","optional":true,"default":"00:01:00"},"health_check_wait_duration":{"type":"string","optional":true,"default":"00:00:30"},"upgrade_domain_timeout":{"type":"string","optional":true,"default":"02:00:00"},"upgrade_replica_set_check_timeout":{"type":"string","optional":true,"default":"10675199.02:48:05.4775807"},"upgrade_timeout":{"type":"string","optional":true,"default":"12:00:00"}},"block_types":{"delta_health_policy":{"nesting_mode":3,"block":{"attributes":{"max_delta_unhealthy_applications_percent":{"type":"number","optional":true,"default":0},"max_delta_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0},"max_upgrade_domain_delta_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0}}},"optional":true},"health_policy":{"nesting_mode":3,"block":{"attributes":{"max_unhealthy_applications_percent":{"type":"number","optional":true,"default":0},"max_unhealthy_nodes_percent":{"type":"number","optional":true,"default":0}}},"optional":true}}},"optional":true}}}},"azurerm_service_fabric_managed_cluster":{"block":{"attributes":{"backup_service_enabled":{"type":"bool","optional":true},"client_connection_port":{"type":"number","required":true},"dns_name":{"type":"string","optional":true,"computed":true},"dns_service_enabled":{"type":"bool","optional":true},"http_gateway_port":{"type":"number","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true,"default":"Basic"},"tags":{"type":["map","string"],"optional":true},"upgrade_wave":{"type":"string","optional":true,"default":"Wave0"},"username":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"client_application_id":{"type":"string","required":true},"cluster_application_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}},"optional":true},"certificate":{"nesting_mode":3,"block":{"attributes":{"common_name":{"type":"string","optional":true},"thumbprint":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true},"custom_fabric_setting":{"nesting_mode":3,"block":{"attributes":{"parameter":{"type":"string","required":true},"section":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"lb_rule":{"nesting_mode":3,"block":{"attributes":{"backend_port":{"type":"number","required":true},"frontend_port":{"type":"number","required":true},"probe_protocol":{"type":"string","required":true},"probe_request_path":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"required":true},"node_type":{"nesting_mode":3,"block":{"attributes":{"application_port_range":{"type":"string","required":true},"capacities":{"type":["map","string"],"optional":true},"data_disk_size_gb":{"type":"number","required":true},"data_disk_type":{"type":"string","optional":true,"default":"Standard_LRS"},"ephemeral_port_range":{"type":"string","required":true},"id":{"type":"string","computed":true},"multiple_placement_groups_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"placement_properties":{"type":["map","string"],"optional":true},"primary":{"type":"bool","optional":true},"stateless":{"type":"bool","optional":true},"vm_image_offer":{"type":"string","required":true},"vm_image_publisher":{"type":"string","required":true},"vm_image_sku":{"type":"string","required":true},"vm_image_version":{"type":"string","required":true},"vm_instance_count":{"type":"number","required":true},"vm_size":{"type":"string","required":true}},"block_types":{"vm_secrets":{"nesting_mode":3,"block":{"attributes":{"vault_id":{"type":"string","required":true}},"block_types":{"certificates":{"nesting_mode":3,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true}}},"optional":true}}}},"azurerm_service_plan":{"block":{"attributes":{"app_service_environment_id":{"type":"string","optional":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"maximum_elastic_worker_count":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"per_site_scaling_enabled":{"type":"bool","optional":true,"default":false},"premium_plan_auto_scale_enabled":{"type":"bool","optional":true,"default":false},"reserved":{"type":"bool","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"worker_count":{"type":"number","optional":true,"computed":true},"zone_balancing_enabled":{"type":"bool","optional":true}}}},"azurerm_servicebus_namespace":{"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":0},"default_primary_connection_string":{"type":"string","computed":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_connection_string":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"endpoint":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"name":{"type":"string","required":true},"premium_messaging_partitions":{"type":"number","optional":true,"default":0},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"identity_id":{"type":"string","required":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_rule_set":{"nesting_mode":3,"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Allow"},"ip_rules":{"type":["set","string"],"optional":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"trusted_services_allowed":{"type":"bool","optional":true,"default":false}},"block_types":{"network_rules":{"nesting_mode":4,"block":{"attributes":{"ignore_missing_vnet_service_endpoint":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true}}}},"azurerm_servicebus_namespace_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_servicebus_namespace_customer_managed_key":{"block":{"attributes":{"infrastructure_encryption_enabled":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","required":true},"namespace_id":{"type":"string","required":true}}}},"azurerm_servicebus_namespace_disaster_recovery_config":{"block":{"attributes":{"alias_authorization_rule_id":{"type":"string","optional":true},"default_primary_key":{"type":"string","computed":true},"default_secondary_key":{"type":"string","computed":true},"name":{"type":"string","required":true},"partner_namespace_id":{"type":"string","required":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_namespace_id":{"type":"string","required":true},"secondary_connection_string_alias":{"type":"string","computed":true}}}},"azurerm_servicebus_queue":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"computed":true},"batched_operations_enabled":{"type":"bool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"bool","optional":true,"default":false},"default_message_ttl":{"type":"string","optional":true,"computed":true},"duplicate_detection_history_time_window":{"type":"string","optional":true,"default":"PT10M"},"express_enabled":{"type":"bool","optional":true,"default":false},"forward_dead_lettered_messages_to":{"type":"string","optional":true},"forward_to":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","optional":true,"default":10},"max_message_size_in_kilobytes":{"type":"number","optional":true,"computed":true},"max_size_in_megabytes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"partitioning_enabled":{"type":"bool","optional":true,"default":false},"requires_duplicate_detection":{"type":"bool","optional":true,"default":false},"requires_session":{"type":"bool","optional":true,"default":false},"status":{"type":"string","optional":true,"default":"Active"}}}},"azurerm_servicebus_queue_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"queue_id":{"type":"string","required":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false}}}},"azurerm_servicebus_subscription":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"bool","optional":true},"client_scoped_subscription_enabled":{"type":"bool","optional":true,"default":false},"dead_lettering_on_filter_evaluation_error":{"type":"bool","optional":true,"default":true},"dead_lettering_on_message_expiration":{"type":"bool","optional":true},"default_message_ttl":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"forward_dead_lettered_messages_to":{"type":"string","optional":true},"forward_to":{"type":"string","optional":true},"lock_duration":{"type":"string","optional":true,"default":"PT1M"},"max_delivery_count":{"type":"number","required":true},"name":{"type":"string","required":true},"requires_session":{"type":"bool","optional":true},"status":{"type":"string","optional":true,"default":"Active"},"topic_id":{"type":"string","required":true}},"block_types":{"client_scoped_subscription":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"is_client_scoped_subscription_durable":{"type":"bool","computed":true},"is_client_scoped_subscription_shareable":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_servicebus_subscription_rule":{"block":{"attributes":{"action":{"type":"string","optional":true},"filter_type":{"type":"string","required":true},"name":{"type":"string","required":true},"sql_filter":{"type":"string","optional":true},"sql_filter_compatibility_level":{"type":"number","computed":true},"subscription_id":{"type":"string","required":true}},"block_types":{"correlation_filter":{"nesting_mode":3,"block":{"attributes":{"content_type":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"correlation_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"label":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"message_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"properties":{"type":["map","string"],"optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"reply_to":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"reply_to_session_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"session_id":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]},"to":{"type":"string","optional":true,"at_least_one_of":["correlation_filter.0.correlation_id","correlation_filter.0.message_id","correlation_filter.0.to","correlation_filter.0.reply_to","correlation_filter.0.label","correlation_filter.0.session_id","correlation_filter.0.reply_to_session_id","correlation_filter.0.content_type","correlation_filter.0.properties"]}}},"optional":true,"conflicts_with":["sql_filter"]}}}},"azurerm_servicebus_topic":{"block":{"attributes":{"auto_delete_on_idle":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"batched_operations_enabled":{"type":"bool","optional":true},"default_message_ttl":{"type":"string","optional":true,"default":"P10675199DT2H48M5.4775807S"},"duplicate_detection_history_time_window":{"type":"string","optional":true,"default":"PT10M"},"express_enabled":{"type":"bool","optional":true},"max_message_size_in_kilobytes":{"type":"number","optional":true,"computed":true},"max_size_in_megabytes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"namespace_id":{"type":"string","required":true},"partitioning_enabled":{"type":"bool","optional":true},"requires_duplicate_detection":{"type":"bool","optional":true},"status":{"type":"string","optional":true,"default":"Active"},"support_ordering":{"type":"bool","optional":true}}}},"azurerm_servicebus_topic_authorization_rule":{"block":{"attributes":{"listen":{"type":"bool","optional":true,"default":false},"manage":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_connection_string":{"type":"string","computed":true},"primary_connection_string_alias":{"type":"string","computed":true},"primary_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_connection_string_alias":{"type":"string","computed":true},"secondary_key":{"type":"string","computed":true},"send":{"type":"bool","optional":true,"default":false},"topic_id":{"type":"string","required":true}}}},"azurerm_shared_image":{"block":{"attributes":{"accelerated_network_support_enabled":{"type":"bool","optional":true},"architecture":{"type":"string","optional":true,"default":"x64"},"confidential_vm_enabled":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","trusted_launch_enabled","confidential_vm_supported"]},"confidential_vm_supported":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","trusted_launch_enabled","confidential_vm_enabled"]},"description":{"type":"string","optional":true},"disk_controller_type_nvme_enabled":{"type":"bool","optional":true},"disk_types_not_allowed":{"type":["set","string"],"optional":true},"end_of_life_date":{"type":"string","optional":true},"eula":{"type":"string","optional":true},"gallery_name":{"type":"string","required":true},"hibernation_enabled":{"type":"bool","optional":true},"hyper_v_generation":{"type":"string","optional":true,"default":"V1"},"location":{"type":"string","required":true},"max_recommended_memory_in_gb":{"type":"number","optional":true},"max_recommended_vcpu_count":{"type":"number","optional":true},"min_recommended_memory_in_gb":{"type":"number","optional":true},"min_recommended_vcpu_count":{"type":"number","optional":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"privacy_statement_uri":{"type":"string","optional":true},"release_note_uri":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"specialized":{"type":"bool","optional":true},"tags":{"type":["map","string"],"optional":true},"trusted_launch_enabled":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_supported","confidential_vm_supported","confidential_vm_enabled"]},"trusted_launch_supported":{"type":"bool","optional":true,"conflicts_with":["trusted_launch_enabled","confidential_vm_supported","confidential_vm_enabled"]}},"block_types":{"identifier":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true}}},"required":true},"purchase_plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","optional":true},"publisher":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_shared_image_gallery":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"unique_name":{"type":"string","computed":true}},"block_types":{"sharing":{"nesting_mode":3,"block":{"attributes":{"permission":{"type":"string","required":true}},"block_types":{"community_gallery":{"nesting_mode":3,"block":{"attributes":{"eula":{"type":"string","required":true},"name":{"type":"string","computed":true},"prefix":{"type":"string","required":true},"publisher_email":{"type":"string","required":true},"publisher_uri":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_shared_image_version":{"block":{"attributes":{"blob_uri":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"],"required_with":["storage_account_id"]},"deletion_of_replicated_locations_enabled":{"type":"bool","optional":true,"default":false},"end_of_life_date":{"type":"string","optional":true},"exclude_from_latest":{"type":"bool","optional":true,"default":false},"gallery_name":{"type":"string","required":true},"image_name":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_image_id":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"]},"name":{"type":"string","required":true},"os_disk_snapshot_id":{"type":"string","optional":true,"exactly_one_of":["blob_uri","os_disk_snapshot_id","managed_image_id"]},"replication_mode":{"type":"string","optional":true,"default":"Full"},"resource_group_name":{"type":"string","required":true},"storage_account_id":{"type":"string","optional":true,"required_with":["blob_uri"]},"tags":{"type":["map","string"],"optional":true}},"block_types":{"target_region":{"nesting_mode":3,"block":{"attributes":{"disk_encryption_set_id":{"type":"string","optional":true},"exclude_from_latest_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"regional_replica_count":{"type":"number","required":true},"storage_account_type":{"type":"string","optional":true,"default":"Standard_LRS"}}},"required":true}}}},"azurerm_signalr_service":{"block":{"attributes":{"aad_auth_enabled":{"type":"bool","optional":true,"default":true},"connectivity_logs_enabled":{"type":"bool","optional":true,"default":false},"hostname":{"type":"string","computed":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":false},"ip_address":{"type":"string","computed":true},"live_trace_enabled":{"type":"bool","optional":true,"default":false},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"public_port":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"server_port":{"type":"number","computed":true},"serverless_connection_timeout_in_seconds":{"type":"number","optional":true,"default":30},"service_mode":{"type":"string","optional":true,"default":"Default"},"tags":{"type":["map","string"],"optional":true},"tls_client_cert_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"required":true}}},"optional":true,"computed":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"live_trace":{"nesting_mode":3,"block":{"attributes":{"connectivity_logs_enabled":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true}}},"required":true},"upstream_endpoint":{"nesting_mode":4,"block":{"attributes":{"category_pattern":{"type":["list","string"],"required":true},"event_pattern":{"type":["list","string"],"required":true},"hub_pattern":{"type":["list","string"],"required":true},"url_template":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_signalr_service_custom_certificate":{"block":{"attributes":{"certificate_version":{"type":"string","computed":true},"custom_certificate_id":{"type":"string","required":true},"name":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}}}},"azurerm_signalr_service_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"signalr_custom_certificate_id":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}}}},"azurerm_signalr_service_network_acl":{"block":{"attributes":{"default_action":{"type":"string","required":true},"signalr_service_id":{"type":"string","required":true}},"block_types":{"private_endpoint":{"nesting_mode":4,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true},"denied_request_types":{"type":["set","string"],"optional":true},"id":{"type":"string","required":true}}},"optional":true},"public_network":{"nesting_mode":3,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.denied_request_types"]},"denied_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.allowed_request_types"]}}},"required":true}}}},"azurerm_signalr_shared_private_link_resource":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"signalr_service_id":{"type":"string","required":true},"status":{"type":"string","computed":true},"sub_resource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_site_recovery_fabric":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_hyperv_network_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_network_name":{"type":"string","required":true},"source_system_center_virtual_machine_manager_name":{"type":"string","required":true},"target_network_id":{"type":"string","required":true}}}},"azurerm_site_recovery_hyperv_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_hours":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_hours":{"type":"number","required":true},"recovery_vault_id":{"type":"string","required":true},"replication_interval_in_seconds":{"type":"number","required":true}}}},"azurerm_site_recovery_hyperv_replication_policy_association":{"block":{"attributes":{"hyperv_site_id":{"type":"string","required":true},"name":{"type":"string","required":true},"policy_id":{"type":"string","required":true}}}},"azurerm_site_recovery_network_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_network_id":{"type":"string","required":true},"source_recovery_fabric_name":{"type":"string","required":true},"target_network_id":{"type":"string","required":true},"target_recovery_fabric_name":{"type":"string","required":true}}}},"azurerm_site_recovery_protection_container":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_fabric_name":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_protection_container_mapping":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_fabric_name":{"type":"string","required":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_source_protection_container_name":{"type":"string","required":true},"recovery_target_protection_container_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}},"block_types":{"automatic_update":{"nesting_mode":3,"block":{"attributes":{"authentication_type":{"type":"string","optional":true,"default":"SystemAssignedIdentity"},"automation_account_id":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_site_recovery_replicated_vm":{"block":{"attributes":{"managed_disk":{"type":["set",["object",{"disk_id":"string","staging_storage_account_id":"string","target_disk_encryption":["list",["object",{"disk_encryption_key":["list",["object",{"secret_url":"string","vault_id":"string"}]],"key_encryption_key":["list",["object",{"key_url":"string","vault_id":"string"}]]}]],"target_disk_encryption_set_id":"string","target_disk_type":"string","target_replica_disk_type":"string","target_resource_group_id":"string"}]],"optional":true,"computed":true},"multi_vm_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"network_interface":{"type":["set",["object",{"failover_test_public_ip_address_id":"string","failover_test_static_ip":"string","failover_test_subnet_name":"string","recovery_load_balancer_backend_address_pool_ids":["set","string"],"recovery_public_ip_address_id":"string","source_network_interface_id":"string","target_static_ip":"string","target_subnet_name":"string"}]],"optional":true,"computed":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_recovery_fabric_name":{"type":"string","required":true},"source_recovery_protection_container_name":{"type":"string","required":true},"source_vm_id":{"type":"string","required":true},"target_availability_set_id":{"type":"string","optional":true,"conflicts_with":["target_zone"]},"target_boot_diagnostic_storage_account_id":{"type":"string","optional":true},"target_capacity_reservation_group_id":{"type":"string","optional":true},"target_edge_zone":{"type":"string","optional":true},"target_network_id":{"type":"string","optional":true,"computed":true},"target_proximity_placement_group_id":{"type":"string","optional":true},"target_recovery_fabric_id":{"type":"string","required":true},"target_recovery_protection_container_id":{"type":"string","required":true},"target_resource_group_id":{"type":"string","required":true},"target_virtual_machine_scale_set_id":{"type":"string","optional":true},"target_virtual_machine_size":{"type":"string","optional":true,"computed":true},"target_zone":{"type":"string","optional":true},"test_network_id":{"type":"string","optional":true,"computed":true},"unmanaged_disk":{"type":["set",["object",{"disk_uri":"string","staging_storage_account_id":"string","target_storage_account_id":"string"}]],"optional":true,"computed":true}}}},"azurerm_site_recovery_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_minutes":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_minutes":{"type":"number","required":true},"recovery_vault_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true}}}},"azurerm_site_recovery_replication_recovery_plan":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_recovery_fabric_id":{"type":"string","required":true},"target_recovery_fabric_id":{"type":"string","required":true}},"block_types":{"azure_to_azure_settings":{"nesting_mode":3,"block":{"attributes":{"primary_edge_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.recovery_edge_zone"]},"primary_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.recovery_zone"]},"recovery_edge_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.primary_edge_zone"]},"recovery_zone":{"type":"string","optional":true,"required_with":["azure_to_azure_settings.0.primary_zone"]}}},"optional":true},"boot_recovery_group":{"nesting_mode":3,"block":{"attributes":{"replicated_protected_items":{"type":["list","string"],"optional":true}},"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true},"failover_recovery_group":{"nesting_mode":3,"block":{"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true},"shutdown_recovery_group":{"nesting_mode":3,"block":{"block_types":{"post_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true},"pre_action":{"nesting_mode":3,"block":{"attributes":{"fabric_location":{"type":"string","optional":true},"fail_over_directions":{"type":["set","string"],"required":true},"fail_over_types":{"type":["set","string"],"required":true},"manual_action_instruction":{"type":"string","optional":true},"name":{"type":"string","required":true},"runbook_id":{"type":"string","optional":true},"script_path":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_site_recovery_services_vault_hyperv_site":{"block":{"attributes":{"name":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_site_recovery_vmware_replicated_vm":{"block":{"attributes":{"appliance_name":{"type":"string","required":true},"default_log_storage_account_id":{"type":"string","optional":true,"exactly_one_of":["managed_disk","default_log_storage_account_id"]},"default_recovery_disk_type":{"type":"string","optional":true,"exactly_one_of":["managed_disk","default_recovery_disk_type"]},"default_target_disk_encryption_set_id":{"type":"string","optional":true},"license_type":{"type":"string","optional":true,"default":"NotSpecified"},"multi_vm_group_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"physical_server_credential_name":{"type":"string","required":true},"recovery_replication_policy_id":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true},"source_vm_name":{"type":"string","required":true},"target_availability_set_id":{"type":"string","optional":true,"conflicts_with":["target_zone"]},"target_boot_diagnostics_storage_account_id":{"type":"string","optional":true},"target_network_id":{"type":"string","optional":true,"required_with":["network_interface"]},"target_proximity_placement_group_id":{"type":"string","optional":true},"target_resource_group_id":{"type":"string","required":true},"target_vm_name":{"type":"string","required":true},"target_vm_size":{"type":"string","optional":true},"target_zone":{"type":"string","optional":true,"conflicts_with":["target_availability_set_id"]},"test_network_id":{"type":"string","optional":true}},"block_types":{"managed_disk":{"nesting_mode":3,"block":{"attributes":{"disk_id":{"type":"string","required":true},"log_storage_account_id":{"type":"string","optional":true},"target_disk_encryption_set_id":{"type":"string","optional":true},"target_disk_type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"is_primary":{"type":"bool","required":true},"source_mac_address":{"type":"string","required":true},"target_static_ip":{"type":"string","optional":true},"target_subnet_name":{"type":"string","optional":true},"test_subnet_name":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_site_recovery_vmware_replication_policy":{"block":{"attributes":{"application_consistent_snapshot_frequency_in_minutes":{"type":"number","required":true},"name":{"type":"string","required":true},"recovery_point_retention_in_minutes":{"type":"number","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_site_recovery_vmware_replication_policy_association":{"block":{"attributes":{"name":{"type":"string","required":true},"policy_id":{"type":"string","required":true},"recovery_vault_id":{"type":"string","required":true}}}},"azurerm_snapshot":{"block":{"attributes":{"create_option":{"type":"string","required":true},"disk_access_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"incremental_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_access_policy":{"type":"string","optional":true,"default":"AllowAll"},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"source_resource_id":{"type":"string","optional":true},"source_uri":{"type":"string","optional":true},"storage_account_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"trusted_launch_enabled":{"type":"bool","computed":true}},"block_types":{"encryption_settings":{"nesting_mode":3,"block":{"block_types":{"disk_encryption_key":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"required":true},"key_encryption_key":{"nesting_mode":3,"block":{"attributes":{"key_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_source_control_token":{"block":{"attributes":{"token":{"type":"string","required":true},"token_secret":{"type":"string","optional":true},"type":{"type":"string","required":true}}}},"azurerm_spatial_anchors_account":{"block":{"attributes":{"account_domain":{"type":"string","computed":true},"account_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_spring_cloud_accelerator":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_active_deployment":{"block":{"attributes":{"deployment_name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_api_portal":{"block":{"attributes":{"api_try_out_enabled":{"type":"bool","optional":true},"gateway_ids":{"type":["set","string"],"optional":true},"https_only_enabled":{"type":"bool","optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"spring_cloud_service_id":{"type":"string","required":true},"url":{"type":"string","computed":true}},"block_types":{"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"issuer_uri":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_api_portal_custom_domain":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_api_portal_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true}}}},"azurerm_spring_cloud_app":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"fqdn":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"is_public":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"public_endpoint_enabled":{"type":"bool","optional":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"tls_enabled":{"type":"bool","optional":true,"default":false},"url":{"type":"string","computed":true}},"block_types":{"custom_persistent_disk":{"nesting_mode":3,"block":{"attributes":{"mount_options":{"type":["set","string"],"optional":true},"mount_path":{"type":"string","required":true},"read_only_enabled":{"type":"bool","optional":true,"default":false},"share_name":{"type":"string","required":true},"storage_name":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"ingress_settings":{"nesting_mode":3,"block":{"attributes":{"backend_protocol":{"type":"string","optional":true,"default":"Default"},"read_timeout_in_seconds":{"type":"number","optional":true,"default":300},"send_timeout_in_seconds":{"type":"number","optional":true,"default":60},"session_affinity":{"type":"string","optional":true,"default":"None"},"session_cookie_max_age":{"type":"number","optional":true}}},"optional":true,"computed":true},"persistent_disk":{"nesting_mode":3,"block":{"attributes":{"mount_path":{"type":"string","optional":true,"default":"/persistent"},"size_in_gb":{"type":"number","required":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_app_cosmosdb_association":{"block":{"attributes":{"api_type":{"type":"string","required":true},"cosmosdb_access_key":{"type":"string","required":true},"cosmosdb_account_id":{"type":"string","required":true},"cosmosdb_cassandra_keyspace_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"]},"cosmosdb_gremlin_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"],"required_with":["cosmosdb_gremlin_graph_name"]},"cosmosdb_gremlin_graph_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_mongo_database_name","cosmosdb_sql_database_name"],"required_with":["cosmosdb_gremlin_database_name"]},"cosmosdb_mongo_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_sql_database_name"]},"cosmosdb_sql_database_name":{"type":"string","optional":true,"conflicts_with":["cosmosdb_cassandra_keyspace_name","cosmosdb_gremlin_database_name","cosmosdb_gremlin_graph_name","cosmosdb_mongo_database_name"]},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_dynamics_application_performance_monitoring":{"block":{"attributes":{"agent_account_access_key":{"type":"string","required":true},"agent_account_name":{"type":"string","required":true},"agent_application_name":{"type":"string","optional":true},"agent_node_name":{"type":"string","optional":true},"agent_tier_name":{"type":"string","optional":true},"agent_unique_host_id":{"type":"string","optional":true},"controller_host_name":{"type":"string","required":true},"controller_port":{"type":"number","optional":true},"controller_ssl_enabled":{"type":"bool","optional":true},"globally_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_mysql_association":{"block":{"attributes":{"database_name":{"type":"string","required":true},"mysql_server_id":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"username":{"type":"string","required":true}}}},"azurerm_spring_cloud_app_redis_association":{"block":{"attributes":{"name":{"type":"string","required":true},"redis_access_key":{"type":"string","required":true},"redis_cache_id":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"ssl_enabled":{"type":"bool","optional":true,"default":true}}}},"azurerm_spring_cloud_application_insights_application_performance_monitoring":{"block":{"attributes":{"connection_string":{"type":"string","optional":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"role_instance":{"type":"string","optional":true},"role_name":{"type":"string","optional":true},"sampling_percentage":{"type":"number","optional":true},"sampling_requests_per_second":{"type":"number","optional":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_application_live_view":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_build_deployment":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"build_result_id":{"type":"string","required":true},"environment_variables":{"type":["map","string"],"optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_build_pack_binding":{"block":{"attributes":{"binding_type":{"type":"string","optional":true},"name":{"type":"string","required":true},"spring_cloud_builder_id":{"type":"string","required":true}},"block_types":{"launch":{"nesting_mode":3,"block":{"attributes":{"properties":{"type":["map","string"],"optional":true},"secrets":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_builder":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"build_pack_group":{"nesting_mode":4,"block":{"attributes":{"build_pack_ids":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true},"stack":{"nesting_mode":3,"block":{"attributes":{"id":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true}}}},"azurerm_spring_cloud_certificate":{"block":{"attributes":{"certificate_content":{"type":"string","optional":true,"at_least_one_of":["key_vault_certificate_id","certificate_content"]},"exclude_private_key":{"type":"bool","optional":true},"key_vault_certificate_id":{"type":"string","optional":true,"at_least_one_of":["key_vault_certificate_id","certificate_content"]},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"service_name":{"type":"string","required":true},"thumbprint":{"type":"string","computed":true}}}},"azurerm_spring_cloud_configuration_service":{"block":{"attributes":{"generation":{"type":"string","optional":true},"name":{"type":"string","required":true},"refresh_interval_in_seconds":{"type":"number","optional":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"repository":{"nesting_mode":3,"block":{"attributes":{"ca_certificate_id":{"type":"string","optional":true},"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"label":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"patterns":{"type":["set","string"],"required":true},"private_key":{"type":"string","optional":true},"search_paths":{"type":["set","string"],"optional":true},"strict_host_key_checking":{"type":"bool","optional":true},"uri":{"type":"string","required":true},"username":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_spring_cloud_connection":{"block":{"attributes":{"client_type":{"type":"string","optional":true,"default":"none"},"name":{"type":"string","required":true},"spring_cloud_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"vnet_solution":{"type":"string","optional":true}},"block_types":{"authentication":{"nesting_mode":3,"block":{"attributes":{"certificate":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"name":{"type":"string","optional":true},"principal_id":{"type":"string","optional":true},"secret":{"type":"string","optional":true},"subscription_id":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true},"secret_store":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}}},"optional":true}}}},"azurerm_spring_cloud_container_deployment":{"block":{"attributes":{"addon_json":{"type":"string","optional":true,"computed":true},"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"arguments":{"type":["list","string"],"optional":true},"commands":{"type":["list","string"],"optional":true},"environment_variables":{"type":["map","string"],"optional":true},"image":{"type":"string","required":true},"instance_count":{"type":"number","optional":true,"default":1},"language_framework":{"type":"string","optional":true},"name":{"type":"string","required":true},"server":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_custom_domain":{"block":{"attributes":{"certificate_name":{"type":"string","optional":true,"required_with":["thumbprint"]},"name":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true,"required_with":["certificate_name"]}}}},"azurerm_spring_cloud_customized_accelerator":{"block":{"attributes":{"accelerator_tags":{"type":["list","string"],"optional":true},"accelerator_type":{"type":"string","optional":true,"default":"Accelerator"},"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"icon_url":{"type":"string","optional":true},"name":{"type":"string","required":true},"spring_cloud_accelerator_id":{"type":"string","required":true}},"block_types":{"git_repository":{"nesting_mode":3,"block":{"attributes":{"branch":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"ca_certificate_id":{"type":"string","optional":true},"commit":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"git_tag":{"type":"string","optional":true,"exactly_one_of":["git_repository.0.branch","git_repository.0.commit","git_repository.0.git_tag"]},"interval_in_seconds":{"type":"number","optional":true},"path":{"type":"string","optional":true},"url":{"type":"string","required":true}},"block_types":{"basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["git_repository.0.ssh_auth"]},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true}}},"optional":true,"conflicts_with":["git_repository.0.basic_auth"]}}},"required":true}}}},"azurerm_spring_cloud_dev_tool_portal":{"block":{"attributes":{"application_accelerator_enabled":{"type":"bool","optional":true,"computed":true},"application_live_view_enabled":{"type":"bool","optional":true,"computed":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"spring_cloud_service_id":{"type":"string","required":true}},"block_types":{"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"metadata_url":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_dynatrace_application_performance_monitoring":{"block":{"attributes":{"api_token":{"type":"string","optional":true},"api_url":{"type":"string","optional":true},"connection_point":{"type":"string","required":true},"environment_id":{"type":"string","optional":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true},"tenant":{"type":"string","required":true},"tenant_token":{"type":"string","required":true}}}},"azurerm_spring_cloud_elastic_application_performance_monitoring":{"block":{"attributes":{"application_packages":{"type":["list","string"],"required":true},"globally_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"server_url":{"type":"string","required":true},"service_name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_gateway":{"block":{"attributes":{"application_performance_monitoring_ids":{"type":["list","string"],"optional":true},"application_performance_monitoring_types":{"type":["list","string"],"optional":true},"environment_variables":{"type":["map","string"],"optional":true},"https_only":{"type":"bool","optional":true},"instance_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true},"sensitive_environment_variables":{"type":["map","string"],"optional":true},"spring_cloud_service_id":{"type":"string","required":true},"url":{"type":"string","computed":true}},"block_types":{"api_metadata":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"documentation_url":{"type":"string","optional":true},"server_url":{"type":"string","optional":true},"title":{"type":"string","optional":true},"version":{"type":"string","optional":true}}},"optional":true},"client_authorization":{"nesting_mode":3,"block":{"attributes":{"certificate_ids":{"type":["list","string"],"optional":true},"verification_enabled":{"type":"bool","optional":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["set","string"],"optional":true},"allowed_methods":{"type":["set","string"],"optional":true},"allowed_origin_patterns":{"type":["set","string"],"optional":true},"allowed_origins":{"type":["set","string"],"optional":true},"credentials_allowed":{"type":"bool","optional":true},"exposed_headers":{"type":["set","string"],"optional":true},"max_age_seconds":{"type":"number","optional":true}}},"optional":true},"local_response_cache_per_instance":{"nesting_mode":3,"block":{"attributes":{"size":{"type":"string","optional":true},"time_to_live":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["local_response_cache_per_route"]},"local_response_cache_per_route":{"nesting_mode":3,"block":{"attributes":{"size":{"type":"string","optional":true},"time_to_live":{"type":"string","optional":true}}},"optional":true,"conflicts_with":["local_response_cache_per_instance"]},"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"default":"1"},"memory":{"type":"string","optional":true,"default":"2Gi"}}},"optional":true,"computed":true},"sso":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true},"client_secret":{"type":"string","optional":true},"issuer_uri":{"type":"string","optional":true},"scope":{"type":["set","string"],"optional":true}}},"optional":true}}}},"azurerm_spring_cloud_gateway_custom_domain":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_gateway_id":{"type":"string","required":true},"thumbprint":{"type":"string","optional":true}}}},"azurerm_spring_cloud_gateway_route_config":{"block":{"attributes":{"filters":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"predicates":{"type":["set","string"],"optional":true},"protocol":{"type":"string","required":true},"spring_cloud_app_id":{"type":"string","optional":true},"spring_cloud_gateway_id":{"type":"string","required":true},"sso_validation_enabled":{"type":"bool","optional":true}},"block_types":{"open_api":{"nesting_mode":3,"block":{"attributes":{"uri":{"type":"string","optional":true}}},"optional":true},"route":{"nesting_mode":4,"block":{"attributes":{"classification_tags":{"type":["set","string"],"optional":true},"description":{"type":"string","optional":true},"filters":{"type":["set","string"],"optional":true},"order":{"type":"number","required":true},"predicates":{"type":["set","string"],"optional":true},"sso_validation_enabled":{"type":"bool","optional":true},"title":{"type":"string","optional":true},"token_relay":{"type":"bool","optional":true},"uri":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_spring_cloud_java_deployment":{"block":{"attributes":{"environment_variables":{"type":["map","string"],"optional":true},"instance_count":{"type":"number","optional":true,"default":1},"jvm_options":{"type":"string","optional":true},"name":{"type":"string","required":true},"runtime_version":{"type":"string","optional":true,"default":"Java_8"},"spring_cloud_app_id":{"type":"string","required":true}},"block_types":{"quota":{"nesting_mode":3,"block":{"attributes":{"cpu":{"type":"string","optional":true,"computed":true},"memory":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_spring_cloud_new_relic_application_performance_monitoring":{"block":{"attributes":{"agent_enabled":{"type":"bool","optional":true,"default":true},"app_name":{"type":"string","required":true},"app_server_port":{"type":"number","optional":true},"audit_mode_enabled":{"type":"bool","optional":true},"auto_app_naming_enabled":{"type":"bool","optional":true},"auto_transaction_naming_enabled":{"type":"bool","optional":true,"default":true},"custom_tracing_enabled":{"type":"bool","optional":true,"default":true},"globally_enabled":{"type":"bool","optional":true},"labels":{"type":["map","string"],"optional":true},"license_key":{"type":"string","required":true},"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true}}}},"azurerm_spring_cloud_service":{"block":{"attributes":{"build_agent_pool_size":{"type":"string","optional":true},"location":{"type":"string","required":true},"log_stream_public_endpoint_enabled":{"type":"bool","optional":true},"managed_environment_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"outbound_public_ip_addresses":{"type":["list","string"],"computed":true},"required_network_traffic_rules":{"type":["list",["object",{"direction":"string","fqdns":["list","string"],"ip_addresses":["list","string"],"port":"number","protocol":"string"}]],"computed":true},"resource_group_name":{"type":"string","required":true},"service_registry_enabled":{"type":"bool","optional":true},"service_registry_id":{"type":"string","computed":true},"sku_name":{"type":"string","optional":true,"default":"S0"},"sku_tier":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"zone_redundant":{"type":"bool","optional":true,"default":false}},"block_types":{"config_server_git_setting":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"search_paths":{"type":["list","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"http_basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true,"conflicts_with":["config_server_git_setting.0.ssh_auth"]},"repository":{"nesting_mode":3,"block":{"attributes":{"label":{"type":"string","optional":true},"name":{"type":"string","required":true},"pattern":{"type":["list","string"],"optional":true},"search_paths":{"type":["list","string"],"optional":true},"uri":{"type":"string","required":true}},"block_types":{"http_basic_auth":{"nesting_mode":3,"block":{"attributes":{"password":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true},"strict_host_key_checking_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}},"optional":true},"ssh_auth":{"nesting_mode":3,"block":{"attributes":{"host_key":{"type":"string","optional":true},"host_key_algorithm":{"type":"string","optional":true},"private_key":{"type":"string","required":true},"strict_host_key_checking_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true,"conflicts_with":["config_server_git_setting.0.http_basic_auth"]}}},"optional":true},"container_registry":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"password":{"type":"string","required":true},"server":{"type":"string","required":true},"username":{"type":"string","required":true}}},"optional":true},"default_build_service":{"nesting_mode":3,"block":{"attributes":{"container_registry_name":{"type":"string","optional":true}}},"optional":true},"marketplace":{"nesting_mode":3,"block":{"attributes":{"plan":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true,"computed":true},"network":{"nesting_mode":3,"block":{"attributes":{"app_network_resource_group":{"type":"string","optional":true,"computed":true},"app_subnet_id":{"type":"string","required":true},"cidr_ranges":{"type":["list","string"],"required":true},"outbound_type":{"type":"string","optional":true,"default":"loadBalancer"},"read_timeout_seconds":{"type":"number","optional":true},"service_runtime_network_resource_group":{"type":"string","optional":true,"computed":true},"service_runtime_subnet_id":{"type":"string","required":true}}},"optional":true},"trace":{"nesting_mode":3,"block":{"attributes":{"connection_string":{"type":"string","optional":true},"sample_rate":{"type":"number","optional":true,"default":10}}},"optional":true}}}},"azurerm_spring_cloud_storage":{"block":{"attributes":{"name":{"type":"string","required":true},"spring_cloud_service_id":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true}}}},"azurerm_ssh_public_key":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stack_hci_cluster":{"block":{"attributes":{"automanage_configuration_id":{"type":"string","optional":true},"client_id":{"type":"string","optional":true},"cloud_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"resource_provider_object_id":{"type":"string","computed":true},"service_endpoint":{"type":"string","computed":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","optional":true,"computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_stack_hci_deployment_setting":{"block":{"attributes":{"arc_resource_ids":{"type":["list","string"],"required":true},"stack_hci_cluster_id":{"type":"string","required":true},"version":{"type":"string","required":true}},"block_types":{"scale_unit":{"nesting_mode":3,"block":{"attributes":{"active_directory_organizational_unit_path":{"type":"string","required":true},"bitlocker_boot_volume_enabled":{"type":"bool","optional":true,"default":true},"bitlocker_data_volume_enabled":{"type":"bool","optional":true,"default":true},"credential_guard_enabled":{"type":"bool","optional":true,"default":false},"domain_fqdn":{"type":"string","required":true},"drift_control_enabled":{"type":"bool","optional":true,"default":true},"drtm_protection_enabled":{"type":"bool","optional":true,"default":true},"episodic_data_upload_enabled":{"type":"bool","optional":true,"default":true},"eu_location_enabled":{"type":"bool","optional":true,"default":false},"hvci_protection_enabled":{"type":"bool","optional":true,"default":true},"name_prefix":{"type":"string","required":true},"secrets_location":{"type":"string","required":true},"side_channel_mitigation_enabled":{"type":"bool","optional":true,"default":true},"smb_cluster_encryption_enabled":{"type":"bool","optional":true,"default":false},"smb_signing_enabled":{"type":"bool","optional":true,"default":true},"streaming_data_client_enabled":{"type":"bool","optional":true,"default":true},"wdac_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"cluster":{"nesting_mode":3,"block":{"attributes":{"azure_service_endpoint":{"type":"string","required":true},"cloud_account_name":{"type":"string","required":true},"name":{"type":"string","required":true},"witness_path":{"type":"string","required":true},"witness_type":{"type":"string","required":true}}},"required":true},"host_network":{"nesting_mode":3,"block":{"attributes":{"storage_auto_ip_enabled":{"type":"bool","optional":true,"default":true},"storage_connectivity_switchless_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"intent":{"nesting_mode":3,"block":{"attributes":{"adapter":{"type":["list","string"],"required":true},"adapter_property_override_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"qos_policy_override_enabled":{"type":"bool","optional":true,"default":false},"traffic_type":{"type":["list","string"],"required":true},"virtual_switch_configuration_override_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"adapter_property_override":{"nesting_mode":3,"block":{"attributes":{"jumbo_packet":{"type":"string","optional":true},"network_direct":{"type":"string","optional":true},"network_direct_technology":{"type":"string","optional":true}}},"optional":true},"qos_policy_override":{"nesting_mode":3,"block":{"attributes":{"bandwidth_percentage_smb":{"type":"string","optional":true},"priority_value8021_action_cluster":{"type":"string","optional":true},"priority_value8021_action_smb":{"type":"string","optional":true}}},"optional":true},"virtual_switch_configuration_override":{"nesting_mode":3,"block":{"attributes":{"enable_iov":{"type":"string","optional":true},"load_balancing_algorithm":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_network":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"network_adapter_name":{"type":"string","required":true},"vlan_id":{"type":"string","required":true}}},"required":true}}},"required":true},"infrastructure_network":{"nesting_mode":3,"block":{"attributes":{"dhcp_enabled":{"type":"bool","optional":true,"default":false},"dns_server":{"type":["list","string"],"required":true},"gateway":{"type":"string","required":true},"subnet_mask":{"type":"string","required":true}},"block_types":{"ip_pool":{"nesting_mode":3,"block":{"attributes":{"ending_address":{"type":"string","required":true},"starting_address":{"type":"string","required":true}}},"required":true}}},"required":true},"optional_service":{"nesting_mode":3,"block":{"attributes":{"custom_location":{"type":"string","required":true}}},"required":true},"physical_node":{"nesting_mode":3,"block":{"attributes":{"ipv4_address":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"storage":{"nesting_mode":3,"block":{"attributes":{"configuration_mode":{"type":"string","required":true}}},"required":true}}},"required":true}}}},"azurerm_stack_hci_extension":{"block":{"attributes":{"arc_setting_id":{"type":"string","required":true},"auto_upgrade_minor_version_enabled":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","optional":true}}}},"azurerm_stack_hci_logical_network":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_switch_name":{"type":"string","required":true}},"block_types":{"subnet":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","optional":true},"ip_allocation_method":{"type":"string","required":true},"vlan_id":{"type":"number","optional":true}},"block_types":{"ip_pool":{"nesting_mode":3,"block":{"attributes":{"end":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true},"route":{"nesting_mode":3,"block":{"attributes":{"address_prefix":{"type":"string","required":true},"name":{"type":"string","optional":true},"next_hop_ip_address":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_stack_hci_marketplace_gallery_image":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"hyperv_generation":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"os_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_path_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"version":{"type":"string","required":true}},"block_types":{"identifier":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true}}},"required":true}}}},"azurerm_stack_hci_network_interface":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"dns_servers":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"mac_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"gateway":{"type":"string","computed":true},"prefix_length":{"type":"string","computed":true},"private_ip_address":{"type":"string","optional":true},"subnet_id":{"type":"string","required":true}}},"required":true}}}},"azurerm_stack_hci_storage_path":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stack_hci_virtual_hard_disk":{"block":{"attributes":{"block_size_in_bytes":{"type":"number","optional":true},"custom_location_id":{"type":"string","required":true},"disk_file_format":{"type":"string","optional":true},"disk_size_in_gb":{"type":"number","required":true},"dynamic_enabled":{"type":"bool","optional":true,"default":false},"hyperv_generation":{"type":"string","optional":true},"location":{"type":"string","required":true},"logical_sector_in_bytes":{"type":"number","optional":true},"name":{"type":"string","required":true},"physical_sector_in_bytes":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"storage_path_id":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_static_site":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"app_settings":{"type":["map","string"],"optional":true},"default_host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_size":{"type":"string","optional":true,"default":"Free"},"sku_tier":{"type":"string","optional":true,"default":"Free"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_static_site_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"static_site_id":{"type":"string","required":true},"validation_token":{"type":"string","computed":true},"validation_type":{"type":"string","optional":true}}}},"azurerm_static_web_app":{"block":{"attributes":{"api_key":{"type":"string","computed":true},"app_settings":{"type":["map","string"],"optional":true},"configuration_file_changes_enabled":{"type":"bool","optional":true,"default":true},"default_host_name":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"preview_environments_enabled":{"type":"bool","optional":true,"default":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"repository_branch":{"type":"string","optional":true,"required_with":["repository_url","repository_token"]},"repository_token":{"type":"string","optional":true,"required_with":["repository_url","repository_branch"]},"repository_url":{"type":"string","optional":true,"required_with":["repository_token","repository_branch"]},"resource_group_name":{"type":"string","required":true},"sku_size":{"type":"string","optional":true,"default":"Free"},"sku_tier":{"type":"string","optional":true,"default":"Free"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"basic_auth":{"nesting_mode":3,"block":{"attributes":{"environments":{"type":"string","required":true},"password":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_static_web_app_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"static_web_app_id":{"type":"string","required":true},"validation_token":{"type":"string","computed":true},"validation_type":{"type":"string","required":true}}}},"azurerm_static_web_app_function_app_registration":{"block":{"attributes":{"function_app_id":{"type":"string","required":true},"static_web_app_id":{"type":"string","required":true}}}},"azurerm_storage_account":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"account_kind":{"type":"string","optional":true,"default":"StorageV2"},"account_replication_type":{"type":"string","required":true},"account_tier":{"type":"string","required":true},"allow_nested_items_to_be_public":{"type":"bool","optional":true,"default":true},"allowed_copy_scope":{"type":"string","optional":true},"cross_tenant_replication_enabled":{"type":"bool","optional":true,"default":false},"default_to_oauth_authentication":{"type":"bool","optional":true,"default":false},"dns_endpoint_type":{"type":"string","optional":true,"default":"Standard"},"edge_zone":{"type":"string","optional":true},"https_traffic_only_enabled":{"type":"bool","optional":true,"default":true},"infrastructure_encryption_enabled":{"type":"bool","optional":true,"default":false},"is_hns_enabled":{"type":"bool","optional":true,"default":false},"large_file_share_enabled":{"type":"bool","optional":true,"computed":true},"local_user_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"min_tls_version":{"type":"string","optional":true,"default":"TLS1_2"},"name":{"type":"string","required":true},"nfsv3_enabled":{"type":"bool","optional":true,"default":false},"primary_access_key":{"type":"string","computed":true},"primary_blob_connection_string":{"type":"string","computed":true},"primary_blob_endpoint":{"type":"string","computed":true},"primary_blob_host":{"type":"string","computed":true},"primary_blob_internet_endpoint":{"type":"string","computed":true},"primary_blob_internet_host":{"type":"string","computed":true},"primary_blob_microsoft_endpoint":{"type":"string","computed":true},"primary_blob_microsoft_host":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"primary_dfs_endpoint":{"type":"string","computed":true},"primary_dfs_host":{"type":"string","computed":true},"primary_dfs_internet_endpoint":{"type":"string","computed":true},"primary_dfs_internet_host":{"type":"string","computed":true},"primary_dfs_microsoft_endpoint":{"type":"string","computed":true},"primary_dfs_microsoft_host":{"type":"string","computed":true},"primary_file_endpoint":{"type":"string","computed":true},"primary_file_host":{"type":"string","computed":true},"primary_file_internet_endpoint":{"type":"string","computed":true},"primary_file_internet_host":{"type":"string","computed":true},"primary_file_microsoft_endpoint":{"type":"string","computed":true},"primary_file_microsoft_host":{"type":"string","computed":true},"primary_location":{"type":"string","computed":true},"primary_queue_endpoint":{"type":"string","computed":true},"primary_queue_host":{"type":"string","computed":true},"primary_queue_microsoft_endpoint":{"type":"string","computed":true},"primary_queue_microsoft_host":{"type":"string","computed":true},"primary_table_endpoint":{"type":"string","computed":true},"primary_table_host":{"type":"string","computed":true},"primary_table_microsoft_endpoint":{"type":"string","computed":true},"primary_table_microsoft_host":{"type":"string","computed":true},"primary_web_endpoint":{"type":"string","computed":true},"primary_web_host":{"type":"string","computed":true},"primary_web_internet_endpoint":{"type":"string","computed":true},"primary_web_internet_host":{"type":"string","computed":true},"primary_web_microsoft_endpoint":{"type":"string","computed":true},"primary_web_microsoft_host":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"queue_encryption_key_type":{"type":"string","optional":true,"default":"Service"},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_blob_connection_string":{"type":"string","computed":true},"secondary_blob_endpoint":{"type":"string","computed":true},"secondary_blob_host":{"type":"string","computed":true},"secondary_blob_internet_endpoint":{"type":"string","computed":true},"secondary_blob_internet_host":{"type":"string","computed":true},"secondary_blob_microsoft_endpoint":{"type":"string","computed":true},"secondary_blob_microsoft_host":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"secondary_dfs_endpoint":{"type":"string","computed":true},"secondary_dfs_host":{"type":"string","computed":true},"secondary_dfs_internet_endpoint":{"type":"string","computed":true},"secondary_dfs_internet_host":{"type":"string","computed":true},"secondary_dfs_microsoft_endpoint":{"type":"string","computed":true},"secondary_dfs_microsoft_host":{"type":"string","computed":true},"secondary_file_endpoint":{"type":"string","computed":true},"secondary_file_host":{"type":"string","computed":true},"secondary_file_internet_endpoint":{"type":"string","computed":true},"secondary_file_internet_host":{"type":"string","computed":true},"secondary_file_microsoft_endpoint":{"type":"string","computed":true},"secondary_file_microsoft_host":{"type":"string","computed":true},"secondary_location":{"type":"string","computed":true},"secondary_queue_endpoint":{"type":"string","computed":true},"secondary_queue_host":{"type":"string","computed":true},"secondary_queue_microsoft_endpoint":{"type":"string","computed":true},"secondary_queue_microsoft_host":{"type":"string","computed":true},"secondary_table_endpoint":{"type":"string","computed":true},"secondary_table_host":{"type":"string","computed":true},"secondary_table_microsoft_endpoint":{"type":"string","computed":true},"secondary_table_microsoft_host":{"type":"string","computed":true},"secondary_web_endpoint":{"type":"string","computed":true},"secondary_web_host":{"type":"string","computed":true},"secondary_web_internet_endpoint":{"type":"string","computed":true},"secondary_web_internet_host":{"type":"string","computed":true},"secondary_web_microsoft_endpoint":{"type":"string","computed":true},"secondary_web_microsoft_host":{"type":"string","computed":true},"sftp_enabled":{"type":"bool","optional":true,"default":false},"shared_access_key_enabled":{"type":"bool","optional":true,"default":true},"table_encryption_key_type":{"type":"string","optional":true,"default":"Service"},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azure_files_authentication":{"nesting_mode":3,"block":{"attributes":{"default_share_level_permission":{"type":"string","optional":true,"default":"None"},"directory_type":{"type":"string","required":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"domain_guid":{"type":"string","required":true},"domain_name":{"type":"string","required":true},"domain_sid":{"type":"string","optional":true},"forest_name":{"type":"string","optional":true},"netbios_domain_name":{"type":"string","optional":true},"storage_sid":{"type":"string","optional":true}}},"optional":true,"computed":true}}},"optional":true},"blob_properties":{"nesting_mode":3,"block":{"attributes":{"change_feed_enabled":{"type":"bool","optional":true,"default":false},"change_feed_retention_in_days":{"type":"number","optional":true},"default_service_version":{"type":"string","optional":true,"computed":true},"last_access_time_enabled":{"type":"bool","optional":true,"default":false},"versioning_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"container_delete_retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7}}},"optional":true},"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"delete_retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7},"permanent_delete_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"restore_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","required":true}}},"optional":true,"required_with":["blob_properties.0.delete_retention_policy"]}}},"optional":true,"computed":true},"custom_domain":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"use_subdomain":{"type":"bool","optional":true,"default":false}}},"optional":true},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_vault_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["customer_managed_key.0.managed_hsm_key_id","customer_managed_key.0.key_vault_key_id"]},"user_assigned_identity_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"immutability_policy":{"nesting_mode":3,"block":{"attributes":{"allow_protected_append_writes":{"type":"bool","required":true},"period_since_creation_in_days":{"type":"number","required":true},"state":{"type":"string","required":true}}},"optional":true},"network_rules":{"nesting_mode":3,"block":{"attributes":{"bypass":{"type":["set","string"],"optional":true,"computed":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true,"computed":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"private_link_access":{"nesting_mode":3,"block":{"attributes":{"endpoint_resource_id":{"type":"string","required":true},"endpoint_tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}},"optional":true,"computed":true},"queue_properties":{"nesting_mode":3,"block":{"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"hour_metrics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"include_apis":{"type":"bool","optional":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true},"logging":{"nesting_mode":3,"block":{"attributes":{"delete":{"type":"bool","required":true},"read":{"type":"bool","required":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true},"write":{"type":"bool","required":true}}},"optional":true,"computed":true},"minute_metrics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"include_apis":{"type":"bool","optional":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"routing":{"nesting_mode":3,"block":{"attributes":{"choice":{"type":"string","optional":true,"default":"MicrosoftRouting"},"publish_internet_endpoints":{"type":"bool","optional":true,"default":false},"publish_microsoft_endpoints":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"sas_policy":{"nesting_mode":3,"block":{"attributes":{"expiration_action":{"type":"string","optional":true,"default":"Log"},"expiration_period":{"type":"string","required":true}}},"optional":true},"share_properties":{"nesting_mode":3,"block":{"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true},"retention_policy":{"nesting_mode":3,"block":{"attributes":{"days":{"type":"number","optional":true,"default":7}}},"optional":true},"smb":{"nesting_mode":3,"block":{"attributes":{"authentication_types":{"type":["set","string"],"optional":true},"channel_encryption_type":{"type":["set","string"],"optional":true},"kerberos_ticket_encryption_type":{"type":["set","string"],"optional":true},"multichannel_enabled":{"type":"bool","optional":true,"default":false},"versions":{"type":["set","string"],"optional":true}}},"optional":true}}},"optional":true,"computed":true},"static_website":{"nesting_mode":3,"block":{"attributes":{"error_404_document":{"type":"string","optional":true},"index_document":{"type":"string","optional":true}}},"optional":true,"computed":true}}}},"azurerm_storage_account_customer_managed_key":{"block":{"attributes":{"federated_identity_client_id":{"type":"string","optional":true,"required_with":["user_assigned_identity_id"]},"key_name":{"type":"string","required":true},"key_vault_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"key_vault_uri":{"type":"string","optional":true,"computed":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"key_version":{"type":"string","optional":true},"managed_hsm_key_id":{"type":"string","optional":true,"exactly_one_of":["managed_hsm_key_id","key_vault_id","key_vault_uri"]},"storage_account_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}}},"azurerm_storage_account_local_user":{"block":{"attributes":{"home_directory":{"type":"string","optional":true},"name":{"type":"string","required":true},"password":{"type":"string","computed":true},"sid":{"type":"string","computed":true},"ssh_key_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["ssh_key_enabled","ssh_password_enabled"]},"ssh_password_enabled":{"type":"bool","optional":true,"default":false,"at_least_one_of":["ssh_key_enabled","ssh_password_enabled"]},"storage_account_id":{"type":"string","required":true}},"block_types":{"permission_scope":{"nesting_mode":3,"block":{"attributes":{"resource_name":{"type":"string","required":true},"service":{"type":"string","required":true}},"block_types":{"permissions":{"nesting_mode":3,"block":{"attributes":{"create":{"type":"bool","optional":true,"default":false},"delete":{"type":"bool","optional":true,"default":false},"list":{"type":"bool","optional":true,"default":false},"read":{"type":"bool","optional":true,"default":false},"write":{"type":"bool","optional":true,"default":false}}},"required":true}}},"optional":true},"ssh_authorized_key":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"key":{"type":"string","required":true}}},"optional":true,"required_with":["ssh_key_enabled"]}}}},"azurerm_storage_account_network_rules":{"block":{"attributes":{"bypass":{"type":["set","string"],"optional":true,"computed":true},"default_action":{"type":"string","required":true},"ip_rules":{"type":["set","string"],"optional":true},"storage_account_id":{"type":"string","required":true},"virtual_network_subnet_ids":{"type":["set","string"],"optional":true}},"block_types":{"private_link_access":{"nesting_mode":3,"block":{"attributes":{"endpoint_resource_id":{"type":"string","required":true},"endpoint_tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true}}}},"azurerm_storage_account_queue_properties":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"cors_rule":{"nesting_mode":3,"block":{"attributes":{"allowed_headers":{"type":["list","string"],"required":true},"allowed_methods":{"type":["list","string"],"required":true},"allowed_origins":{"type":["list","string"],"required":true},"exposed_headers":{"type":["list","string"],"required":true},"max_age_in_seconds":{"type":"number","required":true}}},"optional":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]},"hour_metrics":{"nesting_mode":3,"block":{"attributes":{"include_apis":{"type":"bool","optional":true,"default":false},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]},"logging":{"nesting_mode":3,"block":{"attributes":{"delete":{"type":"bool","required":true},"read":{"type":"bool","required":true},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true},"write":{"type":"bool","required":true}}},"optional":true,"computed":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]},"minute_metrics":{"nesting_mode":3,"block":{"attributes":{"include_apis":{"type":"bool","optional":true,"default":false},"retention_policy_days":{"type":"number","optional":true},"version":{"type":"string","required":true}}},"optional":true,"computed":true,"at_least_one_of":["minute_metrics","hour_metrics","logging","cors_rule"]}}}},"azurerm_storage_account_static_website":{"block":{"attributes":{"error_404_document":{"type":"string","optional":true,"at_least_one_of":["error_404_document","index_document"]},"index_document":{"type":"string","optional":true,"at_least_one_of":["error_404_document","index_document"]},"storage_account_id":{"type":"string","required":true}}}},"azurerm_storage_blob":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"cache_control":{"type":"string","optional":true},"content_md5":{"type":"string","optional":true,"conflicts_with":["source_uri"]},"content_type":{"type":"string","optional":true,"default":"application/octet-stream"},"encryption_scope":{"type":"string","optional":true},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"parallelism":{"type":"number","optional":true,"default":8},"size":{"type":"number","optional":true,"default":0},"source":{"type":"string","optional":true,"conflicts_with":["source_uri","source_content"]},"source_content":{"type":"string","optional":true,"conflicts_with":["source","source_uri"]},"source_uri":{"type":"string","optional":true,"conflicts_with":["source","source_content"]},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"type":{"type":"string","required":true},"url":{"type":"string","computed":true}}}},"azurerm_storage_blob_inventory_policy":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"rules":{"nesting_mode":4,"block":{"attributes":{"format":{"type":"string","required":true},"name":{"type":"string","required":true},"schedule":{"type":"string","required":true},"schema_fields":{"type":["list","string"],"required":true},"scope":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"blob_types":{"type":["set","string"],"required":true},"exclude_prefixes":{"type":["set","string"],"optional":true},"include_blob_versions":{"type":"bool","optional":true,"default":false},"include_deleted":{"type":"bool","optional":true,"default":false},"include_snapshots":{"type":"bool","optional":true,"default":false},"prefix_match":{"type":["set","string"],"optional":true}}},"optional":true}}},"required":true}}}},"azurerm_storage_container":{"block":{"attributes":{"container_access_type":{"type":"string","optional":true,"default":"private"},"default_encryption_scope":{"type":"string","optional":true,"computed":true},"encryption_scope_override_enabled":{"type":"bool","optional":true,"default":true,"required_with":["default_encryption_scope"]},"has_immutability_policy":{"type":"bool","computed":true},"has_legal_hold":{"type":"bool","computed":true},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_id","storage_account_name"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_id","storage_account_name"]}}}},"azurerm_storage_container_immutability_policy":{"block":{"attributes":{"immutability_period_in_days":{"type":"number","required":true},"locked":{"type":"bool","optional":true,"default":false},"protected_append_writes_all_enabled":{"type":"bool","optional":true,"default":false},"protected_append_writes_enabled":{"type":"bool","optional":true,"default":false},"storage_container_resource_manager_id":{"type":"string","required":true}}}},"azurerm_storage_data_lake_gen2_filesystem":{"block":{"attributes":{"default_encryption_scope":{"type":"string","optional":true,"computed":true},"group":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"owner":{"type":"string","optional":true,"computed":true},"properties":{"type":["map","string"],"optional":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"ace":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"access"},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_storage_data_lake_gen2_path":{"block":{"attributes":{"filesystem_name":{"type":"string","required":true},"group":{"type":"string","optional":true,"computed":true},"owner":{"type":"string","optional":true,"computed":true},"path":{"type":"string","required":true},"resource":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}},"block_types":{"ace":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"scope":{"type":"string","optional":true,"default":"access"},"type":{"type":"string","required":true}}},"optional":true,"computed":true}}}},"azurerm_storage_encryption_scope":{"block":{"attributes":{"infrastructure_encryption_required":{"type":"bool","optional":true},"key_vault_key_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"source":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true}}}},"azurerm_storage_management_policy":{"block":{"attributes":{"storage_account_id":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"name":{"type":"string","required":true}},"block_types":{"actions":{"nesting_mode":3,"block":{"block_types":{"base_blob":{"nesting_mode":3,"block":{"attributes":{"auto_tier_to_hot_from_cool_enabled":{"type":"bool","optional":true},"delete_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"delete_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"delete_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_last_access_time_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cool_after_days_since_modification_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true},"snapshot":{"nesting_mode":3,"block":{"attributes":{"change_tier_to_archive_after_days_since_creation":{"type":"number","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"number","optional":true,"default":-1},"delete_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true},"version":{"nesting_mode":3,"block":{"attributes":{"change_tier_to_archive_after_days_since_creation":{"type":"number","optional":true,"default":-1},"change_tier_to_cool_after_days_since_creation":{"type":"number","optional":true,"default":-1},"delete_after_days_since_creation":{"type":"number","optional":true,"default":-1},"tier_to_archive_after_days_since_last_tier_change_greater_than":{"type":"number","optional":true,"default":-1},"tier_to_cold_after_days_since_creation_greater_than":{"type":"number","optional":true,"default":-1}}},"optional":true}}},"required":true},"filters":{"nesting_mode":3,"block":{"attributes":{"blob_types":{"type":["set","string"],"required":true},"prefix_match":{"type":["set","string"],"optional":true}},"block_types":{"match_blob_index_tag":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"operation":{"type":"string","optional":true,"default":"=="},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_storage_mover":{"block":{"attributes":{"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_storage_mover_agent":{"block":{"attributes":{"arc_virtual_machine_id":{"type":"string","required":true},"arc_virtual_machine_uuid":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_job_definition":{"block":{"attributes":{"agent_name":{"type":"string","optional":true},"copy_mode":{"type":"string","required":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"source_name":{"type":"string","required":true},"source_sub_path":{"type":"string","optional":true},"storage_mover_project_id":{"type":"string","required":true},"target_name":{"type":"string","required":true},"target_sub_path":{"type":"string","optional":true}}}},"azurerm_storage_mover_project":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_source_endpoint":{"block":{"attributes":{"description":{"type":"string","optional":true},"export":{"type":"string","optional":true},"host":{"type":"string","required":true},"name":{"type":"string","required":true},"nfs_version":{"type":"string","optional":true,"default":"NFSauto"},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_mover_target_endpoint":{"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"storage_mover_id":{"type":"string","required":true}}}},"azurerm_storage_object_replication":{"block":{"attributes":{"destination_object_replication_id":{"type":"string","computed":true},"destination_storage_account_id":{"type":"string","required":true},"source_object_replication_id":{"type":"string","computed":true},"source_storage_account_id":{"type":"string","required":true}},"block_types":{"rules":{"nesting_mode":4,"block":{"attributes":{"copy_blobs_created_after":{"type":"string","optional":true,"default":"OnlyNewObjects"},"destination_container_name":{"type":"string","required":true},"filter_out_blobs_with_prefix":{"type":["set","string"],"optional":true},"name":{"type":"string","computed":true},"source_container_name":{"type":"string","required":true}}},"required":true}}}},"azurerm_storage_queue":{"block":{"attributes":{"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_name":{"type":"string","required":true}}}},"azurerm_storage_share":{"block":{"attributes":{"access_tier":{"type":"string","optional":true,"computed":true},"enabled_protocol":{"type":"string","optional":true,"default":"SMB"},"metadata":{"type":["map","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"quota":{"type":"number","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_account_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_account_id"]},"url":{"type":"string","computed":true}},"block_types":{"acl":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true}},"block_types":{"access_policy":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","optional":true},"permissions":{"type":"string","required":true},"start":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_storage_share_directory":{"block":{"attributes":{"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"storage_share_id":{"type":"string","required":true}}}},"azurerm_storage_share_file":{"block":{"attributes":{"content_disposition":{"type":"string","optional":true},"content_encoding":{"type":"string","optional":true},"content_length":{"type":"number","computed":true},"content_md5":{"type":"string","optional":true},"content_type":{"type":"string","optional":true,"default":"application/octet-stream"},"metadata":{"type":["map","string"],"optional":true},"name":{"type":"string","required":true},"path":{"type":"string","optional":true,"default":""},"source":{"type":"string","optional":true},"storage_share_id":{"type":"string","required":true}}}},"azurerm_storage_sync":{"block":{"attributes":{"incoming_traffic_policy":{"type":"string","optional":true,"default":"AllowAllTraffic"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"registered_servers":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_storage_sync_cloud_endpoint":{"block":{"attributes":{"file_share_name":{"type":"string","required":true},"name":{"type":"string","required":true},"storage_account_id":{"type":"string","required":true},"storage_account_tenant_id":{"type":"string","optional":true,"computed":true},"storage_sync_group_id":{"type":"string","required":true}}}},"azurerm_storage_sync_group":{"block":{"attributes":{"name":{"type":"string","required":true},"storage_sync_id":{"type":"string","required":true}}}},"azurerm_storage_sync_server_endpoint":{"block":{"attributes":{"cloud_tiering_enabled":{"type":"bool","optional":true,"default":false},"initial_download_policy":{"type":"string","optional":true,"default":"NamespaceThenModifiedFiles"},"local_cache_mode":{"type":"string","optional":true,"default":"UpdateLocallyCachedFiles"},"name":{"type":"string","required":true},"registered_server_id":{"type":"string","required":true},"server_local_path":{"type":"string","required":true},"storage_sync_group_id":{"type":"string","required":true},"tier_files_older_than_days":{"type":"number","optional":true},"volume_free_space_percent":{"type":"number","optional":true,"default":20}}}},"azurerm_storage_table":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_manager_id":{"type":"string","computed":true},"storage_account_name":{"type":"string","required":true}},"block_types":{"acl":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","required":true}},"block_types":{"access_policy":{"nesting_mode":3,"block":{"attributes":{"expiry":{"type":"string","required":true},"permissions":{"type":"string","required":true},"start":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_storage_table_entity":{"block":{"attributes":{"entity":{"type":["map","string"],"required":true},"partition_key":{"type":"string","required":true},"row_key":{"type":"string","required":true},"storage_table_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_cluster":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"streaming_capacity":{"type":"number","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_stream_analytics_function_javascript_uda":{"block":{"attributes":{"name":{"type":"string","required":true},"script":{"type":"string","required":true},"stream_analytics_job_id":{"type":"string","required":true}},"block_types":{"input":{"nesting_mode":3,"block":{"attributes":{"configuration_parameter":{"type":"bool","optional":true,"default":false},"type":{"type":"string","required":true}}},"required":true},"output":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_function_javascript_udf":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"script":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"input":{"nesting_mode":3,"block":{"attributes":{"configuration_parameter":{"type":"bool","optional":true,"default":false},"type":{"type":"string","required":true}}},"required":true},"output":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_job":{"block":{"attributes":{"compatibility_level":{"type":"string","optional":true,"computed":true},"content_storage_policy":{"type":"string","optional":true,"default":"SystemAccount"},"data_locale":{"type":"string","optional":true,"default":"en-US"},"events_late_arrival_max_delay_in_seconds":{"type":"number","optional":true,"default":5},"events_out_of_order_max_delay_in_seconds":{"type":"number","optional":true,"default":0},"events_out_of_order_policy":{"type":"string","optional":true,"default":"Adjust"},"job_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_error_policy":{"type":"string","optional":true,"default":"Drop"},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","optional":true,"default":"Standard"},"stream_analytics_cluster_id":{"type":"string","optional":true},"streaming_units":{"type":"number","optional":true},"tags":{"type":["map","string"],"optional":true},"transformation_query":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Cloud"}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"job_storage_account":{"nesting_mode":3,"block":{"attributes":{"account_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"}}},"optional":true}}}},"azurerm_stream_analytics_job_schedule":{"block":{"attributes":{"last_output_time":{"type":"string","computed":true},"start_mode":{"type":"string","required":true},"start_time":{"type":"string","optional":true,"computed":true},"stream_analytics_job_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_job_storage_account":{"block":{"attributes":{"authentication_mode":{"type":"string","required":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","required":true},"stream_analytics_job_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_managed_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"stream_analytics_cluster_name":{"type":"string","required":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"batch_max_wait_time":{"type":"string","optional":true},"batch_min_rows":{"type":"number","optional":true},"blob_write_mode":{"type":"string","optional":true,"default":"Append"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_cosmosdb":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"container_name":{"type":"string","required":true},"cosmosdb_account_key":{"type":"string","required":true},"cosmosdb_sql_database_id":{"type":"string","required":true},"document_id":{"type":"string","optional":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"stream_analytics_job_id":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_eventhub":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"property_columns":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_function":{"block":{"attributes":{"api_key":{"type":"string","required":true},"batch_max_count":{"type":"number","optional":true,"default":100},"batch_max_in_bytes":{"type":"number","optional":true,"default":262144},"function_app":{"type":"string","required":true},"function_name":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_mssql":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"database":{"type":"string","required":true},"max_batch_count":{"type":"number","optional":true,"default":10000},"max_writer_count":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true},"password":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true},"user":{"type":"string","optional":true}}}},"azurerm_stream_analytics_output_powerbi":{"block":{"attributes":{"dataset":{"type":"string","required":true},"group_id":{"type":"string","required":true},"group_name":{"type":"string","required":true},"name":{"type":"string","required":true},"stream_analytics_job_id":{"type":"string","required":true},"table":{"type":"string","required":true},"token_user_display_name":{"type":"string","optional":true},"token_user_principal_name":{"type":"string","optional":true}}}},"azurerm_stream_analytics_output_servicebus_queue":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"name":{"type":"string","required":true},"property_columns":{"type":["list","string"],"optional":true},"queue_name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true},"system_property_columns":{"type":["map","string"],"optional":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_servicebus_topic":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"name":{"type":"string","required":true},"property_columns":{"type":["list","string"],"optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true},"system_property_columns":{"type":["map","string"],"optional":true},"topic_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"format":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_output_synapse":{"block":{"attributes":{"database":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true},"user":{"type":"string","required":true}}}},"azurerm_stream_analytics_output_table":{"block":{"attributes":{"batch_size":{"type":"number","required":true},"columns_to_remove":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"row_key":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","required":true}}}},"azurerm_stream_analytics_reference_input_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","optional":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_reference_input_mssql":{"block":{"attributes":{"database":{"type":"string","required":true},"delta_snapshot_query":{"type":"string","optional":true},"full_snapshot_query":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"refresh_interval_duration":{"type":"string","optional":true},"refresh_type":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"server":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"table":{"type":"string","optional":true},"username":{"type":"string","required":true}}}},"azurerm_stream_analytics_stream_input_blob":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"date_format":{"type":"string","required":true},"name":{"type":"string","required":true},"path_pattern":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"storage_account_key":{"type":"string","required":true},"storage_account_name":{"type":"string","required":true},"storage_container_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true},"time_format":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_eventhub":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"string","optional":true},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_eventhub_v2":{"block":{"attributes":{"authentication_mode":{"type":"string","optional":true,"default":"ConnectionString"},"eventhub_consumer_group_name":{"type":"string","optional":true},"eventhub_name":{"type":"string","required":true},"name":{"type":"string","required":true},"partition_key":{"type":"string","optional":true},"servicebus_namespace":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","optional":true},"shared_access_policy_name":{"type":"string","optional":true},"stream_analytics_job_id":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_stream_analytics_stream_input_iothub":{"block":{"attributes":{"endpoint":{"type":"string","required":true},"eventhub_consumer_group_name":{"type":"string","required":true},"iothub_namespace":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"shared_access_policy_key":{"type":"string","required":true},"shared_access_policy_name":{"type":"string","required":true},"stream_analytics_job_name":{"type":"string","required":true}},"block_types":{"serialization":{"nesting_mode":3,"block":{"attributes":{"encoding":{"type":"string","optional":true},"field_delimiter":{"type":"string","optional":true},"type":{"type":"string","required":true}}},"required":true}}}},"azurerm_subnet":{"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"default_outbound_access_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"private_endpoint_network_policies":{"type":"string","optional":true,"default":"Disabled"},"private_link_service_network_policies_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_endpoint_policy_ids":{"type":["set","string"],"optional":true},"service_endpoints":{"type":["set","string"],"optional":true},"virtual_network_name":{"type":"string","required":true}},"block_types":{"delegation":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true}},"block_types":{"service_delegation":{"nesting_mode":3,"block":{"attributes":{"actions":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true}}},"required":true}}},"optional":true}}}},"azurerm_subnet_nat_gateway_association":{"block":{"attributes":{"nat_gateway_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_network_security_group_association":{"block":{"attributes":{"network_security_group_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_route_table_association":{"block":{"attributes":{"route_table_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}}},"azurerm_subnet_service_endpoint_storage_policy":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"definition":{"nesting_mode":3,"block":{"attributes":{"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"service":{"type":"string","optional":true,"default":"Microsoft.Storage"},"service_resources":{"type":["set","string"],"required":true}}},"optional":true}}}},"azurerm_subscription":{"block":{"attributes":{"alias":{"type":"string","optional":true,"computed":true},"billing_scope_id":{"type":"string","optional":true,"exactly_one_of":["subscription_id","billing_scope_id"]},"subscription_id":{"type":"string","optional":true,"computed":true,"exactly_one_of":["subscription_id","billing_scope_id"]},"subscription_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true},"workload":{"type":"string","optional":true}}}},"azurerm_subscription_cost_management_export":{"block":{"attributes":{"active":{"type":"bool","optional":true,"default":true},"file_format":{"type":"string","optional":true,"default":"Csv"},"name":{"type":"string","required":true},"recurrence_period_end_date":{"type":"string","required":true},"recurrence_period_start_date":{"type":"string","required":true},"recurrence_type":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}},"block_types":{"export_data_options":{"nesting_mode":3,"block":{"attributes":{"time_frame":{"type":"string","required":true},"type":{"type":"string","required":true}}},"required":true},"export_data_storage_location":{"nesting_mode":3,"block":{"attributes":{"container_id":{"type":"string","required":true},"root_folder_path":{"type":"string","required":true}}},"required":true}}}},"azurerm_subscription_cost_management_view":{"block":{"attributes":{"accumulated":{"type":"bool","required":true},"chart_type":{"type":"string","required":true},"display_name":{"type":"string","required":true},"name":{"type":"string","required":true},"report_type":{"type":"string","required":true},"subscription_id":{"type":"string","required":true},"timeframe":{"type":"string","required":true}},"block_types":{"dataset":{"nesting_mode":3,"block":{"attributes":{"granularity":{"type":"string","required":true}},"block_types":{"aggregation":{"nesting_mode":4,"block":{"attributes":{"column_name":{"type":"string","required":true},"name":{"type":"string","required":true}}},"required":true},"grouping":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true},"sorting":{"nesting_mode":3,"block":{"attributes":{"direction":{"type":"string","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true},"kpi":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","required":true}}},"optional":true},"pivot":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_subscription_policy_assignment":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"enforce":{"type":"bool","optional":true,"default":true},"location":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"not_scopes":{"type":["list","string"],"optional":true},"parameters":{"type":"string","optional":true},"policy_definition_id":{"type":"string","required":true},"subscription_id":{"type":"string","required":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"non_compliance_message":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true}}},"optional":true},"overrides":{"nesting_mode":3,"block":{"attributes":{"value":{"type":"string","required":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","computed":true},"not_in":{"type":["list","string"],"optional":true}}},"optional":true}}},"optional":true},"resource_selectors":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true}},"block_types":{"selectors":{"nesting_mode":3,"block":{"attributes":{"in":{"type":["list","string"],"optional":true},"kind":{"type":"string","required":true},"not_in":{"type":["list","string"],"optional":true}}},"required":true}}},"optional":true}}}},"azurerm_subscription_policy_exemption":{"block":{"attributes":{"description":{"type":"string","optional":true},"display_name":{"type":"string","optional":true},"exemption_category":{"type":"string","required":true},"expires_on":{"type":"string","optional":true},"metadata":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_ids":{"type":["list","string"],"optional":true},"subscription_id":{"type":"string","required":true}}}},"azurerm_subscription_policy_remediation":{"block":{"attributes":{"failure_percentage":{"type":"number","optional":true},"location_filters":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"parallel_deployments":{"type":"number","optional":true},"policy_assignment_id":{"type":"string","required":true},"policy_definition_reference_id":{"type":"string","optional":true},"resource_count":{"type":"number","optional":true},"resource_discovery_mode":{"type":"string","optional":true,"default":"ExistingNonCompliant"},"subscription_id":{"type":"string","required":true}}}},"azurerm_subscription_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_synapse_firewall_rule":{"block":{"attributes":{"end_ip_address":{"type":"string","required":true},"name":{"type":"string","required":true},"start_ip_address":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_integration_runtime_azure":{"block":{"attributes":{"compute_type":{"type":"string","optional":true,"default":"General"},"core_count":{"type":"number","optional":true,"default":8},"description":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"time_to_live_min":{"type":"number","optional":true,"default":0}}}},"azurerm_synapse_integration_runtime_self_hosted":{"block":{"attributes":{"authorization_key_primary":{"type":"string","computed":true},"authorization_key_secondary":{"type":"string","computed":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_linked_service":{"block":{"attributes":{"additional_properties":{"type":["map","string"],"optional":true},"annotations":{"type":["list","string"],"optional":true},"description":{"type":"string","optional":true},"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true},"synapse_workspace_id":{"type":"string","required":true},"type":{"type":"string","required":true},"type_properties_json":{"type":"string","required":true}},"block_types":{"integration_runtime":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"parameters":{"type":["map","string"],"optional":true}}},"optional":true}}}},"azurerm_synapse_managed_private_endpoint":{"block":{"attributes":{"name":{"type":"string","required":true},"subresource_name":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true}}}},"azurerm_synapse_private_link_hub":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_synapse_role_assignment":{"block":{"attributes":{"principal_id":{"type":"string","required":true},"principal_type":{"type":"string","optional":true},"role_name":{"type":"string","required":true},"synapse_spark_pool_id":{"type":"string","optional":true,"exactly_one_of":["synapse_workspace_id","synapse_spark_pool_id"]},"synapse_workspace_id":{"type":"string","optional":true,"exactly_one_of":["synapse_workspace_id","synapse_spark_pool_id"]}}}},"azurerm_synapse_spark_pool":{"block":{"attributes":{"cache_size":{"type":"number","optional":true},"compute_isolation_enabled":{"type":"bool","optional":true,"default":false},"dynamic_executor_allocation_enabled":{"type":"bool","optional":true,"default":false},"max_executors":{"type":"number","optional":true},"min_executors":{"type":"number","optional":true},"name":{"type":"string","required":true},"node_count":{"type":"number","optional":true,"computed":true,"exactly_one_of":["node_count","auto_scale"]},"node_size":{"type":"string","required":true},"node_size_family":{"type":"string","required":true},"session_level_packages_enabled":{"type":"bool","optional":true,"default":false},"spark_events_folder":{"type":"string","optional":true,"default":"/events"},"spark_log_folder":{"type":"string","optional":true,"default":"/logs"},"spark_version":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"auto_pause":{"nesting_mode":3,"block":{"attributes":{"delay_in_minutes":{"type":"number","required":true}}},"optional":true},"auto_scale":{"nesting_mode":3,"block":{"attributes":{"max_node_count":{"type":"number","required":true},"min_node_count":{"type":"number","required":true}}},"optional":true,"exactly_one_of":["node_count","auto_scale"]},"library_requirement":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"filename":{"type":"string","required":true}}},"optional":true},"spark_config":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"filename":{"type":"string","required":true}}},"optional":true}}}},"azurerm_synapse_sql_pool":{"block":{"attributes":{"collation":{"type":"string","optional":true,"computed":true},"create_mode":{"type":"string","optional":true,"default":"Default"},"data_encrypted":{"type":"bool","optional":true},"geo_backup_policy_enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"recovery_database_id":{"type":"string","optional":true,"conflicts_with":["restore"]},"sku_name":{"type":"string","required":true},"storage_account_type":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"restore":{"nesting_mode":3,"block":{"attributes":{"point_in_time":{"type":"string","required":true},"source_database_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["recovery_database_id"]}}}},"azurerm_synapse_sql_pool_extended_auditing_policy":{"block":{"attributes":{"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"sql_pool_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_synapse_sql_pool_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"policy_state":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"sql_pool_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true}}}},"azurerm_synapse_sql_pool_vulnerability_assessment":{"block":{"attributes":{"sql_pool_security_alert_policy_id":{"type":"string","required":true},"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins_enabled":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_synapse_sql_pool_vulnerability_assessment_baseline":{"block":{"attributes":{"name":{"type":"string","required":true},"rule_name":{"type":"string","required":true},"sql_pool_vulnerability_assessment_id":{"type":"string","required":true}},"block_types":{"baseline":{"nesting_mode":3,"block":{"attributes":{"result":{"type":["list","string"],"required":true}}},"optional":true}}}},"azurerm_synapse_sql_pool_workload_classifier":{"block":{"attributes":{"context":{"type":"string","optional":true},"end_time":{"type":"string","optional":true},"importance":{"type":"string","optional":true},"label":{"type":"string","optional":true},"member_name":{"type":"string","required":true},"name":{"type":"string","required":true},"start_time":{"type":"string","optional":true},"workload_group_id":{"type":"string","required":true}}}},"azurerm_synapse_sql_pool_workload_group":{"block":{"attributes":{"importance":{"type":"string","optional":true,"default":"normal"},"max_resource_percent":{"type":"number","required":true},"max_resource_percent_per_request":{"type":"number","optional":true,"default":3},"min_resource_percent":{"type":"number","required":true},"min_resource_percent_per_request":{"type":"number","optional":true},"name":{"type":"string","required":true},"query_execution_timeout_in_seconds":{"type":"number","optional":true},"sql_pool_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace":{"block":{"attributes":{"azuread_authentication_only":{"type":"bool","optional":true,"default":false},"compute_subnet_id":{"type":"string","optional":true},"connectivity_endpoints":{"type":["map","string"],"computed":true},"data_exfiltration_protection_enabled":{"type":"bool","optional":true},"linking_allowed_for_aad_tenant_ids":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true,"computed":true},"managed_virtual_network_enabled":{"type":"bool","optional":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"purview_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"sql_administrator_login":{"type":"string","optional":true},"sql_administrator_login_password":{"type":"string","optional":true},"sql_identity_control_enabled":{"type":"bool","optional":true},"storage_data_lake_gen2_filesystem_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"azure_devops_repo":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"last_commit_id":{"type":"string","optional":true},"project_name":{"type":"string","required":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true},"tenant_id":{"type":"string","optional":true,"computed":true}}},"optional":true,"conflicts_with":["github_repo"]},"customer_managed_key":{"nesting_mode":3,"block":{"attributes":{"key_name":{"type":"string","optional":true,"default":"cmk"},"key_versionless_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"optional":true},"github_repo":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","required":true},"branch_name":{"type":"string","required":true},"git_url":{"type":"string","optional":true},"last_commit_id":{"type":"string","optional":true},"repository_name":{"type":"string","required":true},"root_folder":{"type":"string","required":true}}},"optional":true,"conflicts_with":["azure_devops_repo"]},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_synapse_workspace_aad_admin":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_extended_auditing_policy":{"block":{"attributes":{"log_monitoring_enabled":{"type":"bool","optional":true,"default":true},"retention_in_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_account_access_key_is_secondary":{"type":"bool","optional":true,"default":false},"storage_endpoint":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_key":{"block":{"attributes":{"active":{"type":"bool","required":true},"customer_managed_key_name":{"type":"string","required":true},"customer_managed_key_versionless_id":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_security_alert_policy":{"block":{"attributes":{"disabled_alerts":{"type":["set","string"],"optional":true},"email_account_admins_enabled":{"type":"bool","optional":true,"default":false},"email_addresses":{"type":["set","string"],"optional":true},"policy_state":{"type":"string","required":true},"retention_days":{"type":"number","optional":true,"default":0},"storage_account_access_key":{"type":"string","optional":true},"storage_endpoint":{"type":"string","optional":true},"synapse_workspace_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_sql_aad_admin":{"block":{"attributes":{"login":{"type":"string","required":true},"object_id":{"type":"string","required":true},"synapse_workspace_id":{"type":"string","required":true},"tenant_id":{"type":"string","required":true}}}},"azurerm_synapse_workspace_vulnerability_assessment":{"block":{"attributes":{"storage_account_access_key":{"type":"string","optional":true},"storage_container_path":{"type":"string","required":true},"storage_container_sas_key":{"type":"string","optional":true},"workspace_security_alert_policy_id":{"type":"string","required":true}},"block_types":{"recurring_scans":{"nesting_mode":3,"block":{"attributes":{"email_subscription_admins_enabled":{"type":"bool","optional":true,"default":true},"emails":{"type":["list","string"],"optional":true},"enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}}},"azurerm_system_center_virtual_machine_manager_availability_set":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_cloud":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_server":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"fqdn":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"password":{"type":"string","required":true},"port":{"type":"number","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"username":{"type":"string","required":true}}}},"azurerm_system_center_virtual_machine_manager_virtual_machine_instance":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"scoped_resource_id":{"type":"string","required":true},"system_center_virtual_machine_manager_availability_set_ids":{"type":["list","string"],"optional":true}},"block_types":{"hardware":{"nesting_mode":3,"block":{"attributes":{"cpu_count":{"type":"number","optional":true,"at_least_one_of":["hardware.0.cpu_count","hardware.0.dynamic_memory_max_in_mb","hardware.0.dynamic_memory_min_in_mb","hardware.0.limit_cpu_for_migration_enabled","hardware.0.memory_in_mb"]},"dynamic_memory_max_in_mb":{"type":"number","optional":true,"at_least_one_of":["hardware.0.cpu_count","hardware.0.dynamic_memory_max_in_mb","hardware.0.dynamic_memory_min_in_mb","hardware.0.limit_cpu_for_migration_enabled","hardware.0.memory_in_mb"]},"dynamic_memory_min_in_mb":{"type":"number","optional":true,"at_least_one_of":["hardware.0.cpu_count","hardware.0.dynamic_memory_max_in_mb","hardware.0.dynamic_memory_min_in_mb","hardware.0.limit_cpu_for_migration_enabled","hardware.0.memory_in_mb"]},"limit_cpu_for_migration_enabled":{"type":"bool","optional":true,"at_least_one_of":["hardware.0.cpu_count","hardware.0.dynamic_memory_max_in_mb","hardware.0.dynamic_memory_min_in_mb","hardware.0.limit_cpu_for_migration_enabled","hardware.0.memory_in_mb"]},"memory_in_mb":{"type":"number","optional":true,"at_least_one_of":["hardware.0.cpu_count","hardware.0.dynamic_memory_max_in_mb","hardware.0.dynamic_memory_min_in_mb","hardware.0.limit_cpu_for_migration_enabled","hardware.0.memory_in_mb"]}}},"optional":true},"infrastructure":{"nesting_mode":3,"block":{"attributes":{"checkpoint_type":{"type":"string","optional":true},"system_center_virtual_machine_manager_cloud_id":{"type":"string","optional":true,"at_least_one_of":["infrastructure.0.system_center_virtual_machine_manager_cloud_id","infrastructure.0.system_center_virtual_machine_manager_inventory_item_id","infrastructure.0.system_center_virtual_machine_manager_template_id","infrastructure.0.system_center_virtual_machine_manager_virtual_machine_server_id"],"required_with":["infrastructure.0.system_center_virtual_machine_manager_template_id"]},"system_center_virtual_machine_manager_inventory_item_id":{"type":"string","optional":true,"at_least_one_of":["infrastructure.0.system_center_virtual_machine_manager_cloud_id","infrastructure.0.system_center_virtual_machine_manager_inventory_item_id","infrastructure.0.system_center_virtual_machine_manager_template_id","infrastructure.0.system_center_virtual_machine_manager_virtual_machine_server_id"],"required_with":["infrastructure.0.system_center_virtual_machine_manager_virtual_machine_server_id"]},"system_center_virtual_machine_manager_template_id":{"type":"string","optional":true,"at_least_one_of":["infrastructure.0.system_center_virtual_machine_manager_cloud_id","infrastructure.0.system_center_virtual_machine_manager_inventory_item_id","infrastructure.0.system_center_virtual_machine_manager_template_id","infrastructure.0.system_center_virtual_machine_manager_virtual_machine_server_id"],"required_with":["infrastructure.0.system_center_virtual_machine_manager_cloud_id"]},"system_center_virtual_machine_manager_virtual_machine_server_id":{"type":"string","optional":true,"at_least_one_of":["infrastructure.0.system_center_virtual_machine_manager_cloud_id","infrastructure.0.system_center_virtual_machine_manager_inventory_item_id","infrastructure.0.system_center_virtual_machine_manager_template_id","infrastructure.0.system_center_virtual_machine_manager_virtual_machine_server_id"]}}},"required":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"ipv4_address_type":{"type":"string","optional":true},"ipv6_address_type":{"type":"string","optional":true},"mac_address_type":{"type":"string","optional":true},"name":{"type":"string","required":true},"virtual_network_id":{"type":"string","optional":true}}},"optional":true},"operating_system":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"computer_name":{"type":"string","required":true}}},"optional":true},"storage_disk":{"nesting_mode":3,"block":{"attributes":{"bus":{"type":"number","optional":true},"bus_type":{"type":"string","optional":true},"disk_size_gb":{"type":"number","optional":true},"lun":{"type":"number","optional":true},"name":{"type":"string","optional":true},"storage_qos_policy_name":{"type":"string","optional":true},"template_disk_id":{"type":"string","optional":true},"vhd_type":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_system_center_virtual_machine_manager_virtual_machine_template":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_system_center_virtual_machine_manager_virtual_network":{"block":{"attributes":{"custom_location_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"system_center_virtual_machine_manager_server_inventory_item_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_tenant_template_deployment":{"block":{"attributes":{"debug_level":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_content":{"type":"string","computed":true},"parameters_content":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"template_content":{"type":"string","optional":true,"computed":true,"exactly_one_of":["template_content","template_spec_version_id"]},"template_spec_version_id":{"type":"string","optional":true,"exactly_one_of":["template_content","template_spec_version_id"]}}}},"azurerm_traffic_manager_azure_endpoint":{"block":{"attributes":{"always_serve_enabled":{"type":"bool","optional":true,"default":false},"enabled":{"type":"bool","optional":true,"default":true},"geo_mappings":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"computed":true},"profile_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_external_endpoint":{"block":{"attributes":{"always_serve_enabled":{"type":"bool","optional":true,"default":false},"enabled":{"type":"bool","optional":true,"default":true},"endpoint_location":{"type":"string","optional":true,"computed":true},"geo_mappings":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"computed":true},"profile_id":{"type":"string","required":true},"target":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_nested_endpoint":{"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"endpoint_location":{"type":"string","optional":true,"computed":true},"geo_mappings":{"type":["list","string"],"optional":true},"minimum_child_endpoints":{"type":"number","required":true},"minimum_required_child_endpoints_ipv4":{"type":"number","optional":true},"minimum_required_child_endpoints_ipv6":{"type":"number","optional":true},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"computed":true},"profile_id":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"weight":{"type":"number","optional":true,"default":1}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"subnet":{"nesting_mode":3,"block":{"attributes":{"first":{"type":"string","required":true},"last":{"type":"string","optional":true},"scope":{"type":"number","optional":true}}},"optional":true}}}},"azurerm_traffic_manager_profile":{"block":{"attributes":{"fqdn":{"type":"string","computed":true},"max_return":{"type":"number","optional":true},"name":{"type":"string","required":true},"profile_status":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"traffic_routing_method":{"type":"string","required":true},"traffic_view_enabled":{"type":"bool","optional":true}},"block_types":{"dns_config":{"nesting_mode":3,"block":{"attributes":{"relative_name":{"type":"string","required":true},"ttl":{"type":"number","required":true}}},"required":true},"monitor_config":{"nesting_mode":3,"block":{"attributes":{"expected_status_code_ranges":{"type":["list","string"],"optional":true},"interval_in_seconds":{"type":"number","optional":true,"default":30},"path":{"type":"string","optional":true},"port":{"type":"number","required":true},"protocol":{"type":"string","required":true},"timeout_in_seconds":{"type":"number","optional":true,"default":10},"tolerated_number_of_failures":{"type":"number","optional":true,"default":3}},"block_types":{"custom_header":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true}}},"required":true}}}},"azurerm_trusted_signing_account":{"block":{"attributes":{"account_uri":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_user_assigned_identity":{"block":{"attributes":{"client_id":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"principal_id":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tenant_id":{"type":"string","computed":true}}}},"azurerm_video_indexer_account":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"required":true},"storage":{"nesting_mode":3,"block":{"attributes":{"storage_account_id":{"type":"string","required":true},"user_assigned_identity_id":{"type":"string","optional":true}}},"required":true}}}},"azurerm_virtual_desktop_application":{"block":{"attributes":{"application_group_id":{"type":"string","required":true},"command_line_argument_policy":{"type":"string","required":true},"command_line_arguments":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true,"computed":true},"icon_index":{"type":"number","optional":true},"icon_path":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"path":{"type":"string","required":true},"show_in_portal":{"type":"bool","optional":true}}}},"azurerm_virtual_desktop_application_group":{"block":{"attributes":{"default_desktop_display_name":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"host_pool_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true}}}},"azurerm_virtual_desktop_host_pool":{"block":{"attributes":{"custom_rdp_properties":{"type":"string","optional":true},"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"load_balancer_type":{"type":"string","required":true},"location":{"type":"string","required":true},"maximum_sessions_allowed":{"type":"number","optional":true,"default":999999},"name":{"type":"string","required":true},"personal_desktop_assignment_type":{"type":"string","optional":true},"preferred_app_group_type":{"type":"string","optional":true,"default":"Desktop"},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"resource_group_name":{"type":"string","required":true},"start_vm_on_connect":{"type":"bool","optional":true,"default":false},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"validate_environment":{"type":"bool","optional":true,"default":false},"vm_template":{"type":"string","optional":true}},"block_types":{"scheduled_agent_updates":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timezone":{"type":"string","optional":true,"default":"UTC"},"use_session_host_timezone":{"type":"bool","optional":true,"default":false}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"day_of_week":{"type":"string","required":true},"hour_of_day":{"type":"number","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_virtual_desktop_host_pool_registration_info":{"block":{"attributes":{"expiration_date":{"type":"string","required":true},"hostpool_id":{"type":"string","required":true},"token":{"type":"string","computed":true}}}},"azurerm_virtual_desktop_scaling_plan":{"block":{"attributes":{"description":{"type":"string","optional":true},"exclusion_tag":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"time_zone":{"type":"string","required":true}},"block_types":{"host_pool":{"nesting_mode":3,"block":{"attributes":{"hostpool_id":{"type":"string","required":true},"scaling_plan_enabled":{"type":"bool","required":true}}},"optional":true,"computed":true},"schedule":{"nesting_mode":3,"block":{"attributes":{"days_of_week":{"type":["set","string"],"required":true},"name":{"type":"string","required":true},"off_peak_load_balancing_algorithm":{"type":"string","required":true},"off_peak_start_time":{"type":"string","required":true},"peak_load_balancing_algorithm":{"type":"string","required":true},"peak_start_time":{"type":"string","required":true},"ramp_down_capacity_threshold_percent":{"type":"number","required":true},"ramp_down_force_logoff_users":{"type":"bool","required":true},"ramp_down_load_balancing_algorithm":{"type":"string","required":true},"ramp_down_minimum_hosts_percent":{"type":"number","required":true},"ramp_down_notification_message":{"type":"string","required":true},"ramp_down_start_time":{"type":"string","required":true},"ramp_down_stop_hosts_when":{"type":"string","required":true},"ramp_down_wait_time_minutes":{"type":"number","required":true},"ramp_up_capacity_threshold_percent":{"type":"number","optional":true},"ramp_up_load_balancing_algorithm":{"type":"string","required":true},"ramp_up_minimum_hosts_percent":{"type":"number","optional":true},"ramp_up_start_time":{"type":"string","required":true}}},"required":true}}}},"azurerm_virtual_desktop_scaling_plan_host_pool_association":{"block":{"attributes":{"enabled":{"type":"bool","required":true},"host_pool_id":{"type":"string","required":true},"scaling_plan_id":{"type":"string","required":true}}}},"azurerm_virtual_desktop_workspace":{"block":{"attributes":{"description":{"type":"string","optional":true},"friendly_name":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_virtual_desktop_workspace_application_group_association":{"block":{"attributes":{"application_group_id":{"type":"string","required":true},"workspace_id":{"type":"string","required":true}}}},"azurerm_virtual_hub":{"block":{"attributes":{"address_prefix":{"type":"string","optional":true},"default_route_table_id":{"type":"string","computed":true},"hub_routing_preference":{"type":"string","optional":true,"default":"ExpressRoute"},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_router_asn":{"type":"number","computed":true},"virtual_router_auto_scale_min_capacity":{"type":"number","optional":true,"default":2},"virtual_router_ips":{"type":["list","string"],"computed":true},"virtual_wan_id":{"type":"string","optional":true}},"block_types":{"route":{"nesting_mode":4,"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"next_hop_ip_address":{"type":"string","required":true}}},"optional":true}}}},"azurerm_virtual_hub_bgp_connection":{"block":{"attributes":{"name":{"type":"string","required":true},"peer_asn":{"type":"number","required":true},"peer_ip":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true},"virtual_network_connection_id":{"type":"string","optional":true}}}},"azurerm_virtual_hub_connection":{"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"remote_virtual_network_id":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table_id":{"type":"string","optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true},"static_vnet_local_route_override_criteria":{"type":"string","optional":true,"default":"Contains"},"static_vnet_propagate_static_routes_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]},"route_table_ids":{"type":["list","string"],"optional":true,"computed":true,"at_least_one_of":["routing.0.propagated_route_table.0.labels","routing.0.propagated_route_table.0.route_table_ids"]}}},"optional":true,"computed":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]},"static_vnet_route":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"optional":true},"name":{"type":"string","optional":true},"next_hop_ip_address":{"type":"string","optional":true}}},"optional":true,"at_least_one_of":["routing.0.associated_route_table_id","routing.0.propagated_route_table","routing.0.static_vnet_route"]}}},"optional":true,"computed":true}}}},"azurerm_virtual_hub_ip":{"block":{"attributes":{"name":{"type":"string","required":true},"private_ip_address":{"type":"string","optional":true},"private_ip_allocation_method":{"type":"string","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}}}},"azurerm_virtual_hub_route_table":{"block":{"attributes":{"labels":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"route":{"nesting_mode":4,"block":{"attributes":{"destinations":{"type":["set","string"],"required":true},"destinations_type":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true},"next_hop_type":{"type":"string","optional":true,"default":"ResourceId"}}},"optional":true,"computed":true}}}},"azurerm_virtual_hub_route_table_route":{"block":{"attributes":{"destinations":{"type":["set","string"],"required":true},"destinations_type":{"type":"string","required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true},"next_hop_type":{"type":"string","optional":true,"default":"ResourceId"},"route_table_id":{"type":"string","required":true}}}},"azurerm_virtual_hub_routing_intent":{"block":{"attributes":{"name":{"type":"string","required":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"routing_policy":{"nesting_mode":3,"block":{"attributes":{"destinations":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"next_hop":{"type":"string","required":true}}},"required":true}}}},"azurerm_virtual_hub_security_partner_provider":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"security_provider_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","optional":true}}}},"azurerm_virtual_machine":{"block":{"attributes":{"availability_set_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["zones"]},"delete_data_disks_on_termination":{"type":"bool","optional":true,"default":false},"delete_os_disk_on_termination":{"type":"bool","optional":true,"default":false},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"primary_network_interface_id":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vm_size":{"type":"string","required":true},"zones":{"type":["list","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"storage_uri":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_profile":{"nesting_mode":4,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name":{"type":"string","required":true},"custom_data":{"type":"string","optional":true,"computed":true}}},"optional":true},"os_profile_linux_config":{"nesting_mode":4,"block":{"attributes":{"disable_password_authentication":{"type":"bool","required":true}},"block_types":{"ssh_keys":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","required":true},"path":{"type":"string","required":true}}},"optional":true}}},"optional":true,"conflicts_with":["os_profile_windows_config"]},"os_profile_secrets":{"nesting_mode":3,"block":{"attributes":{"source_vault_id":{"type":"string","required":true}},"block_types":{"vault_certificates":{"nesting_mode":3,"block":{"attributes":{"certificate_store":{"type":"string","optional":true},"certificate_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"os_profile_windows_config":{"nesting_mode":4,"block":{"attributes":{"enable_automatic_upgrades":{"type":"bool","optional":true,"default":false},"provision_vm_agent":{"type":"bool","optional":true,"default":false},"timezone":{"type":"string","optional":true}},"block_types":{"additional_unattend_config":{"nesting_mode":3,"block":{"attributes":{"component":{"type":"string","required":true},"content":{"type":"string","required":true},"pass":{"type":"string","required":true},"setting_name":{"type":"string","required":true}}},"optional":true},"winrm":{"nesting_mode":3,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true,"conflicts_with":["os_profile_linux_config"]},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"storage_data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","required":true},"managed_disk_id":{"type":"string","optional":true,"computed":true},"managed_disk_type":{"type":"string","optional":true,"computed":true},"name":{"type":"string","required":true},"vhd_uri":{"type":"string","optional":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true},"storage_image_reference":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"offer":{"type":"string","optional":true},"publisher":{"type":"string","optional":true},"sku":{"type":"string","optional":true},"version":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"storage_os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"image_uri":{"type":"string","optional":true},"managed_disk_id":{"type":"string","optional":true,"computed":true,"conflicts_with":["storage_os_disk.0.vhd_uri"]},"managed_disk_type":{"type":"string","optional":true,"computed":true,"conflicts_with":["storage_os_disk.0.vhd_uri"]},"name":{"type":"string","required":true},"os_type":{"type":"string","optional":true,"computed":true},"vhd_uri":{"type":"string","optional":true,"conflicts_with":["storage_os_disk.0.managed_disk_id","storage_os_disk.0.managed_disk_type"]},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"required":true}}}},"azurerm_virtual_machine_automanage_configuration_assignment":{"block":{"attributes":{"configuration_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_data_disk_attachment":{"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Attach"},"lun":{"type":"number","required":true},"managed_disk_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}}},"azurerm_virtual_machine_extension":{"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true,"conflicts_with":["protected_settings_from_key_vault"]},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["protected_settings"]}}}},"azurerm_virtual_machine_gallery_application_assignment":{"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"gallery_application_version_id":{"type":"string","required":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_implicit_data_disk_from_source":{"block":{"attributes":{"caching":{"type":"string","optional":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","required":true},"source_resource_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}}},"azurerm_virtual_machine_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration_in_seconds":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_virtual_machine_restore_point":{"block":{"attributes":{"crash_consistency_mode_enabled":{"type":"bool","optional":true,"default":false},"excluded_disks":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"virtual_machine_restore_point_collection_id":{"type":"string","required":true}}}},"azurerm_virtual_machine_restore_point_collection":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"source_virtual_machine_id":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}}}},"azurerm_virtual_machine_run_command":{"block":{"attributes":{"error_blob_uri":{"type":"string","optional":true},"instance_view":{"type":["list",["object",{"end_time":"string","error_message":"string","execution_message":"string","execution_state":"string","exit_code":"number","output":"string","start_time":"string"}]],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"output_blob_uri":{"type":"string","optional":true},"run_as_password":{"type":"string","optional":true},"run_as_user":{"type":"string","optional":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_id":{"type":"string","required":true}},"block_types":{"error_blob_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["error_blob_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["error_blob_managed_identity.0.client_id"]}}},"optional":true,"required_with":["error_blob_uri"]},"output_blob_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["output_blob_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["output_blob_managed_identity.0.client_id"]}}},"optional":true,"required_with":["output_blob_uri"]},"parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"protected_parameter":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"source":{"nesting_mode":3,"block":{"attributes":{"command_id":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]},"script":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]},"script_uri":{"type":"string","optional":true,"exactly_one_of":["source.0.command_id","source.0.script","source.0.script_uri"]}},"block_types":{"script_uri_managed_identity":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","optional":true,"conflicts_with":["source.0.script_uri_managed_identity.0.object_id"]},"object_id":{"type":"string","optional":true,"conflicts_with":["source.0.script_uri_managed_identity.0.client_id"]}}},"optional":true,"required_with":["source.0.script_uri"]}}},"required":true}}}},"azurerm_virtual_machine_scale_set":{"block":{"attributes":{"automatic_os_upgrade":{"type":"bool","optional":true,"default":false},"eviction_policy":{"type":"string","optional":true},"health_probe_id":{"type":"string","optional":true},"license_type":{"type":"string","optional":true,"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"priority":{"type":"string","optional":true},"proximity_placement_group_id":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"tags":{"type":["map","string"],"optional":true},"upgrade_policy_mode":{"type":"string","required":true},"zones":{"type":["list","string"],"optional":true}},"block_types":{"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"storage_uri":{"type":"string","required":true}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["set","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_profile":{"nesting_mode":4,"block":{"attributes":{"accelerated_networking":{"type":"bool","optional":true},"ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","required":true}},"block_types":{"dns_settings":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"required":true}}},"optional":true},"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true,"computed":true},"name":{"type":"string","required":true},"primary":{"type":"bool","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"public_ip_address_configuration":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","required":true},"idle_timeout":{"type":"number","required":true},"name":{"type":"string","required":true}}},"optional":true}}},"required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_password":{"type":"string","optional":true},"admin_username":{"type":"string","required":true},"computer_name_prefix":{"type":"string","required":true},"custom_data":{"type":"string","optional":true}}},"required":true},"os_profile_linux_config":{"nesting_mode":4,"block":{"attributes":{"disable_password_authentication":{"type":"bool","optional":true,"default":false}},"block_types":{"ssh_keys":{"nesting_mode":3,"block":{"attributes":{"key_data":{"type":"string","optional":true},"path":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"os_profile_secrets":{"nesting_mode":4,"block":{"attributes":{"source_vault_id":{"type":"string","required":true}},"block_types":{"vault_certificates":{"nesting_mode":3,"block":{"attributes":{"certificate_store":{"type":"string","optional":true},"certificate_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"os_profile_windows_config":{"nesting_mode":4,"block":{"attributes":{"enable_automatic_upgrades":{"type":"bool","optional":true},"provision_vm_agent":{"type":"bool","optional":true}},"block_types":{"additional_unattend_config":{"nesting_mode":3,"block":{"attributes":{"component":{"type":"string","required":true},"content":{"type":"string","required":true},"pass":{"type":"string","required":true},"setting_name":{"type":"string","required":true}}},"optional":true},"winrm":{"nesting_mode":3,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}},"optional":true},"plan":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"max_batch_instance_percent":{"type":"number","optional":true,"default":20},"max_unhealthy_instance_percent":{"type":"number","optional":true,"default":20},"max_unhealthy_upgraded_instance_percent":{"type":"number","optional":true,"default":20},"pause_time_between_batches":{"type":"string","optional":true,"default":"PT0S"}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","required":true},"name":{"type":"string","required":true},"tier":{"type":"string","optional":true,"computed":true}}},"required":true},"storage_profile_data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"disk_size_gb":{"type":"number","optional":true,"computed":true},"lun":{"type":"number","required":true},"managed_disk_type":{"type":"string","optional":true,"computed":true}}},"optional":true},"storage_profile_image_reference":{"nesting_mode":4,"block":{"attributes":{"id":{"type":"string","optional":true},"offer":{"type":"string","optional":true},"publisher":{"type":"string","optional":true},"sku":{"type":"string","optional":true},"version":{"type":"string","optional":true}}},"optional":true,"computed":true},"storage_profile_os_disk":{"nesting_mode":4,"block":{"attributes":{"caching":{"type":"string","optional":true,"computed":true},"create_option":{"type":"string","required":true},"image":{"type":"string","optional":true},"managed_disk_type":{"type":"string","optional":true,"computed":true},"name":{"type":"string","optional":true},"os_type":{"type":"string","optional":true},"vhd_containers":{"type":["set","string"],"optional":true}}},"required":true}}}},"azurerm_virtual_machine_scale_set_extension":{"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true},"failure_suppression_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true,"conflicts_with":["protected_settings"]}}}},"azurerm_virtual_machine_scale_set_packet_capture":{"block":{"attributes":{"maximum_bytes_per_packet":{"type":"number","optional":true,"default":0},"maximum_bytes_per_session":{"type":"number","optional":true,"default":1073741824},"maximum_capture_duration_in_seconds":{"type":"number","optional":true,"default":18000},"name":{"type":"string","required":true},"network_watcher_id":{"type":"string","required":true},"virtual_machine_scale_set_id":{"type":"string","required":true}},"block_types":{"filter":{"nesting_mode":3,"block":{"attributes":{"local_ip_address":{"type":"string","optional":true},"local_port":{"type":"string","optional":true},"protocol":{"type":"string","required":true},"remote_ip_address":{"type":"string","optional":true},"remote_port":{"type":"string","optional":true}}},"optional":true},"machine_scope":{"nesting_mode":3,"block":{"attributes":{"exclude_instance_ids":{"type":["list","string"],"optional":true,"conflicts_with":["machine_scope.0.include_instance_ids"]},"include_instance_ids":{"type":["list","string"],"optional":true,"conflicts_with":["machine_scope.0.exclude_instance_ids"]}}},"optional":true},"storage_location":{"nesting_mode":3,"block":{"attributes":{"file_path":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_account_id":{"type":"string","optional":true,"at_least_one_of":["storage_location.0.file_path","storage_location.0.storage_account_id"]},"storage_path":{"type":"string","computed":true}}},"required":true}}}},"azurerm_virtual_machine_scale_set_standby_pool":{"block":{"attributes":{"attached_virtual_machine_scale_set_id":{"type":"string","required":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_machine_state":{"type":"string","required":true}},"block_types":{"elasticity_profile":{"nesting_mode":3,"block":{"attributes":{"max_ready_capacity":{"type":"number","required":true},"min_ready_capacity":{"type":"number","required":true}}},"required":true}}}},"azurerm_virtual_network":{"block":{"attributes":{"address_space":{"type":["set","string"],"required":true},"bgp_community":{"type":"string","optional":true},"dns_servers":{"type":["list","string"],"optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"flow_timeout_in_minutes":{"type":"number","optional":true},"guid":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_endpoint_vnet_policies":{"type":"string","optional":true,"default":"Disabled"},"resource_group_name":{"type":"string","required":true},"subnet":{"type":["set",["object",{"address_prefixes":["list","string"],"default_outbound_access_enabled":"bool","delegation":["list",["object",{"name":"string","service_delegation":["list",["object",{"actions":["set","string"],"name":"string"}]]}]],"id":"string","name":"string","private_endpoint_network_policies":"string","private_link_service_network_policies_enabled":"bool","route_table_id":"string","security_group":"string","service_endpoint_policy_ids":["set","string"],"service_endpoints":["set","string"]}]],"optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"ddos_protection_plan":{"nesting_mode":3,"block":{"attributes":{"enable":{"type":"bool","required":true},"id":{"type":"string","required":true}}},"optional":true},"encryption":{"nesting_mode":3,"block":{"attributes":{"enforcement":{"type":"string","required":true}}},"optional":true}}}},"azurerm_virtual_network_dns_servers":{"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"virtual_network_id":{"type":"string","required":true}}}},"azurerm_virtual_network_gateway":{"block":{"attributes":{"active_active":{"type":"bool","optional":true,"computed":true},"bgp_route_translation_for_nat_enabled":{"type":"bool","optional":true,"default":false},"default_local_network_gateway_id":{"type":"string","optional":true},"dns_forwarding_enabled":{"type":"bool","optional":true},"edge_zone":{"type":"string","optional":true},"enable_bgp":{"type":"bool","optional":true,"computed":true},"generation":{"type":"string","optional":true,"computed":true},"ip_sec_replay_protection_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"private_ip_address_enabled":{"type":"bool","optional":true},"remote_vnet_traffic_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"virtual_wan_traffic_enabled":{"type":"bool","optional":true,"default":false},"vpn_type":{"type":"string","optional":true,"default":"RouteBased"}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","optional":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]},"peer_weight":{"type":"number","optional":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]}},"block_types":{"peering_addresses":{"nesting_mode":3,"block":{"attributes":{"apipa_addresses":{"type":["list","string"],"optional":true},"default_addresses":{"type":["list","string"],"computed":true},"ip_configuration_name":{"type":"string","optional":true,"computed":true},"tunnel_ip_addresses":{"type":["list","string"],"computed":true}}},"optional":true,"computed":true,"at_least_one_of":["bgp_settings.0.asn","bgp_settings.0.peer_weight","bgp_settings.0.peering_addresses"]}}},"optional":true,"computed":true},"custom_route":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["set","string"],"optional":true}}},"optional":true},"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","optional":true,"default":"vnetGatewayConfig"},"private_ip_address_allocation":{"type":"string","optional":true,"default":"Dynamic"},"public_ip_address_id":{"type":"string","required":true},"subnet_id":{"type":"string","required":true}}},"required":true},"policy_group":{"nesting_mode":3,"block":{"attributes":{"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0}},"block_types":{"policy_member":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}},"optional":true},"vpn_client_configuration":{"nesting_mode":3,"block":{"attributes":{"aad_audience":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_issuer","vpn_client_configuration.0.aad_tenant"]},"aad_issuer":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_audience","vpn_client_configuration.0.aad_tenant"]},"aad_tenant":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.aad_audience","vpn_client_configuration.0.aad_issuer"]},"address_space":{"type":["list","string"],"required":true},"radius_server_address":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.radius_server_secret"]},"radius_server_secret":{"type":"string","optional":true,"required_with":["vpn_client_configuration.0.radius_server_address"]},"vpn_auth_types":{"type":["set","string"],"optional":true,"computed":true},"vpn_client_protocols":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_in_kilobytes":{"type":"number","required":true},"sa_lifetime_in_seconds":{"type":"number","required":true}}},"optional":true},"radius_server":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"score":{"type":"number","required":true},"secret":{"type":"string","required":true}}},"optional":true},"revoked_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true},"virtual_network_gateway_client_connection":{"nesting_mode":3,"block":{"attributes":{"address_prefixes":{"type":["list","string"],"required":true},"name":{"type":"string","required":true},"policy_group_names":{"type":["list","string"],"required":true}}},"optional":true}}},"optional":true}}}},"azurerm_virtual_network_gateway_connection":{"block":{"attributes":{"authorization_key":{"type":"string","optional":true},"connection_mode":{"type":"string","optional":true,"default":"Default"},"connection_protocol":{"type":"string","optional":true,"computed":true},"dpd_timeout_seconds":{"type":"number","optional":true},"egress_nat_rule_ids":{"type":["set","string"],"optional":true},"enable_bgp":{"type":"bool","optional":true,"computed":true},"express_route_circuit_id":{"type":"string","optional":true},"express_route_gateway_bypass":{"type":"bool","optional":true,"computed":true},"ingress_nat_rule_ids":{"type":["set","string"],"optional":true},"local_azure_ip_address_enabled":{"type":"bool","optional":true},"local_network_gateway_id":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"peer_virtual_network_gateway_id":{"type":"string","optional":true},"private_link_fast_path_enabled":{"type":"bool","optional":true,"default":false},"resource_group_name":{"type":"string","required":true},"routing_weight":{"type":"number","optional":true,"computed":true},"shared_key":{"type":"string","optional":true,"computed":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","required":true},"use_policy_based_traffic_selectors":{"type":"bool","optional":true,"computed":true},"virtual_network_gateway_id":{"type":"string","required":true}},"block_types":{"custom_bgp_addresses":{"nesting_mode":3,"block":{"attributes":{"primary":{"type":"string","required":true},"secondary":{"type":"string","optional":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_datasize":{"type":"number","optional":true,"computed":true},"sa_lifetime":{"type":"number","optional":true,"computed":true}}},"optional":true},"traffic_selector_policy":{"nesting_mode":3,"block":{"attributes":{"local_address_cidrs":{"type":["list","string"],"required":true},"remote_address_cidrs":{"type":["list","string"],"required":true}}},"optional":true}}}},"azurerm_virtual_network_gateway_nat_rule":{"block":{"attributes":{"ip_configuration_id":{"type":"string","optional":true},"mode":{"type":"string","optional":true,"default":"EgressSnat"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Static"},"virtual_network_gateway_id":{"type":"string","required":true}},"block_types":{"external_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"required":true},"internal_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"required":true}}}},"azurerm_virtual_network_peering":{"block":{"attributes":{"allow_forwarded_traffic":{"type":"bool","optional":true,"default":false},"allow_gateway_transit":{"type":"bool","optional":true,"default":false},"allow_virtual_network_access":{"type":"bool","optional":true,"default":true},"local_subnet_names":{"type":["list","string"],"optional":true},"name":{"type":"string","required":true},"only_ipv6_peering_enabled":{"type":"bool","optional":true},"peer_complete_virtual_networks_enabled":{"type":"bool","optional":true,"default":true},"remote_subnet_names":{"type":["list","string"],"optional":true},"remote_virtual_network_id":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"triggers":{"type":["map","string"],"optional":true},"use_remote_gateways":{"type":"bool","optional":true,"default":false},"virtual_network_name":{"type":"string","required":true}}}},"azurerm_virtual_wan":{"block":{"attributes":{"allow_branch_to_branch_traffic":{"type":"bool","optional":true,"default":true},"disable_vpn_encryption":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"office365_local_breakout_category":{"type":"string","optional":true,"default":"None"},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"type":{"type":"string","optional":true,"default":"Standard"}}}},"azurerm_vmware_cluster":{"block":{"attributes":{"cluster_node_count":{"type":"number","required":true},"cluster_number":{"type":"number","computed":true},"hosts":{"type":["list","string"],"computed":true},"name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"vmware_cloud_id":{"type":"string","required":true}}}},"azurerm_vmware_express_route_authorization":{"block":{"attributes":{"express_route_authorization_id":{"type":"string","computed":true},"express_route_authorization_key":{"type":"string","computed":true},"name":{"type":"string","required":true},"private_cloud_id":{"type":"string","required":true}}}},"azurerm_vmware_netapp_volume_attachment":{"block":{"attributes":{"name":{"type":"string","required":true},"netapp_volume_id":{"type":"string","required":true},"vmware_cluster_id":{"type":"string","required":true}}}},"azurerm_vmware_private_cloud":{"block":{"attributes":{"circuit":{"type":["list",["object",{"express_route_id":"string","express_route_private_peering_id":"string","primary_subnet_cidr":"string","secondary_subnet_cidr":"string"}]],"computed":true},"hcx_cloud_manager_endpoint":{"type":"string","computed":true},"internet_connection_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"management_subnet_cidr":{"type":"string","computed":true},"name":{"type":"string","required":true},"network_subnet_cidr":{"type":"string","required":true},"nsxt_certificate_thumbprint":{"type":"string","computed":true},"nsxt_manager_endpoint":{"type":"string","computed":true},"nsxt_password":{"type":"string","optional":true},"provisioning_subnet_cidr":{"type":"string","computed":true},"resource_group_name":{"type":"string","required":true},"sku_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vcenter_certificate_thumbprint":{"type":"string","computed":true},"vcenter_password":{"type":"string","optional":true},"vcsa_endpoint":{"type":"string","computed":true},"vmotion_subnet_cidr":{"type":"string","computed":true}},"block_types":{"management_cluster":{"nesting_mode":3,"block":{"attributes":{"hosts":{"type":["list","string"],"computed":true},"id":{"type":"number","computed":true},"size":{"type":"number","required":true}}},"required":true}}}},"azurerm_voice_services_communications_gateway":{"block":{"attributes":{"api_bridge":{"type":"string","optional":true},"auto_generated_domain_name_label_scope":{"type":"string","optional":true,"default":"TenantReuse"},"codecs":{"type":"string","required":true},"connectivity":{"type":"string","required":true},"e911_type":{"type":"string","required":true},"emergency_dial_strings":{"type":["list","string"],"optional":true},"location":{"type":"string","required":true},"microsoft_teams_voicemail_pilot_number":{"type":"string","optional":true},"name":{"type":"string","required":true},"on_prem_mcp_enabled":{"type":"bool","optional":true},"platforms":{"type":["list","string"],"required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"service_location":{"nesting_mode":4,"block":{"attributes":{"allowed_media_source_address_prefixes":{"type":["set","string"],"optional":true},"allowed_signaling_source_address_prefixes":{"type":["set","string"],"optional":true},"esrp_addresses":{"type":["set","string"],"optional":true},"location":{"type":"string","required":true},"operator_addresses":{"type":["set","string"],"required":true}}},"required":true}}}},"azurerm_voice_services_communications_gateway_test_line":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"phone_number":{"type":"string","required":true},"purpose":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"voice_services_communications_gateway_id":{"type":"string","required":true}}}},"azurerm_vpn_gateway":{"block":{"attributes":{"bgp_route_translation_for_nat_enabled":{"type":"bool","optional":true,"default":false},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"routing_preference":{"type":"string","optional":true,"default":"Microsoft Network"},"scale_unit":{"type":"number","optional":true,"default":1},"tags":{"type":["map","string"],"optional":true},"virtual_hub_id":{"type":"string","required":true}},"block_types":{"bgp_settings":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"bgp_peering_address":{"type":"string","computed":true},"peer_weight":{"type":"number","required":true}},"block_types":{"instance_0_bgp_peering_address":{"nesting_mode":3,"block":{"attributes":{"custom_ips":{"type":["set","string"],"required":true},"default_ips":{"type":["set","string"],"computed":true},"ip_configuration_id":{"type":"string","computed":true},"tunnel_ips":{"type":["set","string"],"computed":true}}},"optional":true,"computed":true},"instance_1_bgp_peering_address":{"nesting_mode":3,"block":{"attributes":{"custom_ips":{"type":["set","string"],"required":true},"default_ips":{"type":["set","string"],"computed":true},"ip_configuration_id":{"type":"string","computed":true},"tunnel_ips":{"type":["set","string"],"computed":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_vpn_gateway_connection":{"block":{"attributes":{"internet_security_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"remote_vpn_site_id":{"type":"string","required":true},"vpn_gateway_id":{"type":"string","required":true}},"block_types":{"routing":{"nesting_mode":3,"block":{"attributes":{"associated_route_table":{"type":"string","required":true},"inbound_route_map_id":{"type":"string","optional":true},"outbound_route_map_id":{"type":"string","optional":true}},"block_types":{"propagated_route_table":{"nesting_mode":3,"block":{"attributes":{"labels":{"type":["set","string"],"optional":true},"route_table_ids":{"type":["list","string"],"required":true}}},"optional":true,"computed":true}}},"optional":true,"computed":true},"traffic_selector_policy":{"nesting_mode":4,"block":{"attributes":{"local_address_ranges":{"type":["set","string"],"required":true},"remote_address_ranges":{"type":["set","string"],"required":true}}},"optional":true},"vpn_link":{"nesting_mode":3,"block":{"attributes":{"bandwidth_mbps":{"type":"number","optional":true,"default":10},"bgp_enabled":{"type":"bool","optional":true,"default":false},"connection_mode":{"type":"string","optional":true,"default":"Default"},"egress_nat_rule_ids":{"type":["set","string"],"optional":true},"ingress_nat_rule_ids":{"type":["set","string"],"optional":true},"local_azure_ip_address_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"policy_based_traffic_selector_enabled":{"type":"bool","optional":true,"default":false},"protocol":{"type":"string","optional":true,"default":"IKEv2"},"ratelimit_enabled":{"type":"bool","optional":true,"default":false},"route_weight":{"type":"number","optional":true,"default":0},"shared_key":{"type":"string","optional":true},"vpn_site_link_id":{"type":"string","required":true}},"block_types":{"custom_bgp_address":{"nesting_mode":4,"block":{"attributes":{"ip_address":{"type":"string","required":true},"ip_configuration_id":{"type":"string","required":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"encryption_algorithm":{"type":"string","required":true},"ike_encryption_algorithm":{"type":"string","required":true},"ike_integrity_algorithm":{"type":"string","required":true},"integrity_algorithm":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_kb":{"type":"number","required":true},"sa_lifetime_sec":{"type":"number","required":true}}},"optional":true}}},"required":true}}}},"azurerm_vpn_gateway_nat_rule":{"block":{"attributes":{"ip_configuration_id":{"type":"string","optional":true},"mode":{"type":"string","optional":true,"default":"EgressSnat"},"name":{"type":"string","required":true},"type":{"type":"string","optional":true,"default":"Static"},"vpn_gateway_id":{"type":"string","required":true}},"block_types":{"external_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"optional":true},"internal_mapping":{"nesting_mode":3,"block":{"attributes":{"address_space":{"type":"string","required":true},"port_range":{"type":"string","optional":true}}},"optional":true}}}},"azurerm_vpn_server_configuration":{"block":{"attributes":{"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"vpn_authentication_types":{"type":["list","string"],"required":true},"vpn_protocols":{"type":["set","string"],"optional":true,"computed":true}},"block_types":{"azure_active_directory_authentication":{"nesting_mode":3,"block":{"attributes":{"audience":{"type":"string","required":true},"issuer":{"type":"string","required":true},"tenant":{"type":"string","required":true}}},"optional":true},"client_revoked_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"client_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true},"ipsec_policy":{"nesting_mode":3,"block":{"attributes":{"dh_group":{"type":"string","required":true},"ike_encryption":{"type":"string","required":true},"ike_integrity":{"type":"string","required":true},"ipsec_encryption":{"type":"string","required":true},"ipsec_integrity":{"type":"string","required":true},"pfs_group":{"type":"string","required":true},"sa_data_size_kilobytes":{"type":"number","required":true},"sa_lifetime_seconds":{"type":"number","required":true}}},"optional":true},"radius":{"nesting_mode":3,"block":{"block_types":{"client_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"thumbprint":{"type":"string","required":true}}},"optional":true},"server":{"nesting_mode":3,"block":{"attributes":{"address":{"type":"string","required":true},"score":{"type":"number","required":true},"secret":{"type":"string","required":true}}},"optional":true},"server_root_certificate":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"public_cert_data":{"type":"string","required":true}}},"optional":true}}},"optional":true}}}},"azurerm_vpn_server_configuration_policy_group":{"block":{"attributes":{"is_default":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"priority":{"type":"number","optional":true,"default":0},"vpn_server_configuration_id":{"type":"string","required":true}},"block_types":{"policy":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"required":true}}}},"azurerm_vpn_site":{"block":{"attributes":{"address_cidrs":{"type":["set","string"],"optional":true},"device_model":{"type":"string","optional":true},"device_vendor":{"type":"string","optional":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"virtual_wan_id":{"type":"string","required":true}},"block_types":{"link":{"nesting_mode":3,"block":{"attributes":{"fqdn":{"type":"string","optional":true},"id":{"type":"string","computed":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","required":true},"provider_name":{"type":"string","optional":true},"speed_in_mbps":{"type":"number","optional":true,"default":0}},"block_types":{"bgp":{"nesting_mode":3,"block":{"attributes":{"asn":{"type":"number","required":true},"peering_address":{"type":"string","required":true}}},"optional":true}}},"optional":true},"o365_policy":{"nesting_mode":3,"block":{"block_types":{"traffic_category":{"nesting_mode":3,"block":{"attributes":{"allow_endpoint_enabled":{"type":"bool","optional":true,"default":false},"default_endpoint_enabled":{"type":"bool","optional":true,"default":false},"optimize_endpoint_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true,"computed":true}}},"optional":true,"computed":true}}}},"azurerm_web_app_active_slot":{"block":{"attributes":{"last_successful_swap":{"type":"string","computed":true},"overwrite_network_config":{"type":"bool","optional":true,"default":true},"slot_id":{"type":"string","required":true}}}},"azurerm_web_app_hybrid_connection":{"block":{"attributes":{"hostname":{"type":"string","required":true},"namespace_name":{"type":"string","computed":true},"port":{"type":"number","required":true},"relay_id":{"type":"string","required":true},"relay_name":{"type":"string","computed":true},"send_key_name":{"type":"string","optional":true,"default":"RootManageSharedAccessKey"},"send_key_value":{"type":"string","computed":true},"service_bus_namespace":{"type":"string","computed":true},"service_bus_suffix":{"type":"string","computed":true},"web_app_id":{"type":"string","required":true}}}},"azurerm_web_application_firewall_policy":{"block":{"attributes":{"http_listener_ids":{"type":["list","string"],"computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"path_based_rule_ids":{"type":["list","string"],"computed":true},"resource_group_name":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"custom_rules":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","required":true},"enabled":{"type":"bool","optional":true,"default":true},"group_rate_limit_by":{"type":"string","optional":true},"name":{"type":"string","optional":true},"priority":{"type":"number","required":true},"rate_limit_duration":{"type":"string","optional":true},"rate_limit_threshold":{"type":"number","optional":true},"rule_type":{"type":"string","required":true}},"block_types":{"match_conditions":{"nesting_mode":3,"block":{"attributes":{"match_values":{"type":["list","string"],"optional":true},"negation_condition":{"type":"bool","optional":true},"operator":{"type":"string","required":true},"transforms":{"type":["set","string"],"optional":true}},"block_types":{"match_variables":{"nesting_mode":3,"block":{"attributes":{"selector":{"type":"string","optional":true},"variable_name":{"type":"string","required":true}}},"required":true}}},"required":true}}},"optional":true},"managed_rules":{"nesting_mode":3,"block":{"block_types":{"exclusion":{"nesting_mode":3,"block":{"attributes":{"match_variable":{"type":"string","required":true},"selector":{"type":"string","required":true},"selector_match_operator":{"type":"string","required":true}},"block_types":{"excluded_rule_set":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"OWASP"},"version":{"type":"string","optional":true,"default":"3.2"}},"block_types":{"rule_group":{"nesting_mode":3,"block":{"attributes":{"excluded_rules":{"type":["list","string"],"optional":true},"rule_group_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"managed_rule_set":{"nesting_mode":3,"block":{"attributes":{"type":{"type":"string","optional":true,"default":"OWASP"},"version":{"type":"string","required":true}},"block_types":{"rule_group_override":{"nesting_mode":3,"block":{"attributes":{"rule_group_name":{"type":"string","required":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true},"enabled":{"type":"bool","optional":true,"default":false},"id":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"policy_settings":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"file_upload_enforcement":{"type":"bool","optional":true,"computed":true},"file_upload_limit_in_mb":{"type":"number","optional":true,"default":100},"js_challenge_cookie_expiration_in_minutes":{"type":"number","optional":true,"default":30},"max_request_body_size_in_kb":{"type":"number","optional":true,"default":128},"mode":{"type":"string","optional":true,"default":"Prevention"},"request_body_check":{"type":"bool","optional":true,"default":true},"request_body_enforcement":{"type":"bool","optional":true,"default":true},"request_body_inspect_limit_in_kb":{"type":"number","optional":true,"default":128}},"block_types":{"log_scrubbing":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"rule":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"match_variable":{"type":"string","required":true},"selector":{"type":"string","optional":true},"selector_match_operator":{"type":"string","optional":true,"default":"Equals"}}},"optional":true}}},"optional":true}}},"optional":true}}}},"azurerm_web_pubsub":{"block":{"attributes":{"aad_auth_enabled":{"type":"bool","optional":true,"default":true},"capacity":{"type":"number","optional":true,"default":1},"external_ip":{"type":"string","computed":true},"hostname":{"type":"string","computed":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"public_port":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"server_port":{"type":"number","computed":true},"sku":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true},"tls_client_cert_enabled":{"type":"bool","optional":true,"default":false},"version":{"type":"string","computed":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"live_trace":{"nesting_mode":3,"block":{"attributes":{"connectivity_logs_enabled":{"type":"bool","optional":true,"default":true},"enabled":{"type":"bool","optional":true,"default":true},"http_request_logs_enabled":{"type":"bool","optional":true,"default":true},"messaging_logs_enabled":{"type":"bool","optional":true,"default":true}}},"optional":true}}}},"azurerm_web_pubsub_custom_certificate":{"block":{"attributes":{"certificate_version":{"type":"string","computed":true},"custom_certificate_id":{"type":"string","required":true},"name":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_web_pubsub_custom_domain":{"block":{"attributes":{"domain_name":{"type":"string","required":true},"name":{"type":"string","required":true},"web_pubsub_custom_certificate_id":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_web_pubsub_hub":{"block":{"attributes":{"anonymous_connections_enabled":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}},"block_types":{"event_handler":{"nesting_mode":3,"block":{"attributes":{"system_events":{"type":["set","string"],"optional":true},"url_template":{"type":"string","required":true},"user_event_pattern":{"type":"string","optional":true}},"block_types":{"auth":{"nesting_mode":3,"block":{"attributes":{"managed_identity_id":{"type":"string","required":true}}},"optional":true}}},"optional":true},"event_listener":{"nesting_mode":3,"block":{"attributes":{"eventhub_name":{"type":"string","required":true},"eventhub_namespace_name":{"type":"string","required":true},"system_event_name_filter":{"type":["list","string"],"optional":true},"user_event_name_filter":{"type":["list","string"],"optional":true}}},"optional":true}}}},"azurerm_web_pubsub_network_acl":{"block":{"attributes":{"default_action":{"type":"string","optional":true,"default":"Deny"},"web_pubsub_id":{"type":"string","required":true}},"block_types":{"private_endpoint":{"nesting_mode":4,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true},"denied_request_types":{"type":["set","string"],"optional":true},"id":{"type":"string","required":true}}},"optional":true},"public_network":{"nesting_mode":3,"block":{"attributes":{"allowed_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.denied_request_types"]},"denied_request_types":{"type":["set","string"],"optional":true,"conflicts_with":["public_network.0.allowed_request_types"]}}},"required":true}}}},"azurerm_web_pubsub_shared_private_link_resource":{"block":{"attributes":{"name":{"type":"string","required":true},"request_message":{"type":"string","optional":true},"status":{"type":"string","computed":true},"subresource_name":{"type":"string","required":true},"target_resource_id":{"type":"string","required":true},"web_pubsub_id":{"type":"string","required":true}}}},"azurerm_web_pubsub_socketio":{"block":{"attributes":{"aad_auth_enabled":{"type":"bool","optional":true,"default":true},"external_ip":{"type":"string","computed":true},"hostname":{"type":"string","computed":true},"live_trace_connectivity_logs_enabled":{"type":"bool","optional":true,"default":true},"live_trace_enabled":{"type":"bool","optional":true,"default":true},"live_trace_http_request_logs_enabled":{"type":"bool","optional":true,"default":true},"live_trace_messaging_logs_enabled":{"type":"bool","optional":true,"default":true},"local_auth_enabled":{"type":"bool","optional":true,"default":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"primary_access_key":{"type":"string","computed":true},"primary_connection_string":{"type":"string","computed":true},"public_network_access":{"type":"string","optional":true,"default":"Enabled"},"public_port":{"type":"number","computed":true},"resource_group_name":{"type":"string","required":true},"secondary_access_key":{"type":"string","computed":true},"secondary_connection_string":{"type":"string","computed":true},"server_port":{"type":"number","computed":true},"service_mode":{"type":"string","optional":true,"default":"Default"},"tags":{"type":["map","string"],"optional":true},"tls_client_cert_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"sku":{"nesting_mode":3,"block":{"attributes":{"capacity":{"type":"number","optional":true,"default":1},"name":{"type":"string","required":true}}},"required":true}}}},"azurerm_windows_function_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"computed":true},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_backup_restore_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"default":"v4.0","exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"computed":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true,"computed":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_function_app_slot":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"builtin_logging_enabled":{"type":"bool","optional":true,"default":true},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Optional"},"content_share_force_disabled":{"type":"bool","optional":true,"default":false},"custom_domain_verification_id":{"type":"string","computed":true},"daily_memory_time_quota":{"type":"number","optional":true,"default":0},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"function_app_id":{"type":"string","required":true},"functions_extension_version":{"type":"string","optional":true,"default":"~4"},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"storage_account_access_key":{"type":"string","optional":true,"conflicts_with":["storage_uses_managed_identity","storage_key_vault_secret_id"]},"storage_account_name":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_key_vault_secret_id":{"type":"string","optional":true,"exactly_one_of":["storage_account_name","storage_key_vault_secret_id"]},"storage_uses_managed_identity":{"type":"bool","optional":true,"default":false,"conflicts_with":["storage_account_access_key","storage_key_vault_secret_id"]},"tags":{"type":["map","string"],"optional":true},"virtual_network_backup_restore_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_subnet_id":{"type":"string","optional":true},"vnet_image_pull_enabled":{"type":"bool","optional":true,"default":false},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"computed":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"app_scale_limit":{"type":"number","optional":true,"computed":true},"application_insights_connection_string":{"type":"string","optional":true},"application_insights_key":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"elastic_instance_minimum":{"type":"number","optional":true,"computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"default":0},"health_check_path":{"type":"string","optional":true},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"pre_warmed_instance_count":{"type":"number","optional":true,"computed":true},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"runtime_scale_monitoring_enabled":{"type":"bool","optional":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"app_service_logs":{"nesting_mode":3,"block":{"attributes":{"disk_quota_mb":{"type":"number","optional":true,"default":35},"retention_period_days":{"type":"number","optional":true}}},"optional":true},"application_stack":{"nesting_mode":3,"block":{"attributes":{"dotnet_version":{"type":"string","optional":true,"default":"v4.0","exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"java_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"node_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"powershell_core_version":{"type":"string","optional":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_custom_runtime":{"type":"bool","optional":true,"computed":true,"exactly_one_of":["site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]},"use_dotnet_isolated_runtime":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.powershell_core_version","site_config.0.application_stack.0.use_custom_runtime"]}}},"optional":true,"computed":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_virtual_machine":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"allow_extension_operations":{"type":"bool","optional":true,"default":true},"availability_set_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id","virtual_machine_scale_set_id","zone"]},"bypass_platform_safety_checks_on_user_schedule_enabled":{"type":"bool","optional":true,"default":false},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id","proximity_placement_group_id"]},"computer_name":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"dedicated_host_group_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_id"]},"dedicated_host_id":{"type":"string","optional":true,"conflicts_with":["dedicated_host_group_id"]},"disk_controller_type":{"type":"string","optional":true,"computed":true},"edge_zone":{"type":"string","optional":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"hotpatching_enabled":{"type":"bool","optional":true,"default":false},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"network_interface_ids":{"type":["list","string"],"required":true},"patch_assessment_mode":{"type":"string","optional":true,"default":"ImageDefault"},"patch_mode":{"type":"string","optional":true,"default":"AutomaticByOS"},"platform_fault_domain":{"type":"number","optional":true,"default":-1,"required_with":["virtual_machine_scale_set_id"]},"priority":{"type":"string","optional":true,"default":"Regular"},"private_ip_address":{"type":"string","computed":true},"private_ip_addresses":{"type":["list","string"],"computed":true},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"public_ip_address":{"type":"string","computed":true},"public_ip_addresses":{"type":["list","string"],"computed":true},"reboot_setting":{"type":"string","optional":true},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"size":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","optional":true},"user_data":{"type":"string","optional":true},"virtual_machine_id":{"type":"string","computed":true},"virtual_machine_scale_set_id":{"type":"string","optional":true,"conflicts_with":["availability_set_id"]},"vm_agent_platform_updates_enabled":{"type":"bool","optional":true,"computed":true},"vtpm_enabled":{"type":"bool","optional":true},"zone":{"type":"string","optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"hibernation_enabled":{"type":"bool","optional":true,"default":false},"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"treat_failure_as_deployment_failure_enabled":{"type":"bool","optional":true,"default":false},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"id":{"type":"string","computed":true},"name":{"type":"string","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"os_image_notification":{"nesting_mode":3,"block":{"attributes":{"timeout":{"type":"string","optional":true,"default":"PT15M"}}},"optional":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_virtual_machine_scale_set":{"block":{"attributes":{"admin_password":{"type":"string","required":true},"admin_username":{"type":"string","required":true},"capacity_reservation_group_id":{"type":"string","optional":true,"conflicts_with":["proximity_placement_group_id"]},"computer_name_prefix":{"type":"string","optional":true,"computed":true},"custom_data":{"type":"string","optional":true},"do_not_run_extensions_on_overprovisioned_machines":{"type":"bool","optional":true,"default":false},"edge_zone":{"type":"string","optional":true},"enable_automatic_updates":{"type":"bool","optional":true,"default":true},"encryption_at_host_enabled":{"type":"bool","optional":true},"eviction_policy":{"type":"string","optional":true},"extension_operations_enabled":{"type":"bool","optional":true,"default":true},"extensions_time_budget":{"type":"string","optional":true,"default":"PT1H30M"},"health_probe_id":{"type":"string","optional":true},"host_group_id":{"type":"string","optional":true},"instances":{"type":"number","required":true},"license_type":{"type":"string","optional":true},"location":{"type":"string","required":true},"max_bid_price":{"type":"number","optional":true,"default":-1},"name":{"type":"string","required":true},"overprovision":{"type":"bool","optional":true,"default":true},"platform_fault_domain_count":{"type":"number","optional":true,"computed":true},"priority":{"type":"string","optional":true,"default":"Regular"},"provision_vm_agent":{"type":"bool","optional":true,"default":true},"proximity_placement_group_id":{"type":"string","optional":true,"conflicts_with":["capacity_reservation_group_id"]},"resource_group_name":{"type":"string","required":true},"secure_boot_enabled":{"type":"bool","optional":true},"single_placement_group":{"type":"bool","optional":true,"default":true},"sku":{"type":"string","required":true},"source_image_id":{"type":"string","optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"tags":{"type":["map","string"],"optional":true},"timezone":{"type":"string","optional":true},"unique_id":{"type":"string","computed":true},"upgrade_mode":{"type":"string","optional":true,"default":"Manual"},"user_data":{"type":"string","optional":true},"vtpm_enabled":{"type":"bool","optional":true},"zone_balance":{"type":"bool","optional":true,"default":false},"zones":{"type":["set","string"],"optional":true}},"block_types":{"additional_capabilities":{"nesting_mode":3,"block":{"attributes":{"ultra_ssd_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"additional_unattend_content":{"nesting_mode":3,"block":{"attributes":{"content":{"type":"string","required":true},"setting":{"type":"string","required":true}}},"optional":true},"automatic_instance_repair":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"grace_period":{"type":"string","optional":true,"computed":true}}},"optional":true,"computed":true},"automatic_os_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"disable_automatic_rollback":{"type":"bool","required":true},"enable_automatic_os_upgrade":{"type":"bool","required":true}}},"optional":true},"boot_diagnostics":{"nesting_mode":3,"block":{"attributes":{"storage_account_uri":{"type":"string","optional":true}}},"optional":true},"data_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"create_option":{"type":"string","optional":true,"default":"Empty"},"disk_encryption_set_id":{"type":"string","optional":true},"disk_size_gb":{"type":"number","required":true},"lun":{"type":"number","required":true},"name":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"ultra_ssd_disk_iops_read_write":{"type":"number","optional":true,"computed":true},"ultra_ssd_disk_mbps_read_write":{"type":"number","optional":true,"computed":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}}},"optional":true},"extension":{"nesting_mode":4,"block":{"attributes":{"auto_upgrade_minor_version":{"type":"bool","optional":true,"default":true},"automatic_upgrade_enabled":{"type":"bool","optional":true,"default":false},"force_update_tag":{"type":"string","optional":true},"name":{"type":"string","required":true},"protected_settings":{"type":"string","optional":true},"provision_after_extensions":{"type":["list","string"],"optional":true},"publisher":{"type":"string","required":true},"settings":{"type":"string","optional":true},"type":{"type":"string","required":true},"type_handler_version":{"type":"string","required":true}},"block_types":{"protected_settings_from_key_vault":{"nesting_mode":3,"block":{"attributes":{"secret_url":{"type":"string","required":true},"source_vault_id":{"type":"string","required":true}}},"optional":true}}},"optional":true,"computed":true},"gallery_application":{"nesting_mode":3,"block":{"attributes":{"configuration_blob_uri":{"type":"string","optional":true},"order":{"type":"number","optional":true,"default":0},"tag":{"type":"string","optional":true},"version_id":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"network_interface":{"nesting_mode":3,"block":{"attributes":{"dns_servers":{"type":["list","string"],"optional":true},"enable_accelerated_networking":{"type":"bool","optional":true,"default":false},"enable_ip_forwarding":{"type":"bool","optional":true,"default":false},"name":{"type":"string","required":true},"network_security_group_id":{"type":"string","optional":true},"primary":{"type":"bool","optional":true,"default":false}},"block_types":{"ip_configuration":{"nesting_mode":3,"block":{"attributes":{"application_gateway_backend_address_pool_ids":{"type":["set","string"],"optional":true},"application_security_group_ids":{"type":["set","string"],"optional":true},"load_balancer_backend_address_pool_ids":{"type":["set","string"],"optional":true},"load_balancer_inbound_nat_rules_ids":{"type":["set","string"],"optional":true},"name":{"type":"string","required":true},"primary":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"public_ip_address":{"nesting_mode":3,"block":{"attributes":{"domain_name_label":{"type":"string","optional":true},"idle_timeout_in_minutes":{"type":"number","optional":true,"computed":true},"name":{"type":"string","required":true},"public_ip_prefix_id":{"type":"string","optional":true},"version":{"type":"string","optional":true,"default":"IPv4"}},"block_types":{"ip_tag":{"nesting_mode":3,"block":{"attributes":{"tag":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"required":true}}},"required":true},"os_disk":{"nesting_mode":3,"block":{"attributes":{"caching":{"type":"string","required":true},"disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.secure_vm_disk_encryption_set_id"]},"disk_size_gb":{"type":"number","optional":true,"computed":true},"secure_vm_disk_encryption_set_id":{"type":"string","optional":true,"conflicts_with":["os_disk.0.disk_encryption_set_id"]},"security_encryption_type":{"type":"string","optional":true},"storage_account_type":{"type":"string","required":true},"write_accelerator_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"diff_disk_settings":{"nesting_mode":3,"block":{"attributes":{"option":{"type":"string","required":true},"placement":{"type":"string","optional":true,"default":"CacheDisk"}}},"optional":true}}},"required":true},"plan":{"nesting_mode":3,"block":{"attributes":{"name":{"type":"string","required":true},"product":{"type":"string","required":true},"publisher":{"type":"string","required":true}}},"optional":true},"rolling_upgrade_policy":{"nesting_mode":3,"block":{"attributes":{"cross_zone_upgrades_enabled":{"type":"bool","optional":true},"max_batch_instance_percent":{"type":"number","required":true},"max_unhealthy_instance_percent":{"type":"number","required":true},"max_unhealthy_upgraded_instance_percent":{"type":"number","required":true},"maximum_surge_instances_enabled":{"type":"bool","optional":true},"pause_time_between_batches":{"type":"string","required":true},"prioritize_unhealthy_instances_enabled":{"type":"bool","optional":true}}},"optional":true},"scale_in":{"nesting_mode":3,"block":{"attributes":{"force_deletion_enabled":{"type":"bool","optional":true,"default":false},"rule":{"type":"string","optional":true,"default":"Default"}}},"optional":true},"secret":{"nesting_mode":3,"block":{"attributes":{"key_vault_id":{"type":"string","required":true}},"block_types":{"certificate":{"nesting_mode":4,"block":{"attributes":{"store":{"type":"string","required":true},"url":{"type":"string","required":true}}},"required":true}}},"optional":true},"source_image_reference":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"optional":true,"exactly_one_of":["source_image_id","source_image_reference"]},"spot_restore":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":false},"timeout":{"type":"string","optional":true,"default":"PT1H"}}},"optional":true,"computed":true},"termination_notification":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","required":true},"timeout":{"type":"string","optional":true,"default":"PT5M"}}},"optional":true,"computed":true},"winrm_listener":{"nesting_mode":4,"block":{"attributes":{"certificate_url":{"type":"string","optional":true},"protocol":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_web_app":{"block":{"attributes":{"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"location":{"type":"string","required":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"resource_group_name":{"type":"string","required":true},"service_plan_id":{"type":"string","required":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_backup_restore_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"linux_fx_version":{"type":"string","computed":true},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"default":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"current_stack":{"type":"string","optional":true,"computed":true},"docker_image_name":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_core_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"dotnet_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"java_container":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_container_version"]},"java_container_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_container"]},"java_embedded_server_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_version"]},"java_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"node_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"php_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"python":{"type":"bool","optional":true,"default":false,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"tomcat_version":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.java_embedded_server_enabled"],"required_with":["site_config.0.application_stack.0.java_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}},"block_types":{"custom_action":{"nesting_mode":3,"block":{"attributes":{"executable":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"private_memory_kb":{"type":"number","optional":true}},"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"required":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"handler_mapping":{"nesting_mode":4,"block":{"attributes":{"arguments":{"type":"string","optional":true},"extension":{"type":"string","required":true},"script_processor_path":{"type":"string","required":true}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"virtual_application":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","required":true},"preload":{"type":"bool","required":true},"virtual_path":{"type":"string","required":true}},"block_types":{"virtual_directory":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","optional":true},"virtual_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"required":true},"sticky_settings":{"nesting_mode":3,"block":{"attributes":{"app_setting_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]},"connection_string_names":{"type":["list","string"],"optional":true,"at_least_one_of":["sticky_settings.0.app_setting_names","sticky_settings.0.connection_string_names"]}}},"optional":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_windows_web_app_slot":{"block":{"attributes":{"app_service_id":{"type":"string","required":true},"app_settings":{"type":["map","string"],"optional":true},"client_affinity_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_enabled":{"type":"bool","optional":true,"default":false},"client_certificate_exclusion_paths":{"type":"string","optional":true},"client_certificate_mode":{"type":"string","optional":true,"default":"Required"},"custom_domain_verification_id":{"type":"string","computed":true},"default_hostname":{"type":"string","computed":true},"enabled":{"type":"bool","optional":true,"default":true},"ftp_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"hosting_environment_id":{"type":"string","computed":true},"https_only":{"type":"bool","optional":true,"default":false},"key_vault_reference_identity_id":{"type":"string","optional":true,"computed":true},"kind":{"type":"string","computed":true},"name":{"type":"string","required":true},"outbound_ip_address_list":{"type":["list","string"],"computed":true},"outbound_ip_addresses":{"type":"string","computed":true},"possible_outbound_ip_address_list":{"type":["list","string"],"computed":true},"possible_outbound_ip_addresses":{"type":"string","computed":true},"public_network_access_enabled":{"type":"bool","optional":true,"default":true},"service_plan_id":{"type":"string","optional":true},"site_credential":{"type":["list",["object",{"name":"string","password":"string"}]],"computed":true},"tags":{"type":["map","string"],"optional":true},"virtual_network_backup_restore_enabled":{"type":"bool","optional":true,"default":false},"virtual_network_subnet_id":{"type":"string","optional":true},"webdeploy_publish_basic_authentication_enabled":{"type":"bool","optional":true,"default":true},"zip_deploy_file":{"type":"string","optional":true,"computed":true}},"block_types":{"auth_settings":{"nesting_mode":3,"block":{"attributes":{"additional_login_parameters":{"type":["map","string"],"optional":true},"allowed_external_redirect_urls":{"type":["list","string"],"optional":true,"computed":true},"default_provider":{"type":"string","optional":true,"computed":true},"enabled":{"type":"bool","required":true},"issuer":{"type":"string","optional":true},"runtime_version":{"type":"string","optional":true,"computed":true},"token_refresh_extension_hours":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"unauthenticated_client_action":{"type":"string","optional":true,"computed":true}},"block_types":{"active_directory":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings.0.active_directory.0.client_secret"]}}},"optional":true},"facebook":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"app_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.facebook.0.app_secret","auth_settings.0.facebook.0.app_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"github":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.github.0.client_secret","auth_settings.0.github.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"google":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.google.0.client_secret","auth_settings.0.google.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"microsoft":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.microsoft.0.client_secret","auth_settings.0.microsoft.0.client_secret_setting_name"]},"oauth_scopes":{"type":["list","string"],"optional":true}}},"optional":true},"twitter":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret":{"type":"string","optional":true,"exactly_one_of":["auth_settings.0.twitter.0.consumer_secret","auth_settings.0.twitter.0.consumer_secret_setting_name"]},"consumer_secret_setting_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"auth_settings_v2":{"nesting_mode":3,"block":{"attributes":{"auth_enabled":{"type":"bool","optional":true},"config_file_path":{"type":"string","optional":true},"default_provider":{"type":"string","optional":true},"excluded_paths":{"type":["list","string"],"optional":true},"forward_proxy_convention":{"type":"string","optional":true,"default":"NoProxy"},"forward_proxy_custom_host_header_name":{"type":"string","optional":true},"forward_proxy_custom_scheme_header_name":{"type":"string","optional":true},"http_route_api_prefix":{"type":"string","optional":true,"default":"/.auth"},"require_authentication":{"type":"bool","optional":true},"require_https":{"type":"bool","optional":true,"default":true},"runtime_version":{"type":"string","optional":true,"default":"~1"},"unauthenticated_action":{"type":"string","optional":true,"default":"RedirectToLoginPage"}},"block_types":{"active_directory_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_applications":{"type":["list","string"],"optional":true},"allowed_audiences":{"type":["list","string"],"optional":true},"allowed_groups":{"type":["list","string"],"optional":true},"allowed_identities":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_certificate_thumbprint":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_setting_name"]},"client_secret_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.active_directory_v2.0.client_secret_certificate_thumbprint"]},"jwt_allowed_client_applications":{"type":["list","string"],"optional":true},"jwt_allowed_groups":{"type":["list","string"],"optional":true},"login_parameters":{"type":["map","string"],"optional":true},"tenant_auth_endpoint":{"type":"string","required":true},"www_authentication_disabled":{"type":"bool","optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"apple_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"azure_static_web_app_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"custom_oidc_v2":{"nesting_mode":3,"block":{"attributes":{"authorisation_endpoint":{"type":"string","computed":true},"certification_uri":{"type":"string","computed":true},"client_credential_method":{"type":"string","computed":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","computed":true},"issuer_endpoint":{"type":"string","computed":true},"name":{"type":"string","required":true},"name_claim_type":{"type":"string","optional":true},"openid_configuration_endpoint":{"type":"string","required":true},"scopes":{"type":["list","string"],"optional":true},"token_endpoint":{"type":"string","computed":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"facebook_v2":{"nesting_mode":3,"block":{"attributes":{"app_id":{"type":"string","required":true},"app_secret_setting_name":{"type":"string","required":true},"graph_api_version":{"type":"string","optional":true,"computed":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"github_v2":{"nesting_mode":3,"block":{"attributes":{"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"google_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"login":{"nesting_mode":3,"block":{"attributes":{"allowed_external_redirect_urls":{"type":["list","string"],"optional":true},"cookie_expiration_convention":{"type":"string","optional":true,"default":"FixedTime"},"cookie_expiration_time":{"type":"string","optional":true,"default":"08:00:00"},"logout_endpoint":{"type":"string","optional":true},"nonce_expiration_time":{"type":"string","optional":true,"default":"00:05:00"},"preserve_url_fragments_for_logins":{"type":"bool","optional":true,"default":false},"token_refresh_extension_time":{"type":"number","optional":true,"default":72},"token_store_enabled":{"type":"bool","optional":true,"default":false},"token_store_path":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_sas_setting_name"]},"token_store_sas_setting_name":{"type":"string","optional":true,"conflicts_with":["auth_settings_v2.0.login.0.token_store_path"]},"validate_nonce":{"type":"bool","optional":true,"default":true}}},"required":true},"microsoft_v2":{"nesting_mode":3,"block":{"attributes":{"allowed_audiences":{"type":["list","string"],"optional":true},"client_id":{"type":"string","required":true},"client_secret_setting_name":{"type":"string","required":true},"login_scopes":{"type":["list","string"],"optional":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]},"twitter_v2":{"nesting_mode":3,"block":{"attributes":{"consumer_key":{"type":"string","required":true},"consumer_secret_setting_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["auth_settings_v2.0.apple_v2","auth_settings_v2.0.active_directory_v2","auth_settings_v2.0.azure_static_web_app_v2","auth_settings_v2.0.custom_oidc_v2","auth_settings_v2.0.facebook_v2","auth_settings_v2.0.github_v2","auth_settings_v2.0.google_v2","auth_settings_v2.0.microsoft_v2","auth_settings_v2.0.twitter_v2"]}}},"optional":true},"backup":{"nesting_mode":3,"block":{"attributes":{"enabled":{"type":"bool","optional":true,"default":true},"name":{"type":"string","required":true},"storage_account_url":{"type":"string","required":true}},"block_types":{"schedule":{"nesting_mode":3,"block":{"attributes":{"frequency_interval":{"type":"number","required":true},"frequency_unit":{"type":"string","required":true},"keep_at_least_one_backup":{"type":"bool","optional":true,"default":false},"last_execution_time":{"type":"string","computed":true},"retention_period_days":{"type":"number","optional":true,"default":30},"start_time":{"type":"string","optional":true,"computed":true}}},"required":true}}},"optional":true},"connection_string":{"nesting_mode":4,"block":{"attributes":{"name":{"type":"string","required":true},"type":{"type":"string","required":true},"value":{"type":"string","required":true}}},"optional":true},"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"optional":true},"principal_id":{"type":"string","computed":true},"tenant_id":{"type":"string","computed":true},"type":{"type":"string","required":true}}},"optional":true},"logs":{"nesting_mode":3,"block":{"attributes":{"detailed_error_messages":{"type":"bool","optional":true,"default":false},"failed_request_tracing":{"type":"bool","optional":true,"default":false}},"block_types":{"application_logs":{"nesting_mode":3,"block":{"attributes":{"file_system_level":{"type":"string","required":true}},"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"level":{"type":"string","required":true},"retention_in_days":{"type":"number","required":true},"sas_url":{"type":"string","required":true}}},"optional":true}}},"optional":true},"http_logs":{"nesting_mode":3,"block":{"block_types":{"azure_blob_storage":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","optional":true,"default":0},"sas_url":{"type":"string","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.file_system"]},"file_system":{"nesting_mode":3,"block":{"attributes":{"retention_in_days":{"type":"number","required":true},"retention_in_mb":{"type":"number","required":true}}},"optional":true,"conflicts_with":["logs.0.http_logs.0.azure_blob_storage"]}}},"optional":true}}},"optional":true},"site_config":{"nesting_mode":3,"block":{"attributes":{"always_on":{"type":"bool","optional":true,"default":true},"api_definition_url":{"type":"string","optional":true},"api_management_api_id":{"type":"string","optional":true},"app_command_line":{"type":"string","optional":true},"auto_swap_slot_name":{"type":"string","optional":true},"container_registry_managed_identity_client_id":{"type":"string","optional":true},"container_registry_use_managed_identity":{"type":"bool","optional":true,"default":false},"default_documents":{"type":["list","string"],"optional":true,"computed":true},"detailed_error_logging_enabled":{"type":"bool","computed":true},"ftps_state":{"type":"string","optional":true,"default":"Disabled"},"health_check_eviction_time_in_min":{"type":"number","optional":true,"required_with":["site_config.0.health_check_path"]},"health_check_path":{"type":"string","optional":true,"required_with":["site_config.0.health_check_eviction_time_in_min"]},"http2_enabled":{"type":"bool","optional":true,"default":false},"ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"load_balancing_mode":{"type":"string","optional":true,"default":"LeastRequests"},"local_mysql_enabled":{"type":"bool","optional":true,"default":false},"managed_pipeline_mode":{"type":"string","optional":true,"default":"Integrated"},"minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"remote_debugging_enabled":{"type":"bool","optional":true,"default":false},"remote_debugging_version":{"type":"string","optional":true,"computed":true},"scm_ip_restriction_default_action":{"type":"string","optional":true,"default":"Allow"},"scm_minimum_tls_version":{"type":"string","optional":true,"default":"1.2"},"scm_type":{"type":"string","computed":true},"scm_use_main_ip_restriction":{"type":"bool","optional":true,"default":false},"use_32_bit_worker":{"type":"bool","optional":true,"computed":true},"vnet_route_all_enabled":{"type":"bool","optional":true,"default":false},"websockets_enabled":{"type":"bool","optional":true,"default":false},"windows_fx_version":{"type":"string","computed":true},"worker_count":{"type":"number","optional":true,"computed":true}},"block_types":{"application_stack":{"nesting_mode":3,"block":{"attributes":{"current_stack":{"type":"string","optional":true,"computed":true},"docker_image_name":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"docker_registry_password":{"type":"string","optional":true},"docker_registry_url":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.docker_image_name"]},"docker_registry_username":{"type":"string","optional":true},"dotnet_core_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"dotnet_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"java_container":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_container_version"]},"java_container_version":{"type":"string","optional":true,"required_with":["site_config.0.application_stack.0.java_container"]},"java_embedded_server_enabled":{"type":"bool","optional":true,"computed":true,"conflicts_with":["site_config.0.application_stack.0.tomcat_version"],"required_with":["site_config.0.application_stack.0.java_version"]},"java_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"node_version":{"type":"string","optional":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"php_version":{"type":"string","optional":true,"computed":true,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"python":{"type":"bool","optional":true,"default":false,"at_least_one_of":["site_config.0.application_stack.0.docker_image_name","site_config.0.application_stack.0.dotnet_version","site_config.0.application_stack.0.dotnet_core_version","site_config.0.application_stack.0.java_version","site_config.0.application_stack.0.node_version","site_config.0.application_stack.0.php_version","site_config.0.application_stack.0.python"]},"tomcat_version":{"type":"string","optional":true,"conflicts_with":["site_config.0.application_stack.0.java_embedded_server_enabled"],"required_with":["site_config.0.application_stack.0.java_version"]}}},"optional":true,"computed":true},"auto_heal_setting":{"nesting_mode":3,"block":{"block_types":{"action":{"nesting_mode":3,"block":{"attributes":{"action_type":{"type":"string","required":true},"minimum_process_execution_time":{"type":"string","optional":true,"computed":true}},"block_types":{"custom_action":{"nesting_mode":3,"block":{"attributes":{"executable":{"type":"string","required":true},"parameters":{"type":"string","optional":true}}},"optional":true}}},"required":true},"trigger":{"nesting_mode":3,"block":{"attributes":{"private_memory_kb":{"type":"number","optional":true}},"block_types":{"requests":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true}}},"optional":true},"slow_request":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"time_taken":{"type":"string","required":true}}},"optional":true},"slow_request_with_path":{"nesting_mode":3,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"time_taken":{"type":"string","required":true}}},"optional":true},"status_code":{"nesting_mode":4,"block":{"attributes":{"count":{"type":"number","required":true},"interval":{"type":"string","required":true},"path":{"type":"string","optional":true},"status_code_range":{"type":"string","required":true},"sub_status":{"type":"number","optional":true},"win32_status_code":{"type":"number","optional":true}}},"optional":true}}},"required":true}}},"optional":true},"cors":{"nesting_mode":3,"block":{"attributes":{"allowed_origins":{"type":["set","string"],"optional":true},"support_credentials":{"type":"bool","optional":true,"default":false}}},"optional":true},"handler_mapping":{"nesting_mode":4,"block":{"attributes":{"arguments":{"type":"string","optional":true},"extension":{"type":"string","required":true},"script_processor_path":{"type":"string","required":true}}},"optional":true},"ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"scm_ip_restriction":{"nesting_mode":3,"block":{"attributes":{"action":{"type":"string","optional":true,"default":"Allow"},"description":{"type":"string","optional":true},"headers":{"type":["list",["object",{"x_azure_fdid":["list","string"],"x_fd_health_probe":["list","string"],"x_forwarded_for":["list","string"],"x_forwarded_host":["list","string"]}]],"optional":true},"ip_address":{"type":"string","optional":true},"name":{"type":"string","optional":true,"computed":true},"priority":{"type":"number","optional":true,"default":65000},"service_tag":{"type":"string","optional":true},"virtual_network_subnet_id":{"type":"string","optional":true}}},"optional":true},"virtual_application":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","required":true},"preload":{"type":"bool","required":true},"virtual_path":{"type":"string","required":true}},"block_types":{"virtual_directory":{"nesting_mode":4,"block":{"attributes":{"physical_path":{"type":"string","optional":true},"virtual_path":{"type":"string","optional":true}}},"optional":true}}},"optional":true}}},"required":true},"storage_account":{"nesting_mode":4,"block":{"attributes":{"access_key":{"type":"string","required":true},"account_name":{"type":"string","required":true},"mount_path":{"type":"string","optional":true},"name":{"type":"string","required":true},"share_name":{"type":"string","required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_workloads_sap_discovery_virtual_instance":{"block":{"attributes":{"central_server_virtual_machine_id":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"managed_resources_network_access_type":{"type":"string","optional":true,"default":"Public"},"managed_storage_account_name":{"type":"string","optional":true},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true}}}},"azurerm_workloads_sap_single_node_virtual_instance":{"block":{"attributes":{"app_location":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"managed_resources_network_access_type":{"type":"string","optional":true,"default":"Public"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_fqdn":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"single_server_configuration":{"nesting_mode":3,"block":{"attributes":{"app_resource_group_name":{"type":"string","required":true},"database_type":{"type":"string","optional":true},"secondary_ip_enabled":{"type":"bool","optional":true,"default":false},"subnet_id":{"type":"string","required":true}},"block_types":{"disk_volume_configuration":{"nesting_mode":4,"block":{"attributes":{"number_of_disks":{"type":"number","required":true},"size_in_gb":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}},"optional":true},"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true},"virtual_machine_resource_names":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"network_interface_names":{"type":["list","string"],"optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"os_disk_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]},"virtual_machine_name":{"type":"string","optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true,"at_least_one_of":["single_server_configuration.0.virtual_machine_resource_names.0.data_disk","single_server_configuration.0.virtual_machine_resource_names.0.host_name","single_server_configuration.0.virtual_machine_resource_names.0.network_interface_names","single_server_configuration.0.virtual_machine_resource_names.0.os_disk_name","single_server_configuration.0.virtual_machine_resource_names.0.virtual_machine_name"]}}},"optional":true}}},"required":true}}}},"azurerm_workloads_sap_three_tier_virtual_instance":{"block":{"attributes":{"app_location":{"type":"string","required":true},"environment":{"type":"string","required":true},"location":{"type":"string","required":true},"managed_resource_group_name":{"type":"string","optional":true},"managed_resources_network_access_type":{"type":"string","optional":true,"default":"Public"},"name":{"type":"string","required":true},"resource_group_name":{"type":"string","required":true},"sap_fqdn":{"type":"string","required":true},"sap_product":{"type":"string","required":true},"tags":{"type":["map","string"],"optional":true}},"block_types":{"identity":{"nesting_mode":3,"block":{"attributes":{"identity_ids":{"type":["set","string"],"required":true},"type":{"type":"string","required":true}}},"optional":true},"three_tier_configuration":{"nesting_mode":3,"block":{"attributes":{"app_resource_group_name":{"type":"string","required":true},"high_availability_type":{"type":"string","optional":true},"secondary_ip_enabled":{"type":"bool","optional":true,"default":false}},"block_types":{"application_server_configuration":{"nesting_mode":3,"block":{"attributes":{"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"central_server_configuration":{"nesting_mode":3,"block":{"attributes":{"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"database_server_configuration":{"nesting_mode":3,"block":{"attributes":{"database_type":{"type":"string","optional":true},"instance_count":{"type":"number","required":true},"subnet_id":{"type":"string","required":true}},"block_types":{"disk_volume_configuration":{"nesting_mode":4,"block":{"attributes":{"number_of_disks":{"type":"number","required":true},"size_in_gb":{"type":"number","required":true},"sku_name":{"type":"string","required":true},"volume_name":{"type":"string","required":true}}},"optional":true},"virtual_machine_configuration":{"nesting_mode":3,"block":{"attributes":{"virtual_machine_size":{"type":"string","required":true}},"block_types":{"image":{"nesting_mode":3,"block":{"attributes":{"offer":{"type":"string","required":true},"publisher":{"type":"string","required":true},"sku":{"type":"string","required":true},"version":{"type":"string","required":true}}},"required":true},"os_profile":{"nesting_mode":3,"block":{"attributes":{"admin_username":{"type":"string","required":true},"ssh_private_key":{"type":"string","required":true},"ssh_public_key":{"type":"string","required":true}}},"required":true}}},"required":true}}},"required":true},"resource_names":{"nesting_mode":3,"block":{"block_types":{"application_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"central_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"load_balancer":{"nesting_mode":3,"block":{"attributes":{"backend_pool_names":{"type":["list","string"],"optional":true},"frontend_ip_configuration_names":{"type":["list","string"],"optional":true},"health_probe_names":{"type":["list","string"],"optional":true},"name":{"type":"string","optional":true}}},"optional":true},"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"database_server":{"nesting_mode":3,"block":{"attributes":{"availability_set_name":{"type":"string","optional":true}},"block_types":{"load_balancer":{"nesting_mode":3,"block":{"attributes":{"backend_pool_names":{"type":["list","string"],"optional":true},"frontend_ip_configuration_names":{"type":["list","string"],"optional":true},"health_probe_names":{"type":["list","string"],"optional":true},"name":{"type":"string","optional":true}}},"optional":true},"virtual_machine":{"nesting_mode":3,"block":{"attributes":{"host_name":{"type":"string","optional":true},"network_interface_names":{"type":["list","string"],"optional":true},"os_disk_name":{"type":"string","optional":true},"virtual_machine_name":{"type":"string","optional":true}},"block_types":{"data_disk":{"nesting_mode":4,"block":{"attributes":{"names":{"type":["list","string"],"required":true},"volume_name":{"type":"string","required":true}}},"optional":true}}},"optional":true}}},"optional":true},"shared_storage":{"nesting_mode":3,"block":{"attributes":{"account_name":{"type":"string","optional":true},"private_endpoint_name":{"type":"string","optional":true}}},"optional":true}}},"optional":true},"transport_create_and_mount":{"nesting_mode":3,"block":{"attributes":{"resource_group_id":{"type":"string","optional":true},"storage_account_name":{"type":"string","optional":true}}},"optional":true}}},"required":true}}}}}}`) if err := json.Unmarshal(b, &ProviderSchemaInfo); err != nil { fmt.Fprintf(os.Stderr, "unmarshalling the provider schema: %s", err) os.Exit(1) diff --git a/go.mod b/go.mod index 2cfb5cbf..94afd3c2 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/aztfmigrate go 1.23.0 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 github.com/gertd/go-pluralize v0.2.1 github.com/golang-jwt/jwt/v4 v4.5.2 github.com/hashicorp/go-version v1.7.0 @@ -12,7 +12,7 @@ require ( github.com/hashicorp/terraform-exec v0.21.0 github.com/hashicorp/terraform-json v0.22.1 github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 - github.com/magodo/aztft v0.3.1-0.20250331004505-d5aff7c777d4 + github.com/magodo/aztft v0.3.1-0.20250512012628-bf61e7a7a744 github.com/magodo/tfadd v0.10.1-0.20240902124619-bd18a56f410d github.com/mitchellh/cli v1.1.5 github.com/zclconf/go-cty v1.15.0 @@ -20,23 +20,23 @@ require ( require ( dario.cat/mergo v1.0.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.10.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement v1.1.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3 v3.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform v1.1.0-beta.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice v1.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2 v2.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4 v4.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.9.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.2.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2 v2.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2 v2.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 v7.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection v1.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3 v3.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.2.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization v1.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2 v2.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices v1.2.0 // indirect @@ -45,22 +45,21 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.5.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto v1.3.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2 v2.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 v4.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.7.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7 v7.5.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 v6.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.1.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery v1.1.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts v1.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4 v4.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2 v2.4.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2 v2.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.4 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql v1.2.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.7.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache v1.0.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover v1.1.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4 v4.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2 v2.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse v0.8.0 // indirect @@ -109,12 +108,12 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - golang.org/x/crypto v0.36.0 // indirect + golang.org/x/crypto v0.38.0 // indirect golang.org/x/mod v0.23.0 // indirect - golang.org/x/net v0.38.0 // indirect - golang.org/x/sync v0.12.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/text v0.23.0 // indirect + golang.org/x/net v0.40.0 // indirect + golang.org/x/sync v0.14.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/text v0.25.0 // indirect golang.org/x/tools v0.30.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.34.0 // indirect diff --git a/go.sum b/go.sum index 84f371c4..8b30efa0 100644 --- a/go.sum +++ b/go.sum @@ -1,29 +1,29 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1 h1:DSDNVxqkoXJiko6x8a90zidoYqnYYa6c1MTzDKzKkTo= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1/go.mod h1:zGqV2R4Cr/k8Uye5w+dgQ06WJtEcbQG/8J7BB6hnCr4= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2 h1:F0gBpfdPLGsw+nsgk6aqqkZS1jiixa5WwFe3fk/T3Ys= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2/go.mod h1:SqINnQ9lVVdRlyC8cd1lCI0SdX4n2paeABd2K8ggfnE= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0 h1:Bg8m3nq/X1DeePkAbCfb6ml6F3F0IunEhE8TMh+lY48= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 h1:Gt0j3wceWMwPmiazCa8MzMA0MfhmPIz0Qp0FJ6qcM0U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0/go.mod h1:Ot/6aikWnKWi4l9QB7qVSwa8iMphQNqkWALMoNT3rzM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0 h1:OVoM452qUFBrX+URdH3VpR299ma4kfom0yB0URYky9g= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.9.0/go.mod h1:kUjrAo8bgEwLeZ/CmHqNl3Z/kPm7y6FKfxxK0izYUg4= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 h1:FPKJS1T+clwv+OLGt13a8UjqeRuh0O4SJ3lUriThc+4= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.10.0 h1:zSc/9W0WKtH/qpFlN1K2pQjMJLMTMJpWyexdjtexHtA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.10.0/go.mod h1:AQQcirAE2A3+knMh7Voguwx+0txBqeDBaWu+ML1aMSc= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement v1.1.1 h1:jCkNVNpsEevyic4bmjgVjzVA4tMGSJpXNGirf+S+mDI= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement v1.1.1/go.mod h1:a0Ug1l73Il7EhrCJEEt2dGjlNjvphppZq5KqJdgnwuw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0 h1:NYYoOOPGOqUXw/bGIVd6OY/K8J23a18IAlAx1tOHWNo= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0/go.mod h1:LDN3sr8FJ36sY6ZmMes6Q2vHJ+5r1aFsE3wEo7VbXJg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3 v3.0.0 h1:5aCs3yc/Ftlv/Le+Dr0P+oOuo/clB6fsfFwrm+DbNms= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3 v3.0.0/go.mod h1:4/JvtEOgU0r2lkVz8BImrFd0e7ZNQ74x+3k9swJzSmc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.1.0 h1:ilMZ576u8sm975EqV+AKEtD4u9TLwqEo2XY9csPXBRo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.1.0/go.mod h1:LGhzy+pg9AKr1Z7ZRyTC1qr1xNyVqLsqydvLdY+2iQk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0 h1:7FX6sHNPamIAyukt6w9Gw5Qa5bu+gVN2Iy70yHc0xns= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0/go.mod h1:S7Ss6Rm0nlKDRHKrO9eL2Be5EnX29Z09CNPWgK7o4+I= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform v1.1.0-beta.1 h1:hQJe8H6ZruSIWEzoNCB/GH9gGa7ntRDqaebxj8UeguI= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform v1.1.0-beta.1/go.mod h1:yGK8WOLcIMXyT84rwf1EL3y5QU4XYYwczK70uWfBFmQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice v1.0.0 h1:kRX8I0dWAcpW6Vq0m90CgV+qw4O1vXodgwrhoPr1RWs= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice v1.0.0/go.mod h1:avvc5/7qR4taCvAhOM7KFXuEHhAU0Wek9YX7sh9H3EM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2 v2.0.0 h1:2YOdVbvqpAejYX2T8wlEh1kdS+r5mgQVV+9bSSnRU+M= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2 v2.0.0/go.mod h1:hLe8JXoHeYF+ZjF/6VV7lRfQzTV/hwW4YSdhcNuuen0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4 v4.1.0 h1:dZurN2OdkxAZlaNw6cjEvo7uOonGFErtqQtos0RDl5Q= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4 v4.1.0/go.mod h1:/Qjzbz3yeXizRgrwP1lbwBIYYsAuMfDRWN0P5YbYgBM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.9.0 h1:pzgp0VZDAnmgAkUPeedW1dTd7v3kSrwxFNabFAzB158= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.9.0/go.mod h1:RbDEpcty79BkGei2pfm6duP7QEeWlzpKSJ07XTna6+Y= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.2.0 h1:RsM+VqnIUK6WLmKjIA0tbcZHdjoq9sVKaPTT4RrlnWs= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.2.0/go.mod h1:d7OLd8MIV32CmujSnOFkT7R5N0YsV5qVI+WnKHzQujQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1 h1:CtE6GCP9YEDF6DjpFxl7xQBqklqfyCC/xkBKUGa/IAc= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1/go.mod h1:b9yk+8vyxSsBsiEjk9kzrwxgyn+7+J4HzDOYUPznES4= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2 v2.2.0 h1:kkGnUaUolPw/VHvs15u2Dhep8t+CKNOD/pCsusVARoI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2 v2.2.0/go.mod h1:pVreHmvznJ/D5Aqr8ZRO0UQx6VXJi84b7oYl0BgrWVo= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.7.0 h1:4exaC92+n1FzhSKb5Ghino2XEk3cClUtzvveL1U9YeM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.7.0/go.mod h1:BkhZrH3JiVTkrTqCeYHOmqReFcZTYEMf8jcFDlrCJLk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 h1:LkHbJbgF3YyvC53aqYGR+wWQDn2Rdp9AQdGndf9QvY4= @@ -32,12 +32,12 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmana github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2 v2.1.0/go.mod h1:pttKQoqOdBOfgSUaztac9Mk1ZK0SiZhyW9VQPKkW/7s= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 v7.0.0 h1:0kFVoHWNRGJE5N8dAaSkMaFGp1UhO43ICeZJFcLxHJI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 v7.0.0/go.mod h1:7HeBNl53VshGDi84AM31jBKzkTyS6tVzYQ0mdrnQib0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection v1.0.0 h1:VFqjVi532z3gdltbAkYrPl9Ez0czn3ZPM+bjmvLq6fk= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection v1.0.0/go.mod h1:CmZQSRwBPP7KNjDA+PHaoR2m8wgOsbTd9ncqZgSzgHA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3 v3.1.0 h1:Yj6NV1y8Deg7leXETiM9gJ+peM9DxhLR3GmppUSH+a0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3 v3.1.0/go.mod h1:4lNPcTKG4Zgad7aiZBmvLfIMX47eqr5BFzDjC4zggKU= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.2.0 h1:5iPF3EaGy/cFiImQvKQFC8SbceEjFLYB4aLoFO1/WN8= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.2.0/go.mod h1:yFddSyk5uaKMqOtoqjfdjZM1/lEnsc3btormisxwdAM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization v1.0.0 h1:E404espBxzBWw7BlZa7TONlqMEH7P3P8XCe686PSmZQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization v1.0.0/go.mod h1:XM/9J9tLtumXaGIJwbsbm7WlsZwxOtKB34HwmFW9qyU= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2 v2.3.0 h1:58Pq8MyJ4hT2rkkSaZ7gS25+Q1YdsNn+3nuAt+Sg0Yc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2 v2.3.0/go.mod h1:awlKdgQzRV48H2/m3VEhHQrHwqRpLqDEVkz4LvSgTEc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.2.0 h1:y8lZ96aehjdOLj9cyMYaSe+E/WdKD7cgY1jm/b6PrcQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.2.0/go.mod h1:flt9Jc9/VQYy/rJymy+NwsObqvrrc6iLY6LlUPxLSuI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins v1.2.0 h1:GD96b78rv9jhShcYcJauisgqyXBFgEaTAvUMaPiFl9w= @@ -50,8 +50,6 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight v1. github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight v1.2.0/go.mod h1:skx0SS3je4jPa5KT5Ckf3tmmwWzMZ46nl1l6xTdxOGE= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes v1.2.0 h1:Mv/bQNTqVb4WxLuyc0GpeTwMZEJLyjP1+fqR3x4KdZA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes v1.2.0/go.mod h1:t1IEI21/6k/UmAXRIRy3E7tgpC2zbeyd9H3qk1EY5JA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0 h1:PTFGRSlMKCQelWwxUyYVEUqseBJVemLyqWJjvMyt0do= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v2 v2.0.0/go.mod h1:LRr2FzBTQlONPPa5HREE5+RjSCTXl7BwOvYOaWTqCaI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0 h1:2qsIIvxVT+uE6yrNldntJKlLRgxGbZ85kgtz5SNBhMw= @@ -60,42 +58,42 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.3.0 h1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.3.0/go.mod h1:djbLk3ngutFfQ9fSOM29UzywAkcBI1YUsuUnxTQGsqU= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.5.0 h1:nnQ9vXH039UrEFxi08pPuZBE7VfqSJt343uJLw0rhWI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.5.0/go.mod h1:4YIVtzMFVsPwBvitCDX7J9sqthSj43QD1sP6fYc1egc= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto v1.3.1 h1:ik0pyYcwUqdiPPXOioZfKL62SVu7iN5eh5zxHEbV3VE= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto v1.3.1/go.mod h1:st4TFPle8b16a2B9MEN+ofQT6iJjWBPAD9F5rfMQtZg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2 v2.3.0 h1:5kp5bmJwJuF0HTsPUxRWRy44FxEatQAhv03nYdjXJ3s= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2 v2.3.0/go.mod h1:ULnv9Hl5nSpzNHHqJ3xX0kIZp5ZyLcLGHdXNQ8RwIk4= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic v1.2.0 h1:EMNgS+pCj2/2LL7+nWG8zPf9sp4u8icP5FNwoBhyc8M= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic v1.2.0/go.mod h1:TsM36SmGxYC24DiOTR9wPuBj5HYphihMC6xlnX536bE= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 v4.0.0 h1:H5ykGRBhX8CJKpB2tiRVut1DPbH7BnYKQ+orFTD7+JY= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 v4.0.0/go.mod h1:nivJvZio5SHpEASAk8LKIueqs7zEHU+iRLKWbx3Xi10= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.7.0 h1:U6aSmNaC/WWDlHnL0e+SxQlvYmcjdoBLFjNir8AZBe0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.7.0/go.mod h1:qDMzzI3qK0Oi9wpbRIaBoYyRYg+1UJZ0I2/Y4VxoVU4= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi v0.6.0 h1:zSHpZY39hfFpVNixDoFOUeLwBBX0SIRe32HaWg03R8k= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi v0.6.0/go.mod h1:Yu9z4VU4VeNRoZQMjAKwzXJpNAZ8SlyVg+yHyDVqvi8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp v1.0.0 h1:06Xuh5qDiIaR+5IQNWz8K9ZV4banx4SOx1DsQiJOqqA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp v1.0.0/go.mod h1:bAQDVyOKushEZ1+h7Q157Xn3hpaB/TewYIhiWqAh71U= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0/go.mod h1:243D9iHbcQXoFUtgHJwL7gl2zx1aDuDMjvBZVGr2uW0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7 v7.5.0 h1:EVUTdXtXYy2Fk4W9UukantrWmeb1Rwfqkd6X2k2HFo8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7 v7.5.0/go.mod h1:JA//9UWkJI1Eh6yd+VisRlPMkiFXWrsqJB2Fk+uuxLE= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 v6.2.0 h1:HYGD75g0bQ3VO/Omedm54v4LrD3B1cGImuRF3AJ5wLo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 v6.2.0/go.mod h1:ulHyBFJOI0ONiRL4vcJTmS7rx18jQQlEPmAgo80cRdM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0 h1:4FlNvfcPu7tTvOgOzXxIbZLvwvmZq1OdhQUdIa9g2N4= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0/go.mod h1:A4nzEXwVd5pAyneR6KOvUAo72svUc5rmCzRHhAbP6lA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.1.0 h1:l7R5KiDnWg6UWIPTJM6IZBEuC8Baggds4fSju8s8jsk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.1.0/go.mod h1:fue9nIyAfRRmBkpwfcPfoorEeQaVzOplTtFJPtAlerE= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup v1.0.0 h1:MgsdbI063vhtsJMMCZSY6TcxFopiEhPMJEJ2L5iDva0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup v1.0.0/go.mod h1:65T59IeW3MusDYTq3zjvzzipDyct3UbWTZVL31go+Ww= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery v1.1.0 h1:x02t6z6v5+zdGuaMSpKQTn/5ok60bbzX6mPAlaeuuW8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery v1.1.0/go.mod h1:woN5JsidpzBh+hOMpof6vqutskFi/WtbT4ESGLx2wSo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4 v4.2.0 h1:GOtQKZTIc4/HnWIEqGqtkMHLXIlwa4GpT8BB5JGH+tc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4 v4.2.0/go.mod h1:o1BW30aoyqKYcQKAMNWs0UAkT30Z2FZzmCNo7hrGHjM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2 v2.4.0 h1:1/IElew5rgk1/rYC3Cftd/c3xRsZS1mil7IMNQ0E1Dk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2 v2.4.0/go.mod h1:4gac/7LcHn+eBJVG/uOtieALAej7WZc3IpzVRqmlovk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts v1.0.0 h1:qd/BfXBy0s/cPn/hVVX+Ps0HolpC1NsHE2p+L2zB4C4= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts v1.0.0/go.mod h1:P1SgXux7JvaLh0fwpYwtY2csL+RYAc033mNha1Txlm8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2 v2.1.0 h1:7ecO0WTi0f+PkUxx+aiVV47fWlEvnWK5U/ugVIkA2AI= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2 v2.1.0/go.mod h1:Z/L21GxAYPs0rxPumw2mwazreYusXZhTwJGtEy0PB9A= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 h1:Dd+RhdJn0OTtVGaeDLZpcumkIVCtA/3/Fo42+eoYvVM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0/go.mod h1:5kakwfW5CjC9KK+Q4wjXAg+ShuIm2mBMua0ZFj2C8PE= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.4 h1:kvo62he+mkbJPRJ3ob0vZlPUjiy1bbb09orYJ9fXrRM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.4/go.mod h1:twxqOHxCu1TZQAcOlLvIxQJAQ1UCzh+0I4ilL4inTAg= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql v1.2.0 h1:S087deZ0kP1RUg4pU7w9U9xpUedTCbOtz+mnd0+hrkQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql v1.2.0/go.mod h1:B4cEyXrWBmbfMDAPnpJ1di7MAt5DKP57jPEObAvZChg= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.7.0 h1:D3pGIZLYN7MnksIkMkeRylz13YPetz6/H8rc5S9Vllg= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.7.0/go.mod h1:kJn8QL2DCyKnbDFMdi4SZiK0OOetns2eeKv+cJql0Yw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache v1.0.0 h1:3UQFOxKO93+20/+4mZweaGTbICtgQDRchk946N6/mvI= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache v1.0.0/go.mod h1:3n9xGw4M5LJpJLV62q8elF/XpfC/f4CY0SudWJuQOIQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover v1.1.1 h1:g84ADqlA7DmSuRHvK+Z11eSHrG5JP6Bw1/4x5q8uzDw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover v1.1.1/go.mod h1:G28Xmw989oBiAbSFc1+6eeOSi0qZjB32oD1SLA8KNr4= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.0 h1:LR0kAX9ykz8G4YgLCaRDVJ3+n43R8MneB5dTy2konZo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.0/go.mod h1:DWAciXemNf++PQJLeXUB4HHH5OpsAh12HZnu2wXE1jA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4 v4.0.0 h1:VP2jFfEJ71Nb57ETkCBvaRsnkfpVctfj+p6v0DANPbA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4 v4.0.0/go.mod h1:Aw86Pv0a+F+o9tE87WfhRb7v1wJlhZV1lrzmmCD3CL0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2 v2.2.0 h1:H/KANoPNCIumP6y47CQ8vD1Oz2iem/V+frLhbiNixO8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2 v2.2.0/go.mod h1:KtVe1NaTiHWR9OqlZz3oSs6rFwYVzm7hTAE5DJtjCWk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.2.0 h1:MK3nxxYFtJBW1JLl721V6bVvU3WzAGWVQF49eT7qPDo= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.2.0/go.mod h1:rDzquvMnukruAUAPk0UEcKyTvmFUMqYQcO+IrdHNu5Q= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics v1.2.0 h1:8ehl8bxzEJYOaYZkND13b0j+wuTrkkYo3n4jztCMTuc= @@ -160,7 +158,6 @@ github.com/go-git/go-git/v5 v5.13.2 h1:7O7xvsK7K+rZPKW6AQR1YyNhfywkv7B8/FsP3ki6Z github.com/go-git/go-git/v5 v5.13.2/go.mod h1:hWdW5P4YZRjmpGHwRH2v3zkWcNl6HeXaXQEMGb3NJ9A= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= @@ -236,8 +233,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/magodo/armid v0.0.0-20240524082432-7ce06ae46c33 h1:KmQ16pNsI7DaELU+CbqZKXVdvkE/YXqMH6LLkp6rw/Y= github.com/magodo/armid v0.0.0-20240524082432-7ce06ae46c33/go.mod h1:rR8E7zfGMbmfnSQvrkFiWYdhrfTqsVSltelnZB09BwA= -github.com/magodo/aztft v0.3.1-0.20250331004505-d5aff7c777d4 h1:HMjk/IdemjnBDKdvwdmpq9Vnf+lDCqj0Sa0ffaoPoaI= -github.com/magodo/aztft v0.3.1-0.20250331004505-d5aff7c777d4/go.mod h1:ANoe0gR4AvpwHh3vR99Zg7zTzFynW/ZaD7CJSah9xZ0= +github.com/magodo/aztft v0.3.1-0.20250512012628-bf61e7a7a744 h1:LsQKSxpO3a5iVfihiP5cfGG6KtcayamiyajLJXcTI1U= +github.com/magodo/aztft v0.3.1-0.20250512012628-bf61e7a7a744/go.mod h1:t83k9NbdobHHhjtz6MFetOSRqiKfaNfbBpowxZyzYtw= github.com/magodo/tfadd v0.10.1-0.20240902124619-bd18a56f410d h1:dmS4jSfNIfshWkh43yK4n1Qx0BsaKrfxMiqRg0fKKYw= github.com/magodo/tfadd v0.10.1-0.20240902124619-bd18a56f410d/go.mod h1:G2Hc13YaLGHa+CPEP/HZzj9sIGyKDM5ZXInzQ8Dp86s= github.com/magodo/tfpluginschema v0.0.0-20240902090353-0525d7d8c1c2 h1:Unxx8WLxzSxINnq7hItp4cXD7drihgfPltTd91efoBo= @@ -316,8 +313,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= @@ -325,13 +322,13 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -345,8 +342,8 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -354,8 +351,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md index bd9667d9..926ed388 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 1.18.0 (2025-04-03) + +### Features Added + +* Added `AccessToken.RefreshOn` and updated `BearerTokenPolicy` to consider nonzero values of it when deciding whether to request a new token + + ## 1.17.1 (2025-03-20) ### Other Changes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go index f2b296b6..46017003 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go @@ -47,8 +47,13 @@ func HasStatusCode(resp *http.Response, statusCodes ...int) bool { // AccessToken represents an Azure service bearer access token with expiry information. // Exported as azcore.AccessToken. type AccessToken struct { - Token string + // Token is the access token + Token string + // ExpiresOn indicates when the token expires ExpiresOn time.Time + // RefreshOn is a suggested time to refresh the token. + // Clients should ignore this value when it's zero. + RefreshOn time.Time } // TokenRequestOptions contain specific parameter that may be used by credentials types when attempting to get a token. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go index c8929e59..85514db3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go @@ -40,5 +40,5 @@ const ( Module = "azcore" // Version is the semantic version (see http://semver.org) of this module. - Version = "v1.17.1" + Version = "v1.18.0" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go index b26db920..1950a2e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_bearer_token.go @@ -51,6 +51,15 @@ func acquire(state acquiringResourceState) (newResource exported.AccessToken, ne return tk, tk.ExpiresOn, nil } +// shouldRefresh determines whether the token should be refreshed. It's a variable so tests can replace it. +var shouldRefresh = func(tk exported.AccessToken, _ acquiringResourceState) bool { + if tk.RefreshOn.IsZero() { + return tk.ExpiresOn.Add(-5 * time.Minute).Before(time.Now()) + } + // no offset in this case because the authority suggested a refresh window--between RefreshOn and ExpiresOn + return tk.RefreshOn.Before(time.Now()) +} + // NewBearerTokenPolicy creates a policy object that authorizes requests with bearer tokens. // cred: an azcore.TokenCredential implementation such as a credential object from azidentity // scopes: the list of permission scopes required for the token. @@ -69,11 +78,14 @@ func NewBearerTokenPolicy(cred exported.TokenCredential, scopes []string, opts * return authNZ(policy.TokenRequestOptions{Scopes: scopes}) } } + mr := temporal.NewResourceWithOptions(acquire, temporal.ResourceOptions[exported.AccessToken, acquiringResourceState]{ + ShouldRefresh: shouldRefresh, + }) return &BearerTokenPolicy{ authzHandler: ah, cred: cred, scopes: scopes, - mainResource: temporal.NewResource(acquire), + mainResource: mr, allowHTTP: opts.InsecureAllowCredentialWithHTTP, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/CHANGELOG.md deleted file mode 100644 index d2139ad7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/CHANGELOG.md +++ /dev/null @@ -1,20 +0,0 @@ -# Release History - -## 1.1.1 (2023-04-14) -### Bug Fixes - -- Fix serialization bug of empty value of `any` type. - -## 1.1.0 (2023-03-27) -### Features Added - -- New struct `ClientFactory` which is a client factory used to create any client in this module - - -## 1.0.0 (2022-05-17) - -The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. - -To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). - -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/README.md deleted file mode 100644 index 752954e7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/README.md +++ /dev/null @@ -1,101 +0,0 @@ -# Azure API Management Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement) - -The `armapimanagement` module provides operations for working with Azure API Management. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/apimanagement/armapimanagement) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure API Management module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure API Management. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Client Factory - -Azure API Management module consists of one or more clients. We provide a client factory which could be used to create any client in this module. - -```go -clientFactory, err := armapimanagement.NewClientFactory(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -clientFactory, err := armapimanagement.NewClientFactory(, cred, &options) -``` - -## Clients - -A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. - -```go -client := clientFactory.NewServiceClient() -``` - -## More sample code - -- [API Management Service](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apimanagement_service) -- [API Operation](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apioperation) -- [API Operation Policy](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apioperationpolicy) -- [API Policy](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apipolicy) -- [API Release](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apirelease) -- [API Schema](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apischema) -- [API Tag Description](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apitagdescription) -- [API Version Set](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apiversionset) -- [Deleted Service](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/deleted_service) -- [Logger](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/logger) -- [Sign In Setting](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/signin_setting) -- [Sign up Setting](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/signup_setting) -- [User](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/user) - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `API Management` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/api_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/api_client.go deleted file mode 100644 index e085c278..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/api_client.go +++ /dev/null @@ -1,547 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// APIClient contains the methods for the API group. -// Don't use this type directly, use NewAPIClient() instead. -type APIClient struct { - internal *arm.Client - subscriptionID string -} - -// NewAPIClient creates a new instance of APIClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewAPIClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIClient, error) { - cl, err := arm.NewClient(moduleName+".APIClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &APIClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates new or updates existing specified API of the API Management service instance. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has -// ;rev=n as a suffix where n is the revision number. -// - parameters - Create or update parameters. -// - options - APIClientBeginCreateOrUpdateOptions contains the optional parameters for the APIClient.BeginCreateOrUpdate method. -func (client *APIClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters APICreateOrUpdateParameter, options *APIClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apiID, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[APIClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Creates new or updates existing specified API of the API Management service instance. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *APIClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters APICreateOrUpdateParameter, options *APIClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *APIClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters APICreateOrUpdateParameter, options *APIClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiID == "" { - return nil, errors.New("parameter apiID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - if options != nil && options.IfMatch != nil { - req.Raw().Header["If-Match"] = []string{*options.IfMatch} - } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// Delete - Deletes the specified API of the API Management service instance. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has -// ;rev=n as a suffix where n is the revision number. -// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or -// it should be * for unconditional update. -// - options - APIClientDeleteOptions contains the optional parameters for the APIClient.Delete method. -func (client *APIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, options *APIClientDeleteOptions) (APIClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, ifMatch, options) - if err != nil { - return APIClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APIClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return APIClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *APIClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, options *APIClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiID == "" { - return nil, errors.New("parameter apiID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.DeleteRevisions != nil { - reqQP.Set("deleteRevisions", strconv.FormatBool(*options.DeleteRevisions)) - } - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the details of the API specified by its identifier. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has -// ;rev=n as a suffix where n is the revision number. -// - options - APIClientGetOptions contains the optional parameters for the APIClient.Get method. -func (client *APIClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIClientGetOptions) (APIClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - if err != nil { - return APIClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *APIClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiID == "" { - return nil, errors.New("parameter apiID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *APIClient) getHandleResponse(resp *http.Response) (APIClientGetResponse, error) { - result := APIClientGetResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.APIContract); err != nil { - return APIClientGetResponse{}, err - } - return result, nil -} - -// GetEntityTag - Gets the entity state (Etag) version of the API specified by its identifier. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has -// ;rev=n as a suffix where n is the revision number. -// - options - APIClientGetEntityTagOptions contains the optional parameters for the APIClient.GetEntityTag method. -func (client *APIClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIClientGetEntityTagOptions) (APIClientGetEntityTagResponse, error) { - req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - if err != nil { - return APIClientGetEntityTagResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIClientGetEntityTagResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIClientGetEntityTagResponse{}, runtime.NewResponseError(resp) - } - return client.getEntityTagHandleResponse(resp) -} - -// getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APIClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIClientGetEntityTagOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiID == "" { - return nil, errors.New("parameter apiID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getEntityTagHandleResponse handles the GetEntityTag response. -func (client *APIClient) getEntityTagHandleResponse(resp *http.Response) (APIClientGetEntityTagResponse, error) { - result := APIClientGetEntityTagResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 - return result, nil -} - -// NewListByServicePager - Lists all APIs of the API Management service instance. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - APIClientListByServiceOptions contains the optional parameters for the APIClient.NewListByServicePager method. -func (client *APIClient) NewListByServicePager(resourceGroupName string, serviceName string, options *APIClientListByServiceOptions) *runtime.Pager[APIClientListByServiceResponse] { - return runtime.NewPager(runtime.PagingHandler[APIClientListByServiceResponse]{ - More: func(page APIClientListByServiceResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *APIClientListByServiceResponse) (APIClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIClientListByServiceResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIClientListByServiceResponse{}, runtime.NewResponseError(resp) - } - return client.listByServiceHandleResponse(resp) - }, - }) -} - -// listByServiceCreateRequest creates the ListByService request. -func (client *APIClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *APIClientListByServiceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.Skip != nil { - reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) - } - if options != nil && options.Tags != nil { - reqQP.Set("tags", *options.Tags) - } - if options != nil && options.ExpandAPIVersionSet != nil { - reqQP.Set("expandApiVersionSet", strconv.FormatBool(*options.ExpandAPIVersionSet)) - } - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByServiceHandleResponse handles the ListByService response. -func (client *APIClient) listByServiceHandleResponse(resp *http.Response) (APIClientListByServiceResponse, error) { - result := APIClientListByServiceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APICollection); err != nil { - return APIClientListByServiceResponse{}, err - } - return result, nil -} - -// NewListByTagsPager - Lists a collection of apis associated with tags. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - APIClientListByTagsOptions contains the optional parameters for the APIClient.NewListByTagsPager method. -func (client *APIClient) NewListByTagsPager(resourceGroupName string, serviceName string, options *APIClientListByTagsOptions) *runtime.Pager[APIClientListByTagsResponse] { - return runtime.NewPager(runtime.PagingHandler[APIClientListByTagsResponse]{ - More: func(page APIClientListByTagsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *APIClientListByTagsResponse) (APIClientListByTagsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByTagsCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIClientListByTagsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIClientListByTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIClientListByTagsResponse{}, runtime.NewResponseError(resp) - } - return client.listByTagsHandleResponse(resp) - }, - }) -} - -// listByTagsCreateRequest creates the ListByTags request. -func (client *APIClient) listByTagsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *APIClientListByTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.Skip != nil { - reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) - } - if options != nil && options.IncludeNotTaggedApis != nil { - reqQP.Set("includeNotTaggedApis", strconv.FormatBool(*options.IncludeNotTaggedApis)) - } - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByTagsHandleResponse handles the ListByTags response. -func (client *APIClient) listByTagsHandleResponse(resp *http.Response) (APIClientListByTagsResponse, error) { - result := APIClientListByTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TagResourceCollection); err != nil { - return APIClientListByTagsResponse{}, err - } - return result, nil -} - -// Update - Updates the specified API of the API Management service instance. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has -// ;rev=n as a suffix where n is the revision number. -// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or -// it should be * for unconditional update. -// - parameters - API Update Contract parameters. -// - options - APIClientUpdateOptions contains the optional parameters for the APIClient.Update method. -func (client *APIClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, parameters APIUpdateContract, options *APIClientUpdateOptions) (APIClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, apiID, ifMatch, parameters, options) - if err != nil { - return APIClientUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return APIClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *APIClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, parameters APIUpdateContract, options *APIClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiID == "" { - return nil, errors.New("parameter apiID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateHandleResponse handles the Update response. -func (client *APIClient) updateHandleResponse(resp *http.Response) (APIClientUpdateResponse, error) { - result := APIClientUpdateResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.APIContract); err != nil { - return APIClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/assets.json deleted file mode 100644 index 9880a9a9..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "go", - "TagPrefix": "go/resourcemanager/apimanagement/armapimanagement", - "Tag": "go/resourcemanager/apimanagement/armapimanagement_93736791af" -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/autorest.md deleted file mode 100644 index 86050977..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/autorest.md +++ /dev/null @@ -1,12 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/apimanagement/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/apimanagement/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/ci.yml deleted file mode 100644 index da6e2de7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/apimanagement/armapimanagement/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/apimanagement/armapimanagement/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/apimanagement/armapimanagement' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/client.go deleted file mode 100644 index 52f289bf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/client.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// Client contains the methods for the APIManagementClient group. -// Don't use this type directly, use NewClient() instead. -type Client struct { - internal *arm.Client - subscriptionID string -} - -// NewClient creates a new instance of Client with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { - cl, err := arm.NewClient(moduleName+".Client", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &Client{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginPerformConnectivityCheckAsync - Performs a connectivity check between the API Management service and a given destination, -// and returns metrics for the connection, as well as errors encountered while trying to establish it. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - connectivityCheckRequestParams - Connectivity Check request parameters. -// - options - ClientBeginPerformConnectivityCheckAsyncOptions contains the optional parameters for the Client.BeginPerformConnectivityCheckAsync -// method. -func (client *Client) BeginPerformConnectivityCheckAsync(ctx context.Context, resourceGroupName string, serviceName string, connectivityCheckRequestParams ConnectivityCheckRequest, options *ClientBeginPerformConnectivityCheckAsyncOptions) (*runtime.Poller[ClientPerformConnectivityCheckAsyncResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.performConnectivityCheckAsync(ctx, resourceGroupName, serviceName, connectivityCheckRequestParams, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientPerformConnectivityCheckAsyncResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ClientPerformConnectivityCheckAsyncResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// PerformConnectivityCheckAsync - Performs a connectivity check between the API Management service and a given destination, -// and returns metrics for the connection, as well as errors encountered while trying to establish it. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *Client) performConnectivityCheckAsync(ctx context.Context, resourceGroupName string, serviceName string, connectivityCheckRequestParams ConnectivityCheckRequest, options *ClientBeginPerformConnectivityCheckAsyncOptions) (*http.Response, error) { - req, err := client.performConnectivityCheckAsyncCreateRequest(ctx, resourceGroupName, serviceName, connectivityCheckRequestParams, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// performConnectivityCheckAsyncCreateRequest creates the PerformConnectivityCheckAsync request. -func (client *Client) performConnectivityCheckAsyncCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, connectivityCheckRequestParams ConnectivityCheckRequest, options *ClientBeginPerformConnectivityCheckAsyncOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectivityCheckRequestParams) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/client_factory.go deleted file mode 100644 index b3570c57..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/client_factory.go +++ /dev/null @@ -1,420 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" -) - -// ClientFactory is a client factory used to create any client in this module. -// Don't use this type directly, use NewClientFactory instead. -type ClientFactory struct { - subscriptionID string - credential azcore.TokenCredential - options *arm.ClientOptions -} - -// NewClientFactory creates a new instance of ClientFactory with the specified values. -// The parameter values will be propagated to any client created from this factory. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) - if err != nil { - return nil, err - } - return &ClientFactory{ - subscriptionID: subscriptionID, credential: credential, - options: options.Clone(), - }, nil -} - -func (c *ClientFactory) NewAPIClient() *APIClient { - subClient, _ := NewAPIClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIRevisionClient() *APIRevisionClient { - subClient, _ := NewAPIRevisionClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIReleaseClient() *APIReleaseClient { - subClient, _ := NewAPIReleaseClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIOperationClient() *APIOperationClient { - subClient, _ := NewAPIOperationClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIOperationPolicyClient() *APIOperationPolicyClient { - subClient, _ := NewAPIOperationPolicyClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewTagClient() *TagClient { - subClient, _ := NewTagClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIProductClient() *APIProductClient { - subClient, _ := NewAPIProductClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIPolicyClient() *APIPolicyClient { - subClient, _ := NewAPIPolicyClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPISchemaClient() *APISchemaClient { - subClient, _ := NewAPISchemaClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIDiagnosticClient() *APIDiagnosticClient { - subClient, _ := NewAPIDiagnosticClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIIssueClient() *APIIssueClient { - subClient, _ := NewAPIIssueClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIIssueCommentClient() *APIIssueCommentClient { - subClient, _ := NewAPIIssueCommentClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIIssueAttachmentClient() *APIIssueAttachmentClient { - subClient, _ := NewAPIIssueAttachmentClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPITagDescriptionClient() *APITagDescriptionClient { - subClient, _ := NewAPITagDescriptionClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOperationClient() *OperationClient { - subClient, _ := NewOperationClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIExportClient() *APIExportClient { - subClient, _ := NewAPIExportClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAPIVersionSetClient() *APIVersionSetClient { - subClient, _ := NewAPIVersionSetClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAuthorizationServerClient() *AuthorizationServerClient { - subClient, _ := NewAuthorizationServerClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewBackendClient() *BackendClient { - subClient, _ := NewBackendClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewCacheClient() *CacheClient { - subClient, _ := NewCacheClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewCertificateClient() *CertificateClient { - subClient, _ := NewCertificateClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewClient() *Client { - subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewContentTypeClient() *ContentTypeClient { - subClient, _ := NewContentTypeClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewContentItemClient() *ContentItemClient { - subClient, _ := NewContentItemClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewDeletedServicesClient() *DeletedServicesClient { - subClient, _ := NewDeletedServicesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewServiceSKUsClient() *ServiceSKUsClient { - subClient, _ := NewServiceSKUsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewServiceClient() *ServiceClient { - subClient, _ := NewServiceClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewDiagnosticClient() *DiagnosticClient { - subClient, _ := NewDiagnosticClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewEmailTemplateClient() *EmailTemplateClient { - subClient, _ := NewEmailTemplateClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGatewayClient() *GatewayClient { - subClient, _ := NewGatewayClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGatewayHostnameConfigurationClient() *GatewayHostnameConfigurationClient { - subClient, _ := NewGatewayHostnameConfigurationClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGatewayAPIClient() *GatewayAPIClient { - subClient, _ := NewGatewayAPIClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGatewayCertificateAuthorityClient() *GatewayCertificateAuthorityClient { - subClient, _ := NewGatewayCertificateAuthorityClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGroupClient() *GroupClient { - subClient, _ := NewGroupClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGroupUserClient() *GroupUserClient { - subClient, _ := NewGroupUserClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewIdentityProviderClient() *IdentityProviderClient { - subClient, _ := NewIdentityProviderClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewIssueClient() *IssueClient { - subClient, _ := NewIssueClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewLoggerClient() *LoggerClient { - subClient, _ := NewLoggerClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewNamedValueClient() *NamedValueClient { - subClient, _ := NewNamedValueClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewNetworkStatusClient() *NetworkStatusClient { - subClient, _ := NewNetworkStatusClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewNotificationClient() *NotificationClient { - subClient, _ := NewNotificationClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewNotificationRecipientUserClient() *NotificationRecipientUserClient { - subClient, _ := NewNotificationRecipientUserClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewNotificationRecipientEmailClient() *NotificationRecipientEmailClient { - subClient, _ := NewNotificationRecipientEmailClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOpenIDConnectProviderClient() *OpenIDConnectProviderClient { - subClient, _ := NewOpenIDConnectProviderClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOutboundNetworkDependenciesEndpointsClient() *OutboundNetworkDependenciesEndpointsClient { - subClient, _ := NewOutboundNetworkDependenciesEndpointsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPolicyClient() *PolicyClient { - subClient, _ := NewPolicyClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPolicyDescriptionClient() *PolicyDescriptionClient { - subClient, _ := NewPolicyDescriptionClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPortalRevisionClient() *PortalRevisionClient { - subClient, _ := NewPortalRevisionClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPortalSettingsClient() *PortalSettingsClient { - subClient, _ := NewPortalSettingsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewSignInSettingsClient() *SignInSettingsClient { - subClient, _ := NewSignInSettingsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewSignUpSettingsClient() *SignUpSettingsClient { - subClient, _ := NewSignUpSettingsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewDelegationSettingsClient() *DelegationSettingsClient { - subClient, _ := NewDelegationSettingsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPrivateEndpointConnectionClient() *PrivateEndpointConnectionClient { - subClient, _ := NewPrivateEndpointConnectionClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewProductClient() *ProductClient { - subClient, _ := NewProductClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewProductAPIClient() *ProductAPIClient { - subClient, _ := NewProductAPIClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewProductGroupClient() *ProductGroupClient { - subClient, _ := NewProductGroupClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewProductSubscriptionsClient() *ProductSubscriptionsClient { - subClient, _ := NewProductSubscriptionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewProductPolicyClient() *ProductPolicyClient { - subClient, _ := NewProductPolicyClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewQuotaByCounterKeysClient() *QuotaByCounterKeysClient { - subClient, _ := NewQuotaByCounterKeysClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewQuotaByPeriodKeysClient() *QuotaByPeriodKeysClient { - subClient, _ := NewQuotaByPeriodKeysClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewRegionClient() *RegionClient { - subClient, _ := NewRegionClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewReportsClient() *ReportsClient { - subClient, _ := NewReportsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewGlobalSchemaClient() *GlobalSchemaClient { - subClient, _ := NewGlobalSchemaClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewTenantSettingsClient() *TenantSettingsClient { - subClient, _ := NewTenantSettingsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewSKUsClient() *SKUsClient { - subClient, _ := NewSKUsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewSubscriptionClient() *SubscriptionClient { - subClient, _ := NewSubscriptionClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewTagResourceClient() *TagResourceClient { - subClient, _ := NewTagResourceClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewTenantAccessClient() *TenantAccessClient { - subClient, _ := NewTenantAccessClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewTenantAccessGitClient() *TenantAccessGitClient { - subClient, _ := NewTenantAccessGitClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewTenantConfigurationClient() *TenantConfigurationClient { - subClient, _ := NewTenantConfigurationClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewUserClient() *UserClient { - subClient, _ := NewUserClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewUserGroupClient() *UserGroupClient { - subClient, _ := NewUserGroupClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewUserSubscriptionClient() *UserSubscriptionClient { - subClient, _ := NewUserSubscriptionClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewUserIdentitiesClient() *UserIdentitiesClient { - subClient, _ := NewUserIdentitiesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewUserConfirmationPasswordClient() *UserConfirmationPasswordClient { - subClient, _ := NewUserConfirmationPasswordClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/constants.go deleted file mode 100644 index cc723d26..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/constants.go +++ /dev/null @@ -1,1450 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -const ( - moduleName = "armapimanagement" - moduleVersion = "v1.1.1" -) - -// APIManagementSKUCapacityScaleType - The scale type applicable to the sku. -type APIManagementSKUCapacityScaleType string - -const ( - APIManagementSKUCapacityScaleTypeAutomatic APIManagementSKUCapacityScaleType = "Automatic" - APIManagementSKUCapacityScaleTypeManual APIManagementSKUCapacityScaleType = "Manual" - APIManagementSKUCapacityScaleTypeNone APIManagementSKUCapacityScaleType = "None" -) - -// PossibleAPIManagementSKUCapacityScaleTypeValues returns the possible values for the APIManagementSKUCapacityScaleType const type. -func PossibleAPIManagementSKUCapacityScaleTypeValues() []APIManagementSKUCapacityScaleType { - return []APIManagementSKUCapacityScaleType{ - APIManagementSKUCapacityScaleTypeAutomatic, - APIManagementSKUCapacityScaleTypeManual, - APIManagementSKUCapacityScaleTypeNone, - } -} - -// APIManagementSKURestrictionsReasonCode - The reason for restriction. -type APIManagementSKURestrictionsReasonCode string - -const ( - APIManagementSKURestrictionsReasonCodeQuotaID APIManagementSKURestrictionsReasonCode = "QuotaId" - APIManagementSKURestrictionsReasonCodeNotAvailableForSubscription APIManagementSKURestrictionsReasonCode = "NotAvailableForSubscription" -) - -// PossibleAPIManagementSKURestrictionsReasonCodeValues returns the possible values for the APIManagementSKURestrictionsReasonCode const type. -func PossibleAPIManagementSKURestrictionsReasonCodeValues() []APIManagementSKURestrictionsReasonCode { - return []APIManagementSKURestrictionsReasonCode{ - APIManagementSKURestrictionsReasonCodeQuotaID, - APIManagementSKURestrictionsReasonCodeNotAvailableForSubscription, - } -} - -// APIManagementSKURestrictionsType - The type of restrictions. -type APIManagementSKURestrictionsType string - -const ( - APIManagementSKURestrictionsTypeLocation APIManagementSKURestrictionsType = "Location" - APIManagementSKURestrictionsTypeZone APIManagementSKURestrictionsType = "Zone" -) - -// PossibleAPIManagementSKURestrictionsTypeValues returns the possible values for the APIManagementSKURestrictionsType const type. -func PossibleAPIManagementSKURestrictionsTypeValues() []APIManagementSKURestrictionsType { - return []APIManagementSKURestrictionsType{ - APIManagementSKURestrictionsTypeLocation, - APIManagementSKURestrictionsTypeZone, - } -} - -// APIType - Type of API. -type APIType string - -const ( - APITypeGraphql APIType = "graphql" - APITypeHTTP APIType = "http" - APITypeSoap APIType = "soap" - APITypeWebsocket APIType = "websocket" -) - -// PossibleAPITypeValues returns the possible values for the APIType const type. -func PossibleAPITypeValues() []APIType { - return []APIType{ - APITypeGraphql, - APITypeHTTP, - APITypeSoap, - APITypeWebsocket, - } -} - -// APIVersionSetContractDetailsVersioningScheme - An value that determines where the API Version identifier will be located -// in a HTTP request. -type APIVersionSetContractDetailsVersioningScheme string - -const ( - APIVersionSetContractDetailsVersioningSchemeHeader APIVersionSetContractDetailsVersioningScheme = "Header" - APIVersionSetContractDetailsVersioningSchemeQuery APIVersionSetContractDetailsVersioningScheme = "Query" - APIVersionSetContractDetailsVersioningSchemeSegment APIVersionSetContractDetailsVersioningScheme = "Segment" -) - -// PossibleAPIVersionSetContractDetailsVersioningSchemeValues returns the possible values for the APIVersionSetContractDetailsVersioningScheme const type. -func PossibleAPIVersionSetContractDetailsVersioningSchemeValues() []APIVersionSetContractDetailsVersioningScheme { - return []APIVersionSetContractDetailsVersioningScheme{ - APIVersionSetContractDetailsVersioningSchemeHeader, - APIVersionSetContractDetailsVersioningSchemeQuery, - APIVersionSetContractDetailsVersioningSchemeSegment, - } -} - -type AccessIDName string - -const ( - AccessIDNameAccess AccessIDName = "access" - AccessIDNameGitAccess AccessIDName = "gitAccess" -) - -// PossibleAccessIDNameValues returns the possible values for the AccessIDName const type. -func PossibleAccessIDNameValues() []AccessIDName { - return []AccessIDName{ - AccessIDNameAccess, - AccessIDNameGitAccess, - } -} - -// AccessType - The type of access to be used for the storage account. -type AccessType string - -const ( - // AccessTypeAccessKey - Use access key. - AccessTypeAccessKey AccessType = "AccessKey" - // AccessTypeSystemAssignedManagedIdentity - Use system assigned managed identity. - AccessTypeSystemAssignedManagedIdentity AccessType = "SystemAssignedManagedIdentity" - // AccessTypeUserAssignedManagedIdentity - Use user assigned managed identity. - AccessTypeUserAssignedManagedIdentity AccessType = "UserAssignedManagedIdentity" -) - -// PossibleAccessTypeValues returns the possible values for the AccessType const type. -func PossibleAccessTypeValues() []AccessType { - return []AccessType{ - AccessTypeAccessKey, - AccessTypeSystemAssignedManagedIdentity, - AccessTypeUserAssignedManagedIdentity, - } -} - -// AlwaysLog - Specifies for what type of messages sampling settings should not apply. -type AlwaysLog string - -const ( - // AlwaysLogAllErrors - Always log all erroneous request regardless of sampling settings. - AlwaysLogAllErrors AlwaysLog = "allErrors" -) - -// PossibleAlwaysLogValues returns the possible values for the AlwaysLog const type. -func PossibleAlwaysLogValues() []AlwaysLog { - return []AlwaysLog{ - AlwaysLogAllErrors, - } -} - -// ApimIdentityType - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an -// implicitly created identity and a set of user assigned identities. The type 'None' will remove any -// identities from the service. -type ApimIdentityType string - -const ( - ApimIdentityTypeNone ApimIdentityType = "None" - ApimIdentityTypeSystemAssigned ApimIdentityType = "SystemAssigned" - ApimIdentityTypeSystemAssignedUserAssigned ApimIdentityType = "SystemAssigned, UserAssigned" - ApimIdentityTypeUserAssigned ApimIdentityType = "UserAssigned" -) - -// PossibleApimIdentityTypeValues returns the possible values for the ApimIdentityType const type. -func PossibleApimIdentityTypeValues() []ApimIdentityType { - return []ApimIdentityType{ - ApimIdentityTypeNone, - ApimIdentityTypeSystemAssigned, - ApimIdentityTypeSystemAssignedUserAssigned, - ApimIdentityTypeUserAssigned, - } -} - -type AppType string - -const ( - // AppTypeDeveloperPortal - User create request was sent by new developer portal. - AppTypeDeveloperPortal AppType = "developerPortal" - // AppTypePortal - User create request was sent by legacy developer portal. - AppTypePortal AppType = "portal" -) - -// PossibleAppTypeValues returns the possible values for the AppType const type. -func PossibleAppTypeValues() []AppType { - return []AppType{ - AppTypeDeveloperPortal, - AppTypePortal, - } -} - -// AsyncOperationStatus - Status of an async operation. -type AsyncOperationStatus string - -const ( - AsyncOperationStatusStarted AsyncOperationStatus = "Started" - AsyncOperationStatusInProgress AsyncOperationStatus = "InProgress" - AsyncOperationStatusSucceeded AsyncOperationStatus = "Succeeded" - AsyncOperationStatusFailed AsyncOperationStatus = "Failed" -) - -// PossibleAsyncOperationStatusValues returns the possible values for the AsyncOperationStatus const type. -func PossibleAsyncOperationStatusValues() []AsyncOperationStatus { - return []AsyncOperationStatus{ - AsyncOperationStatusStarted, - AsyncOperationStatusInProgress, - AsyncOperationStatusSucceeded, - AsyncOperationStatusFailed, - } -} - -type AuthorizationMethod string - -const ( - AuthorizationMethodHEAD AuthorizationMethod = "HEAD" - AuthorizationMethodOPTIONS AuthorizationMethod = "OPTIONS" - AuthorizationMethodTRACE AuthorizationMethod = "TRACE" - AuthorizationMethodGET AuthorizationMethod = "GET" - AuthorizationMethodPOST AuthorizationMethod = "POST" - AuthorizationMethodPUT AuthorizationMethod = "PUT" - AuthorizationMethodPATCH AuthorizationMethod = "PATCH" - AuthorizationMethodDELETE AuthorizationMethod = "DELETE" -) - -// PossibleAuthorizationMethodValues returns the possible values for the AuthorizationMethod const type. -func PossibleAuthorizationMethodValues() []AuthorizationMethod { - return []AuthorizationMethod{ - AuthorizationMethodHEAD, - AuthorizationMethodOPTIONS, - AuthorizationMethodTRACE, - AuthorizationMethodGET, - AuthorizationMethodPOST, - AuthorizationMethodPUT, - AuthorizationMethodPATCH, - AuthorizationMethodDELETE, - } -} - -// BackendProtocol - Backend communication protocol. -type BackendProtocol string - -const ( - // BackendProtocolHTTP - The Backend is a RESTful service. - BackendProtocolHTTP BackendProtocol = "http" - // BackendProtocolSoap - The Backend is a SOAP service. - BackendProtocolSoap BackendProtocol = "soap" -) - -// PossibleBackendProtocolValues returns the possible values for the BackendProtocol const type. -func PossibleBackendProtocolValues() []BackendProtocol { - return []BackendProtocol{ - BackendProtocolHTTP, - BackendProtocolSoap, - } -} - -type BearerTokenSendingMethod string - -const ( - BearerTokenSendingMethodAuthorizationHeader BearerTokenSendingMethod = "authorizationHeader" - BearerTokenSendingMethodQuery BearerTokenSendingMethod = "query" -) - -// PossibleBearerTokenSendingMethodValues returns the possible values for the BearerTokenSendingMethod const type. -func PossibleBearerTokenSendingMethodValues() []BearerTokenSendingMethod { - return []BearerTokenSendingMethod{ - BearerTokenSendingMethodAuthorizationHeader, - BearerTokenSendingMethodQuery, - } -} - -// BearerTokenSendingMethods - Form of an authorization grant, which the client uses to request the access token. -type BearerTokenSendingMethods string - -const ( - // BearerTokenSendingMethodsAuthorizationHeader - Access token will be transmitted in the Authorization header using Bearer - // schema - BearerTokenSendingMethodsAuthorizationHeader BearerTokenSendingMethods = "authorizationHeader" - // BearerTokenSendingMethodsQuery - Access token will be transmitted as query parameters. - BearerTokenSendingMethodsQuery BearerTokenSendingMethods = "query" -) - -// PossibleBearerTokenSendingMethodsValues returns the possible values for the BearerTokenSendingMethods const type. -func PossibleBearerTokenSendingMethodsValues() []BearerTokenSendingMethods { - return []BearerTokenSendingMethods{ - BearerTokenSendingMethodsAuthorizationHeader, - BearerTokenSendingMethodsQuery, - } -} - -// CertificateConfigurationStoreName - The System.Security.Cryptography.x509certificates.StoreName certificate store location. -// Only Root and CertificateAuthority are valid locations. -type CertificateConfigurationStoreName string - -const ( - CertificateConfigurationStoreNameCertificateAuthority CertificateConfigurationStoreName = "CertificateAuthority" - CertificateConfigurationStoreNameRoot CertificateConfigurationStoreName = "Root" -) - -// PossibleCertificateConfigurationStoreNameValues returns the possible values for the CertificateConfigurationStoreName const type. -func PossibleCertificateConfigurationStoreNameValues() []CertificateConfigurationStoreName { - return []CertificateConfigurationStoreName{ - CertificateConfigurationStoreNameCertificateAuthority, - CertificateConfigurationStoreNameRoot, - } -} - -// CertificateSource - Certificate Source. -type CertificateSource string - -const ( - CertificateSourceBuiltIn CertificateSource = "BuiltIn" - CertificateSourceCustom CertificateSource = "Custom" - CertificateSourceKeyVault CertificateSource = "KeyVault" - CertificateSourceManaged CertificateSource = "Managed" -) - -// PossibleCertificateSourceValues returns the possible values for the CertificateSource const type. -func PossibleCertificateSourceValues() []CertificateSource { - return []CertificateSource{ - CertificateSourceBuiltIn, - CertificateSourceCustom, - CertificateSourceKeyVault, - CertificateSourceManaged, - } -} - -// CertificateStatus - Certificate Status. -type CertificateStatus string - -const ( - CertificateStatusCompleted CertificateStatus = "Completed" - CertificateStatusFailed CertificateStatus = "Failed" - CertificateStatusInProgress CertificateStatus = "InProgress" -) - -// PossibleCertificateStatusValues returns the possible values for the CertificateStatus const type. -func PossibleCertificateStatusValues() []CertificateStatus { - return []CertificateStatus{ - CertificateStatusCompleted, - CertificateStatusFailed, - CertificateStatusInProgress, - } -} - -type ClientAuthenticationMethod string - -const ( - // ClientAuthenticationMethodBasic - Basic Client Authentication method. - ClientAuthenticationMethodBasic ClientAuthenticationMethod = "Basic" - // ClientAuthenticationMethodBody - Body based Authentication method. - ClientAuthenticationMethodBody ClientAuthenticationMethod = "Body" -) - -// PossibleClientAuthenticationMethodValues returns the possible values for the ClientAuthenticationMethod const type. -func PossibleClientAuthenticationMethodValues() []ClientAuthenticationMethod { - return []ClientAuthenticationMethod{ - ClientAuthenticationMethodBasic, - ClientAuthenticationMethodBody, - } -} - -type ConfigurationIDName string - -const ( - ConfigurationIDNameConfiguration ConfigurationIDName = "configuration" -) - -// PossibleConfigurationIDNameValues returns the possible values for the ConfigurationIDName const type. -func PossibleConfigurationIDNameValues() []ConfigurationIDName { - return []ConfigurationIDName{ - ConfigurationIDNameConfiguration, - } -} - -// Confirmation - Determines the type of confirmation e-mail that will be sent to the newly created user. -type Confirmation string - -const ( - // ConfirmationInvite - Send an e-mail inviting the user to sign-up and complete registration. - ConfirmationInvite Confirmation = "invite" - // ConfirmationSignup - Send an e-mail to the user confirming they have successfully signed up. - ConfirmationSignup Confirmation = "signup" -) - -// PossibleConfirmationValues returns the possible values for the Confirmation const type. -func PossibleConfirmationValues() []Confirmation { - return []Confirmation{ - ConfirmationInvite, - ConfirmationSignup, - } -} - -// ConnectionStatus - The connection status. -type ConnectionStatus string - -const ( - ConnectionStatusConnected ConnectionStatus = "Connected" - ConnectionStatusDegraded ConnectionStatus = "Degraded" - ConnectionStatusDisconnected ConnectionStatus = "Disconnected" - ConnectionStatusUnknown ConnectionStatus = "Unknown" -) - -// PossibleConnectionStatusValues returns the possible values for the ConnectionStatus const type. -func PossibleConnectionStatusValues() []ConnectionStatus { - return []ConnectionStatus{ - ConnectionStatusConnected, - ConnectionStatusDegraded, - ConnectionStatusDisconnected, - ConnectionStatusUnknown, - } -} - -// ConnectivityCheckProtocol - The request's protocol. Specific protocol configuration can be available based on this selection. -// The specified destination address must be coherent with this value. -type ConnectivityCheckProtocol string - -const ( - ConnectivityCheckProtocolHTTP ConnectivityCheckProtocol = "HTTP" - ConnectivityCheckProtocolHTTPS ConnectivityCheckProtocol = "HTTPS" - ConnectivityCheckProtocolTCP ConnectivityCheckProtocol = "TCP" -) - -// PossibleConnectivityCheckProtocolValues returns the possible values for the ConnectivityCheckProtocol const type. -func PossibleConnectivityCheckProtocolValues() []ConnectivityCheckProtocol { - return []ConnectivityCheckProtocol{ - ConnectivityCheckProtocolHTTP, - ConnectivityCheckProtocolHTTPS, - ConnectivityCheckProtocolTCP, - } -} - -// ConnectivityStatusType - Resource Connectivity Status Type identifier. -type ConnectivityStatusType string - -const ( - ConnectivityStatusTypeFailure ConnectivityStatusType = "failure" - ConnectivityStatusTypeInitializing ConnectivityStatusType = "initializing" - ConnectivityStatusTypeSuccess ConnectivityStatusType = "success" -) - -// PossibleConnectivityStatusTypeValues returns the possible values for the ConnectivityStatusType const type. -func PossibleConnectivityStatusTypeValues() []ConnectivityStatusType { - return []ConnectivityStatusType{ - ConnectivityStatusTypeFailure, - ConnectivityStatusTypeInitializing, - ConnectivityStatusTypeSuccess, - } -} - -// ContentFormat - Format of the Content in which the API is getting imported. -type ContentFormat string - -const ( - // ContentFormatGraphqlLink - The GraphQL API endpoint hosted on a publicly accessible internet address. - ContentFormatGraphqlLink ContentFormat = "graphql-link" - // ContentFormatOpenapi - The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. - ContentFormatOpenapi ContentFormat = "openapi" - // ContentFormatOpenapiJSON - The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. - ContentFormatOpenapiJSON ContentFormat = "openapi+json" - // ContentFormatOpenapiJSONLink - The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. - ContentFormatOpenapiJSONLink ContentFormat = "openapi+json-link" - // ContentFormatOpenapiLink - The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. - ContentFormatOpenapiLink ContentFormat = "openapi-link" - // ContentFormatSwaggerJSON - The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. - ContentFormatSwaggerJSON ContentFormat = "swagger-json" - // ContentFormatSwaggerLinkJSON - The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. - ContentFormatSwaggerLinkJSON ContentFormat = "swagger-link-json" - // ContentFormatWadlLinkJSON - The WADL document is hosted on a publicly accessible internet address. - ContentFormatWadlLinkJSON ContentFormat = "wadl-link-json" - // ContentFormatWadlXML - The contents are inline and Content type is a WADL document. - ContentFormatWadlXML ContentFormat = "wadl-xml" - // ContentFormatWsdl - The contents are inline and the document is a WSDL/Soap document. - ContentFormatWsdl ContentFormat = "wsdl" - // ContentFormatWsdlLink - The WSDL document is hosted on a publicly accessible internet address. - ContentFormatWsdlLink ContentFormat = "wsdl-link" -) - -// PossibleContentFormatValues returns the possible values for the ContentFormat const type. -func PossibleContentFormatValues() []ContentFormat { - return []ContentFormat{ - ContentFormatGraphqlLink, - ContentFormatOpenapi, - ContentFormatOpenapiJSON, - ContentFormatOpenapiJSONLink, - ContentFormatOpenapiLink, - ContentFormatSwaggerJSON, - ContentFormatSwaggerLinkJSON, - ContentFormatWadlLinkJSON, - ContentFormatWadlXML, - ContentFormatWsdl, - ContentFormatWsdlLink, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// DataMaskingMode - Data masking mode. -type DataMaskingMode string - -const ( - // DataMaskingModeHide - Hide the presence of an entity. - DataMaskingModeHide DataMaskingMode = "Hide" - // DataMaskingModeMask - Mask the value of an entity. - DataMaskingModeMask DataMaskingMode = "Mask" -) - -// PossibleDataMaskingModeValues returns the possible values for the DataMaskingMode const type. -func PossibleDataMaskingModeValues() []DataMaskingMode { - return []DataMaskingMode{ - DataMaskingModeHide, - DataMaskingModeMask, - } -} - -type ExportAPI string - -const ( - ExportAPITrue ExportAPI = "true" -) - -// PossibleExportAPIValues returns the possible values for the ExportAPI const type. -func PossibleExportAPIValues() []ExportAPI { - return []ExportAPI{ - ExportAPITrue, - } -} - -type ExportFormat string - -const ( - // ExportFormatOpenapi - Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. - ExportFormatOpenapi ExportFormat = "openapi-link" - // ExportFormatOpenapiJSON - Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. - ExportFormatOpenapiJSON ExportFormat = "openapi+json-link" - // ExportFormatSwagger - Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. - ExportFormatSwagger ExportFormat = "swagger-link" - // ExportFormatWadl - Export the Api Definition in WADL Schema to Storage Blob. - ExportFormatWadl ExportFormat = "wadl-link" - // ExportFormatWsdl - Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` - ExportFormatWsdl ExportFormat = "wsdl-link" -) - -// PossibleExportFormatValues returns the possible values for the ExportFormat const type. -func PossibleExportFormatValues() []ExportFormat { - return []ExportFormat{ - ExportFormatOpenapi, - ExportFormatOpenapiJSON, - ExportFormatSwagger, - ExportFormatWadl, - ExportFormatWsdl, - } -} - -// ExportResultFormat - Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. -type ExportResultFormat string - -const ( - // ExportResultFormatOpenAPI - Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. - ExportResultFormatOpenAPI ExportResultFormat = "openapi-link" - // ExportResultFormatSwagger - The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. - ExportResultFormatSwagger ExportResultFormat = "swagger-link-json" - // ExportResultFormatWadl - Export the API Definition in WADL Schema to Storage Blob. - ExportResultFormatWadl ExportResultFormat = "wadl-link-json" - // ExportResultFormatWsdl - The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs - // of Type `soap` - ExportResultFormatWsdl ExportResultFormat = "wsdl-link+xml" -) - -// PossibleExportResultFormatValues returns the possible values for the ExportResultFormat const type. -func PossibleExportResultFormatValues() []ExportResultFormat { - return []ExportResultFormat{ - ExportResultFormatOpenAPI, - ExportResultFormatSwagger, - ExportResultFormatWadl, - ExportResultFormatWsdl, - } -} - -type GrantType string - -const ( - // GrantTypeAuthorizationCode - Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1. - GrantTypeAuthorizationCode GrantType = "authorizationCode" - // GrantTypeClientCredentials - Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4. - GrantTypeClientCredentials GrantType = "clientCredentials" - // GrantTypeImplicit - Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2. - GrantTypeImplicit GrantType = "implicit" - // GrantTypeResourceOwnerPassword - Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3. - GrantTypeResourceOwnerPassword GrantType = "resourceOwnerPassword" -) - -// PossibleGrantTypeValues returns the possible values for the GrantType const type. -func PossibleGrantTypeValues() []GrantType { - return []GrantType{ - GrantTypeAuthorizationCode, - GrantTypeClientCredentials, - GrantTypeImplicit, - GrantTypeResourceOwnerPassword, - } -} - -// GroupType - Group type. -type GroupType string - -const ( - GroupTypeCustom GroupType = "custom" - GroupTypeSystem GroupType = "system" - GroupTypeExternal GroupType = "external" -) - -// PossibleGroupTypeValues returns the possible values for the GroupType const type. -func PossibleGroupTypeValues() []GroupType { - return []GroupType{ - GroupTypeCustom, - GroupTypeSystem, - GroupTypeExternal, - } -} - -// HTTPCorrelationProtocol - Sets correlation protocol to use for Application Insights diagnostics. -type HTTPCorrelationProtocol string - -const ( - // HTTPCorrelationProtocolLegacy - Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md. - HTTPCorrelationProtocolLegacy HTTPCorrelationProtocol = "Legacy" - // HTTPCorrelationProtocolNone - Do not read and inject correlation headers. - HTTPCorrelationProtocolNone HTTPCorrelationProtocol = "None" - // HTTPCorrelationProtocolW3C - Inject Trace Context headers. See https://w3c.github.io/trace-context. - HTTPCorrelationProtocolW3C HTTPCorrelationProtocol = "W3C" -) - -// PossibleHTTPCorrelationProtocolValues returns the possible values for the HTTPCorrelationProtocol const type. -func PossibleHTTPCorrelationProtocolValues() []HTTPCorrelationProtocol { - return []HTTPCorrelationProtocol{ - HTTPCorrelationProtocolLegacy, - HTTPCorrelationProtocolNone, - HTTPCorrelationProtocolW3C, - } -} - -// HostnameType - Hostname type. -type HostnameType string - -const ( - HostnameTypeDeveloperPortal HostnameType = "DeveloperPortal" - HostnameTypeManagement HostnameType = "Management" - HostnameTypePortal HostnameType = "Portal" - HostnameTypeProxy HostnameType = "Proxy" - HostnameTypeScm HostnameType = "Scm" -) - -// PossibleHostnameTypeValues returns the possible values for the HostnameType const type. -func PossibleHostnameTypeValues() []HostnameType { - return []HostnameType{ - HostnameTypeDeveloperPortal, - HostnameTypeManagement, - HostnameTypePortal, - HostnameTypeProxy, - HostnameTypeScm, - } -} - -type IdentityProviderType string - -const ( - // IdentityProviderTypeAAD - Azure Active Directory as Identity provider. - IdentityProviderTypeAAD IdentityProviderType = "aad" - // IdentityProviderTypeAADB2C - Azure Active Directory B2C as Identity provider. - IdentityProviderTypeAADB2C IdentityProviderType = "aadB2C" - // IdentityProviderTypeFacebook - Facebook as Identity provider. - IdentityProviderTypeFacebook IdentityProviderType = "facebook" - // IdentityProviderTypeGoogle - Google as Identity provider. - IdentityProviderTypeGoogle IdentityProviderType = "google" - // IdentityProviderTypeMicrosoft - Microsoft Live as Identity provider. - IdentityProviderTypeMicrosoft IdentityProviderType = "microsoft" - // IdentityProviderTypeTwitter - Twitter as Identity provider. - IdentityProviderTypeTwitter IdentityProviderType = "twitter" -) - -// PossibleIdentityProviderTypeValues returns the possible values for the IdentityProviderType const type. -func PossibleIdentityProviderTypeValues() []IdentityProviderType { - return []IdentityProviderType{ - IdentityProviderTypeAAD, - IdentityProviderTypeAADB2C, - IdentityProviderTypeFacebook, - IdentityProviderTypeGoogle, - IdentityProviderTypeMicrosoft, - IdentityProviderTypeTwitter, - } -} - -// IssueType - The type of issue. -type IssueType string - -const ( - IssueTypeAgentStopped IssueType = "AgentStopped" - IssueTypeDNSResolution IssueType = "DnsResolution" - IssueTypeGuestFirewall IssueType = "GuestFirewall" - IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" - IssueTypePlatform IssueType = "Platform" - IssueTypePortThrottled IssueType = "PortThrottled" - IssueTypeSocketBind IssueType = "SocketBind" - IssueTypeUnknown IssueType = "Unknown" - IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" -) - -// PossibleIssueTypeValues returns the possible values for the IssueType const type. -func PossibleIssueTypeValues() []IssueType { - return []IssueType{ - IssueTypeAgentStopped, - IssueTypeDNSResolution, - IssueTypeGuestFirewall, - IssueTypeNetworkSecurityRule, - IssueTypePlatform, - IssueTypePortThrottled, - IssueTypeSocketBind, - IssueTypeUnknown, - IssueTypeUserDefinedRoute, - } -} - -// KeyType - The Key to be used to generate token for user. -type KeyType string - -const ( - KeyTypePrimary KeyType = "primary" - KeyTypeSecondary KeyType = "secondary" -) - -// PossibleKeyTypeValues returns the possible values for the KeyType const type. -func PossibleKeyTypeValues() []KeyType { - return []KeyType{ - KeyTypePrimary, - KeyTypeSecondary, - } -} - -// LoggerType - Logger type. -type LoggerType string - -const ( - // LoggerTypeApplicationInsights - Azure Application Insights as log destination. - LoggerTypeApplicationInsights LoggerType = "applicationInsights" - // LoggerTypeAzureEventHub - Azure Event Hub as log destination. - LoggerTypeAzureEventHub LoggerType = "azureEventHub" - // LoggerTypeAzureMonitor - Azure Monitor - LoggerTypeAzureMonitor LoggerType = "azureMonitor" -) - -// PossibleLoggerTypeValues returns the possible values for the LoggerType const type. -func PossibleLoggerTypeValues() []LoggerType { - return []LoggerType{ - LoggerTypeApplicationInsights, - LoggerTypeAzureEventHub, - LoggerTypeAzureMonitor, - } -} - -// Method - The HTTP method to be used. -type Method string - -const ( - MethodGET Method = "GET" - MethodPOST Method = "POST" -) - -// PossibleMethodValues returns the possible values for the Method const type. -func PossibleMethodValues() []Method { - return []Method{ - MethodGET, - MethodPOST, - } -} - -// NameAvailabilityReason - Invalid indicates the name provided does not match the resource provider’s naming requirements -// (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use -// and is therefore unavailable. -type NameAvailabilityReason string - -const ( - NameAvailabilityReasonValid NameAvailabilityReason = "Valid" - NameAvailabilityReasonInvalid NameAvailabilityReason = "Invalid" - NameAvailabilityReasonAlreadyExists NameAvailabilityReason = "AlreadyExists" -) - -// PossibleNameAvailabilityReasonValues returns the possible values for the NameAvailabilityReason const type. -func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason { - return []NameAvailabilityReason{ - NameAvailabilityReasonValid, - NameAvailabilityReasonInvalid, - NameAvailabilityReasonAlreadyExists, - } -} - -type NotificationName string - -const ( - // NotificationNameAccountClosedPublisher - The following email recipients and users will receive email notifications when - // developer closes his account. - NotificationNameAccountClosedPublisher NotificationName = "AccountClosedPublisher" - // NotificationNameBCC - The following recipients will receive blind carbon copies of all emails sent to developers. - NotificationNameBCC NotificationName = "BCC" - // NotificationNameNewApplicationNotificationMessage - The following email recipients and users will receive email notifications - // when new applications are submitted to the application gallery. - NotificationNameNewApplicationNotificationMessage NotificationName = "NewApplicationNotificationMessage" - // NotificationNameNewIssuePublisherNotificationMessage - The following email recipients and users will receive email notifications - // when a new issue or comment is submitted on the developer portal. - NotificationNameNewIssuePublisherNotificationMessage NotificationName = "NewIssuePublisherNotificationMessage" - // NotificationNamePurchasePublisherNotificationMessage - The following email recipients and users will receive email notifications - // about new API product subscriptions. - NotificationNamePurchasePublisherNotificationMessage NotificationName = "PurchasePublisherNotificationMessage" - // NotificationNameQuotaLimitApproachingPublisherNotificationMessage - The following email recipients and users will receive - // email notifications when subscription usage gets close to usage quota. - NotificationNameQuotaLimitApproachingPublisherNotificationMessage NotificationName = "QuotaLimitApproachingPublisherNotificationMessage" - // NotificationNameRequestPublisherNotificationMessage - The following email recipients and users will receive email notifications - // about subscription requests for API products requiring approval. - NotificationNameRequestPublisherNotificationMessage NotificationName = "RequestPublisherNotificationMessage" -) - -// PossibleNotificationNameValues returns the possible values for the NotificationName const type. -func PossibleNotificationNameValues() []NotificationName { - return []NotificationName{ - NotificationNameAccountClosedPublisher, - NotificationNameBCC, - NotificationNameNewApplicationNotificationMessage, - NotificationNameNewIssuePublisherNotificationMessage, - NotificationNamePurchasePublisherNotificationMessage, - NotificationNameQuotaLimitApproachingPublisherNotificationMessage, - NotificationNameRequestPublisherNotificationMessage, - } -} - -// OperationNameFormat - The format of the Operation Name for Application Insights telemetries. Default is Name. -type OperationNameFormat string - -const ( - // OperationNameFormatName - API_NAME;rev=API_REVISION - OPERATION_NAME - OperationNameFormatName OperationNameFormat = "Name" - // OperationNameFormatURL - HTTP_VERB URL - OperationNameFormatURL OperationNameFormat = "Url" -) - -// PossibleOperationNameFormatValues returns the possible values for the OperationNameFormat const type. -func PossibleOperationNameFormatValues() []OperationNameFormat { - return []OperationNameFormat{ - OperationNameFormatName, - OperationNameFormatURL, - } -} - -// Origin - The origin of the issue. -type Origin string - -const ( - OriginInbound Origin = "Inbound" - OriginLocal Origin = "Local" - OriginOutbound Origin = "Outbound" -) - -// PossibleOriginValues returns the possible values for the Origin const type. -func PossibleOriginValues() []Origin { - return []Origin{ - OriginInbound, - OriginLocal, - OriginOutbound, - } -} - -// PlatformVersion - Compute Platform Version running the service. -type PlatformVersion string - -const ( - // PlatformVersionMtv1 - Platform running the service on Multi Tenant V1 platform. - PlatformVersionMtv1 PlatformVersion = "mtv1" - // PlatformVersionStv1 - Platform running the service on Single Tenant V1 platform. - PlatformVersionStv1 PlatformVersion = "stv1" - // PlatformVersionStv2 - Platform running the service on Single Tenant V2 platform. - PlatformVersionStv2 PlatformVersion = "stv2" - // PlatformVersionUndetermined - Platform version cannot be determined, as compute platform is not deployed. - PlatformVersionUndetermined PlatformVersion = "undetermined" -) - -// PossiblePlatformVersionValues returns the possible values for the PlatformVersion const type. -func PossiblePlatformVersionValues() []PlatformVersion { - return []PlatformVersion{ - PlatformVersionMtv1, - PlatformVersionStv1, - PlatformVersionStv2, - PlatformVersionUndetermined, - } -} - -// PolicyContentFormat - Format of the policyContent. -type PolicyContentFormat string - -const ( - // PolicyContentFormatRawxml - The contents are inline and Content type is a non XML encoded policy document. - PolicyContentFormatRawxml PolicyContentFormat = "rawxml" - // PolicyContentFormatRawxmlLink - The policy document is not Xml encoded and is hosted on a http endpoint accessible from - // the API Management service. - PolicyContentFormatRawxmlLink PolicyContentFormat = "rawxml-link" - // PolicyContentFormatXML - The contents are inline and Content type is an XML document. - PolicyContentFormatXML PolicyContentFormat = "xml" - // PolicyContentFormatXMLLink - The policy XML document is hosted on a http endpoint accessible from the API Management service. - PolicyContentFormatXMLLink PolicyContentFormat = "xml-link" -) - -// PossiblePolicyContentFormatValues returns the possible values for the PolicyContentFormat const type. -func PossiblePolicyContentFormatValues() []PolicyContentFormat { - return []PolicyContentFormat{ - PolicyContentFormatRawxml, - PolicyContentFormatRawxmlLink, - PolicyContentFormatXML, - PolicyContentFormatXMLLink, - } -} - -type PolicyExportFormat string - -const ( - // PolicyExportFormatRawxml - The contents are inline and Content type is a non XML encoded policy document. - PolicyExportFormatRawxml PolicyExportFormat = "rawxml" - // PolicyExportFormatXML - The contents are inline and Content type is an XML document. - PolicyExportFormatXML PolicyExportFormat = "xml" -) - -// PossiblePolicyExportFormatValues returns the possible values for the PolicyExportFormat const type. -func PossiblePolicyExportFormatValues() []PolicyExportFormat { - return []PolicyExportFormat{ - PolicyExportFormatRawxml, - PolicyExportFormatXML, - } -} - -type PolicyIDName string - -const ( - PolicyIDNamePolicy PolicyIDName = "policy" -) - -// PossiblePolicyIDNameValues returns the possible values for the PolicyIDName const type. -func PossiblePolicyIDNameValues() []PolicyIDName { - return []PolicyIDName{ - PolicyIDNamePolicy, - } -} - -type PolicyScopeContract string - -const ( - PolicyScopeContractTenant PolicyScopeContract = "Tenant" - PolicyScopeContractProduct PolicyScopeContract = "Product" - PolicyScopeContractAPI PolicyScopeContract = "Api" - PolicyScopeContractOperation PolicyScopeContract = "Operation" - PolicyScopeContractAll PolicyScopeContract = "All" -) - -// PossiblePolicyScopeContractValues returns the possible values for the PolicyScopeContract const type. -func PossiblePolicyScopeContractValues() []PolicyScopeContract { - return []PolicyScopeContract{ - PolicyScopeContractTenant, - PolicyScopeContractProduct, - PolicyScopeContractAPI, - PolicyScopeContractOperation, - PolicyScopeContractAll, - } -} - -// PortalRevisionStatus - Status of the portal's revision. -type PortalRevisionStatus string - -const ( - // PortalRevisionStatusCompleted - Portal's revision publishing completed. - PortalRevisionStatusCompleted PortalRevisionStatus = "completed" - // PortalRevisionStatusFailed - Portal's revision publishing failed. - PortalRevisionStatusFailed PortalRevisionStatus = "failed" - // PortalRevisionStatusPending - Portal's revision has been queued. - PortalRevisionStatusPending PortalRevisionStatus = "pending" - // PortalRevisionStatusPublishing - Portal's revision is being published. - PortalRevisionStatusPublishing PortalRevisionStatus = "publishing" -) - -// PossiblePortalRevisionStatusValues returns the possible values for the PortalRevisionStatus const type. -func PossiblePortalRevisionStatusValues() []PortalRevisionStatus { - return []PortalRevisionStatus{ - PortalRevisionStatusCompleted, - PortalRevisionStatusFailed, - PortalRevisionStatusPending, - PortalRevisionStatusPublishing, - } -} - -// PreferredIPVersion - The IP version to be used. Only IPv4 is supported for now. -type PreferredIPVersion string - -const ( - PreferredIPVersionIPv4 PreferredIPVersion = "IPv4" -) - -// PossiblePreferredIPVersionValues returns the possible values for the PreferredIPVersion const type. -func PossiblePreferredIPVersionValues() []PreferredIPVersion { - return []PreferredIPVersion{ - PreferredIPVersionIPv4, - } -} - -// PrivateEndpointConnectionProvisioningState - The current provisioning state. -type PrivateEndpointConnectionProvisioningState string - -const ( - PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" - PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" - PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" - PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" -) - -// PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type. -func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { - return []PrivateEndpointConnectionProvisioningState{ - PrivateEndpointConnectionProvisioningStateCreating, - PrivateEndpointConnectionProvisioningStateDeleting, - PrivateEndpointConnectionProvisioningStateFailed, - PrivateEndpointConnectionProvisioningStateSucceeded, - } -} - -// PrivateEndpointServiceConnectionStatus - The private endpoint connection status. -type PrivateEndpointServiceConnectionStatus string - -const ( - PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" - PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" - PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" -) - -// PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type. -func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { - return []PrivateEndpointServiceConnectionStatus{ - PrivateEndpointServiceConnectionStatusApproved, - PrivateEndpointServiceConnectionStatusPending, - PrivateEndpointServiceConnectionStatusRejected, - } -} - -// ProductState - whether product is published or not. Published products are discoverable by users of developer portal. Non -// published products are visible only to administrators. Default state of Product is -// notPublished. -type ProductState string - -const ( - ProductStateNotPublished ProductState = "notPublished" - ProductStatePublished ProductState = "published" -) - -// PossibleProductStateValues returns the possible values for the ProductState const type. -func PossibleProductStateValues() []ProductState { - return []ProductState{ - ProductStateNotPublished, - ProductStatePublished, - } -} - -type Protocol string - -const ( - ProtocolHTTP Protocol = "http" - ProtocolHTTPS Protocol = "https" - ProtocolWs Protocol = "ws" - ProtocolWss Protocol = "wss" -) - -// PossibleProtocolValues returns the possible values for the Protocol const type. -func PossibleProtocolValues() []Protocol { - return []Protocol{ - ProtocolHTTP, - ProtocolHTTPS, - ProtocolWs, - ProtocolWss, - } -} - -// PublicNetworkAccess - Whether or not public endpoint access is allowed for this API Management service. Value is optional -// but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the -// exclusive access method. Default value is 'Enabled' -type PublicNetworkAccess string - -const ( - PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" - PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" -) - -// PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. -func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { - return []PublicNetworkAccess{ - PublicNetworkAccessDisabled, - PublicNetworkAccessEnabled, - } -} - -// ResourceSKUCapacityScaleType - The scale type applicable to the sku. -type ResourceSKUCapacityScaleType string - -const ( - // ResourceSKUCapacityScaleTypeAutomatic - Supported scale type automatic. - ResourceSKUCapacityScaleTypeAutomatic ResourceSKUCapacityScaleType = "automatic" - // ResourceSKUCapacityScaleTypeManual - Supported scale type manual. - ResourceSKUCapacityScaleTypeManual ResourceSKUCapacityScaleType = "manual" - // ResourceSKUCapacityScaleTypeNone - Scaling not supported. - ResourceSKUCapacityScaleTypeNone ResourceSKUCapacityScaleType = "none" -) - -// PossibleResourceSKUCapacityScaleTypeValues returns the possible values for the ResourceSKUCapacityScaleType const type. -func PossibleResourceSKUCapacityScaleTypeValues() []ResourceSKUCapacityScaleType { - return []ResourceSKUCapacityScaleType{ - ResourceSKUCapacityScaleTypeAutomatic, - ResourceSKUCapacityScaleTypeManual, - ResourceSKUCapacityScaleTypeNone, - } -} - -// SKUType - Name of the Sku. -type SKUType string - -const ( - // SKUTypeBasic - Basic SKU of Api Management. - SKUTypeBasic SKUType = "Basic" - // SKUTypeConsumption - Consumption SKU of Api Management. - SKUTypeConsumption SKUType = "Consumption" - // SKUTypeDeveloper - Developer SKU of Api Management. - SKUTypeDeveloper SKUType = "Developer" - // SKUTypeIsolated - Isolated SKU of Api Management. - SKUTypeIsolated SKUType = "Isolated" - // SKUTypePremium - Premium SKU of Api Management. - SKUTypePremium SKUType = "Premium" - // SKUTypeStandard - Standard SKU of Api Management. - SKUTypeStandard SKUType = "Standard" -) - -// PossibleSKUTypeValues returns the possible values for the SKUType const type. -func PossibleSKUTypeValues() []SKUType { - return []SKUType{ - SKUTypeBasic, - SKUTypeConsumption, - SKUTypeDeveloper, - SKUTypeIsolated, - SKUTypePremium, - SKUTypeStandard, - } -} - -// SamplingType - Sampling type. -type SamplingType string - -const ( - // SamplingTypeFixed - Fixed-rate sampling. - SamplingTypeFixed SamplingType = "fixed" -) - -// PossibleSamplingTypeValues returns the possible values for the SamplingType const type. -func PossibleSamplingTypeValues() []SamplingType { - return []SamplingType{ - SamplingTypeFixed, - } -} - -// SchemaType - Schema Type. Immutable. -type SchemaType string - -const ( - // SchemaTypeJSON - Json schema type. - SchemaTypeJSON SchemaType = "json" - // SchemaTypeXML - Xml schema type. - SchemaTypeXML SchemaType = "xml" -) - -// PossibleSchemaTypeValues returns the possible values for the SchemaType const type. -func PossibleSchemaTypeValues() []SchemaType { - return []SchemaType{ - SchemaTypeJSON, - SchemaTypeXML, - } -} - -type SettingsTypeName string - -const ( - SettingsTypeNamePublic SettingsTypeName = "public" -) - -// PossibleSettingsTypeNameValues returns the possible values for the SettingsTypeName const type. -func PossibleSettingsTypeNameValues() []SettingsTypeName { - return []SettingsTypeName{ - SettingsTypeNamePublic, - } -} - -// Severity - The severity of the issue. -type Severity string - -const ( - SeverityError Severity = "Error" - SeverityWarning Severity = "Warning" -) - -// PossibleSeverityValues returns the possible values for the Severity const type. -func PossibleSeverityValues() []Severity { - return []Severity{ - SeverityError, - SeverityWarning, - } -} - -// SoapAPIType - Type of API to create. -// * http creates a REST API -// * soap creates a SOAP pass-through API -// * websocket creates websocket API -// * graphql creates GraphQL API. -type SoapAPIType string - -const ( - // SoapAPITypeGraphQL - Imports the API having a GraphQL front end. - SoapAPITypeGraphQL SoapAPIType = "graphql" - // SoapAPITypeSoapPassThrough - Imports the SOAP API having a SOAP front end. - SoapAPITypeSoapPassThrough SoapAPIType = "soap" - // SoapAPITypeSoapToRest - Imports a SOAP API having a RESTful front end. - SoapAPITypeSoapToRest SoapAPIType = "http" - // SoapAPITypeWebSocket - Imports the API having a Websocket front end. - SoapAPITypeWebSocket SoapAPIType = "websocket" -) - -// PossibleSoapAPITypeValues returns the possible values for the SoapAPIType const type. -func PossibleSoapAPITypeValues() []SoapAPIType { - return []SoapAPIType{ - SoapAPITypeGraphQL, - SoapAPITypeSoapPassThrough, - SoapAPITypeSoapToRest, - SoapAPITypeWebSocket, - } -} - -// State - Status of the issue. -type State string - -const ( - // StateClosed - The issue was closed. - StateClosed State = "closed" - // StateOpen - The issue is opened. - StateOpen State = "open" - // StateProposed - The issue is proposed. - StateProposed State = "proposed" - // StateRemoved - The issue was removed. - StateRemoved State = "removed" - // StateResolved - The issue is now resolved. - StateResolved State = "resolved" -) - -// PossibleStateValues returns the possible values for the State const type. -func PossibleStateValues() []State { - return []State{ - StateClosed, - StateOpen, - StateProposed, - StateRemoved, - StateResolved, - } -} - -// SubscriptionState - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription -// is blocked, and the subscriber cannot call any APIs of the product, * submitted – the -// subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription -// request has been denied by an administrator, * cancelled – the -// subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration -// date and was deactivated. -type SubscriptionState string - -const ( - SubscriptionStateSuspended SubscriptionState = "suspended" - SubscriptionStateActive SubscriptionState = "active" - SubscriptionStateExpired SubscriptionState = "expired" - SubscriptionStateSubmitted SubscriptionState = "submitted" - SubscriptionStateRejected SubscriptionState = "rejected" - SubscriptionStateCancelled SubscriptionState = "cancelled" -) - -// PossibleSubscriptionStateValues returns the possible values for the SubscriptionState const type. -func PossibleSubscriptionStateValues() []SubscriptionState { - return []SubscriptionState{ - SubscriptionStateSuspended, - SubscriptionStateActive, - SubscriptionStateExpired, - SubscriptionStateSubmitted, - SubscriptionStateRejected, - SubscriptionStateCancelled, - } -} - -type TemplateName string - -const ( - TemplateNameAccountClosedDeveloper TemplateName = "accountClosedDeveloper" - TemplateNameApplicationApprovedNotificationMessage TemplateName = "applicationApprovedNotificationMessage" - TemplateNameConfirmSignUpIdentityDefault TemplateName = "confirmSignUpIdentityDefault" - TemplateNameEmailChangeIdentityDefault TemplateName = "emailChangeIdentityDefault" - TemplateNameInviteUserNotificationMessage TemplateName = "inviteUserNotificationMessage" - TemplateNameNewCommentNotificationMessage TemplateName = "newCommentNotificationMessage" - TemplateNameNewDeveloperNotificationMessage TemplateName = "newDeveloperNotificationMessage" - TemplateNameNewIssueNotificationMessage TemplateName = "newIssueNotificationMessage" - TemplateNamePasswordResetByAdminNotificationMessage TemplateName = "passwordResetByAdminNotificationMessage" - TemplateNamePasswordResetIdentityDefault TemplateName = "passwordResetIdentityDefault" - TemplateNamePurchaseDeveloperNotificationMessage TemplateName = "purchaseDeveloperNotificationMessage" - TemplateNameQuotaLimitApproachingDeveloperNotificationMessage TemplateName = "quotaLimitApproachingDeveloperNotificationMessage" - TemplateNameRejectDeveloperNotificationMessage TemplateName = "rejectDeveloperNotificationMessage" - TemplateNameRequestDeveloperNotificationMessage TemplateName = "requestDeveloperNotificationMessage" -) - -// PossibleTemplateNameValues returns the possible values for the TemplateName const type. -func PossibleTemplateNameValues() []TemplateName { - return []TemplateName{ - TemplateNameAccountClosedDeveloper, - TemplateNameApplicationApprovedNotificationMessage, - TemplateNameConfirmSignUpIdentityDefault, - TemplateNameEmailChangeIdentityDefault, - TemplateNameInviteUserNotificationMessage, - TemplateNameNewCommentNotificationMessage, - TemplateNameNewDeveloperNotificationMessage, - TemplateNameNewIssueNotificationMessage, - TemplateNamePasswordResetByAdminNotificationMessage, - TemplateNamePasswordResetIdentityDefault, - TemplateNamePurchaseDeveloperNotificationMessage, - TemplateNameQuotaLimitApproachingDeveloperNotificationMessage, - TemplateNameRejectDeveloperNotificationMessage, - TemplateNameRequestDeveloperNotificationMessage, - } -} - -// UserState - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer -// portal or call any APIs of subscribed products. Default state is Active. -type UserState string - -const ( - // UserStateActive - User state is active. - UserStateActive UserState = "active" - // UserStateBlocked - User is blocked. Blocked users cannot authenticate at developer portal or call API. - UserStateBlocked UserState = "blocked" - // UserStateDeleted - User account is closed. All identities and related entities are removed. - UserStateDeleted UserState = "deleted" - // UserStatePending - User account is pending. Requires identity confirmation before it can be made active. - UserStatePending UserState = "pending" -) - -// PossibleUserStateValues returns the possible values for the UserState const type. -func PossibleUserStateValues() []UserState { - return []UserState{ - UserStateActive, - UserStateBlocked, - UserStateDeleted, - UserStatePending, - } -} - -// Verbosity - The verbosity level applied to traces emitted by trace policies. -type Verbosity string - -const ( - // VerbosityError - Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. - VerbosityError Verbosity = "error" - // VerbosityInformation - Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this - // diagnostic instance. - VerbosityInformation Verbosity = "information" - // VerbosityVerbose - All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. - VerbosityVerbose Verbosity = "verbose" -) - -// PossibleVerbosityValues returns the possible values for the Verbosity const type. -func PossibleVerbosityValues() []Verbosity { - return []Verbosity{ - VerbosityError, - VerbosityInformation, - VerbosityVerbose, - } -} - -// VersioningScheme - An value that determines where the API Version identifier will be located in a HTTP request. -type VersioningScheme string - -const ( - // VersioningSchemeHeader - The API Version is passed in a HTTP header. - VersioningSchemeHeader VersioningScheme = "Header" - // VersioningSchemeQuery - The API Version is passed in a query parameter. - VersioningSchemeQuery VersioningScheme = "Query" - // VersioningSchemeSegment - The API Version is passed in a path segment. - VersioningSchemeSegment VersioningScheme = "Segment" -) - -// PossibleVersioningSchemeValues returns the possible values for the VersioningScheme const type. -func PossibleVersioningSchemeValues() []VersioningScheme { - return []VersioningScheme{ - VersioningSchemeHeader, - VersioningSchemeQuery, - VersioningSchemeSegment, - } -} - -// VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means -// the API Management service is not part of any Virtual Network, External means the API Management -// deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management -// deployment is setup inside a Virtual Network having an Intranet Facing Endpoint -// only. -type VirtualNetworkType string - -const ( - // VirtualNetworkTypeExternal - The service is part of Virtual Network and it is accessible from Internet. - VirtualNetworkTypeExternal VirtualNetworkType = "External" - // VirtualNetworkTypeInternal - The service is part of Virtual Network and it is only accessible from within the virtual network. - VirtualNetworkTypeInternal VirtualNetworkType = "Internal" - // VirtualNetworkTypeNone - The service is not part of any Virtual Network. - VirtualNetworkTypeNone VirtualNetworkType = "None" -) - -// PossibleVirtualNetworkTypeValues returns the possible values for the VirtualNetworkType const type. -func PossibleVirtualNetworkTypeValues() []VirtualNetworkType { - return []VirtualNetworkType{ - VirtualNetworkTypeExternal, - VirtualNetworkTypeInternal, - VirtualNetworkTypeNone, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gateway_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gateway_client.go deleted file mode 100644 index 090a071f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gateway_client.go +++ /dev/null @@ -1,633 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// GatewayClient contains the methods for the Gateway group. -// Don't use this type directly, use NewGatewayClient() instead. -type GatewayClient struct { - internal *arm.Client - subscriptionID string -} - -// NewGatewayClient creates a new instance of GatewayClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewGatewayClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayClient, error) { - cl, err := arm.NewClient(moduleName+".GatewayClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &GatewayClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a Gateway to be used in Api Management instance. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value -// 'managed' -// - options - GatewayClientCreateOrUpdateOptions contains the optional parameters for the GatewayClient.CreateOrUpdate method. -func (client *GatewayClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayContract, options *GatewayClientCreateOrUpdateOptions) (GatewayClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, parameters, options) - if err != nil { - return GatewayClientCreateOrUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return GatewayClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *GatewayClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayContract, options *GatewayClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayID == "" { - return nil, errors.New("parameter gatewayID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - if options != nil && options.IfMatch != nil { - req.Raw().Header["If-Match"] = []string{*options.IfMatch} - } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *GatewayClient) createOrUpdateHandleResponse(resp *http.Response) (GatewayClientCreateOrUpdateResponse, error) { - result := GatewayClientCreateOrUpdateResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayContract); err != nil { - return GatewayClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes specific Gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value -// 'managed' -// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or -// it should be * for unconditional update. -// - options - GatewayClientDeleteOptions contains the optional parameters for the GatewayClient.Delete method. -func (client *GatewayClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, options *GatewayClientDeleteOptions) (GatewayClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, ifMatch, options) - if err != nil { - return GatewayClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return GatewayClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return GatewayClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *GatewayClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, options *GatewayClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayID == "" { - return nil, errors.New("parameter gatewayID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GenerateToken - Gets the Shared Access Authorization Token for the gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value -// 'managed' -// - options - GatewayClientGenerateTokenOptions contains the optional parameters for the GatewayClient.GenerateToken method. -func (client *GatewayClient) GenerateToken(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayTokenRequestContract, options *GatewayClientGenerateTokenOptions) (GatewayClientGenerateTokenResponse, error) { - req, err := client.generateTokenCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, parameters, options) - if err != nil { - return GatewayClientGenerateTokenResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayClientGenerateTokenResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayClientGenerateTokenResponse{}, runtime.NewResponseError(resp) - } - return client.generateTokenHandleResponse(resp) -} - -// generateTokenCreateRequest creates the GenerateToken request. -func (client *GatewayClient) generateTokenCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayTokenRequestContract, options *GatewayClientGenerateTokenOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayID == "" { - return nil, errors.New("parameter gatewayID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// generateTokenHandleResponse handles the GenerateToken response. -func (client *GatewayClient) generateTokenHandleResponse(resp *http.Response) (GatewayClientGenerateTokenResponse, error) { - result := GatewayClientGenerateTokenResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayTokenContract); err != nil { - return GatewayClientGenerateTokenResponse{}, err - } - return result, nil -} - -// Get - Gets the details of the Gateway specified by its identifier. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value -// 'managed' -// - options - GatewayClientGetOptions contains the optional parameters for the GatewayClient.Get method. -func (client *GatewayClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientGetOptions) (GatewayClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) - if err != nil { - return GatewayClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *GatewayClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayID == "" { - return nil, errors.New("parameter gatewayID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *GatewayClient) getHandleResponse(resp *http.Response) (GatewayClientGetResponse, error) { - result := GatewayClientGetResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayContract); err != nil { - return GatewayClientGetResponse{}, err - } - return result, nil -} - -// GetEntityTag - Gets the entity state (Etag) version of the Gateway specified by its identifier. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value -// 'managed' -// - options - GatewayClientGetEntityTagOptions contains the optional parameters for the GatewayClient.GetEntityTag method. -func (client *GatewayClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientGetEntityTagOptions) (GatewayClientGetEntityTagResponse, error) { - req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) - if err != nil { - return GatewayClientGetEntityTagResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayClientGetEntityTagResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayClientGetEntityTagResponse{}, runtime.NewResponseError(resp) - } - return client.getEntityTagHandleResponse(resp) -} - -// getEntityTagCreateRequest creates the GetEntityTag request. -func (client *GatewayClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientGetEntityTagOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayID == "" { - return nil, errors.New("parameter gatewayID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getEntityTagHandleResponse handles the GetEntityTag response. -func (client *GatewayClient) getEntityTagHandleResponse(resp *http.Response) (GatewayClientGetEntityTagResponse, error) { - result := GatewayClientGetEntityTagResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 - return result, nil -} - -// NewListByServicePager - Lists a collection of gateways registered with service instance. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - GatewayClientListByServiceOptions contains the optional parameters for the GatewayClient.NewListByServicePager -// method. -func (client *GatewayClient) NewListByServicePager(resourceGroupName string, serviceName string, options *GatewayClientListByServiceOptions) *runtime.Pager[GatewayClientListByServiceResponse] { - return runtime.NewPager(runtime.PagingHandler[GatewayClientListByServiceResponse]{ - More: func(page GatewayClientListByServiceResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *GatewayClientListByServiceResponse) (GatewayClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GatewayClientListByServiceResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayClientListByServiceResponse{}, runtime.NewResponseError(resp) - } - return client.listByServiceHandleResponse(resp) - }, - }) -} - -// listByServiceCreateRequest creates the ListByService request. -func (client *GatewayClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *GatewayClientListByServiceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.Skip != nil { - reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) - } - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByServiceHandleResponse handles the ListByService response. -func (client *GatewayClient) listByServiceHandleResponse(resp *http.Response) (GatewayClientListByServiceResponse, error) { - result := GatewayClientListByServiceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayCollection); err != nil { - return GatewayClientListByServiceResponse{}, err - } - return result, nil -} - -// ListKeys - Retrieves gateway keys. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value -// 'managed' -// - options - GatewayClientListKeysOptions contains the optional parameters for the GatewayClient.ListKeys method. -func (client *GatewayClient) ListKeys(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientListKeysOptions) (GatewayClientListKeysResponse, error) { - req, err := client.listKeysCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) - if err != nil { - return GatewayClientListKeysResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayClientListKeysResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayClientListKeysResponse{}, runtime.NewResponseError(resp) - } - return client.listKeysHandleResponse(resp) -} - -// listKeysCreateRequest creates the ListKeys request. -func (client *GatewayClient) listKeysCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientListKeysOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayID == "" { - return nil, errors.New("parameter gatewayID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listKeysHandleResponse handles the ListKeys response. -func (client *GatewayClient) listKeysHandleResponse(resp *http.Response) (GatewayClientListKeysResponse, error) { - result := GatewayClientListKeysResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayKeysContract); err != nil { - return GatewayClientListKeysResponse{}, err - } - return result, nil -} - -// RegenerateKey - Regenerates specified gateway key invalidating any tokens created with it. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value -// 'managed' -// - options - GatewayClientRegenerateKeyOptions contains the optional parameters for the GatewayClient.RegenerateKey method. -func (client *GatewayClient) RegenerateKey(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayKeyRegenerationRequestContract, options *GatewayClientRegenerateKeyOptions) (GatewayClientRegenerateKeyResponse, error) { - req, err := client.regenerateKeyCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, parameters, options) - if err != nil { - return GatewayClientRegenerateKeyResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayClientRegenerateKeyResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return GatewayClientRegenerateKeyResponse{}, runtime.NewResponseError(resp) - } - return GatewayClientRegenerateKeyResponse{}, nil -} - -// regenerateKeyCreateRequest creates the RegenerateKey request. -func (client *GatewayClient) regenerateKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayKeyRegenerationRequestContract, options *GatewayClientRegenerateKeyOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayID == "" { - return nil, errors.New("parameter gatewayID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// Update - Updates the details of the gateway specified by its identifier. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value -// 'managed' -// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or -// it should be * for unconditional update. -// - options - GatewayClientUpdateOptions contains the optional parameters for the GatewayClient.Update method. -func (client *GatewayClient) Update(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, parameters GatewayContract, options *GatewayClientUpdateOptions) (GatewayClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, ifMatch, parameters, options) - if err != nil { - return GatewayClientUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return GatewayClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *GatewayClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, parameters GatewayContract, options *GatewayClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayID == "" { - return nil, errors.New("parameter gatewayID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateHandleResponse handles the Update response. -func (client *GatewayClient) updateHandleResponse(resp *http.Response) (GatewayClientUpdateResponse, error) { - result := GatewayClientUpdateResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayContract); err != nil { - return GatewayClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/models.go deleted file mode 100644 index 492def6f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/models.go +++ /dev/null @@ -1,8052 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import "time" - -// APIClientBeginCreateOrUpdateOptions contains the optional parameters for the APIClient.BeginCreateOrUpdate method. -type APIClientBeginCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// APIClientDeleteOptions contains the optional parameters for the APIClient.Delete method. -type APIClientDeleteOptions struct { - // Delete all revisions of the Api. - DeleteRevisions *bool -} - -// APIClientGetEntityTagOptions contains the optional parameters for the APIClient.GetEntityTag method. -type APIClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APIClientGetOptions contains the optional parameters for the APIClient.Get method. -type APIClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIClientListByServiceOptions contains the optional parameters for the APIClient.NewListByServicePager method. -type APIClientListByServiceOptions struct { - // Include full ApiVersionSet resource in response - ExpandAPIVersionSet *bool - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | isCurrent | filter | eq, ne | | - Filter *string - // Number of records to skip. - Skip *int32 - // Include tags in the response. - Tags *string - // Number of records to return. - Top *int32 -} - -// APIClientListByTagsOptions contains the optional parameters for the APIClient.NewListByTagsPager method. -type APIClientListByTagsOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | isCurrent | filter | eq | | - Filter *string - // Include not tagged APIs. - IncludeNotTaggedApis *bool - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APIClientUpdateOptions contains the optional parameters for the APIClient.Update method. -type APIClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// APICollection - Paged API list representation. -type APICollection struct { - // Total record count number across all pages. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Page values. - Value []*APIContract -} - -// APIContactInformation - API contact information -type APIContactInformation struct { - // The email address of the contact person/organization. MUST be in the format of an email address - Email *string - - // The identifying name of the contact person/organization - Name *string - - // The URL pointing to the contact information. MUST be in the format of a URL - URL *string -} - -// APIContract - API details. -type APIContract struct { - // API entity contract properties. - Properties *APIContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// APIContractProperties - API Entity Properties -type APIContractProperties struct { - // REQUIRED; Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. - // It is appended to the API endpoint base URL specified during the service instance - // creation to form a public URL for this API. - Path *string - - // Describes the revision of the API. If no value is provided, default revision 1 is created - APIRevision *string - - // Description of the API Revision. - APIRevisionDescription *string - - // Type of API. - APIType *APIType - - // Indicates the version identifier of the API if the API is versioned - APIVersion *string - - // Description of the API Version. - APIVersionDescription *string - - // Version set details - APIVersionSet *APIVersionSetContractDetails - - // A resource identifier for the related ApiVersionSet. - APIVersionSetID *string - - // Collection of authentication settings included into this API. - AuthenticationSettings *AuthenticationSettingsContract - - // Contact information for the API. - Contact *APIContactInformation - - // Description of the API. May include HTML formatting tags. - Description *string - - // API name. Must be 1 to 300 characters long. - DisplayName *string - - // Indicates if API revision is current api revision. - IsCurrent *bool - - // License information for the API. - License *APILicenseInformation - - // Describes on which protocols the operations in this API can be invoked. - Protocols []*Protocol - - // Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. - ServiceURL *string - - // API identifier of the source API. - SourceAPIID *string - - // Protocols over which API is made available. - SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract - - // Specifies whether an API or Product subscription is required for accessing the API. - SubscriptionRequired *bool - - // A URL to the Terms of Service for the API. MUST be in the format of a URL. - TermsOfServiceURL *string - - // READ-ONLY; Indicates if API revision is accessible via the gateway. - IsOnline *bool -} - -// APIContractUpdateProperties - API update contract properties. -type APIContractUpdateProperties struct { - // Describes the revision of the API. If no value is provided, default revision 1 is created - APIRevision *string - - // Description of the API Revision. - APIRevisionDescription *string - - // Type of API. - APIType *APIType - - // Indicates the version identifier of the API if the API is versioned - APIVersion *string - - // Description of the API Version. - APIVersionDescription *string - - // A resource identifier for the related ApiVersionSet. - APIVersionSetID *string - - // Collection of authentication settings included into this API. - AuthenticationSettings *AuthenticationSettingsContract - - // Contact information for the API. - Contact *APIContactInformation - - // Description of the API. May include HTML formatting tags. - Description *string - - // API name. - DisplayName *string - - // Indicates if API revision is current api revision. - IsCurrent *bool - - // License information for the API. - License *APILicenseInformation - - // Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It - // is appended to the API endpoint base URL specified during the service instance - // creation to form a public URL for this API. - Path *string - - // Describes on which protocols the operations in this API can be invoked. - Protocols []*Protocol - - // Absolute URL of the backend service implementing this API. - ServiceURL *string - - // Protocols over which API is made available. - SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract - - // Specifies whether an API or Product subscription is required for accessing the API. - SubscriptionRequired *bool - - // A URL to the Terms of Service for the API. MUST be in the format of a URL. - TermsOfServiceURL *string - - // READ-ONLY; Indicates if API revision is accessible via the gateway. - IsOnline *bool -} - -// APICreateOrUpdateParameter - API Create or Update Parameters. -type APICreateOrUpdateParameter struct { - // API entity create of update properties. - Properties *APICreateOrUpdateProperties -} - -// APICreateOrUpdateProperties - API Create or Update Properties. -type APICreateOrUpdateProperties struct { - // REQUIRED; Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. - // It is appended to the API endpoint base URL specified during the service instance - // creation to form a public URL for this API. - Path *string - - // Describes the revision of the API. If no value is provided, default revision 1 is created - APIRevision *string - - // Description of the API Revision. - APIRevisionDescription *string - - // Type of API. - APIType *APIType - - // Indicates the version identifier of the API if the API is versioned - APIVersion *string - - // Description of the API Version. - APIVersionDescription *string - - // Version set details - APIVersionSet *APIVersionSetContractDetails - - // A resource identifier for the related ApiVersionSet. - APIVersionSetID *string - - // Collection of authentication settings included into this API. - AuthenticationSettings *AuthenticationSettingsContract - - // Contact information for the API. - Contact *APIContactInformation - - // Description of the API. May include HTML formatting tags. - Description *string - - // API name. Must be 1 to 300 characters long. - DisplayName *string - - // Format of the Content in which the API is getting imported. - Format *ContentFormat - - // Indicates if API revision is current api revision. - IsCurrent *bool - - // License information for the API. - License *APILicenseInformation - - // Describes on which protocols the operations in this API can be invoked. - Protocols []*Protocol - - // Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. - ServiceURL *string - - // Type of API to create. - // * http creates a REST API - // * soap creates a SOAP pass-through API - // * websocket creates websocket API - // * graphql creates GraphQL API. - SoapAPIType *SoapAPIType - - // API identifier of the source API. - SourceAPIID *string - - // Protocols over which API is made available. - SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract - - // Specifies whether an API or Product subscription is required for accessing the API. - SubscriptionRequired *bool - - // A URL to the Terms of Service for the API. MUST be in the format of a URL. - TermsOfServiceURL *string - - // Content value when Importing an API. - Value *string - - // Criteria to limit import of WSDL to a subset of the document. - WsdlSelector *APICreateOrUpdatePropertiesWsdlSelector - - // READ-ONLY; Indicates if API revision is accessible via the gateway. - IsOnline *bool -} - -// APICreateOrUpdatePropertiesWsdlSelector - Criteria to limit import of WSDL to a subset of the document. -type APICreateOrUpdatePropertiesWsdlSelector struct { - // Name of endpoint(port) to import from WSDL - WsdlEndpointName *string - - // Name of service to import from WSDL - WsdlServiceName *string -} - -// APIDiagnosticClientCreateOrUpdateOptions contains the optional parameters for the APIDiagnosticClient.CreateOrUpdate method. -type APIDiagnosticClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// APIDiagnosticClientDeleteOptions contains the optional parameters for the APIDiagnosticClient.Delete method. -type APIDiagnosticClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APIDiagnosticClientGetEntityTagOptions contains the optional parameters for the APIDiagnosticClient.GetEntityTag method. -type APIDiagnosticClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APIDiagnosticClientGetOptions contains the optional parameters for the APIDiagnosticClient.Get method. -type APIDiagnosticClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIDiagnosticClientListByServiceOptions contains the optional parameters for the APIDiagnosticClient.NewListByServicePager -// method. -type APIDiagnosticClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APIDiagnosticClientUpdateOptions contains the optional parameters for the APIDiagnosticClient.Update method. -type APIDiagnosticClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// APIEntityBaseContract - API base contract details. -type APIEntityBaseContract struct { - // Describes the revision of the API. If no value is provided, default revision 1 is created - APIRevision *string - - // Description of the API Revision. - APIRevisionDescription *string - - // Type of API. - APIType *APIType - - // Indicates the version identifier of the API if the API is versioned - APIVersion *string - - // Description of the API Version. - APIVersionDescription *string - - // A resource identifier for the related ApiVersionSet. - APIVersionSetID *string - - // Collection of authentication settings included into this API. - AuthenticationSettings *AuthenticationSettingsContract - - // Contact information for the API. - Contact *APIContactInformation - - // Description of the API. May include HTML formatting tags. - Description *string - - // Indicates if API revision is current api revision. - IsCurrent *bool - - // License information for the API. - License *APILicenseInformation - - // Protocols over which API is made available. - SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract - - // Specifies whether an API or Product subscription is required for accessing the API. - SubscriptionRequired *bool - - // A URL to the Terms of Service for the API. MUST be in the format of a URL. - TermsOfServiceURL *string - - // READ-ONLY; Indicates if API revision is accessible via the gateway. - IsOnline *bool -} - -// APIExportClientGetOptions contains the optional parameters for the APIExportClient.Get method. -type APIExportClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIExportResult - API Export result. -type APIExportResult struct { - // Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. - ExportResultFormat *ExportResultFormat - - // ResourceId of the API which was exported. - ID *string - - // The object defining the schema of the exported API Detail - Value *APIExportResultValue -} - -// APIExportResultValue - The object defining the schema of the exported API Detail -type APIExportResultValue struct { - // Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. - Link *string -} - -// APIIssueAttachmentClientCreateOrUpdateOptions contains the optional parameters for the APIIssueAttachmentClient.CreateOrUpdate -// method. -type APIIssueAttachmentClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// APIIssueAttachmentClientDeleteOptions contains the optional parameters for the APIIssueAttachmentClient.Delete method. -type APIIssueAttachmentClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APIIssueAttachmentClientGetEntityTagOptions contains the optional parameters for the APIIssueAttachmentClient.GetEntityTag -// method. -type APIIssueAttachmentClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APIIssueAttachmentClientGetOptions contains the optional parameters for the APIIssueAttachmentClient.Get method. -type APIIssueAttachmentClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIIssueAttachmentClientListByServiceOptions contains the optional parameters for the APIIssueAttachmentClient.NewListByServicePager -// method. -type APIIssueAttachmentClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APIIssueClientCreateOrUpdateOptions contains the optional parameters for the APIIssueClient.CreateOrUpdate method. -type APIIssueClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// APIIssueClientDeleteOptions contains the optional parameters for the APIIssueClient.Delete method. -type APIIssueClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APIIssueClientGetEntityTagOptions contains the optional parameters for the APIIssueClient.GetEntityTag method. -type APIIssueClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APIIssueClientGetOptions contains the optional parameters for the APIIssueClient.Get method. -type APIIssueClientGetOptions struct { - // Expand the comment attachments. - ExpandCommentsAttachments *bool -} - -// APIIssueClientListByServiceOptions contains the optional parameters for the APIIssueClient.NewListByServicePager method. -type APIIssueClientListByServiceOptions struct { - // Expand the comment attachments. - ExpandCommentsAttachments *bool - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | state | filter | eq | | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APIIssueClientUpdateOptions contains the optional parameters for the APIIssueClient.Update method. -type APIIssueClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// APIIssueCommentClientCreateOrUpdateOptions contains the optional parameters for the APIIssueCommentClient.CreateOrUpdate -// method. -type APIIssueCommentClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// APIIssueCommentClientDeleteOptions contains the optional parameters for the APIIssueCommentClient.Delete method. -type APIIssueCommentClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APIIssueCommentClientGetEntityTagOptions contains the optional parameters for the APIIssueCommentClient.GetEntityTag method. -type APIIssueCommentClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APIIssueCommentClientGetOptions contains the optional parameters for the APIIssueCommentClient.Get method. -type APIIssueCommentClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIIssueCommentClientListByServiceOptions contains the optional parameters for the APIIssueCommentClient.NewListByServicePager -// method. -type APIIssueCommentClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APILicenseInformation - API license information -type APILicenseInformation struct { - // The license name used for the API - Name *string - - // A URL to the license used for the API. MUST be in the format of a URL - URL *string -} - -// APIOperationClientCreateOrUpdateOptions contains the optional parameters for the APIOperationClient.CreateOrUpdate method. -type APIOperationClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// APIOperationClientDeleteOptions contains the optional parameters for the APIOperationClient.Delete method. -type APIOperationClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APIOperationClientGetEntityTagOptions contains the optional parameters for the APIOperationClient.GetEntityTag method. -type APIOperationClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APIOperationClientGetOptions contains the optional parameters for the APIOperationClient.Get method. -type APIOperationClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIOperationClientListByAPIOptions contains the optional parameters for the APIOperationClient.NewListByAPIPager method. -type APIOperationClientListByAPIOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Include tags in the response. - Tags *string - // Number of records to return. - Top *int32 -} - -// APIOperationClientUpdateOptions contains the optional parameters for the APIOperationClient.Update method. -type APIOperationClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// APIOperationPolicyClientCreateOrUpdateOptions contains the optional parameters for the APIOperationPolicyClient.CreateOrUpdate -// method. -type APIOperationPolicyClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// APIOperationPolicyClientDeleteOptions contains the optional parameters for the APIOperationPolicyClient.Delete method. -type APIOperationPolicyClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APIOperationPolicyClientGetEntityTagOptions contains the optional parameters for the APIOperationPolicyClient.GetEntityTag -// method. -type APIOperationPolicyClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APIOperationPolicyClientGetOptions contains the optional parameters for the APIOperationPolicyClient.Get method. -type APIOperationPolicyClientGetOptions struct { - // Policy Export Format. - Format *PolicyExportFormat -} - -// APIOperationPolicyClientListByOperationOptions contains the optional parameters for the APIOperationPolicyClient.ListByOperation -// method. -type APIOperationPolicyClientListByOperationOptions struct { - // placeholder for future optional parameters -} - -// APIPolicyClientCreateOrUpdateOptions contains the optional parameters for the APIPolicyClient.CreateOrUpdate method. -type APIPolicyClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// APIPolicyClientDeleteOptions contains the optional parameters for the APIPolicyClient.Delete method. -type APIPolicyClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APIPolicyClientGetEntityTagOptions contains the optional parameters for the APIPolicyClient.GetEntityTag method. -type APIPolicyClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APIPolicyClientGetOptions contains the optional parameters for the APIPolicyClient.Get method. -type APIPolicyClientGetOptions struct { - // Policy Export Format. - Format *PolicyExportFormat -} - -// APIPolicyClientListByAPIOptions contains the optional parameters for the APIPolicyClient.ListByAPI method. -type APIPolicyClientListByAPIOptions struct { - // placeholder for future optional parameters -} - -// APIProductClientListByApisOptions contains the optional parameters for the APIProductClient.NewListByApisPager method. -type APIProductClientListByApisOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APIReleaseClientCreateOrUpdateOptions contains the optional parameters for the APIReleaseClient.CreateOrUpdate method. -type APIReleaseClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// APIReleaseClientDeleteOptions contains the optional parameters for the APIReleaseClient.Delete method. -type APIReleaseClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APIReleaseClientGetEntityTagOptions contains the optional parameters for the APIReleaseClient.GetEntityTag method. -type APIReleaseClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APIReleaseClientGetOptions contains the optional parameters for the APIReleaseClient.Get method. -type APIReleaseClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIReleaseClientListByServiceOptions contains the optional parameters for the APIReleaseClient.NewListByServicePager method. -type APIReleaseClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APIReleaseClientUpdateOptions contains the optional parameters for the APIReleaseClient.Update method. -type APIReleaseClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// APIReleaseCollection - Paged ApiRelease list representation. -type APIReleaseCollection struct { - // Total record count number across all pages. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Page values. - Value []*APIReleaseContract -} - -// APIReleaseContract - ApiRelease details. -type APIReleaseContract struct { - // ApiRelease entity contract properties. - Properties *APIReleaseContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// APIReleaseContractProperties - API Release details -type APIReleaseContractProperties struct { - // Identifier of the API the release belongs to. - APIID *string - - // Release Notes - Notes *string - - // READ-ONLY; The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified - // by the ISO 8601 standard. - CreatedDateTime *time.Time - - // READ-ONLY; The time the API release was updated. - UpdatedDateTime *time.Time -} - -// APIRevisionClientListByServiceOptions contains the optional parameters for the APIRevisionClient.NewListByServicePager -// method. -type APIRevisionClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APIRevisionCollection - Paged API Revision list representation. -type APIRevisionCollection struct { - // Total record count number across all pages. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Page values. - Value []*APIRevisionContract -} - -// APIRevisionContract - Summary of revision metadata. -type APIRevisionContract struct { - // READ-ONLY; Identifier of the API Revision. - APIID *string - - // READ-ONLY; Revision number of API. - APIRevision *string - - // READ-ONLY; The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified - // by the ISO 8601 standard. - CreatedDateTime *time.Time - - // READ-ONLY; Description of the API Revision. - Description *string - - // READ-ONLY; Indicates if API revision is accessible via the gateway. - IsCurrent *bool - - // READ-ONLY; Indicates if API revision is the current api revision. - IsOnline *bool - - // READ-ONLY; Gateway URL for accessing the non-current API Revision. - PrivateURL *string - - // READ-ONLY; The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified - // by the ISO 8601 standard. - UpdatedDateTime *time.Time -} - -// APIRevisionInfoContract - Object used to create an API Revision or Version based on an existing API Revision -type APIRevisionInfoContract struct { - // Description of new API Revision. - APIRevisionDescription *string - - // Version identifier for the new API Version. - APIVersionName *string - - // Version set details - APIVersionSet *APIVersionSetContractDetails - - // Resource identifier of API to be used to create the revision from. - SourceAPIID *string -} - -// APISchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the APISchemaClient.BeginCreateOrUpdate -// method. -type APISchemaClientBeginCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// APISchemaClientDeleteOptions contains the optional parameters for the APISchemaClient.Delete method. -type APISchemaClientDeleteOptions struct { - // If true removes all references to the schema before deleting it. - Force *bool -} - -// APISchemaClientGetEntityTagOptions contains the optional parameters for the APISchemaClient.GetEntityTag method. -type APISchemaClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APISchemaClientGetOptions contains the optional parameters for the APISchemaClient.Get method. -type APISchemaClientGetOptions struct { - // placeholder for future optional parameters -} - -// APISchemaClientListByAPIOptions contains the optional parameters for the APISchemaClient.NewListByAPIPager method. -type APISchemaClientListByAPIOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APITagDescriptionClientCreateOrUpdateOptions contains the optional parameters for the APITagDescriptionClient.CreateOrUpdate -// method. -type APITagDescriptionClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// APITagDescriptionClientDeleteOptions contains the optional parameters for the APITagDescriptionClient.Delete method. -type APITagDescriptionClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APITagDescriptionClientGetEntityTagOptions contains the optional parameters for the APITagDescriptionClient.GetEntityTag -// method. -type APITagDescriptionClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APITagDescriptionClientGetOptions contains the optional parameters for the APITagDescriptionClient.Get method. -type APITagDescriptionClientGetOptions struct { - // placeholder for future optional parameters -} - -// APITagDescriptionClientListByServiceOptions contains the optional parameters for the APITagDescriptionClient.NewListByServicePager -// method. -type APITagDescriptionClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APITagResourceContractProperties - API contract properties for the Tag Resources. -type APITagResourceContractProperties struct { - // Describes the revision of the API. If no value is provided, default revision 1 is created - APIRevision *string - - // Description of the API Revision. - APIRevisionDescription *string - - // Type of API. - APIType *APIType - - // Indicates the version identifier of the API if the API is versioned - APIVersion *string - - // Description of the API Version. - APIVersionDescription *string - - // A resource identifier for the related ApiVersionSet. - APIVersionSetID *string - - // Collection of authentication settings included into this API. - AuthenticationSettings *AuthenticationSettingsContract - - // Contact information for the API. - Contact *APIContactInformation - - // Description of the API. May include HTML formatting tags. - Description *string - - // API identifier in the form /apis/{apiId}. - ID *string - - // Indicates if API revision is current api revision. - IsCurrent *bool - - // License information for the API. - License *APILicenseInformation - - // API name. - Name *string - - // Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It - // is appended to the API endpoint base URL specified during the service instance - // creation to form a public URL for this API. - Path *string - - // Describes on which protocols the operations in this API can be invoked. - Protocols []*Protocol - - // Absolute URL of the backend service implementing this API. - ServiceURL *string - - // Protocols over which API is made available. - SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract - - // Specifies whether an API or Product subscription is required for accessing the API. - SubscriptionRequired *bool - - // A URL to the Terms of Service for the API. MUST be in the format of a URL. - TermsOfServiceURL *string - - // READ-ONLY; Indicates if API revision is accessible via the gateway. - IsOnline *bool -} - -// APIUpdateContract - API update contract details. -type APIUpdateContract struct { - // Properties of the API entity that can be updated. - Properties *APIContractUpdateProperties -} - -// APIVersionConstraint - Control Plane Apis version constraint for the API Management service. -type APIVersionConstraint struct { - // Limit control plane API calls to API Management service with version equal to or newer than this value. - MinAPIVersion *string -} - -// APIVersionSetClientCreateOrUpdateOptions contains the optional parameters for the APIVersionSetClient.CreateOrUpdate method. -type APIVersionSetClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// APIVersionSetClientDeleteOptions contains the optional parameters for the APIVersionSetClient.Delete method. -type APIVersionSetClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// APIVersionSetClientGetEntityTagOptions contains the optional parameters for the APIVersionSetClient.GetEntityTag method. -type APIVersionSetClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// APIVersionSetClientGetOptions contains the optional parameters for the APIVersionSetClient.Get method. -type APIVersionSetClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIVersionSetClientListByServiceOptions contains the optional parameters for the APIVersionSetClient.NewListByServicePager -// method. -type APIVersionSetClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// APIVersionSetClientUpdateOptions contains the optional parameters for the APIVersionSetClient.Update method. -type APIVersionSetClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// APIVersionSetCollection - Paged API Version Set list representation. -type APIVersionSetCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*APIVersionSetContract -} - -// APIVersionSetContract - API Version Set Contract details. -type APIVersionSetContract struct { - // API VersionSet contract properties. - Properties *APIVersionSetContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// APIVersionSetContractDetails - An API Version Set contains the common configuration for a set of API Versions relating -type APIVersionSetContractDetails struct { - // Description of API Version Set. - Description *string - - // Identifier for existing API Version Set. Omit this value to create a new Version Set. - ID *string - - // The display Name of the API Version Set. - Name *string - - // Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header. - VersionHeaderName *string - - // Name of query parameter that indicates the API Version if versioningScheme is set to query. - VersionQueryName *string - - // An value that determines where the API Version identifier will be located in a HTTP request. - VersioningScheme *APIVersionSetContractDetailsVersioningScheme -} - -// APIVersionSetContractProperties - Properties of an API Version Set. -type APIVersionSetContractProperties struct { - // REQUIRED; Name of API Version Set - DisplayName *string - - // REQUIRED; An value that determines where the API Version identifier will be located in a HTTP request. - VersioningScheme *VersioningScheme - - // Description of API Version Set. - Description *string - - // Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header. - VersionHeaderName *string - - // Name of query parameter that indicates the API Version if versioningScheme is set to query. - VersionQueryName *string -} - -// APIVersionSetEntityBase - API Version set base parameters -type APIVersionSetEntityBase struct { - // Description of API Version Set. - Description *string - - // Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header. - VersionHeaderName *string - - // Name of query parameter that indicates the API Version if versioningScheme is set to query. - VersionQueryName *string -} - -// APIVersionSetUpdateParameters - Parameters to update or create an API Version Set Contract. -type APIVersionSetUpdateParameters struct { - // Parameters to update or create an API Version Set Contract. - Properties *APIVersionSetUpdateParametersProperties -} - -// APIVersionSetUpdateParametersProperties - Properties used to create or update an API Version Set. -type APIVersionSetUpdateParametersProperties struct { - // Description of API Version Set. - Description *string - - // Name of API Version Set - DisplayName *string - - // Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header. - VersionHeaderName *string - - // Name of query parameter that indicates the API Version if versioningScheme is set to query. - VersionQueryName *string - - // An value that determines where the API Version identifier will be located in a HTTP request. - VersioningScheme *VersioningScheme -} - -// AccessInformationCollection - Paged AccessInformation list representation. -type AccessInformationCollection struct { - // Total record count number across all pages. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Page values. - Value []*AccessInformationContract -} - -// AccessInformationContract - Tenant Settings. -type AccessInformationContract struct { - // AccessInformation entity contract properties. - Properties *AccessInformationContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// AccessInformationContractProperties - Tenant access information contract of the API Management service. -type AccessInformationContractProperties struct { - // Determines whether direct access is enabled. - Enabled *bool - - // Access Information type ('access' or 'gitAccess') - ID *string - - // Principal (User) Identifier. - PrincipalID *string -} - -// AccessInformationCreateParameterProperties - Tenant access information update parameters of the API Management service -type AccessInformationCreateParameterProperties struct { - // Determines whether direct access is enabled. - Enabled *bool - - // Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. - PrimaryKey *string - - // Principal (User) Identifier. - PrincipalID *string - - // Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the - // value. - SecondaryKey *string -} - -// AccessInformationCreateParameters - Tenant access information update parameters. -type AccessInformationCreateParameters struct { - // Tenant access information update parameter properties. - Properties *AccessInformationCreateParameterProperties -} - -// AccessInformationSecretsContract - Tenant access information contract of the API Management service. -type AccessInformationSecretsContract struct { - // Determines whether direct access is enabled. - Enabled *bool - - // Access Information type ('access' or 'gitAccess') - ID *string - - // Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. - PrimaryKey *string - - // Principal (User) Identifier. - PrincipalID *string - - // Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the - // value. - SecondaryKey *string -} - -// AccessInformationUpdateParameterProperties - Tenant access information update parameters of the API Management service -type AccessInformationUpdateParameterProperties struct { - // Determines whether direct access is enabled. - Enabled *bool -} - -// AccessInformationUpdateParameters - Tenant access information update parameters. -type AccessInformationUpdateParameters struct { - // Tenant access information update parameter properties. - Properties *AccessInformationUpdateParameterProperties -} - -// AdditionalLocation - Description of an additional API Management resource location. -type AdditionalLocation struct { - // REQUIRED; The location name of the additional region among Azure Data center regions. - Location *string - - // REQUIRED; SKU properties of the API Management service. - SKU *ServiceSKUProperties - - // Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway - // in this additional location. - DisableGateway *bool - - // Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported - // only for Premium SKU being deployed in Virtual Network. - PublicIPAddressID *string - - // Virtual network configuration for the location. - VirtualNetworkConfiguration *VirtualNetworkConfiguration - - // A list of availability zones denoting where the resource needs to come from. - Zones []*string - - // READ-ONLY; Gateway URL of the API Management service in the Region. - GatewayRegionalURL *string - - // READ-ONLY; Compute Platform Version running the service. - PlatformVersion *PlatformVersion - - // READ-ONLY; Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual - // Network in a particular additional location. Available only for Basic, Standard, - // Premium and Isolated SKU. - PrivateIPAddresses []*string - - // READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in the additional location. Available - // only for Basic, Standard, Premium and Isolated SKU. - PublicIPAddresses []*string -} - -// ApimResource - The Resource definition. -type ApimResource struct { - // Resource tags. - Tags map[string]*string - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement. - Type *string -} - -// ArmIDWrapper - A wrapper for an ARM resource id -type ArmIDWrapper struct { - // READ-ONLY - ID *string -} - -// AssociationContract - Association entity details. -type AssociationContract struct { - // Association entity contract properties. - Properties *AssociationContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// AssociationContractProperties - Association entity contract properties. -type AssociationContractProperties struct { - // Provisioning state. - ProvisioningState *string -} - -// AuthenticationSettingsContract - API Authentication Settings. -type AuthenticationSettingsContract struct { - // OAuth2 Authentication settings - OAuth2 *OAuth2AuthenticationSettingsContract - - // OpenID Connect Authentication Settings - Openid *OpenIDAuthenticationSettingsContract -} - -// AuthorizationServerClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationServerClient.CreateOrUpdate -// method. -type AuthorizationServerClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// AuthorizationServerClientDeleteOptions contains the optional parameters for the AuthorizationServerClient.Delete method. -type AuthorizationServerClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AuthorizationServerClientGetEntityTagOptions contains the optional parameters for the AuthorizationServerClient.GetEntityTag -// method. -type AuthorizationServerClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// AuthorizationServerClientGetOptions contains the optional parameters for the AuthorizationServerClient.Get method. -type AuthorizationServerClientGetOptions struct { - // placeholder for future optional parameters -} - -// AuthorizationServerClientListByServiceOptions contains the optional parameters for the AuthorizationServerClient.NewListByServicePager -// method. -type AuthorizationServerClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// AuthorizationServerClientListSecretsOptions contains the optional parameters for the AuthorizationServerClient.ListSecrets -// method. -type AuthorizationServerClientListSecretsOptions struct { - // placeholder for future optional parameters -} - -// AuthorizationServerClientUpdateOptions contains the optional parameters for the AuthorizationServerClient.Update method. -type AuthorizationServerClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// AuthorizationServerCollection - Paged OAuth2 Authorization Servers list representation. -type AuthorizationServerCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*AuthorizationServerContract -} - -// AuthorizationServerContract - External OAuth authorization server settings. -type AuthorizationServerContract struct { - // Properties of the External OAuth authorization server Contract. - Properties *AuthorizationServerContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// AuthorizationServerContractBaseProperties - External OAuth authorization server Update settings contract. -type AuthorizationServerContractBaseProperties struct { - // HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. - AuthorizationMethods []*AuthorizationMethod - - // Specifies the mechanism by which access token is passed to the API. - BearerTokenSendingMethods []*BearerTokenSendingMethod - - // Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or - // Body. When Body is specified, client credentials and other parameters are passed - // within the request body in the application/x-www-form-urlencoded format. - ClientAuthenticationMethod []*ClientAuthenticationMethod - - // Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in - // the form of a string containing space-delimited values. - DefaultScope *string - - // Description of the authorization server. Can contain HTML formatting tags. - Description *string - - // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default - // resource owner password. - ResourceOwnerPassword *string - - // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default - // resource owner username. - ResourceOwnerUsername *string - - // If true, authorization server will include state parameter from the authorization request to its response. Client may use - // state parameter to raise protocol security. - SupportState *bool - - // Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects - // with name and value string properties, i.e. {"name" : "name value", "value": - // "a value"}. - TokenBodyParameters []*TokenBodyParameterContract - - // OAuth token endpoint. Contains absolute URI to entity being referenced. - TokenEndpoint *string -} - -// AuthorizationServerContractProperties - External OAuth authorization server settings Properties. -type AuthorizationServerContractProperties struct { - // REQUIRED; OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. - AuthorizationEndpoint *string - - // REQUIRED; Client or app id registered with this authorization server. - ClientID *string - - // REQUIRED; Optional reference to a page where client or app registration for this authorization server is performed. Contains - // absolute URL to entity being referenced. - ClientRegistrationEndpoint *string - - // REQUIRED; User-friendly authorization server name. - DisplayName *string - - // REQUIRED; Form of an authorization grant, which the client uses to request the access token. - GrantTypes []*GrantType - - // HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. - AuthorizationMethods []*AuthorizationMethod - - // Specifies the mechanism by which access token is passed to the API. - BearerTokenSendingMethods []*BearerTokenSendingMethod - - // Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or - // Body. When Body is specified, client credentials and other parameters are passed - // within the request body in the application/x-www-form-urlencoded format. - ClientAuthenticationMethod []*ClientAuthenticationMethod - - // Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use - // '/listSecrets' POST request to get the value. - ClientSecret *string - - // Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in - // the form of a string containing space-delimited values. - DefaultScope *string - - // Description of the authorization server. Can contain HTML formatting tags. - Description *string - - // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default - // resource owner password. - ResourceOwnerPassword *string - - // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default - // resource owner username. - ResourceOwnerUsername *string - - // If true, authorization server will include state parameter from the authorization request to its response. Client may use - // state parameter to raise protocol security. - SupportState *bool - - // Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects - // with name and value string properties, i.e. {"name" : "name value", "value": - // "a value"}. - TokenBodyParameters []*TokenBodyParameterContract - - // OAuth token endpoint. Contains absolute URI to entity being referenced. - TokenEndpoint *string -} - -// AuthorizationServerSecretsContract - OAuth Server Secrets Contract. -type AuthorizationServerSecretsContract struct { - // oAuth Authorization Server Secrets. - ClientSecret *string - - // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default - // resource owner password. - ResourceOwnerPassword *string - - // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default - // resource owner username. - ResourceOwnerUsername *string -} - -// AuthorizationServerUpdateContract - External OAuth authorization server settings. -type AuthorizationServerUpdateContract struct { - // Properties of the External OAuth authorization server update Contract. - Properties *AuthorizationServerUpdateContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// AuthorizationServerUpdateContractProperties - External OAuth authorization server Update settings contract. -type AuthorizationServerUpdateContractProperties struct { - // OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. - AuthorizationEndpoint *string - - // HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. - AuthorizationMethods []*AuthorizationMethod - - // Specifies the mechanism by which access token is passed to the API. - BearerTokenSendingMethods []*BearerTokenSendingMethod - - // Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or - // Body. When Body is specified, client credentials and other parameters are passed - // within the request body in the application/x-www-form-urlencoded format. - ClientAuthenticationMethod []*ClientAuthenticationMethod - - // Client or app id registered with this authorization server. - ClientID *string - - // Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute - // URL to entity being referenced. - ClientRegistrationEndpoint *string - - // Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use - // '/listSecrets' POST request to get the value. - ClientSecret *string - - // Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in - // the form of a string containing space-delimited values. - DefaultScope *string - - // Description of the authorization server. Can contain HTML formatting tags. - Description *string - - // User-friendly authorization server name. - DisplayName *string - - // Form of an authorization grant, which the client uses to request the access token. - GrantTypes []*GrantType - - // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default - // resource owner password. - ResourceOwnerPassword *string - - // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default - // resource owner username. - ResourceOwnerUsername *string - - // If true, authorization server will include state parameter from the authorization request to its response. Client may use - // state parameter to raise protocol security. - SupportState *bool - - // Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects - // with name and value string properties, i.e. {"name" : "name value", "value": - // "a value"}. - TokenBodyParameters []*TokenBodyParameterContract - - // OAuth token endpoint. Contains absolute URI to entity being referenced. - TokenEndpoint *string -} - -// BackendAuthorizationHeaderCredentials - Authorization header information. -type BackendAuthorizationHeaderCredentials struct { - // REQUIRED; Authentication Parameter value. - Parameter *string - - // REQUIRED; Authentication Scheme name. - Scheme *string -} - -// BackendBaseParameters - Backend entity base Parameter set. -type BackendBaseParameters struct { - // Backend Credentials Contract Properties - Credentials *BackendCredentialsContract - - // Backend Description. - Description *string - - // Backend Properties contract - Properties *BackendProperties - - // Backend Proxy Contract Properties - Proxy *BackendProxyContract - - // Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or - // API Apps. - ResourceID *string - - // Backend TLS Properties - TLS *BackendTLSProperties - - // Backend Title. - Title *string -} - -// BackendClientCreateOrUpdateOptions contains the optional parameters for the BackendClient.CreateOrUpdate method. -type BackendClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// BackendClientDeleteOptions contains the optional parameters for the BackendClient.Delete method. -type BackendClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BackendClientGetEntityTagOptions contains the optional parameters for the BackendClient.GetEntityTag method. -type BackendClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// BackendClientGetOptions contains the optional parameters for the BackendClient.Get method. -type BackendClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackendClientListByServiceOptions contains the optional parameters for the BackendClient.NewListByServicePager method. -type BackendClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// BackendClientReconnectOptions contains the optional parameters for the BackendClient.Reconnect method. -type BackendClientReconnectOptions struct { - // Reconnect request parameters. - Parameters *BackendReconnectContract -} - -// BackendClientUpdateOptions contains the optional parameters for the BackendClient.Update method. -type BackendClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// BackendCollection - Paged Backend list representation. -type BackendCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Backend values. - Value []*BackendContract -} - -// BackendContract - Backend details. -type BackendContract struct { - // Backend entity contract properties. - Properties *BackendContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// BackendContractProperties - Parameters supplied to the Create Backend operation. -type BackendContractProperties struct { - // REQUIRED; Backend communication protocol. - Protocol *BackendProtocol - - // REQUIRED; Runtime Url of the Backend. - URL *string - - // Backend Credentials Contract Properties - Credentials *BackendCredentialsContract - - // Backend Description. - Description *string - - // Backend Properties contract - Properties *BackendProperties - - // Backend Proxy Contract Properties - Proxy *BackendProxyContract - - // Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or - // API Apps. - ResourceID *string - - // Backend TLS Properties - TLS *BackendTLSProperties - - // Backend Title. - Title *string -} - -// BackendCredentialsContract - Details of the Credentials used to connect to Backend. -type BackendCredentialsContract struct { - // Authorization header authentication - Authorization *BackendAuthorizationHeaderCredentials - - // List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. - Certificate []*string - - // List of Client Certificate Ids. - CertificateIDs []*string - - // Header Parameter description. - Header map[string][]*string - - // Query Parameter description. - Query map[string][]*string -} - -// BackendProperties - Properties specific to the Backend Type. -type BackendProperties struct { - // Backend Service Fabric Cluster Properties - ServiceFabricCluster *BackendServiceFabricClusterProperties -} - -// BackendProxyContract - Details of the Backend WebProxy Server to use in the Request to Backend. -type BackendProxyContract struct { - // REQUIRED; WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all - // fragments and query strings. - URL *string - - // Password to connect to the WebProxy Server - Password *string - - // Username to connect to the WebProxy server - Username *string -} - -// BackendReconnectContract - Reconnect request parameters. -type BackendReconnectContract struct { - // Reconnect request properties. - Properties *BackendReconnectProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// BackendReconnectProperties - Properties to control reconnect requests. -type BackendReconnectProperties struct { - // Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. - After *string -} - -// BackendServiceFabricClusterProperties - Properties of the Service Fabric Type Backend. -type BackendServiceFabricClusterProperties struct { - // REQUIRED; The cluster management endpoint. - ManagementEndpoints []*string - - // The client certificate id for the management endpoint. - ClientCertificateID *string - - // The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided - ClientCertificatethumbprint *string - - // Maximum number of retries while attempting resolve the partition. - MaxPartitionResolutionRetries *int32 - - // Thumbprints of certificates cluster management service uses for tls communication - ServerCertificateThumbprints []*string - - // Server X509 Certificate Names Collection - ServerX509Names []*X509CertificateName -} - -// BackendTLSProperties - Properties controlling TLS Certificate Validation. -type BackendTLSProperties struct { - // Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend - // host. - ValidateCertificateChain *bool - - // Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend - // host. - ValidateCertificateName *bool -} - -// BackendUpdateParameterProperties - Parameters supplied to the Update Backend operation. -type BackendUpdateParameterProperties struct { - // Backend Credentials Contract Properties - Credentials *BackendCredentialsContract - - // Backend Description. - Description *string - - // Backend Properties contract - Properties *BackendProperties - - // Backend communication protocol. - Protocol *BackendProtocol - - // Backend Proxy Contract Properties - Proxy *BackendProxyContract - - // Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or - // API Apps. - ResourceID *string - - // Backend TLS Properties - TLS *BackendTLSProperties - - // Backend Title. - Title *string - - // Runtime Url of the Backend. - URL *string -} - -// BackendUpdateParameters - Backend update parameters. -type BackendUpdateParameters struct { - // Backend entity update contract properties. - Properties *BackendUpdateParameterProperties -} - -// BodyDiagnosticSettings - Body logging settings. -type BodyDiagnosticSettings struct { - // Number of request body bytes to log. - Bytes *int32 -} - -// CacheClientCreateOrUpdateOptions contains the optional parameters for the CacheClient.CreateOrUpdate method. -type CacheClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// CacheClientDeleteOptions contains the optional parameters for the CacheClient.Delete method. -type CacheClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CacheClientGetEntityTagOptions contains the optional parameters for the CacheClient.GetEntityTag method. -type CacheClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// CacheClientGetOptions contains the optional parameters for the CacheClient.Get method. -type CacheClientGetOptions struct { - // placeholder for future optional parameters -} - -// CacheClientListByServiceOptions contains the optional parameters for the CacheClient.NewListByServicePager method. -type CacheClientListByServiceOptions struct { - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// CacheClientUpdateOptions contains the optional parameters for the CacheClient.Update method. -type CacheClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// CacheCollection - Paged Caches list representation. -type CacheCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*CacheContract -} - -// CacheContract - Cache details. -type CacheContract struct { - // Cache properties details. - Properties *CacheContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// CacheContractProperties - Properties of the Cache contract. -type CacheContractProperties struct { - // REQUIRED; Runtime connection string to cache - ConnectionString *string - - // REQUIRED; Location identifier to use cache from (should be either 'default' or valid Azure region identifier) - UseFromLocation *string - - // Cache description - Description *string - - // Original uri of entity in external system cache points to - ResourceID *string -} - -// CacheUpdateParameters - Cache update details. -type CacheUpdateParameters struct { - // Cache update properties details. - Properties *CacheUpdateProperties -} - -// CacheUpdateProperties - Parameters supplied to the Update Cache operation. -type CacheUpdateProperties struct { - // Runtime connection string to cache - ConnectionString *string - - // Cache description - Description *string - - // Original uri of entity in external system cache points to - ResourceID *string - - // Location identifier to use cache from (should be either 'default' or valid Azure region identifier) - UseFromLocation *string -} - -// CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate method. -type CertificateClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method. -type CertificateClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientGetEntityTagOptions contains the optional parameters for the CertificateClient.GetEntityTag method. -type CertificateClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method. -type CertificateClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificateClientListByServiceOptions contains the optional parameters for the CertificateClient.NewListByServicePager -// method. -type CertificateClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | expirationDate | filter | ge, le, eq, ne, gt, lt | | - Filter *string - // When set to true, the response contains only certificates entities which failed refresh. - IsKeyVaultRefreshFailed *bool - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// CertificateClientRefreshSecretOptions contains the optional parameters for the CertificateClient.RefreshSecret method. -type CertificateClientRefreshSecretOptions struct { - // placeholder for future optional parameters -} - -// CertificateCollection - Paged Certificates list representation. -type CertificateCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*CertificateContract -} - -// CertificateConfiguration - Certificate configuration which consist of non-trusted intermediates and root certificates. -type CertificateConfiguration struct { - // REQUIRED; The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority - // are valid locations. - StoreName *CertificateConfigurationStoreName - - // Certificate information. - Certificate *CertificateInformation - - // Certificate Password. - CertificatePassword *string - - // Base64 Encoded certificate. - EncodedCertificate *string -} - -// CertificateContract - Certificate details. -type CertificateContract struct { - // Certificate properties details. - Properties *CertificateContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// CertificateContractProperties - Properties of the Certificate contract. -type CertificateContractProperties struct { - // REQUIRED; Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified - // by the ISO 8601 standard. - ExpirationDate *time.Time - - // REQUIRED; Subject attribute of the certificate. - Subject *string - - // REQUIRED; Thumbprint of the certificate. - Thumbprint *string - - // KeyVault location details of the certificate. - KeyVault *KeyVaultContractProperties -} - -// CertificateCreateOrUpdateParameters - Certificate create or update details. -type CertificateCreateOrUpdateParameters struct { - // Certificate create or update properties details. - Properties *CertificateCreateOrUpdateProperties -} - -// CertificateCreateOrUpdateProperties - Parameters supplied to the CreateOrUpdate certificate operation. -type CertificateCreateOrUpdateProperties struct { - // Base 64 encoded certificate using the application/x-pkcs12 representation. - Data *string - - // KeyVault location details of the certificate. - KeyVault *KeyVaultContractCreateProperties - - // Password for the Certificate - Password *string -} - -// CertificateInformation - SSL certificate information. -type CertificateInformation struct { - // REQUIRED; Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified - // by the ISO 8601 standard. - Expiry *time.Time - - // REQUIRED; Subject of the certificate. - Subject *string - - // REQUIRED; Thumbprint of the certificate. - Thumbprint *string -} - -// ClientBeginPerformConnectivityCheckAsyncOptions contains the optional parameters for the Client.BeginPerformConnectivityCheckAsync -// method. -type ClientBeginPerformConnectivityCheckAsyncOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientSecretContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. -type ClientSecretContract struct { - // Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. - ClientSecret *string -} - -// ConnectivityCheckRequest - A request to perform the connectivity check operation on a API Management service. -type ConnectivityCheckRequest struct { - // REQUIRED; The connectivity check operation destination. - Destination *ConnectivityCheckRequestDestination - - // REQUIRED; Definitions about the connectivity check origin. - Source *ConnectivityCheckRequestSource - - // The IP version to be used. Only IPv4 is supported for now. - PreferredIPVersion *PreferredIPVersion - - // The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination - // address must be coherent with this value. - Protocol *ConnectivityCheckProtocol - - // Protocol-specific configuration. - ProtocolConfiguration *ConnectivityCheckRequestProtocolConfiguration -} - -// ConnectivityCheckRequestDestination - The connectivity check operation destination. -type ConnectivityCheckRequestDestination struct { - // REQUIRED; Destination address. Can either be an IP address or a FQDN. - Address *string - - // REQUIRED; Destination port. - Port *int64 -} - -// ConnectivityCheckRequestProtocolConfiguration - Protocol-specific configuration. -type ConnectivityCheckRequestProtocolConfiguration struct { - // Configuration for HTTP or HTTPS requests. - HTTPConfiguration *ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration -} - -// ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration - Configuration for HTTP or HTTPS requests. -type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration struct { - // List of headers to be included in the request. - Headers []*HTTPHeader - - // The HTTP method to be used. - Method *Method - - // List of HTTP status codes considered valid for the request response. - ValidStatusCodes []*int64 -} - -// ConnectivityCheckRequestSource - Definitions about the connectivity check origin. -type ConnectivityCheckRequestSource struct { - // REQUIRED; The API Management service region from where to start the connectivity check operation. - Region *string - - // The particular VMSS instance from which to fire the request. - Instance *int64 -} - -// ConnectivityCheckResponse - Information on the connectivity status. -type ConnectivityCheckResponse struct { - // READ-ONLY; Average latency in milliseconds. - AvgLatencyInMs *int64 - - // READ-ONLY; The connection status. - ConnectionStatus *ConnectionStatus - - // READ-ONLY; List of hops between the source and the destination. - Hops []*ConnectivityHop - - // READ-ONLY; Maximum latency in milliseconds. - MaxLatencyInMs *int64 - - // READ-ONLY; Minimum latency in milliseconds. - MinLatencyInMs *int64 - - // READ-ONLY; Number of failed probes. - ProbesFailed *int64 - - // READ-ONLY; Total number of probes sent. - ProbesSent *int64 -} - -// ConnectivityHop - Information about a hop between the source and the destination. -type ConnectivityHop struct { - // READ-ONLY; The IP address of the hop. - Address *string - - // READ-ONLY; The ID of the hop. - ID *string - - // READ-ONLY; List of issues. - Issues []*ConnectivityIssue - - // READ-ONLY; List of next hop identifiers. - NextHopIDs []*string - - // READ-ONLY; The ID of the resource corresponding to this hop. - ResourceID *string - - // READ-ONLY; The type of the hop. - Type *string -} - -// ConnectivityIssue - Information about an issue encountered in the process of checking for connectivity. -type ConnectivityIssue struct { - // READ-ONLY; Provides additional context on the issue. - Context []map[string]*string - - // READ-ONLY; The origin of the issue. - Origin *Origin - - // READ-ONLY; The severity of the issue. - Severity *Severity - - // READ-ONLY; The type of issue. - Type *IssueType -} - -// ConnectivityStatusContract - Details about connectivity to a resource. -type ConnectivityStatusContract struct { - // REQUIRED; Whether this is optional. - IsOptional *bool - - // REQUIRED; The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms - // to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 - // standard. - LastStatusChange *time.Time - - // REQUIRED; The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. - // If this status has not been updated, then it means that the service has lost network - // connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ - // as specified by the ISO 8601 standard. - LastUpdated *time.Time - - // REQUIRED; The hostname of the resource which the service depends on. This can be the database, storage or any other azure - // resource on which the service depends upon. - Name *string - - // REQUIRED; Resource Type. - ResourceType *string - - // REQUIRED; Resource Connectivity Status Type identifier. - Status *ConnectivityStatusType - - // Error details of the connectivity to the resource. - Error *string -} - -// ContentItemClientCreateOrUpdateOptions contains the optional parameters for the ContentItemClient.CreateOrUpdate method. -type ContentItemClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// ContentItemClientDeleteOptions contains the optional parameters for the ContentItemClient.Delete method. -type ContentItemClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ContentItemClientGetEntityTagOptions contains the optional parameters for the ContentItemClient.GetEntityTag method. -type ContentItemClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// ContentItemClientGetOptions contains the optional parameters for the ContentItemClient.Get method. -type ContentItemClientGetOptions struct { - // placeholder for future optional parameters -} - -// ContentItemClientListByServiceOptions contains the optional parameters for the ContentItemClient.NewListByServicePager -// method. -type ContentItemClientListByServiceOptions struct { - // placeholder for future optional parameters -} - -// ContentItemCollection - Paged list of content items. -type ContentItemCollection struct { - // READ-ONLY; Next page link, if any. - NextLink *string - - // READ-ONLY; Collection of content items. - Value []*ContentItemContract -} - -// ContentItemContract - Content type contract details. -type ContentItemContract struct { - // Properties of the content item. - Properties map[string]any - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// ContentTypeClientCreateOrUpdateOptions contains the optional parameters for the ContentTypeClient.CreateOrUpdate method. -type ContentTypeClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// ContentTypeClientDeleteOptions contains the optional parameters for the ContentTypeClient.Delete method. -type ContentTypeClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ContentTypeClientGetOptions contains the optional parameters for the ContentTypeClient.Get method. -type ContentTypeClientGetOptions struct { - // placeholder for future optional parameters -} - -// ContentTypeClientListByServiceOptions contains the optional parameters for the ContentTypeClient.NewListByServicePager -// method. -type ContentTypeClientListByServiceOptions struct { - // placeholder for future optional parameters -} - -// ContentTypeCollection - Paged list of content types. -type ContentTypeCollection struct { - // READ-ONLY; Next page link, if any. - NextLink *string - - // READ-ONLY; Collection of content types. - Value []*ContentTypeContract -} - -// ContentTypeContract - Content type contract details. -type ContentTypeContract struct { - // Properties of the content type. - Properties *ContentTypeContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -type ContentTypeContractProperties struct { - // Content type description. - Description *string - - // Content type identifier - ID *string - - // Content type name. Must be 1 to 250 characters long. - Name *string - - // Content type schema. - Schema any - - // Content type version. - Version *string -} - -type DataMasking struct { - // Masking settings for headers - Headers []*DataMaskingEntity - - // Masking settings for Url query parameters - QueryParams []*DataMaskingEntity -} - -type DataMaskingEntity struct { - // Data masking mode. - Mode *DataMaskingMode - - // The name of an entity to mask (e.g. a name of a header or a query parameter). - Value *string -} - -// DelegationSettingsClientCreateOrUpdateOptions contains the optional parameters for the DelegationSettingsClient.CreateOrUpdate -// method. -type DelegationSettingsClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// DelegationSettingsClientGetEntityTagOptions contains the optional parameters for the DelegationSettingsClient.GetEntityTag -// method. -type DelegationSettingsClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// DelegationSettingsClientGetOptions contains the optional parameters for the DelegationSettingsClient.Get method. -type DelegationSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DelegationSettingsClientListSecretsOptions contains the optional parameters for the DelegationSettingsClient.ListSecrets -// method. -type DelegationSettingsClientListSecretsOptions struct { - // placeholder for future optional parameters -} - -// DelegationSettingsClientUpdateOptions contains the optional parameters for the DelegationSettingsClient.Update method. -type DelegationSettingsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// DeletedServiceContract - Deleted API Management Service information. -type DeletedServiceContract struct { - // Deleted API Management Service details. - Properties *DeletedServiceContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; API Management Service Master Location. - Location *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -type DeletedServiceContractProperties struct { - // UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified - // by the ISO 8601 standard. - DeletionDate *time.Time - - // UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ - // as specified by the ISO 8601 standard. - ScheduledPurgeDate *time.Time - - // Fully-qualified API Management Service Resource ID - ServiceID *string -} - -// DeletedServicesClientBeginPurgeOptions contains the optional parameters for the DeletedServicesClient.BeginPurge method. -type DeletedServicesClientBeginPurgeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeletedServicesClientGetByNameOptions contains the optional parameters for the DeletedServicesClient.GetByName method. -type DeletedServicesClientGetByNameOptions struct { - // placeholder for future optional parameters -} - -// DeletedServicesClientListBySubscriptionOptions contains the optional parameters for the DeletedServicesClient.NewListBySubscriptionPager -// method. -type DeletedServicesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// DeletedServicesCollection - Paged deleted API Management Services List Representation. -type DeletedServicesCollection struct { - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Page values. - Value []*DeletedServiceContract -} - -// DeployConfigurationParameterProperties - Parameters supplied to the Deploy Configuration operation. -type DeployConfigurationParameterProperties struct { - // REQUIRED; The name of the Git branch from which the configuration is to be deployed to the configuration database. - Branch *string - - // The value enforcing deleting subscriptions to products that are deleted in this update. - Force *bool -} - -// DeployConfigurationParameters - Deploy Tenant Configuration Contract. -type DeployConfigurationParameters struct { - // Deploy Configuration Parameter contract properties. - Properties *DeployConfigurationParameterProperties -} - -// DiagnosticClientCreateOrUpdateOptions contains the optional parameters for the DiagnosticClient.CreateOrUpdate method. -type DiagnosticClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// DiagnosticClientDeleteOptions contains the optional parameters for the DiagnosticClient.Delete method. -type DiagnosticClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticClientGetEntityTagOptions contains the optional parameters for the DiagnosticClient.GetEntityTag method. -type DiagnosticClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticClientGetOptions contains the optional parameters for the DiagnosticClient.Get method. -type DiagnosticClientGetOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticClientListByServiceOptions contains the optional parameters for the DiagnosticClient.NewListByServicePager method. -type DiagnosticClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// DiagnosticClientUpdateOptions contains the optional parameters for the DiagnosticClient.Update method. -type DiagnosticClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticCollection - Paged Diagnostic list representation. -type DiagnosticCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*DiagnosticContract -} - -// DiagnosticContract - Diagnostic details. -type DiagnosticContract struct { - // Diagnostic entity contract properties. - Properties *DiagnosticContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// DiagnosticContractProperties - Diagnostic Entity Properties -type DiagnosticContractProperties struct { - // REQUIRED; Resource Id of a target logger. - LoggerID *string - - // Specifies for what type of messages sampling settings should not apply. - AlwaysLog *AlwaysLog - - // Diagnostic settings for incoming/outgoing HTTP messages to the Backend - Backend *PipelineDiagnosticSettings - - // Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. - Frontend *PipelineDiagnosticSettings - - // Sets correlation protocol to use for Application Insights diagnostics. - HTTPCorrelationProtocol *HTTPCorrelationProtocol - - // Log the ClientIP. Default is false. - LogClientIP *bool - - // The format of the Operation Name for Application Insights telemetries. Default is Name. - OperationNameFormat *OperationNameFormat - - // Sampling settings for Diagnostic. - Sampling *SamplingSettings - - // The verbosity level applied to traces emitted by trace policies. - Verbosity *Verbosity -} - -// EmailTemplateClientCreateOrUpdateOptions contains the optional parameters for the EmailTemplateClient.CreateOrUpdate method. -type EmailTemplateClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// EmailTemplateClientDeleteOptions contains the optional parameters for the EmailTemplateClient.Delete method. -type EmailTemplateClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// EmailTemplateClientGetEntityTagOptions contains the optional parameters for the EmailTemplateClient.GetEntityTag method. -type EmailTemplateClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// EmailTemplateClientGetOptions contains the optional parameters for the EmailTemplateClient.Get method. -type EmailTemplateClientGetOptions struct { - // placeholder for future optional parameters -} - -// EmailTemplateClientListByServiceOptions contains the optional parameters for the EmailTemplateClient.NewListByServicePager -// method. -type EmailTemplateClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// EmailTemplateClientUpdateOptions contains the optional parameters for the EmailTemplateClient.Update method. -type EmailTemplateClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// EmailTemplateCollection - Paged email template list representation. -type EmailTemplateCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*EmailTemplateContract -} - -// EmailTemplateContract - Email Template details. -type EmailTemplateContract struct { - // Email Template entity contract properties. - Properties *EmailTemplateContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// EmailTemplateContractProperties - Email Template Contract properties. -type EmailTemplateContractProperties struct { - // REQUIRED; Email Template Body. This should be a valid XDocument - Body *string - - // REQUIRED; Subject of the Template. - Subject *string - - // Description of the Email Template. - Description *string - - // Email Template Parameter values. - Parameters []*EmailTemplateParametersContractProperties - - // Title of the Template. - Title *string - - // READ-ONLY; Whether the template is the default template provided by API Management or has been edited. - IsDefault *bool -} - -// EmailTemplateParametersContractProperties - Email Template Parameter contract. -type EmailTemplateParametersContractProperties struct { - // Template parameter description. - Description *string - - // Template parameter name. - Name *string - - // Template parameter title. - Title *string -} - -// EmailTemplateUpdateParameterProperties - Email Template Update Contract properties. -type EmailTemplateUpdateParameterProperties struct { - // Email Template Body. This should be a valid XDocument - Body *string - - // Description of the Email Template. - Description *string - - // Email Template Parameter values. - Parameters []*EmailTemplateParametersContractProperties - - // Subject of the Template. - Subject *string - - // Title of the Template. - Title *string -} - -// EmailTemplateUpdateParameters - Email Template update Parameters. -type EmailTemplateUpdateParameters struct { - // Email Template Update contract properties. - Properties *EmailTemplateUpdateParameterProperties -} - -// EndpointDependency - A domain name that a service is reached at. -type EndpointDependency struct { - // The domain name of the dependency. - DomainName *string - - // The Ports used when connecting to DomainName. - EndpointDetails []*EndpointDetail -} - -// EndpointDetail - Current TCP connectivity information from the Api Management Service to a single endpoint. -type EndpointDetail struct { - // The port an endpoint is connected to. - Port *int32 - - // The region of the dependency. - Region *string -} - -// ErrorFieldContract - Error Field contract. -type ErrorFieldContract struct { - // Property level error code. - Code *string - - // Human-readable representation of property-level error. - Message *string - - // Property name. - Target *string -} - -// ErrorResponse - Error Response. -type ErrorResponse struct { - // Properties of the Error Response. - Error *ErrorResponseBody -} - -// ErrorResponseBody - Error Body contract. -type ErrorResponseBody struct { - // Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. - Code *string - - // The list of invalid fields send in request, in case of validation error. - Details []*ErrorFieldContract - - // Human-readable representation of the error. - Message *string -} - -// GatewayAPIClientCreateOrUpdateOptions contains the optional parameters for the GatewayAPIClient.CreateOrUpdate method. -type GatewayAPIClientCreateOrUpdateOptions struct { - Parameters *AssociationContract -} - -// GatewayAPIClientDeleteOptions contains the optional parameters for the GatewayAPIClient.Delete method. -type GatewayAPIClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// GatewayAPIClientGetEntityTagOptions contains the optional parameters for the GatewayAPIClient.GetEntityTag method. -type GatewayAPIClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// GatewayAPIClientListByServiceOptions contains the optional parameters for the GatewayAPIClient.NewListByServicePager method. -type GatewayAPIClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// GatewayCertificateAuthorityClientCreateOrUpdateOptions contains the optional parameters for the GatewayCertificateAuthorityClient.CreateOrUpdate -// method. -type GatewayCertificateAuthorityClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// GatewayCertificateAuthorityClientDeleteOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Delete -// method. -type GatewayCertificateAuthorityClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// GatewayCertificateAuthorityClientGetEntityTagOptions contains the optional parameters for the GatewayCertificateAuthorityClient.GetEntityTag -// method. -type GatewayCertificateAuthorityClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// GatewayCertificateAuthorityClientGetOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Get -// method. -type GatewayCertificateAuthorityClientGetOptions struct { - // placeholder for future optional parameters -} - -// GatewayCertificateAuthorityClientListByServiceOptions contains the optional parameters for the GatewayCertificateAuthorityClient.NewListByServicePager -// method. -type GatewayCertificateAuthorityClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | eq, ne | | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// GatewayCertificateAuthorityCollection - Paged Gateway certificate authority list representation. -type GatewayCertificateAuthorityCollection struct { - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Page values. - Value []*GatewayCertificateAuthorityContract -} - -// GatewayCertificateAuthorityContract - Gateway certificate authority details. -type GatewayCertificateAuthorityContract struct { - // Gateway certificate authority details. - Properties *GatewayCertificateAuthorityContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GatewayCertificateAuthorityContractProperties - Gateway certificate authority details. -type GatewayCertificateAuthorityContractProperties struct { - // Determines whether certificate authority is trusted. - IsTrusted *bool -} - -// GatewayClientCreateOrUpdateOptions contains the optional parameters for the GatewayClient.CreateOrUpdate method. -type GatewayClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// GatewayClientDeleteOptions contains the optional parameters for the GatewayClient.Delete method. -type GatewayClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// GatewayClientGenerateTokenOptions contains the optional parameters for the GatewayClient.GenerateToken method. -type GatewayClientGenerateTokenOptions struct { - // placeholder for future optional parameters -} - -// GatewayClientGetEntityTagOptions contains the optional parameters for the GatewayClient.GetEntityTag method. -type GatewayClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// GatewayClientGetOptions contains the optional parameters for the GatewayClient.Get method. -type GatewayClientGetOptions struct { - // placeholder for future optional parameters -} - -// GatewayClientListByServiceOptions contains the optional parameters for the GatewayClient.NewListByServicePager method. -type GatewayClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// GatewayClientListKeysOptions contains the optional parameters for the GatewayClient.ListKeys method. -type GatewayClientListKeysOptions struct { - // placeholder for future optional parameters -} - -// GatewayClientRegenerateKeyOptions contains the optional parameters for the GatewayClient.RegenerateKey method. -type GatewayClientRegenerateKeyOptions struct { - // placeholder for future optional parameters -} - -// GatewayClientUpdateOptions contains the optional parameters for the GatewayClient.Update method. -type GatewayClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// GatewayCollection - Paged Gateway list representation. -type GatewayCollection struct { - // Total record count number across all pages. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Page values. - Value []*GatewayContract -} - -// GatewayContract - Gateway details. -type GatewayContract struct { - // Gateway details. - Properties *GatewayContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GatewayContractProperties - Properties of the Gateway contract. -type GatewayContractProperties struct { - // Gateway description - Description *string - - // Gateway location. - LocationData *ResourceLocationDataContract -} - -// GatewayHostnameConfigurationClientCreateOrUpdateOptions contains the optional parameters for the GatewayHostnameConfigurationClient.CreateOrUpdate -// method. -type GatewayHostnameConfigurationClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// GatewayHostnameConfigurationClientDeleteOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Delete -// method. -type GatewayHostnameConfigurationClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// GatewayHostnameConfigurationClientGetEntityTagOptions contains the optional parameters for the GatewayHostnameConfigurationClient.GetEntityTag -// method. -type GatewayHostnameConfigurationClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// GatewayHostnameConfigurationClientGetOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Get -// method. -type GatewayHostnameConfigurationClientGetOptions struct { - // placeholder for future optional parameters -} - -// GatewayHostnameConfigurationClientListByServiceOptions contains the optional parameters for the GatewayHostnameConfigurationClient.NewListByServicePager -// method. -type GatewayHostnameConfigurationClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// GatewayHostnameConfigurationCollection - Paged Gateway hostname configuration list representation. -type GatewayHostnameConfigurationCollection struct { - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Page values. - Value []*GatewayHostnameConfigurationContract -} - -// GatewayHostnameConfigurationContract - Gateway hostname configuration details. -type GatewayHostnameConfigurationContract struct { - // Gateway hostname configuration details. - Properties *GatewayHostnameConfigurationContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GatewayHostnameConfigurationContractProperties - Gateway hostname configuration details. -type GatewayHostnameConfigurationContractProperties struct { - // Identifier of Certificate entity that will be used for TLS connection establishment - CertificateID *string - - // Specifies if HTTP/2.0 is supported - HTTP2Enabled *bool - - // Hostname value. Supports valid domain name, partial or full wildcard - Hostname *string - - // Determines whether gateway requests client certificate - NegotiateClientCertificate *bool - - // Specifies if TLS 1.0 is supported - Tls10Enabled *bool - - // Specifies if TLS 1.1 is supported - Tls11Enabled *bool -} - -// GatewayKeyRegenerationRequestContract - Gateway key regeneration request contract properties. -type GatewayKeyRegenerationRequestContract struct { - // REQUIRED; The Key being regenerated. - KeyType *KeyType -} - -// GatewayKeysContract - Gateway authentication keys. -type GatewayKeysContract struct { - // Primary gateway key. - Primary *string - - // Secondary gateway key. - Secondary *string -} - -// GatewayTokenContract - Gateway access token. -type GatewayTokenContract struct { - // Shared Access Authentication token value for the Gateway. - Value *string -} - -// GatewayTokenRequestContract - Gateway token request contract properties. -type GatewayTokenRequestContract struct { - // REQUIRED; The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following - // format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - Expiry *time.Time - - // REQUIRED; The Key to be used to generate gateway token. - KeyType *KeyType -} - -// GenerateSsoURLResult - Generate SSO Url operations response details. -type GenerateSsoURLResult struct { - // Redirect Url containing the SSO URL value. - Value *string -} - -// GlobalSchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the GlobalSchemaClient.BeginCreateOrUpdate -// method. -type GlobalSchemaClientBeginCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GlobalSchemaClientDeleteOptions contains the optional parameters for the GlobalSchemaClient.Delete method. -type GlobalSchemaClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// GlobalSchemaClientGetEntityTagOptions contains the optional parameters for the GlobalSchemaClient.GetEntityTag method. -type GlobalSchemaClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// GlobalSchemaClientGetOptions contains the optional parameters for the GlobalSchemaClient.Get method. -type GlobalSchemaClientGetOptions struct { - // placeholder for future optional parameters -} - -// GlobalSchemaClientListByServiceOptions contains the optional parameters for the GlobalSchemaClient.NewListByServicePager -// method. -type GlobalSchemaClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// GlobalSchemaCollection - The response of the list schema operation. -type GlobalSchemaCollection struct { - // Total record count number. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Global Schema Contract value. - Value []*GlobalSchemaContract -} - -// GlobalSchemaContract - Global Schema Contract details. -type GlobalSchemaContract struct { - // Properties of the Global Schema. - Properties *GlobalSchemaContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GlobalSchemaContractProperties - Schema create or update contract Properties. -type GlobalSchemaContractProperties struct { - // REQUIRED; Schema Type. Immutable. - SchemaType *SchemaType - - // Free-form schema entity description. - Description *string - - // Global Schema document object for json-based schema formats(e.g. json schema). - Document any - - // Json-encoded string for non json-based schema. - Value any -} - -// GroupClientCreateOrUpdateOptions contains the optional parameters for the GroupClient.CreateOrUpdate method. -type GroupClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// GroupClientDeleteOptions contains the optional parameters for the GroupClient.Delete method. -type GroupClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// GroupClientGetEntityTagOptions contains the optional parameters for the GroupClient.GetEntityTag method. -type GroupClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// GroupClientGetOptions contains the optional parameters for the GroupClient.Get method. -type GroupClientGetOptions struct { - // placeholder for future optional parameters -} - -// GroupClientListByServiceOptions contains the optional parameters for the GroupClient.NewListByServicePager method. -type GroupClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | externalId | filter | eq | | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// GroupClientUpdateOptions contains the optional parameters for the GroupClient.Update method. -type GroupClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// GroupCollection - Paged Group list representation. -type GroupCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*GroupContract -} - -// GroupContract - Contract details. -type GroupContract struct { - // Group entity contract properties. - Properties *GroupContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GroupContractProperties - Group contract Properties. -type GroupContractProperties struct { - // REQUIRED; Group name. - DisplayName *string - - // Group description. Can contain HTML formatting tags. - Description *string - - // For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active - // Directory aad://.onmicrosoft.com/groups/; otherwise - // the value is null. - ExternalID *string - - // Group type. - Type *GroupType - - // READ-ONLY; true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. - BuiltIn *bool -} - -// GroupCreateParameters - Parameters supplied to the Create Group operation. -type GroupCreateParameters struct { - // Properties supplied to Create Group operation. - Properties *GroupCreateParametersProperties -} - -// GroupCreateParametersProperties - Parameters supplied to the Create Group operation. -type GroupCreateParametersProperties struct { - // REQUIRED; Group name. - DisplayName *string - - // Group description. - Description *string - - // Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. - // for Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. - ExternalID *string - - // Group type. - Type *GroupType -} - -// GroupUpdateParameters - Parameters supplied to the Update Group operation. -type GroupUpdateParameters struct { - // Group entity update contract properties. - Properties *GroupUpdateParametersProperties -} - -// GroupUpdateParametersProperties - Parameters supplied to the Update Group operation. -type GroupUpdateParametersProperties struct { - // Group description. - Description *string - - // Group name. - DisplayName *string - - // Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. - // for Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. - ExternalID *string - - // Group type. - Type *GroupType -} - -// GroupUserClientCheckEntityExistsOptions contains the optional parameters for the GroupUserClient.CheckEntityExists method. -type GroupUserClientCheckEntityExistsOptions struct { - // placeholder for future optional parameters -} - -// GroupUserClientCreateOptions contains the optional parameters for the GroupUserClient.Create method. -type GroupUserClientCreateOptions struct { - // placeholder for future optional parameters -} - -// GroupUserClientDeleteOptions contains the optional parameters for the GroupUserClient.Delete method. -type GroupUserClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// GroupUserClientListOptions contains the optional parameters for the GroupUserClient.NewListPager method. -type GroupUserClientListOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | registrationDate | filter | ge, le, eq, ne, gt, lt | | - // | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// HTTPHeader - HTTP header and it's value. -type HTTPHeader struct { - // REQUIRED; Header name. - Name *string - - // REQUIRED; Header value. - Value *string -} - -// HTTPMessageDiagnostic - Http message diagnostic settings. -type HTTPMessageDiagnostic struct { - // Body logging settings. - Body *BodyDiagnosticSettings - - // Data masking settings. - DataMasking *DataMasking - - // Array of HTTP Headers to log. - Headers []*string -} - -// HostnameConfiguration - Custom hostname configuration. -type HostnameConfiguration struct { - // REQUIRED; Hostname to configure on the Api Management service. - HostName *string - - // REQUIRED; Hostname type. - Type *HostnameType - - // Certificate information. - Certificate *CertificateInformation - - // Certificate Password. - CertificatePassword *string - - // Certificate Source. - CertificateSource *CertificateSource - - // Certificate Status. - CertificateStatus *CertificateStatus - - // Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not - // send the SNI header, then this will be the certificate that will be challenged. - // The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. - // The setting only applied to Proxy Hostname Type. - DefaultSSLBinding *bool - - // Base64 Encoded certificate. - EncodedCertificate *string - - // System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing - // the SSL certificate. - IdentityClientID *string - - // Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update - // of ssl certificate will not work. This requires Api Management service to be - // configured with aka.ms/apimmsi. The secret should be of type application/x-pkcs12 - KeyVaultID *string - - // Specify true to always negotiate client certificate on the hostname. Default Value is false. - NegotiateClientCertificate *bool -} - -// IdentityProviderBaseParameters - Identity Provider Base Parameter Properties. -type IdentityProviderBaseParameters struct { - // List of Allowed Tenants when configuring Azure Active Directory login. - AllowedTenants []*string - - // OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - Authority *string - - // Password Reset Policy Name. Only applies to AAD B2C Identity Provider. - PasswordResetPolicyName *string - - // Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. - ProfileEditingPolicyName *string - - // Signin Policy Name. Only applies to AAD B2C Identity Provider. - SigninPolicyName *string - - // The TenantId to use instead of Common when logging into Active Directory - SigninTenant *string - - // Signup Policy Name. Only applies to AAD B2C Identity Provider. - SignupPolicyName *string - - // Identity Provider Type identifier. - Type *IdentityProviderType -} - -// IdentityProviderClientCreateOrUpdateOptions contains the optional parameters for the IdentityProviderClient.CreateOrUpdate -// method. -type IdentityProviderClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// IdentityProviderClientDeleteOptions contains the optional parameters for the IdentityProviderClient.Delete method. -type IdentityProviderClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// IdentityProviderClientGetEntityTagOptions contains the optional parameters for the IdentityProviderClient.GetEntityTag -// method. -type IdentityProviderClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// IdentityProviderClientGetOptions contains the optional parameters for the IdentityProviderClient.Get method. -type IdentityProviderClientGetOptions struct { - // placeholder for future optional parameters -} - -// IdentityProviderClientListByServiceOptions contains the optional parameters for the IdentityProviderClient.NewListByServicePager -// method. -type IdentityProviderClientListByServiceOptions struct { - // placeholder for future optional parameters -} - -// IdentityProviderClientListSecretsOptions contains the optional parameters for the IdentityProviderClient.ListSecrets method. -type IdentityProviderClientListSecretsOptions struct { - // placeholder for future optional parameters -} - -// IdentityProviderClientUpdateOptions contains the optional parameters for the IdentityProviderClient.Update method. -type IdentityProviderClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// IdentityProviderContract - Identity Provider details. -type IdentityProviderContract struct { - // Identity Provider contract properties. - Properties *IdentityProviderContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// IdentityProviderContractProperties - The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure -// Active Directory which can be used to enable access to the API Management service developer portal for all users. -type IdentityProviderContractProperties struct { - // REQUIRED; Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for - // Google login, App ID for Microsoft. - ClientID *string - - // List of Allowed Tenants when configuring Azure Active Directory login. - AllowedTenants []*string - - // OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - Authority *string - - // Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is - // App Secret for Facebook login, API Key for Google login, Public Key for - // Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. - ClientSecret *string - - // Password Reset Policy Name. Only applies to AAD B2C Identity Provider. - PasswordResetPolicyName *string - - // Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. - ProfileEditingPolicyName *string - - // Signin Policy Name. Only applies to AAD B2C Identity Provider. - SigninPolicyName *string - - // The TenantId to use instead of Common when logging into Active Directory - SigninTenant *string - - // Signup Policy Name. Only applies to AAD B2C Identity Provider. - SignupPolicyName *string - - // Identity Provider Type identifier. - Type *IdentityProviderType -} - -// IdentityProviderCreateContract - Identity Provider details. -type IdentityProviderCreateContract struct { - // Identity Provider contract properties. - Properties *IdentityProviderCreateContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// IdentityProviderCreateContractProperties - The external Identity Providers like Facebook, Google, Microsoft, Twitter or -// Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. -type IdentityProviderCreateContractProperties struct { - // REQUIRED; Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for - // Google login, App ID for Microsoft. - ClientID *string - - // REQUIRED; Client secret of the Application in external Identity Provider, used to authenticate login request. For example, - // it is App Secret for Facebook login, API Key for Google login, Public Key for - // Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. - ClientSecret *string - - // List of Allowed Tenants when configuring Azure Active Directory login. - AllowedTenants []*string - - // OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - Authority *string - - // Password Reset Policy Name. Only applies to AAD B2C Identity Provider. - PasswordResetPolicyName *string - - // Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. - ProfileEditingPolicyName *string - - // Signin Policy Name. Only applies to AAD B2C Identity Provider. - SigninPolicyName *string - - // The TenantId to use instead of Common when logging into Active Directory - SigninTenant *string - - // Signup Policy Name. Only applies to AAD B2C Identity Provider. - SignupPolicyName *string - - // Identity Provider Type identifier. - Type *IdentityProviderType -} - -// IdentityProviderList - List of all the Identity Providers configured on the service instance. -type IdentityProviderList struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Identity Provider configuration values. - Value []*IdentityProviderContract -} - -// IdentityProviderUpdateParameters - Parameters supplied to update Identity Provider -type IdentityProviderUpdateParameters struct { - // Identity Provider update properties. - Properties *IdentityProviderUpdateProperties -} - -// IdentityProviderUpdateProperties - Parameters supplied to the Update Identity Provider operation. -type IdentityProviderUpdateProperties struct { - // List of Allowed Tenants when configuring Azure Active Directory login. - AllowedTenants []*string - - // OpenID Connect discovery endpoint hostname for AAD or AAD B2C. - Authority *string - - // Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, - // App ID for Microsoft. - ClientID *string - - // Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is - // App Secret for Facebook login, API Key for Google login, Public Key for - // Microsoft. - ClientSecret *string - - // Password Reset Policy Name. Only applies to AAD B2C Identity Provider. - PasswordResetPolicyName *string - - // Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. - ProfileEditingPolicyName *string - - // Signin Policy Name. Only applies to AAD B2C Identity Provider. - SigninPolicyName *string - - // The TenantId to use instead of Common when logging into Active Directory - SigninTenant *string - - // Signup Policy Name. Only applies to AAD B2C Identity Provider. - SignupPolicyName *string - - // Identity Provider Type identifier. - Type *IdentityProviderType -} - -// IssueAttachmentCollection - Paged Issue Attachment list representation. -type IssueAttachmentCollection struct { - // Total record count number across all pages. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Issue Attachment values. - Value []*IssueAttachmentContract -} - -// IssueAttachmentContract - Issue Attachment Contract details. -type IssueAttachmentContract struct { - // Properties of the Issue Attachment. - Properties *IssueAttachmentContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// IssueAttachmentContractProperties - Issue Attachment contract Properties. -type IssueAttachmentContractProperties struct { - // REQUIRED; An HTTP link or Base64-encoded binary data. - Content *string - - // REQUIRED; Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided - // in the 'content' property. - ContentFormat *string - - // REQUIRED; Filename by which the binary data will be saved. - Title *string -} - -// IssueClientGetOptions contains the optional parameters for the IssueClient.Get method. -type IssueClientGetOptions struct { - // placeholder for future optional parameters -} - -// IssueClientListByServiceOptions contains the optional parameters for the IssueClient.NewListByServicePager method. -type IssueClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | state | filter | eq | | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// IssueCollection - Paged Issue list representation. -type IssueCollection struct { - // Total record count number across all pages. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Issue values. - Value []*IssueContract -} - -// IssueCommentCollection - Paged Issue Comment list representation. -type IssueCommentCollection struct { - // Total record count number across all pages. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Issue Comment values. - Value []*IssueCommentContract -} - -// IssueCommentContract - Issue Comment Contract details. -type IssueCommentContract struct { - // Properties of the Issue Comment. - Properties *IssueCommentContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// IssueCommentContractProperties - Issue Comment contract Properties. -type IssueCommentContractProperties struct { - // REQUIRED; Comment text. - Text *string - - // REQUIRED; A resource identifier for the user who left the comment. - UserID *string - - // Date and time when the comment was created. - CreatedDate *time.Time -} - -// IssueContract - Issue Contract details. -type IssueContract struct { - // Properties of the Issue. - Properties *IssueContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// IssueContractBaseProperties - Issue contract Base Properties. -type IssueContractBaseProperties struct { - // A resource identifier for the API the issue was created for. - APIID *string - - // Date and time when the issue was created. - CreatedDate *time.Time - - // Status of the issue. - State *State -} - -// IssueContractProperties - Issue contract Properties. -type IssueContractProperties struct { - // REQUIRED; Text describing the issue. - Description *string - - // REQUIRED; The issue title. - Title *string - - // REQUIRED; A resource identifier for the user created the issue. - UserID *string - - // A resource identifier for the API the issue was created for. - APIID *string - - // Date and time when the issue was created. - CreatedDate *time.Time - - // Status of the issue. - State *State -} - -// IssueUpdateContract - Issue update Parameters. -type IssueUpdateContract struct { - // Issue entity Update contract properties. - Properties *IssueUpdateContractProperties -} - -// IssueUpdateContractProperties - Issue contract Update Properties. -type IssueUpdateContractProperties struct { - // A resource identifier for the API the issue was created for. - APIID *string - - // Date and time when the issue was created. - CreatedDate *time.Time - - // Text describing the issue. - Description *string - - // Status of the issue. - State *State - - // The issue title. - Title *string - - // A resource identifier for the user created the issue. - UserID *string -} - -// KeyVaultContractCreateProperties - Create keyVault contract details. -type KeyVaultContractCreateProperties struct { - // Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. - IdentityClientID *string - - // Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires - // API Management service to be configured with aka.ms/apimmsi - SecretIdentifier *string -} - -// KeyVaultContractProperties - KeyVault contract details. -type KeyVaultContractProperties struct { - // Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. - IdentityClientID *string - - // Last time sync and refresh status of secret from key vault. - LastStatus *KeyVaultLastAccessStatusContractProperties - - // Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires - // API Management service to be configured with aka.ms/apimmsi - SecretIdentifier *string -} - -// KeyVaultLastAccessStatusContractProperties - Issue contract Update Properties. -type KeyVaultLastAccessStatusContractProperties struct { - // Last status code for sync and refresh of secret from key vault. - Code *string - - // Details of the error else empty. - Message *string - - // Last time secret was accessed. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO - // 8601 standard. - TimeStampUTC *time.Time -} - -// LoggerClientCreateOrUpdateOptions contains the optional parameters for the LoggerClient.CreateOrUpdate method. -type LoggerClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// LoggerClientDeleteOptions contains the optional parameters for the LoggerClient.Delete method. -type LoggerClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// LoggerClientGetEntityTagOptions contains the optional parameters for the LoggerClient.GetEntityTag method. -type LoggerClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// LoggerClientGetOptions contains the optional parameters for the LoggerClient.Get method. -type LoggerClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoggerClientListByServiceOptions contains the optional parameters for the LoggerClient.NewListByServicePager method. -type LoggerClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | loggerType | filter | eq | | - // | resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// LoggerClientUpdateOptions contains the optional parameters for the LoggerClient.Update method. -type LoggerClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// LoggerCollection - Paged Logger list representation. -type LoggerCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Logger values. - Value []*LoggerContract -} - -// LoggerContract - Logger details. -type LoggerContract struct { - // Logger entity contract properties. - Properties *LoggerContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// LoggerContractProperties - The Logger entity in API Management represents an event sink that you can use to log API Management -// events. Currently the Logger entity supports logging API Management events to Azure Event Hubs. -type LoggerContractProperties struct { - // REQUIRED; Logger type. - LoggerType *LoggerType - - // The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights - // logger. - Credentials map[string]*string - - // Logger description. - Description *string - - // Whether records are buffered in the logger before publishing. Default is assumed to be true. - IsBuffered *bool - - // Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). - ResourceID *string -} - -// LoggerUpdateContract - Logger update contract. -type LoggerUpdateContract struct { - // Logger entity update contract properties. - Properties *LoggerUpdateParameters -} - -// LoggerUpdateParameters - Parameters supplied to the Update Logger operation. -type LoggerUpdateParameters struct { - // Logger credentials. - Credentials map[string]*string - - // Logger description. - Description *string - - // Whether records are buffered in the logger before publishing. Default is assumed to be true. - IsBuffered *bool - - // Logger type. - LoggerType *LoggerType -} - -// NamedValueClientBeginCreateOrUpdateOptions contains the optional parameters for the NamedValueClient.BeginCreateOrUpdate -// method. -type NamedValueClientBeginCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NamedValueClientBeginRefreshSecretOptions contains the optional parameters for the NamedValueClient.BeginRefreshSecret -// method. -type NamedValueClientBeginRefreshSecretOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NamedValueClientBeginUpdateOptions contains the optional parameters for the NamedValueClient.BeginUpdate method. -type NamedValueClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NamedValueClientDeleteOptions contains the optional parameters for the NamedValueClient.Delete method. -type NamedValueClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// NamedValueClientGetEntityTagOptions contains the optional parameters for the NamedValueClient.GetEntityTag method. -type NamedValueClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// NamedValueClientGetOptions contains the optional parameters for the NamedValueClient.Get method. -type NamedValueClientGetOptions struct { - // placeholder for future optional parameters -} - -// NamedValueClientListByServiceOptions contains the optional parameters for the NamedValueClient.NewListByServicePager method. -type NamedValueClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // When set to true, the response contains only named value entities which failed refresh. - IsKeyVaultRefreshFailed *bool - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// NamedValueClientListValueOptions contains the optional parameters for the NamedValueClient.ListValue method. -type NamedValueClientListValueOptions struct { - // placeholder for future optional parameters -} - -// NamedValueCollection - Paged NamedValue list representation. -type NamedValueCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*NamedValueContract -} - -// NamedValueContract - NamedValue details. -type NamedValueContract struct { - // NamedValue entity contract properties. - Properties *NamedValueContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// NamedValueContractProperties - NamedValue Contract properties. -type NamedValueContractProperties struct { - // REQUIRED; Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. - DisplayName *string - - // KeyVault location details of the namedValue. - KeyVault *KeyVaultContractProperties - - // Determines whether the value is a secret and should be encrypted or not. Default value is false. - Secret *bool - - // Optional tags that when provided can be used to filter the NamedValue list. - Tags []*string - - // Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property - // will not be filled on 'GET' operations! Use '/listSecrets' POST request to get - // the value. - Value *string -} - -// NamedValueCreateContract - NamedValue details. -type NamedValueCreateContract struct { - // NamedValue entity contract properties for PUT operation. - Properties *NamedValueCreateContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// NamedValueCreateContractProperties - NamedValue Contract properties. -type NamedValueCreateContractProperties struct { - // REQUIRED; Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. - DisplayName *string - - // KeyVault location details of the namedValue. - KeyVault *KeyVaultContractCreateProperties - - // Determines whether the value is a secret and should be encrypted or not. Default value is false. - Secret *bool - - // Optional tags that when provided can be used to filter the NamedValue list. - Tags []*string - - // Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property - // will not be filled on 'GET' operations! Use '/listSecrets' POST request to get - // the value. - Value *string -} - -// NamedValueEntityBaseParameters - NamedValue Entity Base Parameters set. -type NamedValueEntityBaseParameters struct { - // Determines whether the value is a secret and should be encrypted or not. Default value is false. - Secret *bool - - // Optional tags that when provided can be used to filter the NamedValue list. - Tags []*string -} - -// NamedValueSecretContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. -type NamedValueSecretContract struct { - // This is secret value of the NamedValue entity. - Value *string -} - -// NamedValueUpdateParameterProperties - NamedValue Contract properties. -type NamedValueUpdateParameterProperties struct { - // Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. - DisplayName *string - - // KeyVault location details of the namedValue. - KeyVault *KeyVaultContractCreateProperties - - // Determines whether the value is a secret and should be encrypted or not. Default value is false. - Secret *bool - - // Optional tags that when provided can be used to filter the NamedValue list. - Tags []*string - - // Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. - Value *string -} - -// NamedValueUpdateParameters - NamedValue update Parameters. -type NamedValueUpdateParameters struct { - // NamedValue entity Update contract properties. - Properties *NamedValueUpdateParameterProperties -} - -// NetworkStatusClientListByLocationOptions contains the optional parameters for the NetworkStatusClient.ListByLocation method. -type NetworkStatusClientListByLocationOptions struct { - // placeholder for future optional parameters -} - -// NetworkStatusClientListByServiceOptions contains the optional parameters for the NetworkStatusClient.ListByService method. -type NetworkStatusClientListByServiceOptions struct { - // placeholder for future optional parameters -} - -// NetworkStatusContract - Network Status details. -type NetworkStatusContract struct { - // REQUIRED; Gets the list of Connectivity Status to the Resources on which the service depends upon. - ConnectivityStatus []*ConnectivityStatusContract - - // REQUIRED; Gets the list of DNS servers IPV4 addresses. - DNSServers []*string -} - -// NetworkStatusContractByLocation - Network Status in the Location -type NetworkStatusContractByLocation struct { - // Location of service - Location *string - - // Network status in Location - NetworkStatus *NetworkStatusContract -} - -// NotificationClientCreateOrUpdateOptions contains the optional parameters for the NotificationClient.CreateOrUpdate method. -type NotificationClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// NotificationClientGetOptions contains the optional parameters for the NotificationClient.Get method. -type NotificationClientGetOptions struct { - // placeholder for future optional parameters -} - -// NotificationClientListByServiceOptions contains the optional parameters for the NotificationClient.NewListByServicePager -// method. -type NotificationClientListByServiceOptions struct { - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// NotificationCollection - Paged Notification list representation. -type NotificationCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*NotificationContract -} - -// NotificationContract - Notification details. -type NotificationContract struct { - // Notification entity contract properties. - Properties *NotificationContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// NotificationContractProperties - Notification Contract properties. -type NotificationContractProperties struct { - // REQUIRED; Title of the Notification. - Title *string - - // Description of the Notification. - Description *string - - // Recipient Parameter values. - Recipients *RecipientsContractProperties -} - -// NotificationRecipientEmailClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientEmailClient.CheckEntityExists -// method. -type NotificationRecipientEmailClientCheckEntityExistsOptions struct { - // placeholder for future optional parameters -} - -// NotificationRecipientEmailClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientEmailClient.CreateOrUpdate -// method. -type NotificationRecipientEmailClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// NotificationRecipientEmailClientDeleteOptions contains the optional parameters for the NotificationRecipientEmailClient.Delete -// method. -type NotificationRecipientEmailClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// NotificationRecipientEmailClientListByNotificationOptions contains the optional parameters for the NotificationRecipientEmailClient.ListByNotification -// method. -type NotificationRecipientEmailClientListByNotificationOptions struct { - // placeholder for future optional parameters -} - -// NotificationRecipientUserClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientUserClient.CheckEntityExists -// method. -type NotificationRecipientUserClientCheckEntityExistsOptions struct { - // placeholder for future optional parameters -} - -// NotificationRecipientUserClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientUserClient.CreateOrUpdate -// method. -type NotificationRecipientUserClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// NotificationRecipientUserClientDeleteOptions contains the optional parameters for the NotificationRecipientUserClient.Delete -// method. -type NotificationRecipientUserClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// NotificationRecipientUserClientListByNotificationOptions contains the optional parameters for the NotificationRecipientUserClient.ListByNotification -// method. -type NotificationRecipientUserClientListByNotificationOptions struct { - // placeholder for future optional parameters -} - -// OAuth2AuthenticationSettingsContract - API OAuth2 Authentication settings details. -type OAuth2AuthenticationSettingsContract struct { - // OAuth authorization server identifier. - AuthorizationServerID *string - - // operations scope. - Scope *string -} - -// OpenIDAuthenticationSettingsContract - API OAuth2 Authentication settings details. -type OpenIDAuthenticationSettingsContract struct { - // How to send token to the server. - BearerTokenSendingMethods []*BearerTokenSendingMethods - - // OAuth authorization server identifier. - OpenidProviderID *string -} - -// OpenIDConnectProviderClientCreateOrUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.CreateOrUpdate -// method. -type OpenIDConnectProviderClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// OpenIDConnectProviderClientDeleteOptions contains the optional parameters for the OpenIDConnectProviderClient.Delete method. -type OpenIDConnectProviderClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// OpenIDConnectProviderClientGetEntityTagOptions contains the optional parameters for the OpenIDConnectProviderClient.GetEntityTag -// method. -type OpenIDConnectProviderClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// OpenIDConnectProviderClientGetOptions contains the optional parameters for the OpenIDConnectProviderClient.Get method. -type OpenIDConnectProviderClientGetOptions struct { - // placeholder for future optional parameters -} - -// OpenIDConnectProviderClientListByServiceOptions contains the optional parameters for the OpenIDConnectProviderClient.NewListByServicePager -// method. -type OpenIDConnectProviderClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// OpenIDConnectProviderClientListSecretsOptions contains the optional parameters for the OpenIDConnectProviderClient.ListSecrets -// method. -type OpenIDConnectProviderClientListSecretsOptions struct { - // placeholder for future optional parameters -} - -// OpenIDConnectProviderClientUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.Update method. -type OpenIDConnectProviderClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// OpenIDConnectProviderCollection - Paged OpenIdProviders list representation. -type OpenIDConnectProviderCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*OpenidConnectProviderContract -} - -// OpenidConnectProviderContract - OpenId Connect Provider details. -type OpenidConnectProviderContract struct { - // OpenId Connect Provider contract properties. - Properties *OpenidConnectProviderContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// OpenidConnectProviderContractProperties - OpenID Connect Providers Contract. -type OpenidConnectProviderContractProperties struct { - // REQUIRED; Client ID of developer console which is the client application. - ClientID *string - - // REQUIRED; User-friendly OpenID Connect Provider name. - DisplayName *string - - // REQUIRED; Metadata endpoint URI. - MetadataEndpoint *string - - // Client Secret of developer console which is the client application. - ClientSecret *string - - // User-friendly description of OpenID Connect Provider. - Description *string -} - -// OpenidConnectProviderUpdateContract - Parameters supplied to the Update OpenID Connect Provider operation. -type OpenidConnectProviderUpdateContract struct { - // OpenId Connect Provider Update contract properties. - Properties *OpenidConnectProviderUpdateContractProperties -} - -// OpenidConnectProviderUpdateContractProperties - Parameters supplied to the Update OpenID Connect Provider operation. -type OpenidConnectProviderUpdateContractProperties struct { - // Client ID of developer console which is the client application. - ClientID *string - - // Client Secret of developer console which is the client application. - ClientSecret *string - - // User-friendly description of OpenID Connect Provider. - Description *string - - // User-friendly OpenID Connect Provider name. - DisplayName *string - - // Metadata endpoint URI. - MetadataEndpoint *string -} - -// Operation - REST API operation -type Operation struct { - // The object that describes the operation. - Display *OperationDisplay - - // Operation name: {provider}/{resource}/{operation} - Name *string - - // The operation origin. - Origin *string - - // The operation properties. - Properties any -} - -// OperationClientListByTagsOptions contains the optional parameters for the OperationClient.NewListByTagsPager method. -type OperationClientListByTagsOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Include not tagged Operations. - IncludeNotTaggedOperations *bool - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// OperationCollection - Paged Operation list representation. -type OperationCollection struct { - // Total record count number across all pages. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Page values. - Value []*OperationContract -} - -// OperationContract - API Operation details. -type OperationContract struct { - // Properties of the Operation Contract. - Properties *OperationContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// OperationContractProperties - Operation Contract Properties -type OperationContractProperties struct { - // REQUIRED; Operation Name. - DisplayName *string - - // REQUIRED; A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. - Method *string - - // REQUIRED; Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} - URLTemplate *string - - // Description of the operation. May include HTML formatting tags. - Description *string - - // Operation Policies - Policies *string - - // An entity containing request details. - Request *RequestContract - - // Array of Operation responses. - Responses []*ResponseContract - - // Collection of URL template parameters. - TemplateParameters []*ParameterContract -} - -// OperationDisplay - The object that describes the operation. -type OperationDisplay struct { - // Friendly name of the operation - Description *string - - // Operation type: read, write, delete, listKeys/action, etc. - Operation *string - - // Friendly name of the resource provider - Provider *string - - // Resource type on which the operation is performed. - Resource *string -} - -// OperationEntityBaseContract - API Operation Entity Base Contract details. -type OperationEntityBaseContract struct { - // Description of the operation. May include HTML formatting tags. - Description *string - - // Operation Policies - Policies *string - - // An entity containing request details. - Request *RequestContract - - // Array of Operation responses. - Responses []*ResponseContract - - // Collection of URL template parameters. - TemplateParameters []*ParameterContract -} - -// OperationListResult - Result of the request to list REST API operations. It contains a list of operations and a URL nextLink -// to get the next set of results. -type OperationListResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string - - // List of operations supported by the resource provider. - Value []*Operation -} - -// OperationResultContract - Long Running Git Operation Results. -type OperationResultContract struct { - // Properties of the Operation Contract. - Properties *OperationResultContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// OperationResultContractProperties - Operation Result. -type OperationResultContractProperties struct { - // Error Body Contract - Error *ErrorResponseBody - - // Operation result identifier. - ID *string - - // Optional result info. - ResultInfo *string - - // Start time of an async operation. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO - // 8601 standard. - Started *time.Time - - // Status of an async operation. - Status *AsyncOperationStatus - - // Last update time of an async operation. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by - // the ISO 8601 standard. - Updated *time.Time - - // READ-ONLY; This property if only provided as part of the TenantConfigurationValidate operation. It contains the log the - // entities which will be updated/created/deleted as part of the TenantConfigurationDeploy - // operation. - ActionLog []*OperationResultLogItemContract -} - -// OperationResultLogItemContract - Log of the entity being created, updated or deleted. -type OperationResultLogItemContract struct { - // Action like create/update/delete. - Action *string - - // Identifier of the entity being created/updated/deleted. - ObjectKey *string - - // The type of entity contract. - ObjectType *string -} - -// OperationTagResourceContractProperties - Operation Entity contract Properties. -type OperationTagResourceContractProperties struct { - // Identifier of the operation in form /operations/{operationId}. - ID *string - - // READ-ONLY; API Name. - APIName *string - - // READ-ONLY; API Revision. - APIRevision *string - - // READ-ONLY; API Version. - APIVersion *string - - // READ-ONLY; Operation Description. - Description *string - - // READ-ONLY; A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. - Method *string - - // READ-ONLY; Operation name. - Name *string - - // READ-ONLY; Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} - URLTemplate *string -} - -// OperationUpdateContract - API Operation Update Contract details. -type OperationUpdateContract struct { - // Properties of the API Operation entity that can be updated. - Properties *OperationUpdateContractProperties -} - -// OperationUpdateContractProperties - Operation Update Contract Properties. -type OperationUpdateContractProperties struct { - // Description of the operation. May include HTML formatting tags. - Description *string - - // Operation Name. - DisplayName *string - - // A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. - Method *string - - // Operation Policies - Policies *string - - // An entity containing request details. - Request *RequestContract - - // Array of Operation responses. - Responses []*ResponseContract - - // Collection of URL template parameters. - TemplateParameters []*ParameterContract - - // Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} - URLTemplate *string -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// OutboundEnvironmentEndpoint - Endpoints accessed for a common purpose that the Api Management Service requires outbound -// network access to. -type OutboundEnvironmentEndpoint struct { - // The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. - Category *string - - // The endpoints that the Api Management Service reaches the service at. - Endpoints []*EndpointDependency -} - -// OutboundEnvironmentEndpointList - Collection of Outbound Environment Endpoints -type OutboundEnvironmentEndpointList struct { - // REQUIRED; Collection of resources. - Value []*OutboundEnvironmentEndpoint - - // READ-ONLY; Link to next page of resources. - NextLink *string -} - -// OutboundNetworkDependenciesEndpointsClientListByServiceOptions contains the optional parameters for the OutboundNetworkDependenciesEndpointsClient.ListByService -// method. -type OutboundNetworkDependenciesEndpointsClientListByServiceOptions struct { - // placeholder for future optional parameters -} - -// ParameterContract - Operation parameters details. -type ParameterContract struct { - // REQUIRED; Parameter name. - Name *string - - // REQUIRED; Parameter type. - Type *string - - // Default parameter value. - DefaultValue *string - - // Parameter description. - Description *string - - // Exampled defined for the parameter. - Examples map[string]*ParameterExampleContract - - // Specifies whether parameter is required or not. - Required *bool - - // Schema identifier. - SchemaID *string - - // Type name defined by the schema. - TypeName *string - - // Parameter values. - Values []*string -} - -// ParameterExampleContract - Parameter example. -type ParameterExampleContract struct { - // Long description for the example - Description *string - - // A URL that points to the literal example - ExternalValue *string - - // Short description for the example - Summary *string - - // Example value. May be a primitive value, or an object. - Value any -} - -// PipelineDiagnosticSettings - Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. -type PipelineDiagnosticSettings struct { - // Diagnostic settings for request. - Request *HTTPMessageDiagnostic - - // Diagnostic settings for response. - Response *HTTPMessageDiagnostic -} - -// PolicyClientCreateOrUpdateOptions contains the optional parameters for the PolicyClient.CreateOrUpdate method. -type PolicyClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// PolicyClientDeleteOptions contains the optional parameters for the PolicyClient.Delete method. -type PolicyClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// PolicyClientGetEntityTagOptions contains the optional parameters for the PolicyClient.GetEntityTag method. -type PolicyClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// PolicyClientGetOptions contains the optional parameters for the PolicyClient.Get method. -type PolicyClientGetOptions struct { - // Policy Export Format. - Format *PolicyExportFormat -} - -// PolicyClientListByServiceOptions contains the optional parameters for the PolicyClient.ListByService method. -type PolicyClientListByServiceOptions struct { - // placeholder for future optional parameters -} - -// PolicyCollection - The response of the list policy operation. -type PolicyCollection struct { - // Total record count number. - Count *int64 - - // Next page link if any. - NextLink *string - - // Policy Contract value. - Value []*PolicyContract -} - -// PolicyContract - Policy Contract details. -type PolicyContract struct { - // Properties of the Policy. - Properties *PolicyContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// PolicyContractProperties - Policy contract Properties. -type PolicyContractProperties struct { - // REQUIRED; Contents of the Policy as defined by the format. - Value *string - - // Format of the policyContent. - Format *PolicyContentFormat -} - -// PolicyDescriptionClientListByServiceOptions contains the optional parameters for the PolicyDescriptionClient.ListByService -// method. -type PolicyDescriptionClientListByServiceOptions struct { - // Policy scope. - Scope *PolicyScopeContract -} - -// PolicyDescriptionCollection - Descriptions of APIM policies. -type PolicyDescriptionCollection struct { - // Total record count number. - Count *int64 - - // Descriptions of APIM policies. - Value []*PolicyDescriptionContract -} - -// PolicyDescriptionContract - Policy description details. -type PolicyDescriptionContract struct { - // Policy description contract properties. - Properties *PolicyDescriptionContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// PolicyDescriptionContractProperties - Policy description properties. -type PolicyDescriptionContractProperties struct { - // READ-ONLY; Policy description. - Description *string - - // READ-ONLY; Binary OR value of the Snippet scope. - Scope *int64 -} - -// PortalDelegationSettings - Delegation settings for a developer portal. -type PortalDelegationSettings struct { - // Delegation settings contract properties. - Properties *PortalDelegationSettingsProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// PortalDelegationSettingsProperties - Delegation settings contract properties. -type PortalDelegationSettingsProperties struct { - // Subscriptions delegation settings. - Subscriptions *SubscriptionsDelegationSettingsProperties - - // A delegation Url. - URL *string - - // User registration delegation settings. - UserRegistration *RegistrationDelegationSettingsProperties - - // A base64-encoded validation key to validate, that a request is coming from Azure API Management. - ValidationKey *string -} - -// PortalRevisionClientBeginCreateOrUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginCreateOrUpdate -// method. -type PortalRevisionClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PortalRevisionClientBeginUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginUpdate method. -type PortalRevisionClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PortalRevisionClientGetEntityTagOptions contains the optional parameters for the PortalRevisionClient.GetEntityTag method. -type PortalRevisionClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// PortalRevisionClientGetOptions contains the optional parameters for the PortalRevisionClient.Get method. -type PortalRevisionClientGetOptions struct { - // placeholder for future optional parameters -} - -// PortalRevisionClientListByServiceOptions contains the optional parameters for the PortalRevisionClient.NewListByServicePager -// method. -type PortalRevisionClientListByServiceOptions struct { - // FIELD SUPPORTED OPERATORS SUPPORTED FUNCTIONS - // |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| |description | ge, le, eq, ne, gt, lt | substringof, - // contains, startswith, endswith| |isCurrent | eq, ne | | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// PortalRevisionCollection - Paged list of portal revisions. -type PortalRevisionCollection struct { - // READ-ONLY; Next page link, if any. - NextLink *string - - // READ-ONLY; Collection of portal revisions. - Value []*PortalRevisionContract -} - -// PortalRevisionContract - Portal Revision's contract details. -type PortalRevisionContract struct { - // Properties of the portal revisions. - Properties *PortalRevisionContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -type PortalRevisionContractProperties struct { - // Portal revision description. - Description *string - - // Indicates if the portal's revision is public. - IsCurrent *bool - - // READ-ONLY; Portal's revision creation date and time. - CreatedDateTime *time.Time - - // READ-ONLY; Status of the portal's revision. - Status *PortalRevisionStatus - - // READ-ONLY; Portal revision publishing status details. - StatusDetails *string - - // READ-ONLY; Last updated date and time. - UpdatedDateTime *time.Time -} - -// PortalSettingValidationKeyContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. -type PortalSettingValidationKeyContract struct { - // This is secret value of the validation key in portal settings. - ValidationKey *string -} - -// PortalSettingsClientListByServiceOptions contains the optional parameters for the PortalSettingsClient.ListByService method. -type PortalSettingsClientListByServiceOptions struct { - // placeholder for future optional parameters -} - -// PortalSettingsCollection - Descriptions of APIM policies. -type PortalSettingsCollection struct { - // Total record count number. - Count *int64 - - // Descriptions of APIM policies. - Value []*PortalSettingsContract -} - -// PortalSettingsContract - Portal Settings for the Developer Portal. -type PortalSettingsContract struct { - // Portal Settings contract properties. - Properties *PortalSettingsContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// PortalSettingsContractProperties - Sign-in settings contract properties. -type PortalSettingsContractProperties struct { - // Redirect Anonymous users to the Sign-In page. - Enabled *bool - - // Subscriptions delegation settings. - Subscriptions *SubscriptionsDelegationSettingsProperties - - // Terms of service contract properties. - TermsOfService *TermsOfServiceProperties - - // A delegation Url. - URL *string - - // User registration delegation settings. - UserRegistration *RegistrationDelegationSettingsProperties - - // A base64-encoded validation key to validate, that a request is coming from Azure API Management. - ValidationKey *string -} - -// PortalSigninSettingProperties - Sign-in settings contract properties. -type PortalSigninSettingProperties struct { - // Redirect Anonymous users to the Sign-In page. - Enabled *bool -} - -// PortalSigninSettings - Sign-In settings for the Developer Portal. -type PortalSigninSettings struct { - // Sign-in settings contract properties. - Properties *PortalSigninSettingProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// PortalSignupSettings - Sign-Up settings for a developer portal. -type PortalSignupSettings struct { - // Sign-up settings contract properties. - Properties *PortalSignupSettingsProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// PortalSignupSettingsProperties - Sign-up settings contract properties. -type PortalSignupSettingsProperties struct { - // Allow users to sign up on a developer portal. - Enabled *bool - - // Terms of service contract properties. - TermsOfService *TermsOfServiceProperties -} - -// PrivateEndpoint - The Private Endpoint resource. -type PrivateEndpoint struct { - // READ-ONLY; The ARM identifier for Private Endpoint - ID *string -} - -// PrivateEndpointConnection - The Private Endpoint Connection resource. -type PrivateEndpointConnection struct { - // Resource properties. - Properties *PrivateEndpointConnectionProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// PrivateEndpointConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginCreateOrUpdate -// method. -type PrivateEndpointConnectionClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete -// method. -type PrivateEndpointConnectionClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionClientGetByNameOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetByName -// method. -type PrivateEndpointConnectionClientGetByNameOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionClientGetPrivateLinkResourceOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetPrivateLinkResource -// method. -type PrivateEndpointConnectionClientGetPrivateLinkResourceOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionClientListByServiceOptions contains the optional parameters for the PrivateEndpointConnectionClient.NewListByServicePager -// method. -type PrivateEndpointConnectionClientListByServiceOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionClientListPrivateLinkResourcesOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListPrivateLinkResources -// method. -type PrivateEndpointConnectionClientListPrivateLinkResourcesOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account -type PrivateEndpointConnectionListResult struct { - // Array of private endpoint connections - Value []*PrivateEndpointConnection -} - -// PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. -type PrivateEndpointConnectionProperties struct { - // REQUIRED; A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState - - // The resource of private end point. - PrivateEndpoint *PrivateEndpoint - - // READ-ONLY; The provisioning state of the private endpoint connection resource. - ProvisioningState *PrivateEndpointConnectionProvisioningState -} - -// PrivateEndpointConnectionRequest - A request to approve or reject a private endpoint connection -type PrivateEndpointConnectionRequest struct { - // Private Endpoint Connection Resource Id. - ID *string - - // The connection state of the private endpoint connection. - Properties *PrivateEndpointConnectionRequestProperties -} - -// PrivateEndpointConnectionRequestProperties - The connection state of the private endpoint connection. -type PrivateEndpointConnectionRequestProperties struct { - // A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState -} - -// PrivateEndpointConnectionWrapperProperties - Properties of the PrivateEndpointConnectProperties. -type PrivateEndpointConnectionWrapperProperties struct { - // REQUIRED; A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState - - // The resource of private end point. - PrivateEndpoint *ArmIDWrapper - - // READ-ONLY; All the Group ids. - GroupIDs []*string - - // READ-ONLY; The provisioning state of the private endpoint connection resource. - ProvisioningState *string -} - -// PrivateLinkResource - A private link resource -type PrivateLinkResource struct { - // Resource properties. - Properties *PrivateLinkResourceProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// PrivateLinkResourceListResult - A list of private link resources -type PrivateLinkResourceListResult struct { - // Array of private link resources - Value []*PrivateLinkResource -} - -// PrivateLinkResourceProperties - Properties of a private link resource. -type PrivateLinkResourceProperties struct { - // The private link resource Private link DNS zone name. - RequiredZoneNames []*string - - // READ-ONLY; The private link resource group id. - GroupID *string - - // READ-ONLY; The private link resource required member names. - RequiredMembers []*string -} - -// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer -// and provider. -type PrivateLinkServiceConnectionState struct { - // A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *string - - // The reason for approval/rejection of the connection. - Description *string - - // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - Status *PrivateEndpointServiceConnectionStatus -} - -// ProductAPIClientCheckEntityExistsOptions contains the optional parameters for the ProductAPIClient.CheckEntityExists method. -type ProductAPIClientCheckEntityExistsOptions struct { - // placeholder for future optional parameters -} - -// ProductAPIClientCreateOrUpdateOptions contains the optional parameters for the ProductAPIClient.CreateOrUpdate method. -type ProductAPIClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProductAPIClientDeleteOptions contains the optional parameters for the ProductAPIClient.Delete method. -type ProductAPIClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ProductAPIClientListByProductOptions contains the optional parameters for the ProductAPIClient.NewListByProductPager method. -type ProductAPIClientListByProductOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ProductClientCreateOrUpdateOptions contains the optional parameters for the ProductClient.CreateOrUpdate method. -type ProductClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// ProductClientDeleteOptions contains the optional parameters for the ProductClient.Delete method. -type ProductClientDeleteOptions struct { - // Delete existing subscriptions associated with the product or not. - DeleteSubscriptions *bool -} - -// ProductClientGetEntityTagOptions contains the optional parameters for the ProductClient.GetEntityTag method. -type ProductClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// ProductClientGetOptions contains the optional parameters for the ProductClient.Get method. -type ProductClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProductClientListByServiceOptions contains the optional parameters for the ProductClient.NewListByServicePager method. -type ProductClientListByServiceOptions struct { - // When set to true, the response contains an array of groups that have visibility to the product. The default is false. - ExpandGroups *bool - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | state | filter | eq | | - // | groups | expand | | | - Filter *string - // Number of records to skip. - Skip *int32 - // Products which are part of a specific tag. - Tags *string - // Number of records to return. - Top *int32 -} - -// ProductClientListByTagsOptions contains the optional parameters for the ProductClient.NewListByTagsPager method. -type ProductClientListByTagsOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | state | filter | eq | substringof, contains, startswith, endswith | - Filter *string - // Include not tagged Products. - IncludeNotTaggedProducts *bool - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ProductClientUpdateOptions contains the optional parameters for the ProductClient.Update method. -type ProductClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProductCollection - Paged Products list representation. -type ProductCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*ProductContract -} - -// ProductContract - Product details. -type ProductContract struct { - // Product entity contract properties. - Properties *ProductContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// ProductContractProperties - Product profile. -type ProductContractProperties struct { - // REQUIRED; Product name. - DisplayName *string - - // whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers - // to call the product’s APIs immediately after subscribing. If true, - // administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present - // only if subscriptionRequired property is present and has a value of false. - ApprovalRequired *bool - - // Product description. May include HTML formatting tags. - Description *string - - // whether product is published or not. Published products are discoverable by users of developer portal. Non published products - // are visible only to administrators. Default state of Product is - // notPublished. - State *ProductState - - // Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred - // to as "protected" and a valid subscription key is required for a request to an - // API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included - // in the product can be made without a subscription key. If property is omitted - // when creating a new product it's value is assumed to be true. - SubscriptionRequired *bool - - // Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited - // per user subscriptions. Can be present only if subscriptionRequired - // property is present and has a value of false. - SubscriptionsLimit *int32 - - // Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms - // before they can complete the subscription process. - Terms *string -} - -// ProductEntityBaseParameters - Product Entity Base Parameters -type ProductEntityBaseParameters struct { - // whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers - // to call the product’s APIs immediately after subscribing. If true, - // administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present - // only if subscriptionRequired property is present and has a value of false. - ApprovalRequired *bool - - // Product description. May include HTML formatting tags. - Description *string - - // whether product is published or not. Published products are discoverable by users of developer portal. Non published products - // are visible only to administrators. Default state of Product is - // notPublished. - State *ProductState - - // Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred - // to as "protected" and a valid subscription key is required for a request to an - // API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included - // in the product can be made without a subscription key. If property is omitted - // when creating a new product it's value is assumed to be true. - SubscriptionRequired *bool - - // Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited - // per user subscriptions. Can be present only if subscriptionRequired - // property is present and has a value of false. - SubscriptionsLimit *int32 - - // Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms - // before they can complete the subscription process. - Terms *string -} - -// ProductGroupClientCheckEntityExistsOptions contains the optional parameters for the ProductGroupClient.CheckEntityExists -// method. -type ProductGroupClientCheckEntityExistsOptions struct { - // placeholder for future optional parameters -} - -// ProductGroupClientCreateOrUpdateOptions contains the optional parameters for the ProductGroupClient.CreateOrUpdate method. -type ProductGroupClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProductGroupClientDeleteOptions contains the optional parameters for the ProductGroupClient.Delete method. -type ProductGroupClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ProductGroupClientListByProductOptions contains the optional parameters for the ProductGroupClient.NewListByProductPager -// method. -type ProductGroupClientListByProductOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | | - // | displayName | filter | eq, ne | | - // | description | filter | eq, ne | | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ProductPolicyClientCreateOrUpdateOptions contains the optional parameters for the ProductPolicyClient.CreateOrUpdate method. -type ProductPolicyClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// ProductPolicyClientDeleteOptions contains the optional parameters for the ProductPolicyClient.Delete method. -type ProductPolicyClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ProductPolicyClientGetEntityTagOptions contains the optional parameters for the ProductPolicyClient.GetEntityTag method. -type ProductPolicyClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// ProductPolicyClientGetOptions contains the optional parameters for the ProductPolicyClient.Get method. -type ProductPolicyClientGetOptions struct { - // Policy Export Format. - Format *PolicyExportFormat -} - -// ProductPolicyClientListByProductOptions contains the optional parameters for the ProductPolicyClient.ListByProduct method. -type ProductPolicyClientListByProductOptions struct { - // placeholder for future optional parameters -} - -// ProductSubscriptionsClientListOptions contains the optional parameters for the ProductSubscriptionsClient.NewListPager -// method. -type ProductSubscriptionsClientListOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | state | filter | eq | | - // | user | expand | | | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ProductTagResourceContractProperties - Product profile. -type ProductTagResourceContractProperties struct { - // REQUIRED; Product name. - Name *string - - // whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers - // to call the product’s APIs immediately after subscribing. If true, - // administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present - // only if subscriptionRequired property is present and has a value of false. - ApprovalRequired *bool - - // Product description. May include HTML formatting tags. - Description *string - - // Identifier of the product in the form of /products/{productId} - ID *string - - // whether product is published or not. Published products are discoverable by users of developer portal. Non published products - // are visible only to administrators. Default state of Product is - // notPublished. - State *ProductState - - // Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred - // to as "protected" and a valid subscription key is required for a request to an - // API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included - // in the product can be made without a subscription key. If property is omitted - // when creating a new product it's value is assumed to be true. - SubscriptionRequired *bool - - // Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited - // per user subscriptions. Can be present only if subscriptionRequired - // property is present and has a value of false. - SubscriptionsLimit *int32 - - // Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms - // before they can complete the subscription process. - Terms *string -} - -// ProductUpdateParameters - Product Update parameters. -type ProductUpdateParameters struct { - // Product entity Update contract properties. - Properties *ProductUpdateProperties -} - -// ProductUpdateProperties - Parameters supplied to the Update Product operation. -type ProductUpdateProperties struct { - // whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers - // to call the product’s APIs immediately after subscribing. If true, - // administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present - // only if subscriptionRequired property is present and has a value of false. - ApprovalRequired *bool - - // Product description. May include HTML formatting tags. - Description *string - - // Product name. - DisplayName *string - - // whether product is published or not. Published products are discoverable by users of developer portal. Non published products - // are visible only to administrators. Default state of Product is - // notPublished. - State *ProductState - - // Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred - // to as "protected" and a valid subscription key is required for a request to an - // API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included - // in the product can be made without a subscription key. If property is omitted - // when creating a new product it's value is assumed to be true. - SubscriptionRequired *bool - - // Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited - // per user subscriptions. Can be present only if subscriptionRequired - // property is present and has a value of false. - SubscriptionsLimit *int32 - - // Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms - // before they can complete the subscription process. - Terms *string -} - -// QuotaByCounterKeysClientListByServiceOptions contains the optional parameters for the QuotaByCounterKeysClient.ListByService -// method. -type QuotaByCounterKeysClientListByServiceOptions struct { - // placeholder for future optional parameters -} - -// QuotaByCounterKeysClientUpdateOptions contains the optional parameters for the QuotaByCounterKeysClient.Update method. -type QuotaByCounterKeysClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// QuotaByPeriodKeysClientGetOptions contains the optional parameters for the QuotaByPeriodKeysClient.Get method. -type QuotaByPeriodKeysClientGetOptions struct { - // placeholder for future optional parameters -} - -// QuotaByPeriodKeysClientUpdateOptions contains the optional parameters for the QuotaByPeriodKeysClient.Update method. -type QuotaByPeriodKeysClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// QuotaCounterCollection - Paged Quota Counter list representation. -type QuotaCounterCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Quota counter values. - Value []*QuotaCounterContract -} - -// QuotaCounterContract - Quota counter details. -type QuotaCounterContract struct { - // REQUIRED; The Key value of the Counter. Must not be empty. - CounterKey *string - - // REQUIRED; The date of the end of Counter Period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified - // by the ISO 8601 standard. - PeriodEndTime *time.Time - - // REQUIRED; Identifier of the Period for which the counter was collected. Must not be empty. - PeriodKey *string - - // REQUIRED; The date of the start of Counter Period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified - // by the ISO 8601 standard. - PeriodStartTime *time.Time - - // Quota Value Properties - Value *QuotaCounterValueContractProperties -} - -// QuotaCounterValueContract - Quota counter value details. -type QuotaCounterValueContract struct { - // Quota counter Value Properties. - Value *QuotaCounterValueContractProperties -} - -// QuotaCounterValueContractProperties - Quota counter value details. -type QuotaCounterValueContractProperties struct { - // Number of times Counter was called. - CallsCount *int32 - - // Data Transferred in KiloBytes. - KbTransferred *float64 -} - -// QuotaCounterValueUpdateContract - Quota counter value details. -type QuotaCounterValueUpdateContract struct { - // Quota counter value details. - Properties *QuotaCounterValueContractProperties -} - -// RecipientEmailCollection - Paged Recipient User list representation. -type RecipientEmailCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*RecipientEmailContract -} - -// RecipientEmailContract - Recipient Email details. -type RecipientEmailContract struct { - // Recipient Email contract properties. - Properties *RecipientEmailContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// RecipientEmailContractProperties - Recipient Email Contract Properties. -type RecipientEmailContractProperties struct { - // User Email subscribed to notification. - Email *string -} - -// RecipientUserCollection - Paged Recipient User list representation. -type RecipientUserCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*RecipientUserContract -} - -// RecipientUserContract - Recipient User details. -type RecipientUserContract struct { - // Recipient User entity contract properties. - Properties *RecipientUsersContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// RecipientUsersContractProperties - Recipient User Contract Properties. -type RecipientUsersContractProperties struct { - // API Management UserId subscribed to notification. - UserID *string -} - -// RecipientsContractProperties - Notification Parameter contract. -type RecipientsContractProperties struct { - // List of Emails subscribed for the notification. - Emails []*string - - // List of Users subscribed for the notification. - Users []*string -} - -// RegionClientListByServiceOptions contains the optional parameters for the RegionClient.NewListByServicePager method. -type RegionClientListByServiceOptions struct { - // placeholder for future optional parameters -} - -// RegionContract - Region profile. -type RegionContract struct { - // whether Region is deleted. - IsDeleted *bool - - // whether Region is the master region. - IsMasterRegion *bool - - // READ-ONLY; Region name. - Name *string -} - -// RegionListResult - Lists Regions operation response details. -type RegionListResult struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Lists of Regions. - Value []*RegionContract -} - -// RegistrationDelegationSettingsProperties - User registration delegation settings properties. -type RegistrationDelegationSettingsProperties struct { - // Enable or disable delegation for user registration. - Enabled *bool -} - -// RemotePrivateEndpointConnectionWrapper - Remote Private Endpoint Connection resource. -type RemotePrivateEndpointConnectionWrapper struct { - // Private Endpoint connection resource id - ID *string - - // Private Endpoint Connection Name - Name *string - - // Resource properties. - Properties *PrivateEndpointConnectionWrapperProperties - - // Private Endpoint Connection Resource Type - Type *string -} - -// ReportCollection - Paged Report records list representation. -type ReportCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*ReportRecordContract -} - -// ReportRecordContract - Report data. -type ReportRecordContract struct { - // API identifier path. /apis/{apiId} - APIID *string - - // API region identifier. - APIRegion *string - - // Average time it took to process request. - APITimeAvg *float64 - - // Maximum time it took to process request. - APITimeMax *float64 - - // Minimum time it took to process request. - APITimeMin *float64 - - // Bandwidth consumed. - Bandwidth *int64 - - // Number of times when content was served from cache policy. - CacheHitCount *int32 - - // Number of times content was fetched from backend. - CacheMissCount *int32 - - // Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden - // and HttpStatusCode.TooManyRequests - CallCountBlocked *int32 - - // Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and - // any Code between HttpStatusCode.InternalServerError (500) and 600 - CallCountFailed *int32 - - // Number of other calls. - CallCountOther *int32 - - // Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect - CallCountSuccess *int32 - - // Total number of calls. - CallCountTotal *int32 - - // Country to which this record data is related. - Country *string - - // Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 - // format (http://en.wikipedia.org/wiki/ISO_8601#Durations). - Interval *string - - // Name depending on report endpoint specifies product, API, operation or developer name. - Name *string - - // Operation identifier path. /apis/{apiId}/operations/{operationId} - OperationID *string - - // Country region to which this record data is related. - Region *string - - // Average time it took to process request on backend. - ServiceTimeAvg *float64 - - // Maximum time it took to process request on backend. - ServiceTimeMax *float64 - - // Minimum time it took to process request on backend. - ServiceTimeMin *float64 - - // Subscription identifier path. /subscriptions/{subscriptionId} - SubscriptionID *string - - // Start of aggregation period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 - // standard. - Timestamp *time.Time - - // Zip code to which this record data is related. - Zip *string - - // READ-ONLY; Product identifier path. /products/{productId} - ProductID *string - - // READ-ONLY; User identifier path. /users/{userId} - UserID *string -} - -// ReportsClientListByAPIOptions contains the optional parameters for the ReportsClient.NewListByAPIPager method. -type ReportsClientListByAPIOptions struct { - // OData order by query option. - Orderby *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ReportsClientListByGeoOptions contains the optional parameters for the ReportsClient.NewListByGeoPager method. -type ReportsClientListByGeoOptions struct { - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ReportsClientListByOperationOptions contains the optional parameters for the ReportsClient.NewListByOperationPager method. -type ReportsClientListByOperationOptions struct { - // OData order by query option. - Orderby *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ReportsClientListByProductOptions contains the optional parameters for the ReportsClient.NewListByProductPager method. -type ReportsClientListByProductOptions struct { - // OData order by query option. - Orderby *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ReportsClientListByRequestOptions contains the optional parameters for the ReportsClient.NewListByRequestPager method. -type ReportsClientListByRequestOptions struct { - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ReportsClientListBySubscriptionOptions contains the optional parameters for the ReportsClient.NewListBySubscriptionPager -// method. -type ReportsClientListBySubscriptionOptions struct { - // OData order by query option. - Orderby *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ReportsClientListByTimeOptions contains the optional parameters for the ReportsClient.NewListByTimePager method. -type ReportsClientListByTimeOptions struct { - // OData order by query option. - Orderby *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// ReportsClientListByUserOptions contains the optional parameters for the ReportsClient.NewListByUserPager method. -type ReportsClientListByUserOptions struct { - // OData order by query option. - Orderby *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// RepresentationContract - Operation request/response representation details. -type RepresentationContract struct { - // REQUIRED; Specifies a registered or custom content type for this representation, e.g. application/xml. - ContentType *string - - // Exampled defined for the representation. - Examples map[string]*ParameterExampleContract - - // Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. - FormParameters []*ParameterContract - - // Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. - SchemaID *string - - // Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' - // nor 'multipart/form-data'. - TypeName *string -} - -// RequestContract - Operation request details. -type RequestContract struct { - // Operation request description. - Description *string - - // Collection of operation request headers. - Headers []*ParameterContract - - // Collection of operation request query parameters. - QueryParameters []*ParameterContract - - // Collection of operation request representations. - Representations []*RepresentationContract -} - -// RequestReportCollection - Paged Report records list representation. -type RequestReportCollection struct { - // Total record count number across all pages. - Count *int64 - - // Page values. - Value []*RequestReportRecordContract -} - -// RequestReportRecordContract - Request Report data. -type RequestReportRecordContract struct { - // API identifier path. /apis/{apiId} - APIID *string - - // Azure region where the gateway that processed this request is located. - APIRegion *string - - // The total time it took to process this request. - APITime *float64 - - // The HTTP status code received by the gateway as a result of forwarding this request to the backend. - BackendResponseCode *string - - // Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the - // value is hit, cached response was returned. If the value is miss, the cache - // was used but lookup resulted in a miss and request was fulfilled by the backend. - Cache *string - - // The client IP address associated with this request. - IPAddress *string - - // The HTTP method associated with this request.. - Method *string - - // Operation identifier path. /apis/{apiId}/operations/{operationId} - OperationID *string - - // Request Identifier. - RequestID *string - - // The size of this request.. - RequestSize *int32 - - // The HTTP status code returned by the gateway. - ResponseCode *int32 - - // The size of the response returned by the gateway. - ResponseSize *int32 - - // he time it took to forward this request to the backend and get the response back. - ServiceTime *float64 - - // Subscription identifier path. /subscriptions/{subscriptionId} - SubscriptionID *string - - // The date and time when this request was received by the gateway in ISO 8601 format. - Timestamp *time.Time - - // The full URL associated with this request. - URL *string - - // READ-ONLY; Product identifier path. /products/{productId} - ProductID *string - - // READ-ONLY; User identifier path. /users/{userId} - UserID *string -} - -// Resource - Common fields that are returned in the response for all Azure Resource Manager resources -type Resource struct { - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// ResourceLocationDataContract - Resource location data properties. -type ResourceLocationDataContract struct { - // REQUIRED; A canonical name for the geographic or physical location. - Name *string - - // The city or locality where the resource is located. - City *string - - // The country or region where the resource is located. - CountryOrRegion *string - - // The district, state, or province where the resource is located. - District *string -} - -// ResourceSKU - Describes an available API Management SKU. -type ResourceSKU struct { - // Name of the Sku. - Name *SKUType -} - -// ResourceSKUCapacity - Describes scaling information of a SKU. -type ResourceSKUCapacity struct { - // READ-ONLY; The default capacity. - Default *int32 - - // READ-ONLY; The maximum capacity that can be set. - Maximum *int32 - - // READ-ONLY; The minimum capacity. - Minimum *int32 - - // READ-ONLY; The scale type applicable to the sku. - ScaleType *ResourceSKUCapacityScaleType -} - -// ResourceSKUResult - Describes an available API Management service SKU. -type ResourceSKUResult struct { - // READ-ONLY; Specifies the number of API Management units. - Capacity *ResourceSKUCapacity - - // READ-ONLY; The type of resource the SKU applies to. - ResourceType *string - - // READ-ONLY; Specifies API Management SKU. - SKU *ResourceSKU -} - -// ResourceSKUResults - The API Management service SKUs operation response. -type ResourceSKUResults struct { - // REQUIRED; The list of skus available for the service. - Value []*ResourceSKUResult - - // The uri to fetch the next page of API Management service Skus. - NextLink *string -} - -// ResponseContract - Operation response details. -type ResponseContract struct { - // REQUIRED; Operation response HTTP status code. - StatusCode *int32 - - // Operation response description. - Description *string - - // Collection of operation response headers. - Headers []*ParameterContract - - // Collection of operation response representations. - Representations []*RepresentationContract -} - -// SKU - Describes an available ApiManagement SKU. -type SKU struct { - // READ-ONLY; The api versions that support this SKU. - APIVersions []*string - - // READ-ONLY; A name value pair to describe the capability. - Capabilities []*SKUCapabilities - - // READ-ONLY; Specifies the number of virtual machines in the scale set. - Capacity *SKUCapacity - - // READ-ONLY; Metadata for retrieving price info. - Costs []*SKUCosts - - // READ-ONLY; The Family of this particular SKU. - Family *string - - // READ-ONLY; The Kind of resources that are supported in this SKU. - Kind *string - - // READ-ONLY; A list of locations and availability zones in those locations where the SKU is available. - LocationInfo []*SKULocationInfo - - // READ-ONLY; The set of locations that the SKU is available. - Locations []*string - - // READ-ONLY; The name of SKU. - Name *string - - // READ-ONLY; The type of resource the SKU applies to. - ResourceType *string - - // READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. - Restrictions []*SKURestrictions - - // READ-ONLY; The Size of the SKU. - Size *string - - // READ-ONLY; Specifies the tier of virtual machines in a scale set. - // Possible Values: - // Standard - // Basic - Tier *string -} - -// SKUCapabilities - Describes The SKU capabilities object. -type SKUCapabilities struct { - // READ-ONLY; An invariant to describe the feature. - Name *string - - // READ-ONLY; An invariant if the feature is measured by quantity. - Value *string -} - -// SKUCapacity - Describes scaling information of a SKU. -type SKUCapacity struct { - // READ-ONLY; The default capacity. - Default *int32 - - // READ-ONLY; The maximum capacity that can be set. - Maximum *int32 - - // READ-ONLY; The minimum capacity. - Minimum *int32 - - // READ-ONLY; The scale type applicable to the sku. - ScaleType *APIManagementSKUCapacityScaleType -} - -// SKUCosts - Describes metadata for retrieving price info. -type SKUCosts struct { - // READ-ONLY; An invariant to show the extended unit. - ExtendedUnit *string - - // READ-ONLY; Used for querying price from commerce. - MeterID *string - - // READ-ONLY; The multiplier is needed to extend the base metered cost. - Quantity *int64 -} - -type SKULocationInfo struct { - // READ-ONLY; Location of the SKU - Location *string - - // READ-ONLY; Details of capabilities available to a SKU in specific zones. - ZoneDetails []*SKUZoneDetails - - // READ-ONLY; List of availability zones where the SKU is supported. - Zones []*string -} - -type SKURestrictionInfo struct { - // READ-ONLY; Locations where the SKU is restricted - Locations []*string - - // READ-ONLY; List of availability zones where the SKU is restricted. - Zones []*string -} - -// SKURestrictions - Describes scaling information of a SKU. -type SKURestrictions struct { - // READ-ONLY; The reason for restriction. - ReasonCode *APIManagementSKURestrictionsReasonCode - - // READ-ONLY; The information about the restriction where the SKU cannot be used. - RestrictionInfo *SKURestrictionInfo - - // READ-ONLY; The type of restrictions. - Type *APIManagementSKURestrictionsType - - // READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where - // the SKU is restricted. - Values []*string -} - -// SKUZoneDetails - Describes The zonal capabilities of a SKU. -type SKUZoneDetails struct { - // READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones. - Capabilities []*SKUCapabilities - - // READ-ONLY; The set of zones that the SKU is available in with the specified capabilities. - Name []*string -} - -// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. -type SKUsClientListOptions struct { - // placeholder for future optional parameters -} - -// SKUsResult - The List Resource Skus operation response. -type SKUsResult struct { - // REQUIRED; The list of skus available for the subscription. - Value []*SKU - - // READ-ONLY; The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource - // Skus - NextLink *string -} - -// SamplingSettings - Sampling settings for Diagnostic. -type SamplingSettings struct { - // Rate of sampling for fixed-rate sampling. - Percentage *float64 - - // Sampling type. - SamplingType *SamplingType -} - -// SaveConfigurationParameter - Save Tenant Configuration Contract details. -type SaveConfigurationParameter struct { - // Properties of the Save Configuration Parameters. - Properties *SaveConfigurationParameterProperties -} - -// SaveConfigurationParameterProperties - Parameters supplied to the Save Tenant Configuration operation. -type SaveConfigurationParameterProperties struct { - // REQUIRED; The name of the Git branch in which to commit the current configuration snapshot. - Branch *string - - // The value if true, the current configuration database is committed to the Git repository, even if the Git repository has - // newer changes that would be overwritten. - Force *bool -} - -// SchemaCollection - The response of the list schema operation. -type SchemaCollection struct { - // Total record count number. - Count *int64 - - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; API Schema Contract value. - Value []*SchemaContract -} - -// SchemaContract - API Schema Contract details. -type SchemaContract struct { - // Properties of the API Schema. - Properties *SchemaContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// SchemaContractProperties - API Schema create or update contract Properties. -type SchemaContractProperties struct { - // REQUIRED; Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema - // document (e.g. application/json, application/xml). - // - Swagger Schema use application/vnd.ms-azure-apim.swagger.definitions+json - // - WSDL Schema use application/vnd.ms-azure-apim.xsd+xml - // - OpenApi Schema use application/vnd.oai.openapi.components+json - // - WADL Schema use application/vnd.ms-azure-apim.wadl.grammars+xml. - ContentType *string - - // Create or update Properties of the API Schema Document. - Document *SchemaDocumentProperties -} - -// SchemaDocumentProperties - Api Schema Document Properties. -type SchemaDocumentProperties struct { - // Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. - Components any - - // Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. - Definitions any - - // Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. - Value *string -} - -// ServiceApplyNetworkConfigurationParameters - Parameter supplied to the Apply Network configuration operation. -type ServiceApplyNetworkConfigurationParameters struct { - // Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, - // this parameter is not required. - Location *string -} - -// ServiceBackupRestoreParameters - Parameters supplied to the Backup/Restore of an API Management service operation. -type ServiceBackupRestoreParameters struct { - // REQUIRED; The name of the backup file to create/retrieve. - BackupName *string - - // REQUIRED; The name of the blob container (used to place/retrieve the backup). - ContainerName *string - - // REQUIRED; The name of the Azure storage account (used to place/retrieve the backup). - StorageAccount *string - - // Storage account access key. Required only if accessType is set to AccessKey. - AccessKey *string - - // The type of access to be used for the storage account. - AccessType *AccessType - - // The Client ID of user assigned managed identity. Required only if accessType is set to UserAssignedManagedIdentity. - ClientID *string -} - -// ServiceBaseProperties - Base Properties of an API Management service resource description. -type ServiceBaseProperties struct { - // Control Plane Apis version constraint for the API Management service. - APIVersionConstraint *APIVersionConstraint - - // Additional datacenter locations of the API Management service. - AdditionalLocations []*AdditionalLocation - - // List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed - // is 10. - Certificates []*CertificateConfiguration - - // Custom properties of the API Management service. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA - // for all TLS(1.0, 1.1 and 1.2). - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API - // Management service. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1 - // for communications with backends. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for - // communications with backends. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an - // API Management service. - // Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For - // all the settings except Http2 the default value is True if the service was - // created on or before April 1st 2018 and False otherwise. Http2 setting's default value is False. - // You can disable any of next ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]: - // TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA, TLS - // ECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256, - // TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For example, - // Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default value - // is true for them. Note: next ciphers can't be disabled since they are required by - // Azure CloudService internal components: TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCMSHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBC - // SHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256,TLSRSAWITHAES256GCMSHA384 - CustomProperties map[string]*string - - // Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway - // in master region. - DisableGateway *bool - - // Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each - // request to the gateway. This also enables the ability to authenticate the - // certificate in the policy on the gateway. - EnableClientCertificate *bool - - // Custom hostname configuration of the API Management service. - HostnameConfigurations []*HostnameConfiguration - - // Email address from which the notification will be sent. - NotificationSenderEmail *string - - // List of Private Endpoint Connections of this service. - PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper - - // Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported - // only for Developer and Premium SKU being deployed in Virtual Network. - PublicIPAddressID *string - - // Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must - // be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the - // exclusive access method. Default value is 'Enabled' - PublicNetworkAccess *PublicNetworkAccess - - // Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other - // properties will be ignored. - Restore *bool - - // Virtual network configuration of the API Management service. - VirtualNetworkConfiguration *VirtualNetworkConfiguration - - // The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management - // service is not part of any Virtual Network, External means the API Management - // deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management - // deployment is setup inside a Virtual Network having an Intranet Facing Endpoint - // only. - VirtualNetworkType *VirtualNetworkType - - // READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ - // as specified by the ISO 8601 standard. - CreatedAtUTC *time.Time - - // READ-ONLY; DEveloper Portal endpoint URL of the API Management service. - DeveloperPortalURL *string - - // READ-ONLY; Gateway URL of the API Management service in the Default Region. - GatewayRegionalURL *string - - // READ-ONLY; Gateway URL of the API Management service. - GatewayURL *string - - // READ-ONLY; Management API endpoint URL of the API Management service. - ManagementAPIURL *string - - // READ-ONLY; Compute Platform Version running the service in this location. - PlatformVersion *PlatformVersion - - // READ-ONLY; Publisher portal endpoint Url of the API Management service. - PortalURL *string - - // READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed - // in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated - // SKU. - PrivateIPAddresses []*string - - // READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - ProvisioningState *string - - // READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for - // Basic, Standard, Premium and Isolated SKU. - PublicIPAddresses []*string - - // READ-ONLY; SCM endpoint URL of the API Management service. - ScmURL *string - - // READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started - // on the service. - TargetProvisioningState *string -} - -// ServiceCheckNameAvailabilityParameters - Parameters supplied to the CheckNameAvailability operation. -type ServiceCheckNameAvailabilityParameters struct { - // REQUIRED; The name to check for availability. - Name *string -} - -// ServiceClientBeginApplyNetworkConfigurationUpdatesOptions contains the optional parameters for the ServiceClient.BeginApplyNetworkConfigurationUpdates -// method. -type ServiceClientBeginApplyNetworkConfigurationUpdatesOptions struct { - // Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which - // the Api Management service is deployed will be updated sequentially without - // incurring downtime in the region. - Parameters *ServiceApplyNetworkConfigurationParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceClientBeginBackupOptions contains the optional parameters for the ServiceClient.BeginBackup method. -type ServiceClientBeginBackupOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceClient.BeginCreateOrUpdate method. -type ServiceClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method. -type ServiceClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceClientBeginRestoreOptions contains the optional parameters for the ServiceClient.BeginRestore method. -type ServiceClientBeginRestoreOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceClientBeginUpdateOptions contains the optional parameters for the ServiceClient.BeginUpdate method. -type ServiceClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceClientCheckNameAvailabilityOptions contains the optional parameters for the ServiceClient.CheckNameAvailability -// method. -type ServiceClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ServiceClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the ServiceClient.GetDomainOwnershipIdentifier -// method. -type ServiceClientGetDomainOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method. -type ServiceClientGetOptions struct { - // placeholder for future optional parameters -} - -// ServiceClientGetSsoTokenOptions contains the optional parameters for the ServiceClient.GetSsoToken method. -type ServiceClientGetSsoTokenOptions struct { - // placeholder for future optional parameters -} - -// ServiceClientListByResourceGroupOptions contains the optional parameters for the ServiceClient.NewListByResourceGroupPager -// method. -type ServiceClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method. -type ServiceClientListOptions struct { - // placeholder for future optional parameters -} - -// ServiceGetDomainOwnershipIdentifierResult - Response of the GetDomainOwnershipIdentifier operation. -type ServiceGetDomainOwnershipIdentifierResult struct { - // READ-ONLY; The domain ownership identifier value. - DomainOwnershipIdentifier *string -} - -// ServiceGetSsoTokenResult - The response of the GetSsoToken operation. -type ServiceGetSsoTokenResult struct { - // Redirect URL to the Publisher Portal containing the SSO token. - RedirectURI *string -} - -// ServiceIdentity - Identity properties of the Api Management service resource. -type ServiceIdentity struct { - // REQUIRED; The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly - // created identity and a set of user assigned identities. The type 'None' will remove any - // identities from the service. - Type *ApimIdentityType - - // The list of user 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]*UserIdentityProperties - - // READ-ONLY; The principal id of the identity. - PrincipalID *string - - // READ-ONLY; The client tenant id of the identity. - TenantID *string -} - -// ServiceListResult - The response of the List API Management services operation. -type ServiceListResult struct { - // REQUIRED; Result of the List API Management services operation. - Value []*ServiceResource - - // Link to the next set of results. Not empty if Value contains incomplete list of API Management services. - NextLink *string -} - -// ServiceNameAvailabilityResult - Response of the CheckNameAvailability operation. -type ServiceNameAvailabilityResult struct { - // Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported - // characters, etc.) AlreadyExists indicates that the name is already in use - // and is therefore unavailable. - Reason *NameAvailabilityReason - - // READ-ONLY; If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource - // naming requirements so that the user can select a valid name. If reason == AlreadyExists, - // explain that is already in use, and direct them to select a different name. - Message *string - - // READ-ONLY; True if the name is available and can be used to create a new API Management service; otherwise false. - NameAvailable *bool -} - -// ServiceProperties - Properties of an API Management service resource description. -type ServiceProperties struct { - // REQUIRED; Publisher email. - PublisherEmail *string - - // REQUIRED; Publisher name. - PublisherName *string - - // Control Plane Apis version constraint for the API Management service. - APIVersionConstraint *APIVersionConstraint - - // Additional datacenter locations of the API Management service. - AdditionalLocations []*AdditionalLocation - - // List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed - // is 10. - Certificates []*CertificateConfiguration - - // Custom properties of the API Management service. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA - // for all TLS(1.0, 1.1 and 1.2). - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API - // Management service. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1 - // for communications with backends. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for - // communications with backends. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an - // API Management service. - // Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For - // all the settings except Http2 the default value is True if the service was - // created on or before April 1st 2018 and False otherwise. Http2 setting's default value is False. - // You can disable any of next ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]: - // TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA, TLS - // ECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256, - // TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For example, - // Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default value - // is true for them. Note: next ciphers can't be disabled since they are required by - // Azure CloudService internal components: TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCMSHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBC - // SHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256,TLSRSAWITHAES256GCMSHA384 - CustomProperties map[string]*string - - // Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway - // in master region. - DisableGateway *bool - - // Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each - // request to the gateway. This also enables the ability to authenticate the - // certificate in the policy on the gateway. - EnableClientCertificate *bool - - // Custom hostname configuration of the API Management service. - HostnameConfigurations []*HostnameConfiguration - - // Email address from which the notification will be sent. - NotificationSenderEmail *string - - // List of Private Endpoint Connections of this service. - PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper - - // Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported - // only for Developer and Premium SKU being deployed in Virtual Network. - PublicIPAddressID *string - - // Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must - // be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the - // exclusive access method. Default value is 'Enabled' - PublicNetworkAccess *PublicNetworkAccess - - // Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other - // properties will be ignored. - Restore *bool - - // Virtual network configuration of the API Management service. - VirtualNetworkConfiguration *VirtualNetworkConfiguration - - // The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management - // service is not part of any Virtual Network, External means the API Management - // deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management - // deployment is setup inside a Virtual Network having an Intranet Facing Endpoint - // only. - VirtualNetworkType *VirtualNetworkType - - // READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ - // as specified by the ISO 8601 standard. - CreatedAtUTC *time.Time - - // READ-ONLY; DEveloper Portal endpoint URL of the API Management service. - DeveloperPortalURL *string - - // READ-ONLY; Gateway URL of the API Management service in the Default Region. - GatewayRegionalURL *string - - // READ-ONLY; Gateway URL of the API Management service. - GatewayURL *string - - // READ-ONLY; Management API endpoint URL of the API Management service. - ManagementAPIURL *string - - // READ-ONLY; Compute Platform Version running the service in this location. - PlatformVersion *PlatformVersion - - // READ-ONLY; Publisher portal endpoint Url of the API Management service. - PortalURL *string - - // READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed - // in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated - // SKU. - PrivateIPAddresses []*string - - // READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - ProvisioningState *string - - // READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for - // Basic, Standard, Premium and Isolated SKU. - PublicIPAddresses []*string - - // READ-ONLY; SCM endpoint URL of the API Management service. - ScmURL *string - - // READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started - // on the service. - TargetProvisioningState *string -} - -// ServiceResource - A single API Management service resource in List or Get response. -type ServiceResource struct { - // REQUIRED; Resource location. - Location *string - - // REQUIRED; Properties of the API Management service. - Properties *ServiceProperties - - // REQUIRED; SKU properties of the API Management service. - SKU *ServiceSKUProperties - - // Managed service identity of the Api Management service. - Identity *ServiceIdentity - - // Resource tags. - Tags map[string]*string - - // A list of availability zones denoting where the resource needs to come from. - Zones []*string - - // READ-ONLY; ETag of the resource. - Etag *string - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData - - // READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement. - Type *string -} - -// ServiceSKUProperties - API Management service resource SKU properties. -type ServiceSKUProperties struct { - // REQUIRED; Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as - // 0. - Capacity *int32 - - // REQUIRED; Name of the Sku. - Name *SKUType -} - -// ServiceSKUsClientListAvailableServiceSKUsOptions contains the optional parameters for the ServiceSKUsClient.NewListAvailableServiceSKUsPager -// method. -type ServiceSKUsClientListAvailableServiceSKUsOptions struct { - // placeholder for future optional parameters -} - -// ServiceUpdateParameters - Parameter supplied to Update Api Management Service. -type ServiceUpdateParameters struct { - // Managed service identity of the Api Management service. - Identity *ServiceIdentity - - // Properties of the API Management service. - Properties *ServiceUpdateProperties - - // SKU properties of the API Management service. - SKU *ServiceSKUProperties - - // Resource tags. - Tags map[string]*string - - // A list of availability zones denoting where the resource needs to come from. - Zones []*string - - // READ-ONLY; ETag of the resource. - Etag *string - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement. - Type *string -} - -// ServiceUpdateProperties - Properties of an API Management service resource description. -type ServiceUpdateProperties struct { - // Control Plane Apis version constraint for the API Management service. - APIVersionConstraint *APIVersionConstraint - - // Additional datacenter locations of the API Management service. - AdditionalLocations []*AdditionalLocation - - // List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed - // is 10. - Certificates []*CertificateConfiguration - - // Custom properties of the API Management service. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA - // for all TLS(1.0, 1.1 and 1.2). - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API - // Management service. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1 - // for communications with backends. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for - // communications with backends. - // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an - // API Management service. - // Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For - // all the settings except Http2 the default value is True if the service was - // created on or before April 1st 2018 and False otherwise. Http2 setting's default value is False. - // You can disable any of next ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]: - // TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA, TLS - // ECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256, - // TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For example, - // Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default value - // is true for them. Note: next ciphers can't be disabled since they are required by - // Azure CloudService internal components: TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCMSHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBC - // SHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256,TLSRSAWITHAES256GCMSHA384 - CustomProperties map[string]*string - - // Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway - // in master region. - DisableGateway *bool - - // Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each - // request to the gateway. This also enables the ability to authenticate the - // certificate in the policy on the gateway. - EnableClientCertificate *bool - - // Custom hostname configuration of the API Management service. - HostnameConfigurations []*HostnameConfiguration - - // Email address from which the notification will be sent. - NotificationSenderEmail *string - - // List of Private Endpoint Connections of this service. - PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper - - // Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported - // only for Developer and Premium SKU being deployed in Virtual Network. - PublicIPAddressID *string - - // Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must - // be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the - // exclusive access method. Default value is 'Enabled' - PublicNetworkAccess *PublicNetworkAccess - - // Publisher email. - PublisherEmail *string - - // Publisher name. - PublisherName *string - - // Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other - // properties will be ignored. - Restore *bool - - // Virtual network configuration of the API Management service. - VirtualNetworkConfiguration *VirtualNetworkConfiguration - - // The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management - // service is not part of any Virtual Network, External means the API Management - // deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management - // deployment is setup inside a Virtual Network having an Intranet Facing Endpoint - // only. - VirtualNetworkType *VirtualNetworkType - - // READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ - // as specified by the ISO 8601 standard. - CreatedAtUTC *time.Time - - // READ-ONLY; DEveloper Portal endpoint URL of the API Management service. - DeveloperPortalURL *string - - // READ-ONLY; Gateway URL of the API Management service in the Default Region. - GatewayRegionalURL *string - - // READ-ONLY; Gateway URL of the API Management service. - GatewayURL *string - - // READ-ONLY; Management API endpoint URL of the API Management service. - ManagementAPIURL *string - - // READ-ONLY; Compute Platform Version running the service in this location. - PlatformVersion *PlatformVersion - - // READ-ONLY; Publisher portal endpoint Url of the API Management service. - PortalURL *string - - // READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed - // in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated - // SKU. - PrivateIPAddresses []*string - - // READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. - ProvisioningState *string - - // READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for - // Basic, Standard, Premium and Isolated SKU. - PublicIPAddresses []*string - - // READ-ONLY; SCM endpoint URL of the API Management service. - ScmURL *string - - // READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started - // on the service. - TargetProvisioningState *string -} - -// SignInSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignInSettingsClient.CreateOrUpdate -// method. -type SignInSettingsClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// SignInSettingsClientGetEntityTagOptions contains the optional parameters for the SignInSettingsClient.GetEntityTag method. -type SignInSettingsClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// SignInSettingsClientGetOptions contains the optional parameters for the SignInSettingsClient.Get method. -type SignInSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SignInSettingsClientUpdateOptions contains the optional parameters for the SignInSettingsClient.Update method. -type SignInSettingsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// SignUpSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignUpSettingsClient.CreateOrUpdate -// method. -type SignUpSettingsClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// SignUpSettingsClientGetEntityTagOptions contains the optional parameters for the SignUpSettingsClient.GetEntityTag method. -type SignUpSettingsClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// SignUpSettingsClientGetOptions contains the optional parameters for the SignUpSettingsClient.Get method. -type SignUpSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SignUpSettingsClientUpdateOptions contains the optional parameters for the SignUpSettingsClient.Update method. -type SignUpSettingsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionClient.CreateOrUpdate method. -type SubscriptionClientCreateOrUpdateOptions struct { - // Determines the type of application which send the create user request. Default is legacy publisher portal. - AppType *AppType - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string - // Notify change in Subscription State. - // * If false, do not send any email notification for change of state of subscription - // * If true, send email notification of change of state of subscription - Notify *bool -} - -// SubscriptionClientDeleteOptions contains the optional parameters for the SubscriptionClient.Delete method. -type SubscriptionClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionClientGetEntityTagOptions contains the optional parameters for the SubscriptionClient.GetEntityTag method. -type SubscriptionClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionClientGetOptions contains the optional parameters for the SubscriptionClient.Get method. -type SubscriptionClientGetOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionClientListOptions contains the optional parameters for the SubscriptionClient.NewListPager method. -type SubscriptionClientListOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | state | filter | eq | | - // | user | expand | | | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// SubscriptionClientListSecretsOptions contains the optional parameters for the SubscriptionClient.ListSecrets method. -type SubscriptionClientListSecretsOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionClientRegeneratePrimaryKeyOptions contains the optional parameters for the SubscriptionClient.RegeneratePrimaryKey -// method. -type SubscriptionClientRegeneratePrimaryKeyOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionClientRegenerateSecondaryKeyOptions contains the optional parameters for the SubscriptionClient.RegenerateSecondaryKey -// method. -type SubscriptionClientRegenerateSecondaryKeyOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionClientUpdateOptions contains the optional parameters for the SubscriptionClient.Update method. -type SubscriptionClientUpdateOptions struct { - // Determines the type of application which send the create user request. Default is legacy publisher portal. - AppType *AppType - // Notify change in Subscription State. - // * If false, do not send any email notification for change of state of subscription - // * If true, send email notification of change of state of subscription - Notify *bool -} - -// SubscriptionCollection - Paged Subscriptions list representation. -type SubscriptionCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*SubscriptionContract -} - -// SubscriptionContract - Subscription details. -type SubscriptionContract struct { - // Subscription contract properties. - Properties *SubscriptionContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// SubscriptionContractProperties - Subscription details. -type SubscriptionContractProperties struct { - // REQUIRED; Scope like /products/{productId} or /apis or /apis/{apiId}. - Scope *string - - // REQUIRED; Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription - // is blocked, and the subscriber cannot call any APIs of the product, * submitted – the - // subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription - // request has been denied by an administrator, * cancelled – the - // subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration - // date and was deactivated. - State *SubscriptionState - - // Determines whether tracing is enabled - AllowTracing *bool - - // The name of the subscription, or null if the subscription has no name. - DisplayName *string - - // Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically - // cancelled. The subscription lifecycle can be managed by using the - // state property. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - EndDate *time.Time - - // Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. - // The subscription lifecycle can be managed by using the state property. The date - // conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - ExpirationDate *time.Time - - // Upcoming subscription expiration notification date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as - // specified by the ISO 8601 standard. - NotificationDate *time.Time - - // The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} - // where {userId} is a user identifier. - OwnerID *string - - // Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get - // the value. - PrimaryKey *string - - // Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get - // the value. - SecondaryKey *string - - // Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. - // The subscription lifecycle can be managed by using the state property. The - // date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - StartDate *time.Time - - // Optional subscription comment added by an administrator when the state is changed to the 'rejected'. - StateComment *string - - // READ-ONLY; Subscription creation date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by - // the ISO 8601 standard. - CreatedDate *time.Time -} - -// SubscriptionCreateParameterProperties - Parameters supplied to the Create subscription operation. -type SubscriptionCreateParameterProperties struct { - // REQUIRED; Subscription name. - DisplayName *string - - // REQUIRED; Scope like /products/{productId} or /apis or /apis/{apiId}. - Scope *string - - // Determines whether tracing can be enabled - AllowTracing *bool - - // User (user id path) for whom subscription is being created in form /users/{userId} - OwnerID *string - - // Primary subscription key. If not specified during request key will be generated automatically. - PrimaryKey *string - - // Secondary subscription key. If not specified during request key will be generated automatically. - SecondaryKey *string - - // Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are - // * active – the subscription is active, * suspended – the subscription is - // blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by - // the developer, but has not yet been approved or rejected, * rejected – the - // subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer - // or administrator, * expired – the subscription reached its expiration date - // and was deactivated. - State *SubscriptionState -} - -// SubscriptionCreateParameters - Subscription create details. -type SubscriptionCreateParameters struct { - // Subscription contract properties. - Properties *SubscriptionCreateParameterProperties -} - -// SubscriptionKeyParameterNamesContract - Subscription key parameter names details. -type SubscriptionKeyParameterNamesContract struct { - // Subscription key header name. - Header *string - - // Subscription key query string parameter name. - Query *string -} - -// SubscriptionKeysContract - Subscription keys. -type SubscriptionKeysContract struct { - // Subscription primary key. - PrimaryKey *string - - // Subscription secondary key. - SecondaryKey *string -} - -// SubscriptionUpdateParameterProperties - Parameters supplied to the Update subscription operation. -type SubscriptionUpdateParameterProperties struct { - // Determines whether tracing can be enabled - AllowTracing *bool - - // Subscription name. - DisplayName *string - - // Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. - // The subscription lifecycle can be managed by using the state property. The date - // conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - ExpirationDate *time.Time - - // User identifier path: /users/{userId} - OwnerID *string - - // Primary subscription key. - PrimaryKey *string - - // Scope like /products/{productId} or /apis or /apis/{apiId} - Scope *string - - // Secondary subscription key. - SecondaryKey *string - - // Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, - // and the subscriber cannot call any APIs of the product, * submitted – the - // subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription - // request has been denied by an administrator, * cancelled – the - // subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration - // date and was deactivated. - State *SubscriptionState - - // Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. - StateComment *string -} - -// SubscriptionUpdateParameters - Subscription update details. -type SubscriptionUpdateParameters struct { - // Subscription Update contract properties. - Properties *SubscriptionUpdateParameterProperties -} - -// SubscriptionsDelegationSettingsProperties - Subscriptions delegation settings properties. -type SubscriptionsDelegationSettingsProperties struct { - // Enable or disable delegation for subscriptions. - Enabled *bool -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time - - // The identity that created the resource. - CreatedBy *string - - // The type of identity that created the resource. - CreatedByType *CreatedByType - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time - - // The identity that last modified the resource. - LastModifiedBy *string - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType -} - -// TagClientAssignToAPIOptions contains the optional parameters for the TagClient.AssignToAPI method. -type TagClientAssignToAPIOptions struct { - // placeholder for future optional parameters -} - -// TagClientAssignToOperationOptions contains the optional parameters for the TagClient.AssignToOperation method. -type TagClientAssignToOperationOptions struct { - // placeholder for future optional parameters -} - -// TagClientAssignToProductOptions contains the optional parameters for the TagClient.AssignToProduct method. -type TagClientAssignToProductOptions struct { - // placeholder for future optional parameters -} - -// TagClientCreateOrUpdateOptions contains the optional parameters for the TagClient.CreateOrUpdate method. -type TagClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string -} - -// TagClientDeleteOptions contains the optional parameters for the TagClient.Delete method. -type TagClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// TagClientDetachFromAPIOptions contains the optional parameters for the TagClient.DetachFromAPI method. -type TagClientDetachFromAPIOptions struct { - // placeholder for future optional parameters -} - -// TagClientDetachFromOperationOptions contains the optional parameters for the TagClient.DetachFromOperation method. -type TagClientDetachFromOperationOptions struct { - // placeholder for future optional parameters -} - -// TagClientDetachFromProductOptions contains the optional parameters for the TagClient.DetachFromProduct method. -type TagClientDetachFromProductOptions struct { - // placeholder for future optional parameters -} - -// TagClientGetByAPIOptions contains the optional parameters for the TagClient.GetByAPI method. -type TagClientGetByAPIOptions struct { - // placeholder for future optional parameters -} - -// TagClientGetByOperationOptions contains the optional parameters for the TagClient.GetByOperation method. -type TagClientGetByOperationOptions struct { - // placeholder for future optional parameters -} - -// TagClientGetByProductOptions contains the optional parameters for the TagClient.GetByProduct method. -type TagClientGetByProductOptions struct { - // placeholder for future optional parameters -} - -// TagClientGetEntityStateByAPIOptions contains the optional parameters for the TagClient.GetEntityStateByAPI method. -type TagClientGetEntityStateByAPIOptions struct { - // placeholder for future optional parameters -} - -// TagClientGetEntityStateByOperationOptions contains the optional parameters for the TagClient.GetEntityStateByOperation -// method. -type TagClientGetEntityStateByOperationOptions struct { - // placeholder for future optional parameters -} - -// TagClientGetEntityStateByProductOptions contains the optional parameters for the TagClient.GetEntityStateByProduct method. -type TagClientGetEntityStateByProductOptions struct { - // placeholder for future optional parameters -} - -// TagClientGetEntityStateOptions contains the optional parameters for the TagClient.GetEntityState method. -type TagClientGetEntityStateOptions struct { - // placeholder for future optional parameters -} - -// TagClientGetOptions contains the optional parameters for the TagClient.Get method. -type TagClientGetOptions struct { - // placeholder for future optional parameters -} - -// TagClientListByAPIOptions contains the optional parameters for the TagClient.NewListByAPIPager method. -type TagClientListByAPIOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// TagClientListByOperationOptions contains the optional parameters for the TagClient.NewListByOperationPager method. -type TagClientListByOperationOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// TagClientListByProductOptions contains the optional parameters for the TagClient.NewListByProductPager method. -type TagClientListByProductOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// TagClientListByServiceOptions contains the optional parameters for the TagClient.NewListByServicePager method. -type TagClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Scope like 'apis', 'products' or 'apis/{apiId} - Scope *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// TagClientUpdateOptions contains the optional parameters for the TagClient.Update method. -type TagClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// TagCollection - Paged Tag list representation. -type TagCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*TagContract -} - -// TagContract - Tag Contract details. -type TagContract struct { - // Tag entity contract properties. - Properties *TagContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// TagContractProperties - Tag contract Properties. -type TagContractProperties struct { - // REQUIRED; Tag name. - DisplayName *string -} - -// TagCreateUpdateParameters - Parameters supplied to Create/Update Tag operations. -type TagCreateUpdateParameters struct { - // Properties supplied to Create Tag operation. - Properties *TagContractProperties -} - -// TagDescriptionBaseProperties - Parameters supplied to the Create TagDescription operation. -type TagDescriptionBaseProperties struct { - // Description of the Tag. - Description *string - - // Description of the external resources describing the tag. - ExternalDocsDescription *string - - // Absolute URL of external resources describing the tag. - ExternalDocsURL *string -} - -// TagDescriptionCollection - Paged TagDescription list representation. -type TagDescriptionCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*TagDescriptionContract -} - -// TagDescriptionContract - Contract details. -type TagDescriptionContract struct { - // TagDescription entity contract properties. - Properties *TagDescriptionContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// TagDescriptionContractProperties - TagDescription contract Properties. -type TagDescriptionContractProperties struct { - // Description of the Tag. - Description *string - - // Tag name. - DisplayName *string - - // Description of the external resources describing the tag. - ExternalDocsDescription *string - - // Absolute URL of external resources describing the tag. - ExternalDocsURL *string - - // Identifier of the tag in the form of /tags/{tagId} - TagID *string -} - -// TagDescriptionCreateParameters - Parameters supplied to the Create TagDescription operation. -type TagDescriptionCreateParameters struct { - // Properties supplied to Create TagDescription operation. - Properties *TagDescriptionBaseProperties -} - -// TagResourceClientListByServiceOptions contains the optional parameters for the TagResourceClient.NewListByServicePager -// method. -type TagResourceClientListByServiceOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | state | filter | eq | | - // | isCurrent | filter | eq | | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// TagResourceCollection - Paged Tag list representation. -type TagResourceCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*TagResourceContract -} - -// TagResourceContract - TagResource contract properties. -type TagResourceContract struct { - // REQUIRED; Tag associated with the resource. - Tag *TagResourceContractProperties - - // API associated with the tag. - API *APITagResourceContractProperties - - // Operation associated with the tag. - Operation *OperationTagResourceContractProperties - - // Product associated with the tag. - Product *ProductTagResourceContractProperties -} - -// TagResourceContractProperties - Contract defining the Tag property in the Tag Resource Contract -type TagResourceContractProperties struct { - // Tag identifier - ID *string - - // Tag Name - Name *string -} - -// TenantAccessClientCreateOptions contains the optional parameters for the TenantAccessClient.Create method. -type TenantAccessClientCreateOptions struct { - // placeholder for future optional parameters -} - -// TenantAccessClientGetEntityTagOptions contains the optional parameters for the TenantAccessClient.GetEntityTag method. -type TenantAccessClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// TenantAccessClientGetOptions contains the optional parameters for the TenantAccessClient.Get method. -type TenantAccessClientGetOptions struct { - // placeholder for future optional parameters -} - -// TenantAccessClientListByServiceOptions contains the optional parameters for the TenantAccessClient.NewListByServicePager -// method. -type TenantAccessClientListByServiceOptions struct { - // Not used - Filter *string -} - -// TenantAccessClientListSecretsOptions contains the optional parameters for the TenantAccessClient.ListSecrets method. -type TenantAccessClientListSecretsOptions struct { - // placeholder for future optional parameters -} - -// TenantAccessClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessClient.RegeneratePrimaryKey -// method. -type TenantAccessClientRegeneratePrimaryKeyOptions struct { - // placeholder for future optional parameters -} - -// TenantAccessClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessClient.RegenerateSecondaryKey -// method. -type TenantAccessClientRegenerateSecondaryKeyOptions struct { - // placeholder for future optional parameters -} - -// TenantAccessClientUpdateOptions contains the optional parameters for the TenantAccessClient.Update method. -type TenantAccessClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// TenantAccessGitClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegeneratePrimaryKey -// method. -type TenantAccessGitClientRegeneratePrimaryKeyOptions struct { - // placeholder for future optional parameters -} - -// TenantAccessGitClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegenerateSecondaryKey -// method. -type TenantAccessGitClientRegenerateSecondaryKeyOptions struct { - // placeholder for future optional parameters -} - -// TenantConfigurationClientBeginDeployOptions contains the optional parameters for the TenantConfigurationClient.BeginDeploy -// method. -type TenantConfigurationClientBeginDeployOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// TenantConfigurationClientBeginSaveOptions contains the optional parameters for the TenantConfigurationClient.BeginSave -// method. -type TenantConfigurationClientBeginSaveOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// TenantConfigurationClientBeginValidateOptions contains the optional parameters for the TenantConfigurationClient.BeginValidate -// method. -type TenantConfigurationClientBeginValidateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// TenantConfigurationClientGetSyncStateOptions contains the optional parameters for the TenantConfigurationClient.GetSyncState -// method. -type TenantConfigurationClientGetSyncStateOptions struct { - // placeholder for future optional parameters -} - -// TenantConfigurationSyncStateContract - Result of Tenant Configuration Sync State. -type TenantConfigurationSyncStateContract struct { - // Properties returned Tenant Configuration Sync State check. - Properties *TenantConfigurationSyncStateContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// TenantConfigurationSyncStateContractProperties - Tenant Configuration Synchronization State. -type TenantConfigurationSyncStateContractProperties struct { - // The name of Git branch. - Branch *string - - // The latest commit Id. - CommitID *string - - // The date of the latest configuration change. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified - // by the ISO 8601 standard. - ConfigurationChangeDate *time.Time - - // value indicating if last sync was save (true) or deploy (false) operation. - IsExport *bool - - // value indicating whether Git configuration access is enabled. - IsGitEnabled *bool - - // value indicating if last synchronization was later than the configuration change. - IsSynced *bool - - // Most recent tenant configuration operation identifier - LastOperationID *string - - // The date of the latest synchronization. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by - // the ISO 8601 standard. - SyncDate *time.Time -} - -// TenantSettingsClientGetOptions contains the optional parameters for the TenantSettingsClient.Get method. -type TenantSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// TenantSettingsClientListByServiceOptions contains the optional parameters for the TenantSettingsClient.NewListByServicePager -// method. -type TenantSettingsClientListByServiceOptions struct { - // Not used - Filter *string -} - -// TenantSettingsCollection - Paged AccessInformation list representation. -type TenantSettingsCollection struct { - // READ-ONLY; Next page link if any. - NextLink *string - - // READ-ONLY; Page values. - Value []*TenantSettingsContract -} - -// TenantSettingsContract - Tenant Settings. -type TenantSettingsContract struct { - // TenantSettings entity contract properties. - Properties *TenantSettingsContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// TenantSettingsContractProperties - Tenant access information contract of the API Management service. -type TenantSettingsContractProperties struct { - // Tenant settings - Settings map[string]*string -} - -// TermsOfServiceProperties - Terms of service contract properties. -type TermsOfServiceProperties struct { - // Ask user for consent to the terms of service. - ConsentRequired *bool - - // Display terms of service during a sign-up process. - Enabled *bool - - // A terms of service text. - Text *string -} - -// TokenBodyParameterContract - OAuth acquire token request body parameter (www-url-form-encoded). -type TokenBodyParameterContract struct { - // REQUIRED; body parameter name. - Name *string - - // REQUIRED; body parameter value. - Value *string -} - -// UserClientCreateOrUpdateOptions contains the optional parameters for the UserClient.CreateOrUpdate method. -type UserClientCreateOrUpdateOptions struct { - // ETag of the Entity. Not required when creating an entity, but required when updating an entity. - IfMatch *string - // Send an Email notification to the User. - Notify *bool -} - -// UserClientDeleteOptions contains the optional parameters for the UserClient.Delete method. -type UserClientDeleteOptions struct { - // Determines the type of application which send the create user request. Default is legacy publisher portal. - AppType *AppType - // Whether to delete user's subscription or not. - DeleteSubscriptions *bool - // Send an Account Closed Email notification to the User. - Notify *bool -} - -// UserClientGenerateSsoURLOptions contains the optional parameters for the UserClient.GenerateSsoURL method. -type UserClientGenerateSsoURLOptions struct { - // placeholder for future optional parameters -} - -// UserClientGetEntityTagOptions contains the optional parameters for the UserClient.GetEntityTag method. -type UserClientGetEntityTagOptions struct { - // placeholder for future optional parameters -} - -// UserClientGetOptions contains the optional parameters for the UserClient.Get method. -type UserClientGetOptions struct { - // placeholder for future optional parameters -} - -// UserClientGetSharedAccessTokenOptions contains the optional parameters for the UserClient.GetSharedAccessToken method. -type UserClientGetSharedAccessTokenOptions struct { - // placeholder for future optional parameters -} - -// UserClientListByServiceOptions contains the optional parameters for the UserClient.NewListByServicePager method. -type UserClientListByServiceOptions struct { - // Detailed Group in response. - ExpandGroups *bool - // | Field | Usage | Supported operators | Supported functions | - // |-------------|-------------|-------------|-------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | state | filter | eq | | - // | registrationDate | filter | ge, le, eq, ne, gt, lt | | - // | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | groups | expand | | | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// UserClientUpdateOptions contains the optional parameters for the UserClient.Update method. -type UserClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// UserCollection - Paged Users list representation. -type UserCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // Page values. - Value []*UserContract -} - -// UserConfirmationPasswordClientSendOptions contains the optional parameters for the UserConfirmationPasswordClient.Send -// method. -type UserConfirmationPasswordClientSendOptions struct { - // Determines the type of application which send the create user request. Default is legacy publisher portal. - AppType *AppType -} - -// UserContract - User details. -type UserContract struct { - // User entity contract properties. - Properties *UserContractProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// UserContractProperties - User profile. -type UserContractProperties struct { - // Email address. - Email *string - - // First name. - FirstName *string - - // Collection of user identities. - Identities []*UserIdentityContract - - // Last name. - LastName *string - - // Optional note about a user set by the administrator. - Note *string - - // Date of user registration. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 - // standard. - RegistrationDate *time.Time - - // Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal - // or call any APIs of subscribed products. Default state is Active. - State *UserState - - // READ-ONLY; Collection of groups user is part of. - Groups []*GroupContractProperties -} - -// UserCreateParameterProperties - Parameters supplied to the Create User operation. -type UserCreateParameterProperties struct { - // REQUIRED; Email address. Must not be empty and must be unique within the service instance. - Email *string - - // REQUIRED; First name. - FirstName *string - - // REQUIRED; Last name. - LastName *string - - // Determines the type of application which send the create user request. Default is legacy portal. - AppType *AppType - - // Determines the type of confirmation e-mail that will be sent to the newly created user. - Confirmation *Confirmation - - // Collection of user identities. - Identities []*UserIdentityContract - - // Optional note about a user set by the administrator. - Note *string - - // User Password. If no value is provided, a default password is generated. - Password *string - - // Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal - // or call any APIs of subscribed products. Default state is Active. - State *UserState -} - -// UserCreateParameters - User create details. -type UserCreateParameters struct { - // User entity create contract properties. - Properties *UserCreateParameterProperties -} - -// UserEntityBaseParameters - User Entity Base Parameters set. -type UserEntityBaseParameters struct { - // Collection of user identities. - Identities []*UserIdentityContract - - // Optional note about a user set by the administrator. - Note *string - - // Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal - // or call any APIs of subscribed products. Default state is Active. - State *UserState -} - -// UserGroupClientListOptions contains the optional parameters for the UserGroupClient.NewListPager method. -type UserGroupClientListOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|------------------------|-----------------------------------| - // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// UserIdentitiesClientListOptions contains the optional parameters for the UserIdentitiesClient.NewListPager method. -type UserIdentitiesClientListOptions struct { - // placeholder for future optional parameters -} - -// UserIdentityCollection - List of Users Identity list representation. -type UserIdentityCollection struct { - // Total record count number across all pages. - Count *int64 - - // Next page link if any. - NextLink *string - - // User Identity values. - Value []*UserIdentityContract -} - -// UserIdentityContract - User identity details. -type UserIdentityContract struct { - // Identifier value within provider. - ID *string - - // Identity provider name. - Provider *string -} - -type UserIdentityProperties struct { - // The client id of user assigned identity. - ClientID *string - - // The principal id of user assigned identity. - PrincipalID *string -} - -// UserSubscriptionClientGetOptions contains the optional parameters for the UserSubscriptionClient.Get method. -type UserSubscriptionClientGetOptions struct { - // placeholder for future optional parameters -} - -// UserSubscriptionClientListOptions contains the optional parameters for the UserSubscriptionClient.NewListPager method. -type UserSubscriptionClientListOptions struct { - // | Field | Usage | Supported operators | Supported functions | - // |-------------|------------------------|-----------------------------------| - // |name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // |displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // |stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // |ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // |scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // |userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - // |productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | - Filter *string - // Number of records to skip. - Skip *int32 - // Number of records to return. - Top *int32 -} - -// UserTokenParameterProperties - Parameters supplied to the Get User Token operation. -type UserTokenParameterProperties struct { - // REQUIRED; The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following - // format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - Expiry *time.Time - - // REQUIRED; The Key to be used to generate token for user. - KeyType *KeyType -} - -// UserTokenParameters - Get User Token parameters. -type UserTokenParameters struct { - // User Token Parameter contract properties. - Properties *UserTokenParameterProperties -} - -// UserTokenResult - Get User Token response details. -type UserTokenResult struct { - // Shared Access Authorization token for the User. - Value *string -} - -// UserUpdateParameters - User update parameters. -type UserUpdateParameters struct { - // User entity update contract properties. - Properties *UserUpdateParametersProperties -} - -// UserUpdateParametersProperties - Parameters supplied to the Update User operation. -type UserUpdateParametersProperties struct { - // Email address. Must not be empty and must be unique within the service instance. - Email *string - - // First name. - FirstName *string - - // Collection of user identities. - Identities []*UserIdentityContract - - // Last name. - LastName *string - - // Optional note about a user set by the administrator. - Note *string - - // User Password. - Password *string - - // Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal - // or call any APIs of subscribed products. Default state is Active. - State *UserState -} - -// VirtualNetworkConfiguration - Configuration of a virtual network to which API Management service is deployed. -type VirtualNetworkConfiguration struct { - // The full resource ID of a subnet in a virtual network to deploy the API Management service in. - SubnetResourceID *string - - // READ-ONLY; The name of the subnet. - Subnetname *string - - // READ-ONLY; The virtual network ID. This is typically a GUID. Expect a null GUID by default. - Vnetid *string -} - -// X509CertificateName - Properties of server X509Names. -type X509CertificateName struct { - // Thumbprint for the Issuer of the Certificate. - IssuerCertificateThumbprint *string - - // Common Name of the Certificate. - Name *string -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/models_serde.go deleted file mode 100644 index 7aa96a7f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/models_serde.go +++ /dev/null @@ -1,13719 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type APICollection. -func (a APICollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", a.Count) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APICollection. -func (a *APICollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &a.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIContactInformation. -func (a APIContactInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "email", a.Email) - populate(objectMap, "name", a.Name) - populate(objectMap, "url", a.URL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIContactInformation. -func (a *APIContactInformation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "email": - err = unpopulate(val, "Email", &a.Email) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &a.URL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIContract. -func (a APIContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIContract. -func (a *APIContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIContractProperties. -func (a APIContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiRevision", a.APIRevision) - populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) - populate(objectMap, "type", a.APIType) - populate(objectMap, "apiVersion", a.APIVersion) - populate(objectMap, "apiVersionDescription", a.APIVersionDescription) - populate(objectMap, "apiVersionSet", a.APIVersionSet) - populate(objectMap, "apiVersionSetId", a.APIVersionSetID) - populate(objectMap, "authenticationSettings", a.AuthenticationSettings) - populate(objectMap, "contact", a.Contact) - populate(objectMap, "description", a.Description) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "isCurrent", a.IsCurrent) - populate(objectMap, "isOnline", a.IsOnline) - populate(objectMap, "license", a.License) - populate(objectMap, "path", a.Path) - populate(objectMap, "protocols", a.Protocols) - populate(objectMap, "serviceUrl", a.ServiceURL) - populate(objectMap, "sourceApiId", a.SourceAPIID) - populate(objectMap, "subscriptionKeyParameterNames", a.SubscriptionKeyParameterNames) - populate(objectMap, "subscriptionRequired", a.SubscriptionRequired) - populate(objectMap, "termsOfServiceUrl", a.TermsOfServiceURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIContractProperties. -func (a *APIContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiRevision": - err = unpopulate(val, "APIRevision", &a.APIRevision) - delete(rawMsg, key) - case "apiRevisionDescription": - err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "APIType", &a.APIType) - delete(rawMsg, key) - case "apiVersion": - err = unpopulate(val, "APIVersion", &a.APIVersion) - delete(rawMsg, key) - case "apiVersionDescription": - err = unpopulate(val, "APIVersionDescription", &a.APIVersionDescription) - delete(rawMsg, key) - case "apiVersionSet": - err = unpopulate(val, "APIVersionSet", &a.APIVersionSet) - delete(rawMsg, key) - case "apiVersionSetId": - err = unpopulate(val, "APIVersionSetID", &a.APIVersionSetID) - delete(rawMsg, key) - case "authenticationSettings": - err = unpopulate(val, "AuthenticationSettings", &a.AuthenticationSettings) - delete(rawMsg, key) - case "contact": - err = unpopulate(val, "Contact", &a.Contact) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "isCurrent": - err = unpopulate(val, "IsCurrent", &a.IsCurrent) - delete(rawMsg, key) - case "isOnline": - err = unpopulate(val, "IsOnline", &a.IsOnline) - delete(rawMsg, key) - case "license": - err = unpopulate(val, "License", &a.License) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &a.Path) - delete(rawMsg, key) - case "protocols": - err = unpopulate(val, "Protocols", &a.Protocols) - delete(rawMsg, key) - case "serviceUrl": - err = unpopulate(val, "ServiceURL", &a.ServiceURL) - delete(rawMsg, key) - case "sourceApiId": - err = unpopulate(val, "SourceAPIID", &a.SourceAPIID) - delete(rawMsg, key) - case "subscriptionKeyParameterNames": - err = unpopulate(val, "SubscriptionKeyParameterNames", &a.SubscriptionKeyParameterNames) - delete(rawMsg, key) - case "subscriptionRequired": - err = unpopulate(val, "SubscriptionRequired", &a.SubscriptionRequired) - delete(rawMsg, key) - case "termsOfServiceUrl": - err = unpopulate(val, "TermsOfServiceURL", &a.TermsOfServiceURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIContractUpdateProperties. -func (a APIContractUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiRevision", a.APIRevision) - populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) - populate(objectMap, "type", a.APIType) - populate(objectMap, "apiVersion", a.APIVersion) - populate(objectMap, "apiVersionDescription", a.APIVersionDescription) - populate(objectMap, "apiVersionSetId", a.APIVersionSetID) - populate(objectMap, "authenticationSettings", a.AuthenticationSettings) - populate(objectMap, "contact", a.Contact) - populate(objectMap, "description", a.Description) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "isCurrent", a.IsCurrent) - populate(objectMap, "isOnline", a.IsOnline) - populate(objectMap, "license", a.License) - populate(objectMap, "path", a.Path) - populate(objectMap, "protocols", a.Protocols) - populate(objectMap, "serviceUrl", a.ServiceURL) - populate(objectMap, "subscriptionKeyParameterNames", a.SubscriptionKeyParameterNames) - populate(objectMap, "subscriptionRequired", a.SubscriptionRequired) - populate(objectMap, "termsOfServiceUrl", a.TermsOfServiceURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIContractUpdateProperties. -func (a *APIContractUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiRevision": - err = unpopulate(val, "APIRevision", &a.APIRevision) - delete(rawMsg, key) - case "apiRevisionDescription": - err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "APIType", &a.APIType) - delete(rawMsg, key) - case "apiVersion": - err = unpopulate(val, "APIVersion", &a.APIVersion) - delete(rawMsg, key) - case "apiVersionDescription": - err = unpopulate(val, "APIVersionDescription", &a.APIVersionDescription) - delete(rawMsg, key) - case "apiVersionSetId": - err = unpopulate(val, "APIVersionSetID", &a.APIVersionSetID) - delete(rawMsg, key) - case "authenticationSettings": - err = unpopulate(val, "AuthenticationSettings", &a.AuthenticationSettings) - delete(rawMsg, key) - case "contact": - err = unpopulate(val, "Contact", &a.Contact) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "isCurrent": - err = unpopulate(val, "IsCurrent", &a.IsCurrent) - delete(rawMsg, key) - case "isOnline": - err = unpopulate(val, "IsOnline", &a.IsOnline) - delete(rawMsg, key) - case "license": - err = unpopulate(val, "License", &a.License) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &a.Path) - delete(rawMsg, key) - case "protocols": - err = unpopulate(val, "Protocols", &a.Protocols) - delete(rawMsg, key) - case "serviceUrl": - err = unpopulate(val, "ServiceURL", &a.ServiceURL) - delete(rawMsg, key) - case "subscriptionKeyParameterNames": - err = unpopulate(val, "SubscriptionKeyParameterNames", &a.SubscriptionKeyParameterNames) - delete(rawMsg, key) - case "subscriptionRequired": - err = unpopulate(val, "SubscriptionRequired", &a.SubscriptionRequired) - delete(rawMsg, key) - case "termsOfServiceUrl": - err = unpopulate(val, "TermsOfServiceURL", &a.TermsOfServiceURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APICreateOrUpdateParameter. -func (a APICreateOrUpdateParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APICreateOrUpdateParameter. -func (a *APICreateOrUpdateParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APICreateOrUpdateProperties. -func (a APICreateOrUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiRevision", a.APIRevision) - populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) - populate(objectMap, "type", a.APIType) - populate(objectMap, "apiVersion", a.APIVersion) - populate(objectMap, "apiVersionDescription", a.APIVersionDescription) - populate(objectMap, "apiVersionSet", a.APIVersionSet) - populate(objectMap, "apiVersionSetId", a.APIVersionSetID) - populate(objectMap, "authenticationSettings", a.AuthenticationSettings) - populate(objectMap, "contact", a.Contact) - populate(objectMap, "description", a.Description) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "format", a.Format) - populate(objectMap, "isCurrent", a.IsCurrent) - populate(objectMap, "isOnline", a.IsOnline) - populate(objectMap, "license", a.License) - populate(objectMap, "path", a.Path) - populate(objectMap, "protocols", a.Protocols) - populate(objectMap, "serviceUrl", a.ServiceURL) - populate(objectMap, "apiType", a.SoapAPIType) - populate(objectMap, "sourceApiId", a.SourceAPIID) - populate(objectMap, "subscriptionKeyParameterNames", a.SubscriptionKeyParameterNames) - populate(objectMap, "subscriptionRequired", a.SubscriptionRequired) - populate(objectMap, "termsOfServiceUrl", a.TermsOfServiceURL) - populate(objectMap, "value", a.Value) - populate(objectMap, "wsdlSelector", a.WsdlSelector) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APICreateOrUpdateProperties. -func (a *APICreateOrUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiRevision": - err = unpopulate(val, "APIRevision", &a.APIRevision) - delete(rawMsg, key) - case "apiRevisionDescription": - err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "APIType", &a.APIType) - delete(rawMsg, key) - case "apiVersion": - err = unpopulate(val, "APIVersion", &a.APIVersion) - delete(rawMsg, key) - case "apiVersionDescription": - err = unpopulate(val, "APIVersionDescription", &a.APIVersionDescription) - delete(rawMsg, key) - case "apiVersionSet": - err = unpopulate(val, "APIVersionSet", &a.APIVersionSet) - delete(rawMsg, key) - case "apiVersionSetId": - err = unpopulate(val, "APIVersionSetID", &a.APIVersionSetID) - delete(rawMsg, key) - case "authenticationSettings": - err = unpopulate(val, "AuthenticationSettings", &a.AuthenticationSettings) - delete(rawMsg, key) - case "contact": - err = unpopulate(val, "Contact", &a.Contact) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "format": - err = unpopulate(val, "Format", &a.Format) - delete(rawMsg, key) - case "isCurrent": - err = unpopulate(val, "IsCurrent", &a.IsCurrent) - delete(rawMsg, key) - case "isOnline": - err = unpopulate(val, "IsOnline", &a.IsOnline) - delete(rawMsg, key) - case "license": - err = unpopulate(val, "License", &a.License) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &a.Path) - delete(rawMsg, key) - case "protocols": - err = unpopulate(val, "Protocols", &a.Protocols) - delete(rawMsg, key) - case "serviceUrl": - err = unpopulate(val, "ServiceURL", &a.ServiceURL) - delete(rawMsg, key) - case "apiType": - err = unpopulate(val, "SoapAPIType", &a.SoapAPIType) - delete(rawMsg, key) - case "sourceApiId": - err = unpopulate(val, "SourceAPIID", &a.SourceAPIID) - delete(rawMsg, key) - case "subscriptionKeyParameterNames": - err = unpopulate(val, "SubscriptionKeyParameterNames", &a.SubscriptionKeyParameterNames) - delete(rawMsg, key) - case "subscriptionRequired": - err = unpopulate(val, "SubscriptionRequired", &a.SubscriptionRequired) - delete(rawMsg, key) - case "termsOfServiceUrl": - err = unpopulate(val, "TermsOfServiceURL", &a.TermsOfServiceURL) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - case "wsdlSelector": - err = unpopulate(val, "WsdlSelector", &a.WsdlSelector) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APICreateOrUpdatePropertiesWsdlSelector. -func (a APICreateOrUpdatePropertiesWsdlSelector) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "wsdlEndpointName", a.WsdlEndpointName) - populate(objectMap, "wsdlServiceName", a.WsdlServiceName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APICreateOrUpdatePropertiesWsdlSelector. -func (a *APICreateOrUpdatePropertiesWsdlSelector) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "wsdlEndpointName": - err = unpopulate(val, "WsdlEndpointName", &a.WsdlEndpointName) - delete(rawMsg, key) - case "wsdlServiceName": - err = unpopulate(val, "WsdlServiceName", &a.WsdlServiceName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIEntityBaseContract. -func (a APIEntityBaseContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiRevision", a.APIRevision) - populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) - populate(objectMap, "type", a.APIType) - populate(objectMap, "apiVersion", a.APIVersion) - populate(objectMap, "apiVersionDescription", a.APIVersionDescription) - populate(objectMap, "apiVersionSetId", a.APIVersionSetID) - populate(objectMap, "authenticationSettings", a.AuthenticationSettings) - populate(objectMap, "contact", a.Contact) - populate(objectMap, "description", a.Description) - populate(objectMap, "isCurrent", a.IsCurrent) - populate(objectMap, "isOnline", a.IsOnline) - populate(objectMap, "license", a.License) - populate(objectMap, "subscriptionKeyParameterNames", a.SubscriptionKeyParameterNames) - populate(objectMap, "subscriptionRequired", a.SubscriptionRequired) - populate(objectMap, "termsOfServiceUrl", a.TermsOfServiceURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIEntityBaseContract. -func (a *APIEntityBaseContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiRevision": - err = unpopulate(val, "APIRevision", &a.APIRevision) - delete(rawMsg, key) - case "apiRevisionDescription": - err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "APIType", &a.APIType) - delete(rawMsg, key) - case "apiVersion": - err = unpopulate(val, "APIVersion", &a.APIVersion) - delete(rawMsg, key) - case "apiVersionDescription": - err = unpopulate(val, "APIVersionDescription", &a.APIVersionDescription) - delete(rawMsg, key) - case "apiVersionSetId": - err = unpopulate(val, "APIVersionSetID", &a.APIVersionSetID) - delete(rawMsg, key) - case "authenticationSettings": - err = unpopulate(val, "AuthenticationSettings", &a.AuthenticationSettings) - delete(rawMsg, key) - case "contact": - err = unpopulate(val, "Contact", &a.Contact) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "isCurrent": - err = unpopulate(val, "IsCurrent", &a.IsCurrent) - delete(rawMsg, key) - case "isOnline": - err = unpopulate(val, "IsOnline", &a.IsOnline) - delete(rawMsg, key) - case "license": - err = unpopulate(val, "License", &a.License) - delete(rawMsg, key) - case "subscriptionKeyParameterNames": - err = unpopulate(val, "SubscriptionKeyParameterNames", &a.SubscriptionKeyParameterNames) - delete(rawMsg, key) - case "subscriptionRequired": - err = unpopulate(val, "SubscriptionRequired", &a.SubscriptionRequired) - delete(rawMsg, key) - case "termsOfServiceUrl": - err = unpopulate(val, "TermsOfServiceURL", &a.TermsOfServiceURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIExportResult. -func (a APIExportResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "format", a.ExportResultFormat) - populate(objectMap, "id", a.ID) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIExportResult. -func (a *APIExportResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "format": - err = unpopulate(val, "ExportResultFormat", &a.ExportResultFormat) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIExportResultValue. -func (a APIExportResultValue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "link", a.Link) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIExportResultValue. -func (a *APIExportResultValue) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "link": - err = unpopulate(val, "Link", &a.Link) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APILicenseInformation. -func (a APILicenseInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", a.Name) - populate(objectMap, "url", a.URL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APILicenseInformation. -func (a *APILicenseInformation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &a.URL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIReleaseCollection. -func (a APIReleaseCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", a.Count) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIReleaseCollection. -func (a *APIReleaseCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &a.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIReleaseContract. -func (a APIReleaseContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIReleaseContract. -func (a *APIReleaseContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIReleaseContractProperties. -func (a APIReleaseContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiId", a.APIID) - populateTimeRFC3339(objectMap, "createdDateTime", a.CreatedDateTime) - populate(objectMap, "notes", a.Notes) - populateTimeRFC3339(objectMap, "updatedDateTime", a.UpdatedDateTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIReleaseContractProperties. -func (a *APIReleaseContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiId": - err = unpopulate(val, "APIID", &a.APIID) - delete(rawMsg, key) - case "createdDateTime": - err = unpopulateTimeRFC3339(val, "CreatedDateTime", &a.CreatedDateTime) - delete(rawMsg, key) - case "notes": - err = unpopulate(val, "Notes", &a.Notes) - delete(rawMsg, key) - case "updatedDateTime": - err = unpopulateTimeRFC3339(val, "UpdatedDateTime", &a.UpdatedDateTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIRevisionCollection. -func (a APIRevisionCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", a.Count) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIRevisionCollection. -func (a *APIRevisionCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &a.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIRevisionContract. -func (a APIRevisionContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiId", a.APIID) - populate(objectMap, "apiRevision", a.APIRevision) - populateTimeRFC3339(objectMap, "createdDateTime", a.CreatedDateTime) - populate(objectMap, "description", a.Description) - populate(objectMap, "isCurrent", a.IsCurrent) - populate(objectMap, "isOnline", a.IsOnline) - populate(objectMap, "privateUrl", a.PrivateURL) - populateTimeRFC3339(objectMap, "updatedDateTime", a.UpdatedDateTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIRevisionContract. -func (a *APIRevisionContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiId": - err = unpopulate(val, "APIID", &a.APIID) - delete(rawMsg, key) - case "apiRevision": - err = unpopulate(val, "APIRevision", &a.APIRevision) - delete(rawMsg, key) - case "createdDateTime": - err = unpopulateTimeRFC3339(val, "CreatedDateTime", &a.CreatedDateTime) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "isCurrent": - err = unpopulate(val, "IsCurrent", &a.IsCurrent) - delete(rawMsg, key) - case "isOnline": - err = unpopulate(val, "IsOnline", &a.IsOnline) - delete(rawMsg, key) - case "privateUrl": - err = unpopulate(val, "PrivateURL", &a.PrivateURL) - delete(rawMsg, key) - case "updatedDateTime": - err = unpopulateTimeRFC3339(val, "UpdatedDateTime", &a.UpdatedDateTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIRevisionInfoContract. -func (a APIRevisionInfoContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) - populate(objectMap, "apiVersionName", a.APIVersionName) - populate(objectMap, "apiVersionSet", a.APIVersionSet) - populate(objectMap, "sourceApiId", a.SourceAPIID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIRevisionInfoContract. -func (a *APIRevisionInfoContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiRevisionDescription": - err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) - delete(rawMsg, key) - case "apiVersionName": - err = unpopulate(val, "APIVersionName", &a.APIVersionName) - delete(rawMsg, key) - case "apiVersionSet": - err = unpopulate(val, "APIVersionSet", &a.APIVersionSet) - delete(rawMsg, key) - case "sourceApiId": - err = unpopulate(val, "SourceAPIID", &a.SourceAPIID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APITagResourceContractProperties. -func (a APITagResourceContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiRevision", a.APIRevision) - populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) - populate(objectMap, "type", a.APIType) - populate(objectMap, "apiVersion", a.APIVersion) - populate(objectMap, "apiVersionDescription", a.APIVersionDescription) - populate(objectMap, "apiVersionSetId", a.APIVersionSetID) - populate(objectMap, "authenticationSettings", a.AuthenticationSettings) - populate(objectMap, "contact", a.Contact) - populate(objectMap, "description", a.Description) - populate(objectMap, "id", a.ID) - populate(objectMap, "isCurrent", a.IsCurrent) - populate(objectMap, "isOnline", a.IsOnline) - populate(objectMap, "license", a.License) - populate(objectMap, "name", a.Name) - populate(objectMap, "path", a.Path) - populate(objectMap, "protocols", a.Protocols) - populate(objectMap, "serviceUrl", a.ServiceURL) - populate(objectMap, "subscriptionKeyParameterNames", a.SubscriptionKeyParameterNames) - populate(objectMap, "subscriptionRequired", a.SubscriptionRequired) - populate(objectMap, "termsOfServiceUrl", a.TermsOfServiceURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APITagResourceContractProperties. -func (a *APITagResourceContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiRevision": - err = unpopulate(val, "APIRevision", &a.APIRevision) - delete(rawMsg, key) - case "apiRevisionDescription": - err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "APIType", &a.APIType) - delete(rawMsg, key) - case "apiVersion": - err = unpopulate(val, "APIVersion", &a.APIVersion) - delete(rawMsg, key) - case "apiVersionDescription": - err = unpopulate(val, "APIVersionDescription", &a.APIVersionDescription) - delete(rawMsg, key) - case "apiVersionSetId": - err = unpopulate(val, "APIVersionSetID", &a.APIVersionSetID) - delete(rawMsg, key) - case "authenticationSettings": - err = unpopulate(val, "AuthenticationSettings", &a.AuthenticationSettings) - delete(rawMsg, key) - case "contact": - err = unpopulate(val, "Contact", &a.Contact) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "isCurrent": - err = unpopulate(val, "IsCurrent", &a.IsCurrent) - delete(rawMsg, key) - case "isOnline": - err = unpopulate(val, "IsOnline", &a.IsOnline) - delete(rawMsg, key) - case "license": - err = unpopulate(val, "License", &a.License) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &a.Path) - delete(rawMsg, key) - case "protocols": - err = unpopulate(val, "Protocols", &a.Protocols) - delete(rawMsg, key) - case "serviceUrl": - err = unpopulate(val, "ServiceURL", &a.ServiceURL) - delete(rawMsg, key) - case "subscriptionKeyParameterNames": - err = unpopulate(val, "SubscriptionKeyParameterNames", &a.SubscriptionKeyParameterNames) - delete(rawMsg, key) - case "subscriptionRequired": - err = unpopulate(val, "SubscriptionRequired", &a.SubscriptionRequired) - delete(rawMsg, key) - case "termsOfServiceUrl": - err = unpopulate(val, "TermsOfServiceURL", &a.TermsOfServiceURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIUpdateContract. -func (a APIUpdateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIUpdateContract. -func (a *APIUpdateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIVersionConstraint. -func (a APIVersionConstraint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "minApiVersion", a.MinAPIVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionConstraint. -func (a *APIVersionConstraint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "minApiVersion": - err = unpopulate(val, "MinAPIVersion", &a.MinAPIVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIVersionSetCollection. -func (a APIVersionSetCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", a.Count) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetCollection. -func (a *APIVersionSetCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &a.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIVersionSetContract. -func (a APIVersionSetContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetContract. -func (a *APIVersionSetContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIVersionSetContractDetails. -func (a APIVersionSetContractDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", a.Description) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "versionHeaderName", a.VersionHeaderName) - populate(objectMap, "versionQueryName", a.VersionQueryName) - populate(objectMap, "versioningScheme", a.VersioningScheme) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetContractDetails. -func (a *APIVersionSetContractDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "versionHeaderName": - err = unpopulate(val, "VersionHeaderName", &a.VersionHeaderName) - delete(rawMsg, key) - case "versionQueryName": - err = unpopulate(val, "VersionQueryName", &a.VersionQueryName) - delete(rawMsg, key) - case "versioningScheme": - err = unpopulate(val, "VersioningScheme", &a.VersioningScheme) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIVersionSetContractProperties. -func (a APIVersionSetContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", a.Description) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "versionHeaderName", a.VersionHeaderName) - populate(objectMap, "versionQueryName", a.VersionQueryName) - populate(objectMap, "versioningScheme", a.VersioningScheme) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetContractProperties. -func (a *APIVersionSetContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "versionHeaderName": - err = unpopulate(val, "VersionHeaderName", &a.VersionHeaderName) - delete(rawMsg, key) - case "versionQueryName": - err = unpopulate(val, "VersionQueryName", &a.VersionQueryName) - delete(rawMsg, key) - case "versioningScheme": - err = unpopulate(val, "VersioningScheme", &a.VersioningScheme) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIVersionSetEntityBase. -func (a APIVersionSetEntityBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", a.Description) - populate(objectMap, "versionHeaderName", a.VersionHeaderName) - populate(objectMap, "versionQueryName", a.VersionQueryName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetEntityBase. -func (a *APIVersionSetEntityBase) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "versionHeaderName": - err = unpopulate(val, "VersionHeaderName", &a.VersionHeaderName) - delete(rawMsg, key) - case "versionQueryName": - err = unpopulate(val, "VersionQueryName", &a.VersionQueryName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIVersionSetUpdateParameters. -func (a APIVersionSetUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetUpdateParameters. -func (a *APIVersionSetUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type APIVersionSetUpdateParametersProperties. -func (a APIVersionSetUpdateParametersProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", a.Description) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "versionHeaderName", a.VersionHeaderName) - populate(objectMap, "versionQueryName", a.VersionQueryName) - populate(objectMap, "versioningScheme", a.VersioningScheme) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetUpdateParametersProperties. -func (a *APIVersionSetUpdateParametersProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "versionHeaderName": - err = unpopulate(val, "VersionHeaderName", &a.VersionHeaderName) - delete(rawMsg, key) - case "versionQueryName": - err = unpopulate(val, "VersionQueryName", &a.VersionQueryName) - delete(rawMsg, key) - case "versioningScheme": - err = unpopulate(val, "VersioningScheme", &a.VersioningScheme) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AccessInformationCollection. -func (a AccessInformationCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", a.Count) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationCollection. -func (a *AccessInformationCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &a.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AccessInformationContract. -func (a AccessInformationContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationContract. -func (a *AccessInformationContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AccessInformationContractProperties. -func (a AccessInformationContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", a.Enabled) - populate(objectMap, "id", a.ID) - populate(objectMap, "principalId", a.PrincipalID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationContractProperties. -func (a *AccessInformationContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &a.PrincipalID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AccessInformationCreateParameterProperties. -func (a AccessInformationCreateParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", a.Enabled) - populate(objectMap, "primaryKey", a.PrimaryKey) - populate(objectMap, "principalId", a.PrincipalID) - populate(objectMap, "secondaryKey", a.SecondaryKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationCreateParameterProperties. -func (a *AccessInformationCreateParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - delete(rawMsg, key) - case "primaryKey": - err = unpopulate(val, "PrimaryKey", &a.PrimaryKey) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &a.PrincipalID) - delete(rawMsg, key) - case "secondaryKey": - err = unpopulate(val, "SecondaryKey", &a.SecondaryKey) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AccessInformationCreateParameters. -func (a AccessInformationCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationCreateParameters. -func (a *AccessInformationCreateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AccessInformationSecretsContract. -func (a AccessInformationSecretsContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", a.Enabled) - populate(objectMap, "id", a.ID) - populate(objectMap, "primaryKey", a.PrimaryKey) - populate(objectMap, "principalId", a.PrincipalID) - populate(objectMap, "secondaryKey", a.SecondaryKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationSecretsContract. -func (a *AccessInformationSecretsContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "primaryKey": - err = unpopulate(val, "PrimaryKey", &a.PrimaryKey) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &a.PrincipalID) - delete(rawMsg, key) - case "secondaryKey": - err = unpopulate(val, "SecondaryKey", &a.SecondaryKey) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AccessInformationUpdateParameterProperties. -func (a AccessInformationUpdateParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", a.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationUpdateParameterProperties. -func (a *AccessInformationUpdateParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AccessInformationUpdateParameters. -func (a AccessInformationUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationUpdateParameters. -func (a *AccessInformationUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AdditionalLocation. -func (a AdditionalLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "disableGateway", a.DisableGateway) - populate(objectMap, "gatewayRegionalUrl", a.GatewayRegionalURL) - populate(objectMap, "location", a.Location) - populate(objectMap, "platformVersion", a.PlatformVersion) - populate(objectMap, "privateIPAddresses", a.PrivateIPAddresses) - populate(objectMap, "publicIpAddressId", a.PublicIPAddressID) - populate(objectMap, "publicIPAddresses", a.PublicIPAddresses) - populate(objectMap, "sku", a.SKU) - populate(objectMap, "virtualNetworkConfiguration", a.VirtualNetworkConfiguration) - populate(objectMap, "zones", a.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalLocation. -func (a *AdditionalLocation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disableGateway": - err = unpopulate(val, "DisableGateway", &a.DisableGateway) - delete(rawMsg, key) - case "gatewayRegionalUrl": - err = unpopulate(val, "GatewayRegionalURL", &a.GatewayRegionalURL) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "platformVersion": - err = unpopulate(val, "PlatformVersion", &a.PlatformVersion) - delete(rawMsg, key) - case "privateIPAddresses": - err = unpopulate(val, "PrivateIPAddresses", &a.PrivateIPAddresses) - delete(rawMsg, key) - case "publicIpAddressId": - err = unpopulate(val, "PublicIPAddressID", &a.PublicIPAddressID) - delete(rawMsg, key) - case "publicIPAddresses": - err = unpopulate(val, "PublicIPAddresses", &a.PublicIPAddresses) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &a.SKU) - delete(rawMsg, key) - case "virtualNetworkConfiguration": - err = unpopulate(val, "VirtualNetworkConfiguration", &a.VirtualNetworkConfiguration) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &a.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApimResource. -func (a ApimResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApimResource. -func (a *ApimResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ArmIDWrapper. -func (a ArmIDWrapper) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ArmIDWrapper. -func (a *ArmIDWrapper) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AssociationContract. -func (a AssociationContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AssociationContract. -func (a *AssociationContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AssociationContractProperties. -func (a AssociationContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["provisioningState"] = "created" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AssociationContractProperties. -func (a *AssociationContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AuthenticationSettingsContract. -func (a AuthenticationSettingsContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "oAuth2", a.OAuth2) - populate(objectMap, "openid", a.Openid) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthenticationSettingsContract. -func (a *AuthenticationSettingsContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "oAuth2": - err = unpopulate(val, "OAuth2", &a.OAuth2) - delete(rawMsg, key) - case "openid": - err = unpopulate(val, "Openid", &a.Openid) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerCollection. -func (a AuthorizationServerCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", a.Count) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerCollection. -func (a *AuthorizationServerCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &a.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerContract. -func (a AuthorizationServerContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerContract. -func (a *AuthorizationServerContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerContractBaseProperties. -func (a AuthorizationServerContractBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "authorizationMethods", a.AuthorizationMethods) - populate(objectMap, "bearerTokenSendingMethods", a.BearerTokenSendingMethods) - populate(objectMap, "clientAuthenticationMethod", a.ClientAuthenticationMethod) - populate(objectMap, "defaultScope", a.DefaultScope) - populate(objectMap, "description", a.Description) - populate(objectMap, "resourceOwnerPassword", a.ResourceOwnerPassword) - populate(objectMap, "resourceOwnerUsername", a.ResourceOwnerUsername) - populate(objectMap, "supportState", a.SupportState) - populate(objectMap, "tokenBodyParameters", a.TokenBodyParameters) - populate(objectMap, "tokenEndpoint", a.TokenEndpoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerContractBaseProperties. -func (a *AuthorizationServerContractBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationMethods": - err = unpopulate(val, "AuthorizationMethods", &a.AuthorizationMethods) - delete(rawMsg, key) - case "bearerTokenSendingMethods": - err = unpopulate(val, "BearerTokenSendingMethods", &a.BearerTokenSendingMethods) - delete(rawMsg, key) - case "clientAuthenticationMethod": - err = unpopulate(val, "ClientAuthenticationMethod", &a.ClientAuthenticationMethod) - delete(rawMsg, key) - case "defaultScope": - err = unpopulate(val, "DefaultScope", &a.DefaultScope) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "resourceOwnerPassword": - err = unpopulate(val, "ResourceOwnerPassword", &a.ResourceOwnerPassword) - delete(rawMsg, key) - case "resourceOwnerUsername": - err = unpopulate(val, "ResourceOwnerUsername", &a.ResourceOwnerUsername) - delete(rawMsg, key) - case "supportState": - err = unpopulate(val, "SupportState", &a.SupportState) - delete(rawMsg, key) - case "tokenBodyParameters": - err = unpopulate(val, "TokenBodyParameters", &a.TokenBodyParameters) - delete(rawMsg, key) - case "tokenEndpoint": - err = unpopulate(val, "TokenEndpoint", &a.TokenEndpoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerContractProperties. -func (a AuthorizationServerContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "authorizationEndpoint", a.AuthorizationEndpoint) - populate(objectMap, "authorizationMethods", a.AuthorizationMethods) - populate(objectMap, "bearerTokenSendingMethods", a.BearerTokenSendingMethods) - populate(objectMap, "clientAuthenticationMethod", a.ClientAuthenticationMethod) - populate(objectMap, "clientId", a.ClientID) - populate(objectMap, "clientRegistrationEndpoint", a.ClientRegistrationEndpoint) - populate(objectMap, "clientSecret", a.ClientSecret) - populate(objectMap, "defaultScope", a.DefaultScope) - populate(objectMap, "description", a.Description) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "grantTypes", a.GrantTypes) - populate(objectMap, "resourceOwnerPassword", a.ResourceOwnerPassword) - populate(objectMap, "resourceOwnerUsername", a.ResourceOwnerUsername) - populate(objectMap, "supportState", a.SupportState) - populate(objectMap, "tokenBodyParameters", a.TokenBodyParameters) - populate(objectMap, "tokenEndpoint", a.TokenEndpoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerContractProperties. -func (a *AuthorizationServerContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationEndpoint": - err = unpopulate(val, "AuthorizationEndpoint", &a.AuthorizationEndpoint) - delete(rawMsg, key) - case "authorizationMethods": - err = unpopulate(val, "AuthorizationMethods", &a.AuthorizationMethods) - delete(rawMsg, key) - case "bearerTokenSendingMethods": - err = unpopulate(val, "BearerTokenSendingMethods", &a.BearerTokenSendingMethods) - delete(rawMsg, key) - case "clientAuthenticationMethod": - err = unpopulate(val, "ClientAuthenticationMethod", &a.ClientAuthenticationMethod) - delete(rawMsg, key) - case "clientId": - err = unpopulate(val, "ClientID", &a.ClientID) - delete(rawMsg, key) - case "clientRegistrationEndpoint": - err = unpopulate(val, "ClientRegistrationEndpoint", &a.ClientRegistrationEndpoint) - delete(rawMsg, key) - case "clientSecret": - err = unpopulate(val, "ClientSecret", &a.ClientSecret) - delete(rawMsg, key) - case "defaultScope": - err = unpopulate(val, "DefaultScope", &a.DefaultScope) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "grantTypes": - err = unpopulate(val, "GrantTypes", &a.GrantTypes) - delete(rawMsg, key) - case "resourceOwnerPassword": - err = unpopulate(val, "ResourceOwnerPassword", &a.ResourceOwnerPassword) - delete(rawMsg, key) - case "resourceOwnerUsername": - err = unpopulate(val, "ResourceOwnerUsername", &a.ResourceOwnerUsername) - delete(rawMsg, key) - case "supportState": - err = unpopulate(val, "SupportState", &a.SupportState) - delete(rawMsg, key) - case "tokenBodyParameters": - err = unpopulate(val, "TokenBodyParameters", &a.TokenBodyParameters) - delete(rawMsg, key) - case "tokenEndpoint": - err = unpopulate(val, "TokenEndpoint", &a.TokenEndpoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerSecretsContract. -func (a AuthorizationServerSecretsContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientSecret", a.ClientSecret) - populate(objectMap, "resourceOwnerPassword", a.ResourceOwnerPassword) - populate(objectMap, "resourceOwnerUsername", a.ResourceOwnerUsername) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerSecretsContract. -func (a *AuthorizationServerSecretsContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientSecret": - err = unpopulate(val, "ClientSecret", &a.ClientSecret) - delete(rawMsg, key) - case "resourceOwnerPassword": - err = unpopulate(val, "ResourceOwnerPassword", &a.ResourceOwnerPassword) - delete(rawMsg, key) - case "resourceOwnerUsername": - err = unpopulate(val, "ResourceOwnerUsername", &a.ResourceOwnerUsername) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerUpdateContract. -func (a AuthorizationServerUpdateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerUpdateContract. -func (a *AuthorizationServerUpdateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerUpdateContractProperties. -func (a AuthorizationServerUpdateContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "authorizationEndpoint", a.AuthorizationEndpoint) - populate(objectMap, "authorizationMethods", a.AuthorizationMethods) - populate(objectMap, "bearerTokenSendingMethods", a.BearerTokenSendingMethods) - populate(objectMap, "clientAuthenticationMethod", a.ClientAuthenticationMethod) - populate(objectMap, "clientId", a.ClientID) - populate(objectMap, "clientRegistrationEndpoint", a.ClientRegistrationEndpoint) - populate(objectMap, "clientSecret", a.ClientSecret) - populate(objectMap, "defaultScope", a.DefaultScope) - populate(objectMap, "description", a.Description) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "grantTypes", a.GrantTypes) - populate(objectMap, "resourceOwnerPassword", a.ResourceOwnerPassword) - populate(objectMap, "resourceOwnerUsername", a.ResourceOwnerUsername) - populate(objectMap, "supportState", a.SupportState) - populate(objectMap, "tokenBodyParameters", a.TokenBodyParameters) - populate(objectMap, "tokenEndpoint", a.TokenEndpoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerUpdateContractProperties. -func (a *AuthorizationServerUpdateContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationEndpoint": - err = unpopulate(val, "AuthorizationEndpoint", &a.AuthorizationEndpoint) - delete(rawMsg, key) - case "authorizationMethods": - err = unpopulate(val, "AuthorizationMethods", &a.AuthorizationMethods) - delete(rawMsg, key) - case "bearerTokenSendingMethods": - err = unpopulate(val, "BearerTokenSendingMethods", &a.BearerTokenSendingMethods) - delete(rawMsg, key) - case "clientAuthenticationMethod": - err = unpopulate(val, "ClientAuthenticationMethod", &a.ClientAuthenticationMethod) - delete(rawMsg, key) - case "clientId": - err = unpopulate(val, "ClientID", &a.ClientID) - delete(rawMsg, key) - case "clientRegistrationEndpoint": - err = unpopulate(val, "ClientRegistrationEndpoint", &a.ClientRegistrationEndpoint) - delete(rawMsg, key) - case "clientSecret": - err = unpopulate(val, "ClientSecret", &a.ClientSecret) - delete(rawMsg, key) - case "defaultScope": - err = unpopulate(val, "DefaultScope", &a.DefaultScope) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "grantTypes": - err = unpopulate(val, "GrantTypes", &a.GrantTypes) - delete(rawMsg, key) - case "resourceOwnerPassword": - err = unpopulate(val, "ResourceOwnerPassword", &a.ResourceOwnerPassword) - delete(rawMsg, key) - case "resourceOwnerUsername": - err = unpopulate(val, "ResourceOwnerUsername", &a.ResourceOwnerUsername) - delete(rawMsg, key) - case "supportState": - err = unpopulate(val, "SupportState", &a.SupportState) - delete(rawMsg, key) - case "tokenBodyParameters": - err = unpopulate(val, "TokenBodyParameters", &a.TokenBodyParameters) - delete(rawMsg, key) - case "tokenEndpoint": - err = unpopulate(val, "TokenEndpoint", &a.TokenEndpoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendAuthorizationHeaderCredentials. -func (b BackendAuthorizationHeaderCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "parameter", b.Parameter) - populate(objectMap, "scheme", b.Scheme) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendAuthorizationHeaderCredentials. -func (b *BackendAuthorizationHeaderCredentials) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "parameter": - err = unpopulate(val, "Parameter", &b.Parameter) - delete(rawMsg, key) - case "scheme": - err = unpopulate(val, "Scheme", &b.Scheme) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendBaseParameters. -func (b BackendBaseParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "credentials", b.Credentials) - populate(objectMap, "description", b.Description) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "proxy", b.Proxy) - populate(objectMap, "resourceId", b.ResourceID) - populate(objectMap, "tls", b.TLS) - populate(objectMap, "title", b.Title) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendBaseParameters. -func (b *BackendBaseParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "credentials": - err = unpopulate(val, "Credentials", &b.Credentials) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &b.Description) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "proxy": - err = unpopulate(val, "Proxy", &b.Proxy) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &b.ResourceID) - delete(rawMsg, key) - case "tls": - err = unpopulate(val, "TLS", &b.TLS) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &b.Title) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendCollection. -func (b BackendCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", b.Count) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendCollection. -func (b *BackendCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &b.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendContract. -func (b BackendContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendContract. -func (b *BackendContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendContractProperties. -func (b BackendContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "credentials", b.Credentials) - populate(objectMap, "description", b.Description) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "protocol", b.Protocol) - populate(objectMap, "proxy", b.Proxy) - populate(objectMap, "resourceId", b.ResourceID) - populate(objectMap, "tls", b.TLS) - populate(objectMap, "title", b.Title) - populate(objectMap, "url", b.URL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendContractProperties. -func (b *BackendContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "credentials": - err = unpopulate(val, "Credentials", &b.Credentials) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &b.Description) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &b.Protocol) - delete(rawMsg, key) - case "proxy": - err = unpopulate(val, "Proxy", &b.Proxy) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &b.ResourceID) - delete(rawMsg, key) - case "tls": - err = unpopulate(val, "TLS", &b.TLS) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &b.Title) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &b.URL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendCredentialsContract. -func (b BackendCredentialsContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "authorization", b.Authorization) - populate(objectMap, "certificate", b.Certificate) - populate(objectMap, "certificateIds", b.CertificateIDs) - populate(objectMap, "header", b.Header) - populate(objectMap, "query", b.Query) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendCredentialsContract. -func (b *BackendCredentialsContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorization": - err = unpopulate(val, "Authorization", &b.Authorization) - delete(rawMsg, key) - case "certificate": - err = unpopulate(val, "Certificate", &b.Certificate) - delete(rawMsg, key) - case "certificateIds": - err = unpopulate(val, "CertificateIDs", &b.CertificateIDs) - delete(rawMsg, key) - case "header": - err = unpopulate(val, "Header", &b.Header) - delete(rawMsg, key) - case "query": - err = unpopulate(val, "Query", &b.Query) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendProperties. -func (b BackendProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "serviceFabricCluster", b.ServiceFabricCluster) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendProperties. -func (b *BackendProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "serviceFabricCluster": - err = unpopulate(val, "ServiceFabricCluster", &b.ServiceFabricCluster) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendProxyContract. -func (b BackendProxyContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "password", b.Password) - populate(objectMap, "url", b.URL) - populate(objectMap, "username", b.Username) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendProxyContract. -func (b *BackendProxyContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "password": - err = unpopulate(val, "Password", &b.Password) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &b.URL) - delete(rawMsg, key) - case "username": - err = unpopulate(val, "Username", &b.Username) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendReconnectContract. -func (b BackendReconnectContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendReconnectContract. -func (b *BackendReconnectContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendReconnectProperties. -func (b BackendReconnectProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "after", b.After) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendReconnectProperties. -func (b *BackendReconnectProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "after": - err = unpopulate(val, "After", &b.After) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendServiceFabricClusterProperties. -func (b BackendServiceFabricClusterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientCertificateId", b.ClientCertificateID) - populate(objectMap, "clientCertificatethumbprint", b.ClientCertificatethumbprint) - populate(objectMap, "managementEndpoints", b.ManagementEndpoints) - populate(objectMap, "maxPartitionResolutionRetries", b.MaxPartitionResolutionRetries) - populate(objectMap, "serverCertificateThumbprints", b.ServerCertificateThumbprints) - populate(objectMap, "serverX509Names", b.ServerX509Names) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendServiceFabricClusterProperties. -func (b *BackendServiceFabricClusterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientCertificateId": - err = unpopulate(val, "ClientCertificateID", &b.ClientCertificateID) - delete(rawMsg, key) - case "clientCertificatethumbprint": - err = unpopulate(val, "ClientCertificatethumbprint", &b.ClientCertificatethumbprint) - delete(rawMsg, key) - case "managementEndpoints": - err = unpopulate(val, "ManagementEndpoints", &b.ManagementEndpoints) - delete(rawMsg, key) - case "maxPartitionResolutionRetries": - err = unpopulate(val, "MaxPartitionResolutionRetries", &b.MaxPartitionResolutionRetries) - delete(rawMsg, key) - case "serverCertificateThumbprints": - err = unpopulate(val, "ServerCertificateThumbprints", &b.ServerCertificateThumbprints) - delete(rawMsg, key) - case "serverX509Names": - err = unpopulate(val, "ServerX509Names", &b.ServerX509Names) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendTLSProperties. -func (b BackendTLSProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "validateCertificateChain", b.ValidateCertificateChain) - populate(objectMap, "validateCertificateName", b.ValidateCertificateName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendTLSProperties. -func (b *BackendTLSProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "validateCertificateChain": - err = unpopulate(val, "ValidateCertificateChain", &b.ValidateCertificateChain) - delete(rawMsg, key) - case "validateCertificateName": - err = unpopulate(val, "ValidateCertificateName", &b.ValidateCertificateName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendUpdateParameterProperties. -func (b BackendUpdateParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "credentials", b.Credentials) - populate(objectMap, "description", b.Description) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "protocol", b.Protocol) - populate(objectMap, "proxy", b.Proxy) - populate(objectMap, "resourceId", b.ResourceID) - populate(objectMap, "tls", b.TLS) - populate(objectMap, "title", b.Title) - populate(objectMap, "url", b.URL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendUpdateParameterProperties. -func (b *BackendUpdateParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "credentials": - err = unpopulate(val, "Credentials", &b.Credentials) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &b.Description) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &b.Protocol) - delete(rawMsg, key) - case "proxy": - err = unpopulate(val, "Proxy", &b.Proxy) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &b.ResourceID) - delete(rawMsg, key) - case "tls": - err = unpopulate(val, "TLS", &b.TLS) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &b.Title) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &b.URL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendUpdateParameters. -func (b BackendUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", b.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendUpdateParameters. -func (b *BackendUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BodyDiagnosticSettings. -func (b BodyDiagnosticSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "bytes", b.Bytes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BodyDiagnosticSettings. -func (b *BodyDiagnosticSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bytes": - err = unpopulate(val, "Bytes", &b.Bytes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheCollection. -func (c CacheCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", c.Count) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheCollection. -func (c *CacheCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &c.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheContract. -func (c CacheContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheContract. -func (c *CacheContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheContractProperties. -func (c CacheContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "connectionString", c.ConnectionString) - populate(objectMap, "description", c.Description) - populate(objectMap, "resourceId", c.ResourceID) - populate(objectMap, "useFromLocation", c.UseFromLocation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheContractProperties. -func (c *CacheContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionString": - err = unpopulate(val, "ConnectionString", &c.ConnectionString) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - case "useFromLocation": - err = unpopulate(val, "UseFromLocation", &c.UseFromLocation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheUpdateParameters. -func (c CacheUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpdateParameters. -func (c *CacheUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheUpdateProperties. -func (c CacheUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "connectionString", c.ConnectionString) - populate(objectMap, "description", c.Description) - populate(objectMap, "resourceId", c.ResourceID) - populate(objectMap, "useFromLocation", c.UseFromLocation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpdateProperties. -func (c *CacheUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionString": - err = unpopulate(val, "ConnectionString", &c.ConnectionString) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - case "useFromLocation": - err = unpopulate(val, "UseFromLocation", &c.UseFromLocation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateCollection. -func (c CertificateCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", c.Count) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCollection. -func (c *CertificateCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &c.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateConfiguration. -func (c CertificateConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "certificate", c.Certificate) - populate(objectMap, "certificatePassword", c.CertificatePassword) - populate(objectMap, "encodedCertificate", c.EncodedCertificate) - populate(objectMap, "storeName", c.StoreName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateConfiguration. -func (c *CertificateConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificate": - err = unpopulate(val, "Certificate", &c.Certificate) - delete(rawMsg, key) - case "certificatePassword": - err = unpopulate(val, "CertificatePassword", &c.CertificatePassword) - delete(rawMsg, key) - case "encodedCertificate": - err = unpopulate(val, "EncodedCertificate", &c.EncodedCertificate) - delete(rawMsg, key) - case "storeName": - err = unpopulate(val, "StoreName", &c.StoreName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateContract. -func (c CertificateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateContract. -func (c *CertificateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateContractProperties. -func (c CertificateContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expirationDate", c.ExpirationDate) - populate(objectMap, "keyVault", c.KeyVault) - populate(objectMap, "subject", c.Subject) - populate(objectMap, "thumbprint", c.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateContractProperties. -func (c *CertificateContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &c.ExpirationDate) - delete(rawMsg, key) - case "keyVault": - err = unpopulate(val, "KeyVault", &c.KeyVault) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &c.Subject) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateCreateOrUpdateParameters. -func (c CertificateCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCreateOrUpdateParameters. -func (c *CertificateCreateOrUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateCreateOrUpdateProperties. -func (c CertificateCreateOrUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "data", c.Data) - populate(objectMap, "keyVault", c.KeyVault) - populate(objectMap, "password", c.Password) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCreateOrUpdateProperties. -func (c *CertificateCreateOrUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "data": - err = unpopulate(val, "Data", &c.Data) - delete(rawMsg, key) - case "keyVault": - err = unpopulate(val, "KeyVault", &c.KeyVault) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &c.Password) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateInformation. -func (c CertificateInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expiry", c.Expiry) - populate(objectMap, "subject", c.Subject) - populate(objectMap, "thumbprint", c.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateInformation. -func (c *CertificateInformation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expiry": - err = unpopulateTimeRFC3339(val, "Expiry", &c.Expiry) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &c.Subject) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClientSecretContract. -func (c ClientSecretContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientSecret", c.ClientSecret) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientSecretContract. -func (c *ClientSecretContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientSecret": - err = unpopulate(val, "ClientSecret", &c.ClientSecret) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequest. -func (c ConnectivityCheckRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "destination", c.Destination) - populate(objectMap, "preferredIPVersion", c.PreferredIPVersion) - populate(objectMap, "protocol", c.Protocol) - populate(objectMap, "protocolConfiguration", c.ProtocolConfiguration) - populate(objectMap, "source", c.Source) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequest. -func (c *ConnectivityCheckRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destination": - err = unpopulate(val, "Destination", &c.Destination) - delete(rawMsg, key) - case "preferredIPVersion": - err = unpopulate(val, "PreferredIPVersion", &c.PreferredIPVersion) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &c.Protocol) - delete(rawMsg, key) - case "protocolConfiguration": - err = unpopulate(val, "ProtocolConfiguration", &c.ProtocolConfiguration) - delete(rawMsg, key) - case "source": - err = unpopulate(val, "Source", &c.Source) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestDestination. -func (c ConnectivityCheckRequestDestination) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "address", c.Address) - populate(objectMap, "port", c.Port) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestDestination. -func (c *ConnectivityCheckRequestDestination) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &c.Address) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &c.Port) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestProtocolConfiguration. -func (c ConnectivityCheckRequestProtocolConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "HTTPConfiguration", c.HTTPConfiguration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestProtocolConfiguration. -func (c *ConnectivityCheckRequestProtocolConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "HTTPConfiguration": - err = unpopulate(val, "HTTPConfiguration", &c.HTTPConfiguration) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration. -func (c ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "headers", c.Headers) - populate(objectMap, "method", c.Method) - populate(objectMap, "validStatusCodes", c.ValidStatusCodes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration. -func (c *ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "headers": - err = unpopulate(val, "Headers", &c.Headers) - delete(rawMsg, key) - case "method": - err = unpopulate(val, "Method", &c.Method) - delete(rawMsg, key) - case "validStatusCodes": - err = unpopulate(val, "ValidStatusCodes", &c.ValidStatusCodes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestSource. -func (c ConnectivityCheckRequestSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "instance", c.Instance) - populate(objectMap, "region", c.Region) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestSource. -func (c *ConnectivityCheckRequestSource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instance": - err = unpopulate(val, "Instance", &c.Instance) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &c.Region) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckResponse. -func (c ConnectivityCheckResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) - populate(objectMap, "connectionStatus", c.ConnectionStatus) - populate(objectMap, "hops", c.Hops) - populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) - populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) - populate(objectMap, "probesFailed", c.ProbesFailed) - populate(objectMap, "probesSent", c.ProbesSent) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckResponse. -func (c *ConnectivityCheckResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "avgLatencyInMs": - err = unpopulate(val, "AvgLatencyInMs", &c.AvgLatencyInMs) - delete(rawMsg, key) - case "connectionStatus": - err = unpopulate(val, "ConnectionStatus", &c.ConnectionStatus) - delete(rawMsg, key) - case "hops": - err = unpopulate(val, "Hops", &c.Hops) - delete(rawMsg, key) - case "maxLatencyInMs": - err = unpopulate(val, "MaxLatencyInMs", &c.MaxLatencyInMs) - delete(rawMsg, key) - case "minLatencyInMs": - err = unpopulate(val, "MinLatencyInMs", &c.MinLatencyInMs) - delete(rawMsg, key) - case "probesFailed": - err = unpopulate(val, "ProbesFailed", &c.ProbesFailed) - delete(rawMsg, key) - case "probesSent": - err = unpopulate(val, "ProbesSent", &c.ProbesSent) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityHop. -func (c ConnectivityHop) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "address", c.Address) - populate(objectMap, "id", c.ID) - populate(objectMap, "issues", c.Issues) - populate(objectMap, "nextHopIds", c.NextHopIDs) - populate(objectMap, "resourceId", c.ResourceID) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityHop. -func (c *ConnectivityHop) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &c.Address) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "issues": - err = unpopulate(val, "Issues", &c.Issues) - delete(rawMsg, key) - case "nextHopIds": - err = unpopulate(val, "NextHopIDs", &c.NextHopIDs) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityIssue. -func (c ConnectivityIssue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "context", c.Context) - populate(objectMap, "origin", c.Origin) - populate(objectMap, "severity", c.Severity) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityIssue. -func (c *ConnectivityIssue) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "context": - err = unpopulate(val, "Context", &c.Context) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &c.Origin) - delete(rawMsg, key) - case "severity": - err = unpopulate(val, "Severity", &c.Severity) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityStatusContract. -func (c ConnectivityStatusContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", c.Error) - populate(objectMap, "isOptional", c.IsOptional) - populateTimeRFC3339(objectMap, "lastStatusChange", c.LastStatusChange) - populateTimeRFC3339(objectMap, "lastUpdated", c.LastUpdated) - populate(objectMap, "name", c.Name) - populate(objectMap, "resourceType", c.ResourceType) - populate(objectMap, "status", c.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityStatusContract. -func (c *ConnectivityStatusContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &c.Error) - delete(rawMsg, key) - case "isOptional": - err = unpopulate(val, "IsOptional", &c.IsOptional) - delete(rawMsg, key) - case "lastStatusChange": - err = unpopulateTimeRFC3339(val, "LastStatusChange", &c.LastStatusChange) - delete(rawMsg, key) - case "lastUpdated": - err = unpopulateTimeRFC3339(val, "LastUpdated", &c.LastUpdated) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &c.ResourceType) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &c.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContentItemCollection. -func (c ContentItemCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContentItemCollection. -func (c *ContentItemCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContentItemContract. -func (c ContentItemContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContentItemContract. -func (c *ContentItemContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContentTypeCollection. -func (c ContentTypeCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContentTypeCollection. -func (c *ContentTypeCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContentTypeContract. -func (c ContentTypeContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContentTypeContract. -func (c *ContentTypeContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContentTypeContractProperties. -func (c ContentTypeContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", c.Description) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populateAny(objectMap, "schema", c.Schema) - populate(objectMap, "version", c.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContentTypeContractProperties. -func (c *ContentTypeContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "schema": - err = unpopulate(val, "Schema", &c.Schema) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &c.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataMasking. -func (d DataMasking) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "headers", d.Headers) - populate(objectMap, "queryParams", d.QueryParams) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataMasking. -func (d *DataMasking) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "headers": - err = unpopulate(val, "Headers", &d.Headers) - delete(rawMsg, key) - case "queryParams": - err = unpopulate(val, "QueryParams", &d.QueryParams) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataMaskingEntity. -func (d DataMaskingEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "mode", d.Mode) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingEntity. -func (d *DataMaskingEntity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "mode": - err = unpopulate(val, "Mode", &d.Mode) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeletedServiceContract. -func (d DeletedServiceContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServiceContract. -func (d *DeletedServiceContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeletedServiceContractProperties. -func (d DeletedServiceContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "deletionDate", d.DeletionDate) - populateTimeRFC3339(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) - populate(objectMap, "serviceId", d.ServiceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServiceContractProperties. -func (d *DeletedServiceContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deletionDate": - err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) - delete(rawMsg, key) - case "scheduledPurgeDate": - err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) - delete(rawMsg, key) - case "serviceId": - err = unpopulate(val, "ServiceID", &d.ServiceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeletedServicesCollection. -func (d DeletedServicesCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServicesCollection. -func (d *DeletedServicesCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeployConfigurationParameterProperties. -func (d DeployConfigurationParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "branch", d.Branch) - populate(objectMap, "force", d.Force) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeployConfigurationParameterProperties. -func (d *DeployConfigurationParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "branch": - err = unpopulate(val, "Branch", &d.Branch) - delete(rawMsg, key) - case "force": - err = unpopulate(val, "Force", &d.Force) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeployConfigurationParameters. -func (d DeployConfigurationParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", d.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeployConfigurationParameters. -func (d *DeployConfigurationParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticCollection. -func (d DiagnosticCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", d.Count) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticCollection. -func (d *DiagnosticCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &d.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticContract. -func (d DiagnosticContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticContract. -func (d *DiagnosticContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticContractProperties. -func (d DiagnosticContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "alwaysLog", d.AlwaysLog) - populate(objectMap, "backend", d.Backend) - populate(objectMap, "frontend", d.Frontend) - populate(objectMap, "httpCorrelationProtocol", d.HTTPCorrelationProtocol) - populate(objectMap, "logClientIp", d.LogClientIP) - populate(objectMap, "loggerId", d.LoggerID) - populate(objectMap, "operationNameFormat", d.OperationNameFormat) - populate(objectMap, "sampling", d.Sampling) - populate(objectMap, "verbosity", d.Verbosity) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticContractProperties. -func (d *DiagnosticContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "alwaysLog": - err = unpopulate(val, "AlwaysLog", &d.AlwaysLog) - delete(rawMsg, key) - case "backend": - err = unpopulate(val, "Backend", &d.Backend) - delete(rawMsg, key) - case "frontend": - err = unpopulate(val, "Frontend", &d.Frontend) - delete(rawMsg, key) - case "httpCorrelationProtocol": - err = unpopulate(val, "HTTPCorrelationProtocol", &d.HTTPCorrelationProtocol) - delete(rawMsg, key) - case "logClientIp": - err = unpopulate(val, "LogClientIP", &d.LogClientIP) - delete(rawMsg, key) - case "loggerId": - err = unpopulate(val, "LoggerID", &d.LoggerID) - delete(rawMsg, key) - case "operationNameFormat": - err = unpopulate(val, "OperationNameFormat", &d.OperationNameFormat) - delete(rawMsg, key) - case "sampling": - err = unpopulate(val, "Sampling", &d.Sampling) - delete(rawMsg, key) - case "verbosity": - err = unpopulate(val, "Verbosity", &d.Verbosity) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EmailTemplateCollection. -func (e EmailTemplateCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", e.Count) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateCollection. -func (e *EmailTemplateCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &e.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EmailTemplateContract. -func (e EmailTemplateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateContract. -func (e *EmailTemplateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EmailTemplateContractProperties. -func (e EmailTemplateContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "body", e.Body) - populate(objectMap, "description", e.Description) - populate(objectMap, "isDefault", e.IsDefault) - populate(objectMap, "parameters", e.Parameters) - populate(objectMap, "subject", e.Subject) - populate(objectMap, "title", e.Title) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateContractProperties. -func (e *EmailTemplateContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "body": - err = unpopulate(val, "Body", &e.Body) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &e.Description) - delete(rawMsg, key) - case "isDefault": - err = unpopulate(val, "IsDefault", &e.IsDefault) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &e.Parameters) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &e.Subject) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &e.Title) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EmailTemplateParametersContractProperties. -func (e EmailTemplateParametersContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", e.Description) - populate(objectMap, "name", e.Name) - populate(objectMap, "title", e.Title) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateParametersContractProperties. -func (e *EmailTemplateParametersContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &e.Description) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &e.Title) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EmailTemplateUpdateParameterProperties. -func (e EmailTemplateUpdateParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "body", e.Body) - populate(objectMap, "description", e.Description) - populate(objectMap, "parameters", e.Parameters) - populate(objectMap, "subject", e.Subject) - populate(objectMap, "title", e.Title) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateUpdateParameterProperties. -func (e *EmailTemplateUpdateParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "body": - err = unpopulate(val, "Body", &e.Body) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &e.Description) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &e.Parameters) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &e.Subject) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &e.Title) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EmailTemplateUpdateParameters. -func (e EmailTemplateUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", e.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateUpdateParameters. -func (e *EmailTemplateUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointDependency. -func (e EndpointDependency) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "domainName", e.DomainName) - populate(objectMap, "endpointDetails", e.EndpointDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency. -func (e *EndpointDependency) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "domainName": - err = unpopulate(val, "DomainName", &e.DomainName) - delete(rawMsg, key) - case "endpointDetails": - err = unpopulate(val, "EndpointDetails", &e.EndpointDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointDetail. -func (e EndpointDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "port", e.Port) - populate(objectMap, "region", e.Region) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail. -func (e *EndpointDetail) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "port": - err = unpopulate(val, "Port", &e.Port) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &e.Region) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorFieldContract. -func (e ErrorFieldContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", e.Code) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorFieldContract. -func (e *ErrorFieldContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &e.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. -func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", e.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. -func (e *ErrorResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &e.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorResponseBody. -func (e ErrorResponseBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "message", e.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseBody. -func (e *ErrorResponseBody) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &e.Details) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayCertificateAuthorityCollection. -func (g GatewayCertificateAuthorityCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCertificateAuthorityCollection. -func (g *GatewayCertificateAuthorityCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayCertificateAuthorityContract. -func (g GatewayCertificateAuthorityContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "type", g.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCertificateAuthorityContract. -func (g *GatewayCertificateAuthorityContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayCertificateAuthorityContractProperties. -func (g GatewayCertificateAuthorityContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "isTrusted", g.IsTrusted) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCertificateAuthorityContractProperties. -func (g *GatewayCertificateAuthorityContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isTrusted": - err = unpopulate(val, "IsTrusted", &g.IsTrusted) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayCollection. -func (g GatewayCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", g.Count) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCollection. -func (g *GatewayCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &g.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayContract. -func (g GatewayContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "type", g.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayContract. -func (g *GatewayContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayContractProperties. -func (g GatewayContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", g.Description) - populate(objectMap, "locationData", g.LocationData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayContractProperties. -func (g *GatewayContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &g.Description) - delete(rawMsg, key) - case "locationData": - err = unpopulate(val, "LocationData", &g.LocationData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayHostnameConfigurationCollection. -func (g GatewayHostnameConfigurationCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayHostnameConfigurationCollection. -func (g *GatewayHostnameConfigurationCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayHostnameConfigurationContract. -func (g GatewayHostnameConfigurationContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "type", g.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayHostnameConfigurationContract. -func (g *GatewayHostnameConfigurationContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayHostnameConfigurationContractProperties. -func (g GatewayHostnameConfigurationContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "certificateId", g.CertificateID) - populate(objectMap, "http2Enabled", g.HTTP2Enabled) - populate(objectMap, "hostname", g.Hostname) - populate(objectMap, "negotiateClientCertificate", g.NegotiateClientCertificate) - populate(objectMap, "tls10Enabled", g.Tls10Enabled) - populate(objectMap, "tls11Enabled", g.Tls11Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayHostnameConfigurationContractProperties. -func (g *GatewayHostnameConfigurationContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificateId": - err = unpopulate(val, "CertificateID", &g.CertificateID) - delete(rawMsg, key) - case "http2Enabled": - err = unpopulate(val, "HTTP2Enabled", &g.HTTP2Enabled) - delete(rawMsg, key) - case "hostname": - err = unpopulate(val, "Hostname", &g.Hostname) - delete(rawMsg, key) - case "negotiateClientCertificate": - err = unpopulate(val, "NegotiateClientCertificate", &g.NegotiateClientCertificate) - delete(rawMsg, key) - case "tls10Enabled": - err = unpopulate(val, "Tls10Enabled", &g.Tls10Enabled) - delete(rawMsg, key) - case "tls11Enabled": - err = unpopulate(val, "Tls11Enabled", &g.Tls11Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayKeyRegenerationRequestContract. -func (g GatewayKeyRegenerationRequestContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "keyType", g.KeyType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayKeyRegenerationRequestContract. -func (g *GatewayKeyRegenerationRequestContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "keyType": - err = unpopulate(val, "KeyType", &g.KeyType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayKeysContract. -func (g GatewayKeysContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "primary", g.Primary) - populate(objectMap, "secondary", g.Secondary) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayKeysContract. -func (g *GatewayKeysContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "primary": - err = unpopulate(val, "Primary", &g.Primary) - delete(rawMsg, key) - case "secondary": - err = unpopulate(val, "Secondary", &g.Secondary) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayTokenContract. -func (g GatewayTokenContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayTokenContract. -func (g *GatewayTokenContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayTokenRequestContract. -func (g GatewayTokenRequestContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expiry", g.Expiry) - populate(objectMap, "keyType", g.KeyType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayTokenRequestContract. -func (g *GatewayTokenRequestContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expiry": - err = unpopulateTimeRFC3339(val, "Expiry", &g.Expiry) - delete(rawMsg, key) - case "keyType": - err = unpopulate(val, "KeyType", &g.KeyType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GenerateSsoURLResult. -func (g GenerateSsoURLResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GenerateSsoURLResult. -func (g *GenerateSsoURLResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GlobalSchemaCollection. -func (g GlobalSchemaCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", g.Count) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GlobalSchemaCollection. -func (g *GlobalSchemaCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &g.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GlobalSchemaContract. -func (g GlobalSchemaContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "type", g.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GlobalSchemaContract. -func (g *GlobalSchemaContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GlobalSchemaContractProperties. -func (g GlobalSchemaContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", g.Description) - populateAny(objectMap, "document", g.Document) - populate(objectMap, "schemaType", g.SchemaType) - populateAny(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GlobalSchemaContractProperties. -func (g *GlobalSchemaContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &g.Description) - delete(rawMsg, key) - case "document": - err = unpopulate(val, "Document", &g.Document) - delete(rawMsg, key) - case "schemaType": - err = unpopulate(val, "SchemaType", &g.SchemaType) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GroupCollection. -func (g GroupCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", g.Count) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GroupCollection. -func (g *GroupCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &g.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GroupContract. -func (g GroupContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "type", g.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GroupContract. -func (g *GroupContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GroupContractProperties. -func (g GroupContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "builtIn", g.BuiltIn) - populate(objectMap, "description", g.Description) - populate(objectMap, "displayName", g.DisplayName) - populate(objectMap, "externalId", g.ExternalID) - populate(objectMap, "type", g.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GroupContractProperties. -func (g *GroupContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "builtIn": - err = unpopulate(val, "BuiltIn", &g.BuiltIn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &g.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &g.DisplayName) - delete(rawMsg, key) - case "externalId": - err = unpopulate(val, "ExternalID", &g.ExternalID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GroupCreateParameters. -func (g GroupCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", g.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GroupCreateParameters. -func (g *GroupCreateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GroupCreateParametersProperties. -func (g GroupCreateParametersProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", g.Description) - populate(objectMap, "displayName", g.DisplayName) - populate(objectMap, "externalId", g.ExternalID) - populate(objectMap, "type", g.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GroupCreateParametersProperties. -func (g *GroupCreateParametersProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &g.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &g.DisplayName) - delete(rawMsg, key) - case "externalId": - err = unpopulate(val, "ExternalID", &g.ExternalID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GroupUpdateParameters. -func (g GroupUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", g.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GroupUpdateParameters. -func (g *GroupUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GroupUpdateParametersProperties. -func (g GroupUpdateParametersProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", g.Description) - populate(objectMap, "displayName", g.DisplayName) - populate(objectMap, "externalId", g.ExternalID) - populate(objectMap, "type", g.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GroupUpdateParametersProperties. -func (g *GroupUpdateParametersProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &g.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &g.DisplayName) - delete(rawMsg, key) - case "externalId": - err = unpopulate(val, "ExternalID", &g.ExternalID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HTTPHeader. -func (h HTTPHeader) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", h.Name) - populate(objectMap, "value", h.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPHeader. -func (h *HTTPHeader) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &h.Name) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &h.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HTTPMessageDiagnostic. -func (h HTTPMessageDiagnostic) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "body", h.Body) - populate(objectMap, "dataMasking", h.DataMasking) - populate(objectMap, "headers", h.Headers) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPMessageDiagnostic. -func (h *HTTPMessageDiagnostic) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "body": - err = unpopulate(val, "Body", &h.Body) - delete(rawMsg, key) - case "dataMasking": - err = unpopulate(val, "DataMasking", &h.DataMasking) - delete(rawMsg, key) - case "headers": - err = unpopulate(val, "Headers", &h.Headers) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HostnameConfiguration. -func (h HostnameConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "certificate", h.Certificate) - populate(objectMap, "certificatePassword", h.CertificatePassword) - populate(objectMap, "certificateSource", h.CertificateSource) - populate(objectMap, "certificateStatus", h.CertificateStatus) - populate(objectMap, "defaultSslBinding", h.DefaultSSLBinding) - populate(objectMap, "encodedCertificate", h.EncodedCertificate) - populate(objectMap, "hostName", h.HostName) - populate(objectMap, "identityClientId", h.IdentityClientID) - populate(objectMap, "keyVaultId", h.KeyVaultID) - populate(objectMap, "negotiateClientCertificate", h.NegotiateClientCertificate) - populate(objectMap, "type", h.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HostnameConfiguration. -func (h *HostnameConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificate": - err = unpopulate(val, "Certificate", &h.Certificate) - delete(rawMsg, key) - case "certificatePassword": - err = unpopulate(val, "CertificatePassword", &h.CertificatePassword) - delete(rawMsg, key) - case "certificateSource": - err = unpopulate(val, "CertificateSource", &h.CertificateSource) - delete(rawMsg, key) - case "certificateStatus": - err = unpopulate(val, "CertificateStatus", &h.CertificateStatus) - delete(rawMsg, key) - case "defaultSslBinding": - err = unpopulate(val, "DefaultSSLBinding", &h.DefaultSSLBinding) - delete(rawMsg, key) - case "encodedCertificate": - err = unpopulate(val, "EncodedCertificate", &h.EncodedCertificate) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &h.HostName) - delete(rawMsg, key) - case "identityClientId": - err = unpopulate(val, "IdentityClientID", &h.IdentityClientID) - delete(rawMsg, key) - case "keyVaultId": - err = unpopulate(val, "KeyVaultID", &h.KeyVaultID) - delete(rawMsg, key) - case "negotiateClientCertificate": - err = unpopulate(val, "NegotiateClientCertificate", &h.NegotiateClientCertificate) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &h.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviderBaseParameters. -func (i IdentityProviderBaseParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowedTenants", i.AllowedTenants) - populate(objectMap, "authority", i.Authority) - populate(objectMap, "passwordResetPolicyName", i.PasswordResetPolicyName) - populate(objectMap, "profileEditingPolicyName", i.ProfileEditingPolicyName) - populate(objectMap, "signinPolicyName", i.SigninPolicyName) - populate(objectMap, "signinTenant", i.SigninTenant) - populate(objectMap, "signupPolicyName", i.SignupPolicyName) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderBaseParameters. -func (i *IdentityProviderBaseParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedTenants": - err = unpopulate(val, "AllowedTenants", &i.AllowedTenants) - delete(rawMsg, key) - case "authority": - err = unpopulate(val, "Authority", &i.Authority) - delete(rawMsg, key) - case "passwordResetPolicyName": - err = unpopulate(val, "PasswordResetPolicyName", &i.PasswordResetPolicyName) - delete(rawMsg, key) - case "profileEditingPolicyName": - err = unpopulate(val, "ProfileEditingPolicyName", &i.ProfileEditingPolicyName) - delete(rawMsg, key) - case "signinPolicyName": - err = unpopulate(val, "SigninPolicyName", &i.SigninPolicyName) - delete(rawMsg, key) - case "signinTenant": - err = unpopulate(val, "SigninTenant", &i.SigninTenant) - delete(rawMsg, key) - case "signupPolicyName": - err = unpopulate(val, "SignupPolicyName", &i.SignupPolicyName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviderContract. -func (i IdentityProviderContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderContract. -func (i *IdentityProviderContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviderContractProperties. -func (i IdentityProviderContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowedTenants", i.AllowedTenants) - populate(objectMap, "authority", i.Authority) - populate(objectMap, "clientId", i.ClientID) - populate(objectMap, "clientSecret", i.ClientSecret) - populate(objectMap, "passwordResetPolicyName", i.PasswordResetPolicyName) - populate(objectMap, "profileEditingPolicyName", i.ProfileEditingPolicyName) - populate(objectMap, "signinPolicyName", i.SigninPolicyName) - populate(objectMap, "signinTenant", i.SigninTenant) - populate(objectMap, "signupPolicyName", i.SignupPolicyName) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderContractProperties. -func (i *IdentityProviderContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedTenants": - err = unpopulate(val, "AllowedTenants", &i.AllowedTenants) - delete(rawMsg, key) - case "authority": - err = unpopulate(val, "Authority", &i.Authority) - delete(rawMsg, key) - case "clientId": - err = unpopulate(val, "ClientID", &i.ClientID) - delete(rawMsg, key) - case "clientSecret": - err = unpopulate(val, "ClientSecret", &i.ClientSecret) - delete(rawMsg, key) - case "passwordResetPolicyName": - err = unpopulate(val, "PasswordResetPolicyName", &i.PasswordResetPolicyName) - delete(rawMsg, key) - case "profileEditingPolicyName": - err = unpopulate(val, "ProfileEditingPolicyName", &i.ProfileEditingPolicyName) - delete(rawMsg, key) - case "signinPolicyName": - err = unpopulate(val, "SigninPolicyName", &i.SigninPolicyName) - delete(rawMsg, key) - case "signinTenant": - err = unpopulate(val, "SigninTenant", &i.SigninTenant) - delete(rawMsg, key) - case "signupPolicyName": - err = unpopulate(val, "SignupPolicyName", &i.SignupPolicyName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviderCreateContract. -func (i IdentityProviderCreateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderCreateContract. -func (i *IdentityProviderCreateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviderCreateContractProperties. -func (i IdentityProviderCreateContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowedTenants", i.AllowedTenants) - populate(objectMap, "authority", i.Authority) - populate(objectMap, "clientId", i.ClientID) - populate(objectMap, "clientSecret", i.ClientSecret) - populate(objectMap, "passwordResetPolicyName", i.PasswordResetPolicyName) - populate(objectMap, "profileEditingPolicyName", i.ProfileEditingPolicyName) - populate(objectMap, "signinPolicyName", i.SigninPolicyName) - populate(objectMap, "signinTenant", i.SigninTenant) - populate(objectMap, "signupPolicyName", i.SignupPolicyName) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderCreateContractProperties. -func (i *IdentityProviderCreateContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedTenants": - err = unpopulate(val, "AllowedTenants", &i.AllowedTenants) - delete(rawMsg, key) - case "authority": - err = unpopulate(val, "Authority", &i.Authority) - delete(rawMsg, key) - case "clientId": - err = unpopulate(val, "ClientID", &i.ClientID) - delete(rawMsg, key) - case "clientSecret": - err = unpopulate(val, "ClientSecret", &i.ClientSecret) - delete(rawMsg, key) - case "passwordResetPolicyName": - err = unpopulate(val, "PasswordResetPolicyName", &i.PasswordResetPolicyName) - delete(rawMsg, key) - case "profileEditingPolicyName": - err = unpopulate(val, "ProfileEditingPolicyName", &i.ProfileEditingPolicyName) - delete(rawMsg, key) - case "signinPolicyName": - err = unpopulate(val, "SigninPolicyName", &i.SigninPolicyName) - delete(rawMsg, key) - case "signinTenant": - err = unpopulate(val, "SigninTenant", &i.SigninTenant) - delete(rawMsg, key) - case "signupPolicyName": - err = unpopulate(val, "SignupPolicyName", &i.SignupPolicyName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviderList. -func (i IdentityProviderList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", i.Count) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderList. -func (i *IdentityProviderList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &i.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviderUpdateParameters. -func (i IdentityProviderUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", i.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderUpdateParameters. -func (i *IdentityProviderUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviderUpdateProperties. -func (i IdentityProviderUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowedTenants", i.AllowedTenants) - populate(objectMap, "authority", i.Authority) - populate(objectMap, "clientId", i.ClientID) - populate(objectMap, "clientSecret", i.ClientSecret) - populate(objectMap, "passwordResetPolicyName", i.PasswordResetPolicyName) - populate(objectMap, "profileEditingPolicyName", i.ProfileEditingPolicyName) - populate(objectMap, "signinPolicyName", i.SigninPolicyName) - populate(objectMap, "signinTenant", i.SigninTenant) - populate(objectMap, "signupPolicyName", i.SignupPolicyName) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderUpdateProperties. -func (i *IdentityProviderUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedTenants": - err = unpopulate(val, "AllowedTenants", &i.AllowedTenants) - delete(rawMsg, key) - case "authority": - err = unpopulate(val, "Authority", &i.Authority) - delete(rawMsg, key) - case "clientId": - err = unpopulate(val, "ClientID", &i.ClientID) - delete(rawMsg, key) - case "clientSecret": - err = unpopulate(val, "ClientSecret", &i.ClientSecret) - delete(rawMsg, key) - case "passwordResetPolicyName": - err = unpopulate(val, "PasswordResetPolicyName", &i.PasswordResetPolicyName) - delete(rawMsg, key) - case "profileEditingPolicyName": - err = unpopulate(val, "ProfileEditingPolicyName", &i.ProfileEditingPolicyName) - delete(rawMsg, key) - case "signinPolicyName": - err = unpopulate(val, "SigninPolicyName", &i.SigninPolicyName) - delete(rawMsg, key) - case "signinTenant": - err = unpopulate(val, "SigninTenant", &i.SigninTenant) - delete(rawMsg, key) - case "signupPolicyName": - err = unpopulate(val, "SignupPolicyName", &i.SignupPolicyName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueAttachmentCollection. -func (i IssueAttachmentCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", i.Count) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueAttachmentCollection. -func (i *IssueAttachmentCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &i.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueAttachmentContract. -func (i IssueAttachmentContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueAttachmentContract. -func (i *IssueAttachmentContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueAttachmentContractProperties. -func (i IssueAttachmentContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "content", i.Content) - populate(objectMap, "contentFormat", i.ContentFormat) - populate(objectMap, "title", i.Title) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueAttachmentContractProperties. -func (i *IssueAttachmentContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "content": - err = unpopulate(val, "Content", &i.Content) - delete(rawMsg, key) - case "contentFormat": - err = unpopulate(val, "ContentFormat", &i.ContentFormat) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &i.Title) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueCollection. -func (i IssueCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", i.Count) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueCollection. -func (i *IssueCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &i.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueCommentCollection. -func (i IssueCommentCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", i.Count) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueCommentCollection. -func (i *IssueCommentCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &i.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueCommentContract. -func (i IssueCommentContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueCommentContract. -func (i *IssueCommentContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueCommentContractProperties. -func (i IssueCommentContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdDate", i.CreatedDate) - populate(objectMap, "text", i.Text) - populate(objectMap, "userId", i.UserID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueCommentContractProperties. -func (i *IssueCommentContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &i.CreatedDate) - delete(rawMsg, key) - case "text": - err = unpopulate(val, "Text", &i.Text) - delete(rawMsg, key) - case "userId": - err = unpopulate(val, "UserID", &i.UserID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueContract. -func (i IssueContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueContract. -func (i *IssueContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueContractBaseProperties. -func (i IssueContractBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiId", i.APIID) - populateTimeRFC3339(objectMap, "createdDate", i.CreatedDate) - populate(objectMap, "state", i.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueContractBaseProperties. -func (i *IssueContractBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiId": - err = unpopulate(val, "APIID", &i.APIID) - delete(rawMsg, key) - case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &i.CreatedDate) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &i.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueContractProperties. -func (i IssueContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiId", i.APIID) - populateTimeRFC3339(objectMap, "createdDate", i.CreatedDate) - populate(objectMap, "description", i.Description) - populate(objectMap, "state", i.State) - populate(objectMap, "title", i.Title) - populate(objectMap, "userId", i.UserID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueContractProperties. -func (i *IssueContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiId": - err = unpopulate(val, "APIID", &i.APIID) - delete(rawMsg, key) - case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &i.CreatedDate) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &i.Description) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &i.State) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &i.Title) - delete(rawMsg, key) - case "userId": - err = unpopulate(val, "UserID", &i.UserID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueUpdateContract. -func (i IssueUpdateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", i.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueUpdateContract. -func (i *IssueUpdateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IssueUpdateContractProperties. -func (i IssueUpdateContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiId", i.APIID) - populateTimeRFC3339(objectMap, "createdDate", i.CreatedDate) - populate(objectMap, "description", i.Description) - populate(objectMap, "state", i.State) - populate(objectMap, "title", i.Title) - populate(objectMap, "userId", i.UserID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IssueUpdateContractProperties. -func (i *IssueUpdateContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiId": - err = unpopulate(val, "APIID", &i.APIID) - delete(rawMsg, key) - case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &i.CreatedDate) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &i.Description) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &i.State) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &i.Title) - delete(rawMsg, key) - case "userId": - err = unpopulate(val, "UserID", &i.UserID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KeyVaultContractCreateProperties. -func (k KeyVaultContractCreateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "identityClientId", k.IdentityClientID) - populate(objectMap, "secretIdentifier", k.SecretIdentifier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultContractCreateProperties. -func (k *KeyVaultContractCreateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "identityClientId": - err = unpopulate(val, "IdentityClientID", &k.IdentityClientID) - delete(rawMsg, key) - case "secretIdentifier": - err = unpopulate(val, "SecretIdentifier", &k.SecretIdentifier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KeyVaultContractProperties. -func (k KeyVaultContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "identityClientId", k.IdentityClientID) - populate(objectMap, "lastStatus", k.LastStatus) - populate(objectMap, "secretIdentifier", k.SecretIdentifier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultContractProperties. -func (k *KeyVaultContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "identityClientId": - err = unpopulate(val, "IdentityClientID", &k.IdentityClientID) - delete(rawMsg, key) - case "lastStatus": - err = unpopulate(val, "LastStatus", &k.LastStatus) - delete(rawMsg, key) - case "secretIdentifier": - err = unpopulate(val, "SecretIdentifier", &k.SecretIdentifier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KeyVaultLastAccessStatusContractProperties. -func (k KeyVaultLastAccessStatusContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", k.Code) - populate(objectMap, "message", k.Message) - populateTimeRFC3339(objectMap, "timeStampUtc", k.TimeStampUTC) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultLastAccessStatusContractProperties. -func (k *KeyVaultLastAccessStatusContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &k.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &k.Message) - delete(rawMsg, key) - case "timeStampUtc": - err = unpopulateTimeRFC3339(val, "TimeStampUTC", &k.TimeStampUTC) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoggerCollection. -func (l LoggerCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", l.Count) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoggerCollection. -func (l *LoggerCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &l.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoggerContract. -func (l LoggerContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", l.ID) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "type", l.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoggerContract. -func (l *LoggerContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &l.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &l.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &l.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoggerContractProperties. -func (l LoggerContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "credentials", l.Credentials) - populate(objectMap, "description", l.Description) - populate(objectMap, "isBuffered", l.IsBuffered) - populate(objectMap, "loggerType", l.LoggerType) - populate(objectMap, "resourceId", l.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoggerContractProperties. -func (l *LoggerContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "credentials": - err = unpopulate(val, "Credentials", &l.Credentials) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &l.Description) - delete(rawMsg, key) - case "isBuffered": - err = unpopulate(val, "IsBuffered", &l.IsBuffered) - delete(rawMsg, key) - case "loggerType": - err = unpopulate(val, "LoggerType", &l.LoggerType) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &l.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoggerUpdateContract. -func (l LoggerUpdateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", l.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoggerUpdateContract. -func (l *LoggerUpdateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &l.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoggerUpdateParameters. -func (l LoggerUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "credentials", l.Credentials) - populate(objectMap, "description", l.Description) - populate(objectMap, "isBuffered", l.IsBuffered) - populate(objectMap, "loggerType", l.LoggerType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoggerUpdateParameters. -func (l *LoggerUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "credentials": - err = unpopulate(val, "Credentials", &l.Credentials) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &l.Description) - delete(rawMsg, key) - case "isBuffered": - err = unpopulate(val, "IsBuffered", &l.IsBuffered) - delete(rawMsg, key) - case "loggerType": - err = unpopulate(val, "LoggerType", &l.LoggerType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NamedValueCollection. -func (n NamedValueCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", n.Count) - populate(objectMap, "nextLink", n.NextLink) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueCollection. -func (n *NamedValueCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &n.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &n.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NamedValueContract. -func (n NamedValueContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", n.ID) - populate(objectMap, "name", n.Name) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "type", n.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueContract. -func (n *NamedValueContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &n.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &n.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NamedValueContractProperties. -func (n NamedValueContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "displayName", n.DisplayName) - populate(objectMap, "keyVault", n.KeyVault) - populate(objectMap, "secret", n.Secret) - populate(objectMap, "tags", n.Tags) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueContractProperties. -func (n *NamedValueContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "displayName": - err = unpopulate(val, "DisplayName", &n.DisplayName) - delete(rawMsg, key) - case "keyVault": - err = unpopulate(val, "KeyVault", &n.KeyVault) - delete(rawMsg, key) - case "secret": - err = unpopulate(val, "Secret", &n.Secret) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &n.Tags) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NamedValueCreateContract. -func (n NamedValueCreateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", n.ID) - populate(objectMap, "name", n.Name) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "type", n.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueCreateContract. -func (n *NamedValueCreateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &n.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &n.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NamedValueCreateContractProperties. -func (n NamedValueCreateContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "displayName", n.DisplayName) - populate(objectMap, "keyVault", n.KeyVault) - populate(objectMap, "secret", n.Secret) - populate(objectMap, "tags", n.Tags) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueCreateContractProperties. -func (n *NamedValueCreateContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "displayName": - err = unpopulate(val, "DisplayName", &n.DisplayName) - delete(rawMsg, key) - case "keyVault": - err = unpopulate(val, "KeyVault", &n.KeyVault) - delete(rawMsg, key) - case "secret": - err = unpopulate(val, "Secret", &n.Secret) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &n.Tags) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NamedValueEntityBaseParameters. -func (n NamedValueEntityBaseParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "secret", n.Secret) - populate(objectMap, "tags", n.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueEntityBaseParameters. -func (n *NamedValueEntityBaseParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "secret": - err = unpopulate(val, "Secret", &n.Secret) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &n.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NamedValueSecretContract. -func (n NamedValueSecretContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueSecretContract. -func (n *NamedValueSecretContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NamedValueUpdateParameterProperties. -func (n NamedValueUpdateParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "displayName", n.DisplayName) - populate(objectMap, "keyVault", n.KeyVault) - populate(objectMap, "secret", n.Secret) - populate(objectMap, "tags", n.Tags) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueUpdateParameterProperties. -func (n *NamedValueUpdateParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "displayName": - err = unpopulate(val, "DisplayName", &n.DisplayName) - delete(rawMsg, key) - case "keyVault": - err = unpopulate(val, "KeyVault", &n.KeyVault) - delete(rawMsg, key) - case "secret": - err = unpopulate(val, "Secret", &n.Secret) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &n.Tags) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NamedValueUpdateParameters. -func (n NamedValueUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", n.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueUpdateParameters. -func (n *NamedValueUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &n.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkStatusContract. -func (n NetworkStatusContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "connectivityStatus", n.ConnectivityStatus) - populate(objectMap, "dnsServers", n.DNSServers) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkStatusContract. -func (n *NetworkStatusContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectivityStatus": - err = unpopulate(val, "ConnectivityStatus", &n.ConnectivityStatus) - delete(rawMsg, key) - case "dnsServers": - err = unpopulate(val, "DNSServers", &n.DNSServers) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkStatusContractByLocation. -func (n NetworkStatusContractByLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "location", n.Location) - populate(objectMap, "networkStatus", n.NetworkStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkStatusContractByLocation. -func (n *NetworkStatusContractByLocation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "location": - err = unpopulate(val, "Location", &n.Location) - delete(rawMsg, key) - case "networkStatus": - err = unpopulate(val, "NetworkStatus", &n.NetworkStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NotificationCollection. -func (n NotificationCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", n.Count) - populate(objectMap, "nextLink", n.NextLink) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationCollection. -func (n *NotificationCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &n.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &n.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NotificationContract. -func (n NotificationContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", n.ID) - populate(objectMap, "name", n.Name) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "type", n.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationContract. -func (n *NotificationContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &n.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &n.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NotificationContractProperties. -func (n NotificationContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", n.Description) - populate(objectMap, "recipients", n.Recipients) - populate(objectMap, "title", n.Title) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationContractProperties. -func (n *NotificationContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &n.Description) - delete(rawMsg, key) - case "recipients": - err = unpopulate(val, "Recipients", &n.Recipients) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &n.Title) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OAuth2AuthenticationSettingsContract. -func (o OAuth2AuthenticationSettingsContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "authorizationServerId", o.AuthorizationServerID) - populate(objectMap, "scope", o.Scope) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OAuth2AuthenticationSettingsContract. -func (o *OAuth2AuthenticationSettingsContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationServerId": - err = unpopulate(val, "AuthorizationServerID", &o.AuthorizationServerID) - delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &o.Scope) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OpenIDAuthenticationSettingsContract. -func (o OpenIDAuthenticationSettingsContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "bearerTokenSendingMethods", o.BearerTokenSendingMethods) - populate(objectMap, "openidProviderId", o.OpenidProviderID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDAuthenticationSettingsContract. -func (o *OpenIDAuthenticationSettingsContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bearerTokenSendingMethods": - err = unpopulate(val, "BearerTokenSendingMethods", &o.BearerTokenSendingMethods) - delete(rawMsg, key) - case "openidProviderId": - err = unpopulate(val, "OpenidProviderID", &o.OpenidProviderID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectProviderCollection. -func (o OpenIDConnectProviderCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", o.Count) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectProviderCollection. -func (o *OpenIDConnectProviderCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &o.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderContract. -func (o OpenidConnectProviderContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", o.ID) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "type", o.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderContract. -func (o *OpenidConnectProviderContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &o.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderContractProperties. -func (o OpenidConnectProviderContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientId", o.ClientID) - populate(objectMap, "clientSecret", o.ClientSecret) - populate(objectMap, "description", o.Description) - populate(objectMap, "displayName", o.DisplayName) - populate(objectMap, "metadataEndpoint", o.MetadataEndpoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderContractProperties. -func (o *OpenidConnectProviderContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &o.ClientID) - delete(rawMsg, key) - case "clientSecret": - err = unpopulate(val, "ClientSecret", &o.ClientSecret) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &o.DisplayName) - delete(rawMsg, key) - case "metadataEndpoint": - err = unpopulate(val, "MetadataEndpoint", &o.MetadataEndpoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderUpdateContract. -func (o OpenidConnectProviderUpdateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", o.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderUpdateContract. -func (o *OpenidConnectProviderUpdateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderUpdateContractProperties. -func (o OpenidConnectProviderUpdateContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientId", o.ClientID) - populate(objectMap, "clientSecret", o.ClientSecret) - populate(objectMap, "description", o.Description) - populate(objectMap, "displayName", o.DisplayName) - populate(objectMap, "metadataEndpoint", o.MetadataEndpoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderUpdateContractProperties. -func (o *OpenidConnectProviderUpdateContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &o.ClientID) - delete(rawMsg, key) - case "clientSecret": - err = unpopulate(val, "ClientSecret", &o.ClientSecret) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &o.DisplayName) - delete(rawMsg, key) - case "metadataEndpoint": - err = unpopulate(val, "MetadataEndpoint", &o.MetadataEndpoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "display", o.Display) - populate(objectMap, "name", o.Name) - populate(objectMap, "origin", o.Origin) - populateAny(objectMap, "properties", o.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. -func (o *Operation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "display": - err = unpopulate(val, "Display", &o.Display) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &o.Origin) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationCollection. -func (o OperationCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", o.Count) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationCollection. -func (o *OperationCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &o.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationContract. -func (o OperationContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", o.ID) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "type", o.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationContract. -func (o *OperationContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &o.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationContractProperties. -func (o OperationContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", o.Description) - populate(objectMap, "displayName", o.DisplayName) - populate(objectMap, "method", o.Method) - populate(objectMap, "policies", o.Policies) - populate(objectMap, "request", o.Request) - populate(objectMap, "responses", o.Responses) - populate(objectMap, "templateParameters", o.TemplateParameters) - populate(objectMap, "urlTemplate", o.URLTemplate) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationContractProperties. -func (o *OperationContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &o.DisplayName) - delete(rawMsg, key) - case "method": - err = unpopulate(val, "Method", &o.Method) - delete(rawMsg, key) - case "policies": - err = unpopulate(val, "Policies", &o.Policies) - delete(rawMsg, key) - case "request": - err = unpopulate(val, "Request", &o.Request) - delete(rawMsg, key) - case "responses": - err = unpopulate(val, "Responses", &o.Responses) - delete(rawMsg, key) - case "templateParameters": - err = unpopulate(val, "TemplateParameters", &o.TemplateParameters) - delete(rawMsg, key) - case "urlTemplate": - err = unpopulate(val, "URLTemplate", &o.URLTemplate) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. -func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", o.Description) - populate(objectMap, "operation", o.Operation) - populate(objectMap, "provider", o.Provider) - populate(objectMap, "resource", o.Resource) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. -func (o *OperationDisplay) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &o.Operation) - delete(rawMsg, key) - case "provider": - err = unpopulate(val, "Provider", &o.Provider) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &o.Resource) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationEntityBaseContract. -func (o OperationEntityBaseContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", o.Description) - populate(objectMap, "policies", o.Policies) - populate(objectMap, "request", o.Request) - populate(objectMap, "responses", o.Responses) - populate(objectMap, "templateParameters", o.TemplateParameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationEntityBaseContract. -func (o *OperationEntityBaseContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "policies": - err = unpopulate(val, "Policies", &o.Policies) - delete(rawMsg, key) - case "request": - err = unpopulate(val, "Request", &o.Request) - delete(rawMsg, key) - case "responses": - err = unpopulate(val, "Responses", &o.Responses) - delete(rawMsg, key) - case "templateParameters": - err = unpopulate(val, "TemplateParameters", &o.TemplateParameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. -func (o *OperationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationResultContract. -func (o OperationResultContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", o.ID) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "type", o.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultContract. -func (o *OperationResultContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &o.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationResultContractProperties. -func (o OperationResultContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "actionLog", o.ActionLog) - populate(objectMap, "error", o.Error) - populate(objectMap, "id", o.ID) - populate(objectMap, "resultInfo", o.ResultInfo) - populateTimeRFC3339(objectMap, "started", o.Started) - populate(objectMap, "status", o.Status) - populateTimeRFC3339(objectMap, "updated", o.Updated) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultContractProperties. -func (o *OperationResultContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionLog": - err = unpopulate(val, "ActionLog", &o.ActionLog) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &o.Error) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "resultInfo": - err = unpopulate(val, "ResultInfo", &o.ResultInfo) - delete(rawMsg, key) - case "started": - err = unpopulateTimeRFC3339(val, "Started", &o.Started) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &o.Status) - delete(rawMsg, key) - case "updated": - err = unpopulateTimeRFC3339(val, "Updated", &o.Updated) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationResultLogItemContract. -func (o OperationResultLogItemContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "action", o.Action) - populate(objectMap, "objectKey", o.ObjectKey) - populate(objectMap, "objectType", o.ObjectType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultLogItemContract. -func (o *OperationResultLogItemContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &o.Action) - delete(rawMsg, key) - case "objectKey": - err = unpopulate(val, "ObjectKey", &o.ObjectKey) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &o.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationTagResourceContractProperties. -func (o OperationTagResourceContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiName", o.APIName) - populate(objectMap, "apiRevision", o.APIRevision) - populate(objectMap, "apiVersion", o.APIVersion) - populate(objectMap, "description", o.Description) - populate(objectMap, "id", o.ID) - populate(objectMap, "method", o.Method) - populate(objectMap, "name", o.Name) - populate(objectMap, "urlTemplate", o.URLTemplate) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationTagResourceContractProperties. -func (o *OperationTagResourceContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiName": - err = unpopulate(val, "APIName", &o.APIName) - delete(rawMsg, key) - case "apiRevision": - err = unpopulate(val, "APIRevision", &o.APIRevision) - delete(rawMsg, key) - case "apiVersion": - err = unpopulate(val, "APIVersion", &o.APIVersion) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "method": - err = unpopulate(val, "Method", &o.Method) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "urlTemplate": - err = unpopulate(val, "URLTemplate", &o.URLTemplate) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationUpdateContract. -func (o OperationUpdateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", o.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationUpdateContract. -func (o *OperationUpdateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationUpdateContractProperties. -func (o OperationUpdateContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", o.Description) - populate(objectMap, "displayName", o.DisplayName) - populate(objectMap, "method", o.Method) - populate(objectMap, "policies", o.Policies) - populate(objectMap, "request", o.Request) - populate(objectMap, "responses", o.Responses) - populate(objectMap, "templateParameters", o.TemplateParameters) - populate(objectMap, "urlTemplate", o.URLTemplate) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationUpdateContractProperties. -func (o *OperationUpdateContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &o.DisplayName) - delete(rawMsg, key) - case "method": - err = unpopulate(val, "Method", &o.Method) - delete(rawMsg, key) - case "policies": - err = unpopulate(val, "Policies", &o.Policies) - delete(rawMsg, key) - case "request": - err = unpopulate(val, "Request", &o.Request) - delete(rawMsg, key) - case "responses": - err = unpopulate(val, "Responses", &o.Responses) - delete(rawMsg, key) - case "templateParameters": - err = unpopulate(val, "TemplateParameters", &o.TemplateParameters) - delete(rawMsg, key) - case "urlTemplate": - err = unpopulate(val, "URLTemplate", &o.URLTemplate) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpoint. -func (o OutboundEnvironmentEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "category", o.Category) - populate(objectMap, "endpoints", o.Endpoints) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpoint. -func (o *OutboundEnvironmentEndpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "category": - err = unpopulate(val, "Category", &o.Category) - delete(rawMsg, key) - case "endpoints": - err = unpopulate(val, "Endpoints", &o.Endpoints) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpointList. -func (o OutboundEnvironmentEndpointList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpointList. -func (o *OutboundEnvironmentEndpointList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ParameterContract. -func (p ParameterContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "defaultValue", p.DefaultValue) - populate(objectMap, "description", p.Description) - populate(objectMap, "examples", p.Examples) - populate(objectMap, "name", p.Name) - populate(objectMap, "required", p.Required) - populate(objectMap, "schemaId", p.SchemaID) - populate(objectMap, "type", p.Type) - populate(objectMap, "typeName", p.TypeName) - populate(objectMap, "values", p.Values) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ParameterContract. -func (p *ParameterContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "defaultValue": - err = unpopulate(val, "DefaultValue", &p.DefaultValue) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "examples": - err = unpopulate(val, "Examples", &p.Examples) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "required": - err = unpopulate(val, "Required", &p.Required) - delete(rawMsg, key) - case "schemaId": - err = unpopulate(val, "SchemaID", &p.SchemaID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &p.TypeName) - delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &p.Values) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ParameterExampleContract. -func (p ParameterExampleContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", p.Description) - populate(objectMap, "externalValue", p.ExternalValue) - populate(objectMap, "summary", p.Summary) - populateAny(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ParameterExampleContract. -func (p *ParameterExampleContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "externalValue": - err = unpopulate(val, "ExternalValue", &p.ExternalValue) - delete(rawMsg, key) - case "summary": - err = unpopulate(val, "Summary", &p.Summary) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PipelineDiagnosticSettings. -func (p PipelineDiagnosticSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "request", p.Request) - populate(objectMap, "response", p.Response) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PipelineDiagnosticSettings. -func (p *PipelineDiagnosticSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "request": - err = unpopulate(val, "Request", &p.Request) - delete(rawMsg, key) - case "response": - err = unpopulate(val, "Response", &p.Response) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyCollection. -func (p PolicyCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", p.Count) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyCollection. -func (p *PolicyCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &p.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyContract. -func (p PolicyContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyContract. -func (p *PolicyContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyContractProperties. -func (p PolicyContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "format", p.Format) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyContractProperties. -func (p *PolicyContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "format": - err = unpopulate(val, "Format", &p.Format) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyDescriptionCollection. -func (p PolicyDescriptionCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", p.Count) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyDescriptionCollection. -func (p *PolicyDescriptionCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &p.Count) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyDescriptionContract. -func (p PolicyDescriptionContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyDescriptionContract. -func (p *PolicyDescriptionContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyDescriptionContractProperties. -func (p PolicyDescriptionContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", p.Description) - populate(objectMap, "scope", p.Scope) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyDescriptionContractProperties. -func (p *PolicyDescriptionContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &p.Scope) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalDelegationSettings. -func (p PortalDelegationSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalDelegationSettings. -func (p *PortalDelegationSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalDelegationSettingsProperties. -func (p PortalDelegationSettingsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "subscriptions", p.Subscriptions) - populate(objectMap, "url", p.URL) - populate(objectMap, "userRegistration", p.UserRegistration) - populate(objectMap, "validationKey", p.ValidationKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalDelegationSettingsProperties. -func (p *PortalDelegationSettingsProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "subscriptions": - err = unpopulate(val, "Subscriptions", &p.Subscriptions) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &p.URL) - delete(rawMsg, key) - case "userRegistration": - err = unpopulate(val, "UserRegistration", &p.UserRegistration) - delete(rawMsg, key) - case "validationKey": - err = unpopulate(val, "ValidationKey", &p.ValidationKey) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalRevisionCollection. -func (p PortalRevisionCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalRevisionCollection. -func (p *PortalRevisionCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalRevisionContract. -func (p PortalRevisionContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalRevisionContract. -func (p *PortalRevisionContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalRevisionContractProperties. -func (p PortalRevisionContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdDateTime", p.CreatedDateTime) - populate(objectMap, "description", p.Description) - populate(objectMap, "isCurrent", p.IsCurrent) - populate(objectMap, "status", p.Status) - populate(objectMap, "statusDetails", p.StatusDetails) - populateTimeRFC3339(objectMap, "updatedDateTime", p.UpdatedDateTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalRevisionContractProperties. -func (p *PortalRevisionContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdDateTime": - err = unpopulateTimeRFC3339(val, "CreatedDateTime", &p.CreatedDateTime) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "isCurrent": - err = unpopulate(val, "IsCurrent", &p.IsCurrent) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) - delete(rawMsg, key) - case "statusDetails": - err = unpopulate(val, "StatusDetails", &p.StatusDetails) - delete(rawMsg, key) - case "updatedDateTime": - err = unpopulateTimeRFC3339(val, "UpdatedDateTime", &p.UpdatedDateTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalSettingValidationKeyContract. -func (p PortalSettingValidationKeyContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "validationKey", p.ValidationKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingValidationKeyContract. -func (p *PortalSettingValidationKeyContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "validationKey": - err = unpopulate(val, "ValidationKey", &p.ValidationKey) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalSettingsCollection. -func (p PortalSettingsCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", p.Count) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingsCollection. -func (p *PortalSettingsCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &p.Count) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalSettingsContract. -func (p PortalSettingsContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingsContract. -func (p *PortalSettingsContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalSettingsContractProperties. -func (p PortalSettingsContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", p.Enabled) - populate(objectMap, "subscriptions", p.Subscriptions) - populate(objectMap, "termsOfService", p.TermsOfService) - populate(objectMap, "url", p.URL) - populate(objectMap, "userRegistration", p.UserRegistration) - populate(objectMap, "validationKey", p.ValidationKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingsContractProperties. -func (p *PortalSettingsContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &p.Enabled) - delete(rawMsg, key) - case "subscriptions": - err = unpopulate(val, "Subscriptions", &p.Subscriptions) - delete(rawMsg, key) - case "termsOfService": - err = unpopulate(val, "TermsOfService", &p.TermsOfService) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &p.URL) - delete(rawMsg, key) - case "userRegistration": - err = unpopulate(val, "UserRegistration", &p.UserRegistration) - delete(rawMsg, key) - case "validationKey": - err = unpopulate(val, "ValidationKey", &p.ValidationKey) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalSigninSettingProperties. -func (p PortalSigninSettingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", p.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSigninSettingProperties. -func (p *PortalSigninSettingProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &p.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalSigninSettings. -func (p PortalSigninSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSigninSettings. -func (p *PortalSigninSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalSignupSettings. -func (p PortalSignupSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSignupSettings. -func (p *PortalSignupSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PortalSignupSettingsProperties. -func (p PortalSignupSettingsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", p.Enabled) - populate(objectMap, "termsOfService", p.TermsOfService) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSignupSettingsProperties. -func (p *PortalSignupSettingsProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &p.Enabled) - delete(rawMsg, key) - case "termsOfService": - err = unpopulate(val, "TermsOfService", &p.TermsOfService) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. -func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. -func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. -func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. -func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. -func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. -func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. -func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "privateEndpoint", p.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", p.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. -func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateEndpoint": - err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) - delete(rawMsg, key) - case "privateLinkServiceConnectionState": - err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionRequest. -func (p PrivateEndpointConnectionRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionRequest. -func (p *PrivateEndpointConnectionRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionRequestProperties. -func (p PrivateEndpointConnectionRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionRequestProperties. -func (p *PrivateEndpointConnectionRequestProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateLinkServiceConnectionState": - err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionWrapperProperties. -func (p PrivateEndpointConnectionWrapperProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "groupIds", p.GroupIDs) - populate(objectMap, "privateEndpoint", p.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", p.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionWrapperProperties. -func (p *PrivateEndpointConnectionWrapperProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupIds": - err = unpopulate(val, "GroupIDs", &p.GroupIDs) - delete(rawMsg, key) - case "privateEndpoint": - err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) - delete(rawMsg, key) - case "privateLinkServiceConnectionState": - err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. -func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. -func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. -func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. -func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. -func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "requiredMembers", p.RequiredMembers) - populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. -func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupId": - err = unpopulate(val, "GroupID", &p.GroupID) - delete(rawMsg, key) - case "requiredMembers": - err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) - delete(rawMsg, key) - case "requiredZoneNames": - err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. -func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "actionsRequired", p.ActionsRequired) - populate(objectMap, "description", p.Description) - populate(objectMap, "status", p.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. -func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionsRequired": - err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProductCollection. -func (p ProductCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", p.Count) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProductCollection. -func (p *ProductCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &p.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProductContract. -func (p ProductContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProductContract. -func (p *ProductContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProductContractProperties. -func (p ProductContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "approvalRequired", p.ApprovalRequired) - populate(objectMap, "description", p.Description) - populate(objectMap, "displayName", p.DisplayName) - populate(objectMap, "state", p.State) - populate(objectMap, "subscriptionRequired", p.SubscriptionRequired) - populate(objectMap, "subscriptionsLimit", p.SubscriptionsLimit) - populate(objectMap, "terms", p.Terms) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProductContractProperties. -func (p *ProductContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "approvalRequired": - err = unpopulate(val, "ApprovalRequired", &p.ApprovalRequired) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &p.DisplayName) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &p.State) - delete(rawMsg, key) - case "subscriptionRequired": - err = unpopulate(val, "SubscriptionRequired", &p.SubscriptionRequired) - delete(rawMsg, key) - case "subscriptionsLimit": - err = unpopulate(val, "SubscriptionsLimit", &p.SubscriptionsLimit) - delete(rawMsg, key) - case "terms": - err = unpopulate(val, "Terms", &p.Terms) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProductEntityBaseParameters. -func (p ProductEntityBaseParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "approvalRequired", p.ApprovalRequired) - populate(objectMap, "description", p.Description) - populate(objectMap, "state", p.State) - populate(objectMap, "subscriptionRequired", p.SubscriptionRequired) - populate(objectMap, "subscriptionsLimit", p.SubscriptionsLimit) - populate(objectMap, "terms", p.Terms) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProductEntityBaseParameters. -func (p *ProductEntityBaseParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "approvalRequired": - err = unpopulate(val, "ApprovalRequired", &p.ApprovalRequired) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &p.State) - delete(rawMsg, key) - case "subscriptionRequired": - err = unpopulate(val, "SubscriptionRequired", &p.SubscriptionRequired) - delete(rawMsg, key) - case "subscriptionsLimit": - err = unpopulate(val, "SubscriptionsLimit", &p.SubscriptionsLimit) - delete(rawMsg, key) - case "terms": - err = unpopulate(val, "Terms", &p.Terms) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProductTagResourceContractProperties. -func (p ProductTagResourceContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "approvalRequired", p.ApprovalRequired) - populate(objectMap, "description", p.Description) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "state", p.State) - populate(objectMap, "subscriptionRequired", p.SubscriptionRequired) - populate(objectMap, "subscriptionsLimit", p.SubscriptionsLimit) - populate(objectMap, "terms", p.Terms) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProductTagResourceContractProperties. -func (p *ProductTagResourceContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "approvalRequired": - err = unpopulate(val, "ApprovalRequired", &p.ApprovalRequired) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &p.State) - delete(rawMsg, key) - case "subscriptionRequired": - err = unpopulate(val, "SubscriptionRequired", &p.SubscriptionRequired) - delete(rawMsg, key) - case "subscriptionsLimit": - err = unpopulate(val, "SubscriptionsLimit", &p.SubscriptionsLimit) - delete(rawMsg, key) - case "terms": - err = unpopulate(val, "Terms", &p.Terms) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProductUpdateParameters. -func (p ProductUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProductUpdateParameters. -func (p *ProductUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProductUpdateProperties. -func (p ProductUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "approvalRequired", p.ApprovalRequired) - populate(objectMap, "description", p.Description) - populate(objectMap, "displayName", p.DisplayName) - populate(objectMap, "state", p.State) - populate(objectMap, "subscriptionRequired", p.SubscriptionRequired) - populate(objectMap, "subscriptionsLimit", p.SubscriptionsLimit) - populate(objectMap, "terms", p.Terms) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProductUpdateProperties. -func (p *ProductUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "approvalRequired": - err = unpopulate(val, "ApprovalRequired", &p.ApprovalRequired) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &p.DisplayName) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &p.State) - delete(rawMsg, key) - case "subscriptionRequired": - err = unpopulate(val, "SubscriptionRequired", &p.SubscriptionRequired) - delete(rawMsg, key) - case "subscriptionsLimit": - err = unpopulate(val, "SubscriptionsLimit", &p.SubscriptionsLimit) - delete(rawMsg, key) - case "terms": - err = unpopulate(val, "Terms", &p.Terms) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QuotaCounterCollection. -func (q QuotaCounterCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", q.Count) - populate(objectMap, "nextLink", q.NextLink) - populate(objectMap, "value", q.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterCollection. -func (q *QuotaCounterCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &q.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &q.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &q.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QuotaCounterContract. -func (q QuotaCounterContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "counterKey", q.CounterKey) - populateTimeRFC3339(objectMap, "periodEndTime", q.PeriodEndTime) - populate(objectMap, "periodKey", q.PeriodKey) - populateTimeRFC3339(objectMap, "periodStartTime", q.PeriodStartTime) - populate(objectMap, "value", q.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterContract. -func (q *QuotaCounterContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "counterKey": - err = unpopulate(val, "CounterKey", &q.CounterKey) - delete(rawMsg, key) - case "periodEndTime": - err = unpopulateTimeRFC3339(val, "PeriodEndTime", &q.PeriodEndTime) - delete(rawMsg, key) - case "periodKey": - err = unpopulate(val, "PeriodKey", &q.PeriodKey) - delete(rawMsg, key) - case "periodStartTime": - err = unpopulateTimeRFC3339(val, "PeriodStartTime", &q.PeriodStartTime) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &q.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QuotaCounterValueContract. -func (q QuotaCounterValueContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", q.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterValueContract. -func (q *QuotaCounterValueContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &q.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QuotaCounterValueContractProperties. -func (q QuotaCounterValueContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "callsCount", q.CallsCount) - populate(objectMap, "kbTransferred", q.KbTransferred) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterValueContractProperties. -func (q *QuotaCounterValueContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "callsCount": - err = unpopulate(val, "CallsCount", &q.CallsCount) - delete(rawMsg, key) - case "kbTransferred": - err = unpopulate(val, "KbTransferred", &q.KbTransferred) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QuotaCounterValueUpdateContract. -func (q QuotaCounterValueUpdateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", q.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterValueUpdateContract. -func (q *QuotaCounterValueUpdateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &q.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecipientEmailCollection. -func (r RecipientEmailCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", r.Count) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientEmailCollection. -func (r *RecipientEmailCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &r.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecipientEmailContract. -func (r RecipientEmailContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientEmailContract. -func (r *RecipientEmailContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecipientEmailContractProperties. -func (r RecipientEmailContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "email", r.Email) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientEmailContractProperties. -func (r *RecipientEmailContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "email": - err = unpopulate(val, "Email", &r.Email) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecipientUserCollection. -func (r RecipientUserCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", r.Count) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientUserCollection. -func (r *RecipientUserCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &r.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecipientUserContract. -func (r RecipientUserContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientUserContract. -func (r *RecipientUserContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecipientUsersContractProperties. -func (r RecipientUsersContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "userId", r.UserID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientUsersContractProperties. -func (r *RecipientUsersContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "userId": - err = unpopulate(val, "UserID", &r.UserID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecipientsContractProperties. -func (r RecipientsContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "emails", r.Emails) - populate(objectMap, "users", r.Users) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientsContractProperties. -func (r *RecipientsContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "emails": - err = unpopulate(val, "Emails", &r.Emails) - delete(rawMsg, key) - case "users": - err = unpopulate(val, "Users", &r.Users) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RegionContract. -func (r RegionContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "isDeleted", r.IsDeleted) - populate(objectMap, "isMasterRegion", r.IsMasterRegion) - populate(objectMap, "name", r.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RegionContract. -func (r *RegionContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isDeleted": - err = unpopulate(val, "IsDeleted", &r.IsDeleted) - delete(rawMsg, key) - case "isMasterRegion": - err = unpopulate(val, "IsMasterRegion", &r.IsMasterRegion) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RegionListResult. -func (r RegionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", r.Count) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RegionListResult. -func (r *RegionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &r.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RegistrationDelegationSettingsProperties. -func (r RegistrationDelegationSettingsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", r.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationDelegationSettingsProperties. -func (r *RegistrationDelegationSettingsProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &r.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnectionWrapper. -func (r RemotePrivateEndpointConnectionWrapper) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnectionWrapper. -func (r *RemotePrivateEndpointConnectionWrapper) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReportCollection. -func (r ReportCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", r.Count) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReportCollection. -func (r *ReportCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &r.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReportRecordContract. -func (r ReportRecordContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiId", r.APIID) - populate(objectMap, "apiRegion", r.APIRegion) - populate(objectMap, "apiTimeAvg", r.APITimeAvg) - populate(objectMap, "apiTimeMax", r.APITimeMax) - populate(objectMap, "apiTimeMin", r.APITimeMin) - populate(objectMap, "bandwidth", r.Bandwidth) - populate(objectMap, "cacheHitCount", r.CacheHitCount) - populate(objectMap, "cacheMissCount", r.CacheMissCount) - populate(objectMap, "callCountBlocked", r.CallCountBlocked) - populate(objectMap, "callCountFailed", r.CallCountFailed) - populate(objectMap, "callCountOther", r.CallCountOther) - populate(objectMap, "callCountSuccess", r.CallCountSuccess) - populate(objectMap, "callCountTotal", r.CallCountTotal) - populate(objectMap, "country", r.Country) - populate(objectMap, "interval", r.Interval) - populate(objectMap, "name", r.Name) - populate(objectMap, "operationId", r.OperationID) - populate(objectMap, "productId", r.ProductID) - populate(objectMap, "region", r.Region) - populate(objectMap, "serviceTimeAvg", r.ServiceTimeAvg) - populate(objectMap, "serviceTimeMax", r.ServiceTimeMax) - populate(objectMap, "serviceTimeMin", r.ServiceTimeMin) - populate(objectMap, "subscriptionId", r.SubscriptionID) - populateTimeRFC3339(objectMap, "timestamp", r.Timestamp) - populate(objectMap, "userId", r.UserID) - populate(objectMap, "zip", r.Zip) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReportRecordContract. -func (r *ReportRecordContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiId": - err = unpopulate(val, "APIID", &r.APIID) - delete(rawMsg, key) - case "apiRegion": - err = unpopulate(val, "APIRegion", &r.APIRegion) - delete(rawMsg, key) - case "apiTimeAvg": - err = unpopulate(val, "APITimeAvg", &r.APITimeAvg) - delete(rawMsg, key) - case "apiTimeMax": - err = unpopulate(val, "APITimeMax", &r.APITimeMax) - delete(rawMsg, key) - case "apiTimeMin": - err = unpopulate(val, "APITimeMin", &r.APITimeMin) - delete(rawMsg, key) - case "bandwidth": - err = unpopulate(val, "Bandwidth", &r.Bandwidth) - delete(rawMsg, key) - case "cacheHitCount": - err = unpopulate(val, "CacheHitCount", &r.CacheHitCount) - delete(rawMsg, key) - case "cacheMissCount": - err = unpopulate(val, "CacheMissCount", &r.CacheMissCount) - delete(rawMsg, key) - case "callCountBlocked": - err = unpopulate(val, "CallCountBlocked", &r.CallCountBlocked) - delete(rawMsg, key) - case "callCountFailed": - err = unpopulate(val, "CallCountFailed", &r.CallCountFailed) - delete(rawMsg, key) - case "callCountOther": - err = unpopulate(val, "CallCountOther", &r.CallCountOther) - delete(rawMsg, key) - case "callCountSuccess": - err = unpopulate(val, "CallCountSuccess", &r.CallCountSuccess) - delete(rawMsg, key) - case "callCountTotal": - err = unpopulate(val, "CallCountTotal", &r.CallCountTotal) - delete(rawMsg, key) - case "country": - err = unpopulate(val, "Country", &r.Country) - delete(rawMsg, key) - case "interval": - err = unpopulate(val, "Interval", &r.Interval) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "operationId": - err = unpopulate(val, "OperationID", &r.OperationID) - delete(rawMsg, key) - case "productId": - err = unpopulate(val, "ProductID", &r.ProductID) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &r.Region) - delete(rawMsg, key) - case "serviceTimeAvg": - err = unpopulate(val, "ServiceTimeAvg", &r.ServiceTimeAvg) - delete(rawMsg, key) - case "serviceTimeMax": - err = unpopulate(val, "ServiceTimeMax", &r.ServiceTimeMax) - delete(rawMsg, key) - case "serviceTimeMin": - err = unpopulate(val, "ServiceTimeMin", &r.ServiceTimeMin) - delete(rawMsg, key) - case "subscriptionId": - err = unpopulate(val, "SubscriptionID", &r.SubscriptionID) - delete(rawMsg, key) - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &r.Timestamp) - delete(rawMsg, key) - case "userId": - err = unpopulate(val, "UserID", &r.UserID) - delete(rawMsg, key) - case "zip": - err = unpopulate(val, "Zip", &r.Zip) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RepresentationContract. -func (r RepresentationContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "contentType", r.ContentType) - populate(objectMap, "examples", r.Examples) - populate(objectMap, "formParameters", r.FormParameters) - populate(objectMap, "schemaId", r.SchemaID) - populate(objectMap, "typeName", r.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RepresentationContract. -func (r *RepresentationContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "contentType": - err = unpopulate(val, "ContentType", &r.ContentType) - delete(rawMsg, key) - case "examples": - err = unpopulate(val, "Examples", &r.Examples) - delete(rawMsg, key) - case "formParameters": - err = unpopulate(val, "FormParameters", &r.FormParameters) - delete(rawMsg, key) - case "schemaId": - err = unpopulate(val, "SchemaID", &r.SchemaID) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &r.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RequestContract. -func (r RequestContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", r.Description) - populate(objectMap, "headers", r.Headers) - populate(objectMap, "queryParameters", r.QueryParameters) - populate(objectMap, "representations", r.Representations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RequestContract. -func (r *RequestContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &r.Description) - delete(rawMsg, key) - case "headers": - err = unpopulate(val, "Headers", &r.Headers) - delete(rawMsg, key) - case "queryParameters": - err = unpopulate(val, "QueryParameters", &r.QueryParameters) - delete(rawMsg, key) - case "representations": - err = unpopulate(val, "Representations", &r.Representations) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RequestReportCollection. -func (r RequestReportCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", r.Count) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RequestReportCollection. -func (r *RequestReportCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &r.Count) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RequestReportRecordContract. -func (r RequestReportRecordContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiId", r.APIID) - populate(objectMap, "apiRegion", r.APIRegion) - populate(objectMap, "apiTime", r.APITime) - populate(objectMap, "backendResponseCode", r.BackendResponseCode) - populate(objectMap, "cache", r.Cache) - populate(objectMap, "ipAddress", r.IPAddress) - populate(objectMap, "method", r.Method) - populate(objectMap, "operationId", r.OperationID) - populate(objectMap, "productId", r.ProductID) - populate(objectMap, "requestId", r.RequestID) - populate(objectMap, "requestSize", r.RequestSize) - populate(objectMap, "responseCode", r.ResponseCode) - populate(objectMap, "responseSize", r.ResponseSize) - populate(objectMap, "serviceTime", r.ServiceTime) - populate(objectMap, "subscriptionId", r.SubscriptionID) - populateTimeRFC3339(objectMap, "timestamp", r.Timestamp) - populate(objectMap, "url", r.URL) - populate(objectMap, "userId", r.UserID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RequestReportRecordContract. -func (r *RequestReportRecordContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiId": - err = unpopulate(val, "APIID", &r.APIID) - delete(rawMsg, key) - case "apiRegion": - err = unpopulate(val, "APIRegion", &r.APIRegion) - delete(rawMsg, key) - case "apiTime": - err = unpopulate(val, "APITime", &r.APITime) - delete(rawMsg, key) - case "backendResponseCode": - err = unpopulate(val, "BackendResponseCode", &r.BackendResponseCode) - delete(rawMsg, key) - case "cache": - err = unpopulate(val, "Cache", &r.Cache) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &r.IPAddress) - delete(rawMsg, key) - case "method": - err = unpopulate(val, "Method", &r.Method) - delete(rawMsg, key) - case "operationId": - err = unpopulate(val, "OperationID", &r.OperationID) - delete(rawMsg, key) - case "productId": - err = unpopulate(val, "ProductID", &r.ProductID) - delete(rawMsg, key) - case "requestId": - err = unpopulate(val, "RequestID", &r.RequestID) - delete(rawMsg, key) - case "requestSize": - err = unpopulate(val, "RequestSize", &r.RequestSize) - delete(rawMsg, key) - case "responseCode": - err = unpopulate(val, "ResponseCode", &r.ResponseCode) - delete(rawMsg, key) - case "responseSize": - err = unpopulate(val, "ResponseSize", &r.ResponseSize) - delete(rawMsg, key) - case "serviceTime": - err = unpopulate(val, "ServiceTime", &r.ServiceTime) - delete(rawMsg, key) - case "subscriptionId": - err = unpopulate(val, "SubscriptionID", &r.SubscriptionID) - delete(rawMsg, key) - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &r.Timestamp) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &r.URL) - delete(rawMsg, key) - case "userId": - err = unpopulate(val, "UserID", &r.UserID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. -func (r *Resource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceLocationDataContract. -func (r ResourceLocationDataContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "city", r.City) - populate(objectMap, "countryOrRegion", r.CountryOrRegion) - populate(objectMap, "district", r.District) - populate(objectMap, "name", r.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceLocationDataContract. -func (r *ResourceLocationDataContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "city": - err = unpopulate(val, "City", &r.City) - delete(rawMsg, key) - case "countryOrRegion": - err = unpopulate(val, "CountryOrRegion", &r.CountryOrRegion) - delete(rawMsg, key) - case "district": - err = unpopulate(val, "District", &r.District) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceSKU. -func (r ResourceSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", r.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU. -func (r *ResourceSKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapacity. -func (r ResourceSKUCapacity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "default", r.Default) - populate(objectMap, "maximum", r.Maximum) - populate(objectMap, "minimum", r.Minimum) - populate(objectMap, "scaleType", r.ScaleType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapacity. -func (r *ResourceSKUCapacity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "default": - err = unpopulate(val, "Default", &r.Default) - delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &r.Maximum) - delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &r.Minimum) - delete(rawMsg, key) - case "scaleType": - err = unpopulate(val, "ScaleType", &r.ScaleType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceSKUResult. -func (r ResourceSKUResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "capacity", r.Capacity) - populate(objectMap, "resourceType", r.ResourceType) - populate(objectMap, "sku", r.SKU) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUResult. -func (r *ResourceSKUResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacity": - err = unpopulate(val, "Capacity", &r.Capacity) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &r.ResourceType) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &r.SKU) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceSKUResults. -func (r ResourceSKUResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUResults. -func (r *ResourceSKUResults) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResponseContract. -func (r ResponseContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", r.Description) - populate(objectMap, "headers", r.Headers) - populate(objectMap, "representations", r.Representations) - populate(objectMap, "statusCode", r.StatusCode) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResponseContract. -func (r *ResponseContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &r.Description) - delete(rawMsg, key) - case "headers": - err = unpopulate(val, "Headers", &r.Headers) - delete(rawMsg, key) - case "representations": - err = unpopulate(val, "Representations", &r.Representations) - delete(rawMsg, key) - case "statusCode": - err = unpopulate(val, "StatusCode", &r.StatusCode) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKU. -func (s SKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiVersions", s.APIVersions) - populate(objectMap, "capabilities", s.Capabilities) - populate(objectMap, "capacity", s.Capacity) - populate(objectMap, "costs", s.Costs) - populate(objectMap, "family", s.Family) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "locationInfo", s.LocationInfo) - populate(objectMap, "locations", s.Locations) - populate(objectMap, "name", s.Name) - populate(objectMap, "resourceType", s.ResourceType) - populate(objectMap, "restrictions", s.Restrictions) - populate(objectMap, "size", s.Size) - populate(objectMap, "tier", s.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. -func (s *SKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiVersions": - err = unpopulate(val, "APIVersions", &s.APIVersions) - delete(rawMsg, key) - case "capabilities": - err = unpopulate(val, "Capabilities", &s.Capabilities) - delete(rawMsg, key) - case "capacity": - err = unpopulate(val, "Capacity", &s.Capacity) - delete(rawMsg, key) - case "costs": - err = unpopulate(val, "Costs", &s.Costs) - delete(rawMsg, key) - case "family": - err = unpopulate(val, "Family", &s.Family) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &s.Kind) - delete(rawMsg, key) - case "locationInfo": - err = unpopulate(val, "LocationInfo", &s.LocationInfo) - delete(rawMsg, key) - case "locations": - err = unpopulate(val, "Locations", &s.Locations) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &s.ResourceType) - delete(rawMsg, key) - case "restrictions": - err = unpopulate(val, "Restrictions", &s.Restrictions) - delete(rawMsg, key) - case "size": - err = unpopulate(val, "Size", &s.Size) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &s.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKUCapabilities. -func (s SKUCapabilities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", s.Name) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapabilities. -func (s *SKUCapabilities) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKUCapacity. -func (s SKUCapacity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "default", s.Default) - populate(objectMap, "maximum", s.Maximum) - populate(objectMap, "minimum", s.Minimum) - populate(objectMap, "scaleType", s.ScaleType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity. -func (s *SKUCapacity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "default": - err = unpopulate(val, "Default", &s.Default) - delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &s.Maximum) - delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &s.Minimum) - delete(rawMsg, key) - case "scaleType": - err = unpopulate(val, "ScaleType", &s.ScaleType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKUCosts. -func (s SKUCosts) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "extendedUnit", s.ExtendedUnit) - populate(objectMap, "meterID", s.MeterID) - populate(objectMap, "quantity", s.Quantity) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCosts. -func (s *SKUCosts) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "extendedUnit": - err = unpopulate(val, "ExtendedUnit", &s.ExtendedUnit) - delete(rawMsg, key) - case "meterID": - err = unpopulate(val, "MeterID", &s.MeterID) - delete(rawMsg, key) - case "quantity": - err = unpopulate(val, "Quantity", &s.Quantity) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKULocationInfo. -func (s SKULocationInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "location", s.Location) - populate(objectMap, "zoneDetails", s.ZoneDetails) - populate(objectMap, "zones", s.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKULocationInfo. -func (s *SKULocationInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - case "zoneDetails": - err = unpopulate(val, "ZoneDetails", &s.ZoneDetails) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &s.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKURestrictionInfo. -func (s SKURestrictionInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "locations", s.Locations) - populate(objectMap, "zones", s.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKURestrictionInfo. -func (s *SKURestrictionInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "locations": - err = unpopulate(val, "Locations", &s.Locations) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &s.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKURestrictions. -func (s SKURestrictions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "reasonCode", s.ReasonCode) - populate(objectMap, "restrictionInfo", s.RestrictionInfo) - populate(objectMap, "type", s.Type) - populate(objectMap, "values", s.Values) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKURestrictions. -func (s *SKURestrictions) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "reasonCode": - err = unpopulate(val, "ReasonCode", &s.ReasonCode) - delete(rawMsg, key) - case "restrictionInfo": - err = unpopulate(val, "RestrictionInfo", &s.RestrictionInfo) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &s.Values) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKUZoneDetails. -func (s SKUZoneDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "capabilities", s.Capabilities) - populate(objectMap, "name", s.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUZoneDetails. -func (s *SKUZoneDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capabilities": - err = unpopulate(val, "Capabilities", &s.Capabilities) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKUsResult. -func (s SKUsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUsResult. -func (s *SKUsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SamplingSettings. -func (s SamplingSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "percentage", s.Percentage) - populate(objectMap, "samplingType", s.SamplingType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SamplingSettings. -func (s *SamplingSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "percentage": - err = unpopulate(val, "Percentage", &s.Percentage) - delete(rawMsg, key) - case "samplingType": - err = unpopulate(val, "SamplingType", &s.SamplingType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SaveConfigurationParameter. -func (s SaveConfigurationParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", s.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SaveConfigurationParameter. -func (s *SaveConfigurationParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SaveConfigurationParameterProperties. -func (s SaveConfigurationParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "branch", s.Branch) - populate(objectMap, "force", s.Force) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SaveConfigurationParameterProperties. -func (s *SaveConfigurationParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "branch": - err = unpopulate(val, "Branch", &s.Branch) - delete(rawMsg, key) - case "force": - err = unpopulate(val, "Force", &s.Force) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SchemaCollection. -func (s SchemaCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", s.Count) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SchemaCollection. -func (s *SchemaCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &s.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SchemaContract. -func (s SchemaContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SchemaContract. -func (s *SchemaContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SchemaContractProperties. -func (s SchemaContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "contentType", s.ContentType) - populate(objectMap, "document", s.Document) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SchemaContractProperties. -func (s *SchemaContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "contentType": - err = unpopulate(val, "ContentType", &s.ContentType) - delete(rawMsg, key) - case "document": - err = unpopulate(val, "Document", &s.Document) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SchemaDocumentProperties. -func (s SchemaDocumentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateAny(objectMap, "components", s.Components) - populateAny(objectMap, "definitions", s.Definitions) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SchemaDocumentProperties. -func (s *SchemaDocumentProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "components": - err = unpopulate(val, "Components", &s.Components) - delete(rawMsg, key) - case "definitions": - err = unpopulate(val, "Definitions", &s.Definitions) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceApplyNetworkConfigurationParameters. -func (s ServiceApplyNetworkConfigurationParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "location", s.Location) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceApplyNetworkConfigurationParameters. -func (s *ServiceApplyNetworkConfigurationParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceBackupRestoreParameters. -func (s ServiceBackupRestoreParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "accessKey", s.AccessKey) - populate(objectMap, "accessType", s.AccessType) - populate(objectMap, "backupName", s.BackupName) - populate(objectMap, "clientId", s.ClientID) - populate(objectMap, "containerName", s.ContainerName) - populate(objectMap, "storageAccount", s.StorageAccount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBackupRestoreParameters. -func (s *ServiceBackupRestoreParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accessKey": - err = unpopulate(val, "AccessKey", &s.AccessKey) - delete(rawMsg, key) - case "accessType": - err = unpopulate(val, "AccessType", &s.AccessType) - delete(rawMsg, key) - case "backupName": - err = unpopulate(val, "BackupName", &s.BackupName) - delete(rawMsg, key) - case "clientId": - err = unpopulate(val, "ClientID", &s.ClientID) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &s.ContainerName) - delete(rawMsg, key) - case "storageAccount": - err = unpopulate(val, "StorageAccount", &s.StorageAccount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceBaseProperties. -func (s ServiceBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiVersionConstraint", s.APIVersionConstraint) - populate(objectMap, "additionalLocations", s.AdditionalLocations) - populate(objectMap, "certificates", s.Certificates) - populateTimeRFC3339(objectMap, "createdAtUtc", s.CreatedAtUTC) - populate(objectMap, "customProperties", s.CustomProperties) - populate(objectMap, "developerPortalUrl", s.DeveloperPortalURL) - populate(objectMap, "disableGateway", s.DisableGateway) - populate(objectMap, "enableClientCertificate", s.EnableClientCertificate) - populate(objectMap, "gatewayRegionalUrl", s.GatewayRegionalURL) - populate(objectMap, "gatewayUrl", s.GatewayURL) - populate(objectMap, "hostnameConfigurations", s.HostnameConfigurations) - populate(objectMap, "managementApiUrl", s.ManagementAPIURL) - populate(objectMap, "notificationSenderEmail", s.NotificationSenderEmail) - populate(objectMap, "platformVersion", s.PlatformVersion) - populate(objectMap, "portalUrl", s.PortalURL) - populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) - populate(objectMap, "privateIPAddresses", s.PrivateIPAddresses) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "publicIpAddressId", s.PublicIPAddressID) - populate(objectMap, "publicIPAddresses", s.PublicIPAddresses) - populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) - populate(objectMap, "restore", s.Restore) - populate(objectMap, "scmUrl", s.ScmURL) - populate(objectMap, "targetProvisioningState", s.TargetProvisioningState) - populate(objectMap, "virtualNetworkConfiguration", s.VirtualNetworkConfiguration) - populate(objectMap, "virtualNetworkType", s.VirtualNetworkType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBaseProperties. -func (s *ServiceBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiVersionConstraint": - err = unpopulate(val, "APIVersionConstraint", &s.APIVersionConstraint) - delete(rawMsg, key) - case "additionalLocations": - err = unpopulate(val, "AdditionalLocations", &s.AdditionalLocations) - delete(rawMsg, key) - case "certificates": - err = unpopulate(val, "Certificates", &s.Certificates) - delete(rawMsg, key) - case "createdAtUtc": - err = unpopulateTimeRFC3339(val, "CreatedAtUTC", &s.CreatedAtUTC) - delete(rawMsg, key) - case "customProperties": - err = unpopulate(val, "CustomProperties", &s.CustomProperties) - delete(rawMsg, key) - case "developerPortalUrl": - err = unpopulate(val, "DeveloperPortalURL", &s.DeveloperPortalURL) - delete(rawMsg, key) - case "disableGateway": - err = unpopulate(val, "DisableGateway", &s.DisableGateway) - delete(rawMsg, key) - case "enableClientCertificate": - err = unpopulate(val, "EnableClientCertificate", &s.EnableClientCertificate) - delete(rawMsg, key) - case "gatewayRegionalUrl": - err = unpopulate(val, "GatewayRegionalURL", &s.GatewayRegionalURL) - delete(rawMsg, key) - case "gatewayUrl": - err = unpopulate(val, "GatewayURL", &s.GatewayURL) - delete(rawMsg, key) - case "hostnameConfigurations": - err = unpopulate(val, "HostnameConfigurations", &s.HostnameConfigurations) - delete(rawMsg, key) - case "managementApiUrl": - err = unpopulate(val, "ManagementAPIURL", &s.ManagementAPIURL) - delete(rawMsg, key) - case "notificationSenderEmail": - err = unpopulate(val, "NotificationSenderEmail", &s.NotificationSenderEmail) - delete(rawMsg, key) - case "platformVersion": - err = unpopulate(val, "PlatformVersion", &s.PlatformVersion) - delete(rawMsg, key) - case "portalUrl": - err = unpopulate(val, "PortalURL", &s.PortalURL) - delete(rawMsg, key) - case "privateEndpointConnections": - err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) - delete(rawMsg, key) - case "privateIPAddresses": - err = unpopulate(val, "PrivateIPAddresses", &s.PrivateIPAddresses) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "publicIpAddressId": - err = unpopulate(val, "PublicIPAddressID", &s.PublicIPAddressID) - delete(rawMsg, key) - case "publicIPAddresses": - err = unpopulate(val, "PublicIPAddresses", &s.PublicIPAddresses) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) - delete(rawMsg, key) - case "restore": - err = unpopulate(val, "Restore", &s.Restore) - delete(rawMsg, key) - case "scmUrl": - err = unpopulate(val, "ScmURL", &s.ScmURL) - delete(rawMsg, key) - case "targetProvisioningState": - err = unpopulate(val, "TargetProvisioningState", &s.TargetProvisioningState) - delete(rawMsg, key) - case "virtualNetworkConfiguration": - err = unpopulate(val, "VirtualNetworkConfiguration", &s.VirtualNetworkConfiguration) - delete(rawMsg, key) - case "virtualNetworkType": - err = unpopulate(val, "VirtualNetworkType", &s.VirtualNetworkType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceCheckNameAvailabilityParameters. -func (s ServiceCheckNameAvailabilityParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", s.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceCheckNameAvailabilityParameters. -func (s *ServiceCheckNameAvailabilityParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceGetDomainOwnershipIdentifierResult. -func (s ServiceGetDomainOwnershipIdentifierResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "domainOwnershipIdentifier", s.DomainOwnershipIdentifier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceGetDomainOwnershipIdentifierResult. -func (s *ServiceGetDomainOwnershipIdentifierResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "domainOwnershipIdentifier": - err = unpopulate(val, "DomainOwnershipIdentifier", &s.DomainOwnershipIdentifier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceGetSsoTokenResult. -func (s ServiceGetSsoTokenResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "redirectUri", s.RedirectURI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceGetSsoTokenResult. -func (s *ServiceGetSsoTokenResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "redirectUri": - err = unpopulate(val, "RedirectURI", &s.RedirectURI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceIdentity. -func (s ServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "principalId", s.PrincipalID) - populate(objectMap, "tenantId", s.TenantID) - populate(objectMap, "type", s.Type) - populate(objectMap, "userAssignedIdentities", s.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceIdentity. -func (s *ServiceIdentity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "principalId": - err = unpopulate(val, "PrincipalID", &s.PrincipalID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &s.TenantID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &s.UserAssignedIdentities) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceListResult. -func (s ServiceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceListResult. -func (s *ServiceListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceNameAvailabilityResult. -func (s ServiceNameAvailabilityResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "message", s.Message) - populate(objectMap, "nameAvailable", s.NameAvailable) - populate(objectMap, "reason", s.Reason) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceNameAvailabilityResult. -func (s *ServiceNameAvailabilityResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "message": - err = unpopulate(val, "Message", &s.Message) - delete(rawMsg, key) - case "nameAvailable": - err = unpopulate(val, "NameAvailable", &s.NameAvailable) - delete(rawMsg, key) - case "reason": - err = unpopulate(val, "Reason", &s.Reason) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceProperties. -func (s ServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiVersionConstraint", s.APIVersionConstraint) - populate(objectMap, "additionalLocations", s.AdditionalLocations) - populate(objectMap, "certificates", s.Certificates) - populateTimeRFC3339(objectMap, "createdAtUtc", s.CreatedAtUTC) - populate(objectMap, "customProperties", s.CustomProperties) - populate(objectMap, "developerPortalUrl", s.DeveloperPortalURL) - populate(objectMap, "disableGateway", s.DisableGateway) - populate(objectMap, "enableClientCertificate", s.EnableClientCertificate) - populate(objectMap, "gatewayRegionalUrl", s.GatewayRegionalURL) - populate(objectMap, "gatewayUrl", s.GatewayURL) - populate(objectMap, "hostnameConfigurations", s.HostnameConfigurations) - populate(objectMap, "managementApiUrl", s.ManagementAPIURL) - populate(objectMap, "notificationSenderEmail", s.NotificationSenderEmail) - populate(objectMap, "platformVersion", s.PlatformVersion) - populate(objectMap, "portalUrl", s.PortalURL) - populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) - populate(objectMap, "privateIPAddresses", s.PrivateIPAddresses) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "publicIpAddressId", s.PublicIPAddressID) - populate(objectMap, "publicIPAddresses", s.PublicIPAddresses) - populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) - populate(objectMap, "publisherEmail", s.PublisherEmail) - populate(objectMap, "publisherName", s.PublisherName) - populate(objectMap, "restore", s.Restore) - populate(objectMap, "scmUrl", s.ScmURL) - populate(objectMap, "targetProvisioningState", s.TargetProvisioningState) - populate(objectMap, "virtualNetworkConfiguration", s.VirtualNetworkConfiguration) - populate(objectMap, "virtualNetworkType", s.VirtualNetworkType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceProperties. -func (s *ServiceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiVersionConstraint": - err = unpopulate(val, "APIVersionConstraint", &s.APIVersionConstraint) - delete(rawMsg, key) - case "additionalLocations": - err = unpopulate(val, "AdditionalLocations", &s.AdditionalLocations) - delete(rawMsg, key) - case "certificates": - err = unpopulate(val, "Certificates", &s.Certificates) - delete(rawMsg, key) - case "createdAtUtc": - err = unpopulateTimeRFC3339(val, "CreatedAtUTC", &s.CreatedAtUTC) - delete(rawMsg, key) - case "customProperties": - err = unpopulate(val, "CustomProperties", &s.CustomProperties) - delete(rawMsg, key) - case "developerPortalUrl": - err = unpopulate(val, "DeveloperPortalURL", &s.DeveloperPortalURL) - delete(rawMsg, key) - case "disableGateway": - err = unpopulate(val, "DisableGateway", &s.DisableGateway) - delete(rawMsg, key) - case "enableClientCertificate": - err = unpopulate(val, "EnableClientCertificate", &s.EnableClientCertificate) - delete(rawMsg, key) - case "gatewayRegionalUrl": - err = unpopulate(val, "GatewayRegionalURL", &s.GatewayRegionalURL) - delete(rawMsg, key) - case "gatewayUrl": - err = unpopulate(val, "GatewayURL", &s.GatewayURL) - delete(rawMsg, key) - case "hostnameConfigurations": - err = unpopulate(val, "HostnameConfigurations", &s.HostnameConfigurations) - delete(rawMsg, key) - case "managementApiUrl": - err = unpopulate(val, "ManagementAPIURL", &s.ManagementAPIURL) - delete(rawMsg, key) - case "notificationSenderEmail": - err = unpopulate(val, "NotificationSenderEmail", &s.NotificationSenderEmail) - delete(rawMsg, key) - case "platformVersion": - err = unpopulate(val, "PlatformVersion", &s.PlatformVersion) - delete(rawMsg, key) - case "portalUrl": - err = unpopulate(val, "PortalURL", &s.PortalURL) - delete(rawMsg, key) - case "privateEndpointConnections": - err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) - delete(rawMsg, key) - case "privateIPAddresses": - err = unpopulate(val, "PrivateIPAddresses", &s.PrivateIPAddresses) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "publicIpAddressId": - err = unpopulate(val, "PublicIPAddressID", &s.PublicIPAddressID) - delete(rawMsg, key) - case "publicIPAddresses": - err = unpopulate(val, "PublicIPAddresses", &s.PublicIPAddresses) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) - delete(rawMsg, key) - case "publisherEmail": - err = unpopulate(val, "PublisherEmail", &s.PublisherEmail) - delete(rawMsg, key) - case "publisherName": - err = unpopulate(val, "PublisherName", &s.PublisherName) - delete(rawMsg, key) - case "restore": - err = unpopulate(val, "Restore", &s.Restore) - delete(rawMsg, key) - case "scmUrl": - err = unpopulate(val, "ScmURL", &s.ScmURL) - delete(rawMsg, key) - case "targetProvisioningState": - err = unpopulate(val, "TargetProvisioningState", &s.TargetProvisioningState) - delete(rawMsg, key) - case "virtualNetworkConfiguration": - err = unpopulate(val, "VirtualNetworkConfiguration", &s.VirtualNetworkConfiguration) - delete(rawMsg, key) - case "virtualNetworkType": - err = unpopulate(val, "VirtualNetworkType", &s.VirtualNetworkType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceResource. -func (s ServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "sku", s.SKU) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - populate(objectMap, "zones", s.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResource. -func (s *ServiceResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &s.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &s.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &s.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceSKUProperties. -func (s ServiceSKUProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "capacity", s.Capacity) - populate(objectMap, "name", s.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSKUProperties. -func (s *ServiceSKUProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacity": - err = unpopulate(val, "Capacity", &s.Capacity) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceUpdateParameters. -func (s ServiceUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "sku", s.SKU) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - populate(objectMap, "zones", s.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceUpdateParameters. -func (s *ServiceUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &s.Identity) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &s.SKU) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &s.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &s.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceUpdateProperties. -func (s ServiceUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "apiVersionConstraint", s.APIVersionConstraint) - populate(objectMap, "additionalLocations", s.AdditionalLocations) - populate(objectMap, "certificates", s.Certificates) - populateTimeRFC3339(objectMap, "createdAtUtc", s.CreatedAtUTC) - populate(objectMap, "customProperties", s.CustomProperties) - populate(objectMap, "developerPortalUrl", s.DeveloperPortalURL) - populate(objectMap, "disableGateway", s.DisableGateway) - populate(objectMap, "enableClientCertificate", s.EnableClientCertificate) - populate(objectMap, "gatewayRegionalUrl", s.GatewayRegionalURL) - populate(objectMap, "gatewayUrl", s.GatewayURL) - populate(objectMap, "hostnameConfigurations", s.HostnameConfigurations) - populate(objectMap, "managementApiUrl", s.ManagementAPIURL) - populate(objectMap, "notificationSenderEmail", s.NotificationSenderEmail) - populate(objectMap, "platformVersion", s.PlatformVersion) - populate(objectMap, "portalUrl", s.PortalURL) - populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) - populate(objectMap, "privateIPAddresses", s.PrivateIPAddresses) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "publicIpAddressId", s.PublicIPAddressID) - populate(objectMap, "publicIPAddresses", s.PublicIPAddresses) - populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) - populate(objectMap, "publisherEmail", s.PublisherEmail) - populate(objectMap, "publisherName", s.PublisherName) - populate(objectMap, "restore", s.Restore) - populate(objectMap, "scmUrl", s.ScmURL) - populate(objectMap, "targetProvisioningState", s.TargetProvisioningState) - populate(objectMap, "virtualNetworkConfiguration", s.VirtualNetworkConfiguration) - populate(objectMap, "virtualNetworkType", s.VirtualNetworkType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceUpdateProperties. -func (s *ServiceUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiVersionConstraint": - err = unpopulate(val, "APIVersionConstraint", &s.APIVersionConstraint) - delete(rawMsg, key) - case "additionalLocations": - err = unpopulate(val, "AdditionalLocations", &s.AdditionalLocations) - delete(rawMsg, key) - case "certificates": - err = unpopulate(val, "Certificates", &s.Certificates) - delete(rawMsg, key) - case "createdAtUtc": - err = unpopulateTimeRFC3339(val, "CreatedAtUTC", &s.CreatedAtUTC) - delete(rawMsg, key) - case "customProperties": - err = unpopulate(val, "CustomProperties", &s.CustomProperties) - delete(rawMsg, key) - case "developerPortalUrl": - err = unpopulate(val, "DeveloperPortalURL", &s.DeveloperPortalURL) - delete(rawMsg, key) - case "disableGateway": - err = unpopulate(val, "DisableGateway", &s.DisableGateway) - delete(rawMsg, key) - case "enableClientCertificate": - err = unpopulate(val, "EnableClientCertificate", &s.EnableClientCertificate) - delete(rawMsg, key) - case "gatewayRegionalUrl": - err = unpopulate(val, "GatewayRegionalURL", &s.GatewayRegionalURL) - delete(rawMsg, key) - case "gatewayUrl": - err = unpopulate(val, "GatewayURL", &s.GatewayURL) - delete(rawMsg, key) - case "hostnameConfigurations": - err = unpopulate(val, "HostnameConfigurations", &s.HostnameConfigurations) - delete(rawMsg, key) - case "managementApiUrl": - err = unpopulate(val, "ManagementAPIURL", &s.ManagementAPIURL) - delete(rawMsg, key) - case "notificationSenderEmail": - err = unpopulate(val, "NotificationSenderEmail", &s.NotificationSenderEmail) - delete(rawMsg, key) - case "platformVersion": - err = unpopulate(val, "PlatformVersion", &s.PlatformVersion) - delete(rawMsg, key) - case "portalUrl": - err = unpopulate(val, "PortalURL", &s.PortalURL) - delete(rawMsg, key) - case "privateEndpointConnections": - err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) - delete(rawMsg, key) - case "privateIPAddresses": - err = unpopulate(val, "PrivateIPAddresses", &s.PrivateIPAddresses) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "publicIpAddressId": - err = unpopulate(val, "PublicIPAddressID", &s.PublicIPAddressID) - delete(rawMsg, key) - case "publicIPAddresses": - err = unpopulate(val, "PublicIPAddresses", &s.PublicIPAddresses) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) - delete(rawMsg, key) - case "publisherEmail": - err = unpopulate(val, "PublisherEmail", &s.PublisherEmail) - delete(rawMsg, key) - case "publisherName": - err = unpopulate(val, "PublisherName", &s.PublisherName) - delete(rawMsg, key) - case "restore": - err = unpopulate(val, "Restore", &s.Restore) - delete(rawMsg, key) - case "scmUrl": - err = unpopulate(val, "ScmURL", &s.ScmURL) - delete(rawMsg, key) - case "targetProvisioningState": - err = unpopulate(val, "TargetProvisioningState", &s.TargetProvisioningState) - delete(rawMsg, key) - case "virtualNetworkConfiguration": - err = unpopulate(val, "VirtualNetworkConfiguration", &s.VirtualNetworkConfiguration) - delete(rawMsg, key) - case "virtualNetworkType": - err = unpopulate(val, "VirtualNetworkType", &s.VirtualNetworkType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubscriptionCollection. -func (s SubscriptionCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", s.Count) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionCollection. -func (s *SubscriptionCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &s.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubscriptionContract. -func (s SubscriptionContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionContract. -func (s *SubscriptionContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubscriptionContractProperties. -func (s SubscriptionContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowTracing", s.AllowTracing) - populateTimeRFC3339(objectMap, "createdDate", s.CreatedDate) - populate(objectMap, "displayName", s.DisplayName) - populateTimeRFC3339(objectMap, "endDate", s.EndDate) - populateTimeRFC3339(objectMap, "expirationDate", s.ExpirationDate) - populateTimeRFC3339(objectMap, "notificationDate", s.NotificationDate) - populate(objectMap, "ownerId", s.OwnerID) - populate(objectMap, "primaryKey", s.PrimaryKey) - populate(objectMap, "scope", s.Scope) - populate(objectMap, "secondaryKey", s.SecondaryKey) - populateTimeRFC3339(objectMap, "startDate", s.StartDate) - populate(objectMap, "state", s.State) - populate(objectMap, "stateComment", s.StateComment) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionContractProperties. -func (s *SubscriptionContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowTracing": - err = unpopulate(val, "AllowTracing", &s.AllowTracing) - delete(rawMsg, key) - case "createdDate": - err = unpopulateTimeRFC3339(val, "CreatedDate", &s.CreatedDate) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &s.DisplayName) - delete(rawMsg, key) - case "endDate": - err = unpopulateTimeRFC3339(val, "EndDate", &s.EndDate) - delete(rawMsg, key) - case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &s.ExpirationDate) - delete(rawMsg, key) - case "notificationDate": - err = unpopulateTimeRFC3339(val, "NotificationDate", &s.NotificationDate) - delete(rawMsg, key) - case "ownerId": - err = unpopulate(val, "OwnerID", &s.OwnerID) - delete(rawMsg, key) - case "primaryKey": - err = unpopulate(val, "PrimaryKey", &s.PrimaryKey) - delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &s.Scope) - delete(rawMsg, key) - case "secondaryKey": - err = unpopulate(val, "SecondaryKey", &s.SecondaryKey) - delete(rawMsg, key) - case "startDate": - err = unpopulateTimeRFC3339(val, "StartDate", &s.StartDate) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - case "stateComment": - err = unpopulate(val, "StateComment", &s.StateComment) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubscriptionCreateParameterProperties. -func (s SubscriptionCreateParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowTracing", s.AllowTracing) - populate(objectMap, "displayName", s.DisplayName) - populate(objectMap, "ownerId", s.OwnerID) - populate(objectMap, "primaryKey", s.PrimaryKey) - populate(objectMap, "scope", s.Scope) - populate(objectMap, "secondaryKey", s.SecondaryKey) - populate(objectMap, "state", s.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionCreateParameterProperties. -func (s *SubscriptionCreateParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowTracing": - err = unpopulate(val, "AllowTracing", &s.AllowTracing) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &s.DisplayName) - delete(rawMsg, key) - case "ownerId": - err = unpopulate(val, "OwnerID", &s.OwnerID) - delete(rawMsg, key) - case "primaryKey": - err = unpopulate(val, "PrimaryKey", &s.PrimaryKey) - delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &s.Scope) - delete(rawMsg, key) - case "secondaryKey": - err = unpopulate(val, "SecondaryKey", &s.SecondaryKey) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubscriptionCreateParameters. -func (s SubscriptionCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", s.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionCreateParameters. -func (s *SubscriptionCreateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubscriptionKeyParameterNamesContract. -func (s SubscriptionKeyParameterNamesContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "header", s.Header) - populate(objectMap, "query", s.Query) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionKeyParameterNamesContract. -func (s *SubscriptionKeyParameterNamesContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "header": - err = unpopulate(val, "Header", &s.Header) - delete(rawMsg, key) - case "query": - err = unpopulate(val, "Query", &s.Query) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubscriptionKeysContract. -func (s SubscriptionKeysContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "primaryKey", s.PrimaryKey) - populate(objectMap, "secondaryKey", s.SecondaryKey) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionKeysContract. -func (s *SubscriptionKeysContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "primaryKey": - err = unpopulate(val, "PrimaryKey", &s.PrimaryKey) - delete(rawMsg, key) - case "secondaryKey": - err = unpopulate(val, "SecondaryKey", &s.SecondaryKey) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubscriptionUpdateParameterProperties. -func (s SubscriptionUpdateParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowTracing", s.AllowTracing) - populate(objectMap, "displayName", s.DisplayName) - populateTimeRFC3339(objectMap, "expirationDate", s.ExpirationDate) - populate(objectMap, "ownerId", s.OwnerID) - populate(objectMap, "primaryKey", s.PrimaryKey) - populate(objectMap, "scope", s.Scope) - populate(objectMap, "secondaryKey", s.SecondaryKey) - populate(objectMap, "state", s.State) - populate(objectMap, "stateComment", s.StateComment) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUpdateParameterProperties. -func (s *SubscriptionUpdateParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowTracing": - err = unpopulate(val, "AllowTracing", &s.AllowTracing) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &s.DisplayName) - delete(rawMsg, key) - case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &s.ExpirationDate) - delete(rawMsg, key) - case "ownerId": - err = unpopulate(val, "OwnerID", &s.OwnerID) - delete(rawMsg, key) - case "primaryKey": - err = unpopulate(val, "PrimaryKey", &s.PrimaryKey) - delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &s.Scope) - delete(rawMsg, key) - case "secondaryKey": - err = unpopulate(val, "SecondaryKey", &s.SecondaryKey) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - case "stateComment": - err = unpopulate(val, "StateComment", &s.StateComment) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubscriptionUpdateParameters. -func (s SubscriptionUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", s.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUpdateParameters. -func (s *SubscriptionUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubscriptionsDelegationSettingsProperties. -func (s SubscriptionsDelegationSettingsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", s.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionsDelegationSettingsProperties. -func (s *SubscriptionsDelegationSettingsProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &s.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagCollection. -func (t TagCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", t.Count) - populate(objectMap, "nextLink", t.NextLink) - populate(objectMap, "value", t.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagCollection. -func (t *TagCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &t.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &t.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &t.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagContract. -func (t TagContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", t.ID) - populate(objectMap, "name", t.Name) - populate(objectMap, "properties", t.Properties) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagContract. -func (t *TagContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagContractProperties. -func (t TagContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "displayName", t.DisplayName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagContractProperties. -func (t *TagContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "displayName": - err = unpopulate(val, "DisplayName", &t.DisplayName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagCreateUpdateParameters. -func (t TagCreateUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", t.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagCreateUpdateParameters. -func (t *TagCreateUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagDescriptionBaseProperties. -func (t TagDescriptionBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", t.Description) - populate(objectMap, "externalDocsDescription", t.ExternalDocsDescription) - populate(objectMap, "externalDocsUrl", t.ExternalDocsURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionBaseProperties. -func (t *TagDescriptionBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &t.Description) - delete(rawMsg, key) - case "externalDocsDescription": - err = unpopulate(val, "ExternalDocsDescription", &t.ExternalDocsDescription) - delete(rawMsg, key) - case "externalDocsUrl": - err = unpopulate(val, "ExternalDocsURL", &t.ExternalDocsURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagDescriptionCollection. -func (t TagDescriptionCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", t.Count) - populate(objectMap, "nextLink", t.NextLink) - populate(objectMap, "value", t.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionCollection. -func (t *TagDescriptionCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &t.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &t.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &t.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagDescriptionContract. -func (t TagDescriptionContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", t.ID) - populate(objectMap, "name", t.Name) - populate(objectMap, "properties", t.Properties) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionContract. -func (t *TagDescriptionContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagDescriptionContractProperties. -func (t TagDescriptionContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", t.Description) - populate(objectMap, "displayName", t.DisplayName) - populate(objectMap, "externalDocsDescription", t.ExternalDocsDescription) - populate(objectMap, "externalDocsUrl", t.ExternalDocsURL) - populate(objectMap, "tagId", t.TagID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionContractProperties. -func (t *TagDescriptionContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &t.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &t.DisplayName) - delete(rawMsg, key) - case "externalDocsDescription": - err = unpopulate(val, "ExternalDocsDescription", &t.ExternalDocsDescription) - delete(rawMsg, key) - case "externalDocsUrl": - err = unpopulate(val, "ExternalDocsURL", &t.ExternalDocsURL) - delete(rawMsg, key) - case "tagId": - err = unpopulate(val, "TagID", &t.TagID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagDescriptionCreateParameters. -func (t TagDescriptionCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", t.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionCreateParameters. -func (t *TagDescriptionCreateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagResourceCollection. -func (t TagResourceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", t.Count) - populate(objectMap, "nextLink", t.NextLink) - populate(objectMap, "value", t.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagResourceCollection. -func (t *TagResourceCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &t.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &t.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &t.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagResourceContract. -func (t TagResourceContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "api", t.API) - populate(objectMap, "operation", t.Operation) - populate(objectMap, "product", t.Product) - populate(objectMap, "tag", t.Tag) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagResourceContract. -func (t *TagResourceContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "api": - err = unpopulate(val, "API", &t.API) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &t.Operation) - delete(rawMsg, key) - case "product": - err = unpopulate(val, "Product", &t.Product) - delete(rawMsg, key) - case "tag": - err = unpopulate(val, "Tag", &t.Tag) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagResourceContractProperties. -func (t TagResourceContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", t.ID) - populate(objectMap, "name", t.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagResourceContractProperties. -func (t *TagResourceContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TenantConfigurationSyncStateContract. -func (t TenantConfigurationSyncStateContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", t.ID) - populate(objectMap, "name", t.Name) - populate(objectMap, "properties", t.Properties) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TenantConfigurationSyncStateContract. -func (t *TenantConfigurationSyncStateContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TenantConfigurationSyncStateContractProperties. -func (t TenantConfigurationSyncStateContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "branch", t.Branch) - populate(objectMap, "commitId", t.CommitID) - populateTimeRFC3339(objectMap, "configurationChangeDate", t.ConfigurationChangeDate) - populate(objectMap, "isExport", t.IsExport) - populate(objectMap, "isGitEnabled", t.IsGitEnabled) - populate(objectMap, "isSynced", t.IsSynced) - populate(objectMap, "lastOperationId", t.LastOperationID) - populateTimeRFC3339(objectMap, "syncDate", t.SyncDate) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TenantConfigurationSyncStateContractProperties. -func (t *TenantConfigurationSyncStateContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "branch": - err = unpopulate(val, "Branch", &t.Branch) - delete(rawMsg, key) - case "commitId": - err = unpopulate(val, "CommitID", &t.CommitID) - delete(rawMsg, key) - case "configurationChangeDate": - err = unpopulateTimeRFC3339(val, "ConfigurationChangeDate", &t.ConfigurationChangeDate) - delete(rawMsg, key) - case "isExport": - err = unpopulate(val, "IsExport", &t.IsExport) - delete(rawMsg, key) - case "isGitEnabled": - err = unpopulate(val, "IsGitEnabled", &t.IsGitEnabled) - delete(rawMsg, key) - case "isSynced": - err = unpopulate(val, "IsSynced", &t.IsSynced) - delete(rawMsg, key) - case "lastOperationId": - err = unpopulate(val, "LastOperationID", &t.LastOperationID) - delete(rawMsg, key) - case "syncDate": - err = unpopulateTimeRFC3339(val, "SyncDate", &t.SyncDate) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TenantSettingsCollection. -func (t TenantSettingsCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", t.NextLink) - populate(objectMap, "value", t.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TenantSettingsCollection. -func (t *TenantSettingsCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &t.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &t.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TenantSettingsContract. -func (t TenantSettingsContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", t.ID) - populate(objectMap, "name", t.Name) - populate(objectMap, "properties", t.Properties) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TenantSettingsContract. -func (t *TenantSettingsContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TenantSettingsContractProperties. -func (t TenantSettingsContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "settings", t.Settings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TenantSettingsContractProperties. -func (t *TenantSettingsContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "settings": - err = unpopulate(val, "Settings", &t.Settings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TermsOfServiceProperties. -func (t TermsOfServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "consentRequired", t.ConsentRequired) - populate(objectMap, "enabled", t.Enabled) - populate(objectMap, "text", t.Text) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TermsOfServiceProperties. -func (t *TermsOfServiceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "consentRequired": - err = unpopulate(val, "ConsentRequired", &t.ConsentRequired) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &t.Enabled) - delete(rawMsg, key) - case "text": - err = unpopulate(val, "Text", &t.Text) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TokenBodyParameterContract. -func (t TokenBodyParameterContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", t.Name) - populate(objectMap, "value", t.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TokenBodyParameterContract. -func (t *TokenBodyParameterContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &t.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserCollection. -func (u UserCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", u.Count) - populate(objectMap, "nextLink", u.NextLink) - populate(objectMap, "value", u.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserCollection. -func (u *UserCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &u.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &u.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &u.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserContract. -func (u UserContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", u.ID) - populate(objectMap, "name", u.Name) - populate(objectMap, "properties", u.Properties) - populate(objectMap, "type", u.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserContract. -func (u *UserContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &u.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &u.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &u.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserContractProperties. -func (u UserContractProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "email", u.Email) - populate(objectMap, "firstName", u.FirstName) - populate(objectMap, "groups", u.Groups) - populate(objectMap, "identities", u.Identities) - populate(objectMap, "lastName", u.LastName) - populate(objectMap, "note", u.Note) - populateTimeRFC3339(objectMap, "registrationDate", u.RegistrationDate) - populate(objectMap, "state", u.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserContractProperties. -func (u *UserContractProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "email": - err = unpopulate(val, "Email", &u.Email) - delete(rawMsg, key) - case "firstName": - err = unpopulate(val, "FirstName", &u.FirstName) - delete(rawMsg, key) - case "groups": - err = unpopulate(val, "Groups", &u.Groups) - delete(rawMsg, key) - case "identities": - err = unpopulate(val, "Identities", &u.Identities) - delete(rawMsg, key) - case "lastName": - err = unpopulate(val, "LastName", &u.LastName) - delete(rawMsg, key) - case "note": - err = unpopulate(val, "Note", &u.Note) - delete(rawMsg, key) - case "registrationDate": - err = unpopulateTimeRFC3339(val, "RegistrationDate", &u.RegistrationDate) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &u.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserCreateParameterProperties. -func (u UserCreateParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "appType", u.AppType) - populate(objectMap, "confirmation", u.Confirmation) - populate(objectMap, "email", u.Email) - populate(objectMap, "firstName", u.FirstName) - populate(objectMap, "identities", u.Identities) - populate(objectMap, "lastName", u.LastName) - populate(objectMap, "note", u.Note) - populate(objectMap, "password", u.Password) - populate(objectMap, "state", u.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreateParameterProperties. -func (u *UserCreateParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appType": - err = unpopulate(val, "AppType", &u.AppType) - delete(rawMsg, key) - case "confirmation": - err = unpopulate(val, "Confirmation", &u.Confirmation) - delete(rawMsg, key) - case "email": - err = unpopulate(val, "Email", &u.Email) - delete(rawMsg, key) - case "firstName": - err = unpopulate(val, "FirstName", &u.FirstName) - delete(rawMsg, key) - case "identities": - err = unpopulate(val, "Identities", &u.Identities) - delete(rawMsg, key) - case "lastName": - err = unpopulate(val, "LastName", &u.LastName) - delete(rawMsg, key) - case "note": - err = unpopulate(val, "Note", &u.Note) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &u.Password) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &u.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserCreateParameters. -func (u UserCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreateParameters. -func (u *UserCreateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserEntityBaseParameters. -func (u UserEntityBaseParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "identities", u.Identities) - populate(objectMap, "note", u.Note) - populate(objectMap, "state", u.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserEntityBaseParameters. -func (u *UserEntityBaseParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "identities": - err = unpopulate(val, "Identities", &u.Identities) - delete(rawMsg, key) - case "note": - err = unpopulate(val, "Note", &u.Note) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &u.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserIdentityCollection. -func (u UserIdentityCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", u.Count) - populate(objectMap, "nextLink", u.NextLink) - populate(objectMap, "value", u.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentityCollection. -func (u *UserIdentityCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &u.Count) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &u.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &u.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserIdentityContract. -func (u UserIdentityContract) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", u.ID) - populate(objectMap, "provider", u.Provider) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentityContract. -func (u *UserIdentityContract) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &u.ID) - delete(rawMsg, key) - case "provider": - err = unpopulate(val, "Provider", &u.Provider) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserIdentityProperties. -func (u UserIdentityProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientId", u.ClientID) - populate(objectMap, "principalId", u.PrincipalID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentityProperties. -func (u *UserIdentityProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &u.ClientID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &u.PrincipalID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserTokenParameterProperties. -func (u UserTokenParameterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expiry", u.Expiry) - populate(objectMap, "keyType", u.KeyType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserTokenParameterProperties. -func (u *UserTokenParameterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expiry": - err = unpopulateTimeRFC3339(val, "Expiry", &u.Expiry) - delete(rawMsg, key) - case "keyType": - err = unpopulate(val, "KeyType", &u.KeyType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserTokenParameters. -func (u UserTokenParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserTokenParameters. -func (u *UserTokenParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserTokenResult. -func (u UserTokenResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", u.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserTokenResult. -func (u *UserTokenResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &u.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserUpdateParameters. -func (u UserUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserUpdateParameters. -func (u *UserUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserUpdateParametersProperties. -func (u UserUpdateParametersProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "email", u.Email) - populate(objectMap, "firstName", u.FirstName) - populate(objectMap, "identities", u.Identities) - populate(objectMap, "lastName", u.LastName) - populate(objectMap, "note", u.Note) - populate(objectMap, "password", u.Password) - populate(objectMap, "state", u.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserUpdateParametersProperties. -func (u *UserUpdateParametersProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "email": - err = unpopulate(val, "Email", &u.Email) - delete(rawMsg, key) - case "firstName": - err = unpopulate(val, "FirstName", &u.FirstName) - delete(rawMsg, key) - case "identities": - err = unpopulate(val, "Identities", &u.Identities) - delete(rawMsg, key) - case "lastName": - err = unpopulate(val, "LastName", &u.LastName) - delete(rawMsg, key) - case "note": - err = unpopulate(val, "Note", &u.Note) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &u.Password) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &u.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkConfiguration. -func (v VirtualNetworkConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "subnetResourceId", v.SubnetResourceID) - populate(objectMap, "subnetname", v.Subnetname) - populate(objectMap, "vnetid", v.Vnetid) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkConfiguration. -func (v *VirtualNetworkConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "subnetResourceId": - err = unpopulate(val, "SubnetResourceID", &v.SubnetResourceID) - delete(rawMsg, key) - case "subnetname": - err = unpopulate(val, "Subnetname", &v.Subnetname) - delete(rawMsg, key) - case "vnetid": - err = unpopulate(val, "Vnetid", &v.Vnetid) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type X509CertificateName. -func (x X509CertificateName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "issuerCertificateThumbprint", x.IssuerCertificateThumbprint) - populate(objectMap, "name", x.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type X509CertificateName. -func (x *X509CertificateName) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", x, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "issuerCertificateThumbprint": - err = unpopulate(val, "IssuerCertificateThumbprint", &x.IssuerCertificateThumbprint) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &x.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", x, err) - } - } - return nil -} - -func populate(m map[string]any, k string, v any) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func populateAny(m map[string]any, k string, v any) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v any) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/operation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/operation_client.go deleted file mode 100644 index c833fe73..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/operation_client.go +++ /dev/null @@ -1,135 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// OperationClient contains the methods for the Operation group. -// Don't use this type directly, use NewOperationClient() instead. -type OperationClient struct { - internal *arm.Client - subscriptionID string -} - -// NewOperationClient creates a new instance of OperationClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewOperationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationClient, error) { - cl, err := arm.NewClient(moduleName+".OperationClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &OperationClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// NewListByTagsPager - Lists a collection of operations associated with tags. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has -// ;rev=n as a suffix where n is the revision number. -// - options - OperationClientListByTagsOptions contains the optional parameters for the OperationClient.NewListByTagsPager -// method. -func (client *OperationClient) NewListByTagsPager(resourceGroupName string, serviceName string, apiID string, options *OperationClientListByTagsOptions) *runtime.Pager[OperationClientListByTagsResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationClientListByTagsResponse]{ - More: func(page OperationClientListByTagsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationClientListByTagsResponse) (OperationClientListByTagsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByTagsCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationClientListByTagsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationClientListByTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationClientListByTagsResponse{}, runtime.NewResponseError(resp) - } - return client.listByTagsHandleResponse(resp) - }, - }) -} - -// listByTagsCreateRequest creates the ListByTags request. -func (client *OperationClient) listByTagsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *OperationClientListByTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiID == "" { - return nil, errors.New("parameter apiID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.Skip != nil { - reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) - } - if options != nil && options.IncludeNotTaggedOperations != nil { - reqQP.Set("includeNotTaggedOperations", strconv.FormatBool(*options.IncludeNotTaggedOperations)) - } - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByTagsHandleResponse handles the ListByTags response. -func (client *OperationClient) listByTagsHandleResponse(resp *http.Response) (OperationClientListByTagsResponse, error) { - result := OperationClientListByTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TagResourceCollection); err != nil { - return OperationClientListByTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/operations_client.go deleted file mode 100644 index 472db7d5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/operations_client.go +++ /dev/null @@ -1,94 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the APIManagementOperations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - internal *arm.Client -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - internal: cl, - } - return client, nil -} - -// NewListPager - Lists all of the available REST API operations of the Microsoft.ApiManagement provider. -// -// Generated from API version 2021-08-01 -// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.ApiManagement/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/policy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/policy_client.go deleted file mode 100644 index ff25d6f5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/policy_client.go +++ /dev/null @@ -1,358 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PolicyClient contains the methods for the Policy group. -// Don't use this type directly, use NewPolicyClient() instead. -type PolicyClient struct { - internal *arm.Client - subscriptionID string -} - -// NewPolicyClient creates a new instance of PolicyClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicyClient, error) { - cl, err := arm.NewClient(moduleName+".PolicyClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &PolicyClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates the global policy configuration of the Api Management service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - policyID - The identifier of the Policy. -// - parameters - The policy contents to apply. -// - options - PolicyClientCreateOrUpdateOptions contains the optional parameters for the PolicyClient.CreateOrUpdate method. -func (client *PolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, parameters PolicyContract, options *PolicyClientCreateOrUpdateOptions) (PolicyClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, policyID, parameters, options) - if err != nil { - return PolicyClientCreateOrUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PolicyClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return PolicyClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PolicyClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, parameters PolicyContract, options *PolicyClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if policyID == "" { - return nil, errors.New("parameter policyID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - if options != nil && options.IfMatch != nil { - req.Raw().Header["If-Match"] = []string{*options.IfMatch} - } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *PolicyClient) createOrUpdateHandleResponse(resp *http.Response) (PolicyClientCreateOrUpdateResponse, error) { - result := PolicyClientCreateOrUpdateResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { - return PolicyClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes the global policy configuration of the Api Management Service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - policyID - The identifier of the Policy. -// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or -// it should be * for unconditional update. -// - options - PolicyClientDeleteOptions contains the optional parameters for the PolicyClient.Delete method. -func (client *PolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, ifMatch string, options *PolicyClientDeleteOptions) (PolicyClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, policyID, ifMatch, options) - if err != nil { - return PolicyClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PolicyClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PolicyClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return PolicyClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, ifMatch string, options *PolicyClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if policyID == "" { - return nil, errors.New("parameter policyID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Global policy definition of the Api Management service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - policyID - The identifier of the Policy. -// - options - PolicyClientGetOptions contains the optional parameters for the PolicyClient.Get method. -func (client *PolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetOptions) (PolicyClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, policyID, options) - if err != nil { - return PolicyClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PolicyClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PolicyClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PolicyClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if policyID == "" { - return nil, errors.New("parameter policyID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Format != nil { - reqQP.Set("format", string(*options.Format)) - } - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PolicyClient) getHandleResponse(resp *http.Response) (PolicyClientGetResponse, error) { - result := PolicyClientGetResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { - return PolicyClientGetResponse{}, err - } - return result, nil -} - -// GetEntityTag - Gets the entity state (Etag) version of the Global policy definition in the Api Management service. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - policyID - The identifier of the Policy. -// - options - PolicyClientGetEntityTagOptions contains the optional parameters for the PolicyClient.GetEntityTag method. -func (client *PolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetEntityTagOptions) (PolicyClientGetEntityTagResponse, error) { - req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, policyID, options) - if err != nil { - return PolicyClientGetEntityTagResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PolicyClientGetEntityTagResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PolicyClientGetEntityTagResponse{}, runtime.NewResponseError(resp) - } - return client.getEntityTagHandleResponse(resp) -} - -// getEntityTagCreateRequest creates the GetEntityTag request. -func (client *PolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetEntityTagOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if policyID == "" { - return nil, errors.New("parameter policyID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getEntityTagHandleResponse handles the GetEntityTag response. -func (client *PolicyClient) getEntityTagHandleResponse(resp *http.Response) (PolicyClientGetEntityTagResponse, error) { - result := PolicyClientGetEntityTagResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 - return result, nil -} - -// ListByService - Lists all the Global Policy definitions of the Api Management service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - PolicyClientListByServiceOptions contains the optional parameters for the PolicyClient.ListByService method. -func (client *PolicyClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *PolicyClientListByServiceOptions) (PolicyClientListByServiceResponse, error) { - req, err := client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return PolicyClientListByServiceResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PolicyClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PolicyClientListByServiceResponse{}, runtime.NewResponseError(resp) - } - return client.listByServiceHandleResponse(resp) -} - -// listByServiceCreateRequest creates the ListByService request. -func (client *PolicyClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PolicyClientListByServiceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByServiceHandleResponse handles the ListByService response. -func (client *PolicyClient) listByServiceHandleResponse(resp *http.Response) (PolicyClientListByServiceResponse, error) { - result := PolicyClientListByServiceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PolicyCollection); err != nil { - return PolicyClientListByServiceResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/privateendpointconnection_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/privateendpointconnection_client.go deleted file mode 100644 index 57cc2140..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/privateendpointconnection_client.go +++ /dev/null @@ -1,434 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateEndpointConnectionClient contains the methods for the PrivateEndpointConnection group. -// Don't use this type directly, use NewPrivateEndpointConnectionClient() instead. -type PrivateEndpointConnectionClient struct { - internal *arm.Client - subscriptionID string -} - -// NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewPrivateEndpointConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionClient, error) { - cl, err := arm.NewClient(moduleName+".PrivateEndpointConnectionClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &PrivateEndpointConnectionClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a new Private Endpoint Connection or updates an existing one. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - privateEndpointConnectionName - Name of the private endpoint connection. -// - options - PrivateEndpointConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginCreateOrUpdate -// method. -func (client *PrivateEndpointConnectionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, privateEndpointConnectionRequest PrivateEndpointConnectionRequest, options *PrivateEndpointConnectionClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, privateEndpointConnectionName, privateEndpointConnectionRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateEndpointConnectionClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Creates a new Private Endpoint Connection or updates an existing one. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *PrivateEndpointConnectionClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, privateEndpointConnectionRequest PrivateEndpointConnectionRequest, options *PrivateEndpointConnectionClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, privateEndpointConnectionName, privateEndpointConnectionRequest, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PrivateEndpointConnectionClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, privateEndpointConnectionRequest PrivateEndpointConnectionRequest, options *PrivateEndpointConnectionClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointConnectionRequest) -} - -// BeginDelete - Deletes the specified Private Endpoint Connection. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - privateEndpointConnectionName - Name of the private endpoint connection. -// - options - PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete -// method. -func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateEndpointConnectionClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Deletes the specified Private Endpoint Connection. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *PrivateEndpointConnectionClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PrivateEndpointConnectionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GetByName - Gets the details of the Private Endpoint Connection specified by its identifier. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - privateEndpointConnectionName - Name of the private endpoint connection. -// - options - PrivateEndpointConnectionClientGetByNameOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetByName -// method. -func (client *PrivateEndpointConnectionClient) GetByName(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientGetByNameOptions) (PrivateEndpointConnectionClientGetByNameResponse, error) { - req, err := client.getByNameCreateRequest(ctx, resourceGroupName, serviceName, privateEndpointConnectionName, options) - if err != nil { - return PrivateEndpointConnectionClientGetByNameResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateEndpointConnectionClientGetByNameResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionClientGetByNameResponse{}, runtime.NewResponseError(resp) - } - return client.getByNameHandleResponse(resp) -} - -// getByNameCreateRequest creates the GetByName request. -func (client *PrivateEndpointConnectionClient) getByNameCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientGetByNameOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getByNameHandleResponse handles the GetByName response. -func (client *PrivateEndpointConnectionClient) getByNameHandleResponse(resp *http.Response) (PrivateEndpointConnectionClientGetByNameResponse, error) { - result := PrivateEndpointConnectionClientGetByNameResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { - return PrivateEndpointConnectionClientGetByNameResponse{}, err - } - return result, nil -} - -// GetPrivateLinkResource - Gets the private link resources -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - privateLinkSubResourceName - Name of the private link resource. -// - options - PrivateEndpointConnectionClientGetPrivateLinkResourceOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetPrivateLinkResource -// method. -func (client *PrivateEndpointConnectionClient) GetPrivateLinkResource(ctx context.Context, resourceGroupName string, serviceName string, privateLinkSubResourceName string, options *PrivateEndpointConnectionClientGetPrivateLinkResourceOptions) (PrivateEndpointConnectionClientGetPrivateLinkResourceResponse, error) { - req, err := client.getPrivateLinkResourceCreateRequest(ctx, resourceGroupName, serviceName, privateLinkSubResourceName, options) - if err != nil { - return PrivateEndpointConnectionClientGetPrivateLinkResourceResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateEndpointConnectionClientGetPrivateLinkResourceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionClientGetPrivateLinkResourceResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateLinkResourceHandleResponse(resp) -} - -// getPrivateLinkResourceCreateRequest creates the GetPrivateLinkResource request. -func (client *PrivateEndpointConnectionClient) getPrivateLinkResourceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, privateLinkSubResourceName string, options *PrivateEndpointConnectionClientGetPrivateLinkResourceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if privateLinkSubResourceName == "" { - return nil, errors.New("parameter privateLinkSubResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateLinkSubResourceName}", url.PathEscape(privateLinkSubResourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateLinkResourceHandleResponse handles the GetPrivateLinkResource response. -func (client *PrivateEndpointConnectionClient) getPrivateLinkResourceHandleResponse(resp *http.Response) (PrivateEndpointConnectionClientGetPrivateLinkResourceResponse, error) { - result := PrivateEndpointConnectionClientGetPrivateLinkResourceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResource); err != nil { - return PrivateEndpointConnectionClientGetPrivateLinkResourceResponse{}, err - } - return result, nil -} - -// NewListByServicePager - Lists all private endpoint connections of the API Management service instance. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - PrivateEndpointConnectionClientListByServiceOptions contains the optional parameters for the PrivateEndpointConnectionClient.NewListByServicePager -// method. -func (client *PrivateEndpointConnectionClient) NewListByServicePager(resourceGroupName string, serviceName string, options *PrivateEndpointConnectionClientListByServiceOptions) *runtime.Pager[PrivateEndpointConnectionClientListByServiceResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionClientListByServiceResponse]{ - More: func(page PrivateEndpointConnectionClientListByServiceResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionClientListByServiceResponse) (PrivateEndpointConnectionClientListByServiceResponse, error) { - req, err := client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return PrivateEndpointConnectionClientListByServiceResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateEndpointConnectionClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionClientListByServiceResponse{}, runtime.NewResponseError(resp) - } - return client.listByServiceHandleResponse(resp) - }, - }) -} - -// listByServiceCreateRequest creates the ListByService request. -func (client *PrivateEndpointConnectionClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateEndpointConnectionClientListByServiceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByServiceHandleResponse handles the ListByService response. -func (client *PrivateEndpointConnectionClient) listByServiceHandleResponse(resp *http.Response) (PrivateEndpointConnectionClientListByServiceResponse, error) { - result := PrivateEndpointConnectionClientListByServiceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResult); err != nil { - return PrivateEndpointConnectionClientListByServiceResponse{}, err - } - return result, nil -} - -// ListPrivateLinkResources - Gets the private link resources -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - PrivateEndpointConnectionClientListPrivateLinkResourcesOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListPrivateLinkResources -// method. -func (client *PrivateEndpointConnectionClient) ListPrivateLinkResources(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateEndpointConnectionClientListPrivateLinkResourcesOptions) (PrivateEndpointConnectionClientListPrivateLinkResourcesResponse, error) { - req, err := client.listPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return PrivateEndpointConnectionClientListPrivateLinkResourcesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateEndpointConnectionClientListPrivateLinkResourcesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionClientListPrivateLinkResourcesResponse{}, runtime.NewResponseError(resp) - } - return client.listPrivateLinkResourcesHandleResponse(resp) -} - -// listPrivateLinkResourcesCreateRequest creates the ListPrivateLinkResources request. -func (client *PrivateEndpointConnectionClient) listPrivateLinkResourcesCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateEndpointConnectionClientListPrivateLinkResourcesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listPrivateLinkResourcesHandleResponse handles the ListPrivateLinkResources response. -func (client *PrivateEndpointConnectionClient) listPrivateLinkResourcesHandleResponse(resp *http.Response) (PrivateEndpointConnectionClientListPrivateLinkResourcesResponse, error) { - result := PrivateEndpointConnectionClientListPrivateLinkResourcesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourceListResult); err != nil { - return PrivateEndpointConnectionClientListPrivateLinkResourcesResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/response_types.go deleted file mode 100644 index 4cd90d97..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/response_types.go +++ /dev/null @@ -1,2122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -// APIClientCreateOrUpdateResponse contains the response from method APIClient.BeginCreateOrUpdate. -type APIClientCreateOrUpdateResponse struct { - APIContract -} - -// APIClientDeleteResponse contains the response from method APIClient.Delete. -type APIClientDeleteResponse struct { - // placeholder for future response values -} - -// APIClientGetEntityTagResponse contains the response from method APIClient.GetEntityTag. -type APIClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APIClientGetResponse contains the response from method APIClient.Get. -type APIClientGetResponse struct { - APIContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIClientListByServiceResponse contains the response from method APIClient.NewListByServicePager. -type APIClientListByServiceResponse struct { - APICollection -} - -// APIClientListByTagsResponse contains the response from method APIClient.NewListByTagsPager. -type APIClientListByTagsResponse struct { - TagResourceCollection -} - -// APIClientUpdateResponse contains the response from method APIClient.Update. -type APIClientUpdateResponse struct { - APIContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIDiagnosticClientCreateOrUpdateResponse contains the response from method APIDiagnosticClient.CreateOrUpdate. -type APIDiagnosticClientCreateOrUpdateResponse struct { - DiagnosticContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIDiagnosticClientDeleteResponse contains the response from method APIDiagnosticClient.Delete. -type APIDiagnosticClientDeleteResponse struct { - // placeholder for future response values -} - -// APIDiagnosticClientGetEntityTagResponse contains the response from method APIDiagnosticClient.GetEntityTag. -type APIDiagnosticClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APIDiagnosticClientGetResponse contains the response from method APIDiagnosticClient.Get. -type APIDiagnosticClientGetResponse struct { - DiagnosticContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIDiagnosticClientListByServiceResponse contains the response from method APIDiagnosticClient.NewListByServicePager. -type APIDiagnosticClientListByServiceResponse struct { - DiagnosticCollection -} - -// APIDiagnosticClientUpdateResponse contains the response from method APIDiagnosticClient.Update. -type APIDiagnosticClientUpdateResponse struct { - DiagnosticContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIExportClientGetResponse contains the response from method APIExportClient.Get. -type APIExportClientGetResponse struct { - APIExportResult -} - -// APIIssueAttachmentClientCreateOrUpdateResponse contains the response from method APIIssueAttachmentClient.CreateOrUpdate. -type APIIssueAttachmentClientCreateOrUpdateResponse struct { - IssueAttachmentContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIIssueAttachmentClientDeleteResponse contains the response from method APIIssueAttachmentClient.Delete. -type APIIssueAttachmentClientDeleteResponse struct { - // placeholder for future response values -} - -// APIIssueAttachmentClientGetEntityTagResponse contains the response from method APIIssueAttachmentClient.GetEntityTag. -type APIIssueAttachmentClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APIIssueAttachmentClientGetResponse contains the response from method APIIssueAttachmentClient.Get. -type APIIssueAttachmentClientGetResponse struct { - IssueAttachmentContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIIssueAttachmentClientListByServiceResponse contains the response from method APIIssueAttachmentClient.NewListByServicePager. -type APIIssueAttachmentClientListByServiceResponse struct { - IssueAttachmentCollection -} - -// APIIssueClientCreateOrUpdateResponse contains the response from method APIIssueClient.CreateOrUpdate. -type APIIssueClientCreateOrUpdateResponse struct { - IssueContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIIssueClientDeleteResponse contains the response from method APIIssueClient.Delete. -type APIIssueClientDeleteResponse struct { - // placeholder for future response values -} - -// APIIssueClientGetEntityTagResponse contains the response from method APIIssueClient.GetEntityTag. -type APIIssueClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APIIssueClientGetResponse contains the response from method APIIssueClient.Get. -type APIIssueClientGetResponse struct { - IssueContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIIssueClientListByServiceResponse contains the response from method APIIssueClient.NewListByServicePager. -type APIIssueClientListByServiceResponse struct { - IssueCollection -} - -// APIIssueClientUpdateResponse contains the response from method APIIssueClient.Update. -type APIIssueClientUpdateResponse struct { - IssueContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIIssueCommentClientCreateOrUpdateResponse contains the response from method APIIssueCommentClient.CreateOrUpdate. -type APIIssueCommentClientCreateOrUpdateResponse struct { - IssueCommentContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIIssueCommentClientDeleteResponse contains the response from method APIIssueCommentClient.Delete. -type APIIssueCommentClientDeleteResponse struct { - // placeholder for future response values -} - -// APIIssueCommentClientGetEntityTagResponse contains the response from method APIIssueCommentClient.GetEntityTag. -type APIIssueCommentClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APIIssueCommentClientGetResponse contains the response from method APIIssueCommentClient.Get. -type APIIssueCommentClientGetResponse struct { - IssueCommentContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIIssueCommentClientListByServiceResponse contains the response from method APIIssueCommentClient.NewListByServicePager. -type APIIssueCommentClientListByServiceResponse struct { - IssueCommentCollection -} - -// APIOperationClientCreateOrUpdateResponse contains the response from method APIOperationClient.CreateOrUpdate. -type APIOperationClientCreateOrUpdateResponse struct { - OperationContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIOperationClientDeleteResponse contains the response from method APIOperationClient.Delete. -type APIOperationClientDeleteResponse struct { - // placeholder for future response values -} - -// APIOperationClientGetEntityTagResponse contains the response from method APIOperationClient.GetEntityTag. -type APIOperationClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APIOperationClientGetResponse contains the response from method APIOperationClient.Get. -type APIOperationClientGetResponse struct { - OperationContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIOperationClientListByAPIResponse contains the response from method APIOperationClient.NewListByAPIPager. -type APIOperationClientListByAPIResponse struct { - OperationCollection -} - -// APIOperationClientUpdateResponse contains the response from method APIOperationClient.Update. -type APIOperationClientUpdateResponse struct { - OperationContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIOperationPolicyClientCreateOrUpdateResponse contains the response from method APIOperationPolicyClient.CreateOrUpdate. -type APIOperationPolicyClientCreateOrUpdateResponse struct { - PolicyContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIOperationPolicyClientDeleteResponse contains the response from method APIOperationPolicyClient.Delete. -type APIOperationPolicyClientDeleteResponse struct { - // placeholder for future response values -} - -// APIOperationPolicyClientGetEntityTagResponse contains the response from method APIOperationPolicyClient.GetEntityTag. -type APIOperationPolicyClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APIOperationPolicyClientGetResponse contains the response from method APIOperationPolicyClient.Get. -type APIOperationPolicyClientGetResponse struct { - PolicyContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIOperationPolicyClientListByOperationResponse contains the response from method APIOperationPolicyClient.ListByOperation. -type APIOperationPolicyClientListByOperationResponse struct { - PolicyCollection -} - -// APIPolicyClientCreateOrUpdateResponse contains the response from method APIPolicyClient.CreateOrUpdate. -type APIPolicyClientCreateOrUpdateResponse struct { - PolicyContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIPolicyClientDeleteResponse contains the response from method APIPolicyClient.Delete. -type APIPolicyClientDeleteResponse struct { - // placeholder for future response values -} - -// APIPolicyClientGetEntityTagResponse contains the response from method APIPolicyClient.GetEntityTag. -type APIPolicyClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APIPolicyClientGetResponse contains the response from method APIPolicyClient.Get. -type APIPolicyClientGetResponse struct { - PolicyContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIPolicyClientListByAPIResponse contains the response from method APIPolicyClient.ListByAPI. -type APIPolicyClientListByAPIResponse struct { - PolicyCollection -} - -// APIProductClientListByApisResponse contains the response from method APIProductClient.NewListByApisPager. -type APIProductClientListByApisResponse struct { - ProductCollection -} - -// APIReleaseClientCreateOrUpdateResponse contains the response from method APIReleaseClient.CreateOrUpdate. -type APIReleaseClientCreateOrUpdateResponse struct { - APIReleaseContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIReleaseClientDeleteResponse contains the response from method APIReleaseClient.Delete. -type APIReleaseClientDeleteResponse struct { - // placeholder for future response values -} - -// APIReleaseClientGetEntityTagResponse contains the response from method APIReleaseClient.GetEntityTag. -type APIReleaseClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APIReleaseClientGetResponse contains the response from method APIReleaseClient.Get. -type APIReleaseClientGetResponse struct { - APIReleaseContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIReleaseClientListByServiceResponse contains the response from method APIReleaseClient.NewListByServicePager. -type APIReleaseClientListByServiceResponse struct { - APIReleaseCollection -} - -// APIReleaseClientUpdateResponse contains the response from method APIReleaseClient.Update. -type APIReleaseClientUpdateResponse struct { - APIReleaseContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIRevisionClientListByServiceResponse contains the response from method APIRevisionClient.NewListByServicePager. -type APIRevisionClientListByServiceResponse struct { - APIRevisionCollection -} - -// APISchemaClientCreateOrUpdateResponse contains the response from method APISchemaClient.BeginCreateOrUpdate. -type APISchemaClientCreateOrUpdateResponse struct { - SchemaContract -} - -// APISchemaClientDeleteResponse contains the response from method APISchemaClient.Delete. -type APISchemaClientDeleteResponse struct { - // placeholder for future response values -} - -// APISchemaClientGetEntityTagResponse contains the response from method APISchemaClient.GetEntityTag. -type APISchemaClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APISchemaClientGetResponse contains the response from method APISchemaClient.Get. -type APISchemaClientGetResponse struct { - SchemaContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APISchemaClientListByAPIResponse contains the response from method APISchemaClient.NewListByAPIPager. -type APISchemaClientListByAPIResponse struct { - SchemaCollection -} - -// APITagDescriptionClientCreateOrUpdateResponse contains the response from method APITagDescriptionClient.CreateOrUpdate. -type APITagDescriptionClientCreateOrUpdateResponse struct { - TagDescriptionContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APITagDescriptionClientDeleteResponse contains the response from method APITagDescriptionClient.Delete. -type APITagDescriptionClientDeleteResponse struct { - // placeholder for future response values -} - -// APITagDescriptionClientGetEntityTagResponse contains the response from method APITagDescriptionClient.GetEntityTag. -type APITagDescriptionClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APITagDescriptionClientGetResponse contains the response from method APITagDescriptionClient.Get. -type APITagDescriptionClientGetResponse struct { - TagDescriptionContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APITagDescriptionClientListByServiceResponse contains the response from method APITagDescriptionClient.NewListByServicePager. -type APITagDescriptionClientListByServiceResponse struct { - TagDescriptionCollection -} - -// APIVersionSetClientCreateOrUpdateResponse contains the response from method APIVersionSetClient.CreateOrUpdate. -type APIVersionSetClientCreateOrUpdateResponse struct { - APIVersionSetContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIVersionSetClientDeleteResponse contains the response from method APIVersionSetClient.Delete. -type APIVersionSetClientDeleteResponse struct { - // placeholder for future response values -} - -// APIVersionSetClientGetEntityTagResponse contains the response from method APIVersionSetClient.GetEntityTag. -type APIVersionSetClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// APIVersionSetClientGetResponse contains the response from method APIVersionSetClient.Get. -type APIVersionSetClientGetResponse struct { - APIVersionSetContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// APIVersionSetClientListByServiceResponse contains the response from method APIVersionSetClient.NewListByServicePager. -type APIVersionSetClientListByServiceResponse struct { - APIVersionSetCollection -} - -// APIVersionSetClientUpdateResponse contains the response from method APIVersionSetClient.Update. -type APIVersionSetClientUpdateResponse struct { - APIVersionSetContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// AuthorizationServerClientCreateOrUpdateResponse contains the response from method AuthorizationServerClient.CreateOrUpdate. -type AuthorizationServerClientCreateOrUpdateResponse struct { - AuthorizationServerContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// AuthorizationServerClientDeleteResponse contains the response from method AuthorizationServerClient.Delete. -type AuthorizationServerClientDeleteResponse struct { - // placeholder for future response values -} - -// AuthorizationServerClientGetEntityTagResponse contains the response from method AuthorizationServerClient.GetEntityTag. -type AuthorizationServerClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// AuthorizationServerClientGetResponse contains the response from method AuthorizationServerClient.Get. -type AuthorizationServerClientGetResponse struct { - AuthorizationServerContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// AuthorizationServerClientListByServiceResponse contains the response from method AuthorizationServerClient.NewListByServicePager. -type AuthorizationServerClientListByServiceResponse struct { - AuthorizationServerCollection -} - -// AuthorizationServerClientListSecretsResponse contains the response from method AuthorizationServerClient.ListSecrets. -type AuthorizationServerClientListSecretsResponse struct { - AuthorizationServerSecretsContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// AuthorizationServerClientUpdateResponse contains the response from method AuthorizationServerClient.Update. -type AuthorizationServerClientUpdateResponse struct { - AuthorizationServerContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// BackendClientCreateOrUpdateResponse contains the response from method BackendClient.CreateOrUpdate. -type BackendClientCreateOrUpdateResponse struct { - BackendContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// BackendClientDeleteResponse contains the response from method BackendClient.Delete. -type BackendClientDeleteResponse struct { - // placeholder for future response values -} - -// BackendClientGetEntityTagResponse contains the response from method BackendClient.GetEntityTag. -type BackendClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// BackendClientGetResponse contains the response from method BackendClient.Get. -type BackendClientGetResponse struct { - BackendContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// BackendClientListByServiceResponse contains the response from method BackendClient.NewListByServicePager. -type BackendClientListByServiceResponse struct { - BackendCollection -} - -// BackendClientReconnectResponse contains the response from method BackendClient.Reconnect. -type BackendClientReconnectResponse struct { - // placeholder for future response values -} - -// BackendClientUpdateResponse contains the response from method BackendClient.Update. -type BackendClientUpdateResponse struct { - BackendContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// CacheClientCreateOrUpdateResponse contains the response from method CacheClient.CreateOrUpdate. -type CacheClientCreateOrUpdateResponse struct { - CacheContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// CacheClientDeleteResponse contains the response from method CacheClient.Delete. -type CacheClientDeleteResponse struct { - // placeholder for future response values -} - -// CacheClientGetEntityTagResponse contains the response from method CacheClient.GetEntityTag. -type CacheClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// CacheClientGetResponse contains the response from method CacheClient.Get. -type CacheClientGetResponse struct { - CacheContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// CacheClientListByServiceResponse contains the response from method CacheClient.NewListByServicePager. -type CacheClientListByServiceResponse struct { - CacheCollection -} - -// CacheClientUpdateResponse contains the response from method CacheClient.Update. -type CacheClientUpdateResponse struct { - CacheContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// CertificateClientCreateOrUpdateResponse contains the response from method CertificateClient.CreateOrUpdate. -type CertificateClientCreateOrUpdateResponse struct { - CertificateContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// CertificateClientDeleteResponse contains the response from method CertificateClient.Delete. -type CertificateClientDeleteResponse struct { - // placeholder for future response values -} - -// CertificateClientGetEntityTagResponse contains the response from method CertificateClient.GetEntityTag. -type CertificateClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// CertificateClientGetResponse contains the response from method CertificateClient.Get. -type CertificateClientGetResponse struct { - CertificateContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// CertificateClientListByServiceResponse contains the response from method CertificateClient.NewListByServicePager. -type CertificateClientListByServiceResponse struct { - CertificateCollection -} - -// CertificateClientRefreshSecretResponse contains the response from method CertificateClient.RefreshSecret. -type CertificateClientRefreshSecretResponse struct { - CertificateContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// ClientPerformConnectivityCheckAsyncResponse contains the response from method Client.BeginPerformConnectivityCheckAsync. -type ClientPerformConnectivityCheckAsyncResponse struct { - ConnectivityCheckResponse -} - -// ContentItemClientCreateOrUpdateResponse contains the response from method ContentItemClient.CreateOrUpdate. -type ContentItemClientCreateOrUpdateResponse struct { - ContentItemContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// ContentItemClientDeleteResponse contains the response from method ContentItemClient.Delete. -type ContentItemClientDeleteResponse struct { - // placeholder for future response values -} - -// ContentItemClientGetEntityTagResponse contains the response from method ContentItemClient.GetEntityTag. -type ContentItemClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// ContentItemClientGetResponse contains the response from method ContentItemClient.Get. -type ContentItemClientGetResponse struct { - ContentItemContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// ContentItemClientListByServiceResponse contains the response from method ContentItemClient.NewListByServicePager. -type ContentItemClientListByServiceResponse struct { - ContentItemCollection -} - -// ContentTypeClientCreateOrUpdateResponse contains the response from method ContentTypeClient.CreateOrUpdate. -type ContentTypeClientCreateOrUpdateResponse struct { - ContentTypeContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// ContentTypeClientDeleteResponse contains the response from method ContentTypeClient.Delete. -type ContentTypeClientDeleteResponse struct { - // placeholder for future response values -} - -// ContentTypeClientGetResponse contains the response from method ContentTypeClient.Get. -type ContentTypeClientGetResponse struct { - ContentTypeContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// ContentTypeClientListByServiceResponse contains the response from method ContentTypeClient.NewListByServicePager. -type ContentTypeClientListByServiceResponse struct { - ContentTypeCollection -} - -// DelegationSettingsClientCreateOrUpdateResponse contains the response from method DelegationSettingsClient.CreateOrUpdate. -type DelegationSettingsClientCreateOrUpdateResponse struct { - PortalDelegationSettings -} - -// DelegationSettingsClientGetEntityTagResponse contains the response from method DelegationSettingsClient.GetEntityTag. -type DelegationSettingsClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// DelegationSettingsClientGetResponse contains the response from method DelegationSettingsClient.Get. -type DelegationSettingsClientGetResponse struct { - PortalDelegationSettings - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// DelegationSettingsClientListSecretsResponse contains the response from method DelegationSettingsClient.ListSecrets. -type DelegationSettingsClientListSecretsResponse struct { - PortalSettingValidationKeyContract -} - -// DelegationSettingsClientUpdateResponse contains the response from method DelegationSettingsClient.Update. -type DelegationSettingsClientUpdateResponse struct { - // placeholder for future response values -} - -// DeletedServicesClientGetByNameResponse contains the response from method DeletedServicesClient.GetByName. -type DeletedServicesClientGetByNameResponse struct { - DeletedServiceContract -} - -// DeletedServicesClientListBySubscriptionResponse contains the response from method DeletedServicesClient.NewListBySubscriptionPager. -type DeletedServicesClientListBySubscriptionResponse struct { - DeletedServicesCollection -} - -// DeletedServicesClientPurgeResponse contains the response from method DeletedServicesClient.BeginPurge. -type DeletedServicesClientPurgeResponse struct { - DeletedServiceContract -} - -// DiagnosticClientCreateOrUpdateResponse contains the response from method DiagnosticClient.CreateOrUpdate. -type DiagnosticClientCreateOrUpdateResponse struct { - DiagnosticContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// DiagnosticClientDeleteResponse contains the response from method DiagnosticClient.Delete. -type DiagnosticClientDeleteResponse struct { - // placeholder for future response values -} - -// DiagnosticClientGetEntityTagResponse contains the response from method DiagnosticClient.GetEntityTag. -type DiagnosticClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// DiagnosticClientGetResponse contains the response from method DiagnosticClient.Get. -type DiagnosticClientGetResponse struct { - DiagnosticContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// DiagnosticClientListByServiceResponse contains the response from method DiagnosticClient.NewListByServicePager. -type DiagnosticClientListByServiceResponse struct { - DiagnosticCollection -} - -// DiagnosticClientUpdateResponse contains the response from method DiagnosticClient.Update. -type DiagnosticClientUpdateResponse struct { - DiagnosticContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// EmailTemplateClientCreateOrUpdateResponse contains the response from method EmailTemplateClient.CreateOrUpdate. -type EmailTemplateClientCreateOrUpdateResponse struct { - EmailTemplateContract -} - -// EmailTemplateClientDeleteResponse contains the response from method EmailTemplateClient.Delete. -type EmailTemplateClientDeleteResponse struct { - // placeholder for future response values -} - -// EmailTemplateClientGetEntityTagResponse contains the response from method EmailTemplateClient.GetEntityTag. -type EmailTemplateClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// EmailTemplateClientGetResponse contains the response from method EmailTemplateClient.Get. -type EmailTemplateClientGetResponse struct { - EmailTemplateContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// EmailTemplateClientListByServiceResponse contains the response from method EmailTemplateClient.NewListByServicePager. -type EmailTemplateClientListByServiceResponse struct { - EmailTemplateCollection -} - -// EmailTemplateClientUpdateResponse contains the response from method EmailTemplateClient.Update. -type EmailTemplateClientUpdateResponse struct { - EmailTemplateContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GatewayAPIClientCreateOrUpdateResponse contains the response from method GatewayAPIClient.CreateOrUpdate. -type GatewayAPIClientCreateOrUpdateResponse struct { - APIContract -} - -// GatewayAPIClientDeleteResponse contains the response from method GatewayAPIClient.Delete. -type GatewayAPIClientDeleteResponse struct { - // placeholder for future response values -} - -// GatewayAPIClientGetEntityTagResponse contains the response from method GatewayAPIClient.GetEntityTag. -type GatewayAPIClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// GatewayAPIClientListByServiceResponse contains the response from method GatewayAPIClient.NewListByServicePager. -type GatewayAPIClientListByServiceResponse struct { - APICollection -} - -// GatewayCertificateAuthorityClientCreateOrUpdateResponse contains the response from method GatewayCertificateAuthorityClient.CreateOrUpdate. -type GatewayCertificateAuthorityClientCreateOrUpdateResponse struct { - GatewayCertificateAuthorityContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GatewayCertificateAuthorityClientDeleteResponse contains the response from method GatewayCertificateAuthorityClient.Delete. -type GatewayCertificateAuthorityClientDeleteResponse struct { - // placeholder for future response values -} - -// GatewayCertificateAuthorityClientGetEntityTagResponse contains the response from method GatewayCertificateAuthorityClient.GetEntityTag. -type GatewayCertificateAuthorityClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// GatewayCertificateAuthorityClientGetResponse contains the response from method GatewayCertificateAuthorityClient.Get. -type GatewayCertificateAuthorityClientGetResponse struct { - GatewayCertificateAuthorityContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GatewayCertificateAuthorityClientListByServiceResponse contains the response from method GatewayCertificateAuthorityClient.NewListByServicePager. -type GatewayCertificateAuthorityClientListByServiceResponse struct { - GatewayCertificateAuthorityCollection -} - -// GatewayClientCreateOrUpdateResponse contains the response from method GatewayClient.CreateOrUpdate. -type GatewayClientCreateOrUpdateResponse struct { - GatewayContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GatewayClientDeleteResponse contains the response from method GatewayClient.Delete. -type GatewayClientDeleteResponse struct { - // placeholder for future response values -} - -// GatewayClientGenerateTokenResponse contains the response from method GatewayClient.GenerateToken. -type GatewayClientGenerateTokenResponse struct { - GatewayTokenContract -} - -// GatewayClientGetEntityTagResponse contains the response from method GatewayClient.GetEntityTag. -type GatewayClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// GatewayClientGetResponse contains the response from method GatewayClient.Get. -type GatewayClientGetResponse struct { - GatewayContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GatewayClientListByServiceResponse contains the response from method GatewayClient.NewListByServicePager. -type GatewayClientListByServiceResponse struct { - GatewayCollection -} - -// GatewayClientListKeysResponse contains the response from method GatewayClient.ListKeys. -type GatewayClientListKeysResponse struct { - GatewayKeysContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GatewayClientRegenerateKeyResponse contains the response from method GatewayClient.RegenerateKey. -type GatewayClientRegenerateKeyResponse struct { - // placeholder for future response values -} - -// GatewayClientUpdateResponse contains the response from method GatewayClient.Update. -type GatewayClientUpdateResponse struct { - GatewayContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GatewayHostnameConfigurationClientCreateOrUpdateResponse contains the response from method GatewayHostnameConfigurationClient.CreateOrUpdate. -type GatewayHostnameConfigurationClientCreateOrUpdateResponse struct { - GatewayHostnameConfigurationContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GatewayHostnameConfigurationClientDeleteResponse contains the response from method GatewayHostnameConfigurationClient.Delete. -type GatewayHostnameConfigurationClientDeleteResponse struct { - // placeholder for future response values -} - -// GatewayHostnameConfigurationClientGetEntityTagResponse contains the response from method GatewayHostnameConfigurationClient.GetEntityTag. -type GatewayHostnameConfigurationClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// GatewayHostnameConfigurationClientGetResponse contains the response from method GatewayHostnameConfigurationClient.Get. -type GatewayHostnameConfigurationClientGetResponse struct { - GatewayHostnameConfigurationContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GatewayHostnameConfigurationClientListByServiceResponse contains the response from method GatewayHostnameConfigurationClient.NewListByServicePager. -type GatewayHostnameConfigurationClientListByServiceResponse struct { - GatewayHostnameConfigurationCollection -} - -// GlobalSchemaClientCreateOrUpdateResponse contains the response from method GlobalSchemaClient.BeginCreateOrUpdate. -type GlobalSchemaClientCreateOrUpdateResponse struct { - GlobalSchemaContract -} - -// GlobalSchemaClientDeleteResponse contains the response from method GlobalSchemaClient.Delete. -type GlobalSchemaClientDeleteResponse struct { - // placeholder for future response values -} - -// GlobalSchemaClientGetEntityTagResponse contains the response from method GlobalSchemaClient.GetEntityTag. -type GlobalSchemaClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// GlobalSchemaClientGetResponse contains the response from method GlobalSchemaClient.Get. -type GlobalSchemaClientGetResponse struct { - GlobalSchemaContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GlobalSchemaClientListByServiceResponse contains the response from method GlobalSchemaClient.NewListByServicePager. -type GlobalSchemaClientListByServiceResponse struct { - GlobalSchemaCollection -} - -// GroupClientCreateOrUpdateResponse contains the response from method GroupClient.CreateOrUpdate. -type GroupClientCreateOrUpdateResponse struct { - GroupContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GroupClientDeleteResponse contains the response from method GroupClient.Delete. -type GroupClientDeleteResponse struct { - // placeholder for future response values -} - -// GroupClientGetEntityTagResponse contains the response from method GroupClient.GetEntityTag. -type GroupClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// GroupClientGetResponse contains the response from method GroupClient.Get. -type GroupClientGetResponse struct { - GroupContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GroupClientListByServiceResponse contains the response from method GroupClient.NewListByServicePager. -type GroupClientListByServiceResponse struct { - GroupCollection -} - -// GroupClientUpdateResponse contains the response from method GroupClient.Update. -type GroupClientUpdateResponse struct { - GroupContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GroupUserClientCheckEntityExistsResponse contains the response from method GroupUserClient.CheckEntityExists. -type GroupUserClientCheckEntityExistsResponse struct { - // Success indicates if the operation succeeded or failed. - Success bool -} - -// GroupUserClientCreateResponse contains the response from method GroupUserClient.Create. -type GroupUserClientCreateResponse struct { - UserContract -} - -// GroupUserClientDeleteResponse contains the response from method GroupUserClient.Delete. -type GroupUserClientDeleteResponse struct { - // placeholder for future response values -} - -// GroupUserClientListResponse contains the response from method GroupUserClient.NewListPager. -type GroupUserClientListResponse struct { - UserCollection -} - -// IdentityProviderClientCreateOrUpdateResponse contains the response from method IdentityProviderClient.CreateOrUpdate. -type IdentityProviderClientCreateOrUpdateResponse struct { - IdentityProviderContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// IdentityProviderClientDeleteResponse contains the response from method IdentityProviderClient.Delete. -type IdentityProviderClientDeleteResponse struct { - // placeholder for future response values -} - -// IdentityProviderClientGetEntityTagResponse contains the response from method IdentityProviderClient.GetEntityTag. -type IdentityProviderClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// IdentityProviderClientGetResponse contains the response from method IdentityProviderClient.Get. -type IdentityProviderClientGetResponse struct { - IdentityProviderContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// IdentityProviderClientListByServiceResponse contains the response from method IdentityProviderClient.NewListByServicePager. -type IdentityProviderClientListByServiceResponse struct { - IdentityProviderList -} - -// IdentityProviderClientListSecretsResponse contains the response from method IdentityProviderClient.ListSecrets. -type IdentityProviderClientListSecretsResponse struct { - ClientSecretContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// IdentityProviderClientUpdateResponse contains the response from method IdentityProviderClient.Update. -type IdentityProviderClientUpdateResponse struct { - IdentityProviderContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// IssueClientGetResponse contains the response from method IssueClient.Get. -type IssueClientGetResponse struct { - IssueContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// IssueClientListByServiceResponse contains the response from method IssueClient.NewListByServicePager. -type IssueClientListByServiceResponse struct { - IssueCollection -} - -// LoggerClientCreateOrUpdateResponse contains the response from method LoggerClient.CreateOrUpdate. -type LoggerClientCreateOrUpdateResponse struct { - LoggerContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// LoggerClientDeleteResponse contains the response from method LoggerClient.Delete. -type LoggerClientDeleteResponse struct { - // placeholder for future response values -} - -// LoggerClientGetEntityTagResponse contains the response from method LoggerClient.GetEntityTag. -type LoggerClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// LoggerClientGetResponse contains the response from method LoggerClient.Get. -type LoggerClientGetResponse struct { - LoggerContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// LoggerClientListByServiceResponse contains the response from method LoggerClient.NewListByServicePager. -type LoggerClientListByServiceResponse struct { - LoggerCollection -} - -// LoggerClientUpdateResponse contains the response from method LoggerClient.Update. -type LoggerClientUpdateResponse struct { - LoggerContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// NamedValueClientCreateOrUpdateResponse contains the response from method NamedValueClient.BeginCreateOrUpdate. -type NamedValueClientCreateOrUpdateResponse struct { - NamedValueContract -} - -// NamedValueClientDeleteResponse contains the response from method NamedValueClient.Delete. -type NamedValueClientDeleteResponse struct { - // placeholder for future response values -} - -// NamedValueClientGetEntityTagResponse contains the response from method NamedValueClient.GetEntityTag. -type NamedValueClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// NamedValueClientGetResponse contains the response from method NamedValueClient.Get. -type NamedValueClientGetResponse struct { - NamedValueContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// NamedValueClientListByServiceResponse contains the response from method NamedValueClient.NewListByServicePager. -type NamedValueClientListByServiceResponse struct { - NamedValueCollection -} - -// NamedValueClientListValueResponse contains the response from method NamedValueClient.ListValue. -type NamedValueClientListValueResponse struct { - NamedValueSecretContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// NamedValueClientRefreshSecretResponse contains the response from method NamedValueClient.BeginRefreshSecret. -type NamedValueClientRefreshSecretResponse struct { - NamedValueContract -} - -// NamedValueClientUpdateResponse contains the response from method NamedValueClient.BeginUpdate. -type NamedValueClientUpdateResponse struct { - NamedValueContract -} - -// NetworkStatusClientListByLocationResponse contains the response from method NetworkStatusClient.ListByLocation. -type NetworkStatusClientListByLocationResponse struct { - NetworkStatusContract -} - -// NetworkStatusClientListByServiceResponse contains the response from method NetworkStatusClient.ListByService. -type NetworkStatusClientListByServiceResponse struct { - // List of Network Status values. - NetworkStatusContractByLocationArray []*NetworkStatusContractByLocation -} - -// NotificationClientCreateOrUpdateResponse contains the response from method NotificationClient.CreateOrUpdate. -type NotificationClientCreateOrUpdateResponse struct { - NotificationContract -} - -// NotificationClientGetResponse contains the response from method NotificationClient.Get. -type NotificationClientGetResponse struct { - NotificationContract -} - -// NotificationClientListByServiceResponse contains the response from method NotificationClient.NewListByServicePager. -type NotificationClientListByServiceResponse struct { - NotificationCollection -} - -// NotificationRecipientEmailClientCheckEntityExistsResponse contains the response from method NotificationRecipientEmailClient.CheckEntityExists. -type NotificationRecipientEmailClientCheckEntityExistsResponse struct { - // Success indicates if the operation succeeded or failed. - Success bool -} - -// NotificationRecipientEmailClientCreateOrUpdateResponse contains the response from method NotificationRecipientEmailClient.CreateOrUpdate. -type NotificationRecipientEmailClientCreateOrUpdateResponse struct { - RecipientEmailContract -} - -// NotificationRecipientEmailClientDeleteResponse contains the response from method NotificationRecipientEmailClient.Delete. -type NotificationRecipientEmailClientDeleteResponse struct { - // placeholder for future response values -} - -// NotificationRecipientEmailClientListByNotificationResponse contains the response from method NotificationRecipientEmailClient.ListByNotification. -type NotificationRecipientEmailClientListByNotificationResponse struct { - RecipientEmailCollection -} - -// NotificationRecipientUserClientCheckEntityExistsResponse contains the response from method NotificationRecipientUserClient.CheckEntityExists. -type NotificationRecipientUserClientCheckEntityExistsResponse struct { - // Success indicates if the operation succeeded or failed. - Success bool -} - -// NotificationRecipientUserClientCreateOrUpdateResponse contains the response from method NotificationRecipientUserClient.CreateOrUpdate. -type NotificationRecipientUserClientCreateOrUpdateResponse struct { - RecipientUserContract -} - -// NotificationRecipientUserClientDeleteResponse contains the response from method NotificationRecipientUserClient.Delete. -type NotificationRecipientUserClientDeleteResponse struct { - // placeholder for future response values -} - -// NotificationRecipientUserClientListByNotificationResponse contains the response from method NotificationRecipientUserClient.ListByNotification. -type NotificationRecipientUserClientListByNotificationResponse struct { - RecipientUserCollection -} - -// OpenIDConnectProviderClientCreateOrUpdateResponse contains the response from method OpenIDConnectProviderClient.CreateOrUpdate. -type OpenIDConnectProviderClientCreateOrUpdateResponse struct { - OpenidConnectProviderContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// OpenIDConnectProviderClientDeleteResponse contains the response from method OpenIDConnectProviderClient.Delete. -type OpenIDConnectProviderClientDeleteResponse struct { - // placeholder for future response values -} - -// OpenIDConnectProviderClientGetEntityTagResponse contains the response from method OpenIDConnectProviderClient.GetEntityTag. -type OpenIDConnectProviderClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// OpenIDConnectProviderClientGetResponse contains the response from method OpenIDConnectProviderClient.Get. -type OpenIDConnectProviderClientGetResponse struct { - OpenidConnectProviderContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// OpenIDConnectProviderClientListByServiceResponse contains the response from method OpenIDConnectProviderClient.NewListByServicePager. -type OpenIDConnectProviderClientListByServiceResponse struct { - OpenIDConnectProviderCollection -} - -// OpenIDConnectProviderClientListSecretsResponse contains the response from method OpenIDConnectProviderClient.ListSecrets. -type OpenIDConnectProviderClientListSecretsResponse struct { - ClientSecretContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// OpenIDConnectProviderClientUpdateResponse contains the response from method OpenIDConnectProviderClient.Update. -type OpenIDConnectProviderClientUpdateResponse struct { - OpenidConnectProviderContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// OperationClientListByTagsResponse contains the response from method OperationClient.NewListByTagsPager. -type OperationClientListByTagsResponse struct { - TagResourceCollection -} - -// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. -type OperationsClientListResponse struct { - OperationListResult -} - -// OutboundNetworkDependenciesEndpointsClientListByServiceResponse contains the response from method OutboundNetworkDependenciesEndpointsClient.ListByService. -type OutboundNetworkDependenciesEndpointsClientListByServiceResponse struct { - OutboundEnvironmentEndpointList -} - -// PolicyClientCreateOrUpdateResponse contains the response from method PolicyClient.CreateOrUpdate. -type PolicyClientCreateOrUpdateResponse struct { - PolicyContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// PolicyClientDeleteResponse contains the response from method PolicyClient.Delete. -type PolicyClientDeleteResponse struct { - // placeholder for future response values -} - -// PolicyClientGetEntityTagResponse contains the response from method PolicyClient.GetEntityTag. -type PolicyClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// PolicyClientGetResponse contains the response from method PolicyClient.Get. -type PolicyClientGetResponse struct { - PolicyContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// PolicyClientListByServiceResponse contains the response from method PolicyClient.ListByService. -type PolicyClientListByServiceResponse struct { - PolicyCollection -} - -// PolicyDescriptionClientListByServiceResponse contains the response from method PolicyDescriptionClient.ListByService. -type PolicyDescriptionClientListByServiceResponse struct { - PolicyDescriptionCollection -} - -// PortalRevisionClientCreateOrUpdateResponse contains the response from method PortalRevisionClient.BeginCreateOrUpdate. -type PortalRevisionClientCreateOrUpdateResponse struct { - PortalRevisionContract -} - -// PortalRevisionClientGetEntityTagResponse contains the response from method PortalRevisionClient.GetEntityTag. -type PortalRevisionClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// PortalRevisionClientGetResponse contains the response from method PortalRevisionClient.Get. -type PortalRevisionClientGetResponse struct { - PortalRevisionContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// PortalRevisionClientListByServiceResponse contains the response from method PortalRevisionClient.NewListByServicePager. -type PortalRevisionClientListByServiceResponse struct { - PortalRevisionCollection -} - -// PortalRevisionClientUpdateResponse contains the response from method PortalRevisionClient.BeginUpdate. -type PortalRevisionClientUpdateResponse struct { - PortalRevisionContract -} - -// PortalSettingsClientListByServiceResponse contains the response from method PortalSettingsClient.ListByService. -type PortalSettingsClientListByServiceResponse struct { - PortalSettingsCollection -} - -// PrivateEndpointConnectionClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionClient.BeginCreateOrUpdate. -type PrivateEndpointConnectionClientCreateOrUpdateResponse struct { - PrivateEndpointConnection -} - -// PrivateEndpointConnectionClientDeleteResponse contains the response from method PrivateEndpointConnectionClient.BeginDelete. -type PrivateEndpointConnectionClientDeleteResponse struct { - // placeholder for future response values -} - -// PrivateEndpointConnectionClientGetByNameResponse contains the response from method PrivateEndpointConnectionClient.GetByName. -type PrivateEndpointConnectionClientGetByNameResponse struct { - PrivateEndpointConnection -} - -// PrivateEndpointConnectionClientGetPrivateLinkResourceResponse contains the response from method PrivateEndpointConnectionClient.GetPrivateLinkResource. -type PrivateEndpointConnectionClientGetPrivateLinkResourceResponse struct { - PrivateLinkResource -} - -// PrivateEndpointConnectionClientListByServiceResponse contains the response from method PrivateEndpointConnectionClient.NewListByServicePager. -type PrivateEndpointConnectionClientListByServiceResponse struct { - PrivateEndpointConnectionListResult -} - -// PrivateEndpointConnectionClientListPrivateLinkResourcesResponse contains the response from method PrivateEndpointConnectionClient.ListPrivateLinkResources. -type PrivateEndpointConnectionClientListPrivateLinkResourcesResponse struct { - PrivateLinkResourceListResult -} - -// ProductAPIClientCheckEntityExistsResponse contains the response from method ProductAPIClient.CheckEntityExists. -type ProductAPIClientCheckEntityExistsResponse struct { - // Success indicates if the operation succeeded or failed. - Success bool -} - -// ProductAPIClientCreateOrUpdateResponse contains the response from method ProductAPIClient.CreateOrUpdate. -type ProductAPIClientCreateOrUpdateResponse struct { - APIContract -} - -// ProductAPIClientDeleteResponse contains the response from method ProductAPIClient.Delete. -type ProductAPIClientDeleteResponse struct { - // placeholder for future response values -} - -// ProductAPIClientListByProductResponse contains the response from method ProductAPIClient.NewListByProductPager. -type ProductAPIClientListByProductResponse struct { - APICollection -} - -// ProductClientCreateOrUpdateResponse contains the response from method ProductClient.CreateOrUpdate. -type ProductClientCreateOrUpdateResponse struct { - ProductContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// ProductClientDeleteResponse contains the response from method ProductClient.Delete. -type ProductClientDeleteResponse struct { - // placeholder for future response values -} - -// ProductClientGetEntityTagResponse contains the response from method ProductClient.GetEntityTag. -type ProductClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// ProductClientGetResponse contains the response from method ProductClient.Get. -type ProductClientGetResponse struct { - ProductContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// ProductClientListByServiceResponse contains the response from method ProductClient.NewListByServicePager. -type ProductClientListByServiceResponse struct { - ProductCollection -} - -// ProductClientListByTagsResponse contains the response from method ProductClient.NewListByTagsPager. -type ProductClientListByTagsResponse struct { - TagResourceCollection -} - -// ProductClientUpdateResponse contains the response from method ProductClient.Update. -type ProductClientUpdateResponse struct { - ProductContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// ProductGroupClientCheckEntityExistsResponse contains the response from method ProductGroupClient.CheckEntityExists. -type ProductGroupClientCheckEntityExistsResponse struct { - // Success indicates if the operation succeeded or failed. - Success bool -} - -// ProductGroupClientCreateOrUpdateResponse contains the response from method ProductGroupClient.CreateOrUpdate. -type ProductGroupClientCreateOrUpdateResponse struct { - GroupContract -} - -// ProductGroupClientDeleteResponse contains the response from method ProductGroupClient.Delete. -type ProductGroupClientDeleteResponse struct { - // placeholder for future response values -} - -// ProductGroupClientListByProductResponse contains the response from method ProductGroupClient.NewListByProductPager. -type ProductGroupClientListByProductResponse struct { - GroupCollection -} - -// ProductPolicyClientCreateOrUpdateResponse contains the response from method ProductPolicyClient.CreateOrUpdate. -type ProductPolicyClientCreateOrUpdateResponse struct { - PolicyContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// ProductPolicyClientDeleteResponse contains the response from method ProductPolicyClient.Delete. -type ProductPolicyClientDeleteResponse struct { - // placeholder for future response values -} - -// ProductPolicyClientGetEntityTagResponse contains the response from method ProductPolicyClient.GetEntityTag. -type ProductPolicyClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// ProductPolicyClientGetResponse contains the response from method ProductPolicyClient.Get. -type ProductPolicyClientGetResponse struct { - PolicyContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// ProductPolicyClientListByProductResponse contains the response from method ProductPolicyClient.ListByProduct. -type ProductPolicyClientListByProductResponse struct { - PolicyCollection -} - -// ProductSubscriptionsClientListResponse contains the response from method ProductSubscriptionsClient.NewListPager. -type ProductSubscriptionsClientListResponse struct { - SubscriptionCollection -} - -// QuotaByCounterKeysClientListByServiceResponse contains the response from method QuotaByCounterKeysClient.ListByService. -type QuotaByCounterKeysClientListByServiceResponse struct { - QuotaCounterCollection -} - -// QuotaByCounterKeysClientUpdateResponse contains the response from method QuotaByCounterKeysClient.Update. -type QuotaByCounterKeysClientUpdateResponse struct { - QuotaCounterCollection -} - -// QuotaByPeriodKeysClientGetResponse contains the response from method QuotaByPeriodKeysClient.Get. -type QuotaByPeriodKeysClientGetResponse struct { - QuotaCounterContract -} - -// QuotaByPeriodKeysClientUpdateResponse contains the response from method QuotaByPeriodKeysClient.Update. -type QuotaByPeriodKeysClientUpdateResponse struct { - QuotaCounterContract -} - -// RegionClientListByServiceResponse contains the response from method RegionClient.NewListByServicePager. -type RegionClientListByServiceResponse struct { - RegionListResult -} - -// ReportsClientListByAPIResponse contains the response from method ReportsClient.NewListByAPIPager. -type ReportsClientListByAPIResponse struct { - ReportCollection -} - -// ReportsClientListByGeoResponse contains the response from method ReportsClient.NewListByGeoPager. -type ReportsClientListByGeoResponse struct { - ReportCollection -} - -// ReportsClientListByOperationResponse contains the response from method ReportsClient.NewListByOperationPager. -type ReportsClientListByOperationResponse struct { - ReportCollection -} - -// ReportsClientListByProductResponse contains the response from method ReportsClient.NewListByProductPager. -type ReportsClientListByProductResponse struct { - ReportCollection -} - -// ReportsClientListByRequestResponse contains the response from method ReportsClient.NewListByRequestPager. -type ReportsClientListByRequestResponse struct { - RequestReportCollection -} - -// ReportsClientListBySubscriptionResponse contains the response from method ReportsClient.NewListBySubscriptionPager. -type ReportsClientListBySubscriptionResponse struct { - ReportCollection -} - -// ReportsClientListByTimeResponse contains the response from method ReportsClient.NewListByTimePager. -type ReportsClientListByTimeResponse struct { - ReportCollection -} - -// ReportsClientListByUserResponse contains the response from method ReportsClient.NewListByUserPager. -type ReportsClientListByUserResponse struct { - ReportCollection -} - -// SKUsClientListResponse contains the response from method SKUsClient.NewListPager. -type SKUsClientListResponse struct { - SKUsResult -} - -// ServiceClientApplyNetworkConfigurationUpdatesResponse contains the response from method ServiceClient.BeginApplyNetworkConfigurationUpdates. -type ServiceClientApplyNetworkConfigurationUpdatesResponse struct { - ServiceResource -} - -// ServiceClientBackupResponse contains the response from method ServiceClient.BeginBackup. -type ServiceClientBackupResponse struct { - ServiceResource -} - -// ServiceClientCheckNameAvailabilityResponse contains the response from method ServiceClient.CheckNameAvailability. -type ServiceClientCheckNameAvailabilityResponse struct { - ServiceNameAvailabilityResult -} - -// ServiceClientCreateOrUpdateResponse contains the response from method ServiceClient.BeginCreateOrUpdate. -type ServiceClientCreateOrUpdateResponse struct { - ServiceResource -} - -// ServiceClientDeleteResponse contains the response from method ServiceClient.BeginDelete. -type ServiceClientDeleteResponse struct { - ServiceResource -} - -// ServiceClientGetDomainOwnershipIdentifierResponse contains the response from method ServiceClient.GetDomainOwnershipIdentifier. -type ServiceClientGetDomainOwnershipIdentifierResponse struct { - ServiceGetDomainOwnershipIdentifierResult -} - -// ServiceClientGetResponse contains the response from method ServiceClient.Get. -type ServiceClientGetResponse struct { - ServiceResource -} - -// ServiceClientGetSsoTokenResponse contains the response from method ServiceClient.GetSsoToken. -type ServiceClientGetSsoTokenResponse struct { - ServiceGetSsoTokenResult -} - -// ServiceClientListByResourceGroupResponse contains the response from method ServiceClient.NewListByResourceGroupPager. -type ServiceClientListByResourceGroupResponse struct { - ServiceListResult -} - -// ServiceClientListResponse contains the response from method ServiceClient.NewListPager. -type ServiceClientListResponse struct { - ServiceListResult -} - -// ServiceClientRestoreResponse contains the response from method ServiceClient.BeginRestore. -type ServiceClientRestoreResponse struct { - ServiceResource -} - -// ServiceClientUpdateResponse contains the response from method ServiceClient.BeginUpdate. -type ServiceClientUpdateResponse struct { - ServiceResource -} - -// ServiceSKUsClientListAvailableServiceSKUsResponse contains the response from method ServiceSKUsClient.NewListAvailableServiceSKUsPager. -type ServiceSKUsClientListAvailableServiceSKUsResponse struct { - ResourceSKUResults -} - -// SignInSettingsClientCreateOrUpdateResponse contains the response from method SignInSettingsClient.CreateOrUpdate. -type SignInSettingsClientCreateOrUpdateResponse struct { - PortalSigninSettings -} - -// SignInSettingsClientGetEntityTagResponse contains the response from method SignInSettingsClient.GetEntityTag. -type SignInSettingsClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// SignInSettingsClientGetResponse contains the response from method SignInSettingsClient.Get. -type SignInSettingsClientGetResponse struct { - PortalSigninSettings - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// SignInSettingsClientUpdateResponse contains the response from method SignInSettingsClient.Update. -type SignInSettingsClientUpdateResponse struct { - // placeholder for future response values -} - -// SignUpSettingsClientCreateOrUpdateResponse contains the response from method SignUpSettingsClient.CreateOrUpdate. -type SignUpSettingsClientCreateOrUpdateResponse struct { - PortalSignupSettings -} - -// SignUpSettingsClientGetEntityTagResponse contains the response from method SignUpSettingsClient.GetEntityTag. -type SignUpSettingsClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// SignUpSettingsClientGetResponse contains the response from method SignUpSettingsClient.Get. -type SignUpSettingsClientGetResponse struct { - PortalSignupSettings - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// SignUpSettingsClientUpdateResponse contains the response from method SignUpSettingsClient.Update. -type SignUpSettingsClientUpdateResponse struct { - // placeholder for future response values -} - -// SubscriptionClientCreateOrUpdateResponse contains the response from method SubscriptionClient.CreateOrUpdate. -type SubscriptionClientCreateOrUpdateResponse struct { - SubscriptionContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// SubscriptionClientDeleteResponse contains the response from method SubscriptionClient.Delete. -type SubscriptionClientDeleteResponse struct { - // placeholder for future response values -} - -// SubscriptionClientGetEntityTagResponse contains the response from method SubscriptionClient.GetEntityTag. -type SubscriptionClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// SubscriptionClientGetResponse contains the response from method SubscriptionClient.Get. -type SubscriptionClientGetResponse struct { - SubscriptionContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// SubscriptionClientListResponse contains the response from method SubscriptionClient.NewListPager. -type SubscriptionClientListResponse struct { - SubscriptionCollection -} - -// SubscriptionClientListSecretsResponse contains the response from method SubscriptionClient.ListSecrets. -type SubscriptionClientListSecretsResponse struct { - SubscriptionKeysContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// SubscriptionClientRegeneratePrimaryKeyResponse contains the response from method SubscriptionClient.RegeneratePrimaryKey. -type SubscriptionClientRegeneratePrimaryKeyResponse struct { - // placeholder for future response values -} - -// SubscriptionClientRegenerateSecondaryKeyResponse contains the response from method SubscriptionClient.RegenerateSecondaryKey. -type SubscriptionClientRegenerateSecondaryKeyResponse struct { - // placeholder for future response values -} - -// SubscriptionClientUpdateResponse contains the response from method SubscriptionClient.Update. -type SubscriptionClientUpdateResponse struct { - SubscriptionContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TagClientAssignToAPIResponse contains the response from method TagClient.AssignToAPI. -type TagClientAssignToAPIResponse struct { - TagContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TagClientAssignToOperationResponse contains the response from method TagClient.AssignToOperation. -type TagClientAssignToOperationResponse struct { - TagContract -} - -// TagClientAssignToProductResponse contains the response from method TagClient.AssignToProduct. -type TagClientAssignToProductResponse struct { - TagContract -} - -// TagClientCreateOrUpdateResponse contains the response from method TagClient.CreateOrUpdate. -type TagClientCreateOrUpdateResponse struct { - TagContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TagClientDeleteResponse contains the response from method TagClient.Delete. -type TagClientDeleteResponse struct { - // placeholder for future response values -} - -// TagClientDetachFromAPIResponse contains the response from method TagClient.DetachFromAPI. -type TagClientDetachFromAPIResponse struct { - // placeholder for future response values -} - -// TagClientDetachFromOperationResponse contains the response from method TagClient.DetachFromOperation. -type TagClientDetachFromOperationResponse struct { - // placeholder for future response values -} - -// TagClientDetachFromProductResponse contains the response from method TagClient.DetachFromProduct. -type TagClientDetachFromProductResponse struct { - // placeholder for future response values -} - -// TagClientGetByAPIResponse contains the response from method TagClient.GetByAPI. -type TagClientGetByAPIResponse struct { - TagContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TagClientGetByOperationResponse contains the response from method TagClient.GetByOperation. -type TagClientGetByOperationResponse struct { - TagContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TagClientGetByProductResponse contains the response from method TagClient.GetByProduct. -type TagClientGetByProductResponse struct { - TagContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TagClientGetEntityStateByAPIResponse contains the response from method TagClient.GetEntityStateByAPI. -type TagClientGetEntityStateByAPIResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// TagClientGetEntityStateByOperationResponse contains the response from method TagClient.GetEntityStateByOperation. -type TagClientGetEntityStateByOperationResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// TagClientGetEntityStateByProductResponse contains the response from method TagClient.GetEntityStateByProduct. -type TagClientGetEntityStateByProductResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// TagClientGetEntityStateResponse contains the response from method TagClient.GetEntityState. -type TagClientGetEntityStateResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// TagClientGetResponse contains the response from method TagClient.Get. -type TagClientGetResponse struct { - TagContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TagClientListByAPIResponse contains the response from method TagClient.NewListByAPIPager. -type TagClientListByAPIResponse struct { - TagCollection -} - -// TagClientListByOperationResponse contains the response from method TagClient.NewListByOperationPager. -type TagClientListByOperationResponse struct { - TagCollection -} - -// TagClientListByProductResponse contains the response from method TagClient.NewListByProductPager. -type TagClientListByProductResponse struct { - TagCollection -} - -// TagClientListByServiceResponse contains the response from method TagClient.NewListByServicePager. -type TagClientListByServiceResponse struct { - TagCollection -} - -// TagClientUpdateResponse contains the response from method TagClient.Update. -type TagClientUpdateResponse struct { - TagContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TagResourceClientListByServiceResponse contains the response from method TagResourceClient.NewListByServicePager. -type TagResourceClientListByServiceResponse struct { - TagResourceCollection -} - -// TenantAccessClientCreateResponse contains the response from method TenantAccessClient.Create. -type TenantAccessClientCreateResponse struct { - AccessInformationContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TenantAccessClientGetEntityTagResponse contains the response from method TenantAccessClient.GetEntityTag. -type TenantAccessClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// TenantAccessClientGetResponse contains the response from method TenantAccessClient.Get. -type TenantAccessClientGetResponse struct { - AccessInformationContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TenantAccessClientListByServiceResponse contains the response from method TenantAccessClient.NewListByServicePager. -type TenantAccessClientListByServiceResponse struct { - AccessInformationCollection -} - -// TenantAccessClientListSecretsResponse contains the response from method TenantAccessClient.ListSecrets. -type TenantAccessClientListSecretsResponse struct { - AccessInformationSecretsContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TenantAccessClientRegeneratePrimaryKeyResponse contains the response from method TenantAccessClient.RegeneratePrimaryKey. -type TenantAccessClientRegeneratePrimaryKeyResponse struct { - // placeholder for future response values -} - -// TenantAccessClientRegenerateSecondaryKeyResponse contains the response from method TenantAccessClient.RegenerateSecondaryKey. -type TenantAccessClientRegenerateSecondaryKeyResponse struct { - // placeholder for future response values -} - -// TenantAccessClientUpdateResponse contains the response from method TenantAccessClient.Update. -type TenantAccessClientUpdateResponse struct { - AccessInformationContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TenantAccessGitClientRegeneratePrimaryKeyResponse contains the response from method TenantAccessGitClient.RegeneratePrimaryKey. -type TenantAccessGitClientRegeneratePrimaryKeyResponse struct { - // placeholder for future response values -} - -// TenantAccessGitClientRegenerateSecondaryKeyResponse contains the response from method TenantAccessGitClient.RegenerateSecondaryKey. -type TenantAccessGitClientRegenerateSecondaryKeyResponse struct { - // placeholder for future response values -} - -// TenantConfigurationClientDeployResponse contains the response from method TenantConfigurationClient.BeginDeploy. -type TenantConfigurationClientDeployResponse struct { - OperationResultContract -} - -// TenantConfigurationClientGetSyncStateResponse contains the response from method TenantConfigurationClient.GetSyncState. -type TenantConfigurationClientGetSyncStateResponse struct { - TenantConfigurationSyncStateContract -} - -// TenantConfigurationClientSaveResponse contains the response from method TenantConfigurationClient.BeginSave. -type TenantConfigurationClientSaveResponse struct { - OperationResultContract -} - -// TenantConfigurationClientValidateResponse contains the response from method TenantConfigurationClient.BeginValidate. -type TenantConfigurationClientValidateResponse struct { - OperationResultContract -} - -// TenantSettingsClientGetResponse contains the response from method TenantSettingsClient.Get. -type TenantSettingsClientGetResponse struct { - TenantSettingsContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// TenantSettingsClientListByServiceResponse contains the response from method TenantSettingsClient.NewListByServicePager. -type TenantSettingsClientListByServiceResponse struct { - TenantSettingsCollection -} - -// UserClientCreateOrUpdateResponse contains the response from method UserClient.CreateOrUpdate. -type UserClientCreateOrUpdateResponse struct { - UserContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// UserClientDeleteResponse contains the response from method UserClient.Delete. -type UserClientDeleteResponse struct { - // placeholder for future response values -} - -// UserClientGenerateSsoURLResponse contains the response from method UserClient.GenerateSsoURL. -type UserClientGenerateSsoURLResponse struct { - GenerateSsoURLResult -} - -// UserClientGetEntityTagResponse contains the response from method UserClient.GetEntityTag. -type UserClientGetEntityTagResponse struct { - // ETag contains the information returned from the ETag header response. - ETag *string - - // Success indicates if the operation succeeded or failed. - Success bool -} - -// UserClientGetResponse contains the response from method UserClient.Get. -type UserClientGetResponse struct { - UserContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// UserClientGetSharedAccessTokenResponse contains the response from method UserClient.GetSharedAccessToken. -type UserClientGetSharedAccessTokenResponse struct { - UserTokenResult -} - -// UserClientListByServiceResponse contains the response from method UserClient.NewListByServicePager. -type UserClientListByServiceResponse struct { - UserCollection -} - -// UserClientUpdateResponse contains the response from method UserClient.Update. -type UserClientUpdateResponse struct { - UserContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// UserConfirmationPasswordClientSendResponse contains the response from method UserConfirmationPasswordClient.Send. -type UserConfirmationPasswordClientSendResponse struct { - // placeholder for future response values -} - -// UserGroupClientListResponse contains the response from method UserGroupClient.NewListPager. -type UserGroupClientListResponse struct { - GroupCollection -} - -// UserIdentitiesClientListResponse contains the response from method UserIdentitiesClient.NewListPager. -type UserIdentitiesClientListResponse struct { - UserIdentityCollection -} - -// UserSubscriptionClientGetResponse contains the response from method UserSubscriptionClient.Get. -type UserSubscriptionClientGetResponse struct { - SubscriptionContract - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// UserSubscriptionClientListResponse contains the response from method UserSubscriptionClient.NewListPager. -type UserSubscriptionClientListResponse struct { - SubscriptionCollection -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/service_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/service_client.go deleted file mode 100644 index 427fb118..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/service_client.go +++ /dev/null @@ -1,790 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ServiceClient contains the methods for the APIManagementService group. -// Don't use this type directly, use NewServiceClient() instead. -type ServiceClient struct { - internal *arm.Client - subscriptionID string -} - -// NewServiceClient creates a new instance of ServiceClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceClient, error) { - cl, err := arm.NewClient(moduleName+".ServiceClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ServiceClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginApplyNetworkConfigurationUpdates - Updates the Microsoft.ApiManagement resource running in the Virtual network to -// pick the updated DNS changes. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - ServiceClientBeginApplyNetworkConfigurationUpdatesOptions contains the optional parameters for the ServiceClient.BeginApplyNetworkConfigurationUpdates -// method. -func (client *ServiceClient) BeginApplyNetworkConfigurationUpdates(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginApplyNetworkConfigurationUpdatesOptions) (*runtime.Poller[ServiceClientApplyNetworkConfigurationUpdatesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.applyNetworkConfigurationUpdates(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceClientApplyNetworkConfigurationUpdatesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ServiceClientApplyNetworkConfigurationUpdatesResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// ApplyNetworkConfigurationUpdates - Updates the Microsoft.ApiManagement resource running in the Virtual network to pick -// the updated DNS changes. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *ServiceClient) applyNetworkConfigurationUpdates(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginApplyNetworkConfigurationUpdatesOptions) (*http.Response, error) { - req, err := client.applyNetworkConfigurationUpdatesCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// applyNetworkConfigurationUpdatesCreateRequest creates the ApplyNetworkConfigurationUpdates request. -func (client *ServiceClient) applyNetworkConfigurationUpdatesCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginApplyNetworkConfigurationUpdatesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) - } - return req, nil -} - -// BeginBackup - Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation -// and could take several minutes to complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - parameters - Parameters supplied to the ApiManagementService_Backup operation. -// - options - ServiceClientBeginBackupOptions contains the optional parameters for the ServiceClient.BeginBackup method. -func (client *ServiceClient) BeginBackup(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginBackupOptions) (*runtime.Poller[ServiceClientBackupResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.backup(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceClientBackupResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ServiceClientBackupResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Backup - Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation -// and could take several minutes to complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *ServiceClient) backup(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginBackupOptions) (*http.Response, error) { - req, err := client.backupCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// backupCreateRequest creates the Backup request. -func (client *ServiceClient) backupCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginBackupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// CheckNameAvailability - Checks availability and correctness of a name for an API Management service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - parameters - Parameters supplied to the CheckNameAvailability operation. -// - options - ServiceClientCheckNameAvailabilityOptions contains the optional parameters for the ServiceClient.CheckNameAvailability -// method. -func (client *ServiceClient) CheckNameAvailability(ctx context.Context, parameters ServiceCheckNameAvailabilityParameters, options *ServiceClientCheckNameAvailabilityOptions) (ServiceClientCheckNameAvailabilityResponse, error) { - req, err := client.checkNameAvailabilityCreateRequest(ctx, parameters, options) - if err != nil { - return ServiceClientCheckNameAvailabilityResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ServiceClientCheckNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkNameAvailabilityHandleResponse(resp) -} - -// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *ServiceClient) checkNameAvailabilityCreateRequest(ctx context.Context, parameters ServiceCheckNameAvailabilityParameters, options *ServiceClientCheckNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. -func (client *ServiceClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ServiceClientCheckNameAvailabilityResponse, error) { - result := ServiceClientCheckNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceNameAvailabilityResult); err != nil { - return ServiceClientCheckNameAvailabilityResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdate - Creates or updates an API Management service. This is long running operation and could take several -// minutes to complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - parameters - Parameters supplied to the CreateOrUpdate API Management service operation. -// - options - ServiceClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceClient.BeginCreateOrUpdate -// method. -func (client *ServiceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceResource, options *ServiceClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ServiceClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ServiceClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Creates or updates an API Management service. This is long running operation and could take several minutes -// to complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *ServiceClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceResource, options *ServiceClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ServiceClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceResource, options *ServiceClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes an existing API Management service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method. -func (client *ServiceClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginDeleteOptions) (*runtime.Poller[ServiceClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ServiceClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ServiceClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Deletes an existing API Management service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *ServiceClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ServiceClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets an API Management service resource description. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method. -func (client *ServiceClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientGetOptions) (ServiceClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return ServiceClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ServiceClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ServiceClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ServiceClient) getHandleResponse(resp *http.Response) (ServiceClientGetResponse, error) { - result := ServiceClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceResource); err != nil { - return ServiceClientGetResponse{}, err - } - return result, nil -} - -// GetDomainOwnershipIdentifier - Get the custom domain ownership identifier for an API Management service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - options - ServiceClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the ServiceClient.GetDomainOwnershipIdentifier -// method. -func (client *ServiceClient) GetDomainOwnershipIdentifier(ctx context.Context, options *ServiceClientGetDomainOwnershipIdentifierOptions) (ServiceClientGetDomainOwnershipIdentifierResponse, error) { - req, err := client.getDomainOwnershipIdentifierCreateRequest(ctx, options) - if err != nil { - return ServiceClientGetDomainOwnershipIdentifierResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ServiceClientGetDomainOwnershipIdentifierResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceClientGetDomainOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) - } - return client.getDomainOwnershipIdentifierHandleResponse(resp) -} - -// getDomainOwnershipIdentifierCreateRequest creates the GetDomainOwnershipIdentifier request. -func (client *ServiceClient) getDomainOwnershipIdentifierCreateRequest(ctx context.Context, options *ServiceClientGetDomainOwnershipIdentifierOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDomainOwnershipIdentifierHandleResponse handles the GetDomainOwnershipIdentifier response. -func (client *ServiceClient) getDomainOwnershipIdentifierHandleResponse(resp *http.Response) (ServiceClientGetDomainOwnershipIdentifierResponse, error) { - result := ServiceClientGetDomainOwnershipIdentifierResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceGetDomainOwnershipIdentifierResult); err != nil { - return ServiceClientGetDomainOwnershipIdentifierResponse{}, err - } - return result, nil -} - -// GetSsoToken - Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - ServiceClientGetSsoTokenOptions contains the optional parameters for the ServiceClient.GetSsoToken method. -func (client *ServiceClient) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientGetSsoTokenOptions) (ServiceClientGetSsoTokenResponse, error) { - req, err := client.getSsoTokenCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return ServiceClientGetSsoTokenResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ServiceClientGetSsoTokenResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceClientGetSsoTokenResponse{}, runtime.NewResponseError(resp) - } - return client.getSsoTokenHandleResponse(resp) -} - -// getSsoTokenCreateRequest creates the GetSsoToken request. -func (client *ServiceClient) getSsoTokenCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientGetSsoTokenOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSsoTokenHandleResponse handles the GetSsoToken response. -func (client *ServiceClient) getSsoTokenHandleResponse(resp *http.Response) (ServiceClientGetSsoTokenResponse, error) { - result := ServiceClientGetSsoTokenResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceGetSsoTokenResult); err != nil { - return ServiceClientGetSsoTokenResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all API Management services within an Azure subscription. -// -// Generated from API version 2021-08-01 -// - options - ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method. -func (client *ServiceClient) NewListPager(options *ServiceClientListOptions) *runtime.Pager[ServiceClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ServiceClientListResponse]{ - More: func(page ServiceClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ServiceClientListResponse) (ServiceClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServiceClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ServiceClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ServiceClient) listCreateRequest(ctx context.Context, options *ServiceClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ServiceClient) listHandleResponse(resp *http.Response) (ServiceClientListResponse, error) { - result := ServiceClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceListResult); err != nil { - return ServiceClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List all API Management services within a resource group. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - options - ServiceClientListByResourceGroupOptions contains the optional parameters for the ServiceClient.NewListByResourceGroupPager -// method. -func (client *ServiceClient) NewListByResourceGroupPager(resourceGroupName string, options *ServiceClientListByResourceGroupOptions) *runtime.Pager[ServiceClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ServiceClientListByResourceGroupResponse]{ - More: func(page ServiceClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ServiceClientListByResourceGroupResponse) (ServiceClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServiceClientListByResourceGroupResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ServiceClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ServiceClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ServiceClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ServiceClient) listByResourceGroupHandleResponse(resp *http.Response) (ServiceClientListByResourceGroupResponse, error) { - result := ServiceClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceListResult); err != nil { - return ServiceClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// BeginRestore - Restores a backup of an API Management service created using the ApiManagementService_Backup operation on -// the current service. This is a long running operation and could take several minutes to -// complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - parameters - Parameters supplied to the Restore API Management service from backup operation. -// - options - ServiceClientBeginRestoreOptions contains the optional parameters for the ServiceClient.BeginRestore method. -func (client *ServiceClient) BeginRestore(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginRestoreOptions) (*runtime.Poller[ServiceClientRestoreResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restore(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceClientRestoreResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ServiceClientRestoreResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Restore - Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the -// current service. This is a long running operation and could take several minutes to -// complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *ServiceClient) restore(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginRestoreOptions) (*http.Response, error) { - req, err := client.restoreCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restoreCreateRequest creates the Restore request. -func (client *ServiceClient) restoreCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginRestoreOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginUpdate - Updates an existing API Management service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - parameters - Parameters supplied to the CreateOrUpdate API Management service operation. -// - options - ServiceClientBeginUpdateOptions contains the optional parameters for the ServiceClient.BeginUpdate method. -func (client *ServiceClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateParameters, options *ServiceClientBeginUpdateOptions) (*runtime.Poller[ServiceClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ServiceClientUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ServiceClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Update - Updates an existing API Management service. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *ServiceClient) update(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateParameters, options *ServiceClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ServiceClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateParameters, options *ServiceClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/skus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/skus_client.go deleted file mode 100644 index ff7ca81e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/skus_client.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SKUsClient contains the methods for the APIManagementSKUs group. -// Don't use this type directly, use NewSKUsClient() instead. -type SKUsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewSKUsClient creates a new instance of SKUsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { - cl, err := arm.NewClient(moduleName+".SKUsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &SKUsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// NewListPager - Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. -// -// Generated from API version 2021-08-01 -// - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. -func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ - More: func(page SKUsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SKUsClientListResponse) (SKUsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SKUsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SKUsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SKUsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SKUsClient) listHandleResponse(resp *http.Response) (SKUsClientListResponse, error) { - result := SKUsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SKUsResult); err != nil { - return SKUsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantconfiguration_client.go deleted file mode 100644 index 7ad87a96..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantconfiguration_client.go +++ /dev/null @@ -1,334 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// TenantConfigurationClient contains the methods for the TenantConfiguration group. -// Don't use this type directly, use NewTenantConfigurationClient() instead. -type TenantConfigurationClient struct { - internal *arm.Client - subscriptionID string -} - -// NewTenantConfigurationClient creates a new instance of TenantConfigurationClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewTenantConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantConfigurationClient, error) { - cl, err := arm.NewClient(moduleName+".TenantConfigurationClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &TenantConfigurationClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginDeploy - This operation applies changes from the specified Git branch to the configuration database. This is a long -// running operation and could take several minutes to complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - configurationName - The identifier of the Git Configuration Operation. -// - parameters - Deploy Configuration parameters. -// - options - TenantConfigurationClientBeginDeployOptions contains the optional parameters for the TenantConfigurationClient.BeginDeploy -// method. -func (client *TenantConfigurationClient) BeginDeploy(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, options *TenantConfigurationClientBeginDeployOptions) (*runtime.Poller[TenantConfigurationClientDeployResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deploy(ctx, resourceGroupName, serviceName, configurationName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TenantConfigurationClientDeployResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[TenantConfigurationClientDeployResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Deploy - This operation applies changes from the specified Git branch to the configuration database. This is a long running -// operation and could take several minutes to complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *TenantConfigurationClient) deploy(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, options *TenantConfigurationClientBeginDeployOptions) (*http.Response, error) { - req, err := client.deployCreateRequest(ctx, resourceGroupName, serviceName, configurationName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deployCreateRequest creates the Deploy request. -func (client *TenantConfigurationClient) deployCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, options *TenantConfigurationClientBeginDeployOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(string(configurationName))) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// GetSyncState - Gets the status of the most recent synchronization between the configuration database and the Git repository. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - configurationName - The identifier of the Git Configuration Operation. -// - options - TenantConfigurationClientGetSyncStateOptions contains the optional parameters for the TenantConfigurationClient.GetSyncState -// method. -func (client *TenantConfigurationClient) GetSyncState(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, options *TenantConfigurationClientGetSyncStateOptions) (TenantConfigurationClientGetSyncStateResponse, error) { - req, err := client.getSyncStateCreateRequest(ctx, resourceGroupName, serviceName, configurationName, options) - if err != nil { - return TenantConfigurationClientGetSyncStateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return TenantConfigurationClientGetSyncStateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TenantConfigurationClientGetSyncStateResponse{}, runtime.NewResponseError(resp) - } - return client.getSyncStateHandleResponse(resp) -} - -// getSyncStateCreateRequest creates the GetSyncState request. -func (client *TenantConfigurationClient) getSyncStateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, options *TenantConfigurationClientGetSyncStateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(string(configurationName))) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSyncStateHandleResponse handles the GetSyncState response. -func (client *TenantConfigurationClient) getSyncStateHandleResponse(resp *http.Response) (TenantConfigurationClientGetSyncStateResponse, error) { - result := TenantConfigurationClientGetSyncStateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TenantConfigurationSyncStateContract); err != nil { - return TenantConfigurationClientGetSyncStateResponse{}, err - } - return result, nil -} - -// BeginSave - This operation creates a commit with the current configuration snapshot to the specified branch in the repository. -// This is a long running operation and could take several minutes to complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - configurationName - The identifier of the Git Configuration Operation. -// - parameters - Save Configuration parameters. -// - options - TenantConfigurationClientBeginSaveOptions contains the optional parameters for the TenantConfigurationClient.BeginSave -// method. -func (client *TenantConfigurationClient) BeginSave(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters SaveConfigurationParameter, options *TenantConfigurationClientBeginSaveOptions) (*runtime.Poller[TenantConfigurationClientSaveResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.save(ctx, resourceGroupName, serviceName, configurationName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TenantConfigurationClientSaveResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[TenantConfigurationClientSaveResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Save - This operation creates a commit with the current configuration snapshot to the specified branch in the repository. -// This is a long running operation and could take several minutes to complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *TenantConfigurationClient) save(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters SaveConfigurationParameter, options *TenantConfigurationClientBeginSaveOptions) (*http.Response, error) { - req, err := client.saveCreateRequest(ctx, resourceGroupName, serviceName, configurationName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// saveCreateRequest creates the Save request. -func (client *TenantConfigurationClient) saveCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters SaveConfigurationParameter, options *TenantConfigurationClientBeginSaveOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(string(configurationName))) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginValidate - This operation validates the changes in the specified Git branch. This is a long running operation and -// could take several minutes to complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - configurationName - The identifier of the Git Configuration Operation. -// - parameters - Validate Configuration parameters. -// - options - TenantConfigurationClientBeginValidateOptions contains the optional parameters for the TenantConfigurationClient.BeginValidate -// method. -func (client *TenantConfigurationClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, options *TenantConfigurationClientBeginValidateOptions) (*runtime.Poller[TenantConfigurationClientValidateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.validate(ctx, resourceGroupName, serviceName, configurationName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TenantConfigurationClientValidateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[TenantConfigurationClientValidateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Validate - This operation validates the changes in the specified Git branch. This is a long running operation and could -// take several minutes to complete. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -func (client *TenantConfigurationClient) validate(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, options *TenantConfigurationClientBeginValidateOptions) (*http.Response, error) { - req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, configurationName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// validateCreateRequest creates the Validate request. -func (client *TenantConfigurationClient) validateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, options *TenantConfigurationClientBeginValidateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(string(configurationName))) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/time_rfc3339.go deleted file mode 100644 index 92ccea1c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/time_rfc3339.go +++ /dev/null @@ -1,87 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/user_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/user_client.go deleted file mode 100644 index 50ed86de..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/user_client.go +++ /dev/null @@ -1,588 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armapimanagement - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// UserClient contains the methods for the User group. -// Don't use this type directly, use NewUserClient() instead. -type UserClient struct { - internal *arm.Client - subscriptionID string -} - -// NewUserClient creates a new instance of UserClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserClient, error) { - cl, err := arm.NewClient(moduleName+".UserClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &UserClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Creates or Updates a user. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - userID - User identifier. Must be unique in the current API Management service instance. -// - parameters - Create or update parameters. -// - options - UserClientCreateOrUpdateOptions contains the optional parameters for the UserClient.CreateOrUpdate method. -func (client *UserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserCreateParameters, options *UserClientCreateOrUpdateOptions) (UserClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, userID, parameters, options) - if err != nil { - return UserClientCreateOrUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return UserClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return UserClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *UserClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserCreateParameters, options *UserClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if userID == "" { - return nil, errors.New("parameter userID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Notify != nil { - reqQP.Set("notify", strconv.FormatBool(*options.Notify)) - } - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - if options != nil && options.IfMatch != nil { - req.Raw().Header["If-Match"] = []string{*options.IfMatch} - } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *UserClient) createOrUpdateHandleResponse(resp *http.Response) (UserClientCreateOrUpdateResponse, error) { - result := UserClientCreateOrUpdateResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.UserContract); err != nil { - return UserClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes specific user. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - userID - User identifier. Must be unique in the current API Management service instance. -// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or -// it should be * for unconditional update. -// - options - UserClientDeleteOptions contains the optional parameters for the UserClient.Delete method. -func (client *UserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, options *UserClientDeleteOptions) (UserClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, userID, ifMatch, options) - if err != nil { - return UserClientDeleteResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return UserClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return UserClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return UserClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *UserClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, options *UserClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if userID == "" { - return nil, errors.New("parameter userID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.DeleteSubscriptions != nil { - reqQP.Set("deleteSubscriptions", strconv.FormatBool(*options.DeleteSubscriptions)) - } - if options != nil && options.Notify != nil { - reqQP.Set("notify", strconv.FormatBool(*options.Notify)) - } - reqQP.Set("api-version", "2021-08-01") - if options != nil && options.AppType != nil { - reqQP.Set("appType", string(*options.AppType)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GenerateSsoURL - Retrieves a redirection URL containing an authentication token for signing a given user into the developer -// portal. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - userID - User identifier. Must be unique in the current API Management service instance. -// - options - UserClientGenerateSsoURLOptions contains the optional parameters for the UserClient.GenerateSsoURL method. -func (client *UserClient) GenerateSsoURL(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGenerateSsoURLOptions) (UserClientGenerateSsoURLResponse, error) { - req, err := client.generateSsoURLCreateRequest(ctx, resourceGroupName, serviceName, userID, options) - if err != nil { - return UserClientGenerateSsoURLResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return UserClientGenerateSsoURLResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserClientGenerateSsoURLResponse{}, runtime.NewResponseError(resp) - } - return client.generateSsoURLHandleResponse(resp) -} - -// generateSsoURLCreateRequest creates the GenerateSsoURL request. -func (client *UserClient) generateSsoURLCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGenerateSsoURLOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if userID == "" { - return nil, errors.New("parameter userID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// generateSsoURLHandleResponse handles the GenerateSsoURL response. -func (client *UserClient) generateSsoURLHandleResponse(resp *http.Response) (UserClientGenerateSsoURLResponse, error) { - result := UserClientGenerateSsoURLResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GenerateSsoURLResult); err != nil { - return UserClientGenerateSsoURLResponse{}, err - } - return result, nil -} - -// Get - Gets the details of the user specified by its identifier. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - userID - User identifier. Must be unique in the current API Management service instance. -// - options - UserClientGetOptions contains the optional parameters for the UserClient.Get method. -func (client *UserClient) Get(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGetOptions) (UserClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, userID, options) - if err != nil { - return UserClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return UserClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *UserClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if userID == "" { - return nil, errors.New("parameter userID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *UserClient) getHandleResponse(resp *http.Response) (UserClientGetResponse, error) { - result := UserClientGetResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.UserContract); err != nil { - return UserClientGetResponse{}, err - } - return result, nil -} - -// GetEntityTag - Gets the entity state (Etag) version of the user specified by its identifier. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - userID - User identifier. Must be unique in the current API Management service instance. -// - options - UserClientGetEntityTagOptions contains the optional parameters for the UserClient.GetEntityTag method. -func (client *UserClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGetEntityTagOptions) (UserClientGetEntityTagResponse, error) { - req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, userID, options) - if err != nil { - return UserClientGetEntityTagResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return UserClientGetEntityTagResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserClientGetEntityTagResponse{}, runtime.NewResponseError(resp) - } - return client.getEntityTagHandleResponse(resp) -} - -// getEntityTagCreateRequest creates the GetEntityTag request. -func (client *UserClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGetEntityTagOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if userID == "" { - return nil, errors.New("parameter userID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getEntityTagHandleResponse handles the GetEntityTag response. -func (client *UserClient) getEntityTagHandleResponse(resp *http.Response) (UserClientGetEntityTagResponse, error) { - result := UserClientGetEntityTagResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 - return result, nil -} - -// GetSharedAccessToken - Gets the Shared Access Authorization Token for the User. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - userID - User identifier. Must be unique in the current API Management service instance. -// - parameters - Create Authorization Token parameters. -// - options - UserClientGetSharedAccessTokenOptions contains the optional parameters for the UserClient.GetSharedAccessToken -// method. -func (client *UserClient) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserTokenParameters, options *UserClientGetSharedAccessTokenOptions) (UserClientGetSharedAccessTokenResponse, error) { - req, err := client.getSharedAccessTokenCreateRequest(ctx, resourceGroupName, serviceName, userID, parameters, options) - if err != nil { - return UserClientGetSharedAccessTokenResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return UserClientGetSharedAccessTokenResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserClientGetSharedAccessTokenResponse{}, runtime.NewResponseError(resp) - } - return client.getSharedAccessTokenHandleResponse(resp) -} - -// getSharedAccessTokenCreateRequest creates the GetSharedAccessToken request. -func (client *UserClient) getSharedAccessTokenCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserTokenParameters, options *UserClientGetSharedAccessTokenOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if userID == "" { - return nil, errors.New("parameter userID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// getSharedAccessTokenHandleResponse handles the GetSharedAccessToken response. -func (client *UserClient) getSharedAccessTokenHandleResponse(resp *http.Response) (UserClientGetSharedAccessTokenResponse, error) { - result := UserClientGetSharedAccessTokenResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UserTokenResult); err != nil { - return UserClientGetSharedAccessTokenResponse{}, err - } - return result, nil -} - -// NewListByServicePager - Lists a collection of registered users in the specified service instance. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - options - UserClientListByServiceOptions contains the optional parameters for the UserClient.NewListByServicePager method. -func (client *UserClient) NewListByServicePager(resourceGroupName string, serviceName string, options *UserClientListByServiceOptions) *runtime.Pager[UserClientListByServiceResponse] { - return runtime.NewPager(runtime.PagingHandler[UserClientListByServiceResponse]{ - More: func(page UserClientListByServiceResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *UserClientListByServiceResponse) (UserClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return UserClientListByServiceResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return UserClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserClientListByServiceResponse{}, runtime.NewResponseError(resp) - } - return client.listByServiceHandleResponse(resp) - }, - }) -} - -// listByServiceCreateRequest creates the ListByService request. -func (client *UserClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *UserClientListByServiceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.Skip != nil { - reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) - } - if options != nil && options.ExpandGroups != nil { - reqQP.Set("expandGroups", strconv.FormatBool(*options.ExpandGroups)) - } - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByServiceHandleResponse handles the ListByService response. -func (client *UserClient) listByServiceHandleResponse(resp *http.Response) (UserClientListByServiceResponse, error) { - result := UserClientListByServiceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UserCollection); err != nil { - return UserClientListByServiceResponse{}, err - } - return result, nil -} - -// Update - Updates the details of the user specified by its identifier. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. -// - serviceName - The name of the API Management service. -// - userID - User identifier. Must be unique in the current API Management service instance. -// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or -// it should be * for unconditional update. -// - parameters - Update parameters. -// - options - UserClientUpdateOptions contains the optional parameters for the UserClient.Update method. -func (client *UserClient) Update(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, parameters UserUpdateParameters, options *UserClientUpdateOptions) (UserClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, userID, ifMatch, parameters, options) - if err != nil { - return UserClientUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return UserClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *UserClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, parameters UserUpdateParameters, options *UserClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if userID == "" { - return nil, errors.New("parameter userID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateHandleResponse handles the Update response. -func (client *UserClient) updateHandleResponse(resp *http.Response) (UserClientUpdateResponse, error) { - result := UserClientUpdateResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.UserContract); err != nil { - return UserClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/CHANGELOG.md new file mode 100644 index 00000000..758c91cc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/CHANGELOG.md @@ -0,0 +1,612 @@ +# Release History + +## 3.0.0 (2025-04-10) +### Breaking Changes + +- Type of `ErrorResponse.Error` has been changed from `*ErrorResponseBody` to `*ErrorDetail` +- Operation `*APIClient.Delete` has been changed to LRO, use `*APIClient.BeginDelete` instead. +- Operation `*UserClient.Delete` has been changed to LRO, use `*UserClient.BeginDelete` instead. +- Operation `*PolicyClient.ListByService` has supported pagination, use `*PolicyClient.NewListByServicePager` instead. +- Operation `*PolicyFragmentClient.ListByService` has supported pagination, use `*PolicyFragmentClient.NewListByServicePager` instead. +- Operation `*PortalConfigClient.ListByService` has supported pagination, use `*PortalConfigClient.NewListByServicePager` instead. +- Operation `*ProductPolicyClient.ListByProduct` has supported pagination, use `*ProductPolicyClient.NewListByProductPager` instead. + +### Features Added + +- New value `APITypeGrpc`, `APITypeOData` added to enum type `APIType` +- New value `ContentFormatGrpc`, `ContentFormatGrpcLink`, `ContentFormatOData`, `ContentFormatODataLink` added to enum type `ContentFormat` +- New value `HostnameTypeConfigurationAPI` added to enum type `HostnameType` +- New value `PlatformVersionStv21` added to enum type `PlatformVersion` +- New value `SKUTypeBasicV2`, `SKUTypeStandardV2` added to enum type `SKUType` +- New value `SoapAPITypeGRPC`, `SoapAPITypeOData` added to enum type `SoapAPIType` +- New enum type `APIGatewaySKUType` with values `APIGatewaySKUTypeStandard`, `APIGatewaySKUTypeWorkspaceGatewayPremium`, `APIGatewaySKUTypeWorkspaceGatewayStandard` +- New enum type `BackendType` with values `BackendTypePool`, `BackendTypeSingle` +- New enum type `DeveloperPortalStatus` with values `DeveloperPortalStatusDisabled`, `DeveloperPortalStatusEnabled` +- New enum type `GatewayListDebugCredentialsContractPurpose` with values `GatewayListDebugCredentialsContractPurposeTracing` +- New enum type `GatewaySKUCapacityScaleType` with values `GatewaySKUCapacityScaleTypeAutomatic`, `GatewaySKUCapacityScaleTypeManual`, `GatewaySKUCapacityScaleTypeNone` +- New enum type `KeyVaultRefreshState` with values `KeyVaultRefreshStateFalse`, `KeyVaultRefreshStateTrue` +- New enum type `LegacyAPIState` with values `LegacyAPIStateDisabled`, `LegacyAPIStateEnabled` +- New enum type `LegacyPortalStatus` with values `LegacyPortalStatusDisabled`, `LegacyPortalStatusEnabled` +- New enum type `MigrateToStv2Mode` with values `MigrateToStv2ModeNewIP`, `MigrateToStv2ModePreserveIP` +- New enum type `PolicyComplianceState` with values `PolicyComplianceStateCompliant`, `PolicyComplianceStateNonCompliant`, `PolicyComplianceStatePending` +- New enum type `PolicyRestrictionRequireBase` with values `PolicyRestrictionRequireBaseFalse`, `PolicyRestrictionRequireBaseTrue` +- New function `NewAPIGatewayClient(string, azcore.TokenCredential, *arm.ClientOptions) (*APIGatewayClient, error)` +- New function `*APIGatewayClient.BeginCreateOrUpdate(context.Context, string, string, GatewayResource, *APIGatewayClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIGatewayClientCreateOrUpdateResponse], error)` +- New function `*APIGatewayClient.BeginDelete(context.Context, string, string, *APIGatewayClientBeginDeleteOptions) (*runtime.Poller[APIGatewayClientDeleteResponse], error)` +- New function `*APIGatewayClient.Get(context.Context, string, string, *APIGatewayClientGetOptions) (APIGatewayClientGetResponse, error)` +- New function `*APIGatewayClient.NewListByResourceGroupPager(string, *APIGatewayClientListByResourceGroupOptions) *runtime.Pager[APIGatewayClientListByResourceGroupResponse]` +- New function `*APIGatewayClient.NewListPager(*APIGatewayClientListOptions) *runtime.Pager[APIGatewayClientListResponse]` +- New function `*APIGatewayClient.BeginUpdate(context.Context, string, string, GatewayUpdateParameters, *APIGatewayClientBeginUpdateOptions) (*runtime.Poller[APIGatewayClientUpdateResponse], error)` +- New function `NewAPIGatewayConfigConnectionClient(string, azcore.TokenCredential, *arm.ClientOptions) (*APIGatewayConfigConnectionClient, error)` +- New function `*APIGatewayConfigConnectionClient.BeginCreateOrUpdate(context.Context, string, string, string, GatewayConfigConnectionResource, *APIGatewayConfigConnectionClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIGatewayConfigConnectionClientCreateOrUpdateResponse], error)` +- New function `*APIGatewayConfigConnectionClient.BeginDelete(context.Context, string, string, string, string, *APIGatewayConfigConnectionClientBeginDeleteOptions) (*runtime.Poller[APIGatewayConfigConnectionClientDeleteResponse], error)` +- New function `*APIGatewayConfigConnectionClient.Get(context.Context, string, string, string, *APIGatewayConfigConnectionClientGetOptions) (APIGatewayConfigConnectionClientGetResponse, error)` +- New function `*APIGatewayConfigConnectionClient.NewListByGatewayPager(string, string, *APIGatewayConfigConnectionClientListByGatewayOptions) *runtime.Pager[APIGatewayConfigConnectionClientListByGatewayResponse]` +- New function `NewAllPoliciesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AllPoliciesClient, error)` +- New function `*AllPoliciesClient.NewListByServicePager(string, string, *AllPoliciesClientListByServiceOptions) *runtime.Pager[AllPoliciesClientListByServiceResponse]` +- New function `*ClientFactory.NewAPIGatewayClient() *APIGatewayClient` +- New function `*ClientFactory.NewAPIGatewayConfigConnectionClient() *APIGatewayConfigConnectionClient` +- New function `*ClientFactory.NewAllPoliciesClient() *AllPoliciesClient` +- New function `*ClientFactory.NewGatewaySKUsClient() *GatewaySKUsClient` +- New function `*ClientFactory.NewOperationStatusClient() *OperationStatusClient` +- New function `*ClientFactory.NewOperationsResultsClient() *OperationsResultsClient` +- New function `*ClientFactory.NewPolicyRestrictionClient() *PolicyRestrictionClient` +- New function `*ClientFactory.NewPolicyRestrictionValidationsClient() *PolicyRestrictionValidationsClient` +- New function `*ClientFactory.NewProductAPILinkClient() *ProductAPILinkClient` +- New function `*ClientFactory.NewProductGroupLinkClient() *ProductGroupLinkClient` +- New function `*ClientFactory.NewTagAPILinkClient() *TagAPILinkClient` +- New function `*ClientFactory.NewTagOperationLinkClient() *TagOperationLinkClient` +- New function `*ClientFactory.NewTagProductLinkClient() *TagProductLinkClient` +- New function `*ClientFactory.NewWorkspaceAPIClient() *WorkspaceAPIClient` +- New function `*ClientFactory.NewWorkspaceAPIDiagnosticClient() *WorkspaceAPIDiagnosticClient` +- New function `*ClientFactory.NewWorkspaceAPIExportClient() *WorkspaceAPIExportClient` +- New function `*ClientFactory.NewWorkspaceAPIOperationClient() *WorkspaceAPIOperationClient` +- New function `*ClientFactory.NewWorkspaceAPIOperationPolicyClient() *WorkspaceAPIOperationPolicyClient` +- New function `*ClientFactory.NewWorkspaceAPIPolicyClient() *WorkspaceAPIPolicyClient` +- New function `*ClientFactory.NewWorkspaceAPIReleaseClient() *WorkspaceAPIReleaseClient` +- New function `*ClientFactory.NewWorkspaceAPIRevisionClient() *WorkspaceAPIRevisionClient` +- New function `*ClientFactory.NewWorkspaceAPISchemaClient() *WorkspaceAPISchemaClient` +- New function `*ClientFactory.NewWorkspaceAPIVersionSetClient() *WorkspaceAPIVersionSetClient` +- New function `*ClientFactory.NewWorkspaceBackendClient() *WorkspaceBackendClient` +- New function `*ClientFactory.NewWorkspaceCertificateClient() *WorkspaceCertificateClient` +- New function `*ClientFactory.NewWorkspaceClient() *WorkspaceClient` +- New function `*ClientFactory.NewWorkspaceDiagnosticClient() *WorkspaceDiagnosticClient` +- New function `*ClientFactory.NewWorkspaceGlobalSchemaClient() *WorkspaceGlobalSchemaClient` +- New function `*ClientFactory.NewWorkspaceGroupClient() *WorkspaceGroupClient` +- New function `*ClientFactory.NewWorkspaceGroupUserClient() *WorkspaceGroupUserClient` +- New function `*ClientFactory.NewWorkspaceLinkClient() *WorkspaceLinkClient` +- New function `*ClientFactory.NewWorkspaceLinksClient() *WorkspaceLinksClient` +- New function `*ClientFactory.NewWorkspaceLoggerClient() *WorkspaceLoggerClient` +- New function `*ClientFactory.NewWorkspaceNamedValueClient() *WorkspaceNamedValueClient` +- New function `*ClientFactory.NewWorkspaceNotificationClient() *WorkspaceNotificationClient` +- New function `*ClientFactory.NewWorkspaceNotificationRecipientEmailClient() *WorkspaceNotificationRecipientEmailClient` +- New function `*ClientFactory.NewWorkspaceNotificationRecipientUserClient() *WorkspaceNotificationRecipientUserClient` +- New function `*ClientFactory.NewWorkspacePolicyClient() *WorkspacePolicyClient` +- New function `*ClientFactory.NewWorkspacePolicyFragmentClient() *WorkspacePolicyFragmentClient` +- New function `*ClientFactory.NewWorkspaceProductAPILinkClient() *WorkspaceProductAPILinkClient` +- New function `*ClientFactory.NewWorkspaceProductClient() *WorkspaceProductClient` +- New function `*ClientFactory.NewWorkspaceProductGroupLinkClient() *WorkspaceProductGroupLinkClient` +- New function `*ClientFactory.NewWorkspaceProductPolicyClient() *WorkspaceProductPolicyClient` +- New function `*ClientFactory.NewWorkspaceSubscriptionClient() *WorkspaceSubscriptionClient` +- New function `*ClientFactory.NewWorkspaceTagAPILinkClient() *WorkspaceTagAPILinkClient` +- New function `*ClientFactory.NewWorkspaceTagClient() *WorkspaceTagClient` +- New function `*ClientFactory.NewWorkspaceTagOperationLinkClient() *WorkspaceTagOperationLinkClient` +- New function `*ClientFactory.NewWorkspaceTagProductLinkClient() *WorkspaceTagProductLinkClient` +- New function `*GatewayClient.InvalidateDebugCredentials(context.Context, string, string, string, *GatewayClientInvalidateDebugCredentialsOptions) (GatewayClientInvalidateDebugCredentialsResponse, error)` +- New function `*GatewayClient.ListDebugCredentials(context.Context, string, string, string, GatewayListDebugCredentialsContract, *GatewayClientListDebugCredentialsOptions) (GatewayClientListDebugCredentialsResponse, error)` +- New function `*GatewayClient.ListTrace(context.Context, string, string, string, GatewayListTraceContract, *GatewayClientListTraceOptions) (GatewayClientListTraceResponse, error)` +- New function `NewGatewaySKUsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GatewaySKUsClient, error)` +- New function `*GatewaySKUsClient.NewListAvailableSKUsPager(string, string, *GatewaySKUsClientListAvailableSKUsOptions) *runtime.Pager[GatewaySKUsClientListAvailableSKUsResponse]` +- New function `NewOperationStatusClient(string, azcore.TokenCredential, *arm.ClientOptions) (*OperationStatusClient, error)` +- New function `*OperationStatusClient.Get(context.Context, string, string, *OperationStatusClientGetOptions) (OperationStatusClientGetResponse, error)` +- New function `NewOperationsResultsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*OperationsResultsClient, error)` +- New function `*OperationsResultsClient.Get(context.Context, string, string, *OperationsResultsClientGetOptions) (OperationsResultsClientGetResponse, error)` +- New function `NewPolicyRestrictionClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PolicyRestrictionClient, error)` +- New function `*PolicyRestrictionClient.CreateOrUpdate(context.Context, string, string, string, PolicyRestrictionContract, *PolicyRestrictionClientCreateOrUpdateOptions) (PolicyRestrictionClientCreateOrUpdateResponse, error)` +- New function `*PolicyRestrictionClient.Delete(context.Context, string, string, string, *PolicyRestrictionClientDeleteOptions) (PolicyRestrictionClientDeleteResponse, error)` +- New function `*PolicyRestrictionClient.Get(context.Context, string, string, string, *PolicyRestrictionClientGetOptions) (PolicyRestrictionClientGetResponse, error)` +- New function `*PolicyRestrictionClient.GetEntityTag(context.Context, string, string, string, *PolicyRestrictionClientGetEntityTagOptions) (PolicyRestrictionClientGetEntityTagResponse, error)` +- New function `*PolicyRestrictionClient.NewListByServicePager(string, string, *PolicyRestrictionClientListByServiceOptions) *runtime.Pager[PolicyRestrictionClientListByServiceResponse]` +- New function `*PolicyRestrictionClient.Update(context.Context, string, string, string, string, PolicyRestrictionUpdateContract, *PolicyRestrictionClientUpdateOptions) (PolicyRestrictionClientUpdateResponse, error)` +- New function `NewPolicyRestrictionValidationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PolicyRestrictionValidationsClient, error)` +- New function `*PolicyRestrictionValidationsClient.BeginByService(context.Context, string, string, *PolicyRestrictionValidationsClientBeginByServiceOptions) (*runtime.Poller[PolicyRestrictionValidationsClientByServiceResponse], error)` +- New function `NewProductAPILinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ProductAPILinkClient, error)` +- New function `*ProductAPILinkClient.CreateOrUpdate(context.Context, string, string, string, string, ProductAPILinkContract, *ProductAPILinkClientCreateOrUpdateOptions) (ProductAPILinkClientCreateOrUpdateResponse, error)` +- New function `*ProductAPILinkClient.Delete(context.Context, string, string, string, string, *ProductAPILinkClientDeleteOptions) (ProductAPILinkClientDeleteResponse, error)` +- New function `*ProductAPILinkClient.Get(context.Context, string, string, string, string, *ProductAPILinkClientGetOptions) (ProductAPILinkClientGetResponse, error)` +- New function `*ProductAPILinkClient.NewListByProductPager(string, string, string, *ProductAPILinkClientListByProductOptions) *runtime.Pager[ProductAPILinkClientListByProductResponse]` +- New function `NewProductGroupLinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ProductGroupLinkClient, error)` +- New function `*ProductGroupLinkClient.CreateOrUpdate(context.Context, string, string, string, string, ProductGroupLinkContract, *ProductGroupLinkClientCreateOrUpdateOptions) (ProductGroupLinkClientCreateOrUpdateResponse, error)` +- New function `*ProductGroupLinkClient.Delete(context.Context, string, string, string, string, *ProductGroupLinkClientDeleteOptions) (ProductGroupLinkClientDeleteResponse, error)` +- New function `*ProductGroupLinkClient.Get(context.Context, string, string, string, string, *ProductGroupLinkClientGetOptions) (ProductGroupLinkClientGetResponse, error)` +- New function `*ProductGroupLinkClient.NewListByProductPager(string, string, string, *ProductGroupLinkClientListByProductOptions) *runtime.Pager[ProductGroupLinkClientListByProductResponse]` +- New function `NewTagAPILinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*TagAPILinkClient, error)` +- New function `*TagAPILinkClient.CreateOrUpdate(context.Context, string, string, string, string, TagAPILinkContract, *TagAPILinkClientCreateOrUpdateOptions) (TagAPILinkClientCreateOrUpdateResponse, error)` +- New function `*TagAPILinkClient.Delete(context.Context, string, string, string, string, *TagAPILinkClientDeleteOptions) (TagAPILinkClientDeleteResponse, error)` +- New function `*TagAPILinkClient.Get(context.Context, string, string, string, string, *TagAPILinkClientGetOptions) (TagAPILinkClientGetResponse, error)` +- New function `*TagAPILinkClient.NewListByProductPager(string, string, string, *TagAPILinkClientListByProductOptions) *runtime.Pager[TagAPILinkClientListByProductResponse]` +- New function `NewTagOperationLinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*TagOperationLinkClient, error)` +- New function `*TagOperationLinkClient.CreateOrUpdate(context.Context, string, string, string, string, TagOperationLinkContract, *TagOperationLinkClientCreateOrUpdateOptions) (TagOperationLinkClientCreateOrUpdateResponse, error)` +- New function `*TagOperationLinkClient.Delete(context.Context, string, string, string, string, *TagOperationLinkClientDeleteOptions) (TagOperationLinkClientDeleteResponse, error)` +- New function `*TagOperationLinkClient.Get(context.Context, string, string, string, string, *TagOperationLinkClientGetOptions) (TagOperationLinkClientGetResponse, error)` +- New function `*TagOperationLinkClient.NewListByProductPager(string, string, string, *TagOperationLinkClientListByProductOptions) *runtime.Pager[TagOperationLinkClientListByProductResponse]` +- New function `NewTagProductLinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*TagProductLinkClient, error)` +- New function `*TagProductLinkClient.CreateOrUpdate(context.Context, string, string, string, string, TagProductLinkContract, *TagProductLinkClientCreateOrUpdateOptions) (TagProductLinkClientCreateOrUpdateResponse, error)` +- New function `*TagProductLinkClient.Delete(context.Context, string, string, string, string, *TagProductLinkClientDeleteOptions) (TagProductLinkClientDeleteResponse, error)` +- New function `*TagProductLinkClient.Get(context.Context, string, string, string, string, *TagProductLinkClientGetOptions) (TagProductLinkClientGetResponse, error)` +- New function `*TagProductLinkClient.NewListByProductPager(string, string, string, *TagProductLinkClientListByProductOptions) *runtime.Pager[TagProductLinkClientListByProductResponse]` +- New function `NewWorkspaceAPIClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceAPIClient, error)` +- New function `*WorkspaceAPIClient.BeginCreateOrUpdate(context.Context, string, string, string, string, APICreateOrUpdateParameter, *WorkspaceAPIClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceAPIClientCreateOrUpdateResponse], error)` +- New function `*WorkspaceAPIClient.Delete(context.Context, string, string, string, string, string, *WorkspaceAPIClientDeleteOptions) (WorkspaceAPIClientDeleteResponse, error)` +- New function `*WorkspaceAPIClient.Get(context.Context, string, string, string, string, *WorkspaceAPIClientGetOptions) (WorkspaceAPIClientGetResponse, error)` +- New function `*WorkspaceAPIClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceAPIClientGetEntityTagOptions) (WorkspaceAPIClientGetEntityTagResponse, error)` +- New function `*WorkspaceAPIClient.NewListByServicePager(string, string, string, *WorkspaceAPIClientListByServiceOptions) *runtime.Pager[WorkspaceAPIClientListByServiceResponse]` +- New function `*WorkspaceAPIClient.Update(context.Context, string, string, string, string, string, APIUpdateContract, *WorkspaceAPIClientUpdateOptions) (WorkspaceAPIClientUpdateResponse, error)` +- New function `NewWorkspaceAPIDiagnosticClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceAPIDiagnosticClient, error)` +- New function `*WorkspaceAPIDiagnosticClient.CreateOrUpdate(context.Context, string, string, string, string, string, DiagnosticContract, *WorkspaceAPIDiagnosticClientCreateOrUpdateOptions) (WorkspaceAPIDiagnosticClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceAPIDiagnosticClient.Delete(context.Context, string, string, string, string, string, string, *WorkspaceAPIDiagnosticClientDeleteOptions) (WorkspaceAPIDiagnosticClientDeleteResponse, error)` +- New function `*WorkspaceAPIDiagnosticClient.Get(context.Context, string, string, string, string, string, *WorkspaceAPIDiagnosticClientGetOptions) (WorkspaceAPIDiagnosticClientGetResponse, error)` +- New function `*WorkspaceAPIDiagnosticClient.GetEntityTag(context.Context, string, string, string, string, string, *WorkspaceAPIDiagnosticClientGetEntityTagOptions) (WorkspaceAPIDiagnosticClientGetEntityTagResponse, error)` +- New function `*WorkspaceAPIDiagnosticClient.NewListByWorkspacePager(string, string, string, string, *WorkspaceAPIDiagnosticClientListByWorkspaceOptions) *runtime.Pager[WorkspaceAPIDiagnosticClientListByWorkspaceResponse]` +- New function `*WorkspaceAPIDiagnosticClient.Update(context.Context, string, string, string, string, string, string, DiagnosticUpdateContract, *WorkspaceAPIDiagnosticClientUpdateOptions) (WorkspaceAPIDiagnosticClientUpdateResponse, error)` +- New function `NewWorkspaceAPIExportClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceAPIExportClient, error)` +- New function `*WorkspaceAPIExportClient.Get(context.Context, string, string, string, string, ExportFormat, ExportAPI, *WorkspaceAPIExportClientGetOptions) (WorkspaceAPIExportClientGetResponse, error)` +- New function `NewWorkspaceAPIOperationClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceAPIOperationClient, error)` +- New function `*WorkspaceAPIOperationClient.CreateOrUpdate(context.Context, string, string, string, string, string, OperationContract, *WorkspaceAPIOperationClientCreateOrUpdateOptions) (WorkspaceAPIOperationClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceAPIOperationClient.Delete(context.Context, string, string, string, string, string, string, *WorkspaceAPIOperationClientDeleteOptions) (WorkspaceAPIOperationClientDeleteResponse, error)` +- New function `*WorkspaceAPIOperationClient.Get(context.Context, string, string, string, string, string, *WorkspaceAPIOperationClientGetOptions) (WorkspaceAPIOperationClientGetResponse, error)` +- New function `*WorkspaceAPIOperationClient.GetEntityTag(context.Context, string, string, string, string, string, *WorkspaceAPIOperationClientGetEntityTagOptions) (WorkspaceAPIOperationClientGetEntityTagResponse, error)` +- New function `*WorkspaceAPIOperationClient.NewListByAPIPager(string, string, string, string, *WorkspaceAPIOperationClientListByAPIOptions) *runtime.Pager[WorkspaceAPIOperationClientListByAPIResponse]` +- New function `*WorkspaceAPIOperationClient.Update(context.Context, string, string, string, string, string, string, OperationUpdateContract, *WorkspaceAPIOperationClientUpdateOptions) (WorkspaceAPIOperationClientUpdateResponse, error)` +- New function `NewWorkspaceAPIOperationPolicyClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceAPIOperationPolicyClient, error)` +- New function `*WorkspaceAPIOperationPolicyClient.CreateOrUpdate(context.Context, string, string, string, string, string, PolicyIDName, PolicyContract, *WorkspaceAPIOperationPolicyClientCreateOrUpdateOptions) (WorkspaceAPIOperationPolicyClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceAPIOperationPolicyClient.Delete(context.Context, string, string, string, string, string, PolicyIDName, string, *WorkspaceAPIOperationPolicyClientDeleteOptions) (WorkspaceAPIOperationPolicyClientDeleteResponse, error)` +- New function `*WorkspaceAPIOperationPolicyClient.Get(context.Context, string, string, string, string, string, PolicyIDName, *WorkspaceAPIOperationPolicyClientGetOptions) (WorkspaceAPIOperationPolicyClientGetResponse, error)` +- New function `*WorkspaceAPIOperationPolicyClient.GetEntityTag(context.Context, string, string, string, string, string, PolicyIDName, *WorkspaceAPIOperationPolicyClientGetEntityTagOptions) (WorkspaceAPIOperationPolicyClientGetEntityTagResponse, error)` +- New function `*WorkspaceAPIOperationPolicyClient.NewListByOperationPager(string, string, string, string, string, *WorkspaceAPIOperationPolicyClientListByOperationOptions) *runtime.Pager[WorkspaceAPIOperationPolicyClientListByOperationResponse]` +- New function `NewWorkspaceAPIPolicyClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceAPIPolicyClient, error)` +- New function `*WorkspaceAPIPolicyClient.CreateOrUpdate(context.Context, string, string, string, string, PolicyIDName, PolicyContract, *WorkspaceAPIPolicyClientCreateOrUpdateOptions) (WorkspaceAPIPolicyClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceAPIPolicyClient.Delete(context.Context, string, string, string, string, PolicyIDName, string, *WorkspaceAPIPolicyClientDeleteOptions) (WorkspaceAPIPolicyClientDeleteResponse, error)` +- New function `*WorkspaceAPIPolicyClient.Get(context.Context, string, string, string, string, PolicyIDName, *WorkspaceAPIPolicyClientGetOptions) (WorkspaceAPIPolicyClientGetResponse, error)` +- New function `*WorkspaceAPIPolicyClient.GetEntityTag(context.Context, string, string, string, string, PolicyIDName, *WorkspaceAPIPolicyClientGetEntityTagOptions) (WorkspaceAPIPolicyClientGetEntityTagResponse, error)` +- New function `*WorkspaceAPIPolicyClient.NewListByAPIPager(string, string, string, string, *WorkspaceAPIPolicyClientListByAPIOptions) *runtime.Pager[WorkspaceAPIPolicyClientListByAPIResponse]` +- New function `NewWorkspaceAPIReleaseClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceAPIReleaseClient, error)` +- New function `*WorkspaceAPIReleaseClient.CreateOrUpdate(context.Context, string, string, string, string, string, APIReleaseContract, *WorkspaceAPIReleaseClientCreateOrUpdateOptions) (WorkspaceAPIReleaseClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceAPIReleaseClient.Delete(context.Context, string, string, string, string, string, string, *WorkspaceAPIReleaseClientDeleteOptions) (WorkspaceAPIReleaseClientDeleteResponse, error)` +- New function `*WorkspaceAPIReleaseClient.Get(context.Context, string, string, string, string, string, *WorkspaceAPIReleaseClientGetOptions) (WorkspaceAPIReleaseClientGetResponse, error)` +- New function `*WorkspaceAPIReleaseClient.GetEntityTag(context.Context, string, string, string, string, string, *WorkspaceAPIReleaseClientGetEntityTagOptions) (WorkspaceAPIReleaseClientGetEntityTagResponse, error)` +- New function `*WorkspaceAPIReleaseClient.NewListByServicePager(string, string, string, string, *WorkspaceAPIReleaseClientListByServiceOptions) *runtime.Pager[WorkspaceAPIReleaseClientListByServiceResponse]` +- New function `*WorkspaceAPIReleaseClient.Update(context.Context, string, string, string, string, string, string, APIReleaseContract, *WorkspaceAPIReleaseClientUpdateOptions) (WorkspaceAPIReleaseClientUpdateResponse, error)` +- New function `NewWorkspaceAPIRevisionClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceAPIRevisionClient, error)` +- New function `*WorkspaceAPIRevisionClient.NewListByServicePager(string, string, string, string, *WorkspaceAPIRevisionClientListByServiceOptions) *runtime.Pager[WorkspaceAPIRevisionClientListByServiceResponse]` +- New function `NewWorkspaceAPISchemaClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceAPISchemaClient, error)` +- New function `*WorkspaceAPISchemaClient.BeginCreateOrUpdate(context.Context, string, string, string, string, string, SchemaContract, *WorkspaceAPISchemaClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceAPISchemaClientCreateOrUpdateResponse], error)` +- New function `*WorkspaceAPISchemaClient.Delete(context.Context, string, string, string, string, string, string, *WorkspaceAPISchemaClientDeleteOptions) (WorkspaceAPISchemaClientDeleteResponse, error)` +- New function `*WorkspaceAPISchemaClient.Get(context.Context, string, string, string, string, string, *WorkspaceAPISchemaClientGetOptions) (WorkspaceAPISchemaClientGetResponse, error)` +- New function `*WorkspaceAPISchemaClient.GetEntityTag(context.Context, string, string, string, string, string, *WorkspaceAPISchemaClientGetEntityTagOptions) (WorkspaceAPISchemaClientGetEntityTagResponse, error)` +- New function `*WorkspaceAPISchemaClient.NewListByAPIPager(string, string, string, string, *WorkspaceAPISchemaClientListByAPIOptions) *runtime.Pager[WorkspaceAPISchemaClientListByAPIResponse]` +- New function `NewWorkspaceAPIVersionSetClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceAPIVersionSetClient, error)` +- New function `*WorkspaceAPIVersionSetClient.CreateOrUpdate(context.Context, string, string, string, string, APIVersionSetContract, *WorkspaceAPIVersionSetClientCreateOrUpdateOptions) (WorkspaceAPIVersionSetClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceAPIVersionSetClient.Delete(context.Context, string, string, string, string, string, *WorkspaceAPIVersionSetClientDeleteOptions) (WorkspaceAPIVersionSetClientDeleteResponse, error)` +- New function `*WorkspaceAPIVersionSetClient.Get(context.Context, string, string, string, string, *WorkspaceAPIVersionSetClientGetOptions) (WorkspaceAPIVersionSetClientGetResponse, error)` +- New function `*WorkspaceAPIVersionSetClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceAPIVersionSetClientGetEntityTagOptions) (WorkspaceAPIVersionSetClientGetEntityTagResponse, error)` +- New function `*WorkspaceAPIVersionSetClient.NewListByServicePager(string, string, string, *WorkspaceAPIVersionSetClientListByServiceOptions) *runtime.Pager[WorkspaceAPIVersionSetClientListByServiceResponse]` +- New function `*WorkspaceAPIVersionSetClient.Update(context.Context, string, string, string, string, string, APIVersionSetUpdateParameters, *WorkspaceAPIVersionSetClientUpdateOptions) (WorkspaceAPIVersionSetClientUpdateResponse, error)` +- New function `NewWorkspaceBackendClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceBackendClient, error)` +- New function `*WorkspaceBackendClient.CreateOrUpdate(context.Context, string, string, string, string, BackendContract, *WorkspaceBackendClientCreateOrUpdateOptions) (WorkspaceBackendClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceBackendClient.Delete(context.Context, string, string, string, string, string, *WorkspaceBackendClientDeleteOptions) (WorkspaceBackendClientDeleteResponse, error)` +- New function `*WorkspaceBackendClient.Get(context.Context, string, string, string, string, *WorkspaceBackendClientGetOptions) (WorkspaceBackendClientGetResponse, error)` +- New function `*WorkspaceBackendClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceBackendClientGetEntityTagOptions) (WorkspaceBackendClientGetEntityTagResponse, error)` +- New function `*WorkspaceBackendClient.NewListByWorkspacePager(string, string, string, *WorkspaceBackendClientListByWorkspaceOptions) *runtime.Pager[WorkspaceBackendClientListByWorkspaceResponse]` +- New function `*WorkspaceBackendClient.Update(context.Context, string, string, string, string, string, BackendUpdateParameters, *WorkspaceBackendClientUpdateOptions) (WorkspaceBackendClientUpdateResponse, error)` +- New function `NewWorkspaceCertificateClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceCertificateClient, error)` +- New function `*WorkspaceCertificateClient.CreateOrUpdate(context.Context, string, string, string, string, CertificateCreateOrUpdateParameters, *WorkspaceCertificateClientCreateOrUpdateOptions) (WorkspaceCertificateClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceCertificateClient.Delete(context.Context, string, string, string, string, string, *WorkspaceCertificateClientDeleteOptions) (WorkspaceCertificateClientDeleteResponse, error)` +- New function `*WorkspaceCertificateClient.Get(context.Context, string, string, string, string, *WorkspaceCertificateClientGetOptions) (WorkspaceCertificateClientGetResponse, error)` +- New function `*WorkspaceCertificateClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceCertificateClientGetEntityTagOptions) (WorkspaceCertificateClientGetEntityTagResponse, error)` +- New function `*WorkspaceCertificateClient.NewListByWorkspacePager(string, string, string, *WorkspaceCertificateClientListByWorkspaceOptions) *runtime.Pager[WorkspaceCertificateClientListByWorkspaceResponse]` +- New function `*WorkspaceCertificateClient.RefreshSecret(context.Context, string, string, string, string, *WorkspaceCertificateClientRefreshSecretOptions) (WorkspaceCertificateClientRefreshSecretResponse, error)` +- New function `NewWorkspaceClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceClient, error)` +- New function `*WorkspaceClient.CreateOrUpdate(context.Context, string, string, string, WorkspaceContract, *WorkspaceClientCreateOrUpdateOptions) (WorkspaceClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceClient.Delete(context.Context, string, string, string, string, *WorkspaceClientDeleteOptions) (WorkspaceClientDeleteResponse, error)` +- New function `*WorkspaceClient.Get(context.Context, string, string, string, *WorkspaceClientGetOptions) (WorkspaceClientGetResponse, error)` +- New function `*WorkspaceClient.GetEntityTag(context.Context, string, string, string, *WorkspaceClientGetEntityTagOptions) (WorkspaceClientGetEntityTagResponse, error)` +- New function `*WorkspaceClient.NewListByServicePager(string, string, *WorkspaceClientListByServiceOptions) *runtime.Pager[WorkspaceClientListByServiceResponse]` +- New function `*WorkspaceClient.Update(context.Context, string, string, string, string, WorkspaceContract, *WorkspaceClientUpdateOptions) (WorkspaceClientUpdateResponse, error)` +- New function `NewWorkspaceDiagnosticClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceDiagnosticClient, error)` +- New function `*WorkspaceDiagnosticClient.CreateOrUpdate(context.Context, string, string, string, string, DiagnosticContract, *WorkspaceDiagnosticClientCreateOrUpdateOptions) (WorkspaceDiagnosticClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceDiagnosticClient.Delete(context.Context, string, string, string, string, string, *WorkspaceDiagnosticClientDeleteOptions) (WorkspaceDiagnosticClientDeleteResponse, error)` +- New function `*WorkspaceDiagnosticClient.Get(context.Context, string, string, string, string, *WorkspaceDiagnosticClientGetOptions) (WorkspaceDiagnosticClientGetResponse, error)` +- New function `*WorkspaceDiagnosticClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceDiagnosticClientGetEntityTagOptions) (WorkspaceDiagnosticClientGetEntityTagResponse, error)` +- New function `*WorkspaceDiagnosticClient.NewListByWorkspacePager(string, string, string, *WorkspaceDiagnosticClientListByWorkspaceOptions) *runtime.Pager[WorkspaceDiagnosticClientListByWorkspaceResponse]` +- New function `*WorkspaceDiagnosticClient.Update(context.Context, string, string, string, string, string, DiagnosticUpdateContract, *WorkspaceDiagnosticClientUpdateOptions) (WorkspaceDiagnosticClientUpdateResponse, error)` +- New function `NewWorkspaceGlobalSchemaClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceGlobalSchemaClient, error)` +- New function `*WorkspaceGlobalSchemaClient.BeginCreateOrUpdate(context.Context, string, string, string, string, GlobalSchemaContract, *WorkspaceGlobalSchemaClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceGlobalSchemaClientCreateOrUpdateResponse], error)` +- New function `*WorkspaceGlobalSchemaClient.Delete(context.Context, string, string, string, string, string, *WorkspaceGlobalSchemaClientDeleteOptions) (WorkspaceGlobalSchemaClientDeleteResponse, error)` +- New function `*WorkspaceGlobalSchemaClient.Get(context.Context, string, string, string, string, *WorkspaceGlobalSchemaClientGetOptions) (WorkspaceGlobalSchemaClientGetResponse, error)` +- New function `*WorkspaceGlobalSchemaClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceGlobalSchemaClientGetEntityTagOptions) (WorkspaceGlobalSchemaClientGetEntityTagResponse, error)` +- New function `*WorkspaceGlobalSchemaClient.NewListByServicePager(string, string, string, *WorkspaceGlobalSchemaClientListByServiceOptions) *runtime.Pager[WorkspaceGlobalSchemaClientListByServiceResponse]` +- New function `NewWorkspaceGroupClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceGroupClient, error)` +- New function `*WorkspaceGroupClient.CreateOrUpdate(context.Context, string, string, string, string, GroupCreateParameters, *WorkspaceGroupClientCreateOrUpdateOptions) (WorkspaceGroupClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceGroupClient.Delete(context.Context, string, string, string, string, string, *WorkspaceGroupClientDeleteOptions) (WorkspaceGroupClientDeleteResponse, error)` +- New function `*WorkspaceGroupClient.Get(context.Context, string, string, string, string, *WorkspaceGroupClientGetOptions) (WorkspaceGroupClientGetResponse, error)` +- New function `*WorkspaceGroupClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceGroupClientGetEntityTagOptions) (WorkspaceGroupClientGetEntityTagResponse, error)` +- New function `*WorkspaceGroupClient.NewListByServicePager(string, string, string, *WorkspaceGroupClientListByServiceOptions) *runtime.Pager[WorkspaceGroupClientListByServiceResponse]` +- New function `*WorkspaceGroupClient.Update(context.Context, string, string, string, string, string, GroupUpdateParameters, *WorkspaceGroupClientUpdateOptions) (WorkspaceGroupClientUpdateResponse, error)` +- New function `NewWorkspaceGroupUserClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceGroupUserClient, error)` +- New function `*WorkspaceGroupUserClient.CheckEntityExists(context.Context, string, string, string, string, string, *WorkspaceGroupUserClientCheckEntityExistsOptions) (WorkspaceGroupUserClientCheckEntityExistsResponse, error)` +- New function `*WorkspaceGroupUserClient.Create(context.Context, string, string, string, string, string, *WorkspaceGroupUserClientCreateOptions) (WorkspaceGroupUserClientCreateResponse, error)` +- New function `*WorkspaceGroupUserClient.Delete(context.Context, string, string, string, string, string, *WorkspaceGroupUserClientDeleteOptions) (WorkspaceGroupUserClientDeleteResponse, error)` +- New function `*WorkspaceGroupUserClient.NewListPager(string, string, string, string, *WorkspaceGroupUserClientListOptions) *runtime.Pager[WorkspaceGroupUserClientListResponse]` +- New function `NewWorkspaceLinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceLinkClient, error)` +- New function `*WorkspaceLinkClient.Get(context.Context, string, string, string, *WorkspaceLinkClientGetOptions) (WorkspaceLinkClientGetResponse, error)` +- New function `NewWorkspaceLinksClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceLinksClient, error)` +- New function `*WorkspaceLinksClient.NewListByServicePager(string, string, *WorkspaceLinksClientListByServiceOptions) *runtime.Pager[WorkspaceLinksClientListByServiceResponse]` +- New function `NewWorkspaceLoggerClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceLoggerClient, error)` +- New function `*WorkspaceLoggerClient.CreateOrUpdate(context.Context, string, string, string, string, LoggerContract, *WorkspaceLoggerClientCreateOrUpdateOptions) (WorkspaceLoggerClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceLoggerClient.Delete(context.Context, string, string, string, string, string, *WorkspaceLoggerClientDeleteOptions) (WorkspaceLoggerClientDeleteResponse, error)` +- New function `*WorkspaceLoggerClient.Get(context.Context, string, string, string, string, *WorkspaceLoggerClientGetOptions) (WorkspaceLoggerClientGetResponse, error)` +- New function `*WorkspaceLoggerClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceLoggerClientGetEntityTagOptions) (WorkspaceLoggerClientGetEntityTagResponse, error)` +- New function `*WorkspaceLoggerClient.NewListByWorkspacePager(string, string, string, *WorkspaceLoggerClientListByWorkspaceOptions) *runtime.Pager[WorkspaceLoggerClientListByWorkspaceResponse]` +- New function `*WorkspaceLoggerClient.Update(context.Context, string, string, string, string, string, LoggerUpdateContract, *WorkspaceLoggerClientUpdateOptions) (WorkspaceLoggerClientUpdateResponse, error)` +- New function `NewWorkspaceNamedValueClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceNamedValueClient, error)` +- New function `*WorkspaceNamedValueClient.BeginCreateOrUpdate(context.Context, string, string, string, string, NamedValueCreateContract, *WorkspaceNamedValueClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceNamedValueClientCreateOrUpdateResponse], error)` +- New function `*WorkspaceNamedValueClient.Delete(context.Context, string, string, string, string, string, *WorkspaceNamedValueClientDeleteOptions) (WorkspaceNamedValueClientDeleteResponse, error)` +- New function `*WorkspaceNamedValueClient.Get(context.Context, string, string, string, string, *WorkspaceNamedValueClientGetOptions) (WorkspaceNamedValueClientGetResponse, error)` +- New function `*WorkspaceNamedValueClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceNamedValueClientGetEntityTagOptions) (WorkspaceNamedValueClientGetEntityTagResponse, error)` +- New function `*WorkspaceNamedValueClient.NewListByServicePager(string, string, string, *WorkspaceNamedValueClientListByServiceOptions) *runtime.Pager[WorkspaceNamedValueClientListByServiceResponse]` +- New function `*WorkspaceNamedValueClient.ListValue(context.Context, string, string, string, string, *WorkspaceNamedValueClientListValueOptions) (WorkspaceNamedValueClientListValueResponse, error)` +- New function `*WorkspaceNamedValueClient.BeginRefreshSecret(context.Context, string, string, string, string, *WorkspaceNamedValueClientBeginRefreshSecretOptions) (*runtime.Poller[WorkspaceNamedValueClientRefreshSecretResponse], error)` +- New function `*WorkspaceNamedValueClient.BeginUpdate(context.Context, string, string, string, string, string, NamedValueUpdateParameters, *WorkspaceNamedValueClientBeginUpdateOptions) (*runtime.Poller[WorkspaceNamedValueClientUpdateResponse], error)` +- New function `NewWorkspaceNotificationClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceNotificationClient, error)` +- New function `*WorkspaceNotificationClient.CreateOrUpdate(context.Context, string, string, string, NotificationName, *WorkspaceNotificationClientCreateOrUpdateOptions) (WorkspaceNotificationClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceNotificationClient.Get(context.Context, string, string, string, NotificationName, *WorkspaceNotificationClientGetOptions) (WorkspaceNotificationClientGetResponse, error)` +- New function `*WorkspaceNotificationClient.NewListByServicePager(string, string, string, *WorkspaceNotificationClientListByServiceOptions) *runtime.Pager[WorkspaceNotificationClientListByServiceResponse]` +- New function `NewWorkspaceNotificationRecipientEmailClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceNotificationRecipientEmailClient, error)` +- New function `*WorkspaceNotificationRecipientEmailClient.CheckEntityExists(context.Context, string, string, string, NotificationName, string, *WorkspaceNotificationRecipientEmailClientCheckEntityExistsOptions) (WorkspaceNotificationRecipientEmailClientCheckEntityExistsResponse, error)` +- New function `*WorkspaceNotificationRecipientEmailClient.CreateOrUpdate(context.Context, string, string, string, NotificationName, string, *WorkspaceNotificationRecipientEmailClientCreateOrUpdateOptions) (WorkspaceNotificationRecipientEmailClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceNotificationRecipientEmailClient.Delete(context.Context, string, string, string, NotificationName, string, *WorkspaceNotificationRecipientEmailClientDeleteOptions) (WorkspaceNotificationRecipientEmailClientDeleteResponse, error)` +- New function `*WorkspaceNotificationRecipientEmailClient.ListByNotification(context.Context, string, string, string, NotificationName, *WorkspaceNotificationRecipientEmailClientListByNotificationOptions) (WorkspaceNotificationRecipientEmailClientListByNotificationResponse, error)` +- New function `NewWorkspaceNotificationRecipientUserClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceNotificationRecipientUserClient, error)` +- New function `*WorkspaceNotificationRecipientUserClient.CheckEntityExists(context.Context, string, string, string, NotificationName, string, *WorkspaceNotificationRecipientUserClientCheckEntityExistsOptions) (WorkspaceNotificationRecipientUserClientCheckEntityExistsResponse, error)` +- New function `*WorkspaceNotificationRecipientUserClient.CreateOrUpdate(context.Context, string, string, string, NotificationName, string, *WorkspaceNotificationRecipientUserClientCreateOrUpdateOptions) (WorkspaceNotificationRecipientUserClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceNotificationRecipientUserClient.Delete(context.Context, string, string, string, NotificationName, string, *WorkspaceNotificationRecipientUserClientDeleteOptions) (WorkspaceNotificationRecipientUserClientDeleteResponse, error)` +- New function `*WorkspaceNotificationRecipientUserClient.ListByNotification(context.Context, string, string, string, NotificationName, *WorkspaceNotificationRecipientUserClientListByNotificationOptions) (WorkspaceNotificationRecipientUserClientListByNotificationResponse, error)` +- New function `NewWorkspacePolicyClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspacePolicyClient, error)` +- New function `*WorkspacePolicyClient.CreateOrUpdate(context.Context, string, string, string, PolicyIDName, PolicyContract, *WorkspacePolicyClientCreateOrUpdateOptions) (WorkspacePolicyClientCreateOrUpdateResponse, error)` +- New function `*WorkspacePolicyClient.Delete(context.Context, string, string, string, PolicyIDName, string, *WorkspacePolicyClientDeleteOptions) (WorkspacePolicyClientDeleteResponse, error)` +- New function `*WorkspacePolicyClient.Get(context.Context, string, string, string, PolicyIDName, *WorkspacePolicyClientGetOptions) (WorkspacePolicyClientGetResponse, error)` +- New function `*WorkspacePolicyClient.GetEntityTag(context.Context, string, string, string, PolicyIDName, *WorkspacePolicyClientGetEntityTagOptions) (WorkspacePolicyClientGetEntityTagResponse, error)` +- New function `*WorkspacePolicyClient.NewListByAPIPager(string, string, string, *WorkspacePolicyClientListByAPIOptions) *runtime.Pager[WorkspacePolicyClientListByAPIResponse]` +- New function `NewWorkspacePolicyFragmentClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspacePolicyFragmentClient, error)` +- New function `*WorkspacePolicyFragmentClient.BeginCreateOrUpdate(context.Context, string, string, string, string, PolicyFragmentContract, *WorkspacePolicyFragmentClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspacePolicyFragmentClientCreateOrUpdateResponse], error)` +- New function `*WorkspacePolicyFragmentClient.Delete(context.Context, string, string, string, string, string, *WorkspacePolicyFragmentClientDeleteOptions) (WorkspacePolicyFragmentClientDeleteResponse, error)` +- New function `*WorkspacePolicyFragmentClient.Get(context.Context, string, string, string, string, *WorkspacePolicyFragmentClientGetOptions) (WorkspacePolicyFragmentClientGetResponse, error)` +- New function `*WorkspacePolicyFragmentClient.GetEntityTag(context.Context, string, string, string, string, *WorkspacePolicyFragmentClientGetEntityTagOptions) (WorkspacePolicyFragmentClientGetEntityTagResponse, error)` +- New function `*WorkspacePolicyFragmentClient.NewListByServicePager(string, string, string, *WorkspacePolicyFragmentClientListByServiceOptions) *runtime.Pager[WorkspacePolicyFragmentClientListByServiceResponse]` +- New function `*WorkspacePolicyFragmentClient.ListReferences(context.Context, string, string, string, string, *WorkspacePolicyFragmentClientListReferencesOptions) (WorkspacePolicyFragmentClientListReferencesResponse, error)` +- New function `NewWorkspaceProductAPILinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceProductAPILinkClient, error)` +- New function `*WorkspaceProductAPILinkClient.CreateOrUpdate(context.Context, string, string, string, string, string, ProductAPILinkContract, *WorkspaceProductAPILinkClientCreateOrUpdateOptions) (WorkspaceProductAPILinkClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceProductAPILinkClient.Delete(context.Context, string, string, string, string, string, *WorkspaceProductAPILinkClientDeleteOptions) (WorkspaceProductAPILinkClientDeleteResponse, error)` +- New function `*WorkspaceProductAPILinkClient.Get(context.Context, string, string, string, string, string, *WorkspaceProductAPILinkClientGetOptions) (WorkspaceProductAPILinkClientGetResponse, error)` +- New function `*WorkspaceProductAPILinkClient.NewListByProductPager(string, string, string, string, *WorkspaceProductAPILinkClientListByProductOptions) *runtime.Pager[WorkspaceProductAPILinkClientListByProductResponse]` +- New function `NewWorkspaceProductClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceProductClient, error)` +- New function `*WorkspaceProductClient.CreateOrUpdate(context.Context, string, string, string, string, ProductContract, *WorkspaceProductClientCreateOrUpdateOptions) (WorkspaceProductClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceProductClient.Delete(context.Context, string, string, string, string, string, *WorkspaceProductClientDeleteOptions) (WorkspaceProductClientDeleteResponse, error)` +- New function `*WorkspaceProductClient.Get(context.Context, string, string, string, string, *WorkspaceProductClientGetOptions) (WorkspaceProductClientGetResponse, error)` +- New function `*WorkspaceProductClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceProductClientGetEntityTagOptions) (WorkspaceProductClientGetEntityTagResponse, error)` +- New function `*WorkspaceProductClient.NewListByServicePager(string, string, string, *WorkspaceProductClientListByServiceOptions) *runtime.Pager[WorkspaceProductClientListByServiceResponse]` +- New function `*WorkspaceProductClient.Update(context.Context, string, string, string, string, string, ProductUpdateParameters, *WorkspaceProductClientUpdateOptions) (WorkspaceProductClientUpdateResponse, error)` +- New function `NewWorkspaceProductGroupLinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceProductGroupLinkClient, error)` +- New function `*WorkspaceProductGroupLinkClient.CreateOrUpdate(context.Context, string, string, string, string, string, ProductGroupLinkContract, *WorkspaceProductGroupLinkClientCreateOrUpdateOptions) (WorkspaceProductGroupLinkClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceProductGroupLinkClient.Delete(context.Context, string, string, string, string, string, *WorkspaceProductGroupLinkClientDeleteOptions) (WorkspaceProductGroupLinkClientDeleteResponse, error)` +- New function `*WorkspaceProductGroupLinkClient.Get(context.Context, string, string, string, string, string, *WorkspaceProductGroupLinkClientGetOptions) (WorkspaceProductGroupLinkClientGetResponse, error)` +- New function `*WorkspaceProductGroupLinkClient.NewListByProductPager(string, string, string, string, *WorkspaceProductGroupLinkClientListByProductOptions) *runtime.Pager[WorkspaceProductGroupLinkClientListByProductResponse]` +- New function `NewWorkspaceProductPolicyClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceProductPolicyClient, error)` +- New function `*WorkspaceProductPolicyClient.CreateOrUpdate(context.Context, string, string, string, string, PolicyIDName, PolicyContract, *WorkspaceProductPolicyClientCreateOrUpdateOptions) (WorkspaceProductPolicyClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceProductPolicyClient.Delete(context.Context, string, string, string, string, PolicyIDName, string, *WorkspaceProductPolicyClientDeleteOptions) (WorkspaceProductPolicyClientDeleteResponse, error)` +- New function `*WorkspaceProductPolicyClient.Get(context.Context, string, string, string, string, PolicyIDName, *WorkspaceProductPolicyClientGetOptions) (WorkspaceProductPolicyClientGetResponse, error)` +- New function `*WorkspaceProductPolicyClient.GetEntityTag(context.Context, string, string, string, string, PolicyIDName, *WorkspaceProductPolicyClientGetEntityTagOptions) (WorkspaceProductPolicyClientGetEntityTagResponse, error)` +- New function `*WorkspaceProductPolicyClient.ListByProduct(context.Context, string, string, string, string, *WorkspaceProductPolicyClientListByProductOptions) (WorkspaceProductPolicyClientListByProductResponse, error)` +- New function `NewWorkspaceSubscriptionClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceSubscriptionClient, error)` +- New function `*WorkspaceSubscriptionClient.CreateOrUpdate(context.Context, string, string, string, string, SubscriptionCreateParameters, *WorkspaceSubscriptionClientCreateOrUpdateOptions) (WorkspaceSubscriptionClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceSubscriptionClient.Delete(context.Context, string, string, string, string, string, *WorkspaceSubscriptionClientDeleteOptions) (WorkspaceSubscriptionClientDeleteResponse, error)` +- New function `*WorkspaceSubscriptionClient.Get(context.Context, string, string, string, string, *WorkspaceSubscriptionClientGetOptions) (WorkspaceSubscriptionClientGetResponse, error)` +- New function `*WorkspaceSubscriptionClient.GetEntityTag(context.Context, string, string, string, string, *WorkspaceSubscriptionClientGetEntityTagOptions) (WorkspaceSubscriptionClientGetEntityTagResponse, error)` +- New function `*WorkspaceSubscriptionClient.NewListPager(string, string, string, *WorkspaceSubscriptionClientListOptions) *runtime.Pager[WorkspaceSubscriptionClientListResponse]` +- New function `*WorkspaceSubscriptionClient.ListSecrets(context.Context, string, string, string, string, *WorkspaceSubscriptionClientListSecretsOptions) (WorkspaceSubscriptionClientListSecretsResponse, error)` +- New function `*WorkspaceSubscriptionClient.RegeneratePrimaryKey(context.Context, string, string, string, string, *WorkspaceSubscriptionClientRegeneratePrimaryKeyOptions) (WorkspaceSubscriptionClientRegeneratePrimaryKeyResponse, error)` +- New function `*WorkspaceSubscriptionClient.RegenerateSecondaryKey(context.Context, string, string, string, string, *WorkspaceSubscriptionClientRegenerateSecondaryKeyOptions) (WorkspaceSubscriptionClientRegenerateSecondaryKeyResponse, error)` +- New function `*WorkspaceSubscriptionClient.Update(context.Context, string, string, string, string, string, SubscriptionUpdateParameters, *WorkspaceSubscriptionClientUpdateOptions) (WorkspaceSubscriptionClientUpdateResponse, error)` +- New function `NewWorkspaceTagAPILinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceTagAPILinkClient, error)` +- New function `*WorkspaceTagAPILinkClient.CreateOrUpdate(context.Context, string, string, string, string, string, TagAPILinkContract, *WorkspaceTagAPILinkClientCreateOrUpdateOptions) (WorkspaceTagAPILinkClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceTagAPILinkClient.Delete(context.Context, string, string, string, string, string, *WorkspaceTagAPILinkClientDeleteOptions) (WorkspaceTagAPILinkClientDeleteResponse, error)` +- New function `*WorkspaceTagAPILinkClient.Get(context.Context, string, string, string, string, string, *WorkspaceTagAPILinkClientGetOptions) (WorkspaceTagAPILinkClientGetResponse, error)` +- New function `*WorkspaceTagAPILinkClient.NewListByProductPager(string, string, string, string, *WorkspaceTagAPILinkClientListByProductOptions) *runtime.Pager[WorkspaceTagAPILinkClientListByProductResponse]` +- New function `NewWorkspaceTagClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceTagClient, error)` +- New function `*WorkspaceTagClient.CreateOrUpdate(context.Context, string, string, string, string, TagCreateUpdateParameters, *WorkspaceTagClientCreateOrUpdateOptions) (WorkspaceTagClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceTagClient.Delete(context.Context, string, string, string, string, string, *WorkspaceTagClientDeleteOptions) (WorkspaceTagClientDeleteResponse, error)` +- New function `*WorkspaceTagClient.Get(context.Context, string, string, string, string, *WorkspaceTagClientGetOptions) (WorkspaceTagClientGetResponse, error)` +- New function `*WorkspaceTagClient.GetEntityState(context.Context, string, string, string, string, *WorkspaceTagClientGetEntityStateOptions) (WorkspaceTagClientGetEntityStateResponse, error)` +- New function `*WorkspaceTagClient.NewListByServicePager(string, string, string, *WorkspaceTagClientListByServiceOptions) *runtime.Pager[WorkspaceTagClientListByServiceResponse]` +- New function `*WorkspaceTagClient.Update(context.Context, string, string, string, string, string, TagCreateUpdateParameters, *WorkspaceTagClientUpdateOptions) (WorkspaceTagClientUpdateResponse, error)` +- New function `NewWorkspaceTagOperationLinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceTagOperationLinkClient, error)` +- New function `*WorkspaceTagOperationLinkClient.CreateOrUpdate(context.Context, string, string, string, string, string, TagOperationLinkContract, *WorkspaceTagOperationLinkClientCreateOrUpdateOptions) (WorkspaceTagOperationLinkClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceTagOperationLinkClient.Delete(context.Context, string, string, string, string, string, *WorkspaceTagOperationLinkClientDeleteOptions) (WorkspaceTagOperationLinkClientDeleteResponse, error)` +- New function `*WorkspaceTagOperationLinkClient.Get(context.Context, string, string, string, string, string, *WorkspaceTagOperationLinkClientGetOptions) (WorkspaceTagOperationLinkClientGetResponse, error)` +- New function `*WorkspaceTagOperationLinkClient.NewListByProductPager(string, string, string, string, *WorkspaceTagOperationLinkClientListByProductOptions) *runtime.Pager[WorkspaceTagOperationLinkClientListByProductResponse]` +- New function `NewWorkspaceTagProductLinkClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkspaceTagProductLinkClient, error)` +- New function `*WorkspaceTagProductLinkClient.CreateOrUpdate(context.Context, string, string, string, string, string, TagProductLinkContract, *WorkspaceTagProductLinkClientCreateOrUpdateOptions) (WorkspaceTagProductLinkClientCreateOrUpdateResponse, error)` +- New function `*WorkspaceTagProductLinkClient.Delete(context.Context, string, string, string, string, string, *WorkspaceTagProductLinkClientDeleteOptions) (WorkspaceTagProductLinkClientDeleteResponse, error)` +- New function `*WorkspaceTagProductLinkClient.Get(context.Context, string, string, string, string, string, *WorkspaceTagProductLinkClientGetOptions) (WorkspaceTagProductLinkClientGetResponse, error)` +- New function `*WorkspaceTagProductLinkClient.NewListByProductPager(string, string, string, string, *WorkspaceTagProductLinkClientListByProductOptions) *runtime.Pager[WorkspaceTagProductLinkClientListByProductResponse]` +- New struct `AllPoliciesCollection` +- New struct `AllPoliciesContract` +- New struct `AllPoliciesContractProperties` +- New struct `BackendBaseParametersPool` +- New struct `BackendCircuitBreaker` +- New struct `BackendConfiguration` +- New struct `BackendPool` +- New struct `BackendPoolItem` +- New struct `BackendSubnetConfiguration` +- New struct `CircuitBreakerFailureCondition` +- New struct `CircuitBreakerRule` +- New struct `ConfigurationAPI` +- New struct `DiagnosticContractUpdateProperties` +- New struct `DiagnosticUpdateContract` +- New struct `ErrorAdditionalInfo` +- New struct `ErrorDetail` +- New struct `FailureStatusCodeRange` +- New struct `FrontendConfiguration` +- New struct `GatewayBaseProperties` +- New struct `GatewayConfigConnectionBaseProperties` +- New struct `GatewayConfigConnectionListResult` +- New struct `GatewayConfigConnectionResource` +- New struct `GatewayConfigurationAPI` +- New struct `GatewayDebugCredentialsContract` +- New struct `GatewayListDebugCredentialsContract` +- New struct `GatewayListResult` +- New struct `GatewayListTraceContract` +- New struct `GatewayProperties` +- New struct `GatewayResource` +- New struct `GatewayResourceSKUResult` +- New struct `GatewayResourceSKUResults` +- New struct `GatewaySKU` +- New struct `GatewaySKUCapacity` +- New struct `GatewaySKUProperties` +- New struct `GatewaySKUPropertiesForPatch` +- New struct `GatewayUpdateParameters` +- New struct `GatewayUpdateProperties` +- New struct `MigrateToStv2Contract` +- New struct `OperationStatusResult` +- New struct `PolicyRestrictionCollection` +- New struct `PolicyRestrictionContract` +- New struct `PolicyRestrictionContractProperties` +- New struct `PolicyRestrictionUpdateContract` +- New struct `PolicyWithComplianceCollection` +- New struct `PolicyWithComplianceContract` +- New struct `PolicyWithComplianceContractProperties` +- New struct `ProductAPILinkCollection` +- New struct `ProductAPILinkContract` +- New struct `ProductAPILinkContractProperties` +- New struct `ProductGroupLinkCollection` +- New struct `ProductGroupLinkContract` +- New struct `ProductGroupLinkContractProperties` +- New struct `TagAPILinkCollection` +- New struct `TagAPILinkContract` +- New struct `TagAPILinkContractProperties` +- New struct `TagOperationLinkCollection` +- New struct `TagOperationLinkContract` +- New struct `TagOperationLinkContractProperties` +- New struct `TagProductLinkCollection` +- New struct `TagProductLinkContract` +- New struct `TagProductLinkContractProperties` +- New struct `WorkspaceCollection` +- New struct `WorkspaceContract` +- New struct `WorkspaceContractProperties` +- New struct `WorkspaceLinksBaseProperties` +- New struct `WorkspaceLinksGateway` +- New struct `WorkspaceLinksListResult` +- New struct `WorkspaceLinksProperties` +- New struct `WorkspaceLinksResource` +- New field `ProvisioningState` in struct `APIContractProperties` +- New field `ProvisioningState` in struct `APICreateOrUpdateProperties` +- New field `AppIDs` in struct `AuthorizationAccessPolicyContractProperties` +- New field `CircuitBreaker`, `Pool`, `Type` in struct `BackendBaseParameters` +- New field `CircuitBreaker`, `Pool`, `Type` in struct `BackendContractProperties` +- New field `CircuitBreaker`, `Pool`, `Type` in struct `BackendUpdateParameterProperties` +- New field `ProvisioningState` in struct `GlobalSchemaContractProperties` +- New field `ProvisioningState` in struct `NamedValueContractProperties` +- New field `ProvisioningState` in struct `PolicyFragmentContractProperties` +- New field `ProvisioningState` in struct `PortalRevisionContractProperties` +- New field `ProvisioningState` in struct `SchemaContractProperties` +- New field `ConfigurationAPI`, `DeveloperPortalStatus`, `LegacyPortalStatus` in struct `ServiceBaseProperties` +- New field `Parameters` in struct `ServiceClientBeginMigrateToStv2Options` +- New field `ConfigurationAPI`, `DeveloperPortalStatus`, `LegacyPortalStatus` in struct `ServiceProperties` +- New field `ConfigurationAPI`, `DeveloperPortalStatus`, `LegacyPortalStatus` in struct `ServiceUpdateProperties` + + +## 2.1.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.0.0 (2023-08-25) +### Breaking Changes + +- Function `*ContentItemClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, *ContentItemClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, ContentItemContract, *ContentItemClientCreateOrUpdateOptions)` +- Function `*ContentTypeClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, *ContentTypeClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, ContentTypeContract, *ContentTypeClientCreateOrUpdateOptions)` + +### Features Added + +- New enum type `AsyncResolverStatus` with values `AsyncResolverStatusFailed`, `AsyncResolverStatusInProgress`, `AsyncResolverStatusStarted`, `AsyncResolverStatusSucceeded` +- New enum type `AuthorizationType` with values `AuthorizationTypeOAuth2` +- New enum type `NatGatewayState` with values `NatGatewayStateDisabled`, `NatGatewayStateEnabled` +- New enum type `OAuth2GrantType` with values `OAuth2GrantTypeAuthorizationCode`, `OAuth2GrantTypeClientCredentials` +- New enum type `PolicyFragmentContentFormat` with values `PolicyFragmentContentFormatRawxml`, `PolicyFragmentContentFormatXML` +- New enum type `PortalSettingsCspMode` with values `PortalSettingsCspModeDisabled`, `PortalSettingsCspModeEnabled`, `PortalSettingsCspModeReportOnly` +- New enum type `TranslateRequiredQueryParametersConduct` with values `TranslateRequiredQueryParametersConductQuery`, `TranslateRequiredQueryParametersConductTemplate` +- New function `NewAPIWikiClient(string, azcore.TokenCredential, *arm.ClientOptions) (*APIWikiClient, error)` +- New function `*APIWikiClient.CreateOrUpdate(context.Context, string, string, string, WikiContract, *APIWikiClientCreateOrUpdateOptions) (APIWikiClientCreateOrUpdateResponse, error)` +- New function `*APIWikiClient.Delete(context.Context, string, string, string, string, *APIWikiClientDeleteOptions) (APIWikiClientDeleteResponse, error)` +- New function `*APIWikiClient.Get(context.Context, string, string, string, *APIWikiClientGetOptions) (APIWikiClientGetResponse, error)` +- New function `*APIWikiClient.GetEntityTag(context.Context, string, string, string, *APIWikiClientGetEntityTagOptions) (APIWikiClientGetEntityTagResponse, error)` +- New function `*APIWikiClient.Update(context.Context, string, string, string, string, WikiUpdateContract, *APIWikiClientUpdateOptions) (APIWikiClientUpdateResponse, error)` +- New function `NewAPIWikisClient(string, azcore.TokenCredential, *arm.ClientOptions) (*APIWikisClient, error)` +- New function `*APIWikisClient.NewListPager(string, string, string, *APIWikisClientListOptions) *runtime.Pager[APIWikisClientListResponse]` +- New function `NewAuthorizationAccessPolicyClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AuthorizationAccessPolicyClient, error)` +- New function `*AuthorizationAccessPolicyClient.CreateOrUpdate(context.Context, string, string, string, string, string, AuthorizationAccessPolicyContract, *AuthorizationAccessPolicyClientCreateOrUpdateOptions) (AuthorizationAccessPolicyClientCreateOrUpdateResponse, error)` +- New function `*AuthorizationAccessPolicyClient.Delete(context.Context, string, string, string, string, string, string, *AuthorizationAccessPolicyClientDeleteOptions) (AuthorizationAccessPolicyClientDeleteResponse, error)` +- New function `*AuthorizationAccessPolicyClient.Get(context.Context, string, string, string, string, string, *AuthorizationAccessPolicyClientGetOptions) (AuthorizationAccessPolicyClientGetResponse, error)` +- New function `*AuthorizationAccessPolicyClient.NewListByAuthorizationPager(string, string, string, string, *AuthorizationAccessPolicyClientListByAuthorizationOptions) *runtime.Pager[AuthorizationAccessPolicyClientListByAuthorizationResponse]` +- New function `NewAuthorizationClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AuthorizationClient, error)` +- New function `*AuthorizationClient.ConfirmConsentCode(context.Context, string, string, string, string, AuthorizationConfirmConsentCodeRequestContract, *AuthorizationClientConfirmConsentCodeOptions) (AuthorizationClientConfirmConsentCodeResponse, error)` +- New function `*AuthorizationClient.CreateOrUpdate(context.Context, string, string, string, string, AuthorizationContract, *AuthorizationClientCreateOrUpdateOptions) (AuthorizationClientCreateOrUpdateResponse, error)` +- New function `*AuthorizationClient.Delete(context.Context, string, string, string, string, string, *AuthorizationClientDeleteOptions) (AuthorizationClientDeleteResponse, error)` +- New function `*AuthorizationClient.Get(context.Context, string, string, string, string, *AuthorizationClientGetOptions) (AuthorizationClientGetResponse, error)` +- New function `*AuthorizationClient.NewListByAuthorizationProviderPager(string, string, string, *AuthorizationClientListByAuthorizationProviderOptions) *runtime.Pager[AuthorizationClientListByAuthorizationProviderResponse]` +- New function `NewAuthorizationLoginLinksClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AuthorizationLoginLinksClient, error)` +- New function `*AuthorizationLoginLinksClient.Post(context.Context, string, string, string, string, AuthorizationLoginRequestContract, *AuthorizationLoginLinksClientPostOptions) (AuthorizationLoginLinksClientPostResponse, error)` +- New function `NewAuthorizationProviderClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AuthorizationProviderClient, error)` +- New function `*AuthorizationProviderClient.CreateOrUpdate(context.Context, string, string, string, AuthorizationProviderContract, *AuthorizationProviderClientCreateOrUpdateOptions) (AuthorizationProviderClientCreateOrUpdateResponse, error)` +- New function `*AuthorizationProviderClient.Delete(context.Context, string, string, string, string, *AuthorizationProviderClientDeleteOptions) (AuthorizationProviderClientDeleteResponse, error)` +- New function `*AuthorizationProviderClient.Get(context.Context, string, string, string, *AuthorizationProviderClientGetOptions) (AuthorizationProviderClientGetResponse, error)` +- New function `*AuthorizationProviderClient.NewListByServicePager(string, string, *AuthorizationProviderClientListByServiceOptions) *runtime.Pager[AuthorizationProviderClientListByServiceResponse]` +- New function `*ClientFactory.NewAPIWikiClient() *APIWikiClient` +- New function `*ClientFactory.NewAPIWikisClient() *APIWikisClient` +- New function `*ClientFactory.NewAuthorizationAccessPolicyClient() *AuthorizationAccessPolicyClient` +- New function `*ClientFactory.NewAuthorizationClient() *AuthorizationClient` +- New function `*ClientFactory.NewAuthorizationLoginLinksClient() *AuthorizationLoginLinksClient` +- New function `*ClientFactory.NewAuthorizationProviderClient() *AuthorizationProviderClient` +- New function `*ClientFactory.NewDocumentationClient() *DocumentationClient` +- New function `*ClientFactory.NewGraphQLAPIResolverClient() *GraphQLAPIResolverClient` +- New function `*ClientFactory.NewGraphQLAPIResolverPolicyClient() *GraphQLAPIResolverPolicyClient` +- New function `*ClientFactory.NewPolicyFragmentClient() *PolicyFragmentClient` +- New function `*ClientFactory.NewPortalConfigClient() *PortalConfigClient` +- New function `*ClientFactory.NewProductWikiClient() *ProductWikiClient` +- New function `*ClientFactory.NewProductWikisClient() *ProductWikisClient` +- New function `NewDocumentationClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DocumentationClient, error)` +- New function `*DocumentationClient.CreateOrUpdate(context.Context, string, string, string, DocumentationContract, *DocumentationClientCreateOrUpdateOptions) (DocumentationClientCreateOrUpdateResponse, error)` +- New function `*DocumentationClient.Delete(context.Context, string, string, string, string, *DocumentationClientDeleteOptions) (DocumentationClientDeleteResponse, error)` +- New function `*DocumentationClient.Get(context.Context, string, string, string, *DocumentationClientGetOptions) (DocumentationClientGetResponse, error)` +- New function `*DocumentationClient.GetEntityTag(context.Context, string, string, string, *DocumentationClientGetEntityTagOptions) (DocumentationClientGetEntityTagResponse, error)` +- New function `*DocumentationClient.NewListByServicePager(string, string, *DocumentationClientListByServiceOptions) *runtime.Pager[DocumentationClientListByServiceResponse]` +- New function `*DocumentationClient.Update(context.Context, string, string, string, string, DocumentationUpdateContract, *DocumentationClientUpdateOptions) (DocumentationClientUpdateResponse, error)` +- New function `NewGraphQLAPIResolverClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GraphQLAPIResolverClient, error)` +- New function `*GraphQLAPIResolverClient.CreateOrUpdate(context.Context, string, string, string, string, ResolverContract, *GraphQLAPIResolverClientCreateOrUpdateOptions) (GraphQLAPIResolverClientCreateOrUpdateResponse, error)` +- New function `*GraphQLAPIResolverClient.Delete(context.Context, string, string, string, string, string, *GraphQLAPIResolverClientDeleteOptions) (GraphQLAPIResolverClientDeleteResponse, error)` +- New function `*GraphQLAPIResolverClient.Get(context.Context, string, string, string, string, *GraphQLAPIResolverClientGetOptions) (GraphQLAPIResolverClientGetResponse, error)` +- New function `*GraphQLAPIResolverClient.GetEntityTag(context.Context, string, string, string, string, *GraphQLAPIResolverClientGetEntityTagOptions) (GraphQLAPIResolverClientGetEntityTagResponse, error)` +- New function `*GraphQLAPIResolverClient.NewListByAPIPager(string, string, string, *GraphQLAPIResolverClientListByAPIOptions) *runtime.Pager[GraphQLAPIResolverClientListByAPIResponse]` +- New function `*GraphQLAPIResolverClient.Update(context.Context, string, string, string, string, string, ResolverUpdateContract, *GraphQLAPIResolverClientUpdateOptions) (GraphQLAPIResolverClientUpdateResponse, error)` +- New function `NewGraphQLAPIResolverPolicyClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GraphQLAPIResolverPolicyClient, error)` +- New function `*GraphQLAPIResolverPolicyClient.CreateOrUpdate(context.Context, string, string, string, string, PolicyIDName, PolicyContract, *GraphQLAPIResolverPolicyClientCreateOrUpdateOptions) (GraphQLAPIResolverPolicyClientCreateOrUpdateResponse, error)` +- New function `*GraphQLAPIResolverPolicyClient.Delete(context.Context, string, string, string, string, PolicyIDName, string, *GraphQLAPIResolverPolicyClientDeleteOptions) (GraphQLAPIResolverPolicyClientDeleteResponse, error)` +- New function `*GraphQLAPIResolverPolicyClient.Get(context.Context, string, string, string, string, PolicyIDName, *GraphQLAPIResolverPolicyClientGetOptions) (GraphQLAPIResolverPolicyClientGetResponse, error)` +- New function `*GraphQLAPIResolverPolicyClient.GetEntityTag(context.Context, string, string, string, string, PolicyIDName, *GraphQLAPIResolverPolicyClientGetEntityTagOptions) (GraphQLAPIResolverPolicyClientGetEntityTagResponse, error)` +- New function `*GraphQLAPIResolverPolicyClient.NewListByResolverPager(string, string, string, string, *GraphQLAPIResolverPolicyClientListByResolverOptions) *runtime.Pager[GraphQLAPIResolverPolicyClientListByResolverResponse]` +- New function `NewPolicyFragmentClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PolicyFragmentClient, error)` +- New function `*PolicyFragmentClient.BeginCreateOrUpdate(context.Context, string, string, string, PolicyFragmentContract, *PolicyFragmentClientBeginCreateOrUpdateOptions) (*runtime.Poller[PolicyFragmentClientCreateOrUpdateResponse], error)` +- New function `*PolicyFragmentClient.Delete(context.Context, string, string, string, string, *PolicyFragmentClientDeleteOptions) (PolicyFragmentClientDeleteResponse, error)` +- New function `*PolicyFragmentClient.Get(context.Context, string, string, string, *PolicyFragmentClientGetOptions) (PolicyFragmentClientGetResponse, error)` +- New function `*PolicyFragmentClient.GetEntityTag(context.Context, string, string, string, *PolicyFragmentClientGetEntityTagOptions) (PolicyFragmentClientGetEntityTagResponse, error)` +- New function `*PolicyFragmentClient.ListByService(context.Context, string, string, *PolicyFragmentClientListByServiceOptions) (PolicyFragmentClientListByServiceResponse, error)` +- New function `*PolicyFragmentClient.ListReferences(context.Context, string, string, string, *PolicyFragmentClientListReferencesOptions) (PolicyFragmentClientListReferencesResponse, error)` +- New function `NewPortalConfigClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PortalConfigClient, error)` +- New function `*PortalConfigClient.CreateOrUpdate(context.Context, string, string, string, string, PortalConfigContract, *PortalConfigClientCreateOrUpdateOptions) (PortalConfigClientCreateOrUpdateResponse, error)` +- New function `*PortalConfigClient.Get(context.Context, string, string, string, *PortalConfigClientGetOptions) (PortalConfigClientGetResponse, error)` +- New function `*PortalConfigClient.GetEntityTag(context.Context, string, string, string, *PortalConfigClientGetEntityTagOptions) (PortalConfigClientGetEntityTagResponse, error)` +- New function `*PortalConfigClient.ListByService(context.Context, string, string, *PortalConfigClientListByServiceOptions) (PortalConfigClientListByServiceResponse, error)` +- New function `*PortalConfigClient.Update(context.Context, string, string, string, string, PortalConfigContract, *PortalConfigClientUpdateOptions) (PortalConfigClientUpdateResponse, error)` +- New function `NewProductWikiClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ProductWikiClient, error)` +- New function `*ProductWikiClient.CreateOrUpdate(context.Context, string, string, string, WikiContract, *ProductWikiClientCreateOrUpdateOptions) (ProductWikiClientCreateOrUpdateResponse, error)` +- New function `*ProductWikiClient.Delete(context.Context, string, string, string, string, *ProductWikiClientDeleteOptions) (ProductWikiClientDeleteResponse, error)` +- New function `*ProductWikiClient.Get(context.Context, string, string, string, *ProductWikiClientGetOptions) (ProductWikiClientGetResponse, error)` +- New function `*ProductWikiClient.GetEntityTag(context.Context, string, string, string, *ProductWikiClientGetEntityTagOptions) (ProductWikiClientGetEntityTagResponse, error)` +- New function `*ProductWikiClient.Update(context.Context, string, string, string, string, WikiUpdateContract, *ProductWikiClientUpdateOptions) (ProductWikiClientUpdateResponse, error)` +- New function `NewProductWikisClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ProductWikisClient, error)` +- New function `*ProductWikisClient.NewListPager(string, string, string, *ProductWikisClientListOptions) *runtime.Pager[ProductWikisClientListResponse]` +- New function `*ServiceClient.BeginMigrateToStv2(context.Context, string, string, *ServiceClientBeginMigrateToStv2Options) (*runtime.Poller[ServiceClientMigrateToStv2Response], error)` +- New struct `AuthorizationAccessPolicyCollection` +- New struct `AuthorizationAccessPolicyContract` +- New struct `AuthorizationAccessPolicyContractProperties` +- New struct `AuthorizationCollection` +- New struct `AuthorizationConfirmConsentCodeRequestContract` +- New struct `AuthorizationContract` +- New struct `AuthorizationContractProperties` +- New struct `AuthorizationError` +- New struct `AuthorizationLoginRequestContract` +- New struct `AuthorizationLoginResponseContract` +- New struct `AuthorizationProviderCollection` +- New struct `AuthorizationProviderContract` +- New struct `AuthorizationProviderContractProperties` +- New struct `AuthorizationProviderOAuth2GrantTypes` +- New struct `AuthorizationProviderOAuth2Settings` +- New struct `DocumentationCollection` +- New struct `DocumentationContract` +- New struct `DocumentationContractProperties` +- New struct `DocumentationUpdateContract` +- New struct `PolicyFragmentCollection` +- New struct `PolicyFragmentContract` +- New struct `PolicyFragmentContractProperties` +- New struct `PortalConfigCollection` +- New struct `PortalConfigContract` +- New struct `PortalConfigCorsProperties` +- New struct `PortalConfigCspProperties` +- New struct `PortalConfigDelegationProperties` +- New struct `PortalConfigProperties` +- New struct `PortalConfigPropertiesSignin` +- New struct `PortalConfigPropertiesSignup` +- New struct `PortalConfigTermsOfServiceProperties` +- New struct `ProxyResource` +- New struct `ResolverCollection` +- New struct `ResolverContract` +- New struct `ResolverEntityBaseContract` +- New struct `ResolverResultContract` +- New struct `ResolverResultContractProperties` +- New struct `ResolverResultLogItemContract` +- New struct `ResolverUpdateContract` +- New struct `ResolverUpdateContractProperties` +- New struct `ResourceCollection` +- New struct `ResourceCollectionValueItem` +- New struct `WikiCollection` +- New struct `WikiContract` +- New struct `WikiContractProperties` +- New struct `WikiDocumentationContract` +- New struct `WikiUpdateContract` +- New field `TranslateRequiredQueryParametersConduct` in struct `APICreateOrUpdateProperties` +- New field `NatGatewayState`, `OutboundPublicIPAddresses` in struct `AdditionalLocation` +- New field `OAuth2AuthenticationSettings`, `OpenidAuthenticationSettings` in struct `AuthenticationSettingsContract` +- New field `UseInAPIDocumentation`, `UseInTestConsole` in struct `AuthorizationServerContractProperties` +- New field `UseInAPIDocumentation`, `UseInTestConsole` in struct `AuthorizationServerUpdateContractProperties` +- New field `Metrics` in struct `DiagnosticContractProperties` +- New field `ClientLibrary` in struct `IdentityProviderBaseParameters` +- New field `ClientLibrary` in struct `IdentityProviderContractProperties` +- New field `ClientLibrary` in struct `IdentityProviderCreateContractProperties` +- New field `ClientLibrary` in struct `IdentityProviderUpdateProperties` +- New field `UseInAPIDocumentation`, `UseInTestConsole` in struct `OpenidConnectProviderContractProperties` +- New field `UseInAPIDocumentation`, `UseInTestConsole` in struct `OpenidConnectProviderUpdateContractProperties` +- New field `NatGatewayState`, `OutboundPublicIPAddresses` in struct `ServiceBaseProperties` +- New field `NatGatewayState`, `OutboundPublicIPAddresses` in struct `ServiceProperties` +- New field `NatGatewayState`, `OutboundPublicIPAddresses` in struct `ServiceUpdateProperties` + + +## 1.1.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + +## 1.1.0 (2023-03-27) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + + +## 1.0.0 (2022-05-17) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/README.md new file mode 100644 index 00000000..f1bcb25f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/README.md @@ -0,0 +1,106 @@ +# Azure API Management Module for Go + +The `armapimanagement` module provides operations for working with Azure API Management. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/apimanagement/armapimanagement) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- [Supported](https://aka.ms/azsdk/go/supported-versions) version of Go (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure API Management module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure API Management. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure API Management module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armapimanagement.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armapimanagement.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewAPIClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## More sample code + +- [API Management Service](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apimanagement_service) +- [API Operation](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apioperation) +- [API Operation Policy](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apioperationpolicy) +- [API Policy](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apipolicy) +- [API Release](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apirelease) +- [API Schema](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apischema) +- [API Tag Description](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apitagdescription) +- [API Version Set](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/apiversionset) +- [Deleted Service](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/deleted_service) +- [Logger](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/logger) +- [Sign In Setting](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/signin_setting) +- [Sign up Setting](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/signup_setting) +- [User](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/apimanagement/user) + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `API Management` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/allpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/allpolicies_client.go new file mode 100644 index 00000000..106e53b8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/allpolicies_client.go @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AllPoliciesClient contains the methods for the AllPolicies group. +// Don't use this type directly, use NewAllPoliciesClient() instead. +type AllPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAllPoliciesClient creates a new instance of AllPoliciesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAllPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AllPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AllPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByServicePager - Status of all policies of API Management services. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - AllPoliciesClientListByServiceOptions contains the optional parameters for the AllPoliciesClient.NewListByServicePager +// method. +func (client *AllPoliciesClient) NewListByServicePager(resourceGroupName string, serviceName string, options *AllPoliciesClientListByServiceOptions) *runtime.Pager[AllPoliciesClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[AllPoliciesClientListByServiceResponse]{ + More: func(page AllPoliciesClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AllPoliciesClientListByServiceResponse) (AllPoliciesClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AllPoliciesClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return AllPoliciesClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *AllPoliciesClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *AllPoliciesClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/allPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *AllPoliciesClient) listByServiceHandleResponse(resp *http.Response) (AllPoliciesClientListByServiceResponse, error) { + result := AllPoliciesClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AllPoliciesCollection); err != nil { + return AllPoliciesClientListByServiceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/api_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/api_client.go new file mode 100644 index 00000000..2be9dc8c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/api_client.go @@ -0,0 +1,596 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// APIClient contains the methods for the API group. +// Don't use this type directly, use NewAPIClient() instead. +type APIClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAPIClient creates a new instance of APIClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAPIClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &APIClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates new or updates existing specified API of the API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - parameters - Create or update parameters. +// - options - APIClientBeginCreateOrUpdateOptions contains the optional parameters for the APIClient.BeginCreateOrUpdate method. +func (client *APIClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters APICreateOrUpdateParameter, options *APIClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apiID, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates new or updates existing specified API of the API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *APIClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters APICreateOrUpdateParameter, options *APIClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "APIClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *APIClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters APICreateOrUpdateParameter, options *APIClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified API of the API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - APIClientBeginDeleteOptions contains the optional parameters for the APIClient.BeginDelete method. +func (client *APIClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, options *APIClientBeginDeleteOptions) (*runtime.Poller[APIClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, apiID, ifMatch, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified API of the API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *APIClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, options *APIClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "APIClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, ifMatch, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *APIClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, options *APIClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.DeleteRevisions != nil { + reqQP.Set("deleteRevisions", strconv.FormatBool(*options.DeleteRevisions)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the API specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - options - APIClientGetOptions contains the optional parameters for the APIClient.Get method. +func (client *APIClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIClientGetOptions) (APIClientGetResponse, error) { + var err error + const operationName = "APIClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + if err != nil { + return APIClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *APIClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, _ *APIClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *APIClient) getHandleResponse(resp *http.Response) (APIClientGetResponse, error) { + result := APIClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.APIContract); err != nil { + return APIClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the API specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - options - APIClientGetEntityTagOptions contains the optional parameters for the APIClient.GetEntityTag method. +func (client *APIClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIClientGetEntityTagOptions) (APIClientGetEntityTagResponse, error) { + var err error + const operationName = "APIClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + if err != nil { + return APIClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *APIClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, _ *APIClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *APIClient) getEntityTagHandleResponse(resp *http.Response) (APIClientGetEntityTagResponse, error) { + result := APIClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists all APIs of the API Management service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - APIClientListByServiceOptions contains the optional parameters for the APIClient.NewListByServicePager method. +func (client *APIClient) NewListByServicePager(resourceGroupName string, serviceName string, options *APIClientListByServiceOptions) *runtime.Pager[APIClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[APIClientListByServiceResponse]{ + More: func(page APIClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *APIClientListByServiceResponse) (APIClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return APIClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *APIClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *APIClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.ExpandAPIVersionSet != nil { + reqQP.Set("expandApiVersionSet", strconv.FormatBool(*options.ExpandAPIVersionSet)) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *APIClient) listByServiceHandleResponse(resp *http.Response) (APIClientListByServiceResponse, error) { + result := APIClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APICollection); err != nil { + return APIClientListByServiceResponse{}, err + } + return result, nil +} + +// NewListByTagsPager - Lists a collection of apis associated with tags. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - APIClientListByTagsOptions contains the optional parameters for the APIClient.NewListByTagsPager method. +func (client *APIClient) NewListByTagsPager(resourceGroupName string, serviceName string, options *APIClientListByTagsOptions) *runtime.Pager[APIClientListByTagsResponse] { + return runtime.NewPager(runtime.PagingHandler[APIClientListByTagsResponse]{ + More: func(page APIClientListByTagsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *APIClientListByTagsResponse) (APIClientListByTagsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIClient.NewListByTagsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByTagsCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return APIClientListByTagsResponse{}, err + } + return client.listByTagsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByTagsCreateRequest creates the ListByTags request. +func (client *APIClient) listByTagsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *APIClientListByTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.IncludeNotTaggedApis != nil { + reqQP.Set("includeNotTaggedApis", strconv.FormatBool(*options.IncludeNotTaggedApis)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByTagsHandleResponse handles the ListByTags response. +func (client *APIClient) listByTagsHandleResponse(resp *http.Response) (APIClientListByTagsResponse, error) { + result := APIClientListByTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagResourceCollection); err != nil { + return APIClientListByTagsResponse{}, err + } + return result, nil +} + +// Update - Updates the specified API of the API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - API Update Contract parameters. +// - options - APIClientUpdateOptions contains the optional parameters for the APIClient.Update method. +func (client *APIClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, parameters APIUpdateContract, options *APIClientUpdateOptions) (APIClientUpdateResponse, error) { + var err error + const operationName = "APIClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, apiID, ifMatch, parameters, options) + if err != nil { + return APIClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *APIClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, parameters APIUpdateContract, _ *APIClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *APIClient) updateHandleResponse(resp *http.Response) (APIClientUpdateResponse, error) { + result := APIClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.APIContract); err != nil { + return APIClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apidiagnostic_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apidiagnostic_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apidiagnostic_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apidiagnostic_client.go index 0d5ec134..42b8a566 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apidiagnostic_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apidiagnostic_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APIDiagnosticClient struct { } // NewAPIDiagnosticClient creates a new instance of APIDiagnosticClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIDiagnosticClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIDiagnosticClient, error) { - cl, err := arm.NewClient(moduleName+".APIDiagnosticClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewAPIDiagnosticClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Creates a new Diagnostic for an API or updates an existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. @@ -58,18 +53,25 @@ func NewAPIDiagnosticClient(subscriptionID string, credential azcore.TokenCreden // - options - APIDiagnosticClientCreateOrUpdateOptions contains the optional parameters for the APIDiagnosticClient.CreateOrUpdate // method. func (client *APIDiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, parameters DiagnosticContract, options *APIDiagnosticClientCreateOrUpdateOptions) (APIDiagnosticClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APIDiagnosticClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, diagnosticID, parameters, options) if err != nil { return APIDiagnosticClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIDiagnosticClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return APIDiagnosticClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APIDiagnosticClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -100,13 +102,16 @@ func (client *APIDiagnosticClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,8 +129,8 @@ func (client *APIDiagnosticClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Deletes the specified Diagnostic from an API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. @@ -133,22 +138,28 @@ func (client *APIDiagnosticClient) createOrUpdateHandleResponse(resp *http.Respo // it should be * for unconditional update. // - options - APIDiagnosticClientDeleteOptions contains the optional parameters for the APIDiagnosticClient.Delete method. func (client *APIDiagnosticClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, ifMatch string, options *APIDiagnosticClientDeleteOptions) (APIDiagnosticClientDeleteResponse, error) { + var err error + const operationName = "APIDiagnosticClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, diagnosticID, ifMatch, options) if err != nil { return APIDiagnosticClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIDiagnosticClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APIDiagnosticClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APIDiagnosticClientDeleteResponse{}, err } return APIDiagnosticClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *APIDiagnosticClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, ifMatch string, options *APIDiagnosticClientDeleteOptions) (*policy.Request, error) { +func (client *APIDiagnosticClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, ifMatch string, _ *APIDiagnosticClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -175,39 +186,46 @@ func (client *APIDiagnosticClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the Diagnostic for an API specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. // - options - APIDiagnosticClientGetOptions contains the optional parameters for the APIDiagnosticClient.Get method. func (client *APIDiagnosticClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, options *APIDiagnosticClientGetOptions) (APIDiagnosticClientGetResponse, error) { + var err error + const operationName = "APIDiagnosticClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, diagnosticID, options) if err != nil { return APIDiagnosticClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIDiagnosticClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIDiagnosticClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIDiagnosticClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *APIDiagnosticClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, options *APIDiagnosticClientGetOptions) (*policy.Request, error) { +func (client *APIDiagnosticClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, _ *APIDiagnosticClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -234,7 +252,7 @@ func (client *APIDiagnosticClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,30 +272,37 @@ func (client *APIDiagnosticClient) getHandleResponse(resp *http.Response) (APIDi // GetEntityTag - Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. // - options - APIDiagnosticClientGetEntityTagOptions contains the optional parameters for the APIDiagnosticClient.GetEntityTag // method. func (client *APIDiagnosticClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, options *APIDiagnosticClientGetEntityTagOptions) (APIDiagnosticClientGetEntityTagResponse, error) { + var err error + const operationName = "APIDiagnosticClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, diagnosticID, options) if err != nil { return APIDiagnosticClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIDiagnosticClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIDiagnosticClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIDiagnosticClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APIDiagnosticClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, options *APIDiagnosticClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APIDiagnosticClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, _ *APIDiagnosticClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -304,7 +329,7 @@ func (client *APIDiagnosticClient) getEntityTagCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -312,18 +337,17 @@ func (client *APIDiagnosticClient) getEntityTagCreateRequest(ctx context.Context // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APIDiagnosticClient) getEntityTagHandleResponse(resp *http.Response) (APIDiagnosticClientGetEntityTagResponse, error) { - result := APIDiagnosticClientGetEntityTagResponse{} + result := APIDiagnosticClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists all diagnostics of an API. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - options - APIDiagnosticClientListByServiceOptions contains the optional parameters for the APIDiagnosticClient.NewListByServicePager @@ -334,25 +358,20 @@ func (client *APIDiagnosticClient) NewListByServicePager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APIDiagnosticClientListByServiceResponse) (APIDiagnosticClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIDiagnosticClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIDiagnosticClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) if err != nil { return APIDiagnosticClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIDiagnosticClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -383,13 +402,13 @@ func (client *APIDiagnosticClient) listByServiceCreateRequest(ctx context.Contex if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -407,8 +426,8 @@ func (client *APIDiagnosticClient) listByServiceHandleResponse(resp *http.Respon // Update - Updates the details of the Diagnostic for an API specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. @@ -417,22 +436,29 @@ func (client *APIDiagnosticClient) listByServiceHandleResponse(resp *http.Respon // - parameters - Diagnostic Update parameters. // - options - APIDiagnosticClientUpdateOptions contains the optional parameters for the APIDiagnosticClient.Update method. func (client *APIDiagnosticClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, ifMatch string, parameters DiagnosticContract, options *APIDiagnosticClientUpdateOptions) (APIDiagnosticClientUpdateResponse, error) { + var err error + const operationName = "APIDiagnosticClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, apiID, diagnosticID, ifMatch, parameters, options) if err != nil { return APIDiagnosticClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIDiagnosticClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIDiagnosticClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIDiagnosticClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *APIDiagnosticClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, ifMatch string, parameters DiagnosticContract, options *APIDiagnosticClientUpdateOptions) (*policy.Request, error) { +func (client *APIDiagnosticClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, diagnosticID string, ifMatch string, parameters DiagnosticContract, _ *APIDiagnosticClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -459,11 +485,14 @@ func (client *APIDiagnosticClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiexport_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiexport_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiexport_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiexport_client.go index 3f2a24f7..89651954 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiexport_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiexport_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type APIExportClient struct { } // NewAPIExportClient creates a new instance of APIExportClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIExportClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIExportClient, error) { - cl, err := arm.NewClient(moduleName+".APIExportClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,31 +44,39 @@ func NewAPIExportClient(subscriptionID string, credential azcore.TokenCredential // valid for 5 minutes. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. -// - formatParam - Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. +// - formatParam - Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. New formats +// can be added in the future. // - export - Query parameter required to export the API details. // - options - APIExportClientGetOptions contains the optional parameters for the APIExportClient.Get method. func (client *APIExportClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, formatParam ExportFormat, export ExportAPI, options *APIExportClientGetOptions) (APIExportClientGetResponse, error) { + var err error + const operationName = "APIExportClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, formatParam, export, options) if err != nil { return APIExportClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIExportClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIExportClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIExportClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *APIExportClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, formatParam ExportFormat, export ExportAPI, options *APIExportClientGetOptions) (*policy.Request, error) { +func (client *APIExportClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, formatParam ExportFormat, export ExportAPI, _ *APIExportClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -96,9 +99,9 @@ func (client *APIExportClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("format", string(formatParam)) + reqQP.Set("api-version", "2024-05-01") reqQP.Set("export", string(export)) - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("format", string(formatParam)) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apigateway_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apigateway_client.go new file mode 100644 index 00000000..4a1ed137 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apigateway_client.go @@ -0,0 +1,455 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// APIGatewayClient contains the methods for the APIGateway group. +// Don't use this type directly, use NewAPIGatewayClient() instead. +type APIGatewayClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAPIGatewayClient creates a new instance of APIGatewayClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAPIGatewayClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIGatewayClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &APIGatewayClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an API Management gateway. This is long running operation and could take several +// minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - gatewayName - The name of the API Management gateway. +// - parameters - Parameters supplied to the CreateOrUpdate API Management gateway operation. +// - options - APIGatewayClientBeginCreateOrUpdateOptions contains the optional parameters for the APIGatewayClient.BeginCreateOrUpdate +// method. +func (client *APIGatewayClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, parameters GatewayResource, options *APIGatewayClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIGatewayClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIGatewayClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIGatewayClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an API Management gateway. This is long running operation and could take several minutes +// to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *APIGatewayClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, parameters GatewayResource, options *APIGatewayClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "APIGatewayClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *APIGatewayClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, parameters GatewayResource, _ *APIGatewayClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an existing API Management gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - gatewayName - The name of the API Management gateway. +// - options - APIGatewayClientBeginDeleteOptions contains the optional parameters for the APIGatewayClient.BeginDelete method. +func (client *APIGatewayClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *APIGatewayClientBeginDeleteOptions) (*runtime.Poller[APIGatewayClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIGatewayClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIGatewayClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an existing API Management gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *APIGatewayClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, options *APIGatewayClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "APIGatewayClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *APIGatewayClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, _ *APIGatewayClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets an API Management gateway resource description. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - gatewayName - The name of the API Management gateway. +// - options - APIGatewayClientGetOptions contains the optional parameters for the APIGatewayClient.Get method. +func (client *APIGatewayClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, options *APIGatewayClientGetOptions) (APIGatewayClientGetResponse, error) { + var err error + const operationName = "APIGatewayClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return APIGatewayClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIGatewayClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIGatewayClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *APIGatewayClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, _ *APIGatewayClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *APIGatewayClient) getHandleResponse(resp *http.Response) (APIGatewayClientGetResponse, error) { + result := APIGatewayClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayResource); err != nil { + return APIGatewayClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all API Management gateways within a subscription. +// +// Generated from API version 2024-05-01 +// - options - APIGatewayClientListOptions contains the optional parameters for the APIGatewayClient.NewListPager method. +func (client *APIGatewayClient) NewListPager(options *APIGatewayClientListOptions) *runtime.Pager[APIGatewayClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[APIGatewayClientListResponse]{ + More: func(page APIGatewayClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *APIGatewayClientListResponse) (APIGatewayClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIGatewayClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return APIGatewayClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *APIGatewayClient) listCreateRequest(ctx context.Context, _ *APIGatewayClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/gateways" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *APIGatewayClient) listHandleResponse(resp *http.Response) (APIGatewayClientListResponse, error) { + result := APIGatewayClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayListResult); err != nil { + return APIGatewayClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - List all API Management gateways within a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - APIGatewayClientListByResourceGroupOptions contains the optional parameters for the APIGatewayClient.NewListByResourceGroupPager +// method. +func (client *APIGatewayClient) NewListByResourceGroupPager(resourceGroupName string, options *APIGatewayClientListByResourceGroupOptions) *runtime.Pager[APIGatewayClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[APIGatewayClientListByResourceGroupResponse]{ + More: func(page APIGatewayClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *APIGatewayClientListByResourceGroupResponse) (APIGatewayClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIGatewayClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return APIGatewayClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *APIGatewayClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *APIGatewayClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *APIGatewayClient) listByResourceGroupHandleResponse(resp *http.Response) (APIGatewayClientListByResourceGroupResponse, error) { + result := APIGatewayClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayListResult); err != nil { + return APIGatewayClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates an existing API Management gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - gatewayName - The name of the API Management gateway. +// - parameters - Parameters supplied to the CreateOrUpdate API Management gateway operation. +// - options - APIGatewayClientBeginUpdateOptions contains the optional parameters for the APIGatewayClient.BeginUpdate method. +func (client *APIGatewayClient) BeginUpdate(ctx context.Context, resourceGroupName string, gatewayName string, parameters GatewayUpdateParameters, options *APIGatewayClientBeginUpdateOptions) (*runtime.Poller[APIGatewayClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, gatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIGatewayClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIGatewayClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an existing API Management gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *APIGatewayClient) update(ctx context.Context, resourceGroupName string, gatewayName string, parameters GatewayUpdateParameters, options *APIGatewayClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "APIGatewayClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, gatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *APIGatewayClient) updateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, parameters GatewayUpdateParameters, _ *APIGatewayClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apigatewayconfigconnection_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apigatewayconfigconnection_client.go new file mode 100644 index 00000000..3179dbc1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apigatewayconfigconnection_client.go @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// APIGatewayConfigConnectionClient contains the methods for the APIGatewayConfigConnection group. +// Don't use this type directly, use NewAPIGatewayConfigConnectionClient() instead. +type APIGatewayConfigConnectionClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAPIGatewayConfigConnectionClient creates a new instance of APIGatewayConfigConnectionClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAPIGatewayConfigConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIGatewayConfigConnectionClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &APIGatewayConfigConnectionClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an API Management gateway config connection. This is long running operation and +// could take several minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - gatewayName - The name of the API Management gateway. +// - configConnectionName - The name of the API Management gateway config connection. +// - parameters - Parameters supplied to the CreateOrUpdate API Management gateway config connection operation. +// - options - APIGatewayConfigConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the APIGatewayConfigConnectionClient.BeginCreateOrUpdate +// method. +func (client *APIGatewayConfigConnectionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, configConnectionName string, parameters GatewayConfigConnectionResource, options *APIGatewayConfigConnectionClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIGatewayConfigConnectionClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, configConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIGatewayConfigConnectionClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIGatewayConfigConnectionClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an API Management gateway config connection. This is long running operation and could +// take several minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *APIGatewayConfigConnectionClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, configConnectionName string, parameters GatewayConfigConnectionResource, options *APIGatewayConfigConnectionClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "APIGatewayConfigConnectionClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, configConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *APIGatewayConfigConnectionClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, configConnectionName string, parameters GatewayConfigConnectionResource, _ *APIGatewayConfigConnectionClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if configConnectionName == "" { + return nil, errors.New("parameter configConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configConnectionName}", url.PathEscape(configConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an existing API Management gateway config connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - gatewayName - The name of the API Management gateway. +// - configConnectionName - The name of the API Management gateway config connection. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - APIGatewayConfigConnectionClientBeginDeleteOptions contains the optional parameters for the APIGatewayConfigConnectionClient.BeginDelete +// method. +func (client *APIGatewayConfigConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, configConnectionName string, ifMatch string, options *APIGatewayConfigConnectionClientBeginDeleteOptions) (*runtime.Poller[APIGatewayConfigConnectionClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, configConnectionName, ifMatch, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIGatewayConfigConnectionClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIGatewayConfigConnectionClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an existing API Management gateway config connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *APIGatewayConfigConnectionClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, configConnectionName string, ifMatch string, options *APIGatewayConfigConnectionClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "APIGatewayConfigConnectionClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, configConnectionName, ifMatch, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *APIGatewayConfigConnectionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, configConnectionName string, ifMatch string, _ *APIGatewayConfigConnectionClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if configConnectionName == "" { + return nil, errors.New("parameter configConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configConnectionName}", url.PathEscape(configConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets an API Management gateway config connection resource description. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - gatewayName - The name of the API Management gateway. +// - configConnectionName - The name of the API Management gateway config connection. +// - options - APIGatewayConfigConnectionClientGetOptions contains the optional parameters for the APIGatewayConfigConnectionClient.Get +// method. +func (client *APIGatewayConfigConnectionClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, configConnectionName string, options *APIGatewayConfigConnectionClientGetOptions) (APIGatewayConfigConnectionClientGetResponse, error) { + var err error + const operationName = "APIGatewayConfigConnectionClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, configConnectionName, options) + if err != nil { + return APIGatewayConfigConnectionClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIGatewayConfigConnectionClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIGatewayConfigConnectionClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *APIGatewayConfigConnectionClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, configConnectionName string, _ *APIGatewayConfigConnectionClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if configConnectionName == "" { + return nil, errors.New("parameter configConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configConnectionName}", url.PathEscape(configConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *APIGatewayConfigConnectionClient) getHandleResponse(resp *http.Response) (APIGatewayConfigConnectionClientGetResponse, error) { + result := APIGatewayConfigConnectionClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayConfigConnectionResource); err != nil { + return APIGatewayConfigConnectionClientGetResponse{}, err + } + return result, nil +} + +// NewListByGatewayPager - List all API Management gateway config connections within a gateway. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - gatewayName - The name of the API Management gateway. +// - options - APIGatewayConfigConnectionClientListByGatewayOptions contains the optional parameters for the APIGatewayConfigConnectionClient.NewListByGatewayPager +// method. +func (client *APIGatewayConfigConnectionClient) NewListByGatewayPager(resourceGroupName string, gatewayName string, options *APIGatewayConfigConnectionClientListByGatewayOptions) *runtime.Pager[APIGatewayConfigConnectionClientListByGatewayResponse] { + return runtime.NewPager(runtime.PagingHandler[APIGatewayConfigConnectionClientListByGatewayResponse]{ + More: func(page APIGatewayConfigConnectionClientListByGatewayResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *APIGatewayConfigConnectionClientListByGatewayResponse) (APIGatewayConfigConnectionClientListByGatewayResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIGatewayConfigConnectionClient.NewListByGatewayPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) + }, nil) + if err != nil { + return APIGatewayConfigConnectionClientListByGatewayResponse{}, err + } + return client.listByGatewayHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByGatewayCreateRequest creates the ListByGateway request. +func (client *APIGatewayConfigConnectionClient) listByGatewayCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, _ *APIGatewayConfigConnectionClientListByGatewayOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByGatewayHandleResponse handles the ListByGateway response. +func (client *APIGatewayConfigConnectionClient) listByGatewayHandleResponse(resp *http.Response) (APIGatewayConfigConnectionClientListByGatewayResponse, error) { + result := APIGatewayConfigConnectionClientListByGatewayResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayConfigConnectionListResult); err != nil { + return APIGatewayConfigConnectionClientListByGatewayResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiissue_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiissue_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiissue_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiissue_client.go index 030895e2..f89a9eab 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiissue_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiissue_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APIIssueClient struct { } // NewAPIIssueClient creates a new instance of APIIssueClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIIssueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIIssueClient, error) { - cl, err := arm.NewClient(moduleName+".APIIssueClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,26 +44,33 @@ func NewAPIIssueClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Creates a new Issue for an API or updates an existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. // - parameters - Create parameters. // - options - APIIssueClientCreateOrUpdateOptions contains the optional parameters for the APIIssueClient.CreateOrUpdate method. func (client *APIIssueClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, parameters IssueContract, options *APIIssueClientCreateOrUpdateOptions) (APIIssueClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APIIssueClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, parameters, options) if err != nil { return APIIssueClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return APIIssueClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APIIssueClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -99,13 +101,16 @@ func (client *APIIssueClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -123,8 +128,8 @@ func (client *APIIssueClient) createOrUpdateHandleResponse(resp *http.Response) // Delete - Deletes the specified Issue from an API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. @@ -132,22 +137,28 @@ func (client *APIIssueClient) createOrUpdateHandleResponse(resp *http.Response) // it should be * for unconditional update. // - options - APIIssueClientDeleteOptions contains the optional parameters for the APIIssueClient.Delete method. func (client *APIIssueClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, ifMatch string, options *APIIssueClientDeleteOptions) (APIIssueClientDeleteResponse, error) { + var err error + const operationName = "APIIssueClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, ifMatch, options) if err != nil { return APIIssueClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APIIssueClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APIIssueClientDeleteResponse{}, err } return APIIssueClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *APIIssueClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, ifMatch string, options *APIIssueClientDeleteOptions) (*policy.Request, error) { +func (client *APIIssueClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, ifMatch string, _ *APIIssueClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -174,35 +185,42 @@ func (client *APIIssueClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the Issue for an API specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. // - options - APIIssueClientGetOptions contains the optional parameters for the APIIssueClient.Get method. func (client *APIIssueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, options *APIIssueClientGetOptions) (APIIssueClientGetResponse, error) { + var err error + const operationName = "APIIssueClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, options) if err != nil { return APIIssueClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIIssueClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIIssueClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -233,10 +251,10 @@ func (client *APIIssueClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") if options != nil && options.ExpandCommentsAttachments != nil { reqQP.Set("expandCommentsAttachments", strconv.FormatBool(*options.ExpandCommentsAttachments)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -256,29 +274,36 @@ func (client *APIIssueClient) getHandleResponse(resp *http.Response) (APIIssueCl // GetEntityTag - Gets the entity state (Etag) version of the Issue for an API specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. // - options - APIIssueClientGetEntityTagOptions contains the optional parameters for the APIIssueClient.GetEntityTag method. func (client *APIIssueClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, options *APIIssueClientGetEntityTagOptions) (APIIssueClientGetEntityTagResponse, error) { + var err error + const operationName = "APIIssueClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, options) if err != nil { return APIIssueClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIIssueClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIIssueClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APIIssueClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, options *APIIssueClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APIIssueClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, _ *APIIssueClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -305,7 +330,7 @@ func (client *APIIssueClient) getEntityTagCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -313,18 +338,17 @@ func (client *APIIssueClient) getEntityTagCreateRequest(ctx context.Context, res // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APIIssueClient) getEntityTagHandleResponse(resp *http.Response) (APIIssueClientGetEntityTagResponse, error) { - result := APIIssueClientGetEntityTagResponse{} + result := APIIssueClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists all issues associated with the specified API. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - options - APIIssueClientListByServiceOptions contains the optional parameters for the APIIssueClient.NewListByServicePager @@ -335,25 +359,20 @@ func (client *APIIssueClient) NewListByServicePager(resourceGroupName string, se return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APIIssueClientListByServiceResponse) (APIIssueClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIIssueClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIIssueClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) if err != nil { return APIIssueClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIIssueClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -384,16 +403,16 @@ func (client *APIIssueClient) listByServiceCreateRequest(ctx context.Context, re if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.ExpandCommentsAttachments != nil { - reqQP.Set("expandCommentsAttachments", strconv.FormatBool(*options.ExpandCommentsAttachments)) + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - if options != nil && options.Skip != nil { - reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.ExpandCommentsAttachments != nil { + reqQP.Set("expandCommentsAttachments", strconv.FormatBool(*options.ExpandCommentsAttachments)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -411,8 +430,8 @@ func (client *APIIssueClient) listByServiceHandleResponse(resp *http.Response) ( // Update - Updates an existing issue for an API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. @@ -421,22 +440,29 @@ func (client *APIIssueClient) listByServiceHandleResponse(resp *http.Response) ( // - parameters - Update parameters. // - options - APIIssueClientUpdateOptions contains the optional parameters for the APIIssueClient.Update method. func (client *APIIssueClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, ifMatch string, parameters IssueUpdateContract, options *APIIssueClientUpdateOptions) (APIIssueClientUpdateResponse, error) { + var err error + const operationName = "APIIssueClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, ifMatch, parameters, options) if err != nil { return APIIssueClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIIssueClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIIssueClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *APIIssueClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, ifMatch string, parameters IssueUpdateContract, options *APIIssueClientUpdateOptions) (*policy.Request, error) { +func (client *APIIssueClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, ifMatch string, parameters IssueUpdateContract, _ *APIIssueClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -463,11 +489,14 @@ func (client *APIIssueClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiissueattachment_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiissueattachment_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiissueattachment_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiissueattachment_client.go index 8f865ad9..0c87c6a6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiissueattachment_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiissueattachment_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APIIssueAttachmentClient struct { } // NewAPIIssueAttachmentClient creates a new instance of APIIssueAttachmentClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIIssueAttachmentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIIssueAttachmentClient, error) { - cl, err := arm.NewClient(moduleName+".APIIssueAttachmentClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewAPIIssueAttachmentClient(subscriptionID string, credential azcore.TokenC // CreateOrUpdate - Creates a new Attachment for the Issue in an API or updates an existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. @@ -59,18 +54,25 @@ func NewAPIIssueAttachmentClient(subscriptionID string, credential azcore.TokenC // - options - APIIssueAttachmentClientCreateOrUpdateOptions contains the optional parameters for the APIIssueAttachmentClient.CreateOrUpdate // method. func (client *APIIssueAttachmentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, parameters IssueAttachmentContract, options *APIIssueAttachmentClientCreateOrUpdateOptions) (APIIssueAttachmentClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APIIssueAttachmentClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, attachmentID, parameters, options) if err != nil { return APIIssueAttachmentClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueAttachmentClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return APIIssueAttachmentClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APIIssueAttachmentClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -105,13 +107,16 @@ func (client *APIIssueAttachmentClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -129,8 +134,8 @@ func (client *APIIssueAttachmentClient) createOrUpdateHandleResponse(resp *http. // Delete - Deletes the specified comment from an Issue. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. @@ -140,22 +145,28 @@ func (client *APIIssueAttachmentClient) createOrUpdateHandleResponse(resp *http. // - options - APIIssueAttachmentClientDeleteOptions contains the optional parameters for the APIIssueAttachmentClient.Delete // method. func (client *APIIssueAttachmentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, ifMatch string, options *APIIssueAttachmentClientDeleteOptions) (APIIssueAttachmentClientDeleteResponse, error) { + var err error + const operationName = "APIIssueAttachmentClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, attachmentID, ifMatch, options) if err != nil { return APIIssueAttachmentClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueAttachmentClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APIIssueAttachmentClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APIIssueAttachmentClientDeleteResponse{}, err } return APIIssueAttachmentClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *APIIssueAttachmentClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, ifMatch string, options *APIIssueAttachmentClientDeleteOptions) (*policy.Request, error) { +func (client *APIIssueAttachmentClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, ifMatch string, _ *APIIssueAttachmentClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -186,40 +197,47 @@ func (client *APIIssueAttachmentClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the issue Attachment for an API specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. // - attachmentID - Attachment identifier within an Issue. Must be unique in the current Issue. // - options - APIIssueAttachmentClientGetOptions contains the optional parameters for the APIIssueAttachmentClient.Get method. func (client *APIIssueAttachmentClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, options *APIIssueAttachmentClientGetOptions) (APIIssueAttachmentClientGetResponse, error) { + var err error + const operationName = "APIIssueAttachmentClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, attachmentID, options) if err != nil { return APIIssueAttachmentClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueAttachmentClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIIssueAttachmentClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIIssueAttachmentClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *APIIssueAttachmentClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, options *APIIssueAttachmentClientGetOptions) (*policy.Request, error) { +func (client *APIIssueAttachmentClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, _ *APIIssueAttachmentClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -250,7 +268,7 @@ func (client *APIIssueAttachmentClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -270,8 +288,8 @@ func (client *APIIssueAttachmentClient) getHandleResponse(resp *http.Response) ( // GetEntityTag - Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. @@ -279,22 +297,29 @@ func (client *APIIssueAttachmentClient) getHandleResponse(resp *http.Response) ( // - options - APIIssueAttachmentClientGetEntityTagOptions contains the optional parameters for the APIIssueAttachmentClient.GetEntityTag // method. func (client *APIIssueAttachmentClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, options *APIIssueAttachmentClientGetEntityTagOptions) (APIIssueAttachmentClientGetEntityTagResponse, error) { + var err error + const operationName = "APIIssueAttachmentClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, attachmentID, options) if err != nil { return APIIssueAttachmentClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueAttachmentClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIIssueAttachmentClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIIssueAttachmentClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APIIssueAttachmentClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, options *APIIssueAttachmentClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APIIssueAttachmentClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, attachmentID string, _ *APIIssueAttachmentClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -325,7 +350,7 @@ func (client *APIIssueAttachmentClient) getEntityTagCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -333,18 +358,17 @@ func (client *APIIssueAttachmentClient) getEntityTagCreateRequest(ctx context.Co // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APIIssueAttachmentClient) getEntityTagHandleResponse(resp *http.Response) (APIIssueAttachmentClientGetEntityTagResponse, error) { - result := APIIssueAttachmentClientGetEntityTagResponse{} + result := APIIssueAttachmentClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists all attachments for the Issue associated with the specified API. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. @@ -356,25 +380,20 @@ func (client *APIIssueAttachmentClient) NewListByServicePager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APIIssueAttachmentClientListByServiceResponse) (APIIssueAttachmentClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIIssueAttachmentClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIIssueAttachmentClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, options) + }, nil) if err != nil { return APIIssueAttachmentClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIIssueAttachmentClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -409,13 +428,13 @@ func (client *APIIssueAttachmentClient) listByServiceCreateRequest(ctx context.C if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiissuecomment_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiissuecomment_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiissuecomment_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiissuecomment_client.go index 5f0bad8b..8d03287c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiissuecomment_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiissuecomment_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APIIssueCommentClient struct { } // NewAPIIssueCommentClient creates a new instance of APIIssueCommentClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIIssueCommentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIIssueCommentClient, error) { - cl, err := arm.NewClient(moduleName+".APIIssueCommentClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewAPIIssueCommentClient(subscriptionID string, credential azcore.TokenCred // CreateOrUpdate - Creates a new Comment for the Issue in an API or updates an existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. @@ -59,18 +54,25 @@ func NewAPIIssueCommentClient(subscriptionID string, credential azcore.TokenCred // - options - APIIssueCommentClientCreateOrUpdateOptions contains the optional parameters for the APIIssueCommentClient.CreateOrUpdate // method. func (client *APIIssueCommentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, parameters IssueCommentContract, options *APIIssueCommentClientCreateOrUpdateOptions) (APIIssueCommentClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APIIssueCommentClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, commentID, parameters, options) if err != nil { return APIIssueCommentClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueCommentClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return APIIssueCommentClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APIIssueCommentClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -105,13 +107,16 @@ func (client *APIIssueCommentClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -129,8 +134,8 @@ func (client *APIIssueCommentClient) createOrUpdateHandleResponse(resp *http.Res // Delete - Deletes the specified comment from an Issue. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. @@ -139,22 +144,28 @@ func (client *APIIssueCommentClient) createOrUpdateHandleResponse(resp *http.Res // it should be * for unconditional update. // - options - APIIssueCommentClientDeleteOptions contains the optional parameters for the APIIssueCommentClient.Delete method. func (client *APIIssueCommentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, ifMatch string, options *APIIssueCommentClientDeleteOptions) (APIIssueCommentClientDeleteResponse, error) { + var err error + const operationName = "APIIssueCommentClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, commentID, ifMatch, options) if err != nil { return APIIssueCommentClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueCommentClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APIIssueCommentClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APIIssueCommentClientDeleteResponse{}, err } return APIIssueCommentClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *APIIssueCommentClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, ifMatch string, options *APIIssueCommentClientDeleteOptions) (*policy.Request, error) { +func (client *APIIssueCommentClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, ifMatch string, _ *APIIssueCommentClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -185,40 +196,47 @@ func (client *APIIssueCommentClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the issue Comment for an API specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. // - commentID - Comment identifier within an Issue. Must be unique in the current Issue. // - options - APIIssueCommentClientGetOptions contains the optional parameters for the APIIssueCommentClient.Get method. func (client *APIIssueCommentClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, options *APIIssueCommentClientGetOptions) (APIIssueCommentClientGetResponse, error) { + var err error + const operationName = "APIIssueCommentClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, commentID, options) if err != nil { return APIIssueCommentClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueCommentClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIIssueCommentClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIIssueCommentClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *APIIssueCommentClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, options *APIIssueCommentClientGetOptions) (*policy.Request, error) { +func (client *APIIssueCommentClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, _ *APIIssueCommentClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -249,7 +267,7 @@ func (client *APIIssueCommentClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,8 +287,8 @@ func (client *APIIssueCommentClient) getHandleResponse(resp *http.Response) (API // GetEntityTag - Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. @@ -278,22 +296,29 @@ func (client *APIIssueCommentClient) getHandleResponse(resp *http.Response) (API // - options - APIIssueCommentClientGetEntityTagOptions contains the optional parameters for the APIIssueCommentClient.GetEntityTag // method. func (client *APIIssueCommentClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, options *APIIssueCommentClientGetEntityTagOptions) (APIIssueCommentClientGetEntityTagResponse, error) { + var err error + const operationName = "APIIssueCommentClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, commentID, options) if err != nil { return APIIssueCommentClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIIssueCommentClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIIssueCommentClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIIssueCommentClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APIIssueCommentClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, options *APIIssueCommentClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APIIssueCommentClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, issueID string, commentID string, _ *APIIssueCommentClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -324,7 +349,7 @@ func (client *APIIssueCommentClient) getEntityTagCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -332,18 +357,17 @@ func (client *APIIssueCommentClient) getEntityTagCreateRequest(ctx context.Conte // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APIIssueCommentClient) getEntityTagHandleResponse(resp *http.Response) (APIIssueCommentClientGetEntityTagResponse, error) { - result := APIIssueCommentClientGetEntityTagResponse{} + result := APIIssueCommentClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists all comments for the Issue associated with the specified API. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - issueID - Issue identifier. Must be unique in the current API Management service instance. @@ -355,25 +379,20 @@ func (client *APIIssueCommentClient) NewListByServicePager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APIIssueCommentClientListByServiceResponse) (APIIssueCommentClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIIssueCommentClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIIssueCommentClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, issueID, options) + }, nil) if err != nil { return APIIssueCommentClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIIssueCommentClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -408,13 +427,13 @@ func (client *APIIssueCommentClient) listByServiceCreateRequest(ctx context.Cont if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apioperation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apioperation_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apioperation_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apioperation_client.go index f5558cd5..c3e76b8c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apioperation_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apioperation_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APIOperationClient struct { } // NewAPIOperationClient creates a new instance of APIOperationClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIOperationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIOperationClient, error) { - cl, err := arm.NewClient(moduleName+".APIOperationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewAPIOperationClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Creates a new operation in the API or updates an existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -59,18 +54,25 @@ func NewAPIOperationClient(subscriptionID string, credential azcore.TokenCredent // - options - APIOperationClientCreateOrUpdateOptions contains the optional parameters for the APIOperationClient.CreateOrUpdate // method. func (client *APIOperationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, parameters OperationContract, options *APIOperationClientCreateOrUpdateOptions) (APIOperationClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APIOperationClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, parameters, options) if err != nil { return APIOperationClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIOperationClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return APIOperationClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APIOperationClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -101,13 +103,16 @@ func (client *APIOperationClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -125,8 +130,8 @@ func (client *APIOperationClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Deletes the specified operation in the API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -135,22 +140,28 @@ func (client *APIOperationClient) createOrUpdateHandleResponse(resp *http.Respon // it should be * for unconditional update. // - options - APIOperationClientDeleteOptions contains the optional parameters for the APIOperationClient.Delete method. func (client *APIOperationClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, ifMatch string, options *APIOperationClientDeleteOptions) (APIOperationClientDeleteResponse, error) { + var err error + const operationName = "APIOperationClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, ifMatch, options) if err != nil { return APIOperationClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIOperationClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APIOperationClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APIOperationClientDeleteResponse{}, err } return APIOperationClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *APIOperationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, ifMatch string, options *APIOperationClientDeleteOptions) (*policy.Request, error) { +func (client *APIOperationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, ifMatch string, _ *APIOperationClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -177,40 +188,47 @@ func (client *APIOperationClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the API Operation specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. // - options - APIOperationClientGetOptions contains the optional parameters for the APIOperationClient.Get method. func (client *APIOperationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, options *APIOperationClientGetOptions) (APIOperationClientGetResponse, error) { + var err error + const operationName = "APIOperationClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, options) if err != nil { return APIOperationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIOperationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIOperationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIOperationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *APIOperationClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, options *APIOperationClientGetOptions) (*policy.Request, error) { +func (client *APIOperationClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, _ *APIOperationClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -237,7 +255,7 @@ func (client *APIOperationClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,8 +275,8 @@ func (client *APIOperationClient) getHandleResponse(resp *http.Response) (APIOpe // GetEntityTag - Gets the entity state (Etag) version of the API operation specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -266,22 +284,29 @@ func (client *APIOperationClient) getHandleResponse(resp *http.Response) (APIOpe // - options - APIOperationClientGetEntityTagOptions contains the optional parameters for the APIOperationClient.GetEntityTag // method. func (client *APIOperationClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, options *APIOperationClientGetEntityTagOptions) (APIOperationClientGetEntityTagResponse, error) { + var err error + const operationName = "APIOperationClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, options) if err != nil { return APIOperationClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIOperationClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIOperationClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIOperationClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APIOperationClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, options *APIOperationClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APIOperationClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, _ *APIOperationClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -308,7 +333,7 @@ func (client *APIOperationClient) getEntityTagCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -316,18 +341,17 @@ func (client *APIOperationClient) getEntityTagCreateRequest(ctx context.Context, // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APIOperationClient) getEntityTagHandleResponse(resp *http.Response) (APIOperationClientGetEntityTagResponse, error) { - result := APIOperationClientGetEntityTagResponse{} + result := APIOperationClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByAPIPager - Lists a collection of the operations for the specified API. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -339,25 +363,20 @@ func (client *APIOperationClient) NewListByAPIPager(resourceGroupName string, se return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APIOperationClientListByAPIResponse) (APIOperationClientListByAPIResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIOperationClientListByAPIResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIOperationClient.NewListByAPIPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) if err != nil { return APIOperationClientListByAPIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIOperationClientListByAPIResponse{}, runtime.NewResponseError(resp) - } return client.listByAPIHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -388,16 +407,16 @@ func (client *APIOperationClient) listByAPICreateRequest(ctx context.Context, re if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") if options != nil && options.Tags != nil { reqQP.Set("tags", *options.Tags) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -415,8 +434,8 @@ func (client *APIOperationClient) listByAPIHandleResponse(resp *http.Response) ( // Update - Updates the details of the operation in the API specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -426,22 +445,29 @@ func (client *APIOperationClient) listByAPIHandleResponse(resp *http.Response) ( // - parameters - API Operation Update parameters. // - options - APIOperationClientUpdateOptions contains the optional parameters for the APIOperationClient.Update method. func (client *APIOperationClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, ifMatch string, parameters OperationUpdateContract, options *APIOperationClientUpdateOptions) (APIOperationClientUpdateResponse, error) { + var err error + const operationName = "APIOperationClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, ifMatch, parameters, options) if err != nil { return APIOperationClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIOperationClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIOperationClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIOperationClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *APIOperationClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, ifMatch string, parameters OperationUpdateContract, options *APIOperationClientUpdateOptions) (*policy.Request, error) { +func (client *APIOperationClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, ifMatch string, parameters OperationUpdateContract, _ *APIOperationClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -468,11 +494,14 @@ func (client *APIOperationClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apioperationpolicy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apioperationpolicy_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apioperationpolicy_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apioperationpolicy_client.go index bb0e0632..3440cff3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apioperationpolicy_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apioperationpolicy_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type APIOperationPolicyClient struct { } // NewAPIOperationPolicyClient creates a new instance of APIOperationPolicyClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIOperationPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIOperationPolicyClient, error) { - cl, err := arm.NewClient(moduleName+".APIOperationPolicyClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewAPIOperationPolicyClient(subscriptionID string, credential azcore.TokenC // CreateOrUpdate - Creates or updates policy configuration for the API Operation level. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -59,18 +54,25 @@ func NewAPIOperationPolicyClient(subscriptionID string, credential azcore.TokenC // - options - APIOperationPolicyClientCreateOrUpdateOptions contains the optional parameters for the APIOperationPolicyClient.CreateOrUpdate // method. func (client *APIOperationPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, parameters PolicyContract, options *APIOperationPolicyClientCreateOrUpdateOptions) (APIOperationPolicyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APIOperationPolicyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, policyID, parameters, options) if err != nil { return APIOperationPolicyClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIOperationPolicyClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return APIOperationPolicyClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APIOperationPolicyClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -105,13 +107,16 @@ func (client *APIOperationPolicyClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -129,8 +134,8 @@ func (client *APIOperationPolicyClient) createOrUpdateHandleResponse(resp *http. // Delete - Deletes the policy configuration at the Api Operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -141,22 +146,28 @@ func (client *APIOperationPolicyClient) createOrUpdateHandleResponse(resp *http. // - options - APIOperationPolicyClientDeleteOptions contains the optional parameters for the APIOperationPolicyClient.Delete // method. func (client *APIOperationPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, ifMatch string, options *APIOperationPolicyClientDeleteOptions) (APIOperationPolicyClientDeleteResponse, error) { + var err error + const operationName = "APIOperationPolicyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, policyID, ifMatch, options) if err != nil { return APIOperationPolicyClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIOperationPolicyClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APIOperationPolicyClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APIOperationPolicyClientDeleteResponse{}, err } return APIOperationPolicyClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *APIOperationPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, ifMatch string, options *APIOperationPolicyClientDeleteOptions) (*policy.Request, error) { +func (client *APIOperationPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, ifMatch string, _ *APIOperationPolicyClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -187,18 +198,18 @@ func (client *APIOperationPolicyClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Get the policy configuration at the API Operation level. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -206,18 +217,25 @@ func (client *APIOperationPolicyClient) deleteCreateRequest(ctx context.Context, // - policyID - The identifier of the Policy. // - options - APIOperationPolicyClientGetOptions contains the optional parameters for the APIOperationPolicyClient.Get method. func (client *APIOperationPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, options *APIOperationPolicyClientGetOptions) (APIOperationPolicyClientGetResponse, error) { + var err error + const operationName = "APIOperationPolicyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, policyID, options) if err != nil { return APIOperationPolicyClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIOperationPolicyClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIOperationPolicyClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIOperationPolicyClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -252,10 +270,10 @@ func (client *APIOperationPolicyClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") if options != nil && options.Format != nil { reqQP.Set("format", string(*options.Format)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -275,8 +293,8 @@ func (client *APIOperationPolicyClient) getHandleResponse(resp *http.Response) ( // GetEntityTag - Gets the entity state (Etag) version of the API operation policy specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -285,22 +303,29 @@ func (client *APIOperationPolicyClient) getHandleResponse(resp *http.Response) ( // - options - APIOperationPolicyClientGetEntityTagOptions contains the optional parameters for the APIOperationPolicyClient.GetEntityTag // method. func (client *APIOperationPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, options *APIOperationPolicyClientGetEntityTagOptions) (APIOperationPolicyClientGetEntityTagResponse, error) { + var err error + const operationName = "APIOperationPolicyClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, policyID, options) if err != nil { return APIOperationPolicyClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIOperationPolicyClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIOperationPolicyClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIOperationPolicyClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APIOperationPolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, options *APIOperationPolicyClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APIOperationPolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, policyID PolicyIDName, _ *APIOperationPolicyClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -331,7 +356,7 @@ func (client *APIOperationPolicyClient) getEntityTagCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -339,19 +364,18 @@ func (client *APIOperationPolicyClient) getEntityTagCreateRequest(ctx context.Co // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APIOperationPolicyClient) getEntityTagHandleResponse(resp *http.Response) (APIOperationPolicyClientGetEntityTagResponse, error) { - result := APIOperationPolicyClientGetEntityTagResponse{} + result := APIOperationPolicyClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // ListByOperation - Get the list of policy configuration at the API Operation level. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -359,22 +383,29 @@ func (client *APIOperationPolicyClient) getEntityTagHandleResponse(resp *http.Re // - options - APIOperationPolicyClientListByOperationOptions contains the optional parameters for the APIOperationPolicyClient.ListByOperation // method. func (client *APIOperationPolicyClient) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, options *APIOperationPolicyClientListByOperationOptions) (APIOperationPolicyClientListByOperationResponse, error) { + var err error + const operationName = "APIOperationPolicyClient.ListByOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByOperationCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, options) if err != nil { return APIOperationPolicyClientListByOperationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIOperationPolicyClientListByOperationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIOperationPolicyClientListByOperationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIOperationPolicyClientListByOperationResponse{}, err } - return client.listByOperationHandleResponse(resp) + resp, err := client.listByOperationHandleResponse(httpResp) + return resp, err } // listByOperationCreateRequest creates the ListByOperation request. -func (client *APIOperationPolicyClient) listByOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, options *APIOperationPolicyClientListByOperationOptions) (*policy.Request, error) { +func (client *APIOperationPolicyClient) listByOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, _ *APIOperationPolicyClientListByOperationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -401,7 +432,7 @@ func (client *APIOperationPolicyClient) listByOperationCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apipolicy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apipolicy_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apipolicy_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apipolicy_client.go index 888960d0..8bd514b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apipolicy_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apipolicy_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type APIPolicyClient struct { } // NewAPIPolicyClient creates a new instance of APIPolicyClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIPolicyClient, error) { - cl, err := arm.NewClient(moduleName+".APIPolicyClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewAPIPolicyClient(subscriptionID string, credential azcore.TokenCredential // CreateOrUpdate - Creates or updates policy configuration for the API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -58,18 +53,25 @@ func NewAPIPolicyClient(subscriptionID string, credential azcore.TokenCredential // - options - APIPolicyClientCreateOrUpdateOptions contains the optional parameters for the APIPolicyClient.CreateOrUpdate // method. func (client *APIPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, parameters PolicyContract, options *APIPolicyClientCreateOrUpdateOptions) (APIPolicyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APIPolicyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, policyID, parameters, options) if err != nil { return APIPolicyClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIPolicyClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return APIPolicyClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APIPolicyClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -100,13 +102,16 @@ func (client *APIPolicyClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,8 +129,8 @@ func (client *APIPolicyClient) createOrUpdateHandleResponse(resp *http.Response) // Delete - Deletes the policy configuration at the Api. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -134,22 +139,28 @@ func (client *APIPolicyClient) createOrUpdateHandleResponse(resp *http.Response) // it should be * for unconditional update. // - options - APIPolicyClientDeleteOptions contains the optional parameters for the APIPolicyClient.Delete method. func (client *APIPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, ifMatch string, options *APIPolicyClientDeleteOptions) (APIPolicyClientDeleteResponse, error) { + var err error + const operationName = "APIPolicyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, policyID, ifMatch, options) if err != nil { return APIPolicyClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIPolicyClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APIPolicyClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APIPolicyClientDeleteResponse{}, err } return APIPolicyClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *APIPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, ifMatch string, options *APIPolicyClientDeleteOptions) (*policy.Request, error) { +func (client *APIPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, ifMatch string, _ *APIPolicyClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -176,36 +187,43 @@ func (client *APIPolicyClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Get the policy configuration at the API level. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - policyID - The identifier of the Policy. // - options - APIPolicyClientGetOptions contains the optional parameters for the APIPolicyClient.Get method. func (client *APIPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, options *APIPolicyClientGetOptions) (APIPolicyClientGetResponse, error) { + var err error + const operationName = "APIPolicyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, policyID, options) if err != nil { return APIPolicyClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIPolicyClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusOK) { - return APIPolicyClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIPolicyClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -236,10 +254,10 @@ func (client *APIPolicyClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") if options != nil && options.Format != nil { reqQP.Set("format", string(*options.Format)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml"} return req, nil @@ -259,30 +277,37 @@ func (client *APIPolicyClient) getHandleResponse(resp *http.Response) (APIPolicy // GetEntityTag - Gets the entity state (Etag) version of the API policy specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - policyID - The identifier of the Policy. // - options - APIPolicyClientGetEntityTagOptions contains the optional parameters for the APIPolicyClient.GetEntityTag method. func (client *APIPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, options *APIPolicyClientGetEntityTagOptions) (APIPolicyClientGetEntityTagResponse, error) { + var err error + const operationName = "APIPolicyClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, policyID, options) if err != nil { return APIPolicyClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIPolicyClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPolicyClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIPolicyClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APIPolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, options *APIPolicyClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APIPolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, policyID PolicyIDName, _ *APIPolicyClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -309,7 +334,7 @@ func (client *APIPolicyClient) getEntityTagCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,40 +342,46 @@ func (client *APIPolicyClient) getEntityTagCreateRequest(ctx context.Context, re // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APIPolicyClient) getEntityTagHandleResponse(resp *http.Response) (APIPolicyClientGetEntityTagResponse, error) { - result := APIPolicyClientGetEntityTagResponse{} + result := APIPolicyClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // ListByAPI - Get the policy configuration at the API level. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - options - APIPolicyClientListByAPIOptions contains the optional parameters for the APIPolicyClient.ListByAPI method. func (client *APIPolicyClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIPolicyClientListByAPIOptions) (APIPolicyClientListByAPIResponse, error) { + var err error + const operationName = "APIPolicyClient.ListByAPI" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, options) if err != nil { return APIPolicyClientListByAPIResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIPolicyClientListByAPIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPolicyClientListByAPIResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIPolicyClientListByAPIResponse{}, err } - return client.listByAPIHandleResponse(resp) + resp, err := client.listByAPIHandleResponse(httpResp) + return resp, err } // listByAPICreateRequest creates the ListByAPI request. -func (client *APIPolicyClient) listByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIPolicyClientListByAPIOptions) (*policy.Request, error) { +func (client *APIPolicyClient) listByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, _ *APIPolicyClientListByAPIOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -373,7 +404,7 @@ func (client *APIPolicyClient) listByAPICreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiproduct_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiproduct_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiproduct_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiproduct_client.go index d4803af9..a9a70d5d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiproduct_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiproduct_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APIProductClient struct { } // NewAPIProductClient creates a new instance of APIProductClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIProductClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIProductClient, error) { - cl, err := arm.NewClient(moduleName+".APIProductClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewAPIProductClient(subscriptionID string, credential azcore.TokenCredentia // NewListByApisPager - Lists all Products, which the API is part of. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - options - APIProductClientListByApisOptions contains the optional parameters for the APIProductClient.NewListByApisPager @@ -60,25 +55,20 @@ func (client *APIProductClient) NewListByApisPager(resourceGroupName string, ser return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APIProductClientListByApisResponse) (APIProductClientListByApisResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByApisCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIProductClientListByApisResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIProductClient.NewListByApisPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByApisCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) if err != nil { return APIProductClientListByApisResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIProductClientListByApisResponse{}, runtime.NewResponseError(resp) - } return client.listByApisHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -109,13 +99,13 @@ func (client *APIProductClient) listByApisCreateRequest(ctx context.Context, res if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apirelease_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apirelease_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apirelease_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apirelease_client.go index 4883f1b1..bd4ad456 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apirelease_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apirelease_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APIReleaseClient struct { } // NewAPIReleaseClient creates a new instance of APIReleaseClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIReleaseClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIReleaseClient, error) { - cl, err := arm.NewClient(moduleName+".APIReleaseClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewAPIReleaseClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Creates a new Release for the API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - releaseID - Release identifier within an API. Must be unique in the current API Management service instance. @@ -58,18 +53,25 @@ func NewAPIReleaseClient(subscriptionID string, credential azcore.TokenCredentia // - options - APIReleaseClientCreateOrUpdateOptions contains the optional parameters for the APIReleaseClient.CreateOrUpdate // method. func (client *APIReleaseClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, parameters APIReleaseContract, options *APIReleaseClientCreateOrUpdateOptions) (APIReleaseClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APIReleaseClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, releaseID, parameters, options) if err != nil { return APIReleaseClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIReleaseClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return APIReleaseClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APIReleaseClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -100,13 +102,16 @@ func (client *APIReleaseClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,8 +129,8 @@ func (client *APIReleaseClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Deletes the specified release in the API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - releaseID - Release identifier within an API. Must be unique in the current API Management service instance. @@ -133,22 +138,28 @@ func (client *APIReleaseClient) createOrUpdateHandleResponse(resp *http.Response // it should be * for unconditional update. // - options - APIReleaseClientDeleteOptions contains the optional parameters for the APIReleaseClient.Delete method. func (client *APIReleaseClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, ifMatch string, options *APIReleaseClientDeleteOptions) (APIReleaseClientDeleteResponse, error) { + var err error + const operationName = "APIReleaseClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, releaseID, ifMatch, options) if err != nil { return APIReleaseClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIReleaseClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APIReleaseClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APIReleaseClientDeleteResponse{}, err } return APIReleaseClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *APIReleaseClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, ifMatch string, options *APIReleaseClientDeleteOptions) (*policy.Request, error) { +func (client *APIReleaseClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, ifMatch string, _ *APIReleaseClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -175,39 +186,46 @@ func (client *APIReleaseClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Returns the details of an API release. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - releaseID - Release identifier within an API. Must be unique in the current API Management service instance. // - options - APIReleaseClientGetOptions contains the optional parameters for the APIReleaseClient.Get method. func (client *APIReleaseClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, options *APIReleaseClientGetOptions) (APIReleaseClientGetResponse, error) { + var err error + const operationName = "APIReleaseClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, releaseID, options) if err != nil { return APIReleaseClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIReleaseClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIReleaseClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIReleaseClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *APIReleaseClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, options *APIReleaseClientGetOptions) (*policy.Request, error) { +func (client *APIReleaseClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, _ *APIReleaseClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -234,7 +252,7 @@ func (client *APIReleaseClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,29 +272,36 @@ func (client *APIReleaseClient) getHandleResponse(resp *http.Response) (APIRelea // GetEntityTag - Returns the etag of an API release. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - releaseID - Release identifier within an API. Must be unique in the current API Management service instance. // - options - APIReleaseClientGetEntityTagOptions contains the optional parameters for the APIReleaseClient.GetEntityTag method. func (client *APIReleaseClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, options *APIReleaseClientGetEntityTagOptions) (APIReleaseClientGetEntityTagResponse, error) { + var err error + const operationName = "APIReleaseClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, releaseID, options) if err != nil { return APIReleaseClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIReleaseClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIReleaseClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIReleaseClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APIReleaseClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, options *APIReleaseClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APIReleaseClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, _ *APIReleaseClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -303,7 +328,7 @@ func (client *APIReleaseClient) getEntityTagCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,11 +336,10 @@ func (client *APIReleaseClient) getEntityTagCreateRequest(ctx context.Context, r // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APIReleaseClient) getEntityTagHandleResponse(resp *http.Response) (APIReleaseClientGetEntityTagResponse, error) { - result := APIReleaseClientGetEntityTagResponse{} + result := APIReleaseClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } @@ -323,8 +347,8 @@ func (client *APIReleaseClient) getEntityTagHandleResponse(resp *http.Response) // are also used to rollback to previous revisions. Results will be paged and can be constrained by // the $top and $skip parameters. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - options - APIReleaseClientListByServiceOptions contains the optional parameters for the APIReleaseClient.NewListByServicePager @@ -335,25 +359,20 @@ func (client *APIReleaseClient) NewListByServicePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APIReleaseClientListByServiceResponse) (APIReleaseClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIReleaseClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIReleaseClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) if err != nil { return APIReleaseClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIReleaseClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -384,13 +403,13 @@ func (client *APIReleaseClient) listByServiceCreateRequest(ctx context.Context, if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -408,8 +427,8 @@ func (client *APIReleaseClient) listByServiceHandleResponse(resp *http.Response) // Update - Updates the details of the release of the API specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - releaseID - Release identifier within an API. Must be unique in the current API Management service instance. @@ -418,22 +437,29 @@ func (client *APIReleaseClient) listByServiceHandleResponse(resp *http.Response) // - parameters - API Release Update parameters. // - options - APIReleaseClientUpdateOptions contains the optional parameters for the APIReleaseClient.Update method. func (client *APIReleaseClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, ifMatch string, parameters APIReleaseContract, options *APIReleaseClientUpdateOptions) (APIReleaseClientUpdateResponse, error) { + var err error + const operationName = "APIReleaseClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, apiID, releaseID, ifMatch, parameters, options) if err != nil { return APIReleaseClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIReleaseClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIReleaseClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIReleaseClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *APIReleaseClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, ifMatch string, parameters APIReleaseContract, options *APIReleaseClientUpdateOptions) (*policy.Request, error) { +func (client *APIReleaseClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, releaseID string, ifMatch string, parameters APIReleaseContract, _ *APIReleaseClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -460,11 +486,14 @@ func (client *APIReleaseClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apirevision_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apirevision_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apirevision_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apirevision_client.go index bf57ea25..0f14446a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apirevision_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apirevision_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APIRevisionClient struct { } // NewAPIRevisionClient creates a new instance of APIRevisionClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIRevisionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIRevisionClient, error) { - cl, err := arm.NewClient(moduleName+".APIRevisionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewAPIRevisionClient(subscriptionID string, credential azcore.TokenCredenti // NewListByServicePager - Lists all revisions of an API. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API identifier. Must be unique in the current API Management service instance. // - options - APIRevisionClientListByServiceOptions contains the optional parameters for the APIRevisionClient.NewListByServicePager @@ -60,25 +55,20 @@ func (client *APIRevisionClient) NewListByServicePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APIRevisionClientListByServiceResponse) (APIRevisionClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIRevisionClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIRevisionClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) if err != nil { return APIRevisionClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIRevisionClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -109,13 +99,13 @@ func (client *APIRevisionClient) listByServiceCreateRequest(ctx context.Context, if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apischema_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apischema_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apischema_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apischema_client.go index f6c887cc..6dca9a36 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apischema_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apischema_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APISchemaClient struct { } // NewAPISchemaClient creates a new instance of APISchemaClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPISchemaClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APISchemaClient, error) { - cl, err := arm.NewClient(moduleName+".APISchemaClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewAPISchemaClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Creates or updates schema configuration for the API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -64,31 +59,41 @@ func (client *APISchemaClient) BeginCreateOrUpdate(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APISchemaClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APISchemaClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[APISchemaClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APISchemaClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Creates or updates schema configuration for the API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 func (client *APISchemaClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, parameters SchemaContract, options *APISchemaClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "APISchemaClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, schemaID, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -119,20 +124,23 @@ func (client *APISchemaClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Delete - Deletes the schema configuration at the Api. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -141,16 +149,22 @@ func (client *APISchemaClient) createOrUpdateCreateRequest(ctx context.Context, // it should be * for unconditional update. // - options - APISchemaClientDeleteOptions contains the optional parameters for the APISchemaClient.Delete method. func (client *APISchemaClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, ifMatch string, options *APISchemaClientDeleteOptions) (APISchemaClientDeleteResponse, error) { + var err error + const operationName = "APISchemaClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, schemaID, ifMatch, options) if err != nil { return APISchemaClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APISchemaClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APISchemaClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APISchemaClientDeleteResponse{}, err } return APISchemaClientDeleteResponse{}, nil } @@ -183,43 +197,50 @@ func (client *APISchemaClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") if options != nil && options.Force != nil { reqQP.Set("force", strconv.FormatBool(*options.Force)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Get the schema configuration at the API level. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - schemaID - Schema id identifier. Must be unique in the current API Management service instance. // - options - APISchemaClientGetOptions contains the optional parameters for the APISchemaClient.Get method. func (client *APISchemaClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, options *APISchemaClientGetOptions) (APISchemaClientGetResponse, error) { + var err error + const operationName = "APISchemaClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, schemaID, options) if err != nil { return APISchemaClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APISchemaClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APISchemaClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APISchemaClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *APISchemaClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, options *APISchemaClientGetOptions) (*policy.Request, error) { +func (client *APISchemaClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, _ *APISchemaClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -246,7 +267,7 @@ func (client *APISchemaClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -266,30 +287,37 @@ func (client *APISchemaClient) getHandleResponse(resp *http.Response) (APISchema // GetEntityTag - Gets the entity state (Etag) version of the schema specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - schemaID - Schema id identifier. Must be unique in the current API Management service instance. // - options - APISchemaClientGetEntityTagOptions contains the optional parameters for the APISchemaClient.GetEntityTag method. func (client *APISchemaClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, options *APISchemaClientGetEntityTagOptions) (APISchemaClientGetEntityTagResponse, error) { + var err error + const operationName = "APISchemaClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, schemaID, options) if err != nil { return APISchemaClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APISchemaClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APISchemaClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APISchemaClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APISchemaClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, options *APISchemaClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APISchemaClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, schemaID string, _ *APISchemaClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -316,7 +344,7 @@ func (client *APISchemaClient) getEntityTagCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -324,18 +352,17 @@ func (client *APISchemaClient) getEntityTagCreateRequest(ctx context.Context, re // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APISchemaClient) getEntityTagHandleResponse(resp *http.Response) (APISchemaClientGetEntityTagResponse, error) { - result := APISchemaClientGetEntityTagResponse{} + result := APISchemaClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByAPIPager - Get the schema configuration at the API level. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -346,25 +373,20 @@ func (client *APISchemaClient) NewListByAPIPager(resourceGroupName string, servi return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APISchemaClientListByAPIResponse) (APISchemaClientListByAPIResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APISchemaClientListByAPIResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APISchemaClient.NewListByAPIPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) if err != nil { return APISchemaClientListByAPIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APISchemaClientListByAPIResponse{}, runtime.NewResponseError(resp) - } return client.listByAPIHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -395,13 +417,13 @@ func (client *APISchemaClient) listByAPICreateRequest(ctx context.Context, resou if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apitagdescription_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apitagdescription_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apitagdescription_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apitagdescription_client.go index 862770e2..dcabcbc7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apitagdescription_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apitagdescription_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APITagDescriptionClient struct { } // NewAPITagDescriptionClient creates a new instance of APITagDescriptionClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPITagDescriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APITagDescriptionClient, error) { - cl, err := arm.NewClient(moduleName+".APITagDescriptionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewAPITagDescriptionClient(subscriptionID string, credential azcore.TokenCr // CreateOrUpdate - Create/Update tag description in scope of the Api. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -60,18 +55,25 @@ func NewAPITagDescriptionClient(subscriptionID string, credential azcore.TokenCr // - options - APITagDescriptionClientCreateOrUpdateOptions contains the optional parameters for the APITagDescriptionClient.CreateOrUpdate // method. func (client *APITagDescriptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, parameters TagDescriptionCreateParameters, options *APITagDescriptionClientCreateOrUpdateOptions) (APITagDescriptionClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APITagDescriptionClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, tagDescriptionID, parameters, options) if err != nil { return APITagDescriptionClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APITagDescriptionClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return APITagDescriptionClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APITagDescriptionClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -102,13 +104,16 @@ func (client *APITagDescriptionClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -126,8 +131,8 @@ func (client *APITagDescriptionClient) createOrUpdateHandleResponse(resp *http.R // Delete - Delete tag description for the Api. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -138,22 +143,28 @@ func (client *APITagDescriptionClient) createOrUpdateHandleResponse(resp *http.R // - options - APITagDescriptionClientDeleteOptions contains the optional parameters for the APITagDescriptionClient.Delete // method. func (client *APITagDescriptionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, ifMatch string, options *APITagDescriptionClientDeleteOptions) (APITagDescriptionClientDeleteResponse, error) { + var err error + const operationName = "APITagDescriptionClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, tagDescriptionID, ifMatch, options) if err != nil { return APITagDescriptionClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APITagDescriptionClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APITagDescriptionClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APITagDescriptionClientDeleteResponse{}, err } return APITagDescriptionClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *APITagDescriptionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, ifMatch string, options *APITagDescriptionClientDeleteOptions) (*policy.Request, error) { +func (client *APITagDescriptionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, ifMatch string, _ *APITagDescriptionClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -180,18 +191,18 @@ func (client *APITagDescriptionClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Get Tag description in scope of API // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -199,22 +210,29 @@ func (client *APITagDescriptionClient) deleteCreateRequest(ctx context.Context, // and Tag names. // - options - APITagDescriptionClientGetOptions contains the optional parameters for the APITagDescriptionClient.Get method. func (client *APITagDescriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, options *APITagDescriptionClientGetOptions) (APITagDescriptionClientGetResponse, error) { + var err error + const operationName = "APITagDescriptionClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, tagDescriptionID, options) if err != nil { return APITagDescriptionClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APITagDescriptionClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APITagDescriptionClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APITagDescriptionClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *APITagDescriptionClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, options *APITagDescriptionClientGetOptions) (*policy.Request, error) { +func (client *APITagDescriptionClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, _ *APITagDescriptionClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -241,7 +259,7 @@ func (client *APITagDescriptionClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -261,8 +279,8 @@ func (client *APITagDescriptionClient) getHandleResponse(resp *http.Response) (A // GetEntityTag - Gets the entity state version of the tag specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -271,22 +289,29 @@ func (client *APITagDescriptionClient) getHandleResponse(resp *http.Response) (A // - options - APITagDescriptionClientGetEntityTagOptions contains the optional parameters for the APITagDescriptionClient.GetEntityTag // method. func (client *APITagDescriptionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, options *APITagDescriptionClientGetEntityTagOptions) (APITagDescriptionClientGetEntityTagResponse, error) { + var err error + const operationName = "APITagDescriptionClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, tagDescriptionID, options) if err != nil { return APITagDescriptionClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APITagDescriptionClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APITagDescriptionClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APITagDescriptionClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APITagDescriptionClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, options *APITagDescriptionClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APITagDescriptionClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagDescriptionID string, _ *APITagDescriptionClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -313,7 +338,7 @@ func (client *APITagDescriptionClient) getEntityTagCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -321,19 +346,18 @@ func (client *APITagDescriptionClient) getEntityTagCreateRequest(ctx context.Con // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APITagDescriptionClient) getEntityTagHandleResponse(resp *http.Response) (APITagDescriptionClientGetEntityTagResponse, error) { - result := APITagDescriptionClientGetEntityTagResponse{} + result := APITagDescriptionClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined // on API level but tag may be assigned to the Operations // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -345,25 +369,20 @@ func (client *APITagDescriptionClient) NewListByServicePager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APITagDescriptionClientListByServiceResponse) (APITagDescriptionClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APITagDescriptionClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APITagDescriptionClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) if err != nil { return APITagDescriptionClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APITagDescriptionClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -394,13 +413,13 @@ func (client *APITagDescriptionClient) listByServiceCreateRequest(ctx context.Co if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiversionset_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiversionset_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiversionset_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiversionset_client.go index a13705aa..f36b7c24 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/apiversionset_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiversionset_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type APIVersionSetClient struct { } // NewAPIVersionSetClient creates a new instance of APIVersionSetClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAPIVersionSetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIVersionSetClient, error) { - cl, err := arm.NewClient(moduleName+".APIVersionSetClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,26 +44,33 @@ func NewAPIVersionSetClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Creates or Updates a Api Version Set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance. // - parameters - Create or update parameters. // - options - APIVersionSetClientCreateOrUpdateOptions contains the optional parameters for the APIVersionSetClient.CreateOrUpdate // method. func (client *APIVersionSetClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, parameters APIVersionSetContract, options *APIVersionSetClientCreateOrUpdateOptions) (APIVersionSetClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APIVersionSetClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, versionSetID, parameters, options) if err != nil { return APIVersionSetClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIVersionSetClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return APIVersionSetClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APIVersionSetClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -95,13 +97,16 @@ func (client *APIVersionSetClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,30 +124,36 @@ func (client *APIVersionSetClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Deletes specific Api Version Set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - APIVersionSetClientDeleteOptions contains the optional parameters for the APIVersionSetClient.Delete method. func (client *APIVersionSetClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, ifMatch string, options *APIVersionSetClientDeleteOptions) (APIVersionSetClientDeleteResponse, error) { + var err error + const operationName = "APIVersionSetClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, versionSetID, ifMatch, options) if err != nil { return APIVersionSetClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIVersionSetClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return APIVersionSetClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APIVersionSetClientDeleteResponse{}, err } return APIVersionSetClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *APIVersionSetClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, ifMatch string, options *APIVersionSetClientDeleteOptions) (*policy.Request, error) { +func (client *APIVersionSetClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, ifMatch string, _ *APIVersionSetClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -165,38 +176,45 @@ func (client *APIVersionSetClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the Api Version Set specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance. // - options - APIVersionSetClientGetOptions contains the optional parameters for the APIVersionSetClient.Get method. func (client *APIVersionSetClient) Get(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, options *APIVersionSetClientGetOptions) (APIVersionSetClientGetResponse, error) { + var err error + const operationName = "APIVersionSetClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, versionSetID, options) if err != nil { return APIVersionSetClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIVersionSetClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIVersionSetClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIVersionSetClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *APIVersionSetClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, options *APIVersionSetClientGetOptions) (*policy.Request, error) { +func (client *APIVersionSetClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, _ *APIVersionSetClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -219,7 +237,7 @@ func (client *APIVersionSetClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -239,29 +257,36 @@ func (client *APIVersionSetClient) getHandleResponse(resp *http.Response) (APIVe // GetEntityTag - Gets the entity state (Etag) version of the Api Version Set specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance. // - options - APIVersionSetClientGetEntityTagOptions contains the optional parameters for the APIVersionSetClient.GetEntityTag // method. func (client *APIVersionSetClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, options *APIVersionSetClientGetEntityTagOptions) (APIVersionSetClientGetEntityTagResponse, error) { + var err error + const operationName = "APIVersionSetClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, versionSetID, options) if err != nil { return APIVersionSetClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIVersionSetClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIVersionSetClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIVersionSetClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *APIVersionSetClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, options *APIVersionSetClientGetEntityTagOptions) (*policy.Request, error) { +func (client *APIVersionSetClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, _ *APIVersionSetClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -284,7 +309,7 @@ func (client *APIVersionSetClient) getEntityTagCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -292,18 +317,17 @@ func (client *APIVersionSetClient) getEntityTagCreateRequest(ctx context.Context // getEntityTagHandleResponse handles the GetEntityTag response. func (client *APIVersionSetClient) getEntityTagHandleResponse(resp *http.Response) (APIVersionSetClientGetEntityTagResponse, error) { - result := APIVersionSetClientGetEntityTagResponse{} + result := APIVersionSetClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of API Version Sets in the specified service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - APIVersionSetClientListByServiceOptions contains the optional parameters for the APIVersionSetClient.NewListByServicePager // method. @@ -313,25 +337,20 @@ func (client *APIVersionSetClient) NewListByServicePager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *APIVersionSetClientListByServiceResponse) (APIVersionSetClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIVersionSetClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIVersionSetClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return APIVersionSetClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIVersionSetClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -358,13 +377,13 @@ func (client *APIVersionSetClient) listByServiceCreateRequest(ctx context.Contex if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -382,8 +401,8 @@ func (client *APIVersionSetClient) listByServiceHandleResponse(resp *http.Respon // Update - Updates the details of the Api VersionSet specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -391,22 +410,29 @@ func (client *APIVersionSetClient) listByServiceHandleResponse(resp *http.Respon // - parameters - Update parameters. // - options - APIVersionSetClientUpdateOptions contains the optional parameters for the APIVersionSetClient.Update method. func (client *APIVersionSetClient) Update(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, ifMatch string, parameters APIVersionSetUpdateParameters, options *APIVersionSetClientUpdateOptions) (APIVersionSetClientUpdateResponse, error) { + var err error + const operationName = "APIVersionSetClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, versionSetID, ifMatch, parameters, options) if err != nil { return APIVersionSetClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return APIVersionSetClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIVersionSetClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIVersionSetClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *APIVersionSetClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, ifMatch string, parameters APIVersionSetUpdateParameters, options *APIVersionSetClientUpdateOptions) (*policy.Request, error) { +func (client *APIVersionSetClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, ifMatch string, parameters APIVersionSetUpdateParameters, _ *APIVersionSetClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -429,11 +455,14 @@ func (client *APIVersionSetClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiwiki_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiwiki_client.go new file mode 100644 index 00000000..1e557678 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiwiki_client.go @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// APIWikiClient contains the methods for the APIWiki group. +// Don't use this type directly, use NewAPIWikiClient() instead. +type APIWikiClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAPIWikiClient creates a new instance of APIWikiClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAPIWikiClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIWikiClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &APIWikiClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates a new Wiki for an API or updates an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - APIWikiClientCreateOrUpdateOptions contains the optional parameters for the APIWikiClient.CreateOrUpdate method. +func (client *APIWikiClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters WikiContract, options *APIWikiClientCreateOrUpdateOptions) (APIWikiClientCreateOrUpdateResponse, error) { + var err error + const operationName = "APIWikiClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, parameters, options) + if err != nil { + return APIWikiClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIWikiClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return APIWikiClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *APIWikiClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, parameters WikiContract, options *APIWikiClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *APIWikiClient) createOrUpdateHandleResponse(resp *http.Response) (APIWikiClientCreateOrUpdateResponse, error) { + result := APIWikiClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.WikiContract); err != nil { + return APIWikiClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified Wiki from an API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - APIWikiClientDeleteOptions contains the optional parameters for the APIWikiClient.Delete method. +func (client *APIWikiClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, options *APIWikiClientDeleteOptions) (APIWikiClientDeleteResponse, error) { + var err error + const operationName = "APIWikiClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, ifMatch, options) + if err != nil { + return APIWikiClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIWikiClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return APIWikiClientDeleteResponse{}, err + } + return APIWikiClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *APIWikiClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, _ *APIWikiClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the Wiki for an API specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - options - APIWikiClientGetOptions contains the optional parameters for the APIWikiClient.Get method. +func (client *APIWikiClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIWikiClientGetOptions) (APIWikiClientGetResponse, error) { + var err error + const operationName = "APIWikiClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + if err != nil { + return APIWikiClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIWikiClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIWikiClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *APIWikiClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, _ *APIWikiClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *APIWikiClient) getHandleResponse(resp *http.Response) (APIWikiClientGetResponse, error) { + result := APIWikiClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.WikiContract); err != nil { + return APIWikiClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - options - APIWikiClientGetEntityTagOptions contains the optional parameters for the APIWikiClient.GetEntityTag method. +func (client *APIWikiClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIWikiClientGetEntityTagOptions) (APIWikiClientGetEntityTagResponse, error) { + var err error + const operationName = "APIWikiClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + if err != nil { + return APIWikiClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIWikiClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIWikiClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *APIWikiClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, _ *APIWikiClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *APIWikiClient) getEntityTagHandleResponse(resp *http.Response) (APIWikiClientGetEntityTagResponse, error) { + result := APIWikiClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// Update - Updates the details of the Wiki for an API specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Wiki Update parameters. +// - options - APIWikiClientUpdateOptions contains the optional parameters for the APIWikiClient.Update method. +func (client *APIWikiClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, parameters WikiUpdateContract, options *APIWikiClientUpdateOptions) (APIWikiClientUpdateResponse, error) { + var err error + const operationName = "APIWikiClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, apiID, ifMatch, parameters, options) + if err != nil { + return APIWikiClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIWikiClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIWikiClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *APIWikiClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, ifMatch string, parameters WikiUpdateContract, _ *APIWikiClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *APIWikiClient) updateHandleResponse(resp *http.Response) (APIWikiClientUpdateResponse, error) { + result := APIWikiClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.WikiContract); err != nil { + return APIWikiClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiwikis_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiwikis_client.go new file mode 100644 index 00000000..3e7318e5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/apiwikis_client.go @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// APIWikisClient contains the methods for the APIWikis group. +// Don't use this type directly, use NewAPIWikisClient() instead. +type APIWikisClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAPIWikisClient creates a new instance of APIWikisClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAPIWikisClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIWikisClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &APIWikisClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets the wikis for an API specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - options - APIWikisClientListOptions contains the optional parameters for the APIWikisClient.NewListPager method. +func (client *APIWikisClient) NewListPager(resourceGroupName string, serviceName string, apiID string, options *APIWikisClientListOptions) *runtime.Pager[APIWikisClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[APIWikisClientListResponse]{ + More: func(page APIWikisClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *APIWikisClientListResponse) (APIWikisClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIWikisClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) + if err != nil { + return APIWikisClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *APIWikisClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *APIWikisClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *APIWikisClient) listHandleResponse(resp *http.Response) (APIWikisClientListResponse, error) { + result := APIWikisClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WikiCollection); err != nil { + return APIWikisClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/assets.json new file mode 100644 index 00000000..bfe72cc9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/apimanagement/armapimanagement", + "Tag": "go/resourcemanager/apimanagement/armapimanagement_fb279aa03d" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorization_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorization_client.go new file mode 100644 index 00000000..7f68b098 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorization_client.go @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// AuthorizationClient contains the methods for the Authorization group. +// Don't use this type directly, use NewAuthorizationClient() instead. +type AuthorizationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAuthorizationClient creates a new instance of AuthorizationClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAuthorizationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AuthorizationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// ConfirmConsentCode - Confirm valid consent code to suppress Authorizations anti-phishing page. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - authorizationID - Identifier of the authorization. +// - parameters - Create parameters. +// - options - AuthorizationClientConfirmConsentCodeOptions contains the optional parameters for the AuthorizationClient.ConfirmConsentCode +// method. +func (client *AuthorizationClient) ConfirmConsentCode(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, parameters AuthorizationConfirmConsentCodeRequestContract, options *AuthorizationClientConfirmConsentCodeOptions) (AuthorizationClientConfirmConsentCodeResponse, error) { + var err error + const operationName = "AuthorizationClient.ConfirmConsentCode" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.confirmConsentCodeCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, authorizationID, parameters, options) + if err != nil { + return AuthorizationClientConfirmConsentCodeResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationClientConfirmConsentCodeResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AuthorizationClientConfirmConsentCodeResponse{}, err + } + resp, err := client.confirmConsentCodeHandleResponse(httpResp) + return resp, err +} + +// confirmConsentCodeCreateRequest creates the ConfirmConsentCode request. +func (client *AuthorizationClient) confirmConsentCodeCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, parameters AuthorizationConfirmConsentCodeRequestContract, _ *AuthorizationClientConfirmConsentCodeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if authorizationID == "" { + return nil, errors.New("parameter authorizationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationId}", url.PathEscape(authorizationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// confirmConsentCodeHandleResponse handles the ConfirmConsentCode response. +func (client *AuthorizationClient) confirmConsentCodeHandleResponse(resp *http.Response) (AuthorizationClientConfirmConsentCodeResponse, error) { + result := AuthorizationClientConfirmConsentCodeResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// CreateOrUpdate - Creates or updates authorization. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - authorizationID - Identifier of the authorization. +// - parameters - Create parameters. +// - options - AuthorizationClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationClient.CreateOrUpdate +// method. +func (client *AuthorizationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, parameters AuthorizationContract, options *AuthorizationClientCreateOrUpdateOptions) (AuthorizationClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AuthorizationClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, authorizationID, parameters, options) + if err != nil { + return AuthorizationClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AuthorizationClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AuthorizationClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, parameters AuthorizationContract, options *AuthorizationClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if authorizationID == "" { + return nil, errors.New("parameter authorizationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationId}", url.PathEscape(authorizationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *AuthorizationClient) createOrUpdateHandleResponse(resp *http.Response) (AuthorizationClientCreateOrUpdateResponse, error) { + result := AuthorizationClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationContract); err != nil { + return AuthorizationClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes specific Authorization from the Authorization provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - authorizationID - Identifier of the authorization. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - AuthorizationClientDeleteOptions contains the optional parameters for the AuthorizationClient.Delete method. +func (client *AuthorizationClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, ifMatch string, options *AuthorizationClientDeleteOptions) (AuthorizationClientDeleteResponse, error) { + var err error + const operationName = "AuthorizationClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, authorizationID, ifMatch, options) + if err != nil { + return AuthorizationClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AuthorizationClientDeleteResponse{}, err + } + return AuthorizationClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AuthorizationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, ifMatch string, _ *AuthorizationClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if authorizationID == "" { + return nil, errors.New("parameter authorizationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationId}", url.PathEscape(authorizationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the authorization specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - authorizationID - Identifier of the authorization. +// - options - AuthorizationClientGetOptions contains the optional parameters for the AuthorizationClient.Get method. +func (client *AuthorizationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, options *AuthorizationClientGetOptions) (AuthorizationClientGetResponse, error) { + var err error + const operationName = "AuthorizationClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, authorizationID, options) + if err != nil { + return AuthorizationClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AuthorizationClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AuthorizationClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, _ *AuthorizationClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if authorizationID == "" { + return nil, errors.New("parameter authorizationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationId}", url.PathEscape(authorizationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AuthorizationClient) getHandleResponse(resp *http.Response) (AuthorizationClientGetResponse, error) { + result := AuthorizationClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationContract); err != nil { + return AuthorizationClientGetResponse{}, err + } + return result, nil +} + +// NewListByAuthorizationProviderPager - Lists a collection of authorization providers defined within a authorization provider. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - options - AuthorizationClientListByAuthorizationProviderOptions contains the optional parameters for the AuthorizationClient.NewListByAuthorizationProviderPager +// method. +func (client *AuthorizationClient) NewListByAuthorizationProviderPager(resourceGroupName string, serviceName string, authorizationProviderID string, options *AuthorizationClientListByAuthorizationProviderOptions) *runtime.Pager[AuthorizationClientListByAuthorizationProviderResponse] { + return runtime.NewPager(runtime.PagingHandler[AuthorizationClientListByAuthorizationProviderResponse]{ + More: func(page AuthorizationClientListByAuthorizationProviderResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AuthorizationClientListByAuthorizationProviderResponse) (AuthorizationClientListByAuthorizationProviderResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AuthorizationClient.NewListByAuthorizationProviderPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAuthorizationProviderCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, options) + }, nil) + if err != nil { + return AuthorizationClientListByAuthorizationProviderResponse{}, err + } + return client.listByAuthorizationProviderHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAuthorizationProviderCreateRequest creates the ListByAuthorizationProvider request. +func (client *AuthorizationClient) listByAuthorizationProviderCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, options *AuthorizationClientListByAuthorizationProviderOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAuthorizationProviderHandleResponse handles the ListByAuthorizationProvider response. +func (client *AuthorizationClient) listByAuthorizationProviderHandleResponse(resp *http.Response) (AuthorizationClientListByAuthorizationProviderResponse, error) { + result := AuthorizationClientListByAuthorizationProviderResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationCollection); err != nil { + return AuthorizationClientListByAuthorizationProviderResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationaccesspolicy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationaccesspolicy_client.go new file mode 100644 index 00000000..656f0cf8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationaccesspolicy_client.go @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// AuthorizationAccessPolicyClient contains the methods for the AuthorizationAccessPolicy group. +// Don't use this type directly, use NewAuthorizationAccessPolicyClient() instead. +type AuthorizationAccessPolicyClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAuthorizationAccessPolicyClient creates a new instance of AuthorizationAccessPolicyClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAuthorizationAccessPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationAccessPolicyClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AuthorizationAccessPolicyClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates Authorization Access Policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - authorizationID - Identifier of the authorization. +// - authorizationAccessPolicyID - Identifier of the authorization access policy. +// - parameters - Create parameters. +// - options - AuthorizationAccessPolicyClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationAccessPolicyClient.CreateOrUpdate +// method. +func (client *AuthorizationAccessPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, authorizationAccessPolicyID string, parameters AuthorizationAccessPolicyContract, options *AuthorizationAccessPolicyClientCreateOrUpdateOptions) (AuthorizationAccessPolicyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AuthorizationAccessPolicyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, authorizationID, authorizationAccessPolicyID, parameters, options) + if err != nil { + return AuthorizationAccessPolicyClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationAccessPolicyClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AuthorizationAccessPolicyClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AuthorizationAccessPolicyClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, authorizationAccessPolicyID string, parameters AuthorizationAccessPolicyContract, options *AuthorizationAccessPolicyClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if authorizationID == "" { + return nil, errors.New("parameter authorizationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationId}", url.PathEscape(authorizationID)) + if authorizationAccessPolicyID == "" { + return nil, errors.New("parameter authorizationAccessPolicyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationAccessPolicyId}", url.PathEscape(authorizationAccessPolicyID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *AuthorizationAccessPolicyClient) createOrUpdateHandleResponse(resp *http.Response) (AuthorizationAccessPolicyClientCreateOrUpdateResponse, error) { + result := AuthorizationAccessPolicyClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationAccessPolicyContract); err != nil { + return AuthorizationAccessPolicyClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes specific access policy from the Authorization. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - authorizationID - Identifier of the authorization. +// - authorizationAccessPolicyID - Identifier of the authorization access policy. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - AuthorizationAccessPolicyClientDeleteOptions contains the optional parameters for the AuthorizationAccessPolicyClient.Delete +// method. +func (client *AuthorizationAccessPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, authorizationAccessPolicyID string, ifMatch string, options *AuthorizationAccessPolicyClientDeleteOptions) (AuthorizationAccessPolicyClientDeleteResponse, error) { + var err error + const operationName = "AuthorizationAccessPolicyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, authorizationID, authorizationAccessPolicyID, ifMatch, options) + if err != nil { + return AuthorizationAccessPolicyClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationAccessPolicyClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AuthorizationAccessPolicyClientDeleteResponse{}, err + } + return AuthorizationAccessPolicyClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AuthorizationAccessPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, authorizationAccessPolicyID string, ifMatch string, _ *AuthorizationAccessPolicyClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if authorizationID == "" { + return nil, errors.New("parameter authorizationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationId}", url.PathEscape(authorizationID)) + if authorizationAccessPolicyID == "" { + return nil, errors.New("parameter authorizationAccessPolicyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationAccessPolicyId}", url.PathEscape(authorizationAccessPolicyID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the authorization access policy specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - authorizationID - Identifier of the authorization. +// - authorizationAccessPolicyID - Identifier of the authorization access policy. +// - options - AuthorizationAccessPolicyClientGetOptions contains the optional parameters for the AuthorizationAccessPolicyClient.Get +// method. +func (client *AuthorizationAccessPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, authorizationAccessPolicyID string, options *AuthorizationAccessPolicyClientGetOptions) (AuthorizationAccessPolicyClientGetResponse, error) { + var err error + const operationName = "AuthorizationAccessPolicyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, authorizationID, authorizationAccessPolicyID, options) + if err != nil { + return AuthorizationAccessPolicyClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationAccessPolicyClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AuthorizationAccessPolicyClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AuthorizationAccessPolicyClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, authorizationAccessPolicyID string, _ *AuthorizationAccessPolicyClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if authorizationID == "" { + return nil, errors.New("parameter authorizationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationId}", url.PathEscape(authorizationID)) + if authorizationAccessPolicyID == "" { + return nil, errors.New("parameter authorizationAccessPolicyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationAccessPolicyId}", url.PathEscape(authorizationAccessPolicyID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AuthorizationAccessPolicyClient) getHandleResponse(resp *http.Response) (AuthorizationAccessPolicyClientGetResponse, error) { + result := AuthorizationAccessPolicyClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationAccessPolicyContract); err != nil { + return AuthorizationAccessPolicyClientGetResponse{}, err + } + return result, nil +} + +// NewListByAuthorizationPager - Lists a collection of authorization access policy defined within a authorization. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - authorizationID - Identifier of the authorization. +// - options - AuthorizationAccessPolicyClientListByAuthorizationOptions contains the optional parameters for the AuthorizationAccessPolicyClient.NewListByAuthorizationPager +// method. +func (client *AuthorizationAccessPolicyClient) NewListByAuthorizationPager(resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, options *AuthorizationAccessPolicyClientListByAuthorizationOptions) *runtime.Pager[AuthorizationAccessPolicyClientListByAuthorizationResponse] { + return runtime.NewPager(runtime.PagingHandler[AuthorizationAccessPolicyClientListByAuthorizationResponse]{ + More: func(page AuthorizationAccessPolicyClientListByAuthorizationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AuthorizationAccessPolicyClientListByAuthorizationResponse) (AuthorizationAccessPolicyClientListByAuthorizationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AuthorizationAccessPolicyClient.NewListByAuthorizationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAuthorizationCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, authorizationID, options) + }, nil) + if err != nil { + return AuthorizationAccessPolicyClientListByAuthorizationResponse{}, err + } + return client.listByAuthorizationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAuthorizationCreateRequest creates the ListByAuthorization request. +func (client *AuthorizationAccessPolicyClient) listByAuthorizationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, options *AuthorizationAccessPolicyClientListByAuthorizationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if authorizationID == "" { + return nil, errors.New("parameter authorizationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationId}", url.PathEscape(authorizationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAuthorizationHandleResponse handles the ListByAuthorization response. +func (client *AuthorizationAccessPolicyClient) listByAuthorizationHandleResponse(resp *http.Response) (AuthorizationAccessPolicyClientListByAuthorizationResponse, error) { + result := AuthorizationAccessPolicyClientListByAuthorizationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationAccessPolicyCollection); err != nil { + return AuthorizationAccessPolicyClientListByAuthorizationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationloginlinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationloginlinks_client.go new file mode 100644 index 00000000..490273d1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationloginlinks_client.go @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AuthorizationLoginLinksClient contains the methods for the AuthorizationLoginLinks group. +// Don't use this type directly, use NewAuthorizationLoginLinksClient() instead. +type AuthorizationLoginLinksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAuthorizationLoginLinksClient creates a new instance of AuthorizationLoginLinksClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAuthorizationLoginLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationLoginLinksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AuthorizationLoginLinksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Post - Gets authorization login links. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - authorizationID - Identifier of the authorization. +// - parameters - Create parameters. +// - options - AuthorizationLoginLinksClientPostOptions contains the optional parameters for the AuthorizationLoginLinksClient.Post +// method. +func (client *AuthorizationLoginLinksClient) Post(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, parameters AuthorizationLoginRequestContract, options *AuthorizationLoginLinksClientPostOptions) (AuthorizationLoginLinksClientPostResponse, error) { + var err error + const operationName = "AuthorizationLoginLinksClient.Post" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.postCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, authorizationID, parameters, options) + if err != nil { + return AuthorizationLoginLinksClientPostResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationLoginLinksClientPostResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AuthorizationLoginLinksClientPostResponse{}, err + } + resp, err := client.postHandleResponse(httpResp) + return resp, err +} + +// postCreateRequest creates the Post request. +func (client *AuthorizationLoginLinksClient) postCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, authorizationID string, parameters AuthorizationLoginRequestContract, _ *AuthorizationLoginLinksClientPostOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if authorizationID == "" { + return nil, errors.New("parameter authorizationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationId}", url.PathEscape(authorizationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// postHandleResponse handles the Post response. +func (client *AuthorizationLoginLinksClient) postHandleResponse(resp *http.Response) (AuthorizationLoginLinksClientPostResponse, error) { + result := AuthorizationLoginLinksClientPostResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationLoginResponseContract); err != nil { + return AuthorizationLoginLinksClientPostResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationprovider_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationprovider_client.go new file mode 100644 index 00000000..5f0c7883 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationprovider_client.go @@ -0,0 +1,332 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// AuthorizationProviderClient contains the methods for the AuthorizationProvider group. +// Don't use this type directly, use NewAuthorizationProviderClient() instead. +type AuthorizationProviderClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAuthorizationProviderClient creates a new instance of AuthorizationProviderClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAuthorizationProviderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationProviderClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AuthorizationProviderClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates authorization provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - parameters - Create parameters. +// - options - AuthorizationProviderClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationProviderClient.CreateOrUpdate +// method. +func (client *AuthorizationProviderClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, parameters AuthorizationProviderContract, options *AuthorizationProviderClientCreateOrUpdateOptions) (AuthorizationProviderClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AuthorizationProviderClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, parameters, options) + if err != nil { + return AuthorizationProviderClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationProviderClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AuthorizationProviderClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AuthorizationProviderClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, parameters AuthorizationProviderContract, options *AuthorizationProviderClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *AuthorizationProviderClient) createOrUpdateHandleResponse(resp *http.Response) (AuthorizationProviderClientCreateOrUpdateResponse, error) { + result := AuthorizationProviderClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationProviderContract); err != nil { + return AuthorizationProviderClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes specific authorization provider from the API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - AuthorizationProviderClientDeleteOptions contains the optional parameters for the AuthorizationProviderClient.Delete +// method. +func (client *AuthorizationProviderClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, ifMatch string, options *AuthorizationProviderClientDeleteOptions) (AuthorizationProviderClientDeleteResponse, error) { + var err error + const operationName = "AuthorizationProviderClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, ifMatch, options) + if err != nil { + return AuthorizationProviderClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationProviderClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AuthorizationProviderClientDeleteResponse{}, err + } + return AuthorizationProviderClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AuthorizationProviderClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, ifMatch string, _ *AuthorizationProviderClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the authorization provider specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - authorizationProviderID - Identifier of the authorization provider. +// - options - AuthorizationProviderClientGetOptions contains the optional parameters for the AuthorizationProviderClient.Get +// method. +func (client *AuthorizationProviderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, options *AuthorizationProviderClientGetOptions) (AuthorizationProviderClientGetResponse, error) { + var err error + const operationName = "AuthorizationProviderClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, authorizationProviderID, options) + if err != nil { + return AuthorizationProviderClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AuthorizationProviderClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AuthorizationProviderClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AuthorizationProviderClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authorizationProviderID string, _ *AuthorizationProviderClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if authorizationProviderID == "" { + return nil, errors.New("parameter authorizationProviderID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationProviderId}", url.PathEscape(authorizationProviderID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AuthorizationProviderClient) getHandleResponse(resp *http.Response) (AuthorizationProviderClientGetResponse, error) { + result := AuthorizationProviderClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationProviderContract); err != nil { + return AuthorizationProviderClientGetResponse{}, err + } + return result, nil +} + +// NewListByServicePager - Lists a collection of authorization providers defined within a service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - AuthorizationProviderClientListByServiceOptions contains the optional parameters for the AuthorizationProviderClient.NewListByServicePager +// method. +func (client *AuthorizationProviderClient) NewListByServicePager(resourceGroupName string, serviceName string, options *AuthorizationProviderClientListByServiceOptions) *runtime.Pager[AuthorizationProviderClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[AuthorizationProviderClientListByServiceResponse]{ + More: func(page AuthorizationProviderClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AuthorizationProviderClientListByServiceResponse) (AuthorizationProviderClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AuthorizationProviderClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return AuthorizationProviderClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *AuthorizationProviderClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *AuthorizationProviderClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *AuthorizationProviderClient) listByServiceHandleResponse(resp *http.Response) (AuthorizationProviderClientListByServiceResponse, error) { + result := AuthorizationProviderClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationProviderCollection); err != nil { + return AuthorizationProviderClientListByServiceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/authorizationserver_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationserver_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/authorizationserver_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationserver_client.go index 26382406..679f180a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/authorizationserver_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/authorizationserver_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type AuthorizationServerClient struct { } // NewAuthorizationServerClient creates a new instance of AuthorizationServerClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAuthorizationServerClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AuthorizationServerClient, error) { - cl, err := arm.NewClient(moduleName+".AuthorizationServerClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,26 +44,33 @@ func NewAuthorizationServerClient(subscriptionID string, credential azcore.Token // CreateOrUpdate - Creates new authorization server or updates an existing authorization server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - authsid - Identifier of the authorization server. // - parameters - Create or update parameters. // - options - AuthorizationServerClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationServerClient.CreateOrUpdate // method. func (client *AuthorizationServerClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters AuthorizationServerContract, options *AuthorizationServerClientCreateOrUpdateOptions) (AuthorizationServerClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AuthorizationServerClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, authsid, parameters, options) if err != nil { return AuthorizationServerClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AuthorizationServerClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AuthorizationServerClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AuthorizationServerClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -95,13 +97,16 @@ func (client *AuthorizationServerClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,8 +124,8 @@ func (client *AuthorizationServerClient) createOrUpdateHandleResponse(resp *http // Delete - Deletes specific authorization server instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - authsid - Identifier of the authorization server. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -128,22 +133,28 @@ func (client *AuthorizationServerClient) createOrUpdateHandleResponse(resp *http // - options - AuthorizationServerClientDeleteOptions contains the optional parameters for the AuthorizationServerClient.Delete // method. func (client *AuthorizationServerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string, options *AuthorizationServerClientDeleteOptions) (AuthorizationServerClientDeleteResponse, error) { + var err error + const operationName = "AuthorizationServerClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, authsid, ifMatch, options) if err != nil { return AuthorizationServerClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AuthorizationServerClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return AuthorizationServerClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AuthorizationServerClientDeleteResponse{}, err } return AuthorizationServerClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *AuthorizationServerClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string, options *AuthorizationServerClientDeleteOptions) (*policy.Request, error) { +func (client *AuthorizationServerClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string, _ *AuthorizationServerClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -166,38 +177,45 @@ func (client *AuthorizationServerClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the authorization server specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - authsid - Identifier of the authorization server. // - options - AuthorizationServerClientGetOptions contains the optional parameters for the AuthorizationServerClient.Get method. func (client *AuthorizationServerClient) Get(ctx context.Context, resourceGroupName string, serviceName string, authsid string, options *AuthorizationServerClientGetOptions) (AuthorizationServerClientGetResponse, error) { + var err error + const operationName = "AuthorizationServerClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, authsid, options) if err != nil { return AuthorizationServerClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AuthorizationServerClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AuthorizationServerClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AuthorizationServerClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *AuthorizationServerClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authsid string, options *AuthorizationServerClientGetOptions) (*policy.Request, error) { +func (client *AuthorizationServerClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authsid string, _ *AuthorizationServerClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -220,7 +238,7 @@ func (client *AuthorizationServerClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -240,29 +258,36 @@ func (client *AuthorizationServerClient) getHandleResponse(resp *http.Response) // GetEntityTag - Gets the entity state (Etag) version of the authorizationServer specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - authsid - Identifier of the authorization server. // - options - AuthorizationServerClientGetEntityTagOptions contains the optional parameters for the AuthorizationServerClient.GetEntityTag // method. func (client *AuthorizationServerClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, authsid string, options *AuthorizationServerClientGetEntityTagOptions) (AuthorizationServerClientGetEntityTagResponse, error) { + var err error + const operationName = "AuthorizationServerClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, authsid, options) if err != nil { return AuthorizationServerClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AuthorizationServerClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AuthorizationServerClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AuthorizationServerClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *AuthorizationServerClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authsid string, options *AuthorizationServerClientGetEntityTagOptions) (*policy.Request, error) { +func (client *AuthorizationServerClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authsid string, _ *AuthorizationServerClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -285,7 +310,7 @@ func (client *AuthorizationServerClient) getEntityTagCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -293,18 +318,17 @@ func (client *AuthorizationServerClient) getEntityTagCreateRequest(ctx context.C // getEntityTagHandleResponse handles the GetEntityTag response. func (client *AuthorizationServerClient) getEntityTagHandleResponse(resp *http.Response) (AuthorizationServerClientGetEntityTagResponse, error) { - result := AuthorizationServerClientGetEntityTagResponse{} + result := AuthorizationServerClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of authorization servers defined within a service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - AuthorizationServerClientListByServiceOptions contains the optional parameters for the AuthorizationServerClient.NewListByServicePager // method. @@ -314,25 +338,20 @@ func (client *AuthorizationServerClient) NewListByServicePager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AuthorizationServerClientListByServiceResponse) (AuthorizationServerClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AuthorizationServerClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AuthorizationServerClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return AuthorizationServerClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AuthorizationServerClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -359,13 +378,13 @@ func (client *AuthorizationServerClient) listByServiceCreateRequest(ctx context. if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -383,29 +402,36 @@ func (client *AuthorizationServerClient) listByServiceHandleResponse(resp *http. // ListSecrets - Gets the client secret details of the authorization server. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - authsid - Identifier of the authorization server. // - options - AuthorizationServerClientListSecretsOptions contains the optional parameters for the AuthorizationServerClient.ListSecrets // method. func (client *AuthorizationServerClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, authsid string, options *AuthorizationServerClientListSecretsOptions) (AuthorizationServerClientListSecretsResponse, error) { + var err error + const operationName = "AuthorizationServerClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, serviceName, authsid, options) if err != nil { return AuthorizationServerClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AuthorizationServerClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AuthorizationServerClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AuthorizationServerClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. -func (client *AuthorizationServerClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authsid string, options *AuthorizationServerClientListSecretsOptions) (*policy.Request, error) { +func (client *AuthorizationServerClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authsid string, _ *AuthorizationServerClientListSecretsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -428,7 +454,7 @@ func (client *AuthorizationServerClient) listSecretsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -449,8 +475,8 @@ func (client *AuthorizationServerClient) listSecretsHandleResponse(resp *http.Re // Update - Updates the details of the authorization server specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - authsid - Identifier of the authorization server. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -459,22 +485,29 @@ func (client *AuthorizationServerClient) listSecretsHandleResponse(resp *http.Re // - options - AuthorizationServerClientUpdateOptions contains the optional parameters for the AuthorizationServerClient.Update // method. func (client *AuthorizationServerClient) Update(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string, parameters AuthorizationServerUpdateContract, options *AuthorizationServerClientUpdateOptions) (AuthorizationServerClientUpdateResponse, error) { + var err error + const operationName = "AuthorizationServerClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, authsid, ifMatch, parameters, options) if err != nil { return AuthorizationServerClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AuthorizationServerClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AuthorizationServerClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AuthorizationServerClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *AuthorizationServerClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string, parameters AuthorizationServerUpdateContract, options *AuthorizationServerClientUpdateOptions) (*policy.Request, error) { +func (client *AuthorizationServerClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string, parameters AuthorizationServerUpdateContract, _ *AuthorizationServerClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -497,11 +530,14 @@ func (client *AuthorizationServerClient) updateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/autorest.md new file mode 100644 index 00000000..fd21aea2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/e436160e64c0f8d7fb20d662be2712f71f0a7ef5/specification/apimanagement/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/e436160e64c0f8d7fb20d662be2712f71f0a7ef5/specification/apimanagement/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 3.0.0 +tag: package-2024-05 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/backend_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/backend_client.go similarity index 77% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/backend_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/backend_client.go index fcaf88b0..559d6cce 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/backend_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/backend_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type BackendClient struct { } // NewBackendClient creates a new instance of BackendClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewBackendClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackendClient, error) { - cl, err := arm.NewClient(moduleName+".BackendClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +44,32 @@ func NewBackendClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Creates or Updates a backend. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. // - parameters - Create parameters. // - options - BackendClientCreateOrUpdateOptions contains the optional parameters for the BackendClient.CreateOrUpdate method. func (client *BackendClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters BackendContract, options *BackendClientCreateOrUpdateOptions) (BackendClientCreateOrUpdateResponse, error) { + var err error + const operationName = "BackendClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, backendID, parameters, options) if err != nil { return BackendClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackendClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return BackendClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return BackendClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,13 +96,16 @@ func (client *BackendClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,30 +123,36 @@ func (client *BackendClient) createOrUpdateHandleResponse(resp *http.Response) ( // Delete - Deletes the specified backend. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - BackendClientDeleteOptions contains the optional parameters for the BackendClient.Delete method. func (client *BackendClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string, options *BackendClientDeleteOptions) (BackendClientDeleteResponse, error) { + var err error + const operationName = "BackendClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, backendID, ifMatch, options) if err != nil { return BackendClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackendClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return BackendClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BackendClientDeleteResponse{}, err } return BackendClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *BackendClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string, options *BackendClientDeleteOptions) (*policy.Request, error) { +func (client *BackendClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string, _ *BackendClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -164,38 +175,45 @@ func (client *BackendClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the backend specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. // - options - BackendClientGetOptions contains the optional parameters for the BackendClient.Get method. func (client *BackendClient) Get(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientGetOptions) (BackendClientGetResponse, error) { + var err error + const operationName = "BackendClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, backendID, options) if err != nil { return BackendClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackendClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackendClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackendClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *BackendClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientGetOptions) (*policy.Request, error) { +func (client *BackendClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, backendID string, _ *BackendClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -218,7 +236,7 @@ func (client *BackendClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,28 +256,35 @@ func (client *BackendClient) getHandleResponse(resp *http.Response) (BackendClie // GetEntityTag - Gets the entity state (Etag) version of the backend specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. // - options - BackendClientGetEntityTagOptions contains the optional parameters for the BackendClient.GetEntityTag method. func (client *BackendClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientGetEntityTagOptions) (BackendClientGetEntityTagResponse, error) { + var err error + const operationName = "BackendClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, backendID, options) if err != nil { return BackendClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackendClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackendClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackendClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *BackendClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientGetEntityTagOptions) (*policy.Request, error) { +func (client *BackendClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, backendID string, _ *BackendClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -282,7 +307,7 @@ func (client *BackendClient) getEntityTagCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -290,18 +315,17 @@ func (client *BackendClient) getEntityTagCreateRequest(ctx context.Context, reso // getEntityTagHandleResponse handles the GetEntityTag response. func (client *BackendClient) getEntityTagHandleResponse(resp *http.Response) (BackendClientGetEntityTagResponse, error) { - result := BackendClientGetEntityTagResponse{} + result := BackendClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of backends in the specified service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - BackendClientListByServiceOptions contains the optional parameters for the BackendClient.NewListByServicePager // method. @@ -311,25 +335,20 @@ func (client *BackendClient) NewListByServicePager(resourceGroupName string, ser return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *BackendClientListByServiceResponse) (BackendClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackendClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackendClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return BackendClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackendClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -356,13 +375,13 @@ func (client *BackendClient) listByServiceCreateRequest(ctx context.Context, res if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -377,26 +396,32 @@ func (client *BackendClient) listByServiceHandleResponse(resp *http.Response) (B return result, nil } -// Reconnect - Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout -// was specified, timeout of 2 minutes is used. +// Reconnect - Notifies the API Management gateway to create a new connection to the backend after the specified timeout. +// If no timeout was specified, timeout of 2 minutes is used. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. // - options - BackendClientReconnectOptions contains the optional parameters for the BackendClient.Reconnect method. func (client *BackendClient) Reconnect(ctx context.Context, resourceGroupName string, serviceName string, backendID string, options *BackendClientReconnectOptions) (BackendClientReconnectResponse, error) { + var err error + const operationName = "BackendClient.Reconnect" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.reconnectCreateRequest(ctx, resourceGroupName, serviceName, backendID, options) if err != nil { return BackendClientReconnectResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackendClientReconnectResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return BackendClientReconnectResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return BackendClientReconnectResponse{}, err } return BackendClientReconnectResponse{}, nil } @@ -425,11 +450,14 @@ func (client *BackendClient) reconnectCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -437,8 +465,8 @@ func (client *BackendClient) reconnectCreateRequest(ctx context.Context, resourc // Update - Updates an existing backend. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -446,22 +474,29 @@ func (client *BackendClient) reconnectCreateRequest(ctx context.Context, resourc // - parameters - Update parameters. // - options - BackendClientUpdateOptions contains the optional parameters for the BackendClient.Update method. func (client *BackendClient) Update(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string, parameters BackendUpdateParameters, options *BackendClientUpdateOptions) (BackendClientUpdateResponse, error) { + var err error + const operationName = "BackendClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, backendID, ifMatch, parameters, options) if err != nil { return BackendClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return BackendClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackendClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackendClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *BackendClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string, parameters BackendUpdateParameters, options *BackendClientUpdateOptions) (*policy.Request, error) { +func (client *BackendClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string, parameters BackendUpdateParameters, _ *BackendClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -484,11 +519,14 @@ func (client *BackendClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/build.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/build.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/build.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/cache_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/cache_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/cache_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/cache_client.go index 6bb3ca78..1fc470fc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/cache_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/cache_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type CacheClient struct { } // NewCacheClient creates a new instance of CacheClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCacheClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CacheClient, error) { - cl, err := arm.NewClient(moduleName+".CacheClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +44,32 @@ func NewCacheClient(subscriptionID string, credential azcore.TokenCredential, op // CreateOrUpdate - Creates or updates an External Cache to be used in Api Management instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - cacheID - Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). // - parameters - Create or Update parameters. // - options - CacheClientCreateOrUpdateOptions contains the optional parameters for the CacheClient.CreateOrUpdate method. func (client *CacheClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, parameters CacheContract, options *CacheClientCreateOrUpdateOptions) (CacheClientCreateOrUpdateResponse, error) { + var err error + const operationName = "CacheClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, cacheID, parameters, options) if err != nil { return CacheClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CacheClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return CacheClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return CacheClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,13 +96,16 @@ func (client *CacheClient) createOrUpdateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,30 +123,36 @@ func (client *CacheClient) createOrUpdateHandleResponse(resp *http.Response) (Ca // Delete - Deletes specific Cache. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - cacheID - Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - CacheClientDeleteOptions contains the optional parameters for the CacheClient.Delete method. func (client *CacheClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string, options *CacheClientDeleteOptions) (CacheClientDeleteResponse, error) { + var err error + const operationName = "CacheClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, cacheID, ifMatch, options) if err != nil { return CacheClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CacheClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CacheClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CacheClientDeleteResponse{}, err } return CacheClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *CacheClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string, options *CacheClientDeleteOptions) (*policy.Request, error) { +func (client *CacheClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string, _ *CacheClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -164,38 +175,45 @@ func (client *CacheClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the Cache specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - cacheID - Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). // - options - CacheClientGetOptions contains the optional parameters for the CacheClient.Get method. func (client *CacheClient) Get(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, options *CacheClientGetOptions) (CacheClientGetResponse, error) { + var err error + const operationName = "CacheClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, cacheID, options) if err != nil { return CacheClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CacheClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CacheClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CacheClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *CacheClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, options *CacheClientGetOptions) (*policy.Request, error) { +func (client *CacheClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, _ *CacheClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -218,7 +236,7 @@ func (client *CacheClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,28 +256,35 @@ func (client *CacheClient) getHandleResponse(resp *http.Response) (CacheClientGe // GetEntityTag - Gets the entity state (Etag) version of the Cache specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - cacheID - Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). // - options - CacheClientGetEntityTagOptions contains the optional parameters for the CacheClient.GetEntityTag method. func (client *CacheClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, options *CacheClientGetEntityTagOptions) (CacheClientGetEntityTagResponse, error) { + var err error + const operationName = "CacheClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, cacheID, options) if err != nil { return CacheClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CacheClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CacheClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CacheClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *CacheClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, options *CacheClientGetEntityTagOptions) (*policy.Request, error) { +func (client *CacheClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, _ *CacheClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -282,7 +307,7 @@ func (client *CacheClient) getEntityTagCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -290,18 +315,17 @@ func (client *CacheClient) getEntityTagCreateRequest(ctx context.Context, resour // getEntityTagHandleResponse handles the GetEntityTag response. func (client *CacheClient) getEntityTagHandleResponse(resp *http.Response) (CacheClientGetEntityTagResponse, error) { - result := CacheClientGetEntityTagResponse{} + result := CacheClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of all external Caches in the specified service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - CacheClientListByServiceOptions contains the optional parameters for the CacheClient.NewListByServicePager method. func (client *CacheClient) NewListByServicePager(resourceGroupName string, serviceName string, options *CacheClientListByServiceOptions) *runtime.Pager[CacheClientListByServiceResponse] { @@ -310,25 +334,20 @@ func (client *CacheClient) NewListByServicePager(resourceGroupName string, servi return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CacheClientListByServiceResponse) (CacheClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CacheClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CacheClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return CacheClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CacheClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -352,13 +371,13 @@ func (client *CacheClient) listByServiceCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -376,8 +395,8 @@ func (client *CacheClient) listByServiceHandleResponse(resp *http.Response) (Cac // Update - Updates the details of the cache specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - cacheID - Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -385,22 +404,29 @@ func (client *CacheClient) listByServiceHandleResponse(resp *http.Response) (Cac // - parameters - Update parameters. // - options - CacheClientUpdateOptions contains the optional parameters for the CacheClient.Update method. func (client *CacheClient) Update(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string, parameters CacheUpdateParameters, options *CacheClientUpdateOptions) (CacheClientUpdateResponse, error) { + var err error + const operationName = "CacheClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, cacheID, ifMatch, parameters, options) if err != nil { return CacheClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CacheClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CacheClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CacheClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *CacheClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string, parameters CacheUpdateParameters, options *CacheClientUpdateOptions) (*policy.Request, error) { +func (client *CacheClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string, parameters CacheUpdateParameters, _ *CacheClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -423,11 +449,14 @@ func (client *CacheClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/certificate_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/certificate_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/certificate_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/certificate_client.go index 4486b90a..39fb9c5e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/certificate_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/certificate_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type CertificateClient struct { } // NewCertificateClient creates a new instance of CertificateClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCertificateClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateClient, error) { - cl, err := arm.NewClient(moduleName+".CertificateClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,26 +44,33 @@ func NewCertificateClient(subscriptionID string, credential azcore.TokenCredenti // CreateOrUpdate - Creates or updates the certificate being used for authentication with the backend. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance. // - parameters - Create or Update parameters. // - options - CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate // method. func (client *CertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, parameters CertificateCreateOrUpdateParameters, options *CertificateClientCreateOrUpdateOptions) (CertificateClientCreateOrUpdateResponse, error) { + var err error + const operationName = "CertificateClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, certificateID, parameters, options) if err != nil { return CertificateClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return CertificateClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return CertificateClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -95,13 +97,16 @@ func (client *CertificateClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,30 +124,36 @@ func (client *CertificateClient) createOrUpdateHandleResponse(resp *http.Respons // Delete - Deletes specific certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method. func (client *CertificateClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, ifMatch string, options *CertificateClientDeleteOptions) (CertificateClientDeleteResponse, error) { + var err error + const operationName = "CertificateClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, certificateID, ifMatch, options) if err != nil { return CertificateClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CertificateClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateClientDeleteResponse{}, err } return CertificateClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *CertificateClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, ifMatch string, options *CertificateClientDeleteOptions) (*policy.Request, error) { +func (client *CertificateClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, ifMatch string, _ *CertificateClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -165,38 +176,45 @@ func (client *CertificateClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the certificate specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance. // - options - CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method. func (client *CertificateClient) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientGetOptions) (CertificateClientGetResponse, error) { + var err error + const operationName = "CertificateClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, certificateID, options) if err != nil { return CertificateClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *CertificateClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientGetOptions) (*policy.Request, error) { +func (client *CertificateClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, _ *CertificateClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -219,7 +237,7 @@ func (client *CertificateClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -239,29 +257,36 @@ func (client *CertificateClient) getHandleResponse(resp *http.Response) (Certifi // GetEntityTag - Gets the entity state (Etag) version of the certificate specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance. // - options - CertificateClientGetEntityTagOptions contains the optional parameters for the CertificateClient.GetEntityTag // method. func (client *CertificateClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientGetEntityTagOptions) (CertificateClientGetEntityTagResponse, error) { + var err error + const operationName = "CertificateClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, certificateID, options) if err != nil { return CertificateClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *CertificateClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientGetEntityTagOptions) (*policy.Request, error) { +func (client *CertificateClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, _ *CertificateClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -284,7 +309,7 @@ func (client *CertificateClient) getEntityTagCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -292,18 +317,17 @@ func (client *CertificateClient) getEntityTagCreateRequest(ctx context.Context, // getEntityTagHandleResponse handles the GetEntityTag response. func (client *CertificateClient) getEntityTagHandleResponse(resp *http.Response) (CertificateClientGetEntityTagResponse, error) { - result := CertificateClientGetEntityTagResponse{} + result := CertificateClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of all certificates in the specified service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - CertificateClientListByServiceOptions contains the optional parameters for the CertificateClient.NewListByServicePager // method. @@ -313,25 +337,20 @@ func (client *CertificateClient) NewListByServicePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificateClientListByServiceResponse) (CertificateClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return CertificateClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CertificateClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -358,16 +377,16 @@ func (client *CertificateClient) listByServiceCreateRequest(ctx context.Context, if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") if options != nil && options.IsKeyVaultRefreshFailed != nil { reqQP.Set("isKeyVaultRefreshFailed", strconv.FormatBool(*options.IsKeyVaultRefreshFailed)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -385,29 +404,36 @@ func (client *CertificateClient) listByServiceHandleResponse(resp *http.Response // RefreshSecret - From KeyVault, Refresh the certificate being used for authentication with the backend. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance. // - options - CertificateClientRefreshSecretOptions contains the optional parameters for the CertificateClient.RefreshSecret // method. func (client *CertificateClient) RefreshSecret(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientRefreshSecretOptions) (CertificateClientRefreshSecretResponse, error) { + var err error + const operationName = "CertificateClient.RefreshSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.refreshSecretCreateRequest(ctx, resourceGroupName, serviceName, certificateID, options) if err != nil { return CertificateClientRefreshSecretResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateClientRefreshSecretResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateClientRefreshSecretResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateClientRefreshSecretResponse{}, err } - return client.refreshSecretHandleResponse(resp) + resp, err := client.refreshSecretHandleResponse(httpResp) + return resp, err } // refreshSecretCreateRequest creates the RefreshSecret request. -func (client *CertificateClient) refreshSecretCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, options *CertificateClientRefreshSecretOptions) (*policy.Request, error) { +func (client *CertificateClient) refreshSecretCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, _ *CertificateClientRefreshSecretOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -430,7 +456,7 @@ func (client *CertificateClient) refreshSecretCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/ci.yml new file mode 100644 index 00000000..fa902107 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/ci.yml @@ -0,0 +1,28 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/apimanagement/armapimanagement/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/apimanagement/armapimanagement/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + ServiceDirectory: 'resourcemanager/apimanagement/armapimanagement' + UsePipelineProxy: false diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/client.go new file mode 100644 index 00000000..f671f620 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/client.go @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// Client contains the methods for the APIManagementClient group. +// Don't use this type directly, use NewClient() instead. +type Client struct { + internal *arm.Client + subscriptionID string +} + +// NewClient creates a new instance of Client with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &Client{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginPerformConnectivityCheckAsync - Performs a connectivity check between the API Management service and a given destination, +// and returns metrics for the connection, as well as errors encountered while trying to establish it. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - connectivityCheckRequestParams - Connectivity Check request parameters. +// - options - ClientBeginPerformConnectivityCheckAsyncOptions contains the optional parameters for the Client.BeginPerformConnectivityCheckAsync +// method. +func (client *Client) BeginPerformConnectivityCheckAsync(ctx context.Context, resourceGroupName string, serviceName string, connectivityCheckRequestParams ConnectivityCheckRequest, options *ClientBeginPerformConnectivityCheckAsyncOptions) (*runtime.Poller[ClientPerformConnectivityCheckAsyncResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.performConnectivityCheckAsync(ctx, resourceGroupName, serviceName, connectivityCheckRequestParams, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientPerformConnectivityCheckAsyncResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientPerformConnectivityCheckAsyncResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PerformConnectivityCheckAsync - Performs a connectivity check between the API Management service and a given destination, +// and returns metrics for the connection, as well as errors encountered while trying to establish it. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *Client) performConnectivityCheckAsync(ctx context.Context, resourceGroupName string, serviceName string, connectivityCheckRequestParams ConnectivityCheckRequest, options *ClientBeginPerformConnectivityCheckAsyncOptions) (*http.Response, error) { + var err error + const operationName = "Client.BeginPerformConnectivityCheckAsync" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.performConnectivityCheckAsyncCreateRequest(ctx, resourceGroupName, serviceName, connectivityCheckRequestParams, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// performConnectivityCheckAsyncCreateRequest creates the PerformConnectivityCheckAsync request. +func (client *Client) performConnectivityCheckAsyncCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, connectivityCheckRequestParams ConnectivityCheckRequest, _ *ClientBeginPerformConnectivityCheckAsyncOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectivityCheckRequestParams); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/client_factory.go new file mode 100644 index 00000000..e36f169b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/client_factory.go @@ -0,0 +1,1129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewAPIClient creates a new instance of APIClient. +func (c *ClientFactory) NewAPIClient() *APIClient { + return &APIClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIDiagnosticClient creates a new instance of APIDiagnosticClient. +func (c *ClientFactory) NewAPIDiagnosticClient() *APIDiagnosticClient { + return &APIDiagnosticClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIExportClient creates a new instance of APIExportClient. +func (c *ClientFactory) NewAPIExportClient() *APIExportClient { + return &APIExportClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIGatewayClient creates a new instance of APIGatewayClient. +func (c *ClientFactory) NewAPIGatewayClient() *APIGatewayClient { + return &APIGatewayClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIGatewayConfigConnectionClient creates a new instance of APIGatewayConfigConnectionClient. +func (c *ClientFactory) NewAPIGatewayConfigConnectionClient() *APIGatewayConfigConnectionClient { + return &APIGatewayConfigConnectionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIIssueAttachmentClient creates a new instance of APIIssueAttachmentClient. +func (c *ClientFactory) NewAPIIssueAttachmentClient() *APIIssueAttachmentClient { + return &APIIssueAttachmentClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIIssueClient creates a new instance of APIIssueClient. +func (c *ClientFactory) NewAPIIssueClient() *APIIssueClient { + return &APIIssueClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIIssueCommentClient creates a new instance of APIIssueCommentClient. +func (c *ClientFactory) NewAPIIssueCommentClient() *APIIssueCommentClient { + return &APIIssueCommentClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIOperationClient creates a new instance of APIOperationClient. +func (c *ClientFactory) NewAPIOperationClient() *APIOperationClient { + return &APIOperationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIOperationPolicyClient creates a new instance of APIOperationPolicyClient. +func (c *ClientFactory) NewAPIOperationPolicyClient() *APIOperationPolicyClient { + return &APIOperationPolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIPolicyClient creates a new instance of APIPolicyClient. +func (c *ClientFactory) NewAPIPolicyClient() *APIPolicyClient { + return &APIPolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIProductClient creates a new instance of APIProductClient. +func (c *ClientFactory) NewAPIProductClient() *APIProductClient { + return &APIProductClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIReleaseClient creates a new instance of APIReleaseClient. +func (c *ClientFactory) NewAPIReleaseClient() *APIReleaseClient { + return &APIReleaseClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIRevisionClient creates a new instance of APIRevisionClient. +func (c *ClientFactory) NewAPIRevisionClient() *APIRevisionClient { + return &APIRevisionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPISchemaClient creates a new instance of APISchemaClient. +func (c *ClientFactory) NewAPISchemaClient() *APISchemaClient { + return &APISchemaClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPITagDescriptionClient creates a new instance of APITagDescriptionClient. +func (c *ClientFactory) NewAPITagDescriptionClient() *APITagDescriptionClient { + return &APITagDescriptionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIVersionSetClient creates a new instance of APIVersionSetClient. +func (c *ClientFactory) NewAPIVersionSetClient() *APIVersionSetClient { + return &APIVersionSetClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIWikiClient creates a new instance of APIWikiClient. +func (c *ClientFactory) NewAPIWikiClient() *APIWikiClient { + return &APIWikiClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAPIWikisClient creates a new instance of APIWikisClient. +func (c *ClientFactory) NewAPIWikisClient() *APIWikisClient { + return &APIWikisClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAllPoliciesClient creates a new instance of AllPoliciesClient. +func (c *ClientFactory) NewAllPoliciesClient() *AllPoliciesClient { + return &AllPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAuthorizationAccessPolicyClient creates a new instance of AuthorizationAccessPolicyClient. +func (c *ClientFactory) NewAuthorizationAccessPolicyClient() *AuthorizationAccessPolicyClient { + return &AuthorizationAccessPolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAuthorizationClient creates a new instance of AuthorizationClient. +func (c *ClientFactory) NewAuthorizationClient() *AuthorizationClient { + return &AuthorizationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAuthorizationLoginLinksClient creates a new instance of AuthorizationLoginLinksClient. +func (c *ClientFactory) NewAuthorizationLoginLinksClient() *AuthorizationLoginLinksClient { + return &AuthorizationLoginLinksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAuthorizationProviderClient creates a new instance of AuthorizationProviderClient. +func (c *ClientFactory) NewAuthorizationProviderClient() *AuthorizationProviderClient { + return &AuthorizationProviderClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAuthorizationServerClient creates a new instance of AuthorizationServerClient. +func (c *ClientFactory) NewAuthorizationServerClient() *AuthorizationServerClient { + return &AuthorizationServerClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackendClient creates a new instance of BackendClient. +func (c *ClientFactory) NewBackendClient() *BackendClient { + return &BackendClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCacheClient creates a new instance of CacheClient. +func (c *ClientFactory) NewCacheClient() *CacheClient { + return &CacheClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCertificateClient creates a new instance of CertificateClient. +func (c *ClientFactory) NewCertificateClient() *CertificateClient { + return &CertificateClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewClient creates a new instance of Client. +func (c *ClientFactory) NewClient() *Client { + return &Client{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewContentItemClient creates a new instance of ContentItemClient. +func (c *ClientFactory) NewContentItemClient() *ContentItemClient { + return &ContentItemClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewContentTypeClient creates a new instance of ContentTypeClient. +func (c *ClientFactory) NewContentTypeClient() *ContentTypeClient { + return &ContentTypeClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDelegationSettingsClient creates a new instance of DelegationSettingsClient. +func (c *ClientFactory) NewDelegationSettingsClient() *DelegationSettingsClient { + return &DelegationSettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDeletedServicesClient creates a new instance of DeletedServicesClient. +func (c *ClientFactory) NewDeletedServicesClient() *DeletedServicesClient { + return &DeletedServicesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDiagnosticClient creates a new instance of DiagnosticClient. +func (c *ClientFactory) NewDiagnosticClient() *DiagnosticClient { + return &DiagnosticClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDocumentationClient creates a new instance of DocumentationClient. +func (c *ClientFactory) NewDocumentationClient() *DocumentationClient { + return &DocumentationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewEmailTemplateClient creates a new instance of EmailTemplateClient. +func (c *ClientFactory) NewEmailTemplateClient() *EmailTemplateClient { + return &EmailTemplateClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGatewayAPIClient creates a new instance of GatewayAPIClient. +func (c *ClientFactory) NewGatewayAPIClient() *GatewayAPIClient { + return &GatewayAPIClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGatewayCertificateAuthorityClient creates a new instance of GatewayCertificateAuthorityClient. +func (c *ClientFactory) NewGatewayCertificateAuthorityClient() *GatewayCertificateAuthorityClient { + return &GatewayCertificateAuthorityClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGatewayClient creates a new instance of GatewayClient. +func (c *ClientFactory) NewGatewayClient() *GatewayClient { + return &GatewayClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGatewayHostnameConfigurationClient creates a new instance of GatewayHostnameConfigurationClient. +func (c *ClientFactory) NewGatewayHostnameConfigurationClient() *GatewayHostnameConfigurationClient { + return &GatewayHostnameConfigurationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGatewaySKUsClient creates a new instance of GatewaySKUsClient. +func (c *ClientFactory) NewGatewaySKUsClient() *GatewaySKUsClient { + return &GatewaySKUsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGlobalSchemaClient creates a new instance of GlobalSchemaClient. +func (c *ClientFactory) NewGlobalSchemaClient() *GlobalSchemaClient { + return &GlobalSchemaClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGraphQLAPIResolverClient creates a new instance of GraphQLAPIResolverClient. +func (c *ClientFactory) NewGraphQLAPIResolverClient() *GraphQLAPIResolverClient { + return &GraphQLAPIResolverClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGraphQLAPIResolverPolicyClient creates a new instance of GraphQLAPIResolverPolicyClient. +func (c *ClientFactory) NewGraphQLAPIResolverPolicyClient() *GraphQLAPIResolverPolicyClient { + return &GraphQLAPIResolverPolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGroupClient creates a new instance of GroupClient. +func (c *ClientFactory) NewGroupClient() *GroupClient { + return &GroupClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGroupUserClient creates a new instance of GroupUserClient. +func (c *ClientFactory) NewGroupUserClient() *GroupUserClient { + return &GroupUserClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewIdentityProviderClient creates a new instance of IdentityProviderClient. +func (c *ClientFactory) NewIdentityProviderClient() *IdentityProviderClient { + return &IdentityProviderClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewIssueClient creates a new instance of IssueClient. +func (c *ClientFactory) NewIssueClient() *IssueClient { + return &IssueClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLoggerClient creates a new instance of LoggerClient. +func (c *ClientFactory) NewLoggerClient() *LoggerClient { + return &LoggerClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewNamedValueClient creates a new instance of NamedValueClient. +func (c *ClientFactory) NewNamedValueClient() *NamedValueClient { + return &NamedValueClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewNetworkStatusClient creates a new instance of NetworkStatusClient. +func (c *ClientFactory) NewNetworkStatusClient() *NetworkStatusClient { + return &NetworkStatusClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewNotificationClient creates a new instance of NotificationClient. +func (c *ClientFactory) NewNotificationClient() *NotificationClient { + return &NotificationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewNotificationRecipientEmailClient creates a new instance of NotificationRecipientEmailClient. +func (c *ClientFactory) NewNotificationRecipientEmailClient() *NotificationRecipientEmailClient { + return &NotificationRecipientEmailClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewNotificationRecipientUserClient creates a new instance of NotificationRecipientUserClient. +func (c *ClientFactory) NewNotificationRecipientUserClient() *NotificationRecipientUserClient { + return &NotificationRecipientUserClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOpenIDConnectProviderClient creates a new instance of OpenIDConnectProviderClient. +func (c *ClientFactory) NewOpenIDConnectProviderClient() *OpenIDConnectProviderClient { + return &OpenIDConnectProviderClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationClient creates a new instance of OperationClient. +func (c *ClientFactory) NewOperationClient() *OperationClient { + return &OperationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationStatusClient creates a new instance of OperationStatusClient. +func (c *ClientFactory) NewOperationStatusClient() *OperationStatusClient { + return &OperationStatusClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewOperationsResultsClient creates a new instance of OperationsResultsClient. +func (c *ClientFactory) NewOperationsResultsClient() *OperationsResultsClient { + return &OperationsResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOutboundNetworkDependenciesEndpointsClient creates a new instance of OutboundNetworkDependenciesEndpointsClient. +func (c *ClientFactory) NewOutboundNetworkDependenciesEndpointsClient() *OutboundNetworkDependenciesEndpointsClient { + return &OutboundNetworkDependenciesEndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPolicyClient creates a new instance of PolicyClient. +func (c *ClientFactory) NewPolicyClient() *PolicyClient { + return &PolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPolicyDescriptionClient creates a new instance of PolicyDescriptionClient. +func (c *ClientFactory) NewPolicyDescriptionClient() *PolicyDescriptionClient { + return &PolicyDescriptionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPolicyFragmentClient creates a new instance of PolicyFragmentClient. +func (c *ClientFactory) NewPolicyFragmentClient() *PolicyFragmentClient { + return &PolicyFragmentClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPolicyRestrictionClient creates a new instance of PolicyRestrictionClient. +func (c *ClientFactory) NewPolicyRestrictionClient() *PolicyRestrictionClient { + return &PolicyRestrictionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPolicyRestrictionValidationsClient creates a new instance of PolicyRestrictionValidationsClient. +func (c *ClientFactory) NewPolicyRestrictionValidationsClient() *PolicyRestrictionValidationsClient { + return &PolicyRestrictionValidationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPortalConfigClient creates a new instance of PortalConfigClient. +func (c *ClientFactory) NewPortalConfigClient() *PortalConfigClient { + return &PortalConfigClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPortalRevisionClient creates a new instance of PortalRevisionClient. +func (c *ClientFactory) NewPortalRevisionClient() *PortalRevisionClient { + return &PortalRevisionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPortalSettingsClient creates a new instance of PortalSettingsClient. +func (c *ClientFactory) NewPortalSettingsClient() *PortalSettingsClient { + return &PortalSettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient. +func (c *ClientFactory) NewPrivateEndpointConnectionClient() *PrivateEndpointConnectionClient { + return &PrivateEndpointConnectionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProductAPIClient creates a new instance of ProductAPIClient. +func (c *ClientFactory) NewProductAPIClient() *ProductAPIClient { + return &ProductAPIClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProductAPILinkClient creates a new instance of ProductAPILinkClient. +func (c *ClientFactory) NewProductAPILinkClient() *ProductAPILinkClient { + return &ProductAPILinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProductClient creates a new instance of ProductClient. +func (c *ClientFactory) NewProductClient() *ProductClient { + return &ProductClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProductGroupClient creates a new instance of ProductGroupClient. +func (c *ClientFactory) NewProductGroupClient() *ProductGroupClient { + return &ProductGroupClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProductGroupLinkClient creates a new instance of ProductGroupLinkClient. +func (c *ClientFactory) NewProductGroupLinkClient() *ProductGroupLinkClient { + return &ProductGroupLinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProductPolicyClient creates a new instance of ProductPolicyClient. +func (c *ClientFactory) NewProductPolicyClient() *ProductPolicyClient { + return &ProductPolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProductSubscriptionsClient creates a new instance of ProductSubscriptionsClient. +func (c *ClientFactory) NewProductSubscriptionsClient() *ProductSubscriptionsClient { + return &ProductSubscriptionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProductWikiClient creates a new instance of ProductWikiClient. +func (c *ClientFactory) NewProductWikiClient() *ProductWikiClient { + return &ProductWikiClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProductWikisClient creates a new instance of ProductWikisClient. +func (c *ClientFactory) NewProductWikisClient() *ProductWikisClient { + return &ProductWikisClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewQuotaByCounterKeysClient creates a new instance of QuotaByCounterKeysClient. +func (c *ClientFactory) NewQuotaByCounterKeysClient() *QuotaByCounterKeysClient { + return &QuotaByCounterKeysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewQuotaByPeriodKeysClient creates a new instance of QuotaByPeriodKeysClient. +func (c *ClientFactory) NewQuotaByPeriodKeysClient() *QuotaByPeriodKeysClient { + return &QuotaByPeriodKeysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRegionClient creates a new instance of RegionClient. +func (c *ClientFactory) NewRegionClient() *RegionClient { + return &RegionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReportsClient creates a new instance of ReportsClient. +func (c *ClientFactory) NewReportsClient() *ReportsClient { + return &ReportsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSKUsClient creates a new instance of SKUsClient. +func (c *ClientFactory) NewSKUsClient() *SKUsClient { + return &SKUsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewServiceClient creates a new instance of ServiceClient. +func (c *ClientFactory) NewServiceClient() *ServiceClient { + return &ServiceClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewServiceSKUsClient creates a new instance of ServiceSKUsClient. +func (c *ClientFactory) NewServiceSKUsClient() *ServiceSKUsClient { + return &ServiceSKUsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSignInSettingsClient creates a new instance of SignInSettingsClient. +func (c *ClientFactory) NewSignInSettingsClient() *SignInSettingsClient { + return &SignInSettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSignUpSettingsClient creates a new instance of SignUpSettingsClient. +func (c *ClientFactory) NewSignUpSettingsClient() *SignUpSettingsClient { + return &SignUpSettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSubscriptionClient creates a new instance of SubscriptionClient. +func (c *ClientFactory) NewSubscriptionClient() *SubscriptionClient { + return &SubscriptionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTagAPILinkClient creates a new instance of TagAPILinkClient. +func (c *ClientFactory) NewTagAPILinkClient() *TagAPILinkClient { + return &TagAPILinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTagClient creates a new instance of TagClient. +func (c *ClientFactory) NewTagClient() *TagClient { + return &TagClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTagOperationLinkClient creates a new instance of TagOperationLinkClient. +func (c *ClientFactory) NewTagOperationLinkClient() *TagOperationLinkClient { + return &TagOperationLinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTagProductLinkClient creates a new instance of TagProductLinkClient. +func (c *ClientFactory) NewTagProductLinkClient() *TagProductLinkClient { + return &TagProductLinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTagResourceClient creates a new instance of TagResourceClient. +func (c *ClientFactory) NewTagResourceClient() *TagResourceClient { + return &TagResourceClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTenantAccessClient creates a new instance of TenantAccessClient. +func (c *ClientFactory) NewTenantAccessClient() *TenantAccessClient { + return &TenantAccessClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTenantAccessGitClient creates a new instance of TenantAccessGitClient. +func (c *ClientFactory) NewTenantAccessGitClient() *TenantAccessGitClient { + return &TenantAccessGitClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTenantConfigurationClient creates a new instance of TenantConfigurationClient. +func (c *ClientFactory) NewTenantConfigurationClient() *TenantConfigurationClient { + return &TenantConfigurationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTenantSettingsClient creates a new instance of TenantSettingsClient. +func (c *ClientFactory) NewTenantSettingsClient() *TenantSettingsClient { + return &TenantSettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewUserClient creates a new instance of UserClient. +func (c *ClientFactory) NewUserClient() *UserClient { + return &UserClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewUserConfirmationPasswordClient creates a new instance of UserConfirmationPasswordClient. +func (c *ClientFactory) NewUserConfirmationPasswordClient() *UserConfirmationPasswordClient { + return &UserConfirmationPasswordClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewUserGroupClient creates a new instance of UserGroupClient. +func (c *ClientFactory) NewUserGroupClient() *UserGroupClient { + return &UserGroupClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewUserIdentitiesClient creates a new instance of UserIdentitiesClient. +func (c *ClientFactory) NewUserIdentitiesClient() *UserIdentitiesClient { + return &UserIdentitiesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewUserSubscriptionClient creates a new instance of UserSubscriptionClient. +func (c *ClientFactory) NewUserSubscriptionClient() *UserSubscriptionClient { + return &UserSubscriptionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceAPIClient creates a new instance of WorkspaceAPIClient. +func (c *ClientFactory) NewWorkspaceAPIClient() *WorkspaceAPIClient { + return &WorkspaceAPIClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceAPIDiagnosticClient creates a new instance of WorkspaceAPIDiagnosticClient. +func (c *ClientFactory) NewWorkspaceAPIDiagnosticClient() *WorkspaceAPIDiagnosticClient { + return &WorkspaceAPIDiagnosticClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceAPIExportClient creates a new instance of WorkspaceAPIExportClient. +func (c *ClientFactory) NewWorkspaceAPIExportClient() *WorkspaceAPIExportClient { + return &WorkspaceAPIExportClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceAPIOperationClient creates a new instance of WorkspaceAPIOperationClient. +func (c *ClientFactory) NewWorkspaceAPIOperationClient() *WorkspaceAPIOperationClient { + return &WorkspaceAPIOperationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceAPIOperationPolicyClient creates a new instance of WorkspaceAPIOperationPolicyClient. +func (c *ClientFactory) NewWorkspaceAPIOperationPolicyClient() *WorkspaceAPIOperationPolicyClient { + return &WorkspaceAPIOperationPolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceAPIPolicyClient creates a new instance of WorkspaceAPIPolicyClient. +func (c *ClientFactory) NewWorkspaceAPIPolicyClient() *WorkspaceAPIPolicyClient { + return &WorkspaceAPIPolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceAPIReleaseClient creates a new instance of WorkspaceAPIReleaseClient. +func (c *ClientFactory) NewWorkspaceAPIReleaseClient() *WorkspaceAPIReleaseClient { + return &WorkspaceAPIReleaseClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceAPIRevisionClient creates a new instance of WorkspaceAPIRevisionClient. +func (c *ClientFactory) NewWorkspaceAPIRevisionClient() *WorkspaceAPIRevisionClient { + return &WorkspaceAPIRevisionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceAPISchemaClient creates a new instance of WorkspaceAPISchemaClient. +func (c *ClientFactory) NewWorkspaceAPISchemaClient() *WorkspaceAPISchemaClient { + return &WorkspaceAPISchemaClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceAPIVersionSetClient creates a new instance of WorkspaceAPIVersionSetClient. +func (c *ClientFactory) NewWorkspaceAPIVersionSetClient() *WorkspaceAPIVersionSetClient { + return &WorkspaceAPIVersionSetClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceBackendClient creates a new instance of WorkspaceBackendClient. +func (c *ClientFactory) NewWorkspaceBackendClient() *WorkspaceBackendClient { + return &WorkspaceBackendClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceCertificateClient creates a new instance of WorkspaceCertificateClient. +func (c *ClientFactory) NewWorkspaceCertificateClient() *WorkspaceCertificateClient { + return &WorkspaceCertificateClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceClient creates a new instance of WorkspaceClient. +func (c *ClientFactory) NewWorkspaceClient() *WorkspaceClient { + return &WorkspaceClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceDiagnosticClient creates a new instance of WorkspaceDiagnosticClient. +func (c *ClientFactory) NewWorkspaceDiagnosticClient() *WorkspaceDiagnosticClient { + return &WorkspaceDiagnosticClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceGlobalSchemaClient creates a new instance of WorkspaceGlobalSchemaClient. +func (c *ClientFactory) NewWorkspaceGlobalSchemaClient() *WorkspaceGlobalSchemaClient { + return &WorkspaceGlobalSchemaClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceGroupClient creates a new instance of WorkspaceGroupClient. +func (c *ClientFactory) NewWorkspaceGroupClient() *WorkspaceGroupClient { + return &WorkspaceGroupClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceGroupUserClient creates a new instance of WorkspaceGroupUserClient. +func (c *ClientFactory) NewWorkspaceGroupUserClient() *WorkspaceGroupUserClient { + return &WorkspaceGroupUserClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceLinkClient creates a new instance of WorkspaceLinkClient. +func (c *ClientFactory) NewWorkspaceLinkClient() *WorkspaceLinkClient { + return &WorkspaceLinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceLinksClient creates a new instance of WorkspaceLinksClient. +func (c *ClientFactory) NewWorkspaceLinksClient() *WorkspaceLinksClient { + return &WorkspaceLinksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceLoggerClient creates a new instance of WorkspaceLoggerClient. +func (c *ClientFactory) NewWorkspaceLoggerClient() *WorkspaceLoggerClient { + return &WorkspaceLoggerClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceNamedValueClient creates a new instance of WorkspaceNamedValueClient. +func (c *ClientFactory) NewWorkspaceNamedValueClient() *WorkspaceNamedValueClient { + return &WorkspaceNamedValueClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceNotificationClient creates a new instance of WorkspaceNotificationClient. +func (c *ClientFactory) NewWorkspaceNotificationClient() *WorkspaceNotificationClient { + return &WorkspaceNotificationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceNotificationRecipientEmailClient creates a new instance of WorkspaceNotificationRecipientEmailClient. +func (c *ClientFactory) NewWorkspaceNotificationRecipientEmailClient() *WorkspaceNotificationRecipientEmailClient { + return &WorkspaceNotificationRecipientEmailClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceNotificationRecipientUserClient creates a new instance of WorkspaceNotificationRecipientUserClient. +func (c *ClientFactory) NewWorkspaceNotificationRecipientUserClient() *WorkspaceNotificationRecipientUserClient { + return &WorkspaceNotificationRecipientUserClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspacePolicyClient creates a new instance of WorkspacePolicyClient. +func (c *ClientFactory) NewWorkspacePolicyClient() *WorkspacePolicyClient { + return &WorkspacePolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspacePolicyFragmentClient creates a new instance of WorkspacePolicyFragmentClient. +func (c *ClientFactory) NewWorkspacePolicyFragmentClient() *WorkspacePolicyFragmentClient { + return &WorkspacePolicyFragmentClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceProductAPILinkClient creates a new instance of WorkspaceProductAPILinkClient. +func (c *ClientFactory) NewWorkspaceProductAPILinkClient() *WorkspaceProductAPILinkClient { + return &WorkspaceProductAPILinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceProductClient creates a new instance of WorkspaceProductClient. +func (c *ClientFactory) NewWorkspaceProductClient() *WorkspaceProductClient { + return &WorkspaceProductClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceProductGroupLinkClient creates a new instance of WorkspaceProductGroupLinkClient. +func (c *ClientFactory) NewWorkspaceProductGroupLinkClient() *WorkspaceProductGroupLinkClient { + return &WorkspaceProductGroupLinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceProductPolicyClient creates a new instance of WorkspaceProductPolicyClient. +func (c *ClientFactory) NewWorkspaceProductPolicyClient() *WorkspaceProductPolicyClient { + return &WorkspaceProductPolicyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceSubscriptionClient creates a new instance of WorkspaceSubscriptionClient. +func (c *ClientFactory) NewWorkspaceSubscriptionClient() *WorkspaceSubscriptionClient { + return &WorkspaceSubscriptionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceTagAPILinkClient creates a new instance of WorkspaceTagAPILinkClient. +func (c *ClientFactory) NewWorkspaceTagAPILinkClient() *WorkspaceTagAPILinkClient { + return &WorkspaceTagAPILinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceTagClient creates a new instance of WorkspaceTagClient. +func (c *ClientFactory) NewWorkspaceTagClient() *WorkspaceTagClient { + return &WorkspaceTagClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceTagOperationLinkClient creates a new instance of WorkspaceTagOperationLinkClient. +func (c *ClientFactory) NewWorkspaceTagOperationLinkClient() *WorkspaceTagOperationLinkClient { + return &WorkspaceTagOperationLinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspaceTagProductLinkClient creates a new instance of WorkspaceTagProductLinkClient. +func (c *ClientFactory) NewWorkspaceTagProductLinkClient() *WorkspaceTagProductLinkClient { + return &WorkspaceTagProductLinkClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/constants.go new file mode 100644 index 00000000..c9df36c0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/constants.go @@ -0,0 +1,1816 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement" + moduleVersion = "v3.0.0" +) + +// APIGatewaySKUType - Name of the Sku. +type APIGatewaySKUType string + +const ( + // APIGatewaySKUTypeStandard - Standard SKU of the API gateway. + APIGatewaySKUTypeStandard APIGatewaySKUType = "Standard" + // APIGatewaySKUTypeWorkspaceGatewayPremium - Premium SKU of the API gateway to be used in Workspaces. + APIGatewaySKUTypeWorkspaceGatewayPremium APIGatewaySKUType = "WorkspaceGatewayPremium" + // APIGatewaySKUTypeWorkspaceGatewayStandard - Standard SKU of the API gateway to be used in Workspaces. + APIGatewaySKUTypeWorkspaceGatewayStandard APIGatewaySKUType = "WorkspaceGatewayStandard" +) + +// PossibleAPIGatewaySKUTypeValues returns the possible values for the APIGatewaySKUType const type. +func PossibleAPIGatewaySKUTypeValues() []APIGatewaySKUType { + return []APIGatewaySKUType{ + APIGatewaySKUTypeStandard, + APIGatewaySKUTypeWorkspaceGatewayPremium, + APIGatewaySKUTypeWorkspaceGatewayStandard, + } +} + +// APIManagementSKUCapacityScaleType - The scale type applicable to the sku. +type APIManagementSKUCapacityScaleType string + +const ( + APIManagementSKUCapacityScaleTypeAutomatic APIManagementSKUCapacityScaleType = "Automatic" + APIManagementSKUCapacityScaleTypeManual APIManagementSKUCapacityScaleType = "Manual" + APIManagementSKUCapacityScaleTypeNone APIManagementSKUCapacityScaleType = "None" +) + +// PossibleAPIManagementSKUCapacityScaleTypeValues returns the possible values for the APIManagementSKUCapacityScaleType const type. +func PossibleAPIManagementSKUCapacityScaleTypeValues() []APIManagementSKUCapacityScaleType { + return []APIManagementSKUCapacityScaleType{ + APIManagementSKUCapacityScaleTypeAutomatic, + APIManagementSKUCapacityScaleTypeManual, + APIManagementSKUCapacityScaleTypeNone, + } +} + +// APIManagementSKURestrictionsReasonCode - The reason for restriction. +type APIManagementSKURestrictionsReasonCode string + +const ( + APIManagementSKURestrictionsReasonCodeNotAvailableForSubscription APIManagementSKURestrictionsReasonCode = "NotAvailableForSubscription" + APIManagementSKURestrictionsReasonCodeQuotaID APIManagementSKURestrictionsReasonCode = "QuotaId" +) + +// PossibleAPIManagementSKURestrictionsReasonCodeValues returns the possible values for the APIManagementSKURestrictionsReasonCode const type. +func PossibleAPIManagementSKURestrictionsReasonCodeValues() []APIManagementSKURestrictionsReasonCode { + return []APIManagementSKURestrictionsReasonCode{ + APIManagementSKURestrictionsReasonCodeNotAvailableForSubscription, + APIManagementSKURestrictionsReasonCodeQuotaID, + } +} + +// APIManagementSKURestrictionsType - The type of restrictions. +type APIManagementSKURestrictionsType string + +const ( + APIManagementSKURestrictionsTypeLocation APIManagementSKURestrictionsType = "Location" + APIManagementSKURestrictionsTypeZone APIManagementSKURestrictionsType = "Zone" +) + +// PossibleAPIManagementSKURestrictionsTypeValues returns the possible values for the APIManagementSKURestrictionsType const type. +func PossibleAPIManagementSKURestrictionsTypeValues() []APIManagementSKURestrictionsType { + return []APIManagementSKURestrictionsType{ + APIManagementSKURestrictionsTypeLocation, + APIManagementSKURestrictionsTypeZone, + } +} + +// APIType - Type of API. +type APIType string + +const ( + APITypeGraphql APIType = "graphql" + APITypeGrpc APIType = "grpc" + APITypeHTTP APIType = "http" + APITypeOData APIType = "odata" + APITypeSoap APIType = "soap" + APITypeWebsocket APIType = "websocket" +) + +// PossibleAPITypeValues returns the possible values for the APIType const type. +func PossibleAPITypeValues() []APIType { + return []APIType{ + APITypeGraphql, + APITypeGrpc, + APITypeHTTP, + APITypeOData, + APITypeSoap, + APITypeWebsocket, + } +} + +// APIVersionSetContractDetailsVersioningScheme - An value that determines where the API Version identifier will be located +// in a HTTP request. +type APIVersionSetContractDetailsVersioningScheme string + +const ( + // APIVersionSetContractDetailsVersioningSchemeHeader - The API Version is passed in a HTTP header. + APIVersionSetContractDetailsVersioningSchemeHeader APIVersionSetContractDetailsVersioningScheme = "Header" + // APIVersionSetContractDetailsVersioningSchemeQuery - The API Version is passed in a query parameter. + APIVersionSetContractDetailsVersioningSchemeQuery APIVersionSetContractDetailsVersioningScheme = "Query" + // APIVersionSetContractDetailsVersioningSchemeSegment - The API Version is passed in a path segment. + APIVersionSetContractDetailsVersioningSchemeSegment APIVersionSetContractDetailsVersioningScheme = "Segment" +) + +// PossibleAPIVersionSetContractDetailsVersioningSchemeValues returns the possible values for the APIVersionSetContractDetailsVersioningScheme const type. +func PossibleAPIVersionSetContractDetailsVersioningSchemeValues() []APIVersionSetContractDetailsVersioningScheme { + return []APIVersionSetContractDetailsVersioningScheme{ + APIVersionSetContractDetailsVersioningSchemeHeader, + APIVersionSetContractDetailsVersioningSchemeQuery, + APIVersionSetContractDetailsVersioningSchemeSegment, + } +} + +type AccessIDName string + +const ( + AccessIDNameAccess AccessIDName = "access" + AccessIDNameGitAccess AccessIDName = "gitAccess" +) + +// PossibleAccessIDNameValues returns the possible values for the AccessIDName const type. +func PossibleAccessIDNameValues() []AccessIDName { + return []AccessIDName{ + AccessIDNameAccess, + AccessIDNameGitAccess, + } +} + +// AccessType - The type of access to be used for the storage account. +type AccessType string + +const ( + // AccessTypeAccessKey - Use access key. + AccessTypeAccessKey AccessType = "AccessKey" + // AccessTypeSystemAssignedManagedIdentity - Use system assigned managed identity. + AccessTypeSystemAssignedManagedIdentity AccessType = "SystemAssignedManagedIdentity" + // AccessTypeUserAssignedManagedIdentity - Use user assigned managed identity. + AccessTypeUserAssignedManagedIdentity AccessType = "UserAssignedManagedIdentity" +) + +// PossibleAccessTypeValues returns the possible values for the AccessType const type. +func PossibleAccessTypeValues() []AccessType { + return []AccessType{ + AccessTypeAccessKey, + AccessTypeSystemAssignedManagedIdentity, + AccessTypeUserAssignedManagedIdentity, + } +} + +// AlwaysLog - Specifies for what type of messages sampling settings should not apply. +type AlwaysLog string + +const ( + // AlwaysLogAllErrors - Always log all erroneous request regardless of sampling settings. + AlwaysLogAllErrors AlwaysLog = "allErrors" +) + +// PossibleAlwaysLogValues returns the possible values for the AlwaysLog const type. +func PossibleAlwaysLogValues() []AlwaysLog { + return []AlwaysLog{ + AlwaysLogAllErrors, + } +} + +// ApimIdentityType - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an +// implicitly created identity and a set of user assigned identities. The type 'None' will remove any +// identities from the service. +type ApimIdentityType string + +const ( + ApimIdentityTypeNone ApimIdentityType = "None" + ApimIdentityTypeSystemAssigned ApimIdentityType = "SystemAssigned" + ApimIdentityTypeSystemAssignedUserAssigned ApimIdentityType = "SystemAssigned, UserAssigned" + ApimIdentityTypeUserAssigned ApimIdentityType = "UserAssigned" +) + +// PossibleApimIdentityTypeValues returns the possible values for the ApimIdentityType const type. +func PossibleApimIdentityTypeValues() []ApimIdentityType { + return []ApimIdentityType{ + ApimIdentityTypeNone, + ApimIdentityTypeSystemAssigned, + ApimIdentityTypeSystemAssignedUserAssigned, + ApimIdentityTypeUserAssigned, + } +} + +type AppType string + +const ( + // AppTypeDeveloperPortal - User create request was sent by new developer portal. + AppTypeDeveloperPortal AppType = "developerPortal" + // AppTypePortal - User create request was sent by legacy developer portal. + AppTypePortal AppType = "portal" +) + +// PossibleAppTypeValues returns the possible values for the AppType const type. +func PossibleAppTypeValues() []AppType { + return []AppType{ + AppTypeDeveloperPortal, + AppTypePortal, + } +} + +// AsyncOperationStatus - Status of an async operation. +type AsyncOperationStatus string + +const ( + AsyncOperationStatusFailed AsyncOperationStatus = "Failed" + AsyncOperationStatusInProgress AsyncOperationStatus = "InProgress" + AsyncOperationStatusStarted AsyncOperationStatus = "Started" + AsyncOperationStatusSucceeded AsyncOperationStatus = "Succeeded" +) + +// PossibleAsyncOperationStatusValues returns the possible values for the AsyncOperationStatus const type. +func PossibleAsyncOperationStatusValues() []AsyncOperationStatus { + return []AsyncOperationStatus{ + AsyncOperationStatusFailed, + AsyncOperationStatusInProgress, + AsyncOperationStatusStarted, + AsyncOperationStatusSucceeded, + } +} + +// AsyncResolverStatus - Status of an async resolver. +type AsyncResolverStatus string + +const ( + AsyncResolverStatusFailed AsyncResolverStatus = "Failed" + AsyncResolverStatusInProgress AsyncResolverStatus = "InProgress" + AsyncResolverStatusStarted AsyncResolverStatus = "Started" + AsyncResolverStatusSucceeded AsyncResolverStatus = "Succeeded" +) + +// PossibleAsyncResolverStatusValues returns the possible values for the AsyncResolverStatus const type. +func PossibleAsyncResolverStatusValues() []AsyncResolverStatus { + return []AsyncResolverStatus{ + AsyncResolverStatusFailed, + AsyncResolverStatusInProgress, + AsyncResolverStatusStarted, + AsyncResolverStatusSucceeded, + } +} + +type AuthorizationMethod string + +const ( + AuthorizationMethodDELETE AuthorizationMethod = "DELETE" + AuthorizationMethodGET AuthorizationMethod = "GET" + AuthorizationMethodHEAD AuthorizationMethod = "HEAD" + AuthorizationMethodOPTIONS AuthorizationMethod = "OPTIONS" + AuthorizationMethodPATCH AuthorizationMethod = "PATCH" + AuthorizationMethodPOST AuthorizationMethod = "POST" + AuthorizationMethodPUT AuthorizationMethod = "PUT" + AuthorizationMethodTRACE AuthorizationMethod = "TRACE" +) + +// PossibleAuthorizationMethodValues returns the possible values for the AuthorizationMethod const type. +func PossibleAuthorizationMethodValues() []AuthorizationMethod { + return []AuthorizationMethod{ + AuthorizationMethodDELETE, + AuthorizationMethodGET, + AuthorizationMethodHEAD, + AuthorizationMethodOPTIONS, + AuthorizationMethodPATCH, + AuthorizationMethodPOST, + AuthorizationMethodPUT, + AuthorizationMethodTRACE, + } +} + +// AuthorizationType - Authorization type options +type AuthorizationType string + +const ( + // AuthorizationTypeOAuth2 - OAuth2 authorization type + AuthorizationTypeOAuth2 AuthorizationType = "OAuth2" +) + +// PossibleAuthorizationTypeValues returns the possible values for the AuthorizationType const type. +func PossibleAuthorizationTypeValues() []AuthorizationType { + return []AuthorizationType{ + AuthorizationTypeOAuth2, + } +} + +// BackendProtocol - Backend communication protocol. +type BackendProtocol string + +const ( + // BackendProtocolHTTP - The Backend is a RESTful service. + BackendProtocolHTTP BackendProtocol = "http" + // BackendProtocolSoap - The Backend is a SOAP service. + BackendProtocolSoap BackendProtocol = "soap" +) + +// PossibleBackendProtocolValues returns the possible values for the BackendProtocol const type. +func PossibleBackendProtocolValues() []BackendProtocol { + return []BackendProtocol{ + BackendProtocolHTTP, + BackendProtocolSoap, + } +} + +// BackendType - Type of the backend. A backend can be either Single or Pool. +type BackendType string + +const ( + // BackendTypePool - supports pool backend + BackendTypePool BackendType = "Pool" + // BackendTypeSingle - supports single backend + BackendTypeSingle BackendType = "Single" +) + +// PossibleBackendTypeValues returns the possible values for the BackendType const type. +func PossibleBackendTypeValues() []BackendType { + return []BackendType{ + BackendTypePool, + BackendTypeSingle, + } +} + +type BearerTokenSendingMethod string + +const ( + BearerTokenSendingMethodAuthorizationHeader BearerTokenSendingMethod = "authorizationHeader" + BearerTokenSendingMethodQuery BearerTokenSendingMethod = "query" +) + +// PossibleBearerTokenSendingMethodValues returns the possible values for the BearerTokenSendingMethod const type. +func PossibleBearerTokenSendingMethodValues() []BearerTokenSendingMethod { + return []BearerTokenSendingMethod{ + BearerTokenSendingMethodAuthorizationHeader, + BearerTokenSendingMethodQuery, + } +} + +// BearerTokenSendingMethods - Form of an authorization grant, which the client uses to request the access token. +type BearerTokenSendingMethods string + +const ( + // BearerTokenSendingMethodsAuthorizationHeader - Access token will be transmitted in the Authorization header using Bearer + // schema + BearerTokenSendingMethodsAuthorizationHeader BearerTokenSendingMethods = "authorizationHeader" + // BearerTokenSendingMethodsQuery - Access token will be transmitted as query parameters. + BearerTokenSendingMethodsQuery BearerTokenSendingMethods = "query" +) + +// PossibleBearerTokenSendingMethodsValues returns the possible values for the BearerTokenSendingMethods const type. +func PossibleBearerTokenSendingMethodsValues() []BearerTokenSendingMethods { + return []BearerTokenSendingMethods{ + BearerTokenSendingMethodsAuthorizationHeader, + BearerTokenSendingMethodsQuery, + } +} + +// CertificateConfigurationStoreName - The System.Security.Cryptography.x509certificates.StoreName certificate store location. +// Only Root and CertificateAuthority are valid locations. +type CertificateConfigurationStoreName string + +const ( + CertificateConfigurationStoreNameCertificateAuthority CertificateConfigurationStoreName = "CertificateAuthority" + CertificateConfigurationStoreNameRoot CertificateConfigurationStoreName = "Root" +) + +// PossibleCertificateConfigurationStoreNameValues returns the possible values for the CertificateConfigurationStoreName const type. +func PossibleCertificateConfigurationStoreNameValues() []CertificateConfigurationStoreName { + return []CertificateConfigurationStoreName{ + CertificateConfigurationStoreNameCertificateAuthority, + CertificateConfigurationStoreNameRoot, + } +} + +// CertificateSource - Certificate Source. +type CertificateSource string + +const ( + CertificateSourceBuiltIn CertificateSource = "BuiltIn" + CertificateSourceCustom CertificateSource = "Custom" + CertificateSourceKeyVault CertificateSource = "KeyVault" + CertificateSourceManaged CertificateSource = "Managed" +) + +// PossibleCertificateSourceValues returns the possible values for the CertificateSource const type. +func PossibleCertificateSourceValues() []CertificateSource { + return []CertificateSource{ + CertificateSourceBuiltIn, + CertificateSourceCustom, + CertificateSourceKeyVault, + CertificateSourceManaged, + } +} + +// CertificateStatus - Certificate Status. +type CertificateStatus string + +const ( + CertificateStatusCompleted CertificateStatus = "Completed" + CertificateStatusFailed CertificateStatus = "Failed" + CertificateStatusInProgress CertificateStatus = "InProgress" +) + +// PossibleCertificateStatusValues returns the possible values for the CertificateStatus const type. +func PossibleCertificateStatusValues() []CertificateStatus { + return []CertificateStatus{ + CertificateStatusCompleted, + CertificateStatusFailed, + CertificateStatusInProgress, + } +} + +type ClientAuthenticationMethod string + +const ( + // ClientAuthenticationMethodBasic - Basic Client Authentication method. + ClientAuthenticationMethodBasic ClientAuthenticationMethod = "Basic" + // ClientAuthenticationMethodBody - Body based Authentication method. + ClientAuthenticationMethodBody ClientAuthenticationMethod = "Body" +) + +// PossibleClientAuthenticationMethodValues returns the possible values for the ClientAuthenticationMethod const type. +func PossibleClientAuthenticationMethodValues() []ClientAuthenticationMethod { + return []ClientAuthenticationMethod{ + ClientAuthenticationMethodBasic, + ClientAuthenticationMethodBody, + } +} + +type ConfigurationIDName string + +const ( + ConfigurationIDNameConfiguration ConfigurationIDName = "configuration" +) + +// PossibleConfigurationIDNameValues returns the possible values for the ConfigurationIDName const type. +func PossibleConfigurationIDNameValues() []ConfigurationIDName { + return []ConfigurationIDName{ + ConfigurationIDNameConfiguration, + } +} + +// Confirmation - Determines the type of confirmation e-mail that will be sent to the newly created user. +type Confirmation string + +const ( + // ConfirmationInvite - Send an e-mail inviting the user to sign-up and complete registration. + ConfirmationInvite Confirmation = "invite" + // ConfirmationSignup - Send an e-mail to the user confirming they have successfully signed up. + ConfirmationSignup Confirmation = "signup" +) + +// PossibleConfirmationValues returns the possible values for the Confirmation const type. +func PossibleConfirmationValues() []Confirmation { + return []Confirmation{ + ConfirmationInvite, + ConfirmationSignup, + } +} + +// ConnectionStatus - The connection status. +type ConnectionStatus string + +const ( + ConnectionStatusConnected ConnectionStatus = "Connected" + ConnectionStatusDegraded ConnectionStatus = "Degraded" + ConnectionStatusDisconnected ConnectionStatus = "Disconnected" + ConnectionStatusUnknown ConnectionStatus = "Unknown" +) + +// PossibleConnectionStatusValues returns the possible values for the ConnectionStatus const type. +func PossibleConnectionStatusValues() []ConnectionStatus { + return []ConnectionStatus{ + ConnectionStatusConnected, + ConnectionStatusDegraded, + ConnectionStatusDisconnected, + ConnectionStatusUnknown, + } +} + +// ConnectivityCheckProtocol - The request's protocol. Specific protocol configuration can be available based on this selection. +// The specified destination address must be coherent with this value. +type ConnectivityCheckProtocol string + +const ( + ConnectivityCheckProtocolHTTP ConnectivityCheckProtocol = "HTTP" + ConnectivityCheckProtocolHTTPS ConnectivityCheckProtocol = "HTTPS" + ConnectivityCheckProtocolTCP ConnectivityCheckProtocol = "TCP" +) + +// PossibleConnectivityCheckProtocolValues returns the possible values for the ConnectivityCheckProtocol const type. +func PossibleConnectivityCheckProtocolValues() []ConnectivityCheckProtocol { + return []ConnectivityCheckProtocol{ + ConnectivityCheckProtocolHTTP, + ConnectivityCheckProtocolHTTPS, + ConnectivityCheckProtocolTCP, + } +} + +// ConnectivityStatusType - Resource Connectivity Status Type identifier. +type ConnectivityStatusType string + +const ( + ConnectivityStatusTypeFailure ConnectivityStatusType = "failure" + ConnectivityStatusTypeInitializing ConnectivityStatusType = "initializing" + ConnectivityStatusTypeSuccess ConnectivityStatusType = "success" +) + +// PossibleConnectivityStatusTypeValues returns the possible values for the ConnectivityStatusType const type. +func PossibleConnectivityStatusTypeValues() []ConnectivityStatusType { + return []ConnectivityStatusType{ + ConnectivityStatusTypeFailure, + ConnectivityStatusTypeInitializing, + ConnectivityStatusTypeSuccess, + } +} + +// ContentFormat - Format of the Content in which the API is getting imported. New formats can be added in the future +type ContentFormat string + +const ( + // ContentFormatGraphqlLink - The GraphQL API endpoint hosted on a publicly accessible internet address. + ContentFormatGraphqlLink ContentFormat = "graphql-link" + // ContentFormatGrpc - The contents are inline and Content Type is a gRPC protobuf file. + ContentFormatGrpc ContentFormat = "grpc" + // ContentFormatGrpcLink - The gRPC protobuf file is hosted on a publicly accessible internet address. + ContentFormatGrpcLink ContentFormat = "grpc-link" + // ContentFormatOData - The contents are inline and Content Type is a OData XML Document. + ContentFormatOData ContentFormat = "odata" + // ContentFormatODataLink - The OData metadata document hosted on a publicly accessible internet address. + ContentFormatODataLink ContentFormat = "odata-link" + // ContentFormatOpenapi - The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. + ContentFormatOpenapi ContentFormat = "openapi" + // ContentFormatOpenapiJSON - The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. + ContentFormatOpenapiJSON ContentFormat = "openapi+json" + // ContentFormatOpenapiJSONLink - The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. + ContentFormatOpenapiJSONLink ContentFormat = "openapi+json-link" + // ContentFormatOpenapiLink - The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. + ContentFormatOpenapiLink ContentFormat = "openapi-link" + // ContentFormatSwaggerJSON - The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. + ContentFormatSwaggerJSON ContentFormat = "swagger-json" + // ContentFormatSwaggerLinkJSON - The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. + ContentFormatSwaggerLinkJSON ContentFormat = "swagger-link-json" + // ContentFormatWadlLinkJSON - The WADL document is hosted on a publicly accessible internet address. + ContentFormatWadlLinkJSON ContentFormat = "wadl-link-json" + // ContentFormatWadlXML - The contents are inline and Content type is a WADL document. + ContentFormatWadlXML ContentFormat = "wadl-xml" + // ContentFormatWsdl - The contents are inline and the document is a WSDL/Soap document. + ContentFormatWsdl ContentFormat = "wsdl" + // ContentFormatWsdlLink - The WSDL document is hosted on a publicly accessible internet address. + ContentFormatWsdlLink ContentFormat = "wsdl-link" +) + +// PossibleContentFormatValues returns the possible values for the ContentFormat const type. +func PossibleContentFormatValues() []ContentFormat { + return []ContentFormat{ + ContentFormatGraphqlLink, + ContentFormatGrpc, + ContentFormatGrpcLink, + ContentFormatOData, + ContentFormatODataLink, + ContentFormatOpenapi, + ContentFormatOpenapiJSON, + ContentFormatOpenapiJSONLink, + ContentFormatOpenapiLink, + ContentFormatSwaggerJSON, + ContentFormatSwaggerLinkJSON, + ContentFormatWadlLinkJSON, + ContentFormatWadlXML, + ContentFormatWsdl, + ContentFormatWsdlLink, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// DataMaskingMode - Data masking mode. +type DataMaskingMode string + +const ( + // DataMaskingModeHide - Hide the presence of an entity. + DataMaskingModeHide DataMaskingMode = "Hide" + // DataMaskingModeMask - Mask the value of an entity. + DataMaskingModeMask DataMaskingMode = "Mask" +) + +// PossibleDataMaskingModeValues returns the possible values for the DataMaskingMode const type. +func PossibleDataMaskingModeValues() []DataMaskingMode { + return []DataMaskingMode{ + DataMaskingModeHide, + DataMaskingModeMask, + } +} + +// DeveloperPortalStatus - Status of developer portal in this API Management service. +type DeveloperPortalStatus string + +const ( + // DeveloperPortalStatusDisabled - Developer Portal is disabled for the service. + DeveloperPortalStatusDisabled DeveloperPortalStatus = "Disabled" + // DeveloperPortalStatusEnabled - Developer Portal is enabled for the service. + DeveloperPortalStatusEnabled DeveloperPortalStatus = "Enabled" +) + +// PossibleDeveloperPortalStatusValues returns the possible values for the DeveloperPortalStatus const type. +func PossibleDeveloperPortalStatusValues() []DeveloperPortalStatus { + return []DeveloperPortalStatus{ + DeveloperPortalStatusDisabled, + DeveloperPortalStatusEnabled, + } +} + +type ExportAPI string + +const ( + ExportAPITrue ExportAPI = "true" +) + +// PossibleExportAPIValues returns the possible values for the ExportAPI const type. +func PossibleExportAPIValues() []ExportAPI { + return []ExportAPI{ + ExportAPITrue, + } +} + +type ExportFormat string + +const ( + // ExportFormatOpenapi - Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. + ExportFormatOpenapi ExportFormat = "openapi-link" + // ExportFormatOpenapiJSON - Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. + ExportFormatOpenapiJSON ExportFormat = "openapi+json-link" + // ExportFormatSwagger - Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. + ExportFormatSwagger ExportFormat = "swagger-link" + // ExportFormatWadl - Export the Api Definition in WADL Schema to Storage Blob. + ExportFormatWadl ExportFormat = "wadl-link" + // ExportFormatWsdl - Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` + ExportFormatWsdl ExportFormat = "wsdl-link" +) + +// PossibleExportFormatValues returns the possible values for the ExportFormat const type. +func PossibleExportFormatValues() []ExportFormat { + return []ExportFormat{ + ExportFormatOpenapi, + ExportFormatOpenapiJSON, + ExportFormatSwagger, + ExportFormatWadl, + ExportFormatWsdl, + } +} + +// ExportResultFormat - Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. +type ExportResultFormat string + +const ( + // ExportResultFormatOpenAPI - Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. + ExportResultFormatOpenAPI ExportResultFormat = "openapi-link" + // ExportResultFormatSwagger - The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. + ExportResultFormatSwagger ExportResultFormat = "swagger-link-json" + // ExportResultFormatWadl - Export the API Definition in WADL Schema to Storage Blob. + ExportResultFormatWadl ExportResultFormat = "wadl-link-json" + // ExportResultFormatWsdl - The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs + // of Type `soap` + ExportResultFormatWsdl ExportResultFormat = "wsdl-link+xml" +) + +// PossibleExportResultFormatValues returns the possible values for the ExportResultFormat const type. +func PossibleExportResultFormatValues() []ExportResultFormat { + return []ExportResultFormat{ + ExportResultFormatOpenAPI, + ExportResultFormatSwagger, + ExportResultFormatWadl, + ExportResultFormatWsdl, + } +} + +// GatewayListDebugCredentialsContractPurpose - Purpose of debug credential. +type GatewayListDebugCredentialsContractPurpose string + +const ( + // GatewayListDebugCredentialsContractPurposeTracing - The tracing purpose. + GatewayListDebugCredentialsContractPurposeTracing GatewayListDebugCredentialsContractPurpose = "tracing" +) + +// PossibleGatewayListDebugCredentialsContractPurposeValues returns the possible values for the GatewayListDebugCredentialsContractPurpose const type. +func PossibleGatewayListDebugCredentialsContractPurposeValues() []GatewayListDebugCredentialsContractPurpose { + return []GatewayListDebugCredentialsContractPurpose{ + GatewayListDebugCredentialsContractPurposeTracing, + } +} + +// GatewaySKUCapacityScaleType - The scale type applicable to the sku. +type GatewaySKUCapacityScaleType string + +const ( + // GatewaySKUCapacityScaleTypeAutomatic - Supported scale type automatic. + GatewaySKUCapacityScaleTypeAutomatic GatewaySKUCapacityScaleType = "Automatic" + // GatewaySKUCapacityScaleTypeManual - Supported scale type manual. + GatewaySKUCapacityScaleTypeManual GatewaySKUCapacityScaleType = "Manual" + // GatewaySKUCapacityScaleTypeNone - Scaling not supported. + GatewaySKUCapacityScaleTypeNone GatewaySKUCapacityScaleType = "None" +) + +// PossibleGatewaySKUCapacityScaleTypeValues returns the possible values for the GatewaySKUCapacityScaleType const type. +func PossibleGatewaySKUCapacityScaleTypeValues() []GatewaySKUCapacityScaleType { + return []GatewaySKUCapacityScaleType{ + GatewaySKUCapacityScaleTypeAutomatic, + GatewaySKUCapacityScaleTypeManual, + GatewaySKUCapacityScaleTypeNone, + } +} + +type GrantType string + +const ( + // GrantTypeAuthorizationCode - Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1. + GrantTypeAuthorizationCode GrantType = "authorizationCode" + // GrantTypeClientCredentials - Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4. + GrantTypeClientCredentials GrantType = "clientCredentials" + // GrantTypeImplicit - Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2. + GrantTypeImplicit GrantType = "implicit" + // GrantTypeResourceOwnerPassword - Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3. + GrantTypeResourceOwnerPassword GrantType = "resourceOwnerPassword" +) + +// PossibleGrantTypeValues returns the possible values for the GrantType const type. +func PossibleGrantTypeValues() []GrantType { + return []GrantType{ + GrantTypeAuthorizationCode, + GrantTypeClientCredentials, + GrantTypeImplicit, + GrantTypeResourceOwnerPassword, + } +} + +// GroupType - Group type. +type GroupType string + +const ( + GroupTypeCustom GroupType = "custom" + GroupTypeExternal GroupType = "external" + GroupTypeSystem GroupType = "system" +) + +// PossibleGroupTypeValues returns the possible values for the GroupType const type. +func PossibleGroupTypeValues() []GroupType { + return []GroupType{ + GroupTypeCustom, + GroupTypeExternal, + GroupTypeSystem, + } +} + +// HTTPCorrelationProtocol - Sets correlation protocol to use for Application Insights diagnostics. +type HTTPCorrelationProtocol string + +const ( + // HTTPCorrelationProtocolLegacy - Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md. + HTTPCorrelationProtocolLegacy HTTPCorrelationProtocol = "Legacy" + // HTTPCorrelationProtocolNone - Do not read and inject correlation headers. + HTTPCorrelationProtocolNone HTTPCorrelationProtocol = "None" + // HTTPCorrelationProtocolW3C - Inject Trace Context headers. See https://w3c.github.io/trace-context. + HTTPCorrelationProtocolW3C HTTPCorrelationProtocol = "W3C" +) + +// PossibleHTTPCorrelationProtocolValues returns the possible values for the HTTPCorrelationProtocol const type. +func PossibleHTTPCorrelationProtocolValues() []HTTPCorrelationProtocol { + return []HTTPCorrelationProtocol{ + HTTPCorrelationProtocolLegacy, + HTTPCorrelationProtocolNone, + HTTPCorrelationProtocolW3C, + } +} + +// HostnameType - Hostname type. +type HostnameType string + +const ( + HostnameTypeConfigurationAPI HostnameType = "ConfigurationApi" + HostnameTypeDeveloperPortal HostnameType = "DeveloperPortal" + HostnameTypeManagement HostnameType = "Management" + HostnameTypePortal HostnameType = "Portal" + HostnameTypeProxy HostnameType = "Proxy" + HostnameTypeScm HostnameType = "Scm" +) + +// PossibleHostnameTypeValues returns the possible values for the HostnameType const type. +func PossibleHostnameTypeValues() []HostnameType { + return []HostnameType{ + HostnameTypeConfigurationAPI, + HostnameTypeDeveloperPortal, + HostnameTypeManagement, + HostnameTypePortal, + HostnameTypeProxy, + HostnameTypeScm, + } +} + +type IdentityProviderType string + +const ( + // IdentityProviderTypeAAD - Azure Active Directory as Identity provider. + IdentityProviderTypeAAD IdentityProviderType = "aad" + // IdentityProviderTypeAADB2C - Azure Active Directory B2C as Identity provider. + IdentityProviderTypeAADB2C IdentityProviderType = "aadB2C" + // IdentityProviderTypeFacebook - Facebook as Identity provider. + IdentityProviderTypeFacebook IdentityProviderType = "facebook" + // IdentityProviderTypeGoogle - Google as Identity provider. + IdentityProviderTypeGoogle IdentityProviderType = "google" + // IdentityProviderTypeMicrosoft - Microsoft Live as Identity provider. + IdentityProviderTypeMicrosoft IdentityProviderType = "microsoft" + // IdentityProviderTypeTwitter - Twitter as Identity provider. + IdentityProviderTypeTwitter IdentityProviderType = "twitter" +) + +// PossibleIdentityProviderTypeValues returns the possible values for the IdentityProviderType const type. +func PossibleIdentityProviderTypeValues() []IdentityProviderType { + return []IdentityProviderType{ + IdentityProviderTypeAAD, + IdentityProviderTypeAADB2C, + IdentityProviderTypeFacebook, + IdentityProviderTypeGoogle, + IdentityProviderTypeMicrosoft, + IdentityProviderTypeTwitter, + } +} + +// IssueType - The type of issue. +type IssueType string + +const ( + IssueTypeAgentStopped IssueType = "AgentStopped" + IssueTypeDNSResolution IssueType = "DnsResolution" + IssueTypeGuestFirewall IssueType = "GuestFirewall" + IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" + IssueTypePlatform IssueType = "Platform" + IssueTypePortThrottled IssueType = "PortThrottled" + IssueTypeSocketBind IssueType = "SocketBind" + IssueTypeUnknown IssueType = "Unknown" + IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" +) + +// PossibleIssueTypeValues returns the possible values for the IssueType const type. +func PossibleIssueTypeValues() []IssueType { + return []IssueType{ + IssueTypeAgentStopped, + IssueTypeDNSResolution, + IssueTypeGuestFirewall, + IssueTypeNetworkSecurityRule, + IssueTypePlatform, + IssueTypePortThrottled, + IssueTypeSocketBind, + IssueTypeUnknown, + IssueTypeUserDefinedRoute, + } +} + +// KeyType - The Key to be used to generate token for user. +type KeyType string + +const ( + KeyTypePrimary KeyType = "primary" + KeyTypeSecondary KeyType = "secondary" +) + +// PossibleKeyTypeValues returns the possible values for the KeyType const type. +func PossibleKeyTypeValues() []KeyType { + return []KeyType{ + KeyTypePrimary, + KeyTypeSecondary, + } +} + +type KeyVaultRefreshState string + +const ( + // KeyVaultRefreshStateFalse - Entities for which KeyVault refresh succeeded + KeyVaultRefreshStateFalse KeyVaultRefreshState = "false" + // KeyVaultRefreshStateTrue - Entities for which KeyVault refresh failed. + KeyVaultRefreshStateTrue KeyVaultRefreshState = "true" +) + +// PossibleKeyVaultRefreshStateValues returns the possible values for the KeyVaultRefreshState const type. +func PossibleKeyVaultRefreshStateValues() []KeyVaultRefreshState { + return []KeyVaultRefreshState{ + KeyVaultRefreshStateFalse, + KeyVaultRefreshStateTrue, + } +} + +// LegacyAPIState - Indication whether or not the legacy Configuration API (v1) should be exposed on the API Management service. +// Value is optional but must be 'Enabled' or 'Disabled'. If 'Disabled', legacy Configuration +// API (v1) will not be available for self-hosted gateways. Default value is 'Enabled' +type LegacyAPIState string + +const ( + // LegacyAPIStateDisabled - Legacy Configuration API (v1) is disabled for the service and self-hosted gateways can not connect + // to it. + LegacyAPIStateDisabled LegacyAPIState = "Disabled" + // LegacyAPIStateEnabled - Legacy Configuration API (v1) is enabled for the service and self-hosted gateways can connect to + // it. + LegacyAPIStateEnabled LegacyAPIState = "Enabled" +) + +// PossibleLegacyAPIStateValues returns the possible values for the LegacyAPIState const type. +func PossibleLegacyAPIStateValues() []LegacyAPIState { + return []LegacyAPIState{ + LegacyAPIStateDisabled, + LegacyAPIStateEnabled, + } +} + +// LegacyPortalStatus - Status of legacy portal in the API Management service. +type LegacyPortalStatus string + +const ( + // LegacyPortalStatusDisabled - Legacy Portal is disabled for the service. + LegacyPortalStatusDisabled LegacyPortalStatus = "Disabled" + // LegacyPortalStatusEnabled - Legacy Portal is enabled for the service. + LegacyPortalStatusEnabled LegacyPortalStatus = "Enabled" +) + +// PossibleLegacyPortalStatusValues returns the possible values for the LegacyPortalStatus const type. +func PossibleLegacyPortalStatusValues() []LegacyPortalStatus { + return []LegacyPortalStatus{ + LegacyPortalStatusDisabled, + LegacyPortalStatusEnabled, + } +} + +// LoggerType - Logger type. +type LoggerType string + +const ( + // LoggerTypeApplicationInsights - Azure Application Insights as log destination. + LoggerTypeApplicationInsights LoggerType = "applicationInsights" + // LoggerTypeAzureEventHub - Azure Event Hub as log destination. + LoggerTypeAzureEventHub LoggerType = "azureEventHub" + // LoggerTypeAzureMonitor - Azure Monitor + LoggerTypeAzureMonitor LoggerType = "azureMonitor" +) + +// PossibleLoggerTypeValues returns the possible values for the LoggerType const type. +func PossibleLoggerTypeValues() []LoggerType { + return []LoggerType{ + LoggerTypeApplicationInsights, + LoggerTypeAzureEventHub, + LoggerTypeAzureMonitor, + } +} + +// Method - The HTTP method to be used. +type Method string + +const ( + MethodGET Method = "GET" + MethodPOST Method = "POST" +) + +// PossibleMethodValues returns the possible values for the Method const type. +func PossibleMethodValues() []Method { + return []Method{ + MethodGET, + MethodPOST, + } +} + +// MigrateToStv2Mode - Mode of Migration to stv2. Default is PreserveIp. +type MigrateToStv2Mode string + +const ( + // MigrateToStv2ModeNewIP - Migrate API Management service to stv2 from stv1. This will have no downtime as the service configuration + // will be migrated to new infrastructure, but the IP address will changed. + MigrateToStv2ModeNewIP MigrateToStv2Mode = "NewIP" + // MigrateToStv2ModePreserveIP - Migrate API Management service to stv2 from stv1, by reserving the IP Address of the service. + // This will have a downtime of upto 15 minutes, while the IP address is getting migrate to new infrastructure. + MigrateToStv2ModePreserveIP MigrateToStv2Mode = "PreserveIp" +) + +// PossibleMigrateToStv2ModeValues returns the possible values for the MigrateToStv2Mode const type. +func PossibleMigrateToStv2ModeValues() []MigrateToStv2Mode { + return []MigrateToStv2Mode{ + MigrateToStv2ModeNewIP, + MigrateToStv2ModePreserveIP, + } +} + +// NameAvailabilityReason - Invalid indicates the name provided does not match the resource provider’s naming requirements +// (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use +// and is therefore unavailable. +type NameAvailabilityReason string + +const ( + NameAvailabilityReasonAlreadyExists NameAvailabilityReason = "AlreadyExists" + NameAvailabilityReasonInvalid NameAvailabilityReason = "Invalid" + NameAvailabilityReasonValid NameAvailabilityReason = "Valid" +) + +// PossibleNameAvailabilityReasonValues returns the possible values for the NameAvailabilityReason const type. +func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason { + return []NameAvailabilityReason{ + NameAvailabilityReasonAlreadyExists, + NameAvailabilityReasonInvalid, + NameAvailabilityReasonValid, + } +} + +// NatGatewayState - Property can be used to enable NAT Gateway for this API Management service. +type NatGatewayState string + +const ( + // NatGatewayStateDisabled - Nat Gateway is disabled for the service. + NatGatewayStateDisabled NatGatewayState = "Disabled" + // NatGatewayStateEnabled - Nat Gateway is enabled for the service. + NatGatewayStateEnabled NatGatewayState = "Enabled" +) + +// PossibleNatGatewayStateValues returns the possible values for the NatGatewayState const type. +func PossibleNatGatewayStateValues() []NatGatewayState { + return []NatGatewayState{ + NatGatewayStateDisabled, + NatGatewayStateEnabled, + } +} + +type NotificationName string + +const ( + // NotificationNameAccountClosedPublisher - The following email recipients and users will receive email notifications when + // developer closes his account. + NotificationNameAccountClosedPublisher NotificationName = "AccountClosedPublisher" + // NotificationNameBCC - The following recipients will receive blind carbon copies of all emails sent to developers. + NotificationNameBCC NotificationName = "BCC" + // NotificationNameNewApplicationNotificationMessage - The following email recipients and users will receive email notifications + // when new applications are submitted to the application gallery. + NotificationNameNewApplicationNotificationMessage NotificationName = "NewApplicationNotificationMessage" + // NotificationNameNewIssuePublisherNotificationMessage - The following email recipients and users will receive email notifications + // when a new issue or comment is submitted on the developer portal. + NotificationNameNewIssuePublisherNotificationMessage NotificationName = "NewIssuePublisherNotificationMessage" + // NotificationNamePurchasePublisherNotificationMessage - The following email recipients and users will receive email notifications + // about new API product subscriptions. + NotificationNamePurchasePublisherNotificationMessage NotificationName = "PurchasePublisherNotificationMessage" + // NotificationNameQuotaLimitApproachingPublisherNotificationMessage - The following email recipients and users will receive + // email notifications when subscription usage gets close to usage quota. + NotificationNameQuotaLimitApproachingPublisherNotificationMessage NotificationName = "QuotaLimitApproachingPublisherNotificationMessage" + // NotificationNameRequestPublisherNotificationMessage - The following email recipients and users will receive email notifications + // about subscription requests for API products requiring approval. + NotificationNameRequestPublisherNotificationMessage NotificationName = "RequestPublisherNotificationMessage" +) + +// PossibleNotificationNameValues returns the possible values for the NotificationName const type. +func PossibleNotificationNameValues() []NotificationName { + return []NotificationName{ + NotificationNameAccountClosedPublisher, + NotificationNameBCC, + NotificationNameNewApplicationNotificationMessage, + NotificationNameNewIssuePublisherNotificationMessage, + NotificationNamePurchasePublisherNotificationMessage, + NotificationNameQuotaLimitApproachingPublisherNotificationMessage, + NotificationNameRequestPublisherNotificationMessage, + } +} + +// OAuth2GrantType - OAuth2 grant type options +type OAuth2GrantType string + +const ( + // OAuth2GrantTypeAuthorizationCode - Authorization Code grant + OAuth2GrantTypeAuthorizationCode OAuth2GrantType = "AuthorizationCode" + // OAuth2GrantTypeClientCredentials - Client Credential grant + OAuth2GrantTypeClientCredentials OAuth2GrantType = "ClientCredentials" +) + +// PossibleOAuth2GrantTypeValues returns the possible values for the OAuth2GrantType const type. +func PossibleOAuth2GrantTypeValues() []OAuth2GrantType { + return []OAuth2GrantType{ + OAuth2GrantTypeAuthorizationCode, + OAuth2GrantTypeClientCredentials, + } +} + +// OperationNameFormat - The format of the Operation Name for Application Insights telemetries. Default is Name. +type OperationNameFormat string + +const ( + // OperationNameFormatName - API_NAME;rev=API_REVISION - OPERATION_NAME + OperationNameFormatName OperationNameFormat = "Name" + // OperationNameFormatURL - HTTP_VERB URL + OperationNameFormatURL OperationNameFormat = "Url" +) + +// PossibleOperationNameFormatValues returns the possible values for the OperationNameFormat const type. +func PossibleOperationNameFormatValues() []OperationNameFormat { + return []OperationNameFormat{ + OperationNameFormatName, + OperationNameFormatURL, + } +} + +// Origin - The origin of the issue. +type Origin string + +const ( + OriginInbound Origin = "Inbound" + OriginLocal Origin = "Local" + OriginOutbound Origin = "Outbound" +) + +// PossibleOriginValues returns the possible values for the Origin const type. +func PossibleOriginValues() []Origin { + return []Origin{ + OriginInbound, + OriginLocal, + OriginOutbound, + } +} + +// PlatformVersion - Compute Platform Version running the service. +type PlatformVersion string + +const ( + // PlatformVersionMtv1 - Platform running the service on Multi Tenant V1 platform. + PlatformVersionMtv1 PlatformVersion = "mtv1" + // PlatformVersionStv1 - Platform running the service on Single Tenant V1 platform. + PlatformVersionStv1 PlatformVersion = "stv1" + // PlatformVersionStv2 - Platform running the service on Single Tenant V2 platform. + PlatformVersionStv2 PlatformVersion = "stv2" + // PlatformVersionStv21 - Platform running the service on Single Tenant V2 platform on newer Hardware. + PlatformVersionStv21 PlatformVersion = "stv2.1" + // PlatformVersionUndetermined - Platform version cannot be determined, as compute platform is not deployed. + PlatformVersionUndetermined PlatformVersion = "undetermined" +) + +// PossiblePlatformVersionValues returns the possible values for the PlatformVersion const type. +func PossiblePlatformVersionValues() []PlatformVersion { + return []PlatformVersion{ + PlatformVersionMtv1, + PlatformVersionStv1, + PlatformVersionStv2, + PlatformVersionStv21, + PlatformVersionUndetermined, + } +} + +// PolicyComplianceState - Policy Restriction Compliance State +type PolicyComplianceState string + +const ( + // PolicyComplianceStateCompliant - The scope in restriction is in compliance. + PolicyComplianceStateCompliant PolicyComplianceState = "Compliant" + // PolicyComplianceStateNonCompliant - The scope in restriction is out of compliance. + PolicyComplianceStateNonCompliant PolicyComplianceState = "NonCompliant" + // PolicyComplianceStatePending - The policy restriction compliance state has not yet been determined. + PolicyComplianceStatePending PolicyComplianceState = "Pending" +) + +// PossiblePolicyComplianceStateValues returns the possible values for the PolicyComplianceState const type. +func PossiblePolicyComplianceStateValues() []PolicyComplianceState { + return []PolicyComplianceState{ + PolicyComplianceStateCompliant, + PolicyComplianceStateNonCompliant, + PolicyComplianceStatePending, + } +} + +// PolicyContentFormat - Format of the policyContent. +type PolicyContentFormat string + +const ( + // PolicyContentFormatRawxml - The contents are inline and Content type is a non XML encoded policy document. + PolicyContentFormatRawxml PolicyContentFormat = "rawxml" + // PolicyContentFormatRawxmlLink - The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from + // the API Management service. + PolicyContentFormatRawxmlLink PolicyContentFormat = "rawxml-link" + // PolicyContentFormatXML - The contents are inline and Content type is an XML document. + PolicyContentFormatXML PolicyContentFormat = "xml" + // PolicyContentFormatXMLLink - The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. + PolicyContentFormatXMLLink PolicyContentFormat = "xml-link" +) + +// PossiblePolicyContentFormatValues returns the possible values for the PolicyContentFormat const type. +func PossiblePolicyContentFormatValues() []PolicyContentFormat { + return []PolicyContentFormat{ + PolicyContentFormatRawxml, + PolicyContentFormatRawxmlLink, + PolicyContentFormatXML, + PolicyContentFormatXMLLink, + } +} + +type PolicyExportFormat string + +const ( + // PolicyExportFormatRawxml - The contents are inline and Content type is a non XML encoded policy document. + PolicyExportFormatRawxml PolicyExportFormat = "rawxml" + // PolicyExportFormatXML - The contents are inline and Content type is an XML document. + PolicyExportFormatXML PolicyExportFormat = "xml" +) + +// PossiblePolicyExportFormatValues returns the possible values for the PolicyExportFormat const type. +func PossiblePolicyExportFormatValues() []PolicyExportFormat { + return []PolicyExportFormat{ + PolicyExportFormatRawxml, + PolicyExportFormatXML, + } +} + +type PolicyFragmentContentFormat string + +const ( + // PolicyFragmentContentFormatRawxml - The contents are inline and Content type is a non XML encoded policy document. + PolicyFragmentContentFormatRawxml PolicyFragmentContentFormat = "rawxml" + // PolicyFragmentContentFormatXML - The contents are inline and Content type is an XML document. + PolicyFragmentContentFormatXML PolicyFragmentContentFormat = "xml" +) + +// PossiblePolicyFragmentContentFormatValues returns the possible values for the PolicyFragmentContentFormat const type. +func PossiblePolicyFragmentContentFormatValues() []PolicyFragmentContentFormat { + return []PolicyFragmentContentFormat{ + PolicyFragmentContentFormatRawxml, + PolicyFragmentContentFormatXML, + } +} + +type PolicyIDName string + +const ( + PolicyIDNamePolicy PolicyIDName = "policy" +) + +// PossiblePolicyIDNameValues returns the possible values for the PolicyIDName const type. +func PossiblePolicyIDNameValues() []PolicyIDName { + return []PolicyIDName{ + PolicyIDNamePolicy, + } +} + +// PolicyRestrictionRequireBase - Indicates if base policy should be enforced for the policy document. +type PolicyRestrictionRequireBase string + +const ( + // PolicyRestrictionRequireBaseFalse - The policy does not require to have base policy + PolicyRestrictionRequireBaseFalse PolicyRestrictionRequireBase = "false" + // PolicyRestrictionRequireBaseTrue - The policy is required to have base policy + PolicyRestrictionRequireBaseTrue PolicyRestrictionRequireBase = "true" +) + +// PossiblePolicyRestrictionRequireBaseValues returns the possible values for the PolicyRestrictionRequireBase const type. +func PossiblePolicyRestrictionRequireBaseValues() []PolicyRestrictionRequireBase { + return []PolicyRestrictionRequireBase{ + PolicyRestrictionRequireBaseFalse, + PolicyRestrictionRequireBaseTrue, + } +} + +type PolicyScopeContract string + +const ( + PolicyScopeContractAPI PolicyScopeContract = "Api" + PolicyScopeContractAll PolicyScopeContract = "All" + PolicyScopeContractOperation PolicyScopeContract = "Operation" + PolicyScopeContractProduct PolicyScopeContract = "Product" + PolicyScopeContractTenant PolicyScopeContract = "Tenant" +) + +// PossiblePolicyScopeContractValues returns the possible values for the PolicyScopeContract const type. +func PossiblePolicyScopeContractValues() []PolicyScopeContract { + return []PolicyScopeContract{ + PolicyScopeContractAPI, + PolicyScopeContractAll, + PolicyScopeContractOperation, + PolicyScopeContractProduct, + PolicyScopeContractTenant, + } +} + +// PortalRevisionStatus - Status of the portal's revision. +type PortalRevisionStatus string + +const ( + // PortalRevisionStatusCompleted - Portal's revision publishing completed. + PortalRevisionStatusCompleted PortalRevisionStatus = "completed" + // PortalRevisionStatusFailed - Portal's revision publishing failed. + PortalRevisionStatusFailed PortalRevisionStatus = "failed" + // PortalRevisionStatusPending - Portal's revision has been queued. + PortalRevisionStatusPending PortalRevisionStatus = "pending" + // PortalRevisionStatusPublishing - Portal's revision is being published. + PortalRevisionStatusPublishing PortalRevisionStatus = "publishing" +) + +// PossiblePortalRevisionStatusValues returns the possible values for the PortalRevisionStatus const type. +func PossiblePortalRevisionStatusValues() []PortalRevisionStatus { + return []PortalRevisionStatus{ + PortalRevisionStatusCompleted, + PortalRevisionStatusFailed, + PortalRevisionStatusPending, + PortalRevisionStatusPublishing, + } +} + +// PortalSettingsCspMode - The mode of the developer portal Content Security Policy (CSP). +type PortalSettingsCspMode string + +const ( + // PortalSettingsCspModeDisabled - The browser will not apply the origin restrictions. + PortalSettingsCspModeDisabled PortalSettingsCspMode = "disabled" + // PortalSettingsCspModeEnabled - The browser will block requests not matching allowed origins. + PortalSettingsCspModeEnabled PortalSettingsCspMode = "enabled" + // PortalSettingsCspModeReportOnly - The browser will report requests not matching allowed origins without blocking them. + PortalSettingsCspModeReportOnly PortalSettingsCspMode = "reportOnly" +) + +// PossiblePortalSettingsCspModeValues returns the possible values for the PortalSettingsCspMode const type. +func PossiblePortalSettingsCspModeValues() []PortalSettingsCspMode { + return []PortalSettingsCspMode{ + PortalSettingsCspModeDisabled, + PortalSettingsCspModeEnabled, + PortalSettingsCspModeReportOnly, + } +} + +// PreferredIPVersion - The IP version to be used. Only IPv4 is supported for now. +type PreferredIPVersion string + +const ( + PreferredIPVersionIPv4 PreferredIPVersion = "IPv4" +) + +// PossiblePreferredIPVersionValues returns the possible values for the PreferredIPVersion const type. +func PossiblePreferredIPVersionValues() []PreferredIPVersion { + return []PreferredIPVersion{ + PreferredIPVersionIPv4, + } +} + +// PrivateEndpointConnectionProvisioningState - The current provisioning state. +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +// PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type. +func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { + return []PrivateEndpointConnectionProvisioningState{ + PrivateEndpointConnectionProvisioningStateCreating, + PrivateEndpointConnectionProvisioningStateDeleting, + PrivateEndpointConnectionProvisioningStateFailed, + PrivateEndpointConnectionProvisioningStateSucceeded, + } +} + +// PrivateEndpointServiceConnectionStatus - The private endpoint connection status. +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +// PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type. +func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { + return []PrivateEndpointServiceConnectionStatus{ + PrivateEndpointServiceConnectionStatusApproved, + PrivateEndpointServiceConnectionStatusPending, + PrivateEndpointServiceConnectionStatusRejected, + } +} + +// ProductState - whether product is published or not. Published products are discoverable by users of developer portal. Non +// published products are visible only to administrators. Default state of Product is +// notPublished. +type ProductState string + +const ( + ProductStateNotPublished ProductState = "notPublished" + ProductStatePublished ProductState = "published" +) + +// PossibleProductStateValues returns the possible values for the ProductState const type. +func PossibleProductStateValues() []ProductState { + return []ProductState{ + ProductStateNotPublished, + ProductStatePublished, + } +} + +type Protocol string + +const ( + ProtocolHTTP Protocol = "http" + ProtocolHTTPS Protocol = "https" + ProtocolWs Protocol = "ws" + ProtocolWss Protocol = "wss" +) + +// PossibleProtocolValues returns the possible values for the Protocol const type. +func PossibleProtocolValues() []Protocol { + return []Protocol{ + ProtocolHTTP, + ProtocolHTTPS, + ProtocolWs, + ProtocolWss, + } +} + +// PublicNetworkAccess - Whether or not public endpoint access is allowed for this API Management service. Value is optional +// but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the +// exclusive access method. Default value is 'Enabled' +type PublicNetworkAccess string + +const ( + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" +) + +// PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. +func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { + return []PublicNetworkAccess{ + PublicNetworkAccessDisabled, + PublicNetworkAccessEnabled, + } +} + +// ResourceSKUCapacityScaleType - The scale type applicable to the sku. +type ResourceSKUCapacityScaleType string + +const ( + // ResourceSKUCapacityScaleTypeAutomatic - Supported scale type automatic. + ResourceSKUCapacityScaleTypeAutomatic ResourceSKUCapacityScaleType = "automatic" + // ResourceSKUCapacityScaleTypeManual - Supported scale type manual. + ResourceSKUCapacityScaleTypeManual ResourceSKUCapacityScaleType = "manual" + // ResourceSKUCapacityScaleTypeNone - Scaling not supported. + ResourceSKUCapacityScaleTypeNone ResourceSKUCapacityScaleType = "none" +) + +// PossibleResourceSKUCapacityScaleTypeValues returns the possible values for the ResourceSKUCapacityScaleType const type. +func PossibleResourceSKUCapacityScaleTypeValues() []ResourceSKUCapacityScaleType { + return []ResourceSKUCapacityScaleType{ + ResourceSKUCapacityScaleTypeAutomatic, + ResourceSKUCapacityScaleTypeManual, + ResourceSKUCapacityScaleTypeNone, + } +} + +// SKUType - Name of the Sku. +type SKUType string + +const ( + // SKUTypeBasic - Basic SKU of Api Management. + SKUTypeBasic SKUType = "Basic" + // SKUTypeBasicV2 - BasicV2 SKU of Api Management. + SKUTypeBasicV2 SKUType = "BasicV2" + // SKUTypeConsumption - Consumption SKU of Api Management. + SKUTypeConsumption SKUType = "Consumption" + // SKUTypeDeveloper - Developer SKU of Api Management. + SKUTypeDeveloper SKUType = "Developer" + // SKUTypeIsolated - Isolated SKU of Api Management. + SKUTypeIsolated SKUType = "Isolated" + // SKUTypePremium - Premium SKU of Api Management. + SKUTypePremium SKUType = "Premium" + // SKUTypeStandard - Standard SKU of Api Management. + SKUTypeStandard SKUType = "Standard" + // SKUTypeStandardV2 - StandardV2 SKU of Api Management. + SKUTypeStandardV2 SKUType = "StandardV2" +) + +// PossibleSKUTypeValues returns the possible values for the SKUType const type. +func PossibleSKUTypeValues() []SKUType { + return []SKUType{ + SKUTypeBasic, + SKUTypeBasicV2, + SKUTypeConsumption, + SKUTypeDeveloper, + SKUTypeIsolated, + SKUTypePremium, + SKUTypeStandard, + SKUTypeStandardV2, + } +} + +// SamplingType - Sampling type. +type SamplingType string + +const ( + // SamplingTypeFixed - Fixed-rate sampling. + SamplingTypeFixed SamplingType = "fixed" +) + +// PossibleSamplingTypeValues returns the possible values for the SamplingType const type. +func PossibleSamplingTypeValues() []SamplingType { + return []SamplingType{ + SamplingTypeFixed, + } +} + +// SchemaType - Schema Type. Immutable. +type SchemaType string + +const ( + // SchemaTypeJSON - Json schema type. + SchemaTypeJSON SchemaType = "json" + // SchemaTypeXML - XML schema type. + SchemaTypeXML SchemaType = "xml" +) + +// PossibleSchemaTypeValues returns the possible values for the SchemaType const type. +func PossibleSchemaTypeValues() []SchemaType { + return []SchemaType{ + SchemaTypeJSON, + SchemaTypeXML, + } +} + +type SettingsTypeName string + +const ( + SettingsTypeNamePublic SettingsTypeName = "public" +) + +// PossibleSettingsTypeNameValues returns the possible values for the SettingsTypeName const type. +func PossibleSettingsTypeNameValues() []SettingsTypeName { + return []SettingsTypeName{ + SettingsTypeNamePublic, + } +} + +// Severity - The severity of the issue. +type Severity string + +const ( + SeverityError Severity = "Error" + SeverityWarning Severity = "Warning" +) + +// PossibleSeverityValues returns the possible values for the Severity const type. +func PossibleSeverityValues() []Severity { + return []Severity{ + SeverityError, + SeverityWarning, + } +} + +// SoapAPIType - Type of API to create. +// * http creates a REST API +// * soap creates a SOAP pass-through API +// * websocket creates websocket API +// * graphql creates GraphQL API. New types can be added in the future. +type SoapAPIType string + +const ( + // SoapAPITypeGRPC - Imports the API having a gRPC front end. + SoapAPITypeGRPC SoapAPIType = "grpc" + // SoapAPITypeGraphQL - Imports the API having a GraphQL front end. + SoapAPITypeGraphQL SoapAPIType = "graphql" + // SoapAPITypeOData - Imports the API having a OData front end. + SoapAPITypeOData SoapAPIType = "odata" + // SoapAPITypeSoapPassThrough - Imports the SOAP API having a SOAP front end. + SoapAPITypeSoapPassThrough SoapAPIType = "soap" + // SoapAPITypeSoapToRest - Imports a SOAP API having a RESTful front end. + SoapAPITypeSoapToRest SoapAPIType = "http" + // SoapAPITypeWebSocket - Imports the API having a Websocket front end. + SoapAPITypeWebSocket SoapAPIType = "websocket" +) + +// PossibleSoapAPITypeValues returns the possible values for the SoapAPIType const type. +func PossibleSoapAPITypeValues() []SoapAPIType { + return []SoapAPIType{ + SoapAPITypeGRPC, + SoapAPITypeGraphQL, + SoapAPITypeOData, + SoapAPITypeSoapPassThrough, + SoapAPITypeSoapToRest, + SoapAPITypeWebSocket, + } +} + +// State - Status of the issue. +type State string + +const ( + // StateClosed - The issue was closed. + StateClosed State = "closed" + // StateOpen - The issue is opened. + StateOpen State = "open" + // StateProposed - The issue is proposed. + StateProposed State = "proposed" + // StateRemoved - The issue was removed. + StateRemoved State = "removed" + // StateResolved - The issue is now resolved. + StateResolved State = "resolved" +) + +// PossibleStateValues returns the possible values for the State const type. +func PossibleStateValues() []State { + return []State{ + StateClosed, + StateOpen, + StateProposed, + StateRemoved, + StateResolved, + } +} + +// SubscriptionState - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription +// is blocked, and the subscriber cannot call any APIs of the product, * submitted – the +// subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription +// request has been denied by an administrator, * cancelled – the +// subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration +// date and was deactivated. +type SubscriptionState string + +const ( + SubscriptionStateActive SubscriptionState = "active" + SubscriptionStateCancelled SubscriptionState = "cancelled" + SubscriptionStateExpired SubscriptionState = "expired" + SubscriptionStateRejected SubscriptionState = "rejected" + SubscriptionStateSubmitted SubscriptionState = "submitted" + SubscriptionStateSuspended SubscriptionState = "suspended" +) + +// PossibleSubscriptionStateValues returns the possible values for the SubscriptionState const type. +func PossibleSubscriptionStateValues() []SubscriptionState { + return []SubscriptionState{ + SubscriptionStateActive, + SubscriptionStateCancelled, + SubscriptionStateExpired, + SubscriptionStateRejected, + SubscriptionStateSubmitted, + SubscriptionStateSuspended, + } +} + +type TemplateName string + +const ( + TemplateNameAccountClosedDeveloper TemplateName = "accountClosedDeveloper" + TemplateNameApplicationApprovedNotificationMessage TemplateName = "applicationApprovedNotificationMessage" + TemplateNameConfirmSignUpIdentityDefault TemplateName = "confirmSignUpIdentityDefault" + TemplateNameEmailChangeIdentityDefault TemplateName = "emailChangeIdentityDefault" + TemplateNameInviteUserNotificationMessage TemplateName = "inviteUserNotificationMessage" + TemplateNameNewCommentNotificationMessage TemplateName = "newCommentNotificationMessage" + TemplateNameNewDeveloperNotificationMessage TemplateName = "newDeveloperNotificationMessage" + TemplateNameNewIssueNotificationMessage TemplateName = "newIssueNotificationMessage" + TemplateNamePasswordResetByAdminNotificationMessage TemplateName = "passwordResetByAdminNotificationMessage" + TemplateNamePasswordResetIdentityDefault TemplateName = "passwordResetIdentityDefault" + TemplateNamePurchaseDeveloperNotificationMessage TemplateName = "purchaseDeveloperNotificationMessage" + TemplateNameQuotaLimitApproachingDeveloperNotificationMessage TemplateName = "quotaLimitApproachingDeveloperNotificationMessage" + TemplateNameRejectDeveloperNotificationMessage TemplateName = "rejectDeveloperNotificationMessage" + TemplateNameRequestDeveloperNotificationMessage TemplateName = "requestDeveloperNotificationMessage" +) + +// PossibleTemplateNameValues returns the possible values for the TemplateName const type. +func PossibleTemplateNameValues() []TemplateName { + return []TemplateName{ + TemplateNameAccountClosedDeveloper, + TemplateNameApplicationApprovedNotificationMessage, + TemplateNameConfirmSignUpIdentityDefault, + TemplateNameEmailChangeIdentityDefault, + TemplateNameInviteUserNotificationMessage, + TemplateNameNewCommentNotificationMessage, + TemplateNameNewDeveloperNotificationMessage, + TemplateNameNewIssueNotificationMessage, + TemplateNamePasswordResetByAdminNotificationMessage, + TemplateNamePasswordResetIdentityDefault, + TemplateNamePurchaseDeveloperNotificationMessage, + TemplateNameQuotaLimitApproachingDeveloperNotificationMessage, + TemplateNameRejectDeveloperNotificationMessage, + TemplateNameRequestDeveloperNotificationMessage, + } +} + +// TranslateRequiredQueryParametersConduct - Strategy of translating required query parameters to template ones. By default +// has value 'template'. Possible values: 'template', 'query' +type TranslateRequiredQueryParametersConduct string + +const ( + // TranslateRequiredQueryParametersConductQuery - Leaves required query parameters as they are (no translation done). + TranslateRequiredQueryParametersConductQuery TranslateRequiredQueryParametersConduct = "query" + // TranslateRequiredQueryParametersConductTemplate - Translates required query parameters to template ones. Is a default value + TranslateRequiredQueryParametersConductTemplate TranslateRequiredQueryParametersConduct = "template" +) + +// PossibleTranslateRequiredQueryParametersConductValues returns the possible values for the TranslateRequiredQueryParametersConduct const type. +func PossibleTranslateRequiredQueryParametersConductValues() []TranslateRequiredQueryParametersConduct { + return []TranslateRequiredQueryParametersConduct{ + TranslateRequiredQueryParametersConductQuery, + TranslateRequiredQueryParametersConductTemplate, + } +} + +// UserState - Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer +// portal or call any APIs of subscribed products. Default state is Active. +type UserState string + +const ( + // UserStateActive - User state is active. + UserStateActive UserState = "active" + // UserStateBlocked - User is blocked. Blocked users cannot authenticate at developer portal or call API. + UserStateBlocked UserState = "blocked" + // UserStateDeleted - User account is closed. All identities and related entities are removed. + UserStateDeleted UserState = "deleted" + // UserStatePending - User account is pending. Requires identity confirmation before it can be made active. + UserStatePending UserState = "pending" +) + +// PossibleUserStateValues returns the possible values for the UserState const type. +func PossibleUserStateValues() []UserState { + return []UserState{ + UserStateActive, + UserStateBlocked, + UserStateDeleted, + UserStatePending, + } +} + +// Verbosity - The verbosity level applied to traces emitted by trace policies. +type Verbosity string + +const ( + // VerbosityError - Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. + VerbosityError Verbosity = "error" + // VerbosityInformation - Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this + // diagnostic instance. + VerbosityInformation Verbosity = "information" + // VerbosityVerbose - All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. + VerbosityVerbose Verbosity = "verbose" +) + +// PossibleVerbosityValues returns the possible values for the Verbosity const type. +func PossibleVerbosityValues() []Verbosity { + return []Verbosity{ + VerbosityError, + VerbosityInformation, + VerbosityVerbose, + } +} + +// VersioningScheme - An value that determines where the API Version identifier will be located in a HTTP request. +type VersioningScheme string + +const ( + // VersioningSchemeHeader - The API Version is passed in a HTTP header. + VersioningSchemeHeader VersioningScheme = "Header" + // VersioningSchemeQuery - The API Version is passed in a query parameter. + VersioningSchemeQuery VersioningScheme = "Query" + // VersioningSchemeSegment - The API Version is passed in a path segment. + VersioningSchemeSegment VersioningScheme = "Segment" +) + +// PossibleVersioningSchemeValues returns the possible values for the VersioningScheme const type. +func PossibleVersioningSchemeValues() []VersioningScheme { + return []VersioningScheme{ + VersioningSchemeHeader, + VersioningSchemeQuery, + VersioningSchemeSegment, + } +} + +// VirtualNetworkType - The type of VPN in which API Management gateway needs to be configured in. +type VirtualNetworkType string + +const ( + // VirtualNetworkTypeExternal - The API Management gateway is part of Virtual Network and it is accessible from Internet. + VirtualNetworkTypeExternal VirtualNetworkType = "External" + // VirtualNetworkTypeInternal - The API Management gateway is part of Virtual Network and it is only accessible from within + // the virtual network. + VirtualNetworkTypeInternal VirtualNetworkType = "Internal" + // VirtualNetworkTypeNone - The API Management gateway is not part of any Virtual Network. + VirtualNetworkTypeNone VirtualNetworkType = "None" +) + +// PossibleVirtualNetworkTypeValues returns the possible values for the VirtualNetworkType const type. +func PossibleVirtualNetworkTypeValues() []VirtualNetworkType { + return []VirtualNetworkType{ + VirtualNetworkTypeExternal, + VirtualNetworkTypeInternal, + VirtualNetworkTypeNone, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/contentitem_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/contentitem_client.go similarity index 77% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/contentitem_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/contentitem_client.go index dda05a01..27f6638c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/contentitem_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/contentitem_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type ContentItemClient struct { } // NewContentItemClient creates a new instance of ContentItemClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewContentItemClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContentItemClient, error) { - cl, err := arm.NewClient(moduleName+".ContentItemClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,30 +43,38 @@ func NewContentItemClient(subscriptionID string, credential azcore.TokenCredenti // CreateOrUpdate - Creates a new developer portal's content item specified by the provided content type. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - contentTypeID - Content type identifier. // - contentItemID - Content item identifier. +// - parameters - Create or update parameters. // - options - ContentItemClientCreateOrUpdateOptions contains the optional parameters for the ContentItemClient.CreateOrUpdate // method. -func (client *ContentItemClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, options *ContentItemClientCreateOrUpdateOptions) (ContentItemClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, contentItemID, options) +func (client *ContentItemClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, parameters ContentItemContract, options *ContentItemClientCreateOrUpdateOptions) (ContentItemClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ContentItemClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, contentItemID, parameters, options) if err != nil { return ContentItemClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContentItemClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ContentItemClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ContentItemClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ContentItemClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, options *ContentItemClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ContentItemClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, parameters ContentItemContract, options *ContentItemClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -98,12 +101,15 @@ func (client *ContentItemClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } return req, nil } @@ -122,8 +128,8 @@ func (client *ContentItemClient) createOrUpdateHandleResponse(resp *http.Respons // Delete - Removes the specified developer portal's content item. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - contentTypeID - Content type identifier. // - contentItemID - Content item identifier. @@ -131,22 +137,28 @@ func (client *ContentItemClient) createOrUpdateHandleResponse(resp *http.Respons // it should be * for unconditional update. // - options - ContentItemClientDeleteOptions contains the optional parameters for the ContentItemClient.Delete method. func (client *ContentItemClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, ifMatch string, options *ContentItemClientDeleteOptions) (ContentItemClientDeleteResponse, error) { + var err error + const operationName = "ContentItemClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, contentItemID, ifMatch, options) if err != nil { return ContentItemClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContentItemClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ContentItemClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ContentItemClientDeleteResponse{}, err } return ContentItemClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *ContentItemClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, ifMatch string, options *ContentItemClientDeleteOptions) (*policy.Request, error) { +func (client *ContentItemClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, ifMatch string, _ *ContentItemClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -173,39 +185,46 @@ func (client *ContentItemClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Returns the developer portal's content item specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - contentTypeID - Content type identifier. // - contentItemID - Content item identifier. // - options - ContentItemClientGetOptions contains the optional parameters for the ContentItemClient.Get method. func (client *ContentItemClient) Get(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, options *ContentItemClientGetOptions) (ContentItemClientGetResponse, error) { + var err error + const operationName = "ContentItemClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, contentItemID, options) if err != nil { return ContentItemClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContentItemClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContentItemClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContentItemClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *ContentItemClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, options *ContentItemClientGetOptions) (*policy.Request, error) { +func (client *ContentItemClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, _ *ContentItemClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -232,7 +251,7 @@ func (client *ContentItemClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -252,30 +271,37 @@ func (client *ContentItemClient) getHandleResponse(resp *http.Response) (Content // GetEntityTag - Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - contentTypeID - Content type identifier. // - contentItemID - Content item identifier. // - options - ContentItemClientGetEntityTagOptions contains the optional parameters for the ContentItemClient.GetEntityTag // method. func (client *ContentItemClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, options *ContentItemClientGetEntityTagOptions) (ContentItemClientGetEntityTagResponse, error) { + var err error + const operationName = "ContentItemClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, contentItemID, options) if err != nil { return ContentItemClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContentItemClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContentItemClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContentItemClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *ContentItemClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, options *ContentItemClientGetEntityTagOptions) (*policy.Request, error) { +func (client *ContentItemClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, contentItemID string, _ *ContentItemClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -302,7 +328,7 @@ func (client *ContentItemClient) getEntityTagCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,18 +336,17 @@ func (client *ContentItemClient) getEntityTagCreateRequest(ctx context.Context, // getEntityTagHandleResponse handles the GetEntityTag response. func (client *ContentItemClient) getEntityTagHandleResponse(resp *http.Response) (ContentItemClientGetEntityTagResponse, error) { - result := ContentItemClientGetEntityTagResponse{} + result := ContentItemClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists developer portal's content items specified by the provided content type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - contentTypeID - Content type identifier. // - options - ContentItemClientListByServiceOptions contains the optional parameters for the ContentItemClient.NewListByServicePager @@ -332,30 +357,25 @@ func (client *ContentItemClient) NewListByServicePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ContentItemClientListByServiceResponse) (ContentItemClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContentItemClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, options) + }, nil) if err != nil { return ContentItemClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ContentItemClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContentItemClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listByServiceCreateRequest creates the ListByService request. -func (client *ContentItemClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, options *ContentItemClientListByServiceOptions) (*policy.Request, error) { +func (client *ContentItemClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, _ *ContentItemClientListByServiceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -378,7 +398,7 @@ func (client *ContentItemClient) listByServiceCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/contenttype_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/contenttype_client.go similarity index 77% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/contenttype_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/contenttype_client.go index 5b29d4ef..dad4e34a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/contenttype_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/contenttype_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type ContentTypeClient struct { } // NewContentTypeClient creates a new instance of ContentTypeClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewContentTypeClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContentTypeClient, error) { - cl, err := arm.NewClient(moduleName+".ContentTypeClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -50,29 +45,37 @@ func NewContentTypeClient(subscriptionID string, credential azcore.TokenCredenti // prefix. Built-in content types can't be modified. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - contentTypeID - Content type identifier. +// - parameters - Create or update parameters. // - options - ContentTypeClientCreateOrUpdateOptions contains the optional parameters for the ContentTypeClient.CreateOrUpdate // method. -func (client *ContentTypeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, options *ContentTypeClientCreateOrUpdateOptions) (ContentTypeClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, options) +func (client *ContentTypeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, parameters ContentTypeContract, options *ContentTypeClientCreateOrUpdateOptions) (ContentTypeClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ContentTypeClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, parameters, options) if err != nil { return ContentTypeClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContentTypeClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ContentTypeClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ContentTypeClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ContentTypeClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, options *ContentTypeClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ContentTypeClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, parameters ContentTypeContract, options *ContentTypeClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -95,12 +98,15 @@ func (client *ContentTypeClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } return req, nil } @@ -121,30 +127,36 @@ func (client *ContentTypeClient) createOrUpdateHandleResponse(resp *http.Respons // c- prefix) can't be removed. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - contentTypeID - Content type identifier. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - ContentTypeClientDeleteOptions contains the optional parameters for the ContentTypeClient.Delete method. func (client *ContentTypeClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, ifMatch string, options *ContentTypeClientDeleteOptions) (ContentTypeClientDeleteResponse, error) { + var err error + const operationName = "ContentTypeClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, ifMatch, options) if err != nil { return ContentTypeClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContentTypeClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ContentTypeClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ContentTypeClientDeleteResponse{}, err } return ContentTypeClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *ContentTypeClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, ifMatch string, options *ContentTypeClientDeleteOptions) (*policy.Request, error) { +func (client *ContentTypeClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, ifMatch string, _ *ContentTypeClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -167,10 +179,10 @@ func (client *ContentTypeClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } @@ -178,28 +190,35 @@ func (client *ContentTypeClient) deleteCreateRequest(ctx context.Context, resour // rules, and constraints. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - contentTypeID - Content type identifier. // - options - ContentTypeClientGetOptions contains the optional parameters for the ContentTypeClient.Get method. func (client *ContentTypeClient) Get(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, options *ContentTypeClientGetOptions) (ContentTypeClientGetResponse, error) { + var err error + const operationName = "ContentTypeClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, contentTypeID, options) if err != nil { return ContentTypeClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContentTypeClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContentTypeClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContentTypeClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *ContentTypeClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, options *ContentTypeClientGetOptions) (*policy.Request, error) { +func (client *ContentTypeClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, contentTypeID string, _ *ContentTypeClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -222,7 +241,7 @@ func (client *ContentTypeClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -243,8 +262,8 @@ func (client *ContentTypeClient) getHandleResponse(resp *http.Response) (Content // NewListByServicePager - Lists the developer portal's content types. Content types describe content items' properties, validation // rules, and constraints. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - ContentTypeClientListByServiceOptions contains the optional parameters for the ContentTypeClient.NewListByServicePager // method. @@ -254,30 +273,25 @@ func (client *ContentTypeClient) NewListByServicePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ContentTypeClientListByServiceResponse) (ContentTypeClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContentTypeClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return ContentTypeClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ContentTypeClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContentTypeClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listByServiceCreateRequest creates the ListByService request. -func (client *ContentTypeClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ContentTypeClientListByServiceOptions) (*policy.Request, error) { +func (client *ContentTypeClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *ContentTypeClientListByServiceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -296,7 +310,7 @@ func (client *ContentTypeClient) listByServiceCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/delegationsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/delegationsettings_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/delegationsettings_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/delegationsettings_client.go index dcb54f63..9c1a057e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/delegationsettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/delegationsettings_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type DelegationSettingsClient struct { } // NewDelegationSettingsClient creates a new instance of DelegationSettingsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDelegationSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DelegationSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".DelegationSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +43,32 @@ func NewDelegationSettingsClient(subscriptionID string, credential azcore.TokenC // CreateOrUpdate - Create or Update Delegation settings. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - parameters - Create or update parameters. // - options - DelegationSettingsClientCreateOrUpdateOptions contains the optional parameters for the DelegationSettingsClient.CreateOrUpdate // method. func (client *DelegationSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalDelegationSettings, options *DelegationSettingsClientCreateOrUpdateOptions) (DelegationSettingsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DelegationSettingsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) if err != nil { return DelegationSettingsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DelegationSettingsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DelegationSettingsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DelegationSettingsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -89,13 +91,16 @@ func (client *DelegationSettingsClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -110,27 +115,34 @@ func (client *DelegationSettingsClient) createOrUpdateHandleResponse(resp *http. // Get - Get Delegation Settings for the Portal. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - DelegationSettingsClientGetOptions contains the optional parameters for the DelegationSettingsClient.Get method. func (client *DelegationSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *DelegationSettingsClientGetOptions) (DelegationSettingsClientGetResponse, error) { + var err error + const operationName = "DelegationSettingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return DelegationSettingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DelegationSettingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DelegationSettingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DelegationSettingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *DelegationSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *DelegationSettingsClientGetOptions) (*policy.Request, error) { +func (client *DelegationSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *DelegationSettingsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -149,7 +161,7 @@ func (client *DelegationSettingsClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -169,28 +181,35 @@ func (client *DelegationSettingsClient) getHandleResponse(resp *http.Response) ( // GetEntityTag - Gets the entity state (Etag) version of the DelegationSettings. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - DelegationSettingsClientGetEntityTagOptions contains the optional parameters for the DelegationSettingsClient.GetEntityTag // method. func (client *DelegationSettingsClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, options *DelegationSettingsClientGetEntityTagOptions) (DelegationSettingsClientGetEntityTagResponse, error) { + var err error + const operationName = "DelegationSettingsClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return DelegationSettingsClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DelegationSettingsClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DelegationSettingsClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DelegationSettingsClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *DelegationSettingsClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *DelegationSettingsClientGetEntityTagOptions) (*policy.Request, error) { +func (client *DelegationSettingsClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *DelegationSettingsClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -209,7 +228,7 @@ func (client *DelegationSettingsClient) getEntityTagCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,39 +236,45 @@ func (client *DelegationSettingsClient) getEntityTagCreateRequest(ctx context.Co // getEntityTagHandleResponse handles the GetEntityTag response. func (client *DelegationSettingsClient) getEntityTagHandleResponse(resp *http.Response) (DelegationSettingsClientGetEntityTagResponse, error) { - result := DelegationSettingsClientGetEntityTagResponse{} + result := DelegationSettingsClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // ListSecrets - Gets the secret validation key of the DelegationSettings. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - DelegationSettingsClientListSecretsOptions contains the optional parameters for the DelegationSettingsClient.ListSecrets // method. func (client *DelegationSettingsClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, options *DelegationSettingsClientListSecretsOptions) (DelegationSettingsClientListSecretsResponse, error) { + var err error + const operationName = "DelegationSettingsClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return DelegationSettingsClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DelegationSettingsClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DelegationSettingsClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DelegationSettingsClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. -func (client *DelegationSettingsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *DelegationSettingsClientListSecretsOptions) (*policy.Request, error) { +func (client *DelegationSettingsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *DelegationSettingsClientListSecretsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -268,7 +293,7 @@ func (client *DelegationSettingsClient) listSecretsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -286,8 +311,8 @@ func (client *DelegationSettingsClient) listSecretsHandleResponse(resp *http.Res // Update - Update Delegation settings. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. @@ -295,22 +320,28 @@ func (client *DelegationSettingsClient) listSecretsHandleResponse(resp *http.Res // - options - DelegationSettingsClientUpdateOptions contains the optional parameters for the DelegationSettingsClient.Update // method. func (client *DelegationSettingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalDelegationSettings, options *DelegationSettingsClientUpdateOptions) (DelegationSettingsClientUpdateResponse, error) { + var err error + const operationName = "DelegationSettingsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, ifMatch, parameters, options) if err != nil { return DelegationSettingsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DelegationSettingsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return DelegationSettingsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DelegationSettingsClientUpdateResponse{}, err } return DelegationSettingsClientUpdateResponse{}, nil } // updateCreateRequest creates the Update request. -func (client *DelegationSettingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalDelegationSettings, options *DelegationSettingsClientUpdateOptions) (*policy.Request, error) { +func (client *DelegationSettingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalDelegationSettings, _ *DelegationSettingsClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -329,9 +360,12 @@ func (client *DelegationSettingsClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/deletedservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/deletedservices_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/deletedservices_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/deletedservices_client.go index 1256ee9e..2c2ba136 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/deletedservices_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/deletedservices_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type DeletedServicesClient struct { } // NewDeletedServicesClient creates a new instance of DeletedServicesClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDeletedServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedServicesClient, error) { - cl, err := arm.NewClient(moduleName+".DeletedServicesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,28 +43,35 @@ func NewDeletedServicesClient(subscriptionID string, credential azcore.TokenCred // GetByName - Get soft-deleted Api Management Service by name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 // - serviceName - The name of the API Management service. // - location - The location of the deleted API Management service. // - options - DeletedServicesClientGetByNameOptions contains the optional parameters for the DeletedServicesClient.GetByName // method. func (client *DeletedServicesClient) GetByName(ctx context.Context, serviceName string, location string, options *DeletedServicesClientGetByNameOptions) (DeletedServicesClientGetByNameResponse, error) { + var err error + const operationName = "DeletedServicesClient.GetByName" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByNameCreateRequest(ctx, serviceName, location, options) if err != nil { return DeletedServicesClientGetByNameResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DeletedServicesClientGetByNameResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedServicesClientGetByNameResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DeletedServicesClientGetByNameResponse{}, err } - return client.getByNameHandleResponse(resp) + resp, err := client.getByNameHandleResponse(httpResp) + return resp, err } // getByNameCreateRequest creates the GetByName request. -func (client *DeletedServicesClient) getByNameCreateRequest(ctx context.Context, serviceName string, location string, options *DeletedServicesClientGetByNameOptions) (*policy.Request, error) { +func (client *DeletedServicesClient) getByNameCreateRequest(ctx context.Context, serviceName string, location string, _ *DeletedServicesClientGetByNameOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}" if serviceName == "" { return nil, errors.New("parameter serviceName cannot be empty") @@ -88,7 +90,7 @@ func (client *DeletedServicesClient) getByNameCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,7 +107,7 @@ func (client *DeletedServicesClient) getByNameHandleResponse(resp *http.Response // NewListBySubscriptionPager - Lists all soft-deleted services available for undelete for the given subscription. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 // - options - DeletedServicesClientListBySubscriptionOptions contains the optional parameters for the DeletedServicesClient.NewListBySubscriptionPager // method. func (client *DeletedServicesClient) NewListBySubscriptionPager(options *DeletedServicesClientListBySubscriptionOptions) *runtime.Pager[DeletedServicesClientListBySubscriptionResponse] { @@ -114,30 +116,25 @@ func (client *DeletedServicesClient) NewListBySubscriptionPager(options *Deleted return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DeletedServicesClientListBySubscriptionResponse) (DeletedServicesClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeletedServicesClientListBySubscriptionResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedServicesClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) if err != nil { return DeletedServicesClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedServicesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *DeletedServicesClient) listBySubscriptionCreateRequest(ctx context.Context, options *DeletedServicesClientListBySubscriptionOptions) (*policy.Request, error) { +func (client *DeletedServicesClient) listBySubscriptionCreateRequest(ctx context.Context, _ *DeletedServicesClientListBySubscriptionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -148,7 +145,7 @@ func (client *DeletedServicesClient) listBySubscriptionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -166,7 +163,7 @@ func (client *DeletedServicesClient) listBySubscriptionHandleResponse(resp *http // BeginPurge - Purges Api Management Service (deletes it with no option to undelete). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 // - serviceName - The name of the API Management service. // - location - The location of the deleted API Management service. // - options - DeletedServicesClientBeginPurgeOptions contains the optional parameters for the DeletedServicesClient.BeginPurge @@ -177,35 +174,45 @@ func (client *DeletedServicesClient) BeginPurge(ctx context.Context, serviceName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeletedServicesClientPurgeResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeletedServicesClientPurgeResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DeletedServicesClientPurgeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeletedServicesClientPurgeResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Purge - Purges Api Management Service (deletes it with no option to undelete). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 func (client *DeletedServicesClient) purge(ctx context.Context, serviceName string, location string, options *DeletedServicesClientBeginPurgeOptions) (*http.Response, error) { + var err error + const operationName = "DeletedServicesClient.BeginPurge" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.purgeCreateRequest(ctx, serviceName, location, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // purgeCreateRequest creates the Purge request. -func (client *DeletedServicesClient) purgeCreateRequest(ctx context.Context, serviceName string, location string, options *DeletedServicesClientBeginPurgeOptions) (*policy.Request, error) { +func (client *DeletedServicesClient) purgeCreateRequest(ctx context.Context, serviceName string, location string, _ *DeletedServicesClientBeginPurgeOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}" if serviceName == "" { return nil, errors.New("parameter serviceName cannot be empty") @@ -224,7 +231,7 @@ func (client *DeletedServicesClient) purgeCreateRequest(ctx context.Context, ser return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/diagnostic_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/diagnostic_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/diagnostic_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/diagnostic_client.go index a55cdec6..628c60f1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/diagnostic_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/diagnostic_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type DiagnosticClient struct { } // NewDiagnosticClient creates a new instance of DiagnosticClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDiagnosticClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiagnosticClient, error) { - cl, err := arm.NewClient(moduleName+".DiagnosticClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,26 +44,33 @@ func NewDiagnosticClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Creates a new Diagnostic or updates an existing one. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. // - parameters - Create parameters. // - options - DiagnosticClientCreateOrUpdateOptions contains the optional parameters for the DiagnosticClient.CreateOrUpdate // method. func (client *DiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, parameters DiagnosticContract, options *DiagnosticClientCreateOrUpdateOptions) (DiagnosticClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DiagnosticClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, diagnosticID, parameters, options) if err != nil { return DiagnosticClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DiagnosticClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DiagnosticClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -95,13 +97,16 @@ func (client *DiagnosticClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,30 +124,36 @@ func (client *DiagnosticClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Deletes the specified Diagnostic. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - DiagnosticClientDeleteOptions contains the optional parameters for the DiagnosticClient.Delete method. func (client *DiagnosticClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string, options *DiagnosticClientDeleteOptions) (DiagnosticClientDeleteResponse, error) { + var err error + const operationName = "DiagnosticClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, diagnosticID, ifMatch, options) if err != nil { return DiagnosticClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DiagnosticClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DiagnosticClientDeleteResponse{}, err } return DiagnosticClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *DiagnosticClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string, options *DiagnosticClientDeleteOptions) (*policy.Request, error) { +func (client *DiagnosticClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string, _ *DiagnosticClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -165,38 +176,45 @@ func (client *DiagnosticClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the Diagnostic specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. // - options - DiagnosticClientGetOptions contains the optional parameters for the DiagnosticClient.Get method. func (client *DiagnosticClient) Get(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, options *DiagnosticClientGetOptions) (DiagnosticClientGetResponse, error) { + var err error + const operationName = "DiagnosticClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, diagnosticID, options) if err != nil { return DiagnosticClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *DiagnosticClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, options *DiagnosticClientGetOptions) (*policy.Request, error) { +func (client *DiagnosticClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, _ *DiagnosticClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -219,7 +237,7 @@ func (client *DiagnosticClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -239,28 +257,35 @@ func (client *DiagnosticClient) getHandleResponse(resp *http.Response) (Diagnost // GetEntityTag - Gets the entity state (Etag) version of the Diagnostic specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. // - options - DiagnosticClientGetEntityTagOptions contains the optional parameters for the DiagnosticClient.GetEntityTag method. func (client *DiagnosticClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, options *DiagnosticClientGetEntityTagOptions) (DiagnosticClientGetEntityTagResponse, error) { + var err error + const operationName = "DiagnosticClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, diagnosticID, options) if err != nil { return DiagnosticClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *DiagnosticClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, options *DiagnosticClientGetEntityTagOptions) (*policy.Request, error) { +func (client *DiagnosticClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, _ *DiagnosticClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -283,7 +308,7 @@ func (client *DiagnosticClient) getEntityTagCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -291,18 +316,17 @@ func (client *DiagnosticClient) getEntityTagCreateRequest(ctx context.Context, r // getEntityTagHandleResponse handles the GetEntityTag response. func (client *DiagnosticClient) getEntityTagHandleResponse(resp *http.Response) (DiagnosticClientGetEntityTagResponse, error) { - result := DiagnosticClientGetEntityTagResponse{} + result := DiagnosticClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists all diagnostics of the API Management service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - DiagnosticClientListByServiceOptions contains the optional parameters for the DiagnosticClient.NewListByServicePager // method. @@ -312,25 +336,20 @@ func (client *DiagnosticClient) NewListByServicePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiagnosticClientListByServiceResponse) (DiagnosticClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return DiagnosticClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -357,13 +376,13 @@ func (client *DiagnosticClient) listByServiceCreateRequest(ctx context.Context, if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -381,8 +400,8 @@ func (client *DiagnosticClient) listByServiceHandleResponse(resp *http.Response) // Update - Updates the details of the Diagnostic specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -390,22 +409,29 @@ func (client *DiagnosticClient) listByServiceHandleResponse(resp *http.Response) // - parameters - Diagnostic Update parameters. // - options - DiagnosticClientUpdateOptions contains the optional parameters for the DiagnosticClient.Update method. func (client *DiagnosticClient) Update(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string, parameters DiagnosticContract, options *DiagnosticClientUpdateOptions) (DiagnosticClientUpdateResponse, error) { + var err error + const operationName = "DiagnosticClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, diagnosticID, ifMatch, parameters, options) if err != nil { return DiagnosticClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *DiagnosticClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string, parameters DiagnosticContract, options *DiagnosticClientUpdateOptions) (*policy.Request, error) { +func (client *DiagnosticClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string, parameters DiagnosticContract, _ *DiagnosticClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -428,11 +454,14 @@ func (client *DiagnosticClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/documentation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/documentation_client.go new file mode 100644 index 00000000..a5d37863 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/documentation_client.go @@ -0,0 +1,478 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// DocumentationClient contains the methods for the Documentation group. +// Don't use this type directly, use NewDocumentationClient() instead. +type DocumentationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDocumentationClient creates a new instance of DocumentationClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDocumentationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DocumentationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DocumentationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates a new Documentation or updates an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - documentationID - Documentation identifier. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - DocumentationClientCreateOrUpdateOptions contains the optional parameters for the DocumentationClient.CreateOrUpdate +// method. +func (client *DocumentationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, parameters DocumentationContract, options *DocumentationClientCreateOrUpdateOptions) (DocumentationClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DocumentationClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, documentationID, parameters, options) + if err != nil { + return DocumentationClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DocumentationClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return DocumentationClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DocumentationClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, parameters DocumentationContract, options *DocumentationClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if documentationID == "" { + return nil, errors.New("parameter documentationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{documentationId}", url.PathEscape(documentationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *DocumentationClient) createOrUpdateHandleResponse(resp *http.Response) (DocumentationClientCreateOrUpdateResponse, error) { + result := DocumentationClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.DocumentationContract); err != nil { + return DocumentationClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified Documentation from an API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - documentationID - Documentation identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - DocumentationClientDeleteOptions contains the optional parameters for the DocumentationClient.Delete method. +func (client *DocumentationClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, ifMatch string, options *DocumentationClientDeleteOptions) (DocumentationClientDeleteResponse, error) { + var err error + const operationName = "DocumentationClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, documentationID, ifMatch, options) + if err != nil { + return DocumentationClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DocumentationClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DocumentationClientDeleteResponse{}, err + } + return DocumentationClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DocumentationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, ifMatch string, _ *DocumentationClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if documentationID == "" { + return nil, errors.New("parameter documentationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{documentationId}", url.PathEscape(documentationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the Documentation specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - documentationID - Documentation identifier. Must be unique in the current API Management service instance. +// - options - DocumentationClientGetOptions contains the optional parameters for the DocumentationClient.Get method. +func (client *DocumentationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, options *DocumentationClientGetOptions) (DocumentationClientGetResponse, error) { + var err error + const operationName = "DocumentationClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, documentationID, options) + if err != nil { + return DocumentationClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DocumentationClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DocumentationClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DocumentationClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, _ *DocumentationClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if documentationID == "" { + return nil, errors.New("parameter documentationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{documentationId}", url.PathEscape(documentationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DocumentationClient) getHandleResponse(resp *http.Response) (DocumentationClientGetResponse, error) { + result := DocumentationClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.DocumentationContract); err != nil { + return DocumentationClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the Documentation by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - documentationID - Documentation identifier. Must be unique in the current API Management service instance. +// - options - DocumentationClientGetEntityTagOptions contains the optional parameters for the DocumentationClient.GetEntityTag +// method. +func (client *DocumentationClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, options *DocumentationClientGetEntityTagOptions) (DocumentationClientGetEntityTagResponse, error) { + var err error + const operationName = "DocumentationClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, documentationID, options) + if err != nil { + return DocumentationClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DocumentationClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DocumentationClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *DocumentationClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, _ *DocumentationClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if documentationID == "" { + return nil, errors.New("parameter documentationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{documentationId}", url.PathEscape(documentationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *DocumentationClient) getEntityTagHandleResponse(resp *http.Response) (DocumentationClientGetEntityTagResponse, error) { + result := DocumentationClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists all Documentations of the API Management service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - DocumentationClientListByServiceOptions contains the optional parameters for the DocumentationClient.NewListByServicePager +// method. +func (client *DocumentationClient) NewListByServicePager(resourceGroupName string, serviceName string, options *DocumentationClientListByServiceOptions) *runtime.Pager[DocumentationClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[DocumentationClientListByServiceResponse]{ + More: func(page DocumentationClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DocumentationClientListByServiceResponse) (DocumentationClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DocumentationClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return DocumentationClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *DocumentationClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *DocumentationClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *DocumentationClient) listByServiceHandleResponse(resp *http.Response) (DocumentationClientListByServiceResponse, error) { + result := DocumentationClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DocumentationCollection); err != nil { + return DocumentationClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the Documentation for an API specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - documentationID - Documentation identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Documentation Update parameters. +// - options - DocumentationClientUpdateOptions contains the optional parameters for the DocumentationClient.Update method. +func (client *DocumentationClient) Update(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, ifMatch string, parameters DocumentationUpdateContract, options *DocumentationClientUpdateOptions) (DocumentationClientUpdateResponse, error) { + var err error + const operationName = "DocumentationClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, documentationID, ifMatch, parameters, options) + if err != nil { + return DocumentationClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DocumentationClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DocumentationClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *DocumentationClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, documentationID string, ifMatch string, parameters DocumentationUpdateContract, _ *DocumentationClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if documentationID == "" { + return nil, errors.New("parameter documentationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{documentationId}", url.PathEscape(documentationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *DocumentationClient) updateHandleResponse(resp *http.Response) (DocumentationClientUpdateResponse, error) { + result := DocumentationClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.DocumentationContract); err != nil { + return DocumentationClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/emailtemplate_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/emailtemplate_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/emailtemplate_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/emailtemplate_client.go index 4d5e321d..e1566ade 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/emailtemplate_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/emailtemplate_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type EmailTemplateClient struct { } // NewEmailTemplateClient creates a new instance of EmailTemplateClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEmailTemplateClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EmailTemplateClient, error) { - cl, err := arm.NewClient(moduleName+".EmailTemplateClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,26 +44,33 @@ func NewEmailTemplateClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Updates an Email Template. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - templateName - Email Template Name Identifier. // - parameters - Email Template update parameters. // - options - EmailTemplateClientCreateOrUpdateOptions contains the optional parameters for the EmailTemplateClient.CreateOrUpdate // method. func (client *EmailTemplateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, parameters EmailTemplateUpdateParameters, options *EmailTemplateClientCreateOrUpdateOptions) (EmailTemplateClientCreateOrUpdateResponse, error) { + var err error + const operationName = "EmailTemplateClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, templateName, parameters, options) if err != nil { return EmailTemplateClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EmailTemplateClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return EmailTemplateClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return EmailTemplateClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -95,13 +97,16 @@ func (client *EmailTemplateClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -116,30 +121,36 @@ func (client *EmailTemplateClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Reset the Email Template to default template provided by the API Management service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - templateName - Email Template Name Identifier. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - EmailTemplateClientDeleteOptions contains the optional parameters for the EmailTemplateClient.Delete method. func (client *EmailTemplateClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string, options *EmailTemplateClientDeleteOptions) (EmailTemplateClientDeleteResponse, error) { + var err error + const operationName = "EmailTemplateClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, templateName, ifMatch, options) if err != nil { return EmailTemplateClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EmailTemplateClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return EmailTemplateClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return EmailTemplateClientDeleteResponse{}, err } return EmailTemplateClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *EmailTemplateClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string, options *EmailTemplateClientDeleteOptions) (*policy.Request, error) { +func (client *EmailTemplateClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string, _ *EmailTemplateClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -162,38 +173,45 @@ func (client *EmailTemplateClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the email template specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - templateName - Email Template Name Identifier. // - options - EmailTemplateClientGetOptions contains the optional parameters for the EmailTemplateClient.Get method. func (client *EmailTemplateClient) Get(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, options *EmailTemplateClientGetOptions) (EmailTemplateClientGetResponse, error) { + var err error + const operationName = "EmailTemplateClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, templateName, options) if err != nil { return EmailTemplateClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EmailTemplateClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EmailTemplateClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EmailTemplateClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *EmailTemplateClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, options *EmailTemplateClientGetOptions) (*policy.Request, error) { +func (client *EmailTemplateClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, _ *EmailTemplateClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -216,7 +234,7 @@ func (client *EmailTemplateClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -236,29 +254,36 @@ func (client *EmailTemplateClient) getHandleResponse(resp *http.Response) (Email // GetEntityTag - Gets the entity state (Etag) version of the email template specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - templateName - Email Template Name Identifier. // - options - EmailTemplateClientGetEntityTagOptions contains the optional parameters for the EmailTemplateClient.GetEntityTag // method. func (client *EmailTemplateClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, options *EmailTemplateClientGetEntityTagOptions) (EmailTemplateClientGetEntityTagResponse, error) { + var err error + const operationName = "EmailTemplateClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, templateName, options) if err != nil { return EmailTemplateClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EmailTemplateClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EmailTemplateClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EmailTemplateClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *EmailTemplateClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, options *EmailTemplateClientGetEntityTagOptions) (*policy.Request, error) { +func (client *EmailTemplateClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, _ *EmailTemplateClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -281,7 +306,7 @@ func (client *EmailTemplateClient) getEntityTagCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -289,18 +314,17 @@ func (client *EmailTemplateClient) getEntityTagCreateRequest(ctx context.Context // getEntityTagHandleResponse handles the GetEntityTag response. func (client *EmailTemplateClient) getEntityTagHandleResponse(resp *http.Response) (EmailTemplateClientGetEntityTagResponse, error) { - result := EmailTemplateClientGetEntityTagResponse{} + result := EmailTemplateClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Gets all email templates // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - EmailTemplateClientListByServiceOptions contains the optional parameters for the EmailTemplateClient.NewListByServicePager // method. @@ -310,25 +334,20 @@ func (client *EmailTemplateClient) NewListByServicePager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EmailTemplateClientListByServiceResponse) (EmailTemplateClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EmailTemplateClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EmailTemplateClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return EmailTemplateClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EmailTemplateClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -355,13 +374,13 @@ func (client *EmailTemplateClient) listByServiceCreateRequest(ctx context.Contex if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -379,8 +398,8 @@ func (client *EmailTemplateClient) listByServiceHandleResponse(resp *http.Respon // Update - Updates API Management email template // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - templateName - Email Template Name Identifier. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -388,22 +407,29 @@ func (client *EmailTemplateClient) listByServiceHandleResponse(resp *http.Respon // - parameters - Update parameters. // - options - EmailTemplateClientUpdateOptions contains the optional parameters for the EmailTemplateClient.Update method. func (client *EmailTemplateClient) Update(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string, parameters EmailTemplateUpdateParameters, options *EmailTemplateClientUpdateOptions) (EmailTemplateClientUpdateResponse, error) { + var err error + const operationName = "EmailTemplateClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, templateName, ifMatch, parameters, options) if err != nil { return EmailTemplateClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EmailTemplateClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EmailTemplateClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EmailTemplateClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *EmailTemplateClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string, parameters EmailTemplateUpdateParameters, options *EmailTemplateClientUpdateOptions) (*policy.Request, error) { +func (client *EmailTemplateClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string, parameters EmailTemplateUpdateParameters, _ *EmailTemplateClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -426,11 +452,14 @@ func (client *EmailTemplateClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gateway_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gateway_client.go new file mode 100644 index 00000000..7fb9cc4e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gateway_client.go @@ -0,0 +1,898 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// GatewayClient contains the methods for the Gateway group. +// Don't use this type directly, use NewGatewayClient() instead. +type GatewayClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGatewayClient creates a new instance of GatewayClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGatewayClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GatewayClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a Gateway to be used in Api Management instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - options - GatewayClientCreateOrUpdateOptions contains the optional parameters for the GatewayClient.CreateOrUpdate method. +func (client *GatewayClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayContract, options *GatewayClientCreateOrUpdateOptions) (GatewayClientCreateOrUpdateResponse, error) { + var err error + const operationName = "GatewayClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, parameters, options) + if err != nil { + return GatewayClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GatewayClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *GatewayClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayContract, options *GatewayClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *GatewayClient) createOrUpdateHandleResponse(resp *http.Response) (GatewayClientCreateOrUpdateResponse, error) { + result := GatewayClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayContract); err != nil { + return GatewayClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes specific Gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - GatewayClientDeleteOptions contains the optional parameters for the GatewayClient.Delete method. +func (client *GatewayClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, options *GatewayClientDeleteOptions) (GatewayClientDeleteResponse, error) { + var err error + const operationName = "GatewayClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, ifMatch, options) + if err != nil { + return GatewayClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GatewayClientDeleteResponse{}, err + } + return GatewayClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *GatewayClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, _ *GatewayClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// GenerateToken - Gets the Shared Access Authorization Token for the gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - options - GatewayClientGenerateTokenOptions contains the optional parameters for the GatewayClient.GenerateToken method. +func (client *GatewayClient) GenerateToken(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayTokenRequestContract, options *GatewayClientGenerateTokenOptions) (GatewayClientGenerateTokenResponse, error) { + var err error + const operationName = "GatewayClient.GenerateToken" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateTokenCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, parameters, options) + if err != nil { + return GatewayClientGenerateTokenResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientGenerateTokenResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayClientGenerateTokenResponse{}, err + } + resp, err := client.generateTokenHandleResponse(httpResp) + return resp, err +} + +// generateTokenCreateRequest creates the GenerateToken request. +func (client *GatewayClient) generateTokenCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayTokenRequestContract, _ *GatewayClientGenerateTokenOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// generateTokenHandleResponse handles the GenerateToken response. +func (client *GatewayClient) generateTokenHandleResponse(resp *http.Response) (GatewayClientGenerateTokenResponse, error) { + result := GatewayClientGenerateTokenResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayTokenContract); err != nil { + return GatewayClientGenerateTokenResponse{}, err + } + return result, nil +} + +// Get - Gets the details of the Gateway specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - options - GatewayClientGetOptions contains the optional parameters for the GatewayClient.Get method. +func (client *GatewayClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientGetOptions) (GatewayClientGetResponse, error) { + var err error + const operationName = "GatewayClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) + if err != nil { + return GatewayClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *GatewayClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, _ *GatewayClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *GatewayClient) getHandleResponse(resp *http.Response) (GatewayClientGetResponse, error) { + result := GatewayClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayContract); err != nil { + return GatewayClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the Gateway specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - options - GatewayClientGetEntityTagOptions contains the optional parameters for the GatewayClient.GetEntityTag method. +func (client *GatewayClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientGetEntityTagOptions) (GatewayClientGetEntityTagResponse, error) { + var err error + const operationName = "GatewayClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) + if err != nil { + return GatewayClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *GatewayClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, _ *GatewayClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *GatewayClient) getEntityTagHandleResponse(resp *http.Response) (GatewayClientGetEntityTagResponse, error) { + result := GatewayClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// InvalidateDebugCredentials - Action is invalidating all debug credentials issued for gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - options - GatewayClientInvalidateDebugCredentialsOptions contains the optional parameters for the GatewayClient.InvalidateDebugCredentials +// method. +func (client *GatewayClient) InvalidateDebugCredentials(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientInvalidateDebugCredentialsOptions) (GatewayClientInvalidateDebugCredentialsResponse, error) { + var err error + const operationName = "GatewayClient.InvalidateDebugCredentials" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.invalidateDebugCredentialsCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) + if err != nil { + return GatewayClientInvalidateDebugCredentialsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientInvalidateDebugCredentialsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GatewayClientInvalidateDebugCredentialsResponse{}, err + } + return GatewayClientInvalidateDebugCredentialsResponse{}, nil +} + +// invalidateDebugCredentialsCreateRequest creates the InvalidateDebugCredentials request. +func (client *GatewayClient) invalidateDebugCredentialsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, _ *GatewayClientInvalidateDebugCredentialsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/invalidateDebugCredentials" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListByServicePager - Lists a collection of gateways registered with service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - GatewayClientListByServiceOptions contains the optional parameters for the GatewayClient.NewListByServicePager +// method. +func (client *GatewayClient) NewListByServicePager(resourceGroupName string, serviceName string, options *GatewayClientListByServiceOptions) *runtime.Pager[GatewayClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[GatewayClientListByServiceResponse]{ + More: func(page GatewayClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GatewayClientListByServiceResponse) (GatewayClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GatewayClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return GatewayClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *GatewayClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *GatewayClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *GatewayClient) listByServiceHandleResponse(resp *http.Response) (GatewayClientListByServiceResponse, error) { + result := GatewayClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayCollection); err != nil { + return GatewayClientListByServiceResponse{}, err + } + return result, nil +} + +// ListDebugCredentials - Create new debug credentials for gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - parameters - List debug credentials properties. +// - options - GatewayClientListDebugCredentialsOptions contains the optional parameters for the GatewayClient.ListDebugCredentials +// method. +func (client *GatewayClient) ListDebugCredentials(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayListDebugCredentialsContract, options *GatewayClientListDebugCredentialsOptions) (GatewayClientListDebugCredentialsResponse, error) { + var err error + const operationName = "GatewayClient.ListDebugCredentials" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listDebugCredentialsCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, parameters, options) + if err != nil { + return GatewayClientListDebugCredentialsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientListDebugCredentialsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayClientListDebugCredentialsResponse{}, err + } + resp, err := client.listDebugCredentialsHandleResponse(httpResp) + return resp, err +} + +// listDebugCredentialsCreateRequest creates the ListDebugCredentials request. +func (client *GatewayClient) listDebugCredentialsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayListDebugCredentialsContract, _ *GatewayClientListDebugCredentialsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listDebugCredentials" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listDebugCredentialsHandleResponse handles the ListDebugCredentials response. +func (client *GatewayClient) listDebugCredentialsHandleResponse(resp *http.Response) (GatewayClientListDebugCredentialsResponse, error) { + result := GatewayClientListDebugCredentialsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayDebugCredentialsContract); err != nil { + return GatewayClientListDebugCredentialsResponse{}, err + } + return result, nil +} + +// ListKeys - Retrieves gateway keys. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - options - GatewayClientListKeysOptions contains the optional parameters for the GatewayClient.ListKeys method. +func (client *GatewayClient) ListKeys(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, options *GatewayClientListKeysOptions) (GatewayClientListKeysResponse, error) { + var err error + const operationName = "GatewayClient.ListKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listKeysCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) + if err != nil { + return GatewayClientListKeysResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientListKeysResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayClientListKeysResponse{}, err + } + resp, err := client.listKeysHandleResponse(httpResp) + return resp, err +} + +// listKeysCreateRequest creates the ListKeys request. +func (client *GatewayClient) listKeysCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, _ *GatewayClientListKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listKeysHandleResponse handles the ListKeys response. +func (client *GatewayClient) listKeysHandleResponse(resp *http.Response) (GatewayClientListKeysResponse, error) { + result := GatewayClientListKeysResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayKeysContract); err != nil { + return GatewayClientListKeysResponse{}, err + } + return result, nil +} + +// ListTrace - Fetches trace collected by gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - parameters - List trace properties. +// - options - GatewayClientListTraceOptions contains the optional parameters for the GatewayClient.ListTrace method. +func (client *GatewayClient) ListTrace(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayListTraceContract, options *GatewayClientListTraceOptions) (GatewayClientListTraceResponse, error) { + var err error + const operationName = "GatewayClient.ListTrace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listTraceCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, parameters, options) + if err != nil { + return GatewayClientListTraceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientListTraceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayClientListTraceResponse{}, err + } + resp, err := client.listTraceHandleResponse(httpResp) + return resp, err +} + +// listTraceCreateRequest creates the ListTrace request. +func (client *GatewayClient) listTraceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayListTraceContract, _ *GatewayClientListTraceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listTrace" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listTraceHandleResponse handles the ListTrace response. +func (client *GatewayClient) listTraceHandleResponse(resp *http.Response) (GatewayClientListTraceResponse, error) { + result := GatewayClientListTraceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { + return GatewayClientListTraceResponse{}, err + } + return result, nil +} + +// RegenerateKey - Regenerates specified gateway key invalidating any tokens created with it. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - options - GatewayClientRegenerateKeyOptions contains the optional parameters for the GatewayClient.RegenerateKey method. +func (client *GatewayClient) RegenerateKey(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayKeyRegenerationRequestContract, options *GatewayClientRegenerateKeyOptions) (GatewayClientRegenerateKeyResponse, error) { + var err error + const operationName = "GatewayClient.RegenerateKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.regenerateKeyCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, parameters, options) + if err != nil { + return GatewayClientRegenerateKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientRegenerateKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GatewayClientRegenerateKeyResponse{}, err + } + return GatewayClientRegenerateKeyResponse{}, nil +} + +// regenerateKeyCreateRequest creates the RegenerateKey request. +func (client *GatewayClient) regenerateKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, parameters GatewayKeyRegenerationRequestContract, _ *GatewayClientRegenerateKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Update - Updates the details of the gateway specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value +// 'managed' +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - GatewayClientUpdateOptions contains the optional parameters for the GatewayClient.Update method. +func (client *GatewayClient) Update(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, parameters GatewayContract, options *GatewayClientUpdateOptions) (GatewayClientUpdateResponse, error) { + var err error + const operationName = "GatewayClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, ifMatch, parameters, options) + if err != nil { + return GatewayClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *GatewayClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, ifMatch string, parameters GatewayContract, _ *GatewayClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayID == "" { + return nil, errors.New("parameter gatewayID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayId}", url.PathEscape(gatewayID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *GatewayClient) updateHandleResponse(resp *http.Response) (GatewayClientUpdateResponse, error) { + result := GatewayClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayContract); err != nil { + return GatewayClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gatewayapi_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewayapi_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gatewayapi_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewayapi_client.go index 07f196a6..600aff5a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gatewayapi_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewayapi_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type GatewayAPIClient struct { } // NewGatewayAPIClient creates a new instance of GatewayAPIClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGatewayAPIClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayAPIClient, error) { - cl, err := arm.NewClient(moduleName+".GatewayAPIClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewGatewayAPIClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Adds an API to the specified Gateway. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -58,18 +53,25 @@ func NewGatewayAPIClient(subscriptionID string, credential azcore.TokenCredentia // - options - GatewayAPIClientCreateOrUpdateOptions contains the optional parameters for the GatewayAPIClient.CreateOrUpdate // method. func (client *GatewayAPIClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, options *GatewayAPIClientCreateOrUpdateOptions) (GatewayAPIClientCreateOrUpdateResponse, error) { + var err error + const operationName = "GatewayAPIClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, apiID, options) if err != nil { return GatewayAPIClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayAPIClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return GatewayAPIClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GatewayAPIClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -100,11 +102,14 @@ func (client *GatewayAPIClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -121,30 +126,36 @@ func (client *GatewayAPIClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Deletes the specified API from the specified Gateway. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' // - apiID - API identifier. Must be unique in the current API Management service instance. // - options - GatewayAPIClientDeleteOptions contains the optional parameters for the GatewayAPIClient.Delete method. func (client *GatewayAPIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, options *GatewayAPIClientDeleteOptions) (GatewayAPIClientDeleteResponse, error) { + var err error + const operationName = "GatewayAPIClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, apiID, options) if err != nil { return GatewayAPIClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayAPIClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return GatewayAPIClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GatewayAPIClientDeleteResponse{}, err } return GatewayAPIClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *GatewayAPIClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, options *GatewayAPIClientDeleteOptions) (*policy.Request, error) { +func (client *GatewayAPIClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, _ *GatewayAPIClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -171,7 +182,7 @@ func (client *GatewayAPIClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -179,30 +190,37 @@ func (client *GatewayAPIClient) deleteCreateRequest(ctx context.Context, resourc // GetEntityTag - Checks that API entity specified by identifier is associated with the Gateway entity. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' // - apiID - API identifier. Must be unique in the current API Management service instance. // - options - GatewayAPIClientGetEntityTagOptions contains the optional parameters for the GatewayAPIClient.GetEntityTag method. func (client *GatewayAPIClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, options *GatewayAPIClientGetEntityTagOptions) (GatewayAPIClientGetEntityTagResponse, error) { + var err error + const operationName = "GatewayAPIClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, apiID, options) if err != nil { return GatewayAPIClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayAPIClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayAPIClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayAPIClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *GatewayAPIClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, options *GatewayAPIClientGetEntityTagOptions) (*policy.Request, error) { +func (client *GatewayAPIClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, apiID string, _ *GatewayAPIClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -229,7 +247,7 @@ func (client *GatewayAPIClient) getEntityTagCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -237,18 +255,17 @@ func (client *GatewayAPIClient) getEntityTagCreateRequest(ctx context.Context, r // getEntityTagHandleResponse handles the GetEntityTag response. func (client *GatewayAPIClient) getEntityTagHandleResponse(resp *http.Response) (GatewayAPIClientGetEntityTagResponse, error) { - result := GatewayAPIClientGetEntityTagResponse{} + result := GatewayAPIClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of the APIs associated with a gateway. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -260,25 +277,20 @@ func (client *GatewayAPIClient) NewListByServicePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GatewayAPIClientListByServiceResponse) (GatewayAPIClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GatewayAPIClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GatewayAPIClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) + }, nil) if err != nil { return GatewayAPIClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayAPIClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -309,13 +321,13 @@ func (client *GatewayAPIClient) listByServiceCreateRequest(ctx context.Context, if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gatewaycertificateauthority_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewaycertificateauthority_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gatewaycertificateauthority_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewaycertificateauthority_client.go index f57e5740..5608dd72 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gatewaycertificateauthority_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewaycertificateauthority_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type GatewayCertificateAuthorityClient struct { } // NewGatewayCertificateAuthorityClient creates a new instance of GatewayCertificateAuthorityClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGatewayCertificateAuthorityClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayCertificateAuthorityClient, error) { - cl, err := arm.NewClient(moduleName+".GatewayCertificateAuthorityClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewGatewayCertificateAuthorityClient(subscriptionID string, credential azco // CreateOrUpdate - Assign Certificate entity to Gateway entity as Certificate Authority. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -58,18 +53,25 @@ func NewGatewayCertificateAuthorityClient(subscriptionID string, credential azco // - options - GatewayCertificateAuthorityClientCreateOrUpdateOptions contains the optional parameters for the GatewayCertificateAuthorityClient.CreateOrUpdate // method. func (client *GatewayCertificateAuthorityClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, parameters GatewayCertificateAuthorityContract, options *GatewayCertificateAuthorityClientCreateOrUpdateOptions) (GatewayCertificateAuthorityClientCreateOrUpdateResponse, error) { + var err error + const operationName = "GatewayCertificateAuthorityClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, certificateID, parameters, options) if err != nil { return GatewayCertificateAuthorityClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayCertificateAuthorityClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return GatewayCertificateAuthorityClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GatewayCertificateAuthorityClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -100,13 +102,16 @@ func (client *GatewayCertificateAuthorityClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,8 +129,8 @@ func (client *GatewayCertificateAuthorityClient) createOrUpdateHandleResponse(re // Delete - Remove relationship between Certificate Authority and Gateway entity. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -135,22 +140,28 @@ func (client *GatewayCertificateAuthorityClient) createOrUpdateHandleResponse(re // - options - GatewayCertificateAuthorityClientDeleteOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Delete // method. func (client *GatewayCertificateAuthorityClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, ifMatch string, options *GatewayCertificateAuthorityClientDeleteOptions) (GatewayCertificateAuthorityClientDeleteResponse, error) { + var err error + const operationName = "GatewayCertificateAuthorityClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, certificateID, ifMatch, options) if err != nil { return GatewayCertificateAuthorityClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayCertificateAuthorityClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return GatewayCertificateAuthorityClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GatewayCertificateAuthorityClientDeleteResponse{}, err } return GatewayCertificateAuthorityClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *GatewayCertificateAuthorityClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, ifMatch string, options *GatewayCertificateAuthorityClientDeleteOptions) (*policy.Request, error) { +func (client *GatewayCertificateAuthorityClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, ifMatch string, _ *GatewayCertificateAuthorityClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -177,18 +188,18 @@ func (client *GatewayCertificateAuthorityClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Get assigned Gateway Certificate Authority details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -196,22 +207,29 @@ func (client *GatewayCertificateAuthorityClient) deleteCreateRequest(ctx context // - options - GatewayCertificateAuthorityClientGetOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Get // method. func (client *GatewayCertificateAuthorityClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, options *GatewayCertificateAuthorityClientGetOptions) (GatewayCertificateAuthorityClientGetResponse, error) { + var err error + const operationName = "GatewayCertificateAuthorityClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, certificateID, options) if err != nil { return GatewayCertificateAuthorityClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayCertificateAuthorityClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayCertificateAuthorityClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayCertificateAuthorityClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *GatewayCertificateAuthorityClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, options *GatewayCertificateAuthorityClientGetOptions) (*policy.Request, error) { +func (client *GatewayCertificateAuthorityClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, _ *GatewayCertificateAuthorityClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -238,7 +256,7 @@ func (client *GatewayCertificateAuthorityClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,8 +276,8 @@ func (client *GatewayCertificateAuthorityClient) getHandleResponse(resp *http.Re // GetEntityTag - Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -267,22 +285,29 @@ func (client *GatewayCertificateAuthorityClient) getHandleResponse(resp *http.Re // - options - GatewayCertificateAuthorityClientGetEntityTagOptions contains the optional parameters for the GatewayCertificateAuthorityClient.GetEntityTag // method. func (client *GatewayCertificateAuthorityClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, options *GatewayCertificateAuthorityClientGetEntityTagOptions) (GatewayCertificateAuthorityClientGetEntityTagResponse, error) { + var err error + const operationName = "GatewayCertificateAuthorityClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, certificateID, options) if err != nil { return GatewayCertificateAuthorityClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayCertificateAuthorityClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayCertificateAuthorityClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayCertificateAuthorityClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *GatewayCertificateAuthorityClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, options *GatewayCertificateAuthorityClientGetEntityTagOptions) (*policy.Request, error) { +func (client *GatewayCertificateAuthorityClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, certificateID string, _ *GatewayCertificateAuthorityClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -309,7 +334,7 @@ func (client *GatewayCertificateAuthorityClient) getEntityTagCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,18 +342,17 @@ func (client *GatewayCertificateAuthorityClient) getEntityTagCreateRequest(ctx c // getEntityTagHandleResponse handles the GetEntityTag response. func (client *GatewayCertificateAuthorityClient) getEntityTagHandleResponse(resp *http.Response) (GatewayCertificateAuthorityClientGetEntityTagResponse, error) { - result := GatewayCertificateAuthorityClientGetEntityTagResponse{} + result := GatewayCertificateAuthorityClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists the collection of Certificate Authorities for the specified Gateway entity. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -340,25 +364,20 @@ func (client *GatewayCertificateAuthorityClient) NewListByServicePager(resourceG return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GatewayCertificateAuthorityClientListByServiceResponse) (GatewayCertificateAuthorityClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GatewayCertificateAuthorityClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GatewayCertificateAuthorityClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) + }, nil) if err != nil { return GatewayCertificateAuthorityClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayCertificateAuthorityClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -389,13 +408,13 @@ func (client *GatewayCertificateAuthorityClient) listByServiceCreateRequest(ctx if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gatewayhostnameconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewayhostnameconfiguration_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gatewayhostnameconfiguration_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewayhostnameconfiguration_client.go index be58df25..8481ab87 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/gatewayhostnameconfiguration_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewayhostnameconfiguration_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type GatewayHostnameConfigurationClient struct { } // NewGatewayHostnameConfigurationClient creates a new instance of GatewayHostnameConfigurationClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGatewayHostnameConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayHostnameConfigurationClient, error) { - cl, err := arm.NewClient(moduleName+".GatewayHostnameConfigurationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewGatewayHostnameConfigurationClient(subscriptionID string, credential azc // CreateOrUpdate - Creates of updates hostname configuration for a Gateway. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -58,18 +53,25 @@ func NewGatewayHostnameConfigurationClient(subscriptionID string, credential azc // - options - GatewayHostnameConfigurationClientCreateOrUpdateOptions contains the optional parameters for the GatewayHostnameConfigurationClient.CreateOrUpdate // method. func (client *GatewayHostnameConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, hcID string, parameters GatewayHostnameConfigurationContract, options *GatewayHostnameConfigurationClientCreateOrUpdateOptions) (GatewayHostnameConfigurationClientCreateOrUpdateResponse, error) { + var err error + const operationName = "GatewayHostnameConfigurationClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, hcID, parameters, options) if err != nil { return GatewayHostnameConfigurationClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayHostnameConfigurationClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return GatewayHostnameConfigurationClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GatewayHostnameConfigurationClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -100,13 +102,16 @@ func (client *GatewayHostnameConfigurationClient) createOrUpdateCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -124,8 +129,8 @@ func (client *GatewayHostnameConfigurationClient) createOrUpdateHandleResponse(r // Delete - Deletes the specified hostname configuration from the specified Gateway. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -135,22 +140,28 @@ func (client *GatewayHostnameConfigurationClient) createOrUpdateHandleResponse(r // - options - GatewayHostnameConfigurationClientDeleteOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Delete // method. func (client *GatewayHostnameConfigurationClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, hcID string, ifMatch string, options *GatewayHostnameConfigurationClientDeleteOptions) (GatewayHostnameConfigurationClientDeleteResponse, error) { + var err error + const operationName = "GatewayHostnameConfigurationClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, hcID, ifMatch, options) if err != nil { return GatewayHostnameConfigurationClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayHostnameConfigurationClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return GatewayHostnameConfigurationClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GatewayHostnameConfigurationClientDeleteResponse{}, err } return GatewayHostnameConfigurationClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *GatewayHostnameConfigurationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, hcID string, ifMatch string, options *GatewayHostnameConfigurationClientDeleteOptions) (*policy.Request, error) { +func (client *GatewayHostnameConfigurationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, hcID string, ifMatch string, _ *GatewayHostnameConfigurationClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -177,18 +188,18 @@ func (client *GatewayHostnameConfigurationClient) deleteCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Get details of a hostname configuration // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -196,22 +207,29 @@ func (client *GatewayHostnameConfigurationClient) deleteCreateRequest(ctx contex // - options - GatewayHostnameConfigurationClientGetOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Get // method. func (client *GatewayHostnameConfigurationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, hcID string, options *GatewayHostnameConfigurationClientGetOptions) (GatewayHostnameConfigurationClientGetResponse, error) { + var err error + const operationName = "GatewayHostnameConfigurationClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, hcID, options) if err != nil { return GatewayHostnameConfigurationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayHostnameConfigurationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayHostnameConfigurationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayHostnameConfigurationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *GatewayHostnameConfigurationClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, hcID string, options *GatewayHostnameConfigurationClientGetOptions) (*policy.Request, error) { +func (client *GatewayHostnameConfigurationClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, hcID string, _ *GatewayHostnameConfigurationClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -238,7 +256,7 @@ func (client *GatewayHostnameConfigurationClient) getCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,8 +276,8 @@ func (client *GatewayHostnameConfigurationClient) getHandleResponse(resp *http.R // GetEntityTag - Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -267,22 +285,29 @@ func (client *GatewayHostnameConfigurationClient) getHandleResponse(resp *http.R // - options - GatewayHostnameConfigurationClientGetEntityTagOptions contains the optional parameters for the GatewayHostnameConfigurationClient.GetEntityTag // method. func (client *GatewayHostnameConfigurationClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, hcID string, options *GatewayHostnameConfigurationClientGetEntityTagOptions) (GatewayHostnameConfigurationClientGetEntityTagResponse, error) { + var err error + const operationName = "GatewayHostnameConfigurationClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, hcID, options) if err != nil { return GatewayHostnameConfigurationClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GatewayHostnameConfigurationClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayHostnameConfigurationClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayHostnameConfigurationClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *GatewayHostnameConfigurationClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, hcID string, options *GatewayHostnameConfigurationClientGetEntityTagOptions) (*policy.Request, error) { +func (client *GatewayHostnameConfigurationClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayID string, hcID string, _ *GatewayHostnameConfigurationClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -309,7 +334,7 @@ func (client *GatewayHostnameConfigurationClient) getEntityTagCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,18 +342,17 @@ func (client *GatewayHostnameConfigurationClient) getEntityTagCreateRequest(ctx // getEntityTagHandleResponse handles the GetEntityTag response. func (client *GatewayHostnameConfigurationClient) getEntityTagHandleResponse(resp *http.Response) (GatewayHostnameConfigurationClientGetEntityTagResponse, error) { - result := GatewayHostnameConfigurationClientGetEntityTagResponse{} + result := GatewayHostnameConfigurationClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists the collection of hostname configurations for the specified gateway. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - gatewayID - Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value // 'managed' @@ -340,25 +364,20 @@ func (client *GatewayHostnameConfigurationClient) NewListByServicePager(resource return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GatewayHostnameConfigurationClientListByServiceResponse) (GatewayHostnameConfigurationClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GatewayHostnameConfigurationClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GatewayHostnameConfigurationClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, gatewayID, options) + }, nil) if err != nil { return GatewayHostnameConfigurationClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayHostnameConfigurationClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -389,13 +408,13 @@ func (client *GatewayHostnameConfigurationClient) listByServiceCreateRequest(ctx if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewayskus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewayskus_client.go new file mode 100644 index 00000000..a56d5d91 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/gatewayskus_client.go @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GatewaySKUsClient contains the methods for the APIManagementGatewaySKUs group. +// Don't use this type directly, use NewGatewaySKUsClient() instead. +type GatewaySKUsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGatewaySKUsClient creates a new instance of GatewaySKUsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGatewaySKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewaySKUsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GatewaySKUsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListAvailableSKUsPager - Gets all available SKU for a given API Management gateway +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - gatewayName - The name of the API Management gateway. +// - options - GatewaySKUsClientListAvailableSKUsOptions contains the optional parameters for the GatewaySKUsClient.NewListAvailableSKUsPager +// method. +func (client *GatewaySKUsClient) NewListAvailableSKUsPager(resourceGroupName string, gatewayName string, options *GatewaySKUsClientListAvailableSKUsOptions) *runtime.Pager[GatewaySKUsClientListAvailableSKUsResponse] { + return runtime.NewPager(runtime.PagingHandler[GatewaySKUsClientListAvailableSKUsResponse]{ + More: func(page GatewaySKUsClientListAvailableSKUsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GatewaySKUsClientListAvailableSKUsResponse) (GatewaySKUsClientListAvailableSKUsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GatewaySKUsClient.NewListAvailableSKUsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAvailableSKUsCreateRequest(ctx, resourceGroupName, gatewayName, options) + }, nil) + if err != nil { + return GatewaySKUsClientListAvailableSKUsResponse{}, err + } + return client.listAvailableSKUsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAvailableSKUsCreateRequest creates the ListAvailableSKUs request. +func (client *GatewaySKUsClient) listAvailableSKUsCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, _ *GatewaySKUsClientListAvailableSKUsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/skus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAvailableSKUsHandleResponse handles the ListAvailableSKUs response. +func (client *GatewaySKUsClient) listAvailableSKUsHandleResponse(resp *http.Response) (GatewaySKUsClientListAvailableSKUsResponse, error) { + result := GatewaySKUsClientListAvailableSKUsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayResourceSKUResults); err != nil { + return GatewaySKUsClientListAvailableSKUsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/globalschema_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/globalschema_client.go similarity index 77% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/globalschema_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/globalschema_client.go index e5b5918a..0a379696 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/globalschema_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/globalschema_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type GlobalSchemaClient struct { } // NewGlobalSchemaClient creates a new instance of GlobalSchemaClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGlobalSchemaClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GlobalSchemaClient, error) { - cl, err := arm.NewClient(moduleName+".GlobalSchemaClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewGlobalSchemaClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Creates new or updates existing specified Schema of the API Management service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - schemaID - Schema id identifier. Must be unique in the current API Management service instance. // - parameters - Create or update parameters. @@ -62,31 +57,41 @@ func (client *GlobalSchemaClient) BeginCreateOrUpdate(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GlobalSchemaClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GlobalSchemaClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[GlobalSchemaClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GlobalSchemaClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Creates new or updates existing specified Schema of the API Management service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 func (client *GlobalSchemaClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, parameters GlobalSchemaContract, options *GlobalSchemaClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "GlobalSchemaClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, schemaID, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -113,42 +118,51 @@ func (client *GlobalSchemaClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Delete - Deletes specific Schema. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - schemaID - Schema id identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - GlobalSchemaClientDeleteOptions contains the optional parameters for the GlobalSchemaClient.Delete method. func (client *GlobalSchemaClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, ifMatch string, options *GlobalSchemaClientDeleteOptions) (GlobalSchemaClientDeleteResponse, error) { + var err error + const operationName = "GlobalSchemaClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, schemaID, ifMatch, options) if err != nil { return GlobalSchemaClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalSchemaClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return GlobalSchemaClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GlobalSchemaClientDeleteResponse{}, err } return GlobalSchemaClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *GlobalSchemaClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, ifMatch string, options *GlobalSchemaClientDeleteOptions) (*policy.Request, error) { +func (client *GlobalSchemaClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, ifMatch string, _ *GlobalSchemaClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -171,38 +185,45 @@ func (client *GlobalSchemaClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the Schema specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - schemaID - Schema id identifier. Must be unique in the current API Management service instance. // - options - GlobalSchemaClientGetOptions contains the optional parameters for the GlobalSchemaClient.Get method. func (client *GlobalSchemaClient) Get(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, options *GlobalSchemaClientGetOptions) (GlobalSchemaClientGetResponse, error) { + var err error + const operationName = "GlobalSchemaClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, schemaID, options) if err != nil { return GlobalSchemaClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalSchemaClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalSchemaClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalSchemaClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *GlobalSchemaClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, options *GlobalSchemaClientGetOptions) (*policy.Request, error) { +func (client *GlobalSchemaClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, _ *GlobalSchemaClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -225,7 +246,7 @@ func (client *GlobalSchemaClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -245,29 +266,36 @@ func (client *GlobalSchemaClient) getHandleResponse(resp *http.Response) (Global // GetEntityTag - Gets the entity state (Etag) version of the Schema specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - schemaID - Schema id identifier. Must be unique in the current API Management service instance. // - options - GlobalSchemaClientGetEntityTagOptions contains the optional parameters for the GlobalSchemaClient.GetEntityTag // method. func (client *GlobalSchemaClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, options *GlobalSchemaClientGetEntityTagOptions) (GlobalSchemaClientGetEntityTagResponse, error) { + var err error + const operationName = "GlobalSchemaClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, schemaID, options) if err != nil { return GlobalSchemaClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalSchemaClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalSchemaClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalSchemaClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *GlobalSchemaClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, options *GlobalSchemaClientGetEntityTagOptions) (*policy.Request, error) { +func (client *GlobalSchemaClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, schemaID string, _ *GlobalSchemaClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -290,7 +318,7 @@ func (client *GlobalSchemaClient) getEntityTagCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -298,18 +326,17 @@ func (client *GlobalSchemaClient) getEntityTagCreateRequest(ctx context.Context, // getEntityTagHandleResponse handles the GetEntityTag response. func (client *GlobalSchemaClient) getEntityTagHandleResponse(resp *http.Response) (GlobalSchemaClientGetEntityTagResponse, error) { - result := GlobalSchemaClientGetEntityTagResponse{} + result := GlobalSchemaClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of schemas registered with service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - GlobalSchemaClientListByServiceOptions contains the optional parameters for the GlobalSchemaClient.NewListByServicePager // method. @@ -319,25 +346,20 @@ func (client *GlobalSchemaClient) NewListByServicePager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GlobalSchemaClientListByServiceResponse) (GlobalSchemaClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GlobalSchemaClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GlobalSchemaClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return GlobalSchemaClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalSchemaClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -364,13 +386,13 @@ func (client *GlobalSchemaClient) listByServiceCreateRequest(ctx context.Context if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/graphqlapiresolver_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/graphqlapiresolver_client.go new file mode 100644 index 00000000..bdc13f4d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/graphqlapiresolver_client.go @@ -0,0 +1,516 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// GraphQLAPIResolverClient contains the methods for the GraphQLAPIResolver group. +// Don't use this type directly, use NewGraphQLAPIResolverClient() instead. +type GraphQLAPIResolverClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGraphQLAPIResolverClient creates a new instance of GraphQLAPIResolverClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGraphQLAPIResolverClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GraphQLAPIResolverClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GraphQLAPIResolverClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates a new resolver in the GraphQL API or updates an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - GraphQLAPIResolverClientCreateOrUpdateOptions contains the optional parameters for the GraphQLAPIResolverClient.CreateOrUpdate +// method. +func (client *GraphQLAPIResolverClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, parameters ResolverContract, options *GraphQLAPIResolverClientCreateOrUpdateOptions) (GraphQLAPIResolverClientCreateOrUpdateResponse, error) { + var err error + const operationName = "GraphQLAPIResolverClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, resolverID, parameters, options) + if err != nil { + return GraphQLAPIResolverClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GraphQLAPIResolverClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GraphQLAPIResolverClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *GraphQLAPIResolverClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, parameters ResolverContract, options *GraphQLAPIResolverClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if resolverID == "" { + return nil, errors.New("parameter resolverID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resolverId}", url.PathEscape(resolverID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *GraphQLAPIResolverClient) createOrUpdateHandleResponse(resp *http.Response) (GraphQLAPIResolverClientCreateOrUpdateResponse, error) { + result := GraphQLAPIResolverClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.ResolverContract); err != nil { + return GraphQLAPIResolverClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified resolver in the GraphQL API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - GraphQLAPIResolverClientDeleteOptions contains the optional parameters for the GraphQLAPIResolverClient.Delete +// method. +func (client *GraphQLAPIResolverClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, ifMatch string, options *GraphQLAPIResolverClientDeleteOptions) (GraphQLAPIResolverClientDeleteResponse, error) { + var err error + const operationName = "GraphQLAPIResolverClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, resolverID, ifMatch, options) + if err != nil { + return GraphQLAPIResolverClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GraphQLAPIResolverClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GraphQLAPIResolverClientDeleteResponse{}, err + } + return GraphQLAPIResolverClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *GraphQLAPIResolverClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, ifMatch string, _ *GraphQLAPIResolverClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if resolverID == "" { + return nil, errors.New("parameter resolverID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resolverId}", url.PathEscape(resolverID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the GraphQL API Resolver specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. +// - options - GraphQLAPIResolverClientGetOptions contains the optional parameters for the GraphQLAPIResolverClient.Get method. +func (client *GraphQLAPIResolverClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, options *GraphQLAPIResolverClientGetOptions) (GraphQLAPIResolverClientGetResponse, error) { + var err error + const operationName = "GraphQLAPIResolverClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, resolverID, options) + if err != nil { + return GraphQLAPIResolverClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GraphQLAPIResolverClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GraphQLAPIResolverClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *GraphQLAPIResolverClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, _ *GraphQLAPIResolverClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if resolverID == "" { + return nil, errors.New("parameter resolverID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resolverId}", url.PathEscape(resolverID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *GraphQLAPIResolverClient) getHandleResponse(resp *http.Response) (GraphQLAPIResolverClientGetResponse, error) { + result := GraphQLAPIResolverClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.ResolverContract); err != nil { + return GraphQLAPIResolverClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. +// - options - GraphQLAPIResolverClientGetEntityTagOptions contains the optional parameters for the GraphQLAPIResolverClient.GetEntityTag +// method. +func (client *GraphQLAPIResolverClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, options *GraphQLAPIResolverClientGetEntityTagOptions) (GraphQLAPIResolverClientGetEntityTagResponse, error) { + var err error + const operationName = "GraphQLAPIResolverClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, resolverID, options) + if err != nil { + return GraphQLAPIResolverClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GraphQLAPIResolverClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GraphQLAPIResolverClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *GraphQLAPIResolverClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, _ *GraphQLAPIResolverClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if resolverID == "" { + return nil, errors.New("parameter resolverID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resolverId}", url.PathEscape(resolverID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *GraphQLAPIResolverClient) getEntityTagHandleResponse(resp *http.Response) (GraphQLAPIResolverClientGetEntityTagResponse, error) { + result := GraphQLAPIResolverClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByAPIPager - Lists a collection of the resolvers for the specified GraphQL API. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - options - GraphQLAPIResolverClientListByAPIOptions contains the optional parameters for the GraphQLAPIResolverClient.NewListByAPIPager +// method. +func (client *GraphQLAPIResolverClient) NewListByAPIPager(resourceGroupName string, serviceName string, apiID string, options *GraphQLAPIResolverClientListByAPIOptions) *runtime.Pager[GraphQLAPIResolverClientListByAPIResponse] { + return runtime.NewPager(runtime.PagingHandler[GraphQLAPIResolverClientListByAPIResponse]{ + More: func(page GraphQLAPIResolverClientListByAPIResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GraphQLAPIResolverClientListByAPIResponse) (GraphQLAPIResolverClientListByAPIResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GraphQLAPIResolverClient.NewListByAPIPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) + if err != nil { + return GraphQLAPIResolverClientListByAPIResponse{}, err + } + return client.listByAPIHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAPICreateRequest creates the ListByAPI request. +func (client *GraphQLAPIResolverClient) listByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *GraphQLAPIResolverClientListByAPIOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAPIHandleResponse handles the ListByAPI response. +func (client *GraphQLAPIResolverClient) listByAPIHandleResponse(resp *http.Response) (GraphQLAPIResolverClientListByAPIResponse, error) { + result := GraphQLAPIResolverClientListByAPIResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResolverCollection); err != nil { + return GraphQLAPIResolverClientListByAPIResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the resolver in the GraphQL API specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - GraphQL API Resolver Update parameters. +// - options - GraphQLAPIResolverClientUpdateOptions contains the optional parameters for the GraphQLAPIResolverClient.Update +// method. +func (client *GraphQLAPIResolverClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, ifMatch string, parameters ResolverUpdateContract, options *GraphQLAPIResolverClientUpdateOptions) (GraphQLAPIResolverClientUpdateResponse, error) { + var err error + const operationName = "GraphQLAPIResolverClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, apiID, resolverID, ifMatch, parameters, options) + if err != nil { + return GraphQLAPIResolverClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GraphQLAPIResolverClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GraphQLAPIResolverClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *GraphQLAPIResolverClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, ifMatch string, parameters ResolverUpdateContract, _ *GraphQLAPIResolverClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if resolverID == "" { + return nil, errors.New("parameter resolverID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resolverId}", url.PathEscape(resolverID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *GraphQLAPIResolverClient) updateHandleResponse(resp *http.Response) (GraphQLAPIResolverClientUpdateResponse, error) { + result := GraphQLAPIResolverClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.ResolverContract); err != nil { + return GraphQLAPIResolverClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/graphqlapiresolverpolicy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/graphqlapiresolverpolicy_client.go new file mode 100644 index 00000000..9c497959 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/graphqlapiresolverpolicy_client.go @@ -0,0 +1,449 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GraphQLAPIResolverPolicyClient contains the methods for the GraphQLAPIResolverPolicy group. +// Don't use this type directly, use NewGraphQLAPIResolverPolicyClient() instead. +type GraphQLAPIResolverPolicyClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGraphQLAPIResolverPolicyClient creates a new instance of GraphQLAPIResolverPolicyClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGraphQLAPIResolverPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GraphQLAPIResolverPolicyClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GraphQLAPIResolverPolicyClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates policy configuration for the GraphQL API Resolver level. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - parameters - The policy contents to apply. +// - options - GraphQLAPIResolverPolicyClientCreateOrUpdateOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.CreateOrUpdate +// method. +func (client *GraphQLAPIResolverPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, policyID PolicyIDName, parameters PolicyContract, options *GraphQLAPIResolverPolicyClientCreateOrUpdateOptions) (GraphQLAPIResolverPolicyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "GraphQLAPIResolverPolicyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiID, resolverID, policyID, parameters, options) + if err != nil { + return GraphQLAPIResolverPolicyClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GraphQLAPIResolverPolicyClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GraphQLAPIResolverPolicyClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *GraphQLAPIResolverPolicyClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, policyID PolicyIDName, parameters PolicyContract, options *GraphQLAPIResolverPolicyClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if resolverID == "" { + return nil, errors.New("parameter resolverID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resolverId}", url.PathEscape(resolverID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *GraphQLAPIResolverPolicyClient) createOrUpdateHandleResponse(resp *http.Response) (GraphQLAPIResolverPolicyClientCreateOrUpdateResponse, error) { + result := GraphQLAPIResolverPolicyClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return GraphQLAPIResolverPolicyClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the policy configuration at the GraphQL Api Resolver. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - GraphQLAPIResolverPolicyClientDeleteOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.Delete +// method. +func (client *GraphQLAPIResolverPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, policyID PolicyIDName, ifMatch string, options *GraphQLAPIResolverPolicyClientDeleteOptions) (GraphQLAPIResolverPolicyClientDeleteResponse, error) { + var err error + const operationName = "GraphQLAPIResolverPolicyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiID, resolverID, policyID, ifMatch, options) + if err != nil { + return GraphQLAPIResolverPolicyClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GraphQLAPIResolverPolicyClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GraphQLAPIResolverPolicyClientDeleteResponse{}, err + } + return GraphQLAPIResolverPolicyClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *GraphQLAPIResolverPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, policyID PolicyIDName, ifMatch string, _ *GraphQLAPIResolverPolicyClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if resolverID == "" { + return nil, errors.New("parameter resolverID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resolverId}", url.PathEscape(resolverID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Get the policy configuration at the GraphQL API Resolver level. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - options - GraphQLAPIResolverPolicyClientGetOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.Get +// method. +func (client *GraphQLAPIResolverPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, policyID PolicyIDName, options *GraphQLAPIResolverPolicyClientGetOptions) (GraphQLAPIResolverPolicyClientGetResponse, error) { + var err error + const operationName = "GraphQLAPIResolverPolicyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiID, resolverID, policyID, options) + if err != nil { + return GraphQLAPIResolverPolicyClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GraphQLAPIResolverPolicyClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GraphQLAPIResolverPolicyClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *GraphQLAPIResolverPolicyClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, policyID PolicyIDName, options *GraphQLAPIResolverPolicyClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if resolverID == "" { + return nil, errors.New("parameter resolverID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resolverId}", url.PathEscape(resolverID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Format != nil { + reqQP.Set("format", string(*options.Format)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *GraphQLAPIResolverPolicyClient) getHandleResponse(resp *http.Response) (GraphQLAPIResolverPolicyClientGetResponse, error) { + result := GraphQLAPIResolverPolicyClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return GraphQLAPIResolverPolicyClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - options - GraphQLAPIResolverPolicyClientGetEntityTagOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.GetEntityTag +// method. +func (client *GraphQLAPIResolverPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, policyID PolicyIDName, options *GraphQLAPIResolverPolicyClientGetEntityTagOptions) (GraphQLAPIResolverPolicyClientGetEntityTagResponse, error) { + var err error + const operationName = "GraphQLAPIResolverPolicyClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, apiID, resolverID, policyID, options) + if err != nil { + return GraphQLAPIResolverPolicyClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GraphQLAPIResolverPolicyClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GraphQLAPIResolverPolicyClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *GraphQLAPIResolverPolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, policyID PolicyIDName, _ *GraphQLAPIResolverPolicyClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if resolverID == "" { + return nil, errors.New("parameter resolverID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resolverId}", url.PathEscape(resolverID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *GraphQLAPIResolverPolicyClient) getEntityTagHandleResponse(resp *http.Response) (GraphQLAPIResolverPolicyClientGetEntityTagResponse, error) { + result := GraphQLAPIResolverPolicyClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByResolverPager - Get the list of policy configuration at the GraphQL API Resolver level. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - resolverID - Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. +// - options - GraphQLAPIResolverPolicyClientListByResolverOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.NewListByResolverPager +// method. +func (client *GraphQLAPIResolverPolicyClient) NewListByResolverPager(resourceGroupName string, serviceName string, apiID string, resolverID string, options *GraphQLAPIResolverPolicyClientListByResolverOptions) *runtime.Pager[GraphQLAPIResolverPolicyClientListByResolverResponse] { + return runtime.NewPager(runtime.PagingHandler[GraphQLAPIResolverPolicyClientListByResolverResponse]{ + More: func(page GraphQLAPIResolverPolicyClientListByResolverResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GraphQLAPIResolverPolicyClientListByResolverResponse) (GraphQLAPIResolverPolicyClientListByResolverResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GraphQLAPIResolverPolicyClient.NewListByResolverPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResolverCreateRequest(ctx, resourceGroupName, serviceName, apiID, resolverID, options) + }, nil) + if err != nil { + return GraphQLAPIResolverPolicyClientListByResolverResponse{}, err + } + return client.listByResolverHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResolverCreateRequest creates the ListByResolver request. +func (client *GraphQLAPIResolverPolicyClient) listByResolverCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, resolverID string, _ *GraphQLAPIResolverPolicyClientListByResolverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if resolverID == "" { + return nil, errors.New("parameter resolverID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resolverId}", url.PathEscape(resolverID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResolverHandleResponse handles the ListByResolver response. +func (client *GraphQLAPIResolverPolicyClient) listByResolverHandleResponse(resp *http.Response) (GraphQLAPIResolverPolicyClientListByResolverResponse, error) { + result := GraphQLAPIResolverPolicyClientListByResolverResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyCollection); err != nil { + return GraphQLAPIResolverPolicyClientListByResolverResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/group_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/group_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/group_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/group_client.go index ffeba7d4..d8b88e62 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/group_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/group_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type GroupClient struct { } // NewGroupClient creates a new instance of GroupClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupClient, error) { - cl, err := arm.NewClient(moduleName+".GroupClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +44,32 @@ func NewGroupClient(subscriptionID string, credential azcore.TokenCredential, op // CreateOrUpdate - Creates or Updates a group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - parameters - Create parameters. // - options - GroupClientCreateOrUpdateOptions contains the optional parameters for the GroupClient.CreateOrUpdate method. func (client *GroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters GroupCreateParameters, options *GroupClientCreateOrUpdateOptions) (GroupClientCreateOrUpdateResponse, error) { + var err error + const operationName = "GroupClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, groupID, parameters, options) if err != nil { return GroupClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GroupClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return GroupClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GroupClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,13 +96,16 @@ func (client *GroupClient) createOrUpdateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,30 +123,36 @@ func (client *GroupClient) createOrUpdateHandleResponse(resp *http.Response) (Gr // Delete - Deletes specific group of the API Management service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - GroupClientDeleteOptions contains the optional parameters for the GroupClient.Delete method. func (client *GroupClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string, options *GroupClientDeleteOptions) (GroupClientDeleteResponse, error) { + var err error + const operationName = "GroupClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, groupID, ifMatch, options) if err != nil { return GroupClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GroupClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return GroupClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GroupClientDeleteResponse{}, err } return GroupClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *GroupClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string, options *GroupClientDeleteOptions) (*policy.Request, error) { +func (client *GroupClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string, _ *GroupClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -164,38 +175,45 @@ func (client *GroupClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the group specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - options - GroupClientGetOptions contains the optional parameters for the GroupClient.Get method. func (client *GroupClient) Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string, options *GroupClientGetOptions) (GroupClientGetResponse, error) { + var err error + const operationName = "GroupClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, groupID, options) if err != nil { return GroupClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GroupClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GroupClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GroupClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *GroupClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, options *GroupClientGetOptions) (*policy.Request, error) { +func (client *GroupClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, _ *GroupClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -218,7 +236,7 @@ func (client *GroupClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,28 +256,35 @@ func (client *GroupClient) getHandleResponse(resp *http.Response) (GroupClientGe // GetEntityTag - Gets the entity state (Etag) version of the group specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - options - GroupClientGetEntityTagOptions contains the optional parameters for the GroupClient.GetEntityTag method. func (client *GroupClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, groupID string, options *GroupClientGetEntityTagOptions) (GroupClientGetEntityTagResponse, error) { + var err error + const operationName = "GroupClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, groupID, options) if err != nil { return GroupClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GroupClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GroupClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GroupClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *GroupClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, options *GroupClientGetEntityTagOptions) (*policy.Request, error) { +func (client *GroupClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, _ *GroupClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -282,7 +307,7 @@ func (client *GroupClient) getEntityTagCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -290,18 +315,17 @@ func (client *GroupClient) getEntityTagCreateRequest(ctx context.Context, resour // getEntityTagHandleResponse handles the GetEntityTag response. func (client *GroupClient) getEntityTagHandleResponse(resp *http.Response) (GroupClientGetEntityTagResponse, error) { - result := GroupClientGetEntityTagResponse{} + result := GroupClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of groups defined within a service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - GroupClientListByServiceOptions contains the optional parameters for the GroupClient.NewListByServicePager method. func (client *GroupClient) NewListByServicePager(resourceGroupName string, serviceName string, options *GroupClientListByServiceOptions) *runtime.Pager[GroupClientListByServiceResponse] { @@ -310,25 +334,20 @@ func (client *GroupClient) NewListByServicePager(resourceGroupName string, servi return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GroupClientListByServiceResponse) (GroupClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GroupClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GroupClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return GroupClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GroupClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -355,13 +374,13 @@ func (client *GroupClient) listByServiceCreateRequest(ctx context.Context, resou if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -379,8 +398,8 @@ func (client *GroupClient) listByServiceHandleResponse(resp *http.Response) (Gro // Update - Updates the details of the group specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -388,22 +407,29 @@ func (client *GroupClient) listByServiceHandleResponse(resp *http.Response) (Gro // - parameters - Update parameters. // - options - GroupClientUpdateOptions contains the optional parameters for the GroupClient.Update method. func (client *GroupClient) Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string, parameters GroupUpdateParameters, options *GroupClientUpdateOptions) (GroupClientUpdateResponse, error) { + var err error + const operationName = "GroupClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, groupID, ifMatch, parameters, options) if err != nil { return GroupClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GroupClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GroupClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GroupClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *GroupClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string, parameters GroupUpdateParameters, options *GroupClientUpdateOptions) (*policy.Request, error) { +func (client *GroupClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string, parameters GroupUpdateParameters, _ *GroupClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -426,11 +452,14 @@ func (client *GroupClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/groupuser_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/groupuser_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/groupuser_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/groupuser_client.go index 78b782fc..8186feec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/groupuser_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/groupuser_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type GroupUserClient struct { } // NewGroupUserClient creates a new instance of GroupUserClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGroupUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupUserClient, error) { - cl, err := arm.NewClient(moduleName+".GroupUserClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,30 +43,36 @@ func NewGroupUserClient(subscriptionID string, credential azcore.TokenCredential // CheckEntityExists - Checks that user entity specified by identifier is associated with the group entity. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - userID - User identifier. Must be unique in the current API Management service instance. // - options - GroupUserClientCheckEntityExistsOptions contains the optional parameters for the GroupUserClient.CheckEntityExists // method. func (client *GroupUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientCheckEntityExistsOptions) (GroupUserClientCheckEntityExistsResponse, error) { + var err error + const operationName = "GroupUserClient.CheckEntityExists" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkEntityExistsCreateRequest(ctx, resourceGroupName, serviceName, groupID, userID, options) if err != nil { return GroupUserClientCheckEntityExistsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GroupUserClientCheckEntityExistsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent, http.StatusNotFound) { - return GroupUserClientCheckEntityExistsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return GroupUserClientCheckEntityExistsResponse{}, err } - return GroupUserClientCheckEntityExistsResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300}, nil + return GroupUserClientCheckEntityExistsResponse{Success: httpResp.StatusCode >= 200 && httpResp.StatusCode < 300}, nil } // checkEntityExistsCreateRequest creates the CheckEntityExists request. -func (client *GroupUserClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientCheckEntityExistsOptions) (*policy.Request, error) { +func (client *GroupUserClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, _ *GroupUserClientCheckEntityExistsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -98,7 +99,7 @@ func (client *GroupUserClient) checkEntityExistsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -107,29 +108,36 @@ func (client *GroupUserClient) checkEntityExistsCreateRequest(ctx context.Contex // Create - Add existing user to existing group // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - userID - User identifier. Must be unique in the current API Management service instance. // - options - GroupUserClientCreateOptions contains the optional parameters for the GroupUserClient.Create method. func (client *GroupUserClient) Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientCreateOptions) (GroupUserClientCreateResponse, error) { + var err error + const operationName = "GroupUserClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, serviceName, groupID, userID, options) if err != nil { return GroupUserClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GroupUserClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return GroupUserClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GroupUserClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. -func (client *GroupUserClient) createCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientCreateOptions) (*policy.Request, error) { +func (client *GroupUserClient) createCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, _ *GroupUserClientCreateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -156,7 +164,7 @@ func (client *GroupUserClient) createCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -174,29 +182,35 @@ func (client *GroupUserClient) createHandleResponse(resp *http.Response) (GroupU // Delete - Remove existing user from existing group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - userID - User identifier. Must be unique in the current API Management service instance. // - options - GroupUserClientDeleteOptions contains the optional parameters for the GroupUserClient.Delete method. func (client *GroupUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientDeleteOptions) (GroupUserClientDeleteResponse, error) { + var err error + const operationName = "GroupUserClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, groupID, userID, options) if err != nil { return GroupUserClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GroupUserClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return GroupUserClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GroupUserClientDeleteResponse{}, err } return GroupUserClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *GroupUserClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, options *GroupUserClientDeleteOptions) (*policy.Request, error) { +func (client *GroupUserClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string, _ *GroupUserClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -223,7 +237,7 @@ func (client *GroupUserClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -231,8 +245,8 @@ func (client *GroupUserClient) deleteCreateRequest(ctx context.Context, resource // NewListPager - Lists a collection of user entities associated with the group. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - options - GroupUserClientListOptions contains the optional parameters for the GroupUserClient.NewListPager method. @@ -242,25 +256,20 @@ func (client *GroupUserClient) NewListPager(resourceGroupName string, serviceNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *GroupUserClientListResponse) (GroupUserClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, groupID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GroupUserClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GroupUserClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, groupID, options) + }, nil) if err != nil { return GroupUserClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GroupUserClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -291,13 +300,13 @@ func (client *GroupUserClient) listCreateRequest(ctx context.Context, resourceGr if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/identityprovider_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/identityprovider_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/identityprovider_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/identityprovider_client.go index 4cdfd29c..1f547ab4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/identityprovider_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/identityprovider_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type IdentityProviderClient struct { } // NewIdentityProviderClient creates a new instance of IdentityProviderClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIdentityProviderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IdentityProviderClient, error) { - cl, err := arm.NewClient(moduleName+".IdentityProviderClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,26 +43,33 @@ func NewIdentityProviderClient(subscriptionID string, credential azcore.TokenCre // CreateOrUpdate - Creates or Updates the IdentityProvider configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - identityProviderName - Identity Provider Type identifier. // - parameters - Create parameters. // - options - IdentityProviderClientCreateOrUpdateOptions contains the optional parameters for the IdentityProviderClient.CreateOrUpdate // method. func (client *IdentityProviderClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, parameters IdentityProviderCreateContract, options *IdentityProviderClientCreateOrUpdateOptions) (IdentityProviderClientCreateOrUpdateResponse, error) { + var err error + const operationName = "IdentityProviderClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, identityProviderName, parameters, options) if err != nil { return IdentityProviderClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IdentityProviderClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return IdentityProviderClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return IdentityProviderClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,13 +96,16 @@ func (client *IdentityProviderClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,30 +123,36 @@ func (client *IdentityProviderClient) createOrUpdateHandleResponse(resp *http.Re // Delete - Deletes the specified identity provider configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - identityProviderName - Identity Provider Type identifier. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - IdentityProviderClientDeleteOptions contains the optional parameters for the IdentityProviderClient.Delete method. func (client *IdentityProviderClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string, options *IdentityProviderClientDeleteOptions) (IdentityProviderClientDeleteResponse, error) { + var err error + const operationName = "IdentityProviderClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, identityProviderName, ifMatch, options) if err != nil { return IdentityProviderClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IdentityProviderClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return IdentityProviderClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return IdentityProviderClientDeleteResponse{}, err } return IdentityProviderClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *IdentityProviderClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string, options *IdentityProviderClientDeleteOptions) (*policy.Request, error) { +func (client *IdentityProviderClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string, _ *IdentityProviderClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -164,38 +175,45 @@ func (client *IdentityProviderClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the configuration details of the identity Provider configured in specified service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - identityProviderName - Identity Provider Type identifier. // - options - IdentityProviderClientGetOptions contains the optional parameters for the IdentityProviderClient.Get method. func (client *IdentityProviderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientGetOptions) (IdentityProviderClientGetResponse, error) { + var err error + const operationName = "IdentityProviderClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, identityProviderName, options) if err != nil { return IdentityProviderClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IdentityProviderClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IdentityProviderClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IdentityProviderClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *IdentityProviderClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientGetOptions) (*policy.Request, error) { +func (client *IdentityProviderClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, _ *IdentityProviderClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -218,7 +236,7 @@ func (client *IdentityProviderClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,29 +256,36 @@ func (client *IdentityProviderClient) getHandleResponse(resp *http.Response) (Id // GetEntityTag - Gets the entity state (Etag) version of the identityProvider specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - identityProviderName - Identity Provider Type identifier. // - options - IdentityProviderClientGetEntityTagOptions contains the optional parameters for the IdentityProviderClient.GetEntityTag // method. func (client *IdentityProviderClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientGetEntityTagOptions) (IdentityProviderClientGetEntityTagResponse, error) { + var err error + const operationName = "IdentityProviderClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, identityProviderName, options) if err != nil { return IdentityProviderClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IdentityProviderClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IdentityProviderClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IdentityProviderClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *IdentityProviderClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientGetEntityTagOptions) (*policy.Request, error) { +func (client *IdentityProviderClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, _ *IdentityProviderClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -283,7 +308,7 @@ func (client *IdentityProviderClient) getEntityTagCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -291,18 +316,17 @@ func (client *IdentityProviderClient) getEntityTagCreateRequest(ctx context.Cont // getEntityTagHandleResponse handles the GetEntityTag response. func (client *IdentityProviderClient) getEntityTagHandleResponse(resp *http.Response) (IdentityProviderClientGetEntityTagResponse, error) { - result := IdentityProviderClientGetEntityTagResponse{} + result := IdentityProviderClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of Identity Provider configured in the specified service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - IdentityProviderClientListByServiceOptions contains the optional parameters for the IdentityProviderClient.NewListByServicePager // method. @@ -312,30 +336,25 @@ func (client *IdentityProviderClient) NewListByServicePager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IdentityProviderClientListByServiceResponse) (IdentityProviderClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IdentityProviderClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return IdentityProviderClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IdentityProviderClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IdentityProviderClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listByServiceCreateRequest creates the ListByService request. -func (client *IdentityProviderClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *IdentityProviderClientListByServiceOptions) (*policy.Request, error) { +func (client *IdentityProviderClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *IdentityProviderClientListByServiceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -354,7 +373,7 @@ func (client *IdentityProviderClient) listByServiceCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -372,29 +391,36 @@ func (client *IdentityProviderClient) listByServiceHandleResponse(resp *http.Res // ListSecrets - Gets the client secret details of the Identity Provider. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - identityProviderName - Identity Provider Type identifier. // - options - IdentityProviderClientListSecretsOptions contains the optional parameters for the IdentityProviderClient.ListSecrets // method. func (client *IdentityProviderClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientListSecretsOptions) (IdentityProviderClientListSecretsResponse, error) { + var err error + const operationName = "IdentityProviderClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, serviceName, identityProviderName, options) if err != nil { return IdentityProviderClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IdentityProviderClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IdentityProviderClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IdentityProviderClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. -func (client *IdentityProviderClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, options *IdentityProviderClientListSecretsOptions) (*policy.Request, error) { +func (client *IdentityProviderClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, _ *IdentityProviderClientListSecretsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -417,7 +443,7 @@ func (client *IdentityProviderClient) listSecretsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -438,8 +464,8 @@ func (client *IdentityProviderClient) listSecretsHandleResponse(resp *http.Respo // Update - Updates an existing IdentityProvider configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - identityProviderName - Identity Provider Type identifier. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -447,22 +473,29 @@ func (client *IdentityProviderClient) listSecretsHandleResponse(resp *http.Respo // - parameters - Update parameters. // - options - IdentityProviderClientUpdateOptions contains the optional parameters for the IdentityProviderClient.Update method. func (client *IdentityProviderClient) Update(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string, parameters IdentityProviderUpdateParameters, options *IdentityProviderClientUpdateOptions) (IdentityProviderClientUpdateResponse, error) { + var err error + const operationName = "IdentityProviderClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, identityProviderName, ifMatch, parameters, options) if err != nil { return IdentityProviderClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IdentityProviderClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IdentityProviderClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IdentityProviderClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *IdentityProviderClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string, parameters IdentityProviderUpdateParameters, options *IdentityProviderClientUpdateOptions) (*policy.Request, error) { +func (client *IdentityProviderClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string, parameters IdentityProviderUpdateParameters, _ *IdentityProviderClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -485,11 +518,14 @@ func (client *IdentityProviderClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/issue_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/issue_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/issue_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/issue_client.go index 3172e5e7..81073862 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/issue_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/issue_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type IssueClient struct { } // NewIssueClient creates a new instance of IssueClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewIssueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IssueClient, error) { - cl, err := arm.NewClient(moduleName+".IssueClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,28 +44,35 @@ func NewIssueClient(subscriptionID string, credential azcore.TokenCredential, op // Get - Gets API Management issue details // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - issueID - Issue identifier. Must be unique in the current API Management service instance. // - options - IssueClientGetOptions contains the optional parameters for the IssueClient.Get method. func (client *IssueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, issueID string, options *IssueClientGetOptions) (IssueClientGetResponse, error) { + var err error + const operationName = "IssueClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, issueID, options) if err != nil { return IssueClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return IssueClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IssueClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IssueClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *IssueClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, issueID string, options *IssueClientGetOptions) (*policy.Request, error) { +func (client *IssueClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, issueID string, _ *IssueClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -93,7 +95,7 @@ func (client *IssueClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -113,8 +115,8 @@ func (client *IssueClient) getHandleResponse(resp *http.Response) (IssueClientGe // NewListByServicePager - Lists a collection of issues in the specified service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - IssueClientListByServiceOptions contains the optional parameters for the IssueClient.NewListByServicePager method. func (client *IssueClient) NewListByServicePager(resourceGroupName string, serviceName string, options *IssueClientListByServiceOptions) *runtime.Pager[IssueClientListByServiceResponse] { @@ -123,25 +125,20 @@ func (client *IssueClient) NewListByServicePager(resourceGroupName string, servi return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *IssueClientListByServiceResponse) (IssueClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IssueClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IssueClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return IssueClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IssueClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -168,13 +165,13 @@ func (client *IssueClient) listByServiceCreateRequest(ctx context.Context, resou if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/logger_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/logger_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/logger_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/logger_client.go index 3ad0afd2..dba13352 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/logger_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/logger_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type LoggerClient struct { } // NewLoggerClient creates a new instance of LoggerClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLoggerClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoggerClient, error) { - cl, err := arm.NewClient(moduleName+".LoggerClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +44,32 @@ func NewLoggerClient(subscriptionID string, credential azcore.TokenCredential, o // CreateOrUpdate - Creates or Updates a logger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - loggerID - Logger identifier. Must be unique in the API Management service instance. // - parameters - Create parameters. // - options - LoggerClientCreateOrUpdateOptions contains the optional parameters for the LoggerClient.CreateOrUpdate method. func (client *LoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, parameters LoggerContract, options *LoggerClientCreateOrUpdateOptions) (LoggerClientCreateOrUpdateResponse, error) { + var err error + const operationName = "LoggerClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, loggerID, parameters, options) if err != nil { return LoggerClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LoggerClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return LoggerClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return LoggerClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,13 +96,16 @@ func (client *LoggerClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,30 +123,36 @@ func (client *LoggerClient) createOrUpdateHandleResponse(resp *http.Response) (L // Delete - Deletes the specified logger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - loggerID - Logger identifier. Must be unique in the API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - LoggerClientDeleteOptions contains the optional parameters for the LoggerClient.Delete method. func (client *LoggerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, options *LoggerClientDeleteOptions) (LoggerClientDeleteResponse, error) { + var err error + const operationName = "LoggerClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, loggerID, ifMatch, options) if err != nil { return LoggerClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LoggerClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return LoggerClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return LoggerClientDeleteResponse{}, err } return LoggerClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *LoggerClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, options *LoggerClientDeleteOptions) (*policy.Request, error) { +func (client *LoggerClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, _ *LoggerClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -164,38 +175,45 @@ func (client *LoggerClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the logger specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - loggerID - Logger identifier. Must be unique in the API Management service instance. // - options - LoggerClientGetOptions contains the optional parameters for the LoggerClient.Get method. func (client *LoggerClient) Get(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, options *LoggerClientGetOptions) (LoggerClientGetResponse, error) { + var err error + const operationName = "LoggerClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, loggerID, options) if err != nil { return LoggerClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LoggerClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoggerClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoggerClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *LoggerClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, options *LoggerClientGetOptions) (*policy.Request, error) { +func (client *LoggerClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, _ *LoggerClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -218,7 +236,7 @@ func (client *LoggerClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -238,28 +256,35 @@ func (client *LoggerClient) getHandleResponse(resp *http.Response) (LoggerClient // GetEntityTag - Gets the entity state (Etag) version of the logger specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - loggerID - Logger identifier. Must be unique in the API Management service instance. // - options - LoggerClientGetEntityTagOptions contains the optional parameters for the LoggerClient.GetEntityTag method. func (client *LoggerClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, options *LoggerClientGetEntityTagOptions) (LoggerClientGetEntityTagResponse, error) { + var err error + const operationName = "LoggerClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, loggerID, options) if err != nil { return LoggerClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LoggerClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoggerClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoggerClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *LoggerClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, options *LoggerClientGetEntityTagOptions) (*policy.Request, error) { +func (client *LoggerClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, _ *LoggerClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -282,7 +307,7 @@ func (client *LoggerClient) getEntityTagCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -290,18 +315,17 @@ func (client *LoggerClient) getEntityTagCreateRequest(ctx context.Context, resou // getEntityTagHandleResponse handles the GetEntityTag response. func (client *LoggerClient) getEntityTagHandleResponse(resp *http.Response) (LoggerClientGetEntityTagResponse, error) { - result := LoggerClientGetEntityTagResponse{} + result := LoggerClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of loggers in the specified service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - LoggerClientListByServiceOptions contains the optional parameters for the LoggerClient.NewListByServicePager // method. @@ -311,25 +335,20 @@ func (client *LoggerClient) NewListByServicePager(resourceGroupName string, serv return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *LoggerClientListByServiceResponse) (LoggerClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoggerClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoggerClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return LoggerClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoggerClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -356,13 +375,13 @@ func (client *LoggerClient) listByServiceCreateRequest(ctx context.Context, reso if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -380,8 +399,8 @@ func (client *LoggerClient) listByServiceHandleResponse(resp *http.Response) (Lo // Update - Updates an existing logger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - loggerID - Logger identifier. Must be unique in the API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -389,22 +408,29 @@ func (client *LoggerClient) listByServiceHandleResponse(resp *http.Response) (Lo // - parameters - Update parameters. // - options - LoggerClientUpdateOptions contains the optional parameters for the LoggerClient.Update method. func (client *LoggerClient) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, parameters LoggerUpdateContract, options *LoggerClientUpdateOptions) (LoggerClientUpdateResponse, error) { + var err error + const operationName = "LoggerClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, loggerID, ifMatch, parameters, options) if err != nil { return LoggerClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LoggerClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoggerClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoggerClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *LoggerClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, parameters LoggerUpdateContract, options *LoggerClientUpdateOptions) (*policy.Request, error) { +func (client *LoggerClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, parameters LoggerUpdateContract, _ *LoggerClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -427,11 +453,14 @@ func (client *LoggerClient) updateCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/models.go new file mode 100644 index 00000000..0fca70e0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/models.go @@ -0,0 +1,7160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import "time" + +// APICollection - Paged API list representation. +type APICollection struct { + // Total record count number across all pages. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*APIContract +} + +// APIContactInformation - API contact information +type APIContactInformation struct { + // The email address of the contact person/organization. MUST be in the format of an email address + Email *string + + // The identifying name of the contact person/organization + Name *string + + // The URL pointing to the contact information. MUST be in the format of a URL + URL *string +} + +// APIContract - API details. +type APIContract struct { + // API entity contract properties. + Properties *APIContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// APIContractProperties - API Entity Properties +type APIContractProperties struct { + // REQUIRED; Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. + // It is appended to the API endpoint base URL specified during the service instance + // creation to form a public URL for this API. + Path *string + + // Describes the revision of the API. If no value is provided, default revision 1 is created + APIRevision *string + + // Description of the API Revision. + APIRevisionDescription *string + + // Type of API. + APIType *APIType + + // Indicates the version identifier of the API if the API is versioned + APIVersion *string + + // Description of the API Version. + APIVersionDescription *string + + // Version set details + APIVersionSet *APIVersionSetContractDetails + + // A resource identifier for the related ApiVersionSet. + APIVersionSetID *string + + // Collection of authentication settings included into this API. + AuthenticationSettings *AuthenticationSettingsContract + + // Contact information for the API. + Contact *APIContactInformation + + // Description of the API. May include HTML formatting tags. + Description *string + + // API name. Must be 1 to 300 characters long. + DisplayName *string + + // Indicates if API revision is current api revision. + IsCurrent *bool + + // License information for the API. + License *APILicenseInformation + + // Describes on which protocols the operations in this API can be invoked. + Protocols []*Protocol + + // Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + ServiceURL *string + + // API identifier of the source API. + SourceAPIID *string + + // Protocols over which API is made available. + SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract + + // Specifies whether an API or Product subscription is required for accessing the API. + SubscriptionRequired *bool + + // A URL to the Terms of Service for the API. MUST be in the format of a URL. + TermsOfServiceURL *string + + // READ-ONLY; Indicates if API revision is accessible via the gateway. + IsOnline *bool + + // READ-ONLY; The provisioning state + ProvisioningState *string +} + +// APIContractUpdateProperties - API update contract properties. +type APIContractUpdateProperties struct { + // Describes the revision of the API. If no value is provided, default revision 1 is created + APIRevision *string + + // Description of the API Revision. + APIRevisionDescription *string + + // Type of API. + APIType *APIType + + // Indicates the version identifier of the API if the API is versioned + APIVersion *string + + // Description of the API Version. + APIVersionDescription *string + + // A resource identifier for the related ApiVersionSet. + APIVersionSetID *string + + // Collection of authentication settings included into this API. + AuthenticationSettings *AuthenticationSettingsContract + + // Contact information for the API. + Contact *APIContactInformation + + // Description of the API. May include HTML formatting tags. + Description *string + + // API name. + DisplayName *string + + // Indicates if API revision is current api revision. + IsCurrent *bool + + // License information for the API. + License *APILicenseInformation + + // Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It + // is appended to the API endpoint base URL specified during the service instance + // creation to form a public URL for this API. + Path *string + + // Describes on which protocols the operations in this API can be invoked. + Protocols []*Protocol + + // Absolute URL of the backend service implementing this API. + ServiceURL *string + + // Protocols over which API is made available. + SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract + + // Specifies whether an API or Product subscription is required for accessing the API. + SubscriptionRequired *bool + + // A URL to the Terms of Service for the API. MUST be in the format of a URL. + TermsOfServiceURL *string + + // READ-ONLY; Indicates if API revision is accessible via the gateway. + IsOnline *bool +} + +// APICreateOrUpdateParameter - API Create or Update Parameters. +type APICreateOrUpdateParameter struct { + // API entity create of update properties. + Properties *APICreateOrUpdateProperties +} + +// APICreateOrUpdateProperties - API Create or Update Properties. +type APICreateOrUpdateProperties struct { + // REQUIRED; Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. + // It is appended to the API endpoint base URL specified during the service instance + // creation to form a public URL for this API. + Path *string + + // Describes the revision of the API. If no value is provided, default revision 1 is created + APIRevision *string + + // Description of the API Revision. + APIRevisionDescription *string + + // Type of API. + APIType *APIType + + // Indicates the version identifier of the API if the API is versioned + APIVersion *string + + // Description of the API Version. + APIVersionDescription *string + + // Version set details + APIVersionSet *APIVersionSetContractDetails + + // A resource identifier for the related ApiVersionSet. + APIVersionSetID *string + + // Collection of authentication settings included into this API. + AuthenticationSettings *AuthenticationSettingsContract + + // Contact information for the API. + Contact *APIContactInformation + + // Description of the API. May include HTML formatting tags. + Description *string + + // API name. Must be 1 to 300 characters long. + DisplayName *string + + // Format of the Content in which the API is getting imported. New formats can be added in the future + Format *ContentFormat + + // Indicates if API revision is current api revision. + IsCurrent *bool + + // License information for the API. + License *APILicenseInformation + + // Describes on which protocols the operations in this API can be invoked. + Protocols []*Protocol + + // Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + ServiceURL *string + + // Type of API to create. + // * http creates a REST API + // * soap creates a SOAP pass-through API + // * websocket creates websocket API + // * graphql creates GraphQL API. New types can be added in the future. + SoapAPIType *SoapAPIType + + // API identifier of the source API. + SourceAPIID *string + + // Protocols over which API is made available. + SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract + + // Specifies whether an API or Product subscription is required for accessing the API. + SubscriptionRequired *bool + + // A URL to the Terms of Service for the API. MUST be in the format of a URL. + TermsOfServiceURL *string + + // Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', + // 'query' + TranslateRequiredQueryParametersConduct *TranslateRequiredQueryParametersConduct + + // Content value when Importing an API. + Value *string + + // Criteria to limit import of WSDL to a subset of the document. + WsdlSelector *APICreateOrUpdatePropertiesWsdlSelector + + // READ-ONLY; Indicates if API revision is accessible via the gateway. + IsOnline *bool + + // READ-ONLY; The provisioning state + ProvisioningState *string +} + +// APICreateOrUpdatePropertiesWsdlSelector - Criteria to limit import of WSDL to a subset of the document. +type APICreateOrUpdatePropertiesWsdlSelector struct { + // Name of endpoint(port) to import from WSDL + WsdlEndpointName *string + + // Name of service to import from WSDL + WsdlServiceName *string +} + +// APIEntityBaseContract - API base contract details. +type APIEntityBaseContract struct { + // Describes the revision of the API. If no value is provided, default revision 1 is created + APIRevision *string + + // Description of the API Revision. + APIRevisionDescription *string + + // Type of API. + APIType *APIType + + // Indicates the version identifier of the API if the API is versioned + APIVersion *string + + // Description of the API Version. + APIVersionDescription *string + + // A resource identifier for the related ApiVersionSet. + APIVersionSetID *string + + // Collection of authentication settings included into this API. + AuthenticationSettings *AuthenticationSettingsContract + + // Contact information for the API. + Contact *APIContactInformation + + // Description of the API. May include HTML formatting tags. + Description *string + + // Indicates if API revision is current api revision. + IsCurrent *bool + + // License information for the API. + License *APILicenseInformation + + // Protocols over which API is made available. + SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract + + // Specifies whether an API or Product subscription is required for accessing the API. + SubscriptionRequired *bool + + // A URL to the Terms of Service for the API. MUST be in the format of a URL. + TermsOfServiceURL *string + + // READ-ONLY; Indicates if API revision is accessible via the gateway. + IsOnline *bool +} + +// APIExportResult - API Export result. +type APIExportResult struct { + // Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. + ExportResultFormat *ExportResultFormat + + // ResourceId of the API which was exported. + ID *string + + // The object defining the schema of the exported API Detail + Value *APIExportResultValue +} + +// APIExportResultValue - The object defining the schema of the exported API Detail +type APIExportResultValue struct { + // Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. + Link *string +} + +// APILicenseInformation - API license information +type APILicenseInformation struct { + // The license name used for the API + Name *string + + // A URL to the license used for the API. MUST be in the format of a URL + URL *string +} + +// APIReleaseCollection - Paged ApiRelease list representation. +type APIReleaseCollection struct { + // Total record count number across all pages. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*APIReleaseContract +} + +// APIReleaseContract - ApiRelease details. +type APIReleaseContract struct { + // ApiRelease entity contract properties. + Properties *APIReleaseContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// APIReleaseContractProperties - API Release details +type APIReleaseContractProperties struct { + // Identifier of the API the release belongs to. + APIID *string + + // Release Notes + Notes *string + + // READ-ONLY; The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + // by the ISO 8601 standard. + CreatedDateTime *time.Time + + // READ-ONLY; The time the API release was updated. + UpdatedDateTime *time.Time +} + +// APIRevisionCollection - Paged API Revision list representation. +type APIRevisionCollection struct { + // Total record count number across all pages. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*APIRevisionContract +} + +// APIRevisionContract - Summary of revision metadata. +type APIRevisionContract struct { + // READ-ONLY; Identifier of the API Revision. + APIID *string + + // READ-ONLY; Revision number of API. + APIRevision *string + + // READ-ONLY; The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + // by the ISO 8601 standard. + CreatedDateTime *time.Time + + // READ-ONLY; Description of the API Revision. + Description *string + + // READ-ONLY; Indicates if API revision is accessible via the gateway. + IsCurrent *bool + + // READ-ONLY; Indicates if API revision is the current api revision. + IsOnline *bool + + // READ-ONLY; Gateway URL for accessing the non-current API Revision. + PrivateURL *string + + // READ-ONLY; The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + // by the ISO 8601 standard. + UpdatedDateTime *time.Time +} + +// APIRevisionInfoContract - Object used to create an API Revision or Version based on an existing API Revision +type APIRevisionInfoContract struct { + // Description of new API Revision. + APIRevisionDescription *string + + // Version identifier for the new API Version. + APIVersionName *string + + // Version set details + APIVersionSet *APIVersionSetContractDetails + + // Resource identifier of API to be used to create the revision from. + SourceAPIID *string +} + +// APITagResourceContractProperties - API contract properties for the Tag Resources. +type APITagResourceContractProperties struct { + // Describes the revision of the API. If no value is provided, default revision 1 is created + APIRevision *string + + // Description of the API Revision. + APIRevisionDescription *string + + // Type of API. + APIType *APIType + + // Indicates the version identifier of the API if the API is versioned + APIVersion *string + + // Description of the API Version. + APIVersionDescription *string + + // A resource identifier for the related ApiVersionSet. + APIVersionSetID *string + + // Collection of authentication settings included into this API. + AuthenticationSettings *AuthenticationSettingsContract + + // Contact information for the API. + Contact *APIContactInformation + + // Description of the API. May include HTML formatting tags. + Description *string + + // API identifier in the form /apis/{apiId}. + ID *string + + // Indicates if API revision is current api revision. + IsCurrent *bool + + // License information for the API. + License *APILicenseInformation + + // API name. + Name *string + + // Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It + // is appended to the API endpoint base URL specified during the service instance + // creation to form a public URL for this API. + Path *string + + // Describes on which protocols the operations in this API can be invoked. + Protocols []*Protocol + + // Absolute URL of the backend service implementing this API. + ServiceURL *string + + // Protocols over which API is made available. + SubscriptionKeyParameterNames *SubscriptionKeyParameterNamesContract + + // Specifies whether an API or Product subscription is required for accessing the API. + SubscriptionRequired *bool + + // A URL to the Terms of Service for the API. MUST be in the format of a URL. + TermsOfServiceURL *string + + // READ-ONLY; Indicates if API revision is accessible via the gateway. + IsOnline *bool +} + +// APIUpdateContract - API update contract details. +type APIUpdateContract struct { + // Properties of the API entity that can be updated. + Properties *APIContractUpdateProperties +} + +// APIVersionConstraint - Control Plane Apis version constraint for the API Management service. +type APIVersionConstraint struct { + // Limit control plane API calls to API Management service with version equal to or newer than this value. + MinAPIVersion *string +} + +// APIVersionSetCollection - Paged API Version Set list representation. +type APIVersionSetCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*APIVersionSetContract +} + +// APIVersionSetContract - API Version Set Contract details. +type APIVersionSetContract struct { + // API VersionSet contract properties. + Properties *APIVersionSetContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// APIVersionSetContractDetails - An API Version Set contains the common configuration for a set of API Versions relating +type APIVersionSetContractDetails struct { + // Description of API Version Set. + Description *string + + // Identifier for existing API Version Set. Omit this value to create a new Version Set. + ID *string + + // The display Name of the API Version Set. + Name *string + + // Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header. + VersionHeaderName *string + + // Name of query parameter that indicates the API Version if versioningScheme is set to query. + VersionQueryName *string + + // An value that determines where the API Version identifier will be located in a HTTP request. + VersioningScheme *APIVersionSetContractDetailsVersioningScheme +} + +// APIVersionSetContractProperties - Properties of an API Version Set. +type APIVersionSetContractProperties struct { + // REQUIRED; Name of API Version Set + DisplayName *string + + // REQUIRED; An value that determines where the API Version identifier will be located in a HTTP request. + VersioningScheme *VersioningScheme + + // Description of API Version Set. + Description *string + + // Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header. + VersionHeaderName *string + + // Name of query parameter that indicates the API Version if versioningScheme is set to query. + VersionQueryName *string +} + +// APIVersionSetEntityBase - API Version set base parameters +type APIVersionSetEntityBase struct { + // Description of API Version Set. + Description *string + + // Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header. + VersionHeaderName *string + + // Name of query parameter that indicates the API Version if versioningScheme is set to query. + VersionQueryName *string +} + +// APIVersionSetUpdateParameters - Parameters to update or create an API Version Set Contract. +type APIVersionSetUpdateParameters struct { + // Parameters to update or create an API Version Set Contract. + Properties *APIVersionSetUpdateParametersProperties +} + +// APIVersionSetUpdateParametersProperties - Properties used to create or update an API Version Set. +type APIVersionSetUpdateParametersProperties struct { + // Description of API Version Set. + Description *string + + // Name of API Version Set + DisplayName *string + + // Name of HTTP header parameter that indicates the API Version if versioningScheme is set to header. + VersionHeaderName *string + + // Name of query parameter that indicates the API Version if versioningScheme is set to query. + VersionQueryName *string + + // An value that determines where the API Version identifier will be located in a HTTP request. + VersioningScheme *VersioningScheme +} + +// AccessInformationCollection - Paged AccessInformation list representation. +type AccessInformationCollection struct { + // Total record count number across all pages. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*AccessInformationContract +} + +// AccessInformationContract - Tenant Settings. +type AccessInformationContract struct { + // AccessInformation entity contract properties. + Properties *AccessInformationContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AccessInformationContractProperties - Tenant access information contract of the API Management service. +type AccessInformationContractProperties struct { + // Determines whether direct access is enabled. + Enabled *bool + + // Access Information type ('access' or 'gitAccess') + ID *string + + // Principal (User) Identifier. + PrincipalID *string +} + +// AccessInformationCreateParameterProperties - Tenant access information update parameters of the API Management service +type AccessInformationCreateParameterProperties struct { + // Determines whether direct access is enabled. + Enabled *bool + + // Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + PrimaryKey *string + + // Principal (User) Identifier. + PrincipalID *string + + // Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the + // value. + SecondaryKey *string +} + +// AccessInformationCreateParameters - Tenant access information update parameters. +type AccessInformationCreateParameters struct { + // Tenant access information update parameter properties. + Properties *AccessInformationCreateParameterProperties +} + +// AccessInformationSecretsContract - Tenant access information contract of the API Management service. +type AccessInformationSecretsContract struct { + // Determines whether direct access is enabled. + Enabled *bool + + // Access Information type ('access' or 'gitAccess') + ID *string + + // Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + PrimaryKey *string + + // Principal (User) Identifier. + PrincipalID *string + + // Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the + // value. + SecondaryKey *string +} + +// AccessInformationUpdateParameterProperties - Tenant access information update parameters of the API Management service +type AccessInformationUpdateParameterProperties struct { + // Determines whether direct access is enabled. + Enabled *bool +} + +// AccessInformationUpdateParameters - Tenant access information update parameters. +type AccessInformationUpdateParameters struct { + // Tenant access information update parameter properties. + Properties *AccessInformationUpdateParameterProperties +} + +// AdditionalLocation - Description of an additional API Management resource location. +type AdditionalLocation struct { + // REQUIRED; The location name of the additional region among Azure Data center regions. + Location *string + + // REQUIRED; SKU properties of the API Management service. + SKU *ServiceSKUProperties + + // Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway + // in this additional location. + DisableGateway *bool + + // Property can be used to enable NAT Gateway for this API Management service. + NatGatewayState *NatGatewayState + + // Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported + // only for Premium SKU being deployed in Virtual Network. + PublicIPAddressID *string + + // Virtual network configuration for the location. + VirtualNetworkConfiguration *VirtualNetworkConfiguration + + // A list of availability zones denoting where the resource needs to come from. + Zones []*string + + // READ-ONLY; Gateway URL of the API Management service in the Region. + GatewayRegionalURL *string + + // READ-ONLY; Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium + // SKU on stv2 platform. + OutboundPublicIPAddresses []*string + + // READ-ONLY; Compute Platform Version running the service. + PlatformVersion *PlatformVersion + + // READ-ONLY; Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual + // Network in a particular additional location. Available only for Basic, Standard, + // Premium and Isolated SKU. + PrivateIPAddresses []*string + + // READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in the additional location. Available + // only for Basic, Standard, Premium and Isolated SKU. + PublicIPAddresses []*string +} + +// AllPoliciesCollection - The response of All Policies. +type AllPoliciesCollection struct { + // Next page link if any. + NextLink *string + + // AllPolicies Contract value. + Value []*AllPoliciesContract +} + +// AllPoliciesContract - AllPolicies Contract details. +type AllPoliciesContract struct { + // Properties of the All Policies. + Properties *AllPoliciesContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AllPoliciesContractProperties - AllPolicies Properties. +type AllPoliciesContractProperties struct { + // Policy Restriction Compliance State + ComplianceState *PolicyComplianceState + + // Policy Identifier + ReferencePolicyID *string +} + +// ApimResource - The Resource definition. +type ApimResource struct { + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement. + Type *string +} + +// ArmIDWrapper - A wrapper for an ARM resource id +type ArmIDWrapper struct { + // READ-ONLY + ID *string +} + +// AssociationContract - Association entity details. +type AssociationContract struct { + // Association entity contract properties. + Properties *AssociationContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AssociationContractProperties - Association entity contract properties. +type AssociationContractProperties struct { + // CONSTANT; Provisioning state. + // Field has constant value "created", any specified value is ignored. + ProvisioningState *string +} + +// AuthenticationSettingsContract - API Authentication Settings. +type AuthenticationSettingsContract struct { + // OAuth2 Authentication settings + OAuth2 *OAuth2AuthenticationSettingsContract + + // Collection of OAuth2 authentication settings included into this API. + OAuth2AuthenticationSettings []*OAuth2AuthenticationSettingsContract + + // OpenID Connect Authentication Settings + Openid *OpenIDAuthenticationSettingsContract + + // Collection of Open ID Connect authentication settings included into this API. + OpenidAuthenticationSettings []*OpenIDAuthenticationSettingsContract +} + +// AuthorizationAccessPolicyCollection - Paged Authorization Access Policy list representation. +type AuthorizationAccessPolicyCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*AuthorizationAccessPolicyContract +} + +// AuthorizationAccessPolicyContract - Authorization access policy contract. +type AuthorizationAccessPolicyContract struct { + // Properties of the Authorization Contract. + Properties *AuthorizationAccessPolicyContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AuthorizationAccessPolicyContractProperties - Authorization Access Policy details. +type AuthorizationAccessPolicyContractProperties struct { + // The allowed Azure Active Directory Application IDs + AppIDs []*string + + // The Object Id + ObjectID *string + + // The Tenant Id + TenantID *string +} + +// AuthorizationCollection - Paged Authorization list representation. +type AuthorizationCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*AuthorizationContract +} + +// AuthorizationConfirmConsentCodeRequestContract - Authorization confirm consent code request contract. +type AuthorizationConfirmConsentCodeRequestContract struct { + // The consent code from the authorization server after authorizing and consenting. + ConsentCode *string +} + +// AuthorizationContract - Authorization contract. +type AuthorizationContract struct { + // Properties of the Authorization Contract. + Properties *AuthorizationContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AuthorizationContractProperties - Authorization details. +type AuthorizationContractProperties struct { + // Authorization type options + AuthorizationType *AuthorizationType + + // Authorization error details. + Error *AuthorizationError + + // OAuth2 grant type options + OAuth2GrantType *OAuth2GrantType + + // Authorization parameters + Parameters map[string]*string + + // Status of the Authorization + Status *string +} + +// AuthorizationError - Authorization error details. +type AuthorizationError struct { + // Error code + Code *string + + // Error message + Message *string +} + +// AuthorizationLoginRequestContract - Authorization login request contract. +type AuthorizationLoginRequestContract struct { + // The redirect URL after login has completed. + PostLoginRedirectURL *string +} + +// AuthorizationLoginResponseContract - Authorization login response contract. +type AuthorizationLoginResponseContract struct { + // The login link + LoginLink *string +} + +// AuthorizationProviderCollection - Paged Authorization Provider list representation. +type AuthorizationProviderCollection struct { + // Next page link if any. + NextLink *string + + // Page values. + Value []*AuthorizationProviderContract +} + +// AuthorizationProviderContract - Authorization Provider contract. +type AuthorizationProviderContract struct { + // Properties of the Authorization Provider Contract. + Properties *AuthorizationProviderContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AuthorizationProviderContractProperties - Authorization Provider details. +type AuthorizationProviderContractProperties struct { + // Authorization Provider name. Must be 1 to 300 characters long. + DisplayName *string + + // Identity provider name. Must be 1 to 300 characters long. + IdentityProvider *string + + // OAuth2 settings + Oauth2 *AuthorizationProviderOAuth2Settings +} + +// AuthorizationProviderOAuth2GrantTypes - Authorization Provider oauth2 grant types settings +type AuthorizationProviderOAuth2GrantTypes struct { + // OAuth2 authorization code grant parameters + AuthorizationCode map[string]*string + + // OAuth2 client credential grant parameters + ClientCredentials map[string]*string +} + +// AuthorizationProviderOAuth2Settings - OAuth2 settings details +type AuthorizationProviderOAuth2Settings struct { + // OAuth2 settings + GrantTypes *AuthorizationProviderOAuth2GrantTypes + + // Redirect URL to be set in the OAuth application. + RedirectURL *string +} + +// AuthorizationServerCollection - Paged OAuth2 Authorization Servers list representation. +type AuthorizationServerCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*AuthorizationServerContract +} + +// AuthorizationServerContract - External OAuth authorization server settings. +type AuthorizationServerContract struct { + // Properties of the External OAuth authorization server Contract. + Properties *AuthorizationServerContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AuthorizationServerContractBaseProperties - External OAuth authorization server Update settings contract. +type AuthorizationServerContractBaseProperties struct { + // HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + AuthorizationMethods []*AuthorizationMethod + + // Specifies the mechanism by which access token is passed to the API. + BearerTokenSendingMethods []*BearerTokenSendingMethod + + // Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or + // Body. When Body is specified, client credentials and other parameters are passed + // within the request body in the application/x-www-form-urlencoded format. + ClientAuthenticationMethod []*ClientAuthenticationMethod + + // Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in + // the form of a string containing space-delimited values. + DefaultScope *string + + // Description of the authorization server. Can contain HTML formatting tags. + Description *string + + // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default + // resource owner password. + ResourceOwnerPassword *string + + // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default + // resource owner username. + ResourceOwnerUsername *string + + // If true, authorization server will include state parameter from the authorization request to its response. Client may use + // state parameter to raise protocol security. + SupportState *bool + + // Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects + // with name and value string properties, i.e. {"name" : "name value", "value": + // "a value"}. + TokenBodyParameters []*TokenBodyParameterContract + + // OAuth token endpoint. Contains absolute URI to entity being referenced. + TokenEndpoint *string +} + +// AuthorizationServerContractProperties - External OAuth authorization server settings Properties. +type AuthorizationServerContractProperties struct { + // REQUIRED; OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + AuthorizationEndpoint *string + + // REQUIRED; Client or app id registered with this authorization server. + ClientID *string + + // REQUIRED; Optional reference to a page where client or app registration for this authorization server is performed. Contains + // absolute URL to entity being referenced. + ClientRegistrationEndpoint *string + + // REQUIRED; User-friendly authorization server name. + DisplayName *string + + // REQUIRED; Form of an authorization grant, which the client uses to request the access token. + GrantTypes []*GrantType + + // HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + AuthorizationMethods []*AuthorizationMethod + + // Specifies the mechanism by which access token is passed to the API. + BearerTokenSendingMethods []*BearerTokenSendingMethod + + // Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or + // Body. When Body is specified, client credentials and other parameters are passed + // within the request body in the application/x-www-form-urlencoded format. + ClientAuthenticationMethod []*ClientAuthenticationMethod + + // Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use + // '/listSecrets' POST request to get the value. + ClientSecret *string + + // Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in + // the form of a string containing space-delimited values. + DefaultScope *string + + // Description of the authorization server. Can contain HTML formatting tags. + Description *string + + // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default + // resource owner password. + ResourceOwnerPassword *string + + // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default + // resource owner username. + ResourceOwnerUsername *string + + // If true, authorization server will include state parameter from the authorization request to its response. Client may use + // state parameter to raise protocol security. + SupportState *bool + + // Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects + // with name and value string properties, i.e. {"name" : "name value", "value": + // "a value"}. + TokenBodyParameters []*TokenBodyParameterContract + + // OAuth token endpoint. Contains absolute URI to entity being referenced. + TokenEndpoint *string + + // If true, the authorization server will be used in the API documentation in the developer portal. False by default if no + // value is provided. + UseInAPIDocumentation *bool + + // If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + UseInTestConsole *bool +} + +// AuthorizationServerSecretsContract - OAuth Server Secrets Contract. +type AuthorizationServerSecretsContract struct { + // oAuth Authorization Server Secrets. + ClientSecret *string + + // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default + // resource owner password. + ResourceOwnerPassword *string + + // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default + // resource owner username. + ResourceOwnerUsername *string +} + +// AuthorizationServerUpdateContract - External OAuth authorization server settings. +type AuthorizationServerUpdateContract struct { + // Properties of the External OAuth authorization server update Contract. + Properties *AuthorizationServerUpdateContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AuthorizationServerUpdateContractProperties - External OAuth authorization server Update settings contract. +type AuthorizationServerUpdateContractProperties struct { + // OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + AuthorizationEndpoint *string + + // HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + AuthorizationMethods []*AuthorizationMethod + + // Specifies the mechanism by which access token is passed to the API. + BearerTokenSendingMethods []*BearerTokenSendingMethod + + // Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or + // Body. When Body is specified, client credentials and other parameters are passed + // within the request body in the application/x-www-form-urlencoded format. + ClientAuthenticationMethod []*ClientAuthenticationMethod + + // Client or app id registered with this authorization server. + ClientID *string + + // Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute + // URL to entity being referenced. + ClientRegistrationEndpoint *string + + // Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use + // '/listSecrets' POST request to get the value. + ClientSecret *string + + // Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in + // the form of a string containing space-delimited values. + DefaultScope *string + + // Description of the authorization server. Can contain HTML formatting tags. + Description *string + + // User-friendly authorization server name. + DisplayName *string + + // Form of an authorization grant, which the client uses to request the access token. + GrantTypes []*GrantType + + // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default + // resource owner password. + ResourceOwnerPassword *string + + // Can be optionally specified when resource owner password grant type is supported by this authorization server. Default + // resource owner username. + ResourceOwnerUsername *string + + // If true, authorization server will include state parameter from the authorization request to its response. Client may use + // state parameter to raise protocol security. + SupportState *bool + + // Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects + // with name and value string properties, i.e. {"name" : "name value", "value": + // "a value"}. + TokenBodyParameters []*TokenBodyParameterContract + + // OAuth token endpoint. Contains absolute URI to entity being referenced. + TokenEndpoint *string + + // If true, the authorization server will be used in the API documentation in the developer portal. False by default if no + // value is provided. + UseInAPIDocumentation *bool + + // If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + UseInTestConsole *bool +} + +// BackendAuthorizationHeaderCredentials - Authorization header information. +type BackendAuthorizationHeaderCredentials struct { + // REQUIRED; Authentication Parameter value. + Parameter *string + + // REQUIRED; Authentication Scheme name. + Scheme *string +} + +// BackendBaseParameters - Backend entity base Parameter set. +type BackendBaseParameters struct { + // Backend Circuit Breaker Configuration + CircuitBreaker *BackendCircuitBreaker + + // Backend Credentials Contract Properties + Credentials *BackendCredentialsContract + + // Backend Description. + Description *string + Pool *BackendBaseParametersPool + + // Backend Properties contract + Properties *BackendProperties + + // Backend gateway Contract Properties + Proxy *BackendProxyContract + + // Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or + // API Apps. + ResourceID *string + + // Backend TLS Properties + TLS *BackendTLSProperties + + // Backend Title. + Title *string + + // Type of the backend. A backend can be either Single or Pool. + Type *BackendType +} + +type BackendBaseParametersPool struct { + // The list of backend entities belonging to a pool. + Services []*BackendPoolItem +} + +// BackendCircuitBreaker - The configuration of the backend circuit breaker +type BackendCircuitBreaker struct { + // The rules for tripping the backend. + Rules []*CircuitBreakerRule +} + +// BackendCollection - Paged Backend list representation. +type BackendCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Backend values. + Value []*BackendContract +} + +// BackendConfiguration - Information regarding how the gateway should integrate with backend systems. +type BackendConfiguration struct { + // The default hostname of the data-plane gateway to which requests can be sent. + Subnet *BackendSubnetConfiguration +} + +// BackendContract - Backend details. +type BackendContract struct { + // Backend entity contract properties. + Properties *BackendContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// BackendContractProperties - Parameters supplied to the Create Backend operation. +type BackendContractProperties struct { + // REQUIRED; Backend communication protocol. + Protocol *BackendProtocol + + // REQUIRED; Runtime Url of the Backend. + URL *string + + // Backend Circuit Breaker Configuration + CircuitBreaker *BackendCircuitBreaker + + // Backend Credentials Contract Properties + Credentials *BackendCredentialsContract + + // Backend Description. + Description *string + Pool *BackendBaseParametersPool + + // Backend Properties contract + Properties *BackendProperties + + // Backend gateway Contract Properties + Proxy *BackendProxyContract + + // Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or + // API Apps. + ResourceID *string + + // Backend TLS Properties + TLS *BackendTLSProperties + + // Backend Title. + Title *string + + // Type of the backend. A backend can be either Single or Pool. + Type *BackendType +} + +// BackendCredentialsContract - Details of the Credentials used to connect to Backend. +type BackendCredentialsContract struct { + // Authorization header authentication + Authorization *BackendAuthorizationHeaderCredentials + + // List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. + Certificate []*string + + // List of Client Certificate Ids. + CertificateIDs []*string + + // Header Parameter description. + Header map[string][]*string + + // Query Parameter description. + Query map[string][]*string +} + +// BackendPool - Backend pool information +type BackendPool struct { + // The list of backend entities belonging to a pool. + Services []*BackendPoolItem +} + +// BackendPoolItem - Backend pool service information +type BackendPoolItem struct { + // REQUIRED; The unique ARM id of the backend entity. The ARM id should refer to an already existing backend entity. + ID *string + + // The priority of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not + // specified. + Priority *int32 + + // The weight of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. + Weight *int32 +} + +// BackendProperties - Properties specific to the Backend Type. +type BackendProperties struct { + // Backend Service Fabric Cluster Properties + ServiceFabricCluster *BackendServiceFabricClusterProperties +} + +// BackendProxyContract - Details of the Backend WebProxy Server to use in the Request to Backend. +type BackendProxyContract struct { + // REQUIRED; WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all + // fragments and query strings. + URL *string + + // Password to connect to the WebProxy Server + Password *string + + // Username to connect to the WebProxy server + Username *string +} + +// BackendReconnectContract - Reconnect request parameters. +type BackendReconnectContract struct { + // Reconnect request properties. + Properties *BackendReconnectProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// BackendReconnectProperties - Properties to control reconnect requests. +type BackendReconnectProperties struct { + // Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. + After *string +} + +// BackendServiceFabricClusterProperties - Properties of the Service Fabric Type Backend. +type BackendServiceFabricClusterProperties struct { + // REQUIRED; The cluster management endpoint. + ManagementEndpoints []*string + + // The client certificate id for the management endpoint. + ClientCertificateID *string + + // The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided + ClientCertificatethumbprint *string + + // Maximum number of retries while attempting resolve the partition. + MaxPartitionResolutionRetries *int32 + + // Thumbprints of certificates cluster management service uses for tls communication + ServerCertificateThumbprints []*string + + // Server X509 Certificate Names Collection + ServerX509Names []*X509CertificateName +} + +// BackendSubnetConfiguration - Information regarding how the subnet to which the gateway should be injected. +type BackendSubnetConfiguration struct { + // The ARM ID of the subnet in which the backend systems are hosted. + ID *string +} + +// BackendTLSProperties - Properties controlling TLS Certificate Validation. +type BackendTLSProperties struct { + // Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend + // host. + ValidateCertificateChain *bool + + // Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend + // host. + ValidateCertificateName *bool +} + +// BackendUpdateParameterProperties - Parameters supplied to the Update Backend operation. +type BackendUpdateParameterProperties struct { + // Backend Circuit Breaker Configuration + CircuitBreaker *BackendCircuitBreaker + + // Backend Credentials Contract Properties + Credentials *BackendCredentialsContract + + // Backend Description. + Description *string + Pool *BackendBaseParametersPool + + // Backend Properties contract + Properties *BackendProperties + + // Backend communication protocol. + Protocol *BackendProtocol + + // Backend gateway Contract Properties + Proxy *BackendProxyContract + + // Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or + // API Apps. + ResourceID *string + + // Backend TLS Properties + TLS *BackendTLSProperties + + // Backend Title. + Title *string + + // Type of the backend. A backend can be either Single or Pool. + Type *BackendType + + // Runtime Url of the Backend. + URL *string +} + +// BackendUpdateParameters - Backend update parameters. +type BackendUpdateParameters struct { + // Backend entity update contract properties. + Properties *BackendUpdateParameterProperties +} + +// BodyDiagnosticSettings - Body logging settings. +type BodyDiagnosticSettings struct { + // Number of request body bytes to log. + Bytes *int32 +} + +// CacheCollection - Paged Caches list representation. +type CacheCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*CacheContract +} + +// CacheContract - Cache details. +type CacheContract struct { + // Cache properties details. + Properties *CacheContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// CacheContractProperties - Properties of the Cache contract. +type CacheContractProperties struct { + // REQUIRED; Runtime connection string to cache + ConnectionString *string + + // REQUIRED; Location identifier to use cache from (should be either 'default' or valid Azure region identifier) + UseFromLocation *string + + // Cache description + Description *string + + // Original uri of entity in external system cache points to + ResourceID *string +} + +// CacheUpdateParameters - Cache update details. +type CacheUpdateParameters struct { + // Cache update properties details. + Properties *CacheUpdateProperties +} + +// CacheUpdateProperties - Parameters supplied to the Update Cache operation. +type CacheUpdateProperties struct { + // Runtime connection string to cache + ConnectionString *string + + // Cache description + Description *string + + // Original uri of entity in external system cache points to + ResourceID *string + + // Location identifier to use cache from (should be either 'default' or valid Azure region identifier) + UseFromLocation *string +} + +// CertificateCollection - Paged Certificates list representation. +type CertificateCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*CertificateContract +} + +// CertificateConfiguration - Certificate configuration which consist of non-trusted intermediates and root certificates. +type CertificateConfiguration struct { + // REQUIRED; The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority + // are valid locations. + StoreName *CertificateConfigurationStoreName + + // Certificate information. + Certificate *CertificateInformation + + // Certificate Password. + CertificatePassword *string + + // Base64 Encoded certificate. + EncodedCertificate *string +} + +// CertificateContract - Certificate details. +type CertificateContract struct { + // Certificate properties details. + Properties *CertificateContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// CertificateContractProperties - Properties of the Certificate contract. +type CertificateContractProperties struct { + // REQUIRED; Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + // by the ISO 8601 standard. + ExpirationDate *time.Time + + // REQUIRED; Subject attribute of the certificate. + Subject *string + + // REQUIRED; Thumbprint of the certificate. + Thumbprint *string + + // KeyVault location details of the certificate. + KeyVault *KeyVaultContractProperties +} + +// CertificateCreateOrUpdateParameters - Certificate create or update details. +type CertificateCreateOrUpdateParameters struct { + // Certificate create or update properties details. + Properties *CertificateCreateOrUpdateProperties +} + +// CertificateCreateOrUpdateProperties - Parameters supplied to the CreateOrUpdate certificate operation. +type CertificateCreateOrUpdateProperties struct { + // Base 64 encoded certificate using the application/x-pkcs12 representation. + Data *string + + // KeyVault location details of the certificate. + KeyVault *KeyVaultContractCreateProperties + + // Password for the Certificate + Password *string +} + +// CertificateInformation - SSL certificate information. +type CertificateInformation struct { + // REQUIRED; Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + // by the ISO 8601 standard. + Expiry *time.Time + + // REQUIRED; Subject of the certificate. + Subject *string + + // REQUIRED; Thumbprint of the certificate. + Thumbprint *string +} + +// CircuitBreakerFailureCondition - The trip conditions of the circuit breaker +type CircuitBreakerFailureCondition struct { + // The threshold for opening the circuit. + Count *int64 + + // The error reasons which are considered as failure. + ErrorReasons []*string + + // The interval during which the failures are counted. + Interval *string + + // The threshold for opening the circuit. + Percentage *int64 + + // The status code ranges which are considered as failure. + StatusCodeRanges []*FailureStatusCodeRange +} + +// CircuitBreakerRule - Rule configuration to trip the backend. +type CircuitBreakerRule struct { + // flag to accept Retry-After header from the backend. + AcceptRetryAfter *bool + + // The conditions for tripping the circuit breaker. + FailureCondition *CircuitBreakerFailureCondition + + // The rule name. + Name *string + + // The duration for which the circuit will be tripped. + TripDuration *string +} + +// ClientSecretContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. +type ClientSecretContract struct { + // Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + ClientSecret *string +} + +// ConfigurationAPI - Information regarding the Configuration API of the API Management service. +type ConfigurationAPI struct { + // Indication whether or not the legacy Configuration API (v1) should be exposed on the API Management service. Value is optional + // but must be 'Enabled' or 'Disabled'. If 'Disabled', legacy Configuration + // API (v1) will not be available for self-hosted gateways. Default value is 'Enabled' + LegacyAPI *LegacyAPIState +} + +// ConnectivityCheckRequest - A request to perform the connectivity check operation on a API Management service. +type ConnectivityCheckRequest struct { + // REQUIRED; The connectivity check operation destination. + Destination *ConnectivityCheckRequestDestination + + // REQUIRED; Definitions about the connectivity check origin. + Source *ConnectivityCheckRequestSource + + // The IP version to be used. Only IPv4 is supported for now. + PreferredIPVersion *PreferredIPVersion + + // The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination + // address must be coherent with this value. + Protocol *ConnectivityCheckProtocol + + // Protocol-specific configuration. + ProtocolConfiguration *ConnectivityCheckRequestProtocolConfiguration +} + +// ConnectivityCheckRequestDestination - The connectivity check operation destination. +type ConnectivityCheckRequestDestination struct { + // REQUIRED; Destination address. Can either be an IP address or a FQDN. + Address *string + + // REQUIRED; Destination port. + Port *int64 +} + +// ConnectivityCheckRequestProtocolConfiguration - Protocol-specific configuration. +type ConnectivityCheckRequestProtocolConfiguration struct { + // Configuration for HTTP or HTTPS requests. + HTTPConfiguration *ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration +} + +// ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration - Configuration for HTTP or HTTPS requests. +type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration struct { + // List of headers to be included in the request. + Headers []*HTTPHeader + + // The HTTP method to be used. + Method *Method + + // List of HTTP status codes considered valid for the request response. + ValidStatusCodes []*int64 +} + +// ConnectivityCheckRequestSource - Definitions about the connectivity check origin. +type ConnectivityCheckRequestSource struct { + // REQUIRED; The API Management service region from where to start the connectivity check operation. + Region *string + + // The particular VMSS instance from which to fire the request. + Instance *int64 +} + +// ConnectivityCheckResponse - Information on the connectivity status. +type ConnectivityCheckResponse struct { + // READ-ONLY; Average latency in milliseconds. + AvgLatencyInMs *int64 + + // READ-ONLY; The connection status. + ConnectionStatus *ConnectionStatus + + // READ-ONLY; List of hops between the source and the destination. + Hops []*ConnectivityHop + + // READ-ONLY; Maximum latency in milliseconds. + MaxLatencyInMs *int64 + + // READ-ONLY; Minimum latency in milliseconds. + MinLatencyInMs *int64 + + // READ-ONLY; Number of failed probes. + ProbesFailed *int64 + + // READ-ONLY; Total number of probes sent. + ProbesSent *int64 +} + +// ConnectivityHop - Information about a hop between the source and the destination. +type ConnectivityHop struct { + // READ-ONLY; The IP address of the hop. + Address *string + + // READ-ONLY; The ID of the hop. + ID *string + + // READ-ONLY; List of issues. + Issues []*ConnectivityIssue + + // READ-ONLY; List of next hop identifiers. + NextHopIDs []*string + + // READ-ONLY; The ID of the resource corresponding to this hop. + ResourceID *string + + // READ-ONLY; The type of the hop. + Type *string +} + +// ConnectivityIssue - Information about an issue encountered in the process of checking for connectivity. +type ConnectivityIssue struct { + // READ-ONLY; Provides additional context on the issue. + Context []map[string]*string + + // READ-ONLY; The origin of the issue. + Origin *Origin + + // READ-ONLY; The severity of the issue. + Severity *Severity + + // READ-ONLY; The type of issue. + Type *IssueType +} + +// ConnectivityStatusContract - Details about connectivity to a resource. +type ConnectivityStatusContract struct { + // REQUIRED; Whether this is optional. + IsOptional *bool + + // REQUIRED; The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms + // to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 + // standard. + LastStatusChange *time.Time + + // REQUIRED; The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. + // If this status has not been updated, then it means that the service has lost network + // connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ + // as specified by the ISO 8601 standard. + LastUpdated *time.Time + + // REQUIRED; The hostname of the resource which the service depends on. This can be the database, storage or any other azure + // resource on which the service depends upon. + Name *string + + // REQUIRED; Resource Type. + ResourceType *string + + // REQUIRED; Resource Connectivity Status Type identifier. + Status *ConnectivityStatusType + + // Error details of the connectivity to the resource. + Error *string +} + +// ContentItemCollection - Paged list of content items. +type ContentItemCollection struct { + // READ-ONLY; Next page link, if any. + NextLink *string + + // READ-ONLY; Collection of content items. + Value []*ContentItemContract +} + +// ContentItemContract - Content type contract details. +type ContentItemContract struct { + // Properties of the content item. + Properties map[string]any + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ContentTypeCollection - Paged list of content types. +type ContentTypeCollection struct { + // READ-ONLY; Next page link, if any. + NextLink *string + + // READ-ONLY; Collection of content types. + Value []*ContentTypeContract +} + +// ContentTypeContract - Content type contract details. +type ContentTypeContract struct { + // Properties of the content type. + Properties *ContentTypeContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +type ContentTypeContractProperties struct { + // Content type description. + Description *string + + // Content type identifier + ID *string + + // Content type name. Must be 1 to 250 characters long. + Name *string + + // Content type schema. + Schema any + + // Content type version. + Version *string +} + +type DataMasking struct { + // Masking settings for headers + Headers []*DataMaskingEntity + + // Masking settings for Url query parameters + QueryParams []*DataMaskingEntity +} + +type DataMaskingEntity struct { + // Data masking mode. + Mode *DataMaskingMode + + // The name of an entity to mask (e.g. a name of a header or a query parameter). + Value *string +} + +// DeletedServiceContract - Deleted API Management Service information. +type DeletedServiceContract struct { + // Deleted API Management Service details. + Properties *DeletedServiceContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; API Management Service Master Location. + Location *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +type DeletedServiceContractProperties struct { + // UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + // by the ISO 8601 standard. + DeletionDate *time.Time + + // UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ + // as specified by the ISO 8601 standard. + ScheduledPurgeDate *time.Time + + // Fully-qualified API Management Service Resource ID + ServiceID *string +} + +// DeletedServicesCollection - Paged deleted API Management Services List Representation. +type DeletedServicesCollection struct { + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*DeletedServiceContract +} + +// DeployConfigurationParameterProperties - Parameters supplied to the Deploy Configuration operation. +type DeployConfigurationParameterProperties struct { + // REQUIRED; The name of the Git branch from which the configuration is to be deployed to the configuration database. + Branch *string + + // The value enforcing deleting subscriptions to products that are deleted in this update. + Force *bool +} + +// DeployConfigurationParameters - Deploy Tenant Configuration Contract. +type DeployConfigurationParameters struct { + // Deploy Configuration Parameter contract properties. + Properties *DeployConfigurationParameterProperties +} + +// DiagnosticCollection - Paged Diagnostic list representation. +type DiagnosticCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*DiagnosticContract +} + +// DiagnosticContract - Diagnostic details. +type DiagnosticContract struct { + // Diagnostic entity contract properties. + Properties *DiagnosticContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// DiagnosticContractProperties - Diagnostic Entity Properties +type DiagnosticContractProperties struct { + // REQUIRED; Resource Id of a target logger. + LoggerID *string + + // Specifies for what type of messages sampling settings should not apply. + AlwaysLog *AlwaysLog + + // Diagnostic settings for incoming/outgoing HTTP messages to the Backend + Backend *PipelineDiagnosticSettings + + // Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + Frontend *PipelineDiagnosticSettings + + // Sets correlation protocol to use for Application Insights diagnostics. + HTTPCorrelationProtocol *HTTPCorrelationProtocol + + // Log the ClientIP. Default is false. + LogClientIP *bool + + // Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. + Metrics *bool + + // The format of the Operation Name for Application Insights telemetries. Default is Name. + OperationNameFormat *OperationNameFormat + + // Sampling settings for Diagnostic. + Sampling *SamplingSettings + + // The verbosity level applied to traces emitted by trace policies. + Verbosity *Verbosity +} + +// DiagnosticContractUpdateProperties - Diagnostic Entity Properties +type DiagnosticContractUpdateProperties struct { + // Specifies for what type of messages sampling settings should not apply. + AlwaysLog *AlwaysLog + + // Diagnostic settings for incoming/outgoing HTTP messages to the Backend + Backend *PipelineDiagnosticSettings + + // Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + Frontend *PipelineDiagnosticSettings + + // Sets correlation protocol to use for Application Insights diagnostics. + HTTPCorrelationProtocol *HTTPCorrelationProtocol + + // Log the ClientIP. Default is false. + LogClientIP *bool + + // Resource Id of a target logger. + LoggerID *string + + // Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. + Metrics *bool + + // The format of the Operation Name for Application Insights telemetries. Default is Name. + OperationNameFormat *OperationNameFormat + + // Sampling settings for Diagnostic. + Sampling *SamplingSettings + + // The verbosity level applied to traces emitted by trace policies. + Verbosity *Verbosity +} + +// DiagnosticUpdateContract - Diagnostic details. +type DiagnosticUpdateContract struct { + // Diagnostic entity contract properties. + Properties *DiagnosticContractUpdateProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// DocumentationCollection - Paged Documentation list representation. +type DocumentationCollection struct { + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*DocumentationContract +} + +// DocumentationContract - Markdown documentation details. +type DocumentationContract struct { + // Markdown Documentation details. + Properties *DocumentationContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// DocumentationContractProperties - Markdown documentation details. +type DocumentationContractProperties struct { + // Markdown documentation content. + Content *string + + // documentation title. + Title *string +} + +// DocumentationUpdateContract - Documentation update contract details. +type DocumentationUpdateContract struct { + // Markdown Documentation details. + Properties *DocumentationContractProperties +} + +// EmailTemplateCollection - Paged email template list representation. +type EmailTemplateCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*EmailTemplateContract +} + +// EmailTemplateContract - Email Template details. +type EmailTemplateContract struct { + // Email Template entity contract properties. + Properties *EmailTemplateContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// EmailTemplateContractProperties - Email Template Contract properties. +type EmailTemplateContractProperties struct { + // REQUIRED; Email Template Body. This should be a valid XDocument + Body *string + + // REQUIRED; Subject of the Template. + Subject *string + + // Description of the Email Template. + Description *string + + // Email Template Parameter values. + Parameters []*EmailTemplateParametersContractProperties + + // Title of the Template. + Title *string + + // READ-ONLY; Whether the template is the default template provided by API Management or has been edited. + IsDefault *bool +} + +// EmailTemplateParametersContractProperties - Email Template Parameter contract. +type EmailTemplateParametersContractProperties struct { + // Template parameter description. + Description *string + + // Template parameter name. + Name *string + + // Template parameter title. + Title *string +} + +// EmailTemplateUpdateParameterProperties - Email Template Update Contract properties. +type EmailTemplateUpdateParameterProperties struct { + // Email Template Body. This should be a valid XDocument + Body *string + + // Description of the Email Template. + Description *string + + // Email Template Parameter values. + Parameters []*EmailTemplateParametersContractProperties + + // Subject of the Template. + Subject *string + + // Title of the Template. + Title *string +} + +// EmailTemplateUpdateParameters - Email Template update Parameters. +type EmailTemplateUpdateParameters struct { + // Email Template Update contract properties. + Properties *EmailTemplateUpdateParameterProperties +} + +// EndpointDependency - A domain name that a service is reached at. +type EndpointDependency struct { + // The domain name of the dependency. + DomainName *string + + // The Ports used when connecting to DomainName. + EndpointDetails []*EndpointDetail +} + +// EndpointDetail - Current TCP connectivity information from the Api Management Service to a single endpoint. +type EndpointDetail struct { + // The port an endpoint is connected to. + Port *int32 + + // The region of the dependency. + Region *string +} + +// ErrorAdditionalInfo - The resource management error additional info. +type ErrorAdditionalInfo struct { + // READ-ONLY; The additional info. + Info any + + // READ-ONLY; The additional info type. + Type *string +} + +// ErrorDetail - The error detail. +type ErrorDetail struct { + // READ-ONLY; The error additional info. + AdditionalInfo []*ErrorAdditionalInfo + + // READ-ONLY; The error code. + Code *string + + // READ-ONLY; The error details. + Details []*ErrorDetail + + // READ-ONLY; The error message. + Message *string + + // READ-ONLY; The error target. + Target *string +} + +// ErrorFieldContract - Error Field contract. +type ErrorFieldContract struct { + // Property level error code. + Code *string + + // Human-readable representation of property-level error. + Message *string + + // Property name. + Target *string +} + +// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. +// (This also follows the OData error response format.). +type ErrorResponse struct { + // The error object. + Error *ErrorDetail +} + +// ErrorResponseBody - Error Body contract. +type ErrorResponseBody struct { + // Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. + Code *string + + // The list of invalid fields send in request, in case of validation error. + Details []*ErrorFieldContract + + // Human-readable representation of the error. + Message *string +} + +// FailureStatusCodeRange - The failure http status code range +type FailureStatusCodeRange struct { + // The maximum http status code. + Max *int32 + + // The minimum http status code. + Min *int32 +} + +// FrontendConfiguration - Information regarding how the gateway should be exposed. +type FrontendConfiguration struct { + // READ-ONLY; The default hostname of the data-plane gateway to which requests can be sent. This is only applicable for API + // gateway with Standard SKU. + DefaultHostname *string +} + +// GatewayBaseProperties - Base Properties of an API Management gateway resource description. +type GatewayBaseProperties struct { + // Information regarding how the gateway should integrate with backend systems. + Backend *BackendConfiguration + + // Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with + // Standard SKU. + ConfigurationAPI *GatewayConfigurationAPI + + // Information regarding how the gateway should be exposed. + Frontend *FrontendConfiguration + + // The type of VPN in which API Management gateway needs to be configured in. + VirtualNetworkType *VirtualNetworkType + + // READ-ONLY; Creation UTC date of the API Management gateway.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ + // as specified by the ISO 8601 standard. + CreatedAtUTC *time.Time + + // READ-ONLY; The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + ProvisioningState *string + + // READ-ONLY; The provisioning state of the API Management gateway, which is targeted by the long running operation started + // on the gateway. + TargetProvisioningState *string +} + +// GatewayCertificateAuthorityCollection - Paged Gateway certificate authority list representation. +type GatewayCertificateAuthorityCollection struct { + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*GatewayCertificateAuthorityContract +} + +// GatewayCertificateAuthorityContract - Gateway certificate authority details. +type GatewayCertificateAuthorityContract struct { + // Gateway certificate authority details. + Properties *GatewayCertificateAuthorityContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GatewayCertificateAuthorityContractProperties - Gateway certificate authority details. +type GatewayCertificateAuthorityContractProperties struct { + // Determines whether certificate authority is trusted. + IsTrusted *bool +} + +// GatewayCollection - Paged Gateway list representation. +type GatewayCollection struct { + // Total record count number across all pages. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*GatewayContract +} + +type GatewayConfigConnectionBaseProperties struct { + // The hostnames of the data-plane gateway to which requests can be sent. + Hostnames []*string + + // The link to the API Management service workspace. + SourceID *string + + // READ-ONLY; The default hostname of the data-plane gateway. + DefaultHostname *string + + // READ-ONLY; The current provisioning state of the API Management gateway config connection + ProvisioningState *string +} + +// GatewayConfigConnectionListResult - The response of the List API Management gateway operation. +type GatewayConfigConnectionListResult struct { + // REQUIRED; Result of the List API Management gateway config connection operation. + Value []*GatewayConfigConnectionResource + + // Link to the next set of results. Not empty if Value contains incomplete list of API Management services. + NextLink *string +} + +// GatewayConfigConnectionResource - A single API Management gateway resource in List or Get response. +type GatewayConfigConnectionResource struct { + // REQUIRED; Properties of the API Management gateway config connection. + Properties *GatewayConfigConnectionBaseProperties + + // READ-ONLY; ETag of the resource. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GatewayConfigurationAPI - Information regarding the Configuration API of the API Management gateway. This is only applicable +// for API gateway with Standard SKU. +type GatewayConfigurationAPI struct { + // READ-ONLY; Hostname to which the agent connects to propagate configuration to the cloud. + Hostname *string +} + +// GatewayContract - Gateway details. +type GatewayContract struct { + // Gateway details. + Properties *GatewayContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GatewayContractProperties - Properties of the Gateway contract. +type GatewayContractProperties struct { + // Gateway description + Description *string + + // Gateway location. + LocationData *ResourceLocationDataContract +} + +// GatewayDebugCredentialsContract - Gateway debug credentials. +type GatewayDebugCredentialsContract struct { + // Gateway debug token. + Token *string +} + +// GatewayHostnameConfigurationCollection - Paged Gateway hostname configuration list representation. +type GatewayHostnameConfigurationCollection struct { + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*GatewayHostnameConfigurationContract +} + +// GatewayHostnameConfigurationContract - Gateway hostname configuration details. +type GatewayHostnameConfigurationContract struct { + // Gateway hostname configuration details. + Properties *GatewayHostnameConfigurationContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GatewayHostnameConfigurationContractProperties - Gateway hostname configuration details. +type GatewayHostnameConfigurationContractProperties struct { + // Identifier of Certificate entity that will be used for TLS connection establishment + CertificateID *string + + // Specifies if HTTP/2.0 is supported + HTTP2Enabled *bool + + // Hostname value. Supports valid domain name, partial or full wildcard + Hostname *string + + // Determines whether gateway requests client certificate + NegotiateClientCertificate *bool + + // Specifies if TLS 1.0 is supported + Tls10Enabled *bool + + // Specifies if TLS 1.1 is supported + Tls11Enabled *bool +} + +// GatewayKeyRegenerationRequestContract - Gateway key regeneration request contract properties. +type GatewayKeyRegenerationRequestContract struct { + // REQUIRED; The Key being regenerated. + KeyType *KeyType +} + +// GatewayKeysContract - Gateway authentication keys. +type GatewayKeysContract struct { + // Primary gateway key. + Primary *string + + // Secondary gateway key. + Secondary *string +} + +// GatewayListDebugCredentialsContract - List debug credentials properties. +type GatewayListDebugCredentialsContract struct { + // REQUIRED; Full resource Id of an API. + APIID *string + + // REQUIRED; Purposes of debug credential. + Purposes []*GatewayListDebugCredentialsContractPurpose + + // Credentials expiration in ISO8601 format. Maximum duration of the credentials is PT1H. When property is not specified, + // them value PT1H is used. + CredentialsExpireAfter *string +} + +// GatewayListResult - The response of the List API Management gateway operation. +type GatewayListResult struct { + // REQUIRED; Result of the List API Management gateway operation. + Value []*GatewayResource + + // Link to the next set of results. Not empty if Value contains incomplete list of API Management services. + NextLink *string +} + +// GatewayListTraceContract - List trace properties. +type GatewayListTraceContract struct { + // Trace id. + TraceID *string +} + +// GatewayProperties - Properties of an API Management gateway resource description. +type GatewayProperties struct { + // Information regarding how the gateway should integrate with backend systems. + Backend *BackendConfiguration + + // Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with + // Standard SKU. + ConfigurationAPI *GatewayConfigurationAPI + + // Information regarding how the gateway should be exposed. + Frontend *FrontendConfiguration + + // The type of VPN in which API Management gateway needs to be configured in. + VirtualNetworkType *VirtualNetworkType + + // READ-ONLY; Creation UTC date of the API Management gateway.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ + // as specified by the ISO 8601 standard. + CreatedAtUTC *time.Time + + // READ-ONLY; The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + ProvisioningState *string + + // READ-ONLY; The provisioning state of the API Management gateway, which is targeted by the long running operation started + // on the gateway. + TargetProvisioningState *string +} + +// GatewayResource - A single API Management gateway resource in List or Get response. +type GatewayResource struct { + // REQUIRED; Resource location. + Location *string + + // REQUIRED; Properties of the API Management gateway. + Properties *GatewayProperties + + // REQUIRED; SKU properties of the API Management gateway. + SKU *GatewaySKUProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; ETag of the resource. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement. + Type *string +} + +// GatewayResourceSKUResult - Describes an available API Management gateway SKU. +type GatewayResourceSKUResult struct { + // READ-ONLY; Specifies the number of API Management gateway units. + Capacity *GatewaySKUCapacity + + // READ-ONLY; The type of resource the SKU applies to. + ResourceType *string + + // READ-ONLY; Specifies API Management gateway SKU. + SKU *GatewaySKU +} + +// GatewayResourceSKUResults - The API Management gateway SKUs operation response. +type GatewayResourceSKUResults struct { + // REQUIRED; The list of skus available for the gateway. + Value []*GatewayResourceSKUResult + + // The uri to fetch the next page of API Management gateway Skus. + NextLink *string +} + +// GatewaySKU - Describes an available API Management SKU for gateways. +type GatewaySKU struct { + // Name of the Sku. + Name *APIGatewaySKUType +} + +// GatewaySKUCapacity - Describes scaling information of a SKU. +type GatewaySKUCapacity struct { + // READ-ONLY; The default capacity. + Default *int32 + + // READ-ONLY; The maximum capacity that can be set. + Maximum *int32 + + // READ-ONLY; The minimum capacity. + Minimum *int32 + + // READ-ONLY; The scale type applicable to the sku. + ScaleType *GatewaySKUCapacityScaleType +} + +// GatewaySKUProperties - API Management gateway resource SKU properties. +type GatewaySKUProperties struct { + // REQUIRED; Name of the Sku. + Name *APIGatewaySKUType + + // Capacity of the SKU (number of deployed units of the SKU) + Capacity *int32 +} + +// GatewaySKUPropertiesForPatch - API Management gateway resource SKU properties for PATCH operations given nothing should +// be required. +type GatewaySKUPropertiesForPatch struct { + // Capacity of the SKU (number of deployed units of the SKU) + Capacity *int32 + + // Name of the Sku. + Name *APIGatewaySKUType +} + +// GatewayTokenContract - Gateway access token. +type GatewayTokenContract struct { + // Shared Access Authentication token value for the Gateway. + Value *string +} + +// GatewayTokenRequestContract - Gateway token request contract properties. +type GatewayTokenRequestContract struct { + // REQUIRED; The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following + // format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + Expiry *time.Time + + // REQUIRED; The Key to be used to generate gateway token. + KeyType *KeyType +} + +// GatewayUpdateParameters - Parameter supplied to Update API Management gateway. +type GatewayUpdateParameters struct { + // Properties of the API Management gateway. + Properties *GatewayUpdateProperties + + // SKU properties of the API Management gateway. + SKU *GatewaySKUPropertiesForPatch + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; ETag of the resource. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement. + Type *string +} + +// GatewayUpdateProperties - Properties of an API Management gateway resource description. +type GatewayUpdateProperties struct { + // Information regarding how the gateway should integrate with backend systems. + Backend *BackendConfiguration + + // Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with + // Standard SKU. + ConfigurationAPI *GatewayConfigurationAPI + + // Information regarding how the gateway should be exposed. + Frontend *FrontendConfiguration + + // The type of VPN in which API Management gateway needs to be configured in. + VirtualNetworkType *VirtualNetworkType + + // READ-ONLY; Creation UTC date of the API Management gateway.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ + // as specified by the ISO 8601 standard. + CreatedAtUTC *time.Time + + // READ-ONLY; The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + ProvisioningState *string + + // READ-ONLY; The provisioning state of the API Management gateway, which is targeted by the long running operation started + // on the gateway. + TargetProvisioningState *string +} + +// GenerateSsoURLResult - Generate SSO Url operations response details. +type GenerateSsoURLResult struct { + // Redirect Url containing the SSO URL value. + Value *string +} + +// GlobalSchemaCollection - The response of the list schema operation. +type GlobalSchemaCollection struct { + // Total record count number. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Global Schema Contract value. + Value []*GlobalSchemaContract +} + +// GlobalSchemaContract - Global Schema Contract details. +type GlobalSchemaContract struct { + // Properties of the Global Schema. + Properties *GlobalSchemaContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GlobalSchemaContractProperties - Schema create or update contract Properties. +type GlobalSchemaContractProperties struct { + // REQUIRED; Schema Type. Immutable. + SchemaType *SchemaType + + // Free-form schema entity description. + Description *string + + // Global Schema document object for json-based schema formats(e.g. json schema). + Document any + + // Json-encoded string for non json-based schema. + Value any + + // READ-ONLY; The provisioning state + ProvisioningState *string +} + +// GroupCollection - Paged Group list representation. +type GroupCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*GroupContract +} + +// GroupContract - Contract details. +type GroupContract struct { + // Group entity contract properties. + Properties *GroupContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GroupContractProperties - Group contract Properties. +type GroupContractProperties struct { + // REQUIRED; Group name. + DisplayName *string + + // Group description. Can contain HTML formatting tags. + Description *string + + // For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active + // Directory aad://.onmicrosoft.com/groups/; otherwise + // the value is null. + ExternalID *string + + // Group type. + Type *GroupType + + // READ-ONLY; true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + BuiltIn *bool +} + +// GroupCreateParameters - Parameters supplied to the Create Group operation. +type GroupCreateParameters struct { + // Properties supplied to Create Group operation. + Properties *GroupCreateParametersProperties +} + +// GroupCreateParametersProperties - Parameters supplied to the Create Group operation. +type GroupCreateParametersProperties struct { + // REQUIRED; Group name. + DisplayName *string + + // Group description. + Description *string + + // Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. + // for Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + ExternalID *string + + // Group type. + Type *GroupType +} + +// GroupUpdateParameters - Parameters supplied to the Update Group operation. +type GroupUpdateParameters struct { + // Group entity update contract properties. + Properties *GroupUpdateParametersProperties +} + +// GroupUpdateParametersProperties - Parameters supplied to the Update Group operation. +type GroupUpdateParametersProperties struct { + // Group description. + Description *string + + // Group name. + DisplayName *string + + // Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. + // for Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + ExternalID *string + + // Group type. + Type *GroupType +} + +// HTTPHeader - HTTP header and it's value. +type HTTPHeader struct { + // REQUIRED; Header name. + Name *string + + // REQUIRED; Header value. + Value *string +} + +// HTTPMessageDiagnostic - Http message diagnostic settings. +type HTTPMessageDiagnostic struct { + // Body logging settings. + Body *BodyDiagnosticSettings + + // Data masking settings. + DataMasking *DataMasking + + // Array of HTTP Headers to log. + Headers []*string +} + +// HostnameConfiguration - Custom hostname configuration. +type HostnameConfiguration struct { + // REQUIRED; Hostname to configure on the Api Management service. + HostName *string + + // REQUIRED; Hostname type. + Type *HostnameType + + // Certificate information. + Certificate *CertificateInformation + + // Certificate Password. + CertificatePassword *string + + // Certificate Source. + CertificateSource *CertificateSource + + // Certificate Status. + CertificateStatus *CertificateStatus + + // Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not + // send the SNI header, then this will be the certificate that will be challenged. + // The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. + // The setting only applied to gateway Hostname Type. + DefaultSSLBinding *bool + + // Base64 Encoded certificate. + EncodedCertificate *string + + // System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing + // the SSL certificate. + IdentityClientID *string + + // Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update + // of ssl certificate will not work. This requires Api Management service to be + // configured with aka.ms/apimmsi. The secret should be of type application/x-pkcs12 + KeyVaultID *string + + // Specify true to always negotiate client certificate on the hostname. Default Value is false. + NegotiateClientCertificate *bool +} + +// IdentityProviderBaseParameters - Identity Provider Base Parameter Properties. +type IdentityProviderBaseParameters struct { + // List of Allowed Tenants when configuring Azure Active Directory login. + AllowedTenants []*string + + // OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + Authority *string + + // The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + ClientLibrary *string + + // Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + PasswordResetPolicyName *string + + // Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + ProfileEditingPolicyName *string + + // Signin Policy Name. Only applies to AAD B2C Identity Provider. + SigninPolicyName *string + + // The TenantId to use instead of Common when logging into Active Directory + SigninTenant *string + + // Signup Policy Name. Only applies to AAD B2C Identity Provider. + SignupPolicyName *string + + // Identity Provider Type identifier. + Type *IdentityProviderType +} + +// IdentityProviderContract - Identity Provider details. +type IdentityProviderContract struct { + // Identity Provider contract properties. + Properties *IdentityProviderContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// IdentityProviderContractProperties - The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure +// Active Directory which can be used to enable access to the API Management service developer portal for all users. +type IdentityProviderContractProperties struct { + // REQUIRED; Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for + // Google login, App ID for Microsoft. + ClientID *string + + // List of Allowed Tenants when configuring Azure Active Directory login. + AllowedTenants []*string + + // OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + Authority *string + + // The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + ClientLibrary *string + + // Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is + // App Secret for Facebook login, API Key for Google login, Public Key for + // Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + ClientSecret *string + + // Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + PasswordResetPolicyName *string + + // Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + ProfileEditingPolicyName *string + + // Signin Policy Name. Only applies to AAD B2C Identity Provider. + SigninPolicyName *string + + // The TenantId to use instead of Common when logging into Active Directory + SigninTenant *string + + // Signup Policy Name. Only applies to AAD B2C Identity Provider. + SignupPolicyName *string + + // Identity Provider Type identifier. + Type *IdentityProviderType +} + +// IdentityProviderCreateContract - Identity Provider details. +type IdentityProviderCreateContract struct { + // Identity Provider contract properties. + Properties *IdentityProviderCreateContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// IdentityProviderCreateContractProperties - The external Identity Providers like Facebook, Google, Microsoft, Twitter or +// Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. +type IdentityProviderCreateContractProperties struct { + // REQUIRED; Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for + // Google login, App ID for Microsoft. + ClientID *string + + // REQUIRED; Client secret of the Application in external Identity Provider, used to authenticate login request. For example, + // it is App Secret for Facebook login, API Key for Google login, Public Key for + // Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + ClientSecret *string + + // List of Allowed Tenants when configuring Azure Active Directory login. + AllowedTenants []*string + + // OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + Authority *string + + // The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + ClientLibrary *string + + // Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + PasswordResetPolicyName *string + + // Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + ProfileEditingPolicyName *string + + // Signin Policy Name. Only applies to AAD B2C Identity Provider. + SigninPolicyName *string + + // The TenantId to use instead of Common when logging into Active Directory + SigninTenant *string + + // Signup Policy Name. Only applies to AAD B2C Identity Provider. + SignupPolicyName *string + + // Identity Provider Type identifier. + Type *IdentityProviderType +} + +// IdentityProviderList - List of all the Identity Providers configured on the service instance. +type IdentityProviderList struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Identity Provider configuration values. + Value []*IdentityProviderContract +} + +// IdentityProviderUpdateParameters - Parameters supplied to update Identity Provider +type IdentityProviderUpdateParameters struct { + // Identity Provider update properties. + Properties *IdentityProviderUpdateProperties +} + +// IdentityProviderUpdateProperties - Parameters supplied to the Update Identity Provider operation. +type IdentityProviderUpdateProperties struct { + // List of Allowed Tenants when configuring Azure Active Directory login. + AllowedTenants []*string + + // OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + Authority *string + + // Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, + // App ID for Microsoft. + ClientID *string + + // The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + ClientLibrary *string + + // Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is + // App Secret for Facebook login, API Key for Google login, Public Key for + // Microsoft. + ClientSecret *string + + // Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + PasswordResetPolicyName *string + + // Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + ProfileEditingPolicyName *string + + // Signin Policy Name. Only applies to AAD B2C Identity Provider. + SigninPolicyName *string + + // The TenantId to use instead of Common when logging into Active Directory + SigninTenant *string + + // Signup Policy Name. Only applies to AAD B2C Identity Provider. + SignupPolicyName *string + + // Identity Provider Type identifier. + Type *IdentityProviderType +} + +// IssueAttachmentCollection - Paged Issue Attachment list representation. +type IssueAttachmentCollection struct { + // Total record count number across all pages. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Issue Attachment values. + Value []*IssueAttachmentContract +} + +// IssueAttachmentContract - Issue Attachment Contract details. +type IssueAttachmentContract struct { + // Properties of the Issue Attachment. + Properties *IssueAttachmentContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// IssueAttachmentContractProperties - Issue Attachment contract Properties. +type IssueAttachmentContractProperties struct { + // REQUIRED; An HTTP link or Base64-encoded binary data. + Content *string + + // REQUIRED; Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided + // in the 'content' property. + ContentFormat *string + + // REQUIRED; Filename by which the binary data will be saved. + Title *string +} + +// IssueCollection - Paged Issue list representation. +type IssueCollection struct { + // Total record count number across all pages. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Issue values. + Value []*IssueContract +} + +// IssueCommentCollection - Paged Issue Comment list representation. +type IssueCommentCollection struct { + // Total record count number across all pages. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Issue Comment values. + Value []*IssueCommentContract +} + +// IssueCommentContract - Issue Comment Contract details. +type IssueCommentContract struct { + // Properties of the Issue Comment. + Properties *IssueCommentContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// IssueCommentContractProperties - Issue Comment contract Properties. +type IssueCommentContractProperties struct { + // REQUIRED; Comment text. + Text *string + + // REQUIRED; A resource identifier for the user who left the comment. + UserID *string + + // Date and time when the comment was created. + CreatedDate *time.Time +} + +// IssueContract - Issue Contract details. +type IssueContract struct { + // Properties of the Issue. + Properties *IssueContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// IssueContractBaseProperties - Issue contract Base Properties. +type IssueContractBaseProperties struct { + // A resource identifier for the API the issue was created for. + APIID *string + + // Date and time when the issue was created. + CreatedDate *time.Time + + // Status of the issue. + State *State +} + +// IssueContractProperties - Issue contract Properties. +type IssueContractProperties struct { + // REQUIRED; Text describing the issue. + Description *string + + // REQUIRED; The issue title. + Title *string + + // REQUIRED; A resource identifier for the user created the issue. + UserID *string + + // A resource identifier for the API the issue was created for. + APIID *string + + // Date and time when the issue was created. + CreatedDate *time.Time + + // Status of the issue. + State *State +} + +// IssueUpdateContract - Issue update Parameters. +type IssueUpdateContract struct { + // Issue entity Update contract properties. + Properties *IssueUpdateContractProperties +} + +// IssueUpdateContractProperties - Issue contract Update Properties. +type IssueUpdateContractProperties struct { + // A resource identifier for the API the issue was created for. + APIID *string + + // Date and time when the issue was created. + CreatedDate *time.Time + + // Text describing the issue. + Description *string + + // Status of the issue. + State *State + + // The issue title. + Title *string + + // A resource identifier for the user created the issue. + UserID *string +} + +// KeyVaultContractCreateProperties - Create keyVault contract details. +type KeyVaultContractCreateProperties struct { + // Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. + IdentityClientID *string + + // Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires + // API Management service to be configured with aka.ms/apimmsi + SecretIdentifier *string +} + +// KeyVaultContractProperties - KeyVault contract details. +type KeyVaultContractProperties struct { + // Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. + IdentityClientID *string + + // Last time sync and refresh status of secret from key vault. + LastStatus *KeyVaultLastAccessStatusContractProperties + + // Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires + // API Management service to be configured with aka.ms/apimmsi + SecretIdentifier *string +} + +// KeyVaultLastAccessStatusContractProperties - Issue contract Update Properties. +type KeyVaultLastAccessStatusContractProperties struct { + // Last status code for sync and refresh of secret from key vault. + Code *string + + // Details of the error else empty. + Message *string + + // Last time secret was accessed. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO + // 8601 standard. + TimeStampUTC *time.Time +} + +// LoggerCollection - Paged Logger list representation. +type LoggerCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Logger values. + Value []*LoggerContract +} + +// LoggerContract - Logger details. +type LoggerContract struct { + // Logger entity contract properties. + Properties *LoggerContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// LoggerContractProperties - The Logger entity in API Management represents an event sink that you can use to log API Management +// events. Currently the Logger entity supports logging API Management events to Azure Event Hubs. +type LoggerContractProperties struct { + // REQUIRED; Logger type. + LoggerType *LoggerType + + // The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights + // logger. + Credentials map[string]*string + + // Logger description. + Description *string + + // Whether records are buffered in the logger before publishing. Default is assumed to be true. + IsBuffered *bool + + // Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). + ResourceID *string +} + +// LoggerUpdateContract - Logger update contract. +type LoggerUpdateContract struct { + // Logger entity update contract properties. + Properties *LoggerUpdateParameters +} + +// LoggerUpdateParameters - Parameters supplied to the Update Logger operation. +type LoggerUpdateParameters struct { + // Logger credentials. + Credentials map[string]*string + + // Logger description. + Description *string + + // Whether records are buffered in the logger before publishing. Default is assumed to be true. + IsBuffered *bool + + // Logger type. + LoggerType *LoggerType +} + +// MigrateToStv2Contract - Describes an available API Management SKU. +type MigrateToStv2Contract struct { + // Mode of Migration to stv2. Default is PreserveIp. + Mode *MigrateToStv2Mode +} + +// NamedValueCollection - Paged NamedValue list representation. +type NamedValueCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*NamedValueContract +} + +// NamedValueContract - NamedValue details. +type NamedValueContract struct { + // NamedValue entity contract properties. + Properties *NamedValueContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// NamedValueContractProperties - NamedValue Contract properties. +type NamedValueContractProperties struct { + // REQUIRED; Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + DisplayName *string + + // KeyVault location details of the namedValue. + KeyVault *KeyVaultContractProperties + + // Determines whether the value is a secret and should be encrypted or not. Default value is false. + Secret *bool + + // Optional tags that when provided can be used to filter the NamedValue list. + Tags []*string + + // Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property + // will not be filled on 'GET' operations! Use '/listSecrets' POST request to get + // the value. + Value *string + + // READ-ONLY; The provisioning state + ProvisioningState *string +} + +// NamedValueCreateContract - NamedValue details. +type NamedValueCreateContract struct { + // NamedValue entity contract properties for PUT operation. + Properties *NamedValueCreateContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// NamedValueCreateContractProperties - NamedValue Contract properties. +type NamedValueCreateContractProperties struct { + // REQUIRED; Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + DisplayName *string + + // KeyVault location details of the namedValue. + KeyVault *KeyVaultContractCreateProperties + + // Determines whether the value is a secret and should be encrypted or not. Default value is false. + Secret *bool + + // Optional tags that when provided can be used to filter the NamedValue list. + Tags []*string + + // Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property + // will not be filled on 'GET' operations! Use '/listSecrets' POST request to get + // the value. + Value *string +} + +// NamedValueEntityBaseParameters - NamedValue Entity Base Parameters set. +type NamedValueEntityBaseParameters struct { + // Determines whether the value is a secret and should be encrypted or not. Default value is false. + Secret *bool + + // Optional tags that when provided can be used to filter the NamedValue list. + Tags []*string +} + +// NamedValueSecretContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. +type NamedValueSecretContract struct { + // This is secret value of the NamedValue entity. + Value *string +} + +// NamedValueUpdateParameterProperties - NamedValue Contract properties. +type NamedValueUpdateParameterProperties struct { + // Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + DisplayName *string + + // KeyVault location details of the namedValue. + KeyVault *KeyVaultContractCreateProperties + + // Determines whether the value is a secret and should be encrypted or not. Default value is false. + Secret *bool + + // Optional tags that when provided can be used to filter the NamedValue list. + Tags []*string + + // Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. + Value *string +} + +// NamedValueUpdateParameters - NamedValue update Parameters. +type NamedValueUpdateParameters struct { + // NamedValue entity Update contract properties. + Properties *NamedValueUpdateParameterProperties +} + +// NetworkStatusContract - Network Status details. +type NetworkStatusContract struct { + // REQUIRED; Gets the list of Connectivity Status to the Resources on which the service depends upon. + ConnectivityStatus []*ConnectivityStatusContract + + // REQUIRED; Gets the list of DNS servers IPV4 addresses. + DNSServers []*string +} + +// NetworkStatusContractByLocation - Network Status in the Location +type NetworkStatusContractByLocation struct { + // Location of service + Location *string + + // Network status in Location + NetworkStatus *NetworkStatusContract +} + +// NotificationCollection - Paged Notification list representation. +type NotificationCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*NotificationContract +} + +// NotificationContract - Notification details. +type NotificationContract struct { + // Notification entity contract properties. + Properties *NotificationContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// NotificationContractProperties - Notification Contract properties. +type NotificationContractProperties struct { + // REQUIRED; Title of the Notification. + Title *string + + // Description of the Notification. + Description *string + + // Recipient Parameter values. + Recipients *RecipientsContractProperties +} + +// OAuth2AuthenticationSettingsContract - API OAuth2 Authentication settings details. +type OAuth2AuthenticationSettingsContract struct { + // OAuth authorization server identifier. + AuthorizationServerID *string + + // operations scope. + Scope *string +} + +// OpenIDAuthenticationSettingsContract - API OAuth2 Authentication settings details. +type OpenIDAuthenticationSettingsContract struct { + // How to send token to the server. + BearerTokenSendingMethods []*BearerTokenSendingMethods + + // OAuth authorization server identifier. + OpenidProviderID *string +} + +// OpenIDConnectProviderCollection - Paged OpenIdProviders list representation. +type OpenIDConnectProviderCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*OpenidConnectProviderContract +} + +// OpenidConnectProviderContract - OpenId Connect Provider details. +type OpenidConnectProviderContract struct { + // OpenId Connect Provider contract properties. + Properties *OpenidConnectProviderContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// OpenidConnectProviderContractProperties - OpenID Connect Providers Contract. +type OpenidConnectProviderContractProperties struct { + // REQUIRED; Client ID of developer console which is the client application. + ClientID *string + + // REQUIRED; User-friendly OpenID Connect Provider name. + DisplayName *string + + // REQUIRED; Metadata endpoint URI. + MetadataEndpoint *string + + // Client Secret of developer console which is the client application. + ClientSecret *string + + // User-friendly description of OpenID Connect Provider. + Description *string + + // If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if + // no value is provided. + UseInAPIDocumentation *bool + + // If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is + // provided. + UseInTestConsole *bool +} + +// OpenidConnectProviderUpdateContract - Parameters supplied to the Update OpenID Connect Provider operation. +type OpenidConnectProviderUpdateContract struct { + // OpenId Connect Provider Update contract properties. + Properties *OpenidConnectProviderUpdateContractProperties +} + +// OpenidConnectProviderUpdateContractProperties - Parameters supplied to the Update OpenID Connect Provider operation. +type OpenidConnectProviderUpdateContractProperties struct { + // Client ID of developer console which is the client application. + ClientID *string + + // Client Secret of developer console which is the client application. + ClientSecret *string + + // User-friendly description of OpenID Connect Provider. + Description *string + + // User-friendly OpenID Connect Provider name. + DisplayName *string + + // Metadata endpoint URI. + MetadataEndpoint *string + + // If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if + // no value is provided. + UseInAPIDocumentation *bool + + // If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is + // provided. + UseInTestConsole *bool +} + +// Operation - REST API operation +type Operation struct { + // The object that describes the operation. + Display *OperationDisplay + + // Operation name: {provider}/{resource}/{operation} + Name *string + + // The operation origin. + Origin *string + + // The operation properties. + Properties any +} + +// OperationCollection - Paged Operation list representation. +type OperationCollection struct { + // Total record count number across all pages. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*OperationContract +} + +// OperationContract - API Operation details. +type OperationContract struct { + // Properties of the Operation Contract. + Properties *OperationContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// OperationContractProperties - Operation Contract Properties +type OperationContractProperties struct { + // REQUIRED; Operation Name. + DisplayName *string + + // REQUIRED; A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + Method *string + + // REQUIRED; Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} + URLTemplate *string + + // Description of the operation. May include HTML formatting tags. + Description *string + + // Operation Policies + Policies *string + + // An entity containing request details. + Request *RequestContract + + // Array of Operation responses. + Responses []*ResponseContract + + // Collection of URL template parameters. + TemplateParameters []*ParameterContract +} + +// OperationDisplay - The object that describes the operation. +type OperationDisplay struct { + // Friendly name of the operation + Description *string + + // Operation type: read, write, delete, listKeys/action, etc. + Operation *string + + // Friendly name of the resource provider + Provider *string + + // Resource type on which the operation is performed. + Resource *string +} + +// OperationEntityBaseContract - API Operation Entity Base Contract details. +type OperationEntityBaseContract struct { + // Description of the operation. May include HTML formatting tags. + Description *string + + // Operation Policies + Policies *string + + // An entity containing request details. + Request *RequestContract + + // Array of Operation responses. + Responses []*ResponseContract + + // Collection of URL template parameters. + TemplateParameters []*ParameterContract +} + +// OperationListResult - Result of the request to list REST API operations. It contains a list of operations and a URL nextLink +// to get the next set of results. +type OperationListResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of operations supported by the resource provider. + Value []*Operation +} + +// OperationResultContract - Long Running Git Operation Results. +type OperationResultContract struct { + // Properties of the Operation Contract. + Properties *OperationResultContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// OperationResultContractProperties - Operation Result. +type OperationResultContractProperties struct { + // Error Body Contract + Error *ErrorResponseBody + + // Operation result identifier. + ID *string + + // Optional result info. + ResultInfo *string + + // Start time of an async operation. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO + // 8601 standard. + Started *time.Time + + // Status of an async operation. + Status *AsyncOperationStatus + + // Last update time of an async operation. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by + // the ISO 8601 standard. + Updated *time.Time + + // READ-ONLY; This property if only provided as part of the TenantConfigurationValidate operation. It contains the log the + // entities which will be updated/created/deleted as part of the TenantConfigurationDeploy + // operation. + ActionLog []*OperationResultLogItemContract +} + +// OperationResultLogItemContract - Log of the entity being created, updated or deleted. +type OperationResultLogItemContract struct { + // Action like create/update/delete. + Action *string + + // Identifier of the entity being created/updated/deleted. + ObjectKey *string + + // The type of entity contract. + ObjectType *string +} + +// OperationStatusResult - The current status of an async operation. +type OperationStatusResult struct { + // REQUIRED; Operation status. + Status *string + + // The end time of the operation. + EndTime *time.Time + + // If present, details of the operation error. + Error *ErrorDetail + + // Fully qualified ID for the async operation. + ID *string + + // Name of the async operation. + Name *string + + // The operations list. + Operations []*OperationStatusResult + + // Percent of the operation that is complete. + PercentComplete *float32 + + // The start time of the operation. + StartTime *time.Time + + // READ-ONLY; Fully qualified ID of the resource against which the original async operation was started. + ResourceID *string +} + +// OperationTagResourceContractProperties - Operation Entity contract Properties. +type OperationTagResourceContractProperties struct { + // Identifier of the operation in form /operations/{operationId}. + ID *string + + // READ-ONLY; API Name. + APIName *string + + // READ-ONLY; API Revision. + APIRevision *string + + // READ-ONLY; API Version. + APIVersion *string + + // READ-ONLY; Operation Description. + Description *string + + // READ-ONLY; A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + Method *string + + // READ-ONLY; Operation name. + Name *string + + // READ-ONLY; Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} + URLTemplate *string +} + +// OperationUpdateContract - API Operation Update Contract details. +type OperationUpdateContract struct { + // Properties of the API Operation entity that can be updated. + Properties *OperationUpdateContractProperties +} + +// OperationUpdateContractProperties - Operation Update Contract Properties. +type OperationUpdateContractProperties struct { + // Description of the operation. May include HTML formatting tags. + Description *string + + // Operation Name. + DisplayName *string + + // A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + Method *string + + // Operation Policies + Policies *string + + // An entity containing request details. + Request *RequestContract + + // Array of Operation responses. + Responses []*ResponseContract + + // Collection of URL template parameters. + TemplateParameters []*ParameterContract + + // Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} + URLTemplate *string +} + +// OutboundEnvironmentEndpoint - Endpoints accessed for a common purpose that the Api Management Service requires outbound +// network access to. +type OutboundEnvironmentEndpoint struct { + // The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. + Category *string + + // The endpoints that the Api Management Service reaches the service at. + Endpoints []*EndpointDependency +} + +// OutboundEnvironmentEndpointList - Collection of Outbound Environment Endpoints +type OutboundEnvironmentEndpointList struct { + // REQUIRED; Collection of resources. + Value []*OutboundEnvironmentEndpoint + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// ParameterContract - Operation parameters details. +type ParameterContract struct { + // REQUIRED; Parameter name. + Name *string + + // REQUIRED; Parameter type. + Type *string + + // Default parameter value. + DefaultValue *string + + // Parameter description. + Description *string + + // Exampled defined for the parameter. + Examples map[string]*ParameterExampleContract + + // Specifies whether parameter is required or not. + Required *bool + + // Schema identifier. + SchemaID *string + + // Type name defined by the schema. + TypeName *string + + // Parameter values. + Values []*string +} + +// ParameterExampleContract - Parameter example. +type ParameterExampleContract struct { + // Long description for the example + Description *string + + // A URL that points to the literal example + ExternalValue *string + + // Short description for the example + Summary *string + + // Example value. May be a primitive value, or an object. + Value any +} + +// PipelineDiagnosticSettings - Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. +type PipelineDiagnosticSettings struct { + // Diagnostic settings for request. + Request *HTTPMessageDiagnostic + + // Diagnostic settings for response. + Response *HTTPMessageDiagnostic +} + +// PolicyCollection - The response of the list policy operation. +type PolicyCollection struct { + // Total record count number. + Count *int64 + + // Next page link if any. + NextLink *string + + // Policy Contract value. + Value []*PolicyContract +} + +// PolicyContract - Policy Contract details. +type PolicyContract struct { + // Properties of the Policy. + Properties *PolicyContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PolicyContractProperties - Policy contract Properties. +type PolicyContractProperties struct { + // REQUIRED; Contents of the Policy as defined by the format. + Value *string + + // Format of the policyContent. + Format *PolicyContentFormat +} + +// PolicyDescriptionCollection - Descriptions of API Management policies. +type PolicyDescriptionCollection struct { + // Total record count number. + Count *int64 + + // Descriptions of API Management policies. + Value []*PolicyDescriptionContract +} + +// PolicyDescriptionContract - Policy description details. +type PolicyDescriptionContract struct { + // Policy description contract properties. + Properties *PolicyDescriptionContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PolicyDescriptionContractProperties - Policy description properties. +type PolicyDescriptionContractProperties struct { + // READ-ONLY; Policy description. + Description *string + + // READ-ONLY; Binary OR value of the Snippet scope. + Scope *int64 +} + +// PolicyFragmentCollection - The response of the get policy fragments operation. +type PolicyFragmentCollection struct { + // Total record count number. + Count *int64 + + // Next page link if any. + NextLink *string + + // Policy fragment contract value. + Value []*PolicyFragmentContract +} + +// PolicyFragmentContract - Policy fragment contract details. +type PolicyFragmentContract struct { + // Properties of the Policy Fragment. + Properties *PolicyFragmentContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PolicyFragmentContractProperties - Policy fragment contract properties. +type PolicyFragmentContractProperties struct { + // REQUIRED; Contents of the policy fragment. + Value *string + + // Policy fragment description. + Description *string + + // Format of the policy fragment content. + Format *PolicyFragmentContentFormat + + // READ-ONLY; The provisioning state + ProvisioningState *string +} + +// PolicyRestrictionCollection - The response of the get policy restrictions operation. +type PolicyRestrictionCollection struct { + // Next page link if any. + NextLink *string + Value []*PolicyRestrictionContract +} + +// PolicyRestrictionContract - Policy restriction contract details. +type PolicyRestrictionContract struct { + // Properties of the Policy Restriction. + Properties *PolicyRestrictionContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PolicyRestrictionContractProperties - Policy restrictions contract properties. +type PolicyRestrictionContractProperties struct { + // Indicates if base policy should be enforced for the policy document. + RequireBase *PolicyRestrictionRequireBase + + // Path to the policy document. + Scope *string +} + +// PolicyRestrictionUpdateContract - Policy restriction contract details. +type PolicyRestrictionUpdateContract struct { + // Properties of the Policy Restriction. + Properties *PolicyRestrictionContractProperties +} + +// PolicyWithComplianceCollection - The response of the list policy operation. +type PolicyWithComplianceCollection struct { + // Next page link if any. + NextLink *string + + // Policy Contract value. + Value []*PolicyWithComplianceContract +} + +// PolicyWithComplianceContract - Policy Contract details. +type PolicyWithComplianceContract struct { + // Properties of the Policy. + Properties *PolicyWithComplianceContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PolicyWithComplianceContractProperties - Policy contract Properties. +type PolicyWithComplianceContractProperties struct { + // Policy Restriction Compliance State + ComplianceState *PolicyComplianceState + + // Policy Identifier + ReferencePolicyID *string +} + +// PortalConfigCollection - The collection of the developer portal configurations. +type PortalConfigCollection struct { + // The developer portal configurations. + Value []*PortalConfigContract + + // READ-ONLY; Next page link if any. + NextLink *string +} + +// PortalConfigContract - The developer portal configuration contract. +type PortalConfigContract struct { + // The developer portal configuration contract properties. + Properties *PortalConfigProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PortalConfigCorsProperties - The developer portal Cross-Origin Resource Sharing (CORS) settings. +type PortalConfigCorsProperties struct { + // Allowed origins, e.g. https://trusted.com. + AllowedOrigins []*string +} + +// PortalConfigCspProperties - The developer portal Content Security Policy (CSP) settings. +type PortalConfigCspProperties struct { + // Allowed sources, e.g. *.trusted.com, trusted.com, https://. + AllowedSources []*string + + // The mode of the developer portal Content Security Policy (CSP). + Mode *PortalSettingsCspMode + + // The URLs used by the browser to report CSP violations. + ReportURI []*string +} + +type PortalConfigDelegationProperties struct { + // Enable or disable delegation for user registration. + DelegateRegistration *bool + + // Enable or disable delegation for product subscriptions. + DelegateSubscription *bool + + // A delegation endpoint URL. + DelegationURL *string + + // A base64-encoded validation key to ensure requests originate from Azure API Management service. + ValidationKey *string +} + +// PortalConfigProperties - The developer portal configuration contract properties. +type PortalConfigProperties struct { + // The developer portal Cross-Origin Resource Sharing (CORS) settings. + Cors *PortalConfigCorsProperties + + // The developer portal Content Security Policy (CSP) settings. + Csp *PortalConfigCspProperties + + // The developer portal delegation settings. + Delegation *PortalConfigDelegationProperties + + // Enable or disable Basic authentication method. + EnableBasicAuth *bool + Signin *PortalConfigPropertiesSignin + Signup *PortalConfigPropertiesSignup +} + +type PortalConfigPropertiesSignin struct { + // Redirect anonymous users to the sign-in page. + Require *bool +} + +type PortalConfigPropertiesSignup struct { + // Terms of service settings. + TermsOfService *PortalConfigTermsOfServiceProperties +} + +// PortalConfigTermsOfServiceProperties - Terms of service contract properties. +type PortalConfigTermsOfServiceProperties struct { + // Ask user for consent to the terms of service. + RequireConsent *bool + + // A terms of service text. + Text *string +} + +// PortalDelegationSettings - Delegation settings for a developer portal. +type PortalDelegationSettings struct { + // Delegation settings contract properties. + Properties *PortalDelegationSettingsProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PortalDelegationSettingsProperties - Delegation settings contract properties. +type PortalDelegationSettingsProperties struct { + // Subscriptions delegation settings. + Subscriptions *SubscriptionsDelegationSettingsProperties + + // A delegation Url. + URL *string + + // User registration delegation settings. + UserRegistration *RegistrationDelegationSettingsProperties + + // A base64-encoded validation key to validate, that a request is coming from Azure API Management. + ValidationKey *string +} + +// PortalRevisionCollection - Paged list of portal revisions. +type PortalRevisionCollection struct { + // READ-ONLY; Next page link, if any. + NextLink *string + + // READ-ONLY; Collection of portal revisions. + Value []*PortalRevisionContract +} + +// PortalRevisionContract - Portal Revision's contract details. +type PortalRevisionContract struct { + // Properties of the portal revisions. + Properties *PortalRevisionContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +type PortalRevisionContractProperties struct { + // Portal revision description. + Description *string + + // Indicates if the portal's revision is public. + IsCurrent *bool + + // READ-ONLY; Portal's revision creation date and time. + CreatedDateTime *time.Time + + // READ-ONLY; The provisioning state + ProvisioningState *string + + // READ-ONLY; Status of the portal's revision. + Status *PortalRevisionStatus + + // READ-ONLY; Portal revision publishing status details. + StatusDetails *string + + // READ-ONLY; Last updated date and time. + UpdatedDateTime *time.Time +} + +// PortalSettingValidationKeyContract - Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. +type PortalSettingValidationKeyContract struct { + // This is secret value of the validation key in portal settings. + ValidationKey *string +} + +// PortalSettingsCollection - Descriptions of API Management policies. +type PortalSettingsCollection struct { + // Total record count number. + Count *int64 + + // Descriptions of API Management policies. + Value []*PortalSettingsContract +} + +// PortalSettingsContract - Portal Settings for the Developer Portal. +type PortalSettingsContract struct { + // Portal Settings contract properties. + Properties *PortalSettingsContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PortalSettingsContractProperties - Sign-in settings contract properties. +type PortalSettingsContractProperties struct { + // Redirect Anonymous users to the Sign-In page. + Enabled *bool + + // Subscriptions delegation settings. + Subscriptions *SubscriptionsDelegationSettingsProperties + + // Terms of service contract properties. + TermsOfService *TermsOfServiceProperties + + // A delegation Url. + URL *string + + // User registration delegation settings. + UserRegistration *RegistrationDelegationSettingsProperties + + // A base64-encoded validation key to validate, that a request is coming from Azure API Management. + ValidationKey *string +} + +// PortalSigninSettingProperties - Sign-in settings contract properties. +type PortalSigninSettingProperties struct { + // Redirect Anonymous users to the Sign-In page. + Enabled *bool +} + +// PortalSigninSettings - Sign-In settings for the Developer Portal. +type PortalSigninSettings struct { + // Sign-in settings contract properties. + Properties *PortalSigninSettingProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PortalSignupSettings - Sign-Up settings for a developer portal. +type PortalSignupSettings struct { + // Sign-up settings contract properties. + Properties *PortalSignupSettingsProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PortalSignupSettingsProperties - Sign-up settings contract properties. +type PortalSignupSettingsProperties struct { + // Allow users to sign up on a developer portal. + Enabled *bool + + // Terms of service contract properties. + TermsOfService *TermsOfServiceProperties +} + +// PrivateEndpoint - The Private Endpoint resource. +type PrivateEndpoint struct { + // READ-ONLY; The ARM identifier for Private Endpoint + ID *string +} + +// PrivateEndpointConnection - The Private Endpoint Connection resource. +type PrivateEndpointConnection struct { + // Resource properties. + Properties *PrivateEndpointConnectionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified storage account +type PrivateEndpointConnectionListResult struct { + // Array of private endpoint connections + Value []*PrivateEndpointConnection +} + +// PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. +type PrivateEndpointConnectionProperties struct { + // REQUIRED; A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState + + // The resource of private end point. + PrivateEndpoint *PrivateEndpoint + + // READ-ONLY; The provisioning state of the private endpoint connection resource. + ProvisioningState *PrivateEndpointConnectionProvisioningState +} + +// PrivateEndpointConnectionRequest - A request to approve or reject a private endpoint connection +type PrivateEndpointConnectionRequest struct { + // Private Endpoint Connection Resource Id. + ID *string + + // The connection state of the private endpoint connection. + Properties *PrivateEndpointConnectionRequestProperties +} + +// PrivateEndpointConnectionRequestProperties - The connection state of the private endpoint connection. +type PrivateEndpointConnectionRequestProperties struct { + // A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState +} + +// PrivateEndpointConnectionWrapperProperties - Properties of the PrivateEndpointConnectProperties. +type PrivateEndpointConnectionWrapperProperties struct { + // REQUIRED; A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState + + // The resource of private end point. + PrivateEndpoint *ArmIDWrapper + + // READ-ONLY; All the Group ids. + GroupIDs []*string + + // READ-ONLY; The provisioning state of the private endpoint connection resource. + ProvisioningState *string +} + +// PrivateLinkResource - A private link resource +type PrivateLinkResource struct { + // Resource properties. + Properties *PrivateLinkResourceProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PrivateLinkResourceListResult - A list of private link resources +type PrivateLinkResourceListResult struct { + // Array of private link resources + Value []*PrivateLinkResource +} + +// PrivateLinkResourceProperties - Properties of a private link resource. +type PrivateLinkResourceProperties struct { + // The private link resource Private link DNS zone name. + RequiredZoneNames []*string + + // READ-ONLY; The private link resource group id. + GroupID *string + + // READ-ONLY; The private link resource required member names. + RequiredMembers []*string +} + +// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer +// and provider. +type PrivateLinkServiceConnectionState struct { + // A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *string + + // The reason for approval/rejection of the connection. + Description *string + + // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + Status *PrivateEndpointServiceConnectionStatus +} + +// ProductAPILinkCollection - Paged Product-API link list representation. +type ProductAPILinkCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*ProductAPILinkContract +} + +// ProductAPILinkContract - Product-API link details. +type ProductAPILinkContract struct { + // Product-API link entity contract properties. + Properties *ProductAPILinkContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ProductAPILinkContractProperties - Product-API link entity properties. +type ProductAPILinkContractProperties struct { + // REQUIRED; Full resource Id of an API. + APIID *string +} + +// ProductCollection - Paged Products list representation. +type ProductCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*ProductContract +} + +// ProductContract - Product details. +type ProductContract struct { + // Product entity contract properties. + Properties *ProductContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ProductContractProperties - Product profile. +type ProductContractProperties struct { + // REQUIRED; Product name. + DisplayName *string + + // whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers + // to call the product’s APIs immediately after subscribing. If true, + // administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present + // only if subscriptionRequired property is present and has a value of false. + ApprovalRequired *bool + + // Product description. May include HTML formatting tags. + Description *string + + // whether product is published or not. Published products are discoverable by users of developer portal. Non published products + // are visible only to administrators. Default state of Product is + // notPublished. + State *ProductState + + // Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred + // to as "protected" and a valid subscription key is required for a request to an + // API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included + // in the product can be made without a subscription key. If property is omitted + // when creating a new product it's value is assumed to be true. + SubscriptionRequired *bool + + // Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited + // per user subscriptions. Can be present only if subscriptionRequired + // property is present and has a value of false. + SubscriptionsLimit *int32 + + // Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms + // before they can complete the subscription process. + Terms *string +} + +// ProductEntityBaseParameters - Product Entity Base Parameters +type ProductEntityBaseParameters struct { + // whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers + // to call the product’s APIs immediately after subscribing. If true, + // administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present + // only if subscriptionRequired property is present and has a value of false. + ApprovalRequired *bool + + // Product description. May include HTML formatting tags. + Description *string + + // whether product is published or not. Published products are discoverable by users of developer portal. Non published products + // are visible only to administrators. Default state of Product is + // notPublished. + State *ProductState + + // Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred + // to as "protected" and a valid subscription key is required for a request to an + // API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included + // in the product can be made without a subscription key. If property is omitted + // when creating a new product it's value is assumed to be true. + SubscriptionRequired *bool + + // Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited + // per user subscriptions. Can be present only if subscriptionRequired + // property is present and has a value of false. + SubscriptionsLimit *int32 + + // Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms + // before they can complete the subscription process. + Terms *string +} + +// ProductGroupLinkCollection - Paged Product-group link list representation. +type ProductGroupLinkCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*ProductGroupLinkContract +} + +// ProductGroupLinkContract - Product-group link details. +type ProductGroupLinkContract struct { + // Product-group link entity contract properties. + Properties *ProductGroupLinkContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ProductGroupLinkContractProperties - Product-group link entity properties. +type ProductGroupLinkContractProperties struct { + // REQUIRED; Full resource Id of a group. + GroupID *string +} + +// ProductTagResourceContractProperties - Product profile. +type ProductTagResourceContractProperties struct { + // REQUIRED; Product name. + Name *string + + // whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers + // to call the product’s APIs immediately after subscribing. If true, + // administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present + // only if subscriptionRequired property is present and has a value of false. + ApprovalRequired *bool + + // Product description. May include HTML formatting tags. + Description *string + + // Identifier of the product in the form of /products/{productId} + ID *string + + // whether product is published or not. Published products are discoverable by users of developer portal. Non published products + // are visible only to administrators. Default state of Product is + // notPublished. + State *ProductState + + // Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred + // to as "protected" and a valid subscription key is required for a request to an + // API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included + // in the product can be made without a subscription key. If property is omitted + // when creating a new product it's value is assumed to be true. + SubscriptionRequired *bool + + // Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited + // per user subscriptions. Can be present only if subscriptionRequired + // property is present and has a value of false. + SubscriptionsLimit *int32 + + // Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms + // before they can complete the subscription process. + Terms *string +} + +// ProductUpdateParameters - Product Update parameters. +type ProductUpdateParameters struct { + // Product entity Update contract properties. + Properties *ProductUpdateProperties +} + +// ProductUpdateProperties - Parameters supplied to the Update Product operation. +type ProductUpdateProperties struct { + // whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers + // to call the product’s APIs immediately after subscribing. If true, + // administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present + // only if subscriptionRequired property is present and has a value of false. + ApprovalRequired *bool + + // Product description. May include HTML formatting tags. + Description *string + + // Product name. + DisplayName *string + + // whether product is published or not. Published products are discoverable by users of developer portal. Non published products + // are visible only to administrators. Default state of Product is + // notPublished. + State *ProductState + + // Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred + // to as "protected" and a valid subscription key is required for a request to an + // API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included + // in the product can be made without a subscription key. If property is omitted + // when creating a new product it's value is assumed to be true. + SubscriptionRequired *bool + + // Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited + // per user subscriptions. Can be present only if subscriptionRequired + // property is present and has a value of false. + SubscriptionsLimit *int32 + + // Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms + // before they can complete the subscription process. + Terms *string +} + +// ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a +// location +type ProxyResource struct { + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// QuotaCounterCollection - Paged Quota Counter list representation. +type QuotaCounterCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Quota counter values. + Value []*QuotaCounterContract +} + +// QuotaCounterContract - Quota counter details. +type QuotaCounterContract struct { + // REQUIRED; The Key value of the Counter. Must not be empty. + CounterKey *string + + // REQUIRED; The date of the end of Counter Period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + // by the ISO 8601 standard. + PeriodEndTime *time.Time + + // REQUIRED; Identifier of the Period for which the counter was collected. Must not be empty. + PeriodKey *string + + // REQUIRED; The date of the start of Counter Period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + // by the ISO 8601 standard. + PeriodStartTime *time.Time + + // Quota Value Properties + Value *QuotaCounterValueContractProperties +} + +// QuotaCounterValueContract - Quota counter value details. +type QuotaCounterValueContract struct { + // Quota counter Value Properties. + Value *QuotaCounterValueContractProperties +} + +// QuotaCounterValueContractProperties - Quota counter value details. +type QuotaCounterValueContractProperties struct { + // Number of times Counter was called. + CallsCount *int32 + + // Data Transferred in KiloBytes. + KbTransferred *float64 +} + +// QuotaCounterValueUpdateContract - Quota counter value details. +type QuotaCounterValueUpdateContract struct { + // Quota counter value details. + Properties *QuotaCounterValueContractProperties +} + +// RecipientEmailCollection - Paged Recipient User list representation. +type RecipientEmailCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*RecipientEmailContract +} + +// RecipientEmailContract - Recipient Email details. +type RecipientEmailContract struct { + // Recipient Email contract properties. + Properties *RecipientEmailContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// RecipientEmailContractProperties - Recipient Email Contract Properties. +type RecipientEmailContractProperties struct { + // User Email subscribed to notification. + Email *string +} + +// RecipientUserCollection - Paged Recipient User list representation. +type RecipientUserCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*RecipientUserContract +} + +// RecipientUserContract - Recipient User details. +type RecipientUserContract struct { + // Recipient User entity contract properties. + Properties *RecipientUsersContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// RecipientUsersContractProperties - Recipient User Contract Properties. +type RecipientUsersContractProperties struct { + // API Management UserId subscribed to notification. + UserID *string +} + +// RecipientsContractProperties - Notification Parameter contract. +type RecipientsContractProperties struct { + // List of Emails subscribed for the notification. + Emails []*string + + // List of Users subscribed for the notification. + Users []*string +} + +// RegionContract - Region profile. +type RegionContract struct { + // whether Region is deleted. + IsDeleted *bool + + // whether Region is the master region. + IsMasterRegion *bool + + // READ-ONLY; Region name. + Name *string +} + +// RegionListResult - Lists Regions operation response details. +type RegionListResult struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Lists of Regions. + Value []*RegionContract +} + +// RegistrationDelegationSettingsProperties - User registration delegation settings properties. +type RegistrationDelegationSettingsProperties struct { + // Enable or disable delegation for user registration. + Enabled *bool +} + +// RemotePrivateEndpointConnectionWrapper - Remote Private Endpoint Connection resource. +type RemotePrivateEndpointConnectionWrapper struct { + // Private Endpoint connection resource id + ID *string + + // Private Endpoint Connection Name + Name *string + + // Resource properties. + Properties *PrivateEndpointConnectionWrapperProperties + + // Private Endpoint Connection Resource Type + Type *string +} + +// ReportCollection - Paged Report records list representation. +type ReportCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*ReportRecordContract +} + +// ReportRecordContract - Report data. +type ReportRecordContract struct { + // API identifier path. /apis/{apiId} + APIID *string + + // API region identifier. + APIRegion *string + + // Average time it took to process request. + APITimeAvg *float64 + + // Maximum time it took to process request. + APITimeMax *float64 + + // Minimum time it took to process request. + APITimeMin *float64 + + // Bandwidth consumed. + Bandwidth *int64 + + // Number of times when content was served from cache policy. + CacheHitCount *int32 + + // Number of times content was fetched from backend. + CacheMissCount *int32 + + // Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden + // and HttpStatusCode.TooManyRequests + CallCountBlocked *int32 + + // Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and + // any Code between HttpStatusCode.InternalServerError (500) and 600 + CallCountFailed *int32 + + // Number of other calls. + CallCountOther *int32 + + // Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect + CallCountSuccess *int32 + + // Total number of calls. + CallCountTotal *int32 + + // Country to which this record data is related. + Country *string + + // Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 + // format (http://en.wikipedia.org/wiki/ISO_8601#Durations). + Interval *string + + // Name depending on report endpoint specifies product, API, operation or developer name. + Name *string + + // Operation identifier path. /apis/{apiId}/operations/{operationId} + OperationID *string + + // Country region to which this record data is related. + Region *string + + // Average time it took to process request on backend. + ServiceTimeAvg *float64 + + // Maximum time it took to process request on backend. + ServiceTimeMax *float64 + + // Minimum time it took to process request on backend. + ServiceTimeMin *float64 + + // Subscription identifier path. /subscriptions/{subscriptionId} + SubscriptionID *string + + // Start of aggregation period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 + // standard. + Timestamp *time.Time + + // Zip code to which this record data is related. + Zip *string + + // READ-ONLY; Product identifier path. /products/{productId} + ProductID *string + + // READ-ONLY; User identifier path. /users/{userId} + UserID *string +} + +// RepresentationContract - Operation request/response representation details. +type RepresentationContract struct { + // REQUIRED; Specifies a registered or custom content type for this representation, e.g. application/xml. + ContentType *string + + // Exampled defined for the representation. + Examples map[string]*ParameterExampleContract + + // Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. + FormParameters []*ParameterContract + + // Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. + SchemaID *string + + // Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' + // nor 'multipart/form-data'. + TypeName *string +} + +// RequestContract - Operation request details. +type RequestContract struct { + // Operation request description. + Description *string + + // Collection of operation request headers. + Headers []*ParameterContract + + // Collection of operation request query parameters. + QueryParameters []*ParameterContract + + // Collection of operation request representations. + Representations []*RepresentationContract +} + +// RequestReportCollection - Paged Report records list representation. +type RequestReportCollection struct { + // Total record count number across all pages. + Count *int64 + + // Page values. + Value []*RequestReportRecordContract +} + +// RequestReportRecordContract - Request Report data. +type RequestReportRecordContract struct { + // API identifier path. /apis/{apiId} + APIID *string + + // Azure region where the gateway that processed this request is located. + APIRegion *string + + // The total time it took to process this request. + APITime *float64 + + // The HTTP status code received by the gateway as a result of forwarding this request to the backend. + BackendResponseCode *string + + // Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the + // value is hit, cached response was returned. If the value is miss, the cache + // was used but lookup resulted in a miss and request was fulfilled by the backend. + Cache *string + + // The client IP address associated with this request. + IPAddress *string + + // The HTTP method associated with this request.. + Method *string + + // Operation identifier path. /apis/{apiId}/operations/{operationId} + OperationID *string + + // Request Identifier. + RequestID *string + + // The size of this request.. + RequestSize *int32 + + // The HTTP status code returned by the gateway. + ResponseCode *int32 + + // The size of the response returned by the gateway. + ResponseSize *int32 + + // he time it took to forward this request to the backend and get the response back. + ServiceTime *float64 + + // Subscription identifier path. /subscriptions/{subscriptionId} + SubscriptionID *string + + // The date and time when this request was received by the gateway in ISO 8601 format. + Timestamp *time.Time + + // The full URL associated with this request. + URL *string + + // READ-ONLY; Product identifier path. /products/{productId} + ProductID *string + + // READ-ONLY; User identifier path. /users/{userId} + UserID *string +} + +// ResolverCollection - Paged Resolver list representation. +type ResolverCollection struct { + // Total record count number across all pages. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*ResolverContract +} + +// ResolverContract - GraphQL API Resolver details. +type ResolverContract struct { + // Properties of the Resolver Contract. + Properties *ResolverEntityBaseContract + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ResolverEntityBaseContract - GraphQL API Resolver Entity Base Contract details. +type ResolverEntityBaseContract struct { + // Description of the resolver. May include HTML formatting tags. + Description *string + + // Resolver Name. + DisplayName *string + + // Path is type/field being resolved. + Path *string +} + +// ResolverResultContract - Long Running Git Resolver Results. +type ResolverResultContract struct { + // Properties of the Resolver Contract. + Properties *ResolverResultContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ResolverResultContractProperties - Resolver Result. +type ResolverResultContractProperties struct { + // Error Body Contract + Error *ErrorResponseBody + + // Resolver result identifier. + ID *string + + // Optional result info. + ResultInfo *string + + // Start time of an async resolver. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO + // 8601 standard. + Started *time.Time + + // Status of an async resolver. + Status *AsyncResolverStatus + + // Last update time of an async resolver. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by + // the ISO 8601 standard. + Updated *time.Time + + // READ-ONLY; This property if only provided as part of the TenantConfigurationValidate resolver. It contains the log the + // entities which will be updated/created/deleted as part of the TenantConfigurationDeploy + // resolver. + ActionLog []*ResolverResultLogItemContract +} + +// ResolverResultLogItemContract - Log of the entity being created, updated or deleted. +type ResolverResultLogItemContract struct { + // Action like create/update/delete. + Action *string + + // Identifier of the entity being created/updated/deleted. + ObjectKey *string + + // The type of entity contract. + ObjectType *string +} + +// ResolverUpdateContract - GraphQL API Resolver Update Contract details. +type ResolverUpdateContract struct { + // Properties of the GraphQL API Resolver entity that can be updated. + Properties *ResolverUpdateContractProperties +} + +// ResolverUpdateContractProperties - Resolver Update Contract Properties. +type ResolverUpdateContractProperties struct { + // Description of the resolver. May include HTML formatting tags. + Description *string + + // Resolver Name. + DisplayName *string + + // Path is type/field being resolved. + Path *string +} + +// Resource - Common fields that are returned in the response for all Azure Resource Manager resources +type Resource struct { + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ResourceCollection - A collection of resources. +type ResourceCollection struct { + // Total record count number. + Count *int64 + + // Next page link if any. + NextLink *string + + // A collection of resources. + Value []*ResourceCollectionValueItem +} + +type ResourceCollectionValueItem struct { + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ResourceLocationDataContract - Resource location data properties. +type ResourceLocationDataContract struct { + // REQUIRED; A canonical name for the geographic or physical location. + Name *string + + // The city or locality where the resource is located. + City *string + + // The country or region where the resource is located. + CountryOrRegion *string + + // The district, state, or province where the resource is located. + District *string +} + +// ResourceSKU - Describes an available API Management SKU. +type ResourceSKU struct { + // Name of the Sku. + Name *SKUType +} + +// ResourceSKUCapacity - Describes scaling information of a SKU. +type ResourceSKUCapacity struct { + // READ-ONLY; The default capacity. + Default *int32 + + // READ-ONLY; The maximum capacity that can be set. + Maximum *int32 + + // READ-ONLY; The minimum capacity. + Minimum *int32 + + // READ-ONLY; The scale type applicable to the sku. + ScaleType *ResourceSKUCapacityScaleType +} + +// ResourceSKUResult - Describes an available API Management service SKU. +type ResourceSKUResult struct { + // READ-ONLY; Specifies the number of API Management units. + Capacity *ResourceSKUCapacity + + // READ-ONLY; The type of resource the SKU applies to. + ResourceType *string + + // READ-ONLY; Specifies API Management SKU. + SKU *ResourceSKU +} + +// ResourceSKUResults - The API Management service SKUs operation response. +type ResourceSKUResults struct { + // REQUIRED; The list of skus available for the service. + Value []*ResourceSKUResult + + // The uri to fetch the next page of API Management service Skus. + NextLink *string +} + +// ResponseContract - Operation response details. +type ResponseContract struct { + // REQUIRED; Operation response HTTP status code. + StatusCode *int32 + + // Operation response description. + Description *string + + // Collection of operation response headers. + Headers []*ParameterContract + + // Collection of operation response representations. + Representations []*RepresentationContract +} + +// SKU - Describes an available ApiManagement SKU. +type SKU struct { + // READ-ONLY; The api versions that support this SKU. + APIVersions []*string + + // READ-ONLY; A name value pair to describe the capability. + Capabilities []*SKUCapabilities + + // READ-ONLY; Specifies the number of virtual machines in the scale set. + Capacity *SKUCapacity + + // READ-ONLY; Metadata for retrieving price info. + Costs []*SKUCosts + + // READ-ONLY; The Family of this particular SKU. + Family *string + + // READ-ONLY; The Kind of resources that are supported in this SKU. + Kind *string + + // READ-ONLY; A list of locations and availability zones in those locations where the SKU is available. + LocationInfo []*SKULocationInfo + + // READ-ONLY; The set of locations that the SKU is available. + Locations []*string + + // READ-ONLY; The name of SKU. + Name *string + + // READ-ONLY; The type of resource the SKU applies to. + ResourceType *string + + // READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + Restrictions []*SKURestrictions + + // READ-ONLY; The Size of the SKU. + Size *string + + // READ-ONLY; Specifies the tier of virtual machines in a scale set. + // Possible Values: + // Standard + // Basic + Tier *string +} + +// SKUCapabilities - Describes The SKU capabilities object. +type SKUCapabilities struct { + // READ-ONLY; An invariant to describe the feature. + Name *string + + // READ-ONLY; An invariant if the feature is measured by quantity. + Value *string +} + +// SKUCapacity - Describes scaling information of a SKU. +type SKUCapacity struct { + // READ-ONLY; The default capacity. + Default *int32 + + // READ-ONLY; The maximum capacity that can be set. + Maximum *int32 + + // READ-ONLY; The minimum capacity. + Minimum *int32 + + // READ-ONLY; The scale type applicable to the sku. + ScaleType *APIManagementSKUCapacityScaleType +} + +// SKUCosts - Describes metadata for retrieving price info. +type SKUCosts struct { + // READ-ONLY; An invariant to show the extended unit. + ExtendedUnit *string + + // READ-ONLY; Used for querying price from commerce. + MeterID *string + + // READ-ONLY; The multiplier is needed to extend the base metered cost. + Quantity *int64 +} + +type SKULocationInfo struct { + // READ-ONLY; Location of the SKU + Location *string + + // READ-ONLY; Details of capabilities available to a SKU in specific zones. + ZoneDetails []*SKUZoneDetails + + // READ-ONLY; List of availability zones where the SKU is supported. + Zones []*string +} + +type SKURestrictionInfo struct { + // READ-ONLY; Locations where the SKU is restricted + Locations []*string + + // READ-ONLY; List of availability zones where the SKU is restricted. + Zones []*string +} + +// SKURestrictions - Describes scaling information of a SKU. +type SKURestrictions struct { + // READ-ONLY; The reason for restriction. + ReasonCode *APIManagementSKURestrictionsReasonCode + + // READ-ONLY; The information about the restriction where the SKU cannot be used. + RestrictionInfo *SKURestrictionInfo + + // READ-ONLY; The type of restrictions. + Type *APIManagementSKURestrictionsType + + // READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where + // the SKU is restricted. + Values []*string +} + +// SKUZoneDetails - Describes The zonal capabilities of a SKU. +type SKUZoneDetails struct { + // READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones. + Capabilities []*SKUCapabilities + + // READ-ONLY; The set of zones that the SKU is available in with the specified capabilities. + Name []*string +} + +// SKUsResult - The List Resource Skus operation response. +type SKUsResult struct { + // REQUIRED; The list of skus available for the subscription. + Value []*SKU + + // READ-ONLY; The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource + // Skus + NextLink *string +} + +// SamplingSettings - Sampling settings for Diagnostic. +type SamplingSettings struct { + // Rate of sampling for fixed-rate sampling. + Percentage *float64 + + // Sampling type. + SamplingType *SamplingType +} + +// SaveConfigurationParameter - Save Tenant Configuration Contract details. +type SaveConfigurationParameter struct { + // Properties of the Save Configuration Parameters. + Properties *SaveConfigurationParameterProperties +} + +// SaveConfigurationParameterProperties - Parameters supplied to the Save Tenant Configuration operation. +type SaveConfigurationParameterProperties struct { + // REQUIRED; The name of the Git branch in which to commit the current configuration snapshot. + Branch *string + + // The value if true, the current configuration database is committed to the Git repository, even if the Git repository has + // newer changes that would be overwritten. + Force *bool +} + +// SchemaCollection - The response of the list schema operation. +type SchemaCollection struct { + // Total record count number. + Count *int64 + + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; API Schema Contract value. + Value []*SchemaContract +} + +// SchemaContract - API Schema Contract details. +type SchemaContract struct { + // Properties of the API Schema. + Properties *SchemaContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SchemaContractProperties - API Schema create or update contract Properties. +type SchemaContractProperties struct { + // REQUIRED; Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema + // document (e.g. application/json, application/xml). + // - Swagger Schema use application/vnd.ms-azure-apim.swagger.definitions+json + // - WSDL Schema use application/vnd.ms-azure-apim.xsd+xml + // - OpenApi Schema use application/vnd.oai.openapi.components+json + // - WADL Schema use application/vnd.ms-azure-apim.wadl.grammars+xml + // - OData Schema use application/vnd.ms-azure-apim.odata.schema + // - gRPC Schema use text/protobuf. + ContentType *string + + // REQUIRED; Create or update Properties of the API Schema Document. + Document *SchemaDocumentProperties + + // READ-ONLY; The provisioning state + ProvisioningState *string +} + +// SchemaDocumentProperties - Api Schema Document Properties. +type SchemaDocumentProperties struct { + // Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. + Components any + + // Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. + Definitions any + + // Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. + Value *string +} + +// ServiceApplyNetworkConfigurationParameters - Parameter supplied to the Apply Network configuration operation. +type ServiceApplyNetworkConfigurationParameters struct { + // Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, + // this parameter is not required. + Location *string +} + +// ServiceBackupRestoreParameters - Parameters supplied to the Backup/Restore of an API Management service operation. +type ServiceBackupRestoreParameters struct { + // REQUIRED; The name of the backup file to create/retrieve. + BackupName *string + + // REQUIRED; The name of the blob container (used to place/retrieve the backup). + ContainerName *string + + // REQUIRED; The name of the Azure storage account (used to place/retrieve the backup). + StorageAccount *string + + // Storage account access key. Required only if accessType is set to AccessKey. + AccessKey *string + + // The type of access to be used for the storage account. + AccessType *AccessType + + // The Client ID of user assigned managed identity. Required only if accessType is set to UserAssignedManagedIdentity. + ClientID *string +} + +// ServiceBaseProperties - Base Properties of an API Management service resource description. +type ServiceBaseProperties struct { + // Control Plane Apis version constraint for the API Management service. + APIVersionConstraint *APIVersionConstraint + + // Additional datacenter locations of the API Management service. + AdditionalLocations []*AdditionalLocation + + // List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed + // is 10. + Certificates []*CertificateConfiguration + + // Configuration API configuration of the API Management service. + ConfigurationAPI *ConfigurationAPI + + // Custom properties of the API Management service. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA + // for all TLS(1.0, 1.1 and 1.2). + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API + // Management service. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1 + // for communications with backends. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for + // communications with backends. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an + // API Management service. + // Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For + // all the settings except Http2 the default value is True if the service was + // created on or before April 1, 2018 and False otherwise. Http2 setting's default value is False. + // You can disable any of the following ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]: + // TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBC + // SHA, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256, + // TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For + // example, Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default + // value is true for them. + // Note: The following ciphers can't be disabled since they are required by internal platform components: TLSAES256GCMSHA384,TLSAES128GCMSHA256,TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCM + // SHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBCSHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256 + CustomProperties map[string]*string + + // Status of developer portal in this API Management service. + DeveloperPortalStatus *DeveloperPortalStatus + + // Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway + // in master region. + DisableGateway *bool + + // Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each + // request to the gateway. This also enables the ability to authenticate the + // certificate in the policy on the gateway. + EnableClientCertificate *bool + + // Custom hostname configuration of the API Management service. + HostnameConfigurations []*HostnameConfiguration + + // Status of legacy portal in the API Management service. + LegacyPortalStatus *LegacyPortalStatus + + // Property can be used to enable NAT Gateway for this API Management service. + NatGatewayState *NatGatewayState + + // Email address from which the notification will be sent. + NotificationSenderEmail *string + + // List of Private Endpoint Connections of this service. + PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper + + // Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported + // only for Developer and Premium SKU being deployed in Virtual Network. + PublicIPAddressID *string + + // Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must + // be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the + // exclusive access method. Default value is 'Enabled' + PublicNetworkAccess *PublicNetworkAccess + + // Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other + // properties will be ignored. + Restore *bool + + // Virtual network configuration of the API Management service. + VirtualNetworkConfiguration *VirtualNetworkConfiguration + + // The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management + // service is not part of any Virtual Network, External means the API Management + // deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management + // deployment is setup inside a Virtual Network having an Intranet Facing Endpoint + // only. + VirtualNetworkType *VirtualNetworkType + + // READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ + // as specified by the ISO 8601 standard. + CreatedAtUTC *time.Time + + // READ-ONLY; DEveloper Portal endpoint URL of the API Management service. + DeveloperPortalURL *string + + // READ-ONLY; Gateway URL of the API Management service in the Default Region. + GatewayRegionalURL *string + + // READ-ONLY; Gateway URL of the API Management service. + GatewayURL *string + + // READ-ONLY; Management API endpoint URL of the API Management service. + ManagementAPIURL *string + + // READ-ONLY; Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium + // SKU on stv2 platform. + OutboundPublicIPAddresses []*string + + // READ-ONLY; Compute Platform Version running the service in this location. + PlatformVersion *PlatformVersion + + // READ-ONLY; Publisher portal endpoint Url of the API Management service. + PortalURL *string + + // READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed + // in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated + // SKU. + PrivateIPAddresses []*string + + // READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + ProvisioningState *string + + // READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for + // Basic, Standard, Premium and Isolated SKU. + PublicIPAddresses []*string + + // READ-ONLY; SCM endpoint URL of the API Management service. + ScmURL *string + + // READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started + // on the service. + TargetProvisioningState *string +} + +// ServiceCheckNameAvailabilityParameters - Parameters supplied to the CheckNameAvailability operation. +type ServiceCheckNameAvailabilityParameters struct { + // REQUIRED; The name to check for availability. + Name *string +} + +// ServiceGetDomainOwnershipIdentifierResult - Response of the GetDomainOwnershipIdentifier operation. +type ServiceGetDomainOwnershipIdentifierResult struct { + // READ-ONLY; The domain ownership identifier value. + DomainOwnershipIdentifier *string +} + +// ServiceGetSsoTokenResult - The response of the GetSsoToken operation. +type ServiceGetSsoTokenResult struct { + // Redirect URL to the Publisher Portal containing the SSO token. + RedirectURI *string +} + +// ServiceIdentity - Identity properties of the Api Management service resource. +type ServiceIdentity struct { + // REQUIRED; The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly + // created identity and a set of user assigned identities. The type 'None' will remove any + // identities from the service. + Type *ApimIdentityType + + // The list of user 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]*UserIdentityProperties + + // READ-ONLY; The principal id of the identity. + PrincipalID *string + + // READ-ONLY; The client tenant id of the identity. + TenantID *string +} + +// ServiceListResult - The response of the List API Management services operation. +type ServiceListResult struct { + // REQUIRED; Result of the List API Management services operation. + Value []*ServiceResource + + // Link to the next set of results. Not empty if Value contains incomplete list of API Management services. + NextLink *string +} + +// ServiceNameAvailabilityResult - Response of the CheckNameAvailability operation. +type ServiceNameAvailabilityResult struct { + // Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported + // characters, etc.) AlreadyExists indicates that the name is already in use + // and is therefore unavailable. + Reason *NameAvailabilityReason + + // READ-ONLY; If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource + // naming requirements so that the user can select a valid name. If reason == AlreadyExists, + // explain that is already in use, and direct them to select a different name. + Message *string + + // READ-ONLY; True if the name is available and can be used to create a new API Management service; otherwise false. + NameAvailable *bool +} + +// ServiceProperties - Properties of an API Management service resource description. +type ServiceProperties struct { + // REQUIRED; Publisher email. + PublisherEmail *string + + // REQUIRED; Publisher name. + PublisherName *string + + // Control Plane Apis version constraint for the API Management service. + APIVersionConstraint *APIVersionConstraint + + // Additional datacenter locations of the API Management service. + AdditionalLocations []*AdditionalLocation + + // List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed + // is 10. + Certificates []*CertificateConfiguration + + // Configuration API configuration of the API Management service. + ConfigurationAPI *ConfigurationAPI + + // Custom properties of the API Management service. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA + // for all TLS(1.0, 1.1 and 1.2). + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API + // Management service. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1 + // for communications with backends. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for + // communications with backends. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an + // API Management service. + // Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For + // all the settings except Http2 the default value is True if the service was + // created on or before April 1, 2018 and False otherwise. Http2 setting's default value is False. + // You can disable any of the following ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]: + // TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBC + // SHA, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256, + // TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For + // example, Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default + // value is true for them. + // Note: The following ciphers can't be disabled since they are required by internal platform components: TLSAES256GCMSHA384,TLSAES128GCMSHA256,TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCM + // SHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBCSHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256 + CustomProperties map[string]*string + + // Status of developer portal in this API Management service. + DeveloperPortalStatus *DeveloperPortalStatus + + // Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway + // in master region. + DisableGateway *bool + + // Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each + // request to the gateway. This also enables the ability to authenticate the + // certificate in the policy on the gateway. + EnableClientCertificate *bool + + // Custom hostname configuration of the API Management service. + HostnameConfigurations []*HostnameConfiguration + + // Status of legacy portal in the API Management service. + LegacyPortalStatus *LegacyPortalStatus + + // Property can be used to enable NAT Gateway for this API Management service. + NatGatewayState *NatGatewayState + + // Email address from which the notification will be sent. + NotificationSenderEmail *string + + // List of Private Endpoint Connections of this service. + PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper + + // Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported + // only for Developer and Premium SKU being deployed in Virtual Network. + PublicIPAddressID *string + + // Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must + // be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the + // exclusive access method. Default value is 'Enabled' + PublicNetworkAccess *PublicNetworkAccess + + // Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other + // properties will be ignored. + Restore *bool + + // Virtual network configuration of the API Management service. + VirtualNetworkConfiguration *VirtualNetworkConfiguration + + // The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management + // service is not part of any Virtual Network, External means the API Management + // deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management + // deployment is setup inside a Virtual Network having an Intranet Facing Endpoint + // only. + VirtualNetworkType *VirtualNetworkType + + // READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ + // as specified by the ISO 8601 standard. + CreatedAtUTC *time.Time + + // READ-ONLY; DEveloper Portal endpoint URL of the API Management service. + DeveloperPortalURL *string + + // READ-ONLY; Gateway URL of the API Management service in the Default Region. + GatewayRegionalURL *string + + // READ-ONLY; Gateway URL of the API Management service. + GatewayURL *string + + // READ-ONLY; Management API endpoint URL of the API Management service. + ManagementAPIURL *string + + // READ-ONLY; Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium + // SKU on stv2 platform. + OutboundPublicIPAddresses []*string + + // READ-ONLY; Compute Platform Version running the service in this location. + PlatformVersion *PlatformVersion + + // READ-ONLY; Publisher portal endpoint Url of the API Management service. + PortalURL *string + + // READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed + // in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated + // SKU. + PrivateIPAddresses []*string + + // READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + ProvisioningState *string + + // READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for + // Basic, Standard, Premium and Isolated SKU. + PublicIPAddresses []*string + + // READ-ONLY; SCM endpoint URL of the API Management service. + ScmURL *string + + // READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started + // on the service. + TargetProvisioningState *string +} + +// ServiceResource - A single API Management service resource in List or Get response. +type ServiceResource struct { + // REQUIRED; Resource location. + Location *string + + // REQUIRED; Properties of the API Management service. + Properties *ServiceProperties + + // REQUIRED; SKU properties of the API Management service. + SKU *ServiceSKUProperties + + // Managed service identity of the Api Management service. + Identity *ServiceIdentity + + // Resource tags. + Tags map[string]*string + + // A list of availability zones denoting where the resource needs to come from. + Zones []*string + + // READ-ONLY; ETag of the resource. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement. + Type *string +} + +// ServiceSKUProperties - API Management service resource SKU properties. +type ServiceSKUProperties struct { + // REQUIRED; Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as + // 0. + Capacity *int32 + + // REQUIRED; Name of the Sku. + Name *SKUType +} + +// ServiceUpdateParameters - Parameter supplied to Update Api Management Service. +type ServiceUpdateParameters struct { + // Managed service identity of the Api Management service. + Identity *ServiceIdentity + + // Properties of the API Management service. + Properties *ServiceUpdateProperties + + // SKU properties of the API Management service. + SKU *ServiceSKUProperties + + // Resource tags. + Tags map[string]*string + + // A list of availability zones denoting where the resource needs to come from. + Zones []*string + + // READ-ONLY; ETag of the resource. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type for API Management resource is set to Microsoft.ApiManagement. + Type *string +} + +// ServiceUpdateProperties - Properties of an API Management service resource description. +type ServiceUpdateProperties struct { + // Control Plane Apis version constraint for the API Management service. + APIVersionConstraint *APIVersionConstraint + + // Additional datacenter locations of the API Management service. + AdditionalLocations []*AdditionalLocation + + // List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed + // is 10. + Certificates []*CertificateConfiguration + + // Configuration API configuration of the API Management service. + ConfigurationAPI *ConfigurationAPI + + // Custom properties of the API Management service. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168 will disable the cipher TLSRSAWITH3DESEDECBCSHA + // for all TLS(1.0, 1.1 and 1.2). + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11 can be used to disable just TLS 1.1. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10 can be used to disable TLS 1.0 on an API + // Management service. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11 can be used to disable just TLS 1.1 + // for communications with backends. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10 can be used to disable TLS 1.0 for + // communications with backends. + // Setting Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2 can be used to enable HTTP2 protocol on an + // API Management service. + // Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For + // all the settings except Http2 the default value is True if the service was + // created on or before April 1, 2018 and False otherwise. Http2 setting's default value is False. + // You can disable any of the following ciphers by using settings Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]: + // TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES128CBC + // SHA, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES128CBCSHA, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES128CBCSHA256, + // TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES128CBCSHA. For + // example, Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256:false. The default + // value is true for them. + // Note: The following ciphers can't be disabled since they are required by internal platform components: TLSAES256GCMSHA384,TLSAES128GCMSHA256,TLSECDHEECDSAWITHAES256GCMSHA384,TLSECDHEECDSAWITHAES128GCM + // SHA256,TLSECDHERSAWITHAES256GCMSHA384,TLSECDHERSAWITHAES128GCMSHA256,TLSECDHEECDSAWITHAES256CBCSHA384,TLSECDHEECDSAWITHAES128CBCSHA256,TLSECDHERSAWITHAES256CBCSHA384,TLSECDHERSAWITHAES128CBCSHA256 + CustomProperties map[string]*string + + // Status of developer portal in this API Management service. + DeveloperPortalStatus *DeveloperPortalStatus + + // Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway + // in master region. + DisableGateway *bool + + // Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each + // request to the gateway. This also enables the ability to authenticate the + // certificate in the policy on the gateway. + EnableClientCertificate *bool + + // Custom hostname configuration of the API Management service. + HostnameConfigurations []*HostnameConfiguration + + // Status of legacy portal in the API Management service. + LegacyPortalStatus *LegacyPortalStatus + + // Property can be used to enable NAT Gateway for this API Management service. + NatGatewayState *NatGatewayState + + // Email address from which the notification will be sent. + NotificationSenderEmail *string + + // List of Private Endpoint Connections of this service. + PrivateEndpointConnections []*RemotePrivateEndpointConnectionWrapper + + // Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported + // only for Developer and Premium SKU being deployed in Virtual Network. + PublicIPAddressID *string + + // Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must + // be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the + // exclusive access method. Default value is 'Enabled' + PublicNetworkAccess *PublicNetworkAccess + + // Publisher email. + PublisherEmail *string + + // Publisher name. + PublisherName *string + + // Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other + // properties will be ignored. + Restore *bool + + // Virtual network configuration of the API Management service. + VirtualNetworkConfiguration *VirtualNetworkConfiguration + + // The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management + // service is not part of any Virtual Network, External means the API Management + // deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management + // deployment is setup inside a Virtual Network having an Intranet Facing Endpoint + // only. + VirtualNetworkType *VirtualNetworkType + + // READ-ONLY; Creation UTC date of the API Management service.The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ + // as specified by the ISO 8601 standard. + CreatedAtUTC *time.Time + + // READ-ONLY; DEveloper Portal endpoint URL of the API Management service. + DeveloperPortalURL *string + + // READ-ONLY; Gateway URL of the API Management service in the Default Region. + GatewayRegionalURL *string + + // READ-ONLY; Gateway URL of the API Management service. + GatewayURL *string + + // READ-ONLY; Management API endpoint URL of the API Management service. + ManagementAPIURL *string + + // READ-ONLY; Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium + // SKU on stv2 platform. + OutboundPublicIPAddresses []*string + + // READ-ONLY; Compute Platform Version running the service in this location. + PlatformVersion *PlatformVersion + + // READ-ONLY; Publisher portal endpoint Url of the API Management service. + PortalURL *string + + // READ-ONLY; Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed + // in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated + // SKU. + PrivateIPAddresses []*string + + // READ-ONLY; The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + ProvisioningState *string + + // READ-ONLY; Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for + // Basic, Standard, Premium and Isolated SKU. + PublicIPAddresses []*string + + // READ-ONLY; SCM endpoint URL of the API Management service. + ScmURL *string + + // READ-ONLY; The provisioning state of the API Management service, which is targeted by the long running operation started + // on the service. + TargetProvisioningState *string +} + +// SubscriptionCollection - Paged Subscriptions list representation. +type SubscriptionCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*SubscriptionContract +} + +// SubscriptionContract - Subscription details. +type SubscriptionContract struct { + // Subscription contract properties. + Properties *SubscriptionContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SubscriptionContractProperties - Subscription details. +type SubscriptionContractProperties struct { + // REQUIRED; Scope like /products/{productId} or /apis or /apis/{apiId}. + Scope *string + + // REQUIRED; Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription + // is blocked, and the subscriber cannot call any APIs of the product, * submitted – the + // subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription + // request has been denied by an administrator, * cancelled – the + // subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration + // date and was deactivated. + State *SubscriptionState + + // Determines whether tracing is enabled + AllowTracing *bool + + // The name of the subscription, or null if the subscription has no name. + DisplayName *string + + // Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically + // cancelled. The subscription lifecycle can be managed by using the + // state property. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + EndDate *time.Time + + // Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. + // The subscription lifecycle can be managed by using the state property. The date + // conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + ExpirationDate *time.Time + + // Upcoming subscription expiration notification date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as + // specified by the ISO 8601 standard. + NotificationDate *time.Time + + // The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} + // where {userId} is a user identifier. + OwnerID *string + + // Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get + // the value. + PrimaryKey *string + + // Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get + // the value. + SecondaryKey *string + + // Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. + // The subscription lifecycle can be managed by using the state property. The + // date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + StartDate *time.Time + + // Optional subscription comment added by an administrator when the state is changed to the 'rejected'. + StateComment *string + + // READ-ONLY; Subscription creation date. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by + // the ISO 8601 standard. + CreatedDate *time.Time +} + +// SubscriptionCreateParameterProperties - Parameters supplied to the Create subscription operation. +type SubscriptionCreateParameterProperties struct { + // REQUIRED; Subscription name. + DisplayName *string + + // REQUIRED; Scope like /products/{productId} or /apis or /apis/{apiId}. + Scope *string + + // Determines whether tracing can be enabled + AllowTracing *bool + + // User (user id path) for whom subscription is being created in form /users/{userId} + OwnerID *string + + // Primary subscription key. If not specified during request key will be generated automatically. + PrimaryKey *string + + // Secondary subscription key. If not specified during request key will be generated automatically. + SecondaryKey *string + + // Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are + // * active – the subscription is active, * suspended – the subscription is + // blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by + // the developer, but has not yet been approved or rejected, * rejected – the + // subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer + // or administrator, * expired – the subscription reached its expiration date + // and was deactivated. + State *SubscriptionState +} + +// SubscriptionCreateParameters - Subscription create details. +type SubscriptionCreateParameters struct { + // Subscription contract properties. + Properties *SubscriptionCreateParameterProperties +} + +// SubscriptionKeyParameterNamesContract - Subscription key parameter names details. +type SubscriptionKeyParameterNamesContract struct { + // Subscription key header name. + Header *string + + // Subscription key query string parameter name. + Query *string +} + +// SubscriptionKeysContract - Subscription keys. +type SubscriptionKeysContract struct { + // Subscription primary key. + PrimaryKey *string + + // Subscription secondary key. + SecondaryKey *string +} + +// SubscriptionUpdateParameterProperties - Parameters supplied to the Update subscription operation. +type SubscriptionUpdateParameterProperties struct { + // Determines whether tracing can be enabled + AllowTracing *bool + + // Subscription name. + DisplayName *string + + // Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. + // The subscription lifecycle can be managed by using the state property. The date + // conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + ExpirationDate *time.Time + + // User identifier path: /users/{userId} + OwnerID *string + + // Primary subscription key. + PrimaryKey *string + + // Scope like /products/{productId} or /apis or /apis/{apiId} + Scope *string + + // Secondary subscription key. + SecondaryKey *string + + // Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, + // and the subscriber cannot call any APIs of the product, * submitted – the + // subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription + // request has been denied by an administrator, * cancelled – the + // subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration + // date and was deactivated. + State *SubscriptionState + + // Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. + StateComment *string +} + +// SubscriptionUpdateParameters - Subscription update details. +type SubscriptionUpdateParameters struct { + // Subscription Update contract properties. + Properties *SubscriptionUpdateParameterProperties +} + +// SubscriptionsDelegationSettingsProperties - Subscriptions delegation settings properties. +type SubscriptionsDelegationSettingsProperties struct { + // Enable or disable delegation for subscriptions. + Enabled *bool +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource last modification (UTC) + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *CreatedByType +} + +// TagAPILinkCollection - Paged Tag-API link list representation. +type TagAPILinkCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*TagAPILinkContract +} + +// TagAPILinkContract - Tag-API link details. +type TagAPILinkContract struct { + // Tag-API link entity contract properties. + Properties *TagAPILinkContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// TagAPILinkContractProperties - Tag-API link entity properties. +type TagAPILinkContractProperties struct { + // REQUIRED; Full resource Id of an API. + APIID *string +} + +// TagCollection - Paged Tag list representation. +type TagCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*TagContract +} + +// TagContract - Tag Contract details. +type TagContract struct { + // Tag entity contract properties. + Properties *TagContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// TagContractProperties - Tag contract Properties. +type TagContractProperties struct { + // REQUIRED; Tag name. + DisplayName *string +} + +// TagCreateUpdateParameters - Parameters supplied to Create/Update Tag operations. +type TagCreateUpdateParameters struct { + // Properties supplied to Create Tag operation. + Properties *TagContractProperties +} + +// TagDescriptionBaseProperties - Parameters supplied to the Create TagDescription operation. +type TagDescriptionBaseProperties struct { + // Description of the Tag. + Description *string + + // Description of the external resources describing the tag. + ExternalDocsDescription *string + + // Absolute URL of external resources describing the tag. + ExternalDocsURL *string +} + +// TagDescriptionCollection - Paged TagDescription list representation. +type TagDescriptionCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*TagDescriptionContract +} + +// TagDescriptionContract - Contract details. +type TagDescriptionContract struct { + // TagDescription entity contract properties. + Properties *TagDescriptionContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// TagDescriptionContractProperties - TagDescription contract Properties. +type TagDescriptionContractProperties struct { + // Description of the Tag. + Description *string + + // Tag name. + DisplayName *string + + // Description of the external resources describing the tag. + ExternalDocsDescription *string + + // Absolute URL of external resources describing the tag. + ExternalDocsURL *string + + // Identifier of the tag in the form of /tags/{tagId} + TagID *string +} + +// TagDescriptionCreateParameters - Parameters supplied to the Create TagDescription operation. +type TagDescriptionCreateParameters struct { + // Properties supplied to Create TagDescription operation. + Properties *TagDescriptionBaseProperties +} + +// TagOperationLinkCollection - Paged Tag-operation link list representation. +type TagOperationLinkCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*TagOperationLinkContract +} + +// TagOperationLinkContract - Tag-operation link details. +type TagOperationLinkContract struct { + // Tag-API link entity contract properties. + Properties *TagOperationLinkContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// TagOperationLinkContractProperties - Tag-operation link entity properties. +type TagOperationLinkContractProperties struct { + // REQUIRED; Full resource Id of an API operation. + OperationID *string +} + +// TagProductLinkCollection - Paged Tag-product link list representation. +type TagProductLinkCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*TagProductLinkContract +} + +// TagProductLinkContract - Tag-product link details. +type TagProductLinkContract struct { + // Tag-API link entity contract properties. + Properties *TagProductLinkContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// TagProductLinkContractProperties - Tag-product link entity properties. +type TagProductLinkContractProperties struct { + // REQUIRED; Full resource Id of a product. + ProductID *string +} + +// TagResourceCollection - Paged Tag list representation. +type TagResourceCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*TagResourceContract +} + +// TagResourceContract - TagResource contract properties. +type TagResourceContract struct { + // REQUIRED; Tag associated with the resource. + Tag *TagResourceContractProperties + + // API associated with the tag. + API *APITagResourceContractProperties + + // Operation associated with the tag. + Operation *OperationTagResourceContractProperties + + // Product associated with the tag. + Product *ProductTagResourceContractProperties +} + +// TagResourceContractProperties - Contract defining the Tag property in the Tag Resource Contract +type TagResourceContractProperties struct { + // Tag identifier + ID *string + + // Tag Name + Name *string +} + +// TenantConfigurationSyncStateContract - Result of Tenant Configuration Sync State. +type TenantConfigurationSyncStateContract struct { + // Properties returned Tenant Configuration Sync State check. + Properties *TenantConfigurationSyncStateContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// TenantConfigurationSyncStateContractProperties - Tenant Configuration Synchronization State. +type TenantConfigurationSyncStateContractProperties struct { + // The name of Git branch. + Branch *string + + // The latest commit Id. + CommitID *string + + // The date of the latest configuration change. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified + // by the ISO 8601 standard. + ConfigurationChangeDate *time.Time + + // value indicating if last sync was save (true) or deploy (false) operation. + IsExport *bool + + // value indicating whether Git configuration access is enabled. + IsGitEnabled *bool + + // value indicating if last synchronization was later than the configuration change. + IsSynced *bool + + // Most recent tenant configuration operation identifier + LastOperationID *string + + // The date of the latest synchronization. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by + // the ISO 8601 standard. + SyncDate *time.Time +} + +// TenantSettingsCollection - Paged AccessInformation list representation. +type TenantSettingsCollection struct { + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*TenantSettingsContract +} + +// TenantSettingsContract - Tenant Settings. +type TenantSettingsContract struct { + // TenantSettings entity contract properties. + Properties *TenantSettingsContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// TenantSettingsContractProperties - Tenant access information contract of the API Management service. +type TenantSettingsContractProperties struct { + // Tenant settings + Settings map[string]*string +} + +// TermsOfServiceProperties - Terms of service contract properties. +type TermsOfServiceProperties struct { + // Ask user for consent to the terms of service. + ConsentRequired *bool + + // Display terms of service during a sign-up process. + Enabled *bool + + // A terms of service text. + Text *string +} + +// TokenBodyParameterContract - OAuth acquire token request body parameter (www-url-form-encoded). +type TokenBodyParameterContract struct { + // REQUIRED; body parameter name. + Name *string + + // REQUIRED; body parameter value. + Value *string +} + +// UserCollection - Paged Users list representation. +type UserCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*UserContract +} + +// UserContract - User details. +type UserContract struct { + // User entity contract properties. + Properties *UserContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// UserContractProperties - User profile. +type UserContractProperties struct { + // Email address. + Email *string + + // First name. + FirstName *string + + // Collection of user identities. + Identities []*UserIdentityContract + + // Last name. + LastName *string + + // Optional note about a user set by the administrator. + Note *string + + // Date of user registration. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 + // standard. + RegistrationDate *time.Time + + // Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal + // or call any APIs of subscribed products. Default state is Active. + State *UserState + + // READ-ONLY; Collection of groups user is part of. + Groups []*GroupContractProperties +} + +// UserCreateParameterProperties - Parameters supplied to the Create User operation. +type UserCreateParameterProperties struct { + // REQUIRED; Email address. Must not be empty and must be unique within the service instance. + Email *string + + // REQUIRED; First name. + FirstName *string + + // REQUIRED; Last name. + LastName *string + + // Determines the type of application which send the create user request. Default is legacy portal. + AppType *AppType + + // Determines the type of confirmation e-mail that will be sent to the newly created user. + Confirmation *Confirmation + + // Collection of user identities. + Identities []*UserIdentityContract + + // Optional note about a user set by the administrator. + Note *string + + // User Password. If no value is provided, a default password is generated. + Password *string + + // Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal + // or call any APIs of subscribed products. Default state is Active. + State *UserState +} + +// UserCreateParameters - User create details. +type UserCreateParameters struct { + // User entity create contract properties. + Properties *UserCreateParameterProperties +} + +// UserEntityBaseParameters - User Entity Base Parameters set. +type UserEntityBaseParameters struct { + // Collection of user identities. + Identities []*UserIdentityContract + + // Optional note about a user set by the administrator. + Note *string + + // Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal + // or call any APIs of subscribed products. Default state is Active. + State *UserState +} + +// UserIdentityCollection - List of Users Identity list representation. +type UserIdentityCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // User Identity values. + Value []*UserIdentityContract +} + +// UserIdentityContract - User identity details. +type UserIdentityContract struct { + // Identifier value within provider. + ID *string + + // Identity provider name. + Provider *string +} + +type UserIdentityProperties struct { + // The client id of user assigned identity. + ClientID *string + + // The principal id of user assigned identity. + PrincipalID *string +} + +// UserTokenParameterProperties - Parameters supplied to the Get User Token operation. +type UserTokenParameterProperties struct { + // REQUIRED; The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following + // format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + Expiry *time.Time + + // REQUIRED; The Key to be used to generate token for user. + KeyType *KeyType +} + +// UserTokenParameters - Get User Token parameters. +type UserTokenParameters struct { + // User Token Parameter contract properties. + Properties *UserTokenParameterProperties +} + +// UserTokenResult - Get User Token response details. +type UserTokenResult struct { + // Shared Access Authorization token for the User. + Value *string +} + +// UserUpdateParameters - User update parameters. +type UserUpdateParameters struct { + // User entity update contract properties. + Properties *UserUpdateParametersProperties +} + +// UserUpdateParametersProperties - Parameters supplied to the Update User operation. +type UserUpdateParametersProperties struct { + // Email address. Must not be empty and must be unique within the service instance. + Email *string + + // First name. + FirstName *string + + // Collection of user identities. + Identities []*UserIdentityContract + + // Last name. + LastName *string + + // Optional note about a user set by the administrator. + Note *string + + // User Password. + Password *string + + // Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal + // or call any APIs of subscribed products. Default state is Active. + State *UserState +} + +// VirtualNetworkConfiguration - Configuration of a virtual network to which API Management service is deployed. +type VirtualNetworkConfiguration struct { + // The full resource ID of a subnet in a virtual network to deploy the API Management service in. + SubnetResourceID *string + + // READ-ONLY; The name of the subnet. + Subnetname *string + + // READ-ONLY; The virtual network ID. This is typically a GUID. Expect a null GUID by default. + Vnetid *string +} + +// WikiCollection - Paged Wiki list representation. +type WikiCollection struct { + // READ-ONLY; Next page link if any. + NextLink *string + + // READ-ONLY; Page values. + Value []*WikiContract +} + +// WikiContract - Wiki properties +type WikiContract struct { + // Wiki details. + Properties *WikiContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// WikiContractProperties - Wiki contract details +type WikiContractProperties struct { + // Collection wiki documents included into this wiki. + Documents []*WikiDocumentationContract +} + +// WikiDocumentationContract - Wiki documentation details. +type WikiDocumentationContract struct { + // Documentation Identifier + DocumentationID *string +} + +// WikiUpdateContract - Wiki update contract details. +type WikiUpdateContract struct { + // Wiki details. + Properties *WikiContractProperties +} + +// WorkspaceCollection - Paged workspace list representation. +type WorkspaceCollection struct { + // Total record count number across all pages. + Count *int64 + + // Next page link if any. + NextLink *string + + // Page values. + Value []*WorkspaceContract +} + +// WorkspaceContract - Workspace details. +type WorkspaceContract struct { + // Workspace entity contract properties. + Properties *WorkspaceContractProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// WorkspaceContractProperties - Workspace entity properties. +type WorkspaceContractProperties struct { + // REQUIRED; Name of the workspace. + DisplayName *string + + // Description of the workspace. + Description *string +} + +type WorkspaceLinksBaseProperties struct { + // The array of linked gateways. + Gateways []*WorkspaceLinksGateway + + // The link to the API Management service workspace. + WorkspaceID *string +} + +type WorkspaceLinksGateway struct { + // The link to the API Management gateway. + ID *string +} + +// WorkspaceLinksListResult - The response of the List API Management WorkspaceLink operation. +type WorkspaceLinksListResult struct { + // REQUIRED; Result of the List API Management WorkspaceLinks operation. + Value []*WorkspaceLinksResource + + // Link to the next set of results. Not empty if Value contains incomplete list of API Management services. + NextLink *string +} + +// WorkspaceLinksProperties - Properties of an API Management workspaceLinks resource. +type WorkspaceLinksProperties struct { + // The array of linked gateways. + Gateways []*WorkspaceLinksGateway + + // The link to the API Management service workspace. + WorkspaceID *string +} + +// WorkspaceLinksResource - A single API Management WorkspaceLinks in List or Get response. +type WorkspaceLinksResource struct { + // REQUIRED; Properties of the API Management WorkspaceLinks. + Properties *WorkspaceLinksProperties + + // READ-ONLY; ETag of the resource. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// X509CertificateName - Properties of server X509Names. +type X509CertificateName struct { + // Thumbprint for the Issuer of the Certificate. + IssuerCertificateThumbprint *string + + // Common Name of the Certificate. + Name *string +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/models_serde.go new file mode 100644 index 00000000..0ad661e3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/models_serde.go @@ -0,0 +1,17927 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type APICollection. +func (a APICollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", a.Count) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APICollection. +func (a *APICollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &a.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIContactInformation. +func (a APIContactInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "email", a.Email) + populate(objectMap, "name", a.Name) + populate(objectMap, "url", a.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIContactInformation. +func (a *APIContactInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "email": + err = unpopulate(val, "Email", &a.Email) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &a.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIContract. +func (a APIContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIContract. +func (a *APIContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIContractProperties. +func (a APIContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiRevision", a.APIRevision) + populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) + populate(objectMap, "type", a.APIType) + populate(objectMap, "apiVersion", a.APIVersion) + populate(objectMap, "apiVersionDescription", a.APIVersionDescription) + populate(objectMap, "apiVersionSet", a.APIVersionSet) + populate(objectMap, "apiVersionSetId", a.APIVersionSetID) + populate(objectMap, "authenticationSettings", a.AuthenticationSettings) + populate(objectMap, "contact", a.Contact) + populate(objectMap, "description", a.Description) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "isCurrent", a.IsCurrent) + populate(objectMap, "isOnline", a.IsOnline) + populate(objectMap, "license", a.License) + populate(objectMap, "path", a.Path) + populate(objectMap, "protocols", a.Protocols) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "serviceUrl", a.ServiceURL) + populate(objectMap, "sourceApiId", a.SourceAPIID) + populate(objectMap, "subscriptionKeyParameterNames", a.SubscriptionKeyParameterNames) + populate(objectMap, "subscriptionRequired", a.SubscriptionRequired) + populate(objectMap, "termsOfServiceUrl", a.TermsOfServiceURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIContractProperties. +func (a *APIContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiRevision": + err = unpopulate(val, "APIRevision", &a.APIRevision) + delete(rawMsg, key) + case "apiRevisionDescription": + err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "APIType", &a.APIType) + delete(rawMsg, key) + case "apiVersion": + err = unpopulate(val, "APIVersion", &a.APIVersion) + delete(rawMsg, key) + case "apiVersionDescription": + err = unpopulate(val, "APIVersionDescription", &a.APIVersionDescription) + delete(rawMsg, key) + case "apiVersionSet": + err = unpopulate(val, "APIVersionSet", &a.APIVersionSet) + delete(rawMsg, key) + case "apiVersionSetId": + err = unpopulate(val, "APIVersionSetID", &a.APIVersionSetID) + delete(rawMsg, key) + case "authenticationSettings": + err = unpopulate(val, "AuthenticationSettings", &a.AuthenticationSettings) + delete(rawMsg, key) + case "contact": + err = unpopulate(val, "Contact", &a.Contact) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "isCurrent": + err = unpopulate(val, "IsCurrent", &a.IsCurrent) + delete(rawMsg, key) + case "isOnline": + err = unpopulate(val, "IsOnline", &a.IsOnline) + delete(rawMsg, key) + case "license": + err = unpopulate(val, "License", &a.License) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &a.Path) + delete(rawMsg, key) + case "protocols": + err = unpopulate(val, "Protocols", &a.Protocols) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "serviceUrl": + err = unpopulate(val, "ServiceURL", &a.ServiceURL) + delete(rawMsg, key) + case "sourceApiId": + err = unpopulate(val, "SourceAPIID", &a.SourceAPIID) + delete(rawMsg, key) + case "subscriptionKeyParameterNames": + err = unpopulate(val, "SubscriptionKeyParameterNames", &a.SubscriptionKeyParameterNames) + delete(rawMsg, key) + case "subscriptionRequired": + err = unpopulate(val, "SubscriptionRequired", &a.SubscriptionRequired) + delete(rawMsg, key) + case "termsOfServiceUrl": + err = unpopulate(val, "TermsOfServiceURL", &a.TermsOfServiceURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIContractUpdateProperties. +func (a APIContractUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiRevision", a.APIRevision) + populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) + populate(objectMap, "type", a.APIType) + populate(objectMap, "apiVersion", a.APIVersion) + populate(objectMap, "apiVersionDescription", a.APIVersionDescription) + populate(objectMap, "apiVersionSetId", a.APIVersionSetID) + populate(objectMap, "authenticationSettings", a.AuthenticationSettings) + populate(objectMap, "contact", a.Contact) + populate(objectMap, "description", a.Description) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "isCurrent", a.IsCurrent) + populate(objectMap, "isOnline", a.IsOnline) + populate(objectMap, "license", a.License) + populate(objectMap, "path", a.Path) + populate(objectMap, "protocols", a.Protocols) + populate(objectMap, "serviceUrl", a.ServiceURL) + populate(objectMap, "subscriptionKeyParameterNames", a.SubscriptionKeyParameterNames) + populate(objectMap, "subscriptionRequired", a.SubscriptionRequired) + populate(objectMap, "termsOfServiceUrl", a.TermsOfServiceURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIContractUpdateProperties. +func (a *APIContractUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiRevision": + err = unpopulate(val, "APIRevision", &a.APIRevision) + delete(rawMsg, key) + case "apiRevisionDescription": + err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "APIType", &a.APIType) + delete(rawMsg, key) + case "apiVersion": + err = unpopulate(val, "APIVersion", &a.APIVersion) + delete(rawMsg, key) + case "apiVersionDescription": + err = unpopulate(val, "APIVersionDescription", &a.APIVersionDescription) + delete(rawMsg, key) + case "apiVersionSetId": + err = unpopulate(val, "APIVersionSetID", &a.APIVersionSetID) + delete(rawMsg, key) + case "authenticationSettings": + err = unpopulate(val, "AuthenticationSettings", &a.AuthenticationSettings) + delete(rawMsg, key) + case "contact": + err = unpopulate(val, "Contact", &a.Contact) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "isCurrent": + err = unpopulate(val, "IsCurrent", &a.IsCurrent) + delete(rawMsg, key) + case "isOnline": + err = unpopulate(val, "IsOnline", &a.IsOnline) + delete(rawMsg, key) + case "license": + err = unpopulate(val, "License", &a.License) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &a.Path) + delete(rawMsg, key) + case "protocols": + err = unpopulate(val, "Protocols", &a.Protocols) + delete(rawMsg, key) + case "serviceUrl": + err = unpopulate(val, "ServiceURL", &a.ServiceURL) + delete(rawMsg, key) + case "subscriptionKeyParameterNames": + err = unpopulate(val, "SubscriptionKeyParameterNames", &a.SubscriptionKeyParameterNames) + delete(rawMsg, key) + case "subscriptionRequired": + err = unpopulate(val, "SubscriptionRequired", &a.SubscriptionRequired) + delete(rawMsg, key) + case "termsOfServiceUrl": + err = unpopulate(val, "TermsOfServiceURL", &a.TermsOfServiceURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APICreateOrUpdateParameter. +func (a APICreateOrUpdateParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APICreateOrUpdateParameter. +func (a *APICreateOrUpdateParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APICreateOrUpdateProperties. +func (a APICreateOrUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiRevision", a.APIRevision) + populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) + populate(objectMap, "type", a.APIType) + populate(objectMap, "apiVersion", a.APIVersion) + populate(objectMap, "apiVersionDescription", a.APIVersionDescription) + populate(objectMap, "apiVersionSet", a.APIVersionSet) + populate(objectMap, "apiVersionSetId", a.APIVersionSetID) + populate(objectMap, "authenticationSettings", a.AuthenticationSettings) + populate(objectMap, "contact", a.Contact) + populate(objectMap, "description", a.Description) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "format", a.Format) + populate(objectMap, "isCurrent", a.IsCurrent) + populate(objectMap, "isOnline", a.IsOnline) + populate(objectMap, "license", a.License) + populate(objectMap, "path", a.Path) + populate(objectMap, "protocols", a.Protocols) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "serviceUrl", a.ServiceURL) + populate(objectMap, "apiType", a.SoapAPIType) + populate(objectMap, "sourceApiId", a.SourceAPIID) + populate(objectMap, "subscriptionKeyParameterNames", a.SubscriptionKeyParameterNames) + populate(objectMap, "subscriptionRequired", a.SubscriptionRequired) + populate(objectMap, "termsOfServiceUrl", a.TermsOfServiceURL) + populate(objectMap, "translateRequiredQueryParameters", a.TranslateRequiredQueryParametersConduct) + populate(objectMap, "value", a.Value) + populate(objectMap, "wsdlSelector", a.WsdlSelector) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APICreateOrUpdateProperties. +func (a *APICreateOrUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiRevision": + err = unpopulate(val, "APIRevision", &a.APIRevision) + delete(rawMsg, key) + case "apiRevisionDescription": + err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "APIType", &a.APIType) + delete(rawMsg, key) + case "apiVersion": + err = unpopulate(val, "APIVersion", &a.APIVersion) + delete(rawMsg, key) + case "apiVersionDescription": + err = unpopulate(val, "APIVersionDescription", &a.APIVersionDescription) + delete(rawMsg, key) + case "apiVersionSet": + err = unpopulate(val, "APIVersionSet", &a.APIVersionSet) + delete(rawMsg, key) + case "apiVersionSetId": + err = unpopulate(val, "APIVersionSetID", &a.APIVersionSetID) + delete(rawMsg, key) + case "authenticationSettings": + err = unpopulate(val, "AuthenticationSettings", &a.AuthenticationSettings) + delete(rawMsg, key) + case "contact": + err = unpopulate(val, "Contact", &a.Contact) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "format": + err = unpopulate(val, "Format", &a.Format) + delete(rawMsg, key) + case "isCurrent": + err = unpopulate(val, "IsCurrent", &a.IsCurrent) + delete(rawMsg, key) + case "isOnline": + err = unpopulate(val, "IsOnline", &a.IsOnline) + delete(rawMsg, key) + case "license": + err = unpopulate(val, "License", &a.License) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &a.Path) + delete(rawMsg, key) + case "protocols": + err = unpopulate(val, "Protocols", &a.Protocols) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "serviceUrl": + err = unpopulate(val, "ServiceURL", &a.ServiceURL) + delete(rawMsg, key) + case "apiType": + err = unpopulate(val, "SoapAPIType", &a.SoapAPIType) + delete(rawMsg, key) + case "sourceApiId": + err = unpopulate(val, "SourceAPIID", &a.SourceAPIID) + delete(rawMsg, key) + case "subscriptionKeyParameterNames": + err = unpopulate(val, "SubscriptionKeyParameterNames", &a.SubscriptionKeyParameterNames) + delete(rawMsg, key) + case "subscriptionRequired": + err = unpopulate(val, "SubscriptionRequired", &a.SubscriptionRequired) + delete(rawMsg, key) + case "termsOfServiceUrl": + err = unpopulate(val, "TermsOfServiceURL", &a.TermsOfServiceURL) + delete(rawMsg, key) + case "translateRequiredQueryParameters": + err = unpopulate(val, "TranslateRequiredQueryParametersConduct", &a.TranslateRequiredQueryParametersConduct) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + case "wsdlSelector": + err = unpopulate(val, "WsdlSelector", &a.WsdlSelector) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APICreateOrUpdatePropertiesWsdlSelector. +func (a APICreateOrUpdatePropertiesWsdlSelector) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "wsdlEndpointName", a.WsdlEndpointName) + populate(objectMap, "wsdlServiceName", a.WsdlServiceName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APICreateOrUpdatePropertiesWsdlSelector. +func (a *APICreateOrUpdatePropertiesWsdlSelector) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "wsdlEndpointName": + err = unpopulate(val, "WsdlEndpointName", &a.WsdlEndpointName) + delete(rawMsg, key) + case "wsdlServiceName": + err = unpopulate(val, "WsdlServiceName", &a.WsdlServiceName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIEntityBaseContract. +func (a APIEntityBaseContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiRevision", a.APIRevision) + populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) + populate(objectMap, "type", a.APIType) + populate(objectMap, "apiVersion", a.APIVersion) + populate(objectMap, "apiVersionDescription", a.APIVersionDescription) + populate(objectMap, "apiVersionSetId", a.APIVersionSetID) + populate(objectMap, "authenticationSettings", a.AuthenticationSettings) + populate(objectMap, "contact", a.Contact) + populate(objectMap, "description", a.Description) + populate(objectMap, "isCurrent", a.IsCurrent) + populate(objectMap, "isOnline", a.IsOnline) + populate(objectMap, "license", a.License) + populate(objectMap, "subscriptionKeyParameterNames", a.SubscriptionKeyParameterNames) + populate(objectMap, "subscriptionRequired", a.SubscriptionRequired) + populate(objectMap, "termsOfServiceUrl", a.TermsOfServiceURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIEntityBaseContract. +func (a *APIEntityBaseContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiRevision": + err = unpopulate(val, "APIRevision", &a.APIRevision) + delete(rawMsg, key) + case "apiRevisionDescription": + err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "APIType", &a.APIType) + delete(rawMsg, key) + case "apiVersion": + err = unpopulate(val, "APIVersion", &a.APIVersion) + delete(rawMsg, key) + case "apiVersionDescription": + err = unpopulate(val, "APIVersionDescription", &a.APIVersionDescription) + delete(rawMsg, key) + case "apiVersionSetId": + err = unpopulate(val, "APIVersionSetID", &a.APIVersionSetID) + delete(rawMsg, key) + case "authenticationSettings": + err = unpopulate(val, "AuthenticationSettings", &a.AuthenticationSettings) + delete(rawMsg, key) + case "contact": + err = unpopulate(val, "Contact", &a.Contact) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "isCurrent": + err = unpopulate(val, "IsCurrent", &a.IsCurrent) + delete(rawMsg, key) + case "isOnline": + err = unpopulate(val, "IsOnline", &a.IsOnline) + delete(rawMsg, key) + case "license": + err = unpopulate(val, "License", &a.License) + delete(rawMsg, key) + case "subscriptionKeyParameterNames": + err = unpopulate(val, "SubscriptionKeyParameterNames", &a.SubscriptionKeyParameterNames) + delete(rawMsg, key) + case "subscriptionRequired": + err = unpopulate(val, "SubscriptionRequired", &a.SubscriptionRequired) + delete(rawMsg, key) + case "termsOfServiceUrl": + err = unpopulate(val, "TermsOfServiceURL", &a.TermsOfServiceURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIExportResult. +func (a APIExportResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "format", a.ExportResultFormat) + populate(objectMap, "id", a.ID) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIExportResult. +func (a *APIExportResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "format": + err = unpopulate(val, "ExportResultFormat", &a.ExportResultFormat) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIExportResultValue. +func (a APIExportResultValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "link", a.Link) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIExportResultValue. +func (a *APIExportResultValue) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "link": + err = unpopulate(val, "Link", &a.Link) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APILicenseInformation. +func (a APILicenseInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", a.Name) + populate(objectMap, "url", a.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APILicenseInformation. +func (a *APILicenseInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &a.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIReleaseCollection. +func (a APIReleaseCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", a.Count) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIReleaseCollection. +func (a *APIReleaseCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &a.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIReleaseContract. +func (a APIReleaseContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIReleaseContract. +func (a *APIReleaseContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIReleaseContractProperties. +func (a APIReleaseContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiId", a.APIID) + populateDateTimeRFC3339(objectMap, "createdDateTime", a.CreatedDateTime) + populate(objectMap, "notes", a.Notes) + populateDateTimeRFC3339(objectMap, "updatedDateTime", a.UpdatedDateTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIReleaseContractProperties. +func (a *APIReleaseContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiId": + err = unpopulate(val, "APIID", &a.APIID) + delete(rawMsg, key) + case "createdDateTime": + err = unpopulateDateTimeRFC3339(val, "CreatedDateTime", &a.CreatedDateTime) + delete(rawMsg, key) + case "notes": + err = unpopulate(val, "Notes", &a.Notes) + delete(rawMsg, key) + case "updatedDateTime": + err = unpopulateDateTimeRFC3339(val, "UpdatedDateTime", &a.UpdatedDateTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIRevisionCollection. +func (a APIRevisionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", a.Count) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIRevisionCollection. +func (a *APIRevisionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &a.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIRevisionContract. +func (a APIRevisionContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiId", a.APIID) + populate(objectMap, "apiRevision", a.APIRevision) + populateDateTimeRFC3339(objectMap, "createdDateTime", a.CreatedDateTime) + populate(objectMap, "description", a.Description) + populate(objectMap, "isCurrent", a.IsCurrent) + populate(objectMap, "isOnline", a.IsOnline) + populate(objectMap, "privateUrl", a.PrivateURL) + populateDateTimeRFC3339(objectMap, "updatedDateTime", a.UpdatedDateTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIRevisionContract. +func (a *APIRevisionContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiId": + err = unpopulate(val, "APIID", &a.APIID) + delete(rawMsg, key) + case "apiRevision": + err = unpopulate(val, "APIRevision", &a.APIRevision) + delete(rawMsg, key) + case "createdDateTime": + err = unpopulateDateTimeRFC3339(val, "CreatedDateTime", &a.CreatedDateTime) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "isCurrent": + err = unpopulate(val, "IsCurrent", &a.IsCurrent) + delete(rawMsg, key) + case "isOnline": + err = unpopulate(val, "IsOnline", &a.IsOnline) + delete(rawMsg, key) + case "privateUrl": + err = unpopulate(val, "PrivateURL", &a.PrivateURL) + delete(rawMsg, key) + case "updatedDateTime": + err = unpopulateDateTimeRFC3339(val, "UpdatedDateTime", &a.UpdatedDateTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIRevisionInfoContract. +func (a APIRevisionInfoContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) + populate(objectMap, "apiVersionName", a.APIVersionName) + populate(objectMap, "apiVersionSet", a.APIVersionSet) + populate(objectMap, "sourceApiId", a.SourceAPIID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIRevisionInfoContract. +func (a *APIRevisionInfoContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiRevisionDescription": + err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) + delete(rawMsg, key) + case "apiVersionName": + err = unpopulate(val, "APIVersionName", &a.APIVersionName) + delete(rawMsg, key) + case "apiVersionSet": + err = unpopulate(val, "APIVersionSet", &a.APIVersionSet) + delete(rawMsg, key) + case "sourceApiId": + err = unpopulate(val, "SourceAPIID", &a.SourceAPIID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APITagResourceContractProperties. +func (a APITagResourceContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiRevision", a.APIRevision) + populate(objectMap, "apiRevisionDescription", a.APIRevisionDescription) + populate(objectMap, "type", a.APIType) + populate(objectMap, "apiVersion", a.APIVersion) + populate(objectMap, "apiVersionDescription", a.APIVersionDescription) + populate(objectMap, "apiVersionSetId", a.APIVersionSetID) + populate(objectMap, "authenticationSettings", a.AuthenticationSettings) + populate(objectMap, "contact", a.Contact) + populate(objectMap, "description", a.Description) + populate(objectMap, "id", a.ID) + populate(objectMap, "isCurrent", a.IsCurrent) + populate(objectMap, "isOnline", a.IsOnline) + populate(objectMap, "license", a.License) + populate(objectMap, "name", a.Name) + populate(objectMap, "path", a.Path) + populate(objectMap, "protocols", a.Protocols) + populate(objectMap, "serviceUrl", a.ServiceURL) + populate(objectMap, "subscriptionKeyParameterNames", a.SubscriptionKeyParameterNames) + populate(objectMap, "subscriptionRequired", a.SubscriptionRequired) + populate(objectMap, "termsOfServiceUrl", a.TermsOfServiceURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APITagResourceContractProperties. +func (a *APITagResourceContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiRevision": + err = unpopulate(val, "APIRevision", &a.APIRevision) + delete(rawMsg, key) + case "apiRevisionDescription": + err = unpopulate(val, "APIRevisionDescription", &a.APIRevisionDescription) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "APIType", &a.APIType) + delete(rawMsg, key) + case "apiVersion": + err = unpopulate(val, "APIVersion", &a.APIVersion) + delete(rawMsg, key) + case "apiVersionDescription": + err = unpopulate(val, "APIVersionDescription", &a.APIVersionDescription) + delete(rawMsg, key) + case "apiVersionSetId": + err = unpopulate(val, "APIVersionSetID", &a.APIVersionSetID) + delete(rawMsg, key) + case "authenticationSettings": + err = unpopulate(val, "AuthenticationSettings", &a.AuthenticationSettings) + delete(rawMsg, key) + case "contact": + err = unpopulate(val, "Contact", &a.Contact) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "isCurrent": + err = unpopulate(val, "IsCurrent", &a.IsCurrent) + delete(rawMsg, key) + case "isOnline": + err = unpopulate(val, "IsOnline", &a.IsOnline) + delete(rawMsg, key) + case "license": + err = unpopulate(val, "License", &a.License) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &a.Path) + delete(rawMsg, key) + case "protocols": + err = unpopulate(val, "Protocols", &a.Protocols) + delete(rawMsg, key) + case "serviceUrl": + err = unpopulate(val, "ServiceURL", &a.ServiceURL) + delete(rawMsg, key) + case "subscriptionKeyParameterNames": + err = unpopulate(val, "SubscriptionKeyParameterNames", &a.SubscriptionKeyParameterNames) + delete(rawMsg, key) + case "subscriptionRequired": + err = unpopulate(val, "SubscriptionRequired", &a.SubscriptionRequired) + delete(rawMsg, key) + case "termsOfServiceUrl": + err = unpopulate(val, "TermsOfServiceURL", &a.TermsOfServiceURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIUpdateContract. +func (a APIUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIUpdateContract. +func (a *APIUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIVersionConstraint. +func (a APIVersionConstraint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "minApiVersion", a.MinAPIVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionConstraint. +func (a *APIVersionConstraint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "minApiVersion": + err = unpopulate(val, "MinAPIVersion", &a.MinAPIVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIVersionSetCollection. +func (a APIVersionSetCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", a.Count) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetCollection. +func (a *APIVersionSetCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &a.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIVersionSetContract. +func (a APIVersionSetContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetContract. +func (a *APIVersionSetContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIVersionSetContractDetails. +func (a APIVersionSetContractDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "versionHeaderName", a.VersionHeaderName) + populate(objectMap, "versionQueryName", a.VersionQueryName) + populate(objectMap, "versioningScheme", a.VersioningScheme) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetContractDetails. +func (a *APIVersionSetContractDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "versionHeaderName": + err = unpopulate(val, "VersionHeaderName", &a.VersionHeaderName) + delete(rawMsg, key) + case "versionQueryName": + err = unpopulate(val, "VersionQueryName", &a.VersionQueryName) + delete(rawMsg, key) + case "versioningScheme": + err = unpopulate(val, "VersioningScheme", &a.VersioningScheme) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIVersionSetContractProperties. +func (a APIVersionSetContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "versionHeaderName", a.VersionHeaderName) + populate(objectMap, "versionQueryName", a.VersionQueryName) + populate(objectMap, "versioningScheme", a.VersioningScheme) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetContractProperties. +func (a *APIVersionSetContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "versionHeaderName": + err = unpopulate(val, "VersionHeaderName", &a.VersionHeaderName) + delete(rawMsg, key) + case "versionQueryName": + err = unpopulate(val, "VersionQueryName", &a.VersionQueryName) + delete(rawMsg, key) + case "versioningScheme": + err = unpopulate(val, "VersioningScheme", &a.VersioningScheme) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIVersionSetEntityBase. +func (a APIVersionSetEntityBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "versionHeaderName", a.VersionHeaderName) + populate(objectMap, "versionQueryName", a.VersionQueryName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetEntityBase. +func (a *APIVersionSetEntityBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "versionHeaderName": + err = unpopulate(val, "VersionHeaderName", &a.VersionHeaderName) + delete(rawMsg, key) + case "versionQueryName": + err = unpopulate(val, "VersionQueryName", &a.VersionQueryName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIVersionSetUpdateParameters. +func (a APIVersionSetUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetUpdateParameters. +func (a *APIVersionSetUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIVersionSetUpdateParametersProperties. +func (a APIVersionSetUpdateParametersProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "versionHeaderName", a.VersionHeaderName) + populate(objectMap, "versionQueryName", a.VersionQueryName) + populate(objectMap, "versioningScheme", a.VersioningScheme) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIVersionSetUpdateParametersProperties. +func (a *APIVersionSetUpdateParametersProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "versionHeaderName": + err = unpopulate(val, "VersionHeaderName", &a.VersionHeaderName) + delete(rawMsg, key) + case "versionQueryName": + err = unpopulate(val, "VersionQueryName", &a.VersionQueryName) + delete(rawMsg, key) + case "versioningScheme": + err = unpopulate(val, "VersioningScheme", &a.VersioningScheme) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccessInformationCollection. +func (a AccessInformationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", a.Count) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationCollection. +func (a *AccessInformationCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &a.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccessInformationContract. +func (a AccessInformationContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationContract. +func (a *AccessInformationContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccessInformationContractProperties. +func (a AccessInformationContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "id", a.ID) + populate(objectMap, "principalId", a.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationContractProperties. +func (a *AccessInformationContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &a.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccessInformationCreateParameterProperties. +func (a AccessInformationCreateParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "primaryKey", a.PrimaryKey) + populate(objectMap, "principalId", a.PrincipalID) + populate(objectMap, "secondaryKey", a.SecondaryKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationCreateParameterProperties. +func (a *AccessInformationCreateParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "primaryKey": + err = unpopulate(val, "PrimaryKey", &a.PrimaryKey) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &a.PrincipalID) + delete(rawMsg, key) + case "secondaryKey": + err = unpopulate(val, "SecondaryKey", &a.SecondaryKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccessInformationCreateParameters. +func (a AccessInformationCreateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationCreateParameters. +func (a *AccessInformationCreateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccessInformationSecretsContract. +func (a AccessInformationSecretsContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "id", a.ID) + populate(objectMap, "primaryKey", a.PrimaryKey) + populate(objectMap, "principalId", a.PrincipalID) + populate(objectMap, "secondaryKey", a.SecondaryKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationSecretsContract. +func (a *AccessInformationSecretsContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "primaryKey": + err = unpopulate(val, "PrimaryKey", &a.PrimaryKey) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &a.PrincipalID) + delete(rawMsg, key) + case "secondaryKey": + err = unpopulate(val, "SecondaryKey", &a.SecondaryKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccessInformationUpdateParameterProperties. +func (a AccessInformationUpdateParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", a.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationUpdateParameterProperties. +func (a *AccessInformationUpdateParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccessInformationUpdateParameters. +func (a AccessInformationUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessInformationUpdateParameters. +func (a *AccessInformationUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdditionalLocation. +func (a AdditionalLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disableGateway", a.DisableGateway) + populate(objectMap, "gatewayRegionalUrl", a.GatewayRegionalURL) + populate(objectMap, "location", a.Location) + populate(objectMap, "natGatewayState", a.NatGatewayState) + populate(objectMap, "outboundPublicIPAddresses", a.OutboundPublicIPAddresses) + populate(objectMap, "platformVersion", a.PlatformVersion) + populate(objectMap, "privateIPAddresses", a.PrivateIPAddresses) + populate(objectMap, "publicIpAddressId", a.PublicIPAddressID) + populate(objectMap, "publicIPAddresses", a.PublicIPAddresses) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "virtualNetworkConfiguration", a.VirtualNetworkConfiguration) + populate(objectMap, "zones", a.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalLocation. +func (a *AdditionalLocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disableGateway": + err = unpopulate(val, "DisableGateway", &a.DisableGateway) + delete(rawMsg, key) + case "gatewayRegionalUrl": + err = unpopulate(val, "GatewayRegionalURL", &a.GatewayRegionalURL) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "natGatewayState": + err = unpopulate(val, "NatGatewayState", &a.NatGatewayState) + delete(rawMsg, key) + case "outboundPublicIPAddresses": + err = unpopulate(val, "OutboundPublicIPAddresses", &a.OutboundPublicIPAddresses) + delete(rawMsg, key) + case "platformVersion": + err = unpopulate(val, "PlatformVersion", &a.PlatformVersion) + delete(rawMsg, key) + case "privateIPAddresses": + err = unpopulate(val, "PrivateIPAddresses", &a.PrivateIPAddresses) + delete(rawMsg, key) + case "publicIpAddressId": + err = unpopulate(val, "PublicIPAddressID", &a.PublicIPAddressID) + delete(rawMsg, key) + case "publicIPAddresses": + err = unpopulate(val, "PublicIPAddresses", &a.PublicIPAddresses) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + case "virtualNetworkConfiguration": + err = unpopulate(val, "VirtualNetworkConfiguration", &a.VirtualNetworkConfiguration) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &a.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AllPoliciesCollection. +func (a AllPoliciesCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllPoliciesCollection. +func (a *AllPoliciesCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AllPoliciesContract. +func (a AllPoliciesContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllPoliciesContract. +func (a *AllPoliciesContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AllPoliciesContractProperties. +func (a AllPoliciesContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "complianceState", a.ComplianceState) + populate(objectMap, "referencePolicyId", a.ReferencePolicyID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllPoliciesContractProperties. +func (a *AllPoliciesContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "complianceState": + err = unpopulate(val, "ComplianceState", &a.ComplianceState) + delete(rawMsg, key) + case "referencePolicyId": + err = unpopulate(val, "ReferencePolicyID", &a.ReferencePolicyID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApimResource. +func (a ApimResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApimResource. +func (a *ApimResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ArmIDWrapper. +func (a ArmIDWrapper) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ArmIDWrapper. +func (a *ArmIDWrapper) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AssociationContract. +func (a AssociationContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AssociationContract. +func (a *AssociationContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AssociationContractProperties. +func (a AssociationContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["provisioningState"] = "created" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AssociationContractProperties. +func (a *AssociationContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthenticationSettingsContract. +func (a AuthenticationSettingsContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "oAuth2", a.OAuth2) + populate(objectMap, "oAuth2AuthenticationSettings", a.OAuth2AuthenticationSettings) + populate(objectMap, "openid", a.Openid) + populate(objectMap, "openidAuthenticationSettings", a.OpenidAuthenticationSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthenticationSettingsContract. +func (a *AuthenticationSettingsContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "oAuth2": + err = unpopulate(val, "OAuth2", &a.OAuth2) + delete(rawMsg, key) + case "oAuth2AuthenticationSettings": + err = unpopulate(val, "OAuth2AuthenticationSettings", &a.OAuth2AuthenticationSettings) + delete(rawMsg, key) + case "openid": + err = unpopulate(val, "Openid", &a.Openid) + delete(rawMsg, key) + case "openidAuthenticationSettings": + err = unpopulate(val, "OpenidAuthenticationSettings", &a.OpenidAuthenticationSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationAccessPolicyCollection. +func (a AuthorizationAccessPolicyCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", a.Count) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationAccessPolicyCollection. +func (a *AuthorizationAccessPolicyCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &a.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationAccessPolicyContract. +func (a AuthorizationAccessPolicyContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationAccessPolicyContract. +func (a *AuthorizationAccessPolicyContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationAccessPolicyContractProperties. +func (a AuthorizationAccessPolicyContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appIds", a.AppIDs) + populate(objectMap, "objectId", a.ObjectID) + populate(objectMap, "tenantId", a.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationAccessPolicyContractProperties. +func (a *AuthorizationAccessPolicyContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appIds": + err = unpopulate(val, "AppIDs", &a.AppIDs) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &a.ObjectID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &a.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationCollection. +func (a AuthorizationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", a.Count) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationCollection. +func (a *AuthorizationCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &a.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationConfirmConsentCodeRequestContract. +func (a AuthorizationConfirmConsentCodeRequestContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "consentCode", a.ConsentCode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationConfirmConsentCodeRequestContract. +func (a *AuthorizationConfirmConsentCodeRequestContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "consentCode": + err = unpopulate(val, "ConsentCode", &a.ConsentCode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationContract. +func (a AuthorizationContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationContract. +func (a *AuthorizationContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationContractProperties. +func (a AuthorizationContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationType", a.AuthorizationType) + populate(objectMap, "error", a.Error) + populate(objectMap, "oauth2grantType", a.OAuth2GrantType) + populate(objectMap, "parameters", a.Parameters) + populate(objectMap, "status", a.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationContractProperties. +func (a *AuthorizationContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationType": + err = unpopulate(val, "AuthorizationType", &a.AuthorizationType) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &a.Error) + delete(rawMsg, key) + case "oauth2grantType": + err = unpopulate(val, "OAuth2GrantType", &a.OAuth2GrantType) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &a.Parameters) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationError. +func (a AuthorizationError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", a.Code) + populate(objectMap, "message", a.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationError. +func (a *AuthorizationError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &a.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &a.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationLoginRequestContract. +func (a AuthorizationLoginRequestContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "postLoginRedirectUrl", a.PostLoginRedirectURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationLoginRequestContract. +func (a *AuthorizationLoginRequestContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "postLoginRedirectUrl": + err = unpopulate(val, "PostLoginRedirectURL", &a.PostLoginRedirectURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationLoginResponseContract. +func (a AuthorizationLoginResponseContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "loginLink", a.LoginLink) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationLoginResponseContract. +func (a *AuthorizationLoginResponseContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "loginLink": + err = unpopulate(val, "LoginLink", &a.LoginLink) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationProviderCollection. +func (a AuthorizationProviderCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProviderCollection. +func (a *AuthorizationProviderCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationProviderContract. +func (a AuthorizationProviderContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProviderContract. +func (a *AuthorizationProviderContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationProviderContractProperties. +func (a AuthorizationProviderContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "identityProvider", a.IdentityProvider) + populate(objectMap, "oauth2", a.Oauth2) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProviderContractProperties. +func (a *AuthorizationProviderContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "identityProvider": + err = unpopulate(val, "IdentityProvider", &a.IdentityProvider) + delete(rawMsg, key) + case "oauth2": + err = unpopulate(val, "Oauth2", &a.Oauth2) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationProviderOAuth2GrantTypes. +func (a AuthorizationProviderOAuth2GrantTypes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationCode", a.AuthorizationCode) + populate(objectMap, "clientCredentials", a.ClientCredentials) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProviderOAuth2GrantTypes. +func (a *AuthorizationProviderOAuth2GrantTypes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationCode": + err = unpopulate(val, "AuthorizationCode", &a.AuthorizationCode) + delete(rawMsg, key) + case "clientCredentials": + err = unpopulate(val, "ClientCredentials", &a.ClientCredentials) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationProviderOAuth2Settings. +func (a AuthorizationProviderOAuth2Settings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "grantTypes", a.GrantTypes) + populate(objectMap, "redirectUrl", a.RedirectURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationProviderOAuth2Settings. +func (a *AuthorizationProviderOAuth2Settings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "grantTypes": + err = unpopulate(val, "GrantTypes", &a.GrantTypes) + delete(rawMsg, key) + case "redirectUrl": + err = unpopulate(val, "RedirectURL", &a.RedirectURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerCollection. +func (a AuthorizationServerCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", a.Count) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerCollection. +func (a *AuthorizationServerCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &a.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerContract. +func (a AuthorizationServerContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerContract. +func (a *AuthorizationServerContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerContractBaseProperties. +func (a AuthorizationServerContractBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationMethods", a.AuthorizationMethods) + populate(objectMap, "bearerTokenSendingMethods", a.BearerTokenSendingMethods) + populate(objectMap, "clientAuthenticationMethod", a.ClientAuthenticationMethod) + populate(objectMap, "defaultScope", a.DefaultScope) + populate(objectMap, "description", a.Description) + populate(objectMap, "resourceOwnerPassword", a.ResourceOwnerPassword) + populate(objectMap, "resourceOwnerUsername", a.ResourceOwnerUsername) + populate(objectMap, "supportState", a.SupportState) + populate(objectMap, "tokenBodyParameters", a.TokenBodyParameters) + populate(objectMap, "tokenEndpoint", a.TokenEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerContractBaseProperties. +func (a *AuthorizationServerContractBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationMethods": + err = unpopulate(val, "AuthorizationMethods", &a.AuthorizationMethods) + delete(rawMsg, key) + case "bearerTokenSendingMethods": + err = unpopulate(val, "BearerTokenSendingMethods", &a.BearerTokenSendingMethods) + delete(rawMsg, key) + case "clientAuthenticationMethod": + err = unpopulate(val, "ClientAuthenticationMethod", &a.ClientAuthenticationMethod) + delete(rawMsg, key) + case "defaultScope": + err = unpopulate(val, "DefaultScope", &a.DefaultScope) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "resourceOwnerPassword": + err = unpopulate(val, "ResourceOwnerPassword", &a.ResourceOwnerPassword) + delete(rawMsg, key) + case "resourceOwnerUsername": + err = unpopulate(val, "ResourceOwnerUsername", &a.ResourceOwnerUsername) + delete(rawMsg, key) + case "supportState": + err = unpopulate(val, "SupportState", &a.SupportState) + delete(rawMsg, key) + case "tokenBodyParameters": + err = unpopulate(val, "TokenBodyParameters", &a.TokenBodyParameters) + delete(rawMsg, key) + case "tokenEndpoint": + err = unpopulate(val, "TokenEndpoint", &a.TokenEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerContractProperties. +func (a AuthorizationServerContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationEndpoint", a.AuthorizationEndpoint) + populate(objectMap, "authorizationMethods", a.AuthorizationMethods) + populate(objectMap, "bearerTokenSendingMethods", a.BearerTokenSendingMethods) + populate(objectMap, "clientAuthenticationMethod", a.ClientAuthenticationMethod) + populate(objectMap, "clientId", a.ClientID) + populate(objectMap, "clientRegistrationEndpoint", a.ClientRegistrationEndpoint) + populate(objectMap, "clientSecret", a.ClientSecret) + populate(objectMap, "defaultScope", a.DefaultScope) + populate(objectMap, "description", a.Description) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "grantTypes", a.GrantTypes) + populate(objectMap, "resourceOwnerPassword", a.ResourceOwnerPassword) + populate(objectMap, "resourceOwnerUsername", a.ResourceOwnerUsername) + populate(objectMap, "supportState", a.SupportState) + populate(objectMap, "tokenBodyParameters", a.TokenBodyParameters) + populate(objectMap, "tokenEndpoint", a.TokenEndpoint) + populate(objectMap, "useInApiDocumentation", a.UseInAPIDocumentation) + populate(objectMap, "useInTestConsole", a.UseInTestConsole) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerContractProperties. +func (a *AuthorizationServerContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationEndpoint": + err = unpopulate(val, "AuthorizationEndpoint", &a.AuthorizationEndpoint) + delete(rawMsg, key) + case "authorizationMethods": + err = unpopulate(val, "AuthorizationMethods", &a.AuthorizationMethods) + delete(rawMsg, key) + case "bearerTokenSendingMethods": + err = unpopulate(val, "BearerTokenSendingMethods", &a.BearerTokenSendingMethods) + delete(rawMsg, key) + case "clientAuthenticationMethod": + err = unpopulate(val, "ClientAuthenticationMethod", &a.ClientAuthenticationMethod) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &a.ClientID) + delete(rawMsg, key) + case "clientRegistrationEndpoint": + err = unpopulate(val, "ClientRegistrationEndpoint", &a.ClientRegistrationEndpoint) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &a.ClientSecret) + delete(rawMsg, key) + case "defaultScope": + err = unpopulate(val, "DefaultScope", &a.DefaultScope) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "grantTypes": + err = unpopulate(val, "GrantTypes", &a.GrantTypes) + delete(rawMsg, key) + case "resourceOwnerPassword": + err = unpopulate(val, "ResourceOwnerPassword", &a.ResourceOwnerPassword) + delete(rawMsg, key) + case "resourceOwnerUsername": + err = unpopulate(val, "ResourceOwnerUsername", &a.ResourceOwnerUsername) + delete(rawMsg, key) + case "supportState": + err = unpopulate(val, "SupportState", &a.SupportState) + delete(rawMsg, key) + case "tokenBodyParameters": + err = unpopulate(val, "TokenBodyParameters", &a.TokenBodyParameters) + delete(rawMsg, key) + case "tokenEndpoint": + err = unpopulate(val, "TokenEndpoint", &a.TokenEndpoint) + delete(rawMsg, key) + case "useInApiDocumentation": + err = unpopulate(val, "UseInAPIDocumentation", &a.UseInAPIDocumentation) + delete(rawMsg, key) + case "useInTestConsole": + err = unpopulate(val, "UseInTestConsole", &a.UseInTestConsole) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerSecretsContract. +func (a AuthorizationServerSecretsContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientSecret", a.ClientSecret) + populate(objectMap, "resourceOwnerPassword", a.ResourceOwnerPassword) + populate(objectMap, "resourceOwnerUsername", a.ResourceOwnerUsername) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerSecretsContract. +func (a *AuthorizationServerSecretsContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientSecret": + err = unpopulate(val, "ClientSecret", &a.ClientSecret) + delete(rawMsg, key) + case "resourceOwnerPassword": + err = unpopulate(val, "ResourceOwnerPassword", &a.ResourceOwnerPassword) + delete(rawMsg, key) + case "resourceOwnerUsername": + err = unpopulate(val, "ResourceOwnerUsername", &a.ResourceOwnerUsername) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerUpdateContract. +func (a AuthorizationServerUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerUpdateContract. +func (a *AuthorizationServerUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationServerUpdateContractProperties. +func (a AuthorizationServerUpdateContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationEndpoint", a.AuthorizationEndpoint) + populate(objectMap, "authorizationMethods", a.AuthorizationMethods) + populate(objectMap, "bearerTokenSendingMethods", a.BearerTokenSendingMethods) + populate(objectMap, "clientAuthenticationMethod", a.ClientAuthenticationMethod) + populate(objectMap, "clientId", a.ClientID) + populate(objectMap, "clientRegistrationEndpoint", a.ClientRegistrationEndpoint) + populate(objectMap, "clientSecret", a.ClientSecret) + populate(objectMap, "defaultScope", a.DefaultScope) + populate(objectMap, "description", a.Description) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "grantTypes", a.GrantTypes) + populate(objectMap, "resourceOwnerPassword", a.ResourceOwnerPassword) + populate(objectMap, "resourceOwnerUsername", a.ResourceOwnerUsername) + populate(objectMap, "supportState", a.SupportState) + populate(objectMap, "tokenBodyParameters", a.TokenBodyParameters) + populate(objectMap, "tokenEndpoint", a.TokenEndpoint) + populate(objectMap, "useInApiDocumentation", a.UseInAPIDocumentation) + populate(objectMap, "useInTestConsole", a.UseInTestConsole) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationServerUpdateContractProperties. +func (a *AuthorizationServerUpdateContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationEndpoint": + err = unpopulate(val, "AuthorizationEndpoint", &a.AuthorizationEndpoint) + delete(rawMsg, key) + case "authorizationMethods": + err = unpopulate(val, "AuthorizationMethods", &a.AuthorizationMethods) + delete(rawMsg, key) + case "bearerTokenSendingMethods": + err = unpopulate(val, "BearerTokenSendingMethods", &a.BearerTokenSendingMethods) + delete(rawMsg, key) + case "clientAuthenticationMethod": + err = unpopulate(val, "ClientAuthenticationMethod", &a.ClientAuthenticationMethod) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &a.ClientID) + delete(rawMsg, key) + case "clientRegistrationEndpoint": + err = unpopulate(val, "ClientRegistrationEndpoint", &a.ClientRegistrationEndpoint) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &a.ClientSecret) + delete(rawMsg, key) + case "defaultScope": + err = unpopulate(val, "DefaultScope", &a.DefaultScope) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "grantTypes": + err = unpopulate(val, "GrantTypes", &a.GrantTypes) + delete(rawMsg, key) + case "resourceOwnerPassword": + err = unpopulate(val, "ResourceOwnerPassword", &a.ResourceOwnerPassword) + delete(rawMsg, key) + case "resourceOwnerUsername": + err = unpopulate(val, "ResourceOwnerUsername", &a.ResourceOwnerUsername) + delete(rawMsg, key) + case "supportState": + err = unpopulate(val, "SupportState", &a.SupportState) + delete(rawMsg, key) + case "tokenBodyParameters": + err = unpopulate(val, "TokenBodyParameters", &a.TokenBodyParameters) + delete(rawMsg, key) + case "tokenEndpoint": + err = unpopulate(val, "TokenEndpoint", &a.TokenEndpoint) + delete(rawMsg, key) + case "useInApiDocumentation": + err = unpopulate(val, "UseInAPIDocumentation", &a.UseInAPIDocumentation) + delete(rawMsg, key) + case "useInTestConsole": + err = unpopulate(val, "UseInTestConsole", &a.UseInTestConsole) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendAuthorizationHeaderCredentials. +func (b BackendAuthorizationHeaderCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "parameter", b.Parameter) + populate(objectMap, "scheme", b.Scheme) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendAuthorizationHeaderCredentials. +func (b *BackendAuthorizationHeaderCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "parameter": + err = unpopulate(val, "Parameter", &b.Parameter) + delete(rawMsg, key) + case "scheme": + err = unpopulate(val, "Scheme", &b.Scheme) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendBaseParameters. +func (b BackendBaseParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "circuitBreaker", b.CircuitBreaker) + populate(objectMap, "credentials", b.Credentials) + populate(objectMap, "description", b.Description) + populate(objectMap, "pool", b.Pool) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "proxy", b.Proxy) + populate(objectMap, "resourceId", b.ResourceID) + populate(objectMap, "tls", b.TLS) + populate(objectMap, "title", b.Title) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendBaseParameters. +func (b *BackendBaseParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "circuitBreaker": + err = unpopulate(val, "CircuitBreaker", &b.CircuitBreaker) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &b.Credentials) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &b.Description) + delete(rawMsg, key) + case "pool": + err = unpopulate(val, "Pool", &b.Pool) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "proxy": + err = unpopulate(val, "Proxy", &b.Proxy) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &b.ResourceID) + delete(rawMsg, key) + case "tls": + err = unpopulate(val, "TLS", &b.TLS) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &b.Title) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendBaseParametersPool. +func (b BackendBaseParametersPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "services", b.Services) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendBaseParametersPool. +func (b *BackendBaseParametersPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "services": + err = unpopulate(val, "Services", &b.Services) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendCircuitBreaker. +func (b BackendCircuitBreaker) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rules", b.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendCircuitBreaker. +func (b *BackendCircuitBreaker) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rules": + err = unpopulate(val, "Rules", &b.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendCollection. +func (b BackendCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", b.Count) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendCollection. +func (b *BackendCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &b.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendConfiguration. +func (b BackendConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "subnet", b.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendConfiguration. +func (b *BackendConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "subnet": + err = unpopulate(val, "Subnet", &b.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendContract. +func (b BackendContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendContract. +func (b *BackendContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendContractProperties. +func (b BackendContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "circuitBreaker", b.CircuitBreaker) + populate(objectMap, "credentials", b.Credentials) + populate(objectMap, "description", b.Description) + populate(objectMap, "pool", b.Pool) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "protocol", b.Protocol) + populate(objectMap, "proxy", b.Proxy) + populate(objectMap, "resourceId", b.ResourceID) + populate(objectMap, "tls", b.TLS) + populate(objectMap, "title", b.Title) + populate(objectMap, "type", b.Type) + populate(objectMap, "url", b.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendContractProperties. +func (b *BackendContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "circuitBreaker": + err = unpopulate(val, "CircuitBreaker", &b.CircuitBreaker) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &b.Credentials) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &b.Description) + delete(rawMsg, key) + case "pool": + err = unpopulate(val, "Pool", &b.Pool) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &b.Protocol) + delete(rawMsg, key) + case "proxy": + err = unpopulate(val, "Proxy", &b.Proxy) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &b.ResourceID) + delete(rawMsg, key) + case "tls": + err = unpopulate(val, "TLS", &b.TLS) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &b.Title) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &b.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendCredentialsContract. +func (b BackendCredentialsContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorization", b.Authorization) + populate(objectMap, "certificate", b.Certificate) + populate(objectMap, "certificateIds", b.CertificateIDs) + populate(objectMap, "header", b.Header) + populate(objectMap, "query", b.Query) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendCredentialsContract. +func (b *BackendCredentialsContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorization": + err = unpopulate(val, "Authorization", &b.Authorization) + delete(rawMsg, key) + case "certificate": + err = unpopulate(val, "Certificate", &b.Certificate) + delete(rawMsg, key) + case "certificateIds": + err = unpopulate(val, "CertificateIDs", &b.CertificateIDs) + delete(rawMsg, key) + case "header": + err = unpopulate(val, "Header", &b.Header) + delete(rawMsg, key) + case "query": + err = unpopulate(val, "Query", &b.Query) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendPool. +func (b BackendPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "services", b.Services) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendPool. +func (b *BackendPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "services": + err = unpopulate(val, "Services", &b.Services) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendPoolItem. +func (b BackendPoolItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "priority", b.Priority) + populate(objectMap, "weight", b.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendPoolItem. +func (b *BackendPoolItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &b.Priority) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &b.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendProperties. +func (b BackendProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceFabricCluster", b.ServiceFabricCluster) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendProperties. +func (b *BackendProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceFabricCluster": + err = unpopulate(val, "ServiceFabricCluster", &b.ServiceFabricCluster) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendProxyContract. +func (b BackendProxyContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "password", b.Password) + populate(objectMap, "url", b.URL) + populate(objectMap, "username", b.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendProxyContract. +func (b *BackendProxyContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "password": + err = unpopulate(val, "Password", &b.Password) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &b.URL) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &b.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendReconnectContract. +func (b BackendReconnectContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendReconnectContract. +func (b *BackendReconnectContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendReconnectProperties. +func (b BackendReconnectProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "after", b.After) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendReconnectProperties. +func (b *BackendReconnectProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "after": + err = unpopulate(val, "After", &b.After) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendServiceFabricClusterProperties. +func (b BackendServiceFabricClusterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientCertificateId", b.ClientCertificateID) + populate(objectMap, "clientCertificatethumbprint", b.ClientCertificatethumbprint) + populate(objectMap, "managementEndpoints", b.ManagementEndpoints) + populate(objectMap, "maxPartitionResolutionRetries", b.MaxPartitionResolutionRetries) + populate(objectMap, "serverCertificateThumbprints", b.ServerCertificateThumbprints) + populate(objectMap, "serverX509Names", b.ServerX509Names) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendServiceFabricClusterProperties. +func (b *BackendServiceFabricClusterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientCertificateId": + err = unpopulate(val, "ClientCertificateID", &b.ClientCertificateID) + delete(rawMsg, key) + case "clientCertificatethumbprint": + err = unpopulate(val, "ClientCertificatethumbprint", &b.ClientCertificatethumbprint) + delete(rawMsg, key) + case "managementEndpoints": + err = unpopulate(val, "ManagementEndpoints", &b.ManagementEndpoints) + delete(rawMsg, key) + case "maxPartitionResolutionRetries": + err = unpopulate(val, "MaxPartitionResolutionRetries", &b.MaxPartitionResolutionRetries) + delete(rawMsg, key) + case "serverCertificateThumbprints": + err = unpopulate(val, "ServerCertificateThumbprints", &b.ServerCertificateThumbprints) + delete(rawMsg, key) + case "serverX509Names": + err = unpopulate(val, "ServerX509Names", &b.ServerX509Names) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendSubnetConfiguration. +func (b BackendSubnetConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendSubnetConfiguration. +func (b *BackendSubnetConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendTLSProperties. +func (b BackendTLSProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "validateCertificateChain", b.ValidateCertificateChain) + populate(objectMap, "validateCertificateName", b.ValidateCertificateName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendTLSProperties. +func (b *BackendTLSProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "validateCertificateChain": + err = unpopulate(val, "ValidateCertificateChain", &b.ValidateCertificateChain) + delete(rawMsg, key) + case "validateCertificateName": + err = unpopulate(val, "ValidateCertificateName", &b.ValidateCertificateName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendUpdateParameterProperties. +func (b BackendUpdateParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "circuitBreaker", b.CircuitBreaker) + populate(objectMap, "credentials", b.Credentials) + populate(objectMap, "description", b.Description) + populate(objectMap, "pool", b.Pool) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "protocol", b.Protocol) + populate(objectMap, "proxy", b.Proxy) + populate(objectMap, "resourceId", b.ResourceID) + populate(objectMap, "tls", b.TLS) + populate(objectMap, "title", b.Title) + populate(objectMap, "type", b.Type) + populate(objectMap, "url", b.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendUpdateParameterProperties. +func (b *BackendUpdateParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "circuitBreaker": + err = unpopulate(val, "CircuitBreaker", &b.CircuitBreaker) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &b.Credentials) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &b.Description) + delete(rawMsg, key) + case "pool": + err = unpopulate(val, "Pool", &b.Pool) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &b.Protocol) + delete(rawMsg, key) + case "proxy": + err = unpopulate(val, "Proxy", &b.Proxy) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &b.ResourceID) + delete(rawMsg, key) + case "tls": + err = unpopulate(val, "TLS", &b.TLS) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &b.Title) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &b.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendUpdateParameters. +func (b BackendUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", b.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendUpdateParameters. +func (b *BackendUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BodyDiagnosticSettings. +func (b BodyDiagnosticSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bytes", b.Bytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BodyDiagnosticSettings. +func (b *BodyDiagnosticSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bytes": + err = unpopulate(val, "Bytes", &b.Bytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheCollection. +func (c CacheCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", c.Count) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheCollection. +func (c *CacheCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &c.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheContract. +func (c CacheContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheContract. +func (c *CacheContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheContractProperties. +func (c CacheContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionString", c.ConnectionString) + populate(objectMap, "description", c.Description) + populate(objectMap, "resourceId", c.ResourceID) + populate(objectMap, "useFromLocation", c.UseFromLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheContractProperties. +func (c *CacheContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionString": + err = unpopulate(val, "ConnectionString", &c.ConnectionString) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + case "useFromLocation": + err = unpopulate(val, "UseFromLocation", &c.UseFromLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheUpdateParameters. +func (c CacheUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpdateParameters. +func (c *CacheUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheUpdateProperties. +func (c CacheUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionString", c.ConnectionString) + populate(objectMap, "description", c.Description) + populate(objectMap, "resourceId", c.ResourceID) + populate(objectMap, "useFromLocation", c.UseFromLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpdateProperties. +func (c *CacheUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionString": + err = unpopulate(val, "ConnectionString", &c.ConnectionString) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + case "useFromLocation": + err = unpopulate(val, "UseFromLocation", &c.UseFromLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateCollection. +func (c CertificateCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", c.Count) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCollection. +func (c *CertificateCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &c.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateConfiguration. +func (c CertificateConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificate", c.Certificate) + populate(objectMap, "certificatePassword", c.CertificatePassword) + populate(objectMap, "encodedCertificate", c.EncodedCertificate) + populate(objectMap, "storeName", c.StoreName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateConfiguration. +func (c *CertificateConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificate": + err = unpopulate(val, "Certificate", &c.Certificate) + delete(rawMsg, key) + case "certificatePassword": + err = unpopulate(val, "CertificatePassword", &c.CertificatePassword) + delete(rawMsg, key) + case "encodedCertificate": + err = unpopulate(val, "EncodedCertificate", &c.EncodedCertificate) + delete(rawMsg, key) + case "storeName": + err = unpopulate(val, "StoreName", &c.StoreName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateContract. +func (c CertificateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateContract. +func (c *CertificateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateContractProperties. +func (c CertificateContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expirationDate", c.ExpirationDate) + populate(objectMap, "keyVault", c.KeyVault) + populate(objectMap, "subject", c.Subject) + populate(objectMap, "thumbprint", c.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateContractProperties. +func (c *CertificateContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expirationDate": + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &c.ExpirationDate) + delete(rawMsg, key) + case "keyVault": + err = unpopulate(val, "KeyVault", &c.KeyVault) + delete(rawMsg, key) + case "subject": + err = unpopulate(val, "Subject", &c.Subject) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateCreateOrUpdateParameters. +func (c CertificateCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCreateOrUpdateParameters. +func (c *CertificateCreateOrUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateCreateOrUpdateProperties. +func (c CertificateCreateOrUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", c.Data) + populate(objectMap, "keyVault", c.KeyVault) + populate(objectMap, "password", c.Password) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCreateOrUpdateProperties. +func (c *CertificateCreateOrUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &c.Data) + delete(rawMsg, key) + case "keyVault": + err = unpopulate(val, "KeyVault", &c.KeyVault) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &c.Password) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateInformation. +func (c CertificateInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expiry", c.Expiry) + populate(objectMap, "subject", c.Subject) + populate(objectMap, "thumbprint", c.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateInformation. +func (c *CertificateInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiry": + err = unpopulateDateTimeRFC3339(val, "Expiry", &c.Expiry) + delete(rawMsg, key) + case "subject": + err = unpopulate(val, "Subject", &c.Subject) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CircuitBreakerFailureCondition. +func (c CircuitBreakerFailureCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", c.Count) + populate(objectMap, "errorReasons", c.ErrorReasons) + populate(objectMap, "interval", c.Interval) + populate(objectMap, "percentage", c.Percentage) + populate(objectMap, "statusCodeRanges", c.StatusCodeRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CircuitBreakerFailureCondition. +func (c *CircuitBreakerFailureCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &c.Count) + delete(rawMsg, key) + case "errorReasons": + err = unpopulate(val, "ErrorReasons", &c.ErrorReasons) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &c.Interval) + delete(rawMsg, key) + case "percentage": + err = unpopulate(val, "Percentage", &c.Percentage) + delete(rawMsg, key) + case "statusCodeRanges": + err = unpopulate(val, "StatusCodeRanges", &c.StatusCodeRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CircuitBreakerRule. +func (c CircuitBreakerRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "acceptRetryAfter", c.AcceptRetryAfter) + populate(objectMap, "failureCondition", c.FailureCondition) + populate(objectMap, "name", c.Name) + populate(objectMap, "tripDuration", c.TripDuration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CircuitBreakerRule. +func (c *CircuitBreakerRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acceptRetryAfter": + err = unpopulate(val, "AcceptRetryAfter", &c.AcceptRetryAfter) + delete(rawMsg, key) + case "failureCondition": + err = unpopulate(val, "FailureCondition", &c.FailureCondition) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "tripDuration": + err = unpopulate(val, "TripDuration", &c.TripDuration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientSecretContract. +func (c ClientSecretContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientSecret", c.ClientSecret) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientSecretContract. +func (c *ClientSecretContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientSecret": + err = unpopulate(val, "ClientSecret", &c.ClientSecret) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationAPI. +func (c ConfigurationAPI) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "legacyApi", c.LegacyAPI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationAPI. +func (c *ConfigurationAPI) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "legacyApi": + err = unpopulate(val, "LegacyAPI", &c.LegacyAPI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequest. +func (c ConnectivityCheckRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destination", c.Destination) + populate(objectMap, "preferredIPVersion", c.PreferredIPVersion) + populate(objectMap, "protocol", c.Protocol) + populate(objectMap, "protocolConfiguration", c.ProtocolConfiguration) + populate(objectMap, "source", c.Source) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequest. +func (c *ConnectivityCheckRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destination": + err = unpopulate(val, "Destination", &c.Destination) + delete(rawMsg, key) + case "preferredIPVersion": + err = unpopulate(val, "PreferredIPVersion", &c.PreferredIPVersion) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &c.Protocol) + delete(rawMsg, key) + case "protocolConfiguration": + err = unpopulate(val, "ProtocolConfiguration", &c.ProtocolConfiguration) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &c.Source) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestDestination. +func (c ConnectivityCheckRequestDestination) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", c.Address) + populate(objectMap, "port", c.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestDestination. +func (c *ConnectivityCheckRequestDestination) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &c.Address) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &c.Port) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestProtocolConfiguration. +func (c ConnectivityCheckRequestProtocolConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "HTTPConfiguration", c.HTTPConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestProtocolConfiguration. +func (c *ConnectivityCheckRequestProtocolConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "HTTPConfiguration": + err = unpopulate(val, "HTTPConfiguration", &c.HTTPConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration. +func (c ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "headers", c.Headers) + populate(objectMap, "method", c.Method) + populate(objectMap, "validStatusCodes", c.ValidStatusCodes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration. +func (c *ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "headers": + err = unpopulate(val, "Headers", &c.Headers) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &c.Method) + delete(rawMsg, key) + case "validStatusCodes": + err = unpopulate(val, "ValidStatusCodes", &c.ValidStatusCodes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckRequestSource. +func (c ConnectivityCheckRequestSource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instance", c.Instance) + populate(objectMap, "region", c.Region) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckRequestSource. +func (c *ConnectivityCheckRequestSource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instance": + err = unpopulate(val, "Instance", &c.Instance) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &c.Region) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityCheckResponse. +func (c ConnectivityCheckResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) + populate(objectMap, "connectionStatus", c.ConnectionStatus) + populate(objectMap, "hops", c.Hops) + populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) + populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) + populate(objectMap, "probesFailed", c.ProbesFailed) + populate(objectMap, "probesSent", c.ProbesSent) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCheckResponse. +func (c *ConnectivityCheckResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "avgLatencyInMs": + err = unpopulate(val, "AvgLatencyInMs", &c.AvgLatencyInMs) + delete(rawMsg, key) + case "connectionStatus": + err = unpopulate(val, "ConnectionStatus", &c.ConnectionStatus) + delete(rawMsg, key) + case "hops": + err = unpopulate(val, "Hops", &c.Hops) + delete(rawMsg, key) + case "maxLatencyInMs": + err = unpopulate(val, "MaxLatencyInMs", &c.MaxLatencyInMs) + delete(rawMsg, key) + case "minLatencyInMs": + err = unpopulate(val, "MinLatencyInMs", &c.MinLatencyInMs) + delete(rawMsg, key) + case "probesFailed": + err = unpopulate(val, "ProbesFailed", &c.ProbesFailed) + delete(rawMsg, key) + case "probesSent": + err = unpopulate(val, "ProbesSent", &c.ProbesSent) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityHop. +func (c ConnectivityHop) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", c.Address) + populate(objectMap, "id", c.ID) + populate(objectMap, "issues", c.Issues) + populate(objectMap, "nextHopIds", c.NextHopIDs) + populate(objectMap, "resourceId", c.ResourceID) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityHop. +func (c *ConnectivityHop) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &c.Address) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "issues": + err = unpopulate(val, "Issues", &c.Issues) + delete(rawMsg, key) + case "nextHopIds": + err = unpopulate(val, "NextHopIDs", &c.NextHopIDs) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityIssue. +func (c ConnectivityIssue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "context", c.Context) + populate(objectMap, "origin", c.Origin) + populate(objectMap, "severity", c.Severity) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityIssue. +func (c *ConnectivityIssue) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "context": + err = unpopulate(val, "Context", &c.Context) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &c.Origin) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &c.Severity) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityStatusContract. +func (c ConnectivityStatusContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", c.Error) + populate(objectMap, "isOptional", c.IsOptional) + populateDateTimeRFC3339(objectMap, "lastStatusChange", c.LastStatusChange) + populateDateTimeRFC3339(objectMap, "lastUpdated", c.LastUpdated) + populate(objectMap, "name", c.Name) + populate(objectMap, "resourceType", c.ResourceType) + populate(objectMap, "status", c.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityStatusContract. +func (c *ConnectivityStatusContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &c.Error) + delete(rawMsg, key) + case "isOptional": + err = unpopulate(val, "IsOptional", &c.IsOptional) + delete(rawMsg, key) + case "lastStatusChange": + err = unpopulateDateTimeRFC3339(val, "LastStatusChange", &c.LastStatusChange) + delete(rawMsg, key) + case "lastUpdated": + err = unpopulateDateTimeRFC3339(val, "LastUpdated", &c.LastUpdated) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &c.ResourceType) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContentItemCollection. +func (c ContentItemCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentItemCollection. +func (c *ContentItemCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContentItemContract. +func (c ContentItemContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentItemContract. +func (c *ContentItemContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContentTypeCollection. +func (c ContentTypeCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentTypeCollection. +func (c *ContentTypeCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContentTypeContract. +func (c ContentTypeContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentTypeContract. +func (c *ContentTypeContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContentTypeContractProperties. +func (c ContentTypeContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", c.Description) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populateAny(objectMap, "schema", c.Schema) + populate(objectMap, "version", c.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentTypeContractProperties. +func (c *ContentTypeContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "schema": + err = unpopulate(val, "Schema", &c.Schema) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &c.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMasking. +func (d DataMasking) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "headers", d.Headers) + populate(objectMap, "queryParams", d.QueryParams) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMasking. +func (d *DataMasking) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "headers": + err = unpopulate(val, "Headers", &d.Headers) + delete(rawMsg, key) + case "queryParams": + err = unpopulate(val, "QueryParams", &d.QueryParams) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataMaskingEntity. +func (d DataMaskingEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "mode", d.Mode) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingEntity. +func (d *DataMaskingEntity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &d.Mode) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedServiceContract. +func (d DeletedServiceContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServiceContract. +func (d *DeletedServiceContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedServiceContractProperties. +func (d DeletedServiceContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "deletionDate", d.DeletionDate) + populateDateTimeRFC3339(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) + populate(objectMap, "serviceId", d.ServiceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServiceContractProperties. +func (d *DeletedServiceContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deletionDate": + err = unpopulateDateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) + delete(rawMsg, key) + case "scheduledPurgeDate": + err = unpopulateDateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) + delete(rawMsg, key) + case "serviceId": + err = unpopulate(val, "ServiceID", &d.ServiceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedServicesCollection. +func (d DeletedServicesCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServicesCollection. +func (d *DeletedServicesCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeployConfigurationParameterProperties. +func (d DeployConfigurationParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "branch", d.Branch) + populate(objectMap, "force", d.Force) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeployConfigurationParameterProperties. +func (d *DeployConfigurationParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "branch": + err = unpopulate(val, "Branch", &d.Branch) + delete(rawMsg, key) + case "force": + err = unpopulate(val, "Force", &d.Force) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeployConfigurationParameters. +func (d DeployConfigurationParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeployConfigurationParameters. +func (d *DeployConfigurationParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticCollection. +func (d DiagnosticCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", d.Count) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticCollection. +func (d *DiagnosticCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &d.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticContract. +func (d DiagnosticContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticContract. +func (d *DiagnosticContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticContractProperties. +func (d DiagnosticContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alwaysLog", d.AlwaysLog) + populate(objectMap, "backend", d.Backend) + populate(objectMap, "frontend", d.Frontend) + populate(objectMap, "httpCorrelationProtocol", d.HTTPCorrelationProtocol) + populate(objectMap, "logClientIp", d.LogClientIP) + populate(objectMap, "loggerId", d.LoggerID) + populate(objectMap, "metrics", d.Metrics) + populate(objectMap, "operationNameFormat", d.OperationNameFormat) + populate(objectMap, "sampling", d.Sampling) + populate(objectMap, "verbosity", d.Verbosity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticContractProperties. +func (d *DiagnosticContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alwaysLog": + err = unpopulate(val, "AlwaysLog", &d.AlwaysLog) + delete(rawMsg, key) + case "backend": + err = unpopulate(val, "Backend", &d.Backend) + delete(rawMsg, key) + case "frontend": + err = unpopulate(val, "Frontend", &d.Frontend) + delete(rawMsg, key) + case "httpCorrelationProtocol": + err = unpopulate(val, "HTTPCorrelationProtocol", &d.HTTPCorrelationProtocol) + delete(rawMsg, key) + case "logClientIp": + err = unpopulate(val, "LogClientIP", &d.LogClientIP) + delete(rawMsg, key) + case "loggerId": + err = unpopulate(val, "LoggerID", &d.LoggerID) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &d.Metrics) + delete(rawMsg, key) + case "operationNameFormat": + err = unpopulate(val, "OperationNameFormat", &d.OperationNameFormat) + delete(rawMsg, key) + case "sampling": + err = unpopulate(val, "Sampling", &d.Sampling) + delete(rawMsg, key) + case "verbosity": + err = unpopulate(val, "Verbosity", &d.Verbosity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticContractUpdateProperties. +func (d DiagnosticContractUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alwaysLog", d.AlwaysLog) + populate(objectMap, "backend", d.Backend) + populate(objectMap, "frontend", d.Frontend) + populate(objectMap, "httpCorrelationProtocol", d.HTTPCorrelationProtocol) + populate(objectMap, "logClientIp", d.LogClientIP) + populate(objectMap, "loggerId", d.LoggerID) + populate(objectMap, "metrics", d.Metrics) + populate(objectMap, "operationNameFormat", d.OperationNameFormat) + populate(objectMap, "sampling", d.Sampling) + populate(objectMap, "verbosity", d.Verbosity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticContractUpdateProperties. +func (d *DiagnosticContractUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alwaysLog": + err = unpopulate(val, "AlwaysLog", &d.AlwaysLog) + delete(rawMsg, key) + case "backend": + err = unpopulate(val, "Backend", &d.Backend) + delete(rawMsg, key) + case "frontend": + err = unpopulate(val, "Frontend", &d.Frontend) + delete(rawMsg, key) + case "httpCorrelationProtocol": + err = unpopulate(val, "HTTPCorrelationProtocol", &d.HTTPCorrelationProtocol) + delete(rawMsg, key) + case "logClientIp": + err = unpopulate(val, "LogClientIP", &d.LogClientIP) + delete(rawMsg, key) + case "loggerId": + err = unpopulate(val, "LoggerID", &d.LoggerID) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &d.Metrics) + delete(rawMsg, key) + case "operationNameFormat": + err = unpopulate(val, "OperationNameFormat", &d.OperationNameFormat) + delete(rawMsg, key) + case "sampling": + err = unpopulate(val, "Sampling", &d.Sampling) + delete(rawMsg, key) + case "verbosity": + err = unpopulate(val, "Verbosity", &d.Verbosity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticUpdateContract. +func (d DiagnosticUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticUpdateContract. +func (d *DiagnosticUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DocumentationCollection. +func (d DocumentationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DocumentationCollection. +func (d *DocumentationCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DocumentationContract. +func (d DocumentationContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DocumentationContract. +func (d *DocumentationContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DocumentationContractProperties. +func (d DocumentationContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "content", d.Content) + populate(objectMap, "title", d.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DocumentationContractProperties. +func (d *DocumentationContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "content": + err = unpopulate(val, "Content", &d.Content) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &d.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DocumentationUpdateContract. +func (d DocumentationUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DocumentationUpdateContract. +func (d *DocumentationUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EmailTemplateCollection. +func (e EmailTemplateCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", e.Count) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateCollection. +func (e *EmailTemplateCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &e.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EmailTemplateContract. +func (e EmailTemplateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateContract. +func (e *EmailTemplateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EmailTemplateContractProperties. +func (e EmailTemplateContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "body", e.Body) + populate(objectMap, "description", e.Description) + populate(objectMap, "isDefault", e.IsDefault) + populate(objectMap, "parameters", e.Parameters) + populate(objectMap, "subject", e.Subject) + populate(objectMap, "title", e.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateContractProperties. +func (e *EmailTemplateContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "body": + err = unpopulate(val, "Body", &e.Body) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &e.IsDefault) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &e.Parameters) + delete(rawMsg, key) + case "subject": + err = unpopulate(val, "Subject", &e.Subject) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &e.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EmailTemplateParametersContractProperties. +func (e EmailTemplateParametersContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", e.Description) + populate(objectMap, "name", e.Name) + populate(objectMap, "title", e.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateParametersContractProperties. +func (e *EmailTemplateParametersContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &e.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EmailTemplateUpdateParameterProperties. +func (e EmailTemplateUpdateParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "body", e.Body) + populate(objectMap, "description", e.Description) + populate(objectMap, "parameters", e.Parameters) + populate(objectMap, "subject", e.Subject) + populate(objectMap, "title", e.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateUpdateParameterProperties. +func (e *EmailTemplateUpdateParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "body": + err = unpopulate(val, "Body", &e.Body) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &e.Parameters) + delete(rawMsg, key) + case "subject": + err = unpopulate(val, "Subject", &e.Subject) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &e.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EmailTemplateUpdateParameters. +func (e EmailTemplateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", e.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EmailTemplateUpdateParameters. +func (e *EmailTemplateUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointDependency. +func (e EndpointDependency) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "domainName", e.DomainName) + populate(objectMap, "endpointDetails", e.EndpointDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency. +func (e *EndpointDependency) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domainName": + err = unpopulate(val, "DomainName", &e.DomainName) + delete(rawMsg, key) + case "endpointDetails": + err = unpopulate(val, "EndpointDetails", &e.EndpointDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointDetail. +func (e EndpointDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "port", e.Port) + populate(objectMap, "region", e.Region) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail. +func (e *EndpointDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "port": + err = unpopulate(val, "Port", &e.Port) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &e.Region) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. +func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "info", e.Info) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. +func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "info": + err = unpopulate(val, "Info", &e.Info) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. +func (e ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", e.AdditionalInfo) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. +func (e *ErrorDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorFieldContract. +func (e ErrorFieldContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorFieldContract. +func (e *ErrorFieldContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. +func (e *ErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponseBody. +func (e ErrorResponseBody) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "message", e.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseBody. +func (e *ErrorResponseBody) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailureStatusCodeRange. +func (f FailureStatusCodeRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "max", f.Max) + populate(objectMap, "min", f.Min) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailureStatusCodeRange. +func (f *FailureStatusCodeRange) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "max": + err = unpopulate(val, "Max", &f.Max) + delete(rawMsg, key) + case "min": + err = unpopulate(val, "Min", &f.Min) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FrontendConfiguration. +func (f FrontendConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultHostname", f.DefaultHostname) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FrontendConfiguration. +func (f *FrontendConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultHostname": + err = unpopulate(val, "DefaultHostname", &f.DefaultHostname) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayBaseProperties. +func (g GatewayBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backend", g.Backend) + populate(objectMap, "configurationApi", g.ConfigurationAPI) + populateDateTimeRFC3339(objectMap, "createdAtUtc", g.CreatedAtUTC) + populate(objectMap, "frontend", g.Frontend) + populate(objectMap, "provisioningState", g.ProvisioningState) + populate(objectMap, "targetProvisioningState", g.TargetProvisioningState) + populate(objectMap, "virtualNetworkType", g.VirtualNetworkType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayBaseProperties. +func (g *GatewayBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backend": + err = unpopulate(val, "Backend", &g.Backend) + delete(rawMsg, key) + case "configurationApi": + err = unpopulate(val, "ConfigurationAPI", &g.ConfigurationAPI) + delete(rawMsg, key) + case "createdAtUtc": + err = unpopulateDateTimeRFC3339(val, "CreatedAtUTC", &g.CreatedAtUTC) + delete(rawMsg, key) + case "frontend": + err = unpopulate(val, "Frontend", &g.Frontend) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + delete(rawMsg, key) + case "targetProvisioningState": + err = unpopulate(val, "TargetProvisioningState", &g.TargetProvisioningState) + delete(rawMsg, key) + case "virtualNetworkType": + err = unpopulate(val, "VirtualNetworkType", &g.VirtualNetworkType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayCertificateAuthorityCollection. +func (g GatewayCertificateAuthorityCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCertificateAuthorityCollection. +func (g *GatewayCertificateAuthorityCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayCertificateAuthorityContract. +func (g GatewayCertificateAuthorityContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCertificateAuthorityContract. +func (g *GatewayCertificateAuthorityContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayCertificateAuthorityContractProperties. +func (g GatewayCertificateAuthorityContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isTrusted", g.IsTrusted) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCertificateAuthorityContractProperties. +func (g *GatewayCertificateAuthorityContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isTrusted": + err = unpopulate(val, "IsTrusted", &g.IsTrusted) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayCollection. +func (g GatewayCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", g.Count) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCollection. +func (g *GatewayCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &g.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayConfigConnectionBaseProperties. +func (g GatewayConfigConnectionBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultHostname", g.DefaultHostname) + populate(objectMap, "hostnames", g.Hostnames) + populate(objectMap, "provisioningState", g.ProvisioningState) + populate(objectMap, "sourceId", g.SourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayConfigConnectionBaseProperties. +func (g *GatewayConfigConnectionBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultHostname": + err = unpopulate(val, "DefaultHostname", &g.DefaultHostname) + delete(rawMsg, key) + case "hostnames": + err = unpopulate(val, "Hostnames", &g.Hostnames) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + delete(rawMsg, key) + case "sourceId": + err = unpopulate(val, "SourceID", &g.SourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayConfigConnectionListResult. +func (g GatewayConfigConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayConfigConnectionListResult. +func (g *GatewayConfigConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayConfigConnectionResource. +func (g GatewayConfigConnectionResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", g.Etag) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayConfigConnectionResource. +func (g *GatewayConfigConnectionResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &g.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayConfigurationAPI. +func (g GatewayConfigurationAPI) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostname", g.Hostname) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayConfigurationAPI. +func (g *GatewayConfigurationAPI) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostname": + err = unpopulate(val, "Hostname", &g.Hostname) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayContract. +func (g GatewayContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayContract. +func (g *GatewayContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayContractProperties. +func (g GatewayContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", g.Description) + populate(objectMap, "locationData", g.LocationData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayContractProperties. +func (g *GatewayContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &g.Description) + delete(rawMsg, key) + case "locationData": + err = unpopulate(val, "LocationData", &g.LocationData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayDebugCredentialsContract. +func (g GatewayDebugCredentialsContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "token", g.Token) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayDebugCredentialsContract. +func (g *GatewayDebugCredentialsContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "token": + err = unpopulate(val, "Token", &g.Token) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayHostnameConfigurationCollection. +func (g GatewayHostnameConfigurationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayHostnameConfigurationCollection. +func (g *GatewayHostnameConfigurationCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayHostnameConfigurationContract. +func (g GatewayHostnameConfigurationContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayHostnameConfigurationContract. +func (g *GatewayHostnameConfigurationContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayHostnameConfigurationContractProperties. +func (g GatewayHostnameConfigurationContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateId", g.CertificateID) + populate(objectMap, "http2Enabled", g.HTTP2Enabled) + populate(objectMap, "hostname", g.Hostname) + populate(objectMap, "negotiateClientCertificate", g.NegotiateClientCertificate) + populate(objectMap, "tls10Enabled", g.Tls10Enabled) + populate(objectMap, "tls11Enabled", g.Tls11Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayHostnameConfigurationContractProperties. +func (g *GatewayHostnameConfigurationContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateId": + err = unpopulate(val, "CertificateID", &g.CertificateID) + delete(rawMsg, key) + case "http2Enabled": + err = unpopulate(val, "HTTP2Enabled", &g.HTTP2Enabled) + delete(rawMsg, key) + case "hostname": + err = unpopulate(val, "Hostname", &g.Hostname) + delete(rawMsg, key) + case "negotiateClientCertificate": + err = unpopulate(val, "NegotiateClientCertificate", &g.NegotiateClientCertificate) + delete(rawMsg, key) + case "tls10Enabled": + err = unpopulate(val, "Tls10Enabled", &g.Tls10Enabled) + delete(rawMsg, key) + case "tls11Enabled": + err = unpopulate(val, "Tls11Enabled", &g.Tls11Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayKeyRegenerationRequestContract. +func (g GatewayKeyRegenerationRequestContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyType", g.KeyType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayKeyRegenerationRequestContract. +func (g *GatewayKeyRegenerationRequestContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyType": + err = unpopulate(val, "KeyType", &g.KeyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayKeysContract. +func (g GatewayKeysContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primary", g.Primary) + populate(objectMap, "secondary", g.Secondary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayKeysContract. +func (g *GatewayKeysContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primary": + err = unpopulate(val, "Primary", &g.Primary) + delete(rawMsg, key) + case "secondary": + err = unpopulate(val, "Secondary", &g.Secondary) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayListDebugCredentialsContract. +func (g GatewayListDebugCredentialsContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiId", g.APIID) + populate(objectMap, "credentialsExpireAfter", g.CredentialsExpireAfter) + populate(objectMap, "purposes", g.Purposes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayListDebugCredentialsContract. +func (g *GatewayListDebugCredentialsContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiId": + err = unpopulate(val, "APIID", &g.APIID) + delete(rawMsg, key) + case "credentialsExpireAfter": + err = unpopulate(val, "CredentialsExpireAfter", &g.CredentialsExpireAfter) + delete(rawMsg, key) + case "purposes": + err = unpopulate(val, "Purposes", &g.Purposes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayListResult. +func (g GatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayListResult. +func (g *GatewayListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayListTraceContract. +func (g GatewayListTraceContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "traceId", g.TraceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayListTraceContract. +func (g *GatewayListTraceContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "traceId": + err = unpopulate(val, "TraceID", &g.TraceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayProperties. +func (g GatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backend", g.Backend) + populate(objectMap, "configurationApi", g.ConfigurationAPI) + populateDateTimeRFC3339(objectMap, "createdAtUtc", g.CreatedAtUTC) + populate(objectMap, "frontend", g.Frontend) + populate(objectMap, "provisioningState", g.ProvisioningState) + populate(objectMap, "targetProvisioningState", g.TargetProvisioningState) + populate(objectMap, "virtualNetworkType", g.VirtualNetworkType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayProperties. +func (g *GatewayProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backend": + err = unpopulate(val, "Backend", &g.Backend) + delete(rawMsg, key) + case "configurationApi": + err = unpopulate(val, "ConfigurationAPI", &g.ConfigurationAPI) + delete(rawMsg, key) + case "createdAtUtc": + err = unpopulateDateTimeRFC3339(val, "CreatedAtUTC", &g.CreatedAtUTC) + delete(rawMsg, key) + case "frontend": + err = unpopulate(val, "Frontend", &g.Frontend) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + delete(rawMsg, key) + case "targetProvisioningState": + err = unpopulate(val, "TargetProvisioningState", &g.TargetProvisioningState) + delete(rawMsg, key) + case "virtualNetworkType": + err = unpopulate(val, "VirtualNetworkType", &g.VirtualNetworkType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayResource. +func (g GatewayResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", g.Etag) + populate(objectMap, "id", g.ID) + populate(objectMap, "location", g.Location) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "sku", g.SKU) + populate(objectMap, "systemData", g.SystemData) + populate(objectMap, "tags", g.Tags) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResource. +func (g *GatewayResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &g.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &g.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &g.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &g.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &g.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayResourceSKUResult. +func (g GatewayResourceSKUResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", g.Capacity) + populate(objectMap, "resourceType", g.ResourceType) + populate(objectMap, "sku", g.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResourceSKUResult. +func (g *GatewayResourceSKUResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &g.Capacity) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &g.ResourceType) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &g.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayResourceSKUResults. +func (g GatewayResourceSKUResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResourceSKUResults. +func (g *GatewayResourceSKUResults) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewaySKU. +func (g GatewaySKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", g.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewaySKU. +func (g *GatewaySKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewaySKUCapacity. +func (g GatewaySKUCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "default", g.Default) + populate(objectMap, "maximum", g.Maximum) + populate(objectMap, "minimum", g.Minimum) + populate(objectMap, "scaleType", g.ScaleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewaySKUCapacity. +func (g *GatewaySKUCapacity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &g.Default) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &g.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &g.Minimum) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &g.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewaySKUProperties. +func (g GatewaySKUProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", g.Capacity) + populate(objectMap, "name", g.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewaySKUProperties. +func (g *GatewaySKUProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &g.Capacity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewaySKUPropertiesForPatch. +func (g GatewaySKUPropertiesForPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", g.Capacity) + populate(objectMap, "name", g.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewaySKUPropertiesForPatch. +func (g *GatewaySKUPropertiesForPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &g.Capacity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayTokenContract. +func (g GatewayTokenContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayTokenContract. +func (g *GatewayTokenContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayTokenRequestContract. +func (g GatewayTokenRequestContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expiry", g.Expiry) + populate(objectMap, "keyType", g.KeyType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayTokenRequestContract. +func (g *GatewayTokenRequestContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiry": + err = unpopulateDateTimeRFC3339(val, "Expiry", &g.Expiry) + delete(rawMsg, key) + case "keyType": + err = unpopulate(val, "KeyType", &g.KeyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayUpdateParameters. +func (g GatewayUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", g.Etag) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "sku", g.SKU) + populate(objectMap, "tags", g.Tags) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayUpdateParameters. +func (g *GatewayUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &g.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &g.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &g.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayUpdateProperties. +func (g GatewayUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backend", g.Backend) + populate(objectMap, "configurationApi", g.ConfigurationAPI) + populateDateTimeRFC3339(objectMap, "createdAtUtc", g.CreatedAtUTC) + populate(objectMap, "frontend", g.Frontend) + populate(objectMap, "provisioningState", g.ProvisioningState) + populate(objectMap, "targetProvisioningState", g.TargetProvisioningState) + populate(objectMap, "virtualNetworkType", g.VirtualNetworkType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayUpdateProperties. +func (g *GatewayUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backend": + err = unpopulate(val, "Backend", &g.Backend) + delete(rawMsg, key) + case "configurationApi": + err = unpopulate(val, "ConfigurationAPI", &g.ConfigurationAPI) + delete(rawMsg, key) + case "createdAtUtc": + err = unpopulateDateTimeRFC3339(val, "CreatedAtUTC", &g.CreatedAtUTC) + delete(rawMsg, key) + case "frontend": + err = unpopulate(val, "Frontend", &g.Frontend) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + delete(rawMsg, key) + case "targetProvisioningState": + err = unpopulate(val, "TargetProvisioningState", &g.TargetProvisioningState) + delete(rawMsg, key) + case "virtualNetworkType": + err = unpopulate(val, "VirtualNetworkType", &g.VirtualNetworkType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GenerateSsoURLResult. +func (g GenerateSsoURLResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GenerateSsoURLResult. +func (g *GenerateSsoURLResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GlobalSchemaCollection. +func (g GlobalSchemaCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", g.Count) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GlobalSchemaCollection. +func (g *GlobalSchemaCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &g.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GlobalSchemaContract. +func (g GlobalSchemaContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GlobalSchemaContract. +func (g *GlobalSchemaContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GlobalSchemaContractProperties. +func (g GlobalSchemaContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", g.Description) + populateAny(objectMap, "document", g.Document) + populate(objectMap, "provisioningState", g.ProvisioningState) + populate(objectMap, "schemaType", g.SchemaType) + populateAny(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GlobalSchemaContractProperties. +func (g *GlobalSchemaContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &g.Description) + delete(rawMsg, key) + case "document": + err = unpopulate(val, "Document", &g.Document) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + delete(rawMsg, key) + case "schemaType": + err = unpopulate(val, "SchemaType", &g.SchemaType) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupCollection. +func (g GroupCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", g.Count) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupCollection. +func (g *GroupCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &g.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupContract. +func (g GroupContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupContract. +func (g *GroupContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupContractProperties. +func (g GroupContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "builtIn", g.BuiltIn) + populate(objectMap, "description", g.Description) + populate(objectMap, "displayName", g.DisplayName) + populate(objectMap, "externalId", g.ExternalID) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupContractProperties. +func (g *GroupContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "builtIn": + err = unpopulate(val, "BuiltIn", &g.BuiltIn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &g.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &g.DisplayName) + delete(rawMsg, key) + case "externalId": + err = unpopulate(val, "ExternalID", &g.ExternalID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupCreateParameters. +func (g GroupCreateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", g.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupCreateParameters. +func (g *GroupCreateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupCreateParametersProperties. +func (g GroupCreateParametersProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", g.Description) + populate(objectMap, "displayName", g.DisplayName) + populate(objectMap, "externalId", g.ExternalID) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupCreateParametersProperties. +func (g *GroupCreateParametersProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &g.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &g.DisplayName) + delete(rawMsg, key) + case "externalId": + err = unpopulate(val, "ExternalID", &g.ExternalID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupUpdateParameters. +func (g GroupUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", g.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupUpdateParameters. +func (g *GroupUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupUpdateParametersProperties. +func (g GroupUpdateParametersProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", g.Description) + populate(objectMap, "displayName", g.DisplayName) + populate(objectMap, "externalId", g.ExternalID) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupUpdateParametersProperties. +func (g *GroupUpdateParametersProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &g.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &g.DisplayName) + delete(rawMsg, key) + case "externalId": + err = unpopulate(val, "ExternalID", &g.ExternalID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPHeader. +func (h HTTPHeader) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", h.Name) + populate(objectMap, "value", h.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPHeader. +func (h *HTTPHeader) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &h.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPMessageDiagnostic. +func (h HTTPMessageDiagnostic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "body", h.Body) + populate(objectMap, "dataMasking", h.DataMasking) + populate(objectMap, "headers", h.Headers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPMessageDiagnostic. +func (h *HTTPMessageDiagnostic) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "body": + err = unpopulate(val, "Body", &h.Body) + delete(rawMsg, key) + case "dataMasking": + err = unpopulate(val, "DataMasking", &h.DataMasking) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &h.Headers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostnameConfiguration. +func (h HostnameConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificate", h.Certificate) + populate(objectMap, "certificatePassword", h.CertificatePassword) + populate(objectMap, "certificateSource", h.CertificateSource) + populate(objectMap, "certificateStatus", h.CertificateStatus) + populate(objectMap, "defaultSslBinding", h.DefaultSSLBinding) + populate(objectMap, "encodedCertificate", h.EncodedCertificate) + populate(objectMap, "hostName", h.HostName) + populate(objectMap, "identityClientId", h.IdentityClientID) + populate(objectMap, "keyVaultId", h.KeyVaultID) + populate(objectMap, "negotiateClientCertificate", h.NegotiateClientCertificate) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostnameConfiguration. +func (h *HostnameConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificate": + err = unpopulate(val, "Certificate", &h.Certificate) + delete(rawMsg, key) + case "certificatePassword": + err = unpopulate(val, "CertificatePassword", &h.CertificatePassword) + delete(rawMsg, key) + case "certificateSource": + err = unpopulate(val, "CertificateSource", &h.CertificateSource) + delete(rawMsg, key) + case "certificateStatus": + err = unpopulate(val, "CertificateStatus", &h.CertificateStatus) + delete(rawMsg, key) + case "defaultSslBinding": + err = unpopulate(val, "DefaultSSLBinding", &h.DefaultSSLBinding) + delete(rawMsg, key) + case "encodedCertificate": + err = unpopulate(val, "EncodedCertificate", &h.EncodedCertificate) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &h.HostName) + delete(rawMsg, key) + case "identityClientId": + err = unpopulate(val, "IdentityClientID", &h.IdentityClientID) + delete(rawMsg, key) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &h.KeyVaultID) + delete(rawMsg, key) + case "negotiateClientCertificate": + err = unpopulate(val, "NegotiateClientCertificate", &h.NegotiateClientCertificate) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviderBaseParameters. +func (i IdentityProviderBaseParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedTenants", i.AllowedTenants) + populate(objectMap, "authority", i.Authority) + populate(objectMap, "clientLibrary", i.ClientLibrary) + populate(objectMap, "passwordResetPolicyName", i.PasswordResetPolicyName) + populate(objectMap, "profileEditingPolicyName", i.ProfileEditingPolicyName) + populate(objectMap, "signinPolicyName", i.SigninPolicyName) + populate(objectMap, "signinTenant", i.SigninTenant) + populate(objectMap, "signupPolicyName", i.SignupPolicyName) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderBaseParameters. +func (i *IdentityProviderBaseParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedTenants": + err = unpopulate(val, "AllowedTenants", &i.AllowedTenants) + delete(rawMsg, key) + case "authority": + err = unpopulate(val, "Authority", &i.Authority) + delete(rawMsg, key) + case "clientLibrary": + err = unpopulate(val, "ClientLibrary", &i.ClientLibrary) + delete(rawMsg, key) + case "passwordResetPolicyName": + err = unpopulate(val, "PasswordResetPolicyName", &i.PasswordResetPolicyName) + delete(rawMsg, key) + case "profileEditingPolicyName": + err = unpopulate(val, "ProfileEditingPolicyName", &i.ProfileEditingPolicyName) + delete(rawMsg, key) + case "signinPolicyName": + err = unpopulate(val, "SigninPolicyName", &i.SigninPolicyName) + delete(rawMsg, key) + case "signinTenant": + err = unpopulate(val, "SigninTenant", &i.SigninTenant) + delete(rawMsg, key) + case "signupPolicyName": + err = unpopulate(val, "SignupPolicyName", &i.SignupPolicyName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviderContract. +func (i IdentityProviderContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderContract. +func (i *IdentityProviderContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviderContractProperties. +func (i IdentityProviderContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedTenants", i.AllowedTenants) + populate(objectMap, "authority", i.Authority) + populate(objectMap, "clientId", i.ClientID) + populate(objectMap, "clientLibrary", i.ClientLibrary) + populate(objectMap, "clientSecret", i.ClientSecret) + populate(objectMap, "passwordResetPolicyName", i.PasswordResetPolicyName) + populate(objectMap, "profileEditingPolicyName", i.ProfileEditingPolicyName) + populate(objectMap, "signinPolicyName", i.SigninPolicyName) + populate(objectMap, "signinTenant", i.SigninTenant) + populate(objectMap, "signupPolicyName", i.SignupPolicyName) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderContractProperties. +func (i *IdentityProviderContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedTenants": + err = unpopulate(val, "AllowedTenants", &i.AllowedTenants) + delete(rawMsg, key) + case "authority": + err = unpopulate(val, "Authority", &i.Authority) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &i.ClientID) + delete(rawMsg, key) + case "clientLibrary": + err = unpopulate(val, "ClientLibrary", &i.ClientLibrary) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &i.ClientSecret) + delete(rawMsg, key) + case "passwordResetPolicyName": + err = unpopulate(val, "PasswordResetPolicyName", &i.PasswordResetPolicyName) + delete(rawMsg, key) + case "profileEditingPolicyName": + err = unpopulate(val, "ProfileEditingPolicyName", &i.ProfileEditingPolicyName) + delete(rawMsg, key) + case "signinPolicyName": + err = unpopulate(val, "SigninPolicyName", &i.SigninPolicyName) + delete(rawMsg, key) + case "signinTenant": + err = unpopulate(val, "SigninTenant", &i.SigninTenant) + delete(rawMsg, key) + case "signupPolicyName": + err = unpopulate(val, "SignupPolicyName", &i.SignupPolicyName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviderCreateContract. +func (i IdentityProviderCreateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderCreateContract. +func (i *IdentityProviderCreateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviderCreateContractProperties. +func (i IdentityProviderCreateContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedTenants", i.AllowedTenants) + populate(objectMap, "authority", i.Authority) + populate(objectMap, "clientId", i.ClientID) + populate(objectMap, "clientLibrary", i.ClientLibrary) + populate(objectMap, "clientSecret", i.ClientSecret) + populate(objectMap, "passwordResetPolicyName", i.PasswordResetPolicyName) + populate(objectMap, "profileEditingPolicyName", i.ProfileEditingPolicyName) + populate(objectMap, "signinPolicyName", i.SigninPolicyName) + populate(objectMap, "signinTenant", i.SigninTenant) + populate(objectMap, "signupPolicyName", i.SignupPolicyName) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderCreateContractProperties. +func (i *IdentityProviderCreateContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedTenants": + err = unpopulate(val, "AllowedTenants", &i.AllowedTenants) + delete(rawMsg, key) + case "authority": + err = unpopulate(val, "Authority", &i.Authority) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &i.ClientID) + delete(rawMsg, key) + case "clientLibrary": + err = unpopulate(val, "ClientLibrary", &i.ClientLibrary) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &i.ClientSecret) + delete(rawMsg, key) + case "passwordResetPolicyName": + err = unpopulate(val, "PasswordResetPolicyName", &i.PasswordResetPolicyName) + delete(rawMsg, key) + case "profileEditingPolicyName": + err = unpopulate(val, "ProfileEditingPolicyName", &i.ProfileEditingPolicyName) + delete(rawMsg, key) + case "signinPolicyName": + err = unpopulate(val, "SigninPolicyName", &i.SigninPolicyName) + delete(rawMsg, key) + case "signinTenant": + err = unpopulate(val, "SigninTenant", &i.SigninTenant) + delete(rawMsg, key) + case "signupPolicyName": + err = unpopulate(val, "SignupPolicyName", &i.SignupPolicyName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviderList. +func (i IdentityProviderList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", i.Count) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderList. +func (i *IdentityProviderList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &i.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviderUpdateParameters. +func (i IdentityProviderUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", i.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderUpdateParameters. +func (i *IdentityProviderUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviderUpdateProperties. +func (i IdentityProviderUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedTenants", i.AllowedTenants) + populate(objectMap, "authority", i.Authority) + populate(objectMap, "clientId", i.ClientID) + populate(objectMap, "clientLibrary", i.ClientLibrary) + populate(objectMap, "clientSecret", i.ClientSecret) + populate(objectMap, "passwordResetPolicyName", i.PasswordResetPolicyName) + populate(objectMap, "profileEditingPolicyName", i.ProfileEditingPolicyName) + populate(objectMap, "signinPolicyName", i.SigninPolicyName) + populate(objectMap, "signinTenant", i.SigninTenant) + populate(objectMap, "signupPolicyName", i.SignupPolicyName) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderUpdateProperties. +func (i *IdentityProviderUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedTenants": + err = unpopulate(val, "AllowedTenants", &i.AllowedTenants) + delete(rawMsg, key) + case "authority": + err = unpopulate(val, "Authority", &i.Authority) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &i.ClientID) + delete(rawMsg, key) + case "clientLibrary": + err = unpopulate(val, "ClientLibrary", &i.ClientLibrary) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &i.ClientSecret) + delete(rawMsg, key) + case "passwordResetPolicyName": + err = unpopulate(val, "PasswordResetPolicyName", &i.PasswordResetPolicyName) + delete(rawMsg, key) + case "profileEditingPolicyName": + err = unpopulate(val, "ProfileEditingPolicyName", &i.ProfileEditingPolicyName) + delete(rawMsg, key) + case "signinPolicyName": + err = unpopulate(val, "SigninPolicyName", &i.SigninPolicyName) + delete(rawMsg, key) + case "signinTenant": + err = unpopulate(val, "SigninTenant", &i.SigninTenant) + delete(rawMsg, key) + case "signupPolicyName": + err = unpopulate(val, "SignupPolicyName", &i.SignupPolicyName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueAttachmentCollection. +func (i IssueAttachmentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", i.Count) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueAttachmentCollection. +func (i *IssueAttachmentCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &i.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueAttachmentContract. +func (i IssueAttachmentContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueAttachmentContract. +func (i *IssueAttachmentContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueAttachmentContractProperties. +func (i IssueAttachmentContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "content", i.Content) + populate(objectMap, "contentFormat", i.ContentFormat) + populate(objectMap, "title", i.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueAttachmentContractProperties. +func (i *IssueAttachmentContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "content": + err = unpopulate(val, "Content", &i.Content) + delete(rawMsg, key) + case "contentFormat": + err = unpopulate(val, "ContentFormat", &i.ContentFormat) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &i.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueCollection. +func (i IssueCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", i.Count) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueCollection. +func (i *IssueCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &i.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueCommentCollection. +func (i IssueCommentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", i.Count) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueCommentCollection. +func (i *IssueCommentCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &i.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueCommentContract. +func (i IssueCommentContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueCommentContract. +func (i *IssueCommentContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueCommentContractProperties. +func (i IssueCommentContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdDate", i.CreatedDate) + populate(objectMap, "text", i.Text) + populate(objectMap, "userId", i.UserID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueCommentContractProperties. +func (i *IssueCommentContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdDate": + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &i.CreatedDate) + delete(rawMsg, key) + case "text": + err = unpopulate(val, "Text", &i.Text) + delete(rawMsg, key) + case "userId": + err = unpopulate(val, "UserID", &i.UserID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueContract. +func (i IssueContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueContract. +func (i *IssueContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueContractBaseProperties. +func (i IssueContractBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiId", i.APIID) + populateDateTimeRFC3339(objectMap, "createdDate", i.CreatedDate) + populate(objectMap, "state", i.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueContractBaseProperties. +func (i *IssueContractBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiId": + err = unpopulate(val, "APIID", &i.APIID) + delete(rawMsg, key) + case "createdDate": + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &i.CreatedDate) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &i.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueContractProperties. +func (i IssueContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiId", i.APIID) + populateDateTimeRFC3339(objectMap, "createdDate", i.CreatedDate) + populate(objectMap, "description", i.Description) + populate(objectMap, "state", i.State) + populate(objectMap, "title", i.Title) + populate(objectMap, "userId", i.UserID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueContractProperties. +func (i *IssueContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiId": + err = unpopulate(val, "APIID", &i.APIID) + delete(rawMsg, key) + case "createdDate": + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &i.CreatedDate) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &i.Description) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &i.State) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &i.Title) + delete(rawMsg, key) + case "userId": + err = unpopulate(val, "UserID", &i.UserID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueUpdateContract. +func (i IssueUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", i.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueUpdateContract. +func (i *IssueUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IssueUpdateContractProperties. +func (i IssueUpdateContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiId", i.APIID) + populateDateTimeRFC3339(objectMap, "createdDate", i.CreatedDate) + populate(objectMap, "description", i.Description) + populate(objectMap, "state", i.State) + populate(objectMap, "title", i.Title) + populate(objectMap, "userId", i.UserID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IssueUpdateContractProperties. +func (i *IssueUpdateContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiId": + err = unpopulate(val, "APIID", &i.APIID) + delete(rawMsg, key) + case "createdDate": + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &i.CreatedDate) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &i.Description) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &i.State) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &i.Title) + delete(rawMsg, key) + case "userId": + err = unpopulate(val, "UserID", &i.UserID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultContractCreateProperties. +func (k KeyVaultContractCreateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identityClientId", k.IdentityClientID) + populate(objectMap, "secretIdentifier", k.SecretIdentifier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultContractCreateProperties. +func (k *KeyVaultContractCreateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityClientId": + err = unpopulate(val, "IdentityClientID", &k.IdentityClientID) + delete(rawMsg, key) + case "secretIdentifier": + err = unpopulate(val, "SecretIdentifier", &k.SecretIdentifier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultContractProperties. +func (k KeyVaultContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identityClientId", k.IdentityClientID) + populate(objectMap, "lastStatus", k.LastStatus) + populate(objectMap, "secretIdentifier", k.SecretIdentifier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultContractProperties. +func (k *KeyVaultContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityClientId": + err = unpopulate(val, "IdentityClientID", &k.IdentityClientID) + delete(rawMsg, key) + case "lastStatus": + err = unpopulate(val, "LastStatus", &k.LastStatus) + delete(rawMsg, key) + case "secretIdentifier": + err = unpopulate(val, "SecretIdentifier", &k.SecretIdentifier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultLastAccessStatusContractProperties. +func (k KeyVaultLastAccessStatusContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", k.Code) + populate(objectMap, "message", k.Message) + populateDateTimeRFC3339(objectMap, "timeStampUtc", k.TimeStampUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultLastAccessStatusContractProperties. +func (k *KeyVaultLastAccessStatusContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &k.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &k.Message) + delete(rawMsg, key) + case "timeStampUtc": + err = unpopulateDateTimeRFC3339(val, "TimeStampUTC", &k.TimeStampUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoggerCollection. +func (l LoggerCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", l.Count) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoggerCollection. +func (l *LoggerCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &l.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoggerContract. +func (l LoggerContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", l.ID) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoggerContract. +func (l *LoggerContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoggerContractProperties. +func (l LoggerContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "credentials", l.Credentials) + populate(objectMap, "description", l.Description) + populate(objectMap, "isBuffered", l.IsBuffered) + populate(objectMap, "loggerType", l.LoggerType) + populate(objectMap, "resourceId", l.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoggerContractProperties. +func (l *LoggerContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentials": + err = unpopulate(val, "Credentials", &l.Credentials) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &l.Description) + delete(rawMsg, key) + case "isBuffered": + err = unpopulate(val, "IsBuffered", &l.IsBuffered) + delete(rawMsg, key) + case "loggerType": + err = unpopulate(val, "LoggerType", &l.LoggerType) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &l.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoggerUpdateContract. +func (l LoggerUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", l.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoggerUpdateContract. +func (l *LoggerUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoggerUpdateParameters. +func (l LoggerUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "credentials", l.Credentials) + populate(objectMap, "description", l.Description) + populate(objectMap, "isBuffered", l.IsBuffered) + populate(objectMap, "loggerType", l.LoggerType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoggerUpdateParameters. +func (l *LoggerUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentials": + err = unpopulate(val, "Credentials", &l.Credentials) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &l.Description) + delete(rawMsg, key) + case "isBuffered": + err = unpopulate(val, "IsBuffered", &l.IsBuffered) + delete(rawMsg, key) + case "loggerType": + err = unpopulate(val, "LoggerType", &l.LoggerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateToStv2Contract. +func (m MigrateToStv2Contract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "mode", m.Mode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateToStv2Contract. +func (m *MigrateToStv2Contract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamedValueCollection. +func (n NamedValueCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", n.Count) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueCollection. +func (n *NamedValueCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &n.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &n.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamedValueContract. +func (n NamedValueContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", n.ID) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueContract. +func (n *NamedValueContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamedValueContractProperties. +func (n NamedValueContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", n.DisplayName) + populate(objectMap, "keyVault", n.KeyVault) + populate(objectMap, "provisioningState", n.ProvisioningState) + populate(objectMap, "secret", n.Secret) + populate(objectMap, "tags", n.Tags) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueContractProperties. +func (n *NamedValueContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &n.DisplayName) + delete(rawMsg, key) + case "keyVault": + err = unpopulate(val, "KeyVault", &n.KeyVault) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) + delete(rawMsg, key) + case "secret": + err = unpopulate(val, "Secret", &n.Secret) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &n.Tags) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamedValueCreateContract. +func (n NamedValueCreateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", n.ID) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueCreateContract. +func (n *NamedValueCreateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamedValueCreateContractProperties. +func (n NamedValueCreateContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", n.DisplayName) + populate(objectMap, "keyVault", n.KeyVault) + populate(objectMap, "secret", n.Secret) + populate(objectMap, "tags", n.Tags) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueCreateContractProperties. +func (n *NamedValueCreateContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &n.DisplayName) + delete(rawMsg, key) + case "keyVault": + err = unpopulate(val, "KeyVault", &n.KeyVault) + delete(rawMsg, key) + case "secret": + err = unpopulate(val, "Secret", &n.Secret) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &n.Tags) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamedValueEntityBaseParameters. +func (n NamedValueEntityBaseParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "secret", n.Secret) + populate(objectMap, "tags", n.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueEntityBaseParameters. +func (n *NamedValueEntityBaseParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "secret": + err = unpopulate(val, "Secret", &n.Secret) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &n.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamedValueSecretContract. +func (n NamedValueSecretContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueSecretContract. +func (n *NamedValueSecretContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamedValueUpdateParameterProperties. +func (n NamedValueUpdateParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", n.DisplayName) + populate(objectMap, "keyVault", n.KeyVault) + populate(objectMap, "secret", n.Secret) + populate(objectMap, "tags", n.Tags) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueUpdateParameterProperties. +func (n *NamedValueUpdateParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &n.DisplayName) + delete(rawMsg, key) + case "keyVault": + err = unpopulate(val, "KeyVault", &n.KeyVault) + delete(rawMsg, key) + case "secret": + err = unpopulate(val, "Secret", &n.Secret) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &n.Tags) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamedValueUpdateParameters. +func (n NamedValueUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", n.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamedValueUpdateParameters. +func (n *NamedValueUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkStatusContract. +func (n NetworkStatusContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectivityStatus", n.ConnectivityStatus) + populate(objectMap, "dnsServers", n.DNSServers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkStatusContract. +func (n *NetworkStatusContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectivityStatus": + err = unpopulate(val, "ConnectivityStatus", &n.ConnectivityStatus) + delete(rawMsg, key) + case "dnsServers": + err = unpopulate(val, "DNSServers", &n.DNSServers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkStatusContractByLocation. +func (n NetworkStatusContractByLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", n.Location) + populate(objectMap, "networkStatus", n.NetworkStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkStatusContractByLocation. +func (n *NetworkStatusContractByLocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &n.Location) + delete(rawMsg, key) + case "networkStatus": + err = unpopulate(val, "NetworkStatus", &n.NetworkStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NotificationCollection. +func (n NotificationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", n.Count) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationCollection. +func (n *NotificationCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &n.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &n.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NotificationContract. +func (n NotificationContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", n.ID) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationContract. +func (n *NotificationContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NotificationContractProperties. +func (n NotificationContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", n.Description) + populate(objectMap, "recipients", n.Recipients) + populate(objectMap, "title", n.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationContractProperties. +func (n *NotificationContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &n.Description) + delete(rawMsg, key) + case "recipients": + err = unpopulate(val, "Recipients", &n.Recipients) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &n.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OAuth2AuthenticationSettingsContract. +func (o OAuth2AuthenticationSettingsContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationServerId", o.AuthorizationServerID) + populate(objectMap, "scope", o.Scope) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OAuth2AuthenticationSettingsContract. +func (o *OAuth2AuthenticationSettingsContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationServerId": + err = unpopulate(val, "AuthorizationServerID", &o.AuthorizationServerID) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &o.Scope) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenIDAuthenticationSettingsContract. +func (o OpenIDAuthenticationSettingsContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bearerTokenSendingMethods", o.BearerTokenSendingMethods) + populate(objectMap, "openidProviderId", o.OpenidProviderID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDAuthenticationSettingsContract. +func (o *OpenIDAuthenticationSettingsContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bearerTokenSendingMethods": + err = unpopulate(val, "BearerTokenSendingMethods", &o.BearerTokenSendingMethods) + delete(rawMsg, key) + case "openidProviderId": + err = unpopulate(val, "OpenidProviderID", &o.OpenidProviderID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectProviderCollection. +func (o OpenIDConnectProviderCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", o.Count) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectProviderCollection. +func (o *OpenIDConnectProviderCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &o.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderContract. +func (o OpenidConnectProviderContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderContract. +func (o *OpenidConnectProviderContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderContractProperties. +func (o OpenidConnectProviderContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", o.ClientID) + populate(objectMap, "clientSecret", o.ClientSecret) + populate(objectMap, "description", o.Description) + populate(objectMap, "displayName", o.DisplayName) + populate(objectMap, "metadataEndpoint", o.MetadataEndpoint) + populate(objectMap, "useInApiDocumentation", o.UseInAPIDocumentation) + populate(objectMap, "useInTestConsole", o.UseInTestConsole) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderContractProperties. +func (o *OpenidConnectProviderContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &o.ClientID) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &o.ClientSecret) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &o.DisplayName) + delete(rawMsg, key) + case "metadataEndpoint": + err = unpopulate(val, "MetadataEndpoint", &o.MetadataEndpoint) + delete(rawMsg, key) + case "useInApiDocumentation": + err = unpopulate(val, "UseInAPIDocumentation", &o.UseInAPIDocumentation) + delete(rawMsg, key) + case "useInTestConsole": + err = unpopulate(val, "UseInTestConsole", &o.UseInTestConsole) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderUpdateContract. +func (o OpenidConnectProviderUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderUpdateContract. +func (o *OpenidConnectProviderUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenidConnectProviderUpdateContractProperties. +func (o OpenidConnectProviderUpdateContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", o.ClientID) + populate(objectMap, "clientSecret", o.ClientSecret) + populate(objectMap, "description", o.Description) + populate(objectMap, "displayName", o.DisplayName) + populate(objectMap, "metadataEndpoint", o.MetadataEndpoint) + populate(objectMap, "useInApiDocumentation", o.UseInAPIDocumentation) + populate(objectMap, "useInTestConsole", o.UseInTestConsole) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenidConnectProviderUpdateContractProperties. +func (o *OpenidConnectProviderUpdateContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &o.ClientID) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &o.ClientSecret) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &o.DisplayName) + delete(rawMsg, key) + case "metadataEndpoint": + err = unpopulate(val, "MetadataEndpoint", &o.MetadataEndpoint) + delete(rawMsg, key) + case "useInApiDocumentation": + err = unpopulate(val, "UseInAPIDocumentation", &o.UseInAPIDocumentation) + delete(rawMsg, key) + case "useInTestConsole": + err = unpopulate(val, "UseInTestConsole", &o.UseInTestConsole) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + populateAny(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationCollection. +func (o OperationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", o.Count) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationCollection. +func (o *OperationCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &o.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationContract. +func (o OperationContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationContract. +func (o *OperationContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationContractProperties. +func (o OperationContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "displayName", o.DisplayName) + populate(objectMap, "method", o.Method) + populate(objectMap, "policies", o.Policies) + populate(objectMap, "request", o.Request) + populate(objectMap, "responses", o.Responses) + populate(objectMap, "templateParameters", o.TemplateParameters) + populate(objectMap, "urlTemplate", o.URLTemplate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationContractProperties. +func (o *OperationContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &o.DisplayName) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &o.Method) + delete(rawMsg, key) + case "policies": + err = unpopulate(val, "Policies", &o.Policies) + delete(rawMsg, key) + case "request": + err = unpopulate(val, "Request", &o.Request) + delete(rawMsg, key) + case "responses": + err = unpopulate(val, "Responses", &o.Responses) + delete(rawMsg, key) + case "templateParameters": + err = unpopulate(val, "TemplateParameters", &o.TemplateParameters) + delete(rawMsg, key) + case "urlTemplate": + err = unpopulate(val, "URLTemplate", &o.URLTemplate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationEntityBaseContract. +func (o OperationEntityBaseContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "policies", o.Policies) + populate(objectMap, "request", o.Request) + populate(objectMap, "responses", o.Responses) + populate(objectMap, "templateParameters", o.TemplateParameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationEntityBaseContract. +func (o *OperationEntityBaseContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "policies": + err = unpopulate(val, "Policies", &o.Policies) + delete(rawMsg, key) + case "request": + err = unpopulate(val, "Request", &o.Request) + delete(rawMsg, key) + case "responses": + err = unpopulate(val, "Responses", &o.Responses) + delete(rawMsg, key) + case "templateParameters": + err = unpopulate(val, "TemplateParameters", &o.TemplateParameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultContract. +func (o OperationResultContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultContract. +func (o *OperationResultContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultContractProperties. +func (o OperationResultContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionLog", o.ActionLog) + populate(objectMap, "error", o.Error) + populate(objectMap, "id", o.ID) + populate(objectMap, "resultInfo", o.ResultInfo) + populateDateTimeRFC3339(objectMap, "started", o.Started) + populate(objectMap, "status", o.Status) + populateDateTimeRFC3339(objectMap, "updated", o.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultContractProperties. +func (o *OperationResultContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionLog": + err = unpopulate(val, "ActionLog", &o.ActionLog) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &o.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "resultInfo": + err = unpopulate(val, "ResultInfo", &o.ResultInfo) + delete(rawMsg, key) + case "started": + err = unpopulateDateTimeRFC3339(val, "Started", &o.Started) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + case "updated": + err = unpopulateDateTimeRFC3339(val, "Updated", &o.Updated) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultLogItemContract. +func (o OperationResultLogItemContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", o.Action) + populate(objectMap, "objectKey", o.ObjectKey) + populate(objectMap, "objectType", o.ObjectType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultLogItemContract. +func (o *OperationResultLogItemContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &o.Action) + delete(rawMsg, key) + case "objectKey": + err = unpopulate(val, "ObjectKey", &o.ObjectKey) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &o.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationStatusResult. +func (o OperationStatusResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) + populate(objectMap, "error", o.Error) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "operations", o.Operations) + populate(objectMap, "percentComplete", o.PercentComplete) + populate(objectMap, "resourceId", o.ResourceID) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) + populate(objectMap, "status", o.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResult. +func (o *OperationStatusResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &o.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "operations": + err = unpopulate(val, "Operations", &o.Operations) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &o.PercentComplete) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &o.ResourceID) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationTagResourceContractProperties. +func (o OperationTagResourceContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiName", o.APIName) + populate(objectMap, "apiRevision", o.APIRevision) + populate(objectMap, "apiVersion", o.APIVersion) + populate(objectMap, "description", o.Description) + populate(objectMap, "id", o.ID) + populate(objectMap, "method", o.Method) + populate(objectMap, "name", o.Name) + populate(objectMap, "urlTemplate", o.URLTemplate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationTagResourceContractProperties. +func (o *OperationTagResourceContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiName": + err = unpopulate(val, "APIName", &o.APIName) + delete(rawMsg, key) + case "apiRevision": + err = unpopulate(val, "APIRevision", &o.APIRevision) + delete(rawMsg, key) + case "apiVersion": + err = unpopulate(val, "APIVersion", &o.APIVersion) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &o.Method) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "urlTemplate": + err = unpopulate(val, "URLTemplate", &o.URLTemplate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationUpdateContract. +func (o OperationUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationUpdateContract. +func (o *OperationUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationUpdateContractProperties. +func (o OperationUpdateContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "displayName", o.DisplayName) + populate(objectMap, "method", o.Method) + populate(objectMap, "policies", o.Policies) + populate(objectMap, "request", o.Request) + populate(objectMap, "responses", o.Responses) + populate(objectMap, "templateParameters", o.TemplateParameters) + populate(objectMap, "urlTemplate", o.URLTemplate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationUpdateContractProperties. +func (o *OperationUpdateContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &o.DisplayName) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &o.Method) + delete(rawMsg, key) + case "policies": + err = unpopulate(val, "Policies", &o.Policies) + delete(rawMsg, key) + case "request": + err = unpopulate(val, "Request", &o.Request) + delete(rawMsg, key) + case "responses": + err = unpopulate(val, "Responses", &o.Responses) + delete(rawMsg, key) + case "templateParameters": + err = unpopulate(val, "TemplateParameters", &o.TemplateParameters) + delete(rawMsg, key) + case "urlTemplate": + err = unpopulate(val, "URLTemplate", &o.URLTemplate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpoint. +func (o OutboundEnvironmentEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "category", o.Category) + populate(objectMap, "endpoints", o.Endpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpoint. +func (o *OutboundEnvironmentEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "category": + err = unpopulate(val, "Category", &o.Category) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &o.Endpoints) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpointList. +func (o OutboundEnvironmentEndpointList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpointList. +func (o *OutboundEnvironmentEndpointList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ParameterContract. +func (p ParameterContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultValue", p.DefaultValue) + populate(objectMap, "description", p.Description) + populate(objectMap, "examples", p.Examples) + populate(objectMap, "name", p.Name) + populate(objectMap, "required", p.Required) + populate(objectMap, "schemaId", p.SchemaID) + populate(objectMap, "type", p.Type) + populate(objectMap, "typeName", p.TypeName) + populate(objectMap, "values", p.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ParameterContract. +func (p *ParameterContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultValue": + err = unpopulate(val, "DefaultValue", &p.DefaultValue) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "examples": + err = unpopulate(val, "Examples", &p.Examples) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "required": + err = unpopulate(val, "Required", &p.Required) + delete(rawMsg, key) + case "schemaId": + err = unpopulate(val, "SchemaID", &p.SchemaID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &p.TypeName) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &p.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ParameterExampleContract. +func (p ParameterExampleContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", p.Description) + populate(objectMap, "externalValue", p.ExternalValue) + populate(objectMap, "summary", p.Summary) + populateAny(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ParameterExampleContract. +func (p *ParameterExampleContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "externalValue": + err = unpopulate(val, "ExternalValue", &p.ExternalValue) + delete(rawMsg, key) + case "summary": + err = unpopulate(val, "Summary", &p.Summary) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PipelineDiagnosticSettings. +func (p PipelineDiagnosticSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "request", p.Request) + populate(objectMap, "response", p.Response) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PipelineDiagnosticSettings. +func (p *PipelineDiagnosticSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "request": + err = unpopulate(val, "Request", &p.Request) + delete(rawMsg, key) + case "response": + err = unpopulate(val, "Response", &p.Response) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyCollection. +func (p PolicyCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", p.Count) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyCollection. +func (p *PolicyCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &p.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyContract. +func (p PolicyContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyContract. +func (p *PolicyContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyContractProperties. +func (p PolicyContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "format", p.Format) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyContractProperties. +func (p *PolicyContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "format": + err = unpopulate(val, "Format", &p.Format) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyDescriptionCollection. +func (p PolicyDescriptionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", p.Count) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyDescriptionCollection. +func (p *PolicyDescriptionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &p.Count) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyDescriptionContract. +func (p PolicyDescriptionContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyDescriptionContract. +func (p *PolicyDescriptionContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyDescriptionContractProperties. +func (p PolicyDescriptionContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", p.Description) + populate(objectMap, "scope", p.Scope) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyDescriptionContractProperties. +func (p *PolicyDescriptionContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &p.Scope) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyFragmentCollection. +func (p PolicyFragmentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", p.Count) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyFragmentCollection. +func (p *PolicyFragmentCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &p.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyFragmentContract. +func (p PolicyFragmentContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyFragmentContract. +func (p *PolicyFragmentContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyFragmentContractProperties. +func (p PolicyFragmentContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", p.Description) + populate(objectMap, "format", p.Format) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyFragmentContractProperties. +func (p *PolicyFragmentContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "format": + err = unpopulate(val, "Format", &p.Format) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyRestrictionCollection. +func (p PolicyRestrictionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyRestrictionCollection. +func (p *PolicyRestrictionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyRestrictionContract. +func (p PolicyRestrictionContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyRestrictionContract. +func (p *PolicyRestrictionContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyRestrictionContractProperties. +func (p PolicyRestrictionContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "requireBase", p.RequireBase) + populate(objectMap, "scope", p.Scope) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyRestrictionContractProperties. +func (p *PolicyRestrictionContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "requireBase": + err = unpopulate(val, "RequireBase", &p.RequireBase) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &p.Scope) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyRestrictionUpdateContract. +func (p PolicyRestrictionUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyRestrictionUpdateContract. +func (p *PolicyRestrictionUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyWithComplianceCollection. +func (p PolicyWithComplianceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyWithComplianceCollection. +func (p *PolicyWithComplianceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyWithComplianceContract. +func (p PolicyWithComplianceContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyWithComplianceContract. +func (p *PolicyWithComplianceContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyWithComplianceContractProperties. +func (p PolicyWithComplianceContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "complianceState", p.ComplianceState) + populate(objectMap, "referencePolicyId", p.ReferencePolicyID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyWithComplianceContractProperties. +func (p *PolicyWithComplianceContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "complianceState": + err = unpopulate(val, "ComplianceState", &p.ComplianceState) + delete(rawMsg, key) + case "referencePolicyId": + err = unpopulate(val, "ReferencePolicyID", &p.ReferencePolicyID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalConfigCollection. +func (p PortalConfigCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigCollection. +func (p *PortalConfigCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalConfigContract. +func (p PortalConfigContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigContract. +func (p *PortalConfigContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalConfigCorsProperties. +func (p PortalConfigCorsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedOrigins", p.AllowedOrigins) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigCorsProperties. +func (p *PortalConfigCorsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedOrigins": + err = unpopulate(val, "AllowedOrigins", &p.AllowedOrigins) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalConfigCspProperties. +func (p PortalConfigCspProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedSources", p.AllowedSources) + populate(objectMap, "mode", p.Mode) + populate(objectMap, "reportUri", p.ReportURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigCspProperties. +func (p *PortalConfigCspProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedSources": + err = unpopulate(val, "AllowedSources", &p.AllowedSources) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &p.Mode) + delete(rawMsg, key) + case "reportUri": + err = unpopulate(val, "ReportURI", &p.ReportURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalConfigDelegationProperties. +func (p PortalConfigDelegationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "delegateRegistration", p.DelegateRegistration) + populate(objectMap, "delegateSubscription", p.DelegateSubscription) + populate(objectMap, "delegationUrl", p.DelegationURL) + populate(objectMap, "validationKey", p.ValidationKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigDelegationProperties. +func (p *PortalConfigDelegationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "delegateRegistration": + err = unpopulate(val, "DelegateRegistration", &p.DelegateRegistration) + delete(rawMsg, key) + case "delegateSubscription": + err = unpopulate(val, "DelegateSubscription", &p.DelegateSubscription) + delete(rawMsg, key) + case "delegationUrl": + err = unpopulate(val, "DelegationURL", &p.DelegationURL) + delete(rawMsg, key) + case "validationKey": + err = unpopulate(val, "ValidationKey", &p.ValidationKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalConfigProperties. +func (p PortalConfigProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cors", p.Cors) + populate(objectMap, "csp", p.Csp) + populate(objectMap, "delegation", p.Delegation) + populate(objectMap, "enableBasicAuth", p.EnableBasicAuth) + populate(objectMap, "signin", p.Signin) + populate(objectMap, "signup", p.Signup) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigProperties. +func (p *PortalConfigProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cors": + err = unpopulate(val, "Cors", &p.Cors) + delete(rawMsg, key) + case "csp": + err = unpopulate(val, "Csp", &p.Csp) + delete(rawMsg, key) + case "delegation": + err = unpopulate(val, "Delegation", &p.Delegation) + delete(rawMsg, key) + case "enableBasicAuth": + err = unpopulate(val, "EnableBasicAuth", &p.EnableBasicAuth) + delete(rawMsg, key) + case "signin": + err = unpopulate(val, "Signin", &p.Signin) + delete(rawMsg, key) + case "signup": + err = unpopulate(val, "Signup", &p.Signup) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalConfigPropertiesSignin. +func (p PortalConfigPropertiesSignin) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "require", p.Require) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigPropertiesSignin. +func (p *PortalConfigPropertiesSignin) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "require": + err = unpopulate(val, "Require", &p.Require) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalConfigPropertiesSignup. +func (p PortalConfigPropertiesSignup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "termsOfService", p.TermsOfService) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigPropertiesSignup. +func (p *PortalConfigPropertiesSignup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "termsOfService": + err = unpopulate(val, "TermsOfService", &p.TermsOfService) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalConfigTermsOfServiceProperties. +func (p PortalConfigTermsOfServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "requireConsent", p.RequireConsent) + populate(objectMap, "text", p.Text) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalConfigTermsOfServiceProperties. +func (p *PortalConfigTermsOfServiceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "requireConsent": + err = unpopulate(val, "RequireConsent", &p.RequireConsent) + delete(rawMsg, key) + case "text": + err = unpopulate(val, "Text", &p.Text) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalDelegationSettings. +func (p PortalDelegationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalDelegationSettings. +func (p *PortalDelegationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalDelegationSettingsProperties. +func (p PortalDelegationSettingsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "subscriptions", p.Subscriptions) + populate(objectMap, "url", p.URL) + populate(objectMap, "userRegistration", p.UserRegistration) + populate(objectMap, "validationKey", p.ValidationKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalDelegationSettingsProperties. +func (p *PortalDelegationSettingsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "subscriptions": + err = unpopulate(val, "Subscriptions", &p.Subscriptions) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &p.URL) + delete(rawMsg, key) + case "userRegistration": + err = unpopulate(val, "UserRegistration", &p.UserRegistration) + delete(rawMsg, key) + case "validationKey": + err = unpopulate(val, "ValidationKey", &p.ValidationKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalRevisionCollection. +func (p PortalRevisionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalRevisionCollection. +func (p *PortalRevisionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalRevisionContract. +func (p PortalRevisionContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalRevisionContract. +func (p *PortalRevisionContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalRevisionContractProperties. +func (p PortalRevisionContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdDateTime", p.CreatedDateTime) + populate(objectMap, "description", p.Description) + populate(objectMap, "isCurrent", p.IsCurrent) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "status", p.Status) + populate(objectMap, "statusDetails", p.StatusDetails) + populateDateTimeRFC3339(objectMap, "updatedDateTime", p.UpdatedDateTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalRevisionContractProperties. +func (p *PortalRevisionContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdDateTime": + err = unpopulateDateTimeRFC3339(val, "CreatedDateTime", &p.CreatedDateTime) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "isCurrent": + err = unpopulate(val, "IsCurrent", &p.IsCurrent) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + case "statusDetails": + err = unpopulate(val, "StatusDetails", &p.StatusDetails) + delete(rawMsg, key) + case "updatedDateTime": + err = unpopulateDateTimeRFC3339(val, "UpdatedDateTime", &p.UpdatedDateTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalSettingValidationKeyContract. +func (p PortalSettingValidationKeyContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "validationKey", p.ValidationKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingValidationKeyContract. +func (p *PortalSettingValidationKeyContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "validationKey": + err = unpopulate(val, "ValidationKey", &p.ValidationKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalSettingsCollection. +func (p PortalSettingsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", p.Count) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingsCollection. +func (p *PortalSettingsCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &p.Count) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalSettingsContract. +func (p PortalSettingsContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingsContract. +func (p *PortalSettingsContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalSettingsContractProperties. +func (p PortalSettingsContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", p.Enabled) + populate(objectMap, "subscriptions", p.Subscriptions) + populate(objectMap, "termsOfService", p.TermsOfService) + populate(objectMap, "url", p.URL) + populate(objectMap, "userRegistration", p.UserRegistration) + populate(objectMap, "validationKey", p.ValidationKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSettingsContractProperties. +func (p *PortalSettingsContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &p.Enabled) + delete(rawMsg, key) + case "subscriptions": + err = unpopulate(val, "Subscriptions", &p.Subscriptions) + delete(rawMsg, key) + case "termsOfService": + err = unpopulate(val, "TermsOfService", &p.TermsOfService) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &p.URL) + delete(rawMsg, key) + case "userRegistration": + err = unpopulate(val, "UserRegistration", &p.UserRegistration) + delete(rawMsg, key) + case "validationKey": + err = unpopulate(val, "ValidationKey", &p.ValidationKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalSigninSettingProperties. +func (p PortalSigninSettingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", p.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSigninSettingProperties. +func (p *PortalSigninSettingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &p.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalSigninSettings. +func (p PortalSigninSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSigninSettings. +func (p *PortalSigninSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalSignupSettings. +func (p PortalSignupSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSignupSettings. +func (p *PortalSignupSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PortalSignupSettingsProperties. +func (p PortalSignupSettingsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", p.Enabled) + populate(objectMap, "termsOfService", p.TermsOfService) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortalSignupSettingsProperties. +func (p *PortalSignupSettingsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &p.Enabled) + delete(rawMsg, key) + case "termsOfService": + err = unpopulate(val, "TermsOfService", &p.TermsOfService) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. +func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. +func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. +func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionRequest. +func (p PrivateEndpointConnectionRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionRequest. +func (p *PrivateEndpointConnectionRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionRequestProperties. +func (p PrivateEndpointConnectionRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionRequestProperties. +func (p *PrivateEndpointConnectionRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionWrapperProperties. +func (p PrivateEndpointConnectionWrapperProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupIds", p.GroupIDs) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionWrapperProperties. +func (p *PrivateEndpointConnectionWrapperProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupIds": + err = unpopulate(val, "GroupIDs", &p.GroupIDs) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. +func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. +func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. +func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. +func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductAPILinkCollection. +func (p ProductAPILinkCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", p.Count) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductAPILinkCollection. +func (p *ProductAPILinkCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &p.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductAPILinkContract. +func (p ProductAPILinkContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductAPILinkContract. +func (p *ProductAPILinkContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductAPILinkContractProperties. +func (p ProductAPILinkContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiId", p.APIID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductAPILinkContractProperties. +func (p *ProductAPILinkContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiId": + err = unpopulate(val, "APIID", &p.APIID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductCollection. +func (p ProductCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", p.Count) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductCollection. +func (p *ProductCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &p.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductContract. +func (p ProductContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductContract. +func (p *ProductContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductContractProperties. +func (p ProductContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "approvalRequired", p.ApprovalRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "displayName", p.DisplayName) + populate(objectMap, "state", p.State) + populate(objectMap, "subscriptionRequired", p.SubscriptionRequired) + populate(objectMap, "subscriptionsLimit", p.SubscriptionsLimit) + populate(objectMap, "terms", p.Terms) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductContractProperties. +func (p *ProductContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "approvalRequired": + err = unpopulate(val, "ApprovalRequired", &p.ApprovalRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &p.DisplayName) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + case "subscriptionRequired": + err = unpopulate(val, "SubscriptionRequired", &p.SubscriptionRequired) + delete(rawMsg, key) + case "subscriptionsLimit": + err = unpopulate(val, "SubscriptionsLimit", &p.SubscriptionsLimit) + delete(rawMsg, key) + case "terms": + err = unpopulate(val, "Terms", &p.Terms) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductEntityBaseParameters. +func (p ProductEntityBaseParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "approvalRequired", p.ApprovalRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "state", p.State) + populate(objectMap, "subscriptionRequired", p.SubscriptionRequired) + populate(objectMap, "subscriptionsLimit", p.SubscriptionsLimit) + populate(objectMap, "terms", p.Terms) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductEntityBaseParameters. +func (p *ProductEntityBaseParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "approvalRequired": + err = unpopulate(val, "ApprovalRequired", &p.ApprovalRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + case "subscriptionRequired": + err = unpopulate(val, "SubscriptionRequired", &p.SubscriptionRequired) + delete(rawMsg, key) + case "subscriptionsLimit": + err = unpopulate(val, "SubscriptionsLimit", &p.SubscriptionsLimit) + delete(rawMsg, key) + case "terms": + err = unpopulate(val, "Terms", &p.Terms) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductGroupLinkCollection. +func (p ProductGroupLinkCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", p.Count) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductGroupLinkCollection. +func (p *ProductGroupLinkCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &p.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductGroupLinkContract. +func (p ProductGroupLinkContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductGroupLinkContract. +func (p *ProductGroupLinkContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductGroupLinkContractProperties. +func (p ProductGroupLinkContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductGroupLinkContractProperties. +func (p *ProductGroupLinkContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductTagResourceContractProperties. +func (p ProductTagResourceContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "approvalRequired", p.ApprovalRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "state", p.State) + populate(objectMap, "subscriptionRequired", p.SubscriptionRequired) + populate(objectMap, "subscriptionsLimit", p.SubscriptionsLimit) + populate(objectMap, "terms", p.Terms) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductTagResourceContractProperties. +func (p *ProductTagResourceContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "approvalRequired": + err = unpopulate(val, "ApprovalRequired", &p.ApprovalRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + case "subscriptionRequired": + err = unpopulate(val, "SubscriptionRequired", &p.SubscriptionRequired) + delete(rawMsg, key) + case "subscriptionsLimit": + err = unpopulate(val, "SubscriptionsLimit", &p.SubscriptionsLimit) + delete(rawMsg, key) + case "terms": + err = unpopulate(val, "Terms", &p.Terms) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductUpdateParameters. +func (p ProductUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductUpdateParameters. +func (p *ProductUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProductUpdateProperties. +func (p ProductUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "approvalRequired", p.ApprovalRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "displayName", p.DisplayName) + populate(objectMap, "state", p.State) + populate(objectMap, "subscriptionRequired", p.SubscriptionRequired) + populate(objectMap, "subscriptionsLimit", p.SubscriptionsLimit) + populate(objectMap, "terms", p.Terms) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProductUpdateProperties. +func (p *ProductUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "approvalRequired": + err = unpopulate(val, "ApprovalRequired", &p.ApprovalRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &p.DisplayName) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + case "subscriptionRequired": + err = unpopulate(val, "SubscriptionRequired", &p.SubscriptionRequired) + delete(rawMsg, key) + case "subscriptionsLimit": + err = unpopulate(val, "SubscriptionsLimit", &p.SubscriptionsLimit) + delete(rawMsg, key) + case "terms": + err = unpopulate(val, "Terms", &p.Terms) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProxyResource. +func (p ProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. +func (p *ProxyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaCounterCollection. +func (q QuotaCounterCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", q.Count) + populate(objectMap, "nextLink", q.NextLink) + populate(objectMap, "value", q.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterCollection. +func (q *QuotaCounterCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &q.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &q.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &q.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaCounterContract. +func (q QuotaCounterContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "counterKey", q.CounterKey) + populateDateTimeRFC3339(objectMap, "periodEndTime", q.PeriodEndTime) + populate(objectMap, "periodKey", q.PeriodKey) + populateDateTimeRFC3339(objectMap, "periodStartTime", q.PeriodStartTime) + populate(objectMap, "value", q.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterContract. +func (q *QuotaCounterContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "counterKey": + err = unpopulate(val, "CounterKey", &q.CounterKey) + delete(rawMsg, key) + case "periodEndTime": + err = unpopulateDateTimeRFC3339(val, "PeriodEndTime", &q.PeriodEndTime) + delete(rawMsg, key) + case "periodKey": + err = unpopulate(val, "PeriodKey", &q.PeriodKey) + delete(rawMsg, key) + case "periodStartTime": + err = unpopulateDateTimeRFC3339(val, "PeriodStartTime", &q.PeriodStartTime) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &q.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaCounterValueContract. +func (q QuotaCounterValueContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", q.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterValueContract. +func (q *QuotaCounterValueContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &q.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaCounterValueContractProperties. +func (q QuotaCounterValueContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "callsCount", q.CallsCount) + populate(objectMap, "kbTransferred", q.KbTransferred) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterValueContractProperties. +func (q *QuotaCounterValueContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "callsCount": + err = unpopulate(val, "CallsCount", &q.CallsCount) + delete(rawMsg, key) + case "kbTransferred": + err = unpopulate(val, "KbTransferred", &q.KbTransferred) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaCounterValueUpdateContract. +func (q QuotaCounterValueUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", q.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaCounterValueUpdateContract. +func (q *QuotaCounterValueUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &q.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecipientEmailCollection. +func (r RecipientEmailCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", r.Count) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientEmailCollection. +func (r *RecipientEmailCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &r.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecipientEmailContract. +func (r RecipientEmailContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientEmailContract. +func (r *RecipientEmailContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecipientEmailContractProperties. +func (r RecipientEmailContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "email", r.Email) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientEmailContractProperties. +func (r *RecipientEmailContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "email": + err = unpopulate(val, "Email", &r.Email) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecipientUserCollection. +func (r RecipientUserCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", r.Count) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientUserCollection. +func (r *RecipientUserCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &r.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecipientUserContract. +func (r RecipientUserContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientUserContract. +func (r *RecipientUserContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecipientUsersContractProperties. +func (r RecipientUsersContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "userId", r.UserID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientUsersContractProperties. +func (r *RecipientUsersContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "userId": + err = unpopulate(val, "UserID", &r.UserID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecipientsContractProperties. +func (r RecipientsContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "emails", r.Emails) + populate(objectMap, "users", r.Users) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecipientsContractProperties. +func (r *RecipientsContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "emails": + err = unpopulate(val, "Emails", &r.Emails) + delete(rawMsg, key) + case "users": + err = unpopulate(val, "Users", &r.Users) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegionContract. +func (r RegionContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isDeleted", r.IsDeleted) + populate(objectMap, "isMasterRegion", r.IsMasterRegion) + populate(objectMap, "name", r.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegionContract. +func (r *RegionContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isDeleted": + err = unpopulate(val, "IsDeleted", &r.IsDeleted) + delete(rawMsg, key) + case "isMasterRegion": + err = unpopulate(val, "IsMasterRegion", &r.IsMasterRegion) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegionListResult. +func (r RegionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", r.Count) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegionListResult. +func (r *RegionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &r.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistrationDelegationSettingsProperties. +func (r RegistrationDelegationSettingsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", r.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationDelegationSettingsProperties. +func (r *RegistrationDelegationSettingsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &r.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnectionWrapper. +func (r RemotePrivateEndpointConnectionWrapper) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnectionWrapper. +func (r *RemotePrivateEndpointConnectionWrapper) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReportCollection. +func (r ReportCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", r.Count) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReportCollection. +func (r *ReportCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &r.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReportRecordContract. +func (r ReportRecordContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiId", r.APIID) + populate(objectMap, "apiRegion", r.APIRegion) + populate(objectMap, "apiTimeAvg", r.APITimeAvg) + populate(objectMap, "apiTimeMax", r.APITimeMax) + populate(objectMap, "apiTimeMin", r.APITimeMin) + populate(objectMap, "bandwidth", r.Bandwidth) + populate(objectMap, "cacheHitCount", r.CacheHitCount) + populate(objectMap, "cacheMissCount", r.CacheMissCount) + populate(objectMap, "callCountBlocked", r.CallCountBlocked) + populate(objectMap, "callCountFailed", r.CallCountFailed) + populate(objectMap, "callCountOther", r.CallCountOther) + populate(objectMap, "callCountSuccess", r.CallCountSuccess) + populate(objectMap, "callCountTotal", r.CallCountTotal) + populate(objectMap, "country", r.Country) + populate(objectMap, "interval", r.Interval) + populate(objectMap, "name", r.Name) + populate(objectMap, "operationId", r.OperationID) + populate(objectMap, "productId", r.ProductID) + populate(objectMap, "region", r.Region) + populate(objectMap, "serviceTimeAvg", r.ServiceTimeAvg) + populate(objectMap, "serviceTimeMax", r.ServiceTimeMax) + populate(objectMap, "serviceTimeMin", r.ServiceTimeMin) + populate(objectMap, "subscriptionId", r.SubscriptionID) + populateDateTimeRFC3339(objectMap, "timestamp", r.Timestamp) + populate(objectMap, "userId", r.UserID) + populate(objectMap, "zip", r.Zip) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReportRecordContract. +func (r *ReportRecordContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiId": + err = unpopulate(val, "APIID", &r.APIID) + delete(rawMsg, key) + case "apiRegion": + err = unpopulate(val, "APIRegion", &r.APIRegion) + delete(rawMsg, key) + case "apiTimeAvg": + err = unpopulate(val, "APITimeAvg", &r.APITimeAvg) + delete(rawMsg, key) + case "apiTimeMax": + err = unpopulate(val, "APITimeMax", &r.APITimeMax) + delete(rawMsg, key) + case "apiTimeMin": + err = unpopulate(val, "APITimeMin", &r.APITimeMin) + delete(rawMsg, key) + case "bandwidth": + err = unpopulate(val, "Bandwidth", &r.Bandwidth) + delete(rawMsg, key) + case "cacheHitCount": + err = unpopulate(val, "CacheHitCount", &r.CacheHitCount) + delete(rawMsg, key) + case "cacheMissCount": + err = unpopulate(val, "CacheMissCount", &r.CacheMissCount) + delete(rawMsg, key) + case "callCountBlocked": + err = unpopulate(val, "CallCountBlocked", &r.CallCountBlocked) + delete(rawMsg, key) + case "callCountFailed": + err = unpopulate(val, "CallCountFailed", &r.CallCountFailed) + delete(rawMsg, key) + case "callCountOther": + err = unpopulate(val, "CallCountOther", &r.CallCountOther) + delete(rawMsg, key) + case "callCountSuccess": + err = unpopulate(val, "CallCountSuccess", &r.CallCountSuccess) + delete(rawMsg, key) + case "callCountTotal": + err = unpopulate(val, "CallCountTotal", &r.CallCountTotal) + delete(rawMsg, key) + case "country": + err = unpopulate(val, "Country", &r.Country) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &r.Interval) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "operationId": + err = unpopulate(val, "OperationID", &r.OperationID) + delete(rawMsg, key) + case "productId": + err = unpopulate(val, "ProductID", &r.ProductID) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &r.Region) + delete(rawMsg, key) + case "serviceTimeAvg": + err = unpopulate(val, "ServiceTimeAvg", &r.ServiceTimeAvg) + delete(rawMsg, key) + case "serviceTimeMax": + err = unpopulate(val, "ServiceTimeMax", &r.ServiceTimeMax) + delete(rawMsg, key) + case "serviceTimeMin": + err = unpopulate(val, "ServiceTimeMin", &r.ServiceTimeMin) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &r.SubscriptionID) + delete(rawMsg, key) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &r.Timestamp) + delete(rawMsg, key) + case "userId": + err = unpopulate(val, "UserID", &r.UserID) + delete(rawMsg, key) + case "zip": + err = unpopulate(val, "Zip", &r.Zip) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RepresentationContract. +func (r RepresentationContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentType", r.ContentType) + populate(objectMap, "examples", r.Examples) + populate(objectMap, "formParameters", r.FormParameters) + populate(objectMap, "schemaId", r.SchemaID) + populate(objectMap, "typeName", r.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RepresentationContract. +func (r *RepresentationContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentType": + err = unpopulate(val, "ContentType", &r.ContentType) + delete(rawMsg, key) + case "examples": + err = unpopulate(val, "Examples", &r.Examples) + delete(rawMsg, key) + case "formParameters": + err = unpopulate(val, "FormParameters", &r.FormParameters) + delete(rawMsg, key) + case "schemaId": + err = unpopulate(val, "SchemaID", &r.SchemaID) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &r.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestContract. +func (r RequestContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "headers", r.Headers) + populate(objectMap, "queryParameters", r.QueryParameters) + populate(objectMap, "representations", r.Representations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestContract. +func (r *RequestContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &r.Headers) + delete(rawMsg, key) + case "queryParameters": + err = unpopulate(val, "QueryParameters", &r.QueryParameters) + delete(rawMsg, key) + case "representations": + err = unpopulate(val, "Representations", &r.Representations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestReportCollection. +func (r RequestReportCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", r.Count) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestReportCollection. +func (r *RequestReportCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &r.Count) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestReportRecordContract. +func (r RequestReportRecordContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiId", r.APIID) + populate(objectMap, "apiRegion", r.APIRegion) + populate(objectMap, "apiTime", r.APITime) + populate(objectMap, "backendResponseCode", r.BackendResponseCode) + populate(objectMap, "cache", r.Cache) + populate(objectMap, "ipAddress", r.IPAddress) + populate(objectMap, "method", r.Method) + populate(objectMap, "operationId", r.OperationID) + populate(objectMap, "productId", r.ProductID) + populate(objectMap, "requestId", r.RequestID) + populate(objectMap, "requestSize", r.RequestSize) + populate(objectMap, "responseCode", r.ResponseCode) + populate(objectMap, "responseSize", r.ResponseSize) + populate(objectMap, "serviceTime", r.ServiceTime) + populate(objectMap, "subscriptionId", r.SubscriptionID) + populateDateTimeRFC3339(objectMap, "timestamp", r.Timestamp) + populate(objectMap, "url", r.URL) + populate(objectMap, "userId", r.UserID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestReportRecordContract. +func (r *RequestReportRecordContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiId": + err = unpopulate(val, "APIID", &r.APIID) + delete(rawMsg, key) + case "apiRegion": + err = unpopulate(val, "APIRegion", &r.APIRegion) + delete(rawMsg, key) + case "apiTime": + err = unpopulate(val, "APITime", &r.APITime) + delete(rawMsg, key) + case "backendResponseCode": + err = unpopulate(val, "BackendResponseCode", &r.BackendResponseCode) + delete(rawMsg, key) + case "cache": + err = unpopulate(val, "Cache", &r.Cache) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &r.IPAddress) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &r.Method) + delete(rawMsg, key) + case "operationId": + err = unpopulate(val, "OperationID", &r.OperationID) + delete(rawMsg, key) + case "productId": + err = unpopulate(val, "ProductID", &r.ProductID) + delete(rawMsg, key) + case "requestId": + err = unpopulate(val, "RequestID", &r.RequestID) + delete(rawMsg, key) + case "requestSize": + err = unpopulate(val, "RequestSize", &r.RequestSize) + delete(rawMsg, key) + case "responseCode": + err = unpopulate(val, "ResponseCode", &r.ResponseCode) + delete(rawMsg, key) + case "responseSize": + err = unpopulate(val, "ResponseSize", &r.ResponseSize) + delete(rawMsg, key) + case "serviceTime": + err = unpopulate(val, "ServiceTime", &r.ServiceTime) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &r.SubscriptionID) + delete(rawMsg, key) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &r.Timestamp) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &r.URL) + delete(rawMsg, key) + case "userId": + err = unpopulate(val, "UserID", &r.UserID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolverCollection. +func (r ResolverCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", r.Count) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolverCollection. +func (r *ResolverCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &r.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolverContract. +func (r ResolverContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolverContract. +func (r *ResolverContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolverEntityBaseContract. +func (r ResolverEntityBaseContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "displayName", r.DisplayName) + populate(objectMap, "path", r.Path) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolverEntityBaseContract. +func (r *ResolverEntityBaseContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &r.DisplayName) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &r.Path) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolverResultContract. +func (r ResolverResultContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolverResultContract. +func (r *ResolverResultContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolverResultContractProperties. +func (r ResolverResultContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionLog", r.ActionLog) + populate(objectMap, "error", r.Error) + populate(objectMap, "id", r.ID) + populate(objectMap, "resultInfo", r.ResultInfo) + populateDateTimeRFC3339(objectMap, "started", r.Started) + populate(objectMap, "status", r.Status) + populateDateTimeRFC3339(objectMap, "updated", r.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolverResultContractProperties. +func (r *ResolverResultContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionLog": + err = unpopulate(val, "ActionLog", &r.ActionLog) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &r.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "resultInfo": + err = unpopulate(val, "ResultInfo", &r.ResultInfo) + delete(rawMsg, key) + case "started": + err = unpopulateDateTimeRFC3339(val, "Started", &r.Started) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &r.Status) + delete(rawMsg, key) + case "updated": + err = unpopulateDateTimeRFC3339(val, "Updated", &r.Updated) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolverResultLogItemContract. +func (r ResolverResultLogItemContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", r.Action) + populate(objectMap, "objectKey", r.ObjectKey) + populate(objectMap, "objectType", r.ObjectType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolverResultLogItemContract. +func (r *ResolverResultLogItemContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &r.Action) + delete(rawMsg, key) + case "objectKey": + err = unpopulate(val, "ObjectKey", &r.ObjectKey) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &r.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolverUpdateContract. +func (r ResolverUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolverUpdateContract. +func (r *ResolverUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolverUpdateContractProperties. +func (r ResolverUpdateContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "displayName", r.DisplayName) + populate(objectMap, "path", r.Path) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolverUpdateContractProperties. +func (r *ResolverUpdateContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &r.DisplayName) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &r.Path) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceCollection. +func (r ResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", r.Count) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCollection. +func (r *ResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &r.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceCollectionValueItem. +func (r ResourceCollectionValueItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCollectionValueItem. +func (r *ResourceCollectionValueItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceLocationDataContract. +func (r ResourceLocationDataContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "city", r.City) + populate(objectMap, "countryOrRegion", r.CountryOrRegion) + populate(objectMap, "district", r.District) + populate(objectMap, "name", r.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceLocationDataContract. +func (r *ResourceLocationDataContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "city": + err = unpopulate(val, "City", &r.City) + delete(rawMsg, key) + case "countryOrRegion": + err = unpopulate(val, "CountryOrRegion", &r.CountryOrRegion) + delete(rawMsg, key) + case "district": + err = unpopulate(val, "District", &r.District) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKU. +func (r ResourceSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", r.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU. +func (r *ResourceSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapacity. +func (r ResourceSKUCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "default", r.Default) + populate(objectMap, "maximum", r.Maximum) + populate(objectMap, "minimum", r.Minimum) + populate(objectMap, "scaleType", r.ScaleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapacity. +func (r *ResourceSKUCapacity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &r.Default) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &r.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &r.Minimum) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &r.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKUResult. +func (r ResourceSKUResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", r.Capacity) + populate(objectMap, "resourceType", r.ResourceType) + populate(objectMap, "sku", r.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUResult. +func (r *ResourceSKUResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &r.Capacity) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &r.ResourceType) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &r.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKUResults. +func (r ResourceSKUResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUResults. +func (r *ResourceSKUResults) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResponseContract. +func (r ResponseContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "headers", r.Headers) + populate(objectMap, "representations", r.Representations) + populate(objectMap, "statusCode", r.StatusCode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResponseContract. +func (r *ResponseContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &r.Headers) + delete(rawMsg, key) + case "representations": + err = unpopulate(val, "Representations", &r.Representations) + delete(rawMsg, key) + case "statusCode": + err = unpopulate(val, "StatusCode", &r.StatusCode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKU. +func (s SKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiVersions", s.APIVersions) + populate(objectMap, "capabilities", s.Capabilities) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "costs", s.Costs) + populate(objectMap, "family", s.Family) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "locationInfo", s.LocationInfo) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "name", s.Name) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "restrictions", s.Restrictions) + populate(objectMap, "size", s.Size) + populate(objectMap, "tier", s.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. +func (s *SKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiVersions": + err = unpopulate(val, "APIVersions", &s.APIVersions) + delete(rawMsg, key) + case "capabilities": + err = unpopulate(val, "Capabilities", &s.Capabilities) + delete(rawMsg, key) + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "costs": + err = unpopulate(val, "Costs", &s.Costs) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &s.Family) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "locationInfo": + err = unpopulate(val, "LocationInfo", &s.LocationInfo) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &s.Locations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + case "restrictions": + err = unpopulate(val, "Restrictions", &s.Restrictions) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &s.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUCapabilities. +func (s SKUCapabilities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapabilities. +func (s *SKUCapabilities) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUCapacity. +func (s SKUCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "default", s.Default) + populate(objectMap, "maximum", s.Maximum) + populate(objectMap, "minimum", s.Minimum) + populate(objectMap, "scaleType", s.ScaleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity. +func (s *SKUCapacity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &s.Default) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &s.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &s.Minimum) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &s.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUCosts. +func (s SKUCosts) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedUnit", s.ExtendedUnit) + populate(objectMap, "meterID", s.MeterID) + populate(objectMap, "quantity", s.Quantity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCosts. +func (s *SKUCosts) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedUnit": + err = unpopulate(val, "ExtendedUnit", &s.ExtendedUnit) + delete(rawMsg, key) + case "meterID": + err = unpopulate(val, "MeterID", &s.MeterID) + delete(rawMsg, key) + case "quantity": + err = unpopulate(val, "Quantity", &s.Quantity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKULocationInfo. +func (s SKULocationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", s.Location) + populate(objectMap, "zoneDetails", s.ZoneDetails) + populate(objectMap, "zones", s.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKULocationInfo. +func (s *SKULocationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "zoneDetails": + err = unpopulate(val, "ZoneDetails", &s.ZoneDetails) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &s.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKURestrictionInfo. +func (s SKURestrictionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "zones", s.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKURestrictionInfo. +func (s *SKURestrictionInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "locations": + err = unpopulate(val, "Locations", &s.Locations) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &s.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKURestrictions. +func (s SKURestrictions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "reasonCode", s.ReasonCode) + populate(objectMap, "restrictionInfo", s.RestrictionInfo) + populate(objectMap, "type", s.Type) + populate(objectMap, "values", s.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKURestrictions. +func (s *SKURestrictions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "reasonCode": + err = unpopulate(val, "ReasonCode", &s.ReasonCode) + delete(rawMsg, key) + case "restrictionInfo": + err = unpopulate(val, "RestrictionInfo", &s.RestrictionInfo) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &s.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUZoneDetails. +func (s SKUZoneDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capabilities", s.Capabilities) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUZoneDetails. +func (s *SKUZoneDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capabilities": + err = unpopulate(val, "Capabilities", &s.Capabilities) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUsResult. +func (s SKUsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUsResult. +func (s *SKUsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SamplingSettings. +func (s SamplingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "percentage", s.Percentage) + populate(objectMap, "samplingType", s.SamplingType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SamplingSettings. +func (s *SamplingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "percentage": + err = unpopulate(val, "Percentage", &s.Percentage) + delete(rawMsg, key) + case "samplingType": + err = unpopulate(val, "SamplingType", &s.SamplingType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SaveConfigurationParameter. +func (s SaveConfigurationParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SaveConfigurationParameter. +func (s *SaveConfigurationParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SaveConfigurationParameterProperties. +func (s SaveConfigurationParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "branch", s.Branch) + populate(objectMap, "force", s.Force) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SaveConfigurationParameterProperties. +func (s *SaveConfigurationParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "branch": + err = unpopulate(val, "Branch", &s.Branch) + delete(rawMsg, key) + case "force": + err = unpopulate(val, "Force", &s.Force) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SchemaCollection. +func (s SchemaCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", s.Count) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SchemaCollection. +func (s *SchemaCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &s.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SchemaContract. +func (s SchemaContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SchemaContract. +func (s *SchemaContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SchemaContractProperties. +func (s SchemaContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentType", s.ContentType) + populate(objectMap, "document", s.Document) + populate(objectMap, "provisioningState", s.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SchemaContractProperties. +func (s *SchemaContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentType": + err = unpopulate(val, "ContentType", &s.ContentType) + delete(rawMsg, key) + case "document": + err = unpopulate(val, "Document", &s.Document) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SchemaDocumentProperties. +func (s SchemaDocumentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "components", s.Components) + populateAny(objectMap, "definitions", s.Definitions) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SchemaDocumentProperties. +func (s *SchemaDocumentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "components": + err = unpopulate(val, "Components", &s.Components) + delete(rawMsg, key) + case "definitions": + err = unpopulate(val, "Definitions", &s.Definitions) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceApplyNetworkConfigurationParameters. +func (s ServiceApplyNetworkConfigurationParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", s.Location) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceApplyNetworkConfigurationParameters. +func (s *ServiceApplyNetworkConfigurationParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceBackupRestoreParameters. +func (s ServiceBackupRestoreParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessKey", s.AccessKey) + populate(objectMap, "accessType", s.AccessType) + populate(objectMap, "backupName", s.BackupName) + populate(objectMap, "clientId", s.ClientID) + populate(objectMap, "containerName", s.ContainerName) + populate(objectMap, "storageAccount", s.StorageAccount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBackupRestoreParameters. +func (s *ServiceBackupRestoreParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessKey": + err = unpopulate(val, "AccessKey", &s.AccessKey) + delete(rawMsg, key) + case "accessType": + err = unpopulate(val, "AccessType", &s.AccessType) + delete(rawMsg, key) + case "backupName": + err = unpopulate(val, "BackupName", &s.BackupName) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &s.ClientID) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &s.ContainerName) + delete(rawMsg, key) + case "storageAccount": + err = unpopulate(val, "StorageAccount", &s.StorageAccount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceBaseProperties. +func (s ServiceBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiVersionConstraint", s.APIVersionConstraint) + populate(objectMap, "additionalLocations", s.AdditionalLocations) + populate(objectMap, "certificates", s.Certificates) + populate(objectMap, "configurationApi", s.ConfigurationAPI) + populateDateTimeRFC3339(objectMap, "createdAtUtc", s.CreatedAtUTC) + populate(objectMap, "customProperties", s.CustomProperties) + populate(objectMap, "developerPortalStatus", s.DeveloperPortalStatus) + populate(objectMap, "developerPortalUrl", s.DeveloperPortalURL) + populate(objectMap, "disableGateway", s.DisableGateway) + populate(objectMap, "enableClientCertificate", s.EnableClientCertificate) + populate(objectMap, "gatewayRegionalUrl", s.GatewayRegionalURL) + populate(objectMap, "gatewayUrl", s.GatewayURL) + populate(objectMap, "hostnameConfigurations", s.HostnameConfigurations) + populate(objectMap, "legacyPortalStatus", s.LegacyPortalStatus) + populate(objectMap, "managementApiUrl", s.ManagementAPIURL) + populate(objectMap, "natGatewayState", s.NatGatewayState) + populate(objectMap, "notificationSenderEmail", s.NotificationSenderEmail) + populate(objectMap, "outboundPublicIPAddresses", s.OutboundPublicIPAddresses) + populate(objectMap, "platformVersion", s.PlatformVersion) + populate(objectMap, "portalUrl", s.PortalURL) + populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) + populate(objectMap, "privateIPAddresses", s.PrivateIPAddresses) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "publicIpAddressId", s.PublicIPAddressID) + populate(objectMap, "publicIPAddresses", s.PublicIPAddresses) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + populate(objectMap, "restore", s.Restore) + populate(objectMap, "scmUrl", s.ScmURL) + populate(objectMap, "targetProvisioningState", s.TargetProvisioningState) + populate(objectMap, "virtualNetworkConfiguration", s.VirtualNetworkConfiguration) + populate(objectMap, "virtualNetworkType", s.VirtualNetworkType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBaseProperties. +func (s *ServiceBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiVersionConstraint": + err = unpopulate(val, "APIVersionConstraint", &s.APIVersionConstraint) + delete(rawMsg, key) + case "additionalLocations": + err = unpopulate(val, "AdditionalLocations", &s.AdditionalLocations) + delete(rawMsg, key) + case "certificates": + err = unpopulate(val, "Certificates", &s.Certificates) + delete(rawMsg, key) + case "configurationApi": + err = unpopulate(val, "ConfigurationAPI", &s.ConfigurationAPI) + delete(rawMsg, key) + case "createdAtUtc": + err = unpopulateDateTimeRFC3339(val, "CreatedAtUTC", &s.CreatedAtUTC) + delete(rawMsg, key) + case "customProperties": + err = unpopulate(val, "CustomProperties", &s.CustomProperties) + delete(rawMsg, key) + case "developerPortalStatus": + err = unpopulate(val, "DeveloperPortalStatus", &s.DeveloperPortalStatus) + delete(rawMsg, key) + case "developerPortalUrl": + err = unpopulate(val, "DeveloperPortalURL", &s.DeveloperPortalURL) + delete(rawMsg, key) + case "disableGateway": + err = unpopulate(val, "DisableGateway", &s.DisableGateway) + delete(rawMsg, key) + case "enableClientCertificate": + err = unpopulate(val, "EnableClientCertificate", &s.EnableClientCertificate) + delete(rawMsg, key) + case "gatewayRegionalUrl": + err = unpopulate(val, "GatewayRegionalURL", &s.GatewayRegionalURL) + delete(rawMsg, key) + case "gatewayUrl": + err = unpopulate(val, "GatewayURL", &s.GatewayURL) + delete(rawMsg, key) + case "hostnameConfigurations": + err = unpopulate(val, "HostnameConfigurations", &s.HostnameConfigurations) + delete(rawMsg, key) + case "legacyPortalStatus": + err = unpopulate(val, "LegacyPortalStatus", &s.LegacyPortalStatus) + delete(rawMsg, key) + case "managementApiUrl": + err = unpopulate(val, "ManagementAPIURL", &s.ManagementAPIURL) + delete(rawMsg, key) + case "natGatewayState": + err = unpopulate(val, "NatGatewayState", &s.NatGatewayState) + delete(rawMsg, key) + case "notificationSenderEmail": + err = unpopulate(val, "NotificationSenderEmail", &s.NotificationSenderEmail) + delete(rawMsg, key) + case "outboundPublicIPAddresses": + err = unpopulate(val, "OutboundPublicIPAddresses", &s.OutboundPublicIPAddresses) + delete(rawMsg, key) + case "platformVersion": + err = unpopulate(val, "PlatformVersion", &s.PlatformVersion) + delete(rawMsg, key) + case "portalUrl": + err = unpopulate(val, "PortalURL", &s.PortalURL) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) + delete(rawMsg, key) + case "privateIPAddresses": + err = unpopulate(val, "PrivateIPAddresses", &s.PrivateIPAddresses) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "publicIpAddressId": + err = unpopulate(val, "PublicIPAddressID", &s.PublicIPAddressID) + delete(rawMsg, key) + case "publicIPAddresses": + err = unpopulate(val, "PublicIPAddresses", &s.PublicIPAddresses) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + case "restore": + err = unpopulate(val, "Restore", &s.Restore) + delete(rawMsg, key) + case "scmUrl": + err = unpopulate(val, "ScmURL", &s.ScmURL) + delete(rawMsg, key) + case "targetProvisioningState": + err = unpopulate(val, "TargetProvisioningState", &s.TargetProvisioningState) + delete(rawMsg, key) + case "virtualNetworkConfiguration": + err = unpopulate(val, "VirtualNetworkConfiguration", &s.VirtualNetworkConfiguration) + delete(rawMsg, key) + case "virtualNetworkType": + err = unpopulate(val, "VirtualNetworkType", &s.VirtualNetworkType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceCheckNameAvailabilityParameters. +func (s ServiceCheckNameAvailabilityParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceCheckNameAvailabilityParameters. +func (s *ServiceCheckNameAvailabilityParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceGetDomainOwnershipIdentifierResult. +func (s ServiceGetDomainOwnershipIdentifierResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "domainOwnershipIdentifier", s.DomainOwnershipIdentifier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceGetDomainOwnershipIdentifierResult. +func (s *ServiceGetDomainOwnershipIdentifierResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domainOwnershipIdentifier": + err = unpopulate(val, "DomainOwnershipIdentifier", &s.DomainOwnershipIdentifier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceGetSsoTokenResult. +func (s ServiceGetSsoTokenResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "redirectUri", s.RedirectURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceGetSsoTokenResult. +func (s *ServiceGetSsoTokenResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "redirectUri": + err = unpopulate(val, "RedirectURI", &s.RedirectURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceIdentity. +func (s ServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", s.PrincipalID) + populate(objectMap, "tenantId", s.TenantID) + populate(objectMap, "type", s.Type) + populate(objectMap, "userAssignedIdentities", s.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceIdentity. +func (s *ServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &s.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &s.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &s.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceListResult. +func (s ServiceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceListResult. +func (s *ServiceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceNameAvailabilityResult. +func (s ServiceNameAvailabilityResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", s.Message) + populate(objectMap, "nameAvailable", s.NameAvailable) + populate(objectMap, "reason", s.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceNameAvailabilityResult. +func (s *ServiceNameAvailabilityResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &s.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &s.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &s.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceProperties. +func (s ServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiVersionConstraint", s.APIVersionConstraint) + populate(objectMap, "additionalLocations", s.AdditionalLocations) + populate(objectMap, "certificates", s.Certificates) + populate(objectMap, "configurationApi", s.ConfigurationAPI) + populateDateTimeRFC3339(objectMap, "createdAtUtc", s.CreatedAtUTC) + populate(objectMap, "customProperties", s.CustomProperties) + populate(objectMap, "developerPortalStatus", s.DeveloperPortalStatus) + populate(objectMap, "developerPortalUrl", s.DeveloperPortalURL) + populate(objectMap, "disableGateway", s.DisableGateway) + populate(objectMap, "enableClientCertificate", s.EnableClientCertificate) + populate(objectMap, "gatewayRegionalUrl", s.GatewayRegionalURL) + populate(objectMap, "gatewayUrl", s.GatewayURL) + populate(objectMap, "hostnameConfigurations", s.HostnameConfigurations) + populate(objectMap, "legacyPortalStatus", s.LegacyPortalStatus) + populate(objectMap, "managementApiUrl", s.ManagementAPIURL) + populate(objectMap, "natGatewayState", s.NatGatewayState) + populate(objectMap, "notificationSenderEmail", s.NotificationSenderEmail) + populate(objectMap, "outboundPublicIPAddresses", s.OutboundPublicIPAddresses) + populate(objectMap, "platformVersion", s.PlatformVersion) + populate(objectMap, "portalUrl", s.PortalURL) + populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) + populate(objectMap, "privateIPAddresses", s.PrivateIPAddresses) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "publicIpAddressId", s.PublicIPAddressID) + populate(objectMap, "publicIPAddresses", s.PublicIPAddresses) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + populate(objectMap, "publisherEmail", s.PublisherEmail) + populate(objectMap, "publisherName", s.PublisherName) + populate(objectMap, "restore", s.Restore) + populate(objectMap, "scmUrl", s.ScmURL) + populate(objectMap, "targetProvisioningState", s.TargetProvisioningState) + populate(objectMap, "virtualNetworkConfiguration", s.VirtualNetworkConfiguration) + populate(objectMap, "virtualNetworkType", s.VirtualNetworkType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceProperties. +func (s *ServiceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiVersionConstraint": + err = unpopulate(val, "APIVersionConstraint", &s.APIVersionConstraint) + delete(rawMsg, key) + case "additionalLocations": + err = unpopulate(val, "AdditionalLocations", &s.AdditionalLocations) + delete(rawMsg, key) + case "certificates": + err = unpopulate(val, "Certificates", &s.Certificates) + delete(rawMsg, key) + case "configurationApi": + err = unpopulate(val, "ConfigurationAPI", &s.ConfigurationAPI) + delete(rawMsg, key) + case "createdAtUtc": + err = unpopulateDateTimeRFC3339(val, "CreatedAtUTC", &s.CreatedAtUTC) + delete(rawMsg, key) + case "customProperties": + err = unpopulate(val, "CustomProperties", &s.CustomProperties) + delete(rawMsg, key) + case "developerPortalStatus": + err = unpopulate(val, "DeveloperPortalStatus", &s.DeveloperPortalStatus) + delete(rawMsg, key) + case "developerPortalUrl": + err = unpopulate(val, "DeveloperPortalURL", &s.DeveloperPortalURL) + delete(rawMsg, key) + case "disableGateway": + err = unpopulate(val, "DisableGateway", &s.DisableGateway) + delete(rawMsg, key) + case "enableClientCertificate": + err = unpopulate(val, "EnableClientCertificate", &s.EnableClientCertificate) + delete(rawMsg, key) + case "gatewayRegionalUrl": + err = unpopulate(val, "GatewayRegionalURL", &s.GatewayRegionalURL) + delete(rawMsg, key) + case "gatewayUrl": + err = unpopulate(val, "GatewayURL", &s.GatewayURL) + delete(rawMsg, key) + case "hostnameConfigurations": + err = unpopulate(val, "HostnameConfigurations", &s.HostnameConfigurations) + delete(rawMsg, key) + case "legacyPortalStatus": + err = unpopulate(val, "LegacyPortalStatus", &s.LegacyPortalStatus) + delete(rawMsg, key) + case "managementApiUrl": + err = unpopulate(val, "ManagementAPIURL", &s.ManagementAPIURL) + delete(rawMsg, key) + case "natGatewayState": + err = unpopulate(val, "NatGatewayState", &s.NatGatewayState) + delete(rawMsg, key) + case "notificationSenderEmail": + err = unpopulate(val, "NotificationSenderEmail", &s.NotificationSenderEmail) + delete(rawMsg, key) + case "outboundPublicIPAddresses": + err = unpopulate(val, "OutboundPublicIPAddresses", &s.OutboundPublicIPAddresses) + delete(rawMsg, key) + case "platformVersion": + err = unpopulate(val, "PlatformVersion", &s.PlatformVersion) + delete(rawMsg, key) + case "portalUrl": + err = unpopulate(val, "PortalURL", &s.PortalURL) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) + delete(rawMsg, key) + case "privateIPAddresses": + err = unpopulate(val, "PrivateIPAddresses", &s.PrivateIPAddresses) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "publicIpAddressId": + err = unpopulate(val, "PublicIPAddressID", &s.PublicIPAddressID) + delete(rawMsg, key) + case "publicIPAddresses": + err = unpopulate(val, "PublicIPAddresses", &s.PublicIPAddresses) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + case "publisherEmail": + err = unpopulate(val, "PublisherEmail", &s.PublisherEmail) + delete(rawMsg, key) + case "publisherName": + err = unpopulate(val, "PublisherName", &s.PublisherName) + delete(rawMsg, key) + case "restore": + err = unpopulate(val, "Restore", &s.Restore) + delete(rawMsg, key) + case "scmUrl": + err = unpopulate(val, "ScmURL", &s.ScmURL) + delete(rawMsg, key) + case "targetProvisioningState": + err = unpopulate(val, "TargetProvisioningState", &s.TargetProvisioningState) + delete(rawMsg, key) + case "virtualNetworkConfiguration": + err = unpopulate(val, "VirtualNetworkConfiguration", &s.VirtualNetworkConfiguration) + delete(rawMsg, key) + case "virtualNetworkType": + err = unpopulate(val, "VirtualNetworkType", &s.VirtualNetworkType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceResource. +func (s ServiceResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + populate(objectMap, "zones", s.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResource. +func (s *ServiceResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &s.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceSKUProperties. +func (s ServiceSKUProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSKUProperties. +func (s *ServiceSKUProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceUpdateParameters. +func (s ServiceUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + populate(objectMap, "zones", s.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceUpdateParameters. +func (s *ServiceUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &s.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceUpdateProperties. +func (s ServiceUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiVersionConstraint", s.APIVersionConstraint) + populate(objectMap, "additionalLocations", s.AdditionalLocations) + populate(objectMap, "certificates", s.Certificates) + populate(objectMap, "configurationApi", s.ConfigurationAPI) + populateDateTimeRFC3339(objectMap, "createdAtUtc", s.CreatedAtUTC) + populate(objectMap, "customProperties", s.CustomProperties) + populate(objectMap, "developerPortalStatus", s.DeveloperPortalStatus) + populate(objectMap, "developerPortalUrl", s.DeveloperPortalURL) + populate(objectMap, "disableGateway", s.DisableGateway) + populate(objectMap, "enableClientCertificate", s.EnableClientCertificate) + populate(objectMap, "gatewayRegionalUrl", s.GatewayRegionalURL) + populate(objectMap, "gatewayUrl", s.GatewayURL) + populate(objectMap, "hostnameConfigurations", s.HostnameConfigurations) + populate(objectMap, "legacyPortalStatus", s.LegacyPortalStatus) + populate(objectMap, "managementApiUrl", s.ManagementAPIURL) + populate(objectMap, "natGatewayState", s.NatGatewayState) + populate(objectMap, "notificationSenderEmail", s.NotificationSenderEmail) + populate(objectMap, "outboundPublicIPAddresses", s.OutboundPublicIPAddresses) + populate(objectMap, "platformVersion", s.PlatformVersion) + populate(objectMap, "portalUrl", s.PortalURL) + populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) + populate(objectMap, "privateIPAddresses", s.PrivateIPAddresses) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "publicIpAddressId", s.PublicIPAddressID) + populate(objectMap, "publicIPAddresses", s.PublicIPAddresses) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + populate(objectMap, "publisherEmail", s.PublisherEmail) + populate(objectMap, "publisherName", s.PublisherName) + populate(objectMap, "restore", s.Restore) + populate(objectMap, "scmUrl", s.ScmURL) + populate(objectMap, "targetProvisioningState", s.TargetProvisioningState) + populate(objectMap, "virtualNetworkConfiguration", s.VirtualNetworkConfiguration) + populate(objectMap, "virtualNetworkType", s.VirtualNetworkType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceUpdateProperties. +func (s *ServiceUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiVersionConstraint": + err = unpopulate(val, "APIVersionConstraint", &s.APIVersionConstraint) + delete(rawMsg, key) + case "additionalLocations": + err = unpopulate(val, "AdditionalLocations", &s.AdditionalLocations) + delete(rawMsg, key) + case "certificates": + err = unpopulate(val, "Certificates", &s.Certificates) + delete(rawMsg, key) + case "configurationApi": + err = unpopulate(val, "ConfigurationAPI", &s.ConfigurationAPI) + delete(rawMsg, key) + case "createdAtUtc": + err = unpopulateDateTimeRFC3339(val, "CreatedAtUTC", &s.CreatedAtUTC) + delete(rawMsg, key) + case "customProperties": + err = unpopulate(val, "CustomProperties", &s.CustomProperties) + delete(rawMsg, key) + case "developerPortalStatus": + err = unpopulate(val, "DeveloperPortalStatus", &s.DeveloperPortalStatus) + delete(rawMsg, key) + case "developerPortalUrl": + err = unpopulate(val, "DeveloperPortalURL", &s.DeveloperPortalURL) + delete(rawMsg, key) + case "disableGateway": + err = unpopulate(val, "DisableGateway", &s.DisableGateway) + delete(rawMsg, key) + case "enableClientCertificate": + err = unpopulate(val, "EnableClientCertificate", &s.EnableClientCertificate) + delete(rawMsg, key) + case "gatewayRegionalUrl": + err = unpopulate(val, "GatewayRegionalURL", &s.GatewayRegionalURL) + delete(rawMsg, key) + case "gatewayUrl": + err = unpopulate(val, "GatewayURL", &s.GatewayURL) + delete(rawMsg, key) + case "hostnameConfigurations": + err = unpopulate(val, "HostnameConfigurations", &s.HostnameConfigurations) + delete(rawMsg, key) + case "legacyPortalStatus": + err = unpopulate(val, "LegacyPortalStatus", &s.LegacyPortalStatus) + delete(rawMsg, key) + case "managementApiUrl": + err = unpopulate(val, "ManagementAPIURL", &s.ManagementAPIURL) + delete(rawMsg, key) + case "natGatewayState": + err = unpopulate(val, "NatGatewayState", &s.NatGatewayState) + delete(rawMsg, key) + case "notificationSenderEmail": + err = unpopulate(val, "NotificationSenderEmail", &s.NotificationSenderEmail) + delete(rawMsg, key) + case "outboundPublicIPAddresses": + err = unpopulate(val, "OutboundPublicIPAddresses", &s.OutboundPublicIPAddresses) + delete(rawMsg, key) + case "platformVersion": + err = unpopulate(val, "PlatformVersion", &s.PlatformVersion) + delete(rawMsg, key) + case "portalUrl": + err = unpopulate(val, "PortalURL", &s.PortalURL) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) + delete(rawMsg, key) + case "privateIPAddresses": + err = unpopulate(val, "PrivateIPAddresses", &s.PrivateIPAddresses) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "publicIpAddressId": + err = unpopulate(val, "PublicIPAddressID", &s.PublicIPAddressID) + delete(rawMsg, key) + case "publicIPAddresses": + err = unpopulate(val, "PublicIPAddresses", &s.PublicIPAddresses) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + case "publisherEmail": + err = unpopulate(val, "PublisherEmail", &s.PublisherEmail) + delete(rawMsg, key) + case "publisherName": + err = unpopulate(val, "PublisherName", &s.PublisherName) + delete(rawMsg, key) + case "restore": + err = unpopulate(val, "Restore", &s.Restore) + delete(rawMsg, key) + case "scmUrl": + err = unpopulate(val, "ScmURL", &s.ScmURL) + delete(rawMsg, key) + case "targetProvisioningState": + err = unpopulate(val, "TargetProvisioningState", &s.TargetProvisioningState) + delete(rawMsg, key) + case "virtualNetworkConfiguration": + err = unpopulate(val, "VirtualNetworkConfiguration", &s.VirtualNetworkConfiguration) + delete(rawMsg, key) + case "virtualNetworkType": + err = unpopulate(val, "VirtualNetworkType", &s.VirtualNetworkType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionCollection. +func (s SubscriptionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", s.Count) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionCollection. +func (s *SubscriptionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &s.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionContract. +func (s SubscriptionContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionContract. +func (s *SubscriptionContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionContractProperties. +func (s SubscriptionContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowTracing", s.AllowTracing) + populateDateTimeRFC3339(objectMap, "createdDate", s.CreatedDate) + populate(objectMap, "displayName", s.DisplayName) + populateDateTimeRFC3339(objectMap, "endDate", s.EndDate) + populateDateTimeRFC3339(objectMap, "expirationDate", s.ExpirationDate) + populateDateTimeRFC3339(objectMap, "notificationDate", s.NotificationDate) + populate(objectMap, "ownerId", s.OwnerID) + populate(objectMap, "primaryKey", s.PrimaryKey) + populate(objectMap, "scope", s.Scope) + populate(objectMap, "secondaryKey", s.SecondaryKey) + populateDateTimeRFC3339(objectMap, "startDate", s.StartDate) + populate(objectMap, "state", s.State) + populate(objectMap, "stateComment", s.StateComment) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionContractProperties. +func (s *SubscriptionContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowTracing": + err = unpopulate(val, "AllowTracing", &s.AllowTracing) + delete(rawMsg, key) + case "createdDate": + err = unpopulateDateTimeRFC3339(val, "CreatedDate", &s.CreatedDate) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "endDate": + err = unpopulateDateTimeRFC3339(val, "EndDate", &s.EndDate) + delete(rawMsg, key) + case "expirationDate": + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &s.ExpirationDate) + delete(rawMsg, key) + case "notificationDate": + err = unpopulateDateTimeRFC3339(val, "NotificationDate", &s.NotificationDate) + delete(rawMsg, key) + case "ownerId": + err = unpopulate(val, "OwnerID", &s.OwnerID) + delete(rawMsg, key) + case "primaryKey": + err = unpopulate(val, "PrimaryKey", &s.PrimaryKey) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &s.Scope) + delete(rawMsg, key) + case "secondaryKey": + err = unpopulate(val, "SecondaryKey", &s.SecondaryKey) + delete(rawMsg, key) + case "startDate": + err = unpopulateDateTimeRFC3339(val, "StartDate", &s.StartDate) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "stateComment": + err = unpopulate(val, "StateComment", &s.StateComment) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionCreateParameterProperties. +func (s SubscriptionCreateParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowTracing", s.AllowTracing) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "ownerId", s.OwnerID) + populate(objectMap, "primaryKey", s.PrimaryKey) + populate(objectMap, "scope", s.Scope) + populate(objectMap, "secondaryKey", s.SecondaryKey) + populate(objectMap, "state", s.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionCreateParameterProperties. +func (s *SubscriptionCreateParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowTracing": + err = unpopulate(val, "AllowTracing", &s.AllowTracing) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "ownerId": + err = unpopulate(val, "OwnerID", &s.OwnerID) + delete(rawMsg, key) + case "primaryKey": + err = unpopulate(val, "PrimaryKey", &s.PrimaryKey) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &s.Scope) + delete(rawMsg, key) + case "secondaryKey": + err = unpopulate(val, "SecondaryKey", &s.SecondaryKey) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionCreateParameters. +func (s SubscriptionCreateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionCreateParameters. +func (s *SubscriptionCreateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionKeyParameterNamesContract. +func (s SubscriptionKeyParameterNamesContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "header", s.Header) + populate(objectMap, "query", s.Query) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionKeyParameterNamesContract. +func (s *SubscriptionKeyParameterNamesContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "header": + err = unpopulate(val, "Header", &s.Header) + delete(rawMsg, key) + case "query": + err = unpopulate(val, "Query", &s.Query) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionKeysContract. +func (s SubscriptionKeysContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primaryKey", s.PrimaryKey) + populate(objectMap, "secondaryKey", s.SecondaryKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionKeysContract. +func (s *SubscriptionKeysContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primaryKey": + err = unpopulate(val, "PrimaryKey", &s.PrimaryKey) + delete(rawMsg, key) + case "secondaryKey": + err = unpopulate(val, "SecondaryKey", &s.SecondaryKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionUpdateParameterProperties. +func (s SubscriptionUpdateParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowTracing", s.AllowTracing) + populate(objectMap, "displayName", s.DisplayName) + populateDateTimeRFC3339(objectMap, "expirationDate", s.ExpirationDate) + populate(objectMap, "ownerId", s.OwnerID) + populate(objectMap, "primaryKey", s.PrimaryKey) + populate(objectMap, "scope", s.Scope) + populate(objectMap, "secondaryKey", s.SecondaryKey) + populate(objectMap, "state", s.State) + populate(objectMap, "stateComment", s.StateComment) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUpdateParameterProperties. +func (s *SubscriptionUpdateParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowTracing": + err = unpopulate(val, "AllowTracing", &s.AllowTracing) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "expirationDate": + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &s.ExpirationDate) + delete(rawMsg, key) + case "ownerId": + err = unpopulate(val, "OwnerID", &s.OwnerID) + delete(rawMsg, key) + case "primaryKey": + err = unpopulate(val, "PrimaryKey", &s.PrimaryKey) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &s.Scope) + delete(rawMsg, key) + case "secondaryKey": + err = unpopulate(val, "SecondaryKey", &s.SecondaryKey) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "stateComment": + err = unpopulate(val, "StateComment", &s.StateComment) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionUpdateParameters. +func (s SubscriptionUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUpdateParameters. +func (s *SubscriptionUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionsDelegationSettingsProperties. +func (s SubscriptionsDelegationSettingsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", s.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionsDelegationSettingsProperties. +func (s *SubscriptionsDelegationSettingsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagAPILinkCollection. +func (t TagAPILinkCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", t.Count) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagAPILinkCollection. +func (t *TagAPILinkCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &t.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagAPILinkContract. +func (t TagAPILinkContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagAPILinkContract. +func (t *TagAPILinkContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagAPILinkContractProperties. +func (t TagAPILinkContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiId", t.APIID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagAPILinkContractProperties. +func (t *TagAPILinkContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiId": + err = unpopulate(val, "APIID", &t.APIID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagCollection. +func (t TagCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", t.Count) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagCollection. +func (t *TagCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &t.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagContract. +func (t TagContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagContract. +func (t *TagContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagContractProperties. +func (t TagContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", t.DisplayName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagContractProperties. +func (t *TagContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &t.DisplayName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagCreateUpdateParameters. +func (t TagCreateUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", t.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagCreateUpdateParameters. +func (t *TagCreateUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagDescriptionBaseProperties. +func (t TagDescriptionBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", t.Description) + populate(objectMap, "externalDocsDescription", t.ExternalDocsDescription) + populate(objectMap, "externalDocsUrl", t.ExternalDocsURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionBaseProperties. +func (t *TagDescriptionBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &t.Description) + delete(rawMsg, key) + case "externalDocsDescription": + err = unpopulate(val, "ExternalDocsDescription", &t.ExternalDocsDescription) + delete(rawMsg, key) + case "externalDocsUrl": + err = unpopulate(val, "ExternalDocsURL", &t.ExternalDocsURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagDescriptionCollection. +func (t TagDescriptionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", t.Count) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionCollection. +func (t *TagDescriptionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &t.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagDescriptionContract. +func (t TagDescriptionContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionContract. +func (t *TagDescriptionContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagDescriptionContractProperties. +func (t TagDescriptionContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", t.Description) + populate(objectMap, "displayName", t.DisplayName) + populate(objectMap, "externalDocsDescription", t.ExternalDocsDescription) + populate(objectMap, "externalDocsUrl", t.ExternalDocsURL) + populate(objectMap, "tagId", t.TagID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionContractProperties. +func (t *TagDescriptionContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &t.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &t.DisplayName) + delete(rawMsg, key) + case "externalDocsDescription": + err = unpopulate(val, "ExternalDocsDescription", &t.ExternalDocsDescription) + delete(rawMsg, key) + case "externalDocsUrl": + err = unpopulate(val, "ExternalDocsURL", &t.ExternalDocsURL) + delete(rawMsg, key) + case "tagId": + err = unpopulate(val, "TagID", &t.TagID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagDescriptionCreateParameters. +func (t TagDescriptionCreateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", t.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagDescriptionCreateParameters. +func (t *TagDescriptionCreateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagOperationLinkCollection. +func (t TagOperationLinkCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", t.Count) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagOperationLinkCollection. +func (t *TagOperationLinkCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &t.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagOperationLinkContract. +func (t TagOperationLinkContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagOperationLinkContract. +func (t *TagOperationLinkContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagOperationLinkContractProperties. +func (t TagOperationLinkContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "operationId", t.OperationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagOperationLinkContractProperties. +func (t *TagOperationLinkContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operationId": + err = unpopulate(val, "OperationID", &t.OperationID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagProductLinkCollection. +func (t TagProductLinkCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", t.Count) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagProductLinkCollection. +func (t *TagProductLinkCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &t.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagProductLinkContract. +func (t TagProductLinkContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagProductLinkContract. +func (t *TagProductLinkContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagProductLinkContractProperties. +func (t TagProductLinkContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "productId", t.ProductID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagProductLinkContractProperties. +func (t *TagProductLinkContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "productId": + err = unpopulate(val, "ProductID", &t.ProductID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagResourceCollection. +func (t TagResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", t.Count) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagResourceCollection. +func (t *TagResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &t.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagResourceContract. +func (t TagResourceContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "api", t.API) + populate(objectMap, "operation", t.Operation) + populate(objectMap, "product", t.Product) + populate(objectMap, "tag", t.Tag) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagResourceContract. +func (t *TagResourceContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "api": + err = unpopulate(val, "API", &t.API) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &t.Operation) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &t.Product) + delete(rawMsg, key) + case "tag": + err = unpopulate(val, "Tag", &t.Tag) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagResourceContractProperties. +func (t TagResourceContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagResourceContractProperties. +func (t *TagResourceContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TenantConfigurationSyncStateContract. +func (t TenantConfigurationSyncStateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TenantConfigurationSyncStateContract. +func (t *TenantConfigurationSyncStateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TenantConfigurationSyncStateContractProperties. +func (t TenantConfigurationSyncStateContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "branch", t.Branch) + populate(objectMap, "commitId", t.CommitID) + populateDateTimeRFC3339(objectMap, "configurationChangeDate", t.ConfigurationChangeDate) + populate(objectMap, "isExport", t.IsExport) + populate(objectMap, "isGitEnabled", t.IsGitEnabled) + populate(objectMap, "isSynced", t.IsSynced) + populate(objectMap, "lastOperationId", t.LastOperationID) + populateDateTimeRFC3339(objectMap, "syncDate", t.SyncDate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TenantConfigurationSyncStateContractProperties. +func (t *TenantConfigurationSyncStateContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "branch": + err = unpopulate(val, "Branch", &t.Branch) + delete(rawMsg, key) + case "commitId": + err = unpopulate(val, "CommitID", &t.CommitID) + delete(rawMsg, key) + case "configurationChangeDate": + err = unpopulateDateTimeRFC3339(val, "ConfigurationChangeDate", &t.ConfigurationChangeDate) + delete(rawMsg, key) + case "isExport": + err = unpopulate(val, "IsExport", &t.IsExport) + delete(rawMsg, key) + case "isGitEnabled": + err = unpopulate(val, "IsGitEnabled", &t.IsGitEnabled) + delete(rawMsg, key) + case "isSynced": + err = unpopulate(val, "IsSynced", &t.IsSynced) + delete(rawMsg, key) + case "lastOperationId": + err = unpopulate(val, "LastOperationID", &t.LastOperationID) + delete(rawMsg, key) + case "syncDate": + err = unpopulateDateTimeRFC3339(val, "SyncDate", &t.SyncDate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TenantSettingsCollection. +func (t TenantSettingsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TenantSettingsCollection. +func (t *TenantSettingsCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TenantSettingsContract. +func (t TenantSettingsContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TenantSettingsContract. +func (t *TenantSettingsContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TenantSettingsContractProperties. +func (t TenantSettingsContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "settings", t.Settings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TenantSettingsContractProperties. +func (t *TenantSettingsContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "settings": + err = unpopulate(val, "Settings", &t.Settings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TermsOfServiceProperties. +func (t TermsOfServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "consentRequired", t.ConsentRequired) + populate(objectMap, "enabled", t.Enabled) + populate(objectMap, "text", t.Text) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TermsOfServiceProperties. +func (t *TermsOfServiceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "consentRequired": + err = unpopulate(val, "ConsentRequired", &t.ConsentRequired) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &t.Enabled) + delete(rawMsg, key) + case "text": + err = unpopulate(val, "Text", &t.Text) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TokenBodyParameterContract. +func (t TokenBodyParameterContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", t.Name) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TokenBodyParameterContract. +func (t *TokenBodyParameterContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserCollection. +func (u UserCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", u.Count) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserCollection. +func (u *UserCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &u.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserContract. +func (u UserContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", u.ID) + populate(objectMap, "name", u.Name) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "type", u.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserContract. +func (u *UserContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserContractProperties. +func (u UserContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "email", u.Email) + populate(objectMap, "firstName", u.FirstName) + populate(objectMap, "groups", u.Groups) + populate(objectMap, "identities", u.Identities) + populate(objectMap, "lastName", u.LastName) + populate(objectMap, "note", u.Note) + populateDateTimeRFC3339(objectMap, "registrationDate", u.RegistrationDate) + populate(objectMap, "state", u.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserContractProperties. +func (u *UserContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "email": + err = unpopulate(val, "Email", &u.Email) + delete(rawMsg, key) + case "firstName": + err = unpopulate(val, "FirstName", &u.FirstName) + delete(rawMsg, key) + case "groups": + err = unpopulate(val, "Groups", &u.Groups) + delete(rawMsg, key) + case "identities": + err = unpopulate(val, "Identities", &u.Identities) + delete(rawMsg, key) + case "lastName": + err = unpopulate(val, "LastName", &u.LastName) + delete(rawMsg, key) + case "note": + err = unpopulate(val, "Note", &u.Note) + delete(rawMsg, key) + case "registrationDate": + err = unpopulateDateTimeRFC3339(val, "RegistrationDate", &u.RegistrationDate) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &u.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserCreateParameterProperties. +func (u UserCreateParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appType", u.AppType) + populate(objectMap, "confirmation", u.Confirmation) + populate(objectMap, "email", u.Email) + populate(objectMap, "firstName", u.FirstName) + populate(objectMap, "identities", u.Identities) + populate(objectMap, "lastName", u.LastName) + populate(objectMap, "note", u.Note) + populate(objectMap, "password", u.Password) + populate(objectMap, "state", u.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreateParameterProperties. +func (u *UserCreateParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appType": + err = unpopulate(val, "AppType", &u.AppType) + delete(rawMsg, key) + case "confirmation": + err = unpopulate(val, "Confirmation", &u.Confirmation) + delete(rawMsg, key) + case "email": + err = unpopulate(val, "Email", &u.Email) + delete(rawMsg, key) + case "firstName": + err = unpopulate(val, "FirstName", &u.FirstName) + delete(rawMsg, key) + case "identities": + err = unpopulate(val, "Identities", &u.Identities) + delete(rawMsg, key) + case "lastName": + err = unpopulate(val, "LastName", &u.LastName) + delete(rawMsg, key) + case "note": + err = unpopulate(val, "Note", &u.Note) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &u.Password) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &u.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserCreateParameters. +func (u UserCreateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreateParameters. +func (u *UserCreateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserEntityBaseParameters. +func (u UserEntityBaseParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identities", u.Identities) + populate(objectMap, "note", u.Note) + populate(objectMap, "state", u.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserEntityBaseParameters. +func (u *UserEntityBaseParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identities": + err = unpopulate(val, "Identities", &u.Identities) + delete(rawMsg, key) + case "note": + err = unpopulate(val, "Note", &u.Note) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &u.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserIdentityCollection. +func (u UserIdentityCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", u.Count) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentityCollection. +func (u *UserIdentityCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &u.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserIdentityContract. +func (u UserIdentityContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", u.ID) + populate(objectMap, "provider", u.Provider) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentityContract. +func (u *UserIdentityContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &u.Provider) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserIdentityProperties. +func (u UserIdentityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentityProperties. +func (u *UserIdentityProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserTokenParameterProperties. +func (u UserTokenParameterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expiry", u.Expiry) + populate(objectMap, "keyType", u.KeyType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserTokenParameterProperties. +func (u *UserTokenParameterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiry": + err = unpopulateDateTimeRFC3339(val, "Expiry", &u.Expiry) + delete(rawMsg, key) + case "keyType": + err = unpopulate(val, "KeyType", &u.KeyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserTokenParameters. +func (u UserTokenParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserTokenParameters. +func (u *UserTokenParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserTokenResult. +func (u UserTokenResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserTokenResult. +func (u *UserTokenResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserUpdateParameters. +func (u UserUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserUpdateParameters. +func (u *UserUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserUpdateParametersProperties. +func (u UserUpdateParametersProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "email", u.Email) + populate(objectMap, "firstName", u.FirstName) + populate(objectMap, "identities", u.Identities) + populate(objectMap, "lastName", u.LastName) + populate(objectMap, "note", u.Note) + populate(objectMap, "password", u.Password) + populate(objectMap, "state", u.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserUpdateParametersProperties. +func (u *UserUpdateParametersProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "email": + err = unpopulate(val, "Email", &u.Email) + delete(rawMsg, key) + case "firstName": + err = unpopulate(val, "FirstName", &u.FirstName) + delete(rawMsg, key) + case "identities": + err = unpopulate(val, "Identities", &u.Identities) + delete(rawMsg, key) + case "lastName": + err = unpopulate(val, "LastName", &u.LastName) + delete(rawMsg, key) + case "note": + err = unpopulate(val, "Note", &u.Note) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &u.Password) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &u.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkConfiguration. +func (v VirtualNetworkConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "subnetResourceId", v.SubnetResourceID) + populate(objectMap, "subnetname", v.Subnetname) + populate(objectMap, "vnetid", v.Vnetid) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkConfiguration. +func (v *VirtualNetworkConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "subnetResourceId": + err = unpopulate(val, "SubnetResourceID", &v.SubnetResourceID) + delete(rawMsg, key) + case "subnetname": + err = unpopulate(val, "Subnetname", &v.Subnetname) + delete(rawMsg, key) + case "vnetid": + err = unpopulate(val, "Vnetid", &v.Vnetid) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WikiCollection. +func (w WikiCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WikiCollection. +func (w *WikiCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WikiContract. +func (w WikiContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WikiContract. +func (w *WikiContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WikiContractProperties. +func (w WikiContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "documents", w.Documents) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WikiContractProperties. +func (w *WikiContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "documents": + err = unpopulate(val, "Documents", &w.Documents) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WikiDocumentationContract. +func (w WikiDocumentationContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "documentationId", w.DocumentationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WikiDocumentationContract. +func (w *WikiDocumentationContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "documentationId": + err = unpopulate(val, "DocumentationID", &w.DocumentationID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WikiUpdateContract. +func (w WikiUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", w.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WikiUpdateContract. +func (w *WikiUpdateContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceCollection. +func (w WorkspaceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", w.Count) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceCollection. +func (w *WorkspaceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &w.Count) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceContract. +func (w WorkspaceContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceContract. +func (w *WorkspaceContract) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceContractProperties. +func (w WorkspaceContractProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", w.Description) + populate(objectMap, "displayName", w.DisplayName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceContractProperties. +func (w *WorkspaceContractProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &w.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &w.DisplayName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceLinksBaseProperties. +func (w WorkspaceLinksBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gateways", w.Gateways) + populate(objectMap, "workspaceId", w.WorkspaceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceLinksBaseProperties. +func (w *WorkspaceLinksBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "gateways": + err = unpopulate(val, "Gateways", &w.Gateways) + delete(rawMsg, key) + case "workspaceId": + err = unpopulate(val, "WorkspaceID", &w.WorkspaceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceLinksGateway. +func (w WorkspaceLinksGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceLinksGateway. +func (w *WorkspaceLinksGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceLinksListResult. +func (w WorkspaceLinksListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceLinksListResult. +func (w *WorkspaceLinksListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceLinksProperties. +func (w WorkspaceLinksProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gateways", w.Gateways) + populate(objectMap, "workspaceId", w.WorkspaceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceLinksProperties. +func (w *WorkspaceLinksProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "gateways": + err = unpopulate(val, "Gateways", &w.Gateways) + delete(rawMsg, key) + case "workspaceId": + err = unpopulate(val, "WorkspaceID", &w.WorkspaceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceLinksResource. +func (w WorkspaceLinksResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", w.Etag) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceLinksResource. +func (w *WorkspaceLinksResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &w.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type X509CertificateName. +func (x X509CertificateName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "issuerCertificateThumbprint", x.IssuerCertificateThumbprint) + populate(objectMap, "name", x.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type X509CertificateName. +func (x *X509CertificateName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", x, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "issuerCertificateThumbprint": + err = unpopulate(val, "IssuerCertificateThumbprint", &x.IssuerCertificateThumbprint) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &x.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", x, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/namedvalue_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/namedvalue_client.go similarity index 76% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/namedvalue_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/namedvalue_client.go index 32a875a6..8b254091 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/namedvalue_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/namedvalue_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type NamedValueClient struct { } // NewNamedValueClient creates a new instance of NamedValueClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNamedValueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NamedValueClient, error) { - cl, err := arm.NewClient(moduleName+".NamedValueClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewNamedValueClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates or updates named value. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - namedValueID - Identifier of the NamedValue. // - parameters - Create parameters. @@ -62,31 +57,41 @@ func (client *NamedValueClient) BeginCreateOrUpdate(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NamedValueClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NamedValueClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[NamedValueClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NamedValueClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Creates or updates named value. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 func (client *NamedValueClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, parameters NamedValueCreateContract, options *NamedValueClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "NamedValueClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, namedValueID, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -113,42 +118,51 @@ func (client *NamedValueClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Delete - Deletes specific named value from the API Management service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - namedValueID - Identifier of the NamedValue. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - NamedValueClientDeleteOptions contains the optional parameters for the NamedValueClient.Delete method. func (client *NamedValueClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, ifMatch string, options *NamedValueClientDeleteOptions) (NamedValueClientDeleteResponse, error) { + var err error + const operationName = "NamedValueClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, namedValueID, ifMatch, options) if err != nil { return NamedValueClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NamedValueClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return NamedValueClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return NamedValueClientDeleteResponse{}, err } return NamedValueClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *NamedValueClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, ifMatch string, options *NamedValueClientDeleteOptions) (*policy.Request, error) { +func (client *NamedValueClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, ifMatch string, _ *NamedValueClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -171,38 +185,45 @@ func (client *NamedValueClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the named value specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - namedValueID - Identifier of the NamedValue. // - options - NamedValueClientGetOptions contains the optional parameters for the NamedValueClient.Get method. func (client *NamedValueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientGetOptions) (NamedValueClientGetResponse, error) { + var err error + const operationName = "NamedValueClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, namedValueID, options) if err != nil { return NamedValueClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NamedValueClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NamedValueClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NamedValueClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *NamedValueClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientGetOptions) (*policy.Request, error) { +func (client *NamedValueClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, _ *NamedValueClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -225,7 +246,7 @@ func (client *NamedValueClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -245,28 +266,35 @@ func (client *NamedValueClient) getHandleResponse(resp *http.Response) (NamedVal // GetEntityTag - Gets the entity state (Etag) version of the named value specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - namedValueID - Identifier of the NamedValue. // - options - NamedValueClientGetEntityTagOptions contains the optional parameters for the NamedValueClient.GetEntityTag method. func (client *NamedValueClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientGetEntityTagOptions) (NamedValueClientGetEntityTagResponse, error) { + var err error + const operationName = "NamedValueClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, namedValueID, options) if err != nil { return NamedValueClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NamedValueClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NamedValueClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NamedValueClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *NamedValueClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientGetEntityTagOptions) (*policy.Request, error) { +func (client *NamedValueClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, _ *NamedValueClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -289,7 +317,7 @@ func (client *NamedValueClient) getEntityTagCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -297,18 +325,17 @@ func (client *NamedValueClient) getEntityTagCreateRequest(ctx context.Context, r // getEntityTagHandleResponse handles the GetEntityTag response. func (client *NamedValueClient) getEntityTagHandleResponse(resp *http.Response) (NamedValueClientGetEntityTagResponse, error) { - result := NamedValueClientGetEntityTagResponse{} + result := NamedValueClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of named values defined within a service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - NamedValueClientListByServiceOptions contains the optional parameters for the NamedValueClient.NewListByServicePager // method. @@ -318,25 +345,20 @@ func (client *NamedValueClient) NewListByServicePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *NamedValueClientListByServiceResponse) (NamedValueClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NamedValueClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return NamedValueClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return NamedValueClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NamedValueClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -363,16 +385,16 @@ func (client *NamedValueClient) listByServiceCreateRequest(ctx context.Context, if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") if options != nil && options.IsKeyVaultRefreshFailed != nil { reqQP.Set("isKeyVaultRefreshFailed", strconv.FormatBool(*options.IsKeyVaultRefreshFailed)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -390,28 +412,35 @@ func (client *NamedValueClient) listByServiceHandleResponse(resp *http.Response) // ListValue - Gets the secret of the named value specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - namedValueID - Identifier of the NamedValue. // - options - NamedValueClientListValueOptions contains the optional parameters for the NamedValueClient.ListValue method. func (client *NamedValueClient) ListValue(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientListValueOptions) (NamedValueClientListValueResponse, error) { + var err error + const operationName = "NamedValueClient.ListValue" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listValueCreateRequest(ctx, resourceGroupName, serviceName, namedValueID, options) if err != nil { return NamedValueClientListValueResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NamedValueClientListValueResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NamedValueClientListValueResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NamedValueClientListValueResponse{}, err } - return client.listValueHandleResponse(resp) + resp, err := client.listValueHandleResponse(httpResp) + return resp, err } // listValueCreateRequest creates the ListValue request. -func (client *NamedValueClient) listValueCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientListValueOptions) (*policy.Request, error) { +func (client *NamedValueClient) listValueCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, _ *NamedValueClientListValueOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -434,7 +463,7 @@ func (client *NamedValueClient) listValueCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -455,8 +484,8 @@ func (client *NamedValueClient) listValueHandleResponse(resp *http.Response) (Na // BeginRefreshSecret - Refresh the secret of the named value specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - namedValueID - Identifier of the NamedValue. // - options - NamedValueClientBeginRefreshSecretOptions contains the optional parameters for the NamedValueClient.BeginRefreshSecret @@ -467,35 +496,45 @@ func (client *NamedValueClient) BeginRefreshSecret(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NamedValueClientRefreshSecretResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NamedValueClientRefreshSecretResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[NamedValueClientRefreshSecretResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NamedValueClientRefreshSecretResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RefreshSecret - Refresh the secret of the named value specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 func (client *NamedValueClient) refreshSecret(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientBeginRefreshSecretOptions) (*http.Response, error) { + var err error + const operationName = "NamedValueClient.BeginRefreshSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.refreshSecretCreateRequest(ctx, resourceGroupName, serviceName, namedValueID, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // refreshSecretCreateRequest creates the RefreshSecret request. -func (client *NamedValueClient) refreshSecretCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, options *NamedValueClientBeginRefreshSecretOptions) (*policy.Request, error) { +func (client *NamedValueClient) refreshSecretCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, _ *NamedValueClientBeginRefreshSecretOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -518,7 +557,7 @@ func (client *NamedValueClient) refreshSecretCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -527,8 +566,8 @@ func (client *NamedValueClient) refreshSecretCreateRequest(ctx context.Context, // BeginUpdate - Updates the specific named value. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - namedValueID - Identifier of the NamedValue. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -541,35 +580,45 @@ func (client *NamedValueClient) BeginUpdate(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NamedValueClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NamedValueClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[NamedValueClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NamedValueClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates the specific named value. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 func (client *NamedValueClient) update(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, ifMatch string, parameters NamedValueUpdateParameters, options *NamedValueClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "NamedValueClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, namedValueID, ifMatch, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. -func (client *NamedValueClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, ifMatch string, parameters NamedValueUpdateParameters, options *NamedValueClientBeginUpdateOptions) (*policy.Request, error) { +func (client *NamedValueClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, namedValueID string, ifMatch string, parameters NamedValueUpdateParameters, _ *NamedValueClientBeginUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -592,9 +641,12 @@ func (client *NamedValueClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/networkstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/networkstatus_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/networkstatus_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/networkstatus_client.go index 219ba499..f8b3665c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/networkstatus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/networkstatus_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type NetworkStatusClient struct { } // NewNetworkStatusClient creates a new instance of NetworkStatusClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNetworkStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkStatusClient, error) { - cl, err := arm.NewClient(moduleName+".NetworkStatusClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,30 +44,37 @@ func NewNetworkStatusClient(subscriptionID string, credential azcore.TokenCreden // inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - locationName - Location in which the API Management service is deployed. This is one of the Azure Regions like West US, // East US, South Central US. // - options - NetworkStatusClientListByLocationOptions contains the optional parameters for the NetworkStatusClient.ListByLocation // method. func (client *NetworkStatusClient) ListByLocation(ctx context.Context, resourceGroupName string, serviceName string, locationName string, options *NetworkStatusClientListByLocationOptions) (NetworkStatusClientListByLocationResponse, error) { + var err error + const operationName = "NetworkStatusClient.ListByLocation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByLocationCreateRequest(ctx, resourceGroupName, serviceName, locationName, options) if err != nil { return NetworkStatusClientListByLocationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NetworkStatusClientListByLocationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NetworkStatusClientListByLocationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NetworkStatusClientListByLocationResponse{}, err } - return client.listByLocationHandleResponse(resp) + resp, err := client.listByLocationHandleResponse(httpResp) + return resp, err } // listByLocationCreateRequest creates the ListByLocation request. -func (client *NetworkStatusClient) listByLocationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, locationName string, options *NetworkStatusClientListByLocationOptions) (*policy.Request, error) { +func (client *NetworkStatusClient) listByLocationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, locationName string, _ *NetworkStatusClientListByLocationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -95,7 +97,7 @@ func (client *NetworkStatusClient) listByLocationCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,28 +116,35 @@ func (client *NetworkStatusClient) listByLocationHandleResponse(resp *http.Respo // inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - NetworkStatusClientListByServiceOptions contains the optional parameters for the NetworkStatusClient.ListByService // method. func (client *NetworkStatusClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *NetworkStatusClientListByServiceOptions) (NetworkStatusClientListByServiceResponse, error) { + var err error + const operationName = "NetworkStatusClient.ListByService" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return NetworkStatusClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NetworkStatusClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NetworkStatusClientListByServiceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NetworkStatusClientListByServiceResponse{}, err } - return client.listByServiceHandleResponse(resp) + resp, err := client.listByServiceHandleResponse(httpResp) + return resp, err } // listByServiceCreateRequest creates the ListByService request. -func (client *NetworkStatusClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *NetworkStatusClientListByServiceOptions) (*policy.Request, error) { +func (client *NetworkStatusClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *NetworkStatusClientListByServiceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -154,7 +163,7 @@ func (client *NetworkStatusClient) listByServiceCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/notification_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/notification_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/notification_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/notification_client.go index 0da7cb4f..0faf04eb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/notification_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/notification_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type NotificationClient struct { } // NewNotificationClient creates a new instance of NotificationClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNotificationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NotificationClient, error) { - cl, err := arm.NewClient(moduleName+".NotificationClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +44,32 @@ func NewNotificationClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Create or Update API Management publisher notification. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - notificationName - Notification Name Identifier. // - options - NotificationClientCreateOrUpdateOptions contains the optional parameters for the NotificationClient.CreateOrUpdate // method. func (client *NotificationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, options *NotificationClientCreateOrUpdateOptions) (NotificationClientCreateOrUpdateResponse, error) { + var err error + const operationName = "NotificationClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, notificationName, options) if err != nil { return NotificationClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NotificationClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NotificationClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,12 +96,12 @@ func (client *NotificationClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -115,28 +117,35 @@ func (client *NotificationClient) createOrUpdateHandleResponse(resp *http.Respon // Get - Gets the details of the Notification specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - notificationName - Notification Name Identifier. // - options - NotificationClientGetOptions contains the optional parameters for the NotificationClient.Get method. func (client *NotificationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, options *NotificationClientGetOptions) (NotificationClientGetResponse, error) { + var err error + const operationName = "NotificationClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, notificationName, options) if err != nil { return NotificationClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NotificationClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NotificationClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *NotificationClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, options *NotificationClientGetOptions) (*policy.Request, error) { +func (client *NotificationClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, _ *NotificationClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -159,7 +168,7 @@ func (client *NotificationClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -176,8 +185,8 @@ func (client *NotificationClient) getHandleResponse(resp *http.Response) (Notifi // NewListByServicePager - Lists a collection of properties defined within a service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - NotificationClientListByServiceOptions contains the optional parameters for the NotificationClient.NewListByServicePager // method. @@ -187,25 +196,20 @@ func (client *NotificationClient) NewListByServicePager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *NotificationClientListByServiceResponse) (NotificationClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return NotificationClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NotificationClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return NotificationClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NotificationClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -229,13 +233,13 @@ func (client *NotificationClient) listByServiceCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/notificationrecipientemail_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/notificationrecipientemail_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/notificationrecipientemail_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/notificationrecipientemail_client.go index 210708da..5a7d129c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/notificationrecipientemail_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/notificationrecipientemail_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type NotificationRecipientEmailClient struct { } // NewNotificationRecipientEmailClient creates a new instance of NotificationRecipientEmailClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNotificationRecipientEmailClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NotificationRecipientEmailClient, error) { - cl, err := arm.NewClient(moduleName+".NotificationRecipientEmailClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,30 +42,36 @@ func NewNotificationRecipientEmailClient(subscriptionID string, credential azcor // CheckEntityExists - Determine if Notification Recipient Email subscribed to the notification. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - notificationName - Notification Name Identifier. // - email - Email identifier. // - options - NotificationRecipientEmailClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientEmailClient.CheckEntityExists // method. func (client *NotificationRecipientEmailClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string, options *NotificationRecipientEmailClientCheckEntityExistsOptions) (NotificationRecipientEmailClientCheckEntityExistsResponse, error) { + var err error + const operationName = "NotificationRecipientEmailClient.CheckEntityExists" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkEntityExistsCreateRequest(ctx, resourceGroupName, serviceName, notificationName, email, options) if err != nil { return NotificationRecipientEmailClientCheckEntityExistsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationRecipientEmailClientCheckEntityExistsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent, http.StatusNotFound) { - return NotificationRecipientEmailClientCheckEntityExistsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return NotificationRecipientEmailClientCheckEntityExistsResponse{}, err } - return NotificationRecipientEmailClientCheckEntityExistsResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300}, nil + return NotificationRecipientEmailClientCheckEntityExistsResponse{Success: httpResp.StatusCode >= 200 && httpResp.StatusCode < 300}, nil } // checkEntityExistsCreateRequest creates the CheckEntityExists request. -func (client *NotificationRecipientEmailClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string, options *NotificationRecipientEmailClientCheckEntityExistsOptions) (*policy.Request, error) { +func (client *NotificationRecipientEmailClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string, _ *NotificationRecipientEmailClientCheckEntityExistsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -97,7 +98,7 @@ func (client *NotificationRecipientEmailClient) checkEntityExistsCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,30 +107,37 @@ func (client *NotificationRecipientEmailClient) checkEntityExistsCreateRequest(c // CreateOrUpdate - Adds the Email address to the list of Recipients for the Notification. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - notificationName - Notification Name Identifier. // - email - Email identifier. // - options - NotificationRecipientEmailClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientEmailClient.CreateOrUpdate // method. func (client *NotificationRecipientEmailClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string, options *NotificationRecipientEmailClientCreateOrUpdateOptions) (NotificationRecipientEmailClientCreateOrUpdateResponse, error) { + var err error + const operationName = "NotificationRecipientEmailClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, notificationName, email, options) if err != nil { return NotificationRecipientEmailClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationRecipientEmailClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return NotificationRecipientEmailClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return NotificationRecipientEmailClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *NotificationRecipientEmailClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string, options *NotificationRecipientEmailClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *NotificationRecipientEmailClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string, _ *NotificationRecipientEmailClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -156,7 +164,7 @@ func (client *NotificationRecipientEmailClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -174,30 +182,36 @@ func (client *NotificationRecipientEmailClient) createOrUpdateHandleResponse(res // Delete - Removes the email from the list of Notification. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - notificationName - Notification Name Identifier. // - email - Email identifier. // - options - NotificationRecipientEmailClientDeleteOptions contains the optional parameters for the NotificationRecipientEmailClient.Delete // method. func (client *NotificationRecipientEmailClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string, options *NotificationRecipientEmailClientDeleteOptions) (NotificationRecipientEmailClientDeleteResponse, error) { + var err error + const operationName = "NotificationRecipientEmailClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, notificationName, email, options) if err != nil { return NotificationRecipientEmailClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationRecipientEmailClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return NotificationRecipientEmailClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return NotificationRecipientEmailClientDeleteResponse{}, err } return NotificationRecipientEmailClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *NotificationRecipientEmailClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string, options *NotificationRecipientEmailClientDeleteOptions) (*policy.Request, error) { +func (client *NotificationRecipientEmailClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string, _ *NotificationRecipientEmailClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -224,7 +238,7 @@ func (client *NotificationRecipientEmailClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,29 +247,36 @@ func (client *NotificationRecipientEmailClient) deleteCreateRequest(ctx context. // ListByNotification - Gets the list of the Notification Recipient Emails subscribed to a notification. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - notificationName - Notification Name Identifier. // - options - NotificationRecipientEmailClientListByNotificationOptions contains the optional parameters for the NotificationRecipientEmailClient.ListByNotification // method. func (client *NotificationRecipientEmailClient) ListByNotification(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, options *NotificationRecipientEmailClientListByNotificationOptions) (NotificationRecipientEmailClientListByNotificationResponse, error) { + var err error + const operationName = "NotificationRecipientEmailClient.ListByNotification" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByNotificationCreateRequest(ctx, resourceGroupName, serviceName, notificationName, options) if err != nil { return NotificationRecipientEmailClientListByNotificationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationRecipientEmailClientListByNotificationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NotificationRecipientEmailClientListByNotificationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NotificationRecipientEmailClientListByNotificationResponse{}, err } - return client.listByNotificationHandleResponse(resp) + resp, err := client.listByNotificationHandleResponse(httpResp) + return resp, err } // listByNotificationCreateRequest creates the ListByNotification request. -func (client *NotificationRecipientEmailClient) listByNotificationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, options *NotificationRecipientEmailClientListByNotificationOptions) (*policy.Request, error) { +func (client *NotificationRecipientEmailClient) listByNotificationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, _ *NotificationRecipientEmailClientListByNotificationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -278,7 +299,7 @@ func (client *NotificationRecipientEmailClient) listByNotificationCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/notificationrecipientuser_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/notificationrecipientuser_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/notificationrecipientuser_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/notificationrecipientuser_client.go index e1775c3f..c53d0778 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/notificationrecipientuser_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/notificationrecipientuser_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type NotificationRecipientUserClient struct { } // NewNotificationRecipientUserClient creates a new instance of NotificationRecipientUserClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewNotificationRecipientUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NotificationRecipientUserClient, error) { - cl, err := arm.NewClient(moduleName+".NotificationRecipientUserClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,30 +42,36 @@ func NewNotificationRecipientUserClient(subscriptionID string, credential azcore // CheckEntityExists - Determine if the Notification Recipient User is subscribed to the notification. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - notificationName - Notification Name Identifier. // - userID - User identifier. Must be unique in the current API Management service instance. // - options - NotificationRecipientUserClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientUserClient.CheckEntityExists // method. func (client *NotificationRecipientUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string, options *NotificationRecipientUserClientCheckEntityExistsOptions) (NotificationRecipientUserClientCheckEntityExistsResponse, error) { + var err error + const operationName = "NotificationRecipientUserClient.CheckEntityExists" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkEntityExistsCreateRequest(ctx, resourceGroupName, serviceName, notificationName, userID, options) if err != nil { return NotificationRecipientUserClientCheckEntityExistsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationRecipientUserClientCheckEntityExistsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent, http.StatusNotFound) { - return NotificationRecipientUserClientCheckEntityExistsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return NotificationRecipientUserClientCheckEntityExistsResponse{}, err } - return NotificationRecipientUserClientCheckEntityExistsResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300}, nil + return NotificationRecipientUserClientCheckEntityExistsResponse{Success: httpResp.StatusCode >= 200 && httpResp.StatusCode < 300}, nil } // checkEntityExistsCreateRequest creates the CheckEntityExists request. -func (client *NotificationRecipientUserClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string, options *NotificationRecipientUserClientCheckEntityExistsOptions) (*policy.Request, error) { +func (client *NotificationRecipientUserClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string, _ *NotificationRecipientUserClientCheckEntityExistsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -97,7 +98,7 @@ func (client *NotificationRecipientUserClient) checkEntityExistsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,30 +107,37 @@ func (client *NotificationRecipientUserClient) checkEntityExistsCreateRequest(ct // CreateOrUpdate - Adds the API Management User to the list of Recipients for the Notification. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - notificationName - Notification Name Identifier. // - userID - User identifier. Must be unique in the current API Management service instance. // - options - NotificationRecipientUserClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientUserClient.CreateOrUpdate // method. func (client *NotificationRecipientUserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string, options *NotificationRecipientUserClientCreateOrUpdateOptions) (NotificationRecipientUserClientCreateOrUpdateResponse, error) { + var err error + const operationName = "NotificationRecipientUserClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, notificationName, userID, options) if err != nil { return NotificationRecipientUserClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationRecipientUserClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return NotificationRecipientUserClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return NotificationRecipientUserClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *NotificationRecipientUserClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string, options *NotificationRecipientUserClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *NotificationRecipientUserClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string, _ *NotificationRecipientUserClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -156,7 +164,7 @@ func (client *NotificationRecipientUserClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -174,30 +182,36 @@ func (client *NotificationRecipientUserClient) createOrUpdateHandleResponse(resp // Delete - Removes the API Management user from the list of Notification. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - notificationName - Notification Name Identifier. // - userID - User identifier. Must be unique in the current API Management service instance. // - options - NotificationRecipientUserClientDeleteOptions contains the optional parameters for the NotificationRecipientUserClient.Delete // method. func (client *NotificationRecipientUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string, options *NotificationRecipientUserClientDeleteOptions) (NotificationRecipientUserClientDeleteResponse, error) { + var err error + const operationName = "NotificationRecipientUserClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, notificationName, userID, options) if err != nil { return NotificationRecipientUserClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationRecipientUserClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return NotificationRecipientUserClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return NotificationRecipientUserClientDeleteResponse{}, err } return NotificationRecipientUserClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *NotificationRecipientUserClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string, options *NotificationRecipientUserClientDeleteOptions) (*policy.Request, error) { +func (client *NotificationRecipientUserClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string, _ *NotificationRecipientUserClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -224,7 +238,7 @@ func (client *NotificationRecipientUserClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,29 +247,36 @@ func (client *NotificationRecipientUserClient) deleteCreateRequest(ctx context.C // ListByNotification - Gets the list of the Notification Recipient User subscribed to the notification. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - notificationName - Notification Name Identifier. // - options - NotificationRecipientUserClientListByNotificationOptions contains the optional parameters for the NotificationRecipientUserClient.ListByNotification // method. func (client *NotificationRecipientUserClient) ListByNotification(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, options *NotificationRecipientUserClientListByNotificationOptions) (NotificationRecipientUserClientListByNotificationResponse, error) { + var err error + const operationName = "NotificationRecipientUserClient.ListByNotification" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByNotificationCreateRequest(ctx, resourceGroupName, serviceName, notificationName, options) if err != nil { return NotificationRecipientUserClientListByNotificationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return NotificationRecipientUserClientListByNotificationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NotificationRecipientUserClientListByNotificationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NotificationRecipientUserClientListByNotificationResponse{}, err } - return client.listByNotificationHandleResponse(resp) + resp, err := client.listByNotificationHandleResponse(httpResp) + return resp, err } // listByNotificationCreateRequest creates the ListByNotification request. -func (client *NotificationRecipientUserClient) listByNotificationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, options *NotificationRecipientUserClientListByNotificationOptions) (*policy.Request, error) { +func (client *NotificationRecipientUserClient) listByNotificationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, _ *NotificationRecipientUserClientListByNotificationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -278,7 +299,7 @@ func (client *NotificationRecipientUserClient) listByNotificationCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/openidconnectprovider_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/openidconnectprovider_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/openidconnectprovider_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/openidconnectprovider_client.go index f40b1721..26ce7611 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/openidconnectprovider_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/openidconnectprovider_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type OpenIDConnectProviderClient struct { } // NewOpenIDConnectProviderClient creates a new instance of OpenIDConnectProviderClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOpenIDConnectProviderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OpenIDConnectProviderClient, error) { - cl, err := arm.NewClient(moduleName+".OpenIDConnectProviderClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,26 +44,33 @@ func NewOpenIDConnectProviderClient(subscriptionID string, credential azcore.Tok // CreateOrUpdate - Creates or updates the OpenID Connect Provider. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - opid - Identifier of the OpenID Connect Provider. // - parameters - Create parameters. // - options - OpenIDConnectProviderClientCreateOrUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.CreateOrUpdate // method. func (client *OpenIDConnectProviderClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters OpenidConnectProviderContract, options *OpenIDConnectProviderClientCreateOrUpdateOptions) (OpenIDConnectProviderClientCreateOrUpdateResponse, error) { + var err error + const operationName = "OpenIDConnectProviderClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, opid, parameters, options) if err != nil { return OpenIDConnectProviderClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OpenIDConnectProviderClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return OpenIDConnectProviderClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return OpenIDConnectProviderClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -95,13 +97,16 @@ func (client *OpenIDConnectProviderClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -119,8 +124,8 @@ func (client *OpenIDConnectProviderClient) createOrUpdateHandleResponse(resp *ht // Delete - Deletes specific OpenID Connect Provider of the API Management service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - opid - Identifier of the OpenID Connect Provider. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -128,22 +133,28 @@ func (client *OpenIDConnectProviderClient) createOrUpdateHandleResponse(resp *ht // - options - OpenIDConnectProviderClientDeleteOptions contains the optional parameters for the OpenIDConnectProviderClient.Delete // method. func (client *OpenIDConnectProviderClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, opid string, ifMatch string, options *OpenIDConnectProviderClientDeleteOptions) (OpenIDConnectProviderClientDeleteResponse, error) { + var err error + const operationName = "OpenIDConnectProviderClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, opid, ifMatch, options) if err != nil { return OpenIDConnectProviderClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OpenIDConnectProviderClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return OpenIDConnectProviderClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return OpenIDConnectProviderClientDeleteResponse{}, err } return OpenIDConnectProviderClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *OpenIDConnectProviderClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, opid string, ifMatch string, options *OpenIDConnectProviderClientDeleteOptions) (*policy.Request, error) { +func (client *OpenIDConnectProviderClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, opid string, ifMatch string, _ *OpenIDConnectProviderClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -166,39 +177,46 @@ func (client *OpenIDConnectProviderClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets specific OpenID Connect Provider without secrets. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - opid - Identifier of the OpenID Connect Provider. // - options - OpenIDConnectProviderClientGetOptions contains the optional parameters for the OpenIDConnectProviderClient.Get // method. func (client *OpenIDConnectProviderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, opid string, options *OpenIDConnectProviderClientGetOptions) (OpenIDConnectProviderClientGetResponse, error) { + var err error + const operationName = "OpenIDConnectProviderClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, opid, options) if err != nil { return OpenIDConnectProviderClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OpenIDConnectProviderClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OpenIDConnectProviderClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OpenIDConnectProviderClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *OpenIDConnectProviderClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, opid string, options *OpenIDConnectProviderClientGetOptions) (*policy.Request, error) { +func (client *OpenIDConnectProviderClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, opid string, _ *OpenIDConnectProviderClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -221,7 +239,7 @@ func (client *OpenIDConnectProviderClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,29 +259,36 @@ func (client *OpenIDConnectProviderClient) getHandleResponse(resp *http.Response // GetEntityTag - Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - opid - Identifier of the OpenID Connect Provider. // - options - OpenIDConnectProviderClientGetEntityTagOptions contains the optional parameters for the OpenIDConnectProviderClient.GetEntityTag // method. func (client *OpenIDConnectProviderClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, opid string, options *OpenIDConnectProviderClientGetEntityTagOptions) (OpenIDConnectProviderClientGetEntityTagResponse, error) { + var err error + const operationName = "OpenIDConnectProviderClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, opid, options) if err != nil { return OpenIDConnectProviderClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OpenIDConnectProviderClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OpenIDConnectProviderClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OpenIDConnectProviderClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *OpenIDConnectProviderClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, opid string, options *OpenIDConnectProviderClientGetEntityTagOptions) (*policy.Request, error) { +func (client *OpenIDConnectProviderClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, opid string, _ *OpenIDConnectProviderClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -286,7 +311,7 @@ func (client *OpenIDConnectProviderClient) getEntityTagCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -294,18 +319,17 @@ func (client *OpenIDConnectProviderClient) getEntityTagCreateRequest(ctx context // getEntityTagHandleResponse handles the GetEntityTag response. func (client *OpenIDConnectProviderClient) getEntityTagHandleResponse(resp *http.Response) (OpenIDConnectProviderClientGetEntityTagResponse, error) { - result := OpenIDConnectProviderClientGetEntityTagResponse{} + result := OpenIDConnectProviderClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists of all the OpenId Connect Providers. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - OpenIDConnectProviderClientListByServiceOptions contains the optional parameters for the OpenIDConnectProviderClient.NewListByServicePager // method. @@ -315,25 +339,20 @@ func (client *OpenIDConnectProviderClient) NewListByServicePager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OpenIDConnectProviderClientListByServiceResponse) (OpenIDConnectProviderClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OpenIDConnectProviderClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OpenIDConnectProviderClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return OpenIDConnectProviderClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OpenIDConnectProviderClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -360,13 +379,13 @@ func (client *OpenIDConnectProviderClient) listByServiceCreateRequest(ctx contex if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -384,29 +403,36 @@ func (client *OpenIDConnectProviderClient) listByServiceHandleResponse(resp *htt // ListSecrets - Gets the client secret details of the OpenID Connect Provider. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - opid - Identifier of the OpenID Connect Provider. // - options - OpenIDConnectProviderClientListSecretsOptions contains the optional parameters for the OpenIDConnectProviderClient.ListSecrets // method. func (client *OpenIDConnectProviderClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, opid string, options *OpenIDConnectProviderClientListSecretsOptions) (OpenIDConnectProviderClientListSecretsResponse, error) { + var err error + const operationName = "OpenIDConnectProviderClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, serviceName, opid, options) if err != nil { return OpenIDConnectProviderClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OpenIDConnectProviderClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OpenIDConnectProviderClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OpenIDConnectProviderClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. -func (client *OpenIDConnectProviderClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, opid string, options *OpenIDConnectProviderClientListSecretsOptions) (*policy.Request, error) { +func (client *OpenIDConnectProviderClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, opid string, _ *OpenIDConnectProviderClientListSecretsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}/listSecrets" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -429,7 +455,7 @@ func (client *OpenIDConnectProviderClient) listSecretsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -450,8 +476,8 @@ func (client *OpenIDConnectProviderClient) listSecretsHandleResponse(resp *http. // Update - Updates the specific OpenID Connect Provider. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - opid - Identifier of the OpenID Connect Provider. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -460,22 +486,29 @@ func (client *OpenIDConnectProviderClient) listSecretsHandleResponse(resp *http. // - options - OpenIDConnectProviderClientUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.Update // method. func (client *OpenIDConnectProviderClient) Update(ctx context.Context, resourceGroupName string, serviceName string, opid string, ifMatch string, parameters OpenidConnectProviderUpdateContract, options *OpenIDConnectProviderClientUpdateOptions) (OpenIDConnectProviderClientUpdateResponse, error) { + var err error + const operationName = "OpenIDConnectProviderClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, opid, ifMatch, parameters, options) if err != nil { return OpenIDConnectProviderClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OpenIDConnectProviderClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OpenIDConnectProviderClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OpenIDConnectProviderClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *OpenIDConnectProviderClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, opid string, ifMatch string, parameters OpenidConnectProviderUpdateContract, options *OpenIDConnectProviderClientUpdateOptions) (*policy.Request, error) { +func (client *OpenIDConnectProviderClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, opid string, ifMatch string, parameters OpenidConnectProviderUpdateContract, _ *OpenIDConnectProviderClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -498,11 +531,14 @@ func (client *OpenIDConnectProviderClient) updateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operation_client.go new file mode 100644 index 00000000..932f85d3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operation_client.go @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// OperationClient contains the methods for the Operation group. +// Don't use this type directly, use NewOperationClient() instead. +type OperationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationClient creates a new instance of OperationClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByTagsPager - Lists a collection of operations associated with tags. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - options - OperationClientListByTagsOptions contains the optional parameters for the OperationClient.NewListByTagsPager +// method. +func (client *OperationClient) NewListByTagsPager(resourceGroupName string, serviceName string, apiID string, options *OperationClientListByTagsOptions) *runtime.Pager[OperationClientListByTagsResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationClientListByTagsResponse]{ + More: func(page OperationClientListByTagsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationClientListByTagsResponse) (OperationClientListByTagsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationClient.NewListByTagsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByTagsCreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) + if err != nil { + return OperationClientListByTagsResponse{}, err + } + return client.listByTagsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByTagsCreateRequest creates the ListByTags request. +func (client *OperationClient) listByTagsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, options *OperationClientListByTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.IncludeNotTaggedOperations != nil { + reqQP.Set("includeNotTaggedOperations", strconv.FormatBool(*options.IncludeNotTaggedOperations)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByTagsHandleResponse handles the ListByTags response. +func (client *OperationClient) listByTagsHandleResponse(resp *http.Response) (OperationClientListByTagsResponse, error) { + result := OperationClientListByTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagResourceCollection); err != nil { + return OperationClientListByTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operations_client.go new file mode 100644 index 00000000..eae9cdd9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operations_client.go @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the APIManagementOperations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Lists all of the available REST API operations of the Microsoft.ApiManagement provider. +// +// Generated from API version 2024-05-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.ApiManagement/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operationsresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operationsresults_client.go new file mode 100644 index 00000000..0a8a8edd --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operationsresults_client.go @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// OperationsResultsClient contains the methods for the OperationsResults group. +// Don't use this type directly, use NewOperationsResultsClient() instead. +type OperationsResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationsResultsClient creates a new instance of OperationsResultsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Returns operation results for long running operations executing DELETE or PATCH on the resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - location - The name of the Azure region. +// - operationID - The ID of an ongoing async operation. +// - options - OperationsResultsClientGetOptions contains the optional parameters for the OperationsResultsClient.Get method. +func (client *OperationsResultsClient) Get(ctx context.Context, location string, operationID string, options *OperationsResultsClientGetOptions) (OperationsResultsClientGetResponse, error) { + var err error + const operationName = "OperationsResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, operationID, options) + if err != nil { + return OperationsResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return OperationsResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return OperationsResultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *OperationsResultsClient) getCreateRequest(ctx context.Context, location string, operationID string, _ *OperationsResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *OperationsResultsClient) getHandleResponse(resp *http.Response) (OperationsResultsClientGetResponse, error) { + result := OperationsResultsClientGetResponse{} + if val := resp.Header.Get("Location"); val != "" { + result.Location = &val + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operationstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operationstatus_client.go new file mode 100644 index 00000000..816546f4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/operationstatus_client.go @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// OperationStatusClient contains the methods for the OperationStatus group. +// Don't use this type directly, use NewOperationStatusClient() instead. +type OperationStatusClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationStatusClient creates a new instance of OperationStatusClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationStatusClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Returns the current status of an async operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - location - The name of the Azure region. +// - operationID - The ID of an ongoing async operation. +// - options - OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method. +func (client *OperationStatusClient) Get(ctx context.Context, location string, operationID string, options *OperationStatusClientGetOptions) (OperationStatusClientGetResponse, error) { + var err error + const operationName = "OperationStatusClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, operationID, options) + if err != nil { + return OperationStatusClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return OperationStatusClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OperationStatusClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *OperationStatusClient) getCreateRequest(ctx context.Context, location string, operationID string, _ *OperationStatusClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationStatuses/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *OperationStatusClient) getHandleResponse(resp *http.Response) (OperationStatusClientGetResponse, error) { + result := OperationStatusClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatusResult); err != nil { + return OperationStatusClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/options.go new file mode 100644 index 00000000..7933b118 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/options.go @@ -0,0 +1,4563 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +// APIClientBeginCreateOrUpdateOptions contains the optional parameters for the APIClient.BeginCreateOrUpdate method. +type APIClientBeginCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// APIClientBeginDeleteOptions contains the optional parameters for the APIClient.BeginDelete method. +type APIClientBeginDeleteOptions struct { + // Delete all revisions of the Api. + DeleteRevisions *bool + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// APIClientGetEntityTagOptions contains the optional parameters for the APIClient.GetEntityTag method. +type APIClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIClientGetOptions contains the optional parameters for the APIClient.Get method. +type APIClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIClientListByServiceOptions contains the optional parameters for the APIClient.NewListByServicePager method. +type APIClientListByServiceOptions struct { + // Include full ApiVersionSet resource in response + ExpandAPIVersionSet *bool + + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | isCurrent | filter | eq, ne | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Include tags in the response. + Tags *string + + // Number of records to return. + Top *int32 +} + +// APIClientListByTagsOptions contains the optional parameters for the APIClient.NewListByTagsPager method. +type APIClientListByTagsOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | isCurrent | filter | eq | | + Filter *string + + // Include not tagged APIs. + IncludeNotTaggedApis *bool + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APIClientUpdateOptions contains the optional parameters for the APIClient.Update method. +type APIClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// APIDiagnosticClientCreateOrUpdateOptions contains the optional parameters for the APIDiagnosticClient.CreateOrUpdate method. +type APIDiagnosticClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APIDiagnosticClientDeleteOptions contains the optional parameters for the APIDiagnosticClient.Delete method. +type APIDiagnosticClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIDiagnosticClientGetEntityTagOptions contains the optional parameters for the APIDiagnosticClient.GetEntityTag method. +type APIDiagnosticClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIDiagnosticClientGetOptions contains the optional parameters for the APIDiagnosticClient.Get method. +type APIDiagnosticClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIDiagnosticClientListByServiceOptions contains the optional parameters for the APIDiagnosticClient.NewListByServicePager +// method. +type APIDiagnosticClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APIDiagnosticClientUpdateOptions contains the optional parameters for the APIDiagnosticClient.Update method. +type APIDiagnosticClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// APIExportClientGetOptions contains the optional parameters for the APIExportClient.Get method. +type APIExportClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIGatewayClientBeginCreateOrUpdateOptions contains the optional parameters for the APIGatewayClient.BeginCreateOrUpdate +// method. +type APIGatewayClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// APIGatewayClientBeginDeleteOptions contains the optional parameters for the APIGatewayClient.BeginDelete method. +type APIGatewayClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// APIGatewayClientBeginUpdateOptions contains the optional parameters for the APIGatewayClient.BeginUpdate method. +type APIGatewayClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// APIGatewayClientGetOptions contains the optional parameters for the APIGatewayClient.Get method. +type APIGatewayClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIGatewayClientListByResourceGroupOptions contains the optional parameters for the APIGatewayClient.NewListByResourceGroupPager +// method. +type APIGatewayClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// APIGatewayClientListOptions contains the optional parameters for the APIGatewayClient.NewListPager method. +type APIGatewayClientListOptions struct { + // placeholder for future optional parameters +} + +// APIGatewayConfigConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the APIGatewayConfigConnectionClient.BeginCreateOrUpdate +// method. +type APIGatewayConfigConnectionClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// APIGatewayConfigConnectionClientBeginDeleteOptions contains the optional parameters for the APIGatewayConfigConnectionClient.BeginDelete +// method. +type APIGatewayConfigConnectionClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// APIGatewayConfigConnectionClientGetOptions contains the optional parameters for the APIGatewayConfigConnectionClient.Get +// method. +type APIGatewayConfigConnectionClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIGatewayConfigConnectionClientListByGatewayOptions contains the optional parameters for the APIGatewayConfigConnectionClient.NewListByGatewayPager +// method. +type APIGatewayConfigConnectionClientListByGatewayOptions struct { + // placeholder for future optional parameters +} + +// APIIssueAttachmentClientCreateOrUpdateOptions contains the optional parameters for the APIIssueAttachmentClient.CreateOrUpdate +// method. +type APIIssueAttachmentClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APIIssueAttachmentClientDeleteOptions contains the optional parameters for the APIIssueAttachmentClient.Delete method. +type APIIssueAttachmentClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIIssueAttachmentClientGetEntityTagOptions contains the optional parameters for the APIIssueAttachmentClient.GetEntityTag +// method. +type APIIssueAttachmentClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIIssueAttachmentClientGetOptions contains the optional parameters for the APIIssueAttachmentClient.Get method. +type APIIssueAttachmentClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIIssueAttachmentClientListByServiceOptions contains the optional parameters for the APIIssueAttachmentClient.NewListByServicePager +// method. +type APIIssueAttachmentClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APIIssueClientCreateOrUpdateOptions contains the optional parameters for the APIIssueClient.CreateOrUpdate method. +type APIIssueClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APIIssueClientDeleteOptions contains the optional parameters for the APIIssueClient.Delete method. +type APIIssueClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIIssueClientGetEntityTagOptions contains the optional parameters for the APIIssueClient.GetEntityTag method. +type APIIssueClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIIssueClientGetOptions contains the optional parameters for the APIIssueClient.Get method. +type APIIssueClientGetOptions struct { + // Expand the comment attachments. + ExpandCommentsAttachments *bool +} + +// APIIssueClientListByServiceOptions contains the optional parameters for the APIIssueClient.NewListByServicePager method. +type APIIssueClientListByServiceOptions struct { + // Expand the comment attachments. + ExpandCommentsAttachments *bool + + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | state | filter | eq | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APIIssueClientUpdateOptions contains the optional parameters for the APIIssueClient.Update method. +type APIIssueClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// APIIssueCommentClientCreateOrUpdateOptions contains the optional parameters for the APIIssueCommentClient.CreateOrUpdate +// method. +type APIIssueCommentClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APIIssueCommentClientDeleteOptions contains the optional parameters for the APIIssueCommentClient.Delete method. +type APIIssueCommentClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIIssueCommentClientGetEntityTagOptions contains the optional parameters for the APIIssueCommentClient.GetEntityTag method. +type APIIssueCommentClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIIssueCommentClientGetOptions contains the optional parameters for the APIIssueCommentClient.Get method. +type APIIssueCommentClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIIssueCommentClientListByServiceOptions contains the optional parameters for the APIIssueCommentClient.NewListByServicePager +// method. +type APIIssueCommentClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APIOperationClientCreateOrUpdateOptions contains the optional parameters for the APIOperationClient.CreateOrUpdate method. +type APIOperationClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APIOperationClientDeleteOptions contains the optional parameters for the APIOperationClient.Delete method. +type APIOperationClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIOperationClientGetEntityTagOptions contains the optional parameters for the APIOperationClient.GetEntityTag method. +type APIOperationClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIOperationClientGetOptions contains the optional parameters for the APIOperationClient.Get method. +type APIOperationClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIOperationClientListByAPIOptions contains the optional parameters for the APIOperationClient.NewListByAPIPager method. +type APIOperationClientListByAPIOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Include tags in the response. + Tags *string + + // Number of records to return. + Top *int32 +} + +// APIOperationClientUpdateOptions contains the optional parameters for the APIOperationClient.Update method. +type APIOperationClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// APIOperationPolicyClientCreateOrUpdateOptions contains the optional parameters for the APIOperationPolicyClient.CreateOrUpdate +// method. +type APIOperationPolicyClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APIOperationPolicyClientDeleteOptions contains the optional parameters for the APIOperationPolicyClient.Delete method. +type APIOperationPolicyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIOperationPolicyClientGetEntityTagOptions contains the optional parameters for the APIOperationPolicyClient.GetEntityTag +// method. +type APIOperationPolicyClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIOperationPolicyClientGetOptions contains the optional parameters for the APIOperationPolicyClient.Get method. +type APIOperationPolicyClientGetOptions struct { + // Policy Export Format. + Format *PolicyExportFormat +} + +// APIOperationPolicyClientListByOperationOptions contains the optional parameters for the APIOperationPolicyClient.ListByOperation +// method. +type APIOperationPolicyClientListByOperationOptions struct { + // placeholder for future optional parameters +} + +// APIPolicyClientCreateOrUpdateOptions contains the optional parameters for the APIPolicyClient.CreateOrUpdate method. +type APIPolicyClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APIPolicyClientDeleteOptions contains the optional parameters for the APIPolicyClient.Delete method. +type APIPolicyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIPolicyClientGetEntityTagOptions contains the optional parameters for the APIPolicyClient.GetEntityTag method. +type APIPolicyClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIPolicyClientGetOptions contains the optional parameters for the APIPolicyClient.Get method. +type APIPolicyClientGetOptions struct { + // Policy Export Format. + Format *PolicyExportFormat +} + +// APIPolicyClientListByAPIOptions contains the optional parameters for the APIPolicyClient.ListByAPI method. +type APIPolicyClientListByAPIOptions struct { + // placeholder for future optional parameters +} + +// APIProductClientListByApisOptions contains the optional parameters for the APIProductClient.NewListByApisPager method. +type APIProductClientListByApisOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APIReleaseClientCreateOrUpdateOptions contains the optional parameters for the APIReleaseClient.CreateOrUpdate method. +type APIReleaseClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APIReleaseClientDeleteOptions contains the optional parameters for the APIReleaseClient.Delete method. +type APIReleaseClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIReleaseClientGetEntityTagOptions contains the optional parameters for the APIReleaseClient.GetEntityTag method. +type APIReleaseClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIReleaseClientGetOptions contains the optional parameters for the APIReleaseClient.Get method. +type APIReleaseClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIReleaseClientListByServiceOptions contains the optional parameters for the APIReleaseClient.NewListByServicePager method. +type APIReleaseClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APIReleaseClientUpdateOptions contains the optional parameters for the APIReleaseClient.Update method. +type APIReleaseClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// APIRevisionClientListByServiceOptions contains the optional parameters for the APIRevisionClient.NewListByServicePager +// method. +type APIRevisionClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APISchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the APISchemaClient.BeginCreateOrUpdate +// method. +type APISchemaClientBeginCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// APISchemaClientDeleteOptions contains the optional parameters for the APISchemaClient.Delete method. +type APISchemaClientDeleteOptions struct { + // If true removes all references to the schema before deleting it. + Force *bool +} + +// APISchemaClientGetEntityTagOptions contains the optional parameters for the APISchemaClient.GetEntityTag method. +type APISchemaClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APISchemaClientGetOptions contains the optional parameters for the APISchemaClient.Get method. +type APISchemaClientGetOptions struct { + // placeholder for future optional parameters +} + +// APISchemaClientListByAPIOptions contains the optional parameters for the APISchemaClient.NewListByAPIPager method. +type APISchemaClientListByAPIOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APITagDescriptionClientCreateOrUpdateOptions contains the optional parameters for the APITagDescriptionClient.CreateOrUpdate +// method. +type APITagDescriptionClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APITagDescriptionClientDeleteOptions contains the optional parameters for the APITagDescriptionClient.Delete method. +type APITagDescriptionClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APITagDescriptionClientGetEntityTagOptions contains the optional parameters for the APITagDescriptionClient.GetEntityTag +// method. +type APITagDescriptionClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APITagDescriptionClientGetOptions contains the optional parameters for the APITagDescriptionClient.Get method. +type APITagDescriptionClientGetOptions struct { + // placeholder for future optional parameters +} + +// APITagDescriptionClientListByServiceOptions contains the optional parameters for the APITagDescriptionClient.NewListByServicePager +// method. +type APITagDescriptionClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APIVersionSetClientCreateOrUpdateOptions contains the optional parameters for the APIVersionSetClient.CreateOrUpdate method. +type APIVersionSetClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APIVersionSetClientDeleteOptions contains the optional parameters for the APIVersionSetClient.Delete method. +type APIVersionSetClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIVersionSetClientGetEntityTagOptions contains the optional parameters for the APIVersionSetClient.GetEntityTag method. +type APIVersionSetClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIVersionSetClientGetOptions contains the optional parameters for the APIVersionSetClient.Get method. +type APIVersionSetClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIVersionSetClientListByServiceOptions contains the optional parameters for the APIVersionSetClient.NewListByServicePager +// method. +type APIVersionSetClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// APIVersionSetClientUpdateOptions contains the optional parameters for the APIVersionSetClient.Update method. +type APIVersionSetClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// APIWikiClientCreateOrUpdateOptions contains the optional parameters for the APIWikiClient.CreateOrUpdate method. +type APIWikiClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// APIWikiClientDeleteOptions contains the optional parameters for the APIWikiClient.Delete method. +type APIWikiClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// APIWikiClientGetEntityTagOptions contains the optional parameters for the APIWikiClient.GetEntityTag method. +type APIWikiClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// APIWikiClientGetOptions contains the optional parameters for the APIWikiClient.Get method. +type APIWikiClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIWikiClientUpdateOptions contains the optional parameters for the APIWikiClient.Update method. +type APIWikiClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// APIWikisClientListOptions contains the optional parameters for the APIWikisClient.NewListPager method. +type APIWikisClientListOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | eq | contains | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// AllPoliciesClientListByServiceOptions contains the optional parameters for the AllPoliciesClient.NewListByServicePager +// method. +type AllPoliciesClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationAccessPolicyClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationAccessPolicyClient.CreateOrUpdate +// method. +type AuthorizationAccessPolicyClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// AuthorizationAccessPolicyClientDeleteOptions contains the optional parameters for the AuthorizationAccessPolicyClient.Delete +// method. +type AuthorizationAccessPolicyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationAccessPolicyClientGetOptions contains the optional parameters for the AuthorizationAccessPolicyClient.Get +// method. +type AuthorizationAccessPolicyClientGetOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationAccessPolicyClientListByAuthorizationOptions contains the optional parameters for the AuthorizationAccessPolicyClient.NewListByAuthorizationPager +// method. +type AuthorizationAccessPolicyClientListByAuthorizationOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// AuthorizationClientConfirmConsentCodeOptions contains the optional parameters for the AuthorizationClient.ConfirmConsentCode +// method. +type AuthorizationClientConfirmConsentCodeOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationClient.CreateOrUpdate method. +type AuthorizationClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// AuthorizationClientDeleteOptions contains the optional parameters for the AuthorizationClient.Delete method. +type AuthorizationClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationClientGetOptions contains the optional parameters for the AuthorizationClient.Get method. +type AuthorizationClientGetOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationClientListByAuthorizationProviderOptions contains the optional parameters for the AuthorizationClient.NewListByAuthorizationProviderPager +// method. +type AuthorizationClientListByAuthorizationProviderOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// AuthorizationLoginLinksClientPostOptions contains the optional parameters for the AuthorizationLoginLinksClient.Post method. +type AuthorizationLoginLinksClientPostOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationProviderClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationProviderClient.CreateOrUpdate +// method. +type AuthorizationProviderClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// AuthorizationProviderClientDeleteOptions contains the optional parameters for the AuthorizationProviderClient.Delete method. +type AuthorizationProviderClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationProviderClientGetOptions contains the optional parameters for the AuthorizationProviderClient.Get method. +type AuthorizationProviderClientGetOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationProviderClientListByServiceOptions contains the optional parameters for the AuthorizationProviderClient.NewListByServicePager +// method. +type AuthorizationProviderClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// AuthorizationServerClientCreateOrUpdateOptions contains the optional parameters for the AuthorizationServerClient.CreateOrUpdate +// method. +type AuthorizationServerClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// AuthorizationServerClientDeleteOptions contains the optional parameters for the AuthorizationServerClient.Delete method. +type AuthorizationServerClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationServerClientGetEntityTagOptions contains the optional parameters for the AuthorizationServerClient.GetEntityTag +// method. +type AuthorizationServerClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationServerClientGetOptions contains the optional parameters for the AuthorizationServerClient.Get method. +type AuthorizationServerClientGetOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationServerClientListByServiceOptions contains the optional parameters for the AuthorizationServerClient.NewListByServicePager +// method. +type AuthorizationServerClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// AuthorizationServerClientListSecretsOptions contains the optional parameters for the AuthorizationServerClient.ListSecrets +// method. +type AuthorizationServerClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// AuthorizationServerClientUpdateOptions contains the optional parameters for the AuthorizationServerClient.Update method. +type AuthorizationServerClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BackendClientCreateOrUpdateOptions contains the optional parameters for the BackendClient.CreateOrUpdate method. +type BackendClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// BackendClientDeleteOptions contains the optional parameters for the BackendClient.Delete method. +type BackendClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// BackendClientGetEntityTagOptions contains the optional parameters for the BackendClient.GetEntityTag method. +type BackendClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// BackendClientGetOptions contains the optional parameters for the BackendClient.Get method. +type BackendClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackendClientListByServiceOptions contains the optional parameters for the BackendClient.NewListByServicePager method. +type BackendClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// BackendClientReconnectOptions contains the optional parameters for the BackendClient.Reconnect method. +type BackendClientReconnectOptions struct { + // Reconnect request parameters. + Parameters *BackendReconnectContract +} + +// BackendClientUpdateOptions contains the optional parameters for the BackendClient.Update method. +type BackendClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// CacheClientCreateOrUpdateOptions contains the optional parameters for the CacheClient.CreateOrUpdate method. +type CacheClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// CacheClientDeleteOptions contains the optional parameters for the CacheClient.Delete method. +type CacheClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CacheClientGetEntityTagOptions contains the optional parameters for the CacheClient.GetEntityTag method. +type CacheClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// CacheClientGetOptions contains the optional parameters for the CacheClient.Get method. +type CacheClientGetOptions struct { + // placeholder for future optional parameters +} + +// CacheClientListByServiceOptions contains the optional parameters for the CacheClient.NewListByServicePager method. +type CacheClientListByServiceOptions struct { + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// CacheClientUpdateOptions contains the optional parameters for the CacheClient.Update method. +type CacheClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientCreateOrUpdateOptions contains the optional parameters for the CertificateClient.CreateOrUpdate method. +type CertificateClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// CertificateClientDeleteOptions contains the optional parameters for the CertificateClient.Delete method. +type CertificateClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientGetEntityTagOptions contains the optional parameters for the CertificateClient.GetEntityTag method. +type CertificateClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientGetOptions contains the optional parameters for the CertificateClient.Get method. +type CertificateClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificateClientListByServiceOptions contains the optional parameters for the CertificateClient.NewListByServicePager +// method. +type CertificateClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | expirationDate | filter | ge, le, eq, ne, gt, lt | | + Filter *string + + // When set to true, the response contains only certificates entities which failed refresh. + IsKeyVaultRefreshFailed *bool + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// CertificateClientRefreshSecretOptions contains the optional parameters for the CertificateClient.RefreshSecret method. +type CertificateClientRefreshSecretOptions struct { + // placeholder for future optional parameters +} + +// ClientBeginPerformConnectivityCheckAsyncOptions contains the optional parameters for the Client.BeginPerformConnectivityCheckAsync +// method. +type ClientBeginPerformConnectivityCheckAsyncOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ContentItemClientCreateOrUpdateOptions contains the optional parameters for the ContentItemClient.CreateOrUpdate method. +type ContentItemClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// ContentItemClientDeleteOptions contains the optional parameters for the ContentItemClient.Delete method. +type ContentItemClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ContentItemClientGetEntityTagOptions contains the optional parameters for the ContentItemClient.GetEntityTag method. +type ContentItemClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// ContentItemClientGetOptions contains the optional parameters for the ContentItemClient.Get method. +type ContentItemClientGetOptions struct { + // placeholder for future optional parameters +} + +// ContentItemClientListByServiceOptions contains the optional parameters for the ContentItemClient.NewListByServicePager +// method. +type ContentItemClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// ContentTypeClientCreateOrUpdateOptions contains the optional parameters for the ContentTypeClient.CreateOrUpdate method. +type ContentTypeClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// ContentTypeClientDeleteOptions contains the optional parameters for the ContentTypeClient.Delete method. +type ContentTypeClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ContentTypeClientGetOptions contains the optional parameters for the ContentTypeClient.Get method. +type ContentTypeClientGetOptions struct { + // placeholder for future optional parameters +} + +// ContentTypeClientListByServiceOptions contains the optional parameters for the ContentTypeClient.NewListByServicePager +// method. +type ContentTypeClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// DelegationSettingsClientCreateOrUpdateOptions contains the optional parameters for the DelegationSettingsClient.CreateOrUpdate +// method. +type DelegationSettingsClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// DelegationSettingsClientGetEntityTagOptions contains the optional parameters for the DelegationSettingsClient.GetEntityTag +// method. +type DelegationSettingsClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// DelegationSettingsClientGetOptions contains the optional parameters for the DelegationSettingsClient.Get method. +type DelegationSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DelegationSettingsClientListSecretsOptions contains the optional parameters for the DelegationSettingsClient.ListSecrets +// method. +type DelegationSettingsClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// DelegationSettingsClientUpdateOptions contains the optional parameters for the DelegationSettingsClient.Update method. +type DelegationSettingsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DeletedServicesClientBeginPurgeOptions contains the optional parameters for the DeletedServicesClient.BeginPurge method. +type DeletedServicesClientBeginPurgeOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// DeletedServicesClientGetByNameOptions contains the optional parameters for the DeletedServicesClient.GetByName method. +type DeletedServicesClientGetByNameOptions struct { + // placeholder for future optional parameters +} + +// DeletedServicesClientListBySubscriptionOptions contains the optional parameters for the DeletedServicesClient.NewListBySubscriptionPager +// method. +type DeletedServicesClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticClientCreateOrUpdateOptions contains the optional parameters for the DiagnosticClient.CreateOrUpdate method. +type DiagnosticClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// DiagnosticClientDeleteOptions contains the optional parameters for the DiagnosticClient.Delete method. +type DiagnosticClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticClientGetEntityTagOptions contains the optional parameters for the DiagnosticClient.GetEntityTag method. +type DiagnosticClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticClientGetOptions contains the optional parameters for the DiagnosticClient.Get method. +type DiagnosticClientGetOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticClientListByServiceOptions contains the optional parameters for the DiagnosticClient.NewListByServicePager method. +type DiagnosticClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// DiagnosticClientUpdateOptions contains the optional parameters for the DiagnosticClient.Update method. +type DiagnosticClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DocumentationClientCreateOrUpdateOptions contains the optional parameters for the DocumentationClient.CreateOrUpdate method. +type DocumentationClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// DocumentationClientDeleteOptions contains the optional parameters for the DocumentationClient.Delete method. +type DocumentationClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DocumentationClientGetEntityTagOptions contains the optional parameters for the DocumentationClient.GetEntityTag method. +type DocumentationClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// DocumentationClientGetOptions contains the optional parameters for the DocumentationClient.Get method. +type DocumentationClientGetOptions struct { + // placeholder for future optional parameters +} + +// DocumentationClientListByServiceOptions contains the optional parameters for the DocumentationClient.NewListByServicePager +// method. +type DocumentationClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | eq | contains | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// DocumentationClientUpdateOptions contains the optional parameters for the DocumentationClient.Update method. +type DocumentationClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// EmailTemplateClientCreateOrUpdateOptions contains the optional parameters for the EmailTemplateClient.CreateOrUpdate method. +type EmailTemplateClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// EmailTemplateClientDeleteOptions contains the optional parameters for the EmailTemplateClient.Delete method. +type EmailTemplateClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// EmailTemplateClientGetEntityTagOptions contains the optional parameters for the EmailTemplateClient.GetEntityTag method. +type EmailTemplateClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// EmailTemplateClientGetOptions contains the optional parameters for the EmailTemplateClient.Get method. +type EmailTemplateClientGetOptions struct { + // placeholder for future optional parameters +} + +// EmailTemplateClientListByServiceOptions contains the optional parameters for the EmailTemplateClient.NewListByServicePager +// method. +type EmailTemplateClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// EmailTemplateClientUpdateOptions contains the optional parameters for the EmailTemplateClient.Update method. +type EmailTemplateClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// GatewayAPIClientCreateOrUpdateOptions contains the optional parameters for the GatewayAPIClient.CreateOrUpdate method. +type GatewayAPIClientCreateOrUpdateOptions struct { + Parameters *AssociationContract +} + +// GatewayAPIClientDeleteOptions contains the optional parameters for the GatewayAPIClient.Delete method. +type GatewayAPIClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// GatewayAPIClientGetEntityTagOptions contains the optional parameters for the GatewayAPIClient.GetEntityTag method. +type GatewayAPIClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// GatewayAPIClientListByServiceOptions contains the optional parameters for the GatewayAPIClient.NewListByServicePager method. +type GatewayAPIClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// GatewayCertificateAuthorityClientCreateOrUpdateOptions contains the optional parameters for the GatewayCertificateAuthorityClient.CreateOrUpdate +// method. +type GatewayCertificateAuthorityClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// GatewayCertificateAuthorityClientDeleteOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Delete +// method. +type GatewayCertificateAuthorityClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// GatewayCertificateAuthorityClientGetEntityTagOptions contains the optional parameters for the GatewayCertificateAuthorityClient.GetEntityTag +// method. +type GatewayCertificateAuthorityClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// GatewayCertificateAuthorityClientGetOptions contains the optional parameters for the GatewayCertificateAuthorityClient.Get +// method. +type GatewayCertificateAuthorityClientGetOptions struct { + // placeholder for future optional parameters +} + +// GatewayCertificateAuthorityClientListByServiceOptions contains the optional parameters for the GatewayCertificateAuthorityClient.NewListByServicePager +// method. +type GatewayCertificateAuthorityClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | eq, ne | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// GatewayClientCreateOrUpdateOptions contains the optional parameters for the GatewayClient.CreateOrUpdate method. +type GatewayClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// GatewayClientDeleteOptions contains the optional parameters for the GatewayClient.Delete method. +type GatewayClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// GatewayClientGenerateTokenOptions contains the optional parameters for the GatewayClient.GenerateToken method. +type GatewayClientGenerateTokenOptions struct { + // placeholder for future optional parameters +} + +// GatewayClientGetEntityTagOptions contains the optional parameters for the GatewayClient.GetEntityTag method. +type GatewayClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// GatewayClientGetOptions contains the optional parameters for the GatewayClient.Get method. +type GatewayClientGetOptions struct { + // placeholder for future optional parameters +} + +// GatewayClientInvalidateDebugCredentialsOptions contains the optional parameters for the GatewayClient.InvalidateDebugCredentials +// method. +type GatewayClientInvalidateDebugCredentialsOptions struct { + // placeholder for future optional parameters +} + +// GatewayClientListByServiceOptions contains the optional parameters for the GatewayClient.NewListByServicePager method. +type GatewayClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// GatewayClientListDebugCredentialsOptions contains the optional parameters for the GatewayClient.ListDebugCredentials method. +type GatewayClientListDebugCredentialsOptions struct { + // placeholder for future optional parameters +} + +// GatewayClientListKeysOptions contains the optional parameters for the GatewayClient.ListKeys method. +type GatewayClientListKeysOptions struct { + // placeholder for future optional parameters +} + +// GatewayClientListTraceOptions contains the optional parameters for the GatewayClient.ListTrace method. +type GatewayClientListTraceOptions struct { + // placeholder for future optional parameters +} + +// GatewayClientRegenerateKeyOptions contains the optional parameters for the GatewayClient.RegenerateKey method. +type GatewayClientRegenerateKeyOptions struct { + // placeholder for future optional parameters +} + +// GatewayClientUpdateOptions contains the optional parameters for the GatewayClient.Update method. +type GatewayClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// GatewayHostnameConfigurationClientCreateOrUpdateOptions contains the optional parameters for the GatewayHostnameConfigurationClient.CreateOrUpdate +// method. +type GatewayHostnameConfigurationClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// GatewayHostnameConfigurationClientDeleteOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Delete +// method. +type GatewayHostnameConfigurationClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// GatewayHostnameConfigurationClientGetEntityTagOptions contains the optional parameters for the GatewayHostnameConfigurationClient.GetEntityTag +// method. +type GatewayHostnameConfigurationClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// GatewayHostnameConfigurationClientGetOptions contains the optional parameters for the GatewayHostnameConfigurationClient.Get +// method. +type GatewayHostnameConfigurationClientGetOptions struct { + // placeholder for future optional parameters +} + +// GatewayHostnameConfigurationClientListByServiceOptions contains the optional parameters for the GatewayHostnameConfigurationClient.NewListByServicePager +// method. +type GatewayHostnameConfigurationClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// GatewaySKUsClientListAvailableSKUsOptions contains the optional parameters for the GatewaySKUsClient.NewListAvailableSKUsPager +// method. +type GatewaySKUsClientListAvailableSKUsOptions struct { + // placeholder for future optional parameters +} + +// GlobalSchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the GlobalSchemaClient.BeginCreateOrUpdate +// method. +type GlobalSchemaClientBeginCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// GlobalSchemaClientDeleteOptions contains the optional parameters for the GlobalSchemaClient.Delete method. +type GlobalSchemaClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// GlobalSchemaClientGetEntityTagOptions contains the optional parameters for the GlobalSchemaClient.GetEntityTag method. +type GlobalSchemaClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// GlobalSchemaClientGetOptions contains the optional parameters for the GlobalSchemaClient.Get method. +type GlobalSchemaClientGetOptions struct { + // placeholder for future optional parameters +} + +// GlobalSchemaClientListByServiceOptions contains the optional parameters for the GlobalSchemaClient.NewListByServicePager +// method. +type GlobalSchemaClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// GraphQLAPIResolverClientCreateOrUpdateOptions contains the optional parameters for the GraphQLAPIResolverClient.CreateOrUpdate +// method. +type GraphQLAPIResolverClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// GraphQLAPIResolverClientDeleteOptions contains the optional parameters for the GraphQLAPIResolverClient.Delete method. +type GraphQLAPIResolverClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// GraphQLAPIResolverClientGetEntityTagOptions contains the optional parameters for the GraphQLAPIResolverClient.GetEntityTag +// method. +type GraphQLAPIResolverClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// GraphQLAPIResolverClientGetOptions contains the optional parameters for the GraphQLAPIResolverClient.Get method. +type GraphQLAPIResolverClientGetOptions struct { + // placeholder for future optional parameters +} + +// GraphQLAPIResolverClientListByAPIOptions contains the optional parameters for the GraphQLAPIResolverClient.NewListByAPIPager +// method. +type GraphQLAPIResolverClientListByAPIOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// GraphQLAPIResolverClientUpdateOptions contains the optional parameters for the GraphQLAPIResolverClient.Update method. +type GraphQLAPIResolverClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// GraphQLAPIResolverPolicyClientCreateOrUpdateOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.CreateOrUpdate +// method. +type GraphQLAPIResolverPolicyClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// GraphQLAPIResolverPolicyClientDeleteOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.Delete +// method. +type GraphQLAPIResolverPolicyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// GraphQLAPIResolverPolicyClientGetEntityTagOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.GetEntityTag +// method. +type GraphQLAPIResolverPolicyClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// GraphQLAPIResolverPolicyClientGetOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.Get method. +type GraphQLAPIResolverPolicyClientGetOptions struct { + // Policy Export Format. + Format *PolicyExportFormat +} + +// GraphQLAPIResolverPolicyClientListByResolverOptions contains the optional parameters for the GraphQLAPIResolverPolicyClient.NewListByResolverPager +// method. +type GraphQLAPIResolverPolicyClientListByResolverOptions struct { + // placeholder for future optional parameters +} + +// GroupClientCreateOrUpdateOptions contains the optional parameters for the GroupClient.CreateOrUpdate method. +type GroupClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// GroupClientDeleteOptions contains the optional parameters for the GroupClient.Delete method. +type GroupClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// GroupClientGetEntityTagOptions contains the optional parameters for the GroupClient.GetEntityTag method. +type GroupClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// GroupClientGetOptions contains the optional parameters for the GroupClient.Get method. +type GroupClientGetOptions struct { + // placeholder for future optional parameters +} + +// GroupClientListByServiceOptions contains the optional parameters for the GroupClient.NewListByServicePager method. +type GroupClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | externalId | filter | eq | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// GroupClientUpdateOptions contains the optional parameters for the GroupClient.Update method. +type GroupClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// GroupUserClientCheckEntityExistsOptions contains the optional parameters for the GroupUserClient.CheckEntityExists method. +type GroupUserClientCheckEntityExistsOptions struct { + // placeholder for future optional parameters +} + +// GroupUserClientCreateOptions contains the optional parameters for the GroupUserClient.Create method. +type GroupUserClientCreateOptions struct { + // placeholder for future optional parameters +} + +// GroupUserClientDeleteOptions contains the optional parameters for the GroupUserClient.Delete method. +type GroupUserClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// GroupUserClientListOptions contains the optional parameters for the GroupUserClient.NewListPager method. +type GroupUserClientListOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | registrationDate | filter | ge, le, eq, ne, gt, lt | | + // | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// IdentityProviderClientCreateOrUpdateOptions contains the optional parameters for the IdentityProviderClient.CreateOrUpdate +// method. +type IdentityProviderClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// IdentityProviderClientDeleteOptions contains the optional parameters for the IdentityProviderClient.Delete method. +type IdentityProviderClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// IdentityProviderClientGetEntityTagOptions contains the optional parameters for the IdentityProviderClient.GetEntityTag +// method. +type IdentityProviderClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// IdentityProviderClientGetOptions contains the optional parameters for the IdentityProviderClient.Get method. +type IdentityProviderClientGetOptions struct { + // placeholder for future optional parameters +} + +// IdentityProviderClientListByServiceOptions contains the optional parameters for the IdentityProviderClient.NewListByServicePager +// method. +type IdentityProviderClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// IdentityProviderClientListSecretsOptions contains the optional parameters for the IdentityProviderClient.ListSecrets method. +type IdentityProviderClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// IdentityProviderClientUpdateOptions contains the optional parameters for the IdentityProviderClient.Update method. +type IdentityProviderClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// IssueClientGetOptions contains the optional parameters for the IssueClient.Get method. +type IssueClientGetOptions struct { + // placeholder for future optional parameters +} + +// IssueClientListByServiceOptions contains the optional parameters for the IssueClient.NewListByServicePager method. +type IssueClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | state | filter | eq | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// LoggerClientCreateOrUpdateOptions contains the optional parameters for the LoggerClient.CreateOrUpdate method. +type LoggerClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// LoggerClientDeleteOptions contains the optional parameters for the LoggerClient.Delete method. +type LoggerClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// LoggerClientGetEntityTagOptions contains the optional parameters for the LoggerClient.GetEntityTag method. +type LoggerClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// LoggerClientGetOptions contains the optional parameters for the LoggerClient.Get method. +type LoggerClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoggerClientListByServiceOptions contains the optional parameters for the LoggerClient.NewListByServicePager method. +type LoggerClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | loggerType | filter | eq | | + // | resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// LoggerClientUpdateOptions contains the optional parameters for the LoggerClient.Update method. +type LoggerClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// NamedValueClientBeginCreateOrUpdateOptions contains the optional parameters for the NamedValueClient.BeginCreateOrUpdate +// method. +type NamedValueClientBeginCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// NamedValueClientBeginRefreshSecretOptions contains the optional parameters for the NamedValueClient.BeginRefreshSecret +// method. +type NamedValueClientBeginRefreshSecretOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// NamedValueClientBeginUpdateOptions contains the optional parameters for the NamedValueClient.BeginUpdate method. +type NamedValueClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// NamedValueClientDeleteOptions contains the optional parameters for the NamedValueClient.Delete method. +type NamedValueClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// NamedValueClientGetEntityTagOptions contains the optional parameters for the NamedValueClient.GetEntityTag method. +type NamedValueClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// NamedValueClientGetOptions contains the optional parameters for the NamedValueClient.Get method. +type NamedValueClientGetOptions struct { + // placeholder for future optional parameters +} + +// NamedValueClientListByServiceOptions contains the optional parameters for the NamedValueClient.NewListByServicePager method. +type NamedValueClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // When set to true, the response contains only named value entities which failed refresh. + IsKeyVaultRefreshFailed *bool + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// NamedValueClientListValueOptions contains the optional parameters for the NamedValueClient.ListValue method. +type NamedValueClientListValueOptions struct { + // placeholder for future optional parameters +} + +// NetworkStatusClientListByLocationOptions contains the optional parameters for the NetworkStatusClient.ListByLocation method. +type NetworkStatusClientListByLocationOptions struct { + // placeholder for future optional parameters +} + +// NetworkStatusClientListByServiceOptions contains the optional parameters for the NetworkStatusClient.ListByService method. +type NetworkStatusClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// NotificationClientCreateOrUpdateOptions contains the optional parameters for the NotificationClient.CreateOrUpdate method. +type NotificationClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// NotificationClientGetOptions contains the optional parameters for the NotificationClient.Get method. +type NotificationClientGetOptions struct { + // placeholder for future optional parameters +} + +// NotificationClientListByServiceOptions contains the optional parameters for the NotificationClient.NewListByServicePager +// method. +type NotificationClientListByServiceOptions struct { + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// NotificationRecipientEmailClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientEmailClient.CheckEntityExists +// method. +type NotificationRecipientEmailClientCheckEntityExistsOptions struct { + // placeholder for future optional parameters +} + +// NotificationRecipientEmailClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientEmailClient.CreateOrUpdate +// method. +type NotificationRecipientEmailClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// NotificationRecipientEmailClientDeleteOptions contains the optional parameters for the NotificationRecipientEmailClient.Delete +// method. +type NotificationRecipientEmailClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// NotificationRecipientEmailClientListByNotificationOptions contains the optional parameters for the NotificationRecipientEmailClient.ListByNotification +// method. +type NotificationRecipientEmailClientListByNotificationOptions struct { + // placeholder for future optional parameters +} + +// NotificationRecipientUserClientCheckEntityExistsOptions contains the optional parameters for the NotificationRecipientUserClient.CheckEntityExists +// method. +type NotificationRecipientUserClientCheckEntityExistsOptions struct { + // placeholder for future optional parameters +} + +// NotificationRecipientUserClientCreateOrUpdateOptions contains the optional parameters for the NotificationRecipientUserClient.CreateOrUpdate +// method. +type NotificationRecipientUserClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// NotificationRecipientUserClientDeleteOptions contains the optional parameters for the NotificationRecipientUserClient.Delete +// method. +type NotificationRecipientUserClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// NotificationRecipientUserClientListByNotificationOptions contains the optional parameters for the NotificationRecipientUserClient.ListByNotification +// method. +type NotificationRecipientUserClientListByNotificationOptions struct { + // placeholder for future optional parameters +} + +// OpenIDConnectProviderClientCreateOrUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.CreateOrUpdate +// method. +type OpenIDConnectProviderClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// OpenIDConnectProviderClientDeleteOptions contains the optional parameters for the OpenIDConnectProviderClient.Delete method. +type OpenIDConnectProviderClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// OpenIDConnectProviderClientGetEntityTagOptions contains the optional parameters for the OpenIDConnectProviderClient.GetEntityTag +// method. +type OpenIDConnectProviderClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// OpenIDConnectProviderClientGetOptions contains the optional parameters for the OpenIDConnectProviderClient.Get method. +type OpenIDConnectProviderClientGetOptions struct { + // placeholder for future optional parameters +} + +// OpenIDConnectProviderClientListByServiceOptions contains the optional parameters for the OpenIDConnectProviderClient.NewListByServicePager +// method. +type OpenIDConnectProviderClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// OpenIDConnectProviderClientListSecretsOptions contains the optional parameters for the OpenIDConnectProviderClient.ListSecrets +// method. +type OpenIDConnectProviderClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// OpenIDConnectProviderClientUpdateOptions contains the optional parameters for the OpenIDConnectProviderClient.Update method. +type OpenIDConnectProviderClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// OperationClientListByTagsOptions contains the optional parameters for the OperationClient.NewListByTagsPager method. +type OperationClientListByTagsOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Include not tagged Operations. + IncludeNotTaggedOperations *bool + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method. +type OperationStatusClientGetOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsResultsClientGetOptions contains the optional parameters for the OperationsResultsClient.Get method. +type OperationsResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// OutboundNetworkDependenciesEndpointsClientListByServiceOptions contains the optional parameters for the OutboundNetworkDependenciesEndpointsClient.ListByService +// method. +type OutboundNetworkDependenciesEndpointsClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// PolicyClientCreateOrUpdateOptions contains the optional parameters for the PolicyClient.CreateOrUpdate method. +type PolicyClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// PolicyClientDeleteOptions contains the optional parameters for the PolicyClient.Delete method. +type PolicyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PolicyClientGetEntityTagOptions contains the optional parameters for the PolicyClient.GetEntityTag method. +type PolicyClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// PolicyClientGetOptions contains the optional parameters for the PolicyClient.Get method. +type PolicyClientGetOptions struct { + // Policy Export Format. + Format *PolicyExportFormat +} + +// PolicyClientListByServiceOptions contains the optional parameters for the PolicyClient.NewListByServicePager method. +type PolicyClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// PolicyDescriptionClientListByServiceOptions contains the optional parameters for the PolicyDescriptionClient.ListByService +// method. +type PolicyDescriptionClientListByServiceOptions struct { + // Policy scope. + Scope *PolicyScopeContract +} + +// PolicyFragmentClientBeginCreateOrUpdateOptions contains the optional parameters for the PolicyFragmentClient.BeginCreateOrUpdate +// method. +type PolicyFragmentClientBeginCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PolicyFragmentClientDeleteOptions contains the optional parameters for the PolicyFragmentClient.Delete method. +type PolicyFragmentClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PolicyFragmentClientGetEntityTagOptions contains the optional parameters for the PolicyFragmentClient.GetEntityTag method. +type PolicyFragmentClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// PolicyFragmentClientGetOptions contains the optional parameters for the PolicyFragmentClient.Get method. +type PolicyFragmentClientGetOptions struct { + // Policy fragment content format. + Format *PolicyFragmentContentFormat +} + +// PolicyFragmentClientListByServiceOptions contains the optional parameters for the PolicyFragmentClient.NewListByServicePager +// method. +type PolicyFragmentClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // OData order by query option. + Orderby *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// PolicyFragmentClientListReferencesOptions contains the optional parameters for the PolicyFragmentClient.ListReferences +// method. +type PolicyFragmentClientListReferencesOptions struct { + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// PolicyRestrictionClientCreateOrUpdateOptions contains the optional parameters for the PolicyRestrictionClient.CreateOrUpdate +// method. +type PolicyRestrictionClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// PolicyRestrictionClientDeleteOptions contains the optional parameters for the PolicyRestrictionClient.Delete method. +type PolicyRestrictionClientDeleteOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// PolicyRestrictionClientGetEntityTagOptions contains the optional parameters for the PolicyRestrictionClient.GetEntityTag +// method. +type PolicyRestrictionClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// PolicyRestrictionClientGetOptions contains the optional parameters for the PolicyRestrictionClient.Get method. +type PolicyRestrictionClientGetOptions struct { + // placeholder for future optional parameters +} + +// PolicyRestrictionClientListByServiceOptions contains the optional parameters for the PolicyRestrictionClient.NewListByServicePager +// method. +type PolicyRestrictionClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// PolicyRestrictionClientUpdateOptions contains the optional parameters for the PolicyRestrictionClient.Update method. +type PolicyRestrictionClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// PolicyRestrictionValidationsClientBeginByServiceOptions contains the optional parameters for the PolicyRestrictionValidationsClient.BeginByService +// method. +type PolicyRestrictionValidationsClientBeginByServiceOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PortalConfigClientCreateOrUpdateOptions contains the optional parameters for the PortalConfigClient.CreateOrUpdate method. +type PortalConfigClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// PortalConfigClientGetEntityTagOptions contains the optional parameters for the PortalConfigClient.GetEntityTag method. +type PortalConfigClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// PortalConfigClientGetOptions contains the optional parameters for the PortalConfigClient.Get method. +type PortalConfigClientGetOptions struct { + // placeholder for future optional parameters +} + +// PortalConfigClientListByServiceOptions contains the optional parameters for the PortalConfigClient.NewListByServicePager +// method. +type PortalConfigClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// PortalConfigClientUpdateOptions contains the optional parameters for the PortalConfigClient.Update method. +type PortalConfigClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// PortalRevisionClientBeginCreateOrUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginCreateOrUpdate +// method. +type PortalRevisionClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PortalRevisionClientBeginUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginUpdate method. +type PortalRevisionClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PortalRevisionClientGetEntityTagOptions contains the optional parameters for the PortalRevisionClient.GetEntityTag method. +type PortalRevisionClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// PortalRevisionClientGetOptions contains the optional parameters for the PortalRevisionClient.Get method. +type PortalRevisionClientGetOptions struct { + // placeholder for future optional parameters +} + +// PortalRevisionClientListByServiceOptions contains the optional parameters for the PortalRevisionClient.NewListByServicePager +// method. +type PortalRevisionClientListByServiceOptions struct { + // FIELD SUPPORTED OPERATORS SUPPORTED FUNCTIONS + // |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| |description | ge, le, eq, ne, gt, lt | substringof, + // contains, startswith, endswith| |isCurrent | eq, ne | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// PortalSettingsClientListByServiceOptions contains the optional parameters for the PortalSettingsClient.ListByService method. +type PortalSettingsClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginCreateOrUpdate +// method. +type PrivateEndpointConnectionClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete +// method. +type PrivateEndpointConnectionClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionClientGetByNameOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetByName +// method. +type PrivateEndpointConnectionClientGetByNameOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionClientGetPrivateLinkResourceOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetPrivateLinkResource +// method. +type PrivateEndpointConnectionClientGetPrivateLinkResourceOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionClientListByServiceOptions contains the optional parameters for the PrivateEndpointConnectionClient.NewListByServicePager +// method. +type PrivateEndpointConnectionClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionClientListPrivateLinkResourcesOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListPrivateLinkResources +// method. +type PrivateEndpointConnectionClientListPrivateLinkResourcesOptions struct { + // placeholder for future optional parameters +} + +// ProductAPIClientCheckEntityExistsOptions contains the optional parameters for the ProductAPIClient.CheckEntityExists method. +type ProductAPIClientCheckEntityExistsOptions struct { + // placeholder for future optional parameters +} + +// ProductAPIClientCreateOrUpdateOptions contains the optional parameters for the ProductAPIClient.CreateOrUpdate method. +type ProductAPIClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProductAPIClientDeleteOptions contains the optional parameters for the ProductAPIClient.Delete method. +type ProductAPIClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProductAPIClientListByProductOptions contains the optional parameters for the ProductAPIClient.NewListByProductPager method. +type ProductAPIClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ProductAPILinkClientCreateOrUpdateOptions contains the optional parameters for the ProductAPILinkClient.CreateOrUpdate +// method. +type ProductAPILinkClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProductAPILinkClientDeleteOptions contains the optional parameters for the ProductAPILinkClient.Delete method. +type ProductAPILinkClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProductAPILinkClientGetOptions contains the optional parameters for the ProductAPILinkClient.Get method. +type ProductAPILinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProductAPILinkClientListByProductOptions contains the optional parameters for the ProductAPILinkClient.NewListByProductPager +// method. +type ProductAPILinkClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ProductClientCreateOrUpdateOptions contains the optional parameters for the ProductClient.CreateOrUpdate method. +type ProductClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// ProductClientDeleteOptions contains the optional parameters for the ProductClient.Delete method. +type ProductClientDeleteOptions struct { + // Delete existing subscriptions associated with the product or not. + DeleteSubscriptions *bool +} + +// ProductClientGetEntityTagOptions contains the optional parameters for the ProductClient.GetEntityTag method. +type ProductClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// ProductClientGetOptions contains the optional parameters for the ProductClient.Get method. +type ProductClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProductClientListByServiceOptions contains the optional parameters for the ProductClient.NewListByServicePager method. +type ProductClientListByServiceOptions struct { + // When set to true, the response contains an array of groups that have visibility to the product. The default is false. + ExpandGroups *bool + + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | state | filter | eq | | + // | groups | expand | | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Products which are part of a specific tag. + Tags *string + + // Number of records to return. + Top *int32 +} + +// ProductClientListByTagsOptions contains the optional parameters for the ProductClient.NewListByTagsPager method. +type ProductClientListByTagsOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | state | filter | eq | substringof, contains, startswith, endswith | + Filter *string + + // Include not tagged Products. + IncludeNotTaggedProducts *bool + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ProductClientUpdateOptions contains the optional parameters for the ProductClient.Update method. +type ProductClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProductGroupClientCheckEntityExistsOptions contains the optional parameters for the ProductGroupClient.CheckEntityExists +// method. +type ProductGroupClientCheckEntityExistsOptions struct { + // placeholder for future optional parameters +} + +// ProductGroupClientCreateOrUpdateOptions contains the optional parameters for the ProductGroupClient.CreateOrUpdate method. +type ProductGroupClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProductGroupClientDeleteOptions contains the optional parameters for the ProductGroupClient.Delete method. +type ProductGroupClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProductGroupClientListByProductOptions contains the optional parameters for the ProductGroupClient.NewListByProductPager +// method. +type ProductGroupClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | | + // | displayName | filter | eq, ne | | + // | description | filter | eq, ne | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ProductGroupLinkClientCreateOrUpdateOptions contains the optional parameters for the ProductGroupLinkClient.CreateOrUpdate +// method. +type ProductGroupLinkClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProductGroupLinkClientDeleteOptions contains the optional parameters for the ProductGroupLinkClient.Delete method. +type ProductGroupLinkClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProductGroupLinkClientGetOptions contains the optional parameters for the ProductGroupLinkClient.Get method. +type ProductGroupLinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProductGroupLinkClientListByProductOptions contains the optional parameters for the ProductGroupLinkClient.NewListByProductPager +// method. +type ProductGroupLinkClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | groupId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ProductPolicyClientCreateOrUpdateOptions contains the optional parameters for the ProductPolicyClient.CreateOrUpdate method. +type ProductPolicyClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// ProductPolicyClientDeleteOptions contains the optional parameters for the ProductPolicyClient.Delete method. +type ProductPolicyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProductPolicyClientGetEntityTagOptions contains the optional parameters for the ProductPolicyClient.GetEntityTag method. +type ProductPolicyClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// ProductPolicyClientGetOptions contains the optional parameters for the ProductPolicyClient.Get method. +type ProductPolicyClientGetOptions struct { + // Policy Export Format. + Format *PolicyExportFormat +} + +// ProductPolicyClientListByProductOptions contains the optional parameters for the ProductPolicyClient.NewListByProductPager +// method. +type ProductPolicyClientListByProductOptions struct { + // placeholder for future optional parameters +} + +// ProductSubscriptionsClientListOptions contains the optional parameters for the ProductSubscriptionsClient.NewListPager +// method. +type ProductSubscriptionsClientListOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | state | filter | eq | | + // | user | expand | | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ProductWikiClientCreateOrUpdateOptions contains the optional parameters for the ProductWikiClient.CreateOrUpdate method. +type ProductWikiClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// ProductWikiClientDeleteOptions contains the optional parameters for the ProductWikiClient.Delete method. +type ProductWikiClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProductWikiClientGetEntityTagOptions contains the optional parameters for the ProductWikiClient.GetEntityTag method. +type ProductWikiClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// ProductWikiClientGetOptions contains the optional parameters for the ProductWikiClient.Get method. +type ProductWikiClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProductWikiClientUpdateOptions contains the optional parameters for the ProductWikiClient.Update method. +type ProductWikiClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProductWikisClientListOptions contains the optional parameters for the ProductWikisClient.NewListPager method. +type ProductWikisClientListOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | eq | contains | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// QuotaByCounterKeysClientListByServiceOptions contains the optional parameters for the QuotaByCounterKeysClient.ListByService +// method. +type QuotaByCounterKeysClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// QuotaByCounterKeysClientUpdateOptions contains the optional parameters for the QuotaByCounterKeysClient.Update method. +type QuotaByCounterKeysClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// QuotaByPeriodKeysClientGetOptions contains the optional parameters for the QuotaByPeriodKeysClient.Get method. +type QuotaByPeriodKeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// QuotaByPeriodKeysClientUpdateOptions contains the optional parameters for the QuotaByPeriodKeysClient.Update method. +type QuotaByPeriodKeysClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// RegionClientListByServiceOptions contains the optional parameters for the RegionClient.NewListByServicePager method. +type RegionClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// ReportsClientListByAPIOptions contains the optional parameters for the ReportsClient.NewListByAPIPager method. +type ReportsClientListByAPIOptions struct { + // OData order by query option. + Orderby *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ReportsClientListByGeoOptions contains the optional parameters for the ReportsClient.NewListByGeoPager method. +type ReportsClientListByGeoOptions struct { + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ReportsClientListByOperationOptions contains the optional parameters for the ReportsClient.NewListByOperationPager method. +type ReportsClientListByOperationOptions struct { + // OData order by query option. + Orderby *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ReportsClientListByProductOptions contains the optional parameters for the ReportsClient.NewListByProductPager method. +type ReportsClientListByProductOptions struct { + // OData order by query option. + Orderby *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ReportsClientListByRequestOptions contains the optional parameters for the ReportsClient.NewListByRequestPager method. +type ReportsClientListByRequestOptions struct { + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ReportsClientListBySubscriptionOptions contains the optional parameters for the ReportsClient.NewListBySubscriptionPager +// method. +type ReportsClientListBySubscriptionOptions struct { + // OData order by query option. + Orderby *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ReportsClientListByTimeOptions contains the optional parameters for the ReportsClient.NewListByTimePager method. +type ReportsClientListByTimeOptions struct { + // OData order by query option. + Orderby *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// ReportsClientListByUserOptions contains the optional parameters for the ReportsClient.NewListByUserPager method. +type ReportsClientListByUserOptions struct { + // OData order by query option. + Orderby *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. +type SKUsClientListOptions struct { + // placeholder for future optional parameters +} + +// ServiceClientBeginApplyNetworkConfigurationUpdatesOptions contains the optional parameters for the ServiceClient.BeginApplyNetworkConfigurationUpdates +// method. +type ServiceClientBeginApplyNetworkConfigurationUpdatesOptions struct { + // Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which + // the Api Management service is deployed will be updated sequentially without + // incurring downtime in the region. + Parameters *ServiceApplyNetworkConfigurationParameters + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ServiceClientBeginBackupOptions contains the optional parameters for the ServiceClient.BeginBackup method. +type ServiceClientBeginBackupOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ServiceClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceClient.BeginCreateOrUpdate method. +type ServiceClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method. +type ServiceClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ServiceClientBeginMigrateToStv2Options contains the optional parameters for the ServiceClient.BeginMigrateToStv2 method. +type ServiceClientBeginMigrateToStv2Options struct { + // Optional parameters supplied to migrate service. + Parameters *MigrateToStv2Contract + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ServiceClientBeginRestoreOptions contains the optional parameters for the ServiceClient.BeginRestore method. +type ServiceClientBeginRestoreOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ServiceClientBeginUpdateOptions contains the optional parameters for the ServiceClient.BeginUpdate method. +type ServiceClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ServiceClientCheckNameAvailabilityOptions contains the optional parameters for the ServiceClient.CheckNameAvailability +// method. +type ServiceClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ServiceClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the ServiceClient.GetDomainOwnershipIdentifier +// method. +type ServiceClientGetDomainOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method. +type ServiceClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServiceClientGetSsoTokenOptions contains the optional parameters for the ServiceClient.GetSsoToken method. +type ServiceClientGetSsoTokenOptions struct { + // placeholder for future optional parameters +} + +// ServiceClientListByResourceGroupOptions contains the optional parameters for the ServiceClient.NewListByResourceGroupPager +// method. +type ServiceClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method. +type ServiceClientListOptions struct { + // placeholder for future optional parameters +} + +// ServiceSKUsClientListAvailableServiceSKUsOptions contains the optional parameters for the ServiceSKUsClient.NewListAvailableServiceSKUsPager +// method. +type ServiceSKUsClientListAvailableServiceSKUsOptions struct { + // placeholder for future optional parameters +} + +// SignInSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignInSettingsClient.CreateOrUpdate +// method. +type SignInSettingsClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// SignInSettingsClientGetEntityTagOptions contains the optional parameters for the SignInSettingsClient.GetEntityTag method. +type SignInSettingsClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// SignInSettingsClientGetOptions contains the optional parameters for the SignInSettingsClient.Get method. +type SignInSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SignInSettingsClientUpdateOptions contains the optional parameters for the SignInSettingsClient.Update method. +type SignInSettingsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SignUpSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignUpSettingsClient.CreateOrUpdate +// method. +type SignUpSettingsClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// SignUpSettingsClientGetEntityTagOptions contains the optional parameters for the SignUpSettingsClient.GetEntityTag method. +type SignUpSettingsClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// SignUpSettingsClientGetOptions contains the optional parameters for the SignUpSettingsClient.Get method. +type SignUpSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SignUpSettingsClientUpdateOptions contains the optional parameters for the SignUpSettingsClient.Update method. +type SignUpSettingsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionClient.CreateOrUpdate method. +type SubscriptionClientCreateOrUpdateOptions struct { + // Determines the type of application which send the create user request. Default is legacy publisher portal. + AppType *AppType + + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Notify change in Subscription State. + // * If false, do not send any email notification for change of state of subscription + // * If true, send email notification of change of state of subscription + Notify *bool +} + +// SubscriptionClientDeleteOptions contains the optional parameters for the SubscriptionClient.Delete method. +type SubscriptionClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionClientGetEntityTagOptions contains the optional parameters for the SubscriptionClient.GetEntityTag method. +type SubscriptionClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionClientGetOptions contains the optional parameters for the SubscriptionClient.Get method. +type SubscriptionClientGetOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionClientListOptions contains the optional parameters for the SubscriptionClient.NewListPager method. +type SubscriptionClientListOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | state | filter | eq | | + // | user | expand | | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// SubscriptionClientListSecretsOptions contains the optional parameters for the SubscriptionClient.ListSecrets method. +type SubscriptionClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionClientRegeneratePrimaryKeyOptions contains the optional parameters for the SubscriptionClient.RegeneratePrimaryKey +// method. +type SubscriptionClientRegeneratePrimaryKeyOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionClientRegenerateSecondaryKeyOptions contains the optional parameters for the SubscriptionClient.RegenerateSecondaryKey +// method. +type SubscriptionClientRegenerateSecondaryKeyOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionClientUpdateOptions contains the optional parameters for the SubscriptionClient.Update method. +type SubscriptionClientUpdateOptions struct { + // Determines the type of application which send the create user request. Default is legacy publisher portal. + AppType *AppType + + // Notify change in Subscription State. + // * If false, do not send any email notification for change of state of subscription + // * If true, send email notification of change of state of subscription + Notify *bool +} + +// TagAPILinkClientCreateOrUpdateOptions contains the optional parameters for the TagAPILinkClient.CreateOrUpdate method. +type TagAPILinkClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// TagAPILinkClientDeleteOptions contains the optional parameters for the TagAPILinkClient.Delete method. +type TagAPILinkClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// TagAPILinkClientGetOptions contains the optional parameters for the TagAPILinkClient.Get method. +type TagAPILinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// TagAPILinkClientListByProductOptions contains the optional parameters for the TagAPILinkClient.NewListByProductPager method. +type TagAPILinkClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// TagClientAssignToAPIOptions contains the optional parameters for the TagClient.AssignToAPI method. +type TagClientAssignToAPIOptions struct { + // placeholder for future optional parameters +} + +// TagClientAssignToOperationOptions contains the optional parameters for the TagClient.AssignToOperation method. +type TagClientAssignToOperationOptions struct { + // placeholder for future optional parameters +} + +// TagClientAssignToProductOptions contains the optional parameters for the TagClient.AssignToProduct method. +type TagClientAssignToProductOptions struct { + // placeholder for future optional parameters +} + +// TagClientCreateOrUpdateOptions contains the optional parameters for the TagClient.CreateOrUpdate method. +type TagClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// TagClientDeleteOptions contains the optional parameters for the TagClient.Delete method. +type TagClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// TagClientDetachFromAPIOptions contains the optional parameters for the TagClient.DetachFromAPI method. +type TagClientDetachFromAPIOptions struct { + // placeholder for future optional parameters +} + +// TagClientDetachFromOperationOptions contains the optional parameters for the TagClient.DetachFromOperation method. +type TagClientDetachFromOperationOptions struct { + // placeholder for future optional parameters +} + +// TagClientDetachFromProductOptions contains the optional parameters for the TagClient.DetachFromProduct method. +type TagClientDetachFromProductOptions struct { + // placeholder for future optional parameters +} + +// TagClientGetByAPIOptions contains the optional parameters for the TagClient.GetByAPI method. +type TagClientGetByAPIOptions struct { + // placeholder for future optional parameters +} + +// TagClientGetByOperationOptions contains the optional parameters for the TagClient.GetByOperation method. +type TagClientGetByOperationOptions struct { + // placeholder for future optional parameters +} + +// TagClientGetByProductOptions contains the optional parameters for the TagClient.GetByProduct method. +type TagClientGetByProductOptions struct { + // placeholder for future optional parameters +} + +// TagClientGetEntityStateByAPIOptions contains the optional parameters for the TagClient.GetEntityStateByAPI method. +type TagClientGetEntityStateByAPIOptions struct { + // placeholder for future optional parameters +} + +// TagClientGetEntityStateByOperationOptions contains the optional parameters for the TagClient.GetEntityStateByOperation +// method. +type TagClientGetEntityStateByOperationOptions struct { + // placeholder for future optional parameters +} + +// TagClientGetEntityStateByProductOptions contains the optional parameters for the TagClient.GetEntityStateByProduct method. +type TagClientGetEntityStateByProductOptions struct { + // placeholder for future optional parameters +} + +// TagClientGetEntityStateOptions contains the optional parameters for the TagClient.GetEntityState method. +type TagClientGetEntityStateOptions struct { + // placeholder for future optional parameters +} + +// TagClientGetOptions contains the optional parameters for the TagClient.Get method. +type TagClientGetOptions struct { + // placeholder for future optional parameters +} + +// TagClientListByAPIOptions contains the optional parameters for the TagClient.NewListByAPIPager method. +type TagClientListByAPIOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// TagClientListByOperationOptions contains the optional parameters for the TagClient.NewListByOperationPager method. +type TagClientListByOperationOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// TagClientListByProductOptions contains the optional parameters for the TagClient.NewListByProductPager method. +type TagClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// TagClientListByServiceOptions contains the optional parameters for the TagClient.NewListByServicePager method. +type TagClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Scope like 'apis', 'products' or 'apis/{apiId} + Scope *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// TagClientUpdateOptions contains the optional parameters for the TagClient.Update method. +type TagClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// TagOperationLinkClientCreateOrUpdateOptions contains the optional parameters for the TagOperationLinkClient.CreateOrUpdate +// method. +type TagOperationLinkClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// TagOperationLinkClientDeleteOptions contains the optional parameters for the TagOperationLinkClient.Delete method. +type TagOperationLinkClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// TagOperationLinkClientGetOptions contains the optional parameters for the TagOperationLinkClient.Get method. +type TagOperationLinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// TagOperationLinkClientListByProductOptions contains the optional parameters for the TagOperationLinkClient.NewListByProductPager +// method. +type TagOperationLinkClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | operationId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// TagProductLinkClientCreateOrUpdateOptions contains the optional parameters for the TagProductLinkClient.CreateOrUpdate +// method. +type TagProductLinkClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// TagProductLinkClientDeleteOptions contains the optional parameters for the TagProductLinkClient.Delete method. +type TagProductLinkClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// TagProductLinkClientGetOptions contains the optional parameters for the TagProductLinkClient.Get method. +type TagProductLinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// TagProductLinkClientListByProductOptions contains the optional parameters for the TagProductLinkClient.NewListByProductPager +// method. +type TagProductLinkClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// TagResourceClientListByServiceOptions contains the optional parameters for the TagResourceClient.NewListByServicePager +// method. +type TagResourceClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | state | filter | eq | | + // | isCurrent | filter | eq | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// TenantAccessClientCreateOptions contains the optional parameters for the TenantAccessClient.Create method. +type TenantAccessClientCreateOptions struct { + // placeholder for future optional parameters +} + +// TenantAccessClientGetEntityTagOptions contains the optional parameters for the TenantAccessClient.GetEntityTag method. +type TenantAccessClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// TenantAccessClientGetOptions contains the optional parameters for the TenantAccessClient.Get method. +type TenantAccessClientGetOptions struct { + // placeholder for future optional parameters +} + +// TenantAccessClientListByServiceOptions contains the optional parameters for the TenantAccessClient.NewListByServicePager +// method. +type TenantAccessClientListByServiceOptions struct { + // Not used + Filter *string +} + +// TenantAccessClientListSecretsOptions contains the optional parameters for the TenantAccessClient.ListSecrets method. +type TenantAccessClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// TenantAccessClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessClient.RegeneratePrimaryKey +// method. +type TenantAccessClientRegeneratePrimaryKeyOptions struct { + // placeholder for future optional parameters +} + +// TenantAccessClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessClient.RegenerateSecondaryKey +// method. +type TenantAccessClientRegenerateSecondaryKeyOptions struct { + // placeholder for future optional parameters +} + +// TenantAccessClientUpdateOptions contains the optional parameters for the TenantAccessClient.Update method. +type TenantAccessClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// TenantAccessGitClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegeneratePrimaryKey +// method. +type TenantAccessGitClientRegeneratePrimaryKeyOptions struct { + // placeholder for future optional parameters +} + +// TenantAccessGitClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegenerateSecondaryKey +// method. +type TenantAccessGitClientRegenerateSecondaryKeyOptions struct { + // placeholder for future optional parameters +} + +// TenantConfigurationClientBeginDeployOptions contains the optional parameters for the TenantConfigurationClient.BeginDeploy +// method. +type TenantConfigurationClientBeginDeployOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// TenantConfigurationClientBeginSaveOptions contains the optional parameters for the TenantConfigurationClient.BeginSave +// method. +type TenantConfigurationClientBeginSaveOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// TenantConfigurationClientBeginValidateOptions contains the optional parameters for the TenantConfigurationClient.BeginValidate +// method. +type TenantConfigurationClientBeginValidateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// TenantConfigurationClientGetSyncStateOptions contains the optional parameters for the TenantConfigurationClient.GetSyncState +// method. +type TenantConfigurationClientGetSyncStateOptions struct { + // placeholder for future optional parameters +} + +// TenantSettingsClientGetOptions contains the optional parameters for the TenantSettingsClient.Get method. +type TenantSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TenantSettingsClientListByServiceOptions contains the optional parameters for the TenantSettingsClient.NewListByServicePager +// method. +type TenantSettingsClientListByServiceOptions struct { + // Not used + Filter *string +} + +// UserClientBeginDeleteOptions contains the optional parameters for the UserClient.BeginDelete method. +type UserClientBeginDeleteOptions struct { + // Determines the type of application which send the create user request. Default is legacy publisher portal. + AppType *AppType + + // Whether to delete user's subscription or not. + DeleteSubscriptions *bool + + // Send an Account Closed Email notification to the User. + Notify *bool + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// UserClientCreateOrUpdateOptions contains the optional parameters for the UserClient.CreateOrUpdate method. +type UserClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Send an Email notification to the User. + Notify *bool +} + +// UserClientGenerateSsoURLOptions contains the optional parameters for the UserClient.GenerateSsoURL method. +type UserClientGenerateSsoURLOptions struct { + // placeholder for future optional parameters +} + +// UserClientGetEntityTagOptions contains the optional parameters for the UserClient.GetEntityTag method. +type UserClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// UserClientGetOptions contains the optional parameters for the UserClient.Get method. +type UserClientGetOptions struct { + // placeholder for future optional parameters +} + +// UserClientGetSharedAccessTokenOptions contains the optional parameters for the UserClient.GetSharedAccessToken method. +type UserClientGetSharedAccessTokenOptions struct { + // placeholder for future optional parameters +} + +// UserClientListByServiceOptions contains the optional parameters for the UserClient.NewListByServicePager method. +type UserClientListByServiceOptions struct { + // Detailed Group in response. + ExpandGroups *bool + + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | state | filter | eq | | + // | registrationDate | filter | ge, le, eq, ne, gt, lt | | + // | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | groups | expand | | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// UserClientUpdateOptions contains the optional parameters for the UserClient.Update method. +type UserClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// UserConfirmationPasswordClientSendOptions contains the optional parameters for the UserConfirmationPasswordClient.Send +// method. +type UserConfirmationPasswordClientSendOptions struct { + // Determines the type of application which send the create user request. Default is legacy publisher portal. + AppType *AppType +} + +// UserGroupClientListOptions contains the optional parameters for the UserGroupClient.NewListPager method. +type UserGroupClientListOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|------------------------|-----------------------------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// UserIdentitiesClientListOptions contains the optional parameters for the UserIdentitiesClient.NewListPager method. +type UserIdentitiesClientListOptions struct { + // placeholder for future optional parameters +} + +// UserSubscriptionClientGetOptions contains the optional parameters for the UserSubscriptionClient.Get method. +type UserSubscriptionClientGetOptions struct { + // placeholder for future optional parameters +} + +// UserSubscriptionClientListOptions contains the optional parameters for the UserSubscriptionClient.NewListPager method. +type UserSubscriptionClientListOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|------------------------|-----------------------------------| + // |name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // |displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // |stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // |ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // |scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // |userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // |productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceAPIClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIClient.BeginCreateOrUpdate +// method. +type WorkspaceAPIClientBeginCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// WorkspaceAPIClientDeleteOptions contains the optional parameters for the WorkspaceAPIClient.Delete method. +type WorkspaceAPIClientDeleteOptions struct { + // Delete all revisions of the Api. + DeleteRevisions *bool +} + +// WorkspaceAPIClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIClient.GetEntityTag method. +type WorkspaceAPIClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIClientGetOptions contains the optional parameters for the WorkspaceAPIClient.Get method. +type WorkspaceAPIClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIClientListByServiceOptions contains the optional parameters for the WorkspaceAPIClient.NewListByServicePager +// method. +type WorkspaceAPIClientListByServiceOptions struct { + // Include full ApiVersionSet resource in response + ExpandAPIVersionSet *bool + + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | isCurrent | filter | eq, ne | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Include tags in the response. + Tags *string + + // Number of records to return. + Top *int32 +} + +// WorkspaceAPIClientUpdateOptions contains the optional parameters for the WorkspaceAPIClient.Update method. +type WorkspaceAPIClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIDiagnosticClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.CreateOrUpdate +// method. +type WorkspaceAPIDiagnosticClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceAPIDiagnosticClientDeleteOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.Delete +// method. +type WorkspaceAPIDiagnosticClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIDiagnosticClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.GetEntityTag +// method. +type WorkspaceAPIDiagnosticClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIDiagnosticClientGetOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.Get method. +type WorkspaceAPIDiagnosticClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIDiagnosticClientListByWorkspaceOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.NewListByWorkspacePager +// method. +type WorkspaceAPIDiagnosticClientListByWorkspaceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceAPIDiagnosticClientUpdateOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.Update +// method. +type WorkspaceAPIDiagnosticClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIExportClientGetOptions contains the optional parameters for the WorkspaceAPIExportClient.Get method. +type WorkspaceAPIExportClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIOperationClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIOperationClient.CreateOrUpdate +// method. +type WorkspaceAPIOperationClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceAPIOperationClientDeleteOptions contains the optional parameters for the WorkspaceAPIOperationClient.Delete method. +type WorkspaceAPIOperationClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIOperationClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIOperationClient.GetEntityTag +// method. +type WorkspaceAPIOperationClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIOperationClientGetOptions contains the optional parameters for the WorkspaceAPIOperationClient.Get method. +type WorkspaceAPIOperationClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIOperationClientListByAPIOptions contains the optional parameters for the WorkspaceAPIOperationClient.NewListByAPIPager +// method. +type WorkspaceAPIOperationClientListByAPIOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Include tags in the response. + Tags *string + + // Number of records to return. + Top *int32 +} + +// WorkspaceAPIOperationClientUpdateOptions contains the optional parameters for the WorkspaceAPIOperationClient.Update method. +type WorkspaceAPIOperationClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIOperationPolicyClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIOperationPolicyClient.CreateOrUpdate +// method. +type WorkspaceAPIOperationPolicyClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceAPIOperationPolicyClientDeleteOptions contains the optional parameters for the WorkspaceAPIOperationPolicyClient.Delete +// method. +type WorkspaceAPIOperationPolicyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIOperationPolicyClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIOperationPolicyClient.GetEntityTag +// method. +type WorkspaceAPIOperationPolicyClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIOperationPolicyClientGetOptions contains the optional parameters for the WorkspaceAPIOperationPolicyClient.Get +// method. +type WorkspaceAPIOperationPolicyClientGetOptions struct { + // Policy Export Format. + Format *PolicyExportFormat +} + +// WorkspaceAPIOperationPolicyClientListByOperationOptions contains the optional parameters for the WorkspaceAPIOperationPolicyClient.NewListByOperationPager +// method. +type WorkspaceAPIOperationPolicyClientListByOperationOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIPolicyClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIPolicyClient.CreateOrUpdate +// method. +type WorkspaceAPIPolicyClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceAPIPolicyClientDeleteOptions contains the optional parameters for the WorkspaceAPIPolicyClient.Delete method. +type WorkspaceAPIPolicyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIPolicyClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIPolicyClient.GetEntityTag +// method. +type WorkspaceAPIPolicyClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIPolicyClientGetOptions contains the optional parameters for the WorkspaceAPIPolicyClient.Get method. +type WorkspaceAPIPolicyClientGetOptions struct { + // Policy Export Format. + Format *PolicyExportFormat +} + +// WorkspaceAPIPolicyClientListByAPIOptions contains the optional parameters for the WorkspaceAPIPolicyClient.NewListByAPIPager +// method. +type WorkspaceAPIPolicyClientListByAPIOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIReleaseClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIReleaseClient.CreateOrUpdate +// method. +type WorkspaceAPIReleaseClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceAPIReleaseClientDeleteOptions contains the optional parameters for the WorkspaceAPIReleaseClient.Delete method. +type WorkspaceAPIReleaseClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIReleaseClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIReleaseClient.GetEntityTag +// method. +type WorkspaceAPIReleaseClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIReleaseClientGetOptions contains the optional parameters for the WorkspaceAPIReleaseClient.Get method. +type WorkspaceAPIReleaseClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIReleaseClientListByServiceOptions contains the optional parameters for the WorkspaceAPIReleaseClient.NewListByServicePager +// method. +type WorkspaceAPIReleaseClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceAPIReleaseClientUpdateOptions contains the optional parameters for the WorkspaceAPIReleaseClient.Update method. +type WorkspaceAPIReleaseClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIRevisionClientListByServiceOptions contains the optional parameters for the WorkspaceAPIRevisionClient.NewListByServicePager +// method. +type WorkspaceAPIRevisionClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceAPISchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPISchemaClient.BeginCreateOrUpdate +// method. +type WorkspaceAPISchemaClientBeginCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// WorkspaceAPISchemaClientDeleteOptions contains the optional parameters for the WorkspaceAPISchemaClient.Delete method. +type WorkspaceAPISchemaClientDeleteOptions struct { + // If true removes all references to the schema before deleting it. + Force *bool +} + +// WorkspaceAPISchemaClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPISchemaClient.GetEntityTag +// method. +type WorkspaceAPISchemaClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPISchemaClientGetOptions contains the optional parameters for the WorkspaceAPISchemaClient.Get method. +type WorkspaceAPISchemaClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPISchemaClientListByAPIOptions contains the optional parameters for the WorkspaceAPISchemaClient.NewListByAPIPager +// method. +type WorkspaceAPISchemaClientListByAPIOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceAPIVersionSetClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.CreateOrUpdate +// method. +type WorkspaceAPIVersionSetClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceAPIVersionSetClientDeleteOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.Delete +// method. +type WorkspaceAPIVersionSetClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIVersionSetClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.GetEntityTag +// method. +type WorkspaceAPIVersionSetClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIVersionSetClientGetOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.Get method. +type WorkspaceAPIVersionSetClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceAPIVersionSetClientListByServiceOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.NewListByServicePager +// method. +type WorkspaceAPIVersionSetClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceAPIVersionSetClientUpdateOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.Update +// method. +type WorkspaceAPIVersionSetClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceBackendClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceBackendClient.CreateOrUpdate +// method. +type WorkspaceBackendClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceBackendClientDeleteOptions contains the optional parameters for the WorkspaceBackendClient.Delete method. +type WorkspaceBackendClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceBackendClientGetEntityTagOptions contains the optional parameters for the WorkspaceBackendClient.GetEntityTag +// method. +type WorkspaceBackendClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceBackendClientGetOptions contains the optional parameters for the WorkspaceBackendClient.Get method. +type WorkspaceBackendClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceBackendClientListByWorkspaceOptions contains the optional parameters for the WorkspaceBackendClient.NewListByWorkspacePager +// method. +type WorkspaceBackendClientListByWorkspaceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceBackendClientUpdateOptions contains the optional parameters for the WorkspaceBackendClient.Update method. +type WorkspaceBackendClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceCertificateClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceCertificateClient.CreateOrUpdate +// method. +type WorkspaceCertificateClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceCertificateClientDeleteOptions contains the optional parameters for the WorkspaceCertificateClient.Delete method. +type WorkspaceCertificateClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceCertificateClientGetEntityTagOptions contains the optional parameters for the WorkspaceCertificateClient.GetEntityTag +// method. +type WorkspaceCertificateClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceCertificateClientGetOptions contains the optional parameters for the WorkspaceCertificateClient.Get method. +type WorkspaceCertificateClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceCertificateClientListByWorkspaceOptions contains the optional parameters for the WorkspaceCertificateClient.NewListByWorkspacePager +// method. +type WorkspaceCertificateClientListByWorkspaceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | expirationDate | filter | ge, le, eq, ne, gt, lt | | + Filter *string + + // When set to true, the response contains only certificates entities which failed refresh. + IsKeyVaultRefreshFailed *bool + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceCertificateClientRefreshSecretOptions contains the optional parameters for the WorkspaceCertificateClient.RefreshSecret +// method. +type WorkspaceCertificateClientRefreshSecretOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceClient.CreateOrUpdate method. +type WorkspaceClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceClientDeleteOptions contains the optional parameters for the WorkspaceClient.Delete method. +type WorkspaceClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceClientGetEntityTagOptions contains the optional parameters for the WorkspaceClient.GetEntityTag method. +type WorkspaceClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceClientGetOptions contains the optional parameters for the WorkspaceClient.Get method. +type WorkspaceClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceClientListByServiceOptions contains the optional parameters for the WorkspaceClient.NewListByServicePager method. +type WorkspaceClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceClientUpdateOptions contains the optional parameters for the WorkspaceClient.Update method. +type WorkspaceClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceDiagnosticClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceDiagnosticClient.CreateOrUpdate +// method. +type WorkspaceDiagnosticClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceDiagnosticClientDeleteOptions contains the optional parameters for the WorkspaceDiagnosticClient.Delete method. +type WorkspaceDiagnosticClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceDiagnosticClientGetEntityTagOptions contains the optional parameters for the WorkspaceDiagnosticClient.GetEntityTag +// method. +type WorkspaceDiagnosticClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceDiagnosticClientGetOptions contains the optional parameters for the WorkspaceDiagnosticClient.Get method. +type WorkspaceDiagnosticClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceDiagnosticClientListByWorkspaceOptions contains the optional parameters for the WorkspaceDiagnosticClient.NewListByWorkspacePager +// method. +type WorkspaceDiagnosticClientListByWorkspaceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceDiagnosticClientUpdateOptions contains the optional parameters for the WorkspaceDiagnosticClient.Update method. +type WorkspaceDiagnosticClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGlobalSchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceGlobalSchemaClient.BeginCreateOrUpdate +// method. +type WorkspaceGlobalSchemaClientBeginCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// WorkspaceGlobalSchemaClientDeleteOptions contains the optional parameters for the WorkspaceGlobalSchemaClient.Delete method. +type WorkspaceGlobalSchemaClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGlobalSchemaClientGetEntityTagOptions contains the optional parameters for the WorkspaceGlobalSchemaClient.GetEntityTag +// method. +type WorkspaceGlobalSchemaClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGlobalSchemaClientGetOptions contains the optional parameters for the WorkspaceGlobalSchemaClient.Get method. +type WorkspaceGlobalSchemaClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGlobalSchemaClientListByServiceOptions contains the optional parameters for the WorkspaceGlobalSchemaClient.NewListByServicePager +// method. +type WorkspaceGlobalSchemaClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceGroupClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceGroupClient.CreateOrUpdate +// method. +type WorkspaceGroupClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceGroupClientDeleteOptions contains the optional parameters for the WorkspaceGroupClient.Delete method. +type WorkspaceGroupClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGroupClientGetEntityTagOptions contains the optional parameters for the WorkspaceGroupClient.GetEntityTag method. +type WorkspaceGroupClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGroupClientGetOptions contains the optional parameters for the WorkspaceGroupClient.Get method. +type WorkspaceGroupClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGroupClientListByServiceOptions contains the optional parameters for the WorkspaceGroupClient.NewListByServicePager +// method. +type WorkspaceGroupClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | externalId | filter | eq | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceGroupClientUpdateOptions contains the optional parameters for the WorkspaceGroupClient.Update method. +type WorkspaceGroupClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGroupUserClientCheckEntityExistsOptions contains the optional parameters for the WorkspaceGroupUserClient.CheckEntityExists +// method. +type WorkspaceGroupUserClientCheckEntityExistsOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGroupUserClientCreateOptions contains the optional parameters for the WorkspaceGroupUserClient.Create method. +type WorkspaceGroupUserClientCreateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGroupUserClientDeleteOptions contains the optional parameters for the WorkspaceGroupUserClient.Delete method. +type WorkspaceGroupUserClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceGroupUserClientListOptions contains the optional parameters for the WorkspaceGroupUserClient.NewListPager method. +type WorkspaceGroupUserClientListOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | registrationDate | filter | ge, le, eq, ne, gt, lt | | + // | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceLinkClientGetOptions contains the optional parameters for the WorkspaceLinkClient.Get method. +type WorkspaceLinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceLinksClientListByServiceOptions contains the optional parameters for the WorkspaceLinksClient.NewListByServicePager +// method. +type WorkspaceLinksClientListByServiceOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceLoggerClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceLoggerClient.CreateOrUpdate +// method. +type WorkspaceLoggerClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceLoggerClientDeleteOptions contains the optional parameters for the WorkspaceLoggerClient.Delete method. +type WorkspaceLoggerClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceLoggerClientGetEntityTagOptions contains the optional parameters for the WorkspaceLoggerClient.GetEntityTag method. +type WorkspaceLoggerClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceLoggerClientGetOptions contains the optional parameters for the WorkspaceLoggerClient.Get method. +type WorkspaceLoggerClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceLoggerClientListByWorkspaceOptions contains the optional parameters for the WorkspaceLoggerClient.NewListByWorkspacePager +// method. +type WorkspaceLoggerClientListByWorkspaceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | loggerType | filter | eq | | + // | resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceLoggerClientUpdateOptions contains the optional parameters for the WorkspaceLoggerClient.Update method. +type WorkspaceLoggerClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNamedValueClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceNamedValueClient.BeginCreateOrUpdate +// method. +type WorkspaceNamedValueClientBeginCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// WorkspaceNamedValueClientBeginRefreshSecretOptions contains the optional parameters for the WorkspaceNamedValueClient.BeginRefreshSecret +// method. +type WorkspaceNamedValueClientBeginRefreshSecretOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// WorkspaceNamedValueClientBeginUpdateOptions contains the optional parameters for the WorkspaceNamedValueClient.BeginUpdate +// method. +type WorkspaceNamedValueClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// WorkspaceNamedValueClientDeleteOptions contains the optional parameters for the WorkspaceNamedValueClient.Delete method. +type WorkspaceNamedValueClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNamedValueClientGetEntityTagOptions contains the optional parameters for the WorkspaceNamedValueClient.GetEntityTag +// method. +type WorkspaceNamedValueClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNamedValueClientGetOptions contains the optional parameters for the WorkspaceNamedValueClient.Get method. +type WorkspaceNamedValueClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNamedValueClientListByServiceOptions contains the optional parameters for the WorkspaceNamedValueClient.NewListByServicePager +// method. +type WorkspaceNamedValueClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Query parameter to fetch named value entities based on refresh status. + IsKeyVaultRefreshFailed *KeyVaultRefreshState + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceNamedValueClientListValueOptions contains the optional parameters for the WorkspaceNamedValueClient.ListValue +// method. +type WorkspaceNamedValueClientListValueOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNotificationClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceNotificationClient.CreateOrUpdate +// method. +type WorkspaceNotificationClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceNotificationClientGetOptions contains the optional parameters for the WorkspaceNotificationClient.Get method. +type WorkspaceNotificationClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNotificationClientListByServiceOptions contains the optional parameters for the WorkspaceNotificationClient.NewListByServicePager +// method. +type WorkspaceNotificationClientListByServiceOptions struct { + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceNotificationRecipientEmailClientCheckEntityExistsOptions contains the optional parameters for the WorkspaceNotificationRecipientEmailClient.CheckEntityExists +// method. +type WorkspaceNotificationRecipientEmailClientCheckEntityExistsOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNotificationRecipientEmailClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceNotificationRecipientEmailClient.CreateOrUpdate +// method. +type WorkspaceNotificationRecipientEmailClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNotificationRecipientEmailClientDeleteOptions contains the optional parameters for the WorkspaceNotificationRecipientEmailClient.Delete +// method. +type WorkspaceNotificationRecipientEmailClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNotificationRecipientEmailClientListByNotificationOptions contains the optional parameters for the WorkspaceNotificationRecipientEmailClient.ListByNotification +// method. +type WorkspaceNotificationRecipientEmailClientListByNotificationOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNotificationRecipientUserClientCheckEntityExistsOptions contains the optional parameters for the WorkspaceNotificationRecipientUserClient.CheckEntityExists +// method. +type WorkspaceNotificationRecipientUserClientCheckEntityExistsOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNotificationRecipientUserClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceNotificationRecipientUserClient.CreateOrUpdate +// method. +type WorkspaceNotificationRecipientUserClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNotificationRecipientUserClientDeleteOptions contains the optional parameters for the WorkspaceNotificationRecipientUserClient.Delete +// method. +type WorkspaceNotificationRecipientUserClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceNotificationRecipientUserClientListByNotificationOptions contains the optional parameters for the WorkspaceNotificationRecipientUserClient.ListByNotification +// method. +type WorkspaceNotificationRecipientUserClientListByNotificationOptions struct { + // placeholder for future optional parameters +} + +// WorkspacePolicyClientCreateOrUpdateOptions contains the optional parameters for the WorkspacePolicyClient.CreateOrUpdate +// method. +type WorkspacePolicyClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspacePolicyClientDeleteOptions contains the optional parameters for the WorkspacePolicyClient.Delete method. +type WorkspacePolicyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspacePolicyClientGetEntityTagOptions contains the optional parameters for the WorkspacePolicyClient.GetEntityTag method. +type WorkspacePolicyClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspacePolicyClientGetOptions contains the optional parameters for the WorkspacePolicyClient.Get method. +type WorkspacePolicyClientGetOptions struct { + // Policy Export Format. + Format *PolicyExportFormat +} + +// WorkspacePolicyClientListByAPIOptions contains the optional parameters for the WorkspacePolicyClient.NewListByAPIPager +// method. +type WorkspacePolicyClientListByAPIOptions struct { + // placeholder for future optional parameters +} + +// WorkspacePolicyFragmentClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacePolicyFragmentClient.BeginCreateOrUpdate +// method. +type WorkspacePolicyFragmentClientBeginCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// WorkspacePolicyFragmentClientDeleteOptions contains the optional parameters for the WorkspacePolicyFragmentClient.Delete +// method. +type WorkspacePolicyFragmentClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspacePolicyFragmentClientGetEntityTagOptions contains the optional parameters for the WorkspacePolicyFragmentClient.GetEntityTag +// method. +type WorkspacePolicyFragmentClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspacePolicyFragmentClientGetOptions contains the optional parameters for the WorkspacePolicyFragmentClient.Get method. +type WorkspacePolicyFragmentClientGetOptions struct { + // Policy fragment content format. + Format *PolicyFragmentContentFormat +} + +// WorkspacePolicyFragmentClientListByServiceOptions contains the optional parameters for the WorkspacePolicyFragmentClient.NewListByServicePager +// method. +type WorkspacePolicyFragmentClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // OData order by query option. + Orderby *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspacePolicyFragmentClientListReferencesOptions contains the optional parameters for the WorkspacePolicyFragmentClient.ListReferences +// method. +type WorkspacePolicyFragmentClientListReferencesOptions struct { + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceProductAPILinkClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceProductAPILinkClient.CreateOrUpdate +// method. +type WorkspaceProductAPILinkClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductAPILinkClientDeleteOptions contains the optional parameters for the WorkspaceProductAPILinkClient.Delete +// method. +type WorkspaceProductAPILinkClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductAPILinkClientGetOptions contains the optional parameters for the WorkspaceProductAPILinkClient.Get method. +type WorkspaceProductAPILinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductAPILinkClientListByProductOptions contains the optional parameters for the WorkspaceProductAPILinkClient.NewListByProductPager +// method. +type WorkspaceProductAPILinkClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceProductClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceProductClient.CreateOrUpdate +// method. +type WorkspaceProductClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceProductClientDeleteOptions contains the optional parameters for the WorkspaceProductClient.Delete method. +type WorkspaceProductClientDeleteOptions struct { + // Delete existing subscriptions associated with the product or not. + DeleteSubscriptions *bool +} + +// WorkspaceProductClientGetEntityTagOptions contains the optional parameters for the WorkspaceProductClient.GetEntityTag +// method. +type WorkspaceProductClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductClientGetOptions contains the optional parameters for the WorkspaceProductClient.Get method. +type WorkspaceProductClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductClientListByServiceOptions contains the optional parameters for the WorkspaceProductClient.NewListByServicePager +// method. +type WorkspaceProductClientListByServiceOptions struct { + // When set to true, the response contains an array of groups that have visibility to the product. The default is false. + ExpandGroups *bool + + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | state | filter | eq | | + // | groups | expand | | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Products which are part of a specific tag. + Tags *string + + // Number of records to return. + Top *int32 +} + +// WorkspaceProductClientUpdateOptions contains the optional parameters for the WorkspaceProductClient.Update method. +type WorkspaceProductClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductGroupLinkClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceProductGroupLinkClient.CreateOrUpdate +// method. +type WorkspaceProductGroupLinkClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductGroupLinkClientDeleteOptions contains the optional parameters for the WorkspaceProductGroupLinkClient.Delete +// method. +type WorkspaceProductGroupLinkClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductGroupLinkClientGetOptions contains the optional parameters for the WorkspaceProductGroupLinkClient.Get +// method. +type WorkspaceProductGroupLinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductGroupLinkClientListByProductOptions contains the optional parameters for the WorkspaceProductGroupLinkClient.NewListByProductPager +// method. +type WorkspaceProductGroupLinkClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | groupId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceProductPolicyClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceProductPolicyClient.CreateOrUpdate +// method. +type WorkspaceProductPolicyClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceProductPolicyClientDeleteOptions contains the optional parameters for the WorkspaceProductPolicyClient.Delete +// method. +type WorkspaceProductPolicyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductPolicyClientGetEntityTagOptions contains the optional parameters for the WorkspaceProductPolicyClient.GetEntityTag +// method. +type WorkspaceProductPolicyClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceProductPolicyClientGetOptions contains the optional parameters for the WorkspaceProductPolicyClient.Get method. +type WorkspaceProductPolicyClientGetOptions struct { + // Policy Export Format. + Format *PolicyExportFormat +} + +// WorkspaceProductPolicyClientListByProductOptions contains the optional parameters for the WorkspaceProductPolicyClient.ListByProduct +// method. +type WorkspaceProductPolicyClientListByProductOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceSubscriptionClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceSubscriptionClient.CreateOrUpdate +// method. +type WorkspaceSubscriptionClientCreateOrUpdateOptions struct { + // Determines the type of application which send the create user request. Default is legacy publisher portal. + AppType *AppType + + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string + + // Notify change in Subscription State. + // * If false, do not send any email notification for change of state of subscription + // * If true, send email notification of change of state of subscription + Notify *bool +} + +// WorkspaceSubscriptionClientDeleteOptions contains the optional parameters for the WorkspaceSubscriptionClient.Delete method. +type WorkspaceSubscriptionClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceSubscriptionClientGetEntityTagOptions contains the optional parameters for the WorkspaceSubscriptionClient.GetEntityTag +// method. +type WorkspaceSubscriptionClientGetEntityTagOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceSubscriptionClientGetOptions contains the optional parameters for the WorkspaceSubscriptionClient.Get method. +type WorkspaceSubscriptionClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceSubscriptionClientListOptions contains the optional parameters for the WorkspaceSubscriptionClient.NewListPager +// method. +type WorkspaceSubscriptionClientListOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | state | filter | eq | | + // | user | expand | | | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceSubscriptionClientListSecretsOptions contains the optional parameters for the WorkspaceSubscriptionClient.ListSecrets +// method. +type WorkspaceSubscriptionClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceSubscriptionClientRegeneratePrimaryKeyOptions contains the optional parameters for the WorkspaceSubscriptionClient.RegeneratePrimaryKey +// method. +type WorkspaceSubscriptionClientRegeneratePrimaryKeyOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceSubscriptionClientRegenerateSecondaryKeyOptions contains the optional parameters for the WorkspaceSubscriptionClient.RegenerateSecondaryKey +// method. +type WorkspaceSubscriptionClientRegenerateSecondaryKeyOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceSubscriptionClientUpdateOptions contains the optional parameters for the WorkspaceSubscriptionClient.Update method. +type WorkspaceSubscriptionClientUpdateOptions struct { + // Determines the type of application which send the create user request. Default is legacy publisher portal. + AppType *AppType + + // Notify change in Subscription State. + // * If false, do not send any email notification for change of state of subscription + // * If true, send email notification of change of state of subscription + Notify *bool +} + +// WorkspaceTagAPILinkClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceTagAPILinkClient.CreateOrUpdate +// method. +type WorkspaceTagAPILinkClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagAPILinkClientDeleteOptions contains the optional parameters for the WorkspaceTagAPILinkClient.Delete method. +type WorkspaceTagAPILinkClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagAPILinkClientGetOptions contains the optional parameters for the WorkspaceTagAPILinkClient.Get method. +type WorkspaceTagAPILinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagAPILinkClientListByProductOptions contains the optional parameters for the WorkspaceTagAPILinkClient.NewListByProductPager +// method. +type WorkspaceTagAPILinkClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceTagClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceTagClient.CreateOrUpdate method. +type WorkspaceTagClientCreateOrUpdateOptions struct { + // ETag of the Entity. Not required when creating an entity, but required when updating an entity. + IfMatch *string +} + +// WorkspaceTagClientDeleteOptions contains the optional parameters for the WorkspaceTagClient.Delete method. +type WorkspaceTagClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagClientGetEntityStateOptions contains the optional parameters for the WorkspaceTagClient.GetEntityState method. +type WorkspaceTagClientGetEntityStateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagClientGetOptions contains the optional parameters for the WorkspaceTagClient.Get method. +type WorkspaceTagClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagClientListByServiceOptions contains the optional parameters for the WorkspaceTagClient.NewListByServicePager +// method. +type WorkspaceTagClientListByServiceOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + // | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Scope like 'apis', 'products' or 'apis/{apiId} + Scope *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceTagClientUpdateOptions contains the optional parameters for the WorkspaceTagClient.Update method. +type WorkspaceTagClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagOperationLinkClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceTagOperationLinkClient.CreateOrUpdate +// method. +type WorkspaceTagOperationLinkClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagOperationLinkClientDeleteOptions contains the optional parameters for the WorkspaceTagOperationLinkClient.Delete +// method. +type WorkspaceTagOperationLinkClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagOperationLinkClientGetOptions contains the optional parameters for the WorkspaceTagOperationLinkClient.Get +// method. +type WorkspaceTagOperationLinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagOperationLinkClientListByProductOptions contains the optional parameters for the WorkspaceTagOperationLinkClient.NewListByProductPager +// method. +type WorkspaceTagOperationLinkClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | operationId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} + +// WorkspaceTagProductLinkClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceTagProductLinkClient.CreateOrUpdate +// method. +type WorkspaceTagProductLinkClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagProductLinkClientDeleteOptions contains the optional parameters for the WorkspaceTagProductLinkClient.Delete +// method. +type WorkspaceTagProductLinkClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagProductLinkClientGetOptions contains the optional parameters for the WorkspaceTagProductLinkClient.Get method. +type WorkspaceTagProductLinkClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspaceTagProductLinkClientListByProductOptions contains the optional parameters for the WorkspaceTagProductLinkClient.NewListByProductPager +// method. +type WorkspaceTagProductLinkClientListByProductOptions struct { + // | Field | Usage | Supported operators | Supported functions | + // |-------------|-------------|-------------|-------------| + // | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | + Filter *string + + // Number of records to skip. + Skip *int32 + + // Number of records to return. + Top *int32 +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/outboundnetworkdependenciesendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/outboundnetworkdependenciesendpoints_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/outboundnetworkdependenciesendpoints_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/outboundnetworkdependenciesendpoints_client.go index 1d0da7aa..fbd8ce87 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/outboundnetworkdependenciesendpoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/outboundnetworkdependenciesendpoints_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type OutboundNetworkDependenciesEndpointsClient struct { } // NewOutboundNetworkDependenciesEndpointsClient creates a new instance of OutboundNetworkDependenciesEndpointsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOutboundNetworkDependenciesEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OutboundNetworkDependenciesEndpointsClient, error) { - cl, err := arm.NewClient(moduleName+".OutboundNetworkDependenciesEndpointsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,28 +43,35 @@ func NewOutboundNetworkDependenciesEndpointsClient(subscriptionID string, creden // ListByService - Gets the network endpoints of all outbound dependencies of a ApiManagement service. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - OutboundNetworkDependenciesEndpointsClientListByServiceOptions contains the optional parameters for the OutboundNetworkDependenciesEndpointsClient.ListByService // method. func (client *OutboundNetworkDependenciesEndpointsClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *OutboundNetworkDependenciesEndpointsClientListByServiceOptions) (OutboundNetworkDependenciesEndpointsClientListByServiceResponse, error) { + var err error + const operationName = "OutboundNetworkDependenciesEndpointsClient.ListByService" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return OutboundNetworkDependenciesEndpointsClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OutboundNetworkDependenciesEndpointsClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OutboundNetworkDependenciesEndpointsClientListByServiceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OutboundNetworkDependenciesEndpointsClientListByServiceResponse{}, err } - return client.listByServiceHandleResponse(resp) + resp, err := client.listByServiceHandleResponse(httpResp) + return resp, err } // listByServiceCreateRequest creates the ListByService request. -func (client *OutboundNetworkDependenciesEndpointsClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *OutboundNetworkDependenciesEndpointsClientListByServiceOptions) (*policy.Request, error) { +func (client *OutboundNetworkDependenciesEndpointsClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *OutboundNetworkDependenciesEndpointsClientListByServiceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -88,7 +90,7 @@ func (client *OutboundNetworkDependenciesEndpointsClient) listByServiceCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policy_client.go new file mode 100644 index 00000000..676c2371 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policy_client.go @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PolicyClient contains the methods for the Policy group. +// Don't use this type directly, use NewPolicyClient() instead. +type PolicyClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPolicyClient creates a new instance of PolicyClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicyClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PolicyClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates the global policy configuration of the Api Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - policyID - The identifier of the Policy. +// - parameters - The policy contents to apply. +// - options - PolicyClientCreateOrUpdateOptions contains the optional parameters for the PolicyClient.CreateOrUpdate method. +func (client *PolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, parameters PolicyContract, options *PolicyClientCreateOrUpdateOptions) (PolicyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "PolicyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, policyID, parameters, options) + if err != nil { + return PolicyClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return PolicyClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PolicyClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, parameters PolicyContract, options *PolicyClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *PolicyClient) createOrUpdateHandleResponse(resp *http.Response) (PolicyClientCreateOrUpdateResponse, error) { + result := PolicyClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return PolicyClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the global policy configuration of the Api Management Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - policyID - The identifier of the Policy. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - PolicyClientDeleteOptions contains the optional parameters for the PolicyClient.Delete method. +func (client *PolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, ifMatch string, options *PolicyClientDeleteOptions) (PolicyClientDeleteResponse, error) { + var err error + const operationName = "PolicyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, policyID, ifMatch, options) + if err != nil { + return PolicyClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PolicyClientDeleteResponse{}, err + } + return PolicyClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, ifMatch string, _ *PolicyClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Get the Global policy definition of the Api Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - policyID - The identifier of the Policy. +// - options - PolicyClientGetOptions contains the optional parameters for the PolicyClient.Get method. +func (client *PolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetOptions) (PolicyClientGetResponse, error) { + var err error + const operationName = "PolicyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, policyID, options) + if err != nil { + return PolicyClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PolicyClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PolicyClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Format != nil { + reqQP.Set("format", string(*options.Format)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PolicyClient) getHandleResponse(resp *http.Response) (PolicyClientGetResponse, error) { + result := PolicyClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return PolicyClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the Global policy definition in the Api Management service. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - policyID - The identifier of the Policy. +// - options - PolicyClientGetEntityTagOptions contains the optional parameters for the PolicyClient.GetEntityTag method. +func (client *PolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, options *PolicyClientGetEntityTagOptions) (PolicyClientGetEntityTagResponse, error) { + var err error + const operationName = "PolicyClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, policyID, options) + if err != nil { + return PolicyClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PolicyClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *PolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyID PolicyIDName, _ *PolicyClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *PolicyClient) getEntityTagHandleResponse(resp *http.Response) (PolicyClientGetEntityTagResponse, error) { + result := PolicyClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists all the Global Policy definitions of the Api Management service. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - PolicyClientListByServiceOptions contains the optional parameters for the PolicyClient.NewListByServicePager +// method. +func (client *PolicyClient) NewListByServicePager(resourceGroupName string, serviceName string, options *PolicyClientListByServiceOptions) *runtime.Pager[PolicyClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[PolicyClientListByServiceResponse]{ + More: func(page PolicyClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PolicyClientListByServiceResponse) (PolicyClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PolicyClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return PolicyClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *PolicyClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *PolicyClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *PolicyClient) listByServiceHandleResponse(resp *http.Response) (PolicyClientListByServiceResponse, error) { + result := PolicyClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyCollection); err != nil { + return PolicyClientListByServiceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/policydescription_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policydescription_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/policydescription_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policydescription_client.go index e65a69bd..335ccd00 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/policydescription_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policydescription_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type PolicyDescriptionClient struct { } // NewPolicyDescriptionClient creates a new instance of PolicyDescriptionClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPolicyDescriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicyDescriptionClient, error) { - cl, err := arm.NewClient(moduleName+".PolicyDescriptionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,24 +43,31 @@ func NewPolicyDescriptionClient(subscriptionID string, credential azcore.TokenCr // ListByService - Lists all policy descriptions. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - PolicyDescriptionClientListByServiceOptions contains the optional parameters for the PolicyDescriptionClient.ListByService // method. func (client *PolicyDescriptionClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *PolicyDescriptionClientListByServiceOptions) (PolicyDescriptionClientListByServiceResponse, error) { + var err error + const operationName = "PolicyDescriptionClient.ListByService" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return PolicyDescriptionClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PolicyDescriptionClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PolicyDescriptionClientListByServiceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PolicyDescriptionClientListByServiceResponse{}, err } - return client.listByServiceHandleResponse(resp) + resp, err := client.listByServiceHandleResponse(httpResp) + return resp, err } // listByServiceCreateRequest creates the ListByService request. @@ -88,10 +90,10 @@ func (client *PolicyDescriptionClient) listByServiceCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") if options != nil && options.Scope != nil { reqQP.Set("scope", string(*options.Scope)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policyfragment_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policyfragment_client.go new file mode 100644 index 00000000..07840878 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policyfragment_client.go @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// PolicyFragmentClient contains the methods for the PolicyFragment group. +// Don't use this type directly, use NewPolicyFragmentClient() instead. +type PolicyFragmentClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPolicyFragmentClient creates a new instance of PolicyFragmentClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPolicyFragmentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicyFragmentClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PolicyFragmentClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a policy fragment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - id - A resource identifier. +// - parameters - The policy fragment contents to apply. +// - options - PolicyFragmentClientBeginCreateOrUpdateOptions contains the optional parameters for the PolicyFragmentClient.BeginCreateOrUpdate +// method. +func (client *PolicyFragmentClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, id string, parameters PolicyFragmentContract, options *PolicyFragmentClientBeginCreateOrUpdateOptions) (*runtime.Poller[PolicyFragmentClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, id, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PolicyFragmentClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PolicyFragmentClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a policy fragment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PolicyFragmentClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, id string, parameters PolicyFragmentContract, options *PolicyFragmentClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PolicyFragmentClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, id, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PolicyFragmentClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, id string, parameters PolicyFragmentContract, options *PolicyFragmentClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Delete - Deletes a policy fragment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - id - A resource identifier. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - PolicyFragmentClientDeleteOptions contains the optional parameters for the PolicyFragmentClient.Delete method. +func (client *PolicyFragmentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, id string, ifMatch string, options *PolicyFragmentClientDeleteOptions) (PolicyFragmentClientDeleteResponse, error) { + var err error + const operationName = "PolicyFragmentClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, id, ifMatch, options) + if err != nil { + return PolicyFragmentClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyFragmentClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PolicyFragmentClientDeleteResponse{}, err + } + return PolicyFragmentClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PolicyFragmentClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, id string, ifMatch string, _ *PolicyFragmentClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets a policy fragment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - id - A resource identifier. +// - options - PolicyFragmentClientGetOptions contains the optional parameters for the PolicyFragmentClient.Get method. +func (client *PolicyFragmentClient) Get(ctx context.Context, resourceGroupName string, serviceName string, id string, options *PolicyFragmentClientGetOptions) (PolicyFragmentClientGetResponse, error) { + var err error + const operationName = "PolicyFragmentClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, id, options) + if err != nil { + return PolicyFragmentClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyFragmentClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PolicyFragmentClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PolicyFragmentClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, id string, options *PolicyFragmentClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Format != nil { + reqQP.Set("format", string(*options.Format)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PolicyFragmentClient) getHandleResponse(resp *http.Response) (PolicyFragmentClientGetResponse, error) { + result := PolicyFragmentClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyFragmentContract); err != nil { + return PolicyFragmentClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of a policy fragment. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - id - A resource identifier. +// - options - PolicyFragmentClientGetEntityTagOptions contains the optional parameters for the PolicyFragmentClient.GetEntityTag +// method. +func (client *PolicyFragmentClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, id string, options *PolicyFragmentClientGetEntityTagOptions) (PolicyFragmentClientGetEntityTagResponse, error) { + var err error + const operationName = "PolicyFragmentClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, id, options) + if err != nil { + return PolicyFragmentClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyFragmentClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PolicyFragmentClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *PolicyFragmentClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, id string, _ *PolicyFragmentClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *PolicyFragmentClient) getEntityTagHandleResponse(resp *http.Response) (PolicyFragmentClientGetEntityTagResponse, error) { + result := PolicyFragmentClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Gets all policy fragments. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - PolicyFragmentClientListByServiceOptions contains the optional parameters for the PolicyFragmentClient.NewListByServicePager +// method. +func (client *PolicyFragmentClient) NewListByServicePager(resourceGroupName string, serviceName string, options *PolicyFragmentClientListByServiceOptions) *runtime.Pager[PolicyFragmentClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[PolicyFragmentClientListByServiceResponse]{ + More: func(page PolicyFragmentClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PolicyFragmentClientListByServiceResponse) (PolicyFragmentClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PolicyFragmentClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return PolicyFragmentClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *PolicyFragmentClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PolicyFragmentClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Orderby != nil { + reqQP.Set("$orderby", *options.Orderby) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *PolicyFragmentClient) listByServiceHandleResponse(resp *http.Response) (PolicyFragmentClientListByServiceResponse, error) { + result := PolicyFragmentClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyFragmentCollection); err != nil { + return PolicyFragmentClientListByServiceResponse{}, err + } + return result, nil +} + +// ListReferences - Lists policy resources that reference the policy fragment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - id - A resource identifier. +// - options - PolicyFragmentClientListReferencesOptions contains the optional parameters for the PolicyFragmentClient.ListReferences +// method. +func (client *PolicyFragmentClient) ListReferences(ctx context.Context, resourceGroupName string, serviceName string, id string, options *PolicyFragmentClientListReferencesOptions) (PolicyFragmentClientListReferencesResponse, error) { + var err error + const operationName = "PolicyFragmentClient.ListReferences" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listReferencesCreateRequest(ctx, resourceGroupName, serviceName, id, options) + if err != nil { + return PolicyFragmentClientListReferencesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyFragmentClientListReferencesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PolicyFragmentClientListReferencesResponse{}, err + } + resp, err := client.listReferencesHandleResponse(httpResp) + return resp, err +} + +// listReferencesCreateRequest creates the ListReferences request. +func (client *PolicyFragmentClient) listReferencesCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, id string, options *PolicyFragmentClientListReferencesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listReferencesHandleResponse handles the ListReferences response. +func (client *PolicyFragmentClient) listReferencesHandleResponse(resp *http.Response) (PolicyFragmentClientListReferencesResponse, error) { + result := PolicyFragmentClientListReferencesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceCollection); err != nil { + return PolicyFragmentClientListReferencesResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policyrestriction_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policyrestriction_client.go new file mode 100644 index 00000000..47455724 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policyrestriction_client.go @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PolicyRestrictionClient contains the methods for the PolicyRestriction group. +// Don't use this type directly, use NewPolicyRestrictionClient() instead. +type PolicyRestrictionClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPolicyRestrictionClient creates a new instance of PolicyRestrictionClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPolicyRestrictionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicyRestrictionClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PolicyRestrictionClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates the policy restriction configuration of the Api Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - policyRestrictionID - Policy restrictions after an entity level +// - parameters - The policy restriction to apply. +// - options - PolicyRestrictionClientCreateOrUpdateOptions contains the optional parameters for the PolicyRestrictionClient.CreateOrUpdate +// method. +func (client *PolicyRestrictionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, policyRestrictionID string, parameters PolicyRestrictionContract, options *PolicyRestrictionClientCreateOrUpdateOptions) (PolicyRestrictionClientCreateOrUpdateResponse, error) { + var err error + const operationName = "PolicyRestrictionClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, policyRestrictionID, parameters, options) + if err != nil { + return PolicyRestrictionClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyRestrictionClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return PolicyRestrictionClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PolicyRestrictionClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyRestrictionID string, parameters PolicyRestrictionContract, options *PolicyRestrictionClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if policyRestrictionID == "" { + return nil, errors.New("parameter policyRestrictionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyRestrictionId}", url.PathEscape(policyRestrictionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *PolicyRestrictionClient) createOrUpdateHandleResponse(resp *http.Response) (PolicyRestrictionClientCreateOrUpdateResponse, error) { + result := PolicyRestrictionClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyRestrictionContract); err != nil { + return PolicyRestrictionClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the policy restriction configuration of the Api Management Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - policyRestrictionID - Policy restrictions after an entity level +// - options - PolicyRestrictionClientDeleteOptions contains the optional parameters for the PolicyRestrictionClient.Delete +// method. +func (client *PolicyRestrictionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, policyRestrictionID string, options *PolicyRestrictionClientDeleteOptions) (PolicyRestrictionClientDeleteResponse, error) { + var err error + const operationName = "PolicyRestrictionClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, policyRestrictionID, options) + if err != nil { + return PolicyRestrictionClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyRestrictionClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PolicyRestrictionClientDeleteResponse{}, err + } + return PolicyRestrictionClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PolicyRestrictionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyRestrictionID string, options *PolicyRestrictionClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if policyRestrictionID == "" { + return nil, errors.New("parameter policyRestrictionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyRestrictionId}", url.PathEscape(policyRestrictionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + return req, nil +} + +// Get - Get the policy restriction of the Api Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - policyRestrictionID - Policy restrictions after an entity level +// - options - PolicyRestrictionClientGetOptions contains the optional parameters for the PolicyRestrictionClient.Get method. +func (client *PolicyRestrictionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, policyRestrictionID string, options *PolicyRestrictionClientGetOptions) (PolicyRestrictionClientGetResponse, error) { + var err error + const operationName = "PolicyRestrictionClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, policyRestrictionID, options) + if err != nil { + return PolicyRestrictionClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyRestrictionClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PolicyRestrictionClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PolicyRestrictionClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyRestrictionID string, _ *PolicyRestrictionClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if policyRestrictionID == "" { + return nil, errors.New("parameter policyRestrictionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyRestrictionId}", url.PathEscape(policyRestrictionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PolicyRestrictionClient) getHandleResponse(resp *http.Response) (PolicyRestrictionClientGetResponse, error) { + result := PolicyRestrictionClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyRestrictionContract); err != nil { + return PolicyRestrictionClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the policy restriction in the Api Management service. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - policyRestrictionID - Policy restrictions after an entity level +// - options - PolicyRestrictionClientGetEntityTagOptions contains the optional parameters for the PolicyRestrictionClient.GetEntityTag +// method. +func (client *PolicyRestrictionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, policyRestrictionID string, options *PolicyRestrictionClientGetEntityTagOptions) (PolicyRestrictionClientGetEntityTagResponse, error) { + var err error + const operationName = "PolicyRestrictionClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, policyRestrictionID, options) + if err != nil { + return PolicyRestrictionClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyRestrictionClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PolicyRestrictionClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *PolicyRestrictionClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyRestrictionID string, _ *PolicyRestrictionClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if policyRestrictionID == "" { + return nil, errors.New("parameter policyRestrictionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyRestrictionId}", url.PathEscape(policyRestrictionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *PolicyRestrictionClient) getEntityTagHandleResponse(resp *http.Response) (PolicyRestrictionClientGetEntityTagResponse, error) { + result := PolicyRestrictionClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Gets all policy restrictions of API Management services. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - PolicyRestrictionClientListByServiceOptions contains the optional parameters for the PolicyRestrictionClient.NewListByServicePager +// method. +func (client *PolicyRestrictionClient) NewListByServicePager(resourceGroupName string, serviceName string, options *PolicyRestrictionClientListByServiceOptions) *runtime.Pager[PolicyRestrictionClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[PolicyRestrictionClientListByServiceResponse]{ + More: func(page PolicyRestrictionClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PolicyRestrictionClientListByServiceResponse) (PolicyRestrictionClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PolicyRestrictionClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return PolicyRestrictionClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *PolicyRestrictionClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *PolicyRestrictionClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *PolicyRestrictionClient) listByServiceHandleResponse(resp *http.Response) (PolicyRestrictionClientListByServiceResponse, error) { + result := PolicyRestrictionClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyRestrictionCollection); err != nil { + return PolicyRestrictionClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Updates the policy restriction configuration of the Api Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - policyRestrictionID - Policy restrictions after an entity level +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - The policy restriction to apply. +// - options - PolicyRestrictionClientUpdateOptions contains the optional parameters for the PolicyRestrictionClient.Update +// method. +func (client *PolicyRestrictionClient) Update(ctx context.Context, resourceGroupName string, serviceName string, policyRestrictionID string, ifMatch string, parameters PolicyRestrictionUpdateContract, options *PolicyRestrictionClientUpdateOptions) (PolicyRestrictionClientUpdateResponse, error) { + var err error + const operationName = "PolicyRestrictionClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, policyRestrictionID, ifMatch, parameters, options) + if err != nil { + return PolicyRestrictionClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PolicyRestrictionClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PolicyRestrictionClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *PolicyRestrictionClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, policyRestrictionID string, ifMatch string, parameters PolicyRestrictionUpdateContract, _ *PolicyRestrictionClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if policyRestrictionID == "" { + return nil, errors.New("parameter policyRestrictionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyRestrictionId}", url.PathEscape(policyRestrictionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *PolicyRestrictionClient) updateHandleResponse(resp *http.Response) (PolicyRestrictionClientUpdateResponse, error) { + result := PolicyRestrictionClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyRestrictionContract); err != nil { + return PolicyRestrictionClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policyrestrictionvalidations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policyrestrictionvalidations_client.go new file mode 100644 index 00000000..761480ec --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/policyrestrictionvalidations_client.go @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PolicyRestrictionValidationsClient contains the methods for the PolicyRestrictionValidations group. +// Don't use this type directly, use NewPolicyRestrictionValidationsClient() instead. +type PolicyRestrictionValidationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPolicyRestrictionValidationsClient creates a new instance of PolicyRestrictionValidationsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPolicyRestrictionValidationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicyRestrictionValidationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PolicyRestrictionValidationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginByService - Validate all policies of API Management services. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - PolicyRestrictionValidationsClientBeginByServiceOptions contains the optional parameters for the PolicyRestrictionValidationsClient.BeginByService +// method. +func (client *PolicyRestrictionValidationsClient) BeginByService(ctx context.Context, resourceGroupName string, serviceName string, options *PolicyRestrictionValidationsClientBeginByServiceOptions) (*runtime.Poller[PolicyRestrictionValidationsClientByServiceResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.byService(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PolicyRestrictionValidationsClientByServiceResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PolicyRestrictionValidationsClientByServiceResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ByService - Validate all policies of API Management services. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PolicyRestrictionValidationsClient) byService(ctx context.Context, resourceGroupName string, serviceName string, options *PolicyRestrictionValidationsClientBeginByServiceOptions) (*http.Response, error) { + var err error + const operationName = "PolicyRestrictionValidationsClient.BeginByService" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.byServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// byServiceCreateRequest creates the ByService request. +func (client *PolicyRestrictionValidationsClient) byServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *PolicyRestrictionValidationsClientBeginByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/validatePolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/portalconfig_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/portalconfig_client.go new file mode 100644 index 00000000..0c273bf6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/portalconfig_client.go @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PortalConfigClient contains the methods for the PortalConfig group. +// Don't use this type directly, use NewPortalConfigClient() instead. +type PortalConfigClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPortalConfigClient creates a new instance of PortalConfigClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPortalConfigClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PortalConfigClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PortalConfigClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or update the developer portal configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - portalConfigID - Portal configuration identifier. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update the developer portal configuration. +// - options - PortalConfigClientCreateOrUpdateOptions contains the optional parameters for the PortalConfigClient.CreateOrUpdate +// method. +func (client *PortalConfigClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, ifMatch string, parameters PortalConfigContract, options *PortalConfigClientCreateOrUpdateOptions) (PortalConfigClientCreateOrUpdateResponse, error) { + var err error + const operationName = "PortalConfigClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, portalConfigID, ifMatch, parameters, options) + if err != nil { + return PortalConfigClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PortalConfigClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PortalConfigClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PortalConfigClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, ifMatch string, parameters PortalConfigContract, _ *PortalConfigClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if portalConfigID == "" { + return nil, errors.New("parameter portalConfigID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{portalConfigId}", url.PathEscape(portalConfigID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *PortalConfigClient) createOrUpdateHandleResponse(resp *http.Response) (PortalConfigClientCreateOrUpdateResponse, error) { + result := PortalConfigClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PortalConfigContract); err != nil { + return PortalConfigClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Get the developer portal configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - portalConfigID - Portal configuration identifier. +// - options - PortalConfigClientGetOptions contains the optional parameters for the PortalConfigClient.Get method. +func (client *PortalConfigClient) Get(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, options *PortalConfigClientGetOptions) (PortalConfigClientGetResponse, error) { + var err error + const operationName = "PortalConfigClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, portalConfigID, options) + if err != nil { + return PortalConfigClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PortalConfigClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PortalConfigClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PortalConfigClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, _ *PortalConfigClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if portalConfigID == "" { + return nil, errors.New("parameter portalConfigID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{portalConfigId}", url.PathEscape(portalConfigID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PortalConfigClient) getHandleResponse(resp *http.Response) (PortalConfigClientGetResponse, error) { + result := PortalConfigClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PortalConfigContract); err != nil { + return PortalConfigClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the developer portal configuration. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - portalConfigID - Portal configuration identifier. +// - options - PortalConfigClientGetEntityTagOptions contains the optional parameters for the PortalConfigClient.GetEntityTag +// method. +func (client *PortalConfigClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, options *PortalConfigClientGetEntityTagOptions) (PortalConfigClientGetEntityTagResponse, error) { + var err error + const operationName = "PortalConfigClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, portalConfigID, options) + if err != nil { + return PortalConfigClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PortalConfigClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PortalConfigClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *PortalConfigClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, _ *PortalConfigClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if portalConfigID == "" { + return nil, errors.New("parameter portalConfigID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{portalConfigId}", url.PathEscape(portalConfigID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *PortalConfigClient) getEntityTagHandleResponse(resp *http.Response) (PortalConfigClientGetEntityTagResponse, error) { + result := PortalConfigClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists the developer portal configurations. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - PortalConfigClientListByServiceOptions contains the optional parameters for the PortalConfigClient.NewListByServicePager +// method. +func (client *PortalConfigClient) NewListByServicePager(resourceGroupName string, serviceName string, options *PortalConfigClientListByServiceOptions) *runtime.Pager[PortalConfigClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[PortalConfigClientListByServiceResponse]{ + More: func(page PortalConfigClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PortalConfigClientListByServiceResponse) (PortalConfigClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PortalConfigClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return PortalConfigClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *PortalConfigClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *PortalConfigClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *PortalConfigClient) listByServiceHandleResponse(resp *http.Response) (PortalConfigClientListByServiceResponse, error) { + result := PortalConfigClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PortalConfigCollection); err != nil { + return PortalConfigClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Update the developer portal configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - portalConfigID - Portal configuration identifier. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update the developer portal configuration. +// - options - PortalConfigClientUpdateOptions contains the optional parameters for the PortalConfigClient.Update method. +func (client *PortalConfigClient) Update(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, ifMatch string, parameters PortalConfigContract, options *PortalConfigClientUpdateOptions) (PortalConfigClientUpdateResponse, error) { + var err error + const operationName = "PortalConfigClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, portalConfigID, ifMatch, parameters, options) + if err != nil { + return PortalConfigClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PortalConfigClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PortalConfigClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *PortalConfigClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalConfigID string, ifMatch string, parameters PortalConfigContract, _ *PortalConfigClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if portalConfigID == "" { + return nil, errors.New("parameter portalConfigID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{portalConfigId}", url.PathEscape(portalConfigID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *PortalConfigClient) updateHandleResponse(resp *http.Response) (PortalConfigClientUpdateResponse, error) { + result := PortalConfigClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PortalConfigContract); err != nil { + return PortalConfigClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/portalrevision_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/portalrevision_client.go similarity index 76% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/portalrevision_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/portalrevision_client.go index 04beae0b..f5843c37 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/portalrevision_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/portalrevision_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type PortalRevisionClient struct { } // NewPortalRevisionClient creates a new instance of PortalRevisionClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPortalRevisionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PortalRevisionClient, error) { - cl, err := arm.NewClient(moduleName+".PortalRevisionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -50,8 +45,8 @@ func NewPortalRevisionClient(subscriptionID string, credential azcore.TokenCrede // indicates if the revision is publicly accessible. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - portalRevisionID - Portal revision identifier. Must be unique in the current API Management service instance. // - options - PortalRevisionClientBeginCreateOrUpdateOptions contains the optional parameters for the PortalRevisionClient.BeginCreateOrUpdate @@ -62,11 +57,15 @@ func (client *PortalRevisionClient) BeginCreateOrUpdate(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PortalRevisionClientCreateOrUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PortalRevisionClientCreateOrUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PortalRevisionClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PortalRevisionClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -74,24 +73,30 @@ func (client *PortalRevisionClient) BeginCreateOrUpdate(ctx context.Context, res // if the revision is publicly accessible. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 func (client *PortalRevisionClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, parameters PortalRevisionContract, options *PortalRevisionClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PortalRevisionClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, portalRevisionID, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PortalRevisionClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, parameters PortalRevisionContract, options *PortalRevisionClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *PortalRevisionClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, parameters PortalRevisionContract, _ *PortalRevisionClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -114,37 +119,47 @@ func (client *PortalRevisionClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Get - Gets the developer portal's revision specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - portalRevisionID - Portal revision identifier. Must be unique in the current API Management service instance. // - options - PortalRevisionClientGetOptions contains the optional parameters for the PortalRevisionClient.Get method. func (client *PortalRevisionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, options *PortalRevisionClientGetOptions) (PortalRevisionClientGetResponse, error) { + var err error + const operationName = "PortalRevisionClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, portalRevisionID, options) if err != nil { return PortalRevisionClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PortalRevisionClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PortalRevisionClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PortalRevisionClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *PortalRevisionClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, options *PortalRevisionClientGetOptions) (*policy.Request, error) { +func (client *PortalRevisionClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, _ *PortalRevisionClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -167,7 +182,7 @@ func (client *PortalRevisionClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,29 +202,36 @@ func (client *PortalRevisionClient) getHandleResponse(resp *http.Response) (Port // GetEntityTag - Gets the developer portal revision specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - portalRevisionID - Portal revision identifier. Must be unique in the current API Management service instance. // - options - PortalRevisionClientGetEntityTagOptions contains the optional parameters for the PortalRevisionClient.GetEntityTag // method. func (client *PortalRevisionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, options *PortalRevisionClientGetEntityTagOptions) (PortalRevisionClientGetEntityTagResponse, error) { + var err error + const operationName = "PortalRevisionClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, portalRevisionID, options) if err != nil { return PortalRevisionClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PortalRevisionClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PortalRevisionClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PortalRevisionClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *PortalRevisionClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, options *PortalRevisionClientGetEntityTagOptions) (*policy.Request, error) { +func (client *PortalRevisionClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, _ *PortalRevisionClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -232,7 +254,7 @@ func (client *PortalRevisionClient) getEntityTagCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -240,18 +262,17 @@ func (client *PortalRevisionClient) getEntityTagCreateRequest(ctx context.Contex // getEntityTagHandleResponse handles the GetEntityTag response. func (client *PortalRevisionClient) getEntityTagHandleResponse(resp *http.Response) (PortalRevisionClientGetEntityTagResponse, error) { - result := PortalRevisionClientGetEntityTagResponse{} + result := PortalRevisionClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists developer portal's revisions. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - PortalRevisionClientListByServiceOptions contains the optional parameters for the PortalRevisionClient.NewListByServicePager // method. @@ -261,25 +282,20 @@ func (client *PortalRevisionClient) NewListByServicePager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PortalRevisionClientListByServiceResponse) (PortalRevisionClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PortalRevisionClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PortalRevisionClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return PortalRevisionClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PortalRevisionClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -306,13 +322,13 @@ func (client *PortalRevisionClient) listByServiceCreateRequest(ctx context.Conte if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -330,8 +346,8 @@ func (client *PortalRevisionClient) listByServiceHandleResponse(resp *http.Respo // BeginUpdate - Updates the description of specified portal revision or makes it current. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - portalRevisionID - Portal revision identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -344,35 +360,45 @@ func (client *PortalRevisionClient) BeginUpdate(ctx context.Context, resourceGro if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PortalRevisionClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PortalRevisionClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PortalRevisionClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PortalRevisionClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates the description of specified portal revision or makes it current. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 +// Generated from API version 2024-05-01 func (client *PortalRevisionClient) update(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, ifMatch string, parameters PortalRevisionContract, options *PortalRevisionClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PortalRevisionClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, portalRevisionID, ifMatch, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. -func (client *PortalRevisionClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, ifMatch string, parameters PortalRevisionContract, options *PortalRevisionClientBeginUpdateOptions) (*policy.Request, error) { +func (client *PortalRevisionClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, portalRevisionID string, ifMatch string, parameters PortalRevisionContract, _ *PortalRevisionClientBeginUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -395,9 +421,12 @@ func (client *PortalRevisionClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/portalsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/portalsettings_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/portalsettings_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/portalsettings_client.go index 734a4527..4921fe48 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/portalsettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/portalsettings_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type PortalSettingsClient struct { } // NewPortalSettingsClient creates a new instance of PortalSettingsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPortalSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PortalSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".PortalSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,28 +43,35 @@ func NewPortalSettingsClient(subscriptionID string, credential azcore.TokenCrede // ListByService - Lists a collection of portalsettings defined within a service instance.. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - PortalSettingsClientListByServiceOptions contains the optional parameters for the PortalSettingsClient.ListByService // method. func (client *PortalSettingsClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, options *PortalSettingsClientListByServiceOptions) (PortalSettingsClientListByServiceResponse, error) { + var err error + const operationName = "PortalSettingsClient.ListByService" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return PortalSettingsClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PortalSettingsClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PortalSettingsClientListByServiceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PortalSettingsClientListByServiceResponse{}, err } - return client.listByServiceHandleResponse(resp) + resp, err := client.listByServiceHandleResponse(httpResp) + return resp, err } // listByServiceCreateRequest creates the ListByService request. -func (client *PortalSettingsClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PortalSettingsClientListByServiceOptions) (*policy.Request, error) { +func (client *PortalSettingsClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *PortalSettingsClientListByServiceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -88,7 +90,7 @@ func (client *PortalSettingsClient) listByServiceCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/privateendpointconnection_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/privateendpointconnection_client.go new file mode 100644 index 00000000..50430df8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/privateendpointconnection_client.go @@ -0,0 +1,477 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PrivateEndpointConnectionClient contains the methods for the PrivateEndpointConnection group. +// Don't use this type directly, use NewPrivateEndpointConnectionClient() instead. +type PrivateEndpointConnectionClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateEndpointConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateEndpointConnectionClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a new Private Endpoint Connection or updates an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - privateEndpointConnectionName - Name of the private endpoint connection. +// - options - PrivateEndpointConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginCreateOrUpdate +// method. +func (client *PrivateEndpointConnectionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, privateEndpointConnectionRequest PrivateEndpointConnectionRequest, options *PrivateEndpointConnectionClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, privateEndpointConnectionName, privateEndpointConnectionRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a new Private Endpoint Connection or updates an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateEndpointConnectionClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, privateEndpointConnectionRequest PrivateEndpointConnectionRequest, options *PrivateEndpointConnectionClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointConnectionClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, privateEndpointConnectionName, privateEndpointConnectionRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PrivateEndpointConnectionClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, privateEndpointConnectionRequest PrivateEndpointConnectionRequest, _ *PrivateEndpointConnectionClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, privateEndpointConnectionRequest); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified Private Endpoint Connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - privateEndpointConnectionName - Name of the private endpoint connection. +// - options - PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete +// method. +func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified Private Endpoint Connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateEndpointConnectionClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointConnectionClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PrivateEndpointConnectionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, _ *PrivateEndpointConnectionClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetByName - Gets the details of the Private Endpoint Connection specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - privateEndpointConnectionName - Name of the private endpoint connection. +// - options - PrivateEndpointConnectionClientGetByNameOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetByName +// method. +func (client *PrivateEndpointConnectionClient) GetByName(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientGetByNameOptions) (PrivateEndpointConnectionClientGetByNameResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionClient.GetByName" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getByNameCreateRequest(ctx, resourceGroupName, serviceName, privateEndpointConnectionName, options) + if err != nil { + return PrivateEndpointConnectionClientGetByNameResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionClientGetByNameResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionClientGetByNameResponse{}, err + } + resp, err := client.getByNameHandleResponse(httpResp) + return resp, err +} + +// getByNameCreateRequest creates the GetByName request. +func (client *PrivateEndpointConnectionClient) getByNameCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, privateEndpointConnectionName string, _ *PrivateEndpointConnectionClientGetByNameOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getByNameHandleResponse handles the GetByName response. +func (client *PrivateEndpointConnectionClient) getByNameHandleResponse(resp *http.Response) (PrivateEndpointConnectionClientGetByNameResponse, error) { + result := PrivateEndpointConnectionClientGetByNameResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { + return PrivateEndpointConnectionClientGetByNameResponse{}, err + } + return result, nil +} + +// GetPrivateLinkResource - Gets the private link resources +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - privateLinkSubResourceName - Name of the private link resource. +// - options - PrivateEndpointConnectionClientGetPrivateLinkResourceOptions contains the optional parameters for the PrivateEndpointConnectionClient.GetPrivateLinkResource +// method. +func (client *PrivateEndpointConnectionClient) GetPrivateLinkResource(ctx context.Context, resourceGroupName string, serviceName string, privateLinkSubResourceName string, options *PrivateEndpointConnectionClientGetPrivateLinkResourceOptions) (PrivateEndpointConnectionClientGetPrivateLinkResourceResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionClient.GetPrivateLinkResource" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateLinkResourceCreateRequest(ctx, resourceGroupName, serviceName, privateLinkSubResourceName, options) + if err != nil { + return PrivateEndpointConnectionClientGetPrivateLinkResourceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionClientGetPrivateLinkResourceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionClientGetPrivateLinkResourceResponse{}, err + } + resp, err := client.getPrivateLinkResourceHandleResponse(httpResp) + return resp, err +} + +// getPrivateLinkResourceCreateRequest creates the GetPrivateLinkResource request. +func (client *PrivateEndpointConnectionClient) getPrivateLinkResourceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, privateLinkSubResourceName string, _ *PrivateEndpointConnectionClientGetPrivateLinkResourceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if privateLinkSubResourceName == "" { + return nil, errors.New("parameter privateLinkSubResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateLinkSubResourceName}", url.PathEscape(privateLinkSubResourceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateLinkResourceHandleResponse handles the GetPrivateLinkResource response. +func (client *PrivateEndpointConnectionClient) getPrivateLinkResourceHandleResponse(resp *http.Response) (PrivateEndpointConnectionClientGetPrivateLinkResourceResponse, error) { + result := PrivateEndpointConnectionClientGetPrivateLinkResourceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResource); err != nil { + return PrivateEndpointConnectionClientGetPrivateLinkResourceResponse{}, err + } + return result, nil +} + +// NewListByServicePager - Lists all private endpoint connections of the API Management service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - PrivateEndpointConnectionClientListByServiceOptions contains the optional parameters for the PrivateEndpointConnectionClient.NewListByServicePager +// method. +func (client *PrivateEndpointConnectionClient) NewListByServicePager(resourceGroupName string, serviceName string, options *PrivateEndpointConnectionClientListByServiceOptions) *runtime.Pager[PrivateEndpointConnectionClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionClientListByServiceResponse]{ + More: func(page PrivateEndpointConnectionClientListByServiceResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionClientListByServiceResponse) (PrivateEndpointConnectionClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionClient.NewListByServicePager") + req, err := client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return PrivateEndpointConnectionClientListByServiceResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionClientListByServiceResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateEndpointConnectionClientListByServiceResponse{}, runtime.NewResponseError(resp) + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *PrivateEndpointConnectionClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *PrivateEndpointConnectionClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *PrivateEndpointConnectionClient) listByServiceHandleResponse(resp *http.Response) (PrivateEndpointConnectionClientListByServiceResponse, error) { + result := PrivateEndpointConnectionClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResult); err != nil { + return PrivateEndpointConnectionClientListByServiceResponse{}, err + } + return result, nil +} + +// ListPrivateLinkResources - Gets the private link resources +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - PrivateEndpointConnectionClientListPrivateLinkResourcesOptions contains the optional parameters for the PrivateEndpointConnectionClient.ListPrivateLinkResources +// method. +func (client *PrivateEndpointConnectionClient) ListPrivateLinkResources(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateEndpointConnectionClientListPrivateLinkResourcesOptions) (PrivateEndpointConnectionClientListPrivateLinkResourcesResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionClient.ListPrivateLinkResources" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return PrivateEndpointConnectionClientListPrivateLinkResourcesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionClientListPrivateLinkResourcesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionClientListPrivateLinkResourcesResponse{}, err + } + resp, err := client.listPrivateLinkResourcesHandleResponse(httpResp) + return resp, err +} + +// listPrivateLinkResourcesCreateRequest creates the ListPrivateLinkResources request. +func (client *PrivateEndpointConnectionClient) listPrivateLinkResourcesCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *PrivateEndpointConnectionClientListPrivateLinkResourcesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listPrivateLinkResourcesHandleResponse handles the ListPrivateLinkResources response. +func (client *PrivateEndpointConnectionClient) listPrivateLinkResourcesHandleResponse(resp *http.Response) (PrivateEndpointConnectionClientListPrivateLinkResourcesResponse, error) { + result := PrivateEndpointConnectionClientListPrivateLinkResourcesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourceListResult); err != nil { + return PrivateEndpointConnectionClientListPrivateLinkResourcesResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/product_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/product_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/product_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/product_client.go index c5b0c829..019731b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/product_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/product_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type ProductClient struct { } // NewProductClient creates a new instance of ProductClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProductClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductClient, error) { - cl, err := arm.NewClient(moduleName+".ProductClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +44,32 @@ func NewProductClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Creates or Updates a product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - parameters - Create or update parameters. // - options - ProductClientCreateOrUpdateOptions contains the optional parameters for the ProductClient.CreateOrUpdate method. func (client *ProductClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters ProductContract, options *ProductClientCreateOrUpdateOptions) (ProductClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProductClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, productID, parameters, options) if err != nil { return ProductClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ProductClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ProductClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -94,13 +96,16 @@ func (client *ProductClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -118,24 +123,30 @@ func (client *ProductClient) createOrUpdateHandleResponse(resp *http.Response) ( // Delete - Delete product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - ProductClientDeleteOptions contains the optional parameters for the ProductClient.Delete method. func (client *ProductClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, options *ProductClientDeleteOptions) (ProductClientDeleteResponse, error) { + var err error + const operationName = "ProductClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, productID, ifMatch, options) if err != nil { return ProductClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ProductClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProductClientDeleteResponse{}, err } return ProductClientDeleteResponse{}, nil } @@ -164,41 +175,48 @@ func (client *ProductClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") if options != nil && options.DeleteSubscriptions != nil { reqQP.Set("deleteSubscriptions", strconv.FormatBool(*options.DeleteSubscriptions)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the details of the product specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - options - ProductClientGetOptions contains the optional parameters for the ProductClient.Get method. func (client *ProductClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductClientGetOptions) (ProductClientGetResponse, error) { + var err error + const operationName = "ProductClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, productID, options) if err != nil { return ProductClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *ProductClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductClientGetOptions) (*policy.Request, error) { +func (client *ProductClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, _ *ProductClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -221,7 +239,7 @@ func (client *ProductClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,28 +259,35 @@ func (client *ProductClient) getHandleResponse(resp *http.Response) (ProductClie // GetEntityTag - Gets the entity state (Etag) version of the product specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - options - ProductClientGetEntityTagOptions contains the optional parameters for the ProductClient.GetEntityTag method. func (client *ProductClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductClientGetEntityTagOptions) (ProductClientGetEntityTagResponse, error) { + var err error + const operationName = "ProductClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, productID, options) if err != nil { return ProductClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *ProductClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductClientGetEntityTagOptions) (*policy.Request, error) { +func (client *ProductClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, _ *ProductClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -285,7 +310,7 @@ func (client *ProductClient) getEntityTagCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -293,18 +318,17 @@ func (client *ProductClient) getEntityTagCreateRequest(ctx context.Context, reso // getEntityTagHandleResponse handles the GetEntityTag response. func (client *ProductClient) getEntityTagHandleResponse(resp *http.Response) (ProductClientGetEntityTagResponse, error) { - result := ProductClientGetEntityTagResponse{} + result := ProductClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Lists a collection of products in the specified service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - ProductClientListByServiceOptions contains the optional parameters for the ProductClient.NewListByServicePager // method. @@ -314,25 +338,20 @@ func (client *ProductClient) NewListByServicePager(resourceGroupName string, ser return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProductClientListByServiceResponse) (ProductClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProductClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProductClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return ProductClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -359,19 +378,19 @@ func (client *ProductClient) listByServiceCreateRequest(ctx context.Context, res if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") if options != nil && options.ExpandGroups != nil { reqQP.Set("expandGroups", strconv.FormatBool(*options.ExpandGroups)) } if options != nil && options.Tags != nil { reqQP.Set("tags", *options.Tags) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -388,8 +407,8 @@ func (client *ProductClient) listByServiceHandleResponse(resp *http.Response) (P // NewListByTagsPager - Lists a collection of products associated with tags. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - ProductClientListByTagsOptions contains the optional parameters for the ProductClient.NewListByTagsPager method. func (client *ProductClient) NewListByTagsPager(resourceGroupName string, serviceName string, options *ProductClientListByTagsOptions) *runtime.Pager[ProductClientListByTagsResponse] { @@ -398,25 +417,20 @@ func (client *ProductClient) NewListByTagsPager(resourceGroupName string, servic return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProductClientListByTagsResponse) (ProductClientListByTagsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByTagsCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProductClientListByTagsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProductClient.NewListByTagsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByTagsCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return ProductClientListByTagsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductClientListByTagsResponse{}, runtime.NewResponseError(resp) - } return client.listByTagsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -443,16 +457,16 @@ func (client *ProductClient) listByTagsCreateRequest(ctx context.Context, resour if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") if options != nil && options.IncludeNotTaggedProducts != nil { reqQP.Set("includeNotTaggedProducts", strconv.FormatBool(*options.IncludeNotTaggedProducts)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -470,8 +484,8 @@ func (client *ProductClient) listByTagsHandleResponse(resp *http.Response) (Prod // Update - Update existing product details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -479,22 +493,29 @@ func (client *ProductClient) listByTagsHandleResponse(resp *http.Response) (Prod // - parameters - Update parameters. // - options - ProductClientUpdateOptions contains the optional parameters for the ProductClient.Update method. func (client *ProductClient) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, parameters ProductUpdateParameters, options *ProductClientUpdateOptions) (ProductClientUpdateResponse, error) { + var err error + const operationName = "ProductClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, productID, ifMatch, parameters, options) if err != nil { return ProductClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *ProductClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, parameters ProductUpdateParameters, options *ProductClientUpdateOptions) (*policy.Request, error) { +func (client *ProductClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, parameters ProductUpdateParameters, _ *ProductClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -517,11 +538,14 @@ func (client *ProductClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productapi_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productapi_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productapi_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productapi_client.go index 58331db5..9fe26f1c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productapi_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productapi_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type ProductAPIClient struct { } // NewProductAPIClient creates a new instance of ProductAPIClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProductAPIClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductAPIClient, error) { - cl, err := arm.NewClient(moduleName+".ProductAPIClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewProductAPIClient(subscriptionID string, credential azcore.TokenCredentia // CheckEntityExists - Checks that API entity specified by identifier is associated with the Product entity. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has @@ -57,22 +52,28 @@ func NewProductAPIClient(subscriptionID string, credential azcore.TokenCredentia // - options - ProductAPIClientCheckEntityExistsOptions contains the optional parameters for the ProductAPIClient.CheckEntityExists // method. func (client *ProductAPIClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientCheckEntityExistsOptions) (ProductAPIClientCheckEntityExistsResponse, error) { + var err error + const operationName = "ProductAPIClient.CheckEntityExists" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkEntityExistsCreateRequest(ctx, resourceGroupName, serviceName, productID, apiID, options) if err != nil { return ProductAPIClientCheckEntityExistsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductAPIClientCheckEntityExistsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return ProductAPIClientCheckEntityExistsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProductAPIClientCheckEntityExistsResponse{}, err } - return ProductAPIClientCheckEntityExistsResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300}, nil + return ProductAPIClientCheckEntityExistsResponse{Success: httpResp.StatusCode >= 200 && httpResp.StatusCode < 300}, nil } // checkEntityExistsCreateRequest creates the CheckEntityExists request. -func (client *ProductAPIClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientCheckEntityExistsOptions) (*policy.Request, error) { +func (client *ProductAPIClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, _ *ProductAPIClientCheckEntityExistsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -99,7 +100,7 @@ func (client *ProductAPIClient) checkEntityExistsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -108,8 +109,8 @@ func (client *ProductAPIClient) checkEntityExistsCreateRequest(ctx context.Conte // CreateOrUpdate - Adds an API to the specified product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has @@ -117,22 +118,29 @@ func (client *ProductAPIClient) checkEntityExistsCreateRequest(ctx context.Conte // - options - ProductAPIClientCreateOrUpdateOptions contains the optional parameters for the ProductAPIClient.CreateOrUpdate // method. func (client *ProductAPIClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientCreateOrUpdateOptions) (ProductAPIClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProductAPIClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, productID, apiID, options) if err != nil { return ProductAPIClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductAPIClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ProductAPIClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ProductAPIClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ProductAPIClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ProductAPIClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, _ *ProductAPIClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -159,7 +167,7 @@ func (client *ProductAPIClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -177,30 +185,36 @@ func (client *ProductAPIClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Deletes the specified API from the specified product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - options - ProductAPIClientDeleteOptions contains the optional parameters for the ProductAPIClient.Delete method. func (client *ProductAPIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientDeleteOptions) (ProductAPIClientDeleteResponse, error) { + var err error + const operationName = "ProductAPIClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, productID, apiID, options) if err != nil { return ProductAPIClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductAPIClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ProductAPIClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProductAPIClientDeleteResponse{}, err } return ProductAPIClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *ProductAPIClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, options *ProductAPIClientDeleteOptions) (*policy.Request, error) { +func (client *ProductAPIClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiID string, _ *ProductAPIClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -227,7 +241,7 @@ func (client *ProductAPIClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -235,8 +249,8 @@ func (client *ProductAPIClient) deleteCreateRequest(ctx context.Context, resourc // NewListByProductPager - Lists a collection of the APIs associated with a product. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - options - ProductAPIClientListByProductOptions contains the optional parameters for the ProductAPIClient.NewListByProductPager @@ -247,25 +261,20 @@ func (client *ProductAPIClient) NewListByProductPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProductAPIClientListByProductResponse) (ProductAPIClientListByProductResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProductAPIClientListByProductResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProductAPIClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, options) + }, nil) if err != nil { return ProductAPIClientListByProductResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductAPIClientListByProductResponse{}, runtime.NewResponseError(resp) - } return client.listByProductHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -296,13 +305,13 @@ func (client *ProductAPIClient) listByProductCreateRequest(ctx context.Context, if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productapilink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productapilink_client.go new file mode 100644 index 00000000..9474ba82 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productapilink_client.go @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ProductAPILinkClient contains the methods for the ProductAPILink group. +// Don't use this type directly, use NewProductAPILinkClient() instead. +type ProductAPILinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProductAPILinkClient creates a new instance of ProductAPILinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProductAPILinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductAPILinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProductAPILinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Adds an API to the specified product via link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Product-API link identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - ProductAPILinkClientCreateOrUpdateOptions contains the optional parameters for the ProductAPILinkClient.CreateOrUpdate +// method. +func (client *ProductAPILinkClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiLinkID string, parameters ProductAPILinkContract, options *ProductAPILinkClientCreateOrUpdateOptions) (ProductAPILinkClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProductAPILinkClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, productID, apiLinkID, parameters, options) + if err != nil { + return ProductAPILinkClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductAPILinkClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ProductAPILinkClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ProductAPILinkClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiLinkID string, parameters ProductAPILinkContract, _ *ProductAPILinkClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ProductAPILinkClient) createOrUpdateHandleResponse(resp *http.Response) (ProductAPILinkClientCreateOrUpdateResponse, error) { + result := ProductAPILinkClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProductAPILinkContract); err != nil { + return ProductAPILinkClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified API from the specified product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Product-API link identifier. Must be unique in the current API Management service instance. +// - options - ProductAPILinkClientDeleteOptions contains the optional parameters for the ProductAPILinkClient.Delete method. +func (client *ProductAPILinkClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiLinkID string, options *ProductAPILinkClientDeleteOptions) (ProductAPILinkClientDeleteResponse, error) { + var err error + const operationName = "ProductAPILinkClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, productID, apiLinkID, options) + if err != nil { + return ProductAPILinkClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductAPILinkClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProductAPILinkClientDeleteResponse{}, err + } + return ProductAPILinkClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ProductAPILinkClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiLinkID string, _ *ProductAPILinkClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the API link for the product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Product-API link identifier. Must be unique in the current API Management service instance. +// - options - ProductAPILinkClientGetOptions contains the optional parameters for the ProductAPILinkClient.Get method. +func (client *ProductAPILinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiLinkID string, options *ProductAPILinkClientGetOptions) (ProductAPILinkClientGetResponse, error) { + var err error + const operationName = "ProductAPILinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, productID, apiLinkID, options) + if err != nil { + return ProductAPILinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductAPILinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductAPILinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProductAPILinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiLinkID string, _ *ProductAPILinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProductAPILinkClient) getHandleResponse(resp *http.Response) (ProductAPILinkClientGetResponse, error) { + result := ProductAPILinkClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.ProductAPILinkContract); err != nil { + return ProductAPILinkClientGetResponse{}, err + } + return result, nil +} + +// NewListByProductPager - Lists a collection of the API links associated with a product. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - options - ProductAPILinkClientListByProductOptions contains the optional parameters for the ProductAPILinkClient.NewListByProductPager +// method. +func (client *ProductAPILinkClient) NewListByProductPager(resourceGroupName string, serviceName string, productID string, options *ProductAPILinkClientListByProductOptions) *runtime.Pager[ProductAPILinkClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[ProductAPILinkClientListByProductResponse]{ + More: func(page ProductAPILinkClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProductAPILinkClientListByProductResponse) (ProductAPILinkClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProductAPILinkClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, options) + }, nil) + if err != nil { + return ProductAPILinkClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *ProductAPILinkClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductAPILinkClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apiLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *ProductAPILinkClient) listByProductHandleResponse(resp *http.Response) (ProductAPILinkClientListByProductResponse, error) { + result := ProductAPILinkClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProductAPILinkCollection); err != nil { + return ProductAPILinkClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productgroup_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productgroup_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productgroup_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productgroup_client.go index 7f4661af..960f37fe 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productgroup_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productgroup_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type ProductGroupClient struct { } // NewProductGroupClient creates a new instance of ProductGroupClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProductGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductGroupClient, error) { - cl, err := arm.NewClient(moduleName+".ProductGroupClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,30 +43,36 @@ func NewProductGroupClient(subscriptionID string, credential azcore.TokenCredent // CheckEntityExists - Checks that Group entity specified by identifier is associated with the Product entity. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - options - ProductGroupClientCheckEntityExistsOptions contains the optional parameters for the ProductGroupClient.CheckEntityExists // method. func (client *ProductGroupClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientCheckEntityExistsOptions) (ProductGroupClientCheckEntityExistsResponse, error) { + var err error + const operationName = "ProductGroupClient.CheckEntityExists" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkEntityExistsCreateRequest(ctx, resourceGroupName, serviceName, productID, groupID, options) if err != nil { return ProductGroupClientCheckEntityExistsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductGroupClientCheckEntityExistsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return ProductGroupClientCheckEntityExistsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProductGroupClientCheckEntityExistsResponse{}, err } - return ProductGroupClientCheckEntityExistsResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300}, nil + return ProductGroupClientCheckEntityExistsResponse{Success: httpResp.StatusCode >= 200 && httpResp.StatusCode < 300}, nil } // checkEntityExistsCreateRequest creates the CheckEntityExists request. -func (client *ProductGroupClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientCheckEntityExistsOptions) (*policy.Request, error) { +func (client *ProductGroupClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, _ *ProductGroupClientCheckEntityExistsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -98,7 +99,7 @@ func (client *ProductGroupClient) checkEntityExistsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -107,30 +108,37 @@ func (client *ProductGroupClient) checkEntityExistsCreateRequest(ctx context.Con // CreateOrUpdate - Adds the association between the specified developer group with the specified product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - options - ProductGroupClientCreateOrUpdateOptions contains the optional parameters for the ProductGroupClient.CreateOrUpdate // method. func (client *ProductGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientCreateOrUpdateOptions) (ProductGroupClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProductGroupClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, productID, groupID, options) if err != nil { return ProductGroupClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductGroupClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ProductGroupClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ProductGroupClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ProductGroupClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ProductGroupClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, _ *ProductGroupClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -157,7 +165,7 @@ func (client *ProductGroupClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -175,29 +183,35 @@ func (client *ProductGroupClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Deletes the association between the specified group and product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - groupID - Group identifier. Must be unique in the current API Management service instance. // - options - ProductGroupClientDeleteOptions contains the optional parameters for the ProductGroupClient.Delete method. func (client *ProductGroupClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientDeleteOptions) (ProductGroupClientDeleteResponse, error) { + var err error + const operationName = "ProductGroupClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, productID, groupID, options) if err != nil { return ProductGroupClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductGroupClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ProductGroupClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProductGroupClientDeleteResponse{}, err } return ProductGroupClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *ProductGroupClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, options *ProductGroupClientDeleteOptions) (*policy.Request, error) { +func (client *ProductGroupClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string, _ *ProductGroupClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -224,7 +238,7 @@ func (client *ProductGroupClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,8 +246,8 @@ func (client *ProductGroupClient) deleteCreateRequest(ctx context.Context, resou // NewListByProductPager - Lists the collection of developer groups associated with the specified product. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - options - ProductGroupClientListByProductOptions contains the optional parameters for the ProductGroupClient.NewListByProductPager @@ -244,25 +258,20 @@ func (client *ProductGroupClient) NewListByProductPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProductGroupClientListByProductResponse) (ProductGroupClientListByProductResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProductGroupClientListByProductResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProductGroupClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, options) + }, nil) if err != nil { return ProductGroupClientListByProductResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductGroupClientListByProductResponse{}, runtime.NewResponseError(resp) - } return client.listByProductHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -293,13 +302,13 @@ func (client *ProductGroupClient) listByProductCreateRequest(ctx context.Context if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productgrouplink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productgrouplink_client.go new file mode 100644 index 00000000..f5f8cf42 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productgrouplink_client.go @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ProductGroupLinkClient contains the methods for the ProductGroupLink group. +// Don't use this type directly, use NewProductGroupLinkClient() instead. +type ProductGroupLinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProductGroupLinkClient creates a new instance of ProductGroupLinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProductGroupLinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductGroupLinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProductGroupLinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Adds a group to the specified product via link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - groupLinkID - Product-Group link identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - ProductGroupLinkClientCreateOrUpdateOptions contains the optional parameters for the ProductGroupLinkClient.CreateOrUpdate +// method. +func (client *ProductGroupLinkClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupLinkID string, parameters ProductGroupLinkContract, options *ProductGroupLinkClientCreateOrUpdateOptions) (ProductGroupLinkClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProductGroupLinkClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, productID, groupLinkID, parameters, options) + if err != nil { + return ProductGroupLinkClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductGroupLinkClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ProductGroupLinkClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ProductGroupLinkClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupLinkID string, parameters ProductGroupLinkContract, _ *ProductGroupLinkClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if groupLinkID == "" { + return nil, errors.New("parameter groupLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupLinkId}", url.PathEscape(groupLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ProductGroupLinkClient) createOrUpdateHandleResponse(resp *http.Response) (ProductGroupLinkClientCreateOrUpdateResponse, error) { + result := ProductGroupLinkClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProductGroupLinkContract); err != nil { + return ProductGroupLinkClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified group from the specified product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - groupLinkID - Product-Group link identifier. Must be unique in the current API Management service instance. +// - options - ProductGroupLinkClientDeleteOptions contains the optional parameters for the ProductGroupLinkClient.Delete method. +func (client *ProductGroupLinkClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupLinkID string, options *ProductGroupLinkClientDeleteOptions) (ProductGroupLinkClientDeleteResponse, error) { + var err error + const operationName = "ProductGroupLinkClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, productID, groupLinkID, options) + if err != nil { + return ProductGroupLinkClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductGroupLinkClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProductGroupLinkClientDeleteResponse{}, err + } + return ProductGroupLinkClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ProductGroupLinkClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupLinkID string, _ *ProductGroupLinkClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if groupLinkID == "" { + return nil, errors.New("parameter groupLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupLinkId}", url.PathEscape(groupLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the group link for the product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - groupLinkID - Product-Group link identifier. Must be unique in the current API Management service instance. +// - options - ProductGroupLinkClientGetOptions contains the optional parameters for the ProductGroupLinkClient.Get method. +func (client *ProductGroupLinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupLinkID string, options *ProductGroupLinkClientGetOptions) (ProductGroupLinkClientGetResponse, error) { + var err error + const operationName = "ProductGroupLinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, productID, groupLinkID, options) + if err != nil { + return ProductGroupLinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductGroupLinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductGroupLinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProductGroupLinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupLinkID string, _ *ProductGroupLinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks/{groupLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if groupLinkID == "" { + return nil, errors.New("parameter groupLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupLinkId}", url.PathEscape(groupLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProductGroupLinkClient) getHandleResponse(resp *http.Response) (ProductGroupLinkClientGetResponse, error) { + result := ProductGroupLinkClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.ProductGroupLinkContract); err != nil { + return ProductGroupLinkClientGetResponse{}, err + } + return result, nil +} + +// NewListByProductPager - Lists a collection of the group links associated with a product. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - options - ProductGroupLinkClientListByProductOptions contains the optional parameters for the ProductGroupLinkClient.NewListByProductPager +// method. +func (client *ProductGroupLinkClient) NewListByProductPager(resourceGroupName string, serviceName string, productID string, options *ProductGroupLinkClientListByProductOptions) *runtime.Pager[ProductGroupLinkClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[ProductGroupLinkClientListByProductResponse]{ + More: func(page ProductGroupLinkClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProductGroupLinkClientListByProductResponse) (ProductGroupLinkClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProductGroupLinkClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, options) + }, nil) + if err != nil { + return ProductGroupLinkClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *ProductGroupLinkClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductGroupLinkClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groupLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *ProductGroupLinkClient) listByProductHandleResponse(resp *http.Response) (ProductGroupLinkClientListByProductResponse, error) { + result := ProductGroupLinkClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProductGroupLinkCollection); err != nil { + return ProductGroupLinkClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productpolicy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productpolicy_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productpolicy_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productpolicy_client.go index 40396eb6..52b226b4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productpolicy_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productpolicy_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type ProductPolicyClient struct { } // NewProductPolicyClient creates a new instance of ProductPolicyClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProductPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductPolicyClient, error) { - cl, err := arm.NewClient(moduleName+".ProductPolicyClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewProductPolicyClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Creates or updates policy configuration for the Product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - policyID - The identifier of the Policy. @@ -57,18 +52,25 @@ func NewProductPolicyClient(subscriptionID string, credential azcore.TokenCreden // - options - ProductPolicyClientCreateOrUpdateOptions contains the optional parameters for the ProductPolicyClient.CreateOrUpdate // method. func (client *ProductPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, parameters PolicyContract, options *ProductPolicyClientCreateOrUpdateOptions) (ProductPolicyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProductPolicyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, productID, policyID, parameters, options) if err != nil { return ProductPolicyClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductPolicyClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ProductPolicyClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ProductPolicyClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -99,13 +101,16 @@ func (client *ProductPolicyClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -123,8 +128,8 @@ func (client *ProductPolicyClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Deletes the policy configuration at the Product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - policyID - The identifier of the Policy. @@ -132,22 +137,28 @@ func (client *ProductPolicyClient) createOrUpdateHandleResponse(resp *http.Respo // it should be * for unconditional update. // - options - ProductPolicyClientDeleteOptions contains the optional parameters for the ProductPolicyClient.Delete method. func (client *ProductPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, ifMatch string, options *ProductPolicyClientDeleteOptions) (ProductPolicyClientDeleteResponse, error) { + var err error + const operationName = "ProductPolicyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, productID, policyID, ifMatch, options) if err != nil { return ProductPolicyClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductPolicyClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ProductPolicyClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProductPolicyClientDeleteResponse{}, err } return ProductPolicyClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *ProductPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, ifMatch string, options *ProductPolicyClientDeleteOptions) (*policy.Request, error) { +func (client *ProductPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, ifMatch string, _ *ProductPolicyClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -174,35 +185,42 @@ func (client *ProductPolicyClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Get the policy configuration at the Product level. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - policyID - The identifier of the Policy. // - options - ProductPolicyClientGetOptions contains the optional parameters for the ProductPolicyClient.Get method. func (client *ProductPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, options *ProductPolicyClientGetOptions) (ProductPolicyClientGetResponse, error) { + var err error + const operationName = "ProductPolicyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, productID, policyID, options) if err != nil { return ProductPolicyClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductPolicyClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductPolicyClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductPolicyClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -233,10 +251,10 @@ func (client *ProductPolicyClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") if options != nil && options.Format != nil { reqQP.Set("format", string(*options.Format)) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -256,30 +274,37 @@ func (client *ProductPolicyClient) getHandleResponse(resp *http.Response) (Produ // GetEntityTag - Get the ETag of the policy configuration at the Product level. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - policyID - The identifier of the Policy. // - options - ProductPolicyClientGetEntityTagOptions contains the optional parameters for the ProductPolicyClient.GetEntityTag // method. func (client *ProductPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, options *ProductPolicyClientGetEntityTagOptions) (ProductPolicyClientGetEntityTagResponse, error) { + var err error + const operationName = "ProductPolicyClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, productID, policyID, options) if err != nil { return ProductPolicyClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProductPolicyClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductPolicyClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductPolicyClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *ProductPolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, options *ProductPolicyClientGetEntityTagOptions) (*policy.Request, error) { +func (client *ProductPolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, policyID PolicyIDName, _ *ProductPolicyClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -306,7 +331,7 @@ func (client *ProductPolicyClient) getEntityTagCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -314,40 +339,46 @@ func (client *ProductPolicyClient) getEntityTagCreateRequest(ctx context.Context // getEntityTagHandleResponse handles the GetEntityTag response. func (client *ProductPolicyClient) getEntityTagHandleResponse(resp *http.Response) (ProductPolicyClientGetEntityTagResponse, error) { - result := ProductPolicyClientGetEntityTagResponse{} + result := ProductPolicyClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } -// ListByProduct - Get the policy configuration at the Product level. -// If the operation fails it returns an *azcore.ResponseError type. +// NewListByProductPager - Get the policy configuration at the Product level. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. -// - options - ProductPolicyClientListByProductOptions contains the optional parameters for the ProductPolicyClient.ListByProduct +// - options - ProductPolicyClientListByProductOptions contains the optional parameters for the ProductPolicyClient.NewListByProductPager // method. -func (client *ProductPolicyClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductPolicyClientListByProductOptions) (ProductPolicyClientListByProductResponse, error) { - req, err := client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, options) - if err != nil { - return ProductPolicyClientListByProductResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProductPolicyClientListByProductResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductPolicyClientListByProductResponse{}, runtime.NewResponseError(resp) - } - return client.listByProductHandleResponse(resp) +func (client *ProductPolicyClient) NewListByProductPager(resourceGroupName string, serviceName string, productID string, options *ProductPolicyClientListByProductOptions) *runtime.Pager[ProductPolicyClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[ProductPolicyClientListByProductResponse]{ + More: func(page ProductPolicyClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProductPolicyClientListByProductResponse) (ProductPolicyClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProductPolicyClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, options) + }, nil) + if err != nil { + return ProductPolicyClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) } // listByProductCreateRequest creates the ListByProduct request. -func (client *ProductPolicyClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductPolicyClientListByProductOptions) (*policy.Request, error) { +func (client *ProductPolicyClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, _ *ProductPolicyClientListByProductOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -370,7 +401,7 @@ func (client *ProductPolicyClient) listByProductCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productsubscriptions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productsubscriptions_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productsubscriptions_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productsubscriptions_client.go index b90c8335..3cdc660c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/productsubscriptions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productsubscriptions_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type ProductSubscriptionsClient struct { } // NewProductSubscriptionsClient creates a new instance of ProductSubscriptionsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProductSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductSubscriptionsClient, error) { - cl, err := arm.NewClient(moduleName+".ProductSubscriptionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewProductSubscriptionsClient(subscriptionID string, credential azcore.Toke // NewListPager - Lists the collection of subscriptions to the specified product. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - options - ProductSubscriptionsClientListOptions contains the optional parameters for the ProductSubscriptionsClient.NewListPager @@ -60,25 +55,20 @@ func (client *ProductSubscriptionsClient) NewListPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProductSubscriptionsClientListResponse) (ProductSubscriptionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, productID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProductSubscriptionsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProductSubscriptionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, productID, options) + }, nil) if err != nil { return ProductSubscriptionsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProductSubscriptionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -109,13 +99,13 @@ func (client *ProductSubscriptionsClient) listCreateRequest(ctx context.Context, if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productwiki_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productwiki_client.go new file mode 100644 index 00000000..95896fa6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productwiki_client.go @@ -0,0 +1,403 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProductWikiClient contains the methods for the ProductWiki group. +// Don't use this type directly, use NewProductWikiClient() instead. +type ProductWikiClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProductWikiClient creates a new instance of ProductWikiClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProductWikiClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductWikiClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProductWikiClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates a new Wiki for a Product or updates an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - ProductWikiClientCreateOrUpdateOptions contains the optional parameters for the ProductWikiClient.CreateOrUpdate +// method. +func (client *ProductWikiClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters WikiContract, options *ProductWikiClientCreateOrUpdateOptions) (ProductWikiClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProductWikiClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, productID, parameters, options) + if err != nil { + return ProductWikiClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductWikiClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ProductWikiClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ProductWikiClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters WikiContract, options *ProductWikiClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ProductWikiClient) createOrUpdateHandleResponse(resp *http.Response) (ProductWikiClientCreateOrUpdateResponse, error) { + result := ProductWikiClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.WikiContract); err != nil { + return ProductWikiClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified Wiki from a Product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - ProductWikiClientDeleteOptions contains the optional parameters for the ProductWikiClient.Delete method. +func (client *ProductWikiClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, options *ProductWikiClientDeleteOptions) (ProductWikiClientDeleteResponse, error) { + var err error + const operationName = "ProductWikiClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, productID, ifMatch, options) + if err != nil { + return ProductWikiClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductWikiClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProductWikiClientDeleteResponse{}, err + } + return ProductWikiClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ProductWikiClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, _ *ProductWikiClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the Wiki for a Product specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - options - ProductWikiClientGetOptions contains the optional parameters for the ProductWikiClient.Get method. +func (client *ProductWikiClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductWikiClientGetOptions) (ProductWikiClientGetResponse, error) { + var err error + const operationName = "ProductWikiClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, productID, options) + if err != nil { + return ProductWikiClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductWikiClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductWikiClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProductWikiClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, _ *ProductWikiClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProductWikiClient) getHandleResponse(resp *http.Response) (ProductWikiClientGetResponse, error) { + result := ProductWikiClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.WikiContract); err != nil { + return ProductWikiClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - options - ProductWikiClientGetEntityTagOptions contains the optional parameters for the ProductWikiClient.GetEntityTag +// method. +func (client *ProductWikiClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductWikiClientGetEntityTagOptions) (ProductWikiClientGetEntityTagResponse, error) { + var err error + const operationName = "ProductWikiClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, productID, options) + if err != nil { + return ProductWikiClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductWikiClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductWikiClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *ProductWikiClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, _ *ProductWikiClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *ProductWikiClient) getEntityTagHandleResponse(resp *http.Response) (ProductWikiClientGetEntityTagResponse, error) { + result := ProductWikiClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// Update - Updates the details of the Wiki for a Product specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Wiki Update parameters. +// - options - ProductWikiClientUpdateOptions contains the optional parameters for the ProductWikiClient.Update method. +func (client *ProductWikiClient) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, parameters WikiUpdateContract, options *ProductWikiClientUpdateOptions) (ProductWikiClientUpdateResponse, error) { + var err error + const operationName = "ProductWikiClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, productID, ifMatch, parameters, options) + if err != nil { + return ProductWikiClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProductWikiClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProductWikiClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *ProductWikiClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, parameters WikiUpdateContract, _ *ProductWikiClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *ProductWikiClient) updateHandleResponse(resp *http.Response) (ProductWikiClientUpdateResponse, error) { + result := ProductWikiClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.WikiContract); err != nil { + return ProductWikiClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productwikis_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productwikis_client.go new file mode 100644 index 00000000..35b017d2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/productwikis_client.go @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ProductWikisClient contains the methods for the ProductWikis group. +// Don't use this type directly, use NewProductWikisClient() instead. +type ProductWikisClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProductWikisClient creates a new instance of ProductWikisClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProductWikisClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProductWikisClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProductWikisClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets the details of the Wiki for a Product specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - options - ProductWikisClientListOptions contains the optional parameters for the ProductWikisClient.NewListPager method. +func (client *ProductWikisClient) NewListPager(resourceGroupName string, serviceName string, productID string, options *ProductWikisClientListOptions) *runtime.Pager[ProductWikisClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ProductWikisClientListResponse]{ + More: func(page ProductWikisClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProductWikisClientListResponse) (ProductWikisClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProductWikisClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, productID, options) + }, nil) + if err != nil { + return ProductWikisClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ProductWikisClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, options *ProductWikisClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ProductWikisClient) listHandleResponse(resp *http.Response) (ProductWikisClientListResponse, error) { + result := ProductWikisClientListResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.WikiCollection); err != nil { + return ProductWikisClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/quotabycounterkeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/quotabycounterkeys_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/quotabycounterkeys_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/quotabycounterkeys_client.go index c20cda83..5bc93ec4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/quotabycounterkeys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/quotabycounterkeys_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type QuotaByCounterKeysClient struct { } // NewQuotaByCounterKeysClient creates a new instance of QuotaByCounterKeysClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewQuotaByCounterKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QuotaByCounterKeysClient, error) { - cl, err := arm.NewClient(moduleName+".QuotaByCounterKeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewQuotaByCounterKeysClient(subscriptionID string, credential azcore.TokenC // on the specified service instance. The api does not support paging yet. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the // quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s @@ -58,22 +53,29 @@ func NewQuotaByCounterKeysClient(subscriptionID string, credential azcore.TokenC // - options - QuotaByCounterKeysClientListByServiceOptions contains the optional parameters for the QuotaByCounterKeysClient.ListByService // method. func (client *QuotaByCounterKeysClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, options *QuotaByCounterKeysClientListByServiceOptions) (QuotaByCounterKeysClientListByServiceResponse, error) { + var err error + const operationName = "QuotaByCounterKeysClient.ListByService" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, quotaCounterKey, options) if err != nil { return QuotaByCounterKeysClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QuotaByCounterKeysClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QuotaByCounterKeysClientListByServiceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QuotaByCounterKeysClientListByServiceResponse{}, err } - return client.listByServiceHandleResponse(resp) + resp, err := client.listByServiceHandleResponse(httpResp) + return resp, err } // listByServiceCreateRequest creates the ListByService request. -func (client *QuotaByCounterKeysClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, options *QuotaByCounterKeysClientListByServiceOptions) (*policy.Request, error) { +func (client *QuotaByCounterKeysClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, _ *QuotaByCounterKeysClientListByServiceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -96,7 +98,7 @@ func (client *QuotaByCounterKeysClient) listByServiceCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,8 +117,8 @@ func (client *QuotaByCounterKeysClient) listByServiceHandleResponse(resp *http.R // service instance. This should be used for reset of the quota counter values. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the // quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s @@ -125,22 +127,29 @@ func (client *QuotaByCounterKeysClient) listByServiceHandleResponse(resp *http.R // - options - QuotaByCounterKeysClientUpdateOptions contains the optional parameters for the QuotaByCounterKeysClient.Update // method. func (client *QuotaByCounterKeysClient) Update(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, parameters QuotaCounterValueUpdateContract, options *QuotaByCounterKeysClientUpdateOptions) (QuotaByCounterKeysClientUpdateResponse, error) { + var err error + const operationName = "QuotaByCounterKeysClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, quotaCounterKey, parameters, options) if err != nil { return QuotaByCounterKeysClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QuotaByCounterKeysClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QuotaByCounterKeysClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QuotaByCounterKeysClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *QuotaByCounterKeysClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, parameters QuotaCounterValueUpdateContract, options *QuotaByCounterKeysClientUpdateOptions) (*policy.Request, error) { +func (client *QuotaByCounterKeysClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, parameters QuotaCounterValueUpdateContract, _ *QuotaByCounterKeysClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -163,10 +172,13 @@ func (client *QuotaByCounterKeysClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/quotabyperiodkeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/quotabyperiodkeys_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/quotabyperiodkeys_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/quotabyperiodkeys_client.go index 38ebc24c..1949b390 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/quotabyperiodkeys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/quotabyperiodkeys_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type QuotaByPeriodKeysClient struct { } // NewQuotaByPeriodKeysClient creates a new instance of QuotaByPeriodKeysClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewQuotaByPeriodKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QuotaByPeriodKeysClient, error) { - cl, err := arm.NewClient(moduleName+".QuotaByPeriodKeysClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,8 +44,8 @@ func NewQuotaByPeriodKeysClient(subscriptionID string, credential azcore.TokenCr // instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the // quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s @@ -58,22 +53,29 @@ func NewQuotaByPeriodKeysClient(subscriptionID string, credential azcore.TokenCr // - quotaPeriodKey - Quota period key identifier. // - options - QuotaByPeriodKeysClientGetOptions contains the optional parameters for the QuotaByPeriodKeysClient.Get method. func (client *QuotaByPeriodKeysClient) Get(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, options *QuotaByPeriodKeysClientGetOptions) (QuotaByPeriodKeysClientGetResponse, error) { + var err error + const operationName = "QuotaByPeriodKeysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, options) if err != nil { return QuotaByPeriodKeysClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QuotaByPeriodKeysClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QuotaByPeriodKeysClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QuotaByPeriodKeysClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *QuotaByPeriodKeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, options *QuotaByPeriodKeysClientGetOptions) (*policy.Request, error) { +func (client *QuotaByPeriodKeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, _ *QuotaByPeriodKeysClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -100,7 +102,7 @@ func (client *QuotaByPeriodKeysClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,8 +120,8 @@ func (client *QuotaByPeriodKeysClient) getHandleResponse(resp *http.Response) (Q // Update - Updates an existing quota counter value in the specified service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - quotaCounterKey - Quota counter key identifier.This is the result of expression defined in counter-key attribute of the // quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s @@ -129,22 +131,29 @@ func (client *QuotaByPeriodKeysClient) getHandleResponse(resp *http.Response) (Q // - options - QuotaByPeriodKeysClientUpdateOptions contains the optional parameters for the QuotaByPeriodKeysClient.Update // method. func (client *QuotaByPeriodKeysClient) Update(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, parameters QuotaCounterValueUpdateContract, options *QuotaByPeriodKeysClientUpdateOptions) (QuotaByPeriodKeysClientUpdateResponse, error) { + var err error + const operationName = "QuotaByPeriodKeysClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, quotaCounterKey, quotaPeriodKey, parameters, options) if err != nil { return QuotaByPeriodKeysClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return QuotaByPeriodKeysClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return QuotaByPeriodKeysClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return QuotaByPeriodKeysClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *QuotaByPeriodKeysClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, parameters QuotaCounterValueUpdateContract, options *QuotaByPeriodKeysClientUpdateOptions) (*policy.Request, error) { +func (client *QuotaByPeriodKeysClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, parameters QuotaCounterValueUpdateContract, _ *QuotaByPeriodKeysClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -171,10 +180,13 @@ func (client *QuotaByPeriodKeysClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/region_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/region_client.go similarity index 76% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/region_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/region_client.go index 325ff0ef..0639cb1a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/region_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/region_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type RegionClient struct { } // NewRegionClient creates a new instance of RegionClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRegionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegionClient, error) { - cl, err := arm.NewClient(moduleName+".RegionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,8 +42,8 @@ func NewRegionClient(subscriptionID string, credential azcore.TokenCredential, o // NewListByServicePager - Lists all azure regions in which the service exists. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - RegionClientListByServiceOptions contains the optional parameters for the RegionClient.NewListByServicePager // method. @@ -58,30 +53,25 @@ func (client *RegionClient) NewListByServicePager(resourceGroupName string, serv return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RegionClientListByServiceResponse) (RegionClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RegionClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return RegionClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RegionClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RegionClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listByServiceCreateRequest creates the ListByService request. -func (client *RegionClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *RegionClientListByServiceOptions) (*policy.Request, error) { +func (client *RegionClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *RegionClientListByServiceOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -100,7 +90,7 @@ func (client *RegionClient) listByServiceCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/reports_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/reports_client.go similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/reports_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/reports_client.go index b5bf3146..87d50333 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/reports_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/reports_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type ReportsClient struct { } // NewReportsClient creates a new instance of ReportsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewReportsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReportsClient, error) { - cl, err := arm.NewClient(moduleName+".ReportsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewReportsClient(subscriptionID string, credential azcore.TokenCredential, // NewListByAPIPager - Lists report records by API. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - filter - The filter to apply on the operation. // - options - ReportsClientListByAPIOptions contains the optional parameters for the ReportsClient.NewListByAPIPager method. @@ -59,25 +54,20 @@ func (client *ReportsClient) NewListByAPIPager(resourceGroupName string, service return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ReportsClientListByAPIResponse) (ReportsClientListByAPIResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, filter, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReportsClient.NewListByAPIPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, filter, options) + }, nil) if err != nil { return ReportsClientListByAPIResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ReportsClientListByAPIResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReportsClientListByAPIResponse{}, runtime.NewResponseError(resp) - } return client.listByAPIHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -102,16 +92,16 @@ func (client *ReportsClient) listByAPICreateRequest(ctx context.Context, resourc } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + if options != nil && options.Orderby != nil { + reqQP.Set("$orderby", *options.Orderby) } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - if options != nil && options.Orderby != nil { - reqQP.Set("$orderby", *options.Orderby) + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -128,8 +118,8 @@ func (client *ReportsClient) listByAPIHandleResponse(resp *http.Response) (Repor // NewListByGeoPager - Lists report records by geography. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - filter - | Field | Usage | Supported operators | Supported functions | // |-------------|-------------|-------------|-------------| @@ -163,25 +153,20 @@ func (client *ReportsClient) NewListByGeoPager(resourceGroupName string, service return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ReportsClientListByGeoResponse) (ReportsClientListByGeoResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByGeoCreateRequest(ctx, resourceGroupName, serviceName, filter, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReportsClient.NewListByGeoPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByGeoCreateRequest(ctx, resourceGroupName, serviceName, filter, options) + }, nil) if err != nil { return ReportsClientListByGeoResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ReportsClientListByGeoResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReportsClientListByGeoResponse{}, runtime.NewResponseError(resp) - } return client.listByGeoHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -206,13 +191,13 @@ func (client *ReportsClient) listByGeoCreateRequest(ctx context.Context, resourc } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -229,8 +214,8 @@ func (client *ReportsClient) listByGeoHandleResponse(resp *http.Response) (Repor // NewListByOperationPager - Lists report records by API Operations. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - filter - | Field | Usage | Supported operators | Supported functions | // |-------------|-------------|-------------|-------------| @@ -264,25 +249,20 @@ func (client *ReportsClient) NewListByOperationPager(resourceGroupName string, s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ReportsClientListByOperationResponse) (ReportsClientListByOperationResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByOperationCreateRequest(ctx, resourceGroupName, serviceName, filter, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReportsClient.NewListByOperationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByOperationCreateRequest(ctx, resourceGroupName, serviceName, filter, options) + }, nil) if err != nil { return ReportsClientListByOperationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ReportsClientListByOperationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReportsClientListByOperationResponse{}, runtime.NewResponseError(resp) - } return client.listByOperationHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -307,16 +287,16 @@ func (client *ReportsClient) listByOperationCreateRequest(ctx context.Context, r } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + if options != nil && options.Orderby != nil { + reqQP.Set("$orderby", *options.Orderby) } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - if options != nil && options.Orderby != nil { - reqQP.Set("$orderby", *options.Orderby) + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -333,8 +313,8 @@ func (client *ReportsClient) listByOperationHandleResponse(resp *http.Response) // NewListByProductPager - Lists report records by Product. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - filter - | Field | Usage | Supported operators | Supported functions | // |-------------|-------------|-------------|-------------| @@ -366,25 +346,20 @@ func (client *ReportsClient) NewListByProductPager(resourceGroupName string, ser return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ReportsClientListByProductResponse) (ReportsClientListByProductResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, filter, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReportsClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, filter, options) + }, nil) if err != nil { return ReportsClientListByProductResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ReportsClientListByProductResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReportsClientListByProductResponse{}, runtime.NewResponseError(resp) - } return client.listByProductHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -409,16 +384,16 @@ func (client *ReportsClient) listByProductCreateRequest(ctx context.Context, res } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + if options != nil && options.Orderby != nil { + reqQP.Set("$orderby", *options.Orderby) } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - if options != nil && options.Orderby != nil { - reqQP.Set("$orderby", *options.Orderby) + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -435,8 +410,8 @@ func (client *ReportsClient) listByProductHandleResponse(resp *http.Response) (R // NewListByRequestPager - Lists report records by Request. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - filter - | Field | Usage | Supported operators | Supported functions | // |-------------|-------------|-------------|-------------| @@ -455,6 +430,7 @@ func (client *ReportsClient) NewListByRequestPager(resourceGroupName string, ser return false }, Fetcher: func(ctx context.Context, page *ReportsClientListByRequestResponse) (ReportsClientListByRequestResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReportsClient.NewListByRequestPager") req, err := client.listByRequestCreateRequest(ctx, resourceGroupName, serviceName, filter, options) if err != nil { return ReportsClientListByRequestResponse{}, err @@ -468,6 +444,7 @@ func (client *ReportsClient) NewListByRequestPager(resourceGroupName string, ser } return client.listByRequestHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -492,13 +469,13 @@ func (client *ReportsClient) listByRequestCreateRequest(ctx context.Context, res } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -515,8 +492,8 @@ func (client *ReportsClient) listByRequestHandleResponse(resp *http.Response) (R // NewListBySubscriptionPager - Lists report records by subscription. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - filter - | Field | Usage | Supported operators | Supported functions | // |-------------|-------------|-------------|-------------| @@ -548,25 +525,20 @@ func (client *ReportsClient) NewListBySubscriptionPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ReportsClientListBySubscriptionResponse) (ReportsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, resourceGroupName, serviceName, filter, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReportsClientListBySubscriptionResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReportsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, resourceGroupName, serviceName, filter, options) + }, nil) if err != nil { return ReportsClientListBySubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReportsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -591,16 +563,16 @@ func (client *ReportsClient) listBySubscriptionCreateRequest(ctx context.Context } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + if options != nil && options.Orderby != nil { + reqQP.Set("$orderby", *options.Orderby) } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - if options != nil && options.Orderby != nil { - reqQP.Set("$orderby", *options.Orderby) + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -617,8 +589,8 @@ func (client *ReportsClient) listBySubscriptionHandleResponse(resp *http.Respons // NewListByTimePager - Lists report records by Time. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - filter - | Field | Usage | Supported operators | Supported functions | // |-------------|-------------|-------------|-------------| @@ -653,25 +625,20 @@ func (client *ReportsClient) NewListByTimePager(resourceGroupName string, servic return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ReportsClientListByTimeResponse) (ReportsClientListByTimeResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByTimeCreateRequest(ctx, resourceGroupName, serviceName, filter, interval, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReportsClient.NewListByTimePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByTimeCreateRequest(ctx, resourceGroupName, serviceName, filter, interval, options) + }, nil) if err != nil { return ReportsClientListByTimeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ReportsClientListByTimeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReportsClientListByTimeResponse{}, runtime.NewResponseError(resp) - } return client.listByTimeHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -696,17 +663,17 @@ func (client *ReportsClient) listByTimeCreateRequest(ctx context.Context, resour } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + if options != nil && options.Orderby != nil { + reqQP.Set("$orderby", *options.Orderby) } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - if options != nil && options.Orderby != nil { - reqQP.Set("$orderby", *options.Orderby) + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } + reqQP.Set("api-version", "2024-05-01") reqQP.Set("interval", interval) - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -723,8 +690,8 @@ func (client *ReportsClient) listByTimeHandleResponse(resp *http.Response) (Repo // NewListByUserPager - Lists report records by User. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - filter - | Field | Usage | Supported operators | Supported functions | // |-------------|-------------|-------------|-------------| @@ -757,25 +724,20 @@ func (client *ReportsClient) NewListByUserPager(resourceGroupName string, servic return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ReportsClientListByUserResponse) (ReportsClientListByUserResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByUserCreateRequest(ctx, resourceGroupName, serviceName, filter, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReportsClient.NewListByUserPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByUserCreateRequest(ctx, resourceGroupName, serviceName, filter, options) + }, nil) if err != nil { return ReportsClientListByUserResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ReportsClientListByUserResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReportsClientListByUserResponse{}, runtime.NewResponseError(resp) - } return client.listByUserHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -800,16 +762,16 @@ func (client *ReportsClient) listByUserCreateRequest(ctx context.Context, resour } reqQP := req.Raw().URL.Query() reqQP.Set("$filter", filter) - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + if options != nil && options.Orderby != nil { + reqQP.Set("$orderby", *options.Orderby) } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - if options != nil && options.Orderby != nil { - reqQP.Set("$orderby", *options.Orderby) + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/responses.go new file mode 100644 index 00000000..6addc32d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/responses.go @@ -0,0 +1,4395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +// APIClientCreateOrUpdateResponse contains the response from method APIClient.BeginCreateOrUpdate. +type APIClientCreateOrUpdateResponse struct { + // API details. + APIContract +} + +// APIClientDeleteResponse contains the response from method APIClient.BeginDelete. +type APIClientDeleteResponse struct { + // placeholder for future response values +} + +// APIClientGetEntityTagResponse contains the response from method APIClient.GetEntityTag. +type APIClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIClientGetResponse contains the response from method APIClient.Get. +type APIClientGetResponse struct { + // API details. + APIContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIClientListByServiceResponse contains the response from method APIClient.NewListByServicePager. +type APIClientListByServiceResponse struct { + // Paged API list representation. + APICollection +} + +// APIClientListByTagsResponse contains the response from method APIClient.NewListByTagsPager. +type APIClientListByTagsResponse struct { + // Paged Tag list representation. + TagResourceCollection +} + +// APIClientUpdateResponse contains the response from method APIClient.Update. +type APIClientUpdateResponse struct { + // API details. + APIContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIDiagnosticClientCreateOrUpdateResponse contains the response from method APIDiagnosticClient.CreateOrUpdate. +type APIDiagnosticClientCreateOrUpdateResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIDiagnosticClientDeleteResponse contains the response from method APIDiagnosticClient.Delete. +type APIDiagnosticClientDeleteResponse struct { + // placeholder for future response values +} + +// APIDiagnosticClientGetEntityTagResponse contains the response from method APIDiagnosticClient.GetEntityTag. +type APIDiagnosticClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIDiagnosticClientGetResponse contains the response from method APIDiagnosticClient.Get. +type APIDiagnosticClientGetResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIDiagnosticClientListByServiceResponse contains the response from method APIDiagnosticClient.NewListByServicePager. +type APIDiagnosticClientListByServiceResponse struct { + // Paged Diagnostic list representation. + DiagnosticCollection +} + +// APIDiagnosticClientUpdateResponse contains the response from method APIDiagnosticClient.Update. +type APIDiagnosticClientUpdateResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIExportClientGetResponse contains the response from method APIExportClient.Get. +type APIExportClientGetResponse struct { + // API Export result. + APIExportResult +} + +// APIGatewayClientCreateOrUpdateResponse contains the response from method APIGatewayClient.BeginCreateOrUpdate. +type APIGatewayClientCreateOrUpdateResponse struct { + // A single API Management gateway resource in List or Get response. + GatewayResource +} + +// APIGatewayClientDeleteResponse contains the response from method APIGatewayClient.BeginDelete. +type APIGatewayClientDeleteResponse struct { + // A single API Management gateway resource in List or Get response. + GatewayResource +} + +// APIGatewayClientGetResponse contains the response from method APIGatewayClient.Get. +type APIGatewayClientGetResponse struct { + // A single API Management gateway resource in List or Get response. + GatewayResource +} + +// APIGatewayClientListByResourceGroupResponse contains the response from method APIGatewayClient.NewListByResourceGroupPager. +type APIGatewayClientListByResourceGroupResponse struct { + // The response of the List API Management gateway operation. + GatewayListResult +} + +// APIGatewayClientListResponse contains the response from method APIGatewayClient.NewListPager. +type APIGatewayClientListResponse struct { + // The response of the List API Management gateway operation. + GatewayListResult +} + +// APIGatewayClientUpdateResponse contains the response from method APIGatewayClient.BeginUpdate. +type APIGatewayClientUpdateResponse struct { + // A single API Management gateway resource in List or Get response. + GatewayResource +} + +// APIGatewayConfigConnectionClientCreateOrUpdateResponse contains the response from method APIGatewayConfigConnectionClient.BeginCreateOrUpdate. +type APIGatewayConfigConnectionClientCreateOrUpdateResponse struct { + // A single API Management gateway resource in List or Get response. + GatewayConfigConnectionResource +} + +// APIGatewayConfigConnectionClientDeleteResponse contains the response from method APIGatewayConfigConnectionClient.BeginDelete. +type APIGatewayConfigConnectionClientDeleteResponse struct { + // placeholder for future response values +} + +// APIGatewayConfigConnectionClientGetResponse contains the response from method APIGatewayConfigConnectionClient.Get. +type APIGatewayConfigConnectionClientGetResponse struct { + // A single API Management gateway resource in List or Get response. + GatewayConfigConnectionResource +} + +// APIGatewayConfigConnectionClientListByGatewayResponse contains the response from method APIGatewayConfigConnectionClient.NewListByGatewayPager. +type APIGatewayConfigConnectionClientListByGatewayResponse struct { + // The response of the List API Management gateway operation. + GatewayConfigConnectionListResult +} + +// APIIssueAttachmentClientCreateOrUpdateResponse contains the response from method APIIssueAttachmentClient.CreateOrUpdate. +type APIIssueAttachmentClientCreateOrUpdateResponse struct { + // Issue Attachment Contract details. + IssueAttachmentContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIIssueAttachmentClientDeleteResponse contains the response from method APIIssueAttachmentClient.Delete. +type APIIssueAttachmentClientDeleteResponse struct { + // placeholder for future response values +} + +// APIIssueAttachmentClientGetEntityTagResponse contains the response from method APIIssueAttachmentClient.GetEntityTag. +type APIIssueAttachmentClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIIssueAttachmentClientGetResponse contains the response from method APIIssueAttachmentClient.Get. +type APIIssueAttachmentClientGetResponse struct { + // Issue Attachment Contract details. + IssueAttachmentContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIIssueAttachmentClientListByServiceResponse contains the response from method APIIssueAttachmentClient.NewListByServicePager. +type APIIssueAttachmentClientListByServiceResponse struct { + // Paged Issue Attachment list representation. + IssueAttachmentCollection +} + +// APIIssueClientCreateOrUpdateResponse contains the response from method APIIssueClient.CreateOrUpdate. +type APIIssueClientCreateOrUpdateResponse struct { + // Issue Contract details. + IssueContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIIssueClientDeleteResponse contains the response from method APIIssueClient.Delete. +type APIIssueClientDeleteResponse struct { + // placeholder for future response values +} + +// APIIssueClientGetEntityTagResponse contains the response from method APIIssueClient.GetEntityTag. +type APIIssueClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIIssueClientGetResponse contains the response from method APIIssueClient.Get. +type APIIssueClientGetResponse struct { + // Issue Contract details. + IssueContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIIssueClientListByServiceResponse contains the response from method APIIssueClient.NewListByServicePager. +type APIIssueClientListByServiceResponse struct { + // Paged Issue list representation. + IssueCollection +} + +// APIIssueClientUpdateResponse contains the response from method APIIssueClient.Update. +type APIIssueClientUpdateResponse struct { + // Issue Contract details. + IssueContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIIssueCommentClientCreateOrUpdateResponse contains the response from method APIIssueCommentClient.CreateOrUpdate. +type APIIssueCommentClientCreateOrUpdateResponse struct { + // Issue Comment Contract details. + IssueCommentContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIIssueCommentClientDeleteResponse contains the response from method APIIssueCommentClient.Delete. +type APIIssueCommentClientDeleteResponse struct { + // placeholder for future response values +} + +// APIIssueCommentClientGetEntityTagResponse contains the response from method APIIssueCommentClient.GetEntityTag. +type APIIssueCommentClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIIssueCommentClientGetResponse contains the response from method APIIssueCommentClient.Get. +type APIIssueCommentClientGetResponse struct { + // Issue Comment Contract details. + IssueCommentContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIIssueCommentClientListByServiceResponse contains the response from method APIIssueCommentClient.NewListByServicePager. +type APIIssueCommentClientListByServiceResponse struct { + // Paged Issue Comment list representation. + IssueCommentCollection +} + +// APIOperationClientCreateOrUpdateResponse contains the response from method APIOperationClient.CreateOrUpdate. +type APIOperationClientCreateOrUpdateResponse struct { + // API Operation details. + OperationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIOperationClientDeleteResponse contains the response from method APIOperationClient.Delete. +type APIOperationClientDeleteResponse struct { + // placeholder for future response values +} + +// APIOperationClientGetEntityTagResponse contains the response from method APIOperationClient.GetEntityTag. +type APIOperationClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIOperationClientGetResponse contains the response from method APIOperationClient.Get. +type APIOperationClientGetResponse struct { + // API Operation details. + OperationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIOperationClientListByAPIResponse contains the response from method APIOperationClient.NewListByAPIPager. +type APIOperationClientListByAPIResponse struct { + // Paged Operation list representation. + OperationCollection +} + +// APIOperationClientUpdateResponse contains the response from method APIOperationClient.Update. +type APIOperationClientUpdateResponse struct { + // API Operation details. + OperationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIOperationPolicyClientCreateOrUpdateResponse contains the response from method APIOperationPolicyClient.CreateOrUpdate. +type APIOperationPolicyClientCreateOrUpdateResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIOperationPolicyClientDeleteResponse contains the response from method APIOperationPolicyClient.Delete. +type APIOperationPolicyClientDeleteResponse struct { + // placeholder for future response values +} + +// APIOperationPolicyClientGetEntityTagResponse contains the response from method APIOperationPolicyClient.GetEntityTag. +type APIOperationPolicyClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIOperationPolicyClientGetResponse contains the response from method APIOperationPolicyClient.Get. +type APIOperationPolicyClientGetResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIOperationPolicyClientListByOperationResponse contains the response from method APIOperationPolicyClient.ListByOperation. +type APIOperationPolicyClientListByOperationResponse struct { + // The response of the list policy operation. + PolicyCollection +} + +// APIPolicyClientCreateOrUpdateResponse contains the response from method APIPolicyClient.CreateOrUpdate. +type APIPolicyClientCreateOrUpdateResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIPolicyClientDeleteResponse contains the response from method APIPolicyClient.Delete. +type APIPolicyClientDeleteResponse struct { + // placeholder for future response values +} + +// APIPolicyClientGetEntityTagResponse contains the response from method APIPolicyClient.GetEntityTag. +type APIPolicyClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIPolicyClientGetResponse contains the response from method APIPolicyClient.Get. +type APIPolicyClientGetResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIPolicyClientListByAPIResponse contains the response from method APIPolicyClient.ListByAPI. +type APIPolicyClientListByAPIResponse struct { + // The response of the list policy operation. + PolicyCollection +} + +// APIProductClientListByApisResponse contains the response from method APIProductClient.NewListByApisPager. +type APIProductClientListByApisResponse struct { + // Paged Products list representation. + ProductCollection +} + +// APIReleaseClientCreateOrUpdateResponse contains the response from method APIReleaseClient.CreateOrUpdate. +type APIReleaseClientCreateOrUpdateResponse struct { + // ApiRelease details. + APIReleaseContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIReleaseClientDeleteResponse contains the response from method APIReleaseClient.Delete. +type APIReleaseClientDeleteResponse struct { + // placeholder for future response values +} + +// APIReleaseClientGetEntityTagResponse contains the response from method APIReleaseClient.GetEntityTag. +type APIReleaseClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIReleaseClientGetResponse contains the response from method APIReleaseClient.Get. +type APIReleaseClientGetResponse struct { + // ApiRelease details. + APIReleaseContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIReleaseClientListByServiceResponse contains the response from method APIReleaseClient.NewListByServicePager. +type APIReleaseClientListByServiceResponse struct { + // Paged ApiRelease list representation. + APIReleaseCollection +} + +// APIReleaseClientUpdateResponse contains the response from method APIReleaseClient.Update. +type APIReleaseClientUpdateResponse struct { + // ApiRelease details. + APIReleaseContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIRevisionClientListByServiceResponse contains the response from method APIRevisionClient.NewListByServicePager. +type APIRevisionClientListByServiceResponse struct { + // Paged API Revision list representation. + APIRevisionCollection +} + +// APISchemaClientCreateOrUpdateResponse contains the response from method APISchemaClient.BeginCreateOrUpdate. +type APISchemaClientCreateOrUpdateResponse struct { + // API Schema Contract details. + SchemaContract +} + +// APISchemaClientDeleteResponse contains the response from method APISchemaClient.Delete. +type APISchemaClientDeleteResponse struct { + // placeholder for future response values +} + +// APISchemaClientGetEntityTagResponse contains the response from method APISchemaClient.GetEntityTag. +type APISchemaClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APISchemaClientGetResponse contains the response from method APISchemaClient.Get. +type APISchemaClientGetResponse struct { + // API Schema Contract details. + SchemaContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APISchemaClientListByAPIResponse contains the response from method APISchemaClient.NewListByAPIPager. +type APISchemaClientListByAPIResponse struct { + // The response of the list schema operation. + SchemaCollection +} + +// APITagDescriptionClientCreateOrUpdateResponse contains the response from method APITagDescriptionClient.CreateOrUpdate. +type APITagDescriptionClientCreateOrUpdateResponse struct { + // Contract details. + TagDescriptionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APITagDescriptionClientDeleteResponse contains the response from method APITagDescriptionClient.Delete. +type APITagDescriptionClientDeleteResponse struct { + // placeholder for future response values +} + +// APITagDescriptionClientGetEntityTagResponse contains the response from method APITagDescriptionClient.GetEntityTag. +type APITagDescriptionClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APITagDescriptionClientGetResponse contains the response from method APITagDescriptionClient.Get. +type APITagDescriptionClientGetResponse struct { + // Contract details. + TagDescriptionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APITagDescriptionClientListByServiceResponse contains the response from method APITagDescriptionClient.NewListByServicePager. +type APITagDescriptionClientListByServiceResponse struct { + // Paged TagDescription list representation. + TagDescriptionCollection +} + +// APIVersionSetClientCreateOrUpdateResponse contains the response from method APIVersionSetClient.CreateOrUpdate. +type APIVersionSetClientCreateOrUpdateResponse struct { + // API Version Set Contract details. + APIVersionSetContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIVersionSetClientDeleteResponse contains the response from method APIVersionSetClient.Delete. +type APIVersionSetClientDeleteResponse struct { + // placeholder for future response values +} + +// APIVersionSetClientGetEntityTagResponse contains the response from method APIVersionSetClient.GetEntityTag. +type APIVersionSetClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIVersionSetClientGetResponse contains the response from method APIVersionSetClient.Get. +type APIVersionSetClientGetResponse struct { + // API Version Set Contract details. + APIVersionSetContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIVersionSetClientListByServiceResponse contains the response from method APIVersionSetClient.NewListByServicePager. +type APIVersionSetClientListByServiceResponse struct { + // Paged API Version Set list representation. + APIVersionSetCollection +} + +// APIVersionSetClientUpdateResponse contains the response from method APIVersionSetClient.Update. +type APIVersionSetClientUpdateResponse struct { + // API Version Set Contract details. + APIVersionSetContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIWikiClientCreateOrUpdateResponse contains the response from method APIWikiClient.CreateOrUpdate. +type APIWikiClientCreateOrUpdateResponse struct { + // Wiki properties + WikiContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIWikiClientDeleteResponse contains the response from method APIWikiClient.Delete. +type APIWikiClientDeleteResponse struct { + // placeholder for future response values +} + +// APIWikiClientGetEntityTagResponse contains the response from method APIWikiClient.GetEntityTag. +type APIWikiClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// APIWikiClientGetResponse contains the response from method APIWikiClient.Get. +type APIWikiClientGetResponse struct { + // Wiki properties + WikiContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIWikiClientUpdateResponse contains the response from method APIWikiClient.Update. +type APIWikiClientUpdateResponse struct { + // Wiki properties + WikiContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// APIWikisClientListResponse contains the response from method APIWikisClient.NewListPager. +type APIWikisClientListResponse struct { + // Paged Wiki list representation. + WikiCollection +} + +// AllPoliciesClientListByServiceResponse contains the response from method AllPoliciesClient.NewListByServicePager. +type AllPoliciesClientListByServiceResponse struct { + // The response of All Policies. + AllPoliciesCollection +} + +// AuthorizationAccessPolicyClientCreateOrUpdateResponse contains the response from method AuthorizationAccessPolicyClient.CreateOrUpdate. +type AuthorizationAccessPolicyClientCreateOrUpdateResponse struct { + // Authorization access policy contract. + AuthorizationAccessPolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationAccessPolicyClientDeleteResponse contains the response from method AuthorizationAccessPolicyClient.Delete. +type AuthorizationAccessPolicyClientDeleteResponse struct { + // placeholder for future response values +} + +// AuthorizationAccessPolicyClientGetResponse contains the response from method AuthorizationAccessPolicyClient.Get. +type AuthorizationAccessPolicyClientGetResponse struct { + // Authorization access policy contract. + AuthorizationAccessPolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationAccessPolicyClientListByAuthorizationResponse contains the response from method AuthorizationAccessPolicyClient.NewListByAuthorizationPager. +type AuthorizationAccessPolicyClientListByAuthorizationResponse struct { + // Paged Authorization Access Policy list representation. + AuthorizationAccessPolicyCollection +} + +// AuthorizationClientConfirmConsentCodeResponse contains the response from method AuthorizationClient.ConfirmConsentCode. +type AuthorizationClientConfirmConsentCodeResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationClientCreateOrUpdateResponse contains the response from method AuthorizationClient.CreateOrUpdate. +type AuthorizationClientCreateOrUpdateResponse struct { + // Authorization contract. + AuthorizationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationClientDeleteResponse contains the response from method AuthorizationClient.Delete. +type AuthorizationClientDeleteResponse struct { + // placeholder for future response values +} + +// AuthorizationClientGetResponse contains the response from method AuthorizationClient.Get. +type AuthorizationClientGetResponse struct { + // Authorization contract. + AuthorizationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationClientListByAuthorizationProviderResponse contains the response from method AuthorizationClient.NewListByAuthorizationProviderPager. +type AuthorizationClientListByAuthorizationProviderResponse struct { + // Paged Authorization list representation. + AuthorizationCollection +} + +// AuthorizationLoginLinksClientPostResponse contains the response from method AuthorizationLoginLinksClient.Post. +type AuthorizationLoginLinksClientPostResponse struct { + // Authorization login response contract. + AuthorizationLoginResponseContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationProviderClientCreateOrUpdateResponse contains the response from method AuthorizationProviderClient.CreateOrUpdate. +type AuthorizationProviderClientCreateOrUpdateResponse struct { + // Authorization Provider contract. + AuthorizationProviderContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationProviderClientDeleteResponse contains the response from method AuthorizationProviderClient.Delete. +type AuthorizationProviderClientDeleteResponse struct { + // placeholder for future response values +} + +// AuthorizationProviderClientGetResponse contains the response from method AuthorizationProviderClient.Get. +type AuthorizationProviderClientGetResponse struct { + // Authorization Provider contract. + AuthorizationProviderContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationProviderClientListByServiceResponse contains the response from method AuthorizationProviderClient.NewListByServicePager. +type AuthorizationProviderClientListByServiceResponse struct { + // Paged Authorization Provider list representation. + AuthorizationProviderCollection +} + +// AuthorizationServerClientCreateOrUpdateResponse contains the response from method AuthorizationServerClient.CreateOrUpdate. +type AuthorizationServerClientCreateOrUpdateResponse struct { + // External OAuth authorization server settings. + AuthorizationServerContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationServerClientDeleteResponse contains the response from method AuthorizationServerClient.Delete. +type AuthorizationServerClientDeleteResponse struct { + // placeholder for future response values +} + +// AuthorizationServerClientGetEntityTagResponse contains the response from method AuthorizationServerClient.GetEntityTag. +type AuthorizationServerClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// AuthorizationServerClientGetResponse contains the response from method AuthorizationServerClient.Get. +type AuthorizationServerClientGetResponse struct { + // External OAuth authorization server settings. + AuthorizationServerContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationServerClientListByServiceResponse contains the response from method AuthorizationServerClient.NewListByServicePager. +type AuthorizationServerClientListByServiceResponse struct { + // Paged OAuth2 Authorization Servers list representation. + AuthorizationServerCollection +} + +// AuthorizationServerClientListSecretsResponse contains the response from method AuthorizationServerClient.ListSecrets. +type AuthorizationServerClientListSecretsResponse struct { + // OAuth Server Secrets Contract. + AuthorizationServerSecretsContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// AuthorizationServerClientUpdateResponse contains the response from method AuthorizationServerClient.Update. +type AuthorizationServerClientUpdateResponse struct { + // External OAuth authorization server settings. + AuthorizationServerContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// BackendClientCreateOrUpdateResponse contains the response from method BackendClient.CreateOrUpdate. +type BackendClientCreateOrUpdateResponse struct { + // Backend details. + BackendContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// BackendClientDeleteResponse contains the response from method BackendClient.Delete. +type BackendClientDeleteResponse struct { + // placeholder for future response values +} + +// BackendClientGetEntityTagResponse contains the response from method BackendClient.GetEntityTag. +type BackendClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// BackendClientGetResponse contains the response from method BackendClient.Get. +type BackendClientGetResponse struct { + // Backend details. + BackendContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// BackendClientListByServiceResponse contains the response from method BackendClient.NewListByServicePager. +type BackendClientListByServiceResponse struct { + // Paged Backend list representation. + BackendCollection +} + +// BackendClientReconnectResponse contains the response from method BackendClient.Reconnect. +type BackendClientReconnectResponse struct { + // placeholder for future response values +} + +// BackendClientUpdateResponse contains the response from method BackendClient.Update. +type BackendClientUpdateResponse struct { + // Backend details. + BackendContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// CacheClientCreateOrUpdateResponse contains the response from method CacheClient.CreateOrUpdate. +type CacheClientCreateOrUpdateResponse struct { + // Cache details. + CacheContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// CacheClientDeleteResponse contains the response from method CacheClient.Delete. +type CacheClientDeleteResponse struct { + // placeholder for future response values +} + +// CacheClientGetEntityTagResponse contains the response from method CacheClient.GetEntityTag. +type CacheClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// CacheClientGetResponse contains the response from method CacheClient.Get. +type CacheClientGetResponse struct { + // Cache details. + CacheContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// CacheClientListByServiceResponse contains the response from method CacheClient.NewListByServicePager. +type CacheClientListByServiceResponse struct { + // Paged Caches list representation. + CacheCollection +} + +// CacheClientUpdateResponse contains the response from method CacheClient.Update. +type CacheClientUpdateResponse struct { + // Cache details. + CacheContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// CertificateClientCreateOrUpdateResponse contains the response from method CertificateClient.CreateOrUpdate. +type CertificateClientCreateOrUpdateResponse struct { + // Certificate details. + CertificateContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// CertificateClientDeleteResponse contains the response from method CertificateClient.Delete. +type CertificateClientDeleteResponse struct { + // placeholder for future response values +} + +// CertificateClientGetEntityTagResponse contains the response from method CertificateClient.GetEntityTag. +type CertificateClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// CertificateClientGetResponse contains the response from method CertificateClient.Get. +type CertificateClientGetResponse struct { + // Certificate details. + CertificateContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// CertificateClientListByServiceResponse contains the response from method CertificateClient.NewListByServicePager. +type CertificateClientListByServiceResponse struct { + // Paged Certificates list representation. + CertificateCollection +} + +// CertificateClientRefreshSecretResponse contains the response from method CertificateClient.RefreshSecret. +type CertificateClientRefreshSecretResponse struct { + // Certificate details. + CertificateContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ClientPerformConnectivityCheckAsyncResponse contains the response from method Client.BeginPerformConnectivityCheckAsync. +type ClientPerformConnectivityCheckAsyncResponse struct { + // Information on the connectivity status. + ConnectivityCheckResponse +} + +// ContentItemClientCreateOrUpdateResponse contains the response from method ContentItemClient.CreateOrUpdate. +type ContentItemClientCreateOrUpdateResponse struct { + // Content type contract details. + ContentItemContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ContentItemClientDeleteResponse contains the response from method ContentItemClient.Delete. +type ContentItemClientDeleteResponse struct { + // placeholder for future response values +} + +// ContentItemClientGetEntityTagResponse contains the response from method ContentItemClient.GetEntityTag. +type ContentItemClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// ContentItemClientGetResponse contains the response from method ContentItemClient.Get. +type ContentItemClientGetResponse struct { + // Content type contract details. + ContentItemContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ContentItemClientListByServiceResponse contains the response from method ContentItemClient.NewListByServicePager. +type ContentItemClientListByServiceResponse struct { + // Paged list of content items. + ContentItemCollection +} + +// ContentTypeClientCreateOrUpdateResponse contains the response from method ContentTypeClient.CreateOrUpdate. +type ContentTypeClientCreateOrUpdateResponse struct { + // Content type contract details. + ContentTypeContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ContentTypeClientDeleteResponse contains the response from method ContentTypeClient.Delete. +type ContentTypeClientDeleteResponse struct { + // placeholder for future response values +} + +// ContentTypeClientGetResponse contains the response from method ContentTypeClient.Get. +type ContentTypeClientGetResponse struct { + // Content type contract details. + ContentTypeContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ContentTypeClientListByServiceResponse contains the response from method ContentTypeClient.NewListByServicePager. +type ContentTypeClientListByServiceResponse struct { + // Paged list of content types. + ContentTypeCollection +} + +// DelegationSettingsClientCreateOrUpdateResponse contains the response from method DelegationSettingsClient.CreateOrUpdate. +type DelegationSettingsClientCreateOrUpdateResponse struct { + // Delegation settings for a developer portal. + PortalDelegationSettings +} + +// DelegationSettingsClientGetEntityTagResponse contains the response from method DelegationSettingsClient.GetEntityTag. +type DelegationSettingsClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// DelegationSettingsClientGetResponse contains the response from method DelegationSettingsClient.Get. +type DelegationSettingsClientGetResponse struct { + // Delegation settings for a developer portal. + PortalDelegationSettings + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// DelegationSettingsClientListSecretsResponse contains the response from method DelegationSettingsClient.ListSecrets. +type DelegationSettingsClientListSecretsResponse struct { + // Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + PortalSettingValidationKeyContract +} + +// DelegationSettingsClientUpdateResponse contains the response from method DelegationSettingsClient.Update. +type DelegationSettingsClientUpdateResponse struct { + // placeholder for future response values +} + +// DeletedServicesClientGetByNameResponse contains the response from method DeletedServicesClient.GetByName. +type DeletedServicesClientGetByNameResponse struct { + // Deleted API Management Service information. + DeletedServiceContract +} + +// DeletedServicesClientListBySubscriptionResponse contains the response from method DeletedServicesClient.NewListBySubscriptionPager. +type DeletedServicesClientListBySubscriptionResponse struct { + // Paged deleted API Management Services List Representation. + DeletedServicesCollection +} + +// DeletedServicesClientPurgeResponse contains the response from method DeletedServicesClient.BeginPurge. +type DeletedServicesClientPurgeResponse struct { + // Deleted API Management Service information. + DeletedServiceContract +} + +// DiagnosticClientCreateOrUpdateResponse contains the response from method DiagnosticClient.CreateOrUpdate. +type DiagnosticClientCreateOrUpdateResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// DiagnosticClientDeleteResponse contains the response from method DiagnosticClient.Delete. +type DiagnosticClientDeleteResponse struct { + // placeholder for future response values +} + +// DiagnosticClientGetEntityTagResponse contains the response from method DiagnosticClient.GetEntityTag. +type DiagnosticClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// DiagnosticClientGetResponse contains the response from method DiagnosticClient.Get. +type DiagnosticClientGetResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// DiagnosticClientListByServiceResponse contains the response from method DiagnosticClient.NewListByServicePager. +type DiagnosticClientListByServiceResponse struct { + // Paged Diagnostic list representation. + DiagnosticCollection +} + +// DiagnosticClientUpdateResponse contains the response from method DiagnosticClient.Update. +type DiagnosticClientUpdateResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// DocumentationClientCreateOrUpdateResponse contains the response from method DocumentationClient.CreateOrUpdate. +type DocumentationClientCreateOrUpdateResponse struct { + // Markdown documentation details. + DocumentationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// DocumentationClientDeleteResponse contains the response from method DocumentationClient.Delete. +type DocumentationClientDeleteResponse struct { + // placeholder for future response values +} + +// DocumentationClientGetEntityTagResponse contains the response from method DocumentationClient.GetEntityTag. +type DocumentationClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// DocumentationClientGetResponse contains the response from method DocumentationClient.Get. +type DocumentationClientGetResponse struct { + // Markdown documentation details. + DocumentationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// DocumentationClientListByServiceResponse contains the response from method DocumentationClient.NewListByServicePager. +type DocumentationClientListByServiceResponse struct { + // Paged Documentation list representation. + DocumentationCollection +} + +// DocumentationClientUpdateResponse contains the response from method DocumentationClient.Update. +type DocumentationClientUpdateResponse struct { + // Markdown documentation details. + DocumentationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// EmailTemplateClientCreateOrUpdateResponse contains the response from method EmailTemplateClient.CreateOrUpdate. +type EmailTemplateClientCreateOrUpdateResponse struct { + // Email Template details. + EmailTemplateContract +} + +// EmailTemplateClientDeleteResponse contains the response from method EmailTemplateClient.Delete. +type EmailTemplateClientDeleteResponse struct { + // placeholder for future response values +} + +// EmailTemplateClientGetEntityTagResponse contains the response from method EmailTemplateClient.GetEntityTag. +type EmailTemplateClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// EmailTemplateClientGetResponse contains the response from method EmailTemplateClient.Get. +type EmailTemplateClientGetResponse struct { + // Email Template details. + EmailTemplateContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// EmailTemplateClientListByServiceResponse contains the response from method EmailTemplateClient.NewListByServicePager. +type EmailTemplateClientListByServiceResponse struct { + // Paged email template list representation. + EmailTemplateCollection +} + +// EmailTemplateClientUpdateResponse contains the response from method EmailTemplateClient.Update. +type EmailTemplateClientUpdateResponse struct { + // Email Template details. + EmailTemplateContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GatewayAPIClientCreateOrUpdateResponse contains the response from method GatewayAPIClient.CreateOrUpdate. +type GatewayAPIClientCreateOrUpdateResponse struct { + // API details. + APIContract +} + +// GatewayAPIClientDeleteResponse contains the response from method GatewayAPIClient.Delete. +type GatewayAPIClientDeleteResponse struct { + // placeholder for future response values +} + +// GatewayAPIClientGetEntityTagResponse contains the response from method GatewayAPIClient.GetEntityTag. +type GatewayAPIClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// GatewayAPIClientListByServiceResponse contains the response from method GatewayAPIClient.NewListByServicePager. +type GatewayAPIClientListByServiceResponse struct { + // Paged API list representation. + APICollection +} + +// GatewayCertificateAuthorityClientCreateOrUpdateResponse contains the response from method GatewayCertificateAuthorityClient.CreateOrUpdate. +type GatewayCertificateAuthorityClientCreateOrUpdateResponse struct { + // Gateway certificate authority details. + GatewayCertificateAuthorityContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GatewayCertificateAuthorityClientDeleteResponse contains the response from method GatewayCertificateAuthorityClient.Delete. +type GatewayCertificateAuthorityClientDeleteResponse struct { + // placeholder for future response values +} + +// GatewayCertificateAuthorityClientGetEntityTagResponse contains the response from method GatewayCertificateAuthorityClient.GetEntityTag. +type GatewayCertificateAuthorityClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// GatewayCertificateAuthorityClientGetResponse contains the response from method GatewayCertificateAuthorityClient.Get. +type GatewayCertificateAuthorityClientGetResponse struct { + // Gateway certificate authority details. + GatewayCertificateAuthorityContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GatewayCertificateAuthorityClientListByServiceResponse contains the response from method GatewayCertificateAuthorityClient.NewListByServicePager. +type GatewayCertificateAuthorityClientListByServiceResponse struct { + // Paged Gateway certificate authority list representation. + GatewayCertificateAuthorityCollection +} + +// GatewayClientCreateOrUpdateResponse contains the response from method GatewayClient.CreateOrUpdate. +type GatewayClientCreateOrUpdateResponse struct { + // Gateway details. + GatewayContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GatewayClientDeleteResponse contains the response from method GatewayClient.Delete. +type GatewayClientDeleteResponse struct { + // placeholder for future response values +} + +// GatewayClientGenerateTokenResponse contains the response from method GatewayClient.GenerateToken. +type GatewayClientGenerateTokenResponse struct { + // Gateway access token. + GatewayTokenContract +} + +// GatewayClientGetEntityTagResponse contains the response from method GatewayClient.GetEntityTag. +type GatewayClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// GatewayClientGetResponse contains the response from method GatewayClient.Get. +type GatewayClientGetResponse struct { + // Gateway details. + GatewayContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GatewayClientInvalidateDebugCredentialsResponse contains the response from method GatewayClient.InvalidateDebugCredentials. +type GatewayClientInvalidateDebugCredentialsResponse struct { + // placeholder for future response values +} + +// GatewayClientListByServiceResponse contains the response from method GatewayClient.NewListByServicePager. +type GatewayClientListByServiceResponse struct { + // Paged Gateway list representation. + GatewayCollection +} + +// GatewayClientListDebugCredentialsResponse contains the response from method GatewayClient.ListDebugCredentials. +type GatewayClientListDebugCredentialsResponse struct { + // Gateway debug credentials. + GatewayDebugCredentialsContract +} + +// GatewayClientListKeysResponse contains the response from method GatewayClient.ListKeys. +type GatewayClientListKeysResponse struct { + // Gateway authentication keys. + GatewayKeysContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GatewayClientListTraceResponse contains the response from method GatewayClient.ListTrace. +type GatewayClientListTraceResponse struct { + // Trace collected in gateway. + Value map[string]any +} + +// GatewayClientRegenerateKeyResponse contains the response from method GatewayClient.RegenerateKey. +type GatewayClientRegenerateKeyResponse struct { + // placeholder for future response values +} + +// GatewayClientUpdateResponse contains the response from method GatewayClient.Update. +type GatewayClientUpdateResponse struct { + // Gateway details. + GatewayContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GatewayHostnameConfigurationClientCreateOrUpdateResponse contains the response from method GatewayHostnameConfigurationClient.CreateOrUpdate. +type GatewayHostnameConfigurationClientCreateOrUpdateResponse struct { + // Gateway hostname configuration details. + GatewayHostnameConfigurationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GatewayHostnameConfigurationClientDeleteResponse contains the response from method GatewayHostnameConfigurationClient.Delete. +type GatewayHostnameConfigurationClientDeleteResponse struct { + // placeholder for future response values +} + +// GatewayHostnameConfigurationClientGetEntityTagResponse contains the response from method GatewayHostnameConfigurationClient.GetEntityTag. +type GatewayHostnameConfigurationClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// GatewayHostnameConfigurationClientGetResponse contains the response from method GatewayHostnameConfigurationClient.Get. +type GatewayHostnameConfigurationClientGetResponse struct { + // Gateway hostname configuration details. + GatewayHostnameConfigurationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GatewayHostnameConfigurationClientListByServiceResponse contains the response from method GatewayHostnameConfigurationClient.NewListByServicePager. +type GatewayHostnameConfigurationClientListByServiceResponse struct { + // Paged Gateway hostname configuration list representation. + GatewayHostnameConfigurationCollection +} + +// GatewaySKUsClientListAvailableSKUsResponse contains the response from method GatewaySKUsClient.NewListAvailableSKUsPager. +type GatewaySKUsClientListAvailableSKUsResponse struct { + // The API Management gateway SKUs operation response. + GatewayResourceSKUResults +} + +// GlobalSchemaClientCreateOrUpdateResponse contains the response from method GlobalSchemaClient.BeginCreateOrUpdate. +type GlobalSchemaClientCreateOrUpdateResponse struct { + // Global Schema Contract details. + GlobalSchemaContract +} + +// GlobalSchemaClientDeleteResponse contains the response from method GlobalSchemaClient.Delete. +type GlobalSchemaClientDeleteResponse struct { + // placeholder for future response values +} + +// GlobalSchemaClientGetEntityTagResponse contains the response from method GlobalSchemaClient.GetEntityTag. +type GlobalSchemaClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// GlobalSchemaClientGetResponse contains the response from method GlobalSchemaClient.Get. +type GlobalSchemaClientGetResponse struct { + // Global Schema Contract details. + GlobalSchemaContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GlobalSchemaClientListByServiceResponse contains the response from method GlobalSchemaClient.NewListByServicePager. +type GlobalSchemaClientListByServiceResponse struct { + // The response of the list schema operation. + GlobalSchemaCollection +} + +// GraphQLAPIResolverClientCreateOrUpdateResponse contains the response from method GraphQLAPIResolverClient.CreateOrUpdate. +type GraphQLAPIResolverClientCreateOrUpdateResponse struct { + // GraphQL API Resolver details. + ResolverContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GraphQLAPIResolverClientDeleteResponse contains the response from method GraphQLAPIResolverClient.Delete. +type GraphQLAPIResolverClientDeleteResponse struct { + // placeholder for future response values +} + +// GraphQLAPIResolverClientGetEntityTagResponse contains the response from method GraphQLAPIResolverClient.GetEntityTag. +type GraphQLAPIResolverClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// GraphQLAPIResolverClientGetResponse contains the response from method GraphQLAPIResolverClient.Get. +type GraphQLAPIResolverClientGetResponse struct { + // GraphQL API Resolver details. + ResolverContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GraphQLAPIResolverClientListByAPIResponse contains the response from method GraphQLAPIResolverClient.NewListByAPIPager. +type GraphQLAPIResolverClientListByAPIResponse struct { + // Paged Resolver list representation. + ResolverCollection +} + +// GraphQLAPIResolverClientUpdateResponse contains the response from method GraphQLAPIResolverClient.Update. +type GraphQLAPIResolverClientUpdateResponse struct { + // GraphQL API Resolver details. + ResolverContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GraphQLAPIResolverPolicyClientCreateOrUpdateResponse contains the response from method GraphQLAPIResolverPolicyClient.CreateOrUpdate. +type GraphQLAPIResolverPolicyClientCreateOrUpdateResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GraphQLAPIResolverPolicyClientDeleteResponse contains the response from method GraphQLAPIResolverPolicyClient.Delete. +type GraphQLAPIResolverPolicyClientDeleteResponse struct { + // placeholder for future response values +} + +// GraphQLAPIResolverPolicyClientGetEntityTagResponse contains the response from method GraphQLAPIResolverPolicyClient.GetEntityTag. +type GraphQLAPIResolverPolicyClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// GraphQLAPIResolverPolicyClientGetResponse contains the response from method GraphQLAPIResolverPolicyClient.Get. +type GraphQLAPIResolverPolicyClientGetResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GraphQLAPIResolverPolicyClientListByResolverResponse contains the response from method GraphQLAPIResolverPolicyClient.NewListByResolverPager. +type GraphQLAPIResolverPolicyClientListByResolverResponse struct { + // The response of the list policy operation. + PolicyCollection +} + +// GroupClientCreateOrUpdateResponse contains the response from method GroupClient.CreateOrUpdate. +type GroupClientCreateOrUpdateResponse struct { + // Contract details. + GroupContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GroupClientDeleteResponse contains the response from method GroupClient.Delete. +type GroupClientDeleteResponse struct { + // placeholder for future response values +} + +// GroupClientGetEntityTagResponse contains the response from method GroupClient.GetEntityTag. +type GroupClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// GroupClientGetResponse contains the response from method GroupClient.Get. +type GroupClientGetResponse struct { + // Contract details. + GroupContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GroupClientListByServiceResponse contains the response from method GroupClient.NewListByServicePager. +type GroupClientListByServiceResponse struct { + // Paged Group list representation. + GroupCollection +} + +// GroupClientUpdateResponse contains the response from method GroupClient.Update. +type GroupClientUpdateResponse struct { + // Contract details. + GroupContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GroupUserClientCheckEntityExistsResponse contains the response from method GroupUserClient.CheckEntityExists. +type GroupUserClientCheckEntityExistsResponse struct { + // Success indicates if the operation succeeded or failed. + Success bool +} + +// GroupUserClientCreateResponse contains the response from method GroupUserClient.Create. +type GroupUserClientCreateResponse struct { + // User details. + UserContract +} + +// GroupUserClientDeleteResponse contains the response from method GroupUserClient.Delete. +type GroupUserClientDeleteResponse struct { + // placeholder for future response values +} + +// GroupUserClientListResponse contains the response from method GroupUserClient.NewListPager. +type GroupUserClientListResponse struct { + // Paged Users list representation. + UserCollection +} + +// IdentityProviderClientCreateOrUpdateResponse contains the response from method IdentityProviderClient.CreateOrUpdate. +type IdentityProviderClientCreateOrUpdateResponse struct { + // Identity Provider details. + IdentityProviderContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// IdentityProviderClientDeleteResponse contains the response from method IdentityProviderClient.Delete. +type IdentityProviderClientDeleteResponse struct { + // placeholder for future response values +} + +// IdentityProviderClientGetEntityTagResponse contains the response from method IdentityProviderClient.GetEntityTag. +type IdentityProviderClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// IdentityProviderClientGetResponse contains the response from method IdentityProviderClient.Get. +type IdentityProviderClientGetResponse struct { + // Identity Provider details. + IdentityProviderContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// IdentityProviderClientListByServiceResponse contains the response from method IdentityProviderClient.NewListByServicePager. +type IdentityProviderClientListByServiceResponse struct { + // List of all the Identity Providers configured on the service instance. + IdentityProviderList +} + +// IdentityProviderClientListSecretsResponse contains the response from method IdentityProviderClient.ListSecrets. +type IdentityProviderClientListSecretsResponse struct { + // Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + ClientSecretContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// IdentityProviderClientUpdateResponse contains the response from method IdentityProviderClient.Update. +type IdentityProviderClientUpdateResponse struct { + // Identity Provider details. + IdentityProviderContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// IssueClientGetResponse contains the response from method IssueClient.Get. +type IssueClientGetResponse struct { + // Issue Contract details. + IssueContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// IssueClientListByServiceResponse contains the response from method IssueClient.NewListByServicePager. +type IssueClientListByServiceResponse struct { + // Paged Issue list representation. + IssueCollection +} + +// LoggerClientCreateOrUpdateResponse contains the response from method LoggerClient.CreateOrUpdate. +type LoggerClientCreateOrUpdateResponse struct { + // Logger details. + LoggerContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// LoggerClientDeleteResponse contains the response from method LoggerClient.Delete. +type LoggerClientDeleteResponse struct { + // placeholder for future response values +} + +// LoggerClientGetEntityTagResponse contains the response from method LoggerClient.GetEntityTag. +type LoggerClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// LoggerClientGetResponse contains the response from method LoggerClient.Get. +type LoggerClientGetResponse struct { + // Logger details. + LoggerContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// LoggerClientListByServiceResponse contains the response from method LoggerClient.NewListByServicePager. +type LoggerClientListByServiceResponse struct { + // Paged Logger list representation. + LoggerCollection +} + +// LoggerClientUpdateResponse contains the response from method LoggerClient.Update. +type LoggerClientUpdateResponse struct { + // Logger details. + LoggerContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// NamedValueClientCreateOrUpdateResponse contains the response from method NamedValueClient.BeginCreateOrUpdate. +type NamedValueClientCreateOrUpdateResponse struct { + // NamedValue details. + NamedValueContract +} + +// NamedValueClientDeleteResponse contains the response from method NamedValueClient.Delete. +type NamedValueClientDeleteResponse struct { + // placeholder for future response values +} + +// NamedValueClientGetEntityTagResponse contains the response from method NamedValueClient.GetEntityTag. +type NamedValueClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// NamedValueClientGetResponse contains the response from method NamedValueClient.Get. +type NamedValueClientGetResponse struct { + // NamedValue details. + NamedValueContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// NamedValueClientListByServiceResponse contains the response from method NamedValueClient.NewListByServicePager. +type NamedValueClientListByServiceResponse struct { + // Paged NamedValue list representation. + NamedValueCollection +} + +// NamedValueClientListValueResponse contains the response from method NamedValueClient.ListValue. +type NamedValueClientListValueResponse struct { + // Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + NamedValueSecretContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// NamedValueClientRefreshSecretResponse contains the response from method NamedValueClient.BeginRefreshSecret. +type NamedValueClientRefreshSecretResponse struct { + // NamedValue details. + NamedValueContract +} + +// NamedValueClientUpdateResponse contains the response from method NamedValueClient.BeginUpdate. +type NamedValueClientUpdateResponse struct { + // NamedValue details. + NamedValueContract +} + +// NetworkStatusClientListByLocationResponse contains the response from method NetworkStatusClient.ListByLocation. +type NetworkStatusClientListByLocationResponse struct { + // Network Status details. + NetworkStatusContract +} + +// NetworkStatusClientListByServiceResponse contains the response from method NetworkStatusClient.ListByService. +type NetworkStatusClientListByServiceResponse struct { + // List of Network Status values. + NetworkStatusContractByLocationArray []*NetworkStatusContractByLocation +} + +// NotificationClientCreateOrUpdateResponse contains the response from method NotificationClient.CreateOrUpdate. +type NotificationClientCreateOrUpdateResponse struct { + // Notification details. + NotificationContract +} + +// NotificationClientGetResponse contains the response from method NotificationClient.Get. +type NotificationClientGetResponse struct { + // Notification details. + NotificationContract +} + +// NotificationClientListByServiceResponse contains the response from method NotificationClient.NewListByServicePager. +type NotificationClientListByServiceResponse struct { + // Paged Notification list representation. + NotificationCollection +} + +// NotificationRecipientEmailClientCheckEntityExistsResponse contains the response from method NotificationRecipientEmailClient.CheckEntityExists. +type NotificationRecipientEmailClientCheckEntityExistsResponse struct { + // Success indicates if the operation succeeded or failed. + Success bool +} + +// NotificationRecipientEmailClientCreateOrUpdateResponse contains the response from method NotificationRecipientEmailClient.CreateOrUpdate. +type NotificationRecipientEmailClientCreateOrUpdateResponse struct { + // Recipient Email details. + RecipientEmailContract +} + +// NotificationRecipientEmailClientDeleteResponse contains the response from method NotificationRecipientEmailClient.Delete. +type NotificationRecipientEmailClientDeleteResponse struct { + // placeholder for future response values +} + +// NotificationRecipientEmailClientListByNotificationResponse contains the response from method NotificationRecipientEmailClient.ListByNotification. +type NotificationRecipientEmailClientListByNotificationResponse struct { + // Paged Recipient User list representation. + RecipientEmailCollection +} + +// NotificationRecipientUserClientCheckEntityExistsResponse contains the response from method NotificationRecipientUserClient.CheckEntityExists. +type NotificationRecipientUserClientCheckEntityExistsResponse struct { + // Success indicates if the operation succeeded or failed. + Success bool +} + +// NotificationRecipientUserClientCreateOrUpdateResponse contains the response from method NotificationRecipientUserClient.CreateOrUpdate. +type NotificationRecipientUserClientCreateOrUpdateResponse struct { + // Recipient User details. + RecipientUserContract +} + +// NotificationRecipientUserClientDeleteResponse contains the response from method NotificationRecipientUserClient.Delete. +type NotificationRecipientUserClientDeleteResponse struct { + // placeholder for future response values +} + +// NotificationRecipientUserClientListByNotificationResponse contains the response from method NotificationRecipientUserClient.ListByNotification. +type NotificationRecipientUserClientListByNotificationResponse struct { + // Paged Recipient User list representation. + RecipientUserCollection +} + +// OpenIDConnectProviderClientCreateOrUpdateResponse contains the response from method OpenIDConnectProviderClient.CreateOrUpdate. +type OpenIDConnectProviderClientCreateOrUpdateResponse struct { + // OpenId Connect Provider details. + OpenidConnectProviderContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// OpenIDConnectProviderClientDeleteResponse contains the response from method OpenIDConnectProviderClient.Delete. +type OpenIDConnectProviderClientDeleteResponse struct { + // placeholder for future response values +} + +// OpenIDConnectProviderClientGetEntityTagResponse contains the response from method OpenIDConnectProviderClient.GetEntityTag. +type OpenIDConnectProviderClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// OpenIDConnectProviderClientGetResponse contains the response from method OpenIDConnectProviderClient.Get. +type OpenIDConnectProviderClientGetResponse struct { + // OpenId Connect Provider details. + OpenidConnectProviderContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// OpenIDConnectProviderClientListByServiceResponse contains the response from method OpenIDConnectProviderClient.NewListByServicePager. +type OpenIDConnectProviderClientListByServiceResponse struct { + // Paged OpenIdProviders list representation. + OpenIDConnectProviderCollection +} + +// OpenIDConnectProviderClientListSecretsResponse contains the response from method OpenIDConnectProviderClient.ListSecrets. +type OpenIDConnectProviderClientListSecretsResponse struct { + // Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + ClientSecretContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// OpenIDConnectProviderClientUpdateResponse contains the response from method OpenIDConnectProviderClient.Update. +type OpenIDConnectProviderClientUpdateResponse struct { + // OpenId Connect Provider details. + OpenidConnectProviderContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// OperationClientListByTagsResponse contains the response from method OperationClient.NewListByTagsPager. +type OperationClientListByTagsResponse struct { + // Paged Tag list representation. + TagResourceCollection +} + +// OperationStatusClientGetResponse contains the response from method OperationStatusClient.Get. +type OperationStatusClientGetResponse struct { + // The current status of an async operation. + OperationStatusResult +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next + // set of results. + OperationListResult +} + +// OperationsResultsClientGetResponse contains the response from method OperationsResultsClient.Get. +type OperationsResultsClientGetResponse struct { + // Location contains the information returned from the Location header response. + Location *string +} + +// OutboundNetworkDependenciesEndpointsClientListByServiceResponse contains the response from method OutboundNetworkDependenciesEndpointsClient.ListByService. +type OutboundNetworkDependenciesEndpointsClientListByServiceResponse struct { + // Collection of Outbound Environment Endpoints + OutboundEnvironmentEndpointList +} + +// PolicyClientCreateOrUpdateResponse contains the response from method PolicyClient.CreateOrUpdate. +type PolicyClientCreateOrUpdateResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// PolicyClientDeleteResponse contains the response from method PolicyClient.Delete. +type PolicyClientDeleteResponse struct { + // placeholder for future response values +} + +// PolicyClientGetEntityTagResponse contains the response from method PolicyClient.GetEntityTag. +type PolicyClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// PolicyClientGetResponse contains the response from method PolicyClient.Get. +type PolicyClientGetResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// PolicyClientListByServiceResponse contains the response from method PolicyClient.NewListByServicePager. +type PolicyClientListByServiceResponse struct { + // The response of the list policy operation. + PolicyCollection +} + +// PolicyDescriptionClientListByServiceResponse contains the response from method PolicyDescriptionClient.ListByService. +type PolicyDescriptionClientListByServiceResponse struct { + // Descriptions of API Management policies. + PolicyDescriptionCollection +} + +// PolicyFragmentClientCreateOrUpdateResponse contains the response from method PolicyFragmentClient.BeginCreateOrUpdate. +type PolicyFragmentClientCreateOrUpdateResponse struct { + // Policy fragment contract details. + PolicyFragmentContract +} + +// PolicyFragmentClientDeleteResponse contains the response from method PolicyFragmentClient.Delete. +type PolicyFragmentClientDeleteResponse struct { + // placeholder for future response values +} + +// PolicyFragmentClientGetEntityTagResponse contains the response from method PolicyFragmentClient.GetEntityTag. +type PolicyFragmentClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// PolicyFragmentClientGetResponse contains the response from method PolicyFragmentClient.Get. +type PolicyFragmentClientGetResponse struct { + // Policy fragment contract details. + PolicyFragmentContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// PolicyFragmentClientListByServiceResponse contains the response from method PolicyFragmentClient.NewListByServicePager. +type PolicyFragmentClientListByServiceResponse struct { + // The response of the get policy fragments operation. + PolicyFragmentCollection +} + +// PolicyFragmentClientListReferencesResponse contains the response from method PolicyFragmentClient.ListReferences. +type PolicyFragmentClientListReferencesResponse struct { + // A collection of resources. + ResourceCollection +} + +// PolicyRestrictionClientCreateOrUpdateResponse contains the response from method PolicyRestrictionClient.CreateOrUpdate. +type PolicyRestrictionClientCreateOrUpdateResponse struct { + // Policy restriction contract details. + PolicyRestrictionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// PolicyRestrictionClientDeleteResponse contains the response from method PolicyRestrictionClient.Delete. +type PolicyRestrictionClientDeleteResponse struct { + // placeholder for future response values +} + +// PolicyRestrictionClientGetEntityTagResponse contains the response from method PolicyRestrictionClient.GetEntityTag. +type PolicyRestrictionClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// PolicyRestrictionClientGetResponse contains the response from method PolicyRestrictionClient.Get. +type PolicyRestrictionClientGetResponse struct { + // Policy restriction contract details. + PolicyRestrictionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// PolicyRestrictionClientListByServiceResponse contains the response from method PolicyRestrictionClient.NewListByServicePager. +type PolicyRestrictionClientListByServiceResponse struct { + // The response of the get policy restrictions operation. + PolicyRestrictionCollection +} + +// PolicyRestrictionClientUpdateResponse contains the response from method PolicyRestrictionClient.Update. +type PolicyRestrictionClientUpdateResponse struct { + // Policy restriction contract details. + PolicyRestrictionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// PolicyRestrictionValidationsClientByServiceResponse contains the response from method PolicyRestrictionValidationsClient.BeginByService. +type PolicyRestrictionValidationsClientByServiceResponse struct { + // Long Running Git Operation Results. + OperationResultContract +} + +// PortalConfigClientCreateOrUpdateResponse contains the response from method PortalConfigClient.CreateOrUpdate. +type PortalConfigClientCreateOrUpdateResponse struct { + // The developer portal configuration contract. + PortalConfigContract +} + +// PortalConfigClientGetEntityTagResponse contains the response from method PortalConfigClient.GetEntityTag. +type PortalConfigClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// PortalConfigClientGetResponse contains the response from method PortalConfigClient.Get. +type PortalConfigClientGetResponse struct { + // The developer portal configuration contract. + PortalConfigContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// PortalConfigClientListByServiceResponse contains the response from method PortalConfigClient.NewListByServicePager. +type PortalConfigClientListByServiceResponse struct { + // The collection of the developer portal configurations. + PortalConfigCollection +} + +// PortalConfigClientUpdateResponse contains the response from method PortalConfigClient.Update. +type PortalConfigClientUpdateResponse struct { + // The developer portal configuration contract. + PortalConfigContract +} + +// PortalRevisionClientCreateOrUpdateResponse contains the response from method PortalRevisionClient.BeginCreateOrUpdate. +type PortalRevisionClientCreateOrUpdateResponse struct { + // Portal Revision's contract details. + PortalRevisionContract +} + +// PortalRevisionClientGetEntityTagResponse contains the response from method PortalRevisionClient.GetEntityTag. +type PortalRevisionClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// PortalRevisionClientGetResponse contains the response from method PortalRevisionClient.Get. +type PortalRevisionClientGetResponse struct { + // Portal Revision's contract details. + PortalRevisionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// PortalRevisionClientListByServiceResponse contains the response from method PortalRevisionClient.NewListByServicePager. +type PortalRevisionClientListByServiceResponse struct { + // Paged list of portal revisions. + PortalRevisionCollection +} + +// PortalRevisionClientUpdateResponse contains the response from method PortalRevisionClient.BeginUpdate. +type PortalRevisionClientUpdateResponse struct { + // Portal Revision's contract details. + PortalRevisionContract +} + +// PortalSettingsClientListByServiceResponse contains the response from method PortalSettingsClient.ListByService. +type PortalSettingsClientListByServiceResponse struct { + // Descriptions of API Management policies. + PortalSettingsCollection +} + +// PrivateEndpointConnectionClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionClient.BeginCreateOrUpdate. +type PrivateEndpointConnectionClientCreateOrUpdateResponse struct { + // The Private Endpoint Connection resource. + PrivateEndpointConnection +} + +// PrivateEndpointConnectionClientDeleteResponse contains the response from method PrivateEndpointConnectionClient.BeginDelete. +type PrivateEndpointConnectionClientDeleteResponse struct { + // placeholder for future response values +} + +// PrivateEndpointConnectionClientGetByNameResponse contains the response from method PrivateEndpointConnectionClient.GetByName. +type PrivateEndpointConnectionClientGetByNameResponse struct { + // The Private Endpoint Connection resource. + PrivateEndpointConnection +} + +// PrivateEndpointConnectionClientGetPrivateLinkResourceResponse contains the response from method PrivateEndpointConnectionClient.GetPrivateLinkResource. +type PrivateEndpointConnectionClientGetPrivateLinkResourceResponse struct { + // A private link resource + PrivateLinkResource +} + +// PrivateEndpointConnectionClientListByServiceResponse contains the response from method PrivateEndpointConnectionClient.NewListByServicePager. +type PrivateEndpointConnectionClientListByServiceResponse struct { + // List of private endpoint connection associated with the specified storage account + PrivateEndpointConnectionListResult +} + +// PrivateEndpointConnectionClientListPrivateLinkResourcesResponse contains the response from method PrivateEndpointConnectionClient.ListPrivateLinkResources. +type PrivateEndpointConnectionClientListPrivateLinkResourcesResponse struct { + // A list of private link resources + PrivateLinkResourceListResult +} + +// ProductAPIClientCheckEntityExistsResponse contains the response from method ProductAPIClient.CheckEntityExists. +type ProductAPIClientCheckEntityExistsResponse struct { + // Success indicates if the operation succeeded or failed. + Success bool +} + +// ProductAPIClientCreateOrUpdateResponse contains the response from method ProductAPIClient.CreateOrUpdate. +type ProductAPIClientCreateOrUpdateResponse struct { + // API details. + APIContract +} + +// ProductAPIClientDeleteResponse contains the response from method ProductAPIClient.Delete. +type ProductAPIClientDeleteResponse struct { + // placeholder for future response values +} + +// ProductAPIClientListByProductResponse contains the response from method ProductAPIClient.NewListByProductPager. +type ProductAPIClientListByProductResponse struct { + // Paged API list representation. + APICollection +} + +// ProductAPILinkClientCreateOrUpdateResponse contains the response from method ProductAPILinkClient.CreateOrUpdate. +type ProductAPILinkClientCreateOrUpdateResponse struct { + // Product-API link details. + ProductAPILinkContract +} + +// ProductAPILinkClientDeleteResponse contains the response from method ProductAPILinkClient.Delete. +type ProductAPILinkClientDeleteResponse struct { + // placeholder for future response values +} + +// ProductAPILinkClientGetResponse contains the response from method ProductAPILinkClient.Get. +type ProductAPILinkClientGetResponse struct { + // Product-API link details. + ProductAPILinkContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ProductAPILinkClientListByProductResponse contains the response from method ProductAPILinkClient.NewListByProductPager. +type ProductAPILinkClientListByProductResponse struct { + // Paged Product-API link list representation. + ProductAPILinkCollection +} + +// ProductClientCreateOrUpdateResponse contains the response from method ProductClient.CreateOrUpdate. +type ProductClientCreateOrUpdateResponse struct { + // Product details. + ProductContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ProductClientDeleteResponse contains the response from method ProductClient.Delete. +type ProductClientDeleteResponse struct { + // placeholder for future response values +} + +// ProductClientGetEntityTagResponse contains the response from method ProductClient.GetEntityTag. +type ProductClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// ProductClientGetResponse contains the response from method ProductClient.Get. +type ProductClientGetResponse struct { + // Product details. + ProductContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ProductClientListByServiceResponse contains the response from method ProductClient.NewListByServicePager. +type ProductClientListByServiceResponse struct { + // Paged Products list representation. + ProductCollection +} + +// ProductClientListByTagsResponse contains the response from method ProductClient.NewListByTagsPager. +type ProductClientListByTagsResponse struct { + // Paged Tag list representation. + TagResourceCollection +} + +// ProductClientUpdateResponse contains the response from method ProductClient.Update. +type ProductClientUpdateResponse struct { + // Product details. + ProductContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ProductGroupClientCheckEntityExistsResponse contains the response from method ProductGroupClient.CheckEntityExists. +type ProductGroupClientCheckEntityExistsResponse struct { + // Success indicates if the operation succeeded or failed. + Success bool +} + +// ProductGroupClientCreateOrUpdateResponse contains the response from method ProductGroupClient.CreateOrUpdate. +type ProductGroupClientCreateOrUpdateResponse struct { + // Contract details. + GroupContract +} + +// ProductGroupClientDeleteResponse contains the response from method ProductGroupClient.Delete. +type ProductGroupClientDeleteResponse struct { + // placeholder for future response values +} + +// ProductGroupClientListByProductResponse contains the response from method ProductGroupClient.NewListByProductPager. +type ProductGroupClientListByProductResponse struct { + // Paged Group list representation. + GroupCollection +} + +// ProductGroupLinkClientCreateOrUpdateResponse contains the response from method ProductGroupLinkClient.CreateOrUpdate. +type ProductGroupLinkClientCreateOrUpdateResponse struct { + // Product-group link details. + ProductGroupLinkContract +} + +// ProductGroupLinkClientDeleteResponse contains the response from method ProductGroupLinkClient.Delete. +type ProductGroupLinkClientDeleteResponse struct { + // placeholder for future response values +} + +// ProductGroupLinkClientGetResponse contains the response from method ProductGroupLinkClient.Get. +type ProductGroupLinkClientGetResponse struct { + // Product-group link details. + ProductGroupLinkContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ProductGroupLinkClientListByProductResponse contains the response from method ProductGroupLinkClient.NewListByProductPager. +type ProductGroupLinkClientListByProductResponse struct { + // Paged Product-group link list representation. + ProductGroupLinkCollection +} + +// ProductPolicyClientCreateOrUpdateResponse contains the response from method ProductPolicyClient.CreateOrUpdate. +type ProductPolicyClientCreateOrUpdateResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ProductPolicyClientDeleteResponse contains the response from method ProductPolicyClient.Delete. +type ProductPolicyClientDeleteResponse struct { + // placeholder for future response values +} + +// ProductPolicyClientGetEntityTagResponse contains the response from method ProductPolicyClient.GetEntityTag. +type ProductPolicyClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// ProductPolicyClientGetResponse contains the response from method ProductPolicyClient.Get. +type ProductPolicyClientGetResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ProductPolicyClientListByProductResponse contains the response from method ProductPolicyClient.NewListByProductPager. +type ProductPolicyClientListByProductResponse struct { + // The response of the list policy operation. + PolicyCollection +} + +// ProductSubscriptionsClientListResponse contains the response from method ProductSubscriptionsClient.NewListPager. +type ProductSubscriptionsClientListResponse struct { + // Paged Subscriptions list representation. + SubscriptionCollection +} + +// ProductWikiClientCreateOrUpdateResponse contains the response from method ProductWikiClient.CreateOrUpdate. +type ProductWikiClientCreateOrUpdateResponse struct { + // Wiki properties + WikiContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ProductWikiClientDeleteResponse contains the response from method ProductWikiClient.Delete. +type ProductWikiClientDeleteResponse struct { + // placeholder for future response values +} + +// ProductWikiClientGetEntityTagResponse contains the response from method ProductWikiClient.GetEntityTag. +type ProductWikiClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// ProductWikiClientGetResponse contains the response from method ProductWikiClient.Get. +type ProductWikiClientGetResponse struct { + // Wiki properties + WikiContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ProductWikiClientUpdateResponse contains the response from method ProductWikiClient.Update. +type ProductWikiClientUpdateResponse struct { + // Wiki properties + WikiContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// ProductWikisClientListResponse contains the response from method ProductWikisClient.NewListPager. +type ProductWikisClientListResponse struct { + // Paged Wiki list representation. + WikiCollection + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// QuotaByCounterKeysClientListByServiceResponse contains the response from method QuotaByCounterKeysClient.ListByService. +type QuotaByCounterKeysClientListByServiceResponse struct { + // Paged Quota Counter list representation. + QuotaCounterCollection +} + +// QuotaByCounterKeysClientUpdateResponse contains the response from method QuotaByCounterKeysClient.Update. +type QuotaByCounterKeysClientUpdateResponse struct { + // Paged Quota Counter list representation. + QuotaCounterCollection +} + +// QuotaByPeriodKeysClientGetResponse contains the response from method QuotaByPeriodKeysClient.Get. +type QuotaByPeriodKeysClientGetResponse struct { + // Quota counter details. + QuotaCounterContract +} + +// QuotaByPeriodKeysClientUpdateResponse contains the response from method QuotaByPeriodKeysClient.Update. +type QuotaByPeriodKeysClientUpdateResponse struct { + // Quota counter details. + QuotaCounterContract +} + +// RegionClientListByServiceResponse contains the response from method RegionClient.NewListByServicePager. +type RegionClientListByServiceResponse struct { + // Lists Regions operation response details. + RegionListResult +} + +// ReportsClientListByAPIResponse contains the response from method ReportsClient.NewListByAPIPager. +type ReportsClientListByAPIResponse struct { + // Paged Report records list representation. + ReportCollection +} + +// ReportsClientListByGeoResponse contains the response from method ReportsClient.NewListByGeoPager. +type ReportsClientListByGeoResponse struct { + // Paged Report records list representation. + ReportCollection +} + +// ReportsClientListByOperationResponse contains the response from method ReportsClient.NewListByOperationPager. +type ReportsClientListByOperationResponse struct { + // Paged Report records list representation. + ReportCollection +} + +// ReportsClientListByProductResponse contains the response from method ReportsClient.NewListByProductPager. +type ReportsClientListByProductResponse struct { + // Paged Report records list representation. + ReportCollection +} + +// ReportsClientListByRequestResponse contains the response from method ReportsClient.NewListByRequestPager. +type ReportsClientListByRequestResponse struct { + // Paged Report records list representation. + RequestReportCollection +} + +// ReportsClientListBySubscriptionResponse contains the response from method ReportsClient.NewListBySubscriptionPager. +type ReportsClientListBySubscriptionResponse struct { + // Paged Report records list representation. + ReportCollection +} + +// ReportsClientListByTimeResponse contains the response from method ReportsClient.NewListByTimePager. +type ReportsClientListByTimeResponse struct { + // Paged Report records list representation. + ReportCollection +} + +// ReportsClientListByUserResponse contains the response from method ReportsClient.NewListByUserPager. +type ReportsClientListByUserResponse struct { + // Paged Report records list representation. + ReportCollection +} + +// SKUsClientListResponse contains the response from method SKUsClient.NewListPager. +type SKUsClientListResponse struct { + // The List Resource Skus operation response. + SKUsResult +} + +// ServiceClientApplyNetworkConfigurationUpdatesResponse contains the response from method ServiceClient.BeginApplyNetworkConfigurationUpdates. +type ServiceClientApplyNetworkConfigurationUpdatesResponse struct { + // A single API Management service resource in List or Get response. + ServiceResource +} + +// ServiceClientBackupResponse contains the response from method ServiceClient.BeginBackup. +type ServiceClientBackupResponse struct { + // A single API Management service resource in List or Get response. + ServiceResource +} + +// ServiceClientCheckNameAvailabilityResponse contains the response from method ServiceClient.CheckNameAvailability. +type ServiceClientCheckNameAvailabilityResponse struct { + // Response of the CheckNameAvailability operation. + ServiceNameAvailabilityResult +} + +// ServiceClientCreateOrUpdateResponse contains the response from method ServiceClient.BeginCreateOrUpdate. +type ServiceClientCreateOrUpdateResponse struct { + // A single API Management service resource in List or Get response. + ServiceResource +} + +// ServiceClientDeleteResponse contains the response from method ServiceClient.BeginDelete. +type ServiceClientDeleteResponse struct { + // A single API Management service resource in List or Get response. + ServiceResource +} + +// ServiceClientGetDomainOwnershipIdentifierResponse contains the response from method ServiceClient.GetDomainOwnershipIdentifier. +type ServiceClientGetDomainOwnershipIdentifierResponse struct { + // Response of the GetDomainOwnershipIdentifier operation. + ServiceGetDomainOwnershipIdentifierResult +} + +// ServiceClientGetResponse contains the response from method ServiceClient.Get. +type ServiceClientGetResponse struct { + // A single API Management service resource in List or Get response. + ServiceResource +} + +// ServiceClientGetSsoTokenResponse contains the response from method ServiceClient.GetSsoToken. +type ServiceClientGetSsoTokenResponse struct { + // The response of the GetSsoToken operation. + ServiceGetSsoTokenResult +} + +// ServiceClientListByResourceGroupResponse contains the response from method ServiceClient.NewListByResourceGroupPager. +type ServiceClientListByResourceGroupResponse struct { + // The response of the List API Management services operation. + ServiceListResult +} + +// ServiceClientListResponse contains the response from method ServiceClient.NewListPager. +type ServiceClientListResponse struct { + // The response of the List API Management services operation. + ServiceListResult +} + +// ServiceClientMigrateToStv2Response contains the response from method ServiceClient.BeginMigrateToStv2. +type ServiceClientMigrateToStv2Response struct { + // A single API Management service resource in List or Get response. + ServiceResource +} + +// ServiceClientRestoreResponse contains the response from method ServiceClient.BeginRestore. +type ServiceClientRestoreResponse struct { + // A single API Management service resource in List or Get response. + ServiceResource +} + +// ServiceClientUpdateResponse contains the response from method ServiceClient.BeginUpdate. +type ServiceClientUpdateResponse struct { + // A single API Management service resource in List or Get response. + ServiceResource +} + +// ServiceSKUsClientListAvailableServiceSKUsResponse contains the response from method ServiceSKUsClient.NewListAvailableServiceSKUsPager. +type ServiceSKUsClientListAvailableServiceSKUsResponse struct { + // The API Management service SKUs operation response. + ResourceSKUResults +} + +// SignInSettingsClientCreateOrUpdateResponse contains the response from method SignInSettingsClient.CreateOrUpdate. +type SignInSettingsClientCreateOrUpdateResponse struct { + // Sign-In settings for the Developer Portal. + PortalSigninSettings +} + +// SignInSettingsClientGetEntityTagResponse contains the response from method SignInSettingsClient.GetEntityTag. +type SignInSettingsClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// SignInSettingsClientGetResponse contains the response from method SignInSettingsClient.Get. +type SignInSettingsClientGetResponse struct { + // Sign-In settings for the Developer Portal. + PortalSigninSettings + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// SignInSettingsClientUpdateResponse contains the response from method SignInSettingsClient.Update. +type SignInSettingsClientUpdateResponse struct { + // placeholder for future response values +} + +// SignUpSettingsClientCreateOrUpdateResponse contains the response from method SignUpSettingsClient.CreateOrUpdate. +type SignUpSettingsClientCreateOrUpdateResponse struct { + // Sign-Up settings for a developer portal. + PortalSignupSettings +} + +// SignUpSettingsClientGetEntityTagResponse contains the response from method SignUpSettingsClient.GetEntityTag. +type SignUpSettingsClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// SignUpSettingsClientGetResponse contains the response from method SignUpSettingsClient.Get. +type SignUpSettingsClientGetResponse struct { + // Sign-Up settings for a developer portal. + PortalSignupSettings + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// SignUpSettingsClientUpdateResponse contains the response from method SignUpSettingsClient.Update. +type SignUpSettingsClientUpdateResponse struct { + // placeholder for future response values +} + +// SubscriptionClientCreateOrUpdateResponse contains the response from method SubscriptionClient.CreateOrUpdate. +type SubscriptionClientCreateOrUpdateResponse struct { + // Subscription details. + SubscriptionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// SubscriptionClientDeleteResponse contains the response from method SubscriptionClient.Delete. +type SubscriptionClientDeleteResponse struct { + // placeholder for future response values +} + +// SubscriptionClientGetEntityTagResponse contains the response from method SubscriptionClient.GetEntityTag. +type SubscriptionClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// SubscriptionClientGetResponse contains the response from method SubscriptionClient.Get. +type SubscriptionClientGetResponse struct { + // Subscription details. + SubscriptionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// SubscriptionClientListResponse contains the response from method SubscriptionClient.NewListPager. +type SubscriptionClientListResponse struct { + // Paged Subscriptions list representation. + SubscriptionCollection +} + +// SubscriptionClientListSecretsResponse contains the response from method SubscriptionClient.ListSecrets. +type SubscriptionClientListSecretsResponse struct { + // Subscription keys. + SubscriptionKeysContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// SubscriptionClientRegeneratePrimaryKeyResponse contains the response from method SubscriptionClient.RegeneratePrimaryKey. +type SubscriptionClientRegeneratePrimaryKeyResponse struct { + // placeholder for future response values +} + +// SubscriptionClientRegenerateSecondaryKeyResponse contains the response from method SubscriptionClient.RegenerateSecondaryKey. +type SubscriptionClientRegenerateSecondaryKeyResponse struct { + // placeholder for future response values +} + +// SubscriptionClientUpdateResponse contains the response from method SubscriptionClient.Update. +type SubscriptionClientUpdateResponse struct { + // Subscription details. + SubscriptionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagAPILinkClientCreateOrUpdateResponse contains the response from method TagAPILinkClient.CreateOrUpdate. +type TagAPILinkClientCreateOrUpdateResponse struct { + // Tag-API link details. + TagAPILinkContract +} + +// TagAPILinkClientDeleteResponse contains the response from method TagAPILinkClient.Delete. +type TagAPILinkClientDeleteResponse struct { + // placeholder for future response values +} + +// TagAPILinkClientGetResponse contains the response from method TagAPILinkClient.Get. +type TagAPILinkClientGetResponse struct { + // Tag-API link details. + TagAPILinkContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagAPILinkClientListByProductResponse contains the response from method TagAPILinkClient.NewListByProductPager. +type TagAPILinkClientListByProductResponse struct { + // Paged Tag-API link list representation. + TagAPILinkCollection +} + +// TagClientAssignToAPIResponse contains the response from method TagClient.AssignToAPI. +type TagClientAssignToAPIResponse struct { + // Tag Contract details. + TagContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagClientAssignToOperationResponse contains the response from method TagClient.AssignToOperation. +type TagClientAssignToOperationResponse struct { + // Tag Contract details. + TagContract +} + +// TagClientAssignToProductResponse contains the response from method TagClient.AssignToProduct. +type TagClientAssignToProductResponse struct { + // Tag Contract details. + TagContract +} + +// TagClientCreateOrUpdateResponse contains the response from method TagClient.CreateOrUpdate. +type TagClientCreateOrUpdateResponse struct { + // Tag Contract details. + TagContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagClientDeleteResponse contains the response from method TagClient.Delete. +type TagClientDeleteResponse struct { + // placeholder for future response values +} + +// TagClientDetachFromAPIResponse contains the response from method TagClient.DetachFromAPI. +type TagClientDetachFromAPIResponse struct { + // placeholder for future response values +} + +// TagClientDetachFromOperationResponse contains the response from method TagClient.DetachFromOperation. +type TagClientDetachFromOperationResponse struct { + // placeholder for future response values +} + +// TagClientDetachFromProductResponse contains the response from method TagClient.DetachFromProduct. +type TagClientDetachFromProductResponse struct { + // placeholder for future response values +} + +// TagClientGetByAPIResponse contains the response from method TagClient.GetByAPI. +type TagClientGetByAPIResponse struct { + // Tag Contract details. + TagContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagClientGetByOperationResponse contains the response from method TagClient.GetByOperation. +type TagClientGetByOperationResponse struct { + // Tag Contract details. + TagContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagClientGetByProductResponse contains the response from method TagClient.GetByProduct. +type TagClientGetByProductResponse struct { + // Tag Contract details. + TagContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagClientGetEntityStateByAPIResponse contains the response from method TagClient.GetEntityStateByAPI. +type TagClientGetEntityStateByAPIResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// TagClientGetEntityStateByOperationResponse contains the response from method TagClient.GetEntityStateByOperation. +type TagClientGetEntityStateByOperationResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// TagClientGetEntityStateByProductResponse contains the response from method TagClient.GetEntityStateByProduct. +type TagClientGetEntityStateByProductResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// TagClientGetEntityStateResponse contains the response from method TagClient.GetEntityState. +type TagClientGetEntityStateResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// TagClientGetResponse contains the response from method TagClient.Get. +type TagClientGetResponse struct { + // Tag Contract details. + TagContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagClientListByAPIResponse contains the response from method TagClient.NewListByAPIPager. +type TagClientListByAPIResponse struct { + // Paged Tag list representation. + TagCollection +} + +// TagClientListByOperationResponse contains the response from method TagClient.NewListByOperationPager. +type TagClientListByOperationResponse struct { + // Paged Tag list representation. + TagCollection +} + +// TagClientListByProductResponse contains the response from method TagClient.NewListByProductPager. +type TagClientListByProductResponse struct { + // Paged Tag list representation. + TagCollection +} + +// TagClientListByServiceResponse contains the response from method TagClient.NewListByServicePager. +type TagClientListByServiceResponse struct { + // Paged Tag list representation. + TagCollection +} + +// TagClientUpdateResponse contains the response from method TagClient.Update. +type TagClientUpdateResponse struct { + // Tag Contract details. + TagContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagOperationLinkClientCreateOrUpdateResponse contains the response from method TagOperationLinkClient.CreateOrUpdate. +type TagOperationLinkClientCreateOrUpdateResponse struct { + // Tag-operation link details. + TagOperationLinkContract +} + +// TagOperationLinkClientDeleteResponse contains the response from method TagOperationLinkClient.Delete. +type TagOperationLinkClientDeleteResponse struct { + // placeholder for future response values +} + +// TagOperationLinkClientGetResponse contains the response from method TagOperationLinkClient.Get. +type TagOperationLinkClientGetResponse struct { + // Tag-operation link details. + TagOperationLinkContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagOperationLinkClientListByProductResponse contains the response from method TagOperationLinkClient.NewListByProductPager. +type TagOperationLinkClientListByProductResponse struct { + // Paged Tag-operation link list representation. + TagOperationLinkCollection +} + +// TagProductLinkClientCreateOrUpdateResponse contains the response from method TagProductLinkClient.CreateOrUpdate. +type TagProductLinkClientCreateOrUpdateResponse struct { + // Tag-product link details. + TagProductLinkContract +} + +// TagProductLinkClientDeleteResponse contains the response from method TagProductLinkClient.Delete. +type TagProductLinkClientDeleteResponse struct { + // placeholder for future response values +} + +// TagProductLinkClientGetResponse contains the response from method TagProductLinkClient.Get. +type TagProductLinkClientGetResponse struct { + // Tag-product link details. + TagProductLinkContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TagProductLinkClientListByProductResponse contains the response from method TagProductLinkClient.NewListByProductPager. +type TagProductLinkClientListByProductResponse struct { + // Paged Tag-product link list representation. + TagProductLinkCollection +} + +// TagResourceClientListByServiceResponse contains the response from method TagResourceClient.NewListByServicePager. +type TagResourceClientListByServiceResponse struct { + // Paged Tag list representation. + TagResourceCollection +} + +// TenantAccessClientCreateResponse contains the response from method TenantAccessClient.Create. +type TenantAccessClientCreateResponse struct { + // Tenant Settings. + AccessInformationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TenantAccessClientGetEntityTagResponse contains the response from method TenantAccessClient.GetEntityTag. +type TenantAccessClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// TenantAccessClientGetResponse contains the response from method TenantAccessClient.Get. +type TenantAccessClientGetResponse struct { + // Tenant Settings. + AccessInformationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TenantAccessClientListByServiceResponse contains the response from method TenantAccessClient.NewListByServicePager. +type TenantAccessClientListByServiceResponse struct { + // Paged AccessInformation list representation. + AccessInformationCollection +} + +// TenantAccessClientListSecretsResponse contains the response from method TenantAccessClient.ListSecrets. +type TenantAccessClientListSecretsResponse struct { + // Tenant access information contract of the API Management service. + AccessInformationSecretsContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TenantAccessClientRegeneratePrimaryKeyResponse contains the response from method TenantAccessClient.RegeneratePrimaryKey. +type TenantAccessClientRegeneratePrimaryKeyResponse struct { + // placeholder for future response values +} + +// TenantAccessClientRegenerateSecondaryKeyResponse contains the response from method TenantAccessClient.RegenerateSecondaryKey. +type TenantAccessClientRegenerateSecondaryKeyResponse struct { + // placeholder for future response values +} + +// TenantAccessClientUpdateResponse contains the response from method TenantAccessClient.Update. +type TenantAccessClientUpdateResponse struct { + // Tenant Settings. + AccessInformationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TenantAccessGitClientRegeneratePrimaryKeyResponse contains the response from method TenantAccessGitClient.RegeneratePrimaryKey. +type TenantAccessGitClientRegeneratePrimaryKeyResponse struct { + // placeholder for future response values +} + +// TenantAccessGitClientRegenerateSecondaryKeyResponse contains the response from method TenantAccessGitClient.RegenerateSecondaryKey. +type TenantAccessGitClientRegenerateSecondaryKeyResponse struct { + // placeholder for future response values +} + +// TenantConfigurationClientDeployResponse contains the response from method TenantConfigurationClient.BeginDeploy. +type TenantConfigurationClientDeployResponse struct { + // Long Running Git Operation Results. + OperationResultContract +} + +// TenantConfigurationClientGetSyncStateResponse contains the response from method TenantConfigurationClient.GetSyncState. +type TenantConfigurationClientGetSyncStateResponse struct { + // Result of Tenant Configuration Sync State. + TenantConfigurationSyncStateContract +} + +// TenantConfigurationClientSaveResponse contains the response from method TenantConfigurationClient.BeginSave. +type TenantConfigurationClientSaveResponse struct { + // Long Running Git Operation Results. + OperationResultContract +} + +// TenantConfigurationClientValidateResponse contains the response from method TenantConfigurationClient.BeginValidate. +type TenantConfigurationClientValidateResponse struct { + // Long Running Git Operation Results. + OperationResultContract +} + +// TenantSettingsClientGetResponse contains the response from method TenantSettingsClient.Get. +type TenantSettingsClientGetResponse struct { + // Tenant Settings. + TenantSettingsContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// TenantSettingsClientListByServiceResponse contains the response from method TenantSettingsClient.NewListByServicePager. +type TenantSettingsClientListByServiceResponse struct { + // Paged AccessInformation list representation. + TenantSettingsCollection +} + +// UserClientCreateOrUpdateResponse contains the response from method UserClient.CreateOrUpdate. +type UserClientCreateOrUpdateResponse struct { + // User details. + UserContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// UserClientDeleteResponse contains the response from method UserClient.BeginDelete. +type UserClientDeleteResponse struct { + // placeholder for future response values +} + +// UserClientGenerateSsoURLResponse contains the response from method UserClient.GenerateSsoURL. +type UserClientGenerateSsoURLResponse struct { + // Generate SSO Url operations response details. + GenerateSsoURLResult +} + +// UserClientGetEntityTagResponse contains the response from method UserClient.GetEntityTag. +type UserClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// UserClientGetResponse contains the response from method UserClient.Get. +type UserClientGetResponse struct { + // User details. + UserContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// UserClientGetSharedAccessTokenResponse contains the response from method UserClient.GetSharedAccessToken. +type UserClientGetSharedAccessTokenResponse struct { + // Get User Token response details. + UserTokenResult +} + +// UserClientListByServiceResponse contains the response from method UserClient.NewListByServicePager. +type UserClientListByServiceResponse struct { + // Paged Users list representation. + UserCollection +} + +// UserClientUpdateResponse contains the response from method UserClient.Update. +type UserClientUpdateResponse struct { + // User details. + UserContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// UserConfirmationPasswordClientSendResponse contains the response from method UserConfirmationPasswordClient.Send. +type UserConfirmationPasswordClientSendResponse struct { + // placeholder for future response values +} + +// UserGroupClientListResponse contains the response from method UserGroupClient.NewListPager. +type UserGroupClientListResponse struct { + // Paged Group list representation. + GroupCollection +} + +// UserIdentitiesClientListResponse contains the response from method UserIdentitiesClient.NewListPager. +type UserIdentitiesClientListResponse struct { + // List of Users Identity list representation. + UserIdentityCollection +} + +// UserSubscriptionClientGetResponse contains the response from method UserSubscriptionClient.Get. +type UserSubscriptionClientGetResponse struct { + // Subscription details. + SubscriptionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// UserSubscriptionClientListResponse contains the response from method UserSubscriptionClient.NewListPager. +type UserSubscriptionClientListResponse struct { + // Paged Subscriptions list representation. + SubscriptionCollection +} + +// WorkspaceAPIClientCreateOrUpdateResponse contains the response from method WorkspaceAPIClient.BeginCreateOrUpdate. +type WorkspaceAPIClientCreateOrUpdateResponse struct { + // API details. + APIContract +} + +// WorkspaceAPIClientDeleteResponse contains the response from method WorkspaceAPIClient.Delete. +type WorkspaceAPIClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceAPIClientGetEntityTagResponse contains the response from method WorkspaceAPIClient.GetEntityTag. +type WorkspaceAPIClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceAPIClientGetResponse contains the response from method WorkspaceAPIClient.Get. +type WorkspaceAPIClientGetResponse struct { + // API details. + APIContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIClientListByServiceResponse contains the response from method WorkspaceAPIClient.NewListByServicePager. +type WorkspaceAPIClientListByServiceResponse struct { + // Paged API list representation. + APICollection +} + +// WorkspaceAPIClientUpdateResponse contains the response from method WorkspaceAPIClient.Update. +type WorkspaceAPIClientUpdateResponse struct { + // API details. + APIContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIDiagnosticClientCreateOrUpdateResponse contains the response from method WorkspaceAPIDiagnosticClient.CreateOrUpdate. +type WorkspaceAPIDiagnosticClientCreateOrUpdateResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIDiagnosticClientDeleteResponse contains the response from method WorkspaceAPIDiagnosticClient.Delete. +type WorkspaceAPIDiagnosticClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceAPIDiagnosticClientGetEntityTagResponse contains the response from method WorkspaceAPIDiagnosticClient.GetEntityTag. +type WorkspaceAPIDiagnosticClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceAPIDiagnosticClientGetResponse contains the response from method WorkspaceAPIDiagnosticClient.Get. +type WorkspaceAPIDiagnosticClientGetResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIDiagnosticClientListByWorkspaceResponse contains the response from method WorkspaceAPIDiagnosticClient.NewListByWorkspacePager. +type WorkspaceAPIDiagnosticClientListByWorkspaceResponse struct { + // Paged Diagnostic list representation. + DiagnosticCollection +} + +// WorkspaceAPIDiagnosticClientUpdateResponse contains the response from method WorkspaceAPIDiagnosticClient.Update. +type WorkspaceAPIDiagnosticClientUpdateResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIExportClientGetResponse contains the response from method WorkspaceAPIExportClient.Get. +type WorkspaceAPIExportClientGetResponse struct { + // API Export result. + APIExportResult +} + +// WorkspaceAPIOperationClientCreateOrUpdateResponse contains the response from method WorkspaceAPIOperationClient.CreateOrUpdate. +type WorkspaceAPIOperationClientCreateOrUpdateResponse struct { + // API Operation details. + OperationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIOperationClientDeleteResponse contains the response from method WorkspaceAPIOperationClient.Delete. +type WorkspaceAPIOperationClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceAPIOperationClientGetEntityTagResponse contains the response from method WorkspaceAPIOperationClient.GetEntityTag. +type WorkspaceAPIOperationClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceAPIOperationClientGetResponse contains the response from method WorkspaceAPIOperationClient.Get. +type WorkspaceAPIOperationClientGetResponse struct { + // API Operation details. + OperationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIOperationClientListByAPIResponse contains the response from method WorkspaceAPIOperationClient.NewListByAPIPager. +type WorkspaceAPIOperationClientListByAPIResponse struct { + // Paged Operation list representation. + OperationCollection +} + +// WorkspaceAPIOperationClientUpdateResponse contains the response from method WorkspaceAPIOperationClient.Update. +type WorkspaceAPIOperationClientUpdateResponse struct { + // API Operation details. + OperationContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIOperationPolicyClientCreateOrUpdateResponse contains the response from method WorkspaceAPIOperationPolicyClient.CreateOrUpdate. +type WorkspaceAPIOperationPolicyClientCreateOrUpdateResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIOperationPolicyClientDeleteResponse contains the response from method WorkspaceAPIOperationPolicyClient.Delete. +type WorkspaceAPIOperationPolicyClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceAPIOperationPolicyClientGetEntityTagResponse contains the response from method WorkspaceAPIOperationPolicyClient.GetEntityTag. +type WorkspaceAPIOperationPolicyClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceAPIOperationPolicyClientGetResponse contains the response from method WorkspaceAPIOperationPolicyClient.Get. +type WorkspaceAPIOperationPolicyClientGetResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIOperationPolicyClientListByOperationResponse contains the response from method WorkspaceAPIOperationPolicyClient.NewListByOperationPager. +type WorkspaceAPIOperationPolicyClientListByOperationResponse struct { + // The response of the list policy operation. + PolicyCollection +} + +// WorkspaceAPIPolicyClientCreateOrUpdateResponse contains the response from method WorkspaceAPIPolicyClient.CreateOrUpdate. +type WorkspaceAPIPolicyClientCreateOrUpdateResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIPolicyClientDeleteResponse contains the response from method WorkspaceAPIPolicyClient.Delete. +type WorkspaceAPIPolicyClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceAPIPolicyClientGetEntityTagResponse contains the response from method WorkspaceAPIPolicyClient.GetEntityTag. +type WorkspaceAPIPolicyClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceAPIPolicyClientGetResponse contains the response from method WorkspaceAPIPolicyClient.Get. +type WorkspaceAPIPolicyClientGetResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIPolicyClientListByAPIResponse contains the response from method WorkspaceAPIPolicyClient.NewListByAPIPager. +type WorkspaceAPIPolicyClientListByAPIResponse struct { + // The response of the list policy operation. + PolicyCollection +} + +// WorkspaceAPIReleaseClientCreateOrUpdateResponse contains the response from method WorkspaceAPIReleaseClient.CreateOrUpdate. +type WorkspaceAPIReleaseClientCreateOrUpdateResponse struct { + // ApiRelease details. + APIReleaseContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIReleaseClientDeleteResponse contains the response from method WorkspaceAPIReleaseClient.Delete. +type WorkspaceAPIReleaseClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceAPIReleaseClientGetEntityTagResponse contains the response from method WorkspaceAPIReleaseClient.GetEntityTag. +type WorkspaceAPIReleaseClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceAPIReleaseClientGetResponse contains the response from method WorkspaceAPIReleaseClient.Get. +type WorkspaceAPIReleaseClientGetResponse struct { + // ApiRelease details. + APIReleaseContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIReleaseClientListByServiceResponse contains the response from method WorkspaceAPIReleaseClient.NewListByServicePager. +type WorkspaceAPIReleaseClientListByServiceResponse struct { + // Paged ApiRelease list representation. + APIReleaseCollection +} + +// WorkspaceAPIReleaseClientUpdateResponse contains the response from method WorkspaceAPIReleaseClient.Update. +type WorkspaceAPIReleaseClientUpdateResponse struct { + // ApiRelease details. + APIReleaseContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIRevisionClientListByServiceResponse contains the response from method WorkspaceAPIRevisionClient.NewListByServicePager. +type WorkspaceAPIRevisionClientListByServiceResponse struct { + // Paged API Revision list representation. + APIRevisionCollection +} + +// WorkspaceAPISchemaClientCreateOrUpdateResponse contains the response from method WorkspaceAPISchemaClient.BeginCreateOrUpdate. +type WorkspaceAPISchemaClientCreateOrUpdateResponse struct { + // API Schema Contract details. + SchemaContract +} + +// WorkspaceAPISchemaClientDeleteResponse contains the response from method WorkspaceAPISchemaClient.Delete. +type WorkspaceAPISchemaClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceAPISchemaClientGetEntityTagResponse contains the response from method WorkspaceAPISchemaClient.GetEntityTag. +type WorkspaceAPISchemaClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceAPISchemaClientGetResponse contains the response from method WorkspaceAPISchemaClient.Get. +type WorkspaceAPISchemaClientGetResponse struct { + // API Schema Contract details. + SchemaContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPISchemaClientListByAPIResponse contains the response from method WorkspaceAPISchemaClient.NewListByAPIPager. +type WorkspaceAPISchemaClientListByAPIResponse struct { + // The response of the list schema operation. + SchemaCollection +} + +// WorkspaceAPIVersionSetClientCreateOrUpdateResponse contains the response from method WorkspaceAPIVersionSetClient.CreateOrUpdate. +type WorkspaceAPIVersionSetClientCreateOrUpdateResponse struct { + // API Version Set Contract details. + APIVersionSetContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIVersionSetClientDeleteResponse contains the response from method WorkspaceAPIVersionSetClient.Delete. +type WorkspaceAPIVersionSetClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceAPIVersionSetClientGetEntityTagResponse contains the response from method WorkspaceAPIVersionSetClient.GetEntityTag. +type WorkspaceAPIVersionSetClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceAPIVersionSetClientGetResponse contains the response from method WorkspaceAPIVersionSetClient.Get. +type WorkspaceAPIVersionSetClientGetResponse struct { + // API Version Set Contract details. + APIVersionSetContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceAPIVersionSetClientListByServiceResponse contains the response from method WorkspaceAPIVersionSetClient.NewListByServicePager. +type WorkspaceAPIVersionSetClientListByServiceResponse struct { + // Paged API Version Set list representation. + APIVersionSetCollection +} + +// WorkspaceAPIVersionSetClientUpdateResponse contains the response from method WorkspaceAPIVersionSetClient.Update. +type WorkspaceAPIVersionSetClientUpdateResponse struct { + // API Version Set Contract details. + APIVersionSetContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceBackendClientCreateOrUpdateResponse contains the response from method WorkspaceBackendClient.CreateOrUpdate. +type WorkspaceBackendClientCreateOrUpdateResponse struct { + // Backend details. + BackendContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceBackendClientDeleteResponse contains the response from method WorkspaceBackendClient.Delete. +type WorkspaceBackendClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceBackendClientGetEntityTagResponse contains the response from method WorkspaceBackendClient.GetEntityTag. +type WorkspaceBackendClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceBackendClientGetResponse contains the response from method WorkspaceBackendClient.Get. +type WorkspaceBackendClientGetResponse struct { + // Backend details. + BackendContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceBackendClientListByWorkspaceResponse contains the response from method WorkspaceBackendClient.NewListByWorkspacePager. +type WorkspaceBackendClientListByWorkspaceResponse struct { + // Paged Backend list representation. + BackendCollection +} + +// WorkspaceBackendClientUpdateResponse contains the response from method WorkspaceBackendClient.Update. +type WorkspaceBackendClientUpdateResponse struct { + // Backend details. + BackendContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceCertificateClientCreateOrUpdateResponse contains the response from method WorkspaceCertificateClient.CreateOrUpdate. +type WorkspaceCertificateClientCreateOrUpdateResponse struct { + // Certificate details. + CertificateContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceCertificateClientDeleteResponse contains the response from method WorkspaceCertificateClient.Delete. +type WorkspaceCertificateClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceCertificateClientGetEntityTagResponse contains the response from method WorkspaceCertificateClient.GetEntityTag. +type WorkspaceCertificateClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceCertificateClientGetResponse contains the response from method WorkspaceCertificateClient.Get. +type WorkspaceCertificateClientGetResponse struct { + // Certificate details. + CertificateContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceCertificateClientListByWorkspaceResponse contains the response from method WorkspaceCertificateClient.NewListByWorkspacePager. +type WorkspaceCertificateClientListByWorkspaceResponse struct { + // Paged Certificates list representation. + CertificateCollection +} + +// WorkspaceCertificateClientRefreshSecretResponse contains the response from method WorkspaceCertificateClient.RefreshSecret. +type WorkspaceCertificateClientRefreshSecretResponse struct { + // Certificate details. + CertificateContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceClientCreateOrUpdateResponse contains the response from method WorkspaceClient.CreateOrUpdate. +type WorkspaceClientCreateOrUpdateResponse struct { + // Workspace details. + WorkspaceContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceClientDeleteResponse contains the response from method WorkspaceClient.Delete. +type WorkspaceClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceClientGetEntityTagResponse contains the response from method WorkspaceClient.GetEntityTag. +type WorkspaceClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceClientGetResponse contains the response from method WorkspaceClient.Get. +type WorkspaceClientGetResponse struct { + // Workspace details. + WorkspaceContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceClientListByServiceResponse contains the response from method WorkspaceClient.NewListByServicePager. +type WorkspaceClientListByServiceResponse struct { + // Paged workspace list representation. + WorkspaceCollection +} + +// WorkspaceClientUpdateResponse contains the response from method WorkspaceClient.Update. +type WorkspaceClientUpdateResponse struct { + // Workspace details. + WorkspaceContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceDiagnosticClientCreateOrUpdateResponse contains the response from method WorkspaceDiagnosticClient.CreateOrUpdate. +type WorkspaceDiagnosticClientCreateOrUpdateResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceDiagnosticClientDeleteResponse contains the response from method WorkspaceDiagnosticClient.Delete. +type WorkspaceDiagnosticClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceDiagnosticClientGetEntityTagResponse contains the response from method WorkspaceDiagnosticClient.GetEntityTag. +type WorkspaceDiagnosticClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceDiagnosticClientGetResponse contains the response from method WorkspaceDiagnosticClient.Get. +type WorkspaceDiagnosticClientGetResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceDiagnosticClientListByWorkspaceResponse contains the response from method WorkspaceDiagnosticClient.NewListByWorkspacePager. +type WorkspaceDiagnosticClientListByWorkspaceResponse struct { + // Paged Diagnostic list representation. + DiagnosticCollection +} + +// WorkspaceDiagnosticClientUpdateResponse contains the response from method WorkspaceDiagnosticClient.Update. +type WorkspaceDiagnosticClientUpdateResponse struct { + // Diagnostic details. + DiagnosticContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceGlobalSchemaClientCreateOrUpdateResponse contains the response from method WorkspaceGlobalSchemaClient.BeginCreateOrUpdate. +type WorkspaceGlobalSchemaClientCreateOrUpdateResponse struct { + // Global Schema Contract details. + GlobalSchemaContract +} + +// WorkspaceGlobalSchemaClientDeleteResponse contains the response from method WorkspaceGlobalSchemaClient.Delete. +type WorkspaceGlobalSchemaClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceGlobalSchemaClientGetEntityTagResponse contains the response from method WorkspaceGlobalSchemaClient.GetEntityTag. +type WorkspaceGlobalSchemaClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceGlobalSchemaClientGetResponse contains the response from method WorkspaceGlobalSchemaClient.Get. +type WorkspaceGlobalSchemaClientGetResponse struct { + // Global Schema Contract details. + GlobalSchemaContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceGlobalSchemaClientListByServiceResponse contains the response from method WorkspaceGlobalSchemaClient.NewListByServicePager. +type WorkspaceGlobalSchemaClientListByServiceResponse struct { + // The response of the list schema operation. + GlobalSchemaCollection +} + +// WorkspaceGroupClientCreateOrUpdateResponse contains the response from method WorkspaceGroupClient.CreateOrUpdate. +type WorkspaceGroupClientCreateOrUpdateResponse struct { + // Contract details. + GroupContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceGroupClientDeleteResponse contains the response from method WorkspaceGroupClient.Delete. +type WorkspaceGroupClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceGroupClientGetEntityTagResponse contains the response from method WorkspaceGroupClient.GetEntityTag. +type WorkspaceGroupClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceGroupClientGetResponse contains the response from method WorkspaceGroupClient.Get. +type WorkspaceGroupClientGetResponse struct { + // Contract details. + GroupContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceGroupClientListByServiceResponse contains the response from method WorkspaceGroupClient.NewListByServicePager. +type WorkspaceGroupClientListByServiceResponse struct { + // Paged Group list representation. + GroupCollection +} + +// WorkspaceGroupClientUpdateResponse contains the response from method WorkspaceGroupClient.Update. +type WorkspaceGroupClientUpdateResponse struct { + // Contract details. + GroupContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceGroupUserClientCheckEntityExistsResponse contains the response from method WorkspaceGroupUserClient.CheckEntityExists. +type WorkspaceGroupUserClientCheckEntityExistsResponse struct { + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceGroupUserClientCreateResponse contains the response from method WorkspaceGroupUserClient.Create. +type WorkspaceGroupUserClientCreateResponse struct { + // User details. + UserContract +} + +// WorkspaceGroupUserClientDeleteResponse contains the response from method WorkspaceGroupUserClient.Delete. +type WorkspaceGroupUserClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceGroupUserClientListResponse contains the response from method WorkspaceGroupUserClient.NewListPager. +type WorkspaceGroupUserClientListResponse struct { + // Paged Users list representation. + UserCollection +} + +// WorkspaceLinkClientGetResponse contains the response from method WorkspaceLinkClient.Get. +type WorkspaceLinkClientGetResponse struct { + // A single API Management WorkspaceLinks in List or Get response. + WorkspaceLinksResource +} + +// WorkspaceLinksClientListByServiceResponse contains the response from method WorkspaceLinksClient.NewListByServicePager. +type WorkspaceLinksClientListByServiceResponse struct { + // The response of the List API Management WorkspaceLink operation. + WorkspaceLinksListResult +} + +// WorkspaceLoggerClientCreateOrUpdateResponse contains the response from method WorkspaceLoggerClient.CreateOrUpdate. +type WorkspaceLoggerClientCreateOrUpdateResponse struct { + // Logger details. + LoggerContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceLoggerClientDeleteResponse contains the response from method WorkspaceLoggerClient.Delete. +type WorkspaceLoggerClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceLoggerClientGetEntityTagResponse contains the response from method WorkspaceLoggerClient.GetEntityTag. +type WorkspaceLoggerClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceLoggerClientGetResponse contains the response from method WorkspaceLoggerClient.Get. +type WorkspaceLoggerClientGetResponse struct { + // Logger details. + LoggerContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceLoggerClientListByWorkspaceResponse contains the response from method WorkspaceLoggerClient.NewListByWorkspacePager. +type WorkspaceLoggerClientListByWorkspaceResponse struct { + // Paged Logger list representation. + LoggerCollection +} + +// WorkspaceLoggerClientUpdateResponse contains the response from method WorkspaceLoggerClient.Update. +type WorkspaceLoggerClientUpdateResponse struct { + // Logger details. + LoggerContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceNamedValueClientCreateOrUpdateResponse contains the response from method WorkspaceNamedValueClient.BeginCreateOrUpdate. +type WorkspaceNamedValueClientCreateOrUpdateResponse struct { + // NamedValue details. + NamedValueContract +} + +// WorkspaceNamedValueClientDeleteResponse contains the response from method WorkspaceNamedValueClient.Delete. +type WorkspaceNamedValueClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceNamedValueClientGetEntityTagResponse contains the response from method WorkspaceNamedValueClient.GetEntityTag. +type WorkspaceNamedValueClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceNamedValueClientGetResponse contains the response from method WorkspaceNamedValueClient.Get. +type WorkspaceNamedValueClientGetResponse struct { + // NamedValue details. + NamedValueContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceNamedValueClientListByServiceResponse contains the response from method WorkspaceNamedValueClient.NewListByServicePager. +type WorkspaceNamedValueClientListByServiceResponse struct { + // Paged NamedValue list representation. + NamedValueCollection +} + +// WorkspaceNamedValueClientListValueResponse contains the response from method WorkspaceNamedValueClient.ListValue. +type WorkspaceNamedValueClientListValueResponse struct { + // Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + NamedValueSecretContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceNamedValueClientRefreshSecretResponse contains the response from method WorkspaceNamedValueClient.BeginRefreshSecret. +type WorkspaceNamedValueClientRefreshSecretResponse struct { + // NamedValue details. + NamedValueContract +} + +// WorkspaceNamedValueClientUpdateResponse contains the response from method WorkspaceNamedValueClient.BeginUpdate. +type WorkspaceNamedValueClientUpdateResponse struct { + // NamedValue details. + NamedValueContract +} + +// WorkspaceNotificationClientCreateOrUpdateResponse contains the response from method WorkspaceNotificationClient.CreateOrUpdate. +type WorkspaceNotificationClientCreateOrUpdateResponse struct { + // Notification details. + NotificationContract +} + +// WorkspaceNotificationClientGetResponse contains the response from method WorkspaceNotificationClient.Get. +type WorkspaceNotificationClientGetResponse struct { + // Notification details. + NotificationContract +} + +// WorkspaceNotificationClientListByServiceResponse contains the response from method WorkspaceNotificationClient.NewListByServicePager. +type WorkspaceNotificationClientListByServiceResponse struct { + // Paged Notification list representation. + NotificationCollection +} + +// WorkspaceNotificationRecipientEmailClientCheckEntityExistsResponse contains the response from method WorkspaceNotificationRecipientEmailClient.CheckEntityExists. +type WorkspaceNotificationRecipientEmailClientCheckEntityExistsResponse struct { + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceNotificationRecipientEmailClientCreateOrUpdateResponse contains the response from method WorkspaceNotificationRecipientEmailClient.CreateOrUpdate. +type WorkspaceNotificationRecipientEmailClientCreateOrUpdateResponse struct { + // Recipient Email details. + RecipientEmailContract +} + +// WorkspaceNotificationRecipientEmailClientDeleteResponse contains the response from method WorkspaceNotificationRecipientEmailClient.Delete. +type WorkspaceNotificationRecipientEmailClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceNotificationRecipientEmailClientListByNotificationResponse contains the response from method WorkspaceNotificationRecipientEmailClient.ListByNotification. +type WorkspaceNotificationRecipientEmailClientListByNotificationResponse struct { + // Paged Recipient User list representation. + RecipientEmailCollection +} + +// WorkspaceNotificationRecipientUserClientCheckEntityExistsResponse contains the response from method WorkspaceNotificationRecipientUserClient.CheckEntityExists. +type WorkspaceNotificationRecipientUserClientCheckEntityExistsResponse struct { + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceNotificationRecipientUserClientCreateOrUpdateResponse contains the response from method WorkspaceNotificationRecipientUserClient.CreateOrUpdate. +type WorkspaceNotificationRecipientUserClientCreateOrUpdateResponse struct { + // Recipient User details. + RecipientUserContract +} + +// WorkspaceNotificationRecipientUserClientDeleteResponse contains the response from method WorkspaceNotificationRecipientUserClient.Delete. +type WorkspaceNotificationRecipientUserClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceNotificationRecipientUserClientListByNotificationResponse contains the response from method WorkspaceNotificationRecipientUserClient.ListByNotification. +type WorkspaceNotificationRecipientUserClientListByNotificationResponse struct { + // Paged Recipient User list representation. + RecipientUserCollection +} + +// WorkspacePolicyClientCreateOrUpdateResponse contains the response from method WorkspacePolicyClient.CreateOrUpdate. +type WorkspacePolicyClientCreateOrUpdateResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspacePolicyClientDeleteResponse contains the response from method WorkspacePolicyClient.Delete. +type WorkspacePolicyClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspacePolicyClientGetEntityTagResponse contains the response from method WorkspacePolicyClient.GetEntityTag. +type WorkspacePolicyClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspacePolicyClientGetResponse contains the response from method WorkspacePolicyClient.Get. +type WorkspacePolicyClientGetResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspacePolicyClientListByAPIResponse contains the response from method WorkspacePolicyClient.NewListByAPIPager. +type WorkspacePolicyClientListByAPIResponse struct { + // The response of the list policy operation. + PolicyCollection +} + +// WorkspacePolicyFragmentClientCreateOrUpdateResponse contains the response from method WorkspacePolicyFragmentClient.BeginCreateOrUpdate. +type WorkspacePolicyFragmentClientCreateOrUpdateResponse struct { + // Policy fragment contract details. + PolicyFragmentContract +} + +// WorkspacePolicyFragmentClientDeleteResponse contains the response from method WorkspacePolicyFragmentClient.Delete. +type WorkspacePolicyFragmentClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspacePolicyFragmentClientGetEntityTagResponse contains the response from method WorkspacePolicyFragmentClient.GetEntityTag. +type WorkspacePolicyFragmentClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspacePolicyFragmentClientGetResponse contains the response from method WorkspacePolicyFragmentClient.Get. +type WorkspacePolicyFragmentClientGetResponse struct { + // Policy fragment contract details. + PolicyFragmentContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspacePolicyFragmentClientListByServiceResponse contains the response from method WorkspacePolicyFragmentClient.NewListByServicePager. +type WorkspacePolicyFragmentClientListByServiceResponse struct { + // The response of the get policy fragments operation. + PolicyFragmentCollection +} + +// WorkspacePolicyFragmentClientListReferencesResponse contains the response from method WorkspacePolicyFragmentClient.ListReferences. +type WorkspacePolicyFragmentClientListReferencesResponse struct { + // A collection of resources. + ResourceCollection +} + +// WorkspaceProductAPILinkClientCreateOrUpdateResponse contains the response from method WorkspaceProductAPILinkClient.CreateOrUpdate. +type WorkspaceProductAPILinkClientCreateOrUpdateResponse struct { + // Product-API link details. + ProductAPILinkContract +} + +// WorkspaceProductAPILinkClientDeleteResponse contains the response from method WorkspaceProductAPILinkClient.Delete. +type WorkspaceProductAPILinkClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceProductAPILinkClientGetResponse contains the response from method WorkspaceProductAPILinkClient.Get. +type WorkspaceProductAPILinkClientGetResponse struct { + // Product-API link details. + ProductAPILinkContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceProductAPILinkClientListByProductResponse contains the response from method WorkspaceProductAPILinkClient.NewListByProductPager. +type WorkspaceProductAPILinkClientListByProductResponse struct { + // Paged Product-API link list representation. + ProductAPILinkCollection +} + +// WorkspaceProductClientCreateOrUpdateResponse contains the response from method WorkspaceProductClient.CreateOrUpdate. +type WorkspaceProductClientCreateOrUpdateResponse struct { + // Product details. + ProductContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceProductClientDeleteResponse contains the response from method WorkspaceProductClient.Delete. +type WorkspaceProductClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceProductClientGetEntityTagResponse contains the response from method WorkspaceProductClient.GetEntityTag. +type WorkspaceProductClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceProductClientGetResponse contains the response from method WorkspaceProductClient.Get. +type WorkspaceProductClientGetResponse struct { + // Product details. + ProductContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceProductClientListByServiceResponse contains the response from method WorkspaceProductClient.NewListByServicePager. +type WorkspaceProductClientListByServiceResponse struct { + // Paged Products list representation. + ProductCollection +} + +// WorkspaceProductClientUpdateResponse contains the response from method WorkspaceProductClient.Update. +type WorkspaceProductClientUpdateResponse struct { + // Product details. + ProductContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceProductGroupLinkClientCreateOrUpdateResponse contains the response from method WorkspaceProductGroupLinkClient.CreateOrUpdate. +type WorkspaceProductGroupLinkClientCreateOrUpdateResponse struct { + // Product-group link details. + ProductGroupLinkContract +} + +// WorkspaceProductGroupLinkClientDeleteResponse contains the response from method WorkspaceProductGroupLinkClient.Delete. +type WorkspaceProductGroupLinkClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceProductGroupLinkClientGetResponse contains the response from method WorkspaceProductGroupLinkClient.Get. +type WorkspaceProductGroupLinkClientGetResponse struct { + // Product-group link details. + ProductGroupLinkContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceProductGroupLinkClientListByProductResponse contains the response from method WorkspaceProductGroupLinkClient.NewListByProductPager. +type WorkspaceProductGroupLinkClientListByProductResponse struct { + // Paged Product-group link list representation. + ProductGroupLinkCollection +} + +// WorkspaceProductPolicyClientCreateOrUpdateResponse contains the response from method WorkspaceProductPolicyClient.CreateOrUpdate. +type WorkspaceProductPolicyClientCreateOrUpdateResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceProductPolicyClientDeleteResponse contains the response from method WorkspaceProductPolicyClient.Delete. +type WorkspaceProductPolicyClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceProductPolicyClientGetEntityTagResponse contains the response from method WorkspaceProductPolicyClient.GetEntityTag. +type WorkspaceProductPolicyClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceProductPolicyClientGetResponse contains the response from method WorkspaceProductPolicyClient.Get. +type WorkspaceProductPolicyClientGetResponse struct { + // Policy Contract details. + PolicyContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceProductPolicyClientListByProductResponse contains the response from method WorkspaceProductPolicyClient.ListByProduct. +type WorkspaceProductPolicyClientListByProductResponse struct { + // The response of the list policy operation. + PolicyCollection +} + +// WorkspaceSubscriptionClientCreateOrUpdateResponse contains the response from method WorkspaceSubscriptionClient.CreateOrUpdate. +type WorkspaceSubscriptionClientCreateOrUpdateResponse struct { + // Subscription details. + SubscriptionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceSubscriptionClientDeleteResponse contains the response from method WorkspaceSubscriptionClient.Delete. +type WorkspaceSubscriptionClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceSubscriptionClientGetEntityTagResponse contains the response from method WorkspaceSubscriptionClient.GetEntityTag. +type WorkspaceSubscriptionClientGetEntityTagResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceSubscriptionClientGetResponse contains the response from method WorkspaceSubscriptionClient.Get. +type WorkspaceSubscriptionClientGetResponse struct { + // Subscription details. + SubscriptionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceSubscriptionClientListResponse contains the response from method WorkspaceSubscriptionClient.NewListPager. +type WorkspaceSubscriptionClientListResponse struct { + // Paged Subscriptions list representation. + SubscriptionCollection +} + +// WorkspaceSubscriptionClientListSecretsResponse contains the response from method WorkspaceSubscriptionClient.ListSecrets. +type WorkspaceSubscriptionClientListSecretsResponse struct { + // Subscription keys. + SubscriptionKeysContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceSubscriptionClientRegeneratePrimaryKeyResponse contains the response from method WorkspaceSubscriptionClient.RegeneratePrimaryKey. +type WorkspaceSubscriptionClientRegeneratePrimaryKeyResponse struct { + // placeholder for future response values +} + +// WorkspaceSubscriptionClientRegenerateSecondaryKeyResponse contains the response from method WorkspaceSubscriptionClient.RegenerateSecondaryKey. +type WorkspaceSubscriptionClientRegenerateSecondaryKeyResponse struct { + // placeholder for future response values +} + +// WorkspaceSubscriptionClientUpdateResponse contains the response from method WorkspaceSubscriptionClient.Update. +type WorkspaceSubscriptionClientUpdateResponse struct { + // Subscription details. + SubscriptionContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceTagAPILinkClientCreateOrUpdateResponse contains the response from method WorkspaceTagAPILinkClient.CreateOrUpdate. +type WorkspaceTagAPILinkClientCreateOrUpdateResponse struct { + // Tag-API link details. + TagAPILinkContract +} + +// WorkspaceTagAPILinkClientDeleteResponse contains the response from method WorkspaceTagAPILinkClient.Delete. +type WorkspaceTagAPILinkClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceTagAPILinkClientGetResponse contains the response from method WorkspaceTagAPILinkClient.Get. +type WorkspaceTagAPILinkClientGetResponse struct { + // Tag-API link details. + TagAPILinkContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceTagAPILinkClientListByProductResponse contains the response from method WorkspaceTagAPILinkClient.NewListByProductPager. +type WorkspaceTagAPILinkClientListByProductResponse struct { + // Paged Tag-API link list representation. + TagAPILinkCollection +} + +// WorkspaceTagClientCreateOrUpdateResponse contains the response from method WorkspaceTagClient.CreateOrUpdate. +type WorkspaceTagClientCreateOrUpdateResponse struct { + // Tag Contract details. + TagContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceTagClientDeleteResponse contains the response from method WorkspaceTagClient.Delete. +type WorkspaceTagClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceTagClientGetEntityStateResponse contains the response from method WorkspaceTagClient.GetEntityState. +type WorkspaceTagClientGetEntityStateResponse struct { + // ETag contains the information returned from the ETag header response. + ETag *string + + // Success indicates if the operation succeeded or failed. + Success bool +} + +// WorkspaceTagClientGetResponse contains the response from method WorkspaceTagClient.Get. +type WorkspaceTagClientGetResponse struct { + // Tag Contract details. + TagContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceTagClientListByServiceResponse contains the response from method WorkspaceTagClient.NewListByServicePager. +type WorkspaceTagClientListByServiceResponse struct { + // Paged Tag list representation. + TagCollection +} + +// WorkspaceTagClientUpdateResponse contains the response from method WorkspaceTagClient.Update. +type WorkspaceTagClientUpdateResponse struct { + // Tag Contract details. + TagContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceTagOperationLinkClientCreateOrUpdateResponse contains the response from method WorkspaceTagOperationLinkClient.CreateOrUpdate. +type WorkspaceTagOperationLinkClientCreateOrUpdateResponse struct { + // Tag-operation link details. + TagOperationLinkContract +} + +// WorkspaceTagOperationLinkClientDeleteResponse contains the response from method WorkspaceTagOperationLinkClient.Delete. +type WorkspaceTagOperationLinkClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceTagOperationLinkClientGetResponse contains the response from method WorkspaceTagOperationLinkClient.Get. +type WorkspaceTagOperationLinkClientGetResponse struct { + // Tag-operation link details. + TagOperationLinkContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceTagOperationLinkClientListByProductResponse contains the response from method WorkspaceTagOperationLinkClient.NewListByProductPager. +type WorkspaceTagOperationLinkClientListByProductResponse struct { + // Paged Tag-operation link list representation. + TagOperationLinkCollection +} + +// WorkspaceTagProductLinkClientCreateOrUpdateResponse contains the response from method WorkspaceTagProductLinkClient.CreateOrUpdate. +type WorkspaceTagProductLinkClientCreateOrUpdateResponse struct { + // Tag-product link details. + TagProductLinkContract +} + +// WorkspaceTagProductLinkClientDeleteResponse contains the response from method WorkspaceTagProductLinkClient.Delete. +type WorkspaceTagProductLinkClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspaceTagProductLinkClientGetResponse contains the response from method WorkspaceTagProductLinkClient.Get. +type WorkspaceTagProductLinkClientGetResponse struct { + // Tag-product link details. + TagProductLinkContract + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// WorkspaceTagProductLinkClientListByProductResponse contains the response from method WorkspaceTagProductLinkClient.NewListByProductPager. +type WorkspaceTagProductLinkClientListByProductResponse struct { + // Paged Tag-product link list representation. + TagProductLinkCollection +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/service_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/service_client.go new file mode 100644 index 00000000..c06eb601 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/service_client.go @@ -0,0 +1,971 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServiceClient contains the methods for the APIManagementService group. +// Don't use this type directly, use NewServiceClient() instead. +type ServiceClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServiceClient creates a new instance of ServiceClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServiceClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginApplyNetworkConfigurationUpdates - Updates the Microsoft.ApiManagement resource running in the Virtual network to +// pick the updated DNS changes. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - ServiceClientBeginApplyNetworkConfigurationUpdatesOptions contains the optional parameters for the ServiceClient.BeginApplyNetworkConfigurationUpdates +// method. +func (client *ServiceClient) BeginApplyNetworkConfigurationUpdates(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginApplyNetworkConfigurationUpdatesOptions) (*runtime.Poller[ServiceClientApplyNetworkConfigurationUpdatesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.applyNetworkConfigurationUpdates(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceClientApplyNetworkConfigurationUpdatesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceClientApplyNetworkConfigurationUpdatesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ApplyNetworkConfigurationUpdates - Updates the Microsoft.ApiManagement resource running in the Virtual network to pick +// the updated DNS changes. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceClient) applyNetworkConfigurationUpdates(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginApplyNetworkConfigurationUpdatesOptions) (*http.Response, error) { + var err error + const operationName = "ServiceClient.BeginApplyNetworkConfigurationUpdates" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.applyNetworkConfigurationUpdatesCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// applyNetworkConfigurationUpdatesCreateRequest creates the ApplyNetworkConfigurationUpdates request. +func (client *ServiceClient) applyNetworkConfigurationUpdatesCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginApplyNetworkConfigurationUpdatesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginBackup - Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation +// and could take several minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - parameters - Parameters supplied to the ApiManagementService_Backup operation. +// - options - ServiceClientBeginBackupOptions contains the optional parameters for the ServiceClient.BeginBackup method. +func (client *ServiceClient) BeginBackup(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginBackupOptions) (*runtime.Poller[ServiceClientBackupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.backup(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceClientBackupResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceClientBackupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Backup - Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation +// and could take several minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceClient) backup(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginBackupOptions) (*http.Response, error) { + var err error + const operationName = "ServiceClient.BeginBackup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.backupCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// backupCreateRequest creates the Backup request. +func (client *ServiceClient) backupCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, _ *ServiceClientBeginBackupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// CheckNameAvailability - Checks availability and correctness of a name for an API Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - parameters - Parameters supplied to the CheckNameAvailability operation. +// - options - ServiceClientCheckNameAvailabilityOptions contains the optional parameters for the ServiceClient.CheckNameAvailability +// method. +func (client *ServiceClient) CheckNameAvailability(ctx context.Context, parameters ServiceCheckNameAvailabilityParameters, options *ServiceClientCheckNameAvailabilityOptions) (ServiceClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ServiceClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkNameAvailabilityCreateRequest(ctx, parameters, options) + if err != nil { + return ServiceClientCheckNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceClientCheckNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceClientCheckNameAvailabilityResponse{}, err + } + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. +func (client *ServiceClient) checkNameAvailabilityCreateRequest(ctx context.Context, parameters ServiceCheckNameAvailabilityParameters, _ *ServiceClientCheckNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. +func (client *ServiceClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ServiceClientCheckNameAvailabilityResponse, error) { + result := ServiceClientCheckNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceNameAvailabilityResult); err != nil { + return ServiceClientCheckNameAvailabilityResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Creates or updates an API Management service. This is long running operation and could take several +// minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - parameters - Parameters supplied to the CreateOrUpdate API Management service operation. +// - options - ServiceClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceClient.BeginCreateOrUpdate +// method. +func (client *ServiceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceResource, options *ServiceClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an API Management service. This is long running operation and could take several minutes +// to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceResource, options *ServiceClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServiceClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServiceClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceResource, _ *ServiceClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an existing API Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - ServiceClientBeginDeleteOptions contains the optional parameters for the ServiceClient.BeginDelete method. +func (client *ServiceClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginDeleteOptions) (*runtime.Poller[ServiceClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an existing API Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServiceClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServiceClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *ServiceClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets an API Management service resource description. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - ServiceClientGetOptions contains the optional parameters for the ServiceClient.Get method. +func (client *ServiceClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientGetOptions) (ServiceClientGetResponse, error) { + var err error + const operationName = "ServiceClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return ServiceClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServiceClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *ServiceClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServiceClient) getHandleResponse(resp *http.Response) (ServiceClientGetResponse, error) { + result := ServiceClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceResource); err != nil { + return ServiceClientGetResponse{}, err + } + return result, nil +} + +// GetDomainOwnershipIdentifier - Get the custom domain ownership identifier for an API Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - options - ServiceClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the ServiceClient.GetDomainOwnershipIdentifier +// method. +func (client *ServiceClient) GetDomainOwnershipIdentifier(ctx context.Context, options *ServiceClientGetDomainOwnershipIdentifierOptions) (ServiceClientGetDomainOwnershipIdentifierResponse, error) { + var err error + const operationName = "ServiceClient.GetDomainOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDomainOwnershipIdentifierCreateRequest(ctx, options) + if err != nil { + return ServiceClientGetDomainOwnershipIdentifierResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceClientGetDomainOwnershipIdentifierResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceClientGetDomainOwnershipIdentifierResponse{}, err + } + resp, err := client.getDomainOwnershipIdentifierHandleResponse(httpResp) + return resp, err +} + +// getDomainOwnershipIdentifierCreateRequest creates the GetDomainOwnershipIdentifier request. +func (client *ServiceClient) getDomainOwnershipIdentifierCreateRequest(ctx context.Context, _ *ServiceClientGetDomainOwnershipIdentifierOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDomainOwnershipIdentifierHandleResponse handles the GetDomainOwnershipIdentifier response. +func (client *ServiceClient) getDomainOwnershipIdentifierHandleResponse(resp *http.Response) (ServiceClientGetDomainOwnershipIdentifierResponse, error) { + result := ServiceClientGetDomainOwnershipIdentifierResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceGetDomainOwnershipIdentifierResult); err != nil { + return ServiceClientGetDomainOwnershipIdentifierResponse{}, err + } + return result, nil +} + +// GetSsoToken - Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - ServiceClientGetSsoTokenOptions contains the optional parameters for the ServiceClient.GetSsoToken method. +func (client *ServiceClient) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientGetSsoTokenOptions) (ServiceClientGetSsoTokenResponse, error) { + var err error + const operationName = "ServiceClient.GetSsoToken" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSsoTokenCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return ServiceClientGetSsoTokenResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceClientGetSsoTokenResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceClientGetSsoTokenResponse{}, err + } + resp, err := client.getSsoTokenHandleResponse(httpResp) + return resp, err +} + +// getSsoTokenCreateRequest creates the GetSsoToken request. +func (client *ServiceClient) getSsoTokenCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *ServiceClientGetSsoTokenOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSsoTokenHandleResponse handles the GetSsoToken response. +func (client *ServiceClient) getSsoTokenHandleResponse(resp *http.Response) (ServiceClientGetSsoTokenResponse, error) { + result := ServiceClientGetSsoTokenResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceGetSsoTokenResult); err != nil { + return ServiceClientGetSsoTokenResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all API Management services within an Azure subscription. +// +// Generated from API version 2024-05-01 +// - options - ServiceClientListOptions contains the optional parameters for the ServiceClient.NewListPager method. +func (client *ServiceClient) NewListPager(options *ServiceClientListOptions) *runtime.Pager[ServiceClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ServiceClientListResponse]{ + More: func(page ServiceClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServiceClientListResponse) (ServiceClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return ServiceClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ServiceClient) listCreateRequest(ctx context.Context, _ *ServiceClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ServiceClient) listHandleResponse(resp *http.Response) (ServiceClientListResponse, error) { + result := ServiceClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceListResult); err != nil { + return ServiceClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - List all API Management services within a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ServiceClientListByResourceGroupOptions contains the optional parameters for the ServiceClient.NewListByResourceGroupPager +// method. +func (client *ServiceClient) NewListByResourceGroupPager(resourceGroupName string, options *ServiceClientListByResourceGroupOptions) *runtime.Pager[ServiceClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ServiceClientListByResourceGroupResponse]{ + More: func(page ServiceClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServiceClientListByResourceGroupResponse) (ServiceClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ServiceClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ServiceClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *ServiceClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ServiceClient) listByResourceGroupHandleResponse(resp *http.Response) (ServiceClientListByResourceGroupResponse, error) { + result := ServiceClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceListResult); err != nil { + return ServiceClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginMigrateToStv2 - Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. +// This change is not reversible. This is long running operation and could take several +// minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - ServiceClientBeginMigrateToStv2Options contains the optional parameters for the ServiceClient.BeginMigrateToStv2 +// method. +func (client *ServiceClient) BeginMigrateToStv2(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginMigrateToStv2Options) (*runtime.Poller[ServiceClientMigrateToStv2Response], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrateToStv2(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceClientMigrateToStv2Response]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceClientMigrateToStv2Response]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// MigrateToStv2 - Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. +// This change is not reversible. This is long running operation and could take several +// minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceClient) migrateToStv2(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginMigrateToStv2Options) (*http.Response, error) { + var err error + const operationName = "ServiceClient.BeginMigrateToStv2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateToStv2CreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrateToStv2CreateRequest creates the MigrateToStv2 request. +func (client *ServiceClient) migrateToStv2CreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceClientBeginMigrateToStv2Options) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginRestore - Restores a backup of an API Management service created using the ApiManagementService_Backup operation on +// the current service. This is a long running operation and could take several minutes to +// complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - parameters - Parameters supplied to the Restore API Management service from backup operation. +// - options - ServiceClientBeginRestoreOptions contains the optional parameters for the ServiceClient.BeginRestore method. +func (client *ServiceClient) BeginRestore(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginRestoreOptions) (*runtime.Poller[ServiceClientRestoreResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restore(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceClientRestoreResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceClientRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Restore - Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the +// current service. This is a long running operation and could take several minutes to +// complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceClient) restore(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, options *ServiceClientBeginRestoreOptions) (*http.Response, error) { + var err error + const operationName = "ServiceClient.BeginRestore" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreCreateRequest creates the Restore request. +func (client *ServiceClient) restoreCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters, _ *ServiceClientBeginRestoreOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdate - Updates an existing API Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - parameters - Parameters supplied to the CreateOrUpdate API Management service operation. +// - options - ServiceClientBeginUpdateOptions contains the optional parameters for the ServiceClient.BeginUpdate method. +func (client *ServiceClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateParameters, options *ServiceClientBeginUpdateOptions) (*runtime.Poller[ServiceClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an existing API Management service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceClient) update(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateParameters, options *ServiceClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServiceClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ServiceClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateParameters, _ *ServiceClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/serviceskus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/serviceskus_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/serviceskus_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/serviceskus_client.go index 94f4397c..a9508557 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/serviceskus_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/serviceskus_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type ServiceSKUsClient struct { } // NewServiceSKUsClient creates a new instance of ServiceSKUsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewServiceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceSKUsClient, error) { - cl, err := arm.NewClient(moduleName+".ServiceSKUsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,8 +42,8 @@ func NewServiceSKUsClient(subscriptionID string, credential azcore.TokenCredenti // NewListAvailableServiceSKUsPager - Gets all available SKU for a given API Management service // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - ServiceSKUsClientListAvailableServiceSKUsOptions contains the optional parameters for the ServiceSKUsClient.NewListAvailableServiceSKUsPager // method. @@ -58,30 +53,25 @@ func (client *ServiceSKUsClient) NewListAvailableServiceSKUsPager(resourceGroupN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ServiceSKUsClientListAvailableServiceSKUsResponse) (ServiceSKUsClientListAvailableServiceSKUsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAvailableServiceSKUsCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceSKUsClient.NewListAvailableServiceSKUsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAvailableServiceSKUsCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return ServiceSKUsClientListAvailableServiceSKUsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ServiceSKUsClientListAvailableServiceSKUsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceSKUsClientListAvailableServiceSKUsResponse{}, runtime.NewResponseError(resp) - } return client.listAvailableServiceSKUsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listAvailableServiceSKUsCreateRequest creates the ListAvailableServiceSKUs request. -func (client *ServiceSKUsClient) listAvailableServiceSKUsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceSKUsClientListAvailableServiceSKUsOptions) (*policy.Request, error) { +func (client *ServiceSKUsClient) listAvailableServiceSKUsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *ServiceSKUsClientListAvailableServiceSKUsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -100,7 +90,7 @@ func (client *ServiceSKUsClient) listAvailableServiceSKUsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/signinsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/signinsettings_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/signinsettings_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/signinsettings_client.go index 0437d061..f15bca91 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/signinsettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/signinsettings_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type SignInSettingsClient struct { } // NewSignInSettingsClient creates a new instance of SignInSettingsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSignInSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SignInSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".SignInSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +43,32 @@ func NewSignInSettingsClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Create or Update Sign-In settings. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - parameters - Create or update parameters. // - options - SignInSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignInSettingsClient.CreateOrUpdate // method. func (client *SignInSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSigninSettings, options *SignInSettingsClientCreateOrUpdateOptions) (SignInSettingsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SignInSettingsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) if err != nil { return SignInSettingsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SignInSettingsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SignInSettingsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SignInSettingsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -89,13 +91,16 @@ func (client *SignInSettingsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -110,27 +115,34 @@ func (client *SignInSettingsClient) createOrUpdateHandleResponse(resp *http.Resp // Get - Get Sign In Settings for the Portal // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - SignInSettingsClientGetOptions contains the optional parameters for the SignInSettingsClient.Get method. func (client *SignInSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *SignInSettingsClientGetOptions) (SignInSettingsClientGetResponse, error) { + var err error + const operationName = "SignInSettingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return SignInSettingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SignInSettingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SignInSettingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SignInSettingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *SignInSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *SignInSettingsClientGetOptions) (*policy.Request, error) { +func (client *SignInSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *SignInSettingsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -149,7 +161,7 @@ func (client *SignInSettingsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -169,28 +181,35 @@ func (client *SignInSettingsClient) getHandleResponse(resp *http.Response) (Sign // GetEntityTag - Gets the entity state (Etag) version of the SignInSettings. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - SignInSettingsClientGetEntityTagOptions contains the optional parameters for the SignInSettingsClient.GetEntityTag // method. func (client *SignInSettingsClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, options *SignInSettingsClientGetEntityTagOptions) (SignInSettingsClientGetEntityTagResponse, error) { + var err error + const operationName = "SignInSettingsClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return SignInSettingsClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SignInSettingsClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SignInSettingsClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SignInSettingsClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *SignInSettingsClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *SignInSettingsClientGetEntityTagOptions) (*policy.Request, error) { +func (client *SignInSettingsClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *SignInSettingsClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -209,7 +228,7 @@ func (client *SignInSettingsClient) getEntityTagCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,41 +236,46 @@ func (client *SignInSettingsClient) getEntityTagCreateRequest(ctx context.Contex // getEntityTagHandleResponse handles the GetEntityTag response. func (client *SignInSettingsClient) getEntityTagHandleResponse(resp *http.Response) (SignInSettingsClientGetEntityTagResponse, error) { - result := SignInSettingsClientGetEntityTagResponse{} + result := SignInSettingsClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // Update - Update Sign-In settings. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - parameters - Update Sign-In settings. // - options - SignInSettingsClientUpdateOptions contains the optional parameters for the SignInSettingsClient.Update method. func (client *SignInSettingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalSigninSettings, options *SignInSettingsClientUpdateOptions) (SignInSettingsClientUpdateResponse, error) { + var err error + const operationName = "SignInSettingsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, ifMatch, parameters, options) if err != nil { return SignInSettingsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SignInSettingsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return SignInSettingsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SignInSettingsClientUpdateResponse{}, err } return SignInSettingsClientUpdateResponse{}, nil } // updateCreateRequest creates the Update request. -func (client *SignInSettingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalSigninSettings, options *SignInSettingsClientUpdateOptions) (*policy.Request, error) { +func (client *SignInSettingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalSigninSettings, _ *SignInSettingsClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -270,9 +294,12 @@ func (client *SignInSettingsClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/signupsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/signupsettings_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/signupsettings_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/signupsettings_client.go index 7829fdec..92bc58c8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/signupsettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/signupsettings_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type SignUpSettingsClient struct { } // NewSignUpSettingsClient creates a new instance of SignUpSettingsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSignUpSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SignUpSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".SignUpSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +43,32 @@ func NewSignUpSettingsClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Create or Update Sign-Up settings. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - parameters - Create or update parameters. // - options - SignUpSettingsClientCreateOrUpdateOptions contains the optional parameters for the SignUpSettingsClient.CreateOrUpdate // method. func (client *SignUpSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSignupSettings, options *SignUpSettingsClientCreateOrUpdateOptions) (SignUpSettingsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SignUpSettingsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) if err != nil { return SignUpSettingsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SignUpSettingsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SignUpSettingsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SignUpSettingsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -89,13 +91,16 @@ func (client *SignUpSettingsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -110,27 +115,34 @@ func (client *SignUpSettingsClient) createOrUpdateHandleResponse(resp *http.Resp // Get - Get Sign Up Settings for the Portal // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - SignUpSettingsClientGetOptions contains the optional parameters for the SignUpSettingsClient.Get method. func (client *SignUpSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *SignUpSettingsClientGetOptions) (SignUpSettingsClientGetResponse, error) { + var err error + const operationName = "SignUpSettingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return SignUpSettingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SignUpSettingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SignUpSettingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SignUpSettingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *SignUpSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *SignUpSettingsClientGetOptions) (*policy.Request, error) { +func (client *SignUpSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *SignUpSettingsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -149,7 +161,7 @@ func (client *SignUpSettingsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -169,28 +181,35 @@ func (client *SignUpSettingsClient) getHandleResponse(resp *http.Response) (Sign // GetEntityTag - Gets the entity state (Etag) version of the SignUpSettings. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - SignUpSettingsClientGetEntityTagOptions contains the optional parameters for the SignUpSettingsClient.GetEntityTag // method. func (client *SignUpSettingsClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, options *SignUpSettingsClientGetEntityTagOptions) (SignUpSettingsClientGetEntityTagResponse, error) { + var err error + const operationName = "SignUpSettingsClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { return SignUpSettingsClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SignUpSettingsClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SignUpSettingsClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SignUpSettingsClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *SignUpSettingsClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *SignUpSettingsClientGetEntityTagOptions) (*policy.Request, error) { +func (client *SignUpSettingsClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *SignUpSettingsClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -209,7 +228,7 @@ func (client *SignUpSettingsClient) getEntityTagCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,41 +236,46 @@ func (client *SignUpSettingsClient) getEntityTagCreateRequest(ctx context.Contex // getEntityTagHandleResponse handles the GetEntityTag response. func (client *SignUpSettingsClient) getEntityTagHandleResponse(resp *http.Response) (SignUpSettingsClientGetEntityTagResponse, error) { - result := SignUpSettingsClientGetEntityTagResponse{} + result := SignUpSettingsClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // Update - Update Sign-Up settings. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - parameters - Update Sign-Up settings. // - options - SignUpSettingsClientUpdateOptions contains the optional parameters for the SignUpSettingsClient.Update method. func (client *SignUpSettingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalSignupSettings, options *SignUpSettingsClientUpdateOptions) (SignUpSettingsClientUpdateResponse, error) { + var err error + const operationName = "SignUpSettingsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, ifMatch, parameters, options) if err != nil { return SignUpSettingsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SignUpSettingsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return SignUpSettingsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SignUpSettingsClientUpdateResponse{}, err } return SignUpSettingsClientUpdateResponse{}, nil } // updateCreateRequest creates the Update request. -func (client *SignUpSettingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalSignupSettings, options *SignUpSettingsClientUpdateOptions) (*policy.Request, error) { +func (client *SignUpSettingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string, parameters PortalSignupSettings, _ *SignUpSettingsClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -270,9 +294,12 @@ func (client *SignUpSettingsClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/skus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/skus_client.go new file mode 100644 index 00000000..c7671b4a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/skus_client.go @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SKUsClient contains the methods for the APIManagementSKUs group. +// Don't use this type directly, use NewSKUsClient() instead. +type SKUsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSKUsClient creates a new instance of SKUsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SKUsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. +// +// Generated from API version 2024-05-01 +// - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. +func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ + More: func(page SKUsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SKUsClientListResponse) (SKUsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SKUsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return SKUsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SKUsClient) listCreateRequest(ctx context.Context, _ *SKUsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SKUsClient) listHandleResponse(resp *http.Response) (SKUsClientListResponse, error) { + result := SKUsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SKUsResult); err != nil { + return SKUsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/subscription_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/subscription_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/subscription_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/subscription_client.go index 5c1dc5ba..f2a99829 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/subscription_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/subscription_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type SubscriptionClient struct { } // NewSubscriptionClient creates a new instance of SubscriptionClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSubscriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionClient, error) { - cl, err := arm.NewClient(moduleName+".SubscriptionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,26 +44,33 @@ func NewSubscriptionClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Creates or updates the subscription of specified user to the specified product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. // - parameters - Create parameters. // - options - SubscriptionClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionClient.CreateOrUpdate // method. func (client *SubscriptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters SubscriptionCreateParameters, options *SubscriptionClientCreateOrUpdateOptions) (SubscriptionClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SubscriptionClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, sid, parameters, options) if err != nil { return SubscriptionClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SubscriptionClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SubscriptionClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SubscriptionClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -95,19 +97,22 @@ func (client *SubscriptionClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.Notify != nil { - reqQP.Set("notify", strconv.FormatBool(*options.Notify)) - } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") if options != nil && options.AppType != nil { reqQP.Set("appType", string(*options.AppType)) } + if options != nil && options.Notify != nil { + reqQP.Set("notify", strconv.FormatBool(*options.Notify)) + } req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -125,30 +130,36 @@ func (client *SubscriptionClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Deletes the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - SubscriptionClientDeleteOptions contains the optional parameters for the SubscriptionClient.Delete method. func (client *SubscriptionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string, options *SubscriptionClientDeleteOptions) (SubscriptionClientDeleteResponse, error) { + var err error + const operationName = "SubscriptionClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, sid, ifMatch, options) if err != nil { return SubscriptionClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SubscriptionClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SubscriptionClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SubscriptionClientDeleteResponse{}, err } return SubscriptionClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *SubscriptionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string, options *SubscriptionClientDeleteOptions) (*policy.Request, error) { +func (client *SubscriptionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string, _ *SubscriptionClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -171,38 +182,45 @@ func (client *SubscriptionClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // Get - Gets the specified Subscription entity. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. // - options - SubscriptionClientGetOptions contains the optional parameters for the SubscriptionClient.Get method. func (client *SubscriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientGetOptions) (SubscriptionClientGetResponse, error) { + var err error + const operationName = "SubscriptionClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, sid, options) if err != nil { return SubscriptionClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SubscriptionClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubscriptionClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SubscriptionClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *SubscriptionClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientGetOptions) (*policy.Request, error) { +func (client *SubscriptionClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, _ *SubscriptionClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -225,7 +243,7 @@ func (client *SubscriptionClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -245,29 +263,36 @@ func (client *SubscriptionClient) getHandleResponse(resp *http.Response) (Subscr // GetEntityTag - Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. // - options - SubscriptionClientGetEntityTagOptions contains the optional parameters for the SubscriptionClient.GetEntityTag // method. func (client *SubscriptionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientGetEntityTagOptions) (SubscriptionClientGetEntityTagResponse, error) { + var err error + const operationName = "SubscriptionClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, sid, options) if err != nil { return SubscriptionClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SubscriptionClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubscriptionClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SubscriptionClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *SubscriptionClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientGetEntityTagOptions) (*policy.Request, error) { +func (client *SubscriptionClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, _ *SubscriptionClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -290,7 +315,7 @@ func (client *SubscriptionClient) getEntityTagCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -298,18 +323,17 @@ func (client *SubscriptionClient) getEntityTagCreateRequest(ctx context.Context, // getEntityTagHandleResponse handles the GetEntityTag response. func (client *SubscriptionClient) getEntityTagHandleResponse(resp *http.Response) (SubscriptionClientGetEntityTagResponse, error) { - result := SubscriptionClientGetEntityTagResponse{} + result := SubscriptionClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListPager - Lists all subscriptions of the API Management service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - SubscriptionClientListOptions contains the optional parameters for the SubscriptionClient.NewListPager method. func (client *SubscriptionClient) NewListPager(resourceGroupName string, serviceName string, options *SubscriptionClientListOptions) *runtime.Pager[SubscriptionClientListResponse] { @@ -318,25 +342,20 @@ func (client *SubscriptionClient) NewListPager(resourceGroupName string, service return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SubscriptionClientListResponse) (SubscriptionClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SubscriptionClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return SubscriptionClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SubscriptionClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubscriptionClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -363,13 +382,13 @@ func (client *SubscriptionClient) listCreateRequest(ctx context.Context, resourc if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -387,29 +406,36 @@ func (client *SubscriptionClient) listHandleResponse(resp *http.Response) (Subsc // ListSecrets - Gets the specified Subscription keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. // - options - SubscriptionClientListSecretsOptions contains the optional parameters for the SubscriptionClient.ListSecrets // method. func (client *SubscriptionClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientListSecretsOptions) (SubscriptionClientListSecretsResponse, error) { + var err error + const operationName = "SubscriptionClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, serviceName, sid, options) if err != nil { return SubscriptionClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SubscriptionClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubscriptionClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SubscriptionClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. -func (client *SubscriptionClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientListSecretsOptions) (*policy.Request, error) { +func (client *SubscriptionClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, _ *SubscriptionClientListSecretsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -432,7 +458,7 @@ func (client *SubscriptionClient) listSecretsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -453,29 +479,35 @@ func (client *SubscriptionClient) listSecretsHandleResponse(resp *http.Response) // RegeneratePrimaryKey - Regenerates primary key of existing subscription of the API Management service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. // - options - SubscriptionClientRegeneratePrimaryKeyOptions contains the optional parameters for the SubscriptionClient.RegeneratePrimaryKey // method. func (client *SubscriptionClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientRegeneratePrimaryKeyOptions) (SubscriptionClientRegeneratePrimaryKeyResponse, error) { + var err error + const operationName = "SubscriptionClient.RegeneratePrimaryKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regeneratePrimaryKeyCreateRequest(ctx, resourceGroupName, serviceName, sid, options) if err != nil { return SubscriptionClientRegeneratePrimaryKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SubscriptionClientRegeneratePrimaryKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return SubscriptionClientRegeneratePrimaryKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SubscriptionClientRegeneratePrimaryKeyResponse{}, err } return SubscriptionClientRegeneratePrimaryKeyResponse{}, nil } // regeneratePrimaryKeyCreateRequest creates the RegeneratePrimaryKey request. -func (client *SubscriptionClient) regeneratePrimaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientRegeneratePrimaryKeyOptions) (*policy.Request, error) { +func (client *SubscriptionClient) regeneratePrimaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, _ *SubscriptionClientRegeneratePrimaryKeyOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -498,7 +530,7 @@ func (client *SubscriptionClient) regeneratePrimaryKeyCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -507,29 +539,35 @@ func (client *SubscriptionClient) regeneratePrimaryKeyCreateRequest(ctx context. // RegenerateSecondaryKey - Regenerates secondary key of existing subscription of the API Management service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. // - options - SubscriptionClientRegenerateSecondaryKeyOptions contains the optional parameters for the SubscriptionClient.RegenerateSecondaryKey // method. func (client *SubscriptionClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientRegenerateSecondaryKeyOptions) (SubscriptionClientRegenerateSecondaryKeyResponse, error) { + var err error + const operationName = "SubscriptionClient.RegenerateSecondaryKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regenerateSecondaryKeyCreateRequest(ctx, resourceGroupName, serviceName, sid, options) if err != nil { return SubscriptionClientRegenerateSecondaryKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SubscriptionClientRegenerateSecondaryKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return SubscriptionClientRegenerateSecondaryKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SubscriptionClientRegenerateSecondaryKeyResponse{}, err } return SubscriptionClientRegenerateSecondaryKeyResponse{}, nil } // regenerateSecondaryKeyCreateRequest creates the RegenerateSecondaryKey request. -func (client *SubscriptionClient) regenerateSecondaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, options *SubscriptionClientRegenerateSecondaryKeyOptions) (*policy.Request, error) { +func (client *SubscriptionClient) regenerateSecondaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, sid string, _ *SubscriptionClientRegenerateSecondaryKeyOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -552,7 +590,7 @@ func (client *SubscriptionClient) regenerateSecondaryKeyCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -561,8 +599,8 @@ func (client *SubscriptionClient) regenerateSecondaryKeyCreateRequest(ctx contex // Update - Updates the details of a subscription specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -570,18 +608,25 @@ func (client *SubscriptionClient) regenerateSecondaryKeyCreateRequest(ctx contex // - parameters - Update parameters. // - options - SubscriptionClientUpdateOptions contains the optional parameters for the SubscriptionClient.Update method. func (client *SubscriptionClient) Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string, parameters SubscriptionUpdateParameters, options *SubscriptionClientUpdateOptions) (SubscriptionClientUpdateResponse, error) { + var err error + const operationName = "SubscriptionClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, sid, ifMatch, parameters, options) if err != nil { return SubscriptionClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SubscriptionClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubscriptionClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SubscriptionClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -608,17 +653,20 @@ func (client *SubscriptionClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - if options != nil && options.Notify != nil { - reqQP.Set("notify", strconv.FormatBool(*options.Notify)) - } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") if options != nil && options.AppType != nil { reqQP.Set("appType", string(*options.AppType)) } + if options != nil && options.Notify != nil { + reqQP.Set("notify", strconv.FormatBool(*options.Notify)) + } req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tag_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tag_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tag_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tag_client.go index eafe5f3b..8e676c91 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tag_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tag_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type TagClient struct { } // NewTagClient creates a new instance of TagClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTagClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TagClient, error) { - cl, err := arm.NewClient(moduleName+".TagClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,30 +44,37 @@ func NewTagClient(subscriptionID string, credential azcore.TokenCredential, opti // AssignToAPI - Assign tag to the Api. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientAssignToAPIOptions contains the optional parameters for the TagClient.AssignToAPI method. func (client *TagClient) AssignToAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientAssignToAPIOptions) (TagClientAssignToAPIResponse, error) { + var err error + const operationName = "TagClient.AssignToAPI" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.assignToAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, tagID, options) if err != nil { return TagClientAssignToAPIResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientAssignToAPIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return TagClientAssignToAPIResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TagClientAssignToAPIResponse{}, err } - return client.assignToAPIHandleResponse(resp) + resp, err := client.assignToAPIHandleResponse(httpResp) + return resp, err } // assignToAPICreateRequest creates the AssignToAPI request. -func (client *TagClient) assignToAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientAssignToAPIOptions) (*policy.Request, error) { +func (client *TagClient) assignToAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, _ *TagClientAssignToAPIOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -99,7 +101,7 @@ func (client *TagClient) assignToAPICreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -120,8 +122,8 @@ func (client *TagClient) assignToAPIHandleResponse(resp *http.Response) (TagClie // AssignToOperation - Assign tag to the Operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -129,22 +131,29 @@ func (client *TagClient) assignToAPIHandleResponse(resp *http.Response) (TagClie // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientAssignToOperationOptions contains the optional parameters for the TagClient.AssignToOperation method. func (client *TagClient) AssignToOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientAssignToOperationOptions) (TagClientAssignToOperationResponse, error) { + var err error + const operationName = "TagClient.AssignToOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.assignToOperationCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, tagID, options) if err != nil { return TagClientAssignToOperationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientAssignToOperationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return TagClientAssignToOperationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TagClientAssignToOperationResponse{}, err } - return client.assignToOperationHandleResponse(resp) + resp, err := client.assignToOperationHandleResponse(httpResp) + return resp, err } // assignToOperationCreateRequest creates the AssignToOperation request. -func (client *TagClient) assignToOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientAssignToOperationOptions) (*policy.Request, error) { +func (client *TagClient) assignToOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, _ *TagClientAssignToOperationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -175,7 +184,7 @@ func (client *TagClient) assignToOperationCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,29 +202,36 @@ func (client *TagClient) assignToOperationHandleResponse(resp *http.Response) (T // AssignToProduct - Assign tag to the Product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientAssignToProductOptions contains the optional parameters for the TagClient.AssignToProduct method. func (client *TagClient) AssignToProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientAssignToProductOptions) (TagClientAssignToProductResponse, error) { + var err error + const operationName = "TagClient.AssignToProduct" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.assignToProductCreateRequest(ctx, resourceGroupName, serviceName, productID, tagID, options) if err != nil { return TagClientAssignToProductResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientAssignToProductResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return TagClientAssignToProductResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TagClientAssignToProductResponse{}, err } - return client.assignToProductHandleResponse(resp) + resp, err := client.assignToProductHandleResponse(httpResp) + return resp, err } // assignToProductCreateRequest creates the AssignToProduct request. -func (client *TagClient) assignToProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientAssignToProductOptions) (*policy.Request, error) { +func (client *TagClient) assignToProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, _ *TagClientAssignToProductOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -242,7 +258,7 @@ func (client *TagClient) assignToProductCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,25 +276,32 @@ func (client *TagClient) assignToProductHandleResponse(resp *http.Response) (Tag // CreateOrUpdate - Creates a tag. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - parameters - Create parameters. // - options - TagClientCreateOrUpdateOptions contains the optional parameters for the TagClient.CreateOrUpdate method. func (client *TagClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters TagCreateUpdateParameters, options *TagClientCreateOrUpdateOptions) (TagClientCreateOrUpdateResponse, error) { + var err error + const operationName = "TagClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, tagID, parameters, options) if err != nil { return TagClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return TagClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TagClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -305,13 +328,16 @@ func (client *TagClient) createOrUpdateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { req.Raw().Header["If-Match"] = []string{*options.IfMatch} } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -329,30 +355,36 @@ func (client *TagClient) createOrUpdateHandleResponse(resp *http.Response) (TagC // Delete - Deletes specific tag of the API Management service instance. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or // it should be * for unconditional update. // - options - TagClientDeleteOptions contains the optional parameters for the TagClient.Delete method. func (client *TagClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string, options *TagClientDeleteOptions) (TagClientDeleteResponse, error) { + var err error + const operationName = "TagClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, tagID, ifMatch, options) if err != nil { return TagClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return TagClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TagClientDeleteResponse{}, err } return TagClientDeleteResponse{}, nil } // deleteCreateRequest creates the Delete request. -func (client *TagClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string, options *TagClientDeleteOptions) (*policy.Request, error) { +func (client *TagClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string, _ *TagClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -375,40 +407,46 @@ func (client *TagClient) deleteCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} return req, nil } // DetachFromAPI - Detach the tag from the Api. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientDetachFromAPIOptions contains the optional parameters for the TagClient.DetachFromAPI method. func (client *TagClient) DetachFromAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientDetachFromAPIOptions) (TagClientDetachFromAPIResponse, error) { + var err error + const operationName = "TagClient.DetachFromAPI" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.detachFromAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, tagID, options) if err != nil { return TagClientDetachFromAPIResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientDetachFromAPIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return TagClientDetachFromAPIResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TagClientDetachFromAPIResponse{}, err } return TagClientDetachFromAPIResponse{}, nil } // detachFromAPICreateRequest creates the DetachFromAPI request. -func (client *TagClient) detachFromAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientDetachFromAPIOptions) (*policy.Request, error) { +func (client *TagClient) detachFromAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, _ *TagClientDetachFromAPIOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -435,7 +473,7 @@ func (client *TagClient) detachFromAPICreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -444,8 +482,8 @@ func (client *TagClient) detachFromAPICreateRequest(ctx context.Context, resourc // DetachFromOperation - Detach the tag from the Operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -453,22 +491,28 @@ func (client *TagClient) detachFromAPICreateRequest(ctx context.Context, resourc // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientDetachFromOperationOptions contains the optional parameters for the TagClient.DetachFromOperation method. func (client *TagClient) DetachFromOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientDetachFromOperationOptions) (TagClientDetachFromOperationResponse, error) { + var err error + const operationName = "TagClient.DetachFromOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.detachFromOperationCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, tagID, options) if err != nil { return TagClientDetachFromOperationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientDetachFromOperationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return TagClientDetachFromOperationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TagClientDetachFromOperationResponse{}, err } return TagClientDetachFromOperationResponse{}, nil } // detachFromOperationCreateRequest creates the DetachFromOperation request. -func (client *TagClient) detachFromOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientDetachFromOperationOptions) (*policy.Request, error) { +func (client *TagClient) detachFromOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, _ *TagClientDetachFromOperationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -499,7 +543,7 @@ func (client *TagClient) detachFromOperationCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -508,29 +552,35 @@ func (client *TagClient) detachFromOperationCreateRequest(ctx context.Context, r // DetachFromProduct - Detach the tag from the Product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientDetachFromProductOptions contains the optional parameters for the TagClient.DetachFromProduct method. func (client *TagClient) DetachFromProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientDetachFromProductOptions) (TagClientDetachFromProductResponse, error) { + var err error + const operationName = "TagClient.DetachFromProduct" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.detachFromProductCreateRequest(ctx, resourceGroupName, serviceName, productID, tagID, options) if err != nil { return TagClientDetachFromProductResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientDetachFromProductResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return TagClientDetachFromProductResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TagClientDetachFromProductResponse{}, err } return TagClientDetachFromProductResponse{}, nil } // detachFromProductCreateRequest creates the DetachFromProduct request. -func (client *TagClient) detachFromProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientDetachFromProductOptions) (*policy.Request, error) { +func (client *TagClient) detachFromProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, _ *TagClientDetachFromProductOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -557,7 +607,7 @@ func (client *TagClient) detachFromProductCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -566,28 +616,35 @@ func (client *TagClient) detachFromProductCreateRequest(ctx context.Context, res // Get - Gets the details of the tag specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientGetOptions contains the optional parameters for the TagClient.Get method. func (client *TagClient) Get(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagClientGetOptions) (TagClientGetResponse, error) { + var err error + const operationName = "TagClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, tagID, options) if err != nil { return TagClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *TagClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagClientGetOptions) (*policy.Request, error) { +func (client *TagClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, _ *TagClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -610,7 +667,7 @@ func (client *TagClient) getCreateRequest(ctx context.Context, resourceGroupName return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -631,30 +688,37 @@ func (client *TagClient) getHandleResponse(resp *http.Response) (TagClientGetRes // GetByAPI - Get tag associated with the API. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientGetByAPIOptions contains the optional parameters for the TagClient.GetByAPI method. func (client *TagClient) GetByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientGetByAPIOptions) (TagClientGetByAPIResponse, error) { + var err error + const operationName = "TagClient.GetByAPI" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, tagID, options) if err != nil { return TagClientGetByAPIResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientGetByAPIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientGetByAPIResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagClientGetByAPIResponse{}, err } - return client.getByAPIHandleResponse(resp) + resp, err := client.getByAPIHandleResponse(httpResp) + return resp, err } // getByAPICreateRequest creates the GetByAPI request. -func (client *TagClient) getByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientGetByAPIOptions) (*policy.Request, error) { +func (client *TagClient) getByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, _ *TagClientGetByAPIOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -681,7 +745,7 @@ func (client *TagClient) getByAPICreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -702,8 +766,8 @@ func (client *TagClient) getByAPIHandleResponse(resp *http.Response) (TagClientG // GetByOperation - Get tag associated with the Operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -711,22 +775,29 @@ func (client *TagClient) getByAPIHandleResponse(resp *http.Response) (TagClientG // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientGetByOperationOptions contains the optional parameters for the TagClient.GetByOperation method. func (client *TagClient) GetByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientGetByOperationOptions) (TagClientGetByOperationResponse, error) { + var err error + const operationName = "TagClient.GetByOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByOperationCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, tagID, options) if err != nil { return TagClientGetByOperationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientGetByOperationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientGetByOperationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagClientGetByOperationResponse{}, err } - return client.getByOperationHandleResponse(resp) + resp, err := client.getByOperationHandleResponse(httpResp) + return resp, err } // getByOperationCreateRequest creates the GetByOperation request. -func (client *TagClient) getByOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientGetByOperationOptions) (*policy.Request, error) { +func (client *TagClient) getByOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, _ *TagClientGetByOperationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -757,7 +828,7 @@ func (client *TagClient) getByOperationCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -778,29 +849,36 @@ func (client *TagClient) getByOperationHandleResponse(resp *http.Response) (TagC // GetByProduct - Get tag associated with the Product. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientGetByProductOptions contains the optional parameters for the TagClient.GetByProduct method. func (client *TagClient) GetByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientGetByProductOptions) (TagClientGetByProductResponse, error) { + var err error + const operationName = "TagClient.GetByProduct" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, tagID, options) if err != nil { return TagClientGetByProductResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientGetByProductResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientGetByProductResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagClientGetByProductResponse{}, err } - return client.getByProductHandleResponse(resp) + resp, err := client.getByProductHandleResponse(httpResp) + return resp, err } // getByProductCreateRequest creates the GetByProduct request. -func (client *TagClient) getByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientGetByProductOptions) (*policy.Request, error) { +func (client *TagClient) getByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, _ *TagClientGetByProductOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -827,7 +905,7 @@ func (client *TagClient) getByProductCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -847,28 +925,35 @@ func (client *TagClient) getByProductHandleResponse(resp *http.Response) (TagCli // GetEntityState - Gets the entity state version of the tag specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientGetEntityStateOptions contains the optional parameters for the TagClient.GetEntityState method. func (client *TagClient) GetEntityState(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagClientGetEntityStateOptions) (TagClientGetEntityStateResponse, error) { + var err error + const operationName = "TagClient.GetEntityState" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityStateCreateRequest(ctx, resourceGroupName, serviceName, tagID, options) if err != nil { return TagClientGetEntityStateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientGetEntityStateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientGetEntityStateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagClientGetEntityStateResponse{}, err } - return client.getEntityStateHandleResponse(resp) + resp, err := client.getEntityStateHandleResponse(httpResp) + return resp, err } // getEntityStateCreateRequest creates the GetEntityState request. -func (client *TagClient) getEntityStateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagClientGetEntityStateOptions) (*policy.Request, error) { +func (client *TagClient) getEntityStateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, _ *TagClientGetEntityStateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -891,7 +976,7 @@ func (client *TagClient) getEntityStateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -899,40 +984,46 @@ func (client *TagClient) getEntityStateCreateRequest(ctx context.Context, resour // getEntityStateHandleResponse handles the GetEntityState response. func (client *TagClient) getEntityStateHandleResponse(resp *http.Response) (TagClientGetEntityStateResponse, error) { - result := TagClientGetEntityStateResponse{} + result := TagClientGetEntityStateResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // GetEntityStateByAPI - Gets the entity state version of the tag specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientGetEntityStateByAPIOptions contains the optional parameters for the TagClient.GetEntityStateByAPI method. func (client *TagClient) GetEntityStateByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientGetEntityStateByAPIOptions) (TagClientGetEntityStateByAPIResponse, error) { + var err error + const operationName = "TagClient.GetEntityStateByAPI" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityStateByAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, tagID, options) if err != nil { return TagClientGetEntityStateByAPIResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientGetEntityStateByAPIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientGetEntityStateByAPIResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagClientGetEntityStateByAPIResponse{}, err } - return client.getEntityStateByAPIHandleResponse(resp) + resp, err := client.getEntityStateByAPIHandleResponse(httpResp) + return resp, err } // getEntityStateByAPICreateRequest creates the GetEntityStateByAPI request. -func (client *TagClient) getEntityStateByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, options *TagClientGetEntityStateByAPIOptions) (*policy.Request, error) { +func (client *TagClient) getEntityStateByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, tagID string, _ *TagClientGetEntityStateByAPIOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -959,7 +1050,7 @@ func (client *TagClient) getEntityStateByAPICreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -967,18 +1058,17 @@ func (client *TagClient) getEntityStateByAPICreateRequest(ctx context.Context, r // getEntityStateByAPIHandleResponse handles the GetEntityStateByAPI response. func (client *TagClient) getEntityStateByAPIHandleResponse(resp *http.Response) (TagClientGetEntityStateByAPIResponse, error) { - result := TagClientGetEntityStateByAPIResponse{} + result := TagClientGetEntityStateByAPIResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // GetEntityStateByOperation - Gets the entity state version of the tag specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -987,22 +1077,29 @@ func (client *TagClient) getEntityStateByAPIHandleResponse(resp *http.Response) // - options - TagClientGetEntityStateByOperationOptions contains the optional parameters for the TagClient.GetEntityStateByOperation // method. func (client *TagClient) GetEntityStateByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientGetEntityStateByOperationOptions) (TagClientGetEntityStateByOperationResponse, error) { + var err error + const operationName = "TagClient.GetEntityStateByOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityStateByOperationCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, tagID, options) if err != nil { return TagClientGetEntityStateByOperationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientGetEntityStateByOperationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientGetEntityStateByOperationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagClientGetEntityStateByOperationResponse{}, err } - return client.getEntityStateByOperationHandleResponse(resp) + resp, err := client.getEntityStateByOperationHandleResponse(httpResp) + return resp, err } // getEntityStateByOperationCreateRequest creates the GetEntityStateByOperation request. -func (client *TagClient) getEntityStateByOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, options *TagClientGetEntityStateByOperationOptions) (*policy.Request, error) { +func (client *TagClient) getEntityStateByOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiID string, operationID string, tagID string, _ *TagClientGetEntityStateByOperationOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -1033,7 +1130,7 @@ func (client *TagClient) getEntityStateByOperationCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1041,40 +1138,46 @@ func (client *TagClient) getEntityStateByOperationCreateRequest(ctx context.Cont // getEntityStateByOperationHandleResponse handles the GetEntityStateByOperation response. func (client *TagClient) getEntityStateByOperationHandleResponse(resp *http.Response) (TagClientGetEntityStateByOperationResponse, error) { - result := TagClientGetEntityStateByOperationResponse{} + result := TagClientGetEntityStateByOperationResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // GetEntityStateByProduct - Gets the entity state version of the tag specified by its identifier. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - options - TagClientGetEntityStateByProductOptions contains the optional parameters for the TagClient.GetEntityStateByProduct // method. func (client *TagClient) GetEntityStateByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientGetEntityStateByProductOptions) (TagClientGetEntityStateByProductResponse, error) { + var err error + const operationName = "TagClient.GetEntityStateByProduct" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityStateByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, tagID, options) if err != nil { return TagClientGetEntityStateByProductResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientGetEntityStateByProductResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientGetEntityStateByProductResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagClientGetEntityStateByProductResponse{}, err } - return client.getEntityStateByProductHandleResponse(resp) + resp, err := client.getEntityStateByProductHandleResponse(httpResp) + return resp, err } // getEntityStateByProductCreateRequest creates the GetEntityStateByProduct request. -func (client *TagClient) getEntityStateByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, options *TagClientGetEntityStateByProductOptions) (*policy.Request, error) { +func (client *TagClient) getEntityStateByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, _ *TagClientGetEntityStateByProductOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -1101,7 +1204,7 @@ func (client *TagClient) getEntityStateByProductCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1109,18 +1212,17 @@ func (client *TagClient) getEntityStateByProductCreateRequest(ctx context.Contex // getEntityStateByProductHandleResponse handles the GetEntityStateByProduct response. func (client *TagClient) getEntityStateByProductHandleResponse(resp *http.Response) (TagClientGetEntityStateByProductResponse, error) { - result := TagClientGetEntityStateByProductResponse{} + result := TagClientGetEntityStateByProductResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByAPIPager - Lists all Tags associated with the API. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -1131,25 +1233,20 @@ func (client *TagClient) NewListByAPIPager(resourceGroupName string, serviceName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TagClientListByAPIResponse) (TagClientListByAPIResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TagClientListByAPIResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TagClient.NewListByAPIPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, apiID, options) + }, nil) if err != nil { return TagClientListByAPIResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientListByAPIResponse{}, runtime.NewResponseError(resp) - } return client.listByAPIHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1180,13 +1277,13 @@ func (client *TagClient) listByAPICreateRequest(ctx context.Context, resourceGro if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1203,8 +1300,8 @@ func (client *TagClient) listByAPIHandleResponse(resp *http.Response) (TagClient // NewListByOperationPager - Lists all Tags associated with the Operation. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has // ;rev=n as a suffix where n is the revision number. @@ -1216,25 +1313,20 @@ func (client *TagClient) NewListByOperationPager(resourceGroupName string, servi return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TagClientListByOperationResponse) (TagClientListByOperationResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByOperationCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TagClientListByOperationResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TagClient.NewListByOperationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByOperationCreateRequest(ctx, resourceGroupName, serviceName, apiID, operationID, options) + }, nil) if err != nil { return TagClientListByOperationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientListByOperationResponse{}, runtime.NewResponseError(resp) - } return client.listByOperationHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1269,13 +1361,13 @@ func (client *TagClient) listByOperationCreateRequest(ctx context.Context, resou if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1292,8 +1384,8 @@ func (client *TagClient) listByOperationHandleResponse(resp *http.Response) (Tag // NewListByProductPager - Lists all Tags associated with the Product. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - productID - Product identifier. Must be unique in the current API Management service instance. // - options - TagClientListByProductOptions contains the optional parameters for the TagClient.NewListByProductPager method. @@ -1303,25 +1395,20 @@ func (client *TagClient) NewListByProductPager(resourceGroupName string, service return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TagClientListByProductResponse) (TagClientListByProductResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TagClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, productID, options) + }, nil) if err != nil { return TagClientListByProductResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return TagClientListByProductResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientListByProductResponse{}, runtime.NewResponseError(resp) - } return client.listByProductHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1352,13 +1439,13 @@ func (client *TagClient) listByProductCreateRequest(ctx context.Context, resourc if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1375,8 +1462,8 @@ func (client *TagClient) listByProductHandleResponse(resp *http.Response) (TagCl // NewListByServicePager - Lists a collection of tags defined within a service instance. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - TagClientListByServiceOptions contains the optional parameters for the TagClient.NewListByServicePager method. func (client *TagClient) NewListByServicePager(resourceGroupName string, serviceName string, options *TagClientListByServiceOptions) *runtime.Pager[TagClientListByServiceResponse] { @@ -1385,25 +1472,20 @@ func (client *TagClient) NewListByServicePager(resourceGroupName string, service return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TagClientListByServiceResponse) (TagClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TagClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return TagClientListByServiceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return TagClientListByServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1430,16 +1512,16 @@ func (client *TagClient) listByServiceCreateRequest(ctx context.Context, resourc if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") if options != nil && options.Scope != nil { reqQP.Set("scope", *options.Scope) } - reqQP.Set("api-version", "2021-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1457,8 +1539,8 @@ func (client *TagClient) listByServiceHandleResponse(resp *http.Response) (TagCl // Update - Updates the details of the tag specified by its identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - tagID - Tag identifier. Must be unique in the current API Management service instance. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -1466,22 +1548,29 @@ func (client *TagClient) listByServiceHandleResponse(resp *http.Response) (TagCl // - parameters - Update parameters. // - options - TagClientUpdateOptions contains the optional parameters for the TagClient.Update method. func (client *TagClient) Update(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string, parameters TagCreateUpdateParameters, options *TagClientUpdateOptions) (TagClientUpdateResponse, error) { + var err error + const operationName = "TagClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, tagID, ifMatch, parameters, options) if err != nil { return TagClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TagClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *TagClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string, parameters TagCreateUpdateParameters, options *TagClientUpdateOptions) (*policy.Request, error) { +func (client *TagClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string, parameters TagCreateUpdateParameters, _ *TagClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -1504,11 +1593,14 @@ func (client *TagClient) updateCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagapilink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagapilink_client.go new file mode 100644 index 00000000..c5419161 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagapilink_client.go @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// TagAPILinkClient contains the methods for the TagAPILink group. +// Don't use this type directly, use NewTagAPILinkClient() instead. +type TagAPILinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTagAPILinkClient creates a new instance of TagAPILinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTagAPILinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TagAPILinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TagAPILinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Adds an API to the specified tag via link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Tag-API link identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - TagAPILinkClientCreateOrUpdateOptions contains the optional parameters for the TagAPILinkClient.CreateOrUpdate +// method. +func (client *TagAPILinkClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, tagID string, apiLinkID string, parameters TagAPILinkContract, options *TagAPILinkClientCreateOrUpdateOptions) (TagAPILinkClientCreateOrUpdateResponse, error) { + var err error + const operationName = "TagAPILinkClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, tagID, apiLinkID, parameters, options) + if err != nil { + return TagAPILinkClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TagAPILinkClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TagAPILinkClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *TagAPILinkClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, apiLinkID string, parameters TagAPILinkContract, _ *TagAPILinkClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *TagAPILinkClient) createOrUpdateHandleResponse(resp *http.Response) (TagAPILinkClientCreateOrUpdateResponse, error) { + result := TagAPILinkClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagAPILinkContract); err != nil { + return TagAPILinkClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified API from the specified tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Tag-API link identifier. Must be unique in the current API Management service instance. +// - options - TagAPILinkClientDeleteOptions contains the optional parameters for the TagAPILinkClient.Delete method. +func (client *TagAPILinkClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, tagID string, apiLinkID string, options *TagAPILinkClientDeleteOptions) (TagAPILinkClientDeleteResponse, error) { + var err error + const operationName = "TagAPILinkClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, tagID, apiLinkID, options) + if err != nil { + return TagAPILinkClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TagAPILinkClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TagAPILinkClientDeleteResponse{}, err + } + return TagAPILinkClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *TagAPILinkClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, apiLinkID string, _ *TagAPILinkClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the API link for the tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Tag-API link identifier. Must be unique in the current API Management service instance. +// - options - TagAPILinkClientGetOptions contains the optional parameters for the TagAPILinkClient.Get method. +func (client *TagAPILinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, tagID string, apiLinkID string, options *TagAPILinkClientGetOptions) (TagAPILinkClientGetResponse, error) { + var err error + const operationName = "TagAPILinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, tagID, apiLinkID, options) + if err != nil { + return TagAPILinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TagAPILinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagAPILinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *TagAPILinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, apiLinkID string, _ *TagAPILinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *TagAPILinkClient) getHandleResponse(resp *http.Response) (TagAPILinkClientGetResponse, error) { + result := TagAPILinkClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.TagAPILinkContract); err != nil { + return TagAPILinkClientGetResponse{}, err + } + return result, nil +} + +// NewListByProductPager - Lists a collection of the API links associated with a tag. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - options - TagAPILinkClientListByProductOptions contains the optional parameters for the TagAPILinkClient.NewListByProductPager +// method. +func (client *TagAPILinkClient) NewListByProductPager(resourceGroupName string, serviceName string, tagID string, options *TagAPILinkClientListByProductOptions) *runtime.Pager[TagAPILinkClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[TagAPILinkClientListByProductResponse]{ + More: func(page TagAPILinkClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TagAPILinkClientListByProductResponse) (TagAPILinkClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TagAPILinkClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, tagID, options) + }, nil) + if err != nil { + return TagAPILinkClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *TagAPILinkClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagAPILinkClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/apiLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *TagAPILinkClient) listByProductHandleResponse(resp *http.Response) (TagAPILinkClientListByProductResponse, error) { + result := TagAPILinkClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagAPILinkCollection); err != nil { + return TagAPILinkClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagoperationlink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagoperationlink_client.go new file mode 100644 index 00000000..9462be48 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagoperationlink_client.go @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// TagOperationLinkClient contains the methods for the TagOperationLink group. +// Don't use this type directly, use NewTagOperationLinkClient() instead. +type TagOperationLinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTagOperationLinkClient creates a new instance of TagOperationLinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTagOperationLinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TagOperationLinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TagOperationLinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Adds an operation to the specified tag via link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - operationLinkID - Tag-operation link identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - TagOperationLinkClientCreateOrUpdateOptions contains the optional parameters for the TagOperationLinkClient.CreateOrUpdate +// method. +func (client *TagOperationLinkClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, tagID string, operationLinkID string, parameters TagOperationLinkContract, options *TagOperationLinkClientCreateOrUpdateOptions) (TagOperationLinkClientCreateOrUpdateResponse, error) { + var err error + const operationName = "TagOperationLinkClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, tagID, operationLinkID, parameters, options) + if err != nil { + return TagOperationLinkClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TagOperationLinkClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TagOperationLinkClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *TagOperationLinkClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, operationLinkID string, parameters TagOperationLinkContract, _ *TagOperationLinkClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if operationLinkID == "" { + return nil, errors.New("parameter operationLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationLinkId}", url.PathEscape(operationLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *TagOperationLinkClient) createOrUpdateHandleResponse(resp *http.Response) (TagOperationLinkClientCreateOrUpdateResponse, error) { + result := TagOperationLinkClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagOperationLinkContract); err != nil { + return TagOperationLinkClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified operation from the specified tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - operationLinkID - Tag-operation link identifier. Must be unique in the current API Management service instance. +// - options - TagOperationLinkClientDeleteOptions contains the optional parameters for the TagOperationLinkClient.Delete method. +func (client *TagOperationLinkClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, tagID string, operationLinkID string, options *TagOperationLinkClientDeleteOptions) (TagOperationLinkClientDeleteResponse, error) { + var err error + const operationName = "TagOperationLinkClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, tagID, operationLinkID, options) + if err != nil { + return TagOperationLinkClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TagOperationLinkClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TagOperationLinkClientDeleteResponse{}, err + } + return TagOperationLinkClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *TagOperationLinkClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, operationLinkID string, _ *TagOperationLinkClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if operationLinkID == "" { + return nil, errors.New("parameter operationLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationLinkId}", url.PathEscape(operationLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the operation link for the tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - operationLinkID - Tag-operation link identifier. Must be unique in the current API Management service instance. +// - options - TagOperationLinkClientGetOptions contains the optional parameters for the TagOperationLinkClient.Get method. +func (client *TagOperationLinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, tagID string, operationLinkID string, options *TagOperationLinkClientGetOptions) (TagOperationLinkClientGetResponse, error) { + var err error + const operationName = "TagOperationLinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, tagID, operationLinkID, options) + if err != nil { + return TagOperationLinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TagOperationLinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagOperationLinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *TagOperationLinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, operationLinkID string, _ *TagOperationLinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks/{operationLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if operationLinkID == "" { + return nil, errors.New("parameter operationLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationLinkId}", url.PathEscape(operationLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *TagOperationLinkClient) getHandleResponse(resp *http.Response) (TagOperationLinkClientGetResponse, error) { + result := TagOperationLinkClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.TagOperationLinkContract); err != nil { + return TagOperationLinkClientGetResponse{}, err + } + return result, nil +} + +// NewListByProductPager - Lists a collection of the operation links associated with a tag. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - options - TagOperationLinkClientListByProductOptions contains the optional parameters for the TagOperationLinkClient.NewListByProductPager +// method. +func (client *TagOperationLinkClient) NewListByProductPager(resourceGroupName string, serviceName string, tagID string, options *TagOperationLinkClientListByProductOptions) *runtime.Pager[TagOperationLinkClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[TagOperationLinkClientListByProductResponse]{ + More: func(page TagOperationLinkClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TagOperationLinkClientListByProductResponse) (TagOperationLinkClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TagOperationLinkClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, tagID, options) + }, nil) + if err != nil { + return TagOperationLinkClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *TagOperationLinkClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagOperationLinkClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/operationLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *TagOperationLinkClient) listByProductHandleResponse(resp *http.Response) (TagOperationLinkClientListByProductResponse, error) { + result := TagOperationLinkClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagOperationLinkCollection); err != nil { + return TagOperationLinkClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagproductlink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagproductlink_client.go new file mode 100644 index 00000000..460d1812 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagproductlink_client.go @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// TagProductLinkClient contains the methods for the TagProductLink group. +// Don't use this type directly, use NewTagProductLinkClient() instead. +type TagProductLinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTagProductLinkClient creates a new instance of TagProductLinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTagProductLinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TagProductLinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TagProductLinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Adds a product to the specified tag via link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - productLinkID - Tag-product link identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - TagProductLinkClientCreateOrUpdateOptions contains the optional parameters for the TagProductLinkClient.CreateOrUpdate +// method. +func (client *TagProductLinkClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, tagID string, productLinkID string, parameters TagProductLinkContract, options *TagProductLinkClientCreateOrUpdateOptions) (TagProductLinkClientCreateOrUpdateResponse, error) { + var err error + const operationName = "TagProductLinkClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, tagID, productLinkID, parameters, options) + if err != nil { + return TagProductLinkClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TagProductLinkClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TagProductLinkClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *TagProductLinkClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, productLinkID string, parameters TagProductLinkContract, _ *TagProductLinkClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if productLinkID == "" { + return nil, errors.New("parameter productLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productLinkId}", url.PathEscape(productLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *TagProductLinkClient) createOrUpdateHandleResponse(resp *http.Response) (TagProductLinkClientCreateOrUpdateResponse, error) { + result := TagProductLinkClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagProductLinkContract); err != nil { + return TagProductLinkClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified product from the specified tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - productLinkID - Tag-product link identifier. Must be unique in the current API Management service instance. +// - options - TagProductLinkClientDeleteOptions contains the optional parameters for the TagProductLinkClient.Delete method. +func (client *TagProductLinkClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, tagID string, productLinkID string, options *TagProductLinkClientDeleteOptions) (TagProductLinkClientDeleteResponse, error) { + var err error + const operationName = "TagProductLinkClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, tagID, productLinkID, options) + if err != nil { + return TagProductLinkClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TagProductLinkClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TagProductLinkClientDeleteResponse{}, err + } + return TagProductLinkClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *TagProductLinkClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, productLinkID string, _ *TagProductLinkClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if productLinkID == "" { + return nil, errors.New("parameter productLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productLinkId}", url.PathEscape(productLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the product link for the tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - productLinkID - Tag-product link identifier. Must be unique in the current API Management service instance. +// - options - TagProductLinkClientGetOptions contains the optional parameters for the TagProductLinkClient.Get method. +func (client *TagProductLinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, tagID string, productLinkID string, options *TagProductLinkClientGetOptions) (TagProductLinkClientGetResponse, error) { + var err error + const operationName = "TagProductLinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, tagID, productLinkID, options) + if err != nil { + return TagProductLinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TagProductLinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TagProductLinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *TagProductLinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, productLinkID string, _ *TagProductLinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks/{productLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if productLinkID == "" { + return nil, errors.New("parameter productLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productLinkId}", url.PathEscape(productLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *TagProductLinkClient) getHandleResponse(resp *http.Response) (TagProductLinkClientGetResponse, error) { + result := TagProductLinkClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.TagProductLinkContract); err != nil { + return TagProductLinkClientGetResponse{}, err + } + return result, nil +} + +// NewListByProductPager - Lists a collection of the product links associated with a tag. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - options - TagProductLinkClientListByProductOptions contains the optional parameters for the TagProductLinkClient.NewListByProductPager +// method. +func (client *TagProductLinkClient) NewListByProductPager(resourceGroupName string, serviceName string, tagID string, options *TagProductLinkClientListByProductOptions) *runtime.Pager[TagProductLinkClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[TagProductLinkClientListByProductResponse]{ + More: func(page TagProductLinkClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TagProductLinkClientListByProductResponse) (TagProductLinkClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TagProductLinkClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, tagID, options) + }, nil) + if err != nil { + return TagProductLinkClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *TagProductLinkClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, tagID string, options *TagProductLinkClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}/productLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *TagProductLinkClient) listByProductHandleResponse(resp *http.Response) (TagProductLinkClientListByProductResponse, error) { + result := TagProductLinkClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagProductLinkCollection); err != nil { + return TagProductLinkClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tagresource_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagresource_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tagresource_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagresource_client.go index aebcbfe3..4a909fb8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tagresource_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tagresource_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type TagResourceClient struct { } // NewTagResourceClient creates a new instance of TagResourceClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTagResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TagResourceClient, error) { - cl, err := arm.NewClient(moduleName+".TagResourceClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewTagResourceClient(subscriptionID string, credential azcore.TokenCredenti // NewListByServicePager - Lists a collection of resources associated with tags. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - TagResourceClientListByServiceOptions contains the optional parameters for the TagResourceClient.NewListByServicePager // method. @@ -59,25 +54,20 @@ func (client *TagResourceClient) NewListByServicePager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TagResourceClientListByServiceResponse) (TagResourceClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TagResourceClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TagResourceClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return TagResourceClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TagResourceClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -104,13 +94,13 @@ func (client *TagResourceClient) listByServiceCreateRequest(ctx context.Context, if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantaccess_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantaccess_client.go similarity index 77% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantaccess_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantaccess_client.go index 48e44236..b90b9210 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantaccess_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantaccess_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type TenantAccessClient struct { } // NewTenantAccessClient creates a new instance of TenantAccessClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTenantAccessClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantAccessClient, error) { - cl, err := arm.NewClient(moduleName+".TenantAccessClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewTenantAccessClient(subscriptionID string, credential azcore.TokenCredent // Create - Update tenant access information details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - accessName - The identifier of the Access configuration. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -57,22 +52,29 @@ func NewTenantAccessClient(subscriptionID string, credential azcore.TokenCredent // - parameters - Parameters supplied to retrieve the Tenant Access Information. // - options - TenantAccessClientCreateOptions contains the optional parameters for the TenantAccessClient.Create method. func (client *TenantAccessClient) Create(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, ifMatch string, parameters AccessInformationCreateParameters, options *TenantAccessClientCreateOptions) (TenantAccessClientCreateResponse, error) { + var err error + const operationName = "TenantAccessClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, serviceName, accessName, ifMatch, parameters, options) if err != nil { return TenantAccessClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TenantAccessClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TenantAccessClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TenantAccessClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. -func (client *TenantAccessClient) createCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, ifMatch string, parameters AccessInformationCreateParameters, options *TenantAccessClientCreateOptions) (*policy.Request, error) { +func (client *TenantAccessClient) createCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, ifMatch string, parameters AccessInformationCreateParameters, _ *TenantAccessClientCreateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -95,11 +97,14 @@ func (client *TenantAccessClient) createCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createHandleResponse handles the Create response. @@ -117,28 +122,35 @@ func (client *TenantAccessClient) createHandleResponse(resp *http.Response) (Ten // Get - Get tenant access information details without secrets. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - accessName - The identifier of the Access configuration. // - options - TenantAccessClientGetOptions contains the optional parameters for the TenantAccessClient.Get method. func (client *TenantAccessClient) Get(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientGetOptions) (TenantAccessClientGetResponse, error) { + var err error + const operationName = "TenantAccessClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, accessName, options) if err != nil { return TenantAccessClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TenantAccessClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TenantAccessClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TenantAccessClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *TenantAccessClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientGetOptions) (*policy.Request, error) { +func (client *TenantAccessClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, _ *TenantAccessClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -161,7 +173,7 @@ func (client *TenantAccessClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,29 +193,36 @@ func (client *TenantAccessClient) getHandleResponse(resp *http.Response) (Tenant // GetEntityTag - Tenant access metadata // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - accessName - The identifier of the Access configuration. // - options - TenantAccessClientGetEntityTagOptions contains the optional parameters for the TenantAccessClient.GetEntityTag // method. func (client *TenantAccessClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientGetEntityTagOptions) (TenantAccessClientGetEntityTagResponse, error) { + var err error + const operationName = "TenantAccessClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, accessName, options) if err != nil { return TenantAccessClientGetEntityTagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TenantAccessClientGetEntityTagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TenantAccessClientGetEntityTagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TenantAccessClientGetEntityTagResponse{}, err } - return client.getEntityTagHandleResponse(resp) + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err } // getEntityTagCreateRequest creates the GetEntityTag request. -func (client *TenantAccessClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientGetEntityTagOptions) (*policy.Request, error) { +func (client *TenantAccessClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, _ *TenantAccessClientGetEntityTagOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -226,7 +245,7 @@ func (client *TenantAccessClient) getEntityTagCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,18 +253,17 @@ func (client *TenantAccessClient) getEntityTagCreateRequest(ctx context.Context, // getEntityTagHandleResponse handles the GetEntityTag response. func (client *TenantAccessClient) getEntityTagHandleResponse(resp *http.Response) (TenantAccessClientGetEntityTagResponse, error) { - result := TenantAccessClientGetEntityTagResponse{} + result := TenantAccessClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} if val := resp.Header.Get("ETag"); val != "" { result.ETag = &val } - result.Success = resp.StatusCode >= 200 && resp.StatusCode < 300 return result, nil } // NewListByServicePager - Returns list of access infos - for Git and Management endpoints. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - TenantAccessClientListByServiceOptions contains the optional parameters for the TenantAccessClient.NewListByServicePager // method. @@ -255,25 +273,20 @@ func (client *TenantAccessClient) NewListByServicePager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TenantAccessClientListByServiceResponse) (TenantAccessClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TenantAccessClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TenantAccessClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return TenantAccessClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TenantAccessClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -300,7 +313,7 @@ func (client *TenantAccessClient) listByServiceCreateRequest(ctx context.Context if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -318,29 +331,36 @@ func (client *TenantAccessClient) listByServiceHandleResponse(resp *http.Respons // ListSecrets - Get tenant access information details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - accessName - The identifier of the Access configuration. // - options - TenantAccessClientListSecretsOptions contains the optional parameters for the TenantAccessClient.ListSecrets // method. func (client *TenantAccessClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientListSecretsOptions) (TenantAccessClientListSecretsResponse, error) { + var err error + const operationName = "TenantAccessClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, serviceName, accessName, options) if err != nil { return TenantAccessClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TenantAccessClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TenantAccessClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TenantAccessClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. -func (client *TenantAccessClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientListSecretsOptions) (*policy.Request, error) { +func (client *TenantAccessClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, _ *TenantAccessClientListSecretsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -363,7 +383,7 @@ func (client *TenantAccessClient) listSecretsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -384,29 +404,35 @@ func (client *TenantAccessClient) listSecretsHandleResponse(resp *http.Response) // RegeneratePrimaryKey - Regenerate primary access key // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - accessName - The identifier of the Access configuration. // - options - TenantAccessClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessClient.RegeneratePrimaryKey // method. func (client *TenantAccessClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientRegeneratePrimaryKeyOptions) (TenantAccessClientRegeneratePrimaryKeyResponse, error) { + var err error + const operationName = "TenantAccessClient.RegeneratePrimaryKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regeneratePrimaryKeyCreateRequest(ctx, resourceGroupName, serviceName, accessName, options) if err != nil { return TenantAccessClientRegeneratePrimaryKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TenantAccessClientRegeneratePrimaryKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return TenantAccessClientRegeneratePrimaryKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TenantAccessClientRegeneratePrimaryKeyResponse{}, err } return TenantAccessClientRegeneratePrimaryKeyResponse{}, nil } // regeneratePrimaryKeyCreateRequest creates the RegeneratePrimaryKey request. -func (client *TenantAccessClient) regeneratePrimaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientRegeneratePrimaryKeyOptions) (*policy.Request, error) { +func (client *TenantAccessClient) regeneratePrimaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, _ *TenantAccessClientRegeneratePrimaryKeyOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -429,7 +455,7 @@ func (client *TenantAccessClient) regeneratePrimaryKeyCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -438,29 +464,35 @@ func (client *TenantAccessClient) regeneratePrimaryKeyCreateRequest(ctx context. // RegenerateSecondaryKey - Regenerate secondary access key // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - accessName - The identifier of the Access configuration. // - options - TenantAccessClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessClient.RegenerateSecondaryKey // method. func (client *TenantAccessClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientRegenerateSecondaryKeyOptions) (TenantAccessClientRegenerateSecondaryKeyResponse, error) { + var err error + const operationName = "TenantAccessClient.RegenerateSecondaryKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regenerateSecondaryKeyCreateRequest(ctx, resourceGroupName, serviceName, accessName, options) if err != nil { return TenantAccessClientRegenerateSecondaryKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TenantAccessClientRegenerateSecondaryKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return TenantAccessClientRegenerateSecondaryKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TenantAccessClientRegenerateSecondaryKeyResponse{}, err } return TenantAccessClientRegenerateSecondaryKeyResponse{}, nil } // regenerateSecondaryKeyCreateRequest creates the RegenerateSecondaryKey request. -func (client *TenantAccessClient) regenerateSecondaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessClientRegenerateSecondaryKeyOptions) (*policy.Request, error) { +func (client *TenantAccessClient) regenerateSecondaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, _ *TenantAccessClientRegenerateSecondaryKeyOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -483,7 +515,7 @@ func (client *TenantAccessClient) regenerateSecondaryKeyCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -492,8 +524,8 @@ func (client *TenantAccessClient) regenerateSecondaryKeyCreateRequest(ctx contex // Update - Update tenant access information details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - accessName - The identifier of the Access configuration. // - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or @@ -501,22 +533,29 @@ func (client *TenantAccessClient) regenerateSecondaryKeyCreateRequest(ctx contex // - parameters - Parameters supplied to retrieve the Tenant Access Information. // - options - TenantAccessClientUpdateOptions contains the optional parameters for the TenantAccessClient.Update method. func (client *TenantAccessClient) Update(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, ifMatch string, parameters AccessInformationUpdateParameters, options *TenantAccessClientUpdateOptions) (TenantAccessClientUpdateResponse, error) { + var err error + const operationName = "TenantAccessClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, accessName, ifMatch, parameters, options) if err != nil { return TenantAccessClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TenantAccessClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TenantAccessClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TenantAccessClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. -func (client *TenantAccessClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, ifMatch string, parameters AccessInformationUpdateParameters, options *TenantAccessClientUpdateOptions) (*policy.Request, error) { +func (client *TenantAccessClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, ifMatch string, parameters AccessInformationUpdateParameters, _ *TenantAccessClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -539,11 +578,14 @@ func (client *TenantAccessClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["If-Match"] = []string{ifMatch} req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantaccessgit_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantaccessgit_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantaccessgit_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantaccessgit_client.go index e5939140..6398699d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantaccessgit_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantaccessgit_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type TenantAccessGitClient struct { } // NewTenantAccessGitClient creates a new instance of TenantAccessGitClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTenantAccessGitClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantAccessGitClient, error) { - cl, err := arm.NewClient(moduleName+".TenantAccessGitClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,29 +43,35 @@ func NewTenantAccessGitClient(subscriptionID string, credential azcore.TokenCred // RegeneratePrimaryKey - Regenerate primary access key for GIT. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - accessName - The identifier of the Access configuration. // - options - TenantAccessGitClientRegeneratePrimaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegeneratePrimaryKey // method. func (client *TenantAccessGitClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessGitClientRegeneratePrimaryKeyOptions) (TenantAccessGitClientRegeneratePrimaryKeyResponse, error) { + var err error + const operationName = "TenantAccessGitClient.RegeneratePrimaryKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regeneratePrimaryKeyCreateRequest(ctx, resourceGroupName, serviceName, accessName, options) if err != nil { return TenantAccessGitClientRegeneratePrimaryKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TenantAccessGitClientRegeneratePrimaryKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return TenantAccessGitClientRegeneratePrimaryKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TenantAccessGitClientRegeneratePrimaryKeyResponse{}, err } return TenantAccessGitClientRegeneratePrimaryKeyResponse{}, nil } // regeneratePrimaryKeyCreateRequest creates the RegeneratePrimaryKey request. -func (client *TenantAccessGitClient) regeneratePrimaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessGitClientRegeneratePrimaryKeyOptions) (*policy.Request, error) { +func (client *TenantAccessGitClient) regeneratePrimaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, _ *TenantAccessGitClientRegeneratePrimaryKeyOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -93,7 +94,7 @@ func (client *TenantAccessGitClient) regeneratePrimaryKeyCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -102,29 +103,35 @@ func (client *TenantAccessGitClient) regeneratePrimaryKeyCreateRequest(ctx conte // RegenerateSecondaryKey - Regenerate secondary access key for GIT. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - accessName - The identifier of the Access configuration. // - options - TenantAccessGitClientRegenerateSecondaryKeyOptions contains the optional parameters for the TenantAccessGitClient.RegenerateSecondaryKey // method. func (client *TenantAccessGitClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessGitClientRegenerateSecondaryKeyOptions) (TenantAccessGitClientRegenerateSecondaryKeyResponse, error) { + var err error + const operationName = "TenantAccessGitClient.RegenerateSecondaryKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regenerateSecondaryKeyCreateRequest(ctx, resourceGroupName, serviceName, accessName, options) if err != nil { return TenantAccessGitClientRegenerateSecondaryKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TenantAccessGitClientRegenerateSecondaryKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return TenantAccessGitClientRegenerateSecondaryKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TenantAccessGitClientRegenerateSecondaryKeyResponse{}, err } return TenantAccessGitClientRegenerateSecondaryKeyResponse{}, nil } // regenerateSecondaryKeyCreateRequest creates the RegenerateSecondaryKey request. -func (client *TenantAccessGitClient) regenerateSecondaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, options *TenantAccessGitClientRegenerateSecondaryKeyOptions) (*policy.Request, error) { +func (client *TenantAccessGitClient) regenerateSecondaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, accessName AccessIDName, _ *TenantAccessGitClientRegenerateSecondaryKeyOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -147,7 +154,7 @@ func (client *TenantAccessGitClient) regenerateSecondaryKeyCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantconfiguration_client.go new file mode 100644 index 00000000..ba99ec60 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantconfiguration_client.go @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// TenantConfigurationClient contains the methods for the TenantConfiguration group. +// Don't use this type directly, use NewTenantConfigurationClient() instead. +type TenantConfigurationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTenantConfigurationClient creates a new instance of TenantConfigurationClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTenantConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantConfigurationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TenantConfigurationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginDeploy - This operation applies changes from the specified Git branch to the configuration database. This is a long +// running operation and could take several minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - configurationName - The identifier of the Git Configuration Operation. +// - parameters - Deploy Configuration parameters. +// - options - TenantConfigurationClientBeginDeployOptions contains the optional parameters for the TenantConfigurationClient.BeginDeploy +// method. +func (client *TenantConfigurationClient) BeginDeploy(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, options *TenantConfigurationClientBeginDeployOptions) (*runtime.Poller[TenantConfigurationClientDeployResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deploy(ctx, resourceGroupName, serviceName, configurationName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TenantConfigurationClientDeployResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TenantConfigurationClientDeployResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Deploy - This operation applies changes from the specified Git branch to the configuration database. This is a long running +// operation and could take several minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *TenantConfigurationClient) deploy(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, options *TenantConfigurationClientBeginDeployOptions) (*http.Response, error) { + var err error + const operationName = "TenantConfigurationClient.BeginDeploy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deployCreateRequest(ctx, resourceGroupName, serviceName, configurationName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deployCreateRequest creates the Deploy request. +func (client *TenantConfigurationClient) deployCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, _ *TenantConfigurationClientBeginDeployOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(string(configurationName))) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// GetSyncState - Gets the status of the most recent synchronization between the configuration database and the Git repository. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - configurationName - The identifier of the Git Configuration Operation. +// - options - TenantConfigurationClientGetSyncStateOptions contains the optional parameters for the TenantConfigurationClient.GetSyncState +// method. +func (client *TenantConfigurationClient) GetSyncState(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, options *TenantConfigurationClientGetSyncStateOptions) (TenantConfigurationClientGetSyncStateResponse, error) { + var err error + const operationName = "TenantConfigurationClient.GetSyncState" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSyncStateCreateRequest(ctx, resourceGroupName, serviceName, configurationName, options) + if err != nil { + return TenantConfigurationClientGetSyncStateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TenantConfigurationClientGetSyncStateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TenantConfigurationClientGetSyncStateResponse{}, err + } + resp, err := client.getSyncStateHandleResponse(httpResp) + return resp, err +} + +// getSyncStateCreateRequest creates the GetSyncState request. +func (client *TenantConfigurationClient) getSyncStateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, _ *TenantConfigurationClientGetSyncStateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(string(configurationName))) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSyncStateHandleResponse handles the GetSyncState response. +func (client *TenantConfigurationClient) getSyncStateHandleResponse(resp *http.Response) (TenantConfigurationClientGetSyncStateResponse, error) { + result := TenantConfigurationClientGetSyncStateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TenantConfigurationSyncStateContract); err != nil { + return TenantConfigurationClientGetSyncStateResponse{}, err + } + return result, nil +} + +// BeginSave - This operation creates a commit with the current configuration snapshot to the specified branch in the repository. +// This is a long running operation and could take several minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - configurationName - The identifier of the Git Configuration Operation. +// - parameters - Save Configuration parameters. +// - options - TenantConfigurationClientBeginSaveOptions contains the optional parameters for the TenantConfigurationClient.BeginSave +// method. +func (client *TenantConfigurationClient) BeginSave(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters SaveConfigurationParameter, options *TenantConfigurationClientBeginSaveOptions) (*runtime.Poller[TenantConfigurationClientSaveResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.save(ctx, resourceGroupName, serviceName, configurationName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TenantConfigurationClientSaveResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TenantConfigurationClientSaveResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Save - This operation creates a commit with the current configuration snapshot to the specified branch in the repository. +// This is a long running operation and could take several minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *TenantConfigurationClient) save(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters SaveConfigurationParameter, options *TenantConfigurationClientBeginSaveOptions) (*http.Response, error) { + var err error + const operationName = "TenantConfigurationClient.BeginSave" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.saveCreateRequest(ctx, resourceGroupName, serviceName, configurationName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// saveCreateRequest creates the Save request. +func (client *TenantConfigurationClient) saveCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters SaveConfigurationParameter, _ *TenantConfigurationClientBeginSaveOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(string(configurationName))) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginValidate - This operation validates the changes in the specified Git branch. This is a long running operation and +// could take several minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - configurationName - The identifier of the Git Configuration Operation. +// - parameters - Validate Configuration parameters. +// - options - TenantConfigurationClientBeginValidateOptions contains the optional parameters for the TenantConfigurationClient.BeginValidate +// method. +func (client *TenantConfigurationClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, options *TenantConfigurationClientBeginValidateOptions) (*runtime.Poller[TenantConfigurationClientValidateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validate(ctx, resourceGroupName, serviceName, configurationName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[TenantConfigurationClientValidateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[TenantConfigurationClientValidateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Validate - This operation validates the changes in the specified Git branch. This is a long running operation and could +// take several minutes to complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *TenantConfigurationClient) validate(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, options *TenantConfigurationClientBeginValidateOptions) (*http.Response, error) { + var err error + const operationName = "TenantConfigurationClient.BeginValidate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, configurationName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateCreateRequest creates the Validate request. +func (client *TenantConfigurationClient) validateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationName ConfigurationIDName, parameters DeployConfigurationParameters, _ *TenantConfigurationClientBeginValidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(string(configurationName))) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantsettings_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantsettings_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantsettings_client.go index ea135acd..ea3858d8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/tenantsettings_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/tenantsettings_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type TenantSettingsClient struct { } // NewTenantSettingsClient creates a new instance of TenantSettingsClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTenantSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantSettingsClient, error) { - cl, err := arm.NewClient(moduleName+".TenantSettingsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,28 +43,35 @@ func NewTenantSettingsClient(subscriptionID string, credential azcore.TokenCrede // Get - Get tenant settings. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - settingsType - The identifier of the settings. // - options - TenantSettingsClientGetOptions contains the optional parameters for the TenantSettingsClient.Get method. func (client *TenantSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, settingsType SettingsTypeName, options *TenantSettingsClientGetOptions) (TenantSettingsClientGetResponse, error) { + var err error + const operationName = "TenantSettingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, settingsType, options) if err != nil { return TenantSettingsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TenantSettingsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TenantSettingsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TenantSettingsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *TenantSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, settingsType SettingsTypeName, options *TenantSettingsClientGetOptions) (*policy.Request, error) { +func (client *TenantSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, settingsType SettingsTypeName, _ *TenantSettingsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -92,7 +94,7 @@ func (client *TenantSettingsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -112,8 +114,8 @@ func (client *TenantSettingsClient) getHandleResponse(resp *http.Response) (Tena // NewListByServicePager - Public settings. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - options - TenantSettingsClientListByServiceOptions contains the optional parameters for the TenantSettingsClient.NewListByServicePager // method. @@ -123,25 +125,20 @@ func (client *TenantSettingsClient) NewListByServicePager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TenantSettingsClientListByServiceResponse) (TenantSettingsClientListByServiceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TenantSettingsClientListByServiceResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TenantSettingsClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) if err != nil { return TenantSettingsClientListByServiceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TenantSettingsClientListByServiceResponse{}, runtime.NewResponseError(resp) - } return client.listByServiceHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -168,7 +165,7 @@ func (client *TenantSettingsClient) listByServiceCreateRequest(ctx context.Conte if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/time_rfc3339.go new file mode 100644 index 00000000..6752fdcb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/time_rfc3339.go @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + if len(data) == 0 { + return nil + } + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/user_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/user_client.go new file mode 100644 index 00000000..6cb5c136 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/user_client.go @@ -0,0 +1,656 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// UserClient contains the methods for the User group. +// Don't use this type directly, use NewUserClient() instead. +type UserClient struct { + internal *arm.Client + subscriptionID string +} + +// NewUserClient creates a new instance of UserClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &UserClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or Updates a user. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - UserClientCreateOrUpdateOptions contains the optional parameters for the UserClient.CreateOrUpdate method. +func (client *UserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserCreateParameters, options *UserClientCreateOrUpdateOptions) (UserClientCreateOrUpdateResponse, error) { + var err error + const operationName = "UserClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, userID, parameters, options) + if err != nil { + return UserClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UserClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return UserClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *UserClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserCreateParameters, options *UserClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Notify != nil { + reqQP.Set("notify", strconv.FormatBool(*options.Notify)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *UserClient) createOrUpdateHandleResponse(resp *http.Response) (UserClientCreateOrUpdateResponse, error) { + result := UserClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.UserContract); err != nil { + return UserClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes specific user. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - UserClientBeginDeleteOptions contains the optional parameters for the UserClient.BeginDelete method. +func (client *UserClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, options *UserClientBeginDeleteOptions) (*runtime.Poller[UserClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, userID, ifMatch, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[UserClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[UserClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes specific user. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *UserClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, options *UserClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "UserClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, userID, ifMatch, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *UserClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, options *UserClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.AppType != nil { + reqQP.Set("appType", string(*options.AppType)) + } + if options != nil && options.DeleteSubscriptions != nil { + reqQP.Set("deleteSubscriptions", strconv.FormatBool(*options.DeleteSubscriptions)) + } + if options != nil && options.Notify != nil { + reqQP.Set("notify", strconv.FormatBool(*options.Notify)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// GenerateSsoURL - Retrieves a redirection URL containing an authentication token for signing a given user into the developer +// portal. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - options - UserClientGenerateSsoURLOptions contains the optional parameters for the UserClient.GenerateSsoURL method. +func (client *UserClient) GenerateSsoURL(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGenerateSsoURLOptions) (UserClientGenerateSsoURLResponse, error) { + var err error + const operationName = "UserClient.GenerateSsoURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateSsoURLCreateRequest(ctx, resourceGroupName, serviceName, userID, options) + if err != nil { + return UserClientGenerateSsoURLResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UserClientGenerateSsoURLResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UserClientGenerateSsoURLResponse{}, err + } + resp, err := client.generateSsoURLHandleResponse(httpResp) + return resp, err +} + +// generateSsoURLCreateRequest creates the GenerateSsoURL request. +func (client *UserClient) generateSsoURLCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, _ *UserClientGenerateSsoURLOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// generateSsoURLHandleResponse handles the GenerateSsoURL response. +func (client *UserClient) generateSsoURLHandleResponse(resp *http.Response) (UserClientGenerateSsoURLResponse, error) { + result := UserClientGenerateSsoURLResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GenerateSsoURLResult); err != nil { + return UserClientGenerateSsoURLResponse{}, err + } + return result, nil +} + +// Get - Gets the details of the user specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - options - UserClientGetOptions contains the optional parameters for the UserClient.Get method. +func (client *UserClient) Get(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGetOptions) (UserClientGetResponse, error) { + var err error + const operationName = "UserClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, userID, options) + if err != nil { + return UserClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UserClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UserClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *UserClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, _ *UserClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *UserClient) getHandleResponse(resp *http.Response) (UserClientGetResponse, error) { + result := UserClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.UserContract); err != nil { + return UserClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the user specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - options - UserClientGetEntityTagOptions contains the optional parameters for the UserClient.GetEntityTag method. +func (client *UserClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserClientGetEntityTagOptions) (UserClientGetEntityTagResponse, error) { + var err error + const operationName = "UserClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, userID, options) + if err != nil { + return UserClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UserClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UserClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *UserClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, _ *UserClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *UserClient) getEntityTagHandleResponse(resp *http.Response) (UserClientGetEntityTagResponse, error) { + result := UserClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// GetSharedAccessToken - Gets the Shared Access Authorization Token for the User. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - parameters - Create Authorization Token parameters. +// - options - UserClientGetSharedAccessTokenOptions contains the optional parameters for the UserClient.GetSharedAccessToken +// method. +func (client *UserClient) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserTokenParameters, options *UserClientGetSharedAccessTokenOptions) (UserClientGetSharedAccessTokenResponse, error) { + var err error + const operationName = "UserClient.GetSharedAccessToken" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSharedAccessTokenCreateRequest(ctx, resourceGroupName, serviceName, userID, parameters, options) + if err != nil { + return UserClientGetSharedAccessTokenResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UserClientGetSharedAccessTokenResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UserClientGetSharedAccessTokenResponse{}, err + } + resp, err := client.getSharedAccessTokenHandleResponse(httpResp) + return resp, err +} + +// getSharedAccessTokenCreateRequest creates the GetSharedAccessToken request. +func (client *UserClient) getSharedAccessTokenCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserTokenParameters, _ *UserClientGetSharedAccessTokenOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// getSharedAccessTokenHandleResponse handles the GetSharedAccessToken response. +func (client *UserClient) getSharedAccessTokenHandleResponse(resp *http.Response) (UserClientGetSharedAccessTokenResponse, error) { + result := UserClientGetSharedAccessTokenResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UserTokenResult); err != nil { + return UserClientGetSharedAccessTokenResponse{}, err + } + return result, nil +} + +// NewListByServicePager - Lists a collection of registered users in the specified service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - UserClientListByServiceOptions contains the optional parameters for the UserClient.NewListByServicePager method. +func (client *UserClient) NewListByServicePager(resourceGroupName string, serviceName string, options *UserClientListByServiceOptions) *runtime.Pager[UserClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[UserClientListByServiceResponse]{ + More: func(page UserClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *UserClientListByServiceResponse) (UserClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UserClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return UserClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *UserClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *UserClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.ExpandGroups != nil { + reqQP.Set("expandGroups", strconv.FormatBool(*options.ExpandGroups)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *UserClient) listByServiceHandleResponse(resp *http.Response) (UserClientListByServiceResponse, error) { + result := UserClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UserCollection); err != nil { + return UserClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the user specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update parameters. +// - options - UserClientUpdateOptions contains the optional parameters for the UserClient.Update method. +func (client *UserClient) Update(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, parameters UserUpdateParameters, options *UserClientUpdateOptions) (UserClientUpdateResponse, error) { + var err error + const operationName = "UserClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, userID, ifMatch, parameters, options) + if err != nil { + return UserClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UserClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UserClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *UserClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, parameters UserUpdateParameters, _ *UserClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *UserClient) updateHandleResponse(resp *http.Response) (UserClientUpdateResponse, error) { + result := UserClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.UserContract); err != nil { + return UserClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/userconfirmationpassword_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/userconfirmationpassword_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/userconfirmationpassword_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/userconfirmationpassword_client.go index 67066591..db758a27 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/userconfirmationpassword_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/userconfirmationpassword_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type UserConfirmationPasswordClient struct { } // NewUserConfirmationPasswordClient creates a new instance of UserConfirmationPasswordClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewUserConfirmationPasswordClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserConfirmationPasswordClient, error) { - cl, err := arm.NewClient(moduleName+".UserConfirmationPasswordClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,23 +43,29 @@ func NewUserConfirmationPasswordClient(subscriptionID string, credential azcore. // Send - Sends confirmation // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - userID - User identifier. Must be unique in the current API Management service instance. // - options - UserConfirmationPasswordClientSendOptions contains the optional parameters for the UserConfirmationPasswordClient.Send // method. func (client *UserConfirmationPasswordClient) Send(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserConfirmationPasswordClientSendOptions) (UserConfirmationPasswordClientSendResponse, error) { + var err error + const operationName = "UserConfirmationPasswordClient.Send" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.sendCreateRequest(ctx, resourceGroupName, serviceName, userID, options) if err != nil { return UserConfirmationPasswordClientSendResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return UserConfirmationPasswordClientSendResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return UserConfirmationPasswordClientSendResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return UserConfirmationPasswordClientSendResponse{}, err } return UserConfirmationPasswordClientSendResponse{}, nil } @@ -93,7 +94,7 @@ func (client *UserConfirmationPasswordClient) sendCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") if options != nil && options.AppType != nil { reqQP.Set("appType", string(*options.AppType)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/usergroup_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/usergroup_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/usergroup_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/usergroup_client.go index 7c9710b7..81bf2014 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/usergroup_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/usergroup_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type UserGroupClient struct { } // NewUserGroupClient creates a new instance of UserGroupClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewUserGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserGroupClient, error) { - cl, err := arm.NewClient(moduleName+".UserGroupClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,8 +43,8 @@ func NewUserGroupClient(subscriptionID string, credential azcore.TokenCredential // NewListPager - Lists all user groups. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - userID - User identifier. Must be unique in the current API Management service instance. // - options - UserGroupClientListOptions contains the optional parameters for the UserGroupClient.NewListPager method. @@ -59,25 +54,20 @@ func (client *UserGroupClient) NewListPager(resourceGroupName string, serviceNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *UserGroupClientListResponse) (UserGroupClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, userID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return UserGroupClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UserGroupClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, userID, options) + }, nil) if err != nil { return UserGroupClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserGroupClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -108,13 +98,13 @@ func (client *UserGroupClient) listCreateRequest(ctx context.Context, resourceGr if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/useridentities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/useridentities_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/useridentities_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/useridentities_client.go index 7645b813..69637fc1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/useridentities_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/useridentities_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -29,12 +25,11 @@ type UserIdentitiesClient struct { } // NewUserIdentitiesClient creates a new instance of UserIdentitiesClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewUserIdentitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserIdentitiesClient, error) { - cl, err := arm.NewClient(moduleName+".UserIdentitiesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,8 +42,8 @@ func NewUserIdentitiesClient(subscriptionID string, credential azcore.TokenCrede // NewListPager - List of all user identities. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - userID - User identifier. Must be unique in the current API Management service instance. // - options - UserIdentitiesClientListOptions contains the optional parameters for the UserIdentitiesClient.NewListPager method. @@ -58,30 +53,25 @@ func (client *UserIdentitiesClient) NewListPager(resourceGroupName string, servi return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *UserIdentitiesClientListResponse) (UserIdentitiesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, userID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UserIdentitiesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, userID, options) + }, nil) if err != nil { return UserIdentitiesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return UserIdentitiesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserIdentitiesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } // listCreateRequest creates the List request. -func (client *UserIdentitiesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, options *UserIdentitiesClientListOptions) (*policy.Request, error) { +func (client *UserIdentitiesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, _ *UserIdentitiesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -104,7 +94,7 @@ func (client *UserIdentitiesClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/usersubscription_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/usersubscription_client.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/usersubscription_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/usersubscription_client.go index c32d258d..4d8de10d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/usersubscription_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/usersubscription_client.go @@ -1,11 +1,7 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armapimanagement @@ -30,12 +26,11 @@ type UserSubscriptionClient struct { } // NewUserSubscriptionClient creates a new instance of UserSubscriptionClient with the specified values. -// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewUserSubscriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserSubscriptionClient, error) { - cl, err := arm.NewClient(moduleName+".UserSubscriptionClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,29 +44,36 @@ func NewUserSubscriptionClient(subscriptionID string, credential azcore.TokenCre // Get - Gets the specified Subscription entity associated with a particular user. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - userID - User identifier. Must be unique in the current API Management service instance. // - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. // - options - UserSubscriptionClientGetOptions contains the optional parameters for the UserSubscriptionClient.Get method. func (client *UserSubscriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, userID string, sid string, options *UserSubscriptionClientGetOptions) (UserSubscriptionClientGetResponse, error) { + var err error + const operationName = "UserSubscriptionClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, userID, sid, options) if err != nil { return UserSubscriptionClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return UserSubscriptionClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserSubscriptionClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UserSubscriptionClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. -func (client *UserSubscriptionClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, sid string, options *UserSubscriptionClientGetOptions) (*policy.Request, error) { +func (client *UserSubscriptionClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, userID string, sid string, _ *UserSubscriptionClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}" if resourceGroupName == "" { return nil, errors.New("parameter resourceGroupName cannot be empty") @@ -98,7 +100,7 @@ func (client *UserSubscriptionClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,8 +120,8 @@ func (client *UserSubscriptionClient) getHandleResponse(resp *http.Response) (Us // NewListPager - Lists the collection of subscriptions of the specified user. // -// Generated from API version 2021-08-01 -// - resourceGroupName - The name of the resource group. +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - serviceName - The name of the API Management service. // - userID - User identifier. Must be unique in the current API Management service instance. // - options - UserSubscriptionClientListOptions contains the optional parameters for the UserSubscriptionClient.NewListPager @@ -130,25 +132,20 @@ func (client *UserSubscriptionClient) NewListPager(resourceGroupName string, ser return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *UserSubscriptionClientListResponse) (UserSubscriptionClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, userID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return UserSubscriptionClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UserSubscriptionClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, userID, options) + }, nil) if err != nil { return UserSubscriptionClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserSubscriptionClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -179,13 +176,13 @@ func (client *UserSubscriptionClient) listCreateRequest(ctx context.Context, res if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } if options != nil && options.Skip != nil { reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) } - reqQP.Set("api-version", "2021-08-01") + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspace_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspace_client.go new file mode 100644 index 00000000..2528c6e7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspace_client.go @@ -0,0 +1,477 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceClient contains the methods for the Workspace group. +// Don't use this type directly, use NewWorkspaceClient() instead. +type WorkspaceClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceClient creates a new instance of WorkspaceClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates a new workspace or updates an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - WorkspaceClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceClient.CreateOrUpdate +// method. +func (client *WorkspaceClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, parameters WorkspaceContract, options *WorkspaceClientCreateOrUpdateOptions) (WorkspaceClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, parameters, options) + if err != nil { + return WorkspaceClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, parameters WorkspaceContract, options *WorkspaceClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceClientCreateOrUpdateResponse, error) { + result := WorkspaceClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceContract); err != nil { + return WorkspaceClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceClientDeleteOptions contains the optional parameters for the WorkspaceClient.Delete method. +func (client *WorkspaceClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, ifMatch string, options *WorkspaceClientDeleteOptions) (WorkspaceClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, ifMatch, options) + if err != nil { + return WorkspaceClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceClientDeleteResponse{}, err + } + return WorkspaceClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, ifMatch string, _ *WorkspaceClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the workspace specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceClientGetOptions contains the optional parameters for the WorkspaceClient.Get method. +func (client *WorkspaceClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceClientGetOptions) (WorkspaceClientGetResponse, error) { + var err error + const operationName = "WorkspaceClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + if err != nil { + return WorkspaceClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, _ *WorkspaceClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceClient) getHandleResponse(resp *http.Response) (WorkspaceClientGetResponse, error) { + result := WorkspaceClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceContract); err != nil { + return WorkspaceClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the workspace specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceClientGetEntityTagOptions contains the optional parameters for the WorkspaceClient.GetEntityTag method. +func (client *WorkspaceClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceClientGetEntityTagOptions) (WorkspaceClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + if err != nil { + return WorkspaceClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, _ *WorkspaceClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceClientGetEntityTagResponse, error) { + result := WorkspaceClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists all workspaces of the API Management service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - WorkspaceClientListByServiceOptions contains the optional parameters for the WorkspaceClient.NewListByServicePager +// method. +func (client *WorkspaceClient) NewListByServicePager(resourceGroupName string, serviceName string, options *WorkspaceClientListByServiceOptions) *runtime.Pager[WorkspaceClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceClientListByServiceResponse]{ + More: func(page WorkspaceClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceClientListByServiceResponse) (WorkspaceClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return WorkspaceClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *WorkspaceClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceClientListByServiceResponse, error) { + result := WorkspaceClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceCollection); err != nil { + return WorkspaceClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the workspace specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Workspace Update parameters. +// - options - WorkspaceClientUpdateOptions contains the optional parameters for the WorkspaceClient.Update method. +func (client *WorkspaceClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, ifMatch string, parameters WorkspaceContract, options *WorkspaceClientUpdateOptions) (WorkspaceClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, ifMatch, parameters, options) + if err != nil { + return WorkspaceClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, ifMatch string, parameters WorkspaceContract, _ *WorkspaceClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceClient) updateHandleResponse(resp *http.Response) (WorkspaceClientUpdateResponse, error) { + result := WorkspaceClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceContract); err != nil { + return WorkspaceClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapi_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapi_client.go new file mode 100644 index 00000000..a1ba2df8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapi_client.go @@ -0,0 +1,531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceAPIClient contains the methods for the WorkspaceAPI group. +// Don't use this type directly, use NewWorkspaceAPIClient() instead. +type WorkspaceAPIClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceAPIClient creates a new instance of WorkspaceAPIClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceAPIClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAPIClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceAPIClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates new or updates existing specified API of the workspace in an API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - parameters - Create or update parameters. +// - options - WorkspaceAPIClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIClient.BeginCreateOrUpdate +// method. +func (client *WorkspaceAPIClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, parameters APICreateOrUpdateParameter, options *WorkspaceAPIClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceAPIClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, workspaceID, apiID, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceAPIClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceAPIClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates new or updates existing specified API of the workspace in an API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WorkspaceAPIClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, parameters APICreateOrUpdateParameter, options *WorkspaceAPIClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceAPIClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceAPIClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, parameters APICreateOrUpdateParameter, options *WorkspaceAPIClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Delete - Deletes the specified API of the workspace in an API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceAPIClientDeleteOptions contains the optional parameters for the WorkspaceAPIClient.Delete method. +func (client *WorkspaceAPIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, ifMatch string, options *WorkspaceAPIClientDeleteOptions) (WorkspaceAPIClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceAPIClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, ifMatch, options) + if err != nil { + return WorkspaceAPIClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIClientDeleteResponse{}, err + } + return WorkspaceAPIClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceAPIClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, ifMatch string, options *WorkspaceAPIClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.DeleteRevisions != nil { + reqQP.Set("deleteRevisions", strconv.FormatBool(*options.DeleteRevisions)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the API specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - options - WorkspaceAPIClientGetOptions contains the optional parameters for the WorkspaceAPIClient.Get method. +func (client *WorkspaceAPIClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIClientGetOptions) (WorkspaceAPIClientGetResponse, error) { + var err error + const operationName = "WorkspaceAPIClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, options) + if err != nil { + return WorkspaceAPIClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceAPIClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, _ *WorkspaceAPIClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceAPIClient) getHandleResponse(resp *http.Response) (WorkspaceAPIClientGetResponse, error) { + result := WorkspaceAPIClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.APIContract); err != nil { + return WorkspaceAPIClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the API specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - options - WorkspaceAPIClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIClient.GetEntityTag +// method. +func (client *WorkspaceAPIClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIClientGetEntityTagOptions) (WorkspaceAPIClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceAPIClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, options) + if err != nil { + return WorkspaceAPIClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceAPIClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, _ *WorkspaceAPIClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceAPIClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceAPIClientGetEntityTagResponse, error) { + result := WorkspaceAPIClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists all APIs of the workspace in an API Management service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIClientListByServiceOptions contains the optional parameters for the WorkspaceAPIClient.NewListByServicePager +// method. +func (client *WorkspaceAPIClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceAPIClientListByServiceOptions) *runtime.Pager[WorkspaceAPIClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceAPIClientListByServiceResponse]{ + More: func(page WorkspaceAPIClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceAPIClientListByServiceResponse) (WorkspaceAPIClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceAPIClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceAPIClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceAPIClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceAPIClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.ExpandAPIVersionSet != nil { + reqQP.Set("expandApiVersionSet", strconv.FormatBool(*options.ExpandAPIVersionSet)) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceAPIClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceAPIClientListByServiceResponse, error) { + result := WorkspaceAPIClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APICollection); err != nil { + return WorkspaceAPIClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Updates the specified API of the workspace in an API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - API Update Contract parameters. +// - options - WorkspaceAPIClientUpdateOptions contains the optional parameters for the WorkspaceAPIClient.Update method. +func (client *WorkspaceAPIClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, ifMatch string, parameters APIUpdateContract, options *WorkspaceAPIClientUpdateOptions) (WorkspaceAPIClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, ifMatch, parameters, options) + if err != nil { + return WorkspaceAPIClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceAPIClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, ifMatch string, parameters APIUpdateContract, _ *WorkspaceAPIClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceAPIClient) updateHandleResponse(resp *http.Response) (WorkspaceAPIClientUpdateResponse, error) { + result := WorkspaceAPIClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.APIContract); err != nil { + return WorkspaceAPIClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapidiagnostic_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapidiagnostic_client.go new file mode 100644 index 00000000..01d7bc70 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapidiagnostic_client.go @@ -0,0 +1,541 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceAPIDiagnosticClient contains the methods for the WorkspaceAPIDiagnostic group. +// Don't use this type directly, use NewWorkspaceAPIDiagnosticClient() instead. +type WorkspaceAPIDiagnosticClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceAPIDiagnosticClient creates a new instance of WorkspaceAPIDiagnosticClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceAPIDiagnosticClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAPIDiagnosticClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceAPIDiagnosticClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates a new Diagnostic for an API or updates an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - WorkspaceAPIDiagnosticClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.CreateOrUpdate +// method. +func (client *WorkspaceAPIDiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, diagnosticID string, parameters DiagnosticContract, options *WorkspaceAPIDiagnosticClientCreateOrUpdateOptions) (WorkspaceAPIDiagnosticClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIDiagnosticClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, diagnosticID, parameters, options) + if err != nil { + return WorkspaceAPIDiagnosticClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIDiagnosticClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIDiagnosticClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceAPIDiagnosticClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, diagnosticID string, parameters DiagnosticContract, options *WorkspaceAPIDiagnosticClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if diagnosticID == "" { + return nil, errors.New("parameter diagnosticID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticId}", url.PathEscape(diagnosticID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceAPIDiagnosticClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceAPIDiagnosticClientCreateOrUpdateResponse, error) { + result := WorkspaceAPIDiagnosticClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticContract); err != nil { + return WorkspaceAPIDiagnosticClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified Diagnostic from an API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceAPIDiagnosticClientDeleteOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.Delete +// method. +func (client *WorkspaceAPIDiagnosticClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, diagnosticID string, ifMatch string, options *WorkspaceAPIDiagnosticClientDeleteOptions) (WorkspaceAPIDiagnosticClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceAPIDiagnosticClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, diagnosticID, ifMatch, options) + if err != nil { + return WorkspaceAPIDiagnosticClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIDiagnosticClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIDiagnosticClientDeleteResponse{}, err + } + return WorkspaceAPIDiagnosticClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceAPIDiagnosticClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, diagnosticID string, ifMatch string, _ *WorkspaceAPIDiagnosticClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if diagnosticID == "" { + return nil, errors.New("parameter diagnosticID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticId}", url.PathEscape(diagnosticID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the Diagnostic for an API specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIDiagnosticClientGetOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.Get +// method. +func (client *WorkspaceAPIDiagnosticClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, diagnosticID string, options *WorkspaceAPIDiagnosticClientGetOptions) (WorkspaceAPIDiagnosticClientGetResponse, error) { + var err error + const operationName = "WorkspaceAPIDiagnosticClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, diagnosticID, options) + if err != nil { + return WorkspaceAPIDiagnosticClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIDiagnosticClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIDiagnosticClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceAPIDiagnosticClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, diagnosticID string, _ *WorkspaceAPIDiagnosticClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if diagnosticID == "" { + return nil, errors.New("parameter diagnosticID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticId}", url.PathEscape(diagnosticID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceAPIDiagnosticClient) getHandleResponse(resp *http.Response) (WorkspaceAPIDiagnosticClientGetResponse, error) { + result := WorkspaceAPIDiagnosticClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticContract); err != nil { + return WorkspaceAPIDiagnosticClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIDiagnosticClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.GetEntityTag +// method. +func (client *WorkspaceAPIDiagnosticClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, diagnosticID string, options *WorkspaceAPIDiagnosticClientGetEntityTagOptions) (WorkspaceAPIDiagnosticClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceAPIDiagnosticClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, diagnosticID, options) + if err != nil { + return WorkspaceAPIDiagnosticClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIDiagnosticClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIDiagnosticClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceAPIDiagnosticClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, diagnosticID string, _ *WorkspaceAPIDiagnosticClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if diagnosticID == "" { + return nil, errors.New("parameter diagnosticID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticId}", url.PathEscape(diagnosticID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceAPIDiagnosticClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceAPIDiagnosticClientGetEntityTagResponse, error) { + result := WorkspaceAPIDiagnosticClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByWorkspacePager - Lists all diagnostics of an API. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIDiagnosticClientListByWorkspaceOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.NewListByWorkspacePager +// method. +func (client *WorkspaceAPIDiagnosticClient) NewListByWorkspacePager(resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIDiagnosticClientListByWorkspaceOptions) *runtime.Pager[WorkspaceAPIDiagnosticClientListByWorkspaceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceAPIDiagnosticClientListByWorkspaceResponse]{ + More: func(page WorkspaceAPIDiagnosticClientListByWorkspaceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceAPIDiagnosticClientListByWorkspaceResponse) (WorkspaceAPIDiagnosticClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceAPIDiagnosticClient.NewListByWorkspacePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByWorkspaceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, options) + }, nil) + if err != nil { + return WorkspaceAPIDiagnosticClientListByWorkspaceResponse{}, err + } + return client.listByWorkspaceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByWorkspaceCreateRequest creates the ListByWorkspace request. +func (client *WorkspaceAPIDiagnosticClient) listByWorkspaceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIDiagnosticClientListByWorkspaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByWorkspaceHandleResponse handles the ListByWorkspace response. +func (client *WorkspaceAPIDiagnosticClient) listByWorkspaceHandleResponse(resp *http.Response) (WorkspaceAPIDiagnosticClientListByWorkspaceResponse, error) { + result := WorkspaceAPIDiagnosticClientListByWorkspaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticCollection); err != nil { + return WorkspaceAPIDiagnosticClientListByWorkspaceResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the Diagnostic for an API specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Diagnostic Update parameters. +// - options - WorkspaceAPIDiagnosticClientUpdateOptions contains the optional parameters for the WorkspaceAPIDiagnosticClient.Update +// method. +func (client *WorkspaceAPIDiagnosticClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, diagnosticID string, ifMatch string, parameters DiagnosticUpdateContract, options *WorkspaceAPIDiagnosticClientUpdateOptions) (WorkspaceAPIDiagnosticClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIDiagnosticClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, diagnosticID, ifMatch, parameters, options) + if err != nil { + return WorkspaceAPIDiagnosticClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIDiagnosticClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIDiagnosticClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceAPIDiagnosticClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, diagnosticID string, ifMatch string, parameters DiagnosticUpdateContract, _ *WorkspaceAPIDiagnosticClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if diagnosticID == "" { + return nil, errors.New("parameter diagnosticID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticId}", url.PathEscape(diagnosticID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceAPIDiagnosticClient) updateHandleResponse(resp *http.Response) (WorkspaceAPIDiagnosticClientUpdateResponse, error) { + result := WorkspaceAPIDiagnosticClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticContract); err != nil { + return WorkspaceAPIDiagnosticClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapiexport_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapiexport_client.go new file mode 100644 index 00000000..fff7951e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapiexport_client.go @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkspaceAPIExportClient contains the methods for the WorkspaceAPIExport group. +// Don't use this type directly, use NewWorkspaceAPIExportClient() instead. +type WorkspaceAPIExportClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceAPIExportClient creates a new instance of WorkspaceAPIExportClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceAPIExportClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAPIExportClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceAPIExportClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key +// valid for 5 minutes. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - formatParam - Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. +// - export - Query parameter required to export the API details. +// - options - WorkspaceAPIExportClientGetOptions contains the optional parameters for the WorkspaceAPIExportClient.Get method. +func (client *WorkspaceAPIExportClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, formatParam ExportFormat, export ExportAPI, options *WorkspaceAPIExportClientGetOptions) (WorkspaceAPIExportClientGetResponse, error) { + var err error + const operationName = "WorkspaceAPIExportClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, formatParam, export, options) + if err != nil { + return WorkspaceAPIExportClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIExportClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIExportClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceAPIExportClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, formatParam ExportFormat, export ExportAPI, _ *WorkspaceAPIExportClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + reqQP.Set("export", string(export)) + reqQP.Set("format", string(formatParam)) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceAPIExportClient) getHandleResponse(resp *http.Response) (WorkspaceAPIExportClientGetResponse, error) { + result := WorkspaceAPIExportClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIExportResult); err != nil { + return WorkspaceAPIExportClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapioperation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapioperation_client.go new file mode 100644 index 00000000..3c8dcd14 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapioperation_client.go @@ -0,0 +1,550 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceAPIOperationClient contains the methods for the WorkspaceAPIOperation group. +// Don't use this type directly, use NewWorkspaceAPIOperationClient() instead. +type WorkspaceAPIOperationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceAPIOperationClient creates a new instance of WorkspaceAPIOperationClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceAPIOperationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAPIOperationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceAPIOperationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates a new operation in the API or updates an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - WorkspaceAPIOperationClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIOperationClient.CreateOrUpdate +// method. +func (client *WorkspaceAPIOperationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, parameters OperationContract, options *WorkspaceAPIOperationClientCreateOrUpdateOptions) (WorkspaceAPIOperationClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIOperationClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, operationID, parameters, options) + if err != nil { + return WorkspaceAPIOperationClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIOperationClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIOperationClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceAPIOperationClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, parameters OperationContract, options *WorkspaceAPIOperationClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceAPIOperationClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceAPIOperationClientCreateOrUpdateResponse, error) { + result := WorkspaceAPIOperationClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.OperationContract); err != nil { + return WorkspaceAPIOperationClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified operation in the API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceAPIOperationClientDeleteOptions contains the optional parameters for the WorkspaceAPIOperationClient.Delete +// method. +func (client *WorkspaceAPIOperationClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, ifMatch string, options *WorkspaceAPIOperationClientDeleteOptions) (WorkspaceAPIOperationClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceAPIOperationClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, operationID, ifMatch, options) + if err != nil { + return WorkspaceAPIOperationClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIOperationClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIOperationClientDeleteResponse{}, err + } + return WorkspaceAPIOperationClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceAPIOperationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, ifMatch string, _ *WorkspaceAPIOperationClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the API Operation specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIOperationClientGetOptions contains the optional parameters for the WorkspaceAPIOperationClient.Get +// method. +func (client *WorkspaceAPIOperationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, options *WorkspaceAPIOperationClientGetOptions) (WorkspaceAPIOperationClientGetResponse, error) { + var err error + const operationName = "WorkspaceAPIOperationClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, operationID, options) + if err != nil { + return WorkspaceAPIOperationClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIOperationClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIOperationClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceAPIOperationClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, _ *WorkspaceAPIOperationClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceAPIOperationClient) getHandleResponse(resp *http.Response) (WorkspaceAPIOperationClientGetResponse, error) { + result := WorkspaceAPIOperationClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.OperationContract); err != nil { + return WorkspaceAPIOperationClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the API operation specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIOperationClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIOperationClient.GetEntityTag +// method. +func (client *WorkspaceAPIOperationClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, options *WorkspaceAPIOperationClientGetEntityTagOptions) (WorkspaceAPIOperationClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceAPIOperationClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, operationID, options) + if err != nil { + return WorkspaceAPIOperationClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIOperationClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIOperationClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceAPIOperationClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, _ *WorkspaceAPIOperationClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceAPIOperationClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceAPIOperationClientGetEntityTagResponse, error) { + result := WorkspaceAPIOperationClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByAPIPager - Lists a collection of the operations for the specified API. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - options - WorkspaceAPIOperationClientListByAPIOptions contains the optional parameters for the WorkspaceAPIOperationClient.NewListByAPIPager +// method. +func (client *WorkspaceAPIOperationClient) NewListByAPIPager(resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIOperationClientListByAPIOptions) *runtime.Pager[WorkspaceAPIOperationClientListByAPIResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceAPIOperationClientListByAPIResponse]{ + More: func(page WorkspaceAPIOperationClientListByAPIResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceAPIOperationClientListByAPIResponse) (WorkspaceAPIOperationClientListByAPIResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceAPIOperationClient.NewListByAPIPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, options) + }, nil) + if err != nil { + return WorkspaceAPIOperationClientListByAPIResponse{}, err + } + return client.listByAPIHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAPICreateRequest creates the ListByAPI request. +func (client *WorkspaceAPIOperationClient) listByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIOperationClientListByAPIOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAPIHandleResponse handles the ListByAPI response. +func (client *WorkspaceAPIOperationClient) listByAPIHandleResponse(resp *http.Response) (WorkspaceAPIOperationClientListByAPIResponse, error) { + result := WorkspaceAPIOperationClientListByAPIResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationCollection); err != nil { + return WorkspaceAPIOperationClientListByAPIResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the operation in the API specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - API Operation Update parameters. +// - options - WorkspaceAPIOperationClientUpdateOptions contains the optional parameters for the WorkspaceAPIOperationClient.Update +// method. +func (client *WorkspaceAPIOperationClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, ifMatch string, parameters OperationUpdateContract, options *WorkspaceAPIOperationClientUpdateOptions) (WorkspaceAPIOperationClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIOperationClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, operationID, ifMatch, parameters, options) + if err != nil { + return WorkspaceAPIOperationClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIOperationClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIOperationClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceAPIOperationClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, ifMatch string, parameters OperationUpdateContract, _ *WorkspaceAPIOperationClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceAPIOperationClient) updateHandleResponse(resp *http.Response) (WorkspaceAPIOperationClientUpdateResponse, error) { + result := WorkspaceAPIOperationClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.OperationContract); err != nil { + return WorkspaceAPIOperationClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapioperationpolicy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapioperationpolicy_client.go new file mode 100644 index 00000000..59b4d691 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapioperationpolicy_client.go @@ -0,0 +1,474 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkspaceAPIOperationPolicyClient contains the methods for the WorkspaceAPIOperationPolicy group. +// Don't use this type directly, use NewWorkspaceAPIOperationPolicyClient() instead. +type WorkspaceAPIOperationPolicyClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceAPIOperationPolicyClient creates a new instance of WorkspaceAPIOperationPolicyClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceAPIOperationPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAPIOperationPolicyClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceAPIOperationPolicyClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates policy configuration for the API Operation level. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - parameters - The policy contents to apply. +// - options - WorkspaceAPIOperationPolicyClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIOperationPolicyClient.CreateOrUpdate +// method. +func (client *WorkspaceAPIOperationPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, policyID PolicyIDName, parameters PolicyContract, options *WorkspaceAPIOperationPolicyClientCreateOrUpdateOptions) (WorkspaceAPIOperationPolicyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIOperationPolicyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, operationID, policyID, parameters, options) + if err != nil { + return WorkspaceAPIOperationPolicyClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIOperationPolicyClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIOperationPolicyClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceAPIOperationPolicyClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, policyID PolicyIDName, parameters PolicyContract, options *WorkspaceAPIOperationPolicyClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceAPIOperationPolicyClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceAPIOperationPolicyClientCreateOrUpdateResponse, error) { + result := WorkspaceAPIOperationPolicyClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return WorkspaceAPIOperationPolicyClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the policy configuration at the Api Operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceAPIOperationPolicyClientDeleteOptions contains the optional parameters for the WorkspaceAPIOperationPolicyClient.Delete +// method. +func (client *WorkspaceAPIOperationPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, policyID PolicyIDName, ifMatch string, options *WorkspaceAPIOperationPolicyClientDeleteOptions) (WorkspaceAPIOperationPolicyClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceAPIOperationPolicyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, operationID, policyID, ifMatch, options) + if err != nil { + return WorkspaceAPIOperationPolicyClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIOperationPolicyClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIOperationPolicyClientDeleteResponse{}, err + } + return WorkspaceAPIOperationPolicyClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceAPIOperationPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, policyID PolicyIDName, ifMatch string, _ *WorkspaceAPIOperationPolicyClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Get the policy configuration at the API Operation level. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - options - WorkspaceAPIOperationPolicyClientGetOptions contains the optional parameters for the WorkspaceAPIOperationPolicyClient.Get +// method. +func (client *WorkspaceAPIOperationPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, policyID PolicyIDName, options *WorkspaceAPIOperationPolicyClientGetOptions) (WorkspaceAPIOperationPolicyClientGetResponse, error) { + var err error + const operationName = "WorkspaceAPIOperationPolicyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, operationID, policyID, options) + if err != nil { + return WorkspaceAPIOperationPolicyClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIOperationPolicyClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIOperationPolicyClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceAPIOperationPolicyClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, policyID PolicyIDName, options *WorkspaceAPIOperationPolicyClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Format != nil { + reqQP.Set("format", string(*options.Format)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceAPIOperationPolicyClient) getHandleResponse(resp *http.Response) (WorkspaceAPIOperationPolicyClientGetResponse, error) { + result := WorkspaceAPIOperationPolicyClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return WorkspaceAPIOperationPolicyClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the API operation policy specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - options - WorkspaceAPIOperationPolicyClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIOperationPolicyClient.GetEntityTag +// method. +func (client *WorkspaceAPIOperationPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, policyID PolicyIDName, options *WorkspaceAPIOperationPolicyClientGetEntityTagOptions) (WorkspaceAPIOperationPolicyClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceAPIOperationPolicyClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, operationID, policyID, options) + if err != nil { + return WorkspaceAPIOperationPolicyClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIOperationPolicyClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIOperationPolicyClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceAPIOperationPolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, policyID PolicyIDName, _ *WorkspaceAPIOperationPolicyClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceAPIOperationPolicyClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceAPIOperationPolicyClientGetEntityTagResponse, error) { + result := WorkspaceAPIOperationPolicyClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByOperationPager - Get the list of policy configuration at the API Operation level. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - operationID - Operation identifier within an API. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIOperationPolicyClientListByOperationOptions contains the optional parameters for the WorkspaceAPIOperationPolicyClient.NewListByOperationPager +// method. +func (client *WorkspaceAPIOperationPolicyClient) NewListByOperationPager(resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, options *WorkspaceAPIOperationPolicyClientListByOperationOptions) *runtime.Pager[WorkspaceAPIOperationPolicyClientListByOperationResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceAPIOperationPolicyClientListByOperationResponse]{ + More: func(page WorkspaceAPIOperationPolicyClientListByOperationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceAPIOperationPolicyClientListByOperationResponse) (WorkspaceAPIOperationPolicyClientListByOperationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceAPIOperationPolicyClient.NewListByOperationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByOperationCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, operationID, options) + }, nil) + if err != nil { + return WorkspaceAPIOperationPolicyClientListByOperationResponse{}, err + } + return client.listByOperationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByOperationCreateRequest creates the ListByOperation request. +func (client *WorkspaceAPIOperationPolicyClient) listByOperationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, operationID string, _ *WorkspaceAPIOperationPolicyClientListByOperationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByOperationHandleResponse handles the ListByOperation response. +func (client *WorkspaceAPIOperationPolicyClient) listByOperationHandleResponse(resp *http.Response) (WorkspaceAPIOperationPolicyClientListByOperationResponse, error) { + result := WorkspaceAPIOperationPolicyClientListByOperationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyCollection); err != nil { + return WorkspaceAPIOperationPolicyClientListByOperationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapipolicy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapipolicy_client.go new file mode 100644 index 00000000..e8727316 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapipolicy_client.go @@ -0,0 +1,448 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkspaceAPIPolicyClient contains the methods for the WorkspaceAPIPolicy group. +// Don't use this type directly, use NewWorkspaceAPIPolicyClient() instead. +type WorkspaceAPIPolicyClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceAPIPolicyClient creates a new instance of WorkspaceAPIPolicyClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceAPIPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAPIPolicyClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceAPIPolicyClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates policy configuration for the API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - policyID - The identifier of the Policy. +// - parameters - The policy contents to apply. +// - options - WorkspaceAPIPolicyClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIPolicyClient.CreateOrUpdate +// method. +func (client *WorkspaceAPIPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, policyID PolicyIDName, parameters PolicyContract, options *WorkspaceAPIPolicyClientCreateOrUpdateOptions) (WorkspaceAPIPolicyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIPolicyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, policyID, parameters, options) + if err != nil { + return WorkspaceAPIPolicyClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIPolicyClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIPolicyClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceAPIPolicyClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, policyID PolicyIDName, parameters PolicyContract, options *WorkspaceAPIPolicyClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceAPIPolicyClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceAPIPolicyClientCreateOrUpdateResponse, error) { + result := WorkspaceAPIPolicyClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return WorkspaceAPIPolicyClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the policy configuration at the Api. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - policyID - The identifier of the Policy. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceAPIPolicyClientDeleteOptions contains the optional parameters for the WorkspaceAPIPolicyClient.Delete +// method. +func (client *WorkspaceAPIPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, policyID PolicyIDName, ifMatch string, options *WorkspaceAPIPolicyClientDeleteOptions) (WorkspaceAPIPolicyClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceAPIPolicyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, policyID, ifMatch, options) + if err != nil { + return WorkspaceAPIPolicyClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIPolicyClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIPolicyClientDeleteResponse{}, err + } + return WorkspaceAPIPolicyClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceAPIPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, policyID PolicyIDName, ifMatch string, _ *WorkspaceAPIPolicyClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Get the policy configuration at the API level. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - policyID - The identifier of the Policy. +// - options - WorkspaceAPIPolicyClientGetOptions contains the optional parameters for the WorkspaceAPIPolicyClient.Get method. +func (client *WorkspaceAPIPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, policyID PolicyIDName, options *WorkspaceAPIPolicyClientGetOptions) (WorkspaceAPIPolicyClientGetResponse, error) { + var err error + const operationName = "WorkspaceAPIPolicyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, policyID, options) + if err != nil { + return WorkspaceAPIPolicyClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIPolicyClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIPolicyClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceAPIPolicyClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, policyID PolicyIDName, options *WorkspaceAPIPolicyClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Format != nil { + reqQP.Set("format", string(*options.Format)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceAPIPolicyClient) getHandleResponse(resp *http.Response) (WorkspaceAPIPolicyClientGetResponse, error) { + result := WorkspaceAPIPolicyClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return WorkspaceAPIPolicyClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the API policy specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - policyID - The identifier of the Policy. +// - options - WorkspaceAPIPolicyClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIPolicyClient.GetEntityTag +// method. +func (client *WorkspaceAPIPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, policyID PolicyIDName, options *WorkspaceAPIPolicyClientGetEntityTagOptions) (WorkspaceAPIPolicyClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceAPIPolicyClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, policyID, options) + if err != nil { + return WorkspaceAPIPolicyClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIPolicyClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIPolicyClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceAPIPolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, policyID PolicyIDName, _ *WorkspaceAPIPolicyClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceAPIPolicyClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceAPIPolicyClientGetEntityTagResponse, error) { + result := WorkspaceAPIPolicyClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByAPIPager - Get the policy configuration at the API level. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - options - WorkspaceAPIPolicyClientListByAPIOptions contains the optional parameters for the WorkspaceAPIPolicyClient.NewListByAPIPager +// method. +func (client *WorkspaceAPIPolicyClient) NewListByAPIPager(resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIPolicyClientListByAPIOptions) *runtime.Pager[WorkspaceAPIPolicyClientListByAPIResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceAPIPolicyClientListByAPIResponse]{ + More: func(page WorkspaceAPIPolicyClientListByAPIResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceAPIPolicyClientListByAPIResponse) (WorkspaceAPIPolicyClientListByAPIResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceAPIPolicyClient.NewListByAPIPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, options) + }, nil) + if err != nil { + return WorkspaceAPIPolicyClientListByAPIResponse{}, err + } + return client.listByAPIHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAPICreateRequest creates the ListByAPI request. +func (client *WorkspaceAPIPolicyClient) listByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, _ *WorkspaceAPIPolicyClientListByAPIOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/policies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAPIHandleResponse handles the ListByAPI response. +func (client *WorkspaceAPIPolicyClient) listByAPIHandleResponse(resp *http.Response) (WorkspaceAPIPolicyClientListByAPIResponse, error) { + result := WorkspaceAPIPolicyClientListByAPIResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyCollection); err != nil { + return WorkspaceAPIPolicyClientListByAPIResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapirelease_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapirelease_client.go new file mode 100644 index 00000000..2045736c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapirelease_client.go @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceAPIReleaseClient contains the methods for the WorkspaceAPIRelease group. +// Don't use this type directly, use NewWorkspaceAPIReleaseClient() instead. +type WorkspaceAPIReleaseClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceAPIReleaseClient creates a new instance of WorkspaceAPIReleaseClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceAPIReleaseClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAPIReleaseClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceAPIReleaseClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates a new Release for the API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - releaseID - Release identifier within an API. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - WorkspaceAPIReleaseClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIReleaseClient.CreateOrUpdate +// method. +func (client *WorkspaceAPIReleaseClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, releaseID string, parameters APIReleaseContract, options *WorkspaceAPIReleaseClientCreateOrUpdateOptions) (WorkspaceAPIReleaseClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIReleaseClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, releaseID, parameters, options) + if err != nil { + return WorkspaceAPIReleaseClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIReleaseClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIReleaseClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceAPIReleaseClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, releaseID string, parameters APIReleaseContract, options *WorkspaceAPIReleaseClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if releaseID == "" { + return nil, errors.New("parameter releaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{releaseId}", url.PathEscape(releaseID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceAPIReleaseClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceAPIReleaseClientCreateOrUpdateResponse, error) { + result := WorkspaceAPIReleaseClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.APIReleaseContract); err != nil { + return WorkspaceAPIReleaseClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified release in the API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - releaseID - Release identifier within an API. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceAPIReleaseClientDeleteOptions contains the optional parameters for the WorkspaceAPIReleaseClient.Delete +// method. +func (client *WorkspaceAPIReleaseClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, releaseID string, ifMatch string, options *WorkspaceAPIReleaseClientDeleteOptions) (WorkspaceAPIReleaseClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceAPIReleaseClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, releaseID, ifMatch, options) + if err != nil { + return WorkspaceAPIReleaseClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIReleaseClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIReleaseClientDeleteResponse{}, err + } + return WorkspaceAPIReleaseClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceAPIReleaseClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, releaseID string, ifMatch string, _ *WorkspaceAPIReleaseClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if releaseID == "" { + return nil, errors.New("parameter releaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{releaseId}", url.PathEscape(releaseID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Returns the details of an API release. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - releaseID - Release identifier within an API. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIReleaseClientGetOptions contains the optional parameters for the WorkspaceAPIReleaseClient.Get method. +func (client *WorkspaceAPIReleaseClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, releaseID string, options *WorkspaceAPIReleaseClientGetOptions) (WorkspaceAPIReleaseClientGetResponse, error) { + var err error + const operationName = "WorkspaceAPIReleaseClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, releaseID, options) + if err != nil { + return WorkspaceAPIReleaseClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIReleaseClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIReleaseClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceAPIReleaseClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, releaseID string, _ *WorkspaceAPIReleaseClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if releaseID == "" { + return nil, errors.New("parameter releaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{releaseId}", url.PathEscape(releaseID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceAPIReleaseClient) getHandleResponse(resp *http.Response) (WorkspaceAPIReleaseClientGetResponse, error) { + result := WorkspaceAPIReleaseClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.APIReleaseContract); err != nil { + return WorkspaceAPIReleaseClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Returns the etag of an API release. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - releaseID - Release identifier within an API. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIReleaseClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIReleaseClient.GetEntityTag +// method. +func (client *WorkspaceAPIReleaseClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, releaseID string, options *WorkspaceAPIReleaseClientGetEntityTagOptions) (WorkspaceAPIReleaseClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceAPIReleaseClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, releaseID, options) + if err != nil { + return WorkspaceAPIReleaseClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIReleaseClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIReleaseClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceAPIReleaseClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, releaseID string, _ *WorkspaceAPIReleaseClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if releaseID == "" { + return nil, errors.New("parameter releaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{releaseId}", url.PathEscape(releaseID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceAPIReleaseClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceAPIReleaseClientGetEntityTagResponse, error) { + result := WorkspaceAPIReleaseClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists all releases of an API. An API release is created when making an API Revision current. Releases +// are also used to rollback to previous revisions. Results will be paged and can be constrained by +// the $top and $skip parameters. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIReleaseClientListByServiceOptions contains the optional parameters for the WorkspaceAPIReleaseClient.NewListByServicePager +// method. +func (client *WorkspaceAPIReleaseClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIReleaseClientListByServiceOptions) *runtime.Pager[WorkspaceAPIReleaseClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceAPIReleaseClientListByServiceResponse]{ + More: func(page WorkspaceAPIReleaseClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceAPIReleaseClientListByServiceResponse) (WorkspaceAPIReleaseClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceAPIReleaseClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, options) + }, nil) + if err != nil { + return WorkspaceAPIReleaseClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceAPIReleaseClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIReleaseClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceAPIReleaseClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceAPIReleaseClientListByServiceResponse, error) { + result := WorkspaceAPIReleaseClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIReleaseCollection); err != nil { + return WorkspaceAPIReleaseClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the release of the API specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - releaseID - Release identifier within an API. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - API Release Update parameters. +// - options - WorkspaceAPIReleaseClientUpdateOptions contains the optional parameters for the WorkspaceAPIReleaseClient.Update +// method. +func (client *WorkspaceAPIReleaseClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, releaseID string, ifMatch string, parameters APIReleaseContract, options *WorkspaceAPIReleaseClientUpdateOptions) (WorkspaceAPIReleaseClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIReleaseClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, releaseID, ifMatch, parameters, options) + if err != nil { + return WorkspaceAPIReleaseClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIReleaseClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIReleaseClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceAPIReleaseClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, releaseID string, ifMatch string, parameters APIReleaseContract, _ *WorkspaceAPIReleaseClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/releases/{releaseId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if releaseID == "" { + return nil, errors.New("parameter releaseID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{releaseId}", url.PathEscape(releaseID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceAPIReleaseClient) updateHandleResponse(resp *http.Response) (WorkspaceAPIReleaseClientUpdateResponse, error) { + result := WorkspaceAPIReleaseClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.APIReleaseContract); err != nil { + return WorkspaceAPIReleaseClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapirevision_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapirevision_client.go new file mode 100644 index 00000000..ee60aa39 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapirevision_client.go @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceAPIRevisionClient contains the methods for the WorkspaceAPIRevision group. +// Don't use this type directly, use NewWorkspaceAPIRevisionClient() instead. +type WorkspaceAPIRevisionClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceAPIRevisionClient creates a new instance of WorkspaceAPIRevisionClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceAPIRevisionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAPIRevisionClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceAPIRevisionClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByServicePager - Lists all revisions of an API. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIRevisionClientListByServiceOptions contains the optional parameters for the WorkspaceAPIRevisionClient.NewListByServicePager +// method. +func (client *WorkspaceAPIRevisionClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIRevisionClientListByServiceOptions) *runtime.Pager[WorkspaceAPIRevisionClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceAPIRevisionClientListByServiceResponse]{ + More: func(page WorkspaceAPIRevisionClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceAPIRevisionClientListByServiceResponse) (WorkspaceAPIRevisionClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceAPIRevisionClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, options) + }, nil) + if err != nil { + return WorkspaceAPIRevisionClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceAPIRevisionClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPIRevisionClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/revisions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceAPIRevisionClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceAPIRevisionClientListByServiceResponse, error) { + result := WorkspaceAPIRevisionClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIRevisionCollection); err != nil { + return WorkspaceAPIRevisionClientListByServiceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapischema_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapischema_client.go new file mode 100644 index 00000000..9dcf8827 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapischema_client.go @@ -0,0 +1,467 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceAPISchemaClient contains the methods for the WorkspaceAPISchema group. +// Don't use this type directly, use NewWorkspaceAPISchemaClient() instead. +type WorkspaceAPISchemaClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceAPISchemaClient creates a new instance of WorkspaceAPISchemaClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceAPISchemaClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAPISchemaClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceAPISchemaClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates schema configuration for the API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - schemaID - Schema id identifier. Must be unique in the current API Management service instance. +// - parameters - The schema contents to apply. +// - options - WorkspaceAPISchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPISchemaClient.BeginCreateOrUpdate +// method. +func (client *WorkspaceAPISchemaClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, schemaID string, parameters SchemaContract, options *WorkspaceAPISchemaClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceAPISchemaClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, workspaceID, apiID, schemaID, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceAPISchemaClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceAPISchemaClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates schema configuration for the API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WorkspaceAPISchemaClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, schemaID string, parameters SchemaContract, options *WorkspaceAPISchemaClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceAPISchemaClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, schemaID, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceAPISchemaClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, schemaID string, parameters SchemaContract, options *WorkspaceAPISchemaClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if schemaID == "" { + return nil, errors.New("parameter schemaID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaId}", url.PathEscape(schemaID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Delete - Deletes the schema configuration at the Api. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - schemaID - Schema id identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceAPISchemaClientDeleteOptions contains the optional parameters for the WorkspaceAPISchemaClient.Delete +// method. +func (client *WorkspaceAPISchemaClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, schemaID string, ifMatch string, options *WorkspaceAPISchemaClientDeleteOptions) (WorkspaceAPISchemaClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceAPISchemaClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, schemaID, ifMatch, options) + if err != nil { + return WorkspaceAPISchemaClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPISchemaClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPISchemaClientDeleteResponse{}, err + } + return WorkspaceAPISchemaClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceAPISchemaClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, schemaID string, ifMatch string, options *WorkspaceAPISchemaClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if schemaID == "" { + return nil, errors.New("parameter schemaID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaId}", url.PathEscape(schemaID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Get the schema configuration at the API level. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - schemaID - Schema id identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPISchemaClientGetOptions contains the optional parameters for the WorkspaceAPISchemaClient.Get method. +func (client *WorkspaceAPISchemaClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, schemaID string, options *WorkspaceAPISchemaClientGetOptions) (WorkspaceAPISchemaClientGetResponse, error) { + var err error + const operationName = "WorkspaceAPISchemaClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, schemaID, options) + if err != nil { + return WorkspaceAPISchemaClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPISchemaClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPISchemaClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceAPISchemaClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, schemaID string, _ *WorkspaceAPISchemaClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if schemaID == "" { + return nil, errors.New("parameter schemaID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaId}", url.PathEscape(schemaID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceAPISchemaClient) getHandleResponse(resp *http.Response) (WorkspaceAPISchemaClientGetResponse, error) { + result := WorkspaceAPISchemaClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.SchemaContract); err != nil { + return WorkspaceAPISchemaClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the schema specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - schemaID - Schema id identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPISchemaClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPISchemaClient.GetEntityTag +// method. +func (client *WorkspaceAPISchemaClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, schemaID string, options *WorkspaceAPISchemaClientGetEntityTagOptions) (WorkspaceAPISchemaClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceAPISchemaClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, schemaID, options) + if err != nil { + return WorkspaceAPISchemaClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPISchemaClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPISchemaClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceAPISchemaClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, schemaID string, _ *WorkspaceAPISchemaClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if schemaID == "" { + return nil, errors.New("parameter schemaID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaId}", url.PathEscape(schemaID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceAPISchemaClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceAPISchemaClientGetEntityTagResponse, error) { + result := WorkspaceAPISchemaClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByAPIPager - Get the schema configuration at the API level. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - apiID - API revision identifier. Must be unique in the current API Management service instance. Non-current revision has +// ;rev=n as a suffix where n is the revision number. +// - options - WorkspaceAPISchemaClientListByAPIOptions contains the optional parameters for the WorkspaceAPISchemaClient.NewListByAPIPager +// method. +func (client *WorkspaceAPISchemaClient) NewListByAPIPager(resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPISchemaClientListByAPIOptions) *runtime.Pager[WorkspaceAPISchemaClientListByAPIResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceAPISchemaClientListByAPIResponse]{ + More: func(page WorkspaceAPISchemaClientListByAPIResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceAPISchemaClientListByAPIResponse) (WorkspaceAPISchemaClientListByAPIResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceAPISchemaClient.NewListByAPIPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, workspaceID, apiID, options) + }, nil) + if err != nil { + return WorkspaceAPISchemaClientListByAPIResponse{}, err + } + return client.listByAPIHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAPICreateRequest creates the ListByAPI request. +func (client *WorkspaceAPISchemaClient) listByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, apiID string, options *WorkspaceAPISchemaClientListByAPIOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if apiID == "" { + return nil, errors.New("parameter apiID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiId}", url.PathEscape(apiID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAPIHandleResponse handles the ListByAPI response. +func (client *WorkspaceAPISchemaClient) listByAPIHandleResponse(resp *http.Response) (WorkspaceAPISchemaClientListByAPIResponse, error) { + result := WorkspaceAPISchemaClientListByAPIResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SchemaCollection); err != nil { + return WorkspaceAPISchemaClientListByAPIResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapiversionset_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapiversionset_client.go new file mode 100644 index 00000000..75dc9a34 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceapiversionset_client.go @@ -0,0 +1,511 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceAPIVersionSetClient contains the methods for the WorkspaceAPIVersionSet group. +// Don't use this type directly, use NewWorkspaceAPIVersionSetClient() instead. +type WorkspaceAPIVersionSetClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceAPIVersionSetClient creates a new instance of WorkspaceAPIVersionSetClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceAPIVersionSetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceAPIVersionSetClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceAPIVersionSetClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or Updates a Api Version Set. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - WorkspaceAPIVersionSetClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.CreateOrUpdate +// method. +func (client *WorkspaceAPIVersionSetClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, versionSetID string, parameters APIVersionSetContract, options *WorkspaceAPIVersionSetClientCreateOrUpdateOptions) (WorkspaceAPIVersionSetClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIVersionSetClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, versionSetID, parameters, options) + if err != nil { + return WorkspaceAPIVersionSetClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIVersionSetClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIVersionSetClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceAPIVersionSetClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, versionSetID string, parameters APIVersionSetContract, options *WorkspaceAPIVersionSetClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if versionSetID == "" { + return nil, errors.New("parameter versionSetID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{versionSetId}", url.PathEscape(versionSetID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceAPIVersionSetClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceAPIVersionSetClientCreateOrUpdateResponse, error) { + result := WorkspaceAPIVersionSetClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.APIVersionSetContract); err != nil { + return WorkspaceAPIVersionSetClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes specific Api Version Set. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceAPIVersionSetClientDeleteOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.Delete +// method. +func (client *WorkspaceAPIVersionSetClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, versionSetID string, ifMatch string, options *WorkspaceAPIVersionSetClientDeleteOptions) (WorkspaceAPIVersionSetClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceAPIVersionSetClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, versionSetID, ifMatch, options) + if err != nil { + return WorkspaceAPIVersionSetClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIVersionSetClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIVersionSetClientDeleteResponse{}, err + } + return WorkspaceAPIVersionSetClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceAPIVersionSetClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, versionSetID string, ifMatch string, _ *WorkspaceAPIVersionSetClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if versionSetID == "" { + return nil, errors.New("parameter versionSetID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{versionSetId}", url.PathEscape(versionSetID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the Api Version Set specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIVersionSetClientGetOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.Get +// method. +func (client *WorkspaceAPIVersionSetClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, versionSetID string, options *WorkspaceAPIVersionSetClientGetOptions) (WorkspaceAPIVersionSetClientGetResponse, error) { + var err error + const operationName = "WorkspaceAPIVersionSetClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, versionSetID, options) + if err != nil { + return WorkspaceAPIVersionSetClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIVersionSetClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIVersionSetClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceAPIVersionSetClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, versionSetID string, _ *WorkspaceAPIVersionSetClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if versionSetID == "" { + return nil, errors.New("parameter versionSetID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{versionSetId}", url.PathEscape(versionSetID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceAPIVersionSetClient) getHandleResponse(resp *http.Response) (WorkspaceAPIVersionSetClientGetResponse, error) { + result := WorkspaceAPIVersionSetClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.APIVersionSetContract); err != nil { + return WorkspaceAPIVersionSetClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the Api Version Set specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIVersionSetClientGetEntityTagOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.GetEntityTag +// method. +func (client *WorkspaceAPIVersionSetClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, versionSetID string, options *WorkspaceAPIVersionSetClientGetEntityTagOptions) (WorkspaceAPIVersionSetClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceAPIVersionSetClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, versionSetID, options) + if err != nil { + return WorkspaceAPIVersionSetClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIVersionSetClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIVersionSetClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceAPIVersionSetClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, versionSetID string, _ *WorkspaceAPIVersionSetClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if versionSetID == "" { + return nil, errors.New("parameter versionSetID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{versionSetId}", url.PathEscape(versionSetID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceAPIVersionSetClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceAPIVersionSetClientGetEntityTagResponse, error) { + result := WorkspaceAPIVersionSetClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists a collection of API Version Sets in the specified workspace with a service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceAPIVersionSetClientListByServiceOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.NewListByServicePager +// method. +func (client *WorkspaceAPIVersionSetClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceAPIVersionSetClientListByServiceOptions) *runtime.Pager[WorkspaceAPIVersionSetClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceAPIVersionSetClientListByServiceResponse]{ + More: func(page WorkspaceAPIVersionSetClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceAPIVersionSetClientListByServiceResponse) (WorkspaceAPIVersionSetClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceAPIVersionSetClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceAPIVersionSetClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceAPIVersionSetClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceAPIVersionSetClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceAPIVersionSetClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceAPIVersionSetClientListByServiceResponse, error) { + result := WorkspaceAPIVersionSetClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIVersionSetCollection); err != nil { + return WorkspaceAPIVersionSetClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the Api VersionSet specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - versionSetID - Api Version Set identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update parameters. +// - options - WorkspaceAPIVersionSetClientUpdateOptions contains the optional parameters for the WorkspaceAPIVersionSetClient.Update +// method. +func (client *WorkspaceAPIVersionSetClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, versionSetID string, ifMatch string, parameters APIVersionSetUpdateParameters, options *WorkspaceAPIVersionSetClientUpdateOptions) (WorkspaceAPIVersionSetClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceAPIVersionSetClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, versionSetID, ifMatch, parameters, options) + if err != nil { + return WorkspaceAPIVersionSetClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceAPIVersionSetClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceAPIVersionSetClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceAPIVersionSetClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, versionSetID string, ifMatch string, parameters APIVersionSetUpdateParameters, _ *WorkspaceAPIVersionSetClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apiVersionSets/{versionSetId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if versionSetID == "" { + return nil, errors.New("parameter versionSetID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{versionSetId}", url.PathEscape(versionSetID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceAPIVersionSetClient) updateHandleResponse(resp *http.Response) (WorkspaceAPIVersionSetClientUpdateResponse, error) { + result := WorkspaceAPIVersionSetClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.APIVersionSetContract); err != nil { + return WorkspaceAPIVersionSetClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacebackend_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacebackend_client.go new file mode 100644 index 00000000..19bccbbb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacebackend_client.go @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceBackendClient contains the methods for the WorkspaceBackend group. +// Don't use this type directly, use NewWorkspaceBackendClient() instead. +type WorkspaceBackendClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceBackendClient creates a new instance of WorkspaceBackendClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceBackendClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceBackendClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceBackendClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or Updates a backend. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - WorkspaceBackendClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceBackendClient.CreateOrUpdate +// method. +func (client *WorkspaceBackendClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, backendID string, parameters BackendContract, options *WorkspaceBackendClientCreateOrUpdateOptions) (WorkspaceBackendClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceBackendClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, backendID, parameters, options) + if err != nil { + return WorkspaceBackendClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceBackendClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceBackendClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceBackendClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, backendID string, parameters BackendContract, options *WorkspaceBackendClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if backendID == "" { + return nil, errors.New("parameter backendID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backendId}", url.PathEscape(backendID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceBackendClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceBackendClientCreateOrUpdateResponse, error) { + result := WorkspaceBackendClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.BackendContract); err != nil { + return WorkspaceBackendClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified backend. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceBackendClientDeleteOptions contains the optional parameters for the WorkspaceBackendClient.Delete method. +func (client *WorkspaceBackendClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, backendID string, ifMatch string, options *WorkspaceBackendClientDeleteOptions) (WorkspaceBackendClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceBackendClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, backendID, ifMatch, options) + if err != nil { + return WorkspaceBackendClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceBackendClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceBackendClientDeleteResponse{}, err + } + return WorkspaceBackendClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceBackendClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, backendID string, ifMatch string, _ *WorkspaceBackendClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if backendID == "" { + return nil, errors.New("parameter backendID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backendId}", url.PathEscape(backendID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the backend specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. +// - options - WorkspaceBackendClientGetOptions contains the optional parameters for the WorkspaceBackendClient.Get method. +func (client *WorkspaceBackendClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, backendID string, options *WorkspaceBackendClientGetOptions) (WorkspaceBackendClientGetResponse, error) { + var err error + const operationName = "WorkspaceBackendClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, backendID, options) + if err != nil { + return WorkspaceBackendClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceBackendClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceBackendClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceBackendClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, backendID string, _ *WorkspaceBackendClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if backendID == "" { + return nil, errors.New("parameter backendID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backendId}", url.PathEscape(backendID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceBackendClient) getHandleResponse(resp *http.Response) (WorkspaceBackendClientGetResponse, error) { + result := WorkspaceBackendClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.BackendContract); err != nil { + return WorkspaceBackendClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the backend specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. +// - options - WorkspaceBackendClientGetEntityTagOptions contains the optional parameters for the WorkspaceBackendClient.GetEntityTag +// method. +func (client *WorkspaceBackendClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, backendID string, options *WorkspaceBackendClientGetEntityTagOptions) (WorkspaceBackendClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceBackendClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, backendID, options) + if err != nil { + return WorkspaceBackendClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceBackendClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceBackendClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceBackendClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, backendID string, _ *WorkspaceBackendClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if backendID == "" { + return nil, errors.New("parameter backendID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backendId}", url.PathEscape(backendID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceBackendClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceBackendClientGetEntityTagResponse, error) { + result := WorkspaceBackendClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByWorkspacePager - Lists a collection of backends in the specified workspace. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceBackendClientListByWorkspaceOptions contains the optional parameters for the WorkspaceBackendClient.NewListByWorkspacePager +// method. +func (client *WorkspaceBackendClient) NewListByWorkspacePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceBackendClientListByWorkspaceOptions) *runtime.Pager[WorkspaceBackendClientListByWorkspaceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceBackendClientListByWorkspaceResponse]{ + More: func(page WorkspaceBackendClientListByWorkspaceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceBackendClientListByWorkspaceResponse) (WorkspaceBackendClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceBackendClient.NewListByWorkspacePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByWorkspaceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceBackendClientListByWorkspaceResponse{}, err + } + return client.listByWorkspaceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByWorkspaceCreateRequest creates the ListByWorkspace request. +func (client *WorkspaceBackendClient) listByWorkspaceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceBackendClientListByWorkspaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByWorkspaceHandleResponse handles the ListByWorkspace response. +func (client *WorkspaceBackendClient) listByWorkspaceHandleResponse(resp *http.Response) (WorkspaceBackendClientListByWorkspaceResponse, error) { + result := WorkspaceBackendClientListByWorkspaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackendCollection); err != nil { + return WorkspaceBackendClientListByWorkspaceResponse{}, err + } + return result, nil +} + +// Update - Updates an existing backend. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - backendID - Identifier of the Backend entity. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update parameters. +// - options - WorkspaceBackendClientUpdateOptions contains the optional parameters for the WorkspaceBackendClient.Update method. +func (client *WorkspaceBackendClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, backendID string, ifMatch string, parameters BackendUpdateParameters, options *WorkspaceBackendClientUpdateOptions) (WorkspaceBackendClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceBackendClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, backendID, ifMatch, parameters, options) + if err != nil { + return WorkspaceBackendClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceBackendClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceBackendClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceBackendClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, backendID string, ifMatch string, parameters BackendUpdateParameters, _ *WorkspaceBackendClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if backendID == "" { + return nil, errors.New("parameter backendID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backendId}", url.PathEscape(backendID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceBackendClient) updateHandleResponse(resp *http.Response) (WorkspaceBackendClientUpdateResponse, error) { + result := WorkspaceBackendClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.BackendContract); err != nil { + return WorkspaceBackendClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacecertificate_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacecertificate_client.go new file mode 100644 index 00000000..cab6e250 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacecertificate_client.go @@ -0,0 +1,507 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceCertificateClient contains the methods for the WorkspaceCertificate group. +// Don't use this type directly, use NewWorkspaceCertificateClient() instead. +type WorkspaceCertificateClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceCertificateClient creates a new instance of WorkspaceCertificateClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceCertificateClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceCertificateClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceCertificateClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates the certificate being used for authentication with the backend. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance. +// - parameters - Create or Update parameters. +// - options - WorkspaceCertificateClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceCertificateClient.CreateOrUpdate +// method. +func (client *WorkspaceCertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, certificateID string, parameters CertificateCreateOrUpdateParameters, options *WorkspaceCertificateClientCreateOrUpdateOptions) (WorkspaceCertificateClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceCertificateClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, certificateID, parameters, options) + if err != nil { + return WorkspaceCertificateClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceCertificateClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceCertificateClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceCertificateClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, certificateID string, parameters CertificateCreateOrUpdateParameters, options *WorkspaceCertificateClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if certificateID == "" { + return nil, errors.New("parameter certificateID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateId}", url.PathEscape(certificateID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceCertificateClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceCertificateClientCreateOrUpdateResponse, error) { + result := WorkspaceCertificateClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateContract); err != nil { + return WorkspaceCertificateClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes specific certificate. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceCertificateClientDeleteOptions contains the optional parameters for the WorkspaceCertificateClient.Delete +// method. +func (client *WorkspaceCertificateClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, certificateID string, ifMatch string, options *WorkspaceCertificateClientDeleteOptions) (WorkspaceCertificateClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceCertificateClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, certificateID, ifMatch, options) + if err != nil { + return WorkspaceCertificateClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceCertificateClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceCertificateClientDeleteResponse{}, err + } + return WorkspaceCertificateClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceCertificateClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, certificateID string, ifMatch string, _ *WorkspaceCertificateClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if certificateID == "" { + return nil, errors.New("parameter certificateID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateId}", url.PathEscape(certificateID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the certificate specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance. +// - options - WorkspaceCertificateClientGetOptions contains the optional parameters for the WorkspaceCertificateClient.Get +// method. +func (client *WorkspaceCertificateClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, certificateID string, options *WorkspaceCertificateClientGetOptions) (WorkspaceCertificateClientGetResponse, error) { + var err error + const operationName = "WorkspaceCertificateClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, certificateID, options) + if err != nil { + return WorkspaceCertificateClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceCertificateClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceCertificateClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceCertificateClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, certificateID string, _ *WorkspaceCertificateClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if certificateID == "" { + return nil, errors.New("parameter certificateID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateId}", url.PathEscape(certificateID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceCertificateClient) getHandleResponse(resp *http.Response) (WorkspaceCertificateClientGetResponse, error) { + result := WorkspaceCertificateClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateContract); err != nil { + return WorkspaceCertificateClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the certificate specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance. +// - options - WorkspaceCertificateClientGetEntityTagOptions contains the optional parameters for the WorkspaceCertificateClient.GetEntityTag +// method. +func (client *WorkspaceCertificateClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, certificateID string, options *WorkspaceCertificateClientGetEntityTagOptions) (WorkspaceCertificateClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceCertificateClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, certificateID, options) + if err != nil { + return WorkspaceCertificateClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceCertificateClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceCertificateClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceCertificateClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, certificateID string, _ *WorkspaceCertificateClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if certificateID == "" { + return nil, errors.New("parameter certificateID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateId}", url.PathEscape(certificateID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceCertificateClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceCertificateClientGetEntityTagResponse, error) { + result := WorkspaceCertificateClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByWorkspacePager - Lists a collection of all certificates in the specified workspace. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceCertificateClientListByWorkspaceOptions contains the optional parameters for the WorkspaceCertificateClient.NewListByWorkspacePager +// method. +func (client *WorkspaceCertificateClient) NewListByWorkspacePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceCertificateClientListByWorkspaceOptions) *runtime.Pager[WorkspaceCertificateClientListByWorkspaceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceCertificateClientListByWorkspaceResponse]{ + More: func(page WorkspaceCertificateClientListByWorkspaceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceCertificateClientListByWorkspaceResponse) (WorkspaceCertificateClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceCertificateClient.NewListByWorkspacePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByWorkspaceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceCertificateClientListByWorkspaceResponse{}, err + } + return client.listByWorkspaceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByWorkspaceCreateRequest creates the ListByWorkspace request. +func (client *WorkspaceCertificateClient) listByWorkspaceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceCertificateClientListByWorkspaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.IsKeyVaultRefreshFailed != nil { + reqQP.Set("isKeyVaultRefreshFailed", strconv.FormatBool(*options.IsKeyVaultRefreshFailed)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByWorkspaceHandleResponse handles the ListByWorkspace response. +func (client *WorkspaceCertificateClient) listByWorkspaceHandleResponse(resp *http.Response) (WorkspaceCertificateClientListByWorkspaceResponse, error) { + result := WorkspaceCertificateClientListByWorkspaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateCollection); err != nil { + return WorkspaceCertificateClientListByWorkspaceResponse{}, err + } + return result, nil +} + +// RefreshSecret - From KeyVault, Refresh the certificate being used for authentication with the backend. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - certificateID - Identifier of the certificate entity. Must be unique in the current API Management service instance. +// - options - WorkspaceCertificateClientRefreshSecretOptions contains the optional parameters for the WorkspaceCertificateClient.RefreshSecret +// method. +func (client *WorkspaceCertificateClient) RefreshSecret(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, certificateID string, options *WorkspaceCertificateClientRefreshSecretOptions) (WorkspaceCertificateClientRefreshSecretResponse, error) { + var err error + const operationName = "WorkspaceCertificateClient.RefreshSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.refreshSecretCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, certificateID, options) + if err != nil { + return WorkspaceCertificateClientRefreshSecretResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceCertificateClientRefreshSecretResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceCertificateClientRefreshSecretResponse{}, err + } + resp, err := client.refreshSecretHandleResponse(httpResp) + return resp, err +} + +// refreshSecretCreateRequest creates the RefreshSecret request. +func (client *WorkspaceCertificateClient) refreshSecretCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, certificateID string, _ *WorkspaceCertificateClientRefreshSecretOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}/refreshSecret" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if certificateID == "" { + return nil, errors.New("parameter certificateID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateId}", url.PathEscape(certificateID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// refreshSecretHandleResponse handles the RefreshSecret response. +func (client *WorkspaceCertificateClient) refreshSecretHandleResponse(resp *http.Response) (WorkspaceCertificateClientRefreshSecretResponse, error) { + result := WorkspaceCertificateClientRefreshSecretResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateContract); err != nil { + return WorkspaceCertificateClientRefreshSecretResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacediagnostic_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacediagnostic_client.go new file mode 100644 index 00000000..660f38a1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacediagnostic_client.go @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceDiagnosticClient contains the methods for the WorkspaceDiagnostic group. +// Don't use this type directly, use NewWorkspaceDiagnosticClient() instead. +type WorkspaceDiagnosticClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceDiagnosticClient creates a new instance of WorkspaceDiagnosticClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceDiagnosticClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceDiagnosticClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceDiagnosticClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates a new Diagnostic or updates an existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - WorkspaceDiagnosticClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceDiagnosticClient.CreateOrUpdate +// method. +func (client *WorkspaceDiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, diagnosticID string, parameters DiagnosticContract, options *WorkspaceDiagnosticClientCreateOrUpdateOptions) (WorkspaceDiagnosticClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceDiagnosticClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, diagnosticID, parameters, options) + if err != nil { + return WorkspaceDiagnosticClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceDiagnosticClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceDiagnosticClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceDiagnosticClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, diagnosticID string, parameters DiagnosticContract, options *WorkspaceDiagnosticClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if diagnosticID == "" { + return nil, errors.New("parameter diagnosticID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticId}", url.PathEscape(diagnosticID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceDiagnosticClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceDiagnosticClientCreateOrUpdateResponse, error) { + result := WorkspaceDiagnosticClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticContract); err != nil { + return WorkspaceDiagnosticClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified Diagnostic. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceDiagnosticClientDeleteOptions contains the optional parameters for the WorkspaceDiagnosticClient.Delete +// method. +func (client *WorkspaceDiagnosticClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, diagnosticID string, ifMatch string, options *WorkspaceDiagnosticClientDeleteOptions) (WorkspaceDiagnosticClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceDiagnosticClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, diagnosticID, ifMatch, options) + if err != nil { + return WorkspaceDiagnosticClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceDiagnosticClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceDiagnosticClientDeleteResponse{}, err + } + return WorkspaceDiagnosticClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceDiagnosticClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, diagnosticID string, ifMatch string, _ *WorkspaceDiagnosticClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if diagnosticID == "" { + return nil, errors.New("parameter diagnosticID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticId}", url.PathEscape(diagnosticID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the Diagnostic specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceDiagnosticClientGetOptions contains the optional parameters for the WorkspaceDiagnosticClient.Get method. +func (client *WorkspaceDiagnosticClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, diagnosticID string, options *WorkspaceDiagnosticClientGetOptions) (WorkspaceDiagnosticClientGetResponse, error) { + var err error + const operationName = "WorkspaceDiagnosticClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, diagnosticID, options) + if err != nil { + return WorkspaceDiagnosticClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceDiagnosticClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceDiagnosticClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceDiagnosticClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, diagnosticID string, _ *WorkspaceDiagnosticClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if diagnosticID == "" { + return nil, errors.New("parameter diagnosticID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticId}", url.PathEscape(diagnosticID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceDiagnosticClient) getHandleResponse(resp *http.Response) (WorkspaceDiagnosticClientGetResponse, error) { + result := WorkspaceDiagnosticClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticContract); err != nil { + return WorkspaceDiagnosticClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the Diagnostic specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceDiagnosticClientGetEntityTagOptions contains the optional parameters for the WorkspaceDiagnosticClient.GetEntityTag +// method. +func (client *WorkspaceDiagnosticClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, diagnosticID string, options *WorkspaceDiagnosticClientGetEntityTagOptions) (WorkspaceDiagnosticClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceDiagnosticClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, diagnosticID, options) + if err != nil { + return WorkspaceDiagnosticClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceDiagnosticClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceDiagnosticClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceDiagnosticClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, diagnosticID string, _ *WorkspaceDiagnosticClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if diagnosticID == "" { + return nil, errors.New("parameter diagnosticID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticId}", url.PathEscape(diagnosticID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceDiagnosticClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceDiagnosticClientGetEntityTagResponse, error) { + result := WorkspaceDiagnosticClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByWorkspacePager - Lists all diagnostics in the specified workspace. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceDiagnosticClientListByWorkspaceOptions contains the optional parameters for the WorkspaceDiagnosticClient.NewListByWorkspacePager +// method. +func (client *WorkspaceDiagnosticClient) NewListByWorkspacePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceDiagnosticClientListByWorkspaceOptions) *runtime.Pager[WorkspaceDiagnosticClientListByWorkspaceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceDiagnosticClientListByWorkspaceResponse]{ + More: func(page WorkspaceDiagnosticClientListByWorkspaceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceDiagnosticClientListByWorkspaceResponse) (WorkspaceDiagnosticClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceDiagnosticClient.NewListByWorkspacePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByWorkspaceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceDiagnosticClientListByWorkspaceResponse{}, err + } + return client.listByWorkspaceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByWorkspaceCreateRequest creates the ListByWorkspace request. +func (client *WorkspaceDiagnosticClient) listByWorkspaceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceDiagnosticClientListByWorkspaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByWorkspaceHandleResponse handles the ListByWorkspace response. +func (client *WorkspaceDiagnosticClient) listByWorkspaceHandleResponse(resp *http.Response) (WorkspaceDiagnosticClientListByWorkspaceResponse, error) { + result := WorkspaceDiagnosticClientListByWorkspaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticCollection); err != nil { + return WorkspaceDiagnosticClientListByWorkspaceResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the Diagnostic specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - diagnosticID - Diagnostic identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Diagnostic Update parameters. +// - options - WorkspaceDiagnosticClientUpdateOptions contains the optional parameters for the WorkspaceDiagnosticClient.Update +// method. +func (client *WorkspaceDiagnosticClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, diagnosticID string, ifMatch string, parameters DiagnosticUpdateContract, options *WorkspaceDiagnosticClientUpdateOptions) (WorkspaceDiagnosticClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceDiagnosticClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, diagnosticID, ifMatch, parameters, options) + if err != nil { + return WorkspaceDiagnosticClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceDiagnosticClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceDiagnosticClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceDiagnosticClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, diagnosticID string, ifMatch string, parameters DiagnosticUpdateContract, _ *WorkspaceDiagnosticClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if diagnosticID == "" { + return nil, errors.New("parameter diagnosticID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticId}", url.PathEscape(diagnosticID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceDiagnosticClient) updateHandleResponse(resp *http.Response) (WorkspaceDiagnosticClientUpdateResponse, error) { + result := WorkspaceDiagnosticClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticContract); err != nil { + return WorkspaceDiagnosticClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceglobalschema_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceglobalschema_client.go new file mode 100644 index 00000000..ec71d3f1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceglobalschema_client.go @@ -0,0 +1,435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceGlobalSchemaClient contains the methods for the WorkspaceGlobalSchema group. +// Don't use this type directly, use NewWorkspaceGlobalSchemaClient() instead. +type WorkspaceGlobalSchemaClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceGlobalSchemaClient creates a new instance of WorkspaceGlobalSchemaClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceGlobalSchemaClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceGlobalSchemaClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceGlobalSchemaClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates new or updates existing specified Schema of the workspace in an API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - schemaID - Schema id identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - WorkspaceGlobalSchemaClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceGlobalSchemaClient.BeginCreateOrUpdate +// method. +func (client *WorkspaceGlobalSchemaClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, schemaID string, parameters GlobalSchemaContract, options *WorkspaceGlobalSchemaClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceGlobalSchemaClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, workspaceID, schemaID, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceGlobalSchemaClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceGlobalSchemaClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates new or updates existing specified Schema of the workspace in an API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WorkspaceGlobalSchemaClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, schemaID string, parameters GlobalSchemaContract, options *WorkspaceGlobalSchemaClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceGlobalSchemaClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, schemaID, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceGlobalSchemaClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, schemaID string, parameters GlobalSchemaContract, options *WorkspaceGlobalSchemaClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if schemaID == "" { + return nil, errors.New("parameter schemaID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaId}", url.PathEscape(schemaID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Delete - Deletes specific Schema. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - schemaID - Schema id identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceGlobalSchemaClientDeleteOptions contains the optional parameters for the WorkspaceGlobalSchemaClient.Delete +// method. +func (client *WorkspaceGlobalSchemaClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, schemaID string, ifMatch string, options *WorkspaceGlobalSchemaClientDeleteOptions) (WorkspaceGlobalSchemaClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceGlobalSchemaClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, schemaID, ifMatch, options) + if err != nil { + return WorkspaceGlobalSchemaClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGlobalSchemaClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGlobalSchemaClientDeleteResponse{}, err + } + return WorkspaceGlobalSchemaClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceGlobalSchemaClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, schemaID string, ifMatch string, _ *WorkspaceGlobalSchemaClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if schemaID == "" { + return nil, errors.New("parameter schemaID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaId}", url.PathEscape(schemaID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the Schema specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - schemaID - Schema id identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceGlobalSchemaClientGetOptions contains the optional parameters for the WorkspaceGlobalSchemaClient.Get +// method. +func (client *WorkspaceGlobalSchemaClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, schemaID string, options *WorkspaceGlobalSchemaClientGetOptions) (WorkspaceGlobalSchemaClientGetResponse, error) { + var err error + const operationName = "WorkspaceGlobalSchemaClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, schemaID, options) + if err != nil { + return WorkspaceGlobalSchemaClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGlobalSchemaClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGlobalSchemaClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceGlobalSchemaClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, schemaID string, _ *WorkspaceGlobalSchemaClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if schemaID == "" { + return nil, errors.New("parameter schemaID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaId}", url.PathEscape(schemaID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceGlobalSchemaClient) getHandleResponse(resp *http.Response) (WorkspaceGlobalSchemaClientGetResponse, error) { + result := WorkspaceGlobalSchemaClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.GlobalSchemaContract); err != nil { + return WorkspaceGlobalSchemaClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the Schema specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - schemaID - Schema id identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceGlobalSchemaClientGetEntityTagOptions contains the optional parameters for the WorkspaceGlobalSchemaClient.GetEntityTag +// method. +func (client *WorkspaceGlobalSchemaClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, schemaID string, options *WorkspaceGlobalSchemaClientGetEntityTagOptions) (WorkspaceGlobalSchemaClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceGlobalSchemaClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, schemaID, options) + if err != nil { + return WorkspaceGlobalSchemaClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGlobalSchemaClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGlobalSchemaClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceGlobalSchemaClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, schemaID string, _ *WorkspaceGlobalSchemaClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas/{schemaId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if schemaID == "" { + return nil, errors.New("parameter schemaID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{schemaId}", url.PathEscape(schemaID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceGlobalSchemaClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceGlobalSchemaClientGetEntityTagResponse, error) { + result := WorkspaceGlobalSchemaClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists a collection of schemas registered with workspace in a service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceGlobalSchemaClientListByServiceOptions contains the optional parameters for the WorkspaceGlobalSchemaClient.NewListByServicePager +// method. +func (client *WorkspaceGlobalSchemaClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceGlobalSchemaClientListByServiceOptions) *runtime.Pager[WorkspaceGlobalSchemaClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceGlobalSchemaClientListByServiceResponse]{ + More: func(page WorkspaceGlobalSchemaClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceGlobalSchemaClientListByServiceResponse) (WorkspaceGlobalSchemaClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceGlobalSchemaClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceGlobalSchemaClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceGlobalSchemaClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceGlobalSchemaClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/schemas" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceGlobalSchemaClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceGlobalSchemaClientListByServiceResponse, error) { + result := WorkspaceGlobalSchemaClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GlobalSchemaCollection); err != nil { + return WorkspaceGlobalSchemaClientListByServiceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacegroup_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacegroup_client.go new file mode 100644 index 00000000..c554cefc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacegroup_client.go @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceGroupClient contains the methods for the WorkspaceGroup group. +// Don't use this type directly, use NewWorkspaceGroupClient() instead. +type WorkspaceGroupClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceGroupClient creates a new instance of WorkspaceGroupClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceGroupClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceGroupClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or Updates a group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - groupID - Group identifier. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - WorkspaceGroupClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceGroupClient.CreateOrUpdate +// method. +func (client *WorkspaceGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, parameters GroupCreateParameters, options *WorkspaceGroupClientCreateOrUpdateOptions) (WorkspaceGroupClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceGroupClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, groupID, parameters, options) + if err != nil { + return WorkspaceGroupClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGroupClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGroupClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceGroupClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, parameters GroupCreateParameters, options *WorkspaceGroupClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if groupID == "" { + return nil, errors.New("parameter groupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupId}", url.PathEscape(groupID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceGroupClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceGroupClientCreateOrUpdateResponse, error) { + result := WorkspaceGroupClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.GroupContract); err != nil { + return WorkspaceGroupClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes specific group of the workspace in an API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - groupID - Group identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceGroupClientDeleteOptions contains the optional parameters for the WorkspaceGroupClient.Delete method. +func (client *WorkspaceGroupClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, ifMatch string, options *WorkspaceGroupClientDeleteOptions) (WorkspaceGroupClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceGroupClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, groupID, ifMatch, options) + if err != nil { + return WorkspaceGroupClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGroupClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGroupClientDeleteResponse{}, err + } + return WorkspaceGroupClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceGroupClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, ifMatch string, _ *WorkspaceGroupClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if groupID == "" { + return nil, errors.New("parameter groupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupId}", url.PathEscape(groupID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the group specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - groupID - Group identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceGroupClientGetOptions contains the optional parameters for the WorkspaceGroupClient.Get method. +func (client *WorkspaceGroupClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, options *WorkspaceGroupClientGetOptions) (WorkspaceGroupClientGetResponse, error) { + var err error + const operationName = "WorkspaceGroupClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, groupID, options) + if err != nil { + return WorkspaceGroupClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGroupClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGroupClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceGroupClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, _ *WorkspaceGroupClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if groupID == "" { + return nil, errors.New("parameter groupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupId}", url.PathEscape(groupID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceGroupClient) getHandleResponse(resp *http.Response) (WorkspaceGroupClientGetResponse, error) { + result := WorkspaceGroupClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.GroupContract); err != nil { + return WorkspaceGroupClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the group specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - groupID - Group identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceGroupClientGetEntityTagOptions contains the optional parameters for the WorkspaceGroupClient.GetEntityTag +// method. +func (client *WorkspaceGroupClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, options *WorkspaceGroupClientGetEntityTagOptions) (WorkspaceGroupClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceGroupClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, groupID, options) + if err != nil { + return WorkspaceGroupClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGroupClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGroupClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceGroupClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, _ *WorkspaceGroupClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if groupID == "" { + return nil, errors.New("parameter groupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupId}", url.PathEscape(groupID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceGroupClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceGroupClientGetEntityTagResponse, error) { + result := WorkspaceGroupClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists a collection of groups defined within a workspace in a service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceGroupClientListByServiceOptions contains the optional parameters for the WorkspaceGroupClient.NewListByServicePager +// method. +func (client *WorkspaceGroupClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceGroupClientListByServiceOptions) *runtime.Pager[WorkspaceGroupClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceGroupClientListByServiceResponse]{ + More: func(page WorkspaceGroupClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceGroupClientListByServiceResponse) (WorkspaceGroupClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceGroupClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceGroupClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceGroupClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceGroupClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceGroupClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceGroupClientListByServiceResponse, error) { + result := WorkspaceGroupClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GroupCollection); err != nil { + return WorkspaceGroupClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the group specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - groupID - Group identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update parameters. +// - options - WorkspaceGroupClientUpdateOptions contains the optional parameters for the WorkspaceGroupClient.Update method. +func (client *WorkspaceGroupClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, ifMatch string, parameters GroupUpdateParameters, options *WorkspaceGroupClientUpdateOptions) (WorkspaceGroupClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceGroupClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, groupID, ifMatch, parameters, options) + if err != nil { + return WorkspaceGroupClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGroupClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGroupClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceGroupClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, ifMatch string, parameters GroupUpdateParameters, _ *WorkspaceGroupClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if groupID == "" { + return nil, errors.New("parameter groupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupId}", url.PathEscape(groupID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceGroupClient) updateHandleResponse(resp *http.Response) (WorkspaceGroupClientUpdateResponse, error) { + result := WorkspaceGroupClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.GroupContract); err != nil { + return WorkspaceGroupClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacegroupuser_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacegroupuser_client.go new file mode 100644 index 00000000..abce313a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacegroupuser_client.go @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceGroupUserClient contains the methods for the WorkspaceGroupUser group. +// Don't use this type directly, use NewWorkspaceGroupUserClient() instead. +type WorkspaceGroupUserClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceGroupUserClient creates a new instance of WorkspaceGroupUserClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceGroupUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceGroupUserClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceGroupUserClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckEntityExists - Checks that user entity specified by identifier is associated with the group entity. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - groupID - Group identifier. Must be unique in the current API Management service instance. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceGroupUserClientCheckEntityExistsOptions contains the optional parameters for the WorkspaceGroupUserClient.CheckEntityExists +// method. +func (client *WorkspaceGroupUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, userID string, options *WorkspaceGroupUserClientCheckEntityExistsOptions) (WorkspaceGroupUserClientCheckEntityExistsResponse, error) { + var err error + const operationName = "WorkspaceGroupUserClient.CheckEntityExists" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkEntityExistsCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, groupID, userID, options) + if err != nil { + return WorkspaceGroupUserClientCheckEntityExistsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGroupUserClientCheckEntityExistsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGroupUserClientCheckEntityExistsResponse{}, err + } + return WorkspaceGroupUserClientCheckEntityExistsResponse{Success: httpResp.StatusCode >= 200 && httpResp.StatusCode < 300}, nil +} + +// checkEntityExistsCreateRequest creates the CheckEntityExists request. +func (client *WorkspaceGroupUserClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, userID string, _ *WorkspaceGroupUserClientCheckEntityExistsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if groupID == "" { + return nil, errors.New("parameter groupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupId}", url.PathEscape(groupID)) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Create - Add existing user to existing group +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - groupID - Group identifier. Must be unique in the current API Management service instance. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceGroupUserClientCreateOptions contains the optional parameters for the WorkspaceGroupUserClient.Create +// method. +func (client *WorkspaceGroupUserClient) Create(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, userID string, options *WorkspaceGroupUserClientCreateOptions) (WorkspaceGroupUserClientCreateResponse, error) { + var err error + const operationName = "WorkspaceGroupUserClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, groupID, userID, options) + if err != nil { + return WorkspaceGroupUserClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGroupUserClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGroupUserClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *WorkspaceGroupUserClient) createCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, userID string, _ *WorkspaceGroupUserClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if groupID == "" { + return nil, errors.New("parameter groupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupId}", url.PathEscape(groupID)) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *WorkspaceGroupUserClient) createHandleResponse(resp *http.Response) (WorkspaceGroupUserClientCreateResponse, error) { + result := WorkspaceGroupUserClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UserContract); err != nil { + return WorkspaceGroupUserClientCreateResponse{}, err + } + return result, nil +} + +// Delete - Remove existing user from existing group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - groupID - Group identifier. Must be unique in the current API Management service instance. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceGroupUserClientDeleteOptions contains the optional parameters for the WorkspaceGroupUserClient.Delete +// method. +func (client *WorkspaceGroupUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, userID string, options *WorkspaceGroupUserClientDeleteOptions) (WorkspaceGroupUserClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceGroupUserClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, groupID, userID, options) + if err != nil { + return WorkspaceGroupUserClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceGroupUserClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceGroupUserClientDeleteResponse{}, err + } + return WorkspaceGroupUserClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceGroupUserClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, userID string, _ *WorkspaceGroupUserClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if groupID == "" { + return nil, errors.New("parameter groupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupId}", url.PathEscape(groupID)) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListPager - Lists a collection of user entities associated with the group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - groupID - Group identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceGroupUserClientListOptions contains the optional parameters for the WorkspaceGroupUserClient.NewListPager +// method. +func (client *WorkspaceGroupUserClient) NewListPager(resourceGroupName string, serviceName string, workspaceID string, groupID string, options *WorkspaceGroupUserClientListOptions) *runtime.Pager[WorkspaceGroupUserClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceGroupUserClientListResponse]{ + More: func(page WorkspaceGroupUserClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceGroupUserClientListResponse) (WorkspaceGroupUserClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceGroupUserClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, groupID, options) + }, nil) + if err != nil { + return WorkspaceGroupUserClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WorkspaceGroupUserClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, groupID string, options *WorkspaceGroupUserClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/groups/{groupId}/users" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if groupID == "" { + return nil, errors.New("parameter groupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupId}", url.PathEscape(groupID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkspaceGroupUserClient) listHandleResponse(resp *http.Response) (WorkspaceGroupUserClientListResponse, error) { + result := WorkspaceGroupUserClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UserCollection); err != nil { + return WorkspaceGroupUserClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacelink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacelink_client.go new file mode 100644 index 00000000..f0f704fa --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacelink_client.go @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkspaceLinkClient contains the methods for the APIManagementWorkspaceLink group. +// Don't use this type directly, use NewWorkspaceLinkClient() instead. +type WorkspaceLinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceLinkClient creates a new instance of WorkspaceLinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceLinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceLinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceLinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets an API Management WorkspaceLink resource description. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceLinkClientGetOptions contains the optional parameters for the WorkspaceLinkClient.Get method. +func (client *WorkspaceLinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceLinkClientGetOptions) (WorkspaceLinkClientGetResponse, error) { + var err error + const operationName = "WorkspaceLinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + if err != nil { + return WorkspaceLinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceLinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceLinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceLinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, _ *WorkspaceLinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceLinkClient) getHandleResponse(resp *http.Response) (WorkspaceLinkClientGetResponse, error) { + result := WorkspaceLinkClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceLinksResource); err != nil { + return WorkspaceLinkClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacelinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacelinks_client.go new file mode 100644 index 00000000..58747ca7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacelinks_client.go @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkspaceLinksClient contains the methods for the APIManagementWorkspaceLinks group. +// Don't use this type directly, use NewWorkspaceLinksClient() instead. +type WorkspaceLinksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceLinksClient creates a new instance of WorkspaceLinksClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceLinksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceLinksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByServicePager - List all API Management workspaceLinks for a service. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - options - WorkspaceLinksClientListByServiceOptions contains the optional parameters for the WorkspaceLinksClient.NewListByServicePager +// method. +func (client *WorkspaceLinksClient) NewListByServicePager(resourceGroupName string, serviceName string, options *WorkspaceLinksClientListByServiceOptions) *runtime.Pager[WorkspaceLinksClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceLinksClientListByServiceResponse]{ + More: func(page WorkspaceLinksClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceLinksClientListByServiceResponse) (WorkspaceLinksClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceLinksClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return WorkspaceLinksClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceLinksClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, _ *WorkspaceLinksClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceLinksClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceLinksClientListByServiceResponse, error) { + result := WorkspaceLinksClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceLinksListResult); err != nil { + return WorkspaceLinksClientListByServiceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacelogger_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacelogger_client.go new file mode 100644 index 00000000..1a591ce5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacelogger_client.go @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceLoggerClient contains the methods for the WorkspaceLogger group. +// Don't use this type directly, use NewWorkspaceLoggerClient() instead. +type WorkspaceLoggerClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceLoggerClient creates a new instance of WorkspaceLoggerClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceLoggerClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceLoggerClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceLoggerClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or Updates a logger. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - loggerID - Logger identifier. Must be unique in the API Management service instance. +// - parameters - Create parameters. +// - options - WorkspaceLoggerClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceLoggerClient.CreateOrUpdate +// method. +func (client *WorkspaceLoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, loggerID string, parameters LoggerContract, options *WorkspaceLoggerClientCreateOrUpdateOptions) (WorkspaceLoggerClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceLoggerClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, loggerID, parameters, options) + if err != nil { + return WorkspaceLoggerClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceLoggerClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceLoggerClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceLoggerClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, loggerID string, parameters LoggerContract, options *WorkspaceLoggerClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if loggerID == "" { + return nil, errors.New("parameter loggerID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loggerId}", url.PathEscape(loggerID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceLoggerClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceLoggerClientCreateOrUpdateResponse, error) { + result := WorkspaceLoggerClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.LoggerContract); err != nil { + return WorkspaceLoggerClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified logger. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - loggerID - Logger identifier. Must be unique in the API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceLoggerClientDeleteOptions contains the optional parameters for the WorkspaceLoggerClient.Delete method. +func (client *WorkspaceLoggerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, loggerID string, ifMatch string, options *WorkspaceLoggerClientDeleteOptions) (WorkspaceLoggerClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceLoggerClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, loggerID, ifMatch, options) + if err != nil { + return WorkspaceLoggerClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceLoggerClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceLoggerClientDeleteResponse{}, err + } + return WorkspaceLoggerClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceLoggerClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, loggerID string, ifMatch string, _ *WorkspaceLoggerClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if loggerID == "" { + return nil, errors.New("parameter loggerID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loggerId}", url.PathEscape(loggerID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the logger specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - loggerID - Logger identifier. Must be unique in the API Management service instance. +// - options - WorkspaceLoggerClientGetOptions contains the optional parameters for the WorkspaceLoggerClient.Get method. +func (client *WorkspaceLoggerClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, loggerID string, options *WorkspaceLoggerClientGetOptions) (WorkspaceLoggerClientGetResponse, error) { + var err error + const operationName = "WorkspaceLoggerClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, loggerID, options) + if err != nil { + return WorkspaceLoggerClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceLoggerClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceLoggerClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceLoggerClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, loggerID string, _ *WorkspaceLoggerClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if loggerID == "" { + return nil, errors.New("parameter loggerID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loggerId}", url.PathEscape(loggerID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceLoggerClient) getHandleResponse(resp *http.Response) (WorkspaceLoggerClientGetResponse, error) { + result := WorkspaceLoggerClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.LoggerContract); err != nil { + return WorkspaceLoggerClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the logger specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - loggerID - Logger identifier. Must be unique in the API Management service instance. +// - options - WorkspaceLoggerClientGetEntityTagOptions contains the optional parameters for the WorkspaceLoggerClient.GetEntityTag +// method. +func (client *WorkspaceLoggerClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, loggerID string, options *WorkspaceLoggerClientGetEntityTagOptions) (WorkspaceLoggerClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceLoggerClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, loggerID, options) + if err != nil { + return WorkspaceLoggerClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceLoggerClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceLoggerClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceLoggerClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, loggerID string, _ *WorkspaceLoggerClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if loggerID == "" { + return nil, errors.New("parameter loggerID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loggerId}", url.PathEscape(loggerID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceLoggerClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceLoggerClientGetEntityTagResponse, error) { + result := WorkspaceLoggerClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByWorkspacePager - Lists a collection of loggers in the specified workspace. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceLoggerClientListByWorkspaceOptions contains the optional parameters for the WorkspaceLoggerClient.NewListByWorkspacePager +// method. +func (client *WorkspaceLoggerClient) NewListByWorkspacePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceLoggerClientListByWorkspaceOptions) *runtime.Pager[WorkspaceLoggerClientListByWorkspaceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceLoggerClientListByWorkspaceResponse]{ + More: func(page WorkspaceLoggerClientListByWorkspaceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceLoggerClientListByWorkspaceResponse) (WorkspaceLoggerClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceLoggerClient.NewListByWorkspacePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByWorkspaceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceLoggerClientListByWorkspaceResponse{}, err + } + return client.listByWorkspaceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByWorkspaceCreateRequest creates the ListByWorkspace request. +func (client *WorkspaceLoggerClient) listByWorkspaceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceLoggerClientListByWorkspaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByWorkspaceHandleResponse handles the ListByWorkspace response. +func (client *WorkspaceLoggerClient) listByWorkspaceHandleResponse(resp *http.Response) (WorkspaceLoggerClientListByWorkspaceResponse, error) { + result := WorkspaceLoggerClientListByWorkspaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoggerCollection); err != nil { + return WorkspaceLoggerClientListByWorkspaceResponse{}, err + } + return result, nil +} + +// Update - Updates an existing logger. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - loggerID - Logger identifier. Must be unique in the API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update parameters. +// - options - WorkspaceLoggerClientUpdateOptions contains the optional parameters for the WorkspaceLoggerClient.Update method. +func (client *WorkspaceLoggerClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, loggerID string, ifMatch string, parameters LoggerUpdateContract, options *WorkspaceLoggerClientUpdateOptions) (WorkspaceLoggerClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceLoggerClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, loggerID, ifMatch, parameters, options) + if err != nil { + return WorkspaceLoggerClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceLoggerClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceLoggerClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceLoggerClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, loggerID string, ifMatch string, parameters LoggerUpdateContract, _ *WorkspaceLoggerClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if loggerID == "" { + return nil, errors.New("parameter loggerID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loggerId}", url.PathEscape(loggerID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceLoggerClient) updateHandleResponse(resp *http.Response) (WorkspaceLoggerClientUpdateResponse, error) { + result := WorkspaceLoggerClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.LoggerContract); err != nil { + return WorkspaceLoggerClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenamedvalue_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenamedvalue_client.go new file mode 100644 index 00000000..72620669 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenamedvalue_client.go @@ -0,0 +1,696 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceNamedValueClient contains the methods for the WorkspaceNamedValue group. +// Don't use this type directly, use NewWorkspaceNamedValueClient() instead. +type WorkspaceNamedValueClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceNamedValueClient creates a new instance of WorkspaceNamedValueClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceNamedValueClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceNamedValueClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceNamedValueClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates named value. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - namedValueID - Identifier of the NamedValue. +// - parameters - Create parameters. +// - options - WorkspaceNamedValueClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspaceNamedValueClient.BeginCreateOrUpdate +// method. +func (client *WorkspaceNamedValueClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, parameters NamedValueCreateContract, options *WorkspaceNamedValueClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspaceNamedValueClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, workspaceID, namedValueID, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceNamedValueClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceNamedValueClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates named value. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WorkspaceNamedValueClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, parameters NamedValueCreateContract, options *WorkspaceNamedValueClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceNamedValueClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, namedValueID, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceNamedValueClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, parameters NamedValueCreateContract, options *WorkspaceNamedValueClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if namedValueID == "" { + return nil, errors.New("parameter namedValueID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namedValueId}", url.PathEscape(namedValueID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Delete - Deletes specific named value from the workspace in an API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - namedValueID - Identifier of the NamedValue. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceNamedValueClientDeleteOptions contains the optional parameters for the WorkspaceNamedValueClient.Delete +// method. +func (client *WorkspaceNamedValueClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, ifMatch string, options *WorkspaceNamedValueClientDeleteOptions) (WorkspaceNamedValueClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceNamedValueClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, namedValueID, ifMatch, options) + if err != nil { + return WorkspaceNamedValueClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNamedValueClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNamedValueClientDeleteResponse{}, err + } + return WorkspaceNamedValueClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceNamedValueClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, ifMatch string, _ *WorkspaceNamedValueClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if namedValueID == "" { + return nil, errors.New("parameter namedValueID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namedValueId}", url.PathEscape(namedValueID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the named value specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - namedValueID - Identifier of the NamedValue. +// - options - WorkspaceNamedValueClientGetOptions contains the optional parameters for the WorkspaceNamedValueClient.Get method. +func (client *WorkspaceNamedValueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, options *WorkspaceNamedValueClientGetOptions) (WorkspaceNamedValueClientGetResponse, error) { + var err error + const operationName = "WorkspaceNamedValueClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, namedValueID, options) + if err != nil { + return WorkspaceNamedValueClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNamedValueClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNamedValueClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceNamedValueClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, _ *WorkspaceNamedValueClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if namedValueID == "" { + return nil, errors.New("parameter namedValueID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namedValueId}", url.PathEscape(namedValueID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceNamedValueClient) getHandleResponse(resp *http.Response) (WorkspaceNamedValueClientGetResponse, error) { + result := WorkspaceNamedValueClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.NamedValueContract); err != nil { + return WorkspaceNamedValueClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the named value specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - namedValueID - Identifier of the NamedValue. +// - options - WorkspaceNamedValueClientGetEntityTagOptions contains the optional parameters for the WorkspaceNamedValueClient.GetEntityTag +// method. +func (client *WorkspaceNamedValueClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, options *WorkspaceNamedValueClientGetEntityTagOptions) (WorkspaceNamedValueClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceNamedValueClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, namedValueID, options) + if err != nil { + return WorkspaceNamedValueClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNamedValueClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNamedValueClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceNamedValueClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, _ *WorkspaceNamedValueClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if namedValueID == "" { + return nil, errors.New("parameter namedValueID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namedValueId}", url.PathEscape(namedValueID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceNamedValueClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceNamedValueClientGetEntityTagResponse, error) { + result := WorkspaceNamedValueClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists a collection of named values defined within a workspace in a service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceNamedValueClientListByServiceOptions contains the optional parameters for the WorkspaceNamedValueClient.NewListByServicePager +// method. +func (client *WorkspaceNamedValueClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceNamedValueClientListByServiceOptions) *runtime.Pager[WorkspaceNamedValueClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceNamedValueClientListByServiceResponse]{ + More: func(page WorkspaceNamedValueClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceNamedValueClientListByServiceResponse) (WorkspaceNamedValueClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceNamedValueClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceNamedValueClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceNamedValueClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceNamedValueClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.IsKeyVaultRefreshFailed != nil { + reqQP.Set("isKeyVaultRefreshFailed", string(*options.IsKeyVaultRefreshFailed)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceNamedValueClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceNamedValueClientListByServiceResponse, error) { + result := WorkspaceNamedValueClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NamedValueCollection); err != nil { + return WorkspaceNamedValueClientListByServiceResponse{}, err + } + return result, nil +} + +// ListValue - Gets the secret of the named value specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - namedValueID - Identifier of the NamedValue. +// - options - WorkspaceNamedValueClientListValueOptions contains the optional parameters for the WorkspaceNamedValueClient.ListValue +// method. +func (client *WorkspaceNamedValueClient) ListValue(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, options *WorkspaceNamedValueClientListValueOptions) (WorkspaceNamedValueClientListValueResponse, error) { + var err error + const operationName = "WorkspaceNamedValueClient.ListValue" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listValueCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, namedValueID, options) + if err != nil { + return WorkspaceNamedValueClientListValueResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNamedValueClientListValueResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNamedValueClientListValueResponse{}, err + } + resp, err := client.listValueHandleResponse(httpResp) + return resp, err +} + +// listValueCreateRequest creates the ListValue request. +func (client *WorkspaceNamedValueClient) listValueCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, _ *WorkspaceNamedValueClientListValueOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/listValue" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if namedValueID == "" { + return nil, errors.New("parameter namedValueID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namedValueId}", url.PathEscape(namedValueID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listValueHandleResponse handles the ListValue response. +func (client *WorkspaceNamedValueClient) listValueHandleResponse(resp *http.Response) (WorkspaceNamedValueClientListValueResponse, error) { + result := WorkspaceNamedValueClientListValueResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.NamedValueSecretContract); err != nil { + return WorkspaceNamedValueClientListValueResponse{}, err + } + return result, nil +} + +// BeginRefreshSecret - Refresh the secret of the named value specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - namedValueID - Identifier of the NamedValue. +// - options - WorkspaceNamedValueClientBeginRefreshSecretOptions contains the optional parameters for the WorkspaceNamedValueClient.BeginRefreshSecret +// method. +func (client *WorkspaceNamedValueClient) BeginRefreshSecret(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, options *WorkspaceNamedValueClientBeginRefreshSecretOptions) (*runtime.Poller[WorkspaceNamedValueClientRefreshSecretResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.refreshSecret(ctx, resourceGroupName, serviceName, workspaceID, namedValueID, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceNamedValueClientRefreshSecretResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceNamedValueClientRefreshSecretResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RefreshSecret - Refresh the secret of the named value specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WorkspaceNamedValueClient) refreshSecret(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, options *WorkspaceNamedValueClientBeginRefreshSecretOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceNamedValueClient.BeginRefreshSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.refreshSecretCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, namedValueID, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// refreshSecretCreateRequest creates the RefreshSecret request. +func (client *WorkspaceNamedValueClient) refreshSecretCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, _ *WorkspaceNamedValueClientBeginRefreshSecretOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}/refreshSecret" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if namedValueID == "" { + return nil, errors.New("parameter namedValueID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namedValueId}", url.PathEscape(namedValueID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdate - Updates the specific named value. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - namedValueID - Identifier of the NamedValue. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update parameters. +// - options - WorkspaceNamedValueClientBeginUpdateOptions contains the optional parameters for the WorkspaceNamedValueClient.BeginUpdate +// method. +func (client *WorkspaceNamedValueClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, ifMatch string, parameters NamedValueUpdateParameters, options *WorkspaceNamedValueClientBeginUpdateOptions) (*runtime.Poller[WorkspaceNamedValueClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serviceName, workspaceID, namedValueID, ifMatch, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspaceNamedValueClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspaceNamedValueClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates the specific named value. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WorkspaceNamedValueClient) update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, ifMatch string, parameters NamedValueUpdateParameters, options *WorkspaceNamedValueClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspaceNamedValueClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, namedValueID, ifMatch, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceNamedValueClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, namedValueID string, ifMatch string, parameters NamedValueUpdateParameters, _ *WorkspaceNamedValueClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if namedValueID == "" { + return nil, errors.New("parameter namedValueID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namedValueId}", url.PathEscape(namedValueID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenotification_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenotification_client.go new file mode 100644 index 00000000..81be3979 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenotification_client.go @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceNotificationClient contains the methods for the WorkspaceNotification group. +// Don't use this type directly, use NewWorkspaceNotificationClient() instead. +type WorkspaceNotificationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceNotificationClient creates a new instance of WorkspaceNotificationClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceNotificationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceNotificationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceNotificationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or Update API Management publisher notification for the workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - notificationName - Notification Name Identifier. +// - options - WorkspaceNotificationClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceNotificationClient.CreateOrUpdate +// method. +func (client *WorkspaceNotificationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, options *WorkspaceNotificationClientCreateOrUpdateOptions) (WorkspaceNotificationClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceNotificationClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, notificationName, options) + if err != nil { + return WorkspaceNotificationClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNotificationClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNotificationClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceNotificationClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, options *WorkspaceNotificationClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if notificationName == "" { + return nil, errors.New("parameter notificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{notificationName}", url.PathEscape(string(notificationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceNotificationClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceNotificationClientCreateOrUpdateResponse, error) { + result := WorkspaceNotificationClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NotificationContract); err != nil { + return WorkspaceNotificationClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Get - Gets the details of the Notification specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - notificationName - Notification Name Identifier. +// - options - WorkspaceNotificationClientGetOptions contains the optional parameters for the WorkspaceNotificationClient.Get +// method. +func (client *WorkspaceNotificationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, options *WorkspaceNotificationClientGetOptions) (WorkspaceNotificationClientGetResponse, error) { + var err error + const operationName = "WorkspaceNotificationClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, notificationName, options) + if err != nil { + return WorkspaceNotificationClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNotificationClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNotificationClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceNotificationClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, _ *WorkspaceNotificationClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if notificationName == "" { + return nil, errors.New("parameter notificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{notificationName}", url.PathEscape(string(notificationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceNotificationClient) getHandleResponse(resp *http.Response) (WorkspaceNotificationClientGetResponse, error) { + result := WorkspaceNotificationClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NotificationContract); err != nil { + return WorkspaceNotificationClientGetResponse{}, err + } + return result, nil +} + +// NewListByServicePager - Lists a collection of properties defined within a service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceNotificationClientListByServiceOptions contains the optional parameters for the WorkspaceNotificationClient.NewListByServicePager +// method. +func (client *WorkspaceNotificationClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceNotificationClientListByServiceOptions) *runtime.Pager[WorkspaceNotificationClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceNotificationClientListByServiceResponse]{ + More: func(page WorkspaceNotificationClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceNotificationClientListByServiceResponse) (WorkspaceNotificationClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceNotificationClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceNotificationClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceNotificationClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceNotificationClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceNotificationClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceNotificationClientListByServiceResponse, error) { + result := WorkspaceNotificationClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NotificationCollection); err != nil { + return WorkspaceNotificationClientListByServiceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenotificationrecipientemail_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenotificationrecipientemail_client.go new file mode 100644 index 00000000..5c26873c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenotificationrecipientemail_client.go @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkspaceNotificationRecipientEmailClient contains the methods for the WorkspaceNotificationRecipientEmail group. +// Don't use this type directly, use NewWorkspaceNotificationRecipientEmailClient() instead. +type WorkspaceNotificationRecipientEmailClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceNotificationRecipientEmailClient creates a new instance of WorkspaceNotificationRecipientEmailClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceNotificationRecipientEmailClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceNotificationRecipientEmailClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceNotificationRecipientEmailClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckEntityExists - Determine if Notification Recipient Email subscribed to the notification. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - notificationName - Notification Name Identifier. +// - email - Email identifier. +// - options - WorkspaceNotificationRecipientEmailClientCheckEntityExistsOptions contains the optional parameters for the WorkspaceNotificationRecipientEmailClient.CheckEntityExists +// method. +func (client *WorkspaceNotificationRecipientEmailClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, email string, options *WorkspaceNotificationRecipientEmailClientCheckEntityExistsOptions) (WorkspaceNotificationRecipientEmailClientCheckEntityExistsResponse, error) { + var err error + const operationName = "WorkspaceNotificationRecipientEmailClient.CheckEntityExists" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkEntityExistsCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, notificationName, email, options) + if err != nil { + return WorkspaceNotificationRecipientEmailClientCheckEntityExistsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNotificationRecipientEmailClientCheckEntityExistsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNotificationRecipientEmailClientCheckEntityExistsResponse{}, err + } + return WorkspaceNotificationRecipientEmailClientCheckEntityExistsResponse{Success: httpResp.StatusCode >= 200 && httpResp.StatusCode < 300}, nil +} + +// checkEntityExistsCreateRequest creates the CheckEntityExists request. +func (client *WorkspaceNotificationRecipientEmailClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, email string, _ *WorkspaceNotificationRecipientEmailClientCheckEntityExistsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if notificationName == "" { + return nil, errors.New("parameter notificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{notificationName}", url.PathEscape(string(notificationName))) + if email == "" { + return nil, errors.New("parameter email cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{email}", url.PathEscape(email)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// CreateOrUpdate - Adds the Email address to the list of Recipients for the Notification. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - notificationName - Notification Name Identifier. +// - email - Email identifier. +// - options - WorkspaceNotificationRecipientEmailClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceNotificationRecipientEmailClient.CreateOrUpdate +// method. +func (client *WorkspaceNotificationRecipientEmailClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, email string, options *WorkspaceNotificationRecipientEmailClientCreateOrUpdateOptions) (WorkspaceNotificationRecipientEmailClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceNotificationRecipientEmailClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, notificationName, email, options) + if err != nil { + return WorkspaceNotificationRecipientEmailClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNotificationRecipientEmailClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNotificationRecipientEmailClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceNotificationRecipientEmailClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, email string, _ *WorkspaceNotificationRecipientEmailClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if notificationName == "" { + return nil, errors.New("parameter notificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{notificationName}", url.PathEscape(string(notificationName))) + if email == "" { + return nil, errors.New("parameter email cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{email}", url.PathEscape(email)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceNotificationRecipientEmailClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceNotificationRecipientEmailClientCreateOrUpdateResponse, error) { + result := WorkspaceNotificationRecipientEmailClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecipientEmailContract); err != nil { + return WorkspaceNotificationRecipientEmailClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Removes the email from the list of Notification. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - notificationName - Notification Name Identifier. +// - email - Email identifier. +// - options - WorkspaceNotificationRecipientEmailClientDeleteOptions contains the optional parameters for the WorkspaceNotificationRecipientEmailClient.Delete +// method. +func (client *WorkspaceNotificationRecipientEmailClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, email string, options *WorkspaceNotificationRecipientEmailClientDeleteOptions) (WorkspaceNotificationRecipientEmailClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceNotificationRecipientEmailClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, notificationName, email, options) + if err != nil { + return WorkspaceNotificationRecipientEmailClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNotificationRecipientEmailClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNotificationRecipientEmailClientDeleteResponse{}, err + } + return WorkspaceNotificationRecipientEmailClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceNotificationRecipientEmailClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, email string, _ *WorkspaceNotificationRecipientEmailClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails/{email}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if notificationName == "" { + return nil, errors.New("parameter notificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{notificationName}", url.PathEscape(string(notificationName))) + if email == "" { + return nil, errors.New("parameter email cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{email}", url.PathEscape(email)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// ListByNotification - Gets the list of the Notification Recipient Emails subscribed to a notification. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - notificationName - Notification Name Identifier. +// - options - WorkspaceNotificationRecipientEmailClientListByNotificationOptions contains the optional parameters for the WorkspaceNotificationRecipientEmailClient.ListByNotification +// method. +func (client *WorkspaceNotificationRecipientEmailClient) ListByNotification(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, options *WorkspaceNotificationRecipientEmailClientListByNotificationOptions) (WorkspaceNotificationRecipientEmailClientListByNotificationResponse, error) { + var err error + const operationName = "WorkspaceNotificationRecipientEmailClient.ListByNotification" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listByNotificationCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, notificationName, options) + if err != nil { + return WorkspaceNotificationRecipientEmailClientListByNotificationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNotificationRecipientEmailClientListByNotificationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNotificationRecipientEmailClientListByNotificationResponse{}, err + } + resp, err := client.listByNotificationHandleResponse(httpResp) + return resp, err +} + +// listByNotificationCreateRequest creates the ListByNotification request. +func (client *WorkspaceNotificationRecipientEmailClient) listByNotificationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, _ *WorkspaceNotificationRecipientEmailClientListByNotificationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientEmails" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if notificationName == "" { + return nil, errors.New("parameter notificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{notificationName}", url.PathEscape(string(notificationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByNotificationHandleResponse handles the ListByNotification response. +func (client *WorkspaceNotificationRecipientEmailClient) listByNotificationHandleResponse(resp *http.Response) (WorkspaceNotificationRecipientEmailClientListByNotificationResponse, error) { + result := WorkspaceNotificationRecipientEmailClientListByNotificationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecipientEmailCollection); err != nil { + return WorkspaceNotificationRecipientEmailClientListByNotificationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenotificationrecipientuser_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenotificationrecipientuser_client.go new file mode 100644 index 00000000..b463d2ec --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacenotificationrecipientuser_client.go @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkspaceNotificationRecipientUserClient contains the methods for the WorkspaceNotificationRecipientUser group. +// Don't use this type directly, use NewWorkspaceNotificationRecipientUserClient() instead. +type WorkspaceNotificationRecipientUserClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceNotificationRecipientUserClient creates a new instance of WorkspaceNotificationRecipientUserClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceNotificationRecipientUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceNotificationRecipientUserClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceNotificationRecipientUserClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckEntityExists - Determine if the Notification Recipient User is subscribed to the notification. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - notificationName - Notification Name Identifier. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceNotificationRecipientUserClientCheckEntityExistsOptions contains the optional parameters for the WorkspaceNotificationRecipientUserClient.CheckEntityExists +// method. +func (client *WorkspaceNotificationRecipientUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, userID string, options *WorkspaceNotificationRecipientUserClientCheckEntityExistsOptions) (WorkspaceNotificationRecipientUserClientCheckEntityExistsResponse, error) { + var err error + const operationName = "WorkspaceNotificationRecipientUserClient.CheckEntityExists" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkEntityExistsCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, notificationName, userID, options) + if err != nil { + return WorkspaceNotificationRecipientUserClientCheckEntityExistsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNotificationRecipientUserClientCheckEntityExistsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent, http.StatusNotFound) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNotificationRecipientUserClientCheckEntityExistsResponse{}, err + } + return WorkspaceNotificationRecipientUserClientCheckEntityExistsResponse{Success: httpResp.StatusCode >= 200 && httpResp.StatusCode < 300}, nil +} + +// checkEntityExistsCreateRequest creates the CheckEntityExists request. +func (client *WorkspaceNotificationRecipientUserClient) checkEntityExistsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, userID string, _ *WorkspaceNotificationRecipientUserClientCheckEntityExistsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if notificationName == "" { + return nil, errors.New("parameter notificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{notificationName}", url.PathEscape(string(notificationName))) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// CreateOrUpdate - Adds the API Management User to the list of Recipients for the Notification. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - notificationName - Notification Name Identifier. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceNotificationRecipientUserClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceNotificationRecipientUserClient.CreateOrUpdate +// method. +func (client *WorkspaceNotificationRecipientUserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, userID string, options *WorkspaceNotificationRecipientUserClientCreateOrUpdateOptions) (WorkspaceNotificationRecipientUserClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceNotificationRecipientUserClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, notificationName, userID, options) + if err != nil { + return WorkspaceNotificationRecipientUserClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNotificationRecipientUserClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNotificationRecipientUserClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceNotificationRecipientUserClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, userID string, _ *WorkspaceNotificationRecipientUserClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if notificationName == "" { + return nil, errors.New("parameter notificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{notificationName}", url.PathEscape(string(notificationName))) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceNotificationRecipientUserClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceNotificationRecipientUserClientCreateOrUpdateResponse, error) { + result := WorkspaceNotificationRecipientUserClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecipientUserContract); err != nil { + return WorkspaceNotificationRecipientUserClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Removes the API Management user from the list of Notification. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - notificationName - Notification Name Identifier. +// - userID - User identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceNotificationRecipientUserClientDeleteOptions contains the optional parameters for the WorkspaceNotificationRecipientUserClient.Delete +// method. +func (client *WorkspaceNotificationRecipientUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, userID string, options *WorkspaceNotificationRecipientUserClientDeleteOptions) (WorkspaceNotificationRecipientUserClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceNotificationRecipientUserClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, notificationName, userID, options) + if err != nil { + return WorkspaceNotificationRecipientUserClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNotificationRecipientUserClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNotificationRecipientUserClientDeleteResponse{}, err + } + return WorkspaceNotificationRecipientUserClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceNotificationRecipientUserClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, userID string, _ *WorkspaceNotificationRecipientUserClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers/{userId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if notificationName == "" { + return nil, errors.New("parameter notificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{notificationName}", url.PathEscape(string(notificationName))) + if userID == "" { + return nil, errors.New("parameter userID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userId}", url.PathEscape(userID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// ListByNotification - Gets the list of the Notification Recipient User subscribed to the notification. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - notificationName - Notification Name Identifier. +// - options - WorkspaceNotificationRecipientUserClientListByNotificationOptions contains the optional parameters for the WorkspaceNotificationRecipientUserClient.ListByNotification +// method. +func (client *WorkspaceNotificationRecipientUserClient) ListByNotification(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, options *WorkspaceNotificationRecipientUserClientListByNotificationOptions) (WorkspaceNotificationRecipientUserClientListByNotificationResponse, error) { + var err error + const operationName = "WorkspaceNotificationRecipientUserClient.ListByNotification" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listByNotificationCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, notificationName, options) + if err != nil { + return WorkspaceNotificationRecipientUserClientListByNotificationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceNotificationRecipientUserClientListByNotificationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceNotificationRecipientUserClientListByNotificationResponse{}, err + } + resp, err := client.listByNotificationHandleResponse(httpResp) + return resp, err +} + +// listByNotificationCreateRequest creates the ListByNotification request. +func (client *WorkspaceNotificationRecipientUserClient) listByNotificationCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, notificationName NotificationName, _ *WorkspaceNotificationRecipientUserClientListByNotificationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/notifications/{notificationName}/recipientUsers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if notificationName == "" { + return nil, errors.New("parameter notificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{notificationName}", url.PathEscape(string(notificationName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByNotificationHandleResponse handles the ListByNotification response. +func (client *WorkspaceNotificationRecipientUserClient) listByNotificationHandleResponse(resp *http.Response) (WorkspaceNotificationRecipientUserClientListByNotificationResponse, error) { + result := WorkspaceNotificationRecipientUserClientListByNotificationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecipientUserCollection); err != nil { + return WorkspaceNotificationRecipientUserClientListByNotificationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacepolicy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacepolicy_client.go new file mode 100644 index 00000000..34d56f7d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacepolicy_client.go @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkspacePolicyClient contains the methods for the WorkspacePolicy group. +// Don't use this type directly, use NewWorkspacePolicyClient() instead. +type WorkspacePolicyClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspacePolicyClient creates a new instance of WorkspacePolicyClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspacePolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacePolicyClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspacePolicyClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates policy configuration for the workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - parameters - The policy contents to apply. +// - options - WorkspacePolicyClientCreateOrUpdateOptions contains the optional parameters for the WorkspacePolicyClient.CreateOrUpdate +// method. +func (client *WorkspacePolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, policyID PolicyIDName, parameters PolicyContract, options *WorkspacePolicyClientCreateOrUpdateOptions) (WorkspacePolicyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspacePolicyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, policyID, parameters, options) + if err != nil { + return WorkspacePolicyClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacePolicyClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspacePolicyClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspacePolicyClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, policyID PolicyIDName, parameters PolicyContract, options *WorkspacePolicyClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspacePolicyClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspacePolicyClientCreateOrUpdateResponse, error) { + result := WorkspacePolicyClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return WorkspacePolicyClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the policy configuration at the workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspacePolicyClientDeleteOptions contains the optional parameters for the WorkspacePolicyClient.Delete method. +func (client *WorkspacePolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, policyID PolicyIDName, ifMatch string, options *WorkspacePolicyClientDeleteOptions) (WorkspacePolicyClientDeleteResponse, error) { + var err error + const operationName = "WorkspacePolicyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, policyID, ifMatch, options) + if err != nil { + return WorkspacePolicyClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacePolicyClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspacePolicyClientDeleteResponse{}, err + } + return WorkspacePolicyClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspacePolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, policyID PolicyIDName, ifMatch string, _ *WorkspacePolicyClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Get the policy configuration at the API level. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - options - WorkspacePolicyClientGetOptions contains the optional parameters for the WorkspacePolicyClient.Get method. +func (client *WorkspacePolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, policyID PolicyIDName, options *WorkspacePolicyClientGetOptions) (WorkspacePolicyClientGetResponse, error) { + var err error + const operationName = "WorkspacePolicyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, policyID, options) + if err != nil { + return WorkspacePolicyClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacePolicyClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacePolicyClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspacePolicyClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, policyID PolicyIDName, options *WorkspacePolicyClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Format != nil { + reqQP.Set("format", string(*options.Format)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspacePolicyClient) getHandleResponse(resp *http.Response) (WorkspacePolicyClientGetResponse, error) { + result := WorkspacePolicyClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return WorkspacePolicyClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the workspace policy specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - options - WorkspacePolicyClientGetEntityTagOptions contains the optional parameters for the WorkspacePolicyClient.GetEntityTag +// method. +func (client *WorkspacePolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, policyID PolicyIDName, options *WorkspacePolicyClientGetEntityTagOptions) (WorkspacePolicyClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspacePolicyClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, policyID, options) + if err != nil { + return WorkspacePolicyClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacePolicyClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacePolicyClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspacePolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, policyID PolicyIDName, _ *WorkspacePolicyClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspacePolicyClient) getEntityTagHandleResponse(resp *http.Response) (WorkspacePolicyClientGetEntityTagResponse, error) { + result := WorkspacePolicyClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByAPIPager - Get the policy configuration at the workspace level. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspacePolicyClientListByAPIOptions contains the optional parameters for the WorkspacePolicyClient.NewListByAPIPager +// method. +func (client *WorkspacePolicyClient) NewListByAPIPager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspacePolicyClientListByAPIOptions) *runtime.Pager[WorkspacePolicyClientListByAPIResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspacePolicyClientListByAPIResponse]{ + More: func(page WorkspacePolicyClientListByAPIResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspacePolicyClientListByAPIResponse) (WorkspacePolicyClientListByAPIResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspacePolicyClient.NewListByAPIPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAPICreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspacePolicyClientListByAPIResponse{}, err + } + return client.listByAPIHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAPICreateRequest creates the ListByAPI request. +func (client *WorkspacePolicyClient) listByAPICreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, _ *WorkspacePolicyClientListByAPIOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAPIHandleResponse handles the ListByAPI response. +func (client *WorkspacePolicyClient) listByAPIHandleResponse(resp *http.Response) (WorkspacePolicyClientListByAPIResponse, error) { + result := WorkspacePolicyClientListByAPIResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyCollection); err != nil { + return WorkspacePolicyClientListByAPIResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacepolicyfragment_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacepolicyfragment_client.go new file mode 100644 index 00000000..071cef9b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacepolicyfragment_client.go @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspacePolicyFragmentClient contains the methods for the WorkspacePolicyFragment group. +// Don't use this type directly, use NewWorkspacePolicyFragmentClient() instead. +type WorkspacePolicyFragmentClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspacePolicyFragmentClient creates a new instance of WorkspacePolicyFragmentClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspacePolicyFragmentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacePolicyFragmentClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspacePolicyFragmentClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a policy fragment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - id - A resource identifier. +// - parameters - The policy fragment contents to apply. +// - options - WorkspacePolicyFragmentClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacePolicyFragmentClient.BeginCreateOrUpdate +// method. +func (client *WorkspacePolicyFragmentClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, parameters PolicyFragmentContract, options *WorkspacePolicyFragmentClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspacePolicyFragmentClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, workspaceID, id, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkspacePolicyFragmentClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkspacePolicyFragmentClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a policy fragment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WorkspacePolicyFragmentClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, parameters PolicyFragmentContract, options *WorkspacePolicyFragmentClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WorkspacePolicyFragmentClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, id, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspacePolicyFragmentClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, parameters PolicyFragmentContract, options *WorkspacePolicyFragmentClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Delete - Deletes a policy fragment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - id - A resource identifier. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspacePolicyFragmentClientDeleteOptions contains the optional parameters for the WorkspacePolicyFragmentClient.Delete +// method. +func (client *WorkspacePolicyFragmentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, ifMatch string, options *WorkspacePolicyFragmentClientDeleteOptions) (WorkspacePolicyFragmentClientDeleteResponse, error) { + var err error + const operationName = "WorkspacePolicyFragmentClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, id, ifMatch, options) + if err != nil { + return WorkspacePolicyFragmentClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacePolicyFragmentClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspacePolicyFragmentClientDeleteResponse{}, err + } + return WorkspacePolicyFragmentClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspacePolicyFragmentClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, ifMatch string, _ *WorkspacePolicyFragmentClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets a policy fragment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - id - A resource identifier. +// - options - WorkspacePolicyFragmentClientGetOptions contains the optional parameters for the WorkspacePolicyFragmentClient.Get +// method. +func (client *WorkspacePolicyFragmentClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, options *WorkspacePolicyFragmentClientGetOptions) (WorkspacePolicyFragmentClientGetResponse, error) { + var err error + const operationName = "WorkspacePolicyFragmentClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, id, options) + if err != nil { + return WorkspacePolicyFragmentClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacePolicyFragmentClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacePolicyFragmentClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspacePolicyFragmentClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, options *WorkspacePolicyFragmentClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Format != nil { + reqQP.Set("format", string(*options.Format)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspacePolicyFragmentClient) getHandleResponse(resp *http.Response) (WorkspacePolicyFragmentClientGetResponse, error) { + result := WorkspacePolicyFragmentClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyFragmentContract); err != nil { + return WorkspacePolicyFragmentClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of a policy fragment. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - id - A resource identifier. +// - options - WorkspacePolicyFragmentClientGetEntityTagOptions contains the optional parameters for the WorkspacePolicyFragmentClient.GetEntityTag +// method. +func (client *WorkspacePolicyFragmentClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, options *WorkspacePolicyFragmentClientGetEntityTagOptions) (WorkspacePolicyFragmentClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspacePolicyFragmentClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, id, options) + if err != nil { + return WorkspacePolicyFragmentClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacePolicyFragmentClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacePolicyFragmentClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspacePolicyFragmentClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, _ *WorkspacePolicyFragmentClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspacePolicyFragmentClient) getEntityTagHandleResponse(resp *http.Response) (WorkspacePolicyFragmentClientGetEntityTagResponse, error) { + result := WorkspacePolicyFragmentClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Gets all policy fragments defined within a workspace. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspacePolicyFragmentClientListByServiceOptions contains the optional parameters for the WorkspacePolicyFragmentClient.NewListByServicePager +// method. +func (client *WorkspacePolicyFragmentClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspacePolicyFragmentClientListByServiceOptions) *runtime.Pager[WorkspacePolicyFragmentClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspacePolicyFragmentClientListByServiceResponse]{ + More: func(page WorkspacePolicyFragmentClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspacePolicyFragmentClientListByServiceResponse) (WorkspacePolicyFragmentClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspacePolicyFragmentClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspacePolicyFragmentClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspacePolicyFragmentClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspacePolicyFragmentClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Orderby != nil { + reqQP.Set("$orderby", *options.Orderby) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspacePolicyFragmentClient) listByServiceHandleResponse(resp *http.Response) (WorkspacePolicyFragmentClientListByServiceResponse, error) { + result := WorkspacePolicyFragmentClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyFragmentCollection); err != nil { + return WorkspacePolicyFragmentClientListByServiceResponse{}, err + } + return result, nil +} + +// ListReferences - Lists policy resources that reference the policy fragment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - id - A resource identifier. +// - options - WorkspacePolicyFragmentClientListReferencesOptions contains the optional parameters for the WorkspacePolicyFragmentClient.ListReferences +// method. +func (client *WorkspacePolicyFragmentClient) ListReferences(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, options *WorkspacePolicyFragmentClientListReferencesOptions) (WorkspacePolicyFragmentClientListReferencesResponse, error) { + var err error + const operationName = "WorkspacePolicyFragmentClient.ListReferences" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listReferencesCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, id, options) + if err != nil { + return WorkspacePolicyFragmentClientListReferencesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacePolicyFragmentClientListReferencesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacePolicyFragmentClientListReferencesResponse{}, err + } + resp, err := client.listReferencesHandleResponse(httpResp) + return resp, err +} + +// listReferencesCreateRequest creates the ListReferences request. +func (client *WorkspacePolicyFragmentClient) listReferencesCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, id string, options *WorkspacePolicyFragmentClientListReferencesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/policyFragments/{id}/listReferences" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listReferencesHandleResponse handles the ListReferences response. +func (client *WorkspacePolicyFragmentClient) listReferencesHandleResponse(resp *http.Response) (WorkspacePolicyFragmentClientListReferencesResponse, error) { + result := WorkspacePolicyFragmentClientListReferencesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceCollection); err != nil { + return WorkspacePolicyFragmentClientListReferencesResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproduct_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproduct_client.go new file mode 100644 index 00000000..4f49a163 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproduct_client.go @@ -0,0 +1,517 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceProductClient contains the methods for the WorkspaceProduct group. +// Don't use this type directly, use NewWorkspaceProductClient() instead. +type WorkspaceProductClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceProductClient creates a new instance of WorkspaceProductClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceProductClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceProductClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceProductClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or Updates a product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - WorkspaceProductClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceProductClient.CreateOrUpdate +// method. +func (client *WorkspaceProductClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, parameters ProductContract, options *WorkspaceProductClientCreateOrUpdateOptions) (WorkspaceProductClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceProductClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, parameters, options) + if err != nil { + return WorkspaceProductClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceProductClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, parameters ProductContract, options *WorkspaceProductClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceProductClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceProductClientCreateOrUpdateResponse, error) { + result := WorkspaceProductClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.ProductContract); err != nil { + return WorkspaceProductClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceProductClientDeleteOptions contains the optional parameters for the WorkspaceProductClient.Delete method. +func (client *WorkspaceProductClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, ifMatch string, options *WorkspaceProductClientDeleteOptions) (WorkspaceProductClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceProductClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, ifMatch, options) + if err != nil { + return WorkspaceProductClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductClientDeleteResponse{}, err + } + return WorkspaceProductClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceProductClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, ifMatch string, options *WorkspaceProductClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.DeleteSubscriptions != nil { + reqQP.Set("deleteSubscriptions", strconv.FormatBool(*options.DeleteSubscriptions)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the product specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceProductClientGetOptions contains the optional parameters for the WorkspaceProductClient.Get method. +func (client *WorkspaceProductClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, options *WorkspaceProductClientGetOptions) (WorkspaceProductClientGetResponse, error) { + var err error + const operationName = "WorkspaceProductClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, options) + if err != nil { + return WorkspaceProductClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceProductClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, _ *WorkspaceProductClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceProductClient) getHandleResponse(resp *http.Response) (WorkspaceProductClientGetResponse, error) { + result := WorkspaceProductClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.ProductContract); err != nil { + return WorkspaceProductClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the product specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceProductClientGetEntityTagOptions contains the optional parameters for the WorkspaceProductClient.GetEntityTag +// method. +func (client *WorkspaceProductClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, options *WorkspaceProductClientGetEntityTagOptions) (WorkspaceProductClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceProductClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, options) + if err != nil { + return WorkspaceProductClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceProductClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, _ *WorkspaceProductClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceProductClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceProductClientGetEntityTagResponse, error) { + result := WorkspaceProductClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists a collection of products in the specified workspace in a service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceProductClientListByServiceOptions contains the optional parameters for the WorkspaceProductClient.NewListByServicePager +// method. +func (client *WorkspaceProductClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceProductClientListByServiceOptions) *runtime.Pager[WorkspaceProductClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceProductClientListByServiceResponse]{ + More: func(page WorkspaceProductClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceProductClientListByServiceResponse) (WorkspaceProductClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceProductClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceProductClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceProductClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceProductClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.ExpandGroups != nil { + reqQP.Set("expandGroups", strconv.FormatBool(*options.ExpandGroups)) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceProductClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceProductClientListByServiceResponse, error) { + result := WorkspaceProductClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProductCollection); err != nil { + return WorkspaceProductClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Update existing product details. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update parameters. +// - options - WorkspaceProductClientUpdateOptions contains the optional parameters for the WorkspaceProductClient.Update method. +func (client *WorkspaceProductClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, ifMatch string, parameters ProductUpdateParameters, options *WorkspaceProductClientUpdateOptions) (WorkspaceProductClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceProductClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, ifMatch, parameters, options) + if err != nil { + return WorkspaceProductClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceProductClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, ifMatch string, parameters ProductUpdateParameters, _ *WorkspaceProductClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceProductClient) updateHandleResponse(resp *http.Response) (WorkspaceProductClientUpdateResponse, error) { + result := WorkspaceProductClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.ProductContract); err != nil { + return WorkspaceProductClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproductapilink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproductapilink_client.go new file mode 100644 index 00000000..2908b4f8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproductapilink_client.go @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceProductAPILinkClient contains the methods for the WorkspaceProductAPILink group. +// Don't use this type directly, use NewWorkspaceProductAPILinkClient() instead. +type WorkspaceProductAPILinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceProductAPILinkClient creates a new instance of WorkspaceProductAPILinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceProductAPILinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceProductAPILinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceProductAPILinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Adds an API to the specified product via link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Product-API link identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - WorkspaceProductAPILinkClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceProductAPILinkClient.CreateOrUpdate +// method. +func (client *WorkspaceProductAPILinkClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, apiLinkID string, parameters ProductAPILinkContract, options *WorkspaceProductAPILinkClientCreateOrUpdateOptions) (WorkspaceProductAPILinkClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceProductAPILinkClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, apiLinkID, parameters, options) + if err != nil { + return WorkspaceProductAPILinkClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductAPILinkClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductAPILinkClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceProductAPILinkClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, apiLinkID string, parameters ProductAPILinkContract, _ *WorkspaceProductAPILinkClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceProductAPILinkClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceProductAPILinkClientCreateOrUpdateResponse, error) { + result := WorkspaceProductAPILinkClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProductAPILinkContract); err != nil { + return WorkspaceProductAPILinkClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified API from the specified product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Product-API link identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceProductAPILinkClientDeleteOptions contains the optional parameters for the WorkspaceProductAPILinkClient.Delete +// method. +func (client *WorkspaceProductAPILinkClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, apiLinkID string, options *WorkspaceProductAPILinkClientDeleteOptions) (WorkspaceProductAPILinkClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceProductAPILinkClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, apiLinkID, options) + if err != nil { + return WorkspaceProductAPILinkClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductAPILinkClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductAPILinkClientDeleteResponse{}, err + } + return WorkspaceProductAPILinkClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceProductAPILinkClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, apiLinkID string, _ *WorkspaceProductAPILinkClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the API link for the product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Product-API link identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceProductAPILinkClientGetOptions contains the optional parameters for the WorkspaceProductAPILinkClient.Get +// method. +func (client *WorkspaceProductAPILinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, apiLinkID string, options *WorkspaceProductAPILinkClientGetOptions) (WorkspaceProductAPILinkClientGetResponse, error) { + var err error + const operationName = "WorkspaceProductAPILinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, apiLinkID, options) + if err != nil { + return WorkspaceProductAPILinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductAPILinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductAPILinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceProductAPILinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, apiLinkID string, _ *WorkspaceProductAPILinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceProductAPILinkClient) getHandleResponse(resp *http.Response) (WorkspaceProductAPILinkClientGetResponse, error) { + result := WorkspaceProductAPILinkClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.ProductAPILinkContract); err != nil { + return WorkspaceProductAPILinkClientGetResponse{}, err + } + return result, nil +} + +// NewListByProductPager - Lists a collection of the API links associated with a product. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceProductAPILinkClientListByProductOptions contains the optional parameters for the WorkspaceProductAPILinkClient.NewListByProductPager +// method. +func (client *WorkspaceProductAPILinkClient) NewListByProductPager(resourceGroupName string, serviceName string, workspaceID string, productID string, options *WorkspaceProductAPILinkClientListByProductOptions) *runtime.Pager[WorkspaceProductAPILinkClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceProductAPILinkClientListByProductResponse]{ + More: func(page WorkspaceProductAPILinkClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceProductAPILinkClientListByProductResponse) (WorkspaceProductAPILinkClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceProductAPILinkClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, options) + }, nil) + if err != nil { + return WorkspaceProductAPILinkClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *WorkspaceProductAPILinkClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, options *WorkspaceProductAPILinkClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/apiLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *WorkspaceProductAPILinkClient) listByProductHandleResponse(resp *http.Response) (WorkspaceProductAPILinkClientListByProductResponse, error) { + result := WorkspaceProductAPILinkClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProductAPILinkCollection); err != nil { + return WorkspaceProductAPILinkClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproductgrouplink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproductgrouplink_client.go new file mode 100644 index 00000000..0a472e42 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproductgrouplink_client.go @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceProductGroupLinkClient contains the methods for the WorkspaceProductGroupLink group. +// Don't use this type directly, use NewWorkspaceProductGroupLinkClient() instead. +type WorkspaceProductGroupLinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceProductGroupLinkClient creates a new instance of WorkspaceProductGroupLinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceProductGroupLinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceProductGroupLinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceProductGroupLinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Adds a group to the specified product via link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - groupLinkID - Product-Group link identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - WorkspaceProductGroupLinkClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceProductGroupLinkClient.CreateOrUpdate +// method. +func (client *WorkspaceProductGroupLinkClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, groupLinkID string, parameters ProductGroupLinkContract, options *WorkspaceProductGroupLinkClientCreateOrUpdateOptions) (WorkspaceProductGroupLinkClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceProductGroupLinkClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, groupLinkID, parameters, options) + if err != nil { + return WorkspaceProductGroupLinkClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductGroupLinkClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductGroupLinkClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceProductGroupLinkClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, groupLinkID string, parameters ProductGroupLinkContract, _ *WorkspaceProductGroupLinkClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if groupLinkID == "" { + return nil, errors.New("parameter groupLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupLinkId}", url.PathEscape(groupLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceProductGroupLinkClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceProductGroupLinkClientCreateOrUpdateResponse, error) { + result := WorkspaceProductGroupLinkClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProductGroupLinkContract); err != nil { + return WorkspaceProductGroupLinkClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified group from the specified product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - groupLinkID - Product-Group link identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceProductGroupLinkClientDeleteOptions contains the optional parameters for the WorkspaceProductGroupLinkClient.Delete +// method. +func (client *WorkspaceProductGroupLinkClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, groupLinkID string, options *WorkspaceProductGroupLinkClientDeleteOptions) (WorkspaceProductGroupLinkClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceProductGroupLinkClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, groupLinkID, options) + if err != nil { + return WorkspaceProductGroupLinkClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductGroupLinkClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductGroupLinkClientDeleteResponse{}, err + } + return WorkspaceProductGroupLinkClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceProductGroupLinkClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, groupLinkID string, _ *WorkspaceProductGroupLinkClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if groupLinkID == "" { + return nil, errors.New("parameter groupLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupLinkId}", url.PathEscape(groupLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the group link for the product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - groupLinkID - Product-Group link identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceProductGroupLinkClientGetOptions contains the optional parameters for the WorkspaceProductGroupLinkClient.Get +// method. +func (client *WorkspaceProductGroupLinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, groupLinkID string, options *WorkspaceProductGroupLinkClientGetOptions) (WorkspaceProductGroupLinkClientGetResponse, error) { + var err error + const operationName = "WorkspaceProductGroupLinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, groupLinkID, options) + if err != nil { + return WorkspaceProductGroupLinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductGroupLinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductGroupLinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceProductGroupLinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, groupLinkID string, _ *WorkspaceProductGroupLinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks/{groupLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if groupLinkID == "" { + return nil, errors.New("parameter groupLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupLinkId}", url.PathEscape(groupLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceProductGroupLinkClient) getHandleResponse(resp *http.Response) (WorkspaceProductGroupLinkClientGetResponse, error) { + result := WorkspaceProductGroupLinkClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.ProductGroupLinkContract); err != nil { + return WorkspaceProductGroupLinkClientGetResponse{}, err + } + return result, nil +} + +// NewListByProductPager - Lists a collection of the group links associated with a product. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceProductGroupLinkClientListByProductOptions contains the optional parameters for the WorkspaceProductGroupLinkClient.NewListByProductPager +// method. +func (client *WorkspaceProductGroupLinkClient) NewListByProductPager(resourceGroupName string, serviceName string, workspaceID string, productID string, options *WorkspaceProductGroupLinkClientListByProductOptions) *runtime.Pager[WorkspaceProductGroupLinkClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceProductGroupLinkClientListByProductResponse]{ + More: func(page WorkspaceProductGroupLinkClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceProductGroupLinkClientListByProductResponse) (WorkspaceProductGroupLinkClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceProductGroupLinkClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, options) + }, nil) + if err != nil { + return WorkspaceProductGroupLinkClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *WorkspaceProductGroupLinkClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, options *WorkspaceProductGroupLinkClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/groupLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *WorkspaceProductGroupLinkClient) listByProductHandleResponse(resp *http.Response) (WorkspaceProductGroupLinkClientListByProductResponse, error) { + result := WorkspaceProductGroupLinkClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProductGroupLinkCollection); err != nil { + return WorkspaceProductGroupLinkClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproductpolicy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproductpolicy_client.go new file mode 100644 index 00000000..ead92807 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspaceproductpolicy_client.go @@ -0,0 +1,444 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkspaceProductPolicyClient contains the methods for the WorkspaceProductPolicy group. +// Don't use this type directly, use NewWorkspaceProductPolicyClient() instead. +type WorkspaceProductPolicyClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceProductPolicyClient creates a new instance of WorkspaceProductPolicyClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceProductPolicyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceProductPolicyClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceProductPolicyClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates policy configuration for the Product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - parameters - The policy contents to apply. +// - options - WorkspaceProductPolicyClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceProductPolicyClient.CreateOrUpdate +// method. +func (client *WorkspaceProductPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, policyID PolicyIDName, parameters PolicyContract, options *WorkspaceProductPolicyClientCreateOrUpdateOptions) (WorkspaceProductPolicyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceProductPolicyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, policyID, parameters, options) + if err != nil { + return WorkspaceProductPolicyClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductPolicyClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductPolicyClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceProductPolicyClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, policyID PolicyIDName, parameters PolicyContract, options *WorkspaceProductPolicyClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceProductPolicyClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceProductPolicyClientCreateOrUpdateResponse, error) { + result := WorkspaceProductPolicyClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return WorkspaceProductPolicyClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the policy configuration at the Product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceProductPolicyClientDeleteOptions contains the optional parameters for the WorkspaceProductPolicyClient.Delete +// method. +func (client *WorkspaceProductPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, policyID PolicyIDName, ifMatch string, options *WorkspaceProductPolicyClientDeleteOptions) (WorkspaceProductPolicyClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceProductPolicyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, policyID, ifMatch, options) + if err != nil { + return WorkspaceProductPolicyClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductPolicyClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductPolicyClientDeleteResponse{}, err + } + return WorkspaceProductPolicyClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceProductPolicyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, policyID PolicyIDName, ifMatch string, _ *WorkspaceProductPolicyClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Get the policy configuration at the Product level. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - options - WorkspaceProductPolicyClientGetOptions contains the optional parameters for the WorkspaceProductPolicyClient.Get +// method. +func (client *WorkspaceProductPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, policyID PolicyIDName, options *WorkspaceProductPolicyClientGetOptions) (WorkspaceProductPolicyClientGetResponse, error) { + var err error + const operationName = "WorkspaceProductPolicyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, policyID, options) + if err != nil { + return WorkspaceProductPolicyClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductPolicyClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductPolicyClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceProductPolicyClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, policyID PolicyIDName, options *WorkspaceProductPolicyClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Format != nil { + reqQP.Set("format", string(*options.Format)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceProductPolicyClient) getHandleResponse(resp *http.Response) (WorkspaceProductPolicyClientGetResponse, error) { + result := WorkspaceProductPolicyClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyContract); err != nil { + return WorkspaceProductPolicyClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Get the ETag of the policy configuration at the Product level. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - policyID - The identifier of the Policy. +// - options - WorkspaceProductPolicyClientGetEntityTagOptions contains the optional parameters for the WorkspaceProductPolicyClient.GetEntityTag +// method. +func (client *WorkspaceProductPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, policyID PolicyIDName, options *WorkspaceProductPolicyClientGetEntityTagOptions) (WorkspaceProductPolicyClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceProductPolicyClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, policyID, options) + if err != nil { + return WorkspaceProductPolicyClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductPolicyClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductPolicyClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceProductPolicyClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, policyID PolicyIDName, _ *WorkspaceProductPolicyClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies/{policyId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if policyID == "" { + return nil, errors.New("parameter policyID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyId}", url.PathEscape(string(policyID))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceProductPolicyClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceProductPolicyClientGetEntityTagResponse, error) { + result := WorkspaceProductPolicyClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// ListByProduct - Get the policy configuration at the Product level. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - productID - Product identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceProductPolicyClientListByProductOptions contains the optional parameters for the WorkspaceProductPolicyClient.ListByProduct +// method. +func (client *WorkspaceProductPolicyClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, options *WorkspaceProductPolicyClientListByProductOptions) (WorkspaceProductPolicyClientListByProductResponse, error) { + var err error + const operationName = "WorkspaceProductPolicyClient.ListByProduct" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, productID, options) + if err != nil { + return WorkspaceProductPolicyClientListByProductResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceProductPolicyClientListByProductResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceProductPolicyClientListByProductResponse{}, err + } + resp, err := client.listByProductHandleResponse(httpResp) + return resp, err +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *WorkspaceProductPolicyClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, productID string, _ *WorkspaceProductPolicyClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/products/{productId}/policies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if productID == "" { + return nil, errors.New("parameter productID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productId}", url.PathEscape(productID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *WorkspaceProductPolicyClient) listByProductHandleResponse(resp *http.Response) (WorkspaceProductPolicyClientListByProductResponse, error) { + result := WorkspaceProductPolicyClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyCollection); err != nil { + return WorkspaceProductPolicyClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacesubscription_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacesubscription_client.go new file mode 100644 index 00000000..ccb3adb1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacesubscription_client.go @@ -0,0 +1,732 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceSubscriptionClient contains the methods for the WorkspaceSubscription group. +// Don't use this type directly, use NewWorkspaceSubscriptionClient() instead. +type WorkspaceSubscriptionClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceSubscriptionClient creates a new instance of WorkspaceSubscriptionClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceSubscriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceSubscriptionClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceSubscriptionClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates the subscription of specified user to the specified product. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. +// - parameters - Create parameters. +// - options - WorkspaceSubscriptionClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceSubscriptionClient.CreateOrUpdate +// method. +func (client *WorkspaceSubscriptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, parameters SubscriptionCreateParameters, options *WorkspaceSubscriptionClientCreateOrUpdateOptions) (WorkspaceSubscriptionClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceSubscriptionClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, sid, parameters, options) + if err != nil { + return WorkspaceSubscriptionClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceSubscriptionClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceSubscriptionClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceSubscriptionClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, parameters SubscriptionCreateParameters, options *WorkspaceSubscriptionClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if sid == "" { + return nil, errors.New("parameter sid cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sid}", url.PathEscape(sid)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.AppType != nil { + reqQP.Set("appType", string(*options.AppType)) + } + if options != nil && options.Notify != nil { + reqQP.Set("notify", strconv.FormatBool(*options.Notify)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceSubscriptionClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceSubscriptionClientCreateOrUpdateResponse, error) { + result := WorkspaceSubscriptionClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionContract); err != nil { + return WorkspaceSubscriptionClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceSubscriptionClientDeleteOptions contains the optional parameters for the WorkspaceSubscriptionClient.Delete +// method. +func (client *WorkspaceSubscriptionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, ifMatch string, options *WorkspaceSubscriptionClientDeleteOptions) (WorkspaceSubscriptionClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceSubscriptionClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, sid, ifMatch, options) + if err != nil { + return WorkspaceSubscriptionClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceSubscriptionClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceSubscriptionClientDeleteResponse{}, err + } + return WorkspaceSubscriptionClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceSubscriptionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, ifMatch string, _ *WorkspaceSubscriptionClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if sid == "" { + return nil, errors.New("parameter sid cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sid}", url.PathEscape(sid)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the specified Subscription entity. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. +// - options - WorkspaceSubscriptionClientGetOptions contains the optional parameters for the WorkspaceSubscriptionClient.Get +// method. +func (client *WorkspaceSubscriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, options *WorkspaceSubscriptionClientGetOptions) (WorkspaceSubscriptionClientGetResponse, error) { + var err error + const operationName = "WorkspaceSubscriptionClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, sid, options) + if err != nil { + return WorkspaceSubscriptionClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceSubscriptionClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceSubscriptionClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceSubscriptionClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, _ *WorkspaceSubscriptionClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if sid == "" { + return nil, errors.New("parameter sid cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sid}", url.PathEscape(sid)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceSubscriptionClient) getHandleResponse(resp *http.Response) (WorkspaceSubscriptionClientGetResponse, error) { + result := WorkspaceSubscriptionClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionContract); err != nil { + return WorkspaceSubscriptionClientGetResponse{}, err + } + return result, nil +} + +// GetEntityTag - Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. +// - options - WorkspaceSubscriptionClientGetEntityTagOptions contains the optional parameters for the WorkspaceSubscriptionClient.GetEntityTag +// method. +func (client *WorkspaceSubscriptionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, options *WorkspaceSubscriptionClientGetEntityTagOptions) (WorkspaceSubscriptionClientGetEntityTagResponse, error) { + var err error + const operationName = "WorkspaceSubscriptionClient.GetEntityTag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityTagCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, sid, options) + if err != nil { + return WorkspaceSubscriptionClientGetEntityTagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceSubscriptionClientGetEntityTagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceSubscriptionClientGetEntityTagResponse{}, err + } + resp, err := client.getEntityTagHandleResponse(httpResp) + return resp, err +} + +// getEntityTagCreateRequest creates the GetEntityTag request. +func (client *WorkspaceSubscriptionClient) getEntityTagCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, _ *WorkspaceSubscriptionClientGetEntityTagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if sid == "" { + return nil, errors.New("parameter sid cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sid}", url.PathEscape(sid)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityTagHandleResponse handles the GetEntityTag response. +func (client *WorkspaceSubscriptionClient) getEntityTagHandleResponse(resp *http.Response) (WorkspaceSubscriptionClientGetEntityTagResponse, error) { + result := WorkspaceSubscriptionClientGetEntityTagResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListPager - Lists all subscriptions of the workspace in an API Management service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceSubscriptionClientListOptions contains the optional parameters for the WorkspaceSubscriptionClient.NewListPager +// method. +func (client *WorkspaceSubscriptionClient) NewListPager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceSubscriptionClientListOptions) *runtime.Pager[WorkspaceSubscriptionClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceSubscriptionClientListResponse]{ + More: func(page WorkspaceSubscriptionClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceSubscriptionClientListResponse) (WorkspaceSubscriptionClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceSubscriptionClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceSubscriptionClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WorkspaceSubscriptionClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceSubscriptionClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkspaceSubscriptionClient) listHandleResponse(resp *http.Response) (WorkspaceSubscriptionClientListResponse, error) { + result := WorkspaceSubscriptionClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionCollection); err != nil { + return WorkspaceSubscriptionClientListResponse{}, err + } + return result, nil +} + +// ListSecrets - Gets the specified Subscription keys. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. +// - options - WorkspaceSubscriptionClientListSecretsOptions contains the optional parameters for the WorkspaceSubscriptionClient.ListSecrets +// method. +func (client *WorkspaceSubscriptionClient) ListSecrets(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, options *WorkspaceSubscriptionClientListSecretsOptions) (WorkspaceSubscriptionClientListSecretsResponse, error) { + var err error + const operationName = "WorkspaceSubscriptionClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, sid, options) + if err != nil { + return WorkspaceSubscriptionClientListSecretsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceSubscriptionClientListSecretsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceSubscriptionClientListSecretsResponse{}, err + } + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err +} + +// listSecretsCreateRequest creates the ListSecrets request. +func (client *WorkspaceSubscriptionClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, _ *WorkspaceSubscriptionClientListSecretsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/listSecrets" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if sid == "" { + return nil, errors.New("parameter sid cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sid}", url.PathEscape(sid)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSecretsHandleResponse handles the ListSecrets response. +func (client *WorkspaceSubscriptionClient) listSecretsHandleResponse(resp *http.Response) (WorkspaceSubscriptionClientListSecretsResponse, error) { + result := WorkspaceSubscriptionClientListSecretsResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionKeysContract); err != nil { + return WorkspaceSubscriptionClientListSecretsResponse{}, err + } + return result, nil +} + +// RegeneratePrimaryKey - Regenerates primary key of existing subscription of the workspace in an API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. +// - options - WorkspaceSubscriptionClientRegeneratePrimaryKeyOptions contains the optional parameters for the WorkspaceSubscriptionClient.RegeneratePrimaryKey +// method. +func (client *WorkspaceSubscriptionClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, options *WorkspaceSubscriptionClientRegeneratePrimaryKeyOptions) (WorkspaceSubscriptionClientRegeneratePrimaryKeyResponse, error) { + var err error + const operationName = "WorkspaceSubscriptionClient.RegeneratePrimaryKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.regeneratePrimaryKeyCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, sid, options) + if err != nil { + return WorkspaceSubscriptionClientRegeneratePrimaryKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceSubscriptionClientRegeneratePrimaryKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceSubscriptionClientRegeneratePrimaryKeyResponse{}, err + } + return WorkspaceSubscriptionClientRegeneratePrimaryKeyResponse{}, nil +} + +// regeneratePrimaryKeyCreateRequest creates the RegeneratePrimaryKey request. +func (client *WorkspaceSubscriptionClient) regeneratePrimaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, _ *WorkspaceSubscriptionClientRegeneratePrimaryKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regeneratePrimaryKey" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if sid == "" { + return nil, errors.New("parameter sid cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sid}", url.PathEscape(sid)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// RegenerateSecondaryKey - Regenerates secondary key of existing subscription of the workspace in an API Management service +// instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. +// - options - WorkspaceSubscriptionClientRegenerateSecondaryKeyOptions contains the optional parameters for the WorkspaceSubscriptionClient.RegenerateSecondaryKey +// method. +func (client *WorkspaceSubscriptionClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, options *WorkspaceSubscriptionClientRegenerateSecondaryKeyOptions) (WorkspaceSubscriptionClientRegenerateSecondaryKeyResponse, error) { + var err error + const operationName = "WorkspaceSubscriptionClient.RegenerateSecondaryKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.regenerateSecondaryKeyCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, sid, options) + if err != nil { + return WorkspaceSubscriptionClientRegenerateSecondaryKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceSubscriptionClientRegenerateSecondaryKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceSubscriptionClientRegenerateSecondaryKeyResponse{}, err + } + return WorkspaceSubscriptionClientRegenerateSecondaryKeyResponse{}, nil +} + +// regenerateSecondaryKeyCreateRequest creates the RegenerateSecondaryKey request. +func (client *WorkspaceSubscriptionClient) regenerateSecondaryKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, _ *WorkspaceSubscriptionClientRegenerateSecondaryKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}/regenerateSecondaryKey" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if sid == "" { + return nil, errors.New("parameter sid cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sid}", url.PathEscape(sid)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Update - Updates the details of a subscription specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update parameters. +// - options - WorkspaceSubscriptionClientUpdateOptions contains the optional parameters for the WorkspaceSubscriptionClient.Update +// method. +func (client *WorkspaceSubscriptionClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, ifMatch string, parameters SubscriptionUpdateParameters, options *WorkspaceSubscriptionClientUpdateOptions) (WorkspaceSubscriptionClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceSubscriptionClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, sid, ifMatch, parameters, options) + if err != nil { + return WorkspaceSubscriptionClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceSubscriptionClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceSubscriptionClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceSubscriptionClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, sid string, ifMatch string, parameters SubscriptionUpdateParameters, options *WorkspaceSubscriptionClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/subscriptions/{sid}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if sid == "" { + return nil, errors.New("parameter sid cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sid}", url.PathEscape(sid)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.AppType != nil { + reqQP.Set("appType", string(*options.AppType)) + } + if options != nil && options.Notify != nil { + reqQP.Set("notify", strconv.FormatBool(*options.Notify)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceSubscriptionClient) updateHandleResponse(resp *http.Response) (WorkspaceSubscriptionClientUpdateResponse, error) { + result := WorkspaceSubscriptionClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionContract); err != nil { + return WorkspaceSubscriptionClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetag_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetag_client.go new file mode 100644 index 00000000..0b8c9b7d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetag_client.go @@ -0,0 +1,511 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceTagClient contains the methods for the WorkspaceTag group. +// Don't use this type directly, use NewWorkspaceTagClient() instead. +type WorkspaceTagClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceTagClient creates a new instance of WorkspaceTagClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceTagClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceTagClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceTagClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates a tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - parameters - Create parameters. +// - options - WorkspaceTagClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceTagClient.CreateOrUpdate +// method. +func (client *WorkspaceTagClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, parameters TagCreateUpdateParameters, options *WorkspaceTagClientCreateOrUpdateOptions) (WorkspaceTagClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceTagClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, parameters, options) + if err != nil { + return WorkspaceTagClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceTagClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, parameters TagCreateUpdateParameters, options *WorkspaceTagClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceTagClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceTagClientCreateOrUpdateResponse, error) { + result := WorkspaceTagClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.TagContract); err != nil { + return WorkspaceTagClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes specific tag of the workspace in an API Management service instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - options - WorkspaceTagClientDeleteOptions contains the optional parameters for the WorkspaceTagClient.Delete method. +func (client *WorkspaceTagClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, ifMatch string, options *WorkspaceTagClientDeleteOptions) (WorkspaceTagClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceTagClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, ifMatch, options) + if err != nil { + return WorkspaceTagClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagClientDeleteResponse{}, err + } + return WorkspaceTagClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceTagClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, ifMatch string, _ *WorkspaceTagClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + return req, nil +} + +// Get - Gets the details of the tag specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagClientGetOptions contains the optional parameters for the WorkspaceTagClient.Get method. +func (client *WorkspaceTagClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, options *WorkspaceTagClientGetOptions) (WorkspaceTagClientGetResponse, error) { + var err error + const operationName = "WorkspaceTagClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, options) + if err != nil { + return WorkspaceTagClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceTagClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, _ *WorkspaceTagClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceTagClient) getHandleResponse(resp *http.Response) (WorkspaceTagClientGetResponse, error) { + result := WorkspaceTagClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.TagContract); err != nil { + return WorkspaceTagClientGetResponse{}, err + } + return result, nil +} + +// GetEntityState - Gets the entity state version of the tag specified by its identifier. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagClientGetEntityStateOptions contains the optional parameters for the WorkspaceTagClient.GetEntityState +// method. +func (client *WorkspaceTagClient) GetEntityState(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, options *WorkspaceTagClientGetEntityStateOptions) (WorkspaceTagClientGetEntityStateResponse, error) { + var err error + const operationName = "WorkspaceTagClient.GetEntityState" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEntityStateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, options) + if err != nil { + return WorkspaceTagClientGetEntityStateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagClientGetEntityStateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagClientGetEntityStateResponse{}, err + } + resp, err := client.getEntityStateHandleResponse(httpResp) + return resp, err +} + +// getEntityStateCreateRequest creates the GetEntityState request. +func (client *WorkspaceTagClient) getEntityStateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, _ *WorkspaceTagClientGetEntityStateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodHead, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityStateHandleResponse handles the GetEntityState response. +func (client *WorkspaceTagClient) getEntityStateHandleResponse(resp *http.Response) (WorkspaceTagClientGetEntityStateResponse, error) { + result := WorkspaceTagClientGetEntityStateResponse{Success: resp.StatusCode >= 200 && resp.StatusCode < 300} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + return result, nil +} + +// NewListByServicePager - Lists a collection of tags defined within a workspace in a service instance. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagClientListByServiceOptions contains the optional parameters for the WorkspaceTagClient.NewListByServicePager +// method. +func (client *WorkspaceTagClient) NewListByServicePager(resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceTagClientListByServiceOptions) *runtime.Pager[WorkspaceTagClientListByServiceResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceTagClientListByServiceResponse]{ + More: func(page WorkspaceTagClientListByServiceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceTagClientListByServiceResponse) (WorkspaceTagClientListByServiceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceTagClient.NewListByServicePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByServiceCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, options) + }, nil) + if err != nil { + return WorkspaceTagClientListByServiceResponse{}, err + } + return client.listByServiceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByServiceCreateRequest creates the ListByService request. +func (client *WorkspaceTagClient) listByServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, options *WorkspaceTagClientListByServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Scope != nil { + reqQP.Set("scope", *options.Scope) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByServiceHandleResponse handles the ListByService response. +func (client *WorkspaceTagClient) listByServiceHandleResponse(resp *http.Response) (WorkspaceTagClientListByServiceResponse, error) { + result := WorkspaceTagClientListByServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagCollection); err != nil { + return WorkspaceTagClientListByServiceResponse{}, err + } + return result, nil +} + +// Update - Updates the details of the tag specified by its identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or +// it should be * for unconditional update. +// - parameters - Update parameters. +// - options - WorkspaceTagClientUpdateOptions contains the optional parameters for the WorkspaceTagClient.Update method. +func (client *WorkspaceTagClient) Update(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, ifMatch string, parameters TagCreateUpdateParameters, options *WorkspaceTagClientUpdateOptions) (WorkspaceTagClientUpdateResponse, error) { + var err error + const operationName = "WorkspaceTagClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, ifMatch, parameters, options) + if err != nil { + return WorkspaceTagClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspaceTagClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, ifMatch string, parameters TagCreateUpdateParameters, _ *WorkspaceTagClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + req.Raw().Header["If-Match"] = []string{ifMatch} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspaceTagClient) updateHandleResponse(resp *http.Response) (WorkspaceTagClientUpdateResponse, error) { + result := WorkspaceTagClientUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.TagContract); err != nil { + return WorkspaceTagClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetagapilink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetagapilink_client.go new file mode 100644 index 00000000..45a2fa02 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetagapilink_client.go @@ -0,0 +1,362 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceTagAPILinkClient contains the methods for the WorkspaceTagAPILink group. +// Don't use this type directly, use NewWorkspaceTagAPILinkClient() instead. +type WorkspaceTagAPILinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceTagAPILinkClient creates a new instance of WorkspaceTagAPILinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceTagAPILinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceTagAPILinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceTagAPILinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Adds an API to the specified tag via link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Tag-API link identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - WorkspaceTagAPILinkClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceTagAPILinkClient.CreateOrUpdate +// method. +func (client *WorkspaceTagAPILinkClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, apiLinkID string, parameters TagAPILinkContract, options *WorkspaceTagAPILinkClientCreateOrUpdateOptions) (WorkspaceTagAPILinkClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceTagAPILinkClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, apiLinkID, parameters, options) + if err != nil { + return WorkspaceTagAPILinkClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagAPILinkClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagAPILinkClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceTagAPILinkClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, apiLinkID string, parameters TagAPILinkContract, _ *WorkspaceTagAPILinkClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceTagAPILinkClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceTagAPILinkClientCreateOrUpdateResponse, error) { + result := WorkspaceTagAPILinkClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagAPILinkContract); err != nil { + return WorkspaceTagAPILinkClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified API from the specified tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Tag-API link identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagAPILinkClientDeleteOptions contains the optional parameters for the WorkspaceTagAPILinkClient.Delete +// method. +func (client *WorkspaceTagAPILinkClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, apiLinkID string, options *WorkspaceTagAPILinkClientDeleteOptions) (WorkspaceTagAPILinkClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceTagAPILinkClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, apiLinkID, options) + if err != nil { + return WorkspaceTagAPILinkClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagAPILinkClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagAPILinkClientDeleteResponse{}, err + } + return WorkspaceTagAPILinkClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceTagAPILinkClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, apiLinkID string, _ *WorkspaceTagAPILinkClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the API link for the tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - apiLinkID - Tag-API link identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagAPILinkClientGetOptions contains the optional parameters for the WorkspaceTagAPILinkClient.Get method. +func (client *WorkspaceTagAPILinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, apiLinkID string, options *WorkspaceTagAPILinkClientGetOptions) (WorkspaceTagAPILinkClientGetResponse, error) { + var err error + const operationName = "WorkspaceTagAPILinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, apiLinkID, options) + if err != nil { + return WorkspaceTagAPILinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagAPILinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagAPILinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceTagAPILinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, apiLinkID string, _ *WorkspaceTagAPILinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks/{apiLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if apiLinkID == "" { + return nil, errors.New("parameter apiLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiLinkId}", url.PathEscape(apiLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceTagAPILinkClient) getHandleResponse(resp *http.Response) (WorkspaceTagAPILinkClientGetResponse, error) { + result := WorkspaceTagAPILinkClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.TagAPILinkContract); err != nil { + return WorkspaceTagAPILinkClientGetResponse{}, err + } + return result, nil +} + +// NewListByProductPager - Lists a collection of the API links associated with a tag. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagAPILinkClientListByProductOptions contains the optional parameters for the WorkspaceTagAPILinkClient.NewListByProductPager +// method. +func (client *WorkspaceTagAPILinkClient) NewListByProductPager(resourceGroupName string, serviceName string, workspaceID string, tagID string, options *WorkspaceTagAPILinkClientListByProductOptions) *runtime.Pager[WorkspaceTagAPILinkClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceTagAPILinkClientListByProductResponse]{ + More: func(page WorkspaceTagAPILinkClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceTagAPILinkClientListByProductResponse) (WorkspaceTagAPILinkClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceTagAPILinkClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, options) + }, nil) + if err != nil { + return WorkspaceTagAPILinkClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *WorkspaceTagAPILinkClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, options *WorkspaceTagAPILinkClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/apiLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *WorkspaceTagAPILinkClient) listByProductHandleResponse(resp *http.Response) (WorkspaceTagAPILinkClientListByProductResponse, error) { + result := WorkspaceTagAPILinkClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagAPILinkCollection); err != nil { + return WorkspaceTagAPILinkClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetagoperationlink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetagoperationlink_client.go new file mode 100644 index 00000000..5f01da29 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetagoperationlink_client.go @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceTagOperationLinkClient contains the methods for the WorkspaceTagOperationLink group. +// Don't use this type directly, use NewWorkspaceTagOperationLinkClient() instead. +type WorkspaceTagOperationLinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceTagOperationLinkClient creates a new instance of WorkspaceTagOperationLinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceTagOperationLinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceTagOperationLinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceTagOperationLinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Adds an operation to the specified tag via link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - operationLinkID - Tag-operation link identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - WorkspaceTagOperationLinkClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceTagOperationLinkClient.CreateOrUpdate +// method. +func (client *WorkspaceTagOperationLinkClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, operationLinkID string, parameters TagOperationLinkContract, options *WorkspaceTagOperationLinkClientCreateOrUpdateOptions) (WorkspaceTagOperationLinkClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceTagOperationLinkClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, operationLinkID, parameters, options) + if err != nil { + return WorkspaceTagOperationLinkClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagOperationLinkClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagOperationLinkClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceTagOperationLinkClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, operationLinkID string, parameters TagOperationLinkContract, _ *WorkspaceTagOperationLinkClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if operationLinkID == "" { + return nil, errors.New("parameter operationLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationLinkId}", url.PathEscape(operationLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceTagOperationLinkClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceTagOperationLinkClientCreateOrUpdateResponse, error) { + result := WorkspaceTagOperationLinkClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagOperationLinkContract); err != nil { + return WorkspaceTagOperationLinkClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified operation from the specified tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - operationLinkID - Tag-operation link identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagOperationLinkClientDeleteOptions contains the optional parameters for the WorkspaceTagOperationLinkClient.Delete +// method. +func (client *WorkspaceTagOperationLinkClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, operationLinkID string, options *WorkspaceTagOperationLinkClientDeleteOptions) (WorkspaceTagOperationLinkClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceTagOperationLinkClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, operationLinkID, options) + if err != nil { + return WorkspaceTagOperationLinkClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagOperationLinkClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagOperationLinkClientDeleteResponse{}, err + } + return WorkspaceTagOperationLinkClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceTagOperationLinkClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, operationLinkID string, _ *WorkspaceTagOperationLinkClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if operationLinkID == "" { + return nil, errors.New("parameter operationLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationLinkId}", url.PathEscape(operationLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the operation link for the tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - operationLinkID - Tag-operation link identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagOperationLinkClientGetOptions contains the optional parameters for the WorkspaceTagOperationLinkClient.Get +// method. +func (client *WorkspaceTagOperationLinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, operationLinkID string, options *WorkspaceTagOperationLinkClientGetOptions) (WorkspaceTagOperationLinkClientGetResponse, error) { + var err error + const operationName = "WorkspaceTagOperationLinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, operationLinkID, options) + if err != nil { + return WorkspaceTagOperationLinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagOperationLinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagOperationLinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceTagOperationLinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, operationLinkID string, _ *WorkspaceTagOperationLinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks/{operationLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if operationLinkID == "" { + return nil, errors.New("parameter operationLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationLinkId}", url.PathEscape(operationLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceTagOperationLinkClient) getHandleResponse(resp *http.Response) (WorkspaceTagOperationLinkClientGetResponse, error) { + result := WorkspaceTagOperationLinkClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.TagOperationLinkContract); err != nil { + return WorkspaceTagOperationLinkClientGetResponse{}, err + } + return result, nil +} + +// NewListByProductPager - Lists a collection of the operation links associated with a tag. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagOperationLinkClientListByProductOptions contains the optional parameters for the WorkspaceTagOperationLinkClient.NewListByProductPager +// method. +func (client *WorkspaceTagOperationLinkClient) NewListByProductPager(resourceGroupName string, serviceName string, workspaceID string, tagID string, options *WorkspaceTagOperationLinkClientListByProductOptions) *runtime.Pager[WorkspaceTagOperationLinkClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceTagOperationLinkClientListByProductResponse]{ + More: func(page WorkspaceTagOperationLinkClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceTagOperationLinkClientListByProductResponse) (WorkspaceTagOperationLinkClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceTagOperationLinkClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, options) + }, nil) + if err != nil { + return WorkspaceTagOperationLinkClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *WorkspaceTagOperationLinkClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, options *WorkspaceTagOperationLinkClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/operationLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *WorkspaceTagOperationLinkClient) listByProductHandleResponse(resp *http.Response) (WorkspaceTagOperationLinkClientListByProductResponse, error) { + result := WorkspaceTagOperationLinkClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagOperationLinkCollection); err != nil { + return WorkspaceTagOperationLinkClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetagproductlink_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetagproductlink_client.go new file mode 100644 index 00000000..8a304cfb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3/workspacetagproductlink_client.go @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armapimanagement + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspaceTagProductLinkClient contains the methods for the WorkspaceTagProductLink group. +// Don't use this type directly, use NewWorkspaceTagProductLinkClient() instead. +type WorkspaceTagProductLinkClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspaceTagProductLinkClient creates a new instance of WorkspaceTagProductLinkClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspaceTagProductLinkClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceTagProductLinkClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspaceTagProductLinkClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Adds a product to the specified tag via link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - productLinkID - Tag-product link identifier. Must be unique in the current API Management service instance. +// - parameters - Create or update parameters. +// - options - WorkspaceTagProductLinkClientCreateOrUpdateOptions contains the optional parameters for the WorkspaceTagProductLinkClient.CreateOrUpdate +// method. +func (client *WorkspaceTagProductLinkClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, productLinkID string, parameters TagProductLinkContract, options *WorkspaceTagProductLinkClientCreateOrUpdateOptions) (WorkspaceTagProductLinkClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspaceTagProductLinkClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, productLinkID, parameters, options) + if err != nil { + return WorkspaceTagProductLinkClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagProductLinkClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagProductLinkClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspaceTagProductLinkClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, productLinkID string, parameters TagProductLinkContract, _ *WorkspaceTagProductLinkClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if productLinkID == "" { + return nil, errors.New("parameter productLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productLinkId}", url.PathEscape(productLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspaceTagProductLinkClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspaceTagProductLinkClientCreateOrUpdateResponse, error) { + result := WorkspaceTagProductLinkClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagProductLinkContract); err != nil { + return WorkspaceTagProductLinkClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the specified product from the specified tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - productLinkID - Tag-product link identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagProductLinkClientDeleteOptions contains the optional parameters for the WorkspaceTagProductLinkClient.Delete +// method. +func (client *WorkspaceTagProductLinkClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, productLinkID string, options *WorkspaceTagProductLinkClientDeleteOptions) (WorkspaceTagProductLinkClientDeleteResponse, error) { + var err error + const operationName = "WorkspaceTagProductLinkClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, productLinkID, options) + if err != nil { + return WorkspaceTagProductLinkClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagProductLinkClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagProductLinkClientDeleteResponse{}, err + } + return WorkspaceTagProductLinkClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspaceTagProductLinkClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, productLinkID string, _ *WorkspaceTagProductLinkClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if productLinkID == "" { + return nil, errors.New("parameter productLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productLinkId}", url.PathEscape(productLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the product link for the tag. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - productLinkID - Tag-product link identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagProductLinkClientGetOptions contains the optional parameters for the WorkspaceTagProductLinkClient.Get +// method. +func (client *WorkspaceTagProductLinkClient) Get(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, productLinkID string, options *WorkspaceTagProductLinkClientGetOptions) (WorkspaceTagProductLinkClientGetResponse, error) { + var err error + const operationName = "WorkspaceTagProductLinkClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, productLinkID, options) + if err != nil { + return WorkspaceTagProductLinkClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspaceTagProductLinkClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspaceTagProductLinkClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspaceTagProductLinkClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, productLinkID string, _ *WorkspaceTagProductLinkClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks/{productLinkId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if productLinkID == "" { + return nil, errors.New("parameter productLinkID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{productLinkId}", url.PathEscape(productLinkID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspaceTagProductLinkClient) getHandleResponse(resp *http.Response) (WorkspaceTagProductLinkClientGetResponse, error) { + result := WorkspaceTagProductLinkClientGetResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.TagProductLinkContract); err != nil { + return WorkspaceTagProductLinkClientGetResponse{}, err + } + return result, nil +} + +// NewListByProductPager - Lists a collection of the product links associated with a tag. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - serviceName - The name of the API Management service. +// - workspaceID - Workspace identifier. Must be unique in the current API Management service instance. +// - tagID - Tag identifier. Must be unique in the current API Management service instance. +// - options - WorkspaceTagProductLinkClientListByProductOptions contains the optional parameters for the WorkspaceTagProductLinkClient.NewListByProductPager +// method. +func (client *WorkspaceTagProductLinkClient) NewListByProductPager(resourceGroupName string, serviceName string, workspaceID string, tagID string, options *WorkspaceTagProductLinkClientListByProductOptions) *runtime.Pager[WorkspaceTagProductLinkClientListByProductResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspaceTagProductLinkClientListByProductResponse]{ + More: func(page WorkspaceTagProductLinkClientListByProductResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspaceTagProductLinkClientListByProductResponse) (WorkspaceTagProductLinkClientListByProductResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspaceTagProductLinkClient.NewListByProductPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProductCreateRequest(ctx, resourceGroupName, serviceName, workspaceID, tagID, options) + }, nil) + if err != nil { + return WorkspaceTagProductLinkClientListByProductResponse{}, err + } + return client.listByProductHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProductCreateRequest creates the ListByProduct request. +func (client *WorkspaceTagProductLinkClient) listByProductCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, workspaceID string, tagID string, options *WorkspaceTagProductLinkClientListByProductOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/tags/{tagId}/productLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if workspaceID == "" { + return nil, errors.New("parameter workspaceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceId}", url.PathEscape(workspaceID)) + if tagID == "" { + return nil, errors.New("parameter tagID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tagId}", url.PathEscape(tagID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProductHandleResponse handles the ListByProduct response. +func (client *WorkspaceTagProductLinkClient) listByProductHandleResponse(resp *http.Response) (WorkspaceTagProductLinkClientListByProductResponse, error) { + result := WorkspaceTagProductLinkClientListByProductResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TagProductLinkCollection); err != nil { + return WorkspaceTagProductLinkClientListByProductResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/CHANGELOG.md index ebae90ab..53f7c166 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/CHANGELOG.md @@ -1,5 +1,377 @@ # Release History +## 3.1.0 (2025-04-24) +### Features Added + +- New value `StorageTypeNfsAzureFile` added to enum type `StorageType` +- New enum type `ContainerAppRunningStatus` with values `ContainerAppRunningStatusProgressing`, `ContainerAppRunningStatusReady`, `ContainerAppRunningStatusRunning`, `ContainerAppRunningStatusStopped`, `ContainerAppRunningStatusSuspended` +- New enum type `ContainerType` with values `ContainerTypeCustomContainer`, `ContainerTypePythonLTS` +- New enum type `IdentitySettingsLifeCycle` with values `IdentitySettingsLifeCycleAll`, `IdentitySettingsLifeCycleInit`, `IdentitySettingsLifeCycleMain`, `IdentitySettingsLifeCycleNone` +- New enum type `JavaComponentProvisioningState` with values `JavaComponentProvisioningStateCanceled`, `JavaComponentProvisioningStateDeleting`, `JavaComponentProvisioningStateFailed`, `JavaComponentProvisioningStateInProgress`, `JavaComponentProvisioningStateSucceeded` +- New enum type `JavaComponentType` with values `JavaComponentTypeSpringBootAdmin`, `JavaComponentTypeSpringCloudConfig`, `JavaComponentTypeSpringCloudEureka` +- New enum type `LifecycleType` with values `LifecycleTypeOnContainerExit`, `LifecycleTypeTimed` +- New enum type `PoolManagementType` with values `PoolManagementTypeDynamic`, `PoolManagementTypeManual` +- New enum type `SessionNetworkStatus` with values `SessionNetworkStatusEgressDisabled`, `SessionNetworkStatusEgressEnabled` +- New enum type `SessionPoolProvisioningState` with values `SessionPoolProvisioningStateCanceled`, `SessionPoolProvisioningStateDeleting`, `SessionPoolProvisioningStateFailed`, `SessionPoolProvisioningStateInProgress`, `SessionPoolProvisioningStateSucceeded` +- New function `*ClientFactory.NewContainerAppsSessionPoolsClient() *ContainerAppsSessionPoolsClient` +- New function `*ClientFactory.NewJavaComponentsClient() *JavaComponentsClient` +- New function `NewContainerAppsSessionPoolsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ContainerAppsSessionPoolsClient, error)` +- New function `*ContainerAppsSessionPoolsClient.BeginCreateOrUpdate(context.Context, string, string, SessionPool, *ContainerAppsSessionPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ContainerAppsSessionPoolsClientCreateOrUpdateResponse], error)` +- New function `*ContainerAppsSessionPoolsClient.BeginDelete(context.Context, string, string, *ContainerAppsSessionPoolsClientBeginDeleteOptions) (*runtime.Poller[ContainerAppsSessionPoolsClientDeleteResponse], error)` +- New function `*ContainerAppsSessionPoolsClient.Get(context.Context, string, string, *ContainerAppsSessionPoolsClientGetOptions) (ContainerAppsSessionPoolsClientGetResponse, error)` +- New function `*ContainerAppsSessionPoolsClient.NewListByResourceGroupPager(string, *ContainerAppsSessionPoolsClientListByResourceGroupOptions) *runtime.Pager[ContainerAppsSessionPoolsClientListByResourceGroupResponse]` +- New function `*ContainerAppsSessionPoolsClient.NewListBySubscriptionPager(*ContainerAppsSessionPoolsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsSessionPoolsClientListBySubscriptionResponse]` +- New function `*ContainerAppsSessionPoolsClient.BeginUpdate(context.Context, string, string, SessionPoolUpdatableProperties, *ContainerAppsSessionPoolsClientBeginUpdateOptions) (*runtime.Poller[ContainerAppsSessionPoolsClientUpdateResponse], error)` +- New function `*JavaComponentProperties.GetJavaComponentProperties() *JavaComponentProperties` +- New function `NewJavaComponentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*JavaComponentsClient, error)` +- New function `*JavaComponentsClient.BeginCreateOrUpdate(context.Context, string, string, string, JavaComponent, *JavaComponentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JavaComponentsClientCreateOrUpdateResponse], error)` +- New function `*JavaComponentsClient.BeginDelete(context.Context, string, string, string, *JavaComponentsClientBeginDeleteOptions) (*runtime.Poller[JavaComponentsClientDeleteResponse], error)` +- New function `*JavaComponentsClient.Get(context.Context, string, string, string, *JavaComponentsClientGetOptions) (JavaComponentsClientGetResponse, error)` +- New function `*JavaComponentsClient.NewListPager(string, string, *JavaComponentsClientListOptions) *runtime.Pager[JavaComponentsClientListResponse]` +- New function `*JavaComponentsClient.BeginUpdate(context.Context, string, string, string, JavaComponent, *JavaComponentsClientBeginUpdateOptions) (*runtime.Poller[JavaComponentsClientUpdateResponse], error)` +- New function `*SpringBootAdminComponent.GetJavaComponentProperties() *JavaComponentProperties` +- New function `*SpringCloudConfigComponent.GetJavaComponentProperties() *JavaComponentProperties` +- New function `*SpringCloudEurekaComponent.GetJavaComponentProperties() *JavaComponentProperties` +- New struct `CertificateKeyVaultProperties` +- New struct `CustomContainerTemplate` +- New struct `DynamicPoolConfiguration` +- New struct `IdentitySettings` +- New struct `JavaComponent` +- New struct `JavaComponentConfigurationProperty` +- New struct `JavaComponentIngress` +- New struct `JavaComponentPropertiesScale` +- New struct `JavaComponentServiceBind` +- New struct `JavaComponentsCollection` +- New struct `LifecycleConfiguration` +- New struct `ManagedIdentitySetting` +- New struct `NfsAzureFileProperties` +- New struct `Runtime` +- New struct `RuntimeJava` +- New struct `ScaleConfiguration` +- New struct `SessionContainer` +- New struct `SessionContainerResources` +- New struct `SessionIngress` +- New struct `SessionNetworkConfiguration` +- New struct `SessionPool` +- New struct `SessionPoolCollection` +- New struct `SessionPoolProperties` +- New struct `SessionPoolSecret` +- New struct `SessionPoolUpdatableProperties` +- New struct `SessionPoolUpdatablePropertiesProperties` +- New struct `SessionRegistryCredentials` +- New struct `SpringBootAdminComponent` +- New struct `SpringCloudConfigComponent` +- New struct `SpringCloudEurekaComponent` +- New field `CertificateKeyVaultProperties` in struct `CertificateProperties` +- New field `IdentitySettings`, `Runtime` in struct `Configuration` +- New field `RunningStatus` in struct `ContainerAppProperties` +- New field `CertificateKeyVaultProperties` in struct `CustomDomainConfiguration` +- New field `Identity` in struct `CustomScaleRule` +- New field `Identity` in struct `HTTPScaleRule` +- New field `IdentitySettings` in struct `JobConfiguration` +- New field `Identity` in struct `JobScaleRule` +- New field `Identity` in struct `ManagedEnvironment` +- New field `NfsAzureFile` in struct `ManagedEnvironmentStorageProperties` +- New field `AccountName`, `Identity` in struct `QueueScaleRule` +- New field `CooldownPeriod`, `PollingInterval` in struct `Scale` +- New field `Identity` in struct `TCPScaleRule` + + +## 3.1.0-beta.1 (2024-10-23) +### Features Added + +- New value `StorageTypeNfsAzureFile`, `StorageTypeSmb` added to enum type `StorageType` +- New enum type `BuildProvisioningState` with values `BuildProvisioningStateCanceled`, `BuildProvisioningStateCreating`, `BuildProvisioningStateDeleting`, `BuildProvisioningStateFailed`, `BuildProvisioningStateSucceeded`, `BuildProvisioningStateUpdating` +- New enum type `BuildStatus` with values `BuildStatusCanceled`, `BuildStatusFailed`, `BuildStatusInProgress`, `BuildStatusNotStarted`, `BuildStatusSucceeded` +- New enum type `BuilderProvisioningState` with values `BuilderProvisioningStateCanceled`, `BuilderProvisioningStateCreating`, `BuilderProvisioningStateDeleting`, `BuilderProvisioningStateFailed`, `BuilderProvisioningStateSucceeded`, `BuilderProvisioningStateUpdating` +- New enum type `CertificateType` with values `CertificateTypeImagePullTrustedCA`, `CertificateTypeServerSSLCertificate` +- New enum type `ContainerType` with values `ContainerTypeCustomContainer`, `ContainerTypePythonLTS` +- New enum type `DetectionStatus` with values `DetectionStatusFailed`, `DetectionStatusRegistryLoginFailed`, `DetectionStatusSucceeded` +- New enum type `DotNetComponentProvisioningState` with values `DotNetComponentProvisioningStateCanceled`, `DotNetComponentProvisioningStateDeleting`, `DotNetComponentProvisioningStateFailed`, `DotNetComponentProvisioningStateInProgress`, `DotNetComponentProvisioningStateSucceeded` +- New enum type `DotNetComponentType` with values `DotNetComponentTypeAspireDashboard` +- New enum type `ExecutionType` with values `ExecutionTypeTimed` +- New enum type `IdentitySettingsLifeCycle` with values `IdentitySettingsLifeCycleAll`, `IdentitySettingsLifeCycleInit`, `IdentitySettingsLifeCycleMain`, `IdentitySettingsLifeCycleNone` +- New enum type `ImageType` with values `ImageTypeCloudBuild`, `ImageTypeContainerImage` +- New enum type `IngressTargetPortHTTPScheme` with values `IngressTargetPortHTTPSchemeHTTP`, `IngressTargetPortHTTPSchemeHTTPS` +- New enum type `JavaComponentProvisioningState` with values `JavaComponentProvisioningStateCanceled`, `JavaComponentProvisioningStateDeleting`, `JavaComponentProvisioningStateFailed`, `JavaComponentProvisioningStateInProgress`, `JavaComponentProvisioningStateSucceeded` +- New enum type `JavaComponentType` with values `JavaComponentTypeNacos`, `JavaComponentTypeSpringBootAdmin`, `JavaComponentTypeSpringCloudConfig`, `JavaComponentTypeSpringCloudEureka`, `JavaComponentTypeSpringCloudGateway` +- New enum type `JobRunningState` with values `JobRunningStateProgressing`, `JobRunningStateReady`, `JobRunningStateSuspended` +- New enum type `Kind` with values `KindWorkflowapp` +- New enum type `Level` with values `LevelDebug`, `LevelError`, `LevelInfo`, `LevelOff`, `LevelTrace`, `LevelWarn` +- New enum type `LogicAppsProxyMethod` with values `LogicAppsProxyMethodGET`, `LogicAppsProxyMethodPOST` +- New enum type `PatchApplyStatus` with values `PatchApplyStatusCanceled`, `PatchApplyStatusCreatingRevision`, `PatchApplyStatusImagePushPullFailed`, `PatchApplyStatusManuallySkipped`, `PatchApplyStatusNotStarted`, `PatchApplyStatusRebaseFailed`, `PatchApplyStatusRebaseInProgress`, `PatchApplyStatusRevisionCreationFailed`, `PatchApplyStatusSucceeded` +- New enum type `PatchType` with values `PatchTypeFrameworkAndOSSecurity`, `PatchTypeFrameworkSecurity`, `PatchTypeOSSecurity`, `PatchTypeOther` +- New enum type `PatchingMode` with values `PatchingModeAutomatic`, `PatchingModeDisabled`, `PatchingModeManual` +- New enum type `PoolManagementType` with values `PoolManagementTypeDynamic`, `PoolManagementTypeManual` +- New enum type `PrivateEndpointConnectionProvisioningState` with values `PrivateEndpointConnectionProvisioningStateCanceled`, `PrivateEndpointConnectionProvisioningStateDeleting`, `PrivateEndpointConnectionProvisioningStateFailed`, `PrivateEndpointConnectionProvisioningStatePending`, `PrivateEndpointConnectionProvisioningStateSucceeded`, `PrivateEndpointConnectionProvisioningStateUpdating`, `PrivateEndpointConnectionProvisioningStateWaiting` +- New enum type `PrivateEndpointServiceConnectionStatus` with values `PrivateEndpointServiceConnectionStatusApproved`, `PrivateEndpointServiceConnectionStatusDisconnected`, `PrivateEndpointServiceConnectionStatusPending`, `PrivateEndpointServiceConnectionStatusRejected` +- New enum type `PublicNetworkAccess` with values `PublicNetworkAccessDisabled`, `PublicNetworkAccessEnabled` +- New enum type `SessionNetworkStatus` with values `SessionNetworkStatusEgressDisabled`, `SessionNetworkStatusEgressEnabled` +- New enum type `SessionPoolProvisioningState` with values `SessionPoolProvisioningStateCanceled`, `SessionPoolProvisioningStateDeleting`, `SessionPoolProvisioningStateFailed`, `SessionPoolProvisioningStateInProgress`, `SessionPoolProvisioningStateSucceeded` +- New enum type `WorkflowHealthState` with values `WorkflowHealthStateHealthy`, `WorkflowHealthStateNotSpecified`, `WorkflowHealthStateUnhealthy`, `WorkflowHealthStateUnknown` +- New enum type `WorkflowState` with values `WorkflowStateCompleted`, `WorkflowStateDeleted`, `WorkflowStateDisabled`, `WorkflowStateEnabled`, `WorkflowStateNotSpecified`, `WorkflowStateSuspended` +- New function `NewAppResiliencyClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AppResiliencyClient, error)` +- New function `*AppResiliencyClient.CreateOrUpdate(context.Context, string, string, string, AppResiliency, *AppResiliencyClientCreateOrUpdateOptions) (AppResiliencyClientCreateOrUpdateResponse, error)` +- New function `*AppResiliencyClient.Delete(context.Context, string, string, string, *AppResiliencyClientDeleteOptions) (AppResiliencyClientDeleteResponse, error)` +- New function `*AppResiliencyClient.Get(context.Context, string, string, string, *AppResiliencyClientGetOptions) (AppResiliencyClientGetResponse, error)` +- New function `*AppResiliencyClient.NewListPager(string, string, *AppResiliencyClientListOptions) *runtime.Pager[AppResiliencyClientListResponse]` +- New function `*AppResiliencyClient.Update(context.Context, string, string, string, AppResiliency, *AppResiliencyClientUpdateOptions) (AppResiliencyClientUpdateResponse, error)` +- New function `NewBuildAuthTokenClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BuildAuthTokenClient, error)` +- New function `*BuildAuthTokenClient.List(context.Context, string, string, string, *BuildAuthTokenClientListOptions) (BuildAuthTokenClientListResponse, error)` +- New function `NewBuildersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BuildersClient, error)` +- New function `*BuildersClient.BeginCreateOrUpdate(context.Context, string, string, BuilderResource, *BuildersClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildersClientCreateOrUpdateResponse], error)` +- New function `*BuildersClient.BeginDelete(context.Context, string, string, *BuildersClientBeginDeleteOptions) (*runtime.Poller[BuildersClientDeleteResponse], error)` +- New function `*BuildersClient.Get(context.Context, string, string, *BuildersClientGetOptions) (BuildersClientGetResponse, error)` +- New function `*BuildersClient.NewListByResourceGroupPager(string, *BuildersClientListByResourceGroupOptions) *runtime.Pager[BuildersClientListByResourceGroupResponse]` +- New function `*BuildersClient.NewListBySubscriptionPager(*BuildersClientListBySubscriptionOptions) *runtime.Pager[BuildersClientListBySubscriptionResponse]` +- New function `*BuildersClient.BeginUpdate(context.Context, string, string, BuilderResourceUpdate, *BuildersClientBeginUpdateOptions) (*runtime.Poller[BuildersClientUpdateResponse], error)` +- New function `NewBuildsByBuilderResourceClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BuildsByBuilderResourceClient, error)` +- New function `*BuildsByBuilderResourceClient.NewListPager(string, string, *BuildsByBuilderResourceClientListOptions) *runtime.Pager[BuildsByBuilderResourceClientListResponse]` +- New function `NewBuildsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BuildsClient, error)` +- New function `*BuildsClient.BeginCreateOrUpdate(context.Context, string, string, string, BuildResource, *BuildsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildsClientCreateOrUpdateResponse], error)` +- New function `*BuildsClient.BeginDelete(context.Context, string, string, string, *BuildsClientBeginDeleteOptions) (*runtime.Poller[BuildsClientDeleteResponse], error)` +- New function `*BuildsClient.Get(context.Context, string, string, string, *BuildsClientGetOptions) (BuildsClientGetResponse, error)` +- New function `*ClientFactory.NewAppResiliencyClient() *AppResiliencyClient` +- New function `*ClientFactory.NewBuildAuthTokenClient() *BuildAuthTokenClient` +- New function `*ClientFactory.NewBuildersClient() *BuildersClient` +- New function `*ClientFactory.NewBuildsByBuilderResourceClient() *BuildsByBuilderResourceClient` +- New function `*ClientFactory.NewBuildsClient() *BuildsClient` +- New function `*ClientFactory.NewContainerAppsBuildsByContainerAppClient() *ContainerAppsBuildsByContainerAppClient` +- New function `*ClientFactory.NewContainerAppsBuildsClient() *ContainerAppsBuildsClient` +- New function `*ClientFactory.NewContainerAppsPatchesClient() *ContainerAppsPatchesClient` +- New function `*ClientFactory.NewContainerAppsSessionPoolsClient() *ContainerAppsSessionPoolsClient` +- New function `*ClientFactory.NewDaprComponentResiliencyPoliciesClient() *DaprComponentResiliencyPoliciesClient` +- New function `*ClientFactory.NewDaprSubscriptionsClient() *DaprSubscriptionsClient` +- New function `*ClientFactory.NewDotNetComponentsClient() *DotNetComponentsClient` +- New function `*ClientFactory.NewFunctionsExtensionClient() *FunctionsExtensionClient` +- New function `*ClientFactory.NewJavaComponentsClient() *JavaComponentsClient` +- New function `*ClientFactory.NewLogicAppsClient() *LogicAppsClient` +- New function `*ClientFactory.NewManagedEnvironmentPrivateEndpointConnectionsClient() *ManagedEnvironmentPrivateEndpointConnectionsClient` +- New function `*ClientFactory.NewManagedEnvironmentPrivateLinkResourcesClient() *ManagedEnvironmentPrivateLinkResourcesClient` +- New function `NewContainerAppsBuildsByContainerAppClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ContainerAppsBuildsByContainerAppClient, error)` +- New function `*ContainerAppsBuildsByContainerAppClient.NewListPager(string, string, *ContainerAppsBuildsByContainerAppClientListOptions) *runtime.Pager[ContainerAppsBuildsByContainerAppClientListResponse]` +- New function `NewContainerAppsBuildsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ContainerAppsBuildsClient, error)` +- New function `*ContainerAppsBuildsClient.BeginDelete(context.Context, string, string, string, *ContainerAppsBuildsClientBeginDeleteOptions) (*runtime.Poller[ContainerAppsBuildsClientDeleteResponse], error)` +- New function `*ContainerAppsBuildsClient.Get(context.Context, string, string, string, *ContainerAppsBuildsClientGetOptions) (ContainerAppsBuildsClientGetResponse, error)` +- New function `NewContainerAppsPatchesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ContainerAppsPatchesClient, error)` +- New function `*ContainerAppsPatchesClient.BeginApply(context.Context, string, string, string, *ContainerAppsPatchesClientBeginApplyOptions) (*runtime.Poller[ContainerAppsPatchesClientApplyResponse], error)` +- New function `*ContainerAppsPatchesClient.BeginDelete(context.Context, string, string, string, *ContainerAppsPatchesClientBeginDeleteOptions) (*runtime.Poller[ContainerAppsPatchesClientDeleteResponse], error)` +- New function `*ContainerAppsPatchesClient.Get(context.Context, string, string, string, *ContainerAppsPatchesClientGetOptions) (ContainerAppsPatchesClientGetResponse, error)` +- New function `*ContainerAppsPatchesClient.NewListByContainerAppPager(string, string, *ContainerAppsPatchesClientListByContainerAppOptions) *runtime.Pager[ContainerAppsPatchesClientListByContainerAppResponse]` +- New function `*ContainerAppsPatchesClient.BeginSkipConfigure(context.Context, string, string, string, PatchSkipConfig, *ContainerAppsPatchesClientBeginSkipConfigureOptions) (*runtime.Poller[ContainerAppsPatchesClientSkipConfigureResponse], error)` +- New function `NewContainerAppsSessionPoolsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ContainerAppsSessionPoolsClient, error)` +- New function `*ContainerAppsSessionPoolsClient.BeginCreateOrUpdate(context.Context, string, string, SessionPool, *ContainerAppsSessionPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ContainerAppsSessionPoolsClientCreateOrUpdateResponse], error)` +- New function `*ContainerAppsSessionPoolsClient.BeginDelete(context.Context, string, string, *ContainerAppsSessionPoolsClientBeginDeleteOptions) (*runtime.Poller[ContainerAppsSessionPoolsClientDeleteResponse], error)` +- New function `*ContainerAppsSessionPoolsClient.Get(context.Context, string, string, *ContainerAppsSessionPoolsClientGetOptions) (ContainerAppsSessionPoolsClientGetResponse, error)` +- New function `*ContainerAppsSessionPoolsClient.NewListByResourceGroupPager(string, *ContainerAppsSessionPoolsClientListByResourceGroupOptions) *runtime.Pager[ContainerAppsSessionPoolsClientListByResourceGroupResponse]` +- New function `*ContainerAppsSessionPoolsClient.NewListBySubscriptionPager(*ContainerAppsSessionPoolsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsSessionPoolsClientListBySubscriptionResponse]` +- New function `*ContainerAppsSessionPoolsClient.BeginUpdate(context.Context, string, string, SessionPoolUpdatableProperties, *ContainerAppsSessionPoolsClientBeginUpdateOptions) (*runtime.Poller[ContainerAppsSessionPoolsClientUpdateResponse], error)` +- New function `NewDaprComponentResiliencyPoliciesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DaprComponentResiliencyPoliciesClient, error)` +- New function `*DaprComponentResiliencyPoliciesClient.CreateOrUpdate(context.Context, string, string, string, string, DaprComponentResiliencyPolicy, *DaprComponentResiliencyPoliciesClientCreateOrUpdateOptions) (DaprComponentResiliencyPoliciesClientCreateOrUpdateResponse, error)` +- New function `*DaprComponentResiliencyPoliciesClient.Delete(context.Context, string, string, string, string, *DaprComponentResiliencyPoliciesClientDeleteOptions) (DaprComponentResiliencyPoliciesClientDeleteResponse, error)` +- New function `*DaprComponentResiliencyPoliciesClient.Get(context.Context, string, string, string, string, *DaprComponentResiliencyPoliciesClientGetOptions) (DaprComponentResiliencyPoliciesClientGetResponse, error)` +- New function `*DaprComponentResiliencyPoliciesClient.NewListPager(string, string, string, *DaprComponentResiliencyPoliciesClientListOptions) *runtime.Pager[DaprComponentResiliencyPoliciesClientListResponse]` +- New function `NewDaprSubscriptionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DaprSubscriptionsClient, error)` +- New function `*DaprSubscriptionsClient.CreateOrUpdate(context.Context, string, string, string, DaprSubscription, *DaprSubscriptionsClientCreateOrUpdateOptions) (DaprSubscriptionsClientCreateOrUpdateResponse, error)` +- New function `*DaprSubscriptionsClient.Delete(context.Context, string, string, string, *DaprSubscriptionsClientDeleteOptions) (DaprSubscriptionsClientDeleteResponse, error)` +- New function `*DaprSubscriptionsClient.Get(context.Context, string, string, string, *DaprSubscriptionsClientGetOptions) (DaprSubscriptionsClientGetResponse, error)` +- New function `*DaprSubscriptionsClient.NewListPager(string, string, *DaprSubscriptionsClientListOptions) *runtime.Pager[DaprSubscriptionsClientListResponse]` +- New function `NewDotNetComponentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DotNetComponentsClient, error)` +- New function `*DotNetComponentsClient.BeginCreateOrUpdate(context.Context, string, string, string, DotNetComponent, *DotNetComponentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DotNetComponentsClientCreateOrUpdateResponse], error)` +- New function `*DotNetComponentsClient.BeginDelete(context.Context, string, string, string, *DotNetComponentsClientBeginDeleteOptions) (*runtime.Poller[DotNetComponentsClientDeleteResponse], error)` +- New function `*DotNetComponentsClient.Get(context.Context, string, string, string, *DotNetComponentsClientGetOptions) (DotNetComponentsClientGetResponse, error)` +- New function `*DotNetComponentsClient.NewListPager(string, string, *DotNetComponentsClientListOptions) *runtime.Pager[DotNetComponentsClientListResponse]` +- New function `*DotNetComponentsClient.BeginUpdate(context.Context, string, string, string, DotNetComponent, *DotNetComponentsClientBeginUpdateOptions) (*runtime.Poller[DotNetComponentsClientUpdateResponse], error)` +- New function `NewFunctionsExtensionClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FunctionsExtensionClient, error)` +- New function `*FunctionsExtensionClient.InvokeFunctionsHost(context.Context, string, string, string, string, *FunctionsExtensionClientInvokeFunctionsHostOptions) (FunctionsExtensionClientInvokeFunctionsHostResponse, error)` +- New function `*JavaComponentProperties.GetJavaComponentProperties() *JavaComponentProperties` +- New function `NewJavaComponentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*JavaComponentsClient, error)` +- New function `*JavaComponentsClient.BeginCreateOrUpdate(context.Context, string, string, string, JavaComponent, *JavaComponentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JavaComponentsClientCreateOrUpdateResponse], error)` +- New function `*JavaComponentsClient.BeginDelete(context.Context, string, string, string, *JavaComponentsClientBeginDeleteOptions) (*runtime.Poller[JavaComponentsClientDeleteResponse], error)` +- New function `*JavaComponentsClient.Get(context.Context, string, string, string, *JavaComponentsClientGetOptions) (JavaComponentsClientGetResponse, error)` +- New function `*JavaComponentsClient.NewListPager(string, string, *JavaComponentsClientListOptions) *runtime.Pager[JavaComponentsClientListResponse]` +- New function `*JavaComponentsClient.BeginUpdate(context.Context, string, string, string, JavaComponent, *JavaComponentsClientBeginUpdateOptions) (*runtime.Poller[JavaComponentsClientUpdateResponse], error)` +- New function `*JobsClient.BeginResume(context.Context, string, string, *JobsClientBeginResumeOptions) (*runtime.Poller[JobsClientResumeResponse], error)` +- New function `*JobsClient.BeginSuspend(context.Context, string, string, *JobsClientBeginSuspendOptions) (*runtime.Poller[JobsClientSuspendResponse], error)` +- New function `NewLogicAppsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*LogicAppsClient, error)` +- New function `*LogicAppsClient.CreateOrUpdate(context.Context, string, string, string, LogicApp, *LogicAppsClientCreateOrUpdateOptions) (LogicAppsClientCreateOrUpdateResponse, error)` +- New function `*LogicAppsClient.Delete(context.Context, string, string, string, *LogicAppsClientDeleteOptions) (LogicAppsClientDeleteResponse, error)` +- New function `*LogicAppsClient.DeployWorkflowArtifacts(context.Context, string, string, string, *LogicAppsClientDeployWorkflowArtifactsOptions) (LogicAppsClientDeployWorkflowArtifactsResponse, error)` +- New function `*LogicAppsClient.Get(context.Context, string, string, string, *LogicAppsClientGetOptions) (LogicAppsClientGetResponse, error)` +- New function `*LogicAppsClient.GetWorkflow(context.Context, string, string, string, string, *LogicAppsClientGetWorkflowOptions) (LogicAppsClientGetWorkflowResponse, error)` +- New function `*LogicAppsClient.Invoke(context.Context, string, string, string, string, LogicAppsProxyMethod, *LogicAppsClientInvokeOptions) (LogicAppsClientInvokeResponse, error)` +- New function `*LogicAppsClient.ListWorkflowsConnections(context.Context, string, string, string, *LogicAppsClientListWorkflowsConnectionsOptions) (LogicAppsClientListWorkflowsConnectionsResponse, error)` +- New function `*LogicAppsClient.NewListWorkflowsPager(string, string, string, *LogicAppsClientListWorkflowsOptions) *runtime.Pager[LogicAppsClientListWorkflowsResponse]` +- New function `NewManagedEnvironmentPrivateEndpointConnectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedEnvironmentPrivateEndpointConnectionsClient, error)` +- New function `*ManagedEnvironmentPrivateEndpointConnectionsClient.BeginCreateOrUpdate(context.Context, string, string, string, PrivateEndpointConnection, *ManagedEnvironmentPrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedEnvironmentPrivateEndpointConnectionsClientCreateOrUpdateResponse], error)` +- New function `*ManagedEnvironmentPrivateEndpointConnectionsClient.BeginDelete(context.Context, string, string, string, *ManagedEnvironmentPrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[ManagedEnvironmentPrivateEndpointConnectionsClientDeleteResponse], error)` +- New function `*ManagedEnvironmentPrivateEndpointConnectionsClient.Get(context.Context, string, string, string, *ManagedEnvironmentPrivateEndpointConnectionsClientGetOptions) (ManagedEnvironmentPrivateEndpointConnectionsClientGetResponse, error)` +- New function `*ManagedEnvironmentPrivateEndpointConnectionsClient.NewListPager(string, string, *ManagedEnvironmentPrivateEndpointConnectionsClientListOptions) *runtime.Pager[ManagedEnvironmentPrivateEndpointConnectionsClientListResponse]` +- New function `NewManagedEnvironmentPrivateLinkResourcesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedEnvironmentPrivateLinkResourcesClient, error)` +- New function `*ManagedEnvironmentPrivateLinkResourcesClient.NewListPager(string, string, *ManagedEnvironmentPrivateLinkResourcesClientListOptions) *runtime.Pager[ManagedEnvironmentPrivateLinkResourcesClientListResponse]` +- New function `*SpringBootAdminComponent.GetJavaComponentProperties() *JavaComponentProperties` +- New function `*SpringCloudConfigComponent.GetJavaComponentProperties() *JavaComponentProperties` +- New function `*SpringCloudEurekaComponent.GetJavaComponentProperties() *JavaComponentProperties` +- New function `*SpringCloudGatewayComponent.GetJavaComponentProperties() *JavaComponentProperties` +- New function `*NacosComponent.GetJavaComponentProperties() *JavaComponentProperties` +- New struct `AppInsightsConfiguration` +- New struct `AppResiliency` +- New struct `AppResiliencyCollection` +- New struct `AppResiliencyProperties` +- New struct `BuildCollection` +- New struct `BuildConfiguration` +- New struct `BuildProperties` +- New struct `BuildResource` +- New struct `BuildToken` +- New struct `BuilderCollection` +- New struct `BuilderProperties` +- New struct `BuilderResource` +- New struct `BuilderResourceUpdate` +- New struct `BuilderResourceUpdateProperties` +- New struct `CertificateKeyVaultProperties` +- New struct `CircuitBreakerPolicy` +- New struct `ContainerAppPropertiesPatchingConfiguration` +- New struct `ContainerAppsBuildCollection` +- New struct `ContainerAppsBuildConfiguration` +- New struct `ContainerAppsBuildProperties` +- New struct `ContainerAppsBuildResource` +- New struct `ContainerAppsPatchResource` +- New struct `ContainerExecutionStatus` +- New struct `ContainerRegistry` +- New struct `ContainerRegistryWithCustomImage` +- New struct `CustomContainerTemplate` +- New struct `DaprComponentResiliencyPoliciesCollection` +- New struct `DaprComponentResiliencyPolicy` +- New struct `DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration` +- New struct `DaprComponentResiliencyPolicyConfiguration` +- New struct `DaprComponentResiliencyPolicyHTTPRetryBackOffConfiguration` +- New struct `DaprComponentResiliencyPolicyHTTPRetryPolicyConfiguration` +- New struct `DaprComponentResiliencyPolicyProperties` +- New struct `DaprComponentResiliencyPolicyTimeoutPolicyConfiguration` +- New struct `DaprComponentServiceBinding` +- New struct `DaprServiceBindMetadata` +- New struct `DaprSubscription` +- New struct `DaprSubscriptionBulkSubscribeOptions` +- New struct `DaprSubscriptionProperties` +- New struct `DaprSubscriptionRouteRule` +- New struct `DaprSubscriptionRoutes` +- New struct `DaprSubscriptionsCollection` +- New struct `DataDogConfiguration` +- New struct `DestinationsConfiguration` +- New struct `DotNetComponent` +- New struct `DotNetComponentConfigurationProperty` +- New struct `DotNetComponentProperties` +- New struct `DotNetComponentServiceBind` +- New struct `DotNetComponentsCollection` +- New struct `DynamicPoolConfiguration` +- New struct `EnvironmentVariable` +- New struct `ErrorEntity` +- New struct `ExecutionStatus` +- New struct `HTTPConnectionPool` +- New struct `HTTPGet` +- New struct `HTTPRetryPolicy` +- New struct `HTTPRetryPolicyMatches` +- New struct `HTTPRetryPolicyRetryBackOff` +- New struct `Header` +- New struct `HeaderMatch` +- New struct `HeaderMatchMatch` +- New struct `IdentitySettings` +- New struct `JavaComponent` +- New struct `JavaComponentConfigurationProperty` +- New struct `JavaComponentIngress` +- New struct `JavaComponentPropertiesScale` +- New struct `JavaComponentServiceBind` +- New struct `JavaComponentsCollection` +- New struct `LoggerSetting` +- New struct `LogicApp` +- New struct `LogsConfiguration` +- New struct `MetricsConfiguration` +- New struct `NacosComponent` +- New struct `NfsAzureFileProperties` +- New struct `OpenTelemetryConfiguration` +- New struct `OtlpConfiguration` +- New struct `PatchCollection` +- New struct `PatchDetails` +- New struct `PatchDetailsNewLayer` +- New struct `PatchDetailsOldLayer` +- New struct `PatchProperties` +- New struct `PatchSkipConfig` +- New struct `PreBuildStep` +- New struct `PrivateEndpoint` +- New struct `PrivateEndpointConnection` +- New struct `PrivateEndpointConnectionListResult` +- New struct `PrivateEndpointConnectionProperties` +- New struct `PrivateLinkResource` +- New struct `PrivateLinkResourceListResult` +- New struct `PrivateLinkResourceProperties` +- New struct `PrivateLinkServiceConnectionState` +- New struct `ReplicaExecutionStatus` +- New struct `Runtime` +- New struct `RuntimeDotnet` +- New struct `RuntimeJava` +- New struct `RuntimeJavaAgent` +- New struct `RuntimeJavaAgentLogging` +- New struct `ScaleConfiguration` +- New struct `ScgRoute` +- New struct `SessionContainer` +- New struct `SessionContainerResources` +- New struct `SessionIngress` +- New struct `SessionNetworkConfiguration` +- New struct `SessionPool` +- New struct `SessionPoolCollection` +- New struct `SessionPoolProperties` +- New struct `SessionPoolSecret` +- New struct `SessionPoolUpdatableProperties` +- New struct `SessionPoolUpdatablePropertiesProperties` +- New struct `SessionRegistryCredentials` +- New struct `SmbStorage` +- New struct `SpringBootAdminComponent` +- New struct `SpringCloudConfigComponent` +- New struct `SpringCloudEurekaComponent` +- New struct `SpringCloudGatewayComponent` +- New struct `TCPConnectionPool` +- New struct `TCPRetryPolicy` +- New struct `TimeoutPolicy` +- New struct `TracesConfiguration` +- New struct `WorkflowArtifacts` +- New struct `WorkflowEnvelope` +- New struct `WorkflowEnvelopeCollection` +- New struct `WorkflowEnvelopeProperties` +- New struct `WorkflowHealth` +- New field `ImageType` in struct `BaseContainer` +- New field `CertificateKeyVaultProperties`, `CertificateType` in struct `CertificateProperties` +- New field `IdentitySettings`, `Runtime` in struct `Configuration` +- New field `Smb` in struct `ConnectedEnvironmentStorageProperties` +- New field `ImageType` in struct `Container` +- New field `Kind` in struct `ContainerApp` +- New field `DeploymentErrors`, `PatchingConfiguration` in struct `ContainerAppProperties` +- New field `XMSGithubAuxiliary` in struct `ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions` +- New field `DeleteWorkflow`, `IgnoreWorkflowDeletionFailure`, `XMSGithubAuxiliary` in struct `ContainerAppsSourceControlsClientBeginDeleteOptions` +- New field `CertificateKeyVaultProperties` in struct `CustomDomainConfiguration` +- New field `Identity` in struct `CustomScaleRule` +- New field `ServiceComponentBind` in struct `DaprComponentProperties` +- New field `BuildEnvironmentVariables`, `DockerfilePath` in struct `GithubActionConfiguration` +- New field `Identity` in struct `HTTPScaleRule` +- New field `TargetPortHTTPScheme` in struct `Ingress` +- New field `ImageType` in struct `InitContainer` +- New field `ExtendedLocation` in struct `Job` +- New field `IdentitySettings` in struct `JobConfiguration` +- New field `DetailedStatus` in struct `JobExecutionProperties` +- New field `ExtendedLocation` in struct `JobPatchProperties` +- New field `RunningState` in struct `JobProperties` +- New field `Identity` in struct `JobScaleRule` +- New field `DynamicJSONColumns` in struct `LogAnalyticsConfiguration` +- New field `Identity` in struct `ManagedEnvironment` +- New field `AppInsightsConfiguration`, `OpenTelemetryConfiguration`, `PrivateEndpointConnections`, `PublicNetworkAccess` in struct `ManagedEnvironmentProperties` +- New field `NfsAzureFile` in struct `ManagedEnvironmentStorageProperties` +- New field `AccountName`, `Identity` in struct `QueueScaleRule` +- New field `DebugEndpoint` in struct `ReplicaContainer` +- New field `CooldownPeriod`, `PollingInterval` in struct `Scale` +- New field `ClientType`, `CustomizedKeys` in struct `ServiceBind` +- New field `Identity` in struct `TCPScaleRule` +- New field `EnableFips` in struct `WorkloadProfile` + + ## 3.0.0 (2024-08-23) ### Breaking Changes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/README.md index 0b7e3b42..8303325a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/README.md @@ -1,7 +1,5 @@ # Azure Container Apps Module for Go -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3) - The `armappcontainers` module provides operations for working with Azure Container Apps. [Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/appcontainers/armappcontainers) @@ -11,7 +9,7 @@ The `armappcontainers` module provides operations for working with Azure Contain ## Prerequisites - an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) +- [Supported](https://aka.ms/azsdk/go/supported-versions) version of Go (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) ## Install the package @@ -25,7 +23,7 @@ go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armap ## Authorization -When creating a client, you will need to provide a credential for authenticating with Azure Container Apps. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. +When creating a client, you will need to provide a credential for authenticating with Azure Container Apps. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. ```go cred, err := azidentity.NewDefaultAzureCredential(nil) @@ -54,7 +52,7 @@ clientFactory, err := armappcontainers.NewClientFactory(, cred, ## Clients -A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. ```go client := clientFactory.NewAvailableWorkloadProfilesClient() @@ -89,4 +87,4 @@ This project has adopted the For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file +additional questions or comments. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/autorest.md index f1ee2235..6fb5c37f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/edf14cc0a577f6b9c4e3ce018cec0c383e64b7b0/specification/app/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/edf14cc0a577f6b9c4e3ce018cec0c383e64b7b0/specification/app/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/8eb3f7a4f66d408152c32b9d647e59147172d533/specification/app/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/8eb3f7a4f66d408152c32b9d647e59147172d533/specification/app/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 3.0.0 -tag: package-2024-03 +module-version: 3.1.0 +tag: package-2025-01-01 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/availableworkloadprofiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/availableworkloadprofiles_client.go index 21baadf8..d48aedc8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/availableworkloadprofiles_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/availableworkloadprofiles_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -45,7 +42,7 @@ func NewAvailableWorkloadProfilesClient(subscriptionID string, credential azcore // NewGetPager - Get all available workload profiles for a location. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - location - The name of Azure region. // - options - AvailableWorkloadProfilesClientGetOptions contains the optional parameters for the AvailableWorkloadProfilesClient.NewGetPager // method. @@ -73,7 +70,7 @@ func (client *AvailableWorkloadProfilesClient) NewGetPager(location string, opti } // getCreateRequest creates the Get request. -func (client *AvailableWorkloadProfilesClient) getCreateRequest(ctx context.Context, location string, options *AvailableWorkloadProfilesClientGetOptions) (*policy.Request, error) { +func (client *AvailableWorkloadProfilesClient) getCreateRequest(ctx context.Context, location string, _ *AvailableWorkloadProfilesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/availableManagedEnvironmentsWorkloadProfileTypes" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -88,7 +85,7 @@ func (client *AvailableWorkloadProfilesClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/billingmeters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/billingmeters_client.go index f37f0302..38ac0a18 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/billingmeters_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/billingmeters_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewBillingMetersClient(subscriptionID string, credential azcore.TokenCreden // Get - Get all billingMeters for a location. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - location - The name of Azure region. // - options - BillingMetersClientGetOptions contains the optional parameters for the BillingMetersClient.Get method. func (client *BillingMetersClient) Get(ctx context.Context, location string, options *BillingMetersClientGetOptions) (BillingMetersClientGetResponse, error) { @@ -72,7 +69,7 @@ func (client *BillingMetersClient) Get(ctx context.Context, location string, opt } // getCreateRequest creates the Get request. -func (client *BillingMetersClient) getCreateRequest(ctx context.Context, location string, options *BillingMetersClientGetOptions) (*policy.Request, error) { +func (client *BillingMetersClient) getCreateRequest(ctx context.Context, location string, _ *BillingMetersClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/billingMeters" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -87,7 +84,7 @@ func (client *BillingMetersClient) getCreateRequest(ctx context.Context, locatio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/certificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/certificates_client.go index ce119708..f3cd97dc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/certificates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/certificates_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Create or Update a Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -98,7 +95,7 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.CertificateEnvelope != nil { @@ -122,7 +119,7 @@ func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Deletes the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -149,7 +146,7 @@ func (client *CertificatesClient) Delete(ctx context.Context, resourceGroupName } // deleteCreateRequest creates the Delete request. -func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, certificateName string, options *CertificatesClientDeleteOptions) (*policy.Request, error) { +func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, certificateName string, _ *CertificatesClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -172,7 +169,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -181,7 +178,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // Get - Get the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -209,7 +206,7 @@ func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName str } // getCreateRequest creates the Get request. -func (client *CertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, certificateName string, options *CertificatesClientGetOptions) (*policy.Request, error) { +func (client *CertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, certificateName string, _ *CertificatesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -232,7 +229,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +246,7 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif // NewListPager - Get the Certificates in a given managed environment. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. @@ -277,7 +274,7 @@ func (client *CertificatesClient) NewListPager(resourceGroupName string, environ } // listCreateRequest creates the List request. -func (client *CertificatesClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *CertificatesClientListOptions) (*policy.Request, error) { +func (client *CertificatesClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *CertificatesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -296,7 +293,7 @@ func (client *CertificatesClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -314,7 +311,7 @@ func (client *CertificatesClient) listHandleResponse(resp *http.Response) (Certi // Update - Patches a certificate. Currently only patching of tags is supported // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - certificateName - Name of the Certificate. @@ -343,7 +340,7 @@ func (client *CertificatesClient) Update(ctx context.Context, resourceGroupName } // updateCreateRequest creates the Update request. -func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, certificateName string, certificateEnvelope CertificatePatch, options *CertificatesClientUpdateOptions) (*policy.Request, error) { +func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, certificateName string, certificateEnvelope CertificatePatch, _ *CertificatesClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -366,7 +363,7 @@ func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, certificateEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/ci.yml index 7f14759f..42fc70d6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/ci.yml +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/ci.yml @@ -24,5 +24,4 @@ pr: extends: template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml parameters: - IncludeRelease: true ServiceDirectory: 'resourcemanager/appcontainers/armappcontainers' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/client_factory.go index 8ae89003..349c7472 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/client_factory.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -140,6 +137,14 @@ func (c *ClientFactory) NewContainerAppsRevisionsClient() *ContainerAppsRevision } } +// NewContainerAppsSessionPoolsClient creates a new instance of ContainerAppsSessionPoolsClient. +func (c *ClientFactory) NewContainerAppsSessionPoolsClient() *ContainerAppsSessionPoolsClient { + return &ContainerAppsSessionPoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + // NewContainerAppsSourceControlsClient creates a new instance of ContainerAppsSourceControlsClient. func (c *ClientFactory) NewContainerAppsSourceControlsClient() *ContainerAppsSourceControlsClient { return &ContainerAppsSourceControlsClient{ @@ -156,6 +161,14 @@ func (c *ClientFactory) NewDaprComponentsClient() *DaprComponentsClient { } } +// NewJavaComponentsClient creates a new instance of JavaComponentsClient. +func (c *ClientFactory) NewJavaComponentsClient() *JavaComponentsClient { + return &JavaComponentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + // NewJobsClient creates a new instance of JobsClient. func (c *ClientFactory) NewJobsClient() *JobsClient { return &JobsClient{ diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironments_client.go index 6312b07c..e2c52cab 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironments_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewConnectedEnvironmentsClient(subscriptionID string, credential azcore.Tok // CheckNameAvailability - Checks if resource connectedEnvironmentName is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Managed Environment. // - checkNameAvailabilityRequest - The check connectedEnvironmentName availability request. @@ -75,7 +72,7 @@ func (client *ConnectedEnvironmentsClient) CheckNameAvailability(ctx context.Con } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *ConnectedEnvironmentsClient) checkNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, checkNameAvailabilityRequest CheckNameAvailabilityRequest, options *ConnectedEnvironmentsClientCheckNameAvailabilityOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsClient) checkNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, checkNameAvailabilityRequest CheckNameAvailabilityRequest, _ *ConnectedEnvironmentsClientCheckNameAvailabilityOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/checkNameAvailability" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -94,7 +91,7 @@ func (client *ConnectedEnvironmentsClient) checkNameAvailabilityCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, checkNameAvailabilityRequest); err != nil { @@ -115,7 +112,7 @@ func (client *ConnectedEnvironmentsClient) checkNameAvailabilityHandleResponse(r // BeginCreateOrUpdate - Creates or updates an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - environmentEnvelope - Configuration details of the connectedEnvironment. @@ -142,7 +139,7 @@ func (client *ConnectedEnvironmentsClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Creates or updates an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ConnectedEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, environmentEnvelope ConnectedEnvironment, options *ConnectedEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ConnectedEnvironmentsClient.BeginCreateOrUpdate" @@ -165,7 +162,7 @@ func (client *ConnectedEnvironmentsClient) createOrUpdate(ctx context.Context, r } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConnectedEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, environmentEnvelope ConnectedEnvironment, options *ConnectedEnvironmentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, environmentEnvelope ConnectedEnvironment, _ *ConnectedEnvironmentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -184,7 +181,7 @@ func (client *ConnectedEnvironmentsClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, environmentEnvelope); err != nil { @@ -196,7 +193,7 @@ func (client *ConnectedEnvironmentsClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Delete an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - options - ConnectedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginDelete @@ -222,7 +219,7 @@ func (client *ConnectedEnvironmentsClient) BeginDelete(ctx context.Context, reso // Delete - Delete an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ConnectedEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ConnectedEnvironmentsClient.BeginDelete" @@ -245,7 +242,7 @@ func (client *ConnectedEnvironmentsClient) deleteOperation(ctx context.Context, } // deleteCreateRequest creates the Delete request. -func (client *ConnectedEnvironmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientBeginDeleteOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, _ *ConnectedEnvironmentsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -264,7 +261,7 @@ func (client *ConnectedEnvironmentsClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -273,7 +270,7 @@ func (client *ConnectedEnvironmentsClient) deleteCreateRequest(ctx context.Conte // Get - Get the properties of an connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - options - ConnectedEnvironmentsClientGetOptions contains the optional parameters for the ConnectedEnvironmentsClient.Get @@ -301,7 +298,7 @@ func (client *ConnectedEnvironmentsClient) Get(ctx context.Context, resourceGrou } // getCreateRequest creates the Get request. -func (client *ConnectedEnvironmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientGetOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, _ *ConnectedEnvironmentsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -320,7 +317,7 @@ func (client *ConnectedEnvironmentsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -337,7 +334,7 @@ func (client *ConnectedEnvironmentsClient) getHandleResponse(resp *http.Response // NewListByResourceGroupPager - Get all connectedEnvironments in a resource group. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ConnectedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListByResourceGroupPager // method. @@ -365,7 +362,7 @@ func (client *ConnectedEnvironmentsClient) NewListByResourceGroupPager(resourceG } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ConnectedEnvironmentsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ConnectedEnvironmentsClientListByResourceGroupOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *ConnectedEnvironmentsClientListByResourceGroupOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -380,7 +377,7 @@ func (client *ConnectedEnvironmentsClient) listByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -397,7 +394,7 @@ func (client *ConnectedEnvironmentsClient) listByResourceGroupHandleResponse(res // NewListBySubscriptionPager - Get all connectedEnvironments for a subscription. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - options - ConnectedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ConnectedEnvironmentsClient.NewListBySubscriptionPager // method. func (client *ConnectedEnvironmentsClient) NewListBySubscriptionPager(options *ConnectedEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[ConnectedEnvironmentsClientListBySubscriptionResponse] { @@ -424,7 +421,7 @@ func (client *ConnectedEnvironmentsClient) NewListBySubscriptionPager(options *C } // listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ConnectedEnvironmentsClient) listBySubscriptionCreateRequest(ctx context.Context, options *ConnectedEnvironmentsClientListBySubscriptionOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsClient) listBySubscriptionCreateRequest(ctx context.Context, _ *ConnectedEnvironmentsClientListBySubscriptionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/connectedEnvironments" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -435,7 +432,7 @@ func (client *ConnectedEnvironmentsClient) listBySubscriptionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -453,7 +450,7 @@ func (client *ConnectedEnvironmentsClient) listBySubscriptionHandleResponse(resp // Update - Patches a Managed Environment. Only patching of tags is supported currently // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connectedEnvironment. // - options - ConnectedEnvironmentsClientUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.Update @@ -481,7 +478,7 @@ func (client *ConnectedEnvironmentsClient) Update(ctx context.Context, resourceG } // updateCreateRequest creates the Update request. -func (client *ConnectedEnvironmentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsClientUpdateOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, _ *ConnectedEnvironmentsClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -500,7 +497,7 @@ func (client *ConnectedEnvironmentsClient) updateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentscertificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentscertificates_client.go index 2592a559..3ebf29ca 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentscertificates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentscertificates_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewConnectedEnvironmentsCertificatesClient(subscriptionID string, credentia // CreateOrUpdate - Create or Update a Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. @@ -98,7 +95,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) createOrUpdateCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.CertificateEnvelope != nil { @@ -122,7 +119,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) createOrUpdateHandleRespo // Delete - Deletes the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. @@ -150,7 +147,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) Delete(ctx context.Contex } // deleteCreateRequest creates the Delete request. -func (client *ConnectedEnvironmentsCertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientDeleteOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsCertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, _ *ConnectedEnvironmentsCertificatesClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -173,7 +170,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) deleteCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +179,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) deleteCreateRequest(ctx c // Get - Get the specified Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. @@ -211,7 +208,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) Get(ctx context.Context, } // getCreateRequest creates the Get request. -func (client *ConnectedEnvironmentsCertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, options *ConnectedEnvironmentsCertificatesClientGetOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsCertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, _ *ConnectedEnvironmentsCertificatesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -234,7 +231,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) getCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -251,7 +248,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) getHandleResponse(resp *h // NewListPager - Get the Certificates in a given connected environment. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - options - ConnectedEnvironmentsCertificatesClientListOptions contains the optional parameters for the ConnectedEnvironmentsCertificatesClient.NewListPager @@ -280,7 +277,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) NewListPager(resourceGrou } // listCreateRequest creates the List request. -func (client *ConnectedEnvironmentsCertificatesClient) listCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsCertificatesClientListOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsCertificatesClient) listCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, _ *ConnectedEnvironmentsCertificatesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -299,7 +296,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) listCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,7 +314,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) listHandleResponse(resp * // Update - Patches a certificate. Currently only patching of tags is supported // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Connected Environment. // - certificateName - Name of the Certificate. @@ -347,7 +344,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) Update(ctx context.Contex } // updateCreateRequest creates the Update request. -func (client *ConnectedEnvironmentsCertificatesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, certificateEnvelope CertificatePatch, options *ConnectedEnvironmentsCertificatesClientUpdateOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsCertificatesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, certificateName string, certificateEnvelope CertificatePatch, _ *ConnectedEnvironmentsCertificatesClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -370,7 +367,7 @@ func (client *ConnectedEnvironmentsCertificatesClient) updateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, certificateEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsdaprcomponents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsdaprcomponents_client.go index 2ef2184e..8db43027 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsdaprcomponents_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsdaprcomponents_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewConnectedEnvironmentsDaprComponentsClient(subscriptionID string, credent // CreateOrUpdate - Creates or updates a Dapr Component in a connected environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. @@ -76,7 +73,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) CreateOrUpdate(ctx cont } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConnectedEnvironmentsDaprComponentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, daprComponentEnvelope DaprComponent, options *ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsDaprComponentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, daprComponentEnvelope DaprComponent, _ *ConnectedEnvironmentsDaprComponentsClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -99,7 +96,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) createOrUpdateCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, daprComponentEnvelope); err != nil { @@ -120,7 +117,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) createOrUpdateHandleRes // Delete - Delete a Dapr Component from a connected environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. @@ -148,7 +145,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) Delete(ctx context.Cont } // deleteCreateRequest creates the Delete request. -func (client *ConnectedEnvironmentsDaprComponentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientDeleteOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsDaprComponentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, _ *ConnectedEnvironmentsDaprComponentsClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -171,7 +168,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) deleteCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +177,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) deleteCreateRequest(ctx // Get - Get a dapr component. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. @@ -209,7 +206,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) Get(ctx context.Context } // getCreateRequest creates the Get request. -func (client *ConnectedEnvironmentsDaprComponentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientGetOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsDaprComponentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, _ *ConnectedEnvironmentsDaprComponentsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -232,7 +229,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) getCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +246,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) getHandleResponse(resp // NewListPager - Get the Dapr Components for a connected environment. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - options - ConnectedEnvironmentsDaprComponentsClientListOptions contains the optional parameters for the ConnectedEnvironmentsDaprComponentsClient.NewListPager @@ -278,7 +275,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) NewListPager(resourceGr } // listCreateRequest creates the List request. -func (client *ConnectedEnvironmentsDaprComponentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsDaprComponentsClientListOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsDaprComponentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, _ *ConnectedEnvironmentsDaprComponentsClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -297,7 +294,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) listCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -315,7 +312,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) listHandleResponse(resp // ListSecrets - List secrets for a dapr component // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the connected environment. // - componentName - Name of the Dapr Component. @@ -344,7 +341,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) ListSecrets(ctx context } // listSecretsCreateRequest creates the ListSecrets request. -func (client *ConnectedEnvironmentsDaprComponentsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, options *ConnectedEnvironmentsDaprComponentsClientListSecretsOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsDaprComponentsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, componentName string, _ *ConnectedEnvironmentsDaprComponentsClientListSecretsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}/listSecrets" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -367,7 +364,7 @@ func (client *ConnectedEnvironmentsDaprComponentsClient) listSecretsCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsstorages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsstorages_client.go index 8e4441a0..867e2d52 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsstorages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/connectedenvironmentsstorages_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewConnectedEnvironmentsStoragesClient(subscriptionID string, credential az // CreateOrUpdate - Create or update storage for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - storageName - Name of the storage. @@ -76,7 +73,7 @@ func (client *ConnectedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Co } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConnectedEnvironmentsStoragesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, storageEnvelope ConnectedEnvironmentStorage, options *ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsStoragesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, storageEnvelope ConnectedEnvironmentStorage, _ *ConnectedEnvironmentsStoragesClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -99,7 +96,7 @@ func (client *ConnectedEnvironmentsStoragesClient) createOrUpdateCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, storageEnvelope); err != nil { @@ -120,7 +117,7 @@ func (client *ConnectedEnvironmentsStoragesClient) createOrUpdateHandleResponse( // Delete - Delete storage for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - storageName - Name of the storage. @@ -148,7 +145,7 @@ func (client *ConnectedEnvironmentsStoragesClient) Delete(ctx context.Context, r } // deleteCreateRequest creates the Delete request. -func (client *ConnectedEnvironmentsStoragesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, options *ConnectedEnvironmentsStoragesClientDeleteOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsStoragesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, _ *ConnectedEnvironmentsStoragesClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -171,7 +168,7 @@ func (client *ConnectedEnvironmentsStoragesClient) deleteCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +177,7 @@ func (client *ConnectedEnvironmentsStoragesClient) deleteCreateRequest(ctx conte // Get - Get storage for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - storageName - Name of the storage. @@ -209,7 +206,7 @@ func (client *ConnectedEnvironmentsStoragesClient) Get(ctx context.Context, reso } // getCreateRequest creates the Get request. -func (client *ConnectedEnvironmentsStoragesClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, options *ConnectedEnvironmentsStoragesClientGetOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsStoragesClient) getCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, storageName string, _ *ConnectedEnvironmentsStoragesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -232,7 +229,7 @@ func (client *ConnectedEnvironmentsStoragesClient) getCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +247,7 @@ func (client *ConnectedEnvironmentsStoragesClient) getHandleResponse(resp *http. // List - Get all storages for a connectedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - connectedEnvironmentName - Name of the Environment. // - options - ConnectedEnvironmentsStoragesClientListOptions contains the optional parameters for the ConnectedEnvironmentsStoragesClient.List @@ -278,7 +275,7 @@ func (client *ConnectedEnvironmentsStoragesClient) List(ctx context.Context, res } // listCreateRequest creates the List request. -func (client *ConnectedEnvironmentsStoragesClient) listCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, options *ConnectedEnvironmentsStoragesClientListOptions) (*policy.Request, error) { +func (client *ConnectedEnvironmentsStoragesClient) listCreateRequest(ctx context.Context, resourceGroupName string, connectedEnvironmentName string, _ *ConnectedEnvironmentsStoragesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -297,7 +294,7 @@ func (client *ConnectedEnvironmentsStoragesClient) listCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/constants.go index b1cf2808..a1d4dbf0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/constants.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -10,7 +7,7 @@ package armappcontainers const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers" - moduleVersion = "v3.0.0" + moduleVersion = "v3.1.0" ) // AccessMode - Access mode for storage @@ -251,6 +248,49 @@ func PossibleContainerAppReplicaRunningStateValues() []ContainerAppReplicaRunnin } } +// ContainerAppRunningStatus - Running status of the Container App. +type ContainerAppRunningStatus string + +const ( + // ContainerAppRunningStatusProgressing - Container App is transitioning between Stopped and Running states. + ContainerAppRunningStatusProgressing ContainerAppRunningStatus = "Progressing" + // ContainerAppRunningStatusReady - Container App Job is in Ready state. + ContainerAppRunningStatusReady ContainerAppRunningStatus = "Ready" + // ContainerAppRunningStatusRunning - Container App is in Running state. + ContainerAppRunningStatusRunning ContainerAppRunningStatus = "Running" + // ContainerAppRunningStatusStopped - Container App is in Stopped state. + ContainerAppRunningStatusStopped ContainerAppRunningStatus = "Stopped" + // ContainerAppRunningStatusSuspended - Container App Job is in Suspended state. + ContainerAppRunningStatusSuspended ContainerAppRunningStatus = "Suspended" +) + +// PossibleContainerAppRunningStatusValues returns the possible values for the ContainerAppRunningStatus const type. +func PossibleContainerAppRunningStatusValues() []ContainerAppRunningStatus { + return []ContainerAppRunningStatus{ + ContainerAppRunningStatusProgressing, + ContainerAppRunningStatusReady, + ContainerAppRunningStatusRunning, + ContainerAppRunningStatusStopped, + ContainerAppRunningStatusSuspended, + } +} + +// ContainerType - The container type of the sessions. +type ContainerType string + +const ( + ContainerTypeCustomContainer ContainerType = "CustomContainer" + ContainerTypePythonLTS ContainerType = "PythonLTS" +) + +// PossibleContainerTypeValues returns the possible values for the ContainerType const type. +func PossibleContainerTypeValues() []ContainerType { + return []ContainerType{ + ContainerTypeCustomContainer, + ContainerTypePythonLTS, + } +} + // CookieExpirationConvention - The convention used when determining the session cookie's expiration. type CookieExpirationConvention string @@ -369,6 +409,27 @@ func PossibleForwardProxyConventionValues() []ForwardProxyConvention { } } +// IdentitySettingsLifeCycle - Use to select the lifecycle stages of a Container App during which the Managed Identity should +// be available. +type IdentitySettingsLifeCycle string + +const ( + IdentitySettingsLifeCycleAll IdentitySettingsLifeCycle = "All" + IdentitySettingsLifeCycleInit IdentitySettingsLifeCycle = "Init" + IdentitySettingsLifeCycleMain IdentitySettingsLifeCycle = "Main" + IdentitySettingsLifeCycleNone IdentitySettingsLifeCycle = "None" +) + +// PossibleIdentitySettingsLifeCycleValues returns the possible values for the IdentitySettingsLifeCycle const type. +func PossibleIdentitySettingsLifeCycleValues() []IdentitySettingsLifeCycle { + return []IdentitySettingsLifeCycle{ + IdentitySettingsLifeCycleAll, + IdentitySettingsLifeCycleInit, + IdentitySettingsLifeCycleMain, + IdentitySettingsLifeCycleNone, + } +} + // IngressClientCertificateMode - Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate // on forwarding. Accept indicates server forwards client certificate but does not require a client // certificate. Require indicates server requires a client certificate. @@ -409,6 +470,46 @@ func PossibleIngressTransportMethodValues() []IngressTransportMethod { } } +// JavaComponentProvisioningState - Provisioning state of the Java Component. +type JavaComponentProvisioningState string + +const ( + JavaComponentProvisioningStateCanceled JavaComponentProvisioningState = "Canceled" + JavaComponentProvisioningStateDeleting JavaComponentProvisioningState = "Deleting" + JavaComponentProvisioningStateFailed JavaComponentProvisioningState = "Failed" + JavaComponentProvisioningStateInProgress JavaComponentProvisioningState = "InProgress" + JavaComponentProvisioningStateSucceeded JavaComponentProvisioningState = "Succeeded" +) + +// PossibleJavaComponentProvisioningStateValues returns the possible values for the JavaComponentProvisioningState const type. +func PossibleJavaComponentProvisioningStateValues() []JavaComponentProvisioningState { + return []JavaComponentProvisioningState{ + JavaComponentProvisioningStateCanceled, + JavaComponentProvisioningStateDeleting, + JavaComponentProvisioningStateFailed, + JavaComponentProvisioningStateInProgress, + JavaComponentProvisioningStateSucceeded, + } +} + +// JavaComponentType - Type of the Java Component. +type JavaComponentType string + +const ( + JavaComponentTypeSpringBootAdmin JavaComponentType = "SpringBootAdmin" + JavaComponentTypeSpringCloudConfig JavaComponentType = "SpringCloudConfig" + JavaComponentTypeSpringCloudEureka JavaComponentType = "SpringCloudEureka" +) + +// PossibleJavaComponentTypeValues returns the possible values for the JavaComponentType const type. +func PossibleJavaComponentTypeValues() []JavaComponentType { + return []JavaComponentType{ + JavaComponentTypeSpringBootAdmin, + JavaComponentTypeSpringCloudConfig, + JavaComponentTypeSpringCloudEureka, + } +} + // JobExecutionRunningState - Current running State of the job type JobExecutionRunningState string @@ -457,6 +558,22 @@ func PossibleJobProvisioningStateValues() []JobProvisioningState { } } +// LifecycleType - The lifecycle type of the session pool. +type LifecycleType string + +const ( + LifecycleTypeOnContainerExit LifecycleType = "OnContainerExit" + LifecycleTypeTimed LifecycleType = "Timed" +) + +// PossibleLifecycleTypeValues returns the possible values for the LifecycleType const type. +func PossibleLifecycleTypeValues() []LifecycleType { + return []LifecycleType{ + LifecycleTypeOnContainerExit, + LifecycleTypeTimed, + } +} + // LogLevel - Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. type LogLevel string @@ -515,6 +632,22 @@ func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { } } +// PoolManagementType - The pool management type of the session pool. +type PoolManagementType string + +const ( + PoolManagementTypeDynamic PoolManagementType = "Dynamic" + PoolManagementTypeManual PoolManagementType = "Manual" +) + +// PossiblePoolManagementTypeValues returns the possible values for the PoolManagementType const type. +func PossiblePoolManagementTypeValues() []PoolManagementType { + return []PoolManagementType{ + PoolManagementTypeDynamic, + PoolManagementTypeManual, + } +} + // RevisionHealthState - Current health State of the revision type RevisionHealthState string @@ -595,6 +728,44 @@ func PossibleSchemeValues() []Scheme { } } +// SessionNetworkStatus - Network status for the sessions. +type SessionNetworkStatus string + +const ( + SessionNetworkStatusEgressDisabled SessionNetworkStatus = "EgressDisabled" + SessionNetworkStatusEgressEnabled SessionNetworkStatus = "EgressEnabled" +) + +// PossibleSessionNetworkStatusValues returns the possible values for the SessionNetworkStatus const type. +func PossibleSessionNetworkStatusValues() []SessionNetworkStatus { + return []SessionNetworkStatus{ + SessionNetworkStatusEgressDisabled, + SessionNetworkStatusEgressEnabled, + } +} + +// SessionPoolProvisioningState - Provisioning state of the session pool. +type SessionPoolProvisioningState string + +const ( + SessionPoolProvisioningStateCanceled SessionPoolProvisioningState = "Canceled" + SessionPoolProvisioningStateDeleting SessionPoolProvisioningState = "Deleting" + SessionPoolProvisioningStateFailed SessionPoolProvisioningState = "Failed" + SessionPoolProvisioningStateInProgress SessionPoolProvisioningState = "InProgress" + SessionPoolProvisioningStateSucceeded SessionPoolProvisioningState = "Succeeded" +) + +// PossibleSessionPoolProvisioningStateValues returns the possible values for the SessionPoolProvisioningState const type. +func PossibleSessionPoolProvisioningStateValues() []SessionPoolProvisioningState { + return []SessionPoolProvisioningState{ + SessionPoolProvisioningStateCanceled, + SessionPoolProvisioningStateDeleting, + SessionPoolProvisioningStateFailed, + SessionPoolProvisioningStateInProgress, + SessionPoolProvisioningStateSucceeded, + } +} + // SourceControlOperationState - Current provisioning State of the operation type SourceControlOperationState string @@ -619,9 +790,10 @@ func PossibleSourceControlOperationStateValues() []SourceControlOperationState { type StorageType string const ( - StorageTypeAzureFile StorageType = "AzureFile" - StorageTypeEmptyDir StorageType = "EmptyDir" - StorageTypeSecret StorageType = "Secret" + StorageTypeAzureFile StorageType = "AzureFile" + StorageTypeEmptyDir StorageType = "EmptyDir" + StorageTypeNfsAzureFile StorageType = "NfsAzureFile" + StorageTypeSecret StorageType = "Secret" ) // PossibleStorageTypeValues returns the possible values for the StorageType const type. @@ -629,6 +801,7 @@ func PossibleStorageTypeValues() []StorageType { return []StorageType{ StorageTypeAzureFile, StorageTypeEmptyDir, + StorageTypeNfsAzureFile, StorageTypeSecret, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerapps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerapps_client.go index 6fcb279f..c7d5656a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerapps_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerapps_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewContainerAppsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - containerAppEnvelope - Properties used to create a container app @@ -73,7 +70,7 @@ func (client *ContainerAppsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ContainerAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsClient.BeginCreateOrUpdate" @@ -96,7 +93,7 @@ func (client *ContainerAppsClient) createOrUpdate(ctx context.Context, resourceG } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, _ *ContainerAppsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -115,7 +112,7 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, containerAppEnvelope); err != nil { @@ -127,7 +124,7 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete @@ -153,7 +150,7 @@ func (client *ContainerAppsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ContainerAppsClient) deleteOperation(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsClient.BeginDelete" @@ -176,7 +173,7 @@ func (client *ContainerAppsClient) deleteOperation(ctx context.Context, resource } // deleteCreateRequest creates the Delete request. -func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginDeleteOptions) (*policy.Request, error) { +func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, _ *ContainerAppsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -195,7 +192,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +201,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get the properties of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. @@ -231,7 +228,7 @@ func (client *ContainerAppsClient) Get(ctx context.Context, resourceGroupName st } // getCreateRequest creates the Get request. -func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientGetOptions) (*policy.Request, error) { +func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, _ *ContainerAppsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -250,7 +247,7 @@ func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -268,7 +265,7 @@ func (client *ContainerAppsClient) getHandleResponse(resp *http.Response) (Conta // GetAuthToken - Get auth token for a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientGetAuthTokenOptions contains the optional parameters for the ContainerAppsClient.GetAuthToken @@ -296,7 +293,7 @@ func (client *ContainerAppsClient) GetAuthToken(ctx context.Context, resourceGro } // getAuthTokenCreateRequest creates the GetAuthToken request. -func (client *ContainerAppsClient) getAuthTokenCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientGetAuthTokenOptions) (*policy.Request, error) { +func (client *ContainerAppsClient) getAuthTokenCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, _ *ContainerAppsClientGetAuthTokenOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/getAuthtoken" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -315,7 +312,7 @@ func (client *ContainerAppsClient) getAuthTokenCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -332,7 +329,7 @@ func (client *ContainerAppsClient) getAuthTokenHandleResponse(resp *http.Respons // NewListByResourceGroupPager - Get the Container Apps in a given resource group. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager // method. @@ -360,7 +357,7 @@ func (client *ContainerAppsClient) NewListByResourceGroupPager(resourceGroupName } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ContainerAppsClientListByResourceGroupOptions) (*policy.Request, error) { +func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *ContainerAppsClientListByResourceGroupOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -375,7 +372,7 @@ func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -392,7 +389,7 @@ func (client *ContainerAppsClient) listByResourceGroupHandleResponse(resp *http. // NewListBySubscriptionPager - Get the Container Apps in a given subscription. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - options - ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager // method. func (client *ContainerAppsClient) NewListBySubscriptionPager(options *ContainerAppsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsClientListBySubscriptionResponse] { @@ -419,7 +416,7 @@ func (client *ContainerAppsClient) NewListBySubscriptionPager(options *Container } // listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.Context, options *ContainerAppsClientListBySubscriptionOptions) (*policy.Request, error) { +func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.Context, _ *ContainerAppsClientListBySubscriptionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -430,7 +427,7 @@ func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -448,7 +445,7 @@ func (client *ContainerAppsClient) listBySubscriptionHandleResponse(resp *http.R // ListCustomHostNameAnalysis - Analyzes a custom hostname for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientListCustomHostNameAnalysisOptions contains the optional parameters for the ContainerAppsClient.ListCustomHostNameAnalysis @@ -495,7 +492,7 @@ func (client *ContainerAppsClient) listCustomHostNameAnalysisCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") if options != nil && options.CustomHostname != nil { reqQP.Set("customHostname", *options.CustomHostname) } @@ -516,7 +513,7 @@ func (client *ContainerAppsClient) listCustomHostNameAnalysisHandleResponse(resp // ListSecrets - List secrets for a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets @@ -544,7 +541,7 @@ func (client *ContainerAppsClient) ListSecrets(ctx context.Context, resourceGrou } // listSecretsCreateRequest creates the ListSecrets request. -func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientListSecretsOptions) (*policy.Request, error) { +func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, _ *ContainerAppsClientListSecretsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listSecrets" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -563,7 +560,7 @@ func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -581,7 +578,7 @@ func (client *ContainerAppsClient) listSecretsHandleResponse(resp *http.Response // BeginStart - Start a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientBeginStartOptions contains the optional parameters for the ContainerAppsClient.BeginStart @@ -607,7 +604,7 @@ func (client *ContainerAppsClient) BeginStart(ctx context.Context, resourceGroup // Start - Start a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ContainerAppsClient) start(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsClient.BeginStart" @@ -630,7 +627,7 @@ func (client *ContainerAppsClient) start(ctx context.Context, resourceGroupName } // startCreateRequest creates the Start request. -func (client *ContainerAppsClient) startCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStartOptions) (*policy.Request, error) { +func (client *ContainerAppsClient) startCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, _ *ContainerAppsClientBeginStartOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -649,7 +646,7 @@ func (client *ContainerAppsClient) startCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -658,7 +655,7 @@ func (client *ContainerAppsClient) startCreateRequest(ctx context.Context, resou // BeginStop - Stop a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsClientBeginStopOptions contains the optional parameters for the ContainerAppsClient.BeginStop method. @@ -683,7 +680,7 @@ func (client *ContainerAppsClient) BeginStop(ctx context.Context, resourceGroupN // Stop - Stop a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ContainerAppsClient) stop(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStopOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsClient.BeginStop" @@ -706,7 +703,7 @@ func (client *ContainerAppsClient) stop(ctx context.Context, resourceGroupName s } // stopCreateRequest creates the Stop request. -func (client *ContainerAppsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsClientBeginStopOptions) (*policy.Request, error) { +func (client *ContainerAppsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, _ *ContainerAppsClientBeginStopOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -725,7 +722,7 @@ func (client *ContainerAppsClient) stopCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -734,7 +731,7 @@ func (client *ContainerAppsClient) stopCreateRequest(ctx context.Context, resour // BeginUpdate - Patches a Container App using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - containerAppEnvelope - Properties of a Container App that need to be updated @@ -760,7 +757,7 @@ func (client *ContainerAppsClient) BeginUpdate(ctx context.Context, resourceGrou // Update - Patches a Container App using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ContainerAppsClient) update(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsClient.BeginUpdate" @@ -783,7 +780,7 @@ func (client *ContainerAppsClient) update(ctx context.Context, resourceGroupName } // updateCreateRequest creates the Update request. -func (client *ContainerAppsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginUpdateOptions) (*policy.Request, error) { +func (client *ContainerAppsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, containerAppEnvelope ContainerApp, _ *ContainerAppsClientBeginUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -802,7 +799,7 @@ func (client *ContainerAppsClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, containerAppEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsapi_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsapi_client.go index 252f60aa..a4c77177 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsapi_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsapi_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewContainerAppsAPIClient(subscriptionID string, credential azcore.TokenCre // GetCustomDomainVerificationID - Get the verification id of a subscription used for verifying custom domains // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - options - ContainerAppsAPIClientGetCustomDomainVerificationIDOptions contains the optional parameters for the ContainerAppsAPIClient.GetCustomDomainVerificationID // method. func (client *ContainerAppsAPIClient) GetCustomDomainVerificationID(ctx context.Context, options *ContainerAppsAPIClientGetCustomDomainVerificationIDOptions) (ContainerAppsAPIClientGetCustomDomainVerificationIDResponse, error) { @@ -72,7 +69,7 @@ func (client *ContainerAppsAPIClient) GetCustomDomainVerificationID(ctx context. } // getCustomDomainVerificationIDCreateRequest creates the GetCustomDomainVerificationID request. -func (client *ContainerAppsAPIClient) getCustomDomainVerificationIDCreateRequest(ctx context.Context, options *ContainerAppsAPIClientGetCustomDomainVerificationIDOptions) (*policy.Request, error) { +func (client *ContainerAppsAPIClient) getCustomDomainVerificationIDCreateRequest(ctx context.Context, _ *ContainerAppsAPIClientGetCustomDomainVerificationIDOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/getCustomDomainVerificationId" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -83,7 +80,7 @@ func (client *ContainerAppsAPIClient) getCustomDomainVerificationIDCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -101,7 +98,7 @@ func (client *ContainerAppsAPIClient) getCustomDomainVerificationIDHandleRespons // JobExecution - Get details of a single job execution // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - jobExecutionName - Job execution name. @@ -130,7 +127,7 @@ func (client *ContainerAppsAPIClient) JobExecution(ctx context.Context, resource } // jobExecutionCreateRequest creates the JobExecution request. -func (client *ContainerAppsAPIClient) jobExecutionCreateRequest(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName string, options *ContainerAppsAPIClientJobExecutionOptions) (*policy.Request, error) { +func (client *ContainerAppsAPIClient) jobExecutionCreateRequest(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName string, _ *ContainerAppsAPIClientJobExecutionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -153,7 +150,7 @@ func (client *ContainerAppsAPIClient) jobExecutionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsauthconfigs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsauthconfigs_client.go index c11e4962..03520d69 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsauthconfigs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsauthconfigs_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewContainerAppsAuthConfigsClient(subscriptionID string, credential azcore. // CreateOrUpdate - Create or update the AuthConfig for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. @@ -76,7 +73,7 @@ func (client *ContainerAppsAuthConfigsClient) CreateOrUpdate(ctx context.Context } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ContainerAppsAuthConfigsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, authConfigName string, authConfigEnvelope AuthConfig, options *ContainerAppsAuthConfigsClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ContainerAppsAuthConfigsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, authConfigName string, authConfigEnvelope AuthConfig, _ *ContainerAppsAuthConfigsClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -99,7 +96,7 @@ func (client *ContainerAppsAuthConfigsClient) createOrUpdateCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, authConfigEnvelope); err != nil { @@ -120,7 +117,7 @@ func (client *ContainerAppsAuthConfigsClient) createOrUpdateHandleResponse(resp // Delete - Delete a Container App AuthConfig. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. @@ -148,7 +145,7 @@ func (client *ContainerAppsAuthConfigsClient) Delete(ctx context.Context, resour } // deleteCreateRequest creates the Delete request. -func (client *ContainerAppsAuthConfigsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, authConfigName string, options *ContainerAppsAuthConfigsClientDeleteOptions) (*policy.Request, error) { +func (client *ContainerAppsAuthConfigsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, authConfigName string, _ *ContainerAppsAuthConfigsClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -171,7 +168,7 @@ func (client *ContainerAppsAuthConfigsClient) deleteCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +177,7 @@ func (client *ContainerAppsAuthConfigsClient) deleteCreateRequest(ctx context.Co // Get - Get a AuthConfig of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - authConfigName - Name of the Container App AuthConfig. @@ -209,7 +206,7 @@ func (client *ContainerAppsAuthConfigsClient) Get(ctx context.Context, resourceG } // getCreateRequest creates the Get request. -func (client *ContainerAppsAuthConfigsClient) getCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, authConfigName string, options *ContainerAppsAuthConfigsClientGetOptions) (*policy.Request, error) { +func (client *ContainerAppsAuthConfigsClient) getCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, authConfigName string, _ *ContainerAppsAuthConfigsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -232,7 +229,7 @@ func (client *ContainerAppsAuthConfigsClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +246,7 @@ func (client *ContainerAppsAuthConfigsClient) getHandleResponse(resp *http.Respo // NewListByContainerAppPager - Get the Container App AuthConfigs in a given resource group. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsAuthConfigsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsAuthConfigsClient.NewListByContainerAppPager @@ -278,7 +275,7 @@ func (client *ContainerAppsAuthConfigsClient) NewListByContainerAppPager(resourc } // listByContainerAppCreateRequest creates the ListByContainerApp request. -func (client *ContainerAppsAuthConfigsClient) listByContainerAppCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsAuthConfigsClientListByContainerAppOptions) (*policy.Request, error) { +func (client *ContainerAppsAuthConfigsClient) listByContainerAppCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, _ *ContainerAppsAuthConfigsClientListByContainerAppOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -297,7 +294,7 @@ func (client *ContainerAppsAuthConfigsClient) listByContainerAppCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsdiagnostics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsdiagnostics_client.go index 5180440f..f64ddca6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsdiagnostics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsdiagnostics_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewContainerAppsDiagnosticsClient(subscriptionID string, credential azcore. // GetDetector - Get a diagnostics result of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - detectorName - Name of the Container App Detector. @@ -75,7 +72,7 @@ func (client *ContainerAppsDiagnosticsClient) GetDetector(ctx context.Context, r } // getDetectorCreateRequest creates the GetDetector request. -func (client *ContainerAppsDiagnosticsClient) getDetectorCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, detectorName string, options *ContainerAppsDiagnosticsClientGetDetectorOptions) (*policy.Request, error) { +func (client *ContainerAppsDiagnosticsClient) getDetectorCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, detectorName string, _ *ContainerAppsDiagnosticsClientGetDetectorOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors/{detectorName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -98,7 +95,7 @@ func (client *ContainerAppsDiagnosticsClient) getDetectorCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -116,7 +113,7 @@ func (client *ContainerAppsDiagnosticsClient) getDetectorHandleResponse(resp *ht // GetRevision - Get a revision of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -145,7 +142,7 @@ func (client *ContainerAppsDiagnosticsClient) GetRevision(ctx context.Context, r } // getRevisionCreateRequest creates the GetRevision request. -func (client *ContainerAppsDiagnosticsClient) getRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsDiagnosticsClientGetRevisionOptions) (*policy.Request, error) { +func (client *ContainerAppsDiagnosticsClient) getRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, _ *ContainerAppsDiagnosticsClientGetRevisionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/{revisionName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -168,7 +165,7 @@ func (client *ContainerAppsDiagnosticsClient) getRevisionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -186,7 +183,7 @@ func (client *ContainerAppsDiagnosticsClient) getRevisionHandleResponse(resp *ht // GetRoot - Get the properties of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsDiagnosticsClientGetRootOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.GetRoot @@ -214,7 +211,7 @@ func (client *ContainerAppsDiagnosticsClient) GetRoot(ctx context.Context, resou } // getRootCreateRequest creates the GetRoot request. -func (client *ContainerAppsDiagnosticsClient) getRootCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientGetRootOptions) (*policy.Request, error) { +func (client *ContainerAppsDiagnosticsClient) getRootCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, _ *ContainerAppsDiagnosticsClientGetRootOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/rootApi/" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -233,7 +230,7 @@ func (client *ContainerAppsDiagnosticsClient) getRootCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +247,7 @@ func (client *ContainerAppsDiagnosticsClient) getRootHandleResponse(resp *http.R // NewListDetectorsPager - Get the list of diagnostics for a given Container App. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App for which detector info is needed. // - options - ContainerAppsDiagnosticsClientListDetectorsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListDetectorsPager @@ -279,7 +276,7 @@ func (client *ContainerAppsDiagnosticsClient) NewListDetectorsPager(resourceGrou } // listDetectorsCreateRequest creates the ListDetectors request. -func (client *ContainerAppsDiagnosticsClient) listDetectorsCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsDiagnosticsClientListDetectorsOptions) (*policy.Request, error) { +func (client *ContainerAppsDiagnosticsClient) listDetectorsCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, _ *ContainerAppsDiagnosticsClientListDetectorsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -298,7 +295,7 @@ func (client *ContainerAppsDiagnosticsClient) listDetectorsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -315,7 +312,7 @@ func (client *ContainerAppsDiagnosticsClient) listDetectorsHandleResponse(resp * // NewListRevisionsPager - Get the Revisions for a given Container App. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App for which Revisions are needed. // - options - ContainerAppsDiagnosticsClientListRevisionsOptions contains the optional parameters for the ContainerAppsDiagnosticsClient.NewListRevisionsPager @@ -366,7 +363,7 @@ func (client *ContainerAppsDiagnosticsClient) listRevisionsCreateRequest(ctx con if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisionreplicas_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisionreplicas_client.go index f491815a..5d2e5f9a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisionreplicas_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisionreplicas_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewContainerAppsRevisionReplicasClient(subscriptionID string, credential az // GetReplica - Get a replica for a Container App Revision. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -76,7 +73,7 @@ func (client *ContainerAppsRevisionReplicasClient) GetReplica(ctx context.Contex } // getReplicaCreateRequest creates the GetReplica request. -func (client *ContainerAppsRevisionReplicasClient) getReplicaCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, replicaName string, options *ContainerAppsRevisionReplicasClientGetReplicaOptions) (*policy.Request, error) { +func (client *ContainerAppsRevisionReplicasClient) getReplicaCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, replicaName string, _ *ContainerAppsRevisionReplicasClientGetReplicaOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{replicaName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -103,7 +100,7 @@ func (client *ContainerAppsRevisionReplicasClient) getReplicaCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -121,7 +118,7 @@ func (client *ContainerAppsRevisionReplicasClient) getReplicaHandleResponse(resp // ListReplicas - List replicas for a Container App Revision. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -150,7 +147,7 @@ func (client *ContainerAppsRevisionReplicasClient) ListReplicas(ctx context.Cont } // listReplicasCreateRequest creates the ListReplicas request. -func (client *ContainerAppsRevisionReplicasClient) listReplicasCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsRevisionReplicasClientListReplicasOptions) (*policy.Request, error) { +func (client *ContainerAppsRevisionReplicasClient) listReplicasCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, _ *ContainerAppsRevisionReplicasClientListReplicasOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -173,7 +170,7 @@ func (client *ContainerAppsRevisionReplicasClient) listReplicasCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisions_client.go index 52e185e2..44bc975b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappsrevisions_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewContainerAppsRevisionsClient(subscriptionID string, credential azcore.To // ActivateRevision - Activates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -74,7 +71,7 @@ func (client *ContainerAppsRevisionsClient) ActivateRevision(ctx context.Context } // activateRevisionCreateRequest creates the ActivateRevision request. -func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsRevisionsClientActivateRevisionOptions) (*policy.Request, error) { +func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, _ *ContainerAppsRevisionsClientActivateRevisionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/activate" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -97,7 +94,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,7 +103,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co // DeactivateRevision - Deactivates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -134,7 +131,7 @@ func (client *ContainerAppsRevisionsClient) DeactivateRevision(ctx context.Conte } // deactivateRevisionCreateRequest creates the DeactivateRevision request. -func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsRevisionsClientDeactivateRevisionOptions) (*policy.Request, error) { +func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, _ *ContainerAppsRevisionsClientDeactivateRevisionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/deactivate" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -157,7 +154,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -166,7 +163,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx // GetRevision - Get a revision of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -195,7 +192,7 @@ func (client *ContainerAppsRevisionsClient) GetRevision(ctx context.Context, res } // getRevisionCreateRequest creates the GetRevision request. -func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsRevisionsClientGetRevisionOptions) (*policy.Request, error) { +func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, _ *ContainerAppsRevisionsClientGetRevisionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -218,7 +215,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -235,7 +232,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionHandleResponse(resp *http // NewListRevisionsPager - Get the Revisions for a given Container App. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App for which Revisions are needed. // - options - ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager @@ -286,7 +283,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsCreateRequest(ctx conte if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -304,7 +301,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsHandleResponse(resp *ht // RestartRevision - Restarts a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - revisionName - Name of the Container App Revision. @@ -332,7 +329,7 @@ func (client *ContainerAppsRevisionsClient) RestartRevision(ctx context.Context, } // restartRevisionCreateRequest creates the RestartRevision request. -func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, options *ContainerAppsRevisionsClientRestartRevisionOptions) (*policy.Request, error) { +func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, revisionName string, _ *ContainerAppsRevisionsClientRestartRevisionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/restart" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -355,7 +352,7 @@ func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappssessionpools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappssessionpools_client.go new file mode 100644 index 00000000..6721561b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappssessionpools_client.go @@ -0,0 +1,460 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappcontainers + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ContainerAppsSessionPoolsClient contains the methods for the ContainerAppsSessionPools group. +// Don't use this type directly, use NewContainerAppsSessionPoolsClient() instead. +type ContainerAppsSessionPoolsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewContainerAppsSessionPoolsClient creates a new instance of ContainerAppsSessionPoolsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewContainerAppsSessionPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsSessionPoolsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ContainerAppsSessionPoolsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a session pool with the given properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - sessionPoolName - Name of the session pool. +// - sessionPoolEnvelope - Properties used to create a session pool +// - options - ContainerAppsSessionPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.BeginCreateOrUpdate +// method. +func (client *ContainerAppsSessionPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, sessionPoolName string, sessionPoolEnvelope SessionPool, options *ContainerAppsSessionPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ContainerAppsSessionPoolsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, sessionPoolName, sessionPoolEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsSessionPoolsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ContainerAppsSessionPoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a session pool with the given properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ContainerAppsSessionPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, sessionPoolName string, sessionPoolEnvelope SessionPool, options *ContainerAppsSessionPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ContainerAppsSessionPoolsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, sessionPoolName, sessionPoolEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ContainerAppsSessionPoolsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, sessionPoolName string, sessionPoolEnvelope SessionPool, _ *ContainerAppsSessionPoolsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if sessionPoolName == "" { + return nil, errors.New("parameter sessionPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionPoolName}", url.PathEscape(sessionPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, sessionPoolEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the session pool with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - sessionPoolName - Name of the session pool. +// - options - ContainerAppsSessionPoolsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.BeginDelete +// method. +func (client *ContainerAppsSessionPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, sessionPoolName string, options *ContainerAppsSessionPoolsClientBeginDeleteOptions) (*runtime.Poller[ContainerAppsSessionPoolsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, sessionPoolName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsSessionPoolsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ContainerAppsSessionPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the session pool with the given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ContainerAppsSessionPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, sessionPoolName string, options *ContainerAppsSessionPoolsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ContainerAppsSessionPoolsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, sessionPoolName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ContainerAppsSessionPoolsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sessionPoolName string, _ *ContainerAppsSessionPoolsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if sessionPoolName == "" { + return nil, errors.New("parameter sessionPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionPoolName}", url.PathEscape(sessionPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the properties of a session pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - sessionPoolName - Name of the session pool. +// - options - ContainerAppsSessionPoolsClientGetOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.Get +// method. +func (client *ContainerAppsSessionPoolsClient) Get(ctx context.Context, resourceGroupName string, sessionPoolName string, options *ContainerAppsSessionPoolsClientGetOptions) (ContainerAppsSessionPoolsClientGetResponse, error) { + var err error + const operationName = "ContainerAppsSessionPoolsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, sessionPoolName, options) + if err != nil { + return ContainerAppsSessionPoolsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ContainerAppsSessionPoolsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsSessionPoolsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ContainerAppsSessionPoolsClient) getCreateRequest(ctx context.Context, resourceGroupName string, sessionPoolName string, _ *ContainerAppsSessionPoolsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if sessionPoolName == "" { + return nil, errors.New("parameter sessionPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionPoolName}", url.PathEscape(sessionPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ContainerAppsSessionPoolsClient) getHandleResponse(resp *http.Response) (ContainerAppsSessionPoolsClientGetResponse, error) { + result := ContainerAppsSessionPoolsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SessionPool); err != nil { + return ContainerAppsSessionPoolsClientGetResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Get the session pools in a given resource group of a subscription. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ContainerAppsSessionPoolsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.NewListByResourceGroupPager +// method. +func (client *ContainerAppsSessionPoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *ContainerAppsSessionPoolsClientListByResourceGroupOptions) *runtime.Pager[ContainerAppsSessionPoolsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ContainerAppsSessionPoolsClientListByResourceGroupResponse]{ + More: func(page ContainerAppsSessionPoolsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ContainerAppsSessionPoolsClientListByResourceGroupResponse) (ContainerAppsSessionPoolsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContainerAppsSessionPoolsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ContainerAppsSessionPoolsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ContainerAppsSessionPoolsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *ContainerAppsSessionPoolsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ContainerAppsSessionPoolsClient) listByResourceGroupHandleResponse(resp *http.Response) (ContainerAppsSessionPoolsClientListByResourceGroupResponse, error) { + result := ContainerAppsSessionPoolsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SessionPoolCollection); err != nil { + return ContainerAppsSessionPoolsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - Get the session pools in a given subscription. +// +// Generated from API version 2025-01-01 +// - options - ContainerAppsSessionPoolsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.NewListBySubscriptionPager +// method. +func (client *ContainerAppsSessionPoolsClient) NewListBySubscriptionPager(options *ContainerAppsSessionPoolsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsSessionPoolsClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[ContainerAppsSessionPoolsClientListBySubscriptionResponse]{ + More: func(page ContainerAppsSessionPoolsClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ContainerAppsSessionPoolsClientListBySubscriptionResponse) (ContainerAppsSessionPoolsClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContainerAppsSessionPoolsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return ContainerAppsSessionPoolsClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *ContainerAppsSessionPoolsClient) listBySubscriptionCreateRequest(ctx context.Context, _ *ContainerAppsSessionPoolsClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/sessionPools" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *ContainerAppsSessionPoolsClient) listBySubscriptionHandleResponse(resp *http.Response) (ContainerAppsSessionPoolsClientListBySubscriptionResponse, error) { + result := ContainerAppsSessionPoolsClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SessionPoolCollection); err != nil { + return ContainerAppsSessionPoolsClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// BeginUpdate - Patches a session pool using JSON merge patch +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - sessionPoolName - Name of the session pool. +// - sessionPoolEnvelope - Properties used to create a session pool +// - options - ContainerAppsSessionPoolsClientBeginUpdateOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.BeginUpdate +// method. +func (client *ContainerAppsSessionPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, sessionPoolName string, sessionPoolEnvelope SessionPoolUpdatableProperties, options *ContainerAppsSessionPoolsClientBeginUpdateOptions) (*runtime.Poller[ContainerAppsSessionPoolsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, sessionPoolName, sessionPoolEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsSessionPoolsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ContainerAppsSessionPoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patches a session pool using JSON merge patch +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ContainerAppsSessionPoolsClient) update(ctx context.Context, resourceGroupName string, sessionPoolName string, sessionPoolEnvelope SessionPoolUpdatableProperties, options *ContainerAppsSessionPoolsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ContainerAppsSessionPoolsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, sessionPoolName, sessionPoolEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ContainerAppsSessionPoolsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, sessionPoolName string, sessionPoolEnvelope SessionPoolUpdatableProperties, _ *ContainerAppsSessionPoolsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if sessionPoolName == "" { + return nil, errors.New("parameter sessionPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionPoolName}", url.PathEscape(sessionPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, sessionPoolEnvelope); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappssourcecontrols_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappssourcecontrols_client.go index bdc5f15e..90d3f334 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappssourcecontrols_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/containerappssourcecontrols_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewContainerAppsSourceControlsClient(subscriptionID string, credential azco // BeginCreateOrUpdate - Create or update the SourceControl for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -73,7 +70,7 @@ func (client *ContainerAppsSourceControlsClient) BeginCreateOrUpdate(ctx context // CreateOrUpdate - Create or update the SourceControl for a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ContainerAppsSourceControlsClient) createOrUpdate(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, sourceControlEnvelope SourceControl, options *ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsSourceControlsClient.BeginCreateOrUpdate" @@ -96,7 +93,7 @@ func (client *ContainerAppsSourceControlsClient) createOrUpdate(ctx context.Cont } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ContainerAppsSourceControlsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, sourceControlEnvelope SourceControl, options *ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ContainerAppsSourceControlsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, sourceControlEnvelope SourceControl, _ *ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -119,7 +116,7 @@ func (client *ContainerAppsSourceControlsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, sourceControlEnvelope); err != nil { @@ -131,7 +128,7 @@ func (client *ContainerAppsSourceControlsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Delete a Container App SourceControl. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -157,7 +154,7 @@ func (client *ContainerAppsSourceControlsClient) BeginDelete(ctx context.Context // Delete - Delete a Container App SourceControl. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ContainerAppsSourceControlsClient) deleteOperation(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, options *ContainerAppsSourceControlsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ContainerAppsSourceControlsClient.BeginDelete" @@ -180,7 +177,7 @@ func (client *ContainerAppsSourceControlsClient) deleteOperation(ctx context.Con } // deleteCreateRequest creates the Delete request. -func (client *ContainerAppsSourceControlsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, options *ContainerAppsSourceControlsClientBeginDeleteOptions) (*policy.Request, error) { +func (client *ContainerAppsSourceControlsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, _ *ContainerAppsSourceControlsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -203,7 +200,7 @@ func (client *ContainerAppsSourceControlsClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,7 +209,7 @@ func (client *ContainerAppsSourceControlsClient) deleteCreateRequest(ctx context // Get - Get a SourceControl of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - sourceControlName - Name of the Container App SourceControl. @@ -241,7 +238,7 @@ func (client *ContainerAppsSourceControlsClient) Get(ctx context.Context, resour } // getCreateRequest creates the Get request. -func (client *ContainerAppsSourceControlsClient) getCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, options *ContainerAppsSourceControlsClientGetOptions) (*policy.Request, error) { +func (client *ContainerAppsSourceControlsClient) getCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, sourceControlName string, _ *ContainerAppsSourceControlsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -264,7 +261,7 @@ func (client *ContainerAppsSourceControlsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +278,7 @@ func (client *ContainerAppsSourceControlsClient) getHandleResponse(resp *http.Re // NewListByContainerAppPager - Get the Container App SourceControls in a given resource group. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - containerAppName - Name of the Container App. // - options - ContainerAppsSourceControlsClientListByContainerAppOptions contains the optional parameters for the ContainerAppsSourceControlsClient.NewListByContainerAppPager @@ -310,7 +307,7 @@ func (client *ContainerAppsSourceControlsClient) NewListByContainerAppPager(reso } // listByContainerAppCreateRequest creates the ListByContainerApp request. -func (client *ContainerAppsSourceControlsClient) listByContainerAppCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsSourceControlsClientListByContainerAppOptions) (*policy.Request, error) { +func (client *ContainerAppsSourceControlsClient) listByContainerAppCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, _ *ContainerAppsSourceControlsClientListByContainerAppOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -329,7 +326,7 @@ func (client *ContainerAppsSourceControlsClient) listByContainerAppCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprcomponents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprcomponents_client.go index 9cc17c2e..13a198a9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprcomponents_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/daprcomponents_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewDaprComponentsClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Creates or updates a Dapr Component in a Managed Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -76,7 +73,7 @@ func (client *DaprComponentsClient) CreateOrUpdate(ctx context.Context, resource } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DaprComponentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, daprComponentEnvelope DaprComponent, options *DaprComponentsClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *DaprComponentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, daprComponentEnvelope DaprComponent, _ *DaprComponentsClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -99,7 +96,7 @@ func (client *DaprComponentsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, daprComponentEnvelope); err != nil { @@ -120,7 +117,7 @@ func (client *DaprComponentsClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete a Dapr Component from a Managed Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -147,7 +144,7 @@ func (client *DaprComponentsClient) Delete(ctx context.Context, resourceGroupNam } // deleteCreateRequest creates the Delete request. -func (client *DaprComponentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, options *DaprComponentsClientDeleteOptions) (*policy.Request, error) { +func (client *DaprComponentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, _ *DaprComponentsClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -170,7 +167,7 @@ func (client *DaprComponentsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -179,7 +176,7 @@ func (client *DaprComponentsClient) deleteCreateRequest(ctx context.Context, res // Get - Get a dapr component. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -207,7 +204,7 @@ func (client *DaprComponentsClient) Get(ctx context.Context, resourceGroupName s } // getCreateRequest creates the Get request. -func (client *DaprComponentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, options *DaprComponentsClientGetOptions) (*policy.Request, error) { +func (client *DaprComponentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, _ *DaprComponentsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -230,7 +227,7 @@ func (client *DaprComponentsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +244,7 @@ func (client *DaprComponentsClient) getHandleResponse(resp *http.Response) (Dapr // NewListPager - Get the Dapr Components for a managed environment. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - DaprComponentsClientListOptions contains the optional parameters for the DaprComponentsClient.NewListPager method. @@ -275,7 +272,7 @@ func (client *DaprComponentsClient) NewListPager(resourceGroupName string, envir } // listCreateRequest creates the List request. -func (client *DaprComponentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *DaprComponentsClientListOptions) (*policy.Request, error) { +func (client *DaprComponentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *DaprComponentsClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -294,7 +291,7 @@ func (client *DaprComponentsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -312,7 +309,7 @@ func (client *DaprComponentsClient) listHandleResponse(resp *http.Response) (Dap // ListSecrets - List secrets for a dapr component // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - componentName - Name of the Dapr Component. @@ -341,7 +338,7 @@ func (client *DaprComponentsClient) ListSecrets(ctx context.Context, resourceGro } // listSecretsCreateRequest creates the ListSecrets request. -func (client *DaprComponentsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, options *DaprComponentsClientListSecretsOptions) (*policy.Request, error) { +func (client *DaprComponentsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, componentName string, _ *DaprComponentsClientListSecretsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/listSecrets" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -364,7 +361,7 @@ func (client *DaprComponentsClient) listSecretsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/interfaces.go new file mode 100644 index 00000000..cd7cefec --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/interfaces.go @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappcontainers + +// JavaComponentPropertiesClassification provides polymorphic access to related types. +// Call the interface's GetJavaComponentProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *JavaComponentProperties, *SpringBootAdminComponent, *SpringCloudConfigComponent, *SpringCloudEurekaComponent +type JavaComponentPropertiesClassification interface { + // GetJavaComponentProperties returns the JavaComponentProperties content of the underlying type. + GetJavaComponentProperties() *JavaComponentProperties +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/javacomponents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/javacomponents_client.go new file mode 100644 index 00000000..7a616c94 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/javacomponents_client.go @@ -0,0 +1,427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappcontainers + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// JavaComponentsClient contains the methods for the JavaComponents group. +// Don't use this type directly, use NewJavaComponentsClient() instead. +type JavaComponentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJavaComponentsClient creates a new instance of JavaComponentsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJavaComponentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JavaComponentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JavaComponentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a Java Component in a Managed Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - environmentName - Name of the Managed Environment. +// - name - Name of the Java Component. +// - javaComponentEnvelope - Configuration details of the Java Component. +// - options - JavaComponentsClientBeginCreateOrUpdateOptions contains the optional parameters for the JavaComponentsClient.BeginCreateOrUpdate +// method. +func (client *JavaComponentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, options *JavaComponentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JavaComponentsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, environmentName, name, javaComponentEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JavaComponentsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JavaComponentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a Java Component in a Managed Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *JavaComponentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, options *JavaComponentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "JavaComponentsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, environmentName, name, javaComponentEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *JavaComponentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, _ *JavaComponentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, javaComponentEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete a Java Component. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - environmentName - Name of the Managed Environment. +// - name - Name of the Java Component. +// - options - JavaComponentsClientBeginDeleteOptions contains the optional parameters for the JavaComponentsClient.BeginDelete +// method. +func (client *JavaComponentsClient) BeginDelete(ctx context.Context, resourceGroupName string, environmentName string, name string, options *JavaComponentsClientBeginDeleteOptions) (*runtime.Poller[JavaComponentsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, environmentName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JavaComponentsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JavaComponentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete a Java Component. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *JavaComponentsClient) deleteOperation(ctx context.Context, resourceGroupName string, environmentName string, name string, options *JavaComponentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "JavaComponentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, environmentName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *JavaComponentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, _ *JavaComponentsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a Java Component. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - environmentName - Name of the Managed Environment. +// - name - Name of the Java Component. +// - options - JavaComponentsClientGetOptions contains the optional parameters for the JavaComponentsClient.Get method. +func (client *JavaComponentsClient) Get(ctx context.Context, resourceGroupName string, environmentName string, name string, options *JavaComponentsClientGetOptions) (JavaComponentsClientGetResponse, error) { + var err error + const operationName = "JavaComponentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, environmentName, name, options) + if err != nil { + return JavaComponentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JavaComponentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JavaComponentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JavaComponentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, _ *JavaComponentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JavaComponentsClient) getHandleResponse(resp *http.Response) (JavaComponentsClientGetResponse, error) { + result := JavaComponentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JavaComponent); err != nil { + return JavaComponentsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Get the Java Components for a managed environment. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - environmentName - Name of the Managed Environment. +// - options - JavaComponentsClientListOptions contains the optional parameters for the JavaComponentsClient.NewListPager method. +func (client *JavaComponentsClient) NewListPager(resourceGroupName string, environmentName string, options *JavaComponentsClientListOptions) *runtime.Pager[JavaComponentsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[JavaComponentsClientListResponse]{ + More: func(page JavaComponentsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JavaComponentsClientListResponse) (JavaComponentsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JavaComponentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, environmentName, options) + }, nil) + if err != nil { + return JavaComponentsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *JavaComponentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *JavaComponentsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *JavaComponentsClient) listHandleResponse(resp *http.Response) (JavaComponentsClientListResponse, error) { + result := JavaComponentsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JavaComponentsCollection); err != nil { + return JavaComponentsClientListResponse{}, err + } + return result, nil +} + +// BeginUpdate - Patches a Java Component using JSON Merge Patch +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - environmentName - Name of the Managed Environment. +// - name - Name of the Java Component. +// - javaComponentEnvelope - Configuration details of the Java Component. +// - options - JavaComponentsClientBeginUpdateOptions contains the optional parameters for the JavaComponentsClient.BeginUpdate +// method. +func (client *JavaComponentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, options *JavaComponentsClientBeginUpdateOptions) (*runtime.Poller[JavaComponentsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, environmentName, name, javaComponentEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JavaComponentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JavaComponentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patches a Java Component using JSON Merge Patch +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *JavaComponentsClient) update(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, options *JavaComponentsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "JavaComponentsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, environmentName, name, javaComponentEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *JavaComponentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, javaComponentEnvelope JavaComponent, _ *JavaComponentsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, javaComponentEnvelope); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobs_client.go index b7d0cc13..59602eca 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobs_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobs_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt // BeginCreateOrUpdate - Create or Update a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - jobEnvelope - Properties used to create a container apps job @@ -73,7 +70,7 @@ func (client *JobsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroup // CreateOrUpdate - Create or Update a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *JobsClient) createOrUpdate(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope Job, options *JobsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginCreateOrUpdate" @@ -96,7 +93,7 @@ func (client *JobsClient) createOrUpdate(ctx context.Context, resourceGroupName } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope Job, options *JobsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope Job, _ *JobsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -115,7 +112,7 @@ func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, jobEnvelope); err != nil { @@ -127,7 +124,7 @@ func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resou // BeginDelete - Delete a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. @@ -152,7 +149,7 @@ func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Delete a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *JobsClient) deleteOperation(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginDelete" @@ -175,7 +172,7 @@ func (client *JobsClient) deleteOperation(ctx context.Context, resourceGroupName } // deleteCreateRequest creates the Delete request. -func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginDeleteOptions) (*policy.Request, error) { +func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, jobName string, _ *JobsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -194,7 +191,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -203,7 +200,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Get the properties of a Container Apps Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. @@ -230,7 +227,7 @@ func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, job } // getCreateRequest creates the Get request. -func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientGetOptions) (*policy.Request, error) { +func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupName string, jobName string, _ *JobsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -249,7 +246,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,7 +264,7 @@ func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetR // GetDetector - Get the diagnostics data for a Container App Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - detectorName - Name of the Container App Job detector. @@ -295,7 +292,7 @@ func (client *JobsClient) GetDetector(ctx context.Context, resourceGroupName str } // getDetectorCreateRequest creates the GetDetector request. -func (client *JobsClient) getDetectorCreateRequest(ctx context.Context, resourceGroupName string, jobName string, detectorName string, options *JobsClientGetDetectorOptions) (*policy.Request, error) { +func (client *JobsClient) getDetectorCreateRequest(ctx context.Context, resourceGroupName string, jobName string, detectorName string, _ *JobsClientGetDetectorOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/detectors/{detectorName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -318,7 +315,7 @@ func (client *JobsClient) getDetectorCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -335,7 +332,7 @@ func (client *JobsClient) getDetectorHandleResponse(resp *http.Response) (JobsCl // NewListByResourceGroupPager - Get the Container Apps Jobs in a given resource group. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - JobsClientListByResourceGroupOptions contains the optional parameters for the JobsClient.NewListByResourceGroupPager // method. @@ -363,7 +360,7 @@ func (client *JobsClient) NewListByResourceGroupPager(resourceGroupName string, } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *JobsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *JobsClientListByResourceGroupOptions) (*policy.Request, error) { +func (client *JobsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *JobsClientListByResourceGroupOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -378,7 +375,7 @@ func (client *JobsClient) listByResourceGroupCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -395,7 +392,7 @@ func (client *JobsClient) listByResourceGroupHandleResponse(resp *http.Response) // NewListBySubscriptionPager - Get the Container Apps Jobs in a given subscription. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - options - JobsClientListBySubscriptionOptions contains the optional parameters for the JobsClient.NewListBySubscriptionPager // method. func (client *JobsClient) NewListBySubscriptionPager(options *JobsClientListBySubscriptionOptions) *runtime.Pager[JobsClientListBySubscriptionResponse] { @@ -422,7 +419,7 @@ func (client *JobsClient) NewListBySubscriptionPager(options *JobsClientListBySu } // listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *JobsClient) listBySubscriptionCreateRequest(ctx context.Context, options *JobsClientListBySubscriptionOptions) (*policy.Request, error) { +func (client *JobsClient) listBySubscriptionCreateRequest(ctx context.Context, _ *JobsClientListBySubscriptionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/jobs" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -433,7 +430,7 @@ func (client *JobsClient) listBySubscriptionCreateRequest(ctx context.Context, o return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -450,7 +447,7 @@ func (client *JobsClient) listBySubscriptionHandleResponse(resp *http.Response) // NewListDetectorsPager - Get the list of diagnostics for a Container App Job. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientListDetectorsOptions contains the optional parameters for the JobsClient.NewListDetectorsPager method. @@ -478,7 +475,7 @@ func (client *JobsClient) NewListDetectorsPager(resourceGroupName string, jobNam } // listDetectorsCreateRequest creates the ListDetectors request. -func (client *JobsClient) listDetectorsCreateRequest(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientListDetectorsOptions) (*policy.Request, error) { +func (client *JobsClient) listDetectorsCreateRequest(ctx context.Context, resourceGroupName string, jobName string, _ *JobsClientListDetectorsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/detectors" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -497,7 +494,7 @@ func (client *JobsClient) listDetectorsCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -515,7 +512,7 @@ func (client *JobsClient) listDetectorsHandleResponse(resp *http.Response) (Jobs // ListSecrets - List secrets for a container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientListSecretsOptions contains the optional parameters for the JobsClient.ListSecrets method. @@ -542,7 +539,7 @@ func (client *JobsClient) ListSecrets(ctx context.Context, resourceGroupName str } // listSecretsCreateRequest creates the ListSecrets request. -func (client *JobsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientListSecretsOptions) (*policy.Request, error) { +func (client *JobsClient) listSecretsCreateRequest(ctx context.Context, resourceGroupName string, jobName string, _ *JobsClientListSecretsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/listSecrets" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -561,7 +558,7 @@ func (client *JobsClient) listSecretsCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -579,7 +576,7 @@ func (client *JobsClient) listSecretsHandleResponse(resp *http.Response) (JobsCl // ProxyGet - Get the properties of a Container App Job. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - apiName - Proxy API Name for Container App Job. @@ -607,7 +604,7 @@ func (client *JobsClient) ProxyGet(ctx context.Context, resourceGroupName string } // proxyGetCreateRequest creates the ProxyGet request. -func (client *JobsClient) proxyGetCreateRequest(ctx context.Context, resourceGroupName string, jobName string, apiName string, options *JobsClientProxyGetOptions) (*policy.Request, error) { +func (client *JobsClient) proxyGetCreateRequest(ctx context.Context, resourceGroupName string, jobName string, apiName string, _ *JobsClientProxyGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/detectorProperties/{apiName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -630,7 +627,7 @@ func (client *JobsClient) proxyGetCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -648,7 +645,7 @@ func (client *JobsClient) proxyGetHandleResponse(resp *http.Response) (JobsClien // BeginStart - Start a Container Apps Job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientBeginStartOptions contains the optional parameters for the JobsClient.BeginStart method. @@ -673,7 +670,7 @@ func (client *JobsClient) BeginStart(ctx context.Context, resourceGroupName stri // Start - Start a Container Apps Job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *JobsClient) start(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginStart" @@ -715,7 +712,7 @@ func (client *JobsClient) startCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Template != nil { @@ -730,7 +727,7 @@ func (client *JobsClient) startCreateRequest(ctx context.Context, resourceGroupN // BeginStopExecution - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - jobExecutionName - Job execution name. @@ -756,7 +753,7 @@ func (client *JobsClient) BeginStopExecution(ctx context.Context, resourceGroupN // StopExecution - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *JobsClient) stopExecution(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName string, options *JobsClientBeginStopExecutionOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginStopExecution" @@ -779,7 +776,7 @@ func (client *JobsClient) stopExecution(ctx context.Context, resourceGroupName s } // stopExecutionCreateRequest creates the StopExecution request. -func (client *JobsClient) stopExecutionCreateRequest(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName string, options *JobsClientBeginStopExecutionOptions) (*policy.Request, error) { +func (client *JobsClient) stopExecutionCreateRequest(ctx context.Context, resourceGroupName string, jobName string, jobExecutionName string, _ *JobsClientBeginStopExecutionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}/stop" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -802,7 +799,7 @@ func (client *JobsClient) stopExecutionCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -811,7 +808,7 @@ func (client *JobsClient) stopExecutionCreateRequest(ctx context.Context, resour // BeginStopMultipleExecutions - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsClientBeginStopMultipleExecutionsOptions contains the optional parameters for the JobsClient.BeginStopMultipleExecutions @@ -837,7 +834,7 @@ func (client *JobsClient) BeginStopMultipleExecutions(ctx context.Context, resou // StopMultipleExecutions - Terminates execution of a running container apps job // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *JobsClient) stopMultipleExecutions(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStopMultipleExecutionsOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginStopMultipleExecutions" @@ -860,7 +857,7 @@ func (client *JobsClient) stopMultipleExecutions(ctx context.Context, resourceGr } // stopMultipleExecutionsCreateRequest creates the StopMultipleExecutions request. -func (client *JobsClient) stopMultipleExecutionsCreateRequest(ctx context.Context, resourceGroupName string, jobName string, options *JobsClientBeginStopMultipleExecutionsOptions) (*policy.Request, error) { +func (client *JobsClient) stopMultipleExecutionsCreateRequest(ctx context.Context, resourceGroupName string, jobName string, _ *JobsClientBeginStopMultipleExecutionsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/stop" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -879,7 +876,7 @@ func (client *JobsClient) stopMultipleExecutionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -888,7 +885,7 @@ func (client *JobsClient) stopMultipleExecutionsCreateRequest(ctx context.Contex // BeginUpdate - Patches a Container Apps Job using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - jobEnvelope - Properties used to create a container apps job @@ -913,7 +910,7 @@ func (client *JobsClient) BeginUpdate(ctx context.Context, resourceGroupName str // Update - Patches a Container Apps Job using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *JobsClient) update(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope JobPatchProperties, options *JobsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "JobsClient.BeginUpdate" @@ -936,7 +933,7 @@ func (client *JobsClient) update(ctx context.Context, resourceGroupName string, } // updateCreateRequest creates the Update request. -func (client *JobsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope JobPatchProperties, options *JobsClientBeginUpdateOptions) (*policy.Request, error) { +func (client *JobsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, jobName string, jobEnvelope JobPatchProperties, _ *JobsClientBeginUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -955,7 +952,7 @@ func (client *JobsClient) updateCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, jobEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobsexecutions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobsexecutions_client.go index 78ea9257..569f2923 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobsexecutions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/jobsexecutions_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -45,7 +42,7 @@ func NewJobsExecutionsClient(subscriptionID string, credential azcore.TokenCrede // NewListPager - Get a Container Apps Job's executions // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - jobName - Job Name // - options - JobsExecutionsClientListOptions contains the optional parameters for the JobsExecutionsClient.NewListPager method. @@ -95,7 +92,7 @@ func (client *JobsExecutionsClient) listCreateRequest(ctx context.Context, resou if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedcertificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedcertificates_client.go index 561089f5..0f2a758c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedcertificates_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedcertificates_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewManagedCertificatesClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Create or Update a Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. @@ -73,7 +70,7 @@ func (client *ManagedCertificatesClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Create or Update a Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ManagedCertificatesClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, options *ManagedCertificatesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ManagedCertificatesClient.BeginCreateOrUpdate" @@ -119,7 +116,7 @@ func (client *ManagedCertificatesClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.ManagedCertificateEnvelope != nil { @@ -134,7 +131,7 @@ func (client *ManagedCertificatesClient) createOrUpdateCreateRequest(ctx context // Delete - Deletes the specified Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. @@ -162,7 +159,7 @@ func (client *ManagedCertificatesClient) Delete(ctx context.Context, resourceGro } // deleteCreateRequest creates the Delete request. -func (client *ManagedCertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, options *ManagedCertificatesClientDeleteOptions) (*policy.Request, error) { +func (client *ManagedCertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, _ *ManagedCertificatesClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -185,7 +182,7 @@ func (client *ManagedCertificatesClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,7 +191,7 @@ func (client *ManagedCertificatesClient) deleteCreateRequest(ctx context.Context // Get - Get the specified Managed Certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. @@ -222,7 +219,7 @@ func (client *ManagedCertificatesClient) Get(ctx context.Context, resourceGroupN } // getCreateRequest creates the Get request. -func (client *ManagedCertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, options *ManagedCertificatesClientGetOptions) (*policy.Request, error) { +func (client *ManagedCertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, _ *ManagedCertificatesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -245,7 +242,7 @@ func (client *ManagedCertificatesClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,7 +259,7 @@ func (client *ManagedCertificatesClient) getHandleResponse(resp *http.Response) // NewListPager - Get the Managed Certificates in a given managed environment. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - ManagedCertificatesClientListOptions contains the optional parameters for the ManagedCertificatesClient.NewListPager @@ -291,7 +288,7 @@ func (client *ManagedCertificatesClient) NewListPager(resourceGroupName string, } // listCreateRequest creates the List request. -func (client *ManagedCertificatesClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedCertificatesClientListOptions) (*policy.Request, error) { +func (client *ManagedCertificatesClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *ManagedCertificatesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -310,7 +307,7 @@ func (client *ManagedCertificatesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -328,7 +325,7 @@ func (client *ManagedCertificatesClient) listHandleResponse(resp *http.Response) // Update - Patches a managed certificate. Oly patching of tags is supported // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - managedCertificateName - Name of the Managed Certificate. @@ -358,7 +355,7 @@ func (client *ManagedCertificatesClient) Update(ctx context.Context, resourceGro } // updateCreateRequest creates the Update request. -func (client *ManagedCertificatesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, managedCertificateEnvelope ManagedCertificatePatch, options *ManagedCertificatesClientUpdateOptions) (*policy.Request, error) { +func (client *ManagedCertificatesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, managedCertificateName string, managedCertificateEnvelope ManagedCertificatePatch, _ *ManagedCertificatesClientUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -381,7 +378,7 @@ func (client *ManagedCertificatesClient) updateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, managedCertificateEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentdiagnostics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentdiagnostics_client.go index ed7ef985..c5721498 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentdiagnostics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentdiagnostics_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewManagedEnvironmentDiagnosticsClient(subscriptionID string, credential az // GetDetector - Get the diagnostics data for a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - detectorName - Name of the Managed Environment detector. @@ -75,7 +72,7 @@ func (client *ManagedEnvironmentDiagnosticsClient) GetDetector(ctx context.Conte } // getDetectorCreateRequest creates the GetDetector request. -func (client *ManagedEnvironmentDiagnosticsClient) getDetectorCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, detectorName string, options *ManagedEnvironmentDiagnosticsClientGetDetectorOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentDiagnosticsClient) getDetectorCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, detectorName string, _ *ManagedEnvironmentDiagnosticsClientGetDetectorOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors/{detectorName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -98,7 +95,7 @@ func (client *ManagedEnvironmentDiagnosticsClient) getDetectorCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -116,7 +113,7 @@ func (client *ManagedEnvironmentDiagnosticsClient) getDetectorHandleResponse(res // ListDetectors - Get the list of diagnostics for a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentDiagnosticsClientListDetectorsOptions contains the optional parameters for the ManagedEnvironmentDiagnosticsClient.ListDetectors @@ -144,7 +141,7 @@ func (client *ManagedEnvironmentDiagnosticsClient) ListDetectors(ctx context.Con } // listDetectorsCreateRequest creates the ListDetectors request. -func (client *ManagedEnvironmentDiagnosticsClient) listDetectorsCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentDiagnosticsClientListDetectorsOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentDiagnosticsClient) listDetectorsCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *ManagedEnvironmentDiagnosticsClientListDetectorsOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -163,7 +160,7 @@ func (client *ManagedEnvironmentDiagnosticsClient) listDetectorsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironments_client.go index 8937d34b..80c556f2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironments_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewManagedEnvironmentsClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Creates or updates a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - environmentEnvelope - Configuration details of the Environment. @@ -72,7 +69,7 @@ func (client *ManagedEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Creates or updates a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ManagedEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, options *ManagedEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ManagedEnvironmentsClient.BeginCreateOrUpdate" @@ -95,7 +92,7 @@ func (client *ManagedEnvironmentsClient) createOrUpdate(ctx context.Context, res } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ManagedEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, options *ManagedEnvironmentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, _ *ManagedEnvironmentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -114,7 +111,7 @@ func (client *ManagedEnvironmentsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, environmentEnvelope); err != nil { @@ -126,7 +123,7 @@ func (client *ManagedEnvironmentsClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Delete a Managed Environment if it does not have any container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginDelete @@ -151,7 +148,7 @@ func (client *ManagedEnvironmentsClient) BeginDelete(ctx context.Context, resour // Delete - Delete a Managed Environment if it does not have any container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ManagedEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ManagedEnvironmentsClient.BeginDelete" @@ -174,7 +171,7 @@ func (client *ManagedEnvironmentsClient) deleteOperation(ctx context.Context, re } // deleteCreateRequest creates the Delete request. -func (client *ManagedEnvironmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientBeginDeleteOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *ManagedEnvironmentsClientBeginDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -193,7 +190,7 @@ func (client *ManagedEnvironmentsClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -202,7 +199,7 @@ func (client *ManagedEnvironmentsClient) deleteCreateRequest(ctx context.Context // Get - Get the properties of a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsClientGetOptions contains the optional parameters for the ManagedEnvironmentsClient.Get method. @@ -229,7 +226,7 @@ func (client *ManagedEnvironmentsClient) Get(ctx context.Context, resourceGroupN } // getCreateRequest creates the Get request. -func (client *ManagedEnvironmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientGetOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *ManagedEnvironmentsClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -248,7 +245,7 @@ func (client *ManagedEnvironmentsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -266,7 +263,7 @@ func (client *ManagedEnvironmentsClient) getHandleResponse(resp *http.Response) // GetAuthToken - Checks if resource name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - ManagedEnvironmentsClientGetAuthTokenOptions contains the optional parameters for the ManagedEnvironmentsClient.GetAuthToken @@ -294,7 +291,7 @@ func (client *ManagedEnvironmentsClient) GetAuthToken(ctx context.Context, resou } // getAuthTokenCreateRequest creates the GetAuthToken request. -func (client *ManagedEnvironmentsClient) getAuthTokenCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientGetAuthTokenOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsClient) getAuthTokenCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *ManagedEnvironmentsClientGetAuthTokenOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/getAuthtoken" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -313,7 +310,7 @@ func (client *ManagedEnvironmentsClient) getAuthTokenCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -330,7 +327,7 @@ func (client *ManagedEnvironmentsClient) getAuthTokenHandleResponse(resp *http.R // NewListByResourceGroupPager - Get all the Managed Environments in a resource group. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ManagedEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListByResourceGroupPager // method. @@ -358,7 +355,7 @@ func (client *ManagedEnvironmentsClient) NewListByResourceGroupPager(resourceGro } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ManagedEnvironmentsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ManagedEnvironmentsClientListByResourceGroupOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *ManagedEnvironmentsClientListByResourceGroupOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -373,7 +370,7 @@ func (client *ManagedEnvironmentsClient) listByResourceGroupCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -390,7 +387,7 @@ func (client *ManagedEnvironmentsClient) listByResourceGroupHandleResponse(resp // NewListBySubscriptionPager - Get all Managed Environments for a subscription. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - options - ManagedEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListBySubscriptionPager // method. func (client *ManagedEnvironmentsClient) NewListBySubscriptionPager(options *ManagedEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[ManagedEnvironmentsClientListBySubscriptionResponse] { @@ -417,7 +414,7 @@ func (client *ManagedEnvironmentsClient) NewListBySubscriptionPager(options *Man } // listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ManagedEnvironmentsClient) listBySubscriptionCreateRequest(ctx context.Context, options *ManagedEnvironmentsClientListBySubscriptionOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsClient) listBySubscriptionCreateRequest(ctx context.Context, _ *ManagedEnvironmentsClientListBySubscriptionOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -428,7 +425,7 @@ func (client *ManagedEnvironmentsClient) listBySubscriptionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -445,7 +442,7 @@ func (client *ManagedEnvironmentsClient) listBySubscriptionHandleResponse(resp * // NewListWorkloadProfileStatesPager - Get all workload Profile States for a Managed Environment. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - options - ManagedEnvironmentsClientListWorkloadProfileStatesOptions contains the optional parameters for the ManagedEnvironmentsClient.NewListWorkloadProfileStatesPager @@ -474,7 +471,7 @@ func (client *ManagedEnvironmentsClient) NewListWorkloadProfileStatesPager(resou } // listWorkloadProfileStatesCreateRequest creates the ListWorkloadProfileStates request. -func (client *ManagedEnvironmentsClient) listWorkloadProfileStatesCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsClientListWorkloadProfileStatesOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsClient) listWorkloadProfileStatesCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *ManagedEnvironmentsClientListWorkloadProfileStatesOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/workloadProfileStates" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -493,7 +490,7 @@ func (client *ManagedEnvironmentsClient) listWorkloadProfileStatesCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -511,7 +508,7 @@ func (client *ManagedEnvironmentsClient) listWorkloadProfileStatesHandleResponse // BeginUpdate - Patches a Managed Environment using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - environmentEnvelope - Configuration details of the Environment. @@ -537,7 +534,7 @@ func (client *ManagedEnvironmentsClient) BeginUpdate(ctx context.Context, resour // Update - Patches a Managed Environment using JSON Merge Patch // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 func (client *ManagedEnvironmentsClient) update(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, options *ManagedEnvironmentsClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "ManagedEnvironmentsClient.BeginUpdate" @@ -560,7 +557,7 @@ func (client *ManagedEnvironmentsClient) update(ctx context.Context, resourceGro } // updateCreateRequest creates the Update request. -func (client *ManagedEnvironmentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, options *ManagedEnvironmentsClientBeginUpdateOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, environmentEnvelope ManagedEnvironment, _ *ManagedEnvironmentsClientBeginUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -579,7 +576,7 @@ func (client *ManagedEnvironmentsClient) updateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, environmentEnvelope); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsdiagnostics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsdiagnostics_client.go index 3dcb890b..7742e971 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsdiagnostics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsdiagnostics_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewManagedEnvironmentsDiagnosticsClient(subscriptionID string, credential a // GetRoot - Get the properties of a Managed Environment used to host container apps. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsDiagnosticsClientGetRootOptions contains the optional parameters for the ManagedEnvironmentsDiagnosticsClient.GetRoot @@ -74,7 +71,7 @@ func (client *ManagedEnvironmentsDiagnosticsClient) GetRoot(ctx context.Context, } // getRootCreateRequest creates the GetRoot request. -func (client *ManagedEnvironmentsDiagnosticsClient) getRootCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsDiagnosticsClientGetRootOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsDiagnosticsClient) getRootCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *ManagedEnvironmentsDiagnosticsClientGetRootOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectorProperties/rootApi/" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -93,7 +90,7 @@ func (client *ManagedEnvironmentsDiagnosticsClient) getRootCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsstorages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsstorages_client.go index 63385c9d..fac328b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsstorages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentsstorages_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewManagedEnvironmentsStoragesClient(subscriptionID string, credential azco // CreateOrUpdate - Create or update storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. @@ -76,7 +73,7 @@ func (client *ManagedEnvironmentsStoragesClient) CreateOrUpdate(ctx context.Cont } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ManagedEnvironmentsStoragesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, storageName string, storageEnvelope ManagedEnvironmentStorage, options *ManagedEnvironmentsStoragesClientCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsStoragesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, storageName string, storageEnvelope ManagedEnvironmentStorage, _ *ManagedEnvironmentsStoragesClientCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -99,7 +96,7 @@ func (client *ManagedEnvironmentsStoragesClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, storageEnvelope); err != nil { @@ -120,7 +117,7 @@ func (client *ManagedEnvironmentsStoragesClient) createOrUpdateHandleResponse(re // Delete - Delete storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. @@ -148,7 +145,7 @@ func (client *ManagedEnvironmentsStoragesClient) Delete(ctx context.Context, res } // deleteCreateRequest creates the Delete request. -func (client *ManagedEnvironmentsStoragesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, storageName string, options *ManagedEnvironmentsStoragesClientDeleteOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsStoragesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, storageName string, _ *ManagedEnvironmentsStoragesClientDeleteOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -171,7 +168,7 @@ func (client *ManagedEnvironmentsStoragesClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +177,7 @@ func (client *ManagedEnvironmentsStoragesClient) deleteCreateRequest(ctx context // Get - Get storage for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - storageName - Name of the storage. @@ -209,7 +206,7 @@ func (client *ManagedEnvironmentsStoragesClient) Get(ctx context.Context, resour } // getCreateRequest creates the Get request. -func (client *ManagedEnvironmentsStoragesClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, storageName string, options *ManagedEnvironmentsStoragesClientGetOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsStoragesClient) getCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, storageName string, _ *ManagedEnvironmentsStoragesClientGetOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -232,7 +229,7 @@ func (client *ManagedEnvironmentsStoragesClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -250,7 +247,7 @@ func (client *ManagedEnvironmentsStoragesClient) getHandleResponse(resp *http.Re // List - Get all storages for a managedEnvironment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentsStoragesClientListOptions contains the optional parameters for the ManagedEnvironmentsStoragesClient.List @@ -278,7 +275,7 @@ func (client *ManagedEnvironmentsStoragesClient) List(ctx context.Context, resou } // listCreateRequest creates the List request. -func (client *ManagedEnvironmentsStoragesClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentsStoragesClientListOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentsStoragesClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *ManagedEnvironmentsStoragesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -297,7 +294,7 @@ func (client *ManagedEnvironmentsStoragesClient) listCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentusages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentusages_client.go index 9e3a627c..f84b4041 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentusages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/managedenvironmentusages_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -45,7 +42,7 @@ func NewManagedEnvironmentUsagesClient(subscriptionID string, credential azcore. // NewListPager - Gets the current usage information as well as the limits for environment. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Environment. // - options - ManagedEnvironmentUsagesClientListOptions contains the optional parameters for the ManagedEnvironmentUsagesClient.NewListPager @@ -74,7 +71,7 @@ func (client *ManagedEnvironmentUsagesClient) NewListPager(resourceGroupName str } // listCreateRequest creates the List request. -func (client *ManagedEnvironmentUsagesClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, options *ManagedEnvironmentUsagesClientListOptions) (*policy.Request, error) { +func (client *ManagedEnvironmentUsagesClient) listCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, _ *ManagedEnvironmentUsagesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/usages" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -93,7 +90,7 @@ func (client *ManagedEnvironmentUsagesClient) listCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models.go index 238fb139..f62f4f81 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -69,7 +66,7 @@ type AuthConfig struct { // AuthConfig resource specific properties Properties *AuthConfigProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -141,7 +138,7 @@ type AvailableWorkloadProfile struct { // Revision resource specific properties Properties *AvailableWorkloadProfileProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -338,7 +335,7 @@ type BillingMeter struct { // Revision resource specific properties Properties *BillingMeterProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -386,7 +383,7 @@ type Certificate struct { // Resource tags. Tags map[string]*string - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -408,6 +405,15 @@ type CertificateCollection struct { NextLink *string } +// CertificateKeyVaultProperties - Properties for a certificate stored in a Key Vault. +type CertificateKeyVaultProperties struct { + // Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. + Identity *string + + // URL pointing to the Azure Key Vault secret that holds the certificate. + KeyVaultURL *string +} + // CertificatePatch - A certificate to update type CertificatePatch struct { // Application-specific metadata in the form of key-value pairs. @@ -416,6 +422,9 @@ type CertificatePatch struct { // CertificateProperties - Certificate resource specific properties type CertificateProperties struct { + // Properties for a certificate stored in a Key Vault. + CertificateKeyVaultProperties *CertificateKeyVaultProperties + // Certificate password. Password *string @@ -490,6 +499,10 @@ type Configuration struct { // Dapr configuration for the Container App. Dapr *Dapr + // Optional settings for Managed Identities that are assigned to the Container App. If a Managed Identity is not specified + // here, default settings will be used. + IdentitySettings []*IdentitySettings + // Ingress configurations. Ingress *Ingress @@ -499,6 +512,9 @@ type Configuration struct { // Collection of private container registry credentials for containers used by the Container app Registries []*RegistryCredentials + // App runtime configuration for the Container App. + Runtime *Runtime + // Collection of secrets used by a Container app Secrets []*Secret @@ -520,7 +536,7 @@ type ConnectedEnvironment struct { // Resource tags. Tags map[string]*string - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -568,7 +584,7 @@ type ConnectedEnvironmentStorage struct { // Storage properties Properties *ConnectedEnvironmentStorageProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -643,7 +659,7 @@ type ContainerApp struct { // Resource tags. Tags map[string]*string - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -667,7 +683,7 @@ type ContainerAppAuthToken struct { // Resource tags. Tags map[string]*string - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -823,6 +839,9 @@ type ContainerAppProperties struct { // READ-ONLY; Provisioning state of the Container App. ProvisioningState *ContainerAppProvisioningState + + // READ-ONLY; Running status of the Container App. + RunningStatus *ContainerAppRunningStatus } // ContainerAppSecret - Container App Secret. @@ -882,6 +901,18 @@ type CorsPolicy struct { MaxAge *int32 } +// CustomContainerTemplate - Custom container configuration. +type CustomContainerTemplate struct { + // List of container definitions for the sessions of the session pool. + Containers []*SessionContainer + + // Session pool ingress configuration. + Ingress *SessionIngress + + // Private container registry credentials for containers used by the sessions of the session pool. + RegistryCredentials *SessionRegistryCredentials +} + // CustomDomain - Custom Domain of a Container App type CustomDomain struct { // REQUIRED; Hostname. @@ -896,6 +927,9 @@ type CustomDomain struct { // CustomDomainConfiguration - Configuration properties for apps environment custom domain type CustomDomainConfiguration struct { + // Certificate stored in Azure Key Vault. + CertificateKeyVaultProperties *CertificateKeyVaultProperties + // Certificate password CertificatePassword *string @@ -1001,6 +1035,10 @@ type CustomScaleRule struct { // Authentication secrets for the custom scale rule. Auth []*ScaleRuleAuth + // The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned + // identity. + Identity *string + // Metadata properties to describe custom scale rule. Metadata map[string]*string @@ -1041,7 +1079,7 @@ type DaprComponent struct { // Dapr Component resource specific properties Properties *DaprComponentProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -1239,7 +1277,7 @@ type Diagnostics struct { // Diagnostics resource specific properties Properties *DiagnosticsProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -1324,6 +1362,12 @@ type DiagnosticsStatus struct { StatusID *int32 } +// DynamicPoolConfiguration - Dynamic pool configuration. +type DynamicPoolConfiguration struct { + // The lifecycle configuration of a session in the dynamic session pool + LifecycleConfiguration *LifecycleConfiguration +} + // EncryptionSettings - The configuration settings of the secrets references of encryption key and signing key for ContainerApp // Service Authentication/Authorization. type EncryptionSettings struct { @@ -1345,7 +1389,7 @@ type EnvironmentAuthToken struct { // Resource tags. Tags map[string]*string - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -1525,6 +1569,10 @@ type HTTPScaleRule struct { // Authentication secrets for the custom scale rule. Auth []*ScaleRuleAuth + // The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned + // identity. + Identity *string + // Metadata properties to describe http scale rule. Metadata map[string]*string } @@ -1592,6 +1640,16 @@ type IdentityProviders struct { Twitter *Twitter } +// IdentitySettings - Optional settings for a Managed Identity that is assigned to the Container App. +type IdentitySettings struct { + // REQUIRED; The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned + // identity. + Identity *string + + // Use to select the lifecycle stages of a Container App during which the Managed Identity should be available. + Lifecycle *IdentitySettingsLifeCycle +} + // Ingress - Container App Ingress configuration. type Ingress struct { // Settings to expose additional ports on container app @@ -1679,6 +1737,87 @@ type InitContainer struct { VolumeMounts []*VolumeMount } +// JavaComponent - Java Component. +type JavaComponent struct { + // Java Component resource specific properties + Properties JavaComponentPropertiesClassification + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// JavaComponentConfigurationProperty - Configuration properties for a Java Component +type JavaComponentConfigurationProperty struct { + // The name of the property + PropertyName *string + + // The value of the property + Value *string +} + +// JavaComponentIngress - Container App Ingress configuration. +type JavaComponentIngress struct { + // READ-ONLY; Hostname of the Java Component endpoint + Fqdn *string +} + +// JavaComponentProperties - Java Component common properties. +type JavaComponentProperties struct { + // REQUIRED; Type of the Java Component. + ComponentType *JavaComponentType + + // List of Java Components configuration properties + Configurations []*JavaComponentConfigurationProperty + + // Java component scaling configurations + Scale *JavaComponentPropertiesScale + + // List of Java Components that are bound to the Java component + ServiceBinds []*JavaComponentServiceBind + + // READ-ONLY; Provisioning state of the Java Component. + ProvisioningState *JavaComponentProvisioningState +} + +// GetJavaComponentProperties implements the JavaComponentPropertiesClassification interface for type JavaComponentProperties. +func (j *JavaComponentProperties) GetJavaComponentProperties() *JavaComponentProperties { return j } + +// JavaComponentPropertiesScale - Java component scaling configurations +type JavaComponentPropertiesScale struct { + // Optional. Maximum number of Java component replicas + MaxReplicas *int32 + + // Optional. Minimum number of Java component replicas. Defaults to 1 if not set + MinReplicas *int32 +} + +// JavaComponentServiceBind - Configuration to bind a Java Component to another Java Component +type JavaComponentServiceBind struct { + // Name of the service bind + Name *string + + // Resource id of the target service + ServiceID *string +} + +// JavaComponentsCollection - Java Components ARM resource. +type JavaComponentsCollection struct { + // REQUIRED; Collection of resources. + Value []*JavaComponent + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + // Job - Container App Job type Job struct { // REQUIRED; The geo-location where the resource lives @@ -1694,7 +1833,7 @@ type Job struct { // Resource tags. Tags map[string]*string - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -1718,6 +1857,10 @@ type JobConfiguration struct { // Trigger configuration of an event driven job. EventTriggerConfig *JobConfigurationEventTriggerConfig + // Optional settings for Managed Identities that are assigned to the Container App Job. If a Managed Identity is not specified + // here, default settings will be used. + IdentitySettings []*IdentitySettings + // Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set // to 1 by default ManualTriggerConfig *JobConfigurationManualTriggerConfig @@ -1918,6 +2061,10 @@ type JobScaleRule struct { // Authentication secrets for the scale rule. Auth []*ScaleRuleAuth + // The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned + // identity. + Identity *string + // Metadata properties to describe the scale rule. Metadata any @@ -1971,6 +2118,18 @@ type KedaConfiguration struct { Version *string } +// LifecycleConfiguration - The lifecycle configuration properties of a session in the dynamic session pool +type LifecycleConfiguration struct { + // The cooldown period of a session in seconds when the lifecycle type is 'Timed'. + CooldownPeriodInSeconds *int32 + + // The lifecycle type of the session pool. + LifecycleType *LifecycleType + + // The maximum alive period of a session in seconds when the lifecycle type is 'OnContainerExit'. + MaxAlivePeriodInSeconds *int32 +} + type ListUsagesResult struct { // The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page // of compute resource usage information. @@ -2035,7 +2194,7 @@ type ManagedCertificate struct { // Resource tags. Tags map[string]*string - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -2086,6 +2245,10 @@ type ManagedEnvironment struct { // REQUIRED; The geo-location where the resource lives Location *string + // Managed identities for the Managed Environment to interact with other Azure services without maintaining any secrets or + // credentials in code. + Identity *ManagedServiceIdentity + // Kind of the Environment. Kind *string @@ -2095,7 +2258,7 @@ type ManagedEnvironment struct { // Resource tags. Tags map[string]*string - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -2110,8 +2273,7 @@ type ManagedEnvironment struct { // ManagedEnvironmentProperties - Managed environment resource specific properties type ManagedEnvironmentProperties struct { - // Cluster configuration which enables the log daemon to export app logs to a destination. Currently only "log-analytics" - // is supported + // Cluster configuration which enables the log daemon to export app logs to configured destination. AppLogsConfiguration *AppLogsConfiguration // Custom domain configuration for the environment @@ -2188,7 +2350,7 @@ type ManagedEnvironmentStorage struct { // Storage properties Properties *ManagedEnvironmentStorageProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -2205,6 +2367,9 @@ type ManagedEnvironmentStorage struct { type ManagedEnvironmentStorageProperties struct { // Azure file properties AzureFile *AzureFileProperties + + // NFS Azure file properties + NfsAzureFile *NfsAzureFileProperties } // ManagedEnvironmentStoragesCollection - Collection of Storage for Environments @@ -2222,6 +2387,16 @@ type ManagedEnvironmentsCollection struct { NextLink *string } +// ManagedIdentitySetting - Optional settings for a Managed Identity that is assigned to the Session pool. +type ManagedIdentitySetting struct { + // REQUIRED; The resource ID of a user-assigned managed identity that is assigned to the Session Pool, or 'system' for system-assigned + // identity. + Identity *string + + // Use to select the lifecycle stages of a Session Pool during which the Managed Identity should be available. + Lifecycle *IdentitySettingsLifeCycle +} + // ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) type ManagedServiceIdentity struct { // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). @@ -2248,6 +2423,18 @@ type Mtls struct { Enabled *bool } +// NfsAzureFileProperties - NFS Azure File Properties. +type NfsAzureFileProperties struct { + // Access mode for storage + AccessMode *AccessMode + + // Server for NFS azure file. Specify the Azure storage account server address. + Server *string + + // NFS Azure file share name. + ShareName *string +} + // Nonce - The configuration settings of the nonce used in the login flow. type Nonce struct { // The time after the request is made when the nonce should expire. @@ -2259,11 +2446,12 @@ type Nonce struct { // OpenIDConnectClientCredential - The authentication client credentials of the custom Open ID Connect provider. type OpenIDConnectClientCredential struct { + // CONSTANT; The method that should be used to authenticate the user. + // Field has constant value "ClientSecretPost", any specified value is ignored. + Method *string + // The app setting that contains the client secret for the custom Open ID Connect provider. ClientSecretSettingName *string - - // The method that should be used to authenticate the user. - Method *string } // OpenIDConnectConfig - The configuration settings of the endpoints used for the custom Open ID Connect provider. @@ -2338,7 +2526,7 @@ type OperationDisplay struct { // ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a // location type ProxyResource struct { - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -2353,9 +2541,16 @@ type ProxyResource struct { // QueueScaleRule - Container App container Azure Queue based scaling rule. type QueueScaleRule struct { + // Storage account name. required if using managed identity to authenticate + AccountName *string + // Authentication secrets for the queue scale rule. Auth []*ScaleRuleAuth + // The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned + // identity. + Identity *string + // Queue length. QueueLength *int32 @@ -2396,7 +2591,7 @@ type Replica struct { // Replica resource specific properties Properties *ReplicaProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -2465,7 +2660,7 @@ type ReplicaProperties struct { // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -2483,7 +2678,7 @@ type Revision struct { // Revision resource specific properties Properties *RevisionProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -2542,18 +2737,45 @@ type RevisionProperties struct { TrafficWeight *int32 } +// Runtime - Container App Runtime configuration. +type Runtime struct { + // Java app configuration + Java *RuntimeJava +} + +// RuntimeJava - Java app configuration +type RuntimeJava struct { + // Enable jmx core metrics for the java app + EnableMetrics *bool +} + // Scale - Container App scaling configurations. type Scale struct { + // Optional. KEDA Cooldown Period in seconds. Defaults to 300 seconds if not set. + CooldownPeriod *int32 + // Optional. Maximum number of container replicas. Defaults to 10 if not set. MaxReplicas *int32 // Optional. Minimum number of container replicas. MinReplicas *int32 + // Optional. KEDA Polling Interval in seconds. Defaults to 30 seconds if not set. + PollingInterval *int32 + // Scaling rules. Rules []*ScaleRule } +// ScaleConfiguration - Scale configuration. +type ScaleConfiguration struct { + // The maximum count of sessions at the same time. + MaxConcurrentSessions *int32 + + // The minimum count of ready session instances. + ReadySessionInstances *int32 +} + // ScaleRule - Container App container scaling rule. type ScaleRule struct { // Azure Queue based scaling. @@ -2626,12 +2848,186 @@ type ServiceBind struct { ServiceID *string } +// SessionContainer - Container definitions for the sessions of the session pool. +type SessionContainer struct { + // Container start command arguments. + Args []*string + + // Container start command. + Command []*string + + // Container environment variables. + Env []*EnvironmentVar + + // Container image tag. + Image *string + + // Custom container name. + Name *string + + // Container resource requirements. + Resources *SessionContainerResources +} + +// SessionContainerResources - Container resource requirements for sessions of the session pool. +type SessionContainerResources struct { + // Required CPU in cores, e.g. 0.5 + CPU *float64 + + // Required memory, e.g. "250Mb" + Memory *string +} + +// SessionIngress - Session pool ingress configuration. +type SessionIngress struct { + // Target port in containers for traffic from ingress + TargetPort *int32 +} + +// SessionNetworkConfiguration - Session network configuration. +type SessionNetworkConfiguration struct { + // Network status for the sessions. + Status *SessionNetworkStatus +} + +// SessionPool - Container App session pool. +type SessionPool struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or credentials + // in code. + Identity *ManagedServiceIdentity + + // Container App session pool resource specific properties + Properties *SessionPoolProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SessionPoolCollection - Session pool collection Azure resource. +type SessionPoolCollection struct { + // REQUIRED; Collection of resources. + Value []*SessionPool + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// SessionPoolProperties - Container App session pool resource specific properties +type SessionPoolProperties struct { + // The container type of the sessions. + ContainerType *ContainerType + + // The custom container configuration if the containerType is CustomContainer. + CustomContainerTemplate *CustomContainerTemplate + + // The pool configuration if the poolManagementType is dynamic. + DynamicPoolConfiguration *DynamicPoolConfiguration + + // Resource ID of the session pool's environment. + EnvironmentID *string + + // Optional settings for a Managed Identity that is assigned to the Session pool. + ManagedIdentitySettings []*ManagedIdentitySetting + + // The pool management type of the session pool. + PoolManagementType *PoolManagementType + + // The scale configuration of the session pool. + ScaleConfiguration *ScaleConfiguration + + // The secrets of the session pool. + Secrets []*SessionPoolSecret + + // The network configuration of the sessions in the session pool. + SessionNetworkConfiguration *SessionNetworkConfiguration + + // READ-ONLY; The number of nodes the session pool is using. + NodeCount *int32 + + // READ-ONLY; The endpoint to manage the pool. + PoolManagementEndpoint *string + + // READ-ONLY; Provisioning state of the session pool. + ProvisioningState *SessionPoolProvisioningState +} + +// SessionPoolSecret - Secret definition. +type SessionPoolSecret struct { + // Secret Name. + Name *string + + // Secret Value. + Value *string +} + +// SessionPoolUpdatableProperties - Container App session pool updatable properties. +type SessionPoolUpdatableProperties struct { + // Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or credentials + // in code. + Identity *ManagedServiceIdentity + + // Session pool resource specific updatable properties. + Properties *SessionPoolUpdatablePropertiesProperties + + // Resource tags. + Tags map[string]*string +} + +// SessionPoolUpdatablePropertiesProperties - Session pool resource specific updatable properties. +type SessionPoolUpdatablePropertiesProperties struct { + // The custom container configuration if the containerType is CustomContainer. + CustomContainerTemplate *CustomContainerTemplate + + // The pool configuration if the poolManagementType is dynamic. + DynamicPoolConfiguration *DynamicPoolConfiguration + + // The scale configuration of the session pool. + ScaleConfiguration *ScaleConfiguration + + // The secrets of the session pool. + Secrets []*SessionPoolSecret + + // The network configuration of the sessions in the session pool. + SessionNetworkConfiguration *SessionNetworkConfiguration +} + +// SessionRegistryCredentials - Session pool private registry credentials. +type SessionRegistryCredentials struct { + // A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned + // identity Resource ID. For system-assigned identities, use 'system' + Identity *string + + // The name of the secret that contains the registry login password + PasswordSecretRef *string + + // Container registry server. + Server *string + + // Container registry username. + Username *string +} + // SourceControl - Container App SourceControl. type SourceControl struct { // SourceControl resource specific properties Properties *SourceControlProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -2669,6 +3065,99 @@ type SourceControlProperties struct { OperationState *SourceControlOperationState } +// SpringBootAdminComponent - Spring Boot Admin properties. +type SpringBootAdminComponent struct { + // REQUIRED; Type of the Java Component. + ComponentType *JavaComponentType + + // List of Java Components configuration properties + Configurations []*JavaComponentConfigurationProperty + + // Java Component Ingress configurations. + Ingress *JavaComponentIngress + + // Java component scaling configurations + Scale *JavaComponentPropertiesScale + + // List of Java Components that are bound to the Java component + ServiceBinds []*JavaComponentServiceBind + + // READ-ONLY; Provisioning state of the Java Component. + ProvisioningState *JavaComponentProvisioningState +} + +// GetJavaComponentProperties implements the JavaComponentPropertiesClassification interface for type SpringBootAdminComponent. +func (s *SpringBootAdminComponent) GetJavaComponentProperties() *JavaComponentProperties { + return &JavaComponentProperties{ + ComponentType: s.ComponentType, + Configurations: s.Configurations, + ProvisioningState: s.ProvisioningState, + Scale: s.Scale, + ServiceBinds: s.ServiceBinds, + } +} + +// SpringCloudConfigComponent - Spring Cloud Config properties. +type SpringCloudConfigComponent struct { + // REQUIRED; Type of the Java Component. + ComponentType *JavaComponentType + + // List of Java Components configuration properties + Configurations []*JavaComponentConfigurationProperty + + // Java component scaling configurations + Scale *JavaComponentPropertiesScale + + // List of Java Components that are bound to the Java component + ServiceBinds []*JavaComponentServiceBind + + // READ-ONLY; Provisioning state of the Java Component. + ProvisioningState *JavaComponentProvisioningState +} + +// GetJavaComponentProperties implements the JavaComponentPropertiesClassification interface for type SpringCloudConfigComponent. +func (s *SpringCloudConfigComponent) GetJavaComponentProperties() *JavaComponentProperties { + return &JavaComponentProperties{ + ComponentType: s.ComponentType, + Configurations: s.Configurations, + ProvisioningState: s.ProvisioningState, + Scale: s.Scale, + ServiceBinds: s.ServiceBinds, + } +} + +// SpringCloudEurekaComponent - Spring Cloud Eureka properties. +type SpringCloudEurekaComponent struct { + // REQUIRED; Type of the Java Component. + ComponentType *JavaComponentType + + // List of Java Components configuration properties + Configurations []*JavaComponentConfigurationProperty + + // Java Component Ingress configurations. + Ingress *JavaComponentIngress + + // Java component scaling configurations + Scale *JavaComponentPropertiesScale + + // List of Java Components that are bound to the Java component + ServiceBinds []*JavaComponentServiceBind + + // READ-ONLY; Provisioning state of the Java Component. + ProvisioningState *JavaComponentProvisioningState +} + +// GetJavaComponentProperties implements the JavaComponentPropertiesClassification interface for type SpringCloudEurekaComponent. +func (s *SpringCloudEurekaComponent) GetJavaComponentProperties() *JavaComponentProperties { + return &JavaComponentProperties{ + ComponentType: s.ComponentType, + Configurations: s.Configurations, + ProvisioningState: s.ProvisioningState, + Scale: s.Scale, + ServiceBinds: s.ServiceBinds, + } +} + // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). @@ -2695,6 +3184,10 @@ type TCPScaleRule struct { // Authentication secrets for the tcp scale rule. Auth []*ScaleRuleAuth + // The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned + // identity. + Identity *string + // Metadata properties to describe tcp scale rule. Metadata map[string]*string } @@ -2750,7 +3243,7 @@ type TrackedResource struct { // Resource tags. Tags map[string]*string - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource @@ -2852,7 +3345,7 @@ type VnetConfiguration struct { // Volume definitions for the Container App. type Volume struct { - // Mount options used while mounting the AzureFile. Must be a comma-separated string. + // Mount options used while mounting the Azure file share or NFS Azure file share. Must be a comma-separated string. MountOptions *string // Volume name. @@ -2900,7 +3393,7 @@ type WorkloadProfileStates struct { // Workload Profile resource specific properties. Properties *WorkloadProfileStatesProperties - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models_serde.go index e4b80637..8606ad42 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/models_serde.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -1075,6 +1072,37 @@ func (c *CertificateCollection) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CertificateKeyVaultProperties. +func (c CertificateKeyVaultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", c.Identity) + populate(objectMap, "keyVaultUrl", c.KeyVaultURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateKeyVaultProperties. +func (c *CertificateKeyVaultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) + case "keyVaultUrl": + err = unpopulate(val, "KeyVaultURL", &c.KeyVaultURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CertificatePatch. func (c CertificatePatch) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1105,6 +1133,7 @@ func (c *CertificatePatch) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CertificateProperties. func (c CertificateProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "certificateKeyVaultProperties", c.CertificateKeyVaultProperties) populateDateTimeRFC3339(objectMap, "expirationDate", c.ExpirationDate) populateDateTimeRFC3339(objectMap, "issueDate", c.IssueDate) populate(objectMap, "issuer", c.Issuer) @@ -1130,6 +1159,9 @@ func (c *CertificateProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "certificateKeyVaultProperties": + err = unpopulate(val, "CertificateKeyVaultProperties", &c.CertificateKeyVaultProperties) + delete(rawMsg, key) case "expirationDate": err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &c.ExpirationDate) delete(rawMsg, key) @@ -1275,9 +1307,11 @@ func (c Configuration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "activeRevisionsMode", c.ActiveRevisionsMode) populate(objectMap, "dapr", c.Dapr) + populate(objectMap, "identitySettings", c.IdentitySettings) populate(objectMap, "ingress", c.Ingress) populate(objectMap, "maxInactiveRevisions", c.MaxInactiveRevisions) populate(objectMap, "registries", c.Registries) + populate(objectMap, "runtime", c.Runtime) populate(objectMap, "secrets", c.Secrets) populate(objectMap, "service", c.Service) return json.Marshal(objectMap) @@ -1298,6 +1332,9 @@ func (c *Configuration) UnmarshalJSON(data []byte) error { case "dapr": err = unpopulate(val, "Dapr", &c.Dapr) delete(rawMsg, key) + case "identitySettings": + err = unpopulate(val, "IdentitySettings", &c.IdentitySettings) + delete(rawMsg, key) case "ingress": err = unpopulate(val, "Ingress", &c.Ingress) delete(rawMsg, key) @@ -1307,6 +1344,9 @@ func (c *Configuration) UnmarshalJSON(data []byte) error { case "registries": err = unpopulate(val, "Registries", &c.Registries) delete(rawMsg, key) + case "runtime": + err = unpopulate(val, "Runtime", &c.Runtime) + delete(rawMsg, key) case "secrets": err = unpopulate(val, "Secrets", &c.Secrets) delete(rawMsg, key) @@ -1990,6 +2030,7 @@ func (c ContainerAppProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "managedEnvironmentId", c.ManagedEnvironmentID) populate(objectMap, "outboundIpAddresses", c.OutboundIPAddresses) populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "runningStatus", c.RunningStatus) populate(objectMap, "template", c.Template) populate(objectMap, "workloadProfileName", c.WorkloadProfileName) return json.Marshal(objectMap) @@ -2034,6 +2075,9 @@ func (c *ContainerAppProperties) UnmarshalJSON(data []byte) error { case "provisioningState": err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) delete(rawMsg, key) + case "runningStatus": + err = unpopulate(val, "RunningStatus", &c.RunningStatus) + delete(rawMsg, key) case "template": err = unpopulate(val, "Template", &c.Template) delete(rawMsg, key) @@ -2200,6 +2244,41 @@ func (c *CorsPolicy) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CustomContainerTemplate. +func (c CustomContainerTemplate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containers", c.Containers) + populate(objectMap, "ingress", c.Ingress) + populate(objectMap, "registryCredentials", c.RegistryCredentials) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomContainerTemplate. +func (c *CustomContainerTemplate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containers": + err = unpopulate(val, "Containers", &c.Containers) + delete(rawMsg, key) + case "ingress": + err = unpopulate(val, "Ingress", &c.Ingress) + delete(rawMsg, key) + case "registryCredentials": + err = unpopulate(val, "RegistryCredentials", &c.RegistryCredentials) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CustomDomain. func (c CustomDomain) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2238,6 +2317,7 @@ func (c *CustomDomain) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomDomainConfiguration. func (c CustomDomainConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "certificateKeyVaultProperties", c.CertificateKeyVaultProperties) populate(objectMap, "certificatePassword", c.CertificatePassword) populateByteArray(objectMap, "certificateValue", c.CertificateValue, func() any { return runtime.EncodeByteArray(c.CertificateValue, runtime.Base64StdFormat) @@ -2259,6 +2339,9 @@ func (c *CustomDomainConfiguration) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "certificateKeyVaultProperties": + err = unpopulate(val, "CertificateKeyVaultProperties", &c.CertificateKeyVaultProperties) + delete(rawMsg, key) case "certificatePassword": err = unpopulate(val, "CertificatePassword", &c.CertificatePassword) delete(rawMsg, key) @@ -2474,6 +2557,7 @@ func (c *CustomOpenIDConnectProvider) UnmarshalJSON(data []byte) error { func (c CustomScaleRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "auth", c.Auth) + populate(objectMap, "identity", c.Identity) populate(objectMap, "metadata", c.Metadata) populate(objectMap, "type", c.Type) return json.Marshal(objectMap) @@ -2491,6 +2575,9 @@ func (c *CustomScaleRule) UnmarshalJSON(data []byte) error { case "auth": err = unpopulate(val, "Auth", &c.Auth) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &c.Metadata) delete(rawMsg, key) @@ -3381,6 +3468,33 @@ func (d *DiagnosticsStatus) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DynamicPoolConfiguration. +func (d DynamicPoolConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "lifecycleConfiguration", d.LifecycleConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DynamicPoolConfiguration. +func (d *DynamicPoolConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lifecycleConfiguration": + err = unpopulate(val, "LifecycleConfiguration", &d.LifecycleConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type EncryptionSettings. func (e EncryptionSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3907,6 +4021,7 @@ func (g *Google) UnmarshalJSON(data []byte) error { func (h HTTPScaleRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "auth", h.Auth) + populate(objectMap, "identity", h.Identity) populate(objectMap, "metadata", h.Metadata) return json.Marshal(objectMap) } @@ -3923,6 +4038,9 @@ func (h *HTTPScaleRule) UnmarshalJSON(data []byte) error { case "auth": err = unpopulate(val, "Auth", &h.Auth) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &h.Identity) + delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &h.Metadata) delete(rawMsg, key) @@ -4090,6 +4208,37 @@ func (i *IdentityProviders) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type IdentitySettings. +func (i IdentitySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", i.Identity) + populate(objectMap, "lifecycle", i.Lifecycle) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentitySettings. +func (i *IdentitySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &i.Identity) + delete(rawMsg, key) + case "lifecycle": + err = unpopulate(val, "Lifecycle", &i.Lifecycle) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Ingress. func (i Ingress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4278,22 +4427,19 @@ func (i *InitContainer) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Job. -func (j Job) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JavaComponent. +func (j JavaComponent) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", j.ID) - populate(objectMap, "identity", j.Identity) - populate(objectMap, "location", j.Location) populate(objectMap, "name", j.Name) populate(objectMap, "properties", j.Properties) populate(objectMap, "systemData", j.SystemData) - populate(objectMap, "tags", j.Tags) populate(objectMap, "type", j.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Job. -func (j *Job) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JavaComponent. +func (j *JavaComponent) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4304,24 +4450,15 @@ func (j *Job) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &j.ID) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &j.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &j.Location) - delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &j.Name) delete(rawMsg, key) case "properties": - err = unpopulate(val, "Properties", &j.Properties) + j.Properties, err = unmarshalJavaComponentPropertiesClassification(val) delete(rawMsg, key) case "systemData": err = unpopulate(val, "SystemData", &j.SystemData) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &j.Tags) - delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &j.Type) delete(rawMsg, key) @@ -4333,22 +4470,16 @@ func (j *Job) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobConfiguration. -func (j JobConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JavaComponentConfigurationProperty. +func (j JavaComponentConfigurationProperty) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "eventTriggerConfig", j.EventTriggerConfig) - populate(objectMap, "manualTriggerConfig", j.ManualTriggerConfig) - populate(objectMap, "registries", j.Registries) - populate(objectMap, "replicaRetryLimit", j.ReplicaRetryLimit) - populate(objectMap, "replicaTimeout", j.ReplicaTimeout) - populate(objectMap, "scheduleTriggerConfig", j.ScheduleTriggerConfig) - populate(objectMap, "secrets", j.Secrets) - populate(objectMap, "triggerType", j.TriggerType) + populate(objectMap, "propertyName", j.PropertyName) + populate(objectMap, "value", j.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobConfiguration. -func (j *JobConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JavaComponentConfigurationProperty. +func (j *JavaComponentConfigurationProperty) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4356,29 +4487,11 @@ func (j *JobConfiguration) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "eventTriggerConfig": - err = unpopulate(val, "EventTriggerConfig", &j.EventTriggerConfig) - delete(rawMsg, key) - case "manualTriggerConfig": - err = unpopulate(val, "ManualTriggerConfig", &j.ManualTriggerConfig) - delete(rawMsg, key) - case "registries": - err = unpopulate(val, "Registries", &j.Registries) - delete(rawMsg, key) - case "replicaRetryLimit": - err = unpopulate(val, "ReplicaRetryLimit", &j.ReplicaRetryLimit) - delete(rawMsg, key) - case "replicaTimeout": - err = unpopulate(val, "ReplicaTimeout", &j.ReplicaTimeout) - delete(rawMsg, key) - case "scheduleTriggerConfig": - err = unpopulate(val, "ScheduleTriggerConfig", &j.ScheduleTriggerConfig) - delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &j.Secrets) + case "propertyName": + err = unpopulate(val, "PropertyName", &j.PropertyName) delete(rawMsg, key) - case "triggerType": - err = unpopulate(val, "TriggerType", &j.TriggerType) + case "value": + err = unpopulate(val, "Value", &j.Value) delete(rawMsg, key) } if err != nil { @@ -4388,17 +4501,15 @@ func (j *JobConfiguration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobConfigurationEventTriggerConfig. -func (j JobConfigurationEventTriggerConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JavaComponentIngress. +func (j JavaComponentIngress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "parallelism", j.Parallelism) - populate(objectMap, "replicaCompletionCount", j.ReplicaCompletionCount) - populate(objectMap, "scale", j.Scale) + populate(objectMap, "fqdn", j.Fqdn) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobConfigurationEventTriggerConfig. -func (j *JobConfigurationEventTriggerConfig) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JavaComponentIngress. +func (j *JavaComponentIngress) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4406,14 +4517,8 @@ func (j *JobConfigurationEventTriggerConfig) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "parallelism": - err = unpopulate(val, "Parallelism", &j.Parallelism) - delete(rawMsg, key) - case "replicaCompletionCount": - err = unpopulate(val, "ReplicaCompletionCount", &j.ReplicaCompletionCount) - delete(rawMsg, key) - case "scale": - err = unpopulate(val, "Scale", &j.Scale) + case "fqdn": + err = unpopulate(val, "Fqdn", &j.Fqdn) delete(rawMsg, key) } if err != nil { @@ -4423,16 +4528,19 @@ func (j *JobConfigurationEventTriggerConfig) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobConfigurationManualTriggerConfig. -func (j JobConfigurationManualTriggerConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JavaComponentProperties. +func (j JavaComponentProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "parallelism", j.Parallelism) - populate(objectMap, "replicaCompletionCount", j.ReplicaCompletionCount) + objectMap["componentType"] = j.ComponentType + populate(objectMap, "configurations", j.Configurations) + populate(objectMap, "provisioningState", j.ProvisioningState) + populate(objectMap, "scale", j.Scale) + populate(objectMap, "serviceBinds", j.ServiceBinds) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobConfigurationManualTriggerConfig. -func (j *JobConfigurationManualTriggerConfig) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JavaComponentProperties. +func (j *JavaComponentProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4440,11 +4548,20 @@ func (j *JobConfigurationManualTriggerConfig) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "parallelism": - err = unpopulate(val, "Parallelism", &j.Parallelism) + case "componentType": + err = unpopulate(val, "ComponentType", &j.ComponentType) delete(rawMsg, key) - case "replicaCompletionCount": - err = unpopulate(val, "ReplicaCompletionCount", &j.ReplicaCompletionCount) + case "configurations": + err = unpopulate(val, "Configurations", &j.Configurations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) + delete(rawMsg, key) + case "scale": + err = unpopulate(val, "Scale", &j.Scale) + delete(rawMsg, key) + case "serviceBinds": + err = unpopulate(val, "ServiceBinds", &j.ServiceBinds) delete(rawMsg, key) } if err != nil { @@ -4454,17 +4571,16 @@ func (j *JobConfigurationManualTriggerConfig) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobConfigurationScheduleTriggerConfig. -func (j JobConfigurationScheduleTriggerConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JavaComponentPropertiesScale. +func (j JavaComponentPropertiesScale) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "cronExpression", j.CronExpression) - populate(objectMap, "parallelism", j.Parallelism) - populate(objectMap, "replicaCompletionCount", j.ReplicaCompletionCount) + populate(objectMap, "maxReplicas", j.MaxReplicas) + populate(objectMap, "minReplicas", j.MinReplicas) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobConfigurationScheduleTriggerConfig. -func (j *JobConfigurationScheduleTriggerConfig) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JavaComponentPropertiesScale. +func (j *JavaComponentPropertiesScale) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4472,14 +4588,11 @@ func (j *JobConfigurationScheduleTriggerConfig) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "cronExpression": - err = unpopulate(val, "CronExpression", &j.CronExpression) - delete(rawMsg, key) - case "parallelism": - err = unpopulate(val, "Parallelism", &j.Parallelism) + case "maxReplicas": + err = unpopulate(val, "MaxReplicas", &j.MaxReplicas) delete(rawMsg, key) - case "replicaCompletionCount": - err = unpopulate(val, "ReplicaCompletionCount", &j.ReplicaCompletionCount) + case "minReplicas": + err = unpopulate(val, "MinReplicas", &j.MinReplicas) delete(rawMsg, key) } if err != nil { @@ -4489,18 +4602,16 @@ func (j *JobConfigurationScheduleTriggerConfig) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type JobExecution. -func (j JobExecution) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JavaComponentServiceBind. +func (j JavaComponentServiceBind) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", j.ID) populate(objectMap, "name", j.Name) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "type", j.Type) + populate(objectMap, "serviceId", j.ServiceID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecution. -func (j *JobExecution) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JavaComponentServiceBind. +func (j *JavaComponentServiceBind) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4508,17 +4619,11 @@ func (j *JobExecution) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &j.ID) - delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &j.Name) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &j.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &j.Type) + case "serviceId": + err = unpopulate(val, "ServiceID", &j.ServiceID) delete(rawMsg, key) } if err != nil { @@ -4528,16 +4633,16 @@ func (j *JobExecution) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobExecutionBase. -func (j JobExecutionBase) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JavaComponentsCollection. +func (j JavaComponentsCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", j.ID) - populate(objectMap, "name", j.Name) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionBase. -func (j *JobExecutionBase) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JavaComponentsCollection. +func (j *JavaComponentsCollection) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4545,11 +4650,11 @@ func (j *JobExecutionBase) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &j.ID) + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &j.Name) + case "value": + err = unpopulate(val, "Value", &j.Value) delete(rawMsg, key) } if err != nil { @@ -4559,20 +4664,22 @@ func (j *JobExecutionBase) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobExecutionContainer. -func (j JobExecutionContainer) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Job. +func (j Job) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "args", j.Args) - populate(objectMap, "command", j.Command) - populate(objectMap, "env", j.Env) - populate(objectMap, "image", j.Image) - populate(objectMap, "name", j.Name) - populate(objectMap, "resources", j.Resources) + populate(objectMap, "id", j.ID) + populate(objectMap, "identity", j.Identity) + populate(objectMap, "location", j.Location) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "systemData", j.SystemData) + populate(objectMap, "tags", j.Tags) + populate(objectMap, "type", j.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionContainer. -func (j *JobExecutionContainer) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Job. +func (j *Job) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4580,23 +4687,29 @@ func (j *JobExecutionContainer) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "args": - err = unpopulate(val, "Args", &j.Args) - delete(rawMsg, key) - case "command": - err = unpopulate(val, "Command", &j.Command) + case "id": + err = unpopulate(val, "ID", &j.ID) delete(rawMsg, key) - case "env": - err = unpopulate(val, "Env", &j.Env) + case "identity": + err = unpopulate(val, "Identity", &j.Identity) delete(rawMsg, key) - case "image": - err = unpopulate(val, "Image", &j.Image) + case "location": + err = unpopulate(val, "Location", &j.Location) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &j.Name) delete(rawMsg, key) - case "resources": - err = unpopulate(val, "Resources", &j.Resources) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &j.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &j.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) delete(rawMsg, key) } if err != nil { @@ -4606,15 +4719,23 @@ func (j *JobExecutionContainer) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobExecutionNamesCollection. -func (j JobExecutionNamesCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobConfiguration. +func (j JobConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", j.Value) + populate(objectMap, "eventTriggerConfig", j.EventTriggerConfig) + populate(objectMap, "identitySettings", j.IdentitySettings) + populate(objectMap, "manualTriggerConfig", j.ManualTriggerConfig) + populate(objectMap, "registries", j.Registries) + populate(objectMap, "replicaRetryLimit", j.ReplicaRetryLimit) + populate(objectMap, "replicaTimeout", j.ReplicaTimeout) + populate(objectMap, "scheduleTriggerConfig", j.ScheduleTriggerConfig) + populate(objectMap, "secrets", j.Secrets) + populate(objectMap, "triggerType", j.TriggerType) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionNamesCollection. -func (j *JobExecutionNamesCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobConfiguration. +func (j *JobConfiguration) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4622,8 +4743,32 @@ func (j *JobExecutionNamesCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &j.Value) + case "eventTriggerConfig": + err = unpopulate(val, "EventTriggerConfig", &j.EventTriggerConfig) + delete(rawMsg, key) + case "identitySettings": + err = unpopulate(val, "IdentitySettings", &j.IdentitySettings) + delete(rawMsg, key) + case "manualTriggerConfig": + err = unpopulate(val, "ManualTriggerConfig", &j.ManualTriggerConfig) + delete(rawMsg, key) + case "registries": + err = unpopulate(val, "Registries", &j.Registries) + delete(rawMsg, key) + case "replicaRetryLimit": + err = unpopulate(val, "ReplicaRetryLimit", &j.ReplicaRetryLimit) + delete(rawMsg, key) + case "replicaTimeout": + err = unpopulate(val, "ReplicaTimeout", &j.ReplicaTimeout) + delete(rawMsg, key) + case "scheduleTriggerConfig": + err = unpopulate(val, "ScheduleTriggerConfig", &j.ScheduleTriggerConfig) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &j.Secrets) + delete(rawMsg, key) + case "triggerType": + err = unpopulate(val, "TriggerType", &j.TriggerType) delete(rawMsg, key) } if err != nil { @@ -4633,18 +4778,17 @@ func (j *JobExecutionNamesCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobExecutionProperties. -func (j JobExecutionProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobConfigurationEventTriggerConfig. +func (j JobConfigurationEventTriggerConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "endTime", j.EndTime) - populateDateTimeRFC3339(objectMap, "startTime", j.StartTime) - populate(objectMap, "status", j.Status) - populate(objectMap, "template", j.Template) + populate(objectMap, "parallelism", j.Parallelism) + populate(objectMap, "replicaCompletionCount", j.ReplicaCompletionCount) + populate(objectMap, "scale", j.Scale) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionProperties. -func (j *JobExecutionProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobConfigurationEventTriggerConfig. +func (j *JobConfigurationEventTriggerConfig) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4652,17 +4796,14 @@ func (j *JobExecutionProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "endTime": - err = unpopulateDateTimeRFC3339(val, "EndTime", &j.EndTime) - delete(rawMsg, key) - case "startTime": - err = unpopulateDateTimeRFC3339(val, "StartTime", &j.StartTime) + case "parallelism": + err = unpopulate(val, "Parallelism", &j.Parallelism) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &j.Status) + case "replicaCompletionCount": + err = unpopulate(val, "ReplicaCompletionCount", &j.ReplicaCompletionCount) delete(rawMsg, key) - case "template": - err = unpopulate(val, "Template", &j.Template) + case "scale": + err = unpopulate(val, "Scale", &j.Scale) delete(rawMsg, key) } if err != nil { @@ -4672,16 +4813,16 @@ func (j *JobExecutionProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobExecutionTemplate. -func (j JobExecutionTemplate) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobConfigurationManualTriggerConfig. +func (j JobConfigurationManualTriggerConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "containers", j.Containers) - populate(objectMap, "initContainers", j.InitContainers) + populate(objectMap, "parallelism", j.Parallelism) + populate(objectMap, "replicaCompletionCount", j.ReplicaCompletionCount) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionTemplate. -func (j *JobExecutionTemplate) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobConfigurationManualTriggerConfig. +func (j *JobConfigurationManualTriggerConfig) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4689,11 +4830,11 @@ func (j *JobExecutionTemplate) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "containers": - err = unpopulate(val, "Containers", &j.Containers) + case "parallelism": + err = unpopulate(val, "Parallelism", &j.Parallelism) delete(rawMsg, key) - case "initContainers": - err = unpopulate(val, "InitContainers", &j.InitContainers) + case "replicaCompletionCount": + err = unpopulate(val, "ReplicaCompletionCount", &j.ReplicaCompletionCount) delete(rawMsg, key) } if err != nil { @@ -4703,17 +4844,17 @@ func (j *JobExecutionTemplate) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobPatchProperties. -func (j JobPatchProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobConfigurationScheduleTriggerConfig. +func (j JobConfigurationScheduleTriggerConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "identity", j.Identity) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "tags", j.Tags) + populate(objectMap, "cronExpression", j.CronExpression) + populate(objectMap, "parallelism", j.Parallelism) + populate(objectMap, "replicaCompletionCount", j.ReplicaCompletionCount) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobPatchProperties. -func (j *JobPatchProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobConfigurationScheduleTriggerConfig. +func (j *JobConfigurationScheduleTriggerConfig) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4721,14 +4862,14 @@ func (j *JobPatchProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "identity": - err = unpopulate(val, "Identity", &j.Identity) + case "cronExpression": + err = unpopulate(val, "CronExpression", &j.CronExpression) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &j.Properties) + case "parallelism": + err = unpopulate(val, "Parallelism", &j.Parallelism) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &j.Tags) + case "replicaCompletionCount": + err = unpopulate(val, "ReplicaCompletionCount", &j.ReplicaCompletionCount) delete(rawMsg, key) } if err != nil { @@ -4738,19 +4879,18 @@ func (j *JobPatchProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobPatchPropertiesProperties. -func (j JobPatchPropertiesProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobExecution. +func (j JobExecution) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "configuration", j.Configuration) - populate(objectMap, "environmentId", j.EnvironmentID) - populate(objectMap, "eventStreamEndpoint", j.EventStreamEndpoint) - populate(objectMap, "outboundIpAddresses", j.OutboundIPAddresses) - populate(objectMap, "template", j.Template) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "type", j.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobPatchPropertiesProperties. -func (j *JobPatchPropertiesProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecution. +func (j *JobExecution) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4758,20 +4898,17 @@ func (j *JobPatchPropertiesProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "configuration": - err = unpopulate(val, "Configuration", &j.Configuration) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &j.EnvironmentID) + case "id": + err = unpopulate(val, "ID", &j.ID) delete(rawMsg, key) - case "eventStreamEndpoint": - err = unpopulate(val, "EventStreamEndpoint", &j.EventStreamEndpoint) + case "name": + err = unpopulate(val, "Name", &j.Name) delete(rawMsg, key) - case "outboundIpAddresses": - err = unpopulate(val, "OutboundIPAddresses", &j.OutboundIPAddresses) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) delete(rawMsg, key) - case "template": - err = unpopulate(val, "Template", &j.Template) + case "type": + err = unpopulate(val, "Type", &j.Type) delete(rawMsg, key) } if err != nil { @@ -4781,21 +4918,16 @@ func (j *JobPatchPropertiesProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobProperties. -func (j JobProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobExecutionBase. +func (j JobExecutionBase) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "configuration", j.Configuration) - populate(objectMap, "environmentId", j.EnvironmentID) - populate(objectMap, "eventStreamEndpoint", j.EventStreamEndpoint) - populate(objectMap, "outboundIpAddresses", j.OutboundIPAddresses) - populate(objectMap, "provisioningState", j.ProvisioningState) - populate(objectMap, "template", j.Template) - populate(objectMap, "workloadProfileName", j.WorkloadProfileName) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobProperties. -func (j *JobProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionBase. +func (j *JobExecutionBase) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4803,26 +4935,11 @@ func (j *JobProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "configuration": - err = unpopulate(val, "Configuration", &j.Configuration) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &j.EnvironmentID) - delete(rawMsg, key) - case "eventStreamEndpoint": - err = unpopulate(val, "EventStreamEndpoint", &j.EventStreamEndpoint) - delete(rawMsg, key) - case "outboundIpAddresses": - err = unpopulate(val, "OutboundIPAddresses", &j.OutboundIPAddresses) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) - delete(rawMsg, key) - case "template": - err = unpopulate(val, "Template", &j.Template) + case "id": + err = unpopulate(val, "ID", &j.ID) delete(rawMsg, key) - case "workloadProfileName": - err = unpopulate(val, "WorkloadProfileName", &j.WorkloadProfileName) + case "name": + err = unpopulate(val, "Name", &j.Name) delete(rawMsg, key) } if err != nil { @@ -4832,18 +4949,20 @@ func (j *JobProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobScale. -func (j JobScale) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobExecutionContainer. +func (j JobExecutionContainer) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "maxExecutions", j.MaxExecutions) - populate(objectMap, "minExecutions", j.MinExecutions) - populate(objectMap, "pollingInterval", j.PollingInterval) - populate(objectMap, "rules", j.Rules) + populate(objectMap, "args", j.Args) + populate(objectMap, "command", j.Command) + populate(objectMap, "env", j.Env) + populate(objectMap, "image", j.Image) + populate(objectMap, "name", j.Name) + populate(objectMap, "resources", j.Resources) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobScale. -func (j *JobScale) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionContainer. +func (j *JobExecutionContainer) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4851,17 +4970,23 @@ func (j *JobScale) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "maxExecutions": - err = unpopulate(val, "MaxExecutions", &j.MaxExecutions) - delete(rawMsg, key) - case "minExecutions": - err = unpopulate(val, "MinExecutions", &j.MinExecutions) + case "args": + err = unpopulate(val, "Args", &j.Args) delete(rawMsg, key) - case "pollingInterval": - err = unpopulate(val, "PollingInterval", &j.PollingInterval) + case "command": + err = unpopulate(val, "Command", &j.Command) delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &j.Rules) + case "env": + err = unpopulate(val, "Env", &j.Env) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &j.Image) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &j.Resources) delete(rawMsg, key) } if err != nil { @@ -4871,18 +4996,15 @@ func (j *JobScale) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobScaleRule. -func (j JobScaleRule) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobExecutionNamesCollection. +func (j JobExecutionNamesCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "auth", j.Auth) - populateAny(objectMap, "metadata", j.Metadata) - populate(objectMap, "name", j.Name) - populate(objectMap, "type", j.Type) + populate(objectMap, "value", j.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobScaleRule. -func (j *JobScaleRule) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionNamesCollection. +func (j *JobExecutionNamesCollection) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4890,17 +5012,8 @@ func (j *JobScaleRule) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "auth": - err = unpopulate(val, "Auth", &j.Auth) - delete(rawMsg, key) - case "metadata": - err = unpopulate(val, "Metadata", &j.Metadata) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &j.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &j.Type) + case "value": + err = unpopulate(val, "Value", &j.Value) delete(rawMsg, key) } if err != nil { @@ -4910,15 +5023,18 @@ func (j *JobScaleRule) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobSecretsCollection. -func (j JobSecretsCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobExecutionProperties. +func (j JobExecutionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", j.Value) + populateDateTimeRFC3339(objectMap, "endTime", j.EndTime) + populateDateTimeRFC3339(objectMap, "startTime", j.StartTime) + populate(objectMap, "status", j.Status) + populate(objectMap, "template", j.Template) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobSecretsCollection. -func (j *JobSecretsCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionProperties. +func (j *JobExecutionProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4926,8 +5042,17 @@ func (j *JobSecretsCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &j.Value) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &j.EndTime) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &j.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &j.Status) + delete(rawMsg, key) + case "template": + err = unpopulate(val, "Template", &j.Template) delete(rawMsg, key) } if err != nil { @@ -4937,17 +5062,16 @@ func (j *JobSecretsCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobTemplate. -func (j JobTemplate) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobExecutionTemplate. +func (j JobExecutionTemplate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "containers", j.Containers) populate(objectMap, "initContainers", j.InitContainers) - populate(objectMap, "volumes", j.Volumes) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobTemplate. -func (j *JobTemplate) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionTemplate. +func (j *JobExecutionTemplate) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4961,9 +5085,6 @@ func (j *JobTemplate) UnmarshalJSON(data []byte) error { case "initContainers": err = unpopulate(val, "InitContainers", &j.InitContainers) delete(rawMsg, key) - case "volumes": - err = unpopulate(val, "Volumes", &j.Volumes) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4972,16 +5093,17 @@ func (j *JobTemplate) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JobsCollection. -func (j JobsCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobPatchProperties. +func (j JobPatchProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", j.NextLink) - populate(objectMap, "value", j.Value) + populate(objectMap, "identity", j.Identity) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "tags", j.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JobsCollection. -func (j *JobsCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobPatchProperties. +func (j *JobPatchProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -4989,11 +5111,14 @@ func (j *JobsCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &j.NextLink) + case "identity": + err = unpopulate(val, "Identity", &j.Identity) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &j.Value) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &j.Tags) delete(rawMsg, key) } if err != nil { @@ -5003,16 +5128,19 @@ func (j *JobsCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type JwtClaimChecks. -func (j JwtClaimChecks) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobPatchPropertiesProperties. +func (j JobPatchPropertiesProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowedClientApplications", j.AllowedClientApplications) - populate(objectMap, "allowedGroups", j.AllowedGroups) + populate(objectMap, "configuration", j.Configuration) + populate(objectMap, "environmentId", j.EnvironmentID) + populate(objectMap, "eventStreamEndpoint", j.EventStreamEndpoint) + populate(objectMap, "outboundIpAddresses", j.OutboundIPAddresses) + populate(objectMap, "template", j.Template) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JwtClaimChecks. -func (j *JwtClaimChecks) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobPatchPropertiesProperties. +func (j *JobPatchPropertiesProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", j, err) @@ -5020,11 +5148,20 @@ func (j *JwtClaimChecks) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "allowedClientApplications": - err = unpopulate(val, "AllowedClientApplications", &j.AllowedClientApplications) + case "configuration": + err = unpopulate(val, "Configuration", &j.Configuration) delete(rawMsg, key) - case "allowedGroups": - err = unpopulate(val, "AllowedGroups", &j.AllowedGroups) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &j.EnvironmentID) + delete(rawMsg, key) + case "eventStreamEndpoint": + err = unpopulate(val, "EventStreamEndpoint", &j.EventStreamEndpoint) + delete(rawMsg, key) + case "outboundIpAddresses": + err = unpopulate(val, "OutboundIPAddresses", &j.OutboundIPAddresses) + delete(rawMsg, key) + case "template": + err = unpopulate(val, "Template", &j.Template) delete(rawMsg, key) } if err != nil { @@ -5034,99 +5171,391 @@ func (j *JwtClaimChecks) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type KedaConfiguration. -func (k KedaConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobProperties. +func (j JobProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "version", k.Version) + populate(objectMap, "configuration", j.Configuration) + populate(objectMap, "environmentId", j.EnvironmentID) + populate(objectMap, "eventStreamEndpoint", j.EventStreamEndpoint) + populate(objectMap, "outboundIpAddresses", j.OutboundIPAddresses) + populate(objectMap, "provisioningState", j.ProvisioningState) + populate(objectMap, "template", j.Template) + populate(objectMap, "workloadProfileName", j.WorkloadProfileName) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KedaConfiguration. -func (k *KedaConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobProperties. +func (j *JobProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", j, err) } for key, val := range rawMsg { var err error switch key { - case "version": - err = unpopulate(val, "Version", &k.Version) + case "configuration": + err = unpopulate(val, "Configuration", &j.Configuration) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &j.EnvironmentID) + delete(rawMsg, key) + case "eventStreamEndpoint": + err = unpopulate(val, "EventStreamEndpoint", &j.EventStreamEndpoint) + delete(rawMsg, key) + case "outboundIpAddresses": + err = unpopulate(val, "OutboundIPAddresses", &j.OutboundIPAddresses) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) + delete(rawMsg, key) + case "template": + err = unpopulate(val, "Template", &j.Template) + delete(rawMsg, key) + case "workloadProfileName": + err = unpopulate(val, "WorkloadProfileName", &j.WorkloadProfileName) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", j, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ListUsagesResult. -func (l ListUsagesResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobScale. +func (j JobScale) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) + populate(objectMap, "maxExecutions", j.MaxExecutions) + populate(objectMap, "minExecutions", j.MinExecutions) + populate(objectMap, "pollingInterval", j.PollingInterval) + populate(objectMap, "rules", j.Rules) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ListUsagesResult. -func (l *ListUsagesResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobScale. +func (j *JobScale) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", j, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) + case "maxExecutions": + err = unpopulate(val, "MaxExecutions", &j.MaxExecutions) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) + case "minExecutions": + err = unpopulate(val, "MinExecutions", &j.MinExecutions) + delete(rawMsg, key) + case "pollingInterval": + err = unpopulate(val, "PollingInterval", &j.PollingInterval) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &j.Rules) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", j, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LogAnalyticsConfiguration. -func (l LogAnalyticsConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobScaleRule. +func (j JobScaleRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "customerId", l.CustomerID) - populate(objectMap, "sharedKey", l.SharedKey) + populate(objectMap, "auth", j.Auth) + populate(objectMap, "identity", j.Identity) + populateAny(objectMap, "metadata", j.Metadata) + populate(objectMap, "name", j.Name) + populate(objectMap, "type", j.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsConfiguration. -func (l *LogAnalyticsConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type JobScaleRule. +func (j *JobScaleRule) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", j, err) } for key, val := range rawMsg { var err error switch key { - case "customerId": - err = unpopulate(val, "CustomerID", &l.CustomerID) + case "auth": + err = unpopulate(val, "Auth", &j.Auth) delete(rawMsg, key) - case "sharedKey": - err = unpopulate(val, "SharedKey", &l.SharedKey) + case "identity": + err = unpopulate(val, "Identity", &j.Identity) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &j.Metadata) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", j, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Login. -func (l Login) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type JobSecretsCollection. +func (j JobSecretsCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowedExternalRedirectUrls", l.AllowedExternalRedirectUrls) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobSecretsCollection. +func (j *JobSecretsCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobTemplate. +func (j JobTemplate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containers", j.Containers) + populate(objectMap, "initContainers", j.InitContainers) + populate(objectMap, "volumes", j.Volumes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobTemplate. +func (j *JobTemplate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containers": + err = unpopulate(val, "Containers", &j.Containers) + delete(rawMsg, key) + case "initContainers": + err = unpopulate(val, "InitContainers", &j.InitContainers) + delete(rawMsg, key) + case "volumes": + err = unpopulate(val, "Volumes", &j.Volumes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobsCollection. +func (j JobsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobsCollection. +func (j *JobsCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JwtClaimChecks. +func (j JwtClaimChecks) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedClientApplications", j.AllowedClientApplications) + populate(objectMap, "allowedGroups", j.AllowedGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JwtClaimChecks. +func (j *JwtClaimChecks) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedClientApplications": + err = unpopulate(val, "AllowedClientApplications", &j.AllowedClientApplications) + delete(rawMsg, key) + case "allowedGroups": + err = unpopulate(val, "AllowedGroups", &j.AllowedGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KedaConfiguration. +func (k KedaConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "version", k.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KedaConfiguration. +func (k *KedaConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "version": + err = unpopulate(val, "Version", &k.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LifecycleConfiguration. +func (l LifecycleConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cooldownPeriodInSeconds", l.CooldownPeriodInSeconds) + populate(objectMap, "lifecycleType", l.LifecycleType) + populate(objectMap, "maxAlivePeriodInSeconds", l.MaxAlivePeriodInSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LifecycleConfiguration. +func (l *LifecycleConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cooldownPeriodInSeconds": + err = unpopulate(val, "CooldownPeriodInSeconds", &l.CooldownPeriodInSeconds) + delete(rawMsg, key) + case "lifecycleType": + err = unpopulate(val, "LifecycleType", &l.LifecycleType) + delete(rawMsg, key) + case "maxAlivePeriodInSeconds": + err = unpopulate(val, "MaxAlivePeriodInSeconds", &l.MaxAlivePeriodInSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListUsagesResult. +func (l ListUsagesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListUsagesResult. +func (l *ListUsagesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogAnalyticsConfiguration. +func (l LogAnalyticsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customerId", l.CustomerID) + populate(objectMap, "sharedKey", l.SharedKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsConfiguration. +func (l *LogAnalyticsConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customerId": + err = unpopulate(val, "CustomerID", &l.CustomerID) + delete(rawMsg, key) + case "sharedKey": + err = unpopulate(val, "SharedKey", &l.SharedKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Login. +func (l Login) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedExternalRedirectUrls", l.AllowedExternalRedirectUrls) populate(objectMap, "cookieExpiration", l.CookieExpiration) populate(objectMap, "nonce", l.Nonce) populate(objectMap, "preserveUrlFragmentsForLogins", l.PreserveURLFragmentsForLogins) @@ -5380,6 +5809,7 @@ func (m *ManagedCertificateProperties) UnmarshalJSON(data []byte) error { func (m ManagedEnvironment) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", m.ID) + populate(objectMap, "identity", m.Identity) populate(objectMap, "kind", m.Kind) populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) @@ -5402,6 +5832,9 @@ func (m *ManagedEnvironment) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + delete(rawMsg, key) case "kind": err = unpopulate(val, "Kind", &m.Kind) delete(rawMsg, key) @@ -5650,6 +6083,7 @@ func (m *ManagedEnvironmentStorage) UnmarshalJSON(data []byte) error { func (m ManagedEnvironmentStorageProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "azureFile", m.AzureFile) + populate(objectMap, "nfsAzureFile", m.NfsAzureFile) return json.Marshal(objectMap) } @@ -5665,6 +6099,9 @@ func (m *ManagedEnvironmentStorageProperties) UnmarshalJSON(data []byte) error { case "azureFile": err = unpopulate(val, "AzureFile", &m.AzureFile) delete(rawMsg, key) + case "nfsAzureFile": + err = unpopulate(val, "NfsAzureFile", &m.NfsAzureFile) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -5731,18 +6168,16 @@ func (m *ManagedEnvironmentsCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. -func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentitySetting. +func (m ManagedIdentitySetting) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + populate(objectMap, "identity", m.Identity) + populate(objectMap, "lifecycle", m.Lifecycle) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. -func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentitySetting. +func (m *ManagedIdentitySetting) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -5750,16 +6185,49 @@ func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "lifecycle": + err = unpopulate(val, "Lifecycle", &m.Lifecycle) delete(rawMsg, key) - case "userAssignedIdentities": + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) delete(rawMsg, key) } @@ -5797,6 +6265,41 @@ func (m *Mtls) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type NfsAzureFileProperties. +func (n NfsAzureFileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessMode", n.AccessMode) + populate(objectMap, "server", n.Server) + populate(objectMap, "shareName", n.ShareName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NfsAzureFileProperties. +func (n *NfsAzureFileProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessMode": + err = unpopulate(val, "AccessMode", &n.AccessMode) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &n.Server) + delete(rawMsg, key) + case "shareName": + err = unpopulate(val, "ShareName", &n.ShareName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Nonce. func (n Nonce) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6088,7 +6591,9 @@ func (p *ProxyResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QueueScaleRule. func (q QueueScaleRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "accountName", q.AccountName) populate(objectMap, "auth", q.Auth) + populate(objectMap, "identity", q.Identity) populate(objectMap, "queueLength", q.QueueLength) populate(objectMap, "queueName", q.QueueName) return json.Marshal(objectMap) @@ -6103,9 +6608,15 @@ func (q *QueueScaleRule) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "accountName": + err = unpopulate(val, "AccountName", &q.AccountName) + delete(rawMsg, key) case "auth": err = unpopulate(val, "Auth", &q.Auth) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &q.Identity) + delete(rawMsg, key) case "queueLength": err = unpopulate(val, "QueueLength", &q.QueueLength) delete(rawMsg, key) @@ -6540,23 +7051,483 @@ func (r *RevisionProperties) UnmarshalJSON(data []byte) error { delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Runtime. +func (r Runtime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "java", r.Java) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Runtime. +func (r *Runtime) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "java": + err = unpopulate(val, "Java", &r.Java) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RuntimeJava. +func (r RuntimeJava) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableMetrics", r.EnableMetrics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RuntimeJava. +func (r *RuntimeJava) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableMetrics": + err = unpopulate(val, "EnableMetrics", &r.EnableMetrics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Scale. +func (s Scale) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cooldownPeriod", s.CooldownPeriod) + populate(objectMap, "maxReplicas", s.MaxReplicas) + populate(objectMap, "minReplicas", s.MinReplicas) + populate(objectMap, "pollingInterval", s.PollingInterval) + populate(objectMap, "rules", s.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Scale. +func (s *Scale) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cooldownPeriod": + err = unpopulate(val, "CooldownPeriod", &s.CooldownPeriod) + delete(rawMsg, key) + case "maxReplicas": + err = unpopulate(val, "MaxReplicas", &s.MaxReplicas) + delete(rawMsg, key) + case "minReplicas": + err = unpopulate(val, "MinReplicas", &s.MinReplicas) + delete(rawMsg, key) + case "pollingInterval": + err = unpopulate(val, "PollingInterval", &s.PollingInterval) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &s.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleConfiguration. +func (s ScaleConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxConcurrentSessions", s.MaxConcurrentSessions) + populate(objectMap, "readySessionInstances", s.ReadySessionInstances) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleConfiguration. +func (s *ScaleConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxConcurrentSessions": + err = unpopulate(val, "MaxConcurrentSessions", &s.MaxConcurrentSessions) + delete(rawMsg, key) + case "readySessionInstances": + err = unpopulate(val, "ReadySessionInstances", &s.ReadySessionInstances) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleRule. +func (s ScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureQueue", s.AzureQueue) + populate(objectMap, "custom", s.Custom) + populate(objectMap, "http", s.HTTP) + populate(objectMap, "name", s.Name) + populate(objectMap, "tcp", s.TCP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleRule. +func (s *ScaleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureQueue": + err = unpopulate(val, "AzureQueue", &s.AzureQueue) + delete(rawMsg, key) + case "custom": + err = unpopulate(val, "Custom", &s.Custom) + delete(rawMsg, key) + case "http": + err = unpopulate(val, "HTTP", &s.HTTP) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "tcp": + err = unpopulate(val, "TCP", &s.TCP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleRuleAuth. +func (s ScaleRuleAuth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "secretRef", s.SecretRef) + populate(objectMap, "triggerParameter", s.TriggerParameter) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleRuleAuth. +func (s *ScaleRuleAuth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "secretRef": + err = unpopulate(val, "SecretRef", &s.SecretRef) + delete(rawMsg, key) + case "triggerParameter": + err = unpopulate(val, "TriggerParameter", &s.TriggerParameter) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Secret. +func (s Secret) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "keyVaultUrl", s.KeyVaultURL) + populate(objectMap, "name", s.Name) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Secret. +func (s *Secret) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "keyVaultUrl": + err = unpopulate(val, "KeyVaultURL", &s.KeyVaultURL) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretVolumeItem. +func (s SecretVolumeItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "path", s.Path) + populate(objectMap, "secretRef", s.SecretRef) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretVolumeItem. +func (s *SecretVolumeItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "secretRef": + err = unpopulate(val, "SecretRef", &s.SecretRef) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretsCollection. +func (s SecretsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretsCollection. +func (s *SecretsCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Service. +func (s Service) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Service. +func (s *Service) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceBind. +func (s ServiceBind) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + populate(objectMap, "serviceId", s.ServiceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBind. +func (s *ServiceBind) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "serviceId": + err = unpopulate(val, "ServiceID", &s.ServiceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionContainer. +func (s SessionContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "args", s.Args) + populate(objectMap, "command", s.Command) + populate(objectMap, "env", s.Env) + populate(objectMap, "image", s.Image) + populate(objectMap, "name", s.Name) + populate(objectMap, "resources", s.Resources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionContainer. +func (s *SessionContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "args": + err = unpopulate(val, "Args", &s.Args) + delete(rawMsg, key) + case "command": + err = unpopulate(val, "Command", &s.Command) + delete(rawMsg, key) + case "env": + err = unpopulate(val, "Env", &s.Env) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &s.Image) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &s.Resources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionContainerResources. +func (s SessionContainerResources) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", s.CPU) + populate(objectMap, "memory", s.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionContainerResources. +func (s *SessionContainerResources) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &s.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &s.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionIngress. +func (s SessionIngress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetPort", s.TargetPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionIngress. +func (s *SessionIngress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetPort": + err = unpopulate(val, "TargetPort", &s.TargetPort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type Scale. -func (s Scale) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SessionNetworkConfiguration. +func (s SessionNetworkConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "maxReplicas", s.MaxReplicas) - populate(objectMap, "minReplicas", s.MinReplicas) - populate(objectMap, "rules", s.Rules) + populate(objectMap, "status", s.Status) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Scale. -func (s *Scale) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionNetworkConfiguration. +func (s *SessionNetworkConfiguration) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -6564,14 +7535,8 @@ func (s *Scale) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "maxReplicas": - err = unpopulate(val, "MaxReplicas", &s.MaxReplicas) - delete(rawMsg, key) - case "minReplicas": - err = unpopulate(val, "MinReplicas", &s.MinReplicas) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &s.Rules) + case "status": + err = unpopulate(val, "Status", &s.Status) delete(rawMsg, key) } if err != nil { @@ -6581,19 +7546,22 @@ func (s *Scale) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ScaleRule. -func (s ScaleRule) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SessionPool. +func (s SessionPool) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "azureQueue", s.AzureQueue) - populate(objectMap, "custom", s.Custom) - populate(objectMap, "http", s.HTTP) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "location", s.Location) populate(objectMap, "name", s.Name) - populate(objectMap, "tcp", s.TCP) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleRule. -func (s *ScaleRule) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionPool. +func (s *SessionPool) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -6601,20 +7569,29 @@ func (s *ScaleRule) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "azureQueue": - err = unpopulate(val, "AzureQueue", &s.AzureQueue) + case "id": + err = unpopulate(val, "ID", &s.ID) delete(rawMsg, key) - case "custom": - err = unpopulate(val, "Custom", &s.Custom) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) delete(rawMsg, key) - case "http": - err = unpopulate(val, "HTTP", &s.HTTP) + case "location": + err = unpopulate(val, "Location", &s.Location) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) - case "tcp": - err = unpopulate(val, "TCP", &s.TCP) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) delete(rawMsg, key) } if err != nil { @@ -6624,16 +7601,16 @@ func (s *ScaleRule) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ScaleRuleAuth. -func (s ScaleRuleAuth) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SessionPoolCollection. +func (s SessionPoolCollection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "secretRef", s.SecretRef) - populate(objectMap, "triggerParameter", s.TriggerParameter) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleRuleAuth. -func (s *ScaleRuleAuth) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionPoolCollection. +func (s *SessionPoolCollection) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -6641,11 +7618,11 @@ func (s *ScaleRuleAuth) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "secretRef": - err = unpopulate(val, "SecretRef", &s.SecretRef) + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) delete(rawMsg, key) - case "triggerParameter": - err = unpopulate(val, "TriggerParameter", &s.TriggerParameter) + case "value": + err = unpopulate(val, "Value", &s.Value) delete(rawMsg, key) } if err != nil { @@ -6655,18 +7632,26 @@ func (s *ScaleRuleAuth) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Secret. -func (s Secret) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SessionPoolProperties. +func (s SessionPoolProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "keyVaultUrl", s.KeyVaultURL) - populate(objectMap, "name", s.Name) - populate(objectMap, "value", s.Value) + populate(objectMap, "containerType", s.ContainerType) + populate(objectMap, "customContainerTemplate", s.CustomContainerTemplate) + populate(objectMap, "dynamicPoolConfiguration", s.DynamicPoolConfiguration) + populate(objectMap, "environmentId", s.EnvironmentID) + populate(objectMap, "managedIdentitySettings", s.ManagedIdentitySettings) + populate(objectMap, "nodeCount", s.NodeCount) + populate(objectMap, "poolManagementEndpoint", s.PoolManagementEndpoint) + populate(objectMap, "poolManagementType", s.PoolManagementType) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "scaleConfiguration", s.ScaleConfiguration) + populate(objectMap, "secrets", s.Secrets) + populate(objectMap, "sessionNetworkConfiguration", s.SessionNetworkConfiguration) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Secret. -func (s *Secret) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionPoolProperties. +func (s *SessionPoolProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -6674,17 +7659,41 @@ func (s *Secret) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "identity": - err = unpopulate(val, "Identity", &s.Identity) + case "containerType": + err = unpopulate(val, "ContainerType", &s.ContainerType) delete(rawMsg, key) - case "keyVaultUrl": - err = unpopulate(val, "KeyVaultURL", &s.KeyVaultURL) + case "customContainerTemplate": + err = unpopulate(val, "CustomContainerTemplate", &s.CustomContainerTemplate) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) + case "dynamicPoolConfiguration": + err = unpopulate(val, "DynamicPoolConfiguration", &s.DynamicPoolConfiguration) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &s.EnvironmentID) + delete(rawMsg, key) + case "managedIdentitySettings": + err = unpopulate(val, "ManagedIdentitySettings", &s.ManagedIdentitySettings) + delete(rawMsg, key) + case "nodeCount": + err = unpopulate(val, "NodeCount", &s.NodeCount) + delete(rawMsg, key) + case "poolManagementEndpoint": + err = unpopulate(val, "PoolManagementEndpoint", &s.PoolManagementEndpoint) + delete(rawMsg, key) + case "poolManagementType": + err = unpopulate(val, "PoolManagementType", &s.PoolManagementType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "scaleConfiguration": + err = unpopulate(val, "ScaleConfiguration", &s.ScaleConfiguration) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &s.Secrets) + delete(rawMsg, key) + case "sessionNetworkConfiguration": + err = unpopulate(val, "SessionNetworkConfiguration", &s.SessionNetworkConfiguration) delete(rawMsg, key) } if err != nil { @@ -6694,16 +7703,16 @@ func (s *Secret) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SecretVolumeItem. -func (s SecretVolumeItem) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SessionPoolSecret. +func (s SessionPoolSecret) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "path", s.Path) - populate(objectMap, "secretRef", s.SecretRef) + populate(objectMap, "name", s.Name) + populate(objectMap, "value", s.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SecretVolumeItem. -func (s *SecretVolumeItem) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionPoolSecret. +func (s *SessionPoolSecret) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -6711,11 +7720,11 @@ func (s *SecretVolumeItem) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "path": - err = unpopulate(val, "Path", &s.Path) + case "name": + err = unpopulate(val, "Name", &s.Name) delete(rawMsg, key) - case "secretRef": - err = unpopulate(val, "SecretRef", &s.SecretRef) + case "value": + err = unpopulate(val, "Value", &s.Value) delete(rawMsg, key) } if err != nil { @@ -6725,15 +7734,17 @@ func (s *SecretVolumeItem) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SecretsCollection. -func (s SecretsCollection) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SessionPoolUpdatableProperties. +func (s SessionPoolUpdatableProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", s.Value) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SecretsCollection. -func (s *SecretsCollection) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionPoolUpdatableProperties. +func (s *SessionPoolUpdatableProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -6741,8 +7752,14 @@ func (s *SecretsCollection) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &s.Value) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) delete(rawMsg, key) } if err != nil { @@ -6752,15 +7769,19 @@ func (s *SecretsCollection) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Service. -func (s Service) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SessionPoolUpdatablePropertiesProperties. +func (s SessionPoolUpdatablePropertiesProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "type", s.Type) + populate(objectMap, "customContainerTemplate", s.CustomContainerTemplate) + populate(objectMap, "dynamicPoolConfiguration", s.DynamicPoolConfiguration) + populate(objectMap, "scaleConfiguration", s.ScaleConfiguration) + populate(objectMap, "secrets", s.Secrets) + populate(objectMap, "sessionNetworkConfiguration", s.SessionNetworkConfiguration) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Service. -func (s *Service) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionPoolUpdatablePropertiesProperties. +func (s *SessionPoolUpdatablePropertiesProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -6768,8 +7789,20 @@ func (s *Service) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "type": - err = unpopulate(val, "Type", &s.Type) + case "customContainerTemplate": + err = unpopulate(val, "CustomContainerTemplate", &s.CustomContainerTemplate) + delete(rawMsg, key) + case "dynamicPoolConfiguration": + err = unpopulate(val, "DynamicPoolConfiguration", &s.DynamicPoolConfiguration) + delete(rawMsg, key) + case "scaleConfiguration": + err = unpopulate(val, "ScaleConfiguration", &s.ScaleConfiguration) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &s.Secrets) + delete(rawMsg, key) + case "sessionNetworkConfiguration": + err = unpopulate(val, "SessionNetworkConfiguration", &s.SessionNetworkConfiguration) delete(rawMsg, key) } if err != nil { @@ -6779,16 +7812,18 @@ func (s *Service) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ServiceBind. -func (s ServiceBind) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type SessionRegistryCredentials. +func (s SessionRegistryCredentials) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", s.Name) - populate(objectMap, "serviceId", s.ServiceID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "passwordSecretRef", s.PasswordSecretRef) + populate(objectMap, "server", s.Server) + populate(objectMap, "username", s.Username) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceBind. -func (s *ServiceBind) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionRegistryCredentials. +func (s *SessionRegistryCredentials) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -6796,11 +7831,17 @@ func (s *ServiceBind) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &s.Name) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) delete(rawMsg, key) - case "serviceId": - err = unpopulate(val, "ServiceID", &s.ServiceID) + case "passwordSecretRef": + err = unpopulate(val, "PasswordSecretRef", &s.PasswordSecretRef) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &s.Server) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &s.Username) delete(rawMsg, key) } if err != nil { @@ -6923,6 +7964,143 @@ func (s *SourceControlProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SpringBootAdminComponent. +func (s SpringBootAdminComponent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["componentType"] = JavaComponentTypeSpringBootAdmin + populate(objectMap, "configurations", s.Configurations) + populate(objectMap, "ingress", s.Ingress) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "scale", s.Scale) + populate(objectMap, "serviceBinds", s.ServiceBinds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SpringBootAdminComponent. +func (s *SpringBootAdminComponent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentType": + err = unpopulate(val, "ComponentType", &s.ComponentType) + delete(rawMsg, key) + case "configurations": + err = unpopulate(val, "Configurations", &s.Configurations) + delete(rawMsg, key) + case "ingress": + err = unpopulate(val, "Ingress", &s.Ingress) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "scale": + err = unpopulate(val, "Scale", &s.Scale) + delete(rawMsg, key) + case "serviceBinds": + err = unpopulate(val, "ServiceBinds", &s.ServiceBinds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SpringCloudConfigComponent. +func (s SpringCloudConfigComponent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["componentType"] = JavaComponentTypeSpringCloudConfig + populate(objectMap, "configurations", s.Configurations) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "scale", s.Scale) + populate(objectMap, "serviceBinds", s.ServiceBinds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SpringCloudConfigComponent. +func (s *SpringCloudConfigComponent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentType": + err = unpopulate(val, "ComponentType", &s.ComponentType) + delete(rawMsg, key) + case "configurations": + err = unpopulate(val, "Configurations", &s.Configurations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "scale": + err = unpopulate(val, "Scale", &s.Scale) + delete(rawMsg, key) + case "serviceBinds": + err = unpopulate(val, "ServiceBinds", &s.ServiceBinds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SpringCloudEurekaComponent. +func (s SpringCloudEurekaComponent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["componentType"] = JavaComponentTypeSpringCloudEureka + populate(objectMap, "configurations", s.Configurations) + populate(objectMap, "ingress", s.Ingress) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "scale", s.Scale) + populate(objectMap, "serviceBinds", s.ServiceBinds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SpringCloudEurekaComponent. +func (s *SpringCloudEurekaComponent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentType": + err = unpopulate(val, "ComponentType", &s.ComponentType) + delete(rawMsg, key) + case "configurations": + err = unpopulate(val, "Configurations", &s.Configurations) + delete(rawMsg, key) + case "ingress": + err = unpopulate(val, "Ingress", &s.Ingress) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "scale": + err = unpopulate(val, "Scale", &s.Scale) + delete(rawMsg, key) + case "serviceBinds": + err = unpopulate(val, "ServiceBinds", &s.ServiceBinds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6974,6 +8152,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { func (t TCPScaleRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "auth", t.Auth) + populate(objectMap, "identity", t.Identity) populate(objectMap, "metadata", t.Metadata) return json.Marshal(objectMap) } @@ -6990,6 +8169,9 @@ func (t *TCPScaleRule) UnmarshalJSON(data []byte) error { case "auth": err = unpopulate(val, "Auth", &t.Auth) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &t.Identity) + delete(rawMsg, key) case "metadata": err = unpopulate(val, "Metadata", &t.Metadata) delete(rawMsg, key) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/namespaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/namespaces_client.go index fff8f0a4..c8f71a66 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/namespaces_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/namespaces_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewNamespacesClient(subscriptionID string, credential azcore.TokenCredentia // CheckNameAvailability - Checks if resource name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - environmentName - Name of the Managed Environment. // - checkNameAvailabilityRequest - The check name availability request. @@ -75,7 +72,7 @@ func (client *NamespacesClient) CheckNameAvailability(ctx context.Context, resou } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *NamespacesClient) checkNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, checkNameAvailabilityRequest CheckNameAvailabilityRequest, options *NamespacesClientCheckNameAvailabilityOptions) (*policy.Request, error) { +func (client *NamespacesClient) checkNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, checkNameAvailabilityRequest CheckNameAvailabilityRequest, _ *NamespacesClientCheckNameAvailabilityOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/checkNameAvailability" if client.subscriptionID == "" { return nil, errors.New("parameter client.subscriptionID cannot be empty") @@ -94,7 +91,7 @@ func (client *NamespacesClient) checkNameAvailabilityCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, checkNameAvailabilityRequest); err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/operations_client.go index eafeab12..ced46b33 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/operations_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -39,7 +36,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available RP operations. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -65,14 +62,14 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption } // listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { +func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *OperationsClientListOptions) (*policy.Request, error) { urlPath := "/providers/Microsoft.App/operations" req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/options.go index 0ef6af64..c944cb67 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/options.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/options.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -79,14 +76,14 @@ type ConnectedEnvironmentsCertificatesClientUpdateOptions struct { // ConnectedEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginCreateOrUpdate // method. type ConnectedEnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ConnectedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ConnectedEnvironmentsClient.BeginDelete // method. type ConnectedEnvironmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -210,31 +207,31 @@ type ContainerAppsAuthConfigsClientListByContainerAppOptions struct { // ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate // method. type ContainerAppsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete method. type ContainerAppsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ContainerAppsClientBeginStartOptions contains the optional parameters for the ContainerAppsClient.BeginStart method. type ContainerAppsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ContainerAppsClientBeginStopOptions contains the optional parameters for the ContainerAppsClient.BeginStop method. type ContainerAppsClientBeginStopOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ContainerAppsClientBeginUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginUpdate method. type ContainerAppsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -346,17 +343,56 @@ type ContainerAppsRevisionsClientRestartRevisionOptions struct { // placeholder for future optional parameters } +// ContainerAppsSessionPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.BeginCreateOrUpdate +// method. +type ContainerAppsSessionPoolsClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ContainerAppsSessionPoolsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.BeginDelete +// method. +type ContainerAppsSessionPoolsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ContainerAppsSessionPoolsClientBeginUpdateOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.BeginUpdate +// method. +type ContainerAppsSessionPoolsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ContainerAppsSessionPoolsClientGetOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.Get +// method. +type ContainerAppsSessionPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsSessionPoolsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.NewListByResourceGroupPager +// method. +type ContainerAppsSessionPoolsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsSessionPoolsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsSessionPoolsClient.NewListBySubscriptionPager +// method. +type ContainerAppsSessionPoolsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + // ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsSourceControlsClient.BeginCreateOrUpdate // method. type ContainerAppsSourceControlsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ContainerAppsSourceControlsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsSourceControlsClient.BeginDelete // method. type ContainerAppsSourceControlsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -398,21 +434,50 @@ type DaprComponentsClientListSecretsOptions struct { // placeholder for future optional parameters } +// JavaComponentsClientBeginCreateOrUpdateOptions contains the optional parameters for the JavaComponentsClient.BeginCreateOrUpdate +// method. +type JavaComponentsClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// JavaComponentsClientBeginDeleteOptions contains the optional parameters for the JavaComponentsClient.BeginDelete method. +type JavaComponentsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// JavaComponentsClientBeginUpdateOptions contains the optional parameters for the JavaComponentsClient.BeginUpdate method. +type JavaComponentsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// JavaComponentsClientGetOptions contains the optional parameters for the JavaComponentsClient.Get method. +type JavaComponentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JavaComponentsClientListOptions contains the optional parameters for the JavaComponentsClient.NewListPager method. +type JavaComponentsClientListOptions struct { + // placeholder for future optional parameters +} + // JobsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobsClient.BeginCreateOrUpdate method. type JobsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. type JobsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // JobsClientBeginStartOptions contains the optional parameters for the JobsClient.BeginStart method. type JobsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string // Properties used to start a job execution. @@ -421,20 +486,20 @@ type JobsClientBeginStartOptions struct { // JobsClientBeginStopExecutionOptions contains the optional parameters for the JobsClient.BeginStopExecution method. type JobsClientBeginStopExecutionOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // JobsClientBeginStopMultipleExecutionsOptions contains the optional parameters for the JobsClient.BeginStopMultipleExecutions // method. type JobsClientBeginStopMultipleExecutionsOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // JobsClientBeginUpdateOptions contains the optional parameters for the JobsClient.BeginUpdate method. type JobsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -485,7 +550,7 @@ type ManagedCertificatesClientBeginCreateOrUpdateOptions struct { // Managed Certificate to be created or updated ManagedCertificateEnvelope *ManagedCertificate - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } @@ -530,21 +595,21 @@ type ManagedEnvironmentUsagesClientListOptions struct { // ManagedEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginCreateOrUpdate // method. type ManagedEnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ManagedEnvironmentsClientBeginDeleteOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginDelete // method. type ManagedEnvironmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } // ManagedEnvironmentsClientBeginUpdateOptions contains the optional parameters for the ManagedEnvironmentsClient.BeginUpdate // method. type ManagedEnvironmentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. + // Resumes the long-running operation from the provided token. ResumeToken string } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/polymorphic_helpers.go new file mode 100644 index 00000000..224a7365 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/polymorphic_helpers.go @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappcontainers + +import "encoding/json" + +func unmarshalJavaComponentPropertiesClassification(rawMsg json.RawMessage) (JavaComponentPropertiesClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b JavaComponentPropertiesClassification + switch m["componentType"] { + case string(JavaComponentTypeSpringBootAdmin): + b = &SpringBootAdminComponent{} + case string(JavaComponentTypeSpringCloudConfig): + b = &SpringCloudConfigComponent{} + case string(JavaComponentTypeSpringCloudEureka): + b = &SpringCloudEurekaComponent{} + default: + b = &JavaComponentProperties{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/responses.go index c15629c1..78aa51a9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/responses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/responses.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -340,6 +337,41 @@ type ContainerAppsRevisionsClientRestartRevisionResponse struct { // placeholder for future response values } +// ContainerAppsSessionPoolsClientCreateOrUpdateResponse contains the response from method ContainerAppsSessionPoolsClient.BeginCreateOrUpdate. +type ContainerAppsSessionPoolsClientCreateOrUpdateResponse struct { + // Container App session pool. + SessionPool +} + +// ContainerAppsSessionPoolsClientDeleteResponse contains the response from method ContainerAppsSessionPoolsClient.BeginDelete. +type ContainerAppsSessionPoolsClientDeleteResponse struct { + // placeholder for future response values +} + +// ContainerAppsSessionPoolsClientGetResponse contains the response from method ContainerAppsSessionPoolsClient.Get. +type ContainerAppsSessionPoolsClientGetResponse struct { + // Container App session pool. + SessionPool +} + +// ContainerAppsSessionPoolsClientListByResourceGroupResponse contains the response from method ContainerAppsSessionPoolsClient.NewListByResourceGroupPager. +type ContainerAppsSessionPoolsClientListByResourceGroupResponse struct { + // Session pool collection Azure resource. + SessionPoolCollection +} + +// ContainerAppsSessionPoolsClientListBySubscriptionResponse contains the response from method ContainerAppsSessionPoolsClient.NewListBySubscriptionPager. +type ContainerAppsSessionPoolsClientListBySubscriptionResponse struct { + // Session pool collection Azure resource. + SessionPoolCollection +} + +// ContainerAppsSessionPoolsClientUpdateResponse contains the response from method ContainerAppsSessionPoolsClient.BeginUpdate. +type ContainerAppsSessionPoolsClientUpdateResponse struct { + // Container App session pool. + SessionPool +} + // ContainerAppsSourceControlsClientCreateOrUpdateResponse contains the response from method ContainerAppsSourceControlsClient.BeginCreateOrUpdate. type ContainerAppsSourceControlsClientCreateOrUpdateResponse struct { // Container App SourceControl. @@ -392,6 +424,35 @@ type DaprComponentsClientListSecretsResponse struct { DaprSecretsCollection } +// JavaComponentsClientCreateOrUpdateResponse contains the response from method JavaComponentsClient.BeginCreateOrUpdate. +type JavaComponentsClientCreateOrUpdateResponse struct { + // Java Component. + JavaComponent +} + +// JavaComponentsClientDeleteResponse contains the response from method JavaComponentsClient.BeginDelete. +type JavaComponentsClientDeleteResponse struct { + // placeholder for future response values +} + +// JavaComponentsClientGetResponse contains the response from method JavaComponentsClient.Get. +type JavaComponentsClientGetResponse struct { + // Java Component. + JavaComponent +} + +// JavaComponentsClientListResponse contains the response from method JavaComponentsClient.NewListPager. +type JavaComponentsClientListResponse struct { + // Java Components ARM resource. + JavaComponentsCollection +} + +// JavaComponentsClientUpdateResponse contains the response from method JavaComponentsClient.BeginUpdate. +type JavaComponentsClientUpdateResponse struct { + // Java Component. + JavaComponent +} + // JobsClientCreateOrUpdateResponse contains the response from method JobsClient.BeginCreateOrUpdate. type JobsClientCreateOrUpdateResponse struct { // Container App Job diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/time_rfc3339.go index 947aa91d..054f8ff8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/time_rfc3339.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -60,6 +57,9 @@ func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { } func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + if len(data) == 0 { + return nil + } tzOffset := tzOffsetRegex.Match(data) hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") var layout string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/usages_client.go index cd4392d5..eda955cd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/usages_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3/usages_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. @@ -46,7 +43,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListPager - Gets, for the specified location, the current resource usage information as well as the limits under the // subscription. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-01-01 // - location - The location for which resource usage is queried. // - options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { @@ -73,7 +70,7 @@ func (client *UsagesClient) NewListPager(location string, options *UsagesClientL } // listCreateRequest creates the List request. -func (client *UsagesClient) listCreateRequest(ctx context.Context, location string, options *UsagesClientListOptions) (*policy.Request, error) { +func (client *UsagesClient) listCreateRequest(ctx context.Context, location string, _ *UsagesClientListOptions) (*policy.Request, error) { urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/usages" if location == "" { return nil, errors.New("parameter location cannot be empty") @@ -88,7 +85,7 @@ func (client *UsagesClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md deleted file mode 100644 index 3d8857bb..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/CHANGELOG.md +++ /dev/null @@ -1,3555 +0,0 @@ -# Release History - -## 1.1.0-beta.1 (2022-05-19) -### Features Added - -- New const `ProbeActionTypeTCPSocketAction` -- New const `APIPortalProvisioningStateSucceeded` -- New const `CertificateResourceProvisioningStateFailed` -- New const `CertificateResourceProvisioningStateDeleting` -- New const `StorageTypeStorageAccount` -- New const `APIPortalProvisioningStateCreating` -- New const `GatewayProvisioningStateSucceeded` -- New const `CustomDomainResourceProvisioningStateFailed` -- New const `CustomDomainResourceProvisioningStateSucceeded` -- New const `APIPortalProvisioningStateUpdating` -- New const `CustomDomainResourceProvisioningStateCreating` -- New const `PowerStateStopped` -- New const `PowerStateRunning` -- New const `CertificateResourceProvisioningStateCreating` -- New const `GatewayProvisioningStateFailed` -- New const `TypeAzureFileVolume` -- New const `ProbeActionTypeHTTPGetAction` -- New const `CertificateResourceProvisioningStateSucceeded` -- New const `GatewayProvisioningStateUpdating` -- New const `CertificateResourceProvisioningStateUpdating` -- New const `GatewayProvisioningStateDeleting` -- New const `GatewayProvisioningStateCreating` -- New const `HTTPSchemeTypeHTTPS` -- New const `HTTPSchemeTypeHTTP` -- New const `ProbeActionTypeExecAction` -- New const `APIPortalProvisioningStateDeleting` -- New const `APIPortalProvisioningStateFailed` -- New const `CustomDomainResourceProvisioningStateDeleting` -- New const `CustomDomainResourceProvisioningStateUpdating` -- New function `*StorageAccount.GetStorageProperties() *StorageProperties` -- New function `PossiblePowerStateValues() []PowerState` -- New function `*TCPSocketAction.GetProbeAction() *ProbeAction` -- New function `StorageAccount.MarshalJSON() ([]byte, error)` -- New function `AzureFileVolume.MarshalJSON() ([]byte, error)` -- New function `*StorageProperties.GetStorageProperties() *StorageProperties` -- New function `GatewayAPIRoute.MarshalJSON() ([]byte, error)` -- New function `ExecAction.MarshalJSON() ([]byte, error)` -- New function `StorageResource.MarshalJSON() ([]byte, error)` -- New function `*AzureFileVolume.GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties` -- New function `*ProbeAction.GetProbeAction() *ProbeAction` -- New function `PossibleStorageTypeValues() []StorageType` -- New function `PossibleCertificateResourceProvisioningStateValues() []CertificateResourceProvisioningState` -- New function `PossibleGatewayProvisioningStateValues() []GatewayProvisioningState` -- New function `Probe.MarshalJSON() ([]byte, error)` -- New function `*ExecAction.UnmarshalJSON([]byte) error` -- New function `TCPSocketAction.MarshalJSON() ([]byte, error)` -- New function `*StorageAccount.UnmarshalJSON([]byte) error` -- New function `GatewayCorsProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleTypeValues() []Type` -- New function `ManagedIdentityProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleAPIPortalProvisioningStateValues() []APIPortalProvisioningState` -- New function `*TCPSocketAction.UnmarshalJSON([]byte) error` -- New function `PossibleProbeActionTypeValues() []ProbeActionType` -- New function `*CustomContainerUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` -- New function `*ServicesClient.BeginStart(context.Context, string, string, *ServicesClientBeginStartOptions) (*runtime.Poller[ServicesClientStartResponse], error)` -- New function `SsoProperties.MarshalJSON() ([]byte, error)` -- New function `*CustomContainerUserSourceInfo.UnmarshalJSON([]byte) error` -- New function `CustomContainer.MarshalJSON() ([]byte, error)` -- New function `*CustomPersistentDiskProperties.GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties` -- New function `GatewayRouteConfigProperties.MarshalJSON() ([]byte, error)` -- New function `CustomPersistentDiskResource.MarshalJSON() ([]byte, error)` -- New function `*StorageResource.UnmarshalJSON([]byte) error` -- New function `CustomPersistentDiskProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleCustomDomainResourceProvisioningStateValues() []CustomDomainResourceProvisioningState` -- New function `CustomContainerUserSourceInfo.MarshalJSON() ([]byte, error)` -- New function `*HTTPGetAction.GetProbeAction() *ProbeAction` -- New function `*Probe.UnmarshalJSON([]byte) error` -- New function `*CustomPersistentDiskResource.UnmarshalJSON([]byte) error` -- New function `*ExecAction.GetProbeAction() *ProbeAction` -- New function `GatewayProperties.MarshalJSON() ([]byte, error)` -- New function `*AzureFileVolume.UnmarshalJSON([]byte) error` -- New function `*ServicesClient.BeginStop(context.Context, string, string, *ServicesClientBeginStopOptions) (*runtime.Poller[ServicesClientStopResponse], error)` -- New function `GatewayOperatorProperties.MarshalJSON() ([]byte, error)` -- New function `*HTTPGetAction.UnmarshalJSON([]byte) error` -- New function `HTTPGetAction.MarshalJSON() ([]byte, error)` -- New function `PossibleHTTPSchemeTypeValues() []HTTPSchemeType` -- New function `APIPortalProperties.MarshalJSON() ([]byte, error)` -- New struct `APIPortalCustomDomainProperties` -- New struct `APIPortalCustomDomainResource` -- New struct `APIPortalCustomDomainResourceCollection` -- New struct `APIPortalCustomDomainsClientBeginCreateOrUpdateOptions` -- New struct `APIPortalCustomDomainsClientBeginDeleteOptions` -- New struct `APIPortalCustomDomainsClientCreateOrUpdateResponse` -- New struct `APIPortalCustomDomainsClientDeleteResponse` -- New struct `APIPortalCustomDomainsClientGetOptions` -- New struct `APIPortalCustomDomainsClientGetResponse` -- New struct `APIPortalCustomDomainsClientListOptions` -- New struct `APIPortalCustomDomainsClientListResponse` -- New struct `APIPortalInstance` -- New struct `APIPortalProperties` -- New struct `APIPortalResource` -- New struct `APIPortalResourceCollection` -- New struct `APIPortalResourceRequests` -- New struct `APIPortalsClientBeginCreateOrUpdateOptions` -- New struct `APIPortalsClientBeginDeleteOptions` -- New struct `APIPortalsClientCreateOrUpdateResponse` -- New struct `APIPortalsClientDeleteResponse` -- New struct `APIPortalsClientGetOptions` -- New struct `APIPortalsClientGetResponse` -- New struct `APIPortalsClientListOptions` -- New struct `APIPortalsClientListResponse` -- New struct `APIPortalsClientValidateDomainOptions` -- New struct `APIPortalsClientValidateDomainResponse` -- New struct `AppVNetAddons` -- New struct `AzureFileVolume` -- New struct `BuildResourceRequests` -- New struct `ContainerProbeSettings` -- New struct `CustomContainer` -- New struct `CustomContainerUserSourceInfo` -- New struct `CustomPersistentDiskProperties` -- New struct `CustomPersistentDiskResource` -- New struct `ExecAction` -- New struct `GatewayAPIMetadataProperties` -- New struct `GatewayAPIRoute` -- New struct `GatewayCorsProperties` -- New struct `GatewayCustomDomainProperties` -- New struct `GatewayCustomDomainResource` -- New struct `GatewayCustomDomainResourceCollection` -- New struct `GatewayCustomDomainsClientBeginCreateOrUpdateOptions` -- New struct `GatewayCustomDomainsClientBeginDeleteOptions` -- New struct `GatewayCustomDomainsClientCreateOrUpdateResponse` -- New struct `GatewayCustomDomainsClientDeleteResponse` -- New struct `GatewayCustomDomainsClientGetOptions` -- New struct `GatewayCustomDomainsClientGetResponse` -- New struct `GatewayCustomDomainsClientListOptions` -- New struct `GatewayCustomDomainsClientListResponse` -- New struct `GatewayInstance` -- New struct `GatewayOperatorProperties` -- New struct `GatewayOperatorResourceRequests` -- New struct `GatewayProperties` -- New struct `GatewayResource` -- New struct `GatewayResourceCollection` -- New struct `GatewayResourceRequests` -- New struct `GatewayRouteConfigOpenAPIProperties` -- New struct `GatewayRouteConfigProperties` -- New struct `GatewayRouteConfigResource` -- New struct `GatewayRouteConfigResourceCollection` -- New struct `GatewayRouteConfigsClientBeginCreateOrUpdateOptions` -- New struct `GatewayRouteConfigsClientBeginDeleteOptions` -- New struct `GatewayRouteConfigsClientCreateOrUpdateResponse` -- New struct `GatewayRouteConfigsClientDeleteResponse` -- New struct `GatewayRouteConfigsClientGetOptions` -- New struct `GatewayRouteConfigsClientGetResponse` -- New struct `GatewayRouteConfigsClientListOptions` -- New struct `GatewayRouteConfigsClientListResponse` -- New struct `GatewaysClientBeginCreateOrUpdateOptions` -- New struct `GatewaysClientBeginDeleteOptions` -- New struct `GatewaysClientCreateOrUpdateResponse` -- New struct `GatewaysClientDeleteResponse` -- New struct `GatewaysClientGetOptions` -- New struct `GatewaysClientGetResponse` -- New struct `GatewaysClientListOptions` -- New struct `GatewaysClientListResponse` -- New struct `GatewaysClientValidateDomainOptions` -- New struct `GatewaysClientValidateDomainResponse` -- New struct `HTTPGetAction` -- New struct `ImageRegistryCredential` -- New struct `IngressConfig` -- New struct `MarketplaceResource` -- New struct `Probe` -- New struct `ProbeAction` -- New struct `ServiceVNetAddons` -- New struct `ServicesClientBeginStartOptions` -- New struct `ServicesClientBeginStopOptions` -- New struct `ServicesClientStartResponse` -- New struct `ServicesClientStopResponse` -- New struct `SsoProperties` -- New struct `StorageAccount` -- New struct `StorageProperties` -- New struct `StorageResource` -- New struct `StorageResourceCollection` -- New struct `StoragesClientBeginCreateOrUpdateOptions` -- New struct `StoragesClientBeginDeleteOptions` -- New struct `StoragesClientCreateOrUpdateResponse` -- New struct `StoragesClientDeleteResponse` -- New struct `StoragesClientGetOptions` -- New struct `StoragesClientGetResponse` -- New struct `StoragesClientListOptions` -- New struct `StoragesClientListResponse` -- New struct `TCPSocketAction` -- New struct `UserAssignedManagedIdentity` -- New field `ProvisioningState` in struct `KeyVaultCertificateProperties` -- New field `ProvisioningState` in struct `CertificateProperties` -- New field `IngressConfig` in struct `NetworkProfile` -- New field `LivenessProbe` in struct `DeploymentSettings` -- New field `ReadinessProbe` in struct `DeploymentSettings` -- New field `StartupProbe` in struct `DeploymentSettings` -- New field `TerminationGracePeriodSeconds` in struct `DeploymentSettings` -- New field `ContainerProbeSettings` in struct `DeploymentSettings` -- New field `ResourceRequests` in struct `BuildProperties` -- New field `ProvisioningState` in struct `CustomDomainProperties` -- New field `MarketplaceResource` in struct `ClusterResourceProperties` -- New field `VnetAddons` in struct `ClusterResourceProperties` -- New field `PowerState` in struct `ClusterResourceProperties` -- New field `UserAssignedIdentities` in struct `ManagedIdentityProperties` -- New field `ProvisioningState` in struct `ContentCertificateProperties` -- New field `CustomPersistentDisks` in struct `AppResourceProperties` -- New field `VnetAddons` in struct `AppResourceProperties` - - -## 1.0.0 (2022-05-17) -### Breaking Changes - -- Function `*DeploymentsClient.BeginStop` return value(s) have been changed from `(*armruntime.Poller[DeploymentsClientStopResponse], error)` to `(*runtime.Poller[DeploymentsClientStopResponse], error)` -- Function `*ConfigurationServicesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ConfigurationServicesClientDeleteResponse], error)` to `(*runtime.Poller[ConfigurationServicesClientDeleteResponse], error)` -- Function `*ConfigServersClient.BeginValidate` return value(s) have been changed from `(*armruntime.Poller[ConfigServersClientValidateResponse], error)` to `(*runtime.Poller[ConfigServersClientValidateResponse], error)` -- Function `*AppsClient.BeginSetActiveDeployments` return value(s) have been changed from `(*armruntime.Poller[AppsClientSetActiveDeploymentsResponse], error)` to `(*runtime.Poller[AppsClientSetActiveDeploymentsResponse], error)` -- Function `*ConfigServersClient.BeginUpdatePut` return value(s) have been changed from `(*armruntime.Poller[ConfigServersClientUpdatePutResponse], error)` to `(*runtime.Poller[ConfigServersClientUpdatePutResponse], error)` -- Function `*MonitoringSettingsClient.BeginUpdatePatch` return value(s) have been changed from `(*armruntime.Poller[MonitoringSettingsClientUpdatePatchResponse], error)` to `(*runtime.Poller[MonitoringSettingsClientUpdatePatchResponse], error)` -- Function `*AppsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[AppsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[AppsClientCreateOrUpdateResponse], error)` -- Function `*ConfigurationServicesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ConfigurationServicesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ConfigurationServicesClientCreateOrUpdateResponse], error)` -- Function `*AppsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[AppsClientDeleteResponse], error)` to `(*runtime.Poller[AppsClientDeleteResponse], error)` -- Function `*BindingsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[BindingsClientUpdateResponse], error)` to `(*runtime.Poller[BindingsClientUpdateResponse], error)` -- Function `*BuildpackBindingClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[BuildpackBindingClientDeleteResponse], error)` to `(*runtime.Poller[BuildpackBindingClientDeleteResponse], error)` -- Function `*ServiceRegistriesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ServiceRegistriesClientDeleteResponse], error)` to `(*runtime.Poller[ServiceRegistriesClientDeleteResponse], error)` -- Function `*ServicesClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[ServicesClientUpdateResponse], error)` to `(*runtime.Poller[ServicesClientUpdateResponse], error)` -- Function `*ConfigurationServicesClient.BeginValidate` return value(s) have been changed from `(*armruntime.Poller[ConfigurationServicesClientValidateResponse], error)` to `(*runtime.Poller[ConfigurationServicesClientValidateResponse], error)` -- Function `*DeploymentsClient.BeginGenerateHeapDump` return value(s) have been changed from `(*armruntime.Poller[DeploymentsClientGenerateHeapDumpResponse], error)` to `(*runtime.Poller[DeploymentsClientGenerateHeapDumpResponse], error)` -- Function `*BindingsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[BindingsClientDeleteResponse], error)` to `(*runtime.Poller[BindingsClientDeleteResponse], error)` -- Function `*ServiceRegistriesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ServiceRegistriesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ServiceRegistriesClientCreateOrUpdateResponse], error)` -- Function `*MonitoringSettingsClient.BeginUpdatePut` return value(s) have been changed from `(*armruntime.Poller[MonitoringSettingsClientUpdatePutResponse], error)` to `(*runtime.Poller[MonitoringSettingsClientUpdatePutResponse], error)` -- Function `*BuildServiceBuilderClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[BuildServiceBuilderClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[BuildServiceBuilderClientCreateOrUpdateResponse], error)` -- Function `*CertificatesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[CertificatesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[CertificatesClientCreateOrUpdateResponse], error)` -- Function `*DeploymentsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[DeploymentsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[DeploymentsClientCreateOrUpdateResponse], error)` -- Function `*ServicesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ServicesClientDeleteResponse], error)` to `(*runtime.Poller[ServicesClientDeleteResponse], error)` -- Function `*BuildServiceBuilderClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[BuildServiceBuilderClientDeleteResponse], error)` to `(*runtime.Poller[BuildServiceBuilderClientDeleteResponse], error)` -- Function `*BuildpackBindingClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[BuildpackBindingClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[BuildpackBindingClientCreateOrUpdateResponse], error)` -- Function `*DeploymentsClient.BeginRestart` return value(s) have been changed from `(*armruntime.Poller[DeploymentsClientRestartResponse], error)` to `(*runtime.Poller[DeploymentsClientRestartResponse], error)` -- Function `*DeploymentsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[DeploymentsClientDeleteResponse], error)` to `(*runtime.Poller[DeploymentsClientDeleteResponse], error)` -- Function `*CustomDomainsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[CustomDomainsClientDeleteResponse], error)` to `(*runtime.Poller[CustomDomainsClientDeleteResponse], error)` -- Function `*DeploymentsClient.BeginStartJFR` return value(s) have been changed from `(*armruntime.Poller[DeploymentsClientStartJFRResponse], error)` to `(*runtime.Poller[DeploymentsClientStartJFRResponse], error)` -- Function `*CustomDomainsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[CustomDomainsClientUpdateResponse], error)` to `(*runtime.Poller[CustomDomainsClientUpdateResponse], error)` -- Function `*BuildServiceAgentPoolClient.BeginUpdatePut` return value(s) have been changed from `(*armruntime.Poller[BuildServiceAgentPoolClientUpdatePutResponse], error)` to `(*runtime.Poller[BuildServiceAgentPoolClientUpdatePutResponse], error)` -- Function `*DeploymentsClient.BeginStart` return value(s) have been changed from `(*armruntime.Poller[DeploymentsClientStartResponse], error)` to `(*runtime.Poller[DeploymentsClientStartResponse], error)` -- Function `*ConfigServersClient.BeginUpdatePatch` return value(s) have been changed from `(*armruntime.Poller[ConfigServersClientUpdatePatchResponse], error)` to `(*runtime.Poller[ConfigServersClientUpdatePatchResponse], error)` -- Function `*ServicesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ServicesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ServicesClientCreateOrUpdateResponse], error)` -- Function `*CustomDomainsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[CustomDomainsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[CustomDomainsClientCreateOrUpdateResponse], error)` -- Function `*BindingsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[BindingsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[BindingsClientCreateOrUpdateResponse], error)` -- Function `*CertificatesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[CertificatesClientDeleteResponse], error)` to `(*runtime.Poller[CertificatesClientDeleteResponse], error)` -- Function `*AppsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[AppsClientUpdateResponse], error)` to `(*runtime.Poller[AppsClientUpdateResponse], error)` -- Function `*DeploymentsClient.BeginGenerateThreadDump` return value(s) have been changed from `(*armruntime.Poller[DeploymentsClientGenerateThreadDumpResponse], error)` to `(*runtime.Poller[DeploymentsClientGenerateThreadDumpResponse], error)` -- Function `*DeploymentsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[DeploymentsClientUpdateResponse], error)` to `(*runtime.Poller[DeploymentsClientUpdateResponse], error)` -- Const `StorageTypeStorageAccount` has been removed -- Const `APIPortalProvisioningStateCreating` has been removed -- Const `GatewayProvisioningStateUpdating` has been removed -- Const `APIPortalProvisioningStateDeleting` has been removed -- Const `PowerStateStopped` has been removed -- Const `APIPortalProvisioningStateUpdating` has been removed -- Const `APIPortalProvisioningStateFailed` has been removed -- Const `GatewayProvisioningStateSucceeded` has been removed -- Const `APIPortalProvisioningStateSucceeded` has been removed -- Const `GatewayProvisioningStateFailed` has been removed -- Const `GatewayProvisioningStateDeleting` has been removed -- Const `PowerStateRunning` has been removed -- Const `TypeAzureFileVolume` has been removed -- Const `GatewayProvisioningStateCreating` has been removed -- Function `*APIPortalsClient.BeginCreateOrUpdate` has been removed -- Function `PossibleStorageTypeValues` has been removed -- Function `ResourceSKUZoneDetails.MarshalJSON` has been removed -- Function `*CustomPersistentDiskResource.UnmarshalJSON` has been removed -- Function `PossibleGatewayProvisioningStateValues` has been removed -- Function `*APIPortalsClient.NewListPager` has been removed -- Function `*APIPortalsClient.ValidateDomain` has been removed -- Function `PossibleTypeValues` has been removed -- Function `*GatewayRouteConfigsClient.BeginCreateOrUpdate` has been removed -- Function `*GatewayCustomDomainsClient.BeginDelete` has been removed -- Function `ServiceSpecification.MarshalJSON` has been removed -- Function `*APIPortalCustomDomainsClient.BeginCreateOrUpdate` has been removed -- Function `*AzureFileVolume.UnmarshalJSON` has been removed -- Function `StorageResourceCollection.MarshalJSON` has been removed -- Function `*GatewayRouteConfigsClient.NewListPager` has been removed -- Function `*StoragesClient.NewListPager` has been removed -- Function `BuildServiceAgentPoolResourceCollection.MarshalJSON` has been removed -- Function `*APIPortalsClient.BeginDelete` has been removed -- Function `*CustomContainerUserSourceInfo.GetUserSourceInfo` has been removed -- Function `SupportedBuildpacksCollection.MarshalJSON` has been removed -- Function `BuildpackBindingResourceCollection.MarshalJSON` has been removed -- Function `*APIPortalCustomDomainsClient.NewListPager` has been removed -- Function `*StorageProperties.GetStorageProperties` has been removed -- Function `GatewayProperties.MarshalJSON` has been removed -- Function `*GatewaysClient.BeginDelete` has been removed -- Function `CloudErrorBody.MarshalJSON` has been removed -- Function `ConfigServerSettingsValidateResult.MarshalJSON` has been removed -- Function `ConfigurationServiceGitPropertyValidateResult.MarshalJSON` has been removed -- Function `GatewayOperatorProperties.MarshalJSON` has been removed -- Function `NewAPIPortalsClient` has been removed -- Function `ServiceResourceList.MarshalJSON` has been removed -- Function `ManagedIdentityProperties.MarshalJSON` has been removed -- Function `CustomPersistentDiskResource.MarshalJSON` has been removed -- Function `BuildResultCollection.MarshalJSON` has been removed -- Function `*GatewaysClient.NewListPager` has been removed -- Function `PossiblePowerStateValues` has been removed -- Function `*ServicesClient.BeginStop` has been removed -- Function `*GatewaysClient.BeginCreateOrUpdate` has been removed -- Function `*StoragesClient.BeginDelete` has been removed -- Function `PossibleAPIPortalProvisioningStateValues` has been removed -- Function `NewGatewayCustomDomainsClient` has been removed -- Function `GatewayRouteConfigResourceCollection.MarshalJSON` has been removed -- Function `ServiceRegistryResourceCollection.MarshalJSON` has been removed -- Function `*GatewayCustomDomainsClient.Get` has been removed -- Function `*GatewayCustomDomainsClient.NewListPager` has been removed -- Function `ResourceSKURestrictionInfo.MarshalJSON` has been removed -- Function `AppResourceCollection.MarshalJSON` has been removed -- Function `BuildCollection.MarshalJSON` has been removed -- Function `ConfigServerSettingsErrorRecord.MarshalJSON` has been removed -- Function `*GatewayCustomDomainsClient.BeginCreateOrUpdate` has been removed -- Function `ResourceSKUCollection.MarshalJSON` has been removed -- Function `APIPortalCustomDomainResourceCollection.MarshalJSON` has been removed -- Function `*GatewaysClient.ValidateDomain` has been removed -- Function `ResourceSKULocationInfo.MarshalJSON` has been removed -- Function `SsoProperties.MarshalJSON` has been removed -- Function `APIPortalResourceCollection.MarshalJSON` has been removed -- Function `*CustomContainerUserSourceInfo.UnmarshalJSON` has been removed -- Function `NewGatewayRouteConfigsClient` has been removed -- Function `AzureFileVolume.MarshalJSON` has been removed -- Function `*StorageResource.UnmarshalJSON` has been removed -- Function `*StorageAccount.UnmarshalJSON` has been removed -- Function `GatewayRouteConfigProperties.MarshalJSON` has been removed -- Function `MetricSpecification.MarshalJSON` has been removed -- Function `BuilderResourceCollection.MarshalJSON` has been removed -- Function `APIPortalProperties.MarshalJSON` has been removed -- Function `NewGatewaysClient` has been removed -- Function `*APIPortalsClient.Get` has been removed -- Function `StorageAccount.MarshalJSON` has been removed -- Function `*ServicesClient.BeginStart` has been removed -- Function `GatewayResourceCollection.MarshalJSON` has been removed -- Function `NewStoragesClient` has been removed -- Function `CustomContainerUserSourceInfo.MarshalJSON` has been removed -- Function `SupportedStacksCollection.MarshalJSON` has been removed -- Function `*GatewaysClient.Get` has been removed -- Function `CertificateResourceCollection.MarshalJSON` has been removed -- Function `*StoragesClient.BeginCreateOrUpdate` has been removed -- Function `CustomPersistentDiskProperties.MarshalJSON` has been removed -- Function `GatewayCustomDomainResourceCollection.MarshalJSON` has been removed -- Function `CustomContainer.MarshalJSON` has been removed -- Function `*APIPortalCustomDomainsClient.BeginDelete` has been removed -- Function `*StoragesClient.Get` has been removed -- Function `*AzureFileVolume.GetCustomPersistentDiskProperties` has been removed -- Function `*GatewayRouteConfigsClient.Get` has been removed -- Function `AvailableRuntimeVersions.MarshalJSON` has been removed -- Function `ValidationMessages.MarshalJSON` has been removed -- Function `*GatewayRouteConfigsClient.BeginDelete` has been removed -- Function `BuildServiceCollection.MarshalJSON` has been removed -- Function `ResourceSKURestrictions.MarshalJSON` has been removed -- Function `BindingResourceCollection.MarshalJSON` has been removed -- Function `GatewayAPIRoute.MarshalJSON` has been removed -- Function `StorageResource.MarshalJSON` has been removed -- Function `*CustomPersistentDiskProperties.GetCustomPersistentDiskProperties` has been removed -- Function `GatewayCorsProperties.MarshalJSON` has been removed -- Function `*StorageAccount.GetStorageProperties` has been removed -- Function `ResourceSKU.MarshalJSON` has been removed -- Function `CustomDomainResourceCollection.MarshalJSON` has been removed -- Function `*APIPortalCustomDomainsClient.Get` has been removed -- Function `AvailableOperations.MarshalJSON` has been removed -- Function `DeploymentResourceCollection.MarshalJSON` has been removed -- Function `NewAPIPortalCustomDomainsClient` has been removed -- Function `ConfigurationServiceResourceCollection.MarshalJSON` has been removed -- Struct `APIPortalCustomDomainProperties` has been removed -- Struct `APIPortalCustomDomainResource` has been removed -- Struct `APIPortalCustomDomainResourceCollection` has been removed -- Struct `APIPortalCustomDomainsClient` has been removed -- Struct `APIPortalCustomDomainsClientBeginCreateOrUpdateOptions` has been removed -- Struct `APIPortalCustomDomainsClientBeginDeleteOptions` has been removed -- Struct `APIPortalCustomDomainsClientCreateOrUpdateResponse` has been removed -- Struct `APIPortalCustomDomainsClientDeleteResponse` has been removed -- Struct `APIPortalCustomDomainsClientGetOptions` has been removed -- Struct `APIPortalCustomDomainsClientGetResponse` has been removed -- Struct `APIPortalCustomDomainsClientListOptions` has been removed -- Struct `APIPortalCustomDomainsClientListResponse` has been removed -- Struct `APIPortalInstance` has been removed -- Struct `APIPortalProperties` has been removed -- Struct `APIPortalResource` has been removed -- Struct `APIPortalResourceCollection` has been removed -- Struct `APIPortalResourceRequests` has been removed -- Struct `APIPortalsClient` has been removed -- Struct `APIPortalsClientBeginCreateOrUpdateOptions` has been removed -- Struct `APIPortalsClientBeginDeleteOptions` has been removed -- Struct `APIPortalsClientCreateOrUpdateResponse` has been removed -- Struct `APIPortalsClientDeleteResponse` has been removed -- Struct `APIPortalsClientGetOptions` has been removed -- Struct `APIPortalsClientGetResponse` has been removed -- Struct `APIPortalsClientListOptions` has been removed -- Struct `APIPortalsClientListResponse` has been removed -- Struct `APIPortalsClientValidateDomainOptions` has been removed -- Struct `APIPortalsClientValidateDomainResponse` has been removed -- Struct `AzureFileVolume` has been removed -- Struct `ContainerProbeSettings` has been removed -- Struct `CustomContainer` has been removed -- Struct `CustomContainerUserSourceInfo` has been removed -- Struct `CustomPersistentDiskProperties` has been removed -- Struct `CustomPersistentDiskResource` has been removed -- Struct `GatewayAPIMetadataProperties` has been removed -- Struct `GatewayAPIRoute` has been removed -- Struct `GatewayCorsProperties` has been removed -- Struct `GatewayCustomDomainProperties` has been removed -- Struct `GatewayCustomDomainResource` has been removed -- Struct `GatewayCustomDomainResourceCollection` has been removed -- Struct `GatewayCustomDomainsClient` has been removed -- Struct `GatewayCustomDomainsClientBeginCreateOrUpdateOptions` has been removed -- Struct `GatewayCustomDomainsClientBeginDeleteOptions` has been removed -- Struct `GatewayCustomDomainsClientCreateOrUpdateResponse` has been removed -- Struct `GatewayCustomDomainsClientDeleteResponse` has been removed -- Struct `GatewayCustomDomainsClientGetOptions` has been removed -- Struct `GatewayCustomDomainsClientGetResponse` has been removed -- Struct `GatewayCustomDomainsClientListOptions` has been removed -- Struct `GatewayCustomDomainsClientListResponse` has been removed -- Struct `GatewayInstance` has been removed -- Struct `GatewayOperatorProperties` has been removed -- Struct `GatewayOperatorResourceRequests` has been removed -- Struct `GatewayProperties` has been removed -- Struct `GatewayResource` has been removed -- Struct `GatewayResourceCollection` has been removed -- Struct `GatewayResourceRequests` has been removed -- Struct `GatewayRouteConfigProperties` has been removed -- Struct `GatewayRouteConfigResource` has been removed -- Struct `GatewayRouteConfigResourceCollection` has been removed -- Struct `GatewayRouteConfigsClient` has been removed -- Struct `GatewayRouteConfigsClientBeginCreateOrUpdateOptions` has been removed -- Struct `GatewayRouteConfigsClientBeginDeleteOptions` has been removed -- Struct `GatewayRouteConfigsClientCreateOrUpdateResponse` has been removed -- Struct `GatewayRouteConfigsClientDeleteResponse` has been removed -- Struct `GatewayRouteConfigsClientGetOptions` has been removed -- Struct `GatewayRouteConfigsClientGetResponse` has been removed -- Struct `GatewayRouteConfigsClientListOptions` has been removed -- Struct `GatewayRouteConfigsClientListResponse` has been removed -- Struct `GatewaysClient` has been removed -- Struct `GatewaysClientBeginCreateOrUpdateOptions` has been removed -- Struct `GatewaysClientBeginDeleteOptions` has been removed -- Struct `GatewaysClientCreateOrUpdateResponse` has been removed -- Struct `GatewaysClientDeleteResponse` has been removed -- Struct `GatewaysClientGetOptions` has been removed -- Struct `GatewaysClientGetResponse` has been removed -- Struct `GatewaysClientListOptions` has been removed -- Struct `GatewaysClientListResponse` has been removed -- Struct `GatewaysClientValidateDomainOptions` has been removed -- Struct `GatewaysClientValidateDomainResponse` has been removed -- Struct `ImageRegistryCredential` has been removed -- Struct `ServicesClientBeginStartOptions` has been removed -- Struct `ServicesClientBeginStopOptions` has been removed -- Struct `ServicesClientStartResponse` has been removed -- Struct `ServicesClientStopResponse` has been removed -- Struct `SsoProperties` has been removed -- Struct `StorageAccount` has been removed -- Struct `StorageProperties` has been removed -- Struct `StorageResource` has been removed -- Struct `StorageResourceCollection` has been removed -- Struct `StoragesClient` has been removed -- Struct `StoragesClientBeginCreateOrUpdateOptions` has been removed -- Struct `StoragesClientBeginDeleteOptions` has been removed -- Struct `StoragesClientCreateOrUpdateResponse` has been removed -- Struct `StoragesClientDeleteResponse` has been removed -- Struct `StoragesClientGetOptions` has been removed -- Struct `StoragesClientGetResponse` has been removed -- Struct `StoragesClientListOptions` has been removed -- Struct `StoragesClientListResponse` has been removed -- Struct `UserAssignedManagedIdentity` has been removed -- Field `PowerState` of struct `ClusterResourceProperties` has been removed -- Field `ContainerProbeSettings` of struct `DeploymentSettings` has been removed -- Field `UserAssignedIdentities` of struct `ManagedIdentityProperties` has been removed -- Field `CustomPersistentDisks` of struct `AppResourceProperties` has been removed - - -## 0.5.0 (2022-04-15) -### Breaking Changes - -- Function `*BuildServiceAgentPoolClient.List` has been removed -- Function `*DeploymentsClient.ListForCluster` has been removed -- Function `*CustomDomainsClient.List` has been removed -- Function `*APIPortalsClient.List` has been removed -- Function `*GatewayRouteConfigsClient.List` has been removed -- Function `*BindingsClient.List` has been removed -- Function `*BuildServiceBuilderClient.List` has been removed -- Function `*ConfigurationServicesClient.List` has been removed -- Function `*AppsClient.List` has been removed -- Function `*BuildServiceClient.ListBuildResults` has been removed -- Function `*GatewaysClient.List` has been removed -- Function `*ServicesClient.List` has been removed -- Function `*StoragesClient.List` has been removed -- Function `*BuildServiceClient.ListBuildServices` has been removed -- Function `*BuildpackBindingClient.List` has been removed -- Function `*CertificatesClient.List` has been removed -- Function `*DeploymentsClient.List` has been removed -- Function `*ServiceRegistriesClient.List` has been removed -- Function `*OperationsClient.List` has been removed -- Function `*BuildServiceClient.ListBuilds` has been removed -- Function `*SKUsClient.List` has been removed -- Function `*GatewayCustomDomainsClient.List` has been removed -- Function `*APIPortalCustomDomainsClient.List` has been removed -- Function `*ServicesClient.ListBySubscription` has been removed - -### Features Added - -- New function `*OperationsClient.NewListPager(*OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]` -- New function `*ServiceRegistriesClient.NewListPager(string, string, *ServiceRegistriesClientListOptions) *runtime.Pager[ServiceRegistriesClientListResponse]` -- New function `*BuildServiceClient.NewListBuildResultsPager(string, string, string, string, *BuildServiceClientListBuildResultsOptions) *runtime.Pager[BuildServiceClientListBuildResultsResponse]` -- New function `*BuildServiceClient.NewListBuildsPager(string, string, string, *BuildServiceClientListBuildsOptions) *runtime.Pager[BuildServiceClientListBuildsResponse]` -- New function `*AppsClient.NewListPager(string, string, *AppsClientListOptions) *runtime.Pager[AppsClientListResponse]` -- New function `*GatewaysClient.NewListPager(string, string, *GatewaysClientListOptions) *runtime.Pager[GatewaysClientListResponse]` -- New function `*BindingsClient.NewListPager(string, string, string, *BindingsClientListOptions) *runtime.Pager[BindingsClientListResponse]` -- New function `*ServicesClient.NewListPager(string, *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse]` -- New function `*ConfigurationServicesClient.NewListPager(string, string, *ConfigurationServicesClientListOptions) *runtime.Pager[ConfigurationServicesClientListResponse]` -- New function `*GatewayCustomDomainsClient.NewListPager(string, string, string, *GatewayCustomDomainsClientListOptions) *runtime.Pager[GatewayCustomDomainsClientListResponse]` -- New function `*StoragesClient.NewListPager(string, string, *StoragesClientListOptions) *runtime.Pager[StoragesClientListResponse]` -- New function `*DeploymentsClient.NewListForClusterPager(string, string, *DeploymentsClientListForClusterOptions) *runtime.Pager[DeploymentsClientListForClusterResponse]` -- New function `*DeploymentsClient.NewListPager(string, string, string, *DeploymentsClientListOptions) *runtime.Pager[DeploymentsClientListResponse]` -- New function `*BuildServiceAgentPoolClient.NewListPager(string, string, string, *BuildServiceAgentPoolClientListOptions) *runtime.Pager[BuildServiceAgentPoolClientListResponse]` -- New function `*APIPortalCustomDomainsClient.NewListPager(string, string, string, *APIPortalCustomDomainsClientListOptions) *runtime.Pager[APIPortalCustomDomainsClientListResponse]` -- New function `*GatewayRouteConfigsClient.NewListPager(string, string, string, *GatewayRouteConfigsClientListOptions) *runtime.Pager[GatewayRouteConfigsClientListResponse]` -- New function `*ServicesClient.NewListBySubscriptionPager(*ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse]` -- New function `*APIPortalsClient.NewListPager(string, string, *APIPortalsClientListOptions) *runtime.Pager[APIPortalsClientListResponse]` -- New function `*CertificatesClient.NewListPager(string, string, *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse]` -- New function `*BuildServiceClient.NewListBuildServicesPager(string, string, *BuildServiceClientListBuildServicesOptions) *runtime.Pager[BuildServiceClientListBuildServicesResponse]` -- New function `*BuildServiceBuilderClient.NewListPager(string, string, string, *BuildServiceBuilderClientListOptions) *runtime.Pager[BuildServiceBuilderClientListResponse]` -- New function `*SKUsClient.NewListPager(*SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]` -- New function `*BuildpackBindingClient.NewListPager(string, string, string, string, *BuildpackBindingClientListOptions) *runtime.Pager[BuildpackBindingClientListResponse]` -- New function `*CustomDomainsClient.NewListPager(string, string, string, *CustomDomainsClientListOptions) *runtime.Pager[CustomDomainsClientListResponse]` - - -## 0.4.0 (2022-04-11) -### Breaking Changes - -- Function `*CustomDomainsClient.BeginCreateOrUpdate` return value(s) have been changed from `(CustomDomainsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[CustomDomainsClientCreateOrUpdateResponse], error)` -- Function `*ConfigurationServicesClient.BeginValidate` return value(s) have been changed from `(ConfigurationServicesClientValidatePollerResponse, error)` to `(*armruntime.Poller[ConfigurationServicesClientValidateResponse], error)` -- Function `*ServicesClient.ListBySubscription` return value(s) have been changed from `(*ServicesClientListBySubscriptionPager)` to `(*runtime.Pager[ServicesClientListBySubscriptionResponse])` -- Function `*ServicesClient.BeginStop` return value(s) have been changed from `(ServicesClientStopPollerResponse, error)` to `(*armruntime.Poller[ServicesClientStopResponse], error)` -- Function `*DeploymentsClient.BeginStart` return value(s) have been changed from `(DeploymentsClientStartPollerResponse, error)` to `(*armruntime.Poller[DeploymentsClientStartResponse], error)` -- Function `*APIPortalCustomDomainsClient.List` return value(s) have been changed from `(*APIPortalCustomDomainsClientListPager)` to `(*runtime.Pager[APIPortalCustomDomainsClientListResponse])` -- Function `*ConfigurationServicesClient.BeginDelete` return value(s) have been changed from `(ConfigurationServicesClientDeletePollerResponse, error)` to `(*armruntime.Poller[ConfigurationServicesClientDeleteResponse], error)` -- Function `*GatewayCustomDomainsClient.BeginDelete` return value(s) have been changed from `(GatewayCustomDomainsClientDeletePollerResponse, error)` to `(*armruntime.Poller[GatewayCustomDomainsClientDeleteResponse], error)` -- Function `NewGatewayRouteConfigsClient` return value(s) have been changed from `(*GatewayRouteConfigsClient)` to `(*GatewayRouteConfigsClient, error)` -- Function `NewBuildServiceBuilderClient` return value(s) have been changed from `(*BuildServiceBuilderClient)` to `(*BuildServiceBuilderClient, error)` -- Function `NewCertificatesClient` return value(s) have been changed from `(*CertificatesClient)` to `(*CertificatesClient, error)` -- Function `*CustomDomainsClient.BeginUpdate` return value(s) have been changed from `(CustomDomainsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[CustomDomainsClientUpdateResponse], error)` -- Function `NewDeploymentsClient` return value(s) have been changed from `(*DeploymentsClient)` to `(*DeploymentsClient, error)` -- Function `*StoragesClient.BeginCreateOrUpdate` return value(s) have been changed from `(StoragesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[StoragesClientCreateOrUpdateResponse], error)` -- Function `*AppsClient.List` return value(s) have been changed from `(*AppsClientListPager)` to `(*runtime.Pager[AppsClientListResponse])` -- Function `*ServicesClient.BeginUpdate` return value(s) have been changed from `(ServicesClientUpdatePollerResponse, error)` to `(*armruntime.Poller[ServicesClientUpdateResponse], error)` -- Function `*ServicesClient.BeginDelete` return value(s) have been changed from `(ServicesClientDeletePollerResponse, error)` to `(*armruntime.Poller[ServicesClientDeleteResponse], error)` -- Function `*BuildServiceClient.ListBuildResults` return value(s) have been changed from `(*BuildServiceClientListBuildResultsPager)` to `(*runtime.Pager[BuildServiceClientListBuildResultsResponse])` -- Function `*APIPortalsClient.BeginCreateOrUpdate` return value(s) have been changed from `(APIPortalsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[APIPortalsClientCreateOrUpdateResponse], error)` -- Function `*ServiceRegistriesClient.List` return value(s) have been changed from `(*ServiceRegistriesClientListPager)` to `(*runtime.Pager[ServiceRegistriesClientListResponse])` -- Function `*CustomDomainsClient.List` return value(s) have been changed from `(*CustomDomainsClientListPager)` to `(*runtime.Pager[CustomDomainsClientListResponse])` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsClientListPager)` to `(*runtime.Pager[OperationsClientListResponse])` -- Function `*BuildServiceClient.ListBuilds` return value(s) have been changed from `(*BuildServiceClientListBuildsPager)` to `(*runtime.Pager[BuildServiceClientListBuildsResponse])` -- Function `*GatewayCustomDomainsClient.List` return value(s) have been changed from `(*GatewayCustomDomainsClientListPager)` to `(*runtime.Pager[GatewayCustomDomainsClientListResponse])` -- Function `*AppsClient.BeginDelete` return value(s) have been changed from `(AppsClientDeletePollerResponse, error)` to `(*armruntime.Poller[AppsClientDeleteResponse], error)` -- Function `NewServiceRegistriesClient` return value(s) have been changed from `(*ServiceRegistriesClient)` to `(*ServiceRegistriesClient, error)` -- Function `NewConfigServersClient` return value(s) have been changed from `(*ConfigServersClient)` to `(*ConfigServersClient, error)` -- Function `*GatewayRouteConfigsClient.BeginDelete` return value(s) have been changed from `(GatewayRouteConfigsClientDeletePollerResponse, error)` to `(*armruntime.Poller[GatewayRouteConfigsClientDeleteResponse], error)` -- Function `NewBuildServiceClient` return value(s) have been changed from `(*BuildServiceClient)` to `(*BuildServiceClient, error)` -- Function `*GatewaysClient.List` return value(s) have been changed from `(*GatewaysClientListPager)` to `(*runtime.Pager[GatewaysClientListResponse])` -- Function `*BindingsClient.BeginUpdate` return value(s) have been changed from `(BindingsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[BindingsClientUpdateResponse], error)` -- Function `*DeploymentsClient.ListForCluster` return value(s) have been changed from `(*DeploymentsClientListForClusterPager)` to `(*runtime.Pager[DeploymentsClientListForClusterResponse])` -- Function `*DeploymentsClient.BeginStop` return value(s) have been changed from `(DeploymentsClientStopPollerResponse, error)` to `(*armruntime.Poller[DeploymentsClientStopResponse], error)` -- Function `*BindingsClient.BeginDelete` return value(s) have been changed from `(BindingsClientDeletePollerResponse, error)` to `(*armruntime.Poller[BindingsClientDeleteResponse], error)` -- Function `*APIPortalCustomDomainsClient.BeginCreateOrUpdate` return value(s) have been changed from `(APIPortalCustomDomainsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[APIPortalCustomDomainsClientCreateOrUpdateResponse], error)` -- Function `*ConfigurationServicesClient.List` return value(s) have been changed from `(*ConfigurationServicesClientListPager)` to `(*runtime.Pager[ConfigurationServicesClientListResponse])` -- Function `*ServiceRegistriesClient.BeginDelete` return value(s) have been changed from `(ServiceRegistriesClientDeletePollerResponse, error)` to `(*armruntime.Poller[ServiceRegistriesClientDeleteResponse], error)` -- Function `*BuildpackBindingClient.BeginDelete` return value(s) have been changed from `(BuildpackBindingClientDeletePollerResponse, error)` to `(*armruntime.Poller[BuildpackBindingClientDeleteResponse], error)` -- Function `*DeploymentsClient.BeginGenerateHeapDump` return value(s) have been changed from `(DeploymentsClientGenerateHeapDumpPollerResponse, error)` to `(*armruntime.Poller[DeploymentsClientGenerateHeapDumpResponse], error)` -- Function `NewServicesClient` return value(s) have been changed from `(*ServicesClient)` to `(*ServicesClient, error)` -- Function `*APIPortalsClient.List` return value(s) have been changed from `(*APIPortalsClientListPager)` to `(*runtime.Pager[APIPortalsClientListResponse])` -- Function `*DeploymentsClient.BeginDelete` return value(s) have been changed from `(DeploymentsClientDeletePollerResponse, error)` to `(*armruntime.Poller[DeploymentsClientDeleteResponse], error)` -- Function `*ServicesClient.BeginStart` return value(s) have been changed from `(ServicesClientStartPollerResponse, error)` to `(*armruntime.Poller[ServicesClientStartResponse], error)` -- Function `*SKUsClient.List` return value(s) have been changed from `(*SKUsClientListPager)` to `(*runtime.Pager[SKUsClientListResponse])` -- Function `*MonitoringSettingsClient.BeginUpdatePatch` return value(s) have been changed from `(MonitoringSettingsClientUpdatePatchPollerResponse, error)` to `(*armruntime.Poller[MonitoringSettingsClientUpdatePatchResponse], error)` -- Function `*DeploymentsClient.BeginStartJFR` return value(s) have been changed from `(DeploymentsClientStartJFRPollerResponse, error)` to `(*armruntime.Poller[DeploymentsClientStartJFRResponse], error)` -- Function `*DeploymentsClient.BeginCreateOrUpdate` return value(s) have been changed from `(DeploymentsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[DeploymentsClientCreateOrUpdateResponse], error)` -- Function `*BuildServiceBuilderClient.List` return value(s) have been changed from `(*BuildServiceBuilderClientListPager)` to `(*runtime.Pager[BuildServiceBuilderClientListResponse])` -- Function `NewOperationsClient` return value(s) have been changed from `(*OperationsClient)` to `(*OperationsClient, error)` -- Function `*GatewaysClient.BeginCreateOrUpdate` return value(s) have been changed from `(GatewaysClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[GatewaysClientCreateOrUpdateResponse], error)` -- Function `NewAppsClient` return value(s) have been changed from `(*AppsClient)` to `(*AppsClient, error)` -- Function `NewAPIPortalsClient` return value(s) have been changed from `(*APIPortalsClient)` to `(*APIPortalsClient, error)` -- Function `*AppsClient.BeginUpdate` return value(s) have been changed from `(AppsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[AppsClientUpdateResponse], error)` -- Function `*DeploymentsClient.BeginRestart` return value(s) have been changed from `(DeploymentsClientRestartPollerResponse, error)` to `(*armruntime.Poller[DeploymentsClientRestartResponse], error)` -- Function `*BuildServiceBuilderClient.BeginDelete` return value(s) have been changed from `(BuildServiceBuilderClientDeletePollerResponse, error)` to `(*armruntime.Poller[BuildServiceBuilderClientDeleteResponse], error)` -- Function `*AppsClient.BeginCreateOrUpdate` return value(s) have been changed from `(AppsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[AppsClientCreateOrUpdateResponse], error)` -- Function `NewSKUsClient` return value(s) have been changed from `(*SKUsClient)` to `(*SKUsClient, error)` -- Function `NewMonitoringSettingsClient` return value(s) have been changed from `(*MonitoringSettingsClient)` to `(*MonitoringSettingsClient, error)` -- Function `*BuildServiceAgentPoolClient.List` return value(s) have been changed from `(*BuildServiceAgentPoolClientListPager)` to `(*runtime.Pager[BuildServiceAgentPoolClientListResponse])` -- Function `*BindingsClient.List` return value(s) have been changed from `(*BindingsClientListPager)` to `(*runtime.Pager[BindingsClientListResponse])` -- Function `*ConfigServersClient.BeginUpdatePatch` return value(s) have been changed from `(ConfigServersClientUpdatePatchPollerResponse, error)` to `(*armruntime.Poller[ConfigServersClientUpdatePatchResponse], error)` -- Function `*MonitoringSettingsClient.BeginUpdatePut` return value(s) have been changed from `(MonitoringSettingsClientUpdatePutPollerResponse, error)` to `(*armruntime.Poller[MonitoringSettingsClientUpdatePutResponse], error)` -- Function `NewCustomDomainsClient` return value(s) have been changed from `(*CustomDomainsClient)` to `(*CustomDomainsClient, error)` -- Function `*AppsClient.BeginSetActiveDeployments` return value(s) have been changed from `(AppsClientSetActiveDeploymentsPollerResponse, error)` to `(*armruntime.Poller[AppsClientSetActiveDeploymentsResponse], error)` -- Function `NewGatewayCustomDomainsClient` return value(s) have been changed from `(*GatewayCustomDomainsClient)` to `(*GatewayCustomDomainsClient, error)` -- Function `*ConfigurationServicesClient.BeginCreateOrUpdate` return value(s) have been changed from `(ConfigurationServicesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ConfigurationServicesClientCreateOrUpdateResponse], error)` -- Function `*GatewayCustomDomainsClient.BeginCreateOrUpdate` return value(s) have been changed from `(GatewayCustomDomainsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[GatewayCustomDomainsClientCreateOrUpdateResponse], error)` -- Function `*APIPortalCustomDomainsClient.BeginDelete` return value(s) have been changed from `(APIPortalCustomDomainsClientDeletePollerResponse, error)` to `(*armruntime.Poller[APIPortalCustomDomainsClientDeleteResponse], error)` -- Function `*CertificatesClient.BeginDelete` return value(s) have been changed from `(CertificatesClientDeletePollerResponse, error)` to `(*armruntime.Poller[CertificatesClientDeleteResponse], error)` -- Function `*ServiceRegistriesClient.BeginCreateOrUpdate` return value(s) have been changed from `(ServiceRegistriesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ServiceRegistriesClientCreateOrUpdateResponse], error)` -- Function `NewAPIPortalCustomDomainsClient` return value(s) have been changed from `(*APIPortalCustomDomainsClient)` to `(*APIPortalCustomDomainsClient, error)` -- Function `*ServicesClient.List` return value(s) have been changed from `(*ServicesClientListPager)` to `(*runtime.Pager[ServicesClientListResponse])` -- Function `*ConfigServersClient.BeginValidate` return value(s) have been changed from `(ConfigServersClientValidatePollerResponse, error)` to `(*armruntime.Poller[ConfigServersClientValidateResponse], error)` -- Function `*CertificatesClient.List` return value(s) have been changed from `(*CertificatesClientListPager)` to `(*runtime.Pager[CertificatesClientListResponse])` -- Function `*BindingsClient.BeginCreateOrUpdate` return value(s) have been changed from `(BindingsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[BindingsClientCreateOrUpdateResponse], error)` -- Function `*BuildServiceClient.ListBuildServices` return value(s) have been changed from `(*BuildServiceClientListBuildServicesPager)` to `(*runtime.Pager[BuildServiceClientListBuildServicesResponse])` -- Function `*BuildServiceBuilderClient.BeginCreateOrUpdate` return value(s) have been changed from `(BuildServiceBuilderClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[BuildServiceBuilderClientCreateOrUpdateResponse], error)` -- Function `*GatewaysClient.BeginDelete` return value(s) have been changed from `(GatewaysClientDeletePollerResponse, error)` to `(*armruntime.Poller[GatewaysClientDeleteResponse], error)` -- Function `NewBuildServiceAgentPoolClient` return value(s) have been changed from `(*BuildServiceAgentPoolClient)` to `(*BuildServiceAgentPoolClient, error)` -- Function `NewBuildpackBindingClient` return value(s) have been changed from `(*BuildpackBindingClient)` to `(*BuildpackBindingClient, error)` -- Function `*CustomDomainsClient.BeginDelete` return value(s) have been changed from `(CustomDomainsClientDeletePollerResponse, error)` to `(*armruntime.Poller[CustomDomainsClientDeleteResponse], error)` -- Function `NewRuntimeVersionsClient` return value(s) have been changed from `(*RuntimeVersionsClient)` to `(*RuntimeVersionsClient, error)` -- Function `NewBindingsClient` return value(s) have been changed from `(*BindingsClient)` to `(*BindingsClient, error)` -- Function `*ConfigServersClient.BeginUpdatePut` return value(s) have been changed from `(ConfigServersClientUpdatePutPollerResponse, error)` to `(*armruntime.Poller[ConfigServersClientUpdatePutResponse], error)` -- Function `*DeploymentsClient.BeginUpdate` return value(s) have been changed from `(DeploymentsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[DeploymentsClientUpdateResponse], error)` -- Function `*ServicesClient.BeginCreateOrUpdate` return value(s) have been changed from `(ServicesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ServicesClientCreateOrUpdateResponse], error)` -- Function `*APIPortalsClient.BeginDelete` return value(s) have been changed from `(APIPortalsClientDeletePollerResponse, error)` to `(*armruntime.Poller[APIPortalsClientDeleteResponse], error)` -- Function `*GatewayRouteConfigsClient.BeginCreateOrUpdate` return value(s) have been changed from `(GatewayRouteConfigsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[GatewayRouteConfigsClientCreateOrUpdateResponse], error)` -- Function `NewGatewaysClient` return value(s) have been changed from `(*GatewaysClient)` to `(*GatewaysClient, error)` -- Function `*StoragesClient.List` return value(s) have been changed from `(*StoragesClientListPager)` to `(*runtime.Pager[StoragesClientListResponse])` -- Function `*StoragesClient.BeginDelete` return value(s) have been changed from `(StoragesClientDeletePollerResponse, error)` to `(*armruntime.Poller[StoragesClientDeleteResponse], error)` -- Function `NewConfigurationServicesClient` return value(s) have been changed from `(*ConfigurationServicesClient)` to `(*ConfigurationServicesClient, error)` -- Function `*BuildpackBindingClient.BeginCreateOrUpdate` return value(s) have been changed from `(BuildpackBindingClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[BuildpackBindingClientCreateOrUpdateResponse], error)` -- Function `*BuildpackBindingClient.List` return value(s) have been changed from `(*BuildpackBindingClientListPager)` to `(*runtime.Pager[BuildpackBindingClientListResponse])` -- Function `NewStoragesClient` return value(s) have been changed from `(*StoragesClient)` to `(*StoragesClient, error)` -- Function `*CertificatesClient.BeginCreateOrUpdate` return value(s) have been changed from `(CertificatesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[CertificatesClientCreateOrUpdateResponse], error)` -- Function `*DeploymentsClient.BeginGenerateThreadDump` return value(s) have been changed from `(DeploymentsClientGenerateThreadDumpPollerResponse, error)` to `(*armruntime.Poller[DeploymentsClientGenerateThreadDumpResponse], error)` -- Function `*DeploymentsClient.List` return value(s) have been changed from `(*DeploymentsClientListPager)` to `(*runtime.Pager[DeploymentsClientListResponse])` -- Function `*BuildServiceAgentPoolClient.BeginUpdatePut` return value(s) have been changed from `(BuildServiceAgentPoolClientUpdatePutPollerResponse, error)` to `(*armruntime.Poller[BuildServiceAgentPoolClientUpdatePutResponse], error)` -- Function `*GatewayRouteConfigsClient.List` return value(s) have been changed from `(*GatewayRouteConfigsClientListPager)` to `(*runtime.Pager[GatewayRouteConfigsClientListResponse])` -- Type of `BindingResourceProperties.BindingParameters` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `StorageAccount.StorageType` has been changed from `*StoragePropertiesStorageType` to `*StorageType` -- Type of `CustomPersistentDiskProperties.Type` has been changed from `*CustomPersistentDiskPropertiesType` to `*Type` -- Type of `AppResourceProperties.AddonConfigs` has been changed from `map[string]map[string]map[string]interface{}` to `map[string]map[string]interface{}` -- Type of `StorageProperties.StorageType` has been changed from `*StoragePropertiesStorageType` to `*StorageType` -- Type of `DeploymentSettings.AddonConfigs` has been changed from `map[string]map[string]map[string]interface{}` to `map[string]map[string]interface{}` -- Type of `AzureFileVolume.Type` has been changed from `*CustomPersistentDiskPropertiesType` to `*Type` -- Const `StoragePropertiesStorageTypeStorageAccount` has been removed -- Const `CustomPersistentDiskPropertiesTypeAzureFileVolume` has been removed -- Function `*DeploymentsClientListForClusterPager.Err` has been removed -- Function `ServiceRegistriesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `BuildResultProvisioningState.ToPtr` has been removed -- Function `*BindingsClientUpdatePollerResponse.Resume` has been removed -- Function `*BindingsClientCreateOrUpdatePoller.Done` has been removed -- Function `*DeploymentsClientStartJFRPoller.FinalResponse` has been removed -- Function `BuildpackBindingClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ServicesClientUpdatePoller.Done` has been removed -- Function `*SKUsClientListPager.Err` has been removed -- Function `ConfigurationServiceProvisioningState.ToPtr` has been removed -- Function `*GatewayCustomDomainsClientListPager.Err` has been removed -- Function `*CustomDomainsClientListPager.PageResponse` has been removed -- Function `*ServiceRegistriesClientListPager.NextPage` has been removed -- Function `SKUScaleType.ToPtr` has been removed -- Function `*CustomDomainsClientCreateOrUpdatePoller.Poll` has been removed -- Function `GatewayRouteConfigsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*BuildServiceBuilderClientDeletePoller.ResumeToken` has been removed -- Function `GatewayRouteConfigsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ServiceRegistriesClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*DeploymentsClientStopPollerResponse.Resume` has been removed -- Function `*BindingsClientUpdatePoller.Poll` has been removed -- Function `*ConfigServersClientUpdatePutPoller.Poll` has been removed -- Function `*BuildServiceClientListBuildsPager.Err` has been removed -- Function `*BuildpackBindingClientListPager.NextPage` has been removed -- Function `ManagedIdentityType.ToPtr` has been removed -- Function `*CertificatesClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ConfigServersClientUpdatePutPoller.ResumeToken` has been removed -- Function `*AppsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ServicesClientStopPoller.ResumeToken` has been removed -- Function `*GatewaysClientListPager.Err` has been removed -- Function `*ConfigurationServicesClientValidatePollerResponse.Resume` has been removed -- Function `*APIPortalCustomDomainsClientDeletePoller.FinalResponse` has been removed -- Function `DeploymentsClientRestartPollerResponse.PollUntilDone` has been removed -- Function `*StoragesClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*GatewaysClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*BuildpackBindingClientDeletePoller.FinalResponse` has been removed -- Function `*ConfigurationServicesClientDeletePoller.ResumeToken` has been removed -- Function `*ServicesClientListPager.PageResponse` has been removed -- Function `DeploymentsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*CustomDomainsClientCreateOrUpdatePoller.Done` has been removed -- Function `*GatewayRouteConfigsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*AppsClientSetActiveDeploymentsPoller.Poll` has been removed -- Function `*BuildServiceBuilderClientCreateOrUpdatePoller.Poll` has been removed -- Function `DeploymentsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `CustomDomainsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsClientStartPoller.ResumeToken` has been removed -- Function `*APIPortalsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*ServiceRegistriesClientListPager.PageResponse` has been removed -- Function `*MonitoringSettingsClientUpdatePatchPoller.Done` has been removed -- Function `AppsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*MonitoringSettingsClientUpdatePatchPoller.ResumeToken` has been removed -- Function `*OperationsClientListPager.PageResponse` has been removed -- Function `*ConfigurationServicesClientValidatePoller.Done` has been removed -- Function `*GatewayCustomDomainsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*CustomDomainsClientUpdatePoller.Done` has been removed -- Function `CertificatesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*BuildServiceClientListBuildServicesPager.Err` has been removed -- Function `DeploymentsClientGenerateThreadDumpPollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsClientUpdatePoller.ResumeToken` has been removed -- Function `*APIPortalCustomDomainsClientListPager.PageResponse` has been removed -- Function `*AppsClientDeletePoller.Done` has been removed -- Function `*APIPortalsClientListPager.Err` has been removed -- Function `*ConfigServersClientUpdatePatchPollerResponse.Resume` has been removed -- Function `*AppsClientListPager.Err` has been removed -- Function `*ConfigServersClientUpdatePutPoller.FinalResponse` has been removed -- Function `*BuildpackBindingClientDeletePoller.Poll` has been removed -- Function `*ServiceRegistriesClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*GatewayRouteConfigsClientDeletePoller.FinalResponse` has been removed -- Function `*CertificatesClientDeletePoller.Done` has been removed -- Function `*AppsClientDeletePoller.Poll` has been removed -- Function `MonitoringSettingState.ToPtr` has been removed -- Function `*SKUsClientListPager.NextPage` has been removed -- Function `*BuildServiceBuilderClientDeletePollerResponse.Resume` has been removed -- Function `*GatewaysClientDeletePoller.Done` has been removed -- Function `ResourceSKURestrictionsReasonCode.ToPtr` has been removed -- Function `*BindingsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*APIPortalCustomDomainsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*APIPortalsClientDeletePoller.ResumeToken` has been removed -- Function `*BindingsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ConfigServersClientUpdatePutPoller.Done` has been removed -- Function `*ConfigServersClientUpdatePatchPoller.Done` has been removed -- Function `*ServiceRegistriesClientCreateOrUpdatePoller.Poll` has been removed -- Function `*DeploymentsClientDeletePoller.Poll` has been removed -- Function `PossibleStoragePropertiesStorageTypeValues` has been removed -- Function `MonitoringSettingsClientUpdatePatchPollerResponse.PollUntilDone` has been removed -- Function `*GatewaysClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*DeploymentsClientRestartPoller.Done` has been removed -- Function `*BindingsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `ProvisioningState.ToPtr` has been removed -- Function `*ConfigurationServicesClientListPager.Err` has been removed -- Function `*DeploymentsClientRestartPoller.FinalResponse` has been removed -- Function `*DeploymentsClientStartPoller.FinalResponse` has been removed -- Function `*ServiceRegistriesClientDeletePoller.FinalResponse` has been removed -- Function `*CustomDomainsClientListPager.NextPage` has been removed -- Function `*DeploymentsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*GatewayRouteConfigsClientListPager.Err` has been removed -- Function `*ServicesClientStopPollerResponse.Resume` has been removed -- Function `ConfigurationServicesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*CertificatesClientListPager.PageResponse` has been removed -- Function `*ConfigurationServicesClientListPager.NextPage` has been removed -- Function `*CertificatesClientDeletePoller.ResumeToken` has been removed -- Function `*BuildServiceBuilderClientListPager.NextPage` has been removed -- Function `*ServicesClientListBySubscriptionPager.PageResponse` has been removed -- Function `PowerState.ToPtr` has been removed -- Function `BindingsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*BuildServiceBuilderClientDeletePoller.FinalResponse` has been removed -- Function `*CertificatesClientCreateOrUpdatePoller.Poll` has been removed -- Function `*APIPortalsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*BuildpackBindingClientDeletePoller.Done` has been removed -- Function `*StoragesClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `BuildProvisioningState.ToPtr` has been removed -- Function `*ConfigurationServicesClientCreateOrUpdatePoller.Done` has been removed -- Function `*StoragesClientDeletePoller.FinalResponse` has been removed -- Function `BuildpackBindingClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*ServicesClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*CustomDomainsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*AppsClientUpdatePoller.ResumeToken` has been removed -- Function `*ConfigServersClientValidatePoller.Done` has been removed -- Function `*AppsClientDeletePoller.FinalResponse` has been removed -- Function `*DeploymentsClientDeletePoller.ResumeToken` has been removed -- Function `*StoragesClientDeletePoller.Done` has been removed -- Function `*ConfigurationServicesClientDeletePoller.Poll` has been removed -- Function `*CustomDomainsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ConfigurationServicesClientCreateOrUpdatePoller.Poll` has been removed -- Function `StoragePropertiesStorageType.ToPtr` has been removed -- Function `*DeploymentsClientDeletePoller.Done` has been removed -- Function `*BindingsClientUpdatePoller.FinalResponse` has been removed -- Function `*DeploymentsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*CertificatesClientListPager.Err` has been removed -- Function `LastModifiedByType.ToPtr` has been removed -- Function `*APIPortalCustomDomainsClientDeletePoller.Done` has been removed -- Function `*APIPortalCustomDomainsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*DeploymentsClientRestartPoller.Poll` has been removed -- Function `ConfigurationServicesClientValidatePollerResponse.PollUntilDone` has been removed -- Function `*MonitoringSettingsClientUpdatePutPollerResponse.Resume` has been removed -- Function `*DeploymentsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*CustomDomainsClientDeletePollerResponse.Resume` has been removed -- Function `*AppsClientSetActiveDeploymentsPollerResponse.Resume` has been removed -- Function `*BindingsClientListPager.NextPage` has been removed -- Function `*ConfigServersClientValidatePoller.ResumeToken` has been removed -- Function `*DeploymentsClientGenerateHeapDumpPoller.FinalResponse` has been removed -- Function `MonitoringSettingsClientUpdatePutPollerResponse.PollUntilDone` has been removed -- Function `*CustomDomainsClientDeletePoller.Poll` has been removed -- Function `*ServiceRegistriesClientCreateOrUpdatePoller.Done` has been removed -- Function `*DeploymentsClientGenerateHeapDumpPoller.Done` has been removed -- Function `*ServicesClientCreateOrUpdatePoller.Done` has been removed -- Function `ServicesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsClientGenerateThreadDumpPoller.ResumeToken` has been removed -- Function `StoragesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*GatewayRouteConfigsClientDeletePoller.ResumeToken` has been removed -- Function `*AppsClientUpdatePoller.FinalResponse` has been removed -- Function `SupportedRuntimePlatform.ToPtr` has been removed -- Function `*GatewayCustomDomainsClientDeletePoller.Poll` has been removed -- Function `*BindingsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*BuildServiceBuilderClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*APIPortalCustomDomainsClientListPager.Err` has been removed -- Function `StoragesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*ServicesClientDeletePoller.Poll` has been removed -- Function `*BuildpackBindingClientDeletePoller.ResumeToken` has been removed -- Function `*BuildServiceBuilderClientDeletePoller.Done` has been removed -- Function `*DeploymentsClientDeletePoller.FinalResponse` has been removed -- Function `AppResourceProvisioningState.ToPtr` has been removed -- Function `*ServiceRegistriesClientDeletePoller.Poll` has been removed -- Function `*ServicesClientUpdatePollerResponse.Resume` has been removed -- Function `*CertificatesClientDeletePoller.Poll` has been removed -- Function `*SKUsClientListPager.PageResponse` has been removed -- Function `*BindingsClientUpdatePoller.Done` has been removed -- Function `*GatewaysClientDeletePoller.Poll` has been removed -- Function `*DeploymentsClientRestartPoller.ResumeToken` has been removed -- Function `CreatedByType.ToPtr` has been removed -- Function `*BindingsClientListPager.PageResponse` has been removed -- Function `*ConfigurationServicesClientValidatePoller.Poll` has been removed -- Function `*DeploymentsClientGenerateThreadDumpPoller.Done` has been removed -- Function `*BuildpackBindingClientDeletePollerResponse.Resume` has been removed -- Function `*ServicesClientStopPoller.FinalResponse` has been removed -- Function `*DeploymentsClientStartPoller.Poll` has been removed -- Function `*GatewaysClientDeletePollerResponse.Resume` has been removed -- Function `ServicesClientStartPollerResponse.PollUntilDone` has been removed -- Function `BuildServiceBuilderClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*GatewaysClientDeletePoller.FinalResponse` has been removed -- Function `*GatewayRouteConfigsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*BuildServiceClientListBuildsPager.NextPage` has been removed -- Function `*ServiceRegistriesClientDeletePoller.ResumeToken` has been removed -- Function `*MonitoringSettingsClientUpdatePutPoller.Done` has been removed -- Function `*AppsClientUpdatePoller.Done` has been removed -- Function `*GatewayRouteConfigsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ServicesClientStartPoller.FinalResponse` has been removed -- Function `SupportedRuntimeValue.ToPtr` has been removed -- Function `*BuildpackBindingClientCreateOrUpdatePoller.Poll` has been removed -- Function `*DeploymentsClientStartJFRPollerResponse.Resume` has been removed -- Function `ConfigServersClientUpdatePutPollerResponse.PollUntilDone` has been removed -- Function `*BindingsClientUpdatePoller.ResumeToken` has been removed -- Function `*AppsClientDeletePoller.ResumeToken` has been removed -- Function `*DeploymentsClientListPager.PageResponse` has been removed -- Function `*APIPortalCustomDomainsClientDeletePollerResponse.Resume` has been removed -- Function `DeploymentsClientStartJFRPollerResponse.PollUntilDone` has been removed -- Function `*AppsClientListPager.NextPage` has been removed -- Function `APIPortalsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*ConfigurationServicesClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*DeploymentsClientDeletePollerResponse.Resume` has been removed -- Function `AppsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*BuildServiceBuilderClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ConfigServersClientUpdatePutPollerResponse.Resume` has been removed -- Function `BuildpackBindingProvisioningState.ToPtr` has been removed -- Function `*GatewaysClientCreateOrUpdatePoller.Done` has been removed -- Function `*CustomDomainsClientDeletePoller.FinalResponse` has been removed -- Function `*DeploymentsClientUpdatePollerResponse.Resume` has been removed -- Function `ConfigServersClientValidatePollerResponse.PollUntilDone` has been removed -- Function `BuildServiceAgentPoolClientUpdatePutPollerResponse.PollUntilDone` has been removed -- Function `*GatewayRouteConfigsClientDeletePoller.Done` has been removed -- Function `*ConfigurationServicesClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*CertificatesClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*StoragesClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*DeploymentsClientStopPoller.FinalResponse` has been removed -- Function `GatewayProvisioningState.ToPtr` has been removed -- Function `*APIPortalCustomDomainsClientListPager.NextPage` has been removed -- Function `*BuildServiceClientListBuildResultsPager.PageResponse` has been removed -- Function `AppsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsClientGenerateThreadDumpPoller.Poll` has been removed -- Function `*DeploymentsClientStopPoller.Done` has been removed -- Function `*ServiceRegistriesClientDeletePoller.Done` has been removed -- Function `*ConfigServersClientValidatePoller.Poll` has been removed -- Function `*DeploymentsClientGenerateThreadDumpPollerResponse.Resume` has been removed -- Function `*ConfigServersClientUpdatePatchPoller.FinalResponse` has been removed -- Function `*BuildServiceBuilderClientListPager.Err` has been removed -- Function `*DeploymentsClientRestartPollerResponse.Resume` has been removed -- Function `CustomDomainsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*AppsClientListPager.PageResponse` has been removed -- Function `DeploymentsClientGenerateHeapDumpPollerResponse.PollUntilDone` has been removed -- Function `*ServicesClientDeletePoller.ResumeToken` has been removed -- Function `ServicesClientStopPollerResponse.PollUntilDone` has been removed -- Function `*ConfigurationServicesClientDeletePoller.FinalResponse` has been removed -- Function `*MonitoringSettingsClientUpdatePutPoller.FinalResponse` has been removed -- Function `*CustomDomainsClientUpdatePoller.FinalResponse` has been removed -- Function `*AppsClientSetActiveDeploymentsPoller.Done` has been removed -- Function `*DeploymentsClientStartJFRPoller.Poll` has been removed -- Function `*GatewayRouteConfigsClientDeletePoller.Poll` has been removed -- Function `BindingsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*BuildServiceAgentPoolClientUpdatePutPoller.ResumeToken` has been removed -- Function `*APIPortalCustomDomainsClientDeletePoller.Poll` has been removed -- Function `*ServicesClientDeletePollerResponse.Resume` has been removed -- Function `*StoragesClientDeletePoller.Poll` has been removed -- Function `*BuildpackBindingClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ServicesClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*APIPortalsClientDeletePoller.Poll` has been removed -- Function `*BuildpackBindingClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*APIPortalCustomDomainsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ServicesClientUpdatePoller.Poll` has been removed -- Function `*ServicesClientDeletePoller.Done` has been removed -- Function `*StoragesClientCreateOrUpdatePoller.Done` has been removed -- Function `*DeploymentsClientListPager.NextPage` has been removed -- Function `*CertificatesClientDeletePollerResponse.Resume` has been removed -- Function `*DeploymentsClientListPager.Err` has been removed -- Function `*APIPortalsClientDeletePollerResponse.Resume` has been removed -- Function `*BuildServiceBuilderClientDeletePoller.Poll` has been removed -- Function `ServicesClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsClientStartPoller.Done` has been removed -- Function `*APIPortalsClientDeletePoller.Done` has been removed -- Function `*ConfigServersClientUpdatePatchPoller.Poll` has been removed -- Function `*ConfigServersClientValidatePoller.FinalResponse` has been removed -- Function `*DeploymentsClientStartPollerResponse.Resume` has been removed -- Function `*GatewayCustomDomainsClientCreateOrUpdatePoller.Done` has been removed -- Function `*GatewayCustomDomainsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*DeploymentsClientStartJFRPoller.Done` has been removed -- Function `*BuildServiceClientListBuildResultsPager.NextPage` has been removed -- Function `*AppsClientSetActiveDeploymentsPoller.FinalResponse` has been removed -- Function `DeploymentsClientStopPollerResponse.PollUntilDone` has been removed -- Function `ServiceRegistriesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `DeploymentResourceStatus.ToPtr` has been removed -- Function `AppsClientSetActiveDeploymentsPollerResponse.PollUntilDone` has been removed -- Function `*ServicesClientListPager.NextPage` has been removed -- Function `APIPortalCustomDomainsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*ConfigurationServicesClientValidatePoller.ResumeToken` has been removed -- Function `*GatewayRouteConfigsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `GatewayCustomDomainsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `TrafficDirection.ToPtr` has been removed -- Function `*ConfigServersClientValidatePollerResponse.Resume` has been removed -- Function `CustomPersistentDiskPropertiesType.ToPtr` has been removed -- Function `*StoragesClientListPager.PageResponse` has been removed -- Function `*DeploymentsClientUpdatePoller.FinalResponse` has been removed -- Function `BindingsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*GatewayCustomDomainsClientDeletePoller.ResumeToken` has been removed -- Function `*BuildServiceAgentPoolClientUpdatePutPoller.Poll` has been removed -- Function `*BuildServiceAgentPoolClientListPager.NextPage` has been removed -- Function `*AppsClientSetActiveDeploymentsPoller.ResumeToken` has been removed -- Function `*ServicesClientUpdatePoller.ResumeToken` has been removed -- Function `*DeploymentsClientStartJFRPoller.ResumeToken` has been removed -- Function `*APIPortalsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*GatewayRouteConfigsClientListPager.NextPage` has been removed -- Function `*ServicesClientStartPoller.Done` has been removed -- Function `*AppsClientCreateOrUpdatePoller.Done` has been removed -- Function `*ConfigurationServicesClientDeletePoller.Done` has been removed -- Function `*StoragesClientDeletePollerResponse.Resume` has been removed -- Function `*GatewayCustomDomainsClientDeletePoller.FinalResponse` has been removed -- Function `*BuildServiceAgentPoolClientUpdatePutPollerResponse.Resume` has been removed -- Function `*OperationsClientListPager.NextPage` has been removed -- Function `*GatewayRouteConfigsClientListPager.PageResponse` has been removed -- Function `*BuildpackBindingClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `DeploymentResourceProvisioningState.ToPtr` has been removed -- Function `*GatewaysClientListPager.PageResponse` has been removed -- Function `BuildServiceBuilderClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `ConfigurationServicesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*AppsClientUpdatePollerResponse.Resume` has been removed -- Function `*StoragesClientCreateOrUpdatePoller.Poll` has been removed -- Function `*DeploymentsClientCreateOrUpdatePoller.Poll` has been removed -- Function `BuildServiceProvisioningState.ToPtr` has been removed -- Function `*AppsClientDeletePollerResponse.Resume` has been removed -- Function `*BindingsClientDeletePoller.Done` has been removed -- Function `*GatewayCustomDomainsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*OperationsClientListPager.Err` has been removed -- Function `*BuildServiceAgentPoolClientUpdatePutPoller.Done` has been removed -- Function `*GatewayCustomDomainsClientListPager.PageResponse` has been removed -- Function `APIPortalCustomDomainsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `CertificatesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `BindingType.ToPtr` has been removed -- Function `*AppsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*BindingsClientDeletePollerResponse.Resume` has been removed -- Function `*DeploymentsClientUpdatePoller.Done` has been removed -- Function `*CertificatesClientListPager.NextPage` has been removed -- Function `*DeploymentsClientUpdatePoller.Poll` has been removed -- Function `*MonitoringSettingsClientUpdatePatchPoller.Poll` has been removed -- Function `*CustomDomainsClientDeletePoller.Done` has been removed -- Function `*BuildServiceBuilderClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*BuildServiceAgentPoolClientListPager.PageResponse` has been removed -- Function `KPackBuildStageProvisioningState.ToPtr` has been removed -- Function `*ServicesClientStopPoller.Done` has been removed -- Function `*MonitoringSettingsClientUpdatePatchPollerResponse.Resume` has been removed -- Function `*GatewayCustomDomainsClientDeletePoller.Done` has been removed -- Function `*ConfigurationServicesClientListPager.PageResponse` has been removed -- Function `*ServicesClientDeletePoller.FinalResponse` has been removed -- Function `*ServicesClientStopPoller.Poll` has been removed -- Function `*CustomDomainsClientUpdatePoller.ResumeToken` has been removed -- Function `DeploymentsClientStartPollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsClientListForClusterPager.PageResponse` has been removed -- Function `TestKeyType.ToPtr` has been removed -- Function `*ServicesClientStartPoller.ResumeToken` has been removed -- Function `*AppsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*BuildpackBindingClientListPager.Err` has been removed -- Function `*ServicesClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*DeploymentsClientGenerateHeapDumpPoller.Poll` has been removed -- Function `*ServicesClientStartPoller.Poll` has been removed -- Function `*StoragesClientListPager.NextPage` has been removed -- Function `*BuildServiceClientListBuildServicesPager.PageResponse` has been removed -- Function `*GatewaysClientListPager.NextPage` has been removed -- Function `APIPortalsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*CustomDomainsClientUpdatePoller.Poll` has been removed -- Function `*APIPortalCustomDomainsClientCreateOrUpdatePoller.Done` has been removed -- Function `ResourceSKURestrictionsType.ToPtr` has been removed -- Function `APIPortalProvisioningState.ToPtr` has been removed -- Function `*ConfigurationServicesClientValidatePoller.FinalResponse` has been removed -- Function `*BuildServiceAgentPoolClientListPager.Err` has been removed -- Function `*APIPortalsClientDeletePoller.FinalResponse` has been removed -- Function `*MonitoringSettingsClientUpdatePutPoller.ResumeToken` has been removed -- Function `*CertificatesClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*BuildServiceClientListBuildServicesPager.NextPage` has been removed -- Function `*AppsClientUpdatePoller.Poll` has been removed -- Function `*ConfigurationServicesClientDeletePollerResponse.Resume` has been removed -- Function `GatewaysClientDeletePollerResponse.PollUntilDone` has been removed -- Function `BuilderProvisioningState.ToPtr` has been removed -- Function `*CustomDomainsClientUpdatePollerResponse.Resume` has been removed -- Function `*BuildServiceAgentPoolClientUpdatePutPoller.FinalResponse` has been removed -- Function `*GatewaysClientCreateOrUpdatePoller.Poll` has been removed -- Function `*DeploymentsClientGenerateHeapDumpPollerResponse.Resume` has been removed -- Function `CustomDomainsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `GatewaysClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ServiceRegistriesClientDeletePollerResponse.Resume` has been removed -- Function `*ConfigServersClientUpdatePatchPoller.ResumeToken` has been removed -- Function `*BuildpackBindingClientCreateOrUpdatePoller.Done` has been removed -- Function `*CertificatesClientCreateOrUpdatePoller.Done` has been removed -- Function `*GatewaysClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*BuildServiceClientListBuildResultsPager.Err` has been removed -- Function `*CustomDomainsClientListPager.Err` has been removed -- Function `*GatewayRouteConfigsClientCreateOrUpdatePoller.Done` has been removed -- Function `*BuildServiceBuilderClientCreateOrUpdatePoller.Done` has been removed -- Function `*DeploymentsClientStopPoller.ResumeToken` has been removed -- Function `*ServicesClientListPager.Err` has been removed -- Function `DeploymentsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*GatewayRouteConfigsClientDeletePollerResponse.Resume` has been removed -- Function `*BindingsClientDeletePoller.ResumeToken` has been removed -- Function `ServicesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*ServiceRegistriesClientListPager.Err` has been removed -- Function `*DeploymentsClientCreateOrUpdatePoller.Done` has been removed -- Function `*GatewayCustomDomainsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*APIPortalsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*APIPortalCustomDomainsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*APIPortalsClientListPager.NextPage` has been removed -- Function `*GatewayCustomDomainsClientListPager.NextPage` has been removed -- Function `*BindingsClientDeletePoller.FinalResponse` has been removed -- Function `GatewayCustomDomainsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `ConfigServersClientUpdatePatchPollerResponse.PollUntilDone` has been removed -- Function `*APIPortalsClientListPager.PageResponse` has been removed -- Function `*DeploymentsClientGenerateThreadDumpPoller.FinalResponse` has been removed -- Function `*BindingsClientListPager.Err` has been removed -- Function `*ServicesClientUpdatePoller.FinalResponse` has been removed -- Function `*GatewayCustomDomainsClientDeletePollerResponse.Resume` has been removed -- Function `*StoragesClientDeletePoller.ResumeToken` has been removed -- Function `*BuildServiceClientListBuildsPager.PageResponse` has been removed -- Function `*ConfigurationServicesClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*APIPortalCustomDomainsClientDeletePoller.ResumeToken` has been removed -- Function `*BuildServiceBuilderClientListPager.PageResponse` has been removed -- Function `ServiceRegistryProvisioningState.ToPtr` has been removed -- Function `*ServicesClientCreateOrUpdatePoller.Poll` has been removed -- Function `ConfigServerState.ToPtr` has been removed -- Function `*MonitoringSettingsClientUpdatePutPoller.Poll` has been removed -- Function `*ServicesClientStartPollerResponse.Resume` has been removed -- Function `*AppsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*DeploymentsClientListForClusterPager.NextPage` has been removed -- Function `*DeploymentsClientGenerateHeapDumpPoller.ResumeToken` has been removed -- Function `*BuildpackBindingClientListPager.PageResponse` has been removed -- Function `*CustomDomainsClientDeletePoller.ResumeToken` has been removed -- Function `*ServicesClientListBySubscriptionPager.NextPage` has been removed -- Function `*BindingsClientDeletePoller.Poll` has been removed -- Function `*CustomDomainsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ServicesClientListBySubscriptionPager.Err` has been removed -- Function `*StoragesClientListPager.Err` has been removed -- Function `*ServiceRegistriesClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*MonitoringSettingsClientUpdatePatchPoller.FinalResponse` has been removed -- Function `PossibleCustomPersistentDiskPropertiesTypeValues` has been removed -- Function `*DeploymentsClientStopPoller.Poll` has been removed -- Function `*CertificatesClientDeletePoller.FinalResponse` has been removed -- Function `*APIPortalsClientCreateOrUpdatePoller.Done` has been removed -- Function `*GatewaysClientDeletePoller.ResumeToken` has been removed -- Struct `APIPortalCustomDomainsClientCreateOrUpdatePoller` has been removed -- Struct `APIPortalCustomDomainsClientCreateOrUpdatePollerResponse` has been removed -- Struct `APIPortalCustomDomainsClientCreateOrUpdateResult` has been removed -- Struct `APIPortalCustomDomainsClientDeletePoller` has been removed -- Struct `APIPortalCustomDomainsClientDeletePollerResponse` has been removed -- Struct `APIPortalCustomDomainsClientGetResult` has been removed -- Struct `APIPortalCustomDomainsClientListPager` has been removed -- Struct `APIPortalCustomDomainsClientListResult` has been removed -- Struct `APIPortalsClientCreateOrUpdatePoller` has been removed -- Struct `APIPortalsClientCreateOrUpdatePollerResponse` has been removed -- Struct `APIPortalsClientCreateOrUpdateResult` has been removed -- Struct `APIPortalsClientDeletePoller` has been removed -- Struct `APIPortalsClientDeletePollerResponse` has been removed -- Struct `APIPortalsClientGetResult` has been removed -- Struct `APIPortalsClientListPager` has been removed -- Struct `APIPortalsClientListResult` has been removed -- Struct `APIPortalsClientValidateDomainResult` has been removed -- Struct `AppsClientCreateOrUpdatePoller` has been removed -- Struct `AppsClientCreateOrUpdatePollerResponse` has been removed -- Struct `AppsClientCreateOrUpdateResult` has been removed -- Struct `AppsClientDeletePoller` has been removed -- Struct `AppsClientDeletePollerResponse` has been removed -- Struct `AppsClientGetResourceUploadURLResult` has been removed -- Struct `AppsClientGetResult` has been removed -- Struct `AppsClientListPager` has been removed -- Struct `AppsClientListResult` has been removed -- Struct `AppsClientSetActiveDeploymentsPoller` has been removed -- Struct `AppsClientSetActiveDeploymentsPollerResponse` has been removed -- Struct `AppsClientSetActiveDeploymentsResult` has been removed -- Struct `AppsClientUpdatePoller` has been removed -- Struct `AppsClientUpdatePollerResponse` has been removed -- Struct `AppsClientUpdateResult` has been removed -- Struct `AppsClientValidateDomainResult` has been removed -- Struct `BindingsClientCreateOrUpdatePoller` has been removed -- Struct `BindingsClientCreateOrUpdatePollerResponse` has been removed -- Struct `BindingsClientCreateOrUpdateResult` has been removed -- Struct `BindingsClientDeletePoller` has been removed -- Struct `BindingsClientDeletePollerResponse` has been removed -- Struct `BindingsClientGetResult` has been removed -- Struct `BindingsClientListPager` has been removed -- Struct `BindingsClientListResult` has been removed -- Struct `BindingsClientUpdatePoller` has been removed -- Struct `BindingsClientUpdatePollerResponse` has been removed -- Struct `BindingsClientUpdateResult` has been removed -- Struct `BuildServiceAgentPoolClientGetResult` has been removed -- Struct `BuildServiceAgentPoolClientListPager` has been removed -- Struct `BuildServiceAgentPoolClientListResult` has been removed -- Struct `BuildServiceAgentPoolClientUpdatePutPoller` has been removed -- Struct `BuildServiceAgentPoolClientUpdatePutPollerResponse` has been removed -- Struct `BuildServiceAgentPoolClientUpdatePutResult` has been removed -- Struct `BuildServiceBuilderClientCreateOrUpdatePoller` has been removed -- Struct `BuildServiceBuilderClientCreateOrUpdatePollerResponse` has been removed -- Struct `BuildServiceBuilderClientCreateOrUpdateResult` has been removed -- Struct `BuildServiceBuilderClientDeletePoller` has been removed -- Struct `BuildServiceBuilderClientDeletePollerResponse` has been removed -- Struct `BuildServiceBuilderClientGetResult` has been removed -- Struct `BuildServiceBuilderClientListPager` has been removed -- Struct `BuildServiceBuilderClientListResult` has been removed -- Struct `BuildServiceClientCreateOrUpdateBuildResult` has been removed -- Struct `BuildServiceClientGetBuildResult` has been removed -- Struct `BuildServiceClientGetBuildResultLogResult` has been removed -- Struct `BuildServiceClientGetBuildResultResult` has been removed -- Struct `BuildServiceClientGetBuildServiceResult` has been removed -- Struct `BuildServiceClientGetResourceUploadURLResult` has been removed -- Struct `BuildServiceClientGetSupportedBuildpackResult` has been removed -- Struct `BuildServiceClientGetSupportedStackResult` has been removed -- Struct `BuildServiceClientListBuildResultsPager` has been removed -- Struct `BuildServiceClientListBuildResultsResult` has been removed -- Struct `BuildServiceClientListBuildServicesPager` has been removed -- Struct `BuildServiceClientListBuildServicesResult` has been removed -- Struct `BuildServiceClientListBuildsPager` has been removed -- Struct `BuildServiceClientListBuildsResult` has been removed -- Struct `BuildServiceClientListSupportedBuildpacksResult` has been removed -- Struct `BuildServiceClientListSupportedStacksResult` has been removed -- Struct `BuildpackBindingClientCreateOrUpdatePoller` has been removed -- Struct `BuildpackBindingClientCreateOrUpdatePollerResponse` has been removed -- Struct `BuildpackBindingClientCreateOrUpdateResult` has been removed -- Struct `BuildpackBindingClientDeletePoller` has been removed -- Struct `BuildpackBindingClientDeletePollerResponse` has been removed -- Struct `BuildpackBindingClientGetResult` has been removed -- Struct `BuildpackBindingClientListPager` has been removed -- Struct `BuildpackBindingClientListResult` has been removed -- Struct `CertificatesClientCreateOrUpdatePoller` has been removed -- Struct `CertificatesClientCreateOrUpdatePollerResponse` has been removed -- Struct `CertificatesClientCreateOrUpdateResult` has been removed -- Struct `CertificatesClientDeletePoller` has been removed -- Struct `CertificatesClientDeletePollerResponse` has been removed -- Struct `CertificatesClientGetResult` has been removed -- Struct `CertificatesClientListPager` has been removed -- Struct `CertificatesClientListResult` has been removed -- Struct `ConfigServersClientGetResult` has been removed -- Struct `ConfigServersClientUpdatePatchPoller` has been removed -- Struct `ConfigServersClientUpdatePatchPollerResponse` has been removed -- Struct `ConfigServersClientUpdatePatchResult` has been removed -- Struct `ConfigServersClientUpdatePutPoller` has been removed -- Struct `ConfigServersClientUpdatePutPollerResponse` has been removed -- Struct `ConfigServersClientUpdatePutResult` has been removed -- Struct `ConfigServersClientValidatePoller` has been removed -- Struct `ConfigServersClientValidatePollerResponse` has been removed -- Struct `ConfigServersClientValidateResult` has been removed -- Struct `ConfigurationServicesClientCreateOrUpdatePoller` has been removed -- Struct `ConfigurationServicesClientCreateOrUpdatePollerResponse` has been removed -- Struct `ConfigurationServicesClientCreateOrUpdateResult` has been removed -- Struct `ConfigurationServicesClientDeletePoller` has been removed -- Struct `ConfigurationServicesClientDeletePollerResponse` has been removed -- Struct `ConfigurationServicesClientGetResult` has been removed -- Struct `ConfigurationServicesClientListPager` has been removed -- Struct `ConfigurationServicesClientListResult` has been removed -- Struct `ConfigurationServicesClientValidatePoller` has been removed -- Struct `ConfigurationServicesClientValidatePollerResponse` has been removed -- Struct `ConfigurationServicesClientValidateResult` has been removed -- Struct `CustomDomainsClientCreateOrUpdatePoller` has been removed -- Struct `CustomDomainsClientCreateOrUpdatePollerResponse` has been removed -- Struct `CustomDomainsClientCreateOrUpdateResult` has been removed -- Struct `CustomDomainsClientDeletePoller` has been removed -- Struct `CustomDomainsClientDeletePollerResponse` has been removed -- Struct `CustomDomainsClientGetResult` has been removed -- Struct `CustomDomainsClientListPager` has been removed -- Struct `CustomDomainsClientListResult` has been removed -- Struct `CustomDomainsClientUpdatePoller` has been removed -- Struct `CustomDomainsClientUpdatePollerResponse` has been removed -- Struct `CustomDomainsClientUpdateResult` has been removed -- Struct `DeploymentsClientCreateOrUpdatePoller` has been removed -- Struct `DeploymentsClientCreateOrUpdatePollerResponse` has been removed -- Struct `DeploymentsClientCreateOrUpdateResult` has been removed -- Struct `DeploymentsClientDeletePoller` has been removed -- Struct `DeploymentsClientDeletePollerResponse` has been removed -- Struct `DeploymentsClientGenerateHeapDumpPoller` has been removed -- Struct `DeploymentsClientGenerateHeapDumpPollerResponse` has been removed -- Struct `DeploymentsClientGenerateThreadDumpPoller` has been removed -- Struct `DeploymentsClientGenerateThreadDumpPollerResponse` has been removed -- Struct `DeploymentsClientGetLogFileURLResult` has been removed -- Struct `DeploymentsClientGetResult` has been removed -- Struct `DeploymentsClientListForClusterPager` has been removed -- Struct `DeploymentsClientListForClusterResult` has been removed -- Struct `DeploymentsClientListPager` has been removed -- Struct `DeploymentsClientListResult` has been removed -- Struct `DeploymentsClientRestartPoller` has been removed -- Struct `DeploymentsClientRestartPollerResponse` has been removed -- Struct `DeploymentsClientStartJFRPoller` has been removed -- Struct `DeploymentsClientStartJFRPollerResponse` has been removed -- Struct `DeploymentsClientStartPoller` has been removed -- Struct `DeploymentsClientStartPollerResponse` has been removed -- Struct `DeploymentsClientStopPoller` has been removed -- Struct `DeploymentsClientStopPollerResponse` has been removed -- Struct `DeploymentsClientUpdatePoller` has been removed -- Struct `DeploymentsClientUpdatePollerResponse` has been removed -- Struct `DeploymentsClientUpdateResult` has been removed -- Struct `GatewayCustomDomainsClientCreateOrUpdatePoller` has been removed -- Struct `GatewayCustomDomainsClientCreateOrUpdatePollerResponse` has been removed -- Struct `GatewayCustomDomainsClientCreateOrUpdateResult` has been removed -- Struct `GatewayCustomDomainsClientDeletePoller` has been removed -- Struct `GatewayCustomDomainsClientDeletePollerResponse` has been removed -- Struct `GatewayCustomDomainsClientGetResult` has been removed -- Struct `GatewayCustomDomainsClientListPager` has been removed -- Struct `GatewayCustomDomainsClientListResult` has been removed -- Struct `GatewayRouteConfigsClientCreateOrUpdatePoller` has been removed -- Struct `GatewayRouteConfigsClientCreateOrUpdatePollerResponse` has been removed -- Struct `GatewayRouteConfigsClientCreateOrUpdateResult` has been removed -- Struct `GatewayRouteConfigsClientDeletePoller` has been removed -- Struct `GatewayRouteConfigsClientDeletePollerResponse` has been removed -- Struct `GatewayRouteConfigsClientGetResult` has been removed -- Struct `GatewayRouteConfigsClientListPager` has been removed -- Struct `GatewayRouteConfigsClientListResult` has been removed -- Struct `GatewaysClientCreateOrUpdatePoller` has been removed -- Struct `GatewaysClientCreateOrUpdatePollerResponse` has been removed -- Struct `GatewaysClientCreateOrUpdateResult` has been removed -- Struct `GatewaysClientDeletePoller` has been removed -- Struct `GatewaysClientDeletePollerResponse` has been removed -- Struct `GatewaysClientGetResult` has been removed -- Struct `GatewaysClientListPager` has been removed -- Struct `GatewaysClientListResult` has been removed -- Struct `GatewaysClientValidateDomainResult` has been removed -- Struct `MonitoringSettingsClientGetResult` has been removed -- Struct `MonitoringSettingsClientUpdatePatchPoller` has been removed -- Struct `MonitoringSettingsClientUpdatePatchPollerResponse` has been removed -- Struct `MonitoringSettingsClientUpdatePatchResult` has been removed -- Struct `MonitoringSettingsClientUpdatePutPoller` has been removed -- Struct `MonitoringSettingsClientUpdatePutPollerResponse` has been removed -- Struct `MonitoringSettingsClientUpdatePutResult` has been removed -- Struct `OperationsClientListPager` has been removed -- Struct `OperationsClientListResult` has been removed -- Struct `RuntimeVersionsClientListRuntimeVersionsResult` has been removed -- Struct `SKUsClientListPager` has been removed -- Struct `SKUsClientListResult` has been removed -- Struct `ServiceRegistriesClientCreateOrUpdatePoller` has been removed -- Struct `ServiceRegistriesClientCreateOrUpdatePollerResponse` has been removed -- Struct `ServiceRegistriesClientCreateOrUpdateResult` has been removed -- Struct `ServiceRegistriesClientDeletePoller` has been removed -- Struct `ServiceRegistriesClientDeletePollerResponse` has been removed -- Struct `ServiceRegistriesClientGetResult` has been removed -- Struct `ServiceRegistriesClientListPager` has been removed -- Struct `ServiceRegistriesClientListResult` has been removed -- Struct `ServicesClientCheckNameAvailabilityResult` has been removed -- Struct `ServicesClientCreateOrUpdatePoller` has been removed -- Struct `ServicesClientCreateOrUpdatePollerResponse` has been removed -- Struct `ServicesClientCreateOrUpdateResult` has been removed -- Struct `ServicesClientDeletePoller` has been removed -- Struct `ServicesClientDeletePollerResponse` has been removed -- Struct `ServicesClientEnableTestEndpointResult` has been removed -- Struct `ServicesClientGetResult` has been removed -- Struct `ServicesClientListBySubscriptionPager` has been removed -- Struct `ServicesClientListBySubscriptionResult` has been removed -- Struct `ServicesClientListPager` has been removed -- Struct `ServicesClientListResult` has been removed -- Struct `ServicesClientListTestKeysResult` has been removed -- Struct `ServicesClientRegenerateTestKeyResult` has been removed -- Struct `ServicesClientStartPoller` has been removed -- Struct `ServicesClientStartPollerResponse` has been removed -- Struct `ServicesClientStopPoller` has been removed -- Struct `ServicesClientStopPollerResponse` has been removed -- Struct `ServicesClientUpdatePoller` has been removed -- Struct `ServicesClientUpdatePollerResponse` has been removed -- Struct `ServicesClientUpdateResult` has been removed -- Struct `StoragesClientCreateOrUpdatePoller` has been removed -- Struct `StoragesClientCreateOrUpdatePollerResponse` has been removed -- Struct `StoragesClientCreateOrUpdateResult` has been removed -- Struct `StoragesClientDeletePoller` has been removed -- Struct `StoragesClientDeletePollerResponse` has been removed -- Struct `StoragesClientGetResult` has been removed -- Struct `StoragesClientListPager` has been removed -- Struct `StoragesClientListResult` has been removed -- Field `ServiceRegistriesClientCreateOrUpdateResult` of struct `ServiceRegistriesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ServiceRegistriesClientCreateOrUpdateResponse` has been removed -- Field `GatewayCustomDomainsClientListResult` of struct `GatewayCustomDomainsClientListResponse` has been removed -- Field `RawResponse` of struct `GatewayCustomDomainsClientListResponse` has been removed -- Field `BuildServiceClientGetBuildServiceResult` of struct `BuildServiceClientGetBuildServiceResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientGetBuildServiceResponse` has been removed -- Field `BuildServiceClientGetResourceUploadURLResult` of struct `BuildServiceClientGetResourceUploadURLResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientGetResourceUploadURLResponse` has been removed -- Field `GatewayRouteConfigsClientGetResult` of struct `GatewayRouteConfigsClientGetResponse` has been removed -- Field `RawResponse` of struct `GatewayRouteConfigsClientGetResponse` has been removed -- Field `DeploymentsClientGetLogFileURLResult` of struct `DeploymentsClientGetLogFileURLResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientGetLogFileURLResponse` has been removed -- Field `ServicesClientCheckNameAvailabilityResult` of struct `ServicesClientCheckNameAvailabilityResponse` has been removed -- Field `RawResponse` of struct `ServicesClientCheckNameAvailabilityResponse` has been removed -- Field `BuildServiceBuilderClientListResult` of struct `BuildServiceBuilderClientListResponse` has been removed -- Field `RawResponse` of struct `BuildServiceBuilderClientListResponse` has been removed -- Field `ConfigurationServicesClientCreateOrUpdateResult` of struct `ConfigurationServicesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ConfigurationServicesClientCreateOrUpdateResponse` has been removed -- Field `APIPortalCustomDomainsClientGetResult` of struct `APIPortalCustomDomainsClientGetResponse` has been removed -- Field `RawResponse` of struct `APIPortalCustomDomainsClientGetResponse` has been removed -- Field `APIPortalCustomDomainsClientCreateOrUpdateResult` of struct `APIPortalCustomDomainsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `APIPortalCustomDomainsClientCreateOrUpdateResponse` has been removed -- Field `CustomDomainsClientGetResult` of struct `CustomDomainsClientGetResponse` has been removed -- Field `RawResponse` of struct `CustomDomainsClientGetResponse` has been removed -- Field `BuildServiceAgentPoolClientListResult` of struct `BuildServiceAgentPoolClientListResponse` has been removed -- Field `RawResponse` of struct `BuildServiceAgentPoolClientListResponse` has been removed -- Field `CertificatesClientGetResult` of struct `CertificatesClientGetResponse` has been removed -- Field `RawResponse` of struct `CertificatesClientGetResponse` has been removed -- Field `BuildServiceClientListBuildsResult` of struct `BuildServiceClientListBuildsResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientListBuildsResponse` has been removed -- Field `BuildServiceClientListBuildServicesResult` of struct `BuildServiceClientListBuildServicesResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientListBuildServicesResponse` has been removed -- Field `ServicesClientListResult` of struct `ServicesClientListResponse` has been removed -- Field `RawResponse` of struct `ServicesClientListResponse` has been removed -- Field `GatewayCustomDomainsClientGetResult` of struct `GatewayCustomDomainsClientGetResponse` has been removed -- Field `RawResponse` of struct `GatewayCustomDomainsClientGetResponse` has been removed -- Field `ServiceRegistriesClientListResult` of struct `ServiceRegistriesClientListResponse` has been removed -- Field `RawResponse` of struct `ServiceRegistriesClientListResponse` has been removed -- Field `GatewayRouteConfigsClientCreateOrUpdateResult` of struct `GatewayRouteConfigsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `GatewayRouteConfigsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ConfigurationServicesClientDeleteResponse` has been removed -- Field `RawResponse` of struct `ServicesClientStartResponse` has been removed -- Field `APIPortalsClientCreateOrUpdateResult` of struct `APIPortalsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `APIPortalsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ServicesClientDeleteResponse` has been removed -- Field `ServicesClientListBySubscriptionResult` of struct `ServicesClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `ServicesClientListBySubscriptionResponse` has been removed -- Field `ServicesClientEnableTestEndpointResult` of struct `ServicesClientEnableTestEndpointResponse` has been removed -- Field `RawResponse` of struct `ServicesClientEnableTestEndpointResponse` has been removed -- Field `BindingsClientGetResult` of struct `BindingsClientGetResponse` has been removed -- Field `RawResponse` of struct `BindingsClientGetResponse` has been removed -- Field `BindingsClientListResult` of struct `BindingsClientListResponse` has been removed -- Field `RawResponse` of struct `BindingsClientListResponse` has been removed -- Field `DeploymentsClientUpdateResult` of struct `DeploymentsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `GatewayRouteConfigsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `APIPortalCustomDomainsClientDeleteResponse` has been removed -- Field `ConfigServersClientGetResult` of struct `ConfigServersClientGetResponse` has been removed -- Field `RawResponse` of struct `ConfigServersClientGetResponse` has been removed -- Field `BuildServiceClientGetSupportedBuildpackResult` of struct `BuildServiceClientGetSupportedBuildpackResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientGetSupportedBuildpackResponse` has been removed -- Field `CustomDomainsClientUpdateResult` of struct `CustomDomainsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `CustomDomainsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `CustomDomainsClientDeleteResponse` has been removed -- Field `GatewayCustomDomainsClientCreateOrUpdateResult` of struct `GatewayCustomDomainsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `GatewayCustomDomainsClientCreateOrUpdateResponse` has been removed -- Field `BuildServiceClientCreateOrUpdateBuildResult` of struct `BuildServiceClientCreateOrUpdateBuildResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientCreateOrUpdateBuildResponse` has been removed -- Field `BuildServiceClientListSupportedStacksResult` of struct `BuildServiceClientListSupportedStacksResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientListSupportedStacksResponse` has been removed -- Field `APIPortalsClientListResult` of struct `APIPortalsClientListResponse` has been removed -- Field `RawResponse` of struct `APIPortalsClientListResponse` has been removed -- Field `BuildServiceBuilderClientCreateOrUpdateResult` of struct `BuildServiceBuilderClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `BuildServiceBuilderClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `CertificatesClientDeleteResponse` has been removed -- Field `BuildServiceAgentPoolClientUpdatePutResult` of struct `BuildServiceAgentPoolClientUpdatePutResponse` has been removed -- Field `RawResponse` of struct `BuildServiceAgentPoolClientUpdatePutResponse` has been removed -- Field `BuildpackBindingClientGetResult` of struct `BuildpackBindingClientGetResponse` has been removed -- Field `RawResponse` of struct `BuildpackBindingClientGetResponse` has been removed -- Field `BuildServiceBuilderClientGetResult` of struct `BuildServiceBuilderClientGetResponse` has been removed -- Field `RawResponse` of struct `BuildServiceBuilderClientGetResponse` has been removed -- Field `StoragesClientCreateOrUpdateResult` of struct `StoragesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `StoragesClientCreateOrUpdateResponse` has been removed -- Field `StoragesClientListResult` of struct `StoragesClientListResponse` has been removed -- Field `RawResponse` of struct `StoragesClientListResponse` has been removed -- Field `ServicesClientUpdateResult` of struct `ServicesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ServicesClientUpdateResponse` has been removed -- Field `AppsClientValidateDomainResult` of struct `AppsClientValidateDomainResponse` has been removed -- Field `RawResponse` of struct `AppsClientValidateDomainResponse` has been removed -- Field `ConfigurationServicesClientGetResult` of struct `ConfigurationServicesClientGetResponse` has been removed -- Field `RawResponse` of struct `ConfigurationServicesClientGetResponse` has been removed -- Field `MonitoringSettingsClientGetResult` of struct `MonitoringSettingsClientGetResponse` has been removed -- Field `RawResponse` of struct `MonitoringSettingsClientGetResponse` has been removed -- Field `BuildpackBindingClientListResult` of struct `BuildpackBindingClientListResponse` has been removed -- Field `RawResponse` of struct `BuildpackBindingClientListResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientStopResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientGenerateHeapDumpResponse` has been removed -- Field `BuildpackBindingClientCreateOrUpdateResult` of struct `BuildpackBindingClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `BuildpackBindingClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `APIPortalsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `ServiceRegistriesClientDeleteResponse` has been removed -- Field `DeploymentsClientCreateOrUpdateResult` of struct `DeploymentsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientCreateOrUpdateResponse` has been removed -- Field `AppsClientGetResourceUploadURLResult` of struct `AppsClientGetResourceUploadURLResponse` has been removed -- Field `RawResponse` of struct `AppsClientGetResourceUploadURLResponse` has been removed -- Field `ConfigServersClientValidateResult` of struct `ConfigServersClientValidateResponse` has been removed -- Field `RawResponse` of struct `ConfigServersClientValidateResponse` has been removed -- Field `RawResponse` of struct `StoragesClientDeleteResponse` has been removed -- Field `RawResponse` of struct `BuildServiceBuilderClientDeleteResponse` has been removed -- Field `AppsClientListResult` of struct `AppsClientListResponse` has been removed -- Field `RawResponse` of struct `AppsClientListResponse` has been removed -- Field `BuildServiceClientListBuildResultsResult` of struct `BuildServiceClientListBuildResultsResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientListBuildResultsResponse` has been removed -- Field `MonitoringSettingsClientUpdatePutResult` of struct `MonitoringSettingsClientUpdatePutResponse` has been removed -- Field `RawResponse` of struct `MonitoringSettingsClientUpdatePutResponse` has been removed -- Field `CustomDomainsClientListResult` of struct `CustomDomainsClientListResponse` has been removed -- Field `RawResponse` of struct `CustomDomainsClientListResponse` has been removed -- Field `ServicesClientListTestKeysResult` of struct `ServicesClientListTestKeysResponse` has been removed -- Field `RawResponse` of struct `ServicesClientListTestKeysResponse` has been removed -- Field `DeploymentsClientListResult` of struct `DeploymentsClientListResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientListResponse` has been removed -- Field `StoragesClientGetResult` of struct `StoragesClientGetResponse` has been removed -- Field `RawResponse` of struct `StoragesClientGetResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientDeleteResponse` has been removed -- Field `ServiceRegistriesClientGetResult` of struct `ServiceRegistriesClientGetResponse` has been removed -- Field `RawResponse` of struct `ServiceRegistriesClientGetResponse` has been removed -- Field `GatewayRouteConfigsClientListResult` of struct `GatewayRouteConfigsClientListResponse` has been removed -- Field `RawResponse` of struct `GatewayRouteConfigsClientListResponse` has been removed -- Field `ServicesClientGetResult` of struct `ServicesClientGetResponse` has been removed -- Field `RawResponse` of struct `ServicesClientGetResponse` has been removed -- Field `RawResponse` of struct `AppsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientStartJFRResponse` has been removed -- Field `GatewaysClientGetResult` of struct `GatewaysClientGetResponse` has been removed -- Field `RawResponse` of struct `GatewaysClientGetResponse` has been removed -- Field `AppsClientCreateOrUpdateResult` of struct `AppsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `AppsClientCreateOrUpdateResponse` has been removed -- Field `ConfigurationServicesClientListResult` of struct `ConfigurationServicesClientListResponse` has been removed -- Field `RawResponse` of struct `ConfigurationServicesClientListResponse` has been removed -- Field `ServicesClientRegenerateTestKeyResult` of struct `ServicesClientRegenerateTestKeyResponse` has been removed -- Field `RawResponse` of struct `ServicesClientRegenerateTestKeyResponse` has been removed -- Field `RuntimeVersionsClientListRuntimeVersionsResult` of struct `RuntimeVersionsClientListRuntimeVersionsResponse` has been removed -- Field `RawResponse` of struct `RuntimeVersionsClientListRuntimeVersionsResponse` has been removed -- Field `BuildServiceClientGetSupportedStackResult` of struct `BuildServiceClientGetSupportedStackResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientGetSupportedStackResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientGenerateThreadDumpResponse` has been removed -- Field `OperationsClientListResult` of struct `OperationsClientListResponse` has been removed -- Field `RawResponse` of struct `OperationsClientListResponse` has been removed -- Field `SKUsClientListResult` of struct `SKUsClientListResponse` has been removed -- Field `RawResponse` of struct `SKUsClientListResponse` has been removed -- Field `GatewaysClientListResult` of struct `GatewaysClientListResponse` has been removed -- Field `RawResponse` of struct `GatewaysClientListResponse` has been removed -- Field `MonitoringSettingsClientUpdatePatchResult` of struct `MonitoringSettingsClientUpdatePatchResponse` has been removed -- Field `RawResponse` of struct `MonitoringSettingsClientUpdatePatchResponse` has been removed -- Field `BuildServiceClientGetBuildResult` of struct `BuildServiceClientGetBuildResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientGetBuildResponse` has been removed -- Field `RawResponse` of struct `GatewayCustomDomainsClientDeleteResponse` has been removed -- Field `BindingsClientCreateOrUpdateResult` of struct `BindingsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `BindingsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientStartResponse` has been removed -- Field `DeploymentsClientListForClusterResult` of struct `DeploymentsClientListForClusterResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientListForClusterResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientRestartResponse` has been removed -- Field `APIPortalsClientValidateDomainResult` of struct `APIPortalsClientValidateDomainResponse` has been removed -- Field `RawResponse` of struct `APIPortalsClientValidateDomainResponse` has been removed -- Field `BindingsClientUpdateResult` of struct `BindingsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `BindingsClientUpdateResponse` has been removed -- Field `APIPortalCustomDomainsClientListResult` of struct `APIPortalCustomDomainsClientListResponse` has been removed -- Field `RawResponse` of struct `APIPortalCustomDomainsClientListResponse` has been removed -- Field `GatewaysClientValidateDomainResult` of struct `GatewaysClientValidateDomainResponse` has been removed -- Field `RawResponse` of struct `GatewaysClientValidateDomainResponse` has been removed -- Field `BuildServiceAgentPoolClientGetResult` of struct `BuildServiceAgentPoolClientGetResponse` has been removed -- Field `RawResponse` of struct `BuildServiceAgentPoolClientGetResponse` has been removed -- Field `ConfigurationServicesClientValidateResult` of struct `ConfigurationServicesClientValidateResponse` has been removed -- Field `RawResponse` of struct `ConfigurationServicesClientValidateResponse` has been removed -- Field `BuildServiceClientListSupportedBuildpacksResult` of struct `BuildServiceClientListSupportedBuildpacksResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientListSupportedBuildpacksResponse` has been removed -- Field `RawResponse` of struct `BindingsClientDeleteResponse` has been removed -- Field `CertificatesClientCreateOrUpdateResult` of struct `CertificatesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `CertificatesClientCreateOrUpdateResponse` has been removed -- Field `ServicesClientCreateOrUpdateResult` of struct `ServicesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ServicesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `GatewaysClientDeleteResponse` has been removed -- Field `ConfigServersClientUpdatePutResult` of struct `ConfigServersClientUpdatePutResponse` has been removed -- Field `RawResponse` of struct `ConfigServersClientUpdatePutResponse` has been removed -- Field `GatewaysClientCreateOrUpdateResult` of struct `GatewaysClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `GatewaysClientCreateOrUpdateResponse` has been removed -- Field `BuildServiceClientGetBuildResultResult` of struct `BuildServiceClientGetBuildResultResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientGetBuildResultResponse` has been removed -- Field `APIPortalsClientGetResult` of struct `APIPortalsClientGetResponse` has been removed -- Field `RawResponse` of struct `APIPortalsClientGetResponse` has been removed -- Field `CertificatesClientListResult` of struct `CertificatesClientListResponse` has been removed -- Field `RawResponse` of struct `CertificatesClientListResponse` has been removed -- Field `BuildServiceClientGetBuildResultLogResult` of struct `BuildServiceClientGetBuildResultLogResponse` has been removed -- Field `RawResponse` of struct `BuildServiceClientGetBuildResultLogResponse` has been removed -- Field `AppsClientUpdateResult` of struct `AppsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `AppsClientUpdateResponse` has been removed -- Field `ConfigServersClientUpdatePatchResult` of struct `ConfigServersClientUpdatePatchResponse` has been removed -- Field `RawResponse` of struct `ConfigServersClientUpdatePatchResponse` has been removed -- Field `CustomDomainsClientCreateOrUpdateResult` of struct `CustomDomainsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `CustomDomainsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `BuildpackBindingClientDeleteResponse` has been removed -- Field `RawResponse` of struct `ServicesClientDisableTestEndpointResponse` has been removed -- Field `DeploymentsClientGetResult` of struct `DeploymentsClientGetResponse` has been removed -- Field `RawResponse` of struct `DeploymentsClientGetResponse` has been removed -- Field `AppsClientGetResult` of struct `AppsClientGetResponse` has been removed -- Field `RawResponse` of struct `AppsClientGetResponse` has been removed -- Field `RawResponse` of struct `ServicesClientStopResponse` has been removed -- Field `AppsClientSetActiveDeploymentsResult` of struct `AppsClientSetActiveDeploymentsResponse` has been removed -- Field `RawResponse` of struct `AppsClientSetActiveDeploymentsResponse` has been removed - -### Features Added - -- New const `ProvisioningStateStopping` -- New const `TypeAzureFileVolume` -- New const `ProvisioningStateStarting` -- New const `StorageTypeStorageAccount` -- New const `ActionTypeInternal` -- New function `PossibleTypeValues() []Type` -- New function `PossibleActionTypeValues() []ActionType` -- New function `PossibleStorageTypeValues() []StorageType` -- New function `ManagedIdentityProperties.MarshalJSON() ([]byte, error)` -- New struct `UserAssignedManagedIdentity` -- New field `ResumeToken` in struct `ConfigurationServicesClientBeginCreateOrUpdateOptions` -- New anonymous field `CustomDomainResourceCollection` in struct `CustomDomainsClientListResponse` -- New anonymous field `BuildpackBindingResource` in struct `BuildpackBindingClientGetResponse` -- New anonymous field `CustomDomainValidateResult` in struct `AppsClientValidateDomainResponse` -- New anonymous field `BuildResultLog` in struct `BuildServiceClientGetBuildResultLogResponse` -- New anonymous field `SupportedStacksCollection` in struct `BuildServiceClientListSupportedStacksResponse` -- New anonymous field `BuildService` in struct `BuildServiceClientGetBuildServiceResponse` -- New anonymous field `BuilderResource` in struct `BuildServiceBuilderClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `MonitoringSettingsClientBeginUpdatePatchOptions` -- New anonymous field `ConfigServerSettingsValidateResult` in struct `ConfigServersClientValidateResponse` -- New anonymous field `GatewayRouteConfigResource` in struct `GatewayRouteConfigsClientGetResponse` -- New anonymous field `BuilderResourceCollection` in struct `BuildServiceBuilderClientListResponse` -- New field `ResumeToken` in struct `StoragesClientBeginCreateOrUpdateOptions` -- New anonymous field `GatewayCustomDomainResource` in struct `GatewayCustomDomainsClientGetResponse` -- New anonymous field `NameAvailability` in struct `ServicesClientCheckNameAvailabilityResponse` -- New field `ResumeToken` in struct `ConfigurationServicesClientBeginDeleteOptions` -- New anonymous field `ConfigurationServiceSettingsValidateResult` in struct `ConfigurationServicesClientValidateResponse` -- New field `ResumeToken` in struct `ServicesClientBeginStopOptions` -- New anonymous field `ConfigurationServiceResource` in struct `ConfigurationServicesClientGetResponse` -- New field `ResumeToken` in struct `ServiceRegistriesClientBeginCreateOrUpdateOptions` -- New anonymous field `CertificateResource` in struct `CertificatesClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `DeploymentsClientBeginRestartOptions` -- New anonymous field `ServiceResourceList` in struct `ServicesClientListBySubscriptionResponse` -- New anonymous field `AvailableOperations` in struct `OperationsClientListResponse` -- New field `ResumeToken` in struct `MonitoringSettingsClientBeginUpdatePutOptions` -- New anonymous field `DeploymentResource` in struct `DeploymentsClientUpdateResponse` -- New anonymous field `ServiceResource` in struct `ServicesClientUpdateResponse` -- New anonymous field `MonitoringSettingResource` in struct `MonitoringSettingsClientUpdatePatchResponse` -- New anonymous field `BindingResource` in struct `BindingsClientGetResponse` -- New field `ResumeToken` in struct `AppsClientBeginDeleteOptions` -- New field `LanguageFramework` in struct `CustomContainer` -- New field `ResumeToken` in struct `ServiceRegistriesClientBeginDeleteOptions` -- New anonymous field `ServiceResource` in struct `ServicesClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `BuildServiceBuilderClientBeginDeleteOptions` -- New field `ResumeToken` in struct `GatewayRouteConfigsClientBeginDeleteOptions` -- New anonymous field `StorageResource` in struct `StoragesClientGetResponse` -- New anonymous field `StorageResourceCollection` in struct `StoragesClientListResponse` -- New anonymous field `CertificateResourceCollection` in struct `CertificatesClientListResponse` -- New field `ResumeToken` in struct `DeploymentsClientBeginUpdateOptions` -- New anonymous field `ServiceRegistryResourceCollection` in struct `ServiceRegistriesClientListResponse` -- New anonymous field `CustomDomainResource` in struct `CustomDomainsClientGetResponse` -- New field `ResumeToken` in struct `APIPortalsClientBeginDeleteOptions` -- New anonymous field `ResourceUploadDefinition` in struct `AppsClientGetResourceUploadURLResponse` -- New anonymous field `BindingResource` in struct `BindingsClientUpdateResponse` -- New field `ResumeToken` in struct `DeploymentsClientBeginStopOptions` -- New field `ResumeToken` in struct `AppsClientBeginCreateOrUpdateOptions` -- New anonymous field `ConfigurationServiceResource` in struct `ConfigurationServicesClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `BuildpackBindingClientBeginDeleteOptions` -- New anonymous field `APIPortalCustomDomainResourceCollection` in struct `APIPortalCustomDomainsClientListResponse` -- New anonymous field `GatewayRouteConfigResourceCollection` in struct `GatewayRouteConfigsClientListResponse` -- New anonymous field `MonitoringSettingResource` in struct `MonitoringSettingsClientUpdatePutResponse` -- New anonymous field `GatewayCustomDomainResource` in struct `GatewayCustomDomainsClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `APIPortalCustomDomainsClientBeginCreateOrUpdateOptions` -- New anonymous field `ConfigServerResource` in struct `ConfigServersClientUpdatePatchResponse` -- New field `ResumeToken` in struct `CustomDomainsClientBeginDeleteOptions` -- New field `ResumeToken` in struct `CustomDomainsClientBeginCreateOrUpdateOptions` -- New anonymous field `ResourceSKUCollection` in struct `SKUsClientListResponse` -- New field `ResumeToken` in struct `DeploymentsClientBeginGenerateThreadDumpOptions` -- New anonymous field `CertificateResource` in struct `CertificatesClientGetResponse` -- New field `ResumeToken` in struct `ServicesClientBeginCreateOrUpdateOptions` -- New field `ResumeToken` in struct `DeploymentsClientBeginStartOptions` -- New anonymous field `DeploymentResourceCollection` in struct `DeploymentsClientListResponse` -- New anonymous field `ServiceRegistryResource` in struct `ServiceRegistriesClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `DeploymentsClientBeginGenerateHeapDumpOptions` -- New anonymous field `ServiceResource` in struct `ServicesClientGetResponse` -- New anonymous field `GatewayResourceCollection` in struct `GatewaysClientListResponse` -- New anonymous field `ServiceRegistryResource` in struct `ServiceRegistriesClientGetResponse` -- New field `ResumeToken` in struct `CustomDomainsClientBeginUpdateOptions` -- New anonymous field `BuildCollection` in struct `BuildServiceClientListBuildsResponse` -- New anonymous field `TestKeys` in struct `ServicesClientListTestKeysResponse` -- New field `ResumeToken` in struct `GatewaysClientBeginCreateOrUpdateOptions` -- New anonymous field `AppResource` in struct `AppsClientCreateOrUpdateResponse` -- New anonymous field `BindingResource` in struct `BindingsClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `ConfigurationServicesClientBeginValidateOptions` -- New field `ResumeToken` in struct `AppsClientBeginSetActiveDeploymentsOptions` -- New anonymous field `SupportedBuildpackResource` in struct `BuildServiceClientGetSupportedBuildpackResponse` -- New anonymous field `Build` in struct `BuildServiceClientGetBuildResponse` -- New anonymous field `BuildpackBindingResourceCollection` in struct `BuildpackBindingClientListResponse` -- New field `ResumeToken` in struct `APIPortalCustomDomainsClientBeginDeleteOptions` -- New field `ResumeToken` in struct `GatewaysClientBeginDeleteOptions` -- New field `ResumeToken` in struct `ServicesClientBeginStartOptions` -- New field `ResumeToken` in struct `DeploymentsClientBeginCreateOrUpdateOptions` -- New anonymous field `ConfigurationServiceResourceCollection` in struct `ConfigurationServicesClientListResponse` -- New field `ResumeToken` in struct `BuildpackBindingClientBeginCreateOrUpdateOptions` -- New anonymous field `CustomDomainResource` in struct `CustomDomainsClientUpdateResponse` -- New field `ResumeToken` in struct `BindingsClientBeginUpdateOptions` -- New anonymous field `APIPortalCustomDomainResource` in struct `APIPortalCustomDomainsClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `DeploymentsClientBeginDeleteOptions` -- New anonymous field `TestKeys` in struct `ServicesClientRegenerateTestKeyResponse` -- New anonymous field `DeploymentResourceCollection` in struct `DeploymentsClientListForClusterResponse` -- New anonymous field `ResourceUploadDefinition` in struct `BuildServiceClientGetResourceUploadURLResponse` -- New anonymous field `AvailableRuntimeVersions` in struct `RuntimeVersionsClientListRuntimeVersionsResponse` -- New anonymous field `GatewayResource` in struct `GatewaysClientGetResponse` -- New anonymous field `DeploymentResource` in struct `DeploymentsClientGetResponse` -- New anonymous field `SupportedStackResource` in struct `BuildServiceClientGetSupportedStackResponse` -- New anonymous field `DeploymentResource` in struct `DeploymentsClientCreateOrUpdateResponse` -- New anonymous field `APIPortalResource` in struct `APIPortalsClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `GatewayCustomDomainsClientBeginCreateOrUpdateOptions` -- New anonymous field `AppResource` in struct `AppsClientUpdateResponse` -- New field `ResumeToken` in struct `GatewayRouteConfigsClientBeginCreateOrUpdateOptions` -- New field `ResumeToken` in struct `BuildServiceAgentPoolClientBeginUpdatePutOptions` -- New field `ResumeToken` in struct `ConfigServersClientBeginUpdatePutOptions` -- New anonymous field `AppResourceCollection` in struct `AppsClientListResponse` -- New anonymous field `BuildServiceCollection` in struct `BuildServiceClientListBuildServicesResponse` -- New anonymous field `GatewayResource` in struct `GatewaysClientCreateOrUpdateResponse` -- New anonymous field `ConfigServerResource` in struct `ConfigServersClientUpdatePutResponse` -- New anonymous field `APIPortalResourceCollection` in struct `APIPortalsClientListResponse` -- New anonymous field `BuildServiceAgentPoolResourceCollection` in struct `BuildServiceAgentPoolClientListResponse` -- New anonymous field `StorageResource` in struct `StoragesClientCreateOrUpdateResponse` -- New anonymous field `CustomDomainResource` in struct `CustomDomainsClientCreateOrUpdateResponse` -- New anonymous field `SupportedBuildpacksCollection` in struct `BuildServiceClientListSupportedBuildpacksResponse` -- New field `ResumeToken` in struct `AppsClientBeginUpdateOptions` -- New anonymous field `CustomDomainValidateResult` in struct `APIPortalsClientValidateDomainResponse` -- New field `ResumeToken` in struct `BindingsClientBeginDeleteOptions` -- New anonymous field `AppResource` in struct `AppsClientSetActiveDeploymentsResponse` -- New anonymous field `BuildServiceAgentPoolResource` in struct `BuildServiceAgentPoolClientUpdatePutResponse` -- New anonymous field `ServiceResourceList` in struct `ServicesClientListResponse` -- New anonymous field `BuildResultCollection` in struct `BuildServiceClientListBuildResultsResponse` -- New anonymous field `GatewayRouteConfigResource` in struct `GatewayRouteConfigsClientCreateOrUpdateResponse` -- New anonymous field `ConfigServerResource` in struct `ConfigServersClientGetResponse` -- New anonymous field `BuildpackBindingResource` in struct `BuildpackBindingClientCreateOrUpdateResponse` -- New field `ActionType` in struct `OperationDetail` -- New anonymous field `Build` in struct `BuildServiceClientCreateOrUpdateBuildResponse` -- New field `ResumeToken` in struct `CertificatesClientBeginDeleteOptions` -- New field `ResumeToken` in struct `APIPortalsClientBeginCreateOrUpdateOptions` -- New field `ResumeToken` in struct `StoragesClientBeginDeleteOptions` -- New field `ResumeToken` in struct `ConfigServersClientBeginUpdatePatchOptions` -- New field `ResumeToken` in struct `CertificatesClientBeginCreateOrUpdateOptions` -- New anonymous field `BindingResourceCollection` in struct `BindingsClientListResponse` -- New anonymous field `BuildResult` in struct `BuildServiceClientGetBuildResultResponse` -- New anonymous field `MonitoringSettingResource` in struct `MonitoringSettingsClientGetResponse` -- New field `ResumeToken` in struct `ServicesClientBeginDeleteOptions` -- New field `ResumeToken` in struct `GatewayCustomDomainsClientBeginDeleteOptions` -- New field `ResumeToken` in struct `BindingsClientBeginCreateOrUpdateOptions` -- New field `ResumeToken` in struct `BuildServiceBuilderClientBeginCreateOrUpdateOptions` -- New anonymous field `GatewayCustomDomainResourceCollection` in struct `GatewayCustomDomainsClientListResponse` -- New anonymous field `CustomDomainValidateResult` in struct `GatewaysClientValidateDomainResponse` -- New anonymous field `APIPortalResource` in struct `APIPortalsClientGetResponse` -- New anonymous field `TestKeys` in struct `ServicesClientEnableTestEndpointResponse` -- New field `UserAssignedIdentities` in struct `ManagedIdentityProperties` -- New field `ResumeToken` in struct `DeploymentsClientBeginStartJFROptions` -- New anonymous field `AppResource` in struct `AppsClientGetResponse` -- New field `ResumeToken` in struct `ConfigServersClientBeginValidateOptions` -- New anonymous field `LogFileURLResponse` in struct `DeploymentsClientGetLogFileURLResponse` -- New anonymous field `BuilderResource` in struct `BuildServiceBuilderClientGetResponse` -- New field `ResumeToken` in struct `ServicesClientBeginUpdateOptions` -- New anonymous field `APIPortalCustomDomainResource` in struct `APIPortalCustomDomainsClientGetResponse` -- New anonymous field `BuildServiceAgentPoolResource` in struct `BuildServiceAgentPoolClientGetResponse` - - -## 0.3.1 (2022-02-22) - -### Other Changes - -- Remove the go_mod_tidy_hack.go file. - -## 0.3.0 (2022-01-13) -### Breaking Changes - -- Function `*ServicesClient.List` parameter(s) have been changed from `(string, *ServicesListOptions)` to `(string, *ServicesClientListOptions)` -- Function `*ServicesClient.List` return value(s) have been changed from `(*ServicesListPager)` to `(*ServicesClientListPager)` -- Function `*ServicesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *ServicesBeginDeleteOptions)` to `(context.Context, string, string, *ServicesClientBeginDeleteOptions)` -- Function `*ServicesClient.BeginDelete` return value(s) have been changed from `(ServicesDeletePollerResponse, error)` to `(ServicesClientDeletePollerResponse, error)` -- Function `*DeploymentsClient.BeginStartJFR` parameter(s) have been changed from `(context.Context, string, string, string, string, DiagnosticParameters, *DeploymentsBeginStartJFROptions)` to `(context.Context, string, string, string, string, DiagnosticParameters, *DeploymentsClientBeginStartJFROptions)` -- Function `*DeploymentsClient.BeginStartJFR` return value(s) have been changed from `(DeploymentsStartJFRPollerResponse, error)` to `(DeploymentsClientStartJFRPollerResponse, error)` -- Function `*CertificatesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *CertificatesBeginDeleteOptions)` to `(context.Context, string, string, string, *CertificatesClientBeginDeleteOptions)` -- Function `*CertificatesClient.BeginDelete` return value(s) have been changed from `(CertificatesDeletePollerResponse, error)` to `(CertificatesClientDeletePollerResponse, error)` -- Function `*ConfigServersClient.BeginUpdatePut` parameter(s) have been changed from `(context.Context, string, string, ConfigServerResource, *ConfigServersBeginUpdatePutOptions)` to `(context.Context, string, string, ConfigServerResource, *ConfigServersClientBeginUpdatePutOptions)` -- Function `*ConfigServersClient.BeginUpdatePut` return value(s) have been changed from `(ConfigServersUpdatePutPollerResponse, error)` to `(ConfigServersClientUpdatePutPollerResponse, error)` -- Function `*DeploymentsClient.BeginGenerateHeapDump` parameter(s) have been changed from `(context.Context, string, string, string, string, DiagnosticParameters, *DeploymentsBeginGenerateHeapDumpOptions)` to `(context.Context, string, string, string, string, DiagnosticParameters, *DeploymentsClientBeginGenerateHeapDumpOptions)` -- Function `*DeploymentsClient.BeginGenerateHeapDump` return value(s) have been changed from `(DeploymentsGenerateHeapDumpPollerResponse, error)` to `(DeploymentsClientGenerateHeapDumpPollerResponse, error)` -- Function `*CustomDomainsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, string, *CustomDomainsBeginDeleteOptions)` to `(context.Context, string, string, string, string, *CustomDomainsClientBeginDeleteOptions)` -- Function `*CustomDomainsClient.BeginDelete` return value(s) have been changed from `(CustomDomainsDeletePollerResponse, error)` to `(CustomDomainsClientDeletePollerResponse, error)` -- Function `*ServicesClient.RegenerateTestKey` parameter(s) have been changed from `(context.Context, string, string, RegenerateTestKeyRequestPayload, *ServicesRegenerateTestKeyOptions)` to `(context.Context, string, string, RegenerateTestKeyRequestPayload, *ServicesClientRegenerateTestKeyOptions)` -- Function `*ServicesClient.RegenerateTestKey` return value(s) have been changed from `(ServicesRegenerateTestKeyResponse, error)` to `(ServicesClientRegenerateTestKeyResponse, error)` -- Function `*MonitoringSettingsClient.BeginUpdatePatch` parameter(s) have been changed from `(context.Context, string, string, MonitoringSettingResource, *MonitoringSettingsBeginUpdatePatchOptions)` to `(context.Context, string, string, MonitoringSettingResource, *MonitoringSettingsClientBeginUpdatePatchOptions)` -- Function `*MonitoringSettingsClient.BeginUpdatePatch` return value(s) have been changed from `(MonitoringSettingsUpdatePatchPollerResponse, error)` to `(MonitoringSettingsClientUpdatePatchPollerResponse, error)` -- Function `*MonitoringSettingsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *MonitoringSettingsGetOptions)` to `(context.Context, string, string, *MonitoringSettingsClientGetOptions)` -- Function `*MonitoringSettingsClient.Get` return value(s) have been changed from `(MonitoringSettingsGetResponse, error)` to `(MonitoringSettingsClientGetResponse, error)` -- Function `*AppsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, AppResource, *AppsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, AppResource, *AppsClientBeginCreateOrUpdateOptions)` -- Function `*AppsClient.BeginCreateOrUpdate` return value(s) have been changed from `(AppsCreateOrUpdatePollerResponse, error)` to `(AppsClientCreateOrUpdatePollerResponse, error)` -- Function `*StoragesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, StorageResource, *StoragesBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, StorageResource, *StoragesClientBeginCreateOrUpdateOptions)` -- Function `*StoragesClient.BeginCreateOrUpdate` return value(s) have been changed from `(StoragesCreateOrUpdatePollerResponse, error)` to `(StoragesClientCreateOrUpdatePollerResponse, error)` -- Function `*AppsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *AppsGetOptions)` to `(context.Context, string, string, string, *AppsClientGetOptions)` -- Function `*AppsClient.Get` return value(s) have been changed from `(AppsGetResponse, error)` to `(AppsClientGetResponse, error)` -- Function `*ServicesClient.BeginStart` parameter(s) have been changed from `(context.Context, string, string, *ServicesBeginStartOptions)` to `(context.Context, string, string, *ServicesClientBeginStartOptions)` -- Function `*ServicesClient.BeginStart` return value(s) have been changed from `(ServicesStartPollerResponse, error)` to `(ServicesClientStartPollerResponse, error)` -- Function `*BindingsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, BindingResource, *BindingsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, BindingResource, *BindingsClientBeginCreateOrUpdateOptions)` -- Function `*BindingsClient.BeginCreateOrUpdate` return value(s) have been changed from `(BindingsCreateOrUpdatePollerResponse, error)` to `(BindingsClientCreateOrUpdatePollerResponse, error)` -- Function `*DeploymentsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, string, *DeploymentsBeginDeleteOptions)` to `(context.Context, string, string, string, string, *DeploymentsClientBeginDeleteOptions)` -- Function `*DeploymentsClient.BeginDelete` return value(s) have been changed from `(DeploymentsDeletePollerResponse, error)` to `(DeploymentsClientDeletePollerResponse, error)` -- Function `*AppsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *AppsBeginDeleteOptions)` to `(context.Context, string, string, string, *AppsClientBeginDeleteOptions)` -- Function `*AppsClient.BeginDelete` return value(s) have been changed from `(AppsDeletePollerResponse, error)` to `(AppsClientDeletePollerResponse, error)` -- Function `*ConfigServersClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ConfigServersGetOptions)` to `(context.Context, string, string, *ConfigServersClientGetOptions)` -- Function `*ConfigServersClient.Get` return value(s) have been changed from `(ConfigServersGetResponse, error)` to `(ConfigServersClientGetResponse, error)` -- Function `*MonitoringSettingsClient.BeginUpdatePut` parameter(s) have been changed from `(context.Context, string, string, MonitoringSettingResource, *MonitoringSettingsBeginUpdatePutOptions)` to `(context.Context, string, string, MonitoringSettingResource, *MonitoringSettingsClientBeginUpdatePutOptions)` -- Function `*MonitoringSettingsClient.BeginUpdatePut` return value(s) have been changed from `(MonitoringSettingsUpdatePutPollerResponse, error)` to `(MonitoringSettingsClientUpdatePutPollerResponse, error)` -- Function `*ServicesClient.BeginStop` parameter(s) have been changed from `(context.Context, string, string, *ServicesBeginStopOptions)` to `(context.Context, string, string, *ServicesClientBeginStopOptions)` -- Function `*ServicesClient.BeginStop` return value(s) have been changed from `(ServicesStopPollerResponse, error)` to `(ServicesClientStopPollerResponse, error)` -- Function `*DeploymentsClient.BeginGenerateThreadDump` parameter(s) have been changed from `(context.Context, string, string, string, string, DiagnosticParameters, *DeploymentsBeginGenerateThreadDumpOptions)` to `(context.Context, string, string, string, string, DiagnosticParameters, *DeploymentsClientBeginGenerateThreadDumpOptions)` -- Function `*DeploymentsClient.BeginGenerateThreadDump` return value(s) have been changed from `(DeploymentsGenerateThreadDumpPollerResponse, error)` to `(DeploymentsClientGenerateThreadDumpPollerResponse, error)` -- Function `*BindingsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, BindingResource, *BindingsBeginUpdateOptions)` to `(context.Context, string, string, string, string, BindingResource, *BindingsClientBeginUpdateOptions)` -- Function `*BindingsClient.BeginUpdate` return value(s) have been changed from `(BindingsUpdatePollerResponse, error)` to `(BindingsClientUpdatePollerResponse, error)` -- Function `*ServicesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, ServiceResource, *ServicesBeginCreateOrUpdateOptions)` to `(context.Context, string, string, ServiceResource, *ServicesClientBeginCreateOrUpdateOptions)` -- Function `*ServicesClient.BeginCreateOrUpdate` return value(s) have been changed from `(ServicesCreateOrUpdatePollerResponse, error)` to `(ServicesClientCreateOrUpdatePollerResponse, error)` -- Function `*BindingsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *BindingsGetOptions)` to `(context.Context, string, string, string, string, *BindingsClientGetOptions)` -- Function `*BindingsClient.Get` return value(s) have been changed from `(BindingsGetResponse, error)` to `(BindingsClientGetResponse, error)` -- Function `*DeploymentsClient.GetLogFileURL` parameter(s) have been changed from `(context.Context, string, string, string, string, *DeploymentsGetLogFileURLOptions)` to `(context.Context, string, string, string, string, *DeploymentsClientGetLogFileURLOptions)` -- Function `*DeploymentsClient.GetLogFileURL` return value(s) have been changed from `(DeploymentsGetLogFileURLResponse, error)` to `(DeploymentsClientGetLogFileURLResponse, error)` -- Function `*DeploymentsClient.BeginStart` parameter(s) have been changed from `(context.Context, string, string, string, string, *DeploymentsBeginStartOptions)` to `(context.Context, string, string, string, string, *DeploymentsClientBeginStartOptions)` -- Function `*DeploymentsClient.BeginStart` return value(s) have been changed from `(DeploymentsStartPollerResponse, error)` to `(DeploymentsClientStartPollerResponse, error)` -- Function `*DeploymentsClient.BeginRestart` parameter(s) have been changed from `(context.Context, string, string, string, string, *DeploymentsBeginRestartOptions)` to `(context.Context, string, string, string, string, *DeploymentsClientBeginRestartOptions)` -- Function `*DeploymentsClient.BeginRestart` return value(s) have been changed from `(DeploymentsRestartPollerResponse, error)` to `(DeploymentsClientRestartPollerResponse, error)` -- Function `*ConfigServersClient.BeginUpdatePatch` parameter(s) have been changed from `(context.Context, string, string, ConfigServerResource, *ConfigServersBeginUpdatePatchOptions)` to `(context.Context, string, string, ConfigServerResource, *ConfigServersClientBeginUpdatePatchOptions)` -- Function `*ConfigServersClient.BeginUpdatePatch` return value(s) have been changed from `(ConfigServersUpdatePatchPollerResponse, error)` to `(ConfigServersClientUpdatePatchPollerResponse, error)` -- Function `*BindingsClient.List` parameter(s) have been changed from `(string, string, string, *BindingsListOptions)` to `(string, string, string, *BindingsClientListOptions)` -- Function `*BindingsClient.List` return value(s) have been changed from `(*BindingsListPager)` to `(*BindingsClientListPager)` -- Function `*DeploymentsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, DeploymentResource, *DeploymentsBeginUpdateOptions)` to `(context.Context, string, string, string, string, DeploymentResource, *DeploymentsClientBeginUpdateOptions)` -- Function `*DeploymentsClient.BeginUpdate` return value(s) have been changed from `(DeploymentsUpdatePollerResponse, error)` to `(DeploymentsClientUpdatePollerResponse, error)` -- Function `*StoragesClient.List` parameter(s) have been changed from `(string, string, *StoragesListOptions)` to `(string, string, *StoragesClientListOptions)` -- Function `*StoragesClient.List` return value(s) have been changed from `(*StoragesListPager)` to `(*StoragesClientListPager)` -- Function `*CertificatesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *CertificatesGetOptions)` to `(context.Context, string, string, string, *CertificatesClientGetOptions)` -- Function `*CertificatesClient.Get` return value(s) have been changed from `(CertificatesGetResponse, error)` to `(CertificatesClientGetResponse, error)` -- Function `*CustomDomainsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, CustomDomainResource, *CustomDomainsBeginUpdateOptions)` to `(context.Context, string, string, string, string, CustomDomainResource, *CustomDomainsClientBeginUpdateOptions)` -- Function `*CustomDomainsClient.BeginUpdate` return value(s) have been changed from `(CustomDomainsUpdatePollerResponse, error)` to `(CustomDomainsClientUpdatePollerResponse, error)` -- Function `*CertificatesClient.List` parameter(s) have been changed from `(string, string, *CertificatesListOptions)` to `(string, string, *CertificatesClientListOptions)` -- Function `*CertificatesClient.List` return value(s) have been changed from `(*CertificatesListPager)` to `(*CertificatesClientListPager)` -- Function `*ServicesClient.DisableTestEndpoint` parameter(s) have been changed from `(context.Context, string, string, *ServicesDisableTestEndpointOptions)` to `(context.Context, string, string, *ServicesClientDisableTestEndpointOptions)` -- Function `*ServicesClient.DisableTestEndpoint` return value(s) have been changed from `(ServicesDisableTestEndpointResponse, error)` to `(ServicesClientDisableTestEndpointResponse, error)` -- Function `*RuntimeVersionsClient.ListRuntimeVersions` parameter(s) have been changed from `(context.Context, *RuntimeVersionsListRuntimeVersionsOptions)` to `(context.Context, *RuntimeVersionsClientListRuntimeVersionsOptions)` -- Function `*RuntimeVersionsClient.ListRuntimeVersions` return value(s) have been changed from `(RuntimeVersionsListRuntimeVersionsResponse, error)` to `(RuntimeVersionsClientListRuntimeVersionsResponse, error)` -- Function `*AppsClient.ValidateDomain` parameter(s) have been changed from `(context.Context, string, string, string, CustomDomainValidatePayload, *AppsValidateDomainOptions)` to `(context.Context, string, string, string, CustomDomainValidatePayload, *AppsClientValidateDomainOptions)` -- Function `*AppsClient.ValidateDomain` return value(s) have been changed from `(AppsValidateDomainResponse, error)` to `(AppsClientValidateDomainResponse, error)` -- Function `*CustomDomainsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, CustomDomainResource, *CustomDomainsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, CustomDomainResource, *CustomDomainsClientBeginCreateOrUpdateOptions)` -- Function `*CustomDomainsClient.BeginCreateOrUpdate` return value(s) have been changed from `(CustomDomainsCreateOrUpdatePollerResponse, error)` to `(CustomDomainsClientCreateOrUpdatePollerResponse, error)` -- Function `*ServicesClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ServicesGetOptions)` to `(context.Context, string, string, *ServicesClientGetOptions)` -- Function `*ServicesClient.Get` return value(s) have been changed from `(ServicesGetResponse, error)` to `(ServicesClientGetResponse, error)` -- Function `*SKUsClient.List` parameter(s) have been changed from `(*SKUsListOptions)` to `(*SKUsClientListOptions)` -- Function `*SKUsClient.List` return value(s) have been changed from `(*SKUsListPager)` to `(*SKUsClientListPager)` -- Function `*ServicesClient.EnableTestEndpoint` parameter(s) have been changed from `(context.Context, string, string, *ServicesEnableTestEndpointOptions)` to `(context.Context, string, string, *ServicesClientEnableTestEndpointOptions)` -- Function `*ServicesClient.EnableTestEndpoint` return value(s) have been changed from `(ServicesEnableTestEndpointResponse, error)` to `(ServicesClientEnableTestEndpointResponse, error)` -- Function `*ConfigServersClient.BeginValidate` parameter(s) have been changed from `(context.Context, string, string, ConfigServerSettings, *ConfigServersBeginValidateOptions)` to `(context.Context, string, string, ConfigServerSettings, *ConfigServersClientBeginValidateOptions)` -- Function `*ConfigServersClient.BeginValidate` return value(s) have been changed from `(ConfigServersValidatePollerResponse, error)` to `(ConfigServersClientValidatePollerResponse, error)` -- Function `*AppsClient.GetResourceUploadURL` parameter(s) have been changed from `(context.Context, string, string, string, *AppsGetResourceUploadURLOptions)` to `(context.Context, string, string, string, *AppsClientGetResourceUploadURLOptions)` -- Function `*AppsClient.GetResourceUploadURL` return value(s) have been changed from `(AppsGetResourceUploadURLResponse, error)` to `(AppsClientGetResourceUploadURLResponse, error)` -- Function `*ServicesClient.ListBySubscription` parameter(s) have been changed from `(*ServicesListBySubscriptionOptions)` to `(*ServicesClientListBySubscriptionOptions)` -- Function `*ServicesClient.ListBySubscription` return value(s) have been changed from `(*ServicesListBySubscriptionPager)` to `(*ServicesClientListBySubscriptionPager)` -- Function `*StoragesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *StoragesGetOptions)` to `(context.Context, string, string, string, *StoragesClientGetOptions)` -- Function `*StoragesClient.Get` return value(s) have been changed from `(StoragesGetResponse, error)` to `(StoragesClientGetResponse, error)` -- Function `*DeploymentsClient.ListForCluster` parameter(s) have been changed from `(string, string, *DeploymentsListForClusterOptions)` to `(string, string, *DeploymentsClientListForClusterOptions)` -- Function `*DeploymentsClient.ListForCluster` return value(s) have been changed from `(*DeploymentsListForClusterPager)` to `(*DeploymentsClientListForClusterPager)` -- Function `*DeploymentsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, DeploymentResource, *DeploymentsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, DeploymentResource, *DeploymentsClientBeginCreateOrUpdateOptions)` -- Function `*DeploymentsClient.BeginCreateOrUpdate` return value(s) have been changed from `(DeploymentsCreateOrUpdatePollerResponse, error)` to `(DeploymentsClientCreateOrUpdatePollerResponse, error)` -- Function `*DeploymentsClient.List` parameter(s) have been changed from `(string, string, string, *DeploymentsListOptions)` to `(string, string, string, *DeploymentsClientListOptions)` -- Function `*DeploymentsClient.List` return value(s) have been changed from `(*DeploymentsListPager)` to `(*DeploymentsClientListPager)` -- Function `*AppsClient.List` parameter(s) have been changed from `(string, string, *AppsListOptions)` to `(string, string, *AppsClientListOptions)` -- Function `*AppsClient.List` return value(s) have been changed from `(*AppsListPager)` to `(*AppsClientListPager)` -- Function `*ServicesClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, ServiceResource, *ServicesBeginUpdateOptions)` to `(context.Context, string, string, ServiceResource, *ServicesClientBeginUpdateOptions)` -- Function `*ServicesClient.BeginUpdate` return value(s) have been changed from `(ServicesUpdatePollerResponse, error)` to `(ServicesClientUpdatePollerResponse, error)` -- Function `*ServicesClient.CheckNameAvailability` parameter(s) have been changed from `(context.Context, string, NameAvailabilityParameters, *ServicesCheckNameAvailabilityOptions)` to `(context.Context, string, NameAvailabilityParameters, *ServicesClientCheckNameAvailabilityOptions)` -- Function `*ServicesClient.CheckNameAvailability` return value(s) have been changed from `(ServicesCheckNameAvailabilityResponse, error)` to `(ServicesClientCheckNameAvailabilityResponse, error)` -- Function `*DeploymentsClient.BeginStop` parameter(s) have been changed from `(context.Context, string, string, string, string, *DeploymentsBeginStopOptions)` to `(context.Context, string, string, string, string, *DeploymentsClientBeginStopOptions)` -- Function `*DeploymentsClient.BeginStop` return value(s) have been changed from `(DeploymentsStopPollerResponse, error)` to `(DeploymentsClientStopPollerResponse, error)` -- Function `*DeploymentsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *DeploymentsGetOptions)` to `(context.Context, string, string, string, string, *DeploymentsClientGetOptions)` -- Function `*DeploymentsClient.Get` return value(s) have been changed from `(DeploymentsGetResponse, error)` to `(DeploymentsClientGetResponse, error)` -- Function `*CertificatesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, CertificateResource, *CertificatesBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, CertificateResource, *CertificatesClientBeginCreateOrUpdateOptions)` -- Function `*CertificatesClient.BeginCreateOrUpdate` return value(s) have been changed from `(CertificatesCreateOrUpdatePollerResponse, error)` to `(CertificatesClientCreateOrUpdatePollerResponse, error)` -- Function `*ServicesClient.ListTestKeys` parameter(s) have been changed from `(context.Context, string, string, *ServicesListTestKeysOptions)` to `(context.Context, string, string, *ServicesClientListTestKeysOptions)` -- Function `*ServicesClient.ListTestKeys` return value(s) have been changed from `(ServicesListTestKeysResponse, error)` to `(ServicesClientListTestKeysResponse, error)` -- Function `*CustomDomainsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *CustomDomainsGetOptions)` to `(context.Context, string, string, string, string, *CustomDomainsClientGetOptions)` -- Function `*CustomDomainsClient.Get` return value(s) have been changed from `(CustomDomainsGetResponse, error)` to `(CustomDomainsClientGetResponse, error)` -- Function `*StoragesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *StoragesBeginDeleteOptions)` to `(context.Context, string, string, string, *StoragesClientBeginDeleteOptions)` -- Function `*StoragesClient.BeginDelete` return value(s) have been changed from `(StoragesDeletePollerResponse, error)` to `(StoragesClientDeletePollerResponse, error)` -- Function `*BindingsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, string, *BindingsBeginDeleteOptions)` to `(context.Context, string, string, string, string, *BindingsClientBeginDeleteOptions)` -- Function `*BindingsClient.BeginDelete` return value(s) have been changed from `(BindingsDeletePollerResponse, error)` to `(BindingsClientDeletePollerResponse, error)` -- Function `*OperationsClient.List` parameter(s) have been changed from `(*OperationsListOptions)` to `(*OperationsClientListOptions)` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsListPager)` to `(*OperationsClientListPager)` -- Function `*CustomDomainsClient.List` parameter(s) have been changed from `(string, string, string, *CustomDomainsListOptions)` to `(string, string, string, *CustomDomainsClientListOptions)` -- Function `*CustomDomainsClient.List` return value(s) have been changed from `(*CustomDomainsListPager)` to `(*CustomDomainsClientListPager)` -- Function `*AppsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, AppResource, *AppsBeginUpdateOptions)` to `(context.Context, string, string, string, AppResource, *AppsClientBeginUpdateOptions)` -- Function `*AppsClient.BeginUpdate` return value(s) have been changed from `(AppsUpdatePollerResponse, error)` to `(AppsClientUpdatePollerResponse, error)` -- Type of `DeploymentSettings.ContainerProbeSettings` has been changed from `*DeploymentSettingsContainerProbeSettings` to `*ContainerProbeSettings` -- Type of `SystemData.LastModifiedByType` has been changed from `*CreatedByType` to `*LastModifiedByType` -- Type of `UserSourceInfo.Type` has been changed from `*UserSourceType` to `*string` -- Type of `DeploymentResourceProperties.Source` has been changed from `*UserSourceInfo` to `UserSourceInfoClassification` -- Const `UserSourceTypeSource` has been removed -- Const `UserSourceTypeNetCoreZip` has been removed -- Const `DeploymentResourceStatusAllocating` has been removed -- Const `RuntimeVersionJava8` has been removed -- Const `DeploymentResourceStatusFailed` has been removed -- Const `RuntimeVersionNetCore31` has been removed -- Const `DeploymentResourceStatusUnknown` has been removed -- Const `UserSourceTypeContainer` has been removed -- Const `RuntimeVersionJava11` has been removed -- Const `DeploymentResourceStatusCompiling` has been removed -- Const `DeploymentResourceStatusUpgrading` has been removed -- Const `UserSourceTypeJar` has been removed -- Function `*DeploymentsDeletePollerResponse.Resume` has been removed -- Function `*CustomDomainsDeletePoller.Done` has been removed -- Function `*CustomDomainsListPager.NextPage` has been removed -- Function `*ServicesDeletePoller.Poll` has been removed -- Function `*ConfigServersUpdatePatchPollerResponse.Resume` has been removed -- Function `PossibleRuntimeVersionValues` has been removed -- Function `*AppsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `CertificatesDeletePollerResponse.PollUntilDone` has been removed -- Function `*AppsDeletePoller.ResumeToken` has been removed -- Function `*DeploymentsGenerateHeapDumpPoller.Done` has been removed -- Function `*AppsListPager.NextPage` has been removed -- Function `*OperationsListPager.PageResponse` has been removed -- Function `DeploymentsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*CustomDomainsUpdatePoller.ResumeToken` has been removed -- Function `*AppsUpdatePoller.FinalResponse` has been removed -- Function `ConfigServersValidatePollerResponse.PollUntilDone` has been removed -- Function `*ServicesListPager.PageResponse` has been removed -- Function `*BindingsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*AppsDeletePoller.FinalResponse` has been removed -- Function `*DeploymentsUpdatePoller.Poll` has been removed -- Function `BindingsUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ConfigServersUpdatePutPollerResponse.Resume` has been removed -- Function `*ConfigServersValidatePoller.Done` has been removed -- Function `*ServicesStartPollerResponse.Resume` has been removed -- Function `*DeploymentsDeletePoller.Done` has been removed -- Function `*MonitoringSettingsUpdatePatchPoller.ResumeToken` has been removed -- Function `*ConfigServersValidatePoller.ResumeToken` has been removed -- Function `*SKUsListPager.PageResponse` has been removed -- Function `*ServicesUpdatePoller.Poll` has been removed -- Function `*StoragesDeletePoller.FinalResponse` has been removed -- Function `*CertificatesListPager.Err` has been removed -- Function `*DeploymentsStartJFRPoller.FinalResponse` has been removed -- Function `*BindingsListPager.PageResponse` has been removed -- Function `*BindingsDeletePoller.ResumeToken` has been removed -- Function `*ConfigServersUpdatePatchPoller.ResumeToken` has been removed -- Function `*ServicesListPager.Err` has been removed -- Function `*StoragesListPager.NextPage` has been removed -- Function `*ServicesCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*CertificatesDeletePoller.Poll` has been removed -- Function `*AppsListPager.Err` has been removed -- Function `*AppsListPager.PageResponse` has been removed -- Function `*ServicesUpdatePoller.FinalResponse` has been removed -- Function `*AppsDeletePoller.Poll` has been removed -- Function `*DeploymentsGenerateHeapDumpPoller.Poll` has been removed -- Function `*OperationsListPager.NextPage` has been removed -- Function `BindingsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*CustomDomainsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*DeploymentsRestartPoller.FinalResponse` has been removed -- Function `*CustomDomainsDeletePoller.FinalResponse` has been removed -- Function `Resource.MarshalJSON` has been removed -- Function `*ConfigServerResource.UnmarshalJSON` has been removed -- Function `*BindingsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*BindingsUpdatePoller.Poll` has been removed -- Function `*StoragesCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ConfigServersUpdatePutPoller.FinalResponse` has been removed -- Function `*AppsDeletePollerResponse.Resume` has been removed -- Function `*ServicesListBySubscriptionPager.Err` has been removed -- Function `*DeploymentsStopPoller.Poll` has been removed -- Function `DeploymentsStartJFRPollerResponse.PollUntilDone` has been removed -- Function `ConfigServersUpdatePatchPollerResponse.PollUntilDone` has been removed -- Function `*CertificatesCreateOrUpdatePoller.Poll` has been removed -- Function `*StoragesDeletePoller.ResumeToken` has been removed -- Function `*ConfigServersValidatePollerResponse.Resume` has been removed -- Function `CustomDomainsDeletePollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsDeletePoller.Poll` has been removed -- Function `*BindingsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*BindingsUpdatePoller.Done` has been removed -- Function `*CustomDomainsListPager.PageResponse` has been removed -- Function `*CertificatesListPager.PageResponse` has been removed -- Function `ConfigServersUpdatePutPollerResponse.PollUntilDone` has been removed -- Function `DeploymentsRestartPollerResponse.PollUntilDone` has been removed -- Function `*ServicesDeletePoller.FinalResponse` has been removed -- Function `*CustomDomainsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*CustomDomainsDeletePoller.Poll` has been removed -- Function `StoragesCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ConfigServersUpdatePutPoller.ResumeToken` has been removed -- Function `AppsDeletePollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsStopPoller.Done` has been removed -- Function `*DeploymentsGenerateHeapDumpPoller.ResumeToken` has been removed -- Function `*ServicesUpdatePollerResponse.Resume` has been removed -- Function `DeploymentsUpdatePollerResponse.PollUntilDone` has been removed -- Function `*MonitoringSettingsUpdatePatchPollerResponse.Resume` has been removed -- Function `*ServicesCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*DeploymentsGenerateThreadDumpPollerResponse.Resume` has been removed -- Function `DeploymentsGenerateHeapDumpPollerResponse.PollUntilDone` has been removed -- Function `*ServicesStopPoller.FinalResponse` has been removed -- Function `ServicesStartPollerResponse.PollUntilDone` has been removed -- Function `*BindingsUpdatePoller.ResumeToken` has been removed -- Function `*DeploymentsStopPoller.FinalResponse` has been removed -- Function `AppsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*CertificatesCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*DeploymentsStartPoller.Done` has been removed -- Function `*SKUsListPager.Err` has been removed -- Function `MonitoringSettingsUpdatePatchPollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsStopPoller.ResumeToken` has been removed -- Function `*ServicesStopPoller.ResumeToken` has been removed -- Function `MonitoringSettingsUpdatePutPollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsStartPoller.Poll` has been removed -- Function `ServicesDeletePollerResponse.PollUntilDone` has been removed -- Function `*ConfigServersUpdatePutPoller.Done` has been removed -- Function `*MonitoringSettingsUpdatePatchPoller.Done` has been removed -- Function `*StoragesListPager.PageResponse` has been removed -- Function `*AppResourceProperties.UnmarshalJSON` has been removed -- Function `*DeploymentsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ServicesStopPollerResponse.Resume` has been removed -- Function `*ServicesStartPoller.Poll` has been removed -- Function `*StoragesDeletePollerResponse.Resume` has been removed -- Function `*ServicesUpdatePoller.Done` has been removed -- Function `*ServicesListBySubscriptionPager.PageResponse` has been removed -- Function `*DeploymentsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ServicesListBySubscriptionPager.NextPage` has been removed -- Function `*DeploymentsStartPoller.ResumeToken` has been removed -- Function `*ServicesStartPoller.ResumeToken` has been removed -- Function `*AppsDeletePoller.Done` has been removed -- Function `*DeploymentsCreateOrUpdatePoller.Done` has been removed -- Function `*Resource.UnmarshalJSON` has been removed -- Function `*DeploymentsUpdatePollerResponse.Resume` has been removed -- Function `ServicesUpdatePollerResponse.PollUntilDone` has been removed -- Function `DeploymentsStartPollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsRestartPoller.Poll` has been removed -- Function `*DeploymentsUpdatePoller.FinalResponse` has been removed -- Function `*DeploymentResource.UnmarshalJSON` has been removed -- Function `*BindingsDeletePollerResponse.Resume` has been removed -- Function `*DeploymentsDeletePoller.FinalResponse` has been removed -- Function `*DeploymentsStartJFRPoller.Done` has been removed -- Function `*MonitoringSettingsUpdatePutPoller.Done` has been removed -- Function `*ServicesStopPoller.Poll` has been removed -- Function `*MonitoringSettingsUpdatePatchPoller.FinalResponse` has been removed -- Function `*AppsUpdatePoller.Done` has been removed -- Function `*ConfigServersUpdatePatchPoller.FinalResponse` has been removed -- Function `*DeploymentsListForClusterPager.Err` has been removed -- Function `*MonitoringSettingsUpdatePutPoller.FinalResponse` has been removed -- Function `*BindingsCreateOrUpdatePoller.Poll` has been removed -- Function `*ConfigServersValidatePoller.Poll` has been removed -- Function `*CustomPersistentDiskProperties.UnmarshalJSON` has been removed -- Function `ServicesCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*AppsUpdatePoller.Poll` has been removed -- Function `*CertificatesDeletePoller.FinalResponse` has been removed -- Function `*DeploymentsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `BindingsDeletePollerResponse.PollUntilDone` has been removed -- Function `*ConfigServersValidatePoller.FinalResponse` has been removed -- Function `DeploymentsGenerateThreadDumpPollerResponse.PollUntilDone` has been removed -- Function `*CustomDomainsUpdatePoller.Poll` has been removed -- Function `*CertificatesCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*CertificatesDeletePoller.Done` has been removed -- Function `*CertificatesDeletePollerResponse.Resume` has been removed -- Function `*CustomDomainsCreateOrUpdatePoller.Poll` has been removed -- Function `*DeploymentsUpdatePoller.ResumeToken` has been removed -- Function `*CertificatesDeletePoller.ResumeToken` has been removed -- Function `*ConfigServersUpdatePutPoller.Poll` has been removed -- Function `DeploymentsDeletePollerResponse.PollUntilDone` has been removed -- Function `*StoragesCreateOrUpdatePoller.Poll` has been removed -- Function `*CustomDomainsUpdatePoller.FinalResponse` has been removed -- Function `*AppsCreateOrUpdatePoller.Done` has been removed -- Function `*CertificatesCreateOrUpdatePoller.Done` has been removed -- Function `*ServicesStartPoller.FinalResponse` has been removed -- Function `*DeploymentsListForClusterPager.PageResponse` has been removed -- Function `*CertificatesCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*CustomDomainsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*CustomDomainResource.UnmarshalJSON` has been removed -- Function `RuntimeVersion.ToPtr` has been removed -- Function `*AppsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*DeploymentsGenerateThreadDumpPoller.FinalResponse` has been removed -- Function `*ServicesDeletePollerResponse.Resume` has been removed -- Function `*MonitoringSettingResource.UnmarshalJSON` has been removed -- Function `*CertificateProperties.UnmarshalJSON` has been removed -- Function `*BindingsListPager.Err` has been removed -- Function `*BindingsCreateOrUpdatePoller.Done` has been removed -- Function `*DeploymentsStartJFRPoller.Poll` has been removed -- Function `*MonitoringSettingsUpdatePutPollerResponse.Resume` has been removed -- Function `*CustomDomainsCreateOrUpdatePoller.Done` has been removed -- Function `*MonitoringSettingsUpdatePutPoller.Poll` has been removed -- Function `*CustomDomainsDeletePollerResponse.Resume` has been removed -- Function `*ServicesUpdatePoller.ResumeToken` has been removed -- Function `*MonitoringSettingsUpdatePutPoller.ResumeToken` has been removed -- Function `*DeploymentsCreateOrUpdatePoller.Poll` has been removed -- Function `*AppsUpdatePollerResponse.Resume` has been removed -- Function `*DeploymentsRestartPoller.Done` has been removed -- Function `*CertificatesListPager.NextPage` has been removed -- Function `*DeploymentsGenerateHeapDumpPoller.FinalResponse` has been removed -- Function `*StoragesCreateOrUpdatePoller.Done` has been removed -- Function `*DeploymentsStartJFRPoller.ResumeToken` has been removed -- Function `*BindingsDeletePoller.FinalResponse` has been removed -- Function `*BindingsUpdatePollerResponse.Resume` has been removed -- Function `*DeploymentsUpdatePoller.Done` has been removed -- Function `AppsUpdatePollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsGenerateThreadDumpPoller.Poll` has been removed -- Function `*DeploymentsListPager.PageResponse` has been removed -- Function `*AppsCreateOrUpdatePoller.Poll` has been removed -- Function `*AppsUpdatePoller.ResumeToken` has been removed -- Function `*MonitoringSettingsUpdatePatchPoller.Poll` has been removed -- Function `*BindingsDeletePoller.Done` has been removed -- Function `*DeploymentsRestartPoller.ResumeToken` has been removed -- Function `*StoragesCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*BindingsDeletePoller.Poll` has been removed -- Function `*CustomDomainsUpdatePoller.Done` has been removed -- Function `CertificatesCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*StoragesCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ServicesCreateOrUpdatePoller.Poll` has been removed -- Function `*AppResource.UnmarshalJSON` has been removed -- Function `*ServicesStopPoller.Done` has been removed -- Function `*DeploymentsGenerateHeapDumpPollerResponse.Resume` has been removed -- Function `*ConfigServersUpdatePatchPoller.Done` has been removed -- Function `*DeploymentsListPager.NextPage` has been removed -- Function `*CustomDomainsListPager.Err` has been removed -- Function `*ServiceResource.UnmarshalJSON` has been removed -- Function `*ServicesListPager.NextPage` has been removed -- Function `*StoragesDeletePoller.Poll` has been removed -- Function `*DeploymentsGenerateThreadDumpPoller.Done` has been removed -- Function `CloudError.Error` has been removed -- Function `*CustomDomainsDeletePoller.ResumeToken` has been removed -- Function `*BindingResource.UnmarshalJSON` has been removed -- Function `*OperationsListPager.Err` has been removed -- Function `*DeploymentsListForClusterPager.NextPage` has been removed -- Function `*CustomDomainsUpdatePollerResponse.Resume` has been removed -- Function `*StoragesDeletePoller.Done` has been removed -- Function `CustomDomainsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ConfigServersUpdatePatchPoller.Poll` has been removed -- Function `*ServicesDeletePoller.ResumeToken` has been removed -- Function `*DeploymentsRestartPollerResponse.Resume` has been removed -- Function `PossibleUserSourceTypeValues` has been removed -- Function `*DeploymentsStartPollerResponse.Resume` has been removed -- Function `*SKUsListPager.NextPage` has been removed -- Function `*StorageProperties.UnmarshalJSON` has been removed -- Function `*TrackedResource.UnmarshalJSON` has been removed -- Function `*DeploymentsDeletePoller.ResumeToken` has been removed -- Function `*ServicesStartPoller.Done` has been removed -- Function `*BindingsListPager.NextPage` has been removed -- Function `*DeploymentsListPager.Err` has been removed -- Function `UserSourceType.ToPtr` has been removed -- Function `*ServicesCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*DeploymentsStopPollerResponse.Resume` has been removed -- Function `DeploymentsStopPollerResponse.PollUntilDone` has been removed -- Function `CustomDomainsUpdatePollerResponse.PollUntilDone` has been removed -- Function `*DeploymentsStartJFRPollerResponse.Resume` has been removed -- Function `*DeploymentsGenerateThreadDumpPoller.ResumeToken` has been removed -- Function `*DeploymentsStartPoller.FinalResponse` has been removed -- Function `*StoragesListPager.Err` has been removed -- Function `*BindingsUpdatePoller.FinalResponse` has been removed -- Function `*ServicesCreateOrUpdatePoller.Done` has been removed -- Function `*ServicesDeletePoller.Done` has been removed -- Function `*AppsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `ServicesStopPollerResponse.PollUntilDone` has been removed -- Function `StoragesDeletePollerResponse.PollUntilDone` has been removed -- Struct `AppsBeginCreateOrUpdateOptions` has been removed -- Struct `AppsBeginDeleteOptions` has been removed -- Struct `AppsBeginUpdateOptions` has been removed -- Struct `AppsCreateOrUpdatePoller` has been removed -- Struct `AppsCreateOrUpdatePollerResponse` has been removed -- Struct `AppsCreateOrUpdateResponse` has been removed -- Struct `AppsCreateOrUpdateResult` has been removed -- Struct `AppsDeletePoller` has been removed -- Struct `AppsDeletePollerResponse` has been removed -- Struct `AppsDeleteResponse` has been removed -- Struct `AppsGetOptions` has been removed -- Struct `AppsGetResourceUploadURLOptions` has been removed -- Struct `AppsGetResourceUploadURLResponse` has been removed -- Struct `AppsGetResourceUploadURLResult` has been removed -- Struct `AppsGetResponse` has been removed -- Struct `AppsGetResult` has been removed -- Struct `AppsListOptions` has been removed -- Struct `AppsListPager` has been removed -- Struct `AppsListResponse` has been removed -- Struct `AppsListResult` has been removed -- Struct `AppsUpdatePoller` has been removed -- Struct `AppsUpdatePollerResponse` has been removed -- Struct `AppsUpdateResponse` has been removed -- Struct `AppsUpdateResult` has been removed -- Struct `AppsValidateDomainOptions` has been removed -- Struct `AppsValidateDomainResponse` has been removed -- Struct `AppsValidateDomainResult` has been removed -- Struct `BindingsBeginCreateOrUpdateOptions` has been removed -- Struct `BindingsBeginDeleteOptions` has been removed -- Struct `BindingsBeginUpdateOptions` has been removed -- Struct `BindingsCreateOrUpdatePoller` has been removed -- Struct `BindingsCreateOrUpdatePollerResponse` has been removed -- Struct `BindingsCreateOrUpdateResponse` has been removed -- Struct `BindingsCreateOrUpdateResult` has been removed -- Struct `BindingsDeletePoller` has been removed -- Struct `BindingsDeletePollerResponse` has been removed -- Struct `BindingsDeleteResponse` has been removed -- Struct `BindingsGetOptions` has been removed -- Struct `BindingsGetResponse` has been removed -- Struct `BindingsGetResult` has been removed -- Struct `BindingsListOptions` has been removed -- Struct `BindingsListPager` has been removed -- Struct `BindingsListResponse` has been removed -- Struct `BindingsListResult` has been removed -- Struct `BindingsUpdatePoller` has been removed -- Struct `BindingsUpdatePollerResponse` has been removed -- Struct `BindingsUpdateResponse` has been removed -- Struct `BindingsUpdateResult` has been removed -- Struct `CertificatesBeginCreateOrUpdateOptions` has been removed -- Struct `CertificatesBeginDeleteOptions` has been removed -- Struct `CertificatesCreateOrUpdatePoller` has been removed -- Struct `CertificatesCreateOrUpdatePollerResponse` has been removed -- Struct `CertificatesCreateOrUpdateResponse` has been removed -- Struct `CertificatesCreateOrUpdateResult` has been removed -- Struct `CertificatesDeletePoller` has been removed -- Struct `CertificatesDeletePollerResponse` has been removed -- Struct `CertificatesDeleteResponse` has been removed -- Struct `CertificatesGetOptions` has been removed -- Struct `CertificatesGetResponse` has been removed -- Struct `CertificatesGetResult` has been removed -- Struct `CertificatesListOptions` has been removed -- Struct `CertificatesListPager` has been removed -- Struct `CertificatesListResponse` has been removed -- Struct `CertificatesListResult` has been removed -- Struct `ConfigServersBeginUpdatePatchOptions` has been removed -- Struct `ConfigServersBeginUpdatePutOptions` has been removed -- Struct `ConfigServersBeginValidateOptions` has been removed -- Struct `ConfigServersGetOptions` has been removed -- Struct `ConfigServersGetResponse` has been removed -- Struct `ConfigServersGetResult` has been removed -- Struct `ConfigServersUpdatePatchPoller` has been removed -- Struct `ConfigServersUpdatePatchPollerResponse` has been removed -- Struct `ConfigServersUpdatePatchResponse` has been removed -- Struct `ConfigServersUpdatePatchResult` has been removed -- Struct `ConfigServersUpdatePutPoller` has been removed -- Struct `ConfigServersUpdatePutPollerResponse` has been removed -- Struct `ConfigServersUpdatePutResponse` has been removed -- Struct `ConfigServersUpdatePutResult` has been removed -- Struct `ConfigServersValidatePoller` has been removed -- Struct `ConfigServersValidatePollerResponse` has been removed -- Struct `ConfigServersValidateResponse` has been removed -- Struct `ConfigServersValidateResult` has been removed -- Struct `CustomDomainsBeginCreateOrUpdateOptions` has been removed -- Struct `CustomDomainsBeginDeleteOptions` has been removed -- Struct `CustomDomainsBeginUpdateOptions` has been removed -- Struct `CustomDomainsCreateOrUpdatePoller` has been removed -- Struct `CustomDomainsCreateOrUpdatePollerResponse` has been removed -- Struct `CustomDomainsCreateOrUpdateResponse` has been removed -- Struct `CustomDomainsCreateOrUpdateResult` has been removed -- Struct `CustomDomainsDeletePoller` has been removed -- Struct `CustomDomainsDeletePollerResponse` has been removed -- Struct `CustomDomainsDeleteResponse` has been removed -- Struct `CustomDomainsGetOptions` has been removed -- Struct `CustomDomainsGetResponse` has been removed -- Struct `CustomDomainsGetResult` has been removed -- Struct `CustomDomainsListOptions` has been removed -- Struct `CustomDomainsListPager` has been removed -- Struct `CustomDomainsListResponse` has been removed -- Struct `CustomDomainsListResult` has been removed -- Struct `CustomDomainsUpdatePoller` has been removed -- Struct `CustomDomainsUpdatePollerResponse` has been removed -- Struct `CustomDomainsUpdateResponse` has been removed -- Struct `CustomDomainsUpdateResult` has been removed -- Struct `DeploymentSettingsContainerProbeSettings` has been removed -- Struct `DeploymentsBeginCreateOrUpdateOptions` has been removed -- Struct `DeploymentsBeginDeleteOptions` has been removed -- Struct `DeploymentsBeginGenerateHeapDumpOptions` has been removed -- Struct `DeploymentsBeginGenerateThreadDumpOptions` has been removed -- Struct `DeploymentsBeginRestartOptions` has been removed -- Struct `DeploymentsBeginStartJFROptions` has been removed -- Struct `DeploymentsBeginStartOptions` has been removed -- Struct `DeploymentsBeginStopOptions` has been removed -- Struct `DeploymentsBeginUpdateOptions` has been removed -- Struct `DeploymentsCreateOrUpdatePoller` has been removed -- Struct `DeploymentsCreateOrUpdatePollerResponse` has been removed -- Struct `DeploymentsCreateOrUpdateResponse` has been removed -- Struct `DeploymentsCreateOrUpdateResult` has been removed -- Struct `DeploymentsDeletePoller` has been removed -- Struct `DeploymentsDeletePollerResponse` has been removed -- Struct `DeploymentsDeleteResponse` has been removed -- Struct `DeploymentsGenerateHeapDumpPoller` has been removed -- Struct `DeploymentsGenerateHeapDumpPollerResponse` has been removed -- Struct `DeploymentsGenerateHeapDumpResponse` has been removed -- Struct `DeploymentsGenerateThreadDumpPoller` has been removed -- Struct `DeploymentsGenerateThreadDumpPollerResponse` has been removed -- Struct `DeploymentsGenerateThreadDumpResponse` has been removed -- Struct `DeploymentsGetLogFileURLOptions` has been removed -- Struct `DeploymentsGetLogFileURLResponse` has been removed -- Struct `DeploymentsGetLogFileURLResult` has been removed -- Struct `DeploymentsGetOptions` has been removed -- Struct `DeploymentsGetResponse` has been removed -- Struct `DeploymentsGetResult` has been removed -- Struct `DeploymentsListForClusterOptions` has been removed -- Struct `DeploymentsListForClusterPager` has been removed -- Struct `DeploymentsListForClusterResponse` has been removed -- Struct `DeploymentsListForClusterResult` has been removed -- Struct `DeploymentsListOptions` has been removed -- Struct `DeploymentsListPager` has been removed -- Struct `DeploymentsListResponse` has been removed -- Struct `DeploymentsListResult` has been removed -- Struct `DeploymentsRestartPoller` has been removed -- Struct `DeploymentsRestartPollerResponse` has been removed -- Struct `DeploymentsRestartResponse` has been removed -- Struct `DeploymentsStartJFRPoller` has been removed -- Struct `DeploymentsStartJFRPollerResponse` has been removed -- Struct `DeploymentsStartJFRResponse` has been removed -- Struct `DeploymentsStartPoller` has been removed -- Struct `DeploymentsStartPollerResponse` has been removed -- Struct `DeploymentsStartResponse` has been removed -- Struct `DeploymentsStopPoller` has been removed -- Struct `DeploymentsStopPollerResponse` has been removed -- Struct `DeploymentsStopResponse` has been removed -- Struct `DeploymentsUpdatePoller` has been removed -- Struct `DeploymentsUpdatePollerResponse` has been removed -- Struct `DeploymentsUpdateResponse` has been removed -- Struct `DeploymentsUpdateResult` has been removed -- Struct `MonitoringSettingsBeginUpdatePatchOptions` has been removed -- Struct `MonitoringSettingsBeginUpdatePutOptions` has been removed -- Struct `MonitoringSettingsGetOptions` has been removed -- Struct `MonitoringSettingsGetResponse` has been removed -- Struct `MonitoringSettingsGetResult` has been removed -- Struct `MonitoringSettingsUpdatePatchPoller` has been removed -- Struct `MonitoringSettingsUpdatePatchPollerResponse` has been removed -- Struct `MonitoringSettingsUpdatePatchResponse` has been removed -- Struct `MonitoringSettingsUpdatePatchResult` has been removed -- Struct `MonitoringSettingsUpdatePutPoller` has been removed -- Struct `MonitoringSettingsUpdatePutPollerResponse` has been removed -- Struct `MonitoringSettingsUpdatePutResponse` has been removed -- Struct `MonitoringSettingsUpdatePutResult` has been removed -- Struct `OperationsListOptions` has been removed -- Struct `OperationsListPager` has been removed -- Struct `OperationsListResponse` has been removed -- Struct `OperationsListResult` has been removed -- Struct `RuntimeVersionsListRuntimeVersionsOptions` has been removed -- Struct `RuntimeVersionsListRuntimeVersionsResponse` has been removed -- Struct `RuntimeVersionsListRuntimeVersionsResult` has been removed -- Struct `SKUsListOptions` has been removed -- Struct `SKUsListPager` has been removed -- Struct `SKUsListResponse` has been removed -- Struct `SKUsListResult` has been removed -- Struct `ServicesBeginCreateOrUpdateOptions` has been removed -- Struct `ServicesBeginDeleteOptions` has been removed -- Struct `ServicesBeginStartOptions` has been removed -- Struct `ServicesBeginStopOptions` has been removed -- Struct `ServicesBeginUpdateOptions` has been removed -- Struct `ServicesCheckNameAvailabilityOptions` has been removed -- Struct `ServicesCheckNameAvailabilityResponse` has been removed -- Struct `ServicesCheckNameAvailabilityResult` has been removed -- Struct `ServicesCreateOrUpdatePoller` has been removed -- Struct `ServicesCreateOrUpdatePollerResponse` has been removed -- Struct `ServicesCreateOrUpdateResponse` has been removed -- Struct `ServicesCreateOrUpdateResult` has been removed -- Struct `ServicesDeletePoller` has been removed -- Struct `ServicesDeletePollerResponse` has been removed -- Struct `ServicesDeleteResponse` has been removed -- Struct `ServicesDisableTestEndpointOptions` has been removed -- Struct `ServicesDisableTestEndpointResponse` has been removed -- Struct `ServicesEnableTestEndpointOptions` has been removed -- Struct `ServicesEnableTestEndpointResponse` has been removed -- Struct `ServicesEnableTestEndpointResult` has been removed -- Struct `ServicesGetOptions` has been removed -- Struct `ServicesGetResponse` has been removed -- Struct `ServicesGetResult` has been removed -- Struct `ServicesListBySubscriptionOptions` has been removed -- Struct `ServicesListBySubscriptionPager` has been removed -- Struct `ServicesListBySubscriptionResponse` has been removed -- Struct `ServicesListBySubscriptionResult` has been removed -- Struct `ServicesListOptions` has been removed -- Struct `ServicesListPager` has been removed -- Struct `ServicesListResponse` has been removed -- Struct `ServicesListResult` has been removed -- Struct `ServicesListTestKeysOptions` has been removed -- Struct `ServicesListTestKeysResponse` has been removed -- Struct `ServicesListTestKeysResult` has been removed -- Struct `ServicesRegenerateTestKeyOptions` has been removed -- Struct `ServicesRegenerateTestKeyResponse` has been removed -- Struct `ServicesRegenerateTestKeyResult` has been removed -- Struct `ServicesStartPoller` has been removed -- Struct `ServicesStartPollerResponse` has been removed -- Struct `ServicesStartResponse` has been removed -- Struct `ServicesStopPoller` has been removed -- Struct `ServicesStopPollerResponse` has been removed -- Struct `ServicesStopResponse` has been removed -- Struct `ServicesUpdatePoller` has been removed -- Struct `ServicesUpdatePollerResponse` has been removed -- Struct `ServicesUpdateResponse` has been removed -- Struct `ServicesUpdateResult` has been removed -- Struct `StoragesBeginCreateOrUpdateOptions` has been removed -- Struct `StoragesBeginDeleteOptions` has been removed -- Struct `StoragesCreateOrUpdatePoller` has been removed -- Struct `StoragesCreateOrUpdatePollerResponse` has been removed -- Struct `StoragesCreateOrUpdateResponse` has been removed -- Struct `StoragesCreateOrUpdateResult` has been removed -- Struct `StoragesDeletePoller` has been removed -- Struct `StoragesDeletePollerResponse` has been removed -- Struct `StoragesDeleteResponse` has been removed -- Struct `StoragesGetOptions` has been removed -- Struct `StoragesGetResponse` has been removed -- Struct `StoragesGetResult` has been removed -- Struct `StoragesListOptions` has been removed -- Struct `StoragesListPager` has been removed -- Struct `StoragesListResponse` has been removed -- Struct `StoragesListResult` has been removed -- Field `Resource` of struct `ProxyResource` has been removed -- Field `StorageProperties` of struct `StorageAccount` has been removed -- Field `TrackedResource` of struct `ServiceResource` has been removed -- Field `ProxyResource` of struct `DeploymentResource` has been removed -- Field `InnerError` of struct `CloudError` has been removed -- Field `ProxyResource` of struct `ConfigServerResource` has been removed -- Field `CertificateProperties` of struct `KeyVaultCertificateProperties` has been removed -- Field `ProxyResource` of struct `AppResource` has been removed -- Field `ProxyResource` of struct `StorageResource` has been removed -- Field `ArtifactSelector` of struct `UserSourceInfo` has been removed -- Field `CustomContainer` of struct `UserSourceInfo` has been removed -- Field `RelativePath` of struct `UserSourceInfo` has been removed -- Field `ProxyResource` of struct `CustomDomainResource` has been removed -- Field `CustomPersistentDiskProperties` of struct `AzureFileVolume` has been removed -- Field `ProxyResource` of struct `MonitoringSettingResource` has been removed -- Field `CertificateProperties` of struct `ContentCertificateProperties` has been removed -- Field `MemoryInGB` of struct `DeploymentSettings` has been removed -- Field `NetCoreMainEntryPath` of struct `DeploymentSettings` has been removed -- Field `RuntimeVersion` of struct `DeploymentSettings` has been removed -- Field `CPU` of struct `DeploymentSettings` has been removed -- Field `JvmOptions` of struct `DeploymentSettings` has been removed -- Field `ActiveDeploymentName` of struct `AppResourceProperties` has been removed -- Field `CreatedTime` of struct `AppResourceProperties` has been removed -- Field `Resource` of struct `TrackedResource` has been removed -- Field `AppName` of struct `DeploymentResourceProperties` has been removed -- Field `CreatedTime` of struct `DeploymentResourceProperties` has been removed -- Field `ProxyResource` of struct `CertificateResource` has been removed -- Field `ProxyResource` of struct `BindingResource` has been removed - -### Features Added - -- New const `BuildpackBindingProvisioningStateDeleting` -- New const `BuildProvisioningStateUpdating` -- New const `APIPortalProvisioningStateUpdating` -- New const `BuildProvisioningStateCreating` -- New const `BuildpackBindingProvisioningStateUpdating` -- New const `ServiceRegistryProvisioningStateDeleting` -- New const `BuilderProvisioningStateCreating` -- New const `ServiceRegistryProvisioningStateFailed` -- New const `APIPortalProvisioningStateCreating` -- New const `BuildProvisioningStateFailed` -- New const `GatewayProvisioningStateSucceeded` -- New const `BuildResultProvisioningStateFailed` -- New const `LastModifiedByTypeUser` -- New const `KPackBuildStageProvisioningStateRunning` -- New const `LastModifiedByTypeApplication` -- New const `BindingTypeDynatrace` -- New const `BuildResultProvisioningStateSucceeded` -- New const `BuilderProvisioningStateSucceeded` -- New const `APIPortalProvisioningStateFailed` -- New const `KPackBuildStageProvisioningStateSucceeded` -- New const `LastModifiedByTypeKey` -- New const `BuildServiceProvisioningStateUpdating` -- New const `KPackBuildStageProvisioningStateFailed` -- New const `BuildProvisioningStateSucceeded` -- New const `GatewayProvisioningStateUpdating` -- New const `BuildServiceProvisioningStateCreating` -- New const `ConfigurationServiceProvisioningStateFailed` -- New const `GatewayProvisioningStateDeleting` -- New const `KPackBuildStageProvisioningStateNotStarted` -- New const `LastModifiedByTypeManagedIdentity` -- New const `BindingTypeElasticAPM` -- New const `BuildpackBindingProvisioningStateCreating` -- New const `BuildProvisioningStateDeleting` -- New const `AppResourceProvisioningStateDeleting` -- New const `BuilderProvisioningStateFailed` -- New const `ServiceRegistryProvisioningStateSucceeded` -- New const `ConfigurationServiceProvisioningStateDeleting` -- New const `BuildServiceProvisioningStateDeleting` -- New const `BuildServiceProvisioningStateSucceeded` -- New const `APIPortalProvisioningStateSucceeded` -- New const `BuilderProvisioningStateDeleting` -- New const `BuildpackBindingProvisioningStateSucceeded` -- New const `GatewayProvisioningStateFailed` -- New const `ConfigurationServiceProvisioningStateSucceeded` -- New const `ConfigurationServiceProvisioningStateCreating` -- New const `BuildServiceProvisioningStateFailed` -- New const `APIPortalProvisioningStateDeleting` -- New const `BuildResultProvisioningStateQueuing` -- New const `BuilderProvisioningStateUpdating` -- New const `BuildpackBindingProvisioningStateFailed` -- New const `BindingTypeApplicationInsights` -- New const `ConfigurationServiceProvisioningStateUpdating` -- New const `SupportedRuntimeValueJava17` -- New const `ServiceRegistryProvisioningStateCreating` -- New const `BuildResultProvisioningStateDeleting` -- New const `BuildResultProvisioningStateBuilding` -- New const `BindingTypeNewRelic` -- New const `BindingTypeApacheSkyWalking` -- New const `ServiceRegistryProvisioningStateUpdating` -- New const `BindingTypeAppDynamics` -- New const `GatewayProvisioningStateCreating` -- New function `*ConfigurationServicesClientListPager.NextPage(context.Context) bool` -- New function `*BuildpackBindingClient.List(string, string, string, string, *BuildpackBindingClientListOptions) *BuildpackBindingClientListPager` -- New function `*GatewayCustomDomainsClientListPager.Err() error` -- New function `CustomDomainsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (CustomDomainsClientCreateOrUpdateResponse, error)` -- New function `*ServiceRegistriesClient.Get(context.Context, string, string, string, *ServiceRegistriesClientGetOptions) (ServiceRegistriesClientGetResponse, error)` -- New function `GatewayOperatorProperties.MarshalJSON() ([]byte, error)` -- New function `*ServiceRegistriesClientDeletePoller.Done() bool` -- New function `*CustomDomainsClientListPager.Err() error` -- New function `*APIPortalCustomDomainsClient.List(string, string, string, *APIPortalCustomDomainsClientListOptions) *APIPortalCustomDomainsClientListPager` -- New function `*GatewayCustomDomainsClientCreateOrUpdatePoller.Done() bool` -- New function `KPackBuildStageProvisioningState.ToPtr() *KPackBuildStageProvisioningState` -- New function `ServicesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (ServicesClientDeleteResponse, error)` -- New function `BuildpacksGroupProperties.MarshalJSON() ([]byte, error)` -- New function `*GatewayRouteConfigsClientCreateOrUpdatePollerResponse.Resume(context.Context, *GatewayRouteConfigsClient, string) error` -- New function `*DeploymentsClientDeletePollerResponse.Resume(context.Context, *DeploymentsClient, string) error` -- New function `*ConfigServersClientValidatePoller.ResumeToken() (string, error)` -- New function `*BuildpackBindingClient.BeginCreateOrUpdate(context.Context, string, string, string, string, string, BuildpackBindingResource, *BuildpackBindingClientBeginCreateOrUpdateOptions) (BuildpackBindingClientCreateOrUpdatePollerResponse, error)` -- New function `*ConfigServersClientUpdatePatchPollerResponse.Resume(context.Context, *ConfigServersClient, string) error` -- New function `*ConfigurationServicesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ConfigurationServicesClient.BeginDelete(context.Context, string, string, string, *ConfigurationServicesClientBeginDeleteOptions) (ConfigurationServicesClientDeletePollerResponse, error)` -- New function `*ConfigServersClientUpdatePutPoller.Poll(context.Context) (*http.Response, error)` -- New function `GatewayResourceCollection.MarshalJSON() ([]byte, error)` -- New function `*GatewaysClient.ValidateDomain(context.Context, string, string, string, CustomDomainValidatePayload, *GatewaysClientValidateDomainOptions) (GatewaysClientValidateDomainResponse, error)` -- New function `NewServiceRegistriesClient(string, azcore.TokenCredential, *arm.ClientOptions) *ServiceRegistriesClient` -- New function `*GatewaysClientDeletePoller.FinalResponse(context.Context) (GatewaysClientDeleteResponse, error)` -- New function `*MonitoringSettingsClientUpdatePutPoller.Poll(context.Context) (*http.Response, error)` -- New function `BuildProperties.MarshalJSON() ([]byte, error)` -- New function `*ConfigurationServicesClient.Get(context.Context, string, string, string, *ConfigurationServicesClientGetOptions) (ConfigurationServicesClientGetResponse, error)` -- New function `*CustomDomainsClientUpdatePoller.Done() bool` -- New function `*BuildServiceBuilderClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `BuildProvisioningState.ToPtr() *BuildProvisioningState` -- New function `CustomContainerUserSourceInfo.MarshalJSON() ([]byte, error)` -- New function `GatewayCustomDomainsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (GatewayCustomDomainsClientDeleteResponse, error)` -- New function `*ConfigServersClientUpdatePutPollerResponse.Resume(context.Context, *ConfigServersClient, string) error` -- New function `*BuildServiceClient.ListSupportedBuildpacks(context.Context, string, string, string, *BuildServiceClientListSupportedBuildpacksOptions) (BuildServiceClientListSupportedBuildpacksResponse, error)` -- New function `*StoragesClientListPager.PageResponse() StoragesClientListResponse` -- New function `*APIPortalCustomDomainsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*BuildpackBindingClientDeletePoller.FinalResponse(context.Context) (BuildpackBindingClientDeleteResponse, error)` -- New function `*BuildServiceClientListBuildsPager.Err() error` -- New function `NewBuildServiceClient(string, azcore.TokenCredential, *arm.ClientOptions) *BuildServiceClient` -- New function `*BuildServiceBuilderClientCreateOrUpdatePoller.Done() bool` -- New function `GatewayAPIRoute.MarshalJSON() ([]byte, error)` -- New function `*BuildServiceBuilderClient.Get(context.Context, string, string, string, string, *BuildServiceBuilderClientGetOptions) (BuildServiceBuilderClientGetResponse, error)` -- New function `*AppsClientUpdatePoller.ResumeToken() (string, error)` -- New function `*BuildServiceClientListBuildsPager.PageResponse() BuildServiceClientListBuildsResponse` -- New function `*DeploymentsClientStartJFRPollerResponse.Resume(context.Context, *DeploymentsClient, string) error` -- New function `*DeploymentsClientUpdatePoller.ResumeToken() (string, error)` -- New function `*BindingsClientDeletePoller.Done() bool` -- New function `GatewayRouteConfigsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (GatewayRouteConfigsClientDeleteResponse, error)` -- New function `*CertificatesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `BuildpackBindingProvisioningState.ToPtr() *BuildpackBindingProvisioningState` -- New function `*ServicesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `PossibleKPackBuildStageProvisioningStateValues() []KPackBuildStageProvisioningState` -- New function `*BuildServiceBuilderClientCreateOrUpdatePoller.FinalResponse(context.Context) (BuildServiceBuilderClientCreateOrUpdateResponse, error)` -- New function `*ServicesClientStopPollerResponse.Resume(context.Context, *ServicesClient, string) error` -- New function `*DeploymentsClientGenerateHeapDumpPoller.FinalResponse(context.Context) (DeploymentsClientGenerateHeapDumpResponse, error)` -- New function `PossibleServiceRegistryProvisioningStateValues() []ServiceRegistryProvisioningState` -- New function `*StoragesClientListPager.NextPage(context.Context) bool` -- New function `*AppsClientCreateOrUpdatePoller.FinalResponse(context.Context) (AppsClientCreateOrUpdateResponse, error)` -- New function `*GatewaysClientDeletePollerResponse.Resume(context.Context, *GatewaysClient, string) error` -- New function `ServicesClientStopPollerResponse.PollUntilDone(context.Context, time.Duration) (ServicesClientStopResponse, error)` -- New function `BindingsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (BindingsClientCreateOrUpdateResponse, error)` -- New function `*BindingsClientCreateOrUpdatePoller.Done() bool` -- New function `*ContentCertificateProperties.GetCertificateProperties() *CertificateProperties` -- New function `*MonitoringSettingsClientUpdatePutPoller.Done() bool` -- New function `BuilderProvisioningState.ToPtr() *BuilderProvisioningState` -- New function `*GatewayRouteConfigsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*GatewayCustomDomainsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, GatewayCustomDomainResource, *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (GatewayCustomDomainsClientCreateOrUpdatePollerResponse, error)` -- New function `DeploymentsClientStopPollerResponse.PollUntilDone(context.Context, time.Duration) (DeploymentsClientStopResponse, error)` -- New function `ConfigServersClientUpdatePatchPollerResponse.PollUntilDone(context.Context, time.Duration) (ConfigServersClientUpdatePatchResponse, error)` -- New function `GatewayRouteConfigProperties.MarshalJSON() ([]byte, error)` -- New function `*AppsClientCreateOrUpdatePollerResponse.Resume(context.Context, *AppsClient, string) error` -- New function `*ConfigServersClientUpdatePutPoller.ResumeToken() (string, error)` -- New function `*AppsClientSetActiveDeploymentsPoller.FinalResponse(context.Context) (AppsClientSetActiveDeploymentsResponse, error)` -- New function `BuildServiceBuilderClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (BuildServiceBuilderClientDeleteResponse, error)` -- New function `*BuildServiceBuilderClientDeletePoller.FinalResponse(context.Context) (BuildServiceBuilderClientDeleteResponse, error)` -- New function `*APIPortalCustomDomainsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*BuildpackBindingClientListPager.PageResponse() BuildpackBindingClientListResponse` -- New function `*APIPortalCustomDomainsClientListPager.NextPage(context.Context) bool` -- New function `*AppsClientSetActiveDeploymentsPollerResponse.Resume(context.Context, *AppsClient, string) error` -- New function `NewGatewayCustomDomainsClient(string, azcore.TokenCredential, *arm.ClientOptions) *GatewayCustomDomainsClient` -- New function `BuildServiceCollection.MarshalJSON() ([]byte, error)` -- New function `*GatewaysClientCreateOrUpdatePoller.Done() bool` -- New function `*ConfigServersClientUpdatePatchPoller.ResumeToken() (string, error)` -- New function `*DeploymentsClientStartPoller.Done() bool` -- New function `*AppsClientUpdatePollerResponse.Resume(context.Context, *AppsClient, string) error` -- New function `*AppsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*BuildpackBindingClient.Get(context.Context, string, string, string, string, string, *BuildpackBindingClientGetOptions) (BuildpackBindingClientGetResponse, error)` -- New function `*DeploymentsClientStartJFRPoller.Done() bool` -- New function `CustomDomainsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (CustomDomainsClientUpdateResponse, error)` -- New function `*DeploymentsClientStartPoller.ResumeToken() (string, error)` -- New function `*DeploymentsClientGenerateThreadDumpPoller.ResumeToken() (string, error)` -- New function `*CustomDomainsClientUpdatePoller.ResumeToken() (string, error)` -- New function `APIPortalResourceCollection.MarshalJSON() ([]byte, error)` -- New function `*ConfigServersClientUpdatePatchPoller.Poll(context.Context) (*http.Response, error)` -- New function `*BuildServiceClient.GetBuildService(context.Context, string, string, string, *BuildServiceClientGetBuildServiceOptions) (BuildServiceClientGetBuildServiceResponse, error)` -- New function `*ServicesClientCreateOrUpdatePoller.FinalResponse(context.Context) (ServicesClientCreateOrUpdateResponse, error)` -- New function `*BuildServiceAgentPoolClientUpdatePutPollerResponse.Resume(context.Context, *BuildServiceAgentPoolClient, string) error` -- New function `ServiceRegistryResourceCollection.MarshalJSON() ([]byte, error)` -- New function `*CertificatesClientCreateOrUpdatePollerResponse.Resume(context.Context, *CertificatesClient, string) error` -- New function `*AppsClientCreateOrUpdatePoller.Done() bool` -- New function `*ServiceRegistriesClientCreateOrUpdatePoller.Done() bool` -- New function `*APIPortalCustomDomainsClientDeletePollerResponse.Resume(context.Context, *APIPortalCustomDomainsClient, string) error` -- New function `*ServicesClientUpdatePollerResponse.Resume(context.Context, *ServicesClient, string) error` -- New function `*ServicesClientUpdatePoller.FinalResponse(context.Context) (ServicesClientUpdateResponse, error)` -- New function `*CertificatesClientDeletePollerResponse.Resume(context.Context, *CertificatesClient, string) error` -- New function `*DeploymentsClientDeletePoller.ResumeToken() (string, error)` -- New function `*OperationsClientListPager.Err() error` -- New function `BindingsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (BindingsClientDeleteResponse, error)` -- New function `BuildCollection.MarshalJSON() ([]byte, error)` -- New function `*ServicesClientDeletePollerResponse.Resume(context.Context, *ServicesClient, string) error` -- New function `*ConfigurationServicesClientValidatePoller.FinalResponse(context.Context) (ConfigurationServicesClientValidateResponse, error)` -- New function `*BuildpackBindingClientListPager.Err() error` -- New function `DeploymentsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (DeploymentsClientUpdateResponse, error)` -- New function `AppsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (AppsClientDeleteResponse, error)` -- New function `*BuildServiceAgentPoolClient.Get(context.Context, string, string, string, string, *BuildServiceAgentPoolClientGetOptions) (BuildServiceAgentPoolClientGetResponse, error)` -- New function `*ServicesClientStartPoller.FinalResponse(context.Context) (ServicesClientStartResponse, error)` -- New function `*MonitoringSettingsClientUpdatePutPoller.FinalResponse(context.Context) (MonitoringSettingsClientUpdatePutResponse, error)` -- New function `*ServicesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*APIPortalCustomDomainsClient.Get(context.Context, string, string, string, string, *APIPortalCustomDomainsClientGetOptions) (APIPortalCustomDomainsClientGetResponse, error)` -- New function `*BuildServiceBuilderClientDeletePoller.ResumeToken() (string, error)` -- New function `*APIPortalCustomDomainsClient.BeginDelete(context.Context, string, string, string, string, *APIPortalCustomDomainsClientBeginDeleteOptions) (APIPortalCustomDomainsClientDeletePollerResponse, error)` -- New function `*ServiceRegistriesClientDeletePoller.FinalResponse(context.Context) (ServiceRegistriesClientDeleteResponse, error)` -- New function `*DeploymentsClientStartPollerResponse.Resume(context.Context, *DeploymentsClient, string) error` -- New function `*SKUsClientListPager.Err() error` -- New function `MonitoringSettingsClientUpdatePutPollerResponse.PollUntilDone(context.Context, time.Duration) (MonitoringSettingsClientUpdatePutResponse, error)` -- New function `APIPortalCustomDomainsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (APIPortalCustomDomainsClientDeleteResponse, error)` -- New function `ConfigurationServiceProvisioningState.ToPtr() *ConfigurationServiceProvisioningState` -- New function `*GatewayRouteConfigsClientDeletePoller.FinalResponse(context.Context) (GatewayRouteConfigsClientDeleteResponse, error)` -- New function `*ServicesClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `NewBuildServiceAgentPoolClient(string, azcore.TokenCredential, *arm.ClientOptions) *BuildServiceAgentPoolClient` -- New function `*ServiceRegistriesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*APIPortalsClient.BeginCreateOrUpdate(context.Context, string, string, string, APIPortalResource, *APIPortalsClientBeginCreateOrUpdateOptions) (APIPortalsClientCreateOrUpdatePollerResponse, error)` -- New function `*MonitoringSettingsClientUpdatePutPoller.ResumeToken() (string, error)` -- New function `*DeploymentsClientListPager.PageResponse() DeploymentsClientListResponse` -- New function `*GatewayRouteConfigsClientCreateOrUpdatePoller.FinalResponse(context.Context) (GatewayRouteConfigsClientCreateOrUpdateResponse, error)` -- New function `*MonitoringSettingsClientUpdatePatchPoller.ResumeToken() (string, error)` -- New function `*DeploymentsClientListPager.NextPage(context.Context) bool` -- New function `APIPortalsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (APIPortalsClientDeleteResponse, error)` -- New function `NewBuildServiceBuilderClient(string, azcore.TokenCredential, *arm.ClientOptions) *BuildServiceBuilderClient` -- New function `*GatewayCustomDomainsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CertificatesClientListPager.NextPage(context.Context) bool` -- New function `*DeploymentsClientRestartPollerResponse.Resume(context.Context, *DeploymentsClient, string) error` -- New function `*BuildpackBindingClientDeletePollerResponse.Resume(context.Context, *BuildpackBindingClient, string) error` -- New function `ServiceRegistryProvisioningState.ToPtr() *ServiceRegistryProvisioningState` -- New function `*GatewayRouteConfigsClient.List(string, string, string, *GatewayRouteConfigsClientListOptions) *GatewayRouteConfigsClientListPager` -- New function `*BuildServiceClientListBuildServicesPager.NextPage(context.Context) bool` -- New function `CertificatesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (CertificatesClientDeleteResponse, error)` -- New function `*DeploymentsClientStartJFRPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ConfigServersClientUpdatePatchPoller.FinalResponse(context.Context) (ConfigServersClientUpdatePatchResponse, error)` -- New function `*ServiceRegistriesClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*BuildServiceBuilderClientListPager.PageResponse() BuildServiceBuilderClientListResponse` -- New function `PossibleAPIPortalProvisioningStateValues() []APIPortalProvisioningState` -- New function `*ServiceRegistriesClient.List(string, string, *ServiceRegistriesClientListOptions) *ServiceRegistriesClientListPager` -- New function `*StoragesClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*BuildServiceBuilderClientDeletePoller.Done() bool` -- New function `*GatewayCustomDomainsClient.Get(context.Context, string, string, string, string, *GatewayCustomDomainsClientGetOptions) (GatewayCustomDomainsClientGetResponse, error)` -- New function `*APIPortalsClient.List(string, string, *APIPortalsClientListOptions) *APIPortalsClientListPager` -- New function `*CustomDomainsClientDeletePoller.FinalResponse(context.Context) (CustomDomainsClientDeleteResponse, error)` -- New function `ConfigurationServiceProperties.MarshalJSON() ([]byte, error)` -- New function `*BindingsClientListPager.NextPage(context.Context) bool` -- New function `*ServiceRegistriesClientDeletePoller.ResumeToken() (string, error)` -- New function `*MonitoringSettingsClientUpdatePatchPoller.FinalResponse(context.Context) (MonitoringSettingsClientUpdatePatchResponse, error)` -- New function `*BuildpackBindingClientDeletePoller.Done() bool` -- New function `*DeploymentsClientRestartPoller.Poll(context.Context) (*http.Response, error)` -- New function `*SourceUploadedUserSourceInfo.GetUploadedUserSourceInfo() *UploadedUserSourceInfo` -- New function `*GatewayCustomDomainsClient.List(string, string, string, *GatewayCustomDomainsClientListOptions) *GatewayCustomDomainsClientListPager` -- New function `*CustomDomainsClientDeletePoller.Done() bool` -- New function `*BuildServiceBuilderClient.BeginDelete(context.Context, string, string, string, string, *BuildServiceBuilderClientBeginDeleteOptions) (BuildServiceBuilderClientDeletePollerResponse, error)` -- New function `*DeploymentsClientUpdatePollerResponse.Resume(context.Context, *DeploymentsClient, string) error` -- New function `*GatewayCustomDomainsClientDeletePollerResponse.Resume(context.Context, *GatewayCustomDomainsClient, string) error` -- New function `*APIPortalsClientDeletePoller.Done() bool` -- New function `GatewayRouteConfigResourceCollection.MarshalJSON() ([]byte, error)` -- New function `*GatewayCustomDomainsClientListPager.NextPage(context.Context) bool` -- New function `*DeploymentsClientCreateOrUpdatePoller.FinalResponse(context.Context) (DeploymentsClientCreateOrUpdateResponse, error)` -- New function `*CustomDomainsClientUpdatePollerResponse.Resume(context.Context, *CustomDomainsClient, string) error` -- New function `BuildpackBindingClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (BuildpackBindingClientDeleteResponse, error)` -- New function `*ConfigServersClientValidatePollerResponse.Resume(context.Context, *ConfigServersClient, string) error` -- New function `*ConfigurationServicesClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*BindingsClientListPager.Err() error` -- New function `BuildpackBindingClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (BuildpackBindingClientCreateOrUpdateResponse, error)` -- New function `GatewaysClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (GatewaysClientCreateOrUpdateResponse, error)` -- New function `*AppsClientDeletePoller.ResumeToken() (string, error)` -- New function `*DeploymentsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*GatewayRouteConfigsClientDeletePollerResponse.Resume(context.Context, *GatewayRouteConfigsClient, string) error` -- New function `*DeploymentsClientCreateOrUpdatePoller.Done() bool` -- New function `*ServicesClientDeletePoller.Done() bool` -- New function `CustomDomainsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (CustomDomainsClientDeleteResponse, error)` -- New function `*KeyVaultCertificateProperties.GetCertificateProperties() *CertificateProperties` -- New function `DeploymentsClientGenerateHeapDumpPollerResponse.PollUntilDone(context.Context, time.Duration) (DeploymentsClientGenerateHeapDumpResponse, error)` -- New function `*BindingsClientCreateOrUpdatePoller.FinalResponse(context.Context) (BindingsClientCreateOrUpdateResponse, error)` -- New function `*APIPortalCustomDomainsClientCreateOrUpdatePoller.Done() bool` -- New function `*BuildpackBindingClient.BeginDelete(context.Context, string, string, string, string, string, *BuildpackBindingClientBeginDeleteOptions) (BuildpackBindingClientDeletePollerResponse, error)` -- New function `*CustomDomainsClientListPager.PageResponse() CustomDomainsClientListResponse` -- New function `*GatewayRouteConfigsClientListPager.Err() error` -- New function `*CustomDomainsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*GatewayCustomDomainsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CustomContainerUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` -- New function `BuilderResourceCollection.MarshalJSON() ([]byte, error)` -- New function `*AppsClientListPager.PageResponse() AppsClientListResponse` -- New function `*BindingsClientCreateOrUpdatePollerResponse.Resume(context.Context, *BindingsClient, string) error` -- New function `*ConfigurationServicesClientListPager.Err() error` -- New function `*GatewayRouteConfigsClient.Get(context.Context, string, string, string, string, *GatewayRouteConfigsClientGetOptions) (GatewayRouteConfigsClientGetResponse, error)` -- New function `*CustomDomainsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*BuildServiceBuilderClientListPager.Err() error` -- New function `*BuildServiceBuilderClientCreateOrUpdatePollerResponse.Resume(context.Context, *BuildServiceBuilderClient, string) error` -- New function `ConfigurationServicesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (ConfigurationServicesClientCreateOrUpdateResponse, error)` -- New function `*AppsClientListPager.Err() error` -- New function `SupportedStacksCollection.MarshalJSON() ([]byte, error)` -- New function `*StorageAccount.GetStorageProperties() *StorageProperties` -- New function `BuildServiceAgentPoolResourceCollection.MarshalJSON() ([]byte, error)` -- New function `*APIPortalsClient.BeginDelete(context.Context, string, string, string, *APIPortalsClientBeginDeleteOptions) (APIPortalsClientDeletePollerResponse, error)` -- New function `*BuildResultUserSourceInfo.UnmarshalJSON([]byte) error` -- New function `MonitoringSettingsClientUpdatePatchPollerResponse.PollUntilDone(context.Context, time.Duration) (MonitoringSettingsClientUpdatePatchResponse, error)` -- New function `*APIPortalsClientDeletePollerResponse.Resume(context.Context, *APIPortalsClient, string) error` -- New function `*APIPortalsClientListPager.PageResponse() APIPortalsClientListResponse` -- New function `*DeploymentsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*AppsClient.BeginSetActiveDeployments(context.Context, string, string, string, ActiveDeploymentCollection, *AppsClientBeginSetActiveDeploymentsOptions) (AppsClientSetActiveDeploymentsPollerResponse, error)` -- New function `*DeploymentsClientListForClusterPager.NextPage(context.Context) bool` -- New function `*ServicesClientListBySubscriptionPager.PageResponse() ServicesClientListBySubscriptionResponse` -- New function `UploadedUserSourceInfo.MarshalJSON() ([]byte, error)` -- New function `*GatewayCustomDomainsClientDeletePoller.FinalResponse(context.Context) (GatewayCustomDomainsClientDeleteResponse, error)` -- New function `*AppsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*CertificatesClientDeletePoller.Done() bool` -- New function `*MonitoringSettingsClientUpdatePatchPoller.Poll(context.Context) (*http.Response, error)` -- New function `*DeploymentsClientGenerateHeapDumpPollerResponse.Resume(context.Context, *DeploymentsClient, string) error` -- New function `*ConfigurationServicesClient.BeginValidate(context.Context, string, string, string, ConfigurationServiceSettings, *ConfigurationServicesClientBeginValidateOptions) (ConfigurationServicesClientValidatePollerResponse, error)` -- New function `*BuildResultUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` -- New function `ServicesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (ServicesClientCreateOrUpdateResponse, error)` -- New function `*AppsClientListPager.NextPage(context.Context) bool` -- New function `*NetCoreZipUploadedUserSourceInfo.UnmarshalJSON([]byte) error` -- New function `*GatewayCustomDomainsClientCreateOrUpdatePollerResponse.Resume(context.Context, *GatewayCustomDomainsClient, string) error` -- New function `*APIPortalsClientCreateOrUpdatePoller.FinalResponse(context.Context) (APIPortalsClientCreateOrUpdateResponse, error)` -- New function `*CustomDomainsClientDeletePollerResponse.Resume(context.Context, *CustomDomainsClient, string) error` -- New function `*UploadedUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` -- New function `*BuildpackBindingClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `AppsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (AppsClientUpdateResponse, error)` -- New function `ConfigurationServicesClientValidatePollerResponse.PollUntilDone(context.Context, time.Duration) (ConfigurationServicesClientValidateResponse, error)` -- New function `APIPortalProvisioningState.ToPtr() *APIPortalProvisioningState` -- New function `*BuildpackBindingClientCreateOrUpdatePollerResponse.Resume(context.Context, *BuildpackBindingClient, string) error` -- New function `DeploymentsClientGenerateThreadDumpPollerResponse.PollUntilDone(context.Context, time.Duration) (DeploymentsClientGenerateThreadDumpResponse, error)` -- New function `*BuildServiceClient.GetBuildResultLog(context.Context, string, string, string, string, string, *BuildServiceClientGetBuildResultLogOptions) (BuildServiceClientGetBuildResultLogResponse, error)` -- New function `StoragesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (StoragesClientCreateOrUpdateResponse, error)` -- New function `SupportedBuildpacksCollection.MarshalJSON() ([]byte, error)` -- New function `*DeploymentsClientRestartPoller.Done() bool` -- New function `BindingsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (BindingsClientUpdateResponse, error)` -- New function `PossibleConfigurationServiceProvisioningStateValues() []ConfigurationServiceProvisioningState` -- New function `NewGatewaysClient(string, azcore.TokenCredential, *arm.ClientOptions) *GatewaysClient` -- New function `BuildResultUserSourceInfo.MarshalJSON() ([]byte, error)` -- New function `*BuildServiceAgentPoolClient.List(string, string, string, *BuildServiceAgentPoolClientListOptions) *BuildServiceAgentPoolClientListPager` -- New function `BuildServiceAgentPoolClientUpdatePutPollerResponse.PollUntilDone(context.Context, time.Duration) (BuildServiceAgentPoolClientUpdatePutResponse, error)` -- New function `*GatewaysClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*DeploymentsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*NetCoreZipUploadedUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` -- New function `*BuildServiceClient.GetSupportedBuildpack(context.Context, string, string, string, string, *BuildServiceClientGetSupportedBuildpackOptions) (BuildServiceClientGetSupportedBuildpackResponse, error)` -- New function `BuildResultCollection.MarshalJSON() ([]byte, error)` -- New function `*BuildServiceBuilderClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*ConfigurationServicesClientCreateOrUpdatePollerResponse.Resume(context.Context, *ConfigurationServicesClient, string) error` -- New function `*DeploymentsClientCreateOrUpdatePollerResponse.Resume(context.Context, *DeploymentsClient, string) error` -- New function `*BuildServiceAgentPoolClientUpdatePutPoller.Done() bool` -- New function `*GatewayRouteConfigsClientCreateOrUpdatePoller.Done() bool` -- New function `*BindingsClientDeletePoller.FinalResponse(context.Context) (BindingsClientDeleteResponse, error)` -- New function `*GatewayCustomDomainsClientDeletePoller.ResumeToken() (string, error)` -- New function `BuildServiceBuilderClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (BuildServiceBuilderClientCreateOrUpdateResponse, error)` -- New function `BuildpackBindingLaunchProperties.MarshalJSON() ([]byte, error)` -- New function `*CertificatesClientListPager.PageResponse() CertificatesClientListResponse` -- New function `*MonitoringSettingsClientUpdatePutPollerResponse.Resume(context.Context, *MonitoringSettingsClient, string) error` -- New function `*DeploymentsClientStopPoller.ResumeToken() (string, error)` -- New function `*APIPortalsClient.Get(context.Context, string, string, string, *APIPortalsClientGetOptions) (APIPortalsClientGetResponse, error)` -- New function `*DeploymentsClientListForClusterPager.Err() error` -- New function `*ServicesClientStopPoller.Done() bool` -- New function `*AppsClientUpdatePoller.Done() bool` -- New function `LastModifiedByType.ToPtr() *LastModifiedByType` -- New function `*DeploymentsClientStopPoller.FinalResponse(context.Context) (DeploymentsClientStopResponse, error)` -- New function `*BuildServiceClient.GetBuildResult(context.Context, string, string, string, string, string, *BuildServiceClientGetBuildResultOptions) (BuildServiceClientGetBuildResultResponse, error)` -- New function `*BuildpackBindingClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `DeploymentsClientStartJFRPollerResponse.PollUntilDone(context.Context, time.Duration) (DeploymentsClientStartJFRResponse, error)` -- New function `*UserSourceInfo.GetUserSourceInfo() *UserSourceInfo` -- New function `*SKUsClientListPager.PageResponse() SKUsClientListResponse` -- New function `*BindingsClientUpdatePollerResponse.Resume(context.Context, *BindingsClient, string) error` -- New function `*ServiceRegistriesClientListPager.PageResponse() ServiceRegistriesClientListResponse` -- New function `*BuildServiceAgentPoolClientListPager.PageResponse() BuildServiceAgentPoolClientListResponse` -- New function `*GatewayRouteConfigsClientDeletePoller.Done() bool` -- New function `*GatewaysClient.Get(context.Context, string, string, string, *GatewaysClientGetOptions) (GatewaysClientGetResponse, error)` -- New function `*GatewaysClientListPager.PageResponse() GatewaysClientListResponse` -- New function `*ServiceRegistriesClientCreateOrUpdatePollerResponse.Resume(context.Context, *ServiceRegistriesClient, string) error` -- New function `*GatewayRouteConfigsClientListPager.PageResponse() GatewayRouteConfigsClientListResponse` -- New function `*CustomDomainsClientCreateOrUpdatePollerResponse.Resume(context.Context, *CustomDomainsClient, string) error` -- New function `*BuildServiceClient.ListBuilds(string, string, string, *BuildServiceClientListBuildsOptions) *BuildServiceClientListBuildsPager` -- New function `*BuildServiceBuilderClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*GatewaysClientListPager.Err() error` -- New function `*BuildServiceClient.ListBuildServices(string, string, *BuildServiceClientListBuildServicesOptions) *BuildServiceClientListBuildServicesPager` -- New function `*StoragesClientDeletePollerResponse.Resume(context.Context, *StoragesClient, string) error` -- New function `AppsClientSetActiveDeploymentsPollerResponse.PollUntilDone(context.Context, time.Duration) (AppsClientSetActiveDeploymentsResponse, error)` -- New function `*DeploymentsClientGenerateThreadDumpPollerResponse.Resume(context.Context, *DeploymentsClient, string) error` -- New function `PossibleBindingTypeValues() []BindingType` -- New function `*ServicesClientStopPoller.ResumeToken() (string, error)` -- New function `*APIPortalCustomDomainsClientCreateOrUpdatePoller.FinalResponse(context.Context) (APIPortalCustomDomainsClientCreateOrUpdateResponse, error)` -- New function `*GatewayCustomDomainsClientDeletePoller.Done() bool` -- New function `*GatewaysClient.BeginDelete(context.Context, string, string, string, *GatewaysClientBeginDeleteOptions) (GatewaysClientDeletePollerResponse, error)` -- New function `*CertificatesClientCreateOrUpdatePoller.FinalResponse(context.Context) (CertificatesClientCreateOrUpdateResponse, error)` -- New function `*BuildServiceClientListBuildsPager.NextPage(context.Context) bool` -- New function `*ServicesClientStartPollerResponse.Resume(context.Context, *ServicesClient, string) error` -- New function `*GatewaysClientListPager.NextPage(context.Context) bool` -- New function `*CertificatesClientListPager.Err() error` -- New function `*DeploymentsClientStartPoller.Poll(context.Context) (*http.Response, error)` -- New function `*BuildServiceBuilderClientListPager.NextPage(context.Context) bool` -- New function `*ConfigurationServicesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*APIPortalsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CustomDomainsClientDeletePoller.ResumeToken() (string, error)` -- New function `*AppsClientSetActiveDeploymentsPoller.ResumeToken() (string, error)` -- New function `*BuildpackBindingClientCreateOrUpdatePoller.Done() bool` -- New function `*StoragesClientCreateOrUpdatePollerResponse.Resume(context.Context, *StoragesClient, string) error` -- New function `*ServicesClientListPager.NextPage(context.Context) bool` -- New function `*DeploymentsClientGenerateHeapDumpPoller.Done() bool` -- New function `*SourceUploadedUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` -- New function `*DeploymentsClientGenerateThreadDumpPoller.Done() bool` -- New function `*BuildServiceClient.GetBuild(context.Context, string, string, string, string, *BuildServiceClientGetBuildOptions) (BuildServiceClientGetBuildResponse, error)` -- New function `*ConfigurationServicesClientDeletePoller.FinalResponse(context.Context) (ConfigurationServicesClientDeleteResponse, error)` -- New function `*ConfigServersClientUpdatePatchPoller.Done() bool` -- New function `CertificateProperties.MarshalJSON() ([]byte, error)` -- New function `*ServicesClientListBySubscriptionPager.Err() error` -- New function `*GatewayRouteConfigsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, GatewayRouteConfigResource, *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (GatewayRouteConfigsClientCreateOrUpdatePollerResponse, error)` -- New function `*BuildServiceClientListBuildResultsPager.Err() error` -- New function `*AppsClientDeletePoller.FinalResponse(context.Context) (AppsClientDeleteResponse, error)` -- New function `*GatewayCustomDomainsClientCreateOrUpdatePoller.FinalResponse(context.Context) (GatewayCustomDomainsClientCreateOrUpdateResponse, error)` -- New function `*AppsClientSetActiveDeploymentsPoller.Poll(context.Context) (*http.Response, error)` -- New function `*AppsClientDeletePollerResponse.Resume(context.Context, *AppsClient, string) error` -- New function `*ConfigServersClientValidatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ConfigServersClientValidatePoller.Done() bool` -- New function `*DeploymentsClientGenerateThreadDumpPoller.Poll(context.Context) (*http.Response, error)` -- New function `*GatewaysClient.BeginCreateOrUpdate(context.Context, string, string, string, GatewayResource, *GatewaysClientBeginCreateOrUpdateOptions) (GatewaysClientCreateOrUpdatePollerResponse, error)` -- New function `GatewayCustomDomainResourceCollection.MarshalJSON() ([]byte, error)` -- New function `*BuildServiceAgentPoolClientUpdatePutPoller.ResumeToken() (string, error)` -- New function `NewBuildpackBindingClient(string, azcore.TokenCredential, *arm.ClientOptions) *BuildpackBindingClient` -- New function `*DeploymentsClientStartJFRPoller.FinalResponse(context.Context) (DeploymentsClientStartJFRResponse, error)` -- New function `StoragesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (StoragesClientDeleteResponse, error)` -- New function `*APIPortalsClientDeletePoller.ResumeToken() (string, error)` -- New function `*BuildServiceAgentPoolClientUpdatePutPoller.FinalResponse(context.Context) (BuildServiceAgentPoolClientUpdatePutResponse, error)` -- New function `GatewayCustomDomainsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (GatewayCustomDomainsClientCreateOrUpdateResponse, error)` -- New function `PossibleBuildpackBindingProvisioningStateValues() []BuildpackBindingProvisioningState` -- New function `*APIPortalsClientListPager.NextPage(context.Context) bool` -- New function `*APIPortalsClientListPager.Err() error` -- New function `JarUploadedUserSourceInfo.MarshalJSON() ([]byte, error)` -- New function `*AppsClientDeletePoller.Done() bool` -- New function `*SourceUploadedUserSourceInfo.UnmarshalJSON([]byte) error` -- New function `*ServiceRegistriesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `NewAPIPortalsClient(string, azcore.TokenCredential, *arm.ClientOptions) *APIPortalsClient` -- New function `*BuildServiceBuilderClient.BeginCreateOrUpdate(context.Context, string, string, string, string, BuilderResource, *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (BuildServiceBuilderClientCreateOrUpdatePollerResponse, error)` -- New function `ConfigServersClientUpdatePutPollerResponse.PollUntilDone(context.Context, time.Duration) (ConfigServersClientUpdatePutResponse, error)` -- New function `*BuildServiceClientListBuildResultsPager.PageResponse() BuildServiceClientListBuildResultsResponse` -- New function `CertificatesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (CertificatesClientCreateOrUpdateResponse, error)` -- New function `*CertificatesClientCreateOrUpdatePoller.Done() bool` -- New function `*ConfigServersClientUpdatePutPoller.FinalResponse(context.Context) (ConfigServersClientUpdatePutResponse, error)` -- New function `*GatewayCustomDomainsClient.BeginDelete(context.Context, string, string, string, string, *GatewayCustomDomainsClientBeginDeleteOptions) (GatewayCustomDomainsClientDeletePollerResponse, error)` -- New function `*DeploymentsClientDeletePoller.FinalResponse(context.Context) (DeploymentsClientDeleteResponse, error)` -- New function `APIPortalCustomDomainResourceCollection.MarshalJSON() ([]byte, error)` -- New function `*StoragesClientCreateOrUpdatePoller.Done() bool` -- New function `DeploymentsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (DeploymentsClientDeleteResponse, error)` -- New function `*StoragesClientCreateOrUpdatePoller.FinalResponse(context.Context) (StoragesClientCreateOrUpdateResponse, error)` -- New function `*ServicesClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `PossibleBuildProvisioningStateValues() []BuildProvisioningState` -- New function `*AppsClientSetActiveDeploymentsPoller.Done() bool` -- New function `*ServicesClientDeletePoller.FinalResponse(context.Context) (ServicesClientDeleteResponse, error)` -- New function `CustomPersistentDiskProperties.MarshalJSON() ([]byte, error)` -- New function `*ServiceRegistriesClientListPager.Err() error` -- New function `*GatewaysClientCreateOrUpdatePollerResponse.Resume(context.Context, *GatewaysClient, string) error` -- New function `*BuildServiceClient.GetResourceUploadURL(context.Context, string, string, string, *BuildServiceClientGetResourceUploadURLOptions) (BuildServiceClientGetResourceUploadURLResponse, error)` -- New function `*CustomDomainsClientUpdatePoller.FinalResponse(context.Context) (CustomDomainsClientUpdateResponse, error)` -- New function `*APIPortalCustomDomainsClientListPager.Err() error` -- New function `DeploymentsClientRestartPollerResponse.PollUntilDone(context.Context, time.Duration) (DeploymentsClientRestartResponse, error)` -- New function `*GatewayRouteConfigsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*DeploymentsClientGenerateHeapDumpPoller.ResumeToken() (string, error)` -- New function `*DeploymentsClientUpdatePoller.FinalResponse(context.Context) (DeploymentsClientUpdateResponse, error)` -- New function `*APIPortalsClientCreateOrUpdatePoller.Done() bool` -- New function `*ConfigurationServicesClientCreateOrUpdatePoller.Done() bool` -- New function `*APIPortalsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CustomDomainsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*DeploymentsClientStopPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ServicesClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `ServiceRegistriesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (ServiceRegistriesClientDeleteResponse, error)` -- New function `*UploadedUserSourceInfo.UnmarshalJSON([]byte) error` -- New function `*APIPortalsClientDeletePoller.FinalResponse(context.Context) (APIPortalsClientDeleteResponse, error)` -- New function `*APIPortalCustomDomainsClientDeletePoller.ResumeToken() (string, error)` -- New function `*DeploymentsClientRestartPoller.ResumeToken() (string, error)` -- New function `*BindingsClientUpdatePoller.FinalResponse(context.Context) (BindingsClientUpdateResponse, error)` -- New function `*DeploymentsClientStopPoller.Done() bool` -- New function `*ConfigurationServicesClientListPager.PageResponse() ConfigurationServicesClientListResponse` -- New function `*NetCoreZipUploadedUserSourceInfo.GetUploadedUserSourceInfo() *UploadedUserSourceInfo` -- New function `*BindingsClientUpdatePoller.Done() bool` -- New function `*BuildServiceAgentPoolClientListPager.NextPage(context.Context) bool` -- New function `*ConfigurationServicesClientValidatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CertificatesClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `PossibleBuildResultProvisioningStateValues() []BuildResultProvisioningState` -- New function `SsoProperties.MarshalJSON() ([]byte, error)` -- New function `*ConfigurationServicesClientCreateOrUpdatePoller.FinalResponse(context.Context) (ConfigurationServicesClientCreateOrUpdateResponse, error)` -- New function `*DeploymentsClientGenerateHeapDumpPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ServicesClientStartPoller.ResumeToken() (string, error)` -- New function `*BuildServiceClientListBuildServicesPager.PageResponse() BuildServiceClientListBuildServicesResponse` -- New function `*DeploymentsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `ActiveDeploymentCollection.MarshalJSON() ([]byte, error)` -- New function `*APIPortalCustomDomainsClientDeletePoller.Done() bool` -- New function `*CustomContainerUserSourceInfo.UnmarshalJSON([]byte) error` -- New function `GatewayRouteConfigsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (GatewayRouteConfigsClientCreateOrUpdateResponse, error)` -- New function `*GatewaysClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CertificatesClientDeletePoller.ResumeToken() (string, error)` -- New function `*JarUploadedUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` -- New function `PossibleGatewayProvisioningStateValues() []GatewayProvisioningState` -- New function `*StoragesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `SourceUploadedUserSourceInfo.MarshalJSON() ([]byte, error)` -- New function `ConfigurationServicesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (ConfigurationServicesClientDeleteResponse, error)` -- New function `*DeploymentsClientRestartPoller.FinalResponse(context.Context) (DeploymentsClientRestartResponse, error)` -- New function `ConfigurationServiceGitRepository.MarshalJSON() ([]byte, error)` -- New function `*AzureFileVolume.GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties` -- New function `*ServicesClientStartPoller.Done() bool` -- New function `*StoragesClientDeletePoller.ResumeToken() (string, error)` -- New function `*ConfigurationServicesClientValidatePollerResponse.Resume(context.Context, *ConfigurationServicesClient, string) error` -- New function `*BindingsClientUpdatePoller.ResumeToken() (string, error)` -- New function `*GatewaysClient.List(string, string, *GatewaysClientListOptions) *GatewaysClientListPager` -- New function `ConfigurationServiceGitProperty.MarshalJSON() ([]byte, error)` -- New function `*JarUploadedUserSourceInfo.GetUploadedUserSourceInfo() *UploadedUserSourceInfo` -- New function `*GatewayCustomDomainsClientListPager.PageResponse() GatewayCustomDomainsClientListResponse` -- New function `*APIPortalCustomDomainsClientListPager.PageResponse() APIPortalCustomDomainsClientListResponse` -- New function `*GatewayRouteConfigsClient.BeginDelete(context.Context, string, string, string, string, *GatewayRouteConfigsClientBeginDeleteOptions) (GatewayRouteConfigsClientDeletePollerResponse, error)` -- New function `*StoragesClientDeletePoller.FinalResponse(context.Context) (StoragesClientDeleteResponse, error)` -- New function `ServicesClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (ServicesClientUpdateResponse, error)` -- New function `*ConfigurationServicesClientValidatePoller.Done() bool` -- New function `BuilderProperties.MarshalJSON() ([]byte, error)` -- New function `NewAPIPortalCustomDomainsClient(string, azcore.TokenCredential, *arm.ClientOptions) *APIPortalCustomDomainsClient` -- New function `*APIPortalsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*BuildServiceAgentPoolClientListPager.Err() error` -- New function `*OperationsClientListPager.PageResponse() OperationsClientListResponse` -- New function `*ConfigurationServicesClientDeletePoller.ResumeToken() (string, error)` -- New function `*BuildServiceClient.GetSupportedStack(context.Context, string, string, string, string, *BuildServiceClientGetSupportedStackOptions) (BuildServiceClientGetSupportedStackResponse, error)` -- New function `*ServicesClientUpdatePoller.ResumeToken() (string, error)` -- New function `*ServiceRegistriesClient.BeginCreateOrUpdate(context.Context, string, string, string, *ServiceRegistriesClientBeginCreateOrUpdateOptions) (ServiceRegistriesClientCreateOrUpdatePollerResponse, error)` -- New function `*DeploymentsClientStartPoller.FinalResponse(context.Context) (DeploymentsClientStartResponse, error)` -- New function `*ServiceRegistriesClientCreateOrUpdatePoller.FinalResponse(context.Context) (ServiceRegistriesClientCreateOrUpdateResponse, error)` -- New function `*ServicesClientStartPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ConfigurationServicesClientDeletePoller.Done() bool` -- New function `*APIPortalCustomDomainsClientDeletePoller.FinalResponse(context.Context) (APIPortalCustomDomainsClientDeleteResponse, error)` -- New function `GatewaysClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (GatewaysClientDeleteResponse, error)` -- New function `*BuildServiceClient.ListBuildResults(string, string, string, string, *BuildServiceClientListBuildResultsOptions) *BuildServiceClientListBuildResultsPager` -- New function `*MonitoringSettingsClientUpdatePatchPoller.Done() bool` -- New function `*GatewaysClientDeletePoller.ResumeToken() (string, error)` -- New function `GatewayProperties.MarshalJSON() ([]byte, error)` -- New function `*AppsClientUpdatePoller.FinalResponse(context.Context) (AppsClientUpdateResponse, error)` -- New function `*BindingsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*DeploymentsClientGenerateThreadDumpPoller.FinalResponse(context.Context) (DeploymentsClientGenerateThreadDumpResponse, error)` -- New function `*DeploymentsClientUpdatePoller.Done() bool` -- New function `*ServiceRegistriesClientListPager.NextPage(context.Context) bool` -- New function `GatewayCorsProperties.MarshalJSON() ([]byte, error)` -- New function `*ConfigurationServicesClientDeletePollerResponse.Resume(context.Context, *ConfigurationServicesClient, string) error` -- New function `*ServicesClientCreateOrUpdatePoller.Done() bool` -- New function `*ServiceRegistriesClientDeletePollerResponse.Resume(context.Context, *ServiceRegistriesClient, string) error` -- New function `*JarUploadedUserSourceInfo.UnmarshalJSON([]byte) error` -- New function `*BuildServiceClient.CreateOrUpdateBuild(context.Context, string, string, string, string, Build, *BuildServiceClientCreateOrUpdateBuildOptions) (BuildServiceClientCreateOrUpdateBuildResponse, error)` -- New function `*ServicesClientStopPoller.FinalResponse(context.Context) (ServicesClientStopResponse, error)` -- New function `GatewayProvisioningState.ToPtr() *GatewayProvisioningState` -- New function `*APIPortalsClient.ValidateDomain(context.Context, string, string, string, CustomDomainValidatePayload, *APIPortalsClientValidateDomainOptions) (APIPortalsClientValidateDomainResponse, error)` -- New function `*CustomDomainsClientCreateOrUpdatePoller.Done() bool` -- New function `*GatewaysClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*BuildServiceAgentPoolClient.BeginUpdatePut(context.Context, string, string, string, string, BuildServiceAgentPoolResource, *BuildServiceAgentPoolClientBeginUpdatePutOptions) (BuildServiceAgentPoolClientUpdatePutPollerResponse, error)` -- New function `*BuildServiceClientListBuildResultsPager.NextPage(context.Context) bool` -- New function `*BuildpackBindingClientDeletePoller.ResumeToken() (string, error)` -- New function `*SKUsClientListPager.NextPage(context.Context) bool` -- New function `*APIPortalCustomDomainsClientCreateOrUpdatePollerResponse.Resume(context.Context, *APIPortalCustomDomainsClient, string) error` -- New function `*ConfigurationServicesClientValidatePoller.ResumeToken() (string, error)` -- New function `*CustomDomainsClientCreateOrUpdatePoller.FinalResponse(context.Context) (CustomDomainsClientCreateOrUpdateResponse, error)` -- New function `ConfigurationServiceResourceCollection.MarshalJSON() ([]byte, error)` -- New function `*APIPortalCustomDomainsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*APIPortalsClientCreateOrUpdatePollerResponse.Resume(context.Context, *APIPortalsClient, string) error` -- New function `*DeploymentsClientDeletePoller.Done() bool` -- New function `*StoragesClientDeletePoller.Done() bool` -- New function `*BuildServiceClientListBuildServicesPager.Err() error` -- New function `*BindingsClientListPager.PageResponse() BindingsClientListResponse` -- New function `*ServicesClientStopPoller.Poll(context.Context) (*http.Response, error)` -- New function `ConfigurationServiceGitPropertyValidateResult.MarshalJSON() ([]byte, error)` -- New function `*CertificatesClientDeletePoller.FinalResponse(context.Context) (CertificatesClientDeleteResponse, error)` -- New function `ServiceRegistriesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (ServiceRegistriesClientCreateOrUpdateResponse, error)` -- New function `*BindingsClientDeletePollerResponse.Resume(context.Context, *BindingsClient, string) error` -- New function `PossibleBuildServiceProvisioningStateValues() []BuildServiceProvisioningState` -- New function `*DeploymentsClientListForClusterPager.PageResponse() DeploymentsClientListForClusterResponse` -- New function `*MonitoringSettingsClientUpdatePatchPollerResponse.Resume(context.Context, *MonitoringSettingsClient, string) error` -- New function `*APIPortalCustomDomainsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, APIPortalCustomDomainResource, *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (APIPortalCustomDomainsClientCreateOrUpdatePollerResponse, error)` -- New function `*GatewayRouteConfigsClientDeletePoller.ResumeToken() (string, error)` -- New function `*AppsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*OperationsClientListPager.NextPage(context.Context) bool` -- New function `BuildResultProperties.MarshalJSON() ([]byte, error)` -- New function `*CertificatesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*GatewaysClientDeletePoller.Done() bool` -- New function `NetCoreZipUploadedUserSourceInfo.MarshalJSON() ([]byte, error)` -- New function `ServiceRegistryProperties.MarshalJSON() ([]byte, error)` -- New function `AppsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (AppsClientCreateOrUpdateResponse, error)` -- New function `*GatewayCustomDomainsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*ConfigServersClientValidatePoller.FinalResponse(context.Context) (ConfigServersClientValidateResponse, error)` -- New function `*BuildpackBindingClientListPager.NextPage(context.Context) bool` -- New function `*BuildServiceBuilderClientDeletePollerResponse.Resume(context.Context, *BuildServiceBuilderClient, string) error` -- New function `*BuildServiceClient.ListSupportedStacks(context.Context, string, string, string, *BuildServiceClientListSupportedStacksOptions) (BuildServiceClientListSupportedStacksResponse, error)` -- New function `*BindingsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*BuildpackBindingClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `PossibleLastModifiedByTypeValues() []LastModifiedByType` -- New function `*CustomDomainsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `APIPortalCustomDomainsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (APIPortalCustomDomainsClientCreateOrUpdateResponse, error)` -- New function `*GatewaysClientCreateOrUpdatePoller.FinalResponse(context.Context) (GatewaysClientCreateOrUpdateResponse, error)` -- New function `*BindingsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ServicesClientListPager.PageResponse() ServicesClientListResponse` -- New function `*GatewayRouteConfigsClientListPager.NextPage(context.Context) bool` -- New function `*ServiceRegistriesClient.BeginDelete(context.Context, string, string, string, *ServiceRegistriesClientBeginDeleteOptions) (ServiceRegistriesClientDeletePollerResponse, error)` -- New function `APIPortalProperties.MarshalJSON() ([]byte, error)` -- New function `ConfigServersClientValidatePollerResponse.PollUntilDone(context.Context, time.Duration) (ConfigServersClientValidateResponse, error)` -- New function `*DeploymentsClientStopPollerResponse.Resume(context.Context, *DeploymentsClient, string) error` -- New function `NewGatewayRouteConfigsClient(string, azcore.TokenCredential, *arm.ClientOptions) *GatewayRouteConfigsClient` -- New function `*UploadedUserSourceInfo.GetUploadedUserSourceInfo() *UploadedUserSourceInfo` -- New function `*ConfigurationServicesClient.List(string, string, *ConfigurationServicesClientListOptions) *ConfigurationServicesClientListPager` -- New function `*DeploymentsClientListPager.Err() error` -- New function `*ConfigServersClientUpdatePutPoller.Done() bool` -- New function `*ServicesClientCreateOrUpdatePollerResponse.Resume(context.Context, *ServicesClient, string) error` -- New function `BuildResultProvisioningState.ToPtr() *BuildResultProvisioningState` -- New function `*DeploymentsClientStartJFRPoller.ResumeToken() (string, error)` -- New function `ValidationMessages.MarshalJSON() ([]byte, error)` -- New function `DeploymentsClientStartPollerResponse.PollUntilDone(context.Context, time.Duration) (DeploymentsClientStartResponse, error)` -- New function `*BuildpackBindingClientCreateOrUpdatePoller.FinalResponse(context.Context) (BuildpackBindingClientCreateOrUpdateResponse, error)` -- New function `ServicesClientStartPollerResponse.PollUntilDone(context.Context, time.Duration) (ServicesClientStartResponse, error)` -- New function `APIPortalsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (APIPortalsClientCreateOrUpdateResponse, error)` -- New function `DeploymentsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (DeploymentsClientCreateOrUpdateResponse, error)` -- New function `*GatewayRouteConfigsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*StoragesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*BindingsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*BuildServiceAgentPoolClientUpdatePutPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ConfigurationServicesClient.BeginCreateOrUpdate(context.Context, string, string, string, ConfigurationServiceResource, *ConfigurationServicesClientBeginCreateOrUpdateOptions) (ConfigurationServicesClientCreateOrUpdatePollerResponse, error)` -- New function `*ServicesClientUpdatePoller.Done() bool` -- New function `BuildServiceProvisioningState.ToPtr() *BuildServiceProvisioningState` -- New function `PossibleBuilderProvisioningStateValues() []BuilderProvisioningState` -- New function `*ServicesClientListPager.Err() error` -- New function `NewConfigurationServicesClient(string, azcore.TokenCredential, *arm.ClientOptions) *ConfigurationServicesClient` -- New function `*CustomDomainsClientListPager.NextPage(context.Context) bool` -- New function `*BindingsClientDeletePoller.ResumeToken() (string, error)` -- New function `*StoragesClientListPager.Err() error` -- New function `BuildpackBindingResourceCollection.MarshalJSON() ([]byte, error)` -- New function `*AppsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `BindingType.ToPtr() *BindingType` -- New function `*ServicesClientDeletePoller.ResumeToken() (string, error)` -- New function `*BuildServiceBuilderClient.List(string, string, string, *BuildServiceBuilderClientListOptions) *BuildServiceBuilderClientListPager` -- New struct `APIPortalCustomDomainProperties` -- New struct `APIPortalCustomDomainResource` -- New struct `APIPortalCustomDomainResourceCollection` -- New struct `APIPortalCustomDomainsClient` -- New struct `APIPortalCustomDomainsClientBeginCreateOrUpdateOptions` -- New struct `APIPortalCustomDomainsClientBeginDeleteOptions` -- New struct `APIPortalCustomDomainsClientCreateOrUpdatePoller` -- New struct `APIPortalCustomDomainsClientCreateOrUpdatePollerResponse` -- New struct `APIPortalCustomDomainsClientCreateOrUpdateResponse` -- New struct `APIPortalCustomDomainsClientCreateOrUpdateResult` -- New struct `APIPortalCustomDomainsClientDeletePoller` -- New struct `APIPortalCustomDomainsClientDeletePollerResponse` -- New struct `APIPortalCustomDomainsClientDeleteResponse` -- New struct `APIPortalCustomDomainsClientGetOptions` -- New struct `APIPortalCustomDomainsClientGetResponse` -- New struct `APIPortalCustomDomainsClientGetResult` -- New struct `APIPortalCustomDomainsClientListOptions` -- New struct `APIPortalCustomDomainsClientListPager` -- New struct `APIPortalCustomDomainsClientListResponse` -- New struct `APIPortalCustomDomainsClientListResult` -- New struct `APIPortalInstance` -- New struct `APIPortalProperties` -- New struct `APIPortalResource` -- New struct `APIPortalResourceCollection` -- New struct `APIPortalResourceRequests` -- New struct `APIPortalsClient` -- New struct `APIPortalsClientBeginCreateOrUpdateOptions` -- New struct `APIPortalsClientBeginDeleteOptions` -- New struct `APIPortalsClientCreateOrUpdatePoller` -- New struct `APIPortalsClientCreateOrUpdatePollerResponse` -- New struct `APIPortalsClientCreateOrUpdateResponse` -- New struct `APIPortalsClientCreateOrUpdateResult` -- New struct `APIPortalsClientDeletePoller` -- New struct `APIPortalsClientDeletePollerResponse` -- New struct `APIPortalsClientDeleteResponse` -- New struct `APIPortalsClientGetOptions` -- New struct `APIPortalsClientGetResponse` -- New struct `APIPortalsClientGetResult` -- New struct `APIPortalsClientListOptions` -- New struct `APIPortalsClientListPager` -- New struct `APIPortalsClientListResponse` -- New struct `APIPortalsClientListResult` -- New struct `APIPortalsClientValidateDomainOptions` -- New struct `APIPortalsClientValidateDomainResponse` -- New struct `APIPortalsClientValidateDomainResult` -- New struct `ActiveDeploymentCollection` -- New struct `AppsClientBeginCreateOrUpdateOptions` -- New struct `AppsClientBeginDeleteOptions` -- New struct `AppsClientBeginSetActiveDeploymentsOptions` -- New struct `AppsClientBeginUpdateOptions` -- New struct `AppsClientCreateOrUpdatePoller` -- New struct `AppsClientCreateOrUpdatePollerResponse` -- New struct `AppsClientCreateOrUpdateResponse` -- New struct `AppsClientCreateOrUpdateResult` -- New struct `AppsClientDeletePoller` -- New struct `AppsClientDeletePollerResponse` -- New struct `AppsClientDeleteResponse` -- New struct `AppsClientGetOptions` -- New struct `AppsClientGetResourceUploadURLOptions` -- New struct `AppsClientGetResourceUploadURLResponse` -- New struct `AppsClientGetResourceUploadURLResult` -- New struct `AppsClientGetResponse` -- New struct `AppsClientGetResult` -- New struct `AppsClientListOptions` -- New struct `AppsClientListPager` -- New struct `AppsClientListResponse` -- New struct `AppsClientListResult` -- New struct `AppsClientSetActiveDeploymentsPoller` -- New struct `AppsClientSetActiveDeploymentsPollerResponse` -- New struct `AppsClientSetActiveDeploymentsResponse` -- New struct `AppsClientSetActiveDeploymentsResult` -- New struct `AppsClientUpdatePoller` -- New struct `AppsClientUpdatePollerResponse` -- New struct `AppsClientUpdateResponse` -- New struct `AppsClientUpdateResult` -- New struct `AppsClientValidateDomainOptions` -- New struct `AppsClientValidateDomainResponse` -- New struct `AppsClientValidateDomainResult` -- New struct `BindingsClientBeginCreateOrUpdateOptions` -- New struct `BindingsClientBeginDeleteOptions` -- New struct `BindingsClientBeginUpdateOptions` -- New struct `BindingsClientCreateOrUpdatePoller` -- New struct `BindingsClientCreateOrUpdatePollerResponse` -- New struct `BindingsClientCreateOrUpdateResponse` -- New struct `BindingsClientCreateOrUpdateResult` -- New struct `BindingsClientDeletePoller` -- New struct `BindingsClientDeletePollerResponse` -- New struct `BindingsClientDeleteResponse` -- New struct `BindingsClientGetOptions` -- New struct `BindingsClientGetResponse` -- New struct `BindingsClientGetResult` -- New struct `BindingsClientListOptions` -- New struct `BindingsClientListPager` -- New struct `BindingsClientListResponse` -- New struct `BindingsClientListResult` -- New struct `BindingsClientUpdatePoller` -- New struct `BindingsClientUpdatePollerResponse` -- New struct `BindingsClientUpdateResponse` -- New struct `BindingsClientUpdateResult` -- New struct `Build` -- New struct `BuildCollection` -- New struct `BuildProperties` -- New struct `BuildResult` -- New struct `BuildResultCollection` -- New struct `BuildResultLog` -- New struct `BuildResultProperties` -- New struct `BuildResultUserSourceInfo` -- New struct `BuildService` -- New struct `BuildServiceAgentPoolClient` -- New struct `BuildServiceAgentPoolClientBeginUpdatePutOptions` -- New struct `BuildServiceAgentPoolClientGetOptions` -- New struct `BuildServiceAgentPoolClientGetResponse` -- New struct `BuildServiceAgentPoolClientGetResult` -- New struct `BuildServiceAgentPoolClientListOptions` -- New struct `BuildServiceAgentPoolClientListPager` -- New struct `BuildServiceAgentPoolClientListResponse` -- New struct `BuildServiceAgentPoolClientListResult` -- New struct `BuildServiceAgentPoolClientUpdatePutPoller` -- New struct `BuildServiceAgentPoolClientUpdatePutPollerResponse` -- New struct `BuildServiceAgentPoolClientUpdatePutResponse` -- New struct `BuildServiceAgentPoolClientUpdatePutResult` -- New struct `BuildServiceAgentPoolProperties` -- New struct `BuildServiceAgentPoolResource` -- New struct `BuildServiceAgentPoolResourceCollection` -- New struct `BuildServiceAgentPoolSizeProperties` -- New struct `BuildServiceBuilderClient` -- New struct `BuildServiceBuilderClientBeginCreateOrUpdateOptions` -- New struct `BuildServiceBuilderClientBeginDeleteOptions` -- New struct `BuildServiceBuilderClientCreateOrUpdatePoller` -- New struct `BuildServiceBuilderClientCreateOrUpdatePollerResponse` -- New struct `BuildServiceBuilderClientCreateOrUpdateResponse` -- New struct `BuildServiceBuilderClientCreateOrUpdateResult` -- New struct `BuildServiceBuilderClientDeletePoller` -- New struct `BuildServiceBuilderClientDeletePollerResponse` -- New struct `BuildServiceBuilderClientDeleteResponse` -- New struct `BuildServiceBuilderClientGetOptions` -- New struct `BuildServiceBuilderClientGetResponse` -- New struct `BuildServiceBuilderClientGetResult` -- New struct `BuildServiceBuilderClientListOptions` -- New struct `BuildServiceBuilderClientListPager` -- New struct `BuildServiceBuilderClientListResponse` -- New struct `BuildServiceBuilderClientListResult` -- New struct `BuildServiceClient` -- New struct `BuildServiceClientCreateOrUpdateBuildOptions` -- New struct `BuildServiceClientCreateOrUpdateBuildResponse` -- New struct `BuildServiceClientCreateOrUpdateBuildResult` -- New struct `BuildServiceClientGetBuildOptions` -- New struct `BuildServiceClientGetBuildResponse` -- New struct `BuildServiceClientGetBuildResult` -- New struct `BuildServiceClientGetBuildResultLogOptions` -- New struct `BuildServiceClientGetBuildResultLogResponse` -- New struct `BuildServiceClientGetBuildResultLogResult` -- New struct `BuildServiceClientGetBuildResultOptions` -- New struct `BuildServiceClientGetBuildResultResponse` -- New struct `BuildServiceClientGetBuildResultResult` -- New struct `BuildServiceClientGetBuildServiceOptions` -- New struct `BuildServiceClientGetBuildServiceResponse` -- New struct `BuildServiceClientGetBuildServiceResult` -- New struct `BuildServiceClientGetResourceUploadURLOptions` -- New struct `BuildServiceClientGetResourceUploadURLResponse` -- New struct `BuildServiceClientGetResourceUploadURLResult` -- New struct `BuildServiceClientGetSupportedBuildpackOptions` -- New struct `BuildServiceClientGetSupportedBuildpackResponse` -- New struct `BuildServiceClientGetSupportedBuildpackResult` -- New struct `BuildServiceClientGetSupportedStackOptions` -- New struct `BuildServiceClientGetSupportedStackResponse` -- New struct `BuildServiceClientGetSupportedStackResult` -- New struct `BuildServiceClientListBuildResultsOptions` -- New struct `BuildServiceClientListBuildResultsPager` -- New struct `BuildServiceClientListBuildResultsResponse` -- New struct `BuildServiceClientListBuildResultsResult` -- New struct `BuildServiceClientListBuildServicesOptions` -- New struct `BuildServiceClientListBuildServicesPager` -- New struct `BuildServiceClientListBuildServicesResponse` -- New struct `BuildServiceClientListBuildServicesResult` -- New struct `BuildServiceClientListBuildsOptions` -- New struct `BuildServiceClientListBuildsPager` -- New struct `BuildServiceClientListBuildsResponse` -- New struct `BuildServiceClientListBuildsResult` -- New struct `BuildServiceClientListSupportedBuildpacksOptions` -- New struct `BuildServiceClientListSupportedBuildpacksResponse` -- New struct `BuildServiceClientListSupportedBuildpacksResult` -- New struct `BuildServiceClientListSupportedStacksOptions` -- New struct `BuildServiceClientListSupportedStacksResponse` -- New struct `BuildServiceClientListSupportedStacksResult` -- New struct `BuildServiceCollection` -- New struct `BuildServiceProperties` -- New struct `BuildServicePropertiesResourceRequests` -- New struct `BuildStageProperties` -- New struct `BuilderProperties` -- New struct `BuilderResource` -- New struct `BuilderResourceCollection` -- New struct `BuildpackBindingClient` -- New struct `BuildpackBindingClientBeginCreateOrUpdateOptions` -- New struct `BuildpackBindingClientBeginDeleteOptions` -- New struct `BuildpackBindingClientCreateOrUpdatePoller` -- New struct `BuildpackBindingClientCreateOrUpdatePollerResponse` -- New struct `BuildpackBindingClientCreateOrUpdateResponse` -- New struct `BuildpackBindingClientCreateOrUpdateResult` -- New struct `BuildpackBindingClientDeletePoller` -- New struct `BuildpackBindingClientDeletePollerResponse` -- New struct `BuildpackBindingClientDeleteResponse` -- New struct `BuildpackBindingClientGetOptions` -- New struct `BuildpackBindingClientGetResponse` -- New struct `BuildpackBindingClientGetResult` -- New struct `BuildpackBindingClientListOptions` -- New struct `BuildpackBindingClientListPager` -- New struct `BuildpackBindingClientListResponse` -- New struct `BuildpackBindingClientListResult` -- New struct `BuildpackBindingLaunchProperties` -- New struct `BuildpackBindingProperties` -- New struct `BuildpackBindingResource` -- New struct `BuildpackBindingResourceCollection` -- New struct `BuildpackProperties` -- New struct `BuildpacksGroupProperties` -- New struct `CertificatesClientBeginCreateOrUpdateOptions` -- New struct `CertificatesClientBeginDeleteOptions` -- New struct `CertificatesClientCreateOrUpdatePoller` -- New struct `CertificatesClientCreateOrUpdatePollerResponse` -- New struct `CertificatesClientCreateOrUpdateResponse` -- New struct `CertificatesClientCreateOrUpdateResult` -- New struct `CertificatesClientDeletePoller` -- New struct `CertificatesClientDeletePollerResponse` -- New struct `CertificatesClientDeleteResponse` -- New struct `CertificatesClientGetOptions` -- New struct `CertificatesClientGetResponse` -- New struct `CertificatesClientGetResult` -- New struct `CertificatesClientListOptions` -- New struct `CertificatesClientListPager` -- New struct `CertificatesClientListResponse` -- New struct `CertificatesClientListResult` -- New struct `ConfigServersClientBeginUpdatePatchOptions` -- New struct `ConfigServersClientBeginUpdatePutOptions` -- New struct `ConfigServersClientBeginValidateOptions` -- New struct `ConfigServersClientGetOptions` -- New struct `ConfigServersClientGetResponse` -- New struct `ConfigServersClientGetResult` -- New struct `ConfigServersClientUpdatePatchPoller` -- New struct `ConfigServersClientUpdatePatchPollerResponse` -- New struct `ConfigServersClientUpdatePatchResponse` -- New struct `ConfigServersClientUpdatePatchResult` -- New struct `ConfigServersClientUpdatePutPoller` -- New struct `ConfigServersClientUpdatePutPollerResponse` -- New struct `ConfigServersClientUpdatePutResponse` -- New struct `ConfigServersClientUpdatePutResult` -- New struct `ConfigServersClientValidatePoller` -- New struct `ConfigServersClientValidatePollerResponse` -- New struct `ConfigServersClientValidateResponse` -- New struct `ConfigServersClientValidateResult` -- New struct `ConfigurationServiceGitProperty` -- New struct `ConfigurationServiceGitPropertyValidateResult` -- New struct `ConfigurationServiceGitRepository` -- New struct `ConfigurationServiceInstance` -- New struct `ConfigurationServiceProperties` -- New struct `ConfigurationServiceResource` -- New struct `ConfigurationServiceResourceCollection` -- New struct `ConfigurationServiceResourceRequests` -- New struct `ConfigurationServiceSettings` -- New struct `ConfigurationServiceSettingsValidateResult` -- New struct `ConfigurationServicesClient` -- New struct `ConfigurationServicesClientBeginCreateOrUpdateOptions` -- New struct `ConfigurationServicesClientBeginDeleteOptions` -- New struct `ConfigurationServicesClientBeginValidateOptions` -- New struct `ConfigurationServicesClientCreateOrUpdatePoller` -- New struct `ConfigurationServicesClientCreateOrUpdatePollerResponse` -- New struct `ConfigurationServicesClientCreateOrUpdateResponse` -- New struct `ConfigurationServicesClientCreateOrUpdateResult` -- New struct `ConfigurationServicesClientDeletePoller` -- New struct `ConfigurationServicesClientDeletePollerResponse` -- New struct `ConfigurationServicesClientDeleteResponse` -- New struct `ConfigurationServicesClientGetOptions` -- New struct `ConfigurationServicesClientGetResponse` -- New struct `ConfigurationServicesClientGetResult` -- New struct `ConfigurationServicesClientListOptions` -- New struct `ConfigurationServicesClientListPager` -- New struct `ConfigurationServicesClientListResponse` -- New struct `ConfigurationServicesClientListResult` -- New struct `ConfigurationServicesClientValidatePoller` -- New struct `ConfigurationServicesClientValidatePollerResponse` -- New struct `ConfigurationServicesClientValidateResponse` -- New struct `ConfigurationServicesClientValidateResult` -- New struct `ContainerProbeSettings` -- New struct `CustomContainerUserSourceInfo` -- New struct `CustomDomainsClientBeginCreateOrUpdateOptions` -- New struct `CustomDomainsClientBeginDeleteOptions` -- New struct `CustomDomainsClientBeginUpdateOptions` -- New struct `CustomDomainsClientCreateOrUpdatePoller` -- New struct `CustomDomainsClientCreateOrUpdatePollerResponse` -- New struct `CustomDomainsClientCreateOrUpdateResponse` -- New struct `CustomDomainsClientCreateOrUpdateResult` -- New struct `CustomDomainsClientDeletePoller` -- New struct `CustomDomainsClientDeletePollerResponse` -- New struct `CustomDomainsClientDeleteResponse` -- New struct `CustomDomainsClientGetOptions` -- New struct `CustomDomainsClientGetResponse` -- New struct `CustomDomainsClientGetResult` -- New struct `CustomDomainsClientListOptions` -- New struct `CustomDomainsClientListPager` -- New struct `CustomDomainsClientListResponse` -- New struct `CustomDomainsClientListResult` -- New struct `CustomDomainsClientUpdatePoller` -- New struct `CustomDomainsClientUpdatePollerResponse` -- New struct `CustomDomainsClientUpdateResponse` -- New struct `CustomDomainsClientUpdateResult` -- New struct `DeploymentsClientBeginCreateOrUpdateOptions` -- New struct `DeploymentsClientBeginDeleteOptions` -- New struct `DeploymentsClientBeginGenerateHeapDumpOptions` -- New struct `DeploymentsClientBeginGenerateThreadDumpOptions` -- New struct `DeploymentsClientBeginRestartOptions` -- New struct `DeploymentsClientBeginStartJFROptions` -- New struct `DeploymentsClientBeginStartOptions` -- New struct `DeploymentsClientBeginStopOptions` -- New struct `DeploymentsClientBeginUpdateOptions` -- New struct `DeploymentsClientCreateOrUpdatePoller` -- New struct `DeploymentsClientCreateOrUpdatePollerResponse` -- New struct `DeploymentsClientCreateOrUpdateResponse` -- New struct `DeploymentsClientCreateOrUpdateResult` -- New struct `DeploymentsClientDeletePoller` -- New struct `DeploymentsClientDeletePollerResponse` -- New struct `DeploymentsClientDeleteResponse` -- New struct `DeploymentsClientGenerateHeapDumpPoller` -- New struct `DeploymentsClientGenerateHeapDumpPollerResponse` -- New struct `DeploymentsClientGenerateHeapDumpResponse` -- New struct `DeploymentsClientGenerateThreadDumpPoller` -- New struct `DeploymentsClientGenerateThreadDumpPollerResponse` -- New struct `DeploymentsClientGenerateThreadDumpResponse` -- New struct `DeploymentsClientGetLogFileURLOptions` -- New struct `DeploymentsClientGetLogFileURLResponse` -- New struct `DeploymentsClientGetLogFileURLResult` -- New struct `DeploymentsClientGetOptions` -- New struct `DeploymentsClientGetResponse` -- New struct `DeploymentsClientGetResult` -- New struct `DeploymentsClientListForClusterOptions` -- New struct `DeploymentsClientListForClusterPager` -- New struct `DeploymentsClientListForClusterResponse` -- New struct `DeploymentsClientListForClusterResult` -- New struct `DeploymentsClientListOptions` -- New struct `DeploymentsClientListPager` -- New struct `DeploymentsClientListResponse` -- New struct `DeploymentsClientListResult` -- New struct `DeploymentsClientRestartPoller` -- New struct `DeploymentsClientRestartPollerResponse` -- New struct `DeploymentsClientRestartResponse` -- New struct `DeploymentsClientStartJFRPoller` -- New struct `DeploymentsClientStartJFRPollerResponse` -- New struct `DeploymentsClientStartJFRResponse` -- New struct `DeploymentsClientStartPoller` -- New struct `DeploymentsClientStartPollerResponse` -- New struct `DeploymentsClientStartResponse` -- New struct `DeploymentsClientStopPoller` -- New struct `DeploymentsClientStopPollerResponse` -- New struct `DeploymentsClientStopResponse` -- New struct `DeploymentsClientUpdatePoller` -- New struct `DeploymentsClientUpdatePollerResponse` -- New struct `DeploymentsClientUpdateResponse` -- New struct `DeploymentsClientUpdateResult` -- New struct `GatewayAPIMetadataProperties` -- New struct `GatewayAPIRoute` -- New struct `GatewayCorsProperties` -- New struct `GatewayCustomDomainProperties` -- New struct `GatewayCustomDomainResource` -- New struct `GatewayCustomDomainResourceCollection` -- New struct `GatewayCustomDomainsClient` -- New struct `GatewayCustomDomainsClientBeginCreateOrUpdateOptions` -- New struct `GatewayCustomDomainsClientBeginDeleteOptions` -- New struct `GatewayCustomDomainsClientCreateOrUpdatePoller` -- New struct `GatewayCustomDomainsClientCreateOrUpdatePollerResponse` -- New struct `GatewayCustomDomainsClientCreateOrUpdateResponse` -- New struct `GatewayCustomDomainsClientCreateOrUpdateResult` -- New struct `GatewayCustomDomainsClientDeletePoller` -- New struct `GatewayCustomDomainsClientDeletePollerResponse` -- New struct `GatewayCustomDomainsClientDeleteResponse` -- New struct `GatewayCustomDomainsClientGetOptions` -- New struct `GatewayCustomDomainsClientGetResponse` -- New struct `GatewayCustomDomainsClientGetResult` -- New struct `GatewayCustomDomainsClientListOptions` -- New struct `GatewayCustomDomainsClientListPager` -- New struct `GatewayCustomDomainsClientListResponse` -- New struct `GatewayCustomDomainsClientListResult` -- New struct `GatewayInstance` -- New struct `GatewayOperatorProperties` -- New struct `GatewayOperatorResourceRequests` -- New struct `GatewayProperties` -- New struct `GatewayResource` -- New struct `GatewayResourceCollection` -- New struct `GatewayResourceRequests` -- New struct `GatewayRouteConfigProperties` -- New struct `GatewayRouteConfigResource` -- New struct `GatewayRouteConfigResourceCollection` -- New struct `GatewayRouteConfigsClient` -- New struct `GatewayRouteConfigsClientBeginCreateOrUpdateOptions` -- New struct `GatewayRouteConfigsClientBeginDeleteOptions` -- New struct `GatewayRouteConfigsClientCreateOrUpdatePoller` -- New struct `GatewayRouteConfigsClientCreateOrUpdatePollerResponse` -- New struct `GatewayRouteConfigsClientCreateOrUpdateResponse` -- New struct `GatewayRouteConfigsClientCreateOrUpdateResult` -- New struct `GatewayRouteConfigsClientDeletePoller` -- New struct `GatewayRouteConfigsClientDeletePollerResponse` -- New struct `GatewayRouteConfigsClientDeleteResponse` -- New struct `GatewayRouteConfigsClientGetOptions` -- New struct `GatewayRouteConfigsClientGetResponse` -- New struct `GatewayRouteConfigsClientGetResult` -- New struct `GatewayRouteConfigsClientListOptions` -- New struct `GatewayRouteConfigsClientListPager` -- New struct `GatewayRouteConfigsClientListResponse` -- New struct `GatewayRouteConfigsClientListResult` -- New struct `GatewaysClient` -- New struct `GatewaysClientBeginCreateOrUpdateOptions` -- New struct `GatewaysClientBeginDeleteOptions` -- New struct `GatewaysClientCreateOrUpdatePoller` -- New struct `GatewaysClientCreateOrUpdatePollerResponse` -- New struct `GatewaysClientCreateOrUpdateResponse` -- New struct `GatewaysClientCreateOrUpdateResult` -- New struct `GatewaysClientDeletePoller` -- New struct `GatewaysClientDeletePollerResponse` -- New struct `GatewaysClientDeleteResponse` -- New struct `GatewaysClientGetOptions` -- New struct `GatewaysClientGetResponse` -- New struct `GatewaysClientGetResult` -- New struct `GatewaysClientListOptions` -- New struct `GatewaysClientListPager` -- New struct `GatewaysClientListResponse` -- New struct `GatewaysClientListResult` -- New struct `GatewaysClientValidateDomainOptions` -- New struct `GatewaysClientValidateDomainResponse` -- New struct `GatewaysClientValidateDomainResult` -- New struct `JarUploadedUserSourceInfo` -- New struct `MonitoringSettingsClientBeginUpdatePatchOptions` -- New struct `MonitoringSettingsClientBeginUpdatePutOptions` -- New struct `MonitoringSettingsClientGetOptions` -- New struct `MonitoringSettingsClientGetResponse` -- New struct `MonitoringSettingsClientGetResult` -- New struct `MonitoringSettingsClientUpdatePatchPoller` -- New struct `MonitoringSettingsClientUpdatePatchPollerResponse` -- New struct `MonitoringSettingsClientUpdatePatchResponse` -- New struct `MonitoringSettingsClientUpdatePatchResult` -- New struct `MonitoringSettingsClientUpdatePutPoller` -- New struct `MonitoringSettingsClientUpdatePutPollerResponse` -- New struct `MonitoringSettingsClientUpdatePutResponse` -- New struct `MonitoringSettingsClientUpdatePutResult` -- New struct `NetCoreZipUploadedUserSourceInfo` -- New struct `OperationsClientListOptions` -- New struct `OperationsClientListPager` -- New struct `OperationsClientListResponse` -- New struct `OperationsClientListResult` -- New struct `RuntimeVersionsClientListRuntimeVersionsOptions` -- New struct `RuntimeVersionsClientListRuntimeVersionsResponse` -- New struct `RuntimeVersionsClientListRuntimeVersionsResult` -- New struct `SKUsClientListOptions` -- New struct `SKUsClientListPager` -- New struct `SKUsClientListResponse` -- New struct `SKUsClientListResult` -- New struct `ServiceRegistriesClient` -- New struct `ServiceRegistriesClientBeginCreateOrUpdateOptions` -- New struct `ServiceRegistriesClientBeginDeleteOptions` -- New struct `ServiceRegistriesClientCreateOrUpdatePoller` -- New struct `ServiceRegistriesClientCreateOrUpdatePollerResponse` -- New struct `ServiceRegistriesClientCreateOrUpdateResponse` -- New struct `ServiceRegistriesClientCreateOrUpdateResult` -- New struct `ServiceRegistriesClientDeletePoller` -- New struct `ServiceRegistriesClientDeletePollerResponse` -- New struct `ServiceRegistriesClientDeleteResponse` -- New struct `ServiceRegistriesClientGetOptions` -- New struct `ServiceRegistriesClientGetResponse` -- New struct `ServiceRegistriesClientGetResult` -- New struct `ServiceRegistriesClientListOptions` -- New struct `ServiceRegistriesClientListPager` -- New struct `ServiceRegistriesClientListResponse` -- New struct `ServiceRegistriesClientListResult` -- New struct `ServiceRegistryInstance` -- New struct `ServiceRegistryProperties` -- New struct `ServiceRegistryResource` -- New struct `ServiceRegistryResourceCollection` -- New struct `ServiceRegistryResourceRequests` -- New struct `ServicesClientBeginCreateOrUpdateOptions` -- New struct `ServicesClientBeginDeleteOptions` -- New struct `ServicesClientBeginStartOptions` -- New struct `ServicesClientBeginStopOptions` -- New struct `ServicesClientBeginUpdateOptions` -- New struct `ServicesClientCheckNameAvailabilityOptions` -- New struct `ServicesClientCheckNameAvailabilityResponse` -- New struct `ServicesClientCheckNameAvailabilityResult` -- New struct `ServicesClientCreateOrUpdatePoller` -- New struct `ServicesClientCreateOrUpdatePollerResponse` -- New struct `ServicesClientCreateOrUpdateResponse` -- New struct `ServicesClientCreateOrUpdateResult` -- New struct `ServicesClientDeletePoller` -- New struct `ServicesClientDeletePollerResponse` -- New struct `ServicesClientDeleteResponse` -- New struct `ServicesClientDisableTestEndpointOptions` -- New struct `ServicesClientDisableTestEndpointResponse` -- New struct `ServicesClientEnableTestEndpointOptions` -- New struct `ServicesClientEnableTestEndpointResponse` -- New struct `ServicesClientEnableTestEndpointResult` -- New struct `ServicesClientGetOptions` -- New struct `ServicesClientGetResponse` -- New struct `ServicesClientGetResult` -- New struct `ServicesClientListBySubscriptionOptions` -- New struct `ServicesClientListBySubscriptionPager` -- New struct `ServicesClientListBySubscriptionResponse` -- New struct `ServicesClientListBySubscriptionResult` -- New struct `ServicesClientListOptions` -- New struct `ServicesClientListPager` -- New struct `ServicesClientListResponse` -- New struct `ServicesClientListResult` -- New struct `ServicesClientListTestKeysOptions` -- New struct `ServicesClientListTestKeysResponse` -- New struct `ServicesClientListTestKeysResult` -- New struct `ServicesClientRegenerateTestKeyOptions` -- New struct `ServicesClientRegenerateTestKeyResponse` -- New struct `ServicesClientRegenerateTestKeyResult` -- New struct `ServicesClientStartPoller` -- New struct `ServicesClientStartPollerResponse` -- New struct `ServicesClientStartResponse` -- New struct `ServicesClientStopPoller` -- New struct `ServicesClientStopPollerResponse` -- New struct `ServicesClientStopResponse` -- New struct `ServicesClientUpdatePoller` -- New struct `ServicesClientUpdatePollerResponse` -- New struct `ServicesClientUpdateResponse` -- New struct `ServicesClientUpdateResult` -- New struct `SourceUploadedUserSourceInfo` -- New struct `SsoProperties` -- New struct `StackProperties` -- New struct `StoragesClientBeginCreateOrUpdateOptions` -- New struct `StoragesClientBeginDeleteOptions` -- New struct `StoragesClientCreateOrUpdatePoller` -- New struct `StoragesClientCreateOrUpdatePollerResponse` -- New struct `StoragesClientCreateOrUpdateResponse` -- New struct `StoragesClientCreateOrUpdateResult` -- New struct `StoragesClientDeletePoller` -- New struct `StoragesClientDeletePollerResponse` -- New struct `StoragesClientDeleteResponse` -- New struct `StoragesClientGetOptions` -- New struct `StoragesClientGetResponse` -- New struct `StoragesClientGetResult` -- New struct `StoragesClientListOptions` -- New struct `StoragesClientListPager` -- New struct `StoragesClientListResponse` -- New struct `StoragesClientListResult` -- New struct `SupportedBuildpackResource` -- New struct `SupportedBuildpackResourceProperties` -- New struct `SupportedBuildpacksCollection` -- New struct `SupportedStackResource` -- New struct `SupportedStackResourceProperties` -- New struct `SupportedStacksCollection` -- New struct `TriggeredBuildResult` -- New struct `UploadedUserSourceInfo` -- New struct `ValidationMessages` -- New field `SubjectName` in struct `KeyVaultCertificateProperties` -- New field `Thumbprint` in struct `KeyVaultCertificateProperties` -- New field `ActivateDate` in struct `KeyVaultCertificateProperties` -- New field `DNSNames` in struct `KeyVaultCertificateProperties` -- New field `IssuedDate` in struct `KeyVaultCertificateProperties` -- New field `Issuer` in struct `KeyVaultCertificateProperties` -- New field `Type` in struct `KeyVaultCertificateProperties` -- New field `ExpirationDate` in struct `KeyVaultCertificateProperties` -- New field `SystemData` in struct `BindingResource` -- New field `Type` in struct `BindingResource` -- New field `ID` in struct `BindingResource` -- New field `Name` in struct `BindingResource` -- New field `Zone` in struct `DeploymentInstance` -- New field `ZoneRedundant` in struct `ClusterResourceProperties` -- New field `Fqdn` in struct `ClusterResourceProperties` -- New field `Name` in struct `CustomDomainResource` -- New field `SystemData` in struct `CustomDomainResource` -- New field `Type` in struct `CustomDomainResource` -- New field `ID` in struct `CustomDomainResource` -- New field `AddonConfigs` in struct `AppResourceProperties` -- New field `Issuer` in struct `ContentCertificateProperties` -- New field `SubjectName` in struct `ContentCertificateProperties` -- New field `ActivateDate` in struct `ContentCertificateProperties` -- New field `DNSNames` in struct `ContentCertificateProperties` -- New field `Type` in struct `ContentCertificateProperties` -- New field `Thumbprint` in struct `ContentCertificateProperties` -- New field `ExpirationDate` in struct `ContentCertificateProperties` -- New field `IssuedDate` in struct `ContentCertificateProperties` -- New field `Type` in struct `AzureFileVolume` -- New field `MountOptions` in struct `AzureFileVolume` -- New field `ReadOnly` in struct `AzureFileVolume` -- New field `MountPath` in struct `AzureFileVolume` -- New field `ID` in struct `ProxyResource` -- New field `Name` in struct `ProxyResource` -- New field `SystemData` in struct `ProxyResource` -- New field `Type` in struct `ProxyResource` -- New field `Error` in struct `CloudError` -- New field `ID` in struct `CertificateResource` -- New field `Name` in struct `CertificateResource` -- New field `SystemData` in struct `CertificateResource` -- New field `Type` in struct `CertificateResource` -- New field `Name` in struct `StorageResource` -- New field `Type` in struct `StorageResource` -- New field `ID` in struct `StorageResource` -- New field `StorageType` in struct `StorageAccount` -- New field `Type` in struct `TrackedResource` -- New field `ID` in struct `TrackedResource` -- New field `Name` in struct `TrackedResource` -- New field `SystemData` in struct `TrackedResource` -- New field `ID` in struct `AppResource` -- New field `Name` in struct `AppResource` -- New field `SystemData` in struct `AppResource` -- New field `Type` in struct `AppResource` -- New field `AddonConfigs` in struct `DeploymentSettings` -- New field `Type` in struct `DeploymentResource` -- New field `ID` in struct `DeploymentResource` -- New field `Name` in struct `DeploymentResource` -- New field `SystemData` in struct `DeploymentResource` -- New field `SystemData` in struct `Resource` -- New field `Name` in struct `MonitoringSettingResource` -- New field `SystemData` in struct `MonitoringSettingResource` -- New field `Type` in struct `MonitoringSettingResource` -- New field `ID` in struct `MonitoringSettingResource` -- New field `SystemData` in struct `ServiceResource` -- New field `Type` in struct `ServiceResource` -- New field `Location` in struct `ServiceResource` -- New field `Tags` in struct `ServiceResource` -- New field `ID` in struct `ServiceResource` -- New field `Name` in struct `ServiceResource` -- New field `Name` in struct `ConfigServerResource` -- New field `SystemData` in struct `ConfigServerResource` -- New field `Type` in struct `ConfigServerResource` -- New field `ID` in struct `ConfigServerResource` - - -## 0.2.0 (2021-10-29) - -### Breaking Changes - -- `arm.Connection` has been removed in `github.com/Azure/azure-sdk-for-go/sdk/azcore/v0.20.0` -- The parameters of `NewXXXClient` has been changed from `(con *arm.Connection, subscriptionID string)` to `(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions)` - -## 0.1.0 (2021-10-20) - -- Initial preview release. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/README.md deleted file mode 100644 index 57fc0c81..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Azure App Platform Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform) - -The `armappplatform` module provides operations for working with Azure App Platform. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/appplatform/armappplatform) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure App Platform module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure App Platform. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure App Platform modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armappplatform.NewSKUsClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armappplatform.NewSKUsClient(, cred, &options) -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `App Platform` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/autorest.md deleted file mode 100644 index 45ce380e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/autorest.md +++ /dev/null @@ -1,12 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/appplatform/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/2f2b633d940230cbbd5bcf1339a2e1c48674e4a2/specification/appplatform/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0-beta.1 -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/build.go deleted file mode 100644 index 43231e2b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/appplatform/armappplatform - -package armappplatform diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/CHANGELOG.md new file mode 100644 index 00000000..345819f4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/CHANGELOG.md @@ -0,0 +1,545 @@ +# Release History + +## 2.0.0 (2024-01-26) +### Breaking Changes + +- Type of `AppResourceProperties.AddonConfigs` has been changed from `map[string]map[string]any` to `map[string]any` +- Type of `BindingResourceProperties.BindingParameters` has been changed from `map[string]any` to `map[string]*string` +- Type of `DeploymentSettings.AddonConfigs` has been changed from `map[string]map[string]any` to `map[string]any` + +### Features Added + +- New enum type `APIPortalAPITryOutEnabledState` with values `APIPortalAPITryOutEnabledStateDisabled`, `APIPortalAPITryOutEnabledStateEnabled` +- New enum type `APIPortalProvisioningState` with values `APIPortalProvisioningStateCreating`, `APIPortalProvisioningStateDeleting`, `APIPortalProvisioningStateFailed`, `APIPortalProvisioningStateSucceeded`, `APIPortalProvisioningStateUpdating` +- New enum type `ApmProvisioningState` with values `ApmProvisioningStateCanceled`, `ApmProvisioningStateCreating`, `ApmProvisioningStateDeleting`, `ApmProvisioningStateFailed`, `ApmProvisioningStateSucceeded`, `ApmProvisioningStateUpdating` +- New enum type `ApplicationAcceleratorProvisioningState` with values `ApplicationAcceleratorProvisioningStateCanceled`, `ApplicationAcceleratorProvisioningStateCreating`, `ApplicationAcceleratorProvisioningStateDeleting`, `ApplicationAcceleratorProvisioningStateFailed`, `ApplicationAcceleratorProvisioningStateSucceeded`, `ApplicationAcceleratorProvisioningStateUpdating` +- New enum type `ApplicationLiveViewProvisioningState` with values `ApplicationLiveViewProvisioningStateCanceled`, `ApplicationLiveViewProvisioningStateCreating`, `ApplicationLiveViewProvisioningStateDeleting`, `ApplicationLiveViewProvisioningStateFailed`, `ApplicationLiveViewProvisioningStateSucceeded`, `ApplicationLiveViewProvisioningStateUpdating` +- New enum type `BackendProtocol` with values `BackendProtocolDefault`, `BackendProtocolGRPC` +- New enum type `CertificateResourceProvisioningState` with values `CertificateResourceProvisioningStateCreating`, `CertificateResourceProvisioningStateDeleting`, `CertificateResourceProvisioningStateFailed`, `CertificateResourceProvisioningStateSucceeded`, `CertificateResourceProvisioningStateUpdating` +- New enum type `ConfigurationServiceGeneration` with values `ConfigurationServiceGenerationGen1`, `ConfigurationServiceGenerationGen2` +- New enum type `ContainerRegistryProvisioningState` with values `ContainerRegistryProvisioningStateCanceled`, `ContainerRegistryProvisioningStateCreating`, `ContainerRegistryProvisioningStateDeleting`, `ContainerRegistryProvisioningStateFailed`, `ContainerRegistryProvisioningStateSucceeded`, `ContainerRegistryProvisioningStateUpdating` +- New enum type `CustomDomainResourceProvisioningState` with values `CustomDomainResourceProvisioningStateCreating`, `CustomDomainResourceProvisioningStateDeleting`, `CustomDomainResourceProvisioningStateFailed`, `CustomDomainResourceProvisioningStateSucceeded`, `CustomDomainResourceProvisioningStateUpdating` +- New enum type `CustomizedAcceleratorProvisioningState` with values `CustomizedAcceleratorProvisioningStateCanceled`, `CustomizedAcceleratorProvisioningStateCreating`, `CustomizedAcceleratorProvisioningStateDeleting`, `CustomizedAcceleratorProvisioningStateFailed`, `CustomizedAcceleratorProvisioningStateSucceeded`, `CustomizedAcceleratorProvisioningStateUpdating` +- New enum type `CustomizedAcceleratorType` with values `CustomizedAcceleratorTypeAccelerator`, `CustomizedAcceleratorTypeFragment` +- New enum type `CustomizedAcceleratorValidateResultState` with values `CustomizedAcceleratorValidateResultStateInvalid`, `CustomizedAcceleratorValidateResultStateValid` +- New enum type `DevToolPortalFeatureState` with values `DevToolPortalFeatureStateDisabled`, `DevToolPortalFeatureStateEnabled` +- New enum type `DevToolPortalProvisioningState` with values `DevToolPortalProvisioningStateCanceled`, `DevToolPortalProvisioningStateCreating`, `DevToolPortalProvisioningStateDeleting`, `DevToolPortalProvisioningStateFailed`, `DevToolPortalProvisioningStateSucceeded`, `DevToolPortalProvisioningStateUpdating` +- New enum type `GatewayCertificateVerification` with values `GatewayCertificateVerificationDisabled`, `GatewayCertificateVerificationEnabled` +- New enum type `GatewayProvisioningState` with values `GatewayProvisioningStateCreating`, `GatewayProvisioningStateDeleting`, `GatewayProvisioningStateFailed`, `GatewayProvisioningStateSucceeded`, `GatewayProvisioningStateUpdating` +- New enum type `GatewayRouteConfigProtocol` with values `GatewayRouteConfigProtocolHTTP`, `GatewayRouteConfigProtocolHTTPS` +- New enum type `GitImplementation` with values `GitImplementationGoGit`, `GitImplementationLibgit2` +- New enum type `HTTPSchemeType` with values `HTTPSchemeTypeHTTP`, `HTTPSchemeTypeHTTPS` +- New enum type `KeyVaultCertificateAutoSync` with values `KeyVaultCertificateAutoSyncDisabled`, `KeyVaultCertificateAutoSyncEnabled` +- New enum type `PowerState` with values `PowerStateRunning`, `PowerStateStopped` +- New enum type `PredefinedAcceleratorProvisioningState` with values `PredefinedAcceleratorProvisioningStateCanceled`, `PredefinedAcceleratorProvisioningStateCreating`, `PredefinedAcceleratorProvisioningStateFailed`, `PredefinedAcceleratorProvisioningStateSucceeded`, `PredefinedAcceleratorProvisioningStateUpdating` +- New enum type `PredefinedAcceleratorState` with values `PredefinedAcceleratorStateDisabled`, `PredefinedAcceleratorStateEnabled` +- New enum type `ProbeActionType` with values `ProbeActionTypeExecAction`, `ProbeActionTypeHTTPGetAction`, `ProbeActionTypeTCPSocketAction` +- New enum type `SessionAffinity` with values `SessionAffinityCookie`, `SessionAffinityNone` +- New enum type `StorageType` with values `StorageTypeStorageAccount` +- New enum type `TriggeredBuildResultProvisioningState` with values `TriggeredBuildResultProvisioningStateBuilding`, `TriggeredBuildResultProvisioningStateCanceled`, `TriggeredBuildResultProvisioningStateDeleting`, `TriggeredBuildResultProvisioningStateFailed`, `TriggeredBuildResultProvisioningStateQueuing`, `TriggeredBuildResultProvisioningStateSucceeded` +- New enum type `Type` with values `TypeAzureFileVolume` +- New function `NewAPIPortalCustomDomainsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*APIPortalCustomDomainsClient, error)` +- New function `*APIPortalCustomDomainsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, APIPortalCustomDomainResource, *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalCustomDomainsClientCreateOrUpdateResponse], error)` +- New function `*APIPortalCustomDomainsClient.BeginDelete(context.Context, string, string, string, string, *APIPortalCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[APIPortalCustomDomainsClientDeleteResponse], error)` +- New function `*APIPortalCustomDomainsClient.Get(context.Context, string, string, string, string, *APIPortalCustomDomainsClientGetOptions) (APIPortalCustomDomainsClientGetResponse, error)` +- New function `*APIPortalCustomDomainsClient.NewListPager(string, string, string, *APIPortalCustomDomainsClientListOptions) *runtime.Pager[APIPortalCustomDomainsClientListResponse]` +- New function `NewAPIPortalsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*APIPortalsClient, error)` +- New function `*APIPortalsClient.BeginCreateOrUpdate(context.Context, string, string, string, APIPortalResource, *APIPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalsClientCreateOrUpdateResponse], error)` +- New function `*APIPortalsClient.BeginDelete(context.Context, string, string, string, *APIPortalsClientBeginDeleteOptions) (*runtime.Poller[APIPortalsClientDeleteResponse], error)` +- New function `*APIPortalsClient.Get(context.Context, string, string, string, *APIPortalsClientGetOptions) (APIPortalsClientGetResponse, error)` +- New function `*APIPortalsClient.NewListPager(string, string, *APIPortalsClientListOptions) *runtime.Pager[APIPortalsClientListResponse]` +- New function `*APIPortalsClient.ValidateDomain(context.Context, string, string, string, CustomDomainValidatePayload, *APIPortalsClientValidateDomainOptions) (APIPortalsClientValidateDomainResponse, error)` +- New function `*AcceleratorAuthSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` +- New function `*AcceleratorBasicAuthSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` +- New function `*AcceleratorPublicSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` +- New function `*AcceleratorSSHSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` +- New function `NewApmsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ApmsClient, error)` +- New function `*ApmsClient.BeginCreateOrUpdate(context.Context, string, string, string, ApmResource, *ApmsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApmsClientCreateOrUpdateResponse], error)` +- New function `*ApmsClient.BeginDelete(context.Context, string, string, string, *ApmsClientBeginDeleteOptions) (*runtime.Poller[ApmsClientDeleteResponse], error)` +- New function `*ApmsClient.Get(context.Context, string, string, string, *ApmsClientGetOptions) (ApmsClientGetResponse, error)` +- New function `*ApmsClient.NewListPager(string, string, *ApmsClientListOptions) *runtime.Pager[ApmsClientListResponse]` +- New function `*ApmsClient.ListSecretKeys(context.Context, string, string, string, *ApmsClientListSecretKeysOptions) (ApmsClientListSecretKeysResponse, error)` +- New function `NewApplicationAcceleratorsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ApplicationAcceleratorsClient, error)` +- New function `*ApplicationAcceleratorsClient.BeginCreateOrUpdate(context.Context, string, string, string, ApplicationAcceleratorResource, *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationAcceleratorsClientCreateOrUpdateResponse], error)` +- New function `*ApplicationAcceleratorsClient.BeginDelete(context.Context, string, string, string, *ApplicationAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[ApplicationAcceleratorsClientDeleteResponse], error)` +- New function `*ApplicationAcceleratorsClient.Get(context.Context, string, string, string, *ApplicationAcceleratorsClientGetOptions) (ApplicationAcceleratorsClientGetResponse, error)` +- New function `*ApplicationAcceleratorsClient.NewListPager(string, string, *ApplicationAcceleratorsClientListOptions) *runtime.Pager[ApplicationAcceleratorsClientListResponse]` +- New function `NewApplicationLiveViewsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ApplicationLiveViewsClient, error)` +- New function `*ApplicationLiveViewsClient.BeginCreateOrUpdate(context.Context, string, string, string, ApplicationLiveViewResource, *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationLiveViewsClientCreateOrUpdateResponse], error)` +- New function `*ApplicationLiveViewsClient.BeginDelete(context.Context, string, string, string, *ApplicationLiveViewsClientBeginDeleteOptions) (*runtime.Poller[ApplicationLiveViewsClientDeleteResponse], error)` +- New function `*ApplicationLiveViewsClient.Get(context.Context, string, string, string, *ApplicationLiveViewsClientGetOptions) (ApplicationLiveViewsClientGetResponse, error)` +- New function `*ApplicationLiveViewsClient.NewListPager(string, string, *ApplicationLiveViewsClientListOptions) *runtime.Pager[ApplicationLiveViewsClientListResponse]` +- New function `*AzureFileVolume.GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties` +- New function `*BuildServiceBuilderClient.ListDeployments(context.Context, string, string, string, string, *BuildServiceBuilderClientListDeploymentsOptions) (BuildServiceBuilderClientListDeploymentsResponse, error)` +- New function `*BuildServiceClient.BeginCreateOrUpdate(context.Context, string, string, string, BuildService, *BuildServiceClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildServiceClientCreateOrUpdateResponse], error)` +- New function `*BuildServiceClient.BeginDeleteBuild(context.Context, string, string, string, string, *BuildServiceClientBeginDeleteBuildOptions) (*runtime.Poller[BuildServiceClientDeleteBuildResponse], error)` +- New function `*BuildpackBindingClient.NewListForClusterPager(string, string, *BuildpackBindingClientListForClusterOptions) *runtime.Pager[BuildpackBindingClientListForClusterResponse]` +- New function `*ClientFactory.NewAPIPortalCustomDomainsClient() *APIPortalCustomDomainsClient` +- New function `*ClientFactory.NewAPIPortalsClient() *APIPortalsClient` +- New function `*ClientFactory.NewApmsClient() *ApmsClient` +- New function `*ClientFactory.NewApplicationAcceleratorsClient() *ApplicationAcceleratorsClient` +- New function `*ClientFactory.NewApplicationLiveViewsClient() *ApplicationLiveViewsClient` +- New function `*ClientFactory.NewContainerRegistriesClient() *ContainerRegistriesClient` +- New function `*ClientFactory.NewCustomizedAcceleratorsClient() *CustomizedAcceleratorsClient` +- New function `*ClientFactory.NewDevToolPortalsClient() *DevToolPortalsClient` +- New function `*ClientFactory.NewGatewayCustomDomainsClient() *GatewayCustomDomainsClient` +- New function `*ClientFactory.NewGatewayRouteConfigsClient() *GatewayRouteConfigsClient` +- New function `*ClientFactory.NewGatewaysClient() *GatewaysClient` +- New function `*ClientFactory.NewPredefinedAcceleratorsClient() *PredefinedAcceleratorsClient` +- New function `*ClientFactory.NewStoragesClient() *StoragesClient` +- New function `*ConfigurationServicesClient.BeginValidateResource(context.Context, string, string, string, ConfigurationServiceResource, *ConfigurationServicesClientBeginValidateResourceOptions) (*runtime.Poller[ConfigurationServicesClientValidateResourceResponse], error)` +- New function `NewContainerRegistriesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ContainerRegistriesClient, error)` +- New function `*ContainerRegistriesClient.BeginCreateOrUpdate(context.Context, string, string, string, ContainerRegistryResource, *ContainerRegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ContainerRegistriesClientCreateOrUpdateResponse], error)` +- New function `*ContainerRegistriesClient.BeginDelete(context.Context, string, string, string, *ContainerRegistriesClientBeginDeleteOptions) (*runtime.Poller[ContainerRegistriesClientDeleteResponse], error)` +- New function `*ContainerRegistriesClient.Get(context.Context, string, string, string, *ContainerRegistriesClientGetOptions) (ContainerRegistriesClientGetResponse, error)` +- New function `*ContainerRegistriesClient.NewListPager(string, string, *ContainerRegistriesClientListOptions) *runtime.Pager[ContainerRegistriesClientListResponse]` +- New function `*ContainerRegistriesClient.BeginValidate(context.Context, string, string, string, ContainerRegistryProperties, *ContainerRegistriesClientBeginValidateOptions) (*runtime.Poller[ContainerRegistriesClientValidateResponse], error)` +- New function `*ContainerRegistryBasicCredentials.GetContainerRegistryCredentials() *ContainerRegistryCredentials` +- New function `*ContainerRegistryCredentials.GetContainerRegistryCredentials() *ContainerRegistryCredentials` +- New function `*CustomContainerUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` +- New function `*CustomPersistentDiskProperties.GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties` +- New function `NewCustomizedAcceleratorsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*CustomizedAcceleratorsClient, error)` +- New function `*CustomizedAcceleratorsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, CustomizedAcceleratorResource, *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomizedAcceleratorsClientCreateOrUpdateResponse], error)` +- New function `*CustomizedAcceleratorsClient.BeginDelete(context.Context, string, string, string, string, *CustomizedAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[CustomizedAcceleratorsClientDeleteResponse], error)` +- New function `*CustomizedAcceleratorsClient.Get(context.Context, string, string, string, string, *CustomizedAcceleratorsClientGetOptions) (CustomizedAcceleratorsClientGetResponse, error)` +- New function `*CustomizedAcceleratorsClient.NewListPager(string, string, string, *CustomizedAcceleratorsClientListOptions) *runtime.Pager[CustomizedAcceleratorsClientListResponse]` +- New function `*CustomizedAcceleratorsClient.BeginValidate(context.Context, string, string, string, string, CustomizedAcceleratorProperties, *CustomizedAcceleratorsClientBeginValidateOptions) (*runtime.Poller[CustomizedAcceleratorsClientValidateResponse], error)` +- New function `*DeploymentsClient.BeginDisableRemoteDebugging(context.Context, string, string, string, string, *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientDisableRemoteDebuggingResponse], error)` +- New function `*DeploymentsClient.BeginEnableRemoteDebugging(context.Context, string, string, string, string, *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientEnableRemoteDebuggingResponse], error)` +- New function `*DeploymentsClient.GetRemoteDebuggingConfig(context.Context, string, string, string, string, *DeploymentsClientGetRemoteDebuggingConfigOptions) (DeploymentsClientGetRemoteDebuggingConfigResponse, error)` +- New function `NewDevToolPortalsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DevToolPortalsClient, error)` +- New function `*DevToolPortalsClient.BeginCreateOrUpdate(context.Context, string, string, string, DevToolPortalResource, *DevToolPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevToolPortalsClientCreateOrUpdateResponse], error)` +- New function `*DevToolPortalsClient.BeginDelete(context.Context, string, string, string, *DevToolPortalsClientBeginDeleteOptions) (*runtime.Poller[DevToolPortalsClientDeleteResponse], error)` +- New function `*DevToolPortalsClient.Get(context.Context, string, string, string, *DevToolPortalsClientGetOptions) (DevToolPortalsClientGetResponse, error)` +- New function `*DevToolPortalsClient.NewListPager(string, string, *DevToolPortalsClientListOptions) *runtime.Pager[DevToolPortalsClientListResponse]` +- New function `*ExecAction.GetProbeAction() *ProbeAction` +- New function `NewGatewayCustomDomainsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GatewayCustomDomainsClient, error)` +- New function `*GatewayCustomDomainsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, GatewayCustomDomainResource, *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayCustomDomainsClientCreateOrUpdateResponse], error)` +- New function `*GatewayCustomDomainsClient.BeginDelete(context.Context, string, string, string, string, *GatewayCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[GatewayCustomDomainsClientDeleteResponse], error)` +- New function `*GatewayCustomDomainsClient.Get(context.Context, string, string, string, string, *GatewayCustomDomainsClientGetOptions) (GatewayCustomDomainsClientGetResponse, error)` +- New function `*GatewayCustomDomainsClient.NewListPager(string, string, string, *GatewayCustomDomainsClientListOptions) *runtime.Pager[GatewayCustomDomainsClientListResponse]` +- New function `NewGatewayRouteConfigsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GatewayRouteConfigsClient, error)` +- New function `*GatewayRouteConfigsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, GatewayRouteConfigResource, *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayRouteConfigsClientCreateOrUpdateResponse], error)` +- New function `*GatewayRouteConfigsClient.BeginDelete(context.Context, string, string, string, string, *GatewayRouteConfigsClientBeginDeleteOptions) (*runtime.Poller[GatewayRouteConfigsClientDeleteResponse], error)` +- New function `*GatewayRouteConfigsClient.Get(context.Context, string, string, string, string, *GatewayRouteConfigsClientGetOptions) (GatewayRouteConfigsClientGetResponse, error)` +- New function `*GatewayRouteConfigsClient.NewListPager(string, string, string, *GatewayRouteConfigsClientListOptions) *runtime.Pager[GatewayRouteConfigsClientListResponse]` +- New function `NewGatewaysClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GatewaysClient, error)` +- New function `*GatewaysClient.BeginCreateOrUpdate(context.Context, string, string, string, GatewayResource, *GatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewaysClientCreateOrUpdateResponse], error)` +- New function `*GatewaysClient.BeginDelete(context.Context, string, string, string, *GatewaysClientBeginDeleteOptions) (*runtime.Poller[GatewaysClientDeleteResponse], error)` +- New function `*GatewaysClient.Get(context.Context, string, string, string, *GatewaysClientGetOptions) (GatewaysClientGetResponse, error)` +- New function `*GatewaysClient.ListEnvSecrets(context.Context, string, string, string, *GatewaysClientListEnvSecretsOptions) (GatewaysClientListEnvSecretsResponse, error)` +- New function `*GatewaysClient.NewListPager(string, string, *GatewaysClientListOptions) *runtime.Pager[GatewaysClientListResponse]` +- New function `*GatewaysClient.BeginRestart(context.Context, string, string, string, *GatewaysClientBeginRestartOptions) (*runtime.Poller[GatewaysClientRestartResponse], error)` +- New function `*GatewaysClient.ValidateDomain(context.Context, string, string, string, CustomDomainValidatePayload, *GatewaysClientValidateDomainOptions) (GatewaysClientValidateDomainResponse, error)` +- New function `*HTTPGetAction.GetProbeAction() *ProbeAction` +- New function `NewPredefinedAcceleratorsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PredefinedAcceleratorsClient, error)` +- New function `*PredefinedAcceleratorsClient.BeginDisable(context.Context, string, string, string, string, *PredefinedAcceleratorsClientBeginDisableOptions) (*runtime.Poller[PredefinedAcceleratorsClientDisableResponse], error)` +- New function `*PredefinedAcceleratorsClient.BeginEnable(context.Context, string, string, string, string, *PredefinedAcceleratorsClientBeginEnableOptions) (*runtime.Poller[PredefinedAcceleratorsClientEnableResponse], error)` +- New function `*PredefinedAcceleratorsClient.Get(context.Context, string, string, string, string, *PredefinedAcceleratorsClientGetOptions) (PredefinedAcceleratorsClientGetResponse, error)` +- New function `*PredefinedAcceleratorsClient.NewListPager(string, string, string, *PredefinedAcceleratorsClientListOptions) *runtime.Pager[PredefinedAcceleratorsClientListResponse]` +- New function `*ProbeAction.GetProbeAction() *ProbeAction` +- New function `*ServicesClient.BeginDisableApmGlobally(context.Context, string, string, ApmReference, *ServicesClientBeginDisableApmGloballyOptions) (*runtime.Poller[ServicesClientDisableApmGloballyResponse], error)` +- New function `*ServicesClient.BeginEnableApmGlobally(context.Context, string, string, ApmReference, *ServicesClientBeginEnableApmGloballyOptions) (*runtime.Poller[ServicesClientEnableApmGloballyResponse], error)` +- New function `*ServicesClient.BeginFlushVnetDNSSetting(context.Context, string, string, *ServicesClientBeginFlushVnetDNSSettingOptions) (*runtime.Poller[ServicesClientFlushVnetDNSSettingResponse], error)` +- New function `*ServicesClient.ListGloballyEnabledApms(context.Context, string, string, *ServicesClientListGloballyEnabledApmsOptions) (ServicesClientListGloballyEnabledApmsResponse, error)` +- New function `*ServicesClient.NewListSupportedApmTypesPager(string, string, *ServicesClientListSupportedApmTypesOptions) *runtime.Pager[ServicesClientListSupportedApmTypesResponse]` +- New function `*ServicesClient.NewListSupportedServerVersionsPager(string, string, *ServicesClientListSupportedServerVersionsOptions) *runtime.Pager[ServicesClientListSupportedServerVersionsResponse]` +- New function `*ServicesClient.BeginStart(context.Context, string, string, *ServicesClientBeginStartOptions) (*runtime.Poller[ServicesClientStartResponse], error)` +- New function `*ServicesClient.BeginStop(context.Context, string, string, *ServicesClientBeginStopOptions) (*runtime.Poller[ServicesClientStopResponse], error)` +- New function `*StorageAccount.GetStorageProperties() *StorageProperties` +- New function `*StorageProperties.GetStorageProperties() *StorageProperties` +- New function `NewStoragesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*StoragesClient, error)` +- New function `*StoragesClient.BeginCreateOrUpdate(context.Context, string, string, string, StorageResource, *StoragesClientBeginCreateOrUpdateOptions) (*runtime.Poller[StoragesClientCreateOrUpdateResponse], error)` +- New function `*StoragesClient.BeginDelete(context.Context, string, string, string, *StoragesClientBeginDeleteOptions) (*runtime.Poller[StoragesClientDeleteResponse], error)` +- New function `*StoragesClient.Get(context.Context, string, string, string, *StoragesClientGetOptions) (StoragesClientGetResponse, error)` +- New function `*StoragesClient.NewListPager(string, string, *StoragesClientListOptions) *runtime.Pager[StoragesClientListResponse]` +- New function `*TCPSocketAction.GetProbeAction() *ProbeAction` +- New function `*WarUploadedUserSourceInfo.GetUploadedUserSourceInfo() *UploadedUserSourceInfo` +- New function `*WarUploadedUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` +- New struct `APIPortalCustomDomainProperties` +- New struct `APIPortalCustomDomainResource` +- New struct `APIPortalCustomDomainResourceCollection` +- New struct `APIPortalInstance` +- New struct `APIPortalProperties` +- New struct `APIPortalResource` +- New struct `APIPortalResourceCollection` +- New struct `APIPortalResourceRequests` +- New struct `AcceleratorBasicAuthSetting` +- New struct `AcceleratorGitRepository` +- New struct `AcceleratorPublicSetting` +- New struct `AcceleratorSSHSetting` +- New struct `ApmProperties` +- New struct `ApmReference` +- New struct `ApmResource` +- New struct `ApmResourceCollection` +- New struct `ApmSecretKeys` +- New struct `AppVNetAddons` +- New struct `ApplicationAcceleratorComponent` +- New struct `ApplicationAcceleratorInstance` +- New struct `ApplicationAcceleratorProperties` +- New struct `ApplicationAcceleratorResource` +- New struct `ApplicationAcceleratorResourceCollection` +- New struct `ApplicationAcceleratorResourceRequests` +- New struct `ApplicationLiveViewComponent` +- New struct `ApplicationLiveViewInstance` +- New struct `ApplicationLiveViewProperties` +- New struct `ApplicationLiveViewResource` +- New struct `ApplicationLiveViewResourceCollection` +- New struct `ApplicationLiveViewResourceRequests` +- New struct `AzureFileVolume` +- New struct `BuildResourceRequests` +- New struct `CertificateReference` +- New struct `ContainerProbeSettings` +- New struct `ContainerRegistryBasicCredentials` +- New struct `ContainerRegistryProperties` +- New struct `ContainerRegistryResource` +- New struct `ContainerRegistryResourceCollection` +- New struct `ContainerRegistryValidateResult` +- New struct `CustomContainer` +- New struct `CustomContainerUserSourceInfo` +- New struct `CustomPersistentDiskResource` +- New struct `CustomizedAcceleratorProperties` +- New struct `CustomizedAcceleratorResource` +- New struct `CustomizedAcceleratorResourceCollection` +- New struct `CustomizedAcceleratorValidateResult` +- New struct `DeploymentList` +- New struct `DevToolPortalComponent` +- New struct `DevToolPortalFeatureDetail` +- New struct `DevToolPortalFeatureSettings` +- New struct `DevToolPortalInstance` +- New struct `DevToolPortalProperties` +- New struct `DevToolPortalResource` +- New struct `DevToolPortalResourceCollection` +- New struct `DevToolPortalResourceRequests` +- New struct `DevToolPortalSsoProperties` +- New struct `ExecAction` +- New struct `GatewayAPIMetadataProperties` +- New struct `GatewayAPIRoute` +- New struct `GatewayCorsProperties` +- New struct `GatewayCustomDomainProperties` +- New struct `GatewayCustomDomainResource` +- New struct `GatewayCustomDomainResourceCollection` +- New struct `GatewayInstance` +- New struct `GatewayOperatorProperties` +- New struct `GatewayOperatorResourceRequests` +- New struct `GatewayProperties` +- New struct `GatewayPropertiesClientAuth` +- New struct `GatewayPropertiesEnvironmentVariables` +- New struct `GatewayResource` +- New struct `GatewayResourceCollection` +- New struct `GatewayResourceRequests` +- New struct `GatewayRouteConfigOpenAPIProperties` +- New struct `GatewayRouteConfigProperties` +- New struct `GatewayRouteConfigResource` +- New struct `GatewayRouteConfigResourceCollection` +- New struct `GloballyEnabledApms` +- New struct `HTTPGetAction` +- New struct `ImageRegistryCredential` +- New struct `IngressConfig` +- New struct `IngressSettings` +- New struct `IngressSettingsClientAuth` +- New struct `MarketplaceResource` +- New struct `PredefinedAcceleratorProperties` +- New struct `PredefinedAcceleratorResource` +- New struct `PredefinedAcceleratorResourceCollection` +- New struct `Probe` +- New struct `RemoteDebugging` +- New struct `RemoteDebuggingPayload` +- New struct `SKUObject` +- New struct `ServiceVNetAddons` +- New struct `SsoProperties` +- New struct `StorageAccount` +- New struct `StorageResource` +- New struct `StorageResourceCollection` +- New struct `SupportedApmType` +- New struct `SupportedApmTypes` +- New struct `SupportedServerVersion` +- New struct `SupportedServerVersions` +- New struct `TCPSocketAction` +- New struct `UserAssignedManagedIdentity` +- New struct `WarUploadedUserSourceInfo` +- New field `CustomPersistentDisks`, `IngressSettings`, `VnetAddons` in struct `AppResourceProperties` +- New field `Apms`, `Certificates`, `ResourceRequests` in struct `BuildProperties` +- New field `Error`, `Image` in struct `BuildResultProperties` +- New field `ContainerRegistry` in struct `BuildServiceProperties` +- New field `ExitCode`, `Reason` in struct `BuildStageProperties` +- New field `ProvisioningState` in struct `CertificateProperties` +- New field `MarketplaceResource`, `PowerState`, `VnetAddons` in struct `ClusterResourceProperties` +- New field `CaCertResourceID`, `GitImplementation` in struct `ConfigurationServiceGitRepository` +- New field `Generation` in struct `ConfigurationServiceProperties` +- New field `ProvisioningState` in struct `ContentCertificateProperties` +- New field `ProvisioningState` in struct `CustomDomainProperties` +- New field `Apms`, `ContainerProbeSettings`, `LivenessProbe`, `ReadinessProbe`, `StartupProbe`, `TerminationGracePeriodSeconds` in struct `DeploymentSettings` +- New field `Expand` in struct `DeploymentsClientListForClusterOptions` +- New field `AutoSync`, `ProvisioningState` in struct `KeyVaultCertificateProperties` +- New field `UserAssignedIdentities` in struct `ManagedIdentityProperties` +- New field `IngressConfig`, `OutboundType` in struct `NetworkProfile` +- New field `Image`, `LastTransitionReason`, `LastTransitionStatus`, `LastTransitionTime`, `ProvisioningState` in struct `TriggeredBuildResult` + + +## 2.0.0-beta.2 (2023-11-30) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 1.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.0.0-beta.1 (2023-04-28) +### Breaking Changes + +- Type of `AppResourceProperties.AddonConfigs` has been changed from `map[string]map[string]any` to `map[string]any` +- Type of `BindingResourceProperties.BindingParameters` has been changed from `map[string]any` to `map[string]*string` +- Type of `DeploymentSettings.AddonConfigs` has been changed from `map[string]map[string]any` to `map[string]any` + +### Features Added + +- New value `BindingTypeCACertificates` added to enum type `BindingType` +- New enum type `APIPortalProvisioningState` with values `APIPortalProvisioningStateCreating`, `APIPortalProvisioningStateDeleting`, `APIPortalProvisioningStateFailed`, `APIPortalProvisioningStateSucceeded`, `APIPortalProvisioningStateUpdating` +- New enum type `ApmType` with values `ApmTypeAppDynamics`, `ApmTypeApplicationInsights`, `ApmTypeDynatrace`, `ApmTypeElasticAPM`, `ApmTypeNewRelic` +- New enum type `ApplicationAcceleratorProvisioningState` with values `ApplicationAcceleratorProvisioningStateCreating`, `ApplicationAcceleratorProvisioningStateDeleting`, `ApplicationAcceleratorProvisioningStateFailed`, `ApplicationAcceleratorProvisioningStateSucceeded`, `ApplicationAcceleratorProvisioningStateUpdating` +- New enum type `ApplicationLiveViewProvisioningState` with values `ApplicationLiveViewProvisioningStateCanceled`, `ApplicationLiveViewProvisioningStateCreating`, `ApplicationLiveViewProvisioningStateDeleting`, `ApplicationLiveViewProvisioningStateFailed`, `ApplicationLiveViewProvisioningStateSucceeded`, `ApplicationLiveViewProvisioningStateUpdating` +- New enum type `BackendProtocol` with values `BackendProtocolDefault`, `BackendProtocolGRPC` +- New enum type `CertificateResourceProvisioningState` with values `CertificateResourceProvisioningStateCreating`, `CertificateResourceProvisioningStateDeleting`, `CertificateResourceProvisioningStateFailed`, `CertificateResourceProvisioningStateSucceeded`, `CertificateResourceProvisioningStateUpdating` +- New enum type `CustomDomainResourceProvisioningState` with values `CustomDomainResourceProvisioningStateCreating`, `CustomDomainResourceProvisioningStateDeleting`, `CustomDomainResourceProvisioningStateFailed`, `CustomDomainResourceProvisioningStateSucceeded`, `CustomDomainResourceProvisioningStateUpdating` +- New enum type `CustomizedAcceleratorProvisioningState` with values `CustomizedAcceleratorProvisioningStateCreating`, `CustomizedAcceleratorProvisioningStateDeleting`, `CustomizedAcceleratorProvisioningStateFailed`, `CustomizedAcceleratorProvisioningStateSucceeded`, `CustomizedAcceleratorProvisioningStateUpdating` +- New enum type `CustomizedAcceleratorValidateResultState` with values `CustomizedAcceleratorValidateResultStateInvalid`, `CustomizedAcceleratorValidateResultStateValid` +- New enum type `DevToolPortalFeatureState` with values `DevToolPortalFeatureStateDisabled`, `DevToolPortalFeatureStateEnabled` +- New enum type `DevToolPortalProvisioningState` with values `DevToolPortalProvisioningStateCanceled`, `DevToolPortalProvisioningStateCreating`, `DevToolPortalProvisioningStateDeleting`, `DevToolPortalProvisioningStateFailed`, `DevToolPortalProvisioningStateSucceeded`, `DevToolPortalProvisioningStateUpdating` +- New enum type `GatewayProvisioningState` with values `GatewayProvisioningStateCreating`, `GatewayProvisioningStateDeleting`, `GatewayProvisioningStateFailed`, `GatewayProvisioningStateSucceeded`, `GatewayProvisioningStateUpdating` +- New enum type `GatewayRouteConfigProtocol` with values `GatewayRouteConfigProtocolHTTP`, `GatewayRouteConfigProtocolHTTPS` +- New enum type `HTTPSchemeType` with values `HTTPSchemeTypeHTTP`, `HTTPSchemeTypeHTTPS` +- New enum type `PowerState` with values `PowerStateRunning`, `PowerStateStopped` +- New enum type `PredefinedAcceleratorProvisioningState` with values `PredefinedAcceleratorProvisioningStateCreating`, `PredefinedAcceleratorProvisioningStateFailed`, `PredefinedAcceleratorProvisioningStateSucceeded`, `PredefinedAcceleratorProvisioningStateUpdating` +- New enum type `PredefinedAcceleratorState` with values `PredefinedAcceleratorStateDisabled`, `PredefinedAcceleratorStateEnabled` +- New enum type `ProbeActionType` with values `ProbeActionTypeExecAction`, `ProbeActionTypeHTTPGetAction`, `ProbeActionTypeTCPSocketAction` +- New enum type `SessionAffinity` with values `SessionAffinityCookie`, `SessionAffinityNone` +- New enum type `StorageType` with values `StorageTypeStorageAccount` +- New enum type `Type` with values `TypeAzureFileVolume` +- New function `NewAPIPortalCustomDomainsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*APIPortalCustomDomainsClient, error)` +- New function `*APIPortalCustomDomainsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, APIPortalCustomDomainResource, *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalCustomDomainsClientCreateOrUpdateResponse], error)` +- New function `*APIPortalCustomDomainsClient.BeginDelete(context.Context, string, string, string, string, *APIPortalCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[APIPortalCustomDomainsClientDeleteResponse], error)` +- New function `*APIPortalCustomDomainsClient.Get(context.Context, string, string, string, string, *APIPortalCustomDomainsClientGetOptions) (APIPortalCustomDomainsClientGetResponse, error)` +- New function `*APIPortalCustomDomainsClient.NewListPager(string, string, string, *APIPortalCustomDomainsClientListOptions) *runtime.Pager[APIPortalCustomDomainsClientListResponse]` +- New function `NewAPIPortalsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*APIPortalsClient, error)` +- New function `*APIPortalsClient.BeginCreateOrUpdate(context.Context, string, string, string, APIPortalResource, *APIPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalsClientCreateOrUpdateResponse], error)` +- New function `*APIPortalsClient.BeginDelete(context.Context, string, string, string, *APIPortalsClientBeginDeleteOptions) (*runtime.Poller[APIPortalsClientDeleteResponse], error)` +- New function `*APIPortalsClient.Get(context.Context, string, string, string, *APIPortalsClientGetOptions) (APIPortalsClientGetResponse, error)` +- New function `*APIPortalsClient.NewListPager(string, string, *APIPortalsClientListOptions) *runtime.Pager[APIPortalsClientListResponse]` +- New function `*APIPortalsClient.ValidateDomain(context.Context, string, string, string, CustomDomainValidatePayload, *APIPortalsClientValidateDomainOptions) (APIPortalsClientValidateDomainResponse, error)` +- New function `*AcceleratorAuthSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` +- New function `*AcceleratorBasicAuthSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` +- New function `*AcceleratorPublicSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` +- New function `*AcceleratorSSHSetting.GetAcceleratorAuthSetting() *AcceleratorAuthSetting` +- New function `NewApplicationAcceleratorsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ApplicationAcceleratorsClient, error)` +- New function `*ApplicationAcceleratorsClient.BeginCreateOrUpdate(context.Context, string, string, string, ApplicationAcceleratorResource, *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationAcceleratorsClientCreateOrUpdateResponse], error)` +- New function `*ApplicationAcceleratorsClient.BeginDelete(context.Context, string, string, string, *ApplicationAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[ApplicationAcceleratorsClientDeleteResponse], error)` +- New function `*ApplicationAcceleratorsClient.Get(context.Context, string, string, string, *ApplicationAcceleratorsClientGetOptions) (ApplicationAcceleratorsClientGetResponse, error)` +- New function `*ApplicationAcceleratorsClient.NewListPager(string, string, *ApplicationAcceleratorsClientListOptions) *runtime.Pager[ApplicationAcceleratorsClientListResponse]` +- New function `NewApplicationLiveViewsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ApplicationLiveViewsClient, error)` +- New function `*ApplicationLiveViewsClient.BeginCreateOrUpdate(context.Context, string, string, string, ApplicationLiveViewResource, *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationLiveViewsClientCreateOrUpdateResponse], error)` +- New function `*ApplicationLiveViewsClient.BeginDelete(context.Context, string, string, string, *ApplicationLiveViewsClientBeginDeleteOptions) (*runtime.Poller[ApplicationLiveViewsClientDeleteResponse], error)` +- New function `*ApplicationLiveViewsClient.Get(context.Context, string, string, string, *ApplicationLiveViewsClientGetOptions) (ApplicationLiveViewsClientGetResponse, error)` +- New function `*ApplicationLiveViewsClient.NewListPager(string, string, *ApplicationLiveViewsClientListOptions) *runtime.Pager[ApplicationLiveViewsClientListResponse]` +- New function `*AzureFileVolume.GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties` +- New function `*BuildServiceBuilderClient.ListDeployments(context.Context, string, string, string, string, *BuildServiceBuilderClientListDeploymentsOptions) (BuildServiceBuilderClientListDeploymentsResponse, error)` +- New function `*BuildpackBindingClient.NewListForClusterPager(string, string, *BuildpackBindingClientListForClusterOptions) *runtime.Pager[BuildpackBindingClientListForClusterResponse]` +- New function `*ClientFactory.NewAPIPortalCustomDomainsClient() *APIPortalCustomDomainsClient` +- New function `*ClientFactory.NewAPIPortalsClient() *APIPortalsClient` +- New function `*ClientFactory.NewApplicationAcceleratorsClient() *ApplicationAcceleratorsClient` +- New function `*ClientFactory.NewApplicationLiveViewsClient() *ApplicationLiveViewsClient` +- New function `*ClientFactory.NewCustomizedAcceleratorsClient() *CustomizedAcceleratorsClient` +- New function `*ClientFactory.NewDevToolPortalsClient() *DevToolPortalsClient` +- New function `*ClientFactory.NewGatewayCustomDomainsClient() *GatewayCustomDomainsClient` +- New function `*ClientFactory.NewGatewayRouteConfigsClient() *GatewayRouteConfigsClient` +- New function `*ClientFactory.NewGatewaysClient() *GatewaysClient` +- New function `*ClientFactory.NewPredefinedAcceleratorsClient() *PredefinedAcceleratorsClient` +- New function `*ClientFactory.NewStoragesClient() *StoragesClient` +- New function `*CustomContainerUserSourceInfo.GetUserSourceInfo() *UserSourceInfo` +- New function `*CustomPersistentDiskProperties.GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties` +- New function `NewCustomizedAcceleratorsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*CustomizedAcceleratorsClient, error)` +- New function `*CustomizedAcceleratorsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, CustomizedAcceleratorResource, *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomizedAcceleratorsClientCreateOrUpdateResponse], error)` +- New function `*CustomizedAcceleratorsClient.BeginDelete(context.Context, string, string, string, string, *CustomizedAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[CustomizedAcceleratorsClientDeleteResponse], error)` +- New function `*CustomizedAcceleratorsClient.Get(context.Context, string, string, string, string, *CustomizedAcceleratorsClientGetOptions) (CustomizedAcceleratorsClientGetResponse, error)` +- New function `*CustomizedAcceleratorsClient.NewListPager(string, string, string, *CustomizedAcceleratorsClientListOptions) *runtime.Pager[CustomizedAcceleratorsClientListResponse]` +- New function `*CustomizedAcceleratorsClient.Validate(context.Context, string, string, string, string, CustomizedAcceleratorProperties, *CustomizedAcceleratorsClientValidateOptions) (CustomizedAcceleratorsClientValidateResponse, error)` +- New function `*DeploymentsClient.BeginDisableRemoteDebugging(context.Context, string, string, string, string, *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientDisableRemoteDebuggingResponse], error)` +- New function `*DeploymentsClient.BeginEnableRemoteDebugging(context.Context, string, string, string, string, *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientEnableRemoteDebuggingResponse], error)` +- New function `*DeploymentsClient.GetRemoteDebuggingConfig(context.Context, string, string, string, string, *DeploymentsClientGetRemoteDebuggingConfigOptions) (DeploymentsClientGetRemoteDebuggingConfigResponse, error)` +- New function `NewDevToolPortalsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DevToolPortalsClient, error)` +- New function `*DevToolPortalsClient.BeginCreateOrUpdate(context.Context, string, string, string, DevToolPortalResource, *DevToolPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevToolPortalsClientCreateOrUpdateResponse], error)` +- New function `*DevToolPortalsClient.BeginDelete(context.Context, string, string, string, *DevToolPortalsClientBeginDeleteOptions) (*runtime.Poller[DevToolPortalsClientDeleteResponse], error)` +- New function `*DevToolPortalsClient.Get(context.Context, string, string, string, *DevToolPortalsClientGetOptions) (DevToolPortalsClientGetResponse, error)` +- New function `*DevToolPortalsClient.NewListPager(string, string, *DevToolPortalsClientListOptions) *runtime.Pager[DevToolPortalsClientListResponse]` +- New function `*ExecAction.GetProbeAction() *ProbeAction` +- New function `NewGatewayCustomDomainsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GatewayCustomDomainsClient, error)` +- New function `*GatewayCustomDomainsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, GatewayCustomDomainResource, *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayCustomDomainsClientCreateOrUpdateResponse], error)` +- New function `*GatewayCustomDomainsClient.BeginDelete(context.Context, string, string, string, string, *GatewayCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[GatewayCustomDomainsClientDeleteResponse], error)` +- New function `*GatewayCustomDomainsClient.Get(context.Context, string, string, string, string, *GatewayCustomDomainsClientGetOptions) (GatewayCustomDomainsClientGetResponse, error)` +- New function `*GatewayCustomDomainsClient.NewListPager(string, string, string, *GatewayCustomDomainsClientListOptions) *runtime.Pager[GatewayCustomDomainsClientListResponse]` +- New function `NewGatewayRouteConfigsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GatewayRouteConfigsClient, error)` +- New function `*GatewayRouteConfigsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, GatewayRouteConfigResource, *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayRouteConfigsClientCreateOrUpdateResponse], error)` +- New function `*GatewayRouteConfigsClient.BeginDelete(context.Context, string, string, string, string, *GatewayRouteConfigsClientBeginDeleteOptions) (*runtime.Poller[GatewayRouteConfigsClientDeleteResponse], error)` +- New function `*GatewayRouteConfigsClient.Get(context.Context, string, string, string, string, *GatewayRouteConfigsClientGetOptions) (GatewayRouteConfigsClientGetResponse, error)` +- New function `*GatewayRouteConfigsClient.NewListPager(string, string, string, *GatewayRouteConfigsClientListOptions) *runtime.Pager[GatewayRouteConfigsClientListResponse]` +- New function `NewGatewaysClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GatewaysClient, error)` +- New function `*GatewaysClient.BeginCreateOrUpdate(context.Context, string, string, string, GatewayResource, *GatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewaysClientCreateOrUpdateResponse], error)` +- New function `*GatewaysClient.BeginDelete(context.Context, string, string, string, *GatewaysClientBeginDeleteOptions) (*runtime.Poller[GatewaysClientDeleteResponse], error)` +- New function `*GatewaysClient.Get(context.Context, string, string, string, *GatewaysClientGetOptions) (GatewaysClientGetResponse, error)` +- New function `*GatewaysClient.ListEnvSecrets(context.Context, string, string, string, *GatewaysClientListEnvSecretsOptions) (GatewaysClientListEnvSecretsResponse, error)` +- New function `*GatewaysClient.NewListPager(string, string, *GatewaysClientListOptions) *runtime.Pager[GatewaysClientListResponse]` +- New function `*GatewaysClient.BeginUpdateCapacity(context.Context, string, string, string, SKUObject, *GatewaysClientBeginUpdateCapacityOptions) (*runtime.Poller[GatewaysClientUpdateCapacityResponse], error)` +- New function `*GatewaysClient.ValidateDomain(context.Context, string, string, string, CustomDomainValidatePayload, *GatewaysClientValidateDomainOptions) (GatewaysClientValidateDomainResponse, error)` +- New function `*HTTPGetAction.GetProbeAction() *ProbeAction` +- New function `NewPredefinedAcceleratorsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PredefinedAcceleratorsClient, error)` +- New function `*PredefinedAcceleratorsClient.BeginDisable(context.Context, string, string, string, string, *PredefinedAcceleratorsClientBeginDisableOptions) (*runtime.Poller[PredefinedAcceleratorsClientDisableResponse], error)` +- New function `*PredefinedAcceleratorsClient.BeginEnable(context.Context, string, string, string, string, *PredefinedAcceleratorsClientBeginEnableOptions) (*runtime.Poller[PredefinedAcceleratorsClientEnableResponse], error)` +- New function `*PredefinedAcceleratorsClient.Get(context.Context, string, string, string, string, *PredefinedAcceleratorsClientGetOptions) (PredefinedAcceleratorsClientGetResponse, error)` +- New function `*PredefinedAcceleratorsClient.NewListPager(string, string, string, *PredefinedAcceleratorsClientListOptions) *runtime.Pager[PredefinedAcceleratorsClientListResponse]` +- New function `*ProbeAction.GetProbeAction() *ProbeAction` +- New function `*ServicesClient.BeginStart(context.Context, string, string, *ServicesClientBeginStartOptions) (*runtime.Poller[ServicesClientStartResponse], error)` +- New function `*ServicesClient.BeginStop(context.Context, string, string, *ServicesClientBeginStopOptions) (*runtime.Poller[ServicesClientStopResponse], error)` +- New function `*StorageAccount.GetStorageProperties() *StorageProperties` +- New function `*StorageProperties.GetStorageProperties() *StorageProperties` +- New function `NewStoragesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*StoragesClient, error)` +- New function `*StoragesClient.BeginCreateOrUpdate(context.Context, string, string, string, StorageResource, *StoragesClientBeginCreateOrUpdateOptions) (*runtime.Poller[StoragesClientCreateOrUpdateResponse], error)` +- New function `*StoragesClient.BeginDelete(context.Context, string, string, string, *StoragesClientBeginDeleteOptions) (*runtime.Poller[StoragesClientDeleteResponse], error)` +- New function `*StoragesClient.Get(context.Context, string, string, string, *StoragesClientGetOptions) (StoragesClientGetResponse, error)` +- New function `*StoragesClient.NewListPager(string, string, *StoragesClientListOptions) *runtime.Pager[StoragesClientListResponse]` +- New function `*TCPSocketAction.GetProbeAction() *ProbeAction` +- New struct `APIPortalCustomDomainProperties` +- New struct `APIPortalCustomDomainResource` +- New struct `APIPortalCustomDomainResourceCollection` +- New struct `APIPortalInstance` +- New struct `APIPortalProperties` +- New struct `APIPortalResource` +- New struct `APIPortalResourceCollection` +- New struct `APIPortalResourceRequests` +- New struct `AcceleratorBasicAuthSetting` +- New struct `AcceleratorGitRepository` +- New struct `AcceleratorPublicSetting` +- New struct `AcceleratorSSHSetting` +- New struct `AppVNetAddons` +- New struct `ApplicationAcceleratorComponent` +- New struct `ApplicationAcceleratorInstance` +- New struct `ApplicationAcceleratorProperties` +- New struct `ApplicationAcceleratorResource` +- New struct `ApplicationAcceleratorResourceCollection` +- New struct `ApplicationAcceleratorResourceRequests` +- New struct `ApplicationLiveViewComponent` +- New struct `ApplicationLiveViewInstance` +- New struct `ApplicationLiveViewProperties` +- New struct `ApplicationLiveViewResource` +- New struct `ApplicationLiveViewResourceCollection` +- New struct `ApplicationLiveViewResourceRequests` +- New struct `AzureFileVolume` +- New struct `BuildResourceRequests` +- New struct `ContainerProbeSettings` +- New struct `CustomContainer` +- New struct `CustomContainerUserSourceInfo` +- New struct `CustomPersistentDiskResource` +- New struct `CustomScaleRule` +- New struct `CustomizedAcceleratorProperties` +- New struct `CustomizedAcceleratorResource` +- New struct `CustomizedAcceleratorResourceCollection` +- New struct `CustomizedAcceleratorValidateResult` +- New struct `DeploymentList` +- New struct `DevToolPortalFeatureDetail` +- New struct `DevToolPortalFeatureSettings` +- New struct `DevToolPortalInstance` +- New struct `DevToolPortalProperties` +- New struct `DevToolPortalResource` +- New struct `DevToolPortalResourceCollection` +- New struct `DevToolPortalResourceRequests` +- New struct `DevToolPortalSsoProperties` +- New struct `ExecAction` +- New struct `GatewayAPIMetadataProperties` +- New struct `GatewayAPIRoute` +- New struct `GatewayCorsProperties` +- New struct `GatewayCustomDomainProperties` +- New struct `GatewayCustomDomainResource` +- New struct `GatewayCustomDomainResourceCollection` +- New struct `GatewayInstance` +- New struct `GatewayOperatorProperties` +- New struct `GatewayOperatorResourceRequests` +- New struct `GatewayProperties` +- New struct `GatewayPropertiesEnvironmentVariables` +- New struct `GatewayResource` +- New struct `GatewayResourceCollection` +- New struct `GatewayResourceRequests` +- New struct `GatewayRouteConfigOpenAPIProperties` +- New struct `GatewayRouteConfigProperties` +- New struct `GatewayRouteConfigResource` +- New struct `GatewayRouteConfigResourceCollection` +- New struct `HTTPGetAction` +- New struct `HTTPScaleRule` +- New struct `ImageRegistryCredential` +- New struct `IngressConfig` +- New struct `IngressSettings` +- New struct `IngressSettingsClientAuth` +- New struct `MarketplaceResource` +- New struct `PredefinedAcceleratorProperties` +- New struct `PredefinedAcceleratorResource` +- New struct `PredefinedAcceleratorResourceCollection` +- New struct `Probe` +- New struct `QueueScaleRule` +- New struct `RemoteDebugging` +- New struct `RemoteDebuggingPayload` +- New struct `SKUObject` +- New struct `Scale` +- New struct `ScaleRule` +- New struct `ScaleRuleAuth` +- New struct `Secret` +- New struct `ServiceVNetAddons` +- New struct `SsoProperties` +- New struct `StorageAccount` +- New struct `StorageResource` +- New struct `StorageResourceCollection` +- New struct `TCPScaleRule` +- New struct `TCPSocketAction` +- New struct `UserAssignedManagedIdentity` +- New field `CustomPersistentDisks` in struct `AppResourceProperties` +- New field `IngressSettings` in struct `AppResourceProperties` +- New field `Secrets` in struct `AppResourceProperties` +- New field `VnetAddons` in struct `AppResourceProperties` +- New field `ResourceRequests` in struct `BuildProperties` +- New field `Error` in struct `BuildResultProperties` +- New field `ExitCode` in struct `BuildStageProperties` +- New field `Reason` in struct `BuildStageProperties` +- New field `ProvisioningState` in struct `CertificateProperties` +- New field `InfraResourceGroup` in struct `ClusterResourceProperties` +- New field `ManagedEnvironmentID` in struct `ClusterResourceProperties` +- New field `MarketplaceResource` in struct `ClusterResourceProperties` +- New field `PowerState` in struct `ClusterResourceProperties` +- New field `VnetAddons` in struct `ClusterResourceProperties` +- New field `ProvisioningState` in struct `ContentCertificateProperties` +- New field `ProvisioningState` in struct `CustomDomainProperties` +- New field `ContainerProbeSettings` in struct `DeploymentSettings` +- New field `LivenessProbe` in struct `DeploymentSettings` +- New field `ReadinessProbe` in struct `DeploymentSettings` +- New field `Scale` in struct `DeploymentSettings` +- New field `StartupProbe` in struct `DeploymentSettings` +- New field `TerminationGracePeriodSeconds` in struct `DeploymentSettings` +- New field `ProvisioningState` in struct `KeyVaultCertificateProperties` +- New field `UserAssignedIdentities` in struct `ManagedIdentityProperties` +- New field `IngressConfig` in struct `NetworkProfile` +- New field `OutboundType` in struct `NetworkProfile` + + +## 1.1.0 (2023-04-06) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + + +## 1.0.0 (2022-05-17) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/README.md new file mode 100644 index 00000000..bb881e93 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/README.md @@ -0,0 +1,92 @@ +# Azure App Platform Module for Go + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2) + +The `armappplatform` module provides operations for working with Azure App Platform. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/appplatform/armappplatform) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure App Platform module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure App Platform. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure App Platform module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armappplatform.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armappplatform.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewAPIPortalCustomDomainsClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `App Platform` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apiportalcustomdomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apiportalcustomdomains_client.go new file mode 100644 index 00000000..73eb5c81 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apiportalcustomdomains_client.go @@ -0,0 +1,370 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// APIPortalCustomDomainsClient contains the methods for the APIPortalCustomDomains group. +// Don't use this type directly, use NewAPIPortalCustomDomainsClient() instead. +type APIPortalCustomDomainsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAPIPortalCustomDomainsClient creates a new instance of APIPortalCustomDomainsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAPIPortalCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIPortalCustomDomainsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &APIPortalCustomDomainsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update the API portal custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - domainName - The name of the API portal custom domain. +// - apiPortalCustomDomainResource - The API portal custom domain for the create or update operation +// - options - APIPortalCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginCreateOrUpdate +// method. +func (client *APIPortalCustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalCustomDomainsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apiPortalName, domainName, apiPortalCustomDomainResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIPortalCustomDomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIPortalCustomDomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update the API portal custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *APIPortalCustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "APIPortalCustomDomainsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, apiPortalCustomDomainResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *APIPortalCustomDomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiPortalName == "" { + return nil, errors.New("parameter apiPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, apiPortalCustomDomainResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the API portal custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - domainName - The name of the API portal custom domain. +// - options - APIPortalCustomDomainsClientBeginDeleteOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginDelete +// method. +func (client *APIPortalCustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[APIPortalCustomDomainsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIPortalCustomDomainsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIPortalCustomDomainsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the API portal custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *APIPortalCustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "APIPortalCustomDomainsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *APIPortalCustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiPortalName == "" { + return nil, errors.New("parameter apiPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the API portal custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - domainName - The name of the API portal custom domain. +// - options - APIPortalCustomDomainsClientGetOptions contains the optional parameters for the APIPortalCustomDomainsClient.Get +// method. +func (client *APIPortalCustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientGetOptions) (APIPortalCustomDomainsClientGetResponse, error) { + var err error + const operationName = "APIPortalCustomDomainsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) + if err != nil { + return APIPortalCustomDomainsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIPortalCustomDomainsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIPortalCustomDomainsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *APIPortalCustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiPortalName == "" { + return nil, errors.New("parameter apiPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *APIPortalCustomDomainsClient) getHandleResponse(resp *http.Response) (APIPortalCustomDomainsClientGetResponse, error) { + result := APIPortalCustomDomainsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalCustomDomainResource); err != nil { + return APIPortalCustomDomainsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handle requests to list all API portal custom domains. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - options - APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.NewListPager +// method. +func (client *APIPortalCustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalCustomDomainsClientListOptions) *runtime.Pager[APIPortalCustomDomainsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[APIPortalCustomDomainsClientListResponse]{ + More: func(page APIPortalCustomDomainsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *APIPortalCustomDomainsClientListResponse) (APIPortalCustomDomainsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIPortalCustomDomainsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) + }, nil) + if err != nil { + return APIPortalCustomDomainsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *APIPortalCustomDomainsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalCustomDomainsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiPortalName == "" { + return nil, errors.New("parameter apiPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *APIPortalCustomDomainsClient) listHandleResponse(resp *http.Response) (APIPortalCustomDomainsClientListResponse, error) { + result := APIPortalCustomDomainsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalCustomDomainResourceCollection); err != nil { + return APIPortalCustomDomainsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apiportals_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apiportals_client.go new file mode 100644 index 00000000..043dcc70 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apiportals_client.go @@ -0,0 +1,422 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// APIPortalsClient contains the methods for the APIPortals group. +// Don't use this type directly, use NewAPIPortalsClient() instead. +type APIPortalsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAPIPortalsClient creates a new instance of APIPortalsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAPIPortalsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIPortalsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &APIPortalsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create the default API portal or update the existing API portal. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - apiPortalResource - The API portal for the create or update operation +// - options - APIPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalsClient.BeginCreateOrUpdate +// method. +func (client *APIPortalsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apiPortalName, apiPortalResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIPortalsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIPortalsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create the default API portal or update the existing API portal. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *APIPortalsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "APIPortalsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, apiPortalResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *APIPortalsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiPortalName == "" { + return nil, errors.New("parameter apiPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, apiPortalResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the default API portal. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - options - APIPortalsClientBeginDeleteOptions contains the optional parameters for the APIPortalsClient.BeginDelete method. +func (client *APIPortalsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*runtime.Poller[APIPortalsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, apiPortalName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[APIPortalsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[APIPortalsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the default API portal. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *APIPortalsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "APIPortalsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *APIPortalsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiPortalName == "" { + return nil, errors.New("parameter apiPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the API portal and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - options - APIPortalsClientGetOptions contains the optional parameters for the APIPortalsClient.Get method. +func (client *APIPortalsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientGetOptions) (APIPortalsClientGetResponse, error) { + var err error + const operationName = "APIPortalsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) + if err != nil { + return APIPortalsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIPortalsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIPortalsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *APIPortalsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiPortalName == "" { + return nil, errors.New("parameter apiPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *APIPortalsClient) getHandleResponse(resp *http.Response) (APIPortalsClientGetResponse, error) { + result := APIPortalsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalResource); err != nil { + return APIPortalsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all resources in a Service. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.NewListPager method. +func (client *APIPortalsClient) NewListPager(resourceGroupName string, serviceName string, options *APIPortalsClientListOptions) *runtime.Pager[APIPortalsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[APIPortalsClientListResponse]{ + More: func(page APIPortalsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *APIPortalsClientListResponse) (APIPortalsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "APIPortalsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return APIPortalsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *APIPortalsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *APIPortalsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *APIPortalsClient) listHandleResponse(resp *http.Response) (APIPortalsClientListResponse, error) { + result := APIPortalsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalResourceCollection); err != nil { + return APIPortalsClientListResponse{}, err + } + return result, nil +} + +// ValidateDomain - Check the domains are valid as well as not in use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apiPortalName - The name of API portal. +// - validatePayload - Custom domain payload to be validated +// - options - APIPortalsClientValidateDomainOptions contains the optional parameters for the APIPortalsClient.ValidateDomain +// method. +func (client *APIPortalsClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, validatePayload CustomDomainValidatePayload, options *APIPortalsClientValidateDomainOptions) (APIPortalsClientValidateDomainResponse, error) { + var err error + const operationName = "APIPortalsClient.ValidateDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, validatePayload, options) + if err != nil { + return APIPortalsClientValidateDomainResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return APIPortalsClientValidateDomainResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return APIPortalsClientValidateDomainResponse{}, err + } + resp, err := client.validateDomainHandleResponse(httpResp) + return resp, err +} + +// validateDomainCreateRequest creates the ValidateDomain request. +func (client *APIPortalsClient) validateDomainCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, validatePayload CustomDomainValidatePayload, options *APIPortalsClientValidateDomainOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/validateDomain" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apiPortalName == "" { + return nil, errors.New("parameter apiPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, validatePayload); err != nil { + return nil, err + } + return req, nil +} + +// validateDomainHandleResponse handles the ValidateDomain response. +func (client *APIPortalsClient) validateDomainHandleResponse(resp *http.Response) (APIPortalsClientValidateDomainResponse, error) { + result := APIPortalsClientValidateDomainResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainValidateResult); err != nil { + return APIPortalsClientValidateDomainResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apms_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apms_client.go new file mode 100644 index 00000000..65bde16f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apms_client.go @@ -0,0 +1,418 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ApmsClient contains the methods for the Apms group. +// Don't use this type directly, use NewApmsClient() instead. +type ApmsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApmsClient creates a new instance of ApmsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApmsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApmsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApmsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update an APM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apmName - The name of the APM +// - apmResource - Parameters for the create or update operation +// - options - ApmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApmsClient.BeginCreateOrUpdate +// method. +func (client *ApmsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apmName string, apmResource ApmResource, options *ApmsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApmsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apmName, apmResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApmsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApmsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update an APM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ApmsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apmName string, apmResource ApmResource, options *ApmsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ApmsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apmName, apmResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ApmsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apmName string, apmResource ApmResource, options *ApmsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apms/{apmName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apmName == "" { + return nil, errors.New("parameter apmName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apmName}", url.PathEscape(apmName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, apmResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Operation to delete an APM +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apmName - The name of the APM +// - options - ApmsClientBeginDeleteOptions contains the optional parameters for the ApmsClient.BeginDelete method. +func (client *ApmsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, apmName string, options *ApmsClientBeginDeleteOptions) (*runtime.Poller[ApmsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, apmName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApmsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApmsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Operation to delete an APM +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ApmsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, apmName string, options *ApmsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ApmsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apmName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ApmsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apmName string, options *ApmsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apms/{apmName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apmName == "" { + return nil, errors.New("parameter apmName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apmName}", url.PathEscape(apmName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the APM by name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apmName - The name of the APM +// - options - ApmsClientGetOptions contains the optional parameters for the ApmsClient.Get method. +func (client *ApmsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apmName string, options *ApmsClientGetOptions) (ApmsClientGetResponse, error) { + var err error + const operationName = "ApmsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apmName, options) + if err != nil { + return ApmsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApmsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApmsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ApmsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apmName string, options *ApmsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apms/{apmName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apmName == "" { + return nil, errors.New("parameter apmName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apmName}", url.PathEscape(apmName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ApmsClient) getHandleResponse(resp *http.Response) (ApmsClientGetResponse, error) { + result := ApmsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApmResource); err != nil { + return ApmsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Get collection of APMs. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ApmsClientListOptions contains the optional parameters for the ApmsClient.NewListPager method. +func (client *ApmsClient) NewListPager(resourceGroupName string, serviceName string, options *ApmsClientListOptions) *runtime.Pager[ApmsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ApmsClientListResponse]{ + More: func(page ApmsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApmsClientListResponse) (ApmsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApmsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return ApmsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ApmsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ApmsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apms" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ApmsClient) listHandleResponse(resp *http.Response) (ApmsClientListResponse, error) { + result := ApmsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApmResourceCollection); err != nil { + return ApmsClientListResponse{}, err + } + return result, nil +} + +// ListSecretKeys - List keys of APM sensitive properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apmName - The name of the APM +// - options - ApmsClientListSecretKeysOptions contains the optional parameters for the ApmsClient.ListSecretKeys method. +func (client *ApmsClient) ListSecretKeys(ctx context.Context, resourceGroupName string, serviceName string, apmName string, options *ApmsClientListSecretKeysOptions) (ApmsClientListSecretKeysResponse, error) { + var err error + const operationName = "ApmsClient.ListSecretKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSecretKeysCreateRequest(ctx, resourceGroupName, serviceName, apmName, options) + if err != nil { + return ApmsClientListSecretKeysResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApmsClientListSecretKeysResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApmsClientListSecretKeysResponse{}, err + } + resp, err := client.listSecretKeysHandleResponse(httpResp) + return resp, err +} + +// listSecretKeysCreateRequest creates the ListSecretKeys request. +func (client *ApmsClient) listSecretKeysCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apmName string, options *ApmsClientListSecretKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apms/{apmName}/listSecretKeys" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if apmName == "" { + return nil, errors.New("parameter apmName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{apmName}", url.PathEscape(apmName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSecretKeysHandleResponse handles the ListSecretKeys response. +func (client *ApmsClient) listSecretKeysHandleResponse(resp *http.Response) (ApmsClientListSecretKeysResponse, error) { + result := ApmsClientListSecretKeysResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApmSecretKeys); err != nil { + return ApmsClientListSecretKeysResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/applicationaccelerators_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/applicationaccelerators_client.go new file mode 100644 index 00000000..73c63644 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/applicationaccelerators_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ApplicationAcceleratorsClient contains the methods for the ApplicationAccelerators group. +// Don't use this type directly, use NewApplicationAcceleratorsClient() instead. +type ApplicationAcceleratorsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApplicationAcceleratorsClient creates a new instance of ApplicationAcceleratorsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApplicationAcceleratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationAcceleratorsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApplicationAcceleratorsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update the application accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - applicationAcceleratorResource - The application accelerator for the create or update operation +// - options - ApplicationAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginCreateOrUpdate +// method. +func (client *ApplicationAcceleratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, applicationAcceleratorResource ApplicationAcceleratorResource, options *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationAcceleratorsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, applicationAcceleratorName, applicationAcceleratorResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationAcceleratorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationAcceleratorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update the application accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ApplicationAcceleratorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, applicationAcceleratorResource ApplicationAcceleratorResource, options *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationAcceleratorsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, applicationAcceleratorResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ApplicationAcceleratorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, applicationAcceleratorResource ApplicationAcceleratorResource, options *ApplicationAcceleratorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, applicationAcceleratorResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the application accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - options - ApplicationAcceleratorsClientBeginDeleteOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginDelete +// method. +func (client *ApplicationAcceleratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[ApplicationAcceleratorsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationAcceleratorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationAcceleratorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the application accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ApplicationAcceleratorsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationAcceleratorsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ApplicationAcceleratorsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the application accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - options - ApplicationAcceleratorsClientGetOptions contains the optional parameters for the ApplicationAcceleratorsClient.Get +// method. +func (client *ApplicationAcceleratorsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientGetOptions) (ApplicationAcceleratorsClientGetResponse, error) { + var err error + const operationName = "ApplicationAcceleratorsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) + if err != nil { + return ApplicationAcceleratorsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationAcceleratorsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationAcceleratorsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ApplicationAcceleratorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *ApplicationAcceleratorsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ApplicationAcceleratorsClient) getHandleResponse(resp *http.Response) (ApplicationAcceleratorsClientGetResponse, error) { + result := ApplicationAcceleratorsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationAcceleratorResource); err != nil { + return ApplicationAcceleratorsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handle requests to list all application accelerator. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ApplicationAcceleratorsClientListOptions contains the optional parameters for the ApplicationAcceleratorsClient.NewListPager +// method. +func (client *ApplicationAcceleratorsClient) NewListPager(resourceGroupName string, serviceName string, options *ApplicationAcceleratorsClientListOptions) *runtime.Pager[ApplicationAcceleratorsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationAcceleratorsClientListResponse]{ + More: func(page ApplicationAcceleratorsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationAcceleratorsClientListResponse) (ApplicationAcceleratorsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationAcceleratorsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return ApplicationAcceleratorsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ApplicationAcceleratorsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ApplicationAcceleratorsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ApplicationAcceleratorsClient) listHandleResponse(resp *http.Response) (ApplicationAcceleratorsClientListResponse, error) { + result := ApplicationAcceleratorsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationAcceleratorResourceCollection); err != nil { + return ApplicationAcceleratorsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/applicationliveviews_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/applicationliveviews_client.go new file mode 100644 index 00000000..a1b60673 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/applicationliveviews_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ApplicationLiveViewsClient contains the methods for the ApplicationLiveViews group. +// Don't use this type directly, use NewApplicationLiveViewsClient() instead. +type ApplicationLiveViewsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApplicationLiveViewsClient creates a new instance of ApplicationLiveViewsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApplicationLiveViewsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationLiveViewsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApplicationLiveViewsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create the default Application Live View or update the existing Application Live View. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationLiveViewName - The name of Application Live View. +// - applicationLiveViewResource - Parameters for the update operation +// - options - ApplicationLiveViewsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginCreateOrUpdate +// method. +func (client *ApplicationLiveViewsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, applicationLiveViewResource ApplicationLiveViewResource, options *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationLiveViewsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, applicationLiveViewName, applicationLiveViewResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationLiveViewsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationLiveViewsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create the default Application Live View or update the existing Application Live View. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ApplicationLiveViewsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, applicationLiveViewResource ApplicationLiveViewResource, options *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationLiveViewsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, applicationLiveViewName, applicationLiveViewResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ApplicationLiveViewsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, applicationLiveViewResource ApplicationLiveViewResource, options *ApplicationLiveViewsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationLiveViewName == "" { + return nil, errors.New("parameter applicationLiveViewName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationLiveViewName}", url.PathEscape(applicationLiveViewName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, applicationLiveViewResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Disable the default Application Live View. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationLiveViewName - The name of Application Live View. +// - options - ApplicationLiveViewsClientBeginDeleteOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginDelete +// method. +func (client *ApplicationLiveViewsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientBeginDeleteOptions) (*runtime.Poller[ApplicationLiveViewsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, applicationLiveViewName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationLiveViewsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationLiveViewsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Disable the default Application Live View. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ApplicationLiveViewsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationLiveViewsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, applicationLiveViewName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ApplicationLiveViewsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationLiveViewName == "" { + return nil, errors.New("parameter applicationLiveViewName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationLiveViewName}", url.PathEscape(applicationLiveViewName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the Application Live and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationLiveViewName - The name of Application Live View. +// - options - ApplicationLiveViewsClientGetOptions contains the optional parameters for the ApplicationLiveViewsClient.Get +// method. +func (client *ApplicationLiveViewsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientGetOptions) (ApplicationLiveViewsClientGetResponse, error) { + var err error + const operationName = "ApplicationLiveViewsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationLiveViewName, options) + if err != nil { + return ApplicationLiveViewsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationLiveViewsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationLiveViewsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ApplicationLiveViewsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationLiveViewName string, options *ApplicationLiveViewsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews/{applicationLiveViewName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationLiveViewName == "" { + return nil, errors.New("parameter applicationLiveViewName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationLiveViewName}", url.PathEscape(applicationLiveViewName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ApplicationLiveViewsClient) getHandleResponse(resp *http.Response) (ApplicationLiveViewsClientGetResponse, error) { + result := ApplicationLiveViewsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationLiveViewResource); err != nil { + return ApplicationLiveViewsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all resources in a Service. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ApplicationLiveViewsClientListOptions contains the optional parameters for the ApplicationLiveViewsClient.NewListPager +// method. +func (client *ApplicationLiveViewsClient) NewListPager(resourceGroupName string, serviceName string, options *ApplicationLiveViewsClientListOptions) *runtime.Pager[ApplicationLiveViewsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationLiveViewsClientListResponse]{ + More: func(page ApplicationLiveViewsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationLiveViewsClientListResponse) (ApplicationLiveViewsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationLiveViewsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return ApplicationLiveViewsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ApplicationLiveViewsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ApplicationLiveViewsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationLiveViews" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ApplicationLiveViewsClient) listHandleResponse(resp *http.Response) (ApplicationLiveViewsClientListResponse, error) { + result := ApplicationLiveViewsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationLiveViewResourceCollection); err != nil { + return ApplicationLiveViewsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apps_client.go new file mode 100644 index 00000000..9932c3be --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/apps_client.go @@ -0,0 +1,666 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AppsClient contains the methods for the Apps group. +// Don't use this type directly, use NewAppsClient() instead. +type AppsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAppsClient creates a new instance of AppsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AppsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AppsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create a new App or update an exiting App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - appResource - Parameters for the create or update operation +// - options - AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate +// method. +func (client *AppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AppsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, appResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AppsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AppsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create a new App or update an exiting App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *AppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AppsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, appResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AppsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Operation to delete an App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method. +func (client *AppsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*runtime.Poller[AppsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AppsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AppsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Operation to delete an App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *AppsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AppsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AppsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get an App and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - AppsClientGetOptions contains the optional parameters for the AppsClient.Get method. +func (client *AppsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetOptions) (AppsClientGetResponse, error) { + var err error + const operationName = "AppsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, options) + if err != nil { + return AppsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AppsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AppsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AppsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + if options != nil && options.SyncStatus != nil { + reqQP.Set("syncStatus", *options.SyncStatus) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AppsClient) getHandleResponse(resp *http.Response) (AppsClientGetResponse, error) { + result := AppsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppResource); err != nil { + return AppsClientGetResponse{}, err + } + return result, nil +} + +// GetResourceUploadURL - Get an resource upload URL for an App, which may be artifacts or source archive. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL +// method. +func (client *AppsClient) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetResourceUploadURLOptions) (AppsClientGetResourceUploadURLResponse, error) { + var err error + const operationName = "AppsClient.GetResourceUploadURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getResourceUploadURLCreateRequest(ctx, resourceGroupName, serviceName, appName, options) + if err != nil { + return AppsClientGetResourceUploadURLResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AppsClientGetResourceUploadURLResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AppsClientGetResourceUploadURLResponse{}, err + } + resp, err := client.getResourceUploadURLHandleResponse(httpResp) + return resp, err +} + +// getResourceUploadURLCreateRequest creates the GetResourceUploadURL request. +func (client *AppsClient) getResourceUploadURLCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetResourceUploadURLOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getResourceUploadURLHandleResponse handles the GetResourceUploadURL response. +func (client *AppsClient) getResourceUploadURLHandleResponse(resp *http.Response) (AppsClientGetResourceUploadURLResponse, error) { + result := AppsClientGetResourceUploadURLResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceUploadDefinition); err != nil { + return AppsClientGetResourceUploadURLResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all resources in a Service. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - AppsClientListOptions contains the optional parameters for the AppsClient.NewListPager method. +func (client *AppsClient) NewListPager(resourceGroupName string, serviceName string, options *AppsClientListOptions) *runtime.Pager[AppsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AppsClientListResponse]{ + More: func(page AppsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AppsClientListResponse) (AppsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AppsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return AppsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AppsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *AppsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AppsClient) listHandleResponse(resp *http.Response) (AppsClientListResponse, error) { + result := AppsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppResourceCollection); err != nil { + return AppsClientListResponse{}, err + } + return result, nil +} + +// BeginSetActiveDeployments - Set existing Deployment under the app as active +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - activeDeploymentCollection - A list of Deployment name to be active. +// - options - AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments +// method. +func (client *AppsClient) BeginSetActiveDeployments(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*runtime.Poller[AppsClientSetActiveDeploymentsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.setActiveDeployments(ctx, resourceGroupName, serviceName, appName, activeDeploymentCollection, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AppsClientSetActiveDeploymentsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AppsClientSetActiveDeploymentsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SetActiveDeployments - Set existing Deployment under the app as active +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *AppsClient) setActiveDeployments(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*http.Response, error) { + var err error + const operationName = "AppsClient.BeginSetActiveDeployments" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.setActiveDeploymentsCreateRequest(ctx, resourceGroupName, serviceName, appName, activeDeploymentCollection, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// setActiveDeploymentsCreateRequest creates the SetActiveDeployments request. +func (client *AppsClient) setActiveDeploymentsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/setActiveDeployments" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, activeDeploymentCollection); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdate - Operation to update an exiting App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - appResource - Parameters for the update operation +// - options - AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method. +func (client *AppsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*runtime.Poller[AppsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serviceName, appName, appResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AppsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AppsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Operation to update an exiting App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *AppsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AppsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, appResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *AppsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appResource); err != nil { + return nil, err + } + return req, nil +} + +// ValidateDomain - Check the resource name is valid as well as not in use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - validatePayload - Custom domain payload to be validated +// - options - AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method. +func (client *AppsClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, appName string, validatePayload CustomDomainValidatePayload, options *AppsClientValidateDomainOptions) (AppsClientValidateDomainResponse, error) { + var err error + const operationName = "AppsClient.ValidateDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, appName, validatePayload, options) + if err != nil { + return AppsClientValidateDomainResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AppsClientValidateDomainResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AppsClientValidateDomainResponse{}, err + } + resp, err := client.validateDomainHandleResponse(httpResp) + return resp, err +} + +// validateDomainCreateRequest creates the ValidateDomain request. +func (client *AppsClient) validateDomainCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, validatePayload CustomDomainValidatePayload, options *AppsClientValidateDomainOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/validateDomain" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, validatePayload); err != nil { + return nil, err + } + return req, nil +} + +// validateDomainHandleResponse handles the ValidateDomain response. +func (client *AppsClient) validateDomainHandleResponse(resp *http.Response) (AppsClientValidateDomainResponse, error) { + result := AppsClientValidateDomainResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainValidateResult); err != nil { + return AppsClientValidateDomainResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/assets.json new file mode 100644 index 00000000..b49a3628 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/appplatform/armappplatform", + "Tag": "go/resourcemanager/appplatform/armappplatform_30c0c07f2b" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/autorest.md new file mode 100644 index 00000000..314b3b2e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/685aad3f33d355c1d9c89d493ee9398865367bd8/specification/appplatform/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/685aad3f33d355c1d9c89d493ee9398865367bd8/specification/appplatform/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 2.0.0 +tag: package-2023-12 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/bindings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/bindings_client.go new file mode 100644 index 00000000..0092e379 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/bindings_client.go @@ -0,0 +1,457 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BindingsClient contains the methods for the Bindings group. +// Don't use this type directly, use NewBindingsClient() instead. +type BindingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBindingsClient creates a new instance of BindingsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBindingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BindingsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BindingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create a new Binding or update an exiting Binding. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - bindingResource - Parameters for the create or update operation +// - options - BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate +// method. +func (client *BindingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BindingsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BindingsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BindingsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create a new Binding or update an exiting Binding. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *BindingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BindingsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BindingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if bindingName == "" { + return nil, errors.New("parameter bindingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bindingName}", url.PathEscape(bindingName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, bindingResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Operation to delete a Binding. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - options - BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method. +func (client *BindingsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*runtime.Poller[BindingsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, bindingName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BindingsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BindingsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Operation to delete a Binding. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *BindingsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BindingsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BindingsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if bindingName == "" { + return nil, errors.New("parameter bindingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bindingName}", url.PathEscape(bindingName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a Binding and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - options - BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method. +func (client *BindingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientGetOptions) (BindingsClientGetResponse, error) { + var err error + const operationName = "BindingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, options) + if err != nil { + return BindingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BindingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BindingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BindingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if bindingName == "" { + return nil, errors.New("parameter bindingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bindingName}", url.PathEscape(bindingName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BindingsClient) getHandleResponse(resp *http.Response) (BindingsClientGetResponse, error) { + result := BindingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BindingResource); err != nil { + return BindingsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all resources in an App. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - BindingsClientListOptions contains the optional parameters for the BindingsClient.NewListPager method. +func (client *BindingsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *BindingsClientListOptions) *runtime.Pager[BindingsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BindingsClientListResponse]{ + More: func(page BindingsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BindingsClientListResponse) (BindingsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BindingsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, appName, options) + }, nil) + if err != nil { + return BindingsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BindingsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *BindingsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BindingsClient) listHandleResponse(resp *http.Response) (BindingsClientListResponse, error) { + result := BindingsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BindingResourceCollection); err != nil { + return BindingsClientListResponse{}, err + } + return result, nil +} + +// BeginUpdate - Operation to update an exiting Binding. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - bindingName - The name of the Binding resource. +// - bindingResource - Parameters for the update operation +// - options - BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method. +func (client *BindingsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*runtime.Poller[BindingsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BindingsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BindingsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Operation to update an exiting Binding. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *BindingsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BindingsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *BindingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if bindingName == "" { + return nil, errors.New("parameter bindingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bindingName}", url.PathEscape(bindingName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, bindingResource); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/build.go new file mode 100644 index 00000000..6717a155 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/appplatform/armappplatform + +package armappplatform diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildpackbinding_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildpackbinding_client.go new file mode 100644 index 00000000..fab217ce --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildpackbinding_client.go @@ -0,0 +1,455 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BuildpackBindingClient contains the methods for the BuildpackBinding group. +// Don't use this type directly, use NewBuildpackBindingClient() instead. +type BuildpackBindingClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBuildpackBindingClient creates a new instance of BuildpackBindingClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBuildpackBindingClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildpackBindingClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BuildpackBindingClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a buildpack binding. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - buildpackBindingName - The name of the Buildpack Binding Name +// - buildpackBinding - The target buildpack binding for the create or update operation +// - options - BuildpackBindingClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildpackBindingClient.BeginCreateOrUpdate +// method. +func (client *BuildpackBindingClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildpackBindingClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, buildpackBinding, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildpackBindingClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildpackBindingClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a buildpack binding. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *BuildpackBindingClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BuildpackBindingClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, buildpackBinding, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BuildpackBindingClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if builderName == "" { + return nil, errors.New("parameter builderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) + if buildpackBindingName == "" { + return nil, errors.New("parameter buildpackBindingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildpackBindingName}", url.PathEscape(buildpackBindingName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, buildpackBinding); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Operation to delete a Buildpack Binding +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - buildpackBindingName - The name of the Buildpack Binding Name +// - options - BuildpackBindingClientBeginDeleteOptions contains the optional parameters for the BuildpackBindingClient.BeginDelete +// method. +func (client *BuildpackBindingClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*runtime.Poller[BuildpackBindingClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildpackBindingClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildpackBindingClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Operation to delete a Buildpack Binding +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *BuildpackBindingClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BuildpackBindingClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BuildpackBindingClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if builderName == "" { + return nil, errors.New("parameter builderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) + if buildpackBindingName == "" { + return nil, errors.New("parameter buildpackBindingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildpackBindingName}", url.PathEscape(buildpackBindingName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a buildpack binding by name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - buildpackBindingName - The name of the Buildpack Binding Name +// - options - BuildpackBindingClientGetOptions contains the optional parameters for the BuildpackBindingClient.Get method. +func (client *BuildpackBindingClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientGetOptions) (BuildpackBindingClientGetResponse, error) { + var err error + const operationName = "BuildpackBindingClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) + if err != nil { + return BuildpackBindingClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildpackBindingClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildpackBindingClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BuildpackBindingClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if builderName == "" { + return nil, errors.New("parameter builderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) + if buildpackBindingName == "" { + return nil, errors.New("parameter buildpackBindingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildpackBindingName}", url.PathEscape(buildpackBindingName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BuildpackBindingClient) getHandleResponse(resp *http.Response) (BuildpackBindingClientGetResponse, error) { + result := BuildpackBindingClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildpackBindingResource); err != nil { + return BuildpackBindingClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all buildpack bindings in a builder. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.NewListPager +// method. +func (client *BuildpackBindingClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildpackBindingClientListOptions) *runtime.Pager[BuildpackBindingClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BuildpackBindingClientListResponse]{ + More: func(page BuildpackBindingClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BuildpackBindingClientListResponse) (BuildpackBindingClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BuildpackBindingClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) + }, nil) + if err != nil { + return BuildpackBindingClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BuildpackBindingClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildpackBindingClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if builderName == "" { + return nil, errors.New("parameter builderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BuildpackBindingClient) listHandleResponse(resp *http.Response) (BuildpackBindingClientListResponse, error) { + result := BuildpackBindingClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildpackBindingResourceCollection); err != nil { + return BuildpackBindingClientListResponse{}, err + } + return result, nil +} + +// NewListForClusterPager - Get collection of buildpack bindings under all builders. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - BuildpackBindingClientListForClusterOptions contains the optional parameters for the BuildpackBindingClient.NewListForClusterPager +// method. +func (client *BuildpackBindingClient) NewListForClusterPager(resourceGroupName string, serviceName string, options *BuildpackBindingClientListForClusterOptions) *runtime.Pager[BuildpackBindingClientListForClusterResponse] { + return runtime.NewPager(runtime.PagingHandler[BuildpackBindingClientListForClusterResponse]{ + More: func(page BuildpackBindingClientListForClusterResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BuildpackBindingClientListForClusterResponse) (BuildpackBindingClientListForClusterResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BuildpackBindingClient.NewListForClusterPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listForClusterCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return BuildpackBindingClientListForClusterResponse{}, err + } + return client.listForClusterHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listForClusterCreateRequest creates the ListForCluster request. +func (client *BuildpackBindingClient) listForClusterCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *BuildpackBindingClientListForClusterOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildpackBindings" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listForClusterHandleResponse handles the ListForCluster response. +func (client *BuildpackBindingClient) listForClusterHandleResponse(resp *http.Response) (BuildpackBindingClientListForClusterResponse, error) { + result := BuildpackBindingClientListForClusterResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildpackBindingResourceCollection); err != nil { + return BuildpackBindingClientListForClusterResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildservice_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildservice_client.go new file mode 100644 index 00000000..2f0f6284 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildservice_client.go @@ -0,0 +1,1186 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BuildServiceClient contains the methods for the BuildService group. +// Don't use this type directly, use NewBuildServiceClient() instead. +type BuildServiceClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBuildServiceClient creates a new instance of BuildServiceClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBuildServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BuildServiceClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create a build service resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildService - Parameters for the create operation +// - options - BuildServiceClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceClient.BeginCreateOrUpdate +// method. +func (client *BuildServiceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildService BuildService, options *BuildServiceClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildServiceClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, buildServiceName, buildService, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildServiceClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildServiceClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create a build service resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *BuildServiceClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildService BuildService, options *BuildServiceClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BuildServiceClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildService, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BuildServiceClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildService BuildService, options *BuildServiceClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, buildService); err != nil { + return nil, err + } + return req, nil +} + +// CreateOrUpdateBuild - Create or update a KPack build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - buildParam - Parameters for the create or update operation +// - options - BuildServiceClientCreateOrUpdateBuildOptions contains the optional parameters for the BuildServiceClient.CreateOrUpdateBuild +// method. +func (client *BuildServiceClient) CreateOrUpdateBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildParam Build, options *BuildServiceClientCreateOrUpdateBuildOptions) (BuildServiceClientCreateOrUpdateBuildResponse, error) { + var err error + const operationName = "BuildServiceClient.CreateOrUpdateBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateBuildCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildParam, options) + if err != nil { + return BuildServiceClientCreateOrUpdateBuildResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceClientCreateOrUpdateBuildResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return BuildServiceClientCreateOrUpdateBuildResponse{}, err + } + resp, err := client.createOrUpdateBuildHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateBuildCreateRequest creates the CreateOrUpdateBuild request. +func (client *BuildServiceClient) createOrUpdateBuildCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildParam Build, options *BuildServiceClientCreateOrUpdateBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if buildName == "" { + return nil, errors.New("parameter buildName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, buildParam); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateBuildHandleResponse handles the CreateOrUpdateBuild response. +func (client *BuildServiceClient) createOrUpdateBuildHandleResponse(resp *http.Response) (BuildServiceClientCreateOrUpdateBuildResponse, error) { + result := BuildServiceClientCreateOrUpdateBuildResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Build); err != nil { + return BuildServiceClientCreateOrUpdateBuildResponse{}, err + } + return result, nil +} + +// BeginDeleteBuild - delete a KPack build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - options - BuildServiceClientBeginDeleteBuildOptions contains the optional parameters for the BuildServiceClient.BeginDeleteBuild +// method. +func (client *BuildServiceClient) BeginDeleteBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientBeginDeleteBuildOptions) (*runtime.Poller[BuildServiceClientDeleteBuildResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteBuild(ctx, resourceGroupName, serviceName, buildServiceName, buildName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildServiceClientDeleteBuildResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildServiceClientDeleteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeleteBuild - delete a KPack build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *BuildServiceClient) deleteBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientBeginDeleteBuildOptions) (*http.Response, error) { + var err error + const operationName = "BuildServiceClient.BeginDeleteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteBuildCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteBuildCreateRequest creates the DeleteBuild request. +func (client *BuildServiceClient) deleteBuildCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientBeginDeleteBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if buildName == "" { + return nil, errors.New("parameter buildName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetBuild - Get a KPack build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - options - BuildServiceClientGetBuildOptions contains the optional parameters for the BuildServiceClient.GetBuild method. +func (client *BuildServiceClient) GetBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientGetBuildOptions) (BuildServiceClientGetBuildResponse, error) { + var err error + const operationName = "BuildServiceClient.GetBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBuildCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, options) + if err != nil { + return BuildServiceClientGetBuildResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceClientGetBuildResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceClientGetBuildResponse{}, err + } + resp, err := client.getBuildHandleResponse(httpResp) + return resp, err +} + +// getBuildCreateRequest creates the GetBuild request. +func (client *BuildServiceClient) getBuildCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientGetBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if buildName == "" { + return nil, errors.New("parameter buildName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildHandleResponse handles the GetBuild response. +func (client *BuildServiceClient) getBuildHandleResponse(resp *http.Response) (BuildServiceClientGetBuildResponse, error) { + result := BuildServiceClientGetBuildResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Build); err != nil { + return BuildServiceClientGetBuildResponse{}, err + } + return result, nil +} + +// GetBuildResult - Get a KPack build result. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - buildResultName - The name of the build result resource. +// - options - BuildServiceClientGetBuildResultOptions contains the optional parameters for the BuildServiceClient.GetBuildResult +// method. +func (client *BuildServiceClient) GetBuildResult(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultOptions) (BuildServiceClientGetBuildResultResponse, error) { + var err error + const operationName = "BuildServiceClient.GetBuildResult" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBuildResultCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName, options) + if err != nil { + return BuildServiceClientGetBuildResultResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceClientGetBuildResultResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceClientGetBuildResultResponse{}, err + } + resp, err := client.getBuildResultHandleResponse(httpResp) + return resp, err +} + +// getBuildResultCreateRequest creates the GetBuildResult request. +func (client *BuildServiceClient) getBuildResultCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if buildName == "" { + return nil, errors.New("parameter buildName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) + if buildResultName == "" { + return nil, errors.New("parameter buildResultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildResultName}", url.PathEscape(buildResultName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildResultHandleResponse handles the GetBuildResult response. +func (client *BuildServiceClient) getBuildResultHandleResponse(resp *http.Response) (BuildServiceClientGetBuildResultResponse, error) { + result := BuildServiceClientGetBuildResultResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildResult); err != nil { + return BuildServiceClientGetBuildResultResponse{}, err + } + return result, nil +} + +// GetBuildResultLog - Get a KPack build result log download URL. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - buildResultName - The name of the build result resource. +// - options - BuildServiceClientGetBuildResultLogOptions contains the optional parameters for the BuildServiceClient.GetBuildResultLog +// method. +func (client *BuildServiceClient) GetBuildResultLog(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultLogOptions) (BuildServiceClientGetBuildResultLogResponse, error) { + var err error + const operationName = "BuildServiceClient.GetBuildResultLog" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBuildResultLogCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName, options) + if err != nil { + return BuildServiceClientGetBuildResultLogResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceClientGetBuildResultLogResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceClientGetBuildResultLogResponse{}, err + } + resp, err := client.getBuildResultLogHandleResponse(httpResp) + return resp, err +} + +// getBuildResultLogCreateRequest creates the GetBuildResultLog request. +func (client *BuildServiceClient) getBuildResultLogCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultLogOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName}/getLogFileUrl" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if buildName == "" { + return nil, errors.New("parameter buildName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) + if buildResultName == "" { + return nil, errors.New("parameter buildResultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildResultName}", url.PathEscape(buildResultName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildResultLogHandleResponse handles the GetBuildResultLog response. +func (client *BuildServiceClient) getBuildResultLogHandleResponse(resp *http.Response) (BuildServiceClientGetBuildResultLogResponse, error) { + result := BuildServiceClientGetBuildResultLogResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildResultLog); err != nil { + return BuildServiceClientGetBuildResultLogResponse{}, err + } + return result, nil +} + +// GetBuildService - Get a build service resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientGetBuildServiceOptions contains the optional parameters for the BuildServiceClient.GetBuildService +// method. +func (client *BuildServiceClient) GetBuildService(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetBuildServiceOptions) (BuildServiceClientGetBuildServiceResponse, error) { + var err error + const operationName = "BuildServiceClient.GetBuildService" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBuildServiceCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) + if err != nil { + return BuildServiceClientGetBuildServiceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceClientGetBuildServiceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceClientGetBuildServiceResponse{}, err + } + resp, err := client.getBuildServiceHandleResponse(httpResp) + return resp, err +} + +// getBuildServiceCreateRequest creates the GetBuildService request. +func (client *BuildServiceClient) getBuildServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetBuildServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildServiceHandleResponse handles the GetBuildService response. +func (client *BuildServiceClient) getBuildServiceHandleResponse(resp *http.Response) (BuildServiceClientGetBuildServiceResponse, error) { + result := BuildServiceClientGetBuildServiceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildService); err != nil { + return BuildServiceClientGetBuildServiceResponse{}, err + } + return result, nil +} + +// GetResourceUploadURL - Get an resource upload URL for build service, which may be artifacts or source archive. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientGetResourceUploadURLOptions contains the optional parameters for the BuildServiceClient.GetResourceUploadURL +// method. +func (client *BuildServiceClient) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetResourceUploadURLOptions) (BuildServiceClientGetResourceUploadURLResponse, error) { + var err error + const operationName = "BuildServiceClient.GetResourceUploadURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getResourceUploadURLCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) + if err != nil { + return BuildServiceClientGetResourceUploadURLResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceClientGetResourceUploadURLResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceClientGetResourceUploadURLResponse{}, err + } + resp, err := client.getResourceUploadURLHandleResponse(httpResp) + return resp, err +} + +// getResourceUploadURLCreateRequest creates the GetResourceUploadURL request. +func (client *BuildServiceClient) getResourceUploadURLCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetResourceUploadURLOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/getResourceUploadUrl" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getResourceUploadURLHandleResponse handles the GetResourceUploadURL response. +func (client *BuildServiceClient) getResourceUploadURLHandleResponse(resp *http.Response) (BuildServiceClientGetResourceUploadURLResponse, error) { + result := BuildServiceClientGetResourceUploadURLResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceUploadDefinition); err != nil { + return BuildServiceClientGetResourceUploadURLResponse{}, err + } + return result, nil +} + +// GetSupportedBuildpack - Get the supported buildpack resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildpackName - The name of the buildpack resource. +// - options - BuildServiceClientGetSupportedBuildpackOptions contains the optional parameters for the BuildServiceClient.GetSupportedBuildpack +// method. +func (client *BuildServiceClient) GetSupportedBuildpack(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildpackName string, options *BuildServiceClientGetSupportedBuildpackOptions) (BuildServiceClientGetSupportedBuildpackResponse, error) { + var err error + const operationName = "BuildServiceClient.GetSupportedBuildpack" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSupportedBuildpackCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildpackName, options) + if err != nil { + return BuildServiceClientGetSupportedBuildpackResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceClientGetSupportedBuildpackResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceClientGetSupportedBuildpackResponse{}, err + } + resp, err := client.getSupportedBuildpackHandleResponse(httpResp) + return resp, err +} + +// getSupportedBuildpackCreateRequest creates the GetSupportedBuildpack request. +func (client *BuildServiceClient) getSupportedBuildpackCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildpackName string, options *BuildServiceClientGetSupportedBuildpackOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if buildpackName == "" { + return nil, errors.New("parameter buildpackName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildpackName}", url.PathEscape(buildpackName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSupportedBuildpackHandleResponse handles the GetSupportedBuildpack response. +func (client *BuildServiceClient) getSupportedBuildpackHandleResponse(resp *http.Response) (BuildServiceClientGetSupportedBuildpackResponse, error) { + result := BuildServiceClientGetSupportedBuildpackResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SupportedBuildpackResource); err != nil { + return BuildServiceClientGetSupportedBuildpackResponse{}, err + } + return result, nil +} + +// GetSupportedStack - Get the supported stack resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - stackName - The name of the stack resource. +// - options - BuildServiceClientGetSupportedStackOptions contains the optional parameters for the BuildServiceClient.GetSupportedStack +// method. +func (client *BuildServiceClient) GetSupportedStack(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, stackName string, options *BuildServiceClientGetSupportedStackOptions) (BuildServiceClientGetSupportedStackResponse, error) { + var err error + const operationName = "BuildServiceClient.GetSupportedStack" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSupportedStackCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, stackName, options) + if err != nil { + return BuildServiceClientGetSupportedStackResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceClientGetSupportedStackResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceClientGetSupportedStackResponse{}, err + } + resp, err := client.getSupportedStackHandleResponse(httpResp) + return resp, err +} + +// getSupportedStackCreateRequest creates the GetSupportedStack request. +func (client *BuildServiceClient) getSupportedStackCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, stackName string, options *BuildServiceClientGetSupportedStackOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks/{stackName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if stackName == "" { + return nil, errors.New("parameter stackName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{stackName}", url.PathEscape(stackName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSupportedStackHandleResponse handles the GetSupportedStack response. +func (client *BuildServiceClient) getSupportedStackHandleResponse(resp *http.Response) (BuildServiceClientGetSupportedStackResponse, error) { + result := BuildServiceClientGetSupportedStackResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SupportedStackResource); err != nil { + return BuildServiceClientGetSupportedStackResponse{}, err + } + return result, nil +} + +// NewListBuildResultsPager - List KPack build results. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - buildName - The name of the build resource. +// - options - BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.NewListBuildResultsPager +// method. +func (client *BuildServiceClient) NewListBuildResultsPager(resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientListBuildResultsOptions) *runtime.Pager[BuildServiceClientListBuildResultsResponse] { + return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildResultsResponse]{ + More: func(page BuildServiceClientListBuildResultsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BuildServiceClientListBuildResultsResponse) (BuildServiceClientListBuildResultsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BuildServiceClient.NewListBuildResultsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBuildResultsCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, options) + }, nil) + if err != nil { + return BuildServiceClientListBuildResultsResponse{}, err + } + return client.listBuildResultsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBuildResultsCreateRequest creates the ListBuildResults request. +func (client *BuildServiceClient) listBuildResultsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientListBuildResultsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if buildName == "" { + return nil, errors.New("parameter buildName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBuildResultsHandleResponse handles the ListBuildResults response. +func (client *BuildServiceClient) listBuildResultsHandleResponse(resp *http.Response) (BuildServiceClientListBuildResultsResponse, error) { + result := BuildServiceClientListBuildResultsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildResultCollection); err != nil { + return BuildServiceClientListBuildResultsResponse{}, err + } + return result, nil +} + +// NewListBuildServicesPager - List build services resource. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.NewListBuildServicesPager +// method. +func (client *BuildServiceClient) NewListBuildServicesPager(resourceGroupName string, serviceName string, options *BuildServiceClientListBuildServicesOptions) *runtime.Pager[BuildServiceClientListBuildServicesResponse] { + return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildServicesResponse]{ + More: func(page BuildServiceClientListBuildServicesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BuildServiceClientListBuildServicesResponse) (BuildServiceClientListBuildServicesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BuildServiceClient.NewListBuildServicesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBuildServicesCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return BuildServiceClientListBuildServicesResponse{}, err + } + return client.listBuildServicesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBuildServicesCreateRequest creates the ListBuildServices request. +func (client *BuildServiceClient) listBuildServicesCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *BuildServiceClientListBuildServicesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBuildServicesHandleResponse handles the ListBuildServices response. +func (client *BuildServiceClient) listBuildServicesHandleResponse(resp *http.Response) (BuildServiceClientListBuildServicesResponse, error) { + result := BuildServiceClientListBuildServicesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildServiceCollection); err != nil { + return BuildServiceClientListBuildServicesResponse{}, err + } + return result, nil +} + +// NewListBuildsPager - List KPack builds. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.NewListBuildsPager +// method. +func (client *BuildServiceClient) NewListBuildsPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListBuildsOptions) *runtime.Pager[BuildServiceClientListBuildsResponse] { + return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildsResponse]{ + More: func(page BuildServiceClientListBuildsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BuildServiceClientListBuildsResponse) (BuildServiceClientListBuildsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BuildServiceClient.NewListBuildsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBuildsCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) + }, nil) + if err != nil { + return BuildServiceClientListBuildsResponse{}, err + } + return client.listBuildsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBuildsCreateRequest creates the ListBuilds request. +func (client *BuildServiceClient) listBuildsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListBuildsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBuildsHandleResponse handles the ListBuilds response. +func (client *BuildServiceClient) listBuildsHandleResponse(resp *http.Response) (BuildServiceClientListBuildsResponse, error) { + result := BuildServiceClientListBuildsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildCollection); err != nil { + return BuildServiceClientListBuildsResponse{}, err + } + return result, nil +} + +// ListSupportedBuildpacks - Get all supported buildpacks. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientListSupportedBuildpacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedBuildpacks +// method. +func (client *BuildServiceClient) ListSupportedBuildpacks(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedBuildpacksOptions) (BuildServiceClientListSupportedBuildpacksResponse, error) { + var err error + const operationName = "BuildServiceClient.ListSupportedBuildpacks" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSupportedBuildpacksCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) + if err != nil { + return BuildServiceClientListSupportedBuildpacksResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceClientListSupportedBuildpacksResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceClientListSupportedBuildpacksResponse{}, err + } + resp, err := client.listSupportedBuildpacksHandleResponse(httpResp) + return resp, err +} + +// listSupportedBuildpacksCreateRequest creates the ListSupportedBuildpacks request. +func (client *BuildServiceClient) listSupportedBuildpacksCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedBuildpacksOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSupportedBuildpacksHandleResponse handles the ListSupportedBuildpacks response. +func (client *BuildServiceClient) listSupportedBuildpacksHandleResponse(resp *http.Response) (BuildServiceClientListSupportedBuildpacksResponse, error) { + result := BuildServiceClientListSupportedBuildpacksResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SupportedBuildpacksCollection); err != nil { + return BuildServiceClientListSupportedBuildpacksResponse{}, err + } + return result, nil +} + +// ListSupportedStacks - Get all supported stacks. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceClientListSupportedStacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedStacks +// method. +func (client *BuildServiceClient) ListSupportedStacks(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedStacksOptions) (BuildServiceClientListSupportedStacksResponse, error) { + var err error + const operationName = "BuildServiceClient.ListSupportedStacks" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSupportedStacksCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) + if err != nil { + return BuildServiceClientListSupportedStacksResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceClientListSupportedStacksResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceClientListSupportedStacksResponse{}, err + } + resp, err := client.listSupportedStacksHandleResponse(httpResp) + return resp, err +} + +// listSupportedStacksCreateRequest creates the ListSupportedStacks request. +func (client *BuildServiceClient) listSupportedStacksCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedStacksOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSupportedStacksHandleResponse handles the ListSupportedStacks response. +func (client *BuildServiceClient) listSupportedStacksHandleResponse(resp *http.Response) (BuildServiceClientListSupportedStacksResponse, error) { + result := BuildServiceClientListSupportedStacksResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SupportedStacksCollection); err != nil { + return BuildServiceClientListSupportedStacksResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildserviceagentpool_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildserviceagentpool_client.go new file mode 100644 index 00000000..7d12833d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildserviceagentpool_client.go @@ -0,0 +1,283 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BuildServiceAgentPoolClient contains the methods for the BuildServiceAgentPool group. +// Don't use this type directly, use NewBuildServiceAgentPoolClient() instead. +type BuildServiceAgentPoolClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBuildServiceAgentPoolClient creates a new instance of BuildServiceAgentPoolClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBuildServiceAgentPoolClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceAgentPoolClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BuildServiceAgentPoolClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get build service agent pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - agentPoolName - The name of the build service agent pool resource. +// - options - BuildServiceAgentPoolClientGetOptions contains the optional parameters for the BuildServiceAgentPoolClient.Get +// method. +func (client *BuildServiceAgentPoolClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, options *BuildServiceAgentPoolClientGetOptions) (BuildServiceAgentPoolClientGetResponse, error) { + var err error + const operationName = "BuildServiceAgentPoolClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, options) + if err != nil { + return BuildServiceAgentPoolClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceAgentPoolClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceAgentPoolClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BuildServiceAgentPoolClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, options *BuildServiceAgentPoolClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if agentPoolName == "" { + return nil, errors.New("parameter agentPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BuildServiceAgentPoolClient) getHandleResponse(resp *http.Response) (BuildServiceAgentPoolClientGetResponse, error) { + result := BuildServiceAgentPoolClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildServiceAgentPoolResource); err != nil { + return BuildServiceAgentPoolClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List build service agent pool. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.NewListPager +// method. +func (client *BuildServiceAgentPoolClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceAgentPoolClientListOptions) *runtime.Pager[BuildServiceAgentPoolClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BuildServiceAgentPoolClientListResponse]{ + More: func(page BuildServiceAgentPoolClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BuildServiceAgentPoolClientListResponse) (BuildServiceAgentPoolClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BuildServiceAgentPoolClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) + }, nil) + if err != nil { + return BuildServiceAgentPoolClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BuildServiceAgentPoolClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceAgentPoolClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BuildServiceAgentPoolClient) listHandleResponse(resp *http.Response) (BuildServiceAgentPoolClientListResponse, error) { + result := BuildServiceAgentPoolClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuildServiceAgentPoolResourceCollection); err != nil { + return BuildServiceAgentPoolClientListResponse{}, err + } + return result, nil +} + +// BeginUpdatePut - Create or update build service agent pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - agentPoolName - The name of the build service agent pool resource. +// - agentPoolResource - Parameters for the update operation +// - options - BuildServiceAgentPoolClientBeginUpdatePutOptions contains the optional parameters for the BuildServiceAgentPoolClient.BeginUpdatePut +// method. +func (client *BuildServiceAgentPoolClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*runtime.Poller[BuildServiceAgentPoolClientUpdatePutResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updatePut(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, agentPoolResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildServiceAgentPoolClientUpdatePutResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildServiceAgentPoolClientUpdatePutResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdatePut - Create or update build service agent pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *BuildServiceAgentPoolClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*http.Response, error) { + var err error + const operationName = "BuildServiceAgentPoolClient.BeginUpdatePut" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, agentPoolResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updatePutCreateRequest creates the UpdatePut request. +func (client *BuildServiceAgentPoolClient) updatePutCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if agentPoolName == "" { + return nil, errors.New("parameter agentPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, agentPoolResource); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildservicebuilder_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildservicebuilder_client.go new file mode 100644 index 00000000..216ab347 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/buildservicebuilder_client.go @@ -0,0 +1,445 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BuildServiceBuilderClient contains the methods for the BuildServiceBuilder group. +// Don't use this type directly, use NewBuildServiceBuilderClient() instead. +type BuildServiceBuilderClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBuildServiceBuilderClient creates a new instance of BuildServiceBuilderClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBuildServiceBuilderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceBuilderClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BuildServiceBuilderClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a KPack builder. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - builderResource - The target builder for the create or update operation +// - options - BuildServiceBuilderClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceBuilderClient.BeginCreateOrUpdate +// method. +func (client *BuildServiceBuilderClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildServiceBuilderClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, buildServiceName, builderName, builderResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildServiceBuilderClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildServiceBuilderClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a KPack builder. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *BuildServiceBuilderClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BuildServiceBuilderClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, builderResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BuildServiceBuilderClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if builderName == "" { + return nil, errors.New("parameter builderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, builderResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete a KPack builder. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildServiceBuilderClientBeginDeleteOptions contains the optional parameters for the BuildServiceBuilderClient.BeginDelete +// method. +func (client *BuildServiceBuilderClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*runtime.Poller[BuildServiceBuilderClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BuildServiceBuilderClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BuildServiceBuilderClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete a KPack builder. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *BuildServiceBuilderClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BuildServiceBuilderClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BuildServiceBuilderClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if builderName == "" { + return nil, errors.New("parameter builderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a KPack builder. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildServiceBuilderClientGetOptions contains the optional parameters for the BuildServiceBuilderClient.Get method. +func (client *BuildServiceBuilderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientGetOptions) (BuildServiceBuilderClientGetResponse, error) { + var err error + const operationName = "BuildServiceBuilderClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) + if err != nil { + return BuildServiceBuilderClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceBuilderClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceBuilderClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BuildServiceBuilderClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if builderName == "" { + return nil, errors.New("parameter builderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BuildServiceBuilderClient) getHandleResponse(resp *http.Response) (BuildServiceBuilderClientGetResponse, error) { + result := BuildServiceBuilderClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuilderResource); err != nil { + return BuildServiceBuilderClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List KPack builders result. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - options - BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.NewListPager +// method. +func (client *BuildServiceBuilderClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceBuilderClientListOptions) *runtime.Pager[BuildServiceBuilderClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BuildServiceBuilderClientListResponse]{ + More: func(page BuildServiceBuilderClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BuildServiceBuilderClientListResponse) (BuildServiceBuilderClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BuildServiceBuilderClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) + }, nil) + if err != nil { + return BuildServiceBuilderClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BuildServiceBuilderClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceBuilderClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BuildServiceBuilderClient) listHandleResponse(resp *http.Response) (BuildServiceBuilderClientListResponse, error) { + result := BuildServiceBuilderClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BuilderResourceCollection); err != nil { + return BuildServiceBuilderClientListResponse{}, err + } + return result, nil +} + +// ListDeployments - List deployments that are using the builder. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - buildServiceName - The name of the build service resource. +// - builderName - The name of the builder resource. +// - options - BuildServiceBuilderClientListDeploymentsOptions contains the optional parameters for the BuildServiceBuilderClient.ListDeployments +// method. +func (client *BuildServiceBuilderClient) ListDeployments(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientListDeploymentsOptions) (BuildServiceBuilderClientListDeploymentsResponse, error) { + var err error + const operationName = "BuildServiceBuilderClient.ListDeployments" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listDeploymentsCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) + if err != nil { + return BuildServiceBuilderClientListDeploymentsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BuildServiceBuilderClientListDeploymentsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BuildServiceBuilderClientListDeploymentsResponse{}, err + } + resp, err := client.listDeploymentsHandleResponse(httpResp) + return resp, err +} + +// listDeploymentsCreateRequest creates the ListDeployments request. +func (client *BuildServiceBuilderClient) listDeploymentsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientListDeploymentsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/listUsingDeployments" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if buildServiceName == "" { + return nil, errors.New("parameter buildServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) + if builderName == "" { + return nil, errors.New("parameter builderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listDeploymentsHandleResponse handles the ListDeployments response. +func (client *BuildServiceBuilderClient) listDeploymentsHandleResponse(resp *http.Response) (BuildServiceBuilderClientListDeploymentsResponse, error) { + result := BuildServiceBuilderClientListDeploymentsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentList); err != nil { + return BuildServiceBuilderClientListDeploymentsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/certificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/certificates_client.go new file mode 100644 index 00000000..aee7ed5c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/certificates_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// CertificatesClient contains the methods for the Certificates group. +// Don't use this type directly, use NewCertificatesClient() instead. +type CertificatesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCertificatesClient creates a new instance of CertificatesClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CertificatesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update certificate resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - certificateName - The name of the certificate resource. +// - certificateResource - Parameters for the create or update operation +// - options - CertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.BeginCreateOrUpdate +// method. +func (client *CertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CertificatesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, certificateName, certificateResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificatesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CertificatesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update certificate resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *CertificatesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CertificatesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, certificateName, certificateResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if certificateName == "" { + return nil, errors.New("parameter certificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, certificateResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the certificate resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - certificateName - The name of the certificate resource. +// - options - CertificatesClientBeginDeleteOptions contains the optional parameters for the CertificatesClient.BeginDelete +// method. +func (client *CertificatesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*runtime.Poller[CertificatesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, certificateName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificatesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CertificatesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the certificate resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *CertificatesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "CertificatesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, certificateName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if certificateName == "" { + return nil, errors.New("parameter certificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the certificate resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - certificateName - The name of the certificate resource. +// - options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. +func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error) { + var err error + const operationName = "CertificatesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, certificateName, options) + if err != nil { + return CertificatesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificatesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *CertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if certificateName == "" { + return nil, errors.New("parameter certificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *CertificatesClient) getHandleResponse(resp *http.Response) (CertificatesClientGetResponse, error) { + result := CertificatesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateResource); err != nil { + return CertificatesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all the certificates of one user. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. +func (client *CertificatesClient) NewListPager(resourceGroupName string, serviceName string, options *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[CertificatesClientListResponse]{ + More: func(page CertificatesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CertificatesClientListResponse) (CertificatesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificatesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return CertificatesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *CertificatesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *CertificatesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *CertificatesClient) listHandleResponse(resp *http.Response) (CertificatesClientListResponse, error) { + result := CertificatesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateResourceCollection); err != nil { + return CertificatesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/ci.yml similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/ci.yml rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/ci.yml diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/client_factory.go new file mode 100644 index 00000000..82116ff0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/client_factory.go @@ -0,0 +1,219 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + credential azcore.TokenCredential + options *arm.ClientOptions +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, credential: credential, + options: options.Clone(), + }, nil +} + +// NewAPIPortalCustomDomainsClient creates a new instance of APIPortalCustomDomainsClient. +func (c *ClientFactory) NewAPIPortalCustomDomainsClient() *APIPortalCustomDomainsClient { + subClient, _ := NewAPIPortalCustomDomainsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewAPIPortalsClient creates a new instance of APIPortalsClient. +func (c *ClientFactory) NewAPIPortalsClient() *APIPortalsClient { + subClient, _ := NewAPIPortalsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewApmsClient creates a new instance of ApmsClient. +func (c *ClientFactory) NewApmsClient() *ApmsClient { + subClient, _ := NewApmsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewApplicationAcceleratorsClient creates a new instance of ApplicationAcceleratorsClient. +func (c *ClientFactory) NewApplicationAcceleratorsClient() *ApplicationAcceleratorsClient { + subClient, _ := NewApplicationAcceleratorsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewApplicationLiveViewsClient creates a new instance of ApplicationLiveViewsClient. +func (c *ClientFactory) NewApplicationLiveViewsClient() *ApplicationLiveViewsClient { + subClient, _ := NewApplicationLiveViewsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewAppsClient creates a new instance of AppsClient. +func (c *ClientFactory) NewAppsClient() *AppsClient { + subClient, _ := NewAppsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewBindingsClient creates a new instance of BindingsClient. +func (c *ClientFactory) NewBindingsClient() *BindingsClient { + subClient, _ := NewBindingsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewBuildServiceAgentPoolClient creates a new instance of BuildServiceAgentPoolClient. +func (c *ClientFactory) NewBuildServiceAgentPoolClient() *BuildServiceAgentPoolClient { + subClient, _ := NewBuildServiceAgentPoolClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewBuildServiceBuilderClient creates a new instance of BuildServiceBuilderClient. +func (c *ClientFactory) NewBuildServiceBuilderClient() *BuildServiceBuilderClient { + subClient, _ := NewBuildServiceBuilderClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewBuildServiceClient creates a new instance of BuildServiceClient. +func (c *ClientFactory) NewBuildServiceClient() *BuildServiceClient { + subClient, _ := NewBuildServiceClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewBuildpackBindingClient creates a new instance of BuildpackBindingClient. +func (c *ClientFactory) NewBuildpackBindingClient() *BuildpackBindingClient { + subClient, _ := NewBuildpackBindingClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewCertificatesClient creates a new instance of CertificatesClient. +func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { + subClient, _ := NewCertificatesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewConfigServersClient creates a new instance of ConfigServersClient. +func (c *ClientFactory) NewConfigServersClient() *ConfigServersClient { + subClient, _ := NewConfigServersClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewConfigurationServicesClient creates a new instance of ConfigurationServicesClient. +func (c *ClientFactory) NewConfigurationServicesClient() *ConfigurationServicesClient { + subClient, _ := NewConfigurationServicesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewContainerRegistriesClient creates a new instance of ContainerRegistriesClient. +func (c *ClientFactory) NewContainerRegistriesClient() *ContainerRegistriesClient { + subClient, _ := NewContainerRegistriesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewCustomDomainsClient creates a new instance of CustomDomainsClient. +func (c *ClientFactory) NewCustomDomainsClient() *CustomDomainsClient { + subClient, _ := NewCustomDomainsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewCustomizedAcceleratorsClient creates a new instance of CustomizedAcceleratorsClient. +func (c *ClientFactory) NewCustomizedAcceleratorsClient() *CustomizedAcceleratorsClient { + subClient, _ := NewCustomizedAcceleratorsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDeploymentsClient creates a new instance of DeploymentsClient. +func (c *ClientFactory) NewDeploymentsClient() *DeploymentsClient { + subClient, _ := NewDeploymentsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewDevToolPortalsClient creates a new instance of DevToolPortalsClient. +func (c *ClientFactory) NewDevToolPortalsClient() *DevToolPortalsClient { + subClient, _ := NewDevToolPortalsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewGatewayCustomDomainsClient creates a new instance of GatewayCustomDomainsClient. +func (c *ClientFactory) NewGatewayCustomDomainsClient() *GatewayCustomDomainsClient { + subClient, _ := NewGatewayCustomDomainsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewGatewayRouteConfigsClient creates a new instance of GatewayRouteConfigsClient. +func (c *ClientFactory) NewGatewayRouteConfigsClient() *GatewayRouteConfigsClient { + subClient, _ := NewGatewayRouteConfigsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewGatewaysClient creates a new instance of GatewaysClient. +func (c *ClientFactory) NewGatewaysClient() *GatewaysClient { + subClient, _ := NewGatewaysClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewMonitoringSettingsClient creates a new instance of MonitoringSettingsClient. +func (c *ClientFactory) NewMonitoringSettingsClient() *MonitoringSettingsClient { + subClient, _ := NewMonitoringSettingsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) + return subClient +} + +// NewPredefinedAcceleratorsClient creates a new instance of PredefinedAcceleratorsClient. +func (c *ClientFactory) NewPredefinedAcceleratorsClient() *PredefinedAcceleratorsClient { + subClient, _ := NewPredefinedAcceleratorsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewRuntimeVersionsClient creates a new instance of RuntimeVersionsClient. +func (c *ClientFactory) NewRuntimeVersionsClient() *RuntimeVersionsClient { + subClient, _ := NewRuntimeVersionsClient(c.credential, c.options) + return subClient +} + +// NewSKUsClient creates a new instance of SKUsClient. +func (c *ClientFactory) NewSKUsClient() *SKUsClient { + subClient, _ := NewSKUsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServiceRegistriesClient creates a new instance of ServiceRegistriesClient. +func (c *ClientFactory) NewServiceRegistriesClient() *ServiceRegistriesClient { + subClient, _ := NewServiceRegistriesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewServicesClient creates a new instance of ServicesClient. +func (c *ClientFactory) NewServicesClient() *ServicesClient { + subClient, _ := NewServicesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewStoragesClient creates a new instance of StoragesClient. +func (c *ClientFactory) NewStoragesClient() *StoragesClient { + subClient, _ := NewStoragesClient(c.subscriptionID, c.credential, c.options) + return subClient +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/configservers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/configservers_client.go new file mode 100644 index 00000000..8983ed14 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/configservers_client.go @@ -0,0 +1,354 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ConfigServersClient contains the methods for the ConfigServers group. +// Don't use this type directly, use NewConfigServersClient() instead. +type ConfigServersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewConfigServersClient creates a new instance of ConfigServersClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewConfigServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigServersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ConfigServersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get the config server and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ConfigServersClientGetOptions contains the optional parameters for the ConfigServersClient.Get method. +func (client *ConfigServersClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ConfigServersClientGetOptions) (ConfigServersClientGetResponse, error) { + var err error + const operationName = "ConfigServersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return ConfigServersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConfigServersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConfigServersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ConfigServersClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ConfigServersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ConfigServersClient) getHandleResponse(resp *http.Response) (ConfigServersClientGetResponse, error) { + result := ConfigServersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConfigServerResource); err != nil { + return ConfigServersClientGetResponse{}, err + } + return result, nil +} + +// BeginUpdatePatch - Update the config server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configServerResource - Parameters for the update operation +// - options - ConfigServersClientBeginUpdatePatchOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePatch +// method. +func (client *ConfigServersClient) BeginUpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*runtime.Poller[ConfigServersClientUpdatePatchResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updatePatch(ctx, resourceGroupName, serviceName, configServerResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigServersClientUpdatePatchResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigServersClientUpdatePatchResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdatePatch - Update the config server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ConfigServersClient) updatePatch(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*http.Response, error) { + var err error + const operationName = "ConfigServersClient.BeginUpdatePatch" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updatePatchCreateRequest(ctx, resourceGroupName, serviceName, configServerResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updatePatchCreateRequest creates the UpdatePatch request. +func (client *ConfigServersClient) updatePatchCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, configServerResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdatePut - Update the config server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configServerResource - Parameters for the update operation +// - options - ConfigServersClientBeginUpdatePutOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePut +// method. +func (client *ConfigServersClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*runtime.Poller[ConfigServersClientUpdatePutResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updatePut(ctx, resourceGroupName, serviceName, configServerResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigServersClientUpdatePutResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigServersClientUpdatePutResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdatePut - Update the config server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ConfigServersClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*http.Response, error) { + var err error + const operationName = "ConfigServersClient.BeginUpdatePut" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, configServerResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updatePutCreateRequest creates the UpdatePut request. +func (client *ConfigServersClient) updatePutCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, configServerResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginValidate - Check if the config server settings are valid. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configServerSettings - Config server settings to be validated +// - options - ConfigServersClientBeginValidateOptions contains the optional parameters for the ConfigServersClient.BeginValidate +// method. +func (client *ConfigServersClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*runtime.Poller[ConfigServersClientValidateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validate(ctx, resourceGroupName, serviceName, configServerSettings, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigServersClientValidateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigServersClientValidateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Validate - Check if the config server settings are valid. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ConfigServersClient) validate(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*http.Response, error) { + var err error + const operationName = "ConfigServersClient.BeginValidate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, configServerSettings, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateCreateRequest creates the Validate request. +func (client *ConfigServersClient) validateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, configServerSettings); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/configurationservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/configurationservices_client.go new file mode 100644 index 00000000..c70e0f24 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/configurationservices_client.go @@ -0,0 +1,526 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ConfigurationServicesClient contains the methods for the ConfigurationServices group. +// Don't use this type directly, use NewConfigurationServicesClient() instead. +type ConfigurationServicesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewConfigurationServicesClient creates a new instance of ConfigurationServicesClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewConfigurationServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationServicesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ConfigurationServicesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create the default Application Configuration Service or update the existing Application Configuration +// Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configurationServiceName - The name of Application Configuration Service. +// - configurationServiceResource - Parameters for the update operation +// - options - ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate +// method. +func (client *ConfigurationServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationServicesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationServicesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigurationServicesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create the default Application Configuration Service or update the existing Application Configuration +// Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ConfigurationServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ConfigurationServicesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ConfigurationServicesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if configurationServiceName == "" { + return nil, errors.New("parameter configurationServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationServiceName}", url.PathEscape(configurationServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, configurationServiceResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Disable the default Application Configuration Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configurationServiceName - The name of Application Configuration Service. +// - options - ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete +// method. +func (client *ConfigurationServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*runtime.Poller[ConfigurationServicesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, configurationServiceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationServicesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigurationServicesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Disable the default Application Configuration Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ConfigurationServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ConfigurationServicesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ConfigurationServicesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if configurationServiceName == "" { + return nil, errors.New("parameter configurationServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationServiceName}", url.PathEscape(configurationServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the Application Configuration Service and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configurationServiceName - The name of Application Configuration Service. +// - options - ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get +// method. +func (client *ConfigurationServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientGetOptions) (ConfigurationServicesClientGetResponse, error) { + var err error + const operationName = "ConfigurationServicesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, options) + if err != nil { + return ConfigurationServicesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConfigurationServicesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConfigurationServicesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ConfigurationServicesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if configurationServiceName == "" { + return nil, errors.New("parameter configurationServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationServiceName}", url.PathEscape(configurationServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ConfigurationServicesClient) getHandleResponse(resp *http.Response) (ConfigurationServicesClientGetResponse, error) { + result := ConfigurationServicesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConfigurationServiceResource); err != nil { + return ConfigurationServicesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all resources in a Service. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.NewListPager +// method. +func (client *ConfigurationServicesClient) NewListPager(resourceGroupName string, serviceName string, options *ConfigurationServicesClientListOptions) *runtime.Pager[ConfigurationServicesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ConfigurationServicesClientListResponse]{ + More: func(page ConfigurationServicesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ConfigurationServicesClientListResponse) (ConfigurationServicesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConfigurationServicesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return ConfigurationServicesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ConfigurationServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ConfigurationServicesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ConfigurationServicesClient) listHandleResponse(resp *http.Response) (ConfigurationServicesClientListResponse, error) { + result := ConfigurationServicesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConfigurationServiceResourceCollection); err != nil { + return ConfigurationServicesClientListResponse{}, err + } + return result, nil +} + +// BeginValidate - Check if the Application Configuration Service settings are valid. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configurationServiceName - The name of Application Configuration Service. +// - settings - Application Configuration Service settings to be validated +// - options - ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate +// method. +func (client *ConfigurationServicesClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*runtime.Poller[ConfigurationServicesClientValidateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validate(ctx, resourceGroupName, serviceName, configurationServiceName, settings, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationServicesClientValidateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigurationServicesClientValidateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Validate - Check if the Application Configuration Service settings are valid. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ConfigurationServicesClient) validate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*http.Response, error) { + var err error + const operationName = "ConfigurationServicesClient.BeginValidate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, settings, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateCreateRequest creates the Validate request. +func (client *ConfigurationServicesClient) validateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}/validate" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if configurationServiceName == "" { + return nil, errors.New("parameter configurationServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationServiceName}", url.PathEscape(configurationServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, settings); err != nil { + return nil, err + } + return req, nil +} + +// BeginValidateResource - Check if the Application Configuration Service resource is valid. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - configurationServiceName - The name of Application Configuration Service. +// - configurationServiceResource - Application Configuration Service resource to be validated +// - options - ConfigurationServicesClientBeginValidateResourceOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidateResource +// method. +func (client *ConfigurationServicesClient) BeginValidateResource(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginValidateResourceOptions) (*runtime.Poller[ConfigurationServicesClientValidateResourceResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validateResource(ctx, resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationServicesClientValidateResourceResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigurationServicesClientValidateResourceResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ValidateResource - Check if the Application Configuration Service resource is valid. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ConfigurationServicesClient) validateResource(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginValidateResourceOptions) (*http.Response, error) { + var err error + const operationName = "ConfigurationServicesClient.BeginValidateResource" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateResourceCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateResourceCreateRequest creates the ValidateResource request. +func (client *ConfigurationServicesClient) validateResourceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginValidateResourceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}/validateResource" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if configurationServiceName == "" { + return nil, errors.New("parameter configurationServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationServiceName}", url.PathEscape(configurationServiceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, configurationServiceResource); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/constants.go new file mode 100644 index 00000000..9259b832 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/constants.go @@ -0,0 +1,1099 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" + moduleVersion = "v2.0.0" +) + +// APIPortalAPITryOutEnabledState - Indicates whether the API try-out feature is enabled or disabled. When enabled, users +// can try out the API by sending requests and viewing responses in API portal. When disabled, users cannot try out +// the API. +type APIPortalAPITryOutEnabledState string + +const ( + APIPortalAPITryOutEnabledStateDisabled APIPortalAPITryOutEnabledState = "Disabled" + APIPortalAPITryOutEnabledStateEnabled APIPortalAPITryOutEnabledState = "Enabled" +) + +// PossibleAPIPortalAPITryOutEnabledStateValues returns the possible values for the APIPortalAPITryOutEnabledState const type. +func PossibleAPIPortalAPITryOutEnabledStateValues() []APIPortalAPITryOutEnabledState { + return []APIPortalAPITryOutEnabledState{ + APIPortalAPITryOutEnabledStateDisabled, + APIPortalAPITryOutEnabledStateEnabled, + } +} + +// APIPortalProvisioningState - State of the API portal. +type APIPortalProvisioningState string + +const ( + APIPortalProvisioningStateCreating APIPortalProvisioningState = "Creating" + APIPortalProvisioningStateDeleting APIPortalProvisioningState = "Deleting" + APIPortalProvisioningStateFailed APIPortalProvisioningState = "Failed" + APIPortalProvisioningStateSucceeded APIPortalProvisioningState = "Succeeded" + APIPortalProvisioningStateUpdating APIPortalProvisioningState = "Updating" +) + +// PossibleAPIPortalProvisioningStateValues returns the possible values for the APIPortalProvisioningState const type. +func PossibleAPIPortalProvisioningStateValues() []APIPortalProvisioningState { + return []APIPortalProvisioningState{ + APIPortalProvisioningStateCreating, + APIPortalProvisioningStateDeleting, + APIPortalProvisioningStateFailed, + APIPortalProvisioningStateSucceeded, + APIPortalProvisioningStateUpdating, + } +} + +// ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. +type ActionType string + +const ( + ActionTypeInternal ActionType = "Internal" +) + +// PossibleActionTypeValues returns the possible values for the ActionType const type. +func PossibleActionTypeValues() []ActionType { + return []ActionType{ + ActionTypeInternal, + } +} + +// ApmProvisioningState - State of the APM. +type ApmProvisioningState string + +const ( + ApmProvisioningStateCanceled ApmProvisioningState = "Canceled" + ApmProvisioningStateCreating ApmProvisioningState = "Creating" + ApmProvisioningStateDeleting ApmProvisioningState = "Deleting" + ApmProvisioningStateFailed ApmProvisioningState = "Failed" + ApmProvisioningStateSucceeded ApmProvisioningState = "Succeeded" + ApmProvisioningStateUpdating ApmProvisioningState = "Updating" +) + +// PossibleApmProvisioningStateValues returns the possible values for the ApmProvisioningState const type. +func PossibleApmProvisioningStateValues() []ApmProvisioningState { + return []ApmProvisioningState{ + ApmProvisioningStateCanceled, + ApmProvisioningStateCreating, + ApmProvisioningStateDeleting, + ApmProvisioningStateFailed, + ApmProvisioningStateSucceeded, + ApmProvisioningStateUpdating, + } +} + +// AppResourceProvisioningState - Provisioning state of the App +type AppResourceProvisioningState string + +const ( + AppResourceProvisioningStateCreating AppResourceProvisioningState = "Creating" + AppResourceProvisioningStateDeleting AppResourceProvisioningState = "Deleting" + AppResourceProvisioningStateFailed AppResourceProvisioningState = "Failed" + AppResourceProvisioningStateSucceeded AppResourceProvisioningState = "Succeeded" + AppResourceProvisioningStateUpdating AppResourceProvisioningState = "Updating" +) + +// PossibleAppResourceProvisioningStateValues returns the possible values for the AppResourceProvisioningState const type. +func PossibleAppResourceProvisioningStateValues() []AppResourceProvisioningState { + return []AppResourceProvisioningState{ + AppResourceProvisioningStateCreating, + AppResourceProvisioningStateDeleting, + AppResourceProvisioningStateFailed, + AppResourceProvisioningStateSucceeded, + AppResourceProvisioningStateUpdating, + } +} + +// ApplicationAcceleratorProvisioningState - State of the application accelerator. +type ApplicationAcceleratorProvisioningState string + +const ( + ApplicationAcceleratorProvisioningStateCanceled ApplicationAcceleratorProvisioningState = "Canceled" + ApplicationAcceleratorProvisioningStateCreating ApplicationAcceleratorProvisioningState = "Creating" + ApplicationAcceleratorProvisioningStateDeleting ApplicationAcceleratorProvisioningState = "Deleting" + ApplicationAcceleratorProvisioningStateFailed ApplicationAcceleratorProvisioningState = "Failed" + ApplicationAcceleratorProvisioningStateSucceeded ApplicationAcceleratorProvisioningState = "Succeeded" + ApplicationAcceleratorProvisioningStateUpdating ApplicationAcceleratorProvisioningState = "Updating" +) + +// PossibleApplicationAcceleratorProvisioningStateValues returns the possible values for the ApplicationAcceleratorProvisioningState const type. +func PossibleApplicationAcceleratorProvisioningStateValues() []ApplicationAcceleratorProvisioningState { + return []ApplicationAcceleratorProvisioningState{ + ApplicationAcceleratorProvisioningStateCanceled, + ApplicationAcceleratorProvisioningStateCreating, + ApplicationAcceleratorProvisioningStateDeleting, + ApplicationAcceleratorProvisioningStateFailed, + ApplicationAcceleratorProvisioningStateSucceeded, + ApplicationAcceleratorProvisioningStateUpdating, + } +} + +// ApplicationLiveViewProvisioningState - State of the Application Live View. +type ApplicationLiveViewProvisioningState string + +const ( + ApplicationLiveViewProvisioningStateCanceled ApplicationLiveViewProvisioningState = "Canceled" + ApplicationLiveViewProvisioningStateCreating ApplicationLiveViewProvisioningState = "Creating" + ApplicationLiveViewProvisioningStateDeleting ApplicationLiveViewProvisioningState = "Deleting" + ApplicationLiveViewProvisioningStateFailed ApplicationLiveViewProvisioningState = "Failed" + ApplicationLiveViewProvisioningStateSucceeded ApplicationLiveViewProvisioningState = "Succeeded" + ApplicationLiveViewProvisioningStateUpdating ApplicationLiveViewProvisioningState = "Updating" +) + +// PossibleApplicationLiveViewProvisioningStateValues returns the possible values for the ApplicationLiveViewProvisioningState const type. +func PossibleApplicationLiveViewProvisioningStateValues() []ApplicationLiveViewProvisioningState { + return []ApplicationLiveViewProvisioningState{ + ApplicationLiveViewProvisioningStateCanceled, + ApplicationLiveViewProvisioningStateCreating, + ApplicationLiveViewProvisioningStateDeleting, + ApplicationLiveViewProvisioningStateFailed, + ApplicationLiveViewProvisioningStateSucceeded, + ApplicationLiveViewProvisioningStateUpdating, + } +} + +// BackendProtocol - How ingress should communicate with this app backend service. +type BackendProtocol string + +const ( + BackendProtocolDefault BackendProtocol = "Default" + BackendProtocolGRPC BackendProtocol = "GRPC" +) + +// PossibleBackendProtocolValues returns the possible values for the BackendProtocol const type. +func PossibleBackendProtocolValues() []BackendProtocol { + return []BackendProtocol{ + BackendProtocolDefault, + BackendProtocolGRPC, + } +} + +// BindingType - Buildpack Binding Type +type BindingType string + +const ( + BindingTypeApacheSkyWalking BindingType = "ApacheSkyWalking" + BindingTypeAppDynamics BindingType = "AppDynamics" + BindingTypeApplicationInsights BindingType = "ApplicationInsights" + BindingTypeDynatrace BindingType = "Dynatrace" + BindingTypeElasticAPM BindingType = "ElasticAPM" + BindingTypeNewRelic BindingType = "NewRelic" +) + +// PossibleBindingTypeValues returns the possible values for the BindingType const type. +func PossibleBindingTypeValues() []BindingType { + return []BindingType{ + BindingTypeApacheSkyWalking, + BindingTypeAppDynamics, + BindingTypeApplicationInsights, + BindingTypeDynatrace, + BindingTypeElasticAPM, + BindingTypeNewRelic, + } +} + +// BuildProvisioningState - Provisioning state of the KPack build result +type BuildProvisioningState string + +const ( + BuildProvisioningStateCreating BuildProvisioningState = "Creating" + BuildProvisioningStateDeleting BuildProvisioningState = "Deleting" + BuildProvisioningStateFailed BuildProvisioningState = "Failed" + BuildProvisioningStateSucceeded BuildProvisioningState = "Succeeded" + BuildProvisioningStateUpdating BuildProvisioningState = "Updating" +) + +// PossibleBuildProvisioningStateValues returns the possible values for the BuildProvisioningState const type. +func PossibleBuildProvisioningStateValues() []BuildProvisioningState { + return []BuildProvisioningState{ + BuildProvisioningStateCreating, + BuildProvisioningStateDeleting, + BuildProvisioningStateFailed, + BuildProvisioningStateSucceeded, + BuildProvisioningStateUpdating, + } +} + +// BuildResultProvisioningState - Provisioning state of the KPack build result +type BuildResultProvisioningState string + +const ( + BuildResultProvisioningStateBuilding BuildResultProvisioningState = "Building" + BuildResultProvisioningStateDeleting BuildResultProvisioningState = "Deleting" + BuildResultProvisioningStateFailed BuildResultProvisioningState = "Failed" + BuildResultProvisioningStateQueuing BuildResultProvisioningState = "Queuing" + BuildResultProvisioningStateSucceeded BuildResultProvisioningState = "Succeeded" +) + +// PossibleBuildResultProvisioningStateValues returns the possible values for the BuildResultProvisioningState const type. +func PossibleBuildResultProvisioningStateValues() []BuildResultProvisioningState { + return []BuildResultProvisioningState{ + BuildResultProvisioningStateBuilding, + BuildResultProvisioningStateDeleting, + BuildResultProvisioningStateFailed, + BuildResultProvisioningStateQueuing, + BuildResultProvisioningStateSucceeded, + } +} + +// BuildServiceProvisioningState - Provisioning state of the KPack build service +type BuildServiceProvisioningState string + +const ( + BuildServiceProvisioningStateCreating BuildServiceProvisioningState = "Creating" + BuildServiceProvisioningStateDeleting BuildServiceProvisioningState = "Deleting" + BuildServiceProvisioningStateFailed BuildServiceProvisioningState = "Failed" + BuildServiceProvisioningStateSucceeded BuildServiceProvisioningState = "Succeeded" + BuildServiceProvisioningStateUpdating BuildServiceProvisioningState = "Updating" +) + +// PossibleBuildServiceProvisioningStateValues returns the possible values for the BuildServiceProvisioningState const type. +func PossibleBuildServiceProvisioningStateValues() []BuildServiceProvisioningState { + return []BuildServiceProvisioningState{ + BuildServiceProvisioningStateCreating, + BuildServiceProvisioningStateDeleting, + BuildServiceProvisioningStateFailed, + BuildServiceProvisioningStateSucceeded, + BuildServiceProvisioningStateUpdating, + } +} + +// BuilderProvisioningState - Builder provision status. +type BuilderProvisioningState string + +const ( + BuilderProvisioningStateCreating BuilderProvisioningState = "Creating" + BuilderProvisioningStateDeleting BuilderProvisioningState = "Deleting" + BuilderProvisioningStateFailed BuilderProvisioningState = "Failed" + BuilderProvisioningStateSucceeded BuilderProvisioningState = "Succeeded" + BuilderProvisioningStateUpdating BuilderProvisioningState = "Updating" +) + +// PossibleBuilderProvisioningStateValues returns the possible values for the BuilderProvisioningState const type. +func PossibleBuilderProvisioningStateValues() []BuilderProvisioningState { + return []BuilderProvisioningState{ + BuilderProvisioningStateCreating, + BuilderProvisioningStateDeleting, + BuilderProvisioningStateFailed, + BuilderProvisioningStateSucceeded, + BuilderProvisioningStateUpdating, + } +} + +// BuildpackBindingProvisioningState - State of the Buildpack Binding. +type BuildpackBindingProvisioningState string + +const ( + BuildpackBindingProvisioningStateCreating BuildpackBindingProvisioningState = "Creating" + BuildpackBindingProvisioningStateDeleting BuildpackBindingProvisioningState = "Deleting" + BuildpackBindingProvisioningStateFailed BuildpackBindingProvisioningState = "Failed" + BuildpackBindingProvisioningStateSucceeded BuildpackBindingProvisioningState = "Succeeded" + BuildpackBindingProvisioningStateUpdating BuildpackBindingProvisioningState = "Updating" +) + +// PossibleBuildpackBindingProvisioningStateValues returns the possible values for the BuildpackBindingProvisioningState const type. +func PossibleBuildpackBindingProvisioningStateValues() []BuildpackBindingProvisioningState { + return []BuildpackBindingProvisioningState{ + BuildpackBindingProvisioningStateCreating, + BuildpackBindingProvisioningStateDeleting, + BuildpackBindingProvisioningStateFailed, + BuildpackBindingProvisioningStateSucceeded, + BuildpackBindingProvisioningStateUpdating, + } +} + +// CertificateResourceProvisioningState - Provisioning state of the Certificate +type CertificateResourceProvisioningState string + +const ( + CertificateResourceProvisioningStateCreating CertificateResourceProvisioningState = "Creating" + CertificateResourceProvisioningStateDeleting CertificateResourceProvisioningState = "Deleting" + CertificateResourceProvisioningStateFailed CertificateResourceProvisioningState = "Failed" + CertificateResourceProvisioningStateSucceeded CertificateResourceProvisioningState = "Succeeded" + CertificateResourceProvisioningStateUpdating CertificateResourceProvisioningState = "Updating" +) + +// PossibleCertificateResourceProvisioningStateValues returns the possible values for the CertificateResourceProvisioningState const type. +func PossibleCertificateResourceProvisioningStateValues() []CertificateResourceProvisioningState { + return []CertificateResourceProvisioningState{ + CertificateResourceProvisioningStateCreating, + CertificateResourceProvisioningStateDeleting, + CertificateResourceProvisioningStateFailed, + CertificateResourceProvisioningStateSucceeded, + CertificateResourceProvisioningStateUpdating, + } +} + +// ConfigServerState - State of the config server. +type ConfigServerState string + +const ( + ConfigServerStateDeleted ConfigServerState = "Deleted" + ConfigServerStateFailed ConfigServerState = "Failed" + ConfigServerStateNotAvailable ConfigServerState = "NotAvailable" + ConfigServerStateSucceeded ConfigServerState = "Succeeded" + ConfigServerStateUpdating ConfigServerState = "Updating" +) + +// PossibleConfigServerStateValues returns the possible values for the ConfigServerState const type. +func PossibleConfigServerStateValues() []ConfigServerState { + return []ConfigServerState{ + ConfigServerStateDeleted, + ConfigServerStateFailed, + ConfigServerStateNotAvailable, + ConfigServerStateSucceeded, + ConfigServerStateUpdating, + } +} + +// ConfigurationServiceGeneration - The generation of the Application Configuration Service. +type ConfigurationServiceGeneration string + +const ( + ConfigurationServiceGenerationGen1 ConfigurationServiceGeneration = "Gen1" + ConfigurationServiceGenerationGen2 ConfigurationServiceGeneration = "Gen2" +) + +// PossibleConfigurationServiceGenerationValues returns the possible values for the ConfigurationServiceGeneration const type. +func PossibleConfigurationServiceGenerationValues() []ConfigurationServiceGeneration { + return []ConfigurationServiceGeneration{ + ConfigurationServiceGenerationGen1, + ConfigurationServiceGenerationGen2, + } +} + +// ConfigurationServiceProvisioningState - State of the Application Configuration Service. +type ConfigurationServiceProvisioningState string + +const ( + ConfigurationServiceProvisioningStateCreating ConfigurationServiceProvisioningState = "Creating" + ConfigurationServiceProvisioningStateDeleting ConfigurationServiceProvisioningState = "Deleting" + ConfigurationServiceProvisioningStateFailed ConfigurationServiceProvisioningState = "Failed" + ConfigurationServiceProvisioningStateSucceeded ConfigurationServiceProvisioningState = "Succeeded" + ConfigurationServiceProvisioningStateUpdating ConfigurationServiceProvisioningState = "Updating" +) + +// PossibleConfigurationServiceProvisioningStateValues returns the possible values for the ConfigurationServiceProvisioningState const type. +func PossibleConfigurationServiceProvisioningStateValues() []ConfigurationServiceProvisioningState { + return []ConfigurationServiceProvisioningState{ + ConfigurationServiceProvisioningStateCreating, + ConfigurationServiceProvisioningStateDeleting, + ConfigurationServiceProvisioningStateFailed, + ConfigurationServiceProvisioningStateSucceeded, + ConfigurationServiceProvisioningStateUpdating, + } +} + +// ContainerRegistryProvisioningState - State of the Container Registry. +type ContainerRegistryProvisioningState string + +const ( + ContainerRegistryProvisioningStateCanceled ContainerRegistryProvisioningState = "Canceled" + ContainerRegistryProvisioningStateCreating ContainerRegistryProvisioningState = "Creating" + ContainerRegistryProvisioningStateDeleting ContainerRegistryProvisioningState = "Deleting" + ContainerRegistryProvisioningStateFailed ContainerRegistryProvisioningState = "Failed" + ContainerRegistryProvisioningStateSucceeded ContainerRegistryProvisioningState = "Succeeded" + ContainerRegistryProvisioningStateUpdating ContainerRegistryProvisioningState = "Updating" +) + +// PossibleContainerRegistryProvisioningStateValues returns the possible values for the ContainerRegistryProvisioningState const type. +func PossibleContainerRegistryProvisioningStateValues() []ContainerRegistryProvisioningState { + return []ContainerRegistryProvisioningState{ + ContainerRegistryProvisioningStateCanceled, + ContainerRegistryProvisioningStateCreating, + ContainerRegistryProvisioningStateDeleting, + ContainerRegistryProvisioningStateFailed, + ContainerRegistryProvisioningStateSucceeded, + ContainerRegistryProvisioningStateUpdating, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// CustomDomainResourceProvisioningState - Provisioning state of the Domain +type CustomDomainResourceProvisioningState string + +const ( + CustomDomainResourceProvisioningStateCreating CustomDomainResourceProvisioningState = "Creating" + CustomDomainResourceProvisioningStateDeleting CustomDomainResourceProvisioningState = "Deleting" + CustomDomainResourceProvisioningStateFailed CustomDomainResourceProvisioningState = "Failed" + CustomDomainResourceProvisioningStateSucceeded CustomDomainResourceProvisioningState = "Succeeded" + CustomDomainResourceProvisioningStateUpdating CustomDomainResourceProvisioningState = "Updating" +) + +// PossibleCustomDomainResourceProvisioningStateValues returns the possible values for the CustomDomainResourceProvisioningState const type. +func PossibleCustomDomainResourceProvisioningStateValues() []CustomDomainResourceProvisioningState { + return []CustomDomainResourceProvisioningState{ + CustomDomainResourceProvisioningStateCreating, + CustomDomainResourceProvisioningStateDeleting, + CustomDomainResourceProvisioningStateFailed, + CustomDomainResourceProvisioningStateSucceeded, + CustomDomainResourceProvisioningStateUpdating, + } +} + +// CustomizedAcceleratorProvisioningState - State of the customized accelerator. +type CustomizedAcceleratorProvisioningState string + +const ( + CustomizedAcceleratorProvisioningStateCanceled CustomizedAcceleratorProvisioningState = "Canceled" + CustomizedAcceleratorProvisioningStateCreating CustomizedAcceleratorProvisioningState = "Creating" + CustomizedAcceleratorProvisioningStateDeleting CustomizedAcceleratorProvisioningState = "Deleting" + CustomizedAcceleratorProvisioningStateFailed CustomizedAcceleratorProvisioningState = "Failed" + CustomizedAcceleratorProvisioningStateSucceeded CustomizedAcceleratorProvisioningState = "Succeeded" + CustomizedAcceleratorProvisioningStateUpdating CustomizedAcceleratorProvisioningState = "Updating" +) + +// PossibleCustomizedAcceleratorProvisioningStateValues returns the possible values for the CustomizedAcceleratorProvisioningState const type. +func PossibleCustomizedAcceleratorProvisioningStateValues() []CustomizedAcceleratorProvisioningState { + return []CustomizedAcceleratorProvisioningState{ + CustomizedAcceleratorProvisioningStateCanceled, + CustomizedAcceleratorProvisioningStateCreating, + CustomizedAcceleratorProvisioningStateDeleting, + CustomizedAcceleratorProvisioningStateFailed, + CustomizedAcceleratorProvisioningStateSucceeded, + CustomizedAcceleratorProvisioningStateUpdating, + } +} + +// CustomizedAcceleratorType - Type of the customized accelerator. +type CustomizedAcceleratorType string + +const ( + CustomizedAcceleratorTypeAccelerator CustomizedAcceleratorType = "Accelerator" + CustomizedAcceleratorTypeFragment CustomizedAcceleratorType = "Fragment" +) + +// PossibleCustomizedAcceleratorTypeValues returns the possible values for the CustomizedAcceleratorType const type. +func PossibleCustomizedAcceleratorTypeValues() []CustomizedAcceleratorType { + return []CustomizedAcceleratorType{ + CustomizedAcceleratorTypeAccelerator, + CustomizedAcceleratorTypeFragment, + } +} + +// CustomizedAcceleratorValidateResultState - State of the customized accelerator validation result +type CustomizedAcceleratorValidateResultState string + +const ( + // CustomizedAcceleratorValidateResultStateInvalid - Customized accelerator properties are invalid. + CustomizedAcceleratorValidateResultStateInvalid CustomizedAcceleratorValidateResultState = "Invalid" + // CustomizedAcceleratorValidateResultStateValid - Customized accelerator properties are valid. + CustomizedAcceleratorValidateResultStateValid CustomizedAcceleratorValidateResultState = "Valid" +) + +// PossibleCustomizedAcceleratorValidateResultStateValues returns the possible values for the CustomizedAcceleratorValidateResultState const type. +func PossibleCustomizedAcceleratorValidateResultStateValues() []CustomizedAcceleratorValidateResultState { + return []CustomizedAcceleratorValidateResultState{ + CustomizedAcceleratorValidateResultStateInvalid, + CustomizedAcceleratorValidateResultStateValid, + } +} + +// DeploymentResourceProvisioningState - Provisioning state of the Deployment +type DeploymentResourceProvisioningState string + +const ( + DeploymentResourceProvisioningStateCreating DeploymentResourceProvisioningState = "Creating" + DeploymentResourceProvisioningStateFailed DeploymentResourceProvisioningState = "Failed" + DeploymentResourceProvisioningStateSucceeded DeploymentResourceProvisioningState = "Succeeded" + DeploymentResourceProvisioningStateUpdating DeploymentResourceProvisioningState = "Updating" +) + +// PossibleDeploymentResourceProvisioningStateValues returns the possible values for the DeploymentResourceProvisioningState const type. +func PossibleDeploymentResourceProvisioningStateValues() []DeploymentResourceProvisioningState { + return []DeploymentResourceProvisioningState{ + DeploymentResourceProvisioningStateCreating, + DeploymentResourceProvisioningStateFailed, + DeploymentResourceProvisioningStateSucceeded, + DeploymentResourceProvisioningStateUpdating, + } +} + +// DeploymentResourceStatus - Status of the Deployment +type DeploymentResourceStatus string + +const ( + DeploymentResourceStatusRunning DeploymentResourceStatus = "Running" + DeploymentResourceStatusStopped DeploymentResourceStatus = "Stopped" +) + +// PossibleDeploymentResourceStatusValues returns the possible values for the DeploymentResourceStatus const type. +func PossibleDeploymentResourceStatusValues() []DeploymentResourceStatus { + return []DeploymentResourceStatus{ + DeploymentResourceStatusRunning, + DeploymentResourceStatusStopped, + } +} + +// DevToolPortalFeatureState - State of the plugin +type DevToolPortalFeatureState string + +const ( + // DevToolPortalFeatureStateDisabled - Disable the plugin in Dev Tool Portal. + DevToolPortalFeatureStateDisabled DevToolPortalFeatureState = "Disabled" + // DevToolPortalFeatureStateEnabled - Enable the plugin in Dev Tool Portal. + DevToolPortalFeatureStateEnabled DevToolPortalFeatureState = "Enabled" +) + +// PossibleDevToolPortalFeatureStateValues returns the possible values for the DevToolPortalFeatureState const type. +func PossibleDevToolPortalFeatureStateValues() []DevToolPortalFeatureState { + return []DevToolPortalFeatureState{ + DevToolPortalFeatureStateDisabled, + DevToolPortalFeatureStateEnabled, + } +} + +// DevToolPortalProvisioningState - State of the Dev Tool Portal. +type DevToolPortalProvisioningState string + +const ( + DevToolPortalProvisioningStateCanceled DevToolPortalProvisioningState = "Canceled" + DevToolPortalProvisioningStateCreating DevToolPortalProvisioningState = "Creating" + DevToolPortalProvisioningStateDeleting DevToolPortalProvisioningState = "Deleting" + DevToolPortalProvisioningStateFailed DevToolPortalProvisioningState = "Failed" + DevToolPortalProvisioningStateSucceeded DevToolPortalProvisioningState = "Succeeded" + DevToolPortalProvisioningStateUpdating DevToolPortalProvisioningState = "Updating" +) + +// PossibleDevToolPortalProvisioningStateValues returns the possible values for the DevToolPortalProvisioningState const type. +func PossibleDevToolPortalProvisioningStateValues() []DevToolPortalProvisioningState { + return []DevToolPortalProvisioningState{ + DevToolPortalProvisioningStateCanceled, + DevToolPortalProvisioningStateCreating, + DevToolPortalProvisioningStateDeleting, + DevToolPortalProvisioningStateFailed, + DevToolPortalProvisioningStateSucceeded, + DevToolPortalProvisioningStateUpdating, + } +} + +// GatewayCertificateVerification - Whether to enable certificate verification or not +type GatewayCertificateVerification string + +const ( + // GatewayCertificateVerificationDisabled - Disable certificate verification in Spring Cloud Gateway. + GatewayCertificateVerificationDisabled GatewayCertificateVerification = "Disabled" + // GatewayCertificateVerificationEnabled - Enable certificate verification in Spring Cloud Gateway. + GatewayCertificateVerificationEnabled GatewayCertificateVerification = "Enabled" +) + +// PossibleGatewayCertificateVerificationValues returns the possible values for the GatewayCertificateVerification const type. +func PossibleGatewayCertificateVerificationValues() []GatewayCertificateVerification { + return []GatewayCertificateVerification{ + GatewayCertificateVerificationDisabled, + GatewayCertificateVerificationEnabled, + } +} + +// GatewayProvisioningState - State of the Spring Cloud Gateway. +type GatewayProvisioningState string + +const ( + GatewayProvisioningStateCreating GatewayProvisioningState = "Creating" + GatewayProvisioningStateDeleting GatewayProvisioningState = "Deleting" + GatewayProvisioningStateFailed GatewayProvisioningState = "Failed" + GatewayProvisioningStateSucceeded GatewayProvisioningState = "Succeeded" + GatewayProvisioningStateUpdating GatewayProvisioningState = "Updating" +) + +// PossibleGatewayProvisioningStateValues returns the possible values for the GatewayProvisioningState const type. +func PossibleGatewayProvisioningStateValues() []GatewayProvisioningState { + return []GatewayProvisioningState{ + GatewayProvisioningStateCreating, + GatewayProvisioningStateDeleting, + GatewayProvisioningStateFailed, + GatewayProvisioningStateSucceeded, + GatewayProvisioningStateUpdating, + } +} + +// GatewayRouteConfigProtocol - Protocol of routed Azure Spring Apps applications. +type GatewayRouteConfigProtocol string + +const ( + GatewayRouteConfigProtocolHTTP GatewayRouteConfigProtocol = "HTTP" + GatewayRouteConfigProtocolHTTPS GatewayRouteConfigProtocol = "HTTPS" +) + +// PossibleGatewayRouteConfigProtocolValues returns the possible values for the GatewayRouteConfigProtocol const type. +func PossibleGatewayRouteConfigProtocolValues() []GatewayRouteConfigProtocol { + return []GatewayRouteConfigProtocol{ + GatewayRouteConfigProtocolHTTP, + GatewayRouteConfigProtocolHTTPS, + } +} + +// GitImplementation - Git libraries used to support various repository providers +type GitImplementation string + +const ( + GitImplementationGoGit GitImplementation = "go-git" + GitImplementationLibgit2 GitImplementation = "libgit2" +) + +// PossibleGitImplementationValues returns the possible values for the GitImplementation const type. +func PossibleGitImplementationValues() []GitImplementation { + return []GitImplementation{ + GitImplementationGoGit, + GitImplementationLibgit2, + } +} + +// HTTPSchemeType - Scheme to use for connecting to the host. Defaults to HTTP. +// Possible enum values: +// * "HTTP" means that the scheme used will be http:// +// * "HTTPS" means that the scheme used will be https:// +type HTTPSchemeType string + +const ( + HTTPSchemeTypeHTTP HTTPSchemeType = "HTTP" + HTTPSchemeTypeHTTPS HTTPSchemeType = "HTTPS" +) + +// PossibleHTTPSchemeTypeValues returns the possible values for the HTTPSchemeType const type. +func PossibleHTTPSchemeTypeValues() []HTTPSchemeType { + return []HTTPSchemeType{ + HTTPSchemeTypeHTTP, + HTTPSchemeTypeHTTPS, + } +} + +// KPackBuildStageProvisioningState - The provisioning state of this build stage resource. +type KPackBuildStageProvisioningState string + +const ( + KPackBuildStageProvisioningStateFailed KPackBuildStageProvisioningState = "Failed" + KPackBuildStageProvisioningStateNotStarted KPackBuildStageProvisioningState = "NotStarted" + KPackBuildStageProvisioningStateRunning KPackBuildStageProvisioningState = "Running" + KPackBuildStageProvisioningStateSucceeded KPackBuildStageProvisioningState = "Succeeded" +) + +// PossibleKPackBuildStageProvisioningStateValues returns the possible values for the KPackBuildStageProvisioningState const type. +func PossibleKPackBuildStageProvisioningStateValues() []KPackBuildStageProvisioningState { + return []KPackBuildStageProvisioningState{ + KPackBuildStageProvisioningStateFailed, + KPackBuildStageProvisioningStateNotStarted, + KPackBuildStageProvisioningStateRunning, + KPackBuildStageProvisioningStateSucceeded, + } +} + +// KeyVaultCertificateAutoSync - Indicates whether to automatically synchronize certificate from key vault or not. +type KeyVaultCertificateAutoSync string + +const ( + KeyVaultCertificateAutoSyncDisabled KeyVaultCertificateAutoSync = "Disabled" + KeyVaultCertificateAutoSyncEnabled KeyVaultCertificateAutoSync = "Enabled" +) + +// PossibleKeyVaultCertificateAutoSyncValues returns the possible values for the KeyVaultCertificateAutoSync const type. +func PossibleKeyVaultCertificateAutoSyncValues() []KeyVaultCertificateAutoSync { + return []KeyVaultCertificateAutoSync{ + KeyVaultCertificateAutoSyncDisabled, + KeyVaultCertificateAutoSyncEnabled, + } +} + +// LastModifiedByType - The type of identity that last modified the resource. +type LastModifiedByType string + +const ( + LastModifiedByTypeApplication LastModifiedByType = "Application" + LastModifiedByTypeKey LastModifiedByType = "Key" + LastModifiedByTypeManagedIdentity LastModifiedByType = "ManagedIdentity" + LastModifiedByTypeUser LastModifiedByType = "User" +) + +// PossibleLastModifiedByTypeValues returns the possible values for the LastModifiedByType const type. +func PossibleLastModifiedByTypeValues() []LastModifiedByType { + return []LastModifiedByType{ + LastModifiedByTypeApplication, + LastModifiedByTypeKey, + LastModifiedByTypeManagedIdentity, + LastModifiedByTypeUser, + } +} + +// ManagedIdentityType - Type of the managed identity +type ManagedIdentityType string + +const ( + ManagedIdentityTypeNone ManagedIdentityType = "None" + ManagedIdentityTypeSystemAssigned ManagedIdentityType = "SystemAssigned" + ManagedIdentityTypeSystemAssignedUserAssigned ManagedIdentityType = "SystemAssigned,UserAssigned" + ManagedIdentityTypeUserAssigned ManagedIdentityType = "UserAssigned" +) + +// PossibleManagedIdentityTypeValues returns the possible values for the ManagedIdentityType const type. +func PossibleManagedIdentityTypeValues() []ManagedIdentityType { + return []ManagedIdentityType{ + ManagedIdentityTypeNone, + ManagedIdentityTypeSystemAssigned, + ManagedIdentityTypeSystemAssignedUserAssigned, + ManagedIdentityTypeUserAssigned, + } +} + +// MonitoringSettingState - State of the Monitoring Setting. +type MonitoringSettingState string + +const ( + MonitoringSettingStateFailed MonitoringSettingState = "Failed" + MonitoringSettingStateNotAvailable MonitoringSettingState = "NotAvailable" + MonitoringSettingStateSucceeded MonitoringSettingState = "Succeeded" + MonitoringSettingStateUpdating MonitoringSettingState = "Updating" +) + +// PossibleMonitoringSettingStateValues returns the possible values for the MonitoringSettingState const type. +func PossibleMonitoringSettingStateValues() []MonitoringSettingState { + return []MonitoringSettingState{ + MonitoringSettingStateFailed, + MonitoringSettingStateNotAvailable, + MonitoringSettingStateSucceeded, + MonitoringSettingStateUpdating, + } +} + +// PowerState - Power state of the Service +type PowerState string + +const ( + PowerStateRunning PowerState = "Running" + PowerStateStopped PowerState = "Stopped" +) + +// PossiblePowerStateValues returns the possible values for the PowerState const type. +func PossiblePowerStateValues() []PowerState { + return []PowerState{ + PowerStateRunning, + PowerStateStopped, + } +} + +// PredefinedAcceleratorProvisioningState - Provisioning state of the predefined accelerator. +type PredefinedAcceleratorProvisioningState string + +const ( + PredefinedAcceleratorProvisioningStateCanceled PredefinedAcceleratorProvisioningState = "Canceled" + PredefinedAcceleratorProvisioningStateCreating PredefinedAcceleratorProvisioningState = "Creating" + PredefinedAcceleratorProvisioningStateFailed PredefinedAcceleratorProvisioningState = "Failed" + PredefinedAcceleratorProvisioningStateSucceeded PredefinedAcceleratorProvisioningState = "Succeeded" + PredefinedAcceleratorProvisioningStateUpdating PredefinedAcceleratorProvisioningState = "Updating" +) + +// PossiblePredefinedAcceleratorProvisioningStateValues returns the possible values for the PredefinedAcceleratorProvisioningState const type. +func PossiblePredefinedAcceleratorProvisioningStateValues() []PredefinedAcceleratorProvisioningState { + return []PredefinedAcceleratorProvisioningState{ + PredefinedAcceleratorProvisioningStateCanceled, + PredefinedAcceleratorProvisioningStateCreating, + PredefinedAcceleratorProvisioningStateFailed, + PredefinedAcceleratorProvisioningStateSucceeded, + PredefinedAcceleratorProvisioningStateUpdating, + } +} + +// PredefinedAcceleratorState - State of the predefined accelerator. +type PredefinedAcceleratorState string + +const ( + // PredefinedAcceleratorStateDisabled - Disable the predefined accelerator. + PredefinedAcceleratorStateDisabled PredefinedAcceleratorState = "Disabled" + // PredefinedAcceleratorStateEnabled - Enable the predefined accelerator. + PredefinedAcceleratorStateEnabled PredefinedAcceleratorState = "Enabled" +) + +// PossiblePredefinedAcceleratorStateValues returns the possible values for the PredefinedAcceleratorState const type. +func PossiblePredefinedAcceleratorStateValues() []PredefinedAcceleratorState { + return []PredefinedAcceleratorState{ + PredefinedAcceleratorStateDisabled, + PredefinedAcceleratorStateEnabled, + } +} + +// ProbeActionType - The type of the action to take to perform the health check. +type ProbeActionType string + +const ( + ProbeActionTypeExecAction ProbeActionType = "ExecAction" + ProbeActionTypeHTTPGetAction ProbeActionType = "HTTPGetAction" + ProbeActionTypeTCPSocketAction ProbeActionType = "TCPSocketAction" +) + +// PossibleProbeActionTypeValues returns the possible values for the ProbeActionType const type. +func PossibleProbeActionTypeValues() []ProbeActionType { + return []ProbeActionType{ + ProbeActionTypeExecAction, + ProbeActionTypeHTTPGetAction, + ProbeActionTypeTCPSocketAction, + } +} + +// ProvisioningState - Provisioning state of the Service +type ProvisioningState string + +const ( + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleted ProvisioningState = "Deleted" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateMoveFailed ProvisioningState = "MoveFailed" + ProvisioningStateMoved ProvisioningState = "Moved" + ProvisioningStateMoving ProvisioningState = "Moving" + ProvisioningStateStarting ProvisioningState = "Starting" + ProvisioningStateStopping ProvisioningState = "Stopping" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateCreating, + ProvisioningStateDeleted, + ProvisioningStateDeleting, + ProvisioningStateFailed, + ProvisioningStateMoveFailed, + ProvisioningStateMoved, + ProvisioningStateMoving, + ProvisioningStateStarting, + ProvisioningStateStopping, + ProvisioningStateSucceeded, + ProvisioningStateUpdating, + } +} + +// ResourceSKURestrictionsReasonCode - Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription' +type ResourceSKURestrictionsReasonCode string + +const ( + ResourceSKURestrictionsReasonCodeNotAvailableForSubscription ResourceSKURestrictionsReasonCode = "NotAvailableForSubscription" + ResourceSKURestrictionsReasonCodeQuotaID ResourceSKURestrictionsReasonCode = "QuotaId" +) + +// PossibleResourceSKURestrictionsReasonCodeValues returns the possible values for the ResourceSKURestrictionsReasonCode const type. +func PossibleResourceSKURestrictionsReasonCodeValues() []ResourceSKURestrictionsReasonCode { + return []ResourceSKURestrictionsReasonCode{ + ResourceSKURestrictionsReasonCodeNotAvailableForSubscription, + ResourceSKURestrictionsReasonCodeQuotaID, + } +} + +// ResourceSKURestrictionsType - Gets the type of restrictions. Possible values include: 'Location', 'Zone' +type ResourceSKURestrictionsType string + +const ( + ResourceSKURestrictionsTypeLocation ResourceSKURestrictionsType = "Location" + ResourceSKURestrictionsTypeZone ResourceSKURestrictionsType = "Zone" +) + +// PossibleResourceSKURestrictionsTypeValues returns the possible values for the ResourceSKURestrictionsType const type. +func PossibleResourceSKURestrictionsTypeValues() []ResourceSKURestrictionsType { + return []ResourceSKURestrictionsType{ + ResourceSKURestrictionsTypeLocation, + ResourceSKURestrictionsTypeZone, + } +} + +// SKUScaleType - Gets or sets the type of the scale. +type SKUScaleType string + +const ( + SKUScaleTypeAutomatic SKUScaleType = "Automatic" + SKUScaleTypeManual SKUScaleType = "Manual" + SKUScaleTypeNone SKUScaleType = "None" +) + +// PossibleSKUScaleTypeValues returns the possible values for the SKUScaleType const type. +func PossibleSKUScaleTypeValues() []SKUScaleType { + return []SKUScaleType{ + SKUScaleTypeAutomatic, + SKUScaleTypeManual, + SKUScaleTypeNone, + } +} + +// ServiceRegistryProvisioningState - State of the Service Registry. +type ServiceRegistryProvisioningState string + +const ( + ServiceRegistryProvisioningStateCreating ServiceRegistryProvisioningState = "Creating" + ServiceRegistryProvisioningStateDeleting ServiceRegistryProvisioningState = "Deleting" + ServiceRegistryProvisioningStateFailed ServiceRegistryProvisioningState = "Failed" + ServiceRegistryProvisioningStateSucceeded ServiceRegistryProvisioningState = "Succeeded" + ServiceRegistryProvisioningStateUpdating ServiceRegistryProvisioningState = "Updating" +) + +// PossibleServiceRegistryProvisioningStateValues returns the possible values for the ServiceRegistryProvisioningState const type. +func PossibleServiceRegistryProvisioningStateValues() []ServiceRegistryProvisioningState { + return []ServiceRegistryProvisioningState{ + ServiceRegistryProvisioningStateCreating, + ServiceRegistryProvisioningStateDeleting, + ServiceRegistryProvisioningStateFailed, + ServiceRegistryProvisioningStateSucceeded, + ServiceRegistryProvisioningStateUpdating, + } +} + +// SessionAffinity - Type of the affinity, set this to Cookie to enable session affinity. +type SessionAffinity string + +const ( + SessionAffinityCookie SessionAffinity = "Cookie" + SessionAffinityNone SessionAffinity = "None" +) + +// PossibleSessionAffinityValues returns the possible values for the SessionAffinity const type. +func PossibleSessionAffinityValues() []SessionAffinity { + return []SessionAffinity{ + SessionAffinityCookie, + SessionAffinityNone, + } +} + +// StorageType - The type of the storage. +type StorageType string + +const ( + StorageTypeStorageAccount StorageType = "StorageAccount" +) + +// PossibleStorageTypeValues returns the possible values for the StorageType const type. +func PossibleStorageTypeValues() []StorageType { + return []StorageType{ + StorageTypeStorageAccount, + } +} + +// SupportedRuntimePlatform - The platform of this runtime version (possible values: "Java" or ".NET"). +type SupportedRuntimePlatform string + +const ( + SupportedRuntimePlatformJava SupportedRuntimePlatform = "Java" + SupportedRuntimePlatformNETCore SupportedRuntimePlatform = ".NET Core" +) + +// PossibleSupportedRuntimePlatformValues returns the possible values for the SupportedRuntimePlatform const type. +func PossibleSupportedRuntimePlatformValues() []SupportedRuntimePlatform { + return []SupportedRuntimePlatform{ + SupportedRuntimePlatformJava, + SupportedRuntimePlatformNETCore, + } +} + +// SupportedRuntimeValue - The raw value which could be passed to deployment CRUD operations. +type SupportedRuntimeValue string + +const ( + SupportedRuntimeValueJava11 SupportedRuntimeValue = "Java_11" + SupportedRuntimeValueJava17 SupportedRuntimeValue = "Java_17" + SupportedRuntimeValueJava8 SupportedRuntimeValue = "Java_8" + SupportedRuntimeValueNetCore31 SupportedRuntimeValue = "NetCore_31" +) + +// PossibleSupportedRuntimeValueValues returns the possible values for the SupportedRuntimeValue const type. +func PossibleSupportedRuntimeValueValues() []SupportedRuntimeValue { + return []SupportedRuntimeValue{ + SupportedRuntimeValueJava11, + SupportedRuntimeValueJava17, + SupportedRuntimeValueJava8, + SupportedRuntimeValueNetCore31, + } +} + +// TestKeyType - Type of the test key +type TestKeyType string + +const ( + TestKeyTypePrimary TestKeyType = "Primary" + TestKeyTypeSecondary TestKeyType = "Secondary" +) + +// PossibleTestKeyTypeValues returns the possible values for the TestKeyType const type. +func PossibleTestKeyTypeValues() []TestKeyType { + return []TestKeyType{ + TestKeyTypePrimary, + TestKeyTypeSecondary, + } +} + +// TrafficDirection - The direction of required traffic +type TrafficDirection string + +const ( + TrafficDirectionInbound TrafficDirection = "Inbound" + TrafficDirectionOutbound TrafficDirection = "Outbound" +) + +// PossibleTrafficDirectionValues returns the possible values for the TrafficDirection const type. +func PossibleTrafficDirectionValues() []TrafficDirection { + return []TrafficDirection{ + TrafficDirectionInbound, + TrafficDirectionOutbound, + } +} + +// TriggeredBuildResultProvisioningState - The provisioning state of this build result +type TriggeredBuildResultProvisioningState string + +const ( + TriggeredBuildResultProvisioningStateBuilding TriggeredBuildResultProvisioningState = "Building" + TriggeredBuildResultProvisioningStateCanceled TriggeredBuildResultProvisioningState = "Canceled" + TriggeredBuildResultProvisioningStateDeleting TriggeredBuildResultProvisioningState = "Deleting" + TriggeredBuildResultProvisioningStateFailed TriggeredBuildResultProvisioningState = "Failed" + TriggeredBuildResultProvisioningStateQueuing TriggeredBuildResultProvisioningState = "Queuing" + TriggeredBuildResultProvisioningStateSucceeded TriggeredBuildResultProvisioningState = "Succeeded" +) + +// PossibleTriggeredBuildResultProvisioningStateValues returns the possible values for the TriggeredBuildResultProvisioningState const type. +func PossibleTriggeredBuildResultProvisioningStateValues() []TriggeredBuildResultProvisioningState { + return []TriggeredBuildResultProvisioningState{ + TriggeredBuildResultProvisioningStateBuilding, + TriggeredBuildResultProvisioningStateCanceled, + TriggeredBuildResultProvisioningStateDeleting, + TriggeredBuildResultProvisioningStateFailed, + TriggeredBuildResultProvisioningStateQueuing, + TriggeredBuildResultProvisioningStateSucceeded, + } +} + +// Type - The type of the underlying resource to mount as a persistent disk. +type Type string + +const ( + TypeAzureFileVolume Type = "AzureFileVolume" +) + +// PossibleTypeValues returns the possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{ + TypeAzureFileVolume, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/containerregistries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/containerregistries_client.go new file mode 100644 index 00000000..42e0ad0d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/containerregistries_client.go @@ -0,0 +1,438 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ContainerRegistriesClient contains the methods for the ContainerRegistries group. +// Don't use this type directly, use NewContainerRegistriesClient() instead. +type ContainerRegistriesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewContainerRegistriesClient creates a new instance of ContainerRegistriesClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewContainerRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerRegistriesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ContainerRegistriesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container registry resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - containerRegistryName - The name of the container registry. +// - containerRegistryResource - Parameters for the create or update operation +// - options - ContainerRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerRegistriesClient.BeginCreateOrUpdate +// method. +func (client *ContainerRegistriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, containerRegistryResource ContainerRegistryResource, options *ContainerRegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ContainerRegistriesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, containerRegistryName, containerRegistryResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerRegistriesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ContainerRegistriesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update container registry resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ContainerRegistriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, containerRegistryResource ContainerRegistryResource, options *ContainerRegistriesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ContainerRegistriesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, containerRegistryName, containerRegistryResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ContainerRegistriesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, containerRegistryResource ContainerRegistryResource, options *ContainerRegistriesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if containerRegistryName == "" { + return nil, errors.New("parameter containerRegistryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerRegistryName}", url.PathEscape(containerRegistryName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, containerRegistryResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete a container registry resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - containerRegistryName - The name of the container registry. +// - options - ContainerRegistriesClientBeginDeleteOptions contains the optional parameters for the ContainerRegistriesClient.BeginDelete +// method. +func (client *ContainerRegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, options *ContainerRegistriesClientBeginDeleteOptions) (*runtime.Poller[ContainerRegistriesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, containerRegistryName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerRegistriesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ContainerRegistriesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete a container registry resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ContainerRegistriesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, options *ContainerRegistriesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ContainerRegistriesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, containerRegistryName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ContainerRegistriesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, options *ContainerRegistriesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if containerRegistryName == "" { + return nil, errors.New("parameter containerRegistryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerRegistryName}", url.PathEscape(containerRegistryName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the container registries resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - containerRegistryName - The name of the container registry. +// - options - ContainerRegistriesClientGetOptions contains the optional parameters for the ContainerRegistriesClient.Get method. +func (client *ContainerRegistriesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, options *ContainerRegistriesClientGetOptions) (ContainerRegistriesClientGetResponse, error) { + var err error + const operationName = "ContainerRegistriesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, containerRegistryName, options) + if err != nil { + return ContainerRegistriesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ContainerRegistriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerRegistriesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ContainerRegistriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, options *ContainerRegistriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if containerRegistryName == "" { + return nil, errors.New("parameter containerRegistryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerRegistryName}", url.PathEscape(containerRegistryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ContainerRegistriesClient) getHandleResponse(resp *http.Response) (ContainerRegistriesClientGetResponse, error) { + result := ContainerRegistriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ContainerRegistryResource); err != nil { + return ContainerRegistriesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List container registries resource. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ContainerRegistriesClientListOptions contains the optional parameters for the ContainerRegistriesClient.NewListPager +// method. +func (client *ContainerRegistriesClient) NewListPager(resourceGroupName string, serviceName string, options *ContainerRegistriesClientListOptions) *runtime.Pager[ContainerRegistriesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ContainerRegistriesClientListResponse]{ + More: func(page ContainerRegistriesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ContainerRegistriesClientListResponse) (ContainerRegistriesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContainerRegistriesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return ContainerRegistriesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ContainerRegistriesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ContainerRegistriesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ContainerRegistriesClient) listHandleResponse(resp *http.Response) (ContainerRegistriesClientListResponse, error) { + result := ContainerRegistriesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ContainerRegistryResourceCollection); err != nil { + return ContainerRegistriesClientListResponse{}, err + } + return result, nil +} + +// BeginValidate - Check if the container registry properties are valid. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - containerRegistryName - The name of the container registry. +// - containerRegistryProperties - Parameters for the validate operation +// - options - ContainerRegistriesClientBeginValidateOptions contains the optional parameters for the ContainerRegistriesClient.BeginValidate +// method. +func (client *ContainerRegistriesClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, containerRegistryProperties ContainerRegistryProperties, options *ContainerRegistriesClientBeginValidateOptions) (*runtime.Poller[ContainerRegistriesClientValidateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validate(ctx, resourceGroupName, serviceName, containerRegistryName, containerRegistryProperties, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerRegistriesClientValidateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ContainerRegistriesClientValidateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Validate - Check if the container registry properties are valid. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ContainerRegistriesClient) validate(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, containerRegistryProperties ContainerRegistryProperties, options *ContainerRegistriesClientBeginValidateOptions) (*http.Response, error) { + var err error + const operationName = "ContainerRegistriesClient.BeginValidate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, containerRegistryName, containerRegistryProperties, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateCreateRequest creates the Validate request. +func (client *ContainerRegistriesClient) validateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, containerRegistryProperties ContainerRegistryProperties, options *ContainerRegistriesClientBeginValidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName}/validate" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if containerRegistryName == "" { + return nil, errors.New("parameter containerRegistryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerRegistryName}", url.PathEscape(containerRegistryName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, containerRegistryProperties); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/customdomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/customdomains_client.go new file mode 100644 index 00000000..16f4b178 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/customdomains_client.go @@ -0,0 +1,459 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// CustomDomainsClient contains the methods for the CustomDomains group. +// Don't use this type directly, use NewCustomDomainsClient() instead. +type CustomDomainsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCustomDomainsClient creates a new instance of CustomDomainsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomDomainsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CustomDomainsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update custom domain of one lifecycle application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - domainResource - Parameters for the create or update operation +// - options - CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate +// method. +func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomDomainsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomDomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update custom domain of one lifecycle application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *CustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CustomDomainsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *CustomDomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, domainResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the custom domain of one lifecycle application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete +// method. +func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, domainName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomDomainsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the custom domain of one lifecycle application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *CustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "CustomDomainsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *CustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the custom domain of one lifecycle application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. +func (client *CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error) { + var err error + const operationName = "CustomDomainsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, options) + if err != nil { + return CustomDomainsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CustomDomainsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CustomDomainsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *CustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *CustomDomainsClient) getHandleResponse(resp *http.Response) (CustomDomainsClientGetResponse, error) { + result := CustomDomainsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainResource); err != nil { + return CustomDomainsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List the custom domains of one lifecycle application. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method. +func (client *CustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *CustomDomainsClientListOptions) *runtime.Pager[CustomDomainsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[CustomDomainsClientListResponse]{ + More: func(page CustomDomainsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CustomDomainsClientListResponse) (CustomDomainsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CustomDomainsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, appName, options) + }, nil) + if err != nil { + return CustomDomainsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *CustomDomainsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *CustomDomainsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *CustomDomainsClient) listHandleResponse(resp *http.Response) (CustomDomainsClientListResponse, error) { + result := CustomDomainsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainResourceCollection); err != nil { + return CustomDomainsClientListResponse{}, err + } + return result, nil +} + +// BeginUpdate - Update custom domain of one lifecycle application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - domainName - The name of the custom domain resource. +// - domainResource - Parameters for the create or update operation +// - options - CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate +// method. +func (client *CustomDomainsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*runtime.Poller[CustomDomainsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomDomainsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Update custom domain of one lifecycle application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *CustomDomainsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CustomDomainsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *CustomDomainsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, domainResource); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/customizedaccelerators_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/customizedaccelerators_client.go new file mode 100644 index 00000000..546aa404 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/customizedaccelerators_client.go @@ -0,0 +1,461 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// CustomizedAcceleratorsClient contains the methods for the CustomizedAccelerators group. +// Don't use this type directly, use NewCustomizedAcceleratorsClient() instead. +type CustomizedAcceleratorsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCustomizedAcceleratorsClient creates a new instance of CustomizedAcceleratorsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCustomizedAcceleratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomizedAcceleratorsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CustomizedAcceleratorsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update the customized accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - customizedAcceleratorName - The name of the customized accelerator. +// - customizedAcceleratorResource - The customized accelerator for the create or update operation +// - options - CustomizedAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginCreateOrUpdate +// method. +func (client *CustomizedAcceleratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, customizedAcceleratorResource CustomizedAcceleratorResource, options *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomizedAcceleratorsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, customizedAcceleratorResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomizedAcceleratorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomizedAcceleratorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update the customized accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *CustomizedAcceleratorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, customizedAcceleratorResource CustomizedAcceleratorResource, options *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CustomizedAcceleratorsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, customizedAcceleratorResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *CustomizedAcceleratorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, customizedAcceleratorResource CustomizedAcceleratorResource, options *CustomizedAcceleratorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + if customizedAcceleratorName == "" { + return nil, errors.New("parameter customizedAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customizedAcceleratorName}", url.PathEscape(customizedAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, customizedAcceleratorResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the customized accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - customizedAcceleratorName - The name of the customized accelerator. +// - options - CustomizedAcceleratorsClientBeginDeleteOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginDelete +// method. +func (client *CustomizedAcceleratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientBeginDeleteOptions) (*runtime.Poller[CustomizedAcceleratorsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomizedAcceleratorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomizedAcceleratorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the customized accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *CustomizedAcceleratorsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "CustomizedAcceleratorsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *CustomizedAcceleratorsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + if customizedAcceleratorName == "" { + return nil, errors.New("parameter customizedAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customizedAcceleratorName}", url.PathEscape(customizedAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the customized accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - customizedAcceleratorName - The name of the customized accelerator. +// - options - CustomizedAcceleratorsClientGetOptions contains the optional parameters for the CustomizedAcceleratorsClient.Get +// method. +func (client *CustomizedAcceleratorsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientGetOptions) (CustomizedAcceleratorsClientGetResponse, error) { + var err error + const operationName = "CustomizedAcceleratorsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, options) + if err != nil { + return CustomizedAcceleratorsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CustomizedAcceleratorsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CustomizedAcceleratorsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *CustomizedAcceleratorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, options *CustomizedAcceleratorsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + if customizedAcceleratorName == "" { + return nil, errors.New("parameter customizedAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customizedAcceleratorName}", url.PathEscape(customizedAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *CustomizedAcceleratorsClient) getHandleResponse(resp *http.Response) (CustomizedAcceleratorsClientGetResponse, error) { + result := CustomizedAcceleratorsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomizedAcceleratorResource); err != nil { + return CustomizedAcceleratorsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handle requests to list all customized accelerators. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - options - CustomizedAcceleratorsClientListOptions contains the optional parameters for the CustomizedAcceleratorsClient.NewListPager +// method. +func (client *CustomizedAcceleratorsClient) NewListPager(resourceGroupName string, serviceName string, applicationAcceleratorName string, options *CustomizedAcceleratorsClientListOptions) *runtime.Pager[CustomizedAcceleratorsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[CustomizedAcceleratorsClientListResponse]{ + More: func(page CustomizedAcceleratorsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CustomizedAcceleratorsClientListResponse) (CustomizedAcceleratorsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CustomizedAcceleratorsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) + }, nil) + if err != nil { + return CustomizedAcceleratorsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *CustomizedAcceleratorsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *CustomizedAcceleratorsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *CustomizedAcceleratorsClient) listHandleResponse(resp *http.Response) (CustomizedAcceleratorsClientListResponse, error) { + result := CustomizedAcceleratorsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomizedAcceleratorResourceCollection); err != nil { + return CustomizedAcceleratorsClientListResponse{}, err + } + return result, nil +} + +// BeginValidate - Check the customized accelerator are valid. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - customizedAcceleratorName - The name of the customized accelerator. +// - properties - Customized accelerator properties to be validated +// - options - CustomizedAcceleratorsClientBeginValidateOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginValidate +// method. +func (client *CustomizedAcceleratorsClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, properties CustomizedAcceleratorProperties, options *CustomizedAcceleratorsClientBeginValidateOptions) (*runtime.Poller[CustomizedAcceleratorsClientValidateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validate(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, properties, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomizedAcceleratorsClientValidateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomizedAcceleratorsClientValidateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Validate - Check the customized accelerator are valid. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *CustomizedAcceleratorsClient) validate(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, properties CustomizedAcceleratorProperties, options *CustomizedAcceleratorsClientBeginValidateOptions) (*http.Response, error) { + var err error + const operationName = "CustomizedAcceleratorsClient.BeginValidate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, properties, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateCreateRequest creates the Validate request. +func (client *CustomizedAcceleratorsClient) validateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, customizedAcceleratorName string, properties CustomizedAcceleratorProperties, options *CustomizedAcceleratorsClientBeginValidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/customizedAccelerators/{customizedAcceleratorName}/validate" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + if customizedAcceleratorName == "" { + return nil, errors.New("parameter customizedAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customizedAcceleratorName}", url.PathEscape(customizedAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/deployments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/deployments_client.go new file mode 100644 index 00000000..547fbd0e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/deployments_client.go @@ -0,0 +1,1400 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DeploymentsClient contains the methods for the Deployments group. +// Don't use this type directly, use NewDeploymentsClient() instead. +type DeploymentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDeploymentsClient creates a new instance of DeploymentsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DeploymentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create a new Deployment or update an exiting Deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - deploymentResource - Parameters for the create or update operation +// - options - DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate +// method. +func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DeploymentsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create a new Deployment or update an exiting Deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DeploymentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, deploymentResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Operation to delete a Deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. +func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*runtime.Poller[DeploymentsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Operation to delete a Deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DeploymentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDisableRemoteDebugging - Disable remote debugging. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginDisableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginDisableRemoteDebugging +// method. +func (client *DeploymentsClient) BeginDisableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientDisableRemoteDebuggingResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.disableRemoteDebugging(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientDisableRemoteDebuggingResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientDisableRemoteDebuggingResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DisableRemoteDebugging - Disable remote debugging. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) disableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginDisableRemoteDebugging" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableRemoteDebuggingCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// disableRemoteDebuggingCreateRequest creates the DisableRemoteDebugging request. +func (client *DeploymentsClient) disableRemoteDebuggingCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDisableRemoteDebuggingOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/disableRemoteDebugging" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginEnableRemoteDebugging - Enable remote debugging. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginEnableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginEnableRemoteDebugging +// method. +func (client *DeploymentsClient) BeginEnableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*runtime.Poller[DeploymentsClientEnableRemoteDebuggingResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.enableRemoteDebugging(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientEnableRemoteDebuggingResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientEnableRemoteDebuggingResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// EnableRemoteDebugging - Enable remote debugging. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) enableRemoteDebugging(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginEnableRemoteDebugging" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.enableRemoteDebuggingCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// enableRemoteDebuggingCreateRequest creates the EnableRemoteDebugging request. +func (client *DeploymentsClient) enableRemoteDebuggingCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginEnableRemoteDebuggingOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/enableRemoteDebugging" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.RemoteDebuggingPayload != nil { + if err := runtime.MarshalAsJSON(req, *options.RemoteDebuggingPayload); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginGenerateHeapDump - Generate Heap Dump +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - diagnosticParameters - Parameters for the diagnostic operation +// - options - DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump +// method. +func (client *DeploymentsClient) BeginGenerateHeapDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*runtime.Poller[DeploymentsClientGenerateHeapDumpResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.generateHeapDump(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientGenerateHeapDumpResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientGenerateHeapDumpResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GenerateHeapDump - Generate Heap Dump +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) generateHeapDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginGenerateHeapDump" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateHeapDumpCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// generateHeapDumpCreateRequest creates the GenerateHeapDump request. +func (client *DeploymentsClient) generateHeapDumpCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateHeapDump" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, diagnosticParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginGenerateThreadDump - Generate Thread Dump +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - diagnosticParameters - Parameters for the diagnostic operation +// - options - DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump +// method. +func (client *DeploymentsClient) BeginGenerateThreadDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*runtime.Poller[DeploymentsClientGenerateThreadDumpResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.generateThreadDump(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientGenerateThreadDumpResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientGenerateThreadDumpResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GenerateThreadDump - Generate Thread Dump +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) generateThreadDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginGenerateThreadDump" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateThreadDumpCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// generateThreadDumpCreateRequest creates the GenerateThreadDump request. +func (client *DeploymentsClient) generateThreadDumpCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateThreadDump" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, diagnosticParameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Get a Deployment and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. +func (client *DeploymentsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetOptions) (DeploymentsClientGetResponse, error) { + var err error + const operationName = "DeploymentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return DeploymentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DeploymentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DeploymentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DeploymentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DeploymentsClient) getHandleResponse(resp *http.Response) (DeploymentsClientGetResponse, error) { + result := DeploymentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentResource); err != nil { + return DeploymentsClientGetResponse{}, err + } + return result, nil +} + +// GetLogFileURL - Get deployment log file URL +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL +// method. +func (client *DeploymentsClient) GetLogFileURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetLogFileURLOptions) (DeploymentsClientGetLogFileURLResponse, error) { + var err error + const operationName = "DeploymentsClient.GetLogFileURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getLogFileURLCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return DeploymentsClientGetLogFileURLResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DeploymentsClientGetLogFileURLResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DeploymentsClientGetLogFileURLResponse{}, err + } + resp, err := client.getLogFileURLHandleResponse(httpResp) + return resp, err +} + +// getLogFileURLCreateRequest creates the GetLogFileURL request. +func (client *DeploymentsClient) getLogFileURLCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetLogFileURLOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getLogFileUrl" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLogFileURLHandleResponse handles the GetLogFileURL response. +func (client *DeploymentsClient) getLogFileURLHandleResponse(resp *http.Response) (DeploymentsClientGetLogFileURLResponse, error) { + result := DeploymentsClientGetLogFileURLResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LogFileURLResponse); err != nil { + return DeploymentsClientGetLogFileURLResponse{}, err + } + return result, nil +} + +// GetRemoteDebuggingConfig - Get remote debugging config. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientGetRemoteDebuggingConfigOptions contains the optional parameters for the DeploymentsClient.GetRemoteDebuggingConfig +// method. +func (client *DeploymentsClient) GetRemoteDebuggingConfig(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetRemoteDebuggingConfigOptions) (DeploymentsClientGetRemoteDebuggingConfigResponse, error) { + var err error + const operationName = "DeploymentsClient.GetRemoteDebuggingConfig" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getRemoteDebuggingConfigCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return DeploymentsClientGetRemoteDebuggingConfigResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DeploymentsClientGetRemoteDebuggingConfigResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DeploymentsClientGetRemoteDebuggingConfigResponse{}, err + } + resp, err := client.getRemoteDebuggingConfigHandleResponse(httpResp) + return resp, err +} + +// getRemoteDebuggingConfigCreateRequest creates the GetRemoteDebuggingConfig request. +func (client *DeploymentsClient) getRemoteDebuggingConfigCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetRemoteDebuggingConfigOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getRemoteDebuggingConfig" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getRemoteDebuggingConfigHandleResponse handles the GetRemoteDebuggingConfig response. +func (client *DeploymentsClient) getRemoteDebuggingConfigHandleResponse(resp *http.Response) (DeploymentsClientGetRemoteDebuggingConfigResponse, error) { + result := DeploymentsClientGetRemoteDebuggingConfigResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RemoteDebugging); err != nil { + return DeploymentsClientGetRemoteDebuggingConfigResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all resources in an App. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - options - DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method. +func (client *DeploymentsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *DeploymentsClientListOptions) *runtime.Pager[DeploymentsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DeploymentsClientListResponse]{ + More: func(page DeploymentsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DeploymentsClientListResponse) (DeploymentsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, appName, options) + }, nil) + if err != nil { + return DeploymentsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DeploymentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *DeploymentsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + if options != nil && options.Version != nil { + for _, qv := range options.Version { + reqQP.Add("version", qv) + } + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DeploymentsClient) listHandleResponse(resp *http.Response) (DeploymentsClientListResponse, error) { + result := DeploymentsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentResourceCollection); err != nil { + return DeploymentsClientListResponse{}, err + } + return result, nil +} + +// NewListForClusterPager - List deployments for a certain service +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.NewListForClusterPager +// method. +func (client *DeploymentsClient) NewListForClusterPager(resourceGroupName string, serviceName string, options *DeploymentsClientListForClusterOptions) *runtime.Pager[DeploymentsClientListForClusterResponse] { + return runtime.NewPager(runtime.PagingHandler[DeploymentsClientListForClusterResponse]{ + More: func(page DeploymentsClientListForClusterResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DeploymentsClientListForClusterResponse) (DeploymentsClientListForClusterResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeploymentsClient.NewListForClusterPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listForClusterCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return DeploymentsClientListForClusterResponse{}, err + } + return client.listForClusterHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listForClusterCreateRequest creates the ListForCluster request. +func (client *DeploymentsClient) listForClusterCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *DeploymentsClientListForClusterOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + if options != nil && options.Version != nil { + for _, qv := range options.Version { + reqQP.Add("version", qv) + } + } + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listForClusterHandleResponse handles the ListForCluster response. +func (client *DeploymentsClient) listForClusterHandleResponse(resp *http.Response) (DeploymentsClientListForClusterResponse, error) { + result := DeploymentsClientListForClusterResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentResourceCollection); err != nil { + return DeploymentsClientListForClusterResponse{}, err + } + return result, nil +} + +// BeginRestart - Restart the deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart +// method. +func (client *DeploymentsClient) BeginRestart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*runtime.Poller[DeploymentsClientRestartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restart(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Restart - Restart the deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) restart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginRestart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restartCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restartCreateRequest creates the Restart request. +func (client *DeploymentsClient) restartCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStart - Start the deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method. +func (client *DeploymentsClient) BeginStart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*runtime.Poller[DeploymentsClientStartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.start(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Start - Start the deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) start(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startCreateRequest creates the Start request. +func (client *DeploymentsClient) startCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStartJFR - Start JFR +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - diagnosticParameters - Parameters for the diagnostic operation +// - options - DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR +// method. +func (client *DeploymentsClient) BeginStartJFR(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*runtime.Poller[DeploymentsClientStartJFRResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startJFR(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientStartJFRResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientStartJFRResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartJFR - Start JFR +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) startJFR(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginStartJFR" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startJFRCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startJFRCreateRequest creates the StartJFR request. +func (client *DeploymentsClient) startJFRCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/startJFR" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, diagnosticParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginStop - Stop the deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - options - DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method. +func (client *DeploymentsClient) BeginStop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*runtime.Poller[DeploymentsClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Stop - Stop the deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) stop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopCreateRequest creates the Stop request. +func (client *DeploymentsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdate - Operation to update an exiting Deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - appName - The name of the App resource. +// - deploymentName - The name of the Deployment resource. +// - deploymentResource - Parameters for the update operation +// - options - DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. +func (client *DeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*runtime.Poller[DeploymentsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeploymentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeploymentsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Operation to update an exiting Deployment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DeploymentsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DeploymentsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *DeploymentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if appName == "" { + return nil, errors.New("parameter appName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) + if deploymentName == "" { + return nil, errors.New("parameter deploymentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, deploymentResource); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/devtoolportals_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/devtoolportals_client.go new file mode 100644 index 00000000..181a9a4a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/devtoolportals_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DevToolPortalsClient contains the methods for the DevToolPortals group. +// Don't use this type directly, use NewDevToolPortalsClient() instead. +type DevToolPortalsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDevToolPortalsClient creates a new instance of DevToolPortalsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDevToolPortalsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DevToolPortalsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DevToolPortalsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create the default Dev Tool Portal or update the existing Dev Tool Portal. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - devToolPortalName - The name of Dev Tool Portal. +// - devToolPortalResource - Parameters for the create or update operation +// - options - DevToolPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevToolPortalsClient.BeginCreateOrUpdate +// method. +func (client *DevToolPortalsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, devToolPortalResource DevToolPortalResource, options *DevToolPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevToolPortalsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, devToolPortalName, devToolPortalResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DevToolPortalsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DevToolPortalsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create the default Dev Tool Portal or update the existing Dev Tool Portal. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DevToolPortalsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, devToolPortalResource DevToolPortalResource, options *DevToolPortalsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DevToolPortalsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, devToolPortalName, devToolPortalResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DevToolPortalsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, devToolPortalResource DevToolPortalResource, options *DevToolPortalsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if devToolPortalName == "" { + return nil, errors.New("parameter devToolPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devToolPortalName}", url.PathEscape(devToolPortalName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, devToolPortalResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Disable the default Dev Tool Portal. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - devToolPortalName - The name of Dev Tool Portal. +// - options - DevToolPortalsClientBeginDeleteOptions contains the optional parameters for the DevToolPortalsClient.BeginDelete +// method. +func (client *DevToolPortalsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientBeginDeleteOptions) (*runtime.Poller[DevToolPortalsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, devToolPortalName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DevToolPortalsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DevToolPortalsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Disable the default Dev Tool Portal. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *DevToolPortalsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DevToolPortalsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, devToolPortalName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DevToolPortalsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if devToolPortalName == "" { + return nil, errors.New("parameter devToolPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devToolPortalName}", url.PathEscape(devToolPortalName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the Application Live and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - devToolPortalName - The name of Dev Tool Portal. +// - options - DevToolPortalsClientGetOptions contains the optional parameters for the DevToolPortalsClient.Get method. +func (client *DevToolPortalsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientGetOptions) (DevToolPortalsClientGetResponse, error) { + var err error + const operationName = "DevToolPortalsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, devToolPortalName, options) + if err != nil { + return DevToolPortalsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DevToolPortalsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DevToolPortalsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DevToolPortalsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, devToolPortalName string, options *DevToolPortalsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/DevToolPortals/{devToolPortalName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if devToolPortalName == "" { + return nil, errors.New("parameter devToolPortalName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devToolPortalName}", url.PathEscape(devToolPortalName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DevToolPortalsClient) getHandleResponse(resp *http.Response) (DevToolPortalsClientGetResponse, error) { + result := DevToolPortalsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DevToolPortalResource); err != nil { + return DevToolPortalsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all resources in a Service. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - DevToolPortalsClientListOptions contains the optional parameters for the DevToolPortalsClient.NewListPager method. +func (client *DevToolPortalsClient) NewListPager(resourceGroupName string, serviceName string, options *DevToolPortalsClientListOptions) *runtime.Pager[DevToolPortalsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DevToolPortalsClientListResponse]{ + More: func(page DevToolPortalsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DevToolPortalsClientListResponse) (DevToolPortalsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DevToolPortalsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return DevToolPortalsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DevToolPortalsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *DevToolPortalsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/devToolPortals" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DevToolPortalsClient) listHandleResponse(resp *http.Response) (DevToolPortalsClientListResponse, error) { + result := DevToolPortalsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DevToolPortalResourceCollection); err != nil { + return DevToolPortalsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/gatewaycustomdomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/gatewaycustomdomains_client.go new file mode 100644 index 00000000..52cb6a6c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/gatewaycustomdomains_client.go @@ -0,0 +1,370 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GatewayCustomDomainsClient contains the methods for the GatewayCustomDomains group. +// Don't use this type directly, use NewGatewayCustomDomainsClient() instead. +type GatewayCustomDomainsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGatewayCustomDomainsClient creates a new instance of GatewayCustomDomainsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGatewayCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayCustomDomainsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GatewayCustomDomainsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update the Spring Cloud Gateway custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - domainName - The name of the Spring Cloud Gateway custom domain. +// - gatewayCustomDomainResource - The gateway custom domain resource for the create or update operation +// - options - GatewayCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginCreateOrUpdate +// method. +func (client *GatewayCustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayCustomDomainsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, domainName, gatewayCustomDomainResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GatewayCustomDomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GatewayCustomDomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update the Spring Cloud Gateway custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *GatewayCustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "GatewayCustomDomainsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, gatewayCustomDomainResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *GatewayCustomDomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, gatewayCustomDomainResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the Spring Cloud Gateway custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - domainName - The name of the Spring Cloud Gateway custom domain. +// - options - GatewayCustomDomainsClientBeginDeleteOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginDelete +// method. +func (client *GatewayCustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[GatewayCustomDomainsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GatewayCustomDomainsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GatewayCustomDomainsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the Spring Cloud Gateway custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *GatewayCustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "GatewayCustomDomainsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *GatewayCustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the Spring Cloud Gateway custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - domainName - The name of the Spring Cloud Gateway custom domain. +// - options - GatewayCustomDomainsClientGetOptions contains the optional parameters for the GatewayCustomDomainsClient.Get +// method. +func (client *GatewayCustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientGetOptions) (GatewayCustomDomainsClientGetResponse, error) { + var err error + const operationName = "GatewayCustomDomainsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) + if err != nil { + return GatewayCustomDomainsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayCustomDomainsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayCustomDomainsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *GatewayCustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *GatewayCustomDomainsClient) getHandleResponse(resp *http.Response) (GatewayCustomDomainsClientGetResponse, error) { + result := GatewayCustomDomainsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayCustomDomainResource); err != nil { + return GatewayCustomDomainsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handle requests to list all Spring Cloud Gateway custom domains. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.NewListPager +// method. +func (client *GatewayCustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, gatewayName string, options *GatewayCustomDomainsClientListOptions) *runtime.Pager[GatewayCustomDomainsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[GatewayCustomDomainsClientListResponse]{ + More: func(page GatewayCustomDomainsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GatewayCustomDomainsClientListResponse) (GatewayCustomDomainsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GatewayCustomDomainsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) + }, nil) + if err != nil { + return GatewayCustomDomainsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *GatewayCustomDomainsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewayCustomDomainsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *GatewayCustomDomainsClient) listHandleResponse(resp *http.Response) (GatewayCustomDomainsClientListResponse, error) { + result := GatewayCustomDomainsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayCustomDomainResourceCollection); err != nil { + return GatewayCustomDomainsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/gatewayrouteconfigs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/gatewayrouteconfigs_client.go new file mode 100644 index 00000000..3c92666b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/gatewayrouteconfigs_client.go @@ -0,0 +1,371 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GatewayRouteConfigsClient contains the methods for the GatewayRouteConfigs group. +// Don't use this type directly, use NewGatewayRouteConfigsClient() instead. +type GatewayRouteConfigsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGatewayRouteConfigsClient creates a new instance of GatewayRouteConfigsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGatewayRouteConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayRouteConfigsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GatewayRouteConfigsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway +// route configs. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - routeConfigName - The name of the Spring Cloud Gateway route config. +// - gatewayRouteConfigResource - The Spring Cloud Gateway route config for the create or update operation +// - options - GatewayRouteConfigsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginCreateOrUpdate +// method. +func (client *GatewayRouteConfigsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayRouteConfigsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, gatewayRouteConfigResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GatewayRouteConfigsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GatewayRouteConfigsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route +// configs. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *GatewayRouteConfigsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "GatewayRouteConfigsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, gatewayRouteConfigResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *GatewayRouteConfigsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if routeConfigName == "" { + return nil, errors.New("parameter routeConfigName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeConfigName}", url.PathEscape(routeConfigName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, gatewayRouteConfigResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the Spring Cloud Gateway route config. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - routeConfigName - The name of the Spring Cloud Gateway route config. +// - options - GatewayRouteConfigsClientBeginDeleteOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginDelete +// method. +func (client *GatewayRouteConfigsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*runtime.Poller[GatewayRouteConfigsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GatewayRouteConfigsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GatewayRouteConfigsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the Spring Cloud Gateway route config. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *GatewayRouteConfigsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "GatewayRouteConfigsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *GatewayRouteConfigsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if routeConfigName == "" { + return nil, errors.New("parameter routeConfigName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeConfigName}", url.PathEscape(routeConfigName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the Spring Cloud Gateway route configs. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - routeConfigName - The name of the Spring Cloud Gateway route config. +// - options - GatewayRouteConfigsClientGetOptions contains the optional parameters for the GatewayRouteConfigsClient.Get method. +func (client *GatewayRouteConfigsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientGetOptions) (GatewayRouteConfigsClientGetResponse, error) { + var err error + const operationName = "GatewayRouteConfigsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) + if err != nil { + return GatewayRouteConfigsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewayRouteConfigsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewayRouteConfigsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *GatewayRouteConfigsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if routeConfigName == "" { + return nil, errors.New("parameter routeConfigName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeConfigName}", url.PathEscape(routeConfigName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *GatewayRouteConfigsClient) getHandleResponse(resp *http.Response) (GatewayRouteConfigsClientGetResponse, error) { + result := GatewayRouteConfigsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayRouteConfigResource); err != nil { + return GatewayRouteConfigsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handle requests to list all Spring Cloud Gateway route configs. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.NewListPager +// method. +func (client *GatewayRouteConfigsClient) NewListPager(resourceGroupName string, serviceName string, gatewayName string, options *GatewayRouteConfigsClientListOptions) *runtime.Pager[GatewayRouteConfigsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[GatewayRouteConfigsClientListResponse]{ + More: func(page GatewayRouteConfigsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GatewayRouteConfigsClientListResponse) (GatewayRouteConfigsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GatewayRouteConfigsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) + }, nil) + if err != nil { + return GatewayRouteConfigsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *GatewayRouteConfigsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewayRouteConfigsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *GatewayRouteConfigsClient) listHandleResponse(resp *http.Response) (GatewayRouteConfigsClientListResponse, error) { + result := GatewayRouteConfigsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayRouteConfigResourceCollection); err != nil { + return GatewayRouteConfigsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/gateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/gateways_client.go new file mode 100644 index 00000000..32e64c65 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/gateways_client.go @@ -0,0 +1,573 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GatewaysClient contains the methods for the Gateways group. +// Don't use this type directly, use NewGatewaysClient() instead. +type GatewaysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGatewaysClient creates a new instance of GatewaysClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewaysClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GatewaysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - gatewayResource - The gateway for the create or update operation +// - options - GatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewaysClient.BeginCreateOrUpdate +// method. +func (client *GatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, gatewayResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *GatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "GatewaysClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, gatewayResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *GatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, gatewayResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Disable the default Spring Cloud Gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewaysClientBeginDeleteOptions contains the optional parameters for the GatewaysClient.BeginDelete method. +func (client *GatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*runtime.Poller[GatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Disable the default Spring Cloud Gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *GatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "GatewaysClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *GatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the Spring Cloud Gateway and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewaysClientGetOptions contains the optional parameters for the GatewaysClient.Get method. +func (client *GatewaysClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientGetOptions) (GatewaysClientGetResponse, error) { + var err error + const operationName = "GatewaysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) + if err != nil { + return GatewaysClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewaysClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewaysClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *GatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *GatewaysClient) getHandleResponse(resp *http.Response) (GatewaysClientGetResponse, error) { + result := GatewaysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayResource); err != nil { + return GatewaysClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all resources in a Service. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - GatewaysClientListOptions contains the optional parameters for the GatewaysClient.NewListPager method. +func (client *GatewaysClient) NewListPager(resourceGroupName string, serviceName string, options *GatewaysClientListOptions) *runtime.Pager[GatewaysClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[GatewaysClientListResponse]{ + More: func(page GatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GatewaysClientListResponse) (GatewaysClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GatewaysClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return GatewaysClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *GatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *GatewaysClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *GatewaysClient) listHandleResponse(resp *http.Response) (GatewaysClientListResponse, error) { + result := GatewaysClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GatewayResourceCollection); err != nil { + return GatewaysClientListResponse{}, err + } + return result, nil +} + +// ListEnvSecrets - List sensitive environment variables of Spring Cloud Gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewaysClientListEnvSecretsOptions contains the optional parameters for the GatewaysClient.ListEnvSecrets method. +func (client *GatewaysClient) ListEnvSecrets(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientListEnvSecretsOptions) (GatewaysClientListEnvSecretsResponse, error) { + var err error + const operationName = "GatewaysClient.ListEnvSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listEnvSecretsCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) + if err != nil { + return GatewaysClientListEnvSecretsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewaysClientListEnvSecretsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewaysClientListEnvSecretsResponse{}, err + } + resp, err := client.listEnvSecretsHandleResponse(httpResp) + return resp, err +} + +// listEnvSecretsCreateRequest creates the ListEnvSecrets request. +func (client *GatewaysClient) listEnvSecretsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientListEnvSecretsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/listEnvSecrets" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listEnvSecretsHandleResponse handles the ListEnvSecrets response. +func (client *GatewaysClient) listEnvSecretsHandleResponse(resp *http.Response) (GatewaysClientListEnvSecretsResponse, error) { + result := GatewaysClientListEnvSecretsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { + return GatewaysClientListEnvSecretsResponse{}, err + } + return result, nil +} + +// BeginRestart - Restart the Spring Cloud Gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - options - GatewaysClientBeginRestartOptions contains the optional parameters for the GatewaysClient.BeginRestart method. +func (client *GatewaysClient) BeginRestart(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginRestartOptions) (*runtime.Poller[GatewaysClientRestartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restart(ctx, resourceGroupName, serviceName, gatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GatewaysClientRestartResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GatewaysClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Restart - Restart the Spring Cloud Gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *GatewaysClient) restart(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginRestartOptions) (*http.Response, error) { + var err error + const operationName = "GatewaysClient.BeginRestart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restartCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restartCreateRequest creates the Restart request. +func (client *GatewaysClient) restartCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginRestartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/restart" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// ValidateDomain - Check the domains are valid as well as not in use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - gatewayName - The name of Spring Cloud Gateway. +// - validatePayload - Custom domain payload to be validated +// - options - GatewaysClientValidateDomainOptions contains the optional parameters for the GatewaysClient.ValidateDomain method. +func (client *GatewaysClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, validatePayload CustomDomainValidatePayload, options *GatewaysClientValidateDomainOptions) (GatewaysClientValidateDomainResponse, error) { + var err error + const operationName = "GatewaysClient.ValidateDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, validatePayload, options) + if err != nil { + return GatewaysClientValidateDomainResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GatewaysClientValidateDomainResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GatewaysClientValidateDomainResponse{}, err + } + resp, err := client.validateDomainHandleResponse(httpResp) + return resp, err +} + +// validateDomainCreateRequest creates the ValidateDomain request. +func (client *GatewaysClient) validateDomainCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, validatePayload CustomDomainValidatePayload, options *GatewaysClientValidateDomainOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/validateDomain" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, validatePayload); err != nil { + return nil, err + } + return req, nil +} + +// validateDomainHandleResponse handles the ValidateDomain response. +func (client *GatewaysClient) validateDomainHandleResponse(resp *http.Response) (GatewaysClientValidateDomainResponse, error) { + result := GatewaysClientValidateDomainResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainValidateResult); err != nil { + return GatewaysClientValidateDomainResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/interfaces.go new file mode 100644 index 00000000..b082ebf8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/interfaces.go @@ -0,0 +1,84 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +// AcceleratorAuthSettingClassification provides polymorphic access to related types. +// Call the interface's GetAcceleratorAuthSetting() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AcceleratorAuthSetting, *AcceleratorBasicAuthSetting, *AcceleratorPublicSetting, *AcceleratorSSHSetting +type AcceleratorAuthSettingClassification interface { + // GetAcceleratorAuthSetting returns the AcceleratorAuthSetting content of the underlying type. + GetAcceleratorAuthSetting() *AcceleratorAuthSetting +} + +// CertificatePropertiesClassification provides polymorphic access to related types. +// Call the interface's GetCertificateProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CertificateProperties, *ContentCertificateProperties, *KeyVaultCertificateProperties +type CertificatePropertiesClassification interface { + // GetCertificateProperties returns the CertificateProperties content of the underlying type. + GetCertificateProperties() *CertificateProperties +} + +// ContainerRegistryCredentialsClassification provides polymorphic access to related types. +// Call the interface's GetContainerRegistryCredentials() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ContainerRegistryBasicCredentials, *ContainerRegistryCredentials +type ContainerRegistryCredentialsClassification interface { + // GetContainerRegistryCredentials returns the ContainerRegistryCredentials content of the underlying type. + GetContainerRegistryCredentials() *ContainerRegistryCredentials +} + +// CustomPersistentDiskPropertiesClassification provides polymorphic access to related types. +// Call the interface's GetCustomPersistentDiskProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileVolume, *CustomPersistentDiskProperties +type CustomPersistentDiskPropertiesClassification interface { + // GetCustomPersistentDiskProperties returns the CustomPersistentDiskProperties content of the underlying type. + GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties +} + +// ProbeActionClassification provides polymorphic access to related types. +// Call the interface's GetProbeAction() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ExecAction, *HTTPGetAction, *ProbeAction, *TCPSocketAction +type ProbeActionClassification interface { + // GetProbeAction returns the ProbeAction content of the underlying type. + GetProbeAction() *ProbeAction +} + +// StoragePropertiesClassification provides polymorphic access to related types. +// Call the interface's GetStorageProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *StorageAccount, *StorageProperties +type StoragePropertiesClassification interface { + // GetStorageProperties returns the StorageProperties content of the underlying type. + GetStorageProperties() *StorageProperties +} + +// UploadedUserSourceInfoClassification provides polymorphic access to related types. +// Call the interface's GetUploadedUserSourceInfo() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *JarUploadedUserSourceInfo, *NetCoreZipUploadedUserSourceInfo, *SourceUploadedUserSourceInfo, *UploadedUserSourceInfo, +// - *WarUploadedUserSourceInfo +type UploadedUserSourceInfoClassification interface { + UserSourceInfoClassification + // GetUploadedUserSourceInfo returns the UploadedUserSourceInfo content of the underlying type. + GetUploadedUserSourceInfo() *UploadedUserSourceInfo +} + +// UserSourceInfoClassification provides polymorphic access to related types. +// Call the interface's GetUserSourceInfo() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BuildResultUserSourceInfo, *CustomContainerUserSourceInfo, *JarUploadedUserSourceInfo, *NetCoreZipUploadedUserSourceInfo, +// - *SourceUploadedUserSourceInfo, *UploadedUserSourceInfo, *UserSourceInfo, *WarUploadedUserSourceInfo +type UserSourceInfoClassification interface { + // GetUserSourceInfo returns the UserSourceInfo content of the underlying type. + GetUserSourceInfo() *UserSourceInfo +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/models.go new file mode 100644 index 00000000..dfcbb177 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/models.go @@ -0,0 +1,3510 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import "time" + +// APIPortalCustomDomainProperties - The properties of custom domain for API portal +type APIPortalCustomDomainProperties struct { + // The thumbprint of bound certificate. + Thumbprint *string +} + +// APIPortalCustomDomainResource - Custom domain of the API portal +type APIPortalCustomDomainResource struct { + // The properties of custom domain for API portal + Properties *APIPortalCustomDomainProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// APIPortalCustomDomainResourceCollection - Object that includes an array of API portal custom domain resources and a possible +// link for next set +type APIPortalCustomDomainResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of API portal custom domain resources + Value []*APIPortalCustomDomainResource +} + +// APIPortalInstance - Collection of instances belong to the API portal +type APIPortalInstance struct { + // READ-ONLY; Name of the API portal instance + Name *string + + // READ-ONLY; Status of the API portal instance + Status *string +} + +// APIPortalProperties - API portal properties payload +type APIPortalProperties struct { + // Indicates whether the API try-out feature is enabled or disabled. When enabled, users can try out the API by sending requests + // and viewing responses in API portal. When disabled, users cannot try out + // the API. + APITryOutEnabledState *APIPortalAPITryOutEnabledState + + // The array of resource Ids of gateway to integrate with API portal. + GatewayIDs []*string + + // Indicate if only https is allowed. + HTTPSOnly *bool + + // Indicates whether the API portal exposes endpoint. + Public *bool + + // Collection of OpenAPI source URL locations. + SourceUrls []*string + + // Single sign-on related configuration + SsoProperties *SsoProperties + + // READ-ONLY; Collection of instances belong to API portal. + Instances []*APIPortalInstance + + // READ-ONLY; State of the API portal. + ProvisioningState *APIPortalProvisioningState + + // READ-ONLY; The requested resource quantity for required CPU and Memory. + ResourceRequests *APIPortalResourceRequests + + // READ-ONLY; URL of the API portal, exposed when 'public' is true. + URL *string +} + +// APIPortalResource - API portal resource +type APIPortalResource struct { + // API portal properties payload + Properties *APIPortalProperties + + // Sku of the API portal resource + SKU *SKU + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// APIPortalResourceCollection - Object that includes an array of API portal resources and a possible link for next set +type APIPortalResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of API portal resources + Value []*APIPortalResource +} + +// APIPortalResourceRequests - Resource requests of the API portal +type APIPortalResourceRequests struct { + // READ-ONLY; Cpu allocated to each API portal instance + CPU *string + + // READ-ONLY; Memory allocated to each API portal instance + Memory *string +} + +// AcceleratorAuthSetting - Auth setting payload. +type AcceleratorAuthSetting struct { + // REQUIRED; The type of the auth setting. + AuthType *string +} + +// GetAcceleratorAuthSetting implements the AcceleratorAuthSettingClassification interface for type AcceleratorAuthSetting. +func (a *AcceleratorAuthSetting) GetAcceleratorAuthSetting() *AcceleratorAuthSetting { return a } + +// AcceleratorBasicAuthSetting - Auth setting for basic auth. +type AcceleratorBasicAuthSetting struct { + // REQUIRED; The type of the auth setting. + AuthType *string + + // REQUIRED; Username of git repository basic auth. + Username *string + + // Resource Id of CA certificate for https URL of Git repository. + CaCertResourceID *string + + // Password of git repository basic auth. + Password *string +} + +// GetAcceleratorAuthSetting implements the AcceleratorAuthSettingClassification interface for type AcceleratorBasicAuthSetting. +func (a *AcceleratorBasicAuthSetting) GetAcceleratorAuthSetting() *AcceleratorAuthSetting { + return &AcceleratorAuthSetting{ + AuthType: a.AuthType, + } +} + +type AcceleratorGitRepository struct { + // REQUIRED; Properties of the auth setting payload. + AuthSetting AcceleratorAuthSettingClassification + + // REQUIRED; Git repository URL for the accelerator. + URL *string + + // Git repository branch to be used. + Branch *string + + // Git repository commit to be used. + Commit *string + + // Git repository tag to be used. + GitTag *string + + // Interval for checking for updates to Git or image repository. + IntervalInSeconds *int32 + + // Folder path inside the git repository to consider as the root of the accelerator or fragment. + SubPath *string +} + +// AcceleratorPublicSetting - Auth setting for public url. +type AcceleratorPublicSetting struct { + // REQUIRED; The type of the auth setting. + AuthType *string + + // Resource Id of CA certificate for https URL of Git repository. + CaCertResourceID *string +} + +// GetAcceleratorAuthSetting implements the AcceleratorAuthSettingClassification interface for type AcceleratorPublicSetting. +func (a *AcceleratorPublicSetting) GetAcceleratorAuthSetting() *AcceleratorAuthSetting { + return &AcceleratorAuthSetting{ + AuthType: a.AuthType, + } +} + +// AcceleratorSSHSetting - Auth setting for SSH auth. +type AcceleratorSSHSetting struct { + // REQUIRED; The type of the auth setting. + AuthType *string + + // Public SSH Key of git repository. + HostKey *string + + // SSH Key algorithm of git repository. + HostKeyAlgorithm *string + + // Private SSH Key algorithm of git repository. + PrivateKey *string +} + +// GetAcceleratorAuthSetting implements the AcceleratorAuthSettingClassification interface for type AcceleratorSSHSetting. +func (a *AcceleratorSSHSetting) GetAcceleratorAuthSetting() *AcceleratorAuthSetting { + return &AcceleratorAuthSetting{ + AuthType: a.AuthType, + } +} + +// ActiveDeploymentCollection - Object that includes an array of Deployment resource name and set them as active. +type ActiveDeploymentCollection struct { + // Collection of Deployment name. + ActiveDeploymentNames []*string +} + +// ApmProperties - Properties of an APM +type ApmProperties struct { + // REQUIRED; APM Type + Type *string + + // Non-sensitive properties for the APM + Properties map[string]*string + + // Sensitive properties for the APM + Secrets map[string]*string + + // READ-ONLY; State of the APM. + ProvisioningState *ApmProvisioningState +} + +// ApmReference - A reference to the APM +type ApmReference struct { + // REQUIRED; Resource Id of the APM + ResourceID *string +} + +// ApmResource - APM Resource object +type ApmResource struct { + // Properties of an APM + Properties *ApmProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// ApmResourceCollection - Object that includes an array of APM resources and a possible link for next set +type ApmResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of APM resources + Value []*ApmResource +} + +// ApmSecretKeys - Keys of APM sensitive properties +type ApmSecretKeys struct { + // Collection of the keys for the APM sensitive properties + Value []*string +} + +// AppResource - App resource payload +type AppResource struct { + // The Managed Identity type of the app resource + Identity *ManagedIdentityProperties + + // The GEO location of the application, always the same with its parent resource + Location *string + + // Properties of the App resource + Properties *AppResourceProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// AppResourceCollection - Object that includes an array of App resources and a possible link for next set +type AppResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of App resources + Value []*AppResource +} + +// AppResourceProperties - App resource properties payload +type AppResourceProperties struct { + // Collection of addons + AddonConfigs map[string]any + + // List of custom persistent disks + CustomPersistentDisks []*CustomPersistentDiskResource + + // Indicate if end to end TLS is enabled. + EnableEndToEndTLS *bool + + // Indicate if only https is allowed. + HTTPSOnly *bool + + // App ingress settings payload. + IngressSettings *IngressSettings + + // Collection of loaded certificates + LoadedCertificates []*LoadedCertificate + + // Persistent disk settings + PersistentDisk *PersistentDisk + + // Indicates whether the App exposes public endpoint + Public *bool + + // Temporary disk settings + TemporaryDisk *TemporaryDisk + + // Additional App settings in vnet injection instance + VnetAddons *AppVNetAddons + + // READ-ONLY; Fully qualified dns Name. + Fqdn *string + + // READ-ONLY; Provisioning state of the App + ProvisioningState *AppResourceProvisioningState + + // READ-ONLY; URL of the App + URL *string +} + +// AppVNetAddons - Additional App settings in vnet injection instance +type AppVNetAddons struct { + // Indicates whether the App in vnet injection instance exposes endpoint which could be accessed from internet. + PublicEndpoint *bool + + // READ-ONLY; URL of the App in vnet injection instance which could be accessed from internet + PublicEndpointURL *string +} + +type ApplicationAcceleratorComponent struct { + ResourceRequests *ApplicationAcceleratorResourceRequests + + // READ-ONLY + Instances []*ApplicationAcceleratorInstance + + // READ-ONLY + Name *string +} + +type ApplicationAcceleratorInstance struct { + // READ-ONLY; Name of the Application Accelerator instance. + Name *string + + // READ-ONLY; Status of the Application Accelerator instance. It can be Pending, Running, Succeeded, Failed, Unknown. + Status *string +} + +// ApplicationAcceleratorProperties - Application accelerator properties payload +type ApplicationAcceleratorProperties struct { + // READ-ONLY; Collection of components belong to application accelerator. + Components []*ApplicationAcceleratorComponent + + // READ-ONLY; State of the application accelerator. + ProvisioningState *ApplicationAcceleratorProvisioningState +} + +// ApplicationAcceleratorResource - Application accelerator resource +type ApplicationAcceleratorResource struct { + // Application accelerator properties payload + Properties *ApplicationAcceleratorProperties + + // Sku of the application accelerator resource + SKU *SKU + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// ApplicationAcceleratorResourceCollection - Object that includes an array of application accelerator resources and a possible +// link for next set +type ApplicationAcceleratorResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of application accelerator resources + Value []*ApplicationAcceleratorResource +} + +type ApplicationAcceleratorResourceRequests struct { + // READ-ONLY; Cpu allocated to each application accelerator component. 1 core can be represented by 1 or 1000m + CPU *string + + // READ-ONLY; Instance count of the application accelerator component. + InstanceCount *int32 + + // READ-ONLY; Memory allocated to each application accelerator component. 1 GB can be represented by 1Gi or 1024Mi. + Memory *string +} + +// ApplicationInsightsAgentVersions - Application Insights agent versions properties payload +type ApplicationInsightsAgentVersions struct { + // READ-ONLY; Indicates the version of application insight java agent + Java *string +} + +// ApplicationLiveViewComponent - Application Live View properties payload +type ApplicationLiveViewComponent struct { + // READ-ONLY; Collection of instances belong to Application Live View. + Instances []*ApplicationLiveViewInstance + + // READ-ONLY; Name of the component. + Name any + + // READ-ONLY; The requested resource quantity for required CPU and Memory. + ResourceRequests *ApplicationLiveViewResourceRequests +} + +// ApplicationLiveViewInstance - Collection of instances belong to the Application Live View +type ApplicationLiveViewInstance struct { + // READ-ONLY; Name of the Application Live View instance. + Name *string + + // READ-ONLY; Status of the Application Live View instance. It can be Pending, Running, Succeeded, Failed, Unknown. + Status *string +} + +// ApplicationLiveViewProperties - Application Live View properties payload +type ApplicationLiveViewProperties struct { + // READ-ONLY; Component details of Application Live View + Components []*ApplicationLiveViewComponent + + // READ-ONLY; State of the Application Live View. + ProvisioningState *ApplicationLiveViewProvisioningState +} + +// ApplicationLiveViewResource - Application Live View resource +type ApplicationLiveViewResource struct { + // Application Live View properties payload + Properties *ApplicationLiveViewProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// ApplicationLiveViewResourceCollection - Object that includes an array of Application Live View resources and a possible +// link for next set +type ApplicationLiveViewResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Application Live View resources + Value []*ApplicationLiveViewResource +} + +// ApplicationLiveViewResourceRequests - The resource quantity for required CPU and Memory of Application Live View component +type ApplicationLiveViewResourceRequests struct { + // READ-ONLY; Cpu quantity allocated to each Application Live View component instance. 1 core can be represented by 1 or 1000m. + CPU *string + + // READ-ONLY; Desired instance count of Application Live View component instance. + InstanceCount *int32 + + // READ-ONLY; Memory quantity allocated to each Application Live View component instance. 1 GB can be represented by 1Gi or + // 1024Mi. + Memory *string +} + +// AvailableOperations - Available operations of the service +type AvailableOperations struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of available operation details + Value []*OperationDetail +} + +type AvailableRuntimeVersions struct { + // READ-ONLY; A list of all supported runtime versions. + Value []*SupportedRuntimeVersion +} + +// AzureFileVolume - The properties of the Azure File volume. Azure File shares are mounted as volumes. +type AzureFileVolume struct { + // REQUIRED; The mount path of the persistent disk. + MountPath *string + + // REQUIRED; The type of the underlying resource to mount as a persistent disk. + Type *Type + + // If set to true, it will create and mount a dedicated directory for every individual app instance. + EnableSubPath *bool + + // These are the mount options for a persistent disk. + MountOptions []*string + + // Indicates whether the persistent disk is a readOnly one. + ReadOnly *bool + + // The share name of the Azure File share. + ShareName *string +} + +// GetCustomPersistentDiskProperties implements the CustomPersistentDiskPropertiesClassification interface for type AzureFileVolume. +func (a *AzureFileVolume) GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties { + return &CustomPersistentDiskProperties{ + EnableSubPath: a.EnableSubPath, + MountOptions: a.MountOptions, + MountPath: a.MountPath, + ReadOnly: a.ReadOnly, + Type: a.Type, + } +} + +// BindingResource - Binding resource payload +type BindingResource struct { + // Properties of the Binding resource + Properties *BindingResourceProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// BindingResourceCollection - Object that includes an array of Binding resources and a possible link for next set +type BindingResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Binding resources + Value []*BindingResource +} + +// BindingResourceProperties - Binding resource properties payload +type BindingResourceProperties struct { + // Binding parameters of the Binding resource + BindingParameters map[string]*string + + // The key of the bound resource + Key *string + + // The Azure resource id of the bound resource + ResourceID *string + + // READ-ONLY; Creation time of the Binding resource + CreatedAt *string + + // READ-ONLY; The generated Spring Boot property file for this binding. The secret will be deducted. + GeneratedProperties *string + + // READ-ONLY; The name of the bound resource + ResourceName *string + + // READ-ONLY; The standard Azure resource type of the bound resource + ResourceType *string + + // READ-ONLY; Update time of the Binding resource + UpdatedAt *string +} + +// Build resource payload +type Build struct { + // Properties of the build resource + Properties *BuildProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// BuildCollection - Object that includes an array of Build resources and a possible link for next set +type BuildCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Build resources + Value []*Build +} + +// BuildProperties - Build resource properties payload +type BuildProperties struct { + // The resource id of agent pool + AgentPool *string + + // The APMs for this build + Apms []*ApmReference + + // The resource id of builder to build the source code + Builder *string + + // The CA Certificates for this build + Certificates []*CertificateReference + + // The environment variables for this build + Env map[string]*string + + // The relative path of source code + RelativePath *string + + // The customized build resource for this build + ResourceRequests *BuildResourceRequests + + // READ-ONLY; Provisioning state of the KPack build result + ProvisioningState *BuildProvisioningState + + // READ-ONLY; The build result triggered by this build + TriggeredBuildResult *TriggeredBuildResult +} + +// BuildResourceRequests - Resource request payload of Build Resource. +type BuildResourceRequests struct { + // Optional Cpu allocated to the build resource. 1 core can be represented by 1 or 1000m. The default value is 1, this should + // not exceed build service agent pool cpu size. + CPU *string + + // Optional Memory allocated to the build resource. 1 GB can be represented by 1Gi or 1024Mi. The default value is 2Gi, this + // should not exceed build service agent pool memory size. + Memory *string +} + +// BuildResult - Build result resource payload +type BuildResult struct { + // Properties of the build result resource + Properties *BuildResultProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// BuildResultCollection - Object that includes an array of Build result resources and a possible link for next set +type BuildResultCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Build result resources + Value []*BuildResult +} + +// BuildResultLog - Build result log resource properties payload +type BuildResultLog struct { + // The public download URL of this build result log + BlobURL *string +} + +// BuildResultProperties - Build result resource properties payload +type BuildResultProperties struct { + // The build pod name which can be used to get the build log streaming. + BuildPodName *string + + // Error when build is failed. + Error *Error + + // The name of this build result + Name *string + + // READ-ONLY; All of the build stage (init-container and container) resources in build pod. + BuildStages []*BuildStageProperties + + // READ-ONLY; The container registry image of this build result. + Image *string + + // READ-ONLY; Provisioning state of the KPack build result + ProvisioningState *BuildResultProvisioningState +} + +// BuildResultUserSourceInfo - Reference to a build result +type BuildResultUserSourceInfo struct { + // REQUIRED; Type of the source uploaded + Type *string + + // Resource id of an existing succeeded build result under the same Spring instance. + BuildResultID *string + + // Version of the source + Version *string +} + +// GetUserSourceInfo implements the UserSourceInfoClassification interface for type BuildResultUserSourceInfo. +func (b *BuildResultUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { + return &UserSourceInfo{ + Type: b.Type, + Version: b.Version, + } +} + +// BuildService - Build service resource payload +type BuildService struct { + // Properties of the build resource + Properties *BuildServiceProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// BuildServiceAgentPoolProperties - Build service agent pool properties +type BuildServiceAgentPoolProperties struct { + // build service agent pool size properties + PoolSize *BuildServiceAgentPoolSizeProperties + + // READ-ONLY; Provisioning state of the build service agent pool + ProvisioningState *string +} + +// BuildServiceAgentPoolResource - The build service agent pool resource +type BuildServiceAgentPoolResource struct { + // build service agent pool properties + Properties *BuildServiceAgentPoolProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// BuildServiceAgentPoolResourceCollection - Object that includes an array of build service agent pool resources and a possible +// link for next set +type BuildServiceAgentPoolResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of build service agent pool resource + Value []*BuildServiceAgentPoolResource +} + +// BuildServiceAgentPoolSizeProperties - Build service agent pool size properties +type BuildServiceAgentPoolSizeProperties struct { + // The name of build service agent pool size + Name *string + + // READ-ONLY; The cpu property of build service agent pool size + CPU *string + + // READ-ONLY; The memory property of build service agent pool size + Memory *string +} + +// BuildServiceCollection - Object that includes an array of Build service resources and a possible link for next set +type BuildServiceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Build service resources + Value []*BuildService +} + +// BuildServiceProperties - Build service resource properties payload +type BuildServiceProperties struct { + // The resource id of the container registry used in this build service. + ContainerRegistry *string + + // The runtime resource configuration of this build service. + ResourceRequests *BuildServicePropertiesResourceRequests + + // READ-ONLY; The installed KPack version in this build service. + KPackVersion *string + + // READ-ONLY; Provisioning state of the KPack build service + ProvisioningState *BuildServiceProvisioningState +} + +// BuildServicePropertiesResourceRequests - The runtime resource configuration of this build service. +type BuildServicePropertiesResourceRequests struct { + // READ-ONLY; vCPU allocated to the entire build service node pool. + CPU *string + + // READ-ONLY; Memory allocated to the entire build service node pool. + Memory *string +} + +// BuildStageProperties - The build stage (init-container and container) resources in build pod. +type BuildStageProperties struct { + // READ-ONLY; The exit code of this build init container. + ExitCode *string + + // READ-ONLY; The name of this build stage resource. + Name *string + + // READ-ONLY; The reason of this build init container. + Reason *string + + // READ-ONLY; The provisioning state of this build stage resource. + Status *KPackBuildStageProvisioningState +} + +// BuilderProperties - KPack Builder properties payload +type BuilderProperties struct { + // Builder buildpack groups. + BuildpackGroups []*BuildpacksGroupProperties + + // Builder cluster stack property. + Stack *StackProperties + + // READ-ONLY; Builder provision status. + ProvisioningState *BuilderProvisioningState +} + +// BuilderResource - KPack Builder resource +type BuilderResource struct { + // Property of the Builder resource. + Properties *BuilderProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// BuilderResourceCollection - Object that includes an array of Builder resources and a possible link for next set +type BuilderResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Builder resources + Value []*BuilderResource +} + +// BuildpackBindingLaunchProperties - Buildpack Binding Launch Properties +type BuildpackBindingLaunchProperties struct { + // Non-sensitive properties for launchProperties + Properties map[string]*string + + // Sensitive properties for launchProperties + Secrets map[string]*string +} + +// BuildpackBindingProperties - Properties of a buildpack binding +type BuildpackBindingProperties struct { + // Buildpack Binding Type + BindingType *BindingType + + // The object describes the buildpack binding launch properties + LaunchProperties *BuildpackBindingLaunchProperties + + // READ-ONLY; State of the Buildpack Binding. + ProvisioningState *BuildpackBindingProvisioningState +} + +// BuildpackBindingResource - Buildpack Binding Resource object +type BuildpackBindingResource struct { + // Properties of a buildpack binding + Properties *BuildpackBindingProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// BuildpackBindingResourceCollection - Object that includes an array of BuildpackBinding resources and a possible link for +// next set +type BuildpackBindingResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of BuildpackBinding resources + Value []*BuildpackBindingResource +} + +// BuildpackProperties - Buildpack properties payload +type BuildpackProperties struct { + // Id of the buildpack + ID *string +} + +// BuildpacksGroupProperties - Buildpack group properties of the Builder +type BuildpacksGroupProperties struct { + // Buildpacks in the buildpack group + Buildpacks []*BuildpackProperties + + // Buildpack group name + Name *string +} + +// CertificateProperties - Certificate resource payload. +type CertificateProperties struct { + // REQUIRED; The type of the certificate source. + Type *string + + // READ-ONLY; The activate date of certificate. + ActivateDate *string + + // READ-ONLY; The domain list of certificate. + DNSNames []*string + + // READ-ONLY; The expiration date of certificate. + ExpirationDate *string + + // READ-ONLY; The issue date of certificate. + IssuedDate *string + + // READ-ONLY; The issuer of certificate. + Issuer *string + + // READ-ONLY; Provisioning state of the Certificate + ProvisioningState *CertificateResourceProvisioningState + + // READ-ONLY; The subject name of certificate. + SubjectName *string + + // READ-ONLY; The thumbprint of certificate. + Thumbprint *string +} + +// GetCertificateProperties implements the CertificatePropertiesClassification interface for type CertificateProperties. +func (c *CertificateProperties) GetCertificateProperties() *CertificateProperties { return c } + +// CertificateReference - A reference to the certificate +type CertificateReference struct { + // REQUIRED; Resource Id of the certificate + ResourceID *string +} + +// CertificateResource - Certificate resource payload. +type CertificateResource struct { + // Properties of the certificate resource payload. + Properties CertificatePropertiesClassification + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// CertificateResourceCollection - Collection compose of certificate resources list and a possible link for next page. +type CertificateResourceCollection struct { + // The link to next page of certificate list. + NextLink *string + + // The certificate resources list. + Value []*CertificateResource +} + +// ClusterResourceProperties - Service properties payload +type ClusterResourceProperties struct { + // Purchasing 3rd party product of the Service resource. + MarketplaceResource *MarketplaceResource + + // Network profile of the Service + NetworkProfile *NetworkProfile + + // Additional Service settings in vnet injection instance + VnetAddons *ServiceVNetAddons + ZoneRedundant *bool + + // READ-ONLY; Fully qualified dns name of the service instance + Fqdn *string + + // READ-ONLY; Power state of the Service + PowerState *PowerState + + // READ-ONLY; Provisioning state of the Service + ProvisioningState *ProvisioningState + + // READ-ONLY; ServiceInstanceEntity Id which uniquely identifies a created resource + ServiceID *string + + // READ-ONLY; Version of the Service + Version *int32 +} + +// ConfigServerGitProperty - Property of git. +type ConfigServerGitProperty struct { + // REQUIRED; URI of the repository + URI *string + + // Public sshKey of git repository. + HostKey *string + + // SshKey algorithm of git repository. + HostKeyAlgorithm *string + + // Label of the repository + Label *string + + // Password of git repository basic auth. + Password *string + + // Private sshKey algorithm of git repository. + PrivateKey *string + + // Repositories of git. + Repositories []*GitPatternRepository + + // Searching path of the repository + SearchPaths []*string + + // Strict host key checking or not. + StrictHostKeyChecking *bool + + // Username of git repository basic auth. + Username *string +} + +// ConfigServerProperties - Config server git properties payload +type ConfigServerProperties struct { + // Settings of config server. + ConfigServer *ConfigServerSettings + + // Error when apply config server settings. + Error *Error + + // READ-ONLY; State of the config server. + ProvisioningState *ConfigServerState +} + +// ConfigServerResource - Config Server resource +type ConfigServerResource struct { + // Properties of the Config Server resource + Properties *ConfigServerProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// ConfigServerSettings - The settings of config server. +type ConfigServerSettings struct { + // Property of git environment. + GitProperty *ConfigServerGitProperty +} + +// ConfigServerSettingsErrorRecord - Error record of the config server settings +type ConfigServerSettingsErrorRecord struct { + // The detail error messages of the record + Messages []*string + + // The name of the config server settings error record + Name *string + + // The uri of the config server settings error record + URI *string +} + +// ConfigServerSettingsValidateResult - Validation result for config server settings +type ConfigServerSettingsValidateResult struct { + // The detail validation results + Details []*ConfigServerSettingsErrorRecord + + // Indicate if the config server settings are valid + IsValid *bool +} + +// ConfigurationServiceGitProperty - Property of git environment. +type ConfigurationServiceGitProperty struct { + // Repositories of Application Configuration Service git property. + Repositories []*ConfigurationServiceGitRepository +} + +// ConfigurationServiceGitPropertyValidateResult - Validation result for configuration service settings +type ConfigurationServiceGitPropertyValidateResult struct { + // The detail validation results + GitReposValidationResult []*ValidationMessages + + // Indicate if the configuration service settings are valid + IsValid *bool +} + +// ConfigurationServiceGitRepository - Git repository property payload for Application Configuration Service +type ConfigurationServiceGitRepository struct { + // REQUIRED; Label of the repository + Label *string + + // REQUIRED; Name of the repository + Name *string + + // REQUIRED; Collection of patterns of the repository + Patterns []*string + + // REQUIRED; URI of the repository + URI *string + + // Resource Id of CA certificate for https URL of Git repository. + CaCertResourceID *string + + // Git libraries used to support various repository providers + GitImplementation *GitImplementation + + // Public sshKey of git repository. + HostKey *string + + // SshKey algorithm of git repository. + HostKeyAlgorithm *string + + // Password of git repository basic auth. + Password *string + + // Private sshKey algorithm of git repository. + PrivateKey *string + + // Searching path of the repository + SearchPaths []*string + + // Strict host key checking or not. + StrictHostKeyChecking *bool + + // Username of git repository basic auth. + Username *string +} + +// ConfigurationServiceInstance - Collection of instances belong to the Application Configuration Service +type ConfigurationServiceInstance struct { + // READ-ONLY; Name of the Application Configuration Service instance + Name *string + + // READ-ONLY; Status of the Application Configuration Service instance + Status *string +} + +// ConfigurationServiceProperties - Application Configuration Service properties payload +type ConfigurationServiceProperties struct { + // The generation of the Application Configuration Service. + Generation *ConfigurationServiceGeneration + + // The settings of Application Configuration Service. + Settings *ConfigurationServiceSettings + + // READ-ONLY; Collection of instances belong to Application Configuration Service. + Instances []*ConfigurationServiceInstance + + // READ-ONLY; State of the Application Configuration Service. + ProvisioningState *ConfigurationServiceProvisioningState + + // READ-ONLY; The requested resource quantity for required CPU and Memory. + ResourceRequests *ConfigurationServiceResourceRequests +} + +// ConfigurationServiceResource - Application Configuration Service resource +type ConfigurationServiceResource struct { + // Application Configuration Service properties payload + Properties *ConfigurationServiceProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// ConfigurationServiceResourceCollection - Object that includes an array of configuration service resources and a possible +// link for next set +type ConfigurationServiceResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of configuration service resources + Value []*ConfigurationServiceResource +} + +// ConfigurationServiceResourceRequests - Resource request payload of Application Configuration Service +type ConfigurationServiceResourceRequests struct { + // READ-ONLY; Cpu allocated to each Application Configuration Service instance + CPU *string + + // READ-ONLY; Instance count of the Application Configuration Service + InstanceCount *int32 + + // READ-ONLY; Memory allocated to each Application Configuration Service instance + Memory *string +} + +// ConfigurationServiceSettings - The settings of Application Configuration Service. +type ConfigurationServiceSettings struct { + // Property of git environment. + GitProperty *ConfigurationServiceGitProperty +} + +// ConfigurationServiceSettingsValidateResult - Validation result for configuration service settings +type ConfigurationServiceSettingsValidateResult struct { + // Validation result for configuration service settings + GitPropertyValidationResult *ConfigurationServiceGitPropertyValidateResult +} + +// ContainerProbeSettings - Container liveness and readiness probe settings +type ContainerProbeSettings struct { + // Indicates whether disable the liveness and readiness probe + DisableProbe *bool +} + +// ContainerRegistryBasicCredentials - The basic authentication properties for the container registry resource. +type ContainerRegistryBasicCredentials struct { + // REQUIRED; The password of the Container Registry. + Password *string + + // REQUIRED; The login server of the Container Registry. + Server *string + + // REQUIRED; The credential type of the container registry credentials. + Type *string + + // REQUIRED; The username of the Container Registry. + Username *string +} + +// GetContainerRegistryCredentials implements the ContainerRegistryCredentialsClassification interface for type ContainerRegistryBasicCredentials. +func (c *ContainerRegistryBasicCredentials) GetContainerRegistryCredentials() *ContainerRegistryCredentials { + return &ContainerRegistryCredentials{ + Type: c.Type, + } +} + +// ContainerRegistryCredentials - The credential for the container registry resource. +type ContainerRegistryCredentials struct { + // REQUIRED; The credential type of the container registry credentials. + Type *string +} + +// GetContainerRegistryCredentials implements the ContainerRegistryCredentialsClassification interface for type ContainerRegistryCredentials. +func (c *ContainerRegistryCredentials) GetContainerRegistryCredentials() *ContainerRegistryCredentials { + return c +} + +// ContainerRegistryProperties - Container registry resource payload. +type ContainerRegistryProperties struct { + // REQUIRED; The credentials of the container registry resource. + Credentials ContainerRegistryCredentialsClassification + + // READ-ONLY; State of the Container Registry. + ProvisioningState *ContainerRegistryProvisioningState +} + +// ContainerRegistryResource - Container registry resource payload. +type ContainerRegistryResource struct { + // Properties of the container registry resource payload. + Properties *ContainerRegistryProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// ContainerRegistryResourceCollection - Collection compose of container registry resources list and a possible link for next +// page. +type ContainerRegistryResourceCollection struct { + // The link to next page of storage list. + NextLink *string + + // The container registry resources list. + Value []*ContainerRegistryResource +} + +// ContainerRegistryValidateResult - Validation result for container registry properties +type ContainerRegistryValidateResult struct { + // Indicate if the container registry properties are valid + IsValid *bool + + // Detailed validation messages. + Message *string +} + +// ContentCertificateProperties - Properties of certificate imported from key vault. +type ContentCertificateProperties struct { + // REQUIRED; The type of the certificate source. + Type *string + + // The content of uploaded certificate. + Content *string + + // READ-ONLY; The activate date of certificate. + ActivateDate *string + + // READ-ONLY; The domain list of certificate. + DNSNames []*string + + // READ-ONLY; The expiration date of certificate. + ExpirationDate *string + + // READ-ONLY; The issue date of certificate. + IssuedDate *string + + // READ-ONLY; The issuer of certificate. + Issuer *string + + // READ-ONLY; Provisioning state of the Certificate + ProvisioningState *CertificateResourceProvisioningState + + // READ-ONLY; The subject name of certificate. + SubjectName *string + + // READ-ONLY; The thumbprint of certificate. + Thumbprint *string +} + +// GetCertificateProperties implements the CertificatePropertiesClassification interface for type ContentCertificateProperties. +func (c *ContentCertificateProperties) GetCertificateProperties() *CertificateProperties { + return &CertificateProperties{ + ActivateDate: c.ActivateDate, + DNSNames: c.DNSNames, + ExpirationDate: c.ExpirationDate, + IssuedDate: c.IssuedDate, + Issuer: c.Issuer, + ProvisioningState: c.ProvisioningState, + SubjectName: c.SubjectName, + Thumbprint: c.Thumbprint, + Type: c.Type, + } +} + +// CustomContainer - Custom container payload +type CustomContainer struct { + // Arguments to the entrypoint. The docker image's CMD is used if this is not provided. + Args []*string + + // Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. + Command []*string + + // Container image of the custom container. This should be in the form of : without the server name of the registry + ContainerImage *string + + // Credential of the image registry + ImageRegistryCredential *ImageRegistryCredential + + // Language framework of the container image uploaded. Supported values: "springboot", "", null. + LanguageFramework *string + + // The name of the registry that contains the container image + Server *string +} + +// CustomContainerUserSourceInfo - Custom container user source info +type CustomContainerUserSourceInfo struct { + // REQUIRED; Type of the source uploaded + Type *string + + // Custom container payload + CustomContainer *CustomContainer + + // Version of the source + Version *string +} + +// GetUserSourceInfo implements the UserSourceInfoClassification interface for type CustomContainerUserSourceInfo. +func (c *CustomContainerUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { + return &UserSourceInfo{ + Type: c.Type, + Version: c.Version, + } +} + +// CustomDomainProperties - Custom domain of app resource payload. +type CustomDomainProperties struct { + // The bound certificate name of domain. + CertName *string + + // The thumbprint of bound certificate. + Thumbprint *string + + // READ-ONLY; The app name of domain. + AppName *string + + // READ-ONLY; Provisioning state of the Domain + ProvisioningState *CustomDomainResourceProvisioningState +} + +// CustomDomainResource - Custom domain resource payload. +type CustomDomainResource struct { + // Properties of the custom domain resource. + Properties *CustomDomainProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// CustomDomainResourceCollection - Collection compose of a custom domain resources list and a possible link for next page. +type CustomDomainResourceCollection struct { + // The link to next page of custom domain list. + NextLink *string + + // The custom domain resources list. + Value []*CustomDomainResource +} + +// CustomDomainValidatePayload - Custom domain validate payload. +type CustomDomainValidatePayload struct { + // REQUIRED; Name to be validated + Name *string +} + +// CustomDomainValidateResult - Validation result for custom domain. +type CustomDomainValidateResult struct { + // Indicates if domain name is valid. + IsValid *bool + + // Message of why domain name is invalid. + Message *string +} + +// CustomPersistentDiskProperties - Custom persistent disk resource payload. +type CustomPersistentDiskProperties struct { + // REQUIRED; The mount path of the persistent disk. + MountPath *string + + // REQUIRED; The type of the underlying resource to mount as a persistent disk. + Type *Type + + // If set to true, it will create and mount a dedicated directory for every individual app instance. + EnableSubPath *bool + + // These are the mount options for a persistent disk. + MountOptions []*string + + // Indicates whether the persistent disk is a readOnly one. + ReadOnly *bool +} + +// GetCustomPersistentDiskProperties implements the CustomPersistentDiskPropertiesClassification interface for type CustomPersistentDiskProperties. +func (c *CustomPersistentDiskProperties) GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties { + return c +} + +// CustomPersistentDiskResource - Custom persistent disk resource payload. +type CustomPersistentDiskResource struct { + // REQUIRED; The resource id of Azure Spring Apps Storage resource. + StorageID *string + + // Properties of the custom persistent disk resource payload. + CustomPersistentDiskProperties CustomPersistentDiskPropertiesClassification +} + +// CustomizedAcceleratorProperties - Customized accelerator properties payload +type CustomizedAcceleratorProperties struct { + // REQUIRED + GitRepository *AcceleratorGitRepository + AcceleratorTags []*string + + // Type of the customized accelerator. + AcceleratorType *CustomizedAcceleratorType + Description *string + DisplayName *string + IconURL *string + + // READ-ONLY; Imports references all imports that this accelerator/fragment depends upon. + Imports []*string + + // READ-ONLY; State of the customized accelerator. + ProvisioningState *CustomizedAcceleratorProvisioningState +} + +// CustomizedAcceleratorResource - Customized accelerator resource +type CustomizedAcceleratorResource struct { + // Customized accelerator properties payload + Properties *CustomizedAcceleratorProperties + + // Sku of the customized accelerator resource + SKU *SKU + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +type CustomizedAcceleratorResourceCollection struct { + NextLink *string + Value []*CustomizedAcceleratorResource +} + +// CustomizedAcceleratorValidateResult - Validation result for customized accelerator properties +type CustomizedAcceleratorValidateResult struct { + // The detail validation results + ErrorMessage *string + + // State of the customized accelerator validation result + State *CustomizedAcceleratorValidateResultState +} + +// DeploymentInstance - Deployment instance payload +type DeploymentInstance struct { + // READ-ONLY; Discovery status of the deployment instance + DiscoveryStatus *string + + // READ-ONLY; Name of the deployment instance + Name *string + + // READ-ONLY; Failed reason of the deployment instance + Reason *string + + // READ-ONLY; Start time of the deployment instance + StartTime *string + + // READ-ONLY; Status of the deployment instance + Status *string + + // READ-ONLY; Availability zone information of the deployment instance + Zone *string +} + +// DeploymentList - A list of deployments resource ids. +type DeploymentList struct { + // A list of deployment resource ids. + Deployments []*string +} + +// DeploymentResource - Deployment resource payload +type DeploymentResource struct { + // Properties of the Deployment resource + Properties *DeploymentResourceProperties + + // Sku of the Deployment resource + SKU *SKU + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// DeploymentResourceCollection - Object that includes an array of App resources and a possible link for next set +type DeploymentResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Deployment resources + Value []*DeploymentResource +} + +// DeploymentResourceProperties - Deployment resource properties payload +type DeploymentResourceProperties struct { + // Indicates whether the Deployment is active + Active *bool + + // Deployment settings of the Deployment + DeploymentSettings *DeploymentSettings + + // Uploaded source information of the deployment. + Source UserSourceInfoClassification + + // READ-ONLY; Collection of instances belong to the Deployment + Instances []*DeploymentInstance + + // READ-ONLY; Provisioning state of the Deployment + ProvisioningState *DeploymentResourceProvisioningState + + // READ-ONLY; Status of the Deployment + Status *DeploymentResourceStatus +} + +// DeploymentSettings - Deployment settings payload +type DeploymentSettings struct { + // Collection of addons + AddonConfigs map[string]any + + // Collection of ApmReferences + Apms []*ApmReference + + // Container liveness and readiness probe settings + ContainerProbeSettings *ContainerProbeSettings + + // Collection of environment variables + EnvironmentVariables map[string]*string + + // Periodic probe of App Instance liveness. App Instance will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + LivenessProbe *Probe + + // Periodic probe of App Instance service readiness. App Instance will be removed from service endpoints if the probe fails. + // More info: + // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + ReadinessProbe *Probe + + // The requested resource quantity for required CPU and Memory. It is recommended that using this field to represent the required + // CPU and Memory, the old field cpu and memoryInGB will be deprecated + // later. + ResourceRequests *ResourceRequests + + // StartupProbe indicates that the App Instance has successfully initialized. If specified, no other probes are executed until + // this completes successfully. If this probe fails, the Pod will be restarted, + // just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a App Instance's + // lifecycle, when it might take a long time to load data or warm a cache, + // than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + StartupProbe *Probe + + // Optional duration in seconds the App Instance needs to terminate gracefully. May be decreased in delete request. Value + // must be non-negative integer. The value zero indicates stop immediately via the + // kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace + // period is the duration in seconds after the processes running in the App + // Instance are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this + // value longer than the expected cleanup time for your process. Defaults to 90 + // seconds. + TerminationGracePeriodSeconds *int32 +} + +type DevToolPortalComponent struct { + // READ-ONLY; Collection of instances belong to Dev Tool Portal. + Instances []*DevToolPortalInstance + + // READ-ONLY + Name *string + + // READ-ONLY; The requested resource quantity for required CPU and Memory. + ResourceRequests *DevToolPortalResourceRequests +} + +// DevToolPortalFeatureDetail - Detail settings for Dev Tool Portal feature +type DevToolPortalFeatureDetail struct { + // State of the plugin + State *DevToolPortalFeatureState + + // READ-ONLY; Route path to visit the plugin + Route *string +} + +// DevToolPortalFeatureSettings - Settings for Dev Tool Portal +type DevToolPortalFeatureSettings struct { + // Detail of Accelerator plugin + ApplicationAccelerator *DevToolPortalFeatureDetail + + // Detail of App Live View plugin + ApplicationLiveView *DevToolPortalFeatureDetail +} + +// DevToolPortalInstance - Collection of instances belong to the Dev Tool Portal. +type DevToolPortalInstance struct { + // READ-ONLY; Name of the Dev Tool Portal instance. + Name *string + + // READ-ONLY; Status of the Dev Tool Portal instance. It can be Pending, Running, Succeeded, Failed, Unknown. + Status *string +} + +// DevToolPortalProperties - Dev Tool Portal properties payload +type DevToolPortalProperties struct { + // Settings for Dev Tool Portal + Features *DevToolPortalFeatureSettings + + // Indicates whether the resource exposes public endpoint + Public *bool + + // Single sign-on related configuration + SsoProperties *DevToolPortalSsoProperties + + // READ-ONLY; Collection of components belong to Dev Tool Portal. + Components []*DevToolPortalComponent + + // READ-ONLY; State of the Dev Tool Portal. + ProvisioningState *DevToolPortalProvisioningState + + // READ-ONLY; URL of the resource, exposed when 'public' is true. + URL *string +} + +// DevToolPortalResource - Dev Tool Portal resource +type DevToolPortalResource struct { + // Dev Tool Portal properties payload + Properties *DevToolPortalProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// DevToolPortalResourceCollection - Object that includes an array of Dev Tool Portal resources and a possible link for next +// set +type DevToolPortalResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Dev Tool Portal resources + Value []*DevToolPortalResource +} + +// DevToolPortalResourceRequests - The resource quantity for required CPU and Memory of Dev Tool Portal +type DevToolPortalResourceRequests struct { + // READ-ONLY; Cpu quantity allocated to each Dev Tool Portal instance. 1 core can be represented by 1 or 1000m + CPU *string + + // READ-ONLY; Desired instance count of Dev Tool Portal. + InstanceCount *int32 + + // READ-ONLY; Memory quantity allocated to each Dev Tool Portal instance. 1 GB can be represented by 1Gi or 1024Mi. + Memory *string +} + +// DevToolPortalSsoProperties - Single sign-on related configuration +type DevToolPortalSsoProperties struct { + // The public identifier for the application + ClientID *string + + // The secret known only to the application and the authorization server + ClientSecret *string + + // The URI of a JSON file with generic OIDC provider configuration. + MetadataURL *string + + // It defines the specific actions applications can be allowed to do on a user's behalf + Scopes []*string +} + +// DiagnosticParameters - Diagnostic parameters of diagnostic operations +type DiagnosticParameters struct { + // App instance name + AppInstance *string + + // Duration of your JFR. 1 min can be represented by 1m or 60s. + Duration *string + + // Your target file path in your own BYOS + FilePath *string +} + +// Error - The error code compose of code and message. +type Error struct { + // The code of error. + Code *string + + // The message of error. + Message *string +} + +// ExecAction describes a "run in container" action. +type ExecAction struct { + // REQUIRED; The type of the action to take to perform the health check. + Type *ProbeActionType + + // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the + // container's filesystem. The command is not run inside a shell, so traditional + // shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of + // 0 is treated as live/healthy and non-zero is unhealthy. + Command []*string +} + +// GetProbeAction implements the ProbeActionClassification interface for type ExecAction. +func (e *ExecAction) GetProbeAction() *ProbeAction { + return &ProbeAction{ + Type: e.Type, + } +} + +// GatewayAPIMetadataProperties - API metadata property for Spring Cloud Gateway +type GatewayAPIMetadataProperties struct { + // Detailed description of the APIs available on the Gateway instance (default: Generated OpenAPI 3 document that describes + // the API routes configured.) + Description *string + + // Location of additional documentation for the APIs available on the Gateway instance + Documentation *string + + // Base URL that API consumers will use to access APIs on the Gateway instance. + ServerURL *string + + // Title describing the context of the APIs available on the Gateway instance (default: Spring Cloud Gateway for K8S) + Title *string + + // Version of APIs available on this Gateway instance (default: unspecified). + Version *string +} + +// GatewayAPIRoute - API route config of the Spring Cloud Gateway +type GatewayAPIRoute struct { + // A description, will be applied to methods in the generated OpenAPI documentation. + Description *string + + // To modify the request before sending it to the target endpoint, or the received response. + Filters []*string + + // Route processing order. + Order *int32 + + // A number of conditions to evaluate a route for each request. Each predicate may be evaluated against request headers and + // parameter values. All of the predicates associated with a route must evaluate + // to true for the route to be matched to the request. + Predicates []*string + + // Enable sso validation. + SsoEnabled *bool + + // Classification tags, will be applied to methods in the generated OpenAPI documentation. + Tags []*string + + // A title, will be applied to methods in the generated OpenAPI documentation. + Title *string + + // Pass currently-authenticated user's identity token to application service, default is 'false' + TokenRelay *bool + + // Full uri, will override appName. + URI *string +} + +// GatewayCorsProperties - Cross-Origin Resource Sharing property +type GatewayCorsProperties struct { + // Whether user credentials are supported on cross-site requests. Valid values: true, false. + AllowCredentials *bool + + // Allowed headers in cross-site requests. The special value * allows actual requests to send any header. + AllowedHeaders []*string + + // Allowed HTTP methods on cross-site requests. The special value * allows all methods. If not set, GET and HEAD are allowed + // by default. + AllowedMethods []*string + + // Allowed origin patterns to make cross-site requests. + AllowedOriginPatterns []*string + + // Allowed origins to make cross-site requests. The special value * allows all domains. + AllowedOrigins []*string + + // HTTP response headers to expose for cross-site requests. + ExposedHeaders []*string + + // How long, in seconds, the response from a pre-flight request can be cached by clients. + MaxAge *int32 +} + +// GatewayCustomDomainProperties - The properties of custom domain for Spring Cloud Gateway +type GatewayCustomDomainProperties struct { + // The thumbprint of bound certificate. + Thumbprint *string +} + +// GatewayCustomDomainResource - Custom domain of the Spring Cloud Gateway +type GatewayCustomDomainResource struct { + // The properties of custom domain for Spring Cloud Gateway + Properties *GatewayCustomDomainProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// GatewayCustomDomainResourceCollection - Object that includes an array of Spring Cloud Gateway custom domain resources and +// a possible link for next set +type GatewayCustomDomainResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Spring Cloud Gateway custom domain resources + Value []*GatewayCustomDomainResource +} + +// GatewayInstance - Collection of instances belong to the Spring Cloud Gateway +type GatewayInstance struct { + // READ-ONLY; Name of the Spring Cloud Gateway instance + Name *string + + // READ-ONLY; Status of the Spring Cloud Gateway instance + Status *string +} + +// GatewayOperatorProperties - Properties of the Spring Cloud Gateway Operator. +type GatewayOperatorProperties struct { + // READ-ONLY; Collection of instances belong to Spring Cloud Gateway operator. + Instances []*GatewayInstance + + // READ-ONLY; The requested resource quantity for required CPU and Memory. + ResourceRequests *GatewayOperatorResourceRequests +} + +// GatewayOperatorResourceRequests - Properties of the Spring Cloud Gateway Operator. +type GatewayOperatorResourceRequests struct { + // READ-ONLY; Cpu allocated to each Spring Cloud Gateway Operator instance. + CPU *string + + // READ-ONLY; Instance count of the Spring Cloud Gateway Operator. + InstanceCount *int32 + + // READ-ONLY; Memory allocated to each Spring Cloud Gateway Operator instance. + Memory *string +} + +// GatewayProperties - Spring Cloud Gateway properties payload +type GatewayProperties struct { + // API metadata property for Spring Cloud Gateway + APIMetadataProperties *GatewayAPIMetadataProperties + + // Collection of ApmReferences in service level + Apms []*ApmReference + + // Client-Certification Authentication. + ClientAuth *GatewayPropertiesClientAuth + + // Cross-Origin Resource Sharing property + CorsProperties *GatewayCorsProperties + + // Environment variables of Spring Cloud Gateway + EnvironmentVariables *GatewayPropertiesEnvironmentVariables + + // Indicate if only https is allowed. + HTTPSOnly *bool + + // Indicates whether the Spring Cloud Gateway exposes endpoint. + Public *bool + + // The requested resource quantity for required CPU and Memory. + ResourceRequests *GatewayResourceRequests + + // Single sign-on related configuration + SsoProperties *SsoProperties + + // READ-ONLY; Collection of instances belong to Spring Cloud Gateway. + Instances []*GatewayInstance + + // READ-ONLY; Properties of the Spring Cloud Gateway Operator. + OperatorProperties *GatewayOperatorProperties + + // READ-ONLY; State of the Spring Cloud Gateway. + ProvisioningState *GatewayProvisioningState + + // READ-ONLY; URL of the Spring Cloud Gateway, exposed when 'public' is true. + URL *string +} + +// GatewayPropertiesClientAuth - Client-Certification Authentication. +type GatewayPropertiesClientAuth struct { + // Whether to enable certificate verification or not + CertificateVerification *GatewayCertificateVerification + + // Collection of certificate resource Ids in Azure Spring Apps. + Certificates []*string +} + +// GatewayPropertiesEnvironmentVariables - Environment variables of Spring Cloud Gateway +type GatewayPropertiesEnvironmentVariables struct { + // Non-sensitive properties + Properties map[string]*string + + // Sensitive properties + Secrets map[string]*string +} + +// GatewayResource - Spring Cloud Gateway resource +type GatewayResource struct { + // Spring Cloud Gateway properties payload + Properties *GatewayProperties + + // Sku of the Spring Cloud Gateway resource + SKU *SKU + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// GatewayResourceCollection - Object that includes an array of gateway resources and a possible link for next set +type GatewayResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of gateway resources + Value []*GatewayResource +} + +// GatewayResourceRequests - Resource request payload of Spring Cloud Gateway. +type GatewayResourceRequests struct { + // Cpu allocated to each Spring Cloud Gateway instance. + CPU *string + + // Memory allocated to each Spring Cloud Gateway instance. + Memory *string +} + +// GatewayRouteConfigOpenAPIProperties - OpenAPI properties of Spring Cloud Gateway route config. +type GatewayRouteConfigOpenAPIProperties struct { + // The URI of OpenAPI specification. + URI *string +} + +// GatewayRouteConfigProperties - API route config of the Spring Cloud Gateway +type GatewayRouteConfigProperties struct { + // The resource Id of the Azure Spring Apps app, required unless route defines uri. + AppResourceID *string + + // To modify the request before sending it to the target endpoint, or the received response in app level. + Filters []*string + + // OpenAPI properties of Spring Cloud Gateway route config. + OpenAPI *GatewayRouteConfigOpenAPIProperties + + // A number of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request + // headers and parameter values. All of the predicates associated with a route + // must evaluate to true for the route to be matched to the request. + Predicates []*string + + // Protocol of routed Azure Spring Apps applications. + Protocol *GatewayRouteConfigProtocol + + // Array of API routes, each route contains properties such as title, uri, ssoEnabled, predicates, filters. + Routes []*GatewayAPIRoute + + // Enable Single Sign-On in app level. + SsoEnabled *bool + + // READ-ONLY; State of the Spring Cloud Gateway route config. + ProvisioningState *GatewayProvisioningState +} + +// GatewayRouteConfigResource - Spring Cloud Gateway route config resource +type GatewayRouteConfigResource struct { + // API route config of the Spring Cloud Gateway + Properties *GatewayRouteConfigProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// GatewayRouteConfigResourceCollection - Object that includes an array of Spring Cloud Gateway route config resources and +// a possible link for next set +type GatewayRouteConfigResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Spring Cloud Gateway route config resources + Value []*GatewayRouteConfigResource +} + +// GitPatternRepository - Git repository property payload for config server +type GitPatternRepository struct { + // REQUIRED; Name of the repository + Name *string + + // REQUIRED; URI of the repository + URI *string + + // Public sshKey of git repository. + HostKey *string + + // SshKey algorithm of git repository. + HostKeyAlgorithm *string + + // Label of the repository + Label *string + + // Password of git repository basic auth. + Password *string + + // Collection of pattern of the repository + Pattern []*string + + // Private sshKey algorithm of git repository. + PrivateKey *string + + // Searching path of the repository + SearchPaths []*string + + // Strict host key checking or not. + StrictHostKeyChecking *bool + + // Username of git repository basic auth. + Username *string +} + +// GloballyEnabledApms - Globally enabled APMs payload +type GloballyEnabledApms struct { + // Collection of the globally enabled APMs + Value []*string +} + +// HTTPGetAction describes an action based on HTTP Get requests. +type HTTPGetAction struct { + // REQUIRED; The type of the action to take to perform the health check. + Type *ProbeActionType + + // Path to access on the HTTP server. + Path *string + + // Scheme to use for connecting to the host. Defaults to HTTP. + // Possible enum values: + // * "HTTP" means that the scheme used will be http:// + // * "HTTPS" means that the scheme used will be https:// + Scheme *HTTPSchemeType +} + +// GetProbeAction implements the ProbeActionClassification interface for type HTTPGetAction. +func (h *HTTPGetAction) GetProbeAction() *ProbeAction { + return &ProbeAction{ + Type: h.Type, + } +} + +// ImageRegistryCredential - Credential of the image registry +type ImageRegistryCredential struct { + // The password of the image registry credential + Password *string + + // The username of the image registry credential + Username *string +} + +// IngressConfig - Ingress configuration payload for Azure Spring Apps resource. +type IngressConfig struct { + // Ingress read time out in seconds. + ReadTimeoutInSeconds *int32 +} + +// IngressSettings - App ingress settings payload. +type IngressSettings struct { + // How ingress should communicate with this app backend service. + BackendProtocol *BackendProtocol + + // Client-Certification Authentication. + ClientAuth *IngressSettingsClientAuth + + // Ingress read time out in seconds. + ReadTimeoutInSeconds *int32 + + // Ingress send time out in seconds. + SendTimeoutInSeconds *int32 + + // Type of the affinity, set this to Cookie to enable session affinity. + SessionAffinity *SessionAffinity + + // Time in seconds until the cookie expires. + SessionCookieMaxAge *int32 +} + +// IngressSettingsClientAuth - Client-Certification Authentication. +type IngressSettingsClientAuth struct { + // Collection of certificate resource id. + Certificates []*string +} + +// JarUploadedUserSourceInfo - Uploaded Jar binary for a deployment +type JarUploadedUserSourceInfo struct { + // REQUIRED; Type of the source uploaded + Type *string + + // JVM parameter + JvmOptions *string + + // Relative path of the storage which stores the source + RelativePath *string + + // Runtime version of the Jar file + RuntimeVersion *string + + // Version of the source + Version *string +} + +// GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type JarUploadedUserSourceInfo. +func (j *JarUploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo { + return &UploadedUserSourceInfo{ + RelativePath: j.RelativePath, + Type: j.Type, + Version: j.Version, + } +} + +// GetUserSourceInfo implements the UserSourceInfoClassification interface for type JarUploadedUserSourceInfo. +func (j *JarUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { + return &UserSourceInfo{ + Type: j.Type, + Version: j.Version, + } +} + +// KeyVaultCertificateProperties - Properties of certificate imported from key vault. +type KeyVaultCertificateProperties struct { + // REQUIRED; The certificate name of key vault. + KeyVaultCertName *string + + // REQUIRED; The type of the certificate source. + Type *string + + // REQUIRED; The vault uri of user key vault. + VaultURI *string + + // Indicates whether to automatically synchronize certificate from key vault or not. + AutoSync *KeyVaultCertificateAutoSync + + // The certificate version of key vault. + CertVersion *string + + // Optional. If set to true, it will not import private key from key vault. + ExcludePrivateKey *bool + + // READ-ONLY; The activate date of certificate. + ActivateDate *string + + // READ-ONLY; The domain list of certificate. + DNSNames []*string + + // READ-ONLY; The expiration date of certificate. + ExpirationDate *string + + // READ-ONLY; The issue date of certificate. + IssuedDate *string + + // READ-ONLY; The issuer of certificate. + Issuer *string + + // READ-ONLY; Provisioning state of the Certificate + ProvisioningState *CertificateResourceProvisioningState + + // READ-ONLY; The subject name of certificate. + SubjectName *string + + // READ-ONLY; The thumbprint of certificate. + Thumbprint *string +} + +// GetCertificateProperties implements the CertificatePropertiesClassification interface for type KeyVaultCertificateProperties. +func (k *KeyVaultCertificateProperties) GetCertificateProperties() *CertificateProperties { + return &CertificateProperties{ + ActivateDate: k.ActivateDate, + DNSNames: k.DNSNames, + ExpirationDate: k.ExpirationDate, + IssuedDate: k.IssuedDate, + Issuer: k.Issuer, + ProvisioningState: k.ProvisioningState, + SubjectName: k.SubjectName, + Thumbprint: k.Thumbprint, + Type: k.Type, + } +} + +// LoadedCertificate - Loaded certificate payload +type LoadedCertificate struct { + // REQUIRED; Resource Id of loaded certificate + ResourceID *string + + // Indicate whether the certificate will be loaded into default trust store, only work for Java runtime. + LoadTrustStore *bool +} + +// LogFileURLResponse - Log file URL payload +type LogFileURLResponse struct { + // REQUIRED; URL of the log file + URL *string +} + +// LogSpecification - Specifications of the Log for Azure Monitoring +type LogSpecification struct { + // Blob duration of the log + BlobDuration *string + + // Localized friendly display name of the log + DisplayName *string + + // Name of the log + Name *string +} + +// ManagedIdentityProperties - Managed identity properties retrieved from ARM request headers. +type ManagedIdentityProperties struct { + // Principal Id of system-assigned managed identity. + PrincipalID *string + + // Tenant Id of system-assigned managed identity. + TenantID *string + + // Type of the managed identity + Type *ManagedIdentityType + + // Properties of user-assigned managed identities + UserAssignedIdentities map[string]*UserAssignedManagedIdentity +} + +// MarketplaceResource - Purchasing 3rd Party product for one Azure Spring Apps instance +type MarketplaceResource struct { + // The plan id of the 3rd Party Artifact that is being procured. + Plan *string + + // The 3rd Party artifact that is being procured. + Product *string + + // The publisher id of the 3rd Party Artifact that is being bought. + Publisher *string +} + +// MetricDimension - Specifications of the Dimension of metrics +type MetricDimension struct { + // Localized friendly display name of the dimension + DisplayName *string + + // Name of the dimension + Name *string + + // Whether this dimension should be included for the Shoebox export scenario + ToBeExportedForShoebox *bool +} + +// MetricSpecification - Specifications of the Metrics for Azure Monitoring +type MetricSpecification struct { + // Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. + AggregationType *string + + // Name of the metric category that the metric belongs to. A metric can only belong to a single category. + Category *string + + // Dimensions of the metric + Dimensions []*MetricDimension + + // Localized friendly description of the metric + DisplayDescription *string + + // Localized friendly display name of the metric + DisplayName *string + + // Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. + FillGapWithZero *bool + + // Name of the metric + Name *string + + // Name of the MDM namespace. Optional. + SourceMdmNamespace *string + + // Supported aggregation types + SupportedAggregationTypes []*string + + // Supported time grain types + SupportedTimeGrainTypes []*string + + // Unit that makes sense for the metric + Unit *string +} + +// MonitoringSettingProperties - Monitoring Setting properties payload +type MonitoringSettingProperties struct { + // Indicates the versions of application insight agent + AppInsightsAgentVersions *ApplicationInsightsAgentVersions + + // Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings + AppInsightsInstrumentationKey *string + + // Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0] + AppInsightsSamplingRate *float64 + + // Error when apply Monitoring Setting changes. + Error *Error + + // Indicates whether enable the trace functionality, which will be deprecated since api version 2020-11-01-preview. Please + // leverage appInsightsInstrumentationKey to indicate if monitoringSettings enabled + // or not + TraceEnabled *bool + + // READ-ONLY; State of the Monitoring Setting. + ProvisioningState *MonitoringSettingState +} + +// MonitoringSettingResource - Monitoring Setting resource +type MonitoringSettingResource struct { + // Properties of the Monitoring Setting resource + Properties *MonitoringSettingProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// NameAvailability - Name availability result payload +type NameAvailability struct { + // Message why the name is not available + Message *string + + // Indicates whether the name is available + NameAvailable *bool + + // Reason why the name is not available + Reason *string +} + +// NameAvailabilityParameters - Name availability parameters payload +type NameAvailabilityParameters struct { + // REQUIRED; Name to be checked + Name *string + + // REQUIRED; Type of the resource to check name availability + Type *string +} + +// NetCoreZipUploadedUserSourceInfo - Uploaded Jar binary for a deployment +type NetCoreZipUploadedUserSourceInfo struct { + // REQUIRED; Type of the source uploaded + Type *string + + // The path to the .NET executable relative to zip root + NetCoreMainEntryPath *string + + // Relative path of the storage which stores the source + RelativePath *string + + // Runtime version of the .Net file + RuntimeVersion *string + + // Version of the source + Version *string +} + +// GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type NetCoreZipUploadedUserSourceInfo. +func (n *NetCoreZipUploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo { + return &UploadedUserSourceInfo{ + RelativePath: n.RelativePath, + Type: n.Type, + Version: n.Version, + } +} + +// GetUserSourceInfo implements the UserSourceInfoClassification interface for type NetCoreZipUploadedUserSourceInfo. +func (n *NetCoreZipUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { + return &UserSourceInfo{ + Type: n.Type, + Version: n.Version, + } +} + +// NetworkProfile - Service network profile payload +type NetworkProfile struct { + // Name of the resource group containing network resources for customer apps in Azure Spring Apps + AppNetworkResourceGroup *string + + // Fully qualified resource Id of the subnet to host customer apps in Azure Spring Apps + AppSubnetID *string + + // Ingress configuration payload for Azure Spring Apps resource. + IngressConfig *IngressConfig + + // The egress traffic type of Azure Spring Apps VNet instances. + OutboundType *string + + // Azure Spring Apps service reserved CIDR + ServiceCidr *string + + // Name of the resource group containing network resources of Azure Spring Apps Service Runtime + ServiceRuntimeNetworkResourceGroup *string + + // Fully qualified resource Id of the subnet to host Azure Spring Apps Service Runtime + ServiceRuntimeSubnetID *string + + // READ-ONLY; Desired outbound IP resources for Azure Spring Apps resource. + OutboundIPs *NetworkProfileOutboundIPs + + // READ-ONLY; Required inbound or outbound traffics for Azure Spring Apps resource. + RequiredTraffics []*RequiredTraffic +} + +// NetworkProfileOutboundIPs - Desired outbound IP resources for Azure Spring Apps resource. +type NetworkProfileOutboundIPs struct { + // READ-ONLY; A list of public IP addresses. + PublicIPs []*string +} + +// OperationDetail - Operation detail payload +type OperationDetail struct { + // Display of the operation + Display *OperationDisplay + + // Indicates whether the operation is a data action + IsDataAction *bool + + // Name of the operation + Name *string + + // Origin of the operation + Origin *string + + // Properties of the operation + Properties *OperationProperties + + // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + ActionType *ActionType +} + +// OperationDisplay - Operation display payload +type OperationDisplay struct { + // Localized friendly description for the operation + Description *string + + // Localized friendly name for the operation + Operation *string + + // Resource provider of the operation + Provider *string + + // Resource of the operation + Resource *string +} + +// OperationProperties - Extra Operation properties +type OperationProperties struct { + // Service specifications of the operation + ServiceSpecification *ServiceSpecification +} + +// PersistentDisk - Persistent disk payload +type PersistentDisk struct { + // Mount path of the persistent disk + MountPath *string + + // Size of the persistent disk in GB + SizeInGB *int32 + + // READ-ONLY; Size of the used persistent disk in GB + UsedInGB *int32 +} + +// PredefinedAcceleratorProperties - Predefined accelerator properties payload +type PredefinedAcceleratorProperties struct { + // State of the predefined accelerator. + State *PredefinedAcceleratorState + + // READ-ONLY + AcceleratorTags []*string + + // READ-ONLY + Description *string + + // READ-ONLY + DisplayName *string + + // READ-ONLY + IconURL *string + + // READ-ONLY; Provisioning state of the predefined accelerator. + ProvisioningState *PredefinedAcceleratorProvisioningState +} + +// PredefinedAcceleratorResource - Predefined accelerator resource +type PredefinedAcceleratorResource struct { + // Predefined accelerator properties payload + Properties *PredefinedAcceleratorProperties + + // Sku of the predefined accelerator resource + SKU *SKU + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +type PredefinedAcceleratorResourceCollection struct { + NextLink *string + Value []*PredefinedAcceleratorResource +} + +// Probe describes a health check to be performed against an App Instance to determine whether it is alive or ready to receive +// traffic. +type Probe struct { + // REQUIRED; Indicate whether the probe is disabled. + DisableProbe *bool + + // Minimum consecutive failures for the probe to be considered failed after having succeeded. Minimum value is 1. + FailureThreshold *int32 + + // Number of seconds after the App Instance has started before probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + InitialDelaySeconds *int32 + + // How often (in seconds) to perform the probe. Minimum value is 1. + PeriodSeconds *int32 + + // The action of the probe. + ProbeAction ProbeActionClassification + + // Minimum consecutive successes for the probe to be considered successful after having failed. Must be 1 for liveness and + // startup. Minimum value is 1. + SuccessThreshold *int32 + + // Number of seconds after which the probe times out. Minimum value is 1. + TimeoutSeconds *int32 +} + +// ProbeAction - The action of the probe. +type ProbeAction struct { + // REQUIRED; The type of the action to take to perform the health check. + Type *ProbeActionType +} + +// GetProbeAction implements the ProbeActionClassification interface for type ProbeAction. +func (p *ProbeAction) GetProbeAction() *ProbeAction { return p } + +// ProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location +// and tags. +type ProxyResource struct { + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// RegenerateTestKeyRequestPayload - Regenerate test key request payload +type RegenerateTestKeyRequestPayload struct { + // REQUIRED; Type of the test key + KeyType *TestKeyType +} + +// RemoteDebugging - Remote debugging config. +type RemoteDebugging struct { + // Indicate if remote debugging is enabled + Enabled *bool + + // Application debugging port + Port *int32 +} + +// RemoteDebuggingPayload - Remote debugging payload. +type RemoteDebuggingPayload struct { + // Application debugging port. + Port *int32 +} + +// RequiredTraffic - Required inbound or outbound traffic for Azure Spring Apps resource. +type RequiredTraffic struct { + // READ-ONLY; The direction of required traffic + Direction *TrafficDirection + + // READ-ONLY; The FQDN list of required traffic + Fqdns []*string + + // READ-ONLY; The ip list of required traffic + IPs []*string + + // READ-ONLY; The port of required traffic + Port *int32 + + // READ-ONLY; The protocol of required traffic + Protocol *string +} + +// Resource - The core properties of ARM resources. +type Resource struct { + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// ResourceRequests - Deployment resource request payload +type ResourceRequests struct { + // Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} + // for Standard tier. + CPU *string + + // Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, + // 1Gi, 2Gi, …, 8Gi} for Standard tier. + Memory *string +} + +// ResourceSKU - Describes an available Azure Spring Apps SKU. +type ResourceSKU struct { + // Gets the capacity of SKU. + Capacity *SKUCapacity + + // Gets a list of locations and availability zones in those locations where the SKU is available. + LocationInfo []*ResourceSKULocationInfo + + // Gets the set of locations that the SKU is available. + Locations []*string + + // Gets the name of SKU. + Name *string + + // Gets the type of resource the SKU applies to. + ResourceType *string + + // Gets the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + Restrictions []*ResourceSKURestrictions + + // Gets the tier of SKU. + Tier *string +} + +type ResourceSKUCapabilities struct { + // Gets an invariant to describe the feature. + Name *string + + // Gets an invariant if the feature is measured by quantity. + Value *string +} + +// ResourceSKUCollection - Object that includes an array of Azure Spring Apps SKU and a possible link for next set +type ResourceSKUCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of resource SKU + Value []*ResourceSKU +} + +// ResourceSKULocationInfo - Locations and availability zones where the SKU is available +type ResourceSKULocationInfo struct { + // Gets location of the SKU + Location *string + + // Gets details of capabilities available to a SKU in specific zones. + ZoneDetails []*ResourceSKUZoneDetails + + // Gets list of availability zones where the SKU is supported. + Zones []*string +} + +// ResourceSKURestrictionInfo - Information about the restriction where the SKU cannot be used +type ResourceSKURestrictionInfo struct { + // Gets locations where the SKU is restricted + Locations []*string + + // Gets list of availability zones where the SKU is restricted. + Zones []*string +} + +// ResourceSKURestrictions - Restrictions where the SKU cannot be used +type ResourceSKURestrictions struct { + // Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription' + ReasonCode *ResourceSKURestrictionsReasonCode + + // Gets the information about the restriction where the SKU cannot be used. + RestrictionInfo *ResourceSKURestrictionInfo + + // Gets the type of restrictions. Possible values include: 'Location', 'Zone' + Type *ResourceSKURestrictionsType + + // Gets the value of restrictions. If the restriction type is set to location. This would be different locations where the + // SKU is restricted. + Values []*string +} + +// ResourceSKUZoneDetails - Details of capabilities available to a SKU in specific zones +type ResourceSKUZoneDetails struct { + // Gets a list of capabilities that are available for the SKU in the specified list of zones. + Capabilities []*ResourceSKUCapabilities + + // Gets the set of zones that the SKU is available in with the specified capabilities. + Name []*string +} + +// ResourceUploadDefinition - Resource upload definition payload +type ResourceUploadDefinition struct { + // Source relative path + RelativePath *string + + // Upload URL + UploadURL *string +} + +// SKU - Sku of Azure Spring Apps +type SKU struct { + // Current capacity of the target resource + Capacity *int32 + + // Name of the Sku + Name *string + + // Tier of the Sku + Tier *string +} + +// SKUCapacity - The SKU capacity +type SKUCapacity struct { + // REQUIRED; Gets or sets the minimum. + Minimum *int32 + + // Gets or sets the default. + Default *int32 + + // Gets or sets the maximum. + Maximum *int32 + + // Gets or sets the type of the scale. + ScaleType *SKUScaleType +} + +// SKUObject - Resource Sku object used for scaling out and scaling in. +type SKUObject struct { + // Sku of the Spring Cloud Gateway resource + SKU *SKU +} + +// ServiceRegistryInstance - Collection of instances belong to the Service Registry +type ServiceRegistryInstance struct { + // READ-ONLY; Name of the Service Registry instance + Name *string + + // READ-ONLY; Status of the Service Registry instance + Status *string +} + +// ServiceRegistryProperties - Service Registry properties payload +type ServiceRegistryProperties struct { + // READ-ONLY; Collection of instances belong to Service Registry. + Instances []*ServiceRegistryInstance + + // READ-ONLY; State of the Service Registry. + ProvisioningState *ServiceRegistryProvisioningState + + // READ-ONLY; The requested resource quantity for required CPU and Memory. + ResourceRequests *ServiceRegistryResourceRequests +} + +// ServiceRegistryResource - Service Registry resource +type ServiceRegistryResource struct { + // Service Registry properties payload + Properties *ServiceRegistryProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// ServiceRegistryResourceCollection - Object that includes an array of Service Registry resources and a possible link for +// next set +type ServiceRegistryResourceCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Service Registry resources + Value []*ServiceRegistryResource +} + +// ServiceRegistryResourceRequests - Resource request payload of Service Registry +type ServiceRegistryResourceRequests struct { + // READ-ONLY; Cpu allocated to each Service Registry instance + CPU *string + + // READ-ONLY; Instance count of the Service Registry + InstanceCount *int32 + + // READ-ONLY; Memory allocated to each Service Registry instance + Memory *string +} + +// ServiceResource - Service resource +type ServiceResource struct { + // The GEO location of the resource. + Location *string + + // Properties of the Service resource + Properties *ClusterResourceProperties + + // Sku of the Service resource + SKU *SKU + + // Tags of the service which is a list of key value pairs that describe the resource. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// ServiceResourceList - Object that includes an array of Service resources and a possible link for next set +type ServiceResourceList struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of Service resources + Value []*ServiceResource +} + +// ServiceSpecification - Service specification payload +type ServiceSpecification struct { + // Specifications of the Log for Azure Monitoring + LogSpecifications []*LogSpecification + + // Specifications of the Metrics for Azure Monitoring + MetricSpecifications []*MetricSpecification +} + +// ServiceVNetAddons - Additional Service settings in vnet injection instance +type ServiceVNetAddons struct { + // Indicates whether the data plane components(log stream, app connect, remote debugging) in vnet injection instance could + // be accessed from internet. + DataPlanePublicEndpoint *bool + + // Indicates whether the log stream in vnet injection instance could be accessed from internet. + LogStreamPublicEndpoint *bool +} + +// SourceUploadedUserSourceInfo - Uploaded Java source code binary for a deployment +type SourceUploadedUserSourceInfo struct { + // REQUIRED; Type of the source uploaded + Type *string + + // Selector for the artifact to be used for the deployment for multi-module projects. This should be the relative path to + // the target module/project. + ArtifactSelector *string + + // Relative path of the storage which stores the source + RelativePath *string + + // Runtime version of the source file + RuntimeVersion *string + + // Version of the source + Version *string +} + +// GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type SourceUploadedUserSourceInfo. +func (s *SourceUploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo { + return &UploadedUserSourceInfo{ + RelativePath: s.RelativePath, + Type: s.Type, + Version: s.Version, + } +} + +// GetUserSourceInfo implements the UserSourceInfoClassification interface for type SourceUploadedUserSourceInfo. +func (s *SourceUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { + return &UserSourceInfo{ + Type: s.Type, + Version: s.Version, + } +} + +// SsoProperties - Single sign-on related configuration +type SsoProperties struct { + // The public identifier for the application + ClientID *string + + // The secret known only to the application and the authorization server + ClientSecret *string + + // The URI of Issuer Identifier + IssuerURI *string + + // It defines the specific actions applications can be allowed to do on a user's behalf + Scope []*string +} + +// StackProperties - KPack ClusterStack properties payload +type StackProperties struct { + // Id of the ClusterStack. + ID *string + + // Version of the ClusterStack + Version *string +} + +// StorageAccount - storage resource of type Azure Storage Account. +type StorageAccount struct { + // REQUIRED; The account key of the Azure Storage Account. + AccountKey *string + + // REQUIRED; The account name of the Azure Storage Account. + AccountName *string + + // REQUIRED; The type of the storage. + StorageType *StorageType +} + +// GetStorageProperties implements the StoragePropertiesClassification interface for type StorageAccount. +func (s *StorageAccount) GetStorageProperties() *StorageProperties { + return &StorageProperties{ + StorageType: s.StorageType, + } +} + +// StorageProperties - Storage resource payload. +type StorageProperties struct { + // REQUIRED; The type of the storage. + StorageType *StorageType +} + +// GetStorageProperties implements the StoragePropertiesClassification interface for type StorageProperties. +func (s *StorageProperties) GetStorageProperties() *StorageProperties { return s } + +// StorageResource - Storage resource payload. +type StorageResource struct { + // Properties of the storage resource payload. + Properties StoragePropertiesClassification + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// StorageResourceCollection - Collection compose of storage resources list and a possible link for next page. +type StorageResourceCollection struct { + // The link to next page of storage list. + NextLink *string + + // The storage resources list. + Value []*StorageResource +} + +// SupportedApmType - Supported APM type +type SupportedApmType struct { + // The name of the supported APM type + Name *string +} + +// SupportedApmTypes - Supported APM types payload +type SupportedApmTypes struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of the supported APM type + Value []*SupportedApmType +} + +// SupportedBuildpackResource - Supported buildpack resource payload +type SupportedBuildpackResource struct { + // Supported buildpack resource properties + Properties *SupportedBuildpackResourceProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// SupportedBuildpackResourceProperties - Supported buildpack resource properties +type SupportedBuildpackResourceProperties struct { + // The id of supported buildpack + BuildpackID *string +} + +// SupportedBuildpacksCollection - Object that includes an array of supported buildpacks resources and a possible link for +// next set +type SupportedBuildpacksCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of supported buildpacks resources + Value []*SupportedBuildpackResource +} + +// SupportedRuntimeVersion - Supported deployment runtime version descriptor. +type SupportedRuntimeVersion struct { + // The platform of this runtime version (possible values: "Java" or ".NET"). + Platform *SupportedRuntimePlatform + + // The raw value which could be passed to deployment CRUD operations. + Value *SupportedRuntimeValue + + // The detailed version (major.minor) of the platform. + Version *string +} + +// SupportedServerVersion - Supported server version. +type SupportedServerVersion struct { + // The server name. + Server *string + + // The raw server version value which could be passed to deployment CRUD operations. + Value *string + + // The Server version. + Version *string +} + +// SupportedServerVersions - Supported server versions. +type SupportedServerVersions struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of the supported server versions. + Value []*SupportedServerVersion +} + +// SupportedStackResource - Supported stack resource payload +type SupportedStackResource struct { + // Supported stack resource properties + Properties *SupportedStackResourceProperties + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// SupportedStackResourceProperties - Supported stack resource properties +type SupportedStackResourceProperties struct { + // The id of supported stack + StackID *string + + // The version of supported stack + Version *string +} + +// SupportedStacksCollection - Object that includes an array of supported stacks resources and a possible link for next set +type SupportedStacksCollection struct { + // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. + NextLink *string + + // Collection of supported stacks resources + Value []*SupportedStackResource +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource modification (UTC). + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *LastModifiedByType +} + +// TCPSocketAction describes an action based on opening a socket +type TCPSocketAction struct { + // REQUIRED; The type of the action to take to perform the health check. + Type *ProbeActionType +} + +// GetProbeAction implements the ProbeActionClassification interface for type TCPSocketAction. +func (t *TCPSocketAction) GetProbeAction() *ProbeAction { + return &ProbeAction{ + Type: t.Type, + } +} + +// TemporaryDisk - Temporary disk payload +type TemporaryDisk struct { + // Mount path of the temporary disk + MountPath *string + + // Size of the temporary disk in GB + SizeInGB *int32 +} + +// TestKeys - Test keys payload +type TestKeys struct { + // Indicates whether the test endpoint feature enabled or not + Enabled *bool + + // Primary key + PrimaryKey *string + + // Primary test endpoint + PrimaryTestEndpoint *string + + // Secondary key + SecondaryKey *string + + // Secondary test endpoint + SecondaryTestEndpoint *string +} + +// TrackedResource - The resource model definition for a ARM tracked top level resource. +type TrackedResource struct { + // The GEO location of the resource. + Location *string + + // Tags of the service which is a list of key value pairs that describe the resource. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource Id for the resource. + ID *string + + // READ-ONLY; The name of the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. + Type *string +} + +// TriggeredBuildResult - The build result triggered by a build +type TriggeredBuildResult struct { + // The unique build id of this build result + ID *string + + // The container image of this build result + Image *string + + // The last transition reason of this build result + LastTransitionReason *string + + // The last transition status of this build result + LastTransitionStatus *string + + // The last transition time of this build result + LastTransitionTime *time.Time + + // READ-ONLY; The provisioning state of this build result + ProvisioningState *TriggeredBuildResultProvisioningState +} + +// UploadedUserSourceInfo - Source with uploaded location +type UploadedUserSourceInfo struct { + // REQUIRED; Type of the source uploaded + Type *string + + // Relative path of the storage which stores the source + RelativePath *string + + // Version of the source + Version *string +} + +// GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type UploadedUserSourceInfo. +func (u *UploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo { return u } + +// GetUserSourceInfo implements the UserSourceInfoClassification interface for type UploadedUserSourceInfo. +func (u *UploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { + return &UserSourceInfo{ + Type: u.Type, + Version: u.Version, + } +} + +// UserAssignedManagedIdentity - The details of the user-assigned managed identity assigned to an App. +type UserAssignedManagedIdentity struct { + // READ-ONLY; Client Id of user-assigned managed identity. + ClientID *string + + // READ-ONLY; Principal Id of user-assigned managed identity. + PrincipalID *string +} + +// UserSourceInfo - Source information for a deployment +type UserSourceInfo struct { + // REQUIRED; Type of the source uploaded + Type *string + + // Version of the source + Version *string +} + +// GetUserSourceInfo implements the UserSourceInfoClassification interface for type UserSourceInfo. +func (u *UserSourceInfo) GetUserSourceInfo() *UserSourceInfo { return u } + +// ValidationMessages - Validate messages of the configuration service git repositories +type ValidationMessages struct { + // Detailed validation messages. + Messages []*string + + // The name of the configuration service git repository. + Name *string +} + +// WarUploadedUserSourceInfo - Uploaded War binary for a deployment +type WarUploadedUserSourceInfo struct { + // REQUIRED; Type of the source uploaded + Type *string + + // JVM parameter + JvmOptions *string + + // Relative path of the storage which stores the source + RelativePath *string + + // Runtime version of the war file + RuntimeVersion *string + + // Server version, currently only Apache Tomcat is supported + ServerVersion *string + + // Version of the source + Version *string +} + +// GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type WarUploadedUserSourceInfo. +func (w *WarUploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo { + return &UploadedUserSourceInfo{ + RelativePath: w.RelativePath, + Type: w.Type, + Version: w.Version, + } +} + +// GetUserSourceInfo implements the UserSourceInfoClassification interface for type WarUploadedUserSourceInfo. +func (w *WarUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { + return &UserSourceInfo{ + Type: w.Type, + Version: w.Version, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/models_serde.go new file mode 100644 index 00000000..dec5d806 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/models_serde.go @@ -0,0 +1,8870 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainProperties. +func (a APIPortalCustomDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "thumbprint", a.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalCustomDomainProperties. +func (a *APIPortalCustomDomainProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "thumbprint": + err = unpopulate(val, "Thumbprint", &a.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainResource. +func (a APIPortalCustomDomainResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalCustomDomainResource. +func (a *APIPortalCustomDomainResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIPortalCustomDomainResourceCollection. +func (a APIPortalCustomDomainResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalCustomDomainResourceCollection. +func (a *APIPortalCustomDomainResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIPortalInstance. +func (a APIPortalInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", a.Name) + populate(objectMap, "status", a.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalInstance. +func (a *APIPortalInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIPortalProperties. +func (a APIPortalProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiTryOutEnabledState", a.APITryOutEnabledState) + populate(objectMap, "gatewayIds", a.GatewayIDs) + populate(objectMap, "httpsOnly", a.HTTPSOnly) + populate(objectMap, "instances", a.Instances) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "public", a.Public) + populate(objectMap, "resourceRequests", a.ResourceRequests) + populate(objectMap, "sourceUrls", a.SourceUrls) + populate(objectMap, "ssoProperties", a.SsoProperties) + populate(objectMap, "url", a.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalProperties. +func (a *APIPortalProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiTryOutEnabledState": + err = unpopulate(val, "APITryOutEnabledState", &a.APITryOutEnabledState) + delete(rawMsg, key) + case "gatewayIds": + err = unpopulate(val, "GatewayIDs", &a.GatewayIDs) + delete(rawMsg, key) + case "httpsOnly": + err = unpopulate(val, "HTTPSOnly", &a.HTTPSOnly) + delete(rawMsg, key) + case "instances": + err = unpopulate(val, "Instances", &a.Instances) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "public": + err = unpopulate(val, "Public", &a.Public) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &a.ResourceRequests) + delete(rawMsg, key) + case "sourceUrls": + err = unpopulate(val, "SourceUrls", &a.SourceUrls) + delete(rawMsg, key) + case "ssoProperties": + err = unpopulate(val, "SsoProperties", &a.SsoProperties) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &a.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIPortalResource. +func (a APIPortalResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalResource. +func (a *APIPortalResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIPortalResourceCollection. +func (a APIPortalResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalResourceCollection. +func (a *APIPortalResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIPortalResourceRequests. +func (a APIPortalResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", a.CPU) + populate(objectMap, "memory", a.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIPortalResourceRequests. +func (a *APIPortalResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &a.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &a.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AcceleratorAuthSetting. +func (a AcceleratorAuthSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = a.AuthType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorAuthSetting. +func (a *AcceleratorAuthSetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &a.AuthType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AcceleratorBasicAuthSetting. +func (a AcceleratorBasicAuthSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = "BasicAuth" + populate(objectMap, "caCertResourceId", a.CaCertResourceID) + populate(objectMap, "password", a.Password) + populate(objectMap, "username", a.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorBasicAuthSetting. +func (a *AcceleratorBasicAuthSetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &a.AuthType) + delete(rawMsg, key) + case "caCertResourceId": + err = unpopulate(val, "CaCertResourceID", &a.CaCertResourceID) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &a.Password) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &a.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AcceleratorGitRepository. +func (a AcceleratorGitRepository) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authSetting", a.AuthSetting) + populate(objectMap, "branch", a.Branch) + populate(objectMap, "commit", a.Commit) + populate(objectMap, "gitTag", a.GitTag) + populate(objectMap, "intervalInSeconds", a.IntervalInSeconds) + populate(objectMap, "subPath", a.SubPath) + populate(objectMap, "url", a.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorGitRepository. +func (a *AcceleratorGitRepository) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authSetting": + a.AuthSetting, err = unmarshalAcceleratorAuthSettingClassification(val) + delete(rawMsg, key) + case "branch": + err = unpopulate(val, "Branch", &a.Branch) + delete(rawMsg, key) + case "commit": + err = unpopulate(val, "Commit", &a.Commit) + delete(rawMsg, key) + case "gitTag": + err = unpopulate(val, "GitTag", &a.GitTag) + delete(rawMsg, key) + case "intervalInSeconds": + err = unpopulate(val, "IntervalInSeconds", &a.IntervalInSeconds) + delete(rawMsg, key) + case "subPath": + err = unpopulate(val, "SubPath", &a.SubPath) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &a.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AcceleratorPublicSetting. +func (a AcceleratorPublicSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = "Public" + populate(objectMap, "caCertResourceId", a.CaCertResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorPublicSetting. +func (a *AcceleratorPublicSetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &a.AuthType) + delete(rawMsg, key) + case "caCertResourceId": + err = unpopulate(val, "CaCertResourceID", &a.CaCertResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AcceleratorSSHSetting. +func (a AcceleratorSSHSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = "SSH" + populate(objectMap, "hostKey", a.HostKey) + populate(objectMap, "hostKeyAlgorithm", a.HostKeyAlgorithm) + populate(objectMap, "privateKey", a.PrivateKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AcceleratorSSHSetting. +func (a *AcceleratorSSHSetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &a.AuthType) + delete(rawMsg, key) + case "hostKey": + err = unpopulate(val, "HostKey", &a.HostKey) + delete(rawMsg, key) + case "hostKeyAlgorithm": + err = unpopulate(val, "HostKeyAlgorithm", &a.HostKeyAlgorithm) + delete(rawMsg, key) + case "privateKey": + err = unpopulate(val, "PrivateKey", &a.PrivateKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ActiveDeploymentCollection. +func (a ActiveDeploymentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeDeploymentNames", a.ActiveDeploymentNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDeploymentCollection. +func (a *ActiveDeploymentCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeDeploymentNames": + err = unpopulate(val, "ActiveDeploymentNames", &a.ActiveDeploymentNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApmProperties. +func (a ApmProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "secrets", a.Secrets) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApmProperties. +func (a *ApmProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &a.Secrets) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApmReference. +func (a ApmReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceId", a.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApmReference. +func (a *ApmReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceId": + err = unpopulate(val, "ResourceID", &a.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApmResource. +func (a ApmResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApmResource. +func (a *ApmResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApmResourceCollection. +func (a ApmResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApmResourceCollection. +func (a *ApmResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApmSecretKeys. +func (a ApmSecretKeys) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApmSecretKeys. +func (a *ApmSecretKeys) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppResource. +func (a AppResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppResource. +func (a *AppResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppResourceCollection. +func (a AppResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppResourceCollection. +func (a *AppResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppResourceProperties. +func (a AppResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addonConfigs", a.AddonConfigs) + populate(objectMap, "customPersistentDisks", a.CustomPersistentDisks) + populate(objectMap, "enableEndToEndTLS", a.EnableEndToEndTLS) + populate(objectMap, "fqdn", a.Fqdn) + populate(objectMap, "httpsOnly", a.HTTPSOnly) + populate(objectMap, "ingressSettings", a.IngressSettings) + populate(objectMap, "loadedCertificates", a.LoadedCertificates) + populate(objectMap, "persistentDisk", a.PersistentDisk) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "public", a.Public) + populate(objectMap, "temporaryDisk", a.TemporaryDisk) + populate(objectMap, "url", a.URL) + populate(objectMap, "vnetAddons", a.VnetAddons) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppResourceProperties. +func (a *AppResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addonConfigs": + err = unpopulate(val, "AddonConfigs", &a.AddonConfigs) + delete(rawMsg, key) + case "customPersistentDisks": + err = unpopulate(val, "CustomPersistentDisks", &a.CustomPersistentDisks) + delete(rawMsg, key) + case "enableEndToEndTLS": + err = unpopulate(val, "EnableEndToEndTLS", &a.EnableEndToEndTLS) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &a.Fqdn) + delete(rawMsg, key) + case "httpsOnly": + err = unpopulate(val, "HTTPSOnly", &a.HTTPSOnly) + delete(rawMsg, key) + case "ingressSettings": + err = unpopulate(val, "IngressSettings", &a.IngressSettings) + delete(rawMsg, key) + case "loadedCertificates": + err = unpopulate(val, "LoadedCertificates", &a.LoadedCertificates) + delete(rawMsg, key) + case "persistentDisk": + err = unpopulate(val, "PersistentDisk", &a.PersistentDisk) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "public": + err = unpopulate(val, "Public", &a.Public) + delete(rawMsg, key) + case "temporaryDisk": + err = unpopulate(val, "TemporaryDisk", &a.TemporaryDisk) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &a.URL) + delete(rawMsg, key) + case "vnetAddons": + err = unpopulate(val, "VnetAddons", &a.VnetAddons) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppVNetAddons. +func (a AppVNetAddons) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "publicEndpoint", a.PublicEndpoint) + populate(objectMap, "publicEndpointUrl", a.PublicEndpointURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppVNetAddons. +func (a *AppVNetAddons) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publicEndpoint": + err = unpopulate(val, "PublicEndpoint", &a.PublicEndpoint) + delete(rawMsg, key) + case "publicEndpointUrl": + err = unpopulate(val, "PublicEndpointURL", &a.PublicEndpointURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorComponent. +func (a ApplicationAcceleratorComponent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instances", a.Instances) + populate(objectMap, "name", a.Name) + populate(objectMap, "resourceRequests", a.ResourceRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorComponent. +func (a *ApplicationAcceleratorComponent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instances": + err = unpopulate(val, "Instances", &a.Instances) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &a.ResourceRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorInstance. +func (a ApplicationAcceleratorInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", a.Name) + populate(objectMap, "status", a.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorInstance. +func (a *ApplicationAcceleratorInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorProperties. +func (a ApplicationAcceleratorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "components", a.Components) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorProperties. +func (a *ApplicationAcceleratorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "components": + err = unpopulate(val, "Components", &a.Components) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResource. +func (a ApplicationAcceleratorResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorResource. +func (a *ApplicationAcceleratorResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResourceCollection. +func (a ApplicationAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorResourceCollection. +func (a *ApplicationAcceleratorResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationAcceleratorResourceRequests. +func (a ApplicationAcceleratorResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", a.CPU) + populate(objectMap, "instanceCount", a.InstanceCount) + populate(objectMap, "memory", a.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationAcceleratorResourceRequests. +func (a *ApplicationAcceleratorResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &a.CPU) + delete(rawMsg, key) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &a.InstanceCount) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &a.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationInsightsAgentVersions. +func (a ApplicationInsightsAgentVersions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "java", a.Java) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationInsightsAgentVersions. +func (a *ApplicationInsightsAgentVersions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "java": + err = unpopulate(val, "Java", &a.Java) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewComponent. +func (a ApplicationLiveViewComponent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instances", a.Instances) + populateAny(objectMap, "name", a.Name) + populate(objectMap, "resourceRequests", a.ResourceRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewComponent. +func (a *ApplicationLiveViewComponent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instances": + err = unpopulate(val, "Instances", &a.Instances) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &a.ResourceRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewInstance. +func (a ApplicationLiveViewInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", a.Name) + populate(objectMap, "status", a.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewInstance. +func (a *ApplicationLiveViewInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewProperties. +func (a ApplicationLiveViewProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "components", a.Components) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewProperties. +func (a *ApplicationLiveViewProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "components": + err = unpopulate(val, "Components", &a.Components) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewResource. +func (a ApplicationLiveViewResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewResource. +func (a *ApplicationLiveViewResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewResourceCollection. +func (a ApplicationLiveViewResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewResourceCollection. +func (a *ApplicationLiveViewResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationLiveViewResourceRequests. +func (a ApplicationLiveViewResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", a.CPU) + populate(objectMap, "instanceCount", a.InstanceCount) + populate(objectMap, "memory", a.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLiveViewResourceRequests. +func (a *ApplicationLiveViewResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &a.CPU) + delete(rawMsg, key) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &a.InstanceCount) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &a.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableOperations. +func (a AvailableOperations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableOperations. +func (a *AvailableOperations) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableRuntimeVersions. +func (a AvailableRuntimeVersions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableRuntimeVersions. +func (a *AvailableRuntimeVersions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFileVolume. +func (a AzureFileVolume) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableSubPath", a.EnableSubPath) + populate(objectMap, "mountOptions", a.MountOptions) + populate(objectMap, "mountPath", a.MountPath) + populate(objectMap, "readOnly", a.ReadOnly) + populate(objectMap, "shareName", a.ShareName) + objectMap["type"] = TypeAzureFileVolume + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileVolume. +func (a *AzureFileVolume) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableSubPath": + err = unpopulate(val, "EnableSubPath", &a.EnableSubPath) + delete(rawMsg, key) + case "mountOptions": + err = unpopulate(val, "MountOptions", &a.MountOptions) + delete(rawMsg, key) + case "mountPath": + err = unpopulate(val, "MountPath", &a.MountPath) + delete(rawMsg, key) + case "readOnly": + err = unpopulate(val, "ReadOnly", &a.ReadOnly) + delete(rawMsg, key) + case "shareName": + err = unpopulate(val, "ShareName", &a.ShareName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BindingResource. +func (b BindingResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BindingResource. +func (b *BindingResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BindingResourceCollection. +func (b BindingResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BindingResourceCollection. +func (b *BindingResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BindingResourceProperties. +func (b BindingResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bindingParameters", b.BindingParameters) + populate(objectMap, "createdAt", b.CreatedAt) + populate(objectMap, "generatedProperties", b.GeneratedProperties) + populate(objectMap, "key", b.Key) + populate(objectMap, "resourceId", b.ResourceID) + populate(objectMap, "resourceName", b.ResourceName) + populate(objectMap, "resourceType", b.ResourceType) + populate(objectMap, "updatedAt", b.UpdatedAt) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BindingResourceProperties. +func (b *BindingResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bindingParameters": + err = unpopulate(val, "BindingParameters", &b.BindingParameters) + delete(rawMsg, key) + case "createdAt": + err = unpopulate(val, "CreatedAt", &b.CreatedAt) + delete(rawMsg, key) + case "generatedProperties": + err = unpopulate(val, "GeneratedProperties", &b.GeneratedProperties) + delete(rawMsg, key) + case "key": + err = unpopulate(val, "Key", &b.Key) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &b.ResourceID) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &b.ResourceName) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &b.ResourceType) + delete(rawMsg, key) + case "updatedAt": + err = unpopulate(val, "UpdatedAt", &b.UpdatedAt) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Build. +func (b Build) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Build. +func (b *Build) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildCollection. +func (b BuildCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildCollection. +func (b *BuildCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildProperties. +func (b BuildProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentPool", b.AgentPool) + populate(objectMap, "apms", b.Apms) + populate(objectMap, "builder", b.Builder) + populate(objectMap, "certificates", b.Certificates) + populate(objectMap, "env", b.Env) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "relativePath", b.RelativePath) + populate(objectMap, "resourceRequests", b.ResourceRequests) + populate(objectMap, "triggeredBuildResult", b.TriggeredBuildResult) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildProperties. +func (b *BuildProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentPool": + err = unpopulate(val, "AgentPool", &b.AgentPool) + delete(rawMsg, key) + case "apms": + err = unpopulate(val, "Apms", &b.Apms) + delete(rawMsg, key) + case "builder": + err = unpopulate(val, "Builder", &b.Builder) + delete(rawMsg, key) + case "certificates": + err = unpopulate(val, "Certificates", &b.Certificates) + delete(rawMsg, key) + case "env": + err = unpopulate(val, "Env", &b.Env) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "relativePath": + err = unpopulate(val, "RelativePath", &b.RelativePath) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &b.ResourceRequests) + delete(rawMsg, key) + case "triggeredBuildResult": + err = unpopulate(val, "TriggeredBuildResult", &b.TriggeredBuildResult) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildResourceRequests. +func (b BuildResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", b.CPU) + populate(objectMap, "memory", b.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResourceRequests. +func (b *BuildResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &b.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &b.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildResult. +func (b BuildResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResult. +func (b *BuildResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildResultCollection. +func (b BuildResultCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultCollection. +func (b *BuildResultCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildResultLog. +func (b BuildResultLog) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobUrl", b.BlobURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultLog. +func (b *BuildResultLog) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobUrl": + err = unpopulate(val, "BlobURL", &b.BlobURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildResultProperties. +func (b BuildResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "buildPodName", b.BuildPodName) + populate(objectMap, "buildStages", b.BuildStages) + populate(objectMap, "error", b.Error) + populate(objectMap, "image", b.Image) + populate(objectMap, "name", b.Name) + populate(objectMap, "provisioningState", b.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultProperties. +func (b *BuildResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "buildPodName": + err = unpopulate(val, "BuildPodName", &b.BuildPodName) + delete(rawMsg, key) + case "buildStages": + err = unpopulate(val, "BuildStages", &b.BuildStages) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &b.Error) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &b.Image) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildResultUserSourceInfo. +func (b BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "buildResultId", b.BuildResultID) + objectMap["type"] = "BuildResult" + populate(objectMap, "version", b.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultUserSourceInfo. +func (b *BuildResultUserSourceInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "buildResultId": + err = unpopulate(val, "BuildResultID", &b.BuildResultID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &b.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildService. +func (b BuildService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildService. +func (b *BuildService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolProperties. +func (b BuildServiceAgentPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "poolSize", b.PoolSize) + populate(objectMap, "provisioningState", b.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolProperties. +func (b *BuildServiceAgentPoolProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "poolSize": + err = unpopulate(val, "PoolSize", &b.PoolSize) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResource. +func (b BuildServiceAgentPoolResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolResource. +func (b *BuildServiceAgentPoolResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolResourceCollection. +func (b BuildServiceAgentPoolResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolResourceCollection. +func (b *BuildServiceAgentPoolResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildServiceAgentPoolSizeProperties. +func (b BuildServiceAgentPoolSizeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", b.CPU) + populate(objectMap, "memory", b.Memory) + populate(objectMap, "name", b.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceAgentPoolSizeProperties. +func (b *BuildServiceAgentPoolSizeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &b.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &b.Memory) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildServiceCollection. +func (b BuildServiceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceCollection. +func (b *BuildServiceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildServiceProperties. +func (b BuildServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerRegistry", b.ContainerRegistry) + populate(objectMap, "kPackVersion", b.KPackVersion) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "resourceRequests", b.ResourceRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServiceProperties. +func (b *BuildServiceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerRegistry": + err = unpopulate(val, "ContainerRegistry", &b.ContainerRegistry) + delete(rawMsg, key) + case "kPackVersion": + err = unpopulate(val, "KPackVersion", &b.KPackVersion) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &b.ResourceRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildServicePropertiesResourceRequests. +func (b BuildServicePropertiesResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", b.CPU) + populate(objectMap, "memory", b.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildServicePropertiesResourceRequests. +func (b *BuildServicePropertiesResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &b.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &b.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildStageProperties. +func (b BuildStageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exitCode", b.ExitCode) + populate(objectMap, "name", b.Name) + populate(objectMap, "reason", b.Reason) + populate(objectMap, "status", b.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildStageProperties. +func (b *BuildStageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exitCode": + err = unpopulate(val, "ExitCode", &b.ExitCode) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &b.Reason) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &b.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuilderProperties. +func (b BuilderProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "buildpackGroups", b.BuildpackGroups) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "stack", b.Stack) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderProperties. +func (b *BuilderProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "buildpackGroups": + err = unpopulate(val, "BuildpackGroups", &b.BuildpackGroups) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "stack": + err = unpopulate(val, "Stack", &b.Stack) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuilderResource. +func (b BuilderResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderResource. +func (b *BuilderResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuilderResourceCollection. +func (b BuilderResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuilderResourceCollection. +func (b *BuilderResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingLaunchProperties. +func (b BuildpackBindingLaunchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "secrets", b.Secrets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingLaunchProperties. +func (b *BuildpackBindingLaunchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &b.Secrets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingProperties. +func (b BuildpackBindingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bindingType", b.BindingType) + populate(objectMap, "launchProperties", b.LaunchProperties) + populate(objectMap, "provisioningState", b.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingProperties. +func (b *BuildpackBindingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bindingType": + err = unpopulate(val, "BindingType", &b.BindingType) + delete(rawMsg, key) + case "launchProperties": + err = unpopulate(val, "LaunchProperties", &b.LaunchProperties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingResource. +func (b BuildpackBindingResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingResource. +func (b *BuildpackBindingResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingResourceCollection. +func (b BuildpackBindingResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackBindingResourceCollection. +func (b *BuildpackBindingResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildpackProperties. +func (b BuildpackProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpackProperties. +func (b *BuildpackProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildpacksGroupProperties. +func (b BuildpacksGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "buildpacks", b.Buildpacks) + populate(objectMap, "name", b.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildpacksGroupProperties. +func (b *BuildpacksGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "buildpacks": + err = unpopulate(val, "Buildpacks", &b.Buildpacks) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateProperties. +func (c CertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activateDate", c.ActivateDate) + populate(objectMap, "dnsNames", c.DNSNames) + populate(objectMap, "expirationDate", c.ExpirationDate) + populate(objectMap, "issuedDate", c.IssuedDate) + populate(objectMap, "issuer", c.Issuer) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "subjectName", c.SubjectName) + populate(objectMap, "thumbprint", c.Thumbprint) + objectMap["type"] = c.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateProperties. +func (c *CertificateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activateDate": + err = unpopulate(val, "ActivateDate", &c.ActivateDate) + delete(rawMsg, key) + case "dnsNames": + err = unpopulate(val, "DNSNames", &c.DNSNames) + delete(rawMsg, key) + case "expirationDate": + err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) + delete(rawMsg, key) + case "issuedDate": + err = unpopulate(val, "IssuedDate", &c.IssuedDate) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &c.Issuer) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "subjectName": + err = unpopulate(val, "SubjectName", &c.SubjectName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateReference. +func (c CertificateReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceId", c.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateReference. +func (c *CertificateReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateResource. +func (c CertificateResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResource. +func (c *CertificateResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + c.Properties, err = unmarshalCertificatePropertiesClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateResourceCollection. +func (c CertificateResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResourceCollection. +func (c *CertificateResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterResourceProperties. +func (c ClusterResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fqdn", c.Fqdn) + populate(objectMap, "marketplaceResource", c.MarketplaceResource) + populate(objectMap, "networkProfile", c.NetworkProfile) + populate(objectMap, "powerState", c.PowerState) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "serviceId", c.ServiceID) + populate(objectMap, "version", c.Version) + populate(objectMap, "vnetAddons", c.VnetAddons) + populate(objectMap, "zoneRedundant", c.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterResourceProperties. +func (c *ClusterResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fqdn": + err = unpopulate(val, "Fqdn", &c.Fqdn) + delete(rawMsg, key) + case "marketplaceResource": + err = unpopulate(val, "MarketplaceResource", &c.MarketplaceResource) + delete(rawMsg, key) + case "networkProfile": + err = unpopulate(val, "NetworkProfile", &c.NetworkProfile) + delete(rawMsg, key) + case "powerState": + err = unpopulate(val, "PowerState", &c.PowerState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "serviceId": + err = unpopulate(val, "ServiceID", &c.ServiceID) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &c.Version) + delete(rawMsg, key) + case "vnetAddons": + err = unpopulate(val, "VnetAddons", &c.VnetAddons) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &c.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigServerGitProperty. +func (c ConfigServerGitProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostKey", c.HostKey) + populate(objectMap, "hostKeyAlgorithm", c.HostKeyAlgorithm) + populate(objectMap, "label", c.Label) + populate(objectMap, "password", c.Password) + populate(objectMap, "privateKey", c.PrivateKey) + populate(objectMap, "repositories", c.Repositories) + populate(objectMap, "searchPaths", c.SearchPaths) + populate(objectMap, "strictHostKeyChecking", c.StrictHostKeyChecking) + populate(objectMap, "uri", c.URI) + populate(objectMap, "username", c.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerGitProperty. +func (c *ConfigServerGitProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostKey": + err = unpopulate(val, "HostKey", &c.HostKey) + delete(rawMsg, key) + case "hostKeyAlgorithm": + err = unpopulate(val, "HostKeyAlgorithm", &c.HostKeyAlgorithm) + delete(rawMsg, key) + case "label": + err = unpopulate(val, "Label", &c.Label) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &c.Password) + delete(rawMsg, key) + case "privateKey": + err = unpopulate(val, "PrivateKey", &c.PrivateKey) + delete(rawMsg, key) + case "repositories": + err = unpopulate(val, "Repositories", &c.Repositories) + delete(rawMsg, key) + case "searchPaths": + err = unpopulate(val, "SearchPaths", &c.SearchPaths) + delete(rawMsg, key) + case "strictHostKeyChecking": + err = unpopulate(val, "StrictHostKeyChecking", &c.StrictHostKeyChecking) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &c.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigServerProperties. +func (c ConfigServerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configServer", c.ConfigServer) + populate(objectMap, "error", c.Error) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerProperties. +func (c *ConfigServerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configServer": + err = unpopulate(val, "ConfigServer", &c.ConfigServer) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &c.Error) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigServerResource. +func (c ConfigServerResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerResource. +func (c *ConfigServerResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettings. +func (c ConfigServerSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gitProperty", c.GitProperty) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettings. +func (c *ConfigServerSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "gitProperty": + err = unpopulate(val, "GitProperty", &c.GitProperty) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsErrorRecord. +func (c ConfigServerSettingsErrorRecord) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "messages", c.Messages) + populate(objectMap, "name", c.Name) + populate(objectMap, "uri", c.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettingsErrorRecord. +func (c *ConfigServerSettingsErrorRecord) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "messages": + err = unpopulate(val, "Messages", &c.Messages) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigServerSettingsValidateResult. +func (c ConfigServerSettingsValidateResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "details", c.Details) + populate(objectMap, "isValid", c.IsValid) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigServerSettingsValidateResult. +func (c *ConfigServerSettingsValidateResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "details": + err = unpopulate(val, "Details", &c.Details) + delete(rawMsg, key) + case "isValid": + err = unpopulate(val, "IsValid", &c.IsValid) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitProperty. +func (c ConfigurationServiceGitProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "repositories", c.Repositories) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitProperty. +func (c *ConfigurationServiceGitProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "repositories": + err = unpopulate(val, "Repositories", &c.Repositories) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitPropertyValidateResult. +func (c ConfigurationServiceGitPropertyValidateResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gitReposValidationResult", c.GitReposValidationResult) + populate(objectMap, "isValid", c.IsValid) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitPropertyValidateResult. +func (c *ConfigurationServiceGitPropertyValidateResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "gitReposValidationResult": + err = unpopulate(val, "GitReposValidationResult", &c.GitReposValidationResult) + delete(rawMsg, key) + case "isValid": + err = unpopulate(val, "IsValid", &c.IsValid) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitRepository. +func (c ConfigurationServiceGitRepository) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "caCertResourceId", c.CaCertResourceID) + populate(objectMap, "gitImplementation", c.GitImplementation) + populate(objectMap, "hostKey", c.HostKey) + populate(objectMap, "hostKeyAlgorithm", c.HostKeyAlgorithm) + populate(objectMap, "label", c.Label) + populate(objectMap, "name", c.Name) + populate(objectMap, "password", c.Password) + populate(objectMap, "patterns", c.Patterns) + populate(objectMap, "privateKey", c.PrivateKey) + populate(objectMap, "searchPaths", c.SearchPaths) + populate(objectMap, "strictHostKeyChecking", c.StrictHostKeyChecking) + populate(objectMap, "uri", c.URI) + populate(objectMap, "username", c.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceGitRepository. +func (c *ConfigurationServiceGitRepository) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "caCertResourceId": + err = unpopulate(val, "CaCertResourceID", &c.CaCertResourceID) + delete(rawMsg, key) + case "gitImplementation": + err = unpopulate(val, "GitImplementation", &c.GitImplementation) + delete(rawMsg, key) + case "hostKey": + err = unpopulate(val, "HostKey", &c.HostKey) + delete(rawMsg, key) + case "hostKeyAlgorithm": + err = unpopulate(val, "HostKeyAlgorithm", &c.HostKeyAlgorithm) + delete(rawMsg, key) + case "label": + err = unpopulate(val, "Label", &c.Label) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &c.Password) + delete(rawMsg, key) + case "patterns": + err = unpopulate(val, "Patterns", &c.Patterns) + delete(rawMsg, key) + case "privateKey": + err = unpopulate(val, "PrivateKey", &c.PrivateKey) + delete(rawMsg, key) + case "searchPaths": + err = unpopulate(val, "SearchPaths", &c.SearchPaths) + delete(rawMsg, key) + case "strictHostKeyChecking": + err = unpopulate(val, "StrictHostKeyChecking", &c.StrictHostKeyChecking) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &c.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceInstance. +func (c ConfigurationServiceInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + populate(objectMap, "status", c.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceInstance. +func (c *ConfigurationServiceInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceProperties. +func (c ConfigurationServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "generation", c.Generation) + populate(objectMap, "instances", c.Instances) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "resourceRequests", c.ResourceRequests) + populate(objectMap, "settings", c.Settings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceProperties. +func (c *ConfigurationServiceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "generation": + err = unpopulate(val, "Generation", &c.Generation) + delete(rawMsg, key) + case "instances": + err = unpopulate(val, "Instances", &c.Instances) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &c.ResourceRequests) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &c.Settings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResource. +func (c ConfigurationServiceResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResource. +func (c *ConfigurationServiceResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceCollection. +func (c ConfigurationServiceResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResourceCollection. +func (c *ConfigurationServiceResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceResourceRequests. +func (c ConfigurationServiceResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", c.CPU) + populate(objectMap, "instanceCount", c.InstanceCount) + populate(objectMap, "memory", c.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceResourceRequests. +func (c *ConfigurationServiceResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &c.CPU) + delete(rawMsg, key) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &c.InstanceCount) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &c.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettings. +func (c ConfigurationServiceSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gitProperty", c.GitProperty) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceSettings. +func (c *ConfigurationServiceSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "gitProperty": + err = unpopulate(val, "GitProperty", &c.GitProperty) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceSettingsValidateResult. +func (c ConfigurationServiceSettingsValidateResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gitPropertyValidationResult", c.GitPropertyValidationResult) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationServiceSettingsValidateResult. +func (c *ConfigurationServiceSettingsValidateResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "gitPropertyValidationResult": + err = unpopulate(val, "GitPropertyValidationResult", &c.GitPropertyValidationResult) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerProbeSettings. +func (c ContainerProbeSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disableProbe", c.DisableProbe) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerProbeSettings. +func (c *ContainerProbeSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disableProbe": + err = unpopulate(val, "DisableProbe", &c.DisableProbe) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerRegistryBasicCredentials. +func (c ContainerRegistryBasicCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "password", c.Password) + populate(objectMap, "server", c.Server) + objectMap["type"] = "BasicAuth" + populate(objectMap, "username", c.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryBasicCredentials. +func (c *ContainerRegistryBasicCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "password": + err = unpopulate(val, "Password", &c.Password) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &c.Server) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &c.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerRegistryCredentials. +func (c ContainerRegistryCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = c.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryCredentials. +func (c *ContainerRegistryCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerRegistryProperties. +func (c ContainerRegistryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "credentials", c.Credentials) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryProperties. +func (c *ContainerRegistryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentials": + c.Credentials, err = unmarshalContainerRegistryCredentialsClassification(val) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerRegistryResource. +func (c ContainerRegistryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryResource. +func (c *ContainerRegistryResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerRegistryResourceCollection. +func (c ContainerRegistryResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryResourceCollection. +func (c *ContainerRegistryResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerRegistryValidateResult. +func (c ContainerRegistryValidateResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isValid", c.IsValid) + populate(objectMap, "message", c.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerRegistryValidateResult. +func (c *ContainerRegistryValidateResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isValid": + err = unpopulate(val, "IsValid", &c.IsValid) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContentCertificateProperties. +func (c ContentCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activateDate", c.ActivateDate) + populate(objectMap, "content", c.Content) + populate(objectMap, "dnsNames", c.DNSNames) + populate(objectMap, "expirationDate", c.ExpirationDate) + populate(objectMap, "issuedDate", c.IssuedDate) + populate(objectMap, "issuer", c.Issuer) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "subjectName", c.SubjectName) + populate(objectMap, "thumbprint", c.Thumbprint) + objectMap["type"] = "ContentCertificate" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentCertificateProperties. +func (c *ContentCertificateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activateDate": + err = unpopulate(val, "ActivateDate", &c.ActivateDate) + delete(rawMsg, key) + case "content": + err = unpopulate(val, "Content", &c.Content) + delete(rawMsg, key) + case "dnsNames": + err = unpopulate(val, "DNSNames", &c.DNSNames) + delete(rawMsg, key) + case "expirationDate": + err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) + delete(rawMsg, key) + case "issuedDate": + err = unpopulate(val, "IssuedDate", &c.IssuedDate) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &c.Issuer) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "subjectName": + err = unpopulate(val, "SubjectName", &c.SubjectName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomContainer. +func (c CustomContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "args", c.Args) + populate(objectMap, "command", c.Command) + populate(objectMap, "containerImage", c.ContainerImage) + populate(objectMap, "imageRegistryCredential", c.ImageRegistryCredential) + populate(objectMap, "languageFramework", c.LanguageFramework) + populate(objectMap, "server", c.Server) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomContainer. +func (c *CustomContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "args": + err = unpopulate(val, "Args", &c.Args) + delete(rawMsg, key) + case "command": + err = unpopulate(val, "Command", &c.Command) + delete(rawMsg, key) + case "containerImage": + err = unpopulate(val, "ContainerImage", &c.ContainerImage) + delete(rawMsg, key) + case "imageRegistryCredential": + err = unpopulate(val, "ImageRegistryCredential", &c.ImageRegistryCredential) + delete(rawMsg, key) + case "languageFramework": + err = unpopulate(val, "LanguageFramework", &c.LanguageFramework) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &c.Server) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomContainerUserSourceInfo. +func (c CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customContainer", c.CustomContainer) + objectMap["type"] = "Container" + populate(objectMap, "version", c.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomContainerUserSourceInfo. +func (c *CustomContainerUserSourceInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customContainer": + err = unpopulate(val, "CustomContainer", &c.CustomContainer) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &c.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomainProperties. +func (c CustomDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appName", c.AppName) + populate(objectMap, "certName", c.CertName) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "thumbprint", c.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainProperties. +func (c *CustomDomainProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appName": + err = unpopulate(val, "AppName", &c.AppName) + delete(rawMsg, key) + case "certName": + err = unpopulate(val, "CertName", &c.CertName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomainResource. +func (c CustomDomainResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainResource. +func (c *CustomDomainResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomainResourceCollection. +func (c CustomDomainResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainResourceCollection. +func (c *CustomDomainResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomainValidatePayload. +func (c CustomDomainValidatePayload) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainValidatePayload. +func (c *CustomDomainValidatePayload) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomainValidateResult. +func (c CustomDomainValidateResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isValid", c.IsValid) + populate(objectMap, "message", c.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainValidateResult. +func (c *CustomDomainValidateResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isValid": + err = unpopulate(val, "IsValid", &c.IsValid) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomPersistentDiskProperties. +func (c CustomPersistentDiskProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableSubPath", c.EnableSubPath) + populate(objectMap, "mountOptions", c.MountOptions) + populate(objectMap, "mountPath", c.MountPath) + populate(objectMap, "readOnly", c.ReadOnly) + objectMap["type"] = c.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomPersistentDiskProperties. +func (c *CustomPersistentDiskProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableSubPath": + err = unpopulate(val, "EnableSubPath", &c.EnableSubPath) + delete(rawMsg, key) + case "mountOptions": + err = unpopulate(val, "MountOptions", &c.MountOptions) + delete(rawMsg, key) + case "mountPath": + err = unpopulate(val, "MountPath", &c.MountPath) + delete(rawMsg, key) + case "readOnly": + err = unpopulate(val, "ReadOnly", &c.ReadOnly) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomPersistentDiskResource. +func (c CustomPersistentDiskResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customPersistentDiskProperties", c.CustomPersistentDiskProperties) + populate(objectMap, "storageId", c.StorageID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomPersistentDiskResource. +func (c *CustomPersistentDiskResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customPersistentDiskProperties": + c.CustomPersistentDiskProperties, err = unmarshalCustomPersistentDiskPropertiesClassification(val) + delete(rawMsg, key) + case "storageId": + err = unpopulate(val, "StorageID", &c.StorageID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomizedAcceleratorProperties. +func (c CustomizedAcceleratorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "acceleratorTags", c.AcceleratorTags) + populate(objectMap, "acceleratorType", c.AcceleratorType) + populate(objectMap, "description", c.Description) + populate(objectMap, "displayName", c.DisplayName) + populate(objectMap, "gitRepository", c.GitRepository) + populate(objectMap, "iconUrl", c.IconURL) + populate(objectMap, "imports", c.Imports) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomizedAcceleratorProperties. +func (c *CustomizedAcceleratorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acceleratorTags": + err = unpopulate(val, "AcceleratorTags", &c.AcceleratorTags) + delete(rawMsg, key) + case "acceleratorType": + err = unpopulate(val, "AcceleratorType", &c.AcceleratorType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &c.DisplayName) + delete(rawMsg, key) + case "gitRepository": + err = unpopulate(val, "GitRepository", &c.GitRepository) + delete(rawMsg, key) + case "iconUrl": + err = unpopulate(val, "IconURL", &c.IconURL) + delete(rawMsg, key) + case "imports": + err = unpopulate(val, "Imports", &c.Imports) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomizedAcceleratorResource. +func (c CustomizedAcceleratorResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "sku", c.SKU) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomizedAcceleratorResource. +func (c *CustomizedAcceleratorResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &c.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomizedAcceleratorResourceCollection. +func (c CustomizedAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomizedAcceleratorResourceCollection. +func (c *CustomizedAcceleratorResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomizedAcceleratorValidateResult. +func (c CustomizedAcceleratorValidateResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorMessage", c.ErrorMessage) + populate(objectMap, "state", c.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomizedAcceleratorValidateResult. +func (c *CustomizedAcceleratorValidateResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &c.ErrorMessage) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &c.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentInstance. +func (d DeploymentInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "discoveryStatus", d.DiscoveryStatus) + populate(objectMap, "name", d.Name) + populate(objectMap, "reason", d.Reason) + populate(objectMap, "startTime", d.StartTime) + populate(objectMap, "status", d.Status) + populate(objectMap, "zone", d.Zone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentInstance. +func (d *DeploymentInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "discoveryStatus": + err = unpopulate(val, "DiscoveryStatus", &d.DiscoveryStatus) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &d.Reason) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &d.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + case "zone": + err = unpopulate(val, "Zone", &d.Zone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentList. +func (d DeploymentList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deployments", d.Deployments) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentList. +func (d *DeploymentList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deployments": + err = unpopulate(val, "Deployments", &d.Deployments) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentResource. +func (d DeploymentResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "sku", d.SKU) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResource. +func (d *DeploymentResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &d.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentResourceCollection. +func (d DeploymentResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResourceCollection. +func (d *DeploymentResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentResourceProperties. +func (d DeploymentResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "active", d.Active) + populate(objectMap, "deploymentSettings", d.DeploymentSettings) + populate(objectMap, "instances", d.Instances) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "source", d.Source) + populate(objectMap, "status", d.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResourceProperties. +func (d *DeploymentResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "active": + err = unpopulate(val, "Active", &d.Active) + delete(rawMsg, key) + case "deploymentSettings": + err = unpopulate(val, "DeploymentSettings", &d.DeploymentSettings) + delete(rawMsg, key) + case "instances": + err = unpopulate(val, "Instances", &d.Instances) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "source": + d.Source, err = unmarshalUserSourceInfoClassification(val) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentSettings. +func (d DeploymentSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addonConfigs", d.AddonConfigs) + populate(objectMap, "apms", d.Apms) + populate(objectMap, "containerProbeSettings", d.ContainerProbeSettings) + populate(objectMap, "environmentVariables", d.EnvironmentVariables) + populate(objectMap, "livenessProbe", d.LivenessProbe) + populate(objectMap, "readinessProbe", d.ReadinessProbe) + populate(objectMap, "resourceRequests", d.ResourceRequests) + populate(objectMap, "startupProbe", d.StartupProbe) + populate(objectMap, "terminationGracePeriodSeconds", d.TerminationGracePeriodSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentSettings. +func (d *DeploymentSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addonConfigs": + err = unpopulate(val, "AddonConfigs", &d.AddonConfigs) + delete(rawMsg, key) + case "apms": + err = unpopulate(val, "Apms", &d.Apms) + delete(rawMsg, key) + case "containerProbeSettings": + err = unpopulate(val, "ContainerProbeSettings", &d.ContainerProbeSettings) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &d.EnvironmentVariables) + delete(rawMsg, key) + case "livenessProbe": + err = unpopulate(val, "LivenessProbe", &d.LivenessProbe) + delete(rawMsg, key) + case "readinessProbe": + err = unpopulate(val, "ReadinessProbe", &d.ReadinessProbe) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &d.ResourceRequests) + delete(rawMsg, key) + case "startupProbe": + err = unpopulate(val, "StartupProbe", &d.StartupProbe) + delete(rawMsg, key) + case "terminationGracePeriodSeconds": + err = unpopulate(val, "TerminationGracePeriodSeconds", &d.TerminationGracePeriodSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DevToolPortalComponent. +func (d DevToolPortalComponent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instances", d.Instances) + populate(objectMap, "name", d.Name) + populate(objectMap, "resourceRequests", d.ResourceRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalComponent. +func (d *DevToolPortalComponent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instances": + err = unpopulate(val, "Instances", &d.Instances) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &d.ResourceRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DevToolPortalFeatureDetail. +func (d DevToolPortalFeatureDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "route", d.Route) + populate(objectMap, "state", d.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalFeatureDetail. +func (d *DevToolPortalFeatureDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "route": + err = unpopulate(val, "Route", &d.Route) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &d.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DevToolPortalFeatureSettings. +func (d DevToolPortalFeatureSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationAccelerator", d.ApplicationAccelerator) + populate(objectMap, "applicationLiveView", d.ApplicationLiveView) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalFeatureSettings. +func (d *DevToolPortalFeatureSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationAccelerator": + err = unpopulate(val, "ApplicationAccelerator", &d.ApplicationAccelerator) + delete(rawMsg, key) + case "applicationLiveView": + err = unpopulate(val, "ApplicationLiveView", &d.ApplicationLiveView) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DevToolPortalInstance. +func (d DevToolPortalInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", d.Name) + populate(objectMap, "status", d.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalInstance. +func (d *DevToolPortalInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DevToolPortalProperties. +func (d DevToolPortalProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "components", d.Components) + populate(objectMap, "features", d.Features) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "public", d.Public) + populate(objectMap, "ssoProperties", d.SsoProperties) + populate(objectMap, "url", d.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalProperties. +func (d *DevToolPortalProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "components": + err = unpopulate(val, "Components", &d.Components) + delete(rawMsg, key) + case "features": + err = unpopulate(val, "Features", &d.Features) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "public": + err = unpopulate(val, "Public", &d.Public) + delete(rawMsg, key) + case "ssoProperties": + err = unpopulate(val, "SsoProperties", &d.SsoProperties) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &d.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DevToolPortalResource. +func (d DevToolPortalResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalResource. +func (d *DevToolPortalResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DevToolPortalResourceCollection. +func (d DevToolPortalResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalResourceCollection. +func (d *DevToolPortalResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DevToolPortalResourceRequests. +func (d DevToolPortalResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", d.CPU) + populate(objectMap, "instanceCount", d.InstanceCount) + populate(objectMap, "memory", d.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalResourceRequests. +func (d *DevToolPortalResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &d.CPU) + delete(rawMsg, key) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &d.InstanceCount) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &d.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DevToolPortalSsoProperties. +func (d DevToolPortalSsoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", d.ClientID) + populate(objectMap, "clientSecret", d.ClientSecret) + populate(objectMap, "metadataUrl", d.MetadataURL) + populate(objectMap, "scopes", d.Scopes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DevToolPortalSsoProperties. +func (d *DevToolPortalSsoProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &d.ClientID) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &d.ClientSecret) + delete(rawMsg, key) + case "metadataUrl": + err = unpopulate(val, "MetadataURL", &d.MetadataURL) + delete(rawMsg, key) + case "scopes": + err = unpopulate(val, "Scopes", &d.Scopes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticParameters. +func (d DiagnosticParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appInstance", d.AppInstance) + populate(objectMap, "duration", d.Duration) + populate(objectMap, "filePath", d.FilePath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticParameters. +func (d *DiagnosticParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInstance": + err = unpopulate(val, "AppInstance", &d.AppInstance) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &d.Duration) + delete(rawMsg, key) + case "filePath": + err = unpopulate(val, "FilePath", &d.FilePath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Error. +func (e Error) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Error. +func (e *Error) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExecAction. +func (e ExecAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "command", e.Command) + objectMap["type"] = ProbeActionTypeExecAction + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExecAction. +func (e *ExecAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "command": + err = unpopulate(val, "Command", &e.Command) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayAPIMetadataProperties. +func (g GatewayAPIMetadataProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", g.Description) + populate(objectMap, "documentation", g.Documentation) + populate(objectMap, "serverUrl", g.ServerURL) + populate(objectMap, "title", g.Title) + populate(objectMap, "version", g.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayAPIMetadataProperties. +func (g *GatewayAPIMetadataProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &g.Description) + delete(rawMsg, key) + case "documentation": + err = unpopulate(val, "Documentation", &g.Documentation) + delete(rawMsg, key) + case "serverUrl": + err = unpopulate(val, "ServerURL", &g.ServerURL) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &g.Title) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &g.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayAPIRoute. +func (g GatewayAPIRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", g.Description) + populate(objectMap, "filters", g.Filters) + populate(objectMap, "order", g.Order) + populate(objectMap, "predicates", g.Predicates) + populate(objectMap, "ssoEnabled", g.SsoEnabled) + populate(objectMap, "tags", g.Tags) + populate(objectMap, "title", g.Title) + populate(objectMap, "tokenRelay", g.TokenRelay) + populate(objectMap, "uri", g.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayAPIRoute. +func (g *GatewayAPIRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &g.Description) + delete(rawMsg, key) + case "filters": + err = unpopulate(val, "Filters", &g.Filters) + delete(rawMsg, key) + case "order": + err = unpopulate(val, "Order", &g.Order) + delete(rawMsg, key) + case "predicates": + err = unpopulate(val, "Predicates", &g.Predicates) + delete(rawMsg, key) + case "ssoEnabled": + err = unpopulate(val, "SsoEnabled", &g.SsoEnabled) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &g.Tags) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &g.Title) + delete(rawMsg, key) + case "tokenRelay": + err = unpopulate(val, "TokenRelay", &g.TokenRelay) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &g.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayCorsProperties. +func (g GatewayCorsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowCredentials", g.AllowCredentials) + populate(objectMap, "allowedHeaders", g.AllowedHeaders) + populate(objectMap, "allowedMethods", g.AllowedMethods) + populate(objectMap, "allowedOriginPatterns", g.AllowedOriginPatterns) + populate(objectMap, "allowedOrigins", g.AllowedOrigins) + populate(objectMap, "exposedHeaders", g.ExposedHeaders) + populate(objectMap, "maxAge", g.MaxAge) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCorsProperties. +func (g *GatewayCorsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowCredentials": + err = unpopulate(val, "AllowCredentials", &g.AllowCredentials) + delete(rawMsg, key) + case "allowedHeaders": + err = unpopulate(val, "AllowedHeaders", &g.AllowedHeaders) + delete(rawMsg, key) + case "allowedMethods": + err = unpopulate(val, "AllowedMethods", &g.AllowedMethods) + delete(rawMsg, key) + case "allowedOriginPatterns": + err = unpopulate(val, "AllowedOriginPatterns", &g.AllowedOriginPatterns) + delete(rawMsg, key) + case "allowedOrigins": + err = unpopulate(val, "AllowedOrigins", &g.AllowedOrigins) + delete(rawMsg, key) + case "exposedHeaders": + err = unpopulate(val, "ExposedHeaders", &g.ExposedHeaders) + delete(rawMsg, key) + case "maxAge": + err = unpopulate(val, "MaxAge", &g.MaxAge) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainProperties. +func (g GatewayCustomDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "thumbprint", g.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCustomDomainProperties. +func (g *GatewayCustomDomainProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "thumbprint": + err = unpopulate(val, "Thumbprint", &g.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainResource. +func (g GatewayCustomDomainResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "systemData", g.SystemData) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCustomDomainResource. +func (g *GatewayCustomDomainResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &g.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayCustomDomainResourceCollection. +func (g GatewayCustomDomainResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCustomDomainResourceCollection. +func (g *GatewayCustomDomainResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayInstance. +func (g GatewayInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", g.Name) + populate(objectMap, "status", g.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayInstance. +func (g *GatewayInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &g.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayOperatorProperties. +func (g GatewayOperatorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instances", g.Instances) + populate(objectMap, "resourceRequests", g.ResourceRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayOperatorProperties. +func (g *GatewayOperatorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instances": + err = unpopulate(val, "Instances", &g.Instances) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &g.ResourceRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayOperatorResourceRequests. +func (g GatewayOperatorResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", g.CPU) + populate(objectMap, "instanceCount", g.InstanceCount) + populate(objectMap, "memory", g.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayOperatorResourceRequests. +func (g *GatewayOperatorResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &g.CPU) + delete(rawMsg, key) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &g.InstanceCount) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &g.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayProperties. +func (g GatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiMetadataProperties", g.APIMetadataProperties) + populate(objectMap, "apms", g.Apms) + populate(objectMap, "clientAuth", g.ClientAuth) + populate(objectMap, "corsProperties", g.CorsProperties) + populate(objectMap, "environmentVariables", g.EnvironmentVariables) + populate(objectMap, "httpsOnly", g.HTTPSOnly) + populate(objectMap, "instances", g.Instances) + populate(objectMap, "operatorProperties", g.OperatorProperties) + populate(objectMap, "provisioningState", g.ProvisioningState) + populate(objectMap, "public", g.Public) + populate(objectMap, "resourceRequests", g.ResourceRequests) + populate(objectMap, "ssoProperties", g.SsoProperties) + populate(objectMap, "url", g.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayProperties. +func (g *GatewayProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiMetadataProperties": + err = unpopulate(val, "APIMetadataProperties", &g.APIMetadataProperties) + delete(rawMsg, key) + case "apms": + err = unpopulate(val, "Apms", &g.Apms) + delete(rawMsg, key) + case "clientAuth": + err = unpopulate(val, "ClientAuth", &g.ClientAuth) + delete(rawMsg, key) + case "corsProperties": + err = unpopulate(val, "CorsProperties", &g.CorsProperties) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &g.EnvironmentVariables) + delete(rawMsg, key) + case "httpsOnly": + err = unpopulate(val, "HTTPSOnly", &g.HTTPSOnly) + delete(rawMsg, key) + case "instances": + err = unpopulate(val, "Instances", &g.Instances) + delete(rawMsg, key) + case "operatorProperties": + err = unpopulate(val, "OperatorProperties", &g.OperatorProperties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + delete(rawMsg, key) + case "public": + err = unpopulate(val, "Public", &g.Public) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &g.ResourceRequests) + delete(rawMsg, key) + case "ssoProperties": + err = unpopulate(val, "SsoProperties", &g.SsoProperties) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &g.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayPropertiesClientAuth. +func (g GatewayPropertiesClientAuth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateVerification", g.CertificateVerification) + populate(objectMap, "certificates", g.Certificates) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayPropertiesClientAuth. +func (g *GatewayPropertiesClientAuth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateVerification": + err = unpopulate(val, "CertificateVerification", &g.CertificateVerification) + delete(rawMsg, key) + case "certificates": + err = unpopulate(val, "Certificates", &g.Certificates) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayPropertiesEnvironmentVariables. +func (g GatewayPropertiesEnvironmentVariables) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "secrets", g.Secrets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayPropertiesEnvironmentVariables. +func (g *GatewayPropertiesEnvironmentVariables) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &g.Secrets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayResource. +func (g GatewayResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "sku", g.SKU) + populate(objectMap, "systemData", g.SystemData) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResource. +func (g *GatewayResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &g.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &g.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayResourceCollection. +func (g GatewayResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResourceCollection. +func (g *GatewayResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayResourceRequests. +func (g GatewayResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", g.CPU) + populate(objectMap, "memory", g.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayResourceRequests. +func (g *GatewayResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &g.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &g.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigOpenAPIProperties. +func (g GatewayRouteConfigOpenAPIProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "uri", g.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRouteConfigOpenAPIProperties. +func (g *GatewayRouteConfigOpenAPIProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "uri": + err = unpopulate(val, "URI", &g.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigProperties. +func (g GatewayRouteConfigProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appResourceId", g.AppResourceID) + populate(objectMap, "filters", g.Filters) + populate(objectMap, "openApi", g.OpenAPI) + populate(objectMap, "predicates", g.Predicates) + populate(objectMap, "protocol", g.Protocol) + populate(objectMap, "provisioningState", g.ProvisioningState) + populate(objectMap, "routes", g.Routes) + populate(objectMap, "ssoEnabled", g.SsoEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRouteConfigProperties. +func (g *GatewayRouteConfigProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appResourceId": + err = unpopulate(val, "AppResourceID", &g.AppResourceID) + delete(rawMsg, key) + case "filters": + err = unpopulate(val, "Filters", &g.Filters) + delete(rawMsg, key) + case "openApi": + err = unpopulate(val, "OpenAPI", &g.OpenAPI) + delete(rawMsg, key) + case "predicates": + err = unpopulate(val, "Predicates", &g.Predicates) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &g.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &g.Routes) + delete(rawMsg, key) + case "ssoEnabled": + err = unpopulate(val, "SsoEnabled", &g.SsoEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigResource. +func (g GatewayRouteConfigResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "systemData", g.SystemData) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRouteConfigResource. +func (g *GatewayRouteConfigResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &g.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigResourceCollection. +func (g GatewayRouteConfigResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRouteConfigResourceCollection. +func (g *GatewayRouteConfigResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitPatternRepository. +func (g GitPatternRepository) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostKey", g.HostKey) + populate(objectMap, "hostKeyAlgorithm", g.HostKeyAlgorithm) + populate(objectMap, "label", g.Label) + populate(objectMap, "name", g.Name) + populate(objectMap, "password", g.Password) + populate(objectMap, "pattern", g.Pattern) + populate(objectMap, "privateKey", g.PrivateKey) + populate(objectMap, "searchPaths", g.SearchPaths) + populate(objectMap, "strictHostKeyChecking", g.StrictHostKeyChecking) + populate(objectMap, "uri", g.URI) + populate(objectMap, "username", g.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitPatternRepository. +func (g *GitPatternRepository) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostKey": + err = unpopulate(val, "HostKey", &g.HostKey) + delete(rawMsg, key) + case "hostKeyAlgorithm": + err = unpopulate(val, "HostKeyAlgorithm", &g.HostKeyAlgorithm) + delete(rawMsg, key) + case "label": + err = unpopulate(val, "Label", &g.Label) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &g.Password) + delete(rawMsg, key) + case "pattern": + err = unpopulate(val, "Pattern", &g.Pattern) + delete(rawMsg, key) + case "privateKey": + err = unpopulate(val, "PrivateKey", &g.PrivateKey) + delete(rawMsg, key) + case "searchPaths": + err = unpopulate(val, "SearchPaths", &g.SearchPaths) + delete(rawMsg, key) + case "strictHostKeyChecking": + err = unpopulate(val, "StrictHostKeyChecking", &g.StrictHostKeyChecking) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &g.URI) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &g.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GloballyEnabledApms. +func (g GloballyEnabledApms) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GloballyEnabledApms. +func (g *GloballyEnabledApms) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPGetAction. +func (h HTTPGetAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "path", h.Path) + populate(objectMap, "scheme", h.Scheme) + objectMap["type"] = ProbeActionTypeHTTPGetAction + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPGetAction. +func (h *HTTPGetAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "path": + err = unpopulate(val, "Path", &h.Path) + delete(rawMsg, key) + case "scheme": + err = unpopulate(val, "Scheme", &h.Scheme) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageRegistryCredential. +func (i ImageRegistryCredential) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "password", i.Password) + populate(objectMap, "username", i.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageRegistryCredential. +func (i *ImageRegistryCredential) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "password": + err = unpopulate(val, "Password", &i.Password) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &i.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IngressConfig. +func (i IngressConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "readTimeoutInSeconds", i.ReadTimeoutInSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IngressConfig. +func (i *IngressConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "readTimeoutInSeconds": + err = unpopulate(val, "ReadTimeoutInSeconds", &i.ReadTimeoutInSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IngressSettings. +func (i IngressSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendProtocol", i.BackendProtocol) + populate(objectMap, "clientAuth", i.ClientAuth) + populate(objectMap, "readTimeoutInSeconds", i.ReadTimeoutInSeconds) + populate(objectMap, "sendTimeoutInSeconds", i.SendTimeoutInSeconds) + populate(objectMap, "sessionAffinity", i.SessionAffinity) + populate(objectMap, "sessionCookieMaxAge", i.SessionCookieMaxAge) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IngressSettings. +func (i *IngressSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendProtocol": + err = unpopulate(val, "BackendProtocol", &i.BackendProtocol) + delete(rawMsg, key) + case "clientAuth": + err = unpopulate(val, "ClientAuth", &i.ClientAuth) + delete(rawMsg, key) + case "readTimeoutInSeconds": + err = unpopulate(val, "ReadTimeoutInSeconds", &i.ReadTimeoutInSeconds) + delete(rawMsg, key) + case "sendTimeoutInSeconds": + err = unpopulate(val, "SendTimeoutInSeconds", &i.SendTimeoutInSeconds) + delete(rawMsg, key) + case "sessionAffinity": + err = unpopulate(val, "SessionAffinity", &i.SessionAffinity) + delete(rawMsg, key) + case "sessionCookieMaxAge": + err = unpopulate(val, "SessionCookieMaxAge", &i.SessionCookieMaxAge) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IngressSettingsClientAuth. +func (i IngressSettingsClientAuth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificates", i.Certificates) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IngressSettingsClientAuth. +func (i *IngressSettingsClientAuth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificates": + err = unpopulate(val, "Certificates", &i.Certificates) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JarUploadedUserSourceInfo. +func (j JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jvmOptions", j.JvmOptions) + populate(objectMap, "relativePath", j.RelativePath) + populate(objectMap, "runtimeVersion", j.RuntimeVersion) + objectMap["type"] = "Jar" + populate(objectMap, "version", j.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JarUploadedUserSourceInfo. +func (j *JarUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jvmOptions": + err = unpopulate(val, "JvmOptions", &j.JvmOptions) + delete(rawMsg, key) + case "relativePath": + err = unpopulate(val, "RelativePath", &j.RelativePath) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &j.RuntimeVersion) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &j.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateProperties. +func (k KeyVaultCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activateDate", k.ActivateDate) + populate(objectMap, "autoSync", k.AutoSync) + populate(objectMap, "certVersion", k.CertVersion) + populate(objectMap, "dnsNames", k.DNSNames) + populate(objectMap, "excludePrivateKey", k.ExcludePrivateKey) + populate(objectMap, "expirationDate", k.ExpirationDate) + populate(objectMap, "issuedDate", k.IssuedDate) + populate(objectMap, "issuer", k.Issuer) + populate(objectMap, "keyVaultCertName", k.KeyVaultCertName) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "subjectName", k.SubjectName) + populate(objectMap, "thumbprint", k.Thumbprint) + objectMap["type"] = "KeyVaultCertificate" + populate(objectMap, "vaultUri", k.VaultURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateProperties. +func (k *KeyVaultCertificateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activateDate": + err = unpopulate(val, "ActivateDate", &k.ActivateDate) + delete(rawMsg, key) + case "autoSync": + err = unpopulate(val, "AutoSync", &k.AutoSync) + delete(rawMsg, key) + case "certVersion": + err = unpopulate(val, "CertVersion", &k.CertVersion) + delete(rawMsg, key) + case "dnsNames": + err = unpopulate(val, "DNSNames", &k.DNSNames) + delete(rawMsg, key) + case "excludePrivateKey": + err = unpopulate(val, "ExcludePrivateKey", &k.ExcludePrivateKey) + delete(rawMsg, key) + case "expirationDate": + err = unpopulate(val, "ExpirationDate", &k.ExpirationDate) + delete(rawMsg, key) + case "issuedDate": + err = unpopulate(val, "IssuedDate", &k.IssuedDate) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &k.Issuer) + delete(rawMsg, key) + case "keyVaultCertName": + err = unpopulate(val, "KeyVaultCertName", &k.KeyVaultCertName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "subjectName": + err = unpopulate(val, "SubjectName", &k.SubjectName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &k.Thumbprint) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + case "vaultUri": + err = unpopulate(val, "VaultURI", &k.VaultURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadedCertificate. +func (l LoadedCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "loadTrustStore", l.LoadTrustStore) + populate(objectMap, "resourceId", l.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadedCertificate. +func (l *LoadedCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "loadTrustStore": + err = unpopulate(val, "LoadTrustStore", &l.LoadTrustStore) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &l.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogFileURLResponse. +func (l LogFileURLResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "url", l.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogFileURLResponse. +func (l *LogFileURLResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "url": + err = unpopulate(val, "URL", &l.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", l.BlobDuration) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &l.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentityProperties. +func (m ManagedIdentityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityProperties. +func (m *ManagedIdentityProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MarketplaceResource. +func (m MarketplaceResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "plan", m.Plan) + populate(objectMap, "product", m.Product) + populate(objectMap, "publisher", m.Publisher) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceResource. +func (m *MarketplaceResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "plan": + err = unpopulate(val, "Plan", &m.Plan) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &m.Product) + delete(rawMsg, key) + case "publisher": + err = unpopulate(val, "Publisher", &m.Publisher) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricDimension. +func (m MetricDimension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "name", m.Name) + populate(objectMap, "toBeExportedForShoebox", m.ToBeExportedForShoebox) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricDimension. +func (m *MetricDimension) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "toBeExportedForShoebox": + err = unpopulate(val, "ToBeExportedForShoebox", &m.ToBeExportedForShoebox) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "category", m.Category) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "name", m.Name) + populate(objectMap, "sourceMdmNamespace", m.SourceMdmNamespace) + populate(objectMap, "supportedAggregationTypes", m.SupportedAggregationTypes) + populate(objectMap, "supportedTimeGrainTypes", m.SupportedTimeGrainTypes) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &m.Category) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "fillGapWithZero": + err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "sourceMdmNamespace": + err = unpopulate(val, "SourceMdmNamespace", &m.SourceMdmNamespace) + delete(rawMsg, key) + case "supportedAggregationTypes": + err = unpopulate(val, "SupportedAggregationTypes", &m.SupportedAggregationTypes) + delete(rawMsg, key) + case "supportedTimeGrainTypes": + err = unpopulate(val, "SupportedTimeGrainTypes", &m.SupportedTimeGrainTypes) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitoringSettingProperties. +func (m MonitoringSettingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appInsightsAgentVersions", m.AppInsightsAgentVersions) + populate(objectMap, "appInsightsInstrumentationKey", m.AppInsightsInstrumentationKey) + populate(objectMap, "appInsightsSamplingRate", m.AppInsightsSamplingRate) + populate(objectMap, "error", m.Error) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "traceEnabled", m.TraceEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringSettingProperties. +func (m *MonitoringSettingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsAgentVersions": + err = unpopulate(val, "AppInsightsAgentVersions", &m.AppInsightsAgentVersions) + delete(rawMsg, key) + case "appInsightsInstrumentationKey": + err = unpopulate(val, "AppInsightsInstrumentationKey", &m.AppInsightsInstrumentationKey) + delete(rawMsg, key) + case "appInsightsSamplingRate": + err = unpopulate(val, "AppInsightsSamplingRate", &m.AppInsightsSamplingRate) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &m.Error) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "traceEnabled": + err = unpopulate(val, "TraceEnabled", &m.TraceEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitoringSettingResource. +func (m MonitoringSettingResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringSettingResource. +func (m *MonitoringSettingResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NameAvailability. +func (n NameAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", n.Message) + populate(objectMap, "nameAvailable", n.NameAvailable) + populate(objectMap, "reason", n.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailability. +func (n *NameAvailability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &n.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &n.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &n.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NameAvailabilityParameters. +func (n NameAvailabilityParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", n.Name) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityParameters. +func (n *NameAvailabilityParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetCoreZipUploadedUserSourceInfo. +func (n NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "netCoreMainEntryPath", n.NetCoreMainEntryPath) + populate(objectMap, "relativePath", n.RelativePath) + populate(objectMap, "runtimeVersion", n.RuntimeVersion) + objectMap["type"] = "NetCoreZip" + populate(objectMap, "version", n.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetCoreZipUploadedUserSourceInfo. +func (n *NetCoreZipUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "netCoreMainEntryPath": + err = unpopulate(val, "NetCoreMainEntryPath", &n.NetCoreMainEntryPath) + delete(rawMsg, key) + case "relativePath": + err = unpopulate(val, "RelativePath", &n.RelativePath) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &n.RuntimeVersion) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &n.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkProfile. +func (n NetworkProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appNetworkResourceGroup", n.AppNetworkResourceGroup) + populate(objectMap, "appSubnetId", n.AppSubnetID) + populate(objectMap, "ingressConfig", n.IngressConfig) + populate(objectMap, "outboundIPs", n.OutboundIPs) + populate(objectMap, "outboundType", n.OutboundType) + populate(objectMap, "requiredTraffics", n.RequiredTraffics) + populate(objectMap, "serviceCidr", n.ServiceCidr) + populate(objectMap, "serviceRuntimeNetworkResourceGroup", n.ServiceRuntimeNetworkResourceGroup) + populate(objectMap, "serviceRuntimeSubnetId", n.ServiceRuntimeSubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile. +func (n *NetworkProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appNetworkResourceGroup": + err = unpopulate(val, "AppNetworkResourceGroup", &n.AppNetworkResourceGroup) + delete(rawMsg, key) + case "appSubnetId": + err = unpopulate(val, "AppSubnetID", &n.AppSubnetID) + delete(rawMsg, key) + case "ingressConfig": + err = unpopulate(val, "IngressConfig", &n.IngressConfig) + delete(rawMsg, key) + case "outboundIPs": + err = unpopulate(val, "OutboundIPs", &n.OutboundIPs) + delete(rawMsg, key) + case "outboundType": + err = unpopulate(val, "OutboundType", &n.OutboundType) + delete(rawMsg, key) + case "requiredTraffics": + err = unpopulate(val, "RequiredTraffics", &n.RequiredTraffics) + delete(rawMsg, key) + case "serviceCidr": + err = unpopulate(val, "ServiceCidr", &n.ServiceCidr) + delete(rawMsg, key) + case "serviceRuntimeNetworkResourceGroup": + err = unpopulate(val, "ServiceRuntimeNetworkResourceGroup", &n.ServiceRuntimeNetworkResourceGroup) + delete(rawMsg, key) + case "serviceRuntimeSubnetId": + err = unpopulate(val, "ServiceRuntimeSubnetID", &n.ServiceRuntimeSubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkProfileOutboundIPs. +func (n NetworkProfileOutboundIPs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "publicIPs", n.PublicIPs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileOutboundIPs. +func (n *NetworkProfileOutboundIPs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publicIPs": + err = unpopulate(val, "PublicIPs", &n.PublicIPs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDetail. +func (o OperationDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionType", o.ActionType) + populate(objectMap, "display", o.Display) + populate(objectMap, "isDataAction", o.IsDataAction) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + populate(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDetail. +func (o *OperationDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &o.ActionType) + delete(rawMsg, key) + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &o.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationProperties. +func (o OperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. +func (o *OperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PersistentDisk. +func (p PersistentDisk) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "mountPath", p.MountPath) + populate(objectMap, "sizeInGB", p.SizeInGB) + populate(objectMap, "usedInGB", p.UsedInGB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PersistentDisk. +func (p *PersistentDisk) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mountPath": + err = unpopulate(val, "MountPath", &p.MountPath) + delete(rawMsg, key) + case "sizeInGB": + err = unpopulate(val, "SizeInGB", &p.SizeInGB) + delete(rawMsg, key) + case "usedInGB": + err = unpopulate(val, "UsedInGB", &p.UsedInGB) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PredefinedAcceleratorProperties. +func (p PredefinedAcceleratorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "acceleratorTags", p.AcceleratorTags) + populate(objectMap, "description", p.Description) + populate(objectMap, "displayName", p.DisplayName) + populate(objectMap, "iconUrl", p.IconURL) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "state", p.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PredefinedAcceleratorProperties. +func (p *PredefinedAcceleratorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acceleratorTags": + err = unpopulate(val, "AcceleratorTags", &p.AcceleratorTags) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &p.DisplayName) + delete(rawMsg, key) + case "iconUrl": + err = unpopulate(val, "IconURL", &p.IconURL) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PredefinedAcceleratorResource. +func (p PredefinedAcceleratorResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PredefinedAcceleratorResource. +func (p *PredefinedAcceleratorResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PredefinedAcceleratorResourceCollection. +func (p PredefinedAcceleratorResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PredefinedAcceleratorResourceCollection. +func (p *PredefinedAcceleratorResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Probe. +func (p Probe) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disableProbe", p.DisableProbe) + populate(objectMap, "failureThreshold", p.FailureThreshold) + populate(objectMap, "initialDelaySeconds", p.InitialDelaySeconds) + populate(objectMap, "periodSeconds", p.PeriodSeconds) + populate(objectMap, "probeAction", p.ProbeAction) + populate(objectMap, "successThreshold", p.SuccessThreshold) + populate(objectMap, "timeoutSeconds", p.TimeoutSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Probe. +func (p *Probe) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disableProbe": + err = unpopulate(val, "DisableProbe", &p.DisableProbe) + delete(rawMsg, key) + case "failureThreshold": + err = unpopulate(val, "FailureThreshold", &p.FailureThreshold) + delete(rawMsg, key) + case "initialDelaySeconds": + err = unpopulate(val, "InitialDelaySeconds", &p.InitialDelaySeconds) + delete(rawMsg, key) + case "periodSeconds": + err = unpopulate(val, "PeriodSeconds", &p.PeriodSeconds) + delete(rawMsg, key) + case "probeAction": + p.ProbeAction, err = unmarshalProbeActionClassification(val) + delete(rawMsg, key) + case "successThreshold": + err = unpopulate(val, "SuccessThreshold", &p.SuccessThreshold) + delete(rawMsg, key) + case "timeoutSeconds": + err = unpopulate(val, "TimeoutSeconds", &p.TimeoutSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProbeAction. +func (p ProbeAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = p.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProbeAction. +func (p *ProbeAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProxyResource. +func (p ProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. +func (p *ProxyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegenerateTestKeyRequestPayload. +func (r RegenerateTestKeyRequestPayload) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyType", r.KeyType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateTestKeyRequestPayload. +func (r *RegenerateTestKeyRequestPayload) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyType": + err = unpopulate(val, "KeyType", &r.KeyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemoteDebugging. +func (r RemoteDebugging) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", r.Enabled) + populate(objectMap, "port", r.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemoteDebugging. +func (r *RemoteDebugging) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &r.Enabled) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &r.Port) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemoteDebuggingPayload. +func (r RemoteDebuggingPayload) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "port", r.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemoteDebuggingPayload. +func (r *RemoteDebuggingPayload) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "port": + err = unpopulate(val, "Port", &r.Port) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequiredTraffic. +func (r RequiredTraffic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "direction", r.Direction) + populate(objectMap, "fqdns", r.Fqdns) + populate(objectMap, "ips", r.IPs) + populate(objectMap, "port", r.Port) + populate(objectMap, "protocol", r.Protocol) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequiredTraffic. +func (r *RequiredTraffic) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "direction": + err = unpopulate(val, "Direction", &r.Direction) + delete(rawMsg, key) + case "fqdns": + err = unpopulate(val, "Fqdns", &r.Fqdns) + delete(rawMsg, key) + case "ips": + err = unpopulate(val, "IPs", &r.IPs) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &r.Port) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &r.Protocol) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceRequests. +func (r ResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", r.CPU) + populate(objectMap, "memory", r.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceRequests. +func (r *ResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &r.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &r.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKU. +func (r ResourceSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", r.Capacity) + populate(objectMap, "locationInfo", r.LocationInfo) + populate(objectMap, "locations", r.Locations) + populate(objectMap, "name", r.Name) + populate(objectMap, "resourceType", r.ResourceType) + populate(objectMap, "restrictions", r.Restrictions) + populate(objectMap, "tier", r.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU. +func (r *ResourceSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &r.Capacity) + delete(rawMsg, key) + case "locationInfo": + err = unpopulate(val, "LocationInfo", &r.LocationInfo) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &r.Locations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &r.ResourceType) + delete(rawMsg, key) + case "restrictions": + err = unpopulate(val, "Restrictions", &r.Restrictions) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &r.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities. +func (r ResourceSKUCapabilities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", r.Name) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapabilities. +func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKUCollection. +func (r ResourceSKUCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCollection. +func (r *ResourceSKUCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo. +func (r ResourceSKULocationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", r.Location) + populate(objectMap, "zoneDetails", r.ZoneDetails) + populate(objectMap, "zones", r.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKULocationInfo. +func (r *ResourceSKULocationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "zoneDetails": + err = unpopulate(val, "ZoneDetails", &r.ZoneDetails) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &r.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictionInfo. +func (r ResourceSKURestrictionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "locations", r.Locations) + populate(objectMap, "zones", r.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKURestrictionInfo. +func (r *ResourceSKURestrictionInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "locations": + err = unpopulate(val, "Locations", &r.Locations) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &r.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictions. +func (r ResourceSKURestrictions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "reasonCode", r.ReasonCode) + populate(objectMap, "restrictionInfo", r.RestrictionInfo) + populate(objectMap, "type", r.Type) + populate(objectMap, "values", r.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKURestrictions. +func (r *ResourceSKURestrictions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "reasonCode": + err = unpopulate(val, "ReasonCode", &r.ReasonCode) + delete(rawMsg, key) + case "restrictionInfo": + err = unpopulate(val, "RestrictionInfo", &r.RestrictionInfo) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &r.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKUZoneDetails. +func (r ResourceSKUZoneDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capabilities", r.Capabilities) + populate(objectMap, "name", r.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUZoneDetails. +func (r *ResourceSKUZoneDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capabilities": + err = unpopulate(val, "Capabilities", &r.Capabilities) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceUploadDefinition. +func (r ResourceUploadDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "relativePath", r.RelativePath) + populate(objectMap, "uploadUrl", r.UploadURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUploadDefinition. +func (r *ResourceUploadDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "relativePath": + err = unpopulate(val, "RelativePath", &r.RelativePath) + delete(rawMsg, key) + case "uploadUrl": + err = unpopulate(val, "UploadURL", &r.UploadURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKU. +func (s SKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "name", s.Name) + populate(objectMap, "tier", s.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. +func (s *SKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUCapacity. +func (s SKUCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "default", s.Default) + populate(objectMap, "maximum", s.Maximum) + populate(objectMap, "minimum", s.Minimum) + populate(objectMap, "scaleType", s.ScaleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity. +func (s *SKUCapacity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &s.Default) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &s.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &s.Minimum) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &s.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUObject. +func (s SKUObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sku", s.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUObject. +func (s *SKUObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceRegistryInstance. +func (s ServiceRegistryInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + populate(objectMap, "status", s.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegistryInstance. +func (s *ServiceRegistryInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceRegistryProperties. +func (s ServiceRegistryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instances", s.Instances) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "resourceRequests", s.ResourceRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegistryProperties. +func (s *ServiceRegistryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instances": + err = unpopulate(val, "Instances", &s.Instances) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "resourceRequests": + err = unpopulate(val, "ResourceRequests", &s.ResourceRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResource. +func (s ServiceRegistryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegistryResource. +func (s *ServiceRegistryResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResourceCollection. +func (s ServiceRegistryResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegistryResourceCollection. +func (s *ServiceRegistryResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceRegistryResourceRequests. +func (s ServiceRegistryResourceRequests) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", s.CPU) + populate(objectMap, "instanceCount", s.InstanceCount) + populate(objectMap, "memory", s.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceRegistryResourceRequests. +func (s *ServiceRegistryResourceRequests) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &s.CPU) + delete(rawMsg, key) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &s.InstanceCount) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &s.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceResource. +func (s ServiceResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResource. +func (s *ServiceResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceResourceList. +func (s ServiceResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceList. +func (s *ServiceResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", s.LogSpecifications) + populate(objectMap, "metricSpecifications", s.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceVNetAddons. +func (s ServiceVNetAddons) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataPlanePublicEndpoint", s.DataPlanePublicEndpoint) + populate(objectMap, "logStreamPublicEndpoint", s.LogStreamPublicEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceVNetAddons. +func (s *ServiceVNetAddons) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataPlanePublicEndpoint": + err = unpopulate(val, "DataPlanePublicEndpoint", &s.DataPlanePublicEndpoint) + delete(rawMsg, key) + case "logStreamPublicEndpoint": + err = unpopulate(val, "LogStreamPublicEndpoint", &s.LogStreamPublicEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SourceUploadedUserSourceInfo. +func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "artifactSelector", s.ArtifactSelector) + populate(objectMap, "relativePath", s.RelativePath) + populate(objectMap, "runtimeVersion", s.RuntimeVersion) + objectMap["type"] = "Source" + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SourceUploadedUserSourceInfo. +func (s *SourceUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "artifactSelector": + err = unpopulate(val, "ArtifactSelector", &s.ArtifactSelector) + delete(rawMsg, key) + case "relativePath": + err = unpopulate(val, "RelativePath", &s.RelativePath) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsoProperties. +func (s SsoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", s.ClientID) + populate(objectMap, "clientSecret", s.ClientSecret) + populate(objectMap, "issuerUri", s.IssuerURI) + populate(objectMap, "scope", s.Scope) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsoProperties. +func (s *SsoProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &s.ClientID) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &s.ClientSecret) + delete(rawMsg, key) + case "issuerUri": + err = unpopulate(val, "IssuerURI", &s.IssuerURI) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &s.Scope) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StackProperties. +func (s StackProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StackProperties. +func (s *StackProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageAccount. +func (s StorageAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accountKey", s.AccountKey) + populate(objectMap, "accountName", s.AccountName) + objectMap["storageType"] = StorageTypeStorageAccount + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccount. +func (s *StorageAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accountKey": + err = unpopulate(val, "AccountKey", &s.AccountKey) + delete(rawMsg, key) + case "accountName": + err = unpopulate(val, "AccountName", &s.AccountName) + delete(rawMsg, key) + case "storageType": + err = unpopulate(val, "StorageType", &s.StorageType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageProperties. +func (s StorageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["storageType"] = s.StorageType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageProperties. +func (s *StorageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "storageType": + err = unpopulate(val, "StorageType", &s.StorageType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageResource. +func (s StorageResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageResource. +func (s *StorageResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + s.Properties, err = unmarshalStoragePropertiesClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageResourceCollection. +func (s StorageResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageResourceCollection. +func (s *StorageResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedApmType. +func (s SupportedApmType) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedApmType. +func (s *SupportedApmType) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedApmTypes. +func (s SupportedApmTypes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedApmTypes. +func (s *SupportedApmTypes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedBuildpackResource. +func (s SupportedBuildpackResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedBuildpackResource. +func (s *SupportedBuildpackResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedBuildpackResourceProperties. +func (s SupportedBuildpackResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "buildpackId", s.BuildpackID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedBuildpackResourceProperties. +func (s *SupportedBuildpackResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "buildpackId": + err = unpopulate(val, "BuildpackID", &s.BuildpackID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedBuildpacksCollection. +func (s SupportedBuildpacksCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedBuildpacksCollection. +func (s *SupportedBuildpacksCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedRuntimeVersion. +func (s SupportedRuntimeVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "platform", s.Platform) + populate(objectMap, "value", s.Value) + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedRuntimeVersion. +func (s *SupportedRuntimeVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "platform": + err = unpopulate(val, "Platform", &s.Platform) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedServerVersion. +func (s SupportedServerVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "server", s.Server) + populate(objectMap, "value", s.Value) + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedServerVersion. +func (s *SupportedServerVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "server": + err = unpopulate(val, "Server", &s.Server) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedServerVersions. +func (s SupportedServerVersions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedServerVersions. +func (s *SupportedServerVersions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedStackResource. +func (s SupportedStackResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedStackResource. +func (s *SupportedStackResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedStackResourceProperties. +func (s SupportedStackResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "stackId", s.StackID) + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedStackResourceProperties. +func (s *SupportedStackResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "stackId": + err = unpopulate(val, "StackID", &s.StackID) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedStacksCollection. +func (s SupportedStacksCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedStacksCollection. +func (s *SupportedStacksCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TCPSocketAction. +func (t TCPSocketAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = ProbeActionTypeTCPSocketAction + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TCPSocketAction. +func (t *TCPSocketAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TemporaryDisk. +func (t TemporaryDisk) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "mountPath", t.MountPath) + populate(objectMap, "sizeInGB", t.SizeInGB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TemporaryDisk. +func (t *TemporaryDisk) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mountPath": + err = unpopulate(val, "MountPath", &t.MountPath) + delete(rawMsg, key) + case "sizeInGB": + err = unpopulate(val, "SizeInGB", &t.SizeInGB) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestKeys. +func (t TestKeys) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", t.Enabled) + populate(objectMap, "primaryKey", t.PrimaryKey) + populate(objectMap, "primaryTestEndpoint", t.PrimaryTestEndpoint) + populate(objectMap, "secondaryKey", t.SecondaryKey) + populate(objectMap, "secondaryTestEndpoint", t.SecondaryTestEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestKeys. +func (t *TestKeys) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &t.Enabled) + delete(rawMsg, key) + case "primaryKey": + err = unpopulate(val, "PrimaryKey", &t.PrimaryKey) + delete(rawMsg, key) + case "primaryTestEndpoint": + err = unpopulate(val, "PrimaryTestEndpoint", &t.PrimaryTestEndpoint) + delete(rawMsg, key) + case "secondaryKey": + err = unpopulate(val, "SecondaryKey", &t.SecondaryKey) + delete(rawMsg, key) + case "secondaryTestEndpoint": + err = unpopulate(val, "SecondaryTestEndpoint", &t.SecondaryTestEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrackedResource. +func (t TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "location", t.Location) + populate(objectMap, "name", t.Name) + populate(objectMap, "systemData", t.SystemData) + populate(objectMap, "tags", t.Tags) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource. +func (t *TrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &t.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &t.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &t.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredBuildResult. +func (t TriggeredBuildResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "image", t.Image) + populate(objectMap, "lastTransitionReason", t.LastTransitionReason) + populate(objectMap, "lastTransitionStatus", t.LastTransitionStatus) + populateDateTimeRFC3339(objectMap, "lastTransitionTime", t.LastTransitionTime) + populate(objectMap, "provisioningState", t.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredBuildResult. +func (t *TriggeredBuildResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &t.Image) + delete(rawMsg, key) + case "lastTransitionReason": + err = unpopulate(val, "LastTransitionReason", &t.LastTransitionReason) + delete(rawMsg, key) + case "lastTransitionStatus": + err = unpopulate(val, "LastTransitionStatus", &t.LastTransitionStatus) + delete(rawMsg, key) + case "lastTransitionTime": + err = unpopulateDateTimeRFC3339(val, "LastTransitionTime", &t.LastTransitionTime) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &t.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UploadedUserSourceInfo. +func (u UploadedUserSourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "relativePath", u.RelativePath) + objectMap["type"] = "UploadedUserSourceInfo" + populate(objectMap, "version", u.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UploadedUserSourceInfo. +func (u *UploadedUserSourceInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "relativePath": + err = unpopulate(val, "RelativePath", &u.RelativePath) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &u.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedManagedIdentity. +func (u UserAssignedManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedManagedIdentity. +func (u *UserAssignedManagedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserSourceInfo. +func (u UserSourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = u.Type + populate(objectMap, "version", u.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserSourceInfo. +func (u *UserSourceInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &u.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidationMessages. +func (v ValidationMessages) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "messages", v.Messages) + populate(objectMap, "name", v.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidationMessages. +func (v *ValidationMessages) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "messages": + err = unpopulate(val, "Messages", &v.Messages) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WarUploadedUserSourceInfo. +func (w WarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jvmOptions", w.JvmOptions) + populate(objectMap, "relativePath", w.RelativePath) + populate(objectMap, "runtimeVersion", w.RuntimeVersion) + populate(objectMap, "serverVersion", w.ServerVersion) + objectMap["type"] = "War" + populate(objectMap, "version", w.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WarUploadedUserSourceInfo. +func (w *WarUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jvmOptions": + err = unpopulate(val, "JvmOptions", &w.JvmOptions) + delete(rawMsg, key) + case "relativePath": + err = unpopulate(val, "RelativePath", &w.RelativePath) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &w.RuntimeVersion) + delete(rawMsg, key) + case "serverVersion": + err = unpopulate(val, "ServerVersion", &w.ServerVersion) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &w.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/monitoringsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/monitoringsettings_client.go new file mode 100644 index 00000000..6e1700be --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/monitoringsettings_client.go @@ -0,0 +1,272 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// MonitoringSettingsClient contains the methods for the MonitoringSettings group. +// Don't use this type directly, use NewMonitoringSettingsClient() instead. +type MonitoringSettingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewMonitoringSettingsClient creates a new instance of MonitoringSettingsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewMonitoringSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitoringSettingsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &MonitoringSettingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get the Monitoring Setting and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - MonitoringSettingsClientGetOptions contains the optional parameters for the MonitoringSettingsClient.Get method. +func (client *MonitoringSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *MonitoringSettingsClientGetOptions) (MonitoringSettingsClientGetResponse, error) { + var err error + const operationName = "MonitoringSettingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return MonitoringSettingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MonitoringSettingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MonitoringSettingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *MonitoringSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *MonitoringSettingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *MonitoringSettingsClient) getHandleResponse(resp *http.Response) (MonitoringSettingsClientGetResponse, error) { + result := MonitoringSettingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MonitoringSettingResource); err != nil { + return MonitoringSettingsClientGetResponse{}, err + } + return result, nil +} + +// BeginUpdatePatch - Update the Monitoring Setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - monitoringSettingResource - Parameters for the update operation +// - options - MonitoringSettingsClientBeginUpdatePatchOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePatch +// method. +func (client *MonitoringSettingsClient) BeginUpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*runtime.Poller[MonitoringSettingsClientUpdatePatchResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updatePatch(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MonitoringSettingsClientUpdatePatchResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MonitoringSettingsClientUpdatePatchResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdatePatch - Update the Monitoring Setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *MonitoringSettingsClient) updatePatch(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*http.Response, error) { + var err error + const operationName = "MonitoringSettingsClient.BeginUpdatePatch" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updatePatchCreateRequest(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updatePatchCreateRequest creates the UpdatePatch request. +func (client *MonitoringSettingsClient) updatePatchCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, monitoringSettingResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdatePut - Update the Monitoring Setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - monitoringSettingResource - Parameters for the update operation +// - options - MonitoringSettingsClientBeginUpdatePutOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePut +// method. +func (client *MonitoringSettingsClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*runtime.Poller[MonitoringSettingsClientUpdatePutResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updatePut(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MonitoringSettingsClientUpdatePutResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MonitoringSettingsClientUpdatePutResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdatePut - Update the Monitoring Setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *MonitoringSettingsClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*http.Response, error) { + var err error + const operationName = "MonitoringSettingsClient.BeginUpdatePut" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updatePutCreateRequest creates the UpdatePut request. +func (client *MonitoringSettingsClient) updatePutCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, monitoringSettingResource); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/operations_client.go new file mode 100644 index 00000000..b6d752df --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/operations_client.go @@ -0,0 +1,88 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Lists all of the available REST API operations of the Microsoft.AppPlatform provider. +// +// Generated from API version 2023-12-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.AppPlatform/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AvailableOperations); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/options.go new file mode 100644 index 00000000..d86d049f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/options.go @@ -0,0 +1,989 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +// APIPortalCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginCreateOrUpdate +// method. +type APIPortalCustomDomainsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// APIPortalCustomDomainsClientBeginDeleteOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginDelete +// method. +type APIPortalCustomDomainsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// APIPortalCustomDomainsClientGetOptions contains the optional parameters for the APIPortalCustomDomainsClient.Get method. +type APIPortalCustomDomainsClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.NewListPager +// method. +type APIPortalCustomDomainsClientListOptions struct { + // placeholder for future optional parameters +} + +// APIPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalsClient.BeginCreateOrUpdate +// method. +type APIPortalsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// APIPortalsClientBeginDeleteOptions contains the optional parameters for the APIPortalsClient.BeginDelete method. +type APIPortalsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// APIPortalsClientGetOptions contains the optional parameters for the APIPortalsClient.Get method. +type APIPortalsClientGetOptions struct { + // placeholder for future optional parameters +} + +// APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.NewListPager method. +type APIPortalsClientListOptions struct { + // placeholder for future optional parameters +} + +// APIPortalsClientValidateDomainOptions contains the optional parameters for the APIPortalsClient.ValidateDomain method. +type APIPortalsClientValidateDomainOptions struct { + // placeholder for future optional parameters +} + +// ApmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApmsClient.BeginCreateOrUpdate method. +type ApmsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApmsClientBeginDeleteOptions contains the optional parameters for the ApmsClient.BeginDelete method. +type ApmsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApmsClientGetOptions contains the optional parameters for the ApmsClient.Get method. +type ApmsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApmsClientListOptions contains the optional parameters for the ApmsClient.NewListPager method. +type ApmsClientListOptions struct { + // placeholder for future optional parameters +} + +// ApmsClientListSecretKeysOptions contains the optional parameters for the ApmsClient.ListSecretKeys method. +type ApmsClientListSecretKeysOptions struct { + // placeholder for future optional parameters +} + +// ApplicationAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginCreateOrUpdate +// method. +type ApplicationAcceleratorsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationAcceleratorsClientBeginDeleteOptions contains the optional parameters for the ApplicationAcceleratorsClient.BeginDelete +// method. +type ApplicationAcceleratorsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationAcceleratorsClientGetOptions contains the optional parameters for the ApplicationAcceleratorsClient.Get method. +type ApplicationAcceleratorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationAcceleratorsClientListOptions contains the optional parameters for the ApplicationAcceleratorsClient.NewListPager +// method. +type ApplicationAcceleratorsClientListOptions struct { + // placeholder for future optional parameters +} + +// ApplicationLiveViewsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginCreateOrUpdate +// method. +type ApplicationLiveViewsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationLiveViewsClientBeginDeleteOptions contains the optional parameters for the ApplicationLiveViewsClient.BeginDelete +// method. +type ApplicationLiveViewsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationLiveViewsClientGetOptions contains the optional parameters for the ApplicationLiveViewsClient.Get method. +type ApplicationLiveViewsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationLiveViewsClientListOptions contains the optional parameters for the ApplicationLiveViewsClient.NewListPager +// method. +type ApplicationLiveViewsClientListOptions struct { + // placeholder for future optional parameters +} + +// AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate method. +type AppsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method. +type AppsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments +// method. +type AppsClientBeginSetActiveDeploymentsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method. +type AppsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AppsClientGetOptions contains the optional parameters for the AppsClient.Get method. +type AppsClientGetOptions struct { + // Indicates whether sync status + SyncStatus *string +} + +// AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL method. +type AppsClientGetResourceUploadURLOptions struct { + // placeholder for future optional parameters +} + +// AppsClientListOptions contains the optional parameters for the AppsClient.NewListPager method. +type AppsClientListOptions struct { + // placeholder for future optional parameters +} + +// AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method. +type AppsClientValidateDomainOptions struct { + // placeholder for future optional parameters +} + +// BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate method. +type BindingsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method. +type BindingsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method. +type BindingsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method. +type BindingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BindingsClientListOptions contains the optional parameters for the BindingsClient.NewListPager method. +type BindingsClientListOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceAgentPoolClientBeginUpdatePutOptions contains the optional parameters for the BuildServiceAgentPoolClient.BeginUpdatePut +// method. +type BuildServiceAgentPoolClientBeginUpdatePutOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BuildServiceAgentPoolClientGetOptions contains the optional parameters for the BuildServiceAgentPoolClient.Get method. +type BuildServiceAgentPoolClientGetOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.NewListPager +// method. +type BuildServiceAgentPoolClientListOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceBuilderClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceBuilderClient.BeginCreateOrUpdate +// method. +type BuildServiceBuilderClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BuildServiceBuilderClientBeginDeleteOptions contains the optional parameters for the BuildServiceBuilderClient.BeginDelete +// method. +type BuildServiceBuilderClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BuildServiceBuilderClientGetOptions contains the optional parameters for the BuildServiceBuilderClient.Get method. +type BuildServiceBuilderClientGetOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceBuilderClientListDeploymentsOptions contains the optional parameters for the BuildServiceBuilderClient.ListDeployments +// method. +type BuildServiceBuilderClientListDeploymentsOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.NewListPager method. +type BuildServiceBuilderClientListOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceClient.BeginCreateOrUpdate +// method. +type BuildServiceClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BuildServiceClientBeginDeleteBuildOptions contains the optional parameters for the BuildServiceClient.BeginDeleteBuild +// method. +type BuildServiceClientBeginDeleteBuildOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BuildServiceClientCreateOrUpdateBuildOptions contains the optional parameters for the BuildServiceClient.CreateOrUpdateBuild +// method. +type BuildServiceClientCreateOrUpdateBuildOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientGetBuildOptions contains the optional parameters for the BuildServiceClient.GetBuild method. +type BuildServiceClientGetBuildOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientGetBuildResultLogOptions contains the optional parameters for the BuildServiceClient.GetBuildResultLog +// method. +type BuildServiceClientGetBuildResultLogOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientGetBuildResultOptions contains the optional parameters for the BuildServiceClient.GetBuildResult method. +type BuildServiceClientGetBuildResultOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientGetBuildServiceOptions contains the optional parameters for the BuildServiceClient.GetBuildService method. +type BuildServiceClientGetBuildServiceOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientGetResourceUploadURLOptions contains the optional parameters for the BuildServiceClient.GetResourceUploadURL +// method. +type BuildServiceClientGetResourceUploadURLOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientGetSupportedBuildpackOptions contains the optional parameters for the BuildServiceClient.GetSupportedBuildpack +// method. +type BuildServiceClientGetSupportedBuildpackOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientGetSupportedStackOptions contains the optional parameters for the BuildServiceClient.GetSupportedStack +// method. +type BuildServiceClientGetSupportedStackOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.NewListBuildResultsPager +// method. +type BuildServiceClientListBuildResultsOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.NewListBuildServicesPager +// method. +type BuildServiceClientListBuildServicesOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.NewListBuildsPager method. +type BuildServiceClientListBuildsOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientListSupportedBuildpacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedBuildpacks +// method. +type BuildServiceClientListSupportedBuildpacksOptions struct { + // placeholder for future optional parameters +} + +// BuildServiceClientListSupportedStacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedStacks +// method. +type BuildServiceClientListSupportedStacksOptions struct { + // placeholder for future optional parameters +} + +// BuildpackBindingClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildpackBindingClient.BeginCreateOrUpdate +// method. +type BuildpackBindingClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BuildpackBindingClientBeginDeleteOptions contains the optional parameters for the BuildpackBindingClient.BeginDelete method. +type BuildpackBindingClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BuildpackBindingClientGetOptions contains the optional parameters for the BuildpackBindingClient.Get method. +type BuildpackBindingClientGetOptions struct { + // placeholder for future optional parameters +} + +// BuildpackBindingClientListForClusterOptions contains the optional parameters for the BuildpackBindingClient.NewListForClusterPager +// method. +type BuildpackBindingClientListForClusterOptions struct { + // placeholder for future optional parameters +} + +// BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.NewListPager method. +type BuildpackBindingClientListOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.BeginCreateOrUpdate +// method. +type CertificatesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CertificatesClientBeginDeleteOptions contains the optional parameters for the CertificatesClient.BeginDelete method. +type CertificatesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. +type CertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. +type CertificatesClientListOptions struct { + // placeholder for future optional parameters +} + +// ConfigServersClientBeginUpdatePatchOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePatch +// method. +type ConfigServersClientBeginUpdatePatchOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigServersClientBeginUpdatePutOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePut method. +type ConfigServersClientBeginUpdatePutOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigServersClientBeginValidateOptions contains the optional parameters for the ConfigServersClient.BeginValidate method. +type ConfigServersClientBeginValidateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigServersClientGetOptions contains the optional parameters for the ConfigServersClient.Get method. +type ConfigServersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate +// method. +type ConfigurationServicesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete +// method. +type ConfigurationServicesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate +// method. +type ConfigurationServicesClientBeginValidateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigurationServicesClientBeginValidateResourceOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidateResource +// method. +type ConfigurationServicesClientBeginValidateResourceOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get method. +type ConfigurationServicesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.NewListPager +// method. +type ConfigurationServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// ContainerRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerRegistriesClient.BeginCreateOrUpdate +// method. +type ContainerRegistriesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerRegistriesClientBeginDeleteOptions contains the optional parameters for the ContainerRegistriesClient.BeginDelete +// method. +type ContainerRegistriesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerRegistriesClientBeginValidateOptions contains the optional parameters for the ContainerRegistriesClient.BeginValidate +// method. +type ContainerRegistriesClientBeginValidateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerRegistriesClientGetOptions contains the optional parameters for the ContainerRegistriesClient.Get method. +type ContainerRegistriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ContainerRegistriesClientListOptions contains the optional parameters for the ContainerRegistriesClient.NewListPager method. +type ContainerRegistriesClientListOptions struct { + // placeholder for future optional parameters +} + +// CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate +// method. +type CustomDomainsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method. +type CustomDomainsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate method. +type CustomDomainsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. +type CustomDomainsClientGetOptions struct { + // placeholder for future optional parameters +} + +// CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.NewListPager method. +type CustomDomainsClientListOptions struct { + // placeholder for future optional parameters +} + +// CustomizedAcceleratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginCreateOrUpdate +// method. +type CustomizedAcceleratorsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomizedAcceleratorsClientBeginDeleteOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginDelete +// method. +type CustomizedAcceleratorsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomizedAcceleratorsClientBeginValidateOptions contains the optional parameters for the CustomizedAcceleratorsClient.BeginValidate +// method. +type CustomizedAcceleratorsClientBeginValidateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomizedAcceleratorsClientGetOptions contains the optional parameters for the CustomizedAcceleratorsClient.Get method. +type CustomizedAcceleratorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// CustomizedAcceleratorsClientListOptions contains the optional parameters for the CustomizedAcceleratorsClient.NewListPager +// method. +type CustomizedAcceleratorsClientListOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate +// method. +type DeploymentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. +type DeploymentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginDisableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginDisableRemoteDebugging +// method. +type DeploymentsClientBeginDisableRemoteDebuggingOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginEnableRemoteDebuggingOptions contains the optional parameters for the DeploymentsClient.BeginEnableRemoteDebugging +// method. +type DeploymentsClientBeginEnableRemoteDebuggingOptions struct { + // Parameters for enable remote debugging + RemoteDebuggingPayload *RemoteDebuggingPayload + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump +// method. +type DeploymentsClientBeginGenerateHeapDumpOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump +// method. +type DeploymentsClientBeginGenerateThreadDumpOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart method. +type DeploymentsClientBeginRestartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR method. +type DeploymentsClientBeginStartJFROptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method. +type DeploymentsClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method. +type DeploymentsClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. +type DeploymentsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL method. +type DeploymentsClientGetLogFileURLOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. +type DeploymentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientGetRemoteDebuggingConfigOptions contains the optional parameters for the DeploymentsClient.GetRemoteDebuggingConfig +// method. +type DeploymentsClientGetRemoteDebuggingConfigOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.NewListForClusterPager +// method. +type DeploymentsClientListForClusterOptions struct { + // The expand expression to apply on the operation. + Expand *string + + // Version of the deployments to be listed + Version []string +} + +// DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.NewListPager method. +type DeploymentsClientListOptions struct { + // Version of the deployments to be listed + Version []string +} + +// DevToolPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the DevToolPortalsClient.BeginCreateOrUpdate +// method. +type DevToolPortalsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DevToolPortalsClientBeginDeleteOptions contains the optional parameters for the DevToolPortalsClient.BeginDelete method. +type DevToolPortalsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DevToolPortalsClientGetOptions contains the optional parameters for the DevToolPortalsClient.Get method. +type DevToolPortalsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DevToolPortalsClientListOptions contains the optional parameters for the DevToolPortalsClient.NewListPager method. +type DevToolPortalsClientListOptions struct { + // placeholder for future optional parameters +} + +// GatewayCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginCreateOrUpdate +// method. +type GatewayCustomDomainsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GatewayCustomDomainsClientBeginDeleteOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginDelete +// method. +type GatewayCustomDomainsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GatewayCustomDomainsClientGetOptions contains the optional parameters for the GatewayCustomDomainsClient.Get method. +type GatewayCustomDomainsClientGetOptions struct { + // placeholder for future optional parameters +} + +// GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.NewListPager +// method. +type GatewayCustomDomainsClientListOptions struct { + // placeholder for future optional parameters +} + +// GatewayRouteConfigsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginCreateOrUpdate +// method. +type GatewayRouteConfigsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GatewayRouteConfigsClientBeginDeleteOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginDelete +// method. +type GatewayRouteConfigsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GatewayRouteConfigsClientGetOptions contains the optional parameters for the GatewayRouteConfigsClient.Get method. +type GatewayRouteConfigsClientGetOptions struct { + // placeholder for future optional parameters +} + +// GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.NewListPager method. +type GatewayRouteConfigsClientListOptions struct { + // placeholder for future optional parameters +} + +// GatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewaysClient.BeginCreateOrUpdate method. +type GatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GatewaysClientBeginDeleteOptions contains the optional parameters for the GatewaysClient.BeginDelete method. +type GatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GatewaysClientBeginRestartOptions contains the optional parameters for the GatewaysClient.BeginRestart method. +type GatewaysClientBeginRestartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GatewaysClientGetOptions contains the optional parameters for the GatewaysClient.Get method. +type GatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// GatewaysClientListEnvSecretsOptions contains the optional parameters for the GatewaysClient.ListEnvSecrets method. +type GatewaysClientListEnvSecretsOptions struct { + // placeholder for future optional parameters +} + +// GatewaysClientListOptions contains the optional parameters for the GatewaysClient.NewListPager method. +type GatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// GatewaysClientValidateDomainOptions contains the optional parameters for the GatewaysClient.ValidateDomain method. +type GatewaysClientValidateDomainOptions struct { + // placeholder for future optional parameters +} + +// MonitoringSettingsClientBeginUpdatePatchOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePatch +// method. +type MonitoringSettingsClientBeginUpdatePatchOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// MonitoringSettingsClientBeginUpdatePutOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePut +// method. +type MonitoringSettingsClientBeginUpdatePutOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// MonitoringSettingsClientGetOptions contains the optional parameters for the MonitoringSettingsClient.Get method. +type MonitoringSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PredefinedAcceleratorsClientBeginDisableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginDisable +// method. +type PredefinedAcceleratorsClientBeginDisableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PredefinedAcceleratorsClientBeginEnableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginEnable +// method. +type PredefinedAcceleratorsClientBeginEnableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PredefinedAcceleratorsClientGetOptions contains the optional parameters for the PredefinedAcceleratorsClient.Get method. +type PredefinedAcceleratorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PredefinedAcceleratorsClientListOptions contains the optional parameters for the PredefinedAcceleratorsClient.NewListPager +// method. +type PredefinedAcceleratorsClientListOptions struct { + // placeholder for future optional parameters +} + +// RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions +// method. +type RuntimeVersionsClientListRuntimeVersionsOptions struct { + // placeholder for future optional parameters +} + +// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. +type SKUsClientListOptions struct { + // placeholder for future optional parameters +} + +// ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate +// method. +type ServiceRegistriesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceRegistriesClientBeginDeleteOptions contains the optional parameters for the ServiceRegistriesClient.BeginDelete +// method. +type ServiceRegistriesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceRegistriesClientGetOptions contains the optional parameters for the ServiceRegistriesClient.Get method. +type ServiceRegistriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.NewListPager method. +type ServiceRegistriesClientListOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate method. +type ServicesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. +type ServicesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServicesClientBeginDisableApmGloballyOptions contains the optional parameters for the ServicesClient.BeginDisableApmGlobally +// method. +type ServicesClientBeginDisableApmGloballyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServicesClientBeginEnableApmGloballyOptions contains the optional parameters for the ServicesClient.BeginEnableApmGlobally +// method. +type ServicesClientBeginEnableApmGloballyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServicesClientBeginFlushVnetDNSSettingOptions contains the optional parameters for the ServicesClient.BeginFlushVnetDNSSetting +// method. +type ServicesClientBeginFlushVnetDNSSettingOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServicesClientBeginStartOptions contains the optional parameters for the ServicesClient.BeginStart method. +type ServicesClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServicesClientBeginStopOptions contains the optional parameters for the ServicesClient.BeginStop method. +type ServicesClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method. +type ServicesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability +// method. +type ServicesClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientDisableTestEndpointOptions contains the optional parameters for the ServicesClient.DisableTestEndpoint method. +type ServicesClientDisableTestEndpointOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientEnableTestEndpointOptions contains the optional parameters for the ServicesClient.EnableTestEndpoint method. +type ServicesClientEnableTestEndpointOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. +type ServicesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager +// method. +type ServicesClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientListGloballyEnabledApmsOptions contains the optional parameters for the ServicesClient.ListGloballyEnabledApms +// method. +type ServicesClientListGloballyEnabledApmsOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method. +type ServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientListSupportedApmTypesOptions contains the optional parameters for the ServicesClient.NewListSupportedApmTypesPager +// method. +type ServicesClientListSupportedApmTypesOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientListSupportedServerVersionsOptions contains the optional parameters for the ServicesClient.NewListSupportedServerVersionsPager +// method. +type ServicesClientListSupportedServerVersionsOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientListTestKeysOptions contains the optional parameters for the ServicesClient.ListTestKeys method. +type ServicesClientListTestKeysOptions struct { + // placeholder for future optional parameters +} + +// ServicesClientRegenerateTestKeyOptions contains the optional parameters for the ServicesClient.RegenerateTestKey method. +type ServicesClientRegenerateTestKeyOptions struct { + // placeholder for future optional parameters +} + +// StoragesClientBeginCreateOrUpdateOptions contains the optional parameters for the StoragesClient.BeginCreateOrUpdate method. +type StoragesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StoragesClientBeginDeleteOptions contains the optional parameters for the StoragesClient.BeginDelete method. +type StoragesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StoragesClientGetOptions contains the optional parameters for the StoragesClient.Get method. +type StoragesClientGetOptions struct { + // placeholder for future optional parameters +} + +// StoragesClientListOptions contains the optional parameters for the StoragesClient.NewListPager method. +type StoragesClientListOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/polymorphic_helpers.go new file mode 100644 index 00000000..fffbb899 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/polymorphic_helpers.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import "encoding/json" + +func unmarshalAcceleratorAuthSettingClassification(rawMsg json.RawMessage) (AcceleratorAuthSettingClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b AcceleratorAuthSettingClassification + switch m["authType"] { + case "BasicAuth": + b = &AcceleratorBasicAuthSetting{} + case "Public": + b = &AcceleratorPublicSetting{} + case "SSH": + b = &AcceleratorSSHSetting{} + default: + b = &AcceleratorAuthSetting{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalCertificatePropertiesClassification(rawMsg json.RawMessage) (CertificatePropertiesClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b CertificatePropertiesClassification + switch m["type"] { + case "ContentCertificate": + b = &ContentCertificateProperties{} + case "KeyVaultCertificate": + b = &KeyVaultCertificateProperties{} + default: + b = &CertificateProperties{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalContainerRegistryCredentialsClassification(rawMsg json.RawMessage) (ContainerRegistryCredentialsClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ContainerRegistryCredentialsClassification + switch m["type"] { + case "BasicAuth": + b = &ContainerRegistryBasicCredentials{} + default: + b = &ContainerRegistryCredentials{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalCustomPersistentDiskPropertiesClassification(rawMsg json.RawMessage) (CustomPersistentDiskPropertiesClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b CustomPersistentDiskPropertiesClassification + switch m["type"] { + case string(TypeAzureFileVolume): + b = &AzureFileVolume{} + default: + b = &CustomPersistentDiskProperties{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalProbeActionClassification(rawMsg json.RawMessage) (ProbeActionClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ProbeActionClassification + switch m["type"] { + case string(ProbeActionTypeExecAction): + b = &ExecAction{} + case string(ProbeActionTypeHTTPGetAction): + b = &HTTPGetAction{} + case string(ProbeActionTypeTCPSocketAction): + b = &TCPSocketAction{} + default: + b = &ProbeAction{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalStoragePropertiesClassification(rawMsg json.RawMessage) (StoragePropertiesClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b StoragePropertiesClassification + switch m["storageType"] { + case string(StorageTypeStorageAccount): + b = &StorageAccount{} + default: + b = &StorageProperties{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalUserSourceInfoClassification(rawMsg json.RawMessage) (UserSourceInfoClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b UserSourceInfoClassification + switch m["type"] { + case "BuildResult": + b = &BuildResultUserSourceInfo{} + case "Container": + b = &CustomContainerUserSourceInfo{} + case "Jar": + b = &JarUploadedUserSourceInfo{} + case "NetCoreZip": + b = &NetCoreZipUploadedUserSourceInfo{} + case "Source": + b = &SourceUploadedUserSourceInfo{} + case "UploadedUserSourceInfo": + b = &UploadedUserSourceInfo{} + case "War": + b = &WarUploadedUserSourceInfo{} + default: + b = &UserSourceInfo{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/predefinedaccelerators_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/predefinedaccelerators_client.go new file mode 100644 index 00000000..93199eb0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/predefinedaccelerators_client.go @@ -0,0 +1,366 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PredefinedAcceleratorsClient contains the methods for the PredefinedAccelerators group. +// Don't use this type directly, use NewPredefinedAcceleratorsClient() instead. +type PredefinedAcceleratorsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPredefinedAcceleratorsClient creates a new instance of PredefinedAcceleratorsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPredefinedAcceleratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PredefinedAcceleratorsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PredefinedAcceleratorsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginDisable - Disable predefined accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - predefinedAcceleratorName - The name of the predefined accelerator. +// - options - PredefinedAcceleratorsClientBeginDisableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginDisable +// method. +func (client *PredefinedAcceleratorsClient) BeginDisable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginDisableOptions) (*runtime.Poller[PredefinedAcceleratorsClientDisableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.disable(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PredefinedAcceleratorsClientDisableResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PredefinedAcceleratorsClientDisableResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Disable - Disable predefined accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *PredefinedAcceleratorsClient) disable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginDisableOptions) (*http.Response, error) { + var err error + const operationName = "PredefinedAcceleratorsClient.BeginDisable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// disableCreateRequest creates the Disable request. +func (client *PredefinedAcceleratorsClient) disableCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginDisableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}/disable" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + if predefinedAcceleratorName == "" { + return nil, errors.New("parameter predefinedAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{predefinedAcceleratorName}", url.PathEscape(predefinedAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginEnable - Enable predefined accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - predefinedAcceleratorName - The name of the predefined accelerator. +// - options - PredefinedAcceleratorsClientBeginEnableOptions contains the optional parameters for the PredefinedAcceleratorsClient.BeginEnable +// method. +func (client *PredefinedAcceleratorsClient) BeginEnable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginEnableOptions) (*runtime.Poller[PredefinedAcceleratorsClientEnableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.enable(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PredefinedAcceleratorsClientEnableResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PredefinedAcceleratorsClientEnableResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Enable - Enable predefined accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *PredefinedAcceleratorsClient) enable(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginEnableOptions) (*http.Response, error) { + var err error + const operationName = "PredefinedAcceleratorsClient.BeginEnable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.enableCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// enableCreateRequest creates the Enable request. +func (client *PredefinedAcceleratorsClient) enableCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientBeginEnableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}/enable" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + if predefinedAcceleratorName == "" { + return nil, errors.New("parameter predefinedAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{predefinedAcceleratorName}", url.PathEscape(predefinedAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the predefined accelerator. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - predefinedAcceleratorName - The name of the predefined accelerator. +// - options - PredefinedAcceleratorsClientGetOptions contains the optional parameters for the PredefinedAcceleratorsClient.Get +// method. +func (client *PredefinedAcceleratorsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientGetOptions) (PredefinedAcceleratorsClientGetResponse, error) { + var err error + const operationName = "PredefinedAcceleratorsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options) + if err != nil { + return PredefinedAcceleratorsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PredefinedAcceleratorsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PredefinedAcceleratorsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PredefinedAcceleratorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, predefinedAcceleratorName string, options *PredefinedAcceleratorsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators/{predefinedAcceleratorName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + if predefinedAcceleratorName == "" { + return nil, errors.New("parameter predefinedAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{predefinedAcceleratorName}", url.PathEscape(predefinedAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PredefinedAcceleratorsClient) getHandleResponse(resp *http.Response) (PredefinedAcceleratorsClientGetResponse, error) { + result := PredefinedAcceleratorsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PredefinedAcceleratorResource); err != nil { + return PredefinedAcceleratorsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handle requests to list all predefined accelerators. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - applicationAcceleratorName - The name of the application accelerator. +// - options - PredefinedAcceleratorsClientListOptions contains the optional parameters for the PredefinedAcceleratorsClient.NewListPager +// method. +func (client *PredefinedAcceleratorsClient) NewListPager(resourceGroupName string, serviceName string, applicationAcceleratorName string, options *PredefinedAcceleratorsClientListOptions) *runtime.Pager[PredefinedAcceleratorsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PredefinedAcceleratorsClientListResponse]{ + More: func(page PredefinedAcceleratorsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PredefinedAcceleratorsClientListResponse) (PredefinedAcceleratorsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PredefinedAcceleratorsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, applicationAcceleratorName, options) + }, nil) + if err != nil { + return PredefinedAcceleratorsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PredefinedAcceleratorsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, applicationAcceleratorName string, options *PredefinedAcceleratorsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/applicationAccelerators/{applicationAcceleratorName}/predefinedAccelerators" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if applicationAcceleratorName == "" { + return nil, errors.New("parameter applicationAcceleratorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationAcceleratorName}", url.PathEscape(applicationAcceleratorName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PredefinedAcceleratorsClient) listHandleResponse(resp *http.Response) (PredefinedAcceleratorsClientListResponse, error) { + result := PredefinedAcceleratorsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PredefinedAcceleratorResourceCollection); err != nil { + return PredefinedAcceleratorsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/response_types.go new file mode 100644 index 00000000..950fae40 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/response_types.go @@ -0,0 +1,952 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +// APIPortalCustomDomainsClientCreateOrUpdateResponse contains the response from method APIPortalCustomDomainsClient.BeginCreateOrUpdate. +type APIPortalCustomDomainsClientCreateOrUpdateResponse struct { + // Custom domain of the API portal + APIPortalCustomDomainResource +} + +// APIPortalCustomDomainsClientDeleteResponse contains the response from method APIPortalCustomDomainsClient.BeginDelete. +type APIPortalCustomDomainsClientDeleteResponse struct { + // placeholder for future response values +} + +// APIPortalCustomDomainsClientGetResponse contains the response from method APIPortalCustomDomainsClient.Get. +type APIPortalCustomDomainsClientGetResponse struct { + // Custom domain of the API portal + APIPortalCustomDomainResource +} + +// APIPortalCustomDomainsClientListResponse contains the response from method APIPortalCustomDomainsClient.NewListPager. +type APIPortalCustomDomainsClientListResponse struct { + // Object that includes an array of API portal custom domain resources and a possible link for next set + APIPortalCustomDomainResourceCollection +} + +// APIPortalsClientCreateOrUpdateResponse contains the response from method APIPortalsClient.BeginCreateOrUpdate. +type APIPortalsClientCreateOrUpdateResponse struct { + // API portal resource + APIPortalResource +} + +// APIPortalsClientDeleteResponse contains the response from method APIPortalsClient.BeginDelete. +type APIPortalsClientDeleteResponse struct { + // placeholder for future response values +} + +// APIPortalsClientGetResponse contains the response from method APIPortalsClient.Get. +type APIPortalsClientGetResponse struct { + // API portal resource + APIPortalResource +} + +// APIPortalsClientListResponse contains the response from method APIPortalsClient.NewListPager. +type APIPortalsClientListResponse struct { + // Object that includes an array of API portal resources and a possible link for next set + APIPortalResourceCollection +} + +// APIPortalsClientValidateDomainResponse contains the response from method APIPortalsClient.ValidateDomain. +type APIPortalsClientValidateDomainResponse struct { + // Validation result for custom domain. + CustomDomainValidateResult +} + +// ApmsClientCreateOrUpdateResponse contains the response from method ApmsClient.BeginCreateOrUpdate. +type ApmsClientCreateOrUpdateResponse struct { + // APM Resource object + ApmResource +} + +// ApmsClientDeleteResponse contains the response from method ApmsClient.BeginDelete. +type ApmsClientDeleteResponse struct { + // placeholder for future response values +} + +// ApmsClientGetResponse contains the response from method ApmsClient.Get. +type ApmsClientGetResponse struct { + // APM Resource object + ApmResource +} + +// ApmsClientListResponse contains the response from method ApmsClient.NewListPager. +type ApmsClientListResponse struct { + // Object that includes an array of APM resources and a possible link for next set + ApmResourceCollection +} + +// ApmsClientListSecretKeysResponse contains the response from method ApmsClient.ListSecretKeys. +type ApmsClientListSecretKeysResponse struct { + // Keys of APM sensitive properties + ApmSecretKeys +} + +// ApplicationAcceleratorsClientCreateOrUpdateResponse contains the response from method ApplicationAcceleratorsClient.BeginCreateOrUpdate. +type ApplicationAcceleratorsClientCreateOrUpdateResponse struct { + // Application accelerator resource + ApplicationAcceleratorResource +} + +// ApplicationAcceleratorsClientDeleteResponse contains the response from method ApplicationAcceleratorsClient.BeginDelete. +type ApplicationAcceleratorsClientDeleteResponse struct { + // placeholder for future response values +} + +// ApplicationAcceleratorsClientGetResponse contains the response from method ApplicationAcceleratorsClient.Get. +type ApplicationAcceleratorsClientGetResponse struct { + // Application accelerator resource + ApplicationAcceleratorResource +} + +// ApplicationAcceleratorsClientListResponse contains the response from method ApplicationAcceleratorsClient.NewListPager. +type ApplicationAcceleratorsClientListResponse struct { + // Object that includes an array of application accelerator resources and a possible link for next set + ApplicationAcceleratorResourceCollection +} + +// ApplicationLiveViewsClientCreateOrUpdateResponse contains the response from method ApplicationLiveViewsClient.BeginCreateOrUpdate. +type ApplicationLiveViewsClientCreateOrUpdateResponse struct { + // Application Live View resource + ApplicationLiveViewResource +} + +// ApplicationLiveViewsClientDeleteResponse contains the response from method ApplicationLiveViewsClient.BeginDelete. +type ApplicationLiveViewsClientDeleteResponse struct { + // placeholder for future response values +} + +// ApplicationLiveViewsClientGetResponse contains the response from method ApplicationLiveViewsClient.Get. +type ApplicationLiveViewsClientGetResponse struct { + // Application Live View resource + ApplicationLiveViewResource +} + +// ApplicationLiveViewsClientListResponse contains the response from method ApplicationLiveViewsClient.NewListPager. +type ApplicationLiveViewsClientListResponse struct { + // Object that includes an array of Application Live View resources and a possible link for next set + ApplicationLiveViewResourceCollection +} + +// AppsClientCreateOrUpdateResponse contains the response from method AppsClient.BeginCreateOrUpdate. +type AppsClientCreateOrUpdateResponse struct { + // App resource payload + AppResource +} + +// AppsClientDeleteResponse contains the response from method AppsClient.BeginDelete. +type AppsClientDeleteResponse struct { + // placeholder for future response values +} + +// AppsClientGetResourceUploadURLResponse contains the response from method AppsClient.GetResourceUploadURL. +type AppsClientGetResourceUploadURLResponse struct { + // Resource upload definition payload + ResourceUploadDefinition +} + +// AppsClientGetResponse contains the response from method AppsClient.Get. +type AppsClientGetResponse struct { + // App resource payload + AppResource +} + +// AppsClientListResponse contains the response from method AppsClient.NewListPager. +type AppsClientListResponse struct { + // Object that includes an array of App resources and a possible link for next set + AppResourceCollection +} + +// AppsClientSetActiveDeploymentsResponse contains the response from method AppsClient.BeginSetActiveDeployments. +type AppsClientSetActiveDeploymentsResponse struct { + // App resource payload + AppResource +} + +// AppsClientUpdateResponse contains the response from method AppsClient.BeginUpdate. +type AppsClientUpdateResponse struct { + // App resource payload + AppResource +} + +// AppsClientValidateDomainResponse contains the response from method AppsClient.ValidateDomain. +type AppsClientValidateDomainResponse struct { + // Validation result for custom domain. + CustomDomainValidateResult +} + +// BindingsClientCreateOrUpdateResponse contains the response from method BindingsClient.BeginCreateOrUpdate. +type BindingsClientCreateOrUpdateResponse struct { + // Binding resource payload + BindingResource +} + +// BindingsClientDeleteResponse contains the response from method BindingsClient.BeginDelete. +type BindingsClientDeleteResponse struct { + // placeholder for future response values +} + +// BindingsClientGetResponse contains the response from method BindingsClient.Get. +type BindingsClientGetResponse struct { + // Binding resource payload + BindingResource +} + +// BindingsClientListResponse contains the response from method BindingsClient.NewListPager. +type BindingsClientListResponse struct { + // Object that includes an array of Binding resources and a possible link for next set + BindingResourceCollection +} + +// BindingsClientUpdateResponse contains the response from method BindingsClient.BeginUpdate. +type BindingsClientUpdateResponse struct { + // Binding resource payload + BindingResource +} + +// BuildServiceAgentPoolClientGetResponse contains the response from method BuildServiceAgentPoolClient.Get. +type BuildServiceAgentPoolClientGetResponse struct { + // The build service agent pool resource + BuildServiceAgentPoolResource +} + +// BuildServiceAgentPoolClientListResponse contains the response from method BuildServiceAgentPoolClient.NewListPager. +type BuildServiceAgentPoolClientListResponse struct { + // Object that includes an array of build service agent pool resources and a possible link for next set + BuildServiceAgentPoolResourceCollection +} + +// BuildServiceAgentPoolClientUpdatePutResponse contains the response from method BuildServiceAgentPoolClient.BeginUpdatePut. +type BuildServiceAgentPoolClientUpdatePutResponse struct { + // The build service agent pool resource + BuildServiceAgentPoolResource +} + +// BuildServiceBuilderClientCreateOrUpdateResponse contains the response from method BuildServiceBuilderClient.BeginCreateOrUpdate. +type BuildServiceBuilderClientCreateOrUpdateResponse struct { + // KPack Builder resource + BuilderResource +} + +// BuildServiceBuilderClientDeleteResponse contains the response from method BuildServiceBuilderClient.BeginDelete. +type BuildServiceBuilderClientDeleteResponse struct { + // placeholder for future response values +} + +// BuildServiceBuilderClientGetResponse contains the response from method BuildServiceBuilderClient.Get. +type BuildServiceBuilderClientGetResponse struct { + // KPack Builder resource + BuilderResource +} + +// BuildServiceBuilderClientListDeploymentsResponse contains the response from method BuildServiceBuilderClient.ListDeployments. +type BuildServiceBuilderClientListDeploymentsResponse struct { + // A list of deployments resource ids. + DeploymentList +} + +// BuildServiceBuilderClientListResponse contains the response from method BuildServiceBuilderClient.NewListPager. +type BuildServiceBuilderClientListResponse struct { + // Object that includes an array of Builder resources and a possible link for next set + BuilderResourceCollection +} + +// BuildServiceClientCreateOrUpdateBuildResponse contains the response from method BuildServiceClient.CreateOrUpdateBuild. +type BuildServiceClientCreateOrUpdateBuildResponse struct { + // Build resource payload + Build +} + +// BuildServiceClientCreateOrUpdateResponse contains the response from method BuildServiceClient.BeginCreateOrUpdate. +type BuildServiceClientCreateOrUpdateResponse struct { + // Build service resource payload + BuildService +} + +// BuildServiceClientDeleteBuildResponse contains the response from method BuildServiceClient.BeginDeleteBuild. +type BuildServiceClientDeleteBuildResponse struct { + // placeholder for future response values +} + +// BuildServiceClientGetBuildResponse contains the response from method BuildServiceClient.GetBuild. +type BuildServiceClientGetBuildResponse struct { + // Build resource payload + Build +} + +// BuildServiceClientGetBuildResultLogResponse contains the response from method BuildServiceClient.GetBuildResultLog. +type BuildServiceClientGetBuildResultLogResponse struct { + // Build result log resource properties payload + BuildResultLog +} + +// BuildServiceClientGetBuildResultResponse contains the response from method BuildServiceClient.GetBuildResult. +type BuildServiceClientGetBuildResultResponse struct { + // Build result resource payload + BuildResult +} + +// BuildServiceClientGetBuildServiceResponse contains the response from method BuildServiceClient.GetBuildService. +type BuildServiceClientGetBuildServiceResponse struct { + // Build service resource payload + BuildService +} + +// BuildServiceClientGetResourceUploadURLResponse contains the response from method BuildServiceClient.GetResourceUploadURL. +type BuildServiceClientGetResourceUploadURLResponse struct { + // Resource upload definition payload + ResourceUploadDefinition +} + +// BuildServiceClientGetSupportedBuildpackResponse contains the response from method BuildServiceClient.GetSupportedBuildpack. +type BuildServiceClientGetSupportedBuildpackResponse struct { + // Supported buildpack resource payload + SupportedBuildpackResource +} + +// BuildServiceClientGetSupportedStackResponse contains the response from method BuildServiceClient.GetSupportedStack. +type BuildServiceClientGetSupportedStackResponse struct { + // Supported stack resource payload + SupportedStackResource +} + +// BuildServiceClientListBuildResultsResponse contains the response from method BuildServiceClient.NewListBuildResultsPager. +type BuildServiceClientListBuildResultsResponse struct { + // Object that includes an array of Build result resources and a possible link for next set + BuildResultCollection +} + +// BuildServiceClientListBuildServicesResponse contains the response from method BuildServiceClient.NewListBuildServicesPager. +type BuildServiceClientListBuildServicesResponse struct { + // Object that includes an array of Build service resources and a possible link for next set + BuildServiceCollection +} + +// BuildServiceClientListBuildsResponse contains the response from method BuildServiceClient.NewListBuildsPager. +type BuildServiceClientListBuildsResponse struct { + // Object that includes an array of Build resources and a possible link for next set + BuildCollection +} + +// BuildServiceClientListSupportedBuildpacksResponse contains the response from method BuildServiceClient.ListSupportedBuildpacks. +type BuildServiceClientListSupportedBuildpacksResponse struct { + // Object that includes an array of supported buildpacks resources and a possible link for next set + SupportedBuildpacksCollection +} + +// BuildServiceClientListSupportedStacksResponse contains the response from method BuildServiceClient.ListSupportedStacks. +type BuildServiceClientListSupportedStacksResponse struct { + // Object that includes an array of supported stacks resources and a possible link for next set + SupportedStacksCollection +} + +// BuildpackBindingClientCreateOrUpdateResponse contains the response from method BuildpackBindingClient.BeginCreateOrUpdate. +type BuildpackBindingClientCreateOrUpdateResponse struct { + // Buildpack Binding Resource object + BuildpackBindingResource +} + +// BuildpackBindingClientDeleteResponse contains the response from method BuildpackBindingClient.BeginDelete. +type BuildpackBindingClientDeleteResponse struct { + // placeholder for future response values +} + +// BuildpackBindingClientGetResponse contains the response from method BuildpackBindingClient.Get. +type BuildpackBindingClientGetResponse struct { + // Buildpack Binding Resource object + BuildpackBindingResource +} + +// BuildpackBindingClientListForClusterResponse contains the response from method BuildpackBindingClient.NewListForClusterPager. +type BuildpackBindingClientListForClusterResponse struct { + // Object that includes an array of BuildpackBinding resources and a possible link for next set + BuildpackBindingResourceCollection +} + +// BuildpackBindingClientListResponse contains the response from method BuildpackBindingClient.NewListPager. +type BuildpackBindingClientListResponse struct { + // Object that includes an array of BuildpackBinding resources and a possible link for next set + BuildpackBindingResourceCollection +} + +// CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.BeginCreateOrUpdate. +type CertificatesClientCreateOrUpdateResponse struct { + // Certificate resource payload. + CertificateResource +} + +// CertificatesClientDeleteResponse contains the response from method CertificatesClient.BeginDelete. +type CertificatesClientDeleteResponse struct { + // placeholder for future response values +} + +// CertificatesClientGetResponse contains the response from method CertificatesClient.Get. +type CertificatesClientGetResponse struct { + // Certificate resource payload. + CertificateResource +} + +// CertificatesClientListResponse contains the response from method CertificatesClient.NewListPager. +type CertificatesClientListResponse struct { + // Collection compose of certificate resources list and a possible link for next page. + CertificateResourceCollection +} + +// ConfigServersClientGetResponse contains the response from method ConfigServersClient.Get. +type ConfigServersClientGetResponse struct { + // Config Server resource + ConfigServerResource +} + +// ConfigServersClientUpdatePatchResponse contains the response from method ConfigServersClient.BeginUpdatePatch. +type ConfigServersClientUpdatePatchResponse struct { + // Config Server resource + ConfigServerResource +} + +// ConfigServersClientUpdatePutResponse contains the response from method ConfigServersClient.BeginUpdatePut. +type ConfigServersClientUpdatePutResponse struct { + // Config Server resource + ConfigServerResource +} + +// ConfigServersClientValidateResponse contains the response from method ConfigServersClient.BeginValidate. +type ConfigServersClientValidateResponse struct { + // Validation result for config server settings + ConfigServerSettingsValidateResult +} + +// ConfigurationServicesClientCreateOrUpdateResponse contains the response from method ConfigurationServicesClient.BeginCreateOrUpdate. +type ConfigurationServicesClientCreateOrUpdateResponse struct { + // Application Configuration Service resource + ConfigurationServiceResource +} + +// ConfigurationServicesClientDeleteResponse contains the response from method ConfigurationServicesClient.BeginDelete. +type ConfigurationServicesClientDeleteResponse struct { + // placeholder for future response values +} + +// ConfigurationServicesClientGetResponse contains the response from method ConfigurationServicesClient.Get. +type ConfigurationServicesClientGetResponse struct { + // Application Configuration Service resource + ConfigurationServiceResource +} + +// ConfigurationServicesClientListResponse contains the response from method ConfigurationServicesClient.NewListPager. +type ConfigurationServicesClientListResponse struct { + // Object that includes an array of configuration service resources and a possible link for next set + ConfigurationServiceResourceCollection +} + +// ConfigurationServicesClientValidateResourceResponse contains the response from method ConfigurationServicesClient.BeginValidateResource. +type ConfigurationServicesClientValidateResourceResponse struct { + // Validation result for configuration service settings + ConfigurationServiceSettingsValidateResult +} + +// ConfigurationServicesClientValidateResponse contains the response from method ConfigurationServicesClient.BeginValidate. +type ConfigurationServicesClientValidateResponse struct { + // Validation result for configuration service settings + ConfigurationServiceSettingsValidateResult +} + +// ContainerRegistriesClientCreateOrUpdateResponse contains the response from method ContainerRegistriesClient.BeginCreateOrUpdate. +type ContainerRegistriesClientCreateOrUpdateResponse struct { + // Container registry resource payload. + ContainerRegistryResource +} + +// ContainerRegistriesClientDeleteResponse contains the response from method ContainerRegistriesClient.BeginDelete. +type ContainerRegistriesClientDeleteResponse struct { + // placeholder for future response values +} + +// ContainerRegistriesClientGetResponse contains the response from method ContainerRegistriesClient.Get. +type ContainerRegistriesClientGetResponse struct { + // Container registry resource payload. + ContainerRegistryResource +} + +// ContainerRegistriesClientListResponse contains the response from method ContainerRegistriesClient.NewListPager. +type ContainerRegistriesClientListResponse struct { + // Collection compose of container registry resources list and a possible link for next page. + ContainerRegistryResourceCollection +} + +// ContainerRegistriesClientValidateResponse contains the response from method ContainerRegistriesClient.BeginValidate. +type ContainerRegistriesClientValidateResponse struct { + // Validation result for container registry properties + ContainerRegistryValidateResult +} + +// CustomDomainsClientCreateOrUpdateResponse contains the response from method CustomDomainsClient.BeginCreateOrUpdate. +type CustomDomainsClientCreateOrUpdateResponse struct { + // Custom domain resource payload. + CustomDomainResource +} + +// CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.BeginDelete. +type CustomDomainsClientDeleteResponse struct { + // placeholder for future response values +} + +// CustomDomainsClientGetResponse contains the response from method CustomDomainsClient.Get. +type CustomDomainsClientGetResponse struct { + // Custom domain resource payload. + CustomDomainResource +} + +// CustomDomainsClientListResponse contains the response from method CustomDomainsClient.NewListPager. +type CustomDomainsClientListResponse struct { + // Collection compose of a custom domain resources list and a possible link for next page. + CustomDomainResourceCollection +} + +// CustomDomainsClientUpdateResponse contains the response from method CustomDomainsClient.BeginUpdate. +type CustomDomainsClientUpdateResponse struct { + // Custom domain resource payload. + CustomDomainResource +} + +// CustomizedAcceleratorsClientCreateOrUpdateResponse contains the response from method CustomizedAcceleratorsClient.BeginCreateOrUpdate. +type CustomizedAcceleratorsClientCreateOrUpdateResponse struct { + // Customized accelerator resource + CustomizedAcceleratorResource +} + +// CustomizedAcceleratorsClientDeleteResponse contains the response from method CustomizedAcceleratorsClient.BeginDelete. +type CustomizedAcceleratorsClientDeleteResponse struct { + // placeholder for future response values +} + +// CustomizedAcceleratorsClientGetResponse contains the response from method CustomizedAcceleratorsClient.Get. +type CustomizedAcceleratorsClientGetResponse struct { + // Customized accelerator resource + CustomizedAcceleratorResource +} + +// CustomizedAcceleratorsClientListResponse contains the response from method CustomizedAcceleratorsClient.NewListPager. +type CustomizedAcceleratorsClientListResponse struct { + CustomizedAcceleratorResourceCollection +} + +// CustomizedAcceleratorsClientValidateResponse contains the response from method CustomizedAcceleratorsClient.BeginValidate. +type CustomizedAcceleratorsClientValidateResponse struct { + // Validation result for customized accelerator properties + CustomizedAcceleratorValidateResult +} + +// DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.BeginCreateOrUpdate. +type DeploymentsClientCreateOrUpdateResponse struct { + // Deployment resource payload + DeploymentResource +} + +// DeploymentsClientDeleteResponse contains the response from method DeploymentsClient.BeginDelete. +type DeploymentsClientDeleteResponse struct { + // placeholder for future response values +} + +// DeploymentsClientDisableRemoteDebuggingResponse contains the response from method DeploymentsClient.BeginDisableRemoteDebugging. +type DeploymentsClientDisableRemoteDebuggingResponse struct { + // Remote debugging config. + RemoteDebugging +} + +// DeploymentsClientEnableRemoteDebuggingResponse contains the response from method DeploymentsClient.BeginEnableRemoteDebugging. +type DeploymentsClientEnableRemoteDebuggingResponse struct { + // Remote debugging config. + RemoteDebugging +} + +// DeploymentsClientGenerateHeapDumpResponse contains the response from method DeploymentsClient.BeginGenerateHeapDump. +type DeploymentsClientGenerateHeapDumpResponse struct { + // placeholder for future response values +} + +// DeploymentsClientGenerateThreadDumpResponse contains the response from method DeploymentsClient.BeginGenerateThreadDump. +type DeploymentsClientGenerateThreadDumpResponse struct { + // placeholder for future response values +} + +// DeploymentsClientGetLogFileURLResponse contains the response from method DeploymentsClient.GetLogFileURL. +type DeploymentsClientGetLogFileURLResponse struct { + // Log file URL payload + LogFileURLResponse +} + +// DeploymentsClientGetRemoteDebuggingConfigResponse contains the response from method DeploymentsClient.GetRemoteDebuggingConfig. +type DeploymentsClientGetRemoteDebuggingConfigResponse struct { + // Remote debugging config. + RemoteDebugging +} + +// DeploymentsClientGetResponse contains the response from method DeploymentsClient.Get. +type DeploymentsClientGetResponse struct { + // Deployment resource payload + DeploymentResource +} + +// DeploymentsClientListForClusterResponse contains the response from method DeploymentsClient.NewListForClusterPager. +type DeploymentsClientListForClusterResponse struct { + // Object that includes an array of App resources and a possible link for next set + DeploymentResourceCollection +} + +// DeploymentsClientListResponse contains the response from method DeploymentsClient.NewListPager. +type DeploymentsClientListResponse struct { + // Object that includes an array of App resources and a possible link for next set + DeploymentResourceCollection +} + +// DeploymentsClientRestartResponse contains the response from method DeploymentsClient.BeginRestart. +type DeploymentsClientRestartResponse struct { + // placeholder for future response values +} + +// DeploymentsClientStartJFRResponse contains the response from method DeploymentsClient.BeginStartJFR. +type DeploymentsClientStartJFRResponse struct { + // placeholder for future response values +} + +// DeploymentsClientStartResponse contains the response from method DeploymentsClient.BeginStart. +type DeploymentsClientStartResponse struct { + // placeholder for future response values +} + +// DeploymentsClientStopResponse contains the response from method DeploymentsClient.BeginStop. +type DeploymentsClientStopResponse struct { + // placeholder for future response values +} + +// DeploymentsClientUpdateResponse contains the response from method DeploymentsClient.BeginUpdate. +type DeploymentsClientUpdateResponse struct { + // Deployment resource payload + DeploymentResource +} + +// DevToolPortalsClientCreateOrUpdateResponse contains the response from method DevToolPortalsClient.BeginCreateOrUpdate. +type DevToolPortalsClientCreateOrUpdateResponse struct { + // Dev Tool Portal resource + DevToolPortalResource +} + +// DevToolPortalsClientDeleteResponse contains the response from method DevToolPortalsClient.BeginDelete. +type DevToolPortalsClientDeleteResponse struct { + // placeholder for future response values +} + +// DevToolPortalsClientGetResponse contains the response from method DevToolPortalsClient.Get. +type DevToolPortalsClientGetResponse struct { + // Dev Tool Portal resource + DevToolPortalResource +} + +// DevToolPortalsClientListResponse contains the response from method DevToolPortalsClient.NewListPager. +type DevToolPortalsClientListResponse struct { + // Object that includes an array of Dev Tool Portal resources and a possible link for next set + DevToolPortalResourceCollection +} + +// GatewayCustomDomainsClientCreateOrUpdateResponse contains the response from method GatewayCustomDomainsClient.BeginCreateOrUpdate. +type GatewayCustomDomainsClientCreateOrUpdateResponse struct { + // Custom domain of the Spring Cloud Gateway + GatewayCustomDomainResource +} + +// GatewayCustomDomainsClientDeleteResponse contains the response from method GatewayCustomDomainsClient.BeginDelete. +type GatewayCustomDomainsClientDeleteResponse struct { + // placeholder for future response values +} + +// GatewayCustomDomainsClientGetResponse contains the response from method GatewayCustomDomainsClient.Get. +type GatewayCustomDomainsClientGetResponse struct { + // Custom domain of the Spring Cloud Gateway + GatewayCustomDomainResource +} + +// GatewayCustomDomainsClientListResponse contains the response from method GatewayCustomDomainsClient.NewListPager. +type GatewayCustomDomainsClientListResponse struct { + // Object that includes an array of Spring Cloud Gateway custom domain resources and a possible link for next set + GatewayCustomDomainResourceCollection +} + +// GatewayRouteConfigsClientCreateOrUpdateResponse contains the response from method GatewayRouteConfigsClient.BeginCreateOrUpdate. +type GatewayRouteConfigsClientCreateOrUpdateResponse struct { + // Spring Cloud Gateway route config resource + GatewayRouteConfigResource +} + +// GatewayRouteConfigsClientDeleteResponse contains the response from method GatewayRouteConfigsClient.BeginDelete. +type GatewayRouteConfigsClientDeleteResponse struct { + // placeholder for future response values +} + +// GatewayRouteConfigsClientGetResponse contains the response from method GatewayRouteConfigsClient.Get. +type GatewayRouteConfigsClientGetResponse struct { + // Spring Cloud Gateway route config resource + GatewayRouteConfigResource +} + +// GatewayRouteConfigsClientListResponse contains the response from method GatewayRouteConfigsClient.NewListPager. +type GatewayRouteConfigsClientListResponse struct { + // Object that includes an array of Spring Cloud Gateway route config resources and a possible link for next set + GatewayRouteConfigResourceCollection +} + +// GatewaysClientCreateOrUpdateResponse contains the response from method GatewaysClient.BeginCreateOrUpdate. +type GatewaysClientCreateOrUpdateResponse struct { + // Spring Cloud Gateway resource + GatewayResource +} + +// GatewaysClientDeleteResponse contains the response from method GatewaysClient.BeginDelete. +type GatewaysClientDeleteResponse struct { + // placeholder for future response values +} + +// GatewaysClientGetResponse contains the response from method GatewaysClient.Get. +type GatewaysClientGetResponse struct { + // Spring Cloud Gateway resource + GatewayResource +} + +// GatewaysClientListEnvSecretsResponse contains the response from method GatewaysClient.ListEnvSecrets. +type GatewaysClientListEnvSecretsResponse struct { + // Sensitive properties for Spring Cloud Gateway + Value map[string]*string +} + +// GatewaysClientListResponse contains the response from method GatewaysClient.NewListPager. +type GatewaysClientListResponse struct { + // Object that includes an array of gateway resources and a possible link for next set + GatewayResourceCollection +} + +// GatewaysClientRestartResponse contains the response from method GatewaysClient.BeginRestart. +type GatewaysClientRestartResponse struct { + // placeholder for future response values +} + +// GatewaysClientValidateDomainResponse contains the response from method GatewaysClient.ValidateDomain. +type GatewaysClientValidateDomainResponse struct { + // Validation result for custom domain. + CustomDomainValidateResult +} + +// MonitoringSettingsClientGetResponse contains the response from method MonitoringSettingsClient.Get. +type MonitoringSettingsClientGetResponse struct { + // Monitoring Setting resource + MonitoringSettingResource +} + +// MonitoringSettingsClientUpdatePatchResponse contains the response from method MonitoringSettingsClient.BeginUpdatePatch. +type MonitoringSettingsClientUpdatePatchResponse struct { + // Monitoring Setting resource + MonitoringSettingResource +} + +// MonitoringSettingsClientUpdatePutResponse contains the response from method MonitoringSettingsClient.BeginUpdatePut. +type MonitoringSettingsClientUpdatePutResponse struct { + // Monitoring Setting resource + MonitoringSettingResource +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Available operations of the service + AvailableOperations +} + +// PredefinedAcceleratorsClientDisableResponse contains the response from method PredefinedAcceleratorsClient.BeginDisable. +type PredefinedAcceleratorsClientDisableResponse struct { + // placeholder for future response values +} + +// PredefinedAcceleratorsClientEnableResponse contains the response from method PredefinedAcceleratorsClient.BeginEnable. +type PredefinedAcceleratorsClientEnableResponse struct { + // placeholder for future response values +} + +// PredefinedAcceleratorsClientGetResponse contains the response from method PredefinedAcceleratorsClient.Get. +type PredefinedAcceleratorsClientGetResponse struct { + // Predefined accelerator resource + PredefinedAcceleratorResource +} + +// PredefinedAcceleratorsClientListResponse contains the response from method PredefinedAcceleratorsClient.NewListPager. +type PredefinedAcceleratorsClientListResponse struct { + PredefinedAcceleratorResourceCollection +} + +// RuntimeVersionsClientListRuntimeVersionsResponse contains the response from method RuntimeVersionsClient.ListRuntimeVersions. +type RuntimeVersionsClientListRuntimeVersionsResponse struct { + AvailableRuntimeVersions +} + +// SKUsClientListResponse contains the response from method SKUsClient.NewListPager. +type SKUsClientListResponse struct { + // Object that includes an array of Azure Spring Apps SKU and a possible link for next set + ResourceSKUCollection +} + +// ServiceRegistriesClientCreateOrUpdateResponse contains the response from method ServiceRegistriesClient.BeginCreateOrUpdate. +type ServiceRegistriesClientCreateOrUpdateResponse struct { + // Service Registry resource + ServiceRegistryResource +} + +// ServiceRegistriesClientDeleteResponse contains the response from method ServiceRegistriesClient.BeginDelete. +type ServiceRegistriesClientDeleteResponse struct { + // placeholder for future response values +} + +// ServiceRegistriesClientGetResponse contains the response from method ServiceRegistriesClient.Get. +type ServiceRegistriesClientGetResponse struct { + // Service Registry resource + ServiceRegistryResource +} + +// ServiceRegistriesClientListResponse contains the response from method ServiceRegistriesClient.NewListPager. +type ServiceRegistriesClientListResponse struct { + // Object that includes an array of Service Registry resources and a possible link for next set + ServiceRegistryResourceCollection +} + +// ServicesClientCheckNameAvailabilityResponse contains the response from method ServicesClient.CheckNameAvailability. +type ServicesClientCheckNameAvailabilityResponse struct { + // Name availability result payload + NameAvailability +} + +// ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.BeginCreateOrUpdate. +type ServicesClientCreateOrUpdateResponse struct { + // Service resource + ServiceResource +} + +// ServicesClientDeleteResponse contains the response from method ServicesClient.BeginDelete. +type ServicesClientDeleteResponse struct { + // placeholder for future response values +} + +// ServicesClientDisableApmGloballyResponse contains the response from method ServicesClient.BeginDisableApmGlobally. +type ServicesClientDisableApmGloballyResponse struct { + // placeholder for future response values +} + +// ServicesClientDisableTestEndpointResponse contains the response from method ServicesClient.DisableTestEndpoint. +type ServicesClientDisableTestEndpointResponse struct { + // placeholder for future response values +} + +// ServicesClientEnableApmGloballyResponse contains the response from method ServicesClient.BeginEnableApmGlobally. +type ServicesClientEnableApmGloballyResponse struct { + // placeholder for future response values +} + +// ServicesClientEnableTestEndpointResponse contains the response from method ServicesClient.EnableTestEndpoint. +type ServicesClientEnableTestEndpointResponse struct { + // Test keys payload + TestKeys +} + +// ServicesClientFlushVnetDNSSettingResponse contains the response from method ServicesClient.BeginFlushVnetDNSSetting. +type ServicesClientFlushVnetDNSSettingResponse struct { + // placeholder for future response values +} + +// ServicesClientGetResponse contains the response from method ServicesClient.Get. +type ServicesClientGetResponse struct { + // Service resource + ServiceResource +} + +// ServicesClientListBySubscriptionResponse contains the response from method ServicesClient.NewListBySubscriptionPager. +type ServicesClientListBySubscriptionResponse struct { + // Object that includes an array of Service resources and a possible link for next set + ServiceResourceList +} + +// ServicesClientListGloballyEnabledApmsResponse contains the response from method ServicesClient.ListGloballyEnabledApms. +type ServicesClientListGloballyEnabledApmsResponse struct { + // Globally enabled APMs payload + GloballyEnabledApms +} + +// ServicesClientListResponse contains the response from method ServicesClient.NewListPager. +type ServicesClientListResponse struct { + // Object that includes an array of Service resources and a possible link for next set + ServiceResourceList +} + +// ServicesClientListSupportedApmTypesResponse contains the response from method ServicesClient.NewListSupportedApmTypesPager. +type ServicesClientListSupportedApmTypesResponse struct { + // Supported APM types payload + SupportedApmTypes +} + +// ServicesClientListSupportedServerVersionsResponse contains the response from method ServicesClient.NewListSupportedServerVersionsPager. +type ServicesClientListSupportedServerVersionsResponse struct { + // Supported server versions. + SupportedServerVersions +} + +// ServicesClientListTestKeysResponse contains the response from method ServicesClient.ListTestKeys. +type ServicesClientListTestKeysResponse struct { + // Test keys payload + TestKeys +} + +// ServicesClientRegenerateTestKeyResponse contains the response from method ServicesClient.RegenerateTestKey. +type ServicesClientRegenerateTestKeyResponse struct { + // Test keys payload + TestKeys +} + +// ServicesClientStartResponse contains the response from method ServicesClient.BeginStart. +type ServicesClientStartResponse struct { + // placeholder for future response values +} + +// ServicesClientStopResponse contains the response from method ServicesClient.BeginStop. +type ServicesClientStopResponse struct { + // placeholder for future response values +} + +// ServicesClientUpdateResponse contains the response from method ServicesClient.BeginUpdate. +type ServicesClientUpdateResponse struct { + // Service resource + ServiceResource +} + +// StoragesClientCreateOrUpdateResponse contains the response from method StoragesClient.BeginCreateOrUpdate. +type StoragesClientCreateOrUpdateResponse struct { + // Storage resource payload. + StorageResource +} + +// StoragesClientDeleteResponse contains the response from method StoragesClient.BeginDelete. +type StoragesClientDeleteResponse struct { + // placeholder for future response values +} + +// StoragesClientGetResponse contains the response from method StoragesClient.Get. +type StoragesClientGetResponse struct { + // Storage resource payload. + StorageResource +} + +// StoragesClientListResponse contains the response from method StoragesClient.NewListPager. +type StoragesClientListResponse struct { + // Collection compose of storage resources list and a possible link for next page. + StorageResourceCollection +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/runtimeversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/runtimeversions_client.go new file mode 100644 index 00000000..bedd924e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/runtimeversions_client.go @@ -0,0 +1,89 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// RuntimeVersionsClient contains the methods for the RuntimeVersions group. +// Don't use this type directly, use NewRuntimeVersionsClient() instead. +type RuntimeVersionsClient struct { + internal *arm.Client +} + +// NewRuntimeVersionsClient creates a new instance of RuntimeVersionsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRuntimeVersionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RuntimeVersionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RuntimeVersionsClient{ + internal: cl, + } + return client, nil +} + +// ListRuntimeVersions - Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - options - RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions +// method. +func (client *RuntimeVersionsClient) ListRuntimeVersions(ctx context.Context, options *RuntimeVersionsClientListRuntimeVersionsOptions) (RuntimeVersionsClientListRuntimeVersionsResponse, error) { + var err error + const operationName = "RuntimeVersionsClient.ListRuntimeVersions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listRuntimeVersionsCreateRequest(ctx, options) + if err != nil { + return RuntimeVersionsClientListRuntimeVersionsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RuntimeVersionsClientListRuntimeVersionsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RuntimeVersionsClientListRuntimeVersionsResponse{}, err + } + resp, err := client.listRuntimeVersionsHandleResponse(httpResp) + return resp, err +} + +// listRuntimeVersionsCreateRequest creates the ListRuntimeVersions request. +func (client *RuntimeVersionsClient) listRuntimeVersionsCreateRequest(ctx context.Context, options *RuntimeVersionsClientListRuntimeVersionsOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.AppPlatform/runtimeVersions" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listRuntimeVersionsHandleResponse handles the ListRuntimeVersions response. +func (client *RuntimeVersionsClient) listRuntimeVersionsHandleResponse(resp *http.Response) (RuntimeVersionsClientListRuntimeVersionsResponse, error) { + result := RuntimeVersionsClientListRuntimeVersionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AvailableRuntimeVersions); err != nil { + return RuntimeVersionsClientListRuntimeVersionsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/serviceregistries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/serviceregistries_client.go new file mode 100644 index 00000000..eed1ceff --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/serviceregistries_client.go @@ -0,0 +1,345 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServiceRegistriesClient contains the methods for the ServiceRegistries group. +// Don't use this type directly, use NewServiceRegistriesClient() instead. +type ServiceRegistriesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServiceRegistriesClient creates a new instance of ServiceRegistriesClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServiceRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceRegistriesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServiceRegistriesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create the default Service Registry or update the existing Service Registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - serviceRegistryName - The name of Service Registry. +// - options - ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate +// method. +func (client *ServiceRegistriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceRegistriesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, serviceRegistryName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceRegistriesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceRegistriesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create the default Service Registry or update the existing Service Registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ServiceRegistriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServiceRegistriesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServiceRegistriesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if serviceRegistryName == "" { + return nil, errors.New("parameter serviceRegistryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceRegistryName}", url.PathEscape(serviceRegistryName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDelete - Disable the default Service Registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - serviceRegistryName - The name of Service Registry. +// - options - ServiceRegistriesClientBeginDeleteOptions contains the optional parameters for the ServiceRegistriesClient.BeginDelete +// method. +func (client *ServiceRegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*runtime.Poller[ServiceRegistriesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, serviceRegistryName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceRegistriesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceRegistriesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Disable the default Service Registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ServiceRegistriesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServiceRegistriesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServiceRegistriesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if serviceRegistryName == "" { + return nil, errors.New("parameter serviceRegistryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceRegistryName}", url.PathEscape(serviceRegistryName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the Service Registry and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - serviceRegistryName - The name of Service Registry. +// - options - ServiceRegistriesClientGetOptions contains the optional parameters for the ServiceRegistriesClient.Get method. +func (client *ServiceRegistriesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientGetOptions) (ServiceRegistriesClientGetResponse, error) { + var err error + const operationName = "ServiceRegistriesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) + if err != nil { + return ServiceRegistriesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceRegistriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceRegistriesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServiceRegistriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if serviceRegistryName == "" { + return nil, errors.New("parameter serviceRegistryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceRegistryName}", url.PathEscape(serviceRegistryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServiceRegistriesClient) getHandleResponse(resp *http.Response) (ServiceRegistriesClientGetResponse, error) { + result := ServiceRegistriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceRegistryResource); err != nil { + return ServiceRegistriesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all resources in a Service. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.NewListPager +// method. +func (client *ServiceRegistriesClient) NewListPager(resourceGroupName string, serviceName string, options *ServiceRegistriesClientListOptions) *runtime.Pager[ServiceRegistriesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ServiceRegistriesClientListResponse]{ + More: func(page ServiceRegistriesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServiceRegistriesClientListResponse) (ServiceRegistriesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceRegistriesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return ServiceRegistriesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ServiceRegistriesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceRegistriesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ServiceRegistriesClient) listHandleResponse(resp *http.Response) (ServiceRegistriesClientListResponse, error) { + result := ServiceRegistriesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceRegistryResourceCollection); err != nil { + return ServiceRegistriesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/services_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/services_client.go new file mode 100644 index 00000000..b62e3fd4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/services_client.go @@ -0,0 +1,1375 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServicesClient contains the methods for the Services group. +// Don't use this type directly, use NewServicesClient() instead. +type ServicesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServicesClient creates a new instance of ServicesClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServicesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckNameAvailability - Checks that the resource name is valid and is not already in use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - location - the region +// - availabilityParameters - Parameters supplied to the operation. +// - options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability +// method. +func (client *ServicesClient) CheckNameAvailability(ctx context.Context, location string, availabilityParameters NameAvailabilityParameters, options *ServicesClientCheckNameAvailabilityOptions) (ServicesClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ServicesClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkNameAvailabilityCreateRequest(ctx, location, availabilityParameters, options) + if err != nil { + return ServicesClientCheckNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServicesClientCheckNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServicesClientCheckNameAvailabilityResponse{}, err + } + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. +func (client *ServicesClient) checkNameAvailabilityCreateRequest(ctx context.Context, location string, availabilityParameters NameAvailabilityParameters, options *ServicesClientCheckNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, availabilityParameters); err != nil { + return nil, err + } + return req, nil +} + +// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. +func (client *ServicesClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ServicesClientCheckNameAvailabilityResponse, error) { + result := ServicesClientCheckNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NameAvailability); err != nil { + return ServicesClientCheckNameAvailabilityResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Create a new Service or update an exiting Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - resource - Parameters for the create or update operation +// - options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate +// method. +func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServicesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, resource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServicesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create a new Service or update an exiting Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServicesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, resource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Operation to delete a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. +func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*runtime.Poller[ServicesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServicesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Operation to delete a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServicesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDisableApmGlobally - Disable an APM globally. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apm - The target APM for the disable operation +// - options - ServicesClientBeginDisableApmGloballyOptions contains the optional parameters for the ServicesClient.BeginDisableApmGlobally +// method. +func (client *ServicesClient) BeginDisableApmGlobally(ctx context.Context, resourceGroupName string, serviceName string, apm ApmReference, options *ServicesClientBeginDisableApmGloballyOptions) (*runtime.Poller[ServicesClientDisableApmGloballyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.disableApmGlobally(ctx, resourceGroupName, serviceName, apm, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientDisableApmGloballyResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServicesClientDisableApmGloballyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DisableApmGlobally - Disable an APM globally. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ServicesClient) disableApmGlobally(ctx context.Context, resourceGroupName string, serviceName string, apm ApmReference, options *ServicesClientBeginDisableApmGloballyOptions) (*http.Response, error) { + var err error + const operationName = "ServicesClient.BeginDisableApmGlobally" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableApmGloballyCreateRequest(ctx, resourceGroupName, serviceName, apm, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// disableApmGloballyCreateRequest creates the DisableApmGlobally request. +func (client *ServicesClient) disableApmGloballyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apm ApmReference, options *ServicesClientBeginDisableApmGloballyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/disableApmGlobally" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, apm); err != nil { + return nil, err + } + return req, nil +} + +// DisableTestEndpoint - Disable test endpoint functionality for a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientDisableTestEndpointOptions contains the optional parameters for the ServicesClient.DisableTestEndpoint +// method. +func (client *ServicesClient) DisableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientDisableTestEndpointOptions) (ServicesClientDisableTestEndpointResponse, error) { + var err error + const operationName = "ServicesClient.DisableTestEndpoint" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableTestEndpointCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return ServicesClientDisableTestEndpointResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServicesClientDisableTestEndpointResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServicesClientDisableTestEndpointResponse{}, err + } + return ServicesClientDisableTestEndpointResponse{}, nil +} + +// disableTestEndpointCreateRequest creates the DisableTestEndpoint request. +func (client *ServicesClient) disableTestEndpointCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientDisableTestEndpointOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/disableTestEndpoint" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginEnableApmGlobally - Enable an APM globally. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - apm - The target APM for the enable operation +// - options - ServicesClientBeginEnableApmGloballyOptions contains the optional parameters for the ServicesClient.BeginEnableApmGlobally +// method. +func (client *ServicesClient) BeginEnableApmGlobally(ctx context.Context, resourceGroupName string, serviceName string, apm ApmReference, options *ServicesClientBeginEnableApmGloballyOptions) (*runtime.Poller[ServicesClientEnableApmGloballyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.enableApmGlobally(ctx, resourceGroupName, serviceName, apm, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientEnableApmGloballyResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServicesClientEnableApmGloballyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// EnableApmGlobally - Enable an APM globally. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ServicesClient) enableApmGlobally(ctx context.Context, resourceGroupName string, serviceName string, apm ApmReference, options *ServicesClientBeginEnableApmGloballyOptions) (*http.Response, error) { + var err error + const operationName = "ServicesClient.BeginEnableApmGlobally" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.enableApmGloballyCreateRequest(ctx, resourceGroupName, serviceName, apm, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// enableApmGloballyCreateRequest creates the EnableApmGlobally request. +func (client *ServicesClient) enableApmGloballyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apm ApmReference, options *ServicesClientBeginEnableApmGloballyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/enableApmGlobally" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, apm); err != nil { + return nil, err + } + return req, nil +} + +// EnableTestEndpoint - Enable test endpoint functionality for a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientEnableTestEndpointOptions contains the optional parameters for the ServicesClient.EnableTestEndpoint +// method. +func (client *ServicesClient) EnableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientEnableTestEndpointOptions) (ServicesClientEnableTestEndpointResponse, error) { + var err error + const operationName = "ServicesClient.EnableTestEndpoint" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.enableTestEndpointCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return ServicesClientEnableTestEndpointResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServicesClientEnableTestEndpointResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServicesClientEnableTestEndpointResponse{}, err + } + resp, err := client.enableTestEndpointHandleResponse(httpResp) + return resp, err +} + +// enableTestEndpointCreateRequest creates the EnableTestEndpoint request. +func (client *ServicesClient) enableTestEndpointCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientEnableTestEndpointOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/enableTestEndpoint" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// enableTestEndpointHandleResponse handles the EnableTestEndpoint response. +func (client *ServicesClient) enableTestEndpointHandleResponse(resp *http.Response) (ServicesClientEnableTestEndpointResponse, error) { + result := ServicesClientEnableTestEndpointResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TestKeys); err != nil { + return ServicesClientEnableTestEndpointResponse{}, err + } + return result, nil +} + +// BeginFlushVnetDNSSetting - Flush Virtual Network DNS settings for a VNET injected Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientBeginFlushVnetDNSSettingOptions contains the optional parameters for the ServicesClient.BeginFlushVnetDNSSetting +// method. +func (client *ServicesClient) BeginFlushVnetDNSSetting(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginFlushVnetDNSSettingOptions) (*runtime.Poller[ServicesClientFlushVnetDNSSettingResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.flushVnetDNSSetting(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientFlushVnetDNSSettingResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServicesClientFlushVnetDNSSettingResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// FlushVnetDNSSetting - Flush Virtual Network DNS settings for a VNET injected Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ServicesClient) flushVnetDNSSetting(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginFlushVnetDNSSettingOptions) (*http.Response, error) { + var err error + const operationName = "ServicesClient.BeginFlushVnetDNSSetting" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.flushVnetDNSSettingCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// flushVnetDNSSettingCreateRequest creates the FlushVnetDNSSetting request. +func (client *ServicesClient) flushVnetDNSSettingCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginFlushVnetDNSSettingOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/flushVirtualNetworkDnsSettings" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a Service and its properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. +func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error) { + var err error + const operationName = "ServicesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return ServicesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServicesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServicesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServicesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesClientGetResponse, error) { + result := ServicesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceResource); err != nil { + return ServicesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Handles requests to list all resources in a resource group. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - options - ServicesClientListOptions contains the optional parameters for the ServicesClient.NewListPager method. +func (client *ServicesClient) NewListPager(resourceGroupName string, options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ServicesClientListResponse]{ + More: func(page ServicesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServicesClientListResponse) (ServicesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServicesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ServicesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ServicesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ServicesClient) listHandleResponse(resp *http.Response) (ServicesClientListResponse, error) { + result := ServicesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceResourceList); err != nil { + return ServicesClientListResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - Handles requests to list all resources in a subscription. +// +// Generated from API version 2023-12-01 +// - options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager +// method. +func (client *ServicesClient) NewListBySubscriptionPager(options *ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[ServicesClientListBySubscriptionResponse]{ + More: func(page ServicesClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServicesClientListBySubscriptionResponse) (ServicesClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServicesClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return ServicesClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *ServicesClient) listBySubscriptionCreateRequest(ctx context.Context, options *ServicesClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *ServicesClient) listBySubscriptionHandleResponse(resp *http.Response) (ServicesClientListBySubscriptionResponse, error) { + result := ServicesClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceResourceList); err != nil { + return ServicesClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// ListGloballyEnabledApms - List globally enabled APMs for a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientListGloballyEnabledApmsOptions contains the optional parameters for the ServicesClient.ListGloballyEnabledApms +// method. +func (client *ServicesClient) ListGloballyEnabledApms(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListGloballyEnabledApmsOptions) (ServicesClientListGloballyEnabledApmsResponse, error) { + var err error + const operationName = "ServicesClient.ListGloballyEnabledApms" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listGloballyEnabledApmsCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return ServicesClientListGloballyEnabledApmsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServicesClientListGloballyEnabledApmsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServicesClientListGloballyEnabledApmsResponse{}, err + } + resp, err := client.listGloballyEnabledApmsHandleResponse(httpResp) + return resp, err +} + +// listGloballyEnabledApmsCreateRequest creates the ListGloballyEnabledApms request. +func (client *ServicesClient) listGloballyEnabledApmsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListGloballyEnabledApmsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listGloballyEnabledApms" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listGloballyEnabledApmsHandleResponse handles the ListGloballyEnabledApms response. +func (client *ServicesClient) listGloballyEnabledApmsHandleResponse(resp *http.Response) (ServicesClientListGloballyEnabledApmsResponse, error) { + result := ServicesClientListGloballyEnabledApmsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GloballyEnabledApms); err != nil { + return ServicesClientListGloballyEnabledApmsResponse{}, err + } + return result, nil +} + +// NewListSupportedApmTypesPager - List supported APM types for a Service. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientListSupportedApmTypesOptions contains the optional parameters for the ServicesClient.NewListSupportedApmTypesPager +// method. +func (client *ServicesClient) NewListSupportedApmTypesPager(resourceGroupName string, serviceName string, options *ServicesClientListSupportedApmTypesOptions) *runtime.Pager[ServicesClientListSupportedApmTypesResponse] { + return runtime.NewPager(runtime.PagingHandler[ServicesClientListSupportedApmTypesResponse]{ + More: func(page ServicesClientListSupportedApmTypesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServicesClientListSupportedApmTypesResponse) (ServicesClientListSupportedApmTypesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServicesClient.NewListSupportedApmTypesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSupportedApmTypesCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return ServicesClientListSupportedApmTypesResponse{}, err + } + return client.listSupportedApmTypesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSupportedApmTypesCreateRequest creates the ListSupportedApmTypes request. +func (client *ServicesClient) listSupportedApmTypesCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListSupportedApmTypesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/supportedApmTypes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSupportedApmTypesHandleResponse handles the ListSupportedApmTypes response. +func (client *ServicesClient) listSupportedApmTypesHandleResponse(resp *http.Response) (ServicesClientListSupportedApmTypesResponse, error) { + result := ServicesClientListSupportedApmTypesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SupportedApmTypes); err != nil { + return ServicesClientListSupportedApmTypesResponse{}, err + } + return result, nil +} + +// NewListSupportedServerVersionsPager - Lists all of the available server versions supported by Microsoft.AppPlatform provider. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientListSupportedServerVersionsOptions contains the optional parameters for the ServicesClient.NewListSupportedServerVersionsPager +// method. +func (client *ServicesClient) NewListSupportedServerVersionsPager(resourceGroupName string, serviceName string, options *ServicesClientListSupportedServerVersionsOptions) *runtime.Pager[ServicesClientListSupportedServerVersionsResponse] { + return runtime.NewPager(runtime.PagingHandler[ServicesClientListSupportedServerVersionsResponse]{ + More: func(page ServicesClientListSupportedServerVersionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServicesClientListSupportedServerVersionsResponse) (ServicesClientListSupportedServerVersionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServicesClient.NewListSupportedServerVersionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSupportedServerVersionsCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return ServicesClientListSupportedServerVersionsResponse{}, err + } + return client.listSupportedServerVersionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSupportedServerVersionsCreateRequest creates the ListSupportedServerVersions request. +func (client *ServicesClient) listSupportedServerVersionsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListSupportedServerVersionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/supportedServerVersions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSupportedServerVersionsHandleResponse handles the ListSupportedServerVersions response. +func (client *ServicesClient) listSupportedServerVersionsHandleResponse(resp *http.Response) (ServicesClientListSupportedServerVersionsResponse, error) { + result := ServicesClientListSupportedServerVersionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SupportedServerVersions); err != nil { + return ServicesClientListSupportedServerVersionsResponse{}, err + } + return result, nil +} + +// ListTestKeys - List test keys for a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientListTestKeysOptions contains the optional parameters for the ServicesClient.ListTestKeys method. +func (client *ServicesClient) ListTestKeys(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListTestKeysOptions) (ServicesClientListTestKeysResponse, error) { + var err error + const operationName = "ServicesClient.ListTestKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listTestKeysCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return ServicesClientListTestKeysResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServicesClientListTestKeysResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServicesClientListTestKeysResponse{}, err + } + resp, err := client.listTestKeysHandleResponse(httpResp) + return resp, err +} + +// listTestKeysCreateRequest creates the ListTestKeys request. +func (client *ServicesClient) listTestKeysCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListTestKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listTestKeys" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listTestKeysHandleResponse handles the ListTestKeys response. +func (client *ServicesClient) listTestKeysHandleResponse(resp *http.Response) (ServicesClientListTestKeysResponse, error) { + result := ServicesClientListTestKeysResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TestKeys); err != nil { + return ServicesClientListTestKeysResponse{}, err + } + return result, nil +} + +// RegenerateTestKey - Regenerate a test key for a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - regenerateTestKeyRequest - Parameters for the operation +// - options - ServicesClientRegenerateTestKeyOptions contains the optional parameters for the ServicesClient.RegenerateTestKey +// method. +func (client *ServicesClient) RegenerateTestKey(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest RegenerateTestKeyRequestPayload, options *ServicesClientRegenerateTestKeyOptions) (ServicesClientRegenerateTestKeyResponse, error) { + var err error + const operationName = "ServicesClient.RegenerateTestKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.regenerateTestKeyCreateRequest(ctx, resourceGroupName, serviceName, regenerateTestKeyRequest, options) + if err != nil { + return ServicesClientRegenerateTestKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServicesClientRegenerateTestKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServicesClientRegenerateTestKeyResponse{}, err + } + resp, err := client.regenerateTestKeyHandleResponse(httpResp) + return resp, err +} + +// regenerateTestKeyCreateRequest creates the RegenerateTestKey request. +func (client *ServicesClient) regenerateTestKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest RegenerateTestKeyRequestPayload, options *ServicesClientRegenerateTestKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/regenerateTestKey" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, regenerateTestKeyRequest); err != nil { + return nil, err + } + return req, nil +} + +// regenerateTestKeyHandleResponse handles the RegenerateTestKey response. +func (client *ServicesClient) regenerateTestKeyHandleResponse(resp *http.Response) (ServicesClientRegenerateTestKeyResponse, error) { + result := ServicesClientRegenerateTestKeyResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TestKeys); err != nil { + return ServicesClientRegenerateTestKeyResponse{}, err + } + return result, nil +} + +// BeginStart - Start a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientBeginStartOptions contains the optional parameters for the ServicesClient.BeginStart method. +func (client *ServicesClient) BeginStart(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*runtime.Poller[ServicesClientStartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.start(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServicesClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Start - Start a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ServicesClient) start(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "ServicesClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startCreateRequest creates the Start request. +func (client *ServicesClient) startCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/start" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStop - Stop a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - ServicesClientBeginStopOptions contains the optional parameters for the ServicesClient.BeginStop method. +func (client *ServicesClient) BeginStop(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*runtime.Poller[ServicesClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServicesClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Stop - Stop a Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ServicesClient) stop(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "ServicesClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopCreateRequest creates the Stop request. +func (client *ServicesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/stop" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdate - Operation to update an exiting Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - resource - Parameters for the update operation +// - options - ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method. +func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*runtime.Poller[ServicesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, serviceName, resource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServicesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServicesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Operation to update an exiting Service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *ServicesClient) update(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServicesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, resource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ServicesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, resource); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/skus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/skus_client.go new file mode 100644 index 00000000..4ea31d81 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/skus_client.go @@ -0,0 +1,99 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SKUsClient contains the methods for the SKUs group. +// Don't use this type directly, use NewSKUsClient() instead. +type SKUsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSKUsClient creates a new instance of SKUsClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SKUsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Lists all of the available skus of the Microsoft.AppPlatform provider. +// +// Generated from API version 2023-12-01 +// - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. +func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ + More: func(page SKUsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SKUsClientListResponse) (SKUsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SKUsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return SKUsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/skus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SKUsClient) listHandleResponse(resp *http.Response) (SKUsClientListResponse, error) { + result := SKUsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceSKUCollection); err != nil { + return SKUsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/storages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/storages_client.go new file mode 100644 index 00000000..5ac3920f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/storages_client.go @@ -0,0 +1,347 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// StoragesClient contains the methods for the Storages group. +// Don't use this type directly, use NewStoragesClient() instead. +type StoragesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewStoragesClient creates a new instance of StoragesClient with the specified values. +// - subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms +// part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewStoragesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StoragesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &StoragesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update storage resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - storageName - The name of the storage resource. +// - storageResource - Parameters for the create or update operation +// - options - StoragesClientBeginCreateOrUpdateOptions contains the optional parameters for the StoragesClient.BeginCreateOrUpdate +// method. +func (client *StoragesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*runtime.Poller[StoragesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, storageName, storageResource, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StoragesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StoragesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update storage resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *StoragesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "StoragesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, storageName, storageResource, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *StoragesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if storageName == "" { + return nil, errors.New("parameter storageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, storageResource); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the storage resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - storageName - The name of the storage resource. +// - options - StoragesClientBeginDeleteOptions contains the optional parameters for the StoragesClient.BeginDelete method. +func (client *StoragesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*runtime.Poller[StoragesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, storageName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StoragesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StoragesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the storage resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +func (client *StoragesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "StoragesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, storageName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *StoragesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if storageName == "" { + return nil, errors.New("parameter storageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the storage resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - storageName - The name of the storage resource. +// - options - StoragesClientGetOptions contains the optional parameters for the StoragesClient.Get method. +func (client *StoragesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientGetOptions) (StoragesClientGetResponse, error) { + var err error + const operationName = "StoragesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, storageName, options) + if err != nil { + return StoragesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StoragesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StoragesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *StoragesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if storageName == "" { + return nil, errors.New("parameter storageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *StoragesClient) getHandleResponse(resp *http.Response) (StoragesClientGetResponse, error) { + result := StoragesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StorageResource); err != nil { + return StoragesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all the storages of one Azure Spring Apps resource. +// +// Generated from API version 2023-12-01 +// - resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure +// Resource Manager API or the portal. +// - serviceName - The name of the Service resource. +// - options - StoragesClientListOptions contains the optional parameters for the StoragesClient.NewListPager method. +func (client *StoragesClient) NewListPager(resourceGroupName string, serviceName string, options *StoragesClientListOptions) *runtime.Pager[StoragesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[StoragesClientListResponse]{ + More: func(page StoragesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StoragesClientListResponse) (StoragesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StoragesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return StoragesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *StoragesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *StoragesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-12-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *StoragesClient) listHandleResponse(resp *http.Response) (StoragesClientListResponse, error) { + result := StoragesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StorageResourceCollection); err != nil { + return StoragesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/time_rfc3339.go new file mode 100644 index 00000000..538dce64 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2/time_rfc3339.go @@ -0,0 +1,86 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappplatform + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) + +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON + if tzOffsetRegex.Match(data) { + layout = dateTimeJSON + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime + if tzOffsetRegex.Match(data) { + layout = time.RFC3339Nano + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || strings.EqualFold(string(data), "null") { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_apiportalcustomdomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_apiportalcustomdomains_client.go deleted file mode 100644 index b19034f2..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_apiportalcustomdomains_client.go +++ /dev/null @@ -1,353 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// APIPortalCustomDomainsClient contains the methods for the APIPortalCustomDomains group. -// Don't use this type directly, use NewAPIPortalCustomDomainsClient() instead. -type APIPortalCustomDomainsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAPIPortalCustomDomainsClient creates a new instance of APIPortalCustomDomainsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAPIPortalCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIPortalCustomDomainsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &APIPortalCustomDomainsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update the API portal custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// domainName - The name of the API portal custom domain. -// apiPortalCustomDomainResource - The API portal custom domain for the create or update operation -// options - APIPortalCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginCreateOrUpdate -// method. -func (client *APIPortalCustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalCustomDomainsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apiPortalName, domainName, apiPortalCustomDomainResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[APIPortalCustomDomainsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[APIPortalCustomDomainsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update the API portal custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *APIPortalCustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, apiPortalCustomDomainResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *APIPortalCustomDomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, apiPortalCustomDomainResource APIPortalCustomDomainResource, options *APIPortalCustomDomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, apiPortalCustomDomainResource) -} - -// BeginDelete - Delete the API portal custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// domainName - The name of the API portal custom domain. -// options - APIPortalCustomDomainsClientBeginDeleteOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginDelete -// method. -func (client *APIPortalCustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[APIPortalCustomDomainsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[APIPortalCustomDomainsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[APIPortalCustomDomainsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the API portal custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *APIPortalCustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *APIPortalCustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the API portal custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// domainName - The name of the API portal custom domain. -// options - APIPortalCustomDomainsClientGetOptions contains the optional parameters for the APIPortalCustomDomainsClient.Get -// method. -func (client *APIPortalCustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientGetOptions) (APIPortalCustomDomainsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, domainName, options) - if err != nil { - return APIPortalCustomDomainsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return APIPortalCustomDomainsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPortalCustomDomainsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *APIPortalCustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, domainName string, options *APIPortalCustomDomainsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains/{domainName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *APIPortalCustomDomainsClient) getHandleResponse(resp *http.Response) (APIPortalCustomDomainsClientGetResponse, error) { - result := APIPortalCustomDomainsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalCustomDomainResource); err != nil { - return APIPortalCustomDomainsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handle requests to list all API portal custom domains. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// options - APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.List -// method. -func (client *APIPortalCustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalCustomDomainsClientListOptions) *runtime.Pager[APIPortalCustomDomainsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[APIPortalCustomDomainsClientListResponse]{ - More: func(page APIPortalCustomDomainsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *APIPortalCustomDomainsClientListResponse) (APIPortalCustomDomainsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIPortalCustomDomainsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return APIPortalCustomDomainsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPortalCustomDomainsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *APIPortalCustomDomainsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalCustomDomainsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/domains" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *APIPortalCustomDomainsClient) listHandleResponse(resp *http.Response) (APIPortalCustomDomainsClientListResponse, error) { - result := APIPortalCustomDomainsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalCustomDomainResourceCollection); err != nil { - return APIPortalCustomDomainsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_apiportals_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_apiportals_client.go deleted file mode 100644 index 5e737b9a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_apiportals_client.go +++ /dev/null @@ -1,394 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// APIPortalsClient contains the methods for the APIPortals group. -// Don't use this type directly, use NewAPIPortalsClient() instead. -type APIPortalsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAPIPortalsClient creates a new instance of APIPortalsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAPIPortalsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIPortalsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &APIPortalsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create the default API portal or update the existing API portal. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// apiPortalResource - The API portal for the create or update operation -// options - APIPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalsClient.BeginCreateOrUpdate -// method. -func (client *APIPortalsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*runtime.Poller[APIPortalsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, apiPortalName, apiPortalResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[APIPortalsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[APIPortalsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create the default API portal or update the existing API portal. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *APIPortalsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, apiPortalResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *APIPortalsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, apiPortalResource APIPortalResource, options *APIPortalsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, apiPortalResource) -} - -// BeginDelete - Delete the default API portal. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// options - APIPortalsClientBeginDeleteOptions contains the optional parameters for the APIPortalsClient.BeginDelete method. -func (client *APIPortalsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*runtime.Poller[APIPortalsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, apiPortalName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[APIPortalsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[APIPortalsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the default API portal. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *APIPortalsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *APIPortalsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the API portal and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// options - APIPortalsClientGetOptions contains the optional parameters for the APIPortalsClient.Get method. -func (client *APIPortalsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientGetOptions) (APIPortalsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, options) - if err != nil { - return APIPortalsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return APIPortalsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPortalsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *APIPortalsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, options *APIPortalsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *APIPortalsClient) getHandleResponse(resp *http.Response) (APIPortalsClientGetResponse, error) { - result := APIPortalsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalResource); err != nil { - return APIPortalsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.List method. -func (client *APIPortalsClient) NewListPager(resourceGroupName string, serviceName string, options *APIPortalsClientListOptions) *runtime.Pager[APIPortalsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[APIPortalsClientListResponse]{ - More: func(page APIPortalsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *APIPortalsClientListResponse) (APIPortalsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return APIPortalsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return APIPortalsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPortalsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *APIPortalsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *APIPortalsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *APIPortalsClient) listHandleResponse(resp *http.Response) (APIPortalsClientListResponse, error) { - result := APIPortalsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIPortalResourceCollection); err != nil { - return APIPortalsClientListResponse{}, err - } - return result, nil -} - -// ValidateDomain - Check the domains are valid as well as not in use. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// apiPortalName - The name of API portal. -// validatePayload - Custom domain payload to be validated -// options - APIPortalsClientValidateDomainOptions contains the optional parameters for the APIPortalsClient.ValidateDomain -// method. -func (client *APIPortalsClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, validatePayload CustomDomainValidatePayload, options *APIPortalsClientValidateDomainOptions) (APIPortalsClientValidateDomainResponse, error) { - req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, apiPortalName, validatePayload, options) - if err != nil { - return APIPortalsClientValidateDomainResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return APIPortalsClientValidateDomainResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return APIPortalsClientValidateDomainResponse{}, runtime.NewResponseError(resp) - } - return client.validateDomainHandleResponse(resp) -} - -// validateDomainCreateRequest creates the ValidateDomain request. -func (client *APIPortalsClient) validateDomainCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, apiPortalName string, validatePayload CustomDomainValidatePayload, options *APIPortalsClientValidateDomainOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apiPortals/{apiPortalName}/validateDomain" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if apiPortalName == "" { - return nil, errors.New("parameter apiPortalName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{apiPortalName}", url.PathEscape(apiPortalName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validatePayload) -} - -// validateDomainHandleResponse handles the ValidateDomain response. -func (client *APIPortalsClient) validateDomainHandleResponse(resp *http.Response) (APIPortalsClientValidateDomainResponse, error) { - result := APIPortalsClientValidateDomainResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainValidateResult); err != nil { - return APIPortalsClientValidateDomainResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_apps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_apps_client.go deleted file mode 100644 index d6b3b0ff..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_apps_client.go +++ /dev/null @@ -1,602 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AppsClient contains the methods for the Apps group. -// Don't use this type directly, use NewAppsClient() instead. -type AppsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAppsClient creates a new instance of AppsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AppsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AppsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create a new App or update an exiting App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// appResource - Parameters for the create or update operation -// options - AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate -// method. -func (client *AppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AppsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, appResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AppsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[AppsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create a new App or update an exiting App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *AppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, appResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *AppsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appResource) -} - -// BeginDelete - Operation to delete an App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method. -func (client *AppsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*runtime.Poller[AppsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AppsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[AppsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Operation to delete an App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *AppsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *AppsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get an App and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - AppsClientGetOptions contains the optional parameters for the AppsClient.Get method. -func (client *AppsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetOptions) (AppsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, options) - if err != nil { - return AppsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AppsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AppsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *AppsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - if options != nil && options.SyncStatus != nil { - reqQP.Set("syncStatus", *options.SyncStatus) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AppsClient) getHandleResponse(resp *http.Response) (AppsClientGetResponse, error) { - result := AppsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppResource); err != nil { - return AppsClientGetResponse{}, err - } - return result, nil -} - -// GetResourceUploadURL - Get an resource upload URL for an App, which may be artifacts or source archive. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL -// method. -func (client *AppsClient) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetResourceUploadURLOptions) (AppsClientGetResourceUploadURLResponse, error) { - req, err := client.getResourceUploadURLCreateRequest(ctx, resourceGroupName, serviceName, appName, options) - if err != nil { - return AppsClientGetResourceUploadURLResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AppsClientGetResourceUploadURLResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AppsClientGetResourceUploadURLResponse{}, runtime.NewResponseError(resp) - } - return client.getResourceUploadURLHandleResponse(resp) -} - -// getResourceUploadURLCreateRequest creates the GetResourceUploadURL request. -func (client *AppsClient) getResourceUploadURLCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *AppsClientGetResourceUploadURLOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getResourceUploadURLHandleResponse handles the GetResourceUploadURL response. -func (client *AppsClient) getResourceUploadURLHandleResponse(resp *http.Response) (AppsClientGetResourceUploadURLResponse, error) { - result := AppsClientGetResourceUploadURLResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceUploadDefinition); err != nil { - return AppsClientGetResourceUploadURLResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - AppsClientListOptions contains the optional parameters for the AppsClient.List method. -func (client *AppsClient) NewListPager(resourceGroupName string, serviceName string, options *AppsClientListOptions) *runtime.Pager[AppsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AppsClientListResponse]{ - More: func(page AppsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AppsClientListResponse) (AppsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AppsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AppsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AppsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AppsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *AppsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AppsClient) listHandleResponse(resp *http.Response) (AppsClientListResponse, error) { - result := AppsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppResourceCollection); err != nil { - return AppsClientListResponse{}, err - } - return result, nil -} - -// BeginSetActiveDeployments - Set existing Deployment under the app as active -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// activeDeploymentCollection - A list of Deployment name to be active. -// options - AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments -// method. -func (client *AppsClient) BeginSetActiveDeployments(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*runtime.Poller[AppsClientSetActiveDeploymentsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.setActiveDeployments(ctx, resourceGroupName, serviceName, appName, activeDeploymentCollection, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AppsClientSetActiveDeploymentsResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[AppsClientSetActiveDeploymentsResponse](options.ResumeToken, client.pl, nil) - } -} - -// SetActiveDeployments - Set existing Deployment under the app as active -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *AppsClient) setActiveDeployments(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*http.Response, error) { - req, err := client.setActiveDeploymentsCreateRequest(ctx, resourceGroupName, serviceName, appName, activeDeploymentCollection, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// setActiveDeploymentsCreateRequest creates the SetActiveDeployments request. -func (client *AppsClient) setActiveDeploymentsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, activeDeploymentCollection ActiveDeploymentCollection, options *AppsClientBeginSetActiveDeploymentsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/setActiveDeployments" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, activeDeploymentCollection) -} - -// BeginUpdate - Operation to update an exiting App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// appResource - Parameters for the update operation -// options - AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method. -func (client *AppsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*runtime.Poller[AppsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, serviceName, appName, appResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AppsClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[AppsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Operation to update an exiting App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *AppsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, appResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *AppsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource, options *AppsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appResource) -} - -// ValidateDomain - Check the resource name is valid as well as not in use. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// validatePayload - Custom domain payload to be validated -// options - AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method. -func (client *AppsClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, appName string, validatePayload CustomDomainValidatePayload, options *AppsClientValidateDomainOptions) (AppsClientValidateDomainResponse, error) { - req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, appName, validatePayload, options) - if err != nil { - return AppsClientValidateDomainResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AppsClientValidateDomainResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AppsClientValidateDomainResponse{}, runtime.NewResponseError(resp) - } - return client.validateDomainHandleResponse(resp) -} - -// validateDomainCreateRequest creates the ValidateDomain request. -func (client *AppsClient) validateDomainCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, validatePayload CustomDomainValidatePayload, options *AppsClientValidateDomainOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/validateDomain" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validatePayload) -} - -// validateDomainHandleResponse handles the ValidateDomain response. -func (client *AppsClient) validateDomainHandleResponse(resp *http.Response) (AppsClientValidateDomainResponse, error) { - result := AppsClientValidateDomainResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainValidateResult); err != nil { - return AppsClientValidateDomainResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_bindings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_bindings_client.go deleted file mode 100644 index b2f0cdad..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_bindings_client.go +++ /dev/null @@ -1,426 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BindingsClient contains the methods for the Bindings group. -// Don't use this type directly, use NewBindingsClient() instead. -type BindingsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBindingsClient creates a new instance of BindingsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBindingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BindingsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BindingsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create a new Binding or update an exiting Binding. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// bindingName - The name of the Binding resource. -// bindingResource - Parameters for the create or update operation -// options - BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate -// method. -func (client *BindingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BindingsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BindingsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BindingsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create a new Binding or update an exiting Binding. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *BindingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *BindingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if bindingName == "" { - return nil, errors.New("parameter bindingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bindingName}", url.PathEscape(bindingName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, bindingResource) -} - -// BeginDelete - Operation to delete a Binding. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// bindingName - The name of the Binding resource. -// options - BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method. -func (client *BindingsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*runtime.Poller[BindingsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, bindingName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BindingsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BindingsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Operation to delete a Binding. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *BindingsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *BindingsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if bindingName == "" { - return nil, errors.New("parameter bindingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bindingName}", url.PathEscape(bindingName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a Binding and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// bindingName - The name of the Binding resource. -// options - BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method. -func (client *BindingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientGetOptions) (BindingsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, options) - if err != nil { - return BindingsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BindingsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BindingsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BindingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, options *BindingsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if bindingName == "" { - return nil, errors.New("parameter bindingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bindingName}", url.PathEscape(bindingName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BindingsClient) getHandleResponse(resp *http.Response) (BindingsClientGetResponse, error) { - result := BindingsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BindingResource); err != nil { - return BindingsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in an App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - BindingsClientListOptions contains the optional parameters for the BindingsClient.List method. -func (client *BindingsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *BindingsClientListOptions) *runtime.Pager[BindingsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BindingsClientListResponse]{ - More: func(page BindingsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BindingsClientListResponse) (BindingsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, appName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BindingsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BindingsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BindingsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BindingsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *BindingsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BindingsClient) listHandleResponse(resp *http.Response) (BindingsClientListResponse, error) { - result := BindingsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BindingResourceCollection); err != nil { - return BindingsClientListResponse{}, err - } - return result, nil -} - -// BeginUpdate - Operation to update an exiting Binding. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// bindingName - The name of the Binding resource. -// bindingResource - Parameters for the update operation -// options - BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method. -func (client *BindingsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*runtime.Poller[BindingsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BindingsClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BindingsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Operation to update an exiting Binding. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *BindingsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, bindingName, bindingResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *BindingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource, options *BindingsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if bindingName == "" { - return nil, errors.New("parameter bindingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bindingName}", url.PathEscape(bindingName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, bindingResource) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildpackbinding_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildpackbinding_client.go deleted file mode 100644 index ab1ac9e4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildpackbinding_client.go +++ /dev/null @@ -1,371 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BuildpackBindingClient contains the methods for the BuildpackBinding group. -// Don't use this type directly, use NewBuildpackBindingClient() instead. -type BuildpackBindingClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBuildpackBindingClient creates a new instance of BuildpackBindingClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBuildpackBindingClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildpackBindingClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BuildpackBindingClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update a buildpack binding. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// buildpackBindingName - The name of the Buildpack Binding Name -// buildpackBinding - The target buildpack binding for the create or update operation -// options - BuildpackBindingClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildpackBindingClient.BeginCreateOrUpdate -// method. -func (client *BuildpackBindingClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildpackBindingClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, buildpackBinding, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BuildpackBindingClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BuildpackBindingClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update a buildpack binding. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *BuildpackBindingClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, buildpackBinding, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *BuildpackBindingClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, buildpackBinding BuildpackBindingResource, options *BuildpackBindingClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - if buildpackBindingName == "" { - return nil, errors.New("parameter buildpackBindingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildpackBindingName}", url.PathEscape(buildpackBindingName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, buildpackBinding) -} - -// BeginDelete - Operation to delete a Buildpack Binding -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// buildpackBindingName - The name of the Buildpack Binding Name -// options - BuildpackBindingClientBeginDeleteOptions contains the optional parameters for the BuildpackBindingClient.BeginDelete -// method. -func (client *BuildpackBindingClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*runtime.Poller[BuildpackBindingClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BuildpackBindingClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BuildpackBindingClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Operation to delete a Buildpack Binding -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *BuildpackBindingClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *BuildpackBindingClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - if buildpackBindingName == "" { - return nil, errors.New("parameter buildpackBindingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildpackBindingName}", url.PathEscape(buildpackBindingName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a buildpack binding by name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// buildpackBindingName - The name of the Buildpack Binding Name -// options - BuildpackBindingClientGetOptions contains the optional parameters for the BuildpackBindingClient.Get method. -func (client *BuildpackBindingClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientGetOptions) (BuildpackBindingClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, buildpackBindingName, options) - if err != nil { - return BuildpackBindingClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildpackBindingClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildpackBindingClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BuildpackBindingClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, buildpackBindingName string, options *BuildpackBindingClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - if buildpackBindingName == "" { - return nil, errors.New("parameter buildpackBindingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildpackBindingName}", url.PathEscape(buildpackBindingName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BuildpackBindingClient) getHandleResponse(resp *http.Response) (BuildpackBindingClientGetResponse, error) { - result := BuildpackBindingClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildpackBindingResource); err != nil { - return BuildpackBindingClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all buildpack bindings in a builder. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// options - BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.List method. -func (client *BuildpackBindingClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildpackBindingClientListOptions) *runtime.Pager[BuildpackBindingClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BuildpackBindingClientListResponse]{ - More: func(page BuildpackBindingClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BuildpackBindingClientListResponse) (BuildpackBindingClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BuildpackBindingClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildpackBindingClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildpackBindingClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BuildpackBindingClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildpackBindingClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BuildpackBindingClient) listHandleResponse(resp *http.Response) (BuildpackBindingClientListResponse, error) { - result := BuildpackBindingClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildpackBindingResourceCollection); err != nil { - return BuildpackBindingClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildservice_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildservice_client.go deleted file mode 100644 index 15896314..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildservice_client.go +++ /dev/null @@ -1,953 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BuildServiceClient contains the methods for the BuildService group. -// Don't use this type directly, use NewBuildServiceClient() instead. -type BuildServiceClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBuildServiceClient creates a new instance of BuildServiceClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBuildServiceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BuildServiceClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdateBuild - Create or update a KPack build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildName - The name of the build resource. -// buildParam - Parameters for the create or update operation -// options - BuildServiceClientCreateOrUpdateBuildOptions contains the optional parameters for the BuildServiceClient.CreateOrUpdateBuild -// method. -func (client *BuildServiceClient) CreateOrUpdateBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildParam Build, options *BuildServiceClientCreateOrUpdateBuildOptions) (BuildServiceClientCreateOrUpdateBuildResponse, error) { - req, err := client.createOrUpdateBuildCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildParam, options) - if err != nil { - return BuildServiceClientCreateOrUpdateBuildResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientCreateOrUpdateBuildResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return BuildServiceClientCreateOrUpdateBuildResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateBuildHandleResponse(resp) -} - -// createOrUpdateBuildCreateRequest creates the CreateOrUpdateBuild request. -func (client *BuildServiceClient) createOrUpdateBuildCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildParam Build, options *BuildServiceClientCreateOrUpdateBuildOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if buildName == "" { - return nil, errors.New("parameter buildName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, buildParam) -} - -// createOrUpdateBuildHandleResponse handles the CreateOrUpdateBuild response. -func (client *BuildServiceClient) createOrUpdateBuildHandleResponse(resp *http.Response) (BuildServiceClientCreateOrUpdateBuildResponse, error) { - result := BuildServiceClientCreateOrUpdateBuildResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Build); err != nil { - return BuildServiceClientCreateOrUpdateBuildResponse{}, err - } - return result, nil -} - -// GetBuild - Get a KPack build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildName - The name of the build resource. -// options - BuildServiceClientGetBuildOptions contains the optional parameters for the BuildServiceClient.GetBuild method. -func (client *BuildServiceClient) GetBuild(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientGetBuildOptions) (BuildServiceClientGetBuildResponse, error) { - req, err := client.getBuildCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, options) - if err != nil { - return BuildServiceClientGetBuildResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientGetBuildResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientGetBuildResponse{}, runtime.NewResponseError(resp) - } - return client.getBuildHandleResponse(resp) -} - -// getBuildCreateRequest creates the GetBuild request. -func (client *BuildServiceClient) getBuildCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientGetBuildOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if buildName == "" { - return nil, errors.New("parameter buildName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBuildHandleResponse handles the GetBuild response. -func (client *BuildServiceClient) getBuildHandleResponse(resp *http.Response) (BuildServiceClientGetBuildResponse, error) { - result := BuildServiceClientGetBuildResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Build); err != nil { - return BuildServiceClientGetBuildResponse{}, err - } - return result, nil -} - -// GetBuildResult - Get a KPack build result. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildName - The name of the build resource. -// buildResultName - The name of the build result resource. -// options - BuildServiceClientGetBuildResultOptions contains the optional parameters for the BuildServiceClient.GetBuildResult -// method. -func (client *BuildServiceClient) GetBuildResult(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultOptions) (BuildServiceClientGetBuildResultResponse, error) { - req, err := client.getBuildResultCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName, options) - if err != nil { - return BuildServiceClientGetBuildResultResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientGetBuildResultResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientGetBuildResultResponse{}, runtime.NewResponseError(resp) - } - return client.getBuildResultHandleResponse(resp) -} - -// getBuildResultCreateRequest creates the GetBuildResult request. -func (client *BuildServiceClient) getBuildResultCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if buildName == "" { - return nil, errors.New("parameter buildName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) - if buildResultName == "" { - return nil, errors.New("parameter buildResultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildResultName}", url.PathEscape(buildResultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBuildResultHandleResponse handles the GetBuildResult response. -func (client *BuildServiceClient) getBuildResultHandleResponse(resp *http.Response) (BuildServiceClientGetBuildResultResponse, error) { - result := BuildServiceClientGetBuildResultResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildResult); err != nil { - return BuildServiceClientGetBuildResultResponse{}, err - } - return result, nil -} - -// GetBuildResultLog - Get a KPack build result log download URL. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildName - The name of the build resource. -// buildResultName - The name of the build result resource. -// options - BuildServiceClientGetBuildResultLogOptions contains the optional parameters for the BuildServiceClient.GetBuildResultLog -// method. -func (client *BuildServiceClient) GetBuildResultLog(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultLogOptions) (BuildServiceClientGetBuildResultLogResponse, error) { - req, err := client.getBuildResultLogCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, buildResultName, options) - if err != nil { - return BuildServiceClientGetBuildResultLogResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientGetBuildResultLogResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientGetBuildResultLogResponse{}, runtime.NewResponseError(resp) - } - return client.getBuildResultLogHandleResponse(resp) -} - -// getBuildResultLogCreateRequest creates the GetBuildResultLog request. -func (client *BuildServiceClient) getBuildResultLogCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, buildResultName string, options *BuildServiceClientGetBuildResultLogOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results/{buildResultName}/getLogFileUrl" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if buildName == "" { - return nil, errors.New("parameter buildName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) - if buildResultName == "" { - return nil, errors.New("parameter buildResultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildResultName}", url.PathEscape(buildResultName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBuildResultLogHandleResponse handles the GetBuildResultLog response. -func (client *BuildServiceClient) getBuildResultLogHandleResponse(resp *http.Response) (BuildServiceClientGetBuildResultLogResponse, error) { - result := BuildServiceClientGetBuildResultLogResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildResultLog); err != nil { - return BuildServiceClientGetBuildResultLogResponse{}, err - } - return result, nil -} - -// GetBuildService - Get a build service resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceClientGetBuildServiceOptions contains the optional parameters for the BuildServiceClient.GetBuildService -// method. -func (client *BuildServiceClient) GetBuildService(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetBuildServiceOptions) (BuildServiceClientGetBuildServiceResponse, error) { - req, err := client.getBuildServiceCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) - if err != nil { - return BuildServiceClientGetBuildServiceResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientGetBuildServiceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientGetBuildServiceResponse{}, runtime.NewResponseError(resp) - } - return client.getBuildServiceHandleResponse(resp) -} - -// getBuildServiceCreateRequest creates the GetBuildService request. -func (client *BuildServiceClient) getBuildServiceCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetBuildServiceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBuildServiceHandleResponse handles the GetBuildService response. -func (client *BuildServiceClient) getBuildServiceHandleResponse(resp *http.Response) (BuildServiceClientGetBuildServiceResponse, error) { - result := BuildServiceClientGetBuildServiceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildService); err != nil { - return BuildServiceClientGetBuildServiceResponse{}, err - } - return result, nil -} - -// GetResourceUploadURL - Get an resource upload URL for build service, which may be artifacts or source archive. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceClientGetResourceUploadURLOptions contains the optional parameters for the BuildServiceClient.GetResourceUploadURL -// method. -func (client *BuildServiceClient) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetResourceUploadURLOptions) (BuildServiceClientGetResourceUploadURLResponse, error) { - req, err := client.getResourceUploadURLCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) - if err != nil { - return BuildServiceClientGetResourceUploadURLResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientGetResourceUploadURLResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientGetResourceUploadURLResponse{}, runtime.NewResponseError(resp) - } - return client.getResourceUploadURLHandleResponse(resp) -} - -// getResourceUploadURLCreateRequest creates the GetResourceUploadURL request. -func (client *BuildServiceClient) getResourceUploadURLCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientGetResourceUploadURLOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/getResourceUploadUrl" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getResourceUploadURLHandleResponse handles the GetResourceUploadURL response. -func (client *BuildServiceClient) getResourceUploadURLHandleResponse(resp *http.Response) (BuildServiceClientGetResourceUploadURLResponse, error) { - result := BuildServiceClientGetResourceUploadURLResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceUploadDefinition); err != nil { - return BuildServiceClientGetResourceUploadURLResponse{}, err - } - return result, nil -} - -// GetSupportedBuildpack - Get the supported buildpack resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildpackName - The name of the buildpack resource. -// options - BuildServiceClientGetSupportedBuildpackOptions contains the optional parameters for the BuildServiceClient.GetSupportedBuildpack -// method. -func (client *BuildServiceClient) GetSupportedBuildpack(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildpackName string, options *BuildServiceClientGetSupportedBuildpackOptions) (BuildServiceClientGetSupportedBuildpackResponse, error) { - req, err := client.getSupportedBuildpackCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildpackName, options) - if err != nil { - return BuildServiceClientGetSupportedBuildpackResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientGetSupportedBuildpackResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientGetSupportedBuildpackResponse{}, runtime.NewResponseError(resp) - } - return client.getSupportedBuildpackHandleResponse(resp) -} - -// getSupportedBuildpackCreateRequest creates the GetSupportedBuildpack request. -func (client *BuildServiceClient) getSupportedBuildpackCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildpackName string, options *BuildServiceClientGetSupportedBuildpackOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks/{buildpackName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if buildpackName == "" { - return nil, errors.New("parameter buildpackName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildpackName}", url.PathEscape(buildpackName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSupportedBuildpackHandleResponse handles the GetSupportedBuildpack response. -func (client *BuildServiceClient) getSupportedBuildpackHandleResponse(resp *http.Response) (BuildServiceClientGetSupportedBuildpackResponse, error) { - result := BuildServiceClientGetSupportedBuildpackResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SupportedBuildpackResource); err != nil { - return BuildServiceClientGetSupportedBuildpackResponse{}, err - } - return result, nil -} - -// GetSupportedStack - Get the supported stack resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// stackName - The name of the stack resource. -// options - BuildServiceClientGetSupportedStackOptions contains the optional parameters for the BuildServiceClient.GetSupportedStack -// method. -func (client *BuildServiceClient) GetSupportedStack(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, stackName string, options *BuildServiceClientGetSupportedStackOptions) (BuildServiceClientGetSupportedStackResponse, error) { - req, err := client.getSupportedStackCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, stackName, options) - if err != nil { - return BuildServiceClientGetSupportedStackResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientGetSupportedStackResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientGetSupportedStackResponse{}, runtime.NewResponseError(resp) - } - return client.getSupportedStackHandleResponse(resp) -} - -// getSupportedStackCreateRequest creates the GetSupportedStack request. -func (client *BuildServiceClient) getSupportedStackCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, stackName string, options *BuildServiceClientGetSupportedStackOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks/{stackName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if stackName == "" { - return nil, errors.New("parameter stackName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{stackName}", url.PathEscape(stackName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSupportedStackHandleResponse handles the GetSupportedStack response. -func (client *BuildServiceClient) getSupportedStackHandleResponse(resp *http.Response) (BuildServiceClientGetSupportedStackResponse, error) { - result := BuildServiceClientGetSupportedStackResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SupportedStackResource); err != nil { - return BuildServiceClientGetSupportedStackResponse{}, err - } - return result, nil -} - -// NewListBuildResultsPager - List KPack build results. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// buildName - The name of the build resource. -// options - BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.ListBuildResults -// method. -func (client *BuildServiceClient) NewListBuildResultsPager(resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientListBuildResultsOptions) *runtime.Pager[BuildServiceClientListBuildResultsResponse] { - return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildResultsResponse]{ - More: func(page BuildServiceClientListBuildResultsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BuildServiceClientListBuildResultsResponse) (BuildServiceClientListBuildResultsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBuildResultsCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, buildName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BuildServiceClientListBuildResultsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientListBuildResultsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientListBuildResultsResponse{}, runtime.NewResponseError(resp) - } - return client.listBuildResultsHandleResponse(resp) - }, - }) -} - -// listBuildResultsCreateRequest creates the ListBuildResults request. -func (client *BuildServiceClient) listBuildResultsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, buildName string, options *BuildServiceClientListBuildResultsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if buildName == "" { - return nil, errors.New("parameter buildName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildName}", url.PathEscape(buildName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBuildResultsHandleResponse handles the ListBuildResults response. -func (client *BuildServiceClient) listBuildResultsHandleResponse(resp *http.Response) (BuildServiceClientListBuildResultsResponse, error) { - result := BuildServiceClientListBuildResultsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildResultCollection); err != nil { - return BuildServiceClientListBuildResultsResponse{}, err - } - return result, nil -} - -// NewListBuildServicesPager - List build services resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.ListBuildServices -// method. -func (client *BuildServiceClient) NewListBuildServicesPager(resourceGroupName string, serviceName string, options *BuildServiceClientListBuildServicesOptions) *runtime.Pager[BuildServiceClientListBuildServicesResponse] { - return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildServicesResponse]{ - More: func(page BuildServiceClientListBuildServicesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BuildServiceClientListBuildServicesResponse) (BuildServiceClientListBuildServicesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBuildServicesCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BuildServiceClientListBuildServicesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientListBuildServicesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientListBuildServicesResponse{}, runtime.NewResponseError(resp) - } - return client.listBuildServicesHandleResponse(resp) - }, - }) -} - -// listBuildServicesCreateRequest creates the ListBuildServices request. -func (client *BuildServiceClient) listBuildServicesCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *BuildServiceClientListBuildServicesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBuildServicesHandleResponse handles the ListBuildServices response. -func (client *BuildServiceClient) listBuildServicesHandleResponse(resp *http.Response) (BuildServiceClientListBuildServicesResponse, error) { - result := BuildServiceClientListBuildServicesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildServiceCollection); err != nil { - return BuildServiceClientListBuildServicesResponse{}, err - } - return result, nil -} - -// NewListBuildsPager - List KPack builds. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.ListBuilds method. -func (client *BuildServiceClient) NewListBuildsPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListBuildsOptions) *runtime.Pager[BuildServiceClientListBuildsResponse] { - return runtime.NewPager(runtime.PagingHandler[BuildServiceClientListBuildsResponse]{ - More: func(page BuildServiceClientListBuildsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BuildServiceClientListBuildsResponse) (BuildServiceClientListBuildsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBuildsCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BuildServiceClientListBuildsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientListBuildsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientListBuildsResponse{}, runtime.NewResponseError(resp) - } - return client.listBuildsHandleResponse(resp) - }, - }) -} - -// listBuildsCreateRequest creates the ListBuilds request. -func (client *BuildServiceClient) listBuildsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListBuildsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBuildsHandleResponse handles the ListBuilds response. -func (client *BuildServiceClient) listBuildsHandleResponse(resp *http.Response) (BuildServiceClientListBuildsResponse, error) { - result := BuildServiceClientListBuildsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildCollection); err != nil { - return BuildServiceClientListBuildsResponse{}, err - } - return result, nil -} - -// ListSupportedBuildpacks - Get all supported buildpacks. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceClientListSupportedBuildpacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedBuildpacks -// method. -func (client *BuildServiceClient) ListSupportedBuildpacks(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedBuildpacksOptions) (BuildServiceClientListSupportedBuildpacksResponse, error) { - req, err := client.listSupportedBuildpacksCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) - if err != nil { - return BuildServiceClientListSupportedBuildpacksResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientListSupportedBuildpacksResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientListSupportedBuildpacksResponse{}, runtime.NewResponseError(resp) - } - return client.listSupportedBuildpacksHandleResponse(resp) -} - -// listSupportedBuildpacksCreateRequest creates the ListSupportedBuildpacks request. -func (client *BuildServiceClient) listSupportedBuildpacksCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedBuildpacksOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedBuildpacks" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSupportedBuildpacksHandleResponse handles the ListSupportedBuildpacks response. -func (client *BuildServiceClient) listSupportedBuildpacksHandleResponse(resp *http.Response) (BuildServiceClientListSupportedBuildpacksResponse, error) { - result := BuildServiceClientListSupportedBuildpacksResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SupportedBuildpacksCollection); err != nil { - return BuildServiceClientListSupportedBuildpacksResponse{}, err - } - return result, nil -} - -// ListSupportedStacks - Get all supported stacks. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceClientListSupportedStacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedStacks -// method. -func (client *BuildServiceClient) ListSupportedStacks(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedStacksOptions) (BuildServiceClientListSupportedStacksResponse, error) { - req, err := client.listSupportedStacksCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) - if err != nil { - return BuildServiceClientListSupportedStacksResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceClientListSupportedStacksResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceClientListSupportedStacksResponse{}, runtime.NewResponseError(resp) - } - return client.listSupportedStacksHandleResponse(resp) -} - -// listSupportedStacksCreateRequest creates the ListSupportedStacks request. -func (client *BuildServiceClient) listSupportedStacksCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceClientListSupportedStacksOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/supportedStacks" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSupportedStacksHandleResponse handles the ListSupportedStacks response. -func (client *BuildServiceClient) listSupportedStacksHandleResponse(resp *http.Response) (BuildServiceClientListSupportedStacksResponse, error) { - result := BuildServiceClientListSupportedStacksResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SupportedStacksCollection); err != nil { - return BuildServiceClientListSupportedStacksResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildserviceagentpool_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildserviceagentpool_client.go deleted file mode 100644 index 0f537cdf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildserviceagentpool_client.go +++ /dev/null @@ -1,277 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BuildServiceAgentPoolClient contains the methods for the BuildServiceAgentPool group. -// Don't use this type directly, use NewBuildServiceAgentPoolClient() instead. -type BuildServiceAgentPoolClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBuildServiceAgentPoolClient creates a new instance of BuildServiceAgentPoolClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBuildServiceAgentPoolClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceAgentPoolClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BuildServiceAgentPoolClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get build service agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// agentPoolName - The name of the build service agent pool resource. -// options - BuildServiceAgentPoolClientGetOptions contains the optional parameters for the BuildServiceAgentPoolClient.Get -// method. -func (client *BuildServiceAgentPoolClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, options *BuildServiceAgentPoolClientGetOptions) (BuildServiceAgentPoolClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, options) - if err != nil { - return BuildServiceAgentPoolClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceAgentPoolClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceAgentPoolClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BuildServiceAgentPoolClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, options *BuildServiceAgentPoolClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if agentPoolName == "" { - return nil, errors.New("parameter agentPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BuildServiceAgentPoolClient) getHandleResponse(resp *http.Response) (BuildServiceAgentPoolClientGetResponse, error) { - result := BuildServiceAgentPoolClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildServiceAgentPoolResource); err != nil { - return BuildServiceAgentPoolClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List build service agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.List -// method. -func (client *BuildServiceAgentPoolClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceAgentPoolClientListOptions) *runtime.Pager[BuildServiceAgentPoolClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BuildServiceAgentPoolClientListResponse]{ - More: func(page BuildServiceAgentPoolClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BuildServiceAgentPoolClientListResponse) (BuildServiceAgentPoolClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BuildServiceAgentPoolClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceAgentPoolClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceAgentPoolClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BuildServiceAgentPoolClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceAgentPoolClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BuildServiceAgentPoolClient) listHandleResponse(resp *http.Response) (BuildServiceAgentPoolClientListResponse, error) { - result := BuildServiceAgentPoolClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuildServiceAgentPoolResourceCollection); err != nil { - return BuildServiceAgentPoolClientListResponse{}, err - } - return result, nil -} - -// BeginUpdatePut - Create or update build service agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// agentPoolName - The name of the build service agent pool resource. -// agentPoolResource - Parameters for the update operation -// options - BuildServiceAgentPoolClientBeginUpdatePutOptions contains the optional parameters for the BuildServiceAgentPoolClient.BeginUpdatePut -// method. -func (client *BuildServiceAgentPoolClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*runtime.Poller[BuildServiceAgentPoolClientUpdatePutResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updatePut(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, agentPoolResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BuildServiceAgentPoolClientUpdatePutResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BuildServiceAgentPoolClientUpdatePutResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdatePut - Create or update build service agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *BuildServiceAgentPoolClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*http.Response, error) { - req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, agentPoolName, agentPoolResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updatePutCreateRequest creates the UpdatePut request. -func (client *BuildServiceAgentPoolClient) updatePutCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, agentPoolName string, agentPoolResource BuildServiceAgentPoolResource, options *BuildServiceAgentPoolClientBeginUpdatePutOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/agentPools/{agentPoolName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if agentPoolName == "" { - return nil, errors.New("parameter agentPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, agentPoolResource) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildservicebuilder_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildservicebuilder_client.go deleted file mode 100644 index 4e46f769..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_buildservicebuilder_client.go +++ /dev/null @@ -1,352 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BuildServiceBuilderClient contains the methods for the BuildServiceBuilder group. -// Don't use this type directly, use NewBuildServiceBuilderClient() instead. -type BuildServiceBuilderClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBuildServiceBuilderClient creates a new instance of BuildServiceBuilderClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBuildServiceBuilderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BuildServiceBuilderClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BuildServiceBuilderClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update a KPack builder. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// builderResource - The target builder for the create or update operation -// options - BuildServiceBuilderClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceBuilderClient.BeginCreateOrUpdate -// method. -func (client *BuildServiceBuilderClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*runtime.Poller[BuildServiceBuilderClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, buildServiceName, builderName, builderResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BuildServiceBuilderClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BuildServiceBuilderClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update a KPack builder. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *BuildServiceBuilderClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, builderResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *BuildServiceBuilderClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, builderResource BuilderResource, options *BuildServiceBuilderClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, builderResource) -} - -// BeginDelete - Delete a KPack builder. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// options - BuildServiceBuilderClientBeginDeleteOptions contains the optional parameters for the BuildServiceBuilderClient.BeginDelete -// method. -func (client *BuildServiceBuilderClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*runtime.Poller[BuildServiceBuilderClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BuildServiceBuilderClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BuildServiceBuilderClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete a KPack builder. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *BuildServiceBuilderClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *BuildServiceBuilderClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a KPack builder. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// builderName - The name of the builder resource. -// options - BuildServiceBuilderClientGetOptions contains the optional parameters for the BuildServiceBuilderClient.Get method. -func (client *BuildServiceBuilderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientGetOptions) (BuildServiceBuilderClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, builderName, options) - if err != nil { - return BuildServiceBuilderClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceBuilderClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceBuilderClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BuildServiceBuilderClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, builderName string, options *BuildServiceBuilderClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - if builderName == "" { - return nil, errors.New("parameter builderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{builderName}", url.PathEscape(builderName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BuildServiceBuilderClient) getHandleResponse(resp *http.Response) (BuildServiceBuilderClientGetResponse, error) { - result := BuildServiceBuilderClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuilderResource); err != nil { - return BuildServiceBuilderClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List KPack builders result. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// buildServiceName - The name of the build service resource. -// options - BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.List -// method. -func (client *BuildServiceBuilderClient) NewListPager(resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceBuilderClientListOptions) *runtime.Pager[BuildServiceBuilderClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BuildServiceBuilderClientListResponse]{ - More: func(page BuildServiceBuilderClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BuildServiceBuilderClientListResponse) (BuildServiceBuilderClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, buildServiceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BuildServiceBuilderClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BuildServiceBuilderClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BuildServiceBuilderClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BuildServiceBuilderClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, buildServiceName string, options *BuildServiceBuilderClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if buildServiceName == "" { - return nil, errors.New("parameter buildServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{buildServiceName}", url.PathEscape(buildServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BuildServiceBuilderClient) listHandleResponse(resp *http.Response) (BuildServiceBuilderClientListResponse, error) { - result := BuildServiceBuilderClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BuilderResourceCollection); err != nil { - return BuildServiceBuilderClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_certificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_certificates_client.go deleted file mode 100644 index 2fe79c0d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_certificates_client.go +++ /dev/null @@ -1,331 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// CertificatesClient contains the methods for the Certificates group. -// Don't use this type directly, use NewCertificatesClient() instead. -type CertificatesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewCertificatesClient creates a new instance of CertificatesClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &CertificatesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update certificate resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// certificateName - The name of the certificate resource. -// certificateResource - Parameters for the create or update operation -// options - CertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.BeginCreateOrUpdate -// method. -func (client *CertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CertificatesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, certificateName, certificateResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CertificatesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[CertificatesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update certificate resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *CertificatesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, certificateName, certificateResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, certificateResource CertificateResource, options *CertificatesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if certificateName == "" { - return nil, errors.New("parameter certificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateResource) -} - -// BeginDelete - Delete the certificate resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// certificateName - The name of the certificate resource. -// options - CertificatesClientBeginDeleteOptions contains the optional parameters for the CertificatesClient.BeginDelete -// method. -func (client *CertificatesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*runtime.Poller[CertificatesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, certificateName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CertificatesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[CertificatesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the certificate resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *CertificatesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, certificateName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if certificateName == "" { - return nil, errors.New("parameter certificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the certificate resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// certificateName - The name of the certificate resource. -// options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. -func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, certificateName, options) - if err != nil { - return CertificatesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificatesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *CertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, certificateName string, options *CertificatesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if certificateName == "" { - return nil, errors.New("parameter certificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateName}", url.PathEscape(certificateName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *CertificatesClient) getHandleResponse(resp *http.Response) (CertificatesClientGetResponse, error) { - result := CertificatesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateResource); err != nil { - return CertificatesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all the certificates of one user. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.List method. -func (client *CertificatesClient) NewListPager(resourceGroupName string, serviceName string, options *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[CertificatesClientListResponse]{ - More: func(page CertificatesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CertificatesClientListResponse) (CertificatesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificatesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificatesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *CertificatesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *CertificatesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *CertificatesClient) listHandleResponse(resp *http.Response) (CertificatesClientListResponse, error) { - result := CertificatesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateResourceCollection); err != nil { - return CertificatesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_configservers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_configservers_client.go deleted file mode 100644 index 02fceb08..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_configservers_client.go +++ /dev/null @@ -1,314 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ConfigServersClient contains the methods for the ConfigServers group. -// Don't use this type directly, use NewConfigServersClient() instead. -type ConfigServersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewConfigServersClient creates a new instance of ConfigServersClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewConfigServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigServersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ConfigServersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get the config server and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ConfigServersClientGetOptions contains the optional parameters for the ConfigServersClient.Get method. -func (client *ConfigServersClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ConfigServersClientGetOptions) (ConfigServersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return ConfigServersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConfigServersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConfigServersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ConfigServersClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ConfigServersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ConfigServersClient) getHandleResponse(resp *http.Response) (ConfigServersClientGetResponse, error) { - result := ConfigServersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConfigServerResource); err != nil { - return ConfigServersClientGetResponse{}, err - } - return result, nil -} - -// BeginUpdatePatch - Update the config server. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configServerResource - Parameters for the update operation -// options - ConfigServersClientBeginUpdatePatchOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePatch -// method. -func (client *ConfigServersClient) BeginUpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*runtime.Poller[ConfigServersClientUpdatePatchResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updatePatch(ctx, resourceGroupName, serviceName, configServerResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConfigServersClientUpdatePatchResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ConfigServersClientUpdatePatchResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdatePatch - Update the config server. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ConfigServersClient) updatePatch(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*http.Response, error) { - req, err := client.updatePatchCreateRequest(ctx, resourceGroupName, serviceName, configServerResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updatePatchCreateRequest creates the UpdatePatch request. -func (client *ConfigServersClient) updatePatchCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePatchOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, configServerResource) -} - -// BeginUpdatePut - Update the config server. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configServerResource - Parameters for the update operation -// options - ConfigServersClientBeginUpdatePutOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePut -// method. -func (client *ConfigServersClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*runtime.Poller[ConfigServersClientUpdatePutResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updatePut(ctx, resourceGroupName, serviceName, configServerResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConfigServersClientUpdatePutResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ConfigServersClientUpdatePutResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdatePut - Update the config server. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ConfigServersClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*http.Response, error) { - req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, configServerResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updatePutCreateRequest creates the UpdatePut request. -func (client *ConfigServersClient) updatePutCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configServerResource ConfigServerResource, options *ConfigServersClientBeginUpdatePutOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, configServerResource) -} - -// BeginValidate - Check if the config server settings are valid. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configServerSettings - Config server settings to be validated -// options - ConfigServersClientBeginValidateOptions contains the optional parameters for the ConfigServersClient.BeginValidate -// method. -func (client *ConfigServersClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*runtime.Poller[ConfigServersClientValidateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.validate(ctx, resourceGroupName, serviceName, configServerSettings, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConfigServersClientValidateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ConfigServersClientValidateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Validate - Check if the config server settings are valid. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ConfigServersClient) validate(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*http.Response, error) { - req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, configServerSettings, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// validateCreateRequest creates the Validate request. -func (client *ConfigServersClient) validateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configServerSettings ConfigServerSettings, options *ConfigServersClientBeginValidateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/validate" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, configServerSettings) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_configurationservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_configurationservices_client.go deleted file mode 100644 index 93b872ac..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_configurationservices_client.go +++ /dev/null @@ -1,407 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ConfigurationServicesClient contains the methods for the ConfigurationServices group. -// Don't use this type directly, use NewConfigurationServicesClient() instead. -type ConfigurationServicesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewConfigurationServicesClient creates a new instance of ConfigurationServicesClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewConfigurationServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationServicesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ConfigurationServicesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create the default Application Configuration Service or update the existing Application Configuration -// Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configurationServiceName - The name of Application Configuration Service. -// configurationServiceResource - Parameters for the update operation -// options - ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate -// method. -func (client *ConfigurationServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationServicesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConfigurationServicesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ConfigurationServicesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create the default Application Configuration Service or update the existing Application Configuration -// Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ConfigurationServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConfigurationServicesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, configurationServiceResource ConfigurationServiceResource, options *ConfigurationServicesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if configurationServiceName == "" { - return nil, errors.New("parameter configurationServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationServiceName}", url.PathEscape(configurationServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, configurationServiceResource) -} - -// BeginDelete - Disable the default Application Configuration Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configurationServiceName - The name of Application Configuration Service. -// options - ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete -// method. -func (client *ConfigurationServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*runtime.Poller[ConfigurationServicesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, configurationServiceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConfigurationServicesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ConfigurationServicesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Disable the default Application Configuration Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ConfigurationServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ConfigurationServicesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if configurationServiceName == "" { - return nil, errors.New("parameter configurationServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationServiceName}", url.PathEscape(configurationServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Application Configuration Service and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configurationServiceName - The name of Application Configuration Service. -// options - ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get -// method. -func (client *ConfigurationServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientGetOptions) (ConfigurationServicesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, options) - if err != nil { - return ConfigurationServicesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConfigurationServicesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConfigurationServicesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ConfigurationServicesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, options *ConfigurationServicesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if configurationServiceName == "" { - return nil, errors.New("parameter configurationServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationServiceName}", url.PathEscape(configurationServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ConfigurationServicesClient) getHandleResponse(resp *http.Response) (ConfigurationServicesClientGetResponse, error) { - result := ConfigurationServicesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConfigurationServiceResource); err != nil { - return ConfigurationServicesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.List -// method. -func (client *ConfigurationServicesClient) NewListPager(resourceGroupName string, serviceName string, options *ConfigurationServicesClientListOptions) *runtime.Pager[ConfigurationServicesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ConfigurationServicesClientListResponse]{ - More: func(page ConfigurationServicesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ConfigurationServicesClientListResponse) (ConfigurationServicesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ConfigurationServicesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConfigurationServicesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConfigurationServicesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ConfigurationServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ConfigurationServicesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ConfigurationServicesClient) listHandleResponse(resp *http.Response) (ConfigurationServicesClientListResponse, error) { - result := ConfigurationServicesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConfigurationServiceResourceCollection); err != nil { - return ConfigurationServicesClientListResponse{}, err - } - return result, nil -} - -// BeginValidate - Check if the Application Configuration Service settings are valid. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// configurationServiceName - The name of Application Configuration Service. -// settings - Application Configuration Service settings to be validated -// options - ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate -// method. -func (client *ConfigurationServicesClient) BeginValidate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*runtime.Poller[ConfigurationServicesClientValidateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.validate(ctx, resourceGroupName, serviceName, configurationServiceName, settings, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConfigurationServicesClientValidateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ConfigurationServicesClientValidateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Validate - Check if the Application Configuration Service settings are valid. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ConfigurationServicesClient) validate(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*http.Response, error) { - req, err := client.validateCreateRequest(ctx, resourceGroupName, serviceName, configurationServiceName, settings, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// validateCreateRequest creates the Validate request. -func (client *ConfigurationServicesClient) validateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, configurationServiceName string, settings ConfigurationServiceSettings, options *ConfigurationServicesClientBeginValidateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configurationServices/{configurationServiceName}/validate" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if configurationServiceName == "" { - return nil, errors.New("parameter configurationServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationServiceName}", url.PathEscape(configurationServiceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, settings) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_constants.go deleted file mode 100644 index 49ab0698..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_constants.go +++ /dev/null @@ -1,707 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -const ( - moduleName = "armappplatform" - moduleVersion = "v1.1.0-beta.1" -) - -// APIPortalProvisioningState - State of the API portal. -type APIPortalProvisioningState string - -const ( - APIPortalProvisioningStateCreating APIPortalProvisioningState = "Creating" - APIPortalProvisioningStateDeleting APIPortalProvisioningState = "Deleting" - APIPortalProvisioningStateFailed APIPortalProvisioningState = "Failed" - APIPortalProvisioningStateSucceeded APIPortalProvisioningState = "Succeeded" - APIPortalProvisioningStateUpdating APIPortalProvisioningState = "Updating" -) - -// PossibleAPIPortalProvisioningStateValues returns the possible values for the APIPortalProvisioningState const type. -func PossibleAPIPortalProvisioningStateValues() []APIPortalProvisioningState { - return []APIPortalProvisioningState{ - APIPortalProvisioningStateCreating, - APIPortalProvisioningStateDeleting, - APIPortalProvisioningStateFailed, - APIPortalProvisioningStateSucceeded, - APIPortalProvisioningStateUpdating, - } -} - -// ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. -type ActionType string - -const ( - ActionTypeInternal ActionType = "Internal" -) - -// PossibleActionTypeValues returns the possible values for the ActionType const type. -func PossibleActionTypeValues() []ActionType { - return []ActionType{ - ActionTypeInternal, - } -} - -// AppResourceProvisioningState - Provisioning state of the App -type AppResourceProvisioningState string - -const ( - AppResourceProvisioningStateCreating AppResourceProvisioningState = "Creating" - AppResourceProvisioningStateDeleting AppResourceProvisioningState = "Deleting" - AppResourceProvisioningStateFailed AppResourceProvisioningState = "Failed" - AppResourceProvisioningStateSucceeded AppResourceProvisioningState = "Succeeded" - AppResourceProvisioningStateUpdating AppResourceProvisioningState = "Updating" -) - -// PossibleAppResourceProvisioningStateValues returns the possible values for the AppResourceProvisioningState const type. -func PossibleAppResourceProvisioningStateValues() []AppResourceProvisioningState { - return []AppResourceProvisioningState{ - AppResourceProvisioningStateCreating, - AppResourceProvisioningStateDeleting, - AppResourceProvisioningStateFailed, - AppResourceProvisioningStateSucceeded, - AppResourceProvisioningStateUpdating, - } -} - -// BindingType - Buildpack Binding Type -type BindingType string - -const ( - BindingTypeApacheSkyWalking BindingType = "ApacheSkyWalking" - BindingTypeAppDynamics BindingType = "AppDynamics" - BindingTypeApplicationInsights BindingType = "ApplicationInsights" - BindingTypeDynatrace BindingType = "Dynatrace" - BindingTypeElasticAPM BindingType = "ElasticAPM" - BindingTypeNewRelic BindingType = "NewRelic" -) - -// PossibleBindingTypeValues returns the possible values for the BindingType const type. -func PossibleBindingTypeValues() []BindingType { - return []BindingType{ - BindingTypeApacheSkyWalking, - BindingTypeAppDynamics, - BindingTypeApplicationInsights, - BindingTypeDynatrace, - BindingTypeElasticAPM, - BindingTypeNewRelic, - } -} - -// BuildProvisioningState - Provisioning state of the KPack build result -type BuildProvisioningState string - -const ( - BuildProvisioningStateCreating BuildProvisioningState = "Creating" - BuildProvisioningStateDeleting BuildProvisioningState = "Deleting" - BuildProvisioningStateFailed BuildProvisioningState = "Failed" - BuildProvisioningStateSucceeded BuildProvisioningState = "Succeeded" - BuildProvisioningStateUpdating BuildProvisioningState = "Updating" -) - -// PossibleBuildProvisioningStateValues returns the possible values for the BuildProvisioningState const type. -func PossibleBuildProvisioningStateValues() []BuildProvisioningState { - return []BuildProvisioningState{ - BuildProvisioningStateCreating, - BuildProvisioningStateDeleting, - BuildProvisioningStateFailed, - BuildProvisioningStateSucceeded, - BuildProvisioningStateUpdating, - } -} - -// BuildResultProvisioningState - Provisioning state of the KPack build result -type BuildResultProvisioningState string - -const ( - BuildResultProvisioningStateBuilding BuildResultProvisioningState = "Building" - BuildResultProvisioningStateDeleting BuildResultProvisioningState = "Deleting" - BuildResultProvisioningStateFailed BuildResultProvisioningState = "Failed" - BuildResultProvisioningStateQueuing BuildResultProvisioningState = "Queuing" - BuildResultProvisioningStateSucceeded BuildResultProvisioningState = "Succeeded" -) - -// PossibleBuildResultProvisioningStateValues returns the possible values for the BuildResultProvisioningState const type. -func PossibleBuildResultProvisioningStateValues() []BuildResultProvisioningState { - return []BuildResultProvisioningState{ - BuildResultProvisioningStateBuilding, - BuildResultProvisioningStateDeleting, - BuildResultProvisioningStateFailed, - BuildResultProvisioningStateQueuing, - BuildResultProvisioningStateSucceeded, - } -} - -// BuildServiceProvisioningState - Provisioning state of the KPack build result -type BuildServiceProvisioningState string - -const ( - BuildServiceProvisioningStateCreating BuildServiceProvisioningState = "Creating" - BuildServiceProvisioningStateDeleting BuildServiceProvisioningState = "Deleting" - BuildServiceProvisioningStateFailed BuildServiceProvisioningState = "Failed" - BuildServiceProvisioningStateSucceeded BuildServiceProvisioningState = "Succeeded" - BuildServiceProvisioningStateUpdating BuildServiceProvisioningState = "Updating" -) - -// PossibleBuildServiceProvisioningStateValues returns the possible values for the BuildServiceProvisioningState const type. -func PossibleBuildServiceProvisioningStateValues() []BuildServiceProvisioningState { - return []BuildServiceProvisioningState{ - BuildServiceProvisioningStateCreating, - BuildServiceProvisioningStateDeleting, - BuildServiceProvisioningStateFailed, - BuildServiceProvisioningStateSucceeded, - BuildServiceProvisioningStateUpdating, - } -} - -// BuilderProvisioningState - Builder provision status. -type BuilderProvisioningState string - -const ( - BuilderProvisioningStateCreating BuilderProvisioningState = "Creating" - BuilderProvisioningStateDeleting BuilderProvisioningState = "Deleting" - BuilderProvisioningStateFailed BuilderProvisioningState = "Failed" - BuilderProvisioningStateSucceeded BuilderProvisioningState = "Succeeded" - BuilderProvisioningStateUpdating BuilderProvisioningState = "Updating" -) - -// PossibleBuilderProvisioningStateValues returns the possible values for the BuilderProvisioningState const type. -func PossibleBuilderProvisioningStateValues() []BuilderProvisioningState { - return []BuilderProvisioningState{ - BuilderProvisioningStateCreating, - BuilderProvisioningStateDeleting, - BuilderProvisioningStateFailed, - BuilderProvisioningStateSucceeded, - BuilderProvisioningStateUpdating, - } -} - -// BuildpackBindingProvisioningState - State of the Buildpack Binding. -type BuildpackBindingProvisioningState string - -const ( - BuildpackBindingProvisioningStateCreating BuildpackBindingProvisioningState = "Creating" - BuildpackBindingProvisioningStateDeleting BuildpackBindingProvisioningState = "Deleting" - BuildpackBindingProvisioningStateFailed BuildpackBindingProvisioningState = "Failed" - BuildpackBindingProvisioningStateSucceeded BuildpackBindingProvisioningState = "Succeeded" - BuildpackBindingProvisioningStateUpdating BuildpackBindingProvisioningState = "Updating" -) - -// PossibleBuildpackBindingProvisioningStateValues returns the possible values for the BuildpackBindingProvisioningState const type. -func PossibleBuildpackBindingProvisioningStateValues() []BuildpackBindingProvisioningState { - return []BuildpackBindingProvisioningState{ - BuildpackBindingProvisioningStateCreating, - BuildpackBindingProvisioningStateDeleting, - BuildpackBindingProvisioningStateFailed, - BuildpackBindingProvisioningStateSucceeded, - BuildpackBindingProvisioningStateUpdating, - } -} - -// CertificateResourceProvisioningState - Provisioning state of the Certificate -type CertificateResourceProvisioningState string - -const ( - CertificateResourceProvisioningStateCreating CertificateResourceProvisioningState = "Creating" - CertificateResourceProvisioningStateDeleting CertificateResourceProvisioningState = "Deleting" - CertificateResourceProvisioningStateFailed CertificateResourceProvisioningState = "Failed" - CertificateResourceProvisioningStateSucceeded CertificateResourceProvisioningState = "Succeeded" - CertificateResourceProvisioningStateUpdating CertificateResourceProvisioningState = "Updating" -) - -// PossibleCertificateResourceProvisioningStateValues returns the possible values for the CertificateResourceProvisioningState const type. -func PossibleCertificateResourceProvisioningStateValues() []CertificateResourceProvisioningState { - return []CertificateResourceProvisioningState{ - CertificateResourceProvisioningStateCreating, - CertificateResourceProvisioningStateDeleting, - CertificateResourceProvisioningStateFailed, - CertificateResourceProvisioningStateSucceeded, - CertificateResourceProvisioningStateUpdating, - } -} - -// ConfigServerState - State of the config server. -type ConfigServerState string - -const ( - ConfigServerStateDeleted ConfigServerState = "Deleted" - ConfigServerStateFailed ConfigServerState = "Failed" - ConfigServerStateNotAvailable ConfigServerState = "NotAvailable" - ConfigServerStateSucceeded ConfigServerState = "Succeeded" - ConfigServerStateUpdating ConfigServerState = "Updating" -) - -// PossibleConfigServerStateValues returns the possible values for the ConfigServerState const type. -func PossibleConfigServerStateValues() []ConfigServerState { - return []ConfigServerState{ - ConfigServerStateDeleted, - ConfigServerStateFailed, - ConfigServerStateNotAvailable, - ConfigServerStateSucceeded, - ConfigServerStateUpdating, - } -} - -// ConfigurationServiceProvisioningState - State of the Application Configuration Service. -type ConfigurationServiceProvisioningState string - -const ( - ConfigurationServiceProvisioningStateCreating ConfigurationServiceProvisioningState = "Creating" - ConfigurationServiceProvisioningStateDeleting ConfigurationServiceProvisioningState = "Deleting" - ConfigurationServiceProvisioningStateFailed ConfigurationServiceProvisioningState = "Failed" - ConfigurationServiceProvisioningStateSucceeded ConfigurationServiceProvisioningState = "Succeeded" - ConfigurationServiceProvisioningStateUpdating ConfigurationServiceProvisioningState = "Updating" -) - -// PossibleConfigurationServiceProvisioningStateValues returns the possible values for the ConfigurationServiceProvisioningState const type. -func PossibleConfigurationServiceProvisioningStateValues() []ConfigurationServiceProvisioningState { - return []ConfigurationServiceProvisioningState{ - ConfigurationServiceProvisioningStateCreating, - ConfigurationServiceProvisioningStateDeleting, - ConfigurationServiceProvisioningStateFailed, - ConfigurationServiceProvisioningStateSucceeded, - ConfigurationServiceProvisioningStateUpdating, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// CustomDomainResourceProvisioningState - Provisioning state of the Domain -type CustomDomainResourceProvisioningState string - -const ( - CustomDomainResourceProvisioningStateCreating CustomDomainResourceProvisioningState = "Creating" - CustomDomainResourceProvisioningStateDeleting CustomDomainResourceProvisioningState = "Deleting" - CustomDomainResourceProvisioningStateFailed CustomDomainResourceProvisioningState = "Failed" - CustomDomainResourceProvisioningStateSucceeded CustomDomainResourceProvisioningState = "Succeeded" - CustomDomainResourceProvisioningStateUpdating CustomDomainResourceProvisioningState = "Updating" -) - -// PossibleCustomDomainResourceProvisioningStateValues returns the possible values for the CustomDomainResourceProvisioningState const type. -func PossibleCustomDomainResourceProvisioningStateValues() []CustomDomainResourceProvisioningState { - return []CustomDomainResourceProvisioningState{ - CustomDomainResourceProvisioningStateCreating, - CustomDomainResourceProvisioningStateDeleting, - CustomDomainResourceProvisioningStateFailed, - CustomDomainResourceProvisioningStateSucceeded, - CustomDomainResourceProvisioningStateUpdating, - } -} - -// DeploymentResourceProvisioningState - Provisioning state of the Deployment -type DeploymentResourceProvisioningState string - -const ( - DeploymentResourceProvisioningStateCreating DeploymentResourceProvisioningState = "Creating" - DeploymentResourceProvisioningStateFailed DeploymentResourceProvisioningState = "Failed" - DeploymentResourceProvisioningStateSucceeded DeploymentResourceProvisioningState = "Succeeded" - DeploymentResourceProvisioningStateUpdating DeploymentResourceProvisioningState = "Updating" -) - -// PossibleDeploymentResourceProvisioningStateValues returns the possible values for the DeploymentResourceProvisioningState const type. -func PossibleDeploymentResourceProvisioningStateValues() []DeploymentResourceProvisioningState { - return []DeploymentResourceProvisioningState{ - DeploymentResourceProvisioningStateCreating, - DeploymentResourceProvisioningStateFailed, - DeploymentResourceProvisioningStateSucceeded, - DeploymentResourceProvisioningStateUpdating, - } -} - -// DeploymentResourceStatus - Status of the Deployment -type DeploymentResourceStatus string - -const ( - DeploymentResourceStatusRunning DeploymentResourceStatus = "Running" - DeploymentResourceStatusStopped DeploymentResourceStatus = "Stopped" -) - -// PossibleDeploymentResourceStatusValues returns the possible values for the DeploymentResourceStatus const type. -func PossibleDeploymentResourceStatusValues() []DeploymentResourceStatus { - return []DeploymentResourceStatus{ - DeploymentResourceStatusRunning, - DeploymentResourceStatusStopped, - } -} - -// GatewayProvisioningState - State of the Spring Cloud Gateway. -type GatewayProvisioningState string - -const ( - GatewayProvisioningStateCreating GatewayProvisioningState = "Creating" - GatewayProvisioningStateDeleting GatewayProvisioningState = "Deleting" - GatewayProvisioningStateFailed GatewayProvisioningState = "Failed" - GatewayProvisioningStateSucceeded GatewayProvisioningState = "Succeeded" - GatewayProvisioningStateUpdating GatewayProvisioningState = "Updating" -) - -// PossibleGatewayProvisioningStateValues returns the possible values for the GatewayProvisioningState const type. -func PossibleGatewayProvisioningStateValues() []GatewayProvisioningState { - return []GatewayProvisioningState{ - GatewayProvisioningStateCreating, - GatewayProvisioningStateDeleting, - GatewayProvisioningStateFailed, - GatewayProvisioningStateSucceeded, - GatewayProvisioningStateUpdating, - } -} - -// HTTPSchemeType - Scheme to use for connecting to the host. Defaults to HTTP. -// Possible enum values: -// * "HTTP" means that the scheme used will be http:// -// * "HTTPS" means that the scheme used will be https:// -type HTTPSchemeType string - -const ( - HTTPSchemeTypeHTTP HTTPSchemeType = "HTTP" - HTTPSchemeTypeHTTPS HTTPSchemeType = "HTTPS" -) - -// PossibleHTTPSchemeTypeValues returns the possible values for the HTTPSchemeType const type. -func PossibleHTTPSchemeTypeValues() []HTTPSchemeType { - return []HTTPSchemeType{ - HTTPSchemeTypeHTTP, - HTTPSchemeTypeHTTPS, - } -} - -// KPackBuildStageProvisioningState - The provisioning state of this build stage resource. -type KPackBuildStageProvisioningState string - -const ( - KPackBuildStageProvisioningStateFailed KPackBuildStageProvisioningState = "Failed" - KPackBuildStageProvisioningStateNotStarted KPackBuildStageProvisioningState = "NotStarted" - KPackBuildStageProvisioningStateRunning KPackBuildStageProvisioningState = "Running" - KPackBuildStageProvisioningStateSucceeded KPackBuildStageProvisioningState = "Succeeded" -) - -// PossibleKPackBuildStageProvisioningStateValues returns the possible values for the KPackBuildStageProvisioningState const type. -func PossibleKPackBuildStageProvisioningStateValues() []KPackBuildStageProvisioningState { - return []KPackBuildStageProvisioningState{ - KPackBuildStageProvisioningStateFailed, - KPackBuildStageProvisioningStateNotStarted, - KPackBuildStageProvisioningStateRunning, - KPackBuildStageProvisioningStateSucceeded, - } -} - -// LastModifiedByType - The type of identity that last modified the resource. -type LastModifiedByType string - -const ( - LastModifiedByTypeApplication LastModifiedByType = "Application" - LastModifiedByTypeKey LastModifiedByType = "Key" - LastModifiedByTypeManagedIdentity LastModifiedByType = "ManagedIdentity" - LastModifiedByTypeUser LastModifiedByType = "User" -) - -// PossibleLastModifiedByTypeValues returns the possible values for the LastModifiedByType const type. -func PossibleLastModifiedByTypeValues() []LastModifiedByType { - return []LastModifiedByType{ - LastModifiedByTypeApplication, - LastModifiedByTypeKey, - LastModifiedByTypeManagedIdentity, - LastModifiedByTypeUser, - } -} - -// ManagedIdentityType - Type of the managed identity -type ManagedIdentityType string - -const ( - ManagedIdentityTypeNone ManagedIdentityType = "None" - ManagedIdentityTypeSystemAssigned ManagedIdentityType = "SystemAssigned" - ManagedIdentityTypeSystemAssignedUserAssigned ManagedIdentityType = "SystemAssigned,UserAssigned" - ManagedIdentityTypeUserAssigned ManagedIdentityType = "UserAssigned" -) - -// PossibleManagedIdentityTypeValues returns the possible values for the ManagedIdentityType const type. -func PossibleManagedIdentityTypeValues() []ManagedIdentityType { - return []ManagedIdentityType{ - ManagedIdentityTypeNone, - ManagedIdentityTypeSystemAssigned, - ManagedIdentityTypeSystemAssignedUserAssigned, - ManagedIdentityTypeUserAssigned, - } -} - -// MonitoringSettingState - State of the Monitoring Setting. -type MonitoringSettingState string - -const ( - MonitoringSettingStateFailed MonitoringSettingState = "Failed" - MonitoringSettingStateNotAvailable MonitoringSettingState = "NotAvailable" - MonitoringSettingStateSucceeded MonitoringSettingState = "Succeeded" - MonitoringSettingStateUpdating MonitoringSettingState = "Updating" -) - -// PossibleMonitoringSettingStateValues returns the possible values for the MonitoringSettingState const type. -func PossibleMonitoringSettingStateValues() []MonitoringSettingState { - return []MonitoringSettingState{ - MonitoringSettingStateFailed, - MonitoringSettingStateNotAvailable, - MonitoringSettingStateSucceeded, - MonitoringSettingStateUpdating, - } -} - -// PowerState - Power state of the Service -type PowerState string - -const ( - PowerStateRunning PowerState = "Running" - PowerStateStopped PowerState = "Stopped" -) - -// PossiblePowerStateValues returns the possible values for the PowerState const type. -func PossiblePowerStateValues() []PowerState { - return []PowerState{ - PowerStateRunning, - PowerStateStopped, - } -} - -// ProbeActionType - The type of the action to take to perform the health check. -type ProbeActionType string - -const ( - ProbeActionTypeExecAction ProbeActionType = "ExecAction" - ProbeActionTypeHTTPGetAction ProbeActionType = "HTTPGetAction" - ProbeActionTypeTCPSocketAction ProbeActionType = "TCPSocketAction" -) - -// PossibleProbeActionTypeValues returns the possible values for the ProbeActionType const type. -func PossibleProbeActionTypeValues() []ProbeActionType { - return []ProbeActionType{ - ProbeActionTypeExecAction, - ProbeActionTypeHTTPGetAction, - ProbeActionTypeTCPSocketAction, - } -} - -// ProvisioningState - Provisioning state of the Service -type ProvisioningState string - -const ( - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleted ProvisioningState = "Deleted" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateMoveFailed ProvisioningState = "MoveFailed" - ProvisioningStateMoved ProvisioningState = "Moved" - ProvisioningStateMoving ProvisioningState = "Moving" - ProvisioningStateStarting ProvisioningState = "Starting" - ProvisioningStateStopping ProvisioningState = "Stopping" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateCreating, - ProvisioningStateDeleted, - ProvisioningStateDeleting, - ProvisioningStateFailed, - ProvisioningStateMoveFailed, - ProvisioningStateMoved, - ProvisioningStateMoving, - ProvisioningStateStarting, - ProvisioningStateStopping, - ProvisioningStateSucceeded, - ProvisioningStateUpdating, - } -} - -// ResourceSKURestrictionsReasonCode - Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription' -type ResourceSKURestrictionsReasonCode string - -const ( - ResourceSKURestrictionsReasonCodeNotAvailableForSubscription ResourceSKURestrictionsReasonCode = "NotAvailableForSubscription" - ResourceSKURestrictionsReasonCodeQuotaID ResourceSKURestrictionsReasonCode = "QuotaId" -) - -// PossibleResourceSKURestrictionsReasonCodeValues returns the possible values for the ResourceSKURestrictionsReasonCode const type. -func PossibleResourceSKURestrictionsReasonCodeValues() []ResourceSKURestrictionsReasonCode { - return []ResourceSKURestrictionsReasonCode{ - ResourceSKURestrictionsReasonCodeNotAvailableForSubscription, - ResourceSKURestrictionsReasonCodeQuotaID, - } -} - -// ResourceSKURestrictionsType - Gets the type of restrictions. Possible values include: 'Location', 'Zone' -type ResourceSKURestrictionsType string - -const ( - ResourceSKURestrictionsTypeLocation ResourceSKURestrictionsType = "Location" - ResourceSKURestrictionsTypeZone ResourceSKURestrictionsType = "Zone" -) - -// PossibleResourceSKURestrictionsTypeValues returns the possible values for the ResourceSKURestrictionsType const type. -func PossibleResourceSKURestrictionsTypeValues() []ResourceSKURestrictionsType { - return []ResourceSKURestrictionsType{ - ResourceSKURestrictionsTypeLocation, - ResourceSKURestrictionsTypeZone, - } -} - -// SKUScaleType - Gets or sets the type of the scale. -type SKUScaleType string - -const ( - SKUScaleTypeAutomatic SKUScaleType = "Automatic" - SKUScaleTypeManual SKUScaleType = "Manual" - SKUScaleTypeNone SKUScaleType = "None" -) - -// PossibleSKUScaleTypeValues returns the possible values for the SKUScaleType const type. -func PossibleSKUScaleTypeValues() []SKUScaleType { - return []SKUScaleType{ - SKUScaleTypeAutomatic, - SKUScaleTypeManual, - SKUScaleTypeNone, - } -} - -// ServiceRegistryProvisioningState - State of the Service Registry. -type ServiceRegistryProvisioningState string - -const ( - ServiceRegistryProvisioningStateCreating ServiceRegistryProvisioningState = "Creating" - ServiceRegistryProvisioningStateDeleting ServiceRegistryProvisioningState = "Deleting" - ServiceRegistryProvisioningStateFailed ServiceRegistryProvisioningState = "Failed" - ServiceRegistryProvisioningStateSucceeded ServiceRegistryProvisioningState = "Succeeded" - ServiceRegistryProvisioningStateUpdating ServiceRegistryProvisioningState = "Updating" -) - -// PossibleServiceRegistryProvisioningStateValues returns the possible values for the ServiceRegistryProvisioningState const type. -func PossibleServiceRegistryProvisioningStateValues() []ServiceRegistryProvisioningState { - return []ServiceRegistryProvisioningState{ - ServiceRegistryProvisioningStateCreating, - ServiceRegistryProvisioningStateDeleting, - ServiceRegistryProvisioningStateFailed, - ServiceRegistryProvisioningStateSucceeded, - ServiceRegistryProvisioningStateUpdating, - } -} - -// StorageType - The type of the storage. -type StorageType string - -const ( - StorageTypeStorageAccount StorageType = "StorageAccount" -) - -// PossibleStorageTypeValues returns the possible values for the StorageType const type. -func PossibleStorageTypeValues() []StorageType { - return []StorageType{ - StorageTypeStorageAccount, - } -} - -// SupportedRuntimePlatform - The platform of this runtime version (possible values: "Java" or ".NET"). -type SupportedRuntimePlatform string - -const ( - SupportedRuntimePlatformJava SupportedRuntimePlatform = "Java" - SupportedRuntimePlatformNETCore SupportedRuntimePlatform = ".NET Core" -) - -// PossibleSupportedRuntimePlatformValues returns the possible values for the SupportedRuntimePlatform const type. -func PossibleSupportedRuntimePlatformValues() []SupportedRuntimePlatform { - return []SupportedRuntimePlatform{ - SupportedRuntimePlatformJava, - SupportedRuntimePlatformNETCore, - } -} - -// SupportedRuntimeValue - The raw value which could be passed to deployment CRUD operations. -type SupportedRuntimeValue string - -const ( - SupportedRuntimeValueJava11 SupportedRuntimeValue = "Java_11" - SupportedRuntimeValueJava17 SupportedRuntimeValue = "Java_17" - SupportedRuntimeValueJava8 SupportedRuntimeValue = "Java_8" - SupportedRuntimeValueNetCore31 SupportedRuntimeValue = "NetCore_31" -) - -// PossibleSupportedRuntimeValueValues returns the possible values for the SupportedRuntimeValue const type. -func PossibleSupportedRuntimeValueValues() []SupportedRuntimeValue { - return []SupportedRuntimeValue{ - SupportedRuntimeValueJava11, - SupportedRuntimeValueJava17, - SupportedRuntimeValueJava8, - SupportedRuntimeValueNetCore31, - } -} - -// TestKeyType - Type of the test key -type TestKeyType string - -const ( - TestKeyTypePrimary TestKeyType = "Primary" - TestKeyTypeSecondary TestKeyType = "Secondary" -) - -// PossibleTestKeyTypeValues returns the possible values for the TestKeyType const type. -func PossibleTestKeyTypeValues() []TestKeyType { - return []TestKeyType{ - TestKeyTypePrimary, - TestKeyTypeSecondary, - } -} - -// TrafficDirection - The direction of required traffic -type TrafficDirection string - -const ( - TrafficDirectionInbound TrafficDirection = "Inbound" - TrafficDirectionOutbound TrafficDirection = "Outbound" -) - -// PossibleTrafficDirectionValues returns the possible values for the TrafficDirection const type. -func PossibleTrafficDirectionValues() []TrafficDirection { - return []TrafficDirection{ - TrafficDirectionInbound, - TrafficDirectionOutbound, - } -} - -// Type - The type of the underlying resource to mount as a persistent disk. -type Type string - -const ( - TypeAzureFileVolume Type = "AzureFileVolume" -) - -// PossibleTypeValues returns the possible values for the Type const type. -func PossibleTypeValues() []Type { - return []Type{ - TypeAzureFileVolume, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_customdomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_customdomains_client.go deleted file mode 100644 index 7b2a459a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_customdomains_client.go +++ /dev/null @@ -1,428 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// CustomDomainsClient contains the methods for the CustomDomains group. -// Don't use this type directly, use NewCustomDomainsClient() instead. -type CustomDomainsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewCustomDomainsClient creates a new instance of CustomDomainsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomDomainsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &CustomDomainsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update custom domain of one lifecycle application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// domainName - The name of the custom domain resource. -// domainResource - Parameters for the create or update operation -// options - CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate -// method. -func (client *CustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomDomainsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CustomDomainsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[CustomDomainsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update custom domain of one lifecycle application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *CustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *CustomDomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainResource) -} - -// BeginDelete - Delete the custom domain of one lifecycle application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// domainName - The name of the custom domain resource. -// options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete -// method. -func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, domainName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CustomDomainsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[CustomDomainsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the custom domain of one lifecycle application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *CustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *CustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the custom domain of one lifecycle application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// domainName - The name of the custom domain resource. -// options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. -func (client *CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, options) - if err != nil { - return CustomDomainsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CustomDomainsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomDomainsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *CustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, options *CustomDomainsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *CustomDomainsClient) getHandleResponse(resp *http.Response) (CustomDomainsClientGetResponse, error) { - result := CustomDomainsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainResource); err != nil { - return CustomDomainsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List the custom domains of one lifecycle application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.List method. -func (client *CustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *CustomDomainsClientListOptions) *runtime.Pager[CustomDomainsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[CustomDomainsClientListResponse]{ - More: func(page CustomDomainsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CustomDomainsClientListResponse) (CustomDomainsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, appName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CustomDomainsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CustomDomainsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomDomainsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *CustomDomainsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *CustomDomainsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *CustomDomainsClient) listHandleResponse(resp *http.Response) (CustomDomainsClientListResponse, error) { - result := CustomDomainsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainResourceCollection); err != nil { - return CustomDomainsClientListResponse{}, err - } - return result, nil -} - -// BeginUpdate - Update custom domain of one lifecycle application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// domainName - The name of the custom domain resource. -// domainResource - Parameters for the create or update operation -// options - CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate -// method. -func (client *CustomDomainsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*runtime.Poller[CustomDomainsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CustomDomainsClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[CustomDomainsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Update custom domain of one lifecycle application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *CustomDomainsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, domainName, domainResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *CustomDomainsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, domainName string, domainResource CustomDomainResource, options *CustomDomainsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainResource) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_deployments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_deployments_client.go deleted file mode 100644 index e65fa097..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_deployments_client.go +++ /dev/null @@ -1,1032 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DeploymentsClient contains the methods for the Deployments group. -// Don't use this type directly, use NewDeploymentsClient() instead. -type DeploymentsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDeploymentsClient creates a new instance of DeploymentsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DeploymentsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create a new Deployment or update an exiting Deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// deploymentResource - Parameters for the create or update operation -// options - DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate -// method. -func (client *DeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DeploymentsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DeploymentsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create a new Deployment or update an exiting Deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *DeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DeploymentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, deploymentResource) -} - -// BeginDelete - Operation to delete a Deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. -func (client *DeploymentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*runtime.Poller[DeploymentsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DeploymentsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Operation to delete a Deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *DeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DeploymentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginGenerateHeapDump - Generate Heap Dump -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// diagnosticParameters - Parameters for the diagnostic operation -// options - DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump -// method. -func (client *DeploymentsClient) BeginGenerateHeapDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*runtime.Poller[DeploymentsClientGenerateHeapDumpResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.generateHeapDump(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DeploymentsClientGenerateHeapDumpResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientGenerateHeapDumpResponse](options.ResumeToken, client.pl, nil) - } -} - -// GenerateHeapDump - Generate Heap Dump -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *DeploymentsClient) generateHeapDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*http.Response, error) { - req, err := client.generateHeapDumpCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// generateHeapDumpCreateRequest creates the GenerateHeapDump request. -func (client *DeploymentsClient) generateHeapDumpCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateHeapDumpOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateHeapDump" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, diagnosticParameters) -} - -// BeginGenerateThreadDump - Generate Thread Dump -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// diagnosticParameters - Parameters for the diagnostic operation -// options - DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump -// method. -func (client *DeploymentsClient) BeginGenerateThreadDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*runtime.Poller[DeploymentsClientGenerateThreadDumpResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.generateThreadDump(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DeploymentsClientGenerateThreadDumpResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientGenerateThreadDumpResponse](options.ResumeToken, client.pl, nil) - } -} - -// GenerateThreadDump - Generate Thread Dump -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *DeploymentsClient) generateThreadDump(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*http.Response, error) { - req, err := client.generateThreadDumpCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// generateThreadDumpCreateRequest creates the GenerateThreadDump request. -func (client *DeploymentsClient) generateThreadDumpCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginGenerateThreadDumpOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateThreadDump" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, diagnosticParameters) -} - -// Get - Get a Deployment and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. -func (client *DeploymentsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetOptions) (DeploymentsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return DeploymentsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DeploymentsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DeploymentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DeploymentsClient) getHandleResponse(resp *http.Response) (DeploymentsClientGetResponse, error) { - result := DeploymentsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentResource); err != nil { - return DeploymentsClientGetResponse{}, err - } - return result, nil -} - -// GetLogFileURL - Get deployment log file URL -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL -// method. -func (client *DeploymentsClient) GetLogFileURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetLogFileURLOptions) (DeploymentsClientGetLogFileURLResponse, error) { - req, err := client.getLogFileURLCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return DeploymentsClientGetLogFileURLResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DeploymentsClientGetLogFileURLResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DeploymentsClientGetLogFileURLResponse{}, runtime.NewResponseError(resp) - } - return client.getLogFileURLHandleResponse(resp) -} - -// getLogFileURLCreateRequest creates the GetLogFileURL request. -func (client *DeploymentsClient) getLogFileURLCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientGetLogFileURLOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/getLogFileUrl" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getLogFileURLHandleResponse handles the GetLogFileURL response. -func (client *DeploymentsClient) getLogFileURLHandleResponse(resp *http.Response) (DeploymentsClientGetLogFileURLResponse, error) { - result := DeploymentsClientGetLogFileURLResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogFileURLResponse); err != nil { - return DeploymentsClientGetLogFileURLResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in an App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// options - DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.List method. -func (client *DeploymentsClient) NewListPager(resourceGroupName string, serviceName string, appName string, options *DeploymentsClientListOptions) *runtime.Pager[DeploymentsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[DeploymentsClientListResponse]{ - More: func(page DeploymentsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DeploymentsClientListResponse) (DeploymentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, appName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeploymentsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DeploymentsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *DeploymentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, options *DeploymentsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - if options != nil && options.Version != nil { - for _, qv := range options.Version { - reqQP.Add("version", qv) - } - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DeploymentsClient) listHandleResponse(resp *http.Response) (DeploymentsClientListResponse, error) { - result := DeploymentsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentResourceCollection); err != nil { - return DeploymentsClientListResponse{}, err - } - return result, nil -} - -// NewListForClusterPager - List deployments for a certain service -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.ListForCluster -// method. -func (client *DeploymentsClient) NewListForClusterPager(resourceGroupName string, serviceName string, options *DeploymentsClientListForClusterOptions) *runtime.Pager[DeploymentsClientListForClusterResponse] { - return runtime.NewPager(runtime.PagingHandler[DeploymentsClientListForClusterResponse]{ - More: func(page DeploymentsClientListForClusterResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DeploymentsClientListForClusterResponse) (DeploymentsClientListForClusterResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listForClusterCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeploymentsClientListForClusterResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DeploymentsClientListForClusterResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeploymentsClientListForClusterResponse{}, runtime.NewResponseError(resp) - } - return client.listForClusterHandleResponse(resp) - }, - }) -} - -// listForClusterCreateRequest creates the ListForCluster request. -func (client *DeploymentsClient) listForClusterCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *DeploymentsClientListForClusterOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - if options != nil && options.Version != nil { - for _, qv := range options.Version { - reqQP.Add("version", qv) - } - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listForClusterHandleResponse handles the ListForCluster response. -func (client *DeploymentsClient) listForClusterHandleResponse(resp *http.Response) (DeploymentsClientListForClusterResponse, error) { - result := DeploymentsClientListForClusterResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentResourceCollection); err != nil { - return DeploymentsClientListForClusterResponse{}, err - } - return result, nil -} - -// BeginRestart - Restart the deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart -// method. -func (client *DeploymentsClient) BeginRestart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*runtime.Poller[DeploymentsClientRestartResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restart(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DeploymentsClientRestartResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientRestartResponse](options.ResumeToken, client.pl, nil) - } -} - -// Restart - Restart the deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *DeploymentsClient) restart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*http.Response, error) { - req, err := client.restartCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restartCreateRequest creates the Restart request. -func (client *DeploymentsClient) restartCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginRestartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/restart" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStart - Start the deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method. -func (client *DeploymentsClient) BeginStart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*runtime.Poller[DeploymentsClientStartResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.start(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DeploymentsClientStartResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientStartResponse](options.ResumeToken, client.pl, nil) - } -} - -// Start - Start the deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *DeploymentsClient) start(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*http.Response, error) { - req, err := client.startCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startCreateRequest creates the Start request. -func (client *DeploymentsClient) startCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/start" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStartJFR - Start JFR -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// diagnosticParameters - Parameters for the diagnostic operation -// options - DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR -// method. -func (client *DeploymentsClient) BeginStartJFR(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*runtime.Poller[DeploymentsClientStartJFRResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.startJFR(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DeploymentsClientStartJFRResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientStartJFRResponse](options.ResumeToken, client.pl, nil) - } -} - -// StartJFR - Start JFR -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *DeploymentsClient) startJFR(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*http.Response, error) { - req, err := client.startJFRCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, diagnosticParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startJFRCreateRequest creates the StartJFR request. -func (client *DeploymentsClient) startJFRCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, diagnosticParameters DiagnosticParameters, options *DeploymentsClientBeginStartJFROptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/startJFR" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, diagnosticParameters) -} - -// BeginStop - Stop the deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// options - DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method. -func (client *DeploymentsClient) BeginStop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*runtime.Poller[DeploymentsClientStopResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stop(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DeploymentsClientStopResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientStopResponse](options.ResumeToken, client.pl, nil) - } -} - -// Stop - Stop the deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *DeploymentsClient) stop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*http.Response, error) { - req, err := client.stopCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopCreateRequest creates the Stop request. -func (client *DeploymentsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, options *DeploymentsClientBeginStopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/stop" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginUpdate - Operation to update an exiting Deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// appName - The name of the App resource. -// deploymentName - The name of the Deployment resource. -// deploymentResource - Parameters for the update operation -// options - DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. -func (client *DeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*runtime.Poller[DeploymentsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DeploymentsClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DeploymentsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Operation to update an exiting Deployment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *DeploymentsClient) update(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, appName, deploymentName, deploymentResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *DeploymentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource, options *DeploymentsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if appName == "" { - return nil, errors.New("parameter appName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appName}", url.PathEscape(appName)) - if deploymentName == "" { - return nil, errors.New("parameter deploymentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deploymentName}", url.PathEscape(deploymentName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, deploymentResource) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_gatewaycustomdomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_gatewaycustomdomains_client.go deleted file mode 100644 index cc43cd2a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_gatewaycustomdomains_client.go +++ /dev/null @@ -1,353 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// GatewayCustomDomainsClient contains the methods for the GatewayCustomDomains group. -// Don't use this type directly, use NewGatewayCustomDomainsClient() instead. -type GatewayCustomDomainsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewGatewayCustomDomainsClient creates a new instance of GatewayCustomDomainsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewGatewayCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayCustomDomainsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &GatewayCustomDomainsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update the Spring Cloud Gateway custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// domainName - The name of the Spring Cloud Gateway custom domain. -// gatewayCustomDomainResource - The gateway custom domain resource for the create or update operation -// options - GatewayCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginCreateOrUpdate -// method. -func (client *GatewayCustomDomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayCustomDomainsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, domainName, gatewayCustomDomainResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[GatewayCustomDomainsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[GatewayCustomDomainsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update the Spring Cloud Gateway custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *GatewayCustomDomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, gatewayCustomDomainResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *GatewayCustomDomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, gatewayCustomDomainResource GatewayCustomDomainResource, options *GatewayCustomDomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, gatewayCustomDomainResource) -} - -// BeginDelete - Delete the Spring Cloud Gateway custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// domainName - The name of the Spring Cloud Gateway custom domain. -// options - GatewayCustomDomainsClientBeginDeleteOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginDelete -// method. -func (client *GatewayCustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*runtime.Poller[GatewayCustomDomainsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[GatewayCustomDomainsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[GatewayCustomDomainsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the Spring Cloud Gateway custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *GatewayCustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *GatewayCustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Spring Cloud Gateway custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// domainName - The name of the Spring Cloud Gateway custom domain. -// options - GatewayCustomDomainsClientGetOptions contains the optional parameters for the GatewayCustomDomainsClient.Get -// method. -func (client *GatewayCustomDomainsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientGetOptions) (GatewayCustomDomainsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, domainName, options) - if err != nil { - return GatewayCustomDomainsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GatewayCustomDomainsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayCustomDomainsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *GatewayCustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, domainName string, options *GatewayCustomDomainsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains/{domainName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *GatewayCustomDomainsClient) getHandleResponse(resp *http.Response) (GatewayCustomDomainsClientGetResponse, error) { - result := GatewayCustomDomainsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayCustomDomainResource); err != nil { - return GatewayCustomDomainsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handle requests to list all Spring Cloud Gateway custom domains. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// options - GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.List -// method. -func (client *GatewayCustomDomainsClient) NewListPager(resourceGroupName string, serviceName string, gatewayName string, options *GatewayCustomDomainsClientListOptions) *runtime.Pager[GatewayCustomDomainsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[GatewayCustomDomainsClientListResponse]{ - More: func(page GatewayCustomDomainsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *GatewayCustomDomainsClientListResponse) (GatewayCustomDomainsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GatewayCustomDomainsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GatewayCustomDomainsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayCustomDomainsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *GatewayCustomDomainsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewayCustomDomainsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/domains" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *GatewayCustomDomainsClient) listHandleResponse(resp *http.Response) (GatewayCustomDomainsClientListResponse, error) { - result := GatewayCustomDomainsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayCustomDomainResourceCollection); err != nil { - return GatewayCustomDomainsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_gatewayrouteconfigs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_gatewayrouteconfigs_client.go deleted file mode 100644 index 26a87344..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_gatewayrouteconfigs_client.go +++ /dev/null @@ -1,354 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// GatewayRouteConfigsClient contains the methods for the GatewayRouteConfigs group. -// Don't use this type directly, use NewGatewayRouteConfigsClient() instead. -type GatewayRouteConfigsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewGatewayRouteConfigsClient creates a new instance of GatewayRouteConfigsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewGatewayRouteConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewayRouteConfigsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &GatewayRouteConfigsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway -// route configs. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// routeConfigName - The name of the Spring Cloud Gateway route config. -// gatewayRouteConfigResource - The Spring Cloud Gateway route config for the create or update operation -// options - GatewayRouteConfigsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginCreateOrUpdate -// method. -func (client *GatewayRouteConfigsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewayRouteConfigsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, gatewayRouteConfigResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[GatewayRouteConfigsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[GatewayRouteConfigsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route -// configs. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *GatewayRouteConfigsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, gatewayRouteConfigResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *GatewayRouteConfigsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, gatewayRouteConfigResource GatewayRouteConfigResource, options *GatewayRouteConfigsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if routeConfigName == "" { - return nil, errors.New("parameter routeConfigName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeConfigName}", url.PathEscape(routeConfigName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, gatewayRouteConfigResource) -} - -// BeginDelete - Delete the Spring Cloud Gateway route config. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// routeConfigName - The name of the Spring Cloud Gateway route config. -// options - GatewayRouteConfigsClientBeginDeleteOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginDelete -// method. -func (client *GatewayRouteConfigsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*runtime.Poller[GatewayRouteConfigsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[GatewayRouteConfigsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[GatewayRouteConfigsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the Spring Cloud Gateway route config. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *GatewayRouteConfigsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *GatewayRouteConfigsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if routeConfigName == "" { - return nil, errors.New("parameter routeConfigName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeConfigName}", url.PathEscape(routeConfigName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Spring Cloud Gateway route configs. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// routeConfigName - The name of the Spring Cloud Gateway route config. -// options - GatewayRouteConfigsClientGetOptions contains the optional parameters for the GatewayRouteConfigsClient.Get method. -func (client *GatewayRouteConfigsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientGetOptions) (GatewayRouteConfigsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, routeConfigName, options) - if err != nil { - return GatewayRouteConfigsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GatewayRouteConfigsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayRouteConfigsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *GatewayRouteConfigsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, routeConfigName string, options *GatewayRouteConfigsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if routeConfigName == "" { - return nil, errors.New("parameter routeConfigName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeConfigName}", url.PathEscape(routeConfigName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *GatewayRouteConfigsClient) getHandleResponse(resp *http.Response) (GatewayRouteConfigsClientGetResponse, error) { - result := GatewayRouteConfigsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayRouteConfigResource); err != nil { - return GatewayRouteConfigsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handle requests to list all Spring Cloud Gateway route configs. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// options - GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.List -// method. -func (client *GatewayRouteConfigsClient) NewListPager(resourceGroupName string, serviceName string, gatewayName string, options *GatewayRouteConfigsClientListOptions) *runtime.Pager[GatewayRouteConfigsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[GatewayRouteConfigsClientListResponse]{ - More: func(page GatewayRouteConfigsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *GatewayRouteConfigsClientListResponse) (GatewayRouteConfigsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GatewayRouteConfigsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GatewayRouteConfigsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewayRouteConfigsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *GatewayRouteConfigsClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewayRouteConfigsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *GatewayRouteConfigsClient) listHandleResponse(resp *http.Response) (GatewayRouteConfigsClientListResponse, error) { - result := GatewayRouteConfigsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayRouteConfigResourceCollection); err != nil { - return GatewayRouteConfigsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_gateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_gateways_client.go deleted file mode 100644 index 97067885..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_gateways_client.go +++ /dev/null @@ -1,393 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// GatewaysClient contains the methods for the Gateways group. -// Don't use this type directly, use NewGatewaysClient() instead. -type GatewaysClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewGatewaysClient creates a new instance of GatewaysClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GatewaysClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &GatewaysClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// gatewayResource - The gateway for the create or update operation -// options - GatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewaysClient.BeginCreateOrUpdate -// method. -func (client *GatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[GatewaysClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, gatewayName, gatewayResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[GatewaysClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[GatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create the default Spring Cloud Gateway or update the existing Spring Cloud Gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *GatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, gatewayResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *GatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, gatewayResource GatewayResource, options *GatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, gatewayResource) -} - -// BeginDelete - Disable the default Spring Cloud Gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// options - GatewaysClientBeginDeleteOptions contains the optional parameters for the GatewaysClient.BeginDelete method. -func (client *GatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*runtime.Poller[GatewaysClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, gatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[GatewaysClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[GatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Disable the default Spring Cloud Gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *GatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *GatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Spring Cloud Gateway and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// options - GatewaysClientGetOptions contains the optional parameters for the GatewaysClient.Get method. -func (client *GatewaysClient) Get(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientGetOptions) (GatewaysClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, options) - if err != nil { - return GatewaysClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GatewaysClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewaysClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *GatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, options *GatewaysClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *GatewaysClient) getHandleResponse(resp *http.Response) (GatewaysClientGetResponse, error) { - result := GatewaysClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayResource); err != nil { - return GatewaysClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - GatewaysClientListOptions contains the optional parameters for the GatewaysClient.List method. -func (client *GatewaysClient) NewListPager(resourceGroupName string, serviceName string, options *GatewaysClientListOptions) *runtime.Pager[GatewaysClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[GatewaysClientListResponse]{ - More: func(page GatewaysClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *GatewaysClientListResponse) (GatewaysClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GatewaysClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewaysClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *GatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *GatewaysClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *GatewaysClient) listHandleResponse(resp *http.Response) (GatewaysClientListResponse, error) { - result := GatewaysClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GatewayResourceCollection); err != nil { - return GatewaysClientListResponse{}, err - } - return result, nil -} - -// ValidateDomain - Check the domains are valid as well as not in use. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// gatewayName - The name of Spring Cloud Gateway. -// validatePayload - Custom domain payload to be validated -// options - GatewaysClientValidateDomainOptions contains the optional parameters for the GatewaysClient.ValidateDomain method. -func (client *GatewaysClient) ValidateDomain(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, validatePayload CustomDomainValidatePayload, options *GatewaysClientValidateDomainOptions) (GatewaysClientValidateDomainResponse, error) { - req, err := client.validateDomainCreateRequest(ctx, resourceGroupName, serviceName, gatewayName, validatePayload, options) - if err != nil { - return GatewaysClientValidateDomainResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GatewaysClientValidateDomainResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GatewaysClientValidateDomainResponse{}, runtime.NewResponseError(resp) - } - return client.validateDomainHandleResponse(resp) -} - -// validateDomainCreateRequest creates the ValidateDomain request. -func (client *GatewaysClient) validateDomainCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, gatewayName string, validatePayload CustomDomainValidatePayload, options *GatewaysClientValidateDomainOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/validateDomain" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validatePayload) -} - -// validateDomainHandleResponse handles the ValidateDomain response. -func (client *GatewaysClient) validateDomainHandleResponse(resp *http.Response) (GatewaysClientValidateDomainResponse, error) { - result := GatewaysClientValidateDomainResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainValidateResult); err != nil { - return GatewaysClientValidateDomainResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_models.go deleted file mode 100644 index bd68f04e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_models.go +++ /dev/null @@ -1,3427 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import "time" - -// APIPortalCustomDomainProperties - The properties of custom domain for API portal -type APIPortalCustomDomainProperties struct { - // The thumbprint of bound certificate. - Thumbprint *string `json:"thumbprint,omitempty"` -} - -// APIPortalCustomDomainResource - Custom domain of the API portal -type APIPortalCustomDomainResource struct { - // The properties of custom domain for API portal - Properties *APIPortalCustomDomainProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// APIPortalCustomDomainResourceCollection - Object that includes an array of API portal custom domain resources and a possible -// link for next set -type APIPortalCustomDomainResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of API portal custom domain resources - Value []*APIPortalCustomDomainResource `json:"value,omitempty"` -} - -// APIPortalCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginCreateOrUpdate -// method. -type APIPortalCustomDomainsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// APIPortalCustomDomainsClientBeginDeleteOptions contains the optional parameters for the APIPortalCustomDomainsClient.BeginDelete -// method. -type APIPortalCustomDomainsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// APIPortalCustomDomainsClientGetOptions contains the optional parameters for the APIPortalCustomDomainsClient.Get method. -type APIPortalCustomDomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIPortalCustomDomainsClientListOptions contains the optional parameters for the APIPortalCustomDomainsClient.List method. -type APIPortalCustomDomainsClientListOptions struct { - // placeholder for future optional parameters -} - -// APIPortalInstance - Collection of instances belong to the API portal -type APIPortalInstance struct { - // READ-ONLY; Name of the API portal instance - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Status of the API portal instance - Status *string `json:"status,omitempty" azure:"ro"` -} - -// APIPortalProperties - API portal properties payload -type APIPortalProperties struct { - // The array of resource Ids of gateway to integrate with API portal. - GatewayIDs []*string `json:"gatewayIds,omitempty"` - - // Indicate if only https is allowed. - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - - // Indicates whether the API portal exposes endpoint. - Public *bool `json:"public,omitempty"` - - // Collection of OpenAPI source URL locations. - SourceUrls []*string `json:"sourceUrls,omitempty"` - - // Single sign-on related configuration - SsoProperties *SsoProperties `json:"ssoProperties,omitempty"` - - // READ-ONLY; Collection of instances belong to API portal. - Instances []*APIPortalInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; State of the API portal. - ProvisioningState *APIPortalProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The requested resource quantity for required CPU and Memory. - ResourceRequests *APIPortalResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` - - // READ-ONLY; URL of the API portal, exposed when 'public' is true. - URL *string `json:"url,omitempty" azure:"ro"` -} - -// APIPortalResource - API portal resource -type APIPortalResource struct { - // API portal properties payload - Properties *APIPortalProperties `json:"properties,omitempty"` - - // Sku of the API portal resource - SKU *SKU `json:"sku,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// APIPortalResourceCollection - Object that includes an array of API portal resources and a possible link for next set -type APIPortalResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of API portal resources - Value []*APIPortalResource `json:"value,omitempty"` -} - -// APIPortalResourceRequests - Resource requests of the API portal -type APIPortalResourceRequests struct { - // READ-ONLY; Cpu allocated to each API portal instance - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; Memory allocated to each API portal instance - Memory *string `json:"memory,omitempty" azure:"ro"` -} - -// APIPortalsClientBeginCreateOrUpdateOptions contains the optional parameters for the APIPortalsClient.BeginCreateOrUpdate -// method. -type APIPortalsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// APIPortalsClientBeginDeleteOptions contains the optional parameters for the APIPortalsClient.BeginDelete method. -type APIPortalsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// APIPortalsClientGetOptions contains the optional parameters for the APIPortalsClient.Get method. -type APIPortalsClientGetOptions struct { - // placeholder for future optional parameters -} - -// APIPortalsClientListOptions contains the optional parameters for the APIPortalsClient.List method. -type APIPortalsClientListOptions struct { - // placeholder for future optional parameters -} - -// APIPortalsClientValidateDomainOptions contains the optional parameters for the APIPortalsClient.ValidateDomain method. -type APIPortalsClientValidateDomainOptions struct { - // placeholder for future optional parameters -} - -// ActiveDeploymentCollection - Object that includes an array of Deployment resource name and set them as active. -type ActiveDeploymentCollection struct { - // Collection of Deployment name. - ActiveDeploymentNames []*string `json:"activeDeploymentNames,omitempty"` -} - -// AppResource - App resource payload -type AppResource struct { - // The Managed Identity type of the app resource - Identity *ManagedIdentityProperties `json:"identity,omitempty"` - - // The GEO location of the application, always the same with its parent resource - Location *string `json:"location,omitempty"` - - // Properties of the App resource - Properties *AppResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AppResourceCollection - Object that includes an array of App resources and a possible link for next set -type AppResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of App resources - Value []*AppResource `json:"value,omitempty"` -} - -// AppResourceProperties - App resource properties payload -type AppResourceProperties struct { - // Collection of addons - AddonConfigs map[string]map[string]interface{} `json:"addonConfigs,omitempty"` - - // List of custom persistent disks - CustomPersistentDisks []*CustomPersistentDiskResource `json:"customPersistentDisks,omitempty"` - - // Indicate if end to end TLS is enabled. - EnableEndToEndTLS *bool `json:"enableEndToEndTLS,omitempty"` - - // Fully qualified dns Name. - Fqdn *string `json:"fqdn,omitempty"` - - // Indicate if only https is allowed. - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - - // Collection of loaded certificates - LoadedCertificates []*LoadedCertificate `json:"loadedCertificates,omitempty"` - - // Persistent disk settings - PersistentDisk *PersistentDisk `json:"persistentDisk,omitempty"` - - // Indicates whether the App exposes public endpoint - Public *bool `json:"public,omitempty"` - - // Temporary disk settings - TemporaryDisk *TemporaryDisk `json:"temporaryDisk,omitempty"` - - // Additional App settings in vnet injection instance - VnetAddons *AppVNetAddons `json:"vnetAddons,omitempty"` - - // READ-ONLY; Provisioning state of the App - ProvisioningState *AppResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; URL of the App - URL *string `json:"url,omitempty" azure:"ro"` -} - -// AppVNetAddons - Additional App settings in vnet injection instance -type AppVNetAddons struct { - // Indicates whether the App in vnet injection instance exposes endpoint which could be accessed from internet. - PublicEndpoint *bool `json:"publicEndpoint,omitempty"` - - // READ-ONLY; URL of the App in vnet injection instance which could be accessed from internet - PublicEndpointURL *string `json:"publicEndpointUrl,omitempty" azure:"ro"` -} - -// ApplicationInsightsAgentVersions - Application Insights agent versions properties payload -type ApplicationInsightsAgentVersions struct { - // READ-ONLY; Indicates the version of application insight java agent - Java *string `json:"java,omitempty" azure:"ro"` -} - -// AppsClientBeginCreateOrUpdateOptions contains the optional parameters for the AppsClient.BeginCreateOrUpdate method. -type AppsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AppsClientBeginDeleteOptions contains the optional parameters for the AppsClient.BeginDelete method. -type AppsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AppsClientBeginSetActiveDeploymentsOptions contains the optional parameters for the AppsClient.BeginSetActiveDeployments -// method. -type AppsClientBeginSetActiveDeploymentsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AppsClientBeginUpdateOptions contains the optional parameters for the AppsClient.BeginUpdate method. -type AppsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AppsClientGetOptions contains the optional parameters for the AppsClient.Get method. -type AppsClientGetOptions struct { - // Indicates whether sync status - SyncStatus *string -} - -// AppsClientGetResourceUploadURLOptions contains the optional parameters for the AppsClient.GetResourceUploadURL method. -type AppsClientGetResourceUploadURLOptions struct { - // placeholder for future optional parameters -} - -// AppsClientListOptions contains the optional parameters for the AppsClient.List method. -type AppsClientListOptions struct { - // placeholder for future optional parameters -} - -// AppsClientValidateDomainOptions contains the optional parameters for the AppsClient.ValidateDomain method. -type AppsClientValidateDomainOptions struct { - // placeholder for future optional parameters -} - -// AvailableOperations - Available operations of the service -type AvailableOperations struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of available operation details - Value []*OperationDetail `json:"value,omitempty"` -} - -type AvailableRuntimeVersions struct { - // READ-ONLY; A list of all supported runtime versions. - Value []*SupportedRuntimeVersion `json:"value,omitempty" azure:"ro"` -} - -// AzureFileVolume - The properties of the Azure File volume. Azure File shares are mounted as volumes. -type AzureFileVolume struct { - // REQUIRED; The mount path of the persistent disk. - MountPath *string `json:"mountPath,omitempty"` - - // REQUIRED; The share name of the Azure File share. - ShareName *string `json:"shareName,omitempty"` - - // REQUIRED; The type of the underlying resource to mount as a persistent disk. - Type *Type `json:"type,omitempty"` - - // These are the mount options for a persistent disk. - MountOptions []*string `json:"mountOptions,omitempty"` - - // Indicates whether the persistent disk is a readOnly one. - ReadOnly *bool `json:"readOnly,omitempty"` -} - -// GetCustomPersistentDiskProperties implements the CustomPersistentDiskPropertiesClassification interface for type AzureFileVolume. -func (a *AzureFileVolume) GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties { - return &CustomPersistentDiskProperties{ - Type: a.Type, - MountPath: a.MountPath, - ReadOnly: a.ReadOnly, - MountOptions: a.MountOptions, - } -} - -// BindingResource - Binding resource payload -type BindingResource struct { - // Properties of the Binding resource - Properties *BindingResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BindingResourceCollection - Object that includes an array of Binding resources and a possible link for next set -type BindingResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Binding resources - Value []*BindingResource `json:"value,omitempty"` -} - -// BindingResourceProperties - Binding resource properties payload -type BindingResourceProperties struct { - // Binding parameters of the Binding resource - BindingParameters map[string]interface{} `json:"bindingParameters,omitempty"` - - // The key of the bound resource - Key *string `json:"key,omitempty"` - - // The Azure resource id of the bound resource - ResourceID *string `json:"resourceId,omitempty"` - - // READ-ONLY; Creation time of the Binding resource - CreatedAt *string `json:"createdAt,omitempty" azure:"ro"` - - // READ-ONLY; The generated Spring Boot property file for this binding. The secret will be deducted. - GeneratedProperties *string `json:"generatedProperties,omitempty" azure:"ro"` - - // READ-ONLY; The name of the bound resource - ResourceName *string `json:"resourceName,omitempty" azure:"ro"` - - // READ-ONLY; The standard Azure resource type of the bound resource - ResourceType *string `json:"resourceType,omitempty" azure:"ro"` - - // READ-ONLY; Update time of the Binding resource - UpdatedAt *string `json:"updatedAt,omitempty" azure:"ro"` -} - -// BindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the BindingsClient.BeginCreateOrUpdate method. -type BindingsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BindingsClientBeginDeleteOptions contains the optional parameters for the BindingsClient.BeginDelete method. -type BindingsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BindingsClientBeginUpdateOptions contains the optional parameters for the BindingsClient.BeginUpdate method. -type BindingsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BindingsClientGetOptions contains the optional parameters for the BindingsClient.Get method. -type BindingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BindingsClientListOptions contains the optional parameters for the BindingsClient.List method. -type BindingsClientListOptions struct { - // placeholder for future optional parameters -} - -// Build resource payload -type Build struct { - // Properties of the build resource - Properties *BuildProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BuildCollection - Object that includes an array of Build resources and a possible link for next set -type BuildCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Build resources - Value []*Build `json:"value,omitempty"` -} - -// BuildProperties - Build resource properties payload -type BuildProperties struct { - // The resource id of agent pool - AgentPool *string `json:"agentPool,omitempty"` - - // The resource id of builder to build the source code - Builder *string `json:"builder,omitempty"` - - // The environment variables for this build - Env map[string]*string `json:"env,omitempty"` - - // The relative path of source code - RelativePath *string `json:"relativePath,omitempty"` - - // The customized build resource for this build - ResourceRequests *BuildResourceRequests `json:"resourceRequests,omitempty"` - - // READ-ONLY; Provisioning state of the KPack build result - ProvisioningState *BuildProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The build result triggered by this build - TriggeredBuildResult *TriggeredBuildResult `json:"triggeredBuildResult,omitempty" azure:"ro"` -} - -// BuildResourceRequests - Resource request payload of Build Resource. -type BuildResourceRequests struct { - // Optional Cpu allocated to the build resource. 1 core can be represented by 1 or 1000m. The default value is 1, this should - // not exceed build service agent pool cpu size. - CPU *string `json:"cpu,omitempty"` - - // Optional Memory allocated to the build resource. 1 GB can be represented by 1Gi or 1024Mi. The default value is 2Gi, this - // should not exceed build service agent pool memory size. - Memory *string `json:"memory,omitempty"` -} - -// BuildResult - Build result resource payload -type BuildResult struct { - // Properties of the build result resource - Properties *BuildResultProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BuildResultCollection - Object that includes an array of Build result resources and a possible link for next set -type BuildResultCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Build result resources - Value []*BuildResult `json:"value,omitempty"` -} - -// BuildResultLog - Build result log resource properties payload -type BuildResultLog struct { - // The public download URL of this build result log - BlobURL *string `json:"blobUrl,omitempty"` -} - -// BuildResultProperties - Build result resource properties payload -type BuildResultProperties struct { - // The build pod name which can be used to get the build log streaming. - BuildPodName *string `json:"buildPodName,omitempty"` - - // The name of this build result - Name *string `json:"name,omitempty"` - - // READ-ONLY; All of the build stage (init-container and container) resources in build pod. - BuildStages []*BuildStageProperties `json:"buildStages,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the KPack build result - ProvisioningState *BuildResultProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// BuildResultUserSourceInfo - Reference to a build result -type BuildResultUserSourceInfo struct { - // REQUIRED; Type of the source uploaded - Type *string `json:"type,omitempty"` - - // Resource id of an existing succeeded build result under the same Spring instance. - BuildResultID *string `json:"buildResultId,omitempty"` - - // Version of the source - Version *string `json:"version,omitempty"` -} - -// GetUserSourceInfo implements the UserSourceInfoClassification interface for type BuildResultUserSourceInfo. -func (b *BuildResultUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { - return &UserSourceInfo{ - Type: b.Type, - Version: b.Version, - } -} - -// BuildService - Build service resource payload -type BuildService struct { - // Properties of the build resource - Properties *BuildServiceProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BuildServiceAgentPoolClientBeginUpdatePutOptions contains the optional parameters for the BuildServiceAgentPoolClient.BeginUpdatePut -// method. -type BuildServiceAgentPoolClientBeginUpdatePutOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BuildServiceAgentPoolClientGetOptions contains the optional parameters for the BuildServiceAgentPoolClient.Get method. -type BuildServiceAgentPoolClientGetOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceAgentPoolClientListOptions contains the optional parameters for the BuildServiceAgentPoolClient.List method. -type BuildServiceAgentPoolClientListOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceAgentPoolProperties - Build service agent pool properties -type BuildServiceAgentPoolProperties struct { - // build service agent pool size properties - PoolSize *BuildServiceAgentPoolSizeProperties `json:"poolSize,omitempty"` - - // READ-ONLY; Provisioning state of the build service agent pool - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// BuildServiceAgentPoolResource - The build service agent pool resource -type BuildServiceAgentPoolResource struct { - // build service agent pool properties - Properties *BuildServiceAgentPoolProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BuildServiceAgentPoolResourceCollection - Object that includes an array of build service agent pool resources and a possible -// link for next set -type BuildServiceAgentPoolResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of build service agent pool resource - Value []*BuildServiceAgentPoolResource `json:"value,omitempty"` -} - -// BuildServiceAgentPoolSizeProperties - Build service agent pool size properties -type BuildServiceAgentPoolSizeProperties struct { - // The name of build service agent pool size - Name *string `json:"name,omitempty"` - - // READ-ONLY; The cpu property of build service agent pool size - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; The memory property of build service agent pool size - Memory *string `json:"memory,omitempty" azure:"ro"` -} - -// BuildServiceBuilderClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildServiceBuilderClient.BeginCreateOrUpdate -// method. -type BuildServiceBuilderClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BuildServiceBuilderClientBeginDeleteOptions contains the optional parameters for the BuildServiceBuilderClient.BeginDelete -// method. -type BuildServiceBuilderClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BuildServiceBuilderClientGetOptions contains the optional parameters for the BuildServiceBuilderClient.Get method. -type BuildServiceBuilderClientGetOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceBuilderClientListOptions contains the optional parameters for the BuildServiceBuilderClient.List method. -type BuildServiceBuilderClientListOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientCreateOrUpdateBuildOptions contains the optional parameters for the BuildServiceClient.CreateOrUpdateBuild -// method. -type BuildServiceClientCreateOrUpdateBuildOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientGetBuildOptions contains the optional parameters for the BuildServiceClient.GetBuild method. -type BuildServiceClientGetBuildOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientGetBuildResultLogOptions contains the optional parameters for the BuildServiceClient.GetBuildResultLog -// method. -type BuildServiceClientGetBuildResultLogOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientGetBuildResultOptions contains the optional parameters for the BuildServiceClient.GetBuildResult method. -type BuildServiceClientGetBuildResultOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientGetBuildServiceOptions contains the optional parameters for the BuildServiceClient.GetBuildService method. -type BuildServiceClientGetBuildServiceOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientGetResourceUploadURLOptions contains the optional parameters for the BuildServiceClient.GetResourceUploadURL -// method. -type BuildServiceClientGetResourceUploadURLOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientGetSupportedBuildpackOptions contains the optional parameters for the BuildServiceClient.GetSupportedBuildpack -// method. -type BuildServiceClientGetSupportedBuildpackOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientGetSupportedStackOptions contains the optional parameters for the BuildServiceClient.GetSupportedStack -// method. -type BuildServiceClientGetSupportedStackOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientListBuildResultsOptions contains the optional parameters for the BuildServiceClient.ListBuildResults -// method. -type BuildServiceClientListBuildResultsOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientListBuildServicesOptions contains the optional parameters for the BuildServiceClient.ListBuildServices -// method. -type BuildServiceClientListBuildServicesOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientListBuildsOptions contains the optional parameters for the BuildServiceClient.ListBuilds method. -type BuildServiceClientListBuildsOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientListSupportedBuildpacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedBuildpacks -// method. -type BuildServiceClientListSupportedBuildpacksOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceClientListSupportedStacksOptions contains the optional parameters for the BuildServiceClient.ListSupportedStacks -// method. -type BuildServiceClientListSupportedStacksOptions struct { - // placeholder for future optional parameters -} - -// BuildServiceCollection - Object that includes an array of Build service resources and a possible link for next set -type BuildServiceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Build service resources - Value []*BuildService `json:"value,omitempty"` -} - -// BuildServiceProperties - Build service resource properties payload -type BuildServiceProperties struct { - // The installed KPack version in this build service. - KPackVersion *string `json:"kPackVersion,omitempty"` - - // The runtime resource configuration of this build service. - ResourceRequests *BuildServicePropertiesResourceRequests `json:"resourceRequests,omitempty"` - - // READ-ONLY; Provisioning state of the KPack build result - ProvisioningState *BuildServiceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// BuildServicePropertiesResourceRequests - The runtime resource configuration of this build service. -type BuildServicePropertiesResourceRequests struct { - // READ-ONLY; vCPU allocated to the entire build service node pool. - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; Memory allocated to the entire build service node pool. - Memory *string `json:"memory,omitempty" azure:"ro"` -} - -// BuildStageProperties - The build stage (init-container and container) resources in build pod. -type BuildStageProperties struct { - // READ-ONLY; The name of this build stage resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of this build stage resource. - Status *KPackBuildStageProvisioningState `json:"status,omitempty" azure:"ro"` -} - -// BuilderProperties - KPack Builder properties payload -type BuilderProperties struct { - // Builder buildpack groups. - BuildpackGroups []*BuildpacksGroupProperties `json:"buildpackGroups,omitempty"` - - // Builder cluster stack property. - Stack *StackProperties `json:"stack,omitempty"` - - // READ-ONLY; Builder provision status. - ProvisioningState *BuilderProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// BuilderResource - KPack Builder resource -type BuilderResource struct { - // Property of the Builder resource. - Properties *BuilderProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BuilderResourceCollection - Object that includes an array of Builder resources and a possible link for next set -type BuilderResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Builder resources - Value []*BuilderResource `json:"value,omitempty"` -} - -// BuildpackBindingClientBeginCreateOrUpdateOptions contains the optional parameters for the BuildpackBindingClient.BeginCreateOrUpdate -// method. -type BuildpackBindingClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BuildpackBindingClientBeginDeleteOptions contains the optional parameters for the BuildpackBindingClient.BeginDelete method. -type BuildpackBindingClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BuildpackBindingClientGetOptions contains the optional parameters for the BuildpackBindingClient.Get method. -type BuildpackBindingClientGetOptions struct { - // placeholder for future optional parameters -} - -// BuildpackBindingClientListOptions contains the optional parameters for the BuildpackBindingClient.List method. -type BuildpackBindingClientListOptions struct { - // placeholder for future optional parameters -} - -// BuildpackBindingLaunchProperties - Buildpack Binding Launch Properties -type BuildpackBindingLaunchProperties struct { - // Non-sensitive properties for launchProperties - Properties map[string]*string `json:"properties,omitempty"` - - // Sensitive properties for launchProperties - Secrets map[string]*string `json:"secrets,omitempty"` -} - -// BuildpackBindingProperties - Properties of a buildpack binding -type BuildpackBindingProperties struct { - // Buildpack Binding Type - BindingType *BindingType `json:"bindingType,omitempty"` - - // The object describes the buildpack binding launch properties - LaunchProperties *BuildpackBindingLaunchProperties `json:"launchProperties,omitempty"` - - // READ-ONLY; State of the Buildpack Binding. - ProvisioningState *BuildpackBindingProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// BuildpackBindingResource - Buildpack Binding Resource object -type BuildpackBindingResource struct { - // Properties of a buildpack binding - Properties *BuildpackBindingProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BuildpackBindingResourceCollection - Object that includes an array of BuildpackBinding resources and a possible link for -// next set -type BuildpackBindingResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of BuildpackBinding resources - Value []*BuildpackBindingResource `json:"value,omitempty"` -} - -// BuildpackProperties - Buildpack properties payload -type BuildpackProperties struct { - // Id of the buildpack - ID *string `json:"id,omitempty"` -} - -// BuildpacksGroupProperties - Buildpack group properties of the Builder -type BuildpacksGroupProperties struct { - // Buildpacks in the buildpack group - Buildpacks []*BuildpackProperties `json:"buildpacks,omitempty"` - - // Buildpack group name - Name *string `json:"name,omitempty"` -} - -// CertificatePropertiesClassification provides polymorphic access to related types. -// Call the interface's GetCertificateProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *CertificateProperties, *ContentCertificateProperties, *KeyVaultCertificateProperties -type CertificatePropertiesClassification interface { - // GetCertificateProperties returns the CertificateProperties content of the underlying type. - GetCertificateProperties() *CertificateProperties -} - -// CertificateProperties - Certificate resource payload. -type CertificateProperties struct { - // REQUIRED; The type of the certificate source. - Type *string `json:"type,omitempty"` - - // READ-ONLY; The activate date of certificate. - ActivateDate *string `json:"activateDate,omitempty" azure:"ro"` - - // READ-ONLY; The domain list of certificate. - DNSNames []*string `json:"dnsNames,omitempty" azure:"ro"` - - // READ-ONLY; The expiration date of certificate. - ExpirationDate *string `json:"expirationDate,omitempty" azure:"ro"` - - // READ-ONLY; The issue date of certificate. - IssuedDate *string `json:"issuedDate,omitempty" azure:"ro"` - - // READ-ONLY; The issuer of certificate. - Issuer *string `json:"issuer,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Certificate - ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The subject name of certificate. - SubjectName *string `json:"subjectName,omitempty" azure:"ro"` - - // READ-ONLY; The thumbprint of certificate. - Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` -} - -// GetCertificateProperties implements the CertificatePropertiesClassification interface for type CertificateProperties. -func (c *CertificateProperties) GetCertificateProperties() *CertificateProperties { return c } - -// CertificateResource - Certificate resource payload. -type CertificateResource struct { - // Properties of the certificate resource payload. - Properties CertificatePropertiesClassification `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CertificateResourceCollection - Collection compose of certificate resources list and a possible link for next page. -type CertificateResourceCollection struct { - // The link to next page of certificate list. - NextLink *string `json:"nextLink,omitempty"` - - // The certificate resources list. - Value []*CertificateResource `json:"value,omitempty"` -} - -// CertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.BeginCreateOrUpdate -// method. -type CertificatesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CertificatesClientBeginDeleteOptions contains the optional parameters for the CertificatesClient.BeginDelete method. -type CertificatesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. -type CertificatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.List method. -type CertificatesClientListOptions struct { - // placeholder for future optional parameters -} - -// CloudError - An error response from the service. -type CloudError struct { - // An error response from the service. - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorBody - An error response from the service. -type CloudErrorBody struct { - // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - - // A list of additional details about the error. - Details []*CloudErrorBody `json:"details,omitempty"` - - // A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` - - // The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` -} - -// ClusterResourceProperties - Service properties payload -type ClusterResourceProperties struct { - // Purchasing 3rd party product of the Service resource. - MarketplaceResource *MarketplaceResource `json:"marketplaceResource,omitempty"` - - // Network profile of the Service - NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` - - // Additional Service settings in vnet injection instance - VnetAddons *ServiceVNetAddons `json:"vnetAddons,omitempty"` - ZoneRedundant *bool `json:"zoneRedundant,omitempty"` - - // READ-ONLY; Fully qualified dns name of the service instance - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - - // READ-ONLY; Power state of the Service - PowerState *PowerState `json:"powerState,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Service - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; ServiceInstanceEntity GUID which uniquely identifies a created resource - ServiceID *string `json:"serviceId,omitempty" azure:"ro"` - - // READ-ONLY; Version of the Service - Version *int32 `json:"version,omitempty" azure:"ro"` -} - -// ConfigServerGitProperty - Property of git. -type ConfigServerGitProperty struct { - // REQUIRED; URI of the repository - URI *string `json:"uri,omitempty"` - - // Public sshKey of git repository. - HostKey *string `json:"hostKey,omitempty"` - - // SshKey algorithm of git repository. - HostKeyAlgorithm *string `json:"hostKeyAlgorithm,omitempty"` - - // Label of the repository - Label *string `json:"label,omitempty"` - - // Password of git repository basic auth. - Password *string `json:"password,omitempty"` - - // Private sshKey algorithm of git repository. - PrivateKey *string `json:"privateKey,omitempty"` - - // Repositories of git. - Repositories []*GitPatternRepository `json:"repositories,omitempty"` - - // Searching path of the repository - SearchPaths []*string `json:"searchPaths,omitempty"` - - // Strict host key checking or not. - StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"` - - // Username of git repository basic auth. - Username *string `json:"username,omitempty"` -} - -// ConfigServerProperties - Config server git properties payload -type ConfigServerProperties struct { - // Settings of config server. - ConfigServer *ConfigServerSettings `json:"configServer,omitempty"` - - // Error when apply config server settings. - Error *Error `json:"error,omitempty"` - - // READ-ONLY; State of the config server. - ProvisioningState *ConfigServerState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ConfigServerResource - Config Server resource -type ConfigServerResource struct { - // Properties of the Config Server resource - Properties *ConfigServerProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ConfigServerSettings - The settings of config server. -type ConfigServerSettings struct { - // Property of git environment. - GitProperty *ConfigServerGitProperty `json:"gitProperty,omitempty"` -} - -// ConfigServerSettingsErrorRecord - Error record of the config server settings -type ConfigServerSettingsErrorRecord struct { - // The detail error messages of the record - Messages []*string `json:"messages,omitempty"` - - // The name of the config server settings error record - Name *string `json:"name,omitempty"` - - // The uri of the config server settings error record - URI *string `json:"uri,omitempty"` -} - -// ConfigServerSettingsValidateResult - Validation result for config server settings -type ConfigServerSettingsValidateResult struct { - // The detail validation results - Details []*ConfigServerSettingsErrorRecord `json:"details,omitempty"` - - // Indicate if the config server settings are valid - IsValid *bool `json:"isValid,omitempty"` -} - -// ConfigServersClientBeginUpdatePatchOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePatch -// method. -type ConfigServersClientBeginUpdatePatchOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigServersClientBeginUpdatePutOptions contains the optional parameters for the ConfigServersClient.BeginUpdatePut method. -type ConfigServersClientBeginUpdatePutOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigServersClientBeginValidateOptions contains the optional parameters for the ConfigServersClient.BeginValidate method. -type ConfigServersClientBeginValidateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigServersClientGetOptions contains the optional parameters for the ConfigServersClient.Get method. -type ConfigServersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConfigurationServiceGitProperty - Property of git environment. -type ConfigurationServiceGitProperty struct { - // Repositories of Application Configuration Service git property. - Repositories []*ConfigurationServiceGitRepository `json:"repositories,omitempty"` -} - -// ConfigurationServiceGitPropertyValidateResult - Validation result for configuration service settings -type ConfigurationServiceGitPropertyValidateResult struct { - // The detail validation results - GitReposValidationResult []*ValidationMessages `json:"gitReposValidationResult,omitempty"` - - // Indicate if the configuration service settings are valid - IsValid *bool `json:"isValid,omitempty"` -} - -// ConfigurationServiceGitRepository - Git repository property payload for Application Configuration Service -type ConfigurationServiceGitRepository struct { - // REQUIRED; Label of the repository - Label *string `json:"label,omitempty"` - - // REQUIRED; Name of the repository - Name *string `json:"name,omitempty"` - - // REQUIRED; Collection of patterns of the repository - Patterns []*string `json:"patterns,omitempty"` - - // REQUIRED; URI of the repository - URI *string `json:"uri,omitempty"` - - // Public sshKey of git repository. - HostKey *string `json:"hostKey,omitempty"` - - // SshKey algorithm of git repository. - HostKeyAlgorithm *string `json:"hostKeyAlgorithm,omitempty"` - - // Password of git repository basic auth. - Password *string `json:"password,omitempty"` - - // Private sshKey algorithm of git repository. - PrivateKey *string `json:"privateKey,omitempty"` - - // Searching path of the repository - SearchPaths []*string `json:"searchPaths,omitempty"` - - // Strict host key checking or not. - StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"` - - // Username of git repository basic auth. - Username *string `json:"username,omitempty"` -} - -// ConfigurationServiceInstance - Collection of instances belong to the Application Configuration Service -type ConfigurationServiceInstance struct { - // READ-ONLY; Name of the Application Configuration Service instance - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Application Configuration Service instance - Status *string `json:"status,omitempty" azure:"ro"` -} - -// ConfigurationServiceProperties - Application Configuration Service properties payload -type ConfigurationServiceProperties struct { - // The settings of Application Configuration Service. - Settings *ConfigurationServiceSettings `json:"settings,omitempty"` - - // READ-ONLY; Collection of instances belong to Application Configuration Service. - Instances []*ConfigurationServiceInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; State of the Application Configuration Service. - ProvisioningState *ConfigurationServiceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The requested resource quantity for required CPU and Memory. - ResourceRequests *ConfigurationServiceResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` -} - -// ConfigurationServiceResource - Application Configuration Service resource -type ConfigurationServiceResource struct { - // Application Configuration Service properties payload - Properties *ConfigurationServiceProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ConfigurationServiceResourceCollection - Object that includes an array of configuration service resources and a possible -// link for next set -type ConfigurationServiceResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of configuration service resources - Value []*ConfigurationServiceResource `json:"value,omitempty"` -} - -// ConfigurationServiceResourceRequests - Resource request payload of Application Configuration Service -type ConfigurationServiceResourceRequests struct { - // READ-ONLY; Cpu allocated to each Application Configuration Service instance - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; Instance count of the Application Configuration Service - InstanceCount *int32 `json:"instanceCount,omitempty" azure:"ro"` - - // READ-ONLY; Memory allocated to each Application Configuration Service instance - Memory *string `json:"memory,omitempty" azure:"ro"` -} - -// ConfigurationServiceSettings - The settings of Application Configuration Service. -type ConfigurationServiceSettings struct { - // Property of git environment. - GitProperty *ConfigurationServiceGitProperty `json:"gitProperty,omitempty"` -} - -// ConfigurationServiceSettingsValidateResult - Validation result for configuration service settings -type ConfigurationServiceSettingsValidateResult struct { - // Validation result for configuration service settings - GitPropertyValidationResult *ConfigurationServiceGitPropertyValidateResult `json:"gitPropertyValidationResult,omitempty"` -} - -// ConfigurationServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationServicesClient.BeginCreateOrUpdate -// method. -type ConfigurationServicesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationServicesClientBeginDeleteOptions contains the optional parameters for the ConfigurationServicesClient.BeginDelete -// method. -type ConfigurationServicesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationServicesClientBeginValidateOptions contains the optional parameters for the ConfigurationServicesClient.BeginValidate -// method. -type ConfigurationServicesClientBeginValidateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationServicesClientGetOptions contains the optional parameters for the ConfigurationServicesClient.Get method. -type ConfigurationServicesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConfigurationServicesClientListOptions contains the optional parameters for the ConfigurationServicesClient.List method. -type ConfigurationServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// ContainerProbeSettings - Container liveness and readiness probe settings -type ContainerProbeSettings struct { - // Indicates whether disable the liveness and readiness probe - DisableProbe *bool `json:"disableProbe,omitempty"` -} - -// ContentCertificateProperties - Properties of certificate imported from key vault. -type ContentCertificateProperties struct { - // REQUIRED; The type of the certificate source. - Type *string `json:"type,omitempty"` - - // The content of uploaded certificate. - Content *string `json:"content,omitempty"` - - // READ-ONLY; The activate date of certificate. - ActivateDate *string `json:"activateDate,omitempty" azure:"ro"` - - // READ-ONLY; The domain list of certificate. - DNSNames []*string `json:"dnsNames,omitempty" azure:"ro"` - - // READ-ONLY; The expiration date of certificate. - ExpirationDate *string `json:"expirationDate,omitempty" azure:"ro"` - - // READ-ONLY; The issue date of certificate. - IssuedDate *string `json:"issuedDate,omitempty" azure:"ro"` - - // READ-ONLY; The issuer of certificate. - Issuer *string `json:"issuer,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Certificate - ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The subject name of certificate. - SubjectName *string `json:"subjectName,omitempty" azure:"ro"` - - // READ-ONLY; The thumbprint of certificate. - Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` -} - -// GetCertificateProperties implements the CertificatePropertiesClassification interface for type ContentCertificateProperties. -func (c *ContentCertificateProperties) GetCertificateProperties() *CertificateProperties { - return &CertificateProperties{ - Type: c.Type, - Thumbprint: c.Thumbprint, - Issuer: c.Issuer, - IssuedDate: c.IssuedDate, - ExpirationDate: c.ExpirationDate, - ActivateDate: c.ActivateDate, - SubjectName: c.SubjectName, - DNSNames: c.DNSNames, - ProvisioningState: c.ProvisioningState, - } -} - -// CustomContainer - Custom container payload -type CustomContainer struct { - // Arguments to the entrypoint. The docker image's CMD is used if this is not provided. - Args []*string `json:"args,omitempty"` - - // Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. - Command []*string `json:"command,omitempty"` - - // Container image of the custom container. This should be in the form of : without the server name of the registry - ContainerImage *string `json:"containerImage,omitempty"` - - // Credential of the image registry - ImageRegistryCredential *ImageRegistryCredential `json:"imageRegistryCredential,omitempty"` - - // Language framework of the container image uploaded - LanguageFramework *string `json:"languageFramework,omitempty"` - - // The name of the registry that contains the container image - Server *string `json:"server,omitempty"` -} - -// CustomContainerUserSourceInfo - Custom container user source info -type CustomContainerUserSourceInfo struct { - // REQUIRED; Type of the source uploaded - Type *string `json:"type,omitempty"` - - // Custom container payload - CustomContainer *CustomContainer `json:"customContainer,omitempty"` - - // Version of the source - Version *string `json:"version,omitempty"` -} - -// GetUserSourceInfo implements the UserSourceInfoClassification interface for type CustomContainerUserSourceInfo. -func (c *CustomContainerUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { - return &UserSourceInfo{ - Type: c.Type, - Version: c.Version, - } -} - -// CustomDomainProperties - Custom domain of app resource payload. -type CustomDomainProperties struct { - // The bound certificate name of domain. - CertName *string `json:"certName,omitempty"` - - // The thumbprint of bound certificate. - Thumbprint *string `json:"thumbprint,omitempty"` - - // READ-ONLY; The app name of domain. - AppName *string `json:"appName,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Domain - ProvisioningState *CustomDomainResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// CustomDomainResource - Custom domain resource payload. -type CustomDomainResource struct { - // Properties of the custom domain resource. - Properties *CustomDomainProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CustomDomainResourceCollection - Collection compose of a custom domain resources list and a possible link for next page. -type CustomDomainResourceCollection struct { - // The link to next page of custom domain list. - NextLink *string `json:"nextLink,omitempty"` - - // The custom domain resources list. - Value []*CustomDomainResource `json:"value,omitempty"` -} - -// CustomDomainValidatePayload - Custom domain validate payload. -type CustomDomainValidatePayload struct { - // REQUIRED; Name to be validated - Name *string `json:"name,omitempty"` -} - -// CustomDomainValidateResult - Validation result for custom domain. -type CustomDomainValidateResult struct { - // Indicates if domain name is valid. - IsValid *bool `json:"isValid,omitempty"` - - // Message of why domain name is invalid. - Message *string `json:"message,omitempty"` -} - -// CustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginCreateOrUpdate -// method. -type CustomDomainsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method. -type CustomDomainsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomDomainsClientBeginUpdateOptions contains the optional parameters for the CustomDomainsClient.BeginUpdate method. -type CustomDomainsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. -type CustomDomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// CustomDomainsClientListOptions contains the optional parameters for the CustomDomainsClient.List method. -type CustomDomainsClientListOptions struct { - // placeholder for future optional parameters -} - -// CustomPersistentDiskPropertiesClassification provides polymorphic access to related types. -// Call the interface's GetCustomPersistentDiskProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileVolume, *CustomPersistentDiskProperties -type CustomPersistentDiskPropertiesClassification interface { - // GetCustomPersistentDiskProperties returns the CustomPersistentDiskProperties content of the underlying type. - GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties -} - -// CustomPersistentDiskProperties - Custom persistent disk resource payload. -type CustomPersistentDiskProperties struct { - // REQUIRED; The mount path of the persistent disk. - MountPath *string `json:"mountPath,omitempty"` - - // REQUIRED; The type of the underlying resource to mount as a persistent disk. - Type *Type `json:"type,omitempty"` - - // These are the mount options for a persistent disk. - MountOptions []*string `json:"mountOptions,omitempty"` - - // Indicates whether the persistent disk is a readOnly one. - ReadOnly *bool `json:"readOnly,omitempty"` -} - -// GetCustomPersistentDiskProperties implements the CustomPersistentDiskPropertiesClassification interface for type CustomPersistentDiskProperties. -func (c *CustomPersistentDiskProperties) GetCustomPersistentDiskProperties() *CustomPersistentDiskProperties { - return c -} - -// CustomPersistentDiskResource - Custom persistent disk resource payload. -type CustomPersistentDiskResource struct { - // REQUIRED; The resource id of Azure Spring Apps Storage resource. - StorageID *string `json:"storageId,omitempty"` - - // Properties of the custom persistent disk resource payload. - CustomPersistentDiskProperties CustomPersistentDiskPropertiesClassification `json:"customPersistentDiskProperties,omitempty"` -} - -// DeploymentInstance - Deployment instance payload -type DeploymentInstance struct { - // READ-ONLY; Discovery status of the deployment instance - DiscoveryStatus *string `json:"discoveryStatus,omitempty" azure:"ro"` - - // READ-ONLY; Name of the deployment instance - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Failed reason of the deployment instance - Reason *string `json:"reason,omitempty" azure:"ro"` - - // READ-ONLY; Start time of the deployment instance - StartTime *string `json:"startTime,omitempty" azure:"ro"` - - // READ-ONLY; Status of the deployment instance - Status *string `json:"status,omitempty" azure:"ro"` - - // READ-ONLY; Availability zone information of the deployment instance - Zone *string `json:"zone,omitempty" azure:"ro"` -} - -// DeploymentResource - Deployment resource payload -type DeploymentResource struct { - // Properties of the Deployment resource - Properties *DeploymentResourceProperties `json:"properties,omitempty"` - - // Sku of the Deployment resource - SKU *SKU `json:"sku,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DeploymentResourceCollection - Object that includes an array of App resources and a possible link for next set -type DeploymentResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Deployment resources - Value []*DeploymentResource `json:"value,omitempty"` -} - -// DeploymentResourceProperties - Deployment resource properties payload -type DeploymentResourceProperties struct { - // Indicates whether the Deployment is active - Active *bool `json:"active,omitempty"` - - // Deployment settings of the Deployment - DeploymentSettings *DeploymentSettings `json:"deploymentSettings,omitempty"` - - // Uploaded source information of the deployment. - Source UserSourceInfoClassification `json:"source,omitempty"` - - // READ-ONLY; Collection of instances belong to the Deployment - Instances []*DeploymentInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Deployment - ProvisioningState *DeploymentResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Deployment - Status *DeploymentResourceStatus `json:"status,omitempty" azure:"ro"` -} - -// DeploymentSettings - Deployment settings payload -type DeploymentSettings struct { - // Collection of addons - AddonConfigs map[string]map[string]interface{} `json:"addonConfigs,omitempty"` - - // Container liveness and readiness probe settings - ContainerProbeSettings *ContainerProbeSettings `json:"containerProbeSettings,omitempty"` - - // Collection of environment variables - EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` - - // Periodic probe of App Instance liveness. App Instance will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - LivenessProbe *Probe `json:"livenessProbe,omitempty"` - - // Periodic probe of App Instance service readiness. App Instance will be removed from service endpoints if the probe fails. - // More info: - // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - ReadinessProbe *Probe `json:"readinessProbe,omitempty"` - - // The requested resource quantity for required CPU and Memory. It is recommended that using this field to represent the required - // CPU and Memory, the old field cpu and memoryInGB will be deprecated - // later. - ResourceRequests *ResourceRequests `json:"resourceRequests,omitempty"` - - // StartupProbe indicates that the App Instance has successfully initialized. If specified, no other probes are executed until - // this completes successfully. If this probe fails, the Pod will be restarted, - // just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a App Instance's - // lifecycle, when it might take a long time to load data or warm a cache, - // than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - StartupProbe *Probe `json:"startupProbe,omitempty"` - - // Optional duration in seconds the App Instance needs to terminate gracefully. May be decreased in delete request. Value - // must be non-negative integer. The value zero indicates stop immediately via the - // kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace - // period is the duration in seconds after the processes running in the App - // Instance are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this - // value longer than the expected cleanup time for your process. Defaults to 90 - // seconds. - TerminationGracePeriodSeconds *int32 `json:"terminationGracePeriodSeconds,omitempty"` -} - -// DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate -// method. -type DeploymentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. -type DeploymentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginGenerateHeapDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateHeapDump -// method. -type DeploymentsClientBeginGenerateHeapDumpOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginGenerateThreadDumpOptions contains the optional parameters for the DeploymentsClient.BeginGenerateThreadDump -// method. -type DeploymentsClientBeginGenerateThreadDumpOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginRestartOptions contains the optional parameters for the DeploymentsClient.BeginRestart method. -type DeploymentsClientBeginRestartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginStartJFROptions contains the optional parameters for the DeploymentsClient.BeginStartJFR method. -type DeploymentsClientBeginStartJFROptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginStartOptions contains the optional parameters for the DeploymentsClient.BeginStart method. -type DeploymentsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginStopOptions contains the optional parameters for the DeploymentsClient.BeginStop method. -type DeploymentsClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginUpdateOptions contains the optional parameters for the DeploymentsClient.BeginUpdate method. -type DeploymentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientGetLogFileURLOptions contains the optional parameters for the DeploymentsClient.GetLogFileURL method. -type DeploymentsClientGetLogFileURLOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. -type DeploymentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientListForClusterOptions contains the optional parameters for the DeploymentsClient.ListForCluster method. -type DeploymentsClientListForClusterOptions struct { - // Version of the deployments to be listed - Version []string -} - -// DeploymentsClientListOptions contains the optional parameters for the DeploymentsClient.List method. -type DeploymentsClientListOptions struct { - // Version of the deployments to be listed - Version []string -} - -// DiagnosticParameters - Diagnostic parameters of diagnostic operations -type DiagnosticParameters struct { - // App instance name - AppInstance *string `json:"appInstance,omitempty"` - - // Duration of your JFR. 1 min can be represented by 1m or 60s. - Duration *string `json:"duration,omitempty"` - - // Your target file path in your own BYOS - FilePath *string `json:"filePath,omitempty"` -} - -// Error - The error code compose of code and message. -type Error struct { - // The code of error. - Code *string `json:"code,omitempty"` - - // The message of error. - Message *string `json:"message,omitempty"` -} - -// ExecAction describes a "run in container" action. -type ExecAction struct { - // REQUIRED; The type of the action to take to perform the health check. - Type *ProbeActionType `json:"type,omitempty"` - - // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the - // container's filesystem. The command is not run inside a shell, so traditional - // shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of - // 0 is treated as live/healthy and non-zero is unhealthy. - Command []*string `json:"command,omitempty"` -} - -// GetProbeAction implements the ProbeActionClassification interface for type ExecAction. -func (e *ExecAction) GetProbeAction() *ProbeAction { - return &ProbeAction{ - Type: e.Type, - } -} - -// GatewayAPIMetadataProperties - API metadata property for Spring Cloud Gateway -type GatewayAPIMetadataProperties struct { - // Detailed description of the APIs available on the Gateway instance (default: Generated OpenAPI 3 document that describes - // the API routes configured.) - Description *string `json:"description,omitempty"` - - // Location of additional documentation for the APIs available on the Gateway instance - Documentation *string `json:"documentation,omitempty"` - - // Base URL that API consumers will use to access APIs on the Gateway instance. - ServerURL *string `json:"serverUrl,omitempty"` - - // Title describing the context of the APIs available on the Gateway instance (default: Spring Cloud Gateway for K8S) - Title *string `json:"title,omitempty"` - - // Version of APIs available on this Gateway instance (default: unspecified). - Version *string `json:"version,omitempty"` -} - -// GatewayAPIRoute - API route config of the Spring Cloud Gateway -type GatewayAPIRoute struct { - // A description, will be applied to methods in the generated OpenAPI documentation. - Description *string `json:"description,omitempty"` - - // To modify the request before sending it to the target endpoint, or the received response. - Filters []*string `json:"filters,omitempty"` - - // Route processing order. - Order *int32 `json:"order,omitempty"` - - // A number of conditions to evaluate a route for each request. Each predicate may be evaluated against request headers and - // parameter values. All of the predicates associated with a route must evaluate - // to true for the route to be matched to the request. - Predicates []*string `json:"predicates,omitempty"` - - // Enable sso validation. - SsoEnabled *bool `json:"ssoEnabled,omitempty"` - - // Classification tags, will be applied to methods in the generated OpenAPI documentation. - Tags []*string `json:"tags,omitempty"` - - // A title, will be applied to methods in the generated OpenAPI documentation. - Title *string `json:"title,omitempty"` - - // Pass currently-authenticated user's identity token to application service, default is 'false' - TokenRelay *bool `json:"tokenRelay,omitempty"` - - // Full uri, will override appName. - URI *string `json:"uri,omitempty"` -} - -// GatewayCorsProperties - Cross-Origin Resource Sharing property -type GatewayCorsProperties struct { - // Whether user credentials are supported on cross-site requests. Valid values: true, false. - AllowCredentials *bool `json:"allowCredentials,omitempty"` - - // Allowed headers in cross-site requests. The special value * allows actual requests to send any header. - AllowedHeaders []*string `json:"allowedHeaders,omitempty"` - - // Allowed HTTP methods on cross-site requests. The special value * allows all methods. If not set, GET and HEAD are allowed - // by default. - AllowedMethods []*string `json:"allowedMethods,omitempty"` - - // Allowed origins to make cross-site requests. The special value * allows all domains. - AllowedOrigins []*string `json:"allowedOrigins,omitempty"` - - // HTTP response headers to expose for cross-site requests. - ExposedHeaders []*string `json:"exposedHeaders,omitempty"` - - // How long, in seconds, the response from a pre-flight request can be cached by clients. - MaxAge *int32 `json:"maxAge,omitempty"` -} - -// GatewayCustomDomainProperties - The properties of custom domain for Spring Cloud Gateway -type GatewayCustomDomainProperties struct { - // The thumbprint of bound certificate. - Thumbprint *string `json:"thumbprint,omitempty"` -} - -// GatewayCustomDomainResource - Custom domain of the Spring Cloud Gateway -type GatewayCustomDomainResource struct { - // The properties of custom domain for Spring Cloud Gateway - Properties *GatewayCustomDomainProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GatewayCustomDomainResourceCollection - Object that includes an array of Spring Cloud Gateway custom domain resources and -// a possible link for next set -type GatewayCustomDomainResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Spring Cloud Gateway custom domain resources - Value []*GatewayCustomDomainResource `json:"value,omitempty"` -} - -// GatewayCustomDomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginCreateOrUpdate -// method. -type GatewayCustomDomainsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GatewayCustomDomainsClientBeginDeleteOptions contains the optional parameters for the GatewayCustomDomainsClient.BeginDelete -// method. -type GatewayCustomDomainsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GatewayCustomDomainsClientGetOptions contains the optional parameters for the GatewayCustomDomainsClient.Get method. -type GatewayCustomDomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// GatewayCustomDomainsClientListOptions contains the optional parameters for the GatewayCustomDomainsClient.List method. -type GatewayCustomDomainsClientListOptions struct { - // placeholder for future optional parameters -} - -// GatewayInstance - Collection of instances belong to the Spring Cloud Gateway -type GatewayInstance struct { - // READ-ONLY; Name of the Spring Cloud Gateway instance - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Spring Cloud Gateway instance - Status *string `json:"status,omitempty" azure:"ro"` -} - -// GatewayOperatorProperties - Properties of the Spring Cloud Gateway Operator. -type GatewayOperatorProperties struct { - // READ-ONLY; Collection of instances belong to Spring Cloud Gateway operator. - Instances []*GatewayInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; The requested resource quantity for required CPU and Memory. - ResourceRequests *GatewayOperatorResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` -} - -// GatewayOperatorResourceRequests - Properties of the Spring Cloud Gateway Operator. -type GatewayOperatorResourceRequests struct { - // READ-ONLY; Cpu allocated to each Spring Cloud Gateway Operator instance. - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; Instance count of the Spring Cloud Gateway Operator. - InstanceCount *int32 `json:"instanceCount,omitempty" azure:"ro"` - - // READ-ONLY; Memory allocated to each Spring Cloud Gateway Operator instance. - Memory *string `json:"memory,omitempty" azure:"ro"` -} - -// GatewayProperties - Spring Cloud Gateway properties payload -type GatewayProperties struct { - // API metadata property for Spring Cloud Gateway - APIMetadataProperties *GatewayAPIMetadataProperties `json:"apiMetadataProperties,omitempty"` - - // Cross-Origin Resource Sharing property - CorsProperties *GatewayCorsProperties `json:"corsProperties,omitempty"` - - // Indicate if only https is allowed. - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - - // Indicates whether the Spring Cloud Gateway exposes endpoint. - Public *bool `json:"public,omitempty"` - - // The requested resource quantity for required CPU and Memory. - ResourceRequests *GatewayResourceRequests `json:"resourceRequests,omitempty"` - - // Single sign-on related configuration - SsoProperties *SsoProperties `json:"ssoProperties,omitempty"` - - // READ-ONLY; Collection of instances belong to Spring Cloud Gateway. - Instances []*GatewayInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; Properties of the Spring Cloud Gateway Operator. - OperatorProperties *GatewayOperatorProperties `json:"operatorProperties,omitempty" azure:"ro"` - - // READ-ONLY; State of the Spring Cloud Gateway. - ProvisioningState *GatewayProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; URL of the Spring Cloud Gateway, exposed when 'public' is true. - URL *string `json:"url,omitempty" azure:"ro"` -} - -// GatewayResource - Spring Cloud Gateway resource -type GatewayResource struct { - // Spring Cloud Gateway properties payload - Properties *GatewayProperties `json:"properties,omitempty"` - - // Sku of the Spring Cloud Gateway resource - SKU *SKU `json:"sku,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GatewayResourceCollection - Object that includes an array of gateway resources and a possible link for next set -type GatewayResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of gateway resources - Value []*GatewayResource `json:"value,omitempty"` -} - -// GatewayResourceRequests - Resource request payload of Spring Cloud Gateway. -type GatewayResourceRequests struct { - // Cpu allocated to each Spring Cloud Gateway instance. - CPU *string `json:"cpu,omitempty"` - - // Memory allocated to each Spring Cloud Gateway instance. - Memory *string `json:"memory,omitempty"` -} - -// GatewayRouteConfigOpenAPIProperties - OpenAPI properties of Spring Cloud Gateway route config. -type GatewayRouteConfigOpenAPIProperties struct { - // The URI of OpenAPI specification. - URI *string `json:"uri,omitempty"` -} - -// GatewayRouteConfigProperties - API route config of the Spring Cloud Gateway -type GatewayRouteConfigProperties struct { - // The resource Id of the Azure Spring Apps app, required unless route defines uri. - AppResourceID *string `json:"appResourceId,omitempty"` - - // OpenAPI properties of Spring Cloud Gateway route config. - OpenAPI *GatewayRouteConfigOpenAPIProperties `json:"openApi,omitempty"` - - // Array of API routes, each route contains properties such as title, uri, ssoEnabled, predicates, filters. - Routes []*GatewayAPIRoute `json:"routes,omitempty"` - - // READ-ONLY; State of the Spring Cloud Gateway route config. - ProvisioningState *GatewayProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// GatewayRouteConfigResource - Spring Cloud Gateway route config resource -type GatewayRouteConfigResource struct { - // API route config of the Spring Cloud Gateway - Properties *GatewayRouteConfigProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GatewayRouteConfigResourceCollection - Object that includes an array of Spring Cloud Gateway route config resources and -// a possible link for next set -type GatewayRouteConfigResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Spring Cloud Gateway route config resources - Value []*GatewayRouteConfigResource `json:"value,omitempty"` -} - -// GatewayRouteConfigsClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginCreateOrUpdate -// method. -type GatewayRouteConfigsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GatewayRouteConfigsClientBeginDeleteOptions contains the optional parameters for the GatewayRouteConfigsClient.BeginDelete -// method. -type GatewayRouteConfigsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GatewayRouteConfigsClientGetOptions contains the optional parameters for the GatewayRouteConfigsClient.Get method. -type GatewayRouteConfigsClientGetOptions struct { - // placeholder for future optional parameters -} - -// GatewayRouteConfigsClientListOptions contains the optional parameters for the GatewayRouteConfigsClient.List method. -type GatewayRouteConfigsClientListOptions struct { - // placeholder for future optional parameters -} - -// GatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the GatewaysClient.BeginCreateOrUpdate method. -type GatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GatewaysClientBeginDeleteOptions contains the optional parameters for the GatewaysClient.BeginDelete method. -type GatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GatewaysClientGetOptions contains the optional parameters for the GatewaysClient.Get method. -type GatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// GatewaysClientListOptions contains the optional parameters for the GatewaysClient.List method. -type GatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// GatewaysClientValidateDomainOptions contains the optional parameters for the GatewaysClient.ValidateDomain method. -type GatewaysClientValidateDomainOptions struct { - // placeholder for future optional parameters -} - -// GitPatternRepository - Git repository property payload for config server -type GitPatternRepository struct { - // REQUIRED; Name of the repository - Name *string `json:"name,omitempty"` - - // REQUIRED; URI of the repository - URI *string `json:"uri,omitempty"` - - // Public sshKey of git repository. - HostKey *string `json:"hostKey,omitempty"` - - // SshKey algorithm of git repository. - HostKeyAlgorithm *string `json:"hostKeyAlgorithm,omitempty"` - - // Label of the repository - Label *string `json:"label,omitempty"` - - // Password of git repository basic auth. - Password *string `json:"password,omitempty"` - - // Collection of pattern of the repository - Pattern []*string `json:"pattern,omitempty"` - - // Private sshKey algorithm of git repository. - PrivateKey *string `json:"privateKey,omitempty"` - - // Searching path of the repository - SearchPaths []*string `json:"searchPaths,omitempty"` - - // Strict host key checking or not. - StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"` - - // Username of git repository basic auth. - Username *string `json:"username,omitempty"` -} - -// HTTPGetAction describes an action based on HTTP Get requests. -type HTTPGetAction struct { - // REQUIRED; The type of the action to take to perform the health check. - Type *ProbeActionType `json:"type,omitempty"` - - // Path to access on the HTTP server. - Path *string `json:"path,omitempty"` - - // Scheme to use for connecting to the host. Defaults to HTTP. - // Possible enum values: - // * "HTTP" means that the scheme used will be http:// - // * "HTTPS" means that the scheme used will be https:// - Scheme *HTTPSchemeType `json:"scheme,omitempty"` -} - -// GetProbeAction implements the ProbeActionClassification interface for type HTTPGetAction. -func (h *HTTPGetAction) GetProbeAction() *ProbeAction { - return &ProbeAction{ - Type: h.Type, - } -} - -// ImageRegistryCredential - Credential of the image registry -type ImageRegistryCredential struct { - // The password of the image registry credential - Password *string `json:"password,omitempty"` - - // The username of the image registry credential - Username *string `json:"username,omitempty"` -} - -// IngressConfig - Ingress configuration payload for Azure Spring Apps resource. -type IngressConfig struct { - // Ingress read time out in seconds. - ReadTimeoutInSeconds *int32 `json:"readTimeoutInSeconds,omitempty"` -} - -// JarUploadedUserSourceInfo - Uploaded Jar binary for a deployment -type JarUploadedUserSourceInfo struct { - // REQUIRED; Type of the source uploaded - Type *string `json:"type,omitempty"` - - // JVM parameter - JvmOptions *string `json:"jvmOptions,omitempty"` - - // Relative path of the storage which stores the source - RelativePath *string `json:"relativePath,omitempty"` - - // Runtime version of the Jar file - RuntimeVersion *string `json:"runtimeVersion,omitempty"` - - // Version of the source - Version *string `json:"version,omitempty"` -} - -// GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type JarUploadedUserSourceInfo. -func (j *JarUploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo { - return &UploadedUserSourceInfo{ - RelativePath: j.RelativePath, - Type: j.Type, - Version: j.Version, - } -} - -// GetUserSourceInfo implements the UserSourceInfoClassification interface for type JarUploadedUserSourceInfo. -func (j *JarUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { - return &UserSourceInfo{ - Type: j.Type, - Version: j.Version, - } -} - -// KeyVaultCertificateProperties - Properties of certificate imported from key vault. -type KeyVaultCertificateProperties struct { - // REQUIRED; The certificate name of key vault. - KeyVaultCertName *string `json:"keyVaultCertName,omitempty"` - - // REQUIRED; The type of the certificate source. - Type *string `json:"type,omitempty"` - - // REQUIRED; The vault uri of user key vault. - VaultURI *string `json:"vaultUri,omitempty"` - - // The certificate version of key vault. - CertVersion *string `json:"certVersion,omitempty"` - - // Optional. If set to true, it will not import private key from key vault. - ExcludePrivateKey *bool `json:"excludePrivateKey,omitempty"` - - // READ-ONLY; The activate date of certificate. - ActivateDate *string `json:"activateDate,omitempty" azure:"ro"` - - // READ-ONLY; The domain list of certificate. - DNSNames []*string `json:"dnsNames,omitempty" azure:"ro"` - - // READ-ONLY; The expiration date of certificate. - ExpirationDate *string `json:"expirationDate,omitempty" azure:"ro"` - - // READ-ONLY; The issue date of certificate. - IssuedDate *string `json:"issuedDate,omitempty" azure:"ro"` - - // READ-ONLY; The issuer of certificate. - Issuer *string `json:"issuer,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Certificate - ProvisioningState *CertificateResourceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The subject name of certificate. - SubjectName *string `json:"subjectName,omitempty" azure:"ro"` - - // READ-ONLY; The thumbprint of certificate. - Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` -} - -// GetCertificateProperties implements the CertificatePropertiesClassification interface for type KeyVaultCertificateProperties. -func (k *KeyVaultCertificateProperties) GetCertificateProperties() *CertificateProperties { - return &CertificateProperties{ - Type: k.Type, - Thumbprint: k.Thumbprint, - Issuer: k.Issuer, - IssuedDate: k.IssuedDate, - ExpirationDate: k.ExpirationDate, - ActivateDate: k.ActivateDate, - SubjectName: k.SubjectName, - DNSNames: k.DNSNames, - ProvisioningState: k.ProvisioningState, - } -} - -// LoadedCertificate - Loaded certificate payload -type LoadedCertificate struct { - // REQUIRED; Resource Id of loaded certificate - ResourceID *string `json:"resourceId,omitempty"` - - // Indicate whether the certificate will be loaded into default trust store, only work for Java runtime. - LoadTrustStore *bool `json:"loadTrustStore,omitempty"` -} - -// LogFileURLResponse - Log file URL payload -type LogFileURLResponse struct { - // REQUIRED; URL of the log file - URL *string `json:"url,omitempty"` -} - -// LogSpecification - Specifications of the Log for Azure Monitoring -type LogSpecification struct { - // Blob duration of the log - BlobDuration *string `json:"blobDuration,omitempty"` - - // Localized friendly display name of the log - DisplayName *string `json:"displayName,omitempty"` - - // Name of the log - Name *string `json:"name,omitempty"` -} - -// ManagedIdentityProperties - Managed identity properties retrieved from ARM request headers. -type ManagedIdentityProperties struct { - // Principal Id of system-assigned managed identity. - PrincipalID *string `json:"principalId,omitempty"` - - // Tenant Id of system-assigned managed identity. - TenantID *string `json:"tenantId,omitempty"` - - // Type of the managed identity - Type *ManagedIdentityType `json:"type,omitempty"` - - // Properties of user-assigned managed identities - UserAssignedIdentities map[string]*UserAssignedManagedIdentity `json:"userAssignedIdentities,omitempty"` -} - -// MarketplaceResource - Purchasing 3rd Party product for one Azure Spring Apps instance -type MarketplaceResource struct { - // The plan id of the 3rd Party Artifact that is being procured. - Plan *string `json:"plan,omitempty"` - - // The 3rd Party artifact that is being procured. - Product *string `json:"product,omitempty"` - - // The publisher id of the 3rd Party Artifact that is being bought. - Publisher *string `json:"publisher,omitempty"` -} - -// MetricDimension - Specifications of the Dimension of metrics -type MetricDimension struct { - // Localized friendly display name of the dimension - DisplayName *string `json:"displayName,omitempty"` - - // Name of the dimension - Name *string `json:"name,omitempty"` - - // Whether this dimension should be included for the Shoebox export scenario - ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"` -} - -// MetricSpecification - Specifications of the Metrics for Azure Monitoring -type MetricSpecification struct { - // Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. - AggregationType *string `json:"aggregationType,omitempty"` - - // Name of the metric category that the metric belongs to. A metric can only belong to a single category. - Category *string `json:"category,omitempty"` - - // Dimensions of the metric - Dimensions []*MetricDimension `json:"dimensions,omitempty"` - - // Localized friendly description of the metric - DisplayDescription *string `json:"displayDescription,omitempty"` - - // Localized friendly display name of the metric - DisplayName *string `json:"displayName,omitempty"` - - // Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` - - // Name of the metric - Name *string `json:"name,omitempty"` - - // Name of the MDM namespace. Optional. - SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` - - // Supported aggregation types - SupportedAggregationTypes []*string `json:"supportedAggregationTypes,omitempty"` - - // Supported time grain types - SupportedTimeGrainTypes []*string `json:"supportedTimeGrainTypes,omitempty"` - - // Unit that makes sense for the metric - Unit *string `json:"unit,omitempty"` -} - -// MonitoringSettingProperties - Monitoring Setting properties payload -type MonitoringSettingProperties struct { - // Indicates the versions of application insight agent - AppInsightsAgentVersions *ApplicationInsightsAgentVersions `json:"appInsightsAgentVersions,omitempty"` - - // Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings - AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty"` - - // Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0] - AppInsightsSamplingRate *float64 `json:"appInsightsSamplingRate,omitempty"` - - // Error when apply Monitoring Setting changes. - Error *Error `json:"error,omitempty"` - - // Indicates whether enable the trace functionality, which will be deprecated since api version 2020-11-01-preview. Please - // leverage appInsightsInstrumentationKey to indicate if monitoringSettings enabled - // or not - TraceEnabled *bool `json:"traceEnabled,omitempty"` - - // READ-ONLY; State of the Monitoring Setting. - ProvisioningState *MonitoringSettingState `json:"provisioningState,omitempty" azure:"ro"` -} - -// MonitoringSettingResource - Monitoring Setting resource -type MonitoringSettingResource struct { - // Properties of the Monitoring Setting resource - Properties *MonitoringSettingProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MonitoringSettingsClientBeginUpdatePatchOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePatch -// method. -type MonitoringSettingsClientBeginUpdatePatchOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MonitoringSettingsClientBeginUpdatePutOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePut -// method. -type MonitoringSettingsClientBeginUpdatePutOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MonitoringSettingsClientGetOptions contains the optional parameters for the MonitoringSettingsClient.Get method. -type MonitoringSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// NameAvailability - Name availability result payload -type NameAvailability struct { - // Message why the name is not available - Message *string `json:"message,omitempty"` - - // Indicates whether the name is available - NameAvailable *bool `json:"nameAvailable,omitempty"` - - // Reason why the name is not available - Reason *string `json:"reason,omitempty"` -} - -// NameAvailabilityParameters - Name availability parameters payload -type NameAvailabilityParameters struct { - // REQUIRED; Name to be checked - Name *string `json:"name,omitempty"` - - // REQUIRED; Type of the resource to check name availability - Type *string `json:"type,omitempty"` -} - -// NetCoreZipUploadedUserSourceInfo - Uploaded Jar binary for a deployment -type NetCoreZipUploadedUserSourceInfo struct { - // REQUIRED; Type of the source uploaded - Type *string `json:"type,omitempty"` - - // The path to the .NET executable relative to zip root - NetCoreMainEntryPath *string `json:"netCoreMainEntryPath,omitempty"` - - // Relative path of the storage which stores the source - RelativePath *string `json:"relativePath,omitempty"` - - // Runtime version of the .Net file - RuntimeVersion *string `json:"runtimeVersion,omitempty"` - - // Version of the source - Version *string `json:"version,omitempty"` -} - -// GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type NetCoreZipUploadedUserSourceInfo. -func (n *NetCoreZipUploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo { - return &UploadedUserSourceInfo{ - RelativePath: n.RelativePath, - Type: n.Type, - Version: n.Version, - } -} - -// GetUserSourceInfo implements the UserSourceInfoClassification interface for type NetCoreZipUploadedUserSourceInfo. -func (n *NetCoreZipUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { - return &UserSourceInfo{ - Type: n.Type, - Version: n.Version, - } -} - -// NetworkProfile - Service network profile payload -type NetworkProfile struct { - // Name of the resource group containing network resources for customer apps in Azure Spring Apps - AppNetworkResourceGroup *string `json:"appNetworkResourceGroup,omitempty"` - - // Fully qualified resource Id of the subnet to host customer apps in Azure Spring Apps - AppSubnetID *string `json:"appSubnetId,omitempty"` - - // Ingress configuration payload for Azure Spring Apps resource. - IngressConfig *IngressConfig `json:"ingressConfig,omitempty"` - - // Azure Spring Apps service reserved CIDR - ServiceCidr *string `json:"serviceCidr,omitempty"` - - // Name of the resource group containing network resources of Azure Spring Apps Service Runtime - ServiceRuntimeNetworkResourceGroup *string `json:"serviceRuntimeNetworkResourceGroup,omitempty"` - - // Fully qualified resource Id of the subnet to host Azure Spring Apps Service Runtime - ServiceRuntimeSubnetID *string `json:"serviceRuntimeSubnetId,omitempty"` - - // READ-ONLY; Desired outbound IP resources for Azure Spring Apps resource. - OutboundIPs *NetworkProfileOutboundIPs `json:"outboundIPs,omitempty" azure:"ro"` - - // READ-ONLY; Required inbound or outbound traffics for Azure Spring Apps resource. - RequiredTraffics []*RequiredTraffic `json:"requiredTraffics,omitempty" azure:"ro"` -} - -// NetworkProfileOutboundIPs - Desired outbound IP resources for Azure Spring Apps resource. -type NetworkProfileOutboundIPs struct { - // READ-ONLY; A list of public IP addresses. - PublicIPs []*string `json:"publicIPs,omitempty" azure:"ro"` -} - -// OperationDetail - Operation detail payload -type OperationDetail struct { - // Display of the operation - Display *OperationDisplay `json:"display,omitempty"` - - // Indicates whether the operation is a data action - IsDataAction *bool `json:"isDataAction,omitempty"` - - // Name of the operation - Name *string `json:"name,omitempty"` - - // Origin of the operation - Origin *string `json:"origin,omitempty"` - - // Properties of the operation - Properties *OperationProperties `json:"properties,omitempty"` - - // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - ActionType *ActionType `json:"actionType,omitempty" azure:"ro"` -} - -// OperationDisplay - Operation display payload -type OperationDisplay struct { - // Localized friendly description for the operation - Description *string `json:"description,omitempty"` - - // Localized friendly name for the operation - Operation *string `json:"operation,omitempty"` - - // Resource provider of the operation - Provider *string `json:"provider,omitempty"` - - // Resource of the operation - Resource *string `json:"resource,omitempty"` -} - -// OperationProperties - Extra Operation properties -type OperationProperties struct { - // Service specifications of the operation - ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// PersistentDisk - Persistent disk payload -type PersistentDisk struct { - // Mount path of the persistent disk - MountPath *string `json:"mountPath,omitempty"` - - // Size of the persistent disk in GB - SizeInGB *int32 `json:"sizeInGB,omitempty"` - - // READ-ONLY; Size of the used persistent disk in GB - UsedInGB *int32 `json:"usedInGB,omitempty" azure:"ro"` -} - -// Probe describes a health check to be performed against an App Instance to determine whether it is alive or ready to receive -// traffic. -type Probe struct { - // REQUIRED; Indicate whether the probe is disabled. - DisableProbe *bool `json:"disableProbe,omitempty"` - - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Minimum value is 1. - FailureThreshold *int32 `json:"failureThreshold,omitempty"` - - // Number of seconds after the App Instance has started before probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` - - // How often (in seconds) to perform the probe. Minimum value is 1. - PeriodSeconds *int32 `json:"periodSeconds,omitempty"` - - // The action of the probe. - ProbeAction ProbeActionClassification `json:"probeAction,omitempty"` - - // Minimum consecutive successes for the probe to be considered successful after having failed. Must be 1 for liveness and - // startup. Minimum value is 1. - SuccessThreshold *int32 `json:"successThreshold,omitempty"` - - // Number of seconds after which the probe times out. Minimum value is 1. - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` -} - -// ProbeActionClassification provides polymorphic access to related types. -// Call the interface's GetProbeAction() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ExecAction, *HTTPGetAction, *ProbeAction, *TCPSocketAction -type ProbeActionClassification interface { - // GetProbeAction returns the ProbeAction content of the underlying type. - GetProbeAction() *ProbeAction -} - -// ProbeAction - The action of the probe. -type ProbeAction struct { - // REQUIRED; The type of the action to take to perform the health check. - Type *ProbeActionType `json:"type,omitempty"` -} - -// GetProbeAction implements the ProbeActionClassification interface for type ProbeAction. -func (p *ProbeAction) GetProbeAction() *ProbeAction { return p } - -// ProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location -// and tags. -type ProxyResource struct { - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RegenerateTestKeyRequestPayload - Regenerate test key request payload -type RegenerateTestKeyRequestPayload struct { - // REQUIRED; Type of the test key - KeyType *TestKeyType `json:"keyType,omitempty"` -} - -// RequiredTraffic - Required inbound or outbound traffic for Azure Spring Apps resource. -type RequiredTraffic struct { - // READ-ONLY; The direction of required traffic - Direction *TrafficDirection `json:"direction,omitempty" azure:"ro"` - - // READ-ONLY; The FQDN list of required traffic - Fqdns []*string `json:"fqdns,omitempty" azure:"ro"` - - // READ-ONLY; The ip list of required traffic - IPs []*string `json:"ips,omitempty" azure:"ro"` - - // READ-ONLY; The port of required traffic - Port *int32 `json:"port,omitempty" azure:"ro"` - - // READ-ONLY; The protocol of required traffic - Protocol *string `json:"protocol,omitempty" azure:"ro"` -} - -// Resource - The core properties of ARM resources. -type Resource struct { - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceRequests - Deployment resource request payload -type ResourceRequests struct { - // Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} - // for Standard tier. - CPU *string `json:"cpu,omitempty"` - - // Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, - // 1Gi, 2Gi, …, 8Gi} for Standard tier. - Memory *string `json:"memory,omitempty"` -} - -// ResourceSKU - Describes an available Azure Spring Apps SKU. -type ResourceSKU struct { - // Gets the capacity of SKU. - Capacity *SKUCapacity `json:"capacity,omitempty"` - - // Gets a list of locations and availability zones in those locations where the SKU is available. - LocationInfo []*ResourceSKULocationInfo `json:"locationInfo,omitempty"` - - // Gets the set of locations that the SKU is available. - Locations []*string `json:"locations,omitempty"` - - // Gets the name of SKU. - Name *string `json:"name,omitempty"` - - // Gets the type of resource the SKU applies to. - ResourceType *string `json:"resourceType,omitempty"` - - // Gets the restrictions because of which SKU cannot be used. This is empty if there are no restrictions. - Restrictions []*ResourceSKURestrictions `json:"restrictions,omitempty"` - - // Gets the tier of SKU. - Tier *string `json:"tier,omitempty"` -} - -type ResourceSKUCapabilities struct { - // Gets an invariant to describe the feature. - Name *string `json:"name,omitempty"` - - // Gets an invariant if the feature is measured by quantity. - Value *string `json:"value,omitempty"` -} - -// ResourceSKUCollection - Object that includes an array of Azure Spring Apps SKU and a possible link for next set -type ResourceSKUCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of resource SKU - Value []*ResourceSKU `json:"value,omitempty"` -} - -// ResourceSKULocationInfo - Locations and availability zones where the SKU is available -type ResourceSKULocationInfo struct { - // Gets location of the SKU - Location *string `json:"location,omitempty"` - - // Gets details of capabilities available to a SKU in specific zones. - ZoneDetails []*ResourceSKUZoneDetails `json:"zoneDetails,omitempty"` - - // Gets list of availability zones where the SKU is supported. - Zones []*string `json:"zones,omitempty"` -} - -// ResourceSKURestrictionInfo - Information about the restriction where the SKU cannot be used -type ResourceSKURestrictionInfo struct { - // Gets locations where the SKU is restricted - Locations []*string `json:"locations,omitempty"` - - // Gets list of availability zones where the SKU is restricted. - Zones []*string `json:"zones,omitempty"` -} - -// ResourceSKURestrictions - Restrictions where the SKU cannot be used -type ResourceSKURestrictions struct { - // Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription' - ReasonCode *ResourceSKURestrictionsReasonCode `json:"reasonCode,omitempty"` - - // Gets the information about the restriction where the SKU cannot be used. - RestrictionInfo *ResourceSKURestrictionInfo `json:"restrictionInfo,omitempty"` - - // Gets the type of restrictions. Possible values include: 'Location', 'Zone' - Type *ResourceSKURestrictionsType `json:"type,omitempty"` - - // Gets the value of restrictions. If the restriction type is set to location. This would be different locations where the - // SKU is restricted. - Values []*string `json:"values,omitempty"` -} - -// ResourceSKUZoneDetails - Details of capabilities available to a SKU in specific zones -type ResourceSKUZoneDetails struct { - // Gets a list of capabilities that are available for the SKU in the specified list of zones. - Capabilities []*ResourceSKUCapabilities `json:"capabilities,omitempty"` - - // Gets the set of zones that the SKU is available in with the specified capabilities. - Name []*string `json:"name,omitempty"` -} - -// ResourceUploadDefinition - Resource upload definition payload -type ResourceUploadDefinition struct { - // Source relative path - RelativePath *string `json:"relativePath,omitempty"` - - // Upload URL - UploadURL *string `json:"uploadUrl,omitempty"` -} - -// RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions -// method. -type RuntimeVersionsClientListRuntimeVersionsOptions struct { - // placeholder for future optional parameters -} - -// SKU - Sku of Azure Spring Apps -type SKU struct { - // Current capacity of the target resource - Capacity *int32 `json:"capacity,omitempty"` - - // Name of the Sku - Name *string `json:"name,omitempty"` - - // Tier of the Sku - Tier *string `json:"tier,omitempty"` -} - -// SKUCapacity - The SKU capacity -type SKUCapacity struct { - // REQUIRED; Gets or sets the minimum. - Minimum *int32 `json:"minimum,omitempty"` - - // Gets or sets the default. - Default *int32 `json:"default,omitempty"` - - // Gets or sets the maximum. - Maximum *int32 `json:"maximum,omitempty"` - - // Gets or sets the type of the scale. - ScaleType *SKUScaleType `json:"scaleType,omitempty"` -} - -// SKUsClientListOptions contains the optional parameters for the SKUsClient.List method. -type SKUsClientListOptions struct { - // placeholder for future optional parameters -} - -// ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate -// method. -type ServiceRegistriesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceRegistriesClientBeginDeleteOptions contains the optional parameters for the ServiceRegistriesClient.BeginDelete -// method. -type ServiceRegistriesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceRegistriesClientGetOptions contains the optional parameters for the ServiceRegistriesClient.Get method. -type ServiceRegistriesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.List method. -type ServiceRegistriesClientListOptions struct { - // placeholder for future optional parameters -} - -// ServiceRegistryInstance - Collection of instances belong to the Service Registry -type ServiceRegistryInstance struct { - // READ-ONLY; Name of the Service Registry instance - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Service Registry instance - Status *string `json:"status,omitempty" azure:"ro"` -} - -// ServiceRegistryProperties - Service Registry properties payload -type ServiceRegistryProperties struct { - // READ-ONLY; Collection of instances belong to Service Registry. - Instances []*ServiceRegistryInstance `json:"instances,omitempty" azure:"ro"` - - // READ-ONLY; State of the Service Registry. - ProvisioningState *ServiceRegistryProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The requested resource quantity for required CPU and Memory. - ResourceRequests *ServiceRegistryResourceRequests `json:"resourceRequests,omitempty" azure:"ro"` -} - -// ServiceRegistryResource - Service Registry resource -type ServiceRegistryResource struct { - // Service Registry properties payload - Properties *ServiceRegistryProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ServiceRegistryResourceCollection - Object that includes an array of Service Registry resources and a possible link for -// next set -type ServiceRegistryResourceCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Service Registry resources - Value []*ServiceRegistryResource `json:"value,omitempty"` -} - -// ServiceRegistryResourceRequests - Resource request payload of Service Registry -type ServiceRegistryResourceRequests struct { - // READ-ONLY; Cpu allocated to each Service Registry instance - CPU *string `json:"cpu,omitempty" azure:"ro"` - - // READ-ONLY; Instance count of the Service Registry - InstanceCount *int32 `json:"instanceCount,omitempty" azure:"ro"` - - // READ-ONLY; Memory allocated to each Service Registry instance - Memory *string `json:"memory,omitempty" azure:"ro"` -} - -// ServiceResource - Service resource -type ServiceResource struct { - // The GEO location of the resource. - Location *string `json:"location,omitempty"` - - // Properties of the Service resource - Properties *ClusterResourceProperties `json:"properties,omitempty"` - - // Sku of the Service resource - SKU *SKU `json:"sku,omitempty"` - - // Tags of the service which is a list of key value pairs that describe the resource. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ServiceResourceList - Object that includes an array of Service resources and a possible link for next set -type ServiceResourceList struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of Service resources - Value []*ServiceResource `json:"value,omitempty"` -} - -// ServiceSpecification - Service specification payload -type ServiceSpecification struct { - // Specifications of the Log for Azure Monitoring - LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"` - - // Specifications of the Metrics for Azure Monitoring - MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` -} - -// ServiceVNetAddons - Additional Service settings in vnet injection instance -type ServiceVNetAddons struct { - // Indicates whether the log stream in vnet injection instance could be accessed from internet. - LogStreamPublicEndpoint *bool `json:"logStreamPublicEndpoint,omitempty"` -} - -// ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate method. -type ServicesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. -type ServicesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServicesClientBeginStartOptions contains the optional parameters for the ServicesClient.BeginStart method. -type ServicesClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServicesClientBeginStopOptions contains the optional parameters for the ServicesClient.BeginStop method. -type ServicesClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method. -type ServicesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability -// method. -type ServicesClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ServicesClientDisableTestEndpointOptions contains the optional parameters for the ServicesClient.DisableTestEndpoint method. -type ServicesClientDisableTestEndpointOptions struct { - // placeholder for future optional parameters -} - -// ServicesClientEnableTestEndpointOptions contains the optional parameters for the ServicesClient.EnableTestEndpoint method. -type ServicesClientEnableTestEndpointOptions struct { - // placeholder for future optional parameters -} - -// ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. -type ServicesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription method. -type ServicesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ServicesClientListOptions contains the optional parameters for the ServicesClient.List method. -type ServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// ServicesClientListTestKeysOptions contains the optional parameters for the ServicesClient.ListTestKeys method. -type ServicesClientListTestKeysOptions struct { - // placeholder for future optional parameters -} - -// ServicesClientRegenerateTestKeyOptions contains the optional parameters for the ServicesClient.RegenerateTestKey method. -type ServicesClientRegenerateTestKeyOptions struct { - // placeholder for future optional parameters -} - -// SourceUploadedUserSourceInfo - Uploaded Java source code binary for a deployment -type SourceUploadedUserSourceInfo struct { - // REQUIRED; Type of the source uploaded - Type *string `json:"type,omitempty"` - - // Selector for the artifact to be used for the deployment for multi-module projects. This should be the relative path to - // the target module/project. - ArtifactSelector *string `json:"artifactSelector,omitempty"` - - // Relative path of the storage which stores the source - RelativePath *string `json:"relativePath,omitempty"` - - // Runtime version of the source file - RuntimeVersion *string `json:"runtimeVersion,omitempty"` - - // Version of the source - Version *string `json:"version,omitempty"` -} - -// GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type SourceUploadedUserSourceInfo. -func (s *SourceUploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo { - return &UploadedUserSourceInfo{ - RelativePath: s.RelativePath, - Type: s.Type, - Version: s.Version, - } -} - -// GetUserSourceInfo implements the UserSourceInfoClassification interface for type SourceUploadedUserSourceInfo. -func (s *SourceUploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { - return &UserSourceInfo{ - Type: s.Type, - Version: s.Version, - } -} - -// SsoProperties - Single sign-on related configuration -type SsoProperties struct { - // The public identifier for the application - ClientID *string `json:"clientId,omitempty"` - - // The secret known only to the application and the authorization server - ClientSecret *string `json:"clientSecret,omitempty"` - - // The URI of Issuer Identifier - IssuerURI *string `json:"issuerUri,omitempty"` - - // It defines the specific actions applications can be allowed to do on a user's behalf - Scope []*string `json:"scope,omitempty"` -} - -// StackProperties - KPack ClusterStack properties payload -type StackProperties struct { - // Id of the ClusterStack. - ID *string `json:"id,omitempty"` - - // Version of the ClusterStack - Version *string `json:"version,omitempty"` -} - -// StorageAccount - storage resource of type Azure Storage Account. -type StorageAccount struct { - // REQUIRED; The account key of the Azure Storage Account. - AccountKey *string `json:"accountKey,omitempty"` - - // REQUIRED; The account name of the Azure Storage Account. - AccountName *string `json:"accountName,omitempty"` - - // REQUIRED; The type of the storage. - StorageType *StorageType `json:"storageType,omitempty"` -} - -// GetStorageProperties implements the StoragePropertiesClassification interface for type StorageAccount. -func (s *StorageAccount) GetStorageProperties() *StorageProperties { - return &StorageProperties{ - StorageType: s.StorageType, - } -} - -// StoragePropertiesClassification provides polymorphic access to related types. -// Call the interface's GetStorageProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *StorageAccount, *StorageProperties -type StoragePropertiesClassification interface { - // GetStorageProperties returns the StorageProperties content of the underlying type. - GetStorageProperties() *StorageProperties -} - -// StorageProperties - Storage resource payload. -type StorageProperties struct { - // REQUIRED; The type of the storage. - StorageType *StorageType `json:"storageType,omitempty"` -} - -// GetStorageProperties implements the StoragePropertiesClassification interface for type StorageProperties. -func (s *StorageProperties) GetStorageProperties() *StorageProperties { return s } - -// StorageResource - Storage resource payload. -type StorageResource struct { - // Properties of the storage resource payload. - Properties StoragePropertiesClassification `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StorageResourceCollection - Collection compose of storage resources list and a possible link for next page. -type StorageResourceCollection struct { - // The link to next page of storage list. - NextLink *string `json:"nextLink,omitempty"` - - // The storage resources list. - Value []*StorageResource `json:"value,omitempty"` -} - -// StoragesClientBeginCreateOrUpdateOptions contains the optional parameters for the StoragesClient.BeginCreateOrUpdate method. -type StoragesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StoragesClientBeginDeleteOptions contains the optional parameters for the StoragesClient.BeginDelete method. -type StoragesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StoragesClientGetOptions contains the optional parameters for the StoragesClient.Get method. -type StoragesClientGetOptions struct { - // placeholder for future optional parameters -} - -// StoragesClientListOptions contains the optional parameters for the StoragesClient.List method. -type StoragesClientListOptions struct { - // placeholder for future optional parameters -} - -// SupportedBuildpackResource - Supported buildpack resource payload -type SupportedBuildpackResource struct { - // Supported buildpack resource properties - Properties *SupportedBuildpackResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SupportedBuildpackResourceProperties - Supported buildpack resource properties -type SupportedBuildpackResourceProperties struct { - // The id of supported buildpack - BuildpackID *string `json:"buildpackId,omitempty"` -} - -// SupportedBuildpacksCollection - Object that includes an array of supported buildpacks resources and a possible link for -// next set -type SupportedBuildpacksCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of supported buildpacks resources - Value []*SupportedBuildpackResource `json:"value,omitempty"` -} - -// SupportedRuntimeVersion - Supported deployment runtime version descriptor. -type SupportedRuntimeVersion struct { - // The platform of this runtime version (possible values: "Java" or ".NET"). - Platform *SupportedRuntimePlatform `json:"platform,omitempty"` - - // The raw value which could be passed to deployment CRUD operations. - Value *SupportedRuntimeValue `json:"value,omitempty"` - - // The detailed version (major.minor) of the platform. - Version *string `json:"version,omitempty"` -} - -// SupportedStackResource - Supported stack resource payload -type SupportedStackResource struct { - // Supported stack resource properties - Properties *SupportedStackResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SupportedStackResourceProperties - Supported stack resource properties -type SupportedStackResourceProperties struct { - // The id of supported stack - StackID *string `json:"stackId,omitempty"` - - // The version of supported stack - Version *string `json:"version,omitempty"` -} - -// SupportedStacksCollection - Object that includes an array of supported stacks resources and a possible link for next set -type SupportedStacksCollection struct { - // URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. - NextLink *string `json:"nextLink,omitempty"` - - // Collection of supported stacks resources - Value []*SupportedStackResource `json:"value,omitempty"` -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The timestamp of resource modification (UTC). - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *LastModifiedByType `json:"lastModifiedByType,omitempty"` -} - -// TCPSocketAction describes an action based on opening a socket -type TCPSocketAction struct { - // REQUIRED; The type of the action to take to perform the health check. - Type *ProbeActionType `json:"type,omitempty"` -} - -// GetProbeAction implements the ProbeActionClassification interface for type TCPSocketAction. -func (t *TCPSocketAction) GetProbeAction() *ProbeAction { - return &ProbeAction{ - Type: t.Type, - } -} - -// TemporaryDisk - Temporary disk payload -type TemporaryDisk struct { - // Mount path of the temporary disk - MountPath *string `json:"mountPath,omitempty"` - - // Size of the temporary disk in GB - SizeInGB *int32 `json:"sizeInGB,omitempty"` -} - -// TestKeys - Test keys payload -type TestKeys struct { - // Indicates whether the test endpoint feature enabled or not - Enabled *bool `json:"enabled,omitempty"` - - // Primary key - PrimaryKey *string `json:"primaryKey,omitempty"` - - // Primary test endpoint - PrimaryTestEndpoint *string `json:"primaryTestEndpoint,omitempty"` - - // Secondary key - SecondaryKey *string `json:"secondaryKey,omitempty"` - - // Secondary test endpoint - SecondaryTestEndpoint *string `json:"secondaryTestEndpoint,omitempty"` -} - -// TrackedResource - The resource model definition for a ARM tracked top level resource. -type TrackedResource struct { - // The GEO location of the resource. - Location *string `json:"location,omitempty"` - - // Tags of the service which is a list of key value pairs that describe the resource. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource Id for the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// TriggeredBuildResult - The build result triggered by a build -type TriggeredBuildResult struct { - // The unique build id of this build result - ID *string `json:"id,omitempty"` -} - -// UploadedUserSourceInfoClassification provides polymorphic access to related types. -// Call the interface's GetUploadedUserSourceInfo() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *JarUploadedUserSourceInfo, *NetCoreZipUploadedUserSourceInfo, *SourceUploadedUserSourceInfo, *UploadedUserSourceInfo -type UploadedUserSourceInfoClassification interface { - UserSourceInfoClassification - // GetUploadedUserSourceInfo returns the UploadedUserSourceInfo content of the underlying type. - GetUploadedUserSourceInfo() *UploadedUserSourceInfo -} - -// UploadedUserSourceInfo - Source with uploaded location -type UploadedUserSourceInfo struct { - // REQUIRED; Type of the source uploaded - Type *string `json:"type,omitempty"` - - // Relative path of the storage which stores the source - RelativePath *string `json:"relativePath,omitempty"` - - // Version of the source - Version *string `json:"version,omitempty"` -} - -// GetUploadedUserSourceInfo implements the UploadedUserSourceInfoClassification interface for type UploadedUserSourceInfo. -func (u *UploadedUserSourceInfo) GetUploadedUserSourceInfo() *UploadedUserSourceInfo { return u } - -// GetUserSourceInfo implements the UserSourceInfoClassification interface for type UploadedUserSourceInfo. -func (u *UploadedUserSourceInfo) GetUserSourceInfo() *UserSourceInfo { - return &UserSourceInfo{ - Type: u.Type, - Version: u.Version, - } -} - -// UserAssignedManagedIdentity - The details of the user-assigned managed identity assigned to an App. -type UserAssignedManagedIdentity struct { - // READ-ONLY; Client Id of user-assigned managed identity. - ClientID *string `json:"clientId,omitempty" azure:"ro"` - - // READ-ONLY; Principal Id of user-assigned managed identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` -} - -// UserSourceInfoClassification provides polymorphic access to related types. -// Call the interface's GetUserSourceInfo() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *BuildResultUserSourceInfo, *CustomContainerUserSourceInfo, *JarUploadedUserSourceInfo, *NetCoreZipUploadedUserSourceInfo, -// - *SourceUploadedUserSourceInfo, *UploadedUserSourceInfo, *UserSourceInfo -type UserSourceInfoClassification interface { - // GetUserSourceInfo returns the UserSourceInfo content of the underlying type. - GetUserSourceInfo() *UserSourceInfo -} - -// UserSourceInfo - Source information for a deployment -type UserSourceInfo struct { - // REQUIRED; Type of the source uploaded - Type *string `json:"type,omitempty"` - - // Version of the source - Version *string `json:"version,omitempty"` -} - -// GetUserSourceInfo implements the UserSourceInfoClassification interface for type UserSourceInfo. -func (u *UserSourceInfo) GetUserSourceInfo() *UserSourceInfo { return u } - -// ValidationMessages - Validate messages of the configuration service git repositories -type ValidationMessages struct { - // Detailed validation messages. - Messages []*string `json:"messages,omitempty"` - - // The name of the configuration service git repository. - Name *string `json:"name,omitempty"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_models_serde.go deleted file mode 100644 index a3fb27d4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_models_serde.go +++ /dev/null @@ -1,1278 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type APIPortalProperties. -func (a APIPortalProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "gatewayIds", a.GatewayIDs) - populate(objectMap, "httpsOnly", a.HTTPSOnly) - populate(objectMap, "instances", a.Instances) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "public", a.Public) - populate(objectMap, "resourceRequests", a.ResourceRequests) - populate(objectMap, "sourceUrls", a.SourceUrls) - populate(objectMap, "ssoProperties", a.SsoProperties) - populate(objectMap, "url", a.URL) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ActiveDeploymentCollection. -func (a ActiveDeploymentCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeDeploymentNames", a.ActiveDeploymentNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AppResource. -func (a AppResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AppResourceProperties. -func (a AppResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addonConfigs", a.AddonConfigs) - populate(objectMap, "customPersistentDisks", a.CustomPersistentDisks) - populate(objectMap, "enableEndToEndTLS", a.EnableEndToEndTLS) - populate(objectMap, "fqdn", a.Fqdn) - populate(objectMap, "httpsOnly", a.HTTPSOnly) - populate(objectMap, "loadedCertificates", a.LoadedCertificates) - populate(objectMap, "persistentDisk", a.PersistentDisk) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "public", a.Public) - populate(objectMap, "temporaryDisk", a.TemporaryDisk) - populate(objectMap, "url", a.URL) - populate(objectMap, "vnetAddons", a.VnetAddons) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileVolume. -func (a AzureFileVolume) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "mountOptions", a.MountOptions) - populate(objectMap, "mountPath", a.MountPath) - populate(objectMap, "readOnly", a.ReadOnly) - populate(objectMap, "shareName", a.ShareName) - objectMap["type"] = TypeAzureFileVolume - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileVolume. -func (a *AzureFileVolume) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "mountOptions": - err = unpopulate(val, "MountOptions", &a.MountOptions) - delete(rawMsg, key) - case "mountPath": - err = unpopulate(val, "MountPath", &a.MountPath) - delete(rawMsg, key) - case "readOnly": - err = unpopulate(val, "ReadOnly", &a.ReadOnly) - delete(rawMsg, key) - case "shareName": - err = unpopulate(val, "ShareName", &a.ShareName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BindingResource. -func (b BindingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BindingResourceProperties. -func (b BindingResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bindingParameters", b.BindingParameters) - populate(objectMap, "createdAt", b.CreatedAt) - populate(objectMap, "generatedProperties", b.GeneratedProperties) - populate(objectMap, "key", b.Key) - populate(objectMap, "resourceId", b.ResourceID) - populate(objectMap, "resourceName", b.ResourceName) - populate(objectMap, "resourceType", b.ResourceType) - populate(objectMap, "updatedAt", b.UpdatedAt) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BuildProperties. -func (b BuildProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentPool", b.AgentPool) - populate(objectMap, "builder", b.Builder) - populate(objectMap, "env", b.Env) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "relativePath", b.RelativePath) - populate(objectMap, "resourceRequests", b.ResourceRequests) - populate(objectMap, "triggeredBuildResult", b.TriggeredBuildResult) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BuildResultProperties. -func (b BuildResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "buildPodName", b.BuildPodName) - populate(objectMap, "buildStages", b.BuildStages) - populate(objectMap, "name", b.Name) - populate(objectMap, "provisioningState", b.ProvisioningState) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BuildResultUserSourceInfo. -func (b BuildResultUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "buildResultId", b.BuildResultID) - objectMap["type"] = "BuildResult" - populate(objectMap, "version", b.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BuildResultUserSourceInfo. -func (b *BuildResultUserSourceInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "buildResultId": - err = unpopulate(val, "BuildResultID", &b.BuildResultID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &b.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BuilderProperties. -func (b BuilderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "buildpackGroups", b.BuildpackGroups) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "stack", b.Stack) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BuildpackBindingLaunchProperties. -func (b BuildpackBindingLaunchProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "secrets", b.Secrets) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BuildpacksGroupProperties. -func (b BuildpacksGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "buildpacks", b.Buildpacks) - populate(objectMap, "name", b.Name) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateProperties. -func (c CertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activateDate", c.ActivateDate) - populate(objectMap, "dnsNames", c.DNSNames) - populate(objectMap, "expirationDate", c.ExpirationDate) - populate(objectMap, "issuedDate", c.IssuedDate) - populate(objectMap, "issuer", c.Issuer) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "subjectName", c.SubjectName) - populate(objectMap, "thumbprint", c.Thumbprint) - objectMap["type"] = c.Type - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateResource. -func (c CertificateResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResource. -func (c *CertificateResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - c.Properties, err = unmarshalCertificatePropertiesClassification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigServerGitProperty. -func (c ConfigServerGitProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hostKey", c.HostKey) - populate(objectMap, "hostKeyAlgorithm", c.HostKeyAlgorithm) - populate(objectMap, "label", c.Label) - populate(objectMap, "password", c.Password) - populate(objectMap, "privateKey", c.PrivateKey) - populate(objectMap, "repositories", c.Repositories) - populate(objectMap, "searchPaths", c.SearchPaths) - populate(objectMap, "strictHostKeyChecking", c.StrictHostKeyChecking) - populate(objectMap, "uri", c.URI) - populate(objectMap, "username", c.Username) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigServerResource. -func (c ConfigServerResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitProperty. -func (c ConfigurationServiceGitProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "repositories", c.Repositories) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceGitRepository. -func (c ConfigurationServiceGitRepository) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hostKey", c.HostKey) - populate(objectMap, "hostKeyAlgorithm", c.HostKeyAlgorithm) - populate(objectMap, "label", c.Label) - populate(objectMap, "name", c.Name) - populate(objectMap, "password", c.Password) - populate(objectMap, "patterns", c.Patterns) - populate(objectMap, "privateKey", c.PrivateKey) - populate(objectMap, "searchPaths", c.SearchPaths) - populate(objectMap, "strictHostKeyChecking", c.StrictHostKeyChecking) - populate(objectMap, "uri", c.URI) - populate(objectMap, "username", c.Username) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigurationServiceProperties. -func (c ConfigurationServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instances", c.Instances) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "resourceRequests", c.ResourceRequests) - populate(objectMap, "settings", c.Settings) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ContentCertificateProperties. -func (c ContentCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activateDate", c.ActivateDate) - populate(objectMap, "content", c.Content) - populate(objectMap, "dnsNames", c.DNSNames) - populate(objectMap, "expirationDate", c.ExpirationDate) - populate(objectMap, "issuedDate", c.IssuedDate) - populate(objectMap, "issuer", c.Issuer) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "subjectName", c.SubjectName) - populate(objectMap, "thumbprint", c.Thumbprint) - objectMap["type"] = "ContentCertificate" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContentCertificateProperties. -func (c *ContentCertificateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activateDate": - err = unpopulate(val, "ActivateDate", &c.ActivateDate) - delete(rawMsg, key) - case "content": - err = unpopulate(val, "Content", &c.Content) - delete(rawMsg, key) - case "dnsNames": - err = unpopulate(val, "DNSNames", &c.DNSNames) - delete(rawMsg, key) - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) - delete(rawMsg, key) - case "issuedDate": - err = unpopulate(val, "IssuedDate", &c.IssuedDate) - delete(rawMsg, key) - case "issuer": - err = unpopulate(val, "Issuer", &c.Issuer) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &c.SubjectName) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomContainer. -func (c CustomContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "args", c.Args) - populate(objectMap, "command", c.Command) - populate(objectMap, "containerImage", c.ContainerImage) - populate(objectMap, "imageRegistryCredential", c.ImageRegistryCredential) - populate(objectMap, "languageFramework", c.LanguageFramework) - populate(objectMap, "server", c.Server) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CustomContainerUserSourceInfo. -func (c CustomContainerUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customContainer", c.CustomContainer) - objectMap["type"] = "Container" - populate(objectMap, "version", c.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomContainerUserSourceInfo. -func (c *CustomContainerUserSourceInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customContainer": - err = unpopulate(val, "CustomContainer", &c.CustomContainer) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &c.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomDomainResource. -func (c CustomDomainResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CustomPersistentDiskProperties. -func (c CustomPersistentDiskProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "mountOptions", c.MountOptions) - populate(objectMap, "mountPath", c.MountPath) - populate(objectMap, "readOnly", c.ReadOnly) - objectMap["type"] = c.Type - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CustomPersistentDiskResource. -func (c CustomPersistentDiskResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customPersistentDiskProperties", c.CustomPersistentDiskProperties) - populate(objectMap, "storageId", c.StorageID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomPersistentDiskResource. -func (c *CustomPersistentDiskResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customPersistentDiskProperties": - c.CustomPersistentDiskProperties, err = unmarshalCustomPersistentDiskPropertiesClassification(val) - delete(rawMsg, key) - case "storageId": - err = unpopulate(val, "StorageID", &c.StorageID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentResource. -func (d DeploymentResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "sku", d.SKU) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentResourceProperties. -func (d DeploymentResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "active", d.Active) - populate(objectMap, "deploymentSettings", d.DeploymentSettings) - populate(objectMap, "instances", d.Instances) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "source", d.Source) - populate(objectMap, "status", d.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResourceProperties. -func (d *DeploymentResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "active": - err = unpopulate(val, "Active", &d.Active) - delete(rawMsg, key) - case "deploymentSettings": - err = unpopulate(val, "DeploymentSettings", &d.DeploymentSettings) - delete(rawMsg, key) - case "instances": - err = unpopulate(val, "Instances", &d.Instances) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "source": - d.Source, err = unmarshalUserSourceInfoClassification(val) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentSettings. -func (d DeploymentSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addonConfigs", d.AddonConfigs) - populate(objectMap, "containerProbeSettings", d.ContainerProbeSettings) - populate(objectMap, "environmentVariables", d.EnvironmentVariables) - populate(objectMap, "livenessProbe", d.LivenessProbe) - populate(objectMap, "readinessProbe", d.ReadinessProbe) - populate(objectMap, "resourceRequests", d.ResourceRequests) - populate(objectMap, "startupProbe", d.StartupProbe) - populate(objectMap, "terminationGracePeriodSeconds", d.TerminationGracePeriodSeconds) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ExecAction. -func (e ExecAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "command", e.Command) - objectMap["type"] = ProbeActionTypeExecAction - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExecAction. -func (e *ExecAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "command": - err = unpopulate(val, "Command", &e.Command) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayAPIRoute. -func (g GatewayAPIRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", g.Description) - populate(objectMap, "filters", g.Filters) - populate(objectMap, "order", g.Order) - populate(objectMap, "predicates", g.Predicates) - populate(objectMap, "ssoEnabled", g.SsoEnabled) - populate(objectMap, "tags", g.Tags) - populate(objectMap, "title", g.Title) - populate(objectMap, "tokenRelay", g.TokenRelay) - populate(objectMap, "uri", g.URI) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayCorsProperties. -func (g GatewayCorsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowCredentials", g.AllowCredentials) - populate(objectMap, "allowedHeaders", g.AllowedHeaders) - populate(objectMap, "allowedMethods", g.AllowedMethods) - populate(objectMap, "allowedOrigins", g.AllowedOrigins) - populate(objectMap, "exposedHeaders", g.ExposedHeaders) - populate(objectMap, "maxAge", g.MaxAge) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayOperatorProperties. -func (g GatewayOperatorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instances", g.Instances) - populate(objectMap, "resourceRequests", g.ResourceRequests) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayProperties. -func (g GatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "apiMetadataProperties", g.APIMetadataProperties) - populate(objectMap, "corsProperties", g.CorsProperties) - populate(objectMap, "httpsOnly", g.HTTPSOnly) - populate(objectMap, "instances", g.Instances) - populate(objectMap, "operatorProperties", g.OperatorProperties) - populate(objectMap, "provisioningState", g.ProvisioningState) - populate(objectMap, "public", g.Public) - populate(objectMap, "resourceRequests", g.ResourceRequests) - populate(objectMap, "ssoProperties", g.SsoProperties) - populate(objectMap, "url", g.URL) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayRouteConfigProperties. -func (g GatewayRouteConfigProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appResourceId", g.AppResourceID) - populate(objectMap, "openApi", g.OpenAPI) - populate(objectMap, "provisioningState", g.ProvisioningState) - populate(objectMap, "routes", g.Routes) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type GitPatternRepository. -func (g GitPatternRepository) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hostKey", g.HostKey) - populate(objectMap, "hostKeyAlgorithm", g.HostKeyAlgorithm) - populate(objectMap, "label", g.Label) - populate(objectMap, "name", g.Name) - populate(objectMap, "password", g.Password) - populate(objectMap, "pattern", g.Pattern) - populate(objectMap, "privateKey", g.PrivateKey) - populate(objectMap, "searchPaths", g.SearchPaths) - populate(objectMap, "strictHostKeyChecking", g.StrictHostKeyChecking) - populate(objectMap, "uri", g.URI) - populate(objectMap, "username", g.Username) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type HTTPGetAction. -func (h HTTPGetAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "path", h.Path) - populate(objectMap, "scheme", h.Scheme) - objectMap["type"] = ProbeActionTypeHTTPGetAction - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPGetAction. -func (h *HTTPGetAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "path": - err = unpopulate(val, "Path", &h.Path) - delete(rawMsg, key) - case "scheme": - err = unpopulate(val, "Scheme", &h.Scheme) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &h.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JarUploadedUserSourceInfo. -func (j JarUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "jvmOptions", j.JvmOptions) - populate(objectMap, "relativePath", j.RelativePath) - populate(objectMap, "runtimeVersion", j.RuntimeVersion) - objectMap["type"] = "Jar" - populate(objectMap, "version", j.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JarUploadedUserSourceInfo. -func (j *JarUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jvmOptions": - err = unpopulate(val, "JvmOptions", &j.JvmOptions) - delete(rawMsg, key) - case "relativePath": - err = unpopulate(val, "RelativePath", &j.RelativePath) - delete(rawMsg, key) - case "runtimeVersion": - err = unpopulate(val, "RuntimeVersion", &j.RuntimeVersion) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &j.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &j.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateProperties. -func (k KeyVaultCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activateDate", k.ActivateDate) - populate(objectMap, "certVersion", k.CertVersion) - populate(objectMap, "dnsNames", k.DNSNames) - populate(objectMap, "excludePrivateKey", k.ExcludePrivateKey) - populate(objectMap, "expirationDate", k.ExpirationDate) - populate(objectMap, "issuedDate", k.IssuedDate) - populate(objectMap, "issuer", k.Issuer) - populate(objectMap, "keyVaultCertName", k.KeyVaultCertName) - populate(objectMap, "provisioningState", k.ProvisioningState) - populate(objectMap, "subjectName", k.SubjectName) - populate(objectMap, "thumbprint", k.Thumbprint) - objectMap["type"] = "KeyVaultCertificate" - populate(objectMap, "vaultUri", k.VaultURI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateProperties. -func (k *KeyVaultCertificateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activateDate": - err = unpopulate(val, "ActivateDate", &k.ActivateDate) - delete(rawMsg, key) - case "certVersion": - err = unpopulate(val, "CertVersion", &k.CertVersion) - delete(rawMsg, key) - case "dnsNames": - err = unpopulate(val, "DNSNames", &k.DNSNames) - delete(rawMsg, key) - case "excludePrivateKey": - err = unpopulate(val, "ExcludePrivateKey", &k.ExcludePrivateKey) - delete(rawMsg, key) - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &k.ExpirationDate) - delete(rawMsg, key) - case "issuedDate": - err = unpopulate(val, "IssuedDate", &k.IssuedDate) - delete(rawMsg, key) - case "issuer": - err = unpopulate(val, "Issuer", &k.Issuer) - delete(rawMsg, key) - case "keyVaultCertName": - err = unpopulate(val, "KeyVaultCertName", &k.KeyVaultCertName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) - delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &k.SubjectName) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &k.Thumbprint) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &k.Type) - delete(rawMsg, key) - case "vaultUri": - err = unpopulate(val, "VaultURI", &k.VaultURI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedIdentityProperties. -func (m ManagedIdentityProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MonitoringSettingResource. -func (m MonitoringSettingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type NetCoreZipUploadedUserSourceInfo. -func (n NetCoreZipUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "netCoreMainEntryPath", n.NetCoreMainEntryPath) - populate(objectMap, "relativePath", n.RelativePath) - populate(objectMap, "runtimeVersion", n.RuntimeVersion) - objectMap["type"] = "NetCoreZip" - populate(objectMap, "version", n.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetCoreZipUploadedUserSourceInfo. -func (n *NetCoreZipUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "netCoreMainEntryPath": - err = unpopulate(val, "NetCoreMainEntryPath", &n.NetCoreMainEntryPath) - delete(rawMsg, key) - case "relativePath": - err = unpopulate(val, "RelativePath", &n.RelativePath) - delete(rawMsg, key) - case "runtimeVersion": - err = unpopulate(val, "RuntimeVersion", &n.RuntimeVersion) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &n.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkProfile. -func (n NetworkProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appNetworkResourceGroup", n.AppNetworkResourceGroup) - populate(objectMap, "appSubnetId", n.AppSubnetID) - populate(objectMap, "ingressConfig", n.IngressConfig) - populate(objectMap, "outboundIPs", n.OutboundIPs) - populate(objectMap, "requiredTraffics", n.RequiredTraffics) - populate(objectMap, "serviceCidr", n.ServiceCidr) - populate(objectMap, "serviceRuntimeNetworkResourceGroup", n.ServiceRuntimeNetworkResourceGroup) - populate(objectMap, "serviceRuntimeSubnetId", n.ServiceRuntimeSubnetID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkProfileOutboundIPs. -func (n NetworkProfileOutboundIPs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "publicIPs", n.PublicIPs) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Probe. -func (p Probe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disableProbe", p.DisableProbe) - populate(objectMap, "failureThreshold", p.FailureThreshold) - populate(objectMap, "initialDelaySeconds", p.InitialDelaySeconds) - populate(objectMap, "periodSeconds", p.PeriodSeconds) - populate(objectMap, "probeAction", p.ProbeAction) - populate(objectMap, "successThreshold", p.SuccessThreshold) - populate(objectMap, "timeoutSeconds", p.TimeoutSeconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Probe. -func (p *Probe) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disableProbe": - err = unpopulate(val, "DisableProbe", &p.DisableProbe) - delete(rawMsg, key) - case "failureThreshold": - err = unpopulate(val, "FailureThreshold", &p.FailureThreshold) - delete(rawMsg, key) - case "initialDelaySeconds": - err = unpopulate(val, "InitialDelaySeconds", &p.InitialDelaySeconds) - delete(rawMsg, key) - case "periodSeconds": - err = unpopulate(val, "PeriodSeconds", &p.PeriodSeconds) - delete(rawMsg, key) - case "probeAction": - p.ProbeAction, err = unmarshalProbeActionClassification(val) - delete(rawMsg, key) - case "successThreshold": - err = unpopulate(val, "SuccessThreshold", &p.SuccessThreshold) - delete(rawMsg, key) - case "timeoutSeconds": - err = unpopulate(val, "TimeoutSeconds", &p.TimeoutSeconds) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RequiredTraffic. -func (r RequiredTraffic) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "direction", r.Direction) - populate(objectMap, "fqdns", r.Fqdns) - populate(objectMap, "ips", r.IPs) - populate(objectMap, "port", r.Port) - populate(objectMap, "protocol", r.Protocol) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceRegistryProperties. -func (s ServiceRegistryProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instances", s.Instances) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "resourceRequests", s.ResourceRequests) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceResource. -func (s ServiceResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "sku", s.SKU) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SourceUploadedUserSourceInfo. -func (s SourceUploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "artifactSelector", s.ArtifactSelector) - populate(objectMap, "relativePath", s.RelativePath) - populate(objectMap, "runtimeVersion", s.RuntimeVersion) - objectMap["type"] = "Source" - populate(objectMap, "version", s.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SourceUploadedUserSourceInfo. -func (s *SourceUploadedUserSourceInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "artifactSelector": - err = unpopulate(val, "ArtifactSelector", &s.ArtifactSelector) - delete(rawMsg, key) - case "relativePath": - err = unpopulate(val, "RelativePath", &s.RelativePath) - delete(rawMsg, key) - case "runtimeVersion": - err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &s.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SsoProperties. -func (s SsoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clientId", s.ClientID) - populate(objectMap, "clientSecret", s.ClientSecret) - populate(objectMap, "issuerUri", s.IssuerURI) - populate(objectMap, "scope", s.Scope) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StorageAccount. -func (s StorageAccount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accountKey", s.AccountKey) - populate(objectMap, "accountName", s.AccountName) - objectMap["storageType"] = StorageTypeStorageAccount - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccount. -func (s *StorageAccount) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accountKey": - err = unpopulate(val, "AccountKey", &s.AccountKey) - delete(rawMsg, key) - case "accountName": - err = unpopulate(val, "AccountName", &s.AccountName) - delete(rawMsg, key) - case "storageType": - err = unpopulate(val, "StorageType", &s.StorageType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageResource. -func (s StorageResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageResource. -func (s *StorageResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - s.Properties, err = unmarshalStoragePropertiesClassification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TCPSocketAction. -func (t TCPSocketAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["type"] = ProbeActionTypeTCPSocketAction - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TCPSocketAction. -func (t *TCPSocketAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TrackedResource. -func (t TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", t.ID) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - populate(objectMap, "systemData", t.SystemData) - populate(objectMap, "tags", t.Tags) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type UploadedUserSourceInfo. -func (u UploadedUserSourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "relativePath", u.RelativePath) - objectMap["type"] = "UploadedUserSourceInfo" - populate(objectMap, "version", u.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UploadedUserSourceInfo. -func (u *UploadedUserSourceInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "relativePath": - err = unpopulate(val, "RelativePath", &u.RelativePath) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &u.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &u.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_monitoringsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_monitoringsettings_client.go deleted file mode 100644 index c903ea62..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_monitoringsettings_client.go +++ /dev/null @@ -1,247 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// MonitoringSettingsClient contains the methods for the MonitoringSettings group. -// Don't use this type directly, use NewMonitoringSettingsClient() instead. -type MonitoringSettingsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewMonitoringSettingsClient creates a new instance of MonitoringSettingsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewMonitoringSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitoringSettingsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &MonitoringSettingsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get the Monitoring Setting and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - MonitoringSettingsClientGetOptions contains the optional parameters for the MonitoringSettingsClient.Get method. -func (client *MonitoringSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *MonitoringSettingsClientGetOptions) (MonitoringSettingsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return MonitoringSettingsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MonitoringSettingsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MonitoringSettingsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *MonitoringSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *MonitoringSettingsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *MonitoringSettingsClient) getHandleResponse(resp *http.Response) (MonitoringSettingsClientGetResponse, error) { - result := MonitoringSettingsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MonitoringSettingResource); err != nil { - return MonitoringSettingsClientGetResponse{}, err - } - return result, nil -} - -// BeginUpdatePatch - Update the Monitoring Setting. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// monitoringSettingResource - Parameters for the update operation -// options - MonitoringSettingsClientBeginUpdatePatchOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePatch -// method. -func (client *MonitoringSettingsClient) BeginUpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*runtime.Poller[MonitoringSettingsClientUpdatePatchResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updatePatch(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[MonitoringSettingsClientUpdatePatchResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[MonitoringSettingsClientUpdatePatchResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdatePatch - Update the Monitoring Setting. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *MonitoringSettingsClient) updatePatch(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*http.Response, error) { - req, err := client.updatePatchCreateRequest(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updatePatchCreateRequest creates the UpdatePatch request. -func (client *MonitoringSettingsClient) updatePatchCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePatchOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, monitoringSettingResource) -} - -// BeginUpdatePut - Update the Monitoring Setting. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// monitoringSettingResource - Parameters for the update operation -// options - MonitoringSettingsClientBeginUpdatePutOptions contains the optional parameters for the MonitoringSettingsClient.BeginUpdatePut -// method. -func (client *MonitoringSettingsClient) BeginUpdatePut(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*runtime.Poller[MonitoringSettingsClientUpdatePutResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updatePut(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[MonitoringSettingsClientUpdatePutResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[MonitoringSettingsClientUpdatePutResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdatePut - Update the Monitoring Setting. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *MonitoringSettingsClient) updatePut(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*http.Response, error) { - req, err := client.updatePutCreateRequest(ctx, resourceGroupName, serviceName, monitoringSettingResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updatePutCreateRequest creates the UpdatePut request. -func (client *MonitoringSettingsClient) updatePutCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, monitoringSettingResource MonitoringSettingResource, options *MonitoringSettingsClientBeginUpdatePutOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, monitoringSettingResource) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_operations_client.go deleted file mode 100644 index 3cc9ddc6..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_operations_client.go +++ /dev/null @@ -1,104 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - host string - pl runtime.Pipeline -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists all of the available REST API operations of the Microsoft.AppPlatform provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.AppPlatform/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AvailableOperations); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_polymorphic_helpers.go deleted file mode 100644 index d3c67822..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_polymorphic_helpers.go +++ /dev/null @@ -1,117 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import "encoding/json" - -func unmarshalCertificatePropertiesClassification(rawMsg json.RawMessage) (CertificatePropertiesClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b CertificatePropertiesClassification - switch m["type"] { - case "ContentCertificate": - b = &ContentCertificateProperties{} - case "KeyVaultCertificate": - b = &KeyVaultCertificateProperties{} - default: - b = &CertificateProperties{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalCustomPersistentDiskPropertiesClassification(rawMsg json.RawMessage) (CustomPersistentDiskPropertiesClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b CustomPersistentDiskPropertiesClassification - switch m["type"] { - case string(TypeAzureFileVolume): - b = &AzureFileVolume{} - default: - b = &CustomPersistentDiskProperties{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalProbeActionClassification(rawMsg json.RawMessage) (ProbeActionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ProbeActionClassification - switch m["type"] { - case string(ProbeActionTypeExecAction): - b = &ExecAction{} - case string(ProbeActionTypeHTTPGetAction): - b = &HTTPGetAction{} - case string(ProbeActionTypeTCPSocketAction): - b = &TCPSocketAction{} - default: - b = &ProbeAction{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalStoragePropertiesClassification(rawMsg json.RawMessage) (StoragePropertiesClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b StoragePropertiesClassification - switch m["storageType"] { - case string(StorageTypeStorageAccount): - b = &StorageAccount{} - default: - b = &StorageProperties{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalUserSourceInfoClassification(rawMsg json.RawMessage) (UserSourceInfoClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b UserSourceInfoClassification - switch m["type"] { - case "BuildResult": - b = &BuildResultUserSourceInfo{} - case "Container": - b = &CustomContainerUserSourceInfo{} - case "Jar": - b = &JarUploadedUserSourceInfo{} - case "NetCoreZip": - b = &NetCoreZipUploadedUserSourceInfo{} - case "Source": - b = &SourceUploadedUserSourceInfo{} - case "UploadedUserSourceInfo": - b = &UploadedUserSourceInfo{} - default: - b = &UserSourceInfo{} - } - return b, json.Unmarshal(rawMsg, b) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_response_types.go deleted file mode 100644 index e2199814..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_response_types.go +++ /dev/null @@ -1,594 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -// APIPortalCustomDomainsClientCreateOrUpdateResponse contains the response from method APIPortalCustomDomainsClient.CreateOrUpdate. -type APIPortalCustomDomainsClientCreateOrUpdateResponse struct { - APIPortalCustomDomainResource -} - -// APIPortalCustomDomainsClientDeleteResponse contains the response from method APIPortalCustomDomainsClient.Delete. -type APIPortalCustomDomainsClientDeleteResponse struct { - // placeholder for future response values -} - -// APIPortalCustomDomainsClientGetResponse contains the response from method APIPortalCustomDomainsClient.Get. -type APIPortalCustomDomainsClientGetResponse struct { - APIPortalCustomDomainResource -} - -// APIPortalCustomDomainsClientListResponse contains the response from method APIPortalCustomDomainsClient.List. -type APIPortalCustomDomainsClientListResponse struct { - APIPortalCustomDomainResourceCollection -} - -// APIPortalsClientCreateOrUpdateResponse contains the response from method APIPortalsClient.CreateOrUpdate. -type APIPortalsClientCreateOrUpdateResponse struct { - APIPortalResource -} - -// APIPortalsClientDeleteResponse contains the response from method APIPortalsClient.Delete. -type APIPortalsClientDeleteResponse struct { - // placeholder for future response values -} - -// APIPortalsClientGetResponse contains the response from method APIPortalsClient.Get. -type APIPortalsClientGetResponse struct { - APIPortalResource -} - -// APIPortalsClientListResponse contains the response from method APIPortalsClient.List. -type APIPortalsClientListResponse struct { - APIPortalResourceCollection -} - -// APIPortalsClientValidateDomainResponse contains the response from method APIPortalsClient.ValidateDomain. -type APIPortalsClientValidateDomainResponse struct { - CustomDomainValidateResult -} - -// AppsClientCreateOrUpdateResponse contains the response from method AppsClient.CreateOrUpdate. -type AppsClientCreateOrUpdateResponse struct { - AppResource -} - -// AppsClientDeleteResponse contains the response from method AppsClient.Delete. -type AppsClientDeleteResponse struct { - // placeholder for future response values -} - -// AppsClientGetResourceUploadURLResponse contains the response from method AppsClient.GetResourceUploadURL. -type AppsClientGetResourceUploadURLResponse struct { - ResourceUploadDefinition -} - -// AppsClientGetResponse contains the response from method AppsClient.Get. -type AppsClientGetResponse struct { - AppResource -} - -// AppsClientListResponse contains the response from method AppsClient.List. -type AppsClientListResponse struct { - AppResourceCollection -} - -// AppsClientSetActiveDeploymentsResponse contains the response from method AppsClient.SetActiveDeployments. -type AppsClientSetActiveDeploymentsResponse struct { - AppResource -} - -// AppsClientUpdateResponse contains the response from method AppsClient.Update. -type AppsClientUpdateResponse struct { - AppResource -} - -// AppsClientValidateDomainResponse contains the response from method AppsClient.ValidateDomain. -type AppsClientValidateDomainResponse struct { - CustomDomainValidateResult -} - -// BindingsClientCreateOrUpdateResponse contains the response from method BindingsClient.CreateOrUpdate. -type BindingsClientCreateOrUpdateResponse struct { - BindingResource -} - -// BindingsClientDeleteResponse contains the response from method BindingsClient.Delete. -type BindingsClientDeleteResponse struct { - // placeholder for future response values -} - -// BindingsClientGetResponse contains the response from method BindingsClient.Get. -type BindingsClientGetResponse struct { - BindingResource -} - -// BindingsClientListResponse contains the response from method BindingsClient.List. -type BindingsClientListResponse struct { - BindingResourceCollection -} - -// BindingsClientUpdateResponse contains the response from method BindingsClient.Update. -type BindingsClientUpdateResponse struct { - BindingResource -} - -// BuildServiceAgentPoolClientGetResponse contains the response from method BuildServiceAgentPoolClient.Get. -type BuildServiceAgentPoolClientGetResponse struct { - BuildServiceAgentPoolResource -} - -// BuildServiceAgentPoolClientListResponse contains the response from method BuildServiceAgentPoolClient.List. -type BuildServiceAgentPoolClientListResponse struct { - BuildServiceAgentPoolResourceCollection -} - -// BuildServiceAgentPoolClientUpdatePutResponse contains the response from method BuildServiceAgentPoolClient.UpdatePut. -type BuildServiceAgentPoolClientUpdatePutResponse struct { - BuildServiceAgentPoolResource -} - -// BuildServiceBuilderClientCreateOrUpdateResponse contains the response from method BuildServiceBuilderClient.CreateOrUpdate. -type BuildServiceBuilderClientCreateOrUpdateResponse struct { - BuilderResource -} - -// BuildServiceBuilderClientDeleteResponse contains the response from method BuildServiceBuilderClient.Delete. -type BuildServiceBuilderClientDeleteResponse struct { - // placeholder for future response values -} - -// BuildServiceBuilderClientGetResponse contains the response from method BuildServiceBuilderClient.Get. -type BuildServiceBuilderClientGetResponse struct { - BuilderResource -} - -// BuildServiceBuilderClientListResponse contains the response from method BuildServiceBuilderClient.List. -type BuildServiceBuilderClientListResponse struct { - BuilderResourceCollection -} - -// BuildServiceClientCreateOrUpdateBuildResponse contains the response from method BuildServiceClient.CreateOrUpdateBuild. -type BuildServiceClientCreateOrUpdateBuildResponse struct { - Build -} - -// BuildServiceClientGetBuildResponse contains the response from method BuildServiceClient.GetBuild. -type BuildServiceClientGetBuildResponse struct { - Build -} - -// BuildServiceClientGetBuildResultLogResponse contains the response from method BuildServiceClient.GetBuildResultLog. -type BuildServiceClientGetBuildResultLogResponse struct { - BuildResultLog -} - -// BuildServiceClientGetBuildResultResponse contains the response from method BuildServiceClient.GetBuildResult. -type BuildServiceClientGetBuildResultResponse struct { - BuildResult -} - -// BuildServiceClientGetBuildServiceResponse contains the response from method BuildServiceClient.GetBuildService. -type BuildServiceClientGetBuildServiceResponse struct { - BuildService -} - -// BuildServiceClientGetResourceUploadURLResponse contains the response from method BuildServiceClient.GetResourceUploadURL. -type BuildServiceClientGetResourceUploadURLResponse struct { - ResourceUploadDefinition -} - -// BuildServiceClientGetSupportedBuildpackResponse contains the response from method BuildServiceClient.GetSupportedBuildpack. -type BuildServiceClientGetSupportedBuildpackResponse struct { - SupportedBuildpackResource -} - -// BuildServiceClientGetSupportedStackResponse contains the response from method BuildServiceClient.GetSupportedStack. -type BuildServiceClientGetSupportedStackResponse struct { - SupportedStackResource -} - -// BuildServiceClientListBuildResultsResponse contains the response from method BuildServiceClient.ListBuildResults. -type BuildServiceClientListBuildResultsResponse struct { - BuildResultCollection -} - -// BuildServiceClientListBuildServicesResponse contains the response from method BuildServiceClient.ListBuildServices. -type BuildServiceClientListBuildServicesResponse struct { - BuildServiceCollection -} - -// BuildServiceClientListBuildsResponse contains the response from method BuildServiceClient.ListBuilds. -type BuildServiceClientListBuildsResponse struct { - BuildCollection -} - -// BuildServiceClientListSupportedBuildpacksResponse contains the response from method BuildServiceClient.ListSupportedBuildpacks. -type BuildServiceClientListSupportedBuildpacksResponse struct { - SupportedBuildpacksCollection -} - -// BuildServiceClientListSupportedStacksResponse contains the response from method BuildServiceClient.ListSupportedStacks. -type BuildServiceClientListSupportedStacksResponse struct { - SupportedStacksCollection -} - -// BuildpackBindingClientCreateOrUpdateResponse contains the response from method BuildpackBindingClient.CreateOrUpdate. -type BuildpackBindingClientCreateOrUpdateResponse struct { - BuildpackBindingResource -} - -// BuildpackBindingClientDeleteResponse contains the response from method BuildpackBindingClient.Delete. -type BuildpackBindingClientDeleteResponse struct { - // placeholder for future response values -} - -// BuildpackBindingClientGetResponse contains the response from method BuildpackBindingClient.Get. -type BuildpackBindingClientGetResponse struct { - BuildpackBindingResource -} - -// BuildpackBindingClientListResponse contains the response from method BuildpackBindingClient.List. -type BuildpackBindingClientListResponse struct { - BuildpackBindingResourceCollection -} - -// CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. -type CertificatesClientCreateOrUpdateResponse struct { - CertificateResource -} - -// CertificatesClientDeleteResponse contains the response from method CertificatesClient.Delete. -type CertificatesClientDeleteResponse struct { - // placeholder for future response values -} - -// CertificatesClientGetResponse contains the response from method CertificatesClient.Get. -type CertificatesClientGetResponse struct { - CertificateResource -} - -// CertificatesClientListResponse contains the response from method CertificatesClient.List. -type CertificatesClientListResponse struct { - CertificateResourceCollection -} - -// ConfigServersClientGetResponse contains the response from method ConfigServersClient.Get. -type ConfigServersClientGetResponse struct { - ConfigServerResource -} - -// ConfigServersClientUpdatePatchResponse contains the response from method ConfigServersClient.UpdatePatch. -type ConfigServersClientUpdatePatchResponse struct { - ConfigServerResource -} - -// ConfigServersClientUpdatePutResponse contains the response from method ConfigServersClient.UpdatePut. -type ConfigServersClientUpdatePutResponse struct { - ConfigServerResource -} - -// ConfigServersClientValidateResponse contains the response from method ConfigServersClient.Validate. -type ConfigServersClientValidateResponse struct { - ConfigServerSettingsValidateResult -} - -// ConfigurationServicesClientCreateOrUpdateResponse contains the response from method ConfigurationServicesClient.CreateOrUpdate. -type ConfigurationServicesClientCreateOrUpdateResponse struct { - ConfigurationServiceResource -} - -// ConfigurationServicesClientDeleteResponse contains the response from method ConfigurationServicesClient.Delete. -type ConfigurationServicesClientDeleteResponse struct { - // placeholder for future response values -} - -// ConfigurationServicesClientGetResponse contains the response from method ConfigurationServicesClient.Get. -type ConfigurationServicesClientGetResponse struct { - ConfigurationServiceResource -} - -// ConfigurationServicesClientListResponse contains the response from method ConfigurationServicesClient.List. -type ConfigurationServicesClientListResponse struct { - ConfigurationServiceResourceCollection -} - -// ConfigurationServicesClientValidateResponse contains the response from method ConfigurationServicesClient.Validate. -type ConfigurationServicesClientValidateResponse struct { - ConfigurationServiceSettingsValidateResult -} - -// CustomDomainsClientCreateOrUpdateResponse contains the response from method CustomDomainsClient.CreateOrUpdate. -type CustomDomainsClientCreateOrUpdateResponse struct { - CustomDomainResource -} - -// CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.Delete. -type CustomDomainsClientDeleteResponse struct { - // placeholder for future response values -} - -// CustomDomainsClientGetResponse contains the response from method CustomDomainsClient.Get. -type CustomDomainsClientGetResponse struct { - CustomDomainResource -} - -// CustomDomainsClientListResponse contains the response from method CustomDomainsClient.List. -type CustomDomainsClientListResponse struct { - CustomDomainResourceCollection -} - -// CustomDomainsClientUpdateResponse contains the response from method CustomDomainsClient.Update. -type CustomDomainsClientUpdateResponse struct { - CustomDomainResource -} - -// DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.CreateOrUpdate. -type DeploymentsClientCreateOrUpdateResponse struct { - DeploymentResource -} - -// DeploymentsClientDeleteResponse contains the response from method DeploymentsClient.Delete. -type DeploymentsClientDeleteResponse struct { - // placeholder for future response values -} - -// DeploymentsClientGenerateHeapDumpResponse contains the response from method DeploymentsClient.GenerateHeapDump. -type DeploymentsClientGenerateHeapDumpResponse struct { - // placeholder for future response values -} - -// DeploymentsClientGenerateThreadDumpResponse contains the response from method DeploymentsClient.GenerateThreadDump. -type DeploymentsClientGenerateThreadDumpResponse struct { - // placeholder for future response values -} - -// DeploymentsClientGetLogFileURLResponse contains the response from method DeploymentsClient.GetLogFileURL. -type DeploymentsClientGetLogFileURLResponse struct { - LogFileURLResponse -} - -// DeploymentsClientGetResponse contains the response from method DeploymentsClient.Get. -type DeploymentsClientGetResponse struct { - DeploymentResource -} - -// DeploymentsClientListForClusterResponse contains the response from method DeploymentsClient.ListForCluster. -type DeploymentsClientListForClusterResponse struct { - DeploymentResourceCollection -} - -// DeploymentsClientListResponse contains the response from method DeploymentsClient.List. -type DeploymentsClientListResponse struct { - DeploymentResourceCollection -} - -// DeploymentsClientRestartResponse contains the response from method DeploymentsClient.Restart. -type DeploymentsClientRestartResponse struct { - // placeholder for future response values -} - -// DeploymentsClientStartJFRResponse contains the response from method DeploymentsClient.StartJFR. -type DeploymentsClientStartJFRResponse struct { - // placeholder for future response values -} - -// DeploymentsClientStartResponse contains the response from method DeploymentsClient.Start. -type DeploymentsClientStartResponse struct { - // placeholder for future response values -} - -// DeploymentsClientStopResponse contains the response from method DeploymentsClient.Stop. -type DeploymentsClientStopResponse struct { - // placeholder for future response values -} - -// DeploymentsClientUpdateResponse contains the response from method DeploymentsClient.Update. -type DeploymentsClientUpdateResponse struct { - DeploymentResource -} - -// GatewayCustomDomainsClientCreateOrUpdateResponse contains the response from method GatewayCustomDomainsClient.CreateOrUpdate. -type GatewayCustomDomainsClientCreateOrUpdateResponse struct { - GatewayCustomDomainResource -} - -// GatewayCustomDomainsClientDeleteResponse contains the response from method GatewayCustomDomainsClient.Delete. -type GatewayCustomDomainsClientDeleteResponse struct { - // placeholder for future response values -} - -// GatewayCustomDomainsClientGetResponse contains the response from method GatewayCustomDomainsClient.Get. -type GatewayCustomDomainsClientGetResponse struct { - GatewayCustomDomainResource -} - -// GatewayCustomDomainsClientListResponse contains the response from method GatewayCustomDomainsClient.List. -type GatewayCustomDomainsClientListResponse struct { - GatewayCustomDomainResourceCollection -} - -// GatewayRouteConfigsClientCreateOrUpdateResponse contains the response from method GatewayRouteConfigsClient.CreateOrUpdate. -type GatewayRouteConfigsClientCreateOrUpdateResponse struct { - GatewayRouteConfigResource -} - -// GatewayRouteConfigsClientDeleteResponse contains the response from method GatewayRouteConfigsClient.Delete. -type GatewayRouteConfigsClientDeleteResponse struct { - // placeholder for future response values -} - -// GatewayRouteConfigsClientGetResponse contains the response from method GatewayRouteConfigsClient.Get. -type GatewayRouteConfigsClientGetResponse struct { - GatewayRouteConfigResource -} - -// GatewayRouteConfigsClientListResponse contains the response from method GatewayRouteConfigsClient.List. -type GatewayRouteConfigsClientListResponse struct { - GatewayRouteConfigResourceCollection -} - -// GatewaysClientCreateOrUpdateResponse contains the response from method GatewaysClient.CreateOrUpdate. -type GatewaysClientCreateOrUpdateResponse struct { - GatewayResource -} - -// GatewaysClientDeleteResponse contains the response from method GatewaysClient.Delete. -type GatewaysClientDeleteResponse struct { - // placeholder for future response values -} - -// GatewaysClientGetResponse contains the response from method GatewaysClient.Get. -type GatewaysClientGetResponse struct { - GatewayResource -} - -// GatewaysClientListResponse contains the response from method GatewaysClient.List. -type GatewaysClientListResponse struct { - GatewayResourceCollection -} - -// GatewaysClientValidateDomainResponse contains the response from method GatewaysClient.ValidateDomain. -type GatewaysClientValidateDomainResponse struct { - CustomDomainValidateResult -} - -// MonitoringSettingsClientGetResponse contains the response from method MonitoringSettingsClient.Get. -type MonitoringSettingsClientGetResponse struct { - MonitoringSettingResource -} - -// MonitoringSettingsClientUpdatePatchResponse contains the response from method MonitoringSettingsClient.UpdatePatch. -type MonitoringSettingsClientUpdatePatchResponse struct { - MonitoringSettingResource -} - -// MonitoringSettingsClientUpdatePutResponse contains the response from method MonitoringSettingsClient.UpdatePut. -type MonitoringSettingsClientUpdatePutResponse struct { - MonitoringSettingResource -} - -// OperationsClientListResponse contains the response from method OperationsClient.List. -type OperationsClientListResponse struct { - AvailableOperations -} - -// RuntimeVersionsClientListRuntimeVersionsResponse contains the response from method RuntimeVersionsClient.ListRuntimeVersions. -type RuntimeVersionsClientListRuntimeVersionsResponse struct { - AvailableRuntimeVersions -} - -// SKUsClientListResponse contains the response from method SKUsClient.List. -type SKUsClientListResponse struct { - ResourceSKUCollection -} - -// ServiceRegistriesClientCreateOrUpdateResponse contains the response from method ServiceRegistriesClient.CreateOrUpdate. -type ServiceRegistriesClientCreateOrUpdateResponse struct { - ServiceRegistryResource -} - -// ServiceRegistriesClientDeleteResponse contains the response from method ServiceRegistriesClient.Delete. -type ServiceRegistriesClientDeleteResponse struct { - // placeholder for future response values -} - -// ServiceRegistriesClientGetResponse contains the response from method ServiceRegistriesClient.Get. -type ServiceRegistriesClientGetResponse struct { - ServiceRegistryResource -} - -// ServiceRegistriesClientListResponse contains the response from method ServiceRegistriesClient.List. -type ServiceRegistriesClientListResponse struct { - ServiceRegistryResourceCollection -} - -// ServicesClientCheckNameAvailabilityResponse contains the response from method ServicesClient.CheckNameAvailability. -type ServicesClientCheckNameAvailabilityResponse struct { - NameAvailability -} - -// ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.CreateOrUpdate. -type ServicesClientCreateOrUpdateResponse struct { - ServiceResource -} - -// ServicesClientDeleteResponse contains the response from method ServicesClient.Delete. -type ServicesClientDeleteResponse struct { - // placeholder for future response values -} - -// ServicesClientDisableTestEndpointResponse contains the response from method ServicesClient.DisableTestEndpoint. -type ServicesClientDisableTestEndpointResponse struct { - // placeholder for future response values -} - -// ServicesClientEnableTestEndpointResponse contains the response from method ServicesClient.EnableTestEndpoint. -type ServicesClientEnableTestEndpointResponse struct { - TestKeys -} - -// ServicesClientGetResponse contains the response from method ServicesClient.Get. -type ServicesClientGetResponse struct { - ServiceResource -} - -// ServicesClientListBySubscriptionResponse contains the response from method ServicesClient.ListBySubscription. -type ServicesClientListBySubscriptionResponse struct { - ServiceResourceList -} - -// ServicesClientListResponse contains the response from method ServicesClient.List. -type ServicesClientListResponse struct { - ServiceResourceList -} - -// ServicesClientListTestKeysResponse contains the response from method ServicesClient.ListTestKeys. -type ServicesClientListTestKeysResponse struct { - TestKeys -} - -// ServicesClientRegenerateTestKeyResponse contains the response from method ServicesClient.RegenerateTestKey. -type ServicesClientRegenerateTestKeyResponse struct { - TestKeys -} - -// ServicesClientStartResponse contains the response from method ServicesClient.Start. -type ServicesClientStartResponse struct { - // placeholder for future response values -} - -// ServicesClientStopResponse contains the response from method ServicesClient.Stop. -type ServicesClientStopResponse struct { - // placeholder for future response values -} - -// ServicesClientUpdateResponse contains the response from method ServicesClient.Update. -type ServicesClientUpdateResponse struct { - ServiceResource -} - -// StoragesClientCreateOrUpdateResponse contains the response from method StoragesClient.CreateOrUpdate. -type StoragesClientCreateOrUpdateResponse struct { - StorageResource -} - -// StoragesClientDeleteResponse contains the response from method StoragesClient.Delete. -type StoragesClientDeleteResponse struct { - // placeholder for future response values -} - -// StoragesClientGetResponse contains the response from method StoragesClient.Get. -type StoragesClientGetResponse struct { - StorageResource -} - -// StoragesClientListResponse contains the response from method StoragesClient.List. -type StoragesClientListResponse struct { - StorageResourceCollection -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_runtimeversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_runtimeversions_client.go deleted file mode 100644 index 9913f18f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_runtimeversions_client.go +++ /dev/null @@ -1,92 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// RuntimeVersionsClient contains the methods for the RuntimeVersions group. -// Don't use this type directly, use NewRuntimeVersionsClient() instead. -type RuntimeVersionsClient struct { - host string - pl runtime.Pipeline -} - -// NewRuntimeVersionsClient creates a new instance of RuntimeVersionsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRuntimeVersionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RuntimeVersionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RuntimeVersionsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// ListRuntimeVersions - Lists all of the available runtime versions supported by Microsoft.AppPlatform provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// options - RuntimeVersionsClientListRuntimeVersionsOptions contains the optional parameters for the RuntimeVersionsClient.ListRuntimeVersions -// method. -func (client *RuntimeVersionsClient) ListRuntimeVersions(ctx context.Context, options *RuntimeVersionsClientListRuntimeVersionsOptions) (RuntimeVersionsClientListRuntimeVersionsResponse, error) { - req, err := client.listRuntimeVersionsCreateRequest(ctx, options) - if err != nil { - return RuntimeVersionsClientListRuntimeVersionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RuntimeVersionsClientListRuntimeVersionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RuntimeVersionsClientListRuntimeVersionsResponse{}, runtime.NewResponseError(resp) - } - return client.listRuntimeVersionsHandleResponse(resp) -} - -// listRuntimeVersionsCreateRequest creates the ListRuntimeVersions request. -func (client *RuntimeVersionsClient) listRuntimeVersionsCreateRequest(ctx context.Context, options *RuntimeVersionsClientListRuntimeVersionsOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.AppPlatform/runtimeVersions" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listRuntimeVersionsHandleResponse handles the ListRuntimeVersions response. -func (client *RuntimeVersionsClient) listRuntimeVersionsHandleResponse(resp *http.Response) (RuntimeVersionsClientListRuntimeVersionsResponse, error) { - result := RuntimeVersionsClientListRuntimeVersionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AvailableRuntimeVersions); err != nil { - return RuntimeVersionsClientListRuntimeVersionsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_serviceregistries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_serviceregistries_client.go deleted file mode 100644 index dde74ec9..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_serviceregistries_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ServiceRegistriesClient contains the methods for the ServiceRegistries group. -// Don't use this type directly, use NewServiceRegistriesClient() instead. -type ServiceRegistriesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewServiceRegistriesClient creates a new instance of ServiceRegistriesClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewServiceRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceRegistriesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ServiceRegistriesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create the default Service Registry or update the existing Service Registry. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// serviceRegistryName - The name of Service Registry. -// options - ServiceRegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceRegistriesClient.BeginCreateOrUpdate -// method. -func (client *ServiceRegistriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceRegistriesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, serviceRegistryName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServiceRegistriesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ServiceRegistriesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create the default Service Registry or update the existing Service Registry. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ServiceRegistriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ServiceRegistriesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if serviceRegistryName == "" { - return nil, errors.New("parameter serviceRegistryName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceRegistryName}", url.PathEscape(serviceRegistryName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDelete - Disable the default Service Registry. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// serviceRegistryName - The name of Service Registry. -// options - ServiceRegistriesClientBeginDeleteOptions contains the optional parameters for the ServiceRegistriesClient.BeginDelete -// method. -func (client *ServiceRegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*runtime.Poller[ServiceRegistriesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, serviceRegistryName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServiceRegistriesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ServiceRegistriesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Disable the default Service Registry. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ServiceRegistriesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ServiceRegistriesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if serviceRegistryName == "" { - return nil, errors.New("parameter serviceRegistryName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceRegistryName}", url.PathEscape(serviceRegistryName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the Service Registry and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// serviceRegistryName - The name of Service Registry. -// options - ServiceRegistriesClientGetOptions contains the optional parameters for the ServiceRegistriesClient.Get method. -func (client *ServiceRegistriesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientGetOptions) (ServiceRegistriesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, serviceRegistryName, options) - if err != nil { - return ServiceRegistriesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceRegistriesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceRegistriesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ServiceRegistriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, serviceRegistryName string, options *ServiceRegistriesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/{serviceRegistryName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if serviceRegistryName == "" { - return nil, errors.New("parameter serviceRegistryName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceRegistryName}", url.PathEscape(serviceRegistryName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ServiceRegistriesClient) getHandleResponse(resp *http.Response) (ServiceRegistriesClientGetResponse, error) { - result := ServiceRegistriesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceRegistryResource); err != nil { - return ServiceRegistriesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServiceRegistriesClientListOptions contains the optional parameters for the ServiceRegistriesClient.List method. -func (client *ServiceRegistriesClient) NewListPager(resourceGroupName string, serviceName string, options *ServiceRegistriesClientListOptions) *runtime.Pager[ServiceRegistriesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ServiceRegistriesClientListResponse]{ - More: func(page ServiceRegistriesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ServiceRegistriesClientListResponse) (ServiceRegistriesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServiceRegistriesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceRegistriesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceRegistriesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ServiceRegistriesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServiceRegistriesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ServiceRegistriesClient) listHandleResponse(resp *http.Response) (ServiceRegistriesClientListResponse, error) { - result := ServiceRegistriesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceRegistryResourceCollection); err != nil { - return ServiceRegistriesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_services_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_services_client.go deleted file mode 100644 index 06543a3f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_services_client.go +++ /dev/null @@ -1,842 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ServicesClient contains the methods for the Services group. -// Don't use this type directly, use NewServicesClient() instead. -type ServicesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewServicesClient creates a new instance of ServicesClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ServicesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CheckNameAvailability - Checks that the resource name is valid and is not already in use. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// location - the region -// availabilityParameters - Parameters supplied to the operation. -// options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability -// method. -func (client *ServicesClient) CheckNameAvailability(ctx context.Context, location string, availabilityParameters NameAvailabilityParameters, options *ServicesClientCheckNameAvailabilityOptions) (ServicesClientCheckNameAvailabilityResponse, error) { - req, err := client.checkNameAvailabilityCreateRequest(ctx, location, availabilityParameters, options) - if err != nil { - return ServicesClientCheckNameAvailabilityResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServicesClientCheckNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServicesClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkNameAvailabilityHandleResponse(resp) -} - -// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *ServicesClient) checkNameAvailabilityCreateRequest(ctx context.Context, location string, availabilityParameters NameAvailabilityParameters, options *ServicesClientCheckNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/locations/{location}/checkNameAvailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, availabilityParameters) -} - -// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. -func (client *ServicesClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ServicesClientCheckNameAvailabilityResponse, error) { - result := ServicesClientCheckNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NameAvailability); err != nil { - return ServicesClientCheckNameAvailabilityResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdate - Create a new Service or update an exiting Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// resource - Parameters for the create or update operation -// options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate -// method. -func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServicesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, resource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServicesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ServicesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create a new Service or update an exiting Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, resource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ServicesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) -} - -// BeginDelete - Operation to delete a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method. -func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*runtime.Poller[ServicesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServicesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ServicesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Operation to delete a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ServicesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DisableTestEndpoint - Disable test endpoint functionality for a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientDisableTestEndpointOptions contains the optional parameters for the ServicesClient.DisableTestEndpoint -// method. -func (client *ServicesClient) DisableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientDisableTestEndpointOptions) (ServicesClientDisableTestEndpointResponse, error) { - req, err := client.disableTestEndpointCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return ServicesClientDisableTestEndpointResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServicesClientDisableTestEndpointResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServicesClientDisableTestEndpointResponse{}, runtime.NewResponseError(resp) - } - return ServicesClientDisableTestEndpointResponse{}, nil -} - -// disableTestEndpointCreateRequest creates the DisableTestEndpoint request. -func (client *ServicesClient) disableTestEndpointCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientDisableTestEndpointOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/disableTestEndpoint" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// EnableTestEndpoint - Enable test endpoint functionality for a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientEnableTestEndpointOptions contains the optional parameters for the ServicesClient.EnableTestEndpoint -// method. -func (client *ServicesClient) EnableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientEnableTestEndpointOptions) (ServicesClientEnableTestEndpointResponse, error) { - req, err := client.enableTestEndpointCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return ServicesClientEnableTestEndpointResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServicesClientEnableTestEndpointResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServicesClientEnableTestEndpointResponse{}, runtime.NewResponseError(resp) - } - return client.enableTestEndpointHandleResponse(resp) -} - -// enableTestEndpointCreateRequest creates the EnableTestEndpoint request. -func (client *ServicesClient) enableTestEndpointCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientEnableTestEndpointOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/enableTestEndpoint" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// enableTestEndpointHandleResponse handles the EnableTestEndpoint response. -func (client *ServicesClient) enableTestEndpointHandleResponse(resp *http.Response) (ServicesClientEnableTestEndpointResponse, error) { - result := ServicesClientEnableTestEndpointResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TestKeys); err != nil { - return ServicesClientEnableTestEndpointResponse{}, err - } - return result, nil -} - -// Get - Get a Service and its properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method. -func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return ServicesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServicesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServicesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ServicesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ServicesClient) getHandleResponse(resp *http.Response) (ServicesClientGetResponse, error) { - result := ServicesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceResource); err != nil { - return ServicesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Handles requests to list all resources in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// options - ServicesClientListOptions contains the optional parameters for the ServicesClient.List method. -func (client *ServicesClient) NewListPager(resourceGroupName string, options *ServicesClientListOptions) *runtime.Pager[ServicesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ServicesClientListResponse]{ - More: func(page ServicesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ServicesClientListResponse) (ServicesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServicesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServicesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServicesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ServicesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ServicesClient) listHandleResponse(resp *http.Response) (ServicesClientListResponse, error) { - result := ServicesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceResourceList); err != nil { - return ServicesClientListResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Handles requests to list all resources in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription -// method. -func (client *ServicesClient) NewListBySubscriptionPager(options *ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[ServicesClientListBySubscriptionResponse]{ - More: func(page ServicesClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ServicesClientListBySubscriptionResponse) (ServicesClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServicesClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServicesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServicesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ServicesClient) listBySubscriptionCreateRequest(ctx context.Context, options *ServicesClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *ServicesClient) listBySubscriptionHandleResponse(resp *http.Response) (ServicesClientListBySubscriptionResponse, error) { - result := ServicesClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceResourceList); err != nil { - return ServicesClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// ListTestKeys - List test keys for a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientListTestKeysOptions contains the optional parameters for the ServicesClient.ListTestKeys method. -func (client *ServicesClient) ListTestKeys(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListTestKeysOptions) (ServicesClientListTestKeysResponse, error) { - req, err := client.listTestKeysCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return ServicesClientListTestKeysResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServicesClientListTestKeysResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServicesClientListTestKeysResponse{}, runtime.NewResponseError(resp) - } - return client.listTestKeysHandleResponse(resp) -} - -// listTestKeysCreateRequest creates the ListTestKeys request. -func (client *ServicesClient) listTestKeysCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientListTestKeysOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listTestKeys" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listTestKeysHandleResponse handles the ListTestKeys response. -func (client *ServicesClient) listTestKeysHandleResponse(resp *http.Response) (ServicesClientListTestKeysResponse, error) { - result := ServicesClientListTestKeysResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TestKeys); err != nil { - return ServicesClientListTestKeysResponse{}, err - } - return result, nil -} - -// RegenerateTestKey - Regenerate a test key for a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// regenerateTestKeyRequest - Parameters for the operation -// options - ServicesClientRegenerateTestKeyOptions contains the optional parameters for the ServicesClient.RegenerateTestKey -// method. -func (client *ServicesClient) RegenerateTestKey(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest RegenerateTestKeyRequestPayload, options *ServicesClientRegenerateTestKeyOptions) (ServicesClientRegenerateTestKeyResponse, error) { - req, err := client.regenerateTestKeyCreateRequest(ctx, resourceGroupName, serviceName, regenerateTestKeyRequest, options) - if err != nil { - return ServicesClientRegenerateTestKeyResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServicesClientRegenerateTestKeyResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServicesClientRegenerateTestKeyResponse{}, runtime.NewResponseError(resp) - } - return client.regenerateTestKeyHandleResponse(resp) -} - -// regenerateTestKeyCreateRequest creates the RegenerateTestKey request. -func (client *ServicesClient) regenerateTestKeyCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest RegenerateTestKeyRequestPayload, options *ServicesClientRegenerateTestKeyOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/regenerateTestKey" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, regenerateTestKeyRequest) -} - -// regenerateTestKeyHandleResponse handles the RegenerateTestKey response. -func (client *ServicesClient) regenerateTestKeyHandleResponse(resp *http.Response) (ServicesClientRegenerateTestKeyResponse, error) { - result := ServicesClientRegenerateTestKeyResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TestKeys); err != nil { - return ServicesClientRegenerateTestKeyResponse{}, err - } - return result, nil -} - -// BeginStart - Start a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientBeginStartOptions contains the optional parameters for the ServicesClient.BeginStart method. -func (client *ServicesClient) BeginStart(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*runtime.Poller[ServicesClientStartResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.start(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServicesClientStartResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ServicesClientStartResponse](options.ResumeToken, client.pl, nil) - } -} - -// Start - Start a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ServicesClient) start(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*http.Response, error) { - req, err := client.startCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startCreateRequest creates the Start request. -func (client *ServicesClient) startCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/start" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStop - Stop a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - ServicesClientBeginStopOptions contains the optional parameters for the ServicesClient.BeginStop method. -func (client *ServicesClient) BeginStop(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*runtime.Poller[ServicesClientStopResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stop(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServicesClientStopResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ServicesClientStopResponse](options.ResumeToken, client.pl, nil) - } -} - -// Stop - Stop a Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ServicesClient) stop(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*http.Response, error) { - req, err := client.stopCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopCreateRequest creates the Stop request. -func (client *ServicesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *ServicesClientBeginStopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/stop" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginUpdate - Operation to update an exiting Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// resource - Parameters for the update operation -// options - ServicesClientBeginUpdateOptions contains the optional parameters for the ServicesClient.BeginUpdate method. -func (client *ServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*runtime.Poller[ServicesClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, serviceName, resource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServicesClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ServicesClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Operation to update an exiting Service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *ServicesClient) update(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, serviceName, resource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ServicesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource, options *ServicesClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resource) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_skus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_skus_client.go deleted file mode 100644 index 1da211f2..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_skus_client.go +++ /dev/null @@ -1,115 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SKUsClient contains the methods for the SKUs group. -// Don't use this type directly, use NewSKUsClient() instead. -type SKUsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSKUsClient creates a new instance of SKUsClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SKUsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists all of the available skus of the Microsoft.AppPlatform provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// options - SKUsClientListOptions contains the optional parameters for the SKUsClient.List method. -func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ - More: func(page SKUsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SKUsClientListResponse) (SKUsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SKUsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SKUsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SKUsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/skus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SKUsClient) listHandleResponse(resp *http.Response) (SKUsClientListResponse, error) { - result := SKUsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceSKUCollection); err != nil { - return SKUsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_storages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_storages_client.go deleted file mode 100644 index da139c7d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_storages_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// StoragesClient contains the methods for the Storages group. -// Don't use this type directly, use NewStoragesClient() instead. -type StoragesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewStoragesClient creates a new instance of StoragesClient with the specified values. -// subscriptionID - Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewStoragesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StoragesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &StoragesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update storage resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// storageName - The name of the storage resource. -// storageResource - Parameters for the create or update operation -// options - StoragesClientBeginCreateOrUpdateOptions contains the optional parameters for the StoragesClient.BeginCreateOrUpdate -// method. -func (client *StoragesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*runtime.Poller[StoragesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, storageName, storageResource, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[StoragesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[StoragesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update storage resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *StoragesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, storageName, storageResource, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *StoragesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, storageName string, storageResource StorageResource, options *StoragesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if storageName == "" { - return nil, errors.New("parameter storageName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, storageResource) -} - -// BeginDelete - Delete the storage resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// storageName - The name of the storage resource. -// options - StoragesClientBeginDeleteOptions contains the optional parameters for the StoragesClient.BeginDelete method. -func (client *StoragesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*runtime.Poller[StoragesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, storageName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[StoragesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[StoragesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the storage resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -func (client *StoragesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, storageName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *StoragesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if storageName == "" { - return nil, errors.New("parameter storageName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the storage resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// storageName - The name of the storage resource. -// options - StoragesClientGetOptions contains the optional parameters for the StoragesClient.Get method. -func (client *StoragesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientGetOptions) (StoragesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, storageName, options) - if err != nil { - return StoragesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StoragesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StoragesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *StoragesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, storageName string, options *StoragesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages/{storageName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if storageName == "" { - return nil, errors.New("parameter storageName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageName}", url.PathEscape(storageName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *StoragesClient) getHandleResponse(resp *http.Response) (StoragesClientGetResponse, error) { - result := StoragesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageResource); err != nil { - return StoragesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all the storages of one Azure Spring Apps resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01-preview -// resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure -// Resource Manager API or the portal. -// serviceName - The name of the Service resource. -// options - StoragesClientListOptions contains the optional parameters for the StoragesClient.List method. -func (client *StoragesClient) NewListPager(resourceGroupName string, serviceName string, options *StoragesClientListOptions) *runtime.Pager[StoragesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[StoragesClientListResponse]{ - More: func(page StoragesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StoragesClientListResponse) (StoragesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StoragesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StoragesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StoragesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *StoragesClient) listCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *StoragesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/storages" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *StoragesClient) listHandleResponse(resp *http.Response) (StoragesClientListResponse, error) { - result := StoragesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageResourceCollection); err != nil { - return StoragesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_time_rfc3339.go deleted file mode 100644 index caef2c41..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/zz_generated_time_rfc3339.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappplatform - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md deleted file mode 100644 index f4f4c54d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md +++ /dev/null @@ -1,12065 +0,0 @@ -# Release History - -## 1.0.0 (2022-05-16) -### Breaking Changes - -- Function `*WebAppsClient.BeginCreateInstanceMSDeployOperation` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientCreateInstanceMSDeployOperationResponse], error)` to `(*runtime.Poller[WebAppsClientCreateInstanceMSDeployOperationResponse], error)` -- Function `*StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse], error)` to `(*runtime.Poller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse], error)` -- Function `*StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse], error)` to `(*runtime.Poller[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse], error)` -- Function `*WebAppsClient.BeginCreateOrUpdateSourceControl` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientCreateOrUpdateSourceControlResponse], error)` to `(*runtime.Poller[WebAppsClientCreateOrUpdateSourceControlResponse], error)` -- Function `*WebAppsClient.BeginStartNetworkTraceSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientStartNetworkTraceSlotResponse], error)` to `(*runtime.Poller[WebAppsClientStartNetworkTraceSlotResponse], error)` -- Function `*WebAppsClient.BeginRestore` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientRestoreResponse], error)` to `(*runtime.Poller[WebAppsClientRestoreResponse], error)` -- Function `*WebAppsClient.BeginMigrateMySQL` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientMigrateMySQLResponse], error)` to `(*runtime.Poller[WebAppsClientMigrateMySQLResponse], error)` -- Function `*EnvironmentsClient.BeginCreateOrUpdateMultiRolePool` return value(s) have been changed from `(*armruntime.Poller[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse], error)` to `(*runtime.Poller[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse], error)` -- Function `*WebAppsClient.BeginInstallSiteExtension` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientInstallSiteExtensionResponse], error)` to `(*runtime.Poller[WebAppsClientInstallSiteExtensionResponse], error)` -- Function `*ContainerAppsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ContainerAppsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ContainerAppsClientCreateOrUpdateResponse], error)` -- Function `*WebAppsClient.BeginCreateMSDeployOperation` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientCreateMSDeployOperationResponse], error)` to `(*runtime.Poller[WebAppsClientCreateMSDeployOperationResponse], error)` -- Function `*WebAppsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[WebAppsClientCreateOrUpdateResponse], error)` -- Function `*EnvironmentsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[EnvironmentsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[EnvironmentsClientCreateOrUpdateResponse], error)` -- Function `*WebAppsClient.BeginRestoreSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientRestoreSlotResponse], error)` to `(*runtime.Poller[WebAppsClientRestoreSlotResponse], error)` -- Function `*EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection` return value(s) have been changed from `(*armruntime.Poller[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse], error)` to `(*runtime.Poller[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse], error)` -- Function `*WebAppsClient.BeginRestoreFromDeletedApp` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientRestoreFromDeletedAppResponse], error)` to `(*runtime.Poller[WebAppsClientRestoreFromDeletedAppResponse], error)` -- Function `*ContainerAppsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ContainerAppsClientDeleteResponse], error)` to `(*runtime.Poller[ContainerAppsClientDeleteResponse], error)` -- Function `*StaticSitesClient.BeginCreateOrUpdateStaticSite` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientCreateOrUpdateStaticSiteResponse], error)` to `(*runtime.Poller[StaticSitesClientCreateOrUpdateStaticSiteResponse], error)` -- Function `*WebAppsClient.BeginSwapSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientSwapSlotResponse], error)` to `(*runtime.Poller[WebAppsClientSwapSlotResponse], error)` -- Function `*WebAppsClient.BeginSwapSlotWithProduction` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientSwapSlotWithProductionResponse], error)` to `(*runtime.Poller[WebAppsClientSwapSlotWithProductionResponse], error)` -- Function `*KubeEnvironmentsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[KubeEnvironmentsClientDeleteResponse], error)` to `(*runtime.Poller[KubeEnvironmentsClientDeleteResponse], error)` -- Function `*WebAppsClient.BeginDeletePrivateEndpointConnection` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientDeletePrivateEndpointConnectionResponse], error)` to `(*runtime.Poller[WebAppsClientDeletePrivateEndpointConnectionResponse], error)` -- Function `*StaticSitesClient.BeginDeletePrivateEndpointConnection` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientDeletePrivateEndpointConnectionResponse], error)` to `(*runtime.Poller[StaticSitesClientDeletePrivateEndpointConnectionResponse], error)` -- Function `*WebAppsClient.BeginRestoreFromDeletedAppSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientRestoreFromDeletedAppSlotResponse], error)` to `(*runtime.Poller[WebAppsClientRestoreFromDeletedAppSlotResponse], error)` -- Function `*WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse], error)` to `(*runtime.Poller[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse], error)` -- Function `*CertificateOrdersClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[CertificateOrdersClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[CertificateOrdersClientCreateOrUpdateResponse], error)` -- Function `*WebAppsClient.BeginCreateOrUpdateSourceControlSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientCreateOrUpdateSourceControlSlotResponse], error)` to `(*runtime.Poller[WebAppsClientCreateOrUpdateSourceControlSlotResponse], error)` -- Function `*StaticSitesClient.BeginDeleteStaticSite` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientDeleteStaticSiteResponse], error)` to `(*runtime.Poller[StaticSitesClientDeleteStaticSiteResponse], error)` -- Function `*WebAppsClient.BeginCreateMSDeployOperationSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientCreateMSDeployOperationSlotResponse], error)` to `(*runtime.Poller[WebAppsClientCreateMSDeployOperationSlotResponse], error)` -- Function `*WebAppsClient.BeginStartWebSiteNetworkTraceOperation` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientStartWebSiteNetworkTraceOperationResponse], error)` to `(*runtime.Poller[WebAppsClientStartWebSiteNetworkTraceOperationResponse], error)` -- Function `*WebAppsClient.BeginStartNetworkTrace` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientStartNetworkTraceResponse], error)` to `(*runtime.Poller[WebAppsClientStartNetworkTraceResponse], error)` -- Function `*WebAppsClient.BeginRestoreSnapshot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientRestoreSnapshotResponse], error)` to `(*runtime.Poller[WebAppsClientRestoreSnapshotResponse], error)` -- Function `*WebAppsClient.BeginCreateInstanceMSDeployOperationSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientCreateInstanceMSDeployOperationSlotResponse], error)` to `(*runtime.Poller[WebAppsClientCreateInstanceMSDeployOperationSlotResponse], error)` -- Function `*DomainsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[DomainsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[DomainsClientCreateOrUpdateResponse], error)` -- Function `*WebAppsClient.BeginInstallSiteExtensionSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientInstallSiteExtensionSlotResponse], error)` to `(*runtime.Poller[WebAppsClientInstallSiteExtensionSlotResponse], error)` -- Function `*StaticSitesClient.BeginCreateZipDeploymentForStaticSite` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientCreateZipDeploymentForStaticSiteResponse], error)` to `(*runtime.Poller[StaticSitesClientCreateZipDeploymentForStaticSiteResponse], error)` -- Function `*StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse], error)` to `(*runtime.Poller[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse], error)` -- Function `*EnvironmentsClient.BeginChangeVnet` return value(s) have been changed from `(*armruntime.Poller[*runtime.Pager[EnvironmentsClientChangeVnetResponse]], error)` to `(*runtime.Poller[*runtime.Pager[EnvironmentsClientChangeVnetResponse]], error)` -- Function `*StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse], error)` to `(*runtime.Poller[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse], error)` -- Function `*StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse], error)` to `(*runtime.Poller[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse], error)` -- Function `*StaticSitesClient.BeginDeleteStaticSiteCustomDomain` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientDeleteStaticSiteCustomDomainResponse], error)` to `(*runtime.Poller[StaticSitesClientDeleteStaticSiteCustomDomainResponse], error)` -- Function `*KubeEnvironmentsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[KubeEnvironmentsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[KubeEnvironmentsClientCreateOrUpdateResponse], error)` -- Function `*WebAppsClient.BeginRestoreFromBackupBlob` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientRestoreFromBackupBlobResponse], error)` to `(*runtime.Poller[WebAppsClientRestoreFromBackupBlobResponse], error)` -- Function `*WebAppsClient.BeginRestoreSnapshotSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientRestoreSnapshotSlotResponse], error)` to `(*runtime.Poller[WebAppsClientRestoreSnapshotSlotResponse], error)` -- Function `*WebAppsClient.BeginCreateOrUpdateSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientCreateOrUpdateSlotResponse], error)` to `(*runtime.Poller[WebAppsClientCreateOrUpdateSlotResponse], error)` -- Function `*EnvironmentsClient.BeginCreateOrUpdateWorkerPool` return value(s) have been changed from `(*armruntime.Poller[EnvironmentsClientCreateOrUpdateWorkerPoolResponse], error)` to `(*runtime.Poller[EnvironmentsClientCreateOrUpdateWorkerPoolResponse], error)` -- Function `*WebAppsClient.BeginListPublishingCredentialsSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientListPublishingCredentialsSlotResponse], error)` to `(*runtime.Poller[WebAppsClientListPublishingCredentialsSlotResponse], error)` -- Function `*WebAppsClient.BeginCreateInstanceFunctionSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientCreateInstanceFunctionSlotResponse], error)` to `(*runtime.Poller[WebAppsClientCreateInstanceFunctionSlotResponse], error)` -- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse], error)` to `(*runtime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse], error)` -- Function `*EnvironmentsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[EnvironmentsClientDeleteResponse], error)` to `(*runtime.Poller[EnvironmentsClientDeleteResponse], error)` -- Function `*CertificateOrdersClient.BeginCreateOrUpdateCertificate` return value(s) have been changed from `(*armruntime.Poller[CertificateOrdersClientCreateOrUpdateCertificateResponse], error)` to `(*runtime.Poller[CertificateOrdersClientCreateOrUpdateCertificateResponse], error)` -- Function `*PlansClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[PlansClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[PlansClientCreateOrUpdateResponse], error)` -- Function `*EnvironmentsClient.BeginDeletePrivateEndpointConnection` return value(s) have been changed from `(*armruntime.Poller[EnvironmentsClientDeletePrivateEndpointConnectionResponse], error)` to `(*runtime.Poller[EnvironmentsClientDeletePrivateEndpointConnectionResponse], error)` -- Function `*WebAppsClient.BeginDeletePrivateEndpointConnectionSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientDeletePrivateEndpointConnectionSlotResponse], error)` to `(*runtime.Poller[WebAppsClientDeletePrivateEndpointConnectionSlotResponse], error)` -- Function `*EnvironmentsClient.BeginResume` return value(s) have been changed from `(*armruntime.Poller[*runtime.Pager[EnvironmentsClientResumeResponse]], error)` to `(*runtime.Poller[*runtime.Pager[EnvironmentsClientResumeResponse]], error)` -- Function `*WebAppsClient.BeginMigrateStorage` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientMigrateStorageResponse], error)` to `(*runtime.Poller[WebAppsClientMigrateStorageResponse], error)` -- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse], error)` to `(*runtime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse], error)` -- Function `*StaticSitesClient.BeginDetachStaticSite` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientDetachStaticSiteResponse], error)` to `(*runtime.Poller[StaticSitesClientDetachStaticSiteResponse], error)` -- Function `*StaticSitesClient.BeginDeleteStaticSiteBuild` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientDeleteStaticSiteBuildResponse], error)` to `(*runtime.Poller[StaticSitesClientDeleteStaticSiteBuildResponse], error)` -- Function `*WebAppsClient.BeginRestoreFromBackupBlobSlot` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientRestoreFromBackupBlobSlotResponse], error)` to `(*runtime.Poller[WebAppsClientRestoreFromBackupBlobSlotResponse], error)` -- Function `*EnvironmentsClient.BeginSuspend` return value(s) have been changed from `(*armruntime.Poller[*runtime.Pager[EnvironmentsClientSuspendResponse]], error)` to `(*runtime.Poller[*runtime.Pager[EnvironmentsClientSuspendResponse]], error)` -- Function `*WebAppsClient.BeginListPublishingCredentials` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientListPublishingCredentialsResponse], error)` to `(*runtime.Poller[WebAppsClientListPublishingCredentialsResponse], error)` -- Function `*StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild` return value(s) have been changed from `(*armruntime.Poller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse], error)` to `(*runtime.Poller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse], error)` -- Function `*WebAppsClient.BeginCreateFunction` return value(s) have been changed from `(*armruntime.Poller[WebAppsClientCreateFunctionResponse], error)` to `(*runtime.Poller[WebAppsClientCreateFunctionResponse], error)` -- Function `RevisionCollection.MarshalJSON` has been removed -- Function `ContainerAppCollection.MarshalJSON` has been removed -- Function `StaticSiteUserProvidedFunctionAppsCollection.MarshalJSON` has been removed -- Function `PlanCollection.MarshalJSON` has been removed -- Function `PerfMonSet.MarshalJSON` has been removed -- Function `FunctionEnvelopeCollection.MarshalJSON` has been removed -- Function `ResourceMetricDefinitionCollection.MarshalJSON` has been removed -- Function `HybridConnectionCollection.MarshalJSON` has been removed -- Function `PerfMonCounterCollection.MarshalJSON` has been removed -- Function `InboundEnvironmentEndpointCollection.MarshalJSON` has been removed -- Function `StaticSiteCollection.MarshalJSON` has been removed -- Function `ProcessThreadInfoCollection.MarshalJSON` has been removed -- Function `ProcessInfoCollection.MarshalJSON` has been removed -- Function `DomainOwnershipIdentifierCollection.MarshalJSON` has been removed -- Function `ProcessModuleInfoCollection.MarshalJSON` has been removed -- Function `APIKVReferenceCollection.MarshalJSON` has been removed -- Function `GlobalCsmSKUDescription.MarshalJSON` has been removed -- Function `MetricSpecification.MarshalJSON` has been removed -- Function `GeoRegionCollection.MarshalJSON` has been removed -- Function `SiteConfigurationSnapshotInfoCollection.MarshalJSON` has been removed -- Function `ResourceHealthMetadataCollection.MarshalJSON` has been removed -- Function `DiagnosticAnalysisCollection.MarshalJSON` has been removed -- Function `DeletedWebAppCollection.MarshalJSON` has been removed -- Function `ContinuousWebJobCollection.MarshalJSON` has been removed -- Function `SlotDifferenceCollection.MarshalJSON` has been removed -- Function `HostKeys.MarshalJSON` has been removed -- Function `HostNameBindingCollection.MarshalJSON` has been removed -- Function `AppCertificateCollection.MarshalJSON` has been removed -- Function `CertificateCollection.MarshalJSON` has been removed -- Function `DeploymentCollection.MarshalJSON` has been removed -- Function `DomainCollection.MarshalJSON` has been removed -- Function `Operation.MarshalJSON` has been removed -- Function `StaticSiteBuildCollection.MarshalJSON` has been removed -- Function `PrivateEndpointConnectionCollection.MarshalJSON` has been removed -- Function `SKUInfos.MarshalJSON` has been removed -- Function `DiagnosticCategoryCollection.MarshalJSON` has been removed -- Function `StaticSiteCustomDomainOverviewCollection.MarshalJSON` has been removed -- Function `WebAppInstanceStatusCollection.MarshalJSON` has been removed -- Function `CsmUsageQuotaCollection.MarshalJSON` has been removed -- Function `SiteExtensionInfoCollection.MarshalJSON` has been removed -- Function `ResourceCollection.MarshalJSON` has been removed -- Function `SiteConfigResourceCollection.MarshalJSON` has been removed -- Function `EndpointDependency.MarshalJSON` has been removed -- Function `InboundEnvironmentEndpoint.MarshalJSON` has been removed -- Function `SnapshotCollection.MarshalJSON` has been removed -- Function `TriggeredWebJobCollection.MarshalJSON` has been removed -- Function `SourceControlCollection.MarshalJSON` has been removed -- Function `WorkerPoolCollection.MarshalJSON` has been removed -- Function `WebAppStackCollection.MarshalJSON` has been removed -- Function `StampCapacityCollection.MarshalJSON` has been removed -- Function `RecommendationCollection.MarshalJSON` has been removed -- Function `DetectorResponseCollection.MarshalJSON` has been removed -- Function `OutboundEnvironmentEndpoint.MarshalJSON` has been removed -- Function `CustomHostnameSitesCollection.MarshalJSON` has been removed -- Function `PrivateLinkResourcesWrapper.MarshalJSON` has been removed -- Function `PerfMonSample.MarshalJSON` has been removed -- Function `StaticSiteUserCollection.MarshalJSON` has been removed -- Function `TldLegalAgreementCollection.MarshalJSON` has been removed -- Function `PublishingCredentialsPoliciesCollection.MarshalJSON` has been removed -- Function `BackupItemCollection.MarshalJSON` has been removed -- Function `SecretsCollection.MarshalJSON` has been removed -- Function `NameIdentifierCollection.MarshalJSON` has been removed -- Function `ServiceSpecification.MarshalJSON` has been removed -- Function `BillingMeterCollection.MarshalJSON` has been removed -- Function `CertificateOrderCollection.MarshalJSON` has been removed -- Function `KubeEnvironmentCollection.MarshalJSON` has been removed -- Function `StaticSiteFunctionOverviewCollection.MarshalJSON` has been removed -- Function `FunctionAppStackCollection.MarshalJSON` has been removed -- Function `DefaultErrorResponseError.MarshalJSON` has been removed -- Function `ApplicationStackCollection.MarshalJSON` has been removed -- Function `TriggeredJobHistoryCollection.MarshalJSON` has been removed -- Function `CsmOperationCollection.MarshalJSON` has been removed -- Function `DiagnosticDetectorCollection.MarshalJSON` has been removed -- Function `PremierAddOnOfferCollection.MarshalJSON` has been removed -- Function `CsmUsageQuota.MarshalJSON` has been removed -- Function `PrivateLinkResourceProperties.MarshalJSON` has been removed -- Function `TopLevelDomainCollection.MarshalJSON` has been removed -- Function `SKUInfoCollection.MarshalJSON` has been removed -- Function `WebAppCollection.MarshalJSON` has been removed -- Function `EnvironmentCollection.MarshalJSON` has been removed -- Function `OutboundEnvironmentEndpointCollection.MarshalJSON` has been removed -- Function `UsageCollection.MarshalJSON` has been removed -- Function `WebJobCollection.MarshalJSON` has been removed -- Function `SiteCloneability.MarshalJSON` has been removed -- Function `DeploymentLocations.MarshalJSON` has been removed -- Function `PublicCertificateCollection.MarshalJSON` has been removed -- Function `IdentifierCollection.MarshalJSON` has been removed - - -## 0.4.0 (2022-04-15) -### Breaking Changes - -- Function `*DiagnosticsClient.ListSiteAnalysesSlot` has been removed -- Function `*RecommendationsClient.ListHistoryForWebApp` has been removed -- Function `*DeletedWebAppsClient.List` has been removed -- Function `*WebAppsClient.ListSnapshotsSlot` has been removed -- Function `*WebAppsClient.ListInstanceProcessThreads` has been removed -- Function `*DiagnosticsClient.ListSiteDetectors` has been removed -- Function `*StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite` has been removed -- Function `*KubeEnvironmentsClient.ListByResourceGroup` has been removed -- Function `*WebAppsClient.List` has been removed -- Function `*WebAppsClient.ListBasicPublishingCredentialsPolicies` has been removed -- Function `*WebAppsClient.ListSiteExtensions` has been removed -- Function `*EnvironmentsClient.ListMultiRolePools` has been removed -- Function `*WebAppsClient.ListHostNameBindingsSlot` has been removed -- Function `*RecommendationsClient.ListRecommendedRulesForWebApp` has been removed -- Function `*EnvironmentsClient.ListUsages` has been removed -- Function `*WebAppsClient.ListFunctions` has been removed -- Function `*PlansClient.ListByResourceGroup` has been removed -- Function `*EnvironmentsClient.ListWorkerPoolSKUs` has been removed -- Function `*WebAppsClient.ListConfigurationsSlot` has been removed -- Function `*ProviderClient.ListOperations` has been removed -- Function `*WebAppsClient.GetPrivateEndpointConnectionListSlot` has been removed -- Function `*WebAppsClient.ListProcessesSlot` has been removed -- Function `*WebAppsClient.ListInstanceProcessThreadsSlot` has been removed -- Function `*WebAppsClient.ListTriggeredWebJobHistory` has been removed -- Function `*ProviderClient.GetFunctionAppStacks` has been removed -- Function `*WebAppsClient.ListSlotDifferencesSlot` has been removed -- Function `*KubeEnvironmentsClient.ListBySubscription` has been removed -- Function `*WebAppsClient.ListInstanceProcessModules` has been removed -- Function `*WebAppsClient.ListWebJobsSlot` has been removed -- Function `*WebAppsClient.ListPerfMonCounters` has been removed -- Function `*WebSiteManagementClient.ListPremierAddOnOffers` has been removed -- Function `*CertificateOrdersDiagnosticsClient.ListAppServiceCertificateOrderDetectorResponse` has been removed -- Function `*WebAppsClient.ListSiteBackupsSlot` has been removed -- Function `*WebAppsClient.ListProcessModules` has been removed -- Function `*RecommendationsClient.ListRecommendedRulesForHostingEnvironment` has been removed -- Function `*EnvironmentsClient.ListWebApps` has been removed -- Function `*EnvironmentsClient.ListMultiRoleUsages` has been removed -- Function `*EnvironmentsClient.GetPrivateEndpointConnectionList` has been removed -- Function `*StaticSitesClient.ListStaticSiteUsers` has been removed -- Function `*ProviderClient.GetFunctionAppStacksForLocation` has been removed -- Function `*ResourceHealthMetadataClient.List` has been removed -- Function `*PlansClient.ListWebApps` has been removed -- Function `*WebAppsClient.ListSnapshots` has been removed -- Function `*WebAppsClient.ListInstanceIdentifiers` has been removed -- Function `*DomainRegistrationProviderClient.ListOperations` has been removed -- Function `*CertificateRegistrationProviderClient.ListOperations` has been removed -- Function `*EnvironmentsClient.ListWebWorkerMetricDefinitions` has been removed -- Function `*DiagnosticsClient.ListSiteDiagnosticCategoriesSlot` has been removed -- Function `*WebAppsClient.ListSlots` has been removed -- Function `*EnvironmentsClient.ListWorkerPoolInstanceMetricDefinitions` has been removed -- Function `*ContainerAppsClient.ListBySubscription` has been removed -- Function `*DiagnosticsClient.ListSiteAnalyses` has been removed -- Function `*DomainsClient.List` has been removed -- Function `*ResourceHealthMetadataClient.ListBySiteSlot` has been removed -- Function `*WebAppsClient.ListPublicCertificatesSlot` has been removed -- Function `*EnvironmentsClient.ListAppServicePlans` has been removed -- Function `*WebAppsClient.ListInstanceProcesses` has been removed -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReferences` has been removed -- Function `*WebAppsClient.ListDeployments` has been removed -- Function `*CertificateOrdersClient.ListCertificates` has been removed -- Function `*WebAppsClient.ListTriggeredWebJobsSlot` has been removed -- Function `*WebAppsClient.ListUsagesSlot` has been removed -- Function `*WebAppsClient.ListByResourceGroup` has been removed -- Function `*WebSiteManagementClient.ListCustomHostNameSites` has been removed -- Function `*WebAppsClient.ListDomainOwnershipIdentifiers` has been removed -- Function `*PlansClient.ListUsages` has been removed -- Function `*WebAppsClient.ListPublicCertificates` has been removed -- Function `*WebAppsClient.ListConfigurationSnapshotInfoSlot` has been removed -- Function `*WebAppsClient.ListProcesses` has been removed -- Function `*EnvironmentsClient.ListMultiRoleMetricDefinitions` has been removed -- Function `*TopLevelDomainsClient.List` has been removed -- Function `*CertificatesClient.List` has been removed -- Function `*ProviderClient.GetWebAppStacksForLocation` has been removed -- Function `*ResourceHealthMetadataClient.ListByResourceGroup` has been removed -- Function `*ProviderClient.GetAvailableStacksOnPrem` has been removed -- Function `*WebAppsClient.ListInstanceProcessesSlot` has been removed -- Function `*WebSiteManagementClient.ListSiteIdentifiersAssignedToHostName` has been removed -- Function `*WebAppsClient.ListDomainOwnershipIdentifiersSlot` has been removed -- Function `*DomainsClient.ListOwnershipIdentifiers` has been removed -- Function `*EnvironmentsClient.ListCapacities` has been removed -- Function `*ProviderClient.GetAvailableStacks` has been removed -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReferencesSlot` has been removed -- Function `*WebAppsClient.ListContinuousWebJobsSlot` has been removed -- Function `*WebAppsClient.ListInstanceFunctionsSlot` has been removed -- Function `*StaticSitesClient.GetStaticSitesByResourceGroup` has been removed -- Function `*PlansClient.List` has been removed -- Function `*WebAppsClient.ListBackupsSlot` has been removed -- Function `*WebAppsClient.ListProcessThreadsSlot` has been removed -- Function `*ContainerAppsClient.ListByResourceGroup` has been removed -- Function `*EnvironmentsClient.ListMultiRolePoolSKUs` has been removed -- Function `*TopLevelDomainsClient.ListAgreements` has been removed -- Function `*WebAppsClient.ListProcessThreads` has been removed -- Function `*CertificateOrdersClient.ListByResourceGroup` has been removed -- Function `*ResourceHealthMetadataClient.ListBySite` has been removed -- Function `*WebAppsClient.ListUsages` has been removed -- Function `*DeletedWebAppsClient.ListByLocation` has been removed -- Function `*DiagnosticsClient.ListHostingEnvironmentDetectorResponses` has been removed -- Function `*WebAppsClient.ListConfigurationSnapshotInfo` has been removed -- Function `*StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild` has been removed -- Function `*WebAppsClient.ListProcessModulesSlot` has been removed -- Function `*WebAppsClient.ListSiteExtensionsSlot` has been removed -- Function `*WebSiteManagementClient.ListSourceControls` has been removed -- Function `*PlansClient.ListWebAppsByHybridConnection` has been removed -- Function `*StaticSitesClient.GetStaticSiteBuilds` has been removed -- Function `*DomainsClient.ListByResourceGroup` has been removed -- Function `*EnvironmentsClient.ListWebWorkerUsages` has been removed -- Function `*EnvironmentsClient.GetInboundNetworkDependenciesEndpoints` has been removed -- Function `*RecommendationsClient.ListHistoryForHostingEnvironment` has been removed -- Function `*WebAppsClient.ListInstanceIdentifiersSlot` has been removed -- Function `*WebAppsClient.ListSnapshotsFromDRSecondary` has been removed -- Function `*PlansClient.ListHybridConnections` has been removed -- Function `*DiagnosticsClient.ListSiteDetectorResponsesSlot` has been removed -- Function `*CertificateOrdersClient.List` has been removed -- Function `*EnvironmentsClient.List` has been removed -- Function `*WebAppsClient.GetAppSettingsKeyVaultReferencesSlot` has been removed -- Function `*EnvironmentsClient.GetOutboundNetworkDependenciesEndpoints` has been removed -- Function `*StaticSitesClient.GetPrivateEndpointConnectionList` has been removed -- Function `*WebAppsClient.GetPrivateEndpointConnectionList` has been removed -- Function `*WebAppsClient.ListSlotDifferencesFromProduction` has been removed -- Function `*ContainerAppsRevisionsClient.ListRevisions` has been removed -- Function `*EnvironmentsClient.ListWorkerPools` has been removed -- Function `*WebAppsClient.ListSnapshotsFromDRSecondarySlot` has been removed -- Function `*StaticSitesClient.ListStaticSiteFunctions` has been removed -- Function `*DiagnosticsClient.ListSiteDetectorsSlot` has been removed -- Function `*WebSiteManagementClient.ListBillingMeters` has been removed -- Function `*WebAppsClient.ListConfigurations` has been removed -- Function `*EnvironmentsClient.ListByResourceGroup` has been removed -- Function `*ProviderClient.GetWebAppStacks` has been removed -- Function `*StaticSitesClient.ListStaticSiteBuildFunctions` has been removed -- Function `*WebAppsClient.ListInstanceProcessModulesSlot` has been removed -- Function `*WebAppsClient.ListBasicPublishingCredentialsPoliciesSlot` has been removed -- Function `*WebAppsClient.GetAppSettingsKeyVaultReferences` has been removed -- Function `*RecommendationsClient.List` has been removed -- Function `*WebSiteManagementClient.ListGeoRegions` has been removed -- Function `*WebAppsClient.ListTriggeredWebJobHistorySlot` has been removed -- Function `*WebAppsClient.ListTriggeredWebJobs` has been removed -- Function `*WebAppsClient.ListSiteBackups` has been removed -- Function `*WebAppsClient.ListHostNameBindings` has been removed -- Function `*WebAppsClient.ListPerfMonCountersSlot` has been removed -- Function `*StaticSitesClient.List` has been removed -- Function `*EnvironmentsClient.ListMultiRolePoolInstanceMetricDefinitions` has been removed -- Function `*WebAppsClient.ListBackups` has been removed -- Function `*WebAppsClient.ListContinuousWebJobs` has been removed -- Function `*WebAppsClient.ListWebJobs` has been removed -- Function `*DiagnosticsClient.ListSiteDiagnosticCategories` has been removed -- Function `*WebAppsClient.ListDeploymentsSlot` has been removed -- Function `*StaticSitesClient.ListStaticSiteCustomDomains` has been removed -- Function `*CertificatesClient.ListByResourceGroup` has been removed -- Function `*DomainsClient.ListRecommendations` has been removed -- Function `*DiagnosticsClient.ListSiteDetectorResponses` has been removed - -### Features Added - -- New function `*WebAppsClient.NewListContinuousWebJobsSlotPager(string, string, string, *WebAppsClientListContinuousWebJobsSlotOptions) *runtime.Pager[WebAppsClientListContinuousWebJobsSlotResponse]` -- New function `*WebAppsClient.NewListPerfMonCountersPager(string, string, *WebAppsClientListPerfMonCountersOptions) *runtime.Pager[WebAppsClientListPerfMonCountersResponse]` -- New function `*WebAppsClient.NewListInstanceFunctionsSlotPager(string, string, string, *WebAppsClientListInstanceFunctionsSlotOptions) *runtime.Pager[WebAppsClientListInstanceFunctionsSlotResponse]` -- New function `*PlansClient.NewListWebAppsPager(string, string, *PlansClientListWebAppsOptions) *runtime.Pager[PlansClientListWebAppsResponse]` -- New function `*WebAppsClient.NewListProcessThreadsPager(string, string, string, *WebAppsClientListProcessThreadsOptions) *runtime.Pager[WebAppsClientListProcessThreadsResponse]` -- New function `*EnvironmentsClient.NewListByResourceGroupPager(string, *EnvironmentsClientListByResourceGroupOptions) *runtime.Pager[EnvironmentsClientListByResourceGroupResponse]` -- New function `*WebAppsClient.NewListSnapshotsSlotPager(string, string, string, *WebAppsClientListSnapshotsSlotOptions) *runtime.Pager[WebAppsClientListSnapshotsSlotResponse]` -- New function `*EnvironmentsClient.NewListAppServicePlansPager(string, string, *EnvironmentsClientListAppServicePlansOptions) *runtime.Pager[EnvironmentsClientListAppServicePlansResponse]` -- New function `*WebAppsClient.NewListSnapshotsPager(string, string, *WebAppsClientListSnapshotsOptions) *runtime.Pager[WebAppsClientListSnapshotsResponse]` -- New function `*DomainsClient.NewListPager(*DomainsClientListOptions) *runtime.Pager[DomainsClientListResponse]` -- New function `*WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager(NameIdentifier, *WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions) *runtime.Pager[WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse]` -- New function `*WebSiteManagementClient.NewListCustomHostNameSitesPager(*WebSiteManagementClientListCustomHostNameSitesOptions) *runtime.Pager[WebSiteManagementClientListCustomHostNameSitesResponse]` -- New function `*ContainerAppsClient.NewListBySubscriptionPager(*ContainerAppsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsClientListBySubscriptionResponse]` -- New function `*ProviderClient.NewGetWebAppStacksPager(*ProviderClientGetWebAppStacksOptions) *runtime.Pager[ProviderClientGetWebAppStacksResponse]` -- New function `*EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager(string, string, *EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions) *runtime.Pager[EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse]` -- New function `*WebAppsClient.NewListConfigurationSnapshotInfoPager(string, string, *WebAppsClientListConfigurationSnapshotInfoOptions) *runtime.Pager[WebAppsClientListConfigurationSnapshotInfoResponse]` -- New function `*PlansClient.NewListByResourceGroupPager(string, *PlansClientListByResourceGroupOptions) *runtime.Pager[PlansClientListByResourceGroupResponse]` -- New function `*WebAppsClient.NewListPublicCertificatesSlotPager(string, string, string, *WebAppsClientListPublicCertificatesSlotOptions) *runtime.Pager[WebAppsClientListPublicCertificatesSlotResponse]` -- New function `*WebAppsClient.NewListPager(*WebAppsClientListOptions) *runtime.Pager[WebAppsClientListResponse]` -- New function `*WebAppsClient.NewListBackupsPager(string, string, *WebAppsClientListBackupsOptions) *runtime.Pager[WebAppsClientListBackupsResponse]` -- New function `*ContainerAppsClient.NewListByResourceGroupPager(string, *ContainerAppsClientListByResourceGroupOptions) *runtime.Pager[ContainerAppsClientListByResourceGroupResponse]` -- New function `*WebAppsClient.NewListInstanceProcessModulesSlotPager(string, string, string, string, string, *WebAppsClientListInstanceProcessModulesSlotOptions) *runtime.Pager[WebAppsClientListInstanceProcessModulesSlotResponse]` -- New function `*TopLevelDomainsClient.NewListAgreementsPager(string, TopLevelDomainAgreementOption, *TopLevelDomainsClientListAgreementsOptions) *runtime.Pager[TopLevelDomainsClientListAgreementsResponse]` -- New function `*WebAppsClient.NewListTriggeredWebJobsSlotPager(string, string, string, *WebAppsClientListTriggeredWebJobsSlotOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobsSlotResponse]` -- New function `*KubeEnvironmentsClient.NewListBySubscriptionPager(*KubeEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[KubeEnvironmentsClientListBySubscriptionResponse]` -- New function `*StaticSitesClient.NewListStaticSiteCustomDomainsPager(string, string, *StaticSitesClientListStaticSiteCustomDomainsOptions) *runtime.Pager[StaticSitesClientListStaticSiteCustomDomainsResponse]` -- New function `*StaticSitesClient.NewGetStaticSiteBuildsPager(string, string, *StaticSitesClientGetStaticSiteBuildsOptions) *runtime.Pager[StaticSitesClientGetStaticSiteBuildsResponse]` -- New function `*EnvironmentsClient.NewListWorkerPoolsPager(string, string, *EnvironmentsClientListWorkerPoolsOptions) *runtime.Pager[EnvironmentsClientListWorkerPoolsResponse]` -- New function `*WebAppsClient.NewListProcessesPager(string, string, *WebAppsClientListProcessesOptions) *runtime.Pager[WebAppsClientListProcessesResponse]` -- New function `*WebAppsClient.NewListSiteExtensionsSlotPager(string, string, string, *WebAppsClientListSiteExtensionsSlotOptions) *runtime.Pager[WebAppsClientListSiteExtensionsSlotResponse]` -- New function `*ResourceHealthMetadataClient.NewListBySiteSlotPager(string, string, string, *ResourceHealthMetadataClientListBySiteSlotOptions) *runtime.Pager[ResourceHealthMetadataClientListBySiteSlotResponse]` -- New function `*EnvironmentsClient.NewListMultiRoleUsagesPager(string, string, *EnvironmentsClientListMultiRoleUsagesOptions) *runtime.Pager[EnvironmentsClientListMultiRoleUsagesResponse]` -- New function `*WebAppsClient.NewListInstanceProcessesPager(string, string, string, *WebAppsClientListInstanceProcessesOptions) *runtime.Pager[WebAppsClientListInstanceProcessesResponse]` -- New function `*DomainRegistrationProviderClient.NewListOperationsPager(*DomainRegistrationProviderClientListOperationsOptions) *runtime.Pager[DomainRegistrationProviderClientListOperationsResponse]` -- New function `*WebAppsClient.NewListFunctionsPager(string, string, *WebAppsClientListFunctionsOptions) *runtime.Pager[WebAppsClientListFunctionsResponse]` -- New function `*WebAppsClient.NewListTriggeredWebJobHistorySlotPager(string, string, string, string, *WebAppsClientListTriggeredWebJobHistorySlotOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobHistorySlotResponse]` -- New function `*WebAppsClient.NewListConfigurationsPager(string, string, *WebAppsClientListConfigurationsOptions) *runtime.Pager[WebAppsClientListConfigurationsResponse]` -- New function `*StaticSitesClient.NewListStaticSiteFunctionsPager(string, string, *StaticSitesClientListStaticSiteFunctionsOptions) *runtime.Pager[StaticSitesClientListStaticSiteFunctionsResponse]` -- New function `*EnvironmentsClient.NewGetPrivateEndpointConnectionListPager(string, string, *EnvironmentsClientGetPrivateEndpointConnectionListOptions) *runtime.Pager[EnvironmentsClientGetPrivateEndpointConnectionListResponse]` -- New function `*StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager(string, string, string, *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions) *runtime.Pager[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse]` -- New function `*WebAppsClient.NewListHostNameBindingsPager(string, string, *WebAppsClientListHostNameBindingsOptions) *runtime.Pager[WebAppsClientListHostNameBindingsResponse]` -- New function `*ContainerAppsRevisionsClient.NewListRevisionsPager(string, string, *ContainerAppsRevisionsClientListRevisionsOptions) *runtime.Pager[ContainerAppsRevisionsClientListRevisionsResponse]` -- New function `*PlansClient.NewListHybridConnectionsPager(string, string, *PlansClientListHybridConnectionsOptions) *runtime.Pager[PlansClientListHybridConnectionsResponse]` -- New function `*WebSiteManagementClient.NewListPremierAddOnOffersPager(*WebSiteManagementClientListPremierAddOnOffersOptions) *runtime.Pager[WebSiteManagementClientListPremierAddOnOffersResponse]` -- New function `*ProviderClient.NewListOperationsPager(*ProviderClientListOperationsOptions) *runtime.Pager[ProviderClientListOperationsResponse]` -- New function `*DiagnosticsClient.NewListSiteDiagnosticCategoriesPager(string, string, *DiagnosticsClientListSiteDiagnosticCategoriesOptions) *runtime.Pager[DiagnosticsClientListSiteDiagnosticCategoriesResponse]` -- New function `*WebAppsClient.NewListSiteBackupsPager(string, string, *WebAppsClientListSiteBackupsOptions) *runtime.Pager[WebAppsClientListSiteBackupsResponse]` -- New function `*DomainsClient.NewListByResourceGroupPager(string, *DomainsClientListByResourceGroupOptions) *runtime.Pager[DomainsClientListByResourceGroupResponse]` -- New function `*WebAppsClient.NewListWebJobsPager(string, string, *WebAppsClientListWebJobsOptions) *runtime.Pager[WebAppsClientListWebJobsResponse]` -- New function `*WebAppsClient.NewGetPrivateEndpointConnectionListPager(string, string, *WebAppsClientGetPrivateEndpointConnectionListOptions) *runtime.Pager[WebAppsClientGetPrivateEndpointConnectionListResponse]` -- New function `*WebAppsClient.NewListDeploymentsPager(string, string, *WebAppsClientListDeploymentsOptions) *runtime.Pager[WebAppsClientListDeploymentsResponse]` -- New function `*ResourceHealthMetadataClient.NewListPager(*ResourceHealthMetadataClientListOptions) *runtime.Pager[ResourceHealthMetadataClientListResponse]` -- New function `*ResourceHealthMetadataClient.NewListBySitePager(string, string, *ResourceHealthMetadataClientListBySiteOptions) *runtime.Pager[ResourceHealthMetadataClientListBySiteResponse]` -- New function `*CertificateOrdersClient.NewListPager(*CertificateOrdersClientListOptions) *runtime.Pager[CertificateOrdersClientListResponse]` -- New function `*WebAppsClient.NewListHostNameBindingsSlotPager(string, string, string, *WebAppsClientListHostNameBindingsSlotOptions) *runtime.Pager[WebAppsClientListHostNameBindingsSlotResponse]` -- New function `*CertificateOrdersClient.NewListByResourceGroupPager(string, *CertificateOrdersClientListByResourceGroupOptions) *runtime.Pager[CertificateOrdersClientListByResourceGroupResponse]` -- New function `*EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager(string, string, string, string, *EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse]` -- New function `*WebAppsClient.NewListInstanceProcessThreadsPager(string, string, string, string, *WebAppsClientListInstanceProcessThreadsOptions) *runtime.Pager[WebAppsClientListInstanceProcessThreadsResponse]` -- New function `*ProviderClient.NewGetFunctionAppStacksForLocationPager(string, *ProviderClientGetFunctionAppStacksForLocationOptions) *runtime.Pager[ProviderClientGetFunctionAppStacksForLocationResponse]` -- New function `*WebAppsClient.NewListPublicCertificatesPager(string, string, *WebAppsClientListPublicCertificatesOptions) *runtime.Pager[WebAppsClientListPublicCertificatesResponse]` -- New function `*WebAppsClient.NewListContinuousWebJobsPager(string, string, *WebAppsClientListContinuousWebJobsOptions) *runtime.Pager[WebAppsClientListContinuousWebJobsResponse]` -- New function `*DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager(string, string, *DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions) *runtime.Pager[DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse]` -- New function `*WebAppsClient.NewListProcessModulesPager(string, string, string, *WebAppsClientListProcessModulesOptions) *runtime.Pager[WebAppsClientListProcessModulesResponse]` -- New function `*DeletedWebAppsClient.NewListByLocationPager(string, *DeletedWebAppsClientListByLocationOptions) *runtime.Pager[DeletedWebAppsClientListByLocationResponse]` -- New function `*WebAppsClient.NewListBackupsSlotPager(string, string, string, *WebAppsClientListBackupsSlotOptions) *runtime.Pager[WebAppsClientListBackupsSlotResponse]` -- New function `*WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager(string, string, string, *WebAppsClientListDomainOwnershipIdentifiersSlotOptions) *runtime.Pager[WebAppsClientListDomainOwnershipIdentifiersSlotResponse]` -- New function `*EnvironmentsClient.NewListUsagesPager(string, string, *EnvironmentsClientListUsagesOptions) *runtime.Pager[EnvironmentsClientListUsagesResponse]` -- New function `*WebAppsClient.NewListSlotDifferencesFromProductionPager(string, string, CsmSlotEntity, *WebAppsClientListSlotDifferencesFromProductionOptions) *runtime.Pager[WebAppsClientListSlotDifferencesFromProductionResponse]` -- New function `*DiagnosticsClient.NewListSiteDetectorResponsesSlotPager(string, string, string, *DiagnosticsClientListSiteDetectorResponsesSlotOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorResponsesSlotResponse]` -- New function `*WebAppsClient.NewListSiteBackupsSlotPager(string, string, string, *WebAppsClientListSiteBackupsSlotOptions) *runtime.Pager[WebAppsClientListSiteBackupsSlotResponse]` -- New function `*WebAppsClient.NewListInstanceIdentifiersSlotPager(string, string, string, *WebAppsClientListInstanceIdentifiersSlotOptions) *runtime.Pager[WebAppsClientListInstanceIdentifiersSlotResponse]` -- New function `*WebSiteManagementClient.NewListSourceControlsPager(*WebSiteManagementClientListSourceControlsOptions) *runtime.Pager[WebSiteManagementClientListSourceControlsResponse]` -- New function `*CertificatesClient.NewListByResourceGroupPager(string, *CertificatesClientListByResourceGroupOptions) *runtime.Pager[CertificatesClientListByResourceGroupResponse]` -- New function `*WebAppsClient.NewListSlotDifferencesSlotPager(string, string, string, CsmSlotEntity, *WebAppsClientListSlotDifferencesSlotOptions) *runtime.Pager[WebAppsClientListSlotDifferencesSlotResponse]` -- New function `*StaticSitesClient.NewGetStaticSitesByResourceGroupPager(string, *StaticSitesClientGetStaticSitesByResourceGroupOptions) *runtime.Pager[StaticSitesClientGetStaticSitesByResourceGroupResponse]` -- New function `*EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager(string, string, *EnvironmentsClientListMultiRoleMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListMultiRoleMetricDefinitionsResponse]` -- New function `*EnvironmentsClient.NewListWebAppsPager(string, string, *EnvironmentsClientListWebAppsOptions) *runtime.Pager[EnvironmentsClientListWebAppsResponse]` -- New function `*WebAppsClient.NewListDeploymentsSlotPager(string, string, string, *WebAppsClientListDeploymentsSlotOptions) *runtime.Pager[WebAppsClientListDeploymentsSlotResponse]` -- New function `*WebAppsClient.NewListSnapshotsFromDRSecondaryPager(string, string, *WebAppsClientListSnapshotsFromDRSecondaryOptions) *runtime.Pager[WebAppsClientListSnapshotsFromDRSecondaryResponse]` -- New function `*WebAppsClient.NewListSlotsPager(string, string, *WebAppsClientListSlotsOptions) *runtime.Pager[WebAppsClientListSlotsResponse]` -- New function `*EnvironmentsClient.NewListMultiRolePoolSKUsPager(string, string, *EnvironmentsClientListMultiRolePoolSKUsOptions) *runtime.Pager[EnvironmentsClientListMultiRolePoolSKUsResponse]` -- New function `*EnvironmentsClient.NewListPager(*EnvironmentsClientListOptions) *runtime.Pager[EnvironmentsClientListResponse]` -- New function `*WebAppsClient.NewGetPrivateEndpointConnectionListSlotPager(string, string, string, *WebAppsClientGetPrivateEndpointConnectionListSlotOptions) *runtime.Pager[WebAppsClientGetPrivateEndpointConnectionListSlotResponse]` -- New function `*ProviderClient.NewGetWebAppStacksForLocationPager(string, *ProviderClientGetWebAppStacksForLocationOptions) *runtime.Pager[ProviderClientGetWebAppStacksForLocationResponse]` -- New function `*RecommendationsClient.NewListHistoryForWebAppPager(string, string, *RecommendationsClientListHistoryForWebAppOptions) *runtime.Pager[RecommendationsClientListHistoryForWebAppResponse]` -- New function `*DiagnosticsClient.NewListSiteDetectorsSlotPager(string, string, string, string, *DiagnosticsClientListSiteDetectorsSlotOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorsSlotResponse]` -- New function `*StaticSitesClient.NewListStaticSiteBuildFunctionsPager(string, string, string, *StaticSitesClientListStaticSiteBuildFunctionsOptions) *runtime.Pager[StaticSitesClientListStaticSiteBuildFunctionsResponse]` -- New function `*EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager(string, string, *EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions) *runtime.Pager[EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse]` -- New function `*PlansClient.NewListPager(*PlansClientListOptions) *runtime.Pager[PlansClientListResponse]` -- New function `*ProviderClient.NewGetAvailableStacksPager(*ProviderClientGetAvailableStacksOptions) *runtime.Pager[ProviderClientGetAvailableStacksResponse]` -- New function `*WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager(string, string, *WebAppsClientGetAppSettingsKeyVaultReferencesOptions) *runtime.Pager[WebAppsClientGetAppSettingsKeyVaultReferencesResponse]` -- New function `*WebAppsClient.NewListConfigurationsSlotPager(string, string, string, *WebAppsClientListConfigurationsSlotOptions) *runtime.Pager[WebAppsClientListConfigurationsSlotResponse]` -- New function `*DomainsClient.NewListOwnershipIdentifiersPager(string, string, *DomainsClientListOwnershipIdentifiersOptions) *runtime.Pager[DomainsClientListOwnershipIdentifiersResponse]` -- New function `*EnvironmentsClient.NewListWorkerPoolSKUsPager(string, string, string, *EnvironmentsClientListWorkerPoolSKUsOptions) *runtime.Pager[EnvironmentsClientListWorkerPoolSKUsResponse]` -- New function `*EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager(string, string, string, *EnvironmentsClientListWebWorkerMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListWebWorkerMetricDefinitionsResponse]` -- New function `*WebAppsClient.NewListTriggeredWebJobHistoryPager(string, string, string, *WebAppsClientListTriggeredWebJobHistoryOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobHistoryResponse]` -- New function `*WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager(string, string, *WebAppsClientListBasicPublishingCredentialsPoliciesOptions) *runtime.Pager[WebAppsClientListBasicPublishingCredentialsPoliciesResponse]` -- New function `*WebAppsClient.NewListInstanceIdentifiersPager(string, string, *WebAppsClientListInstanceIdentifiersOptions) *runtime.Pager[WebAppsClientListInstanceIdentifiersResponse]` -- New function `*CertificateOrdersClient.NewListCertificatesPager(string, string, *CertificateOrdersClientListCertificatesOptions) *runtime.Pager[CertificateOrdersClientListCertificatesResponse]` -- New function `*RecommendationsClient.NewListRecommendedRulesForWebAppPager(string, string, *RecommendationsClientListRecommendedRulesForWebAppOptions) *runtime.Pager[RecommendationsClientListRecommendedRulesForWebAppResponse]` -- New function `*WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager(string, string, string, *WebAppsClientListSnapshotsFromDRSecondarySlotOptions) *runtime.Pager[WebAppsClientListSnapshotsFromDRSecondarySlotResponse]` -- New function `*ResourceHealthMetadataClient.NewListByResourceGroupPager(string, *ResourceHealthMetadataClientListByResourceGroupOptions) *runtime.Pager[ResourceHealthMetadataClientListByResourceGroupResponse]` -- New function `*StaticSitesClient.NewGetPrivateEndpointConnectionListPager(string, string, *StaticSitesClientGetPrivateEndpointConnectionListOptions) *runtime.Pager[StaticSitesClientGetPrivateEndpointConnectionListResponse]` -- New function `*RecommendationsClient.NewListPager(*RecommendationsClientListOptions) *runtime.Pager[RecommendationsClientListResponse]` -- New function `*WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager(string, string, string, *WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions) *runtime.Pager[WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse]` -- New function `*WebAppsClient.NewListProcessThreadsSlotPager(string, string, string, string, *WebAppsClientListProcessThreadsSlotOptions) *runtime.Pager[WebAppsClientListProcessThreadsSlotResponse]` -- New function `*StaticSitesClient.NewListPager(*StaticSitesClientListOptions) *runtime.Pager[StaticSitesClientListResponse]` -- New function `*PlansClient.NewListWebAppsByHybridConnectionPager(string, string, string, string, *PlansClientListWebAppsByHybridConnectionOptions) *runtime.Pager[PlansClientListWebAppsByHybridConnectionResponse]` -- New function `*RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager(string, string, *RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions) *runtime.Pager[RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse]` -- New function `*WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager(string, string, string, *WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions) *runtime.Pager[WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse]` -- New function `*WebAppsClient.NewListSiteExtensionsPager(string, string, *WebAppsClientListSiteExtensionsOptions) *runtime.Pager[WebAppsClientListSiteExtensionsResponse]` -- New function `*ProviderClient.NewGetAvailableStacksOnPremPager(*ProviderClientGetAvailableStacksOnPremOptions) *runtime.Pager[ProviderClientGetAvailableStacksOnPremResponse]` -- New function `*EnvironmentsClient.NewListMultiRolePoolsPager(string, string, *EnvironmentsClientListMultiRolePoolsOptions) *runtime.Pager[EnvironmentsClientListMultiRolePoolsResponse]` -- New function `*EnvironmentsClient.NewListCapacitiesPager(string, string, *EnvironmentsClientListCapacitiesOptions) *runtime.Pager[EnvironmentsClientListCapacitiesResponse]` -- New function `*DiagnosticsClient.NewListSiteAnalysesSlotPager(string, string, string, string, *DiagnosticsClientListSiteAnalysesSlotOptions) *runtime.Pager[DiagnosticsClientListSiteAnalysesSlotResponse]` -- New function `*WebAppsClient.NewListProcessesSlotPager(string, string, string, *WebAppsClientListProcessesSlotOptions) *runtime.Pager[WebAppsClientListProcessesSlotResponse]` -- New function `*RecommendationsClient.NewListHistoryForHostingEnvironmentPager(string, string, *RecommendationsClientListHistoryForHostingEnvironmentOptions) *runtime.Pager[RecommendationsClientListHistoryForHostingEnvironmentResponse]` -- New function `*WebAppsClient.NewListPerfMonCountersSlotPager(string, string, string, *WebAppsClientListPerfMonCountersSlotOptions) *runtime.Pager[WebAppsClientListPerfMonCountersSlotResponse]` -- New function `*WebSiteManagementClient.NewListGeoRegionsPager(*WebSiteManagementClientListGeoRegionsOptions) *runtime.Pager[WebSiteManagementClientListGeoRegionsResponse]` -- New function `*CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager(string, string, *CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions) *runtime.Pager[CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse]` -- New function `*WebSiteManagementClient.NewListBillingMetersPager(*WebSiteManagementClientListBillingMetersOptions) *runtime.Pager[WebSiteManagementClientListBillingMetersResponse]` -- New function `*StaticSitesClient.NewListStaticSiteUsersPager(string, string, string, *StaticSitesClientListStaticSiteUsersOptions) *runtime.Pager[StaticSitesClientListStaticSiteUsersResponse]` -- New function `*WebAppsClient.NewListInstanceProcessModulesPager(string, string, string, string, *WebAppsClientListInstanceProcessModulesOptions) *runtime.Pager[WebAppsClientListInstanceProcessModulesResponse]` -- New function `*CertificatesClient.NewListPager(*CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse]` -- New function `*EnvironmentsClient.NewListWebWorkerUsagesPager(string, string, string, *EnvironmentsClientListWebWorkerUsagesOptions) *runtime.Pager[EnvironmentsClientListWebWorkerUsagesResponse]` -- New function `*PlansClient.NewListUsagesPager(string, string, *PlansClientListUsagesOptions) *runtime.Pager[PlansClientListUsagesResponse]` -- New function `*DiagnosticsClient.NewListSiteAnalysesPager(string, string, string, *DiagnosticsClientListSiteAnalysesOptions) *runtime.Pager[DiagnosticsClientListSiteAnalysesResponse]` -- New function `*StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager(string, string, *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions) *runtime.Pager[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse]` -- New function `*WebAppsClient.NewListInstanceProcessesSlotPager(string, string, string, string, *WebAppsClientListInstanceProcessesSlotOptions) *runtime.Pager[WebAppsClientListInstanceProcessesSlotResponse]` -- New function `*WebAppsClient.NewListTriggeredWebJobsPager(string, string, *WebAppsClientListTriggeredWebJobsOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobsResponse]` -- New function `*WebAppsClient.NewListConfigurationSnapshotInfoSlotPager(string, string, string, *WebAppsClientListConfigurationSnapshotInfoSlotOptions) *runtime.Pager[WebAppsClientListConfigurationSnapshotInfoSlotResponse]` -- New function `*WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager(string, string, string, *WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions) *runtime.Pager[WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse]` -- New function `*DomainsClient.NewListRecommendationsPager(DomainRecommendationSearchParameters, *DomainsClientListRecommendationsOptions) *runtime.Pager[DomainsClientListRecommendationsResponse]` -- New function `*DiagnosticsClient.NewListSiteDetectorsPager(string, string, string, *DiagnosticsClientListSiteDetectorsOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorsResponse]` -- New function `*TopLevelDomainsClient.NewListPager(*TopLevelDomainsClientListOptions) *runtime.Pager[TopLevelDomainsClientListResponse]` -- New function `*ProviderClient.NewGetFunctionAppStacksPager(*ProviderClientGetFunctionAppStacksOptions) *runtime.Pager[ProviderClientGetFunctionAppStacksResponse]` -- New function `*WebAppsClient.NewListProcessModulesSlotPager(string, string, string, string, *WebAppsClientListProcessModulesSlotOptions) *runtime.Pager[WebAppsClientListProcessModulesSlotResponse]` -- New function `*WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager(string, string, *WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions) *runtime.Pager[WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse]` -- New function `*CertificateRegistrationProviderClient.NewListOperationsPager(*CertificateRegistrationProviderClientListOperationsOptions) *runtime.Pager[CertificateRegistrationProviderClientListOperationsResponse]` -- New function `*WebAppsClient.NewListDomainOwnershipIdentifiersPager(string, string, *WebAppsClientListDomainOwnershipIdentifiersOptions) *runtime.Pager[WebAppsClientListDomainOwnershipIdentifiersResponse]` -- New function `*WebAppsClient.NewListByResourceGroupPager(string, *WebAppsClientListByResourceGroupOptions) *runtime.Pager[WebAppsClientListByResourceGroupResponse]` -- New function `*KubeEnvironmentsClient.NewListByResourceGroupPager(string, *KubeEnvironmentsClientListByResourceGroupOptions) *runtime.Pager[KubeEnvironmentsClientListByResourceGroupResponse]` -- New function `*DeletedWebAppsClient.NewListPager(*DeletedWebAppsClientListOptions) *runtime.Pager[DeletedWebAppsClientListResponse]` -- New function `*DiagnosticsClient.NewListSiteDetectorResponsesPager(string, string, *DiagnosticsClientListSiteDetectorResponsesOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorResponsesResponse]` -- New function `*EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager(string, string, string, *EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse]` -- New function `*WebAppsClient.NewListWebJobsSlotPager(string, string, string, *WebAppsClientListWebJobsSlotOptions) *runtime.Pager[WebAppsClientListWebJobsSlotResponse]` -- New function `*WebAppsClient.NewListInstanceProcessThreadsSlotPager(string, string, string, string, string, *WebAppsClientListInstanceProcessThreadsSlotOptions) *runtime.Pager[WebAppsClientListInstanceProcessThreadsSlotResponse]` -- New function `*WebAppsClient.NewListUsagesPager(string, string, *WebAppsClientListUsagesOptions) *runtime.Pager[WebAppsClientListUsagesResponse]` -- New function `*DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager(string, string, string, *DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions) *runtime.Pager[DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse]` -- New function `*WebAppsClient.NewListUsagesSlotPager(string, string, string, *WebAppsClientListUsagesSlotOptions) *runtime.Pager[WebAppsClientListUsagesSlotResponse]` - - -## 0.3.0 (2022-04-11) -### Breaking Changes - -- Function `*WebAppsClient.GetPrivateEndpointConnectionList` return value(s) have been changed from `(*WebAppsClientGetPrivateEndpointConnectionListPager)` to `(*runtime.Pager[WebAppsClientGetPrivateEndpointConnectionListResponse])` -- Function `*EnvironmentsClient.ListMultiRolePoolInstanceMetricDefinitions` return value(s) have been changed from `(*EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsPager)` to `(*runtime.Pager[EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse])` -- Function `*DomainsClient.ListByResourceGroup` return value(s) have been changed from `(*DomainsClientListByResourceGroupPager)` to `(*runtime.Pager[DomainsClientListByResourceGroupResponse])` -- Function `*EnvironmentsClient.List` return value(s) have been changed from `(*EnvironmentsClientListPager)` to `(*runtime.Pager[EnvironmentsClientListResponse])` -- Function `*CertificateOrdersDiagnosticsClient.ListAppServiceCertificateOrderDetectorResponse` return value(s) have been changed from `(*CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponsePager)` to `(*runtime.Pager[CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse])` -- Function `*WebAppsClient.BeginCreateMSDeployOperationSlot` return value(s) have been changed from `(WebAppsClientCreateMSDeployOperationSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientCreateMSDeployOperationSlotResponse], error)` -- Function `*StaticSitesClient.BeginDeleteStaticSiteBuild` return value(s) have been changed from `(StaticSitesClientDeleteStaticSiteBuildPollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientDeleteStaticSiteBuildResponse], error)` -- Function `*WebAppsClient.BeginMigrateMySQL` return value(s) have been changed from `(WebAppsClientMigrateMySQLPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientMigrateMySQLResponse], error)` -- Function `*StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain` return value(s) have been changed from `(StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse], error)` -- Function `*WebAppsClient.BeginRestoreSnapshot` return value(s) have been changed from `(WebAppsClientRestoreSnapshotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientRestoreSnapshotResponse], error)` -- Function `NewResourceHealthMetadataClient` return value(s) have been changed from `(*ResourceHealthMetadataClient)` to `(*ResourceHealthMetadataClient, error)` -- Function `*WebSiteManagementClient.ListGeoRegions` return value(s) have been changed from `(*WebSiteManagementClientListGeoRegionsPager)` to `(*runtime.Pager[WebSiteManagementClientListGeoRegionsResponse])` -- Function `*WebAppsClient.ListSlotDifferencesSlot` return value(s) have been changed from `(*WebAppsClientListSlotDifferencesSlotPager)` to `(*runtime.Pager[WebAppsClientListSlotDifferencesSlotResponse])` -- Function `*ContainerAppsClient.ListByResourceGroup` return value(s) have been changed from `(*ContainerAppsClientListByResourceGroupPager)` to `(*runtime.Pager[ContainerAppsClientListByResourceGroupResponse])` -- Function `*WebAppsClient.ListByResourceGroup` return value(s) have been changed from `(*WebAppsClientListByResourceGroupPager)` to `(*runtime.Pager[WebAppsClientListByResourceGroupResponse])` -- Function `*PlansClient.ListHybridConnections` return value(s) have been changed from `(*PlansClientListHybridConnectionsPager)` to `(*runtime.Pager[PlansClientListHybridConnectionsResponse])` -- Function `*ResourceHealthMetadataClient.ListByResourceGroup` return value(s) have been changed from `(*ResourceHealthMetadataClientListByResourceGroupPager)` to `(*runtime.Pager[ResourceHealthMetadataClientListByResourceGroupResponse])` -- Function `*DiagnosticsClient.ListSiteDetectors` return value(s) have been changed from `(*DiagnosticsClientListSiteDetectorsPager)` to `(*runtime.Pager[DiagnosticsClientListSiteDetectorsResponse])` -- Function `*WebAppsClient.BeginCreateMSDeployOperation` return value(s) have been changed from `(WebAppsClientCreateMSDeployOperationPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientCreateMSDeployOperationResponse], error)` -- Function `*WebAppsClient.ListWebJobsSlot` return value(s) have been changed from `(*WebAppsClientListWebJobsSlotPager)` to `(*runtime.Pager[WebAppsClientListWebJobsSlotResponse])` -- Function `*WebAppsClient.ListBasicPublishingCredentialsPolicies` return value(s) have been changed from `(*WebAppsClientListBasicPublishingCredentialsPoliciesPager)` to `(*runtime.Pager[WebAppsClientListBasicPublishingCredentialsPoliciesResponse])` -- Function `*WebAppsClient.ListSnapshotsFromDRSecondary` return value(s) have been changed from `(*WebAppsClientListSnapshotsFromDRSecondaryPager)` to `(*runtime.Pager[WebAppsClientListSnapshotsFromDRSecondaryResponse])` -- Function `*CertificateOrdersClient.BeginCreateOrUpdate` return value(s) have been changed from `(CertificateOrdersClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[CertificateOrdersClientCreateOrUpdateResponse], error)` -- Function `*DiagnosticsClient.ListSiteAnalyses` return value(s) have been changed from `(*DiagnosticsClientListSiteAnalysesPager)` to `(*runtime.Pager[DiagnosticsClientListSiteAnalysesResponse])` -- Function `*WebAppsClient.ListTriggeredWebJobsSlot` return value(s) have been changed from `(*WebAppsClientListTriggeredWebJobsSlotPager)` to `(*runtime.Pager[WebAppsClientListTriggeredWebJobsSlotResponse])` -- Function `*StaticSitesClient.BeginDetachStaticSite` return value(s) have been changed from `(StaticSitesClientDetachStaticSitePollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientDetachStaticSiteResponse], error)` -- Function `*EnvironmentsClient.BeginDeletePrivateEndpointConnection` return value(s) have been changed from `(EnvironmentsClientDeletePrivateEndpointConnectionPollerResponse, error)` to `(*armruntime.Poller[EnvironmentsClientDeletePrivateEndpointConnectionResponse], error)` -- Function `*WebAppsClient.ListInstanceProcessModulesSlot` return value(s) have been changed from `(*WebAppsClientListInstanceProcessModulesSlotPager)` to `(*runtime.Pager[WebAppsClientListInstanceProcessModulesSlotResponse])` -- Function `*WebAppsClient.ListInstanceProcessThreadsSlot` return value(s) have been changed from `(*WebAppsClientListInstanceProcessThreadsSlotPager)` to `(*runtime.Pager[WebAppsClientListInstanceProcessThreadsSlotResponse])` -- Function `NewStaticSitesClient` return value(s) have been changed from `(*StaticSitesClient)` to `(*StaticSitesClient, error)` -- Function `*WebAppsClient.ListProcessThreadsSlot` return value(s) have been changed from `(*WebAppsClientListProcessThreadsSlotPager)` to `(*runtime.Pager[WebAppsClientListProcessThreadsSlotResponse])` -- Function `*StaticSitesClient.BeginDeletePrivateEndpointConnection` return value(s) have been changed from `(StaticSitesClientDeletePrivateEndpointConnectionPollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientDeletePrivateEndpointConnectionResponse], error)` -- Function `*DomainsClient.ListOwnershipIdentifiers` return value(s) have been changed from `(*DomainsClientListOwnershipIdentifiersPager)` to `(*runtime.Pager[DomainsClientListOwnershipIdentifiersResponse])` -- Function `*WebAppsClient.ListPublicCertificatesSlot` return value(s) have been changed from `(*WebAppsClientListPublicCertificatesSlotPager)` to `(*runtime.Pager[WebAppsClientListPublicCertificatesSlotResponse])` -- Function `*WebAppsClient.GetPrivateEndpointConnectionListSlot` return value(s) have been changed from `(*WebAppsClientGetPrivateEndpointConnectionListSlotPager)` to `(*runtime.Pager[WebAppsClientGetPrivateEndpointConnectionListSlotResponse])` -- Function `NewCertificateOrdersDiagnosticsClient` return value(s) have been changed from `(*CertificateOrdersDiagnosticsClient)` to `(*CertificateOrdersDiagnosticsClient, error)` -- Function `*PlansClient.List` return value(s) have been changed from `(*PlansClientListPager)` to `(*runtime.Pager[PlansClientListResponse])` -- Function `*EnvironmentsClient.BeginCreateOrUpdateMultiRolePool` return value(s) have been changed from `(EnvironmentsClientCreateOrUpdateMultiRolePoolPollerResponse, error)` to `(*armruntime.Poller[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse], error)` -- Function `*ProviderClient.GetFunctionAppStacksForLocation` return value(s) have been changed from `(*ProviderClientGetFunctionAppStacksForLocationPager)` to `(*runtime.Pager[ProviderClientGetFunctionAppStacksForLocationResponse])` -- Function `*WebAppsClient.BeginStartWebSiteNetworkTraceOperation` return value(s) have been changed from `(WebAppsClientStartWebSiteNetworkTraceOperationPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientStartWebSiteNetworkTraceOperationResponse], error)` -- Function `*DiagnosticsClient.ListSiteAnalysesSlot` return value(s) have been changed from `(*DiagnosticsClientListSiteAnalysesSlotPager)` to `(*runtime.Pager[DiagnosticsClientListSiteAnalysesSlotResponse])` -- Function `*WebAppsClient.BeginStartNetworkTrace` return value(s) have been changed from `(WebAppsClientStartNetworkTracePollerResponse, error)` to `(*armruntime.Poller[WebAppsClientStartNetworkTraceResponse], error)` -- Function `*StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild` return value(s) have been changed from `(*StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildPager)` to `(*runtime.Pager[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse])` -- Function `*WebAppsClient.ListBackups` return value(s) have been changed from `(*WebAppsClientListBackupsPager)` to `(*runtime.Pager[WebAppsClientListBackupsResponse])` -- Function `NewCertificatesClient` return value(s) have been changed from `(*CertificatesClient)` to `(*CertificatesClient, error)` -- Function `*EnvironmentsClient.GetPrivateEndpointConnectionList` return value(s) have been changed from `(*EnvironmentsClientGetPrivateEndpointConnectionListPager)` to `(*runtime.Pager[EnvironmentsClientGetPrivateEndpointConnectionListResponse])` -- Function `*DeletedWebAppsClient.ListByLocation` return value(s) have been changed from `(*DeletedWebAppsClientListByLocationPager)` to `(*runtime.Pager[DeletedWebAppsClientListByLocationResponse])` -- Function `*WebAppsClient.ListInstanceIdentifiersSlot` return value(s) have been changed from `(*WebAppsClientListInstanceIdentifiersSlotPager)` to `(*runtime.Pager[WebAppsClientListInstanceIdentifiersSlotResponse])` -- Function `*WebAppsClient.BeginStartNetworkTraceSlot` return value(s) have been changed from `(WebAppsClientStartNetworkTraceSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientStartNetworkTraceSlotResponse], error)` -- Function `*EnvironmentsClient.ListWorkerPools` return value(s) have been changed from `(*EnvironmentsClientListWorkerPoolsPager)` to `(*runtime.Pager[EnvironmentsClientListWorkerPoolsResponse])` -- Function `*ResourceHealthMetadataClient.ListBySiteSlot` return value(s) have been changed from `(*ResourceHealthMetadataClientListBySiteSlotPager)` to `(*runtime.Pager[ResourceHealthMetadataClientListBySiteSlotResponse])` -- Function `*WebSiteManagementClient.ListBillingMeters` return value(s) have been changed from `(*WebSiteManagementClientListBillingMetersPager)` to `(*runtime.Pager[WebSiteManagementClientListBillingMetersResponse])` -- Function `*DiagnosticsClient.ListSiteDiagnosticCategoriesSlot` return value(s) have been changed from `(*DiagnosticsClientListSiteDiagnosticCategoriesSlotPager)` to `(*runtime.Pager[DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse])` -- Function `*WebAppsClient.ListUsages` return value(s) have been changed from `(*WebAppsClientListUsagesPager)` to `(*runtime.Pager[WebAppsClientListUsagesResponse])` -- Function `*RecommendationsClient.ListHistoryForHostingEnvironment` return value(s) have been changed from `(*RecommendationsClientListHistoryForHostingEnvironmentPager)` to `(*runtime.Pager[RecommendationsClientListHistoryForHostingEnvironmentResponse])` -- Function `NewCertificateOrdersClient` return value(s) have been changed from `(*CertificateOrdersClient)` to `(*CertificateOrdersClient, error)` -- Function `*DiagnosticsClient.ListHostingEnvironmentDetectorResponses` return value(s) have been changed from `(*DiagnosticsClientListHostingEnvironmentDetectorResponsesPager)` to `(*runtime.Pager[DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse])` -- Function `*WebAppsClient.ListSnapshots` return value(s) have been changed from `(*WebAppsClientListSnapshotsPager)` to `(*runtime.Pager[WebAppsClientListSnapshotsResponse])` -- Function `*RecommendationsClient.ListRecommendedRulesForWebApp` return value(s) have been changed from `(*RecommendationsClientListRecommendedRulesForWebAppPager)` to `(*runtime.Pager[RecommendationsClientListRecommendedRulesForWebAppResponse])` -- Function `*WebAppsClient.ListInstanceProcessModules` return value(s) have been changed from `(*WebAppsClientListInstanceProcessModulesPager)` to `(*runtime.Pager[WebAppsClientListInstanceProcessModulesResponse])` -- Function `*WebSiteManagementClient.ListPremierAddOnOffers` return value(s) have been changed from `(*WebSiteManagementClientListPremierAddOnOffersPager)` to `(*runtime.Pager[WebSiteManagementClientListPremierAddOnOffersResponse])` -- Function `*DiagnosticsClient.ListSiteDiagnosticCategories` return value(s) have been changed from `(*DiagnosticsClientListSiteDiagnosticCategoriesPager)` to `(*runtime.Pager[DiagnosticsClientListSiteDiagnosticCategoriesResponse])` -- Function `*WebAppsClient.GetAppSettingsKeyVaultReferencesSlot` return value(s) have been changed from `(*WebAppsClientGetAppSettingsKeyVaultReferencesSlotPager)` to `(*runtime.Pager[WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse])` -- Function `NewProviderClient` return value(s) have been changed from `(*ProviderClient)` to `(*ProviderClient, error)` -- Function `*EnvironmentsClient.ListMultiRolePoolSKUs` return value(s) have been changed from `(*EnvironmentsClientListMultiRolePoolSKUsPager)` to `(*runtime.Pager[EnvironmentsClientListMultiRolePoolSKUsResponse])` -- Function `*EnvironmentsClient.ListByResourceGroup` return value(s) have been changed from `(*EnvironmentsClientListByResourceGroupPager)` to `(*runtime.Pager[EnvironmentsClientListByResourceGroupResponse])` -- Function `*WebAppsClient.ListDeployments` return value(s) have been changed from `(*WebAppsClientListDeploymentsPager)` to `(*runtime.Pager[WebAppsClientListDeploymentsResponse])` -- Function `*WebAppsClient.BeginListPublishingCredentials` return value(s) have been changed from `(WebAppsClientListPublishingCredentialsPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientListPublishingCredentialsResponse], error)` -- Function `*WebAppsClient.BeginMigrateStorage` return value(s) have been changed from `(WebAppsClientMigrateStoragePollerResponse, error)` to `(*armruntime.Poller[WebAppsClientMigrateStorageResponse], error)` -- Function `NewWebSiteManagementClient` return value(s) have been changed from `(*WebSiteManagementClient)` to `(*WebSiteManagementClient, error)` -- Function `*WebAppsClient.ListConfigurationSnapshotInfoSlot` return value(s) have been changed from `(*WebAppsClientListConfigurationSnapshotInfoSlotPager)` to `(*runtime.Pager[WebAppsClientListConfigurationSnapshotInfoSlotResponse])` -- Function `*EnvironmentsClient.BeginCreateOrUpdateWorkerPool` return value(s) have been changed from `(EnvironmentsClientCreateOrUpdateWorkerPoolPollerResponse, error)` to `(*armruntime.Poller[EnvironmentsClientCreateOrUpdateWorkerPoolResponse], error)` -- Function `*WebAppsClient.BeginCreateInstanceMSDeployOperationSlot` return value(s) have been changed from `(WebAppsClientCreateInstanceMSDeployOperationSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientCreateInstanceMSDeployOperationSlotResponse], error)` -- Function `*WebAppsClient.BeginRestoreSnapshotSlot` return value(s) have been changed from `(WebAppsClientRestoreSnapshotSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientRestoreSnapshotSlotResponse], error)` -- Function `*EnvironmentsClient.ListMultiRolePools` return value(s) have been changed from `(*EnvironmentsClientListMultiRolePoolsPager)` to `(*runtime.Pager[EnvironmentsClientListMultiRolePoolsResponse])` -- Function `*StaticSitesClient.GetStaticSiteBuilds` return value(s) have been changed from `(*StaticSitesClientGetStaticSiteBuildsPager)` to `(*runtime.Pager[StaticSitesClientGetStaticSiteBuildsResponse])` -- Function `*WebAppsClient.BeginSwapSlotWithProduction` return value(s) have been changed from `(WebAppsClientSwapSlotWithProductionPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientSwapSlotWithProductionResponse], error)` -- Function `*WebAppsClient.ListSnapshotsSlot` return value(s) have been changed from `(*WebAppsClientListSnapshotsSlotPager)` to `(*runtime.Pager[WebAppsClientListSnapshotsSlotResponse])` -- Function `*PlansClient.ListUsages` return value(s) have been changed from `(*PlansClientListUsagesPager)` to `(*runtime.Pager[PlansClientListUsagesResponse])` -- Function `NewContainerAppsClient` return value(s) have been changed from `(*ContainerAppsClient)` to `(*ContainerAppsClient, error)` -- Function `*ResourceHealthMetadataClient.ListBySite` return value(s) have been changed from `(*ResourceHealthMetadataClientListBySitePager)` to `(*runtime.Pager[ResourceHealthMetadataClientListBySiteResponse])` -- Function `*ContainerAppsClient.ListBySubscription` return value(s) have been changed from `(*ContainerAppsClientListBySubscriptionPager)` to `(*runtime.Pager[ContainerAppsClientListBySubscriptionResponse])` -- Function `*StaticSitesClient.BeginCreateOrUpdateStaticSite` return value(s) have been changed from `(StaticSitesClientCreateOrUpdateStaticSitePollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientCreateOrUpdateStaticSiteResponse], error)` -- Function `*WebAppsClient.ListInstanceProcessThreads` return value(s) have been changed from `(*WebAppsClientListInstanceProcessThreadsPager)` to `(*runtime.Pager[WebAppsClientListInstanceProcessThreadsResponse])` -- Function `*DomainsClient.List` return value(s) have been changed from `(*DomainsClientListPager)` to `(*runtime.Pager[DomainsClientListResponse])` -- Function `NewPlansClient` return value(s) have been changed from `(*PlansClient)` to `(*PlansClient, error)` -- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot` return value(s) have been changed from `(WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse], error)` -- Function `*WebAppsClient.BeginRestoreSlot` return value(s) have been changed from `(WebAppsClientRestoreSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientRestoreSlotResponse], error)` -- Function `*WebAppsClient.ListBackupsSlot` return value(s) have been changed from `(*WebAppsClientListBackupsSlotPager)` to `(*runtime.Pager[WebAppsClientListBackupsSlotResponse])` -- Function `*EnvironmentsClient.BeginChangeVnet` return value(s) have been changed from `(EnvironmentsClientChangeVnetPollerResponse, error)` to `(*armruntime.Poller[*runtime.Pager[EnvironmentsClientChangeVnetResponse]], error)` -- Function `*StaticSitesClient.ListStaticSiteFunctions` return value(s) have been changed from `(*StaticSitesClientListStaticSiteFunctionsPager)` to `(*runtime.Pager[StaticSitesClientListStaticSiteFunctionsResponse])` -- Function `*ProviderClient.GetWebAppStacksForLocation` return value(s) have been changed from `(*ProviderClientGetWebAppStacksForLocationPager)` to `(*runtime.Pager[ProviderClientGetWebAppStacksForLocationResponse])` -- Function `*PlansClient.ListByResourceGroup` return value(s) have been changed from `(*PlansClientListByResourceGroupPager)` to `(*runtime.Pager[PlansClientListByResourceGroupResponse])` -- Function `*WebAppsClient.ListInstanceProcesses` return value(s) have been changed from `(*WebAppsClientListInstanceProcessesPager)` to `(*runtime.Pager[WebAppsClientListInstanceProcessesResponse])` -- Function `*RecommendationsClient.List` return value(s) have been changed from `(*RecommendationsClientListPager)` to `(*runtime.Pager[RecommendationsClientListResponse])` -- Function `*ProviderClient.ListOperations` return value(s) have been changed from `(*ProviderClientListOperationsPager)` to `(*runtime.Pager[ProviderClientListOperationsResponse])` -- Function `*StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection` return value(s) have been changed from `(StaticSitesClientApproveOrRejectPrivateEndpointConnectionPollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse], error)` -- Function `*WebAppsClient.ListHostNameBindingsSlot` return value(s) have been changed from `(*WebAppsClientListHostNameBindingsSlotPager)` to `(*runtime.Pager[WebAppsClientListHostNameBindingsSlotResponse])` -- Function `*WebAppsClient.ListProcessThreads` return value(s) have been changed from `(*WebAppsClientListProcessThreadsPager)` to `(*runtime.Pager[WebAppsClientListProcessThreadsResponse])` -- Function `*PlansClient.ListWebAppsByHybridConnection` return value(s) have been changed from `(*PlansClientListWebAppsByHybridConnectionPager)` to `(*runtime.Pager[PlansClientListWebAppsByHybridConnectionResponse])` -- Function `*CertificatesClient.ListByResourceGroup` return value(s) have been changed from `(*CertificatesClientListByResourceGroupPager)` to `(*runtime.Pager[CertificatesClientListByResourceGroupResponse])` -- Function `*WebAppsClient.BeginListPublishingCredentialsSlot` return value(s) have been changed from `(WebAppsClientListPublishingCredentialsSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientListPublishingCredentialsSlotResponse], error)` -- Function `*KubeEnvironmentsClient.BeginDelete` return value(s) have been changed from `(KubeEnvironmentsClientDeletePollerResponse, error)` to `(*armruntime.Poller[KubeEnvironmentsClientDeleteResponse], error)` -- Function `*EnvironmentsClient.BeginResume` return value(s) have been changed from `(EnvironmentsClientResumePollerResponse, error)` to `(*armruntime.Poller[*runtime.Pager[EnvironmentsClientResumeResponse]], error)` -- Function `*WebAppsClient.ListBasicPublishingCredentialsPoliciesSlot` return value(s) have been changed from `(*WebAppsClientListBasicPublishingCredentialsPoliciesSlotPager)` to `(*runtime.Pager[WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse])` -- Function `*StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite` return value(s) have been changed from `(*StaticSitesClientGetUserProvidedFunctionAppsForStaticSitePager)` to `(*runtime.Pager[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse])` -- Function `*WebAppsClient.BeginCreateOrUpdateSlot` return value(s) have been changed from `(WebAppsClientCreateOrUpdateSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientCreateOrUpdateSlotResponse], error)` -- Function `*EnvironmentsClient.ListWorkerPoolSKUs` return value(s) have been changed from `(*EnvironmentsClientListWorkerPoolSKUsPager)` to `(*runtime.Pager[EnvironmentsClientListWorkerPoolSKUsResponse])` -- Function `*WebAppsClient.ListConfigurationsSlot` return value(s) have been changed from `(*WebAppsClientListConfigurationsSlotPager)` to `(*runtime.Pager[WebAppsClientListConfigurationsSlotResponse])` -- Function `*WebAppsClient.BeginCreateFunction` return value(s) have been changed from `(WebAppsClientCreateFunctionPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientCreateFunctionResponse], error)` -- Function `*WebAppsClient.BeginCreateOrUpdateSourceControl` return value(s) have been changed from `(WebAppsClientCreateOrUpdateSourceControlPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientCreateOrUpdateSourceControlResponse], error)` -- Function `*DomainRegistrationProviderClient.ListOperations` return value(s) have been changed from `(*DomainRegistrationProviderClientListOperationsPager)` to `(*runtime.Pager[DomainRegistrationProviderClientListOperationsResponse])` -- Function `*WebAppsClient.BeginDeletePrivateEndpointConnection` return value(s) have been changed from `(WebAppsClientDeletePrivateEndpointConnectionPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientDeletePrivateEndpointConnectionResponse], error)` -- Function `*WebAppsClient.BeginRestore` return value(s) have been changed from `(WebAppsClientRestorePollerResponse, error)` to `(*armruntime.Poller[WebAppsClientRestoreResponse], error)` -- Function `*EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection` return value(s) have been changed from `(EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPollerResponse, error)` to `(*armruntime.Poller[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse], error)` -- Function `*RecommendationsClient.ListRecommendedRulesForHostingEnvironment` return value(s) have been changed from `(*RecommendationsClientListRecommendedRulesForHostingEnvironmentPager)` to `(*runtime.Pager[RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse])` -- Function `NewDomainRegistrationProviderClient` return value(s) have been changed from `(*DomainRegistrationProviderClient)` to `(*DomainRegistrationProviderClient, error)` -- Function `*KubeEnvironmentsClient.ListByResourceGroup` return value(s) have been changed from `(*KubeEnvironmentsClientListByResourceGroupPager)` to `(*runtime.Pager[KubeEnvironmentsClientListByResourceGroupResponse])` -- Function `*KubeEnvironmentsClient.ListBySubscription` return value(s) have been changed from `(*KubeEnvironmentsClientListBySubscriptionPager)` to `(*runtime.Pager[KubeEnvironmentsClientListBySubscriptionResponse])` -- Function `*WebAppsClient.List` return value(s) have been changed from `(*WebAppsClientListPager)` to `(*runtime.Pager[WebAppsClientListResponse])` -- Function `*StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite` return value(s) have been changed from `(StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse], error)` -- Function `*StaticSitesClient.GetPrivateEndpointConnectionList` return value(s) have been changed from `(*StaticSitesClientGetPrivateEndpointConnectionListPager)` to `(*runtime.Pager[StaticSitesClientGetPrivateEndpointConnectionListResponse])` -- Function `*WebAppsClient.ListDomainOwnershipIdentifiers` return value(s) have been changed from `(*WebAppsClientListDomainOwnershipIdentifiersPager)` to `(*runtime.Pager[WebAppsClientListDomainOwnershipIdentifiersResponse])` -- Function `*WebAppsClient.ListTriggeredWebJobHistory` return value(s) have been changed from `(*WebAppsClientListTriggeredWebJobHistoryPager)` to `(*runtime.Pager[WebAppsClientListTriggeredWebJobHistoryResponse])` -- Function `*ResourceHealthMetadataClient.List` return value(s) have been changed from `(*ResourceHealthMetadataClientListPager)` to `(*runtime.Pager[ResourceHealthMetadataClientListResponse])` -- Function `NewDomainsClient` return value(s) have been changed from `(*DomainsClient)` to `(*DomainsClient, error)` -- Function `NewDeletedWebAppsClient` return value(s) have been changed from `(*DeletedWebAppsClient)` to `(*DeletedWebAppsClient, error)` -- Function `*WebAppsClient.ListProcesses` return value(s) have been changed from `(*WebAppsClientListProcessesPager)` to `(*runtime.Pager[WebAppsClientListProcessesResponse])` -- Function `*WebAppsClient.BeginCreateInstanceMSDeployOperation` return value(s) have been changed from `(WebAppsClientCreateInstanceMSDeployOperationPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientCreateInstanceMSDeployOperationResponse], error)` -- Function `*StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild` return value(s) have been changed from `(StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse], error)` -- Function `*ProviderClient.GetAvailableStacksOnPrem` return value(s) have been changed from `(*ProviderClientGetAvailableStacksOnPremPager)` to `(*runtime.Pager[ProviderClientGetAvailableStacksOnPremResponse])` -- Function `*WebAppsClient.ListContinuousWebJobsSlot` return value(s) have been changed from `(*WebAppsClientListContinuousWebJobsSlotPager)` to `(*runtime.Pager[WebAppsClientListContinuousWebJobsSlotResponse])` -- Function `*WebSiteManagementClient.ListSiteIdentifiersAssignedToHostName` return value(s) have been changed from `(*WebSiteManagementClientListSiteIdentifiersAssignedToHostNamePager)` to `(*runtime.Pager[WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse])` -- Function `NewGlobalClient` return value(s) have been changed from `(*GlobalClient)` to `(*GlobalClient, error)` -- Function `*StaticSitesClient.ListStaticSiteCustomDomains` return value(s) have been changed from `(*StaticSitesClientListStaticSiteCustomDomainsPager)` to `(*runtime.Pager[StaticSitesClientListStaticSiteCustomDomainsResponse])` -- Function `*StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild` return value(s) have been changed from `(StaticSitesClientCreateZipDeploymentForStaticSiteBuildPollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse], error)` -- Function `*EnvironmentsClient.GetInboundNetworkDependenciesEndpoints` return value(s) have been changed from `(*EnvironmentsClientGetInboundNetworkDependenciesEndpointsPager)` to `(*runtime.Pager[EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse])` -- Function `*EnvironmentsClient.ListWebWorkerUsages` return value(s) have been changed from `(*EnvironmentsClientListWebWorkerUsagesPager)` to `(*runtime.Pager[EnvironmentsClientListWebWorkerUsagesResponse])` -- Function `*WebAppsClient.BeginCreateOrUpdate` return value(s) have been changed from `(WebAppsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[WebAppsClientCreateOrUpdateResponse], error)` -- Function `*ContainerAppsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ContainerAppsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ContainerAppsClientCreateOrUpdateResponse], error)` -- Function `*EnvironmentsClient.ListWebApps` return value(s) have been changed from `(*EnvironmentsClientListWebAppsPager)` to `(*runtime.Pager[EnvironmentsClientListWebAppsResponse])` -- Function `*EnvironmentsClient.GetOutboundNetworkDependenciesEndpoints` return value(s) have been changed from `(*EnvironmentsClientGetOutboundNetworkDependenciesEndpointsPager)` to `(*runtime.Pager[EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse])` -- Function `*WebAppsClient.ListUsagesSlot` return value(s) have been changed from `(*WebAppsClientListUsagesSlotPager)` to `(*runtime.Pager[WebAppsClientListUsagesSlotResponse])` -- Function `*WebAppsClient.BeginInstallSiteExtensionSlot` return value(s) have been changed from `(WebAppsClientInstallSiteExtensionSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientInstallSiteExtensionSlotResponse], error)` -- Function `NewWebAppsClient` return value(s) have been changed from `(*WebAppsClient)` to `(*WebAppsClient, error)` -- Function `*TopLevelDomainsClient.ListAgreements` return value(s) have been changed from `(*TopLevelDomainsClientListAgreementsPager)` to `(*runtime.Pager[TopLevelDomainsClientListAgreementsResponse])` -- Function `*WebAppsClient.ListSiteBackups` return value(s) have been changed from `(*WebAppsClientListSiteBackupsPager)` to `(*runtime.Pager[WebAppsClientListSiteBackupsResponse])` -- Function `*CertificateOrdersClient.ListCertificates` return value(s) have been changed from `(*CertificateOrdersClientListCertificatesPager)` to `(*runtime.Pager[CertificateOrdersClientListCertificatesResponse])` -- Function `*WebAppsClient.GetAppSettingsKeyVaultReferences` return value(s) have been changed from `(*WebAppsClientGetAppSettingsKeyVaultReferencesPager)` to `(*runtime.Pager[WebAppsClientGetAppSettingsKeyVaultReferencesResponse])` -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReferencesSlot` return value(s) have been changed from `(*WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotPager)` to `(*runtime.Pager[WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse])` -- Function `NewEnvironmentsClient` return value(s) have been changed from `(*EnvironmentsClient)` to `(*EnvironmentsClient, error)` -- Function `*WebAppsClient.BeginRestoreFromBackupBlobSlot` return value(s) have been changed from `(WebAppsClientRestoreFromBackupBlobSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientRestoreFromBackupBlobSlotResponse], error)` -- Function `*WebAppsClient.BeginCreateOrUpdateSourceControlSlot` return value(s) have been changed from `(WebAppsClientCreateOrUpdateSourceControlSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientCreateOrUpdateSourceControlSlotResponse], error)` -- Function `*WebAppsClient.ListProcessModules` return value(s) have been changed from `(*WebAppsClientListProcessModulesPager)` to `(*runtime.Pager[WebAppsClientListProcessModulesResponse])` -- Function `*WebAppsClient.ListTriggeredWebJobHistorySlot` return value(s) have been changed from `(*WebAppsClientListTriggeredWebJobHistorySlotPager)` to `(*runtime.Pager[WebAppsClientListTriggeredWebJobHistorySlotResponse])` -- Function `*StaticSitesClient.ListStaticSiteUsers` return value(s) have been changed from `(*StaticSitesClientListStaticSiteUsersPager)` to `(*runtime.Pager[StaticSitesClientListStaticSiteUsersResponse])` -- Function `*DeletedWebAppsClient.List` return value(s) have been changed from `(*DeletedWebAppsClientListPager)` to `(*runtime.Pager[DeletedWebAppsClientListResponse])` -- Function `*EnvironmentsClient.ListUsages` return value(s) have been changed from `(*EnvironmentsClientListUsagesPager)` to `(*runtime.Pager[EnvironmentsClientListUsagesResponse])` -- Function `*WebSiteManagementClient.ListSourceControls` return value(s) have been changed from `(*WebSiteManagementClientListSourceControlsPager)` to `(*runtime.Pager[WebSiteManagementClientListSourceControlsResponse])` -- Function `*EnvironmentsClient.BeginSuspend` return value(s) have been changed from `(EnvironmentsClientSuspendPollerResponse, error)` to `(*armruntime.Poller[*runtime.Pager[EnvironmentsClientSuspendResponse]], error)` -- Function `*WebAppsClient.ListSlotDifferencesFromProduction` return value(s) have been changed from `(*WebAppsClientListSlotDifferencesFromProductionPager)` to `(*runtime.Pager[WebAppsClientListSlotDifferencesFromProductionResponse])` -- Function `*WebAppsClient.ListConfigurations` return value(s) have been changed from `(*WebAppsClientListConfigurationsPager)` to `(*runtime.Pager[WebAppsClientListConfigurationsResponse])` -- Function `*CertificateOrdersClient.BeginCreateOrUpdateCertificate` return value(s) have been changed from `(CertificateOrdersClientCreateOrUpdateCertificatePollerResponse, error)` to `(*armruntime.Poller[CertificateOrdersClientCreateOrUpdateCertificateResponse], error)` -- Function `*WebAppsClient.ListDomainOwnershipIdentifiersSlot` return value(s) have been changed from `(*WebAppsClientListDomainOwnershipIdentifiersSlotPager)` to `(*runtime.Pager[WebAppsClientListDomainOwnershipIdentifiersSlotResponse])` -- Function `*StaticSitesClient.ListStaticSiteBuildFunctions` return value(s) have been changed from `(*StaticSitesClientListStaticSiteBuildFunctionsPager)` to `(*runtime.Pager[StaticSitesClientListStaticSiteBuildFunctionsResponse])` -- Function `*WebAppsClient.ListConfigurationSnapshotInfo` return value(s) have been changed from `(*WebAppsClientListConfigurationSnapshotInfoPager)` to `(*runtime.Pager[WebAppsClientListConfigurationSnapshotInfoResponse])` -- Function `*CertificateOrdersClient.ListByResourceGroup` return value(s) have been changed from `(*CertificateOrdersClientListByResourceGroupPager)` to `(*runtime.Pager[CertificateOrdersClientListByResourceGroupResponse])` -- Function `*WebAppsClient.ListInstanceIdentifiers` return value(s) have been changed from `(*WebAppsClientListInstanceIdentifiersPager)` to `(*runtime.Pager[WebAppsClientListInstanceIdentifiersResponse])` -- Function `*StaticSitesClient.BeginDeleteStaticSite` return value(s) have been changed from `(StaticSitesClientDeleteStaticSitePollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientDeleteStaticSiteResponse], error)` -- Function `NewTopLevelDomainsClient` return value(s) have been changed from `(*TopLevelDomainsClient)` to `(*TopLevelDomainsClient, error)` -- Function `*DomainsClient.ListRecommendations` return value(s) have been changed from `(*DomainsClientListRecommendationsPager)` to `(*runtime.Pager[DomainsClientListRecommendationsResponse])` -- Function `*CertificatesClient.List` return value(s) have been changed from `(*CertificatesClientListPager)` to `(*runtime.Pager[CertificatesClientListResponse])` -- Function `*EnvironmentsClient.ListAppServicePlans` return value(s) have been changed from `(*EnvironmentsClientListAppServicePlansPager)` to `(*runtime.Pager[EnvironmentsClientListAppServicePlansResponse])` -- Function `*StaticSitesClient.BeginDeleteStaticSiteCustomDomain` return value(s) have been changed from `(StaticSitesClientDeleteStaticSiteCustomDomainPollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientDeleteStaticSiteCustomDomainResponse], error)` -- Function `*WebAppsClient.ListPerfMonCounters` return value(s) have been changed from `(*WebAppsClientListPerfMonCountersPager)` to `(*runtime.Pager[WebAppsClientListPerfMonCountersResponse])` -- Function `*WebAppsClient.ListProcessesSlot` return value(s) have been changed from `(*WebAppsClientListProcessesSlotPager)` to `(*runtime.Pager[WebAppsClientListProcessesSlotResponse])` -- Function `*WebSiteManagementClient.ListCustomHostNameSites` return value(s) have been changed from `(*WebSiteManagementClientListCustomHostNameSitesPager)` to `(*runtime.Pager[WebSiteManagementClientListCustomHostNameSitesResponse])` -- Function `*DiagnosticsClient.ListSiteDetectorsSlot` return value(s) have been changed from `(*DiagnosticsClientListSiteDetectorsSlotPager)` to `(*runtime.Pager[DiagnosticsClientListSiteDetectorsSlotResponse])` -- Function `*EnvironmentsClient.ListWebWorkerMetricDefinitions` return value(s) have been changed from `(*EnvironmentsClientListWebWorkerMetricDefinitionsPager)` to `(*runtime.Pager[EnvironmentsClientListWebWorkerMetricDefinitionsResponse])` -- Function `*WebAppsClient.ListSnapshotsFromDRSecondarySlot` return value(s) have been changed from `(*WebAppsClientListSnapshotsFromDRSecondarySlotPager)` to `(*runtime.Pager[WebAppsClientListSnapshotsFromDRSecondarySlotResponse])` -- Function `*CertificateOrdersClient.List` return value(s) have been changed from `(*CertificateOrdersClientListPager)` to `(*runtime.Pager[CertificateOrdersClientListResponse])` -- Function `*EnvironmentsClient.ListMultiRoleUsages` return value(s) have been changed from `(*EnvironmentsClientListMultiRoleUsagesPager)` to `(*runtime.Pager[EnvironmentsClientListMultiRoleUsagesResponse])` -- Function `*StaticSitesClient.BeginCreateZipDeploymentForStaticSite` return value(s) have been changed from `(StaticSitesClientCreateZipDeploymentForStaticSitePollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientCreateZipDeploymentForStaticSiteResponse], error)` -- Function `*ProviderClient.GetFunctionAppStacks` return value(s) have been changed from `(*ProviderClientGetFunctionAppStacksPager)` to `(*runtime.Pager[ProviderClientGetFunctionAppStacksResponse])` -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReferences` return value(s) have been changed from `(*WebAppsClientGetSiteConnectionStringKeyVaultReferencesPager)` to `(*runtime.Pager[WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse])` -- Function `*StaticSitesClient.List` return value(s) have been changed from `(*StaticSitesClientListPager)` to `(*runtime.Pager[StaticSitesClientListResponse])` -- Function `*WebAppsClient.BeginDeletePrivateEndpointConnectionSlot` return value(s) have been changed from `(WebAppsClientDeletePrivateEndpointConnectionSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientDeletePrivateEndpointConnectionSlotResponse], error)` -- Function `*ContainerAppsRevisionsClient.ListRevisions` return value(s) have been changed from `(*ContainerAppsRevisionsClientListRevisionsPager)` to `(*runtime.Pager[ContainerAppsRevisionsClientListRevisionsResponse])` -- Function `NewRecommendationsClient` return value(s) have been changed from `(*RecommendationsClient)` to `(*RecommendationsClient, error)` -- Function `*WebAppsClient.ListPublicCertificates` return value(s) have been changed from `(*WebAppsClientListPublicCertificatesPager)` to `(*runtime.Pager[WebAppsClientListPublicCertificatesResponse])` -- Function `*WebAppsClient.ListProcessModulesSlot` return value(s) have been changed from `(*WebAppsClientListProcessModulesSlotPager)` to `(*runtime.Pager[WebAppsClientListProcessModulesSlotResponse])` -- Function `*StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite` return value(s) have been changed from `(StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePollerResponse, error)` to `(*armruntime.Poller[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse], error)` -- Function `*WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot` return value(s) have been changed from `(WebAppsClientStartWebSiteNetworkTraceOperationSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse], error)` -- Function `*WebAppsClient.ListDeploymentsSlot` return value(s) have been changed from `(*WebAppsClientListDeploymentsSlotPager)` to `(*runtime.Pager[WebAppsClientListDeploymentsSlotResponse])` -- Function `*WebAppsClient.BeginCreateInstanceFunctionSlot` return value(s) have been changed from `(WebAppsClientCreateInstanceFunctionSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientCreateInstanceFunctionSlotResponse], error)` -- Function `*WebAppsClient.ListWebJobs` return value(s) have been changed from `(*WebAppsClientListWebJobsPager)` to `(*runtime.Pager[WebAppsClientListWebJobsResponse])` -- Function `*RecommendationsClient.ListHistoryForWebApp` return value(s) have been changed from `(*RecommendationsClientListHistoryForWebAppPager)` to `(*runtime.Pager[RecommendationsClientListHistoryForWebAppResponse])` -- Function `*EnvironmentsClient.ListMultiRoleMetricDefinitions` return value(s) have been changed from `(*EnvironmentsClientListMultiRoleMetricDefinitionsPager)` to `(*runtime.Pager[EnvironmentsClientListMultiRoleMetricDefinitionsResponse])` -- Function `*WebAppsClient.ListInstanceProcessesSlot` return value(s) have been changed from `(*WebAppsClientListInstanceProcessesSlotPager)` to `(*runtime.Pager[WebAppsClientListInstanceProcessesSlotResponse])` -- Function `*EnvironmentsClient.ListWorkerPoolInstanceMetricDefinitions` return value(s) have been changed from `(*EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsPager)` to `(*runtime.Pager[EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse])` -- Function `*EnvironmentsClient.ListCapacities` return value(s) have been changed from `(*EnvironmentsClientListCapacitiesPager)` to `(*runtime.Pager[EnvironmentsClientListCapacitiesResponse])` -- Function `*KubeEnvironmentsClient.BeginCreateOrUpdate` return value(s) have been changed from `(KubeEnvironmentsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[KubeEnvironmentsClientCreateOrUpdateResponse], error)` -- Function `*WebAppsClient.ListInstanceFunctionsSlot` return value(s) have been changed from `(*WebAppsClientListInstanceFunctionsSlotPager)` to `(*runtime.Pager[WebAppsClientListInstanceFunctionsSlotResponse])` -- Function `*WebAppsClient.ListSiteExtensionsSlot` return value(s) have been changed from `(*WebAppsClientListSiteExtensionsSlotPager)` to `(*runtime.Pager[WebAppsClientListSiteExtensionsSlotResponse])` -- Function `*WebAppsClient.ListSiteBackupsSlot` return value(s) have been changed from `(*WebAppsClientListSiteBackupsSlotPager)` to `(*runtime.Pager[WebAppsClientListSiteBackupsSlotResponse])` -- Function `*ProviderClient.GetAvailableStacks` return value(s) have been changed from `(*ProviderClientGetAvailableStacksPager)` to `(*runtime.Pager[ProviderClientGetAvailableStacksResponse])` -- Function `*WebAppsClient.ListTriggeredWebJobs` return value(s) have been changed from `(*WebAppsClientListTriggeredWebJobsPager)` to `(*runtime.Pager[WebAppsClientListTriggeredWebJobsResponse])` -- Function `*DomainsClient.BeginCreateOrUpdate` return value(s) have been changed from `(DomainsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[DomainsClientCreateOrUpdateResponse], error)` -- Function `*StaticSitesClient.GetStaticSitesByResourceGroup` return value(s) have been changed from `(*StaticSitesClientGetStaticSitesByResourceGroupPager)` to `(*runtime.Pager[StaticSitesClientGetStaticSitesByResourceGroupResponse])` -- Function `*WebAppsClient.ListFunctions` return value(s) have been changed from `(*WebAppsClientListFunctionsPager)` to `(*runtime.Pager[WebAppsClientListFunctionsResponse])` -- Function `*WebAppsClient.BeginInstallSiteExtension` return value(s) have been changed from `(WebAppsClientInstallSiteExtensionPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientInstallSiteExtensionResponse], error)` -- Function `*WebAppsClient.BeginRestoreFromDeletedApp` return value(s) have been changed from `(WebAppsClientRestoreFromDeletedAppPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientRestoreFromDeletedAppResponse], error)` -- Function `*EnvironmentsClient.BeginDelete` return value(s) have been changed from `(EnvironmentsClientDeletePollerResponse, error)` to `(*armruntime.Poller[EnvironmentsClientDeleteResponse], error)` -- Function `*WebAppsClient.ListSlots` return value(s) have been changed from `(*WebAppsClientListSlotsPager)` to `(*runtime.Pager[WebAppsClientListSlotsResponse])` -- Function `*WebAppsClient.BeginSwapSlot` return value(s) have been changed from `(WebAppsClientSwapSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientSwapSlotResponse], error)` -- Function `*EnvironmentsClient.BeginCreateOrUpdate` return value(s) have been changed from `(EnvironmentsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[EnvironmentsClientCreateOrUpdateResponse], error)` -- Function `*WebAppsClient.ListPerfMonCountersSlot` return value(s) have been changed from `(*WebAppsClientListPerfMonCountersSlotPager)` to `(*runtime.Pager[WebAppsClientListPerfMonCountersSlotResponse])` -- Function `*WebAppsClient.ListContinuousWebJobs` return value(s) have been changed from `(*WebAppsClientListContinuousWebJobsPager)` to `(*runtime.Pager[WebAppsClientListContinuousWebJobsResponse])` -- Function `*DiagnosticsClient.ListSiteDetectorResponsesSlot` return value(s) have been changed from `(*DiagnosticsClientListSiteDetectorResponsesSlotPager)` to `(*runtime.Pager[DiagnosticsClientListSiteDetectorResponsesSlotResponse])` -- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection` return value(s) have been changed from `(WebAppsClientApproveOrRejectPrivateEndpointConnectionPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse], error)` -- Function `*ContainerAppsClient.BeginDelete` return value(s) have been changed from `(ContainerAppsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ContainerAppsClientDeleteResponse], error)` -- Function `NewDiagnosticsClient` return value(s) have been changed from `(*DiagnosticsClient)` to `(*DiagnosticsClient, error)` -- Function `NewCertificateRegistrationProviderClient` return value(s) have been changed from `(*CertificateRegistrationProviderClient)` to `(*CertificateRegistrationProviderClient, error)` -- Function `*DiagnosticsClient.ListSiteDetectorResponses` return value(s) have been changed from `(*DiagnosticsClientListSiteDetectorResponsesPager)` to `(*runtime.Pager[DiagnosticsClientListSiteDetectorResponsesResponse])` -- Function `*WebAppsClient.BeginRestoreFromBackupBlob` return value(s) have been changed from `(WebAppsClientRestoreFromBackupBlobPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientRestoreFromBackupBlobResponse], error)` -- Function `*WebAppsClient.ListSiteExtensions` return value(s) have been changed from `(*WebAppsClientListSiteExtensionsPager)` to `(*runtime.Pager[WebAppsClientListSiteExtensionsResponse])` -- Function `NewContainerAppsRevisionsClient` return value(s) have been changed from `(*ContainerAppsRevisionsClient)` to `(*ContainerAppsRevisionsClient, error)` -- Function `*WebAppsClient.ListHostNameBindings` return value(s) have been changed from `(*WebAppsClientListHostNameBindingsPager)` to `(*runtime.Pager[WebAppsClientListHostNameBindingsResponse])` -- Function `NewKubeEnvironmentsClient` return value(s) have been changed from `(*KubeEnvironmentsClient)` to `(*KubeEnvironmentsClient, error)` -- Function `*PlansClient.ListWebApps` return value(s) have been changed from `(*PlansClientListWebAppsPager)` to `(*runtime.Pager[PlansClientListWebAppsResponse])` -- Function `*PlansClient.BeginCreateOrUpdate` return value(s) have been changed from `(PlansClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[PlansClientCreateOrUpdateResponse], error)` -- Function `*WebAppsClient.BeginRestoreFromDeletedAppSlot` return value(s) have been changed from `(WebAppsClientRestoreFromDeletedAppSlotPollerResponse, error)` to `(*armruntime.Poller[WebAppsClientRestoreFromDeletedAppSlotResponse], error)` -- Function `*TopLevelDomainsClient.List` return value(s) have been changed from `(*TopLevelDomainsClientListPager)` to `(*runtime.Pager[TopLevelDomainsClientListResponse])` -- Function `*ProviderClient.GetWebAppStacks` return value(s) have been changed from `(*ProviderClientGetWebAppStacksPager)` to `(*runtime.Pager[ProviderClientGetWebAppStacksResponse])` -- Function `*CertificateRegistrationProviderClient.ListOperations` return value(s) have been changed from `(*CertificateRegistrationProviderClientListOperationsPager)` to `(*runtime.Pager[CertificateRegistrationProviderClientListOperationsResponse])` -- Function `*WebAppsClientCreateInstanceFunctionSlotPoller.FinalResponse` has been removed -- Function `*WebAppsClientRestoreSnapshotSlotPoller.ResumeToken` has been removed -- Function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPollerResponse.Resume` has been removed -- Function `SSLState.ToPtr` has been removed -- Function `*WebAppsClientListPublishingCredentialsSlotPoller.FinalResponse` has been removed -- Function `*WebAppsClientRestoreSnapshotSlotPoller.Done` has been removed -- Function `*WebAppsClientStartWebSiteNetworkTraceOperationPoller.FinalResponse` has been removed -- Function `*StaticSitesClientListStaticSiteCustomDomainsPager.PageResponse` has been removed -- Function `*ContainerAppsRevisionsClientListRevisionsPager.NextPage` has been removed -- Function `*WebAppsClientGetPrivateEndpointConnectionListSlotPager.NextPage` has been removed -- Function `*WebAppsClientListContinuousWebJobsPager.NextPage` has been removed -- Function `*WebSiteManagementClientListSourceControlsPager.NextPage` has been removed -- Function `*DomainsClientListOwnershipIdentifiersPager.PageResponse` has been removed -- Function `*EnvironmentsClientListWorkerPoolsPager.NextPage` has been removed -- Function `*StaticSitesClientListPager.NextPage` has been removed -- Function `*WebAppsClientListUsagesPager.PageResponse` has been removed -- Function `*RecommendationsClientListRecommendedRulesForWebAppPager.Err` has been removed -- Function `*PlansClientListByResourceGroupPager.PageResponse` has been removed -- Function `*WebAppsClientListPublishingCredentialsSlotPoller.Done` has been removed -- Function `*WebAppsClientDeletePrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.Done` has been removed -- Function `IPFilterTag.ToPtr` has been removed -- Function `*DiagnosticsClientListSiteDetectorResponsesPager.Err` has been removed -- Function `BackupItemStatus.ToPtr` has been removed -- Function `*RecommendationsClientListHistoryForWebAppPager.Err` has been removed -- Function `ContainerAppsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientChangeVnetPoller.FinalResponse` has been removed -- Function `*WebAppsClientListInstanceIdentifiersSlotPager.Err` has been removed -- Function `*EnvironmentsClientListWorkerPoolsPager.PageResponse` has been removed -- Function `*WebAppsClientListInstanceFunctionsSlotPager.Err` has been removed -- Function `WebAppsClientDeletePrivateEndpointConnectionSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListSiteExtensionsPager.Err` has been removed -- Function `*EnvironmentsClientSuspendPager.PageResponse` has been removed -- Function `*ProviderClientListOperationsPager.NextPage` has been removed -- Function `*WebAppsClientListProcessModulesSlotPager.Err` has been removed -- Function `*ProviderClientGetAvailableStacksPager.Err` has been removed -- Function `*EnvironmentsClientResumePoller.ResumeToken` has been removed -- Function `*WebAppsClientListDeploymentsPager.Err` has been removed -- Function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*WebAppsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*WebSiteManagementClientListSiteIdentifiersAssignedToHostNamePager.PageResponse` has been removed -- Function `*ProviderClientListOperationsPager.PageResponse` has been removed -- Function `*EnvironmentsClientCreateOrUpdatePoller.Done` has been removed -- Function `*StaticSitesClientDeletePrivateEndpointConnectionPoller.Done` has been removed -- Function `*StaticSitesClientDeleteStaticSiteBuildPoller.FinalResponse` has been removed -- Function `*EnvironmentsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*WebAppsClientListWebJobsPager.NextPage` has been removed -- Function `ClientCertMode.ToPtr` has been removed -- Function `*WebAppsClientListPerfMonCountersPager.PageResponse` has been removed -- Function `*WebAppsClientListProcessesPager.NextPage` has been removed -- Function `*WebAppsClientListBackupsPager.PageResponse` has been removed -- Function `*PlansClientListHybridConnectionsPager.NextPage` has been removed -- Function `FrontEndServiceType.ToPtr` has been removed -- Function `WebAppsClientRestorePollerResponse.PollUntilDone` has been removed -- Function `*CertificateOrdersClientCreateOrUpdatePoller.Poll` has been removed -- Function `*CertificateOrdersClientListCertificatesPager.NextPage` has been removed -- Function `*WebAppsClientListProcessModulesSlotPager.PageResponse` has been removed -- Function `*EnvironmentsClientGetOutboundNetworkDependenciesEndpointsPager.PageResponse` has been removed -- Function `*WebSiteManagementClientListPremierAddOnOffersPager.PageResponse` has been removed -- Function `*WebAppsClientListProcessModulesPager.Err` has been removed -- Function `*EnvironmentsClientListUsagesPager.NextPage` has been removed -- Function `*WebAppsClientListWebJobsPager.Err` has been removed -- Function `*WebAppsClientListSiteExtensionsPager.PageResponse` has been removed -- Function `*EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `*EnvironmentsClientGetOutboundNetworkDependenciesEndpointsPager.Err` has been removed -- Function `WebAppsClientApproveOrRejectPrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `*StaticSitesClientDeleteStaticSiteCustomDomainPoller.FinalResponse` has been removed -- Function `*PlansClientCreateOrUpdatePoller.Done` has been removed -- Function `*CertificatesClientListPager.Err` has been removed -- Function `*WebAppsClientStartNetworkTracePoller.FinalResponse` has been removed -- Function `Enum17.ToPtr` has been removed -- Function `*WebAppsClientListPager.Err` has been removed -- Function `WebAppsClientRestoreFromBackupBlobPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListConfigurationsSlotPager.Err` has been removed -- Function `*EnvironmentsClientCreateOrUpdateMultiRolePoolPoller.ResumeToken` has been removed -- Function `*WebAppsClientCreateMSDeployOperationPoller.FinalResponse` has been removed -- Function `*DomainsClientListPager.PageResponse` has been removed -- Function `*PlansClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `ContinuousWebJobStatus.ToPtr` has been removed -- Function `*WebAppsClientCreateOrUpdateSlotPoller.Done` has been removed -- Function `*WebAppsClientRestoreFromDeletedAppPoller.ResumeToken` has been removed -- Function `*CertificateOrdersClientListCertificatesPager.Err` has been removed -- Function `*CertificateOrdersClientCreateOrUpdateCertificatePollerResponse.Resume` has been removed -- Function `*DiagnosticsClientListSiteDetectorsPager.PageResponse` has been removed -- Function `*ContainerAppsRevisionsClientListRevisionsPager.PageResponse` has been removed -- Function `*PlansClientListWebAppsPager.PageResponse` has been removed -- Function `WebAppsClientCreateFunctionPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListPerfMonCountersSlotPager.Err` has been removed -- Function `*StaticSitesClientCreateZipDeploymentForStaticSiteBuildPoller.Poll` has been removed -- Function `PublicCertificateLocation.ToPtr` has been removed -- Function `*WebAppsClientListPerfMonCountersPager.Err` has been removed -- Function `*EnvironmentsClientListCapacitiesPager.PageResponse` has been removed -- Function `DomainPropertiesDomainNotRenewableReasonsItem.ToPtr` has been removed -- Function `*WebAppsClientCreateOrUpdateSourceControlSlotPoller.Poll` has been removed -- Function `*WebAppsClientCreateOrUpdateSourceControlSlotPollerResponse.Resume` has been removed -- Function `ComputeModeOptions.ToPtr` has been removed -- Function `*WebSiteManagementClientListCustomHostNameSitesPager.NextPage` has been removed -- Function `*KubeEnvironmentsClientListByResourceGroupPager.NextPage` has been removed -- Function `*EnvironmentsClientResumePollerResponse.Resume` has been removed -- Function `WebAppsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientCreateOrUpdateSourceControlSlotPoller.Done` has been removed -- Function `ProvisioningState.ToPtr` has been removed -- Function `*DomainsClientListByResourceGroupPager.PageResponse` has been removed -- Function `*PlansClientListWebAppsByHybridConnectionPager.PageResponse` has been removed -- Function `*EnvironmentsClientListWebWorkerUsagesPager.NextPage` has been removed -- Function `*DomainsClientListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsClientInstallSiteExtensionPoller.ResumeToken` has been removed -- Function `AutoHealActionType.ToPtr` has been removed -- Function `*WebAppsClientListBasicPublishingCredentialsPoliciesPager.NextPage` has been removed -- Function `*WebAppsClientRestoreSlotPoller.Poll` has been removed -- Function `AzureStorageState.ToPtr` has been removed -- Function `*EnvironmentsClientResumePoller.Done` has been removed -- Function `AppServicePlanRestrictions.ToPtr` has been removed -- Function `*EnvironmentsClientListMultiRoleUsagesPager.NextPage` has been removed -- Function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.FinalResponse` has been removed -- Function `*DomainsClientListOwnershipIdentifiersPager.NextPage` has been removed -- Function `*WebAppsClientListDeploymentsSlotPager.PageResponse` has been removed -- Function `*WebAppsClientListSlotsPager.Err` has been removed -- Function `*CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponsePager.Err` has been removed -- Function `*WebAppsClientListInstanceProcessModulesSlotPager.NextPage` has been removed -- Function `*WebAppsClientListBackupsSlotPager.PageResponse` has been removed -- Function `*EnvironmentsClientListWebWorkerUsagesPager.PageResponse` has been removed -- Function `*WebAppsClientCreateInstanceMSDeployOperationSlotPoller.FinalResponse` has been removed -- Function `*WebAppsClientCreateOrUpdateSourceControlPoller.Done` has been removed -- Function `*DiagnosticsClientListSiteDetectorResponsesSlotPager.Err` has been removed -- Function `*PlansClientListUsagesPager.Err` has been removed -- Function `*WebAppsClientListProcessesSlotPager.Err` has been removed -- Function `*StaticSitesClientCreateZipDeploymentForStaticSiteBuildPoller.Done` has been removed -- Function `WebAppsClientStartNetworkTraceSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientGetPrivateEndpointConnectionListSlotPager.Err` has been removed -- Function `*ContainerAppsClientDeletePoller.Poll` has been removed -- Function `*WebAppsClientListConfigurationsSlotPager.NextPage` has been removed -- Function `*StaticSitesClientGetStaticSiteBuildsPager.NextPage` has been removed -- Function `*StaticSitesClientListStaticSiteUsersPager.Err` has been removed -- Function `LoadBalancingMode.ToPtr` has been removed -- Function `*CertificatesClientListByResourceGroupPager.Err` has been removed -- Function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSitePager.Err` has been removed -- Function `*WebAppsClientListUsagesSlotPager.Err` has been removed -- Function `StaticSitesClientDeletePrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientResumePager.NextPage` has been removed -- Function `WebAppsClientListPublishingCredentialsPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotPoller.FinalResponse` has been removed -- Function `*StaticSitesClientListStaticSiteFunctionsPager.Err` has been removed -- Function `*WebAppsClientListPublicCertificatesPager.Err` has been removed -- Function `*WebAppsClientCreateFunctionPollerResponse.Resume` has been removed -- Function `*StaticSitesClientApproveOrRejectPrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*WebAppsClientListConfigurationSnapshotInfoPager.PageResponse` has been removed -- Function `StorageType.ToPtr` has been removed -- Function `*EnvironmentsClientDeletePoller.Poll` has been removed -- Function `*StaticSitesClientDeleteStaticSiteCustomDomainPollerResponse.Resume` has been removed -- Function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotPager.Err` has been removed -- Function `MSDeployProvisioningState.ToPtr` has been removed -- Function `*PlansClientListPager.Err` has been removed -- Function `*ContainerAppsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*WebAppsClientRestoreFromDeletedAppSlotPollerResponse.Resume` has been removed -- Function `*WebSiteManagementClientListPremierAddOnOffersPager.Err` has been removed -- Function `*WebSiteManagementClientListGeoRegionsPager.PageResponse` has been removed -- Function `*EnvironmentsClientDeletePrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*ResourceHealthMetadataClientListBySiteSlotPager.NextPage` has been removed -- Function `*ContainerAppsClientCreateOrUpdatePoller.Done` has been removed -- Function `*RecommendationsClientListHistoryForHostingEnvironmentPager.Err` has been removed -- Function `*DomainRegistrationProviderClientListOperationsPager.PageResponse` has been removed -- Function `*WebAppsClientListPager.NextPage` has been removed -- Function `SiteLoadBalancing.ToPtr` has been removed -- Function `*WebAppsClientListSnapshotsFromDRSecondaryPager.PageResponse` has been removed -- Function `*WebAppsClientCreateInstanceFunctionSlotPoller.Poll` has been removed -- Function `*ResourceHealthMetadataClientListPager.NextPage` has been removed -- Function `*WebAppsClientListTriggeredWebJobsSlotPager.PageResponse` has been removed -- Function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.ResumeToken` has been removed -- Function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotPoller.Done` has been removed -- Function `*EnvironmentsClientChangeVnetPoller.Poll` has been removed -- Function `*DiagnosticsClientListHostingEnvironmentDetectorResponsesPager.PageResponse` has been removed -- Function `NotificationLevel.ToPtr` has been removed -- Function `*WebAppsClientListPublishingCredentialsSlotPollerResponse.Resume` has been removed -- Function `*EnvironmentsClientListUsagesPager.PageResponse` has been removed -- Function `*CertificateOrdersClientListPager.PageResponse` has been removed -- Function `LogLevel.ToPtr` has been removed -- Function `*WebAppsClientListInstanceIdentifiersPager.PageResponse` has been removed -- Function `*ProviderClientGetAvailableStacksPager.NextPage` has been removed -- Function `*WebAppsClientListSiteExtensionsPager.NextPage` has been removed -- Function `IssueType.ToPtr` has been removed -- Function `SiteAvailabilityState.ToPtr` has been removed -- Function `*WebAppsClientMigrateStoragePoller.Poll` has been removed -- Function `*StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPoller.FinalResponse` has been removed -- Function `*ProviderClientGetWebAppStacksForLocationPager.Err` has been removed -- Function `ManagedServiceIdentityType.ToPtr` has been removed -- Function `*ProviderClientListOperationsPager.Err` has been removed -- Function `*StaticSitesClientDeleteStaticSitePoller.Poll` has been removed -- Function `*WebAppsClientGetPrivateEndpointConnectionListSlotPager.PageResponse` has been removed -- Function `*WebAppsClientRestoreFromBackupBlobSlotPoller.Done` has been removed -- Function `*StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPoller.Done` has been removed -- Function `*PlansClientListHybridConnectionsPager.Err` has been removed -- Function `RevisionHealthState.ToPtr` has been removed -- Function `EnvironmentsClientCreateOrUpdateMultiRolePoolPollerResponse.PollUntilDone` has been removed -- Function `Enum18.ToPtr` has been removed -- Function `*EnvironmentsClientListWebAppsPager.NextPage` has been removed -- Function `StaticSitesClientDeleteStaticSiteCustomDomainPollerResponse.PollUntilDone` has been removed -- Function `*CertificateRegistrationProviderClientListOperationsPager.PageResponse` has been removed -- Function `*StaticSitesClientCreateZipDeploymentForStaticSitePoller.ResumeToken` has been removed -- Function `*DiagnosticsClientListSiteAnalysesPager.PageResponse` has been removed -- Function `*EnvironmentsClientGetInboundNetworkDependenciesEndpointsPager.Err` has been removed -- Function `WebAppsClientCreateMSDeployOperationSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListInstanceProcessThreadsSlotPager.Err` has been removed -- Function `*WebAppsClientCreateMSDeployOperationSlotPoller.Done` has been removed -- Function `*WebAppsClientRestoreSlotPoller.ResumeToken` has been removed -- Function `*KubeEnvironmentsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSitePager.PageResponse` has been removed -- Function `*WebAppsClientListSnapshotsFromDRSecondaryPager.NextPage` has been removed -- Function `*StaticSitesClientDetachStaticSitePoller.Poll` has been removed -- Function `*WebAppsClientMigrateMySQLPoller.Poll` has been removed -- Function `*WebAppsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*EnvironmentsClientSuspendPoller.Poll` has been removed -- Function `Enum19.ToPtr` has been removed -- Function `HostingEnvironmentStatus.ToPtr` has been removed -- Function `*EnvironmentsClientListMultiRoleMetricDefinitionsPager.Err` has been removed -- Function `*WebAppsClientListContinuousWebJobsSlotPager.PageResponse` has been removed -- Function `*CertificateOrdersClientListPager.NextPage` has been removed -- Function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse.Resume` has been removed -- Function `*CertificateOrdersClientListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsClientListSlotsPager.NextPage` has been removed -- Function `*WebAppsClientListPerfMonCountersSlotPager.PageResponse` has been removed -- Function `*CertificatesClientListByResourceGroupPager.PageResponse` has been removed -- Function `*WebAppsClientRestoreSlotPollerResponse.Resume` has been removed -- Function `*StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPollerResponse.Resume` has been removed -- Function `AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem.ToPtr` has been removed -- Function `*WebAppsClientListProcessesPager.Err` has been removed -- Function `*WebAppsClientListTriggeredWebJobsPager.PageResponse` has been removed -- Function `*WebAppsClientCreateMSDeployOperationPoller.Done` has been removed -- Function `*WebAppsClientCreateOrUpdateSourceControlSlotPoller.FinalResponse` has been removed -- Function `*EnvironmentsClientChangeVnetPager.Err` has been removed -- Function `*EnvironmentsClientListMultiRolePoolsPager.Err` has been removed -- Function `*WebAppsClientSwapSlotPollerResponse.Resume` has been removed -- Function `*WebAppsClientListPublicCertificatesSlotPager.NextPage` has been removed -- Function `*CertificatesClientListPager.PageResponse` has been removed -- Function `*WebAppsClientGetPrivateEndpointConnectionListPager.PageResponse` has been removed -- Function `*StaticSitesClientCreateOrUpdateStaticSitePoller.Poll` has been removed -- Function `*ContainerAppsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ResourceHealthMetadataClientListByResourceGroupPager.PageResponse` has been removed -- Function `*KubeEnvironmentsClientListBySubscriptionPager.Err` has been removed -- Function `IngressTransportMethod.ToPtr` has been removed -- Function `*WebAppsClientRestoreSnapshotPollerResponse.Resume` has been removed -- Function `WebAppsClientCreateInstanceMSDeployOperationPollerResponse.PollUntilDone` has been removed -- Function `*CertificateOrdersClientCreateOrUpdateCertificatePoller.Poll` has been removed -- Function `*EnvironmentsClientCreateOrUpdateMultiRolePoolPoller.Poll` has been removed -- Function `*WebAppsClientListTriggeredWebJobHistoryPager.PageResponse` has been removed -- Function `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `WebAppsClientRestoreSnapshotSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientCreateOrUpdateSlotPollerResponse.Resume` has been removed -- Function `*KubeEnvironmentsClientDeletePoller.FinalResponse` has been removed -- Function `*WebAppsClientListConfigurationSnapshotInfoSlotPager.PageResponse` has been removed -- Function `*WebAppsClientCreateFunctionPoller.Poll` has been removed -- Function `*WebAppsClientListBasicPublishingCredentialsPoliciesPager.PageResponse` has been removed -- Function `*CertificateOrdersClientListCertificatesPager.PageResponse` has been removed -- Function `*ContainerAppsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*WebAppsClientInstallSiteExtensionPoller.Poll` has been removed -- Function `*WebAppsClientCreateInstanceMSDeployOperationSlotPoller.ResumeToken` has been removed -- Function `*ContainerAppsClientListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsClientListSiteBackupsSlotPager.Err` has been removed -- Function `*WebAppsClientListInstanceFunctionsSlotPager.PageResponse` has been removed -- Function `StaticSitesClientDeleteStaticSiteBuildPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListInstanceProcessThreadsSlotPager.PageResponse` has been removed -- Function `*WebAppsClientRestoreSnapshotSlotPoller.FinalResponse` has been removed -- Function `*RecommendationsClientListRecommendedRulesForWebAppPager.PageResponse` has been removed -- Function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPoller.Done` has been removed -- Function `*WebAppsClientListWebJobsSlotPager.Err` has been removed -- Function `*ContainerAppsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ResourceHealthMetadataClientListBySitePager.Err` has been removed -- Function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.Poll` has been removed -- Function `*WebAppsClientListInstanceProcessesPager.PageResponse` has been removed -- Function `*WebAppsClientListPublishingCredentialsPoller.Done` has been removed -- Function `DatabaseType.ToPtr` has been removed -- Function `CustomDomainStatus.ToPtr` has been removed -- Function `WebAppsClientRestoreSlotPollerResponse.PollUntilDone` has been removed -- Function `*PlansClientListPager.NextPage` has been removed -- Function `*WebAppsClientListContinuousWebJobsPager.PageResponse` has been removed -- Function `*DomainsClientListByResourceGroupPager.Err` has been removed -- Function `ContainerAppsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*ResourceHealthMetadataClientListPager.PageResponse` has been removed -- Function `*DiagnosticsClientListSiteDetectorsPager.Err` has been removed -- Function `*EnvironmentsClientSuspendPager.NextPage` has been removed -- Function `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListPerfMonCountersSlotPager.NextPage` has been removed -- Function `PublishingProfileFormat.ToPtr` has been removed -- Function `*CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponsePager.PageResponse` has been removed -- Function `*WebAppsClientListConfigurationSnapshotInfoSlotPager.NextPage` has been removed -- Function `CertificateOrderActionType.ToPtr` has been removed -- Function `*WebAppsClientCreateInstanceMSDeployOperationSlotPoller.Poll` has been removed -- Function `*WebAppsClientListBasicPublishingCredentialsPoliciesSlotPager.Err` has been removed -- Function `RouteType.ToPtr` has been removed -- Function `*StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPoller.ResumeToken` has been removed -- Function `StagingEnvironmentPolicy.ToPtr` has been removed -- Function `*WebAppsClientListPublishingCredentialsPoller.FinalResponse` has been removed -- Function `*ProviderClientGetWebAppStacksForLocationPager.PageResponse` has been removed -- Function `*KubeEnvironmentsClientListBySubscriptionPager.PageResponse` has been removed -- Function `*EnvironmentsClientListMultiRoleMetricDefinitionsPager.PageResponse` has been removed -- Function `*EnvironmentsClientSuspendPoller.ResumeToken` has been removed -- Function `*DomainsClientListOwnershipIdentifiersPager.Err` has been removed -- Function `*DiagnosticsClientListSiteAnalysesSlotPager.Err` has been removed -- Function `*WebSiteManagementClientListBillingMetersPager.PageResponse` has been removed -- Function `*WebAppsClientMigrateStoragePoller.FinalResponse` has been removed -- Function `*EnvironmentsClientListByResourceGroupPager.NextPage` has been removed -- Function `*StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePoller.FinalResponse` has been removed -- Function `*WebAppsClientRestorePoller.Done` has been removed -- Function `*WebAppsClientListFunctionsPager.Err` has been removed -- Function `*WebAppsClientRestoreFromDeletedAppPoller.Done` has been removed -- Function `*WebAppsClientCreateInstanceMSDeployOperationSlotPollerResponse.Resume` has been removed -- Function `WebAppsClientListPublishingCredentialsSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListInstanceProcessesSlotPager.Err` has been removed -- Function `UsageState.ToPtr` has been removed -- Function `*ResourceHealthMetadataClientListByResourceGroupPager.Err` has been removed -- Function `*WebAppsClientListDomainOwnershipIdentifiersSlotPager.NextPage` has been removed -- Function `*WebAppsClientListInstanceProcessesSlotPager.PageResponse` has been removed -- Function `*StaticSitesClientDetachStaticSitePollerResponse.Resume` has been removed -- Function `*WebAppsClientListProcessModulesPager.NextPage` has been removed -- Function `*CertificateOrdersClientCreateOrUpdateCertificatePoller.Done` has been removed -- Function `*WebAppsClientMigrateMySQLPoller.FinalResponse` has been removed -- Function `*WebAppsClientRestoreSnapshotSlotPollerResponse.Resume` has been removed -- Function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePollerResponse.Resume` has been removed -- Function `*WebAppsClientListUsagesSlotPager.PageResponse` has been removed -- Function `*DiagnosticsClientListSiteDetectorResponsesSlotPager.NextPage` has been removed -- Function `*CertificateOrdersClientListPager.Err` has been removed -- Function `*WebAppsClientGetAppSettingsKeyVaultReferencesPager.Err` has been removed -- Function `TriggeredWebJobStatus.ToPtr` has been removed -- Function `*WebAppsClientListByResourceGroupPager.PageResponse` has been removed -- Function `*RecommendationsClientListPager.Err` has been removed -- Function `*StaticSitesClientListStaticSiteUsersPager.NextPage` has been removed -- Function `*WebAppsClientDeletePrivateEndpointConnectionPoller.Poll` has been removed -- Function `*WebAppsClientDeletePrivateEndpointConnectionSlotPoller.Done` has been removed -- Function `*DomainsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*DeletedWebAppsClientListPager.NextPage` has been removed -- Function `*DiagnosticsClientListSiteDetectorResponsesSlotPager.PageResponse` has been removed -- Function `AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem.ToPtr` has been removed -- Function `*EnvironmentsClientListMultiRolePoolSKUsPager.Err` has been removed -- Function `*DiagnosticsClientListSiteAnalysesPager.Err` has been removed -- Function `WebAppsClientInstallSiteExtensionSlotPollerResponse.PollUntilDone` has been removed -- Function `CertificateProductType.ToPtr` has been removed -- Function `*WebAppsClientListSlotDifferencesFromProductionPager.Err` has been removed -- Function `*EnvironmentsClientCreateOrUpdateWorkerPoolPoller.Poll` has been removed -- Function `*WebAppsClientListProcessModulesPager.PageResponse` has been removed -- Function `WebAppsClientCreateOrUpdateSlotPollerResponse.PollUntilDone` has been removed -- Function `*PlansClientListUsagesPager.PageResponse` has been removed -- Function `*WebAppsClientRestoreFromDeletedAppSlotPoller.Poll` has been removed -- Function `*WebAppsClientListDomainOwnershipIdentifiersPager.NextPage` has been removed -- Function `*StaticSitesClientCreateOrUpdateStaticSitePollerResponse.Resume` has been removed -- Function `*WebAppsClientListSiteExtensionsSlotPager.PageResponse` has been removed -- Function `*WebAppsClientListInstanceProcessModulesSlotPager.Err` has been removed -- Function `*WebAppsClientListInstanceProcessModulesPager.PageResponse` has been removed -- Function `*WebAppsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesPager.PageResponse` has been removed -- Function `*StaticSitesClientDeleteStaticSitePoller.FinalResponse` has been removed -- Function `*StaticSitesClientGetStaticSiteBuildsPager.Err` has been removed -- Function `StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePollerResponse.PollUntilDone` has been removed -- Function `BuiltInAuthenticationProvider.ToPtr` has been removed -- Function `*WebAppsClientCreateOrUpdateSourceControlPoller.ResumeToken` has been removed -- Function `*StaticSitesClientApproveOrRejectPrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `*CertificateRegistrationProviderClientListOperationsPager.Err` has been removed -- Function `*WebAppsClientListUsagesPager.NextPage` has been removed -- Function `*WebAppsClientListHostNameBindingsSlotPager.NextPage` has been removed -- Function `*EnvironmentsClientChangeVnetPager.PageResponse` has been removed -- Function `StaticSitesClientDeleteStaticSitePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientStartNetworkTracePoller.ResumeToken` has been removed -- Function `*EnvironmentsClientListCapacitiesPager.NextPage` has been removed -- Function `WebAppsClientSwapSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientInstallSiteExtensionSlotPollerResponse.Resume` has been removed -- Function `*DiagnosticsClientListSiteDiagnosticCategoriesSlotPager.NextPage` has been removed -- Function `WebAppsClientInstallSiteExtensionPollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsPager.NextPage` has been removed -- Function `MySQLMigrationType.ToPtr` has been removed -- Function `*EnvironmentsClientListWebWorkerUsagesPager.Err` has been removed -- Function `*EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsPager.NextPage` has been removed -- Function `*WebAppsClientCreateInstanceMSDeployOperationPollerResponse.Resume` has been removed -- Function `WebAppsClientCreateOrUpdateSourceControlSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientCreateOrUpdatePoller.Done` has been removed -- Function `*WebAppsClientMigrateStoragePoller.ResumeToken` has been removed -- Function `*EnvironmentsClientChangeVnetPager.NextPage` has been removed -- Function `*EnvironmentsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*WebAppsClientListTriggeredWebJobsSlotPager.NextPage` has been removed -- Function `*WebAppsClientListTriggeredWebJobHistorySlotPager.PageResponse` has been removed -- Function `*WebAppsClientRestorePollerResponse.Resume` has been removed -- Function `*PlansClientCreateOrUpdatePoller.Poll` has been removed -- Function `*WebAppsClientRestorePoller.FinalResponse` has been removed -- Function `*EnvironmentsClientSuspendPoller.Done` has been removed -- Function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildPager.Err` has been removed -- Function `*ContainerAppsClientDeletePollerResponse.Resume` has been removed -- Function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSitePager.NextPage` has been removed -- Function `*WebAppsClientListSlotsPager.PageResponse` has been removed -- Function `*StaticSitesClientCreateZipDeploymentForStaticSiteBuildPoller.ResumeToken` has been removed -- Function `*DeletedWebAppsClientListPager.PageResponse` has been removed -- Function `WebAppsClientStartWebSiteNetworkTraceOperationPollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientDeletePrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `RenderingType.ToPtr` has been removed -- Function `*EnvironmentsClientDeletePoller.FinalResponse` has been removed -- Function `*CertificateOrdersClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*WebAppsClientCreateOrUpdateSlotPoller.Poll` has been removed -- Function `*WebAppsClientListPublicCertificatesSlotPager.PageResponse` has been removed -- Function `*WebAppsClientListSnapshotsSlotPager.Err` has been removed -- Function `*EnvironmentsClientListWebWorkerMetricDefinitionsPager.Err` has been removed -- Function `*WebAppsClientRestoreFromBackupBlobPoller.Poll` has been removed -- Function `*EnvironmentsClientChangeVnetPollerResponse.Resume` has been removed -- Function `*CertificatesClientListPager.NextPage` has been removed -- Function `*StaticSitesClientGetPrivateEndpointConnectionListPager.PageResponse` has been removed -- Function `*StaticSitesClientGetStaticSitesByResourceGroupPager.PageResponse` has been removed -- Function `*StaticSitesClientListStaticSiteUsersPager.PageResponse` has been removed -- Function `*WebAppsClientListInstanceIdentifiersSlotPager.NextPage` has been removed -- Function `ValidateResourceTypes.ToPtr` has been removed -- Function `*WebAppsClientCreateMSDeployOperationPoller.ResumeToken` has been removed -- Function `*WebAppsClientListUsagesPager.Err` has been removed -- Function `*StaticSitesClientCreateZipDeploymentForStaticSitePoller.FinalResponse` has been removed -- Function `WebAppsClientCreateInstanceMSDeployOperationSlotPollerResponse.PollUntilDone` has been removed -- Function `*ProviderClientGetFunctionAppStacksForLocationPager.PageResponse` has been removed -- Function `Enum16.ToPtr` has been removed -- Function `*WebAppsClientRestoreFromBackupBlobSlotPoller.Poll` has been removed -- Function `*DiagnosticsClientListSiteDetectorsSlotPager.Err` has been removed -- Function `*PlansClientListWebAppsByHybridConnectionPager.NextPage` has been removed -- Function `*StaticSitesClientListStaticSiteCustomDomainsPager.NextPage` has been removed -- Function `CustomHostNameDNSRecordType.ToPtr` has been removed -- Function `*DomainRegistrationProviderClientListOperationsPager.Err` has been removed -- Function `WebAppsClientRestoreFromDeletedAppSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListProcessThreadsPager.NextPage` has been removed -- Function `*WebAppsClientListTriggeredWebJobHistoryPager.Err` has been removed -- Function `*WebAppsClientRestoreFromDeletedAppPoller.FinalResponse` has been removed -- Function `*KubeEnvironmentsClientListByResourceGroupPager.Err` has been removed -- Function `*StaticSitesClientCreateOrUpdateStaticSitePoller.ResumeToken` has been removed -- Function `*WebAppsClientListConfigurationSnapshotInfoPager.NextPage` has been removed -- Function `*RecommendationsClientListHistoryForWebAppPager.PageResponse` has been removed -- Function `*ProviderClientGetFunctionAppStacksForLocationPager.Err` has been removed -- Function `*ProviderClientGetWebAppStacksPager.Err` has been removed -- Function `*DiagnosticsClientListHostingEnvironmentDetectorResponsesPager.Err` has been removed -- Function `*EnvironmentsClientSuspendPager.Err` has been removed -- Function `*CertificateOrdersClientListByResourceGroupPager.PageResponse` has been removed -- Function `*WebAppsClientGetAppSettingsKeyVaultReferencesPager.PageResponse` has been removed -- Function `*DomainsClientCreateOrUpdatePoller.Done` has been removed -- Function `*ProviderClientGetWebAppStacksPager.PageResponse` has been removed -- Function `*StaticSitesClientDetachStaticSitePoller.FinalResponse` has been removed -- Function `*ProviderClientGetFunctionAppStacksPager.NextPage` has been removed -- Function `*WebAppsClientSwapSlotPoller.ResumeToken` has been removed -- Function `*ContainerAppsRevisionsClientListRevisionsPager.Err` has been removed -- Function `*StaticSitesClientGetStaticSitesByResourceGroupPager.NextPage` has been removed -- Function `*EnvironmentsClientListMultiRolePoolSKUsPager.PageResponse` has been removed -- Function `*DiagnosticsClientListSiteDiagnosticCategoriesPager.PageResponse` has been removed -- Function `*StaticSitesClientGetPrivateEndpointConnectionListPager.NextPage` has been removed -- Function `SiteRuntimeState.ToPtr` has been removed -- Function `*WebAppsClientListSnapshotsPager.Err` has been removed -- Function `*WebAppsClientSwapSlotWithProductionPoller.Done` has been removed -- Function `*StaticSitesClientListStaticSiteBuildFunctionsPager.NextPage` has been removed -- Function `*WebAppsClientRestoreSlotPoller.Done` has been removed -- Function `HostType.ToPtr` has been removed -- Function `*WebAppsClientListPager.PageResponse` has been removed -- Function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionPoller.Poll` has been removed -- Function `*WebAppsClientListDomainOwnershipIdentifiersSlotPager.Err` has been removed -- Function `*EnvironmentsClientListCapacitiesPager.Err` has been removed -- Function `*ContainerAppsClientListBySubscriptionPager.PageResponse` has been removed -- Function `*WebAppsClientListInstanceIdentifiersSlotPager.PageResponse` has been removed -- Function `StaticSitesClientApproveOrRejectPrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientListWebAppsPager.Err` has been removed -- Function `CertificateOrdersClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*DomainsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*StaticSitesClientListStaticSiteCustomDomainsPager.Err` has been removed -- Function `WebAppsClientSwapSlotWithProductionPollerResponse.PollUntilDone` has been removed -- Function `*ProviderClientGetFunctionAppStacksPager.PageResponse` has been removed -- Function `FrequencyUnit.ToPtr` has been removed -- Function `*EnvironmentsClientDeletePrivateEndpointConnectionPoller.Done` has been removed -- Function `*ResourceHealthMetadataClientListBySitePager.PageResponse` has been removed -- Function `*WebAppsClientListDomainOwnershipIdentifiersSlotPager.PageResponse` has been removed -- Function `*EnvironmentsClientGetInboundNetworkDependenciesEndpointsPager.PageResponse` has been removed -- Function `*WebAppsClientListSiteBackupsPager.PageResponse` has been removed -- Function `*CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponsePager.NextPage` has been removed -- Function `*StaticSitesClientDeleteStaticSitePollerResponse.Resume` has been removed -- Function `*WebAppsClientMigrateMySQLPoller.Done` has been removed -- Function `*WebAppsClientSwapSlotWithProductionPoller.Poll` has been removed -- Function `*WebAppsClientListContinuousWebJobsPager.Err` has been removed -- Function `*WebAppsClientListSnapshotsSlotPager.PageResponse` has been removed -- Function `*StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePoller.Poll` has been removed -- Function `*WebAppsClientListSlotDifferencesSlotPager.NextPage` has been removed -- Function `*WebAppsClientDeletePrivateEndpointConnectionSlotPoller.Poll` has been removed -- Function `*PlansClientListUsagesPager.NextPage` has been removed -- Function `*WebAppsClientListInstanceProcessesPager.Err` has been removed -- Function `UnauthenticatedClientAction.ToPtr` has been removed -- Function `WebAppsClientMigrateMySQLPollerResponse.PollUntilDone` has been removed -- Function `*ContainerAppsClientListByResourceGroupPager.PageResponse` has been removed -- Function `*WebAppsClientDeletePrivateEndpointConnectionSlotPollerResponse.Resume` has been removed -- Function `*WebAppsClientListSiteBackupsPager.Err` has been removed -- Function `*EnvironmentsClientCreateOrUpdateMultiRolePoolPoller.FinalResponse` has been removed -- Function `*ProviderClientGetAvailableStacksOnPremPager.PageResponse` has been removed -- Function `*WebAppsClientRestoreSnapshotPoller.Poll` has been removed -- Function `*ResourceHealthMetadataClientListBySitePager.NextPage` has been removed -- Function `*EnvironmentsClientListAppServicePlansPager.PageResponse` has been removed -- Function `*EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsPager.Err` has been removed -- Function `WebAppsClientRestoreSnapshotPollerResponse.PollUntilDone` has been removed -- Function `EnvironmentsClientCreateOrUpdateWorkerPoolPollerResponse.PollUntilDone` has been removed -- Function `*CertificateRegistrationProviderClientListOperationsPager.NextPage` has been removed -- Function `*StaticSitesClientDeleteStaticSitePoller.ResumeToken` has been removed -- Function `*TopLevelDomainsClientListAgreementsPager.Err` has been removed -- Function `*WebAppsClientRestoreFromDeletedAppSlotPoller.Done` has been removed -- Function `*WebAppsClientRestorePoller.ResumeToken` has been removed -- Function `EnvironmentsClientResumePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListInstanceProcessThreadsPager.NextPage` has been removed -- Function `StatusOptions.ToPtr` has been removed -- Function `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientListWebWorkerMetricDefinitionsPager.PageResponse` has been removed -- Function `*WebSiteManagementClientListCustomHostNameSitesPager.PageResponse` has been removed -- Function `*EnvironmentsClientChangeVnetPoller.ResumeToken` has been removed -- Function `*WebAppsClientListWebJobsSlotPager.PageResponse` has been removed -- Function `*ProviderClientGetAvailableStacksOnPremPager.NextPage` has been removed -- Function `*WebAppsClientListConfigurationSnapshotInfoSlotPager.Err` has been removed -- Function `ContainerAppProvisioningState.ToPtr` has been removed -- Function `*WebAppsClientListFunctionsPager.PageResponse` has been removed -- Function `*StaticSitesClientListStaticSiteBuildFunctionsPager.PageResponse` has been removed -- Function `*WebAppsClientListByResourceGroupPager.Err` has been removed -- Function `*ResourceHealthMetadataClientListPager.Err` has been removed -- Function `*WebAppsClientRestoreFromBackupBlobSlotPollerResponse.Resume` has been removed -- Function `*WebAppsClientListDeploymentsSlotPager.NextPage` has been removed -- Function `*WebAppsClientRestoreFromBackupBlobPoller.FinalResponse` has been removed -- Function `WebAppsClientMigrateStoragePollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientSuspendPoller.FinalResponse` has been removed -- Function `*WebAppsClientRestoreSlotPoller.FinalResponse` has been removed -- Function `*WebAppsClientCreateFunctionPoller.Done` has been removed -- Function `*DomainsClientListPager.Err` has been removed -- Function `*WebAppsClientSwapSlotPoller.Poll` has been removed -- Function `*EnvironmentsClientListWorkerPoolSKUsPager.Err` has been removed -- Function `*StaticSitesClientDeleteStaticSiteBuildPoller.Done` has been removed -- Function `*StaticSitesClientGetStaticSiteBuildsPager.PageResponse` has been removed -- Function `*WebAppsClientListInstanceProcessThreadsPager.PageResponse` has been removed -- Function `*CertificatesClientListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsClientListInstanceProcessModulesPager.Err` has been removed -- Function `*DeletedWebAppsClientListByLocationPager.Err` has been removed -- Function `*WebAppsClientListTriggeredWebJobHistorySlotPager.NextPage` has been removed -- Function `DomainType.ToPtr` has been removed -- Function `*RecommendationsClientListHistoryForHostingEnvironmentPager.PageResponse` has been removed -- Function `ConnectionStringType.ToPtr` has been removed -- Function `*RecommendationsClientListRecommendedRulesForHostingEnvironmentPager.Err` has been removed -- Function `*WebAppsClientRestoreSnapshotPoller.FinalResponse` has been removed -- Function `*WebAppsClientListTriggeredWebJobsPager.Err` has been removed -- Function `*EnvironmentsClientListAppServicePlansPager.NextPage` has been removed -- Function `*ContainerAppsClientListByResourceGroupPager.Err` has been removed -- Function `*WebAppsClientListPublishingCredentialsSlotPoller.ResumeToken` has been removed -- Function `*WebAppsClientRestoreFromDeletedAppSlotPoller.ResumeToken` has been removed -- Function `*TopLevelDomainsClientListAgreementsPager.PageResponse` has been removed -- Function `*StaticSitesClientListStaticSiteFunctionsPager.NextPage` has been removed -- Function `*WebAppsClientListSlotDifferencesSlotPager.Err` has been removed -- Function `*StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePoller.ResumeToken` has been removed -- Function `*RecommendationsClientListHistoryForWebAppPager.NextPage` has been removed -- Function `*DeletedWebAppsClientListPager.Err` has been removed -- Function `*WebAppsClientGetAppSettingsKeyVaultReferencesSlotPager.NextPage` has been removed -- Function `StaticSitesClientCreateZipDeploymentForStaticSitePollerResponse.PollUntilDone` has been removed -- Function `*StaticSitesClientApproveOrRejectPrivateEndpointConnectionPoller.Done` has been removed -- Function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesPager.NextPage` has been removed -- Function `*WebAppsClientListContinuousWebJobsSlotPager.Err` has been removed -- Function `*WebAppsClientListSlotDifferencesFromProductionPager.PageResponse` has been removed -- Function `WebAppsClientDeletePrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `*StaticSitesClientDeleteStaticSiteBuildPoller.ResumeToken` has been removed -- Function `DetectorType.ToPtr` has been removed -- Function `*ResourceHealthMetadataClientListByResourceGroupPager.NextPage` has been removed -- Function `*DomainsClientListRecommendationsPager.NextPage` has been removed -- Function `*StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePoller.Done` has been removed -- Function `*WebAppsClientStartNetworkTraceSlotPoller.Done` has been removed -- Function `*EnvironmentsClientGetOutboundNetworkDependenciesEndpointsPager.NextPage` has been removed -- Function `*DeletedWebAppsClientListByLocationPager.NextPage` has been removed -- Function `*StaticSitesClientCreateOrUpdateStaticSitePoller.Done` has been removed -- Function `*StaticSitesClientDeletePrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `*WebAppsClientListHostNameBindingsPager.Err` has been removed -- Function `*WebAppsClientListHostNameBindingsPager.PageResponse` has been removed -- Function `*WebAppsClientCreateInstanceFunctionSlotPoller.ResumeToken` has been removed -- Function `*WebAppsClientRestoreFromDeletedAppPollerResponse.Resume` has been removed -- Function `*EnvironmentsClientCreateOrUpdateWorkerPoolPoller.FinalResponse` has been removed -- Function `*EnvironmentsClientResumePoller.FinalResponse` has been removed -- Function `*WebAppsClientMigrateStoragePollerResponse.Resume` has been removed -- Function `*WebAppsClientListSiteBackupsSlotPager.NextPage` has been removed -- Function `*DiagnosticsClientListSiteDiagnosticCategoriesPager.Err` has been removed -- Function `*DiagnosticsClientListHostingEnvironmentDetectorResponsesPager.NextPage` has been removed -- Function `InsightStatus.ToPtr` has been removed -- Function `*EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsPager.Err` has been removed -- Function `*WebAppsClientRestoreFromBackupBlobSlotPoller.FinalResponse` has been removed -- Function `*WebAppsClientInstallSiteExtensionPoller.FinalResponse` has been removed -- Function `WebAppsClientCreateMSDeployOperationPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListPublicCertificatesPager.NextPage` has been removed -- Function `*WebAppsClientListProcessesSlotPager.NextPage` has been removed -- Function `*ProviderClientGetWebAppStacksPager.NextPage` has been removed -- Function `*WebAppsClientListSnapshotsFromDRSecondarySlotPager.NextPage` has been removed -- Function `*WebSiteManagementClientListGeoRegionsPager.Err` has been removed -- Function `*EnvironmentsClientListMultiRolePoolsPager.PageResponse` has been removed -- Function `WebAppsClientStartWebSiteNetworkTraceOperationSlotPollerResponse.PollUntilDone` has been removed -- Function `WebAppsClientCreateOrUpdateSourceControlPollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientCreateOrUpdateMultiRolePoolPoller.Done` has been removed -- Function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `*WebAppsClientCreateMSDeployOperationSlotPoller.Poll` has been removed -- Function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesPager.Err` has been removed -- Function `*EnvironmentsClientResumePoller.Poll` has been removed -- Function `*WebAppsClientListDeploymentsPager.PageResponse` has been removed -- Function `*WebAppsClientListInstanceProcessThreadsSlotPager.NextPage` has been removed -- Function `*EnvironmentsClientListPager.Err` has been removed -- Function `*WebSiteManagementClientListSourceControlsPager.Err` has been removed -- Function `*WebAppsClientStartNetworkTraceSlotPoller.ResumeToken` has been removed -- Function `*RecommendationsClientListRecommendedRulesForHostingEnvironmentPager.NextPage` has been removed -- Function `EnterpriseGradeCdnStatus.ToPtr` has been removed -- Function `*WebAppsClientListSnapshotsSlotPager.NextPage` has been removed -- Function `*StaticSitesClientCreateZipDeploymentForStaticSiteBuildPoller.FinalResponse` has been removed -- Function `ActiveRevisionsMode.ToPtr` has been removed -- Function `*EnvironmentsClientDeletePoller.Done` has been removed -- Function `*WebAppsClientStartWebSiteNetworkTraceOperationPoller.Poll` has been removed -- Function `*EnvironmentsClientCreateOrUpdateMultiRolePoolPollerResponse.Resume` has been removed -- Function `*EnvironmentsClientListMultiRoleMetricDefinitionsPager.NextPage` has been removed -- Function `*WebSiteManagementClientListSiteIdentifiersAssignedToHostNamePager.Err` has been removed -- Function `CookieExpirationConvention.ToPtr` has been removed -- Function `*WebAppsClientListPublishingCredentialsPollerResponse.Resume` has been removed -- Function `*EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsPager.PageResponse` has been removed -- Function `*WebAppsClientCreateOrUpdateSlotPoller.FinalResponse` has been removed -- Function `*DiagnosticsClientListSiteDiagnosticCategoriesPager.NextPage` has been removed -- Function `MSDeployLogEntryType.ToPtr` has been removed -- Function `*ResourceHealthMetadataClientListBySiteSlotPager.PageResponse` has been removed -- Function `*EnvironmentsClientListPager.NextPage` has been removed -- Function `*EnvironmentsClientListUsagesPager.Err` has been removed -- Function `*DiagnosticsClientListSiteDetectorsSlotPager.NextPage` has been removed -- Function `*StaticSitesClientApproveOrRejectPrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `*KubeEnvironmentsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*StaticSitesClientListPager.PageResponse` has been removed -- Function `AzureResourceType.ToPtr` has been removed -- Function `*EnvironmentsClientListWorkerPoolSKUsPager.PageResponse` has been removed -- Function `*ContainerAppsClientListBySubscriptionPager.Err` has been removed -- Function `*PlansClientListByResourceGroupPager.Err` has been removed -- Function `*EnvironmentsClientListMultiRoleUsagesPager.PageResponse` has been removed -- Function `*ResourceHealthMetadataClientListBySiteSlotPager.Err` has been removed -- Function `WebAppsClientStartNetworkTracePollerResponse.PollUntilDone` has been removed -- Function `*ProviderClientGetFunctionAppStacksPager.Err` has been removed -- Function `*WebAppsClientListContinuousWebJobsSlotPager.NextPage` has been removed -- Function `*EnvironmentsClientListByResourceGroupPager.PageResponse` has been removed -- Function `ResourceScopeType.ToPtr` has been removed -- Function `*DiagnosticsClientListSiteDetectorResponsesPager.NextPage` has been removed -- Function `*WebAppsClientListInstanceProcessesPager.NextPage` has been removed -- Function `*ProviderClientGetFunctionAppStacksForLocationPager.NextPage` has been removed -- Function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPoller.Poll` has been removed -- Function `SolutionType.ToPtr` has been removed -- Function `*TopLevelDomainsClientListPager.PageResponse` has been removed -- Function `*RecommendationsClientListPager.NextPage` has been removed -- Function `*KubeEnvironmentsClientListBySubscriptionPager.NextPage` has been removed -- Function `*WebAppsClientListPublicCertificatesPager.PageResponse` has been removed -- Function `*EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*PlansClientListWebAppsByHybridConnectionPager.Err` has been removed -- Function `*ContainerAppsClientListBySubscriptionPager.NextPage` has been removed -- Function `*EnvironmentsClientDeletePollerResponse.Resume` has been removed -- Function `*WebAppsClientCreateInstanceMSDeployOperationPoller.Poll` has been removed -- Function `*WebAppsClientCreateOrUpdateSourceControlSlotPoller.ResumeToken` has been removed -- Function `*WebAppsClientListInstanceFunctionsSlotPager.NextPage` has been removed -- Function `*WebAppsClientListProcessThreadsSlotPager.NextPage` has been removed -- Function `*EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `*WebAppsClientListInstanceProcessModulesSlotPager.PageResponse` has been removed -- Function `DomainsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*WebSiteManagementClientListPremierAddOnOffersPager.NextPage` has been removed -- Function `*WebAppsClientListInstanceIdentifiersPager.Err` has been removed -- Function `*WebAppsClientListBasicPublishingCredentialsPoliciesSlotPager.NextPage` has been removed -- Function `ManagedPipelineMode.ToPtr` has been removed -- Function `*WebAppsClientListHostNameBindingsPager.NextPage` has been removed -- Function `*StaticSitesClientDeleteStaticSiteBuildPollerResponse.Resume` has been removed -- Function `*WebAppsClientCreateInstanceMSDeployOperationSlotPoller.Done` has been removed -- Function `DomainPatchResourcePropertiesDomainNotRenewableReasonsItem.ToPtr` has been removed -- Function `*WebAppsClientCreateMSDeployOperationSlotPoller.ResumeToken` has been removed -- Function `*RecommendationsClientListRecommendedRulesForHostingEnvironmentPager.PageResponse` has been removed -- Function `RedundancyMode.ToPtr` has been removed -- Function `*DomainsClientListRecommendationsPager.Err` has been removed -- Function `*EnvironmentsClientCreateOrUpdateWorkerPoolPoller.ResumeToken` has been removed -- Function `*WebAppsClientDeletePrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*WebAppsClientListSnapshotsPager.NextPage` has been removed -- Function `*WebAppsClientListConfigurationsPager.Err` has been removed -- Function `*WebAppsClientDeletePrivateEndpointConnectionPoller.Done` has been removed -- Function `CertificateOrdersClientCreateOrUpdateCertificatePollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientListWebAppsPager.PageResponse` has been removed -- Function `Enum15.ToPtr` has been removed -- Function `*WebSiteManagementClientListBillingMetersPager.NextPage` has been removed -- Function `*WebAppsClientListInstanceIdentifiersPager.NextPage` has been removed -- Function `AzureStorageType.ToPtr` has been removed -- Function `*WebAppsClientInstallSiteExtensionSlotPoller.FinalResponse` has been removed -- Function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotPollerResponse.Resume` has been removed -- Function `*StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPoller.Poll` has been removed -- Function `*EnvironmentsClientListAppServicePlansPager.Err` has been removed -- Function `*WebAppsClientRestoreFromDeletedAppPoller.Poll` has been removed -- Function `*WebAppsClientRestoreFromBackupBlobPoller.Done` has been removed -- Function `*WebAppsClientSwapSlotWithProductionPoller.ResumeToken` has been removed -- Function `*WebAppsClientListProcessModulesSlotPager.NextPage` has been removed -- Function `WebJobType.ToPtr` has been removed -- Function `*WebAppsClientInstallSiteExtensionSlotPoller.Done` has been removed -- Function `*WebAppsClientCreateMSDeployOperationSlotPollerResponse.Resume` has been removed -- Function `CloneAbilityResult.ToPtr` has been removed -- Function `*WebAppsClientListSnapshotsFromDRSecondaryPager.Err` has been removed -- Function `*WebAppsClientStartNetworkTraceSlotPoller.FinalResponse` has been removed -- Function `*DiagnosticsClientListSiteDiagnosticCategoriesSlotPager.Err` has been removed -- Function `*DomainsClientListRecommendationsPager.PageResponse` has been removed -- Function `*WebAppsClientGetAppSettingsKeyVaultReferencesSlotPager.Err` has been removed -- Function `*PlansClientListHybridConnectionsPager.PageResponse` has been removed -- Function `*WebAppsClientStartWebSiteNetworkTraceOperationPoller.Done` has been removed -- Function `*EnvironmentsClientListByResourceGroupPager.Err` has been removed -- Function `*RecommendationsClientListPager.PageResponse` has been removed -- Function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildPager.PageResponse` has been removed -- Function `SKUName.ToPtr` has been removed -- Function `*WebAppsClientListSnapshotsFromDRSecondarySlotPager.Err` has been removed -- Function `DomainStatus.ToPtr` has been removed -- Function `*WebAppsClientRestoreFromDeletedAppSlotPoller.FinalResponse` has been removed -- Function `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPollerResponse.PollUntilDone` has been removed -- Function `*StaticSitesClientDeleteStaticSiteCustomDomainPoller.ResumeToken` has been removed -- Function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePoller.FinalResponse` has been removed -- Function `*TopLevelDomainsClientListPager.NextPage` has been removed -- Function `*CertificateOrdersClientCreateOrUpdatePoller.Done` has been removed -- Function `*WebAppsClientGetPrivateEndpointConnectionListPager.NextPage` has been removed -- Function `StackPreferredOs.ToPtr` has been removed -- Function `*WebAppsClientListUsagesSlotPager.NextPage` has been removed -- Function `KubeEnvironmentProvisioningState.ToPtr` has been removed -- Function `*EnvironmentsClientGetPrivateEndpointConnectionListPager.Err` has been removed -- Function `*WebAppsClientListHostNameBindingsSlotPager.Err` has been removed -- Function `*WebSiteManagementClientListSourceControlsPager.PageResponse` has been removed -- Function `*WebAppsClientSwapSlotWithProductionPollerResponse.Resume` has been removed -- Function `*CertificateOrdersClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*StaticSitesClientListStaticSiteFunctionsPager.PageResponse` has been removed -- Function `*WebAppsClientListHostNameBindingsSlotPager.PageResponse` has been removed -- Function `*WebAppsClientListBackupsSlotPager.NextPage` has been removed -- Function `*StaticSitesClientDeletePrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `*WebAppsClientInstallSiteExtensionSlotPoller.Poll` has been removed -- Function `HostNameType.ToPtr` has been removed -- Function `*WebAppsClientRestoreSnapshotPoller.ResumeToken` has been removed -- Function `*WebAppsClientCreateInstanceMSDeployOperationPoller.FinalResponse` has been removed -- Function `*WebAppsClientMigrateMySQLPoller.ResumeToken` has been removed -- Function `*TopLevelDomainsClientListAgreementsPager.NextPage` has been removed -- Function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotPoller.ResumeToken` has been removed -- Function `*WebAppsClientCreateFunctionPoller.FinalResponse` has been removed -- Function `*WebAppsClientRestoreSnapshotSlotPoller.Poll` has been removed -- Function `*WebAppsClientMigrateMySQLPollerResponse.Resume` has been removed -- Function `*WebAppsClientListBackupsPager.Err` has been removed -- Function `*CertificateOrdersClientCreateOrUpdateCertificatePoller.ResumeToken` has been removed -- Function `*TopLevelDomainsClientListPager.Err` has been removed -- Function `*RecommendationsClientListHistoryForHostingEnvironmentPager.NextPage` has been removed -- Function `*EnvironmentsClientResumePager.PageResponse` has been removed -- Function `EnvironmentsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `WebAppsClientRestoreFromBackupBlobSlotPollerResponse.PollUntilDone` has been removed -- Function `*ContainerAppsClientDeletePoller.ResumeToken` has been removed -- Function `*WebAppsClientListPerfMonCountersPager.NextPage` has been removed -- Function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `*EnvironmentsClientListMultiRolePoolSKUsPager.NextPage` has been removed -- Function `*WebAppsClientStartWebSiteNetworkTraceOperationPollerResponse.Resume` has been removed -- Function `*WebAppsClientListTriggeredWebJobsPager.NextPage` has been removed -- Function `*RecommendationsClientListRecommendedRulesForWebAppPager.NextPage` has been removed -- Function `*DiagnosticsClientListSiteAnalysesSlotPager.PageResponse` has been removed -- Function `DNSType.ToPtr` has been removed -- Function `*WebAppsClientCreateMSDeployOperationPoller.Poll` has been removed -- Function `*PlansClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*WebAppsClientRestoreFromBackupBlobSlotPoller.ResumeToken` has been removed -- Function `*WebAppsClientListConfigurationsPager.NextPage` has been removed -- Function `*EnvironmentsClientListWebWorkerMetricDefinitionsPager.NextPage` has been removed -- Function `*CertificateOrdersClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*KubeEnvironmentsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*WebAppsClientCreateFunctionPoller.ResumeToken` has been removed -- Function `*StaticSitesClientCreateOrUpdateStaticSitePoller.FinalResponse` has been removed -- Function `*WebAppsClientGetAppSettingsKeyVaultReferencesSlotPager.PageResponse` has been removed -- Function `*WebAppsClientSwapSlotPoller.Done` has been removed -- Function `*WebAppsClientListInstanceProcessThreadsPager.Err` has been removed -- Function `*WebAppsClientCreateInstanceFunctionSlotPollerResponse.Resume` has been removed -- Function `*EnvironmentsClientCreateOrUpdateWorkerPoolPoller.Done` has been removed -- Function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotPager.NextPage` has been removed -- Function `WorkerSizeOptions.ToPtr` has been removed -- Function `*WebAppsClientStartNetworkTraceSlotPoller.Poll` has been removed -- Function `*WebAppsClientListTriggeredWebJobHistorySlotPager.Err` has been removed -- Function `CertificateOrderStatus.ToPtr` has been removed -- Function `*WebAppsClientListProcessThreadsPager.PageResponse` has been removed -- Function `*EnvironmentsClientListPager.PageResponse` has been removed -- Function `*WebAppsClientMigrateStoragePoller.Done` has been removed -- Function `*StaticSitesClientCreateZipDeploymentForStaticSiteBuildPollerResponse.Resume` has been removed -- Function `*EnvironmentsClientListWorkerPoolSKUsPager.NextPage` has been removed -- Function `SupportedTLSVersions.ToPtr` has been removed -- Function `*PlansClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*EnvironmentsClientCreateOrUpdateWorkerPoolPollerResponse.Resume` has been removed -- Function `*WebAppsClientListSiteBackupsPager.NextPage` has been removed -- Function `*KubeEnvironmentsClientDeletePollerResponse.Resume` has been removed -- Function `EnvironmentsClientSuspendPollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientListMultiRolePoolsPager.NextPage` has been removed -- Function `*EnvironmentsClientDeletePrivateEndpointConnectionPoller.Poll` has been removed -- Function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotPoller.Poll` has been removed -- Function `ForwardProxyConvention.ToPtr` has been removed -- Function `*StaticSitesClientListStaticSiteBuildFunctionsPager.Err` has been removed -- Function `*WebAppsClientListByResourceGroupPager.NextPage` has been removed -- Function `*StaticSitesClientDeleteStaticSiteCustomDomainPoller.Done` has been removed -- Function `*WebAppsClientListConfigurationsPager.PageResponse` has been removed -- Function `*KubeEnvironmentsClientCreateOrUpdatePoller.Done` has been removed -- Function `*WebAppsClientListSiteExtensionsSlotPager.NextPage` has been removed -- Function `Enum20.ToPtr` has been removed -- Function `*WebAppsClientListBasicPublishingCredentialsPoliciesSlotPager.PageResponse` has been removed -- Function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePoller.Done` has been removed -- Function `*WebAppsClientCreateMSDeployOperationPollerResponse.Resume` has been removed -- Function `*StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePollerResponse.Resume` has been removed -- Function `*WebAppsClientGetAppSettingsKeyVaultReferencesPager.NextPage` has been removed -- Function `*WebAppsClientRestoreFromBackupBlobPollerResponse.Resume` has been removed -- Function `*WebAppsClientStartNetworkTracePollerResponse.Resume` has been removed -- Function `*WebAppsClientListWebJobsSlotPager.NextPage` has been removed -- Function `*WebAppsClientListProcessesSlotPager.PageResponse` has been removed -- Function `*ProviderClientGetWebAppStacksForLocationPager.NextPage` has been removed -- Function `*DomainsClientListPager.NextPage` has been removed -- Function `*WebAppsClientCreateOrUpdateSourceControlPoller.FinalResponse` has been removed -- Function `*StaticSitesClientCreateZipDeploymentForStaticSitePoller.Poll` has been removed -- Function `ScmType.ToPtr` has been removed -- Function `*EnvironmentsClientListWorkerPoolsPager.Err` has been removed -- Function `*WebAppsClientCreateInstanceFunctionSlotPoller.Done` has been removed -- Function `*WebAppsClientListWebJobsPager.PageResponse` has been removed -- Function `*KubeEnvironmentsClientDeletePoller.Done` has been removed -- Function `TriggerTypes.ToPtr` has been removed -- Function `*EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPoller.Done` has been removed -- Function `*WebAppsClientInstallSiteExtensionPoller.Done` has been removed -- Function `*WebAppsClientCreateInstanceMSDeployOperationPoller.Done` has been removed -- Function `*WebAppsClientInstallSiteExtensionPollerResponse.Resume` has been removed -- Function `EnvironmentsClientDeletePrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientSwapSlotPoller.FinalResponse` has been removed -- Function `*StaticSitesClientCreateZipDeploymentForStaticSitePollerResponse.Resume` has been removed -- Function `*StaticSitesClientDeleteStaticSiteBuildPoller.Poll` has been removed -- Function `*WebAppsClientStartNetworkTraceSlotPollerResponse.Resume` has been removed -- Function `*WebAppsClientStartNetworkTracePoller.Poll` has been removed -- Function `*DiagnosticsClientListSiteDetectorResponsesPager.PageResponse` has been removed -- Function `*DomainsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*WebAppsClientListPublishingCredentialsSlotPoller.Poll` has been removed -- Function `*WebAppsClientListDeploymentsPager.NextPage` has been removed -- Function `*WebAppsClientListPublishingCredentialsPoller.ResumeToken` has been removed -- Function `*WebAppsClientCreateInstanceMSDeployOperationPoller.ResumeToken` has been removed -- Function `*DomainsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*StaticSitesClientGetStaticSitesByResourceGroupPager.Err` has been removed -- Function `StaticSitesClientCreateOrUpdateStaticSitePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotPager.PageResponse` has been removed -- Function `*WebAppsClientRestoreFromBackupBlobPoller.ResumeToken` has been removed -- Function `*CertificateOrdersClientCreateOrUpdateCertificatePoller.FinalResponse` has been removed -- Function `*PlansClientListWebAppsPager.NextPage` has been removed -- Function `*WebAppsClientListProcessThreadsSlotPager.PageResponse` has been removed -- Function `*WebAppsClientCreateOrUpdateSourceControlPollerResponse.Resume` has been removed -- Function `KeyVaultSecretStatus.ToPtr` has been removed -- Function `*StaticSitesClientCreateZipDeploymentForStaticSitePoller.Done` has been removed -- Function `*WebAppsClientListDomainOwnershipIdentifiersPager.Err` has been removed -- Function `ResolveStatus.ToPtr` has been removed -- Function `*WebAppsClientRestorePoller.Poll` has been removed -- Function `*WebAppsClientCreateOrUpdateSlotPoller.ResumeToken` has been removed -- Function `*WebAppsClientListPublicCertificatesSlotPager.Err` has been removed -- Function `*WebAppsClientStartWebSiteNetworkTraceOperationPoller.ResumeToken` has been removed -- Function `*WebAppsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*WebAppsClientListDeploymentsSlotPager.Err` has been removed -- Function `*EnvironmentsClientGetInboundNetworkDependenciesEndpointsPager.NextPage` has been removed -- Function `*StaticSitesClientDetachStaticSitePoller.ResumeToken` has been removed -- Function `*WebAppsClientListSiteExtensionsSlotPager.Err` has been removed -- Function `*WebAppsClientListFunctionsPager.NextPage` has been removed -- Function `*WebAppsClientCreateOrUpdateSourceControlPoller.Poll` has been removed -- Function `*DomainRegistrationProviderClientListOperationsPager.NextPage` has been removed -- Function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePoller.Poll` has been removed -- Function `*PlansClientListWebAppsPager.Err` has been removed -- Function `*WebAppsClientListSlotDifferencesFromProductionPager.NextPage` has been removed -- Function `*EnvironmentsClientGetPrivateEndpointConnectionListPager.NextPage` has been removed -- Function `*StaticSitesClientDeletePrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*WebAppsClientListTriggeredWebJobsSlotPager.Err` has been removed -- Function `*DiagnosticsClientListSiteAnalysesSlotPager.NextPage` has been removed -- Function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPoller.ResumeToken` has been removed -- Function `*WebAppsClientListTriggeredWebJobHistoryPager.NextPage` has been removed -- Function `BuildStatus.ToPtr` has been removed -- Function `KubeEnvironmentsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListProcessesPager.PageResponse` has been removed -- Function `*EnvironmentsClientGetPrivateEndpointConnectionListPager.PageResponse` has been removed -- Function `WebAppsClientRestoreFromDeletedAppPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListProcessThreadsPager.Err` has been removed -- Function `*EnvironmentsClientResumePager.Err` has been removed -- Function `*KubeEnvironmentsClientDeletePoller.ResumeToken` has been removed -- Function `StaticSitesClientDetachStaticSitePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListSlotDifferencesSlotPager.PageResponse` has been removed -- Function `*WebAppsClientCreateMSDeployOperationSlotPoller.FinalResponse` has been removed -- Function `*WebAppsClientListInstanceProcessModulesPager.NextPage` has been removed -- Function `*WebAppsClientDeletePrivateEndpointConnectionSlotPoller.ResumeToken` has been removed -- Function `*StaticSitesClientDeleteStaticSitePoller.Done` has been removed -- Function `*DeletedWebAppsClientListByLocationPager.PageResponse` has been removed -- Function `*KubeEnvironmentsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePoller.ResumeToken` has been removed -- Function `*WebAppsClientListConfigurationsSlotPager.PageResponse` has been removed -- Function `*EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsPager.PageResponse` has been removed -- Function `*KubeEnvironmentsClientListByResourceGroupPager.PageResponse` has been removed -- Function `*EnvironmentsClientSuspendPollerResponse.Resume` has been removed -- Function `*WebAppsClientListBackupsPager.NextPage` has been removed -- Function `*StaticSitesClientDeletePrivateEndpointConnectionPoller.Poll` has been removed -- Function `BackupRestoreOperationType.ToPtr` has been removed -- Function `OperationStatus.ToPtr` has been removed -- Function `*WebAppsClientListSnapshotsPager.PageResponse` has been removed -- Function `*WebAppsClientRestoreSnapshotPoller.Done` has been removed -- Function `*EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPoller.Poll` has been removed -- Function `*StaticSitesClientDetachStaticSitePoller.Done` has been removed -- Function `*PlansClientListPager.PageResponse` has been removed -- Function `*WebAppsClientListPublishingCredentialsPoller.Poll` has been removed -- Function `*DiagnosticsClientListSiteDetectorsSlotPager.PageResponse` has been removed -- Function `SiteExtensionType.ToPtr` has been removed -- Function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionPoller.Done` has been removed -- Function `*ContainerAppsClientDeletePoller.Done` has been removed -- Function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPoller.FinalResponse` has been removed -- Function `EnvironmentsClientChangeVnetPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListBackupsSlotPager.Err` has been removed -- Function `*WebAppsClientSwapSlotWithProductionPoller.FinalResponse` has been removed -- Function `FtpsState.ToPtr` has been removed -- Function `*WebAppsClientListProcessThreadsSlotPager.Err` has been removed -- Function `RevisionProvisioningState.ToPtr` has been removed -- Function `*WebSiteManagementClientListCustomHostNameSitesPager.Err` has been removed -- Function `CheckNameResourceTypes.ToPtr` has been removed -- Function `*WebAppsClientInstallSiteExtensionSlotPoller.ResumeToken` has been removed -- Function `DNSVerificationTestResult.ToPtr` has been removed -- Function `KubeEnvironmentsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*EnvironmentsClientDeletePrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `*WebSiteManagementClientListGeoRegionsPager.NextPage` has been removed -- Function `*StaticSitesClientApproveOrRejectPrivateEndpointConnectionPoller.Poll` has been removed -- Function `*StaticSitesClientDeleteStaticSiteCustomDomainPoller.Poll` has been removed -- Function `*WebAppsClientGetPrivateEndpointConnectionListPager.Err` has been removed -- Function `*WebAppsClientListDomainOwnershipIdentifiersPager.PageResponse` has been removed -- Function `*ProviderClientGetAvailableStacksPager.PageResponse` has been removed -- Function `*StaticSitesClientGetPrivateEndpointConnectionListPager.Err` has been removed -- Function `*WebAppsClientListConfigurationSnapshotInfoPager.Err` has been removed -- Function `*KubeEnvironmentsClientDeletePoller.Poll` has been removed -- Function `WebAppsClientCreateInstanceFunctionSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientListBasicPublishingCredentialsPoliciesPager.Err` has been removed -- Function `*WebAppsClientListSiteBackupsSlotPager.PageResponse` has been removed -- Function `*WebSiteManagementClientListSiteIdentifiersAssignedToHostNamePager.NextPage` has been removed -- Function `UnauthenticatedClientActionV2.ToPtr` has been removed -- Function `*EnvironmentsClientChangeVnetPoller.Done` has been removed -- Function `EnvironmentsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*DiagnosticsClientListSiteAnalysesPager.NextPage` has been removed -- Function `*EnvironmentsClientDeletePoller.ResumeToken` has been removed -- Function `*EnvironmentsClientListMultiRoleUsagesPager.Err` has been removed -- Function `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPollerResponse.PollUntilDone` has been removed -- Function `*DiagnosticsClientListSiteDetectorsPager.NextPage` has been removed -- Function `*StaticSitesClientListPager.Err` has been removed -- Function `*WebAppsClientDeletePrivateEndpointConnectionSlotPoller.FinalResponse` has been removed -- Function `Channels.ToPtr` has been removed -- Function `*CertificateOrdersClientListByResourceGroupPager.Err` has been removed -- Function `StaticSitesClientCreateZipDeploymentForStaticSiteBuildPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsClientDeletePrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `*ContainerAppsClientDeletePoller.FinalResponse` has been removed -- Function `*ProviderClientGetAvailableStacksOnPremPager.Err` has been removed -- Function `*EnvironmentsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*DiagnosticsClientListSiteDiagnosticCategoriesSlotPager.PageResponse` has been removed -- Function `*WebAppsClientStartNetworkTracePoller.Done` has been removed -- Function `*WebAppsClientListInstanceProcessesSlotPager.NextPage` has been removed -- Function `*PlansClientListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsClientListSnapshotsFromDRSecondarySlotPager.PageResponse` has been removed -- Function `*WebSiteManagementClientListBillingMetersPager.Err` has been removed -- Function `PlansClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `InAvailabilityReasonType.ToPtr` has been removed -- Function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildPager.NextPage` has been removed -- Function `*EnvironmentsClientCreateOrUpdatePoller.Poll` has been removed -- Struct `CertificateOrdersClientCreateOrUpdateCertificatePoller` has been removed -- Struct `CertificateOrdersClientCreateOrUpdateCertificatePollerResponse` has been removed -- Struct `CertificateOrdersClientCreateOrUpdateCertificateResult` has been removed -- Struct `CertificateOrdersClientCreateOrUpdatePoller` has been removed -- Struct `CertificateOrdersClientCreateOrUpdatePollerResponse` has been removed -- Struct `CertificateOrdersClientCreateOrUpdateResult` has been removed -- Struct `CertificateOrdersClientGetCertificateResult` has been removed -- Struct `CertificateOrdersClientGetResult` has been removed -- Struct `CertificateOrdersClientListByResourceGroupPager` has been removed -- Struct `CertificateOrdersClientListByResourceGroupResult` has been removed -- Struct `CertificateOrdersClientListCertificatesPager` has been removed -- Struct `CertificateOrdersClientListCertificatesResult` has been removed -- Struct `CertificateOrdersClientListPager` has been removed -- Struct `CertificateOrdersClientListResult` has been removed -- Struct `CertificateOrdersClientRetrieveCertificateActionsResult` has been removed -- Struct `CertificateOrdersClientRetrieveCertificateEmailHistoryResult` has been removed -- Struct `CertificateOrdersClientRetrieveSiteSealResult` has been removed -- Struct `CertificateOrdersClientUpdateCertificateResult` has been removed -- Struct `CertificateOrdersClientUpdateResult` has been removed -- Struct `CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResult` has been removed -- Struct `CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponsePager` has been removed -- Struct `CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResult` has been removed -- Struct `CertificateRegistrationProviderClientListOperationsPager` has been removed -- Struct `CertificateRegistrationProviderClientListOperationsResult` has been removed -- Struct `CertificatesClientCreateOrUpdateResult` has been removed -- Struct `CertificatesClientGetResult` has been removed -- Struct `CertificatesClientListByResourceGroupPager` has been removed -- Struct `CertificatesClientListByResourceGroupResult` has been removed -- Struct `CertificatesClientListPager` has been removed -- Struct `CertificatesClientListResult` has been removed -- Struct `CertificatesClientUpdateResult` has been removed -- Struct `ContainerAppsClientCreateOrUpdatePoller` has been removed -- Struct `ContainerAppsClientCreateOrUpdatePollerResponse` has been removed -- Struct `ContainerAppsClientCreateOrUpdateResult` has been removed -- Struct `ContainerAppsClientDeletePoller` has been removed -- Struct `ContainerAppsClientDeletePollerResponse` has been removed -- Struct `ContainerAppsClientGetResult` has been removed -- Struct `ContainerAppsClientListByResourceGroupPager` has been removed -- Struct `ContainerAppsClientListByResourceGroupResult` has been removed -- Struct `ContainerAppsClientListBySubscriptionPager` has been removed -- Struct `ContainerAppsClientListBySubscriptionResult` has been removed -- Struct `ContainerAppsClientListSecretsResult` has been removed -- Struct `ContainerAppsRevisionsClientGetRevisionResult` has been removed -- Struct `ContainerAppsRevisionsClientListRevisionsPager` has been removed -- Struct `ContainerAppsRevisionsClientListRevisionsResult` has been removed -- Struct `DeletedWebAppsClientGetDeletedWebAppByLocationResult` has been removed -- Struct `DeletedWebAppsClientListByLocationPager` has been removed -- Struct `DeletedWebAppsClientListByLocationResult` has been removed -- Struct `DeletedWebAppsClientListPager` has been removed -- Struct `DeletedWebAppsClientListResult` has been removed -- Struct `DiagnosticsClientExecuteSiteAnalysisResult` has been removed -- Struct `DiagnosticsClientExecuteSiteAnalysisSlotResult` has been removed -- Struct `DiagnosticsClientExecuteSiteDetectorResult` has been removed -- Struct `DiagnosticsClientExecuteSiteDetectorSlotResult` has been removed -- Struct `DiagnosticsClientGetHostingEnvironmentDetectorResponseResult` has been removed -- Struct `DiagnosticsClientGetSiteAnalysisResult` has been removed -- Struct `DiagnosticsClientGetSiteAnalysisSlotResult` has been removed -- Struct `DiagnosticsClientGetSiteDetectorResponseResult` has been removed -- Struct `DiagnosticsClientGetSiteDetectorResponseSlotResult` has been removed -- Struct `DiagnosticsClientGetSiteDetectorResult` has been removed -- Struct `DiagnosticsClientGetSiteDetectorSlotResult` has been removed -- Struct `DiagnosticsClientGetSiteDiagnosticCategoryResult` has been removed -- Struct `DiagnosticsClientGetSiteDiagnosticCategorySlotResult` has been removed -- Struct `DiagnosticsClientListHostingEnvironmentDetectorResponsesPager` has been removed -- Struct `DiagnosticsClientListHostingEnvironmentDetectorResponsesResult` has been removed -- Struct `DiagnosticsClientListSiteAnalysesPager` has been removed -- Struct `DiagnosticsClientListSiteAnalysesResult` has been removed -- Struct `DiagnosticsClientListSiteAnalysesSlotPager` has been removed -- Struct `DiagnosticsClientListSiteAnalysesSlotResult` has been removed -- Struct `DiagnosticsClientListSiteDetectorResponsesPager` has been removed -- Struct `DiagnosticsClientListSiteDetectorResponsesResult` has been removed -- Struct `DiagnosticsClientListSiteDetectorResponsesSlotPager` has been removed -- Struct `DiagnosticsClientListSiteDetectorResponsesSlotResult` has been removed -- Struct `DiagnosticsClientListSiteDetectorsPager` has been removed -- Struct `DiagnosticsClientListSiteDetectorsResult` has been removed -- Struct `DiagnosticsClientListSiteDetectorsSlotPager` has been removed -- Struct `DiagnosticsClientListSiteDetectorsSlotResult` has been removed -- Struct `DiagnosticsClientListSiteDiagnosticCategoriesPager` has been removed -- Struct `DiagnosticsClientListSiteDiagnosticCategoriesResult` has been removed -- Struct `DiagnosticsClientListSiteDiagnosticCategoriesSlotPager` has been removed -- Struct `DiagnosticsClientListSiteDiagnosticCategoriesSlotResult` has been removed -- Struct `DomainRegistrationProviderClientListOperationsPager` has been removed -- Struct `DomainRegistrationProviderClientListOperationsResult` has been removed -- Struct `DomainsClientCheckAvailabilityResult` has been removed -- Struct `DomainsClientCreateOrUpdateOwnershipIdentifierResult` has been removed -- Struct `DomainsClientCreateOrUpdatePoller` has been removed -- Struct `DomainsClientCreateOrUpdatePollerResponse` has been removed -- Struct `DomainsClientCreateOrUpdateResult` has been removed -- Struct `DomainsClientGetControlCenterSsoRequestResult` has been removed -- Struct `DomainsClientGetOwnershipIdentifierResult` has been removed -- Struct `DomainsClientGetResult` has been removed -- Struct `DomainsClientListByResourceGroupPager` has been removed -- Struct `DomainsClientListByResourceGroupResult` has been removed -- Struct `DomainsClientListOwnershipIdentifiersPager` has been removed -- Struct `DomainsClientListOwnershipIdentifiersResult` has been removed -- Struct `DomainsClientListPager` has been removed -- Struct `DomainsClientListRecommendationsPager` has been removed -- Struct `DomainsClientListRecommendationsResult` has been removed -- Struct `DomainsClientListResult` has been removed -- Struct `DomainsClientTransferOutResult` has been removed -- Struct `DomainsClientUpdateOwnershipIdentifierResult` has been removed -- Struct `DomainsClientUpdateResult` has been removed -- Struct `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPoller` has been removed -- Struct `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPollerResponse` has been removed -- Struct `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResult` has been removed -- Struct `EnvironmentsClientChangeVnetPager` has been removed -- Struct `EnvironmentsClientChangeVnetPoller` has been removed -- Struct `EnvironmentsClientChangeVnetPollerResponse` has been removed -- Struct `EnvironmentsClientChangeVnetResult` has been removed -- Struct `EnvironmentsClientCreateOrUpdateMultiRolePoolPoller` has been removed -- Struct `EnvironmentsClientCreateOrUpdateMultiRolePoolPollerResponse` has been removed -- Struct `EnvironmentsClientCreateOrUpdateMultiRolePoolResult` has been removed -- Struct `EnvironmentsClientCreateOrUpdatePoller` has been removed -- Struct `EnvironmentsClientCreateOrUpdatePollerResponse` has been removed -- Struct `EnvironmentsClientCreateOrUpdateResult` has been removed -- Struct `EnvironmentsClientCreateOrUpdateWorkerPoolPoller` has been removed -- Struct `EnvironmentsClientCreateOrUpdateWorkerPoolPollerResponse` has been removed -- Struct `EnvironmentsClientCreateOrUpdateWorkerPoolResult` has been removed -- Struct `EnvironmentsClientDeletePoller` has been removed -- Struct `EnvironmentsClientDeletePollerResponse` has been removed -- Struct `EnvironmentsClientDeletePrivateEndpointConnectionPoller` has been removed -- Struct `EnvironmentsClientDeletePrivateEndpointConnectionPollerResponse` has been removed -- Struct `EnvironmentsClientDeletePrivateEndpointConnectionResult` has been removed -- Struct `EnvironmentsClientGetAseV3NetworkingConfigurationResult` has been removed -- Struct `EnvironmentsClientGetDiagnosticsItemResult` has been removed -- Struct `EnvironmentsClientGetInboundNetworkDependenciesEndpointsPager` has been removed -- Struct `EnvironmentsClientGetInboundNetworkDependenciesEndpointsResult` has been removed -- Struct `EnvironmentsClientGetMultiRolePoolResult` has been removed -- Struct `EnvironmentsClientGetOutboundNetworkDependenciesEndpointsPager` has been removed -- Struct `EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResult` has been removed -- Struct `EnvironmentsClientGetPrivateEndpointConnectionListPager` has been removed -- Struct `EnvironmentsClientGetPrivateEndpointConnectionListResult` has been removed -- Struct `EnvironmentsClientGetPrivateEndpointConnectionResult` has been removed -- Struct `EnvironmentsClientGetPrivateLinkResourcesResult` has been removed -- Struct `EnvironmentsClientGetResult` has been removed -- Struct `EnvironmentsClientGetVipInfoResult` has been removed -- Struct `EnvironmentsClientGetWorkerPoolResult` has been removed -- Struct `EnvironmentsClientListAppServicePlansPager` has been removed -- Struct `EnvironmentsClientListAppServicePlansResult` has been removed -- Struct `EnvironmentsClientListByResourceGroupPager` has been removed -- Struct `EnvironmentsClientListByResourceGroupResult` has been removed -- Struct `EnvironmentsClientListCapacitiesPager` has been removed -- Struct `EnvironmentsClientListCapacitiesResult` has been removed -- Struct `EnvironmentsClientListDiagnosticsResult` has been removed -- Struct `EnvironmentsClientListMultiRoleMetricDefinitionsPager` has been removed -- Struct `EnvironmentsClientListMultiRoleMetricDefinitionsResult` has been removed -- Struct `EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsPager` has been removed -- Struct `EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResult` has been removed -- Struct `EnvironmentsClientListMultiRolePoolSKUsPager` has been removed -- Struct `EnvironmentsClientListMultiRolePoolSKUsResult` has been removed -- Struct `EnvironmentsClientListMultiRolePoolsPager` has been removed -- Struct `EnvironmentsClientListMultiRolePoolsResult` has been removed -- Struct `EnvironmentsClientListMultiRoleUsagesPager` has been removed -- Struct `EnvironmentsClientListMultiRoleUsagesResult` has been removed -- Struct `EnvironmentsClientListOperationsResult` has been removed -- Struct `EnvironmentsClientListPager` has been removed -- Struct `EnvironmentsClientListResult` has been removed -- Struct `EnvironmentsClientListUsagesPager` has been removed -- Struct `EnvironmentsClientListUsagesResult` has been removed -- Struct `EnvironmentsClientListWebAppsPager` has been removed -- Struct `EnvironmentsClientListWebAppsResult` has been removed -- Struct `EnvironmentsClientListWebWorkerMetricDefinitionsPager` has been removed -- Struct `EnvironmentsClientListWebWorkerMetricDefinitionsResult` has been removed -- Struct `EnvironmentsClientListWebWorkerUsagesPager` has been removed -- Struct `EnvironmentsClientListWebWorkerUsagesResult` has been removed -- Struct `EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsPager` has been removed -- Struct `EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResult` has been removed -- Struct `EnvironmentsClientListWorkerPoolSKUsPager` has been removed -- Struct `EnvironmentsClientListWorkerPoolSKUsResult` has been removed -- Struct `EnvironmentsClientListWorkerPoolsPager` has been removed -- Struct `EnvironmentsClientListWorkerPoolsResult` has been removed -- Struct `EnvironmentsClientResumePager` has been removed -- Struct `EnvironmentsClientResumePoller` has been removed -- Struct `EnvironmentsClientResumePollerResponse` has been removed -- Struct `EnvironmentsClientResumeResult` has been removed -- Struct `EnvironmentsClientSuspendPager` has been removed -- Struct `EnvironmentsClientSuspendPoller` has been removed -- Struct `EnvironmentsClientSuspendPollerResponse` has been removed -- Struct `EnvironmentsClientSuspendResult` has been removed -- Struct `EnvironmentsClientUpdateAseNetworkingConfigurationResult` has been removed -- Struct `EnvironmentsClientUpdateMultiRolePoolResult` has been removed -- Struct `EnvironmentsClientUpdateResult` has been removed -- Struct `EnvironmentsClientUpdateWorkerPoolResult` has been removed -- Struct `GlobalClientGetDeletedWebAppResult` has been removed -- Struct `GlobalClientGetDeletedWebAppSnapshotsResult` has been removed -- Struct `KubeEnvironmentsClientCreateOrUpdatePoller` has been removed -- Struct `KubeEnvironmentsClientCreateOrUpdatePollerResponse` has been removed -- Struct `KubeEnvironmentsClientCreateOrUpdateResult` has been removed -- Struct `KubeEnvironmentsClientDeletePoller` has been removed -- Struct `KubeEnvironmentsClientDeletePollerResponse` has been removed -- Struct `KubeEnvironmentsClientGetResult` has been removed -- Struct `KubeEnvironmentsClientListByResourceGroupPager` has been removed -- Struct `KubeEnvironmentsClientListByResourceGroupResult` has been removed -- Struct `KubeEnvironmentsClientListBySubscriptionPager` has been removed -- Struct `KubeEnvironmentsClientListBySubscriptionResult` has been removed -- Struct `KubeEnvironmentsClientUpdateResult` has been removed -- Struct `PlansClientCreateOrUpdatePoller` has been removed -- Struct `PlansClientCreateOrUpdatePollerResponse` has been removed -- Struct `PlansClientCreateOrUpdateResult` has been removed -- Struct `PlansClientCreateOrUpdateVnetRouteResult` has been removed -- Struct `PlansClientGetHybridConnectionPlanLimitResult` has been removed -- Struct `PlansClientGetHybridConnectionResult` has been removed -- Struct `PlansClientGetResult` has been removed -- Struct `PlansClientGetRouteForVnetResult` has been removed -- Struct `PlansClientGetServerFarmSKUsResult` has been removed -- Struct `PlansClientGetVnetFromServerFarmResult` has been removed -- Struct `PlansClientGetVnetGatewayResult` has been removed -- Struct `PlansClientListByResourceGroupPager` has been removed -- Struct `PlansClientListByResourceGroupResult` has been removed -- Struct `PlansClientListCapabilitiesResult` has been removed -- Struct `PlansClientListHybridConnectionKeysResult` has been removed -- Struct `PlansClientListHybridConnectionsPager` has been removed -- Struct `PlansClientListHybridConnectionsResult` has been removed -- Struct `PlansClientListPager` has been removed -- Struct `PlansClientListResult` has been removed -- Struct `PlansClientListRoutesForVnetResult` has been removed -- Struct `PlansClientListUsagesPager` has been removed -- Struct `PlansClientListUsagesResult` has been removed -- Struct `PlansClientListVnetsResult` has been removed -- Struct `PlansClientListWebAppsByHybridConnectionPager` has been removed -- Struct `PlansClientListWebAppsByHybridConnectionResult` has been removed -- Struct `PlansClientListWebAppsPager` has been removed -- Struct `PlansClientListWebAppsResult` has been removed -- Struct `PlansClientUpdateResult` has been removed -- Struct `PlansClientUpdateVnetGatewayResult` has been removed -- Struct `PlansClientUpdateVnetRouteResult` has been removed -- Struct `ProviderClientGetAvailableStacksOnPremPager` has been removed -- Struct `ProviderClientGetAvailableStacksOnPremResult` has been removed -- Struct `ProviderClientGetAvailableStacksPager` has been removed -- Struct `ProviderClientGetAvailableStacksResult` has been removed -- Struct `ProviderClientGetFunctionAppStacksForLocationPager` has been removed -- Struct `ProviderClientGetFunctionAppStacksForLocationResult` has been removed -- Struct `ProviderClientGetFunctionAppStacksPager` has been removed -- Struct `ProviderClientGetFunctionAppStacksResult` has been removed -- Struct `ProviderClientGetWebAppStacksForLocationPager` has been removed -- Struct `ProviderClientGetWebAppStacksForLocationResult` has been removed -- Struct `ProviderClientGetWebAppStacksPager` has been removed -- Struct `ProviderClientGetWebAppStacksResult` has been removed -- Struct `ProviderClientListOperationsPager` has been removed -- Struct `ProviderClientListOperationsResult` has been removed -- Struct `RecommendationsClientGetRuleDetailsByHostingEnvironmentResult` has been removed -- Struct `RecommendationsClientGetRuleDetailsByWebAppResult` has been removed -- Struct `RecommendationsClientListHistoryForHostingEnvironmentPager` has been removed -- Struct `RecommendationsClientListHistoryForHostingEnvironmentResult` has been removed -- Struct `RecommendationsClientListHistoryForWebAppPager` has been removed -- Struct `RecommendationsClientListHistoryForWebAppResult` has been removed -- Struct `RecommendationsClientListPager` has been removed -- Struct `RecommendationsClientListRecommendedRulesForHostingEnvironmentPager` has been removed -- Struct `RecommendationsClientListRecommendedRulesForHostingEnvironmentResult` has been removed -- Struct `RecommendationsClientListRecommendedRulesForWebAppPager` has been removed -- Struct `RecommendationsClientListRecommendedRulesForWebAppResult` has been removed -- Struct `RecommendationsClientListResult` has been removed -- Struct `ResourceHealthMetadataClientGetBySiteResult` has been removed -- Struct `ResourceHealthMetadataClientGetBySiteSlotResult` has been removed -- Struct `ResourceHealthMetadataClientListByResourceGroupPager` has been removed -- Struct `ResourceHealthMetadataClientListByResourceGroupResult` has been removed -- Struct `ResourceHealthMetadataClientListBySitePager` has been removed -- Struct `ResourceHealthMetadataClientListBySiteResult` has been removed -- Struct `ResourceHealthMetadataClientListBySiteSlotPager` has been removed -- Struct `ResourceHealthMetadataClientListBySiteSlotResult` has been removed -- Struct `ResourceHealthMetadataClientListPager` has been removed -- Struct `ResourceHealthMetadataClientListResult` has been removed -- Struct `StaticSitesClientApproveOrRejectPrivateEndpointConnectionPoller` has been removed -- Struct `StaticSitesClientApproveOrRejectPrivateEndpointConnectionPollerResponse` has been removed -- Struct `StaticSitesClientApproveOrRejectPrivateEndpointConnectionResult` has been removed -- Struct `StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResult` has been removed -- Struct `StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResult` has been removed -- Struct `StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResult` has been removed -- Struct `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPoller` has been removed -- Struct `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPollerResponse` has been removed -- Struct `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResult` has been removed -- Struct `StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResult` has been removed -- Struct `StaticSitesClientCreateOrUpdateStaticSitePoller` has been removed -- Struct `StaticSitesClientCreateOrUpdateStaticSitePollerResponse` has been removed -- Struct `StaticSitesClientCreateOrUpdateStaticSiteResult` has been removed -- Struct `StaticSitesClientCreateUserRolesInvitationLinkResult` has been removed -- Struct `StaticSitesClientCreateZipDeploymentForStaticSiteBuildPoller` has been removed -- Struct `StaticSitesClientCreateZipDeploymentForStaticSiteBuildPollerResponse` has been removed -- Struct `StaticSitesClientCreateZipDeploymentForStaticSitePoller` has been removed -- Struct `StaticSitesClientCreateZipDeploymentForStaticSitePollerResponse` has been removed -- Struct `StaticSitesClientDeletePrivateEndpointConnectionPoller` has been removed -- Struct `StaticSitesClientDeletePrivateEndpointConnectionPollerResponse` has been removed -- Struct `StaticSitesClientDeletePrivateEndpointConnectionResult` has been removed -- Struct `StaticSitesClientDeleteStaticSiteBuildPoller` has been removed -- Struct `StaticSitesClientDeleteStaticSiteBuildPollerResponse` has been removed -- Struct `StaticSitesClientDeleteStaticSiteCustomDomainPoller` has been removed -- Struct `StaticSitesClientDeleteStaticSiteCustomDomainPollerResponse` has been removed -- Struct `StaticSitesClientDeleteStaticSitePoller` has been removed -- Struct `StaticSitesClientDeleteStaticSitePollerResponse` has been removed -- Struct `StaticSitesClientDetachStaticSitePoller` has been removed -- Struct `StaticSitesClientDetachStaticSitePollerResponse` has been removed -- Struct `StaticSitesClientGetPrivateEndpointConnectionListPager` has been removed -- Struct `StaticSitesClientGetPrivateEndpointConnectionListResult` has been removed -- Struct `StaticSitesClientGetPrivateEndpointConnectionResult` has been removed -- Struct `StaticSitesClientGetPrivateLinkResourcesResult` has been removed -- Struct `StaticSitesClientGetStaticSiteBuildResult` has been removed -- Struct `StaticSitesClientGetStaticSiteBuildsPager` has been removed -- Struct `StaticSitesClientGetStaticSiteBuildsResult` has been removed -- Struct `StaticSitesClientGetStaticSiteCustomDomainResult` has been removed -- Struct `StaticSitesClientGetStaticSiteResult` has been removed -- Struct `StaticSitesClientGetStaticSitesByResourceGroupPager` has been removed -- Struct `StaticSitesClientGetStaticSitesByResourceGroupResult` has been removed -- Struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResult` has been removed -- Struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResult` has been removed -- Struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildPager` has been removed -- Struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResult` has been removed -- Struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSitePager` has been removed -- Struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResult` has been removed -- Struct `StaticSitesClientListPager` has been removed -- Struct `StaticSitesClientListResult` has been removed -- Struct `StaticSitesClientListStaticSiteAppSettingsResult` has been removed -- Struct `StaticSitesClientListStaticSiteBuildAppSettingsResult` has been removed -- Struct `StaticSitesClientListStaticSiteBuildFunctionAppSettingsResult` has been removed -- Struct `StaticSitesClientListStaticSiteBuildFunctionsPager` has been removed -- Struct `StaticSitesClientListStaticSiteBuildFunctionsResult` has been removed -- Struct `StaticSitesClientListStaticSiteConfiguredRolesResult` has been removed -- Struct `StaticSitesClientListStaticSiteCustomDomainsPager` has been removed -- Struct `StaticSitesClientListStaticSiteCustomDomainsResult` has been removed -- Struct `StaticSitesClientListStaticSiteFunctionAppSettingsResult` has been removed -- Struct `StaticSitesClientListStaticSiteFunctionsPager` has been removed -- Struct `StaticSitesClientListStaticSiteFunctionsResult` has been removed -- Struct `StaticSitesClientListStaticSiteSecretsResult` has been removed -- Struct `StaticSitesClientListStaticSiteUsersPager` has been removed -- Struct `StaticSitesClientListStaticSiteUsersResult` has been removed -- Struct `StaticSitesClientPreviewWorkflowResult` has been removed -- Struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller` has been removed -- Struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse` has been removed -- Struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResult` has been removed -- Struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePoller` has been removed -- Struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePollerResponse` has been removed -- Struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResult` has been removed -- Struct `StaticSitesClientUpdateStaticSiteResult` has been removed -- Struct `StaticSitesClientUpdateStaticSiteUserResult` has been removed -- Struct `StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePoller` has been removed -- Struct `StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePollerResponse` has been removed -- Struct `TopLevelDomainsClientGetResult` has been removed -- Struct `TopLevelDomainsClientListAgreementsPager` has been removed -- Struct `TopLevelDomainsClientListAgreementsResult` has been removed -- Struct `TopLevelDomainsClientListPager` has been removed -- Struct `TopLevelDomainsClientListResult` has been removed -- Struct `WebAppsClientAddPremierAddOnResult` has been removed -- Struct `WebAppsClientAddPremierAddOnSlotResult` has been removed -- Struct `WebAppsClientAnalyzeCustomHostnameResult` has been removed -- Struct `WebAppsClientAnalyzeCustomHostnameSlotResult` has been removed -- Struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionPoller` has been removed -- Struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionPollerResponse` has been removed -- Struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionResult` has been removed -- Struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPoller` has been removed -- Struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPollerResponse` has been removed -- Struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResult` has been removed -- Struct `WebAppsClientBackupResult` has been removed -- Struct `WebAppsClientBackupSlotResult` has been removed -- Struct `WebAppsClientCreateDeploymentResult` has been removed -- Struct `WebAppsClientCreateDeploymentSlotResult` has been removed -- Struct `WebAppsClientCreateFunctionPoller` has been removed -- Struct `WebAppsClientCreateFunctionPollerResponse` has been removed -- Struct `WebAppsClientCreateFunctionResult` has been removed -- Struct `WebAppsClientCreateInstanceFunctionSlotPoller` has been removed -- Struct `WebAppsClientCreateInstanceFunctionSlotPollerResponse` has been removed -- Struct `WebAppsClientCreateInstanceFunctionSlotResult` has been removed -- Struct `WebAppsClientCreateInstanceMSDeployOperationPoller` has been removed -- Struct `WebAppsClientCreateInstanceMSDeployOperationPollerResponse` has been removed -- Struct `WebAppsClientCreateInstanceMSDeployOperationResult` has been removed -- Struct `WebAppsClientCreateInstanceMSDeployOperationSlotPoller` has been removed -- Struct `WebAppsClientCreateInstanceMSDeployOperationSlotPollerResponse` has been removed -- Struct `WebAppsClientCreateInstanceMSDeployOperationSlotResult` has been removed -- Struct `WebAppsClientCreateMSDeployOperationPoller` has been removed -- Struct `WebAppsClientCreateMSDeployOperationPollerResponse` has been removed -- Struct `WebAppsClientCreateMSDeployOperationResult` has been removed -- Struct `WebAppsClientCreateMSDeployOperationSlotPoller` has been removed -- Struct `WebAppsClientCreateMSDeployOperationSlotPollerResponse` has been removed -- Struct `WebAppsClientCreateMSDeployOperationSlotResult` has been removed -- Struct `WebAppsClientCreateOneDeployOperationResult` has been removed -- Struct `WebAppsClientCreateOrUpdateConfigurationResult` has been removed -- Struct `WebAppsClientCreateOrUpdateConfigurationSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResult` has been removed -- Struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateFunctionSecretResult` has been removed -- Struct `WebAppsClientCreateOrUpdateFunctionSecretSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateHostNameBindingResult` has been removed -- Struct `WebAppsClientCreateOrUpdateHostNameBindingSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateHostSecretResult` has been removed -- Struct `WebAppsClientCreateOrUpdateHostSecretSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateHybridConnectionResult` has been removed -- Struct `WebAppsClientCreateOrUpdateHybridConnectionSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdatePoller` has been removed -- Struct `WebAppsClientCreateOrUpdatePollerResponse` has been removed -- Struct `WebAppsClientCreateOrUpdatePublicCertificateResult` has been removed -- Struct `WebAppsClientCreateOrUpdatePublicCertificateSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateRelayServiceConnectionResult` has been removed -- Struct `WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateResult` has been removed -- Struct `WebAppsClientCreateOrUpdateSlotPoller` has been removed -- Struct `WebAppsClientCreateOrUpdateSlotPollerResponse` has been removed -- Struct `WebAppsClientCreateOrUpdateSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateSourceControlPoller` has been removed -- Struct `WebAppsClientCreateOrUpdateSourceControlPollerResponse` has been removed -- Struct `WebAppsClientCreateOrUpdateSourceControlResult` has been removed -- Struct `WebAppsClientCreateOrUpdateSourceControlSlotPoller` has been removed -- Struct `WebAppsClientCreateOrUpdateSourceControlSlotPollerResponse` has been removed -- Struct `WebAppsClientCreateOrUpdateSourceControlSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResult` has been removed -- Struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateVnetConnectionGatewayResult` has been removed -- Struct `WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResult` has been removed -- Struct `WebAppsClientCreateOrUpdateVnetConnectionResult` has been removed -- Struct `WebAppsClientCreateOrUpdateVnetConnectionSlotResult` has been removed -- Struct `WebAppsClientDeletePrivateEndpointConnectionPoller` has been removed -- Struct `WebAppsClientDeletePrivateEndpointConnectionPollerResponse` has been removed -- Struct `WebAppsClientDeletePrivateEndpointConnectionResult` has been removed -- Struct `WebAppsClientDeletePrivateEndpointConnectionSlotPoller` has been removed -- Struct `WebAppsClientDeletePrivateEndpointConnectionSlotPollerResponse` has been removed -- Struct `WebAppsClientDeletePrivateEndpointConnectionSlotResult` has been removed -- Struct `WebAppsClientDiscoverBackupResult` has been removed -- Struct `WebAppsClientDiscoverBackupSlotResult` has been removed -- Struct `WebAppsClientGetAppSettingKeyVaultReferenceResult` has been removed -- Struct `WebAppsClientGetAppSettingKeyVaultReferenceSlotResult` has been removed -- Struct `WebAppsClientGetAppSettingsKeyVaultReferencesPager` has been removed -- Struct `WebAppsClientGetAppSettingsKeyVaultReferencesResult` has been removed -- Struct `WebAppsClientGetAppSettingsKeyVaultReferencesSlotPager` has been removed -- Struct `WebAppsClientGetAppSettingsKeyVaultReferencesSlotResult` has been removed -- Struct `WebAppsClientGetAuthSettingsResult` has been removed -- Struct `WebAppsClientGetAuthSettingsSlotResult` has been removed -- Struct `WebAppsClientGetAuthSettingsV2Result` has been removed -- Struct `WebAppsClientGetAuthSettingsV2SlotResult` has been removed -- Struct `WebAppsClientGetAuthSettingsV2WithoutSecretsResult` has been removed -- Struct `WebAppsClientGetBackupConfigurationResult` has been removed -- Struct `WebAppsClientGetBackupConfigurationSlotResult` has been removed -- Struct `WebAppsClientGetBackupStatusResult` has been removed -- Struct `WebAppsClientGetBackupStatusSlotResult` has been removed -- Struct `WebAppsClientGetConfigurationResult` has been removed -- Struct `WebAppsClientGetConfigurationSlotResult` has been removed -- Struct `WebAppsClientGetConfigurationSnapshotResult` has been removed -- Struct `WebAppsClientGetConfigurationSnapshotSlotResult` has been removed -- Struct `WebAppsClientGetContinuousWebJobResult` has been removed -- Struct `WebAppsClientGetContinuousWebJobSlotResult` has been removed -- Struct `WebAppsClientGetDeploymentResult` has been removed -- Struct `WebAppsClientGetDeploymentSlotResult` has been removed -- Struct `WebAppsClientGetDiagnosticLogsConfigurationResult` has been removed -- Struct `WebAppsClientGetDiagnosticLogsConfigurationSlotResult` has been removed -- Struct `WebAppsClientGetDomainOwnershipIdentifierResult` has been removed -- Struct `WebAppsClientGetDomainOwnershipIdentifierSlotResult` has been removed -- Struct `WebAppsClientGetFtpAllowedResult` has been removed -- Struct `WebAppsClientGetFtpAllowedSlotResult` has been removed -- Struct `WebAppsClientGetFunctionResult` has been removed -- Struct `WebAppsClientGetFunctionsAdminTokenResult` has been removed -- Struct `WebAppsClientGetFunctionsAdminTokenSlotResult` has been removed -- Struct `WebAppsClientGetHostNameBindingResult` has been removed -- Struct `WebAppsClientGetHostNameBindingSlotResult` has been removed -- Struct `WebAppsClientGetHybridConnectionResult` has been removed -- Struct `WebAppsClientGetHybridConnectionSlotResult` has been removed -- Struct `WebAppsClientGetInstanceFunctionSlotResult` has been removed -- Struct `WebAppsClientGetInstanceInfoResult` has been removed -- Struct `WebAppsClientGetInstanceInfoSlotResult` has been removed -- Struct `WebAppsClientGetInstanceMSDeployLogResult` has been removed -- Struct `WebAppsClientGetInstanceMSDeployLogSlotResult` has been removed -- Struct `WebAppsClientGetInstanceMsDeployStatusResult` has been removed -- Struct `WebAppsClientGetInstanceMsDeployStatusSlotResult` has been removed -- Struct `WebAppsClientGetInstanceProcessModuleResult` has been removed -- Struct `WebAppsClientGetInstanceProcessModuleSlotResult` has been removed -- Struct `WebAppsClientGetInstanceProcessResult` has been removed -- Struct `WebAppsClientGetInstanceProcessSlotResult` has been removed -- Struct `WebAppsClientGetMSDeployLogResult` has been removed -- Struct `WebAppsClientGetMSDeployLogSlotResult` has been removed -- Struct `WebAppsClientGetMSDeployStatusResult` has been removed -- Struct `WebAppsClientGetMSDeployStatusSlotResult` has been removed -- Struct `WebAppsClientGetMigrateMySQLStatusResult` has been removed -- Struct `WebAppsClientGetMigrateMySQLStatusSlotResult` has been removed -- Struct `WebAppsClientGetNetworkTraceOperationResult` has been removed -- Struct `WebAppsClientGetNetworkTraceOperationSlotResult` has been removed -- Struct `WebAppsClientGetNetworkTraceOperationSlotV2Result` has been removed -- Struct `WebAppsClientGetNetworkTraceOperationV2Result` has been removed -- Struct `WebAppsClientGetNetworkTracesResult` has been removed -- Struct `WebAppsClientGetNetworkTracesSlotResult` has been removed -- Struct `WebAppsClientGetNetworkTracesSlotV2Result` has been removed -- Struct `WebAppsClientGetNetworkTracesV2Result` has been removed -- Struct `WebAppsClientGetOneDeployStatusResult` has been removed -- Struct `WebAppsClientGetPremierAddOnResult` has been removed -- Struct `WebAppsClientGetPremierAddOnSlotResult` has been removed -- Struct `WebAppsClientGetPrivateAccessResult` has been removed -- Struct `WebAppsClientGetPrivateAccessSlotResult` has been removed -- Struct `WebAppsClientGetPrivateEndpointConnectionListPager` has been removed -- Struct `WebAppsClientGetPrivateEndpointConnectionListResult` has been removed -- Struct `WebAppsClientGetPrivateEndpointConnectionListSlotPager` has been removed -- Struct `WebAppsClientGetPrivateEndpointConnectionListSlotResult` has been removed -- Struct `WebAppsClientGetPrivateEndpointConnectionResult` has been removed -- Struct `WebAppsClientGetPrivateEndpointConnectionSlotResult` has been removed -- Struct `WebAppsClientGetPrivateLinkResourcesResult` has been removed -- Struct `WebAppsClientGetPrivateLinkResourcesSlotResult` has been removed -- Struct `WebAppsClientGetProcessModuleResult` has been removed -- Struct `WebAppsClientGetProcessModuleSlotResult` has been removed -- Struct `WebAppsClientGetProcessResult` has been removed -- Struct `WebAppsClientGetProcessSlotResult` has been removed -- Struct `WebAppsClientGetPublicCertificateResult` has been removed -- Struct `WebAppsClientGetPublicCertificateSlotResult` has been removed -- Struct `WebAppsClientGetRelayServiceConnectionResult` has been removed -- Struct `WebAppsClientGetRelayServiceConnectionSlotResult` has been removed -- Struct `WebAppsClientGetResult` has been removed -- Struct `WebAppsClientGetScmAllowedResult` has been removed -- Struct `WebAppsClientGetScmAllowedSlotResult` has been removed -- Struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceResult` has been removed -- Struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResult` has been removed -- Struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesPager` has been removed -- Struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesResult` has been removed -- Struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotPager` has been removed -- Struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResult` has been removed -- Struct `WebAppsClientGetSiteExtensionResult` has been removed -- Struct `WebAppsClientGetSiteExtensionSlotResult` has been removed -- Struct `WebAppsClientGetSitePhpErrorLogFlagResult` has been removed -- Struct `WebAppsClientGetSitePhpErrorLogFlagSlotResult` has been removed -- Struct `WebAppsClientGetSlotResult` has been removed -- Struct `WebAppsClientGetSourceControlResult` has been removed -- Struct `WebAppsClientGetSourceControlSlotResult` has been removed -- Struct `WebAppsClientGetSwiftVirtualNetworkConnectionResult` has been removed -- Struct `WebAppsClientGetSwiftVirtualNetworkConnectionSlotResult` has been removed -- Struct `WebAppsClientGetTriggeredWebJobHistoryResult` has been removed -- Struct `WebAppsClientGetTriggeredWebJobHistorySlotResult` has been removed -- Struct `WebAppsClientGetTriggeredWebJobResult` has been removed -- Struct `WebAppsClientGetTriggeredWebJobSlotResult` has been removed -- Struct `WebAppsClientGetVnetConnectionGatewayResult` has been removed -- Struct `WebAppsClientGetVnetConnectionGatewaySlotResult` has been removed -- Struct `WebAppsClientGetVnetConnectionResult` has been removed -- Struct `WebAppsClientGetVnetConnectionSlotResult` has been removed -- Struct `WebAppsClientGetWebJobResult` has been removed -- Struct `WebAppsClientGetWebJobSlotResult` has been removed -- Struct `WebAppsClientInstallSiteExtensionPoller` has been removed -- Struct `WebAppsClientInstallSiteExtensionPollerResponse` has been removed -- Struct `WebAppsClientInstallSiteExtensionResult` has been removed -- Struct `WebAppsClientInstallSiteExtensionSlotPoller` has been removed -- Struct `WebAppsClientInstallSiteExtensionSlotPollerResponse` has been removed -- Struct `WebAppsClientInstallSiteExtensionSlotResult` has been removed -- Struct `WebAppsClientIsCloneableResult` has been removed -- Struct `WebAppsClientIsCloneableSlotResult` has been removed -- Struct `WebAppsClientListApplicationSettingsResult` has been removed -- Struct `WebAppsClientListApplicationSettingsSlotResult` has been removed -- Struct `WebAppsClientListAzureStorageAccountsResult` has been removed -- Struct `WebAppsClientListAzureStorageAccountsSlotResult` has been removed -- Struct `WebAppsClientListBackupStatusSecretsResult` has been removed -- Struct `WebAppsClientListBackupStatusSecretsSlotResult` has been removed -- Struct `WebAppsClientListBackupsPager` has been removed -- Struct `WebAppsClientListBackupsResult` has been removed -- Struct `WebAppsClientListBackupsSlotPager` has been removed -- Struct `WebAppsClientListBackupsSlotResult` has been removed -- Struct `WebAppsClientListBasicPublishingCredentialsPoliciesPager` has been removed -- Struct `WebAppsClientListBasicPublishingCredentialsPoliciesResult` has been removed -- Struct `WebAppsClientListBasicPublishingCredentialsPoliciesSlotPager` has been removed -- Struct `WebAppsClientListBasicPublishingCredentialsPoliciesSlotResult` has been removed -- Struct `WebAppsClientListByResourceGroupPager` has been removed -- Struct `WebAppsClientListByResourceGroupResult` has been removed -- Struct `WebAppsClientListConfigurationSnapshotInfoPager` has been removed -- Struct `WebAppsClientListConfigurationSnapshotInfoResult` has been removed -- Struct `WebAppsClientListConfigurationSnapshotInfoSlotPager` has been removed -- Struct `WebAppsClientListConfigurationSnapshotInfoSlotResult` has been removed -- Struct `WebAppsClientListConfigurationsPager` has been removed -- Struct `WebAppsClientListConfigurationsResult` has been removed -- Struct `WebAppsClientListConfigurationsSlotPager` has been removed -- Struct `WebAppsClientListConfigurationsSlotResult` has been removed -- Struct `WebAppsClientListConnectionStringsResult` has been removed -- Struct `WebAppsClientListConnectionStringsSlotResult` has been removed -- Struct `WebAppsClientListContinuousWebJobsPager` has been removed -- Struct `WebAppsClientListContinuousWebJobsResult` has been removed -- Struct `WebAppsClientListContinuousWebJobsSlotPager` has been removed -- Struct `WebAppsClientListContinuousWebJobsSlotResult` has been removed -- Struct `WebAppsClientListDeploymentLogResult` has been removed -- Struct `WebAppsClientListDeploymentLogSlotResult` has been removed -- Struct `WebAppsClientListDeploymentsPager` has been removed -- Struct `WebAppsClientListDeploymentsResult` has been removed -- Struct `WebAppsClientListDeploymentsSlotPager` has been removed -- Struct `WebAppsClientListDeploymentsSlotResult` has been removed -- Struct `WebAppsClientListDomainOwnershipIdentifiersPager` has been removed -- Struct `WebAppsClientListDomainOwnershipIdentifiersResult` has been removed -- Struct `WebAppsClientListDomainOwnershipIdentifiersSlotPager` has been removed -- Struct `WebAppsClientListDomainOwnershipIdentifiersSlotResult` has been removed -- Struct `WebAppsClientListFunctionKeysResult` has been removed -- Struct `WebAppsClientListFunctionKeysSlotResult` has been removed -- Struct `WebAppsClientListFunctionSecretsResult` has been removed -- Struct `WebAppsClientListFunctionSecretsSlotResult` has been removed -- Struct `WebAppsClientListFunctionsPager` has been removed -- Struct `WebAppsClientListFunctionsResult` has been removed -- Struct `WebAppsClientListHostKeysResult` has been removed -- Struct `WebAppsClientListHostKeysSlotResult` has been removed -- Struct `WebAppsClientListHostNameBindingsPager` has been removed -- Struct `WebAppsClientListHostNameBindingsResult` has been removed -- Struct `WebAppsClientListHostNameBindingsSlotPager` has been removed -- Struct `WebAppsClientListHostNameBindingsSlotResult` has been removed -- Struct `WebAppsClientListHybridConnectionsResult` has been removed -- Struct `WebAppsClientListHybridConnectionsSlotResult` has been removed -- Struct `WebAppsClientListInstanceFunctionsSlotPager` has been removed -- Struct `WebAppsClientListInstanceFunctionsSlotResult` has been removed -- Struct `WebAppsClientListInstanceIdentifiersPager` has been removed -- Struct `WebAppsClientListInstanceIdentifiersResult` has been removed -- Struct `WebAppsClientListInstanceIdentifiersSlotPager` has been removed -- Struct `WebAppsClientListInstanceIdentifiersSlotResult` has been removed -- Struct `WebAppsClientListInstanceProcessModulesPager` has been removed -- Struct `WebAppsClientListInstanceProcessModulesResult` has been removed -- Struct `WebAppsClientListInstanceProcessModulesSlotPager` has been removed -- Struct `WebAppsClientListInstanceProcessModulesSlotResult` has been removed -- Struct `WebAppsClientListInstanceProcessThreadsPager` has been removed -- Struct `WebAppsClientListInstanceProcessThreadsResult` has been removed -- Struct `WebAppsClientListInstanceProcessThreadsSlotPager` has been removed -- Struct `WebAppsClientListInstanceProcessThreadsSlotResult` has been removed -- Struct `WebAppsClientListInstanceProcessesPager` has been removed -- Struct `WebAppsClientListInstanceProcessesResult` has been removed -- Struct `WebAppsClientListInstanceProcessesSlotPager` has been removed -- Struct `WebAppsClientListInstanceProcessesSlotResult` has been removed -- Struct `WebAppsClientListMetadataResult` has been removed -- Struct `WebAppsClientListMetadataSlotResult` has been removed -- Struct `WebAppsClientListNetworkFeaturesResult` has been removed -- Struct `WebAppsClientListNetworkFeaturesSlotResult` has been removed -- Struct `WebAppsClientListPager` has been removed -- Struct `WebAppsClientListPerfMonCountersPager` has been removed -- Struct `WebAppsClientListPerfMonCountersResult` has been removed -- Struct `WebAppsClientListPerfMonCountersSlotPager` has been removed -- Struct `WebAppsClientListPerfMonCountersSlotResult` has been removed -- Struct `WebAppsClientListPremierAddOnsResult` has been removed -- Struct `WebAppsClientListPremierAddOnsSlotResult` has been removed -- Struct `WebAppsClientListProcessModulesPager` has been removed -- Struct `WebAppsClientListProcessModulesResult` has been removed -- Struct `WebAppsClientListProcessModulesSlotPager` has been removed -- Struct `WebAppsClientListProcessModulesSlotResult` has been removed -- Struct `WebAppsClientListProcessThreadsPager` has been removed -- Struct `WebAppsClientListProcessThreadsResult` has been removed -- Struct `WebAppsClientListProcessThreadsSlotPager` has been removed -- Struct `WebAppsClientListProcessThreadsSlotResult` has been removed -- Struct `WebAppsClientListProcessesPager` has been removed -- Struct `WebAppsClientListProcessesResult` has been removed -- Struct `WebAppsClientListProcessesSlotPager` has been removed -- Struct `WebAppsClientListProcessesSlotResult` has been removed -- Struct `WebAppsClientListPublicCertificatesPager` has been removed -- Struct `WebAppsClientListPublicCertificatesResult` has been removed -- Struct `WebAppsClientListPublicCertificatesSlotPager` has been removed -- Struct `WebAppsClientListPublicCertificatesSlotResult` has been removed -- Struct `WebAppsClientListPublishingCredentialsPoller` has been removed -- Struct `WebAppsClientListPublishingCredentialsPollerResponse` has been removed -- Struct `WebAppsClientListPublishingCredentialsResult` has been removed -- Struct `WebAppsClientListPublishingCredentialsSlotPoller` has been removed -- Struct `WebAppsClientListPublishingCredentialsSlotPollerResponse` has been removed -- Struct `WebAppsClientListPublishingCredentialsSlotResult` has been removed -- Struct `WebAppsClientListRelayServiceConnectionsResult` has been removed -- Struct `WebAppsClientListRelayServiceConnectionsSlotResult` has been removed -- Struct `WebAppsClientListResult` has been removed -- Struct `WebAppsClientListSiteBackupsPager` has been removed -- Struct `WebAppsClientListSiteBackupsResult` has been removed -- Struct `WebAppsClientListSiteBackupsSlotPager` has been removed -- Struct `WebAppsClientListSiteBackupsSlotResult` has been removed -- Struct `WebAppsClientListSiteExtensionsPager` has been removed -- Struct `WebAppsClientListSiteExtensionsResult` has been removed -- Struct `WebAppsClientListSiteExtensionsSlotPager` has been removed -- Struct `WebAppsClientListSiteExtensionsSlotResult` has been removed -- Struct `WebAppsClientListSitePushSettingsResult` has been removed -- Struct `WebAppsClientListSitePushSettingsSlotResult` has been removed -- Struct `WebAppsClientListSlotConfigurationNamesResult` has been removed -- Struct `WebAppsClientListSlotDifferencesFromProductionPager` has been removed -- Struct `WebAppsClientListSlotDifferencesFromProductionResult` has been removed -- Struct `WebAppsClientListSlotDifferencesSlotPager` has been removed -- Struct `WebAppsClientListSlotDifferencesSlotResult` has been removed -- Struct `WebAppsClientListSlotsPager` has been removed -- Struct `WebAppsClientListSlotsResult` has been removed -- Struct `WebAppsClientListSnapshotsFromDRSecondaryPager` has been removed -- Struct `WebAppsClientListSnapshotsFromDRSecondaryResult` has been removed -- Struct `WebAppsClientListSnapshotsFromDRSecondarySlotPager` has been removed -- Struct `WebAppsClientListSnapshotsFromDRSecondarySlotResult` has been removed -- Struct `WebAppsClientListSnapshotsPager` has been removed -- Struct `WebAppsClientListSnapshotsResult` has been removed -- Struct `WebAppsClientListSnapshotsSlotPager` has been removed -- Struct `WebAppsClientListSnapshotsSlotResult` has been removed -- Struct `WebAppsClientListSyncFunctionTriggersResult` has been removed -- Struct `WebAppsClientListSyncFunctionTriggersSlotResult` has been removed -- Struct `WebAppsClientListTriggeredWebJobHistoryPager` has been removed -- Struct `WebAppsClientListTriggeredWebJobHistoryResult` has been removed -- Struct `WebAppsClientListTriggeredWebJobHistorySlotPager` has been removed -- Struct `WebAppsClientListTriggeredWebJobHistorySlotResult` has been removed -- Struct `WebAppsClientListTriggeredWebJobsPager` has been removed -- Struct `WebAppsClientListTriggeredWebJobsResult` has been removed -- Struct `WebAppsClientListTriggeredWebJobsSlotPager` has been removed -- Struct `WebAppsClientListTriggeredWebJobsSlotResult` has been removed -- Struct `WebAppsClientListUsagesPager` has been removed -- Struct `WebAppsClientListUsagesResult` has been removed -- Struct `WebAppsClientListUsagesSlotPager` has been removed -- Struct `WebAppsClientListUsagesSlotResult` has been removed -- Struct `WebAppsClientListVnetConnectionsResult` has been removed -- Struct `WebAppsClientListVnetConnectionsSlotResult` has been removed -- Struct `WebAppsClientListWebJobsPager` has been removed -- Struct `WebAppsClientListWebJobsResult` has been removed -- Struct `WebAppsClientListWebJobsSlotPager` has been removed -- Struct `WebAppsClientListWebJobsSlotResult` has been removed -- Struct `WebAppsClientMigrateMySQLPoller` has been removed -- Struct `WebAppsClientMigrateMySQLPollerResponse` has been removed -- Struct `WebAppsClientMigrateMySQLResult` has been removed -- Struct `WebAppsClientMigrateStoragePoller` has been removed -- Struct `WebAppsClientMigrateStoragePollerResponse` has been removed -- Struct `WebAppsClientMigrateStorageResult` has been removed -- Struct `WebAppsClientPutPrivateAccessVnetResult` has been removed -- Struct `WebAppsClientPutPrivateAccessVnetSlotResult` has been removed -- Struct `WebAppsClientRestoreFromBackupBlobPoller` has been removed -- Struct `WebAppsClientRestoreFromBackupBlobPollerResponse` has been removed -- Struct `WebAppsClientRestoreFromBackupBlobSlotPoller` has been removed -- Struct `WebAppsClientRestoreFromBackupBlobSlotPollerResponse` has been removed -- Struct `WebAppsClientRestoreFromDeletedAppPoller` has been removed -- Struct `WebAppsClientRestoreFromDeletedAppPollerResponse` has been removed -- Struct `WebAppsClientRestoreFromDeletedAppSlotPoller` has been removed -- Struct `WebAppsClientRestoreFromDeletedAppSlotPollerResponse` has been removed -- Struct `WebAppsClientRestorePoller` has been removed -- Struct `WebAppsClientRestorePollerResponse` has been removed -- Struct `WebAppsClientRestoreSlotPoller` has been removed -- Struct `WebAppsClientRestoreSlotPollerResponse` has been removed -- Struct `WebAppsClientRestoreSnapshotPoller` has been removed -- Struct `WebAppsClientRestoreSnapshotPollerResponse` has been removed -- Struct `WebAppsClientRestoreSnapshotSlotPoller` has been removed -- Struct `WebAppsClientRestoreSnapshotSlotPollerResponse` has been removed -- Struct `WebAppsClientStartNetworkTracePoller` has been removed -- Struct `WebAppsClientStartNetworkTracePollerResponse` has been removed -- Struct `WebAppsClientStartNetworkTraceResult` has been removed -- Struct `WebAppsClientStartNetworkTraceSlotPoller` has been removed -- Struct `WebAppsClientStartNetworkTraceSlotPollerResponse` has been removed -- Struct `WebAppsClientStartNetworkTraceSlotResult` has been removed -- Struct `WebAppsClientStartWebSiteNetworkTraceOperationPoller` has been removed -- Struct `WebAppsClientStartWebSiteNetworkTraceOperationPollerResponse` has been removed -- Struct `WebAppsClientStartWebSiteNetworkTraceOperationResult` has been removed -- Struct `WebAppsClientStartWebSiteNetworkTraceOperationSlotPoller` has been removed -- Struct `WebAppsClientStartWebSiteNetworkTraceOperationSlotPollerResponse` has been removed -- Struct `WebAppsClientStartWebSiteNetworkTraceOperationSlotResult` has been removed -- Struct `WebAppsClientStartWebSiteNetworkTraceResult` has been removed -- Struct `WebAppsClientStartWebSiteNetworkTraceSlotResult` has been removed -- Struct `WebAppsClientSwapSlotPoller` has been removed -- Struct `WebAppsClientSwapSlotPollerResponse` has been removed -- Struct `WebAppsClientSwapSlotWithProductionPoller` has been removed -- Struct `WebAppsClientSwapSlotWithProductionPollerResponse` has been removed -- Struct `WebAppsClientUpdateApplicationSettingsResult` has been removed -- Struct `WebAppsClientUpdateApplicationSettingsSlotResult` has been removed -- Struct `WebAppsClientUpdateAuthSettingsResult` has been removed -- Struct `WebAppsClientUpdateAuthSettingsSlotResult` has been removed -- Struct `WebAppsClientUpdateAuthSettingsV2Result` has been removed -- Struct `WebAppsClientUpdateAuthSettingsV2SlotResult` has been removed -- Struct `WebAppsClientUpdateAzureStorageAccountsResult` has been removed -- Struct `WebAppsClientUpdateAzureStorageAccountsSlotResult` has been removed -- Struct `WebAppsClientUpdateBackupConfigurationResult` has been removed -- Struct `WebAppsClientUpdateBackupConfigurationSlotResult` has been removed -- Struct `WebAppsClientUpdateConfigurationResult` has been removed -- Struct `WebAppsClientUpdateConfigurationSlotResult` has been removed -- Struct `WebAppsClientUpdateConnectionStringsResult` has been removed -- Struct `WebAppsClientUpdateConnectionStringsSlotResult` has been removed -- Struct `WebAppsClientUpdateDiagnosticLogsConfigResult` has been removed -- Struct `WebAppsClientUpdateDiagnosticLogsConfigSlotResult` has been removed -- Struct `WebAppsClientUpdateDomainOwnershipIdentifierResult` has been removed -- Struct `WebAppsClientUpdateDomainOwnershipIdentifierSlotResult` has been removed -- Struct `WebAppsClientUpdateFtpAllowedResult` has been removed -- Struct `WebAppsClientUpdateFtpAllowedSlotResult` has been removed -- Struct `WebAppsClientUpdateHybridConnectionResult` has been removed -- Struct `WebAppsClientUpdateHybridConnectionSlotResult` has been removed -- Struct `WebAppsClientUpdateMetadataResult` has been removed -- Struct `WebAppsClientUpdateMetadataSlotResult` has been removed -- Struct `WebAppsClientUpdatePremierAddOnResult` has been removed -- Struct `WebAppsClientUpdatePremierAddOnSlotResult` has been removed -- Struct `WebAppsClientUpdateRelayServiceConnectionResult` has been removed -- Struct `WebAppsClientUpdateRelayServiceConnectionSlotResult` has been removed -- Struct `WebAppsClientUpdateResult` has been removed -- Struct `WebAppsClientUpdateScmAllowedResult` has been removed -- Struct `WebAppsClientUpdateScmAllowedSlotResult` has been removed -- Struct `WebAppsClientUpdateSitePushSettingsResult` has been removed -- Struct `WebAppsClientUpdateSitePushSettingsSlotResult` has been removed -- Struct `WebAppsClientUpdateSlotConfigurationNamesResult` has been removed -- Struct `WebAppsClientUpdateSlotResult` has been removed -- Struct `WebAppsClientUpdateSourceControlResult` has been removed -- Struct `WebAppsClientUpdateSourceControlSlotResult` has been removed -- Struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResult` has been removed -- Struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResult` has been removed -- Struct `WebAppsClientUpdateVnetConnectionGatewayResult` has been removed -- Struct `WebAppsClientUpdateVnetConnectionGatewaySlotResult` has been removed -- Struct `WebAppsClientUpdateVnetConnectionResult` has been removed -- Struct `WebAppsClientUpdateVnetConnectionSlotResult` has been removed -- Struct `WebSiteManagementClientCheckNameAvailabilityResult` has been removed -- Struct `WebSiteManagementClientGetPublishingUserResult` has been removed -- Struct `WebSiteManagementClientGetSourceControlResult` has been removed -- Struct `WebSiteManagementClientGetSubscriptionDeploymentLocationsResult` has been removed -- Struct `WebSiteManagementClientListBillingMetersPager` has been removed -- Struct `WebSiteManagementClientListBillingMetersResult` has been removed -- Struct `WebSiteManagementClientListCustomHostNameSitesPager` has been removed -- Struct `WebSiteManagementClientListCustomHostNameSitesResult` has been removed -- Struct `WebSiteManagementClientListGeoRegionsPager` has been removed -- Struct `WebSiteManagementClientListGeoRegionsResult` has been removed -- Struct `WebSiteManagementClientListPremierAddOnOffersPager` has been removed -- Struct `WebSiteManagementClientListPremierAddOnOffersResult` has been removed -- Struct `WebSiteManagementClientListSKUsResult` has been removed -- Struct `WebSiteManagementClientListSiteIdentifiersAssignedToHostNamePager` has been removed -- Struct `WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResult` has been removed -- Struct `WebSiteManagementClientListSourceControlsPager` has been removed -- Struct `WebSiteManagementClientListSourceControlsResult` has been removed -- Struct `WebSiteManagementClientUpdatePublishingUserResult` has been removed -- Struct `WebSiteManagementClientUpdateSourceControlResult` has been removed -- Struct `WebSiteManagementClientValidateResult` has been removed -- Struct `WebSiteManagementClientVerifyHostingEnvironmentVnetResult` has been removed -- Field `WebAppsClientGetProcessModuleResult` of struct `WebAppsClientGetProcessModuleResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetProcessModuleResponse` has been removed -- Field `WebSiteManagementClientGetPublishingUserResult` of struct `WebSiteManagementClientGetPublishingUserResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientGetPublishingUserResponse` has been removed -- Field `ResourceHealthMetadataClientListResult` of struct `ResourceHealthMetadataClientListResponse` has been removed -- Field `RawResponse` of struct `ResourceHealthMetadataClientListResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeletePremierAddOnSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteVnetConnectionResponse` has been removed -- Field `DiagnosticsClientGetSiteDiagnosticCategoryResult` of struct `DiagnosticsClientGetSiteDiagnosticCategoryResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientGetSiteDiagnosticCategoryResponse` has been removed -- Field `WebAppsClientAnalyzeCustomHostnameResult` of struct `WebAppsClientAnalyzeCustomHostnameResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientAnalyzeCustomHostnameResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteHostSecretSlotResponse` has been removed -- Field `WebAppsClientListMetadataSlotResult` of struct `WebAppsClientListMetadataSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListMetadataSlotResponse` has been removed -- Field `WebAppsClientGetOneDeployStatusResult` of struct `WebAppsClientGetOneDeployStatusResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetOneDeployStatusResponse` has been removed -- Field `WebAppsClientGetDomainOwnershipIdentifierResult` of struct `WebAppsClientGetDomainOwnershipIdentifierResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetDomainOwnershipIdentifierResponse` has been removed -- Field `PlansClientListByResourceGroupResult` of struct `PlansClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `PlansClientListByResourceGroupResponse` has been removed -- Field `WebAppsClientGetTriggeredWebJobResult` of struct `WebAppsClientGetTriggeredWebJobResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetTriggeredWebJobResponse` has been removed -- Field `WebAppsClientUpdateAuthSettingsV2Result` of struct `WebAppsClientUpdateAuthSettingsV2Response` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateAuthSettingsV2Response` has been removed -- Field `RawResponse` of struct `StaticSitesClientDeleteStaticSiteResponse` has been removed -- Field `StaticSitesClientListStaticSiteFunctionAppSettingsResult` of struct `StaticSitesClientListStaticSiteFunctionAppSettingsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListStaticSiteFunctionAppSettingsResponse` has been removed -- Field `DiagnosticsClientGetSiteAnalysisResult` of struct `DiagnosticsClientGetSiteAnalysisResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientGetSiteAnalysisResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientDeleteResponse` has been removed -- Field `ResourceHealthMetadataClientListByResourceGroupResult` of struct `ResourceHealthMetadataClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ResourceHealthMetadataClientListByResourceGroupResponse` has been removed -- Field `WebAppsClientUpdateSlotResult` of struct `WebAppsClientUpdateSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateSlotResponse` has been removed -- Field `WebSiteManagementClientVerifyHostingEnvironmentVnetResult` of struct `WebSiteManagementClientVerifyHostingEnvironmentVnetResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientVerifyHostingEnvironmentVnetResponse` has been removed -- Field `CertificatesClientCreateOrUpdateResult` of struct `CertificatesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `CertificatesClientCreateOrUpdateResponse` has been removed -- Field `WebAppsClientGetSwiftVirtualNetworkConnectionSlotResult` of struct `WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResult` of struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateResult` of struct `WebAppsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateResponse` has been removed -- Field `WebAppsClientListProcessModulesResult` of struct `WebAppsClientListProcessModulesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListProcessModulesResponse` has been removed -- Field `PlansClientGetVnetFromServerFarmResult` of struct `PlansClientGetVnetFromServerFarmResponse` has been removed -- Field `RawResponse` of struct `PlansClientGetVnetFromServerFarmResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteSourceControlResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse` has been removed -- Field `WebAppsClientListUsagesSlotResult` of struct `WebAppsClientListUsagesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListUsagesSlotResponse` has been removed -- Field `StaticSitesClientPreviewWorkflowResult` of struct `StaticSitesClientPreviewWorkflowResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientPreviewWorkflowResponse` has been removed -- Field `WebAppsClientListSlotDifferencesFromProductionResult` of struct `WebAppsClientListSlotDifferencesFromProductionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSlotDifferencesFromProductionResponse` has been removed -- Field `WebAppsClientUpdateSitePushSettingsSlotResult` of struct `WebAppsClientUpdateSitePushSettingsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateSitePushSettingsSlotResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientDeleteStaticSiteUserResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsRevisionsClientRestartRevisionResponse` has been removed -- Field `StaticSitesClientListStaticSiteAppSettingsResult` of struct `StaticSitesClientListStaticSiteAppSettingsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListStaticSiteAppSettingsResponse` has been removed -- Field `WebAppsClientGetPublicCertificateSlotResult` of struct `WebAppsClientGetPublicCertificateSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPublicCertificateSlotResponse` has been removed -- Field `WebAppsClientGetPrivateLinkResourcesResult` of struct `WebAppsClientGetPrivateLinkResourcesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPrivateLinkResourcesResponse` has been removed -- Field `EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResult` of struct `EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse` has been removed -- Field `WebAppsClientUpdateResult` of struct `WebAppsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateResponse` has been removed -- Field `WebAppsClientCreateOrUpdateHybridConnectionSlotResult` of struct `WebAppsClientCreateOrUpdateHybridConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateHybridConnectionSlotResponse` has been removed -- Field `WebAppsClientGetConfigurationSnapshotSlotResult` of struct `WebAppsClientGetConfigurationSnapshotSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetConfigurationSnapshotSlotResponse` has been removed -- Field `WebAppsClientGetSitePhpErrorLogFlagSlotResult` of struct `WebAppsClientGetSitePhpErrorLogFlagSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSitePhpErrorLogFlagSlotResponse` has been removed -- Field `WebAppsClientGetInstanceProcessResult` of struct `WebAppsClientGetInstanceProcessResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceProcessResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRestoreResponse` has been removed -- Field `WebAppsClientCreateInstanceMSDeployOperationSlotResult` of struct `WebAppsClientCreateInstanceMSDeployOperationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateInstanceMSDeployOperationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRunTriggeredWebJobSlotResponse` has been removed -- Field `WebAppsClientGetSiteConnectionStringKeyVaultReferencesResult` of struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse` has been removed -- Field `WebAppsClientAddPremierAddOnResult` of struct `WebAppsClientAddPremierAddOnResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientAddPremierAddOnResponse` has been removed -- Field `WebAppsClientListResult` of struct `WebAppsClientListResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListResponse` has been removed -- Field `PlansClientUpdateVnetGatewayResult` of struct `PlansClientUpdateVnetGatewayResponse` has been removed -- Field `RawResponse` of struct `PlansClientUpdateVnetGatewayResponse` has been removed -- Field `WebAppsClientCreateDeploymentResult` of struct `WebAppsClientCreateDeploymentResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateDeploymentResponse` has been removed -- Field `StaticSitesClientListStaticSiteBuildAppSettingsResult` of struct `StaticSitesClientListStaticSiteBuildAppSettingsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListStaticSiteBuildAppSettingsResponse` has been removed -- Field `DomainsClientTransferOutResult` of struct `DomainsClientTransferOutResponse` has been removed -- Field `RawResponse` of struct `DomainsClientTransferOutResponse` has been removed -- Field `RecommendationsClientListRecommendedRulesForHostingEnvironmentResult` of struct `RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse` has been removed -- Field `ProviderClientGetFunctionAppStacksResult` of struct `ProviderClientGetFunctionAppStacksResponse` has been removed -- Field `RawResponse` of struct `ProviderClientGetFunctionAppStacksResponse` has been removed -- Field `EnvironmentsClientListAppServicePlansResult` of struct `EnvironmentsClientListAppServicePlansResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListAppServicePlansResponse` has been removed -- Field `WebAppsClientGetPrivateAccessSlotResult` of struct `WebAppsClientGetPrivateAccessSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPrivateAccessSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateHybridConnectionResult` of struct `WebAppsClientCreateOrUpdateHybridConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateHybridConnectionResponse` has been removed -- Field `PlansClientListCapabilitiesResult` of struct `PlansClientListCapabilitiesResponse` has been removed -- Field `RawResponse` of struct `PlansClientListCapabilitiesResponse` has been removed -- Field `WebAppsClientGetAppSettingKeyVaultReferenceSlotResult` of struct `WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse` has been removed -- Field `WebAppsClientInstallSiteExtensionResult` of struct `WebAppsClientInstallSiteExtensionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientInstallSiteExtensionResponse` has been removed -- Field `WebAppsClientListSyncFunctionTriggersResult` of struct `WebAppsClientListSyncFunctionTriggersResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSyncFunctionTriggersResponse` has been removed -- Field `WebAppsClientCreateFunctionResult` of struct `WebAppsClientCreateFunctionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateFunctionResponse` has been removed -- Field `CertificatesClientListResult` of struct `CertificatesClientListResponse` has been removed -- Field `RawResponse` of struct `CertificatesClientListResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStartSlotResponse` has been removed -- Field `WebAppsClientListPublicCertificatesResult` of struct `WebAppsClientListPublicCertificatesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListPublicCertificatesResponse` has been removed -- Field `WebAppsClientUpdateBackupConfigurationResult` of struct `WebAppsClientUpdateBackupConfigurationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateBackupConfigurationResponse` has been removed -- Field `PlansClientListWebAppsResult` of struct `PlansClientListWebAppsResponse` has been removed -- Field `RawResponse` of struct `PlansClientListWebAppsResponse` has been removed -- Field `WebAppsClientCreateOrUpdateHostSecretResult` of struct `WebAppsClientCreateOrUpdateHostSecretResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateHostSecretResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientSyncFunctionsResponse` has been removed -- Field `WebAppsClientListFunctionKeysResult` of struct `WebAppsClientListFunctionKeysResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListFunctionKeysResponse` has been removed -- Field `WebAppsClientBackupResult` of struct `WebAppsClientBackupResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientBackupResponse` has been removed -- Field `WebAppsClientGetVnetConnectionGatewayResult` of struct `WebAppsClientGetVnetConnectionGatewayResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetVnetConnectionGatewayResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRestoreFromDeletedAppResponse` has been removed -- Field `WebAppsClientListInstanceProcessThreadsResult` of struct `WebAppsClientListInstanceProcessThreadsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListInstanceProcessThreadsResponse` has been removed -- Field `WebAppsClientCreateInstanceMSDeployOperationResult` of struct `WebAppsClientCreateInstanceMSDeployOperationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateInstanceMSDeployOperationResponse` has been removed -- Field `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResult` of struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse` has been removed -- Field `WebSiteManagementClientCheckNameAvailabilityResult` of struct `WebSiteManagementClientCheckNameAvailabilityResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientCheckNameAvailabilityResponse` has been removed -- Field `DomainsClientListByResourceGroupResult` of struct `DomainsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `DomainsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGenerateNewSitePublishingPasswordResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStartContinuousWebJobResponse` has been removed -- Field `StaticSitesClientApproveOrRejectPrivateEndpointConnectionResult` of struct `StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse` has been removed -- Field `EnvironmentsClientListMultiRoleUsagesResult` of struct `EnvironmentsClientListMultiRoleUsagesResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListMultiRoleUsagesResponse` has been removed -- Field `WebAppsClientListSlotsResult` of struct `WebAppsClientListSlotsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSlotsResponse` has been removed -- Field `WebAppsClientUpdateAuthSettingsV2SlotResult` of struct `WebAppsClientUpdateAuthSettingsV2SlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateAuthSettingsV2SlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientSyncRepositorySlotResponse` has been removed -- Field `WebAppsClientGetConfigurationSlotResult` of struct `WebAppsClientGetConfigurationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetConfigurationSlotResponse` has been removed -- Field `StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResult` of struct `StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse` has been removed -- Field `EnvironmentsClientListWebWorkerUsagesResult` of struct `EnvironmentsClientListWebWorkerUsagesResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListWebWorkerUsagesResponse` has been removed -- Field `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResult` of struct `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse` has been removed -- Field `WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResult` of struct `WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse` has been removed -- Field `WebAppsClientGetInstanceMsDeployStatusSlotResult` of struct `WebAppsClientGetInstanceMsDeployStatusSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceMsDeployStatusSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteInstanceFunctionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetProcessDumpSlotResponse` has been removed -- Field `WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResult` of struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse` has been removed -- Field `PlansClientListVnetsResult` of struct `PlansClientListVnetsResponse` has been removed -- Field `RawResponse` of struct `PlansClientListVnetsResponse` has been removed -- Field `WebAppsClientCreateOrUpdateSourceControlResult` of struct `WebAppsClientCreateOrUpdateSourceControlResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateSourceControlResponse` has been removed -- Field `EnvironmentsClientGetWorkerPoolResult` of struct `EnvironmentsClientGetWorkerPoolResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetWorkerPoolResponse` has been removed -- Field `WebAppsClientListDeploymentLogSlotResult` of struct `WebAppsClientListDeploymentLogSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListDeploymentLogSlotResponse` has been removed -- Field `RawResponse` of struct `DomainsClientDeleteResponse` has been removed -- Field `WebAppsClientListConfigurationsResult` of struct `WebAppsClientListConfigurationsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListConfigurationsResponse` has been removed -- Field `WebAppsClientGetAuthSettingsV2SlotResult` of struct `WebAppsClientGetAuthSettingsV2SlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetAuthSettingsV2SlotResponse` has been removed -- Field `EnvironmentsClientChangeVnetResult` of struct `EnvironmentsClientChangeVnetResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientChangeVnetResponse` has been removed -- Field `DiagnosticsClientGetHostingEnvironmentDetectorResponseResult` of struct `DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse` has been removed -- Field `EnvironmentsClientListMultiRolePoolSKUsResult` of struct `EnvironmentsClientListMultiRolePoolSKUsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListMultiRolePoolSKUsResponse` has been removed -- Field `WebAppsClientListMetadataResult` of struct `WebAppsClientListMetadataResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListMetadataResponse` has been removed -- Field `EnvironmentsClientUpdateMultiRolePoolResult` of struct `EnvironmentsClientUpdateMultiRolePoolResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientUpdateMultiRolePoolResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteBackupConfigurationSlotResponse` has been removed -- Field `WebAppsClientUpdateVnetConnectionGatewaySlotResult` of struct `WebAppsClientUpdateVnetConnectionGatewaySlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateVnetConnectionGatewaySlotResponse` has been removed -- Field `WebAppsClientGetBackupConfigurationSlotResult` of struct `WebAppsClientGetBackupConfigurationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetBackupConfigurationSlotResponse` has been removed -- Field `DiagnosticsClientGetSiteAnalysisSlotResult` of struct `DiagnosticsClientGetSiteAnalysisSlotResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientGetSiteAnalysisSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateVnetConnectionGatewayResult` of struct `WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse` has been removed -- Field `WebAppsClientGetAuthSettingsSlotResult` of struct `WebAppsClientGetAuthSettingsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetAuthSettingsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteBackupConfigurationResponse` has been removed -- Field `CertificateOrdersClientListByResourceGroupResult` of struct `CertificateOrdersClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientListByResourceGroupResponse` has been removed -- Field `WebAppsClientListConnectionStringsSlotResult` of struct `WebAppsClientListConnectionStringsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListConnectionStringsSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateRelayServiceConnectionResult` of struct `WebAppsClientCreateOrUpdateRelayServiceConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateRelayServiceConnectionResponse` has been removed -- Field `WebAppsClientGetFtpAllowedResult` of struct `WebAppsClientGetFtpAllowedResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetFtpAllowedResponse` has been removed -- Field `WebAppsClientUpdateSourceControlSlotResult` of struct `WebAppsClientUpdateSourceControlSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateSourceControlSlotResponse` has been removed -- Field `DiagnosticsClientGetSiteDetectorSlotResult` of struct `DiagnosticsClientGetSiteDetectorSlotResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientGetSiteDetectorSlotResponse` has been removed -- Field `WebSiteManagementClientListGeoRegionsResult` of struct `WebSiteManagementClientListGeoRegionsResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientListGeoRegionsResponse` has been removed -- Field `DomainsClientCheckAvailabilityResult` of struct `DomainsClientCheckAvailabilityResponse` has been removed -- Field `RawResponse` of struct `DomainsClientCheckAvailabilityResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteFunctionSecretResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRestoreSnapshotSlotResponse` has been removed -- Field `WebAppsClientGetFunctionsAdminTokenSlotResult` of struct `WebAppsClientGetFunctionsAdminTokenSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetFunctionsAdminTokenSlotResponse` has been removed -- Field `EnvironmentsClientListMultiRoleMetricDefinitionsResult` of struct `EnvironmentsClientListMultiRoleMetricDefinitionsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListMultiRoleMetricDefinitionsResponse` has been removed -- Field `WebAppsClientGetMigrateMySQLStatusSlotResult` of struct `WebAppsClientGetMigrateMySQLStatusSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetMigrateMySQLStatusSlotResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientResetStaticSiteAPIKeyResponse` has been removed -- Field `WebAppsClientGetHostNameBindingResult` of struct `WebAppsClientGetHostNameBindingResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetHostNameBindingResponse` has been removed -- Field `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResult` of struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse` has been removed -- Field `WebAppsClientListHybridConnectionsResult` of struct `WebAppsClientListHybridConnectionsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListHybridConnectionsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteProcessSlotResponse` has been removed -- Field `StaticSitesClientUpdateStaticSiteResult` of struct `StaticSitesClientUpdateStaticSiteResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientUpdateStaticSiteResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStartResponse` has been removed -- Field `WebAppsClientGetInstanceFunctionSlotResult` of struct `WebAppsClientGetInstanceFunctionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceFunctionSlotResponse` has been removed -- Field `DomainsClientUpdateResult` of struct `DomainsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `DomainsClientUpdateResponse` has been removed -- Field `KubeEnvironmentsClientCreateOrUpdateResult` of struct `KubeEnvironmentsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `KubeEnvironmentsClientCreateOrUpdateResponse` has been removed -- Field `WebAppsClientGetAuthSettingsV2WithoutSecretsResult` of struct `WebAppsClientGetAuthSettingsV2WithoutSecretsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetAuthSettingsV2WithoutSecretsResponse` has been removed -- Field `CertificateOrdersClientRetrieveSiteSealResult` of struct `CertificateOrdersClientRetrieveSiteSealResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientRetrieveSiteSealResponse` has been removed -- Field `WebAppsClientMigrateStorageResult` of struct `WebAppsClientMigrateStorageResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientMigrateStorageResponse` has been removed -- Field `WebAppsClientListContinuousWebJobsResult` of struct `WebAppsClientListContinuousWebJobsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListContinuousWebJobsResponse` has been removed -- Field `WebSiteManagementClientGetSourceControlResult` of struct `WebSiteManagementClientGetSourceControlResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientGetSourceControlResponse` has been removed -- Field `WebAppsClientGetAppSettingsKeyVaultReferencesResult` of struct `WebAppsClientGetAppSettingsKeyVaultReferencesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetAppSettingsKeyVaultReferencesResponse` has been removed -- Field `DomainsClientCreateOrUpdateResult` of struct `DomainsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `DomainsClientCreateOrUpdateResponse` has been removed -- Field `WebAppsClientGetInstanceProcessSlotResult` of struct `WebAppsClientGetInstanceProcessSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceProcessSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetContainerLogsZipSlotResponse` has been removed -- Field `WebAppsClientUpdateApplicationSettingsResult` of struct `WebAppsClientUpdateApplicationSettingsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateApplicationSettingsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientSyncFunctionTriggersResponse` has been removed -- Field `StaticSitesClientListStaticSiteUsersResult` of struct `StaticSitesClientListStaticSiteUsersResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListStaticSiteUsersResponse` has been removed -- Field `EnvironmentsClientGetMultiRolePoolResult` of struct `EnvironmentsClientGetMultiRolePoolResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetMultiRolePoolResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRestartResponse` has been removed -- Field `WebAppsClientListPremierAddOnsResult` of struct `WebAppsClientListPremierAddOnsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListPremierAddOnsResponse` has been removed -- Field `CertificatesClientListByResourceGroupResult` of struct `CertificatesClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `CertificatesClientListByResourceGroupResponse` has been removed -- Field `StaticSitesClientListStaticSiteSecretsResult` of struct `StaticSitesClientListStaticSiteSecretsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListStaticSiteSecretsResponse` has been removed -- Field `WebAppsClientGetBackupStatusResult` of struct `WebAppsClientGetBackupStatusResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetBackupStatusResponse` has been removed -- Field `WebAppsClientUpdateRelayServiceConnectionResult` of struct `WebAppsClientUpdateRelayServiceConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateRelayServiceConnectionResponse` has been removed -- Field `WebAppsClientGetNetworkTraceOperationV2Result` of struct `WebAppsClientGetNetworkTraceOperationV2Response` has been removed -- Field `RawResponse` of struct `WebAppsClientGetNetworkTraceOperationV2Response` has been removed -- Field `RecommendationsClientListResult` of struct `RecommendationsClientListResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientListResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientValidateMoveResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRestoreFromBackupBlobResponse` has been removed -- Field `StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResult` of struct `StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse` has been removed -- Field `WebAppsClientStartNetworkTraceSlotResult` of struct `WebAppsClientStartNetworkTraceSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStartNetworkTraceSlotResponse` has been removed -- Field `WebAppsClientUpdateAzureStorageAccountsSlotResult` of struct `WebAppsClientUpdateAzureStorageAccountsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateAzureStorageAccountsSlotResponse` has been removed -- Field `WebAppsClientCreateOneDeployOperationResult` of struct `WebAppsClientCreateOneDeployOperationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOneDeployOperationResponse` has been removed -- Field `WebAppsClientUpdateSitePushSettingsResult` of struct `WebAppsClientUpdateSitePushSettingsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateSitePushSettingsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRestoreFromBackupBlobSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientSyncFunctionTriggersSlotResponse` has been removed -- Field `EnvironmentsClientListDiagnosticsResult` of struct `EnvironmentsClientListDiagnosticsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListDiagnosticsResponse` has been removed -- Field `WebAppsClientBackupSlotResult` of struct `WebAppsClientBackupSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientBackupSlotResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientDisableRecommendationForSubscriptionResponse` has been removed -- Field `WebAppsClientGetInstanceInfoSlotResult` of struct `WebAppsClientGetInstanceInfoSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceInfoSlotResponse` has been removed -- Field `WebSiteManagementClientValidateResult` of struct `WebSiteManagementClientValidateResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientValidateResponse` has been removed -- Field `WebAppsClientListTriggeredWebJobHistoryResult` of struct `WebAppsClientListTriggeredWebJobHistoryResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListTriggeredWebJobHistoryResponse` has been removed -- Field `KubeEnvironmentsClientUpdateResult` of struct `KubeEnvironmentsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `KubeEnvironmentsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientValidatePurchaseInformationResponse` has been removed -- Field `EnvironmentsClientGetPrivateEndpointConnectionListResult` of struct `EnvironmentsClientGetPrivateEndpointConnectionListResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetPrivateEndpointConnectionListResponse` has been removed -- Field `RawResponse` of struct `PlansClientRestartWebAppsResponse` has been removed -- Field `WebAppsClientListAzureStorageAccountsResult` of struct `WebAppsClientListAzureStorageAccountsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListAzureStorageAccountsResponse` has been removed -- Field `WebAppsClientGetPrivateEndpointConnectionListSlotResult` of struct `WebAppsClientGetPrivateEndpointConnectionListSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPrivateEndpointConnectionListSlotResponse` has been removed -- Field `WebAppsClientGetNetworkTraceOperationResult` of struct `WebAppsClientGetNetworkTraceOperationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetNetworkTraceOperationResponse` has been removed -- Field `WebAppsClientListDomainOwnershipIdentifiersResult` of struct `WebAppsClientListDomainOwnershipIdentifiersResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListDomainOwnershipIdentifiersResponse` has been removed -- Field `StaticSitesClientGetPrivateEndpointConnectionResult` of struct `StaticSitesClientGetPrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetPrivateEndpointConnectionResponse` has been removed -- Field `WebAppsClientGetInstanceMSDeployLogResult` of struct `WebAppsClientGetInstanceMSDeployLogResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceMSDeployLogResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteSourceControlSlotResponse` has been removed -- Field `ContainerAppsClientGetResult` of struct `ContainerAppsClientGetResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsClientGetResponse` has been removed -- Field `CertificateOrdersClientGetResult` of struct `CertificateOrdersClientGetResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientGetResponse` has been removed -- Field `WebAppsClientUpdateConnectionStringsResult` of struct `WebAppsClientUpdateConnectionStringsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateConnectionStringsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientSwapSlotResponse` has been removed -- Field `EnvironmentsClientListUsagesResult` of struct `EnvironmentsClientListUsagesResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListUsagesResponse` has been removed -- Field `CertificateOrdersClientListCertificatesResult` of struct `CertificateOrdersClientListCertificatesResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientListCertificatesResponse` has been removed -- Field `EnvironmentsClientListWebAppsResult` of struct `EnvironmentsClientListWebAppsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListWebAppsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteSlotResponse` has been removed -- Field `EnvironmentsClientUpdateResult` of struct `EnvironmentsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientMoveResponse` has been removed -- Field `EnvironmentsClientCreateOrUpdateResult` of struct `EnvironmentsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientCreateOrUpdateResponse` has been removed -- Field `ContainerAppsClientCreateOrUpdateResult` of struct `ContainerAppsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsClientCreateOrUpdateResponse` has been removed -- Field `WebAppsClientGetPublicCertificateResult` of struct `WebAppsClientGetPublicCertificateResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPublicCertificateResponse` has been removed -- Field `EnvironmentsClientResumeResult` of struct `EnvironmentsClientResumeResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientResumeResponse` has been removed -- Field `ProviderClientGetAvailableStacksResult` of struct `ProviderClientGetAvailableStacksResponse` has been removed -- Field `RawResponse` of struct `ProviderClientGetAvailableStacksResponse` has been removed -- Field `WebAppsClientListByResourceGroupResult` of struct `WebAppsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListByResourceGroupResponse` has been removed -- Field `WebAppsClientListSyncFunctionTriggersSlotResult` of struct `WebAppsClientListSyncFunctionTriggersSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSyncFunctionTriggersSlotResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientReissueResponse` has been removed -- Field `WebAppsClientGetNetworkTracesV2Result` of struct `WebAppsClientGetNetworkTracesV2Response` has been removed -- Field `RawResponse` of struct `WebAppsClientGetNetworkTracesV2Response` has been removed -- Field `WebAppsClientGetDiagnosticLogsConfigurationSlotResult` of struct `WebAppsClientGetDiagnosticLogsConfigurationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetDiagnosticLogsConfigurationSlotResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientDisableAllForWebAppResponse` has been removed -- Field `WebAppsClientGetHostNameBindingSlotResult` of struct `WebAppsClientGetHostNameBindingSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetHostNameBindingSlotResponse` has been removed -- Field `WebAppsClientListSiteBackupsResult` of struct `WebAppsClientListSiteBackupsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSiteBackupsResponse` has been removed -- Field `PlansClientCreateOrUpdateResult` of struct `PlansClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `PlansClientCreateOrUpdateResponse` has been removed -- Field `DomainsClientGetControlCenterSsoRequestResult` of struct `DomainsClientGetControlCenterSsoRequestResponse` has been removed -- Field `RawResponse` of struct `DomainsClientGetControlCenterSsoRequestResponse` has been removed -- Field `StaticSitesClientCreateOrUpdateStaticSiteResult` of struct `StaticSitesClientCreateOrUpdateStaticSiteResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientCreateOrUpdateStaticSiteResponse` has been removed -- Field `ResourceHealthMetadataClientGetBySiteResult` of struct `ResourceHealthMetadataClientGetBySiteResponse` has been removed -- Field `RawResponse` of struct `ResourceHealthMetadataClientGetBySiteResponse` has been removed -- Field `WebAppsClientCreateOrUpdateFunctionSecretResult` of struct `WebAppsClientCreateOrUpdateFunctionSecretResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateFunctionSecretResponse` has been removed -- Field `DiagnosticsClientListSiteDetectorResponsesResult` of struct `DiagnosticsClientListSiteDetectorResponsesResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientListSiteDetectorResponsesResponse` has been removed -- Field `DiagnosticsClientExecuteSiteAnalysisSlotResult` of struct `DiagnosticsClientExecuteSiteAnalysisSlotResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientExecuteSiteAnalysisSlotResponse` has been removed -- Field `CertificateOrdersClientListResult` of struct `CertificateOrdersClientListResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientListResponse` has been removed -- Field `WebAppsClientUpdateMetadataSlotResult` of struct `WebAppsClientUpdateMetadataSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateMetadataSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteBackupSlotResponse` has been removed -- Field `EnvironmentsClientGetPrivateEndpointConnectionResult` of struct `EnvironmentsClientGetPrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetPrivateEndpointConnectionResponse` has been removed -- Field `ProviderClientGetFunctionAppStacksForLocationResult` of struct `ProviderClientGetFunctionAppStacksForLocationResponse` has been removed -- Field `RawResponse` of struct `ProviderClientGetFunctionAppStacksForLocationResponse` has been removed -- Field `EnvironmentsClientGetResult` of struct `EnvironmentsClientGetResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetResponse` has been removed -- Field `WebAppsClientCreateMSDeployOperationResult` of struct `WebAppsClientCreateMSDeployOperationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateMSDeployOperationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteFunctionSecretSlotResponse` has been removed -- Field `WebAppsClientListNetworkFeaturesResult` of struct `WebAppsClientListNetworkFeaturesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListNetworkFeaturesResponse` has been removed -- Field `WebAppsClientGetRelayServiceConnectionResult` of struct `WebAppsClientGetRelayServiceConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetRelayServiceConnectionResponse` has been removed -- Field `WebAppsClientListSiteBackupsSlotResult` of struct `WebAppsClientListSiteBackupsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSiteBackupsSlotResponse` has been removed -- Field `CertificateOrdersClientUpdateCertificateResult` of struct `CertificateOrdersClientUpdateCertificateResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientUpdateCertificateResponse` has been removed -- Field `WebAppsClientUpdateDomainOwnershipIdentifierSlotResult` of struct `WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse` has been removed -- Field `WebAppsClientListHostKeysResult` of struct `WebAppsClientListHostKeysResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListHostKeysResponse` has been removed -- Field `WebAppsClientGetDiagnosticLogsConfigurationResult` of struct `WebAppsClientGetDiagnosticLogsConfigurationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetDiagnosticLogsConfigurationResponse` has been removed -- Field `DiagnosticsClientExecuteSiteDetectorResult` of struct `DiagnosticsClientExecuteSiteDetectorResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientExecuteSiteDetectorResponse` has been removed -- Field `PlansClientUpdateVnetRouteResult` of struct `PlansClientUpdateVnetRouteResponse` has been removed -- Field `RawResponse` of struct `PlansClientUpdateVnetRouteResponse` has been removed -- Field `WebAppsClientListSiteExtensionsSlotResult` of struct `WebAppsClientListSiteExtensionsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSiteExtensionsSlotResponse` has been removed -- Field `WebAppsClientGetProcessModuleSlotResult` of struct `WebAppsClientGetProcessModuleSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetProcessModuleSlotResponse` has been removed -- Field `WebAppsClientGetInstanceProcessModuleResult` of struct `WebAppsClientGetInstanceProcessModuleResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceProcessModuleResponse` has been removed -- Field `EnvironmentsClientListMultiRolePoolsResult` of struct `EnvironmentsClientListMultiRolePoolsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListMultiRolePoolsResponse` has been removed -- Field `KubeEnvironmentsClientListByResourceGroupResult` of struct `KubeEnvironmentsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `KubeEnvironmentsClientListByResourceGroupResponse` has been removed -- Field `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResult` of struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientResetProductionSlotConfigResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientApplySlotConfigurationSlotResponse` has been removed -- Field `CertificatesClientUpdateResult` of struct `CertificatesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `CertificatesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientDisableRecommendationForSiteResponse` has been removed -- Field `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResult` of struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse` has been removed -- Field `PlansClientUpdateResult` of struct `PlansClientUpdateResponse` has been removed -- Field `RawResponse` of struct `PlansClientUpdateResponse` has been removed -- Field `DeletedWebAppsClientGetDeletedWebAppByLocationResult` of struct `DeletedWebAppsClientGetDeletedWebAppByLocationResponse` has been removed -- Field `RawResponse` of struct `DeletedWebAppsClientGetDeletedWebAppByLocationResponse` has been removed -- Field `WebAppsClientGetDomainOwnershipIdentifierSlotResult` of struct `WebAppsClientGetDomainOwnershipIdentifierSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetDomainOwnershipIdentifierSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResult` of struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteContinuousWebJobSlotResponse` has been removed -- Field `WebAppsClientListDeploymentLogResult` of struct `WebAppsClientListDeploymentLogResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListDeploymentLogResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteSiteExtensionSlotResponse` has been removed -- Field `DiagnosticsClientListSiteDetectorsSlotResult` of struct `DiagnosticsClientListSiteDetectorsSlotResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientListSiteDetectorsSlotResponse` has been removed -- Field `WebAppsClientIsCloneableResult` of struct `WebAppsClientIsCloneableResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientIsCloneableResponse` has been removed -- Field `ResourceHealthMetadataClientListBySiteResult` of struct `ResourceHealthMetadataClientListBySiteResponse` has been removed -- Field `RawResponse` of struct `ResourceHealthMetadataClientListBySiteResponse` has been removed -- Field `WebAppsClientGetSlotResult` of struct `WebAppsClientGetSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSlotResponse` has been removed -- Field `WebAppsClientStartWebSiteNetworkTraceSlotResult` of struct `WebAppsClientStartWebSiteNetworkTraceSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStartWebSiteNetworkTraceSlotResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsRevisionsClientActivateRevisionResponse` has been removed -- Field `PlansClientListHybridConnectionsResult` of struct `PlansClientListHybridConnectionsResponse` has been removed -- Field `RawResponse` of struct `PlansClientListHybridConnectionsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStopContinuousWebJobSlotResponse` has been removed -- Field `WebAppsClientPutPrivateAccessVnetResult` of struct `WebAppsClientPutPrivateAccessVnetResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientPutPrivateAccessVnetResponse` has been removed -- Field `WebAppsClientListConfigurationSnapshotInfoResult` of struct `WebAppsClientListConfigurationSnapshotInfoResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListConfigurationSnapshotInfoResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteDeploymentSlotResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientDisableAllForHostingEnvironmentResponse` has been removed -- Field `WebAppsClientDiscoverBackupSlotResult` of struct `WebAppsClientDiscoverBackupSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDiscoverBackupSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteDomainOwnershipIdentifierResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStopResponse` has been removed -- Field `CertificateOrdersClientRetrieveCertificateEmailHistoryResult` of struct `CertificateOrdersClientRetrieveCertificateEmailHistoryResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientRetrieveCertificateEmailHistoryResponse` has been removed -- Field `WebAppsClientGetFunctionResult` of struct `WebAppsClientGetFunctionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetFunctionResponse` has been removed -- Field `RawResponse` of struct `PlansClientRebootWorkerResponse` has been removed -- Field `WebSiteManagementClientUpdatePublishingUserResult` of struct `WebSiteManagementClientUpdatePublishingUserResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientUpdatePublishingUserResponse` has been removed -- Field `WebAppsClientListPublicCertificatesSlotResult` of struct `WebAppsClientListPublicCertificatesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListPublicCertificatesSlotResponse` has been removed -- Field `WebAppsClientGetVnetConnectionSlotResult` of struct `WebAppsClientGetVnetConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetVnetConnectionSlotResponse` has been removed -- Field `WebAppsClientListContinuousWebJobsSlotResult` of struct `WebAppsClientListContinuousWebJobsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListContinuousWebJobsSlotResponse` has been removed -- Field `EnvironmentsClientListByResourceGroupResult` of struct `EnvironmentsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListByResourceGroupResponse` has been removed -- Field `EnvironmentsClientListOperationsResult` of struct `EnvironmentsClientListOperationsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListOperationsResponse` has been removed -- Field `WebAppsClientListProcessModulesSlotResult` of struct `WebAppsClientListProcessModulesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListProcessModulesSlotResponse` has been removed -- Field `ContainerAppsClientListSecretsResult` of struct `ContainerAppsClientListSecretsResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsClientListSecretsResponse` has been removed -- Field `WebAppsClientStartWebSiteNetworkTraceOperationResult` of struct `WebAppsClientStartWebSiteNetworkTraceOperationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStartWebSiteNetworkTraceOperationResponse` has been removed -- Field `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResult` of struct `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientSwapSlotWithProductionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeletePremierAddOnResponse` has been removed -- Field `WebAppsClientListInstanceProcessThreadsSlotResult` of struct `WebAppsClientListInstanceProcessThreadsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListInstanceProcessThreadsSlotResponse` has been removed -- Field `ContainerAppsClientListByResourceGroupResult` of struct `ContainerAppsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsClientListByResourceGroupResponse` has been removed -- Field `WebAppsClientListFunctionsResult` of struct `WebAppsClientListFunctionsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListFunctionsResponse` has been removed -- Field `WebAppsClientApproveOrRejectPrivateEndpointConnectionResult` of struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse` has been removed -- Field `WebAppsClientUpdateConfigurationResult` of struct `WebAppsClientUpdateConfigurationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateConfigurationResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientRebootResponse` has been removed -- Field `PlansClientCreateOrUpdateVnetRouteResult` of struct `PlansClientCreateOrUpdateVnetRouteResponse` has been removed -- Field `RawResponse` of struct `PlansClientCreateOrUpdateVnetRouteResponse` has been removed -- Field `WebAppsClientListAzureStorageAccountsSlotResult` of struct `WebAppsClientListAzureStorageAccountsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListAzureStorageAccountsSlotResponse` has been removed -- Field `KubeEnvironmentsClientListBySubscriptionResult` of struct `KubeEnvironmentsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `KubeEnvironmentsClientListBySubscriptionResponse` has been removed -- Field `WebAppsClientListSnapshotsFromDRSecondarySlotResult` of struct `WebAppsClientListSnapshotsFromDRSecondarySlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSnapshotsFromDRSecondarySlotResponse` has been removed -- Field `WebAppsClientGetFtpAllowedSlotResult` of struct `WebAppsClientGetFtpAllowedSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetFtpAllowedSlotResponse` has been removed -- Field `WebAppsClientGetDeploymentResult` of struct `WebAppsClientGetDeploymentResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetDeploymentResponse` has been removed -- Field `WebAppsClientGetMSDeployLogResult` of struct `WebAppsClientGetMSDeployLogResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetMSDeployLogResponse` has been removed -- Field `WebAppsClientListDeploymentsSlotResult` of struct `WebAppsClientListDeploymentsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListDeploymentsSlotResponse` has been removed -- Field `StaticSitesClientGetStaticSiteResult` of struct `StaticSitesClientGetStaticSiteResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetStaticSiteResponse` has been removed -- Field `WebAppsClientListHostKeysSlotResult` of struct `WebAppsClientListHostKeysSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListHostKeysSlotResponse` has been removed -- Field `WebAppsClientGetTriggeredWebJobHistorySlotResult` of struct `WebAppsClientGetTriggeredWebJobHistorySlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetTriggeredWebJobHistorySlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteSwiftVirtualNetworkResponse` has been removed -- Field `EnvironmentsClientDeletePrivateEndpointConnectionResult` of struct `EnvironmentsClientDeletePrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientDeletePrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStopContinuousWebJobResponse` has been removed -- Field `ContainerAppsRevisionsClientListRevisionsResult` of struct `ContainerAppsRevisionsClientListRevisionsResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsRevisionsClientListRevisionsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteInstanceProcessResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientResetAllFiltersForWebAppResponse` has been removed -- Field `WebAppsClientUpdateAuthSettingsSlotResult` of struct `WebAppsClientUpdateAuthSettingsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateAuthSettingsSlotResponse` has been removed -- Field `WebAppsClientListTriggeredWebJobHistorySlotResult` of struct `WebAppsClientListTriggeredWebJobHistorySlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListTriggeredWebJobHistorySlotResponse` has been removed -- Field `WebAppsClientListInstanceIdentifiersResult` of struct `WebAppsClientListInstanceIdentifiersResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListInstanceIdentifiersResponse` has been removed -- Field `StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResult` of struct `StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse` has been removed -- Field `WebAppsClientListHybridConnectionsSlotResult` of struct `WebAppsClientListHybridConnectionsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListHybridConnectionsSlotResponse` has been removed -- Field `ProviderClientGetWebAppStacksResult` of struct `ProviderClientGetWebAppStacksResponse` has been removed -- Field `RawResponse` of struct `ProviderClientGetWebAppStacksResponse` has been removed -- Field `WebAppsClientGetInstanceMsDeployStatusResult` of struct `WebAppsClientGetInstanceMsDeployStatusResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceMsDeployStatusResponse` has been removed -- Field `WebAppsClientListBackupsSlotResult` of struct `WebAppsClientListBackupsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListBackupsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteVnetConnectionSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResult` of struct `WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse` has been removed -- Field `WebAppsClientListProcessesResult` of struct `WebAppsClientListProcessesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListProcessesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStartContinuousWebJobSlotResponse` has been removed -- Field `DiagnosticsClientListHostingEnvironmentDetectorResponsesResult` of struct `DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse` has been removed -- Field `WebAppsClientListSitePushSettingsSlotResult` of struct `WebAppsClientListSitePushSettingsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSitePushSettingsSlotResponse` has been removed -- Field `WebAppsClientListDeploymentsResult` of struct `WebAppsClientListDeploymentsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListDeploymentsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse` has been removed -- Field `WebAppsClientListProcessThreadsResult` of struct `WebAppsClientListProcessThreadsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListProcessThreadsResponse` has been removed -- Field `WebAppsClientGetSourceControlResult` of struct `WebAppsClientGetSourceControlResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSourceControlResponse` has been removed -- Field `WebAppsClientListSlotDifferencesSlotResult` of struct `WebAppsClientListSlotDifferencesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSlotDifferencesSlotResponse` has been removed -- Field `WebAppsClientListRelayServiceConnectionsSlotResult` of struct `WebAppsClientListRelayServiceConnectionsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListRelayServiceConnectionsSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdatePublicCertificateSlotResult` of struct `WebAppsClientCreateOrUpdatePublicCertificateSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdatePublicCertificateSlotResponse` has been removed -- Field `WebAppsClientListTriggeredWebJobsResult` of struct `WebAppsClientListTriggeredWebJobsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListTriggeredWebJobsResponse` has been removed -- Field `WebAppsClientGetScmAllowedSlotResult` of struct `WebAppsClientGetScmAllowedSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetScmAllowedSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRecoverSiteConfigurationSnapshotResponse` has been removed -- Field `PlansClientGetHybridConnectionResult` of struct `PlansClientGetHybridConnectionResponse` has been removed -- Field `RawResponse` of struct `PlansClientGetHybridConnectionResponse` has been removed -- Field `WebAppsClientListInstanceProcessesResult` of struct `WebAppsClientListInstanceProcessesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListInstanceProcessesResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientResendEmailResponse` has been removed -- Field `WebAppsClientGetAuthSettingsResult` of struct `WebAppsClientGetAuthSettingsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetAuthSettingsResponse` has been removed -- Field `WebAppsClientGetMSDeployLogSlotResult` of struct `WebAppsClientGetMSDeployLogSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetMSDeployLogSlotResponse` has been removed -- Field `EnvironmentsClientGetVipInfoResult` of struct `EnvironmentsClientGetVipInfoResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetVipInfoResponse` has been removed -- Field `KubeEnvironmentsClientGetResult` of struct `KubeEnvironmentsClientGetResponse` has been removed -- Field `RawResponse` of struct `KubeEnvironmentsClientGetResponse` has been removed -- Field `EnvironmentsClientListCapacitiesResult` of struct `EnvironmentsClientListCapacitiesResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListCapacitiesResponse` has been removed -- Field `PlansClientListUsagesResult` of struct `PlansClientListUsagesResponse` has been removed -- Field `RawResponse` of struct `PlansClientListUsagesResponse` has been removed -- Field `WebAppsClientGetPrivateEndpointConnectionSlotResult` of struct `WebAppsClientGetPrivateEndpointConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPrivateEndpointConnectionSlotResponse` has been removed -- Field `WebAppsClientGetMigrateMySQLStatusResult` of struct `WebAppsClientGetMigrateMySQLStatusResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetMigrateMySQLStatusResponse` has been removed -- Field `WebAppsClientListSiteExtensionsResult` of struct `WebAppsClientListSiteExtensionsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSiteExtensionsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientDetachStaticSiteResponse` has been removed -- Field `WebAppsClientDeletePrivateEndpointConnectionSlotResult` of struct `WebAppsClientDeletePrivateEndpointConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeletePrivateEndpointConnectionSlotResponse` has been removed -- Field `StaticSitesClientListStaticSiteBuildFunctionAppSettingsResult` of struct `StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse` has been removed -- Field `WebAppsClientAnalyzeCustomHostnameSlotResult` of struct `WebAppsClientAnalyzeCustomHostnameSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientAnalyzeCustomHostnameSlotResponse` has been removed -- Field `WebAppsClientUpdateSlotConfigurationNamesResult` of struct `WebAppsClientUpdateSlotConfigurationNamesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateSlotConfigurationNamesResponse` has been removed -- Field `WebAppsClientGetPrivateLinkResourcesSlotResult` of struct `WebAppsClientGetPrivateLinkResourcesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPrivateLinkResourcesSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateFunctionSecretSlotResult` of struct `WebAppsClientCreateOrUpdateFunctionSecretSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateFunctionSecretSlotResponse` has been removed -- Field `PlansClientGetVnetGatewayResult` of struct `PlansClientGetVnetGatewayResponse` has been removed -- Field `RawResponse` of struct `PlansClientGetVnetGatewayResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse` has been removed -- Field `WebAppsClientGetTriggeredWebJobHistoryResult` of struct `WebAppsClientGetTriggeredWebJobHistoryResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetTriggeredWebJobHistoryResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientCreateZipDeploymentForStaticSiteResponse` has been removed -- Field `WebAppsClientListFunctionSecretsSlotResult` of struct `WebAppsClientListFunctionSecretsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListFunctionSecretsSlotResponse` has been removed -- Field `StaticSitesClientGetPrivateLinkResourcesResult` of struct `StaticSitesClientGetPrivateLinkResourcesResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetPrivateLinkResourcesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStopNetworkTraceResponse` has been removed -- Field `DeletedWebAppsClientListResult` of struct `DeletedWebAppsClientListResponse` has been removed -- Field `RawResponse` of struct `DeletedWebAppsClientListResponse` has been removed -- Field `WebAppsClientListUsagesResult` of struct `WebAppsClientListUsagesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListUsagesResponse` has been removed -- Field `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResult` of struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse` has been removed -- Field `WebAppsClientGetSiteConnectionStringKeyVaultReferenceResult` of struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse` has been removed -- Field `WebAppsClientDiscoverBackupResult` of struct `WebAppsClientDiscoverBackupResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDiscoverBackupResponse` has been removed -- Field `WebAppsClientGetSourceControlSlotResult` of struct `WebAppsClientGetSourceControlSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSourceControlSlotResponse` has been removed -- Field `WebAppsClientGetConfigurationResult` of struct `WebAppsClientGetConfigurationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetConfigurationResponse` has been removed -- Field `StaticSitesClientListStaticSiteConfiguredRolesResult` of struct `StaticSitesClientListStaticSiteConfiguredRolesResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListStaticSiteConfiguredRolesResponse` has been removed -- Field `WebAppsClientGetInstanceProcessModuleSlotResult` of struct `WebAppsClientGetInstanceProcessModuleSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceProcessModuleSlotResponse` has been removed -- Field `WebAppsClientUpdateHybridConnectionResult` of struct `WebAppsClientUpdateHybridConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateHybridConnectionResponse` has been removed -- Field `WebAppsClientGetHybridConnectionResult` of struct `WebAppsClientGetHybridConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetHybridConnectionResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientDeleteStaticSiteBuildResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteDeploymentResponse` has been removed -- Field `DiagnosticsClientGetSiteDetectorResult` of struct `DiagnosticsClientGetSiteDetectorResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientGetSiteDetectorResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRunTriggeredWebJobResponse` has been removed -- Field `DiagnosticsClientListSiteDiagnosticCategoriesResult` of struct `DiagnosticsClientListSiteDiagnosticCategoriesResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientListSiteDiagnosticCategoriesResponse` has been removed -- Field `WebAppsClientListProcessThreadsSlotResult` of struct `WebAppsClientListProcessThreadsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListProcessThreadsSlotResponse` has been removed -- Field `WebAppsClientUpdateConfigurationSlotResult` of struct `WebAppsClientUpdateConfigurationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateConfigurationSlotResponse` has been removed -- Field `WebAppsClientListWebJobsResult` of struct `WebAppsClientListWebJobsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListWebJobsResponse` has been removed -- Field `RawResponse` of struct `PlansClientDeleteVnetRouteResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteTriggeredWebJobSlotResponse` has been removed -- Field `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResult` of struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientApplySlotConfigToProductionResponse` has been removed -- Field `CertificateRegistrationProviderClientListOperationsResult` of struct `CertificateRegistrationProviderClientListOperationsResponse` has been removed -- Field `RawResponse` of struct `CertificateRegistrationProviderClientListOperationsResponse` has been removed -- Field `StaticSitesClientListResult` of struct `StaticSitesClientListResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceProcessDumpSlotResponse` has been removed -- Field `DiagnosticsClientListSiteAnalysesResult` of struct `DiagnosticsClientListSiteAnalysesResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientListSiteAnalysesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListPublishingProfileXMLWithSecretsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeletePublicCertificateSlotResponse` has been removed -- Field `WebAppsClientListWebJobsSlotResult` of struct `WebAppsClientListWebJobsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListWebJobsSlotResponse` has been removed -- Field `StaticSitesClientDeletePrivateEndpointConnectionResult` of struct `StaticSitesClientDeletePrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientDeletePrivateEndpointConnectionResponse` has been removed -- Field `WebAppsClientCreateOrUpdateHostNameBindingResult` of struct `WebAppsClientCreateOrUpdateHostNameBindingResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateHostNameBindingResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientResetAllFiltersResponse` has been removed -- Field `WebAppsClientStartWebSiteNetworkTraceResult` of struct `WebAppsClientStartWebSiteNetworkTraceResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStartWebSiteNetworkTraceResponse` has been removed -- Field `WebAppsClientListInstanceProcessModulesResult` of struct `WebAppsClientListInstanceProcessModulesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListInstanceProcessModulesResponse` has been removed -- Field `TopLevelDomainsClientListAgreementsResult` of struct `TopLevelDomainsClientListAgreementsResponse` has been removed -- Field `RawResponse` of struct `TopLevelDomainsClientListAgreementsResponse` has been removed -- Field `ResourceHealthMetadataClientListBySiteSlotResult` of struct `ResourceHealthMetadataClientListBySiteSlotResponse` has been removed -- Field `RawResponse` of struct `ResourceHealthMetadataClientListBySiteSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdatePublicCertificateResult` of struct `WebAppsClientCreateOrUpdatePublicCertificateResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdatePublicCertificateResponse` has been removed -- Field `RawResponse` of struct `GlobalClientGetSubscriptionOperationWithAsyncResponseResponse` has been removed -- Field `WebAppsClientListVnetConnectionsSlotResult` of struct `WebAppsClientListVnetConnectionsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListVnetConnectionsSlotResponse` has been removed -- Field `DiagnosticsClientListSiteDiagnosticCategoriesSlotResult` of struct `DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRestartSlotResponse` has been removed -- Field `WebAppsClientGetContinuousWebJobSlotResult` of struct `WebAppsClientGetContinuousWebJobSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetContinuousWebJobSlotResponse` has been removed -- Field `RawResponse` of struct `CertificatesClientDeleteResponse` has been removed -- Field `StaticSitesClientListStaticSiteBuildFunctionsResult` of struct `StaticSitesClientListStaticSiteBuildFunctionsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListStaticSiteBuildFunctionsResponse` has been removed -- Field `WebAppsClientUpdateAzureStorageAccountsResult` of struct `WebAppsClientUpdateAzureStorageAccountsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateAzureStorageAccountsResponse` has been removed -- Field `RecommendationsClientListRecommendedRulesForWebAppResult` of struct `RecommendationsClientListRecommendedRulesForWebAppResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientListRecommendedRulesForWebAppResponse` has been removed -- Field `WebAppsClientListNetworkFeaturesSlotResult` of struct `WebAppsClientListNetworkFeaturesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListNetworkFeaturesSlotResponse` has been removed -- Field `WebSiteManagementClientListSKUsResult` of struct `WebSiteManagementClientListSKUsResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientListSKUsResponse` has been removed -- Field `WebAppsClientGetSwiftVirtualNetworkConnectionResult` of struct `WebAppsClientGetSwiftVirtualNetworkConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSwiftVirtualNetworkConnectionResponse` has been removed -- Field `WebAppsClientGetAppSettingsKeyVaultReferencesSlotResult` of struct `WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse` has been removed -- Field `EnvironmentsClientListWorkerPoolsResult` of struct `EnvironmentsClientListWorkerPoolsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListWorkerPoolsResponse` has been removed -- Field `EnvironmentsClientCreateOrUpdateWorkerPoolResult` of struct `EnvironmentsClientCreateOrUpdateWorkerPoolResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientCreateOrUpdateWorkerPoolResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteFunctionResponse` has been removed -- Field `StaticSitesClientCreateUserRolesInvitationLinkResult` of struct `StaticSitesClientCreateUserRolesInvitationLinkResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientCreateUserRolesInvitationLinkResponse` has been removed -- Field `RawResponse` of struct `KubeEnvironmentsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteSiteExtensionResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientResetAllFiltersForHostingEnvironmentResponse` has been removed -- Field `PlansClientGetHybridConnectionPlanLimitResult` of struct `PlansClientGetHybridConnectionPlanLimitResponse` has been removed -- Field `RawResponse` of struct `PlansClientGetHybridConnectionPlanLimitResponse` has been removed -- Field `WebAppsClientCreateOrUpdateConfigurationSlotResult` of struct `WebAppsClientCreateOrUpdateConfigurationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateConfigurationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRestoreSnapshotResponse` has been removed -- Field `WebAppsClientListProcessesSlotResult` of struct `WebAppsClientListProcessesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListProcessesSlotResponse` has been removed -- Field `DomainsClientCreateOrUpdateOwnershipIdentifierResult` of struct `DomainsClientCreateOrUpdateOwnershipIdentifierResponse` has been removed -- Field `RawResponse` of struct `DomainsClientCreateOrUpdateOwnershipIdentifierResponse` has been removed -- Field `WebAppsClientListInstanceProcessesSlotResult` of struct `WebAppsClientListInstanceProcessesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListInstanceProcessesSlotResponse` has been removed -- Field `WebAppsClientGetTriggeredWebJobSlotResult` of struct `WebAppsClientGetTriggeredWebJobSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetTriggeredWebJobSlotResponse` has been removed -- Field `WebAppsClientListBackupStatusSecretsResult` of struct `WebAppsClientListBackupStatusSecretsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListBackupStatusSecretsResponse` has been removed -- Field `WebAppsClientInstallSiteExtensionSlotResult` of struct `WebAppsClientInstallSiteExtensionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientInstallSiteExtensionSlotResponse` has been removed -- Field `StaticSitesClientGetStaticSiteBuildsResult` of struct `StaticSitesClientGetStaticSiteBuildsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetStaticSiteBuildsResponse` has been removed -- Field `EnvironmentsClientUpdateWorkerPoolResult` of struct `EnvironmentsClientUpdateWorkerPoolResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientUpdateWorkerPoolResponse` has been removed -- Field `DomainRegistrationProviderClientListOperationsResult` of struct `DomainRegistrationProviderClientListOperationsResponse` has been removed -- Field `RawResponse` of struct `DomainRegistrationProviderClientListOperationsResponse` has been removed -- Field `WebAppsClientListBasicPublishingCredentialsPoliciesResult` of struct `WebAppsClientListBasicPublishingCredentialsPoliciesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListBasicPublishingCredentialsPoliciesResponse` has been removed -- Field `WebAppsClientUpdatePremierAddOnSlotResult` of struct `WebAppsClientUpdatePremierAddOnSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdatePremierAddOnSlotResponse` has been removed -- Field `WebAppsClientUpdateConnectionStringsSlotResult` of struct `WebAppsClientUpdateConnectionStringsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateConnectionStringsSlotResponse` has been removed -- Field `WebAppsClientGetVnetConnectionResult` of struct `WebAppsClientGetVnetConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetVnetConnectionResponse` has been removed -- Field `StaticSitesClientGetStaticSiteCustomDomainResult` of struct `StaticSitesClientGetStaticSiteCustomDomainResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetStaticSiteCustomDomainResponse` has been removed -- Field `WebAppsClientMigrateMySQLResult` of struct `WebAppsClientMigrateMySQLResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientMigrateMySQLResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse` has been removed -- Field `EnvironmentsClientGetAseV3NetworkingConfigurationResult` of struct `EnvironmentsClientGetAseV3NetworkingConfigurationResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetAseV3NetworkingConfigurationResponse` has been removed -- Field `WebAppsClientGetSiteExtensionResult` of struct `WebAppsClientGetSiteExtensionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSiteExtensionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetWebSiteContainerLogsSlotResponse` has been removed -- Field `WebAppsClientUpdateApplicationSettingsSlotResult` of struct `WebAppsClientUpdateApplicationSettingsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateApplicationSettingsSlotResponse` has been removed -- Field `WebAppsClientGetWebJobSlotResult` of struct `WebAppsClientGetWebJobSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetWebJobSlotResponse` has been removed -- Field `WebAppsClientGetHybridConnectionSlotResult` of struct `WebAppsClientGetHybridConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetHybridConnectionSlotResponse` has been removed -- Field `WebAppsClientPutPrivateAccessVnetSlotResult` of struct `WebAppsClientPutPrivateAccessVnetSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientPutPrivateAccessVnetSlotResponse` has been removed -- Field `WebAppsClientGetPrivateAccessResult` of struct `WebAppsClientGetPrivateAccessResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPrivateAccessResponse` has been removed -- Field `WebAppsClientDeletePrivateEndpointConnectionResult` of struct `WebAppsClientDeletePrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeletePrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetProcessDumpResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteRelayServiceConnectionSlotResponse` has been removed -- Field `WebAppsClientGetScmAllowedResult` of struct `WebAppsClientGetScmAllowedResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetScmAllowedResponse` has been removed -- Field `WebAppsClientUpdateDiagnosticLogsConfigResult` of struct `WebAppsClientUpdateDiagnosticLogsConfigResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateDiagnosticLogsConfigResponse` has been removed -- Field `ProviderClientGetWebAppStacksForLocationResult` of struct `ProviderClientGetWebAppStacksForLocationResponse` has been removed -- Field `RawResponse` of struct `ProviderClientGetWebAppStacksForLocationResponse` has been removed -- Field `WebAppsClientGetMSDeployStatusResult` of struct `WebAppsClientGetMSDeployStatusResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetMSDeployStatusResponse` has been removed -- Field `EnvironmentsClientGetPrivateLinkResourcesResult` of struct `EnvironmentsClientGetPrivateLinkResourcesResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetPrivateLinkResourcesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteHybridConnectionResponse` has been removed -- Field `WebAppsClientIsCloneableSlotResult` of struct `WebAppsClientIsCloneableSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientIsCloneableSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStopNetworkTraceSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetContainerLogsZipResponse` has been removed -- Field `WebAppsClientUpdateBackupConfigurationSlotResult` of struct `WebAppsClientUpdateBackupConfigurationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateBackupConfigurationSlotResponse` has been removed -- Field `EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResult` of struct `EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientDeleteStaticSiteCustomDomainResponse` has been removed -- Field `WebAppsClientListDomainOwnershipIdentifiersSlotResult` of struct `WebAppsClientListDomainOwnershipIdentifiersSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListDomainOwnershipIdentifiersSlotResponse` has been removed -- Field `RawResponse` of struct `DomainsClientRenewResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientRenewResponse` has been removed -- Field `WebAppsClientUpdateFtpAllowedSlotResult` of struct `WebAppsClientUpdateFtpAllowedSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateFtpAllowedSlotResponse` has been removed -- Field `WebAppsClientCreateInstanceFunctionSlotResult` of struct `WebAppsClientCreateInstanceFunctionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateInstanceFunctionSlotResponse` has been removed -- Field `WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResult` of struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse` has been removed -- Field `DomainsClientGetResult` of struct `DomainsClientGetResponse` has been removed -- Field `RawResponse` of struct `DomainsClientGetResponse` has been removed -- Field `DomainsClientListOwnershipIdentifiersResult` of struct `DomainsClientListOwnershipIdentifiersResponse` has been removed -- Field `RawResponse` of struct `DomainsClientListOwnershipIdentifiersResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsRevisionsClientDeactivateRevisionResponse` has been removed -- Field `WebAppsClientListInstanceIdentifiersSlotResult` of struct `WebAppsClientListInstanceIdentifiersSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListInstanceIdentifiersSlotResponse` has been removed -- Field `WebAppsClientUpdateScmAllowedSlotResult` of struct `WebAppsClientUpdateScmAllowedSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateScmAllowedSlotResponse` has been removed -- Field `GlobalClientGetDeletedWebAppResult` of struct `GlobalClientGetDeletedWebAppResponse` has been removed -- Field `RawResponse` of struct `GlobalClientGetDeletedWebAppResponse` has been removed -- Field `WebAppsClientListApplicationSettingsResult` of struct `WebAppsClientListApplicationSettingsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListApplicationSettingsResponse` has been removed -- Field `WebAppsClientListVnetConnectionsResult` of struct `WebAppsClientListVnetConnectionsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListVnetConnectionsResponse` has been removed -- Field `WebAppsClientListPerfMonCountersResult` of struct `WebAppsClientListPerfMonCountersResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListPerfMonCountersResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientDeleteCertificateResponse` has been removed -- Field `EnvironmentsClientSuspendResult` of struct `EnvironmentsClientSuspendResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientSuspendResponse` has been removed -- Field `ProviderClientGetAvailableStacksOnPremResult` of struct `ProviderClientGetAvailableStacksOnPremResponse` has been removed -- Field `RawResponse` of struct `ProviderClientGetAvailableStacksOnPremResponse` has been removed -- Field `WebAppsClientUpdateAuthSettingsResult` of struct `WebAppsClientUpdateAuthSettingsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateAuthSettingsResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientDisableRecommendationForHostingEnvironmentResponse` has been removed -- Field `WebAppsClientCreateMSDeployOperationSlotResult` of struct `WebAppsClientCreateMSDeployOperationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateMSDeployOperationSlotResponse` has been removed -- Field `WebAppsClientListFunctionKeysSlotResult` of struct `WebAppsClientListFunctionKeysSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListFunctionKeysSlotResponse` has been removed -- Field `WebSiteManagementClientListPremierAddOnOffersResult` of struct `WebSiteManagementClientListPremierAddOnOffersResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientListPremierAddOnOffersResponse` has been removed -- Field `PlansClientGetResult` of struct `PlansClientGetResponse` has been removed -- Field `RawResponse` of struct `PlansClientGetResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGenerateNewSitePublishingPasswordSlotResponse` has been removed -- Field `DiagnosticsClientExecuteSiteDetectorSlotResult` of struct `DiagnosticsClientExecuteSiteDetectorSlotResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientExecuteSiteDetectorSlotResponse` has been removed -- Field `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResult` of struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse` has been removed -- Field `WebAppsClientCreateOrUpdateVnetConnectionResult` of struct `WebAppsClientCreateOrUpdateVnetConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateVnetConnectionResponse` has been removed -- Field `WebAppsClientGetNetworkTracesSlotV2Result` of struct `WebAppsClientGetNetworkTracesSlotV2Response` has been removed -- Field `RawResponse` of struct `WebAppsClientGetNetworkTracesSlotV2Response` has been removed -- Field `WebAppsClientUpdateVnetConnectionResult` of struct `WebAppsClientUpdateVnetConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateVnetConnectionResponse` has been removed -- Field `WebAppsClientUpdateHybridConnectionSlotResult` of struct `WebAppsClientUpdateHybridConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateHybridConnectionSlotResponse` has been removed -- Field `PlansClientListWebAppsByHybridConnectionResult` of struct `PlansClientListWebAppsByHybridConnectionResponse` has been removed -- Field `RawResponse` of struct `PlansClientListWebAppsByHybridConnectionResponse` has been removed -- Field `WebAppsClientListPublishingCredentialsSlotResult` of struct `WebAppsClientListPublishingCredentialsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListPublishingCredentialsSlotResponse` has been removed -- Field `DiagnosticsClientListSiteDetectorResponsesSlotResult` of struct `DiagnosticsClientListSiteDetectorResponsesSlotResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientListSiteDetectorResponsesSlotResponse` has been removed -- Field `DiagnosticsClientListSiteDetectorsResult` of struct `DiagnosticsClientListSiteDetectorsResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientListSiteDetectorsResponse` has been removed -- Field `WebAppsClientGetConfigurationSnapshotResult` of struct `WebAppsClientGetConfigurationSnapshotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetConfigurationSnapshotResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse` has been removed -- Field `WebAppsClientListSlotConfigurationNamesResult` of struct `WebAppsClientListSlotConfigurationNamesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSlotConfigurationNamesResponse` has been removed -- Field `WebAppsClientGetNetworkTraceOperationSlotResult` of struct `WebAppsClientGetNetworkTraceOperationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetNetworkTraceOperationSlotResponse` has been removed -- Field `WebAppsClientListConnectionStringsResult` of struct `WebAppsClientListConnectionStringsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListConnectionStringsResponse` has been removed -- Field `WebAppsClientGetProcessSlotResult` of struct `WebAppsClientGetProcessSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetProcessSlotResponse` has been removed -- Field `EnvironmentsClientListWorkerPoolSKUsResult` of struct `EnvironmentsClientListWorkerPoolSKUsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListWorkerPoolSKUsResponse` has been removed -- Field `DiagnosticsClientGetSiteDetectorResponseSlotResult` of struct `DiagnosticsClientGetSiteDetectorResponseSlotResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientGetSiteDetectorResponseSlotResponse` has been removed -- Field `WebAppsClientListApplicationSettingsSlotResult` of struct `WebAppsClientListApplicationSettingsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListApplicationSettingsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStopWebSiteNetworkTraceSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSyncStatusSlotResponse` has been removed -- Field `EnvironmentsClientListResult` of struct `EnvironmentsClientListResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListResponse` has been removed -- Field `EnvironmentsClientGetInboundNetworkDependenciesEndpointsResult` of struct `EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse` has been removed -- Field `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResult` of struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse` has been removed -- Field `WebAppsClientListRelayServiceConnectionsResult` of struct `WebAppsClientListRelayServiceConnectionsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListRelayServiceConnectionsResponse` has been removed -- Field `CertificateOrdersClientRetrieveCertificateActionsResult` of struct `CertificateOrdersClientRetrieveCertificateActionsResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientRetrieveCertificateActionsResponse` has been removed -- Field `WebAppsClientListPublishingCredentialsResult` of struct `WebAppsClientListPublishingCredentialsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListPublishingCredentialsResponse` has been removed -- Field `EnvironmentsClientCreateOrUpdateMultiRolePoolResult` of struct `EnvironmentsClientCreateOrUpdateMultiRolePoolResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientCreateOrUpdateMultiRolePoolResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteHybridConnectionSlotResponse` has been removed -- Field `WebAppsClientGetNetworkTracesSlotResult` of struct `WebAppsClientGetNetworkTracesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetNetworkTracesSlotResponse` has been removed -- Field `DiagnosticsClientExecuteSiteAnalysisResult` of struct `DiagnosticsClientExecuteSiteAnalysisResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientExecuteSiteAnalysisResponse` has been removed -- Field `TopLevelDomainsClientListResult` of struct `TopLevelDomainsClientListResponse` has been removed -- Field `RawResponse` of struct `TopLevelDomainsClientListResponse` has been removed -- Field `WebAppsClientStartWebSiteNetworkTraceOperationSlotResult` of struct `WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse` has been removed -- Field `WebAppsClientListPremierAddOnsSlotResult` of struct `WebAppsClientListPremierAddOnsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListPremierAddOnsSlotResponse` has been removed -- Field `DomainsClientListResult` of struct `DomainsClientListResponse` has been removed -- Field `RawResponse` of struct `DomainsClientListResponse` has been removed -- Field `StaticSitesClientListStaticSiteFunctionsResult` of struct `StaticSitesClientListStaticSiteFunctionsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListStaticSiteFunctionsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteHostNameBindingResponse` has been removed -- Field `WebAppsClientGetInstanceInfoResult` of struct `WebAppsClientGetInstanceInfoResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceInfoResponse` has been removed -- Field `WebAppsClientGetDeploymentSlotResult` of struct `WebAppsClientGetDeploymentSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetDeploymentSlotResponse` has been removed -- Field `DeletedWebAppsClientListByLocationResult` of struct `DeletedWebAppsClientListByLocationResponse` has been removed -- Field `RawResponse` of struct `DeletedWebAppsClientListByLocationResponse` has been removed -- Field `WebAppsClientUpdateFtpAllowedResult` of struct `WebAppsClientUpdateFtpAllowedResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateFtpAllowedResponse` has been removed -- Field `WebAppsClientListPerfMonCountersSlotResult` of struct `WebAppsClientListPerfMonCountersSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListPerfMonCountersSlotResponse` has been removed -- Field `WebAppsClientListBasicPublishingCredentialsPoliciesSlotResult` of struct `WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse` has been removed -- Field `WebAppsClientUpdateVnetConnectionSlotResult` of struct `WebAppsClientUpdateVnetConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateVnetConnectionSlotResponse` has been removed -- Field `EnvironmentsClientListWebWorkerMetricDefinitionsResult` of struct `EnvironmentsClientListWebWorkerMetricDefinitionsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListWebWorkerMetricDefinitionsResponse` has been removed -- Field `PlansClientGetServerFarmSKUsResult` of struct `PlansClientGetServerFarmSKUsResponse` has been removed -- Field `RawResponse` of struct `PlansClientGetServerFarmSKUsResponse` has been removed -- Field `EnvironmentsClientGetDiagnosticsItemResult` of struct `EnvironmentsClientGetDiagnosticsItemResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientGetDiagnosticsItemResponse` has been removed -- Field `TopLevelDomainsClientGetResult` of struct `TopLevelDomainsClientGetResponse` has been removed -- Field `RawResponse` of struct `TopLevelDomainsClientGetResponse` has been removed -- Field `WebAppsClientGetPremierAddOnResult` of struct `WebAppsClientGetPremierAddOnResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPremierAddOnResponse` has been removed -- Field `PlansClientListRoutesForVnetResult` of struct `PlansClientListRoutesForVnetResponse` has been removed -- Field `RawResponse` of struct `PlansClientListRoutesForVnetResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteHostNameBindingSlotResponse` has been removed -- Field `ContainerAppsClientListBySubscriptionResult` of struct `ContainerAppsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsClientListBySubscriptionResponse` has been removed -- Field `RecommendationsClientGetRuleDetailsByWebAppResult` of struct `RecommendationsClientGetRuleDetailsByWebAppResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientGetRuleDetailsByWebAppResponse` has been removed -- Field `WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResult` of struct `WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse` has been removed -- Field `WebAppsClientCreateOrUpdateVnetConnectionSlotResult` of struct `WebAppsClientCreateOrUpdateVnetConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateVnetConnectionSlotResponse` has been removed -- Field `WebAppsClientGetMSDeployStatusSlotResult` of struct `WebAppsClientGetMSDeployStatusSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetMSDeployStatusSlotResponse` has been removed -- Field `ProviderClientListOperationsResult` of struct `ProviderClientListOperationsResponse` has been removed -- Field `RawResponse` of struct `ProviderClientListOperationsResponse` has been removed -- Field `DomainsClientUpdateOwnershipIdentifierResult` of struct `DomainsClientUpdateOwnershipIdentifierResponse` has been removed -- Field `RawResponse` of struct `DomainsClientUpdateOwnershipIdentifierResponse` has been removed -- Field `WebAppsClientGetNetworkTracesResult` of struct `WebAppsClientGetNetworkTracesResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetNetworkTracesResponse` has been removed -- Field `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResult` of struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse` has been removed -- Field `StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResult` of struct `StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse` has been removed -- Field `CertificateOrdersClientGetCertificateResult` of struct `CertificateOrdersClientGetCertificateResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientGetCertificateResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteHostSecretResponse` has been removed -- Field `WebAppsClientUpdateDomainOwnershipIdentifierResult` of struct `WebAppsClientUpdateDomainOwnershipIdentifierResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateDomainOwnershipIdentifierResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse` has been removed -- Field `DomainsClientListRecommendationsResult` of struct `DomainsClientListRecommendationsResponse` has been removed -- Field `RawResponse` of struct `DomainsClientListRecommendationsResponse` has been removed -- Field `WebAppsClientGetAuthSettingsV2Result` of struct `WebAppsClientGetAuthSettingsV2Response` has been removed -- Field `RawResponse` of struct `WebAppsClientGetAuthSettingsV2Response` has been removed -- Field `RawResponse` of struct `DomainsClientDeleteOwnershipIdentifierResponse` has been removed -- Field `PlansClientGetRouteForVnetResult` of struct `PlansClientGetRouteForVnetResponse` has been removed -- Field `RawResponse` of struct `PlansClientGetRouteForVnetResponse` has been removed -- Field `WebSiteManagementClientGetSubscriptionDeploymentLocationsResult` of struct `WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse` has been removed -- Field `PlansClientListResult` of struct `PlansClientListResponse` has been removed -- Field `RawResponse` of struct `PlansClientListResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientResetSlotConfigurationSlotResponse` has been removed -- Field `RawResponse` of struct `PlansClientDeleteHybridConnectionResponse` has been removed -- Field `CertificateOrdersClientCreateOrUpdateCertificateResult` of struct `CertificateOrdersClientCreateOrUpdateCertificateResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientCreateOrUpdateCertificateResponse` has been removed -- Field `WebAppsClientGetSitePhpErrorLogFlagResult` of struct `WebAppsClientGetSitePhpErrorLogFlagResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSitePhpErrorLogFlagResponse` has been removed -- Field `WebAppsClientListHostNameBindingsResult` of struct `WebAppsClientListHostNameBindingsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListHostNameBindingsResponse` has been removed -- Field `WebSiteManagementClientListBillingMetersResult` of struct `WebSiteManagementClientListBillingMetersResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientListBillingMetersResponse` has been removed -- Field `RecommendationsClientListHistoryForHostingEnvironmentResult` of struct `RecommendationsClientListHistoryForHostingEnvironmentResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientListHistoryForHostingEnvironmentResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteRelayServiceConnectionResponse` has been removed -- Field `StaticSitesClientGetPrivateEndpointConnectionListResult` of struct `StaticSitesClientGetPrivateEndpointConnectionListResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetPrivateEndpointConnectionListResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRestoreSlotResponse` has been removed -- Field `RecommendationsClientGetRuleDetailsByHostingEnvironmentResult` of struct `RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse` has been removed -- Field `WebSiteManagementClientListCustomHostNameSitesResult` of struct `WebSiteManagementClientListCustomHostNameSitesResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientListCustomHostNameSitesResponse` has been removed -- Field `WebAppsClientListHostNameBindingsSlotResult` of struct `WebAppsClientListHostNameBindingsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListHostNameBindingsSlotResponse` has been removed -- Field `WebAppsClientUpdatePremierAddOnResult` of struct `WebAppsClientUpdatePremierAddOnResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdatePremierAddOnResponse` has been removed -- Field `StaticSitesClientUpdateStaticSiteUserResult` of struct `StaticSitesClientUpdateStaticSiteUserResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientUpdateStaticSiteUserResponse` has been removed -- Field `WebAppsClientListBackupStatusSecretsSlotResult` of struct `WebAppsClientListBackupStatusSecretsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListBackupStatusSecretsSlotResponse` has been removed -- Field `WebAppsClientUpdateSourceControlResult` of struct `WebAppsClientUpdateSourceControlResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateSourceControlResponse` has been removed -- Field `WebAppsClientListTriggeredWebJobsSlotResult` of struct `WebAppsClientListTriggeredWebJobsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListTriggeredWebJobsSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateSourceControlSlotResult` of struct `WebAppsClientCreateOrUpdateSourceControlSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateSourceControlSlotResponse` has been removed -- Field `WebSiteManagementClientUpdateSourceControlResult` of struct `WebSiteManagementClientUpdateSourceControlResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientUpdateSourceControlResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientSyncFunctionsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStopSlotResponse` has been removed -- Field `WebAppsClientGetFunctionsAdminTokenResult` of struct `WebAppsClientGetFunctionsAdminTokenResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetFunctionsAdminTokenResponse` has been removed -- Field `WebAppsClientUpdateMetadataResult` of struct `WebAppsClientUpdateMetadataResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateMetadataResponse` has been removed -- Field `WebAppsClientAddPremierAddOnSlotResult` of struct `WebAppsClientAddPremierAddOnSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientAddPremierAddOnSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteContinuousWebJobResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceProcessDumpResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteBackupResponse` has been removed -- Field `WebAppsClientListInstanceProcessModulesSlotResult` of struct `WebAppsClientListInstanceProcessModulesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListInstanceProcessModulesSlotResponse` has been removed -- Field `WebAppsClientUpdateRelayServiceConnectionSlotResult` of struct `WebAppsClientUpdateRelayServiceConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateRelayServiceConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteInstanceProcessSlotResponse` has been removed -- Field `RecommendationsClientListHistoryForWebAppResult` of struct `RecommendationsClientListHistoryForWebAppResponse` has been removed -- Field `RawResponse` of struct `RecommendationsClientListHistoryForWebAppResponse` has been removed -- Field `WebAppsClientGetContinuousWebJobResult` of struct `WebAppsClientGetContinuousWebJobResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetContinuousWebJobResponse` has been removed -- Field `WebAppsClientGetProcessResult` of struct `WebAppsClientGetProcessResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetProcessResponse` has been removed -- Field `WebAppsClientListSnapshotsResult` of struct `WebAppsClientListSnapshotsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSnapshotsResponse` has been removed -- Field `WebAppsClientUpdateScmAllowedResult` of struct `WebAppsClientUpdateScmAllowedResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateScmAllowedResponse` has been removed -- Field `WebAppsClientListFunctionSecretsResult` of struct `WebAppsClientListFunctionSecretsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListFunctionSecretsResponse` has been removed -- Field `StaticSitesClientListStaticSiteCustomDomainsResult` of struct `StaticSitesClientListStaticSiteCustomDomainsResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientListStaticSiteCustomDomainsResponse` has been removed -- Field `WebAppsClientListBackupsResult` of struct `WebAppsClientListBackupsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListBackupsResponse` has been removed -- Field `GlobalClientGetDeletedWebAppSnapshotsResult` of struct `GlobalClientGetDeletedWebAppSnapshotsResponse` has been removed -- Field `RawResponse` of struct `GlobalClientGetDeletedWebAppSnapshotsResponse` has been removed -- Field `WebAppsClientCreateOrUpdateHostSecretSlotResult` of struct `WebAppsClientCreateOrUpdateHostSecretSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateHostSecretSlotResponse` has been removed -- Field `WebAppsClientUpdateDiagnosticLogsConfigSlotResult` of struct `WebAppsClientUpdateDiagnosticLogsConfigSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateDiagnosticLogsConfigSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResult` of struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse` has been removed -- Field `RawResponse` of struct `PlansClientDeleteResponse` has been removed -- Field `WebAppsClientGetAppSettingKeyVaultReferenceResult` of struct `WebAppsClientGetAppSettingKeyVaultReferenceResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetAppSettingKeyVaultReferenceResponse` has been removed -- Field `WebAppsClientListSitePushSettingsResult` of struct `WebAppsClientListSitePushSettingsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSitePushSettingsResponse` has been removed -- Field `EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResult` of struct `EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse` has been removed -- Field `WebAppsClientCreateOrUpdateHostNameBindingSlotResult` of struct `WebAppsClientCreateOrUpdateHostNameBindingSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateHostNameBindingSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetWebSiteContainerLogsResponse` has been removed -- Field `WebAppsClientGetSiteExtensionSlotResult` of struct `WebAppsClientGetSiteExtensionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetSiteExtensionSlotResponse` has been removed -- Field `ResourceHealthMetadataClientGetBySiteSlotResult` of struct `ResourceHealthMetadataClientGetBySiteSlotResponse` has been removed -- Field `RawResponse` of struct `ResourceHealthMetadataClientGetBySiteSlotResponse` has been removed -- Field `DiagnosticsClientGetSiteDiagnosticCategorySlotResult` of struct `DiagnosticsClientGetSiteDiagnosticCategorySlotResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientGetSiteDiagnosticCategorySlotResponse` has been removed -- Field `WebAppsClientListInstanceFunctionsSlotResult` of struct `WebAppsClientListInstanceFunctionsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListInstanceFunctionsSlotResponse` has been removed -- Field `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResult` of struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse` has been removed -- Field `CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResult` of struct `CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse` has been removed -- Field `PlansClientListHybridConnectionKeysResult` of struct `PlansClientListHybridConnectionKeysResponse` has been removed -- Field `RawResponse` of struct `PlansClientListHybridConnectionKeysResponse` has been removed -- Field `WebAppsClientGetInstanceMSDeployLogSlotResult` of struct `WebAppsClientGetInstanceMSDeployLogSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetInstanceMSDeployLogSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientRestoreFromDeletedAppSlotResponse` has been removed -- Field `WebAppsClientListSnapshotsFromDRSecondaryResult` of struct `WebAppsClientListSnapshotsFromDRSecondaryResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSnapshotsFromDRSecondaryResponse` has been removed -- Field `WebAppsClientCreateDeploymentSlotResult` of struct `WebAppsClientCreateDeploymentSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateDeploymentSlotResponse` has been removed -- Field `CertificatesClientGetResult` of struct `CertificatesClientGetResponse` has been removed -- Field `RawResponse` of struct `CertificatesClientGetResponse` has been removed -- Field `StaticSitesClientGetStaticSitesByResourceGroupResult` of struct `StaticSitesClientGetStaticSitesByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetStaticSitesByResourceGroupResponse` has been removed -- Field `CertificateOrdersClientUpdateResult` of struct `CertificateOrdersClientUpdateResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientUpdateResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientSyncRepositoryResponse` has been removed -- Field `DiagnosticsClientGetSiteDetectorResponseResult` of struct `DiagnosticsClientGetSiteDetectorResponseResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientGetSiteDetectorResponseResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeletePublicCertificateResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientResendRequestEmailsResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteSwiftVirtualNetworkSlotResponse` has been removed -- Field `DiagnosticsClientListSiteAnalysesSlotResult` of struct `DiagnosticsClientListSiteAnalysesSlotResponse` has been removed -- Field `RawResponse` of struct `DiagnosticsClientListSiteAnalysesSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSyncStatusResponse` has been removed -- Field `WebAppsClientGetRelayServiceConnectionSlotResult` of struct `WebAppsClientGetRelayServiceConnectionSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetRelayServiceConnectionSlotResponse` has been removed -- Field `WebAppsClientGetResult` of struct `WebAppsClientGetResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetResponse` has been removed -- Field `WebAppsClientGetPrivateEndpointConnectionListResult` of struct `WebAppsClientGetPrivateEndpointConnectionListResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPrivateEndpointConnectionListResponse` has been removed -- Field `ContainerAppsRevisionsClientGetRevisionResult` of struct `ContainerAppsRevisionsClientGetRevisionResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsRevisionsClientGetRevisionResponse` has been removed -- Field `CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResult` of struct `CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse` has been removed -- Field `WebAppsClientGetBackupStatusSlotResult` of struct `WebAppsClientGetBackupStatusSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetBackupStatusSlotResponse` has been removed -- Field `WebAppsClientUpdateVnetConnectionGatewayResult` of struct `WebAppsClientUpdateVnetConnectionGatewayResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientUpdateVnetConnectionGatewayResponse` has been removed -- Field `WebAppsClientCreateOrUpdateConfigurationResult` of struct `WebAppsClientCreateOrUpdateConfigurationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateConfigurationResponse` has been removed -- Field `DomainsClientGetOwnershipIdentifierResult` of struct `DomainsClientGetOwnershipIdentifierResponse` has been removed -- Field `RawResponse` of struct `DomainsClientGetOwnershipIdentifierResponse` has been removed -- Field `WebAppsClientListSnapshotsSlotResult` of struct `WebAppsClientListSnapshotsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListSnapshotsSlotResponse` has been removed -- Field `StaticSitesClientGetStaticSiteBuildResult` of struct `StaticSitesClientGetStaticSiteBuildResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientGetStaticSiteBuildResponse` has been removed -- Field `CertificateOrdersClientCreateOrUpdateResult` of struct `CertificateOrdersClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ContainerAppsClientDeleteResponse` has been removed -- Field `WebAppsClientGetVnetConnectionGatewaySlotResult` of struct `WebAppsClientGetVnetConnectionGatewaySlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetVnetConnectionGatewaySlotResponse` has been removed -- Field `WebSiteManagementClientListSourceControlsResult` of struct `WebSiteManagementClientListSourceControlsResponse` has been removed -- Field `RawResponse` of struct `WebSiteManagementClientListSourceControlsResponse` has been removed -- Field `WebAppsClientGetPrivateEndpointConnectionResult` of struct `WebAppsClientGetPrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPrivateEndpointConnectionResponse` has been removed -- Field `RawResponse` of struct `StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse` has been removed -- Field `WebAppsClientStartNetworkTraceResult` of struct `WebAppsClientStartNetworkTraceResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStartNetworkTraceResponse` has been removed -- Field `EnvironmentsClientUpdateAseNetworkingConfigurationResult` of struct `EnvironmentsClientUpdateAseNetworkingConfigurationResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientUpdateAseNetworkingConfigurationResponse` has been removed -- Field `WebAppsClientGetNetworkTraceOperationSlotV2Result` of struct `WebAppsClientGetNetworkTraceOperationSlotV2Response` has been removed -- Field `RawResponse` of struct `WebAppsClientGetNetworkTraceOperationSlotV2Response` has been removed -- Field `WebAppsClientListConfigurationsSlotResult` of struct `WebAppsClientListConfigurationsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListConfigurationsSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteResponse` has been removed -- Field `WebAppsClientGetPremierAddOnSlotResult` of struct `WebAppsClientGetPremierAddOnSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetPremierAddOnSlotResponse` has been removed -- Field `WebAppsClientGetWebJobResult` of struct `WebAppsClientGetWebJobResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetWebJobResponse` has been removed -- Field `RawResponse` of struct `CertificateOrdersClientVerifyDomainOwnershipResponse` has been removed -- Field `WebAppsClientListConfigurationSnapshotInfoSlotResult` of struct `WebAppsClientListConfigurationSnapshotInfoSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientListConfigurationSnapshotInfoSlotResponse` has been removed -- Field `WebAppsClientCreateOrUpdateSlotResult` of struct `WebAppsClientCreateOrUpdateSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientCreateOrUpdateSlotResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientStopWebSiteNetworkTraceResponse` has been removed -- Field `WebAppsClientGetBackupConfigurationResult` of struct `WebAppsClientGetBackupConfigurationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientGetBackupConfigurationResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteTriggeredWebJobResponse` has been removed -- Field `RawResponse` of struct `WebAppsClientDeleteProcessResponse` has been removed -- Field `RawResponse` of struct `EnvironmentsClientDeleteResponse` has been removed - -### Features Added - -- New function `*WebAppsClientDeletePrivateEndpointConnectionSlotResponse.UnmarshalJSON([]byte) error` -- New function `*WebAppsClientStartNetworkTraceSlotResponse.UnmarshalJSON([]byte) error` -- New function `*WebAppsClientStartNetworkTraceResponse.UnmarshalJSON([]byte) error` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationResponse.UnmarshalJSON([]byte) error` -- New function `DefaultErrorResponseError.MarshalJSON() ([]byte, error)` -- New function `*StaticSitesClientDeletePrivateEndpointConnectionResponse.UnmarshalJSON([]byte) error` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse.UnmarshalJSON([]byte) error` -- New function `*WebAppsClientDeletePrivateEndpointConnectionResponse.UnmarshalJSON([]byte) error` -- New function `*EnvironmentsClientDeletePrivateEndpointConnectionResponse.UnmarshalJSON([]byte) error` -- New function `*WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot(context.Context, string, string, string, *WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions) (WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse, error)` -- New struct `DefaultErrorResponse` -- New struct `DefaultErrorResponseError` -- New struct `DefaultErrorResponseErrorDetailsItem` -- New struct `GithubToken` -- New struct `GithubTokenRequest` -- New struct `WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions` -- New struct `WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse` -- New anonymous field `SiteConfigResource` in struct `WebAppsClientGetConfigurationSnapshotResponse` -- New anonymous field `PrivateLinkResourcesWrapper` in struct `WebAppsClientGetPrivateLinkResourcesResponse` -- New anonymous field `SnapshotCollection` in struct `WebAppsClientListSnapshotsResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginStartNetworkTraceSlotOptions` -- New anonymous field `DeploymentCollection` in struct `WebAppsClientListDeploymentsResponse` -- New anonymous field `StaticSiteCustomDomainOverviewARMResource` in struct `StaticSitesClientGetStaticSiteCustomDomainResponse` -- New anonymous field `ContainerAppCollection` in struct `ContainerAppsClientListBySubscriptionResponse` -- New anonymous field `ProcessThreadInfoCollection` in struct `WebAppsClientListProcessThreadsResponse` -- New anonymous field `CertificateOrderCollection` in struct `CertificateOrdersClientListResponse` -- New anonymous field `APIKVReferenceCollection` in struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse` -- New field `ResumeToken` in struct `EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions` -- New anonymous field `SiteConfigResource` in struct `WebAppsClientUpdateConfigurationResponse` -- New anonymous field `StringDictionary` in struct `WebAppsClientListMetadataResponse` -- New anonymous field `Site` in struct `WebAppsClientUpdateSlotResponse` -- New anonymous field `MigrateMySQLStatus` in struct `WebAppsClientGetMigrateMySQLStatusSlotResponse` -- New anonymous field `ProcessInfoCollection` in struct `WebAppsClientListProcessesResponse` -- New field `NetworkTraceArray` in struct `WebAppsClientGetNetworkTraceOperationSlotV2Response` -- New anonymous field `ProcessThreadInfoCollection` in struct `WebAppsClientListInstanceProcessThreadsSlotResponse` -- New anonymous field `SitePhpErrorLogFlag` in struct `WebAppsClientGetSitePhpErrorLogFlagSlotResponse` -- New anonymous field `SiteAuthSettingsV2` in struct `WebAppsClientGetAuthSettingsV2WithoutSecretsResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions` -- New field `ResumeToken` in struct `WebAppsClientBeginSwapSlotWithProductionOptions` -- New field `NetworkTraceArray` in struct `WebAppsClientGetNetworkTraceOperationV2Response` -- New anonymous field `StaticSiteBuildARMResource` in struct `StaticSitesClientGetStaticSiteBuildResponse` -- New anonymous field `DetectorResponse` in struct `DiagnosticsClientGetSiteDetectorResponseResponse` -- New anonymous field `Identifier` in struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse` -- New field `ResumeToken` in struct `EnvironmentsClientBeginChangeVnetOptions` -- New anonymous field `RelayServiceConnectionEntity` in struct `WebAppsClientGetRelayServiceConnectionResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions` -- New anonymous field `RemotePrivateEndpointConnectionARMResource` in struct `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse` -- New anonymous field `WebSiteInstanceStatus` in struct `WebAppsClientGetInstanceInfoSlotResponse` -- New anonymous field `WebAppStackCollection` in struct `ProviderClientGetWebAppStacksResponse` -- New field `VnetRouteArray` in struct `PlansClientGetRouteForVnetResponse` -- New anonymous field `RecommendationRule` in struct `RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse` -- New anonymous field `StaticSiteUserProvidedFunctionAppARMResource` in struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse` -- New anonymous field `RecommendationRule` in struct `RecommendationsClientGetRuleDetailsByWebAppResponse` -- New anonymous field `HybridConnection` in struct `WebAppsClientGetHybridConnectionResponse` -- New anonymous field `MSDeployStatus` in struct `WebAppsClientGetInstanceMsDeployStatusResponse` -- New anonymous field `HostNameBinding` in struct `WebAppsClientGetHostNameBindingSlotResponse` -- New anonymous field `ContinuousWebJob` in struct `WebAppsClientGetContinuousWebJobSlotResponse` -- New anonymous field `IdentifierCollection` in struct `WebAppsClientListDomainOwnershipIdentifiersResponse` -- New field `Value` in struct `WebAppsClientStartWebSiteNetworkTraceSlotResponse` -- New anonymous field `RecommendationCollection` in struct `RecommendationsClientListRecommendedRulesForWebAppResponse` -- New anonymous field `AppCertificateCollection` in struct `CertificatesClientListByResourceGroupResponse` -- New anonymous field `SlotDifferenceCollection` in struct `WebAppsClientListSlotDifferencesFromProductionResponse` -- New anonymous field `BillingMeterCollection` in struct `WebSiteManagementClientListBillingMetersResponse` -- New anonymous field `NetworkFeatures` in struct `WebAppsClientListNetworkFeaturesSlotResponse` -- New anonymous field `EnvironmentCollection` in struct `EnvironmentsClientListResponse` -- New anonymous field `ResourceHealthMetadataCollection` in struct `ResourceHealthMetadataClientListBySiteResponse` -- New anonymous field `StaticSiteUserProvidedFunctionAppsCollection` in struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse` -- New anonymous field `KeyInfo` in struct `WebAppsClientCreateOrUpdateFunctionSecretResponse` -- New anonymous field `MSDeployStatus` in struct `WebAppsClientCreateInstanceMSDeployOperationSlotResponse` -- New anonymous field `SiteAuthSettings` in struct `WebAppsClientUpdateAuthSettingsSlotResponse` -- New anonymous field `KubeEnvironment` in struct `KubeEnvironmentsClientUpdateResponse` -- New anonymous field `FunctionSecrets` in struct `WebAppsClientListSyncFunctionTriggersSlotResponse` -- New anonymous field `VnetInfoResource` in struct `WebAppsClientCreateOrUpdateVnetConnectionResponse` -- New anonymous field `ProcessThreadInfoCollection` in struct `WebAppsClientListProcessThreadsSlotResponse` -- New anonymous field `WorkerPoolResource` in struct `EnvironmentsClientUpdateMultiRolePoolResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginRestoreSlotOptions` -- New anonymous field `BackupItemCollection` in struct `WebAppsClientListBackupsSlotResponse` -- New anonymous field `WebJobCollection` in struct `WebAppsClientListWebJobsResponse` -- New anonymous field `HostNameBinding` in struct `WebAppsClientGetHostNameBindingResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginCreateInstanceMSDeployOperationOptions` -- New anonymous field `AppCertificateCollection` in struct `CertificatesClientListResponse` -- New anonymous field `APIKVReferenceCollection` in struct `WebAppsClientGetAppSettingsKeyVaultReferencesResponse` -- New anonymous field `RemotePrivateEndpointConnectionARMResource` in struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse` -- New anonymous field `WorkerPoolResource` in struct `EnvironmentsClientUpdateWorkerPoolResponse` -- New field `VnetInfoResourceArray` in struct `WebAppsClientListVnetConnectionsResponse` -- New anonymous field `Identifier` in struct `WebAppsClientUpdateDomainOwnershipIdentifierResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginCreateMSDeployOperationOptions` -- New anonymous field `PublicCertificateCollection` in struct `WebAppsClientListPublicCertificatesResponse` -- New anonymous field `DomainOwnershipIdentifierCollection` in struct `DomainsClientListOwnershipIdentifiersResponse` -- New anonymous field `TopLevelDomain` in struct `TopLevelDomainsClientGetResponse` -- New anonymous field `StringDictionary` in struct `WebAppsClientListMetadataSlotResponse` -- New field `Interface` in struct `WebAppsClientCreateOneDeployOperationResponse` -- New anonymous field `StringDictionary` in struct `WebAppsClientUpdateApplicationSettingsResponse` -- New anonymous field `AzureStoragePropertyDictionaryResource` in struct `WebAppsClientUpdateAzureStorageAccountsResponse` -- New anonymous field `StringDictionary` in struct `StaticSitesClientListStaticSiteFunctionAppSettingsResponse` -- New anonymous field `SlotConfigNamesResource` in struct `WebAppsClientUpdateSlotConfigurationNamesResponse` -- New anonymous field `KubeEnvironment` in struct `KubeEnvironmentsClientGetResponse` -- New anonymous field `WebAppCollection` in struct `EnvironmentsClientResumeResponse` -- New anonymous field `DetectorResponse` in struct `DiagnosticsClientGetSiteDetectorResponseSlotResponse` -- New anonymous field `VnetGateway` in struct `WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse` -- New anonymous field `Site` in struct `WebAppsClientGetResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginListPublishingCredentialsOptions` -- New anonymous field `CertificateOrderCollection` in struct `CertificateOrdersClientListByResourceGroupResponse` -- New anonymous field `TriggeredJobHistoryCollection` in struct `WebAppsClientListTriggeredWebJobHistoryResponse` -- New anonymous field `DetectorResponseCollection` in struct `DiagnosticsClientListSiteDetectorResponsesSlotResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions` -- New anonymous field `RecommendationCollection` in struct `RecommendationsClientListResponse` -- New anonymous field `StringDictionary` in struct `WebAppsClientListFunctionKeysResponse` -- New field `Interface` in struct `EnvironmentsClientDeletePrivateEndpointConnectionResponse` -- New anonymous field `AzureStoragePropertyDictionaryResource` in struct `WebAppsClientUpdateAzureStorageAccountsSlotResponse` -- New anonymous field `SourceControl` in struct `WebSiteManagementClientUpdateSourceControlResponse` -- New anonymous field `StringDictionary` in struct `WebAppsClientListApplicationSettingsSlotResponse` -- New anonymous field `WebJob` in struct `WebAppsClientGetWebJobResponse` -- New field `ResumeToken` in struct `EnvironmentsClientBeginDeleteOptions` -- New anonymous field `PublicCertificate` in struct `WebAppsClientCreateOrUpdatePublicCertificateSlotResponse` -- New anonymous field `CsmPublishingCredentialsPoliciesEntity` in struct `WebAppsClientGetFtpAllowedSlotResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginCreateOrUpdateSlotOptions` -- New anonymous field `PlanCollection` in struct `PlansClientListResponse` -- New anonymous field `FunctionSecrets` in struct `WebAppsClientListFunctionSecretsResponse` -- New anonymous field `PrivateAccess` in struct `WebAppsClientGetPrivateAccessSlotResponse` -- New anonymous field `PremierAddOn` in struct `WebAppsClientUpdatePremierAddOnSlotResponse` -- New anonymous field `SiteConfigResource` in struct `WebAppsClientGetConfigurationResponse` -- New anonymous field `UsageCollection` in struct `EnvironmentsClientListMultiRoleUsagesResponse` -- New anonymous field `Deployment` in struct `WebAppsClientListDeploymentLogResponse` -- New anonymous field `DetectorDefinitionResource` in struct `DiagnosticsClientGetSiteDetectorSlotResponse` -- New anonymous field `APIKVReference` in struct `WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse` -- New anonymous field `PrivateLinkResourcesWrapper` in struct `EnvironmentsClientGetPrivateLinkResourcesResponse` -- New field `Body` in struct `WebAppsClientGetWebSiteContainerLogsSlotResponse` -- New anonymous field `VnetInfoResource` in struct `WebAppsClientGetVnetConnectionResponse` -- New anonymous field `ProcessInfoCollection` in struct `WebAppsClientListInstanceProcessesResponse` -- New anonymous field `DomainOwnershipIdentifier` in struct `DomainsClientCreateOrUpdateOwnershipIdentifierResponse` -- New anonymous field `VnetInfoResource` in struct `WebAppsClientUpdateVnetConnectionResponse` -- New anonymous field `SiteExtensionInfo` in struct `WebAppsClientGetSiteExtensionSlotResponse` -- New anonymous field `APIKVReference` in struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse` -- New anonymous field `MSDeployStatus` in struct `WebAppsClientCreateInstanceMSDeployOperationResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginStartNetworkTraceOptions` -- New field `ResumeToken` in struct `StaticSitesClientBeginDeletePrivateEndpointConnectionOptions` -- New anonymous field `BackupItem` in struct `WebAppsClientGetBackupStatusSlotResponse` -- New anonymous field `SiteSeal` in struct `CertificateOrdersClientRetrieveSiteSealResponse` -- New anonymous field `HybridConnectionCollection` in struct `PlansClientListHybridConnectionsResponse` -- New anonymous field `Deployment` in struct `WebAppsClientCreateDeploymentSlotResponse` -- New anonymous field `RecommendationCollection` in struct `RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse` -- New anonymous field `ContinuousWebJob` in struct `WebAppsClientGetContinuousWebJobResponse` -- New anonymous field `Revision` in struct `ContainerAppsRevisionsClientGetRevisionResponse` -- New anonymous field `User` in struct `WebSiteManagementClientGetPublishingUserResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginRestoreFromBackupBlobOptions` -- New field `ResumeToken` in struct `WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions` -- New anonymous field `Identifier` in struct `WebAppsClientGetDomainOwnershipIdentifierResponse` -- New anonymous field `DeletedSite` in struct `GlobalClientGetDeletedWebAppResponse` -- New anonymous field `SiteSourceControl` in struct `WebAppsClientUpdateSourceControlSlotResponse` -- New anonymous field `SlotDifferenceCollection` in struct `WebAppsClientListSlotDifferencesSlotResponse` -- New anonymous field `VnetInfoResource` in struct `WebAppsClientCreateOrUpdateVnetConnectionSlotResponse` -- New anonymous field `ResourceMetricDefinitionCollection` in struct `EnvironmentsClientListWebWorkerMetricDefinitionsResponse` -- New anonymous field `Deployment` in struct `WebAppsClientCreateDeploymentResponse` -- New field `CertificateOrderActionArray` in struct `CertificateOrdersClientRetrieveCertificateActionsResponse` -- New anonymous field `StaticSiteFunctionOverviewCollection` in struct `StaticSitesClientListStaticSiteFunctionsResponse` -- New field `ResumeToken` in struct `EnvironmentsClientBeginCreateOrUpdateOptions` -- New anonymous field `NameIdentifierCollection` in struct `DomainsClientListRecommendationsResponse` -- New anonymous field `SiteAuthSettingsV2` in struct `WebAppsClientUpdateAuthSettingsV2SlotResponse` -- New anonymous field `DiagnosticAnalysis` in struct `DiagnosticsClientExecuteSiteAnalysisSlotResponse` -- New anonymous field `DetectorResponseCollection` in struct `DiagnosticsClientListSiteDetectorResponsesResponse` -- New field `Body` in struct `WebAppsClientListPublishingProfileXMLWithSecretsResponse` -- New field `Interface` in struct `WebAppsClientGetOneDeployStatusResponse` -- New anonymous field `SiteSourceControl` in struct `WebAppsClientGetSourceControlSlotResponse` -- New anonymous field `MigrateMySQLStatus` in struct `WebAppsClientGetMigrateMySQLStatusResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions` -- New field `ResumeToken` in struct `DomainsClientBeginCreateOrUpdateOptions` -- New anonymous field `ContainerApp` in struct `ContainerAppsClientGetResponse` -- New anonymous field `RestoreRequest` in struct `WebAppsClientDiscoverBackupResponse` -- New anonymous field `StringDictionary` in struct `StaticSitesClientListStaticSiteSecretsResponse` -- New anonymous field `VnetInfoResource` in struct `WebAppsClientGetVnetConnectionSlotResponse` -- New anonymous field `GeoRegionCollection` in struct `WebSiteManagementClientListGeoRegionsResponse` -- New anonymous field `StringList` in struct `StaticSitesClientListStaticSiteConfiguredRolesResponse` -- New anonymous field `DiagnosticDetectorCollection` in struct `DiagnosticsClientListSiteDetectorsResponse` -- New anonymous field `SourceControlCollection` in struct `WebSiteManagementClientListSourceControlsResponse` -- New anonymous field `WebSiteInstanceStatus` in struct `WebAppsClientGetInstanceInfoResponse` -- New anonymous field `ConnectionStringDictionary` in struct `WebAppsClientListConnectionStringsResponse` -- New anonymous field `HybridConnection` in struct `WebAppsClientCreateOrUpdateHybridConnectionResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions` -- New field `Interface` in struct `StaticSitesClientDeletePrivateEndpointConnectionResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions` -- New anonymous field `CsmPublishingCredentialsPoliciesEntity` in struct `WebAppsClientUpdateScmAllowedSlotResponse` -- New anonymous field `AppCertificate` in struct `CertificatesClientUpdateResponse` -- New anonymous field `PrivateLinkResourcesWrapper` in struct `WebAppsClientGetPrivateLinkResourcesSlotResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions` -- New anonymous field `TriggeredWebJob` in struct `WebAppsClientGetTriggeredWebJobSlotResponse` -- New anonymous field `PlanCollection` in struct `EnvironmentsClientListAppServicePlansResponse` -- New anonymous field `BackupRequest` in struct `WebAppsClientUpdateBackupConfigurationSlotResponse` -- New anonymous field `PremierAddOn` in struct `WebAppsClientAddPremierAddOnResponse` -- New anonymous field `RelayServiceConnectionEntity` in struct `WebAppsClientCreateOrUpdateRelayServiceConnectionResponse` -- New anonymous field `SiteConfigurationSnapshotInfoCollection` in struct `WebAppsClientListConfigurationSnapshotInfoSlotResponse` -- New anonymous field `SiteCloneability` in struct `WebAppsClientIsCloneableResponse` -- New anonymous field `SiteAuthSettings` in struct `WebAppsClientGetAuthSettingsResponse` -- New anonymous field `SKUInfoCollection` in struct `EnvironmentsClientListMultiRolePoolSKUsResponse` -- New anonymous field `VnetValidationFailureDetails` in struct `WebSiteManagementClientVerifyHostingEnvironmentVnetResponse` -- New anonymous field `StaticSiteCollection` in struct `StaticSitesClientListResponse` -- New field `ResumeToken` in struct `EnvironmentsClientBeginSuspendOptions` -- New anonymous field `SiteConfigResource` in struct `WebAppsClientGetConfigurationSnapshotSlotResponse` -- New anonymous field `Deployment` in struct `WebAppsClientGetDeploymentResponse` -- New anonymous field `Domain` in struct `DomainsClientTransferOutResponse` -- New anonymous field `PublishingCredentialsPoliciesCollection` in struct `WebAppsClientListBasicPublishingCredentialsPoliciesResponse` -- New anonymous field `AseV3NetworkingConfiguration` in struct `EnvironmentsClientUpdateAseNetworkingConfigurationResponse` -- New field `OperationArray` in struct `EnvironmentsClientListOperationsResponse` -- New anonymous field `BackupRequest` in struct `WebAppsClientUpdateBackupConfigurationResponse` -- New anonymous field `PremierAddOnOfferCollection` in struct `WebSiteManagementClientListPremierAddOnOffersResponse` -- New anonymous field `HybridConnection` in struct `WebAppsClientCreateOrUpdateHybridConnectionSlotResponse` -- New anonymous field `IdentifierCollection` in struct `WebAppsClientListDomainOwnershipIdentifiersSlotResponse` -- New anonymous field `StampCapacityCollection` in struct `EnvironmentsClientListCapacitiesResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginMigrateStorageOptions` -- New anonymous field `ResourceHealthMetadata` in struct `ResourceHealthMetadataClientGetBySiteSlotResponse` -- New anonymous field `HybridConnection` in struct `WebAppsClientListHybridConnectionsResponse` -- New anonymous field `DiagnosticCategoryCollection` in struct `DiagnosticsClientListSiteDiagnosticCategoriesResponse` -- New anonymous field `CertificateResource` in struct `CertificateOrdersClientCreateOrUpdateCertificateResponse` -- New anonymous field `DeletedWebAppCollection` in struct `DeletedWebAppsClientListResponse` -- New anonymous field `DomainAvailabilityCheckResult` in struct `DomainsClientCheckAvailabilityResponse` -- New anonymous field `WebAppCollection` in struct `WebAppsClientListSlotsResponse` -- New anonymous field `HybridConnection` in struct `WebAppsClientUpdateHybridConnectionSlotResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginListPublishingCredentialsSlotOptions` -- New field `ResumeToken` in struct `WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions` -- New anonymous field `AddressResponse` in struct `EnvironmentsClientGetVipInfoResponse` -- New anonymous field `SiteAuthSettings` in struct `WebAppsClientGetAuthSettingsSlotResponse` -- New anonymous field `ResourceHealthMetadataCollection` in struct `ResourceHealthMetadataClientListResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginCreateFunctionOptions` -- New field `ResumeToken` in struct `WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions` -- New anonymous field `SiteExtensionInfo` in struct `WebAppsClientInstallSiteExtensionResponse` -- New anonymous field `SwiftVirtualNetwork` in struct `WebAppsClientGetSwiftVirtualNetworkConnectionResponse` -- New anonymous field `BackupItemCollection` in struct `WebAppsClientListSiteBackupsSlotResponse` -- New anonymous field `SwiftVirtualNetwork` in struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse` -- New anonymous field `PushSettings` in struct `WebAppsClientUpdateSitePushSettingsResponse` -- New field `Body` in struct `WebAppsClientGetProcessDumpSlotResponse` -- New field `NetworkTraceArray` in struct `WebAppsClientGetNetworkTraceOperationResponse` -- New field `Body` in struct `WebAppsClientGetInstanceProcessDumpSlotResponse` -- New anonymous field `APIKVReference` in struct `WebAppsClientGetAppSettingKeyVaultReferenceResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginRestoreSnapshotSlotOptions` -- New anonymous field `PublicCertificateCollection` in struct `WebAppsClientListPublicCertificatesSlotResponse` -- New anonymous field `CsmPublishingCredentialsPoliciesEntity` in struct `WebAppsClientUpdateScmAllowedResponse` -- New anonymous field `PrivateAccess` in struct `WebAppsClientPutPrivateAccessVnetResponse` -- New anonymous field `CsmPublishingCredentialsPoliciesEntity` in struct `WebAppsClientGetScmAllowedSlotResponse` -- New anonymous field `RemotePrivateEndpointConnectionARMResource` in struct `WebAppsClientGetPrivateEndpointConnectionResponse` -- New anonymous field `StringDictionary` in struct `WebAppsClientUpdateMetadataSlotResponse` -- New anonymous field `SiteExtensionInfoCollection` in struct `WebAppsClientListSiteExtensionsSlotResponse` -- New field `Interface` in struct `WebAppsClientDeletePrivateEndpointConnectionResponse` -- New anonymous field `APIKVReferenceCollection` in struct `WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse` -- New anonymous field `User` in struct `WebAppsClientListPublishingCredentialsSlotResponse` -- New anonymous field `FunctionSecrets` in struct `WebAppsClientListSyncFunctionTriggersResponse` -- New anonymous field `PrivateAccess` in struct `WebAppsClientGetPrivateAccessResponse` -- New field `Body` in struct `WebAppsClientGetProcessDumpResponse` -- New anonymous field `DetectorDefinitionResource` in struct `DiagnosticsClientGetSiteDetectorResponse` -- New anonymous field `ProcessModuleInfoCollection` in struct `WebAppsClientListProcessModulesSlotResponse` -- New anonymous field `ResourceHealthMetadataCollection` in struct `ResourceHealthMetadataClientListByResourceGroupResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions` -- New anonymous field `SiteConfigResource` in struct `WebAppsClientCreateOrUpdateConfigurationSlotResponse` -- New anonymous field `PremierAddOn` in struct `WebAppsClientListPremierAddOnsResponse` -- New anonymous field `WorkerPoolCollection` in struct `EnvironmentsClientListMultiRolePoolsResponse` -- New field `SnapshotArray` in struct `GlobalClientGetDeletedWebAppSnapshotsResponse` -- New anonymous field `ResourceNameAvailability` in struct `WebSiteManagementClientCheckNameAvailabilityResponse` -- New anonymous field `SnapshotCollection` in struct `WebAppsClientListSnapshotsFromDRSecondarySlotResponse` -- New anonymous field `CsmPublishingCredentialsPoliciesEntity` in struct `WebAppsClientGetScmAllowedResponse` -- New anonymous field `ResourceCollection` in struct `PlansClientListWebAppsByHybridConnectionResponse` -- New anonymous field `ProcessInfo` in struct `WebAppsClientGetProcessSlotResponse` -- New anonymous field `AzureStoragePropertyDictionaryResource` in struct `WebAppsClientListAzureStorageAccountsSlotResponse` -- New anonymous field `BackupItem` in struct `WebAppsClientGetBackupStatusResponse` -- New anonymous field `PublicCertificate` in struct `WebAppsClientCreateOrUpdatePublicCertificateResponse` -- New anonymous field `StorageMigrationResponse` in struct `WebAppsClientMigrateStorageResponse` -- New anonymous field `HostingEnvironmentDiagnostics` in struct `EnvironmentsClientGetDiagnosticsItemResponse` -- New anonymous field `CsmPublishingCredentialsPoliciesEntity` in struct `WebAppsClientUpdateFtpAllowedResponse` -- New anonymous field `CertificateOrder` in struct `CertificateOrdersClientUpdateResponse` -- New anonymous field `SiteAuthSettings` in struct `WebAppsClientUpdateAuthSettingsResponse` -- New field `Value` in struct `WebAppsClientStartWebSiteNetworkTraceResponse` -- New anonymous field `HybridConnectionLimits` in struct `PlansClientGetHybridConnectionPlanLimitResponse` -- New anonymous field `WebJob` in struct `WebAppsClientGetWebJobSlotResponse` -- New anonymous field `StaticSiteARMResource` in struct `StaticSitesClientCreateOrUpdateStaticSiteResponse` -- New anonymous field `ProcessModuleInfo` in struct `WebAppsClientGetInstanceProcessModuleResponse` -- New anonymous field `OutboundEnvironmentEndpointCollection` in struct `EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse` -- New anonymous field `HybridConnectionKey` in struct `PlansClientListHybridConnectionKeysResponse` -- New anonymous field `StaticSiteUserCollection` in struct `StaticSitesClientListStaticSiteUsersResponse` -- New anonymous field `EnvironmentResource` in struct `EnvironmentsClientCreateOrUpdateResponse` -- New anonymous field `KubeEnvironmentCollection` in struct `KubeEnvironmentsClientListBySubscriptionResponse` -- New anonymous field `ProcessInfoCollection` in struct `WebAppsClientListInstanceProcessesSlotResponse` -- New anonymous field `MSDeployStatus` in struct `WebAppsClientCreateMSDeployOperationResponse` -- New anonymous field `RelayServiceConnectionEntity` in struct `WebAppsClientListRelayServiceConnectionsSlotResponse` -- New anonymous field `DetectorResponse` in struct `CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse` -- New anonymous field `CertificateResource` in struct `CertificateOrdersClientGetCertificateResponse` -- New anonymous field `CsmPublishingCredentialsPoliciesEntity` in struct `WebAppsClientGetFtpAllowedResponse` -- New field `ResumeToken` in struct `EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions` -- New anonymous field `SiteSourceControl` in struct `WebAppsClientUpdateSourceControlResponse` -- New anonymous field `RecommendationCollection` in struct `RecommendationsClientListHistoryForHostingEnvironmentResponse` -- New anonymous field `CsmUsageQuotaCollection` in struct `PlansClientListUsagesResponse` -- New anonymous field `Deployment` in struct `WebAppsClientListDeploymentLogSlotResponse` -- New anonymous field `DeploymentLocations` in struct `WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse` -- New anonymous field `RelayServiceConnectionEntity` in struct `WebAppsClientListRelayServiceConnectionsResponse` -- New anonymous field `SwiftVirtualNetwork` in struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse` -- New anonymous field `MSDeployLog` in struct `WebAppsClientGetMSDeployLogSlotResponse` -- New anonymous field `SKUInfos` in struct `WebSiteManagementClientListSKUsResponse` -- New anonymous field `ProcessModuleInfoCollection` in struct `WebAppsClientListInstanceProcessModulesResponse` -- New anonymous field `WebAppCollection` in struct `WebAppsClientListByResourceGroupResponse` -- New anonymous field `ApplicationStackCollection` in struct `ProviderClientGetAvailableStacksOnPremResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginCreateOrUpdateOptions` -- New anonymous field `VnetRoute` in struct `PlansClientCreateOrUpdateVnetRouteResponse` -- New anonymous field `BackupItem` in struct `WebAppsClientListBackupStatusSecretsResponse` -- New anonymous field `Deployment` in struct `WebAppsClientGetDeploymentSlotResponse` -- New anonymous field `VnetInfoResource` in struct `WebAppsClientUpdateVnetConnectionSlotResponse` -- New field `NetworkTraceArray` in struct `WebAppsClientStartNetworkTraceResponse` -- New anonymous field `CsmUsageQuotaCollection` in struct `WebAppsClientListUsagesResponse` -- New anonymous field `SiteAuthSettingsV2` in struct `WebAppsClientGetAuthSettingsV2Response` -- New field `Body` in struct `WebAppsClientGetInstanceProcessDumpResponse` -- New anonymous field `Identifier` in struct `WebAppsClientGetDomainOwnershipIdentifierSlotResponse` -- New anonymous field `NetworkFeatures` in struct `WebAppsClientListNetworkFeaturesResponse` -- New anonymous field `PublicCertificate` in struct `WebAppsClientGetPublicCertificateResponse` -- New field `Body` in struct `WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse` -- New anonymous field `DiagnosticAnalysisCollection` in struct `DiagnosticsClientListSiteAnalysesResponse` -- New anonymous field `TriggeredJobHistoryCollection` in struct `WebAppsClientListTriggeredWebJobHistorySlotResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginInstallSiteExtensionOptions` -- New field `ResumeToken` in struct `StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions` -- New anonymous field `SiteExtensionInfoCollection` in struct `WebAppsClientListSiteExtensionsResponse` -- New anonymous field `DiagnosticCategoryCollection` in struct `DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse` -- New anonymous field `ProcessModuleInfoCollection` in struct `WebAppsClientListInstanceProcessModulesSlotResponse` -- New field `ResumeToken` in struct `KubeEnvironmentsClientBeginCreateOrUpdateOptions` -- New anonymous field `HostNameBinding` in struct `WebAppsClientCreateOrUpdateHostNameBindingSlotResponse` -- New anonymous field `KeyInfo` in struct `WebAppsClientCreateOrUpdateHostSecretSlotResponse` -- New field `NetworkTraceArray` in struct `WebAppsClientGetNetworkTracesSlotV2Response` -- New anonymous field `SiteConfigResourceCollection` in struct `WebAppsClientListConfigurationsResponse` -- New anonymous field `ProcessInfo` in struct `WebAppsClientGetInstanceProcessSlotResponse` -- New anonymous field `CsmPublishingCredentialsPoliciesEntity` in struct `WebAppsClientUpdateFtpAllowedSlotResponse` -- New anonymous field `SnapshotCollection` in struct `WebAppsClientListSnapshotsSlotResponse` -- New anonymous field `ContinuousWebJobCollection` in struct `WebAppsClientListContinuousWebJobsResponse` -- New anonymous field `MSDeployStatus` in struct `WebAppsClientGetInstanceMsDeployStatusSlotResponse` -- New anonymous field `VnetGateway` in struct `PlansClientGetVnetGatewayResponse` -- New anonymous field `ValidateResponse` in struct `WebSiteManagementClientValidateResponse` -- New anonymous field `StaticSiteUserProvidedFunctionAppARMResource` in struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse` -- New anonymous field `SiteExtensionInfo` in struct `WebAppsClientGetSiteExtensionResponse` -- New anonymous field `SiteSourceControl` in struct `WebAppsClientCreateOrUpdateSourceControlResponse` -- New anonymous field `TldLegalAgreementCollection` in struct `TopLevelDomainsClientListAgreementsResponse` -- New anonymous field `MSDeployStatus` in struct `WebAppsClientCreateMSDeployOperationSlotResponse` -- New anonymous field `IdentifierCollection` in struct `WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginRestoreOptions` -- New anonymous field `ProcessModuleInfo` in struct `WebAppsClientGetProcessModuleSlotResponse` -- New anonymous field `ProcessThreadInfoCollection` in struct `WebAppsClientListInstanceProcessThreadsResponse` -- New anonymous field `Site` in struct `WebAppsClientCreateOrUpdateSlotResponse` -- New anonymous field `ResourceHealthMetadataCollection` in struct `ResourceHealthMetadataClientListBySiteSlotResponse` -- New anonymous field `StaticSiteUserInvitationResponseResource` in struct `StaticSitesClientCreateUserRolesInvitationLinkResponse` -- New anonymous field `RemotePrivateEndpointConnectionARMResource` in struct `EnvironmentsClientGetPrivateEndpointConnectionResponse` -- New anonymous field `TriggeredJobHistory` in struct `WebAppsClientGetTriggeredWebJobHistorySlotResponse` -- New anonymous field `PremierAddOn` in struct `WebAppsClientGetPremierAddOnResponse` -- New anonymous field `VnetGateway` in struct `WebAppsClientGetVnetConnectionGatewaySlotResponse` -- New anonymous field `MSDeployStatus` in struct `WebAppsClientGetMSDeployStatusResponse` -- New anonymous field `RemotePrivateEndpointConnectionARMResource` in struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse` -- New anonymous field `PrivateEndpointConnectionCollection` in struct `EnvironmentsClientGetPrivateEndpointConnectionListResponse` -- New anonymous field `HybridConnection` in struct `WebAppsClientUpdateHybridConnectionResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions` -- New anonymous field `StringDictionary` in struct `StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse` -- New anonymous field `AppCertificate` in struct `CertificatesClientGetResponse` -- New anonymous field `SiteSourceControl` in struct `WebAppsClientGetSourceControlResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginCreateMSDeployOperationSlotOptions` -- New anonymous field `StaticSiteARMResource` in struct `StaticSitesClientGetStaticSiteResponse` -- New field `NetworkTraceArray` in struct `WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse` -- New anonymous field `VnetGateway` in struct `PlansClientUpdateVnetGatewayResponse` -- New anonymous field `UsageCollection` in struct `EnvironmentsClientListWebWorkerUsagesResponse` -- New anonymous field `PushSettings` in struct `WebAppsClientListSitePushSettingsSlotResponse` -- New anonymous field `SiteConfigResource` in struct `WebAppsClientCreateOrUpdateConfigurationResponse` -- New anonymous field `BackupItem` in struct `WebAppsClientBackupSlotResponse` -- New anonymous field `StaticSiteUserProvidedFunctionAppARMResource` in struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse` -- New anonymous field `DeletedSite` in struct `DeletedWebAppsClientGetDeletedWebAppByLocationResponse` -- New anonymous field `WebAppCollection` in struct `EnvironmentsClientSuspendResponse` -- New field `Value` in struct `WebAppsClientGetFunctionsAdminTokenResponse` -- New anonymous field `DiagnosticCategory` in struct `DiagnosticsClientGetSiteDiagnosticCategoryResponse` -- New anonymous field `SiteConfigResource` in struct `WebAppsClientUpdateConfigurationSlotResponse` -- New anonymous field `ResourceMetricDefinitionCollection` in struct `EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse` -- New anonymous field `VnetGateway` in struct `WebAppsClientUpdateVnetConnectionGatewayResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginCreateOrUpdateStaticSiteOptions` -- New anonymous field `ResourceMetricDefinitionCollection` in struct `EnvironmentsClientListMultiRoleMetricDefinitionsResponse` -- New anonymous field `SwiftVirtualNetwork` in struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse` -- New anonymous field `WorkerPoolCollection` in struct `EnvironmentsClientListWorkerPoolsResponse` -- New anonymous field `ContainerApp` in struct `ContainerAppsClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginMigrateMySQLOptions` -- New anonymous field `SiteLogsConfig` in struct `WebAppsClientUpdateDiagnosticLogsConfigSlotResponse` -- New anonymous field `CsmOperationCollection` in struct `ProviderClientListOperationsResponse` -- New anonymous field `RelayServiceConnectionEntity` in struct `WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse` -- New anonymous field `ResourceHealthMetadata` in struct `ResourceHealthMetadataClientGetBySiteResponse` -- New anonymous field `StringDictionary` in struct `StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse` -- New anonymous field `RecommendationCollection` in struct `RecommendationsClientListHistoryForWebAppResponse` -- New anonymous field `ConnectionStringDictionary` in struct `WebAppsClientUpdateConnectionStringsResponse` -- New anonymous field `TriggeredJobHistory` in struct `WebAppsClientGetTriggeredWebJobHistoryResponse` -- New anonymous field `PrivateEndpointConnectionCollection` in struct `WebAppsClientGetPrivateEndpointConnectionListResponse` -- New anonymous field `PlanCollection` in struct `PlansClientListByResourceGroupResponse` -- New anonymous field `DiagnosticAnalysis` in struct `DiagnosticsClientExecuteSiteAnalysisResponse` -- New anonymous field `InboundEnvironmentEndpointCollection` in struct `EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse` -- New anonymous field `ApplicationStackCollection` in struct `ProviderClientGetAvailableStacksResponse` -- New anonymous field `DiagnosticDetectorResponse` in struct `DiagnosticsClientExecuteSiteDetectorSlotResponse` -- New anonymous field `ProcessModuleInfo` in struct `WebAppsClientGetInstanceProcessModuleSlotResponse` -- New anonymous field `DetectorResponseCollection` in struct `DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse` -- New anonymous field `ContainerAppCollection` in struct `ContainerAppsClientListByResourceGroupResponse` -- New anonymous field `HostNameBindingCollection` in struct `WebAppsClientListHostNameBindingsSlotResponse` -- New anonymous field `VnetGateway` in struct `WebAppsClientGetVnetConnectionGatewayResponse` -- New anonymous field `Site` in struct `WebAppsClientCreateOrUpdateResponse` -- New anonymous field `HostNameBinding` in struct `WebAppsClientCreateOrUpdateHostNameBindingResponse` -- New field `NetworkTraceArray` in struct `WebAppsClientGetNetworkTracesV2Response` -- New anonymous field `MSDeployStatus` in struct `WebAppsClientGetMSDeployStatusSlotResponse` -- New anonymous field `CertificateOrder` in struct `CertificateOrdersClientGetResponse` -- New anonymous field `StringDictionary` in struct `WebAppsClientUpdateMetadataResponse` -- New anonymous field `WorkerPoolResource` in struct `EnvironmentsClientGetWorkerPoolResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginCreateInstanceFunctionSlotOptions` -- New field `VnetInfoResourceArray` in struct `PlansClientListVnetsResponse` -- New anonymous field `DeletedWebAppCollection` in struct `DeletedWebAppsClientListByLocationResponse` -- New anonymous field `AnalysisDefinition` in struct `DiagnosticsClientGetSiteAnalysisSlotResponse` -- New anonymous field `User` in struct `WebSiteManagementClientUpdatePublishingUserResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginInstallSiteExtensionSlotOptions` -- New field `NetworkTraceArray` in struct `WebAppsClientStartWebSiteNetworkTraceOperationResponse` -- New anonymous field `CustomHostnameAnalysisResult` in struct `WebAppsClientAnalyzeCustomHostnameSlotResponse` -- New anonymous field `SiteConfigurationSnapshotInfoCollection` in struct `WebAppsClientListConfigurationSnapshotInfoResponse` -- New anonymous field `FunctionEnvelope` in struct `WebAppsClientCreateInstanceFunctionSlotResponse` -- New anonymous field `Domain` in struct `DomainsClientGetResponse` -- New anonymous field `DomainOwnershipIdentifier` in struct `DomainsClientGetOwnershipIdentifierResponse` -- New anonymous field `BackupItem` in struct `WebAppsClientListBackupStatusSecretsSlotResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginDeleteStaticSiteOptions` -- New field `CertificateEmailArray` in struct `CertificateOrdersClientRetrieveCertificateEmailHistoryResponse` -- New field `Value` in struct `WebAppsClientGetFunctionsAdminTokenSlotResponse` -- New field `ResumeToken` in struct `EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions` -- New anonymous field `HostKeys` in struct `WebAppsClientListHostKeysResponse` -- New field `Interface` in struct `PlansClientGetServerFarmSKUsResponse` -- New anonymous field `FunctionEnvelopeCollection` in struct `WebAppsClientListInstanceFunctionsSlotResponse` -- New anonymous field `AppCertificate` in struct `CertificatesClientCreateOrUpdateResponse` -- New anonymous field `SnapshotCollection` in struct `WebAppsClientListSnapshotsFromDRSecondaryResponse` -- New anonymous field `WebAppInstanceStatusCollection` in struct `WebAppsClientListInstanceIdentifiersResponse` -- New anonymous field `SiteLogsConfig` in struct `WebAppsClientUpdateDiagnosticLogsConfigResponse` -- New anonymous field `VnetRoute` in struct `PlansClientUpdateVnetRouteResponse` -- New anonymous field `AnalysisDefinition` in struct `DiagnosticsClientGetSiteAnalysisResponse` -- New anonymous field `VnetGateway` in struct `WebAppsClientUpdateVnetConnectionGatewaySlotResponse` -- New anonymous field `FunctionSecrets` in struct `WebAppsClientListFunctionSecretsSlotResponse` -- New anonymous field `SiteAuthSettingsV2` in struct `WebAppsClientUpdateAuthSettingsV2Response` -- New anonymous field `StaticSiteUserARMResource` in struct `StaticSitesClientUpdateStaticSiteUserResponse` -- New anonymous field `PremierAddOn` in struct `WebAppsClientAddPremierAddOnSlotResponse` -- New anonymous field `StaticSiteCustomDomainOverviewCollection` in struct `StaticSitesClientListStaticSiteCustomDomainsResponse` -- New anonymous field `RelayServiceConnectionEntity` in struct `WebAppsClientGetRelayServiceConnectionSlotResponse` -- New field `VnetRouteArray` in struct `PlansClientListRoutesForVnetResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginDeletePrivateEndpointConnectionOptions` -- New anonymous field `SiteLogsConfig` in struct `WebAppsClientGetDiagnosticLogsConfigurationSlotResponse` -- New anonymous field `PushSettings` in struct `WebAppsClientUpdateSitePushSettingsSlotResponse` -- New anonymous field `Site` in struct `WebAppsClientUpdateResponse` -- New anonymous field `StaticSiteUserProvidedFunctionAppsCollection` in struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse` -- New anonymous field `DomainCollection` in struct `DomainsClientListByResourceGroupResponse` -- New anonymous field `CertificateCollection` in struct `CertificateOrdersClientListCertificatesResponse` -- New anonymous field `StaticSiteBuildCollection` in struct `StaticSitesClientGetStaticSiteBuildsResponse` -- New field `NetworkTraceArray` in struct `WebAppsClientGetNetworkTraceOperationSlotResponse` -- New anonymous field `WebAppCollection` in struct `EnvironmentsClientChangeVnetResponse` -- New anonymous field `WebAppCollection` in struct `PlansClientListWebAppsResponse` -- New anonymous field `KeyInfo` in struct `WebAppsClientCreateOrUpdateFunctionSecretSlotResponse` -- New anonymous field `FunctionEnvelopeCollection` in struct `WebAppsClientListFunctionsResponse` -- New anonymous field `HostKeys` in struct `WebAppsClientListHostKeysSlotResponse` -- New anonymous field `Plan` in struct `PlansClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `CertificateOrdersClientBeginCreateOrUpdateOptions` -- New anonymous field `PremierAddOn` in struct `WebAppsClientListPremierAddOnsSlotResponse` -- New anonymous field `SiteAuthSettingsV2` in struct `WebAppsClientGetAuthSettingsV2SlotResponse` -- New anonymous field `StringDictionary` in struct `StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse` -- New anonymous field `FunctionAppStackCollection` in struct `ProviderClientGetFunctionAppStacksForLocationResponse` -- New anonymous field `MSDeployLog` in struct `WebAppsClientGetMSDeployLogResponse` -- New anonymous field `CsmOperationCollection` in struct `DomainRegistrationProviderClientListOperationsResponse` -- New anonymous field `Domain` in struct `DomainsClientCreateOrUpdateResponse` -- New anonymous field `PublicCertificate` in struct `WebAppsClientGetPublicCertificateSlotResponse` -- New anonymous field `SiteExtensionInfo` in struct `WebAppsClientInstallSiteExtensionSlotResponse` -- New anonymous field `DiagnosticDetectorResponse` in struct `DiagnosticsClientExecuteSiteDetectorResponse` -- New anonymous field `CsmUsageQuotaCollection` in struct `WebAppsClientListUsagesSlotResponse` -- New anonymous field `SecretsCollection` in struct `ContainerAppsClientListSecretsResponse` -- New anonymous field `DomainCollection` in struct `DomainsClientListResponse` -- New field `HostingEnvironmentDiagnosticsArray` in struct `EnvironmentsClientListDiagnosticsResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginRestoreSnapshotOptions` -- New anonymous field `CustomHostnameAnalysisResult` in struct `WebAppsClientAnalyzeCustomHostnameResponse` -- New anonymous field `FunctionAppStackCollection` in struct `ProviderClientGetFunctionAppStacksResponse` -- New anonymous field `ContinuousWebJobCollection` in struct `WebAppsClientListContinuousWebJobsSlotResponse` -- New anonymous field `BackupRequest` in struct `WebAppsClientGetBackupConfigurationResponse` -- New anonymous field `FunctionEnvelope` in struct `WebAppsClientGetInstanceFunctionSlotResponse` -- New anonymous field `VnetInfoResource` in struct `PlansClientGetVnetFromServerFarmResponse` -- New anonymous field `WorkerPoolResource` in struct `EnvironmentsClientCreateOrUpdateMultiRolePoolResponse` -- New anonymous field `PushSettings` in struct `WebAppsClientListSitePushSettingsResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginRestoreFromBackupBlobSlotOptions` -- New anonymous field `WebAppCollection` in struct `WebAppsClientListResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginRestoreFromDeletedAppOptions` -- New anonymous field `AzureStoragePropertyDictionaryResource` in struct `WebAppsClientListAzureStorageAccountsResponse` -- New anonymous field `PublishingCredentialsPoliciesCollection` in struct `WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse` -- New anonymous field `StaticSiteUserProvidedFunctionAppARMResource` in struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse` -- New anonymous field `TriggeredWebJob` in struct `WebAppsClientGetTriggeredWebJobResponse` -- New field `ResumeToken` in struct `CertificateOrdersClientBeginCreateOrUpdateCertificateOptions` -- New anonymous field `PrivateEndpointConnectionCollection` in struct `WebAppsClientGetPrivateEndpointConnectionListSlotResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions` -- New anonymous field `EnvironmentResource` in struct `EnvironmentsClientGetResponse` -- New anonymous field `PremierAddOn` in struct `WebAppsClientUpdatePremierAddOnResponse` -- New anonymous field `CsmOperationCollection` in struct `CertificateRegistrationProviderClientListOperationsResponse` -- New anonymous field `ProcessInfo` in struct `WebAppsClientGetProcessResponse` -- New anonymous field `KeyInfo` in struct `WebAppsClientCreateOrUpdateHostSecretResponse` -- New anonymous field `DomainControlCenterSsoRequest` in struct `DomainsClientGetControlCenterSsoRequestResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions` -- New anonymous field `Plan` in struct `PlansClientGetResponse` -- New anonymous field `SitePhpErrorLogFlag` in struct `WebAppsClientGetSitePhpErrorLogFlagResponse` -- New anonymous field `SourceControl` in struct `WebSiteManagementClientGetSourceControlResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginDetachStaticSiteOptions` -- New anonymous field `BackupItemCollection` in struct `WebAppsClientListBackupsResponse` -- New anonymous field `SlotConfigNamesResource` in struct `WebAppsClientListSlotConfigurationNamesResponse` -- New anonymous field `DetectorResponseCollection` in struct `CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginCreateOrUpdateSourceControlOptions` -- New anonymous field `StaticSiteCustomDomainOverviewARMResource` in struct `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse` -- New anonymous field `DetectorResponse` in struct `DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse` -- New anonymous field `StringDictionary` in struct `StaticSitesClientListStaticSiteBuildAppSettingsResponse` -- New anonymous field `SiteLogsConfig` in struct `WebAppsClientGetDiagnosticLogsConfigurationResponse` -- New field `Body` in struct `WebAppsClientGetContainerLogsZipResponse` -- New anonymous field `StringDictionary` in struct `StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse` -- New anonymous field `HybridConnection` in struct `WebAppsClientGetHybridConnectionSlotResponse` -- New anonymous field `Domain` in struct `DomainsClientUpdateResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginRestoreFromDeletedAppSlotOptions` -- New anonymous field `PerfMonCounterCollection` in struct `WebAppsClientListPerfMonCountersSlotResponse` -- New anonymous field `WorkerPoolResource` in struct `EnvironmentsClientCreateOrUpdateWorkerPoolResponse` -- New anonymous field `APIKVReference` in struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse` -- New anonymous field `StringDictionary` in struct `StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse` -- New anonymous field `FunctionEnvelope` in struct `WebAppsClientCreateFunctionResponse` -- New anonymous field `RelayServiceConnectionEntity` in struct `WebAppsClientUpdateRelayServiceConnectionSlotResponse` -- New anonymous field `MSDeployLog` in struct `WebAppsClientGetInstanceMSDeployLogSlotResponse` -- New anonymous field `WebJobCollection` in struct `WebAppsClientListWebJobsSlotResponse` -- New field `Body` in struct `WebAppsClientGetWebSiteContainerLogsResponse` -- New anonymous field `ConnectionStringDictionary` in struct `WebAppsClientUpdateConnectionStringsSlotResponse` -- New anonymous field `KubeEnvironmentCollection` in struct `KubeEnvironmentsClientListByResourceGroupResponse` -- New field `ResumeToken` in struct `ContainerAppsClientBeginDeleteOptions` -- New field `ResumeToken` in struct `KubeEnvironmentsClientBeginDeleteOptions` -- New anonymous field `Site` in struct `WebAppsClientGetSlotResponse` -- New anonymous field `WebAppInstanceStatusCollection` in struct `WebAppsClientListInstanceIdentifiersSlotResponse` -- New anonymous field `EnvironmentResource` in struct `EnvironmentsClientUpdateResponse` -- New anonymous field `FunctionEnvelope` in struct `WebAppsClientGetFunctionResponse` -- New field `ResumeToken` in struct `EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions` -- New anonymous field `Identifier` in struct `WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse` -- New anonymous field `SKUInfoCollection` in struct `EnvironmentsClientListWorkerPoolSKUsResponse` -- New anonymous field `ProcessModuleInfoCollection` in struct `WebAppsClientListProcessModulesResponse` -- New anonymous field `RemotePrivateEndpointConnectionARMResource` in struct `StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse` -- New anonymous field `ProcessInfoCollection` in struct `WebAppsClientListProcessesSlotResponse` -- New anonymous field `Identifier` in struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse` -- New anonymous field `SiteCloneability` in struct `WebAppsClientIsCloneableSlotResponse` -- New anonymous field `DiagnosticCategory` in struct `DiagnosticsClientGetSiteDiagnosticCategorySlotResponse` -- New anonymous field `CsmUsageQuotaCollection` in struct `EnvironmentsClientListUsagesResponse` -- New anonymous field `RemotePrivateEndpointConnectionARMResource` in struct `WebAppsClientGetPrivateEndpointConnectionSlotResponse` -- New anonymous field `BackupRequest` in struct `WebAppsClientGetBackupConfigurationSlotResponse` -- New anonymous field `PrivateEndpointConnectionCollection` in struct `StaticSitesClientGetPrivateEndpointConnectionListResponse` -- New anonymous field `StaticSiteCollection` in struct `StaticSitesClientGetStaticSitesByResourceGroupResponse` -- New field `NetworkTraceArray` in struct `WebAppsClientStartNetworkTraceSlotResponse` -- New anonymous field `PremierAddOn` in struct `WebAppsClientGetPremierAddOnSlotResponse` -- New anonymous field `ResourceMetricDefinitionCollection` in struct `EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse` -- New anonymous field `Plan` in struct `PlansClientUpdateResponse` -- New field `Body` in struct `WebAppsClientGetContainerLogsZipSlotResponse` -- New anonymous field `TriggeredWebJobCollection` in struct `WebAppsClientListTriggeredWebJobsResponse` -- New field `ResumeToken` in struct `EnvironmentsClientBeginResumeOptions` -- New anonymous field `SwiftVirtualNetwork` in struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse` -- New anonymous field `WorkerPoolResource` in struct `EnvironmentsClientGetMultiRolePoolResponse` -- New field `NetworkTraceArray` in struct `WebAppsClientGetNetworkTracesSlotResponse` -- New anonymous field `SwiftVirtualNetwork` in struct `WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse` -- New anonymous field `StaticSiteFunctionOverviewCollection` in struct `StaticSitesClientListStaticSiteBuildFunctionsResponse` -- New anonymous field `AseV3NetworkingConfiguration` in struct `EnvironmentsClientGetAseV3NetworkingConfigurationResponse` -- New anonymous field `HybridConnection` in struct `WebAppsClientListHybridConnectionsSlotResponse` -- New anonymous field `CertificateResource` in struct `CertificateOrdersClientUpdateCertificateResponse` -- New anonymous field `PerfMonCounterCollection` in struct `WebAppsClientListPerfMonCountersResponse` -- New anonymous field `ConnectionStringDictionary` in struct `WebAppsClientListConnectionStringsSlotResponse` -- New field `Interface` in struct `WebAppsClientDeletePrivateEndpointConnectionSlotResponse` -- New anonymous field `HostNameBindingCollection` in struct `WebAppsClientListHostNameBindingsResponse` -- New anonymous field `StringDictionary` in struct `WebAppsClientListApplicationSettingsResponse` -- New anonymous field `StaticSiteARMResource` in struct `StaticSitesClientUpdateStaticSiteResponse` -- New field `ResumeToken` in struct `WebAppsClientBeginSwapSlotOptions` -- New anonymous field `ProcessInfo` in struct `WebAppsClientGetInstanceProcessResponse` -- New field `ResumeToken` in struct `StaticSitesClientBeginDeleteStaticSiteBuildOptions` -- New anonymous field `SiteConfigResourceCollection` in struct `WebAppsClientListConfigurationsSlotResponse` -- New anonymous field `TriggeredWebJobCollection` in struct `WebAppsClientListTriggeredWebJobsSlotResponse` -- New anonymous field `APIKVReferenceCollection` in struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse` -- New anonymous field `Operation` in struct `WebAppsClientMigrateMySQLResponse` -- New anonymous field `ProcessModuleInfo` in struct `WebAppsClientGetProcessModuleResponse` -- New anonymous field `PrivateAccess` in struct `WebAppsClientPutPrivateAccessVnetSlotResponse` -- New anonymous field `RelayServiceConnectionEntity` in struct `WebAppsClientUpdateRelayServiceConnectionResponse` -- New anonymous field `DiagnosticAnalysisCollection` in struct `DiagnosticsClientListSiteAnalysesSlotResponse` -- New anonymous field `StringDictionary` in struct `WebAppsClientUpdateApplicationSettingsSlotResponse` -- New anonymous field `KubeEnvironment` in struct `KubeEnvironmentsClientCreateOrUpdateResponse` -- New anonymous field `CertificateOrder` in struct `CertificateOrdersClientCreateOrUpdateResponse` -- New anonymous field `HybridConnection` in struct `PlansClientGetHybridConnectionResponse` -- New anonymous field `RevisionCollection` in struct `ContainerAppsRevisionsClientListRevisionsResponse` -- New anonymous field `User` in struct `WebAppsClientListPublishingCredentialsResponse` -- New anonymous field `RestoreRequest` in struct `WebAppsClientDiscoverBackupSlotResponse` -- New anonymous field `StringDictionary` in struct `StaticSitesClientListStaticSiteAppSettingsResponse` -- New anonymous field `WebAppStackCollection` in struct `ProviderClientGetWebAppStacksForLocationResponse` -- New anonymous field `SiteConfigResource` in struct `WebAppsClientGetConfigurationSlotResponse` -- New anonymous field `VnetGateway` in struct `WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse` -- New anonymous field `DomainOwnershipIdentifier` in struct `DomainsClientUpdateOwnershipIdentifierResponse` -- New anonymous field `StaticSitesWorkflowPreview` in struct `StaticSitesClientPreviewWorkflowResponse` -- New anonymous field `TopLevelDomainCollection` in struct `TopLevelDomainsClientListResponse` -- New field `ResumeToken` in struct `ContainerAppsClientBeginCreateOrUpdateOptions` -- New anonymous field `BackupItem` in struct `WebAppsClientBackupResponse` -- New anonymous field `CustomHostnameSitesCollection` in struct `WebSiteManagementClientListCustomHostNameSitesResponse` -- New anonymous field `WebAppCollection` in struct `EnvironmentsClientListWebAppsResponse` -- New field `VnetInfoResourceArray` in struct `WebAppsClientListVnetConnectionsSlotResponse` -- New anonymous field `EnvironmentCollection` in struct `EnvironmentsClientListByResourceGroupResponse` -- New field `NetworkTraceArray` in struct `WebAppsClientGetNetworkTracesResponse` -- New anonymous field `RemotePrivateEndpointConnectionARMResource` in struct `StaticSitesClientGetPrivateEndpointConnectionResponse` -- New field `CapabilityArray` in struct `PlansClientListCapabilitiesResponse` -- New anonymous field `PrivateLinkResourcesWrapper` in struct `StaticSitesClientGetPrivateLinkResourcesResponse` -- New anonymous field `StringDictionary` in struct `WebAppsClientListFunctionKeysSlotResponse` -- New anonymous field `MSDeployLog` in struct `WebAppsClientGetInstanceMSDeployLogResponse` -- New anonymous field `BackupItemCollection` in struct `WebAppsClientListSiteBackupsResponse` -- New anonymous field `DiagnosticDetectorCollection` in struct `DiagnosticsClientListSiteDetectorsSlotResponse` -- New field `ResumeToken` in struct `PlansClientBeginCreateOrUpdateOptions` -- New anonymous field `DeploymentCollection` in struct `WebAppsClientListDeploymentsSlotResponse` -- New anonymous field `SiteSourceControl` in struct `WebAppsClientCreateOrUpdateSourceControlSlotResponse` - - -## 0.2.1 (2022-02-22) - -### Other Changes - -- Remove the go_mod_tidy_hack.go file. - -## 0.2.0 (2022-01-21) -### Breaking Changes - -- Function `*StaticSitesClient.ListStaticSiteSecrets` parameter(s) have been changed from `(context.Context, string, string, *StaticSitesListStaticSiteSecretsOptions)` to `(context.Context, string, string, *StaticSitesClientListStaticSiteSecretsOptions)` -- Function `*StaticSitesClient.ListStaticSiteSecrets` return value(s) have been changed from `(StaticSitesListStaticSiteSecretsResponse, error)` to `(StaticSitesClientListStaticSiteSecretsResponse, error)` -- Function `*WebAppsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetOptions)` to `(context.Context, string, string, *WebAppsClientGetOptions)` -- Function `*WebAppsClient.Get` return value(s) have been changed from `(WebAppsGetResponse, error)` to `(WebAppsClientGetResponse, error)` -- Function `*WebAppsClient.BeginListPublishingCredentialsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsBeginListPublishingCredentialsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientBeginListPublishingCredentialsSlotOptions)` -- Function `*WebAppsClient.BeginListPublishingCredentialsSlot` return value(s) have been changed from `(WebAppsListPublishingCredentialsSlotPollerResponse, error)` to `(WebAppsClientListPublishingCredentialsSlotPollerResponse, error)` -- Function `*StaticSitesClient.GetStaticSiteCustomDomain` parameter(s) have been changed from `(context.Context, string, string, string, *StaticSitesGetStaticSiteCustomDomainOptions)` to `(context.Context, string, string, string, *StaticSitesClientGetStaticSiteCustomDomainOptions)` -- Function `*StaticSitesClient.GetStaticSiteCustomDomain` return value(s) have been changed from `(StaticSitesGetStaticSiteCustomDomainResponse, error)` to `(StaticSitesClientGetStaticSiteCustomDomainResponse, error)` -- Function `*WebAppsClient.GetScmAllowedSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetScmAllowedSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetScmAllowedSlotOptions)` -- Function `*WebAppsClient.GetScmAllowedSlot` return value(s) have been changed from `(WebAppsGetScmAllowedSlotResponse, error)` to `(WebAppsClientGetScmAllowedSlotResponse, error)` -- Function `*WebAppsClient.BeginCreateOrUpdateSourceControl` parameter(s) have been changed from `(context.Context, string, string, SiteSourceControl, *WebAppsBeginCreateOrUpdateSourceControlOptions)` to `(context.Context, string, string, SiteSourceControl, *WebAppsClientBeginCreateOrUpdateSourceControlOptions)` -- Function `*WebAppsClient.BeginCreateOrUpdateSourceControl` return value(s) have been changed from `(WebAppsCreateOrUpdateSourceControlPollerResponse, error)` to `(WebAppsClientCreateOrUpdateSourceControlPollerResponse, error)` -- Function `*WebAppsClient.RunTriggeredWebJob` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsRunTriggeredWebJobOptions)` to `(context.Context, string, string, string, *WebAppsClientRunTriggeredWebJobOptions)` -- Function `*WebAppsClient.RunTriggeredWebJob` return value(s) have been changed from `(WebAppsRunTriggeredWebJobResponse, error)` to `(WebAppsClientRunTriggeredWebJobResponse, error)` -- Function `*WebAppsClient.ListConfigurationsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListConfigurationsSlotOptions)` to `(string, string, string, *WebAppsClientListConfigurationsSlotOptions)` -- Function `*WebAppsClient.ListConfigurationsSlot` return value(s) have been changed from `(*WebAppsListConfigurationsSlotPager)` to `(*WebAppsClientListConfigurationsSlotPager)` -- Function `*CertificatesClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, Certificate, *CertificatesCreateOrUpdateOptions)` to `(context.Context, string, string, AppCertificate, *CertificatesClientCreateOrUpdateOptions)` -- Function `*CertificatesClient.CreateOrUpdate` return value(s) have been changed from `(CertificatesCreateOrUpdateResponse, error)` to `(CertificatesClientCreateOrUpdateResponse, error)` -- Function `*WebAppsClient.UpdateBackupConfigurationSlot` parameter(s) have been changed from `(context.Context, string, string, string, BackupRequest, *WebAppsUpdateBackupConfigurationSlotOptions)` to `(context.Context, string, string, string, BackupRequest, *WebAppsClientUpdateBackupConfigurationSlotOptions)` -- Function `*WebAppsClient.UpdateBackupConfigurationSlot` return value(s) have been changed from `(WebAppsUpdateBackupConfigurationSlotResponse, error)` to `(WebAppsClientUpdateBackupConfigurationSlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier` parameter(s) have been changed from `(context.Context, string, string, string, Identifier, *WebAppsCreateOrUpdateDomainOwnershipIdentifierOptions)` to `(context.Context, string, string, string, Identifier, *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions)` -- Function `*WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier` return value(s) have been changed from `(WebAppsCreateOrUpdateDomainOwnershipIdentifierResponse, error)` to `(WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse, error)` -- Function `*WebAppsClient.ListTriggeredWebJobHistorySlot` parameter(s) have been changed from `(string, string, string, string, *WebAppsListTriggeredWebJobHistorySlotOptions)` to `(string, string, string, string, *WebAppsClientListTriggeredWebJobHistorySlotOptions)` -- Function `*WebAppsClient.ListTriggeredWebJobHistorySlot` return value(s) have been changed from `(*WebAppsListTriggeredWebJobHistorySlotPager)` to `(*WebAppsClientListTriggeredWebJobHistorySlotPager)` -- Function `*WebAppsClient.UpdateRelayServiceConnection` parameter(s) have been changed from `(context.Context, string, string, string, RelayServiceConnectionEntity, *WebAppsUpdateRelayServiceConnectionOptions)` to `(context.Context, string, string, string, RelayServiceConnectionEntity, *WebAppsClientUpdateRelayServiceConnectionOptions)` -- Function `*WebAppsClient.UpdateRelayServiceConnection` return value(s) have been changed from `(WebAppsUpdateRelayServiceConnectionResponse, error)` to `(WebAppsClientUpdateRelayServiceConnectionResponse, error)` -- Function `*StaticSitesClient.BeginDetachStaticSite` parameter(s) have been changed from `(context.Context, string, string, *StaticSitesBeginDetachStaticSiteOptions)` to `(context.Context, string, string, *StaticSitesClientBeginDetachStaticSiteOptions)` -- Function `*StaticSitesClient.BeginDetachStaticSite` return value(s) have been changed from `(StaticSitesDetachStaticSitePollerResponse, error)` to `(StaticSitesClientDetachStaticSitePollerResponse, error)` -- Function `*WebAppsClient.ListFunctionSecretsSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsListFunctionSecretsSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientListFunctionSecretsSlotOptions)` -- Function `*WebAppsClient.ListFunctionSecretsSlot` return value(s) have been changed from `(WebAppsListFunctionSecretsSlotResponse, error)` to `(WebAppsClientListFunctionSecretsSlotResponse, error)` -- Function `*WebAppsClient.StartWebSiteNetworkTrace` parameter(s) have been changed from `(context.Context, string, string, *WebAppsStartWebSiteNetworkTraceOptions)` to `(context.Context, string, string, *WebAppsClientStartWebSiteNetworkTraceOptions)` -- Function `*WebAppsClient.StartWebSiteNetworkTrace` return value(s) have been changed from `(WebAppsStartWebSiteNetworkTraceResponse, error)` to `(WebAppsClientStartWebSiteNetworkTraceResponse, error)` -- Function `*WebAppsClient.DeleteBackupSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteBackupSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteBackupSlotOptions)` -- Function `*WebAppsClient.DeleteBackupSlot` return value(s) have been changed from `(WebAppsDeleteBackupSlotResponse, error)` to `(WebAppsClientDeleteBackupSlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, VnetGateway, *WebAppsCreateOrUpdateVnetConnectionGatewaySlotOptions)` to `(context.Context, string, string, string, string, string, VnetGateway, *WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions)` -- Function `*WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot` return value(s) have been changed from `(WebAppsCreateOrUpdateVnetConnectionGatewaySlotResponse, error)` to `(WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse, error)` -- Function `*WebAppsClient.SyncFunctions` parameter(s) have been changed from `(context.Context, string, string, *WebAppsSyncFunctionsOptions)` to `(context.Context, string, string, *WebAppsClientSyncFunctionsOptions)` -- Function `*WebAppsClient.SyncFunctions` return value(s) have been changed from `(WebAppsSyncFunctionsResponse, error)` to `(WebAppsClientSyncFunctionsResponse, error)` -- Function `*WebAppsClient.UpdateAzureStorageAccounts` parameter(s) have been changed from `(context.Context, string, string, AzureStoragePropertyDictionaryResource, *WebAppsUpdateAzureStorageAccountsOptions)` to `(context.Context, string, string, AzureStoragePropertyDictionaryResource, *WebAppsClientUpdateAzureStorageAccountsOptions)` -- Function `*WebAppsClient.UpdateAzureStorageAccounts` return value(s) have been changed from `(WebAppsUpdateAzureStorageAccountsResponse, error)` to `(WebAppsClientUpdateAzureStorageAccountsResponse, error)` -- Function `*WebAppsClient.GetProcess` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetProcessOptions)` to `(context.Context, string, string, string, *WebAppsClientGetProcessOptions)` -- Function `*WebAppsClient.GetProcess` return value(s) have been changed from `(WebAppsGetProcessResponse, error)` to `(WebAppsClientGetProcessResponse, error)` -- Function `*RecommendationsClient.DisableRecommendationForHostingEnvironment` parameter(s) have been changed from `(context.Context, string, string, string, string, *RecommendationsDisableRecommendationForHostingEnvironmentOptions)` to `(context.Context, string, string, string, string, *RecommendationsClientDisableRecommendationForHostingEnvironmentOptions)` -- Function `*RecommendationsClient.DisableRecommendationForHostingEnvironment` return value(s) have been changed from `(RecommendationsDisableRecommendationForHostingEnvironmentResponse, error)` to `(RecommendationsClientDisableRecommendationForHostingEnvironmentResponse, error)` -- Function `*StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild` parameter(s) have been changed from `(context.Context, string, string, string, StaticSiteZipDeploymentARMResource, *StaticSitesBeginCreateZipDeploymentForStaticSiteBuildOptions)` to `(context.Context, string, string, string, StaticSiteZipDeploymentARMResource, *StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions)` -- Function `*StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild` return value(s) have been changed from `(StaticSitesCreateZipDeploymentForStaticSiteBuildPollerResponse, error)` to `(StaticSitesClientCreateZipDeploymentForStaticSiteBuildPollerResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck` parameter(s) have been changed from `(context.Context, string, string, SwiftVirtualNetwork, *WebAppsCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions)` to `(context.Context, string, string, SwiftVirtualNetwork, *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions)` -- Function `*WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck` return value(s) have been changed from `(WebAppsCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error)` to `(WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error)` -- Function `*WebAppsClient.ListMetadata` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListMetadataOptions)` to `(context.Context, string, string, *WebAppsClientListMetadataOptions)` -- Function `*WebAppsClient.ListMetadata` return value(s) have been changed from `(WebAppsListMetadataResponse, error)` to `(WebAppsClientListMetadataResponse, error)` -- Function `*WebAppsClient.ListConfigurationSnapshotInfoSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListConfigurationSnapshotInfoSlotOptions)` to `(string, string, string, *WebAppsClientListConfigurationSnapshotInfoSlotOptions)` -- Function `*WebAppsClient.ListConfigurationSnapshotInfoSlot` return value(s) have been changed from `(*WebAppsListConfigurationSnapshotInfoSlotPager)` to `(*WebAppsClientListConfigurationSnapshotInfoSlotPager)` -- Function `*WebAppsClient.DeletePublicCertificateSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeletePublicCertificateSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeletePublicCertificateSlotOptions)` -- Function `*WebAppsClient.DeletePublicCertificateSlot` return value(s) have been changed from `(WebAppsDeletePublicCertificateSlotResponse, error)` to `(WebAppsClientDeletePublicCertificateSlotResponse, error)` -- Function `*WebAppsClient.DeleteHybridConnection` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteHybridConnectionOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteHybridConnectionOptions)` -- Function `*WebAppsClient.DeleteHybridConnection` return value(s) have been changed from `(WebAppsDeleteHybridConnectionResponse, error)` to `(WebAppsClientDeleteHybridConnectionResponse, error)` -- Function `*WebAppsClient.StartWebSiteNetworkTraceSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsStartWebSiteNetworkTraceSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientStartWebSiteNetworkTraceSlotOptions)` -- Function `*WebAppsClient.StartWebSiteNetworkTraceSlot` return value(s) have been changed from `(WebAppsStartWebSiteNetworkTraceSlotResponse, error)` to `(WebAppsClientStartWebSiteNetworkTraceSlotResponse, error)` -- Function `*WebAppsClient.ListBackupStatusSecretsSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, BackupRequest, *WebAppsListBackupStatusSecretsSlotOptions)` to `(context.Context, string, string, string, string, BackupRequest, *WebAppsClientListBackupStatusSecretsSlotOptions)` -- Function `*WebAppsClient.ListBackupStatusSecretsSlot` return value(s) have been changed from `(WebAppsListBackupStatusSecretsSlotResponse, error)` to `(WebAppsClientListBackupStatusSecretsSlotResponse, error)` -- Function `*StaticSitesClient.BeginCreateOrUpdateStaticSite` parameter(s) have been changed from `(context.Context, string, string, StaticSiteARMResource, *StaticSitesBeginCreateOrUpdateStaticSiteOptions)` to `(context.Context, string, string, StaticSiteARMResource, *StaticSitesClientBeginCreateOrUpdateStaticSiteOptions)` -- Function `*StaticSitesClient.BeginCreateOrUpdateStaticSite` return value(s) have been changed from `(StaticSitesCreateOrUpdateStaticSitePollerResponse, error)` to `(StaticSitesClientCreateOrUpdateStaticSitePollerResponse, error)` -- Function `*WebAppsClient.DeleteHostSecretSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsDeleteHostSecretSlotOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientDeleteHostSecretSlotOptions)` -- Function `*WebAppsClient.DeleteHostSecretSlot` return value(s) have been changed from `(WebAppsDeleteHostSecretSlotResponse, error)` to `(WebAppsClientDeleteHostSecretSlotResponse, error)` -- Function `*StaticSitesClient.UpdateStaticSite` parameter(s) have been changed from `(context.Context, string, string, StaticSitePatchResource, *StaticSitesUpdateStaticSiteOptions)` to `(context.Context, string, string, StaticSitePatchResource, *StaticSitesClientUpdateStaticSiteOptions)` -- Function `*StaticSitesClient.UpdateStaticSite` return value(s) have been changed from `(StaticSitesUpdateStaticSiteResponse, error)` to `(StaticSitesClientUpdateStaticSiteResponse, error)` -- Function `*WebAppsClient.GetInstanceProcessDumpSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsGetInstanceProcessDumpSlotOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientGetInstanceProcessDumpSlotOptions)` -- Function `*WebAppsClient.GetInstanceProcessDumpSlot` return value(s) have been changed from `(WebAppsGetInstanceProcessDumpSlotResponse, error)` to `(WebAppsClientGetInstanceProcessDumpSlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateRelayServiceConnection` parameter(s) have been changed from `(context.Context, string, string, string, RelayServiceConnectionEntity, *WebAppsCreateOrUpdateRelayServiceConnectionOptions)` to `(context.Context, string, string, string, RelayServiceConnectionEntity, *WebAppsClientCreateOrUpdateRelayServiceConnectionOptions)` -- Function `*WebAppsClient.CreateOrUpdateRelayServiceConnection` return value(s) have been changed from `(WebAppsCreateOrUpdateRelayServiceConnectionResponse, error)` to `(WebAppsClientCreateOrUpdateRelayServiceConnectionResponse, error)` -- Function `*StaticSitesClient.GetStaticSitesByResourceGroup` parameter(s) have been changed from `(string, *StaticSitesGetStaticSitesByResourceGroupOptions)` to `(string, *StaticSitesClientGetStaticSitesByResourceGroupOptions)` -- Function `*StaticSitesClient.GetStaticSitesByResourceGroup` return value(s) have been changed from `(*StaticSitesGetStaticSitesByResourceGroupPager)` to `(*StaticSitesClientGetStaticSitesByResourceGroupPager)` -- Function `*WebAppsClient.ListContinuousWebJobsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListContinuousWebJobsSlotOptions)` to `(string, string, string, *WebAppsClientListContinuousWebJobsSlotOptions)` -- Function `*WebAppsClient.ListContinuousWebJobsSlot` return value(s) have been changed from `(*WebAppsListContinuousWebJobsSlotPager)` to `(*WebAppsClientListContinuousWebJobsSlotPager)` -- Function `*WebAppsClient.GetNetworkTraceOperationSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetNetworkTraceOperationSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetNetworkTraceOperationSlotOptions)` -- Function `*WebAppsClient.GetNetworkTraceOperationSlot` return value(s) have been changed from `(WebAppsGetNetworkTraceOperationSlotResponse, error)` to `(WebAppsClientGetNetworkTraceOperationSlotResponse, error)` -- Function `*TopLevelDomainsClient.List` parameter(s) have been changed from `(*TopLevelDomainsListOptions)` to `(*TopLevelDomainsClientListOptions)` -- Function `*TopLevelDomainsClient.List` return value(s) have been changed from `(*TopLevelDomainsListPager)` to `(*TopLevelDomainsClientListPager)` -- Function `*TopLevelDomainsClient.Get` parameter(s) have been changed from `(context.Context, string, *TopLevelDomainsGetOptions)` to `(context.Context, string, *TopLevelDomainsClientGetOptions)` -- Function `*TopLevelDomainsClient.Get` return value(s) have been changed from `(TopLevelDomainsGetResponse, error)` to `(TopLevelDomainsClientGetResponse, error)` -- Function `*WebAppsClient.BeginRestoreFromBackupBlobSlot` parameter(s) have been changed from `(context.Context, string, string, string, RestoreRequest, *WebAppsBeginRestoreFromBackupBlobSlotOptions)` to `(context.Context, string, string, string, RestoreRequest, *WebAppsClientBeginRestoreFromBackupBlobSlotOptions)` -- Function `*WebAppsClient.BeginRestoreFromBackupBlobSlot` return value(s) have been changed from `(WebAppsRestoreFromBackupBlobSlotPollerResponse, error)` to `(WebAppsClientRestoreFromBackupBlobSlotPollerResponse, error)` -- Function `*WebAppsClient.UpdateAuthSettings` parameter(s) have been changed from `(context.Context, string, string, SiteAuthSettings, *WebAppsUpdateAuthSettingsOptions)` to `(context.Context, string, string, SiteAuthSettings, *WebAppsClientUpdateAuthSettingsOptions)` -- Function `*WebAppsClient.UpdateAuthSettings` return value(s) have been changed from `(WebAppsUpdateAuthSettingsResponse, error)` to `(WebAppsClientUpdateAuthSettingsResponse, error)` -- Function `*WebAppsClient.ListSyncFunctionTriggersSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListSyncFunctionTriggersSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListSyncFunctionTriggersSlotOptions)` -- Function `*WebAppsClient.ListSyncFunctionTriggersSlot` return value(s) have been changed from `(WebAppsListSyncFunctionTriggersSlotResponse, error)` to `(WebAppsClientListSyncFunctionTriggersSlotResponse, error)` -- Function `*WebAppsClient.GetVnetConnectionGateway` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetVnetConnectionGatewayOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetVnetConnectionGatewayOptions)` -- Function `*WebAppsClient.GetVnetConnectionGateway` return value(s) have been changed from `(WebAppsGetVnetConnectionGatewayResponse, error)` to `(WebAppsClientGetVnetConnectionGatewayResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, Identifier, *WebAppsCreateOrUpdateDomainOwnershipIdentifierSlotOptions)` to `(context.Context, string, string, string, string, Identifier, *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions)` -- Function `*WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateDomainOwnershipIdentifierSlotResponse, error)` to `(WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse, error)` -- Function `*DomainsClient.Update` parameter(s) have been changed from `(context.Context, string, string, DomainPatchResource, *DomainsUpdateOptions)` to `(context.Context, string, string, DomainPatchResource, *DomainsClientUpdateOptions)` -- Function `*DomainsClient.Update` return value(s) have been changed from `(DomainsUpdateResponse, error)` to `(DomainsClientUpdateResponse, error)` -- Function `*WebAppsClient.ListSlotConfigurationNames` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListSlotConfigurationNamesOptions)` to `(context.Context, string, string, *WebAppsClientListSlotConfigurationNamesOptions)` -- Function `*WebAppsClient.ListSlotConfigurationNames` return value(s) have been changed from `(WebAppsListSlotConfigurationNamesResponse, error)` to `(WebAppsClientListSlotConfigurationNamesResponse, error)` -- Function `*StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite` parameter(s) have been changed from `(context.Context, string, string, string, *StaticSitesDetachUserProvidedFunctionAppFromStaticSiteOptions)` to `(context.Context, string, string, string, *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions)` -- Function `*StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite` return value(s) have been changed from `(StaticSitesDetachUserProvidedFunctionAppFromStaticSiteResponse, error)` to `(StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateHostNameBinding` parameter(s) have been changed from `(context.Context, string, string, string, HostNameBinding, *WebAppsCreateOrUpdateHostNameBindingOptions)` to `(context.Context, string, string, string, HostNameBinding, *WebAppsClientCreateOrUpdateHostNameBindingOptions)` -- Function `*WebAppsClient.CreateOrUpdateHostNameBinding` return value(s) have been changed from `(WebAppsCreateOrUpdateHostNameBindingResponse, error)` to `(WebAppsClientCreateOrUpdateHostNameBindingResponse, error)` -- Function `*WebAppsClient.AddPremierAddOnSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, PremierAddOn, *WebAppsAddPremierAddOnSlotOptions)` to `(context.Context, string, string, string, string, PremierAddOn, *WebAppsClientAddPremierAddOnSlotOptions)` -- Function `*WebAppsClient.AddPremierAddOnSlot` return value(s) have been changed from `(WebAppsAddPremierAddOnSlotResponse, error)` to `(WebAppsClientAddPremierAddOnSlotResponse, error)` -- Function `*DomainsClient.GetControlCenterSsoRequest` parameter(s) have been changed from `(context.Context, *DomainsGetControlCenterSsoRequestOptions)` to `(context.Context, *DomainsClientGetControlCenterSsoRequestOptions)` -- Function `*DomainsClient.GetControlCenterSsoRequest` return value(s) have been changed from `(DomainsGetControlCenterSsoRequestResponse, error)` to `(DomainsClientGetControlCenterSsoRequestResponse, error)` -- Function `*WebAppsClient.GetSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetSlotOptions)` -- Function `*WebAppsClient.GetSlot` return value(s) have been changed from `(WebAppsGetSlotResponse, error)` to `(WebAppsClientGetSlotResponse, error)` -- Function `*WebAppsClient.ListInstanceProcessModules` parameter(s) have been changed from `(string, string, string, string, *WebAppsListInstanceProcessModulesOptions)` to `(string, string, string, string, *WebAppsClientListInstanceProcessModulesOptions)` -- Function `*WebAppsClient.ListInstanceProcessModules` return value(s) have been changed from `(*WebAppsListInstanceProcessModulesPager)` to `(*WebAppsClientListInstanceProcessModulesPager)` -- Function `*DeletedWebAppsClient.List` parameter(s) have been changed from `(*DeletedWebAppsListOptions)` to `(*DeletedWebAppsClientListOptions)` -- Function `*DeletedWebAppsClient.List` return value(s) have been changed from `(*DeletedWebAppsListPager)` to `(*DeletedWebAppsClientListPager)` -- Function `*StaticSitesClient.CreateUserRolesInvitationLink` parameter(s) have been changed from `(context.Context, string, string, StaticSiteUserInvitationRequestResource, *StaticSitesCreateUserRolesInvitationLinkOptions)` to `(context.Context, string, string, StaticSiteUserInvitationRequestResource, *StaticSitesClientCreateUserRolesInvitationLinkOptions)` -- Function `*StaticSitesClient.CreateUserRolesInvitationLink` return value(s) have been changed from `(StaticSitesCreateUserRolesInvitationLinkResponse, error)` to `(StaticSitesClientCreateUserRolesInvitationLinkResponse, error)` -- Function `*WebAppsClient.RestartSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsRestartSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientRestartSlotOptions)` -- Function `*WebAppsClient.RestartSlot` return value(s) have been changed from `(WebAppsRestartSlotResponse, error)` to `(WebAppsClientRestartSlotResponse, error)` -- Function `*WebAppsClient.Restart` parameter(s) have been changed from `(context.Context, string, string, *WebAppsRestartOptions)` to `(context.Context, string, string, *WebAppsClientRestartOptions)` -- Function `*WebAppsClient.Restart` return value(s) have been changed from `(WebAppsRestartResponse, error)` to `(WebAppsClientRestartResponse, error)` -- Function `*WebAppsClient.GetFtpAllowed` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetFtpAllowedOptions)` to `(context.Context, string, string, *WebAppsClientGetFtpAllowedOptions)` -- Function `*WebAppsClient.GetFtpAllowed` return value(s) have been changed from `(WebAppsGetFtpAllowedResponse, error)` to `(WebAppsClientGetFtpAllowedResponse, error)` -- Function `*WebAppsClient.BeginCreateInstanceMSDeployOperationSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, MSDeploy, *WebAppsBeginCreateInstanceMSDeployOperationSlotOptions)` to `(context.Context, string, string, string, string, MSDeploy, *WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions)` -- Function `*WebAppsClient.BeginCreateInstanceMSDeployOperationSlot` return value(s) have been changed from `(WebAppsCreateInstanceMSDeployOperationSlotPollerResponse, error)` to `(WebAppsClientCreateInstanceMSDeployOperationSlotPollerResponse, error)` -- Function `*WebAppsClient.GetMSDeployStatusSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetMSDeployStatusSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetMSDeployStatusSlotOptions)` -- Function `*WebAppsClient.GetMSDeployStatusSlot` return value(s) have been changed from `(WebAppsGetMSDeployStatusSlotResponse, error)` to `(WebAppsClientGetMSDeployStatusSlotResponse, error)` -- Function `*WebAppsClient.GetPrivateLinkResources` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetPrivateLinkResourcesOptions)` to `(context.Context, string, string, *WebAppsClientGetPrivateLinkResourcesOptions)` -- Function `*WebAppsClient.GetPrivateLinkResources` return value(s) have been changed from `(WebAppsGetPrivateLinkResourcesResponse, error)` to `(WebAppsClientGetPrivateLinkResourcesResponse, error)` -- Function `*WebAppsClient.DeleteDeployment` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteDeploymentOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteDeploymentOptions)` -- Function `*WebAppsClient.DeleteDeployment` return value(s) have been changed from `(WebAppsDeleteDeploymentResponse, error)` to `(WebAppsClientDeleteDeploymentResponse, error)` -- Function `*WebAppsClient.DeleteInstanceProcess` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteInstanceProcessOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteInstanceProcessOptions)` -- Function `*WebAppsClient.DeleteInstanceProcess` return value(s) have been changed from `(WebAppsDeleteInstanceProcessResponse, error)` to `(WebAppsClientDeleteInstanceProcessResponse, error)` -- Function `*WebAppsClient.StartSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsStartSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientStartSlotOptions)` -- Function `*WebAppsClient.StartSlot` return value(s) have been changed from `(WebAppsStartSlotResponse, error)` to `(WebAppsClientStartSlotResponse, error)` -- Function `*WebAppsClient.ListUsagesSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListUsagesSlotOptions)` to `(string, string, string, *WebAppsClientListUsagesSlotOptions)` -- Function `*WebAppsClient.ListUsagesSlot` return value(s) have been changed from `(*WebAppsListUsagesSlotPager)` to `(*WebAppsClientListUsagesSlotPager)` -- Function `*WebAppsClient.ListPublicCertificates` parameter(s) have been changed from `(string, string, *WebAppsListPublicCertificatesOptions)` to `(string, string, *WebAppsClientListPublicCertificatesOptions)` -- Function `*WebAppsClient.ListPublicCertificates` return value(s) have been changed from `(*WebAppsListPublicCertificatesPager)` to `(*WebAppsClientListPublicCertificatesPager)` -- Function `*WebAppsClient.CreateOrUpdateHostNameBindingSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, HostNameBinding, *WebAppsCreateOrUpdateHostNameBindingSlotOptions)` to `(context.Context, string, string, string, string, HostNameBinding, *WebAppsClientCreateOrUpdateHostNameBindingSlotOptions)` -- Function `*WebAppsClient.CreateOrUpdateHostNameBindingSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateHostNameBindingSlotResponse, error)` to `(WebAppsClientCreateOrUpdateHostNameBindingSlotResponse, error)` -- Function `*WebAppsClient.DeletePremierAddOnSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeletePremierAddOnSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeletePremierAddOnSlotOptions)` -- Function `*WebAppsClient.DeletePremierAddOnSlot` return value(s) have been changed from `(WebAppsDeletePremierAddOnSlotResponse, error)` to `(WebAppsClientDeletePremierAddOnSlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateConfigurationSlot` parameter(s) have been changed from `(context.Context, string, string, string, SiteConfigResource, *WebAppsCreateOrUpdateConfigurationSlotOptions)` to `(context.Context, string, string, string, SiteConfigResource, *WebAppsClientCreateOrUpdateConfigurationSlotOptions)` -- Function `*WebAppsClient.CreateOrUpdateConfigurationSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateConfigurationSlotResponse, error)` to `(WebAppsClientCreateOrUpdateConfigurationSlotResponse, error)` -- Function `*WebAppsClient.ListHostNameBindings` parameter(s) have been changed from `(string, string, *WebAppsListHostNameBindingsOptions)` to `(string, string, *WebAppsClientListHostNameBindingsOptions)` -- Function `*WebAppsClient.ListHostNameBindings` return value(s) have been changed from `(*WebAppsListHostNameBindingsPager)` to `(*WebAppsClientListHostNameBindingsPager)` -- Function `*WebAppsClient.BeginCreateOrUpdateSourceControlSlot` parameter(s) have been changed from `(context.Context, string, string, string, SiteSourceControl, *WebAppsBeginCreateOrUpdateSourceControlSlotOptions)` to `(context.Context, string, string, string, SiteSourceControl, *WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions)` -- Function `*WebAppsClient.BeginCreateOrUpdateSourceControlSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateSourceControlSlotPollerResponse, error)` to `(WebAppsClientCreateOrUpdateSourceControlSlotPollerResponse, error)` -- Function `*WebAppsClient.GetFtpAllowedSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetFtpAllowedSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetFtpAllowedSlotOptions)` -- Function `*WebAppsClient.GetFtpAllowedSlot` return value(s) have been changed from `(WebAppsGetFtpAllowedSlotResponse, error)` to `(WebAppsClientGetFtpAllowedSlotResponse, error)` -- Function `*WebAppsClient.DiscoverBackup` parameter(s) have been changed from `(context.Context, string, string, RestoreRequest, *WebAppsDiscoverBackupOptions)` to `(context.Context, string, string, RestoreRequest, *WebAppsClientDiscoverBackupOptions)` -- Function `*WebAppsClient.DiscoverBackup` return value(s) have been changed from `(WebAppsDiscoverBackupResponse, error)` to `(WebAppsClientDiscoverBackupResponse, error)` -- Function `*WebAppsClient.DeleteSiteExtensionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteSiteExtensionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteSiteExtensionSlotOptions)` -- Function `*WebAppsClient.DeleteSiteExtensionSlot` return value(s) have been changed from `(WebAppsDeleteSiteExtensionSlotResponse, error)` to `(WebAppsClientDeleteSiteExtensionSlotResponse, error)` -- Function `*WebAppsClient.BeginListPublishingCredentials` parameter(s) have been changed from `(context.Context, string, string, *WebAppsBeginListPublishingCredentialsOptions)` to `(context.Context, string, string, *WebAppsClientBeginListPublishingCredentialsOptions)` -- Function `*WebAppsClient.BeginListPublishingCredentials` return value(s) have been changed from `(WebAppsListPublishingCredentialsPollerResponse, error)` to `(WebAppsClientListPublishingCredentialsPollerResponse, error)` -- Function `*WebAppsClient.GetContinuousWebJob` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetContinuousWebJobOptions)` to `(context.Context, string, string, string, *WebAppsClientGetContinuousWebJobOptions)` -- Function `*WebAppsClient.GetContinuousWebJob` return value(s) have been changed from `(WebAppsGetContinuousWebJobResponse, error)` to `(WebAppsClientGetContinuousWebJobResponse, error)` -- Function `*WebAppsClient.ListInstanceProcesses` parameter(s) have been changed from `(string, string, string, *WebAppsListInstanceProcessesOptions)` to `(string, string, string, *WebAppsClientListInstanceProcessesOptions)` -- Function `*WebAppsClient.ListInstanceProcesses` return value(s) have been changed from `(*WebAppsListInstanceProcessesPager)` to `(*WebAppsClientListInstanceProcessesPager)` -- Function `*WebAppsClient.DeleteHostNameBinding` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteHostNameBindingOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteHostNameBindingOptions)` -- Function `*WebAppsClient.DeleteHostNameBinding` return value(s) have been changed from `(WebAppsDeleteHostNameBindingResponse, error)` to `(WebAppsClientDeleteHostNameBindingResponse, error)` -- Function `*DiagnosticsClient.GetSiteDetector` parameter(s) have been changed from `(context.Context, string, string, string, string, *DiagnosticsGetSiteDetectorOptions)` to `(context.Context, string, string, string, string, *DiagnosticsClientGetSiteDetectorOptions)` -- Function `*DiagnosticsClient.GetSiteDetector` return value(s) have been changed from `(DiagnosticsGetSiteDetectorResponse, error)` to `(DiagnosticsClientGetSiteDetectorResponse, error)` -- Function `*WebAppsClient.UpdateAuthSettingsV2Slot` parameter(s) have been changed from `(context.Context, string, string, string, SiteAuthSettingsV2, *WebAppsUpdateAuthSettingsV2SlotOptions)` to `(context.Context, string, string, string, SiteAuthSettingsV2, *WebAppsClientUpdateAuthSettingsV2SlotOptions)` -- Function `*WebAppsClient.UpdateAuthSettingsV2Slot` return value(s) have been changed from `(WebAppsUpdateAuthSettingsV2SlotResponse, error)` to `(WebAppsClientUpdateAuthSettingsV2SlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdatePublicCertificateSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, PublicCertificate, *WebAppsCreateOrUpdatePublicCertificateSlotOptions)` to `(context.Context, string, string, string, string, PublicCertificate, *WebAppsClientCreateOrUpdatePublicCertificateSlotOptions)` -- Function `*WebAppsClient.CreateOrUpdatePublicCertificateSlot` return value(s) have been changed from `(WebAppsCreateOrUpdatePublicCertificateSlotResponse, error)` to `(WebAppsClientCreateOrUpdatePublicCertificateSlotResponse, error)` -- Function `*StaticSitesClient.GetPrivateEndpointConnectionList` parameter(s) have been changed from `(string, string, *StaticSitesGetPrivateEndpointConnectionListOptions)` to `(string, string, *StaticSitesClientGetPrivateEndpointConnectionListOptions)` -- Function `*StaticSitesClient.GetPrivateEndpointConnectionList` return value(s) have been changed from `(*StaticSitesGetPrivateEndpointConnectionListPager)` to `(*StaticSitesClientGetPrivateEndpointConnectionListPager)` -- Function `*WebAppsClient.BeginRestoreSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, RestoreRequest, *WebAppsBeginRestoreSlotOptions)` to `(context.Context, string, string, string, string, RestoreRequest, *WebAppsClientBeginRestoreSlotOptions)` -- Function `*WebAppsClient.BeginRestoreSlot` return value(s) have been changed from `(WebAppsRestoreSlotPollerResponse, error)` to `(WebAppsClientRestoreSlotPollerResponse, error)` -- Function `*WebAppsClient.DeleteHostSecret` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteHostSecretOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteHostSecretOptions)` -- Function `*WebAppsClient.DeleteHostSecret` return value(s) have been changed from `(WebAppsDeleteHostSecretResponse, error)` to `(WebAppsClientDeleteHostSecretResponse, error)` -- Function `*StaticSitesClient.ListStaticSiteBuildFunctionAppSettings` parameter(s) have been changed from `(context.Context, string, string, string, *StaticSitesListStaticSiteBuildFunctionAppSettingsOptions)` to `(context.Context, string, string, string, *StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions)` -- Function `*StaticSitesClient.ListStaticSiteBuildFunctionAppSettings` return value(s) have been changed from `(StaticSitesListStaticSiteBuildFunctionAppSettingsResponse, error)` to `(StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse, error)` -- Function `*WebAppsClient.DeleteBackupConfigurationSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteBackupConfigurationSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteBackupConfigurationSlotOptions)` -- Function `*WebAppsClient.DeleteBackupConfigurationSlot` return value(s) have been changed from `(WebAppsDeleteBackupConfigurationSlotResponse, error)` to `(WebAppsClientDeleteBackupConfigurationSlotResponse, error)` -- Function `*WebAppsClient.GetConfiguration` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetConfigurationOptions)` to `(context.Context, string, string, *WebAppsClientGetConfigurationOptions)` -- Function `*WebAppsClient.GetConfiguration` return value(s) have been changed from `(WebAppsGetConfigurationResponse, error)` to `(WebAppsClientGetConfigurationResponse, error)` -- Function `*StaticSitesClient.GetStaticSiteBuilds` parameter(s) have been changed from `(string, string, *StaticSitesGetStaticSiteBuildsOptions)` to `(string, string, *StaticSitesClientGetStaticSiteBuildsOptions)` -- Function `*StaticSitesClient.GetStaticSiteBuilds` return value(s) have been changed from `(*StaticSitesGetStaticSiteBuildsPager)` to `(*StaticSitesClientGetStaticSiteBuildsPager)` -- Function `*WebAppsClient.ListPremierAddOnsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListPremierAddOnsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListPremierAddOnsSlotOptions)` -- Function `*WebAppsClient.ListPremierAddOnsSlot` return value(s) have been changed from `(WebAppsListPremierAddOnsSlotResponse, error)` to `(WebAppsClientListPremierAddOnsSlotResponse, error)` -- Function `*WebAppsClient.DeleteInstanceProcessSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsDeleteInstanceProcessSlotOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientDeleteInstanceProcessSlotOptions)` -- Function `*WebAppsClient.DeleteInstanceProcessSlot` return value(s) have been changed from `(WebAppsDeleteInstanceProcessSlotResponse, error)` to `(WebAppsClientDeleteInstanceProcessSlotResponse, error)` -- Function `*DiagnosticsClient.GetSiteDetectorSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *DiagnosticsGetSiteDetectorSlotOptions)` to `(context.Context, string, string, string, string, string, *DiagnosticsClientGetSiteDetectorSlotOptions)` -- Function `*DiagnosticsClient.GetSiteDetectorSlot` return value(s) have been changed from `(DiagnosticsGetSiteDetectorSlotResponse, error)` to `(DiagnosticsClientGetSiteDetectorSlotResponse, error)` -- Function `*WebAppsClient.ListConnectionStrings` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListConnectionStringsOptions)` to `(context.Context, string, string, *WebAppsClientListConnectionStringsOptions)` -- Function `*WebAppsClient.ListConnectionStrings` return value(s) have been changed from `(WebAppsListConnectionStringsResponse, error)` to `(WebAppsClientListConnectionStringsResponse, error)` -- Function `*WebAppsClient.GetSourceControl` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetSourceControlOptions)` to `(context.Context, string, string, *WebAppsClientGetSourceControlOptions)` -- Function `*WebAppsClient.GetSourceControl` return value(s) have been changed from `(WebAppsGetSourceControlResponse, error)` to `(WebAppsClientGetSourceControlResponse, error)` -- Function `*DomainsClient.GetOwnershipIdentifier` parameter(s) have been changed from `(context.Context, string, string, string, *DomainsGetOwnershipIdentifierOptions)` to `(context.Context, string, string, string, *DomainsClientGetOwnershipIdentifierOptions)` -- Function `*DomainsClient.GetOwnershipIdentifier` return value(s) have been changed from `(DomainsGetOwnershipIdentifierResponse, error)` to `(DomainsClientGetOwnershipIdentifierResponse, error)` -- Function `*WebAppsClient.SyncFunctionsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsSyncFunctionsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientSyncFunctionsSlotOptions)` -- Function `*WebAppsClient.SyncFunctionsSlot` return value(s) have been changed from `(WebAppsSyncFunctionsSlotResponse, error)` to `(WebAppsClientSyncFunctionsSlotResponse, error)` -- Function `*WebAppsClient.GetPremierAddOnSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetPremierAddOnSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetPremierAddOnSlotOptions)` -- Function `*WebAppsClient.GetPremierAddOnSlot` return value(s) have been changed from `(WebAppsGetPremierAddOnSlotResponse, error)` to `(WebAppsClientGetPremierAddOnSlotResponse, error)` -- Function `*DeletedWebAppsClient.GetDeletedWebAppByLocation` parameter(s) have been changed from `(context.Context, string, string, *DeletedWebAppsGetDeletedWebAppByLocationOptions)` to `(context.Context, string, string, *DeletedWebAppsClientGetDeletedWebAppByLocationOptions)` -- Function `*DeletedWebAppsClient.GetDeletedWebAppByLocation` return value(s) have been changed from `(DeletedWebAppsGetDeletedWebAppByLocationResponse, error)` to `(DeletedWebAppsClientGetDeletedWebAppByLocationResponse, error)` -- Function `*WebAppsClient.StartContinuousWebJob` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsStartContinuousWebJobOptions)` to `(context.Context, string, string, string, *WebAppsClientStartContinuousWebJobOptions)` -- Function `*WebAppsClient.StartContinuousWebJob` return value(s) have been changed from `(WebAppsStartContinuousWebJobResponse, error)` to `(WebAppsClientStartContinuousWebJobResponse, error)` -- Function `*WebAppsClient.StopNetworkTraceSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsStopNetworkTraceSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientStopNetworkTraceSlotOptions)` -- Function `*WebAppsClient.StopNetworkTraceSlot` return value(s) have been changed from `(WebAppsStopNetworkTraceSlotResponse, error)` to `(WebAppsClientStopNetworkTraceSlotResponse, error)` -- Function `*CertificateRegistrationProviderClient.ListOperations` parameter(s) have been changed from `(*CertificateRegistrationProviderListOperationsOptions)` to `(*CertificateRegistrationProviderClientListOperationsOptions)` -- Function `*CertificateRegistrationProviderClient.ListOperations` return value(s) have been changed from `(*CertificateRegistrationProviderListOperationsPager)` to `(*CertificateRegistrationProviderClientListOperationsPager)` -- Function `*WebAppsClient.GetInstanceProcessDump` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetInstanceProcessDumpOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetInstanceProcessDumpOptions)` -- Function `*WebAppsClient.GetInstanceProcessDump` return value(s) have been changed from `(WebAppsGetInstanceProcessDumpResponse, error)` to `(WebAppsClientGetInstanceProcessDumpResponse, error)` -- Function `*WebAppsClient.ListProcesses` parameter(s) have been changed from `(string, string, *WebAppsListProcessesOptions)` to `(string, string, *WebAppsClientListProcessesOptions)` -- Function `*WebAppsClient.ListProcesses` return value(s) have been changed from `(*WebAppsListProcessesPager)` to `(*WebAppsClientListProcessesPager)` -- Function `*WebAppsClient.ListHostKeys` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListHostKeysOptions)` to `(context.Context, string, string, *WebAppsClientListHostKeysOptions)` -- Function `*WebAppsClient.ListHostKeys` return value(s) have been changed from `(WebAppsListHostKeysResponse, error)` to `(WebAppsClientListHostKeysResponse, error)` -- Function `*KubeEnvironmentsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *KubeEnvironmentsGetOptions)` to `(context.Context, string, string, *KubeEnvironmentsClientGetOptions)` -- Function `*KubeEnvironmentsClient.Get` return value(s) have been changed from `(KubeEnvironmentsGetResponse, error)` to `(KubeEnvironmentsClientGetResponse, error)` -- Function `*WebAppsClient.BeginCreateMSDeployOperation` parameter(s) have been changed from `(context.Context, string, string, MSDeploy, *WebAppsBeginCreateMSDeployOperationOptions)` to `(context.Context, string, string, MSDeploy, *WebAppsClientBeginCreateMSDeployOperationOptions)` -- Function `*WebAppsClient.BeginCreateMSDeployOperation` return value(s) have been changed from `(WebAppsCreateMSDeployOperationPollerResponse, error)` to `(WebAppsClientCreateMSDeployOperationPollerResponse, error)` -- Function `*ResourceHealthMetadataClient.ListByResourceGroup` parameter(s) have been changed from `(string, *ResourceHealthMetadataListByResourceGroupOptions)` to `(string, *ResourceHealthMetadataClientListByResourceGroupOptions)` -- Function `*ResourceHealthMetadataClient.ListByResourceGroup` return value(s) have been changed from `(*ResourceHealthMetadataListByResourceGroupPager)` to `(*ResourceHealthMetadataClientListByResourceGroupPager)` -- Function `*WebAppsClient.StopWebSiteNetworkTraceSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsStopWebSiteNetworkTraceSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientStopWebSiteNetworkTraceSlotOptions)` -- Function `*WebAppsClient.StopWebSiteNetworkTraceSlot` return value(s) have been changed from `(WebAppsStopWebSiteNetworkTraceSlotResponse, error)` to `(WebAppsClientStopWebSiteNetworkTraceSlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateFunctionSecretSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, KeyInfo, *WebAppsCreateOrUpdateFunctionSecretSlotOptions)` to `(context.Context, string, string, string, string, string, KeyInfo, *WebAppsClientCreateOrUpdateFunctionSecretSlotOptions)` -- Function `*WebAppsClient.CreateOrUpdateFunctionSecretSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateFunctionSecretSlotResponse, error)` to `(WebAppsClientCreateOrUpdateFunctionSecretSlotResponse, error)` -- Function `*WebAppsClient.GetProcessDump` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetProcessDumpOptions)` to `(context.Context, string, string, string, *WebAppsClientGetProcessDumpOptions)` -- Function `*WebAppsClient.GetProcessDump` return value(s) have been changed from `(WebAppsGetProcessDumpResponse, error)` to `(WebAppsClientGetProcessDumpResponse, error)` -- Function `*WebAppsClient.ApplySlotConfigToProduction` parameter(s) have been changed from `(context.Context, string, string, CsmSlotEntity, *WebAppsApplySlotConfigToProductionOptions)` to `(context.Context, string, string, CsmSlotEntity, *WebAppsClientApplySlotConfigToProductionOptions)` -- Function `*WebAppsClient.ApplySlotConfigToProduction` return value(s) have been changed from `(WebAppsApplySlotConfigToProductionResponse, error)` to `(WebAppsClientApplySlotConfigToProductionResponse, error)` -- Function `*WebAppsClient.IsCloneable` parameter(s) have been changed from `(context.Context, string, string, *WebAppsIsCloneableOptions)` to `(context.Context, string, string, *WebAppsClientIsCloneableOptions)` -- Function `*WebAppsClient.IsCloneable` return value(s) have been changed from `(WebAppsIsCloneableResponse, error)` to `(WebAppsClientIsCloneableResponse, error)` -- Function `*StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings` parameter(s) have been changed from `(context.Context, string, string, string, StringDictionary, *StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsOptions)` to `(context.Context, string, string, string, StringDictionary, *StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions)` -- Function `*StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings` return value(s) have been changed from `(StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsResponse, error)` to `(StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse, error)` -- Function `*StaticSitesClient.BeginDeletePrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, *StaticSitesBeginDeletePrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, *StaticSitesClientBeginDeletePrivateEndpointConnectionOptions)` -- Function `*StaticSitesClient.BeginDeletePrivateEndpointConnection` return value(s) have been changed from `(StaticSitesDeletePrivateEndpointConnectionPollerResponse, error)` to `(StaticSitesClientDeletePrivateEndpointConnectionPollerResponse, error)` -- Function `*WebAppsClient.ListHybridConnectionsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListHybridConnectionsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListHybridConnectionsSlotOptions)` -- Function `*WebAppsClient.ListHybridConnectionsSlot` return value(s) have been changed from `(WebAppsListHybridConnectionsSlotResponse, error)` to `(WebAppsClientListHybridConnectionsSlotResponse, error)` -- Function `*GlobalClient.GetSubscriptionOperationWithAsyncResponse` parameter(s) have been changed from `(context.Context, string, string, *GlobalGetSubscriptionOperationWithAsyncResponseOptions)` to `(context.Context, string, string, *GlobalClientGetSubscriptionOperationWithAsyncResponseOptions)` -- Function `*GlobalClient.GetSubscriptionOperationWithAsyncResponse` return value(s) have been changed from `(GlobalGetSubscriptionOperationWithAsyncResponseResponse, error)` to `(GlobalClientGetSubscriptionOperationWithAsyncResponseResponse, error)` -- Function `*DomainsClient.Renew` parameter(s) have been changed from `(context.Context, string, string, *DomainsRenewOptions)` to `(context.Context, string, string, *DomainsClientRenewOptions)` -- Function `*DomainsClient.Renew` return value(s) have been changed from `(DomainsRenewResponse, error)` to `(DomainsClientRenewResponse, error)` -- Function `*WebAppsClient.ListWebJobsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListWebJobsSlotOptions)` to `(string, string, string, *WebAppsClientListWebJobsSlotOptions)` -- Function `*WebAppsClient.ListWebJobsSlot` return value(s) have been changed from `(*WebAppsListWebJobsSlotPager)` to `(*WebAppsClientListWebJobsSlotPager)` -- Function `*WebAppsClient.BeginStartNetworkTraceSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsBeginStartNetworkTraceSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientBeginStartNetworkTraceSlotOptions)` -- Function `*WebAppsClient.BeginStartNetworkTraceSlot` return value(s) have been changed from `(WebAppsStartNetworkTraceSlotPollerResponse, error)` to `(WebAppsClientStartNetworkTraceSlotPollerResponse, error)` -- Function `*WebAppsClient.DiscoverBackupSlot` parameter(s) have been changed from `(context.Context, string, string, string, RestoreRequest, *WebAppsDiscoverBackupSlotOptions)` to `(context.Context, string, string, string, RestoreRequest, *WebAppsClientDiscoverBackupSlotOptions)` -- Function `*WebAppsClient.DiscoverBackupSlot` return value(s) have been changed from `(WebAppsDiscoverBackupSlotResponse, error)` to `(WebAppsClientDiscoverBackupSlotResponse, error)` -- Function `*WebAppsClient.DeleteSiteExtension` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteSiteExtensionOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteSiteExtensionOptions)` -- Function `*WebAppsClient.DeleteSiteExtension` return value(s) have been changed from `(WebAppsDeleteSiteExtensionResponse, error)` to `(WebAppsClientDeleteSiteExtensionResponse, error)` -- Function `*WebAppsClient.ListInstanceProcessThreads` parameter(s) have been changed from `(string, string, string, string, *WebAppsListInstanceProcessThreadsOptions)` to `(string, string, string, string, *WebAppsClientListInstanceProcessThreadsOptions)` -- Function `*WebAppsClient.ListInstanceProcessThreads` return value(s) have been changed from `(*WebAppsListInstanceProcessThreadsPager)` to `(*WebAppsClientListInstanceProcessThreadsPager)` -- Function `*WebAppsClient.BeginStartNetworkTrace` parameter(s) have been changed from `(context.Context, string, string, *WebAppsBeginStartNetworkTraceOptions)` to `(context.Context, string, string, *WebAppsClientBeginStartNetworkTraceOptions)` -- Function `*WebAppsClient.BeginStartNetworkTrace` return value(s) have been changed from `(WebAppsStartNetworkTracePollerResponse, error)` to `(WebAppsClientStartNetworkTracePollerResponse, error)` -- Function `*WebAppsClient.DeleteTriggeredWebJob` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteTriggeredWebJobOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteTriggeredWebJobOptions)` -- Function `*WebAppsClient.DeleteTriggeredWebJob` return value(s) have been changed from `(WebAppsDeleteTriggeredWebJobResponse, error)` to `(WebAppsClientDeleteTriggeredWebJobResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateFunctionSecret` parameter(s) have been changed from `(context.Context, string, string, string, string, KeyInfo, *WebAppsCreateOrUpdateFunctionSecretOptions)` to `(context.Context, string, string, string, string, KeyInfo, *WebAppsClientCreateOrUpdateFunctionSecretOptions)` -- Function `*WebAppsClient.CreateOrUpdateFunctionSecret` return value(s) have been changed from `(WebAppsCreateOrUpdateFunctionSecretResponse, error)` to `(WebAppsClientCreateOrUpdateFunctionSecretResponse, error)` -- Function `*StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *StaticSitesBeginApproveOrRejectPrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` -- Function `*StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection` return value(s) have been changed from `(StaticSitesApproveOrRejectPrivateEndpointConnectionPollerResponse, error)` to `(StaticSitesClientApproveOrRejectPrivateEndpointConnectionPollerResponse, error)` -- Function `*KubeEnvironmentsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, KubeEnvironment, *KubeEnvironmentsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, KubeEnvironment, *KubeEnvironmentsClientBeginCreateOrUpdateOptions)` -- Function `*KubeEnvironmentsClient.BeginCreateOrUpdate` return value(s) have been changed from `(KubeEnvironmentsCreateOrUpdatePollerResponse, error)` to `(KubeEnvironmentsClientCreateOrUpdatePollerResponse, error)` -- Function `*WebAppsClient.GetPrivateEndpointConnectionListSlot` parameter(s) have been changed from `(string, string, string, *WebAppsGetPrivateEndpointConnectionListSlotOptions)` to `(string, string, string, *WebAppsClientGetPrivateEndpointConnectionListSlotOptions)` -- Function `*WebAppsClient.GetPrivateEndpointConnectionListSlot` return value(s) have been changed from `(*WebAppsGetPrivateEndpointConnectionListSlotPager)` to `(*WebAppsClientGetPrivateEndpointConnectionListSlotPager)` -- Function `*WebAppsClient.BeginRestoreFromDeletedAppSlot` parameter(s) have been changed from `(context.Context, string, string, string, DeletedAppRestoreRequest, *WebAppsBeginRestoreFromDeletedAppSlotOptions)` to `(context.Context, string, string, string, DeletedAppRestoreRequest, *WebAppsClientBeginRestoreFromDeletedAppSlotOptions)` -- Function `*WebAppsClient.BeginRestoreFromDeletedAppSlot` return value(s) have been changed from `(WebAppsRestoreFromDeletedAppSlotPollerResponse, error)` to `(WebAppsClientRestoreFromDeletedAppSlotPollerResponse, error)` -- Function `*DomainsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *DomainsGetOptions)` to `(context.Context, string, string, *DomainsClientGetOptions)` -- Function `*DomainsClient.Get` return value(s) have been changed from `(DomainsGetResponse, error)` to `(DomainsClientGetResponse, error)` -- Function `*WebAppsClient.BeginSwapSlotWithProduction` parameter(s) have been changed from `(context.Context, string, string, CsmSlotEntity, *WebAppsBeginSwapSlotWithProductionOptions)` to `(context.Context, string, string, CsmSlotEntity, *WebAppsClientBeginSwapSlotWithProductionOptions)` -- Function `*WebAppsClient.BeginSwapSlotWithProduction` return value(s) have been changed from `(WebAppsSwapSlotWithProductionPollerResponse, error)` to `(WebAppsClientSwapSlotWithProductionPollerResponse, error)` -- Function `*WebAppsClient.ListRelayServiceConnectionsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListRelayServiceConnectionsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListRelayServiceConnectionsSlotOptions)` -- Function `*WebAppsClient.ListRelayServiceConnectionsSlot` return value(s) have been changed from `(WebAppsListRelayServiceConnectionsSlotResponse, error)` to `(WebAppsClientListRelayServiceConnectionsSlotResponse, error)` -- Function `*WebAppsClient.DeleteSourceControl` parameter(s) have been changed from `(context.Context, string, string, *WebAppsDeleteSourceControlOptions)` to `(context.Context, string, string, *WebAppsClientDeleteSourceControlOptions)` -- Function `*WebAppsClient.DeleteSourceControl` return value(s) have been changed from `(WebAppsDeleteSourceControlResponse, error)` to `(WebAppsClientDeleteSourceControlResponse, error)` -- Function `*StaticSitesClient.ListStaticSiteUsers` parameter(s) have been changed from `(string, string, string, *StaticSitesListStaticSiteUsersOptions)` to `(string, string, string, *StaticSitesClientListStaticSiteUsersOptions)` -- Function `*StaticSitesClient.ListStaticSiteUsers` return value(s) have been changed from `(*StaticSitesListStaticSiteUsersPager)` to `(*StaticSitesClientListStaticSiteUsersPager)` -- Function `*WebAppsClient.Backup` parameter(s) have been changed from `(context.Context, string, string, BackupRequest, *WebAppsBackupOptions)` to `(context.Context, string, string, BackupRequest, *WebAppsClientBackupOptions)` -- Function `*WebAppsClient.Backup` return value(s) have been changed from `(WebAppsBackupResponse, error)` to `(WebAppsClientBackupResponse, error)` -- Function `*WebAppsClient.UpdateAzureStorageAccountsSlot` parameter(s) have been changed from `(context.Context, string, string, string, AzureStoragePropertyDictionaryResource, *WebAppsUpdateAzureStorageAccountsSlotOptions)` to `(context.Context, string, string, string, AzureStoragePropertyDictionaryResource, *WebAppsClientUpdateAzureStorageAccountsSlotOptions)` -- Function `*WebAppsClient.UpdateAzureStorageAccountsSlot` return value(s) have been changed from `(WebAppsUpdateAzureStorageAccountsSlotResponse, error)` to `(WebAppsClientUpdateAzureStorageAccountsSlotResponse, error)` -- Function `*WebAppsClient.GetFunction` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetFunctionOptions)` to `(context.Context, string, string, string, *WebAppsClientGetFunctionOptions)` -- Function `*WebAppsClient.GetFunction` return value(s) have been changed from `(WebAppsGetFunctionResponse, error)` to `(WebAppsClientGetFunctionResponse, error)` -- Function `*WebAppsClient.GetProcessSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetProcessSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetProcessSlotOptions)` -- Function `*WebAppsClient.GetProcessSlot` return value(s) have been changed from `(WebAppsGetProcessSlotResponse, error)` to `(WebAppsClientGetProcessSlotResponse, error)` -- Function `*WebAppsClient.UpdateSourceControlSlot` parameter(s) have been changed from `(context.Context, string, string, string, SiteSourceControl, *WebAppsUpdateSourceControlSlotOptions)` to `(context.Context, string, string, string, SiteSourceControl, *WebAppsClientUpdateSourceControlSlotOptions)` -- Function `*WebAppsClient.UpdateSourceControlSlot` return value(s) have been changed from `(WebAppsUpdateSourceControlSlotResponse, error)` to `(WebAppsClientUpdateSourceControlSlotResponse, error)` -- Function `*WebAppsClient.ListApplicationSettings` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListApplicationSettingsOptions)` to `(context.Context, string, string, *WebAppsClientListApplicationSettingsOptions)` -- Function `*WebAppsClient.ListApplicationSettings` return value(s) have been changed from `(WebAppsListApplicationSettingsResponse, error)` to `(WebAppsClientListApplicationSettingsResponse, error)` -- Function `*WebAppsClient.BeginCreateInstanceFunctionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, FunctionEnvelope, *WebAppsBeginCreateInstanceFunctionSlotOptions)` to `(context.Context, string, string, string, string, FunctionEnvelope, *WebAppsClientBeginCreateInstanceFunctionSlotOptions)` -- Function `*WebAppsClient.BeginCreateInstanceFunctionSlot` return value(s) have been changed from `(WebAppsCreateInstanceFunctionSlotPollerResponse, error)` to `(WebAppsClientCreateInstanceFunctionSlotPollerResponse, error)` -- Function `*WebAppsClient.ListUsages` parameter(s) have been changed from `(string, string, *WebAppsListUsagesOptions)` to `(string, string, *WebAppsClientListUsagesOptions)` -- Function `*WebAppsClient.ListUsages` return value(s) have been changed from `(*WebAppsListUsagesPager)` to `(*WebAppsClientListUsagesPager)` -- Function `*WebAppsClient.GetSitePhpErrorLogFlag` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetSitePhpErrorLogFlagOptions)` to `(context.Context, string, string, *WebAppsClientGetSitePhpErrorLogFlagOptions)` -- Function `*WebAppsClient.GetSitePhpErrorLogFlag` return value(s) have been changed from `(WebAppsGetSitePhpErrorLogFlagResponse, error)` to `(WebAppsClientGetSitePhpErrorLogFlagResponse, error)` -- Function `*WebAppsClient.DeleteBackup` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteBackupOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteBackupOptions)` -- Function `*WebAppsClient.DeleteBackup` return value(s) have been changed from `(WebAppsDeleteBackupResponse, error)` to `(WebAppsClientDeleteBackupResponse, error)` -- Function `*DomainsClient.CheckAvailability` parameter(s) have been changed from `(context.Context, NameIdentifier, *DomainsCheckAvailabilityOptions)` to `(context.Context, NameIdentifier, *DomainsClientCheckAvailabilityOptions)` -- Function `*DomainsClient.CheckAvailability` return value(s) have been changed from `(DomainsCheckAvailabilityResponse, error)` to `(DomainsClientCheckAvailabilityResponse, error)` -- Function `*WebAppsClient.GetMigrateMySQLStatusSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetMigrateMySQLStatusSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetMigrateMySQLStatusSlotOptions)` -- Function `*WebAppsClient.GetMigrateMySQLStatusSlot` return value(s) have been changed from `(WebAppsGetMigrateMySQLStatusSlotResponse, error)` to `(WebAppsClientGetMigrateMySQLStatusSlotResponse, error)` -- Function `*WebAppsClient.ListConfigurationSnapshotInfo` parameter(s) have been changed from `(string, string, *WebAppsListConfigurationSnapshotInfoOptions)` to `(string, string, *WebAppsClientListConfigurationSnapshotInfoOptions)` -- Function `*WebAppsClient.ListConfigurationSnapshotInfo` return value(s) have been changed from `(*WebAppsListConfigurationSnapshotInfoPager)` to `(*WebAppsClientListConfigurationSnapshotInfoPager)` -- Function `*WebAppsClient.ListWebJobs` parameter(s) have been changed from `(string, string, *WebAppsListWebJobsOptions)` to `(string, string, *WebAppsClientListWebJobsOptions)` -- Function `*WebAppsClient.ListWebJobs` return value(s) have been changed from `(*WebAppsListWebJobsPager)` to `(*WebAppsClientListWebJobsPager)` -- Function `*DomainsClient.UpdateOwnershipIdentifier` parameter(s) have been changed from `(context.Context, string, string, string, DomainOwnershipIdentifier, *DomainsUpdateOwnershipIdentifierOptions)` to `(context.Context, string, string, string, DomainOwnershipIdentifier, *DomainsClientUpdateOwnershipIdentifierOptions)` -- Function `*DomainsClient.UpdateOwnershipIdentifier` return value(s) have been changed from `(DomainsUpdateOwnershipIdentifierResponse, error)` to `(DomainsClientUpdateOwnershipIdentifierResponse, error)` -- Function `*WebAppsClient.BeginRestoreSnapshotSlot` parameter(s) have been changed from `(context.Context, string, string, string, SnapshotRestoreRequest, *WebAppsBeginRestoreSnapshotSlotOptions)` to `(context.Context, string, string, string, SnapshotRestoreRequest, *WebAppsClientBeginRestoreSnapshotSlotOptions)` -- Function `*WebAppsClient.BeginRestoreSnapshotSlot` return value(s) have been changed from `(WebAppsRestoreSnapshotSlotPollerResponse, error)` to `(WebAppsClientRestoreSnapshotSlotPollerResponse, error)` -- Function `*WebAppsClient.GetInstanceMsDeployStatusSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetInstanceMsDeployStatusSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetInstanceMsDeployStatusSlotOptions)` -- Function `*WebAppsClient.GetInstanceMsDeployStatusSlot` return value(s) have been changed from `(WebAppsGetInstanceMsDeployStatusSlotResponse, error)` to `(WebAppsClientGetInstanceMsDeployStatusSlotResponse, error)` -- Function `*WebAppsClient.DeletePublicCertificate` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeletePublicCertificateOptions)` to `(context.Context, string, string, string, *WebAppsClientDeletePublicCertificateOptions)` -- Function `*WebAppsClient.DeletePublicCertificate` return value(s) have been changed from `(WebAppsDeletePublicCertificateResponse, error)` to `(WebAppsClientDeletePublicCertificateResponse, error)` -- Function `*WebAppsClient.UpdateHybridConnection` parameter(s) have been changed from `(context.Context, string, string, string, string, HybridConnection, *WebAppsUpdateHybridConnectionOptions)` to `(context.Context, string, string, string, string, HybridConnection, *WebAppsClientUpdateHybridConnectionOptions)` -- Function `*WebAppsClient.UpdateHybridConnection` return value(s) have been changed from `(WebAppsUpdateHybridConnectionResponse, error)` to `(WebAppsClientUpdateHybridConnectionResponse, error)` -- Function `*WebAppsClient.GetSiteExtensionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetSiteExtensionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetSiteExtensionSlotOptions)` -- Function `*WebAppsClient.GetSiteExtensionSlot` return value(s) have been changed from `(WebAppsGetSiteExtensionSlotResponse, error)` to `(WebAppsClientGetSiteExtensionSlotResponse, error)` -- Function `*WebAppsClient.GetSitePhpErrorLogFlagSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetSitePhpErrorLogFlagSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetSitePhpErrorLogFlagSlotOptions)` -- Function `*WebAppsClient.GetSitePhpErrorLogFlagSlot` return value(s) have been changed from `(WebAppsGetSitePhpErrorLogFlagSlotResponse, error)` to `(WebAppsClientGetSitePhpErrorLogFlagSlotResponse, error)` -- Function `*WebAppsClient.BeginDeletePrivateEndpointConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsBeginDeletePrivateEndpointConnectionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions)` -- Function `*WebAppsClient.BeginDeletePrivateEndpointConnectionSlot` return value(s) have been changed from `(WebAppsDeletePrivateEndpointConnectionSlotPollerResponse, error)` to `(WebAppsClientDeletePrivateEndpointConnectionSlotPollerResponse, error)` -- Function `*WebAppsClient.UpdateSitePushSettings` parameter(s) have been changed from `(context.Context, string, string, PushSettings, *WebAppsUpdateSitePushSettingsOptions)` to `(context.Context, string, string, PushSettings, *WebAppsClientUpdateSitePushSettingsOptions)` -- Function `*WebAppsClient.UpdateSitePushSettings` return value(s) have been changed from `(WebAppsUpdateSitePushSettingsResponse, error)` to `(WebAppsClientUpdateSitePushSettingsResponse, error)` -- Function `*WebAppsClient.ListHostNameBindingsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListHostNameBindingsSlotOptions)` to `(string, string, string, *WebAppsClientListHostNameBindingsSlotOptions)` -- Function `*WebAppsClient.ListHostNameBindingsSlot` return value(s) have been changed from `(*WebAppsListHostNameBindingsSlotPager)` to `(*WebAppsClientListHostNameBindingsSlotPager)` -- Function `*DiagnosticsClient.GetSiteDiagnosticCategorySlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *DiagnosticsGetSiteDiagnosticCategorySlotOptions)` to `(context.Context, string, string, string, string, *DiagnosticsClientGetSiteDiagnosticCategorySlotOptions)` -- Function `*DiagnosticsClient.GetSiteDiagnosticCategorySlot` return value(s) have been changed from `(DiagnosticsGetSiteDiagnosticCategorySlotResponse, error)` to `(DiagnosticsClientGetSiteDiagnosticCategorySlotResponse, error)` -- Function `*DiagnosticsClient.ListHostingEnvironmentDetectorResponses` parameter(s) have been changed from `(string, string, *DiagnosticsListHostingEnvironmentDetectorResponsesOptions)` to `(string, string, *DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions)` -- Function `*DiagnosticsClient.ListHostingEnvironmentDetectorResponses` return value(s) have been changed from `(*DiagnosticsListHostingEnvironmentDetectorResponsesPager)` to `(*DiagnosticsClientListHostingEnvironmentDetectorResponsesPager)` -- Function `*KubeEnvironmentsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *KubeEnvironmentsBeginDeleteOptions)` to `(context.Context, string, string, *KubeEnvironmentsClientBeginDeleteOptions)` -- Function `*KubeEnvironmentsClient.BeginDelete` return value(s) have been changed from `(KubeEnvironmentsDeletePollerResponse, error)` to `(KubeEnvironmentsClientDeletePollerResponse, error)` -- Function `*WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot` parameter(s) have been changed from `(context.Context, string, string, string, SwiftVirtualNetwork, *WebAppsUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions)` to `(context.Context, string, string, string, SwiftVirtualNetwork, *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions)` -- Function `*WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot` return value(s) have been changed from `(WebAppsUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error)` to `(WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error)` -- Function `*WebAppsClient.ListBasicPublishingCredentialsPoliciesSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListBasicPublishingCredentialsPoliciesSlotOptions)` to `(string, string, string, *WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions)` -- Function `*WebAppsClient.ListBasicPublishingCredentialsPoliciesSlot` return value(s) have been changed from `(*WebAppsListBasicPublishingCredentialsPoliciesSlotPager)` to `(*WebAppsClientListBasicPublishingCredentialsPoliciesSlotPager)` -- Function `*WebAppsClient.GetConfigurationSnapshotSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetConfigurationSnapshotSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetConfigurationSnapshotSlotOptions)` -- Function `*WebAppsClient.GetConfigurationSnapshotSlot` return value(s) have been changed from `(WebAppsGetConfigurationSnapshotSlotResponse, error)` to `(WebAppsClientGetConfigurationSnapshotSlotResponse, error)` -- Function `*WebAppsClient.DeleteInstanceFunctionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteInstanceFunctionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteInstanceFunctionSlotOptions)` -- Function `*WebAppsClient.DeleteInstanceFunctionSlot` return value(s) have been changed from `(WebAppsDeleteInstanceFunctionSlotResponse, error)` to `(WebAppsClientDeleteInstanceFunctionSlotResponse, error)` -- Function `*WebAppsClient.UpdateVnetConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, VnetInfoResource, *WebAppsUpdateVnetConnectionSlotOptions)` to `(context.Context, string, string, string, string, VnetInfoResource, *WebAppsClientUpdateVnetConnectionSlotOptions)` -- Function `*WebAppsClient.UpdateVnetConnectionSlot` return value(s) have been changed from `(WebAppsUpdateVnetConnectionSlotResponse, error)` to `(WebAppsClientUpdateVnetConnectionSlotResponse, error)` -- Function `*WebAppsClient.ListFunctionSecrets` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListFunctionSecretsOptions)` to `(context.Context, string, string, string, *WebAppsClientListFunctionSecretsOptions)` -- Function `*WebAppsClient.ListFunctionSecrets` return value(s) have been changed from `(WebAppsListFunctionSecretsResponse, error)` to `(WebAppsClientListFunctionSecretsResponse, error)` -- Function `*WebAppsClient.UpdateFtpAllowedSlot` parameter(s) have been changed from `(context.Context, string, string, string, CsmPublishingCredentialsPoliciesEntity, *WebAppsUpdateFtpAllowedSlotOptions)` to `(context.Context, string, string, string, CsmPublishingCredentialsPoliciesEntity, *WebAppsClientUpdateFtpAllowedSlotOptions)` -- Function `*WebAppsClient.UpdateFtpAllowedSlot` return value(s) have been changed from `(WebAppsUpdateFtpAllowedSlotResponse, error)` to `(WebAppsClientUpdateFtpAllowedSlotResponse, error)` -- Function `*WebAppsClient.BeginCreateOrUpdateSlot` parameter(s) have been changed from `(context.Context, string, string, string, Site, *WebAppsBeginCreateOrUpdateSlotOptions)` to `(context.Context, string, string, string, Site, *WebAppsClientBeginCreateOrUpdateSlotOptions)` -- Function `*WebAppsClient.BeginCreateOrUpdateSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateSlotPollerResponse, error)` to `(WebAppsClientCreateOrUpdateSlotPollerResponse, error)` -- Function `*WebAppsClient.PutPrivateAccessVnetSlot` parameter(s) have been changed from `(context.Context, string, string, string, PrivateAccess, *WebAppsPutPrivateAccessVnetSlotOptions)` to `(context.Context, string, string, string, PrivateAccess, *WebAppsClientPutPrivateAccessVnetSlotOptions)` -- Function `*WebAppsClient.PutPrivateAccessVnetSlot` return value(s) have been changed from `(WebAppsPutPrivateAccessVnetSlotResponse, error)` to `(WebAppsClientPutPrivateAccessVnetSlotResponse, error)` -- Function `*WebAppsClient.UpdateFtpAllowed` parameter(s) have been changed from `(context.Context, string, string, CsmPublishingCredentialsPoliciesEntity, *WebAppsUpdateFtpAllowedOptions)` to `(context.Context, string, string, CsmPublishingCredentialsPoliciesEntity, *WebAppsClientUpdateFtpAllowedOptions)` -- Function `*WebAppsClient.UpdateFtpAllowed` return value(s) have been changed from `(WebAppsUpdateFtpAllowedResponse, error)` to `(WebAppsClientUpdateFtpAllowedResponse, error)` -- Function `*DiagnosticsClient.ListSiteDetectors` parameter(s) have been changed from `(string, string, string, *DiagnosticsListSiteDetectorsOptions)` to `(string, string, string, *DiagnosticsClientListSiteDetectorsOptions)` -- Function `*DiagnosticsClient.ListSiteDetectors` return value(s) have been changed from `(*DiagnosticsListSiteDetectorsPager)` to `(*DiagnosticsClientListSiteDetectorsPager)` -- Function `*WebAppsClient.GetVnetConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetVnetConnectionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetVnetConnectionSlotOptions)` -- Function `*WebAppsClient.GetVnetConnectionSlot` return value(s) have been changed from `(WebAppsGetVnetConnectionSlotResponse, error)` to `(WebAppsClientGetVnetConnectionSlotResponse, error)` -- Function `*WebAppsClient.ListDomainOwnershipIdentifiersSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListDomainOwnershipIdentifiersSlotOptions)` to `(string, string, string, *WebAppsClientListDomainOwnershipIdentifiersSlotOptions)` -- Function `*WebAppsClient.ListDomainOwnershipIdentifiersSlot` return value(s) have been changed from `(*WebAppsListDomainOwnershipIdentifiersSlotPager)` to `(*WebAppsClientListDomainOwnershipIdentifiersSlotPager)` -- Function `*WebAppsClient.UpdateSourceControl` parameter(s) have been changed from `(context.Context, string, string, SiteSourceControl, *WebAppsUpdateSourceControlOptions)` to `(context.Context, string, string, SiteSourceControl, *WebAppsClientUpdateSourceControlOptions)` -- Function `*WebAppsClient.UpdateSourceControl` return value(s) have been changed from `(WebAppsUpdateSourceControlResponse, error)` to `(WebAppsClientUpdateSourceControlResponse, error)` -- Function `*WebAppsClient.GetConfigurationSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetConfigurationSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetConfigurationSlotOptions)` -- Function `*WebAppsClient.GetConfigurationSlot` return value(s) have been changed from `(WebAppsGetConfigurationSlotResponse, error)` to `(WebAppsClientGetConfigurationSlotResponse, error)` -- Function `*WebAppsClient.DeletePremierAddOn` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeletePremierAddOnOptions)` to `(context.Context, string, string, string, *WebAppsClientDeletePremierAddOnOptions)` -- Function `*WebAppsClient.DeletePremierAddOn` return value(s) have been changed from `(WebAppsDeletePremierAddOnResponse, error)` to `(WebAppsClientDeletePremierAddOnResponse, error)` -- Function `*WebAppsClient.GetPrivateEndpointConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetPrivateEndpointConnectionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetPrivateEndpointConnectionSlotOptions)` -- Function `*WebAppsClient.GetPrivateEndpointConnectionSlot` return value(s) have been changed from `(WebAppsGetPrivateEndpointConnectionSlotResponse, error)` to `(WebAppsClientGetPrivateEndpointConnectionSlotResponse, error)` -- Function `*DiagnosticsClient.ListSiteDetectorResponsesSlot` parameter(s) have been changed from `(string, string, string, *DiagnosticsListSiteDetectorResponsesSlotOptions)` to `(string, string, string, *DiagnosticsClientListSiteDetectorResponsesSlotOptions)` -- Function `*DiagnosticsClient.ListSiteDetectorResponsesSlot` return value(s) have been changed from `(*DiagnosticsListSiteDetectorResponsesSlotPager)` to `(*DiagnosticsClientListSiteDetectorResponsesSlotPager)` -- Function `*WebAppsClient.UpdateVnetConnectionGateway` parameter(s) have been changed from `(context.Context, string, string, string, string, VnetGateway, *WebAppsUpdateVnetConnectionGatewayOptions)` to `(context.Context, string, string, string, string, VnetGateway, *WebAppsClientUpdateVnetConnectionGatewayOptions)` -- Function `*WebAppsClient.UpdateVnetConnectionGateway` return value(s) have been changed from `(WebAppsUpdateVnetConnectionGatewayResponse, error)` to `(WebAppsClientUpdateVnetConnectionGatewayResponse, error)` -- Function `*WebAppsClient.CreateOrUpdatePublicCertificate` parameter(s) have been changed from `(context.Context, string, string, string, PublicCertificate, *WebAppsCreateOrUpdatePublicCertificateOptions)` to `(context.Context, string, string, string, PublicCertificate, *WebAppsClientCreateOrUpdatePublicCertificateOptions)` -- Function `*WebAppsClient.CreateOrUpdatePublicCertificate` return value(s) have been changed from `(WebAppsCreateOrUpdatePublicCertificateResponse, error)` to `(WebAppsClientCreateOrUpdatePublicCertificateResponse, error)` -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReferencesSlot` parameter(s) have been changed from `(string, string, string, *WebAppsGetSiteConnectionStringKeyVaultReferencesSlotOptions)` to `(string, string, string, *WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions)` -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReferencesSlot` return value(s) have been changed from `(*WebAppsGetSiteConnectionStringKeyVaultReferencesSlotPager)` to `(*WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotPager)` -- Function `*KubeEnvironmentsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *KubeEnvironmentsListByResourceGroupOptions)` to `(string, *KubeEnvironmentsClientListByResourceGroupOptions)` -- Function `*KubeEnvironmentsClient.ListByResourceGroup` return value(s) have been changed from `(*KubeEnvironmentsListByResourceGroupPager)` to `(*KubeEnvironmentsClientListByResourceGroupPager)` -- Function `*WebAppsClient.ListSitePushSettings` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListSitePushSettingsOptions)` to `(context.Context, string, string, *WebAppsClientListSitePushSettingsOptions)` -- Function `*WebAppsClient.ListSitePushSettings` return value(s) have been changed from `(WebAppsListSitePushSettingsResponse, error)` to `(WebAppsClientListSitePushSettingsResponse, error)` -- Function `*StaticSitesClient.ListStaticSiteFunctionAppSettings` parameter(s) have been changed from `(context.Context, string, string, *StaticSitesListStaticSiteFunctionAppSettingsOptions)` to `(context.Context, string, string, *StaticSitesClientListStaticSiteFunctionAppSettingsOptions)` -- Function `*StaticSitesClient.ListStaticSiteFunctionAppSettings` return value(s) have been changed from `(StaticSitesListStaticSiteFunctionAppSettingsResponse, error)` to `(StaticSitesClientListStaticSiteFunctionAppSettingsResponse, error)` -- Function `*ProviderClient.GetFunctionAppStacksForLocation` parameter(s) have been changed from `(string, *ProviderGetFunctionAppStacksForLocationOptions)` to `(string, *ProviderClientGetFunctionAppStacksForLocationOptions)` -- Function `*ProviderClient.GetFunctionAppStacksForLocation` return value(s) have been changed from `(*ProviderGetFunctionAppStacksForLocationPager)` to `(*ProviderClientGetFunctionAppStacksForLocationPager)` -- Function `*WebAppsClient.UpdateApplicationSettings` parameter(s) have been changed from `(context.Context, string, string, StringDictionary, *WebAppsUpdateApplicationSettingsOptions)` to `(context.Context, string, string, StringDictionary, *WebAppsClientUpdateApplicationSettingsOptions)` -- Function `*WebAppsClient.UpdateApplicationSettings` return value(s) have been changed from `(WebAppsUpdateApplicationSettingsResponse, error)` to `(WebAppsClientUpdateApplicationSettingsResponse, error)` -- Function `*WebAppsClient.GetConfigurationSnapshot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetConfigurationSnapshotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetConfigurationSnapshotOptions)` -- Function `*WebAppsClient.GetConfigurationSnapshot` return value(s) have been changed from `(WebAppsGetConfigurationSnapshotResponse, error)` to `(WebAppsClientGetConfigurationSnapshotResponse, error)` -- Function `*WebAppsClient.ListTriggeredWebJobs` parameter(s) have been changed from `(string, string, *WebAppsListTriggeredWebJobsOptions)` to `(string, string, *WebAppsClientListTriggeredWebJobsOptions)` -- Function `*WebAppsClient.ListTriggeredWebJobs` return value(s) have been changed from `(*WebAppsListTriggeredWebJobsPager)` to `(*WebAppsClientListTriggeredWebJobsPager)` -- Function `*WebAppsClient.GetScmAllowed` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetScmAllowedOptions)` to `(context.Context, string, string, *WebAppsClientGetScmAllowedOptions)` -- Function `*WebAppsClient.GetScmAllowed` return value(s) have been changed from `(WebAppsGetScmAllowedResponse, error)` to `(WebAppsClientGetScmAllowedResponse, error)` -- Function `*WebAppsClient.GetInstanceProcessModuleSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, string, *WebAppsGetInstanceProcessModuleSlotOptions)` to `(context.Context, string, string, string, string, string, string, *WebAppsClientGetInstanceProcessModuleSlotOptions)` -- Function `*WebAppsClient.GetInstanceProcessModuleSlot` return value(s) have been changed from `(WebAppsGetInstanceProcessModuleSlotResponse, error)` to `(WebAppsClientGetInstanceProcessModuleSlotResponse, error)` -- Function `*WebAppsClient.GetMSDeployStatus` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetMSDeployStatusOptions)` to `(context.Context, string, string, *WebAppsClientGetMSDeployStatusOptions)` -- Function `*WebAppsClient.GetMSDeployStatus` return value(s) have been changed from `(WebAppsGetMSDeployStatusResponse, error)` to `(WebAppsClientGetMSDeployStatusResponse, error)` -- Function `*WebAppsClient.ListProcessThreads` parameter(s) have been changed from `(string, string, string, *WebAppsListProcessThreadsOptions)` to `(string, string, string, *WebAppsClientListProcessThreadsOptions)` -- Function `*WebAppsClient.ListProcessThreads` return value(s) have been changed from `(*WebAppsListProcessThreadsPager)` to `(*WebAppsClientListProcessThreadsPager)` -- Function `*WebAppsClient.AnalyzeCustomHostnameSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsAnalyzeCustomHostnameSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientAnalyzeCustomHostnameSlotOptions)` -- Function `*WebAppsClient.AnalyzeCustomHostnameSlot` return value(s) have been changed from `(WebAppsAnalyzeCustomHostnameSlotResponse, error)` to `(WebAppsClientAnalyzeCustomHostnameSlotResponse, error)` -- Function `*WebAppsClient.ListInstanceFunctionsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListInstanceFunctionsSlotOptions)` to `(string, string, string, *WebAppsClientListInstanceFunctionsSlotOptions)` -- Function `*WebAppsClient.ListInstanceFunctionsSlot` return value(s) have been changed from `(*WebAppsListInstanceFunctionsSlotPager)` to `(*WebAppsClientListInstanceFunctionsSlotPager)` -- Function `*DomainsClient.List` parameter(s) have been changed from `(*DomainsListOptions)` to `(*DomainsClientListOptions)` -- Function `*DomainsClient.List` return value(s) have been changed from `(*DomainsListPager)` to `(*DomainsClientListPager)` -- Function `*WebAppsClient.StopContinuousWebJob` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsStopContinuousWebJobOptions)` to `(context.Context, string, string, string, *WebAppsClientStopContinuousWebJobOptions)` -- Function `*WebAppsClient.StopContinuousWebJob` return value(s) have been changed from `(WebAppsStopContinuousWebJobResponse, error)` to `(WebAppsClientStopContinuousWebJobResponse, error)` -- Function `*WebAppsClient.UpdatePremierAddOnSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, PremierAddOnPatchResource, *WebAppsUpdatePremierAddOnSlotOptions)` to `(context.Context, string, string, string, string, PremierAddOnPatchResource, *WebAppsClientUpdatePremierAddOnSlotOptions)` -- Function `*WebAppsClient.UpdatePremierAddOnSlot` return value(s) have been changed from `(WebAppsUpdatePremierAddOnSlotResponse, error)` to `(WebAppsClientUpdatePremierAddOnSlotResponse, error)` -- Function `*WebAppsClient.AddPremierAddOn` parameter(s) have been changed from `(context.Context, string, string, string, PremierAddOn, *WebAppsAddPremierAddOnOptions)` to `(context.Context, string, string, string, PremierAddOn, *WebAppsClientAddPremierAddOnOptions)` -- Function `*WebAppsClient.AddPremierAddOn` return value(s) have been changed from `(WebAppsAddPremierAddOnResponse, error)` to `(WebAppsClientAddPremierAddOnResponse, error)` -- Function `*WebAppsClient.ListSnapshotsFromDRSecondary` parameter(s) have been changed from `(string, string, *WebAppsListSnapshotsFromDRSecondaryOptions)` to `(string, string, *WebAppsClientListSnapshotsFromDRSecondaryOptions)` -- Function `*WebAppsClient.ListSnapshotsFromDRSecondary` return value(s) have been changed from `(*WebAppsListSnapshotsFromDRSecondaryPager)` to `(*WebAppsClientListSnapshotsFromDRSecondaryPager)` -- Function `*WebAppsClient.GetNetworkTraces` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetNetworkTracesOptions)` to `(context.Context, string, string, string, *WebAppsClientGetNetworkTracesOptions)` -- Function `*WebAppsClient.GetNetworkTraces` return value(s) have been changed from `(WebAppsGetNetworkTracesResponse, error)` to `(WebAppsClientGetNetworkTracesResponse, error)` -- Function `*DiagnosticsClient.ExecuteSiteDetectorSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *DiagnosticsExecuteSiteDetectorSlotOptions)` to `(context.Context, string, string, string, string, string, *DiagnosticsClientExecuteSiteDetectorSlotOptions)` -- Function `*DiagnosticsClient.ExecuteSiteDetectorSlot` return value(s) have been changed from `(DiagnosticsExecuteSiteDetectorSlotResponse, error)` to `(DiagnosticsClientExecuteSiteDetectorSlotResponse, error)` -- Function `*WebAppsClient.UpdateConnectionStrings` parameter(s) have been changed from `(context.Context, string, string, ConnectionStringDictionary, *WebAppsUpdateConnectionStringsOptions)` to `(context.Context, string, string, ConnectionStringDictionary, *WebAppsClientUpdateConnectionStringsOptions)` -- Function `*WebAppsClient.UpdateConnectionStrings` return value(s) have been changed from `(WebAppsUpdateConnectionStringsResponse, error)` to `(WebAppsClientUpdateConnectionStringsResponse, error)` -- Function `*ProviderClient.GetAvailableStacks` parameter(s) have been changed from `(*ProviderGetAvailableStacksOptions)` to `(*ProviderClientGetAvailableStacksOptions)` -- Function `*ProviderClient.GetAvailableStacks` return value(s) have been changed from `(*ProviderGetAvailableStacksPager)` to `(*ProviderClientGetAvailableStacksPager)` -- Function `*WebAppsClient.BeginInstallSiteExtension` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsBeginInstallSiteExtensionOptions)` to `(context.Context, string, string, string, *WebAppsClientBeginInstallSiteExtensionOptions)` -- Function `*WebAppsClient.BeginInstallSiteExtension` return value(s) have been changed from `(WebAppsInstallSiteExtensionPollerResponse, error)` to `(WebAppsClientInstallSiteExtensionPollerResponse, error)` -- Function `*WebAppsClient.GenerateNewSitePublishingPasswordSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGenerateNewSitePublishingPasswordSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGenerateNewSitePublishingPasswordSlotOptions)` -- Function `*WebAppsClient.GenerateNewSitePublishingPasswordSlot` return value(s) have been changed from `(WebAppsGenerateNewSitePublishingPasswordSlotResponse, error)` to `(WebAppsClientGenerateNewSitePublishingPasswordSlotResponse, error)` -- Function `*DomainsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *DomainsListByResourceGroupOptions)` to `(string, *DomainsClientListByResourceGroupOptions)` -- Function `*DomainsClient.ListByResourceGroup` return value(s) have been changed from `(*DomainsListByResourceGroupPager)` to `(*DomainsClientListByResourceGroupPager)` -- Function `*WebAppsClient.GetContainerLogsZip` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetContainerLogsZipOptions)` to `(context.Context, string, string, *WebAppsClientGetContainerLogsZipOptions)` -- Function `*WebAppsClient.GetContainerLogsZip` return value(s) have been changed from `(WebAppsGetContainerLogsZipResponse, error)` to `(WebAppsClientGetContainerLogsZipResponse, error)` -- Function `*RecommendationsClient.ListHistoryForWebApp` parameter(s) have been changed from `(string, string, *RecommendationsListHistoryForWebAppOptions)` to `(string, string, *RecommendationsClientListHistoryForWebAppOptions)` -- Function `*RecommendationsClient.ListHistoryForWebApp` return value(s) have been changed from `(*RecommendationsListHistoryForWebAppPager)` to `(*RecommendationsClientListHistoryForWebAppPager)` -- Function `*KubeEnvironmentsClient.Update` parameter(s) have been changed from `(context.Context, string, string, KubeEnvironmentPatchResource, *KubeEnvironmentsUpdateOptions)` to `(context.Context, string, string, KubeEnvironmentPatchResource, *KubeEnvironmentsClientUpdateOptions)` -- Function `*KubeEnvironmentsClient.Update` return value(s) have been changed from `(KubeEnvironmentsUpdateResponse, error)` to `(KubeEnvironmentsClientUpdateResponse, error)` -- Function `*WebAppsClient.ListContinuousWebJobs` parameter(s) have been changed from `(string, string, *WebAppsListContinuousWebJobsOptions)` to `(string, string, *WebAppsClientListContinuousWebJobsOptions)` -- Function `*WebAppsClient.ListContinuousWebJobs` return value(s) have been changed from `(*WebAppsListContinuousWebJobsPager)` to `(*WebAppsClientListContinuousWebJobsPager)` -- Function `*WebAppsClient.UpdateDiagnosticLogsConfig` parameter(s) have been changed from `(context.Context, string, string, SiteLogsConfig, *WebAppsUpdateDiagnosticLogsConfigOptions)` to `(context.Context, string, string, SiteLogsConfig, *WebAppsClientUpdateDiagnosticLogsConfigOptions)` -- Function `*WebAppsClient.UpdateDiagnosticLogsConfig` return value(s) have been changed from `(WebAppsUpdateDiagnosticLogsConfigResponse, error)` to `(WebAppsClientUpdateDiagnosticLogsConfigResponse, error)` -- Function `*WebAppsClient.ListPerfMonCountersSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListPerfMonCountersSlotOptions)` to `(string, string, string, *WebAppsClientListPerfMonCountersSlotOptions)` -- Function `*WebAppsClient.ListPerfMonCountersSlot` return value(s) have been changed from `(*WebAppsListPerfMonCountersSlotPager)` to `(*WebAppsClientListPerfMonCountersSlotPager)` -- Function `*WebAppsClient.StopSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsStopSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientStopSlotOptions)` -- Function `*WebAppsClient.StopSlot` return value(s) have been changed from `(WebAppsStopSlotResponse, error)` to `(WebAppsClientStopSlotResponse, error)` -- Function `*WebAppsClient.ListHybridConnections` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListHybridConnectionsOptions)` to `(context.Context, string, string, *WebAppsClientListHybridConnectionsOptions)` -- Function `*WebAppsClient.ListHybridConnections` return value(s) have been changed from `(WebAppsListHybridConnectionsResponse, error)` to `(WebAppsClientListHybridConnectionsResponse, error)` -- Function `*WebAppsClient.DeleteTriggeredWebJobSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteTriggeredWebJobSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteTriggeredWebJobSlotOptions)` -- Function `*WebAppsClient.DeleteTriggeredWebJobSlot` return value(s) have been changed from `(WebAppsDeleteTriggeredWebJobSlotResponse, error)` to `(WebAppsClientDeleteTriggeredWebJobSlotResponse, error)` -- Function `*DiagnosticsClient.GetSiteDetectorResponseSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *DiagnosticsGetSiteDetectorResponseSlotOptions)` to `(context.Context, string, string, string, string, *DiagnosticsClientGetSiteDetectorResponseSlotOptions)` -- Function `*DiagnosticsClient.GetSiteDetectorResponseSlot` return value(s) have been changed from `(DiagnosticsGetSiteDetectorResponseSlotResponse, error)` to `(DiagnosticsClientGetSiteDetectorResponseSlotResponse, error)` -- Function `*RecommendationsClient.ListRecommendedRulesForHostingEnvironment` parameter(s) have been changed from `(string, string, *RecommendationsListRecommendedRulesForHostingEnvironmentOptions)` to `(string, string, *RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions)` -- Function `*RecommendationsClient.ListRecommendedRulesForHostingEnvironment` return value(s) have been changed from `(*RecommendationsListRecommendedRulesForHostingEnvironmentPager)` to `(*RecommendationsClientListRecommendedRulesForHostingEnvironmentPager)` -- Function `*WebAppsClient.CreateOrUpdateHybridConnection` parameter(s) have been changed from `(context.Context, string, string, string, string, HybridConnection, *WebAppsCreateOrUpdateHybridConnectionOptions)` to `(context.Context, string, string, string, string, HybridConnection, *WebAppsClientCreateOrUpdateHybridConnectionOptions)` -- Function `*WebAppsClient.CreateOrUpdateHybridConnection` return value(s) have been changed from `(WebAppsCreateOrUpdateHybridConnectionResponse, error)` to `(WebAppsClientCreateOrUpdateHybridConnectionResponse, error)` -- Function `*WebAppsClient.BeginRestore` parameter(s) have been changed from `(context.Context, string, string, string, RestoreRequest, *WebAppsBeginRestoreOptions)` to `(context.Context, string, string, string, RestoreRequest, *WebAppsClientBeginRestoreOptions)` -- Function `*WebAppsClient.BeginRestore` return value(s) have been changed from `(WebAppsRestorePollerResponse, error)` to `(WebAppsClientRestorePollerResponse, error)` -- Function `*WebAppsClient.UpdateVnetConnectionGatewaySlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, VnetGateway, *WebAppsUpdateVnetConnectionGatewaySlotOptions)` to `(context.Context, string, string, string, string, string, VnetGateway, *WebAppsClientUpdateVnetConnectionGatewaySlotOptions)` -- Function `*WebAppsClient.UpdateVnetConnectionGatewaySlot` return value(s) have been changed from `(WebAppsUpdateVnetConnectionGatewaySlotResponse, error)` to `(WebAppsClientUpdateVnetConnectionGatewaySlotResponse, error)` -- Function `*WebAppsClient.BeginMigrateMySQL` parameter(s) have been changed from `(context.Context, string, string, MigrateMySQLRequest, *WebAppsBeginMigrateMySQLOptions)` to `(context.Context, string, string, MigrateMySQLRequest, *WebAppsClientBeginMigrateMySQLOptions)` -- Function `*WebAppsClient.BeginMigrateMySQL` return value(s) have been changed from `(WebAppsMigrateMySQLPollerResponse, error)` to `(WebAppsClientMigrateMySQLPollerResponse, error)` -- Function `*WebAppsClient.ListDeploymentLog` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListDeploymentLogOptions)` to `(context.Context, string, string, string, *WebAppsClientListDeploymentLogOptions)` -- Function `*WebAppsClient.ListDeploymentLog` return value(s) have been changed from `(WebAppsListDeploymentLogResponse, error)` to `(WebAppsClientListDeploymentLogResponse, error)` -- Function `*StaticSitesClient.PreviewWorkflow` parameter(s) have been changed from `(context.Context, string, StaticSitesWorkflowPreviewRequest, *StaticSitesPreviewWorkflowOptions)` to `(context.Context, string, StaticSitesWorkflowPreviewRequest, *StaticSitesClientPreviewWorkflowOptions)` -- Function `*StaticSitesClient.PreviewWorkflow` return value(s) have been changed from `(StaticSitesPreviewWorkflowResponse, error)` to `(StaticSitesClientPreviewWorkflowResponse, error)` -- Function `*WebAppsClient.UpdateScmAllowed` parameter(s) have been changed from `(context.Context, string, string, CsmPublishingCredentialsPoliciesEntity, *WebAppsUpdateScmAllowedOptions)` to `(context.Context, string, string, CsmPublishingCredentialsPoliciesEntity, *WebAppsClientUpdateScmAllowedOptions)` -- Function `*WebAppsClient.UpdateScmAllowed` return value(s) have been changed from `(WebAppsUpdateScmAllowedResponse, error)` to `(WebAppsClientUpdateScmAllowedResponse, error)` -- Function `*WebAppsClient.UpdateApplicationSettingsSlot` parameter(s) have been changed from `(context.Context, string, string, string, StringDictionary, *WebAppsUpdateApplicationSettingsSlotOptions)` to `(context.Context, string, string, string, StringDictionary, *WebAppsClientUpdateApplicationSettingsSlotOptions)` -- Function `*WebAppsClient.UpdateApplicationSettingsSlot` return value(s) have been changed from `(WebAppsUpdateApplicationSettingsSlotResponse, error)` to `(WebAppsClientUpdateApplicationSettingsSlotResponse, error)` -- Function `*StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild` parameter(s) have been changed from `(context.Context, string, string, string, string, *StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildOptions)` to `(context.Context, string, string, string, string, *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions)` -- Function `*StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild` return value(s) have been changed from `(StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildResponse, error)` to `(StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse, error)` -- Function `*WebAppsClient.GetDiagnosticLogsConfigurationSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetDiagnosticLogsConfigurationSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetDiagnosticLogsConfigurationSlotOptions)` -- Function `*WebAppsClient.GetDiagnosticLogsConfigurationSlot` return value(s) have been changed from `(WebAppsGetDiagnosticLogsConfigurationSlotResponse, error)` to `(WebAppsClientGetDiagnosticLogsConfigurationSlotResponse, error)` -- Function `*WebAppsClient.ListSnapshotsFromDRSecondarySlot` parameter(s) have been changed from `(string, string, string, *WebAppsListSnapshotsFromDRSecondarySlotOptions)` to `(string, string, string, *WebAppsClientListSnapshotsFromDRSecondarySlotOptions)` -- Function `*WebAppsClient.ListSnapshotsFromDRSecondarySlot` return value(s) have been changed from `(*WebAppsListSnapshotsFromDRSecondarySlotPager)` to `(*WebAppsClientListSnapshotsFromDRSecondarySlotPager)` -- Function `*WebAppsClient.ListConfigurations` parameter(s) have been changed from `(string, string, *WebAppsListConfigurationsOptions)` to `(string, string, *WebAppsClientListConfigurationsOptions)` -- Function `*WebAppsClient.ListConfigurations` return value(s) have been changed from `(*WebAppsListConfigurationsPager)` to `(*WebAppsClientListConfigurationsPager)` -- Function `*WebAppsClient.GetTriggeredWebJobHistorySlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsGetTriggeredWebJobHistorySlotOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientGetTriggeredWebJobHistorySlotOptions)` -- Function `*WebAppsClient.GetTriggeredWebJobHistorySlot` return value(s) have been changed from `(WebAppsGetTriggeredWebJobHistorySlotResponse, error)` to `(WebAppsClientGetTriggeredWebJobHistorySlotResponse, error)` -- Function `*WebAppsClient.ListPublishingProfileXMLWithSecrets` parameter(s) have been changed from `(context.Context, string, string, CsmPublishingProfileOptions, *WebAppsListPublishingProfileXMLWithSecretsOptions)` to `(context.Context, string, string, CsmPublishingProfileOptions, *WebAppsClientListPublishingProfileXMLWithSecretsOptions)` -- Function `*WebAppsClient.ListPublishingProfileXMLWithSecrets` return value(s) have been changed from `(WebAppsListPublishingProfileXMLWithSecretsResponse, error)` to `(WebAppsClientListPublishingProfileXMLWithSecretsResponse, error)` -- Function `*TopLevelDomainsClient.ListAgreements` parameter(s) have been changed from `(string, TopLevelDomainAgreementOption, *TopLevelDomainsListAgreementsOptions)` to `(string, TopLevelDomainAgreementOption, *TopLevelDomainsClientListAgreementsOptions)` -- Function `*TopLevelDomainsClient.ListAgreements` return value(s) have been changed from `(*TopLevelDomainsListAgreementsPager)` to `(*TopLevelDomainsClientListAgreementsPager)` -- Function `*WebAppsClient.ListSitePushSettingsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListSitePushSettingsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListSitePushSettingsSlotOptions)` -- Function `*WebAppsClient.ListSitePushSettingsSlot` return value(s) have been changed from `(WebAppsListSitePushSettingsSlotResponse, error)` to `(WebAppsClientListSitePushSettingsSlotResponse, error)` -- Function `*WebAppsClient.GetBackupStatus` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetBackupStatusOptions)` to `(context.Context, string, string, string, *WebAppsClientGetBackupStatusOptions)` -- Function `*WebAppsClient.GetBackupStatus` return value(s) have been changed from `(WebAppsGetBackupStatusResponse, error)` to `(WebAppsClientGetBackupStatusResponse, error)` -- Function `*WebAppsClient.BeginRestoreFromBackupBlob` parameter(s) have been changed from `(context.Context, string, string, RestoreRequest, *WebAppsBeginRestoreFromBackupBlobOptions)` to `(context.Context, string, string, RestoreRequest, *WebAppsClientBeginRestoreFromBackupBlobOptions)` -- Function `*WebAppsClient.BeginRestoreFromBackupBlob` return value(s) have been changed from `(WebAppsRestoreFromBackupBlobPollerResponse, error)` to `(WebAppsClientRestoreFromBackupBlobPollerResponse, error)` -- Function `*WebAppsClient.CreateDeployment` parameter(s) have been changed from `(context.Context, string, string, string, Deployment, *WebAppsCreateDeploymentOptions)` to `(context.Context, string, string, string, Deployment, *WebAppsClientCreateDeploymentOptions)` -- Function `*WebAppsClient.CreateDeployment` return value(s) have been changed from `(WebAppsCreateDeploymentResponse, error)` to `(WebAppsClientCreateDeploymentResponse, error)` -- Function `*WebAppsClient.DeleteContinuousWebJob` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteContinuousWebJobOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteContinuousWebJobOptions)` -- Function `*WebAppsClient.DeleteContinuousWebJob` return value(s) have been changed from `(WebAppsDeleteContinuousWebJobResponse, error)` to `(WebAppsClientDeleteContinuousWebJobResponse, error)` -- Function `*DiagnosticsClient.GetHostingEnvironmentDetectorResponse` parameter(s) have been changed from `(context.Context, string, string, string, *DiagnosticsGetHostingEnvironmentDetectorResponseOptions)` to `(context.Context, string, string, string, *DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions)` -- Function `*DiagnosticsClient.GetHostingEnvironmentDetectorResponse` return value(s) have been changed from `(DiagnosticsGetHostingEnvironmentDetectorResponseResponse, error)` to `(DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse, error)` -- Function `*DomainsClient.ListRecommendations` parameter(s) have been changed from `(DomainRecommendationSearchParameters, *DomainsListRecommendationsOptions)` to `(DomainRecommendationSearchParameters, *DomainsClientListRecommendationsOptions)` -- Function `*DomainsClient.ListRecommendations` return value(s) have been changed from `(*DomainsListRecommendationsPager)` to `(*DomainsClientListRecommendationsPager)` -- Function `*RecommendationsClient.ListRecommendedRulesForWebApp` parameter(s) have been changed from `(string, string, *RecommendationsListRecommendedRulesForWebAppOptions)` to `(string, string, *RecommendationsClientListRecommendedRulesForWebAppOptions)` -- Function `*RecommendationsClient.ListRecommendedRulesForWebApp` return value(s) have been changed from `(*RecommendationsListRecommendedRulesForWebAppPager)` to `(*RecommendationsClientListRecommendedRulesForWebAppPager)` -- Function `*WebAppsClient.CreateDeploymentSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, Deployment, *WebAppsCreateDeploymentSlotOptions)` to `(context.Context, string, string, string, string, Deployment, *WebAppsClientCreateDeploymentSlotOptions)` -- Function `*WebAppsClient.CreateDeploymentSlot` return value(s) have been changed from `(WebAppsCreateDeploymentSlotResponse, error)` to `(WebAppsClientCreateDeploymentSlotResponse, error)` -- Function `*WebAppsClient.GetAuthSettingsV2Slot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetAuthSettingsV2SlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetAuthSettingsV2SlotOptions)` -- Function `*WebAppsClient.GetAuthSettingsV2Slot` return value(s) have been changed from `(WebAppsGetAuthSettingsV2SlotResponse, error)` to `(WebAppsClientGetAuthSettingsV2SlotResponse, error)` -- Function `*DomainsClient.DeleteOwnershipIdentifier` parameter(s) have been changed from `(context.Context, string, string, string, *DomainsDeleteOwnershipIdentifierOptions)` to `(context.Context, string, string, string, *DomainsClientDeleteOwnershipIdentifierOptions)` -- Function `*DomainsClient.DeleteOwnershipIdentifier` return value(s) have been changed from `(DomainsDeleteOwnershipIdentifierResponse, error)` to `(DomainsClientDeleteOwnershipIdentifierResponse, error)` -- Function `*WebAppsClient.ListInstanceProcessModulesSlot` parameter(s) have been changed from `(string, string, string, string, string, *WebAppsListInstanceProcessModulesSlotOptions)` to `(string, string, string, string, string, *WebAppsClientListInstanceProcessModulesSlotOptions)` -- Function `*WebAppsClient.ListInstanceProcessModulesSlot` return value(s) have been changed from `(*WebAppsListInstanceProcessModulesSlotPager)` to `(*WebAppsClientListInstanceProcessModulesSlotPager)` -- Function `*WebAppsClient.SyncRepositorySlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsSyncRepositorySlotOptions)` to `(context.Context, string, string, string, *WebAppsClientSyncRepositorySlotOptions)` -- Function `*WebAppsClient.SyncRepositorySlot` return value(s) have been changed from `(WebAppsSyncRepositorySlotResponse, error)` to `(WebAppsClientSyncRepositorySlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateHostSecret` parameter(s) have been changed from `(context.Context, string, string, string, string, KeyInfo, *WebAppsCreateOrUpdateHostSecretOptions)` to `(context.Context, string, string, string, string, KeyInfo, *WebAppsClientCreateOrUpdateHostSecretOptions)` -- Function `*WebAppsClient.CreateOrUpdateHostSecret` return value(s) have been changed from `(WebAppsCreateOrUpdateHostSecretResponse, error)` to `(WebAppsClientCreateOrUpdateHostSecretResponse, error)` -- Function `*WebAppsClient.GetWebSiteContainerLogsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetWebSiteContainerLogsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetWebSiteContainerLogsSlotOptions)` -- Function `*WebAppsClient.GetWebSiteContainerLogsSlot` return value(s) have been changed from `(WebAppsGetWebSiteContainerLogsSlotResponse, error)` to `(WebAppsClientGetWebSiteContainerLogsSlotResponse, error)` -- Function `*WebAppsClient.UpdateSlotConfigurationNames` parameter(s) have been changed from `(context.Context, string, string, SlotConfigNamesResource, *WebAppsUpdateSlotConfigurationNamesOptions)` to `(context.Context, string, string, SlotConfigNamesResource, *WebAppsClientUpdateSlotConfigurationNamesOptions)` -- Function `*WebAppsClient.UpdateSlotConfigurationNames` return value(s) have been changed from `(WebAppsUpdateSlotConfigurationNamesResponse, error)` to `(WebAppsClientUpdateSlotConfigurationNamesResponse, error)` -- Function `*WebAppsClient.RecoverSiteConfigurationSnapshotSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsRecoverSiteConfigurationSnapshotSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions)` -- Function `*WebAppsClient.RecoverSiteConfigurationSnapshotSlot` return value(s) have been changed from `(WebAppsRecoverSiteConfigurationSnapshotSlotResponse, error)` to `(WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse, error)` -- Function `*WebAppsClient.UpdateDomainOwnershipIdentifierSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, Identifier, *WebAppsUpdateDomainOwnershipIdentifierSlotOptions)` to `(context.Context, string, string, string, string, Identifier, *WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions)` -- Function `*WebAppsClient.UpdateDomainOwnershipIdentifierSlot` return value(s) have been changed from `(WebAppsUpdateDomainOwnershipIdentifierSlotResponse, error)` to `(WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateVnetConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, VnetInfoResource, *WebAppsCreateOrUpdateVnetConnectionSlotOptions)` to `(context.Context, string, string, string, string, VnetInfoResource, *WebAppsClientCreateOrUpdateVnetConnectionSlotOptions)` -- Function `*WebAppsClient.CreateOrUpdateVnetConnectionSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateVnetConnectionSlotResponse, error)` to `(WebAppsClientCreateOrUpdateVnetConnectionSlotResponse, error)` -- Function `*WebAppsClient.StopNetworkTrace` parameter(s) have been changed from `(context.Context, string, string, *WebAppsStopNetworkTraceOptions)` to `(context.Context, string, string, *WebAppsClientStopNetworkTraceOptions)` -- Function `*WebAppsClient.StopNetworkTrace` return value(s) have been changed from `(WebAppsStopNetworkTraceResponse, error)` to `(WebAppsClientStopNetworkTraceResponse, error)` -- Function `*WebAppsClient.GetPublicCertificate` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetPublicCertificateOptions)` to `(context.Context, string, string, string, *WebAppsClientGetPublicCertificateOptions)` -- Function `*WebAppsClient.GetPublicCertificate` return value(s) have been changed from `(WebAppsGetPublicCertificateResponse, error)` to `(WebAppsClientGetPublicCertificateResponse, error)` -- Function `*WebAppsClient.GetAppSettingsKeyVaultReferencesSlot` parameter(s) have been changed from `(string, string, string, *WebAppsGetAppSettingsKeyVaultReferencesSlotOptions)` to `(string, string, string, *WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions)` -- Function `*WebAppsClient.GetAppSettingsKeyVaultReferencesSlot` return value(s) have been changed from `(*WebAppsGetAppSettingsKeyVaultReferencesSlotPager)` to `(*WebAppsClientGetAppSettingsKeyVaultReferencesSlotPager)` -- Function `*StaticSitesClient.UpdateStaticSiteUser` parameter(s) have been changed from `(context.Context, string, string, string, string, StaticSiteUserARMResource, *StaticSitesUpdateStaticSiteUserOptions)` to `(context.Context, string, string, string, string, StaticSiteUserARMResource, *StaticSitesClientUpdateStaticSiteUserOptions)` -- Function `*StaticSitesClient.UpdateStaticSiteUser` return value(s) have been changed from `(StaticSitesUpdateStaticSiteUserResponse, error)` to `(StaticSitesClientUpdateStaticSiteUserResponse, error)` -- Function `*ProviderClient.GetFunctionAppStacks` parameter(s) have been changed from `(*ProviderGetFunctionAppStacksOptions)` to `(*ProviderClientGetFunctionAppStacksOptions)` -- Function `*ProviderClient.GetFunctionAppStacks` return value(s) have been changed from `(*ProviderGetFunctionAppStacksPager)` to `(*ProviderClientGetFunctionAppStacksPager)` -- Function `*StaticSitesClient.ResetStaticSiteAPIKey` parameter(s) have been changed from `(context.Context, string, string, StaticSiteResetPropertiesARMResource, *StaticSitesResetStaticSiteAPIKeyOptions)` to `(context.Context, string, string, StaticSiteResetPropertiesARMResource, *StaticSitesClientResetStaticSiteAPIKeyOptions)` -- Function `*StaticSitesClient.ResetStaticSiteAPIKey` return value(s) have been changed from `(StaticSitesResetStaticSiteAPIKeyResponse, error)` to `(StaticSitesClientResetStaticSiteAPIKeyResponse, error)` -- Function `*RecommendationsClient.ResetAllFilters` parameter(s) have been changed from `(context.Context, *RecommendationsResetAllFiltersOptions)` to `(context.Context, *RecommendationsClientResetAllFiltersOptions)` -- Function `*RecommendationsClient.ResetAllFilters` return value(s) have been changed from `(RecommendationsResetAllFiltersResponse, error)` to `(RecommendationsClientResetAllFiltersResponse, error)` -- Function `*StaticSitesClient.DeleteStaticSiteUser` parameter(s) have been changed from `(context.Context, string, string, string, string, *StaticSitesDeleteStaticSiteUserOptions)` to `(context.Context, string, string, string, string, *StaticSitesClientDeleteStaticSiteUserOptions)` -- Function `*StaticSitesClient.DeleteStaticSiteUser` return value(s) have been changed from `(StaticSitesDeleteStaticSiteUserResponse, error)` to `(StaticSitesClientDeleteStaticSiteUserResponse, error)` -- Function `*WebAppsClient.GetMSDeployLogSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetMSDeployLogSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetMSDeployLogSlotOptions)` -- Function `*WebAppsClient.GetMSDeployLogSlot` return value(s) have been changed from `(WebAppsGetMSDeployLogSlotResponse, error)` to `(WebAppsClientGetMSDeployLogSlotResponse, error)` -- Function `*StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite` parameter(s) have been changed from `(string, string, *StaticSitesGetUserProvidedFunctionAppsForStaticSiteOptions)` to `(string, string, *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions)` -- Function `*StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite` return value(s) have been changed from `(*StaticSitesGetUserProvidedFunctionAppsForStaticSitePager)` to `(*StaticSitesClientGetUserProvidedFunctionAppsForStaticSitePager)` -- Function `*DiagnosticsClient.GetSiteAnalysisSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *DiagnosticsGetSiteAnalysisSlotOptions)` to `(context.Context, string, string, string, string, string, *DiagnosticsClientGetSiteAnalysisSlotOptions)` -- Function `*DiagnosticsClient.GetSiteAnalysisSlot` return value(s) have been changed from `(DiagnosticsGetSiteAnalysisSlotResponse, error)` to `(DiagnosticsClientGetSiteAnalysisSlotResponse, error)` -- Function `*WebAppsClient.GetDomainOwnershipIdentifier` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetDomainOwnershipIdentifierOptions)` to `(context.Context, string, string, string, *WebAppsClientGetDomainOwnershipIdentifierOptions)` -- Function `*WebAppsClient.GetDomainOwnershipIdentifier` return value(s) have been changed from `(WebAppsGetDomainOwnershipIdentifierResponse, error)` to `(WebAppsClientGetDomainOwnershipIdentifierResponse, error)` -- Function `*WebAppsClient.DeleteDomainOwnershipIdentifier` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteDomainOwnershipIdentifierOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteDomainOwnershipIdentifierOptions)` -- Function `*WebAppsClient.DeleteDomainOwnershipIdentifier` return value(s) have been changed from `(WebAppsDeleteDomainOwnershipIdentifierResponse, error)` to `(WebAppsClientDeleteDomainOwnershipIdentifierResponse, error)` -- Function `*WebAppsClient.Start` parameter(s) have been changed from `(context.Context, string, string, *WebAppsStartOptions)` to `(context.Context, string, string, *WebAppsClientStartOptions)` -- Function `*WebAppsClient.Start` return value(s) have been changed from `(WebAppsStartResponse, error)` to `(WebAppsClientStartResponse, error)` -- Function `*WebAppsClient.GetPremierAddOn` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetPremierAddOnOptions)` to `(context.Context, string, string, string, *WebAppsClientGetPremierAddOnOptions)` -- Function `*WebAppsClient.GetPremierAddOn` return value(s) have been changed from `(WebAppsGetPremierAddOnResponse, error)` to `(WebAppsClientGetPremierAddOnResponse, error)` -- Function `*WebAppsClient.ListRelayServiceConnections` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListRelayServiceConnectionsOptions)` to `(context.Context, string, string, *WebAppsClientListRelayServiceConnectionsOptions)` -- Function `*WebAppsClient.ListRelayServiceConnections` return value(s) have been changed from `(WebAppsListRelayServiceConnectionsResponse, error)` to `(WebAppsClientListRelayServiceConnectionsResponse, error)` -- Function `*WebAppsClient.ListTriggeredWebJobHistory` parameter(s) have been changed from `(string, string, string, *WebAppsListTriggeredWebJobHistoryOptions)` to `(string, string, string, *WebAppsClientListTriggeredWebJobHistoryOptions)` -- Function `*WebAppsClient.ListTriggeredWebJobHistory` return value(s) have been changed from `(*WebAppsListTriggeredWebJobHistoryPager)` to `(*WebAppsClientListTriggeredWebJobHistoryPager)` -- Function `*WebAppsClient.GetAppSettingKeyVaultReference` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetAppSettingKeyVaultReferenceOptions)` to `(context.Context, string, string, string, *WebAppsClientGetAppSettingKeyVaultReferenceOptions)` -- Function `*WebAppsClient.GetAppSettingKeyVaultReference` return value(s) have been changed from `(WebAppsGetAppSettingKeyVaultReferenceResponse, error)` to `(WebAppsClientGetAppSettingKeyVaultReferenceResponse, error)` -- Function `*WebAppsClient.ListSyncFunctionTriggers` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListSyncFunctionTriggersOptions)` to `(context.Context, string, string, *WebAppsClientListSyncFunctionTriggersOptions)` -- Function `*WebAppsClient.ListSyncFunctionTriggers` return value(s) have been changed from `(WebAppsListSyncFunctionTriggersResponse, error)` to `(WebAppsClientListSyncFunctionTriggersResponse, error)` -- Function `*WebAppsClient.GetProcessModule` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetProcessModuleOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetProcessModuleOptions)` -- Function `*WebAppsClient.GetProcessModule` return value(s) have been changed from `(WebAppsGetProcessModuleResponse, error)` to `(WebAppsClientGetProcessModuleResponse, error)` -- Function `*StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild` parameter(s) have been changed from `(context.Context, string, string, string, string, *StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildOptions)` to `(context.Context, string, string, string, string, *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions)` -- Function `*StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild` return value(s) have been changed from `(StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildResponse, error)` to `(StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse, error)` -- Function `*CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse` parameter(s) have been changed from `(context.Context, string, string, string, *CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseOptions)` to `(context.Context, string, string, string, *CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions)` -- Function `*CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse` return value(s) have been changed from `(CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseResponse, error)` to `(CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse, error)` -- Function `*WebAppsClient.ListDeployments` parameter(s) have been changed from `(string, string, *WebAppsListDeploymentsOptions)` to `(string, string, *WebAppsClientListDeploymentsOptions)` -- Function `*WebAppsClient.ListDeployments` return value(s) have been changed from `(*WebAppsListDeploymentsPager)` to `(*WebAppsClientListDeploymentsPager)` -- Function `*WebAppsClient.GetHybridConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsGetHybridConnectionSlotOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientGetHybridConnectionSlotOptions)` -- Function `*WebAppsClient.GetHybridConnectionSlot` return value(s) have been changed from `(WebAppsGetHybridConnectionSlotResponse, error)` to `(WebAppsClientGetHybridConnectionSlotResponse, error)` -- Function `*WebAppsClient.ListSiteExtensions` parameter(s) have been changed from `(string, string, *WebAppsListSiteExtensionsOptions)` to `(string, string, *WebAppsClientListSiteExtensionsOptions)` -- Function `*WebAppsClient.ListSiteExtensions` return value(s) have been changed from `(*WebAppsListSiteExtensionsPager)` to `(*WebAppsClientListSiteExtensionsPager)` -- Function `*WebAppsClient.SyncRepository` parameter(s) have been changed from `(context.Context, string, string, *WebAppsSyncRepositoryOptions)` to `(context.Context, string, string, *WebAppsClientSyncRepositoryOptions)` -- Function `*WebAppsClient.SyncRepository` return value(s) have been changed from `(WebAppsSyncRepositoryResponse, error)` to `(WebAppsClientSyncRepositoryResponse, error)` -- Function `*WebAppsClient.ListInstanceProcessThreadsSlot` parameter(s) have been changed from `(string, string, string, string, string, *WebAppsListInstanceProcessThreadsSlotOptions)` to `(string, string, string, string, string, *WebAppsClientListInstanceProcessThreadsSlotOptions)` -- Function `*WebAppsClient.ListInstanceProcessThreadsSlot` return value(s) have been changed from `(*WebAppsListInstanceProcessThreadsSlotPager)` to `(*WebAppsClientListInstanceProcessThreadsSlotPager)` -- Function `*StaticSitesClient.BeginDeleteStaticSiteCustomDomain` parameter(s) have been changed from `(context.Context, string, string, string, *StaticSitesBeginDeleteStaticSiteCustomDomainOptions)` to `(context.Context, string, string, string, *StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions)` -- Function `*StaticSitesClient.BeginDeleteStaticSiteCustomDomain` return value(s) have been changed from `(StaticSitesDeleteStaticSiteCustomDomainPollerResponse, error)` to `(StaticSitesClientDeleteStaticSiteCustomDomainPollerResponse, error)` -- Function `*WebAppsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, Site, *WebAppsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, Site, *WebAppsClientBeginCreateOrUpdateOptions)` -- Function `*WebAppsClient.BeginCreateOrUpdate` return value(s) have been changed from `(WebAppsCreateOrUpdatePollerResponse, error)` to `(WebAppsClientCreateOrUpdatePollerResponse, error)` -- Function `*ResourceHealthMetadataClient.List` parameter(s) have been changed from `(*ResourceHealthMetadataListOptions)` to `(*ResourceHealthMetadataClientListOptions)` -- Function `*ResourceHealthMetadataClient.List` return value(s) have been changed from `(*ResourceHealthMetadataListPager)` to `(*ResourceHealthMetadataClientListPager)` -- Function `*WebAppsClient.UpdateConfiguration` parameter(s) have been changed from `(context.Context, string, string, SiteConfigResource, *WebAppsUpdateConfigurationOptions)` to `(context.Context, string, string, SiteConfigResource, *WebAppsClientUpdateConfigurationOptions)` -- Function `*WebAppsClient.UpdateConfiguration` return value(s) have been changed from `(WebAppsUpdateConfigurationResponse, error)` to `(WebAppsClientUpdateConfigurationResponse, error)` -- Function `*WebAppsClient.ListSyncStatusSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListSyncStatusSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListSyncStatusSlotOptions)` -- Function `*WebAppsClient.ListSyncStatusSlot` return value(s) have been changed from `(WebAppsListSyncStatusSlotResponse, error)` to `(WebAppsClientListSyncStatusSlotResponse, error)` -- Function `*WebAppsClient.GetPublicCertificateSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetPublicCertificateSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetPublicCertificateSlotOptions)` -- Function `*WebAppsClient.GetPublicCertificateSlot` return value(s) have been changed from `(WebAppsGetPublicCertificateSlotResponse, error)` to `(WebAppsClientGetPublicCertificateSlotResponse, error)` -- Function `*WebAppsClient.GetInstanceFunctionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetInstanceFunctionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetInstanceFunctionSlotOptions)` -- Function `*WebAppsClient.GetInstanceFunctionSlot` return value(s) have been changed from `(WebAppsGetInstanceFunctionSlotResponse, error)` to `(WebAppsClientGetInstanceFunctionSlotResponse, error)` -- Function `*WebAppsClient.ListSiteBackups` parameter(s) have been changed from `(string, string, *WebAppsListSiteBackupsOptions)` to `(string, string, *WebAppsClientListSiteBackupsOptions)` -- Function `*WebAppsClient.ListSiteBackups` return value(s) have been changed from `(*WebAppsListSiteBackupsPager)` to `(*WebAppsClientListSiteBackupsPager)` -- Function `*WebAppsClient.ListSlots` parameter(s) have been changed from `(string, string, *WebAppsListSlotsOptions)` to `(string, string, *WebAppsClientListSlotsOptions)` -- Function `*WebAppsClient.ListSlots` return value(s) have been changed from `(*WebAppsListSlotsPager)` to `(*WebAppsClientListSlotsPager)` -- Function `*WebAppsClient.GetTriggeredWebJobSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetTriggeredWebJobSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetTriggeredWebJobSlotOptions)` -- Function `*WebAppsClient.GetTriggeredWebJobSlot` return value(s) have been changed from `(WebAppsGetTriggeredWebJobSlotResponse, error)` to `(WebAppsClientGetTriggeredWebJobSlotResponse, error)` -- Function `*WebAppsClient.UpdateSitePushSettingsSlot` parameter(s) have been changed from `(context.Context, string, string, string, PushSettings, *WebAppsUpdateSitePushSettingsSlotOptions)` to `(context.Context, string, string, string, PushSettings, *WebAppsClientUpdateSitePushSettingsSlotOptions)` -- Function `*WebAppsClient.UpdateSitePushSettingsSlot` return value(s) have been changed from `(WebAppsUpdateSitePushSettingsSlotResponse, error)` to `(WebAppsClientUpdateSitePushSettingsSlotResponse, error)` -- Function `*WebAppsClient.GetNetworkTraceOperation` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetNetworkTraceOperationOptions)` to `(context.Context, string, string, string, *WebAppsClientGetNetworkTraceOperationOptions)` -- Function `*WebAppsClient.GetNetworkTraceOperation` return value(s) have been changed from `(WebAppsGetNetworkTraceOperationResponse, error)` to `(WebAppsClientGetNetworkTraceOperationResponse, error)` -- Function `*RecommendationsClient.ResetAllFiltersForWebApp` parameter(s) have been changed from `(context.Context, string, string, *RecommendationsResetAllFiltersForWebAppOptions)` to `(context.Context, string, string, *RecommendationsClientResetAllFiltersForWebAppOptions)` -- Function `*RecommendationsClient.ResetAllFiltersForWebApp` return value(s) have been changed from `(RecommendationsResetAllFiltersForWebAppResponse, error)` to `(RecommendationsClientResetAllFiltersForWebAppResponse, error)` -- Function `*WebAppsClient.ListVnetConnections` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListVnetConnectionsOptions)` to `(context.Context, string, string, *WebAppsClientListVnetConnectionsOptions)` -- Function `*WebAppsClient.ListVnetConnections` return value(s) have been changed from `(WebAppsListVnetConnectionsResponse, error)` to `(WebAppsClientListVnetConnectionsResponse, error)` -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReference` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetSiteConnectionStringKeyVaultReferenceOptions)` to `(context.Context, string, string, string, *WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions)` -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReference` return value(s) have been changed from `(WebAppsGetSiteConnectionStringKeyVaultReferenceResponse, error)` to `(WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse, error)` -- Function `*WebAppsClient.GetAppSettingKeyVaultReferenceSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetAppSettingKeyVaultReferenceSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions)` -- Function `*WebAppsClient.GetAppSettingKeyVaultReferenceSlot` return value(s) have been changed from `(WebAppsGetAppSettingKeyVaultReferenceSlotResponse, error)` to `(WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse, error)` -- Function `*ProviderClient.GetWebAppStacks` parameter(s) have been changed from `(*ProviderGetWebAppStacksOptions)` to `(*ProviderClientGetWebAppStacksOptions)` -- Function `*ProviderClient.GetWebAppStacks` return value(s) have been changed from `(*ProviderGetWebAppStacksPager)` to `(*ProviderClientGetWebAppStacksPager)` -- Function `*WebAppsClient.ListDeploymentsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListDeploymentsSlotOptions)` to `(string, string, string, *WebAppsClientListDeploymentsSlotOptions)` -- Function `*WebAppsClient.ListDeploymentsSlot` return value(s) have been changed from `(*WebAppsListDeploymentsSlotPager)` to `(*WebAppsClientListDeploymentsSlotPager)` -- Function `*CertificatesClient.ListByResourceGroup` parameter(s) have been changed from `(string, *CertificatesListByResourceGroupOptions)` to `(string, *CertificatesClientListByResourceGroupOptions)` -- Function `*CertificatesClient.ListByResourceGroup` return value(s) have been changed from `(*CertificatesListByResourceGroupPager)` to `(*CertificatesClientListByResourceGroupPager)` -- Function `*WebAppsClient.GetMSDeployLog` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetMSDeployLogOptions)` to `(context.Context, string, string, *WebAppsClientGetMSDeployLogOptions)` -- Function `*WebAppsClient.GetMSDeployLog` return value(s) have been changed from `(WebAppsGetMSDeployLogResponse, error)` to `(WebAppsClientGetMSDeployLogResponse, error)` -- Function `*WebAppsClient.ListSlotDifferencesFromProduction` parameter(s) have been changed from `(string, string, CsmSlotEntity, *WebAppsListSlotDifferencesFromProductionOptions)` to `(string, string, CsmSlotEntity, *WebAppsClientListSlotDifferencesFromProductionOptions)` -- Function `*WebAppsClient.ListSlotDifferencesFromProduction` return value(s) have been changed from `(*WebAppsListSlotDifferencesFromProductionPager)` to `(*WebAppsClientListSlotDifferencesFromProductionPager)` -- Function `*WebAppsClient.DeleteHostNameBindingSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteHostNameBindingSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteHostNameBindingSlotOptions)` -- Function `*WebAppsClient.DeleteHostNameBindingSlot` return value(s) have been changed from `(WebAppsDeleteHostNameBindingSlotResponse, error)` to `(WebAppsClientDeleteHostNameBindingSlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot` parameter(s) have been changed from `(context.Context, string, string, string, SwiftVirtualNetwork, *WebAppsCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions)` to `(context.Context, string, string, string, SwiftVirtualNetwork, *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions)` -- Function `*WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error)` to `(WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error)` -- Function `*StaticSitesClient.GetPrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, *StaticSitesGetPrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, *StaticSitesClientGetPrivateEndpointConnectionOptions)` -- Function `*StaticSitesClient.GetPrivateEndpointConnection` return value(s) have been changed from `(StaticSitesGetPrivateEndpointConnectionResponse, error)` to `(StaticSitesClientGetPrivateEndpointConnectionResponse, error)` -- Function `*ResourceHealthMetadataClient.GetBySite` parameter(s) have been changed from `(context.Context, string, string, *ResourceHealthMetadataGetBySiteOptions)` to `(context.Context, string, string, *ResourceHealthMetadataClientGetBySiteOptions)` -- Function `*ResourceHealthMetadataClient.GetBySite` return value(s) have been changed from `(ResourceHealthMetadataGetBySiteResponse, error)` to `(ResourceHealthMetadataClientGetBySiteResponse, error)` -- Function `*WebAppsClient.ListBackupsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListBackupsSlotOptions)` to `(string, string, string, *WebAppsClientListBackupsSlotOptions)` -- Function `*WebAppsClient.ListBackupsSlot` return value(s) have been changed from `(*WebAppsListBackupsSlotPager)` to `(*WebAppsClientListBackupsSlotPager)` -- Function `*WebAppsClient.BeginMigrateStorage` parameter(s) have been changed from `(context.Context, string, string, string, StorageMigrationOptions, *WebAppsBeginMigrateStorageOptions)` to `(context.Context, string, string, string, StorageMigrationOptions, *WebAppsClientBeginMigrateStorageOptions)` -- Function `*WebAppsClient.BeginMigrateStorage` return value(s) have been changed from `(WebAppsMigrateStoragePollerResponse, error)` to `(WebAppsClientMigrateStoragePollerResponse, error)` -- Function `*CertificatesClient.List` parameter(s) have been changed from `(*CertificatesListOptions)` to `(*CertificatesClientListOptions)` -- Function `*CertificatesClient.List` return value(s) have been changed from `(*CertificatesListPager)` to `(*CertificatesClientListPager)` -- Function `*WebAppsClient.CreateOrUpdateHybridConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, HybridConnection, *WebAppsCreateOrUpdateHybridConnectionSlotOptions)` to `(context.Context, string, string, string, string, string, HybridConnection, *WebAppsClientCreateOrUpdateHybridConnectionSlotOptions)` -- Function `*WebAppsClient.CreateOrUpdateHybridConnectionSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateHybridConnectionSlotResponse, error)` to `(WebAppsClientCreateOrUpdateHybridConnectionSlotResponse, error)` -- Function `*ProviderClient.GetWebAppStacksForLocation` parameter(s) have been changed from `(string, *ProviderGetWebAppStacksForLocationOptions)` to `(string, *ProviderClientGetWebAppStacksForLocationOptions)` -- Function `*ProviderClient.GetWebAppStacksForLocation` return value(s) have been changed from `(*ProviderGetWebAppStacksForLocationPager)` to `(*ProviderClientGetWebAppStacksForLocationPager)` -- Function `*DiagnosticsClient.GetSiteDiagnosticCategory` parameter(s) have been changed from `(context.Context, string, string, string, *DiagnosticsGetSiteDiagnosticCategoryOptions)` to `(context.Context, string, string, string, *DiagnosticsClientGetSiteDiagnosticCategoryOptions)` -- Function `*DiagnosticsClient.GetSiteDiagnosticCategory` return value(s) have been changed from `(DiagnosticsGetSiteDiagnosticCategoryResponse, error)` to `(DiagnosticsClientGetSiteDiagnosticCategoryResponse, error)` -- Function `*WebAppsClient.DeleteVnetConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteVnetConnectionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteVnetConnectionSlotOptions)` -- Function `*WebAppsClient.DeleteVnetConnectionSlot` return value(s) have been changed from `(WebAppsDeleteVnetConnectionSlotResponse, error)` to `(WebAppsClientDeleteVnetConnectionSlotResponse, error)` -- Function `*DomainsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *DomainsDeleteOptions)` to `(context.Context, string, string, *DomainsClientDeleteOptions)` -- Function `*DomainsClient.Delete` return value(s) have been changed from `(DomainsDeleteResponse, error)` to `(DomainsClientDeleteResponse, error)` -- Function `*WebAppsClient.GetDiagnosticLogsConfiguration` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetDiagnosticLogsConfigurationOptions)` to `(context.Context, string, string, *WebAppsClientGetDiagnosticLogsConfigurationOptions)` -- Function `*WebAppsClient.GetDiagnosticLogsConfiguration` return value(s) have been changed from `(WebAppsGetDiagnosticLogsConfigurationResponse, error)` to `(WebAppsClientGetDiagnosticLogsConfigurationResponse, error)` -- Function `*GlobalClient.GetDeletedWebAppSnapshots` parameter(s) have been changed from `(context.Context, string, *GlobalGetDeletedWebAppSnapshotsOptions)` to `(context.Context, string, *GlobalClientGetDeletedWebAppSnapshotsOptions)` -- Function `*GlobalClient.GetDeletedWebAppSnapshots` return value(s) have been changed from `(GlobalGetDeletedWebAppSnapshotsResponse, error)` to `(GlobalClientGetDeletedWebAppSnapshotsResponse, error)` -- Function `*WebAppsClient.ListProcessModulesSlot` parameter(s) have been changed from `(string, string, string, string, *WebAppsListProcessModulesSlotOptions)` to `(string, string, string, string, *WebAppsClientListProcessModulesSlotOptions)` -- Function `*WebAppsClient.ListProcessModulesSlot` return value(s) have been changed from `(*WebAppsListProcessModulesSlotPager)` to `(*WebAppsClientListProcessModulesSlotPager)` -- Function `*WebAppsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *WebAppsDeleteOptions)` to `(context.Context, string, string, *WebAppsClientDeleteOptions)` -- Function `*WebAppsClient.Delete` return value(s) have been changed from `(WebAppsDeleteResponse, error)` to `(WebAppsClientDeleteResponse, error)` -- Function `*WebAppsClient.UpdateConfigurationSlot` parameter(s) have been changed from `(context.Context, string, string, string, SiteConfigResource, *WebAppsUpdateConfigurationSlotOptions)` to `(context.Context, string, string, string, SiteConfigResource, *WebAppsClientUpdateConfigurationSlotOptions)` -- Function `*WebAppsClient.UpdateConfigurationSlot` return value(s) have been changed from `(WebAppsUpdateConfigurationSlotResponse, error)` to `(WebAppsClientUpdateConfigurationSlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateVnetConnection` parameter(s) have been changed from `(context.Context, string, string, string, VnetInfoResource, *WebAppsCreateOrUpdateVnetConnectionOptions)` to `(context.Context, string, string, string, VnetInfoResource, *WebAppsClientCreateOrUpdateVnetConnectionOptions)` -- Function `*WebAppsClient.CreateOrUpdateVnetConnection` return value(s) have been changed from `(WebAppsCreateOrUpdateVnetConnectionResponse, error)` to `(WebAppsClientCreateOrUpdateVnetConnectionResponse, error)` -- Function `*WebAppsClient.GetAppSettingsKeyVaultReferences` parameter(s) have been changed from `(string, string, *WebAppsGetAppSettingsKeyVaultReferencesOptions)` to `(string, string, *WebAppsClientGetAppSettingsKeyVaultReferencesOptions)` -- Function `*WebAppsClient.GetAppSettingsKeyVaultReferences` return value(s) have been changed from `(*WebAppsGetAppSettingsKeyVaultReferencesPager)` to `(*WebAppsClientGetAppSettingsKeyVaultReferencesPager)` -- Function `*WebAppsClient.Stop` parameter(s) have been changed from `(context.Context, string, string, *WebAppsStopOptions)` to `(context.Context, string, string, *WebAppsClientStopOptions)` -- Function `*WebAppsClient.Stop` return value(s) have been changed from `(WebAppsStopResponse, error)` to `(WebAppsClientStopResponse, error)` -- Function `*WebAppsClient.UpdateDiagnosticLogsConfigSlot` parameter(s) have been changed from `(context.Context, string, string, string, SiteLogsConfig, *WebAppsUpdateDiagnosticLogsConfigSlotOptions)` to `(context.Context, string, string, string, SiteLogsConfig, *WebAppsClientUpdateDiagnosticLogsConfigSlotOptions)` -- Function `*WebAppsClient.UpdateDiagnosticLogsConfigSlot` return value(s) have been changed from `(WebAppsUpdateDiagnosticLogsConfigSlotResponse, error)` to `(WebAppsClientUpdateDiagnosticLogsConfigSlotResponse, error)` -- Function `*DiagnosticsClient.ExecuteSiteAnalysis` parameter(s) have been changed from `(context.Context, string, string, string, string, *DiagnosticsExecuteSiteAnalysisOptions)` to `(context.Context, string, string, string, string, *DiagnosticsClientExecuteSiteAnalysisOptions)` -- Function `*DiagnosticsClient.ExecuteSiteAnalysis` return value(s) have been changed from `(DiagnosticsExecuteSiteAnalysisResponse, error)` to `(DiagnosticsClientExecuteSiteAnalysisResponse, error)` -- Function `*StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild` parameter(s) have been changed from `(context.Context, string, string, string, string, StaticSiteUserProvidedFunctionAppARMResource, *StaticSitesBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions)` to `(context.Context, string, string, string, string, StaticSiteUserProvidedFunctionAppARMResource, *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions)` -- Function `*StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild` return value(s) have been changed from `(StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse, error)` to `(StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse, error)` -- Function `*StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite` parameter(s) have been changed from `(context.Context, string, string, string, StaticSiteUserProvidedFunctionAppARMResource, *StaticSitesBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions)` to `(context.Context, string, string, string, StaticSiteUserProvidedFunctionAppARMResource, *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions)` -- Function `*StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite` return value(s) have been changed from `(StaticSitesRegisterUserProvidedFunctionAppWithStaticSitePollerResponse, error)` to `(StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePollerResponse, error)` -- Function `*WebAppsClient.GetInstanceInfo` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetInstanceInfoOptions)` to `(context.Context, string, string, string, *WebAppsClientGetInstanceInfoOptions)` -- Function `*WebAppsClient.GetInstanceInfo` return value(s) have been changed from `(WebAppsGetInstanceInfoResponse, error)` to `(WebAppsClientGetInstanceInfoResponse, error)` -- Function `*DomainsClient.ListOwnershipIdentifiers` parameter(s) have been changed from `(string, string, *DomainsListOwnershipIdentifiersOptions)` to `(string, string, *DomainsClientListOwnershipIdentifiersOptions)` -- Function `*DomainsClient.ListOwnershipIdentifiers` return value(s) have been changed from `(*DomainsListOwnershipIdentifiersPager)` to `(*DomainsClientListOwnershipIdentifiersPager)` -- Function `*WebAppsClient.ListFunctionKeys` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListFunctionKeysOptions)` to `(context.Context, string, string, string, *WebAppsClientListFunctionKeysOptions)` -- Function `*WebAppsClient.ListFunctionKeys` return value(s) have been changed from `(WebAppsListFunctionKeysResponse, error)` to `(WebAppsClientListFunctionKeysResponse, error)` -- Function `*GlobalClient.GetDeletedWebApp` parameter(s) have been changed from `(context.Context, string, *GlobalGetDeletedWebAppOptions)` to `(context.Context, string, *GlobalClientGetDeletedWebAppOptions)` -- Function `*GlobalClient.GetDeletedWebApp` return value(s) have been changed from `(GlobalGetDeletedWebAppResponse, error)` to `(GlobalClientGetDeletedWebAppResponse, error)` -- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, PrivateLinkConnectionApprovalRequestResource, *WebAppsBeginApproveOrRejectPrivateEndpointConnectionSlotOptions)` to `(context.Context, string, string, string, string, PrivateLinkConnectionApprovalRequestResource, *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions)` -- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot` return value(s) have been changed from `(WebAppsApproveOrRejectPrivateEndpointConnectionSlotPollerResponse, error)` to `(WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPollerResponse, error)` -- Function `*WebAppsClient.GetInstanceProcessSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsGetInstanceProcessSlotOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientGetInstanceProcessSlotOptions)` -- Function `*WebAppsClient.GetInstanceProcessSlot` return value(s) have been changed from `(WebAppsGetInstanceProcessSlotResponse, error)` to `(WebAppsClientGetInstanceProcessSlotResponse, error)` -- Function `*WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsBeginStartWebSiteNetworkTraceOperationSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions)` -- Function `*WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot` return value(s) have been changed from `(WebAppsStartWebSiteNetworkTraceOperationSlotPollerResponse, error)` to `(WebAppsClientStartWebSiteNetworkTraceOperationSlotPollerResponse, error)` -- Function `*WebAppsClient.ListAzureStorageAccounts` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListAzureStorageAccountsOptions)` to `(context.Context, string, string, *WebAppsClientListAzureStorageAccountsOptions)` -- Function `*WebAppsClient.ListAzureStorageAccounts` return value(s) have been changed from `(WebAppsListAzureStorageAccountsResponse, error)` to `(WebAppsClientListAzureStorageAccountsResponse, error)` -- Function `*WebAppsClient.ListInstanceIdentifiersSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListInstanceIdentifiersSlotOptions)` to `(string, string, string, *WebAppsClientListInstanceIdentifiersSlotOptions)` -- Function `*WebAppsClient.ListInstanceIdentifiersSlot` return value(s) have been changed from `(*WebAppsListInstanceIdentifiersSlotPager)` to `(*WebAppsClientListInstanceIdentifiersSlotPager)` -- Function `*WebAppsClient.GetPrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetPrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, *WebAppsClientGetPrivateEndpointConnectionOptions)` -- Function `*WebAppsClient.GetPrivateEndpointConnection` return value(s) have been changed from `(WebAppsGetPrivateEndpointConnectionResponse, error)` to `(WebAppsClientGetPrivateEndpointConnectionResponse, error)` -- Function `*WebAppsClient.Update` parameter(s) have been changed from `(context.Context, string, string, SitePatchResource, *WebAppsUpdateOptions)` to `(context.Context, string, string, SitePatchResource, *WebAppsClientUpdateOptions)` -- Function `*WebAppsClient.Update` return value(s) have been changed from `(WebAppsUpdateResponse, error)` to `(WebAppsClientUpdateResponse, error)` -- Function `*WebAppsClient.StopWebSiteNetworkTrace` parameter(s) have been changed from `(context.Context, string, string, *WebAppsStopWebSiteNetworkTraceOptions)` to `(context.Context, string, string, *WebAppsClientStopWebSiteNetworkTraceOptions)` -- Function `*WebAppsClient.StopWebSiteNetworkTrace` return value(s) have been changed from `(WebAppsStopWebSiteNetworkTraceResponse, error)` to `(WebAppsClientStopWebSiteNetworkTraceResponse, error)` -- Function `*DiagnosticsClient.ListSiteDetectorResponses` parameter(s) have been changed from `(string, string, *DiagnosticsListSiteDetectorResponsesOptions)` to `(string, string, *DiagnosticsClientListSiteDetectorResponsesOptions)` -- Function `*DiagnosticsClient.ListSiteDetectorResponses` return value(s) have been changed from `(*DiagnosticsListSiteDetectorResponsesPager)` to `(*DiagnosticsClientListSiteDetectorResponsesPager)` -- Function `*DomainsClient.CreateOrUpdateOwnershipIdentifier` parameter(s) have been changed from `(context.Context, string, string, string, DomainOwnershipIdentifier, *DomainsCreateOrUpdateOwnershipIdentifierOptions)` to `(context.Context, string, string, string, DomainOwnershipIdentifier, *DomainsClientCreateOrUpdateOwnershipIdentifierOptions)` -- Function `*DomainsClient.CreateOrUpdateOwnershipIdentifier` return value(s) have been changed from `(DomainsCreateOrUpdateOwnershipIdentifierResponse, error)` to `(DomainsClientCreateOrUpdateOwnershipIdentifierResponse, error)` -- Function `*StaticSitesClient.GetUserProvidedFunctionAppForStaticSite` parameter(s) have been changed from `(context.Context, string, string, string, *StaticSitesGetUserProvidedFunctionAppForStaticSiteOptions)` to `(context.Context, string, string, string, *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions)` -- Function `*StaticSitesClient.GetUserProvidedFunctionAppForStaticSite` return value(s) have been changed from `(StaticSitesGetUserProvidedFunctionAppForStaticSiteResponse, error)` to `(StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse, error)` -- Function `*WebAppsClient.BeginCreateFunction` parameter(s) have been changed from `(context.Context, string, string, string, FunctionEnvelope, *WebAppsBeginCreateFunctionOptions)` to `(context.Context, string, string, string, FunctionEnvelope, *WebAppsClientBeginCreateFunctionOptions)` -- Function `*WebAppsClient.BeginCreateFunction` return value(s) have been changed from `(WebAppsCreateFunctionPollerResponse, error)` to `(WebAppsClientCreateFunctionPollerResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateConfiguration` parameter(s) have been changed from `(context.Context, string, string, SiteConfigResource, *WebAppsCreateOrUpdateConfigurationOptions)` to `(context.Context, string, string, SiteConfigResource, *WebAppsClientCreateOrUpdateConfigurationOptions)` -- Function `*WebAppsClient.CreateOrUpdateConfiguration` return value(s) have been changed from `(WebAppsCreateOrUpdateConfigurationResponse, error)` to `(WebAppsClientCreateOrUpdateConfigurationResponse, error)` -- Function `*WebAppsClient.ListSiteBackupsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListSiteBackupsSlotOptions)` to `(string, string, string, *WebAppsClientListSiteBackupsSlotOptions)` -- Function `*WebAppsClient.ListSiteBackupsSlot` return value(s) have been changed from `(*WebAppsListSiteBackupsSlotPager)` to `(*WebAppsClientListSiteBackupsSlotPager)` -- Function `*DiagnosticsClient.ListSiteAnalyses` parameter(s) have been changed from `(string, string, string, *DiagnosticsListSiteAnalysesOptions)` to `(string, string, string, *DiagnosticsClientListSiteAnalysesOptions)` -- Function `*DiagnosticsClient.ListSiteAnalyses` return value(s) have been changed from `(*DiagnosticsListSiteAnalysesPager)` to `(*DiagnosticsClientListSiteAnalysesPager)` -- Function `*WebAppsClient.DeleteHybridConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsDeleteHybridConnectionSlotOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientDeleteHybridConnectionSlotOptions)` -- Function `*WebAppsClient.DeleteHybridConnectionSlot` return value(s) have been changed from `(WebAppsDeleteHybridConnectionSlotResponse, error)` to `(WebAppsClientDeleteHybridConnectionSlotResponse, error)` -- Function `*WebAppsClient.ResetSlotConfigurationSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsResetSlotConfigurationSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientResetSlotConfigurationSlotOptions)` -- Function `*WebAppsClient.ResetSlotConfigurationSlot` return value(s) have been changed from `(WebAppsResetSlotConfigurationSlotResponse, error)` to `(WebAppsClientResetSlotConfigurationSlotResponse, error)` -- Function `*WebAppsClient.GetSwiftVirtualNetworkConnection` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetSwiftVirtualNetworkConnectionOptions)` to `(context.Context, string, string, *WebAppsClientGetSwiftVirtualNetworkConnectionOptions)` -- Function `*WebAppsClient.GetSwiftVirtualNetworkConnection` return value(s) have been changed from `(WebAppsGetSwiftVirtualNetworkConnectionResponse, error)` to `(WebAppsClientGetSwiftVirtualNetworkConnectionResponse, error)` -- Function `*RecommendationsClient.List` parameter(s) have been changed from `(*RecommendationsListOptions)` to `(*RecommendationsClientListOptions)` -- Function `*RecommendationsClient.List` return value(s) have been changed from `(*RecommendationsListPager)` to `(*RecommendationsClientListPager)` -- Function `*WebAppsClient.GetFunctionsAdminToken` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetFunctionsAdminTokenOptions)` to `(context.Context, string, string, *WebAppsClientGetFunctionsAdminTokenOptions)` -- Function `*WebAppsClient.GetFunctionsAdminToken` return value(s) have been changed from `(WebAppsGetFunctionsAdminTokenResponse, error)` to `(WebAppsClientGetFunctionsAdminTokenResponse, error)` -- Function `*WebAppsClient.GetVnetConnection` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetVnetConnectionOptions)` to `(context.Context, string, string, string, *WebAppsClientGetVnetConnectionOptions)` -- Function `*WebAppsClient.GetVnetConnection` return value(s) have been changed from `(WebAppsGetVnetConnectionResponse, error)` to `(WebAppsClientGetVnetConnectionResponse, error)` -- Function `*WebAppsClient.ListSlotDifferencesSlot` parameter(s) have been changed from `(string, string, string, CsmSlotEntity, *WebAppsListSlotDifferencesSlotOptions)` to `(string, string, string, CsmSlotEntity, *WebAppsClientListSlotDifferencesSlotOptions)` -- Function `*WebAppsClient.ListSlotDifferencesSlot` return value(s) have been changed from `(*WebAppsListSlotDifferencesSlotPager)` to `(*WebAppsClientListSlotDifferencesSlotPager)` -- Function `*WebAppsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *WebAppsListByResourceGroupOptions)` to `(string, *WebAppsClientListByResourceGroupOptions)` -- Function `*WebAppsClient.ListByResourceGroup` return value(s) have been changed from `(*WebAppsListByResourceGroupPager)` to `(*WebAppsClientListByResourceGroupPager)` -- Function `*WebAppsClient.GetProcessModuleSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsGetProcessModuleSlotOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientGetProcessModuleSlotOptions)` -- Function `*WebAppsClient.GetProcessModuleSlot` return value(s) have been changed from `(WebAppsGetProcessModuleSlotResponse, error)` to `(WebAppsClientGetProcessModuleSlotResponse, error)` -- Function `*StaticSitesClient.GetPrivateLinkResources` parameter(s) have been changed from `(context.Context, string, string, *StaticSitesGetPrivateLinkResourcesOptions)` to `(context.Context, string, string, *StaticSitesClientGetPrivateLinkResourcesOptions)` -- Function `*StaticSitesClient.GetPrivateLinkResources` return value(s) have been changed from `(StaticSitesGetPrivateLinkResourcesResponse, error)` to `(StaticSitesClientGetPrivateLinkResourcesResponse, error)` -- Function `*WebAppsClient.GetWebSiteContainerLogs` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetWebSiteContainerLogsOptions)` to `(context.Context, string, string, *WebAppsClientGetWebSiteContainerLogsOptions)` -- Function `*WebAppsClient.GetWebSiteContainerLogs` return value(s) have been changed from `(WebAppsGetWebSiteContainerLogsResponse, error)` to `(WebAppsClientGetWebSiteContainerLogsResponse, error)` -- Function `*WebAppsClient.DeleteFunctionSecretSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsDeleteFunctionSecretSlotOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientDeleteFunctionSecretSlotOptions)` -- Function `*WebAppsClient.DeleteFunctionSecretSlot` return value(s) have been changed from `(WebAppsDeleteFunctionSecretSlotResponse, error)` to `(WebAppsClientDeleteFunctionSecretSlotResponse, error)` -- Function `*StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings` parameter(s) have been changed from `(context.Context, string, string, StringDictionary, *StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsOptions)` to `(context.Context, string, string, StringDictionary, *StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions)` -- Function `*StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings` return value(s) have been changed from `(StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsResponse, error)` to `(StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse, error)` -- Function `*DomainRegistrationProviderClient.ListOperations` parameter(s) have been changed from `(*DomainRegistrationProviderListOperationsOptions)` to `(*DomainRegistrationProviderClientListOperationsOptions)` -- Function `*DomainRegistrationProviderClient.ListOperations` return value(s) have been changed from `(*DomainRegistrationProviderListOperationsPager)` to `(*DomainRegistrationProviderClientListOperationsPager)` -- Function `*DiagnosticsClient.ExecuteSiteAnalysisSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *DiagnosticsExecuteSiteAnalysisSlotOptions)` to `(context.Context, string, string, string, string, string, *DiagnosticsClientExecuteSiteAnalysisSlotOptions)` -- Function `*DiagnosticsClient.ExecuteSiteAnalysisSlot` return value(s) have been changed from `(DiagnosticsExecuteSiteAnalysisSlotResponse, error)` to `(DiagnosticsClientExecuteSiteAnalysisSlotResponse, error)` -- Function `*WebAppsClient.ListFunctionKeysSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsListFunctionKeysSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientListFunctionKeysSlotOptions)` -- Function `*WebAppsClient.ListFunctionKeysSlot` return value(s) have been changed from `(WebAppsListFunctionKeysSlotResponse, error)` to `(WebAppsClientListFunctionKeysSlotResponse, error)` -- Function `*WebAppsClient.PutPrivateAccessVnet` parameter(s) have been changed from `(context.Context, string, string, PrivateAccess, *WebAppsPutPrivateAccessVnetOptions)` to `(context.Context, string, string, PrivateAccess, *WebAppsClientPutPrivateAccessVnetOptions)` -- Function `*WebAppsClient.PutPrivateAccessVnet` return value(s) have been changed from `(WebAppsPutPrivateAccessVnetResponse, error)` to `(WebAppsClientPutPrivateAccessVnetResponse, error)` -- Function `*StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain` parameter(s) have been changed from `(context.Context, string, string, string, StaticSiteCustomDomainRequestPropertiesARMResource, *StaticSitesBeginCreateOrUpdateStaticSiteCustomDomainOptions)` to `(context.Context, string, string, string, StaticSiteCustomDomainRequestPropertiesARMResource, *StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions)` -- Function `*StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain` return value(s) have been changed from `(StaticSitesCreateOrUpdateStaticSiteCustomDomainPollerResponse, error)` to `(StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPollerResponse, error)` -- Function `*WebAppsClient.GetSiteExtension` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetSiteExtensionOptions)` to `(context.Context, string, string, string, *WebAppsClientGetSiteExtensionOptions)` -- Function `*WebAppsClient.GetSiteExtension` return value(s) have been changed from `(WebAppsGetSiteExtensionResponse, error)` to `(WebAppsClientGetSiteExtensionResponse, error)` -- Function `*WebAppsClient.UpdateHybridConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, HybridConnection, *WebAppsUpdateHybridConnectionSlotOptions)` to `(context.Context, string, string, string, string, string, HybridConnection, *WebAppsClientUpdateHybridConnectionSlotOptions)` -- Function `*WebAppsClient.UpdateHybridConnectionSlot` return value(s) have been changed from `(WebAppsUpdateHybridConnectionSlotResponse, error)` to `(WebAppsClientUpdateHybridConnectionSlotResponse, error)` -- Function `*WebAppsClient.RunTriggeredWebJobSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsRunTriggeredWebJobSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientRunTriggeredWebJobSlotOptions)` -- Function `*WebAppsClient.RunTriggeredWebJobSlot` return value(s) have been changed from `(WebAppsRunTriggeredWebJobSlotResponse, error)` to `(WebAppsClientRunTriggeredWebJobSlotResponse, error)` -- Function `*DiagnosticsClient.ListSiteAnalysesSlot` parameter(s) have been changed from `(string, string, string, string, *DiagnosticsListSiteAnalysesSlotOptions)` to `(string, string, string, string, *DiagnosticsClientListSiteAnalysesSlotOptions)` -- Function `*DiagnosticsClient.ListSiteAnalysesSlot` return value(s) have been changed from `(*DiagnosticsListSiteAnalysesSlotPager)` to `(*DiagnosticsClientListSiteAnalysesSlotPager)` -- Function `*WebAppsClient.GetInstanceProcessModule` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsGetInstanceProcessModuleOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientGetInstanceProcessModuleOptions)` -- Function `*WebAppsClient.GetInstanceProcessModule` return value(s) have been changed from `(WebAppsGetInstanceProcessModuleResponse, error)` to `(WebAppsClientGetInstanceProcessModuleResponse, error)` -- Function `*WebAppsClient.GetNetworkTraceOperationV2` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetNetworkTraceOperationV2Options)` to `(context.Context, string, string, string, *WebAppsClientGetNetworkTraceOperationV2Options)` -- Function `*WebAppsClient.GetNetworkTraceOperationV2` return value(s) have been changed from `(WebAppsGetNetworkTraceOperationV2Response, error)` to `(WebAppsClientGetNetworkTraceOperationV2Response, error)` -- Function `*WebAppsClient.ListProcessModules` parameter(s) have been changed from `(string, string, string, *WebAppsListProcessModulesOptions)` to `(string, string, string, *WebAppsClientListProcessModulesOptions)` -- Function `*WebAppsClient.ListProcessModules` return value(s) have been changed from `(*WebAppsListProcessModulesPager)` to `(*WebAppsClientListProcessModulesPager)` -- Function `*WebAppsClient.SyncFunctionTriggers` parameter(s) have been changed from `(context.Context, string, string, *WebAppsSyncFunctionTriggersOptions)` to `(context.Context, string, string, *WebAppsClientSyncFunctionTriggersOptions)` -- Function `*WebAppsClient.SyncFunctionTriggers` return value(s) have been changed from `(WebAppsSyncFunctionTriggersResponse, error)` to `(WebAppsClientSyncFunctionTriggersResponse, error)` -- Function `*StaticSitesClient.ListStaticSiteBuildFunctions` parameter(s) have been changed from `(string, string, string, *StaticSitesListStaticSiteBuildFunctionsOptions)` to `(string, string, string, *StaticSitesClientListStaticSiteBuildFunctionsOptions)` -- Function `*StaticSitesClient.ListStaticSiteBuildFunctions` return value(s) have been changed from `(*StaticSitesListStaticSiteBuildFunctionsPager)` to `(*StaticSitesClientListStaticSiteBuildFunctionsPager)` -- Function `*WebAppsClient.GetHybridConnection` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetHybridConnectionOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetHybridConnectionOptions)` -- Function `*WebAppsClient.GetHybridConnection` return value(s) have been changed from `(WebAppsGetHybridConnectionResponse, error)` to `(WebAppsClientGetHybridConnectionResponse, error)` -- Function `*WebAppsClient.GetContinuousWebJobSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetContinuousWebJobSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetContinuousWebJobSlotOptions)` -- Function `*WebAppsClient.GetContinuousWebJobSlot` return value(s) have been changed from `(WebAppsGetContinuousWebJobSlotResponse, error)` to `(WebAppsClientGetContinuousWebJobSlotResponse, error)` -- Function `*WebAppsClient.GetDeployment` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetDeploymentOptions)` to `(context.Context, string, string, string, *WebAppsClientGetDeploymentOptions)` -- Function `*WebAppsClient.GetDeployment` return value(s) have been changed from `(WebAppsGetDeploymentResponse, error)` to `(WebAppsClientGetDeploymentResponse, error)` -- Function `*DiagnosticsClient.GetSiteDetectorResponse` parameter(s) have been changed from `(context.Context, string, string, string, *DiagnosticsGetSiteDetectorResponseOptions)` to `(context.Context, string, string, string, *DiagnosticsClientGetSiteDetectorResponseOptions)` -- Function `*DiagnosticsClient.GetSiteDetectorResponse` return value(s) have been changed from `(DiagnosticsGetSiteDetectorResponseResponse, error)` to `(DiagnosticsClientGetSiteDetectorResponseResponse, error)` -- Function `*WebAppsClient.BeginCreateInstanceMSDeployOperation` parameter(s) have been changed from `(context.Context, string, string, string, MSDeploy, *WebAppsBeginCreateInstanceMSDeployOperationOptions)` to `(context.Context, string, string, string, MSDeploy, *WebAppsClientBeginCreateInstanceMSDeployOperationOptions)` -- Function `*WebAppsClient.BeginCreateInstanceMSDeployOperation` return value(s) have been changed from `(WebAppsCreateInstanceMSDeployOperationPollerResponse, error)` to `(WebAppsClientCreateInstanceMSDeployOperationPollerResponse, error)` -- Function `*WebAppsClient.BeginDeletePrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsBeginDeletePrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, *WebAppsClientBeginDeletePrivateEndpointConnectionOptions)` -- Function `*WebAppsClient.BeginDeletePrivateEndpointConnection` return value(s) have been changed from `(WebAppsDeletePrivateEndpointConnectionPollerResponse, error)` to `(WebAppsClientDeletePrivateEndpointConnectionPollerResponse, error)` -- Function `*WebAppsClient.RecoverSiteConfigurationSnapshot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsRecoverSiteConfigurationSnapshotOptions)` to `(context.Context, string, string, string, *WebAppsClientRecoverSiteConfigurationSnapshotOptions)` -- Function `*WebAppsClient.RecoverSiteConfigurationSnapshot` return value(s) have been changed from `(WebAppsRecoverSiteConfigurationSnapshotResponse, error)` to `(WebAppsClientRecoverSiteConfigurationSnapshotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateVnetConnectionGateway` parameter(s) have been changed from `(context.Context, string, string, string, string, VnetGateway, *WebAppsCreateOrUpdateVnetConnectionGatewayOptions)` to `(context.Context, string, string, string, string, VnetGateway, *WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions)` -- Function `*WebAppsClient.CreateOrUpdateVnetConnectionGateway` return value(s) have been changed from `(WebAppsCreateOrUpdateVnetConnectionGatewayResponse, error)` to `(WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse, error)` -- Function `*ProviderClient.ListOperations` parameter(s) have been changed from `(*ProviderListOperationsOptions)` to `(*ProviderClientListOperationsOptions)` -- Function `*ProviderClient.ListOperations` return value(s) have been changed from `(*ProviderListOperationsPager)` to `(*ProviderClientListOperationsPager)` -- Function `*WebAppsClient.ResetProductionSlotConfig` parameter(s) have been changed from `(context.Context, string, string, *WebAppsResetProductionSlotConfigOptions)` to `(context.Context, string, string, *WebAppsClientResetProductionSlotConfigOptions)` -- Function `*WebAppsClient.ResetProductionSlotConfig` return value(s) have been changed from `(WebAppsResetProductionSlotConfigResponse, error)` to `(WebAppsClientResetProductionSlotConfigResponse, error)` -- Function `*WebAppsClient.GetMigrateMySQLStatus` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetMigrateMySQLStatusOptions)` to `(context.Context, string, string, *WebAppsClientGetMigrateMySQLStatusOptions)` -- Function `*WebAppsClient.GetMigrateMySQLStatus` return value(s) have been changed from `(WebAppsGetMigrateMySQLStatusResponse, error)` to `(WebAppsClientGetMigrateMySQLStatusResponse, error)` -- Function `*WebAppsClient.ListHostKeysSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListHostKeysSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListHostKeysSlotOptions)` -- Function `*WebAppsClient.ListHostKeysSlot` return value(s) have been changed from `(WebAppsListHostKeysSlotResponse, error)` to `(WebAppsClientListHostKeysSlotResponse, error)` -- Function `*RecommendationsClient.DisableAllForWebApp` parameter(s) have been changed from `(context.Context, string, string, *RecommendationsDisableAllForWebAppOptions)` to `(context.Context, string, string, *RecommendationsClientDisableAllForWebAppOptions)` -- Function `*RecommendationsClient.DisableAllForWebApp` return value(s) have been changed from `(RecommendationsDisableAllForWebAppResponse, error)` to `(RecommendationsClientDisableAllForWebAppResponse, error)` -- Function `*WebAppsClient.ListBackupStatusSecrets` parameter(s) have been changed from `(context.Context, string, string, string, BackupRequest, *WebAppsListBackupStatusSecretsOptions)` to `(context.Context, string, string, string, BackupRequest, *WebAppsClientListBackupStatusSecretsOptions)` -- Function `*WebAppsClient.ListBackupStatusSecrets` return value(s) have been changed from `(WebAppsListBackupStatusSecretsResponse, error)` to `(WebAppsClientListBackupStatusSecretsResponse, error)` -- Function `*WebAppsClient.GetInstanceMSDeployLog` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetInstanceMSDeployLogOptions)` to `(context.Context, string, string, string, *WebAppsClientGetInstanceMSDeployLogOptions)` -- Function `*WebAppsClient.GetInstanceMSDeployLog` return value(s) have been changed from `(WebAppsGetInstanceMSDeployLogResponse, error)` to `(WebAppsClientGetInstanceMSDeployLogResponse, error)` -- Function `*StaticSitesClient.BeginDeleteStaticSiteBuild` parameter(s) have been changed from `(context.Context, string, string, string, *StaticSitesBeginDeleteStaticSiteBuildOptions)` to `(context.Context, string, string, string, *StaticSitesClientBeginDeleteStaticSiteBuildOptions)` -- Function `*StaticSitesClient.BeginDeleteStaticSiteBuild` return value(s) have been changed from `(StaticSitesDeleteStaticSiteBuildPollerResponse, error)` to `(StaticSitesClientDeleteStaticSiteBuildPollerResponse, error)` -- Function `*WebAppsClient.BeginRestoreSnapshot` parameter(s) have been changed from `(context.Context, string, string, SnapshotRestoreRequest, *WebAppsBeginRestoreSnapshotOptions)` to `(context.Context, string, string, SnapshotRestoreRequest, *WebAppsClientBeginRestoreSnapshotOptions)` -- Function `*WebAppsClient.BeginRestoreSnapshot` return value(s) have been changed from `(WebAppsRestoreSnapshotPollerResponse, error)` to `(WebAppsClientRestoreSnapshotPollerResponse, error)` -- Function `*WebAppsClient.ListPublicCertificatesSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListPublicCertificatesSlotOptions)` to `(string, string, string, *WebAppsClientListPublicCertificatesSlotOptions)` -- Function `*WebAppsClient.ListPublicCertificatesSlot` return value(s) have been changed from `(*WebAppsListPublicCertificatesSlotPager)` to `(*WebAppsClientListPublicCertificatesSlotPager)` -- Function `*WebAppsClient.GetPrivateEndpointConnectionList` parameter(s) have been changed from `(string, string, *WebAppsGetPrivateEndpointConnectionListOptions)` to `(string, string, *WebAppsClientGetPrivateEndpointConnectionListOptions)` -- Function `*WebAppsClient.GetPrivateEndpointConnectionList` return value(s) have been changed from `(*WebAppsGetPrivateEndpointConnectionListPager)` to `(*WebAppsClientGetPrivateEndpointConnectionListPager)` -- Function `*CertificatesClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *CertificatesDeleteOptions)` to `(context.Context, string, string, *CertificatesClientDeleteOptions)` -- Function `*CertificatesClient.Delete` return value(s) have been changed from `(CertificatesDeleteResponse, error)` to `(CertificatesClientDeleteResponse, error)` -- Function `*WebAppsClient.UpdateSlot` parameter(s) have been changed from `(context.Context, string, string, string, SitePatchResource, *WebAppsUpdateSlotOptions)` to `(context.Context, string, string, string, SitePatchResource, *WebAppsClientUpdateSlotOptions)` -- Function `*WebAppsClient.UpdateSlot` return value(s) have been changed from `(WebAppsUpdateSlotResponse, error)` to `(WebAppsClientUpdateSlotResponse, error)` -- Function `*WebAppsClient.ListSnapshotsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListSnapshotsSlotOptions)` to `(string, string, string, *WebAppsClientListSnapshotsSlotOptions)` -- Function `*WebAppsClient.ListSnapshotsSlot` return value(s) have been changed from `(*WebAppsListSnapshotsSlotPager)` to `(*WebAppsClientListSnapshotsSlotPager)` -- Function `*WebAppsClient.ListVnetConnectionsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListVnetConnectionsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListVnetConnectionsSlotOptions)` -- Function `*WebAppsClient.ListVnetConnectionsSlot` return value(s) have been changed from `(WebAppsListVnetConnectionsSlotResponse, error)` to `(WebAppsClientListVnetConnectionsSlotResponse, error)` -- Function `*CertificatesClient.Get` parameter(s) have been changed from `(context.Context, string, string, *CertificatesGetOptions)` to `(context.Context, string, string, *CertificatesClientGetOptions)` -- Function `*CertificatesClient.Get` return value(s) have been changed from `(CertificatesGetResponse, error)` to `(CertificatesClientGetResponse, error)` -- Function `*WebAppsClient.DeleteRelayServiceConnection` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteRelayServiceConnectionOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteRelayServiceConnectionOptions)` -- Function `*WebAppsClient.DeleteRelayServiceConnection` return value(s) have been changed from `(WebAppsDeleteRelayServiceConnectionResponse, error)` to `(WebAppsClientDeleteRelayServiceConnectionResponse, error)` -- Function `*WebAppsClient.BeginRestoreFromDeletedApp` parameter(s) have been changed from `(context.Context, string, string, DeletedAppRestoreRequest, *WebAppsBeginRestoreFromDeletedAppOptions)` to `(context.Context, string, string, DeletedAppRestoreRequest, *WebAppsClientBeginRestoreFromDeletedAppOptions)` -- Function `*WebAppsClient.BeginRestoreFromDeletedApp` return value(s) have been changed from `(WebAppsRestoreFromDeletedAppPollerResponse, error)` to `(WebAppsClientRestoreFromDeletedAppPollerResponse, error)` -- Function `*WebAppsClient.GetFunctionsAdminTokenSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetFunctionsAdminTokenSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetFunctionsAdminTokenSlotOptions)` -- Function `*WebAppsClient.GetFunctionsAdminTokenSlot` return value(s) have been changed from `(WebAppsGetFunctionsAdminTokenSlotResponse, error)` to `(WebAppsClientGetFunctionsAdminTokenSlotResponse, error)` -- Function `*WebAppsClient.List` parameter(s) have been changed from `(*WebAppsListOptions)` to `(*WebAppsClientListOptions)` -- Function `*WebAppsClient.List` return value(s) have been changed from `(*WebAppsListPager)` to `(*WebAppsClientListPager)` -- Function `*WebAppsClient.ListInstanceProcessesSlot` parameter(s) have been changed from `(string, string, string, string, *WebAppsListInstanceProcessesSlotOptions)` to `(string, string, string, string, *WebAppsClientListInstanceProcessesSlotOptions)` -- Function `*WebAppsClient.ListInstanceProcessesSlot` return value(s) have been changed from `(*WebAppsListInstanceProcessesSlotPager)` to `(*WebAppsClientListInstanceProcessesSlotPager)` -- Function `*WebAppsClient.ListMetadataSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListMetadataSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListMetadataSlotOptions)` -- Function `*WebAppsClient.ListMetadataSlot` return value(s) have been changed from `(WebAppsListMetadataSlotResponse, error)` to `(WebAppsClientListMetadataSlotResponse, error)` -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetSiteConnectionStringKeyVaultReferenceSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions)` -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot` return value(s) have been changed from `(WebAppsGetSiteConnectionStringKeyVaultReferenceSlotResponse, error)` to `(WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse, error)` -- Function `*RecommendationsClient.DisableRecommendationForSite` parameter(s) have been changed from `(context.Context, string, string, string, *RecommendationsDisableRecommendationForSiteOptions)` to `(context.Context, string, string, string, *RecommendationsClientDisableRecommendationForSiteOptions)` -- Function `*RecommendationsClient.DisableRecommendationForSite` return value(s) have been changed from `(RecommendationsDisableRecommendationForSiteResponse, error)` to `(RecommendationsClientDisableRecommendationForSiteResponse, error)` -- Function `*WebAppsClient.GetSwiftVirtualNetworkConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetSwiftVirtualNetworkConnectionSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions)` -- Function `*WebAppsClient.GetSwiftVirtualNetworkConnectionSlot` return value(s) have been changed from `(WebAppsGetSwiftVirtualNetworkConnectionSlotResponse, error)` to `(WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse, error)` -- Function `*WebAppsClient.GetAuthSettingsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetAuthSettingsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetAuthSettingsSlotOptions)` -- Function `*WebAppsClient.GetAuthSettingsSlot` return value(s) have been changed from `(WebAppsGetAuthSettingsSlotResponse, error)` to `(WebAppsClientGetAuthSettingsSlotResponse, error)` -- Function `*WebAppsClient.GetDeploymentSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetDeploymentSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetDeploymentSlotOptions)` -- Function `*WebAppsClient.GetDeploymentSlot` return value(s) have been changed from `(WebAppsGetDeploymentSlotResponse, error)` to `(WebAppsClientGetDeploymentSlotResponse, error)` -- Function `*WebAppsClient.GetInstanceMsDeployStatus` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetInstanceMsDeployStatusOptions)` to `(context.Context, string, string, string, *WebAppsClientGetInstanceMsDeployStatusOptions)` -- Function `*WebAppsClient.GetInstanceMsDeployStatus` return value(s) have been changed from `(WebAppsGetInstanceMsDeployStatusResponse, error)` to `(WebAppsClientGetInstanceMsDeployStatusResponse, error)` -- Function `*WebAppsClient.DeleteDeploymentSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteDeploymentSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteDeploymentSlotOptions)` -- Function `*WebAppsClient.DeleteDeploymentSlot` return value(s) have been changed from `(WebAppsDeleteDeploymentSlotResponse, error)` to `(WebAppsClientDeleteDeploymentSlotResponse, error)` -- Function `*WebAppsClient.DeleteSwiftVirtualNetworkSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteSwiftVirtualNetworkSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteSwiftVirtualNetworkSlotOptions)` -- Function `*WebAppsClient.DeleteSwiftVirtualNetworkSlot` return value(s) have been changed from `(WebAppsDeleteSwiftVirtualNetworkSlotResponse, error)` to `(WebAppsClientDeleteSwiftVirtualNetworkSlotResponse, error)` -- Function `*WebAppsClient.GetHostNameBinding` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetHostNameBindingOptions)` to `(context.Context, string, string, string, *WebAppsClientGetHostNameBindingOptions)` -- Function `*WebAppsClient.GetHostNameBinding` return value(s) have been changed from `(WebAppsGetHostNameBindingResponse, error)` to `(WebAppsClientGetHostNameBindingResponse, error)` -- Function `*WebAppsClient.GenerateNewSitePublishingPassword` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGenerateNewSitePublishingPasswordOptions)` to `(context.Context, string, string, *WebAppsClientGenerateNewSitePublishingPasswordOptions)` -- Function `*WebAppsClient.GenerateNewSitePublishingPassword` return value(s) have been changed from `(WebAppsGenerateNewSitePublishingPasswordResponse, error)` to `(WebAppsClientGenerateNewSitePublishingPasswordResponse, error)` -- Function `*StaticSitesClient.GetStaticSite` parameter(s) have been changed from `(context.Context, string, string, *StaticSitesGetStaticSiteOptions)` to `(context.Context, string, string, *StaticSitesClientGetStaticSiteOptions)` -- Function `*StaticSitesClient.GetStaticSite` return value(s) have been changed from `(StaticSitesGetStaticSiteResponse, error)` to `(StaticSitesClientGetStaticSiteResponse, error)` -- Function `*StaticSitesClient.ListStaticSiteFunctions` parameter(s) have been changed from `(string, string, *StaticSitesListStaticSiteFunctionsOptions)` to `(string, string, *StaticSitesClientListStaticSiteFunctionsOptions)` -- Function `*StaticSitesClient.ListStaticSiteFunctions` return value(s) have been changed from `(*StaticSitesListStaticSiteFunctionsPager)` to `(*StaticSitesClientListStaticSiteFunctionsPager)` -- Function `*WebAppsClient.ListConnectionStringsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListConnectionStringsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListConnectionStringsSlotOptions)` -- Function `*WebAppsClient.ListConnectionStringsSlot` return value(s) have been changed from `(WebAppsListConnectionStringsSlotResponse, error)` to `(WebAppsClientListConnectionStringsSlotResponse, error)` -- Function `*WebAppsClient.UpdateScmAllowedSlot` parameter(s) have been changed from `(context.Context, string, string, string, CsmPublishingCredentialsPoliciesEntity, *WebAppsUpdateScmAllowedSlotOptions)` to `(context.Context, string, string, string, CsmPublishingCredentialsPoliciesEntity, *WebAppsClientUpdateScmAllowedSlotOptions)` -- Function `*WebAppsClient.UpdateScmAllowedSlot` return value(s) have been changed from `(WebAppsUpdateScmAllowedSlotResponse, error)` to `(WebAppsClientUpdateScmAllowedSlotResponse, error)` -- Function `*WebAppsClient.ListPublishingProfileXMLWithSecretsSlot` parameter(s) have been changed from `(context.Context, string, string, string, CsmPublishingProfileOptions, *WebAppsListPublishingProfileXMLWithSecretsSlotOptions)` to `(context.Context, string, string, string, CsmPublishingProfileOptions, *WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions)` -- Function `*WebAppsClient.ListPublishingProfileXMLWithSecretsSlot` return value(s) have been changed from `(WebAppsListPublishingProfileXMLWithSecretsSlotResponse, error)` to `(WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse, error)` -- Function `*WebAppsClient.DeleteProcess` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteProcessOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteProcessOptions)` -- Function `*WebAppsClient.DeleteProcess` return value(s) have been changed from `(WebAppsDeleteProcessResponse, error)` to `(WebAppsClientDeleteProcessResponse, error)` -- Function `*StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite` parameter(s) have been changed from `(context.Context, string, string, string, StaticSiteCustomDomainRequestPropertiesARMResource, *StaticSitesBeginValidateCustomDomainCanBeAddedToStaticSiteOptions)` to `(context.Context, string, string, string, StaticSiteCustomDomainRequestPropertiesARMResource, *StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions)` -- Function `*StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite` return value(s) have been changed from `(StaticSitesValidateCustomDomainCanBeAddedToStaticSitePollerResponse, error)` to `(StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePollerResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateHostSecretSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, KeyInfo, *WebAppsCreateOrUpdateHostSecretSlotOptions)` to `(context.Context, string, string, string, string, string, KeyInfo, *WebAppsClientCreateOrUpdateHostSecretSlotOptions)` -- Function `*WebAppsClient.CreateOrUpdateHostSecretSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateHostSecretSlotResponse, error)` to `(WebAppsClientCreateOrUpdateHostSecretSlotResponse, error)` -- Function `*WebAppsClient.GetPrivateAccess` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetPrivateAccessOptions)` to `(context.Context, string, string, *WebAppsClientGetPrivateAccessOptions)` -- Function `*WebAppsClient.GetPrivateAccess` return value(s) have been changed from `(WebAppsGetPrivateAccessResponse, error)` to `(WebAppsClientGetPrivateAccessResponse, error)` -- Function `*StaticSitesClient.ListStaticSiteAppSettings` parameter(s) have been changed from `(context.Context, string, string, *StaticSitesListStaticSiteAppSettingsOptions)` to `(context.Context, string, string, *StaticSitesClientListStaticSiteAppSettingsOptions)` -- Function `*StaticSitesClient.ListStaticSiteAppSettings` return value(s) have been changed from `(StaticSitesListStaticSiteAppSettingsResponse, error)` to `(StaticSitesClientListStaticSiteAppSettingsResponse, error)` -- Function `*WebAppsClient.DeleteFunction` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteFunctionOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteFunctionOptions)` -- Function `*WebAppsClient.DeleteFunction` return value(s) have been changed from `(WebAppsDeleteFunctionResponse, error)` to `(WebAppsClientDeleteFunctionResponse, error)` -- Function `*DiagnosticsClient.ListSiteDiagnosticCategories` parameter(s) have been changed from `(string, string, *DiagnosticsListSiteDiagnosticCategoriesOptions)` to `(string, string, *DiagnosticsClientListSiteDiagnosticCategoriesOptions)` -- Function `*DiagnosticsClient.ListSiteDiagnosticCategories` return value(s) have been changed from `(*DiagnosticsListSiteDiagnosticCategoriesPager)` to `(*DiagnosticsClientListSiteDiagnosticCategoriesPager)` -- Function `*WebAppsClient.StartContinuousWebJobSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsStartContinuousWebJobSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientStartContinuousWebJobSlotOptions)` -- Function `*WebAppsClient.StartContinuousWebJobSlot` return value(s) have been changed from `(WebAppsStartContinuousWebJobSlotResponse, error)` to `(WebAppsClientStartContinuousWebJobSlotResponse, error)` -- Function `*StaticSitesClient.ListStaticSiteBuildAppSettings` parameter(s) have been changed from `(context.Context, string, string, string, *StaticSitesListStaticSiteBuildAppSettingsOptions)` to `(context.Context, string, string, string, *StaticSitesClientListStaticSiteBuildAppSettingsOptions)` -- Function `*StaticSitesClient.ListStaticSiteBuildAppSettings` return value(s) have been changed from `(StaticSitesListStaticSiteBuildAppSettingsResponse, error)` to `(StaticSitesClientListStaticSiteBuildAppSettingsResponse, error)` -- Function `*WebAppsClient.UpdateAuthSettingsV2` parameter(s) have been changed from `(context.Context, string, string, SiteAuthSettingsV2, *WebAppsUpdateAuthSettingsV2Options)` to `(context.Context, string, string, SiteAuthSettingsV2, *WebAppsClientUpdateAuthSettingsV2Options)` -- Function `*WebAppsClient.UpdateAuthSettingsV2` return value(s) have been changed from `(WebAppsUpdateAuthSettingsV2Response, error)` to `(WebAppsClientUpdateAuthSettingsV2Response, error)` -- Function `*WebAppsClient.ListProcessesSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListProcessesSlotOptions)` to `(string, string, string, *WebAppsClientListProcessesSlotOptions)` -- Function `*WebAppsClient.ListProcessesSlot` return value(s) have been changed from `(*WebAppsListProcessesSlotPager)` to `(*WebAppsClientListProcessesSlotPager)` -- Function `*WebAppsClient.GetPrivateAccessSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetPrivateAccessSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetPrivateAccessSlotOptions)` -- Function `*WebAppsClient.GetPrivateAccessSlot` return value(s) have been changed from `(WebAppsGetPrivateAccessSlotResponse, error)` to `(WebAppsClientGetPrivateAccessSlotResponse, error)` -- Function `*WebAppsClient.GetWebJobSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetWebJobSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetWebJobSlotOptions)` -- Function `*WebAppsClient.GetWebJobSlot` return value(s) have been changed from `(WebAppsGetWebJobSlotResponse, error)` to `(WebAppsClientGetWebJobSlotResponse, error)` -- Function `*WebAppsClient.GetWebJob` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetWebJobOptions)` to `(context.Context, string, string, string, *WebAppsClientGetWebJobOptions)` -- Function `*WebAppsClient.GetWebJob` return value(s) have been changed from `(WebAppsGetWebJobResponse, error)` to `(WebAppsClientGetWebJobResponse, error)` -- Function `*WebAppsClient.ListAzureStorageAccountsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListAzureStorageAccountsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListAzureStorageAccountsSlotOptions)` -- Function `*WebAppsClient.ListAzureStorageAccountsSlot` return value(s) have been changed from `(WebAppsListAzureStorageAccountsSlotResponse, error)` to `(WebAppsClientListAzureStorageAccountsSlotResponse, error)` -- Function `*WebAppsClient.GetVnetConnectionGatewaySlot` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *WebAppsGetVnetConnectionGatewaySlotOptions)` to `(context.Context, string, string, string, string, string, *WebAppsClientGetVnetConnectionGatewaySlotOptions)` -- Function `*WebAppsClient.GetVnetConnectionGatewaySlot` return value(s) have been changed from `(WebAppsGetVnetConnectionGatewaySlotResponse, error)` to `(WebAppsClientGetVnetConnectionGatewaySlotResponse, error)` -- Function `*WebAppsClient.GetHostNameBindingSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetHostNameBindingSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetHostNameBindingSlotOptions)` -- Function `*WebAppsClient.GetHostNameBindingSlot` return value(s) have been changed from `(WebAppsGetHostNameBindingSlotResponse, error)` to `(WebAppsClientGetHostNameBindingSlotResponse, error)` -- Function `*WebAppsClient.ListPerfMonCounters` parameter(s) have been changed from `(string, string, *WebAppsListPerfMonCountersOptions)` to `(string, string, *WebAppsClientListPerfMonCountersOptions)` -- Function `*WebAppsClient.ListPerfMonCounters` return value(s) have been changed from `(*WebAppsListPerfMonCountersPager)` to `(*WebAppsClientListPerfMonCountersPager)` -- Function `*WebAppsClient.GetSourceControlSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetSourceControlSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetSourceControlSlotOptions)` -- Function `*WebAppsClient.GetSourceControlSlot` return value(s) have been changed from `(WebAppsGetSourceControlSlotResponse, error)` to `(WebAppsClientGetSourceControlSlotResponse, error)` -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReferences` parameter(s) have been changed from `(string, string, *WebAppsGetSiteConnectionStringKeyVaultReferencesOptions)` to `(string, string, *WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions)` -- Function `*WebAppsClient.GetSiteConnectionStringKeyVaultReferences` return value(s) have been changed from `(*WebAppsGetSiteConnectionStringKeyVaultReferencesPager)` to `(*WebAppsClientGetSiteConnectionStringKeyVaultReferencesPager)` -- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *WebAppsBeginApproveOrRejectPrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` -- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection` return value(s) have been changed from `(WebAppsApproveOrRejectPrivateEndpointConnectionPollerResponse, error)` to `(WebAppsClientApproveOrRejectPrivateEndpointConnectionPollerResponse, error)` -- Function `*WebAppsClient.ListInstanceIdentifiers` parameter(s) have been changed from `(string, string, *WebAppsListInstanceIdentifiersOptions)` to `(string, string, *WebAppsClientListInstanceIdentifiersOptions)` -- Function `*WebAppsClient.ListInstanceIdentifiers` return value(s) have been changed from `(*WebAppsListInstanceIdentifiersPager)` to `(*WebAppsClientListInstanceIdentifiersPager)` -- Function `*RecommendationsClient.ResetAllFiltersForHostingEnvironment` parameter(s) have been changed from `(context.Context, string, string, string, *RecommendationsResetAllFiltersForHostingEnvironmentOptions)` to `(context.Context, string, string, string, *RecommendationsClientResetAllFiltersForHostingEnvironmentOptions)` -- Function `*RecommendationsClient.ResetAllFiltersForHostingEnvironment` return value(s) have been changed from `(RecommendationsResetAllFiltersForHostingEnvironmentResponse, error)` to `(RecommendationsClientResetAllFiltersForHostingEnvironmentResponse, error)` -- Function `*CertificateOrdersDiagnosticsClient.ListAppServiceCertificateOrderDetectorResponse` parameter(s) have been changed from `(string, string, *CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseOptions)` to `(string, string, *CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions)` -- Function `*CertificateOrdersDiagnosticsClient.ListAppServiceCertificateOrderDetectorResponse` return value(s) have been changed from `(*CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponsePager)` to `(*CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponsePager)` -- Function `*WebAppsClient.BeginStartWebSiteNetworkTraceOperation` parameter(s) have been changed from `(context.Context, string, string, *WebAppsBeginStartWebSiteNetworkTraceOperationOptions)` to `(context.Context, string, string, *WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions)` -- Function `*WebAppsClient.BeginStartWebSiteNetworkTraceOperation` return value(s) have been changed from `(WebAppsStartWebSiteNetworkTraceOperationPollerResponse, error)` to `(WebAppsClientStartWebSiteNetworkTraceOperationPollerResponse, error)` -- Function `*WebAppsClient.BeginSwapSlot` parameter(s) have been changed from `(context.Context, string, string, string, CsmSlotEntity, *WebAppsBeginSwapSlotOptions)` to `(context.Context, string, string, string, CsmSlotEntity, *WebAppsClientBeginSwapSlotOptions)` -- Function `*WebAppsClient.BeginSwapSlot` return value(s) have been changed from `(WebAppsSwapSlotPollerResponse, error)` to `(WebAppsClientSwapSlotPollerResponse, error)` -- Function `*WebAppsClient.DeleteSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteSlotOptions)` -- Function `*WebAppsClient.DeleteSlot` return value(s) have been changed from `(WebAppsDeleteSlotResponse, error)` to `(WebAppsClientDeleteSlotResponse, error)` -- Function `*WebAppsClient.UpdateAuthSettingsSlot` parameter(s) have been changed from `(context.Context, string, string, string, SiteAuthSettings, *WebAppsUpdateAuthSettingsSlotOptions)` to `(context.Context, string, string, string, SiteAuthSettings, *WebAppsClientUpdateAuthSettingsSlotOptions)` -- Function `*WebAppsClient.UpdateAuthSettingsSlot` return value(s) have been changed from `(WebAppsUpdateAuthSettingsSlotResponse, error)` to `(WebAppsClientUpdateAuthSettingsSlotResponse, error)` -- Function `*WebAppsClient.ListDomainOwnershipIdentifiers` parameter(s) have been changed from `(string, string, *WebAppsListDomainOwnershipIdentifiersOptions)` to `(string, string, *WebAppsClientListDomainOwnershipIdentifiersOptions)` -- Function `*WebAppsClient.ListDomainOwnershipIdentifiers` return value(s) have been changed from `(*WebAppsListDomainOwnershipIdentifiersPager)` to `(*WebAppsClientListDomainOwnershipIdentifiersPager)` -- Function `*WebAppsClient.ListSiteExtensionsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListSiteExtensionsSlotOptions)` to `(string, string, string, *WebAppsClientListSiteExtensionsSlotOptions)` -- Function `*WebAppsClient.ListSiteExtensionsSlot` return value(s) have been changed from `(*WebAppsListSiteExtensionsSlotPager)` to `(*WebAppsClientListSiteExtensionsSlotPager)` -- Function `*ResourceHealthMetadataClient.ListBySite` parameter(s) have been changed from `(string, string, *ResourceHealthMetadataListBySiteOptions)` to `(string, string, *ResourceHealthMetadataClientListBySiteOptions)` -- Function `*ResourceHealthMetadataClient.ListBySite` return value(s) have been changed from `(*ResourceHealthMetadataListBySitePager)` to `(*ResourceHealthMetadataClientListBySitePager)` -- Function `*WebAppsClient.ListApplicationSettingsSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListApplicationSettingsSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientListApplicationSettingsSlotOptions)` -- Function `*WebAppsClient.ListApplicationSettingsSlot` return value(s) have been changed from `(WebAppsListApplicationSettingsSlotResponse, error)` to `(WebAppsClientListApplicationSettingsSlotResponse, error)` -- Function `*WebAppsClient.SyncFunctionTriggersSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsSyncFunctionTriggersSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientSyncFunctionTriggersSlotOptions)` -- Function `*WebAppsClient.SyncFunctionTriggersSlot` return value(s) have been changed from `(WebAppsSyncFunctionTriggersSlotResponse, error)` to `(WebAppsClientSyncFunctionTriggersSlotResponse, error)` -- Function `*WebAppsClient.ListBasicPublishingCredentialsPolicies` parameter(s) have been changed from `(string, string, *WebAppsListBasicPublishingCredentialsPoliciesOptions)` to `(string, string, *WebAppsClientListBasicPublishingCredentialsPoliciesOptions)` -- Function `*WebAppsClient.ListBasicPublishingCredentialsPolicies` return value(s) have been changed from `(*WebAppsListBasicPublishingCredentialsPoliciesPager)` to `(*WebAppsClientListBasicPublishingCredentialsPoliciesPager)` -- Function `*StaticSitesClient.ListStaticSiteConfiguredRoles` parameter(s) have been changed from `(context.Context, string, string, *StaticSitesListStaticSiteConfiguredRolesOptions)` to `(context.Context, string, string, *StaticSitesClientListStaticSiteConfiguredRolesOptions)` -- Function `*StaticSitesClient.ListStaticSiteConfiguredRoles` return value(s) have been changed from `(StaticSitesListStaticSiteConfiguredRolesResponse, error)` to `(StaticSitesClientListStaticSiteConfiguredRolesResponse, error)` -- Function `*RecommendationsClient.GetRuleDetailsByHostingEnvironment` parameter(s) have been changed from `(context.Context, string, string, string, *RecommendationsGetRuleDetailsByHostingEnvironmentOptions)` to `(context.Context, string, string, string, *RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions)` -- Function `*RecommendationsClient.GetRuleDetailsByHostingEnvironment` return value(s) have been changed from `(RecommendationsGetRuleDetailsByHostingEnvironmentResponse, error)` to `(RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse, error)` -- Function `*WebAppsClient.GetInstanceInfoSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetInstanceInfoSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetInstanceInfoSlotOptions)` -- Function `*WebAppsClient.GetInstanceInfoSlot` return value(s) have been changed from `(WebAppsGetInstanceInfoSlotResponse, error)` to `(WebAppsClientGetInstanceInfoSlotResponse, error)` -- Function `*StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild` parameter(s) have been changed from `(string, string, string, *StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildOptions)` to `(string, string, string, *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions)` -- Function `*StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild` return value(s) have been changed from `(*StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildPager)` to `(*StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildPager)` -- Function `*WebAppsClient.GetDomainOwnershipIdentifierSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetDomainOwnershipIdentifierSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetDomainOwnershipIdentifierSlotOptions)` -- Function `*WebAppsClient.GetDomainOwnershipIdentifierSlot` return value(s) have been changed from `(WebAppsGetDomainOwnershipIdentifierSlotResponse, error)` to `(WebAppsClientGetDomainOwnershipIdentifierSlotResponse, error)` -- Function `*WebAppsClient.ListProcessThreadsSlot` parameter(s) have been changed from `(string, string, string, string, *WebAppsListProcessThreadsSlotOptions)` to `(string, string, string, string, *WebAppsClientListProcessThreadsSlotOptions)` -- Function `*WebAppsClient.ListProcessThreadsSlot` return value(s) have been changed from `(*WebAppsListProcessThreadsSlotPager)` to `(*WebAppsClientListProcessThreadsSlotPager)` -- Function `*WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck` parameter(s) have been changed from `(context.Context, string, string, SwiftVirtualNetwork, *WebAppsUpdateSwiftVirtualNetworkConnectionWithCheckOptions)` to `(context.Context, string, string, SwiftVirtualNetwork, *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions)` -- Function `*WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck` return value(s) have been changed from `(WebAppsUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error)` to `(WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error)` -- Function `*WebAppsClient.GetRelayServiceConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetRelayServiceConnectionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetRelayServiceConnectionSlotOptions)` -- Function `*WebAppsClient.GetRelayServiceConnectionSlot` return value(s) have been changed from `(WebAppsGetRelayServiceConnectionSlotResponse, error)` to `(WebAppsClientGetRelayServiceConnectionSlotResponse, error)` -- Function `*WebAppsClient.ListNetworkFeaturesSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsListNetworkFeaturesSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientListNetworkFeaturesSlotOptions)` -- Function `*WebAppsClient.ListNetworkFeaturesSlot` return value(s) have been changed from `(WebAppsListNetworkFeaturesSlotResponse, error)` to `(WebAppsClientListNetworkFeaturesSlotResponse, error)` -- Function `*WebAppsClient.UpdateMetadataSlot` parameter(s) have been changed from `(context.Context, string, string, string, StringDictionary, *WebAppsUpdateMetadataSlotOptions)` to `(context.Context, string, string, string, StringDictionary, *WebAppsClientUpdateMetadataSlotOptions)` -- Function `*WebAppsClient.UpdateMetadataSlot` return value(s) have been changed from `(WebAppsUpdateMetadataSlotResponse, error)` to `(WebAppsClientUpdateMetadataSlotResponse, error)` -- Function `*WebAppsClient.BeginInstallSiteExtensionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsBeginInstallSiteExtensionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientBeginInstallSiteExtensionSlotOptions)` -- Function `*WebAppsClient.BeginInstallSiteExtensionSlot` return value(s) have been changed from `(WebAppsInstallSiteExtensionSlotPollerResponse, error)` to `(WebAppsClientInstallSiteExtensionSlotPollerResponse, error)` -- Function `*RecommendationsClient.ListHistoryForHostingEnvironment` parameter(s) have been changed from `(string, string, *RecommendationsListHistoryForHostingEnvironmentOptions)` to `(string, string, *RecommendationsClientListHistoryForHostingEnvironmentOptions)` -- Function `*RecommendationsClient.ListHistoryForHostingEnvironment` return value(s) have been changed from `(*RecommendationsListHistoryForHostingEnvironmentPager)` to `(*RecommendationsClientListHistoryForHostingEnvironmentPager)` -- Function `*StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings` parameter(s) have been changed from `(context.Context, string, string, string, StringDictionary, *StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions)` to `(context.Context, string, string, string, StringDictionary, *StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions)` -- Function `*StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings` return value(s) have been changed from `(StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse, error)` to `(StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse, error)` -- Function `*WebAppsClient.GetTriggeredWebJob` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetTriggeredWebJobOptions)` to `(context.Context, string, string, string, *WebAppsClientGetTriggeredWebJobOptions)` -- Function `*WebAppsClient.GetTriggeredWebJob` return value(s) have been changed from `(WebAppsGetTriggeredWebJobResponse, error)` to `(WebAppsClientGetTriggeredWebJobResponse, error)` -- Function `*WebAppsClient.ApplySlotConfigurationSlot` parameter(s) have been changed from `(context.Context, string, string, string, CsmSlotEntity, *WebAppsApplySlotConfigurationSlotOptions)` to `(context.Context, string, string, string, CsmSlotEntity, *WebAppsClientApplySlotConfigurationSlotOptions)` -- Function `*WebAppsClient.ApplySlotConfigurationSlot` return value(s) have been changed from `(WebAppsApplySlotConfigurationSlotResponse, error)` to `(WebAppsClientApplySlotConfigurationSlotResponse, error)` -- Function `*WebAppsClient.GetNetworkTraceOperationSlotV2` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetNetworkTraceOperationSlotV2Options)` to `(context.Context, string, string, string, string, *WebAppsClientGetNetworkTraceOperationSlotV2Options)` -- Function `*WebAppsClient.GetNetworkTraceOperationSlotV2` return value(s) have been changed from `(WebAppsGetNetworkTraceOperationSlotV2Response, error)` to `(WebAppsClientGetNetworkTraceOperationSlotV2Response, error)` -- Function `*WebAppsClient.DeleteProcessSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteProcessSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteProcessSlotOptions)` -- Function `*WebAppsClient.DeleteProcessSlot` return value(s) have been changed from `(WebAppsDeleteProcessSlotResponse, error)` to `(WebAppsClientDeleteProcessSlotResponse, error)` -- Function `*WebAppsClient.UpdateDomainOwnershipIdentifier` parameter(s) have been changed from `(context.Context, string, string, string, Identifier, *WebAppsUpdateDomainOwnershipIdentifierOptions)` to `(context.Context, string, string, string, Identifier, *WebAppsClientUpdateDomainOwnershipIdentifierOptions)` -- Function `*WebAppsClient.UpdateDomainOwnershipIdentifier` return value(s) have been changed from `(WebAppsUpdateDomainOwnershipIdentifierResponse, error)` to `(WebAppsClientUpdateDomainOwnershipIdentifierResponse, error)` -- Function `*WebAppsClient.BackupSlot` parameter(s) have been changed from `(context.Context, string, string, string, BackupRequest, *WebAppsBackupSlotOptions)` to `(context.Context, string, string, string, BackupRequest, *WebAppsClientBackupSlotOptions)` -- Function `*WebAppsClient.BackupSlot` return value(s) have been changed from `(WebAppsBackupSlotResponse, error)` to `(WebAppsClientBackupSlotResponse, error)` -- Function `*StaticSitesClient.CreateOrUpdateStaticSiteAppSettings` parameter(s) have been changed from `(context.Context, string, string, StringDictionary, *StaticSitesCreateOrUpdateStaticSiteAppSettingsOptions)` to `(context.Context, string, string, StringDictionary, *StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions)` -- Function `*StaticSitesClient.CreateOrUpdateStaticSiteAppSettings` return value(s) have been changed from `(StaticSitesCreateOrUpdateStaticSiteAppSettingsResponse, error)` to `(StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse, error)` -- Function `*WebAppsClient.GetBackupConfiguration` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetBackupConfigurationOptions)` to `(context.Context, string, string, *WebAppsClientGetBackupConfigurationOptions)` -- Function `*WebAppsClient.GetBackupConfiguration` return value(s) have been changed from `(WebAppsGetBackupConfigurationResponse, error)` to `(WebAppsClientGetBackupConfigurationResponse, error)` -- Function `*WebAppsClient.ListTriggeredWebJobsSlot` parameter(s) have been changed from `(string, string, string, *WebAppsListTriggeredWebJobsSlotOptions)` to `(string, string, string, *WebAppsClientListTriggeredWebJobsSlotOptions)` -- Function `*WebAppsClient.ListTriggeredWebJobsSlot` return value(s) have been changed from `(*WebAppsListTriggeredWebJobsSlotPager)` to `(*WebAppsClientListTriggeredWebJobsSlotPager)` -- Function `*CertificatesClient.Update` parameter(s) have been changed from `(context.Context, string, string, CertificatePatchResource, *CertificatesUpdateOptions)` to `(context.Context, string, string, AppCertificatePatchResource, *CertificatesClientUpdateOptions)` -- Function `*CertificatesClient.Update` return value(s) have been changed from `(CertificatesUpdateResponse, error)` to `(CertificatesClientUpdateResponse, error)` -- Function `*StaticSitesClient.ListStaticSiteCustomDomains` parameter(s) have been changed from `(string, string, *StaticSitesListStaticSiteCustomDomainsOptions)` to `(string, string, *StaticSitesClientListStaticSiteCustomDomainsOptions)` -- Function `*StaticSitesClient.ListStaticSiteCustomDomains` return value(s) have been changed from `(*StaticSitesListStaticSiteCustomDomainsPager)` to `(*StaticSitesClientListStaticSiteCustomDomainsPager)` -- Function `*WebAppsClient.BeginCreateMSDeployOperationSlot` parameter(s) have been changed from `(context.Context, string, string, string, MSDeploy, *WebAppsBeginCreateMSDeployOperationSlotOptions)` to `(context.Context, string, string, string, MSDeploy, *WebAppsClientBeginCreateMSDeployOperationSlotOptions)` -- Function `*WebAppsClient.BeginCreateMSDeployOperationSlot` return value(s) have been changed from `(WebAppsCreateMSDeployOperationSlotPollerResponse, error)` to `(WebAppsClientCreateMSDeployOperationSlotPollerResponse, error)` -- Function `*ResourceHealthMetadataClient.GetBySiteSlot` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceHealthMetadataGetBySiteSlotOptions)` to `(context.Context, string, string, string, *ResourceHealthMetadataClientGetBySiteSlotOptions)` -- Function `*ResourceHealthMetadataClient.GetBySiteSlot` return value(s) have been changed from `(ResourceHealthMetadataGetBySiteSlotResponse, error)` to `(ResourceHealthMetadataClientGetBySiteSlotResponse, error)` -- Function `*DiagnosticsClient.ListSiteDiagnosticCategoriesSlot` parameter(s) have been changed from `(string, string, string, *DiagnosticsListSiteDiagnosticCategoriesSlotOptions)` to `(string, string, string, *DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions)` -- Function `*DiagnosticsClient.ListSiteDiagnosticCategoriesSlot` return value(s) have been changed from `(*DiagnosticsListSiteDiagnosticCategoriesSlotPager)` to `(*DiagnosticsClientListSiteDiagnosticCategoriesSlotPager)` -- Function `*StaticSitesClient.GetStaticSiteBuild` parameter(s) have been changed from `(context.Context, string, string, string, *StaticSitesGetStaticSiteBuildOptions)` to `(context.Context, string, string, string, *StaticSitesClientGetStaticSiteBuildOptions)` -- Function `*StaticSitesClient.GetStaticSiteBuild` return value(s) have been changed from `(StaticSitesGetStaticSiteBuildResponse, error)` to `(StaticSitesClientGetStaticSiteBuildResponse, error)` -- Function `*ProviderClient.GetAvailableStacksOnPrem` parameter(s) have been changed from `(*ProviderGetAvailableStacksOnPremOptions)` to `(*ProviderClientGetAvailableStacksOnPremOptions)` -- Function `*ProviderClient.GetAvailableStacksOnPrem` return value(s) have been changed from `(*ProviderGetAvailableStacksOnPremPager)` to `(*ProviderClientGetAvailableStacksOnPremPager)` -- Function `*WebAppsClient.UpdateBackupConfiguration` parameter(s) have been changed from `(context.Context, string, string, BackupRequest, *WebAppsUpdateBackupConfigurationOptions)` to `(context.Context, string, string, BackupRequest, *WebAppsClientUpdateBackupConfigurationOptions)` -- Function `*WebAppsClient.UpdateBackupConfiguration` return value(s) have been changed from `(WebAppsUpdateBackupConfigurationResponse, error)` to `(WebAppsClientUpdateBackupConfigurationResponse, error)` -- Function `*WebAppsClient.GetNetworkTracesV2` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetNetworkTracesV2Options)` to `(context.Context, string, string, string, *WebAppsClientGetNetworkTracesV2Options)` -- Function `*WebAppsClient.GetNetworkTracesV2` return value(s) have been changed from `(WebAppsGetNetworkTracesV2Response, error)` to `(WebAppsClientGetNetworkTracesV2Response, error)` -- Function `*WebAppsClient.UpdateConnectionStringsSlot` parameter(s) have been changed from `(context.Context, string, string, string, ConnectionStringDictionary, *WebAppsUpdateConnectionStringsSlotOptions)` to `(context.Context, string, string, string, ConnectionStringDictionary, *WebAppsClientUpdateConnectionStringsSlotOptions)` -- Function `*WebAppsClient.UpdateConnectionStringsSlot` return value(s) have been changed from `(WebAppsUpdateConnectionStringsSlotResponse, error)` to `(WebAppsClientUpdateConnectionStringsSlotResponse, error)` -- Function `*WebAppsClient.DeleteContinuousWebJobSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteContinuousWebJobSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteContinuousWebJobSlotOptions)` -- Function `*WebAppsClient.DeleteContinuousWebJobSlot` return value(s) have been changed from `(WebAppsDeleteContinuousWebJobSlotResponse, error)` to `(WebAppsClientDeleteContinuousWebJobSlotResponse, error)` -- Function `*WebAppsClient.DeleteRelayServiceConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteRelayServiceConnectionSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteRelayServiceConnectionSlotOptions)` -- Function `*WebAppsClient.DeleteRelayServiceConnectionSlot` return value(s) have been changed from `(WebAppsDeleteRelayServiceConnectionSlotResponse, error)` to `(WebAppsClientDeleteRelayServiceConnectionSlotResponse, error)` -- Function `*WebAppsClient.ListNetworkFeatures` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsListNetworkFeaturesOptions)` to `(context.Context, string, string, string, *WebAppsClientListNetworkFeaturesOptions)` -- Function `*WebAppsClient.ListNetworkFeatures` return value(s) have been changed from `(WebAppsListNetworkFeaturesResponse, error)` to `(WebAppsClientListNetworkFeaturesResponse, error)` -- Function `*StaticSitesClient.List` parameter(s) have been changed from `(*StaticSitesListOptions)` to `(*StaticSitesClientListOptions)` -- Function `*StaticSitesClient.List` return value(s) have been changed from `(*StaticSitesListPager)` to `(*StaticSitesClientListPager)` -- Function `*WebAppsClient.GetAuthSettingsV2` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetAuthSettingsV2Options)` to `(context.Context, string, string, *WebAppsClientGetAuthSettingsV2Options)` -- Function `*WebAppsClient.GetAuthSettingsV2` return value(s) have been changed from `(WebAppsGetAuthSettingsV2Response, error)` to `(WebAppsClientGetAuthSettingsV2Response, error)` -- Function `*WebAppsClient.AnalyzeCustomHostname` parameter(s) have been changed from `(context.Context, string, string, *WebAppsAnalyzeCustomHostnameOptions)` to `(context.Context, string, string, *WebAppsClientAnalyzeCustomHostnameOptions)` -- Function `*WebAppsClient.AnalyzeCustomHostname` return value(s) have been changed from `(WebAppsAnalyzeCustomHostnameResponse, error)` to `(WebAppsClientAnalyzeCustomHostnameResponse, error)` -- Function `*WebAppsClient.GetPrivateLinkResourcesSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetPrivateLinkResourcesSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetPrivateLinkResourcesSlotOptions)` -- Function `*WebAppsClient.GetPrivateLinkResourcesSlot` return value(s) have been changed from `(WebAppsGetPrivateLinkResourcesSlotResponse, error)` to `(WebAppsClientGetPrivateLinkResourcesSlotResponse, error)` -- Function `*WebAppsClient.DeleteBackupConfiguration` parameter(s) have been changed from `(context.Context, string, string, *WebAppsDeleteBackupConfigurationOptions)` to `(context.Context, string, string, *WebAppsClientDeleteBackupConfigurationOptions)` -- Function `*WebAppsClient.DeleteBackupConfiguration` return value(s) have been changed from `(WebAppsDeleteBackupConfigurationResponse, error)` to `(WebAppsClientDeleteBackupConfigurationResponse, error)` -- Function `*WebAppsClient.ListSyncStatus` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListSyncStatusOptions)` to `(context.Context, string, string, *WebAppsClientListSyncStatusOptions)` -- Function `*WebAppsClient.ListSyncStatus` return value(s) have been changed from `(WebAppsListSyncStatusResponse, error)` to `(WebAppsClientListSyncStatusResponse, error)` -- Function `*ResourceHealthMetadataClient.ListBySiteSlot` parameter(s) have been changed from `(string, string, string, *ResourceHealthMetadataListBySiteSlotOptions)` to `(string, string, string, *ResourceHealthMetadataClientListBySiteSlotOptions)` -- Function `*ResourceHealthMetadataClient.ListBySiteSlot` return value(s) have been changed from `(*ResourceHealthMetadataListBySiteSlotPager)` to `(*ResourceHealthMetadataClientListBySiteSlotPager)` -- Function `*WebAppsClient.IsCloneableSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsIsCloneableSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientIsCloneableSlotOptions)` -- Function `*WebAppsClient.IsCloneableSlot` return value(s) have been changed from `(WebAppsIsCloneableSlotResponse, error)` to `(WebAppsClientIsCloneableSlotResponse, error)` -- Function `*WebAppsClient.ListPremierAddOns` parameter(s) have been changed from `(context.Context, string, string, *WebAppsListPremierAddOnsOptions)` to `(context.Context, string, string, *WebAppsClientListPremierAddOnsOptions)` -- Function `*WebAppsClient.ListPremierAddOns` return value(s) have been changed from `(WebAppsListPremierAddOnsResponse, error)` to `(WebAppsClientListPremierAddOnsResponse, error)` -- Function `*WebAppsClient.UpdateRelayServiceConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, RelayServiceConnectionEntity, *WebAppsUpdateRelayServiceConnectionSlotOptions)` to `(context.Context, string, string, string, string, RelayServiceConnectionEntity, *WebAppsClientUpdateRelayServiceConnectionSlotOptions)` -- Function `*WebAppsClient.UpdateRelayServiceConnectionSlot` return value(s) have been changed from `(WebAppsUpdateRelayServiceConnectionSlotResponse, error)` to `(WebAppsClientUpdateRelayServiceConnectionSlotResponse, error)` -- Function `*WebAppsClient.ListSnapshots` parameter(s) have been changed from `(string, string, *WebAppsListSnapshotsOptions)` to `(string, string, *WebAppsClientListSnapshotsOptions)` -- Function `*WebAppsClient.ListSnapshots` return value(s) have been changed from `(*WebAppsListSnapshotsPager)` to `(*WebAppsClientListSnapshotsPager)` -- Function `*WebAppsClient.GetAuthSettings` parameter(s) have been changed from `(context.Context, string, string, *WebAppsGetAuthSettingsOptions)` to `(context.Context, string, string, *WebAppsClientGetAuthSettingsOptions)` -- Function `*WebAppsClient.GetAuthSettings` return value(s) have been changed from `(WebAppsGetAuthSettingsResponse, error)` to `(WebAppsClientGetAuthSettingsResponse, error)` -- Function `*WebAppsClient.DeleteDomainOwnershipIdentifierSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteDomainOwnershipIdentifierSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions)` -- Function `*WebAppsClient.DeleteDomainOwnershipIdentifierSlot` return value(s) have been changed from `(WebAppsDeleteDomainOwnershipIdentifierSlotResponse, error)` to `(WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse, error)` -- Function `*WebAppsClient.GetBackupStatusSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetBackupStatusSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetBackupStatusSlotOptions)` -- Function `*WebAppsClient.GetBackupStatusSlot` return value(s) have been changed from `(WebAppsGetBackupStatusSlotResponse, error)` to `(WebAppsClientGetBackupStatusSlotResponse, error)` -- Function `*WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, RelayServiceConnectionEntity, *WebAppsCreateOrUpdateRelayServiceConnectionSlotOptions)` to `(context.Context, string, string, string, string, RelayServiceConnectionEntity, *WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions)` -- Function `*WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot` return value(s) have been changed from `(WebAppsCreateOrUpdateRelayServiceConnectionSlotResponse, error)` to `(WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse, error)` -- Function `*WebAppsClient.GetInstanceMSDeployLogSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetInstanceMSDeployLogSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetInstanceMSDeployLogSlotOptions)` -- Function `*WebAppsClient.GetInstanceMSDeployLogSlot` return value(s) have been changed from `(WebAppsGetInstanceMSDeployLogSlotResponse, error)` to `(WebAppsClientGetInstanceMSDeployLogSlotResponse, error)` -- Function `*StaticSitesClient.BeginDeleteStaticSite` parameter(s) have been changed from `(context.Context, string, string, *StaticSitesBeginDeleteStaticSiteOptions)` to `(context.Context, string, string, *StaticSitesClientBeginDeleteStaticSiteOptions)` -- Function `*StaticSitesClient.BeginDeleteStaticSite` return value(s) have been changed from `(StaticSitesDeleteStaticSitePollerResponse, error)` to `(StaticSitesClientDeleteStaticSitePollerResponse, error)` -- Function `*WebAppsClient.ListFunctions` parameter(s) have been changed from `(string, string, *WebAppsListFunctionsOptions)` to `(string, string, *WebAppsClientListFunctionsOptions)` -- Function `*WebAppsClient.ListFunctions` return value(s) have been changed from `(*WebAppsListFunctionsPager)` to `(*WebAppsClientListFunctionsPager)` -- Function `*WebAppsClient.DeleteVnetConnection` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteVnetConnectionOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteVnetConnectionOptions)` -- Function `*WebAppsClient.DeleteVnetConnection` return value(s) have been changed from `(WebAppsDeleteVnetConnectionResponse, error)` to `(WebAppsClientDeleteVnetConnectionResponse, error)` -- Function `*DeletedWebAppsClient.ListByLocation` parameter(s) have been changed from `(string, *DeletedWebAppsListByLocationOptions)` to `(string, *DeletedWebAppsClientListByLocationOptions)` -- Function `*DeletedWebAppsClient.ListByLocation` return value(s) have been changed from `(*DeletedWebAppsListByLocationPager)` to `(*DeletedWebAppsClientListByLocationPager)` -- Function `*KubeEnvironmentsClient.ListBySubscription` parameter(s) have been changed from `(*KubeEnvironmentsListBySubscriptionOptions)` to `(*KubeEnvironmentsClientListBySubscriptionOptions)` -- Function `*KubeEnvironmentsClient.ListBySubscription` return value(s) have been changed from `(*KubeEnvironmentsListBySubscriptionPager)` to `(*KubeEnvironmentsClientListBySubscriptionPager)` -- Function `*RecommendationsClient.DisableRecommendationForSubscription` parameter(s) have been changed from `(context.Context, string, *RecommendationsDisableRecommendationForSubscriptionOptions)` to `(context.Context, string, *RecommendationsClientDisableRecommendationForSubscriptionOptions)` -- Function `*RecommendationsClient.DisableRecommendationForSubscription` return value(s) have been changed from `(RecommendationsDisableRecommendationForSubscriptionResponse, error)` to `(RecommendationsClientDisableRecommendationForSubscriptionResponse, error)` -- Function `*WebAppsClient.GetProcessDumpSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetProcessDumpSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetProcessDumpSlotOptions)` -- Function `*WebAppsClient.GetProcessDumpSlot` return value(s) have been changed from `(WebAppsGetProcessDumpSlotResponse, error)` to `(WebAppsClientGetProcessDumpSlotResponse, error)` -- Function `*WebAppsClient.ListDeploymentLogSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsListDeploymentLogSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientListDeploymentLogSlotOptions)` -- Function `*WebAppsClient.ListDeploymentLogSlot` return value(s) have been changed from `(WebAppsListDeploymentLogSlotResponse, error)` to `(WebAppsClientListDeploymentLogSlotResponse, error)` -- Function `*RecommendationsClient.DisableAllForHostingEnvironment` parameter(s) have been changed from `(context.Context, string, string, string, *RecommendationsDisableAllForHostingEnvironmentOptions)` to `(context.Context, string, string, string, *RecommendationsClientDisableAllForHostingEnvironmentOptions)` -- Function `*RecommendationsClient.DisableAllForHostingEnvironment` return value(s) have been changed from `(RecommendationsDisableAllForHostingEnvironmentResponse, error)` to `(RecommendationsClientDisableAllForHostingEnvironmentResponse, error)` -- Function `*WebAppsClient.GetBackupConfigurationSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetBackupConfigurationSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetBackupConfigurationSlotOptions)` -- Function `*WebAppsClient.GetBackupConfigurationSlot` return value(s) have been changed from `(WebAppsGetBackupConfigurationSlotResponse, error)` to `(WebAppsClientGetBackupConfigurationSlotResponse, error)` -- Function `*WebAppsClient.GetInstanceProcess` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetInstanceProcessOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetInstanceProcessOptions)` -- Function `*WebAppsClient.GetInstanceProcess` return value(s) have been changed from `(WebAppsGetInstanceProcessResponse, error)` to `(WebAppsClientGetInstanceProcessResponse, error)` -- Function `*DomainsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, Domain, *DomainsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, Domain, *DomainsClientBeginCreateOrUpdateOptions)` -- Function `*DomainsClient.BeginCreateOrUpdate` return value(s) have been changed from `(DomainsCreateOrUpdatePollerResponse, error)` to `(DomainsClientCreateOrUpdatePollerResponse, error)` -- Function `*WebAppsClient.GetNetworkTracesSlotV2` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetNetworkTracesSlotV2Options)` to `(context.Context, string, string, string, string, *WebAppsClientGetNetworkTracesSlotV2Options)` -- Function `*WebAppsClient.GetNetworkTracesSlotV2` return value(s) have been changed from `(WebAppsGetNetworkTracesSlotV2Response, error)` to `(WebAppsClientGetNetworkTracesSlotV2Response, error)` -- Function `*WebAppsClient.GetContainerLogsZipSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetContainerLogsZipSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientGetContainerLogsZipSlotOptions)` -- Function `*WebAppsClient.GetContainerLogsZipSlot` return value(s) have been changed from `(WebAppsGetContainerLogsZipSlotResponse, error)` to `(WebAppsClientGetContainerLogsZipSlotResponse, error)` -- Function `*WebAppsClient.GetRelayServiceConnection` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsGetRelayServiceConnectionOptions)` to `(context.Context, string, string, string, *WebAppsClientGetRelayServiceConnectionOptions)` -- Function `*WebAppsClient.GetRelayServiceConnection` return value(s) have been changed from `(WebAppsGetRelayServiceConnectionResponse, error)` to `(WebAppsClientGetRelayServiceConnectionResponse, error)` -- Function `*WebAppsClient.StopContinuousWebJobSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsStopContinuousWebJobSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientStopContinuousWebJobSlotOptions)` -- Function `*WebAppsClient.StopContinuousWebJobSlot` return value(s) have been changed from `(WebAppsStopContinuousWebJobSlotResponse, error)` to `(WebAppsClientStopContinuousWebJobSlotResponse, error)` -- Function `*WebAppsClient.DeleteFunctionSecret` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsDeleteFunctionSecretOptions)` to `(context.Context, string, string, string, string, *WebAppsClientDeleteFunctionSecretOptions)` -- Function `*WebAppsClient.DeleteFunctionSecret` return value(s) have been changed from `(WebAppsDeleteFunctionSecretResponse, error)` to `(WebAppsClientDeleteFunctionSecretResponse, error)` -- Function `*DiagnosticsClient.GetSiteAnalysis` parameter(s) have been changed from `(context.Context, string, string, string, string, *DiagnosticsGetSiteAnalysisOptions)` to `(context.Context, string, string, string, string, *DiagnosticsClientGetSiteAnalysisOptions)` -- Function `*DiagnosticsClient.GetSiteAnalysis` return value(s) have been changed from `(DiagnosticsGetSiteAnalysisResponse, error)` to `(DiagnosticsClientGetSiteAnalysisResponse, error)` -- Function `*WebAppsClient.GetNetworkTracesSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetNetworkTracesSlotOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetNetworkTracesSlotOptions)` -- Function `*WebAppsClient.GetNetworkTracesSlot` return value(s) have been changed from `(WebAppsGetNetworkTracesSlotResponse, error)` to `(WebAppsClientGetNetworkTracesSlotResponse, error)` -- Function `*DiagnosticsClient.ExecuteSiteDetector` parameter(s) have been changed from `(context.Context, string, string, string, string, *DiagnosticsExecuteSiteDetectorOptions)` to `(context.Context, string, string, string, string, *DiagnosticsClientExecuteSiteDetectorOptions)` -- Function `*DiagnosticsClient.ExecuteSiteDetector` return value(s) have been changed from `(DiagnosticsExecuteSiteDetectorResponse, error)` to `(DiagnosticsClientExecuteSiteDetectorResponse, error)` -- Function `*WebAppsClient.ListBackups` parameter(s) have been changed from `(string, string, *WebAppsListBackupsOptions)` to `(string, string, *WebAppsClientListBackupsOptions)` -- Function `*WebAppsClient.ListBackups` return value(s) have been changed from `(*WebAppsListBackupsPager)` to `(*WebAppsClientListBackupsPager)` -- Function `*DiagnosticsClient.ListSiteDetectorsSlot` parameter(s) have been changed from `(string, string, string, string, *DiagnosticsListSiteDetectorsSlotOptions)` to `(string, string, string, string, *DiagnosticsClientListSiteDetectorsSlotOptions)` -- Function `*DiagnosticsClient.ListSiteDetectorsSlot` return value(s) have been changed from `(*DiagnosticsListSiteDetectorsSlotPager)` to `(*DiagnosticsClientListSiteDetectorsSlotPager)` -- Function `*WebAppsClient.UpdateMetadata` parameter(s) have been changed from `(context.Context, string, string, StringDictionary, *WebAppsUpdateMetadataOptions)` to `(context.Context, string, string, StringDictionary, *WebAppsClientUpdateMetadataOptions)` -- Function `*WebAppsClient.UpdateMetadata` return value(s) have been changed from `(WebAppsUpdateMetadataResponse, error)` to `(WebAppsClientUpdateMetadataResponse, error)` -- Function `*WebAppsClient.DeleteSwiftVirtualNetwork` parameter(s) have been changed from `(context.Context, string, string, *WebAppsDeleteSwiftVirtualNetworkOptions)` to `(context.Context, string, string, *WebAppsClientDeleteSwiftVirtualNetworkOptions)` -- Function `*WebAppsClient.DeleteSwiftVirtualNetwork` return value(s) have been changed from `(WebAppsDeleteSwiftVirtualNetworkResponse, error)` to `(WebAppsClientDeleteSwiftVirtualNetworkResponse, error)` -- Function `*WebAppsClient.UpdateVnetConnection` parameter(s) have been changed from `(context.Context, string, string, string, VnetInfoResource, *WebAppsUpdateVnetConnectionOptions)` to `(context.Context, string, string, string, VnetInfoResource, *WebAppsClientUpdateVnetConnectionOptions)` -- Function `*WebAppsClient.UpdateVnetConnection` return value(s) have been changed from `(WebAppsUpdateVnetConnectionResponse, error)` to `(WebAppsClientUpdateVnetConnectionResponse, error)` -- Function `*WebAppsClient.DeleteSourceControlSlot` parameter(s) have been changed from `(context.Context, string, string, string, *WebAppsDeleteSourceControlSlotOptions)` to `(context.Context, string, string, string, *WebAppsClientDeleteSourceControlSlotOptions)` -- Function `*WebAppsClient.DeleteSourceControlSlot` return value(s) have been changed from `(WebAppsDeleteSourceControlSlotResponse, error)` to `(WebAppsClientDeleteSourceControlSlotResponse, error)` -- Function `*WebAppsClient.GetTriggeredWebJobHistory` parameter(s) have been changed from `(context.Context, string, string, string, string, *WebAppsGetTriggeredWebJobHistoryOptions)` to `(context.Context, string, string, string, string, *WebAppsClientGetTriggeredWebJobHistoryOptions)` -- Function `*WebAppsClient.GetTriggeredWebJobHistory` return value(s) have been changed from `(WebAppsGetTriggeredWebJobHistoryResponse, error)` to `(WebAppsClientGetTriggeredWebJobHistoryResponse, error)` -- Function `*RecommendationsClient.GetRuleDetailsByWebApp` parameter(s) have been changed from `(context.Context, string, string, string, *RecommendationsGetRuleDetailsByWebAppOptions)` to `(context.Context, string, string, string, *RecommendationsClientGetRuleDetailsByWebAppOptions)` -- Function `*RecommendationsClient.GetRuleDetailsByWebApp` return value(s) have been changed from `(RecommendationsGetRuleDetailsByWebAppResponse, error)` to `(RecommendationsClientGetRuleDetailsByWebAppResponse, error)` -- Function `*WebAppsClient.UpdatePremierAddOn` parameter(s) have been changed from `(context.Context, string, string, string, PremierAddOnPatchResource, *WebAppsUpdatePremierAddOnOptions)` to `(context.Context, string, string, string, PremierAddOnPatchResource, *WebAppsClientUpdatePremierAddOnOptions)` -- Function `*WebAppsClient.UpdatePremierAddOn` return value(s) have been changed from `(WebAppsUpdatePremierAddOnResponse, error)` to `(WebAppsClientUpdatePremierAddOnResponse, error)` -- Function `*StaticSitesClient.BeginCreateZipDeploymentForStaticSite` parameter(s) have been changed from `(context.Context, string, string, StaticSiteZipDeploymentARMResource, *StaticSitesBeginCreateZipDeploymentForStaticSiteOptions)` to `(context.Context, string, string, StaticSiteZipDeploymentARMResource, *StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions)` -- Function `*StaticSitesClient.BeginCreateZipDeploymentForStaticSite` return value(s) have been changed from `(StaticSitesCreateZipDeploymentForStaticSitePollerResponse, error)` to `(StaticSitesClientCreateZipDeploymentForStaticSitePollerResponse, error)` -- Type of `CertificateCollection.Value` has been changed from `[]*Certificate` to `[]*CertificateResource` -- Type of `TriggeredWebJobProperties.Settings` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `WebJobProperties.Settings` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `StackMajorVersion.SiteConfigPropertiesDictionary` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `StackMajorVersion.AppSettingsDictionary` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `KeyValuePairStringObject.Value` has been changed from `map[string]interface{}` to `interface{}` -- Type of `FunctionEnvelopeProperties.Config` has been changed from `map[string]interface{}` to `interface{}` -- Type of `DeploymentLocations.HostingEnvironments` has been changed from `[]*AppServiceEnvironment` to `[]*Environment` -- Type of `ContinuousWebJobProperties.Settings` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `ValidateProperties.AppServiceEnvironment` has been changed from `*AppServiceEnvironment` to `*Environment` -- Type of `CertificatePatchResource.Properties` has been changed from `*CertificatePatchResourceProperties` to `*Certificate` -- Const `ProviderOsTypeSelectedLinuxFunctions` has been removed -- Const `ProviderOsTypeSelectedWindowsFunctions` has been removed -- Const `ProviderStackOsTypeLinux` has been removed -- Const `ProviderStackOsTypeAll` has been removed -- Const `ProviderOsTypeSelectedLinux` has been removed -- Const `ProviderOsTypeSelectedAll` has been removed -- Const `ProviderStackOsTypeWindows` has been removed -- Const `ProviderOsTypeSelectedWindows` has been removed -- Function `WebSiteInstanceStatus.MarshalJSON` has been removed -- Function `*WebAppsStartNetworkTraceSlotPoller.Poll` has been removed -- Function `WebAppsCreateOrUpdateSourceControlPollerResponse.PollUntilDone` has been removed -- Function `*AppServiceCertificateOrdersClient.VerifyDomainOwnership` has been removed -- Function `WebAppsRestoreSnapshotSlotPollerResponse.PollUntilDone` has been removed -- Function `*DeletedWebAppsListPager.Err` has been removed -- Function `*AppServiceCertificateOrdersClient.ResendEmail` has been removed -- Function `*StaticSitesDeleteStaticSiteCustomDomainPoller.Done` has been removed -- Function `*AppServiceEnvironmentsListWebWorkerMetricDefinitionsPager.Err` has been removed -- Function `*WebAppsGetSiteConnectionStringKeyVaultReferencesPager.PageResponse` has been removed -- Function `WebAppsStartNetworkTracePollerResponse.PollUntilDone` has been removed -- Function `StaticSiteFunctionOverviewARMResource.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsDeletePrivateEndpointConnectionPoller.Poll` has been removed -- Function `*AppServiceEnvironmentsClient.ListWebWorkerUsages` has been removed -- Function `*WebAppsApproveOrRejectPrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*AppServiceCertificateOrdersClient.ResendRequestEmails` has been removed -- Function `*WebAppsListProcessesPager.NextPage` has been removed -- Function `*StaticSitesValidateCustomDomainCanBeAddedToStaticSitePoller.Done` has been removed -- Function `*WebAppsListContinuousWebJobsPager.NextPage` has been removed -- Function `*CertificatePatchResourceProperties.UnmarshalJSON` has been removed -- Function `*WebAppsSwapSlotWithProductionPoller.ResumeToken` has been removed -- Function `*AppServiceCertificateOrdersListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsListInstanceProcessModulesPager.Err` has been removed -- Function `*WebAppsListDomainOwnershipIdentifiersPager.NextPage` has been removed -- Function `*WebAppsListSiteBackupsPager.Err` has been removed -- Function `Certificate.MarshalJSON` has been removed -- Function `*ResourceHealthMetadataListBySitePager.Err` has been removed -- Function `*DiagnosticsListSiteAnalysesPager.Err` has been removed -- Function `*AppServiceCertificateOrdersClient.RetrieveCertificateEmailHistory` has been removed -- Function `AppServiceEnvironmentsCreateOrUpdateMultiRolePoolPollerResponse.PollUntilDone` has been removed -- Function `*AppServiceCertificateOrdersClient.Get` has been removed -- Function `*WebAppsListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsListTriggeredWebJobsPager.NextPage` has been removed -- Function `*AppServiceCertificateOrdersClient.RetrieveCertificateActions` has been removed -- Function `*StaticSitesCreateZipDeploymentForStaticSitePoller.Poll` has been removed -- Function `SlotDifference.MarshalJSON` has been removed -- Function `*DomainsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*AppServicePlansListWebAppsByHybridConnectionPager.NextPage` has been removed -- Function `*WebAppsListConfigurationsSlotPager.PageResponse` has been removed -- Function `*WebAppsListSnapshotsFromDRSecondaryPager.PageResponse` has been removed -- Function `*StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildPager.Err` has been removed -- Function `*AppServiceEnvironmentsClient.ListMultiRolePoolInstanceMetricDefinitions` has been removed -- Function `AnalysisDefinition.MarshalJSON` has been removed -- Function `SiteExtensionInfo.MarshalJSON` has been removed -- Function `AppServicePlanCollection.MarshalJSON` has been removed -- Function `*WebAppsInstallSiteExtensionPoller.Done` has been removed -- Function `KubeEnvironmentsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ProviderGetWebAppStacksForLocationPager.Err` has been removed -- Function `*WebAppsListSnapshotsFromDRSecondarySlotPager.Err` has been removed -- Function `*AppServiceCertificateOrdersClient.ValidatePurchaseInformation` has been removed -- Function `*AppServiceCertificateOrdersCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*WebAppsListSlotDifferencesSlotPager.Err` has been removed -- Function `*StaticSitesListStaticSiteFunctionsPager.NextPage` has been removed -- Function `*WebAppsRestoreFromBackupBlobSlotPoller.Poll` has been removed -- Function `*WebAppsCreateOrUpdateSourceControlSlotPoller.ResumeToken` has been removed -- Function `*ResourceHealthMetadataListBySiteSlotPager.Err` has been removed -- Function `*AppServiceEnvironmentsClient.ListMultiRolePoolSKUs` has been removed -- Function `*StaticSitesDeletePrivateEndpointConnectionPoller.Done` has been removed -- Function `*AppServiceCertificateOrdersListCertificatesPager.NextPage` has been removed -- Function `*AppServicePlansListWebAppsByHybridConnectionPager.Err` has been removed -- Function `*WebAppsListConfigurationsPager.Err` has been removed -- Function `*WebAppsMigrateMySQLPoller.Done` has been removed -- Function `*DomainsCreateOrUpdatePoller.Done` has been removed -- Function `KubeEnvironmentsDeletePollerResponse.PollUntilDone` has been removed -- Function `*AppServiceCertificateOrdersClient.Renew` has been removed -- Function `*WebAppsListHostNameBindingsPager.Err` has been removed -- Function `*WebAppsRestorePoller.Done` has been removed -- Function `*CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponsePager.PageResponse` has been removed -- Function `*WebAppsMigrateStoragePoller.Done` has been removed -- Function `*AppServicePlansCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*DeletedWebAppsListByLocationPager.Err` has been removed -- Function `*WebAppsListSiteExtensionsPager.PageResponse` has been removed -- Function `*WebAppsListDeploymentsPager.NextPage` has been removed -- Function `*AppServicePlansClient.ListHybridConnectionKeys` has been removed -- Function `*WebAppsListConfigurationSnapshotInfoPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsClient.BeginCreateOrUpdateMultiRolePool` has been removed -- Function `*WebAppsRestoreSnapshotSlotPoller.ResumeToken` has been removed -- Function `*AppServicePlansListHybridConnectionsPager.NextPage` has been removed -- Function `*AppServicePlansClient.DeleteHybridConnection` has been removed -- Function `*WebAppsListTriggeredWebJobHistorySlotPager.PageResponse` has been removed -- Function `*AppServicePlansListByResourceGroupPager.PageResponse` has been removed -- Function `*StaticSitesApproveOrRejectPrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*WebAppsListByResourceGroupPager.Err` has been removed -- Function `*AppServiceEnvironmentsSuspendPoller.Done` has been removed -- Function `*WebAppsRestoreFromDeletedAppSlotPoller.Done` has been removed -- Function `StaticSiteCustomDomainRequestPropertiesARMResource.MarshalJSON` has been removed -- Function `*WebAppsCreateOrUpdateSourceControlPoller.Poll` has been removed -- Function `*AppServiceEnvironmentsListMultiRolePoolSKUsPager.Err` has been removed -- Function `*RecommendationsListRecommendedRulesForWebAppPager.Err` has been removed -- Function `*AppServiceCertificateOrdersListByResourceGroupPager.PageResponse` has been removed -- Function `*DomainsListByResourceGroupPager.PageResponse` has been removed -- Function `*AppServiceCertificateOrdersClient.DeleteCertificate` has been removed -- Function `*AppServiceEnvironmentsClient.ListByResourceGroup` has been removed -- Function `*StaticSitesGetStaticSitesByResourceGroupPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsListWebAppsPager.NextPage` has been removed -- Function `WebAppsRestoreFromDeletedAppPollerResponse.PollUntilDone` has been removed -- Function `WebAppsCreateFunctionPollerResponse.PollUntilDone` has been removed -- Function `BackupItem.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsClient.List` has been removed -- Function `*WebAppsListPublishingCredentialsSlotPoller.ResumeToken` has been removed -- Function `*StaticSitesCreateOrUpdateStaticSiteCustomDomainPoller.FinalResponse` has been removed -- Function `*WebAppsCreateMSDeployOperationSlotPoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsListMultiRoleUsagesPager.PageResponse` has been removed -- Function `*WebAppsCreateInstanceMSDeployOperationSlotPoller.FinalResponse` has been removed -- Function `*ResourceHealthMetadataListPager.NextPage` has been removed -- Function `*WebAppsApproveOrRejectPrivateEndpointConnectionSlotPoller.Poll` has been removed -- Function `*AppServiceEnvironmentsListWebWorkerMetricDefinitionsPager.PageResponse` has been removed -- Function `*WebAppsRestoreFromDeletedAppSlotPoller.ResumeToken` has been removed -- Function `AppServiceEnvironmentCollection.MarshalJSON` has been removed -- Function `*StaticSitesListStaticSiteCustomDomainsPager.Err` has been removed -- Function `RenewCertificateOrderRequest.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsClient.GetVipInfo` has been removed -- Function `*WebAppsListSnapshotsPager.NextPage` has been removed -- Function `*WebAppsListInstanceProcessThreadsPager.Err` has been removed -- Function `StaticSiteUserProvidedFunctionApp.MarshalJSON` has been removed -- Function `*AppServicePlansClient.Delete` has been removed -- Function `*WebAppsListInstanceProcessThreadsPager.NextPage` has been removed -- Function `*WebAppsDeletePrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `*WebAppsListProcessThreadsPager.Err` has been removed -- Function `*RecommendationsListHistoryForWebAppPager.Err` has been removed -- Function `*WebAppsListProcessesPager.Err` has been removed -- Function `*AppServicePlansListUsagesPager.PageResponse` has been removed -- Function `*WebAppsListInstanceProcessesPager.NextPage` has been removed -- Function `*WebAppsStartNetworkTraceSlotPoller.FinalResponse` has been removed -- Function `*StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse.Resume` has been removed -- Function `*WebAppsListUsagesPager.PageResponse` has been removed -- Function `*AppServicePlansListWebAppsPager.PageResponse` has been removed -- Function `*AppServiceCertificateOrdersClient.UpdateCertificate` has been removed -- Function `*WebAppsListSiteBackupsPager.NextPage` has been removed -- Function `*WebAppsGetSiteConnectionStringKeyVaultReferencesPager.Err` has been removed -- Function `*WebAppsListInstanceIdentifiersSlotPager.PageResponse` has been removed -- Function `*WebAppsListDomainOwnershipIdentifiersSlotPager.NextPage` has been removed -- Function `AppServiceCertificateOrderCollection.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsDeletePollerResponse.Resume` has been removed -- Function `*WebAppsCreateFunctionPollerResponse.Resume` has been removed -- Function `*StaticSitesGetStaticSiteBuildsPager.Err` has been removed -- Function `*WebAppsRestoreFromDeletedAppPollerResponse.Resume` has been removed -- Function `*WebAppsInstallSiteExtensionSlotPoller.FinalResponse` has been removed -- Function `*WebAppsListPublicCertificatesSlotPager.Err` has been removed -- Function `PushSettings.MarshalJSON` has been removed -- Function `*WebAppsListSiteExtensionsSlotPager.Err` has been removed -- Function `DomainsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*AppServicePlansClient.ListHybridConnections` has been removed -- Function `*WebAppsMigrateStoragePollerResponse.Resume` has been removed -- Function `WebAppsCreateInstanceFunctionSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListProcessThreadsSlotPager.NextPage` has been removed -- Function `*WebAppsMigrateStoragePoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsClient.UpdateMultiRolePool` has been removed -- Function `*StaticSitesCreateZipDeploymentForStaticSitePoller.FinalResponse` has been removed -- Function `WebAppsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsCreateFunctionPoller.Done` has been removed -- Function `*AppServiceEnvironmentsListPager.Err` has been removed -- Function `*AppServiceEnvironmentsDeletePrivateEndpointConnectionPoller.Done` has been removed -- Function `*WebAppsRestoreSlotPollerResponse.Resume` has been removed -- Function `*AppServiceCertificateOrdersCreateOrUpdateCertificatePoller.FinalResponse` has been removed -- Function `*WebAppsRestoreFromBackupBlobPoller.ResumeToken` has been removed -- Function `*WebAppsListProcessesPager.PageResponse` has been removed -- Function `*StaticSitesListStaticSiteBuildFunctionsPager.PageResponse` has been removed -- Function `*DeletedWebAppsListPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsListPager.PageResponse` has been removed -- Function `*StaticSitesRegisterUserProvidedFunctionAppWithStaticSitePoller.FinalResponse` has been removed -- Function `*WebAppsRestoreSnapshotSlotPoller.Poll` has been removed -- Function `*StaticSitesGetUserProvidedFunctionAppsForStaticSitePager.PageResponse` has been removed -- Function `*WebAppsListBackupsSlotPager.NextPage` has been removed -- Function `*AppServiceCertificateOrdersListCertificatesPager.Err` has been removed -- Function `*AppServiceEnvironmentsListMultiRolePoolInstanceMetricDefinitionsPager.Err` has been removed -- Function `*AppServicePlansClient.BeginCreateOrUpdate` has been removed -- Function `*WebAppsDeletePrivateEndpointConnectionPoller.Done` has been removed -- Function `*WebAppsStartWebSiteNetworkTraceOperationSlotPoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsListMultiRoleMetricDefinitionsPager.PageResponse` has been removed -- Function `AppServiceCertificateOrder.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdateMultiRolePoolPoller.Poll` has been removed -- Function `*WebAppsListContinuousWebJobsSlotPager.NextPage` has been removed -- Function `*WebAppsListPublishingCredentialsPoller.FinalResponse` has been removed -- Function `*StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.Done` has been removed -- Function `*DiagnosticsListSiteDiagnosticCategoriesSlotPager.PageResponse` has been removed -- Function `*WebAppsListInstanceIdentifiersSlotPager.Err` has been removed -- Function `*AppServiceEnvironmentsDeletePrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `*DiagnosticsListSiteAnalysesPager.NextPage` has been removed -- Function `AppServiceCertificateResource.MarshalJSON` has been removed -- Function `*CertificateRegistrationProviderListOperationsPager.NextPage` has been removed -- Function `*WebAppsListSlotDifferencesFromProductionPager.NextPage` has been removed -- Function `*AppServicePlansClient.GetRouteForVnet` has been removed -- Function `*WebAppsListTriggeredWebJobHistoryPager.Err` has been removed -- Function `*DiagnosticsListSiteDiagnosticCategoriesSlotPager.Err` has been removed -- Function `*StaticSitesCreateOrUpdateStaticSiteCustomDomainPoller.Done` has been removed -- Function `*WebAppsStartWebSiteNetworkTraceOperationSlotPoller.ResumeToken` has been removed -- Function `*AppServiceCertificateOrdersListPager.Err` has been removed -- Function `*WebAppsCreateInstanceMSDeployOperationPoller.FinalResponse` has been removed -- Function `*StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.ResumeToken` has been removed -- Function `*RecommendationsListPager.Err` has been removed -- Function `*AppServiceEnvironmentsListByResourceGroupPager.PageResponse` has been removed -- Function `WebAppsMigrateMySQLPollerResponse.PollUntilDone` has been removed -- Function `WebAppsRestoreFromBackupBlobSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsRestoreFromBackupBlobPoller.Poll` has been removed -- Function `*WebAppsListProcessModulesSlotPager.PageResponse` has been removed -- Function `*WebAppsApproveOrRejectPrivateEndpointConnectionSlotPoller.ResumeToken` has been removed -- Function `*WebAppsListPublishingCredentialsSlotPollerResponse.Resume` has been removed -- Function `*StaticSitesDetachStaticSitePoller.ResumeToken` has been removed -- Function `*WebAppsGetPrivateEndpointConnectionListPager.NextPage` has been removed -- Function `ReissueCertificateOrderRequest.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdateMultiRolePoolPoller.FinalResponse` has been removed -- Function `*WebAppsCreateOrUpdateSourceControlPollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsDeletePrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsResumePollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsListMultiRolePoolSKUsPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsDeletePoller.Done` has been removed -- Function `WebAppsInstallSiteExtensionPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsRestoreFromDeletedAppPoller.ResumeToken` has been removed -- Function `*AppServicePlansListHybridConnectionsPager.Err` has been removed -- Function `*KubeEnvironmentsDeletePoller.Poll` has been removed -- Function `*WebAppsListHostNameBindingsPager.PageResponse` has been removed -- Function `*ResourceHealthMetadataListPager.PageResponse` has been removed -- Function `VnetValidationFailureDetails.MarshalJSON` has been removed -- Function `*CertificatesListPager.NextPage` has been removed -- Function `*WebAppsListPager.Err` has been removed -- Function `*WebAppsRestoreFromDeletedAppSlotPollerResponse.Resume` has been removed -- Function `*WebAppsListBackupsPager.PageResponse` has been removed -- Function `VnetParameters.MarshalJSON` has been removed -- Function `*AppServicePlansClient.Update` has been removed -- Function `WebAppsCreateMSDeployOperationSlotPollerResponse.PollUntilDone` has been removed -- Function `*AppServiceCertificateOrdersClient.ListCertificates` has been removed -- Function `*AppServiceEnvironmentsClient.ListWorkerPoolInstanceMetricDefinitions` has been removed -- Function `*AppServicePlansClient.GetServerFarmSKUs` has been removed -- Function `*RecommendationsListRecommendedRulesForHostingEnvironmentPager.Err` has been removed -- Function `*ProviderGetFunctionAppStacksForLocationPager.PageResponse` has been removed -- Function `*AppServicePlansListWebAppsPager.NextPage` has been removed -- Function `*WebAppsGetPrivateEndpointConnectionListSlotPager.Err` has been removed -- Function `*StaticSitesDeleteStaticSiteCustomDomainPoller.FinalResponse` has been removed -- Function `HostNameBinding.MarshalJSON` has been removed -- Function `*DiagnosticsListSiteAnalysesPager.PageResponse` has been removed -- Function `AppServiceEnvironmentsDeletePrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `AppServiceCertificateOrdersCreateOrUpdateCertificatePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListWebJobsSlotPager.PageResponse` has been removed -- Function `*WebAppsRestoreSnapshotPoller.ResumeToken` has been removed -- Function `*StaticSitesDeletePrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*WebAppsRestoreFromDeletedAppSlotPoller.Poll` has been removed -- Function `*WebAppsListPublishingCredentialsPoller.Done` has been removed -- Function `*DomainsListOwnershipIdentifiersPager.NextPage` has been removed -- Function `StaticSitesWorkflowPreview.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsChangeVnetPager.NextPage` has been removed -- Function `*WebAppsCreateFunctionPoller.ResumeToken` has been removed -- Function `*StaticSitesValidateCustomDomainCanBeAddedToStaticSitePoller.ResumeToken` has been removed -- Function `*WebAppsDeletePrivateEndpointConnectionSlotPollerResponse.Resume` has been removed -- Function `StaticSitesDeletePrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsRestoreSnapshotSlotPoller.Done` has been removed -- Function `*AppServiceEnvironmentsClient.ListUsages` has been removed -- Function `WebAppsRestoreFromDeletedAppSlotPollerResponse.PollUntilDone` has been removed -- Function `*DiagnosticsListHostingEnvironmentDetectorResponsesPager.NextPage` has been removed -- Function `*WebAppsCreateMSDeployOperationPoller.Poll` has been removed -- Function `*RecommendationsListHistoryForWebAppPager.NextPage` has been removed -- Function `MigrateMySQLRequest.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsSuspendPoller.FinalResponse` has been removed -- Function `DetectorResponse.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsClient.Get` has been removed -- Function `*WebAppsListConfigurationsSlotPager.NextPage` has been removed -- Function `*AppServicePlansCreateOrUpdatePoller.Poll` has been removed -- Function `*AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsPager.Err` has been removed -- Function `*StaticSitesValidateCustomDomainCanBeAddedToStaticSitePollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsListMultiRolePoolSKUsPager.NextPage` has been removed -- Function `*WebAppsListWebJobsSlotPager.NextPage` has been removed -- Function `*DomainsListOwnershipIdentifiersPager.Err` has been removed -- Function `*StaticSitesListStaticSiteBuildFunctionsPager.Err` has been removed -- Function `AppServiceCertificateCollection.MarshalJSON` has been removed -- Function `*WebAppsMigrateMySQLPoller.FinalResponse` has been removed -- Function `*WebAppsListPublicCertificatesSlotPager.NextPage` has been removed -- Function `NewAppServicePlansClient` has been removed -- Function `*WebAppsMigrateStoragePoller.Poll` has been removed -- Function `*WebAppsCreateOrUpdateSourceControlSlotPoller.FinalResponse` has been removed -- Function `*WebAppsListTriggeredWebJobsSlotPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsClient.BeginDeletePrivateEndpointConnection` has been removed -- Function `*WebAppsDeletePrivateEndpointConnectionPoller.Poll` has been removed -- Function `AppServiceEnvironmentsDeletePollerResponse.PollUntilDone` has been removed -- Function `*AppServicePlansClient.ListVnets` has been removed -- Function `*ProviderListOperationsPager.PageResponse` has been removed -- Function `*WebAppsGetAppSettingsKeyVaultReferencesSlotPager.PageResponse` has been removed -- Function `StaticSitesRegisterUserProvidedFunctionAppWithStaticSitePollerResponse.PollUntilDone` has been removed -- Function `*AppServiceEnvironmentsChangeVnetPoller.FinalResponse` has been removed -- Function `SitePhpErrorLogFlag.MarshalJSON` has been removed -- Function `*WebAppsGetPrivateEndpointConnectionListPager.PageResponse` has been removed -- Function `*WebAppsListUsagesPager.NextPage` has been removed -- Function `*WebAppsDeletePrivateEndpointConnectionSlotPoller.ResumeToken` has been removed -- Function `AppServiceEnvironmentsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*KubeEnvironmentsCreateOrUpdatePoller.Poll` has been removed -- Function `MSDeployStatus.MarshalJSON` has been removed -- Function `*StaticSitesDeleteStaticSiteBuildPoller.ResumeToken` has been removed -- Function `*DomainsListRecommendationsPager.PageResponse` has been removed -- Function `*AppServiceCertificateOrdersCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ProviderGetAvailableStacksOnPremPager.NextPage` has been removed -- Function `*AppServiceCertificateOrdersClient.BeginCreateOrUpdate` has been removed -- Function `WebAppsListPublishingCredentialsPollerResponse.PollUntilDone` has been removed -- Function `*AppServiceCertificateOrdersClient.BeginCreateOrUpdateCertificate` has been removed -- Function `*DiagnosticsListSiteDetectorsPager.Err` has been removed -- Function `*DiagnosticsListSiteAnalysesSlotPager.PageResponse` has been removed -- Function `*WebAppsListSlotDifferencesFromProductionPager.PageResponse` has been removed -- Function `*CertificatesListPager.Err` has been removed -- Function `*StaticSitesDeleteStaticSitePoller.Done` has been removed -- Function `*AppServiceEnvironmentsClient.ListMultiRolePools` has been removed -- Function `*WebAppsListWebJobsPager.NextPage` has been removed -- Function `*WebAppsListConfigurationsPager.PageResponse` has been removed -- Function `AppServicePlanPatchResource.MarshalJSON` has been removed -- Function `*StaticSitesListPager.PageResponse` has been removed -- Function `*WebAppsSwapSlotPoller.ResumeToken` has been removed -- Function `*WebAppsListBasicPublishingCredentialsPoliciesPager.PageResponse` has been removed -- Function `*WebAppsRestoreFromBackupBlobSlotPollerResponse.Resume` has been removed -- Function `*WebAppsListSnapshotsPager.PageResponse` has been removed -- Function `*ResourceHealthMetadataListBySitePager.PageResponse` has been removed -- Function `*AppServicePlanPatchResourceProperties.UnmarshalJSON` has been removed -- Function `StaticSitesCreateZipDeploymentForStaticSiteBuildPollerResponse.PollUntilDone` has been removed -- Function `*AppServicePlansClient.ListRoutesForVnet` has been removed -- Function `*AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionPoller.Poll` has been removed -- Function `*AppServiceEnvironmentsSuspendPoller.Poll` has been removed -- Function `*WebAppsStartNetworkTracePoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdateWorkerPoolPoller.FinalResponse` has been removed -- Function `*StaticSitesCreateZipDeploymentForStaticSiteBuildPollerResponse.Resume` has been removed -- Function `*AppServicePlansListHybridConnectionsPager.PageResponse` has been removed -- Function `*StaticSitesValidateCustomDomainCanBeAddedToStaticSitePoller.FinalResponse` has been removed -- Function `StaticSiteCustomDomainOverviewARMResource.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsChangeVnetPoller.Done` has been removed -- Function `*AppServiceEnvironmentsClient.ListAppServicePlans` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*WebAppsListSiteBackupsSlotPager.NextPage` has been removed -- Function `DeletedSite.MarshalJSON` has been removed -- Function `*StaticSitesRegisterUserProvidedFunctionAppWithStaticSitePollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsResumePager.NextPage` has been removed -- Function `*AppServiceEnvironmentsListWebAppsPager.Err` has been removed -- Function `*WebAppsListInstanceFunctionsSlotPager.PageResponse` has been removed -- Function `*WebAppsRestoreFromBackupBlobPoller.Done` has been removed -- Function `*RecommendationsListHistoryForWebAppPager.PageResponse` has been removed -- Function `*WebAppsListConfigurationSnapshotInfoPager.Err` has been removed -- Function `*WebAppsListInstanceFunctionsSlotPager.NextPage` has been removed -- Function `ProxyOnlyResource.MarshalJSON` has been removed -- Function `*WebAppsListPublishingCredentialsSlotPoller.Done` has been removed -- Function `AppServiceCertificatePatchResource.MarshalJSON` has been removed -- Function `*WebAppsListConfigurationSnapshotInfoSlotPager.Err` has been removed -- Function `*StaticSitesListPager.Err` has been removed -- Function `*WebAppsRestorePoller.ResumeToken` has been removed -- Function `*WebAppsApproveOrRejectPrivateEndpointConnectionPoller.Done` has been removed -- Function `*AppServiceEnvironmentsResumePoller.Poll` has been removed -- Function `*StaticSitesGetPrivateEndpointConnectionListPager.PageResponse` has been removed -- Function `*WebAppsListProcessesSlotPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsClient.GetAseV3NetworkingConfiguration` has been removed -- Function `*WebAppsCreateFunctionPoller.Poll` has been removed -- Function `*WebAppsCreateMSDeployOperationSlotPoller.Done` has been removed -- Function `*WebAppsCreateInstanceMSDeployOperationPoller.Poll` has been removed -- Function `ResourceHealthMetadata.MarshalJSON` has been removed -- Function `*WebAppsListPerfMonCountersSlotPager.NextPage` has been removed -- Function `*WebAppsCreateInstanceMSDeployOperationSlotPollerResponse.Resume` has been removed -- Function `PossibleProviderStackOsTypeValues` has been removed -- Function `*RecommendationsListPager.NextPage` has been removed -- Function `*StaticSitesListStaticSiteBuildFunctionsPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsPager.NextPage` has been removed -- Function `*WebAppsCreateMSDeployOperationSlotPoller.Poll` has been removed -- Function `*WebAppsListBasicPublishingCredentialsPoliciesPager.Err` has been removed -- Function `*AppServiceEnvironmentsListMultiRolePoolInstanceMetricDefinitionsPager.PageResponse` has been removed -- Function `*WebAppsListByResourceGroupPager.PageResponse` has been removed -- Function `WebJob.MarshalJSON` has been removed -- Function `*WebAppsListSnapshotsSlotPager.Err` has been removed -- Function `*WebAppsRestoreSnapshotPoller.Poll` has been removed -- Function `*WebAppsApproveOrRejectPrivateEndpointConnectionPoller.Poll` has been removed -- Function `*StaticSitesApproveOrRejectPrivateEndpointConnectionPoller.Poll` has been removed -- Function `AppServiceEnvironmentResource.MarshalJSON` has been removed -- Function `HybridConnectionLimits.MarshalJSON` has been removed -- Function `*AppServiceCertificateOrdersCreateOrUpdateCertificatePollerResponse.Resume` has been removed -- Function `*WebAppsStartWebSiteNetworkTraceOperationSlotPollerResponse.Resume` has been removed -- Function `*StaticSitesGetStaticSiteBuildsPager.NextPage` has been removed -- Function `*AppServiceCertificateOrdersClient.Update` has been removed -- Function `*WebAppsRestoreFromBackupBlobPoller.FinalResponse` has been removed -- Function `*AppServiceCertificateOrdersClient.ListByResourceGroup` has been removed -- Function `*AppServiceEnvironmentsGetPrivateEndpointConnectionListPager.PageResponse` has been removed -- Function `*ProviderGetFunctionAppStacksPager.NextPage` has been removed -- Function `*StaticSitesDeleteStaticSitePollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsListCapacitiesPager.NextPage` has been removed -- Function `*WebAppsListInstanceProcessesSlotPager.Err` has been removed -- Function `*WebAppsListPerfMonCountersPager.PageResponse` has been removed -- Function `*WebAppsRestoreSlotPoller.ResumeToken` has been removed -- Function `*WebAppsListSnapshotsFromDRSecondaryPager.Err` has been removed -- Function `SourceControl.MarshalJSON` has been removed -- Function `*DiagnosticsListSiteDetectorResponsesSlotPager.Err` has been removed -- Function `*WebAppsRestorePollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsListMultiRoleUsagesPager.Err` has been removed -- Function `*ProviderGetWebAppStacksPager.PageResponse` has been removed -- Function `*WebAppsListPerfMonCountersPager.Err` has been removed -- Function `*ProviderGetAvailableStacksOnPremPager.Err` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdateWorkerPoolPoller.Poll` has been removed -- Function `*WebAppsApproveOrRejectPrivateEndpointConnectionSlotPoller.FinalResponse` has been removed -- Function `*WebAppsGetSiteConnectionStringKeyVaultReferencesSlotPager.NextPage` has been removed -- Function `*WebAppsListInstanceProcessThreadsPager.PageResponse` has been removed -- Function `*StaticSitesCreateOrUpdateStaticSiteCustomDomainPollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsDeletePoller.FinalResponse` has been removed -- Function `*WebAppsCreateOrUpdateSourceControlPoller.FinalResponse` has been removed -- Function `*WebAppsListProcessThreadsPager.NextPage` has been removed -- Function `*WebAppsCreateInstanceFunctionSlotPoller.FinalResponse` has been removed -- Function `*WebAppsInstallSiteExtensionSlotPoller.ResumeToken` has been removed -- Function `*WebAppsListDomainOwnershipIdentifiersSlotPager.Err` has been removed -- Function `CertificateProperties.MarshalJSON` has been removed -- Function `*ProviderGetAvailableStacksPager.PageResponse` has been removed -- Function `*WebAppsCreateInstanceMSDeployOperationSlotPoller.ResumeToken` has been removed -- Function `FunctionAppStack.MarshalJSON` has been removed -- Function `*WebAppsListConfigurationsSlotPager.Err` has been removed -- Function `*ProviderGetWebAppStacksForLocationPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsListWebWorkerUsagesPager.NextPage` has been removed -- Function `*WebAppsListHostNameBindingsSlotPager.Err` has been removed -- Function `*DiagnosticsListHostingEnvironmentDetectorResponsesPager.PageResponse` has been removed -- Function `*StaticSitesListStaticSiteFunctionsPager.Err` has been removed -- Function `AppServiceEnvironmentsCreateOrUpdateWorkerPoolPollerResponse.PollUntilDone` has been removed -- Function `MSDeploy.MarshalJSON` has been removed -- Function `*ProviderGetWebAppStacksForLocationPager.NextPage` has been removed -- Function `*DiagnosticsListSiteDetectorsPager.PageResponse` has been removed -- Function `*WebAppsStartNetworkTracePoller.Done` has been removed -- Function `*AppServiceCertificateOrdersListCertificatesPager.PageResponse` has been removed -- Function `*AppServicePlansListPager.Err` has been removed -- Function `*AppServiceEnvironmentsListMultiRolePoolsPager.Err` has been removed -- Function `*WebAppsGetSiteConnectionStringKeyVaultReferencesSlotPager.PageResponse` has been removed -- Function `*WebAppsListSnapshotsFromDRSecondaryPager.NextPage` has been removed -- Function `*WebAppsListInstanceIdentifiersSlotPager.NextPage` has been removed -- Function `*WebAppsListBackupsSlotPager.Err` has been removed -- Function `*AppServiceEnvironmentsClient.ListMultiRoleUsages` has been removed -- Function `*AppServiceEnvironmentsClient.GetPrivateEndpointConnectionList` has been removed -- Function `*ProviderGetFunctionAppStacksForLocationPager.NextPage` has been removed -- Function `*WebAppsSwapSlotWithProductionPoller.Done` has been removed -- Function `*WebAppsListSnapshotsSlotPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsClient.GetWorkerPool` has been removed -- Function `AppServicePlanPatchResourceProperties.MarshalJSON` has been removed -- Function `*WebAppsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*KubeEnvironmentsListBySubscriptionPager.NextPage` has been removed -- Function `*WebAppsCreateMSDeployOperationPoller.FinalResponse` has been removed -- Function `NewAppServiceCertificateOrdersClient` has been removed -- Function `*WebAppsListUsagesSlotPager.NextPage` has been removed -- Function `*StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildPager.PageResponse` has been removed -- Function `*StaticSitesGetStaticSitesByResourceGroupPager.NextPage` has been removed -- Function `AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListContinuousWebJobsPager.Err` has been removed -- Function `*AppServiceCertificateOrdersListByResourceGroupPager.Err` has been removed -- Function `*WebAppsStartWebSiteNetworkTraceOperationPoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsClient.BeginCreateOrUpdate` has been removed -- Function `*AppServicePlansListUsagesPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsPager.Err` has been removed -- Function `*StaticSitesCreateOrUpdateStaticSitePollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsListWorkerPoolInstanceMetricDefinitionsPager.NextPage` has been removed -- Function `*WebAppsListInstanceProcessModulesPager.PageResponse` has been removed -- Function `*WebAppsGetAppSettingsKeyVaultReferencesSlotPager.NextPage` has been removed -- Function `*WebAppsListSnapshotsPager.Err` has been removed -- Function `*DomainsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*StaticSitesRegisterUserProvidedFunctionAppWithStaticSitePoller.Poll` has been removed -- Function `*WebAppsGetSiteConnectionStringKeyVaultReferencesSlotPager.Err` has been removed -- Function `SiteAuthSettingsV2.MarshalJSON` has been removed -- Function `DefaultErrorResponseError.MarshalJSON` has been removed -- Function `WebAppsSwapSlotPollerResponse.PollUntilDone` has been removed -- Function `DefaultErrorResponse.Error` has been removed -- Function `*DiagnosticsListSiteDetectorResponsesSlotPager.PageResponse` has been removed -- Function `*StaticSitesDeleteStaticSiteBuildPoller.FinalResponse` has been removed -- Function `*StaticSitesGetPrivateEndpointConnectionListPager.Err` has been removed -- Function `*WebAppsGetPrivateEndpointConnectionListSlotPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsSuspendPager.NextPage` has been removed -- Function `*WebAppsRestoreSnapshotSlotPollerResponse.Resume` has been removed -- Function `StaticSitesDeleteStaticSitePollerResponse.PollUntilDone` has been removed -- Function `*AppServiceCertificateOrdersClient.GetCertificate` has been removed -- Function `StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse.PollUntilDone` has been removed -- Function `APIKVReference.MarshalJSON` has been removed -- Function `*WebAppsListConfigurationSnapshotInfoSlotPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsClient.GetDiagnosticsItem` has been removed -- Function `*AppServiceEnvironmentsChangeVnetPollerResponse.Resume` has been removed -- Function `*WebAppsInstallSiteExtensionSlotPoller.Poll` has been removed -- Function `*AppServiceEnvironmentsListWebWorkerUsagesPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*DiagnosticsListSiteDetectorsSlotPager.PageResponse` has been removed -- Function `*WebAppsListPerfMonCountersSlotPager.Err` has been removed -- Function `*DiagnosticsListSiteDetectorsSlotPager.NextPage` has been removed -- Function `*WebAppsListPublishingCredentialsSlotPoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsResumePoller.FinalResponse` has been removed -- Function `*WebAppsListDomainOwnershipIdentifiersSlotPager.PageResponse` has been removed -- Function `*CertificatesListByResourceGroupPager.NextPage` has been removed -- Function `SiteConfigurationSnapshotInfo.MarshalJSON` has been removed -- Function `*DiagnosticsListHostingEnvironmentDetectorResponsesPager.Err` has been removed -- Function `AppServicePlan.MarshalJSON` has been removed -- Function `*AppServicePlansClient.ListUsages` has been removed -- Function `*AppServiceEnvironmentsListAppServicePlansPager.NextPage` has been removed -- Function `AppServiceCertificateOrderProperties.MarshalJSON` has been removed -- Function `*WebAppsListInstanceProcessThreadsSlotPager.Err` has been removed -- Function `StaticSitesDeleteStaticSiteBuildPollerResponse.PollUntilDone` has been removed -- Function `*StaticSitesCreateOrUpdateStaticSitePoller.Done` has been removed -- Function `*AppServiceEnvironmentsClient.Update` has been removed -- Function `WebAppsDeletePrivateEndpointConnectionSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsCreateOrUpdatePoller.Done` has been removed -- Function `*WebAppsSwapSlotPollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsResumePager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsSuspendPollerResponse.Resume` has been removed -- Function `*DomainsListPager.Err` has been removed -- Function `*WebAppsStartWebSiteNetworkTraceOperationPoller.Done` has been removed -- Function `*WebAppsListInstanceProcessModulesSlotPager.NextPage` has been removed -- Function `*StaticSitesListStaticSiteUsersPager.Err` has been removed -- Function `*WebAppsListInstanceFunctionsSlotPager.Err` has been removed -- Function `StaticSitesCreateOrUpdateStaticSiteCustomDomainPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListPublicCertificatesPager.Err` has been removed -- Function `WebAppsSwapSlotWithProductionPollerResponse.PollUntilDone` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*AppServiceCertificateOrdersClient.Delete` has been removed -- Function `*WebAppsListTriggeredWebJobsSlotPager.Err` has been removed -- Function `*WebAppsListInstanceIdentifiersPager.Err` has been removed -- Function `DiagnosticCategory.MarshalJSON` has been removed -- Function `*WebAppsCreateInstanceFunctionSlotPollerResponse.Resume` has been removed -- Function `*WebAppsInstallSiteExtensionSlotPollerResponse.Resume` has been removed -- Function `*AppServicePlansClient.GetHybridConnectionPlanLimit` has been removed -- Function `*AppServicePlansClient.UpdateVnetRoute` has been removed -- Function `*DomainRegistrationProviderListOperationsPager.PageResponse` has been removed -- Function `*WebAppsListFunctionsPager.PageResponse` has been removed -- Function `*WebAppsRestoreFromDeletedAppSlotPoller.FinalResponse` has been removed -- Function `*AppServiceCertificateOrdersListPager.PageResponse` has been removed -- Function `*WebAppsCreateOrUpdateSourceControlSlotPollerResponse.Resume` has been removed -- Function `*WebAppsListInstanceProcessModulesPager.NextPage` has been removed -- Function `*StaticSitesDetachStaticSitePoller.Done` has been removed -- Function `TriggeredJobHistory.MarshalJSON` has been removed -- Function `*WebAppsCreateOrUpdateSlotPoller.Poll` has been removed -- Function `Usage.MarshalJSON` has been removed -- Function `*DomainsListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsListUsagesSlotPager.Err` has been removed -- Function `*AppServicePlansListPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsListMultiRolePoolsPager.PageResponse` has been removed -- Function `*StaticSitesListStaticSiteCustomDomainsPager.NextPage` has been removed -- Function `*WebAppsListDomainOwnershipIdentifiersPager.Err` has been removed -- Function `*WebAppsListHostNameBindingsSlotPager.PageResponse` has been removed -- Function `DeletedAppRestoreRequest.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsDeletePoller.ResumeToken` has been removed -- Function `*WebAppsRestoreSnapshotPollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdateWorkerPoolPoller.ResumeToken` has been removed -- Function `*WebAppsSwapSlotPoller.Done` has been removed -- Function `*DiagnosticsListSiteDetectorResponsesPager.PageResponse` has been removed -- Function `DetectorDefinitionResource.MarshalJSON` has been removed -- Function `*WebAppsListSiteExtensionsPager.NextPage` has been removed -- Function `SiteLogsConfig.MarshalJSON` has been removed -- Function `*DiagnosticsListSiteDiagnosticCategoriesPager.PageResponse` has been removed -- Function `WebAppsMigrateStoragePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListInstanceIdentifiersPager.PageResponse` has been removed -- Function `*AppServicePlansClient.Get` has been removed -- Function `*WebAppsInstallSiteExtensionPoller.FinalResponse` has been removed -- Function `*StaticSitesGetUserProvidedFunctionAppsForStaticSitePager.Err` has been removed -- Function `*StaticSitesApproveOrRejectPrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `*AppServicePlansListByResourceGroupPager.Err` has been removed -- Function `StorageMigrationOptions.MarshalJSON` has been removed -- Function `*StaticSitesCreateOrUpdateStaticSitePoller.ResumeToken` has been removed -- Function `*RecommendationsListHistoryForHostingEnvironmentPager.Err` has been removed -- Function `*WebAppsListTriggeredWebJobHistorySlotPager.Err` has been removed -- Function `*WebAppsGetAppSettingsKeyVaultReferencesPager.NextPage` has been removed -- Function `*ProviderGetFunctionAppStacksPager.Err` has been removed -- Function `*TopLevelDomainsListPager.Err` has been removed -- Function `*DomainsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*WebAppsListPublicCertificatesSlotPager.PageResponse` has been removed -- Function `*AppServicePlansClient.UpdateVnetGateway` has been removed -- Function `*WebAppsRestorePoller.FinalResponse` has been removed -- Function `StaticSiteUserInvitationResponseResource.MarshalJSON` has been removed -- Function `*WebAppsListPublishingCredentialsPoller.Poll` has been removed -- Function `WebAppsCreateOrUpdateSourceControlSlotPollerResponse.PollUntilDone` has been removed -- Function `*AppServiceEnvironmentsClient.ListWorkerPoolSKUs` has been removed -- Function `*AppServiceEnvironmentsResumePager.Err` has been removed -- Function `*ResourceHealthMetadataListByResourceGroupPager.Err` has been removed -- Function `CertificateEmail.MarshalJSON` has been removed -- Function `*WebAppsCreateInstanceFunctionSlotPoller.ResumeToken` has been removed -- Function `ApplicationStackResource.MarshalJSON` has been removed -- Function `*KubeEnvironmentsListByResourceGroupPager.Err` has been removed -- Function `*AppServicePlansListUsagesPager.Err` has been removed -- Function `*AppServiceEnvironmentsListWebWorkerUsagesPager.Err` has been removed -- Function `*WebAppsStartWebSiteNetworkTraceOperationSlotPoller.Poll` has been removed -- Function `*WebAppsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*WebAppsListSiteBackupsSlotPager.Err` has been removed -- Function `*AppServiceEnvironmentsSuspendPager.Err` has been removed -- Function `*WebAppsCreateOrUpdateSlotPollerResponse.Resume` has been removed -- Function `RestoreRequest.MarshalJSON` has been removed -- Function `*StaticSitesGetStaticSitesByResourceGroupPager.Err` has been removed -- Function `*AppServiceEnvironmentsListWorkerPoolsPager.PageResponse` has been removed -- Function `*WebAppsListTriggeredWebJobsPager.PageResponse` has been removed -- Function `StaticSitesCreateOrUpdateStaticSitePollerResponse.PollUntilDone` has been removed -- Function `*AppServiceEnvironmentsClient.ListWorkerPools` has been removed -- Function `*AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsPager.PageResponse` has been removed -- Function `WebAppsCreateInstanceMSDeployOperationSlotPollerResponse.PollUntilDone` has been removed -- Function `*AppServiceEnvironmentsChangeVnetPager.Err` has been removed -- Function `*WebAppsListTriggeredWebJobsSlotPager.PageResponse` has been removed -- Function `*StaticSitesDetachStaticSitePoller.Poll` has been removed -- Function `*WebAppsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.Poll` has been removed -- Function `*ProviderGetWebAppStacksPager.Err` has been removed -- Function `*CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponsePager.Err` has been removed -- Function `*AppServiceEnvironmentsListWorkerPoolInstanceMetricDefinitionsPager.PageResponse` has been removed -- Function `AppServiceCertificateOrderPatchResource.MarshalJSON` has been removed -- Function `*WebAppsListProcessesSlotPager.Err` has been removed -- Function `*WebAppsListContinuousWebJobsPager.PageResponse` has been removed -- Function `*StaticSitesDeletePrivateEndpointConnectionPoller.Poll` has been removed -- Function `*WebAppsCreateOrUpdateSourceControlPoller.Done` has been removed -- Function `*WebAppsStartWebSiteNetworkTraceOperationPollerResponse.Resume` has been removed -- Function `*WebAppsListDeploymentsPager.PageResponse` has been removed -- Function `*StaticSitesValidateCustomDomainCanBeAddedToStaticSitePoller.Poll` has been removed -- Function `*ResourceHealthMetadataListByResourceGroupPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsListCapacitiesPager.PageResponse` has been removed -- Function `*CertificatesListByResourceGroupPager.Err` has been removed -- Function `WebAppsRestoreSlotPollerResponse.PollUntilDone` has been removed -- Function `ContinuousWebJob.MarshalJSON` has been removed -- Function `*StaticSitesCreateZipDeploymentForStaticSitePoller.Done` has been removed -- Function `*AppServiceCertificateOrderProperties.UnmarshalJSON` has been removed -- Function `*WebAppsListSlotDifferencesSlotPager.PageResponse` has been removed -- Function `*DeletedWebAppsListByLocationPager.PageResponse` has been removed -- Function `*AppServiceCertificateOrderPatchResourceProperties.UnmarshalJSON` has been removed -- Function `*AppServicePlansClient.ListWebAppsByHybridConnection` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdateWorkerPoolPollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsDeletePrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `FunctionEnvelope.MarshalJSON` has been removed -- Function `*WebAppsMigrateMySQLPoller.ResumeToken` has been removed -- Function `*WebAppsRestoreSlotPoller.FinalResponse` has been removed -- Function `*WebAppsListWebJobsPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsGetPrivateEndpointConnectionListPager.Err` has been removed -- Function `BackupRequest.MarshalJSON` has been removed -- Function `*DomainsListByResourceGroupPager.Err` has been removed -- Function `WebAppsStartNetworkTraceSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsCreateMSDeployOperationSlotPollerResponse.Resume` has been removed -- Function `RecommendationRule.MarshalJSON` has been removed -- Function `*WebAppsRestoreFromBackupBlobSlotPoller.ResumeToken` has been removed -- Function `WebAppsInstallSiteExtensionSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListBasicPublishingCredentialsPoliciesSlotPager.PageResponse` has been removed -- Function `*CertificateProperties.UnmarshalJSON` has been removed -- Function `Snapshot.MarshalJSON` has been removed -- Function `*WebAppsApproveOrRejectPrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `*DiagnosticsListSiteDiagnosticCategoriesSlotPager.NextPage` has been removed -- Function `*DomainsCreateOrUpdatePoller.Poll` has been removed -- Function `*WebAppsCreateInstanceMSDeployOperationPollerResponse.Resume` has been removed -- Function `StaticSiteUserProvidedFunctionAppARMResource.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsListWorkerPoolsPager.Err` has been removed -- Function `*WebAppsApproveOrRejectPrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `*AppServicePlansClient.GetHybridConnection` has been removed -- Function `*WebAppsListSlotsPager.PageResponse` has been removed -- Function `*StaticSitesDeleteStaticSiteCustomDomainPoller.ResumeToken` has been removed -- Function `*StaticSitesCreateOrUpdateStaticSiteCustomDomainPoller.ResumeToken` has been removed -- Function `*WebAppsListSnapshotsSlotPager.PageResponse` has been removed -- Function `StaticSitesApproveOrRejectPrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `*AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `PublicCertificate.MarshalJSON` has been removed -- Function `*WebAppsListBackupsPager.NextPage` has been removed -- Function `SnapshotRestoreRequest.MarshalJSON` has been removed -- Function `*KubeEnvironmentsDeletePoller.Done` has been removed -- Function `*StaticSitesCreateZipDeploymentForStaticSiteBuildPoller.Poll` has been removed -- Function `*StaticSitesGetStaticSiteBuildsPager.PageResponse` has been removed -- Function `*WebAppsListDeploymentsPager.Err` has been removed -- Function `ProcessModuleInfo.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection` has been removed -- Function `*WebAppsListPublishingCredentialsPoller.ResumeToken` has been removed -- Function `*RecommendationsListHistoryForHostingEnvironmentPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsClient.BeginDelete` has been removed -- Function `*AppServicePlansListWebAppsPager.Err` has been removed -- Function `*WebAppsSwapSlotPoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsClient.BeginChangeVnet` has been removed -- Function `WebAppsApproveOrRejectPrivateEndpointConnectionSlotPollerResponse.PollUntilDone` has been removed -- Function `*StaticSitesGetUserProvidedFunctionAppsForStaticSitePager.NextPage` has been removed -- Function `*WebAppsListTriggeredWebJobHistorySlotPager.NextPage` has been removed -- Function `*CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponsePager.NextPage` has been removed -- Function `*RecommendationsListRecommendedRulesForHostingEnvironmentPager.PageResponse` has been removed -- Function `*RecommendationsListRecommendedRulesForHostingEnvironmentPager.NextPage` has been removed -- Function `RemotePrivateEndpointConnectionARMResource.MarshalJSON` has been removed -- Function `*WebAppsListTriggeredWebJobHistoryPager.PageResponse` has been removed -- Function `GeoRegion.MarshalJSON` has been removed -- Function `*ProviderGetFunctionAppStacksPager.PageResponse` has been removed -- Function `*WebAppsStartWebSiteNetworkTraceOperationPoller.Poll` has been removed -- Function `*WebAppsListSlotsPager.Err` has been removed -- Function `*WebAppsListInstanceIdentifiersPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsClient.GetPrivateLinkResources` has been removed -- Function `VnetValidationTestFailure.MarshalJSON` has been removed -- Function `*WebAppsSwapSlotWithProductionPollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdateMultiRolePoolPoller.Done` has been removed -- Function `*WebAppsListFunctionsPager.NextPage` has been removed -- Function `WebAppsCreateInstanceMSDeployOperationPollerResponse.PollUntilDone` has been removed -- Function `*DomainsListOwnershipIdentifiersPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdateWorkerPoolPoller.Done` has been removed -- Function `*AppServiceEnvironmentsListMultiRolePoolsPager.NextPage` has been removed -- Function `*WebAppsListSiteExtensionsSlotPager.PageResponse` has been removed -- Function `*StaticSitesDeleteStaticSitePoller.ResumeToken` has been removed -- Function `*AppServiceEnvironmentsClient.GetPrivateEndpointConnection` has been removed -- Function `*WebAppsRestoreFromBackupBlobSlotPoller.Done` has been removed -- Function `WebAppsRestorePollerResponse.PollUntilDone` has been removed -- Function `*AppServiceEnvironmentsListWorkerPoolsPager.NextPage` has been removed -- Function `*AppServicePlansListWebAppsByHybridConnectionPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsClient.GetInboundNetworkDependenciesEndpoints` has been removed -- Function `*DomainsListPager.NextPage` has been removed -- Function `*WebAppsRestoreSlotPoller.Poll` has been removed -- Function `*WebAppsStartNetworkTracePollerResponse.Resume` has been removed -- Function `*WebAppsCreateMSDeployOperationPoller.Done` has been removed -- Function `*WebAppsStartWebSiteNetworkTraceOperationPoller.ResumeToken` has been removed -- Function `*AppServiceEnvironmentsListByResourceGroupPager.Err` has been removed -- Function `*StaticSitesApproveOrRejectPrivateEndpointConnectionPoller.Done` has been removed -- Function `*WebAppsCreateInstanceFunctionSlotPoller.Poll` has been removed -- Function `*StaticSitesCreateOrUpdateStaticSitePoller.FinalResponse` has been removed -- Function `SiteAuthSettings.MarshalJSON` has been removed -- Function `*WebAppsRestoreFromBackupBlobSlotPoller.FinalResponse` has been removed -- Function `*AppServicePlansClient.CreateOrUpdateVnetRoute` has been removed -- Function `*WebAppsCreateFunctionPoller.FinalResponse` has been removed -- Function `*CertificateRegistrationProviderListOperationsPager.Err` has been removed -- Function `*WebAppsListSlotDifferencesSlotPager.NextPage` has been removed -- Function `NewAppServiceEnvironmentsClient` has been removed -- Function `*KubeEnvironmentsCreateOrUpdatePoller.Done` has been removed -- Function `ProviderOsTypeSelected.ToPtr` has been removed -- Function `*StaticSitesListStaticSiteFunctionsPager.PageResponse` has been removed -- Function `*ProviderGetWebAppStacksPager.NextPage` has been removed -- Function `*WebAppsInstallSiteExtensionPoller.ResumeToken` has been removed -- Function `*AppServiceCertificateOrdersListPager.NextPage` has been removed -- Function `AppServiceEnvironmentsChangeVnetPollerResponse.PollUntilDone` has been removed -- Function `*RecommendationsListHistoryForHostingEnvironmentPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsSuspendPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsClient.Reboot` has been removed -- Function `WebAppsStartWebSiteNetworkTraceOperationSlotPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListProcessThreadsSlotPager.PageResponse` has been removed -- Function `*KubeEnvironmentsListByResourceGroupPager.PageResponse` has been removed -- Function `*StaticSitesDeleteStaticSitePoller.FinalResponse` has been removed -- Function `*WebAppsGetPrivateEndpointConnectionListSlotPager.PageResponse` has been removed -- Function `*AppServiceCertificateOrdersClient.RetrieveSiteSeal` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdatePoller.Done` has been removed -- Function `*WebAppsCreateInstanceFunctionSlotPoller.Done` has been removed -- Function `*StaticSitesCreateZipDeploymentForStaticSiteBuildPoller.ResumeToken` has been removed -- Function `WebAppsCreateOrUpdateSlotPollerResponse.PollUntilDone` has been removed -- Function `*AppServiceEnvironmentsClient.ListWebWorkerMetricDefinitions` has been removed -- Function `*TopLevelDomainsListAgreementsPager.Err` has been removed -- Function `*DiagnosticsListSiteDiagnosticCategoriesPager.Err` has been removed -- Function `ProcessInfo.MarshalJSON` has been removed -- Function `*KubeEnvironmentsListBySubscriptionPager.Err` has been removed -- Function `*AppServiceEnvironmentsClient.UpdateAseNetworkingConfiguration` has been removed -- Function `*AppServiceEnvironmentsClient.ListCapacities` has been removed -- Function `*AppServicePlansClient.GetVnetFromServerFarm` has been removed -- Function `*AppServiceEnvironmentsClient.ListMultiRoleMetricDefinitions` has been removed -- Function `*AppServiceEnvironmentsListMultiRoleMetricDefinitionsPager.Err` has been removed -- Function `*WebAppsRestoreFromBackupBlobPollerResponse.Resume` has been removed -- Function `MSDeployLog.MarshalJSON` has been removed -- Function `*AppServicePlansClient.GetVnetGateway` has been removed -- Function `*WebAppsRestoreFromDeletedAppPoller.Done` has been removed -- Function `WebAppsDeletePrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `*DiagnosticsListSiteDiagnosticCategoriesPager.NextPage` has been removed -- Function `*StaticSitesCreateZipDeploymentForStaticSiteBuildPoller.Done` has been removed -- Function `*ProviderGetAvailableStacksPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsListWebWorkerMetricDefinitionsPager.NextPage` has been removed -- Function `*WebAppsMigrateStoragePoller.ResumeToken` has been removed -- Function `*AppServiceCertificateOrdersCreateOrUpdatePoller.Poll` has been removed -- Function `AppServiceEnvironmentsResumePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsCreateOrUpdateSlotPoller.Done` has been removed -- Function `*WebAppsCreateOrUpdateSlotPoller.ResumeToken` has been removed -- Function `StaticSiteUserInvitationRequestResource.MarshalJSON` has been removed -- Function `WebAppsRestoreSnapshotPollerResponse.PollUntilDone` has been removed -- Function `*DomainsListRecommendationsPager.NextPage` has been removed -- Function `*WebAppsCreateOrUpdateSourceControlPoller.ResumeToken` has been removed -- Function `*WebAppsListDeploymentsSlotPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsListUsagesPager.PageResponse` has been removed -- Function `StaticSitesDeleteStaticSiteCustomDomainPollerResponse.PollUntilDone` has been removed -- Function `PrivateLinkConnectionApprovalRequestResource.MarshalJSON` has been removed -- Function `*WebAppsRestoreSnapshotSlotPoller.FinalResponse` has been removed -- Function `*StaticSitesDetachStaticSitePoller.FinalResponse` has been removed -- Function `*CertificatesListPager.PageResponse` has been removed -- Function `*WebAppsRestoreSnapshotPoller.FinalResponse` has been removed -- Function `ProviderStackOsType.ToPtr` has been removed -- Function `ResourceMetricDefinition.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsGetPrivateEndpointConnectionListPager.NextPage` has been removed -- Function `*WebAppsListDeploymentsSlotPager.Err` has been removed -- Function `*AppServiceEnvironmentsListWebAppsPager.PageResponse` has been removed -- Function `*StaticSitesDeleteStaticSitePoller.Poll` has been removed -- Function `*WebAppsInstallSiteExtensionPoller.Poll` has been removed -- Function `*TopLevelDomainsListAgreementsPager.PageResponse` has been removed -- Function `*WebAppsListInstanceProcessesSlotPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsListWorkerPoolSKUsPager.NextPage` has been removed -- Function `*WebAppsListSiteBackupsSlotPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsSuspendPoller.ResumeToken` has been removed -- Function `*StaticSitesGetPrivateEndpointConnectionListPager.NextPage` has been removed -- Function `*WebAppsListSnapshotsFromDRSecondarySlotPager.PageResponse` has been removed -- Function `*DeletedWebAppsListByLocationPager.NextPage` has been removed -- Function `*TopLevelDomainsListPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsListMultiRoleUsagesPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsListUsagesPager.NextPage` has been removed -- Function `*AppServicePlansClient.List` has been removed -- Function `BillingMeter.MarshalJSON` has been removed -- Function `*StaticSitesListStaticSiteUsersPager.PageResponse` has been removed -- Function `*DomainRegistrationProviderListOperationsPager.Err` has been removed -- Function `Deployment.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsListUsagesPager.Err` has been removed -- Function `*StaticSitesDeleteStaticSiteBuildPoller.Done` has been removed -- Function `User.MarshalJSON` has been removed -- Function `*AppServicePlansClient.RebootWorker` has been removed -- Function `*DiagnosticsListSiteDetectorResponsesPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsListPager.NextPage` has been removed -- Function `AppServiceEnvironment.MarshalJSON` has been removed -- Function `*WebAppsMigrateMySQLPoller.Poll` has been removed -- Function `RemotePrivateEndpointConnection.MarshalJSON` has been removed -- Function `*WebAppsListPerfMonCountersSlotPager.PageResponse` has been removed -- Function `AppServiceEnvironmentsSuspendPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListBackupsSlotPager.PageResponse` has been removed -- Function `*AppServiceEnvironmentsClient.ListDiagnostics` has been removed -- Function `*WebAppsListPublishingCredentialsPollerResponse.Resume` has been removed -- Function `WebAppsCreateMSDeployOperationPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListInstanceProcessesPager.Err` has been removed -- Function `*WebAppsGetAppSettingsKeyVaultReferencesPager.PageResponse` has been removed -- Function `*AppServicePlansListPager.NextPage` has been removed -- Function `*WebAppsListPager.PageResponse` has been removed -- Function `WebAppsStartWebSiteNetworkTraceOperationPollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListProcessModulesSlotPager.Err` has been removed -- Function `*ResourceHealthMetadataListBySitePager.NextPage` has been removed -- Function `*WebAppsListSiteExtensionsPager.Err` has been removed -- Function `AseV3NetworkingConfiguration.MarshalJSON` has been removed -- Function `*WebAppsSwapSlotWithProductionPoller.Poll` has been removed -- Function `*ResourceHealthMetadataListBySiteSlotPager.NextPage` has been removed -- Function `*WebAppsStartNetworkTracePoller.Poll` has been removed -- Function `*AppServicePlansCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*WebAppsGetAppSettingsKeyVaultReferencesPager.Err` has been removed -- Function `*WebAppsSwapSlotWithProductionPoller.FinalResponse` has been removed -- Function `*StaticSitesApproveOrRejectPrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `*AppServicePlansListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsListConfigurationsPager.NextPage` has been removed -- Function `*KubeEnvironmentsDeletePoller.ResumeToken` has been removed -- Function `*AppServiceEnvironmentsResumePoller.Done` has been removed -- Function `*ProviderListOperationsPager.Err` has been removed -- Function `*WebAppsListUsagesSlotPager.PageResponse` has been removed -- Function `*AppServiceCertificateOrdersCreateOrUpdateCertificatePoller.Done` has been removed -- Function `*AppServicePlansClient.ListWebApps` has been removed -- Function `*AppServicePlansCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*StaticSitesRegisterUserProvidedFunctionAppWithStaticSitePoller.ResumeToken` has been removed -- Function `*AppServiceEnvironmentsListAppServicePlansPager.PageResponse` has been removed -- Function `*AppServicePlansClient.RestartWebApps` has been removed -- Function `*WebAppsGetAppSettingsKeyVaultReferencesSlotPager.Err` has been removed -- Function `*AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsPager.NextPage` has been removed -- Function `*StaticSitesListStaticSiteCustomDomainsPager.PageResponse` has been removed -- Function `*AppServiceCertificateOrdersCreateOrUpdatePoller.Done` has been removed -- Function `*WebAppsListSlotsPager.NextPage` has been removed -- Function `StaticSiteZipDeploymentARMResource.MarshalJSON` has been removed -- Function `*WebAppsListConfigurationSnapshotInfoPager.PageResponse` has been removed -- Function `*ResourceHealthMetadataListPager.Err` has been removed -- Function `*AppServiceEnvironmentsClient.GetOutboundNetworkDependenciesEndpoints` has been removed -- Function `ProcessThreadInfo.MarshalJSON` has been removed -- Function `*WebAppsListInstanceProcessThreadsSlotPager.PageResponse` has been removed -- Function `*WebAppsListProcessModulesPager.NextPage` has been removed -- Function `AppServiceCertificateOrderPatchResourceProperties.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsListWorkerPoolSKUsPager.Err` has been removed -- Function `*WebAppsListSiteBackupsPager.PageResponse` has been removed -- Function `*WebAppsCreateOrUpdateSlotPoller.FinalResponse` has been removed -- Function `*WebAppsDeletePrivateEndpointConnectionSlotPoller.FinalResponse` has been removed -- Function `*WebAppsGetPrivateEndpointConnectionListPager.Err` has been removed -- Function `*WebAppsListWebJobsPager.Err` has been removed -- Function `*DiagnosticsListSiteDetectorsSlotPager.Err` has been removed -- Function `*WebAppsListWebJobsSlotPager.Err` has been removed -- Function `*KubeEnvironmentsDeletePollerResponse.Resume` has been removed -- Function `*StaticSitesDeletePrivateEndpointConnectionPoller.ResumeToken` has been removed -- Function `Recommendation.MarshalJSON` has been removed -- Function `*KubeEnvironmentsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*WebAppsListContinuousWebJobsSlotPager.PageResponse` has been removed -- Function `*WebAppsInstallSiteExtensionPollerResponse.Resume` has been removed -- Function `*StaticSitesCreateZipDeploymentForStaticSiteBuildPoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsListAppServicePlansPager.Err` has been removed -- Function `*StaticSitesDeleteStaticSiteBuildPoller.Poll` has been removed -- Function `StaticSitesCreateZipDeploymentForStaticSitePollerResponse.PollUntilDone` has been removed -- Function `*AppServiceCertificateOrdersCreateOrUpdateCertificatePoller.Poll` has been removed -- Function `*WebAppsListContinuousWebJobsSlotPager.Err` has been removed -- Function `*AppServiceEnvironmentsListWorkerPoolInstanceMetricDefinitionsPager.Err` has been removed -- Function `*WebAppsStartNetworkTraceSlotPoller.ResumeToken` has been removed -- Function `*WebAppsListPublishingCredentialsSlotPoller.Poll` has been removed -- Function `*WebAppsCreateMSDeployOperationPollerResponse.Resume` has been removed -- Function `*WebAppsListBasicPublishingCredentialsPoliciesSlotPager.Err` has been removed -- Function `CertificateOrderAction.MarshalJSON` has been removed -- Function `*StaticSitesDetachStaticSitePollerResponse.Resume` has been removed -- Function `*CertificatesListByResourceGroupPager.PageResponse` has been removed -- Function `WebAppsListPublishingCredentialsSlotPollerResponse.PollUntilDone` has been removed -- Function `*DiagnosticsListSiteDetectorResponsesPager.Err` has been removed -- Function `*AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionPoller.Done` has been removed -- Function `*AppServicePlansClient.ListByResourceGroup` has been removed -- Function `*WebAppsListSlotDifferencesFromProductionPager.Err` has been removed -- Function `*WebAppsListInstanceProcessesPager.PageResponse` has been removed -- Function `*WebAppsApproveOrRejectPrivateEndpointConnectionSlotPoller.Done` has been removed -- Function `*WebAppsRestoreSlotPoller.Done` has been removed -- Function `*WebAppsCreateInstanceMSDeployOperationPoller.ResumeToken` has been removed -- Function `CertificatePatchResourceProperties.MarshalJSON` has been removed -- Function `StorageMigrationResponse.MarshalJSON` has been removed -- Function `*WebAppsListDomainOwnershipIdentifiersPager.PageResponse` has been removed -- Function `*WebAppsListUsagesPager.Err` has been removed -- Function `StaticSitesValidateCustomDomainCanBeAddedToStaticSitePollerResponse.PollUntilDone` has been removed -- Function `*StaticSitesListStaticSiteUsersPager.NextPage` has been removed -- Function `*WebAppsListPager.NextPage` has been removed -- Function `*WebAppsCreateInstanceMSDeployOperationSlotPoller.Poll` has been removed -- Function `*DeletedWebAppsListPager.PageResponse` has been removed -- Function `*WebAppsListTriggeredWebJobHistoryPager.NextPage` has been removed -- Function `*WebAppsStartNetworkTracePoller.ResumeToken` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdateMultiRolePoolPollerResponse.Resume` has been removed -- Function `*ProviderGetAvailableStacksOnPremPager.PageResponse` has been removed -- Function `*StaticSitesCreateOrUpdateStaticSitePoller.Poll` has been removed -- Function `*AppServicePlanProperties.UnmarshalJSON` has been removed -- Function `*StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsPager.PageResponse` has been removed -- Function `*WebAppsListSiteExtensionsSlotPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsClient.ListOperations` has been removed -- Function `*WebAppsListBackupsPager.Err` has been removed -- Function `*StaticSitesCreateZipDeploymentForStaticSitePollerResponse.Resume` has been removed -- Function `*WebAppsListProcessThreadsSlotPager.Err` has been removed -- Function `*TopLevelDomainsListAgreementsPager.NextPage` has been removed -- Function `AppServicePlanProperties.MarshalJSON` has been removed -- Function `AppServiceEnvironmentPatchResource.MarshalJSON` has been removed -- Function `TriggeredWebJob.MarshalJSON` has been removed -- Function `*AppServiceCertificateOrdersClient.Reissue` has been removed -- Function `*AppServiceEnvironmentsChangeVnetPager.PageResponse` has been removed -- Function `*WebAppsStartWebSiteNetworkTraceOperationSlotPoller.Done` has been removed -- Function `SlotConfigNamesResource.MarshalJSON` has been removed -- Function `*WebAppsListInstanceProcessModulesSlotPager.PageResponse` has been removed -- Function `*StaticSitesCreateOrUpdateStaticSiteCustomDomainPoller.Poll` has been removed -- Function `AddressResponse.MarshalJSON` has been removed -- Function `*WebAppsCreateMSDeployOperationPoller.ResumeToken` has been removed -- Function `*WebAppsDeletePrivateEndpointConnectionSlotPoller.Poll` has been removed -- Function `*WebAppsListSnapshotsFromDRSecondarySlotPager.NextPage` has been removed -- Function `*WebAppsGetSiteConnectionStringKeyVaultReferencesPager.NextPage` has been removed -- Function `StaticSiteBuildARMResource.MarshalJSON` has been removed -- Function `*ResourceHealthMetadataListByResourceGroupPager.NextPage` has been removed -- Function `*StaticSitesDeleteStaticSiteCustomDomainPoller.Poll` has been removed -- Function `*WebAppsListConfigurationSnapshotInfoSlotPager.PageResponse` has been removed -- Function `*StaticSitesDeleteStaticSiteBuildPollerResponse.Resume` has been removed -- Function `*RecommendationsListRecommendedRulesForWebAppPager.NextPage` has been removed -- Function `*WebAppsListHostNameBindingsSlotPager.NextPage` has been removed -- Function `*WebAppsListBasicPublishingCredentialsPoliciesSlotPager.NextPage` has been removed -- Function `*ProviderGetFunctionAppStacksForLocationPager.Err` has been removed -- Function `*AppServiceEnvironmentsClient.UpdateWorkerPool` has been removed -- Function `WebAppsRestoreFromBackupBlobPollerResponse.PollUntilDone` has been removed -- Function `*AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsListWorkerPoolSKUsPager.PageResponse` has been removed -- Function `*RecommendationsListRecommendedRulesForWebAppPager.PageResponse` has been removed -- Function `AppServicePlansCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*StaticSitesDeleteStaticSiteCustomDomainPollerResponse.Resume` has been removed -- Function `*WebAppsCreateInstanceMSDeployOperationPoller.Done` has been removed -- Function `*KubeEnvironmentsListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsDeletePrivateEndpointConnectionSlotPoller.Done` has been removed -- Function `*WebAppsListInstanceProcessThreadsSlotPager.NextPage` has been removed -- Function `*KubeEnvironmentsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*WebAppsListPublicCertificatesPager.NextPage` has been removed -- Function `*WebAppsRestorePoller.Poll` has been removed -- Function `*AppServiceEnvironmentsChangeVnetPoller.ResumeToken` has been removed -- Function `*WebAppsMigrateMySQLPollerResponse.Resume` has been removed -- Function `*WebAppsCreateInstanceMSDeployOperationSlotPoller.Done` has been removed -- Function `*AppServiceEnvironmentsClient.BeginSuspend` has been removed -- Function `*AppServiceCertificateOrdersClient.List` has been removed -- Function `*WebAppsCreateOrUpdateSourceControlSlotPoller.Done` has been removed -- Function `*AppServiceEnvironmentsClient.BeginCreateOrUpdateWorkerPool` has been removed -- Function `StaticSitesWorkflowPreviewRequest.MarshalJSON` has been removed -- Function `*WebAppsRestoreSnapshotPoller.Done` has been removed -- Function `*WebAppsListProcessModulesPager.PageResponse` has been removed -- Function `NetworkFeatures.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdateMultiRolePoolPoller.ResumeToken` has been removed -- Function `*DiagnosticsListSiteAnalysesSlotPager.NextPage` has been removed -- Function `*AppServiceCertificateOrdersCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*WebAppsStartNetworkTraceSlotPoller.Done` has been removed -- Function `StaticSitesDetachStaticSitePollerResponse.PollUntilDone` has been removed -- Function `PossibleProviderOsTypeSelectedValues` has been removed -- Function `PrivateAccess.MarshalJSON` has been removed -- Function `*DiagnosticsListSiteDetectorsPager.NextPage` has been removed -- Function `*DomainsListRecommendationsPager.Err` has been removed -- Function `*WebAppsSwapSlotPoller.Poll` has been removed -- Function `*WebAppsListPublicCertificatesPager.PageResponse` has been removed -- Function `CustomHostnameAnalysisResult.MarshalJSON` has been removed -- Function `*AppServicePlansClient.DeleteVnetRoute` has been removed -- Function `*ResourceHealthMetadataListBySiteSlotPager.PageResponse` has been removed -- Function `*RecommendationsListPager.PageResponse` has been removed -- Function `*KubeEnvironmentsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsDeletePoller.Poll` has been removed -- Function `*WebAppsRestoreFromDeletedAppPoller.Poll` has been removed -- Function `*WebAppsListBasicPublishingCredentialsPoliciesPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsListMultiRolePoolInstanceMetricDefinitionsPager.NextPage` has been removed -- Function `*DiagnosticsListSiteDetectorResponsesSlotPager.NextPage` has been removed -- Function `*DomainRegistrationProviderListOperationsPager.NextPage` has been removed -- Function `*WebAppsListHostNameBindingsPager.NextPage` has been removed -- Function `*TopLevelDomainsListPager.PageResponse` has been removed -- Function `HybridConnectionKey.MarshalJSON` has been removed -- Function `*WebAppsListInstanceProcessModulesSlotPager.Err` has been removed -- Function `*WebAppsRestoreFromDeletedAppPoller.FinalResponse` has been removed -- Function `DiagnosticAnalysis.MarshalJSON` has been removed -- Function `PremierAddOnOffer.MarshalJSON` has been removed -- Function `*WebAppsInstallSiteExtensionSlotPoller.Done` has been removed -- Function `*StaticSitesRegisterUserProvidedFunctionAppWithStaticSitePoller.Done` has been removed -- Function `DiagnosticDetectorResponse.MarshalJSON` has been removed -- Function `MigrateMySQLStatus.MarshalJSON` has been removed -- Function `*AppServiceEnvironmentsClient.ListWebApps` has been removed -- Function `*WebAppsCreateOrUpdatePoller.Poll` has been removed -- Function `CsmPublishingCredentialsPoliciesEntity.MarshalJSON` has been removed -- Function `*WebAppsCreateOrUpdateSourceControlSlotPoller.Poll` has been removed -- Function `*AppServiceCertificateOrdersCreateOrUpdateCertificatePoller.ResumeToken` has been removed -- Function `WebAppsApproveOrRejectPrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed -- Function `*ProviderListOperationsPager.NextPage` has been removed -- Function `*DomainsListPager.PageResponse` has been removed -- Function `*WebAppsListInstanceProcessesSlotPager.NextPage` has been removed -- Function `*WebAppsDeletePrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionPollerResponse.Resume` has been removed -- Function `*StaticSitesCreateZipDeploymentForStaticSitePoller.ResumeToken` has been removed -- Function `*WebAppsListFunctionsPager.Err` has been removed -- Function `*StaticSitesListPager.NextPage` has been removed -- Function `*KubeEnvironmentsListBySubscriptionPager.PageResponse` has been removed -- Function `*WebAppsListProcessModulesSlotPager.NextPage` has been removed -- Function `*WebAppsListPerfMonCountersPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsListCapacitiesPager.Err` has been removed -- Function `StaticSiteResetPropertiesARMResource.MarshalJSON` has been removed -- Function `*WebAppsCreateMSDeployOperationSlotPoller.ResumeToken` has been removed -- Function `*AppServiceEnvironmentsCreateOrUpdatePoller.Poll` has been removed -- Function `*ProviderGetAvailableStacksPager.Err` has been removed -- Function `*AppServiceEnvironmentsListMultiRoleMetricDefinitionsPager.NextPage` has been removed -- Function `*AppServiceEnvironmentsChangeVnetPoller.Poll` has been removed -- Function `*AppServiceEnvironmentsClient.BeginResume` has been removed -- Function `*KubeEnvironmentsDeletePoller.FinalResponse` has been removed -- Function `*WebAppsListTriggeredWebJobsPager.Err` has been removed -- Function `*AppServicePlansCreateOrUpdatePoller.Done` has been removed -- Function `*AppServiceEnvironmentsClient.GetMultiRolePool` has been removed -- Function `*AppServiceEnvironmentsResumePoller.ResumeToken` has been removed -- Function `*StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildPager.NextPage` has been removed -- Function `AppServiceCertificateOrdersCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*WebAppsListDeploymentsSlotPager.PageResponse` has been removed -- Function `*DiagnosticsListSiteAnalysesSlotPager.Err` has been removed -- Function `TopLevelDomain.MarshalJSON` has been removed -- Function `*WebAppsStartNetworkTraceSlotPollerResponse.Resume` has been removed -- Function `*WebAppsListProcessesSlotPager.NextPage` has been removed -- Function `*AppServicePlansClient.ListCapabilities` has been removed -- Function `*WebAppsApproveOrRejectPrivateEndpointConnectionSlotPollerResponse.Resume` has been removed -- Function `*StaticSitesDeletePrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `*AppServiceEnvironmentsListByResourceGroupPager.NextPage` has been removed -- Function `*WebAppsListProcessModulesPager.Err` has been removed -- Function `*WebAppsDeletePrivateEndpointConnectionPoller.FinalResponse` has been removed -- Function `WebAppStack.MarshalJSON` has been removed -- Function `*WebAppsListProcessThreadsPager.PageResponse` has been removed -- Function `*CertificateRegistrationProviderListOperationsPager.PageResponse` has been removed -- Struct `AppServiceCertificate` has been removed -- Struct `AppServiceCertificateCollection` has been removed -- Struct `AppServiceCertificateOrder` has been removed -- Struct `AppServiceCertificateOrderCollection` has been removed -- Struct `AppServiceCertificateOrderPatchResource` has been removed -- Struct `AppServiceCertificateOrderPatchResourceProperties` has been removed -- Struct `AppServiceCertificateOrderProperties` has been removed -- Struct `AppServiceCertificateOrdersBeginCreateOrUpdateCertificateOptions` has been removed -- Struct `AppServiceCertificateOrdersBeginCreateOrUpdateOptions` has been removed -- Struct `AppServiceCertificateOrdersClient` has been removed -- Struct `AppServiceCertificateOrdersCreateOrUpdateCertificatePoller` has been removed -- Struct `AppServiceCertificateOrdersCreateOrUpdateCertificatePollerResponse` has been removed -- Struct `AppServiceCertificateOrdersCreateOrUpdateCertificateResponse` has been removed -- Struct `AppServiceCertificateOrdersCreateOrUpdateCertificateResult` has been removed -- Struct `AppServiceCertificateOrdersCreateOrUpdatePoller` has been removed -- Struct `AppServiceCertificateOrdersCreateOrUpdatePollerResponse` has been removed -- Struct `AppServiceCertificateOrdersCreateOrUpdateResponse` has been removed -- Struct `AppServiceCertificateOrdersCreateOrUpdateResult` has been removed -- Struct `AppServiceCertificateOrdersDeleteCertificateOptions` has been removed -- Struct `AppServiceCertificateOrdersDeleteCertificateResponse` has been removed -- Struct `AppServiceCertificateOrdersDeleteOptions` has been removed -- Struct `AppServiceCertificateOrdersDeleteResponse` has been removed -- Struct `AppServiceCertificateOrdersGetCertificateOptions` has been removed -- Struct `AppServiceCertificateOrdersGetCertificateResponse` has been removed -- Struct `AppServiceCertificateOrdersGetCertificateResult` has been removed -- Struct `AppServiceCertificateOrdersGetOptions` has been removed -- Struct `AppServiceCertificateOrdersGetResponse` has been removed -- Struct `AppServiceCertificateOrdersGetResult` has been removed -- Struct `AppServiceCertificateOrdersListByResourceGroupOptions` has been removed -- Struct `AppServiceCertificateOrdersListByResourceGroupPager` has been removed -- Struct `AppServiceCertificateOrdersListByResourceGroupResponse` has been removed -- Struct `AppServiceCertificateOrdersListByResourceGroupResult` has been removed -- Struct `AppServiceCertificateOrdersListCertificatesOptions` has been removed -- Struct `AppServiceCertificateOrdersListCertificatesPager` has been removed -- Struct `AppServiceCertificateOrdersListCertificatesResponse` has been removed -- Struct `AppServiceCertificateOrdersListCertificatesResult` has been removed -- Struct `AppServiceCertificateOrdersListOptions` has been removed -- Struct `AppServiceCertificateOrdersListPager` has been removed -- Struct `AppServiceCertificateOrdersListResponse` has been removed -- Struct `AppServiceCertificateOrdersListResult` has been removed -- Struct `AppServiceCertificateOrdersReissueOptions` has been removed -- Struct `AppServiceCertificateOrdersReissueResponse` has been removed -- Struct `AppServiceCertificateOrdersRenewOptions` has been removed -- Struct `AppServiceCertificateOrdersRenewResponse` has been removed -- Struct `AppServiceCertificateOrdersResendEmailOptions` has been removed -- Struct `AppServiceCertificateOrdersResendEmailResponse` has been removed -- Struct `AppServiceCertificateOrdersResendRequestEmailsOptions` has been removed -- Struct `AppServiceCertificateOrdersResendRequestEmailsResponse` has been removed -- Struct `AppServiceCertificateOrdersRetrieveCertificateActionsOptions` has been removed -- Struct `AppServiceCertificateOrdersRetrieveCertificateActionsResponse` has been removed -- Struct `AppServiceCertificateOrdersRetrieveCertificateActionsResult` has been removed -- Struct `AppServiceCertificateOrdersRetrieveCertificateEmailHistoryOptions` has been removed -- Struct `AppServiceCertificateOrdersRetrieveCertificateEmailHistoryResponse` has been removed -- Struct `AppServiceCertificateOrdersRetrieveCertificateEmailHistoryResult` has been removed -- Struct `AppServiceCertificateOrdersRetrieveSiteSealOptions` has been removed -- Struct `AppServiceCertificateOrdersRetrieveSiteSealResponse` has been removed -- Struct `AppServiceCertificateOrdersRetrieveSiteSealResult` has been removed -- Struct `AppServiceCertificateOrdersUpdateCertificateOptions` has been removed -- Struct `AppServiceCertificateOrdersUpdateCertificateResponse` has been removed -- Struct `AppServiceCertificateOrdersUpdateCertificateResult` has been removed -- Struct `AppServiceCertificateOrdersUpdateOptions` has been removed -- Struct `AppServiceCertificateOrdersUpdateResponse` has been removed -- Struct `AppServiceCertificateOrdersUpdateResult` has been removed -- Struct `AppServiceCertificateOrdersValidatePurchaseInformationOptions` has been removed -- Struct `AppServiceCertificateOrdersValidatePurchaseInformationResponse` has been removed -- Struct `AppServiceCertificateOrdersVerifyDomainOwnershipOptions` has been removed -- Struct `AppServiceCertificateOrdersVerifyDomainOwnershipResponse` has been removed -- Struct `AppServiceCertificatePatchResource` has been removed -- Struct `AppServiceCertificateResource` has been removed -- Struct `AppServiceEnvironment` has been removed -- Struct `AppServiceEnvironmentCollection` has been removed -- Struct `AppServiceEnvironmentPatchResource` has been removed -- Struct `AppServiceEnvironmentResource` has been removed -- Struct `AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionPoller` has been removed -- Struct `AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionPollerResponse` has been removed -- Struct `AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionResponse` has been removed -- Struct `AppServiceEnvironmentsApproveOrRejectPrivateEndpointConnectionResult` has been removed -- Struct `AppServiceEnvironmentsBeginApproveOrRejectPrivateEndpointConnectionOptions` has been removed -- Struct `AppServiceEnvironmentsBeginChangeVnetOptions` has been removed -- Struct `AppServiceEnvironmentsBeginCreateOrUpdateMultiRolePoolOptions` has been removed -- Struct `AppServiceEnvironmentsBeginCreateOrUpdateOptions` has been removed -- Struct `AppServiceEnvironmentsBeginCreateOrUpdateWorkerPoolOptions` has been removed -- Struct `AppServiceEnvironmentsBeginDeleteOptions` has been removed -- Struct `AppServiceEnvironmentsBeginDeletePrivateEndpointConnectionOptions` has been removed -- Struct `AppServiceEnvironmentsBeginResumeOptions` has been removed -- Struct `AppServiceEnvironmentsBeginSuspendOptions` has been removed -- Struct `AppServiceEnvironmentsChangeVnetPager` has been removed -- Struct `AppServiceEnvironmentsChangeVnetPoller` has been removed -- Struct `AppServiceEnvironmentsChangeVnetPollerResponse` has been removed -- Struct `AppServiceEnvironmentsChangeVnetResponse` has been removed -- Struct `AppServiceEnvironmentsChangeVnetResult` has been removed -- Struct `AppServiceEnvironmentsClient` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdateMultiRolePoolPoller` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdateMultiRolePoolPollerResponse` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdateMultiRolePoolResponse` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdateMultiRolePoolResult` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdatePoller` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdatePollerResponse` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdateResponse` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdateResult` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdateWorkerPoolPoller` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdateWorkerPoolPollerResponse` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdateWorkerPoolResponse` has been removed -- Struct `AppServiceEnvironmentsCreateOrUpdateWorkerPoolResult` has been removed -- Struct `AppServiceEnvironmentsDeletePoller` has been removed -- Struct `AppServiceEnvironmentsDeletePollerResponse` has been removed -- Struct `AppServiceEnvironmentsDeletePrivateEndpointConnectionPoller` has been removed -- Struct `AppServiceEnvironmentsDeletePrivateEndpointConnectionPollerResponse` has been removed -- Struct `AppServiceEnvironmentsDeletePrivateEndpointConnectionResponse` has been removed -- Struct `AppServiceEnvironmentsDeletePrivateEndpointConnectionResult` has been removed -- Struct `AppServiceEnvironmentsDeleteResponse` has been removed -- Struct `AppServiceEnvironmentsGetAseV3NetworkingConfigurationOptions` has been removed -- Struct `AppServiceEnvironmentsGetAseV3NetworkingConfigurationResponse` has been removed -- Struct `AppServiceEnvironmentsGetAseV3NetworkingConfigurationResult` has been removed -- Struct `AppServiceEnvironmentsGetDiagnosticsItemOptions` has been removed -- Struct `AppServiceEnvironmentsGetDiagnosticsItemResponse` has been removed -- Struct `AppServiceEnvironmentsGetDiagnosticsItemResult` has been removed -- Struct `AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsOptions` has been removed -- Struct `AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsPager` has been removed -- Struct `AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsResponse` has been removed -- Struct `AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsResult` has been removed -- Struct `AppServiceEnvironmentsGetMultiRolePoolOptions` has been removed -- Struct `AppServiceEnvironmentsGetMultiRolePoolResponse` has been removed -- Struct `AppServiceEnvironmentsGetMultiRolePoolResult` has been removed -- Struct `AppServiceEnvironmentsGetOptions` has been removed -- Struct `AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsOptions` has been removed -- Struct `AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsPager` has been removed -- Struct `AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsResponse` has been removed -- Struct `AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsResult` has been removed -- Struct `AppServiceEnvironmentsGetPrivateEndpointConnectionListOptions` has been removed -- Struct `AppServiceEnvironmentsGetPrivateEndpointConnectionListPager` has been removed -- Struct `AppServiceEnvironmentsGetPrivateEndpointConnectionListResponse` has been removed -- Struct `AppServiceEnvironmentsGetPrivateEndpointConnectionListResult` has been removed -- Struct `AppServiceEnvironmentsGetPrivateEndpointConnectionOptions` has been removed -- Struct `AppServiceEnvironmentsGetPrivateEndpointConnectionResponse` has been removed -- Struct `AppServiceEnvironmentsGetPrivateEndpointConnectionResult` has been removed -- Struct `AppServiceEnvironmentsGetPrivateLinkResourcesOptions` has been removed -- Struct `AppServiceEnvironmentsGetPrivateLinkResourcesResponse` has been removed -- Struct `AppServiceEnvironmentsGetPrivateLinkResourcesResult` has been removed -- Struct `AppServiceEnvironmentsGetResponse` has been removed -- Struct `AppServiceEnvironmentsGetResult` has been removed -- Struct `AppServiceEnvironmentsGetVipInfoOptions` has been removed -- Struct `AppServiceEnvironmentsGetVipInfoResponse` has been removed -- Struct `AppServiceEnvironmentsGetVipInfoResult` has been removed -- Struct `AppServiceEnvironmentsGetWorkerPoolOptions` has been removed -- Struct `AppServiceEnvironmentsGetWorkerPoolResponse` has been removed -- Struct `AppServiceEnvironmentsGetWorkerPoolResult` has been removed -- Struct `AppServiceEnvironmentsListAppServicePlansOptions` has been removed -- Struct `AppServiceEnvironmentsListAppServicePlansPager` has been removed -- Struct `AppServiceEnvironmentsListAppServicePlansResponse` has been removed -- Struct `AppServiceEnvironmentsListAppServicePlansResult` has been removed -- Struct `AppServiceEnvironmentsListByResourceGroupOptions` has been removed -- Struct `AppServiceEnvironmentsListByResourceGroupPager` has been removed -- Struct `AppServiceEnvironmentsListByResourceGroupResponse` has been removed -- Struct `AppServiceEnvironmentsListByResourceGroupResult` has been removed -- Struct `AppServiceEnvironmentsListCapacitiesOptions` has been removed -- Struct `AppServiceEnvironmentsListCapacitiesPager` has been removed -- Struct `AppServiceEnvironmentsListCapacitiesResponse` has been removed -- Struct `AppServiceEnvironmentsListCapacitiesResult` has been removed -- Struct `AppServiceEnvironmentsListDiagnosticsOptions` has been removed -- Struct `AppServiceEnvironmentsListDiagnosticsResponse` has been removed -- Struct `AppServiceEnvironmentsListDiagnosticsResult` has been removed -- Struct `AppServiceEnvironmentsListMultiRoleMetricDefinitionsOptions` has been removed -- Struct `AppServiceEnvironmentsListMultiRoleMetricDefinitionsPager` has been removed -- Struct `AppServiceEnvironmentsListMultiRoleMetricDefinitionsResponse` has been removed -- Struct `AppServiceEnvironmentsListMultiRoleMetricDefinitionsResult` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolInstanceMetricDefinitionsOptions` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolInstanceMetricDefinitionsPager` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolInstanceMetricDefinitionsResponse` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolInstanceMetricDefinitionsResult` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolSKUsOptions` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolSKUsPager` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolSKUsResponse` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolSKUsResult` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolsOptions` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolsPager` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolsResponse` has been removed -- Struct `AppServiceEnvironmentsListMultiRolePoolsResult` has been removed -- Struct `AppServiceEnvironmentsListMultiRoleUsagesOptions` has been removed -- Struct `AppServiceEnvironmentsListMultiRoleUsagesPager` has been removed -- Struct `AppServiceEnvironmentsListMultiRoleUsagesResponse` has been removed -- Struct `AppServiceEnvironmentsListMultiRoleUsagesResult` has been removed -- Struct `AppServiceEnvironmentsListOperationsOptions` has been removed -- Struct `AppServiceEnvironmentsListOperationsResponse` has been removed -- Struct `AppServiceEnvironmentsListOperationsResult` has been removed -- Struct `AppServiceEnvironmentsListOptions` has been removed -- Struct `AppServiceEnvironmentsListPager` has been removed -- Struct `AppServiceEnvironmentsListResponse` has been removed -- Struct `AppServiceEnvironmentsListResult` has been removed -- Struct `AppServiceEnvironmentsListUsagesOptions` has been removed -- Struct `AppServiceEnvironmentsListUsagesPager` has been removed -- Struct `AppServiceEnvironmentsListUsagesResponse` has been removed -- Struct `AppServiceEnvironmentsListUsagesResult` has been removed -- Struct `AppServiceEnvironmentsListWebAppsOptions` has been removed -- Struct `AppServiceEnvironmentsListWebAppsPager` has been removed -- Struct `AppServiceEnvironmentsListWebAppsResponse` has been removed -- Struct `AppServiceEnvironmentsListWebAppsResult` has been removed -- Struct `AppServiceEnvironmentsListWebWorkerMetricDefinitionsOptions` has been removed -- Struct `AppServiceEnvironmentsListWebWorkerMetricDefinitionsPager` has been removed -- Struct `AppServiceEnvironmentsListWebWorkerMetricDefinitionsResponse` has been removed -- Struct `AppServiceEnvironmentsListWebWorkerMetricDefinitionsResult` has been removed -- Struct `AppServiceEnvironmentsListWebWorkerUsagesOptions` has been removed -- Struct `AppServiceEnvironmentsListWebWorkerUsagesPager` has been removed -- Struct `AppServiceEnvironmentsListWebWorkerUsagesResponse` has been removed -- Struct `AppServiceEnvironmentsListWebWorkerUsagesResult` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolInstanceMetricDefinitionsOptions` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolInstanceMetricDefinitionsPager` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolInstanceMetricDefinitionsResponse` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolInstanceMetricDefinitionsResult` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolSKUsOptions` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolSKUsPager` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolSKUsResponse` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolSKUsResult` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolsOptions` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolsPager` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolsResponse` has been removed -- Struct `AppServiceEnvironmentsListWorkerPoolsResult` has been removed -- Struct `AppServiceEnvironmentsRebootOptions` has been removed -- Struct `AppServiceEnvironmentsRebootResponse` has been removed -- Struct `AppServiceEnvironmentsResumePager` has been removed -- Struct `AppServiceEnvironmentsResumePoller` has been removed -- Struct `AppServiceEnvironmentsResumePollerResponse` has been removed -- Struct `AppServiceEnvironmentsResumeResponse` has been removed -- Struct `AppServiceEnvironmentsResumeResult` has been removed -- Struct `AppServiceEnvironmentsSuspendPager` has been removed -- Struct `AppServiceEnvironmentsSuspendPoller` has been removed -- Struct `AppServiceEnvironmentsSuspendPollerResponse` has been removed -- Struct `AppServiceEnvironmentsSuspendResponse` has been removed -- Struct `AppServiceEnvironmentsSuspendResult` has been removed -- Struct `AppServiceEnvironmentsUpdateAseNetworkingConfigurationOptions` has been removed -- Struct `AppServiceEnvironmentsUpdateAseNetworkingConfigurationResponse` has been removed -- Struct `AppServiceEnvironmentsUpdateAseNetworkingConfigurationResult` has been removed -- Struct `AppServiceEnvironmentsUpdateMultiRolePoolOptions` has been removed -- Struct `AppServiceEnvironmentsUpdateMultiRolePoolResponse` has been removed -- Struct `AppServiceEnvironmentsUpdateMultiRolePoolResult` has been removed -- Struct `AppServiceEnvironmentsUpdateOptions` has been removed -- Struct `AppServiceEnvironmentsUpdateResponse` has been removed -- Struct `AppServiceEnvironmentsUpdateResult` has been removed -- Struct `AppServiceEnvironmentsUpdateWorkerPoolOptions` has been removed -- Struct `AppServiceEnvironmentsUpdateWorkerPoolResponse` has been removed -- Struct `AppServiceEnvironmentsUpdateWorkerPoolResult` has been removed -- Struct `AppServicePlan` has been removed -- Struct `AppServicePlanCollection` has been removed -- Struct `AppServicePlanPatchResource` has been removed -- Struct `AppServicePlanPatchResourceProperties` has been removed -- Struct `AppServicePlanProperties` has been removed -- Struct `AppServicePlansBeginCreateOrUpdateOptions` has been removed -- Struct `AppServicePlansClient` has been removed -- Struct `AppServicePlansCreateOrUpdatePoller` has been removed -- Struct `AppServicePlansCreateOrUpdatePollerResponse` has been removed -- Struct `AppServicePlansCreateOrUpdateResponse` has been removed -- Struct `AppServicePlansCreateOrUpdateResult` has been removed -- Struct `AppServicePlansCreateOrUpdateVnetRouteOptions` has been removed -- Struct `AppServicePlansCreateOrUpdateVnetRouteResponse` has been removed -- Struct `AppServicePlansCreateOrUpdateVnetRouteResult` has been removed -- Struct `AppServicePlansDeleteHybridConnectionOptions` has been removed -- Struct `AppServicePlansDeleteHybridConnectionResponse` has been removed -- Struct `AppServicePlansDeleteOptions` has been removed -- Struct `AppServicePlansDeleteResponse` has been removed -- Struct `AppServicePlansDeleteVnetRouteOptions` has been removed -- Struct `AppServicePlansDeleteVnetRouteResponse` has been removed -- Struct `AppServicePlansGetHybridConnectionOptions` has been removed -- Struct `AppServicePlansGetHybridConnectionPlanLimitOptions` has been removed -- Struct `AppServicePlansGetHybridConnectionPlanLimitResponse` has been removed -- Struct `AppServicePlansGetHybridConnectionPlanLimitResult` has been removed -- Struct `AppServicePlansGetHybridConnectionResponse` has been removed -- Struct `AppServicePlansGetHybridConnectionResult` has been removed -- Struct `AppServicePlansGetOptions` has been removed -- Struct `AppServicePlansGetResponse` has been removed -- Struct `AppServicePlansGetResult` has been removed -- Struct `AppServicePlansGetRouteForVnetOptions` has been removed -- Struct `AppServicePlansGetRouteForVnetResponse` has been removed -- Struct `AppServicePlansGetRouteForVnetResult` has been removed -- Struct `AppServicePlansGetServerFarmSKUsOptions` has been removed -- Struct `AppServicePlansGetServerFarmSKUsResponse` has been removed -- Struct `AppServicePlansGetServerFarmSKUsResult` has been removed -- Struct `AppServicePlansGetVnetFromServerFarmOptions` has been removed -- Struct `AppServicePlansGetVnetFromServerFarmResponse` has been removed -- Struct `AppServicePlansGetVnetFromServerFarmResult` has been removed -- Struct `AppServicePlansGetVnetGatewayOptions` has been removed -- Struct `AppServicePlansGetVnetGatewayResponse` has been removed -- Struct `AppServicePlansGetVnetGatewayResult` has been removed -- Struct `AppServicePlansListByResourceGroupOptions` has been removed -- Struct `AppServicePlansListByResourceGroupPager` has been removed -- Struct `AppServicePlansListByResourceGroupResponse` has been removed -- Struct `AppServicePlansListByResourceGroupResult` has been removed -- Struct `AppServicePlansListCapabilitiesOptions` has been removed -- Struct `AppServicePlansListCapabilitiesResponse` has been removed -- Struct `AppServicePlansListCapabilitiesResult` has been removed -- Struct `AppServicePlansListHybridConnectionKeysOptions` has been removed -- Struct `AppServicePlansListHybridConnectionKeysResponse` has been removed -- Struct `AppServicePlansListHybridConnectionKeysResult` has been removed -- Struct `AppServicePlansListHybridConnectionsOptions` has been removed -- Struct `AppServicePlansListHybridConnectionsPager` has been removed -- Struct `AppServicePlansListHybridConnectionsResponse` has been removed -- Struct `AppServicePlansListHybridConnectionsResult` has been removed -- Struct `AppServicePlansListOptions` has been removed -- Struct `AppServicePlansListPager` has been removed -- Struct `AppServicePlansListResponse` has been removed -- Struct `AppServicePlansListResult` has been removed -- Struct `AppServicePlansListRoutesForVnetOptions` has been removed -- Struct `AppServicePlansListRoutesForVnetResponse` has been removed -- Struct `AppServicePlansListRoutesForVnetResult` has been removed -- Struct `AppServicePlansListUsagesOptions` has been removed -- Struct `AppServicePlansListUsagesPager` has been removed -- Struct `AppServicePlansListUsagesResponse` has been removed -- Struct `AppServicePlansListUsagesResult` has been removed -- Struct `AppServicePlansListVnetsOptions` has been removed -- Struct `AppServicePlansListVnetsResponse` has been removed -- Struct `AppServicePlansListVnetsResult` has been removed -- Struct `AppServicePlansListWebAppsByHybridConnectionOptions` has been removed -- Struct `AppServicePlansListWebAppsByHybridConnectionPager` has been removed -- Struct `AppServicePlansListWebAppsByHybridConnectionResponse` has been removed -- Struct `AppServicePlansListWebAppsByHybridConnectionResult` has been removed -- Struct `AppServicePlansListWebAppsOptions` has been removed -- Struct `AppServicePlansListWebAppsPager` has been removed -- Struct `AppServicePlansListWebAppsResponse` has been removed -- Struct `AppServicePlansListWebAppsResult` has been removed -- Struct `AppServicePlansRebootWorkerOptions` has been removed -- Struct `AppServicePlansRebootWorkerResponse` has been removed -- Struct `AppServicePlansRestartWebAppsOptions` has been removed -- Struct `AppServicePlansRestartWebAppsResponse` has been removed -- Struct `AppServicePlansUpdateOptions` has been removed -- Struct `AppServicePlansUpdateResponse` has been removed -- Struct `AppServicePlansUpdateResult` has been removed -- Struct `AppServicePlansUpdateVnetGatewayOptions` has been removed -- Struct `AppServicePlansUpdateVnetGatewayResponse` has been removed -- Struct `AppServicePlansUpdateVnetGatewayResult` has been removed -- Struct `AppServicePlansUpdateVnetRouteOptions` has been removed -- Struct `AppServicePlansUpdateVnetRouteResponse` has been removed -- Struct `AppServicePlansUpdateVnetRouteResult` has been removed -- Struct `AppserviceGithubToken` has been removed -- Struct `AppserviceGithubTokenRequest` has been removed -- Struct `CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseOptions` has been removed -- Struct `CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseResponse` has been removed -- Struct `CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseResult` has been removed -- Struct `CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseOptions` has been removed -- Struct `CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponsePager` has been removed -- Struct `CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseResponse` has been removed -- Struct `CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseResult` has been removed -- Struct `CertificatePatchResourceProperties` has been removed -- Struct `CertificateProperties` has been removed -- Struct `CertificateRegistrationProviderListOperationsOptions` has been removed -- Struct `CertificateRegistrationProviderListOperationsPager` has been removed -- Struct `CertificateRegistrationProviderListOperationsResponse` has been removed -- Struct `CertificateRegistrationProviderListOperationsResult` has been removed -- Struct `CertificatesCreateOrUpdateOptions` has been removed -- Struct `CertificatesCreateOrUpdateResponse` has been removed -- Struct `CertificatesCreateOrUpdateResult` has been removed -- Struct `CertificatesDeleteOptions` has been removed -- Struct `CertificatesDeleteResponse` has been removed -- Struct `CertificatesGetOptions` has been removed -- Struct `CertificatesGetResponse` has been removed -- Struct `CertificatesGetResult` has been removed -- Struct `CertificatesListByResourceGroupOptions` has been removed -- Struct `CertificatesListByResourceGroupPager` has been removed -- Struct `CertificatesListByResourceGroupResponse` has been removed -- Struct `CertificatesListByResourceGroupResult` has been removed -- Struct `CertificatesListOptions` has been removed -- Struct `CertificatesListPager` has been removed -- Struct `CertificatesListResponse` has been removed -- Struct `CertificatesListResult` has been removed -- Struct `CertificatesUpdateOptions` has been removed -- Struct `CertificatesUpdateResponse` has been removed -- Struct `CertificatesUpdateResult` has been removed -- Struct `DefaultErrorResponse` has been removed -- Struct `DefaultErrorResponseError` has been removed -- Struct `DefaultErrorResponseErrorDetailsItem` has been removed -- Struct `DeletedWebAppsGetDeletedWebAppByLocationOptions` has been removed -- Struct `DeletedWebAppsGetDeletedWebAppByLocationResponse` has been removed -- Struct `DeletedWebAppsGetDeletedWebAppByLocationResult` has been removed -- Struct `DeletedWebAppsListByLocationOptions` has been removed -- Struct `DeletedWebAppsListByLocationPager` has been removed -- Struct `DeletedWebAppsListByLocationResponse` has been removed -- Struct `DeletedWebAppsListByLocationResult` has been removed -- Struct `DeletedWebAppsListOptions` has been removed -- Struct `DeletedWebAppsListPager` has been removed -- Struct `DeletedWebAppsListResponse` has been removed -- Struct `DeletedWebAppsListResult` has been removed -- Struct `DiagnosticsExecuteSiteAnalysisOptions` has been removed -- Struct `DiagnosticsExecuteSiteAnalysisResponse` has been removed -- Struct `DiagnosticsExecuteSiteAnalysisResult` has been removed -- Struct `DiagnosticsExecuteSiteAnalysisSlotOptions` has been removed -- Struct `DiagnosticsExecuteSiteAnalysisSlotResponse` has been removed -- Struct `DiagnosticsExecuteSiteAnalysisSlotResult` has been removed -- Struct `DiagnosticsExecuteSiteDetectorOptions` has been removed -- Struct `DiagnosticsExecuteSiteDetectorResponse` has been removed -- Struct `DiagnosticsExecuteSiteDetectorResult` has been removed -- Struct `DiagnosticsExecuteSiteDetectorSlotOptions` has been removed -- Struct `DiagnosticsExecuteSiteDetectorSlotResponse` has been removed -- Struct `DiagnosticsExecuteSiteDetectorSlotResult` has been removed -- Struct `DiagnosticsGetHostingEnvironmentDetectorResponseOptions` has been removed -- Struct `DiagnosticsGetHostingEnvironmentDetectorResponseResponse` has been removed -- Struct `DiagnosticsGetHostingEnvironmentDetectorResponseResult` has been removed -- Struct `DiagnosticsGetSiteAnalysisOptions` has been removed -- Struct `DiagnosticsGetSiteAnalysisResponse` has been removed -- Struct `DiagnosticsGetSiteAnalysisResult` has been removed -- Struct `DiagnosticsGetSiteAnalysisSlotOptions` has been removed -- Struct `DiagnosticsGetSiteAnalysisSlotResponse` has been removed -- Struct `DiagnosticsGetSiteAnalysisSlotResult` has been removed -- Struct `DiagnosticsGetSiteDetectorOptions` has been removed -- Struct `DiagnosticsGetSiteDetectorResponse` has been removed -- Struct `DiagnosticsGetSiteDetectorResponseOptions` has been removed -- Struct `DiagnosticsGetSiteDetectorResponseResponse` has been removed -- Struct `DiagnosticsGetSiteDetectorResponseResult` has been removed -- Struct `DiagnosticsGetSiteDetectorResponseSlotOptions` has been removed -- Struct `DiagnosticsGetSiteDetectorResponseSlotResponse` has been removed -- Struct `DiagnosticsGetSiteDetectorResponseSlotResult` has been removed -- Struct `DiagnosticsGetSiteDetectorResult` has been removed -- Struct `DiagnosticsGetSiteDetectorSlotOptions` has been removed -- Struct `DiagnosticsGetSiteDetectorSlotResponse` has been removed -- Struct `DiagnosticsGetSiteDetectorSlotResult` has been removed -- Struct `DiagnosticsGetSiteDiagnosticCategoryOptions` has been removed -- Struct `DiagnosticsGetSiteDiagnosticCategoryResponse` has been removed -- Struct `DiagnosticsGetSiteDiagnosticCategoryResult` has been removed -- Struct `DiagnosticsGetSiteDiagnosticCategorySlotOptions` has been removed -- Struct `DiagnosticsGetSiteDiagnosticCategorySlotResponse` has been removed -- Struct `DiagnosticsGetSiteDiagnosticCategorySlotResult` has been removed -- Struct `DiagnosticsListHostingEnvironmentDetectorResponsesOptions` has been removed -- Struct `DiagnosticsListHostingEnvironmentDetectorResponsesPager` has been removed -- Struct `DiagnosticsListHostingEnvironmentDetectorResponsesResponse` has been removed -- Struct `DiagnosticsListHostingEnvironmentDetectorResponsesResult` has been removed -- Struct `DiagnosticsListSiteAnalysesOptions` has been removed -- Struct `DiagnosticsListSiteAnalysesPager` has been removed -- Struct `DiagnosticsListSiteAnalysesResponse` has been removed -- Struct `DiagnosticsListSiteAnalysesResult` has been removed -- Struct `DiagnosticsListSiteAnalysesSlotOptions` has been removed -- Struct `DiagnosticsListSiteAnalysesSlotPager` has been removed -- Struct `DiagnosticsListSiteAnalysesSlotResponse` has been removed -- Struct `DiagnosticsListSiteAnalysesSlotResult` has been removed -- Struct `DiagnosticsListSiteDetectorResponsesOptions` has been removed -- Struct `DiagnosticsListSiteDetectorResponsesPager` has been removed -- Struct `DiagnosticsListSiteDetectorResponsesResponse` has been removed -- Struct `DiagnosticsListSiteDetectorResponsesResult` has been removed -- Struct `DiagnosticsListSiteDetectorResponsesSlotOptions` has been removed -- Struct `DiagnosticsListSiteDetectorResponsesSlotPager` has been removed -- Struct `DiagnosticsListSiteDetectorResponsesSlotResponse` has been removed -- Struct `DiagnosticsListSiteDetectorResponsesSlotResult` has been removed -- Struct `DiagnosticsListSiteDetectorsOptions` has been removed -- Struct `DiagnosticsListSiteDetectorsPager` has been removed -- Struct `DiagnosticsListSiteDetectorsResponse` has been removed -- Struct `DiagnosticsListSiteDetectorsResult` has been removed -- Struct `DiagnosticsListSiteDetectorsSlotOptions` has been removed -- Struct `DiagnosticsListSiteDetectorsSlotPager` has been removed -- Struct `DiagnosticsListSiteDetectorsSlotResponse` has been removed -- Struct `DiagnosticsListSiteDetectorsSlotResult` has been removed -- Struct `DiagnosticsListSiteDiagnosticCategoriesOptions` has been removed -- Struct `DiagnosticsListSiteDiagnosticCategoriesPager` has been removed -- Struct `DiagnosticsListSiteDiagnosticCategoriesResponse` has been removed -- Struct `DiagnosticsListSiteDiagnosticCategoriesResult` has been removed -- Struct `DiagnosticsListSiteDiagnosticCategoriesSlotOptions` has been removed -- Struct `DiagnosticsListSiteDiagnosticCategoriesSlotPager` has been removed -- Struct `DiagnosticsListSiteDiagnosticCategoriesSlotResponse` has been removed -- Struct `DiagnosticsListSiteDiagnosticCategoriesSlotResult` has been removed -- Struct `DomainRegistrationProviderListOperationsOptions` has been removed -- Struct `DomainRegistrationProviderListOperationsPager` has been removed -- Struct `DomainRegistrationProviderListOperationsResponse` has been removed -- Struct `DomainRegistrationProviderListOperationsResult` has been removed -- Struct `DomainsBeginCreateOrUpdateOptions` has been removed -- Struct `DomainsCheckAvailabilityOptions` has been removed -- Struct `DomainsCheckAvailabilityResponse` has been removed -- Struct `DomainsCheckAvailabilityResult` has been removed -- Struct `DomainsCreateOrUpdateOwnershipIdentifierOptions` has been removed -- Struct `DomainsCreateOrUpdateOwnershipIdentifierResponse` has been removed -- Struct `DomainsCreateOrUpdateOwnershipIdentifierResult` has been removed -- Struct `DomainsCreateOrUpdatePoller` has been removed -- Struct `DomainsCreateOrUpdatePollerResponse` has been removed -- Struct `DomainsCreateOrUpdateResponse` has been removed -- Struct `DomainsCreateOrUpdateResult` has been removed -- Struct `DomainsDeleteOptions` has been removed -- Struct `DomainsDeleteOwnershipIdentifierOptions` has been removed -- Struct `DomainsDeleteOwnershipIdentifierResponse` has been removed -- Struct `DomainsDeleteResponse` has been removed -- Struct `DomainsGetControlCenterSsoRequestOptions` has been removed -- Struct `DomainsGetControlCenterSsoRequestResponse` has been removed -- Struct `DomainsGetControlCenterSsoRequestResult` has been removed -- Struct `DomainsGetOptions` has been removed -- Struct `DomainsGetOwnershipIdentifierOptions` has been removed -- Struct `DomainsGetOwnershipIdentifierResponse` has been removed -- Struct `DomainsGetOwnershipIdentifierResult` has been removed -- Struct `DomainsGetResponse` has been removed -- Struct `DomainsGetResult` has been removed -- Struct `DomainsListByResourceGroupOptions` has been removed -- Struct `DomainsListByResourceGroupPager` has been removed -- Struct `DomainsListByResourceGroupResponse` has been removed -- Struct `DomainsListByResourceGroupResult` has been removed -- Struct `DomainsListOptions` has been removed -- Struct `DomainsListOwnershipIdentifiersOptions` has been removed -- Struct `DomainsListOwnershipIdentifiersPager` has been removed -- Struct `DomainsListOwnershipIdentifiersResponse` has been removed -- Struct `DomainsListOwnershipIdentifiersResult` has been removed -- Struct `DomainsListPager` has been removed -- Struct `DomainsListRecommendationsOptions` has been removed -- Struct `DomainsListRecommendationsPager` has been removed -- Struct `DomainsListRecommendationsResponse` has been removed -- Struct `DomainsListRecommendationsResult` has been removed -- Struct `DomainsListResponse` has been removed -- Struct `DomainsListResult` has been removed -- Struct `DomainsRenewOptions` has been removed -- Struct `DomainsRenewResponse` has been removed -- Struct `DomainsUpdateOptions` has been removed -- Struct `DomainsUpdateOwnershipIdentifierOptions` has been removed -- Struct `DomainsUpdateOwnershipIdentifierResponse` has been removed -- Struct `DomainsUpdateOwnershipIdentifierResult` has been removed -- Struct `DomainsUpdateResponse` has been removed -- Struct `DomainsUpdateResult` has been removed -- Struct `GlobalGetDeletedWebAppOptions` has been removed -- Struct `GlobalGetDeletedWebAppResponse` has been removed -- Struct `GlobalGetDeletedWebAppResult` has been removed -- Struct `GlobalGetDeletedWebAppSnapshotsOptions` has been removed -- Struct `GlobalGetDeletedWebAppSnapshotsResponse` has been removed -- Struct `GlobalGetDeletedWebAppSnapshotsResult` has been removed -- Struct `GlobalGetSubscriptionOperationWithAsyncResponseOptions` has been removed -- Struct `GlobalGetSubscriptionOperationWithAsyncResponseResponse` has been removed -- Struct `KubeEnvironmentsBeginCreateOrUpdateOptions` has been removed -- Struct `KubeEnvironmentsBeginDeleteOptions` has been removed -- Struct `KubeEnvironmentsCreateOrUpdatePoller` has been removed -- Struct `KubeEnvironmentsCreateOrUpdatePollerResponse` has been removed -- Struct `KubeEnvironmentsCreateOrUpdateResponse` has been removed -- Struct `KubeEnvironmentsCreateOrUpdateResult` has been removed -- Struct `KubeEnvironmentsDeletePoller` has been removed -- Struct `KubeEnvironmentsDeletePollerResponse` has been removed -- Struct `KubeEnvironmentsDeleteResponse` has been removed -- Struct `KubeEnvironmentsGetOptions` has been removed -- Struct `KubeEnvironmentsGetResponse` has been removed -- Struct `KubeEnvironmentsGetResult` has been removed -- Struct `KubeEnvironmentsListByResourceGroupOptions` has been removed -- Struct `KubeEnvironmentsListByResourceGroupPager` has been removed -- Struct `KubeEnvironmentsListByResourceGroupResponse` has been removed -- Struct `KubeEnvironmentsListByResourceGroupResult` has been removed -- Struct `KubeEnvironmentsListBySubscriptionOptions` has been removed -- Struct `KubeEnvironmentsListBySubscriptionPager` has been removed -- Struct `KubeEnvironmentsListBySubscriptionResponse` has been removed -- Struct `KubeEnvironmentsListBySubscriptionResult` has been removed -- Struct `KubeEnvironmentsUpdateOptions` has been removed -- Struct `KubeEnvironmentsUpdateResponse` has been removed -- Struct `KubeEnvironmentsUpdateResult` has been removed -- Struct `ProviderGetAvailableStacksOnPremOptions` has been removed -- Struct `ProviderGetAvailableStacksOnPremPager` has been removed -- Struct `ProviderGetAvailableStacksOnPremResponse` has been removed -- Struct `ProviderGetAvailableStacksOnPremResult` has been removed -- Struct `ProviderGetAvailableStacksOptions` has been removed -- Struct `ProviderGetAvailableStacksPager` has been removed -- Struct `ProviderGetAvailableStacksResponse` has been removed -- Struct `ProviderGetAvailableStacksResult` has been removed -- Struct `ProviderGetFunctionAppStacksForLocationOptions` has been removed -- Struct `ProviderGetFunctionAppStacksForLocationPager` has been removed -- Struct `ProviderGetFunctionAppStacksForLocationResponse` has been removed -- Struct `ProviderGetFunctionAppStacksForLocationResult` has been removed -- Struct `ProviderGetFunctionAppStacksOptions` has been removed -- Struct `ProviderGetFunctionAppStacksPager` has been removed -- Struct `ProviderGetFunctionAppStacksResponse` has been removed -- Struct `ProviderGetFunctionAppStacksResult` has been removed -- Struct `ProviderGetWebAppStacksForLocationOptions` has been removed -- Struct `ProviderGetWebAppStacksForLocationPager` has been removed -- Struct `ProviderGetWebAppStacksForLocationResponse` has been removed -- Struct `ProviderGetWebAppStacksForLocationResult` has been removed -- Struct `ProviderGetWebAppStacksOptions` has been removed -- Struct `ProviderGetWebAppStacksPager` has been removed -- Struct `ProviderGetWebAppStacksResponse` has been removed -- Struct `ProviderGetWebAppStacksResult` has been removed -- Struct `ProviderListOperationsOptions` has been removed -- Struct `ProviderListOperationsPager` has been removed -- Struct `ProviderListOperationsResponse` has been removed -- Struct `ProviderListOperationsResult` has been removed -- Struct `RecommendationsDisableAllForHostingEnvironmentOptions` has been removed -- Struct `RecommendationsDisableAllForHostingEnvironmentResponse` has been removed -- Struct `RecommendationsDisableAllForWebAppOptions` has been removed -- Struct `RecommendationsDisableAllForWebAppResponse` has been removed -- Struct `RecommendationsDisableRecommendationForHostingEnvironmentOptions` has been removed -- Struct `RecommendationsDisableRecommendationForHostingEnvironmentResponse` has been removed -- Struct `RecommendationsDisableRecommendationForSiteOptions` has been removed -- Struct `RecommendationsDisableRecommendationForSiteResponse` has been removed -- Struct `RecommendationsDisableRecommendationForSubscriptionOptions` has been removed -- Struct `RecommendationsDisableRecommendationForSubscriptionResponse` has been removed -- Struct `RecommendationsGetRuleDetailsByHostingEnvironmentOptions` has been removed -- Struct `RecommendationsGetRuleDetailsByHostingEnvironmentResponse` has been removed -- Struct `RecommendationsGetRuleDetailsByHostingEnvironmentResult` has been removed -- Struct `RecommendationsGetRuleDetailsByWebAppOptions` has been removed -- Struct `RecommendationsGetRuleDetailsByWebAppResponse` has been removed -- Struct `RecommendationsGetRuleDetailsByWebAppResult` has been removed -- Struct `RecommendationsListHistoryForHostingEnvironmentOptions` has been removed -- Struct `RecommendationsListHistoryForHostingEnvironmentPager` has been removed -- Struct `RecommendationsListHistoryForHostingEnvironmentResponse` has been removed -- Struct `RecommendationsListHistoryForHostingEnvironmentResult` has been removed -- Struct `RecommendationsListHistoryForWebAppOptions` has been removed -- Struct `RecommendationsListHistoryForWebAppPager` has been removed -- Struct `RecommendationsListHistoryForWebAppResponse` has been removed -- Struct `RecommendationsListHistoryForWebAppResult` has been removed -- Struct `RecommendationsListOptions` has been removed -- Struct `RecommendationsListPager` has been removed -- Struct `RecommendationsListRecommendedRulesForHostingEnvironmentOptions` has been removed -- Struct `RecommendationsListRecommendedRulesForHostingEnvironmentPager` has been removed -- Struct `RecommendationsListRecommendedRulesForHostingEnvironmentResponse` has been removed -- Struct `RecommendationsListRecommendedRulesForHostingEnvironmentResult` has been removed -- Struct `RecommendationsListRecommendedRulesForWebAppOptions` has been removed -- Struct `RecommendationsListRecommendedRulesForWebAppPager` has been removed -- Struct `RecommendationsListRecommendedRulesForWebAppResponse` has been removed -- Struct `RecommendationsListRecommendedRulesForWebAppResult` has been removed -- Struct `RecommendationsListResponse` has been removed -- Struct `RecommendationsListResult` has been removed -- Struct `RecommendationsResetAllFiltersForHostingEnvironmentOptions` has been removed -- Struct `RecommendationsResetAllFiltersForHostingEnvironmentResponse` has been removed -- Struct `RecommendationsResetAllFiltersForWebAppOptions` has been removed -- Struct `RecommendationsResetAllFiltersForWebAppResponse` has been removed -- Struct `RecommendationsResetAllFiltersOptions` has been removed -- Struct `RecommendationsResetAllFiltersResponse` has been removed -- Struct `ResourceHealthMetadataGetBySiteOptions` has been removed -- Struct `ResourceHealthMetadataGetBySiteResponse` has been removed -- Struct `ResourceHealthMetadataGetBySiteResult` has been removed -- Struct `ResourceHealthMetadataGetBySiteSlotOptions` has been removed -- Struct `ResourceHealthMetadataGetBySiteSlotResponse` has been removed -- Struct `ResourceHealthMetadataGetBySiteSlotResult` has been removed -- Struct `ResourceHealthMetadataListByResourceGroupOptions` has been removed -- Struct `ResourceHealthMetadataListByResourceGroupPager` has been removed -- Struct `ResourceHealthMetadataListByResourceGroupResponse` has been removed -- Struct `ResourceHealthMetadataListByResourceGroupResult` has been removed -- Struct `ResourceHealthMetadataListBySiteOptions` has been removed -- Struct `ResourceHealthMetadataListBySitePager` has been removed -- Struct `ResourceHealthMetadataListBySiteResponse` has been removed -- Struct `ResourceHealthMetadataListBySiteResult` has been removed -- Struct `ResourceHealthMetadataListBySiteSlotOptions` has been removed -- Struct `ResourceHealthMetadataListBySiteSlotPager` has been removed -- Struct `ResourceHealthMetadataListBySiteSlotResponse` has been removed -- Struct `ResourceHealthMetadataListBySiteSlotResult` has been removed -- Struct `ResourceHealthMetadataListOptions` has been removed -- Struct `ResourceHealthMetadataListPager` has been removed -- Struct `ResourceHealthMetadataListResponse` has been removed -- Struct `ResourceHealthMetadataListResult` has been removed -- Struct `StaticSitesApproveOrRejectPrivateEndpointConnectionPoller` has been removed -- Struct `StaticSitesApproveOrRejectPrivateEndpointConnectionPollerResponse` has been removed -- Struct `StaticSitesApproveOrRejectPrivateEndpointConnectionResponse` has been removed -- Struct `StaticSitesApproveOrRejectPrivateEndpointConnectionResult` has been removed -- Struct `StaticSitesBeginApproveOrRejectPrivateEndpointConnectionOptions` has been removed -- Struct `StaticSitesBeginCreateOrUpdateStaticSiteCustomDomainOptions` has been removed -- Struct `StaticSitesBeginCreateOrUpdateStaticSiteOptions` has been removed -- Struct `StaticSitesBeginCreateZipDeploymentForStaticSiteBuildOptions` has been removed -- Struct `StaticSitesBeginCreateZipDeploymentForStaticSiteOptions` has been removed -- Struct `StaticSitesBeginDeletePrivateEndpointConnectionOptions` has been removed -- Struct `StaticSitesBeginDeleteStaticSiteBuildOptions` has been removed -- Struct `StaticSitesBeginDeleteStaticSiteCustomDomainOptions` has been removed -- Struct `StaticSitesBeginDeleteStaticSiteOptions` has been removed -- Struct `StaticSitesBeginDetachStaticSiteOptions` has been removed -- Struct `StaticSitesBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions` has been removed -- Struct `StaticSitesBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions` has been removed -- Struct `StaticSitesBeginValidateCustomDomainCanBeAddedToStaticSiteOptions` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteAppSettingsOptions` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteAppSettingsResponse` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteAppSettingsResult` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsOptions` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsResponse` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsResult` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsResult` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteCustomDomainPoller` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteCustomDomainPollerResponse` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteCustomDomainResponse` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteCustomDomainResult` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsOptions` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsResponse` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsResult` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSitePoller` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSitePollerResponse` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteResponse` has been removed -- Struct `StaticSitesCreateOrUpdateStaticSiteResult` has been removed -- Struct `StaticSitesCreateUserRolesInvitationLinkOptions` has been removed -- Struct `StaticSitesCreateUserRolesInvitationLinkResponse` has been removed -- Struct `StaticSitesCreateUserRolesInvitationLinkResult` has been removed -- Struct `StaticSitesCreateZipDeploymentForStaticSiteBuildPoller` has been removed -- Struct `StaticSitesCreateZipDeploymentForStaticSiteBuildPollerResponse` has been removed -- Struct `StaticSitesCreateZipDeploymentForStaticSiteBuildResponse` has been removed -- Struct `StaticSitesCreateZipDeploymentForStaticSitePoller` has been removed -- Struct `StaticSitesCreateZipDeploymentForStaticSitePollerResponse` has been removed -- Struct `StaticSitesCreateZipDeploymentForStaticSiteResponse` has been removed -- Struct `StaticSitesDeletePrivateEndpointConnectionPoller` has been removed -- Struct `StaticSitesDeletePrivateEndpointConnectionPollerResponse` has been removed -- Struct `StaticSitesDeletePrivateEndpointConnectionResponse` has been removed -- Struct `StaticSitesDeletePrivateEndpointConnectionResult` has been removed -- Struct `StaticSitesDeleteStaticSiteBuildPoller` has been removed -- Struct `StaticSitesDeleteStaticSiteBuildPollerResponse` has been removed -- Struct `StaticSitesDeleteStaticSiteBuildResponse` has been removed -- Struct `StaticSitesDeleteStaticSiteCustomDomainPoller` has been removed -- Struct `StaticSitesDeleteStaticSiteCustomDomainPollerResponse` has been removed -- Struct `StaticSitesDeleteStaticSiteCustomDomainResponse` has been removed -- Struct `StaticSitesDeleteStaticSitePoller` has been removed -- Struct `StaticSitesDeleteStaticSitePollerResponse` has been removed -- Struct `StaticSitesDeleteStaticSiteResponse` has been removed -- Struct `StaticSitesDeleteStaticSiteUserOptions` has been removed -- Struct `StaticSitesDeleteStaticSiteUserResponse` has been removed -- Struct `StaticSitesDetachStaticSitePoller` has been removed -- Struct `StaticSitesDetachStaticSitePollerResponse` has been removed -- Struct `StaticSitesDetachStaticSiteResponse` has been removed -- Struct `StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildOptions` has been removed -- Struct `StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildResponse` has been removed -- Struct `StaticSitesDetachUserProvidedFunctionAppFromStaticSiteOptions` has been removed -- Struct `StaticSitesDetachUserProvidedFunctionAppFromStaticSiteResponse` has been removed -- Struct `StaticSitesGetPrivateEndpointConnectionListOptions` has been removed -- Struct `StaticSitesGetPrivateEndpointConnectionListPager` has been removed -- Struct `StaticSitesGetPrivateEndpointConnectionListResponse` has been removed -- Struct `StaticSitesGetPrivateEndpointConnectionListResult` has been removed -- Struct `StaticSitesGetPrivateEndpointConnectionOptions` has been removed -- Struct `StaticSitesGetPrivateEndpointConnectionResponse` has been removed -- Struct `StaticSitesGetPrivateEndpointConnectionResult` has been removed -- Struct `StaticSitesGetPrivateLinkResourcesOptions` has been removed -- Struct `StaticSitesGetPrivateLinkResourcesResponse` has been removed -- Struct `StaticSitesGetPrivateLinkResourcesResult` has been removed -- Struct `StaticSitesGetStaticSiteBuildOptions` has been removed -- Struct `StaticSitesGetStaticSiteBuildResponse` has been removed -- Struct `StaticSitesGetStaticSiteBuildResult` has been removed -- Struct `StaticSitesGetStaticSiteBuildsOptions` has been removed -- Struct `StaticSitesGetStaticSiteBuildsPager` has been removed -- Struct `StaticSitesGetStaticSiteBuildsResponse` has been removed -- Struct `StaticSitesGetStaticSiteBuildsResult` has been removed -- Struct `StaticSitesGetStaticSiteCustomDomainOptions` has been removed -- Struct `StaticSitesGetStaticSiteCustomDomainResponse` has been removed -- Struct `StaticSitesGetStaticSiteCustomDomainResult` has been removed -- Struct `StaticSitesGetStaticSiteOptions` has been removed -- Struct `StaticSitesGetStaticSiteResponse` has been removed -- Struct `StaticSitesGetStaticSiteResult` has been removed -- Struct `StaticSitesGetStaticSitesByResourceGroupOptions` has been removed -- Struct `StaticSitesGetStaticSitesByResourceGroupPager` has been removed -- Struct `StaticSitesGetStaticSitesByResourceGroupResponse` has been removed -- Struct `StaticSitesGetStaticSitesByResourceGroupResult` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildOptions` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildResponse` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildResult` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppForStaticSiteOptions` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppForStaticSiteResponse` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppForStaticSiteResult` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildOptions` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildPager` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildResponse` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildResult` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppsForStaticSiteOptions` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppsForStaticSitePager` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppsForStaticSiteResponse` has been removed -- Struct `StaticSitesGetUserProvidedFunctionAppsForStaticSiteResult` has been removed -- Struct `StaticSitesListOptions` has been removed -- Struct `StaticSitesListPager` has been removed -- Struct `StaticSitesListResponse` has been removed -- Struct `StaticSitesListResult` has been removed -- Struct `StaticSitesListStaticSiteAppSettingsOptions` has been removed -- Struct `StaticSitesListStaticSiteAppSettingsResponse` has been removed -- Struct `StaticSitesListStaticSiteAppSettingsResult` has been removed -- Struct `StaticSitesListStaticSiteBuildAppSettingsOptions` has been removed -- Struct `StaticSitesListStaticSiteBuildAppSettingsResponse` has been removed -- Struct `StaticSitesListStaticSiteBuildAppSettingsResult` has been removed -- Struct `StaticSitesListStaticSiteBuildFunctionAppSettingsOptions` has been removed -- Struct `StaticSitesListStaticSiteBuildFunctionAppSettingsResponse` has been removed -- Struct `StaticSitesListStaticSiteBuildFunctionAppSettingsResult` has been removed -- Struct `StaticSitesListStaticSiteBuildFunctionsOptions` has been removed -- Struct `StaticSitesListStaticSiteBuildFunctionsPager` has been removed -- Struct `StaticSitesListStaticSiteBuildFunctionsResponse` has been removed -- Struct `StaticSitesListStaticSiteBuildFunctionsResult` has been removed -- Struct `StaticSitesListStaticSiteConfiguredRolesOptions` has been removed -- Struct `StaticSitesListStaticSiteConfiguredRolesResponse` has been removed -- Struct `StaticSitesListStaticSiteConfiguredRolesResult` has been removed -- Struct `StaticSitesListStaticSiteCustomDomainsOptions` has been removed -- Struct `StaticSitesListStaticSiteCustomDomainsPager` has been removed -- Struct `StaticSitesListStaticSiteCustomDomainsResponse` has been removed -- Struct `StaticSitesListStaticSiteCustomDomainsResult` has been removed -- Struct `StaticSitesListStaticSiteFunctionAppSettingsOptions` has been removed -- Struct `StaticSitesListStaticSiteFunctionAppSettingsResponse` has been removed -- Struct `StaticSitesListStaticSiteFunctionAppSettingsResult` has been removed -- Struct `StaticSitesListStaticSiteFunctionsOptions` has been removed -- Struct `StaticSitesListStaticSiteFunctionsPager` has been removed -- Struct `StaticSitesListStaticSiteFunctionsResponse` has been removed -- Struct `StaticSitesListStaticSiteFunctionsResult` has been removed -- Struct `StaticSitesListStaticSiteSecretsOptions` has been removed -- Struct `StaticSitesListStaticSiteSecretsResponse` has been removed -- Struct `StaticSitesListStaticSiteSecretsResult` has been removed -- Struct `StaticSitesListStaticSiteUsersOptions` has been removed -- Struct `StaticSitesListStaticSiteUsersPager` has been removed -- Struct `StaticSitesListStaticSiteUsersResponse` has been removed -- Struct `StaticSitesListStaticSiteUsersResult` has been removed -- Struct `StaticSitesPreviewWorkflowOptions` has been removed -- Struct `StaticSitesPreviewWorkflowResponse` has been removed -- Struct `StaticSitesPreviewWorkflowResult` has been removed -- Struct `StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller` has been removed -- Struct `StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse` has been removed -- Struct `StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse` has been removed -- Struct `StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildResult` has been removed -- Struct `StaticSitesRegisterUserProvidedFunctionAppWithStaticSitePoller` has been removed -- Struct `StaticSitesRegisterUserProvidedFunctionAppWithStaticSitePollerResponse` has been removed -- Struct `StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteResponse` has been removed -- Struct `StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteResult` has been removed -- Struct `StaticSitesResetStaticSiteAPIKeyOptions` has been removed -- Struct `StaticSitesResetStaticSiteAPIKeyResponse` has been removed -- Struct `StaticSitesUpdateStaticSiteOptions` has been removed -- Struct `StaticSitesUpdateStaticSiteResponse` has been removed -- Struct `StaticSitesUpdateStaticSiteResult` has been removed -- Struct `StaticSitesUpdateStaticSiteUserOptions` has been removed -- Struct `StaticSitesUpdateStaticSiteUserResponse` has been removed -- Struct `StaticSitesUpdateStaticSiteUserResult` has been removed -- Struct `StaticSitesValidateCustomDomainCanBeAddedToStaticSitePoller` has been removed -- Struct `StaticSitesValidateCustomDomainCanBeAddedToStaticSitePollerResponse` has been removed -- Struct `StaticSitesValidateCustomDomainCanBeAddedToStaticSiteResponse` has been removed -- Struct `TopLevelDomainsGetOptions` has been removed -- Struct `TopLevelDomainsGetResponse` has been removed -- Struct `TopLevelDomainsGetResult` has been removed -- Struct `TopLevelDomainsListAgreementsOptions` has been removed -- Struct `TopLevelDomainsListAgreementsPager` has been removed -- Struct `TopLevelDomainsListAgreementsResponse` has been removed -- Struct `TopLevelDomainsListAgreementsResult` has been removed -- Struct `TopLevelDomainsListOptions` has been removed -- Struct `TopLevelDomainsListPager` has been removed -- Struct `TopLevelDomainsListResponse` has been removed -- Struct `TopLevelDomainsListResult` has been removed -- Struct `WebAppsAddPremierAddOnOptions` has been removed -- Struct `WebAppsAddPremierAddOnResponse` has been removed -- Struct `WebAppsAddPremierAddOnResult` has been removed -- Struct `WebAppsAddPremierAddOnSlotOptions` has been removed -- Struct `WebAppsAddPremierAddOnSlotResponse` has been removed -- Struct `WebAppsAddPremierAddOnSlotResult` has been removed -- Struct `WebAppsAnalyzeCustomHostnameOptions` has been removed -- Struct `WebAppsAnalyzeCustomHostnameResponse` has been removed -- Struct `WebAppsAnalyzeCustomHostnameResult` has been removed -- Struct `WebAppsAnalyzeCustomHostnameSlotOptions` has been removed -- Struct `WebAppsAnalyzeCustomHostnameSlotResponse` has been removed -- Struct `WebAppsAnalyzeCustomHostnameSlotResult` has been removed -- Struct `WebAppsApplySlotConfigToProductionOptions` has been removed -- Struct `WebAppsApplySlotConfigToProductionResponse` has been removed -- Struct `WebAppsApplySlotConfigurationSlotOptions` has been removed -- Struct `WebAppsApplySlotConfigurationSlotResponse` has been removed -- Struct `WebAppsApproveOrRejectPrivateEndpointConnectionPoller` has been removed -- Struct `WebAppsApproveOrRejectPrivateEndpointConnectionPollerResponse` has been removed -- Struct `WebAppsApproveOrRejectPrivateEndpointConnectionResponse` has been removed -- Struct `WebAppsApproveOrRejectPrivateEndpointConnectionResult` has been removed -- Struct `WebAppsApproveOrRejectPrivateEndpointConnectionSlotPoller` has been removed -- Struct `WebAppsApproveOrRejectPrivateEndpointConnectionSlotPollerResponse` has been removed -- Struct `WebAppsApproveOrRejectPrivateEndpointConnectionSlotResponse` has been removed -- Struct `WebAppsApproveOrRejectPrivateEndpointConnectionSlotResult` has been removed -- Struct `WebAppsBackupOptions` has been removed -- Struct `WebAppsBackupResponse` has been removed -- Struct `WebAppsBackupResult` has been removed -- Struct `WebAppsBackupSlotOptions` has been removed -- Struct `WebAppsBackupSlotResponse` has been removed -- Struct `WebAppsBackupSlotResult` has been removed -- Struct `WebAppsBeginApproveOrRejectPrivateEndpointConnectionOptions` has been removed -- Struct `WebAppsBeginApproveOrRejectPrivateEndpointConnectionSlotOptions` has been removed -- Struct `WebAppsBeginCreateFunctionOptions` has been removed -- Struct `WebAppsBeginCreateInstanceFunctionSlotOptions` has been removed -- Struct `WebAppsBeginCreateInstanceMSDeployOperationOptions` has been removed -- Struct `WebAppsBeginCreateInstanceMSDeployOperationSlotOptions` has been removed -- Struct `WebAppsBeginCreateMSDeployOperationOptions` has been removed -- Struct `WebAppsBeginCreateMSDeployOperationSlotOptions` has been removed -- Struct `WebAppsBeginCreateOrUpdateOptions` has been removed -- Struct `WebAppsBeginCreateOrUpdateSlotOptions` has been removed -- Struct `WebAppsBeginCreateOrUpdateSourceControlOptions` has been removed -- Struct `WebAppsBeginCreateOrUpdateSourceControlSlotOptions` has been removed -- Struct `WebAppsBeginDeletePrivateEndpointConnectionOptions` has been removed -- Struct `WebAppsBeginDeletePrivateEndpointConnectionSlotOptions` has been removed -- Struct `WebAppsBeginInstallSiteExtensionOptions` has been removed -- Struct `WebAppsBeginInstallSiteExtensionSlotOptions` has been removed -- Struct `WebAppsBeginListPublishingCredentialsOptions` has been removed -- Struct `WebAppsBeginListPublishingCredentialsSlotOptions` has been removed -- Struct `WebAppsBeginMigrateMySQLOptions` has been removed -- Struct `WebAppsBeginMigrateStorageOptions` has been removed -- Struct `WebAppsBeginRestoreFromBackupBlobOptions` has been removed -- Struct `WebAppsBeginRestoreFromBackupBlobSlotOptions` has been removed -- Struct `WebAppsBeginRestoreFromDeletedAppOptions` has been removed -- Struct `WebAppsBeginRestoreFromDeletedAppSlotOptions` has been removed -- Struct `WebAppsBeginRestoreOptions` has been removed -- Struct `WebAppsBeginRestoreSlotOptions` has been removed -- Struct `WebAppsBeginRestoreSnapshotOptions` has been removed -- Struct `WebAppsBeginRestoreSnapshotSlotOptions` has been removed -- Struct `WebAppsBeginStartNetworkTraceOptions` has been removed -- Struct `WebAppsBeginStartNetworkTraceSlotOptions` has been removed -- Struct `WebAppsBeginStartWebSiteNetworkTraceOperationOptions` has been removed -- Struct `WebAppsBeginStartWebSiteNetworkTraceOperationSlotOptions` has been removed -- Struct `WebAppsBeginSwapSlotOptions` has been removed -- Struct `WebAppsBeginSwapSlotWithProductionOptions` has been removed -- Struct `WebAppsCreateDeploymentOptions` has been removed -- Struct `WebAppsCreateDeploymentResponse` has been removed -- Struct `WebAppsCreateDeploymentResult` has been removed -- Struct `WebAppsCreateDeploymentSlotOptions` has been removed -- Struct `WebAppsCreateDeploymentSlotResponse` has been removed -- Struct `WebAppsCreateDeploymentSlotResult` has been removed -- Struct `WebAppsCreateFunctionPoller` has been removed -- Struct `WebAppsCreateFunctionPollerResponse` has been removed -- Struct `WebAppsCreateFunctionResponse` has been removed -- Struct `WebAppsCreateFunctionResult` has been removed -- Struct `WebAppsCreateInstanceFunctionSlotPoller` has been removed -- Struct `WebAppsCreateInstanceFunctionSlotPollerResponse` has been removed -- Struct `WebAppsCreateInstanceFunctionSlotResponse` has been removed -- Struct `WebAppsCreateInstanceFunctionSlotResult` has been removed -- Struct `WebAppsCreateInstanceMSDeployOperationPoller` has been removed -- Struct `WebAppsCreateInstanceMSDeployOperationPollerResponse` has been removed -- Struct `WebAppsCreateInstanceMSDeployOperationResponse` has been removed -- Struct `WebAppsCreateInstanceMSDeployOperationResult` has been removed -- Struct `WebAppsCreateInstanceMSDeployOperationSlotPoller` has been removed -- Struct `WebAppsCreateInstanceMSDeployOperationSlotPollerResponse` has been removed -- Struct `WebAppsCreateInstanceMSDeployOperationSlotResponse` has been removed -- Struct `WebAppsCreateInstanceMSDeployOperationSlotResult` has been removed -- Struct `WebAppsCreateMSDeployOperationPoller` has been removed -- Struct `WebAppsCreateMSDeployOperationPollerResponse` has been removed -- Struct `WebAppsCreateMSDeployOperationResponse` has been removed -- Struct `WebAppsCreateMSDeployOperationResult` has been removed -- Struct `WebAppsCreateMSDeployOperationSlotPoller` has been removed -- Struct `WebAppsCreateMSDeployOperationSlotPollerResponse` has been removed -- Struct `WebAppsCreateMSDeployOperationSlotResponse` has been removed -- Struct `WebAppsCreateMSDeployOperationSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateConfigurationOptions` has been removed -- Struct `WebAppsCreateOrUpdateConfigurationResponse` has been removed -- Struct `WebAppsCreateOrUpdateConfigurationResult` has been removed -- Struct `WebAppsCreateOrUpdateConfigurationSlotOptions` has been removed -- Struct `WebAppsCreateOrUpdateConfigurationSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateConfigurationSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateDomainOwnershipIdentifierOptions` has been removed -- Struct `WebAppsCreateOrUpdateDomainOwnershipIdentifierResponse` has been removed -- Struct `WebAppsCreateOrUpdateDomainOwnershipIdentifierResult` has been removed -- Struct `WebAppsCreateOrUpdateDomainOwnershipIdentifierSlotOptions` has been removed -- Struct `WebAppsCreateOrUpdateDomainOwnershipIdentifierSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateDomainOwnershipIdentifierSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateFunctionSecretOptions` has been removed -- Struct `WebAppsCreateOrUpdateFunctionSecretResponse` has been removed -- Struct `WebAppsCreateOrUpdateFunctionSecretResult` has been removed -- Struct `WebAppsCreateOrUpdateFunctionSecretSlotOptions` has been removed -- Struct `WebAppsCreateOrUpdateFunctionSecretSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateFunctionSecretSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateHostNameBindingOptions` has been removed -- Struct `WebAppsCreateOrUpdateHostNameBindingResponse` has been removed -- Struct `WebAppsCreateOrUpdateHostNameBindingResult` has been removed -- Struct `WebAppsCreateOrUpdateHostNameBindingSlotOptions` has been removed -- Struct `WebAppsCreateOrUpdateHostNameBindingSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateHostNameBindingSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateHostSecretOptions` has been removed -- Struct `WebAppsCreateOrUpdateHostSecretResponse` has been removed -- Struct `WebAppsCreateOrUpdateHostSecretResult` has been removed -- Struct `WebAppsCreateOrUpdateHostSecretSlotOptions` has been removed -- Struct `WebAppsCreateOrUpdateHostSecretSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateHostSecretSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateHybridConnectionOptions` has been removed -- Struct `WebAppsCreateOrUpdateHybridConnectionResponse` has been removed -- Struct `WebAppsCreateOrUpdateHybridConnectionResult` has been removed -- Struct `WebAppsCreateOrUpdateHybridConnectionSlotOptions` has been removed -- Struct `WebAppsCreateOrUpdateHybridConnectionSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateHybridConnectionSlotResult` has been removed -- Struct `WebAppsCreateOrUpdatePoller` has been removed -- Struct `WebAppsCreateOrUpdatePollerResponse` has been removed -- Struct `WebAppsCreateOrUpdatePublicCertificateOptions` has been removed -- Struct `WebAppsCreateOrUpdatePublicCertificateResponse` has been removed -- Struct `WebAppsCreateOrUpdatePublicCertificateResult` has been removed -- Struct `WebAppsCreateOrUpdatePublicCertificateSlotOptions` has been removed -- Struct `WebAppsCreateOrUpdatePublicCertificateSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdatePublicCertificateSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateRelayServiceConnectionOptions` has been removed -- Struct `WebAppsCreateOrUpdateRelayServiceConnectionResponse` has been removed -- Struct `WebAppsCreateOrUpdateRelayServiceConnectionResult` has been removed -- Struct `WebAppsCreateOrUpdateRelayServiceConnectionSlotOptions` has been removed -- Struct `WebAppsCreateOrUpdateRelayServiceConnectionSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateRelayServiceConnectionSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateResponse` has been removed -- Struct `WebAppsCreateOrUpdateResult` has been removed -- Struct `WebAppsCreateOrUpdateSlotPoller` has been removed -- Struct `WebAppsCreateOrUpdateSlotPollerResponse` has been removed -- Struct `WebAppsCreateOrUpdateSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateSourceControlPoller` has been removed -- Struct `WebAppsCreateOrUpdateSourceControlPollerResponse` has been removed -- Struct `WebAppsCreateOrUpdateSourceControlResponse` has been removed -- Struct `WebAppsCreateOrUpdateSourceControlResult` has been removed -- Struct `WebAppsCreateOrUpdateSourceControlSlotPoller` has been removed -- Struct `WebAppsCreateOrUpdateSourceControlSlotPollerResponse` has been removed -- Struct `WebAppsCreateOrUpdateSourceControlSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateSourceControlSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions` has been removed -- Struct `WebAppsCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse` has been removed -- Struct `WebAppsCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResult` has been removed -- Struct `WebAppsCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions` has been removed -- Struct `WebAppsCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResult` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionGatewayOptions` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionGatewayResponse` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionGatewayResult` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionGatewaySlotOptions` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionGatewaySlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionGatewaySlotResult` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionOptions` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionResponse` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionResult` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionSlotOptions` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionSlotResponse` has been removed -- Struct `WebAppsCreateOrUpdateVnetConnectionSlotResult` has been removed -- Struct `WebAppsDeleteBackupConfigurationOptions` has been removed -- Struct `WebAppsDeleteBackupConfigurationResponse` has been removed -- Struct `WebAppsDeleteBackupConfigurationSlotOptions` has been removed -- Struct `WebAppsDeleteBackupConfigurationSlotResponse` has been removed -- Struct `WebAppsDeleteBackupOptions` has been removed -- Struct `WebAppsDeleteBackupResponse` has been removed -- Struct `WebAppsDeleteBackupSlotOptions` has been removed -- Struct `WebAppsDeleteBackupSlotResponse` has been removed -- Struct `WebAppsDeleteContinuousWebJobOptions` has been removed -- Struct `WebAppsDeleteContinuousWebJobResponse` has been removed -- Struct `WebAppsDeleteContinuousWebJobSlotOptions` has been removed -- Struct `WebAppsDeleteContinuousWebJobSlotResponse` has been removed -- Struct `WebAppsDeleteDeploymentOptions` has been removed -- Struct `WebAppsDeleteDeploymentResponse` has been removed -- Struct `WebAppsDeleteDeploymentSlotOptions` has been removed -- Struct `WebAppsDeleteDeploymentSlotResponse` has been removed -- Struct `WebAppsDeleteDomainOwnershipIdentifierOptions` has been removed -- Struct `WebAppsDeleteDomainOwnershipIdentifierResponse` has been removed -- Struct `WebAppsDeleteDomainOwnershipIdentifierSlotOptions` has been removed -- Struct `WebAppsDeleteDomainOwnershipIdentifierSlotResponse` has been removed -- Struct `WebAppsDeleteFunctionOptions` has been removed -- Struct `WebAppsDeleteFunctionResponse` has been removed -- Struct `WebAppsDeleteFunctionSecretOptions` has been removed -- Struct `WebAppsDeleteFunctionSecretResponse` has been removed -- Struct `WebAppsDeleteFunctionSecretSlotOptions` has been removed -- Struct `WebAppsDeleteFunctionSecretSlotResponse` has been removed -- Struct `WebAppsDeleteHostNameBindingOptions` has been removed -- Struct `WebAppsDeleteHostNameBindingResponse` has been removed -- Struct `WebAppsDeleteHostNameBindingSlotOptions` has been removed -- Struct `WebAppsDeleteHostNameBindingSlotResponse` has been removed -- Struct `WebAppsDeleteHostSecretOptions` has been removed -- Struct `WebAppsDeleteHostSecretResponse` has been removed -- Struct `WebAppsDeleteHostSecretSlotOptions` has been removed -- Struct `WebAppsDeleteHostSecretSlotResponse` has been removed -- Struct `WebAppsDeleteHybridConnectionOptions` has been removed -- Struct `WebAppsDeleteHybridConnectionResponse` has been removed -- Struct `WebAppsDeleteHybridConnectionSlotOptions` has been removed -- Struct `WebAppsDeleteHybridConnectionSlotResponse` has been removed -- Struct `WebAppsDeleteInstanceFunctionSlotOptions` has been removed -- Struct `WebAppsDeleteInstanceFunctionSlotResponse` has been removed -- Struct `WebAppsDeleteInstanceProcessOptions` has been removed -- Struct `WebAppsDeleteInstanceProcessResponse` has been removed -- Struct `WebAppsDeleteInstanceProcessSlotOptions` has been removed -- Struct `WebAppsDeleteInstanceProcessSlotResponse` has been removed -- Struct `WebAppsDeleteOptions` has been removed -- Struct `WebAppsDeletePremierAddOnOptions` has been removed -- Struct `WebAppsDeletePremierAddOnResponse` has been removed -- Struct `WebAppsDeletePremierAddOnSlotOptions` has been removed -- Struct `WebAppsDeletePremierAddOnSlotResponse` has been removed -- Struct `WebAppsDeletePrivateEndpointConnectionPoller` has been removed -- Struct `WebAppsDeletePrivateEndpointConnectionPollerResponse` has been removed -- Struct `WebAppsDeletePrivateEndpointConnectionResponse` has been removed -- Struct `WebAppsDeletePrivateEndpointConnectionResult` has been removed -- Struct `WebAppsDeletePrivateEndpointConnectionSlotPoller` has been removed -- Struct `WebAppsDeletePrivateEndpointConnectionSlotPollerResponse` has been removed -- Struct `WebAppsDeletePrivateEndpointConnectionSlotResponse` has been removed -- Struct `WebAppsDeletePrivateEndpointConnectionSlotResult` has been removed -- Struct `WebAppsDeleteProcessOptions` has been removed -- Struct `WebAppsDeleteProcessResponse` has been removed -- Struct `WebAppsDeleteProcessSlotOptions` has been removed -- Struct `WebAppsDeleteProcessSlotResponse` has been removed -- Struct `WebAppsDeletePublicCertificateOptions` has been removed -- Struct `WebAppsDeletePublicCertificateResponse` has been removed -- Struct `WebAppsDeletePublicCertificateSlotOptions` has been removed -- Struct `WebAppsDeletePublicCertificateSlotResponse` has been removed -- Struct `WebAppsDeleteRelayServiceConnectionOptions` has been removed -- Struct `WebAppsDeleteRelayServiceConnectionResponse` has been removed -- Struct `WebAppsDeleteRelayServiceConnectionSlotOptions` has been removed -- Struct `WebAppsDeleteRelayServiceConnectionSlotResponse` has been removed -- Struct `WebAppsDeleteResponse` has been removed -- Struct `WebAppsDeleteSiteExtensionOptions` has been removed -- Struct `WebAppsDeleteSiteExtensionResponse` has been removed -- Struct `WebAppsDeleteSiteExtensionSlotOptions` has been removed -- Struct `WebAppsDeleteSiteExtensionSlotResponse` has been removed -- Struct `WebAppsDeleteSlotOptions` has been removed -- Struct `WebAppsDeleteSlotResponse` has been removed -- Struct `WebAppsDeleteSourceControlOptions` has been removed -- Struct `WebAppsDeleteSourceControlResponse` has been removed -- Struct `WebAppsDeleteSourceControlSlotOptions` has been removed -- Struct `WebAppsDeleteSourceControlSlotResponse` has been removed -- Struct `WebAppsDeleteSwiftVirtualNetworkOptions` has been removed -- Struct `WebAppsDeleteSwiftVirtualNetworkResponse` has been removed -- Struct `WebAppsDeleteSwiftVirtualNetworkSlotOptions` has been removed -- Struct `WebAppsDeleteSwiftVirtualNetworkSlotResponse` has been removed -- Struct `WebAppsDeleteTriggeredWebJobOptions` has been removed -- Struct `WebAppsDeleteTriggeredWebJobResponse` has been removed -- Struct `WebAppsDeleteTriggeredWebJobSlotOptions` has been removed -- Struct `WebAppsDeleteTriggeredWebJobSlotResponse` has been removed -- Struct `WebAppsDeleteVnetConnectionOptions` has been removed -- Struct `WebAppsDeleteVnetConnectionResponse` has been removed -- Struct `WebAppsDeleteVnetConnectionSlotOptions` has been removed -- Struct `WebAppsDeleteVnetConnectionSlotResponse` has been removed -- Struct `WebAppsDiscoverBackupOptions` has been removed -- Struct `WebAppsDiscoverBackupResponse` has been removed -- Struct `WebAppsDiscoverBackupResult` has been removed -- Struct `WebAppsDiscoverBackupSlotOptions` has been removed -- Struct `WebAppsDiscoverBackupSlotResponse` has been removed -- Struct `WebAppsDiscoverBackupSlotResult` has been removed -- Struct `WebAppsGenerateNewSitePublishingPasswordOptions` has been removed -- Struct `WebAppsGenerateNewSitePublishingPasswordResponse` has been removed -- Struct `WebAppsGenerateNewSitePublishingPasswordSlotOptions` has been removed -- Struct `WebAppsGenerateNewSitePublishingPasswordSlotResponse` has been removed -- Struct `WebAppsGetAppSettingKeyVaultReferenceOptions` has been removed -- Struct `WebAppsGetAppSettingKeyVaultReferenceResponse` has been removed -- Struct `WebAppsGetAppSettingKeyVaultReferenceResult` has been removed -- Struct `WebAppsGetAppSettingKeyVaultReferenceSlotOptions` has been removed -- Struct `WebAppsGetAppSettingKeyVaultReferenceSlotResponse` has been removed -- Struct `WebAppsGetAppSettingKeyVaultReferenceSlotResult` has been removed -- Struct `WebAppsGetAppSettingsKeyVaultReferencesOptions` has been removed -- Struct `WebAppsGetAppSettingsKeyVaultReferencesPager` has been removed -- Struct `WebAppsGetAppSettingsKeyVaultReferencesResponse` has been removed -- Struct `WebAppsGetAppSettingsKeyVaultReferencesResult` has been removed -- Struct `WebAppsGetAppSettingsKeyVaultReferencesSlotOptions` has been removed -- Struct `WebAppsGetAppSettingsKeyVaultReferencesSlotPager` has been removed -- Struct `WebAppsGetAppSettingsKeyVaultReferencesSlotResponse` has been removed -- Struct `WebAppsGetAppSettingsKeyVaultReferencesSlotResult` has been removed -- Struct `WebAppsGetAuthSettingsOptions` has been removed -- Struct `WebAppsGetAuthSettingsResponse` has been removed -- Struct `WebAppsGetAuthSettingsResult` has been removed -- Struct `WebAppsGetAuthSettingsSlotOptions` has been removed -- Struct `WebAppsGetAuthSettingsSlotResponse` has been removed -- Struct `WebAppsGetAuthSettingsSlotResult` has been removed -- Struct `WebAppsGetAuthSettingsV2Options` has been removed -- Struct `WebAppsGetAuthSettingsV2Response` has been removed -- Struct `WebAppsGetAuthSettingsV2Result` has been removed -- Struct `WebAppsGetAuthSettingsV2SlotOptions` has been removed -- Struct `WebAppsGetAuthSettingsV2SlotResponse` has been removed -- Struct `WebAppsGetAuthSettingsV2SlotResult` has been removed -- Struct `WebAppsGetBackupConfigurationOptions` has been removed -- Struct `WebAppsGetBackupConfigurationResponse` has been removed -- Struct `WebAppsGetBackupConfigurationResult` has been removed -- Struct `WebAppsGetBackupConfigurationSlotOptions` has been removed -- Struct `WebAppsGetBackupConfigurationSlotResponse` has been removed -- Struct `WebAppsGetBackupConfigurationSlotResult` has been removed -- Struct `WebAppsGetBackupStatusOptions` has been removed -- Struct `WebAppsGetBackupStatusResponse` has been removed -- Struct `WebAppsGetBackupStatusResult` has been removed -- Struct `WebAppsGetBackupStatusSlotOptions` has been removed -- Struct `WebAppsGetBackupStatusSlotResponse` has been removed -- Struct `WebAppsGetBackupStatusSlotResult` has been removed -- Struct `WebAppsGetConfigurationOptions` has been removed -- Struct `WebAppsGetConfigurationResponse` has been removed -- Struct `WebAppsGetConfigurationResult` has been removed -- Struct `WebAppsGetConfigurationSlotOptions` has been removed -- Struct `WebAppsGetConfigurationSlotResponse` has been removed -- Struct `WebAppsGetConfigurationSlotResult` has been removed -- Struct `WebAppsGetConfigurationSnapshotOptions` has been removed -- Struct `WebAppsGetConfigurationSnapshotResponse` has been removed -- Struct `WebAppsGetConfigurationSnapshotResult` has been removed -- Struct `WebAppsGetConfigurationSnapshotSlotOptions` has been removed -- Struct `WebAppsGetConfigurationSnapshotSlotResponse` has been removed -- Struct `WebAppsGetConfigurationSnapshotSlotResult` has been removed -- Struct `WebAppsGetContainerLogsZipOptions` has been removed -- Struct `WebAppsGetContainerLogsZipResponse` has been removed -- Struct `WebAppsGetContainerLogsZipSlotOptions` has been removed -- Struct `WebAppsGetContainerLogsZipSlotResponse` has been removed -- Struct `WebAppsGetContinuousWebJobOptions` has been removed -- Struct `WebAppsGetContinuousWebJobResponse` has been removed -- Struct `WebAppsGetContinuousWebJobResult` has been removed -- Struct `WebAppsGetContinuousWebJobSlotOptions` has been removed -- Struct `WebAppsGetContinuousWebJobSlotResponse` has been removed -- Struct `WebAppsGetContinuousWebJobSlotResult` has been removed -- Struct `WebAppsGetDeploymentOptions` has been removed -- Struct `WebAppsGetDeploymentResponse` has been removed -- Struct `WebAppsGetDeploymentResult` has been removed -- Struct `WebAppsGetDeploymentSlotOptions` has been removed -- Struct `WebAppsGetDeploymentSlotResponse` has been removed -- Struct `WebAppsGetDeploymentSlotResult` has been removed -- Struct `WebAppsGetDiagnosticLogsConfigurationOptions` has been removed -- Struct `WebAppsGetDiagnosticLogsConfigurationResponse` has been removed -- Struct `WebAppsGetDiagnosticLogsConfigurationResult` has been removed -- Struct `WebAppsGetDiagnosticLogsConfigurationSlotOptions` has been removed -- Struct `WebAppsGetDiagnosticLogsConfigurationSlotResponse` has been removed -- Struct `WebAppsGetDiagnosticLogsConfigurationSlotResult` has been removed -- Struct `WebAppsGetDomainOwnershipIdentifierOptions` has been removed -- Struct `WebAppsGetDomainOwnershipIdentifierResponse` has been removed -- Struct `WebAppsGetDomainOwnershipIdentifierResult` has been removed -- Struct `WebAppsGetDomainOwnershipIdentifierSlotOptions` has been removed -- Struct `WebAppsGetDomainOwnershipIdentifierSlotResponse` has been removed -- Struct `WebAppsGetDomainOwnershipIdentifierSlotResult` has been removed -- Struct `WebAppsGetFtpAllowedOptions` has been removed -- Struct `WebAppsGetFtpAllowedResponse` has been removed -- Struct `WebAppsGetFtpAllowedResult` has been removed -- Struct `WebAppsGetFtpAllowedSlotOptions` has been removed -- Struct `WebAppsGetFtpAllowedSlotResponse` has been removed -- Struct `WebAppsGetFtpAllowedSlotResult` has been removed -- Struct `WebAppsGetFunctionOptions` has been removed -- Struct `WebAppsGetFunctionResponse` has been removed -- Struct `WebAppsGetFunctionResult` has been removed -- Struct `WebAppsGetFunctionsAdminTokenOptions` has been removed -- Struct `WebAppsGetFunctionsAdminTokenResponse` has been removed -- Struct `WebAppsGetFunctionsAdminTokenResult` has been removed -- Struct `WebAppsGetFunctionsAdminTokenSlotOptions` has been removed -- Struct `WebAppsGetFunctionsAdminTokenSlotResponse` has been removed -- Struct `WebAppsGetFunctionsAdminTokenSlotResult` has been removed -- Struct `WebAppsGetHostNameBindingOptions` has been removed -- Struct `WebAppsGetHostNameBindingResponse` has been removed -- Struct `WebAppsGetHostNameBindingResult` has been removed -- Struct `WebAppsGetHostNameBindingSlotOptions` has been removed -- Struct `WebAppsGetHostNameBindingSlotResponse` has been removed -- Struct `WebAppsGetHostNameBindingSlotResult` has been removed -- Struct `WebAppsGetHybridConnectionOptions` has been removed -- Struct `WebAppsGetHybridConnectionResponse` has been removed -- Struct `WebAppsGetHybridConnectionResult` has been removed -- Struct `WebAppsGetHybridConnectionSlotOptions` has been removed -- Struct `WebAppsGetHybridConnectionSlotResponse` has been removed -- Struct `WebAppsGetHybridConnectionSlotResult` has been removed -- Struct `WebAppsGetInstanceFunctionSlotOptions` has been removed -- Struct `WebAppsGetInstanceFunctionSlotResponse` has been removed -- Struct `WebAppsGetInstanceFunctionSlotResult` has been removed -- Struct `WebAppsGetInstanceInfoOptions` has been removed -- Struct `WebAppsGetInstanceInfoResponse` has been removed -- Struct `WebAppsGetInstanceInfoResult` has been removed -- Struct `WebAppsGetInstanceInfoSlotOptions` has been removed -- Struct `WebAppsGetInstanceInfoSlotResponse` has been removed -- Struct `WebAppsGetInstanceInfoSlotResult` has been removed -- Struct `WebAppsGetInstanceMSDeployLogOptions` has been removed -- Struct `WebAppsGetInstanceMSDeployLogResponse` has been removed -- Struct `WebAppsGetInstanceMSDeployLogResult` has been removed -- Struct `WebAppsGetInstanceMSDeployLogSlotOptions` has been removed -- Struct `WebAppsGetInstanceMSDeployLogSlotResponse` has been removed -- Struct `WebAppsGetInstanceMSDeployLogSlotResult` has been removed -- Struct `WebAppsGetInstanceMsDeployStatusOptions` has been removed -- Struct `WebAppsGetInstanceMsDeployStatusResponse` has been removed -- Struct `WebAppsGetInstanceMsDeployStatusResult` has been removed -- Struct `WebAppsGetInstanceMsDeployStatusSlotOptions` has been removed -- Struct `WebAppsGetInstanceMsDeployStatusSlotResponse` has been removed -- Struct `WebAppsGetInstanceMsDeployStatusSlotResult` has been removed -- Struct `WebAppsGetInstanceProcessDumpOptions` has been removed -- Struct `WebAppsGetInstanceProcessDumpResponse` has been removed -- Struct `WebAppsGetInstanceProcessDumpSlotOptions` has been removed -- Struct `WebAppsGetInstanceProcessDumpSlotResponse` has been removed -- Struct `WebAppsGetInstanceProcessModuleOptions` has been removed -- Struct `WebAppsGetInstanceProcessModuleResponse` has been removed -- Struct `WebAppsGetInstanceProcessModuleResult` has been removed -- Struct `WebAppsGetInstanceProcessModuleSlotOptions` has been removed -- Struct `WebAppsGetInstanceProcessModuleSlotResponse` has been removed -- Struct `WebAppsGetInstanceProcessModuleSlotResult` has been removed -- Struct `WebAppsGetInstanceProcessOptions` has been removed -- Struct `WebAppsGetInstanceProcessResponse` has been removed -- Struct `WebAppsGetInstanceProcessResult` has been removed -- Struct `WebAppsGetInstanceProcessSlotOptions` has been removed -- Struct `WebAppsGetInstanceProcessSlotResponse` has been removed -- Struct `WebAppsGetInstanceProcessSlotResult` has been removed -- Struct `WebAppsGetMSDeployLogOptions` has been removed -- Struct `WebAppsGetMSDeployLogResponse` has been removed -- Struct `WebAppsGetMSDeployLogResult` has been removed -- Struct `WebAppsGetMSDeployLogSlotOptions` has been removed -- Struct `WebAppsGetMSDeployLogSlotResponse` has been removed -- Struct `WebAppsGetMSDeployLogSlotResult` has been removed -- Struct `WebAppsGetMSDeployStatusOptions` has been removed -- Struct `WebAppsGetMSDeployStatusResponse` has been removed -- Struct `WebAppsGetMSDeployStatusResult` has been removed -- Struct `WebAppsGetMSDeployStatusSlotOptions` has been removed -- Struct `WebAppsGetMSDeployStatusSlotResponse` has been removed -- Struct `WebAppsGetMSDeployStatusSlotResult` has been removed -- Struct `WebAppsGetMigrateMySQLStatusOptions` has been removed -- Struct `WebAppsGetMigrateMySQLStatusResponse` has been removed -- Struct `WebAppsGetMigrateMySQLStatusResult` has been removed -- Struct `WebAppsGetMigrateMySQLStatusSlotOptions` has been removed -- Struct `WebAppsGetMigrateMySQLStatusSlotResponse` has been removed -- Struct `WebAppsGetMigrateMySQLStatusSlotResult` has been removed -- Struct `WebAppsGetNetworkTraceOperationOptions` has been removed -- Struct `WebAppsGetNetworkTraceOperationResponse` has been removed -- Struct `WebAppsGetNetworkTraceOperationResult` has been removed -- Struct `WebAppsGetNetworkTraceOperationSlotOptions` has been removed -- Struct `WebAppsGetNetworkTraceOperationSlotResponse` has been removed -- Struct `WebAppsGetNetworkTraceOperationSlotResult` has been removed -- Struct `WebAppsGetNetworkTraceOperationSlotV2Options` has been removed -- Struct `WebAppsGetNetworkTraceOperationSlotV2Response` has been removed -- Struct `WebAppsGetNetworkTraceOperationSlotV2Result` has been removed -- Struct `WebAppsGetNetworkTraceOperationV2Options` has been removed -- Struct `WebAppsGetNetworkTraceOperationV2Response` has been removed -- Struct `WebAppsGetNetworkTraceOperationV2Result` has been removed -- Struct `WebAppsGetNetworkTracesOptions` has been removed -- Struct `WebAppsGetNetworkTracesResponse` has been removed -- Struct `WebAppsGetNetworkTracesResult` has been removed -- Struct `WebAppsGetNetworkTracesSlotOptions` has been removed -- Struct `WebAppsGetNetworkTracesSlotResponse` has been removed -- Struct `WebAppsGetNetworkTracesSlotResult` has been removed -- Struct `WebAppsGetNetworkTracesSlotV2Options` has been removed -- Struct `WebAppsGetNetworkTracesSlotV2Response` has been removed -- Struct `WebAppsGetNetworkTracesSlotV2Result` has been removed -- Struct `WebAppsGetNetworkTracesV2Options` has been removed -- Struct `WebAppsGetNetworkTracesV2Response` has been removed -- Struct `WebAppsGetNetworkTracesV2Result` has been removed -- Struct `WebAppsGetOptions` has been removed -- Struct `WebAppsGetPremierAddOnOptions` has been removed -- Struct `WebAppsGetPremierAddOnResponse` has been removed -- Struct `WebAppsGetPremierAddOnResult` has been removed -- Struct `WebAppsGetPremierAddOnSlotOptions` has been removed -- Struct `WebAppsGetPremierAddOnSlotResponse` has been removed -- Struct `WebAppsGetPremierAddOnSlotResult` has been removed -- Struct `WebAppsGetPrivateAccessOptions` has been removed -- Struct `WebAppsGetPrivateAccessResponse` has been removed -- Struct `WebAppsGetPrivateAccessResult` has been removed -- Struct `WebAppsGetPrivateAccessSlotOptions` has been removed -- Struct `WebAppsGetPrivateAccessSlotResponse` has been removed -- Struct `WebAppsGetPrivateAccessSlotResult` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionListOptions` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionListPager` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionListResponse` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionListResult` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionListSlotOptions` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionListSlotPager` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionListSlotResponse` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionListSlotResult` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionOptions` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionResponse` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionResult` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionSlotOptions` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionSlotResponse` has been removed -- Struct `WebAppsGetPrivateEndpointConnectionSlotResult` has been removed -- Struct `WebAppsGetPrivateLinkResourcesOptions` has been removed -- Struct `WebAppsGetPrivateLinkResourcesResponse` has been removed -- Struct `WebAppsGetPrivateLinkResourcesResult` has been removed -- Struct `WebAppsGetPrivateLinkResourcesSlotOptions` has been removed -- Struct `WebAppsGetPrivateLinkResourcesSlotResponse` has been removed -- Struct `WebAppsGetPrivateLinkResourcesSlotResult` has been removed -- Struct `WebAppsGetProcessDumpOptions` has been removed -- Struct `WebAppsGetProcessDumpResponse` has been removed -- Struct `WebAppsGetProcessDumpSlotOptions` has been removed -- Struct `WebAppsGetProcessDumpSlotResponse` has been removed -- Struct `WebAppsGetProcessModuleOptions` has been removed -- Struct `WebAppsGetProcessModuleResponse` has been removed -- Struct `WebAppsGetProcessModuleResult` has been removed -- Struct `WebAppsGetProcessModuleSlotOptions` has been removed -- Struct `WebAppsGetProcessModuleSlotResponse` has been removed -- Struct `WebAppsGetProcessModuleSlotResult` has been removed -- Struct `WebAppsGetProcessOptions` has been removed -- Struct `WebAppsGetProcessResponse` has been removed -- Struct `WebAppsGetProcessResult` has been removed -- Struct `WebAppsGetProcessSlotOptions` has been removed -- Struct `WebAppsGetProcessSlotResponse` has been removed -- Struct `WebAppsGetProcessSlotResult` has been removed -- Struct `WebAppsGetPublicCertificateOptions` has been removed -- Struct `WebAppsGetPublicCertificateResponse` has been removed -- Struct `WebAppsGetPublicCertificateResult` has been removed -- Struct `WebAppsGetPublicCertificateSlotOptions` has been removed -- Struct `WebAppsGetPublicCertificateSlotResponse` has been removed -- Struct `WebAppsGetPublicCertificateSlotResult` has been removed -- Struct `WebAppsGetRelayServiceConnectionOptions` has been removed -- Struct `WebAppsGetRelayServiceConnectionResponse` has been removed -- Struct `WebAppsGetRelayServiceConnectionResult` has been removed -- Struct `WebAppsGetRelayServiceConnectionSlotOptions` has been removed -- Struct `WebAppsGetRelayServiceConnectionSlotResponse` has been removed -- Struct `WebAppsGetRelayServiceConnectionSlotResult` has been removed -- Struct `WebAppsGetResponse` has been removed -- Struct `WebAppsGetResult` has been removed -- Struct `WebAppsGetScmAllowedOptions` has been removed -- Struct `WebAppsGetScmAllowedResponse` has been removed -- Struct `WebAppsGetScmAllowedResult` has been removed -- Struct `WebAppsGetScmAllowedSlotOptions` has been removed -- Struct `WebAppsGetScmAllowedSlotResponse` has been removed -- Struct `WebAppsGetScmAllowedSlotResult` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferenceOptions` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferenceResponse` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferenceResult` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferenceSlotOptions` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferenceSlotResponse` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferenceSlotResult` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferencesOptions` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferencesPager` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferencesResponse` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferencesResult` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferencesSlotOptions` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferencesSlotPager` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferencesSlotResponse` has been removed -- Struct `WebAppsGetSiteConnectionStringKeyVaultReferencesSlotResult` has been removed -- Struct `WebAppsGetSiteExtensionOptions` has been removed -- Struct `WebAppsGetSiteExtensionResponse` has been removed -- Struct `WebAppsGetSiteExtensionResult` has been removed -- Struct `WebAppsGetSiteExtensionSlotOptions` has been removed -- Struct `WebAppsGetSiteExtensionSlotResponse` has been removed -- Struct `WebAppsGetSiteExtensionSlotResult` has been removed -- Struct `WebAppsGetSitePhpErrorLogFlagOptions` has been removed -- Struct `WebAppsGetSitePhpErrorLogFlagResponse` has been removed -- Struct `WebAppsGetSitePhpErrorLogFlagResult` has been removed -- Struct `WebAppsGetSitePhpErrorLogFlagSlotOptions` has been removed -- Struct `WebAppsGetSitePhpErrorLogFlagSlotResponse` has been removed -- Struct `WebAppsGetSitePhpErrorLogFlagSlotResult` has been removed -- Struct `WebAppsGetSlotOptions` has been removed -- Struct `WebAppsGetSlotResponse` has been removed -- Struct `WebAppsGetSlotResult` has been removed -- Struct `WebAppsGetSourceControlOptions` has been removed -- Struct `WebAppsGetSourceControlResponse` has been removed -- Struct `WebAppsGetSourceControlResult` has been removed -- Struct `WebAppsGetSourceControlSlotOptions` has been removed -- Struct `WebAppsGetSourceControlSlotResponse` has been removed -- Struct `WebAppsGetSourceControlSlotResult` has been removed -- Struct `WebAppsGetSwiftVirtualNetworkConnectionOptions` has been removed -- Struct `WebAppsGetSwiftVirtualNetworkConnectionResponse` has been removed -- Struct `WebAppsGetSwiftVirtualNetworkConnectionResult` has been removed -- Struct `WebAppsGetSwiftVirtualNetworkConnectionSlotOptions` has been removed -- Struct `WebAppsGetSwiftVirtualNetworkConnectionSlotResponse` has been removed -- Struct `WebAppsGetSwiftVirtualNetworkConnectionSlotResult` has been removed -- Struct `WebAppsGetTriggeredWebJobHistoryOptions` has been removed -- Struct `WebAppsGetTriggeredWebJobHistoryResponse` has been removed -- Struct `WebAppsGetTriggeredWebJobHistoryResult` has been removed -- Struct `WebAppsGetTriggeredWebJobHistorySlotOptions` has been removed -- Struct `WebAppsGetTriggeredWebJobHistorySlotResponse` has been removed -- Struct `WebAppsGetTriggeredWebJobHistorySlotResult` has been removed -- Struct `WebAppsGetTriggeredWebJobOptions` has been removed -- Struct `WebAppsGetTriggeredWebJobResponse` has been removed -- Struct `WebAppsGetTriggeredWebJobResult` has been removed -- Struct `WebAppsGetTriggeredWebJobSlotOptions` has been removed -- Struct `WebAppsGetTriggeredWebJobSlotResponse` has been removed -- Struct `WebAppsGetTriggeredWebJobSlotResult` has been removed -- Struct `WebAppsGetVnetConnectionGatewayOptions` has been removed -- Struct `WebAppsGetVnetConnectionGatewayResponse` has been removed -- Struct `WebAppsGetVnetConnectionGatewayResult` has been removed -- Struct `WebAppsGetVnetConnectionGatewaySlotOptions` has been removed -- Struct `WebAppsGetVnetConnectionGatewaySlotResponse` has been removed -- Struct `WebAppsGetVnetConnectionGatewaySlotResult` has been removed -- Struct `WebAppsGetVnetConnectionOptions` has been removed -- Struct `WebAppsGetVnetConnectionResponse` has been removed -- Struct `WebAppsGetVnetConnectionResult` has been removed -- Struct `WebAppsGetVnetConnectionSlotOptions` has been removed -- Struct `WebAppsGetVnetConnectionSlotResponse` has been removed -- Struct `WebAppsGetVnetConnectionSlotResult` has been removed -- Struct `WebAppsGetWebJobOptions` has been removed -- Struct `WebAppsGetWebJobResponse` has been removed -- Struct `WebAppsGetWebJobResult` has been removed -- Struct `WebAppsGetWebJobSlotOptions` has been removed -- Struct `WebAppsGetWebJobSlotResponse` has been removed -- Struct `WebAppsGetWebJobSlotResult` has been removed -- Struct `WebAppsGetWebSiteContainerLogsOptions` has been removed -- Struct `WebAppsGetWebSiteContainerLogsResponse` has been removed -- Struct `WebAppsGetWebSiteContainerLogsSlotOptions` has been removed -- Struct `WebAppsGetWebSiteContainerLogsSlotResponse` has been removed -- Struct `WebAppsInstallSiteExtensionPoller` has been removed -- Struct `WebAppsInstallSiteExtensionPollerResponse` has been removed -- Struct `WebAppsInstallSiteExtensionResponse` has been removed -- Struct `WebAppsInstallSiteExtensionResult` has been removed -- Struct `WebAppsInstallSiteExtensionSlotPoller` has been removed -- Struct `WebAppsInstallSiteExtensionSlotPollerResponse` has been removed -- Struct `WebAppsInstallSiteExtensionSlotResponse` has been removed -- Struct `WebAppsInstallSiteExtensionSlotResult` has been removed -- Struct `WebAppsIsCloneableOptions` has been removed -- Struct `WebAppsIsCloneableResponse` has been removed -- Struct `WebAppsIsCloneableResult` has been removed -- Struct `WebAppsIsCloneableSlotOptions` has been removed -- Struct `WebAppsIsCloneableSlotResponse` has been removed -- Struct `WebAppsIsCloneableSlotResult` has been removed -- Struct `WebAppsListApplicationSettingsOptions` has been removed -- Struct `WebAppsListApplicationSettingsResponse` has been removed -- Struct `WebAppsListApplicationSettingsResult` has been removed -- Struct `WebAppsListApplicationSettingsSlotOptions` has been removed -- Struct `WebAppsListApplicationSettingsSlotResponse` has been removed -- Struct `WebAppsListApplicationSettingsSlotResult` has been removed -- Struct `WebAppsListAzureStorageAccountsOptions` has been removed -- Struct `WebAppsListAzureStorageAccountsResponse` has been removed -- Struct `WebAppsListAzureStorageAccountsResult` has been removed -- Struct `WebAppsListAzureStorageAccountsSlotOptions` has been removed -- Struct `WebAppsListAzureStorageAccountsSlotResponse` has been removed -- Struct `WebAppsListAzureStorageAccountsSlotResult` has been removed -- Struct `WebAppsListBackupStatusSecretsOptions` has been removed -- Struct `WebAppsListBackupStatusSecretsResponse` has been removed -- Struct `WebAppsListBackupStatusSecretsResult` has been removed -- Struct `WebAppsListBackupStatusSecretsSlotOptions` has been removed -- Struct `WebAppsListBackupStatusSecretsSlotResponse` has been removed -- Struct `WebAppsListBackupStatusSecretsSlotResult` has been removed -- Struct `WebAppsListBackupsOptions` has been removed -- Struct `WebAppsListBackupsPager` has been removed -- Struct `WebAppsListBackupsResponse` has been removed -- Struct `WebAppsListBackupsResult` has been removed -- Struct `WebAppsListBackupsSlotOptions` has been removed -- Struct `WebAppsListBackupsSlotPager` has been removed -- Struct `WebAppsListBackupsSlotResponse` has been removed -- Struct `WebAppsListBackupsSlotResult` has been removed -- Struct `WebAppsListBasicPublishingCredentialsPoliciesOptions` has been removed -- Struct `WebAppsListBasicPublishingCredentialsPoliciesPager` has been removed -- Struct `WebAppsListBasicPublishingCredentialsPoliciesResponse` has been removed -- Struct `WebAppsListBasicPublishingCredentialsPoliciesResult` has been removed -- Struct `WebAppsListBasicPublishingCredentialsPoliciesSlotOptions` has been removed -- Struct `WebAppsListBasicPublishingCredentialsPoliciesSlotPager` has been removed -- Struct `WebAppsListBasicPublishingCredentialsPoliciesSlotResponse` has been removed -- Struct `WebAppsListBasicPublishingCredentialsPoliciesSlotResult` has been removed -- Struct `WebAppsListByResourceGroupOptions` has been removed -- Struct `WebAppsListByResourceGroupPager` has been removed -- Struct `WebAppsListByResourceGroupResponse` has been removed -- Struct `WebAppsListByResourceGroupResult` has been removed -- Struct `WebAppsListConfigurationSnapshotInfoOptions` has been removed -- Struct `WebAppsListConfigurationSnapshotInfoPager` has been removed -- Struct `WebAppsListConfigurationSnapshotInfoResponse` has been removed -- Struct `WebAppsListConfigurationSnapshotInfoResult` has been removed -- Struct `WebAppsListConfigurationSnapshotInfoSlotOptions` has been removed -- Struct `WebAppsListConfigurationSnapshotInfoSlotPager` has been removed -- Struct `WebAppsListConfigurationSnapshotInfoSlotResponse` has been removed -- Struct `WebAppsListConfigurationSnapshotInfoSlotResult` has been removed -- Struct `WebAppsListConfigurationsOptions` has been removed -- Struct `WebAppsListConfigurationsPager` has been removed -- Struct `WebAppsListConfigurationsResponse` has been removed -- Struct `WebAppsListConfigurationsResult` has been removed -- Struct `WebAppsListConfigurationsSlotOptions` has been removed -- Struct `WebAppsListConfigurationsSlotPager` has been removed -- Struct `WebAppsListConfigurationsSlotResponse` has been removed -- Struct `WebAppsListConfigurationsSlotResult` has been removed -- Struct `WebAppsListConnectionStringsOptions` has been removed -- Struct `WebAppsListConnectionStringsResponse` has been removed -- Struct `WebAppsListConnectionStringsResult` has been removed -- Struct `WebAppsListConnectionStringsSlotOptions` has been removed -- Struct `WebAppsListConnectionStringsSlotResponse` has been removed -- Struct `WebAppsListConnectionStringsSlotResult` has been removed -- Struct `WebAppsListContinuousWebJobsOptions` has been removed -- Struct `WebAppsListContinuousWebJobsPager` has been removed -- Struct `WebAppsListContinuousWebJobsResponse` has been removed -- Struct `WebAppsListContinuousWebJobsResult` has been removed -- Struct `WebAppsListContinuousWebJobsSlotOptions` has been removed -- Struct `WebAppsListContinuousWebJobsSlotPager` has been removed -- Struct `WebAppsListContinuousWebJobsSlotResponse` has been removed -- Struct `WebAppsListContinuousWebJobsSlotResult` has been removed -- Struct `WebAppsListDeploymentLogOptions` has been removed -- Struct `WebAppsListDeploymentLogResponse` has been removed -- Struct `WebAppsListDeploymentLogResult` has been removed -- Struct `WebAppsListDeploymentLogSlotOptions` has been removed -- Struct `WebAppsListDeploymentLogSlotResponse` has been removed -- Struct `WebAppsListDeploymentLogSlotResult` has been removed -- Struct `WebAppsListDeploymentsOptions` has been removed -- Struct `WebAppsListDeploymentsPager` has been removed -- Struct `WebAppsListDeploymentsResponse` has been removed -- Struct `WebAppsListDeploymentsResult` has been removed -- Struct `WebAppsListDeploymentsSlotOptions` has been removed -- Struct `WebAppsListDeploymentsSlotPager` has been removed -- Struct `WebAppsListDeploymentsSlotResponse` has been removed -- Struct `WebAppsListDeploymentsSlotResult` has been removed -- Struct `WebAppsListDomainOwnershipIdentifiersOptions` has been removed -- Struct `WebAppsListDomainOwnershipIdentifiersPager` has been removed -- Struct `WebAppsListDomainOwnershipIdentifiersResponse` has been removed -- Struct `WebAppsListDomainOwnershipIdentifiersResult` has been removed -- Struct `WebAppsListDomainOwnershipIdentifiersSlotOptions` has been removed -- Struct `WebAppsListDomainOwnershipIdentifiersSlotPager` has been removed -- Struct `WebAppsListDomainOwnershipIdentifiersSlotResponse` has been removed -- Struct `WebAppsListDomainOwnershipIdentifiersSlotResult` has been removed -- Struct `WebAppsListFunctionKeysOptions` has been removed -- Struct `WebAppsListFunctionKeysResponse` has been removed -- Struct `WebAppsListFunctionKeysResult` has been removed -- Struct `WebAppsListFunctionKeysSlotOptions` has been removed -- Struct `WebAppsListFunctionKeysSlotResponse` has been removed -- Struct `WebAppsListFunctionKeysSlotResult` has been removed -- Struct `WebAppsListFunctionSecretsOptions` has been removed -- Struct `WebAppsListFunctionSecretsResponse` has been removed -- Struct `WebAppsListFunctionSecretsResult` has been removed -- Struct `WebAppsListFunctionSecretsSlotOptions` has been removed -- Struct `WebAppsListFunctionSecretsSlotResponse` has been removed -- Struct `WebAppsListFunctionSecretsSlotResult` has been removed -- Struct `WebAppsListFunctionsOptions` has been removed -- Struct `WebAppsListFunctionsPager` has been removed -- Struct `WebAppsListFunctionsResponse` has been removed -- Struct `WebAppsListFunctionsResult` has been removed -- Struct `WebAppsListHostKeysOptions` has been removed -- Struct `WebAppsListHostKeysResponse` has been removed -- Struct `WebAppsListHostKeysResult` has been removed -- Struct `WebAppsListHostKeysSlotOptions` has been removed -- Struct `WebAppsListHostKeysSlotResponse` has been removed -- Struct `WebAppsListHostKeysSlotResult` has been removed -- Struct `WebAppsListHostNameBindingsOptions` has been removed -- Struct `WebAppsListHostNameBindingsPager` has been removed -- Struct `WebAppsListHostNameBindingsResponse` has been removed -- Struct `WebAppsListHostNameBindingsResult` has been removed -- Struct `WebAppsListHostNameBindingsSlotOptions` has been removed -- Struct `WebAppsListHostNameBindingsSlotPager` has been removed -- Struct `WebAppsListHostNameBindingsSlotResponse` has been removed -- Struct `WebAppsListHostNameBindingsSlotResult` has been removed -- Struct `WebAppsListHybridConnectionsOptions` has been removed -- Struct `WebAppsListHybridConnectionsResponse` has been removed -- Struct `WebAppsListHybridConnectionsResult` has been removed -- Struct `WebAppsListHybridConnectionsSlotOptions` has been removed -- Struct `WebAppsListHybridConnectionsSlotResponse` has been removed -- Struct `WebAppsListHybridConnectionsSlotResult` has been removed -- Struct `WebAppsListInstanceFunctionsSlotOptions` has been removed -- Struct `WebAppsListInstanceFunctionsSlotPager` has been removed -- Struct `WebAppsListInstanceFunctionsSlotResponse` has been removed -- Struct `WebAppsListInstanceFunctionsSlotResult` has been removed -- Struct `WebAppsListInstanceIdentifiersOptions` has been removed -- Struct `WebAppsListInstanceIdentifiersPager` has been removed -- Struct `WebAppsListInstanceIdentifiersResponse` has been removed -- Struct `WebAppsListInstanceIdentifiersResult` has been removed -- Struct `WebAppsListInstanceIdentifiersSlotOptions` has been removed -- Struct `WebAppsListInstanceIdentifiersSlotPager` has been removed -- Struct `WebAppsListInstanceIdentifiersSlotResponse` has been removed -- Struct `WebAppsListInstanceIdentifiersSlotResult` has been removed -- Struct `WebAppsListInstanceProcessModulesOptions` has been removed -- Struct `WebAppsListInstanceProcessModulesPager` has been removed -- Struct `WebAppsListInstanceProcessModulesResponse` has been removed -- Struct `WebAppsListInstanceProcessModulesResult` has been removed -- Struct `WebAppsListInstanceProcessModulesSlotOptions` has been removed -- Struct `WebAppsListInstanceProcessModulesSlotPager` has been removed -- Struct `WebAppsListInstanceProcessModulesSlotResponse` has been removed -- Struct `WebAppsListInstanceProcessModulesSlotResult` has been removed -- Struct `WebAppsListInstanceProcessThreadsOptions` has been removed -- Struct `WebAppsListInstanceProcessThreadsPager` has been removed -- Struct `WebAppsListInstanceProcessThreadsResponse` has been removed -- Struct `WebAppsListInstanceProcessThreadsResult` has been removed -- Struct `WebAppsListInstanceProcessThreadsSlotOptions` has been removed -- Struct `WebAppsListInstanceProcessThreadsSlotPager` has been removed -- Struct `WebAppsListInstanceProcessThreadsSlotResponse` has been removed -- Struct `WebAppsListInstanceProcessThreadsSlotResult` has been removed -- Struct `WebAppsListInstanceProcessesOptions` has been removed -- Struct `WebAppsListInstanceProcessesPager` has been removed -- Struct `WebAppsListInstanceProcessesResponse` has been removed -- Struct `WebAppsListInstanceProcessesResult` has been removed -- Struct `WebAppsListInstanceProcessesSlotOptions` has been removed -- Struct `WebAppsListInstanceProcessesSlotPager` has been removed -- Struct `WebAppsListInstanceProcessesSlotResponse` has been removed -- Struct `WebAppsListInstanceProcessesSlotResult` has been removed -- Struct `WebAppsListMetadataOptions` has been removed -- Struct `WebAppsListMetadataResponse` has been removed -- Struct `WebAppsListMetadataResult` has been removed -- Struct `WebAppsListMetadataSlotOptions` has been removed -- Struct `WebAppsListMetadataSlotResponse` has been removed -- Struct `WebAppsListMetadataSlotResult` has been removed -- Struct `WebAppsListNetworkFeaturesOptions` has been removed -- Struct `WebAppsListNetworkFeaturesResponse` has been removed -- Struct `WebAppsListNetworkFeaturesResult` has been removed -- Struct `WebAppsListNetworkFeaturesSlotOptions` has been removed -- Struct `WebAppsListNetworkFeaturesSlotResponse` has been removed -- Struct `WebAppsListNetworkFeaturesSlotResult` has been removed -- Struct `WebAppsListOptions` has been removed -- Struct `WebAppsListPager` has been removed -- Struct `WebAppsListPerfMonCountersOptions` has been removed -- Struct `WebAppsListPerfMonCountersPager` has been removed -- Struct `WebAppsListPerfMonCountersResponse` has been removed -- Struct `WebAppsListPerfMonCountersResult` has been removed -- Struct `WebAppsListPerfMonCountersSlotOptions` has been removed -- Struct `WebAppsListPerfMonCountersSlotPager` has been removed -- Struct `WebAppsListPerfMonCountersSlotResponse` has been removed -- Struct `WebAppsListPerfMonCountersSlotResult` has been removed -- Struct `WebAppsListPremierAddOnsOptions` has been removed -- Struct `WebAppsListPremierAddOnsResponse` has been removed -- Struct `WebAppsListPremierAddOnsResult` has been removed -- Struct `WebAppsListPremierAddOnsSlotOptions` has been removed -- Struct `WebAppsListPremierAddOnsSlotResponse` has been removed -- Struct `WebAppsListPremierAddOnsSlotResult` has been removed -- Struct `WebAppsListProcessModulesOptions` has been removed -- Struct `WebAppsListProcessModulesPager` has been removed -- Struct `WebAppsListProcessModulesResponse` has been removed -- Struct `WebAppsListProcessModulesResult` has been removed -- Struct `WebAppsListProcessModulesSlotOptions` has been removed -- Struct `WebAppsListProcessModulesSlotPager` has been removed -- Struct `WebAppsListProcessModulesSlotResponse` has been removed -- Struct `WebAppsListProcessModulesSlotResult` has been removed -- Struct `WebAppsListProcessThreadsOptions` has been removed -- Struct `WebAppsListProcessThreadsPager` has been removed -- Struct `WebAppsListProcessThreadsResponse` has been removed -- Struct `WebAppsListProcessThreadsResult` has been removed -- Struct `WebAppsListProcessThreadsSlotOptions` has been removed -- Struct `WebAppsListProcessThreadsSlotPager` has been removed -- Struct `WebAppsListProcessThreadsSlotResponse` has been removed -- Struct `WebAppsListProcessThreadsSlotResult` has been removed -- Struct `WebAppsListProcessesOptions` has been removed -- Struct `WebAppsListProcessesPager` has been removed -- Struct `WebAppsListProcessesResponse` has been removed -- Struct `WebAppsListProcessesResult` has been removed -- Struct `WebAppsListProcessesSlotOptions` has been removed -- Struct `WebAppsListProcessesSlotPager` has been removed -- Struct `WebAppsListProcessesSlotResponse` has been removed -- Struct `WebAppsListProcessesSlotResult` has been removed -- Struct `WebAppsListPublicCertificatesOptions` has been removed -- Struct `WebAppsListPublicCertificatesPager` has been removed -- Struct `WebAppsListPublicCertificatesResponse` has been removed -- Struct `WebAppsListPublicCertificatesResult` has been removed -- Struct `WebAppsListPublicCertificatesSlotOptions` has been removed -- Struct `WebAppsListPublicCertificatesSlotPager` has been removed -- Struct `WebAppsListPublicCertificatesSlotResponse` has been removed -- Struct `WebAppsListPublicCertificatesSlotResult` has been removed -- Struct `WebAppsListPublishingCredentialsPoller` has been removed -- Struct `WebAppsListPublishingCredentialsPollerResponse` has been removed -- Struct `WebAppsListPublishingCredentialsResponse` has been removed -- Struct `WebAppsListPublishingCredentialsResult` has been removed -- Struct `WebAppsListPublishingCredentialsSlotPoller` has been removed -- Struct `WebAppsListPublishingCredentialsSlotPollerResponse` has been removed -- Struct `WebAppsListPublishingCredentialsSlotResponse` has been removed -- Struct `WebAppsListPublishingCredentialsSlotResult` has been removed -- Struct `WebAppsListPublishingProfileXMLWithSecretsOptions` has been removed -- Struct `WebAppsListPublishingProfileXMLWithSecretsResponse` has been removed -- Struct `WebAppsListPublishingProfileXMLWithSecretsSlotOptions` has been removed -- Struct `WebAppsListPublishingProfileXMLWithSecretsSlotResponse` has been removed -- Struct `WebAppsListRelayServiceConnectionsOptions` has been removed -- Struct `WebAppsListRelayServiceConnectionsResponse` has been removed -- Struct `WebAppsListRelayServiceConnectionsResult` has been removed -- Struct `WebAppsListRelayServiceConnectionsSlotOptions` has been removed -- Struct `WebAppsListRelayServiceConnectionsSlotResponse` has been removed -- Struct `WebAppsListRelayServiceConnectionsSlotResult` has been removed -- Struct `WebAppsListResponse` has been removed -- Struct `WebAppsListResult` has been removed -- Struct `WebAppsListSiteBackupsOptions` has been removed -- Struct `WebAppsListSiteBackupsPager` has been removed -- Struct `WebAppsListSiteBackupsResponse` has been removed -- Struct `WebAppsListSiteBackupsResult` has been removed -- Struct `WebAppsListSiteBackupsSlotOptions` has been removed -- Struct `WebAppsListSiteBackupsSlotPager` has been removed -- Struct `WebAppsListSiteBackupsSlotResponse` has been removed -- Struct `WebAppsListSiteBackupsSlotResult` has been removed -- Struct `WebAppsListSiteExtensionsOptions` has been removed -- Struct `WebAppsListSiteExtensionsPager` has been removed -- Struct `WebAppsListSiteExtensionsResponse` has been removed -- Struct `WebAppsListSiteExtensionsResult` has been removed -- Struct `WebAppsListSiteExtensionsSlotOptions` has been removed -- Struct `WebAppsListSiteExtensionsSlotPager` has been removed -- Struct `WebAppsListSiteExtensionsSlotResponse` has been removed -- Struct `WebAppsListSiteExtensionsSlotResult` has been removed -- Struct `WebAppsListSitePushSettingsOptions` has been removed -- Struct `WebAppsListSitePushSettingsResponse` has been removed -- Struct `WebAppsListSitePushSettingsResult` has been removed -- Struct `WebAppsListSitePushSettingsSlotOptions` has been removed -- Struct `WebAppsListSitePushSettingsSlotResponse` has been removed -- Struct `WebAppsListSitePushSettingsSlotResult` has been removed -- Struct `WebAppsListSlotConfigurationNamesOptions` has been removed -- Struct `WebAppsListSlotConfigurationNamesResponse` has been removed -- Struct `WebAppsListSlotConfigurationNamesResult` has been removed -- Struct `WebAppsListSlotDifferencesFromProductionOptions` has been removed -- Struct `WebAppsListSlotDifferencesFromProductionPager` has been removed -- Struct `WebAppsListSlotDifferencesFromProductionResponse` has been removed -- Struct `WebAppsListSlotDifferencesFromProductionResult` has been removed -- Struct `WebAppsListSlotDifferencesSlotOptions` has been removed -- Struct `WebAppsListSlotDifferencesSlotPager` has been removed -- Struct `WebAppsListSlotDifferencesSlotResponse` has been removed -- Struct `WebAppsListSlotDifferencesSlotResult` has been removed -- Struct `WebAppsListSlotsOptions` has been removed -- Struct `WebAppsListSlotsPager` has been removed -- Struct `WebAppsListSlotsResponse` has been removed -- Struct `WebAppsListSlotsResult` has been removed -- Struct `WebAppsListSnapshotsFromDRSecondaryOptions` has been removed -- Struct `WebAppsListSnapshotsFromDRSecondaryPager` has been removed -- Struct `WebAppsListSnapshotsFromDRSecondaryResponse` has been removed -- Struct `WebAppsListSnapshotsFromDRSecondaryResult` has been removed -- Struct `WebAppsListSnapshotsFromDRSecondarySlotOptions` has been removed -- Struct `WebAppsListSnapshotsFromDRSecondarySlotPager` has been removed -- Struct `WebAppsListSnapshotsFromDRSecondarySlotResponse` has been removed -- Struct `WebAppsListSnapshotsFromDRSecondarySlotResult` has been removed -- Struct `WebAppsListSnapshotsOptions` has been removed -- Struct `WebAppsListSnapshotsPager` has been removed -- Struct `WebAppsListSnapshotsResponse` has been removed -- Struct `WebAppsListSnapshotsResult` has been removed -- Struct `WebAppsListSnapshotsSlotOptions` has been removed -- Struct `WebAppsListSnapshotsSlotPager` has been removed -- Struct `WebAppsListSnapshotsSlotResponse` has been removed -- Struct `WebAppsListSnapshotsSlotResult` has been removed -- Struct `WebAppsListSyncFunctionTriggersOptions` has been removed -- Struct `WebAppsListSyncFunctionTriggersResponse` has been removed -- Struct `WebAppsListSyncFunctionTriggersResult` has been removed -- Struct `WebAppsListSyncFunctionTriggersSlotOptions` has been removed -- Struct `WebAppsListSyncFunctionTriggersSlotResponse` has been removed -- Struct `WebAppsListSyncFunctionTriggersSlotResult` has been removed -- Struct `WebAppsListSyncStatusOptions` has been removed -- Struct `WebAppsListSyncStatusResponse` has been removed -- Struct `WebAppsListSyncStatusSlotOptions` has been removed -- Struct `WebAppsListSyncStatusSlotResponse` has been removed -- Struct `WebAppsListTriggeredWebJobHistoryOptions` has been removed -- Struct `WebAppsListTriggeredWebJobHistoryPager` has been removed -- Struct `WebAppsListTriggeredWebJobHistoryResponse` has been removed -- Struct `WebAppsListTriggeredWebJobHistoryResult` has been removed -- Struct `WebAppsListTriggeredWebJobHistorySlotOptions` has been removed -- Struct `WebAppsListTriggeredWebJobHistorySlotPager` has been removed -- Struct `WebAppsListTriggeredWebJobHistorySlotResponse` has been removed -- Struct `WebAppsListTriggeredWebJobHistorySlotResult` has been removed -- Struct `WebAppsListTriggeredWebJobsOptions` has been removed -- Struct `WebAppsListTriggeredWebJobsPager` has been removed -- Struct `WebAppsListTriggeredWebJobsResponse` has been removed -- Struct `WebAppsListTriggeredWebJobsResult` has been removed -- Struct `WebAppsListTriggeredWebJobsSlotOptions` has been removed -- Struct `WebAppsListTriggeredWebJobsSlotPager` has been removed -- Struct `WebAppsListTriggeredWebJobsSlotResponse` has been removed -- Struct `WebAppsListTriggeredWebJobsSlotResult` has been removed -- Struct `WebAppsListUsagesOptions` has been removed -- Struct `WebAppsListUsagesPager` has been removed -- Struct `WebAppsListUsagesResponse` has been removed -- Struct `WebAppsListUsagesResult` has been removed -- Struct `WebAppsListUsagesSlotOptions` has been removed -- Struct `WebAppsListUsagesSlotPager` has been removed -- Struct `WebAppsListUsagesSlotResponse` has been removed -- Struct `WebAppsListUsagesSlotResult` has been removed -- Struct `WebAppsListVnetConnectionsOptions` has been removed -- Struct `WebAppsListVnetConnectionsResponse` has been removed -- Struct `WebAppsListVnetConnectionsResult` has been removed -- Struct `WebAppsListVnetConnectionsSlotOptions` has been removed -- Struct `WebAppsListVnetConnectionsSlotResponse` has been removed -- Struct `WebAppsListVnetConnectionsSlotResult` has been removed -- Struct `WebAppsListWebJobsOptions` has been removed -- Struct `WebAppsListWebJobsPager` has been removed -- Struct `WebAppsListWebJobsResponse` has been removed -- Struct `WebAppsListWebJobsResult` has been removed -- Struct `WebAppsListWebJobsSlotOptions` has been removed -- Struct `WebAppsListWebJobsSlotPager` has been removed -- Struct `WebAppsListWebJobsSlotResponse` has been removed -- Struct `WebAppsListWebJobsSlotResult` has been removed -- Struct `WebAppsMigrateMySQLPoller` has been removed -- Struct `WebAppsMigrateMySQLPollerResponse` has been removed -- Struct `WebAppsMigrateMySQLResponse` has been removed -- Struct `WebAppsMigrateMySQLResult` has been removed -- Struct `WebAppsMigrateStoragePoller` has been removed -- Struct `WebAppsMigrateStoragePollerResponse` has been removed -- Struct `WebAppsMigrateStorageResponse` has been removed -- Struct `WebAppsMigrateStorageResult` has been removed -- Struct `WebAppsPutPrivateAccessVnetOptions` has been removed -- Struct `WebAppsPutPrivateAccessVnetResponse` has been removed -- Struct `WebAppsPutPrivateAccessVnetResult` has been removed -- Struct `WebAppsPutPrivateAccessVnetSlotOptions` has been removed -- Struct `WebAppsPutPrivateAccessVnetSlotResponse` has been removed -- Struct `WebAppsPutPrivateAccessVnetSlotResult` has been removed -- Struct `WebAppsRecoverSiteConfigurationSnapshotOptions` has been removed -- Struct `WebAppsRecoverSiteConfigurationSnapshotResponse` has been removed -- Struct `WebAppsRecoverSiteConfigurationSnapshotSlotOptions` has been removed -- Struct `WebAppsRecoverSiteConfigurationSnapshotSlotResponse` has been removed -- Struct `WebAppsResetProductionSlotConfigOptions` has been removed -- Struct `WebAppsResetProductionSlotConfigResponse` has been removed -- Struct `WebAppsResetSlotConfigurationSlotOptions` has been removed -- Struct `WebAppsResetSlotConfigurationSlotResponse` has been removed -- Struct `WebAppsRestartOptions` has been removed -- Struct `WebAppsRestartResponse` has been removed -- Struct `WebAppsRestartSlotOptions` has been removed -- Struct `WebAppsRestartSlotResponse` has been removed -- Struct `WebAppsRestoreFromBackupBlobPoller` has been removed -- Struct `WebAppsRestoreFromBackupBlobPollerResponse` has been removed -- Struct `WebAppsRestoreFromBackupBlobResponse` has been removed -- Struct `WebAppsRestoreFromBackupBlobSlotPoller` has been removed -- Struct `WebAppsRestoreFromBackupBlobSlotPollerResponse` has been removed -- Struct `WebAppsRestoreFromBackupBlobSlotResponse` has been removed -- Struct `WebAppsRestoreFromDeletedAppPoller` has been removed -- Struct `WebAppsRestoreFromDeletedAppPollerResponse` has been removed -- Struct `WebAppsRestoreFromDeletedAppResponse` has been removed -- Struct `WebAppsRestoreFromDeletedAppSlotPoller` has been removed -- Struct `WebAppsRestoreFromDeletedAppSlotPollerResponse` has been removed -- Struct `WebAppsRestoreFromDeletedAppSlotResponse` has been removed -- Struct `WebAppsRestorePoller` has been removed -- Struct `WebAppsRestorePollerResponse` has been removed -- Struct `WebAppsRestoreResponse` has been removed -- Struct `WebAppsRestoreSlotPoller` has been removed -- Struct `WebAppsRestoreSlotPollerResponse` has been removed -- Struct `WebAppsRestoreSlotResponse` has been removed -- Struct `WebAppsRestoreSnapshotPoller` has been removed -- Struct `WebAppsRestoreSnapshotPollerResponse` has been removed -- Struct `WebAppsRestoreSnapshotResponse` has been removed -- Struct `WebAppsRestoreSnapshotSlotPoller` has been removed -- Struct `WebAppsRestoreSnapshotSlotPollerResponse` has been removed -- Struct `WebAppsRestoreSnapshotSlotResponse` has been removed -- Struct `WebAppsRunTriggeredWebJobOptions` has been removed -- Struct `WebAppsRunTriggeredWebJobResponse` has been removed -- Struct `WebAppsRunTriggeredWebJobSlotOptions` has been removed -- Struct `WebAppsRunTriggeredWebJobSlotResponse` has been removed -- Struct `WebAppsStartContinuousWebJobOptions` has been removed -- Struct `WebAppsStartContinuousWebJobResponse` has been removed -- Struct `WebAppsStartContinuousWebJobSlotOptions` has been removed -- Struct `WebAppsStartContinuousWebJobSlotResponse` has been removed -- Struct `WebAppsStartNetworkTracePoller` has been removed -- Struct `WebAppsStartNetworkTracePollerResponse` has been removed -- Struct `WebAppsStartNetworkTraceResponse` has been removed -- Struct `WebAppsStartNetworkTraceResult` has been removed -- Struct `WebAppsStartNetworkTraceSlotPoller` has been removed -- Struct `WebAppsStartNetworkTraceSlotPollerResponse` has been removed -- Struct `WebAppsStartNetworkTraceSlotResponse` has been removed -- Struct `WebAppsStartNetworkTraceSlotResult` has been removed -- Struct `WebAppsStartOptions` has been removed -- Struct `WebAppsStartResponse` has been removed -- Struct `WebAppsStartSlotOptions` has been removed -- Struct `WebAppsStartSlotResponse` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceOperationPoller` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceOperationPollerResponse` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceOperationResponse` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceOperationResult` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceOperationSlotPoller` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceOperationSlotPollerResponse` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceOperationSlotResponse` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceOperationSlotResult` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceOptions` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceResponse` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceResult` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceSlotOptions` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceSlotResponse` has been removed -- Struct `WebAppsStartWebSiteNetworkTraceSlotResult` has been removed -- Struct `WebAppsStopContinuousWebJobOptions` has been removed -- Struct `WebAppsStopContinuousWebJobResponse` has been removed -- Struct `WebAppsStopContinuousWebJobSlotOptions` has been removed -- Struct `WebAppsStopContinuousWebJobSlotResponse` has been removed -- Struct `WebAppsStopNetworkTraceOptions` has been removed -- Struct `WebAppsStopNetworkTraceResponse` has been removed -- Struct `WebAppsStopNetworkTraceSlotOptions` has been removed -- Struct `WebAppsStopNetworkTraceSlotResponse` has been removed -- Struct `WebAppsStopOptions` has been removed -- Struct `WebAppsStopResponse` has been removed -- Struct `WebAppsStopSlotOptions` has been removed -- Struct `WebAppsStopSlotResponse` has been removed -- Struct `WebAppsStopWebSiteNetworkTraceOptions` has been removed -- Struct `WebAppsStopWebSiteNetworkTraceResponse` has been removed -- Struct `WebAppsStopWebSiteNetworkTraceSlotOptions` has been removed -- Struct `WebAppsStopWebSiteNetworkTraceSlotResponse` has been removed -- Struct `WebAppsSwapSlotPoller` has been removed -- Struct `WebAppsSwapSlotPollerResponse` has been removed -- Struct `WebAppsSwapSlotResponse` has been removed -- Struct `WebAppsSwapSlotWithProductionPoller` has been removed -- Struct `WebAppsSwapSlotWithProductionPollerResponse` has been removed -- Struct `WebAppsSwapSlotWithProductionResponse` has been removed -- Struct `WebAppsSyncFunctionTriggersOptions` has been removed -- Struct `WebAppsSyncFunctionTriggersResponse` has been removed -- Struct `WebAppsSyncFunctionTriggersSlotOptions` has been removed -- Struct `WebAppsSyncFunctionTriggersSlotResponse` has been removed -- Struct `WebAppsSyncFunctionsOptions` has been removed -- Struct `WebAppsSyncFunctionsResponse` has been removed -- Struct `WebAppsSyncFunctionsSlotOptions` has been removed -- Struct `WebAppsSyncFunctionsSlotResponse` has been removed -- Struct `WebAppsSyncRepositoryOptions` has been removed -- Struct `WebAppsSyncRepositoryResponse` has been removed -- Struct `WebAppsSyncRepositorySlotOptions` has been removed -- Struct `WebAppsSyncRepositorySlotResponse` has been removed -- Struct `WebAppsUpdateApplicationSettingsOptions` has been removed -- Struct `WebAppsUpdateApplicationSettingsResponse` has been removed -- Struct `WebAppsUpdateApplicationSettingsResult` has been removed -- Struct `WebAppsUpdateApplicationSettingsSlotOptions` has been removed -- Struct `WebAppsUpdateApplicationSettingsSlotResponse` has been removed -- Struct `WebAppsUpdateApplicationSettingsSlotResult` has been removed -- Struct `WebAppsUpdateAuthSettingsOptions` has been removed -- Struct `WebAppsUpdateAuthSettingsResponse` has been removed -- Struct `WebAppsUpdateAuthSettingsResult` has been removed -- Struct `WebAppsUpdateAuthSettingsSlotOptions` has been removed -- Struct `WebAppsUpdateAuthSettingsSlotResponse` has been removed -- Struct `WebAppsUpdateAuthSettingsSlotResult` has been removed -- Struct `WebAppsUpdateAuthSettingsV2Options` has been removed -- Struct `WebAppsUpdateAuthSettingsV2Response` has been removed -- Struct `WebAppsUpdateAuthSettingsV2Result` has been removed -- Struct `WebAppsUpdateAuthSettingsV2SlotOptions` has been removed -- Struct `WebAppsUpdateAuthSettingsV2SlotResponse` has been removed -- Struct `WebAppsUpdateAuthSettingsV2SlotResult` has been removed -- Struct `WebAppsUpdateAzureStorageAccountsOptions` has been removed -- Struct `WebAppsUpdateAzureStorageAccountsResponse` has been removed -- Struct `WebAppsUpdateAzureStorageAccountsResult` has been removed -- Struct `WebAppsUpdateAzureStorageAccountsSlotOptions` has been removed -- Struct `WebAppsUpdateAzureStorageAccountsSlotResponse` has been removed -- Struct `WebAppsUpdateAzureStorageAccountsSlotResult` has been removed -- Struct `WebAppsUpdateBackupConfigurationOptions` has been removed -- Struct `WebAppsUpdateBackupConfigurationResponse` has been removed -- Struct `WebAppsUpdateBackupConfigurationResult` has been removed -- Struct `WebAppsUpdateBackupConfigurationSlotOptions` has been removed -- Struct `WebAppsUpdateBackupConfigurationSlotResponse` has been removed -- Struct `WebAppsUpdateBackupConfigurationSlotResult` has been removed -- Struct `WebAppsUpdateConfigurationOptions` has been removed -- Struct `WebAppsUpdateConfigurationResponse` has been removed -- Struct `WebAppsUpdateConfigurationResult` has been removed -- Struct `WebAppsUpdateConfigurationSlotOptions` has been removed -- Struct `WebAppsUpdateConfigurationSlotResponse` has been removed -- Struct `WebAppsUpdateConfigurationSlotResult` has been removed -- Struct `WebAppsUpdateConnectionStringsOptions` has been removed -- Struct `WebAppsUpdateConnectionStringsResponse` has been removed -- Struct `WebAppsUpdateConnectionStringsResult` has been removed -- Struct `WebAppsUpdateConnectionStringsSlotOptions` has been removed -- Struct `WebAppsUpdateConnectionStringsSlotResponse` has been removed -- Struct `WebAppsUpdateConnectionStringsSlotResult` has been removed -- Struct `WebAppsUpdateDiagnosticLogsConfigOptions` has been removed -- Struct `WebAppsUpdateDiagnosticLogsConfigResponse` has been removed -- Struct `WebAppsUpdateDiagnosticLogsConfigResult` has been removed -- Struct `WebAppsUpdateDiagnosticLogsConfigSlotOptions` has been removed -- Struct `WebAppsUpdateDiagnosticLogsConfigSlotResponse` has been removed -- Struct `WebAppsUpdateDiagnosticLogsConfigSlotResult` has been removed -- Struct `WebAppsUpdateDomainOwnershipIdentifierOptions` has been removed -- Struct `WebAppsUpdateDomainOwnershipIdentifierResponse` has been removed -- Struct `WebAppsUpdateDomainOwnershipIdentifierResult` has been removed -- Struct `WebAppsUpdateDomainOwnershipIdentifierSlotOptions` has been removed -- Struct `WebAppsUpdateDomainOwnershipIdentifierSlotResponse` has been removed -- Struct `WebAppsUpdateDomainOwnershipIdentifierSlotResult` has been removed -- Struct `WebAppsUpdateFtpAllowedOptions` has been removed -- Struct `WebAppsUpdateFtpAllowedResponse` has been removed -- Struct `WebAppsUpdateFtpAllowedResult` has been removed -- Struct `WebAppsUpdateFtpAllowedSlotOptions` has been removed -- Struct `WebAppsUpdateFtpAllowedSlotResponse` has been removed -- Struct `WebAppsUpdateFtpAllowedSlotResult` has been removed -- Struct `WebAppsUpdateHybridConnectionOptions` has been removed -- Struct `WebAppsUpdateHybridConnectionResponse` has been removed -- Struct `WebAppsUpdateHybridConnectionResult` has been removed -- Struct `WebAppsUpdateHybridConnectionSlotOptions` has been removed -- Struct `WebAppsUpdateHybridConnectionSlotResponse` has been removed -- Struct `WebAppsUpdateHybridConnectionSlotResult` has been removed -- Struct `WebAppsUpdateMetadataOptions` has been removed -- Struct `WebAppsUpdateMetadataResponse` has been removed -- Struct `WebAppsUpdateMetadataResult` has been removed -- Struct `WebAppsUpdateMetadataSlotOptions` has been removed -- Struct `WebAppsUpdateMetadataSlotResponse` has been removed -- Struct `WebAppsUpdateMetadataSlotResult` has been removed -- Struct `WebAppsUpdateOptions` has been removed -- Struct `WebAppsUpdatePremierAddOnOptions` has been removed -- Struct `WebAppsUpdatePremierAddOnResponse` has been removed -- Struct `WebAppsUpdatePremierAddOnResult` has been removed -- Struct `WebAppsUpdatePremierAddOnSlotOptions` has been removed -- Struct `WebAppsUpdatePremierAddOnSlotResponse` has been removed -- Struct `WebAppsUpdatePremierAddOnSlotResult` has been removed -- Struct `WebAppsUpdateRelayServiceConnectionOptions` has been removed -- Struct `WebAppsUpdateRelayServiceConnectionResponse` has been removed -- Struct `WebAppsUpdateRelayServiceConnectionResult` has been removed -- Struct `WebAppsUpdateRelayServiceConnectionSlotOptions` has been removed -- Struct `WebAppsUpdateRelayServiceConnectionSlotResponse` has been removed -- Struct `WebAppsUpdateRelayServiceConnectionSlotResult` has been removed -- Struct `WebAppsUpdateResponse` has been removed -- Struct `WebAppsUpdateResult` has been removed -- Struct `WebAppsUpdateScmAllowedOptions` has been removed -- Struct `WebAppsUpdateScmAllowedResponse` has been removed -- Struct `WebAppsUpdateScmAllowedResult` has been removed -- Struct `WebAppsUpdateScmAllowedSlotOptions` has been removed -- Struct `WebAppsUpdateScmAllowedSlotResponse` has been removed -- Struct `WebAppsUpdateScmAllowedSlotResult` has been removed -- Struct `WebAppsUpdateSitePushSettingsOptions` has been removed -- Struct `WebAppsUpdateSitePushSettingsResponse` has been removed -- Struct `WebAppsUpdateSitePushSettingsResult` has been removed -- Struct `WebAppsUpdateSitePushSettingsSlotOptions` has been removed -- Struct `WebAppsUpdateSitePushSettingsSlotResponse` has been removed -- Struct `WebAppsUpdateSitePushSettingsSlotResult` has been removed -- Struct `WebAppsUpdateSlotConfigurationNamesOptions` has been removed -- Struct `WebAppsUpdateSlotConfigurationNamesResponse` has been removed -- Struct `WebAppsUpdateSlotConfigurationNamesResult` has been removed -- Struct `WebAppsUpdateSlotOptions` has been removed -- Struct `WebAppsUpdateSlotResponse` has been removed -- Struct `WebAppsUpdateSlotResult` has been removed -- Struct `WebAppsUpdateSourceControlOptions` has been removed -- Struct `WebAppsUpdateSourceControlResponse` has been removed -- Struct `WebAppsUpdateSourceControlResult` has been removed -- Struct `WebAppsUpdateSourceControlSlotOptions` has been removed -- Struct `WebAppsUpdateSourceControlSlotResponse` has been removed -- Struct `WebAppsUpdateSourceControlSlotResult` has been removed -- Struct `WebAppsUpdateSwiftVirtualNetworkConnectionWithCheckOptions` has been removed -- Struct `WebAppsUpdateSwiftVirtualNetworkConnectionWithCheckResponse` has been removed -- Struct `WebAppsUpdateSwiftVirtualNetworkConnectionWithCheckResult` has been removed -- Struct `WebAppsUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions` has been removed -- Struct `WebAppsUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse` has been removed -- Struct `WebAppsUpdateSwiftVirtualNetworkConnectionWithCheckSlotResult` has been removed -- Struct `WebAppsUpdateVnetConnectionGatewayOptions` has been removed -- Struct `WebAppsUpdateVnetConnectionGatewayResponse` has been removed -- Struct `WebAppsUpdateVnetConnectionGatewayResult` has been removed -- Struct `WebAppsUpdateVnetConnectionGatewaySlotOptions` has been removed -- Struct `WebAppsUpdateVnetConnectionGatewaySlotResponse` has been removed -- Struct `WebAppsUpdateVnetConnectionGatewaySlotResult` has been removed -- Struct `WebAppsUpdateVnetConnectionOptions` has been removed -- Struct `WebAppsUpdateVnetConnectionResponse` has been removed -- Struct `WebAppsUpdateVnetConnectionResult` has been removed -- Struct `WebAppsUpdateVnetConnectionSlotOptions` has been removed -- Struct `WebAppsUpdateVnetConnectionSlotResponse` has been removed -- Struct `WebAppsUpdateVnetConnectionSlotResult` has been removed -- Field `ProxyOnlyResource` of struct `PrivateAccess` has been removed -- Field `ProxyOnlyResource` of struct `DiagnosticAnalysis` has been removed -- Field `ProxyOnlyResource` of struct `AzureStoragePropertyDictionaryResource` has been removed -- Field `ProxyOnlyResource` of struct `TriggeredJobHistory` has been removed -- Field `ProxyOnlyResource` of struct `DiagnosticDetectorResponse` has been removed -- Field `ProxyOnlyResource` of struct `CustomHostnameAnalysisResult` has been removed -- Field `ProxyOnlyResource` of struct `DiagnosticCategory` has been removed -- Field `ProxyOnlyResource` of struct `RestoreRequest` has been removed -- Field `ProxyOnlyResource` of struct `StaticSitesWorkflowPreview` has been removed -- Field `ProxyOnlyResource` of struct `StaticSitesWorkflowPreviewRequest` has been removed -- Field `Resource` of struct `StaticSiteARMResource` has been removed -- Field `ProxyOnlyResource` of struct `PrivateLinkConnectionApprovalRequestResource` has been removed -- Field `ProxyOnlyResource` of struct `PremierAddOnPatchResource` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteUserARMResource` has been removed -- Field `ProxyOnlyResource` of struct `AseV3NetworkingConfiguration` has been removed -- Field `ProxyOnlyResource` of struct `SiteLogsConfig` has been removed -- Field `ProxyOnlyResource` of struct `MigrateMySQLRequest` has been removed -- Field `ProxyOnlyResource` of struct `DetectorResponse` has been removed -- Field `ProxyOnlyResource` of struct `DeletedAppRestoreRequest` has been removed -- Field `ProxyOnlyResource` of struct `SiteAuthSettingsV2` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteUserProvidedFunctionAppARMResource` has been removed -- Field `ProxyOnlyResource` of struct `AnalysisDefinition` has been removed -- Field `ProxyOnlyResource` of struct `APIKVReference` has been removed -- Field `ProxyOnlyResource` of struct `User` has been removed -- Field `ProxyOnlyResource` of struct `PublicCertificate` has been removed -- Field `ProxyOnlyResource` of struct `DomainPatchResource` has been removed -- Field `ProxyOnlyResource` of struct `DomainOwnershipIdentifier` has been removed -- Field `ProxyOnlyResource` of struct `ProcessInfo` has been removed -- Field `ProxyOnlyResource` of struct `ConnectionStringDictionary` has been removed -- Field `ProxyOnlyResource` of struct `DeletedSite` has been removed -- Field `ProxyOnlyResource` of struct `BackupItem` has been removed -- Field `ProxyOnlyResource` of struct `SnapshotRestoreRequest` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteCustomDomainRequestPropertiesARMResource` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteUserInvitationResponseResource` has been removed -- Field `ProxyOnlyResource` of struct `VnetGateway` has been removed -- Field `ProxyOnlyResource` of struct `SiteAuthSettings` has been removed -- Field `Resource` of struct `PremierAddOn` has been removed -- Field `ProxyOnlyResource` of struct `VnetInfoResource` has been removed -- Field `ProxyOnlyResource` of struct `WebAppStack` has been removed -- Field `ProxyOnlyResource` of struct `FunctionEnvelope` has been removed -- Field `ProxyOnlyResource` of struct `SitePatchResource` has been removed -- Field `Resource` of struct `Domain` has been removed -- Field `ProxyOnlyResource` of struct `ResourceMetricDefinition` has been removed -- Field `ProxyOnlyResource` of struct `SiteConfigurationSnapshotInfo` has been removed -- Field `ProxyOnlyResource` of struct `BackupRequest` has been removed -- Field `ProxyOnlyResource` of struct `HybridConnection` has been removed -- Field `ProxyOnlyResource` of struct `Identifier` has been removed -- Field `ProxyOnlyResource` of struct `SwiftVirtualNetwork` has been removed -- Field `ProxyOnlyResource` of struct `VnetRoute` has been removed -- Field `ProxyOnlyResource` of struct `SlotConfigNamesResource` has been removed -- Field `ProxyOnlyResource` of struct `RelayServiceConnectionEntity` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteUserInvitationRequestResource` has been removed -- Field `ProxyOnlyResource` of struct `CertificatePatchResource` has been removed -- Field `ProxyOnlyResource` of struct `RemotePrivateEndpointConnection` has been removed -- Field `ProxyOnlyResource` of struct `SitePhpErrorLogFlag` has been removed -- Field `ProxyOnlyResource` of struct `Deployment` has been removed -- Field `ProxyOnlyResource` of struct `Usage` has been removed -- Field `ProxyOnlyResource` of struct `VnetParameters` has been removed -- Field `ProxyOnlyResource` of struct `SlotDifference` has been removed -- Field `ProxyOnlyResource` of struct `GeoRegion` has been removed -- Field `ProxyOnlyResource` of struct `CertificateOrderAction` has been removed -- Field `ProxyOnlyResource` of struct `WorkerPoolResource` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteFunctionOverviewARMResource` has been removed -- Field `ProxyOnlyResource` of struct `SiteSourceControl` has been removed -- Field `ProxyOnlyResource` of struct `RenewCertificateOrderRequest` has been removed -- Field `ProxyOnlyResource` of struct `StaticSitePatchResource` has been removed -- Field `ProxyOnlyResource` of struct `StorageMigrationResponse` has been removed -- Field `ProxyOnlyResource` of struct `BillingMeter` has been removed -- Field `ProxyOnlyResource` of struct `DetectorDefinitionResource` has been removed -- Field `ProxyOnlyResource` of struct `MSDeployStatus` has been removed -- Field `ProxyOnlyResource` of struct `StringDictionary` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteUserProvidedFunctionApp` has been removed -- Field `ProxyOnlyResource` of struct `AddressResponse` has been removed -- Field `ProxyOnlyResource` of struct `ResourceHealthMetadata` has been removed -- Field `ProxyOnlyResource` of struct `TopLevelDomain` has been removed -- Field `ProxyOnlyResource` of struct `SourceControl` has been removed -- Field `ProxyOnlyResource` of struct `SiteExtensionInfo` has been removed -- Field `ProxyOnlyResource` of struct `Recommendation` has been removed -- Field `ProxyOnlyResource` of struct `MSDeploy` has been removed -- Field `ProxyOnlyResource` of struct `VnetValidationFailureDetails` has been removed -- Field `ProxyOnlyResource` of struct `ContinuousWebJob` has been removed -- Field `ProxyOnlyResource` of struct `WebJob` has been removed -- Field `ProxyOnlyResource` of struct `WebSiteInstanceStatus` has been removed -- Field `ProxyOnlyResource` of struct `PremierAddOnOffer` has been removed -- Field `ProxyOnlyResource` of struct `RecommendationRule` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteCustomDomainOverviewARMResource` has been removed -- Field `ProxyOnlyResource` of struct `VnetValidationTestFailure` has been removed -- Field `ProxyOnlyResource` of struct `CsmPublishingCredentialsPoliciesEntity` has been removed -- Field `ProxyOnlyResource` of struct `HostNameBinding` has been removed -- Field `Resource` of struct `Certificate` has been removed -- Field `Properties` of struct `Certificate` has been removed -- Field `ProxyOnlyResource` of struct `MSDeployLog` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteBuildARMResource` has been removed -- Field `ProxyOnlyResource` of struct `ApplicationStackResource` has been removed -- Field `Resource` of struct `Site` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteResetPropertiesARMResource` has been removed -- Field `ProxyOnlyResource` of struct `NetworkFeatures` has been removed -- Field `ProxyOnlyResource` of struct `HybridConnectionKey` has been removed -- Field `ProxyOnlyResource` of struct `FunctionAppStack` has been removed -- Field `ProxyOnlyResource` of struct `StringList` has been removed -- Field `ProxyOnlyResource` of struct `ReissueCertificateOrderRequest` has been removed -- Field `ProxyOnlyResource` of struct `ProcessModuleInfo` has been removed -- Field `ProxyOnlyResource` of struct `PushSettings` has been removed -- Field `ProxyOnlyResource` of struct `Snapshot` has been removed -- Field `ProxyOnlyResource` of struct `MigrateMySQLStatus` has been removed -- Field `ProxyOnlyResource` of struct `KubeEnvironmentPatchResource` has been removed -- Field `ProxyOnlyResource` of struct `StaticSiteZipDeploymentARMResource` has been removed -- Field `ProxyOnlyResource` of struct `HybridConnectionLimits` has been removed -- Field `ProxyOnlyResource` of struct `ProcessThreadInfo` has been removed -- Field `ProxyOnlyResource` of struct `SiteConfigResource` has been removed -- Field `ProxyOnlyResource` of struct `StorageMigrationOptions` has been removed -- Field `ProxyOnlyResource` of struct `RemotePrivateEndpointConnectionARMResource` has been removed -- Field `Resource` of struct `KubeEnvironment` has been removed -- Field `ProxyOnlyResource` of struct `TriggeredWebJob` has been removed -- Field `ProxyOnlyResource` of struct `CertificateEmail` has been removed - -### Features Added - -- New const `Enum20LinuxFunctions` -- New const `Enum15WindowsFunctions` -- New const `RevisionProvisioningStateProvisioned` -- New const `Enum20Windows` -- New const `EnterpriseGradeCdnStatusDisabled` -- New const `RevisionProvisioningStateProvisioning` -- New const `ActiveRevisionsModeMultiple` -- New const `Enum16All` -- New const `IngressTransportMethodHTTP` -- New const `Enum15All` -- New const `Enum18Windows` -- New const `ContainerAppProvisioningStateInProgress` -- New const `Enum15Linux` -- New const `Enum17Linux` -- New const `Enum20WindowsFunctions` -- New const `ContainerAppProvisioningStateSucceeded` -- New const `IngressTransportMethodAuto` -- New const `Enum16Windows` -- New const `Enum16Linux` -- New const `ActiveRevisionsModeSingle` -- New const `IngressTransportMethodHTTP2` -- New const `Enum15Windows` -- New const `RevisionHealthStateUnhealthy` -- New const `RevisionProvisioningStateDeprovisioning` -- New const `EnterpriseGradeCdnStatusEnabling` -- New const `ContainerAppProvisioningStateFailed` -- New const `Enum17Windows` -- New const `RevisionHealthStateNone` -- New const `EnterpriseGradeCdnStatusEnabled` -- New const `ContainerAppProvisioningStateCanceled` -- New const `Enum20All` -- New const `EnterpriseGradeCdnStatusDisabling` -- New const `Enum19Windows` -- New const `Enum15LinuxFunctions` -- New const `Enum20Linux` -- New const `Enum17All` -- New const `RevisionHealthStateHealthy` -- New const `Enum19Linux` -- New const `RevisionProvisioningStateFailed` -- New const `Enum19All` -- New const `RevisionProvisioningStateDeprovisioned` -- New const `Enum18All` -- New const `Enum18Linux` -- New function `*EnvironmentsClientListWorkerPoolSKUsPager.PageResponse() EnvironmentsClientListWorkerPoolSKUsResponse` -- New function `EnvironmentsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (EnvironmentsClientCreateOrUpdateResponse, error)` -- New function `*EnvironmentsClientSuspendPager.Err() error` -- New function `*WebAppsClientSwapSlotWithProductionPoller.Poll(context.Context) (*http.Response, error)` -- New function `*EnvironmentsClient.GetWorkerPool(context.Context, string, string, string, *EnvironmentsClientGetWorkerPoolOptions) (EnvironmentsClientGetWorkerPoolResponse, error)` -- New function `*WebAppsClientListWebJobsPager.Err() error` -- New function `*ProviderClientGetWebAppStacksPager.NextPage(context.Context) bool` -- New function `StaticSitesClientDeleteStaticSitePollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientDeleteStaticSiteResponse, error)` -- New function `*WebAppsClientSwapSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientRestorePoller.ResumeToken() (string, error)` -- New function `*ContainerAppsClient.ListSecrets(context.Context, string, *ContainerAppsClientListSecretsOptions) (ContainerAppsClientListSecretsResponse, error)` -- New function `Plan.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientListPublishingCredentialsPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `EnvironmentCollection.MarshalJSON() ([]byte, error)` -- New function `*EnvironmentsClientListWorkerPoolsPager.Err() error` -- New function `*StaticSitesClientApproveOrRejectPrivateEndpointConnectionPoller.ResumeToken() (string, error)` -- New function `RevisionProperties.MarshalJSON() ([]byte, error)` -- New function `WebAppsClientSwapSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientSwapSlotResponse, error)` -- New function `PossibleActiveRevisionsModeValues() []ActiveRevisionsMode` -- New function `*WebAppsClientRestoreFromDeletedAppSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*KubeEnvironmentsClientDeletePollerResponse.Resume(context.Context, *KubeEnvironmentsClient, string) error` -- New function `*WebAppsClientRestoreFromDeletedAppSlotPoller.FinalResponse(context.Context) (WebAppsClientRestoreFromDeletedAppSlotResponse, error)` -- New function `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse, error)` -- New function `*WebAppsClientListConfigurationSnapshotInfoSlotPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientListPager.NextPage(context.Context) bool` -- New function `*WebAppsClientDeletePrivateEndpointConnectionSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientStartNetworkTracePoller.Done() bool` -- New function `*WebAppsClientSwapSlotPoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClientCreateOrUpdateWorkerPoolPollerResponse.Resume(context.Context, *EnvironmentsClient, string) error` -- New function `*PlansClientListWebAppsByHybridConnectionPager.Err() error` -- New function `*ContainerAppsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListSiteBackupsSlotPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListDomainOwnershipIdentifiersSlotPager.Err() error` -- New function `PossibleEnum20Values() []Enum20` -- New function `*WebAppsClientListPublicCertificatesPager.Err() error` -- New function `*EnvironmentsClientDeletePrivateEndpointConnectionPollerResponse.Resume(context.Context, *EnvironmentsClient, string) error` -- New function `*EnvironmentsClientCreateOrUpdateWorkerPoolPoller.Poll(context.Context) (*http.Response, error)` -- New function `*StaticSitesClientGetPrivateEndpointConnectionListPager.NextPage(context.Context) bool` -- New function `WebAppsClientCreateOrUpdateSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientCreateOrUpdateSlotResponse, error)` -- New function `*WebAppsClientCreateMSDeployOperationSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*EnvironmentsClientCreateOrUpdateMultiRolePoolPoller.Poll(context.Context) (*http.Response, error)` -- New function `*EnvironmentsClientGetInboundNetworkDependenciesEndpointsPager.PageResponse() EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse` -- New function `*WebAppsClientListInstanceFunctionsSlotPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPoller.Done() bool` -- New function `*WebAppsClientListSlotDifferencesSlotPager.PageResponse() WebAppsClientListSlotDifferencesSlotResponse` -- New function `WebAppsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientCreateOrUpdateResponse, error)` -- New function `*WebAppsClientCreateInstanceMSDeployOperationSlotPoller.FinalResponse(context.Context) (WebAppsClientCreateInstanceMSDeployOperationSlotResponse, error)` -- New function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSitePager.PageResponse() StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse` -- New function `CertificateOrdersClientCreateOrUpdateCertificatePollerResponse.PollUntilDone(context.Context, time.Duration) (CertificateOrdersClientCreateOrUpdateCertificateResponse, error)` -- New function `*WebAppsClientRestoreFromBackupBlobSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*EnvironmentsClientListWorkerPoolSKUsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesPager.PageResponse() WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse` -- New function `*EnvironmentsClientListMultiRolePoolSKUsPager.PageResponse() EnvironmentsClientListMultiRolePoolSKUsResponse` -- New function `*PlansClient.Update(context.Context, string, string, PlanPatchResource, *PlansClientUpdateOptions) (PlansClientUpdateResponse, error)` -- New function `*WebAppsClientListInstanceProcessesPager.PageResponse() WebAppsClientListInstanceProcessesResponse` -- New function `*StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `*WebAppsClientListInstanceProcessModulesPager.Err() error` -- New function `*WebAppsClientMigrateStoragePoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClientListMultiRoleMetricDefinitionsPager.Err() error` -- New function `*RecommendationsClientListHistoryForWebAppPager.NextPage(context.Context) bool` -- New function `*CertificateOrdersClientCreateOrUpdatePollerResponse.Resume(context.Context, *CertificateOrdersClient, string) error` -- New function `*KubeEnvironmentsClientDeletePoller.ResumeToken() (string, error)` -- New function `*WebAppsClientRestoreFromDeletedAppPoller.Done() bool` -- New function `*ResourceHealthMetadataClientListBySitePager.Err() error` -- New function `*EnvironmentsClient.GetMultiRolePool(context.Context, string, string, *EnvironmentsClientGetMultiRolePoolOptions) (EnvironmentsClientGetMultiRolePoolResponse, error)` -- New function `*WebAppsClientListContinuousWebJobsSlotPager.Err() error` -- New function `*WebAppsClientListHostNameBindingsSlotPager.PageResponse() WebAppsClientListHostNameBindingsSlotResponse` -- New function `SecretsCollection.MarshalJSON() ([]byte, error)` -- New function `*DiagnosticsClientListSiteDetectorResponsesSlotPager.PageResponse() DiagnosticsClientListSiteDetectorResponsesSlotResponse` -- New function `WebAppsClientInstallSiteExtensionSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientInstallSiteExtensionSlotResponse, error)` -- New function `*StaticSitesClientCreateZipDeploymentForStaticSiteBuildPoller.Poll(context.Context) (*http.Response, error)` -- New function `*RecommendationsClientListRecommendedRulesForHostingEnvironmentPager.Err() error` -- New function `*StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePoller.ResumeToken() (string, error)` -- New function `*WebAppsClientCreateOrUpdateSourceControlSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*DiagnosticsClientListSiteDiagnosticCategoriesPager.PageResponse() DiagnosticsClientListSiteDiagnosticCategoriesResponse` -- New function `*CertificateOrdersClientListByResourceGroupPager.Err() error` -- New function `*WebAppsClientListConfigurationsPager.Err() error` -- New function `*DiagnosticsClientListSiteDiagnosticCategoriesSlotPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPoller.FinalResponse(context.Context) (StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse, error)` -- New function `*WebAppsClientCreateInstanceMSDeployOperationPoller.FinalResponse(context.Context) (WebAppsClientCreateInstanceMSDeployOperationResponse, error)` -- New function `*ResourceHealthMetadataClientListByResourceGroupPager.PageResponse() ResourceHealthMetadataClientListByResourceGroupResponse` -- New function `*ContainerAppsRevisionsClient.ListRevisions(string, string, *ContainerAppsRevisionsClientListRevisionsOptions) *ContainerAppsRevisionsClientListRevisionsPager` -- New function `*WebAppsClientInstallSiteExtensionPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebAppsClientCreateMSDeployOperationPoller.ResumeToken() (string, error)` -- New function `*RevisionProperties.UnmarshalJSON([]byte) error` -- New function `*WebAppsClientRestoreFromBackupBlobSlotPoller.Done() bool` -- New function `WebAppsClientRestoreFromBackupBlobPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientRestoreFromBackupBlobResponse, error)` -- New function `*ResourceHealthMetadataClientListBySiteSlotPager.Err() error` -- New function `*EnvironmentsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*CertificateOrdersClientListCertificatesPager.Err() error` -- New function `*StaticSitesClientCreateZipDeploymentForStaticSiteBuildPoller.Done() bool` -- New function `*EnvironmentsClientChangeVnetPoller.Poll(context.Context) (*http.Response, error)` -- New function `*StaticSitesClientGetStaticSitesByResourceGroupPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClient.BeginChangeVnet(context.Context, string, string, VirtualNetworkProfile, *EnvironmentsClientBeginChangeVnetOptions) (EnvironmentsClientChangeVnetPollerResponse, error)` -- New function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildPager.PageResponse() StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse` -- New function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSitePager.NextPage(context.Context) bool` -- New function `AppCertificatePatchResourceProperties.MarshalJSON() ([]byte, error)` -- New function `EnvironmentsClientSuspendPollerResponse.PollUntilDone(context.Context, time.Duration) (*EnvironmentsClientSuspendPager, error)` -- New function `*CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponsePager.NextPage(context.Context) bool` -- New function `*WebAppsClientListPublishingCredentialsSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebAppsClientGetAppSettingsKeyVaultReferencesPager.NextPage(context.Context) bool` -- New function `*WebAppsClientSwapSlotWithProductionPoller.FinalResponse(context.Context) (WebAppsClientSwapSlotWithProductionResponse, error)` -- New function `AppCertificate.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientRestoreFromDeletedAppSlotPoller.Done() bool` -- New function `*WebAppsClientListSlotsPager.Err() error` -- New function `*WebAppsClientListPublishingCredentialsSlotPoller.ResumeToken() (string, error)` -- New function `NewPlansClient(string, azcore.TokenCredential, *arm.ClientOptions) *PlansClient` -- New function `*WebAppsClientMigrateMySQLPoller.Poll(context.Context) (*http.Response, error)` -- New function `PossibleRevisionProvisioningStateValues() []RevisionProvisioningState` -- New function `*EnvironmentsClient.ListOperations(context.Context, string, string, *EnvironmentsClientListOperationsOptions) (EnvironmentsClientListOperationsResponse, error)` -- New function `*WebAppsClientCreateInstanceMSDeployOperationSlotPoller.Done() bool` -- New function `*WebAppsClientListProcessesPager.PageResponse() WebAppsClientListProcessesResponse` -- New function `*WebAppsClientListPerfMonCountersSlotPager.NextPage(context.Context) bool` -- New function `*PlansClient.RestartWebApps(context.Context, string, string, *PlansClientRestartWebAppsOptions) (PlansClientRestartWebAppsResponse, error)` -- New function `*WebAppsClientRestoreSnapshotPoller.FinalResponse(context.Context) (WebAppsClientRestoreSnapshotResponse, error)` -- New function `*CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponsePager.PageResponse() CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse` -- New function `*WebAppsClientListConfigurationsPager.PageResponse() WebAppsClientListConfigurationsResponse` -- New function `*StaticSitesClientDeletePrivateEndpointConnectionPoller.Done() bool` -- New function `*WebAppsClientListProcessesSlotPager.PageResponse() WebAppsClientListProcessesSlotResponse` -- New function `*EnvironmentsClientResumePager.NextPage(context.Context) bool` -- New function `*WebAppsClientDeletePrivateEndpointConnectionPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientCreateOrUpdateSourceControlSlotPoller.FinalResponse(context.Context) (WebAppsClientCreateOrUpdateSourceControlSlotResponse, error)` -- New function `*WebAppsClientDeletePrivateEndpointConnectionSlotPoller.FinalResponse(context.Context) (WebAppsClientDeletePrivateEndpointConnectionSlotResponse, error)` -- New function `*EnvironmentsClientGetInboundNetworkDependenciesEndpointsPager.NextPage(context.Context) bool` -- New function `*ResourceHealthMetadataClientListBySitePager.PageResponse() ResourceHealthMetadataClientListBySiteResponse` -- New function `*WebAppsClientRestoreFromDeletedAppPoller.Poll(context.Context) (*http.Response, error)` -- New function `*DiagnosticsClientListSiteDetectorsPager.Err() error` -- New function `*WebAppsClientListHostNameBindingsSlotPager.Err() error` -- New function `*WebAppsClientListConfigurationSnapshotInfoSlotPager.PageResponse() WebAppsClientListConfigurationSnapshotInfoSlotResponse` -- New function `WebAppsClientCreateInstanceMSDeployOperationPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientCreateInstanceMSDeployOperationResponse, error)` -- New function `*EnvironmentsClientCreateOrUpdateMultiRolePoolPoller.Done() bool` -- New function `*EnvironmentsClient.ListWebWorkerMetricDefinitions(string, string, string, *EnvironmentsClientListWebWorkerMetricDefinitionsOptions) *EnvironmentsClientListWebWorkerMetricDefinitionsPager` -- New function `*WebAppsClientCreateOrUpdateSlotPoller.Done() bool` -- New function `*EnvironmentsClientDeletePrivateEndpointConnectionPoller.FinalResponse(context.Context) (EnvironmentsClientDeletePrivateEndpointConnectionResponse, error)` -- New function `RevisionProvisioningState.ToPtr() *RevisionProvisioningState` -- New function `*WebAppsClientCreateInstanceFunctionSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ProviderClientGetFunctionAppStacksForLocationPager.NextPage(context.Context) bool` -- New function `*CertificateOrdersClient.UpdateCertificate(context.Context, string, string, string, CertificatePatchResource, *CertificateOrdersClientUpdateCertificateOptions) (CertificateOrdersClientUpdateCertificateResponse, error)` -- New function `*EnvironmentsClientCreateOrUpdatePoller.FinalResponse(context.Context) (EnvironmentsClientCreateOrUpdateResponse, error)` -- New function `*CertificateOrdersClient.RetrieveCertificateActions(context.Context, string, string, *CertificateOrdersClientRetrieveCertificateActionsOptions) (CertificateOrdersClientRetrieveCertificateActionsResponse, error)` -- New function `*DomainsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClient.BeginSuspend(context.Context, string, string, *EnvironmentsClientBeginSuspendOptions) (EnvironmentsClientSuspendPollerResponse, error)` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationPoller.FinalResponse(context.Context) (WebAppsClientStartWebSiteNetworkTraceOperationResponse, error)` -- New function `*EnvironmentsClientListUsagesPager.PageResponse() EnvironmentsClientListUsagesResponse` -- New function `*EnvironmentsClientSuspendPollerResponse.Resume(context.Context, *EnvironmentsClient, string) error` -- New function `PossibleEnterpriseGradeCdnStatusValues() []EnterpriseGradeCdnStatus` -- New function `*EnvironmentsClient.ListWorkerPools(string, string, *EnvironmentsClientListWorkerPoolsOptions) *EnvironmentsClientListWorkerPoolsPager` -- New function `*RecommendationsClientListHistoryForHostingEnvironmentPager.Err() error` -- New function `*WebAppsClientStartNetworkTraceSlotPoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClientDeletePoller.ResumeToken() (string, error)` -- New function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotPager.Err() error` -- New function `*EnvironmentsClientDeletePrivateEndpointConnectionPoller.Done() bool` -- New function `*RecommendationsClientListRecommendedRulesForWebAppPager.NextPage(context.Context) bool` -- New function `CustomHostnameSitesProperties.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientListConfigurationSnapshotInfoSlotPager.Err() error` -- New function `*WebAppsClientGetAppSettingsKeyVaultReferencesSlotPager.NextPage(context.Context) bool` -- New function `AppCertificateCollection.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientRestoreSnapshotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientCreateOrUpdateSourceControlSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListUsagesPager.PageResponse() WebAppsClientListUsagesResponse` -- New function `*EnvironmentsClientListMultiRolePoolsPager.NextPage(context.Context) bool` -- New function `*ProviderClientListOperationsPager.PageResponse() ProviderClientListOperationsResponse` -- New function `*CertificateOrdersClient.Reissue(context.Context, string, string, ReissueCertificateOrderRequest, *CertificateOrdersClientReissueOptions) (CertificateOrdersClientReissueResponse, error)` -- New function `WebAppsClientListPublishingCredentialsPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientListPublishingCredentialsResponse, error)` -- New function `*StaticSitesClientDeleteStaticSiteBuildPoller.FinalResponse(context.Context) (StaticSitesClientDeleteStaticSiteBuildResponse, error)` -- New function `PlansClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (PlansClientCreateOrUpdateResponse, error)` -- New function `*ContainerAppsClient.BeginDelete(context.Context, string, string, *ContainerAppsClientBeginDeleteOptions) (ContainerAppsClientDeletePollerResponse, error)` -- New function `*EnvironmentsClientListWebWorkerUsagesPager.PageResponse() EnvironmentsClientListWebWorkerUsagesResponse` -- New function `*StaticSitesClientListStaticSiteCustomDomainsPager.PageResponse() StaticSitesClientListStaticSiteCustomDomainsResponse` -- New function `*WebAppsClientListPublicCertificatesSlotPager.PageResponse() WebAppsClientListPublicCertificatesSlotResponse` -- New function `*WebAppsClientListByResourceGroupPager.Err() error` -- New function `*WebAppsClientListTriggeredWebJobHistoryPager.Err() error` -- New function `*EnvironmentsClientCreateOrUpdateMultiRolePoolPollerResponse.Resume(context.Context, *EnvironmentsClient, string) error` -- New function `*WebAppsClientListSnapshotsPager.Err() error` -- New function `*EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPollerResponse.Resume(context.Context, *EnvironmentsClient, string) error` -- New function `Enum20.ToPtr() *Enum20` -- New function `*WebAppsClientCreateFunctionPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListHostNameBindingsPager.PageResponse() WebAppsClientListHostNameBindingsResponse` -- New function `*WebAppsClientRestoreFromDeletedAppPoller.ResumeToken() (string, error)` -- New function `*DomainsClientListByResourceGroupPager.PageResponse() DomainsClientListByResourceGroupResponse` -- New function `WebAppsClientCreateOrUpdateSourceControlSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientCreateOrUpdateSourceControlSlotResponse, error)` -- New function `*WebAppsClientListProcessesPager.Err() error` -- New function `*EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPollerResponse, error)` -- New function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotPager.PageResponse() WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse` -- New function `*EnvironmentsClientListCapacitiesPager.PageResponse() EnvironmentsClientListCapacitiesResponse` -- New function `*KubeEnvironmentsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*StaticSitesClientCreateZipDeploymentForStaticSitePoller.Done() bool` -- New function `*WebAppsClientListSlotDifferencesFromProductionPager.NextPage(context.Context) bool` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebAppsClientListPublishingCredentialsSlotPoller.Done() bool` -- New function `*WebAppsClientListInstanceProcessThreadsPager.PageResponse() WebAppsClientListInstanceProcessThreadsResponse` -- New function `*EnvironmentsClient.ListMultiRolePools(string, string, *EnvironmentsClientListMultiRolePoolsOptions) *EnvironmentsClientListMultiRolePoolsPager` -- New function `*CertificateOrdersClient.GetCertificate(context.Context, string, string, string, *CertificateOrdersClientGetCertificateOptions) (CertificateOrdersClientGetCertificateResponse, error)` -- New function `*PlansClientListByResourceGroupPager.PageResponse() PlansClientListByResourceGroupResponse` -- New function `*PlansClient.ListWebApps(string, string, *PlansClientListWebAppsOptions) *PlansClientListWebAppsPager` -- New function `*WebAppsClientDeletePrivateEndpointConnectionSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationPoller.Poll(context.Context) (*http.Response, error)` -- New function `*EnvironmentsClient.BeginDelete(context.Context, string, string, *EnvironmentsClientBeginDeleteOptions) (EnvironmentsClientDeletePollerResponse, error)` -- New function `*StaticSitesClientApproveOrRejectPrivateEndpointConnectionPollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `*WebAppsClientGetPrivateEndpointConnectionListPager.NextPage(context.Context) bool` -- New function `ContainerAppCollection.MarshalJSON() ([]byte, error)` -- New function `*EnvironmentsClientCreateOrUpdateMultiRolePoolPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientDeletePrivateEndpointConnectionPoller.Done() bool` -- New function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildPager.Err() error` -- New function `*EnvironmentsClient.BeginCreateOrUpdateMultiRolePool(context.Context, string, string, WorkerPoolResource, *EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (EnvironmentsClientCreateOrUpdateMultiRolePoolPollerResponse, error)` -- New function `*StaticSitesClientDetachStaticSitePollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `*WebAppsClientListSiteBackupsPager.PageResponse() WebAppsClientListSiteBackupsResponse` -- New function `*WebAppsClientListInstanceProcessThreadsSlotPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListInstanceFunctionsSlotPager.Err() error` -- New function `*WebAppsClientRestoreSlotPoller.ResumeToken() (string, error)` -- New function `*CertificateOrdersClientCreateOrUpdateCertificatePoller.Done() bool` -- New function `*EnvironmentsClientDeletePrivateEndpointConnectionPoller.ResumeToken() (string, error)` -- New function `PlanPatchResource.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientListSiteBackupsPager.Err() error` -- New function `*WebAppsClientListPublishingCredentialsPoller.FinalResponse(context.Context) (WebAppsClientListPublishingCredentialsResponse, error)` -- New function `*StaticSitesClientListPager.PageResponse() StaticSitesClientListResponse` -- New function `*EnvironmentsClient.BeginResume(context.Context, string, string, *EnvironmentsClientBeginResumeOptions) (EnvironmentsClientResumePollerResponse, error)` -- New function `PossibleEnum17Values() []Enum17` -- New function `WebAppsClientCreateOrUpdateSourceControlPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientCreateOrUpdateSourceControlResponse, error)` -- New function `*PlansClient.ListHybridConnectionKeys(context.Context, string, string, string, string, *PlansClientListHybridConnectionKeysOptions) (PlansClientListHybridConnectionKeysResponse, error)` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotPoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClient.GetDiagnosticsItem(context.Context, string, string, string, *EnvironmentsClientGetDiagnosticsItemOptions) (EnvironmentsClientGetDiagnosticsItemResponse, error)` -- New function `*WebAppsClientListWebJobsSlotPager.PageResponse() WebAppsClientListWebJobsSlotResponse` -- New function `*RecommendationsClientListPager.NextPage(context.Context) bool` -- New function `WebAppsClientRestoreSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientRestoreSlotResponse, error)` -- New function `*WebAppsClientListInstanceProcessThreadsPager.Err() error` -- New function `*WebAppsClientListPerfMonCountersPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListSiteExtensionsPager.PageResponse() WebAppsClientListSiteExtensionsResponse` -- New function `*StaticSitesClientGetPrivateEndpointConnectionListPager.PageResponse() StaticSitesClientGetPrivateEndpointConnectionListResponse` -- New function `Configuration.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientRestoreSnapshotSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*ProviderClientGetWebAppStacksPager.PageResponse() ProviderClientGetWebAppStacksResponse` -- New function `*EnvironmentsClientDeletePrivateEndpointConnectionPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClient.GetOneDeployStatus(context.Context, string, string, *WebAppsClientGetOneDeployStatusOptions) (WebAppsClientGetOneDeployStatusResponse, error)` -- New function `*StaticSitesClientDetachStaticSitePoller.Done() bool` -- New function `*StaticSitesClientDeleteStaticSitePoller.FinalResponse(context.Context) (StaticSitesClientDeleteStaticSiteResponse, error)` -- New function `WebAppsClientDeletePrivateEndpointConnectionSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientDeletePrivateEndpointConnectionSlotResponse, error)` -- New function `*WebAppsClientListSnapshotsSlotPager.PageResponse() WebAppsClientListSnapshotsSlotResponse` -- New function `*EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsPager.PageResponse() EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse` -- New function `*CertificateOrdersClient.ValidatePurchaseInformation(context.Context, CertificateOrder, *CertificateOrdersClientValidatePurchaseInformationOptions) (CertificateOrdersClientValidatePurchaseInformationResponse, error)` -- New function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebAppsClientListConfigurationSnapshotInfoPager.PageResponse() WebAppsClientListConfigurationSnapshotInfoResponse` -- New function `EnvironmentsClientResumePollerResponse.PollUntilDone(context.Context, time.Duration) (*EnvironmentsClientResumePager, error)` -- New function `*ContainerAppsClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*WebAppsClientDeletePrivateEndpointConnectionPoller.Poll(context.Context) (*http.Response, error)` -- New function `AppCertificateProperties.MarshalJSON() ([]byte, error)` -- New function `*DiagnosticsClientListSiteAnalysesPager.PageResponse() DiagnosticsClientListSiteAnalysesResponse` -- New function `*WebAppsClientInstallSiteExtensionPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientSwapSlotWithProductionPoller.ResumeToken() (string, error)` -- New function `*KubeEnvironmentsClientCreateOrUpdatePoller.Done() bool` -- New function `*DiagnosticsClientListSiteDetectorResponsesPager.PageResponse() DiagnosticsClientListSiteDetectorResponsesResponse` -- New function `Enum15.ToPtr() *Enum15` -- New function `*WebAppsClientGetPrivateEndpointConnectionListSlotPager.Err() error` -- New function `*RecommendationsClientListRecommendedRulesForWebAppPager.PageResponse() RecommendationsClientListRecommendedRulesForWebAppResponse` -- New function `*WebAppsClientCreateMSDeployOperationSlotPoller.FinalResponse(context.Context) (WebAppsClientCreateMSDeployOperationSlotResponse, error)` -- New function `*WebAppsClientCreateOrUpdateSourceControlPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*StaticSitesClientListStaticSiteUsersPager.PageResponse() StaticSitesClientListStaticSiteUsersResponse` -- New function `PlanProperties.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientCreateOrUpdateSourceControlSlotPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientListContinuousWebJobsSlotPager.PageResponse() WebAppsClientListContinuousWebJobsSlotResponse` -- New function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSitePager.Err() error` -- New function `*EnvironmentsClientGetOutboundNetworkDependenciesEndpointsPager.PageResponse() EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse` -- New function `*EnvironmentsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*DeletedWebAppsClientListByLocationPager.NextPage(context.Context) bool` -- New function `*KubeEnvironmentsClientDeletePoller.Done() bool` -- New function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesPager.Err() error` -- New function `*WebAppsClientMigrateStoragePoller.Done() bool` -- New function `*StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePoller.FinalResponse(context.Context) (StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse, error)` -- New function `WebAppsClientRestoreSnapshotSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientRestoreSnapshotSlotResponse, error)` -- New function `*WebAppsClientListInstanceProcessesPager.NextPage(context.Context) bool` -- New function `*ProviderClientGetFunctionAppStacksPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListInstanceIdentifiersSlotPager.PageResponse() WebAppsClientListInstanceIdentifiersSlotResponse` -- New function `*DiagnosticsClientListSiteDetectorsSlotPager.NextPage(context.Context) bool` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationPoller.Done() bool` -- New function `*EnvironmentsClientChangeVnetPager.PageResponse() EnvironmentsClientChangeVnetResponse` -- New function `*EnvironmentsClient.GetAseV3NetworkingConfiguration(context.Context, string, string, *EnvironmentsClientGetAseV3NetworkingConfigurationOptions) (EnvironmentsClientGetAseV3NetworkingConfigurationResponse, error)` -- New function `*StaticSitesClientDeleteStaticSitePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ProviderClientGetAvailableStacksOnPremPager.Err() error` -- New function `*WebAppsClientCreateOrUpdateSourceControlPoller.ResumeToken() (string, error)` -- New function `*CertificateOrdersClient.Delete(context.Context, string, string, *CertificateOrdersClientDeleteOptions) (CertificateOrdersClientDeleteResponse, error)` -- New function `*CertificateOrdersClientListPager.Err() error` -- New function `*WebAppsClientListProcessesPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListBackupsPager.Err() error` -- New function `*DeletedWebAppsClientListPager.PageResponse() DeletedWebAppsClientListResponse` -- New function `Template.MarshalJSON() ([]byte, error)` -- New function `*StaticSitesClientGetPrivateEndpointConnectionListPager.Err() error` -- New function `*DomainsClientListRecommendationsPager.PageResponse() DomainsClientListRecommendationsResponse` -- New function `*DiagnosticsClientListSiteDetectorsPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientCreateZipDeploymentForStaticSiteBuildPoller.FinalResponse(context.Context) (StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse, error)` -- New function `*WebAppsClientListHostNameBindingsSlotPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPoller.FinalResponse(context.Context) (EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse, error)` -- New function `EnvironmentsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (EnvironmentsClientDeleteResponse, error)` -- New function `*WebAppsClientListBackupsPager.NextPage(context.Context) bool` -- New function `*ProviderClientGetWebAppStacksForLocationPager.Err() error` -- New function `*WebAppsClientListSnapshotsFromDRSecondaryPager.Err() error` -- New function `*WebAppsClientSwapSlotWithProductionPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*EnvironmentsClientSuspendPager.NextPage(context.Context) bool` -- New function `*DeletedWebAppsClientListByLocationPager.PageResponse() DeletedWebAppsClientListByLocationResponse` -- New function `*EnvironmentsClientListByResourceGroupPager.Err() error` -- New function `EnvironmentsClientCreateOrUpdateMultiRolePoolPollerResponse.PollUntilDone(context.Context, time.Duration) (EnvironmentsClientCreateOrUpdateMultiRolePoolResponse, error)` -- New function `*CertificateOrdersClient.List(*CertificateOrdersClientListOptions) *CertificateOrdersClientListPager` -- New function `*CertificatesClientListByResourceGroupPager.Err() error` -- New function `PossibleEnum15Values() []Enum15` -- New function `*WebAppsClientStartNetworkTracePoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClient.ListWorkerPoolInstanceMetricDefinitions(string, string, string, string, *EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions) *EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsPager` -- New function `EnvironmentResource.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientListProcessModulesPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListPublishingCredentialsSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientSwapSlotWithProductionPoller.Done() bool` -- New function `*KubeEnvironmentsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*StaticSitesClientDeleteStaticSiteBuildPoller.ResumeToken() (string, error)` -- New function `WebAppsClientMigrateMySQLPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientMigrateMySQLResponse, error)` -- New function `WebAppsClientCreateInstanceMSDeployOperationSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientCreateInstanceMSDeployOperationSlotResponse, error)` -- New function `*StaticSitesClientCreateZipDeploymentForStaticSitePollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `*WebAppsClientListSiteExtensionsSlotPager.Err() error` -- New function `WebAppsClientApproveOrRejectPrivateEndpointConnectionPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse, error)` -- New function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `*ContainerAppsRevisionsClientListRevisionsPager.Err() error` -- New function `WebAppsClientRestorePollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientRestoreResponse, error)` -- New function `*WebAppsClientListByResourceGroupPager.PageResponse() WebAppsClientListByResourceGroupResponse` -- New function `*StaticSitesClientDeleteStaticSiteCustomDomainPoller.FinalResponse(context.Context) (StaticSitesClientDeleteStaticSiteCustomDomainResponse, error)` -- New function `*WebAppsClientListProcessModulesSlotPager.NextPage(context.Context) bool` -- New function `EnterpriseGradeCdnStatus.ToPtr() *EnterpriseGradeCdnStatus` -- New function `*WebAppsClientStartNetworkTraceSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientInstallSiteExtensionSlotPoller.ResumeToken() (string, error)` -- New function `*TopLevelDomainsClientListPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientListStaticSiteFunctionsPager.Err() error` -- New function `*WebAppsClientListSlotsPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `WebAppsClientStartWebSiteNetworkTraceOperationSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse, error)` -- New function `*DomainsClientListByResourceGroupPager.Err() error` -- New function `*WebAppsClientListBasicPublishingCredentialsPoliciesPager.NextPage(context.Context) bool` -- New function `*CertificateOrdersClient.RetrieveSiteSeal(context.Context, string, string, SiteSealRequest, *CertificateOrdersClientRetrieveSiteSealOptions) (CertificateOrdersClientRetrieveSiteSealResponse, error)` -- New function `*WebAppsClientRestoreFromBackupBlobSlotPoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClientListMultiRolePoolSKUsPager.NextPage(context.Context) bool` -- New function `*CertificateOrdersClientListPager.NextPage(context.Context) bool` -- New function `*CertificatesClientListPager.Err() error` -- New function `*PlansClientListWebAppsPager.Err() error` -- New function `*WebAppsClientListBasicPublishingCredentialsPoliciesSlotPager.NextPage(context.Context) bool` -- New function `*DiagnosticsClientListSiteDiagnosticCategoriesSlotPager.Err() error` -- New function `CertificateOrdersClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (CertificateOrdersClientCreateOrUpdateResponse, error)` -- New function `*EnvironmentsClientListByResourceGroupPager.PageResponse() EnvironmentsClientListByResourceGroupResponse` -- New function `*StaticSitesClientDeleteStaticSiteBuildPoller.Done() bool` -- New function `*EnvironmentsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*StaticSitesClientListStaticSiteCustomDomainsPager.Err() error` -- New function `*EnvironmentsClient.ListAppServicePlans(string, string, *EnvironmentsClientListAppServicePlansOptions) *EnvironmentsClientListAppServicePlansPager` -- New function `*ProviderClientGetWebAppStacksPager.Err() error` -- New function `WebAppsClientCreateMSDeployOperationPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientCreateMSDeployOperationResponse, error)` -- New function `*WebAppsClientListSnapshotsFromDRSecondaryPager.PageResponse() WebAppsClientListSnapshotsFromDRSecondaryResponse` -- New function `*PlansClient.DeleteVnetRoute(context.Context, string, string, string, string, *PlansClientDeleteVnetRouteOptions) (PlansClientDeleteVnetRouteResponse, error)` -- New function `*WebAppsClientListWebJobsPager.NextPage(context.Context) bool` -- New function `*CertificateOrdersClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `PossibleRevisionHealthStateValues() []RevisionHealthState` -- New function `*WebAppsClientListProcessModulesPager.Err() error` -- New function `*ProviderClientListOperationsPager.Err() error` -- New function `*WebAppsClientListSlotDifferencesFromProductionPager.PageResponse() WebAppsClientListSlotDifferencesFromProductionResponse` -- New function `*ContainerAppsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*WebAppsClientCreateMSDeployOperationPoller.FinalResponse(context.Context) (WebAppsClientCreateMSDeployOperationResponse, error)` -- New function `*WebAppsClientCreateMSDeployOperationPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListConfigurationsSlotPager.NextPage(context.Context) bool` -- New function `*CertificateOrdersClient.DeleteCertificate(context.Context, string, string, string, *CertificateOrdersClientDeleteCertificateOptions) (CertificateOrdersClientDeleteCertificateResponse, error)` -- New function `*CertificateOrdersClient.ListCertificates(string, string, *CertificateOrdersClientListCertificatesOptions) *CertificateOrdersClientListCertificatesPager` -- New function `*WebAppsClientListPager.NextPage(context.Context) bool` -- New function `*ContainerAppsClient.ListBySubscription(*ContainerAppsClientListBySubscriptionOptions) *ContainerAppsClientListBySubscriptionPager` -- New function `*PlansClient.GetHybridConnectionPlanLimit(context.Context, string, string, *PlansClientGetHybridConnectionPlanLimitOptions) (PlansClientGetHybridConnectionPlanLimitResponse, error)` -- New function `*WebAppsClientListInstanceProcessesSlotPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientListWebWorkerUsagesPager.NextPage(context.Context) bool` -- New function `*DiagnosticsClientListSiteDiagnosticCategoriesSlotPager.PageResponse() DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse` -- New function `*WebAppsClientListConfigurationsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListDomainOwnershipIdentifiersSlotPager.NextPage(context.Context) bool` -- New function `*PlansClient.ListUsages(string, string, *PlansClientListUsagesOptions) *PlansClientListUsagesPager` -- New function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `CustomHostnameSitesCollection.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientListPublicCertificatesSlotPager.NextPage(context.Context) bool` -- New function `*PlansClientListUsagesPager.NextPage(context.Context) bool` -- New function `*KubeEnvironmentsClientListBySubscriptionPager.Err() error` -- New function `*CertificateOrdersClientListPager.PageResponse() CertificateOrdersClientListResponse` -- New function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionPoller.Done() bool` -- New function `*PlansClient.CreateOrUpdateVnetRoute(context.Context, string, string, string, string, VnetRoute, *PlansClientCreateOrUpdateVnetRouteOptions) (PlansClientCreateOrUpdateVnetRouteResponse, error)` -- New function `*WebAppsClientListProcessThreadsSlotPager.Err() error` -- New function `*EnvironmentsClient.Update(context.Context, string, string, EnvironmentPatchResource, *EnvironmentsClientUpdateOptions) (EnvironmentsClientUpdateResponse, error)` -- New function `*WebAppsClientCreateInstanceFunctionSlotPoller.Done() bool` -- New function `*StaticSitesClientListPager.Err() error` -- New function `*EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsPager.Err() error` -- New function `Enum19.ToPtr() *Enum19` -- New function `CertificateOrderPatchResourceProperties.MarshalJSON() ([]byte, error)` -- New function `*EnvironmentsClient.GetPrivateLinkResources(context.Context, string, string, *EnvironmentsClientGetPrivateLinkResourcesOptions) (EnvironmentsClientGetPrivateLinkResourcesResponse, error)` -- New function `*EnvironmentsClientGetPrivateEndpointConnectionListPager.PageResponse() EnvironmentsClientGetPrivateEndpointConnectionListResponse` -- New function `*WebAppsClientStartNetworkTracePoller.Poll(context.Context) (*http.Response, error)` -- New function `*EnvironmentsClientCreateOrUpdatePoller.Done() bool` -- New function `*EnvironmentsClientSuspendPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListFunctionsPager.PageResponse() WebAppsClientListFunctionsResponse` -- New function `*ContainerAppsClientListByResourceGroupPager.PageResponse() ContainerAppsClientListByResourceGroupResponse` -- New function `*DiagnosticsClientListHostingEnvironmentDetectorResponsesPager.Err() error` -- New function `*EnvironmentsClientChangeVnetPoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClientListWebWorkerMetricDefinitionsPager.NextPage(context.Context) bool` -- New function `*CertificatesClientListByResourceGroupPager.PageResponse() CertificatesClientListByResourceGroupResponse` -- New function `*ContainerAppsClient.BeginCreateOrUpdate(context.Context, string, string, ContainerApp, *ContainerAppsClientBeginCreateOrUpdateOptions) (ContainerAppsClientCreateOrUpdatePollerResponse, error)` -- New function `*WebAppsClientCreateInstanceMSDeployOperationPoller.Done() bool` -- New function `WebAppsClientRestoreFromBackupBlobSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientRestoreFromBackupBlobSlotResponse, error)` -- New function `*ContainerAppsClientListBySubscriptionPager.Err() error` -- New function `*WebAppsClientListProcessThreadsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListPager.Err() error` -- New function `WebAppsClientRestoreFromDeletedAppPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientRestoreFromDeletedAppResponse, error)` -- New function `*RecommendationsClientListRecommendedRulesForHostingEnvironmentPager.PageResponse() RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse` -- New function `*WebAppsClientInstallSiteExtensionPoller.Poll(context.Context) (*http.Response, error)` -- New function `*StaticSitesClientDeleteStaticSiteBuildPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*StaticSitesClientCreateZipDeploymentForStaticSitePoller.FinalResponse(context.Context) (StaticSitesClientCreateZipDeploymentForStaticSiteResponse, error)` -- New function `*WebAppsClientCreateFunctionPoller.FinalResponse(context.Context) (WebAppsClientCreateFunctionResponse, error)` -- New function `*PlansClientListWebAppsPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClient.ListMultiRoleMetricDefinitions(string, string, *EnvironmentsClientListMultiRoleMetricDefinitionsOptions) *EnvironmentsClientListMultiRoleMetricDefinitionsPager` -- New function `*WebAppsClientGetAppSettingsKeyVaultReferencesSlotPager.Err() error` -- New function `WebAppsClientStartWebSiteNetworkTraceOperationPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientStartWebSiteNetworkTraceOperationResponse, error)` -- New function `CertificateOrder.MarshalJSON() ([]byte, error)` -- New function `*EnvironmentsClientListUsagesPager.Err() error` -- New function `*StaticSitesClientApproveOrRejectPrivateEndpointConnectionPoller.FinalResponse(context.Context) (StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse, error)` -- New function `*PlansClientListWebAppsByHybridConnectionPager.PageResponse() PlansClientListWebAppsByHybridConnectionResponse` -- New function `*EnvironmentsClientListWebAppsPager.NextPage(context.Context) bool` -- New function `StaticSitesClientCreateOrUpdateStaticSitePollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientCreateOrUpdateStaticSiteResponse, error)` -- New function `*WebAppsClientListContinuousWebJobsPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientListStaticSiteBuildFunctionsPager.Err() error` -- New function `*PlansClientListPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListSnapshotsSlotPager.Err() error` -- New function `*WebAppsClientGetPrivateEndpointConnectionListPager.Err() error` -- New function `*WebAppsClientListUsagesSlotPager.Err() error` -- New function `*WebAppsClientRestoreSnapshotSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*EnvironmentsClient.BeginDeletePrivateEndpointConnection(context.Context, string, string, string, *EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (EnvironmentsClientDeletePrivateEndpointConnectionPollerResponse, error)` -- New function `*WebAppsClientCreateOrUpdateSourceControlPoller.FinalResponse(context.Context) (WebAppsClientCreateOrUpdateSourceControlResponse, error)` -- New function `*CertificateOrdersClientCreateOrUpdateCertificatePoller.ResumeToken() (string, error)` -- New function `*DomainsClientListPager.PageResponse() DomainsClientListResponse` -- New function `*StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientInstallSiteExtensionSlotPoller.FinalResponse(context.Context) (WebAppsClientInstallSiteExtensionSlotResponse, error)` -- New function `*WebAppsClientMigrateMySQLPoller.FinalResponse(context.Context) (WebAppsClientMigrateMySQLResponse, error)` -- New function `*EnvironmentsClientSuspendPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListInstanceProcessesPager.Err() error` -- New function `*EnvironmentsClientDeletePoller.FinalResponse(context.Context) (EnvironmentsClientDeleteResponse, error)` -- New function `*EnvironmentsClientChangeVnetPager.Err() error` -- New function `*EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPoller.ResumeToken() (string, error)` -- New function `*ProviderClientGetAvailableStacksOnPremPager.NextPage(context.Context) bool` -- New function `*CertificateOrderProperties.UnmarshalJSON([]byte) error` -- New function `*DiagnosticsClientListSiteAnalysesPager.NextPage(context.Context) bool` -- New function `*DomainsClientCreateOrUpdatePoller.Done() bool` -- New function `PossibleEnum18Values() []Enum18` -- New function `*WebAppsClientListProcessesSlotPager.Err() error` -- New function `*DiagnosticsClientListSiteAnalysesSlotPager.Err() error` -- New function `*EnvironmentsClientChangeVnetPoller.Done() bool` -- New function `*PlansClientListHybridConnectionsPager.PageResponse() PlansClientListHybridConnectionsResponse` -- New function `*WebAppsClientRestoreSnapshotSlotPoller.Done() bool` -- New function `*KubeEnvironmentsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListPublishingCredentialsPoller.ResumeToken() (string, error)` -- New function `*StaticSitesClientListStaticSiteFunctionsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListPublicCertificatesPager.PageResponse() WebAppsClientListPublicCertificatesResponse` -- New function `*WebAppsClientMigrateMySQLPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebAppsClientGetAppSettingsKeyVaultReferencesPager.Err() error` -- New function `*WebAppsClientCreateInstanceFunctionSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*EnvironmentsClient.Get(context.Context, string, string, *EnvironmentsClientGetOptions) (EnvironmentsClientGetResponse, error)` -- New function `*StaticSitesClientDetachStaticSitePoller.ResumeToken() (string, error)` -- New function `*PlansClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListUsagesPager.NextPage(context.Context) bool` -- New function `*WebAppsClientCreateMSDeployOperationPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebAppsClientCreateInstanceMSDeployOperationPoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClientListPager.NextPage(context.Context) bool` -- New function `WebAppsClientMigrateStoragePollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientMigrateStorageResponse, error)` -- New function `*EnvironmentsClientListMultiRolePoolsPager.Err() error` -- New function `*DomainsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClient.List(*EnvironmentsClientListOptions) *EnvironmentsClientListPager` -- New function `EnvironmentsClientDeletePrivateEndpointConnectionPollerResponse.PollUntilDone(context.Context, time.Duration) (EnvironmentsClientDeletePrivateEndpointConnectionResponse, error)` -- New function `*PlansClient.BeginCreateOrUpdate(context.Context, string, string, Plan, *PlansClientBeginCreateOrUpdateOptions) (PlansClientCreateOrUpdatePollerResponse, error)` -- New function `PlanPatchResourceProperties.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientGetPrivateEndpointConnectionListSlotPager.NextPage(context.Context) bool` -- New function `*DomainsClientCreateOrUpdatePollerResponse.Resume(context.Context, *DomainsClient, string) error` -- New function `WebAppsClientCreateInstanceFunctionSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientCreateInstanceFunctionSlotResponse, error)` -- New function `*PlansClient.Get(context.Context, string, string, *PlansClientGetOptions) (PlansClientGetResponse, error)` -- New function `*WebAppsClientListProcessThreadsSlotPager.NextPage(context.Context) bool` -- New function `*WebAppsClientRestoreFromBackupBlobPoller.FinalResponse(context.Context) (WebAppsClientRestoreFromBackupBlobResponse, error)` -- New function `*WebAppsClientSwapSlotPoller.FinalResponse(context.Context) (WebAppsClientSwapSlotResponse, error)` -- New function `*WebAppsClientListSnapshotsFromDRSecondarySlotPager.PageResponse() WebAppsClientListSnapshotsFromDRSecondarySlotResponse` -- New function `*PlansClient.GetServerFarmSKUs(context.Context, string, string, *PlansClientGetServerFarmSKUsOptions) (PlansClientGetServerFarmSKUsResponse, error)` -- New function `*PlansClient.GetVnetGateway(context.Context, string, string, string, string, *PlansClientGetVnetGatewayOptions) (PlansClientGetVnetGatewayResponse, error)` -- New function `*WebAppsClientListInstanceIdentifiersSlotPager.Err() error` -- New function `*KubeEnvironmentsClientDeletePoller.FinalResponse(context.Context) (KubeEnvironmentsClientDeleteResponse, error)` -- New function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePoller.ResumeToken() (string, error)` -- New function `PlanCollection.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientCreateOrUpdateSourceControlSlotPoller.Done() bool` -- New function `*DiagnosticsClientListSiteDetectorsPager.PageResponse() DiagnosticsClientListSiteDetectorsResponse` -- New function `EnvironmentsClientChangeVnetPollerResponse.PollUntilDone(context.Context, time.Duration) (*EnvironmentsClientChangeVnetPager, error)` -- New function `*WebAppsClientDeletePrivateEndpointConnectionPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebAppsClientCreateInstanceMSDeployOperationSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `RevisionHealthState.ToPtr() *RevisionHealthState` -- New function `*WebAppsClientListConfigurationsSlotPager.Err() error` -- New function `*EnvironmentsClientListWebWorkerUsagesPager.Err() error` -- New function `*StaticSitesClientListStaticSiteBuildFunctionsPager.PageResponse() StaticSitesClientListStaticSiteBuildFunctionsResponse` -- New function `*WebAppsClientListTriggeredWebJobsSlotPager.Err() error` -- New function `*WebAppsClientListWebJobsSlotPager.Err() error` -- New function `WebAppsClientRestoreSnapshotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientRestoreSnapshotResponse, error)` -- New function `*PlansClientListPager.PageResponse() PlansClientListResponse` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*PlansClient.DeleteHybridConnection(context.Context, string, string, string, string, *PlansClientDeleteHybridConnectionOptions) (PlansClientDeleteHybridConnectionResponse, error)` -- New function `*PlansClientListUsagesPager.PageResponse() PlansClientListUsagesResponse` -- New function `*WebAppsClientListSlotsPager.PageResponse() WebAppsClientListSlotsResponse` -- New function `AppCertificatePatchResource.MarshalJSON() ([]byte, error)` -- New function `*CertificateOrdersClient.Get(context.Context, string, string, *CertificateOrdersClientGetOptions) (CertificateOrdersClientGetResponse, error)` -- New function `*WebAppsClientStartNetworkTraceSlotPoller.Done() bool` -- New function `*PlansClient.ListByResourceGroup(string, *PlansClientListByResourceGroupOptions) *PlansClientListByResourceGroupPager` -- New function `*StaticSitesClientListStaticSiteBuildFunctionsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientRestoreSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebSiteManagementClientListCustomHostNameSitesPager.Err() error` -- New function `*EnvironmentsClientChangeVnetPager.NextPage(context.Context) bool` -- New function `*TopLevelDomainsClientListPager.Err() error` -- New function `*EnvironmentsClientCreateOrUpdateWorkerPoolPoller.FinalResponse(context.Context) (EnvironmentsClientCreateOrUpdateWorkerPoolResponse, error)` -- New function `*EnvironmentsClientListPager.Err() error` -- New function `*WebAppsClientListPerfMonCountersPager.Err() error` -- New function `StaticSitesClientDetachStaticSitePollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientDetachStaticSiteResponse, error)` -- New function `*ProviderClientGetWebAppStacksForLocationPager.PageResponse() ProviderClientGetWebAppStacksForLocationResponse` -- New function `*EnvironmentsClientResumePoller.Poll(context.Context) (*http.Response, error)` -- New function `*PlansClient.UpdateVnetRoute(context.Context, string, string, string, string, VnetRoute, *PlansClientUpdateVnetRouteOptions) (PlansClientUpdateVnetRouteResponse, error)` -- New function `*WebAppsClientCreateMSDeployOperationSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListDomainOwnershipIdentifiersSlotPager.PageResponse() WebAppsClientListDomainOwnershipIdentifiersSlotResponse` -- New function `*PlansClient.RebootWorker(context.Context, string, string, string, *PlansClientRebootWorkerOptions) (PlansClientRebootWorkerResponse, error)` -- New function `*StaticSitesClientListStaticSiteUsersPager.NextPage(context.Context) bool` -- New function `PossibleIngressTransportMethodValues() []IngressTransportMethod` -- New function `*CertificateOrdersClientListCertificatesPager.PageResponse() CertificateOrdersClientListCertificatesResponse` -- New function `*EnvironmentsClientListCapacitiesPager.Err() error` -- New function `*ResourceHealthMetadataClientListByResourceGroupPager.Err() error` -- New function `*StaticSitesClientDeleteStaticSiteCustomDomainPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientRestoreFromDeletedAppPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebAppsClientMigrateStoragePoller.FinalResponse(context.Context) (WebAppsClientMigrateStorageResponse, error)` -- New function `NewContainerAppsRevisionsClient(string, azcore.TokenCredential, *arm.ClientOptions) *ContainerAppsRevisionsClient` -- New function `*WebAppsClientListDeploymentsPager.PageResponse() WebAppsClientListDeploymentsResponse` -- New function `*ContainerAppsClientCreateOrUpdatePoller.FinalResponse(context.Context) (ContainerAppsClientCreateOrUpdateResponse, error)` -- New function `*RecommendationsClientListPager.PageResponse() RecommendationsClientListResponse` -- New function `*EnvironmentsClient.UpdateMultiRolePool(context.Context, string, string, WorkerPoolResource, *EnvironmentsClientUpdateMultiRolePoolOptions) (EnvironmentsClientUpdateMultiRolePoolResponse, error)` -- New function `*WebAppsClientListSiteBackupsSlotPager.Err() error` -- New function `*WebAppsClientDeletePrivateEndpointConnectionSlotPoller.Done() bool` -- New function `*StaticSitesClientCreateZipDeploymentForStaticSiteBuildPollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `*ProviderClientGetFunctionAppStacksForLocationPager.PageResponse() ProviderClientGetFunctionAppStacksForLocationResponse` -- New function `*StaticSitesClientDeleteStaticSiteBuildPollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `*WebAppsClientListBackupsSlotPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.Done() bool` -- New function `*WebAppsClientListProcessModulesSlotPager.PageResponse() WebAppsClientListProcessModulesSlotResponse` -- New function `*ProviderClientGetAvailableStacksPager.Err() error` -- New function `*WebAppsClientListWebJobsPager.PageResponse() WebAppsClientListWebJobsResponse` -- New function `*WebAppsClientListDomainOwnershipIdentifiersPager.NextPage(context.Context) bool` -- New function `*PlansClientListWebAppsByHybridConnectionPager.NextPage(context.Context) bool` -- New function `*DomainsClientListOwnershipIdentifiersPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListHostNameBindingsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListInstanceProcessThreadsSlotPager.PageResponse() WebAppsClientListInstanceProcessThreadsSlotResponse` -- New function `*WebAppsClientListSiteExtensionsPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientResumePoller.Done() bool` -- New function `*WebAppsClientInstallSiteExtensionSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ResourceHealthMetadataClientListBySiteSlotPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientListAppServicePlansPager.PageResponse() EnvironmentsClientListAppServicePlansResponse` -- New function `*EnvironmentsClientResumePoller.FinalResponse(context.Context) (*EnvironmentsClientResumePager, error)` -- New function `*WebAppsClientCreateOrUpdateSourceControlPoller.Done() bool` -- New function `*WebAppsClientCreateInstanceMSDeployOperationSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPoller.Done() bool` -- New function `*WebAppsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClient.GetInboundNetworkDependenciesEndpoints(string, string, *EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions) *EnvironmentsClientGetInboundNetworkDependenciesEndpointsPager` -- New function `*WebAppsClientSwapSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*EnvironmentsClientListMultiRoleUsagesPager.Err() error` -- New function `*DiagnosticsClientListSiteDetectorResponsesPager.Err() error` -- New function `*EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientGetStaticSitesByResourceGroupPager.Err() error` -- New function `*WebAppsClientCreateFunctionPoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClientChangeVnetPoller.FinalResponse(context.Context) (*EnvironmentsClientChangeVnetPager, error)` -- New function `*DomainsClient.TransferOut(context.Context, string, string, *DomainsClientTransferOutOptions) (DomainsClientTransferOutResponse, error)` -- New function `EnvironmentPatchResource.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesPager.NextPage(context.Context) bool` -- New function `*PlansClient.UpdateVnetGateway(context.Context, string, string, string, string, VnetGateway, *PlansClientUpdateVnetGatewayOptions) (PlansClientUpdateVnetGatewayResponse, error)` -- New function `*PlansClient.List(*PlansClientListOptions) *PlansClientListPager` -- New function `*RecommendationsClientListHistoryForWebAppPager.PageResponse() RecommendationsClientListHistoryForWebAppResponse` -- New function `*DiagnosticsClientListSiteDiagnosticCategoriesPager.Err() error` -- New function `*WebAppsClientListProcessModulesPager.PageResponse() WebAppsClientListProcessModulesResponse` -- New function `*ContainerAppsClientCreateOrUpdatePollerResponse.Resume(context.Context, *ContainerAppsClient, string) error` -- New function `*WebAppsClientListBackupsSlotPager.Err() error` -- New function `*ContainerAppsClientDeletePoller.ResumeToken() (string, error)` -- New function `*WebAppsClientRestoreFromDeletedAppSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*PlansClientListHybridConnectionsPager.Err() error` -- New function `*StaticSitesClientDeleteStaticSiteCustomDomainPollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `*EnvironmentsClientCreateOrUpdatePollerResponse.Resume(context.Context, *EnvironmentsClient, string) error` -- New function `*CertificateOrdersClientCreateOrUpdateCertificatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CertificateRegistrationProviderClientListOperationsPager.PageResponse() CertificateRegistrationProviderClientListOperationsResponse` -- New function `Enum16.ToPtr() *Enum16` -- New function `*DomainRegistrationProviderClientListOperationsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPoller.FinalResponse(context.Context) (WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse, error)` -- New function `StaticSitesClientCreateZipDeploymentForStaticSitePollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientCreateZipDeploymentForStaticSiteResponse, error)` -- New function `*DomainsClientListOwnershipIdentifiersPager.PageResponse() DomainsClientListOwnershipIdentifiersResponse` -- New function `*DiagnosticsClientListSiteDiagnosticCategoriesPager.NextPage(context.Context) bool` -- New function `*WebAppsClientInstallSiteExtensionPoller.Done() bool` -- New function `*WebAppsClientGetPrivateEndpointConnectionListPager.PageResponse() WebAppsClientGetPrivateEndpointConnectionListResponse` -- New function `*WebAppsClientListInstanceProcessModulesSlotPager.NextPage(context.Context) bool` -- New function `*WebAppsClientRestorePoller.Poll(context.Context) (*http.Response, error)` -- New function `Revision.MarshalJSON() ([]byte, error)` -- New function `*ContainerAppsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListPager.PageResponse() WebAppsClientListResponse` -- New function `*StaticSitesClientApproveOrRejectPrivateEndpointConnectionPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListInstanceIdentifiersPager.PageResponse() WebAppsClientListInstanceIdentifiersResponse` -- New function `*PlansClient.GetHybridConnection(context.Context, string, string, string, string, *PlansClientGetHybridConnectionOptions) (PlansClientGetHybridConnectionResponse, error)` -- New function `*WebAppsClientListPerfMonCountersPager.PageResponse() WebAppsClientListPerfMonCountersResponse` -- New function `*CertificateOrdersClient.VerifyDomainOwnership(context.Context, string, string, *CertificateOrdersClientVerifyDomainOwnershipOptions) (CertificateOrdersClientVerifyDomainOwnershipResponse, error)` -- New function `*WebAppsClientListTriggeredWebJobsPager.Err() error` -- New function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePoller.FinalResponse(context.Context) (StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse, error)` -- New function `*WebAppsClientListInstanceProcessModulesSlotPager.PageResponse() WebAppsClientListInstanceProcessModulesSlotResponse` -- New function `*ContainerAppsClientListByResourceGroupPager.Err() error` -- New function `WebAppsClientSwapSlotWithProductionPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientSwapSlotWithProductionResponse, error)` -- New function `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse, error)` -- New function `*WebAppsClientRestorePoller.Done() bool` -- New function `IngressTransportMethod.ToPtr() *IngressTransportMethod` -- New function `*CertificateOrdersClient.Update(context.Context, string, string, CertificateOrderPatchResource, *CertificateOrdersClientUpdateOptions) (CertificateOrdersClientUpdateResponse, error)` -- New function `KubeEnvironmentsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (KubeEnvironmentsClientCreateOrUpdateResponse, error)` -- New function `*EnvironmentsClient.ListUsages(string, string, *EnvironmentsClientListUsagesOptions) *EnvironmentsClientListUsagesPager` -- New function `*WebAppsClientStartNetworkTraceSlotPoller.FinalResponse(context.Context) (WebAppsClientStartNetworkTraceSlotResponse, error)` -- New function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*CertificateOrdersClientCreateOrUpdatePoller.Done() bool` -- New function `HTTPScaleRule.MarshalJSON() ([]byte, error)` -- New function `CustomScaleRule.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientListPerfMonCountersSlotPager.Err() error` -- New function `*TopLevelDomainsClientListAgreementsPager.Err() error` -- New function `*EnvironmentsClientListWebWorkerMetricDefinitionsPager.PageResponse() EnvironmentsClientListWebWorkerMetricDefinitionsResponse` -- New function `*WebAppsClientListUsagesSlotPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListConfigurationsSlotPager.PageResponse() WebAppsClientListConfigurationsSlotResponse` -- New function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPoller.ResumeToken() (string, error)` -- New function `*StaticSitesClientDeletePrivateEndpointConnectionPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClient.GetAuthSettingsV2WithoutSecrets(context.Context, string, string, *WebAppsClientGetAuthSettingsV2WithoutSecretsOptions) (WebAppsClientGetAuthSettingsV2WithoutSecretsResponse, error)` -- New function `*WebAppsClientListPublishingCredentialsPoller.Done() bool` -- New function `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse, error)` -- New function `*WebAppsClientCreateOrUpdateSlotPoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClient.ListByResourceGroup(string, *EnvironmentsClientListByResourceGroupOptions) *EnvironmentsClientListByResourceGroupPager` -- New function `*StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPoller.ResumeToken() (string, error)` -- New function `*ContainerAppsClientDeletePoller.Done() bool` -- New function `*EnvironmentsClientGetInboundNetworkDependenciesEndpointsPager.Err() error` -- New function `*ProviderClientGetAvailableStacksOnPremPager.PageResponse() ProviderClientGetAvailableStacksOnPremResponse` -- New function `*AppCertificatePatchResourceProperties.UnmarshalJSON([]byte) error` -- New function `*WebAppsClientListInstanceIdentifiersPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientDeletePoller.Done() bool` -- New function `*CertificateOrdersClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientListMultiRoleMetricDefinitionsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientCreateOrUpdateSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.Poll(context.Context) (*http.Response, error)` -- New function `*PlansClient.GetVnetFromServerFarm(context.Context, string, string, string, *PlansClientGetVnetFromServerFarmOptions) (PlansClientGetVnetFromServerFarmResponse, error)` -- New function `*WebAppsClientListDeploymentsSlotPager.Err() error` -- New function `StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse, error)` -- New function `*WebAppsClientListTriggeredWebJobsPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePoller.Done() bool` -- New function `*KubeEnvironmentsClientListBySubscriptionPager.PageResponse() KubeEnvironmentsClientListBySubscriptionResponse` -- New function `*WebAppsClientStartNetworkTracePoller.FinalResponse(context.Context) (WebAppsClientStartNetworkTraceResponse, error)` -- New function `DomainsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (DomainsClientCreateOrUpdateResponse, error)` -- New function `*WebAppsClientRestoreSlotPoller.Done() bool` -- New function `*WebAppsClientGetPrivateEndpointConnectionListSlotPager.PageResponse() WebAppsClientGetPrivateEndpointConnectionListSlotResponse` -- New function `*PlansClient.ListWebAppsByHybridConnection(string, string, string, string, *PlansClientListWebAppsByHybridConnectionOptions) *PlansClientListWebAppsByHybridConnectionPager` -- New function `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPollerResponse.PollUntilDone(context.Context, time.Duration) (EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse, error)` -- New function `CertificateOrderCollection.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListPublishingCredentialsPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `WebAppsClientStartNetworkTracePollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientStartNetworkTraceResponse, error)` -- New function `*ResourceHealthMetadataClientListBySiteSlotPager.PageResponse() ResourceHealthMetadataClientListBySiteSlotResponse` -- New function `*StaticSitesClientDetachStaticSitePoller.FinalResponse(context.Context) (StaticSitesClientDetachStaticSiteResponse, error)` -- New function `*CertificateOrdersClient.BeginCreateOrUpdate(context.Context, string, string, CertificateOrder, *CertificateOrdersClientBeginCreateOrUpdateOptions) (CertificateOrdersClientCreateOrUpdatePollerResponse, error)` -- New function `*CertificateOrdersClientCreateOrUpdateCertificatePollerResponse.Resume(context.Context, *CertificateOrdersClient, string) error` -- New function `*WebAppsClientListPublicCertificatesSlotPager.Err() error` -- New function `*WebAppsClientListInstanceProcessThreadsSlotPager.Err() error` -- New function `*RecommendationsClientListHistoryForHostingEnvironmentPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientGetStaticSitesByResourceGroupPager.PageResponse() StaticSitesClientGetStaticSitesByResourceGroupResponse` -- New function `*DiagnosticsClientListSiteDetectorsSlotPager.PageResponse() DiagnosticsClientListSiteDetectorsSlotResponse` -- New function `*EnvironmentsClientListMultiRoleUsagesPager.PageResponse() EnvironmentsClientListMultiRoleUsagesResponse` -- New function `*CertificateOrdersClientListCertificatesPager.NextPage(context.Context) bool` -- New function `*WebAppsClientRestoreFromBackupBlobPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientListProcessesSlotPager.NextPage(context.Context) bool` -- New function `*WebAppsClientCreateOrUpdateSourceControlPoller.Poll(context.Context) (*http.Response, error)` -- New function `*EnvironmentsClientListWebWorkerMetricDefinitionsPager.Err() error` -- New function `StaticSitesClientDeleteStaticSiteCustomDomainPollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientDeleteStaticSiteCustomDomainResponse, error)` -- New function `*WebSiteManagementClient.ListCustomHostNameSites(*WebSiteManagementClientListCustomHostNameSitesOptions) *WebSiteManagementClientListCustomHostNameSitesPager` -- New function `*WebAppsClientListInstanceProcessesSlotPager.PageResponse() WebAppsClientListInstanceProcessesSlotResponse` -- New function `*EnvironmentsClientCreateOrUpdateWorkerPoolPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientGetAppSettingsKeyVaultReferencesSlotPager.PageResponse() WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse` -- New function `*WebAppsClientListProcessModulesSlotPager.Err() error` -- New function `*EnvironmentsClient.UpdateAseNetworkingConfiguration(context.Context, string, string, AseV3NetworkingConfiguration, *EnvironmentsClientUpdateAseNetworkingConfigurationOptions) (EnvironmentsClientUpdateAseNetworkingConfigurationResponse, error)` -- New function `*WebAppsClientListInstanceProcessesSlotPager.Err() error` -- New function `*WebAppsClientListBasicPublishingCredentialsPoliciesPager.Err() error` -- New function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePoller.Done() bool` -- New function `*EnvironmentsClient.BeginCreateOrUpdateWorkerPool(context.Context, string, string, string, WorkerPoolResource, *EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (EnvironmentsClientCreateOrUpdateWorkerPoolPollerResponse, error)` -- New function `*CertificateOrdersClient.ResendEmail(context.Context, string, string, *CertificateOrdersClientResendEmailOptions) (CertificateOrdersClientResendEmailResponse, error)` -- New function `*StaticSitesClientCreateOrUpdateStaticSitePoller.Done() bool` -- New function `*DeletedWebAppsClientListPager.Err() error` -- New function `*PlansClientCreateOrUpdatePoller.Done() bool` -- New function `*StaticSitesClientDeletePrivateEndpointConnectionPollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `CertificateResource.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientListInstanceIdentifiersPager.Err() error` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientListContinuousWebJobsPager.PageResponse() WebAppsClientListContinuousWebJobsResponse` -- New function `*CertificatesClientListPager.NextPage(context.Context) bool` -- New function `*CertificateOrderPatchResourceProperties.UnmarshalJSON([]byte) error` -- New function `*WebAppsClientSwapSlotPoller.Done() bool` -- New function `*EnvironmentsClientChangeVnetPollerResponse.Resume(context.Context, *EnvironmentsClient, string) error` -- New function `*WebAppsClientListInstanceFunctionsSlotPager.PageResponse() WebAppsClientListInstanceFunctionsSlotResponse` -- New function `*EnvironmentsClient.GetPrivateEndpointConnection(context.Context, string, string, string, *EnvironmentsClientGetPrivateEndpointConnectionOptions) (EnvironmentsClientGetPrivateEndpointConnectionResponse, error)` -- New function `WebAppsClientDeletePrivateEndpointConnectionPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientDeletePrivateEndpointConnectionResponse, error)` -- New function `*StaticSitesClientCreateOrUpdateStaticSitePoller.ResumeToken() (string, error)` -- New function `PossibleEnum19Values() []Enum19` -- New function `*WebAppsClientListTriggeredWebJobHistoryPager.PageResponse() WebAppsClientListTriggeredWebJobHistoryResponse` -- New function `*WebAppsClientListTriggeredWebJobHistorySlotPager.NextPage(context.Context) bool` -- New function `*WebAppsClientRestoreFromDeletedAppPoller.FinalResponse(context.Context) (WebAppsClientRestoreFromDeletedAppResponse, error)` -- New function `*PlansClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*WebSiteManagementClientListCustomHostNameSitesPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientListStaticSiteFunctionsPager.PageResponse() StaticSitesClientListStaticSiteFunctionsResponse` -- New function `*CertificatesClientListPager.PageResponse() CertificatesClientListResponse` -- New function `*EnvironmentsClientListWorkerPoolSKUsPager.Err() error` -- New function `NewCertificateOrdersClient(string, azcore.TokenCredential, *arm.ClientOptions) *CertificateOrdersClient` -- New function `*EnvironmentsClientResumePollerResponse.Resume(context.Context, *EnvironmentsClient, string) error` -- New function `*PlansClientListByResourceGroupPager.Err() error` -- New function `*EnvironmentsClient.ListWorkerPoolSKUs(string, string, string, *EnvironmentsClientListWorkerPoolSKUsOptions) *EnvironmentsClientListWorkerPoolSKUsPager` -- New function `*EnvironmentsClientGetPrivateEndpointConnectionListPager.NextPage(context.Context) bool` -- New function `*DiagnosticsClientListSiteDetectorResponsesSlotPager.Err() error` -- New function `*ContainerAppsClient.Get(context.Context, string, string, *ContainerAppsClientGetOptions) (ContainerAppsClientGetResponse, error)` -- New function `*WebAppsClientRestoreFromBackupBlobSlotPoller.FinalResponse(context.Context) (WebAppsClientRestoreFromBackupBlobSlotResponse, error)` -- New function `*ContainerAppsRevisionsClientListRevisionsPager.PageResponse() ContainerAppsRevisionsClientListRevisionsResponse` -- New function `*WebAppsClientRestoreSnapshotPoller.Done() bool` -- New function `*EnvironmentsClientListWorkerPoolsPager.PageResponse() EnvironmentsClientListWorkerPoolsResponse` -- New function `*RecommendationsClientListPager.Err() error` -- New function `*EnvironmentsClientListMultiRoleMetricDefinitionsPager.PageResponse() EnvironmentsClientListMultiRoleMetricDefinitionsResponse` -- New function `*WebAppsClientListWebJobsSlotPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClient.UpdateWorkerPool(context.Context, string, string, string, WorkerPoolResource, *EnvironmentsClientUpdateWorkerPoolOptions) (EnvironmentsClientUpdateWorkerPoolResponse, error)` -- New function `*WebAppsClientListSiteExtensionsPager.Err() error` -- New function `*WebAppsClientCreateInstanceMSDeployOperationSlotPoller.ResumeToken() (string, error)` -- New function `*DiagnosticsClientListSiteAnalysesPager.Err() error` -- New function `Enum18.ToPtr() *Enum18` -- New function `*WebAppsClientListBasicPublishingCredentialsPoliciesPager.PageResponse() WebAppsClientListBasicPublishingCredentialsPoliciesResponse` -- New function `*RecommendationsClientListRecommendedRulesForWebAppPager.Err() error` -- New function `*DomainsClientListPager.Err() error` -- New function `*EnvironmentsClientListPager.PageResponse() EnvironmentsClientListResponse` -- New function `*EnvironmentsClient.ListWebWorkerUsages(string, string, string, *EnvironmentsClientListWebWorkerUsagesOptions) *EnvironmentsClientListWebWorkerUsagesPager` -- New function `*CertificateOrdersClient.ResendRequestEmails(context.Context, string, string, NameIdentifier, *CertificateOrdersClientResendRequestEmailsOptions) (CertificateOrdersClientResendRequestEmailsResponse, error)` -- New function `*ProviderClientGetFunctionAppStacksForLocationPager.Err() error` -- New function `*WebAppsClientRestoreSlotPoller.FinalResponse(context.Context) (WebAppsClientRestoreSlotResponse, error)` -- New function `*WebAppsClientListTriggeredWebJobsPager.PageResponse() WebAppsClientListTriggeredWebJobsResponse` -- New function `*WebAppsClientCreateMSDeployOperationPoller.Done() bool` -- New function `*StaticSitesClientCreateZipDeploymentForStaticSiteBuildPoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClient.GetPrivateEndpointConnectionList(string, string, *EnvironmentsClientGetPrivateEndpointConnectionListOptions) *EnvironmentsClientGetPrivateEndpointConnectionListPager` -- New function `*ContainerAppsRevisionsClient.DeactivateRevision(context.Context, string, string, string, *ContainerAppsRevisionsClientDeactivateRevisionOptions) (ContainerAppsRevisionsClientDeactivateRevisionResponse, error)` -- New function `*EnvironmentsClientGetOutboundNetworkDependenciesEndpointsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientCreateInstanceMSDeployOperationPoller.Poll(context.Context) (*http.Response, error)` -- New function `*KubeEnvironmentsClientCreateOrUpdatePoller.FinalResponse(context.Context) (KubeEnvironmentsClientCreateOrUpdateResponse, error)` -- New function `*WebAppsClientListDomainOwnershipIdentifiersPager.Err() error` -- New function `*WebAppsClientListTriggeredWebJobHistorySlotPager.Err() error` -- New function `*WebAppsClientCreateInstanceFunctionSlotPoller.FinalResponse(context.Context) (WebAppsClientCreateInstanceFunctionSlotResponse, error)` -- New function `*DeletedWebAppsClientListByLocationPager.Err() error` -- New function `*DiagnosticsClientListSiteDetectorsSlotPager.Err() error` -- New function `*WebAppsClientListSnapshotsFromDRSecondarySlotPager.Err() error` -- New function `*DomainsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsPager.PageResponse() EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse` -- New function `*DiagnosticsClientListSiteDetectorResponsesPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClient.ListWebApps(string, string, *EnvironmentsClientListWebAppsOptions) *EnvironmentsClientListWebAppsPager` -- New function `*WebAppsClientListProcessThreadsPager.PageResponse() WebAppsClientListProcessThreadsResponse` -- New function `*EnvironmentsClientListWebAppsPager.PageResponse() EnvironmentsClientListWebAppsResponse` -- New function `*AppCertificateProperties.UnmarshalJSON([]byte) error` -- New function `*EnvironmentsClientListMultiRoleUsagesPager.NextPage(context.Context) bool` -- New function `CertificateOrderProperties.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientInstallSiteExtensionPoller.FinalResponse(context.Context) (WebAppsClientInstallSiteExtensionResponse, error)` -- New function `*ProviderClientGetAvailableStacksPager.PageResponse() ProviderClientGetAvailableStacksResponse` -- New function `*EnvironmentsClient.Reboot(context.Context, string, string, *EnvironmentsClientRebootOptions) (EnvironmentsClientRebootResponse, error)` -- New function `*ContainerAppsRevisionsClient.GetRevision(context.Context, string, string, string, *ContainerAppsRevisionsClientGetRevisionOptions) (ContainerAppsRevisionsClientGetRevisionResponse, error)` -- New function `StaticSitesClientCreateZipDeploymentForStaticSiteBuildPollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse, error)` -- New function `*EnvironmentsClientCreateOrUpdateMultiRolePoolPoller.FinalResponse(context.Context) (EnvironmentsClientCreateOrUpdateMultiRolePoolResponse, error)` -- New function `*WebAppsClientRestoreSnapshotSlotPoller.FinalResponse(context.Context) (WebAppsClientRestoreSnapshotSlotResponse, error)` -- New function `*WebAppsClientListSlotDifferencesSlotPager.Err() error` -- New function `*DomainsClientListRecommendationsPager.NextPage(context.Context) bool` -- New function `*ContainerAppsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientResumePoller.ResumeToken() (string, error)` -- New function `*WebAppsClientListInstanceProcessModulesSlotPager.Err() error` -- New function `*CertificateRegistrationProviderClientListOperationsPager.NextPage(context.Context) bool` -- New function `WebAppsClientCreateFunctionPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientCreateFunctionResponse, error)` -- New function `*WebAppsClientListBackupsPager.PageResponse() WebAppsClientListBackupsResponse` -- New function `*WebAppsClientListPerfMonCountersSlotPager.PageResponse() WebAppsClientListPerfMonCountersSlotResponse` -- New function `*DiagnosticsClientListSiteDetectorResponsesSlotPager.NextPage(context.Context) bool` -- New function `*KubeEnvironmentsClientCreateOrUpdatePollerResponse.Resume(context.Context, *KubeEnvironmentsClient, string) error` -- New function `*EnvironmentsClientResumePager.PageResponse() EnvironmentsClientResumeResponse` -- New function `*ContainerAppsClientCreateOrUpdatePoller.Done() bool` -- New function `*WebAppsClientListPublishingCredentialsSlotPoller.FinalResponse(context.Context) (WebAppsClientListPublishingCredentialsSlotResponse, error)` -- New function `*WebAppsClientRestoreSnapshotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*EnvironmentsClientListMultiRolePoolsPager.PageResponse() EnvironmentsClientListMultiRolePoolsResponse` -- New function `*EnvironmentsClient.ListMultiRolePoolSKUs(string, string, *EnvironmentsClientListMultiRolePoolSKUsOptions) *EnvironmentsClientListMultiRolePoolSKUsPager` -- New function `ContainerApp.MarshalJSON() ([]byte, error)` -- New function `*PlansClient.Delete(context.Context, string, string, *PlansClientDeleteOptions) (PlansClientDeleteResponse, error)` -- New function `*EnvironmentsClientListMultiRolePoolSKUsPager.Err() error` -- New function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientInstallSiteExtensionSlotPoller.Done() bool` -- New function `*StaticSitesClientCreateZipDeploymentForStaticSitePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListTriggeredWebJobHistorySlotPager.PageResponse() WebAppsClientListTriggeredWebJobHistorySlotResponse` -- New function `*WebAppsClientDeletePrivateEndpointConnectionSlotPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientListFunctionsPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientDeleteStaticSiteCustomDomainPoller.Done() bool` -- New function `*PlansClientListPager.Err() error` -- New function `*ResourceHealthMetadataClientListPager.Err() error` -- New function `*CertificateOrdersClient.BeginCreateOrUpdateCertificate(context.Context, string, string, string, CertificateResource, *CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (CertificateOrdersClientCreateOrUpdateCertificatePollerResponse, error)` -- New function `*WebAppsClientStartNetworkTraceSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*DomainsClientListPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListFunctionsPager.Err() error` -- New function `*WebAppsClientListUsagesSlotPager.PageResponse() WebAppsClientListUsagesSlotResponse` -- New function `*PlansClient.GetRouteForVnet(context.Context, string, string, string, string, *PlansClientGetRouteForVnetOptions) (PlansClientGetRouteForVnetResponse, error)` -- New function `*WebAppsClientStartNetworkTracePollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*RecommendationsClientListRecommendedRulesForHostingEnvironmentPager.NextPage(context.Context) bool` -- New function `*DiagnosticsClientListSiteAnalysesSlotPager.NextPage(context.Context) bool` -- New function `*PlansClient.ListVnets(context.Context, string, string, *PlansClientListVnetsOptions) (PlansClientListVnetsResponse, error)` -- New function `*KubeEnvironmentsClientListByResourceGroupPager.PageResponse() KubeEnvironmentsClientListByResourceGroupResponse` -- New function `*PlansClientListUsagesPager.Err() error` -- New function `*WebAppsClientListTriggeredWebJobsSlotPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientListAppServicePlansPager.NextPage(context.Context) bool` -- New function `ContainerAppProvisioningState.ToPtr() *ContainerAppProvisioningState` -- New function `*StaticSitesClientListStaticSiteCustomDomainsPager.NextPage(context.Context) bool` -- New function `Container.MarshalJSON() ([]byte, error)` -- New function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CertificateOrdersClientCreateOrUpdateCertificatePoller.FinalResponse(context.Context) (CertificateOrdersClientCreateOrUpdateCertificateResponse, error)` -- New function `*PlansClient.ListCapabilities(context.Context, string, string, *PlansClientListCapabilitiesOptions) (PlansClientListCapabilitiesResponse, error)` -- New function `*WebAppsClientInstallSiteExtensionSlotPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*PlansClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClientListUsagesPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListInstanceProcessModulesPager.PageResponse() WebAppsClientListInstanceProcessModulesResponse` -- New function `*ContainerAppsClient.ListByResourceGroup(string, *ContainerAppsClientListByResourceGroupOptions) *ContainerAppsClientListByResourceGroupPager` -- New function `*CertificateRegistrationProviderClientListOperationsPager.Err() error` -- New function `*WebAppsClient.CreateOneDeployOperation(context.Context, string, string, *WebAppsClientCreateOneDeployOperationOptions) (WebAppsClientCreateOneDeployOperationResponse, error)` -- New function `*WebAppsClientListTriggeredWebJobsSlotPager.PageResponse() WebAppsClientListTriggeredWebJobsSlotResponse` -- New function `*WebAppsClientRestoreFromBackupBlobPoller.Done() bool` -- New function `*ResourceHealthMetadataClientListPager.PageResponse() ResourceHealthMetadataClientListResponse` -- New function `*WebAppsClientCreateOrUpdateSlotPoller.FinalResponse(context.Context) (WebAppsClientCreateOrUpdateSlotResponse, error)` -- New function `*WebAppsClientCreateOrUpdatePoller.FinalResponse(context.Context) (WebAppsClientCreateOrUpdateResponse, error)` -- New function `*EnvironmentsClientDeletePollerResponse.Resume(context.Context, *EnvironmentsClient, string) error` -- New function `*EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListConfigurationSnapshotInfoPager.NextPage(context.Context) bool` -- New function `*DomainRegistrationProviderClientListOperationsPager.PageResponse() DomainRegistrationProviderClientListOperationsResponse` -- New function `*EnvironmentsClientListWebAppsPager.Err() error` -- New function `*StaticSitesClientGetStaticSiteBuildsPager.Err() error` -- New function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.FinalResponse(context.Context) (StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse, error)` -- New function `*WebAppsClientCreateOrUpdatePoller.Done() bool` -- New function `*EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPoller.Done() bool` -- New function `WebAppsClientListPublishingCredentialsSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientListPublishingCredentialsSlotResponse, error)` -- New function `*ProviderClientListOperationsPager.NextPage(context.Context) bool` -- New function `Environment.MarshalJSON() ([]byte, error)` -- New function `*CertificateOrdersClient.RetrieveCertificateEmailHistory(context.Context, string, string, *CertificateOrdersClientRetrieveCertificateEmailHistoryOptions) (CertificateOrdersClientRetrieveCertificateEmailHistoryResponse, error)` -- New function `*EnvironmentsClientGetOutboundNetworkDependenciesEndpointsPager.Err() error` -- New function `*PlanProperties.UnmarshalJSON([]byte) error` -- New function `*EnvironmentsClientListAppServicePlansPager.Err() error` -- New function `ContainerAppsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (ContainerAppsClientCreateOrUpdateResponse, error)` -- New function `*TopLevelDomainsClientListAgreementsPager.NextPage(context.Context) bool` -- New function `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse, error)` -- New function `RevisionCollection.MarshalJSON() ([]byte, error)` -- New function `*DomainsClientCreateOrUpdatePoller.FinalResponse(context.Context) (DomainsClientCreateOrUpdateResponse, error)` -- New function `WebAppsClientCreateMSDeployOperationSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientCreateMSDeployOperationSlotResponse, error)` -- New function `*WebAppsClientListSnapshotsPager.PageResponse() WebAppsClientListSnapshotsResponse` -- New function `ActiveRevisionsMode.ToPtr() *ActiveRevisionsMode` -- New function `*WebAppsClientCreateInstanceMSDeployOperationPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*ContainerAppsRevisionsClient.RestartRevision(context.Context, string, string, string, *ContainerAppsRevisionsClientRestartRevisionOptions) (ContainerAppsRevisionsClientRestartRevisionResponse, error)` -- New function `*ProviderClientGetFunctionAppStacksPager.PageResponse() ProviderClientGetFunctionAppStacksResponse` -- New function `*DiagnosticsClientListHostingEnvironmentDetectorResponsesPager.PageResponse() DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse` -- New function `*WebAppsClientRestoreFromBackupBlobPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*ResourceHealthMetadataClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `ContainerAppsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (ContainerAppsClientDeleteResponse, error)` -- New function `*EnvironmentsClient.ListDiagnostics(context.Context, string, string, *EnvironmentsClientListDiagnosticsOptions) (EnvironmentsClientListDiagnosticsResponse, error)` -- New function `*CertificateOrdersClientListByResourceGroupPager.PageResponse() CertificateOrdersClientListByResourceGroupResponse` -- New function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller.ResumeToken() (string, error)` -- New function `NewContainerAppsClient(string, azcore.TokenCredential, *arm.ClientOptions) *ContainerAppsClient` -- New function `EnvironmentsClientCreateOrUpdateWorkerPoolPollerResponse.PollUntilDone(context.Context, time.Duration) (EnvironmentsClientCreateOrUpdateWorkerPoolResponse, error)` -- New function `*WebAppsClientCreateOrUpdatePollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*EnvironmentsClient.GetOutboundNetworkDependenciesEndpoints(string, string, *EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions) *EnvironmentsClientGetOutboundNetworkDependenciesEndpointsPager` -- New function `*TopLevelDomainsClientListAgreementsPager.PageResponse() TopLevelDomainsClientListAgreementsResponse` -- New function `*PlansClientListHybridConnectionsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListSiteBackupsSlotPager.PageResponse() WebAppsClientListSiteBackupsSlotResponse` -- New function `*EnvironmentsClient.BeginCreateOrUpdate(context.Context, string, string, EnvironmentResource, *EnvironmentsClientBeginCreateOrUpdateOptions) (EnvironmentsClientCreateOrUpdatePollerResponse, error)` -- New function `*WebAppsClientRestoreSnapshotSlotPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientListSnapshotsFromDRSecondarySlotPager.NextPage(context.Context) bool` -- New function `*CertificatesClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*CertificateOrdersClientCreateOrUpdatePoller.FinalResponse(context.Context) (CertificateOrdersClientCreateOrUpdateResponse, error)` -- New function `*DomainsClientListRecommendationsPager.Err() error` -- New function `*EnvironmentsClientCreateOrUpdateWorkerPoolPoller.Done() bool` -- New function `*StaticSitesClientGetStaticSiteBuildsPager.PageResponse() StaticSitesClientGetStaticSiteBuildsResponse` -- New function `*EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsPager.Err() error` -- New function `*EnvironmentsClient.ListMultiRolePoolInstanceMetricDefinitions(string, string, string, *EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions) *EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsPager` -- New function `*WebAppsClientListContinuousWebJobsSlotPager.NextPage(context.Context) bool` -- New function `WebAppsClientStartNetworkTraceSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientStartNetworkTraceSlotResponse, error)` -- New function `*TopLevelDomainsClientListPager.PageResponse() TopLevelDomainsClientListResponse` -- New function `*EnvironmentsClientSuspendPoller.Done() bool` -- New function `*WebAppsClientListSiteExtensionsSlotPager.PageResponse() WebAppsClientListSiteExtensionsSlotResponse` -- New function `*WebAppsClientListSnapshotsFromDRSecondaryPager.NextPage(context.Context) bool` -- New function `*PlansClientListWebAppsPager.PageResponse() PlansClientListWebAppsResponse` -- New function `*WebAppsClientCreateMSDeployOperationSlotPoller.Done() bool` -- New function `*WebAppsClientListBasicPublishingCredentialsPoliciesSlotPager.PageResponse() WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse` -- New function `*WebAppsClientMigrateStoragePollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*WebAppsClientRestoreSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*KubeEnvironmentsClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClient.GetVipInfo(context.Context, string, string, *EnvironmentsClientGetVipInfoOptions) (EnvironmentsClientGetVipInfoResponse, error)` -- New function `*DiagnosticsClientListSiteAnalysesSlotPager.PageResponse() DiagnosticsClientListSiteAnalysesSlotResponse` -- New function `*EnvironmentsClientSuspendPoller.FinalResponse(context.Context) (*EnvironmentsClientSuspendPager, error)` -- New function `*PlansClientCreateOrUpdatePollerResponse.Resume(context.Context, *PlansClient, string) error` -- New function `*ResourceHealthMetadataClientListBySitePager.NextPage(context.Context) bool` -- New function `*StaticSitesClientCreateOrUpdateStaticSitePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientRestoreFromBackupBlobPoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientRestoreFromDeletedAppSlotPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientRestorePollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `Scale.MarshalJSON() ([]byte, error)` -- New function `*EnvironmentsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientMigrateStoragePoller.Poll(context.Context) (*http.Response, error)` -- New function `*StaticSitesClientDeletePrivateEndpointConnectionPoller.FinalResponse(context.Context) (StaticSitesClientDeletePrivateEndpointConnectionResponse, error)` -- New function `*WebAppsClientCreateMSDeployOperationSlotPoller.ResumeToken() (string, error)` -- New function `*PlansClientCreateOrUpdatePoller.FinalResponse(context.Context) (PlansClientCreateOrUpdateResponse, error)` -- New function `*StaticSitesClientDeletePrivateEndpointConnectionPoller.ResumeToken() (string, error)` -- New function `StaticSitesClientDeletePrivateEndpointConnectionPollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientDeletePrivateEndpointConnectionResponse, error)` -- New function `*DomainsClientListOwnershipIdentifiersPager.Err() error` -- New function `*StaticSitesClientGetStaticSiteBuildsPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientResumePager.Err() error` -- New function `*EnvironmentsClient.ListMultiRoleUsages(string, string, *EnvironmentsClientListMultiRoleUsagesOptions) *EnvironmentsClientListMultiRoleUsagesPager` -- New function `*WebAppsClientListDeploymentsSlotPager.NextPage(context.Context) bool` -- New function `*KubeEnvironmentsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListInstanceIdentifiersSlotPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientDeleteStaticSitePollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `*WebAppsClientMigrateMySQLPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientListDomainOwnershipIdentifiersPager.PageResponse() WebAppsClientListDomainOwnershipIdentifiersResponse` -- New function `*WebAppsClientListSnapshotsPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClient.ListCapacities(string, string, *EnvironmentsClientListCapacitiesOptions) *EnvironmentsClientListCapacitiesPager` -- New function `Enum17.ToPtr() *Enum17` -- New function `*WebAppsClientListTriggeredWebJobHistoryPager.NextPage(context.Context) bool` -- New function `StaticSitesClientDeleteStaticSiteBuildPollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientDeleteStaticSiteBuildResponse, error)` -- New function `CertificateOrderPatchResource.MarshalJSON() ([]byte, error)` -- New function `StaticSitesClientApproveOrRejectPrivateEndpointConnectionPollerResponse.PollUntilDone(context.Context, time.Duration) (StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse, error)` -- New function `*WebAppsClientListSlotDifferencesFromProductionPager.Err() error` -- New function `*ProviderClientGetFunctionAppStacksPager.Err() error` -- New function `DaprComponent.MarshalJSON() ([]byte, error)` -- New function `*PlanPatchResourceProperties.UnmarshalJSON([]byte) error` -- New function `*WebAppsClientRestoreSnapshotPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotPoller.Done() bool` -- New function `*WebAppsClientMigrateMySQLPoller.Done() bool` -- New function `*WebAppsClientRestoreFromBackupBlobSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ProviderClientGetWebAppStacksForLocationPager.NextPage(context.Context) bool` -- New function `*ContainerAppsClientListBySubscriptionPager.PageResponse() ContainerAppsClientListBySubscriptionResponse` -- New function `*WebAppsClientCreateOrUpdateSlotPoller.Poll(context.Context) (*http.Response, error)` -- New function `*RecommendationsClientListHistoryForWebAppPager.Err() error` -- New function `*StaticSitesClientCreateOrUpdateStaticSitePollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `*WebAppsClientListSlotDifferencesSlotPager.NextPage(context.Context) bool` -- New function `PossibleContainerAppProvisioningStateValues() []ContainerAppProvisioningState` -- New function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionPoller.FinalResponse(context.Context) (WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse, error)` -- New function `Ingress.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientGetAppSettingsKeyVaultReferencesPager.PageResponse() WebAppsClientGetAppSettingsKeyVaultReferencesResponse` -- New function `*DeletedWebAppsClientListPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListSiteBackupsPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientDetachStaticSitePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientStartWebSiteNetworkTraceOperationSlotPoller.FinalResponse(context.Context) (WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse, error)` -- New function `*EnvironmentsClientListCapacitiesPager.NextPage(context.Context) bool` -- New function `*ResourceHealthMetadataClientListPager.NextPage(context.Context) bool` -- New function `*PlansClient.ListHybridConnections(string, string, *PlansClientListHybridConnectionsOptions) *PlansClientListHybridConnectionsPager` -- New function `*WebAppsClientApproveOrRejectPrivateEndpointConnectionPoller.ResumeToken() (string, error)` -- New function `*EnvironmentsClientGetPrivateEndpointConnectionListPager.Err() error` -- New function `*StaticSitesClientListStaticSiteUsersPager.Err() error` -- New function `*WebAppsClientListDeploymentsSlotPager.PageResponse() WebAppsClientListDeploymentsSlotResponse` -- New function `*WebAppsClientDeletePrivateEndpointConnectionPoller.FinalResponse(context.Context) (WebAppsClientDeletePrivateEndpointConnectionResponse, error)` -- New function `*StaticSitesClientDeleteStaticSitePoller.ResumeToken() (string, error)` -- New function `*CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponsePager.Err() error` -- New function `*WebAppsClientListProcessThreadsSlotPager.PageResponse() WebAppsClientListProcessThreadsSlotResponse` -- New function `*StaticSitesClientApproveOrRejectPrivateEndpointConnectionPoller.Done() bool` -- New function `*WebAppsClientListPublicCertificatesPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListDeploymentsPager.NextPage(context.Context) bool` -- New function `*DiagnosticsClientListHostingEnvironmentDetectorResponsesPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientSuspendPager.PageResponse() EnvironmentsClientSuspendResponse` -- New function `*ContainerAppsClientDeletePoller.FinalResponse(context.Context) (ContainerAppsClientDeleteResponse, error)` -- New function `*WebAppsClientListProcessThreadsPager.Err() error` -- New function `Dapr.MarshalJSON() ([]byte, error)` -- New function `*WebAppsClientListBasicPublishingCredentialsPoliciesSlotPager.Err() error` -- New function `*WebAppsClientListInstanceProcessModulesPager.NextPage(context.Context) bool` -- New function `*StaticSitesClientDeleteStaticSiteCustomDomainPoller.ResumeToken() (string, error)` -- New function `*WebAppsClientCreateInstanceFunctionSlotPoller.ResumeToken() (string, error)` -- New function `*StaticSitesClientCreateZipDeploymentForStaticSitePoller.ResumeToken() (string, error)` -- New function `*StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildPager.NextPage(context.Context) bool` -- New function `*EnvironmentsClientListWorkerPoolsPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListDeploymentsPager.Err() error` -- New function `*WebAppsClientListSiteExtensionsSlotPager.NextPage(context.Context) bool` -- New function `*WebAppsClientListHostNameBindingsPager.Err() error` -- New function `NewEnvironmentsClient(string, azcore.TokenCredential, *arm.ClientOptions) *EnvironmentsClient` -- New function `*WebAppsClientListSnapshotsSlotPager.NextPage(context.Context) bool` -- New function `*ProviderClientGetAvailableStacksPager.NextPage(context.Context) bool` -- New function `*DomainRegistrationProviderClientListOperationsPager.Err() error` -- New function `*ContainerAppsRevisionsClientListRevisionsPager.NextPage(context.Context) bool` -- New function `WebAppsClientInstallSiteExtensionPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientInstallSiteExtensionResponse, error)` -- New function `*WebAppsClientListContinuousWebJobsPager.Err() error` -- New function `*CertificateOrdersClient.ListByResourceGroup(string, *CertificateOrdersClientListByResourceGroupOptions) *CertificateOrdersClientListByResourceGroupPager` -- New function `*ContainerAppsRevisionsClient.ActivateRevision(context.Context, string, string, string, *ContainerAppsRevisionsClientActivateRevisionOptions) (ContainerAppsRevisionsClientActivateRevisionResponse, error)` -- New function `*WebAppsClientListUsagesPager.Err() error` -- New function `*CertificateOrdersClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*WebAppsClientListConfigurationSnapshotInfoPager.Err() error` -- New function `*WebAppsClientCreateFunctionPollerResponse.Resume(context.Context, *WebAppsClient, string) error` -- New function `*KubeEnvironmentsClientListByResourceGroupPager.Err() error` -- New function `*WebAppsClientListInstanceProcessThreadsPager.NextPage(context.Context) bool` -- New function `*ContainerAppsClientDeletePollerResponse.Resume(context.Context, *ContainerAppsClient, string) error` -- New function `*PlansClient.ListRoutesForVnet(context.Context, string, string, string, *PlansClientListRoutesForVnetOptions) (PlansClientListRoutesForVnetResponse, error)` -- New function `KubeEnvironmentsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (KubeEnvironmentsClientDeleteResponse, error)` -- New function `*StaticSitesClientDeleteStaticSitePoller.Done() bool` -- New function `*WebAppsClientCreateFunctionPoller.Done() bool` -- New function `*RecommendationsClientListHistoryForHostingEnvironmentPager.PageResponse() RecommendationsClientListHistoryForHostingEnvironmentResponse` -- New function `PossibleEnum16Values() []Enum16` -- New function `*StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse.Resume(context.Context, *StaticSitesClient, string) error` -- New function `QueueScaleRule.MarshalJSON() ([]byte, error)` -- New function `*CertificateOrdersClient.Renew(context.Context, string, string, RenewCertificateOrderRequest, *CertificateOrdersClientRenewOptions) (CertificateOrdersClientRenewResponse, error)` -- New function `WebAppsClientRestoreFromDeletedAppSlotPollerResponse.PollUntilDone(context.Context, time.Duration) (WebAppsClientRestoreFromDeletedAppSlotResponse, error)` -- New function `*WebAppsClientRestorePoller.FinalResponse(context.Context) (WebAppsClientRestoreResponse, error)` -- New function `*WebSiteManagementClientListCustomHostNameSitesPager.PageResponse() WebSiteManagementClientListCustomHostNameSitesResponse` -- New function `*WebAppsClientListBackupsSlotPager.PageResponse() WebAppsClientListBackupsSlotResponse` -- New function `*StaticSitesClientCreateOrUpdateStaticSitePoller.FinalResponse(context.Context) (StaticSitesClientCreateOrUpdateStaticSiteResponse, error)` -- New struct `AppCertificate` -- New struct `AppCertificateCollection` -- New struct `AppCertificatePatchResource` -- New struct `AppCertificatePatchResourceProperties` -- New struct `AppCertificateProperties` -- New struct `CertificateOrder` -- New struct `CertificateOrderCollection` -- New struct `CertificateOrderPatchResource` -- New struct `CertificateOrderPatchResourceProperties` -- New struct `CertificateOrderProperties` -- New struct `CertificateOrdersClient` -- New struct `CertificateOrdersClientBeginCreateOrUpdateCertificateOptions` -- New struct `CertificateOrdersClientBeginCreateOrUpdateOptions` -- New struct `CertificateOrdersClientCreateOrUpdateCertificatePoller` -- New struct `CertificateOrdersClientCreateOrUpdateCertificatePollerResponse` -- New struct `CertificateOrdersClientCreateOrUpdateCertificateResponse` -- New struct `CertificateOrdersClientCreateOrUpdateCertificateResult` -- New struct `CertificateOrdersClientCreateOrUpdatePoller` -- New struct `CertificateOrdersClientCreateOrUpdatePollerResponse` -- New struct `CertificateOrdersClientCreateOrUpdateResponse` -- New struct `CertificateOrdersClientCreateOrUpdateResult` -- New struct `CertificateOrdersClientDeleteCertificateOptions` -- New struct `CertificateOrdersClientDeleteCertificateResponse` -- New struct `CertificateOrdersClientDeleteOptions` -- New struct `CertificateOrdersClientDeleteResponse` -- New struct `CertificateOrdersClientGetCertificateOptions` -- New struct `CertificateOrdersClientGetCertificateResponse` -- New struct `CertificateOrdersClientGetCertificateResult` -- New struct `CertificateOrdersClientGetOptions` -- New struct `CertificateOrdersClientGetResponse` -- New struct `CertificateOrdersClientGetResult` -- New struct `CertificateOrdersClientListByResourceGroupOptions` -- New struct `CertificateOrdersClientListByResourceGroupPager` -- New struct `CertificateOrdersClientListByResourceGroupResponse` -- New struct `CertificateOrdersClientListByResourceGroupResult` -- New struct `CertificateOrdersClientListCertificatesOptions` -- New struct `CertificateOrdersClientListCertificatesPager` -- New struct `CertificateOrdersClientListCertificatesResponse` -- New struct `CertificateOrdersClientListCertificatesResult` -- New struct `CertificateOrdersClientListOptions` -- New struct `CertificateOrdersClientListPager` -- New struct `CertificateOrdersClientListResponse` -- New struct `CertificateOrdersClientListResult` -- New struct `CertificateOrdersClientReissueOptions` -- New struct `CertificateOrdersClientReissueResponse` -- New struct `CertificateOrdersClientRenewOptions` -- New struct `CertificateOrdersClientRenewResponse` -- New struct `CertificateOrdersClientResendEmailOptions` -- New struct `CertificateOrdersClientResendEmailResponse` -- New struct `CertificateOrdersClientResendRequestEmailsOptions` -- New struct `CertificateOrdersClientResendRequestEmailsResponse` -- New struct `CertificateOrdersClientRetrieveCertificateActionsOptions` -- New struct `CertificateOrdersClientRetrieveCertificateActionsResponse` -- New struct `CertificateOrdersClientRetrieveCertificateActionsResult` -- New struct `CertificateOrdersClientRetrieveCertificateEmailHistoryOptions` -- New struct `CertificateOrdersClientRetrieveCertificateEmailHistoryResponse` -- New struct `CertificateOrdersClientRetrieveCertificateEmailHistoryResult` -- New struct `CertificateOrdersClientRetrieveSiteSealOptions` -- New struct `CertificateOrdersClientRetrieveSiteSealResponse` -- New struct `CertificateOrdersClientRetrieveSiteSealResult` -- New struct `CertificateOrdersClientUpdateCertificateOptions` -- New struct `CertificateOrdersClientUpdateCertificateResponse` -- New struct `CertificateOrdersClientUpdateCertificateResult` -- New struct `CertificateOrdersClientUpdateOptions` -- New struct `CertificateOrdersClientUpdateResponse` -- New struct `CertificateOrdersClientUpdateResult` -- New struct `CertificateOrdersClientValidatePurchaseInformationOptions` -- New struct `CertificateOrdersClientValidatePurchaseInformationResponse` -- New struct `CertificateOrdersClientVerifyDomainOwnershipOptions` -- New struct `CertificateOrdersClientVerifyDomainOwnershipResponse` -- New struct `CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions` -- New struct `CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse` -- New struct `CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResult` -- New struct `CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions` -- New struct `CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponsePager` -- New struct `CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse` -- New struct `CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResult` -- New struct `CertificateRegistrationProviderClientListOperationsOptions` -- New struct `CertificateRegistrationProviderClientListOperationsPager` -- New struct `CertificateRegistrationProviderClientListOperationsResponse` -- New struct `CertificateRegistrationProviderClientListOperationsResult` -- New struct `CertificateResource` -- New struct `CertificatesClientCreateOrUpdateOptions` -- New struct `CertificatesClientCreateOrUpdateResponse` -- New struct `CertificatesClientCreateOrUpdateResult` -- New struct `CertificatesClientDeleteOptions` -- New struct `CertificatesClientDeleteResponse` -- New struct `CertificatesClientGetOptions` -- New struct `CertificatesClientGetResponse` -- New struct `CertificatesClientGetResult` -- New struct `CertificatesClientListByResourceGroupOptions` -- New struct `CertificatesClientListByResourceGroupPager` -- New struct `CertificatesClientListByResourceGroupResponse` -- New struct `CertificatesClientListByResourceGroupResult` -- New struct `CertificatesClientListOptions` -- New struct `CertificatesClientListPager` -- New struct `CertificatesClientListResponse` -- New struct `CertificatesClientListResult` -- New struct `CertificatesClientUpdateOptions` -- New struct `CertificatesClientUpdateResponse` -- New struct `CertificatesClientUpdateResult` -- New struct `Configuration` -- New struct `Container` -- New struct `ContainerApp` -- New struct `ContainerAppCollection` -- New struct `ContainerAppProperties` -- New struct `ContainerAppSecret` -- New struct `ContainerAppsClient` -- New struct `ContainerAppsClientBeginCreateOrUpdateOptions` -- New struct `ContainerAppsClientBeginDeleteOptions` -- New struct `ContainerAppsClientCreateOrUpdatePoller` -- New struct `ContainerAppsClientCreateOrUpdatePollerResponse` -- New struct `ContainerAppsClientCreateOrUpdateResponse` -- New struct `ContainerAppsClientCreateOrUpdateResult` -- New struct `ContainerAppsClientDeletePoller` -- New struct `ContainerAppsClientDeletePollerResponse` -- New struct `ContainerAppsClientDeleteResponse` -- New struct `ContainerAppsClientGetOptions` -- New struct `ContainerAppsClientGetResponse` -- New struct `ContainerAppsClientGetResult` -- New struct `ContainerAppsClientListByResourceGroupOptions` -- New struct `ContainerAppsClientListByResourceGroupPager` -- New struct `ContainerAppsClientListByResourceGroupResponse` -- New struct `ContainerAppsClientListByResourceGroupResult` -- New struct `ContainerAppsClientListBySubscriptionOptions` -- New struct `ContainerAppsClientListBySubscriptionPager` -- New struct `ContainerAppsClientListBySubscriptionResponse` -- New struct `ContainerAppsClientListBySubscriptionResult` -- New struct `ContainerAppsClientListSecretsOptions` -- New struct `ContainerAppsClientListSecretsResponse` -- New struct `ContainerAppsClientListSecretsResult` -- New struct `ContainerAppsConfiguration` -- New struct `ContainerAppsRevisionsClient` -- New struct `ContainerAppsRevisionsClientActivateRevisionOptions` -- New struct `ContainerAppsRevisionsClientActivateRevisionResponse` -- New struct `ContainerAppsRevisionsClientDeactivateRevisionOptions` -- New struct `ContainerAppsRevisionsClientDeactivateRevisionResponse` -- New struct `ContainerAppsRevisionsClientGetRevisionOptions` -- New struct `ContainerAppsRevisionsClientGetRevisionResponse` -- New struct `ContainerAppsRevisionsClientGetRevisionResult` -- New struct `ContainerAppsRevisionsClientListRevisionsOptions` -- New struct `ContainerAppsRevisionsClientListRevisionsPager` -- New struct `ContainerAppsRevisionsClientListRevisionsResponse` -- New struct `ContainerAppsRevisionsClientListRevisionsResult` -- New struct `ContainerAppsRevisionsClientRestartRevisionOptions` -- New struct `ContainerAppsRevisionsClientRestartRevisionResponse` -- New struct `ContainerResources` -- New struct `CustomHostnameSites` -- New struct `CustomHostnameSitesCollection` -- New struct `CustomHostnameSitesProperties` -- New struct `CustomScaleRule` -- New struct `Dapr` -- New struct `DaprComponent` -- New struct `DaprMetadata` -- New struct `DeletedWebAppsClientGetDeletedWebAppByLocationOptions` -- New struct `DeletedWebAppsClientGetDeletedWebAppByLocationResponse` -- New struct `DeletedWebAppsClientGetDeletedWebAppByLocationResult` -- New struct `DeletedWebAppsClientListByLocationOptions` -- New struct `DeletedWebAppsClientListByLocationPager` -- New struct `DeletedWebAppsClientListByLocationResponse` -- New struct `DeletedWebAppsClientListByLocationResult` -- New struct `DeletedWebAppsClientListOptions` -- New struct `DeletedWebAppsClientListPager` -- New struct `DeletedWebAppsClientListResponse` -- New struct `DeletedWebAppsClientListResult` -- New struct `DiagnosticsClientExecuteSiteAnalysisOptions` -- New struct `DiagnosticsClientExecuteSiteAnalysisResponse` -- New struct `DiagnosticsClientExecuteSiteAnalysisResult` -- New struct `DiagnosticsClientExecuteSiteAnalysisSlotOptions` -- New struct `DiagnosticsClientExecuteSiteAnalysisSlotResponse` -- New struct `DiagnosticsClientExecuteSiteAnalysisSlotResult` -- New struct `DiagnosticsClientExecuteSiteDetectorOptions` -- New struct `DiagnosticsClientExecuteSiteDetectorResponse` -- New struct `DiagnosticsClientExecuteSiteDetectorResult` -- New struct `DiagnosticsClientExecuteSiteDetectorSlotOptions` -- New struct `DiagnosticsClientExecuteSiteDetectorSlotResponse` -- New struct `DiagnosticsClientExecuteSiteDetectorSlotResult` -- New struct `DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions` -- New struct `DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse` -- New struct `DiagnosticsClientGetHostingEnvironmentDetectorResponseResult` -- New struct `DiagnosticsClientGetSiteAnalysisOptions` -- New struct `DiagnosticsClientGetSiteAnalysisResponse` -- New struct `DiagnosticsClientGetSiteAnalysisResult` -- New struct `DiagnosticsClientGetSiteAnalysisSlotOptions` -- New struct `DiagnosticsClientGetSiteAnalysisSlotResponse` -- New struct `DiagnosticsClientGetSiteAnalysisSlotResult` -- New struct `DiagnosticsClientGetSiteDetectorOptions` -- New struct `DiagnosticsClientGetSiteDetectorResponse` -- New struct `DiagnosticsClientGetSiteDetectorResponseOptions` -- New struct `DiagnosticsClientGetSiteDetectorResponseResponse` -- New struct `DiagnosticsClientGetSiteDetectorResponseResult` -- New struct `DiagnosticsClientGetSiteDetectorResponseSlotOptions` -- New struct `DiagnosticsClientGetSiteDetectorResponseSlotResponse` -- New struct `DiagnosticsClientGetSiteDetectorResponseSlotResult` -- New struct `DiagnosticsClientGetSiteDetectorResult` -- New struct `DiagnosticsClientGetSiteDetectorSlotOptions` -- New struct `DiagnosticsClientGetSiteDetectorSlotResponse` -- New struct `DiagnosticsClientGetSiteDetectorSlotResult` -- New struct `DiagnosticsClientGetSiteDiagnosticCategoryOptions` -- New struct `DiagnosticsClientGetSiteDiagnosticCategoryResponse` -- New struct `DiagnosticsClientGetSiteDiagnosticCategoryResult` -- New struct `DiagnosticsClientGetSiteDiagnosticCategorySlotOptions` -- New struct `DiagnosticsClientGetSiteDiagnosticCategorySlotResponse` -- New struct `DiagnosticsClientGetSiteDiagnosticCategorySlotResult` -- New struct `DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions` -- New struct `DiagnosticsClientListHostingEnvironmentDetectorResponsesPager` -- New struct `DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse` -- New struct `DiagnosticsClientListHostingEnvironmentDetectorResponsesResult` -- New struct `DiagnosticsClientListSiteAnalysesOptions` -- New struct `DiagnosticsClientListSiteAnalysesPager` -- New struct `DiagnosticsClientListSiteAnalysesResponse` -- New struct `DiagnosticsClientListSiteAnalysesResult` -- New struct `DiagnosticsClientListSiteAnalysesSlotOptions` -- New struct `DiagnosticsClientListSiteAnalysesSlotPager` -- New struct `DiagnosticsClientListSiteAnalysesSlotResponse` -- New struct `DiagnosticsClientListSiteAnalysesSlotResult` -- New struct `DiagnosticsClientListSiteDetectorResponsesOptions` -- New struct `DiagnosticsClientListSiteDetectorResponsesPager` -- New struct `DiagnosticsClientListSiteDetectorResponsesResponse` -- New struct `DiagnosticsClientListSiteDetectorResponsesResult` -- New struct `DiagnosticsClientListSiteDetectorResponsesSlotOptions` -- New struct `DiagnosticsClientListSiteDetectorResponsesSlotPager` -- New struct `DiagnosticsClientListSiteDetectorResponsesSlotResponse` -- New struct `DiagnosticsClientListSiteDetectorResponsesSlotResult` -- New struct `DiagnosticsClientListSiteDetectorsOptions` -- New struct `DiagnosticsClientListSiteDetectorsPager` -- New struct `DiagnosticsClientListSiteDetectorsResponse` -- New struct `DiagnosticsClientListSiteDetectorsResult` -- New struct `DiagnosticsClientListSiteDetectorsSlotOptions` -- New struct `DiagnosticsClientListSiteDetectorsSlotPager` -- New struct `DiagnosticsClientListSiteDetectorsSlotResponse` -- New struct `DiagnosticsClientListSiteDetectorsSlotResult` -- New struct `DiagnosticsClientListSiteDiagnosticCategoriesOptions` -- New struct `DiagnosticsClientListSiteDiagnosticCategoriesPager` -- New struct `DiagnosticsClientListSiteDiagnosticCategoriesResponse` -- New struct `DiagnosticsClientListSiteDiagnosticCategoriesResult` -- New struct `DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions` -- New struct `DiagnosticsClientListSiteDiagnosticCategoriesSlotPager` -- New struct `DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse` -- New struct `DiagnosticsClientListSiteDiagnosticCategoriesSlotResult` -- New struct `DomainRegistrationProviderClientListOperationsOptions` -- New struct `DomainRegistrationProviderClientListOperationsPager` -- New struct `DomainRegistrationProviderClientListOperationsResponse` -- New struct `DomainRegistrationProviderClientListOperationsResult` -- New struct `DomainsClientBeginCreateOrUpdateOptions` -- New struct `DomainsClientCheckAvailabilityOptions` -- New struct `DomainsClientCheckAvailabilityResponse` -- New struct `DomainsClientCheckAvailabilityResult` -- New struct `DomainsClientCreateOrUpdateOwnershipIdentifierOptions` -- New struct `DomainsClientCreateOrUpdateOwnershipIdentifierResponse` -- New struct `DomainsClientCreateOrUpdateOwnershipIdentifierResult` -- New struct `DomainsClientCreateOrUpdatePoller` -- New struct `DomainsClientCreateOrUpdatePollerResponse` -- New struct `DomainsClientCreateOrUpdateResponse` -- New struct `DomainsClientCreateOrUpdateResult` -- New struct `DomainsClientDeleteOptions` -- New struct `DomainsClientDeleteOwnershipIdentifierOptions` -- New struct `DomainsClientDeleteOwnershipIdentifierResponse` -- New struct `DomainsClientDeleteResponse` -- New struct `DomainsClientGetControlCenterSsoRequestOptions` -- New struct `DomainsClientGetControlCenterSsoRequestResponse` -- New struct `DomainsClientGetControlCenterSsoRequestResult` -- New struct `DomainsClientGetOptions` -- New struct `DomainsClientGetOwnershipIdentifierOptions` -- New struct `DomainsClientGetOwnershipIdentifierResponse` -- New struct `DomainsClientGetOwnershipIdentifierResult` -- New struct `DomainsClientGetResponse` -- New struct `DomainsClientGetResult` -- New struct `DomainsClientListByResourceGroupOptions` -- New struct `DomainsClientListByResourceGroupPager` -- New struct `DomainsClientListByResourceGroupResponse` -- New struct `DomainsClientListByResourceGroupResult` -- New struct `DomainsClientListOptions` -- New struct `DomainsClientListOwnershipIdentifiersOptions` -- New struct `DomainsClientListOwnershipIdentifiersPager` -- New struct `DomainsClientListOwnershipIdentifiersResponse` -- New struct `DomainsClientListOwnershipIdentifiersResult` -- New struct `DomainsClientListPager` -- New struct `DomainsClientListRecommendationsOptions` -- New struct `DomainsClientListRecommendationsPager` -- New struct `DomainsClientListRecommendationsResponse` -- New struct `DomainsClientListRecommendationsResult` -- New struct `DomainsClientListResponse` -- New struct `DomainsClientListResult` -- New struct `DomainsClientRenewOptions` -- New struct `DomainsClientRenewResponse` -- New struct `DomainsClientTransferOutOptions` -- New struct `DomainsClientTransferOutResponse` -- New struct `DomainsClientTransferOutResult` -- New struct `DomainsClientUpdateOptions` -- New struct `DomainsClientUpdateOwnershipIdentifierOptions` -- New struct `DomainsClientUpdateOwnershipIdentifierResponse` -- New struct `DomainsClientUpdateOwnershipIdentifierResult` -- New struct `DomainsClientUpdateResponse` -- New struct `DomainsClientUpdateResult` -- New struct `Environment` -- New struct `EnvironmentCollection` -- New struct `EnvironmentPatchResource` -- New struct `EnvironmentResource` -- New struct `EnvironmentVar` -- New struct `EnvironmentsClient` -- New struct `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPoller` -- New struct `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionPollerResponse` -- New struct `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse` -- New struct `EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResult` -- New struct `EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions` -- New struct `EnvironmentsClientBeginChangeVnetOptions` -- New struct `EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions` -- New struct `EnvironmentsClientBeginCreateOrUpdateOptions` -- New struct `EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions` -- New struct `EnvironmentsClientBeginDeleteOptions` -- New struct `EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions` -- New struct `EnvironmentsClientBeginResumeOptions` -- New struct `EnvironmentsClientBeginSuspendOptions` -- New struct `EnvironmentsClientChangeVnetPager` -- New struct `EnvironmentsClientChangeVnetPoller` -- New struct `EnvironmentsClientChangeVnetPollerResponse` -- New struct `EnvironmentsClientChangeVnetResponse` -- New struct `EnvironmentsClientChangeVnetResult` -- New struct `EnvironmentsClientCreateOrUpdateMultiRolePoolPoller` -- New struct `EnvironmentsClientCreateOrUpdateMultiRolePoolPollerResponse` -- New struct `EnvironmentsClientCreateOrUpdateMultiRolePoolResponse` -- New struct `EnvironmentsClientCreateOrUpdateMultiRolePoolResult` -- New struct `EnvironmentsClientCreateOrUpdatePoller` -- New struct `EnvironmentsClientCreateOrUpdatePollerResponse` -- New struct `EnvironmentsClientCreateOrUpdateResponse` -- New struct `EnvironmentsClientCreateOrUpdateResult` -- New struct `EnvironmentsClientCreateOrUpdateWorkerPoolPoller` -- New struct `EnvironmentsClientCreateOrUpdateWorkerPoolPollerResponse` -- New struct `EnvironmentsClientCreateOrUpdateWorkerPoolResponse` -- New struct `EnvironmentsClientCreateOrUpdateWorkerPoolResult` -- New struct `EnvironmentsClientDeletePoller` -- New struct `EnvironmentsClientDeletePollerResponse` -- New struct `EnvironmentsClientDeletePrivateEndpointConnectionPoller` -- New struct `EnvironmentsClientDeletePrivateEndpointConnectionPollerResponse` -- New struct `EnvironmentsClientDeletePrivateEndpointConnectionResponse` -- New struct `EnvironmentsClientDeletePrivateEndpointConnectionResult` -- New struct `EnvironmentsClientDeleteResponse` -- New struct `EnvironmentsClientGetAseV3NetworkingConfigurationOptions` -- New struct `EnvironmentsClientGetAseV3NetworkingConfigurationResponse` -- New struct `EnvironmentsClientGetAseV3NetworkingConfigurationResult` -- New struct `EnvironmentsClientGetDiagnosticsItemOptions` -- New struct `EnvironmentsClientGetDiagnosticsItemResponse` -- New struct `EnvironmentsClientGetDiagnosticsItemResult` -- New struct `EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions` -- New struct `EnvironmentsClientGetInboundNetworkDependenciesEndpointsPager` -- New struct `EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse` -- New struct `EnvironmentsClientGetInboundNetworkDependenciesEndpointsResult` -- New struct `EnvironmentsClientGetMultiRolePoolOptions` -- New struct `EnvironmentsClientGetMultiRolePoolResponse` -- New struct `EnvironmentsClientGetMultiRolePoolResult` -- New struct `EnvironmentsClientGetOptions` -- New struct `EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions` -- New struct `EnvironmentsClientGetOutboundNetworkDependenciesEndpointsPager` -- New struct `EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse` -- New struct `EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResult` -- New struct `EnvironmentsClientGetPrivateEndpointConnectionListOptions` -- New struct `EnvironmentsClientGetPrivateEndpointConnectionListPager` -- New struct `EnvironmentsClientGetPrivateEndpointConnectionListResponse` -- New struct `EnvironmentsClientGetPrivateEndpointConnectionListResult` -- New struct `EnvironmentsClientGetPrivateEndpointConnectionOptions` -- New struct `EnvironmentsClientGetPrivateEndpointConnectionResponse` -- New struct `EnvironmentsClientGetPrivateEndpointConnectionResult` -- New struct `EnvironmentsClientGetPrivateLinkResourcesOptions` -- New struct `EnvironmentsClientGetPrivateLinkResourcesResponse` -- New struct `EnvironmentsClientGetPrivateLinkResourcesResult` -- New struct `EnvironmentsClientGetResponse` -- New struct `EnvironmentsClientGetResult` -- New struct `EnvironmentsClientGetVipInfoOptions` -- New struct `EnvironmentsClientGetVipInfoResponse` -- New struct `EnvironmentsClientGetVipInfoResult` -- New struct `EnvironmentsClientGetWorkerPoolOptions` -- New struct `EnvironmentsClientGetWorkerPoolResponse` -- New struct `EnvironmentsClientGetWorkerPoolResult` -- New struct `EnvironmentsClientListAppServicePlansOptions` -- New struct `EnvironmentsClientListAppServicePlansPager` -- New struct `EnvironmentsClientListAppServicePlansResponse` -- New struct `EnvironmentsClientListAppServicePlansResult` -- New struct `EnvironmentsClientListByResourceGroupOptions` -- New struct `EnvironmentsClientListByResourceGroupPager` -- New struct `EnvironmentsClientListByResourceGroupResponse` -- New struct `EnvironmentsClientListByResourceGroupResult` -- New struct `EnvironmentsClientListCapacitiesOptions` -- New struct `EnvironmentsClientListCapacitiesPager` -- New struct `EnvironmentsClientListCapacitiesResponse` -- New struct `EnvironmentsClientListCapacitiesResult` -- New struct `EnvironmentsClientListDiagnosticsOptions` -- New struct `EnvironmentsClientListDiagnosticsResponse` -- New struct `EnvironmentsClientListDiagnosticsResult` -- New struct `EnvironmentsClientListMultiRoleMetricDefinitionsOptions` -- New struct `EnvironmentsClientListMultiRoleMetricDefinitionsPager` -- New struct `EnvironmentsClientListMultiRoleMetricDefinitionsResponse` -- New struct `EnvironmentsClientListMultiRoleMetricDefinitionsResult` -- New struct `EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions` -- New struct `EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsPager` -- New struct `EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse` -- New struct `EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResult` -- New struct `EnvironmentsClientListMultiRolePoolSKUsOptions` -- New struct `EnvironmentsClientListMultiRolePoolSKUsPager` -- New struct `EnvironmentsClientListMultiRolePoolSKUsResponse` -- New struct `EnvironmentsClientListMultiRolePoolSKUsResult` -- New struct `EnvironmentsClientListMultiRolePoolsOptions` -- New struct `EnvironmentsClientListMultiRolePoolsPager` -- New struct `EnvironmentsClientListMultiRolePoolsResponse` -- New struct `EnvironmentsClientListMultiRolePoolsResult` -- New struct `EnvironmentsClientListMultiRoleUsagesOptions` -- New struct `EnvironmentsClientListMultiRoleUsagesPager` -- New struct `EnvironmentsClientListMultiRoleUsagesResponse` -- New struct `EnvironmentsClientListMultiRoleUsagesResult` -- New struct `EnvironmentsClientListOperationsOptions` -- New struct `EnvironmentsClientListOperationsResponse` -- New struct `EnvironmentsClientListOperationsResult` -- New struct `EnvironmentsClientListOptions` -- New struct `EnvironmentsClientListPager` -- New struct `EnvironmentsClientListResponse` -- New struct `EnvironmentsClientListResult` -- New struct `EnvironmentsClientListUsagesOptions` -- New struct `EnvironmentsClientListUsagesPager` -- New struct `EnvironmentsClientListUsagesResponse` -- New struct `EnvironmentsClientListUsagesResult` -- New struct `EnvironmentsClientListWebAppsOptions` -- New struct `EnvironmentsClientListWebAppsPager` -- New struct `EnvironmentsClientListWebAppsResponse` -- New struct `EnvironmentsClientListWebAppsResult` -- New struct `EnvironmentsClientListWebWorkerMetricDefinitionsOptions` -- New struct `EnvironmentsClientListWebWorkerMetricDefinitionsPager` -- New struct `EnvironmentsClientListWebWorkerMetricDefinitionsResponse` -- New struct `EnvironmentsClientListWebWorkerMetricDefinitionsResult` -- New struct `EnvironmentsClientListWebWorkerUsagesOptions` -- New struct `EnvironmentsClientListWebWorkerUsagesPager` -- New struct `EnvironmentsClientListWebWorkerUsagesResponse` -- New struct `EnvironmentsClientListWebWorkerUsagesResult` -- New struct `EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions` -- New struct `EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsPager` -- New struct `EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse` -- New struct `EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResult` -- New struct `EnvironmentsClientListWorkerPoolSKUsOptions` -- New struct `EnvironmentsClientListWorkerPoolSKUsPager` -- New struct `EnvironmentsClientListWorkerPoolSKUsResponse` -- New struct `EnvironmentsClientListWorkerPoolSKUsResult` -- New struct `EnvironmentsClientListWorkerPoolsOptions` -- New struct `EnvironmentsClientListWorkerPoolsPager` -- New struct `EnvironmentsClientListWorkerPoolsResponse` -- New struct `EnvironmentsClientListWorkerPoolsResult` -- New struct `EnvironmentsClientRebootOptions` -- New struct `EnvironmentsClientRebootResponse` -- New struct `EnvironmentsClientResumePager` -- New struct `EnvironmentsClientResumePoller` -- New struct `EnvironmentsClientResumePollerResponse` -- New struct `EnvironmentsClientResumeResponse` -- New struct `EnvironmentsClientResumeResult` -- New struct `EnvironmentsClientSuspendPager` -- New struct `EnvironmentsClientSuspendPoller` -- New struct `EnvironmentsClientSuspendPollerResponse` -- New struct `EnvironmentsClientSuspendResponse` -- New struct `EnvironmentsClientSuspendResult` -- New struct `EnvironmentsClientUpdateAseNetworkingConfigurationOptions` -- New struct `EnvironmentsClientUpdateAseNetworkingConfigurationResponse` -- New struct `EnvironmentsClientUpdateAseNetworkingConfigurationResult` -- New struct `EnvironmentsClientUpdateMultiRolePoolOptions` -- New struct `EnvironmentsClientUpdateMultiRolePoolResponse` -- New struct `EnvironmentsClientUpdateMultiRolePoolResult` -- New struct `EnvironmentsClientUpdateOptions` -- New struct `EnvironmentsClientUpdateResponse` -- New struct `EnvironmentsClientUpdateResult` -- New struct `EnvironmentsClientUpdateWorkerPoolOptions` -- New struct `EnvironmentsClientUpdateWorkerPoolResponse` -- New struct `EnvironmentsClientUpdateWorkerPoolResult` -- New struct `GlobalClientGetDeletedWebAppOptions` -- New struct `GlobalClientGetDeletedWebAppResponse` -- New struct `GlobalClientGetDeletedWebAppResult` -- New struct `GlobalClientGetDeletedWebAppSnapshotsOptions` -- New struct `GlobalClientGetDeletedWebAppSnapshotsResponse` -- New struct `GlobalClientGetDeletedWebAppSnapshotsResult` -- New struct `GlobalClientGetSubscriptionOperationWithAsyncResponseOptions` -- New struct `GlobalClientGetSubscriptionOperationWithAsyncResponseResponse` -- New struct `HTTPScaleRule` -- New struct `Ingress` -- New struct `KubeEnvironmentsClientBeginCreateOrUpdateOptions` -- New struct `KubeEnvironmentsClientBeginDeleteOptions` -- New struct `KubeEnvironmentsClientCreateOrUpdatePoller` -- New struct `KubeEnvironmentsClientCreateOrUpdatePollerResponse` -- New struct `KubeEnvironmentsClientCreateOrUpdateResponse` -- New struct `KubeEnvironmentsClientCreateOrUpdateResult` -- New struct `KubeEnvironmentsClientDeletePoller` -- New struct `KubeEnvironmentsClientDeletePollerResponse` -- New struct `KubeEnvironmentsClientDeleteResponse` -- New struct `KubeEnvironmentsClientGetOptions` -- New struct `KubeEnvironmentsClientGetResponse` -- New struct `KubeEnvironmentsClientGetResult` -- New struct `KubeEnvironmentsClientListByResourceGroupOptions` -- New struct `KubeEnvironmentsClientListByResourceGroupPager` -- New struct `KubeEnvironmentsClientListByResourceGroupResponse` -- New struct `KubeEnvironmentsClientListByResourceGroupResult` -- New struct `KubeEnvironmentsClientListBySubscriptionOptions` -- New struct `KubeEnvironmentsClientListBySubscriptionPager` -- New struct `KubeEnvironmentsClientListBySubscriptionResponse` -- New struct `KubeEnvironmentsClientListBySubscriptionResult` -- New struct `KubeEnvironmentsClientUpdateOptions` -- New struct `KubeEnvironmentsClientUpdateResponse` -- New struct `KubeEnvironmentsClientUpdateResult` -- New struct `Plan` -- New struct `PlanCollection` -- New struct `PlanPatchResource` -- New struct `PlanPatchResourceProperties` -- New struct `PlanProperties` -- New struct `PlansClient` -- New struct `PlansClientBeginCreateOrUpdateOptions` -- New struct `PlansClientCreateOrUpdatePoller` -- New struct `PlansClientCreateOrUpdatePollerResponse` -- New struct `PlansClientCreateOrUpdateResponse` -- New struct `PlansClientCreateOrUpdateResult` -- New struct `PlansClientCreateOrUpdateVnetRouteOptions` -- New struct `PlansClientCreateOrUpdateVnetRouteResponse` -- New struct `PlansClientCreateOrUpdateVnetRouteResult` -- New struct `PlansClientDeleteHybridConnectionOptions` -- New struct `PlansClientDeleteHybridConnectionResponse` -- New struct `PlansClientDeleteOptions` -- New struct `PlansClientDeleteResponse` -- New struct `PlansClientDeleteVnetRouteOptions` -- New struct `PlansClientDeleteVnetRouteResponse` -- New struct `PlansClientGetHybridConnectionOptions` -- New struct `PlansClientGetHybridConnectionPlanLimitOptions` -- New struct `PlansClientGetHybridConnectionPlanLimitResponse` -- New struct `PlansClientGetHybridConnectionPlanLimitResult` -- New struct `PlansClientGetHybridConnectionResponse` -- New struct `PlansClientGetHybridConnectionResult` -- New struct `PlansClientGetOptions` -- New struct `PlansClientGetResponse` -- New struct `PlansClientGetResult` -- New struct `PlansClientGetRouteForVnetOptions` -- New struct `PlansClientGetRouteForVnetResponse` -- New struct `PlansClientGetRouteForVnetResult` -- New struct `PlansClientGetServerFarmSKUsOptions` -- New struct `PlansClientGetServerFarmSKUsResponse` -- New struct `PlansClientGetServerFarmSKUsResult` -- New struct `PlansClientGetVnetFromServerFarmOptions` -- New struct `PlansClientGetVnetFromServerFarmResponse` -- New struct `PlansClientGetVnetFromServerFarmResult` -- New struct `PlansClientGetVnetGatewayOptions` -- New struct `PlansClientGetVnetGatewayResponse` -- New struct `PlansClientGetVnetGatewayResult` -- New struct `PlansClientListByResourceGroupOptions` -- New struct `PlansClientListByResourceGroupPager` -- New struct `PlansClientListByResourceGroupResponse` -- New struct `PlansClientListByResourceGroupResult` -- New struct `PlansClientListCapabilitiesOptions` -- New struct `PlansClientListCapabilitiesResponse` -- New struct `PlansClientListCapabilitiesResult` -- New struct `PlansClientListHybridConnectionKeysOptions` -- New struct `PlansClientListHybridConnectionKeysResponse` -- New struct `PlansClientListHybridConnectionKeysResult` -- New struct `PlansClientListHybridConnectionsOptions` -- New struct `PlansClientListHybridConnectionsPager` -- New struct `PlansClientListHybridConnectionsResponse` -- New struct `PlansClientListHybridConnectionsResult` -- New struct `PlansClientListOptions` -- New struct `PlansClientListPager` -- New struct `PlansClientListResponse` -- New struct `PlansClientListResult` -- New struct `PlansClientListRoutesForVnetOptions` -- New struct `PlansClientListRoutesForVnetResponse` -- New struct `PlansClientListRoutesForVnetResult` -- New struct `PlansClientListUsagesOptions` -- New struct `PlansClientListUsagesPager` -- New struct `PlansClientListUsagesResponse` -- New struct `PlansClientListUsagesResult` -- New struct `PlansClientListVnetsOptions` -- New struct `PlansClientListVnetsResponse` -- New struct `PlansClientListVnetsResult` -- New struct `PlansClientListWebAppsByHybridConnectionOptions` -- New struct `PlansClientListWebAppsByHybridConnectionPager` -- New struct `PlansClientListWebAppsByHybridConnectionResponse` -- New struct `PlansClientListWebAppsByHybridConnectionResult` -- New struct `PlansClientListWebAppsOptions` -- New struct `PlansClientListWebAppsPager` -- New struct `PlansClientListWebAppsResponse` -- New struct `PlansClientListWebAppsResult` -- New struct `PlansClientRebootWorkerOptions` -- New struct `PlansClientRebootWorkerResponse` -- New struct `PlansClientRestartWebAppsOptions` -- New struct `PlansClientRestartWebAppsResponse` -- New struct `PlansClientUpdateOptions` -- New struct `PlansClientUpdateResponse` -- New struct `PlansClientUpdateResult` -- New struct `PlansClientUpdateVnetGatewayOptions` -- New struct `PlansClientUpdateVnetGatewayResponse` -- New struct `PlansClientUpdateVnetGatewayResult` -- New struct `PlansClientUpdateVnetRouteOptions` -- New struct `PlansClientUpdateVnetRouteResponse` -- New struct `PlansClientUpdateVnetRouteResult` -- New struct `ProviderClientGetAvailableStacksOnPremOptions` -- New struct `ProviderClientGetAvailableStacksOnPremPager` -- New struct `ProviderClientGetAvailableStacksOnPremResponse` -- New struct `ProviderClientGetAvailableStacksOnPremResult` -- New struct `ProviderClientGetAvailableStacksOptions` -- New struct `ProviderClientGetAvailableStacksPager` -- New struct `ProviderClientGetAvailableStacksResponse` -- New struct `ProviderClientGetAvailableStacksResult` -- New struct `ProviderClientGetFunctionAppStacksForLocationOptions` -- New struct `ProviderClientGetFunctionAppStacksForLocationPager` -- New struct `ProviderClientGetFunctionAppStacksForLocationResponse` -- New struct `ProviderClientGetFunctionAppStacksForLocationResult` -- New struct `ProviderClientGetFunctionAppStacksOptions` -- New struct `ProviderClientGetFunctionAppStacksPager` -- New struct `ProviderClientGetFunctionAppStacksResponse` -- New struct `ProviderClientGetFunctionAppStacksResult` -- New struct `ProviderClientGetWebAppStacksForLocationOptions` -- New struct `ProviderClientGetWebAppStacksForLocationPager` -- New struct `ProviderClientGetWebAppStacksForLocationResponse` -- New struct `ProviderClientGetWebAppStacksForLocationResult` -- New struct `ProviderClientGetWebAppStacksOptions` -- New struct `ProviderClientGetWebAppStacksPager` -- New struct `ProviderClientGetWebAppStacksResponse` -- New struct `ProviderClientGetWebAppStacksResult` -- New struct `ProviderClientListOperationsOptions` -- New struct `ProviderClientListOperationsPager` -- New struct `ProviderClientListOperationsResponse` -- New struct `ProviderClientListOperationsResult` -- New struct `QueueScaleRule` -- New struct `RecommendationsClientDisableAllForHostingEnvironmentOptions` -- New struct `RecommendationsClientDisableAllForHostingEnvironmentResponse` -- New struct `RecommendationsClientDisableAllForWebAppOptions` -- New struct `RecommendationsClientDisableAllForWebAppResponse` -- New struct `RecommendationsClientDisableRecommendationForHostingEnvironmentOptions` -- New struct `RecommendationsClientDisableRecommendationForHostingEnvironmentResponse` -- New struct `RecommendationsClientDisableRecommendationForSiteOptions` -- New struct `RecommendationsClientDisableRecommendationForSiteResponse` -- New struct `RecommendationsClientDisableRecommendationForSubscriptionOptions` -- New struct `RecommendationsClientDisableRecommendationForSubscriptionResponse` -- New struct `RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions` -- New struct `RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse` -- New struct `RecommendationsClientGetRuleDetailsByHostingEnvironmentResult` -- New struct `RecommendationsClientGetRuleDetailsByWebAppOptions` -- New struct `RecommendationsClientGetRuleDetailsByWebAppResponse` -- New struct `RecommendationsClientGetRuleDetailsByWebAppResult` -- New struct `RecommendationsClientListHistoryForHostingEnvironmentOptions` -- New struct `RecommendationsClientListHistoryForHostingEnvironmentPager` -- New struct `RecommendationsClientListHistoryForHostingEnvironmentResponse` -- New struct `RecommendationsClientListHistoryForHostingEnvironmentResult` -- New struct `RecommendationsClientListHistoryForWebAppOptions` -- New struct `RecommendationsClientListHistoryForWebAppPager` -- New struct `RecommendationsClientListHistoryForWebAppResponse` -- New struct `RecommendationsClientListHistoryForWebAppResult` -- New struct `RecommendationsClientListOptions` -- New struct `RecommendationsClientListPager` -- New struct `RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions` -- New struct `RecommendationsClientListRecommendedRulesForHostingEnvironmentPager` -- New struct `RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse` -- New struct `RecommendationsClientListRecommendedRulesForHostingEnvironmentResult` -- New struct `RecommendationsClientListRecommendedRulesForWebAppOptions` -- New struct `RecommendationsClientListRecommendedRulesForWebAppPager` -- New struct `RecommendationsClientListRecommendedRulesForWebAppResponse` -- New struct `RecommendationsClientListRecommendedRulesForWebAppResult` -- New struct `RecommendationsClientListResponse` -- New struct `RecommendationsClientListResult` -- New struct `RecommendationsClientResetAllFiltersForHostingEnvironmentOptions` -- New struct `RecommendationsClientResetAllFiltersForHostingEnvironmentResponse` -- New struct `RecommendationsClientResetAllFiltersForWebAppOptions` -- New struct `RecommendationsClientResetAllFiltersForWebAppResponse` -- New struct `RecommendationsClientResetAllFiltersOptions` -- New struct `RecommendationsClientResetAllFiltersResponse` -- New struct `RegistryCredentials` -- New struct `ResourceHealthMetadataClientGetBySiteOptions` -- New struct `ResourceHealthMetadataClientGetBySiteResponse` -- New struct `ResourceHealthMetadataClientGetBySiteResult` -- New struct `ResourceHealthMetadataClientGetBySiteSlotOptions` -- New struct `ResourceHealthMetadataClientGetBySiteSlotResponse` -- New struct `ResourceHealthMetadataClientGetBySiteSlotResult` -- New struct `ResourceHealthMetadataClientListByResourceGroupOptions` -- New struct `ResourceHealthMetadataClientListByResourceGroupPager` -- New struct `ResourceHealthMetadataClientListByResourceGroupResponse` -- New struct `ResourceHealthMetadataClientListByResourceGroupResult` -- New struct `ResourceHealthMetadataClientListBySiteOptions` -- New struct `ResourceHealthMetadataClientListBySitePager` -- New struct `ResourceHealthMetadataClientListBySiteResponse` -- New struct `ResourceHealthMetadataClientListBySiteResult` -- New struct `ResourceHealthMetadataClientListBySiteSlotOptions` -- New struct `ResourceHealthMetadataClientListBySiteSlotPager` -- New struct `ResourceHealthMetadataClientListBySiteSlotResponse` -- New struct `ResourceHealthMetadataClientListBySiteSlotResult` -- New struct `ResourceHealthMetadataClientListOptions` -- New struct `ResourceHealthMetadataClientListPager` -- New struct `ResourceHealthMetadataClientListResponse` -- New struct `ResourceHealthMetadataClientListResult` -- New struct `Revision` -- New struct `RevisionCollection` -- New struct `RevisionProperties` -- New struct `Scale` -- New struct `ScaleRule` -- New struct `ScaleRuleAuth` -- New struct `Secret` -- New struct `SecretsCollection` -- New struct `StaticSitesClientApproveOrRejectPrivateEndpointConnectionPoller` -- New struct `StaticSitesClientApproveOrRejectPrivateEndpointConnectionPollerResponse` -- New struct `StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse` -- New struct `StaticSitesClientApproveOrRejectPrivateEndpointConnectionResult` -- New struct `StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions` -- New struct `StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions` -- New struct `StaticSitesClientBeginCreateOrUpdateStaticSiteOptions` -- New struct `StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions` -- New struct `StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions` -- New struct `StaticSitesClientBeginDeletePrivateEndpointConnectionOptions` -- New struct `StaticSitesClientBeginDeleteStaticSiteBuildOptions` -- New struct `StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions` -- New struct `StaticSitesClientBeginDeleteStaticSiteOptions` -- New struct `StaticSitesClientBeginDetachStaticSiteOptions` -- New struct `StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions` -- New struct `StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions` -- New struct `StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResult` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResult` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResult` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPoller` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainPollerResponse` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResult` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResult` -- New struct `StaticSitesClientCreateOrUpdateStaticSitePoller` -- New struct `StaticSitesClientCreateOrUpdateStaticSitePollerResponse` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteResponse` -- New struct `StaticSitesClientCreateOrUpdateStaticSiteResult` -- New struct `StaticSitesClientCreateUserRolesInvitationLinkOptions` -- New struct `StaticSitesClientCreateUserRolesInvitationLinkResponse` -- New struct `StaticSitesClientCreateUserRolesInvitationLinkResult` -- New struct `StaticSitesClientCreateZipDeploymentForStaticSiteBuildPoller` -- New struct `StaticSitesClientCreateZipDeploymentForStaticSiteBuildPollerResponse` -- New struct `StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse` -- New struct `StaticSitesClientCreateZipDeploymentForStaticSitePoller` -- New struct `StaticSitesClientCreateZipDeploymentForStaticSitePollerResponse` -- New struct `StaticSitesClientCreateZipDeploymentForStaticSiteResponse` -- New struct `StaticSitesClientDeletePrivateEndpointConnectionPoller` -- New struct `StaticSitesClientDeletePrivateEndpointConnectionPollerResponse` -- New struct `StaticSitesClientDeletePrivateEndpointConnectionResponse` -- New struct `StaticSitesClientDeletePrivateEndpointConnectionResult` -- New struct `StaticSitesClientDeleteStaticSiteBuildPoller` -- New struct `StaticSitesClientDeleteStaticSiteBuildPollerResponse` -- New struct `StaticSitesClientDeleteStaticSiteBuildResponse` -- New struct `StaticSitesClientDeleteStaticSiteCustomDomainPoller` -- New struct `StaticSitesClientDeleteStaticSiteCustomDomainPollerResponse` -- New struct `StaticSitesClientDeleteStaticSiteCustomDomainResponse` -- New struct `StaticSitesClientDeleteStaticSitePoller` -- New struct `StaticSitesClientDeleteStaticSitePollerResponse` -- New struct `StaticSitesClientDeleteStaticSiteResponse` -- New struct `StaticSitesClientDeleteStaticSiteUserOptions` -- New struct `StaticSitesClientDeleteStaticSiteUserResponse` -- New struct `StaticSitesClientDetachStaticSitePoller` -- New struct `StaticSitesClientDetachStaticSitePollerResponse` -- New struct `StaticSitesClientDetachStaticSiteResponse` -- New struct `StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions` -- New struct `StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse` -- New struct `StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions` -- New struct `StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse` -- New struct `StaticSitesClientGetPrivateEndpointConnectionListOptions` -- New struct `StaticSitesClientGetPrivateEndpointConnectionListPager` -- New struct `StaticSitesClientGetPrivateEndpointConnectionListResponse` -- New struct `StaticSitesClientGetPrivateEndpointConnectionListResult` -- New struct `StaticSitesClientGetPrivateEndpointConnectionOptions` -- New struct `StaticSitesClientGetPrivateEndpointConnectionResponse` -- New struct `StaticSitesClientGetPrivateEndpointConnectionResult` -- New struct `StaticSitesClientGetPrivateLinkResourcesOptions` -- New struct `StaticSitesClientGetPrivateLinkResourcesResponse` -- New struct `StaticSitesClientGetPrivateLinkResourcesResult` -- New struct `StaticSitesClientGetStaticSiteBuildOptions` -- New struct `StaticSitesClientGetStaticSiteBuildResponse` -- New struct `StaticSitesClientGetStaticSiteBuildResult` -- New struct `StaticSitesClientGetStaticSiteBuildsOptions` -- New struct `StaticSitesClientGetStaticSiteBuildsPager` -- New struct `StaticSitesClientGetStaticSiteBuildsResponse` -- New struct `StaticSitesClientGetStaticSiteBuildsResult` -- New struct `StaticSitesClientGetStaticSiteCustomDomainOptions` -- New struct `StaticSitesClientGetStaticSiteCustomDomainResponse` -- New struct `StaticSitesClientGetStaticSiteCustomDomainResult` -- New struct `StaticSitesClientGetStaticSiteOptions` -- New struct `StaticSitesClientGetStaticSiteResponse` -- New struct `StaticSitesClientGetStaticSiteResult` -- New struct `StaticSitesClientGetStaticSitesByResourceGroupOptions` -- New struct `StaticSitesClientGetStaticSitesByResourceGroupPager` -- New struct `StaticSitesClientGetStaticSitesByResourceGroupResponse` -- New struct `StaticSitesClientGetStaticSitesByResourceGroupResult` -- New struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions` -- New struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse` -- New struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResult` -- New struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions` -- New struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse` -- New struct `StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResult` -- New struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions` -- New struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildPager` -- New struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse` -- New struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResult` -- New struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions` -- New struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSitePager` -- New struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse` -- New struct `StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResult` -- New struct `StaticSitesClientListOptions` -- New struct `StaticSitesClientListPager` -- New struct `StaticSitesClientListResponse` -- New struct `StaticSitesClientListResult` -- New struct `StaticSitesClientListStaticSiteAppSettingsOptions` -- New struct `StaticSitesClientListStaticSiteAppSettingsResponse` -- New struct `StaticSitesClientListStaticSiteAppSettingsResult` -- New struct `StaticSitesClientListStaticSiteBuildAppSettingsOptions` -- New struct `StaticSitesClientListStaticSiteBuildAppSettingsResponse` -- New struct `StaticSitesClientListStaticSiteBuildAppSettingsResult` -- New struct `StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions` -- New struct `StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse` -- New struct `StaticSitesClientListStaticSiteBuildFunctionAppSettingsResult` -- New struct `StaticSitesClientListStaticSiteBuildFunctionsOptions` -- New struct `StaticSitesClientListStaticSiteBuildFunctionsPager` -- New struct `StaticSitesClientListStaticSiteBuildFunctionsResponse` -- New struct `StaticSitesClientListStaticSiteBuildFunctionsResult` -- New struct `StaticSitesClientListStaticSiteConfiguredRolesOptions` -- New struct `StaticSitesClientListStaticSiteConfiguredRolesResponse` -- New struct `StaticSitesClientListStaticSiteConfiguredRolesResult` -- New struct `StaticSitesClientListStaticSiteCustomDomainsOptions` -- New struct `StaticSitesClientListStaticSiteCustomDomainsPager` -- New struct `StaticSitesClientListStaticSiteCustomDomainsResponse` -- New struct `StaticSitesClientListStaticSiteCustomDomainsResult` -- New struct `StaticSitesClientListStaticSiteFunctionAppSettingsOptions` -- New struct `StaticSitesClientListStaticSiteFunctionAppSettingsResponse` -- New struct `StaticSitesClientListStaticSiteFunctionAppSettingsResult` -- New struct `StaticSitesClientListStaticSiteFunctionsOptions` -- New struct `StaticSitesClientListStaticSiteFunctionsPager` -- New struct `StaticSitesClientListStaticSiteFunctionsResponse` -- New struct `StaticSitesClientListStaticSiteFunctionsResult` -- New struct `StaticSitesClientListStaticSiteSecretsOptions` -- New struct `StaticSitesClientListStaticSiteSecretsResponse` -- New struct `StaticSitesClientListStaticSiteSecretsResult` -- New struct `StaticSitesClientListStaticSiteUsersOptions` -- New struct `StaticSitesClientListStaticSiteUsersPager` -- New struct `StaticSitesClientListStaticSiteUsersResponse` -- New struct `StaticSitesClientListStaticSiteUsersResult` -- New struct `StaticSitesClientPreviewWorkflowOptions` -- New struct `StaticSitesClientPreviewWorkflowResponse` -- New struct `StaticSitesClientPreviewWorkflowResult` -- New struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPoller` -- New struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildPollerResponse` -- New struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse` -- New struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResult` -- New struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePoller` -- New struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSitePollerResponse` -- New struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse` -- New struct `StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResult` -- New struct `StaticSitesClientResetStaticSiteAPIKeyOptions` -- New struct `StaticSitesClientResetStaticSiteAPIKeyResponse` -- New struct `StaticSitesClientUpdateStaticSiteOptions` -- New struct `StaticSitesClientUpdateStaticSiteResponse` -- New struct `StaticSitesClientUpdateStaticSiteResult` -- New struct `StaticSitesClientUpdateStaticSiteUserOptions` -- New struct `StaticSitesClientUpdateStaticSiteUserResponse` -- New struct `StaticSitesClientUpdateStaticSiteUserResult` -- New struct `StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePoller` -- New struct `StaticSitesClientValidateCustomDomainCanBeAddedToStaticSitePollerResponse` -- New struct `StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse` -- New struct `Template` -- New struct `TopLevelDomainsClientGetOptions` -- New struct `TopLevelDomainsClientGetResponse` -- New struct `TopLevelDomainsClientGetResult` -- New struct `TopLevelDomainsClientListAgreementsOptions` -- New struct `TopLevelDomainsClientListAgreementsPager` -- New struct `TopLevelDomainsClientListAgreementsResponse` -- New struct `TopLevelDomainsClientListAgreementsResult` -- New struct `TopLevelDomainsClientListOptions` -- New struct `TopLevelDomainsClientListPager` -- New struct `TopLevelDomainsClientListResponse` -- New struct `TopLevelDomainsClientListResult` -- New struct `TrafficWeight` -- New struct `WebAppsClientAddPremierAddOnOptions` -- New struct `WebAppsClientAddPremierAddOnResponse` -- New struct `WebAppsClientAddPremierAddOnResult` -- New struct `WebAppsClientAddPremierAddOnSlotOptions` -- New struct `WebAppsClientAddPremierAddOnSlotResponse` -- New struct `WebAppsClientAddPremierAddOnSlotResult` -- New struct `WebAppsClientAnalyzeCustomHostnameOptions` -- New struct `WebAppsClientAnalyzeCustomHostnameResponse` -- New struct `WebAppsClientAnalyzeCustomHostnameResult` -- New struct `WebAppsClientAnalyzeCustomHostnameSlotOptions` -- New struct `WebAppsClientAnalyzeCustomHostnameSlotResponse` -- New struct `WebAppsClientAnalyzeCustomHostnameSlotResult` -- New struct `WebAppsClientApplySlotConfigToProductionOptions` -- New struct `WebAppsClientApplySlotConfigToProductionResponse` -- New struct `WebAppsClientApplySlotConfigurationSlotOptions` -- New struct `WebAppsClientApplySlotConfigurationSlotResponse` -- New struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionPoller` -- New struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionPollerResponse` -- New struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse` -- New struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionResult` -- New struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPoller` -- New struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotPollerResponse` -- New struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse` -- New struct `WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResult` -- New struct `WebAppsClientBackupOptions` -- New struct `WebAppsClientBackupResponse` -- New struct `WebAppsClientBackupResult` -- New struct `WebAppsClientBackupSlotOptions` -- New struct `WebAppsClientBackupSlotResponse` -- New struct `WebAppsClientBackupSlotResult` -- New struct `WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions` -- New struct `WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions` -- New struct `WebAppsClientBeginCreateFunctionOptions` -- New struct `WebAppsClientBeginCreateInstanceFunctionSlotOptions` -- New struct `WebAppsClientBeginCreateInstanceMSDeployOperationOptions` -- New struct `WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions` -- New struct `WebAppsClientBeginCreateMSDeployOperationOptions` -- New struct `WebAppsClientBeginCreateMSDeployOperationSlotOptions` -- New struct `WebAppsClientBeginCreateOrUpdateOptions` -- New struct `WebAppsClientBeginCreateOrUpdateSlotOptions` -- New struct `WebAppsClientBeginCreateOrUpdateSourceControlOptions` -- New struct `WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions` -- New struct `WebAppsClientBeginDeletePrivateEndpointConnectionOptions` -- New struct `WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions` -- New struct `WebAppsClientBeginInstallSiteExtensionOptions` -- New struct `WebAppsClientBeginInstallSiteExtensionSlotOptions` -- New struct `WebAppsClientBeginListPublishingCredentialsOptions` -- New struct `WebAppsClientBeginListPublishingCredentialsSlotOptions` -- New struct `WebAppsClientBeginMigrateMySQLOptions` -- New struct `WebAppsClientBeginMigrateStorageOptions` -- New struct `WebAppsClientBeginRestoreFromBackupBlobOptions` -- New struct `WebAppsClientBeginRestoreFromBackupBlobSlotOptions` -- New struct `WebAppsClientBeginRestoreFromDeletedAppOptions` -- New struct `WebAppsClientBeginRestoreFromDeletedAppSlotOptions` -- New struct `WebAppsClientBeginRestoreOptions` -- New struct `WebAppsClientBeginRestoreSlotOptions` -- New struct `WebAppsClientBeginRestoreSnapshotOptions` -- New struct `WebAppsClientBeginRestoreSnapshotSlotOptions` -- New struct `WebAppsClientBeginStartNetworkTraceOptions` -- New struct `WebAppsClientBeginStartNetworkTraceSlotOptions` -- New struct `WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions` -- New struct `WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions` -- New struct `WebAppsClientBeginSwapSlotOptions` -- New struct `WebAppsClientBeginSwapSlotWithProductionOptions` -- New struct `WebAppsClientCreateDeploymentOptions` -- New struct `WebAppsClientCreateDeploymentResponse` -- New struct `WebAppsClientCreateDeploymentResult` -- New struct `WebAppsClientCreateDeploymentSlotOptions` -- New struct `WebAppsClientCreateDeploymentSlotResponse` -- New struct `WebAppsClientCreateDeploymentSlotResult` -- New struct `WebAppsClientCreateFunctionPoller` -- New struct `WebAppsClientCreateFunctionPollerResponse` -- New struct `WebAppsClientCreateFunctionResponse` -- New struct `WebAppsClientCreateFunctionResult` -- New struct `WebAppsClientCreateInstanceFunctionSlotPoller` -- New struct `WebAppsClientCreateInstanceFunctionSlotPollerResponse` -- New struct `WebAppsClientCreateInstanceFunctionSlotResponse` -- New struct `WebAppsClientCreateInstanceFunctionSlotResult` -- New struct `WebAppsClientCreateInstanceMSDeployOperationPoller` -- New struct `WebAppsClientCreateInstanceMSDeployOperationPollerResponse` -- New struct `WebAppsClientCreateInstanceMSDeployOperationResponse` -- New struct `WebAppsClientCreateInstanceMSDeployOperationResult` -- New struct `WebAppsClientCreateInstanceMSDeployOperationSlotPoller` -- New struct `WebAppsClientCreateInstanceMSDeployOperationSlotPollerResponse` -- New struct `WebAppsClientCreateInstanceMSDeployOperationSlotResponse` -- New struct `WebAppsClientCreateInstanceMSDeployOperationSlotResult` -- New struct `WebAppsClientCreateMSDeployOperationPoller` -- New struct `WebAppsClientCreateMSDeployOperationPollerResponse` -- New struct `WebAppsClientCreateMSDeployOperationResponse` -- New struct `WebAppsClientCreateMSDeployOperationResult` -- New struct `WebAppsClientCreateMSDeployOperationSlotPoller` -- New struct `WebAppsClientCreateMSDeployOperationSlotPollerResponse` -- New struct `WebAppsClientCreateMSDeployOperationSlotResponse` -- New struct `WebAppsClientCreateMSDeployOperationSlotResult` -- New struct `WebAppsClientCreateOneDeployOperationOptions` -- New struct `WebAppsClientCreateOneDeployOperationResponse` -- New struct `WebAppsClientCreateOneDeployOperationResult` -- New struct `WebAppsClientCreateOrUpdateConfigurationOptions` -- New struct `WebAppsClientCreateOrUpdateConfigurationResponse` -- New struct `WebAppsClientCreateOrUpdateConfigurationResult` -- New struct `WebAppsClientCreateOrUpdateConfigurationSlotOptions` -- New struct `WebAppsClientCreateOrUpdateConfigurationSlotResponse` -- New struct `WebAppsClientCreateOrUpdateConfigurationSlotResult` -- New struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions` -- New struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse` -- New struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResult` -- New struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions` -- New struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse` -- New struct `WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResult` -- New struct `WebAppsClientCreateOrUpdateFunctionSecretOptions` -- New struct `WebAppsClientCreateOrUpdateFunctionSecretResponse` -- New struct `WebAppsClientCreateOrUpdateFunctionSecretResult` -- New struct `WebAppsClientCreateOrUpdateFunctionSecretSlotOptions` -- New struct `WebAppsClientCreateOrUpdateFunctionSecretSlotResponse` -- New struct `WebAppsClientCreateOrUpdateFunctionSecretSlotResult` -- New struct `WebAppsClientCreateOrUpdateHostNameBindingOptions` -- New struct `WebAppsClientCreateOrUpdateHostNameBindingResponse` -- New struct `WebAppsClientCreateOrUpdateHostNameBindingResult` -- New struct `WebAppsClientCreateOrUpdateHostNameBindingSlotOptions` -- New struct `WebAppsClientCreateOrUpdateHostNameBindingSlotResponse` -- New struct `WebAppsClientCreateOrUpdateHostNameBindingSlotResult` -- New struct `WebAppsClientCreateOrUpdateHostSecretOptions` -- New struct `WebAppsClientCreateOrUpdateHostSecretResponse` -- New struct `WebAppsClientCreateOrUpdateHostSecretResult` -- New struct `WebAppsClientCreateOrUpdateHostSecretSlotOptions` -- New struct `WebAppsClientCreateOrUpdateHostSecretSlotResponse` -- New struct `WebAppsClientCreateOrUpdateHostSecretSlotResult` -- New struct `WebAppsClientCreateOrUpdateHybridConnectionOptions` -- New struct `WebAppsClientCreateOrUpdateHybridConnectionResponse` -- New struct `WebAppsClientCreateOrUpdateHybridConnectionResult` -- New struct `WebAppsClientCreateOrUpdateHybridConnectionSlotOptions` -- New struct `WebAppsClientCreateOrUpdateHybridConnectionSlotResponse` -- New struct `WebAppsClientCreateOrUpdateHybridConnectionSlotResult` -- New struct `WebAppsClientCreateOrUpdatePoller` -- New struct `WebAppsClientCreateOrUpdatePollerResponse` -- New struct `WebAppsClientCreateOrUpdatePublicCertificateOptions` -- New struct `WebAppsClientCreateOrUpdatePublicCertificateResponse` -- New struct `WebAppsClientCreateOrUpdatePublicCertificateResult` -- New struct `WebAppsClientCreateOrUpdatePublicCertificateSlotOptions` -- New struct `WebAppsClientCreateOrUpdatePublicCertificateSlotResponse` -- New struct `WebAppsClientCreateOrUpdatePublicCertificateSlotResult` -- New struct `WebAppsClientCreateOrUpdateRelayServiceConnectionOptions` -- New struct `WebAppsClientCreateOrUpdateRelayServiceConnectionResponse` -- New struct `WebAppsClientCreateOrUpdateRelayServiceConnectionResult` -- New struct `WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions` -- New struct `WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse` -- New struct `WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResult` -- New struct `WebAppsClientCreateOrUpdateResponse` -- New struct `WebAppsClientCreateOrUpdateResult` -- New struct `WebAppsClientCreateOrUpdateSlotPoller` -- New struct `WebAppsClientCreateOrUpdateSlotPollerResponse` -- New struct `WebAppsClientCreateOrUpdateSlotResponse` -- New struct `WebAppsClientCreateOrUpdateSlotResult` -- New struct `WebAppsClientCreateOrUpdateSourceControlPoller` -- New struct `WebAppsClientCreateOrUpdateSourceControlPollerResponse` -- New struct `WebAppsClientCreateOrUpdateSourceControlResponse` -- New struct `WebAppsClientCreateOrUpdateSourceControlResult` -- New struct `WebAppsClientCreateOrUpdateSourceControlSlotPoller` -- New struct `WebAppsClientCreateOrUpdateSourceControlSlotPollerResponse` -- New struct `WebAppsClientCreateOrUpdateSourceControlSlotResponse` -- New struct `WebAppsClientCreateOrUpdateSourceControlSlotResult` -- New struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions` -- New struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse` -- New struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResult` -- New struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions` -- New struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse` -- New struct `WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResult` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionGatewayResult` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResult` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionOptions` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionResponse` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionResult` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionSlotOptions` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionSlotResponse` -- New struct `WebAppsClientCreateOrUpdateVnetConnectionSlotResult` -- New struct `WebAppsClientDeleteBackupConfigurationOptions` -- New struct `WebAppsClientDeleteBackupConfigurationResponse` -- New struct `WebAppsClientDeleteBackupConfigurationSlotOptions` -- New struct `WebAppsClientDeleteBackupConfigurationSlotResponse` -- New struct `WebAppsClientDeleteBackupOptions` -- New struct `WebAppsClientDeleteBackupResponse` -- New struct `WebAppsClientDeleteBackupSlotOptions` -- New struct `WebAppsClientDeleteBackupSlotResponse` -- New struct `WebAppsClientDeleteContinuousWebJobOptions` -- New struct `WebAppsClientDeleteContinuousWebJobResponse` -- New struct `WebAppsClientDeleteContinuousWebJobSlotOptions` -- New struct `WebAppsClientDeleteContinuousWebJobSlotResponse` -- New struct `WebAppsClientDeleteDeploymentOptions` -- New struct `WebAppsClientDeleteDeploymentResponse` -- New struct `WebAppsClientDeleteDeploymentSlotOptions` -- New struct `WebAppsClientDeleteDeploymentSlotResponse` -- New struct `WebAppsClientDeleteDomainOwnershipIdentifierOptions` -- New struct `WebAppsClientDeleteDomainOwnershipIdentifierResponse` -- New struct `WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions` -- New struct `WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse` -- New struct `WebAppsClientDeleteFunctionOptions` -- New struct `WebAppsClientDeleteFunctionResponse` -- New struct `WebAppsClientDeleteFunctionSecretOptions` -- New struct `WebAppsClientDeleteFunctionSecretResponse` -- New struct `WebAppsClientDeleteFunctionSecretSlotOptions` -- New struct `WebAppsClientDeleteFunctionSecretSlotResponse` -- New struct `WebAppsClientDeleteHostNameBindingOptions` -- New struct `WebAppsClientDeleteHostNameBindingResponse` -- New struct `WebAppsClientDeleteHostNameBindingSlotOptions` -- New struct `WebAppsClientDeleteHostNameBindingSlotResponse` -- New struct `WebAppsClientDeleteHostSecretOptions` -- New struct `WebAppsClientDeleteHostSecretResponse` -- New struct `WebAppsClientDeleteHostSecretSlotOptions` -- New struct `WebAppsClientDeleteHostSecretSlotResponse` -- New struct `WebAppsClientDeleteHybridConnectionOptions` -- New struct `WebAppsClientDeleteHybridConnectionResponse` -- New struct `WebAppsClientDeleteHybridConnectionSlotOptions` -- New struct `WebAppsClientDeleteHybridConnectionSlotResponse` -- New struct `WebAppsClientDeleteInstanceFunctionSlotOptions` -- New struct `WebAppsClientDeleteInstanceFunctionSlotResponse` -- New struct `WebAppsClientDeleteInstanceProcessOptions` -- New struct `WebAppsClientDeleteInstanceProcessResponse` -- New struct `WebAppsClientDeleteInstanceProcessSlotOptions` -- New struct `WebAppsClientDeleteInstanceProcessSlotResponse` -- New struct `WebAppsClientDeleteOptions` -- New struct `WebAppsClientDeletePremierAddOnOptions` -- New struct `WebAppsClientDeletePremierAddOnResponse` -- New struct `WebAppsClientDeletePremierAddOnSlotOptions` -- New struct `WebAppsClientDeletePremierAddOnSlotResponse` -- New struct `WebAppsClientDeletePrivateEndpointConnectionPoller` -- New struct `WebAppsClientDeletePrivateEndpointConnectionPollerResponse` -- New struct `WebAppsClientDeletePrivateEndpointConnectionResponse` -- New struct `WebAppsClientDeletePrivateEndpointConnectionResult` -- New struct `WebAppsClientDeletePrivateEndpointConnectionSlotPoller` -- New struct `WebAppsClientDeletePrivateEndpointConnectionSlotPollerResponse` -- New struct `WebAppsClientDeletePrivateEndpointConnectionSlotResponse` -- New struct `WebAppsClientDeletePrivateEndpointConnectionSlotResult` -- New struct `WebAppsClientDeleteProcessOptions` -- New struct `WebAppsClientDeleteProcessResponse` -- New struct `WebAppsClientDeleteProcessSlotOptions` -- New struct `WebAppsClientDeleteProcessSlotResponse` -- New struct `WebAppsClientDeletePublicCertificateOptions` -- New struct `WebAppsClientDeletePublicCertificateResponse` -- New struct `WebAppsClientDeletePublicCertificateSlotOptions` -- New struct `WebAppsClientDeletePublicCertificateSlotResponse` -- New struct `WebAppsClientDeleteRelayServiceConnectionOptions` -- New struct `WebAppsClientDeleteRelayServiceConnectionResponse` -- New struct `WebAppsClientDeleteRelayServiceConnectionSlotOptions` -- New struct `WebAppsClientDeleteRelayServiceConnectionSlotResponse` -- New struct `WebAppsClientDeleteResponse` -- New struct `WebAppsClientDeleteSiteExtensionOptions` -- New struct `WebAppsClientDeleteSiteExtensionResponse` -- New struct `WebAppsClientDeleteSiteExtensionSlotOptions` -- New struct `WebAppsClientDeleteSiteExtensionSlotResponse` -- New struct `WebAppsClientDeleteSlotOptions` -- New struct `WebAppsClientDeleteSlotResponse` -- New struct `WebAppsClientDeleteSourceControlOptions` -- New struct `WebAppsClientDeleteSourceControlResponse` -- New struct `WebAppsClientDeleteSourceControlSlotOptions` -- New struct `WebAppsClientDeleteSourceControlSlotResponse` -- New struct `WebAppsClientDeleteSwiftVirtualNetworkOptions` -- New struct `WebAppsClientDeleteSwiftVirtualNetworkResponse` -- New struct `WebAppsClientDeleteSwiftVirtualNetworkSlotOptions` -- New struct `WebAppsClientDeleteSwiftVirtualNetworkSlotResponse` -- New struct `WebAppsClientDeleteTriggeredWebJobOptions` -- New struct `WebAppsClientDeleteTriggeredWebJobResponse` -- New struct `WebAppsClientDeleteTriggeredWebJobSlotOptions` -- New struct `WebAppsClientDeleteTriggeredWebJobSlotResponse` -- New struct `WebAppsClientDeleteVnetConnectionOptions` -- New struct `WebAppsClientDeleteVnetConnectionResponse` -- New struct `WebAppsClientDeleteVnetConnectionSlotOptions` -- New struct `WebAppsClientDeleteVnetConnectionSlotResponse` -- New struct `WebAppsClientDiscoverBackupOptions` -- New struct `WebAppsClientDiscoverBackupResponse` -- New struct `WebAppsClientDiscoverBackupResult` -- New struct `WebAppsClientDiscoverBackupSlotOptions` -- New struct `WebAppsClientDiscoverBackupSlotResponse` -- New struct `WebAppsClientDiscoverBackupSlotResult` -- New struct `WebAppsClientGenerateNewSitePublishingPasswordOptions` -- New struct `WebAppsClientGenerateNewSitePublishingPasswordResponse` -- New struct `WebAppsClientGenerateNewSitePublishingPasswordSlotOptions` -- New struct `WebAppsClientGenerateNewSitePublishingPasswordSlotResponse` -- New struct `WebAppsClientGetAppSettingKeyVaultReferenceOptions` -- New struct `WebAppsClientGetAppSettingKeyVaultReferenceResponse` -- New struct `WebAppsClientGetAppSettingKeyVaultReferenceResult` -- New struct `WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions` -- New struct `WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse` -- New struct `WebAppsClientGetAppSettingKeyVaultReferenceSlotResult` -- New struct `WebAppsClientGetAppSettingsKeyVaultReferencesOptions` -- New struct `WebAppsClientGetAppSettingsKeyVaultReferencesPager` -- New struct `WebAppsClientGetAppSettingsKeyVaultReferencesResponse` -- New struct `WebAppsClientGetAppSettingsKeyVaultReferencesResult` -- New struct `WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions` -- New struct `WebAppsClientGetAppSettingsKeyVaultReferencesSlotPager` -- New struct `WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse` -- New struct `WebAppsClientGetAppSettingsKeyVaultReferencesSlotResult` -- New struct `WebAppsClientGetAuthSettingsOptions` -- New struct `WebAppsClientGetAuthSettingsResponse` -- New struct `WebAppsClientGetAuthSettingsResult` -- New struct `WebAppsClientGetAuthSettingsSlotOptions` -- New struct `WebAppsClientGetAuthSettingsSlotResponse` -- New struct `WebAppsClientGetAuthSettingsSlotResult` -- New struct `WebAppsClientGetAuthSettingsV2Options` -- New struct `WebAppsClientGetAuthSettingsV2Response` -- New struct `WebAppsClientGetAuthSettingsV2Result` -- New struct `WebAppsClientGetAuthSettingsV2SlotOptions` -- New struct `WebAppsClientGetAuthSettingsV2SlotResponse` -- New struct `WebAppsClientGetAuthSettingsV2SlotResult` -- New struct `WebAppsClientGetAuthSettingsV2WithoutSecretsOptions` -- New struct `WebAppsClientGetAuthSettingsV2WithoutSecretsResponse` -- New struct `WebAppsClientGetAuthSettingsV2WithoutSecretsResult` -- New struct `WebAppsClientGetBackupConfigurationOptions` -- New struct `WebAppsClientGetBackupConfigurationResponse` -- New struct `WebAppsClientGetBackupConfigurationResult` -- New struct `WebAppsClientGetBackupConfigurationSlotOptions` -- New struct `WebAppsClientGetBackupConfigurationSlotResponse` -- New struct `WebAppsClientGetBackupConfigurationSlotResult` -- New struct `WebAppsClientGetBackupStatusOptions` -- New struct `WebAppsClientGetBackupStatusResponse` -- New struct `WebAppsClientGetBackupStatusResult` -- New struct `WebAppsClientGetBackupStatusSlotOptions` -- New struct `WebAppsClientGetBackupStatusSlotResponse` -- New struct `WebAppsClientGetBackupStatusSlotResult` -- New struct `WebAppsClientGetConfigurationOptions` -- New struct `WebAppsClientGetConfigurationResponse` -- New struct `WebAppsClientGetConfigurationResult` -- New struct `WebAppsClientGetConfigurationSlotOptions` -- New struct `WebAppsClientGetConfigurationSlotResponse` -- New struct `WebAppsClientGetConfigurationSlotResult` -- New struct `WebAppsClientGetConfigurationSnapshotOptions` -- New struct `WebAppsClientGetConfigurationSnapshotResponse` -- New struct `WebAppsClientGetConfigurationSnapshotResult` -- New struct `WebAppsClientGetConfigurationSnapshotSlotOptions` -- New struct `WebAppsClientGetConfigurationSnapshotSlotResponse` -- New struct `WebAppsClientGetConfigurationSnapshotSlotResult` -- New struct `WebAppsClientGetContainerLogsZipOptions` -- New struct `WebAppsClientGetContainerLogsZipResponse` -- New struct `WebAppsClientGetContainerLogsZipSlotOptions` -- New struct `WebAppsClientGetContainerLogsZipSlotResponse` -- New struct `WebAppsClientGetContinuousWebJobOptions` -- New struct `WebAppsClientGetContinuousWebJobResponse` -- New struct `WebAppsClientGetContinuousWebJobResult` -- New struct `WebAppsClientGetContinuousWebJobSlotOptions` -- New struct `WebAppsClientGetContinuousWebJobSlotResponse` -- New struct `WebAppsClientGetContinuousWebJobSlotResult` -- New struct `WebAppsClientGetDeploymentOptions` -- New struct `WebAppsClientGetDeploymentResponse` -- New struct `WebAppsClientGetDeploymentResult` -- New struct `WebAppsClientGetDeploymentSlotOptions` -- New struct `WebAppsClientGetDeploymentSlotResponse` -- New struct `WebAppsClientGetDeploymentSlotResult` -- New struct `WebAppsClientGetDiagnosticLogsConfigurationOptions` -- New struct `WebAppsClientGetDiagnosticLogsConfigurationResponse` -- New struct `WebAppsClientGetDiagnosticLogsConfigurationResult` -- New struct `WebAppsClientGetDiagnosticLogsConfigurationSlotOptions` -- New struct `WebAppsClientGetDiagnosticLogsConfigurationSlotResponse` -- New struct `WebAppsClientGetDiagnosticLogsConfigurationSlotResult` -- New struct `WebAppsClientGetDomainOwnershipIdentifierOptions` -- New struct `WebAppsClientGetDomainOwnershipIdentifierResponse` -- New struct `WebAppsClientGetDomainOwnershipIdentifierResult` -- New struct `WebAppsClientGetDomainOwnershipIdentifierSlotOptions` -- New struct `WebAppsClientGetDomainOwnershipIdentifierSlotResponse` -- New struct `WebAppsClientGetDomainOwnershipIdentifierSlotResult` -- New struct `WebAppsClientGetFtpAllowedOptions` -- New struct `WebAppsClientGetFtpAllowedResponse` -- New struct `WebAppsClientGetFtpAllowedResult` -- New struct `WebAppsClientGetFtpAllowedSlotOptions` -- New struct `WebAppsClientGetFtpAllowedSlotResponse` -- New struct `WebAppsClientGetFtpAllowedSlotResult` -- New struct `WebAppsClientGetFunctionOptions` -- New struct `WebAppsClientGetFunctionResponse` -- New struct `WebAppsClientGetFunctionResult` -- New struct `WebAppsClientGetFunctionsAdminTokenOptions` -- New struct `WebAppsClientGetFunctionsAdminTokenResponse` -- New struct `WebAppsClientGetFunctionsAdminTokenResult` -- New struct `WebAppsClientGetFunctionsAdminTokenSlotOptions` -- New struct `WebAppsClientGetFunctionsAdminTokenSlotResponse` -- New struct `WebAppsClientGetFunctionsAdminTokenSlotResult` -- New struct `WebAppsClientGetHostNameBindingOptions` -- New struct `WebAppsClientGetHostNameBindingResponse` -- New struct `WebAppsClientGetHostNameBindingResult` -- New struct `WebAppsClientGetHostNameBindingSlotOptions` -- New struct `WebAppsClientGetHostNameBindingSlotResponse` -- New struct `WebAppsClientGetHostNameBindingSlotResult` -- New struct `WebAppsClientGetHybridConnectionOptions` -- New struct `WebAppsClientGetHybridConnectionResponse` -- New struct `WebAppsClientGetHybridConnectionResult` -- New struct `WebAppsClientGetHybridConnectionSlotOptions` -- New struct `WebAppsClientGetHybridConnectionSlotResponse` -- New struct `WebAppsClientGetHybridConnectionSlotResult` -- New struct `WebAppsClientGetInstanceFunctionSlotOptions` -- New struct `WebAppsClientGetInstanceFunctionSlotResponse` -- New struct `WebAppsClientGetInstanceFunctionSlotResult` -- New struct `WebAppsClientGetInstanceInfoOptions` -- New struct `WebAppsClientGetInstanceInfoResponse` -- New struct `WebAppsClientGetInstanceInfoResult` -- New struct `WebAppsClientGetInstanceInfoSlotOptions` -- New struct `WebAppsClientGetInstanceInfoSlotResponse` -- New struct `WebAppsClientGetInstanceInfoSlotResult` -- New struct `WebAppsClientGetInstanceMSDeployLogOptions` -- New struct `WebAppsClientGetInstanceMSDeployLogResponse` -- New struct `WebAppsClientGetInstanceMSDeployLogResult` -- New struct `WebAppsClientGetInstanceMSDeployLogSlotOptions` -- New struct `WebAppsClientGetInstanceMSDeployLogSlotResponse` -- New struct `WebAppsClientGetInstanceMSDeployLogSlotResult` -- New struct `WebAppsClientGetInstanceMsDeployStatusOptions` -- New struct `WebAppsClientGetInstanceMsDeployStatusResponse` -- New struct `WebAppsClientGetInstanceMsDeployStatusResult` -- New struct `WebAppsClientGetInstanceMsDeployStatusSlotOptions` -- New struct `WebAppsClientGetInstanceMsDeployStatusSlotResponse` -- New struct `WebAppsClientGetInstanceMsDeployStatusSlotResult` -- New struct `WebAppsClientGetInstanceProcessDumpOptions` -- New struct `WebAppsClientGetInstanceProcessDumpResponse` -- New struct `WebAppsClientGetInstanceProcessDumpSlotOptions` -- New struct `WebAppsClientGetInstanceProcessDumpSlotResponse` -- New struct `WebAppsClientGetInstanceProcessModuleOptions` -- New struct `WebAppsClientGetInstanceProcessModuleResponse` -- New struct `WebAppsClientGetInstanceProcessModuleResult` -- New struct `WebAppsClientGetInstanceProcessModuleSlotOptions` -- New struct `WebAppsClientGetInstanceProcessModuleSlotResponse` -- New struct `WebAppsClientGetInstanceProcessModuleSlotResult` -- New struct `WebAppsClientGetInstanceProcessOptions` -- New struct `WebAppsClientGetInstanceProcessResponse` -- New struct `WebAppsClientGetInstanceProcessResult` -- New struct `WebAppsClientGetInstanceProcessSlotOptions` -- New struct `WebAppsClientGetInstanceProcessSlotResponse` -- New struct `WebAppsClientGetInstanceProcessSlotResult` -- New struct `WebAppsClientGetMSDeployLogOptions` -- New struct `WebAppsClientGetMSDeployLogResponse` -- New struct `WebAppsClientGetMSDeployLogResult` -- New struct `WebAppsClientGetMSDeployLogSlotOptions` -- New struct `WebAppsClientGetMSDeployLogSlotResponse` -- New struct `WebAppsClientGetMSDeployLogSlotResult` -- New struct `WebAppsClientGetMSDeployStatusOptions` -- New struct `WebAppsClientGetMSDeployStatusResponse` -- New struct `WebAppsClientGetMSDeployStatusResult` -- New struct `WebAppsClientGetMSDeployStatusSlotOptions` -- New struct `WebAppsClientGetMSDeployStatusSlotResponse` -- New struct `WebAppsClientGetMSDeployStatusSlotResult` -- New struct `WebAppsClientGetMigrateMySQLStatusOptions` -- New struct `WebAppsClientGetMigrateMySQLStatusResponse` -- New struct `WebAppsClientGetMigrateMySQLStatusResult` -- New struct `WebAppsClientGetMigrateMySQLStatusSlotOptions` -- New struct `WebAppsClientGetMigrateMySQLStatusSlotResponse` -- New struct `WebAppsClientGetMigrateMySQLStatusSlotResult` -- New struct `WebAppsClientGetNetworkTraceOperationOptions` -- New struct `WebAppsClientGetNetworkTraceOperationResponse` -- New struct `WebAppsClientGetNetworkTraceOperationResult` -- New struct `WebAppsClientGetNetworkTraceOperationSlotOptions` -- New struct `WebAppsClientGetNetworkTraceOperationSlotResponse` -- New struct `WebAppsClientGetNetworkTraceOperationSlotResult` -- New struct `WebAppsClientGetNetworkTraceOperationSlotV2Options` -- New struct `WebAppsClientGetNetworkTraceOperationSlotV2Response` -- New struct `WebAppsClientGetNetworkTraceOperationSlotV2Result` -- New struct `WebAppsClientGetNetworkTraceOperationV2Options` -- New struct `WebAppsClientGetNetworkTraceOperationV2Response` -- New struct `WebAppsClientGetNetworkTraceOperationV2Result` -- New struct `WebAppsClientGetNetworkTracesOptions` -- New struct `WebAppsClientGetNetworkTracesResponse` -- New struct `WebAppsClientGetNetworkTracesResult` -- New struct `WebAppsClientGetNetworkTracesSlotOptions` -- New struct `WebAppsClientGetNetworkTracesSlotResponse` -- New struct `WebAppsClientGetNetworkTracesSlotResult` -- New struct `WebAppsClientGetNetworkTracesSlotV2Options` -- New struct `WebAppsClientGetNetworkTracesSlotV2Response` -- New struct `WebAppsClientGetNetworkTracesSlotV2Result` -- New struct `WebAppsClientGetNetworkTracesV2Options` -- New struct `WebAppsClientGetNetworkTracesV2Response` -- New struct `WebAppsClientGetNetworkTracesV2Result` -- New struct `WebAppsClientGetOneDeployStatusOptions` -- New struct `WebAppsClientGetOneDeployStatusResponse` -- New struct `WebAppsClientGetOneDeployStatusResult` -- New struct `WebAppsClientGetOptions` -- New struct `WebAppsClientGetPremierAddOnOptions` -- New struct `WebAppsClientGetPremierAddOnResponse` -- New struct `WebAppsClientGetPremierAddOnResult` -- New struct `WebAppsClientGetPremierAddOnSlotOptions` -- New struct `WebAppsClientGetPremierAddOnSlotResponse` -- New struct `WebAppsClientGetPremierAddOnSlotResult` -- New struct `WebAppsClientGetPrivateAccessOptions` -- New struct `WebAppsClientGetPrivateAccessResponse` -- New struct `WebAppsClientGetPrivateAccessResult` -- New struct `WebAppsClientGetPrivateAccessSlotOptions` -- New struct `WebAppsClientGetPrivateAccessSlotResponse` -- New struct `WebAppsClientGetPrivateAccessSlotResult` -- New struct `WebAppsClientGetPrivateEndpointConnectionListOptions` -- New struct `WebAppsClientGetPrivateEndpointConnectionListPager` -- New struct `WebAppsClientGetPrivateEndpointConnectionListResponse` -- New struct `WebAppsClientGetPrivateEndpointConnectionListResult` -- New struct `WebAppsClientGetPrivateEndpointConnectionListSlotOptions` -- New struct `WebAppsClientGetPrivateEndpointConnectionListSlotPager` -- New struct `WebAppsClientGetPrivateEndpointConnectionListSlotResponse` -- New struct `WebAppsClientGetPrivateEndpointConnectionListSlotResult` -- New struct `WebAppsClientGetPrivateEndpointConnectionOptions` -- New struct `WebAppsClientGetPrivateEndpointConnectionResponse` -- New struct `WebAppsClientGetPrivateEndpointConnectionResult` -- New struct `WebAppsClientGetPrivateEndpointConnectionSlotOptions` -- New struct `WebAppsClientGetPrivateEndpointConnectionSlotResponse` -- New struct `WebAppsClientGetPrivateEndpointConnectionSlotResult` -- New struct `WebAppsClientGetPrivateLinkResourcesOptions` -- New struct `WebAppsClientGetPrivateLinkResourcesResponse` -- New struct `WebAppsClientGetPrivateLinkResourcesResult` -- New struct `WebAppsClientGetPrivateLinkResourcesSlotOptions` -- New struct `WebAppsClientGetPrivateLinkResourcesSlotResponse` -- New struct `WebAppsClientGetPrivateLinkResourcesSlotResult` -- New struct `WebAppsClientGetProcessDumpOptions` -- New struct `WebAppsClientGetProcessDumpResponse` -- New struct `WebAppsClientGetProcessDumpSlotOptions` -- New struct `WebAppsClientGetProcessDumpSlotResponse` -- New struct `WebAppsClientGetProcessModuleOptions` -- New struct `WebAppsClientGetProcessModuleResponse` -- New struct `WebAppsClientGetProcessModuleResult` -- New struct `WebAppsClientGetProcessModuleSlotOptions` -- New struct `WebAppsClientGetProcessModuleSlotResponse` -- New struct `WebAppsClientGetProcessModuleSlotResult` -- New struct `WebAppsClientGetProcessOptions` -- New struct `WebAppsClientGetProcessResponse` -- New struct `WebAppsClientGetProcessResult` -- New struct `WebAppsClientGetProcessSlotOptions` -- New struct `WebAppsClientGetProcessSlotResponse` -- New struct `WebAppsClientGetProcessSlotResult` -- New struct `WebAppsClientGetPublicCertificateOptions` -- New struct `WebAppsClientGetPublicCertificateResponse` -- New struct `WebAppsClientGetPublicCertificateResult` -- New struct `WebAppsClientGetPublicCertificateSlotOptions` -- New struct `WebAppsClientGetPublicCertificateSlotResponse` -- New struct `WebAppsClientGetPublicCertificateSlotResult` -- New struct `WebAppsClientGetRelayServiceConnectionOptions` -- New struct `WebAppsClientGetRelayServiceConnectionResponse` -- New struct `WebAppsClientGetRelayServiceConnectionResult` -- New struct `WebAppsClientGetRelayServiceConnectionSlotOptions` -- New struct `WebAppsClientGetRelayServiceConnectionSlotResponse` -- New struct `WebAppsClientGetRelayServiceConnectionSlotResult` -- New struct `WebAppsClientGetResponse` -- New struct `WebAppsClientGetResult` -- New struct `WebAppsClientGetScmAllowedOptions` -- New struct `WebAppsClientGetScmAllowedResponse` -- New struct `WebAppsClientGetScmAllowedResult` -- New struct `WebAppsClientGetScmAllowedSlotOptions` -- New struct `WebAppsClientGetScmAllowedSlotResponse` -- New struct `WebAppsClientGetScmAllowedSlotResult` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceResult` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResult` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesPager` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesResult` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotPager` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse` -- New struct `WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResult` -- New struct `WebAppsClientGetSiteExtensionOptions` -- New struct `WebAppsClientGetSiteExtensionResponse` -- New struct `WebAppsClientGetSiteExtensionResult` -- New struct `WebAppsClientGetSiteExtensionSlotOptions` -- New struct `WebAppsClientGetSiteExtensionSlotResponse` -- New struct `WebAppsClientGetSiteExtensionSlotResult` -- New struct `WebAppsClientGetSitePhpErrorLogFlagOptions` -- New struct `WebAppsClientGetSitePhpErrorLogFlagResponse` -- New struct `WebAppsClientGetSitePhpErrorLogFlagResult` -- New struct `WebAppsClientGetSitePhpErrorLogFlagSlotOptions` -- New struct `WebAppsClientGetSitePhpErrorLogFlagSlotResponse` -- New struct `WebAppsClientGetSitePhpErrorLogFlagSlotResult` -- New struct `WebAppsClientGetSlotOptions` -- New struct `WebAppsClientGetSlotResponse` -- New struct `WebAppsClientGetSlotResult` -- New struct `WebAppsClientGetSourceControlOptions` -- New struct `WebAppsClientGetSourceControlResponse` -- New struct `WebAppsClientGetSourceControlResult` -- New struct `WebAppsClientGetSourceControlSlotOptions` -- New struct `WebAppsClientGetSourceControlSlotResponse` -- New struct `WebAppsClientGetSourceControlSlotResult` -- New struct `WebAppsClientGetSwiftVirtualNetworkConnectionOptions` -- New struct `WebAppsClientGetSwiftVirtualNetworkConnectionResponse` -- New struct `WebAppsClientGetSwiftVirtualNetworkConnectionResult` -- New struct `WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions` -- New struct `WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse` -- New struct `WebAppsClientGetSwiftVirtualNetworkConnectionSlotResult` -- New struct `WebAppsClientGetTriggeredWebJobHistoryOptions` -- New struct `WebAppsClientGetTriggeredWebJobHistoryResponse` -- New struct `WebAppsClientGetTriggeredWebJobHistoryResult` -- New struct `WebAppsClientGetTriggeredWebJobHistorySlotOptions` -- New struct `WebAppsClientGetTriggeredWebJobHistorySlotResponse` -- New struct `WebAppsClientGetTriggeredWebJobHistorySlotResult` -- New struct `WebAppsClientGetTriggeredWebJobOptions` -- New struct `WebAppsClientGetTriggeredWebJobResponse` -- New struct `WebAppsClientGetTriggeredWebJobResult` -- New struct `WebAppsClientGetTriggeredWebJobSlotOptions` -- New struct `WebAppsClientGetTriggeredWebJobSlotResponse` -- New struct `WebAppsClientGetTriggeredWebJobSlotResult` -- New struct `WebAppsClientGetVnetConnectionGatewayOptions` -- New struct `WebAppsClientGetVnetConnectionGatewayResponse` -- New struct `WebAppsClientGetVnetConnectionGatewayResult` -- New struct `WebAppsClientGetVnetConnectionGatewaySlotOptions` -- New struct `WebAppsClientGetVnetConnectionGatewaySlotResponse` -- New struct `WebAppsClientGetVnetConnectionGatewaySlotResult` -- New struct `WebAppsClientGetVnetConnectionOptions` -- New struct `WebAppsClientGetVnetConnectionResponse` -- New struct `WebAppsClientGetVnetConnectionResult` -- New struct `WebAppsClientGetVnetConnectionSlotOptions` -- New struct `WebAppsClientGetVnetConnectionSlotResponse` -- New struct `WebAppsClientGetVnetConnectionSlotResult` -- New struct `WebAppsClientGetWebJobOptions` -- New struct `WebAppsClientGetWebJobResponse` -- New struct `WebAppsClientGetWebJobResult` -- New struct `WebAppsClientGetWebJobSlotOptions` -- New struct `WebAppsClientGetWebJobSlotResponse` -- New struct `WebAppsClientGetWebJobSlotResult` -- New struct `WebAppsClientGetWebSiteContainerLogsOptions` -- New struct `WebAppsClientGetWebSiteContainerLogsResponse` -- New struct `WebAppsClientGetWebSiteContainerLogsSlotOptions` -- New struct `WebAppsClientGetWebSiteContainerLogsSlotResponse` -- New struct `WebAppsClientInstallSiteExtensionPoller` -- New struct `WebAppsClientInstallSiteExtensionPollerResponse` -- New struct `WebAppsClientInstallSiteExtensionResponse` -- New struct `WebAppsClientInstallSiteExtensionResult` -- New struct `WebAppsClientInstallSiteExtensionSlotPoller` -- New struct `WebAppsClientInstallSiteExtensionSlotPollerResponse` -- New struct `WebAppsClientInstallSiteExtensionSlotResponse` -- New struct `WebAppsClientInstallSiteExtensionSlotResult` -- New struct `WebAppsClientIsCloneableOptions` -- New struct `WebAppsClientIsCloneableResponse` -- New struct `WebAppsClientIsCloneableResult` -- New struct `WebAppsClientIsCloneableSlotOptions` -- New struct `WebAppsClientIsCloneableSlotResponse` -- New struct `WebAppsClientIsCloneableSlotResult` -- New struct `WebAppsClientListApplicationSettingsOptions` -- New struct `WebAppsClientListApplicationSettingsResponse` -- New struct `WebAppsClientListApplicationSettingsResult` -- New struct `WebAppsClientListApplicationSettingsSlotOptions` -- New struct `WebAppsClientListApplicationSettingsSlotResponse` -- New struct `WebAppsClientListApplicationSettingsSlotResult` -- New struct `WebAppsClientListAzureStorageAccountsOptions` -- New struct `WebAppsClientListAzureStorageAccountsResponse` -- New struct `WebAppsClientListAzureStorageAccountsResult` -- New struct `WebAppsClientListAzureStorageAccountsSlotOptions` -- New struct `WebAppsClientListAzureStorageAccountsSlotResponse` -- New struct `WebAppsClientListAzureStorageAccountsSlotResult` -- New struct `WebAppsClientListBackupStatusSecretsOptions` -- New struct `WebAppsClientListBackupStatusSecretsResponse` -- New struct `WebAppsClientListBackupStatusSecretsResult` -- New struct `WebAppsClientListBackupStatusSecretsSlotOptions` -- New struct `WebAppsClientListBackupStatusSecretsSlotResponse` -- New struct `WebAppsClientListBackupStatusSecretsSlotResult` -- New struct `WebAppsClientListBackupsOptions` -- New struct `WebAppsClientListBackupsPager` -- New struct `WebAppsClientListBackupsResponse` -- New struct `WebAppsClientListBackupsResult` -- New struct `WebAppsClientListBackupsSlotOptions` -- New struct `WebAppsClientListBackupsSlotPager` -- New struct `WebAppsClientListBackupsSlotResponse` -- New struct `WebAppsClientListBackupsSlotResult` -- New struct `WebAppsClientListBasicPublishingCredentialsPoliciesOptions` -- New struct `WebAppsClientListBasicPublishingCredentialsPoliciesPager` -- New struct `WebAppsClientListBasicPublishingCredentialsPoliciesResponse` -- New struct `WebAppsClientListBasicPublishingCredentialsPoliciesResult` -- New struct `WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions` -- New struct `WebAppsClientListBasicPublishingCredentialsPoliciesSlotPager` -- New struct `WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse` -- New struct `WebAppsClientListBasicPublishingCredentialsPoliciesSlotResult` -- New struct `WebAppsClientListByResourceGroupOptions` -- New struct `WebAppsClientListByResourceGroupPager` -- New struct `WebAppsClientListByResourceGroupResponse` -- New struct `WebAppsClientListByResourceGroupResult` -- New struct `WebAppsClientListConfigurationSnapshotInfoOptions` -- New struct `WebAppsClientListConfigurationSnapshotInfoPager` -- New struct `WebAppsClientListConfigurationSnapshotInfoResponse` -- New struct `WebAppsClientListConfigurationSnapshotInfoResult` -- New struct `WebAppsClientListConfigurationSnapshotInfoSlotOptions` -- New struct `WebAppsClientListConfigurationSnapshotInfoSlotPager` -- New struct `WebAppsClientListConfigurationSnapshotInfoSlotResponse` -- New struct `WebAppsClientListConfigurationSnapshotInfoSlotResult` -- New struct `WebAppsClientListConfigurationsOptions` -- New struct `WebAppsClientListConfigurationsPager` -- New struct `WebAppsClientListConfigurationsResponse` -- New struct `WebAppsClientListConfigurationsResult` -- New struct `WebAppsClientListConfigurationsSlotOptions` -- New struct `WebAppsClientListConfigurationsSlotPager` -- New struct `WebAppsClientListConfigurationsSlotResponse` -- New struct `WebAppsClientListConfigurationsSlotResult` -- New struct `WebAppsClientListConnectionStringsOptions` -- New struct `WebAppsClientListConnectionStringsResponse` -- New struct `WebAppsClientListConnectionStringsResult` -- New struct `WebAppsClientListConnectionStringsSlotOptions` -- New struct `WebAppsClientListConnectionStringsSlotResponse` -- New struct `WebAppsClientListConnectionStringsSlotResult` -- New struct `WebAppsClientListContinuousWebJobsOptions` -- New struct `WebAppsClientListContinuousWebJobsPager` -- New struct `WebAppsClientListContinuousWebJobsResponse` -- New struct `WebAppsClientListContinuousWebJobsResult` -- New struct `WebAppsClientListContinuousWebJobsSlotOptions` -- New struct `WebAppsClientListContinuousWebJobsSlotPager` -- New struct `WebAppsClientListContinuousWebJobsSlotResponse` -- New struct `WebAppsClientListContinuousWebJobsSlotResult` -- New struct `WebAppsClientListDeploymentLogOptions` -- New struct `WebAppsClientListDeploymentLogResponse` -- New struct `WebAppsClientListDeploymentLogResult` -- New struct `WebAppsClientListDeploymentLogSlotOptions` -- New struct `WebAppsClientListDeploymentLogSlotResponse` -- New struct `WebAppsClientListDeploymentLogSlotResult` -- New struct `WebAppsClientListDeploymentsOptions` -- New struct `WebAppsClientListDeploymentsPager` -- New struct `WebAppsClientListDeploymentsResponse` -- New struct `WebAppsClientListDeploymentsResult` -- New struct `WebAppsClientListDeploymentsSlotOptions` -- New struct `WebAppsClientListDeploymentsSlotPager` -- New struct `WebAppsClientListDeploymentsSlotResponse` -- New struct `WebAppsClientListDeploymentsSlotResult` -- New struct `WebAppsClientListDomainOwnershipIdentifiersOptions` -- New struct `WebAppsClientListDomainOwnershipIdentifiersPager` -- New struct `WebAppsClientListDomainOwnershipIdentifiersResponse` -- New struct `WebAppsClientListDomainOwnershipIdentifiersResult` -- New struct `WebAppsClientListDomainOwnershipIdentifiersSlotOptions` -- New struct `WebAppsClientListDomainOwnershipIdentifiersSlotPager` -- New struct `WebAppsClientListDomainOwnershipIdentifiersSlotResponse` -- New struct `WebAppsClientListDomainOwnershipIdentifiersSlotResult` -- New struct `WebAppsClientListFunctionKeysOptions` -- New struct `WebAppsClientListFunctionKeysResponse` -- New struct `WebAppsClientListFunctionKeysResult` -- New struct `WebAppsClientListFunctionKeysSlotOptions` -- New struct `WebAppsClientListFunctionKeysSlotResponse` -- New struct `WebAppsClientListFunctionKeysSlotResult` -- New struct `WebAppsClientListFunctionSecretsOptions` -- New struct `WebAppsClientListFunctionSecretsResponse` -- New struct `WebAppsClientListFunctionSecretsResult` -- New struct `WebAppsClientListFunctionSecretsSlotOptions` -- New struct `WebAppsClientListFunctionSecretsSlotResponse` -- New struct `WebAppsClientListFunctionSecretsSlotResult` -- New struct `WebAppsClientListFunctionsOptions` -- New struct `WebAppsClientListFunctionsPager` -- New struct `WebAppsClientListFunctionsResponse` -- New struct `WebAppsClientListFunctionsResult` -- New struct `WebAppsClientListHostKeysOptions` -- New struct `WebAppsClientListHostKeysResponse` -- New struct `WebAppsClientListHostKeysResult` -- New struct `WebAppsClientListHostKeysSlotOptions` -- New struct `WebAppsClientListHostKeysSlotResponse` -- New struct `WebAppsClientListHostKeysSlotResult` -- New struct `WebAppsClientListHostNameBindingsOptions` -- New struct `WebAppsClientListHostNameBindingsPager` -- New struct `WebAppsClientListHostNameBindingsResponse` -- New struct `WebAppsClientListHostNameBindingsResult` -- New struct `WebAppsClientListHostNameBindingsSlotOptions` -- New struct `WebAppsClientListHostNameBindingsSlotPager` -- New struct `WebAppsClientListHostNameBindingsSlotResponse` -- New struct `WebAppsClientListHostNameBindingsSlotResult` -- New struct `WebAppsClientListHybridConnectionsOptions` -- New struct `WebAppsClientListHybridConnectionsResponse` -- New struct `WebAppsClientListHybridConnectionsResult` -- New struct `WebAppsClientListHybridConnectionsSlotOptions` -- New struct `WebAppsClientListHybridConnectionsSlotResponse` -- New struct `WebAppsClientListHybridConnectionsSlotResult` -- New struct `WebAppsClientListInstanceFunctionsSlotOptions` -- New struct `WebAppsClientListInstanceFunctionsSlotPager` -- New struct `WebAppsClientListInstanceFunctionsSlotResponse` -- New struct `WebAppsClientListInstanceFunctionsSlotResult` -- New struct `WebAppsClientListInstanceIdentifiersOptions` -- New struct `WebAppsClientListInstanceIdentifiersPager` -- New struct `WebAppsClientListInstanceIdentifiersResponse` -- New struct `WebAppsClientListInstanceIdentifiersResult` -- New struct `WebAppsClientListInstanceIdentifiersSlotOptions` -- New struct `WebAppsClientListInstanceIdentifiersSlotPager` -- New struct `WebAppsClientListInstanceIdentifiersSlotResponse` -- New struct `WebAppsClientListInstanceIdentifiersSlotResult` -- New struct `WebAppsClientListInstanceProcessModulesOptions` -- New struct `WebAppsClientListInstanceProcessModulesPager` -- New struct `WebAppsClientListInstanceProcessModulesResponse` -- New struct `WebAppsClientListInstanceProcessModulesResult` -- New struct `WebAppsClientListInstanceProcessModulesSlotOptions` -- New struct `WebAppsClientListInstanceProcessModulesSlotPager` -- New struct `WebAppsClientListInstanceProcessModulesSlotResponse` -- New struct `WebAppsClientListInstanceProcessModulesSlotResult` -- New struct `WebAppsClientListInstanceProcessThreadsOptions` -- New struct `WebAppsClientListInstanceProcessThreadsPager` -- New struct `WebAppsClientListInstanceProcessThreadsResponse` -- New struct `WebAppsClientListInstanceProcessThreadsResult` -- New struct `WebAppsClientListInstanceProcessThreadsSlotOptions` -- New struct `WebAppsClientListInstanceProcessThreadsSlotPager` -- New struct `WebAppsClientListInstanceProcessThreadsSlotResponse` -- New struct `WebAppsClientListInstanceProcessThreadsSlotResult` -- New struct `WebAppsClientListInstanceProcessesOptions` -- New struct `WebAppsClientListInstanceProcessesPager` -- New struct `WebAppsClientListInstanceProcessesResponse` -- New struct `WebAppsClientListInstanceProcessesResult` -- New struct `WebAppsClientListInstanceProcessesSlotOptions` -- New struct `WebAppsClientListInstanceProcessesSlotPager` -- New struct `WebAppsClientListInstanceProcessesSlotResponse` -- New struct `WebAppsClientListInstanceProcessesSlotResult` -- New struct `WebAppsClientListMetadataOptions` -- New struct `WebAppsClientListMetadataResponse` -- New struct `WebAppsClientListMetadataResult` -- New struct `WebAppsClientListMetadataSlotOptions` -- New struct `WebAppsClientListMetadataSlotResponse` -- New struct `WebAppsClientListMetadataSlotResult` -- New struct `WebAppsClientListNetworkFeaturesOptions` -- New struct `WebAppsClientListNetworkFeaturesResponse` -- New struct `WebAppsClientListNetworkFeaturesResult` -- New struct `WebAppsClientListNetworkFeaturesSlotOptions` -- New struct `WebAppsClientListNetworkFeaturesSlotResponse` -- New struct `WebAppsClientListNetworkFeaturesSlotResult` -- New struct `WebAppsClientListOptions` -- New struct `WebAppsClientListPager` -- New struct `WebAppsClientListPerfMonCountersOptions` -- New struct `WebAppsClientListPerfMonCountersPager` -- New struct `WebAppsClientListPerfMonCountersResponse` -- New struct `WebAppsClientListPerfMonCountersResult` -- New struct `WebAppsClientListPerfMonCountersSlotOptions` -- New struct `WebAppsClientListPerfMonCountersSlotPager` -- New struct `WebAppsClientListPerfMonCountersSlotResponse` -- New struct `WebAppsClientListPerfMonCountersSlotResult` -- New struct `WebAppsClientListPremierAddOnsOptions` -- New struct `WebAppsClientListPremierAddOnsResponse` -- New struct `WebAppsClientListPremierAddOnsResult` -- New struct `WebAppsClientListPremierAddOnsSlotOptions` -- New struct `WebAppsClientListPremierAddOnsSlotResponse` -- New struct `WebAppsClientListPremierAddOnsSlotResult` -- New struct `WebAppsClientListProcessModulesOptions` -- New struct `WebAppsClientListProcessModulesPager` -- New struct `WebAppsClientListProcessModulesResponse` -- New struct `WebAppsClientListProcessModulesResult` -- New struct `WebAppsClientListProcessModulesSlotOptions` -- New struct `WebAppsClientListProcessModulesSlotPager` -- New struct `WebAppsClientListProcessModulesSlotResponse` -- New struct `WebAppsClientListProcessModulesSlotResult` -- New struct `WebAppsClientListProcessThreadsOptions` -- New struct `WebAppsClientListProcessThreadsPager` -- New struct `WebAppsClientListProcessThreadsResponse` -- New struct `WebAppsClientListProcessThreadsResult` -- New struct `WebAppsClientListProcessThreadsSlotOptions` -- New struct `WebAppsClientListProcessThreadsSlotPager` -- New struct `WebAppsClientListProcessThreadsSlotResponse` -- New struct `WebAppsClientListProcessThreadsSlotResult` -- New struct `WebAppsClientListProcessesOptions` -- New struct `WebAppsClientListProcessesPager` -- New struct `WebAppsClientListProcessesResponse` -- New struct `WebAppsClientListProcessesResult` -- New struct `WebAppsClientListProcessesSlotOptions` -- New struct `WebAppsClientListProcessesSlotPager` -- New struct `WebAppsClientListProcessesSlotResponse` -- New struct `WebAppsClientListProcessesSlotResult` -- New struct `WebAppsClientListPublicCertificatesOptions` -- New struct `WebAppsClientListPublicCertificatesPager` -- New struct `WebAppsClientListPublicCertificatesResponse` -- New struct `WebAppsClientListPublicCertificatesResult` -- New struct `WebAppsClientListPublicCertificatesSlotOptions` -- New struct `WebAppsClientListPublicCertificatesSlotPager` -- New struct `WebAppsClientListPublicCertificatesSlotResponse` -- New struct `WebAppsClientListPublicCertificatesSlotResult` -- New struct `WebAppsClientListPublishingCredentialsPoller` -- New struct `WebAppsClientListPublishingCredentialsPollerResponse` -- New struct `WebAppsClientListPublishingCredentialsResponse` -- New struct `WebAppsClientListPublishingCredentialsResult` -- New struct `WebAppsClientListPublishingCredentialsSlotPoller` -- New struct `WebAppsClientListPublishingCredentialsSlotPollerResponse` -- New struct `WebAppsClientListPublishingCredentialsSlotResponse` -- New struct `WebAppsClientListPublishingCredentialsSlotResult` -- New struct `WebAppsClientListPublishingProfileXMLWithSecretsOptions` -- New struct `WebAppsClientListPublishingProfileXMLWithSecretsResponse` -- New struct `WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions` -- New struct `WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse` -- New struct `WebAppsClientListRelayServiceConnectionsOptions` -- New struct `WebAppsClientListRelayServiceConnectionsResponse` -- New struct `WebAppsClientListRelayServiceConnectionsResult` -- New struct `WebAppsClientListRelayServiceConnectionsSlotOptions` -- New struct `WebAppsClientListRelayServiceConnectionsSlotResponse` -- New struct `WebAppsClientListRelayServiceConnectionsSlotResult` -- New struct `WebAppsClientListResponse` -- New struct `WebAppsClientListResult` -- New struct `WebAppsClientListSiteBackupsOptions` -- New struct `WebAppsClientListSiteBackupsPager` -- New struct `WebAppsClientListSiteBackupsResponse` -- New struct `WebAppsClientListSiteBackupsResult` -- New struct `WebAppsClientListSiteBackupsSlotOptions` -- New struct `WebAppsClientListSiteBackupsSlotPager` -- New struct `WebAppsClientListSiteBackupsSlotResponse` -- New struct `WebAppsClientListSiteBackupsSlotResult` -- New struct `WebAppsClientListSiteExtensionsOptions` -- New struct `WebAppsClientListSiteExtensionsPager` -- New struct `WebAppsClientListSiteExtensionsResponse` -- New struct `WebAppsClientListSiteExtensionsResult` -- New struct `WebAppsClientListSiteExtensionsSlotOptions` -- New struct `WebAppsClientListSiteExtensionsSlotPager` -- New struct `WebAppsClientListSiteExtensionsSlotResponse` -- New struct `WebAppsClientListSiteExtensionsSlotResult` -- New struct `WebAppsClientListSitePushSettingsOptions` -- New struct `WebAppsClientListSitePushSettingsResponse` -- New struct `WebAppsClientListSitePushSettingsResult` -- New struct `WebAppsClientListSitePushSettingsSlotOptions` -- New struct `WebAppsClientListSitePushSettingsSlotResponse` -- New struct `WebAppsClientListSitePushSettingsSlotResult` -- New struct `WebAppsClientListSlotConfigurationNamesOptions` -- New struct `WebAppsClientListSlotConfigurationNamesResponse` -- New struct `WebAppsClientListSlotConfigurationNamesResult` -- New struct `WebAppsClientListSlotDifferencesFromProductionOptions` -- New struct `WebAppsClientListSlotDifferencesFromProductionPager` -- New struct `WebAppsClientListSlotDifferencesFromProductionResponse` -- New struct `WebAppsClientListSlotDifferencesFromProductionResult` -- New struct `WebAppsClientListSlotDifferencesSlotOptions` -- New struct `WebAppsClientListSlotDifferencesSlotPager` -- New struct `WebAppsClientListSlotDifferencesSlotResponse` -- New struct `WebAppsClientListSlotDifferencesSlotResult` -- New struct `WebAppsClientListSlotsOptions` -- New struct `WebAppsClientListSlotsPager` -- New struct `WebAppsClientListSlotsResponse` -- New struct `WebAppsClientListSlotsResult` -- New struct `WebAppsClientListSnapshotsFromDRSecondaryOptions` -- New struct `WebAppsClientListSnapshotsFromDRSecondaryPager` -- New struct `WebAppsClientListSnapshotsFromDRSecondaryResponse` -- New struct `WebAppsClientListSnapshotsFromDRSecondaryResult` -- New struct `WebAppsClientListSnapshotsFromDRSecondarySlotOptions` -- New struct `WebAppsClientListSnapshotsFromDRSecondarySlotPager` -- New struct `WebAppsClientListSnapshotsFromDRSecondarySlotResponse` -- New struct `WebAppsClientListSnapshotsFromDRSecondarySlotResult` -- New struct `WebAppsClientListSnapshotsOptions` -- New struct `WebAppsClientListSnapshotsPager` -- New struct `WebAppsClientListSnapshotsResponse` -- New struct `WebAppsClientListSnapshotsResult` -- New struct `WebAppsClientListSnapshotsSlotOptions` -- New struct `WebAppsClientListSnapshotsSlotPager` -- New struct `WebAppsClientListSnapshotsSlotResponse` -- New struct `WebAppsClientListSnapshotsSlotResult` -- New struct `WebAppsClientListSyncFunctionTriggersOptions` -- New struct `WebAppsClientListSyncFunctionTriggersResponse` -- New struct `WebAppsClientListSyncFunctionTriggersResult` -- New struct `WebAppsClientListSyncFunctionTriggersSlotOptions` -- New struct `WebAppsClientListSyncFunctionTriggersSlotResponse` -- New struct `WebAppsClientListSyncFunctionTriggersSlotResult` -- New struct `WebAppsClientListSyncStatusOptions` -- New struct `WebAppsClientListSyncStatusResponse` -- New struct `WebAppsClientListSyncStatusSlotOptions` -- New struct `WebAppsClientListSyncStatusSlotResponse` -- New struct `WebAppsClientListTriggeredWebJobHistoryOptions` -- New struct `WebAppsClientListTriggeredWebJobHistoryPager` -- New struct `WebAppsClientListTriggeredWebJobHistoryResponse` -- New struct `WebAppsClientListTriggeredWebJobHistoryResult` -- New struct `WebAppsClientListTriggeredWebJobHistorySlotOptions` -- New struct `WebAppsClientListTriggeredWebJobHistorySlotPager` -- New struct `WebAppsClientListTriggeredWebJobHistorySlotResponse` -- New struct `WebAppsClientListTriggeredWebJobHistorySlotResult` -- New struct `WebAppsClientListTriggeredWebJobsOptions` -- New struct `WebAppsClientListTriggeredWebJobsPager` -- New struct `WebAppsClientListTriggeredWebJobsResponse` -- New struct `WebAppsClientListTriggeredWebJobsResult` -- New struct `WebAppsClientListTriggeredWebJobsSlotOptions` -- New struct `WebAppsClientListTriggeredWebJobsSlotPager` -- New struct `WebAppsClientListTriggeredWebJobsSlotResponse` -- New struct `WebAppsClientListTriggeredWebJobsSlotResult` -- New struct `WebAppsClientListUsagesOptions` -- New struct `WebAppsClientListUsagesPager` -- New struct `WebAppsClientListUsagesResponse` -- New struct `WebAppsClientListUsagesResult` -- New struct `WebAppsClientListUsagesSlotOptions` -- New struct `WebAppsClientListUsagesSlotPager` -- New struct `WebAppsClientListUsagesSlotResponse` -- New struct `WebAppsClientListUsagesSlotResult` -- New struct `WebAppsClientListVnetConnectionsOptions` -- New struct `WebAppsClientListVnetConnectionsResponse` -- New struct `WebAppsClientListVnetConnectionsResult` -- New struct `WebAppsClientListVnetConnectionsSlotOptions` -- New struct `WebAppsClientListVnetConnectionsSlotResponse` -- New struct `WebAppsClientListVnetConnectionsSlotResult` -- New struct `WebAppsClientListWebJobsOptions` -- New struct `WebAppsClientListWebJobsPager` -- New struct `WebAppsClientListWebJobsResponse` -- New struct `WebAppsClientListWebJobsResult` -- New struct `WebAppsClientListWebJobsSlotOptions` -- New struct `WebAppsClientListWebJobsSlotPager` -- New struct `WebAppsClientListWebJobsSlotResponse` -- New struct `WebAppsClientListWebJobsSlotResult` -- New struct `WebAppsClientMigrateMySQLPoller` -- New struct `WebAppsClientMigrateMySQLPollerResponse` -- New struct `WebAppsClientMigrateMySQLResponse` -- New struct `WebAppsClientMigrateMySQLResult` -- New struct `WebAppsClientMigrateStoragePoller` -- New struct `WebAppsClientMigrateStoragePollerResponse` -- New struct `WebAppsClientMigrateStorageResponse` -- New struct `WebAppsClientMigrateStorageResult` -- New struct `WebAppsClientPutPrivateAccessVnetOptions` -- New struct `WebAppsClientPutPrivateAccessVnetResponse` -- New struct `WebAppsClientPutPrivateAccessVnetResult` -- New struct `WebAppsClientPutPrivateAccessVnetSlotOptions` -- New struct `WebAppsClientPutPrivateAccessVnetSlotResponse` -- New struct `WebAppsClientPutPrivateAccessVnetSlotResult` -- New struct `WebAppsClientRecoverSiteConfigurationSnapshotOptions` -- New struct `WebAppsClientRecoverSiteConfigurationSnapshotResponse` -- New struct `WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions` -- New struct `WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse` -- New struct `WebAppsClientResetProductionSlotConfigOptions` -- New struct `WebAppsClientResetProductionSlotConfigResponse` -- New struct `WebAppsClientResetSlotConfigurationSlotOptions` -- New struct `WebAppsClientResetSlotConfigurationSlotResponse` -- New struct `WebAppsClientRestartOptions` -- New struct `WebAppsClientRestartResponse` -- New struct `WebAppsClientRestartSlotOptions` -- New struct `WebAppsClientRestartSlotResponse` -- New struct `WebAppsClientRestoreFromBackupBlobPoller` -- New struct `WebAppsClientRestoreFromBackupBlobPollerResponse` -- New struct `WebAppsClientRestoreFromBackupBlobResponse` -- New struct `WebAppsClientRestoreFromBackupBlobSlotPoller` -- New struct `WebAppsClientRestoreFromBackupBlobSlotPollerResponse` -- New struct `WebAppsClientRestoreFromBackupBlobSlotResponse` -- New struct `WebAppsClientRestoreFromDeletedAppPoller` -- New struct `WebAppsClientRestoreFromDeletedAppPollerResponse` -- New struct `WebAppsClientRestoreFromDeletedAppResponse` -- New struct `WebAppsClientRestoreFromDeletedAppSlotPoller` -- New struct `WebAppsClientRestoreFromDeletedAppSlotPollerResponse` -- New struct `WebAppsClientRestoreFromDeletedAppSlotResponse` -- New struct `WebAppsClientRestorePoller` -- New struct `WebAppsClientRestorePollerResponse` -- New struct `WebAppsClientRestoreResponse` -- New struct `WebAppsClientRestoreSlotPoller` -- New struct `WebAppsClientRestoreSlotPollerResponse` -- New struct `WebAppsClientRestoreSlotResponse` -- New struct `WebAppsClientRestoreSnapshotPoller` -- New struct `WebAppsClientRestoreSnapshotPollerResponse` -- New struct `WebAppsClientRestoreSnapshotResponse` -- New struct `WebAppsClientRestoreSnapshotSlotPoller` -- New struct `WebAppsClientRestoreSnapshotSlotPollerResponse` -- New struct `WebAppsClientRestoreSnapshotSlotResponse` -- New struct `WebAppsClientRunTriggeredWebJobOptions` -- New struct `WebAppsClientRunTriggeredWebJobResponse` -- New struct `WebAppsClientRunTriggeredWebJobSlotOptions` -- New struct `WebAppsClientRunTriggeredWebJobSlotResponse` -- New struct `WebAppsClientStartContinuousWebJobOptions` -- New struct `WebAppsClientStartContinuousWebJobResponse` -- New struct `WebAppsClientStartContinuousWebJobSlotOptions` -- New struct `WebAppsClientStartContinuousWebJobSlotResponse` -- New struct `WebAppsClientStartNetworkTracePoller` -- New struct `WebAppsClientStartNetworkTracePollerResponse` -- New struct `WebAppsClientStartNetworkTraceResponse` -- New struct `WebAppsClientStartNetworkTraceResult` -- New struct `WebAppsClientStartNetworkTraceSlotPoller` -- New struct `WebAppsClientStartNetworkTraceSlotPollerResponse` -- New struct `WebAppsClientStartNetworkTraceSlotResponse` -- New struct `WebAppsClientStartNetworkTraceSlotResult` -- New struct `WebAppsClientStartOptions` -- New struct `WebAppsClientStartResponse` -- New struct `WebAppsClientStartSlotOptions` -- New struct `WebAppsClientStartSlotResponse` -- New struct `WebAppsClientStartWebSiteNetworkTraceOperationPoller` -- New struct `WebAppsClientStartWebSiteNetworkTraceOperationPollerResponse` -- New struct `WebAppsClientStartWebSiteNetworkTraceOperationResponse` -- New struct `WebAppsClientStartWebSiteNetworkTraceOperationResult` -- New struct `WebAppsClientStartWebSiteNetworkTraceOperationSlotPoller` -- New struct `WebAppsClientStartWebSiteNetworkTraceOperationSlotPollerResponse` -- New struct `WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse` -- New struct `WebAppsClientStartWebSiteNetworkTraceOperationSlotResult` -- New struct `WebAppsClientStartWebSiteNetworkTraceOptions` -- New struct `WebAppsClientStartWebSiteNetworkTraceResponse` -- New struct `WebAppsClientStartWebSiteNetworkTraceResult` -- New struct `WebAppsClientStartWebSiteNetworkTraceSlotOptions` -- New struct `WebAppsClientStartWebSiteNetworkTraceSlotResponse` -- New struct `WebAppsClientStartWebSiteNetworkTraceSlotResult` -- New struct `WebAppsClientStopContinuousWebJobOptions` -- New struct `WebAppsClientStopContinuousWebJobResponse` -- New struct `WebAppsClientStopContinuousWebJobSlotOptions` -- New struct `WebAppsClientStopContinuousWebJobSlotResponse` -- New struct `WebAppsClientStopNetworkTraceOptions` -- New struct `WebAppsClientStopNetworkTraceResponse` -- New struct `WebAppsClientStopNetworkTraceSlotOptions` -- New struct `WebAppsClientStopNetworkTraceSlotResponse` -- New struct `WebAppsClientStopOptions` -- New struct `WebAppsClientStopResponse` -- New struct `WebAppsClientStopSlotOptions` -- New struct `WebAppsClientStopSlotResponse` -- New struct `WebAppsClientStopWebSiteNetworkTraceOptions` -- New struct `WebAppsClientStopWebSiteNetworkTraceResponse` -- New struct `WebAppsClientStopWebSiteNetworkTraceSlotOptions` -- New struct `WebAppsClientStopWebSiteNetworkTraceSlotResponse` -- New struct `WebAppsClientSwapSlotPoller` -- New struct `WebAppsClientSwapSlotPollerResponse` -- New struct `WebAppsClientSwapSlotResponse` -- New struct `WebAppsClientSwapSlotWithProductionPoller` -- New struct `WebAppsClientSwapSlotWithProductionPollerResponse` -- New struct `WebAppsClientSwapSlotWithProductionResponse` -- New struct `WebAppsClientSyncFunctionTriggersOptions` -- New struct `WebAppsClientSyncFunctionTriggersResponse` -- New struct `WebAppsClientSyncFunctionTriggersSlotOptions` -- New struct `WebAppsClientSyncFunctionTriggersSlotResponse` -- New struct `WebAppsClientSyncFunctionsOptions` -- New struct `WebAppsClientSyncFunctionsResponse` -- New struct `WebAppsClientSyncFunctionsSlotOptions` -- New struct `WebAppsClientSyncFunctionsSlotResponse` -- New struct `WebAppsClientSyncRepositoryOptions` -- New struct `WebAppsClientSyncRepositoryResponse` -- New struct `WebAppsClientSyncRepositorySlotOptions` -- New struct `WebAppsClientSyncRepositorySlotResponse` -- New struct `WebAppsClientUpdateApplicationSettingsOptions` -- New struct `WebAppsClientUpdateApplicationSettingsResponse` -- New struct `WebAppsClientUpdateApplicationSettingsResult` -- New struct `WebAppsClientUpdateApplicationSettingsSlotOptions` -- New struct `WebAppsClientUpdateApplicationSettingsSlotResponse` -- New struct `WebAppsClientUpdateApplicationSettingsSlotResult` -- New struct `WebAppsClientUpdateAuthSettingsOptions` -- New struct `WebAppsClientUpdateAuthSettingsResponse` -- New struct `WebAppsClientUpdateAuthSettingsResult` -- New struct `WebAppsClientUpdateAuthSettingsSlotOptions` -- New struct `WebAppsClientUpdateAuthSettingsSlotResponse` -- New struct `WebAppsClientUpdateAuthSettingsSlotResult` -- New struct `WebAppsClientUpdateAuthSettingsV2Options` -- New struct `WebAppsClientUpdateAuthSettingsV2Response` -- New struct `WebAppsClientUpdateAuthSettingsV2Result` -- New struct `WebAppsClientUpdateAuthSettingsV2SlotOptions` -- New struct `WebAppsClientUpdateAuthSettingsV2SlotResponse` -- New struct `WebAppsClientUpdateAuthSettingsV2SlotResult` -- New struct `WebAppsClientUpdateAzureStorageAccountsOptions` -- New struct `WebAppsClientUpdateAzureStorageAccountsResponse` -- New struct `WebAppsClientUpdateAzureStorageAccountsResult` -- New struct `WebAppsClientUpdateAzureStorageAccountsSlotOptions` -- New struct `WebAppsClientUpdateAzureStorageAccountsSlotResponse` -- New struct `WebAppsClientUpdateAzureStorageAccountsSlotResult` -- New struct `WebAppsClientUpdateBackupConfigurationOptions` -- New struct `WebAppsClientUpdateBackupConfigurationResponse` -- New struct `WebAppsClientUpdateBackupConfigurationResult` -- New struct `WebAppsClientUpdateBackupConfigurationSlotOptions` -- New struct `WebAppsClientUpdateBackupConfigurationSlotResponse` -- New struct `WebAppsClientUpdateBackupConfigurationSlotResult` -- New struct `WebAppsClientUpdateConfigurationOptions` -- New struct `WebAppsClientUpdateConfigurationResponse` -- New struct `WebAppsClientUpdateConfigurationResult` -- New struct `WebAppsClientUpdateConfigurationSlotOptions` -- New struct `WebAppsClientUpdateConfigurationSlotResponse` -- New struct `WebAppsClientUpdateConfigurationSlotResult` -- New struct `WebAppsClientUpdateConnectionStringsOptions` -- New struct `WebAppsClientUpdateConnectionStringsResponse` -- New struct `WebAppsClientUpdateConnectionStringsResult` -- New struct `WebAppsClientUpdateConnectionStringsSlotOptions` -- New struct `WebAppsClientUpdateConnectionStringsSlotResponse` -- New struct `WebAppsClientUpdateConnectionStringsSlotResult` -- New struct `WebAppsClientUpdateDiagnosticLogsConfigOptions` -- New struct `WebAppsClientUpdateDiagnosticLogsConfigResponse` -- New struct `WebAppsClientUpdateDiagnosticLogsConfigResult` -- New struct `WebAppsClientUpdateDiagnosticLogsConfigSlotOptions` -- New struct `WebAppsClientUpdateDiagnosticLogsConfigSlotResponse` -- New struct `WebAppsClientUpdateDiagnosticLogsConfigSlotResult` -- New struct `WebAppsClientUpdateDomainOwnershipIdentifierOptions` -- New struct `WebAppsClientUpdateDomainOwnershipIdentifierResponse` -- New struct `WebAppsClientUpdateDomainOwnershipIdentifierResult` -- New struct `WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions` -- New struct `WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse` -- New struct `WebAppsClientUpdateDomainOwnershipIdentifierSlotResult` -- New struct `WebAppsClientUpdateFtpAllowedOptions` -- New struct `WebAppsClientUpdateFtpAllowedResponse` -- New struct `WebAppsClientUpdateFtpAllowedResult` -- New struct `WebAppsClientUpdateFtpAllowedSlotOptions` -- New struct `WebAppsClientUpdateFtpAllowedSlotResponse` -- New struct `WebAppsClientUpdateFtpAllowedSlotResult` -- New struct `WebAppsClientUpdateHybridConnectionOptions` -- New struct `WebAppsClientUpdateHybridConnectionResponse` -- New struct `WebAppsClientUpdateHybridConnectionResult` -- New struct `WebAppsClientUpdateHybridConnectionSlotOptions` -- New struct `WebAppsClientUpdateHybridConnectionSlotResponse` -- New struct `WebAppsClientUpdateHybridConnectionSlotResult` -- New struct `WebAppsClientUpdateMetadataOptions` -- New struct `WebAppsClientUpdateMetadataResponse` -- New struct `WebAppsClientUpdateMetadataResult` -- New struct `WebAppsClientUpdateMetadataSlotOptions` -- New struct `WebAppsClientUpdateMetadataSlotResponse` -- New struct `WebAppsClientUpdateMetadataSlotResult` -- New struct `WebAppsClientUpdateOptions` -- New struct `WebAppsClientUpdatePremierAddOnOptions` -- New struct `WebAppsClientUpdatePremierAddOnResponse` -- New struct `WebAppsClientUpdatePremierAddOnResult` -- New struct `WebAppsClientUpdatePremierAddOnSlotOptions` -- New struct `WebAppsClientUpdatePremierAddOnSlotResponse` -- New struct `WebAppsClientUpdatePremierAddOnSlotResult` -- New struct `WebAppsClientUpdateRelayServiceConnectionOptions` -- New struct `WebAppsClientUpdateRelayServiceConnectionResponse` -- New struct `WebAppsClientUpdateRelayServiceConnectionResult` -- New struct `WebAppsClientUpdateRelayServiceConnectionSlotOptions` -- New struct `WebAppsClientUpdateRelayServiceConnectionSlotResponse` -- New struct `WebAppsClientUpdateRelayServiceConnectionSlotResult` -- New struct `WebAppsClientUpdateResponse` -- New struct `WebAppsClientUpdateResult` -- New struct `WebAppsClientUpdateScmAllowedOptions` -- New struct `WebAppsClientUpdateScmAllowedResponse` -- New struct `WebAppsClientUpdateScmAllowedResult` -- New struct `WebAppsClientUpdateScmAllowedSlotOptions` -- New struct `WebAppsClientUpdateScmAllowedSlotResponse` -- New struct `WebAppsClientUpdateScmAllowedSlotResult` -- New struct `WebAppsClientUpdateSitePushSettingsOptions` -- New struct `WebAppsClientUpdateSitePushSettingsResponse` -- New struct `WebAppsClientUpdateSitePushSettingsResult` -- New struct `WebAppsClientUpdateSitePushSettingsSlotOptions` -- New struct `WebAppsClientUpdateSitePushSettingsSlotResponse` -- New struct `WebAppsClientUpdateSitePushSettingsSlotResult` -- New struct `WebAppsClientUpdateSlotConfigurationNamesOptions` -- New struct `WebAppsClientUpdateSlotConfigurationNamesResponse` -- New struct `WebAppsClientUpdateSlotConfigurationNamesResult` -- New struct `WebAppsClientUpdateSlotOptions` -- New struct `WebAppsClientUpdateSlotResponse` -- New struct `WebAppsClientUpdateSlotResult` -- New struct `WebAppsClientUpdateSourceControlOptions` -- New struct `WebAppsClientUpdateSourceControlResponse` -- New struct `WebAppsClientUpdateSourceControlResult` -- New struct `WebAppsClientUpdateSourceControlSlotOptions` -- New struct `WebAppsClientUpdateSourceControlSlotResponse` -- New struct `WebAppsClientUpdateSourceControlSlotResult` -- New struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions` -- New struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse` -- New struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResult` -- New struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions` -- New struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse` -- New struct `WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResult` -- New struct `WebAppsClientUpdateVnetConnectionGatewayOptions` -- New struct `WebAppsClientUpdateVnetConnectionGatewayResponse` -- New struct `WebAppsClientUpdateVnetConnectionGatewayResult` -- New struct `WebAppsClientUpdateVnetConnectionGatewaySlotOptions` -- New struct `WebAppsClientUpdateVnetConnectionGatewaySlotResponse` -- New struct `WebAppsClientUpdateVnetConnectionGatewaySlotResult` -- New struct `WebAppsClientUpdateVnetConnectionOptions` -- New struct `WebAppsClientUpdateVnetConnectionResponse` -- New struct `WebAppsClientUpdateVnetConnectionResult` -- New struct `WebAppsClientUpdateVnetConnectionSlotOptions` -- New struct `WebAppsClientUpdateVnetConnectionSlotResponse` -- New struct `WebAppsClientUpdateVnetConnectionSlotResult` -- New struct `WebSiteManagementClientListCustomHostNameSitesOptions` -- New struct `WebSiteManagementClientListCustomHostNameSitesPager` -- New struct `WebSiteManagementClientListCustomHostNameSitesResponse` -- New struct `WebSiteManagementClientListCustomHostNameSitesResult` -- New field `ID` in struct `SiteLogsConfig` -- New field `Name` in struct `SiteLogsConfig` -- New field `Type` in struct `SiteLogsConfig` -- New field `Kind` in struct `SiteLogsConfig` -- New field `ID` in struct `PremierAddOn` -- New field `Name` in struct `PremierAddOn` -- New field `Type` in struct `PremierAddOn` -- New field `Location` in struct `PremierAddOn` -- New field `Kind` in struct `PremierAddOn` -- New field `Tags` in struct `PremierAddOn` -- New field `Type` in struct `HybridConnectionLimits` -- New field `Kind` in struct `HybridConnectionLimits` -- New field `ID` in struct `HybridConnectionLimits` -- New field `Name` in struct `HybridConnectionLimits` -- New field `ID` in struct `RelayServiceConnectionEntity` -- New field `Name` in struct `RelayServiceConnectionEntity` -- New field `Type` in struct `RelayServiceConnectionEntity` -- New field `Kind` in struct `RelayServiceConnectionEntity` -- New field `Kind` in struct `SitePhpErrorLogFlag` -- New field `ID` in struct `SitePhpErrorLogFlag` -- New field `Name` in struct `SitePhpErrorLogFlag` -- New field `Type` in struct `SitePhpErrorLogFlag` -- New field `Tags` in struct `Domain` -- New field `ID` in struct `Domain` -- New field `Name` in struct `Domain` -- New field `Type` in struct `Domain` -- New field `Location` in struct `Domain` -- New field `Kind` in struct `Domain` -- New field `Kind` in struct `StorageMigrationOptions` -- New field `ID` in struct `StorageMigrationOptions` -- New field `Name` in struct `StorageMigrationOptions` -- New field `Type` in struct `StorageMigrationOptions` -- New field `Name` in struct `AddressResponse` -- New field `Type` in struct `AddressResponse` -- New field `Kind` in struct `AddressResponse` -- New field `ID` in struct `AddressResponse` -- New field `Type` in struct `CertificateOrderAction` -- New field `Kind` in struct `CertificateOrderAction` -- New field `ID` in struct `CertificateOrderAction` -- New field `Name` in struct `CertificateOrderAction` -- New field `Kind` in struct `PrivateLinkConnectionApprovalRequestResource` -- New field `ID` in struct `PrivateLinkConnectionApprovalRequestResource` -- New field `Name` in struct `PrivateLinkConnectionApprovalRequestResource` -- New field `Type` in struct `PrivateLinkConnectionApprovalRequestResource` -- New field `Type` in struct `TopLevelDomain` -- New field `Kind` in struct `TopLevelDomain` -- New field `ID` in struct `TopLevelDomain` -- New field `Name` in struct `TopLevelDomain` -- New field `Kind` in struct `TriggeredJobHistory` -- New field `ID` in struct `TriggeredJobHistory` -- New field `Name` in struct `TriggeredJobHistory` -- New field `Type` in struct `TriggeredJobHistory` -- New field `Name` in struct `ResourceHealthMetadata` -- New field `Type` in struct `ResourceHealthMetadata` -- New field `Kind` in struct `ResourceHealthMetadata` -- New field `ID` in struct `ResourceHealthMetadata` -- New field `Kind` in struct `VnetRoute` -- New field `ID` in struct `VnetRoute` -- New field `Name` in struct `VnetRoute` -- New field `Type` in struct `VnetRoute` -- New field `ProvisioningState` in struct `Certificate` -- New field `KeyVaultID` in struct `Certificate` -- New field `KeyVaultSecretName` in struct `Certificate` -- New field `Kind` in struct `DiagnosticCategory` -- New field `ID` in struct `DiagnosticCategory` -- New field `Name` in struct `DiagnosticCategory` -- New field `Type` in struct `DiagnosticCategory` -- New field `ID` in struct `StaticSiteBuildARMResource` -- New field `Name` in struct `StaticSiteBuildARMResource` -- New field `Type` in struct `StaticSiteBuildARMResource` -- New field `Kind` in struct `StaticSiteBuildARMResource` -- New field `Type` in struct `MSDeployLog` -- New field `Kind` in struct `MSDeployLog` -- New field `ID` in struct `MSDeployLog` -- New field `Name` in struct `MSDeployLog` -- New field `Kind` in struct `DetectorDefinitionResource` -- New field `ID` in struct `DetectorDefinitionResource` -- New field `Name` in struct `DetectorDefinitionResource` -- New field `Type` in struct `DetectorDefinitionResource` -- New field `Kind` in struct `StaticSiteResetPropertiesARMResource` -- New field `ID` in struct `StaticSiteResetPropertiesARMResource` -- New field `Name` in struct `StaticSiteResetPropertiesARMResource` -- New field `Type` in struct `StaticSiteResetPropertiesARMResource` -- New field `ContainerAppsConfiguration` in struct `KubeEnvironmentPatchResourceProperties` -- New field `Kind` in struct `StaticSiteUserInvitationResponseResource` -- New field `ID` in struct `StaticSiteUserInvitationResponseResource` -- New field `Name` in struct `StaticSiteUserInvitationResponseResource` -- New field `Type` in struct `StaticSiteUserInvitationResponseResource` -- New field `Name` in struct `StaticSiteUserProvidedFunctionAppARMResource` -- New field `Type` in struct `StaticSiteUserProvidedFunctionAppARMResource` -- New field `Kind` in struct `StaticSiteUserProvidedFunctionAppARMResource` -- New field `ID` in struct `StaticSiteUserProvidedFunctionAppARMResource` -- New field `Name` in struct `KubeEnvironmentPatchResource` -- New field `Type` in struct `KubeEnvironmentPatchResource` -- New field `Kind` in struct `KubeEnvironmentPatchResource` -- New field `ID` in struct `KubeEnvironmentPatchResource` -- New field `Name` in struct `StaticSiteZipDeploymentARMResource` -- New field `Type` in struct `StaticSiteZipDeploymentARMResource` -- New field `Kind` in struct `StaticSiteZipDeploymentARMResource` -- New field `ID` in struct `StaticSiteZipDeploymentARMResource` -- New field `Kind` in struct `RecommendationRule` -- New field `ID` in struct `RecommendationRule` -- New field `Name` in struct `RecommendationRule` -- New field `Type` in struct `RecommendationRule` -- New field `Name` in struct `BackupItem` -- New field `Type` in struct `BackupItem` -- New field `Kind` in struct `BackupItem` -- New field `ID` in struct `BackupItem` -- New field `ID` in struct `ProcessInfo` -- New field `Name` in struct `ProcessInfo` -- New field `Type` in struct `ProcessInfo` -- New field `Kind` in struct `ProcessInfo` -- New field `Name` in struct `SourceControl` -- New field `Type` in struct `SourceControl` -- New field `Kind` in struct `SourceControl` -- New field `ID` in struct `SourceControl` -- New field `Kind` in struct `StaticSiteFunctionOverviewARMResource` -- New field `ID` in struct `StaticSiteFunctionOverviewARMResource` -- New field `Name` in struct `StaticSiteFunctionOverviewARMResource` -- New field `Type` in struct `StaticSiteFunctionOverviewARMResource` -- New field `Name` in struct `Recommendation` -- New field `Type` in struct `Recommendation` -- New field `Kind` in struct `Recommendation` -- New field `ID` in struct `Recommendation` -- New field `Type` in struct `StaticSiteCustomDomainOverviewARMResource` -- New field `Kind` in struct `StaticSiteCustomDomainOverviewARMResource` -- New field `ID` in struct `StaticSiteCustomDomainOverviewARMResource` -- New field `Name` in struct `StaticSiteCustomDomainOverviewARMResource` -- New field `EnterpriseGradeCdnStatus` in struct `StaticSite` -- New field `Kind` in struct `DiagnosticAnalysis` -- New field `ID` in struct `DiagnosticAnalysis` -- New field `Name` in struct `DiagnosticAnalysis` -- New field `Type` in struct `DiagnosticAnalysis` -- New field `ID` in struct `StaticSiteUserInvitationRequestResource` -- New field `Name` in struct `StaticSiteUserInvitationRequestResource` -- New field `Type` in struct `StaticSiteUserInvitationRequestResource` -- New field `Kind` in struct `StaticSiteUserInvitationRequestResource` -- New field `Type` in struct `MigrateMySQLStatus` -- New field `Kind` in struct `MigrateMySQLStatus` -- New field `ID` in struct `MigrateMySQLStatus` -- New field `Name` in struct `MigrateMySQLStatus` -- New field `Name` in struct `VnetGateway` -- New field `Type` in struct `VnetGateway` -- New field `Kind` in struct `VnetGateway` -- New field `ID` in struct `VnetGateway` -- New field `Name` in struct `NetworkFeatures` -- New field `Type` in struct `NetworkFeatures` -- New field `Kind` in struct `NetworkFeatures` -- New field `ID` in struct `NetworkFeatures` -- New field `Type` in struct `CertificatePatchResource` -- New field `Kind` in struct `CertificatePatchResource` -- New field `ID` in struct `CertificatePatchResource` -- New field `Name` in struct `CertificatePatchResource` -- New field `Kind` in struct `Deployment` -- New field `ID` in struct `Deployment` -- New field `Name` in struct `Deployment` -- New field `Type` in struct `Deployment` -- New field `Type` in struct `BackupRequest` -- New field `Kind` in struct `BackupRequest` -- New field `ID` in struct `BackupRequest` -- New field `Name` in struct `BackupRequest` -- New field `ID` in struct `PremierAddOnPatchResource` -- New field `Name` in struct `PremierAddOnPatchResource` -- New field `Type` in struct `PremierAddOnPatchResource` -- New field `Kind` in struct `PremierAddOnPatchResource` -- New field `Kind` in struct `PrivateAccess` -- New field `ID` in struct `PrivateAccess` -- New field `Name` in struct `PrivateAccess` -- New field `Type` in struct `PrivateAccess` -- New field `Kind` in struct `DeletedSite` -- New field `ID` in struct `DeletedSite` -- New field `Name` in struct `DeletedSite` -- New field `Type` in struct `DeletedSite` -- New field `Kind` in struct `SnapshotRestoreRequest` -- New field `ID` in struct `SnapshotRestoreRequest` -- New field `Name` in struct `SnapshotRestoreRequest` -- New field `Type` in struct `SnapshotRestoreRequest` -- New field `Kind` in struct `WebAppStack` -- New field `ID` in struct `WebAppStack` -- New field `Name` in struct `WebAppStack` -- New field `Type` in struct `WebAppStack` -- New field `Kind` in struct `GeoRegion` -- New field `ID` in struct `GeoRegion` -- New field `Name` in struct `GeoRegion` -- New field `Type` in struct `GeoRegion` -- New field `Kind` in struct `SiteSourceControl` -- New field `ID` in struct `SiteSourceControl` -- New field `Name` in struct `SiteSourceControl` -- New field `Type` in struct `SiteSourceControl` -- New field `Kind` in struct `HybridConnection` -- New field `ID` in struct `HybridConnection` -- New field `Name` in struct `HybridConnection` -- New field `Type` in struct `HybridConnection` -- New field `Kind` in struct `ReissueCertificateOrderRequest` -- New field `ID` in struct `ReissueCertificateOrderRequest` -- New field `Name` in struct `ReissueCertificateOrderRequest` -- New field `Type` in struct `ReissueCertificateOrderRequest` -- New field `Kind` in struct `SlotDifference` -- New field `ID` in struct `SlotDifference` -- New field `Name` in struct `SlotDifference` -- New field `Type` in struct `SlotDifference` -- New field `Kind` in struct `VnetParameters` -- New field `ID` in struct `VnetParameters` -- New field `Name` in struct `VnetParameters` -- New field `Type` in struct `VnetParameters` -- New field `Type` in struct `AseV3NetworkingConfiguration` -- New field `Kind` in struct `AseV3NetworkingConfiguration` -- New field `ID` in struct `AseV3NetworkingConfiguration` -- New field `Name` in struct `AseV3NetworkingConfiguration` -- New field `ID` in struct `MigrateMySQLRequest` -- New field `Name` in struct `MigrateMySQLRequest` -- New field `Type` in struct `MigrateMySQLRequest` -- New field `Kind` in struct `MigrateMySQLRequest` -- New field `ID` in struct `SlotConfigNamesResource` -- New field `Name` in struct `SlotConfigNamesResource` -- New field `Type` in struct `SlotConfigNamesResource` -- New field `Kind` in struct `SlotConfigNamesResource` -- New field `Name` in struct `SiteAuthSettings` -- New field `Type` in struct `SiteAuthSettings` -- New field `Kind` in struct `SiteAuthSettings` -- New field `ID` in struct `SiteAuthSettings` -- New field `Kind` in struct `RemotePrivateEndpointConnectionARMResource` -- New field `ID` in struct `RemotePrivateEndpointConnectionARMResource` -- New field `Name` in struct `RemotePrivateEndpointConnectionARMResource` -- New field `Type` in struct `RemotePrivateEndpointConnectionARMResource` -- New field `ID` in struct `AzureStoragePropertyDictionaryResource` -- New field `Name` in struct `AzureStoragePropertyDictionaryResource` -- New field `Type` in struct `AzureStoragePropertyDictionaryResource` -- New field `Kind` in struct `AzureStoragePropertyDictionaryResource` -- New field `Type` in struct `VnetValidationFailureDetails` -- New field `Kind` in struct `VnetValidationFailureDetails` -- New field `ID` in struct `VnetValidationFailureDetails` -- New field `Name` in struct `VnetValidationFailureDetails` -- New field `ID` in struct `ProcessThreadInfo` -- New field `Name` in struct `ProcessThreadInfo` -- New field `Type` in struct `ProcessThreadInfo` -- New field `Kind` in struct `ProcessThreadInfo` -- New field `ID` in struct `MSDeploy` -- New field `Name` in struct `MSDeploy` -- New field `Type` in struct `MSDeploy` -- New field `Kind` in struct `MSDeploy` -- New field `ID` in struct `DiagnosticDetectorResponse` -- New field `Name` in struct `DiagnosticDetectorResponse` -- New field `Type` in struct `DiagnosticDetectorResponse` -- New field `Kind` in struct `DiagnosticDetectorResponse` -- New field `Name` in struct `HostNameBinding` -- New field `Type` in struct `HostNameBinding` -- New field `Kind` in struct `HostNameBinding` -- New field `ID` in struct `HostNameBinding` -- New field `Name` in struct `StaticSiteUserProvidedFunctionApp` -- New field `Type` in struct `StaticSiteUserProvidedFunctionApp` -- New field `Kind` in struct `StaticSiteUserProvidedFunctionApp` -- New field `ID` in struct `StaticSiteUserProvidedFunctionApp` -- New field `Type` in struct `CustomHostnameAnalysisResult` -- New field `Kind` in struct `CustomHostnameAnalysisResult` -- New field `ID` in struct `CustomHostnameAnalysisResult` -- New field `Name` in struct `CustomHostnameAnalysisResult` -- New field `Kind` in struct `PushSettings` -- New field `ID` in struct `PushSettings` -- New field `Name` in struct `PushSettings` -- New field `Type` in struct `PushSettings` -- New field `Kind` in struct `PremierAddOnOffer` -- New field `ID` in struct `PremierAddOnOffer` -- New field `Name` in struct `PremierAddOnOffer` -- New field `Type` in struct `PremierAddOnOffer` -- New field `ID` in struct `TriggeredWebJob` -- New field `Name` in struct `TriggeredWebJob` -- New field `Type` in struct `TriggeredWebJob` -- New field `Kind` in struct `TriggeredWebJob` -- New field `Name` in struct `User` -- New field `Type` in struct `User` -- New field `Kind` in struct `User` -- New field `ID` in struct `User` -- New field `Kind` in struct `StaticSiteCustomDomainRequestPropertiesARMResource` -- New field `ID` in struct `StaticSiteCustomDomainRequestPropertiesARMResource` -- New field `Name` in struct `StaticSiteCustomDomainRequestPropertiesARMResource` -- New field `Type` in struct `StaticSiteCustomDomainRequestPropertiesARMResource` -- New field `ID` in struct `DomainOwnershipIdentifier` -- New field `Name` in struct `DomainOwnershipIdentifier` -- New field `Type` in struct `DomainOwnershipIdentifier` -- New field `Kind` in struct `DomainOwnershipIdentifier` -- New field `Kind` in struct `Usage` -- New field `ID` in struct `Usage` -- New field `Name` in struct `Usage` -- New field `Type` in struct `Usage` -- New field `Name` in struct `ApplicationStackResource` -- New field `Type` in struct `ApplicationStackResource` -- New field `Kind` in struct `ApplicationStackResource` -- New field `ID` in struct `ApplicationStackResource` -- New field `Kind` in struct `AnalysisDefinition` -- New field `ID` in struct `AnalysisDefinition` -- New field `Name` in struct `AnalysisDefinition` -- New field `Type` in struct `AnalysisDefinition` -- New field `Type` in struct `HybridConnectionKey` -- New field `Kind` in struct `HybridConnectionKey` -- New field `ID` in struct `HybridConnectionKey` -- New field `Name` in struct `HybridConnectionKey` -- New field `ID` in struct `VnetValidationTestFailure` -- New field `Name` in struct `VnetValidationTestFailure` -- New field `Type` in struct `VnetValidationTestFailure` -- New field `Kind` in struct `VnetValidationTestFailure` -- New field `ID` in struct `Snapshot` -- New field `Name` in struct `Snapshot` -- New field `Type` in struct `Snapshot` -- New field `Kind` in struct `Snapshot` -- New field `ID` in struct `StaticSitesWorkflowPreview` -- New field `Name` in struct `StaticSitesWorkflowPreview` -- New field `Type` in struct `StaticSitesWorkflowPreview` -- New field `Kind` in struct `StaticSitesWorkflowPreview` -- New field `Type` in struct `Site` -- New field `Name` in struct `Site` -- New field `Location` in struct `Site` -- New field `Kind` in struct `Site` -- New field `Tags` in struct `Site` -- New field `ID` in struct `Site` -- New field `Type` in struct `ContinuousWebJob` -- New field `Kind` in struct `ContinuousWebJob` -- New field `ID` in struct `ContinuousWebJob` -- New field `Name` in struct `ContinuousWebJob` -- New field `Kind` in struct `DetectorResponse` -- New field `ID` in struct `DetectorResponse` -- New field `Name` in struct `DetectorResponse` -- New field `Type` in struct `DetectorResponse` -- New field `Type` in struct `Identifier` -- New field `Kind` in struct `Identifier` -- New field `ID` in struct `Identifier` -- New field `Name` in struct `Identifier` -- New field `Kind` in struct `SwiftVirtualNetwork` -- New field `ID` in struct `SwiftVirtualNetwork` -- New field `Name` in struct `SwiftVirtualNetwork` -- New field `Type` in struct `SwiftVirtualNetwork` -- New field `Kind` in struct `DeletedAppRestoreRequest` -- New field `ID` in struct `DeletedAppRestoreRequest` -- New field `Name` in struct `DeletedAppRestoreRequest` -- New field `Type` in struct `DeletedAppRestoreRequest` -- New field `Kind` in struct `BillingMeter` -- New field `ID` in struct `BillingMeter` -- New field `Name` in struct `BillingMeter` -- New field `Type` in struct `BillingMeter` -- New field `Name` in struct `WebJob` -- New field `Type` in struct `WebJob` -- New field `Kind` in struct `WebJob` -- New field `ID` in struct `WebJob` -- New field `Type` in struct `ResourceMetricDefinition` -- New field `Kind` in struct `ResourceMetricDefinition` -- New field `ID` in struct `ResourceMetricDefinition` -- New field `Name` in struct `ResourceMetricDefinition` -- New field `Type` in struct `StringList` -- New field `Kind` in struct `StringList` -- New field `ID` in struct `StringList` -- New field `Name` in struct `StringList` -- New field `Name` in struct `WorkerPoolResource` -- New field `Type` in struct `WorkerPoolResource` -- New field `Kind` in struct `WorkerPoolResource` -- New field `ID` in struct `WorkerPoolResource` -- New field `Tags` in struct `KubeEnvironment` -- New field `ID` in struct `KubeEnvironment` -- New field `Name` in struct `KubeEnvironment` -- New field `Type` in struct `KubeEnvironment` -- New field `Location` in struct `KubeEnvironment` -- New field `Kind` in struct `KubeEnvironment` -- New field `Type` in struct `FunctionEnvelope` -- New field `Kind` in struct `FunctionEnvelope` -- New field `ID` in struct `FunctionEnvelope` -- New field `Name` in struct `FunctionEnvelope` -- New field `ID` in struct `SiteConfigResource` -- New field `Name` in struct `SiteConfigResource` -- New field `Type` in struct `SiteConfigResource` -- New field `Kind` in struct `SiteConfigResource` -- New field `Kind` in struct `StringDictionary` -- New field `ID` in struct `StringDictionary` -- New field `Name` in struct `StringDictionary` -- New field `Type` in struct `StringDictionary` -- New field `Kind` in struct `RestoreRequest` -- New field `ID` in struct `RestoreRequest` -- New field `Name` in struct `RestoreRequest` -- New field `Type` in struct `RestoreRequest` -- New field `Name` in struct `SiteConfigurationSnapshotInfo` -- New field `Type` in struct `SiteConfigurationSnapshotInfo` -- New field `Kind` in struct `SiteConfigurationSnapshotInfo` -- New field `ID` in struct `SiteConfigurationSnapshotInfo` -- New field `ID` in struct `WebSiteInstanceStatus` -- New field `Name` in struct `WebSiteInstanceStatus` -- New field `Type` in struct `WebSiteInstanceStatus` -- New field `Kind` in struct `WebSiteInstanceStatus` -- New field `Kind` in struct `RenewCertificateOrderRequest` -- New field `ID` in struct `RenewCertificateOrderRequest` -- New field `Name` in struct `RenewCertificateOrderRequest` -- New field `Type` in struct `RenewCertificateOrderRequest` -- New field `ID` in struct `SiteAuthSettingsV2` -- New field `Name` in struct `SiteAuthSettingsV2` -- New field `Type` in struct `SiteAuthSettingsV2` -- New field `Kind` in struct `SiteAuthSettingsV2` -- New field `Type` in struct `CsmPublishingCredentialsPoliciesEntity` -- New field `Kind` in struct `CsmPublishingCredentialsPoliciesEntity` -- New field `ID` in struct `CsmPublishingCredentialsPoliciesEntity` -- New field `Name` in struct `CsmPublishingCredentialsPoliciesEntity` -- New field `Type` in struct `StaticSitesWorkflowPreviewRequest` -- New field `Kind` in struct `StaticSitesWorkflowPreviewRequest` -- New field `ID` in struct `StaticSitesWorkflowPreviewRequest` -- New field `Name` in struct `StaticSitesWorkflowPreviewRequest` -- New field `Kind` in struct `StorageMigrationResponse` -- New field `ID` in struct `StorageMigrationResponse` -- New field `Name` in struct `StorageMigrationResponse` -- New field `Type` in struct `StorageMigrationResponse` -- New field `ID` in struct `StaticSitePatchResource` -- New field `Name` in struct `StaticSitePatchResource` -- New field `Type` in struct `StaticSitePatchResource` -- New field `Kind` in struct `StaticSitePatchResource` -- New field `Kind` in struct `PublicCertificate` -- New field `ID` in struct `PublicCertificate` -- New field `Name` in struct `PublicCertificate` -- New field `Type` in struct `PublicCertificate` -- New field `Kind` in struct `SiteExtensionInfo` -- New field `ID` in struct `SiteExtensionInfo` -- New field `Name` in struct `SiteExtensionInfo` -- New field `Type` in struct `SiteExtensionInfo` -- New field `Kind` in struct `APIKVReference` -- New field `ID` in struct `APIKVReference` -- New field `Name` in struct `APIKVReference` -- New field `Type` in struct `APIKVReference` -- New field `ID` in struct `StaticSiteARMResource` -- New field `Name` in struct `StaticSiteARMResource` -- New field `Type` in struct `StaticSiteARMResource` -- New field `Tags` in struct `StaticSiteARMResource` -- New field `Location` in struct `StaticSiteARMResource` -- New field `Kind` in struct `StaticSiteARMResource` -- New field `Kind` in struct `ConnectionStringDictionary` -- New field `ID` in struct `ConnectionStringDictionary` -- New field `Name` in struct `ConnectionStringDictionary` -- New field `Type` in struct `ConnectionStringDictionary` -- New field `Type` in struct `RemotePrivateEndpointConnection` -- New field `Kind` in struct `RemotePrivateEndpointConnection` -- New field `ID` in struct `RemotePrivateEndpointConnection` -- New field `Name` in struct `RemotePrivateEndpointConnection` -- New field `Kind` in struct `FunctionAppStack` -- New field `ID` in struct `FunctionAppStack` -- New field `Name` in struct `FunctionAppStack` -- New field `Type` in struct `FunctionAppStack` -- New field `Type` in struct `MSDeployStatus` -- New field `Kind` in struct `MSDeployStatus` -- New field `ID` in struct `MSDeployStatus` -- New field `Name` in struct `MSDeployStatus` -- New field `Name` in struct `StaticSiteUserARMResource` -- New field `Type` in struct `StaticSiteUserARMResource` -- New field `Kind` in struct `StaticSiteUserARMResource` -- New field `ID` in struct `StaticSiteUserARMResource` -- New field `ContainerAppsConfiguration` in struct `KubeEnvironmentProperties` -- New field `EnvironmentType` in struct `KubeEnvironmentProperties` -- New field `Kind` in struct `VnetInfoResource` -- New field `ID` in struct `VnetInfoResource` -- New field `Name` in struct `VnetInfoResource` -- New field `Type` in struct `VnetInfoResource` -- New field `ID` in struct `DomainPatchResource` -- New field `Name` in struct `DomainPatchResource` -- New field `Type` in struct `DomainPatchResource` -- New field `Kind` in struct `DomainPatchResource` -- New field `Kind` in struct `SitePatchResource` -- New field `ID` in struct `SitePatchResource` -- New field `Name` in struct `SitePatchResource` -- New field `Type` in struct `SitePatchResource` -- New field `ID` in struct `ProcessModuleInfo` -- New field `Name` in struct `ProcessModuleInfo` -- New field `Type` in struct `ProcessModuleInfo` -- New field `Kind` in struct `ProcessModuleInfo` -- New field `Kind` in struct `CertificateEmail` -- New field `ID` in struct `CertificateEmail` -- New field `Name` in struct `CertificateEmail` -- New field `Type` in struct `CertificateEmail` - - -## 0.1.0 (2021-12-24) - -- Init release. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/README.md deleted file mode 100644 index 52a21773..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# Azure App Service Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/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) - -The `armappservice` module provides operations for working with Azure App Service. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/appservice/armappservice) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure App Service module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure App Service. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure App Service modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armappservice.NewWebAppsClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armappservice.NewWebAppsClient(, cred, &options) -``` - -## More sample code - -- [Static Site](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/appservice/staticsite) -- [App Service Plan](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/appservice/web_plans) -- [Web Site](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/appservice/webapp) - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `App Service` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/autorest.md deleted file mode 100644 index 31cf4369..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/autorest.md +++ /dev/null @@ -1,13 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/web/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/web/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 - -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/build.go deleted file mode 100644 index e5cb612e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/appservice/armappservice - -package armappservice diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/ci.yml deleted file mode 100644 index 6240173f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/appservice/armappservice/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/appservice/armappservice/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/appservice/armappservice' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/CHANGELOG.md new file mode 100644 index 00000000..3086c7ad --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/CHANGELOG.md @@ -0,0 +1,643 @@ +# Release History + +## 4.1.0 (2024-11-20) +### Features Added + +- New value `SiteLoadBalancingLeastRequestsWithTieBreaker` added to enum type `SiteLoadBalancing` +- New enum type `AutoGeneratedDomainNameLabelScope` with values `AutoGeneratedDomainNameLabelScopeNoReuse`, `AutoGeneratedDomainNameLabelScopeResourceGroupReuse`, `AutoGeneratedDomainNameLabelScopeSubscriptionReuse`, `AutoGeneratedDomainNameLabelScopeTenantReuse` +- New enum type `IPMode` with values `IPModeIPv4`, `IPModeIPv4AndIPv6`, `IPModeIPv6` +- New function `*WebAppsClient.UpdateMachineKey(context.Context, string, string, *WebAppsClientUpdateMachineKeyOptions) (WebAppsClientUpdateMachineKeyResponse, error)` +- New struct `CipherSuites` +- New field `AutoGeneratedDomainNameLabelScope`, `EndToEndEncryptionEnabled`, `IPMode`, `SKU` in struct `SiteProperties` +- New field `PhysicalZone` in struct `WebSiteInstanceStatusProperties` + + +## 4.0.0 (2024-08-08) +### Breaking Changes + +- Type of `FunctionsAlwaysReadyConfig.InstanceCount` has been changed from `*float32` to `*int32` +- Type of `FunctionsScaleAndConcurrency.InstanceMemoryMB` has been changed from `*float32` to `*int32` +- Type of `FunctionsScaleAndConcurrency.MaximumInstanceCount` has been changed from `*float32` to `*int32` +- Type of `FunctionsScaleAndConcurrencyTriggersHTTP.PerInstanceConcurrency` has been changed from `*float32` to `*int32` + + +## 3.0.0 (2024-06-21) +### Breaking Changes + +- Function `*EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, RemotePrivateEndpointConnectionARMResource, *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` +- Function `*StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, RemotePrivateEndpointConnectionARMResource, *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` +- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection` parameter(s) have been changed from `(context.Context, string, string, string, PrivateLinkConnectionApprovalRequestResource, *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` to `(context.Context, string, string, string, RemotePrivateEndpointConnectionARMResource, *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions)` +- Function `*WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot` parameter(s) have been changed from `(context.Context, string, string, string, string, PrivateLinkConnectionApprovalRequestResource, *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions)` to `(context.Context, string, string, string, string, RemotePrivateEndpointConnectionARMResource, *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions)` + +### Features Added + +- New value `SKUNameFlexConsumption` added to enum type `SKUName` +- New value `SupportedTLSVersionsOne3` added to enum type `SupportedTLSVersions` +- New enum type `AuthType` with values `AuthTypeAnonymous`, `AuthTypeSystemIdentity`, `AuthTypeUserAssigned`, `AuthTypeUserCredentials` +- New enum type `AuthenticationType` with values `AuthenticationTypeStorageAccountConnectionString`, `AuthenticationTypeSystemAssignedIdentity`, `AuthenticationTypeUserAssignedIdentity` +- New enum type `AzureStorageProtocol` with values `AzureStorageProtocolHTTP`, `AzureStorageProtocolNfs`, `AzureStorageProtocolSmb` +- New enum type `FunctionsDeploymentStorageType` with values `FunctionsDeploymentStorageTypeBlobContainer` +- New enum type `RuntimeName` with values `RuntimeNameCustom`, `RuntimeNameDotnetIsolated`, `RuntimeNameJava`, `RuntimeNameNode`, `RuntimeNamePowershell`, `RuntimeNamePython` +- New function `*WebAppsClient.CreateOrUpdateSiteContainer(context.Context, string, string, string, SiteContainer, *WebAppsClientCreateOrUpdateSiteContainerOptions) (WebAppsClientCreateOrUpdateSiteContainerResponse, error)` +- New function `*WebAppsClient.CreateOrUpdateSiteContainerSlot(context.Context, string, string, string, string, SiteContainer, *WebAppsClientCreateOrUpdateSiteContainerSlotOptions) (WebAppsClientCreateOrUpdateSiteContainerSlotResponse, error)` +- New function `*WebAppsClient.DeleteSiteContainer(context.Context, string, string, string, *WebAppsClientDeleteSiteContainerOptions) (WebAppsClientDeleteSiteContainerResponse, error)` +- New function `*WebAppsClient.DeleteSiteContainerSlot(context.Context, string, string, string, string, *WebAppsClientDeleteSiteContainerSlotOptions) (WebAppsClientDeleteSiteContainerSlotResponse, error)` +- New function `*WebAppsClient.GetSiteContainer(context.Context, string, string, string, *WebAppsClientGetSiteContainerOptions) (WebAppsClientGetSiteContainerResponse, error)` +- New function `*WebAppsClient.GetSiteContainerSlot(context.Context, string, string, string, string, *WebAppsClientGetSiteContainerSlotOptions) (WebAppsClientGetSiteContainerSlotResponse, error)` +- New function `*WebAppsClient.NewListSiteContainersPager(string, string, *WebAppsClientListSiteContainersOptions) *runtime.Pager[WebAppsClientListSiteContainersResponse]` +- New function `*WebAppsClient.NewListSiteContainersSlotPager(string, string, string, *WebAppsClientListSiteContainersSlotOptions) *runtime.Pager[WebAppsClientListSiteContainersSlotResponse]` +- New struct `EnvironmentVariable` +- New struct `FunctionAppConfig` +- New struct `FunctionsAlwaysReadyConfig` +- New struct `FunctionsDeployment` +- New struct `FunctionsDeploymentStorage` +- New struct `FunctionsDeploymentStorageAuthentication` +- New struct `FunctionsRuntime` +- New struct `FunctionsScaleAndConcurrency` +- New struct `FunctionsScaleAndConcurrencyTriggers` +- New struct `FunctionsScaleAndConcurrencyTriggersHTTP` +- New struct `SiteContainer` +- New struct `SiteContainerCollection` +- New struct `SiteContainerProperties` +- New struct `SiteDNSConfig` +- New struct `VolumeMount` +- New field `Protocol` in struct `AzureStorageInfoValue` +- New field `DNSConfiguration` in struct `SitePatchResourceProperties` +- New field `DNSConfiguration`, `FunctionAppConfig`, `VnetBackupRestoreEnabled` in struct `SiteProperties` + + +## 2.3.0 (2023-11-30) +### Features Added + +- New enum type `DaprLogLevel` with values `DaprLogLevelDebug`, `DaprLogLevelError`, `DaprLogLevelInfo`, `DaprLogLevelWarn` +- New enum type `TLSCipherSuites` with values `TLSCipherSuitesTLSAES128GCMSHA256`, `TLSCipherSuitesTLSAES256GCMSHA384`, `TLSCipherSuitesTLSECDHEECDSAWITHAES128CBCSHA256`, `TLSCipherSuitesTLSECDHEECDSAWITHAES128GCMSHA256`, `TLSCipherSuitesTLSECDHEECDSAWITHAES256GCMSHA384`, `TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA`, `TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA256`, `TLSCipherSuitesTLSECDHERSAWITHAES128GCMSHA256`, `TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA`, `TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA384`, `TLSCipherSuitesTLSECDHERSAWITHAES256GCMSHA384`, `TLSCipherSuitesTLSRSAWITHAES128CBCSHA`, `TLSCipherSuitesTLSRSAWITHAES128CBCSHA256`, `TLSCipherSuitesTLSRSAWITHAES128GCMSHA256`, `TLSCipherSuitesTLSRSAWITHAES256CBCSHA`, `TLSCipherSuitesTLSRSAWITHAES256CBCSHA256`, `TLSCipherSuitesTLSRSAWITHAES256GCMSHA384` +- New function `*ClientFactory.NewGetUsagesInLocationClient() *GetUsagesInLocationClient` +- New function `NewGetUsagesInLocationClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GetUsagesInLocationClient, error)` +- New function `*GetUsagesInLocationClient.NewListPager(string, *GetUsagesInLocationClientListOptions) *runtime.Pager[GetUsagesInLocationClientListResponse]` +- New function `*WebSiteManagementClient.NewListAseRegionsPager(*WebSiteManagementClientListAseRegionsOptions) *runtime.Pager[WebSiteManagementClientListAseRegionsResponse]` +- New struct `AseRegion` +- New struct `AseRegionCollection` +- New struct `AseRegionProperties` +- New struct `DaprConfig` +- New struct `ResourceConfig` +- New field `EnvironmentID` in struct `ResourceNameAvailabilityRequest` +- New field `MinTLSCipherSuite` in struct `SiteConfig` +- New field `DaprConfig`, `ResourceConfig`, `WorkloadProfileName` in struct `SiteProperties` + + +## 2.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.1.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + +## 2.1.0 (2023-03-24) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module +- New enum type `BasicAuthName` with values `BasicAuthNameDefault` +- New enum type `DefaultAction` with values `DefaultActionAllow`, `DefaultActionDeny` +- New enum type `WorkflowHealthState` with values `WorkflowHealthStateHealthy`, `WorkflowHealthStateNotSpecified`, `WorkflowHealthStateUnhealthy`, `WorkflowHealthStateUnknown` +- New function `*StaticSitesClient.CreateOrUpdateBasicAuth(context.Context, string, string, BasicAuthName, StaticSiteBasicAuthPropertiesARMResource, *StaticSitesClientCreateOrUpdateBasicAuthOptions) (StaticSitesClientCreateOrUpdateBasicAuthResponse, error)` +- New function `*StaticSitesClient.CreateOrUpdateBuildDatabaseConnection(context.Context, string, string, string, string, DatabaseConnection, *StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions) (StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse, error)` +- New function `*StaticSitesClient.CreateOrUpdateDatabaseConnection(context.Context, string, string, string, DatabaseConnection, *StaticSitesClientCreateOrUpdateDatabaseConnectionOptions) (StaticSitesClientCreateOrUpdateDatabaseConnectionResponse, error)` +- New function `*StaticSitesClient.DeleteBuildDatabaseConnection(context.Context, string, string, string, string, *StaticSitesClientDeleteBuildDatabaseConnectionOptions) (StaticSitesClientDeleteBuildDatabaseConnectionResponse, error)` +- New function `*StaticSitesClient.DeleteDatabaseConnection(context.Context, string, string, string, *StaticSitesClientDeleteDatabaseConnectionOptions) (StaticSitesClientDeleteDatabaseConnectionResponse, error)` +- New function `*StaticSitesClient.GetBasicAuth(context.Context, string, string, BasicAuthName, *StaticSitesClientGetBasicAuthOptions) (StaticSitesClientGetBasicAuthResponse, error)` +- New function `*StaticSitesClient.GetBuildDatabaseConnection(context.Context, string, string, string, string, *StaticSitesClientGetBuildDatabaseConnectionOptions) (StaticSitesClientGetBuildDatabaseConnectionResponse, error)` +- New function `*StaticSitesClient.GetBuildDatabaseConnectionWithDetails(context.Context, string, string, string, string, *StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions) (StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse, error)` +- New function `*StaticSitesClient.NewGetBuildDatabaseConnectionsPager(string, string, string, *StaticSitesClientGetBuildDatabaseConnectionsOptions) *runtime.Pager[StaticSitesClientGetBuildDatabaseConnectionsResponse]` +- New function `*StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager(string, string, string, *StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions) *runtime.Pager[StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse]` +- New function `*StaticSitesClient.GetDatabaseConnection(context.Context, string, string, string, *StaticSitesClientGetDatabaseConnectionOptions) (StaticSitesClientGetDatabaseConnectionResponse, error)` +- New function `*StaticSitesClient.GetDatabaseConnectionWithDetails(context.Context, string, string, string, *StaticSitesClientGetDatabaseConnectionWithDetailsOptions) (StaticSitesClientGetDatabaseConnectionWithDetailsResponse, error)` +- New function `*StaticSitesClient.NewGetDatabaseConnectionsPager(string, string, *StaticSitesClientGetDatabaseConnectionsOptions) *runtime.Pager[StaticSitesClientGetDatabaseConnectionsResponse]` +- New function `*StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager(string, string, *StaticSitesClientGetDatabaseConnectionsWithDetailsOptions) *runtime.Pager[StaticSitesClientGetDatabaseConnectionsWithDetailsResponse]` +- New function `*StaticSitesClient.NewListBasicAuthPager(string, string, *StaticSitesClientListBasicAuthOptions) *runtime.Pager[StaticSitesClientListBasicAuthResponse]` +- New function `*StaticSitesClient.UpdateBuildDatabaseConnection(context.Context, string, string, string, string, DatabaseConnectionPatchRequest, *StaticSitesClientUpdateBuildDatabaseConnectionOptions) (StaticSitesClientUpdateBuildDatabaseConnectionResponse, error)` +- New function `*StaticSitesClient.UpdateDatabaseConnection(context.Context, string, string, string, DatabaseConnectionPatchRequest, *StaticSitesClientUpdateDatabaseConnectionOptions) (StaticSitesClientUpdateDatabaseConnectionResponse, error)` +- New function `*WebAppsClient.DeployWorkflowArtifacts(context.Context, string, string, *WebAppsClientDeployWorkflowArtifactsOptions) (WebAppsClientDeployWorkflowArtifactsResponse, error)` +- New function `*WebAppsClient.DeployWorkflowArtifactsSlot(context.Context, string, string, string, *WebAppsClientDeployWorkflowArtifactsSlotOptions) (WebAppsClientDeployWorkflowArtifactsSlotResponse, error)` +- New function `*WebAppsClient.GetInstanceWorkflowSlot(context.Context, string, string, string, string, *WebAppsClientGetInstanceWorkflowSlotOptions) (WebAppsClientGetInstanceWorkflowSlotResponse, error)` +- New function `*WebAppsClient.GetWorkflow(context.Context, string, string, string, *WebAppsClientGetWorkflowOptions) (WebAppsClientGetWorkflowResponse, error)` +- New function `*WebAppsClient.NewListInstanceWorkflowsSlotPager(string, string, string, *WebAppsClientListInstanceWorkflowsSlotOptions) *runtime.Pager[WebAppsClientListInstanceWorkflowsSlotResponse]` +- New function `*WebAppsClient.ListWorkflowsConnections(context.Context, string, string, *WebAppsClientListWorkflowsConnectionsOptions) (WebAppsClientListWorkflowsConnectionsResponse, error)` +- New function `*WebAppsClient.ListWorkflowsConnectionsSlot(context.Context, string, string, string, *WebAppsClientListWorkflowsConnectionsSlotOptions) (WebAppsClientListWorkflowsConnectionsSlotResponse, error)` +- New function `*WebAppsClient.NewListWorkflowsPager(string, string, *WebAppsClientListWorkflowsOptions) *runtime.Pager[WebAppsClientListWorkflowsResponse]` +- New struct `DatabaseConnection` +- New struct `DatabaseConnectionCollection` +- New struct `DatabaseConnectionOverview` +- New struct `DatabaseConnectionPatchRequest` +- New struct `DatabaseConnectionPatchRequestProperties` +- New struct `DatabaseConnectionProperties` +- New struct `StaticSiteBasicAuthPropertiesARMResource` +- New struct `StaticSiteBasicAuthPropertiesARMResourceProperties` +- New struct `StaticSiteBasicAuthPropertiesCollection` +- New struct `StaticSiteDatabaseConnectionConfigurationFileOverview` +- New struct `WorkflowArtifacts` +- New struct `WorkflowEnvelope` +- New struct `WorkflowEnvelopeCollection` +- New struct `WorkflowEnvelopeProperties` +- New struct `WorkflowHealth` +- New field `ElasticWebAppScaleLimit` in struct `SiteConfig` +- New field `IPSecurityRestrictionsDefaultAction` in struct `SiteConfig` +- New field `Metadata` in struct `SiteConfig` +- New field `ScmIPSecurityRestrictionsDefaultAction` in struct `SiteConfig` +- New field `ManagedEnvironmentID` in struct `SiteProperties` +- New field `DatabaseConnections` in struct `StaticSite` +- New field `DatabaseConnections` in struct `StaticSiteBuildARMResourceProperties` + + +## 2.0.0 (2022-07-12) +### Breaking Changes + +- Type of `DomainProperties.DomainNotRenewableReasons` has been changed from `[]*DomainPropertiesDomainNotRenewableReasonsItem` to `[]*ResourceNotRenewableReason` +- Type of `ProviderClientGetWebAppStacksOptions.StackOsType` has been changed from `*Enum19` to `*ProviderStackOsType` +- Type of `CertificateOrderProperties.AppServiceCertificateNotRenewableReasons` has been changed from `[]*AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem` to `[]*ResourceNotRenewableReason` +- Type of `ProviderClientGetFunctionAppStacksOptions.StackOsType` has been changed from `*Enum16` to `*ProviderStackOsType` +- Type of `ProviderClientGetAvailableStacksOptions.OSTypeSelected` has been changed from `*Enum15` to `*ProviderOsTypeSelected` +- Type of `ProviderClientGetWebAppStacksForLocationOptions.StackOsType` has been changed from `*Enum18` to `*ProviderStackOsType` +- Type of `ProviderClientGetFunctionAppStacksForLocationOptions.StackOsType` has been changed from `*Enum17` to `*ProviderStackOsType` +- Type of `CertificateOrderPatchResourceProperties.AppServiceCertificateNotRenewableReasons` has been changed from `[]*AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem` to `[]*ResourceNotRenewableReason` +- Type of `ProviderClientGetAvailableStacksOnPremOptions.OSTypeSelected` has been changed from `*Enum20` to `*ProviderOsTypeSelected` +- Type of `DomainPatchResourceProperties.DomainNotRenewableReasons` has been changed from `[]*DomainPatchResourcePropertiesDomainNotRenewableReasonsItem` to `[]*ResourceNotRenewableReason` +- Const `Enum17All` has been removed +- Const `Enum16Windows` has been removed +- Const `DomainPropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal` has been removed +- Const `Enum20LinuxFunctions` has been removed +- Const `Enum20All` has been removed +- Const `Enum15WindowsFunctions` has been removed +- Const `Enum19Windows` has been removed +- Const `DomainPropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange` has been removed +- Const `DomainPropertiesDomainNotRenewableReasonsItemSubscriptionNotActive` has been removed +- Const `AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange` has been removed +- Const `AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange` has been removed +- Const `DomainPatchResourcePropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal` has been removed +- Const `Enum15Linux` has been removed +- Const `DomainPatchResourcePropertiesDomainNotRenewableReasonsItemSubscriptionNotActive` has been removed +- Const `Enum20Linux` has been removed +- Const `Enum16Linux` has been removed +- Const `Enum15All` has been removed +- Const `Enum18Windows` has been removed +- Const `Enum19Linux` has been removed +- Const `AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive` has been removed +- Const `AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal` has been removed +- Const `Enum20WindowsFunctions` has been removed +- Const `Enum17Windows` has been removed +- Const `Enum17Linux` has been removed +- Const `DomainPatchResourcePropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange` has been removed +- Const `Enum16All` has been removed +- Const `AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive` has been removed +- Const `Enum18Linux` has been removed +- Const `Enum19All` has been removed +- Const `Enum15Windows` has been removed +- Const `Enum18All` has been removed +- Const `Enum20Windows` has been removed +- Const `Enum15LinuxFunctions` has been removed +- Const `AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal` has been removed +- Function `PossibleEnum19Values` has been removed +- Function `PossibleEnum16Values` has been removed +- Function `PossibleAppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemValues` has been removed +- Function `PossibleEnum20Values` has been removed +- Function `PossibleDomainPatchResourcePropertiesDomainNotRenewableReasonsItemValues` has been removed +- Function `PossibleEnum15Values` has been removed +- Function `PossibleEnum18Values` has been removed +- Function `PossibleAppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemValues` has been removed +- Function `PossibleEnum17Values` has been removed +- Function `PossibleDomainPropertiesDomainNotRenewableReasonsItemValues` has been removed +- Struct `CertificateEmailProperties` has been removed +- Struct `CertificateOrderActionProperties` has been removed +- Field `Properties` of struct `CertificateEmail` has been removed +- Field `ID` of struct `CertificateEmail` has been removed +- Field `Name` of struct `CertificateEmail` has been removed +- Field `Type` of struct `CertificateEmail` has been removed +- Field `Kind` of struct `CertificateEmail` has been removed +- Field `ID` of struct `CertificateOrderAction` has been removed +- Field `Name` of struct `CertificateOrderAction` has been removed +- Field `Type` of struct `CertificateOrderAction` has been removed +- Field `Kind` of struct `CertificateOrderAction` has been removed +- Field `Properties` of struct `CertificateOrderAction` has been removed + +### Features Added + +- New const `WorkflowProvisioningStateUnregistering` +- New const `WorkflowProvisioningStateCreating` +- New const `WorkflowProvisioningStateDeleted` +- New const `CustomDNSSuffixProvisioningStateFailed` +- New const `WorkflowTriggerProvisioningStateFailed` +- New const `WorkflowStateNotSpecified` +- New const `KeyTypeNotSpecified` +- New const `WorkflowTriggerProvisioningStateSucceeded` +- New const `WorkflowStatusNotSpecified` +- New const `DayOfWeekSaturday` +- New const `RecurrenceFrequencyWeek` +- New const `UpgradePreferenceManual` +- New const `WorkflowProvisioningStateRegistered` +- New const `WorkflowProvisioningStateWaiting` +- New const `ParameterTypeString` +- New const `WorkflowProvisioningStateInProgress` +- New const `RecurrenceFrequencyNotSpecified` +- New const `DeploymentBuildStatusRuntimeFailed` +- New const `WorkflowStatusIgnored` +- New const `WorkflowStatusRunning` +- New const `WorkflowStatusAborted` +- New const `ProviderStackOsTypeLinux` +- New const `WorkflowProvisioningStateCreated` +- New const `WorkflowStatusSkipped` +- New const `UpgradeAvailabilityNone` +- New const `DayOfWeekWednesday` +- New const `DeploymentBuildStatusBuildRequestReceived` +- New const `WorkflowProvisioningStateMoving` +- New const `DayOfWeekFriday` +- New const `WorkflowStatusTimedOut` +- New const `DayOfWeekThursday` +- New const `ParameterTypeArray` +- New const `DeploymentBuildStatusStartPolling` +- New const `ProviderOsTypeSelectedWindowsFunctions` +- New const `ResourceNotRenewableReasonRegistrationStatusNotSupportedForRenewal` +- New const `UpgradeAvailabilityReady` +- New const `UpgradePreferenceLate` +- New const `WorkflowSKUNameShared` +- New const `WorkflowTriggerProvisioningStateUnregistering` +- New const `WorkflowTriggerProvisioningStateCanceled` +- New const `ParameterTypeSecureObject` +- New const `WorkflowStatusSucceeded` +- New const `WorkflowSKUNamePremium` +- New const `WorkflowTriggerProvisioningStateDeleting` +- New const `CustomDNSSuffixProvisioningStateDegraded` +- New const `ParameterTypeSecureString` +- New const `WorkflowProvisioningStateNotSpecified` +- New const `WorkflowStatusSuspended` +- New const `ResourceNotRenewableReasonExpirationNotInRenewalTimeRange` +- New const `UpgradePreferenceNone` +- New const `ProviderStackOsTypeAll` +- New const `RecurrenceFrequencyMinute` +- New const `WorkflowProvisioningStateUnregistered` +- New const `WorkflowTriggerProvisioningStateRunning` +- New const `WorkflowStatusPaused` +- New const `DayOfWeekMonday` +- New const `WorkflowProvisioningStateDeleting` +- New const `DeploymentBuildStatusBuildAborted` +- New const `WorkflowStateEnabled` +- New const `KeyTypePrimary` +- New const `CustomDomainStatusUnhealthy` +- New const `DeploymentBuildStatusBuildInProgress` +- New const `OpenAuthenticationProviderTypeAAD` +- New const `WorkflowStatusFaulted` +- New const `WorkflowTriggerProvisioningStateDeleted` +- New const `WorkflowProvisioningStateAccepted` +- New const `WorkflowTriggerProvisioningStateUpdating` +- New const `ParameterTypeNotSpecified` +- New const `WorkflowSKUNameFree` +- New const `WorkflowProvisioningStateCompleted` +- New const `WorkflowTriggerProvisioningStateCreating` +- New const `UpgradePreferenceEarly` +- New const `WorkflowStatusWaiting` +- New const `ParameterTypeInt` +- New const `ParameterTypeBool` +- New const `DaysOfWeekFriday` +- New const `WorkflowTriggerProvisioningStateMoving` +- New const `ProviderOsTypeSelectedWindows` +- New const `WorkflowTriggerProvisioningStateAccepted` +- New const `WorkflowStateCompleted` +- New const `DeploymentBuildStatusRuntimeStarting` +- New const `WorkflowProvisioningStatePending` +- New const `WorkflowProvisioningStateRenewing` +- New const `WorkflowTriggerProvisioningStateRegistered` +- New const `ProviderOsTypeSelectedAll` +- New const `DaysOfWeekTuesday` +- New const `WorkflowTriggerProvisioningStateCreated` +- New const `KeyTypeSecondary` +- New const `DaysOfWeekWednesday` +- New const `ParameterTypeFloat` +- New const `WorkflowProvisioningStateRunning` +- New const `WorkflowStatusFailed` +- New const `WorkflowTriggerProvisioningStateNotSpecified` +- New const `DeploymentBuildStatusBuildPending` +- New const `DeploymentBuildStatusStartPollingWithRestart` +- New const `WorkflowSKUNameNotSpecified` +- New const `DeploymentBuildStatusBuildFailed` +- New const `DaysOfWeekThursday` +- New const `KindStateless` +- New const `DeploymentBuildStatusBuildSuccessful` +- New const `WorkflowTriggerProvisioningStateCompleted` +- New const `DaysOfWeekSunday` +- New const `RecurrenceFrequencyMonth` +- New const `WorkflowTriggerProvisioningStateReady` +- New const `ResourceNotRenewableReasonSubscriptionNotActive` +- New const `WorkflowStatusCancelled` +- New const `WorkflowTriggerProvisioningStateUnregistered` +- New const `ProviderOsTypeSelectedLinux` +- New const `WorkflowProvisioningStateUpdating` +- New const `DayOfWeekTuesday` +- New const `WorkflowProvisioningStateSucceeded` +- New const `WorkflowTriggerProvisioningStateRegistering` +- New const `ParameterTypeObject` +- New const `CustomDNSSuffixProvisioningStateInProgress` +- New const `DeploymentBuildStatusRuntimeSuccessful` +- New const `WorkflowProvisioningStateReady` +- New const `WorkflowProvisioningStateFailed` +- New const `WorkflowProvisioningStateCanceled` +- New const `WorkflowSKUNameStandard` +- New const `RecurrenceFrequencyYear` +- New const `WorkflowStateDeleted` +- New const `ProviderOsTypeSelectedLinuxFunctions` +- New const `WorkflowStateDisabled` +- New const `WorkflowSKUNameBasic` +- New const `RecurrenceFrequencyHour` +- New const `DaysOfWeekMonday` +- New const `RecurrenceFrequencyDay` +- New const `WorkflowProvisioningStateRegistering` +- New const `KindStateful` +- New const `DaysOfWeekSaturday` +- New const `ProviderStackOsTypeWindows` +- New const `WorkflowStateSuspended` +- New const `RecurrenceFrequencySecond` +- New const `CustomDNSSuffixProvisioningStateSucceeded` +- New const `DayOfWeekSunday` +- New const `DeploymentBuildStatusTimedOut` +- New const `DeploymentBuildStatusPostBuildRestartRequired` +- New function `*StaticSitesClient.NewGetLinkedBackendsPager(string, string, *StaticSitesClientGetLinkedBackendsOptions) *runtime.Pager[StaticSitesClientGetLinkedBackendsResponse]` +- New function `*StaticSitesClient.BeginLinkBackendToBuild(context.Context, string, string, string, string, StaticSiteLinkedBackendARMResource, *StaticSitesClientBeginLinkBackendToBuildOptions) (*runtime.Poller[StaticSitesClientLinkBackendToBuildResponse], error)` +- New function `PossibleResourceNotRenewableReasonValues() []ResourceNotRenewableReason` +- New function `*WorkflowsClient.RegenerateAccessKey(context.Context, string, string, string, RegenerateActionParameter, *WorkflowsClientRegenerateAccessKeyOptions) (WorkflowsClientRegenerateAccessKeyResponse, error)` +- New function `PossibleRecurrenceFrequencyValues() []RecurrenceFrequency` +- New function `*WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager(string, string, string, string, string, string, *WorkflowRunActionRepetitionsRequestHistoriesClientListOptions) *runtime.Pager[WorkflowRunActionRepetitionsRequestHistoriesClientListResponse]` +- New function `NewWorkflowRunActionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowRunActionsClient, error)` +- New function `PossibleKindValues() []Kind` +- New function `*EnvironmentsClient.BeginUpgrade(context.Context, string, string, *EnvironmentsClientBeginUpgradeOptions) (*runtime.Poller[EnvironmentsClientUpgradeResponse], error)` +- New function `NewWorkflowVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowVersionsClient, error)` +- New function `*WorkflowRunActionScopeRepetitionsClient.Get(context.Context, string, string, string, string, string, string, *WorkflowRunActionScopeRepetitionsClientGetOptions) (WorkflowRunActionScopeRepetitionsClientGetResponse, error)` +- New function `*WorkflowTriggerHistoriesClient.NewListPager(string, string, string, string, *WorkflowTriggerHistoriesClientListOptions) *runtime.Pager[WorkflowTriggerHistoriesClientListResponse]` +- New function `*WorkflowRunsClient.NewListPager(string, string, string, *WorkflowRunsClientListOptions) *runtime.Pager[WorkflowRunsClientListResponse]` +- New function `NewWorkflowsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowsClient, error)` +- New function `*WorkflowRunActionsClient.NewListExpressionTracesPager(string, string, string, string, string, *WorkflowRunActionsClientListExpressionTracesOptions) *runtime.Pager[WorkflowRunActionsClientListExpressionTracesResponse]` +- New function `*StaticSitesClient.GetLinkedBackendForBuild(context.Context, string, string, string, string, *StaticSitesClientGetLinkedBackendForBuildOptions) (StaticSitesClientGetLinkedBackendForBuildResponse, error)` +- New function `*StaticSitesClient.GetLinkedBackend(context.Context, string, string, string, *StaticSitesClientGetLinkedBackendOptions) (StaticSitesClientGetLinkedBackendResponse, error)` +- New function `*StaticSitesClient.BeginValidateBackendForBuild(context.Context, string, string, string, string, StaticSiteLinkedBackendARMResource, *StaticSitesClientBeginValidateBackendForBuildOptions) (*runtime.Poller[StaticSitesClientValidateBackendForBuildResponse], error)` +- New function `*WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot(context.Context, string, string, string, string, *WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (*runtime.Poller[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse], error)` +- New function `*StaticSitesClient.BeginLinkBackend(context.Context, string, string, string, StaticSiteLinkedBackendARMResource, *StaticSitesClientBeginLinkBackendOptions) (*runtime.Poller[StaticSitesClientLinkBackendResponse], error)` +- New function `NewWorkflowRunsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowRunsClient, error)` +- New function `*EnvironmentsClient.TestUpgradeAvailableNotification(context.Context, string, string, *EnvironmentsClientTestUpgradeAvailableNotificationOptions) (EnvironmentsClientTestUpgradeAvailableNotificationResponse, error)` +- New function `*WorkflowRunActionScopeRepetitionsClient.NewListPager(string, string, string, string, string, *WorkflowRunActionScopeRepetitionsClientListOptions) *runtime.Pager[WorkflowRunActionScopeRepetitionsClientListResponse]` +- New function `*WorkflowVersionsClient.NewListPager(string, string, string, *WorkflowVersionsClientListOptions) *runtime.Pager[WorkflowVersionsClientListResponse]` +- New function `PossibleUpgradeAvailabilityValues() []UpgradeAvailability` +- New function `*WorkflowRunActionRepetitionsClient.Get(context.Context, string, string, string, string, string, string, *WorkflowRunActionRepetitionsClientGetOptions) (WorkflowRunActionRepetitionsClientGetResponse, error)` +- New function `PossibleUpgradePreferenceValues() []UpgradePreference` +- New function `PossibleWorkflowSKUNameValues() []WorkflowSKUName` +- New function `PossibleWorkflowProvisioningStateValues() []WorkflowProvisioningState` +- New function `*WebAppsClient.BeginGetProductionSiteDeploymentStatus(context.Context, string, string, string, *WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (*runtime.Poller[WebAppsClientGetProductionSiteDeploymentStatusResponse], error)` +- New function `*WorkflowVersionsClient.Get(context.Context, string, string, string, string, *WorkflowVersionsClientGetOptions) (WorkflowVersionsClientGetResponse, error)` +- New function `*WorkflowRunActionsClient.NewListPager(string, string, string, string, *WorkflowRunActionsClientListOptions) *runtime.Pager[WorkflowRunActionsClientListResponse]` +- New function `PossibleDaysOfWeekValues() []DaysOfWeek` +- New function `PossibleKeyTypeValues() []KeyType` +- New function `NewWorkflowTriggerHistoriesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowTriggerHistoriesClient, error)` +- New function `NewWorkflowTriggersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowTriggersClient, error)` +- New function `PossibleCustomDNSSuffixProvisioningStateValues() []CustomDNSSuffixProvisioningState` +- New function `*WorkflowsClient.Validate(context.Context, string, string, string, Workflow, *WorkflowsClientValidateOptions) (WorkflowsClientValidateResponse, error)` +- New function `PossibleDeploymentBuildStatusValues() []DeploymentBuildStatus` +- New function `*StaticSitesClient.NewGetLinkedBackendsForBuildPager(string, string, string, *StaticSitesClientGetLinkedBackendsForBuildOptions) *runtime.Pager[StaticSitesClientGetLinkedBackendsForBuildResponse]` +- New function `*WorkflowRunActionsClient.Get(context.Context, string, string, string, string, string, *WorkflowRunActionsClientGetOptions) (WorkflowRunActionsClientGetResponse, error)` +- New function `NewWorkflowRunActionRepetitionsRequestHistoriesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowRunActionRepetitionsRequestHistoriesClient, error)` +- New function `*WorkflowRunsClient.Cancel(context.Context, string, string, string, string, *WorkflowRunsClientCancelOptions) (WorkflowRunsClientCancelResponse, error)` +- New function `*WorkflowTriggersClient.ListCallbackURL(context.Context, string, string, string, string, *WorkflowTriggersClientListCallbackURLOptions) (WorkflowTriggersClientListCallbackURLResponse, error)` +- New function `*WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager(string, string, string, string, string, string, *WorkflowRunActionRepetitionsClientListExpressionTracesOptions) *runtime.Pager[WorkflowRunActionRepetitionsClientListExpressionTracesResponse]` +- New function `PossibleProviderOsTypeSelectedValues() []ProviderOsTypeSelected` +- New function `NewWorkflowRunActionScopeRepetitionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowRunActionScopeRepetitionsClient, error)` +- New function `PossibleWorkflowTriggerProvisioningStateValues() []WorkflowTriggerProvisioningState` +- New function `*EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration(context.Context, string, string, CustomDNSSuffixConfiguration, *EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse, error)` +- New function `PossibleProviderStackOsTypeValues() []ProviderStackOsType` +- New function `*WorkflowTriggerHistoriesClient.BeginResubmit(context.Context, string, string, string, string, string, *WorkflowTriggerHistoriesClientBeginResubmitOptions) (*runtime.Poller[WorkflowTriggerHistoriesClientResubmitResponse], error)` +- New function `*WorkflowRunActionRepetitionsRequestHistoriesClient.Get(context.Context, string, string, string, string, string, string, string, *WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions) (WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse, error)` +- New function `*WorkflowRunActionRepetitionsClient.NewListPager(string, string, string, string, string, *WorkflowRunActionRepetitionsClientListOptions) *runtime.Pager[WorkflowRunActionRepetitionsClientListResponse]` +- New function `PossibleWorkflowStatusValues() []WorkflowStatus` +- New function `NewWorkflowRunActionRepetitionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*WorkflowRunActionRepetitionsClient, error)` +- New function `*EnvironmentsClient.GetAseCustomDNSSuffixConfiguration(context.Context, string, string, *EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse, error)` +- New function `*EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration(context.Context, string, string, *EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse, error)` +- New function `*WorkflowTriggerHistoriesClient.Get(context.Context, string, string, string, string, string, *WorkflowTriggerHistoriesClientGetOptions) (WorkflowTriggerHistoriesClientGetResponse, error)` +- New function `*WorkflowTriggersClient.BeginRun(context.Context, string, string, string, string, *WorkflowTriggersClientBeginRunOptions) (*runtime.Poller[WorkflowTriggersClientRunResponse], error)` +- New function `*StaticSitesClient.UnlinkBackend(context.Context, string, string, string, *StaticSitesClientUnlinkBackendOptions) (StaticSitesClientUnlinkBackendResponse, error)` +- New function `*WebAppsClient.NewListProductionSiteDeploymentStatusesPager(string, string, *WebAppsClientListProductionSiteDeploymentStatusesOptions) *runtime.Pager[WebAppsClientListProductionSiteDeploymentStatusesResponse]` +- New function `*WorkflowTriggersClient.NewListPager(string, string, string, *WorkflowTriggersClientListOptions) *runtime.Pager[WorkflowTriggersClientListResponse]` +- New function `*StaticSitesClient.UnlinkBackendFromBuild(context.Context, string, string, string, string, *StaticSitesClientUnlinkBackendFromBuildOptions) (StaticSitesClientUnlinkBackendFromBuildResponse, error)` +- New function `*WorkflowTriggersClient.GetSchemaJSON(context.Context, string, string, string, string, *WorkflowTriggersClientGetSchemaJSONOptions) (WorkflowTriggersClientGetSchemaJSONResponse, error)` +- New function `PossibleWorkflowStateValues() []WorkflowState` +- New function `PossibleDayOfWeekValues() []DayOfWeek` +- New function `PossibleOpenAuthenticationProviderTypeValues() []OpenAuthenticationProviderType` +- New function `*WorkflowTriggersClient.Get(context.Context, string, string, string, string, *WorkflowTriggersClientGetOptions) (WorkflowTriggersClientGetResponse, error)` +- New function `PossibleParameterTypeValues() []ParameterType` +- New function `*StaticSitesClient.BeginValidateBackend(context.Context, string, string, string, StaticSiteLinkedBackendARMResource, *StaticSitesClientBeginValidateBackendOptions) (*runtime.Poller[StaticSitesClientValidateBackendResponse], error)` +- New function `*WorkflowRunsClient.Get(context.Context, string, string, string, string, *WorkflowRunsClientGetOptions) (WorkflowRunsClientGetResponse, error)` +- New function `*WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager(string, string, string, *WebAppsClientListSlotSiteDeploymentStatusesSlotOptions) *runtime.Pager[WebAppsClientListSlotSiteDeploymentStatusesSlotResponse]` +- New struct `AzureResourceErrorInfo` +- New struct `ContentHash` +- New struct `ContentLink` +- New struct `Correlation` +- New struct `CsmDeploymentStatus` +- New struct `CsmDeploymentStatusCollection` +- New struct `CsmDeploymentStatusProperties` +- New struct `CustomDNSSuffixConfiguration` +- New struct `CustomDNSSuffixConfigurationProperties` +- New struct `EnvironmentsClientBeginUpgradeOptions` +- New struct `EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions` +- New struct `EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse` +- New struct `EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions` +- New struct `EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse` +- New struct `EnvironmentsClientTestUpgradeAvailableNotificationOptions` +- New struct `EnvironmentsClientTestUpgradeAvailableNotificationResponse` +- New struct `EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions` +- New struct `EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse` +- New struct `EnvironmentsClientUpgradeResponse` +- New struct `ErrorInfo` +- New struct `ErrorProperties` +- New struct `ErrorResponse` +- New struct `Expression` +- New struct `ExpressionRoot` +- New struct `ExpressionTraces` +- New struct `FlowAccessControlConfiguration` +- New struct `FlowAccessControlConfigurationPolicy` +- New struct `FlowEndpoints` +- New struct `FlowEndpointsConfiguration` +- New struct `IPAddress` +- New struct `IPAddressRange` +- New struct `JSONSchema` +- New struct `OpenAuthenticationAccessPolicies` +- New struct `OpenAuthenticationAccessPolicy` +- New struct `OpenAuthenticationPolicyClaim` +- New struct `OperationResult` +- New struct `OperationResultProperties` +- New struct `RecurrenceSchedule` +- New struct `RecurrenceScheduleOccurrence` +- New struct `RegenerateActionParameter` +- New struct `RepetitionIndex` +- New struct `Request` +- New struct `RequestHistory` +- New struct `RequestHistoryListResult` +- New struct `RequestHistoryProperties` +- New struct `ResourceReference` +- New struct `Response` +- New struct `RetryHistory` +- New struct `RunActionCorrelation` +- New struct `RunCorrelation` +- New struct `StaticSiteLinkedBackend` +- New struct `StaticSiteLinkedBackendARMResource` +- New struct `StaticSiteLinkedBackendARMResourceProperties` +- New struct `StaticSiteLinkedBackendsCollection` +- New struct `StaticSitesClientBeginLinkBackendOptions` +- New struct `StaticSitesClientBeginLinkBackendToBuildOptions` +- New struct `StaticSitesClientBeginValidateBackendForBuildOptions` +- New struct `StaticSitesClientBeginValidateBackendOptions` +- New struct `StaticSitesClientGetLinkedBackendForBuildOptions` +- New struct `StaticSitesClientGetLinkedBackendForBuildResponse` +- New struct `StaticSitesClientGetLinkedBackendOptions` +- New struct `StaticSitesClientGetLinkedBackendResponse` +- New struct `StaticSitesClientGetLinkedBackendsForBuildOptions` +- New struct `StaticSitesClientGetLinkedBackendsForBuildResponse` +- New struct `StaticSitesClientGetLinkedBackendsOptions` +- New struct `StaticSitesClientGetLinkedBackendsResponse` +- New struct `StaticSitesClientLinkBackendResponse` +- New struct `StaticSitesClientLinkBackendToBuildResponse` +- New struct `StaticSitesClientUnlinkBackendFromBuildOptions` +- New struct `StaticSitesClientUnlinkBackendFromBuildResponse` +- New struct `StaticSitesClientUnlinkBackendOptions` +- New struct `StaticSitesClientUnlinkBackendResponse` +- New struct `StaticSitesClientValidateBackendForBuildResponse` +- New struct `StaticSitesClientValidateBackendResponse` +- New struct `SubResource` +- New struct `WebAppsClientBeginGetProductionSiteDeploymentStatusOptions` +- New struct `WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions` +- New struct `WebAppsClientGetProductionSiteDeploymentStatusResponse` +- New struct `WebAppsClientGetSlotSiteDeploymentStatusSlotResponse` +- New struct `WebAppsClientListProductionSiteDeploymentStatusesOptions` +- New struct `WebAppsClientListProductionSiteDeploymentStatusesResponse` +- New struct `WebAppsClientListSlotSiteDeploymentStatusesSlotOptions` +- New struct `WebAppsClientListSlotSiteDeploymentStatusesSlotResponse` +- New struct `Workflow` +- New struct `WorkflowFilter` +- New struct `WorkflowListResult` +- New struct `WorkflowOutputParameter` +- New struct `WorkflowParameter` +- New struct `WorkflowProperties` +- New struct `WorkflowResource` +- New struct `WorkflowRun` +- New struct `WorkflowRunAction` +- New struct `WorkflowRunActionFilter` +- New struct `WorkflowRunActionListResult` +- New struct `WorkflowRunActionProperties` +- New struct `WorkflowRunActionRepetitionDefinition` +- New struct `WorkflowRunActionRepetitionDefinitionCollection` +- New struct `WorkflowRunActionRepetitionProperties` +- New struct `WorkflowRunActionRepetitionsClient` +- New struct `WorkflowRunActionRepetitionsClientGetOptions` +- New struct `WorkflowRunActionRepetitionsClientGetResponse` +- New struct `WorkflowRunActionRepetitionsClientListExpressionTracesOptions` +- New struct `WorkflowRunActionRepetitionsClientListExpressionTracesResponse` +- New struct `WorkflowRunActionRepetitionsClientListOptions` +- New struct `WorkflowRunActionRepetitionsClientListResponse` +- New struct `WorkflowRunActionRepetitionsRequestHistoriesClient` +- New struct `WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions` +- New struct `WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse` +- New struct `WorkflowRunActionRepetitionsRequestHistoriesClientListOptions` +- New struct `WorkflowRunActionRepetitionsRequestHistoriesClientListResponse` +- New struct `WorkflowRunActionScopeRepetitionsClient` +- New struct `WorkflowRunActionScopeRepetitionsClientGetOptions` +- New struct `WorkflowRunActionScopeRepetitionsClientGetResponse` +- New struct `WorkflowRunActionScopeRepetitionsClientListOptions` +- New struct `WorkflowRunActionScopeRepetitionsClientListResponse` +- New struct `WorkflowRunActionsClient` +- New struct `WorkflowRunActionsClientGetOptions` +- New struct `WorkflowRunActionsClientGetResponse` +- New struct `WorkflowRunActionsClientListExpressionTracesOptions` +- New struct `WorkflowRunActionsClientListExpressionTracesResponse` +- New struct `WorkflowRunActionsClientListOptions` +- New struct `WorkflowRunActionsClientListResponse` +- New struct `WorkflowRunFilter` +- New struct `WorkflowRunListResult` +- New struct `WorkflowRunProperties` +- New struct `WorkflowRunTrigger` +- New struct `WorkflowRunsClient` +- New struct `WorkflowRunsClientCancelOptions` +- New struct `WorkflowRunsClientCancelResponse` +- New struct `WorkflowRunsClientGetOptions` +- New struct `WorkflowRunsClientGetResponse` +- New struct `WorkflowRunsClientListOptions` +- New struct `WorkflowRunsClientListResponse` +- New struct `WorkflowSKU` +- New struct `WorkflowTrigger` +- New struct `WorkflowTriggerCallbackURL` +- New struct `WorkflowTriggerFilter` +- New struct `WorkflowTriggerHistoriesClient` +- New struct `WorkflowTriggerHistoriesClientBeginResubmitOptions` +- New struct `WorkflowTriggerHistoriesClientGetOptions` +- New struct `WorkflowTriggerHistoriesClientGetResponse` +- New struct `WorkflowTriggerHistoriesClientListOptions` +- New struct `WorkflowTriggerHistoriesClientListResponse` +- New struct `WorkflowTriggerHistoriesClientResubmitResponse` +- New struct `WorkflowTriggerHistory` +- New struct `WorkflowTriggerHistoryFilter` +- New struct `WorkflowTriggerHistoryListResult` +- New struct `WorkflowTriggerHistoryProperties` +- New struct `WorkflowTriggerListCallbackURLQueries` +- New struct `WorkflowTriggerListResult` +- New struct `WorkflowTriggerProperties` +- New struct `WorkflowTriggerRecurrence` +- New struct `WorkflowTriggersClient` +- New struct `WorkflowTriggersClientBeginRunOptions` +- New struct `WorkflowTriggersClientGetOptions` +- New struct `WorkflowTriggersClientGetResponse` +- New struct `WorkflowTriggersClientGetSchemaJSONOptions` +- New struct `WorkflowTriggersClientGetSchemaJSONResponse` +- New struct `WorkflowTriggersClientListCallbackURLOptions` +- New struct `WorkflowTriggersClientListCallbackURLResponse` +- New struct `WorkflowTriggersClientListOptions` +- New struct `WorkflowTriggersClientListResponse` +- New struct `WorkflowTriggersClientRunResponse` +- New struct `WorkflowVersion` +- New struct `WorkflowVersionListResult` +- New struct `WorkflowVersionProperties` +- New struct `WorkflowVersionsClient` +- New struct `WorkflowVersionsClientGetOptions` +- New struct `WorkflowVersionsClientGetResponse` +- New struct `WorkflowVersionsClientListOptions` +- New struct `WorkflowVersionsClientListResponse` +- New struct `WorkflowsClient` +- New struct `WorkflowsClientRegenerateAccessKeyOptions` +- New struct `WorkflowsClientRegenerateAccessKeyResponse` +- New struct `WorkflowsClientValidateOptions` +- New struct `WorkflowsClientValidateResponse` +- New field `NumberOfWorkers` in struct `PlanProperties` +- New field `CustomDNSSuffixConfiguration` in struct `Environment` +- New field `NetworkingConfiguration` in struct `Environment` +- New field `UpgradePreference` in struct `Environment` +- New field `UpgradeAvailability` in struct `Environment` +- New field `LinkedBackends` in struct `StaticSiteBuildARMResourceProperties` +- New field `EmailID` in struct `CertificateEmail` +- New field `TimeStamp` in struct `CertificateEmail` +- New field `RemoteDebugEnabled` in struct `AseV3NetworkingConfigurationProperties` +- New field `FtpEnabled` in struct `AseV3NetworkingConfigurationProperties` +- New field `InboundIPAddressOverride` in struct `AseV3NetworkingConfigurationProperties` +- New field `ActionType` in struct `CertificateOrderAction` +- New field `CreatedAt` in struct `CertificateOrderAction` +- New field `PublicNetworkAccess` in struct `TriggeredWebJobProperties` +- New field `StorageAccountRequired` in struct `TriggeredWebJobProperties` +- New field `VnetContentShareEnabled` in struct `SiteProperties` +- New field `PublicNetworkAccess` in struct `SiteProperties` +- New field `VnetImagePullEnabled` in struct `SiteProperties` +- New field `VnetRouteAllEnabled` in struct `SiteProperties` +- New field `NumberOfWorkers` in struct `PlanPatchResourceProperties` +- New field `LinkedBackends` in struct `StaticSite` +- New field `PublicNetworkAccess` in struct `StaticSite` +- New field `Hostname` in struct `WebSiteManagementClientListCustomHostNameSitesOptions` + + +## 1.0.0 (2022-05-16) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/README.md new file mode 100644 index 00000000..fce2005e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/README.md @@ -0,0 +1,105 @@ +# Azure App Service Module for Go + +The `armappservice` module provides operations for working with Azure App Service. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/appservice/armappservice) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure App Service module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure App Service. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure App Service module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armappservice.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armappservice.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewCertificateOrdersClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## More sample code + +- [Static Site](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/appservice/staticsite) +- [App Service Plan](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/appservice/web_plans) +- [Web Site](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/appservice/webapp) + +## Major Version Upgrade + +Go uses [semantic import versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) to ensure a good backward compatibility for modules. For Azure Go management SDK, we usually upgrade module version according to cooresponding service's API version. Regarding it could be a complicated experience for major version upgrade, we will try our best to keep the SDK API stable and release new version in backward compatible way. However, if any unavoidable breaking changes and a new major version releases for SDK modules, you could use these commands under your module folder to upgrade: + +```sh +go install github.com/icholy/gomajor@latest +gomajor get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute@latest +``` + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `App Service` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/autorest.md new file mode 100644 index 00000000..e20a3b4b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/b5d78da207e9c5d8f82e95224039867271f47cdf/specification/web/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/b5d78da207e9c5d8f82e95224039867271f47cdf/specification/web/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 4.1.0 +tag: package-2024-04 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/build.go new file mode 100644 index 00000000..26bbfdf7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/appservice/armappservice + +package armappservice diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificateorders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificateorders_client.go new file mode 100644 index 00000000..16196110 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificateorders_client.go @@ -0,0 +1,1322 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// CertificateOrdersClient contains the methods for the AppServiceCertificateOrders group. +// Don't use this type directly, use NewCertificateOrdersClient() instead. +type CertificateOrdersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCertificateOrdersClient creates a new instance of CertificateOrdersClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCertificateOrdersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateOrdersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CertificateOrdersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Description for Create or update a certificate purchase order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - certificateDistinguishedName - Distinguished name to use for the certificate order. +// - options - CertificateOrdersClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdate +// method. +func (client *CertificateOrdersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrder, options *CertificateOrdersClientBeginCreateOrUpdateOptions) (*runtime.Poller[CertificateOrdersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, certificateOrderName, certificateDistinguishedName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateOrdersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CertificateOrdersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Description for Create or update a certificate purchase order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *CertificateOrdersClient) createOrUpdate(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrder, options *CertificateOrdersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CertificateOrdersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, certificateOrderName, certificateDistinguishedName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *CertificateOrdersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrder, options *CertificateOrdersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, certificateDistinguishedName); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdateCertificate - Description for Creates or updates a certificate and associates with key vault secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - name - Name of the certificate. +// - keyVaultCertificate - Key vault certificate resource Id. +// - options - CertificateOrdersClientBeginCreateOrUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdateCertificate +// method. +func (client *CertificateOrdersClient) BeginCreateOrUpdateCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificateResource, options *CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (*runtime.Poller[CertificateOrdersClientCreateOrUpdateCertificateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdateCertificate(ctx, resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateOrdersClientCreateOrUpdateCertificateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CertificateOrdersClientCreateOrUpdateCertificateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdateCertificate - Description for Creates or updates a certificate and associates with key vault secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *CertificateOrdersClient) createOrUpdateCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificateResource, options *CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (*http.Response, error) { + var err error + const operationName = "CertificateOrdersClient.BeginCreateOrUpdateCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCertificateCreateRequest creates the CreateOrUpdateCertificate request. +func (client *CertificateOrdersClient) createOrUpdateCertificateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificateResource, options *CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, keyVaultCertificate); err != nil { + return nil, err + } + return req, nil +} + +// Delete - Description for Delete an existing certificate order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - options - CertificateOrdersClientDeleteOptions contains the optional parameters for the CertificateOrdersClient.Delete +// method. +func (client *CertificateOrdersClient) Delete(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientDeleteOptions) (CertificateOrdersClientDeleteResponse, error) { + var err error + const operationName = "CertificateOrdersClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, certificateOrderName, options) + if err != nil { + return CertificateOrdersClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientDeleteResponse{}, err + } + return CertificateOrdersClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *CertificateOrdersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteCertificate - Description for Delete the certificate associated with a certificate order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - name - Name of the certificate. +// - options - CertificateOrdersClientDeleteCertificateOptions contains the optional parameters for the CertificateOrdersClient.DeleteCertificate +// method. +func (client *CertificateOrdersClient) DeleteCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *CertificateOrdersClientDeleteCertificateOptions) (CertificateOrdersClientDeleteCertificateResponse, error) { + var err error + const operationName = "CertificateOrdersClient.DeleteCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, options) + if err != nil { + return CertificateOrdersClientDeleteCertificateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientDeleteCertificateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientDeleteCertificateResponse{}, err + } + return CertificateOrdersClientDeleteCertificateResponse{}, nil +} + +// deleteCertificateCreateRequest creates the DeleteCertificate request. +func (client *CertificateOrdersClient) deleteCertificateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *CertificateOrdersClientDeleteCertificateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Description for Get a certificate order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order.. +// - options - CertificateOrdersClientGetOptions contains the optional parameters for the CertificateOrdersClient.Get method. +func (client *CertificateOrdersClient) Get(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientGetOptions) (CertificateOrdersClientGetResponse, error) { + var err error + const operationName = "CertificateOrdersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, certificateOrderName, options) + if err != nil { + return CertificateOrdersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *CertificateOrdersClient) getCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *CertificateOrdersClient) getHandleResponse(resp *http.Response) (CertificateOrdersClientGetResponse, error) { + result := CertificateOrdersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOrder); err != nil { + return CertificateOrdersClientGetResponse{}, err + } + return result, nil +} + +// GetCertificate - Description for Get the certificate associated with a certificate order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - name - Name of the certificate. +// - options - CertificateOrdersClientGetCertificateOptions contains the optional parameters for the CertificateOrdersClient.GetCertificate +// method. +func (client *CertificateOrdersClient) GetCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *CertificateOrdersClientGetCertificateOptions) (CertificateOrdersClientGetCertificateResponse, error) { + var err error + const operationName = "CertificateOrdersClient.GetCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, options) + if err != nil { + return CertificateOrdersClientGetCertificateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientGetCertificateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientGetCertificateResponse{}, err + } + resp, err := client.getCertificateHandleResponse(httpResp) + return resp, err +} + +// getCertificateCreateRequest creates the GetCertificate request. +func (client *CertificateOrdersClient) getCertificateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *CertificateOrdersClientGetCertificateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getCertificateHandleResponse handles the GetCertificate response. +func (client *CertificateOrdersClient) getCertificateHandleResponse(resp *http.Response) (CertificateOrdersClientGetCertificateResponse, error) { + result := CertificateOrdersClientGetCertificateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateResource); err != nil { + return CertificateOrdersClientGetCertificateResponse{}, err + } + return result, nil +} + +// NewListPager - Description for List all certificate orders in a subscription. +// +// Generated from API version 2024-04-01 +// - options - CertificateOrdersClientListOptions contains the optional parameters for the CertificateOrdersClient.NewListPager +// method. +func (client *CertificateOrdersClient) NewListPager(options *CertificateOrdersClientListOptions) *runtime.Pager[CertificateOrdersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[CertificateOrdersClientListResponse]{ + More: func(page CertificateOrdersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CertificateOrdersClientListResponse) (CertificateOrdersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateOrdersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return CertificateOrdersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *CertificateOrdersClient) listCreateRequest(ctx context.Context, options *CertificateOrdersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *CertificateOrdersClient) listHandleResponse(resp *http.Response) (CertificateOrdersClientListResponse, error) { + result := CertificateOrdersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOrderCollection); err != nil { + return CertificateOrdersClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Description for Get certificate orders in a resource group. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - options - CertificateOrdersClientListByResourceGroupOptions contains the optional parameters for the CertificateOrdersClient.NewListByResourceGroupPager +// method. +func (client *CertificateOrdersClient) NewListByResourceGroupPager(resourceGroupName string, options *CertificateOrdersClientListByResourceGroupOptions) *runtime.Pager[CertificateOrdersClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[CertificateOrdersClientListByResourceGroupResponse]{ + More: func(page CertificateOrdersClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CertificateOrdersClientListByResourceGroupResponse) (CertificateOrdersClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateOrdersClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return CertificateOrdersClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *CertificateOrdersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *CertificateOrdersClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *CertificateOrdersClient) listByResourceGroupHandleResponse(resp *http.Response) (CertificateOrdersClientListByResourceGroupResponse, error) { + result := CertificateOrdersClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOrderCollection); err != nil { + return CertificateOrdersClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListCertificatesPager - Description for List all certificates associated with a certificate order. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - options - CertificateOrdersClientListCertificatesOptions contains the optional parameters for the CertificateOrdersClient.NewListCertificatesPager +// method. +func (client *CertificateOrdersClient) NewListCertificatesPager(resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientListCertificatesOptions) *runtime.Pager[CertificateOrdersClientListCertificatesResponse] { + return runtime.NewPager(runtime.PagingHandler[CertificateOrdersClientListCertificatesResponse]{ + More: func(page CertificateOrdersClientListCertificatesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CertificateOrdersClientListCertificatesResponse) (CertificateOrdersClientListCertificatesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateOrdersClient.NewListCertificatesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCertificatesCreateRequest(ctx, resourceGroupName, certificateOrderName, options) + }, nil) + if err != nil { + return CertificateOrdersClientListCertificatesResponse{}, err + } + return client.listCertificatesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCertificatesCreateRequest creates the ListCertificates request. +func (client *CertificateOrdersClient) listCertificatesCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientListCertificatesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCertificatesHandleResponse handles the ListCertificates response. +func (client *CertificateOrdersClient) listCertificatesHandleResponse(resp *http.Response) (CertificateOrdersClientListCertificatesResponse, error) { + result := CertificateOrdersClientListCertificatesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateCollection); err != nil { + return CertificateOrdersClientListCertificatesResponse{}, err + } + return result, nil +} + +// Reissue - Description for Reissue an existing certificate order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - reissueCertificateOrderRequest - Parameters for the reissue. +// - options - CertificateOrdersClientReissueOptions contains the optional parameters for the CertificateOrdersClient.Reissue +// method. +func (client *CertificateOrdersClient) Reissue(ctx context.Context, resourceGroupName string, certificateOrderName string, reissueCertificateOrderRequest ReissueCertificateOrderRequest, options *CertificateOrdersClientReissueOptions) (CertificateOrdersClientReissueResponse, error) { + var err error + const operationName = "CertificateOrdersClient.Reissue" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.reissueCreateRequest(ctx, resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, options) + if err != nil { + return CertificateOrdersClientReissueResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientReissueResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientReissueResponse{}, err + } + return CertificateOrdersClientReissueResponse{}, nil +} + +// reissueCreateRequest creates the Reissue request. +func (client *CertificateOrdersClient) reissueCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, reissueCertificateOrderRequest ReissueCertificateOrderRequest, options *CertificateOrdersClientReissueOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, reissueCertificateOrderRequest); err != nil { + return nil, err + } + return req, nil +} + +// Renew - Description for Renew an existing certificate order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - renewCertificateOrderRequest - Renew parameters +// - options - CertificateOrdersClientRenewOptions contains the optional parameters for the CertificateOrdersClient.Renew method. +func (client *CertificateOrdersClient) Renew(ctx context.Context, resourceGroupName string, certificateOrderName string, renewCertificateOrderRequest RenewCertificateOrderRequest, options *CertificateOrdersClientRenewOptions) (CertificateOrdersClientRenewResponse, error) { + var err error + const operationName = "CertificateOrdersClient.Renew" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.renewCreateRequest(ctx, resourceGroupName, certificateOrderName, renewCertificateOrderRequest, options) + if err != nil { + return CertificateOrdersClientRenewResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientRenewResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientRenewResponse{}, err + } + return CertificateOrdersClientRenewResponse{}, nil +} + +// renewCreateRequest creates the Renew request. +func (client *CertificateOrdersClient) renewCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, renewCertificateOrderRequest RenewCertificateOrderRequest, options *CertificateOrdersClientRenewOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, renewCertificateOrderRequest); err != nil { + return nil, err + } + return req, nil +} + +// ResendEmail - Description for Resend certificate email. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - options - CertificateOrdersClientResendEmailOptions contains the optional parameters for the CertificateOrdersClient.ResendEmail +// method. +func (client *CertificateOrdersClient) ResendEmail(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientResendEmailOptions) (CertificateOrdersClientResendEmailResponse, error) { + var err error + const operationName = "CertificateOrdersClient.ResendEmail" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resendEmailCreateRequest(ctx, resourceGroupName, certificateOrderName, options) + if err != nil { + return CertificateOrdersClientResendEmailResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientResendEmailResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientResendEmailResponse{}, err + } + return CertificateOrdersClientResendEmailResponse{}, nil +} + +// resendEmailCreateRequest creates the ResendEmail request. +func (client *CertificateOrdersClient) resendEmailCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientResendEmailOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// ResendRequestEmails - Resend domain verification ownership email containing steps on how to verify a domain for a given +// certificate order +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - nameIdentifier - Email address +// - options - CertificateOrdersClientResendRequestEmailsOptions contains the optional parameters for the CertificateOrdersClient.ResendRequestEmails +// method. +func (client *CertificateOrdersClient) ResendRequestEmails(ctx context.Context, resourceGroupName string, certificateOrderName string, nameIdentifier NameIdentifier, options *CertificateOrdersClientResendRequestEmailsOptions) (CertificateOrdersClientResendRequestEmailsResponse, error) { + var err error + const operationName = "CertificateOrdersClient.ResendRequestEmails" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resendRequestEmailsCreateRequest(ctx, resourceGroupName, certificateOrderName, nameIdentifier, options) + if err != nil { + return CertificateOrdersClientResendRequestEmailsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientResendRequestEmailsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientResendRequestEmailsResponse{}, err + } + return CertificateOrdersClientResendRequestEmailsResponse{}, nil +} + +// resendRequestEmailsCreateRequest creates the ResendRequestEmails request. +func (client *CertificateOrdersClient) resendRequestEmailsCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, nameIdentifier NameIdentifier, options *CertificateOrdersClientResendRequestEmailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, nameIdentifier); err != nil { + return nil, err + } + return req, nil +} + +// RetrieveCertificateActions - Description for Retrieve the list of certificate actions. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the certificate order. +// - options - CertificateOrdersClientRetrieveCertificateActionsOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateActions +// method. +func (client *CertificateOrdersClient) RetrieveCertificateActions(ctx context.Context, resourceGroupName string, name string, options *CertificateOrdersClientRetrieveCertificateActionsOptions) (CertificateOrdersClientRetrieveCertificateActionsResponse, error) { + var err error + const operationName = "CertificateOrdersClient.RetrieveCertificateActions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.retrieveCertificateActionsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return CertificateOrdersClientRetrieveCertificateActionsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientRetrieveCertificateActionsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientRetrieveCertificateActionsResponse{}, err + } + resp, err := client.retrieveCertificateActionsHandleResponse(httpResp) + return resp, err +} + +// retrieveCertificateActionsCreateRequest creates the RetrieveCertificateActions request. +func (client *CertificateOrdersClient) retrieveCertificateActionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *CertificateOrdersClientRetrieveCertificateActionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// retrieveCertificateActionsHandleResponse handles the RetrieveCertificateActions response. +func (client *CertificateOrdersClient) retrieveCertificateActionsHandleResponse(resp *http.Response) (CertificateOrdersClientRetrieveCertificateActionsResponse, error) { + result := CertificateOrdersClientRetrieveCertificateActionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOrderActionArray); err != nil { + return CertificateOrdersClientRetrieveCertificateActionsResponse{}, err + } + return result, nil +} + +// RetrieveCertificateEmailHistory - Description for Retrieve email history. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the certificate order. +// - options - CertificateOrdersClientRetrieveCertificateEmailHistoryOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateEmailHistory +// method. +func (client *CertificateOrdersClient) RetrieveCertificateEmailHistory(ctx context.Context, resourceGroupName string, name string, options *CertificateOrdersClientRetrieveCertificateEmailHistoryOptions) (CertificateOrdersClientRetrieveCertificateEmailHistoryResponse, error) { + var err error + const operationName = "CertificateOrdersClient.RetrieveCertificateEmailHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.retrieveCertificateEmailHistoryCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, err + } + resp, err := client.retrieveCertificateEmailHistoryHandleResponse(httpResp) + return resp, err +} + +// retrieveCertificateEmailHistoryCreateRequest creates the RetrieveCertificateEmailHistory request. +func (client *CertificateOrdersClient) retrieveCertificateEmailHistoryCreateRequest(ctx context.Context, resourceGroupName string, name string, options *CertificateOrdersClientRetrieveCertificateEmailHistoryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// retrieveCertificateEmailHistoryHandleResponse handles the RetrieveCertificateEmailHistory response. +func (client *CertificateOrdersClient) retrieveCertificateEmailHistoryHandleResponse(resp *http.Response) (CertificateOrdersClientRetrieveCertificateEmailHistoryResponse, error) { + result := CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateEmailArray); err != nil { + return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, err + } + return result, nil +} + +// RetrieveSiteSeal - This method is used to obtain the site seal information for an issued certificate. A site seal is a +// graphic that the certificate purchaser can embed on their web site to show their visitors +// information about their SSL certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed +// that contains detailed information about the SSL certificate. The site seal +// token is used to link the site seal graphic image to the appropriate certificate details pop-up page display when a user +// clicks on the site seal. The site seal images are expected to be static images +// and hosted by the reseller, to minimize delays for customer page load times. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - siteSealRequest - Site seal request. +// - options - CertificateOrdersClientRetrieveSiteSealOptions contains the optional parameters for the CertificateOrdersClient.RetrieveSiteSeal +// method. +func (client *CertificateOrdersClient) RetrieveSiteSeal(ctx context.Context, resourceGroupName string, certificateOrderName string, siteSealRequest SiteSealRequest, options *CertificateOrdersClientRetrieveSiteSealOptions) (CertificateOrdersClientRetrieveSiteSealResponse, error) { + var err error + const operationName = "CertificateOrdersClient.RetrieveSiteSeal" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.retrieveSiteSealCreateRequest(ctx, resourceGroupName, certificateOrderName, siteSealRequest, options) + if err != nil { + return CertificateOrdersClientRetrieveSiteSealResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientRetrieveSiteSealResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientRetrieveSiteSealResponse{}, err + } + resp, err := client.retrieveSiteSealHandleResponse(httpResp) + return resp, err +} + +// retrieveSiteSealCreateRequest creates the RetrieveSiteSeal request. +func (client *CertificateOrdersClient) retrieveSiteSealCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, siteSealRequest SiteSealRequest, options *CertificateOrdersClientRetrieveSiteSealOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteSealRequest); err != nil { + return nil, err + } + return req, nil +} + +// retrieveSiteSealHandleResponse handles the RetrieveSiteSeal response. +func (client *CertificateOrdersClient) retrieveSiteSealHandleResponse(resp *http.Response) (CertificateOrdersClientRetrieveSiteSealResponse, error) { + result := CertificateOrdersClientRetrieveSiteSealResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteSeal); err != nil { + return CertificateOrdersClientRetrieveSiteSealResponse{}, err + } + return result, nil +} + +// Update - Description for Create or update a certificate purchase order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - certificateDistinguishedName - Distinguished name to use for the certificate order. +// - options - CertificateOrdersClientUpdateOptions contains the optional parameters for the CertificateOrdersClient.Update +// method. +func (client *CertificateOrdersClient) Update(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrderPatchResource, options *CertificateOrdersClientUpdateOptions) (CertificateOrdersClientUpdateResponse, error) { + var err error + const operationName = "CertificateOrdersClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, certificateOrderName, certificateDistinguishedName, options) + if err != nil { + return CertificateOrdersClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *CertificateOrdersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrderPatchResource, options *CertificateOrdersClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, certificateDistinguishedName); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *CertificateOrdersClient) updateHandleResponse(resp *http.Response) (CertificateOrdersClientUpdateResponse, error) { + result := CertificateOrdersClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOrder); err != nil { + return CertificateOrdersClientUpdateResponse{}, err + } + return result, nil +} + +// UpdateCertificate - Description for Creates or updates a certificate and associates with key vault secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - name - Name of the certificate. +// - keyVaultCertificate - Key vault certificate resource Id. +// - options - CertificateOrdersClientUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.UpdateCertificate +// method. +func (client *CertificateOrdersClient) UpdateCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificatePatchResource, options *CertificateOrdersClientUpdateCertificateOptions) (CertificateOrdersClientUpdateCertificateResponse, error) { + var err error + const operationName = "CertificateOrdersClient.UpdateCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) + if err != nil { + return CertificateOrdersClientUpdateCertificateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientUpdateCertificateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientUpdateCertificateResponse{}, err + } + resp, err := client.updateCertificateHandleResponse(httpResp) + return resp, err +} + +// updateCertificateCreateRequest creates the UpdateCertificate request. +func (client *CertificateOrdersClient) updateCertificateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificatePatchResource, options *CertificateOrdersClientUpdateCertificateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, keyVaultCertificate); err != nil { + return nil, err + } + return req, nil +} + +// updateCertificateHandleResponse handles the UpdateCertificate response. +func (client *CertificateOrdersClient) updateCertificateHandleResponse(resp *http.Response) (CertificateOrdersClientUpdateCertificateResponse, error) { + result := CertificateOrdersClientUpdateCertificateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CertificateResource); err != nil { + return CertificateOrdersClientUpdateCertificateResponse{}, err + } + return result, nil +} + +// ValidatePurchaseInformation - Description for Validate information for a certificate order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - appServiceCertificateOrder - Information for a certificate order. +// - options - CertificateOrdersClientValidatePurchaseInformationOptions contains the optional parameters for the CertificateOrdersClient.ValidatePurchaseInformation +// method. +func (client *CertificateOrdersClient) ValidatePurchaseInformation(ctx context.Context, appServiceCertificateOrder CertificateOrder, options *CertificateOrdersClientValidatePurchaseInformationOptions) (CertificateOrdersClientValidatePurchaseInformationResponse, error) { + var err error + const operationName = "CertificateOrdersClient.ValidatePurchaseInformation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validatePurchaseInformationCreateRequest(ctx, appServiceCertificateOrder, options) + if err != nil { + return CertificateOrdersClientValidatePurchaseInformationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientValidatePurchaseInformationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientValidatePurchaseInformationResponse{}, err + } + return CertificateOrdersClientValidatePurchaseInformationResponse{}, nil +} + +// validatePurchaseInformationCreateRequest creates the ValidatePurchaseInformation request. +func (client *CertificateOrdersClient) validatePurchaseInformationCreateRequest(ctx context.Context, appServiceCertificateOrder CertificateOrder, options *CertificateOrdersClientValidatePurchaseInformationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appServiceCertificateOrder); err != nil { + return nil, err + } + return req, nil +} + +// VerifyDomainOwnership - Description for Verify domain ownership for this certificate order. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - Name of the certificate order. +// - options - CertificateOrdersClientVerifyDomainOwnershipOptions contains the optional parameters for the CertificateOrdersClient.VerifyDomainOwnership +// method. +func (client *CertificateOrdersClient) VerifyDomainOwnership(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientVerifyDomainOwnershipOptions) (CertificateOrdersClientVerifyDomainOwnershipResponse, error) { + var err error + const operationName = "CertificateOrdersClient.VerifyDomainOwnership" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.verifyDomainOwnershipCreateRequest(ctx, resourceGroupName, certificateOrderName, options) + if err != nil { + return CertificateOrdersClientVerifyDomainOwnershipResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersClientVerifyDomainOwnershipResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientVerifyDomainOwnershipResponse{}, err + } + return CertificateOrdersClientVerifyDomainOwnershipResponse{}, nil +} + +// verifyDomainOwnershipCreateRequest creates the VerifyDomainOwnership request. +func (client *CertificateOrdersClient) verifyDomainOwnershipCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientVerifyDomainOwnershipOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificateordersdiagnostics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificateordersdiagnostics_client.go new file mode 100644 index 00000000..99a9e84e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificateordersdiagnostics_client.go @@ -0,0 +1,191 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" + "time" +) + +// CertificateOrdersDiagnosticsClient contains the methods for the CertificateOrdersDiagnostics group. +// Don't use this type directly, use NewCertificateOrdersDiagnosticsClient() instead. +type CertificateOrdersDiagnosticsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCertificateOrdersDiagnosticsClient creates a new instance of CertificateOrdersDiagnosticsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCertificateOrdersDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateOrdersDiagnosticsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CertificateOrdersDiagnosticsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// GetAppServiceCertificateOrderDetectorResponse - Description for Microsoft.CertificateRegistration call to get a detector +// response from App Lens. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - The certificate order name for which the response is needed. +// - detectorName - The detector name which needs to be run. +// - options - CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions contains the optional +// parameters for the CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse method. +func (client *CertificateOrdersDiagnosticsClient) GetAppServiceCertificateOrderDetectorResponse(ctx context.Context, resourceGroupName string, certificateOrderName string, detectorName string, options *CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions) (CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse, error) { + var err error + const operationName = "CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAppServiceCertificateOrderDetectorResponseCreateRequest(ctx, resourceGroupName, certificateOrderName, detectorName, options) + if err != nil { + return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, err + } + resp, err := client.getAppServiceCertificateOrderDetectorResponseHandleResponse(httpResp) + return resp, err +} + +// getAppServiceCertificateOrderDetectorResponseCreateRequest creates the GetAppServiceCertificateOrderDetectorResponse request. +func (client *CertificateOrdersDiagnosticsClient) getAppServiceCertificateOrderDetectorResponseCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, detectorName string, options *CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if detectorName == "" { + return nil, errors.New("parameter detectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.EndTime != nil { + reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) + } + if options != nil && options.StartTime != nil { + reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) + } + if options != nil && options.TimeGrain != nil { + reqQP.Set("timeGrain", *options.TimeGrain) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAppServiceCertificateOrderDetectorResponseHandleResponse handles the GetAppServiceCertificateOrderDetectorResponse response. +func (client *CertificateOrdersDiagnosticsClient) getAppServiceCertificateOrderDetectorResponseHandleResponse(resp *http.Response) (CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse, error) { + result := CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponse); err != nil { + return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, err + } + return result, nil +} + +// NewListAppServiceCertificateOrderDetectorResponsePager - Description for Microsoft.CertificateRegistration to get the list +// of detectors for this RP. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - certificateOrderName - The certificate order name for which the response is needed. +// - options - CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions contains the optional +// parameters for the CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager method. +func (client *CertificateOrdersDiagnosticsClient) NewListAppServiceCertificateOrderDetectorResponsePager(resourceGroupName string, certificateOrderName string, options *CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions) *runtime.Pager[CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse] { + return runtime.NewPager(runtime.PagingHandler[CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse]{ + More: func(page CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse) (CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAppServiceCertificateOrderDetectorResponseCreateRequest(ctx, resourceGroupName, certificateOrderName, options) + }, nil) + if err != nil { + return CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{}, err + } + return client.listAppServiceCertificateOrderDetectorResponseHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAppServiceCertificateOrderDetectorResponseCreateRequest creates the ListAppServiceCertificateOrderDetectorResponse request. +func (client *CertificateOrdersDiagnosticsClient) listAppServiceCertificateOrderDetectorResponseCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if certificateOrderName == "" { + return nil, errors.New("parameter certificateOrderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAppServiceCertificateOrderDetectorResponseHandleResponse handles the ListAppServiceCertificateOrderDetectorResponse response. +func (client *CertificateOrdersDiagnosticsClient) listAppServiceCertificateOrderDetectorResponseHandleResponse(resp *http.Response) (CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse, error) { + result := CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponseCollection); err != nil { + return CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificateregistrationprovider_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificateregistrationprovider_client.go new file mode 100644 index 00000000..c647ce2d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificateregistrationprovider_client.go @@ -0,0 +1,90 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// CertificateRegistrationProviderClient contains the methods for the CertificateRegistrationProvider group. +// Don't use this type directly, use NewCertificateRegistrationProviderClient() instead. +type CertificateRegistrationProviderClient struct { + internal *arm.Client +} + +// NewCertificateRegistrationProviderClient creates a new instance of CertificateRegistrationProviderClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCertificateRegistrationProviderClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateRegistrationProviderClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CertificateRegistrationProviderClient{ + internal: cl, + } + return client, nil +} + +// NewListOperationsPager - Description for Implements Csm operations Api to exposes the list of available Csm Apis under +// the resource provider +// +// Generated from API version 2024-04-01 +// - options - CertificateRegistrationProviderClientListOperationsOptions contains the optional parameters for the CertificateRegistrationProviderClient.NewListOperationsPager +// method. +func (client *CertificateRegistrationProviderClient) NewListOperationsPager(options *CertificateRegistrationProviderClientListOperationsOptions) *runtime.Pager[CertificateRegistrationProviderClientListOperationsResponse] { + return runtime.NewPager(runtime.PagingHandler[CertificateRegistrationProviderClientListOperationsResponse]{ + More: func(page CertificateRegistrationProviderClientListOperationsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CertificateRegistrationProviderClientListOperationsResponse) (CertificateRegistrationProviderClientListOperationsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateRegistrationProviderClient.NewListOperationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listOperationsCreateRequest(ctx, options) + }, nil) + if err != nil { + return CertificateRegistrationProviderClientListOperationsResponse{}, err + } + return client.listOperationsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listOperationsCreateRequest creates the ListOperations request. +func (client *CertificateRegistrationProviderClient) listOperationsCreateRequest(ctx context.Context, options *CertificateRegistrationProviderClientListOperationsOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.CertificateRegistration/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listOperationsHandleResponse handles the ListOperations response. +func (client *CertificateRegistrationProviderClient) listOperationsHandleResponse(resp *http.Response) (CertificateRegistrationProviderClientListOperationsResponse, error) { + result := CertificateRegistrationProviderClientListOperationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmOperationCollection); err != nil { + return CertificateRegistrationProviderClientListOperationsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificates_client.go new file mode 100644 index 00000000..496c01c9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/certificates_client.go @@ -0,0 +1,418 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// CertificatesClient contains the methods for the Certificates group. +// Don't use this type directly, use NewCertificatesClient() instead. +type CertificatesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCertificatesClient creates a new instance of CertificatesClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CertificatesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Description for Create or update a certificate. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the certificate. +// - certificateEnvelope - Details of certificate, if it exists already. +// - options - CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate +// method. +func (client *CertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, certificateEnvelope AppCertificate, options *CertificatesClientCreateOrUpdateOptions) (CertificatesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "CertificatesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, certificateEnvelope, options) + if err != nil { + return CertificatesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificatesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, certificateEnvelope AppCertificate, options *CertificatesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, certificateEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Response) (CertificatesClientCreateOrUpdateResponse, error) { + result := CertificatesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppCertificate); err != nil { + return CertificatesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Description for Delete a certificate. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the certificate. +// - options - CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. +func (client *CertificatesClient) Delete(ctx context.Context, resourceGroupName string, name string, options *CertificatesClientDeleteOptions) (CertificatesClientDeleteResponse, error) { + var err error + const operationName = "CertificatesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return CertificatesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificatesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientDeleteResponse{}, err + } + return CertificatesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *CertificatesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Description for Get a certificate. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the certificate. +// - options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. +func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, name string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error) { + var err error + const operationName = "CertificatesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return CertificatesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificatesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *CertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *CertificatesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *CertificatesClient) getHandleResponse(resp *http.Response) (CertificatesClientGetResponse, error) { + result := CertificatesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppCertificate); err != nil { + return CertificatesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Description for Get all certificates for a subscription. +// +// Generated from API version 2024-04-01 +// - options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. +func (client *CertificatesClient) NewListPager(options *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[CertificatesClientListResponse]{ + More: func(page CertificatesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CertificatesClientListResponse) (CertificatesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificatesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return CertificatesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *CertificatesClient) listCreateRequest(ctx context.Context, options *CertificatesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *CertificatesClient) listHandleResponse(resp *http.Response) (CertificatesClientListResponse, error) { + result := CertificatesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppCertificateCollection); err != nil { + return CertificatesClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Description for Get all certificates in a resource group. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - options - CertificatesClientListByResourceGroupOptions contains the optional parameters for the CertificatesClient.NewListByResourceGroupPager +// method. +func (client *CertificatesClient) NewListByResourceGroupPager(resourceGroupName string, options *CertificatesClientListByResourceGroupOptions) *runtime.Pager[CertificatesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[CertificatesClientListByResourceGroupResponse]{ + More: func(page CertificatesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CertificatesClientListByResourceGroupResponse) (CertificatesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificatesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return CertificatesClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *CertificatesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *CertificatesClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *CertificatesClient) listByResourceGroupHandleResponse(resp *http.Response) (CertificatesClientListByResourceGroupResponse, error) { + result := CertificatesClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppCertificateCollection); err != nil { + return CertificatesClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// Update - Description for Create or update a certificate. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the certificate. +// - certificateEnvelope - Details of certificate, if it exists already. +// - options - CertificatesClientUpdateOptions contains the optional parameters for the CertificatesClient.Update method. +func (client *CertificatesClient) Update(ctx context.Context, resourceGroupName string, name string, certificateEnvelope AppCertificatePatchResource, options *CertificatesClientUpdateOptions) (CertificatesClientUpdateResponse, error) { + var err error + const operationName = "CertificatesClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, name, certificateEnvelope, options) + if err != nil { + return CertificatesClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CertificatesClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, certificateEnvelope AppCertificatePatchResource, options *CertificatesClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, certificateEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *CertificatesClient) updateHandleResponse(resp *http.Response) (CertificatesClientUpdateResponse, error) { + result := CertificatesClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppCertificate); err != nil { + return CertificatesClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/ci.yml new file mode 100644 index 00000000..17fd4731 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/ci.yml @@ -0,0 +1,28 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/appservice/armappservice/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/appservice/armappservice/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/appservice/armappservice' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/client_factory.go new file mode 100644 index 00000000..54d49f7c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/client_factory.go @@ -0,0 +1,283 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewCertificateOrdersClient creates a new instance of CertificateOrdersClient. +func (c *ClientFactory) NewCertificateOrdersClient() *CertificateOrdersClient { + return &CertificateOrdersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCertificateOrdersDiagnosticsClient creates a new instance of CertificateOrdersDiagnosticsClient. +func (c *ClientFactory) NewCertificateOrdersDiagnosticsClient() *CertificateOrdersDiagnosticsClient { + return &CertificateOrdersDiagnosticsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCertificateRegistrationProviderClient creates a new instance of CertificateRegistrationProviderClient. +func (c *ClientFactory) NewCertificateRegistrationProviderClient() *CertificateRegistrationProviderClient { + return &CertificateRegistrationProviderClient{ + internal: c.internal, + } +} + +// NewCertificatesClient creates a new instance of CertificatesClient. +func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { + return &CertificatesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewContainerAppsClient creates a new instance of ContainerAppsClient. +func (c *ClientFactory) NewContainerAppsClient() *ContainerAppsClient { + return &ContainerAppsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewContainerAppsRevisionsClient creates a new instance of ContainerAppsRevisionsClient. +func (c *ClientFactory) NewContainerAppsRevisionsClient() *ContainerAppsRevisionsClient { + return &ContainerAppsRevisionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDeletedWebAppsClient creates a new instance of DeletedWebAppsClient. +func (c *ClientFactory) NewDeletedWebAppsClient() *DeletedWebAppsClient { + return &DeletedWebAppsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDiagnosticsClient creates a new instance of DiagnosticsClient. +func (c *ClientFactory) NewDiagnosticsClient() *DiagnosticsClient { + return &DiagnosticsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDomainRegistrationProviderClient creates a new instance of DomainRegistrationProviderClient. +func (c *ClientFactory) NewDomainRegistrationProviderClient() *DomainRegistrationProviderClient { + return &DomainRegistrationProviderClient{ + internal: c.internal, + } +} + +// NewDomainsClient creates a new instance of DomainsClient. +func (c *ClientFactory) NewDomainsClient() *DomainsClient { + return &DomainsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewEnvironmentsClient creates a new instance of EnvironmentsClient. +func (c *ClientFactory) NewEnvironmentsClient() *EnvironmentsClient { + return &EnvironmentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGetUsagesInLocationClient creates a new instance of GetUsagesInLocationClient. +func (c *ClientFactory) NewGetUsagesInLocationClient() *GetUsagesInLocationClient { + return &GetUsagesInLocationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGlobalClient creates a new instance of GlobalClient. +func (c *ClientFactory) NewGlobalClient() *GlobalClient { + return &GlobalClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewKubeEnvironmentsClient creates a new instance of KubeEnvironmentsClient. +func (c *ClientFactory) NewKubeEnvironmentsClient() *KubeEnvironmentsClient { + return &KubeEnvironmentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPlansClient creates a new instance of PlansClient. +func (c *ClientFactory) NewPlansClient() *PlansClient { + return &PlansClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProviderClient creates a new instance of ProviderClient. +func (c *ClientFactory) NewProviderClient() *ProviderClient { + return &ProviderClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRecommendationsClient creates a new instance of RecommendationsClient. +func (c *ClientFactory) NewRecommendationsClient() *RecommendationsClient { + return &RecommendationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewResourceHealthMetadataClient creates a new instance of ResourceHealthMetadataClient. +func (c *ClientFactory) NewResourceHealthMetadataClient() *ResourceHealthMetadataClient { + return &ResourceHealthMetadataClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewStaticSitesClient creates a new instance of StaticSitesClient. +func (c *ClientFactory) NewStaticSitesClient() *StaticSitesClient { + return &StaticSitesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTopLevelDomainsClient creates a new instance of TopLevelDomainsClient. +func (c *ClientFactory) NewTopLevelDomainsClient() *TopLevelDomainsClient { + return &TopLevelDomainsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWebAppsClient creates a new instance of WebAppsClient. +func (c *ClientFactory) NewWebAppsClient() *WebAppsClient { + return &WebAppsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWebSiteManagementClient creates a new instance of WebSiteManagementClient. +func (c *ClientFactory) NewWebSiteManagementClient() *WebSiteManagementClient { + return &WebSiteManagementClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkflowRunActionRepetitionsClient creates a new instance of WorkflowRunActionRepetitionsClient. +func (c *ClientFactory) NewWorkflowRunActionRepetitionsClient() *WorkflowRunActionRepetitionsClient { + return &WorkflowRunActionRepetitionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkflowRunActionRepetitionsRequestHistoriesClient creates a new instance of WorkflowRunActionRepetitionsRequestHistoriesClient. +func (c *ClientFactory) NewWorkflowRunActionRepetitionsRequestHistoriesClient() *WorkflowRunActionRepetitionsRequestHistoriesClient { + return &WorkflowRunActionRepetitionsRequestHistoriesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkflowRunActionScopeRepetitionsClient creates a new instance of WorkflowRunActionScopeRepetitionsClient. +func (c *ClientFactory) NewWorkflowRunActionScopeRepetitionsClient() *WorkflowRunActionScopeRepetitionsClient { + return &WorkflowRunActionScopeRepetitionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkflowRunActionsClient creates a new instance of WorkflowRunActionsClient. +func (c *ClientFactory) NewWorkflowRunActionsClient() *WorkflowRunActionsClient { + return &WorkflowRunActionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkflowRunsClient creates a new instance of WorkflowRunsClient. +func (c *ClientFactory) NewWorkflowRunsClient() *WorkflowRunsClient { + return &WorkflowRunsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkflowTriggerHistoriesClient creates a new instance of WorkflowTriggerHistoriesClient. +func (c *ClientFactory) NewWorkflowTriggerHistoriesClient() *WorkflowTriggerHistoriesClient { + return &WorkflowTriggerHistoriesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkflowTriggersClient creates a new instance of WorkflowTriggersClient. +func (c *ClientFactory) NewWorkflowTriggersClient() *WorkflowTriggersClient { + return &WorkflowTriggersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkflowVersionsClient creates a new instance of WorkflowVersionsClient. +func (c *ClientFactory) NewWorkflowVersionsClient() *WorkflowVersionsClient { + return &WorkflowVersionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkflowsClient creates a new instance of WorkflowsClient. +func (c *ClientFactory) NewWorkflowsClient() *WorkflowsClient { + return &WorkflowsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/constants.go new file mode 100644 index 00000000..91e6b485 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/constants.go @@ -0,0 +1,2628 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" + moduleVersion = "v4.1.0" +) + +// ActiveRevisionsMode - ActiveRevisionsMode controls how active revisions are handled for the Container app:Multiple: multiple +// revisions can be active. If no value if provided, this is the defaultSingle: Only one revision +// can be active at a time. Revision weights can not be used in this mode +type ActiveRevisionsMode string + +const ( + ActiveRevisionsModeMultiple ActiveRevisionsMode = "multiple" + ActiveRevisionsModeSingle ActiveRevisionsMode = "single" +) + +// PossibleActiveRevisionsModeValues returns the possible values for the ActiveRevisionsMode const type. +func PossibleActiveRevisionsModeValues() []ActiveRevisionsMode { + return []ActiveRevisionsMode{ + ActiveRevisionsModeMultiple, + ActiveRevisionsModeSingle, + } +} + +// AppServicePlanRestrictions - App Service plans this offer is restricted to. +type AppServicePlanRestrictions string + +const ( + AppServicePlanRestrictionsBasic AppServicePlanRestrictions = "Basic" + AppServicePlanRestrictionsFree AppServicePlanRestrictions = "Free" + AppServicePlanRestrictionsNone AppServicePlanRestrictions = "None" + AppServicePlanRestrictionsPremium AppServicePlanRestrictions = "Premium" + AppServicePlanRestrictionsShared AppServicePlanRestrictions = "Shared" + AppServicePlanRestrictionsStandard AppServicePlanRestrictions = "Standard" +) + +// PossibleAppServicePlanRestrictionsValues returns the possible values for the AppServicePlanRestrictions const type. +func PossibleAppServicePlanRestrictionsValues() []AppServicePlanRestrictions { + return []AppServicePlanRestrictions{ + AppServicePlanRestrictionsBasic, + AppServicePlanRestrictionsFree, + AppServicePlanRestrictionsNone, + AppServicePlanRestrictionsPremium, + AppServicePlanRestrictionsShared, + AppServicePlanRestrictionsStandard, + } +} + +// AuthType - Auth Type +type AuthType string + +const ( + AuthTypeAnonymous AuthType = "Anonymous" + AuthTypeSystemIdentity AuthType = "SystemIdentity" + AuthTypeUserAssigned AuthType = "UserAssigned" + AuthTypeUserCredentials AuthType = "UserCredentials" +) + +// PossibleAuthTypeValues returns the possible values for the AuthType const type. +func PossibleAuthTypeValues() []AuthType { + return []AuthType{ + AuthTypeAnonymous, + AuthTypeSystemIdentity, + AuthTypeUserAssigned, + AuthTypeUserCredentials, + } +} + +// AuthenticationType - Property to select authentication type to access the selected storage account. Available options: +// SystemAssignedIdentity, UserAssignedIdentity, StorageAccountConnectionString. +type AuthenticationType string + +const ( + AuthenticationTypeStorageAccountConnectionString AuthenticationType = "StorageAccountConnectionString" + AuthenticationTypeSystemAssignedIdentity AuthenticationType = "SystemAssignedIdentity" + AuthenticationTypeUserAssignedIdentity AuthenticationType = "UserAssignedIdentity" +) + +// PossibleAuthenticationTypeValues returns the possible values for the AuthenticationType const type. +func PossibleAuthenticationTypeValues() []AuthenticationType { + return []AuthenticationType{ + AuthenticationTypeStorageAccountConnectionString, + AuthenticationTypeSystemAssignedIdentity, + AuthenticationTypeUserAssignedIdentity, + } +} + +// AutoGeneratedDomainNameLabelScope - Specifies the scope of uniqueness for the default hostname during resource creation +type AutoGeneratedDomainNameLabelScope string + +const ( + AutoGeneratedDomainNameLabelScopeNoReuse AutoGeneratedDomainNameLabelScope = "NoReuse" + AutoGeneratedDomainNameLabelScopeResourceGroupReuse AutoGeneratedDomainNameLabelScope = "ResourceGroupReuse" + AutoGeneratedDomainNameLabelScopeSubscriptionReuse AutoGeneratedDomainNameLabelScope = "SubscriptionReuse" + AutoGeneratedDomainNameLabelScopeTenantReuse AutoGeneratedDomainNameLabelScope = "TenantReuse" +) + +// PossibleAutoGeneratedDomainNameLabelScopeValues returns the possible values for the AutoGeneratedDomainNameLabelScope const type. +func PossibleAutoGeneratedDomainNameLabelScopeValues() []AutoGeneratedDomainNameLabelScope { + return []AutoGeneratedDomainNameLabelScope{ + AutoGeneratedDomainNameLabelScopeNoReuse, + AutoGeneratedDomainNameLabelScopeResourceGroupReuse, + AutoGeneratedDomainNameLabelScopeSubscriptionReuse, + AutoGeneratedDomainNameLabelScopeTenantReuse, + } +} + +// AutoHealActionType - Predefined action to be taken. +type AutoHealActionType string + +const ( + AutoHealActionTypeCustomAction AutoHealActionType = "CustomAction" + AutoHealActionTypeLogEvent AutoHealActionType = "LogEvent" + AutoHealActionTypeRecycle AutoHealActionType = "Recycle" +) + +// PossibleAutoHealActionTypeValues returns the possible values for the AutoHealActionType const type. +func PossibleAutoHealActionTypeValues() []AutoHealActionType { + return []AutoHealActionType{ + AutoHealActionTypeCustomAction, + AutoHealActionTypeLogEvent, + AutoHealActionTypeRecycle, + } +} + +// AzureResourceType - Type of the Azure resource the hostname is assigned to. +type AzureResourceType string + +const ( + AzureResourceTypeTrafficManager AzureResourceType = "TrafficManager" + AzureResourceTypeWebsite AzureResourceType = "Website" +) + +// PossibleAzureResourceTypeValues returns the possible values for the AzureResourceType const type. +func PossibleAzureResourceTypeValues() []AzureResourceType { + return []AzureResourceType{ + AzureResourceTypeTrafficManager, + AzureResourceTypeWebsite, + } +} + +// AzureStorageProtocol - Mounting protocol to use for the storage account. +type AzureStorageProtocol string + +const ( + AzureStorageProtocolHTTP AzureStorageProtocol = "Http" + AzureStorageProtocolNfs AzureStorageProtocol = "Nfs" + AzureStorageProtocolSmb AzureStorageProtocol = "Smb" +) + +// PossibleAzureStorageProtocolValues returns the possible values for the AzureStorageProtocol const type. +func PossibleAzureStorageProtocolValues() []AzureStorageProtocol { + return []AzureStorageProtocol{ + AzureStorageProtocolHTTP, + AzureStorageProtocolNfs, + AzureStorageProtocolSmb, + } +} + +// AzureStorageState - State of the storage account. +type AzureStorageState string + +const ( + AzureStorageStateInvalidCredentials AzureStorageState = "InvalidCredentials" + AzureStorageStateInvalidShare AzureStorageState = "InvalidShare" + AzureStorageStateNotValidated AzureStorageState = "NotValidated" + AzureStorageStateOk AzureStorageState = "Ok" +) + +// PossibleAzureStorageStateValues returns the possible values for the AzureStorageState const type. +func PossibleAzureStorageStateValues() []AzureStorageState { + return []AzureStorageState{ + AzureStorageStateInvalidCredentials, + AzureStorageStateInvalidShare, + AzureStorageStateNotValidated, + AzureStorageStateOk, + } +} + +// AzureStorageType - Type of storage. +type AzureStorageType string + +const ( + AzureStorageTypeAzureBlob AzureStorageType = "AzureBlob" + AzureStorageTypeAzureFiles AzureStorageType = "AzureFiles" +) + +// PossibleAzureStorageTypeValues returns the possible values for the AzureStorageType const type. +func PossibleAzureStorageTypeValues() []AzureStorageType { + return []AzureStorageType{ + AzureStorageTypeAzureBlob, + AzureStorageTypeAzureFiles, + } +} + +// BackupItemStatus - Backup status. +type BackupItemStatus string + +const ( + BackupItemStatusCreated BackupItemStatus = "Created" + BackupItemStatusDeleteFailed BackupItemStatus = "DeleteFailed" + BackupItemStatusDeleteInProgress BackupItemStatus = "DeleteInProgress" + BackupItemStatusDeleted BackupItemStatus = "Deleted" + BackupItemStatusFailed BackupItemStatus = "Failed" + BackupItemStatusInProgress BackupItemStatus = "InProgress" + BackupItemStatusPartiallySucceeded BackupItemStatus = "PartiallySucceeded" + BackupItemStatusSkipped BackupItemStatus = "Skipped" + BackupItemStatusSucceeded BackupItemStatus = "Succeeded" + BackupItemStatusTimedOut BackupItemStatus = "TimedOut" +) + +// PossibleBackupItemStatusValues returns the possible values for the BackupItemStatus const type. +func PossibleBackupItemStatusValues() []BackupItemStatus { + return []BackupItemStatus{ + BackupItemStatusCreated, + BackupItemStatusDeleteFailed, + BackupItemStatusDeleteInProgress, + BackupItemStatusDeleted, + BackupItemStatusFailed, + BackupItemStatusInProgress, + BackupItemStatusPartiallySucceeded, + BackupItemStatusSkipped, + BackupItemStatusSucceeded, + BackupItemStatusTimedOut, + } +} + +// BackupRestoreOperationType - Operation type. +type BackupRestoreOperationType string + +const ( + BackupRestoreOperationTypeClone BackupRestoreOperationType = "Clone" + BackupRestoreOperationTypeCloudFS BackupRestoreOperationType = "CloudFS" + BackupRestoreOperationTypeDefault BackupRestoreOperationType = "Default" + BackupRestoreOperationTypeRelocation BackupRestoreOperationType = "Relocation" + BackupRestoreOperationTypeSnapshot BackupRestoreOperationType = "Snapshot" +) + +// PossibleBackupRestoreOperationTypeValues returns the possible values for the BackupRestoreOperationType const type. +func PossibleBackupRestoreOperationTypeValues() []BackupRestoreOperationType { + return []BackupRestoreOperationType{ + BackupRestoreOperationTypeClone, + BackupRestoreOperationTypeCloudFS, + BackupRestoreOperationTypeDefault, + BackupRestoreOperationTypeRelocation, + BackupRestoreOperationTypeSnapshot, + } +} + +type BasicAuthName string + +const ( + BasicAuthNameDefault BasicAuthName = "default" +) + +// PossibleBasicAuthNameValues returns the possible values for the BasicAuthName const type. +func PossibleBasicAuthNameValues() []BasicAuthName { + return []BasicAuthName{ + BasicAuthNameDefault, + } +} + +// BuildStatus - The status of the static site build. +type BuildStatus string + +const ( + BuildStatusDeleting BuildStatus = "Deleting" + BuildStatusDeploying BuildStatus = "Deploying" + BuildStatusDetached BuildStatus = "Detached" + BuildStatusFailed BuildStatus = "Failed" + BuildStatusReady BuildStatus = "Ready" + BuildStatusUploading BuildStatus = "Uploading" + BuildStatusWaitingForDeployment BuildStatus = "WaitingForDeployment" +) + +// PossibleBuildStatusValues returns the possible values for the BuildStatus const type. +func PossibleBuildStatusValues() []BuildStatus { + return []BuildStatus{ + BuildStatusDeleting, + BuildStatusDeploying, + BuildStatusDetached, + BuildStatusFailed, + BuildStatusReady, + BuildStatusUploading, + BuildStatusWaitingForDeployment, + } +} + +// BuiltInAuthenticationProvider - 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". +type BuiltInAuthenticationProvider string + +const ( + BuiltInAuthenticationProviderAzureActiveDirectory BuiltInAuthenticationProvider = "AzureActiveDirectory" + BuiltInAuthenticationProviderFacebook BuiltInAuthenticationProvider = "Facebook" + BuiltInAuthenticationProviderGithub BuiltInAuthenticationProvider = "Github" + BuiltInAuthenticationProviderGoogle BuiltInAuthenticationProvider = "Google" + BuiltInAuthenticationProviderMicrosoftAccount BuiltInAuthenticationProvider = "MicrosoftAccount" + BuiltInAuthenticationProviderTwitter BuiltInAuthenticationProvider = "Twitter" +) + +// PossibleBuiltInAuthenticationProviderValues returns the possible values for the BuiltInAuthenticationProvider const type. +func PossibleBuiltInAuthenticationProviderValues() []BuiltInAuthenticationProvider { + return []BuiltInAuthenticationProvider{ + BuiltInAuthenticationProviderAzureActiveDirectory, + BuiltInAuthenticationProviderFacebook, + BuiltInAuthenticationProviderGithub, + BuiltInAuthenticationProviderGoogle, + BuiltInAuthenticationProviderMicrosoftAccount, + BuiltInAuthenticationProviderTwitter, + } +} + +// CertificateOrderActionType - Action type. +type CertificateOrderActionType string + +const ( + CertificateOrderActionTypeCertificateExpirationWarning CertificateOrderActionType = "CertificateExpirationWarning" + CertificateOrderActionTypeCertificateExpired CertificateOrderActionType = "CertificateExpired" + CertificateOrderActionTypeCertificateIssued CertificateOrderActionType = "CertificateIssued" + CertificateOrderActionTypeCertificateOrderCanceled CertificateOrderActionType = "CertificateOrderCanceled" + CertificateOrderActionTypeCertificateOrderCreated CertificateOrderActionType = "CertificateOrderCreated" + CertificateOrderActionTypeCertificateRevoked CertificateOrderActionType = "CertificateRevoked" + CertificateOrderActionTypeDomainValidationComplete CertificateOrderActionType = "DomainValidationComplete" + CertificateOrderActionTypeFraudCleared CertificateOrderActionType = "FraudCleared" + CertificateOrderActionTypeFraudDetected CertificateOrderActionType = "FraudDetected" + CertificateOrderActionTypeFraudDocumentationRequired CertificateOrderActionType = "FraudDocumentationRequired" + CertificateOrderActionTypeOrgNameChange CertificateOrderActionType = "OrgNameChange" + CertificateOrderActionTypeOrgValidationComplete CertificateOrderActionType = "OrgValidationComplete" + CertificateOrderActionTypeSanDrop CertificateOrderActionType = "SanDrop" + CertificateOrderActionTypeUnknown CertificateOrderActionType = "Unknown" +) + +// PossibleCertificateOrderActionTypeValues returns the possible values for the CertificateOrderActionType const type. +func PossibleCertificateOrderActionTypeValues() []CertificateOrderActionType { + return []CertificateOrderActionType{ + CertificateOrderActionTypeCertificateExpirationWarning, + CertificateOrderActionTypeCertificateExpired, + CertificateOrderActionTypeCertificateIssued, + CertificateOrderActionTypeCertificateOrderCanceled, + CertificateOrderActionTypeCertificateOrderCreated, + CertificateOrderActionTypeCertificateRevoked, + CertificateOrderActionTypeDomainValidationComplete, + CertificateOrderActionTypeFraudCleared, + CertificateOrderActionTypeFraudDetected, + CertificateOrderActionTypeFraudDocumentationRequired, + CertificateOrderActionTypeOrgNameChange, + CertificateOrderActionTypeOrgValidationComplete, + CertificateOrderActionTypeSanDrop, + CertificateOrderActionTypeUnknown, + } +} + +// CertificateOrderStatus - Current order status. +type CertificateOrderStatus string + +const ( + CertificateOrderStatusCanceled CertificateOrderStatus = "Canceled" + CertificateOrderStatusDenied CertificateOrderStatus = "Denied" + CertificateOrderStatusExpired CertificateOrderStatus = "Expired" + CertificateOrderStatusIssued CertificateOrderStatus = "Issued" + CertificateOrderStatusNotSubmitted CertificateOrderStatus = "NotSubmitted" + CertificateOrderStatusPendingRekey CertificateOrderStatus = "PendingRekey" + CertificateOrderStatusPendingissuance CertificateOrderStatus = "Pendingissuance" + CertificateOrderStatusPendingrevocation CertificateOrderStatus = "Pendingrevocation" + CertificateOrderStatusRevoked CertificateOrderStatus = "Revoked" + CertificateOrderStatusUnused CertificateOrderStatus = "Unused" +) + +// PossibleCertificateOrderStatusValues returns the possible values for the CertificateOrderStatus const type. +func PossibleCertificateOrderStatusValues() []CertificateOrderStatus { + return []CertificateOrderStatus{ + CertificateOrderStatusCanceled, + CertificateOrderStatusDenied, + CertificateOrderStatusExpired, + CertificateOrderStatusIssued, + CertificateOrderStatusNotSubmitted, + CertificateOrderStatusPendingRekey, + CertificateOrderStatusPendingissuance, + CertificateOrderStatusPendingrevocation, + CertificateOrderStatusRevoked, + CertificateOrderStatusUnused, + } +} + +// CertificateProductType - Certificate product type. +type CertificateProductType string + +const ( + CertificateProductTypeStandardDomainValidatedSSL CertificateProductType = "StandardDomainValidatedSsl" + CertificateProductTypeStandardDomainValidatedWildCardSSL CertificateProductType = "StandardDomainValidatedWildCardSsl" +) + +// PossibleCertificateProductTypeValues returns the possible values for the CertificateProductType const type. +func PossibleCertificateProductTypeValues() []CertificateProductType { + return []CertificateProductType{ + CertificateProductTypeStandardDomainValidatedSSL, + CertificateProductTypeStandardDomainValidatedWildCardSSL, + } +} + +// Channels - List of channels that this recommendation can apply. +type Channels string + +const ( + ChannelsAPI Channels = "Api" + ChannelsAll Channels = "All" + ChannelsEmail Channels = "Email" + ChannelsNotification Channels = "Notification" + ChannelsWebhook Channels = "Webhook" +) + +// PossibleChannelsValues returns the possible values for the Channels const type. +func PossibleChannelsValues() []Channels { + return []Channels{ + ChannelsAPI, + ChannelsAll, + ChannelsEmail, + ChannelsNotification, + ChannelsWebhook, + } +} + +// CheckNameResourceTypes - Resource type used for verification. +type CheckNameResourceTypes string + +const ( + CheckNameResourceTypesHostingEnvironment CheckNameResourceTypes = "HostingEnvironment" + CheckNameResourceTypesMicrosoftWebHostingEnvironments CheckNameResourceTypes = "Microsoft.Web/hostingEnvironments" + CheckNameResourceTypesMicrosoftWebPublishingUsers CheckNameResourceTypes = "Microsoft.Web/publishingUsers" + CheckNameResourceTypesMicrosoftWebSites CheckNameResourceTypes = "Microsoft.Web/sites" + CheckNameResourceTypesMicrosoftWebSitesSlots CheckNameResourceTypes = "Microsoft.Web/sites/slots" + CheckNameResourceTypesPublishingUser CheckNameResourceTypes = "PublishingUser" + CheckNameResourceTypesSite CheckNameResourceTypes = "Site" + CheckNameResourceTypesSlot CheckNameResourceTypes = "Slot" +) + +// PossibleCheckNameResourceTypesValues returns the possible values for the CheckNameResourceTypes const type. +func PossibleCheckNameResourceTypesValues() []CheckNameResourceTypes { + return []CheckNameResourceTypes{ + CheckNameResourceTypesHostingEnvironment, + CheckNameResourceTypesMicrosoftWebHostingEnvironments, + CheckNameResourceTypesMicrosoftWebPublishingUsers, + CheckNameResourceTypesMicrosoftWebSites, + CheckNameResourceTypesMicrosoftWebSitesSlots, + CheckNameResourceTypesPublishingUser, + CheckNameResourceTypesSite, + CheckNameResourceTypesSlot, + } +} + +// 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. +type ClientCertMode string + +const ( + ClientCertModeOptional ClientCertMode = "Optional" + ClientCertModeOptionalInteractiveUser ClientCertMode = "OptionalInteractiveUser" + ClientCertModeRequired ClientCertMode = "Required" +) + +// PossibleClientCertModeValues returns the possible values for the ClientCertMode const type. +func PossibleClientCertModeValues() []ClientCertMode { + return []ClientCertMode{ + ClientCertModeOptional, + ClientCertModeOptionalInteractiveUser, + ClientCertModeRequired, + } +} + +// CloneAbilityResult - Name of app. +type CloneAbilityResult string + +const ( + CloneAbilityResultCloneable CloneAbilityResult = "Cloneable" + CloneAbilityResultNotCloneable CloneAbilityResult = "NotCloneable" + CloneAbilityResultPartiallyCloneable CloneAbilityResult = "PartiallyCloneable" +) + +// PossibleCloneAbilityResultValues returns the possible values for the CloneAbilityResult const type. +func PossibleCloneAbilityResultValues() []CloneAbilityResult { + return []CloneAbilityResult{ + CloneAbilityResultCloneable, + CloneAbilityResultNotCloneable, + CloneAbilityResultPartiallyCloneable, + } +} + +// ComputeModeOptions - Shared/dedicated workers. +type ComputeModeOptions string + +const ( + ComputeModeOptionsDedicated ComputeModeOptions = "Dedicated" + ComputeModeOptionsDynamic ComputeModeOptions = "Dynamic" + ComputeModeOptionsShared ComputeModeOptions = "Shared" +) + +// PossibleComputeModeOptionsValues returns the possible values for the ComputeModeOptions const type. +func PossibleComputeModeOptionsValues() []ComputeModeOptions { + return []ComputeModeOptions{ + ComputeModeOptionsDedicated, + ComputeModeOptionsDynamic, + ComputeModeOptionsShared, + } +} + +// ConnectionStringType - Type of database. +type ConnectionStringType string + +const ( + ConnectionStringTypeAPIHub ConnectionStringType = "ApiHub" + ConnectionStringTypeCustom ConnectionStringType = "Custom" + ConnectionStringTypeDocDb ConnectionStringType = "DocDb" + ConnectionStringTypeEventHub ConnectionStringType = "EventHub" + ConnectionStringTypeMySQL ConnectionStringType = "MySql" + ConnectionStringTypeNotificationHub ConnectionStringType = "NotificationHub" + ConnectionStringTypePostgreSQL ConnectionStringType = "PostgreSQL" + ConnectionStringTypeRedisCache ConnectionStringType = "RedisCache" + ConnectionStringTypeSQLAzure ConnectionStringType = "SQLAzure" + ConnectionStringTypeSQLServer ConnectionStringType = "SQLServer" + ConnectionStringTypeServiceBus ConnectionStringType = "ServiceBus" +) + +// PossibleConnectionStringTypeValues returns the possible values for the ConnectionStringType const type. +func PossibleConnectionStringTypeValues() []ConnectionStringType { + return []ConnectionStringType{ + ConnectionStringTypeAPIHub, + ConnectionStringTypeCustom, + ConnectionStringTypeDocDb, + ConnectionStringTypeEventHub, + ConnectionStringTypeMySQL, + ConnectionStringTypeNotificationHub, + ConnectionStringTypePostgreSQL, + ConnectionStringTypeRedisCache, + ConnectionStringTypeSQLAzure, + ConnectionStringTypeSQLServer, + ConnectionStringTypeServiceBus, + } +} + +// ContainerAppProvisioningState - Provisioning state of the Container App. +type ContainerAppProvisioningState string + +const ( + ContainerAppProvisioningStateCanceled ContainerAppProvisioningState = "Canceled" + ContainerAppProvisioningStateFailed ContainerAppProvisioningState = "Failed" + ContainerAppProvisioningStateInProgress ContainerAppProvisioningState = "InProgress" + ContainerAppProvisioningStateSucceeded ContainerAppProvisioningState = "Succeeded" +) + +// PossibleContainerAppProvisioningStateValues returns the possible values for the ContainerAppProvisioningState const type. +func PossibleContainerAppProvisioningStateValues() []ContainerAppProvisioningState { + return []ContainerAppProvisioningState{ + ContainerAppProvisioningStateCanceled, + ContainerAppProvisioningStateFailed, + ContainerAppProvisioningStateInProgress, + ContainerAppProvisioningStateSucceeded, + } +} + +// ContinuousWebJobStatus - Job status. +type ContinuousWebJobStatus string + +const ( + ContinuousWebJobStatusInitializing ContinuousWebJobStatus = "Initializing" + ContinuousWebJobStatusPendingRestart ContinuousWebJobStatus = "PendingRestart" + ContinuousWebJobStatusRunning ContinuousWebJobStatus = "Running" + ContinuousWebJobStatusStarting ContinuousWebJobStatus = "Starting" + ContinuousWebJobStatusStopped ContinuousWebJobStatus = "Stopped" +) + +// PossibleContinuousWebJobStatusValues returns the possible values for the ContinuousWebJobStatus const type. +func PossibleContinuousWebJobStatusValues() []ContinuousWebJobStatus { + return []ContinuousWebJobStatus{ + ContinuousWebJobStatusInitializing, + ContinuousWebJobStatusPendingRestart, + ContinuousWebJobStatusRunning, + ContinuousWebJobStatusStarting, + ContinuousWebJobStatusStopped, + } +} + +// CookieExpirationConvention - The convention used when determining the session cookie's expiration. +type CookieExpirationConvention string + +const ( + CookieExpirationConventionFixedTime CookieExpirationConvention = "FixedTime" + CookieExpirationConventionIdentityProviderDerived CookieExpirationConvention = "IdentityProviderDerived" +) + +// PossibleCookieExpirationConventionValues returns the possible values for the CookieExpirationConvention const type. +func PossibleCookieExpirationConventionValues() []CookieExpirationConvention { + return []CookieExpirationConvention{ + CookieExpirationConventionFixedTime, + CookieExpirationConventionIdentityProviderDerived, + } +} + +type CustomDNSSuffixProvisioningState string + +const ( + CustomDNSSuffixProvisioningStateDegraded CustomDNSSuffixProvisioningState = "Degraded" + CustomDNSSuffixProvisioningStateFailed CustomDNSSuffixProvisioningState = "Failed" + CustomDNSSuffixProvisioningStateInProgress CustomDNSSuffixProvisioningState = "InProgress" + CustomDNSSuffixProvisioningStateSucceeded CustomDNSSuffixProvisioningState = "Succeeded" +) + +// PossibleCustomDNSSuffixProvisioningStateValues returns the possible values for the CustomDNSSuffixProvisioningState const type. +func PossibleCustomDNSSuffixProvisioningStateValues() []CustomDNSSuffixProvisioningState { + return []CustomDNSSuffixProvisioningState{ + CustomDNSSuffixProvisioningStateDegraded, + CustomDNSSuffixProvisioningStateFailed, + CustomDNSSuffixProvisioningStateInProgress, + CustomDNSSuffixProvisioningStateSucceeded, + } +} + +// CustomDomainStatus - The status of the custom domain +type CustomDomainStatus string + +const ( + CustomDomainStatusAdding CustomDomainStatus = "Adding" + CustomDomainStatusDeleting CustomDomainStatus = "Deleting" + CustomDomainStatusFailed CustomDomainStatus = "Failed" + CustomDomainStatusReady CustomDomainStatus = "Ready" + CustomDomainStatusRetrievingValidationToken CustomDomainStatus = "RetrievingValidationToken" + CustomDomainStatusUnhealthy CustomDomainStatus = "Unhealthy" + CustomDomainStatusValidating CustomDomainStatus = "Validating" +) + +// PossibleCustomDomainStatusValues returns the possible values for the CustomDomainStatus const type. +func PossibleCustomDomainStatusValues() []CustomDomainStatus { + return []CustomDomainStatus{ + CustomDomainStatusAdding, + CustomDomainStatusDeleting, + CustomDomainStatusFailed, + CustomDomainStatusReady, + CustomDomainStatusRetrievingValidationToken, + CustomDomainStatusUnhealthy, + CustomDomainStatusValidating, + } +} + +// CustomHostNameDNSRecordType - Type of the DNS record. +type CustomHostNameDNSRecordType string + +const ( + CustomHostNameDNSRecordTypeA CustomHostNameDNSRecordType = "A" + CustomHostNameDNSRecordTypeCName CustomHostNameDNSRecordType = "CName" +) + +// PossibleCustomHostNameDNSRecordTypeValues returns the possible values for the CustomHostNameDNSRecordType const type. +func PossibleCustomHostNameDNSRecordTypeValues() []CustomHostNameDNSRecordType { + return []CustomHostNameDNSRecordType{ + CustomHostNameDNSRecordTypeA, + CustomHostNameDNSRecordTypeCName, + } +} + +// DNSType - Current DNS type +type DNSType string + +const ( + DNSTypeAzureDNS DNSType = "AzureDns" + DNSTypeDefaultDomainRegistrarDNS DNSType = "DefaultDomainRegistrarDns" +) + +// PossibleDNSTypeValues returns the possible values for the DNSType const type. +func PossibleDNSTypeValues() []DNSType { + return []DNSType{ + DNSTypeAzureDNS, + DNSTypeDefaultDomainRegistrarDNS, + } +} + +// DNSVerificationTestResult - DNS verification test result. +type DNSVerificationTestResult string + +const ( + DNSVerificationTestResultFailed DNSVerificationTestResult = "Failed" + DNSVerificationTestResultPassed DNSVerificationTestResult = "Passed" + DNSVerificationTestResultSkipped DNSVerificationTestResult = "Skipped" +) + +// PossibleDNSVerificationTestResultValues returns the possible values for the DNSVerificationTestResult const type. +func PossibleDNSVerificationTestResultValues() []DNSVerificationTestResult { + return []DNSVerificationTestResult{ + DNSVerificationTestResultFailed, + DNSVerificationTestResultPassed, + DNSVerificationTestResultSkipped, + } +} + +// DaprLogLevel - Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. +type DaprLogLevel string + +const ( + DaprLogLevelDebug DaprLogLevel = "debug" + DaprLogLevelError DaprLogLevel = "error" + DaprLogLevelInfo DaprLogLevel = "info" + DaprLogLevelWarn DaprLogLevel = "warn" +) + +// PossibleDaprLogLevelValues returns the possible values for the DaprLogLevel const type. +func PossibleDaprLogLevelValues() []DaprLogLevel { + return []DaprLogLevel{ + DaprLogLevelDebug, + DaprLogLevelError, + DaprLogLevelInfo, + DaprLogLevelWarn, + } +} + +// DatabaseType - Database type (e.g. SqlAzure / MySql). +type DatabaseType string + +const ( + DatabaseTypeLocalMySQL DatabaseType = "LocalMySql" + DatabaseTypeMySQL DatabaseType = "MySql" + DatabaseTypePostgreSQL DatabaseType = "PostgreSql" + DatabaseTypeSQLAzure DatabaseType = "SqlAzure" +) + +// PossibleDatabaseTypeValues returns the possible values for the DatabaseType const type. +func PossibleDatabaseTypeValues() []DatabaseType { + return []DatabaseType{ + DatabaseTypeLocalMySQL, + DatabaseTypeMySQL, + DatabaseTypePostgreSQL, + DatabaseTypeSQLAzure, + } +} + +// DayOfWeek - The day of the week. +type DayOfWeek string + +const ( + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{ + DayOfWeekFriday, + DayOfWeekMonday, + DayOfWeekSaturday, + DayOfWeekSunday, + DayOfWeekThursday, + DayOfWeekTuesday, + DayOfWeekWednesday, + } +} + +type DaysOfWeek string + +const ( + DaysOfWeekFriday DaysOfWeek = "Friday" + DaysOfWeekMonday DaysOfWeek = "Monday" + DaysOfWeekSaturday DaysOfWeek = "Saturday" + DaysOfWeekSunday DaysOfWeek = "Sunday" + DaysOfWeekThursday DaysOfWeek = "Thursday" + DaysOfWeekTuesday DaysOfWeek = "Tuesday" + DaysOfWeekWednesday DaysOfWeek = "Wednesday" +) + +// PossibleDaysOfWeekValues returns the possible values for the DaysOfWeek const type. +func PossibleDaysOfWeekValues() []DaysOfWeek { + return []DaysOfWeek{ + DaysOfWeekFriday, + DaysOfWeekMonday, + DaysOfWeekSaturday, + DaysOfWeekSunday, + DaysOfWeekThursday, + DaysOfWeekTuesday, + DaysOfWeekWednesday, + } +} + +// DefaultAction - Default action for main access restriction if no rules are matched. +type DefaultAction string + +const ( + DefaultActionAllow DefaultAction = "Allow" + DefaultActionDeny DefaultAction = "Deny" +) + +// PossibleDefaultActionValues returns the possible values for the DefaultAction const type. +func PossibleDefaultActionValues() []DefaultAction { + return []DefaultAction{ + DefaultActionAllow, + DefaultActionDeny, + } +} + +// DeploymentBuildStatus - Deployment build status. +type DeploymentBuildStatus string + +const ( + DeploymentBuildStatusBuildAborted DeploymentBuildStatus = "BuildAborted" + DeploymentBuildStatusBuildFailed DeploymentBuildStatus = "BuildFailed" + DeploymentBuildStatusBuildInProgress DeploymentBuildStatus = "BuildInProgress" + DeploymentBuildStatusBuildPending DeploymentBuildStatus = "BuildPending" + DeploymentBuildStatusBuildRequestReceived DeploymentBuildStatus = "BuildRequestReceived" + DeploymentBuildStatusBuildSuccessful DeploymentBuildStatus = "BuildSuccessful" + DeploymentBuildStatusPostBuildRestartRequired DeploymentBuildStatus = "PostBuildRestartRequired" + DeploymentBuildStatusRuntimeFailed DeploymentBuildStatus = "RuntimeFailed" + DeploymentBuildStatusRuntimeStarting DeploymentBuildStatus = "RuntimeStarting" + DeploymentBuildStatusRuntimeSuccessful DeploymentBuildStatus = "RuntimeSuccessful" + DeploymentBuildStatusStartPolling DeploymentBuildStatus = "StartPolling" + DeploymentBuildStatusStartPollingWithRestart DeploymentBuildStatus = "StartPollingWithRestart" + DeploymentBuildStatusTimedOut DeploymentBuildStatus = "TimedOut" +) + +// PossibleDeploymentBuildStatusValues returns the possible values for the DeploymentBuildStatus const type. +func PossibleDeploymentBuildStatusValues() []DeploymentBuildStatus { + return []DeploymentBuildStatus{ + DeploymentBuildStatusBuildAborted, + DeploymentBuildStatusBuildFailed, + DeploymentBuildStatusBuildInProgress, + DeploymentBuildStatusBuildPending, + DeploymentBuildStatusBuildRequestReceived, + DeploymentBuildStatusBuildSuccessful, + DeploymentBuildStatusPostBuildRestartRequired, + DeploymentBuildStatusRuntimeFailed, + DeploymentBuildStatusRuntimeStarting, + DeploymentBuildStatusRuntimeSuccessful, + DeploymentBuildStatusStartPolling, + DeploymentBuildStatusStartPollingWithRestart, + DeploymentBuildStatusTimedOut, + } +} + +// DetectorType - Whether this detector is an Analysis Detector or not. +type DetectorType string + +const ( + DetectorTypeAnalysis DetectorType = "Analysis" + DetectorTypeCategoryOverview DetectorType = "CategoryOverview" + DetectorTypeDetector DetectorType = "Detector" +) + +// PossibleDetectorTypeValues returns the possible values for the DetectorType const type. +func PossibleDetectorTypeValues() []DetectorType { + return []DetectorType{ + DetectorTypeAnalysis, + DetectorTypeCategoryOverview, + DetectorTypeDetector, + } +} + +// DomainStatus - Domain registration status. +type DomainStatus string + +const ( + DomainStatusActive DomainStatus = "Active" + DomainStatusAwaiting DomainStatus = "Awaiting" + DomainStatusCancelled DomainStatus = "Cancelled" + DomainStatusConfiscated DomainStatus = "Confiscated" + DomainStatusDisabled DomainStatus = "Disabled" + DomainStatusExcluded DomainStatus = "Excluded" + DomainStatusExpired DomainStatus = "Expired" + DomainStatusFailed DomainStatus = "Failed" + DomainStatusHeld DomainStatus = "Held" + DomainStatusJSONConverterFailed DomainStatus = "JsonConverterFailed" + DomainStatusLocked DomainStatus = "Locked" + DomainStatusParked DomainStatus = "Parked" + DomainStatusPending DomainStatus = "Pending" + DomainStatusReserved DomainStatus = "Reserved" + DomainStatusReverted DomainStatus = "Reverted" + DomainStatusSuspended DomainStatus = "Suspended" + DomainStatusTransferred DomainStatus = "Transferred" + DomainStatusUnknown DomainStatus = "Unknown" + DomainStatusUnlocked DomainStatus = "Unlocked" + DomainStatusUnparked DomainStatus = "Unparked" + DomainStatusUpdated DomainStatus = "Updated" +) + +// PossibleDomainStatusValues returns the possible values for the DomainStatus const type. +func PossibleDomainStatusValues() []DomainStatus { + return []DomainStatus{ + DomainStatusActive, + DomainStatusAwaiting, + DomainStatusCancelled, + DomainStatusConfiscated, + DomainStatusDisabled, + DomainStatusExcluded, + DomainStatusExpired, + DomainStatusFailed, + DomainStatusHeld, + DomainStatusJSONConverterFailed, + DomainStatusLocked, + DomainStatusParked, + DomainStatusPending, + DomainStatusReserved, + DomainStatusReverted, + DomainStatusSuspended, + DomainStatusTransferred, + DomainStatusUnknown, + DomainStatusUnlocked, + DomainStatusUnparked, + DomainStatusUpdated, + } +} + +// DomainType - Valid values are Regular domain: Azure will charge the full price of domain registration, SoftDeleted: Purchasing +// this domain will simply restore it and this operation will not cost anything. +type DomainType string + +const ( + DomainTypeRegular DomainType = "Regular" + DomainTypeSoftDeleted DomainType = "SoftDeleted" +) + +// PossibleDomainTypeValues returns the possible values for the DomainType const type. +func PossibleDomainTypeValues() []DomainType { + return []DomainType{ + DomainTypeRegular, + DomainTypeSoftDeleted, + } +} + +// EnterpriseGradeCdnStatus - State indicating the status of the enterprise grade CDN serving traffic to the static web app. +type EnterpriseGradeCdnStatus string + +const ( + EnterpriseGradeCdnStatusDisabled EnterpriseGradeCdnStatus = "Disabled" + EnterpriseGradeCdnStatusDisabling EnterpriseGradeCdnStatus = "Disabling" + EnterpriseGradeCdnStatusEnabled EnterpriseGradeCdnStatus = "Enabled" + EnterpriseGradeCdnStatusEnabling EnterpriseGradeCdnStatus = "Enabling" +) + +// PossibleEnterpriseGradeCdnStatusValues returns the possible values for the EnterpriseGradeCdnStatus const type. +func PossibleEnterpriseGradeCdnStatusValues() []EnterpriseGradeCdnStatus { + return []EnterpriseGradeCdnStatus{ + EnterpriseGradeCdnStatusDisabled, + EnterpriseGradeCdnStatusDisabling, + EnterpriseGradeCdnStatusEnabled, + EnterpriseGradeCdnStatusEnabling, + } +} + +// ForwardProxyConvention - The convention used to determine the url of the request made. +type ForwardProxyConvention string + +const ( + ForwardProxyConventionCustom ForwardProxyConvention = "Custom" + ForwardProxyConventionNoProxy ForwardProxyConvention = "NoProxy" + ForwardProxyConventionStandard ForwardProxyConvention = "Standard" +) + +// PossibleForwardProxyConventionValues returns the possible values for the ForwardProxyConvention const type. +func PossibleForwardProxyConventionValues() []ForwardProxyConvention { + return []ForwardProxyConvention{ + ForwardProxyConventionCustom, + ForwardProxyConventionNoProxy, + ForwardProxyConventionStandard, + } +} + +// FrequencyUnit - The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set +// to Day and FrequencyInterval should be set to 7) +type FrequencyUnit string + +const ( + FrequencyUnitDay FrequencyUnit = "Day" + FrequencyUnitHour FrequencyUnit = "Hour" +) + +// PossibleFrequencyUnitValues returns the possible values for the FrequencyUnit const type. +func PossibleFrequencyUnitValues() []FrequencyUnit { + return []FrequencyUnit{ + FrequencyUnitDay, + FrequencyUnitHour, + } +} + +type FrontEndServiceType string + +const ( + FrontEndServiceTypeLoadBalancer FrontEndServiceType = "LoadBalancer" + FrontEndServiceTypeNodePort FrontEndServiceType = "NodePort" +) + +// PossibleFrontEndServiceTypeValues returns the possible values for the FrontEndServiceType const type. +func PossibleFrontEndServiceTypeValues() []FrontEndServiceType { + return []FrontEndServiceType{ + FrontEndServiceTypeLoadBalancer, + FrontEndServiceTypeNodePort, + } +} + +// FtpsState - State of FTP / FTPS service +type FtpsState string + +const ( + FtpsStateAllAllowed FtpsState = "AllAllowed" + FtpsStateDisabled FtpsState = "Disabled" + FtpsStateFtpsOnly FtpsState = "FtpsOnly" +) + +// PossibleFtpsStateValues returns the possible values for the FtpsState const type. +func PossibleFtpsStateValues() []FtpsState { + return []FtpsState{ + FtpsStateAllAllowed, + FtpsStateDisabled, + FtpsStateFtpsOnly, + } +} + +// FunctionsDeploymentStorageType - Property to select Azure Storage type. Available options: blobContainer. +type FunctionsDeploymentStorageType string + +const ( + FunctionsDeploymentStorageTypeBlobContainer FunctionsDeploymentStorageType = "blobContainer" +) + +// PossibleFunctionsDeploymentStorageTypeValues returns the possible values for the FunctionsDeploymentStorageType const type. +func PossibleFunctionsDeploymentStorageTypeValues() []FunctionsDeploymentStorageType { + return []FunctionsDeploymentStorageType{ + FunctionsDeploymentStorageTypeBlobContainer, + } +} + +// HostNameType - Type of the hostname. +type HostNameType string + +const ( + HostNameTypeManaged HostNameType = "Managed" + HostNameTypeVerified HostNameType = "Verified" +) + +// PossibleHostNameTypeValues returns the possible values for the HostNameType const type. +func PossibleHostNameTypeValues() []HostNameType { + return []HostNameType{ + HostNameTypeManaged, + HostNameTypeVerified, + } +} + +// HostType - Indicates whether the hostname is a standard or repository hostname. +type HostType string + +const ( + HostTypeRepository HostType = "Repository" + HostTypeStandard HostType = "Standard" +) + +// PossibleHostTypeValues returns the possible values for the HostType const type. +func PossibleHostTypeValues() []HostType { + return []HostType{ + HostTypeRepository, + HostTypeStandard, + } +} + +// HostingEnvironmentStatus - Current status of the App Service Environment. +type HostingEnvironmentStatus string + +const ( + HostingEnvironmentStatusDeleting HostingEnvironmentStatus = "Deleting" + HostingEnvironmentStatusPreparing HostingEnvironmentStatus = "Preparing" + HostingEnvironmentStatusReady HostingEnvironmentStatus = "Ready" + HostingEnvironmentStatusScaling HostingEnvironmentStatus = "Scaling" +) + +// PossibleHostingEnvironmentStatusValues returns the possible values for the HostingEnvironmentStatus const type. +func PossibleHostingEnvironmentStatusValues() []HostingEnvironmentStatus { + return []HostingEnvironmentStatus{ + HostingEnvironmentStatusDeleting, + HostingEnvironmentStatusPreparing, + HostingEnvironmentStatusReady, + HostingEnvironmentStatusScaling, + } +} + +// IPFilterTag - Defines what this IP filter will be used for. This is to support IP filtering on proxies. +type IPFilterTag string + +const ( + IPFilterTagDefault IPFilterTag = "Default" + IPFilterTagServiceTag IPFilterTag = "ServiceTag" + IPFilterTagXffProxy IPFilterTag = "XffProxy" +) + +// PossibleIPFilterTagValues returns the possible values for the IPFilterTag const type. +func PossibleIPFilterTagValues() []IPFilterTag { + return []IPFilterTag{ + IPFilterTagDefault, + IPFilterTagServiceTag, + IPFilterTagXffProxy, + } +} + +// IPMode - Specifies the IP mode of the app. +type IPMode string + +const ( + IPModeIPv4 IPMode = "IPv4" + IPModeIPv4AndIPv6 IPMode = "IPv4AndIPv6" + IPModeIPv6 IPMode = "IPv6" +) + +// PossibleIPModeValues returns the possible values for the IPMode const type. +func PossibleIPModeValues() []IPMode { + return []IPMode{ + IPModeIPv4, + IPModeIPv4AndIPv6, + IPModeIPv6, + } +} + +// InAvailabilityReasonType - Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists +// indicates that the name is already in use and is therefore unavailable. +type InAvailabilityReasonType string + +const ( + InAvailabilityReasonTypeAlreadyExists InAvailabilityReasonType = "AlreadyExists" + InAvailabilityReasonTypeInvalid InAvailabilityReasonType = "Invalid" +) + +// PossibleInAvailabilityReasonTypeValues returns the possible values for the InAvailabilityReasonType const type. +func PossibleInAvailabilityReasonTypeValues() []InAvailabilityReasonType { + return []InAvailabilityReasonType{ + InAvailabilityReasonTypeAlreadyExists, + InAvailabilityReasonTypeInvalid, + } +} + +// IngressTransportMethod - Ingress transport protocol +type IngressTransportMethod string + +const ( + IngressTransportMethodAuto IngressTransportMethod = "auto" + IngressTransportMethodHTTP IngressTransportMethod = "http" + IngressTransportMethodHTTP2 IngressTransportMethod = "http2" +) + +// PossibleIngressTransportMethodValues returns the possible values for the IngressTransportMethod const type. +func PossibleIngressTransportMethodValues() []IngressTransportMethod { + return []IngressTransportMethod{ + IngressTransportMethodAuto, + IngressTransportMethodHTTP, + IngressTransportMethodHTTP2, + } +} + +// InsightStatus - Level of the most severe insight generated by the detector. +type InsightStatus string + +const ( + InsightStatusCritical InsightStatus = "Critical" + InsightStatusInfo InsightStatus = "Info" + InsightStatusNone InsightStatus = "None" + InsightStatusSuccess InsightStatus = "Success" + InsightStatusWarning InsightStatus = "Warning" +) + +// PossibleInsightStatusValues returns the possible values for the InsightStatus const type. +func PossibleInsightStatusValues() []InsightStatus { + return []InsightStatus{ + InsightStatusCritical, + InsightStatusInfo, + InsightStatusNone, + InsightStatusSuccess, + InsightStatusWarning, + } +} + +// IssueType - Represents the type of the Detector +type IssueType string + +const ( + IssueTypeAppCrash IssueType = "AppCrash" + IssueTypeAppDeployment IssueType = "AppDeployment" + IssueTypeAseDeployment IssueType = "AseDeployment" + IssueTypeOther IssueType = "Other" + IssueTypePlatformIssue IssueType = "PlatformIssue" + IssueTypeRuntimeIssueDetected IssueType = "RuntimeIssueDetected" + IssueTypeServiceIncident IssueType = "ServiceIncident" + IssueTypeUserIssue IssueType = "UserIssue" +) + +// PossibleIssueTypeValues returns the possible values for the IssueType const type. +func PossibleIssueTypeValues() []IssueType { + return []IssueType{ + IssueTypeAppCrash, + IssueTypeAppDeployment, + IssueTypeAseDeployment, + IssueTypeOther, + IssueTypePlatformIssue, + IssueTypeRuntimeIssueDetected, + IssueTypeServiceIncident, + IssueTypeUserIssue, + } +} + +// KeyType - The key type. +type KeyType string + +const ( + KeyTypeNotSpecified KeyType = "NotSpecified" + KeyTypePrimary KeyType = "Primary" + KeyTypeSecondary KeyType = "Secondary" +) + +// PossibleKeyTypeValues returns the possible values for the KeyType const type. +func PossibleKeyTypeValues() []KeyType { + return []KeyType{ + KeyTypeNotSpecified, + KeyTypePrimary, + KeyTypeSecondary, + } +} + +// KeyVaultSecretStatus - Status of the Key Vault secret. +type KeyVaultSecretStatus string + +const ( + KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault KeyVaultSecretStatus = "AzureServiceUnauthorizedToAccessKeyVault" + KeyVaultSecretStatusCertificateOrderFailed KeyVaultSecretStatus = "CertificateOrderFailed" + KeyVaultSecretStatusExternalPrivateKey KeyVaultSecretStatus = "ExternalPrivateKey" + KeyVaultSecretStatusInitialized KeyVaultSecretStatus = "Initialized" + KeyVaultSecretStatusKeyVaultDoesNotExist KeyVaultSecretStatus = "KeyVaultDoesNotExist" + KeyVaultSecretStatusKeyVaultSecretDoesNotExist KeyVaultSecretStatus = "KeyVaultSecretDoesNotExist" + KeyVaultSecretStatusOperationNotPermittedOnKeyVault KeyVaultSecretStatus = "OperationNotPermittedOnKeyVault" + KeyVaultSecretStatusSucceeded KeyVaultSecretStatus = "Succeeded" + KeyVaultSecretStatusUnknown KeyVaultSecretStatus = "Unknown" + KeyVaultSecretStatusUnknownError KeyVaultSecretStatus = "UnknownError" + KeyVaultSecretStatusWaitingOnCertificateOrder KeyVaultSecretStatus = "WaitingOnCertificateOrder" +) + +// PossibleKeyVaultSecretStatusValues returns the possible values for the KeyVaultSecretStatus const type. +func PossibleKeyVaultSecretStatusValues() []KeyVaultSecretStatus { + return []KeyVaultSecretStatus{ + KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault, + KeyVaultSecretStatusCertificateOrderFailed, + KeyVaultSecretStatusExternalPrivateKey, + KeyVaultSecretStatusInitialized, + KeyVaultSecretStatusKeyVaultDoesNotExist, + KeyVaultSecretStatusKeyVaultSecretDoesNotExist, + KeyVaultSecretStatusOperationNotPermittedOnKeyVault, + KeyVaultSecretStatusSucceeded, + KeyVaultSecretStatusUnknown, + KeyVaultSecretStatusUnknownError, + KeyVaultSecretStatusWaitingOnCertificateOrder, + } +} + +// Kind - The workflow kind. +type Kind string + +const ( + KindStateful Kind = "Stateful" + KindStateless Kind = "Stateless" +) + +// PossibleKindValues returns the possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{ + KindStateful, + KindStateless, + } +} + +// KubeEnvironmentProvisioningState - Provisioning state of the Kubernetes Environment. +type KubeEnvironmentProvisioningState string + +const ( + KubeEnvironmentProvisioningStateCanceled KubeEnvironmentProvisioningState = "Canceled" + KubeEnvironmentProvisioningStateFailed KubeEnvironmentProvisioningState = "Failed" + KubeEnvironmentProvisioningStateInfrastructureSetupComplete KubeEnvironmentProvisioningState = "InfrastructureSetupComplete" + KubeEnvironmentProvisioningStateInfrastructureSetupInProgress KubeEnvironmentProvisioningState = "InfrastructureSetupInProgress" + KubeEnvironmentProvisioningStateInitializationInProgress KubeEnvironmentProvisioningState = "InitializationInProgress" + KubeEnvironmentProvisioningStateScheduledForDelete KubeEnvironmentProvisioningState = "ScheduledForDelete" + KubeEnvironmentProvisioningStateSucceeded KubeEnvironmentProvisioningState = "Succeeded" + KubeEnvironmentProvisioningStateUpgradeFailed KubeEnvironmentProvisioningState = "UpgradeFailed" + KubeEnvironmentProvisioningStateUpgradeRequested KubeEnvironmentProvisioningState = "UpgradeRequested" + KubeEnvironmentProvisioningStateWaiting KubeEnvironmentProvisioningState = "Waiting" +) + +// PossibleKubeEnvironmentProvisioningStateValues returns the possible values for the KubeEnvironmentProvisioningState const type. +func PossibleKubeEnvironmentProvisioningStateValues() []KubeEnvironmentProvisioningState { + return []KubeEnvironmentProvisioningState{ + KubeEnvironmentProvisioningStateCanceled, + KubeEnvironmentProvisioningStateFailed, + KubeEnvironmentProvisioningStateInfrastructureSetupComplete, + KubeEnvironmentProvisioningStateInfrastructureSetupInProgress, + KubeEnvironmentProvisioningStateInitializationInProgress, + KubeEnvironmentProvisioningStateScheduledForDelete, + KubeEnvironmentProvisioningStateSucceeded, + KubeEnvironmentProvisioningStateUpgradeFailed, + KubeEnvironmentProvisioningStateUpgradeRequested, + KubeEnvironmentProvisioningStateWaiting, + } +} + +// LoadBalancingMode - Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. +type LoadBalancingMode string + +const ( + LoadBalancingModeNone LoadBalancingMode = "None" + LoadBalancingModePublishing LoadBalancingMode = "Publishing" + LoadBalancingModeWeb LoadBalancingMode = "Web" + LoadBalancingModeWebPublishing LoadBalancingMode = "Web, Publishing" +) + +// PossibleLoadBalancingModeValues returns the possible values for the LoadBalancingMode const type. +func PossibleLoadBalancingModeValues() []LoadBalancingMode { + return []LoadBalancingMode{ + LoadBalancingModeNone, + LoadBalancingModePublishing, + LoadBalancingModeWeb, + LoadBalancingModeWebPublishing, + } +} + +// LogLevel - Log level. +type LogLevel string + +const ( + LogLevelError LogLevel = "Error" + LogLevelInformation LogLevel = "Information" + LogLevelOff LogLevel = "Off" + LogLevelVerbose LogLevel = "Verbose" + LogLevelWarning LogLevel = "Warning" +) + +// PossibleLogLevelValues returns the possible values for the LogLevel const type. +func PossibleLogLevelValues() []LogLevel { + return []LogLevel{ + LogLevelError, + LogLevelInformation, + LogLevelOff, + LogLevelVerbose, + LogLevelWarning, + } +} + +// MSDeployLogEntryType - Log entry type +type MSDeployLogEntryType string + +const ( + MSDeployLogEntryTypeError MSDeployLogEntryType = "Error" + MSDeployLogEntryTypeMessage MSDeployLogEntryType = "Message" + MSDeployLogEntryTypeWarning MSDeployLogEntryType = "Warning" +) + +// PossibleMSDeployLogEntryTypeValues returns the possible values for the MSDeployLogEntryType const type. +func PossibleMSDeployLogEntryTypeValues() []MSDeployLogEntryType { + return []MSDeployLogEntryType{ + MSDeployLogEntryTypeError, + MSDeployLogEntryTypeMessage, + MSDeployLogEntryTypeWarning, + } +} + +// MSDeployProvisioningState - Provisioning state +type MSDeployProvisioningState string + +const ( + MSDeployProvisioningStateAccepted MSDeployProvisioningState = "accepted" + MSDeployProvisioningStateCanceled MSDeployProvisioningState = "canceled" + MSDeployProvisioningStateFailed MSDeployProvisioningState = "failed" + MSDeployProvisioningStateRunning MSDeployProvisioningState = "running" + MSDeployProvisioningStateSucceeded MSDeployProvisioningState = "succeeded" +) + +// PossibleMSDeployProvisioningStateValues returns the possible values for the MSDeployProvisioningState const type. +func PossibleMSDeployProvisioningStateValues() []MSDeployProvisioningState { + return []MSDeployProvisioningState{ + MSDeployProvisioningStateAccepted, + MSDeployProvisioningStateCanceled, + MSDeployProvisioningStateFailed, + MSDeployProvisioningStateRunning, + MSDeployProvisioningStateSucceeded, + } +} + +// ManagedPipelineMode - Managed pipeline mode. +type ManagedPipelineMode string + +const ( + ManagedPipelineModeClassic ManagedPipelineMode = "Classic" + ManagedPipelineModeIntegrated ManagedPipelineMode = "Integrated" +) + +// PossibleManagedPipelineModeValues returns the possible values for the ManagedPipelineMode const type. +func PossibleManagedPipelineModeValues() []ManagedPipelineMode { + return []ManagedPipelineMode{ + ManagedPipelineModeClassic, + ManagedPipelineModeIntegrated, + } +} + +// ManagedServiceIdentityType - Type of managed service identity. +type ManagedServiceIdentityType string + +const ( + ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" + ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" + ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned" + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{ + ManagedServiceIdentityTypeNone, + ManagedServiceIdentityTypeSystemAssigned, + ManagedServiceIdentityTypeSystemAssignedUserAssigned, + ManagedServiceIdentityTypeUserAssigned, + } +} + +// MySQLMigrationType - The type of migration operation to be done +type MySQLMigrationType string + +const ( + MySQLMigrationTypeLocalToRemote MySQLMigrationType = "LocalToRemote" + MySQLMigrationTypeRemoteToLocal MySQLMigrationType = "RemoteToLocal" +) + +// PossibleMySQLMigrationTypeValues returns the possible values for the MySQLMigrationType const type. +func PossibleMySQLMigrationTypeValues() []MySQLMigrationType { + return []MySQLMigrationType{ + MySQLMigrationTypeLocalToRemote, + MySQLMigrationTypeRemoteToLocal, + } +} + +// NotificationLevel - Level indicating how critical this recommendation can impact. +type NotificationLevel string + +const ( + NotificationLevelCritical NotificationLevel = "Critical" + NotificationLevelInformation NotificationLevel = "Information" + NotificationLevelNonUrgentSuggestion NotificationLevel = "NonUrgentSuggestion" + NotificationLevelWarning NotificationLevel = "Warning" +) + +// PossibleNotificationLevelValues returns the possible values for the NotificationLevel const type. +func PossibleNotificationLevelValues() []NotificationLevel { + return []NotificationLevel{ + NotificationLevelCritical, + NotificationLevelInformation, + NotificationLevelNonUrgentSuggestion, + NotificationLevelWarning, + } +} + +// OpenAuthenticationProviderType - Open authentication policy provider type. +type OpenAuthenticationProviderType string + +const ( + OpenAuthenticationProviderTypeAAD OpenAuthenticationProviderType = "AAD" +) + +// PossibleOpenAuthenticationProviderTypeValues returns the possible values for the OpenAuthenticationProviderType const type. +func PossibleOpenAuthenticationProviderTypeValues() []OpenAuthenticationProviderType { + return []OpenAuthenticationProviderType{ + OpenAuthenticationProviderTypeAAD, + } +} + +// OperationStatus - The current status of the operation. +type OperationStatus string + +const ( + OperationStatusCreated OperationStatus = "Created" + OperationStatusFailed OperationStatus = "Failed" + OperationStatusInProgress OperationStatus = "InProgress" + OperationStatusSucceeded OperationStatus = "Succeeded" + OperationStatusTimedOut OperationStatus = "TimedOut" +) + +// PossibleOperationStatusValues returns the possible values for the OperationStatus const type. +func PossibleOperationStatusValues() []OperationStatus { + return []OperationStatus{ + OperationStatusCreated, + OperationStatusFailed, + OperationStatusInProgress, + OperationStatusSucceeded, + OperationStatusTimedOut, + } +} + +// ParameterType - The parameter type. +type ParameterType string + +const ( + ParameterTypeArray ParameterType = "Array" + ParameterTypeBool ParameterType = "Bool" + ParameterTypeFloat ParameterType = "Float" + ParameterTypeInt ParameterType = "Int" + ParameterTypeNotSpecified ParameterType = "NotSpecified" + ParameterTypeObject ParameterType = "Object" + ParameterTypeSecureObject ParameterType = "SecureObject" + ParameterTypeSecureString ParameterType = "SecureString" + ParameterTypeString ParameterType = "String" +) + +// PossibleParameterTypeValues returns the possible values for the ParameterType const type. +func PossibleParameterTypeValues() []ParameterType { + return []ParameterType{ + ParameterTypeArray, + ParameterTypeBool, + ParameterTypeFloat, + ParameterTypeInt, + ParameterTypeNotSpecified, + ParameterTypeObject, + ParameterTypeSecureObject, + ParameterTypeSecureString, + ParameterTypeString, + } +} + +type ProviderOsTypeSelected string + +const ( + ProviderOsTypeSelectedAll ProviderOsTypeSelected = "All" + ProviderOsTypeSelectedLinux ProviderOsTypeSelected = "Linux" + ProviderOsTypeSelectedLinuxFunctions ProviderOsTypeSelected = "LinuxFunctions" + ProviderOsTypeSelectedWindows ProviderOsTypeSelected = "Windows" + ProviderOsTypeSelectedWindowsFunctions ProviderOsTypeSelected = "WindowsFunctions" +) + +// PossibleProviderOsTypeSelectedValues returns the possible values for the ProviderOsTypeSelected const type. +func PossibleProviderOsTypeSelectedValues() []ProviderOsTypeSelected { + return []ProviderOsTypeSelected{ + ProviderOsTypeSelectedAll, + ProviderOsTypeSelectedLinux, + ProviderOsTypeSelectedLinuxFunctions, + ProviderOsTypeSelectedWindows, + ProviderOsTypeSelectedWindowsFunctions, + } +} + +type ProviderStackOsType string + +const ( + ProviderStackOsTypeAll ProviderStackOsType = "All" + ProviderStackOsTypeLinux ProviderStackOsType = "Linux" + ProviderStackOsTypeWindows ProviderStackOsType = "Windows" +) + +// PossibleProviderStackOsTypeValues returns the possible values for the ProviderStackOsType const type. +func PossibleProviderStackOsTypeValues() []ProviderStackOsType { + return []ProviderStackOsType{ + ProviderStackOsTypeAll, + ProviderStackOsTypeLinux, + ProviderStackOsTypeWindows, + } +} + +// ProvisioningState - Status of certificate order. +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateInProgress ProvisioningState = "InProgress" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateCanceled, + ProvisioningStateDeleting, + ProvisioningStateFailed, + ProvisioningStateInProgress, + ProvisioningStateSucceeded, + } +} + +// PublicCertificateLocation - Public Certificate Location +type PublicCertificateLocation string + +const ( + PublicCertificateLocationCurrentUserMy PublicCertificateLocation = "CurrentUserMy" + PublicCertificateLocationLocalMachineMy PublicCertificateLocation = "LocalMachineMy" + PublicCertificateLocationUnknown PublicCertificateLocation = "Unknown" +) + +// PossiblePublicCertificateLocationValues returns the possible values for the PublicCertificateLocation const type. +func PossiblePublicCertificateLocationValues() []PublicCertificateLocation { + return []PublicCertificateLocation{ + PublicCertificateLocationCurrentUserMy, + PublicCertificateLocationLocalMachineMy, + PublicCertificateLocationUnknown, + } +} + +// PublishingProfileFormat - Name of the format. Valid values are: FileZilla3 WebDeploy -- default Ftp +type PublishingProfileFormat string + +const ( + PublishingProfileFormatFileZilla3 PublishingProfileFormat = "FileZilla3" + PublishingProfileFormatFtp PublishingProfileFormat = "Ftp" + PublishingProfileFormatWebDeploy PublishingProfileFormat = "WebDeploy" +) + +// PossiblePublishingProfileFormatValues returns the possible values for the PublishingProfileFormat const type. +func PossiblePublishingProfileFormatValues() []PublishingProfileFormat { + return []PublishingProfileFormat{ + PublishingProfileFormatFileZilla3, + PublishingProfileFormatFtp, + PublishingProfileFormatWebDeploy, + } +} + +// RecurrenceFrequency - The recurrence frequency. +type RecurrenceFrequency string + +const ( + RecurrenceFrequencyDay RecurrenceFrequency = "Day" + RecurrenceFrequencyHour RecurrenceFrequency = "Hour" + RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" + RecurrenceFrequencyMonth RecurrenceFrequency = "Month" + RecurrenceFrequencyNotSpecified RecurrenceFrequency = "NotSpecified" + RecurrenceFrequencySecond RecurrenceFrequency = "Second" + RecurrenceFrequencyWeek RecurrenceFrequency = "Week" + RecurrenceFrequencyYear RecurrenceFrequency = "Year" +) + +// PossibleRecurrenceFrequencyValues returns the possible values for the RecurrenceFrequency const type. +func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency { + return []RecurrenceFrequency{ + RecurrenceFrequencyDay, + RecurrenceFrequencyHour, + RecurrenceFrequencyMinute, + RecurrenceFrequencyMonth, + RecurrenceFrequencyNotSpecified, + RecurrenceFrequencySecond, + RecurrenceFrequencyWeek, + RecurrenceFrequencyYear, + } +} + +// RedundancyMode - Site redundancy mode +type RedundancyMode string + +const ( + RedundancyModeActiveActive RedundancyMode = "ActiveActive" + RedundancyModeFailover RedundancyMode = "Failover" + RedundancyModeGeoRedundant RedundancyMode = "GeoRedundant" + RedundancyModeManual RedundancyMode = "Manual" + RedundancyModeNone RedundancyMode = "None" +) + +// PossibleRedundancyModeValues returns the possible values for the RedundancyMode const type. +func PossibleRedundancyModeValues() []RedundancyMode { + return []RedundancyMode{ + RedundancyModeActiveActive, + RedundancyModeFailover, + RedundancyModeGeoRedundant, + RedundancyModeManual, + RedundancyModeNone, + } +} + +// RenderingType - Rendering Type +type RenderingType string + +const ( + RenderingTypeAppInsight RenderingType = "AppInsight" + RenderingTypeAppInsightEnablement RenderingType = "AppInsightEnablement" + RenderingTypeCard RenderingType = "Card" + RenderingTypeChangeAnalysisOnboarding RenderingType = "ChangeAnalysisOnboarding" + RenderingTypeChangeSets RenderingType = "ChangeSets" + RenderingTypeChangesView RenderingType = "ChangesView" + RenderingTypeDataSummary RenderingType = "DataSummary" + RenderingTypeDependencyGraph RenderingType = "DependencyGraph" + RenderingTypeDetector RenderingType = "Detector" + RenderingTypeDownTime RenderingType = "DownTime" + RenderingTypeDropDown RenderingType = "DropDown" + RenderingTypeDynamicInsight RenderingType = "DynamicInsight" + RenderingTypeEmail RenderingType = "Email" + RenderingTypeForm RenderingType = "Form" + RenderingTypeGuage RenderingType = "Guage" + RenderingTypeInsights RenderingType = "Insights" + RenderingTypeMarkdown RenderingType = "Markdown" + RenderingTypeNoGraph RenderingType = "NoGraph" + RenderingTypePieChart RenderingType = "PieChart" + RenderingTypeSearchComponent RenderingType = "SearchComponent" + RenderingTypeSolution RenderingType = "Solution" + RenderingTypeSummaryCard RenderingType = "SummaryCard" + RenderingTypeTable RenderingType = "Table" + RenderingTypeTimeSeries RenderingType = "TimeSeries" + RenderingTypeTimeSeriesPerInstance RenderingType = "TimeSeriesPerInstance" +) + +// PossibleRenderingTypeValues returns the possible values for the RenderingType const type. +func PossibleRenderingTypeValues() []RenderingType { + return []RenderingType{ + RenderingTypeAppInsight, + RenderingTypeAppInsightEnablement, + RenderingTypeCard, + RenderingTypeChangeAnalysisOnboarding, + RenderingTypeChangeSets, + RenderingTypeChangesView, + RenderingTypeDataSummary, + RenderingTypeDependencyGraph, + RenderingTypeDetector, + RenderingTypeDownTime, + RenderingTypeDropDown, + RenderingTypeDynamicInsight, + RenderingTypeEmail, + RenderingTypeForm, + RenderingTypeGuage, + RenderingTypeInsights, + RenderingTypeMarkdown, + RenderingTypeNoGraph, + RenderingTypePieChart, + RenderingTypeSearchComponent, + RenderingTypeSolution, + RenderingTypeSummaryCard, + RenderingTypeTable, + RenderingTypeTimeSeries, + RenderingTypeTimeSeriesPerInstance, + } +} + +type ResolveStatus string + +const ( + ResolveStatusAccessToKeyVaultDenied ResolveStatus = "AccessToKeyVaultDenied" + ResolveStatusFetchTimedOut ResolveStatus = "FetchTimedOut" + ResolveStatusInitialized ResolveStatus = "Initialized" + ResolveStatusInvalidSyntax ResolveStatus = "InvalidSyntax" + ResolveStatusMSINotEnabled ResolveStatus = "MSINotEnabled" + ResolveStatusOtherReasons ResolveStatus = "OtherReasons" + ResolveStatusResolved ResolveStatus = "Resolved" + ResolveStatusSecretNotFound ResolveStatus = "SecretNotFound" + ResolveStatusSecretVersionNotFound ResolveStatus = "SecretVersionNotFound" + ResolveStatusUnauthorizedClient ResolveStatus = "UnauthorizedClient" + ResolveStatusVaultNotFound ResolveStatus = "VaultNotFound" +) + +// PossibleResolveStatusValues returns the possible values for the ResolveStatus const type. +func PossibleResolveStatusValues() []ResolveStatus { + return []ResolveStatus{ + ResolveStatusAccessToKeyVaultDenied, + ResolveStatusFetchTimedOut, + ResolveStatusInitialized, + ResolveStatusInvalidSyntax, + ResolveStatusMSINotEnabled, + ResolveStatusOtherReasons, + ResolveStatusResolved, + ResolveStatusSecretNotFound, + ResolveStatusSecretVersionNotFound, + ResolveStatusUnauthorizedClient, + ResolveStatusVaultNotFound, + } +} + +type ResourceNotRenewableReason string + +const ( + ResourceNotRenewableReasonExpirationNotInRenewalTimeRange ResourceNotRenewableReason = "ExpirationNotInRenewalTimeRange" + ResourceNotRenewableReasonRegistrationStatusNotSupportedForRenewal ResourceNotRenewableReason = "RegistrationStatusNotSupportedForRenewal" + ResourceNotRenewableReasonSubscriptionNotActive ResourceNotRenewableReason = "SubscriptionNotActive" +) + +// PossibleResourceNotRenewableReasonValues returns the possible values for the ResourceNotRenewableReason const type. +func PossibleResourceNotRenewableReasonValues() []ResourceNotRenewableReason { + return []ResourceNotRenewableReason{ + ResourceNotRenewableReasonExpirationNotInRenewalTimeRange, + ResourceNotRenewableReasonRegistrationStatusNotSupportedForRenewal, + ResourceNotRenewableReasonSubscriptionNotActive, + } +} + +// ResourceScopeType - Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. +type ResourceScopeType string + +const ( + ResourceScopeTypeServerFarm ResourceScopeType = "ServerFarm" + ResourceScopeTypeSubscription ResourceScopeType = "Subscription" + ResourceScopeTypeWebSite ResourceScopeType = "WebSite" +) + +// PossibleResourceScopeTypeValues returns the possible values for the ResourceScopeType const type. +func PossibleResourceScopeTypeValues() []ResourceScopeType { + return []ResourceScopeType{ + ResourceScopeTypeServerFarm, + ResourceScopeTypeSubscription, + ResourceScopeTypeWebSite, + } +} + +// RevisionHealthState - Current health State of the revision +type RevisionHealthState string + +const ( + RevisionHealthStateHealthy RevisionHealthState = "Healthy" + RevisionHealthStateNone RevisionHealthState = "None" + RevisionHealthStateUnhealthy RevisionHealthState = "Unhealthy" +) + +// PossibleRevisionHealthStateValues returns the possible values for the RevisionHealthState const type. +func PossibleRevisionHealthStateValues() []RevisionHealthState { + return []RevisionHealthState{ + RevisionHealthStateHealthy, + RevisionHealthStateNone, + RevisionHealthStateUnhealthy, + } +} + +// RevisionProvisioningState - Current provisioning State of the revision +type RevisionProvisioningState string + +const ( + RevisionProvisioningStateDeprovisioned RevisionProvisioningState = "Deprovisioned" + RevisionProvisioningStateDeprovisioning RevisionProvisioningState = "Deprovisioning" + RevisionProvisioningStateFailed RevisionProvisioningState = "Failed" + RevisionProvisioningStateProvisioned RevisionProvisioningState = "Provisioned" + RevisionProvisioningStateProvisioning RevisionProvisioningState = "Provisioning" +) + +// PossibleRevisionProvisioningStateValues returns the possible values for the RevisionProvisioningState const type. +func PossibleRevisionProvisioningStateValues() []RevisionProvisioningState { + return []RevisionProvisioningState{ + RevisionProvisioningStateDeprovisioned, + RevisionProvisioningStateDeprovisioning, + RevisionProvisioningStateFailed, + RevisionProvisioningStateProvisioned, + RevisionProvisioningStateProvisioning, + } +} + +// 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. +type RouteType string + +const ( + RouteTypeDEFAULT RouteType = "DEFAULT" + RouteTypeINHERITED RouteType = "INHERITED" + RouteTypeSTATIC RouteType = "STATIC" +) + +// PossibleRouteTypeValues returns the possible values for the RouteType const type. +func PossibleRouteTypeValues() []RouteType { + return []RouteType{ + RouteTypeDEFAULT, + RouteTypeINHERITED, + RouteTypeSTATIC, + } +} + +// RuntimeName - Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom +type RuntimeName string + +const ( + RuntimeNameCustom RuntimeName = "custom" + RuntimeNameDotnetIsolated RuntimeName = "dotnet-isolated" + RuntimeNameJava RuntimeName = "java" + RuntimeNameNode RuntimeName = "node" + RuntimeNamePowershell RuntimeName = "powershell" + RuntimeNamePython RuntimeName = "python" +) + +// PossibleRuntimeNameValues returns the possible values for the RuntimeName const type. +func PossibleRuntimeNameValues() []RuntimeName { + return []RuntimeName{ + RuntimeNameCustom, + RuntimeNameDotnetIsolated, + RuntimeNameJava, + RuntimeNameNode, + RuntimeNamePowershell, + RuntimeNamePython, + } +} + +type SKUName string + +const ( + SKUNameBasic SKUName = "Basic" + SKUNameDynamic SKUName = "Dynamic" + SKUNameElasticIsolated SKUName = "ElasticIsolated" + SKUNameElasticPremium SKUName = "ElasticPremium" + SKUNameFlexConsumption SKUName = "FlexConsumption" + SKUNameFree SKUName = "Free" + SKUNameIsolated SKUName = "Isolated" + SKUNameIsolatedV2 SKUName = "IsolatedV2" + SKUNamePremium SKUName = "Premium" + SKUNamePremiumContainer SKUName = "PremiumContainer" + SKUNamePremiumV2 SKUName = "PremiumV2" + SKUNamePremiumV3 SKUName = "PremiumV3" + SKUNameShared SKUName = "Shared" + SKUNameStandard SKUName = "Standard" +) + +// PossibleSKUNameValues returns the possible values for the SKUName const type. +func PossibleSKUNameValues() []SKUName { + return []SKUName{ + SKUNameBasic, + SKUNameDynamic, + SKUNameElasticIsolated, + SKUNameElasticPremium, + SKUNameFlexConsumption, + SKUNameFree, + SKUNameIsolated, + SKUNameIsolatedV2, + SKUNamePremium, + SKUNamePremiumContainer, + SKUNamePremiumV2, + SKUNamePremiumV3, + SKUNameShared, + SKUNameStandard, + } +} + +// SSLState - SSL type +type SSLState string + +const ( + SSLStateDisabled SSLState = "Disabled" + SSLStateIPBasedEnabled SSLState = "IpBasedEnabled" + SSLStateSniEnabled SSLState = "SniEnabled" +) + +// PossibleSSLStateValues returns the possible values for the SSLState const type. +func PossibleSSLStateValues() []SSLState { + return []SSLState{ + SSLStateDisabled, + SSLStateIPBasedEnabled, + SSLStateSniEnabled, + } +} + +// ScmType - SCM type. +type ScmType string + +const ( + ScmTypeBitbucketGit ScmType = "BitbucketGit" + ScmTypeBitbucketHg ScmType = "BitbucketHg" + ScmTypeCodePlexGit ScmType = "CodePlexGit" + ScmTypeCodePlexHg ScmType = "CodePlexHg" + ScmTypeDropbox ScmType = "Dropbox" + ScmTypeExternalGit ScmType = "ExternalGit" + ScmTypeExternalHg ScmType = "ExternalHg" + ScmTypeGitHub ScmType = "GitHub" + ScmTypeLocalGit ScmType = "LocalGit" + ScmTypeNone ScmType = "None" + ScmTypeOneDrive ScmType = "OneDrive" + ScmTypeTfs ScmType = "Tfs" + ScmTypeVSO ScmType = "VSO" + ScmTypeVSTSRM ScmType = "VSTSRM" +) + +// PossibleScmTypeValues returns the possible values for the ScmType const type. +func PossibleScmTypeValues() []ScmType { + return []ScmType{ + ScmTypeBitbucketGit, + ScmTypeBitbucketHg, + ScmTypeCodePlexGit, + ScmTypeCodePlexHg, + ScmTypeDropbox, + ScmTypeExternalGit, + ScmTypeExternalHg, + ScmTypeGitHub, + ScmTypeLocalGit, + ScmTypeNone, + ScmTypeOneDrive, + ScmTypeTfs, + ScmTypeVSO, + ScmTypeVSTSRM, + } +} + +// SiteAvailabilityState - Management information availability state for the app. +type SiteAvailabilityState string + +const ( + SiteAvailabilityStateDisasterRecoveryMode SiteAvailabilityState = "DisasterRecoveryMode" + SiteAvailabilityStateLimited SiteAvailabilityState = "Limited" + SiteAvailabilityStateNormal SiteAvailabilityState = "Normal" +) + +// PossibleSiteAvailabilityStateValues returns the possible values for the SiteAvailabilityState const type. +func PossibleSiteAvailabilityStateValues() []SiteAvailabilityState { + return []SiteAvailabilityState{ + SiteAvailabilityStateDisasterRecoveryMode, + SiteAvailabilityStateLimited, + SiteAvailabilityStateNormal, + } +} + +// SiteExtensionType - Site extension type. +type SiteExtensionType string + +const ( + SiteExtensionTypeGallery SiteExtensionType = "Gallery" + SiteExtensionTypeWebRoot SiteExtensionType = "WebRoot" +) + +// PossibleSiteExtensionTypeValues returns the possible values for the SiteExtensionType const type. +func PossibleSiteExtensionTypeValues() []SiteExtensionType { + return []SiteExtensionType{ + SiteExtensionTypeGallery, + SiteExtensionTypeWebRoot, + } +} + +// SiteLoadBalancing - Site load balancing. +type SiteLoadBalancing string + +const ( + SiteLoadBalancingLeastRequests SiteLoadBalancing = "LeastRequests" + SiteLoadBalancingLeastRequestsWithTieBreaker SiteLoadBalancing = "LeastRequestsWithTieBreaker" + SiteLoadBalancingLeastResponseTime SiteLoadBalancing = "LeastResponseTime" + SiteLoadBalancingPerSiteRoundRobin SiteLoadBalancing = "PerSiteRoundRobin" + SiteLoadBalancingRequestHash SiteLoadBalancing = "RequestHash" + SiteLoadBalancingWeightedRoundRobin SiteLoadBalancing = "WeightedRoundRobin" + SiteLoadBalancingWeightedTotalTraffic SiteLoadBalancing = "WeightedTotalTraffic" +) + +// PossibleSiteLoadBalancingValues returns the possible values for the SiteLoadBalancing const type. +func PossibleSiteLoadBalancingValues() []SiteLoadBalancing { + return []SiteLoadBalancing{ + SiteLoadBalancingLeastRequests, + SiteLoadBalancingLeastRequestsWithTieBreaker, + SiteLoadBalancingLeastResponseTime, + SiteLoadBalancingPerSiteRoundRobin, + SiteLoadBalancingRequestHash, + SiteLoadBalancingWeightedRoundRobin, + SiteLoadBalancingWeightedTotalTraffic, + } +} + +type SiteRuntimeState string + +const ( + SiteRuntimeStateREADY SiteRuntimeState = "READY" + SiteRuntimeStateSTOPPED SiteRuntimeState = "STOPPED" + SiteRuntimeStateUNKNOWN SiteRuntimeState = "UNKNOWN" +) + +// PossibleSiteRuntimeStateValues returns the possible values for the SiteRuntimeState const type. +func PossibleSiteRuntimeStateValues() []SiteRuntimeState { + return []SiteRuntimeState{ + SiteRuntimeStateREADY, + SiteRuntimeStateSTOPPED, + SiteRuntimeStateUNKNOWN, + } +} + +// SolutionType - Type of Solution +type SolutionType string + +const ( + SolutionTypeBestPractices SolutionType = "BestPractices" + SolutionTypeDeepInvestigation SolutionType = "DeepInvestigation" + SolutionTypeQuickSolution SolutionType = "QuickSolution" +) + +// PossibleSolutionTypeValues returns the possible values for the SolutionType const type. +func PossibleSolutionTypeValues() []SolutionType { + return []SolutionType{ + SolutionTypeBestPractices, + SolutionTypeDeepInvestigation, + SolutionTypeQuickSolution, + } +} + +// StackPreferredOs - Function App stack preferred OS. +type StackPreferredOs string + +const ( + StackPreferredOsLinux StackPreferredOs = "Linux" + StackPreferredOsWindows StackPreferredOs = "Windows" +) + +// PossibleStackPreferredOsValues returns the possible values for the StackPreferredOs const type. +func PossibleStackPreferredOsValues() []StackPreferredOs { + return []StackPreferredOs{ + StackPreferredOsLinux, + StackPreferredOsWindows, + } +} + +// StagingEnvironmentPolicy - State indicating whether staging environments are allowed or not allowed for a static web app. +type StagingEnvironmentPolicy string + +const ( + StagingEnvironmentPolicyDisabled StagingEnvironmentPolicy = "Disabled" + StagingEnvironmentPolicyEnabled StagingEnvironmentPolicy = "Enabled" +) + +// PossibleStagingEnvironmentPolicyValues returns the possible values for the StagingEnvironmentPolicy const type. +func PossibleStagingEnvironmentPolicyValues() []StagingEnvironmentPolicy { + return []StagingEnvironmentPolicy{ + StagingEnvironmentPolicyDisabled, + StagingEnvironmentPolicyEnabled, + } +} + +// StatusOptions - App Service plan status. +type StatusOptions string + +const ( + StatusOptionsCreating StatusOptions = "Creating" + StatusOptionsPending StatusOptions = "Pending" + StatusOptionsReady StatusOptions = "Ready" +) + +// PossibleStatusOptionsValues returns the possible values for the StatusOptions const type. +func PossibleStatusOptionsValues() []StatusOptions { + return []StatusOptions{ + StatusOptionsCreating, + StatusOptionsPending, + StatusOptionsReady, + } +} + +type StorageType string + +const ( + StorageTypeLocalNode StorageType = "LocalNode" + StorageTypeNetworkFileSystem StorageType = "NetworkFileSystem" +) + +// PossibleStorageTypeValues returns the possible values for the StorageType const type. +func PossibleStorageTypeValues() []StorageType { + return []StorageType{ + StorageTypeLocalNode, + StorageTypeNetworkFileSystem, + } +} + +// SupportedTLSVersions - MinTlsVersion: configures the minimum version of TLS required for SSL requests +type SupportedTLSVersions string + +const ( + SupportedTLSVersionsOne0 SupportedTLSVersions = "1.0" + SupportedTLSVersionsOne1 SupportedTLSVersions = "1.1" + SupportedTLSVersionsOne2 SupportedTLSVersions = "1.2" + SupportedTLSVersionsOne3 SupportedTLSVersions = "1.3" +) + +// PossibleSupportedTLSVersionsValues returns the possible values for the SupportedTLSVersions const type. +func PossibleSupportedTLSVersionsValues() []SupportedTLSVersions { + return []SupportedTLSVersions{ + SupportedTLSVersionsOne0, + SupportedTLSVersionsOne1, + SupportedTLSVersionsOne2, + SupportedTLSVersionsOne3, + } +} + +// TLSCipherSuites - The minimum strength TLS cipher suite allowed for an application +type TLSCipherSuites string + +const ( + TLSCipherSuitesTLSAES128GCMSHA256 TLSCipherSuites = "TLS_AES_128_GCM_SHA256" + TLSCipherSuitesTLSAES256GCMSHA384 TLSCipherSuites = "TLS_AES_256_GCM_SHA384" + TLSCipherSuitesTLSECDHEECDSAWITHAES128CBCSHA256 TLSCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + TLSCipherSuitesTLSECDHEECDSAWITHAES128GCMSHA256 TLSCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + TLSCipherSuitesTLSECDHEECDSAWITHAES256GCMSHA384 TLSCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA256 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + TLSCipherSuitesTLSECDHERSAWITHAES128GCMSHA256 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA384 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + TLSCipherSuitesTLSECDHERSAWITHAES256GCMSHA384 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + TLSCipherSuitesTLSRSAWITHAES128CBCSHA TLSCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA" + TLSCipherSuitesTLSRSAWITHAES128CBCSHA256 TLSCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA256" + TLSCipherSuitesTLSRSAWITHAES128GCMSHA256 TLSCipherSuites = "TLS_RSA_WITH_AES_128_GCM_SHA256" + TLSCipherSuitesTLSRSAWITHAES256CBCSHA TLSCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA" + TLSCipherSuitesTLSRSAWITHAES256CBCSHA256 TLSCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA256" + TLSCipherSuitesTLSRSAWITHAES256GCMSHA384 TLSCipherSuites = "TLS_RSA_WITH_AES_256_GCM_SHA384" +) + +// PossibleTLSCipherSuitesValues returns the possible values for the TLSCipherSuites const type. +func PossibleTLSCipherSuitesValues() []TLSCipherSuites { + return []TLSCipherSuites{ + TLSCipherSuitesTLSAES128GCMSHA256, + TLSCipherSuitesTLSAES256GCMSHA384, + TLSCipherSuitesTLSECDHEECDSAWITHAES128CBCSHA256, + TLSCipherSuitesTLSECDHEECDSAWITHAES128GCMSHA256, + TLSCipherSuitesTLSECDHEECDSAWITHAES256GCMSHA384, + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA, + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA256, + TLSCipherSuitesTLSECDHERSAWITHAES128GCMSHA256, + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA, + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA384, + TLSCipherSuitesTLSECDHERSAWITHAES256GCMSHA384, + TLSCipherSuitesTLSRSAWITHAES128CBCSHA, + TLSCipherSuitesTLSRSAWITHAES128CBCSHA256, + TLSCipherSuitesTLSRSAWITHAES128GCMSHA256, + TLSCipherSuitesTLSRSAWITHAES256CBCSHA, + TLSCipherSuitesTLSRSAWITHAES256CBCSHA256, + TLSCipherSuitesTLSRSAWITHAES256GCMSHA384, + } +} + +// TriggerTypes - The trigger type of the function +type TriggerTypes string + +const ( + TriggerTypesHTTPTrigger TriggerTypes = "HttpTrigger" + TriggerTypesUnknown TriggerTypes = "Unknown" +) + +// PossibleTriggerTypesValues returns the possible values for the TriggerTypes const type. +func PossibleTriggerTypesValues() []TriggerTypes { + return []TriggerTypes{ + TriggerTypesHTTPTrigger, + TriggerTypesUnknown, + } +} + +// TriggeredWebJobStatus - Job status. +type TriggeredWebJobStatus string + +const ( + TriggeredWebJobStatusError TriggeredWebJobStatus = "Error" + TriggeredWebJobStatusFailed TriggeredWebJobStatus = "Failed" + TriggeredWebJobStatusSuccess TriggeredWebJobStatus = "Success" +) + +// PossibleTriggeredWebJobStatusValues returns the possible values for the TriggeredWebJobStatus const type. +func PossibleTriggeredWebJobStatusValues() []TriggeredWebJobStatus { + return []TriggeredWebJobStatus{ + TriggeredWebJobStatusError, + TriggeredWebJobStatusFailed, + TriggeredWebJobStatusSuccess, + } +} + +// UnauthenticatedClientAction - The action to take when an unauthenticated client attempts to access the app. +type UnauthenticatedClientAction string + +const ( + UnauthenticatedClientActionAllowAnonymous UnauthenticatedClientAction = "AllowAnonymous" + UnauthenticatedClientActionRedirectToLoginPage UnauthenticatedClientAction = "RedirectToLoginPage" +) + +// PossibleUnauthenticatedClientActionValues returns the possible values for the UnauthenticatedClientAction const type. +func PossibleUnauthenticatedClientActionValues() []UnauthenticatedClientAction { + return []UnauthenticatedClientAction{ + UnauthenticatedClientActionAllowAnonymous, + UnauthenticatedClientActionRedirectToLoginPage, + } +} + +// UnauthenticatedClientActionV2 - The action to take when an unauthenticated client attempts to access the app. +type UnauthenticatedClientActionV2 string + +const ( + UnauthenticatedClientActionV2AllowAnonymous UnauthenticatedClientActionV2 = "AllowAnonymous" + UnauthenticatedClientActionV2RedirectToLoginPage UnauthenticatedClientActionV2 = "RedirectToLoginPage" + UnauthenticatedClientActionV2Return401 UnauthenticatedClientActionV2 = "Return401" + UnauthenticatedClientActionV2Return403 UnauthenticatedClientActionV2 = "Return403" +) + +// PossibleUnauthenticatedClientActionV2Values returns the possible values for the UnauthenticatedClientActionV2 const type. +func PossibleUnauthenticatedClientActionV2Values() []UnauthenticatedClientActionV2 { + return []UnauthenticatedClientActionV2{ + UnauthenticatedClientActionV2AllowAnonymous, + UnauthenticatedClientActionV2RedirectToLoginPage, + UnauthenticatedClientActionV2Return401, + UnauthenticatedClientActionV2Return403, + } +} + +// UpgradeAvailability - Whether an upgrade is available for this App Service Environment. +type UpgradeAvailability string + +const ( + // UpgradeAvailabilityNone - No upgrade is currently available for this App Service Environment + UpgradeAvailabilityNone UpgradeAvailability = "None" + // UpgradeAvailabilityReady - An upgrade is ready to be manually initiated on this App Service Environment + UpgradeAvailabilityReady UpgradeAvailability = "Ready" +) + +// PossibleUpgradeAvailabilityValues returns the possible values for the UpgradeAvailability const type. +func PossibleUpgradeAvailabilityValues() []UpgradeAvailability { + return []UpgradeAvailability{ + UpgradeAvailabilityNone, + UpgradeAvailabilityReady, + } +} + +// UpgradePreference - Upgrade Preference +type UpgradePreference string + +const ( + // UpgradePreferenceEarly - This App Service Environment will be upgraded before others in the same region that have Upgrade + // Preference 'Late' + UpgradePreferenceEarly UpgradePreference = "Early" + // UpgradePreferenceLate - This App Service Environment will be upgraded after others in the same region that have Upgrade + // Preference 'Early' + UpgradePreferenceLate UpgradePreference = "Late" + // UpgradePreferenceManual - ASEv3 only. Once an upgrade is available, this App Service Environment will wait 10 days for + // the upgrade to be manually initiated. After 10 days the upgrade will begin automatically + UpgradePreferenceManual UpgradePreference = "Manual" + // UpgradePreferenceNone - No preference on when this App Service Environment will be upgraded + UpgradePreferenceNone UpgradePreference = "None" +) + +// PossibleUpgradePreferenceValues returns the possible values for the UpgradePreference const type. +func PossibleUpgradePreferenceValues() []UpgradePreference { + return []UpgradePreference{ + UpgradePreferenceEarly, + UpgradePreferenceLate, + UpgradePreferenceManual, + UpgradePreferenceNone, + } +} + +// UsageState - State indicating whether the app has exceeded its quota usage. Read-only. +type UsageState string + +const ( + UsageStateExceeded UsageState = "Exceeded" + UsageStateNormal UsageState = "Normal" +) + +// PossibleUsageStateValues returns the possible values for the UsageState const type. +func PossibleUsageStateValues() []UsageState { + return []UsageState{ + UsageStateExceeded, + UsageStateNormal, + } +} + +// ValidateResourceTypes - Resource type used for verification. +type ValidateResourceTypes string + +const ( + ValidateResourceTypesMicrosoftWebHostingEnvironments ValidateResourceTypes = "Microsoft.Web/hostingEnvironments" + ValidateResourceTypesServerFarm ValidateResourceTypes = "ServerFarm" + ValidateResourceTypesSite ValidateResourceTypes = "Site" +) + +// PossibleValidateResourceTypesValues returns the possible values for the ValidateResourceTypes const type. +func PossibleValidateResourceTypesValues() []ValidateResourceTypes { + return []ValidateResourceTypes{ + ValidateResourceTypesMicrosoftWebHostingEnvironments, + ValidateResourceTypesServerFarm, + ValidateResourceTypesSite, + } +} + +// WebJobType - Job type. +type WebJobType string + +const ( + WebJobTypeContinuous WebJobType = "Continuous" + WebJobTypeTriggered WebJobType = "Triggered" +) + +// PossibleWebJobTypeValues returns the possible values for the WebJobType const type. +func PossibleWebJobTypeValues() []WebJobType { + return []WebJobType{ + WebJobTypeContinuous, + WebJobTypeTriggered, + } +} + +// WorkerSizeOptions - Size of the machines. +type WorkerSizeOptions string + +const ( + WorkerSizeOptionsD1 WorkerSizeOptions = "D1" + WorkerSizeOptionsD2 WorkerSizeOptions = "D2" + WorkerSizeOptionsD3 WorkerSizeOptions = "D3" + WorkerSizeOptionsDefault WorkerSizeOptions = "Default" + WorkerSizeOptionsLarge WorkerSizeOptions = "Large" + WorkerSizeOptionsLargeV3 WorkerSizeOptions = "LargeV3" + WorkerSizeOptionsMedium WorkerSizeOptions = "Medium" + WorkerSizeOptionsMediumV3 WorkerSizeOptions = "MediumV3" + WorkerSizeOptionsNestedSmall WorkerSizeOptions = "NestedSmall" + WorkerSizeOptionsNestedSmallLinux WorkerSizeOptions = "NestedSmallLinux" + WorkerSizeOptionsSmall WorkerSizeOptions = "Small" + WorkerSizeOptionsSmallV3 WorkerSizeOptions = "SmallV3" +) + +// PossibleWorkerSizeOptionsValues returns the possible values for the WorkerSizeOptions const type. +func PossibleWorkerSizeOptionsValues() []WorkerSizeOptions { + return []WorkerSizeOptions{ + WorkerSizeOptionsD1, + WorkerSizeOptionsD2, + WorkerSizeOptionsD3, + WorkerSizeOptionsDefault, + WorkerSizeOptionsLarge, + WorkerSizeOptionsLargeV3, + WorkerSizeOptionsMedium, + WorkerSizeOptionsMediumV3, + WorkerSizeOptionsNestedSmall, + WorkerSizeOptionsNestedSmallLinux, + WorkerSizeOptionsSmall, + WorkerSizeOptionsSmallV3, + } +} + +// WorkflowHealthState - Gets or sets the workflow health state. +type WorkflowHealthState string + +const ( + WorkflowHealthStateHealthy WorkflowHealthState = "Healthy" + WorkflowHealthStateNotSpecified WorkflowHealthState = "NotSpecified" + WorkflowHealthStateUnhealthy WorkflowHealthState = "Unhealthy" + WorkflowHealthStateUnknown WorkflowHealthState = "Unknown" +) + +// PossibleWorkflowHealthStateValues returns the possible values for the WorkflowHealthState const type. +func PossibleWorkflowHealthStateValues() []WorkflowHealthState { + return []WorkflowHealthState{ + WorkflowHealthStateHealthy, + WorkflowHealthStateNotSpecified, + WorkflowHealthStateUnhealthy, + WorkflowHealthStateUnknown, + } +} + +// WorkflowProvisioningState - The workflow provisioning state. +type WorkflowProvisioningState string + +const ( + WorkflowProvisioningStateAccepted WorkflowProvisioningState = "Accepted" + WorkflowProvisioningStateCanceled WorkflowProvisioningState = "Canceled" + WorkflowProvisioningStateCompleted WorkflowProvisioningState = "Completed" + WorkflowProvisioningStateCreated WorkflowProvisioningState = "Created" + WorkflowProvisioningStateCreating WorkflowProvisioningState = "Creating" + WorkflowProvisioningStateDeleted WorkflowProvisioningState = "Deleted" + WorkflowProvisioningStateDeleting WorkflowProvisioningState = "Deleting" + WorkflowProvisioningStateFailed WorkflowProvisioningState = "Failed" + WorkflowProvisioningStateInProgress WorkflowProvisioningState = "InProgress" + WorkflowProvisioningStateMoving WorkflowProvisioningState = "Moving" + WorkflowProvisioningStateNotSpecified WorkflowProvisioningState = "NotSpecified" + WorkflowProvisioningStatePending WorkflowProvisioningState = "Pending" + WorkflowProvisioningStateReady WorkflowProvisioningState = "Ready" + WorkflowProvisioningStateRegistered WorkflowProvisioningState = "Registered" + WorkflowProvisioningStateRegistering WorkflowProvisioningState = "Registering" + WorkflowProvisioningStateRenewing WorkflowProvisioningState = "Renewing" + WorkflowProvisioningStateRunning WorkflowProvisioningState = "Running" + WorkflowProvisioningStateSucceeded WorkflowProvisioningState = "Succeeded" + WorkflowProvisioningStateUnregistered WorkflowProvisioningState = "Unregistered" + WorkflowProvisioningStateUnregistering WorkflowProvisioningState = "Unregistering" + WorkflowProvisioningStateUpdating WorkflowProvisioningState = "Updating" + WorkflowProvisioningStateWaiting WorkflowProvisioningState = "Waiting" +) + +// PossibleWorkflowProvisioningStateValues returns the possible values for the WorkflowProvisioningState const type. +func PossibleWorkflowProvisioningStateValues() []WorkflowProvisioningState { + return []WorkflowProvisioningState{ + WorkflowProvisioningStateAccepted, + WorkflowProvisioningStateCanceled, + WorkflowProvisioningStateCompleted, + WorkflowProvisioningStateCreated, + WorkflowProvisioningStateCreating, + WorkflowProvisioningStateDeleted, + WorkflowProvisioningStateDeleting, + WorkflowProvisioningStateFailed, + WorkflowProvisioningStateInProgress, + WorkflowProvisioningStateMoving, + WorkflowProvisioningStateNotSpecified, + WorkflowProvisioningStatePending, + WorkflowProvisioningStateReady, + WorkflowProvisioningStateRegistered, + WorkflowProvisioningStateRegistering, + WorkflowProvisioningStateRenewing, + WorkflowProvisioningStateRunning, + WorkflowProvisioningStateSucceeded, + WorkflowProvisioningStateUnregistered, + WorkflowProvisioningStateUnregistering, + WorkflowProvisioningStateUpdating, + WorkflowProvisioningStateWaiting, + } +} + +// WorkflowSKUName - The sku name. +type WorkflowSKUName string + +const ( + WorkflowSKUNameBasic WorkflowSKUName = "Basic" + WorkflowSKUNameFree WorkflowSKUName = "Free" + WorkflowSKUNameNotSpecified WorkflowSKUName = "NotSpecified" + WorkflowSKUNamePremium WorkflowSKUName = "Premium" + WorkflowSKUNameShared WorkflowSKUName = "Shared" + WorkflowSKUNameStandard WorkflowSKUName = "Standard" +) + +// PossibleWorkflowSKUNameValues returns the possible values for the WorkflowSKUName const type. +func PossibleWorkflowSKUNameValues() []WorkflowSKUName { + return []WorkflowSKUName{ + WorkflowSKUNameBasic, + WorkflowSKUNameFree, + WorkflowSKUNameNotSpecified, + WorkflowSKUNamePremium, + WorkflowSKUNameShared, + WorkflowSKUNameStandard, + } +} + +// WorkflowState - The workflow state. +type WorkflowState string + +const ( + WorkflowStateCompleted WorkflowState = "Completed" + WorkflowStateDeleted WorkflowState = "Deleted" + WorkflowStateDisabled WorkflowState = "Disabled" + WorkflowStateEnabled WorkflowState = "Enabled" + WorkflowStateNotSpecified WorkflowState = "NotSpecified" + WorkflowStateSuspended WorkflowState = "Suspended" +) + +// PossibleWorkflowStateValues returns the possible values for the WorkflowState const type. +func PossibleWorkflowStateValues() []WorkflowState { + return []WorkflowState{ + WorkflowStateCompleted, + WorkflowStateDeleted, + WorkflowStateDisabled, + WorkflowStateEnabled, + WorkflowStateNotSpecified, + WorkflowStateSuspended, + } +} + +// WorkflowStatus - The workflow status. +type WorkflowStatus string + +const ( + WorkflowStatusAborted WorkflowStatus = "Aborted" + WorkflowStatusCancelled WorkflowStatus = "Cancelled" + WorkflowStatusFailed WorkflowStatus = "Failed" + WorkflowStatusFaulted WorkflowStatus = "Faulted" + WorkflowStatusIgnored WorkflowStatus = "Ignored" + WorkflowStatusNotSpecified WorkflowStatus = "NotSpecified" + WorkflowStatusPaused WorkflowStatus = "Paused" + WorkflowStatusRunning WorkflowStatus = "Running" + WorkflowStatusSkipped WorkflowStatus = "Skipped" + WorkflowStatusSucceeded WorkflowStatus = "Succeeded" + WorkflowStatusSuspended WorkflowStatus = "Suspended" + WorkflowStatusTimedOut WorkflowStatus = "TimedOut" + WorkflowStatusWaiting WorkflowStatus = "Waiting" +) + +// PossibleWorkflowStatusValues returns the possible values for the WorkflowStatus const type. +func PossibleWorkflowStatusValues() []WorkflowStatus { + return []WorkflowStatus{ + WorkflowStatusAborted, + WorkflowStatusCancelled, + WorkflowStatusFailed, + WorkflowStatusFaulted, + WorkflowStatusIgnored, + WorkflowStatusNotSpecified, + WorkflowStatusPaused, + WorkflowStatusRunning, + WorkflowStatusSkipped, + WorkflowStatusSucceeded, + WorkflowStatusSuspended, + WorkflowStatusTimedOut, + WorkflowStatusWaiting, + } +} + +// WorkflowTriggerProvisioningState - The workflow trigger provisioning state. +type WorkflowTriggerProvisioningState string + +const ( + WorkflowTriggerProvisioningStateAccepted WorkflowTriggerProvisioningState = "Accepted" + WorkflowTriggerProvisioningStateCanceled WorkflowTriggerProvisioningState = "Canceled" + WorkflowTriggerProvisioningStateCompleted WorkflowTriggerProvisioningState = "Completed" + WorkflowTriggerProvisioningStateCreated WorkflowTriggerProvisioningState = "Created" + WorkflowTriggerProvisioningStateCreating WorkflowTriggerProvisioningState = "Creating" + WorkflowTriggerProvisioningStateDeleted WorkflowTriggerProvisioningState = "Deleted" + WorkflowTriggerProvisioningStateDeleting WorkflowTriggerProvisioningState = "Deleting" + WorkflowTriggerProvisioningStateFailed WorkflowTriggerProvisioningState = "Failed" + WorkflowTriggerProvisioningStateMoving WorkflowTriggerProvisioningState = "Moving" + WorkflowTriggerProvisioningStateNotSpecified WorkflowTriggerProvisioningState = "NotSpecified" + WorkflowTriggerProvisioningStateReady WorkflowTriggerProvisioningState = "Ready" + WorkflowTriggerProvisioningStateRegistered WorkflowTriggerProvisioningState = "Registered" + WorkflowTriggerProvisioningStateRegistering WorkflowTriggerProvisioningState = "Registering" + WorkflowTriggerProvisioningStateRunning WorkflowTriggerProvisioningState = "Running" + WorkflowTriggerProvisioningStateSucceeded WorkflowTriggerProvisioningState = "Succeeded" + WorkflowTriggerProvisioningStateUnregistered WorkflowTriggerProvisioningState = "Unregistered" + WorkflowTriggerProvisioningStateUnregistering WorkflowTriggerProvisioningState = "Unregistering" + WorkflowTriggerProvisioningStateUpdating WorkflowTriggerProvisioningState = "Updating" +) + +// PossibleWorkflowTriggerProvisioningStateValues returns the possible values for the WorkflowTriggerProvisioningState const type. +func PossibleWorkflowTriggerProvisioningStateValues() []WorkflowTriggerProvisioningState { + return []WorkflowTriggerProvisioningState{ + WorkflowTriggerProvisioningStateAccepted, + WorkflowTriggerProvisioningStateCanceled, + WorkflowTriggerProvisioningStateCompleted, + WorkflowTriggerProvisioningStateCreated, + WorkflowTriggerProvisioningStateCreating, + WorkflowTriggerProvisioningStateDeleted, + WorkflowTriggerProvisioningStateDeleting, + WorkflowTriggerProvisioningStateFailed, + WorkflowTriggerProvisioningStateMoving, + WorkflowTriggerProvisioningStateNotSpecified, + WorkflowTriggerProvisioningStateReady, + WorkflowTriggerProvisioningStateRegistered, + WorkflowTriggerProvisioningStateRegistering, + WorkflowTriggerProvisioningStateRunning, + WorkflowTriggerProvisioningStateSucceeded, + WorkflowTriggerProvisioningStateUnregistered, + WorkflowTriggerProvisioningStateUnregistering, + WorkflowTriggerProvisioningStateUpdating, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/containerapps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/containerapps_client.go new file mode 100644 index 00000000..f2f497c7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/containerapps_client.go @@ -0,0 +1,438 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ContainerAppsClient contains the methods for the ContainerApps group. +// Don't use this type directly, use NewContainerAppsClient() instead. +type ContainerAppsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewContainerAppsClient creates a new instance of ContainerAppsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewContainerAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ContainerAppsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Description for Create or update a Container App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the Container App. +// - options - ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate +// method. +func (client *ContainerAppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ContainerAppsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, name, containerAppEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ContainerAppsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Description for Create or update a Container App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ContainerAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ContainerAppsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, containerAppEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, containerAppEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Description for Delete a Container App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the Container App. +// - options - ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete +// method. +func (client *ContainerAppsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientBeginDeleteOptions) (*runtime.Poller[ContainerAppsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ContainerAppsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Description for Delete a Container App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ContainerAppsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ContainerAppsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the properties of a Container App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the Container App. +// - options - ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. +func (client *ContainerAppsClient) Get(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientGetOptions) (ContainerAppsClientGetResponse, error) { + var err error + const operationName = "ContainerAppsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return ContainerAppsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ContainerAppsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ContainerAppsClient) getHandleResponse(resp *http.Response) (ContainerAppsClientGetResponse, error) { + result := ContainerAppsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ContainerApp); err != nil { + return ContainerAppsClientGetResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Get the Container Apps in a given resource group. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - options - ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager +// method. +func (client *ContainerAppsClient) NewListByResourceGroupPager(resourceGroupName string, options *ContainerAppsClientListByResourceGroupOptions) *runtime.Pager[ContainerAppsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ContainerAppsClientListByResourceGroupResponse]{ + More: func(page ContainerAppsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ContainerAppsClientListByResourceGroupResponse) (ContainerAppsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContainerAppsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ContainerAppsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ContainerAppsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ContainerAppsClient) listByResourceGroupHandleResponse(resp *http.Response) (ContainerAppsClientListByResourceGroupResponse, error) { + result := ContainerAppsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ContainerAppCollection); err != nil { + return ContainerAppsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - Get the Container Apps in a given subscription. +// +// Generated from API version 2024-04-01 +// - options - ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager +// method. +func (client *ContainerAppsClient) NewListBySubscriptionPager(options *ContainerAppsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[ContainerAppsClientListBySubscriptionResponse]{ + More: func(page ContainerAppsClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ContainerAppsClientListBySubscriptionResponse) (ContainerAppsClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContainerAppsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return ContainerAppsClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.Context, options *ContainerAppsClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *ContainerAppsClient) listBySubscriptionHandleResponse(resp *http.Response) (ContainerAppsClientListBySubscriptionResponse, error) { + result := ContainerAppsClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ContainerAppCollection); err != nil { + return ContainerAppsClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// ListSecrets - List secrets for a container app +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - name - Name of the Container App. +// - options - ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets +// method. +func (client *ContainerAppsClient) ListSecrets(ctx context.Context, name string, options *ContainerAppsClientListSecretsOptions) (ContainerAppsClientListSecretsResponse, error) { + var err error + const operationName = "ContainerAppsClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSecretsCreateRequest(ctx, name, options) + if err != nil { + return ContainerAppsClientListSecretsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ContainerAppsClientListSecretsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsClientListSecretsResponse{}, err + } + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err +} + +// listSecretsCreateRequest creates the ListSecrets request. +func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, name string, options *ContainerAppsClientListSecretsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSecretsHandleResponse handles the ListSecrets response. +func (client *ContainerAppsClient) listSecretsHandleResponse(resp *http.Response) (ContainerAppsClientListSecretsResponse, error) { + result := ContainerAppsClientListSecretsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecretsCollection); err != nil { + return ContainerAppsClientListSecretsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/containerappsrevisions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/containerappsrevisions_client.go new file mode 100644 index 00000000..a237dc02 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/containerappsrevisions_client.go @@ -0,0 +1,359 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ContainerAppsRevisionsClient contains the methods for the ContainerAppsRevisions group. +// Don't use this type directly, use NewContainerAppsRevisionsClient() instead. +type ContainerAppsRevisionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewContainerAppsRevisionsClient creates a new instance of ContainerAppsRevisionsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewContainerAppsRevisionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsRevisionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ContainerAppsRevisionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// ActivateRevision - Activates a revision for a Container App +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - containerAppName - Name of the Container App. +// - name - Name of the Container App Revision to activate +// - options - ContainerAppsRevisionsClientActivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.ActivateRevision +// method. +func (client *ContainerAppsRevisionsClient) ActivateRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientActivateRevisionOptions) (ContainerAppsRevisionsClientActivateRevisionResponse, error) { + var err error + const operationName = "ContainerAppsRevisionsClient.ActivateRevision" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.activateRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) + if err != nil { + return ContainerAppsRevisionsClientActivateRevisionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ContainerAppsRevisionsClientActivateRevisionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientActivateRevisionResponse{}, err + } + return ContainerAppsRevisionsClientActivateRevisionResponse{}, nil +} + +// activateRevisionCreateRequest creates the ActivateRevision request. +func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientActivateRevisionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/activate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if containerAppName == "" { + return nil, errors.New("parameter containerAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeactivateRevision - Deactivates a revision for a Container App +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - containerAppName - Name of the Container App. +// - name - Name of the Container App Revision to deactivate +// - options - ContainerAppsRevisionsClientDeactivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.DeactivateRevision +// method. +func (client *ContainerAppsRevisionsClient) DeactivateRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientDeactivateRevisionOptions) (ContainerAppsRevisionsClientDeactivateRevisionResponse, error) { + var err error + const operationName = "ContainerAppsRevisionsClient.DeactivateRevision" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deactivateRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) + if err != nil { + return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err + } + return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, nil +} + +// deactivateRevisionCreateRequest creates the DeactivateRevision request. +func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientDeactivateRevisionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/deactivate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if containerAppName == "" { + return nil, errors.New("parameter containerAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetRevision - Get a revision of a Container App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - containerAppName - Name of the Container App. +// - name - Name of the Container App Revision. +// - options - ContainerAppsRevisionsClientGetRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.GetRevision +// method. +func (client *ContainerAppsRevisionsClient) GetRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientGetRevisionOptions) (ContainerAppsRevisionsClientGetRevisionResponse, error) { + var err error + const operationName = "ContainerAppsRevisionsClient.GetRevision" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) + if err != nil { + return ContainerAppsRevisionsClientGetRevisionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ContainerAppsRevisionsClientGetRevisionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientGetRevisionResponse{}, err + } + resp, err := client.getRevisionHandleResponse(httpResp) + return resp, err +} + +// getRevisionCreateRequest creates the GetRevision request. +func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientGetRevisionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if containerAppName == "" { + return nil, errors.New("parameter containerAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getRevisionHandleResponse handles the GetRevision response. +func (client *ContainerAppsRevisionsClient) getRevisionHandleResponse(resp *http.Response) (ContainerAppsRevisionsClientGetRevisionResponse, error) { + result := ContainerAppsRevisionsClientGetRevisionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Revision); err != nil { + return ContainerAppsRevisionsClientGetRevisionResponse{}, err + } + return result, nil +} + +// NewListRevisionsPager - Get the Revisions for a given Container App. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - containerAppName - Name of the Container App for which Revisions are needed. +// - options - ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager +// method. +func (client *ContainerAppsRevisionsClient) NewListRevisionsPager(resourceGroupName string, containerAppName string, options *ContainerAppsRevisionsClientListRevisionsOptions) *runtime.Pager[ContainerAppsRevisionsClientListRevisionsResponse] { + return runtime.NewPager(runtime.PagingHandler[ContainerAppsRevisionsClientListRevisionsResponse]{ + More: func(page ContainerAppsRevisionsClientListRevisionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ContainerAppsRevisionsClientListRevisionsResponse) (ContainerAppsRevisionsClientListRevisionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContainerAppsRevisionsClient.NewListRevisionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRevisionsCreateRequest(ctx, resourceGroupName, containerAppName, options) + }, nil) + if err != nil { + return ContainerAppsRevisionsClientListRevisionsResponse{}, err + } + return client.listRevisionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listRevisionsCreateRequest creates the ListRevisions request. +func (client *ContainerAppsRevisionsClient) listRevisionsCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsRevisionsClientListRevisionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if containerAppName == "" { + return nil, errors.New("parameter containerAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listRevisionsHandleResponse handles the ListRevisions response. +func (client *ContainerAppsRevisionsClient) listRevisionsHandleResponse(resp *http.Response) (ContainerAppsRevisionsClientListRevisionsResponse, error) { + result := ContainerAppsRevisionsClientListRevisionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RevisionCollection); err != nil { + return ContainerAppsRevisionsClientListRevisionsResponse{}, err + } + return result, nil +} + +// RestartRevision - Restarts a revision for a Container App +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - containerAppName - Name of the Container App. +// - name - Name of the Container App Revision to restart +// - options - ContainerAppsRevisionsClientRestartRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.RestartRevision +// method. +func (client *ContainerAppsRevisionsClient) RestartRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientRestartRevisionOptions) (ContainerAppsRevisionsClientRestartRevisionResponse, error) { + var err error + const operationName = "ContainerAppsRevisionsClient.RestartRevision" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restartRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) + if err != nil { + return ContainerAppsRevisionsClientRestartRevisionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ContainerAppsRevisionsClientRestartRevisionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientRestartRevisionResponse{}, err + } + return ContainerAppsRevisionsClientRestartRevisionResponse{}, nil +} + +// restartRevisionCreateRequest creates the RestartRevision request. +func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientRestartRevisionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/restart" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if containerAppName == "" { + return nil, errors.New("parameter containerAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/deletedwebapps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/deletedwebapps_client.go new file mode 100644 index 00000000..3dd769b5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/deletedwebapps_client.go @@ -0,0 +1,221 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DeletedWebAppsClient contains the methods for the DeletedWebApps group. +// Don't use this type directly, use NewDeletedWebAppsClient() instead. +type DeletedWebAppsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDeletedWebAppsClient creates a new instance of DeletedWebAppsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDeletedWebAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedWebAppsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DeletedWebAppsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// GetDeletedWebAppByLocation - Description for Get deleted app for a subscription at location. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - deletedSiteID - The numeric ID of the deleted app, e.g. 12345 +// - options - DeletedWebAppsClientGetDeletedWebAppByLocationOptions contains the optional parameters for the DeletedWebAppsClient.GetDeletedWebAppByLocation +// method. +func (client *DeletedWebAppsClient) GetDeletedWebAppByLocation(ctx context.Context, location string, deletedSiteID string, options *DeletedWebAppsClientGetDeletedWebAppByLocationOptions) (DeletedWebAppsClientGetDeletedWebAppByLocationResponse, error) { + var err error + const operationName = "DeletedWebAppsClient.GetDeletedWebAppByLocation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDeletedWebAppByLocationCreateRequest(ctx, location, deletedSiteID, options) + if err != nil { + return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, err + } + resp, err := client.getDeletedWebAppByLocationHandleResponse(httpResp) + return resp, err +} + +// getDeletedWebAppByLocationCreateRequest creates the GetDeletedWebAppByLocation request. +func (client *DeletedWebAppsClient) getDeletedWebAppByLocationCreateRequest(ctx context.Context, location string, deletedSiteID string, options *DeletedWebAppsClientGetDeletedWebAppByLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if deletedSiteID == "" { + return nil, errors.New("parameter deletedSiteID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deletedSiteId}", url.PathEscape(deletedSiteID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDeletedWebAppByLocationHandleResponse handles the GetDeletedWebAppByLocation response. +func (client *DeletedWebAppsClient) getDeletedWebAppByLocationHandleResponse(resp *http.Response) (DeletedWebAppsClientGetDeletedWebAppByLocationResponse, error) { + result := DeletedWebAppsClientGetDeletedWebAppByLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeletedSite); err != nil { + return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, err + } + return result, nil +} + +// NewListPager - Description for Get all deleted apps for a subscription. +// +// Generated from API version 2024-04-01 +// - options - DeletedWebAppsClientListOptions contains the optional parameters for the DeletedWebAppsClient.NewListPager method. +func (client *DeletedWebAppsClient) NewListPager(options *DeletedWebAppsClientListOptions) *runtime.Pager[DeletedWebAppsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DeletedWebAppsClientListResponse]{ + More: func(page DeletedWebAppsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DeletedWebAppsClientListResponse) (DeletedWebAppsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedWebAppsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return DeletedWebAppsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DeletedWebAppsClient) listCreateRequest(ctx context.Context, options *DeletedWebAppsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DeletedWebAppsClient) listHandleResponse(resp *http.Response) (DeletedWebAppsClientListResponse, error) { + result := DeletedWebAppsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeletedWebAppCollection); err != nil { + return DeletedWebAppsClientListResponse{}, err + } + return result, nil +} + +// NewListByLocationPager - Description for Get all deleted apps for a subscription at location +// +// Generated from API version 2024-04-01 +// - options - DeletedWebAppsClientListByLocationOptions contains the optional parameters for the DeletedWebAppsClient.NewListByLocationPager +// method. +func (client *DeletedWebAppsClient) NewListByLocationPager(location string, options *DeletedWebAppsClientListByLocationOptions) *runtime.Pager[DeletedWebAppsClientListByLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[DeletedWebAppsClientListByLocationResponse]{ + More: func(page DeletedWebAppsClientListByLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DeletedWebAppsClientListByLocationResponse) (DeletedWebAppsClientListByLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedWebAppsClient.NewListByLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocationCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return DeletedWebAppsClientListByLocationResponse{}, err + } + return client.listByLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByLocationCreateRequest creates the ListByLocation request. +func (client *DeletedWebAppsClient) listByLocationCreateRequest(ctx context.Context, location string, options *DeletedWebAppsClientListByLocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByLocationHandleResponse handles the ListByLocation response. +func (client *DeletedWebAppsClient) listByLocationHandleResponse(resp *http.Response) (DeletedWebAppsClientListByLocationResponse, error) { + result := DeletedWebAppsClientListByLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeletedWebAppCollection); err != nil { + return DeletedWebAppsClientListByLocationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/diagnostics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/diagnostics_client.go new file mode 100644 index 00000000..cbb77b1d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/diagnostics_client.go @@ -0,0 +1,1713 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" + "time" +) + +// DiagnosticsClient contains the methods for the Diagnostics group. +// Don't use this type directly, use NewDiagnosticsClient() instead. +type DiagnosticsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDiagnosticsClient creates a new instance of DiagnosticsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiagnosticsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DiagnosticsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// ExecuteSiteAnalysis - Description for Execute Analysis +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Category Name +// - analysisName - Analysis Resource Name +// - options - DiagnosticsClientExecuteSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysis +// method. +func (client *DiagnosticsClient) ExecuteSiteAnalysis(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *DiagnosticsClientExecuteSiteAnalysisOptions) (DiagnosticsClientExecuteSiteAnalysisResponse, error) { + var err error + const operationName = "DiagnosticsClient.ExecuteSiteAnalysis" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.executeSiteAnalysisCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, options) + if err != nil { + return DiagnosticsClientExecuteSiteAnalysisResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientExecuteSiteAnalysisResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientExecuteSiteAnalysisResponse{}, err + } + resp, err := client.executeSiteAnalysisHandleResponse(httpResp) + return resp, err +} + +// executeSiteAnalysisCreateRequest creates the ExecuteSiteAnalysis request. +func (client *DiagnosticsClient) executeSiteAnalysisCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *DiagnosticsClientExecuteSiteAnalysisOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if analysisName == "" { + return nil, errors.New("parameter analysisName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{analysisName}", url.PathEscape(analysisName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.EndTime != nil { + reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) + } + if options != nil && options.StartTime != nil { + reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) + } + if options != nil && options.TimeGrain != nil { + reqQP.Set("timeGrain", *options.TimeGrain) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// executeSiteAnalysisHandleResponse handles the ExecuteSiteAnalysis response. +func (client *DiagnosticsClient) executeSiteAnalysisHandleResponse(resp *http.Response) (DiagnosticsClientExecuteSiteAnalysisResponse, error) { + result := DiagnosticsClientExecuteSiteAnalysisResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticAnalysis); err != nil { + return DiagnosticsClientExecuteSiteAnalysisResponse{}, err + } + return result, nil +} + +// ExecuteSiteAnalysisSlot - Description for Execute Analysis +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Category Name +// - analysisName - Analysis Resource Name +// - slot - Slot Name +// - options - DiagnosticsClientExecuteSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysisSlot +// method. +func (client *DiagnosticsClient) ExecuteSiteAnalysisSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *DiagnosticsClientExecuteSiteAnalysisSlotOptions) (DiagnosticsClientExecuteSiteAnalysisSlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.ExecuteSiteAnalysisSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.executeSiteAnalysisSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, slot, options) + if err != nil { + return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, err + } + resp, err := client.executeSiteAnalysisSlotHandleResponse(httpResp) + return resp, err +} + +// executeSiteAnalysisSlotCreateRequest creates the ExecuteSiteAnalysisSlot request. +func (client *DiagnosticsClient) executeSiteAnalysisSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *DiagnosticsClientExecuteSiteAnalysisSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if analysisName == "" { + return nil, errors.New("parameter analysisName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{analysisName}", url.PathEscape(analysisName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.EndTime != nil { + reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) + } + if options != nil && options.StartTime != nil { + reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) + } + if options != nil && options.TimeGrain != nil { + reqQP.Set("timeGrain", *options.TimeGrain) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// executeSiteAnalysisSlotHandleResponse handles the ExecuteSiteAnalysisSlot response. +func (client *DiagnosticsClient) executeSiteAnalysisSlotHandleResponse(resp *http.Response) (DiagnosticsClientExecuteSiteAnalysisSlotResponse, error) { + result := DiagnosticsClientExecuteSiteAnalysisSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticAnalysis); err != nil { + return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, err + } + return result, nil +} + +// ExecuteSiteDetector - Description for Execute Detector +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - detectorName - Detector Resource Name +// - diagnosticCategory - Category Name +// - options - DiagnosticsClientExecuteSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetector +// method. +func (client *DiagnosticsClient) ExecuteSiteDetector(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, options *DiagnosticsClientExecuteSiteDetectorOptions) (DiagnosticsClientExecuteSiteDetectorResponse, error) { + var err error + const operationName = "DiagnosticsClient.ExecuteSiteDetector" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.executeSiteDetectorCreateRequest(ctx, resourceGroupName, siteName, detectorName, diagnosticCategory, options) + if err != nil { + return DiagnosticsClientExecuteSiteDetectorResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientExecuteSiteDetectorResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientExecuteSiteDetectorResponse{}, err + } + resp, err := client.executeSiteDetectorHandleResponse(httpResp) + return resp, err +} + +// executeSiteDetectorCreateRequest creates the ExecuteSiteDetector request. +func (client *DiagnosticsClient) executeSiteDetectorCreateRequest(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, options *DiagnosticsClientExecuteSiteDetectorOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if detectorName == "" { + return nil, errors.New("parameter detectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.EndTime != nil { + reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) + } + if options != nil && options.StartTime != nil { + reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) + } + if options != nil && options.TimeGrain != nil { + reqQP.Set("timeGrain", *options.TimeGrain) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// executeSiteDetectorHandleResponse handles the ExecuteSiteDetector response. +func (client *DiagnosticsClient) executeSiteDetectorHandleResponse(resp *http.Response) (DiagnosticsClientExecuteSiteDetectorResponse, error) { + result := DiagnosticsClientExecuteSiteDetectorResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticDetectorResponse); err != nil { + return DiagnosticsClientExecuteSiteDetectorResponse{}, err + } + return result, nil +} + +// ExecuteSiteDetectorSlot - Description for Execute Detector +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - detectorName - Detector Resource Name +// - diagnosticCategory - Category Name +// - slot - Slot Name +// - options - DiagnosticsClientExecuteSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetectorSlot +// method. +func (client *DiagnosticsClient) ExecuteSiteDetectorSlot(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, slot string, options *DiagnosticsClientExecuteSiteDetectorSlotOptions) (DiagnosticsClientExecuteSiteDetectorSlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.ExecuteSiteDetectorSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.executeSiteDetectorSlotCreateRequest(ctx, resourceGroupName, siteName, detectorName, diagnosticCategory, slot, options) + if err != nil { + return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, err + } + resp, err := client.executeSiteDetectorSlotHandleResponse(httpResp) + return resp, err +} + +// executeSiteDetectorSlotCreateRequest creates the ExecuteSiteDetectorSlot request. +func (client *DiagnosticsClient) executeSiteDetectorSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, slot string, options *DiagnosticsClientExecuteSiteDetectorSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if detectorName == "" { + return nil, errors.New("parameter detectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.EndTime != nil { + reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) + } + if options != nil && options.StartTime != nil { + reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) + } + if options != nil && options.TimeGrain != nil { + reqQP.Set("timeGrain", *options.TimeGrain) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// executeSiteDetectorSlotHandleResponse handles the ExecuteSiteDetectorSlot response. +func (client *DiagnosticsClient) executeSiteDetectorSlotHandleResponse(resp *http.Response) (DiagnosticsClientExecuteSiteDetectorSlotResponse, error) { + result := DiagnosticsClientExecuteSiteDetectorSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticDetectorResponse); err != nil { + return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, err + } + return result, nil +} + +// GetHostingEnvironmentDetectorResponse - Description for Get Hosting Environment Detector Response +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - App Service Environment Name +// - detectorName - Detector Resource Name +// - options - DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetHostingEnvironmentDetectorResponse +// method. +func (client *DiagnosticsClient) GetHostingEnvironmentDetectorResponse(ctx context.Context, resourceGroupName string, name string, detectorName string, options *DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions) (DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetHostingEnvironmentDetectorResponse" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getHostingEnvironmentDetectorResponseCreateRequest(ctx, resourceGroupName, name, detectorName, options) + if err != nil { + return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, err + } + resp, err := client.getHostingEnvironmentDetectorResponseHandleResponse(httpResp) + return resp, err +} + +// getHostingEnvironmentDetectorResponseCreateRequest creates the GetHostingEnvironmentDetectorResponse request. +func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseCreateRequest(ctx context.Context, resourceGroupName string, name string, detectorName string, options *DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if detectorName == "" { + return nil, errors.New("parameter detectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.EndTime != nil { + reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) + } + if options != nil && options.StartTime != nil { + reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) + } + if options != nil && options.TimeGrain != nil { + reqQP.Set("timeGrain", *options.TimeGrain) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHostingEnvironmentDetectorResponseHandleResponse handles the GetHostingEnvironmentDetectorResponse response. +func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseHandleResponse(resp *http.Response) (DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse, error) { + result := DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponse); err != nil { + return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, err + } + return result, nil +} + +// GetSiteAnalysis - Description for Get Site Analysis +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Diagnostic Category +// - analysisName - Analysis Name +// - options - DiagnosticsClientGetSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysis +// method. +func (client *DiagnosticsClient) GetSiteAnalysis(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *DiagnosticsClientGetSiteAnalysisOptions) (DiagnosticsClientGetSiteAnalysisResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteAnalysis" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteAnalysisCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, options) + if err != nil { + return DiagnosticsClientGetSiteAnalysisResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientGetSiteAnalysisResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteAnalysisResponse{}, err + } + resp, err := client.getSiteAnalysisHandleResponse(httpResp) + return resp, err +} + +// getSiteAnalysisCreateRequest creates the GetSiteAnalysis request. +func (client *DiagnosticsClient) getSiteAnalysisCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *DiagnosticsClientGetSiteAnalysisOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if analysisName == "" { + return nil, errors.New("parameter analysisName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{analysisName}", url.PathEscape(analysisName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteAnalysisHandleResponse handles the GetSiteAnalysis response. +func (client *DiagnosticsClient) getSiteAnalysisHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteAnalysisResponse, error) { + result := DiagnosticsClientGetSiteAnalysisResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AnalysisDefinition); err != nil { + return DiagnosticsClientGetSiteAnalysisResponse{}, err + } + return result, nil +} + +// GetSiteAnalysisSlot - Description for Get Site Analysis +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Diagnostic Category +// - analysisName - Analysis Name +// - slot - Slot - optional +// - options - DiagnosticsClientGetSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysisSlot +// method. +func (client *DiagnosticsClient) GetSiteAnalysisSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *DiagnosticsClientGetSiteAnalysisSlotOptions) (DiagnosticsClientGetSiteAnalysisSlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteAnalysisSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteAnalysisSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, slot, options) + if err != nil { + return DiagnosticsClientGetSiteAnalysisSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientGetSiteAnalysisSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteAnalysisSlotResponse{}, err + } + resp, err := client.getSiteAnalysisSlotHandleResponse(httpResp) + return resp, err +} + +// getSiteAnalysisSlotCreateRequest creates the GetSiteAnalysisSlot request. +func (client *DiagnosticsClient) getSiteAnalysisSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *DiagnosticsClientGetSiteAnalysisSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if analysisName == "" { + return nil, errors.New("parameter analysisName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{analysisName}", url.PathEscape(analysisName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteAnalysisSlotHandleResponse handles the GetSiteAnalysisSlot response. +func (client *DiagnosticsClient) getSiteAnalysisSlotHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteAnalysisSlotResponse, error) { + result := DiagnosticsClientGetSiteAnalysisSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AnalysisDefinition); err != nil { + return DiagnosticsClientGetSiteAnalysisSlotResponse{}, err + } + return result, nil +} + +// GetSiteDetector - Description for Get Detector +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Diagnostic Category +// - detectorName - Detector Name +// - options - DiagnosticsClientGetSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetector +// method. +func (client *DiagnosticsClient) GetSiteDetector(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, options *DiagnosticsClientGetSiteDetectorOptions) (DiagnosticsClientGetSiteDetectorResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDetector" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteDetectorCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, detectorName, options) + if err != nil { + return DiagnosticsClientGetSiteDetectorResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientGetSiteDetectorResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDetectorResponse{}, err + } + resp, err := client.getSiteDetectorHandleResponse(httpResp) + return resp, err +} + +// getSiteDetectorCreateRequest creates the GetSiteDetector request. +func (client *DiagnosticsClient) getSiteDetectorCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, options *DiagnosticsClientGetSiteDetectorOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if detectorName == "" { + return nil, errors.New("parameter detectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteDetectorHandleResponse handles the GetSiteDetector response. +func (client *DiagnosticsClient) getSiteDetectorHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDetectorResponse, error) { + result := DiagnosticsClientGetSiteDetectorResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DetectorDefinitionResource); err != nil { + return DiagnosticsClientGetSiteDetectorResponse{}, err + } + return result, nil +} + +// GetSiteDetectorResponse - Description for Get site detector response +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - detectorName - Detector Resource Name +// - options - DiagnosticsClientGetSiteDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponse +// method. +func (client *DiagnosticsClient) GetSiteDetectorResponse(ctx context.Context, resourceGroupName string, siteName string, detectorName string, options *DiagnosticsClientGetSiteDetectorResponseOptions) (DiagnosticsClientGetSiteDetectorResponseResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDetectorResponse" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteDetectorResponseCreateRequest(ctx, resourceGroupName, siteName, detectorName, options) + if err != nil { + return DiagnosticsClientGetSiteDetectorResponseResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientGetSiteDetectorResponseResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDetectorResponseResponse{}, err + } + resp, err := client.getSiteDetectorResponseHandleResponse(httpResp) + return resp, err +} + +// getSiteDetectorResponseCreateRequest creates the GetSiteDetectorResponse request. +func (client *DiagnosticsClient) getSiteDetectorResponseCreateRequest(ctx context.Context, resourceGroupName string, siteName string, detectorName string, options *DiagnosticsClientGetSiteDetectorResponseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if detectorName == "" { + return nil, errors.New("parameter detectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.EndTime != nil { + reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) + } + if options != nil && options.StartTime != nil { + reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) + } + if options != nil && options.TimeGrain != nil { + reqQP.Set("timeGrain", *options.TimeGrain) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteDetectorResponseHandleResponse handles the GetSiteDetectorResponse response. +func (client *DiagnosticsClient) getSiteDetectorResponseHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDetectorResponseResponse, error) { + result := DiagnosticsClientGetSiteDetectorResponseResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponse); err != nil { + return DiagnosticsClientGetSiteDetectorResponseResponse{}, err + } + return result, nil +} + +// GetSiteDetectorResponseSlot - Description for Get site detector response +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - detectorName - Detector Resource Name +// - slot - Slot Name +// - options - DiagnosticsClientGetSiteDetectorResponseSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponseSlot +// method. +func (client *DiagnosticsClient) GetSiteDetectorResponseSlot(ctx context.Context, resourceGroupName string, siteName string, detectorName string, slot string, options *DiagnosticsClientGetSiteDetectorResponseSlotOptions) (DiagnosticsClientGetSiteDetectorResponseSlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDetectorResponseSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteDetectorResponseSlotCreateRequest(ctx, resourceGroupName, siteName, detectorName, slot, options) + if err != nil { + return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, err + } + resp, err := client.getSiteDetectorResponseSlotHandleResponse(httpResp) + return resp, err +} + +// getSiteDetectorResponseSlotCreateRequest creates the GetSiteDetectorResponseSlot request. +func (client *DiagnosticsClient) getSiteDetectorResponseSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, detectorName string, slot string, options *DiagnosticsClientGetSiteDetectorResponseSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if detectorName == "" { + return nil, errors.New("parameter detectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.EndTime != nil { + reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) + } + if options != nil && options.StartTime != nil { + reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) + } + if options != nil && options.TimeGrain != nil { + reqQP.Set("timeGrain", *options.TimeGrain) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteDetectorResponseSlotHandleResponse handles the GetSiteDetectorResponseSlot response. +func (client *DiagnosticsClient) getSiteDetectorResponseSlotHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDetectorResponseSlotResponse, error) { + result := DiagnosticsClientGetSiteDetectorResponseSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponse); err != nil { + return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, err + } + return result, nil +} + +// GetSiteDetectorSlot - Description for Get Detector +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Diagnostic Category +// - detectorName - Detector Name +// - slot - Slot Name +// - options - DiagnosticsClientGetSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorSlot +// method. +func (client *DiagnosticsClient) GetSiteDetectorSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, slot string, options *DiagnosticsClientGetSiteDetectorSlotOptions) (DiagnosticsClientGetSiteDetectorSlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDetectorSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteDetectorSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, detectorName, slot, options) + if err != nil { + return DiagnosticsClientGetSiteDetectorSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientGetSiteDetectorSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDetectorSlotResponse{}, err + } + resp, err := client.getSiteDetectorSlotHandleResponse(httpResp) + return resp, err +} + +// getSiteDetectorSlotCreateRequest creates the GetSiteDetectorSlot request. +func (client *DiagnosticsClient) getSiteDetectorSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, slot string, options *DiagnosticsClientGetSiteDetectorSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if detectorName == "" { + return nil, errors.New("parameter detectorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteDetectorSlotHandleResponse handles the GetSiteDetectorSlot response. +func (client *DiagnosticsClient) getSiteDetectorSlotHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDetectorSlotResponse, error) { + result := DiagnosticsClientGetSiteDetectorSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DetectorDefinitionResource); err != nil { + return DiagnosticsClientGetSiteDetectorSlotResponse{}, err + } + return result, nil +} + +// GetSiteDiagnosticCategory - Description for Get Diagnostics Category +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Diagnostic Category +// - options - DiagnosticsClientGetSiteDiagnosticCategoryOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategory +// method. +func (client *DiagnosticsClient) GetSiteDiagnosticCategory(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientGetSiteDiagnosticCategoryOptions) (DiagnosticsClientGetSiteDiagnosticCategoryResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDiagnosticCategory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteDiagnosticCategoryCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) + if err != nil { + return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, err + } + resp, err := client.getSiteDiagnosticCategoryHandleResponse(httpResp) + return resp, err +} + +// getSiteDiagnosticCategoryCreateRequest creates the GetSiteDiagnosticCategory request. +func (client *DiagnosticsClient) getSiteDiagnosticCategoryCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientGetSiteDiagnosticCategoryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteDiagnosticCategoryHandleResponse handles the GetSiteDiagnosticCategory response. +func (client *DiagnosticsClient) getSiteDiagnosticCategoryHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDiagnosticCategoryResponse, error) { + result := DiagnosticsClientGetSiteDiagnosticCategoryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticCategory); err != nil { + return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, err + } + return result, nil +} + +// GetSiteDiagnosticCategorySlot - Description for Get Diagnostics Category +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Diagnostic Category +// - slot - Slot Name +// - options - DiagnosticsClientGetSiteDiagnosticCategorySlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategorySlot +// method. +func (client *DiagnosticsClient) GetSiteDiagnosticCategorySlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientGetSiteDiagnosticCategorySlotOptions) (DiagnosticsClientGetSiteDiagnosticCategorySlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDiagnosticCategorySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteDiagnosticCategorySlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) + if err != nil { + return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, err + } + resp, err := client.getSiteDiagnosticCategorySlotHandleResponse(httpResp) + return resp, err +} + +// getSiteDiagnosticCategorySlotCreateRequest creates the GetSiteDiagnosticCategorySlot request. +func (client *DiagnosticsClient) getSiteDiagnosticCategorySlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientGetSiteDiagnosticCategorySlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteDiagnosticCategorySlotHandleResponse handles the GetSiteDiagnosticCategorySlot response. +func (client *DiagnosticsClient) getSiteDiagnosticCategorySlotHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDiagnosticCategorySlotResponse, error) { + result := DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticCategory); err != nil { + return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, err + } + return result, nil +} + +// NewListHostingEnvironmentDetectorResponsesPager - Description for List Hosting Environment Detector Responses +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site Name +// - options - DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager +// method. +func (client *DiagnosticsClient) NewListHostingEnvironmentDetectorResponsesPager(resourceGroupName string, name string, options *DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions) *runtime.Pager[DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse] { + return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse]{ + More: func(page DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse) (DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHostingEnvironmentDetectorResponsesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{}, err + } + return client.listHostingEnvironmentDetectorResponsesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listHostingEnvironmentDetectorResponsesCreateRequest creates the ListHostingEnvironmentDetectorResponses request. +func (client *DiagnosticsClient) listHostingEnvironmentDetectorResponsesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHostingEnvironmentDetectorResponsesHandleResponse handles the ListHostingEnvironmentDetectorResponses response. +func (client *DiagnosticsClient) listHostingEnvironmentDetectorResponsesHandleResponse(resp *http.Response) (DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse, error) { + result := DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponseCollection); err != nil { + return DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{}, err + } + return result, nil +} + +// NewListSiteAnalysesPager - Description for Get Site Analyses +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Diagnostic Category +// - options - DiagnosticsClientListSiteAnalysesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteAnalysesPager +// method. +func (client *DiagnosticsClient) NewListSiteAnalysesPager(resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientListSiteAnalysesOptions) *runtime.Pager[DiagnosticsClientListSiteAnalysesResponse] { + return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteAnalysesResponse]{ + More: func(page DiagnosticsClientListSiteAnalysesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteAnalysesResponse) (DiagnosticsClientListSiteAnalysesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteAnalysesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteAnalysesCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) + }, nil) + if err != nil { + return DiagnosticsClientListSiteAnalysesResponse{}, err + } + return client.listSiteAnalysesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteAnalysesCreateRequest creates the ListSiteAnalyses request. +func (client *DiagnosticsClient) listSiteAnalysesCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientListSiteAnalysesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteAnalysesHandleResponse handles the ListSiteAnalyses response. +func (client *DiagnosticsClient) listSiteAnalysesHandleResponse(resp *http.Response) (DiagnosticsClientListSiteAnalysesResponse, error) { + result := DiagnosticsClientListSiteAnalysesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticAnalysisCollection); err != nil { + return DiagnosticsClientListSiteAnalysesResponse{}, err + } + return result, nil +} + +// NewListSiteAnalysesSlotPager - Description for Get Site Analyses +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Diagnostic Category +// - slot - Slot Name +// - options - DiagnosticsClientListSiteAnalysesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteAnalysesSlotPager +// method. +func (client *DiagnosticsClient) NewListSiteAnalysesSlotPager(resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientListSiteAnalysesSlotOptions) *runtime.Pager[DiagnosticsClientListSiteAnalysesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteAnalysesSlotResponse]{ + More: func(page DiagnosticsClientListSiteAnalysesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteAnalysesSlotResponse) (DiagnosticsClientListSiteAnalysesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteAnalysesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteAnalysesSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) + }, nil) + if err != nil { + return DiagnosticsClientListSiteAnalysesSlotResponse{}, err + } + return client.listSiteAnalysesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteAnalysesSlotCreateRequest creates the ListSiteAnalysesSlot request. +func (client *DiagnosticsClient) listSiteAnalysesSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientListSiteAnalysesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteAnalysesSlotHandleResponse handles the ListSiteAnalysesSlot response. +func (client *DiagnosticsClient) listSiteAnalysesSlotHandleResponse(resp *http.Response) (DiagnosticsClientListSiteAnalysesSlotResponse, error) { + result := DiagnosticsClientListSiteAnalysesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticAnalysisCollection); err != nil { + return DiagnosticsClientListSiteAnalysesSlotResponse{}, err + } + return result, nil +} + +// NewListSiteDetectorResponsesPager - Description for List Site Detector Responses +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - options - DiagnosticsClientListSiteDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorResponsesPager +// method. +func (client *DiagnosticsClient) NewListSiteDetectorResponsesPager(resourceGroupName string, siteName string, options *DiagnosticsClientListSiteDetectorResponsesOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorResponsesResponse] { + return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDetectorResponsesResponse]{ + More: func(page DiagnosticsClientListSiteDetectorResponsesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorResponsesResponse) (DiagnosticsClientListSiteDetectorResponsesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDetectorResponsesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDetectorResponsesCreateRequest(ctx, resourceGroupName, siteName, options) + }, nil) + if err != nil { + return DiagnosticsClientListSiteDetectorResponsesResponse{}, err + } + return client.listSiteDetectorResponsesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteDetectorResponsesCreateRequest creates the ListSiteDetectorResponses request. +func (client *DiagnosticsClient) listSiteDetectorResponsesCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *DiagnosticsClientListSiteDetectorResponsesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteDetectorResponsesHandleResponse handles the ListSiteDetectorResponses response. +func (client *DiagnosticsClient) listSiteDetectorResponsesHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDetectorResponsesResponse, error) { + result := DiagnosticsClientListSiteDetectorResponsesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponseCollection); err != nil { + return DiagnosticsClientListSiteDetectorResponsesResponse{}, err + } + return result, nil +} + +// NewListSiteDetectorResponsesSlotPager - Description for List Site Detector Responses +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - slot - Slot Name +// - options - DiagnosticsClientListSiteDetectorResponsesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorResponsesSlotPager +// method. +func (client *DiagnosticsClient) NewListSiteDetectorResponsesSlotPager(resourceGroupName string, siteName string, slot string, options *DiagnosticsClientListSiteDetectorResponsesSlotOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorResponsesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDetectorResponsesSlotResponse]{ + More: func(page DiagnosticsClientListSiteDetectorResponsesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorResponsesSlotResponse) (DiagnosticsClientListSiteDetectorResponsesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDetectorResponsesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDetectorResponsesSlotCreateRequest(ctx, resourceGroupName, siteName, slot, options) + }, nil) + if err != nil { + return DiagnosticsClientListSiteDetectorResponsesSlotResponse{}, err + } + return client.listSiteDetectorResponsesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteDetectorResponsesSlotCreateRequest creates the ListSiteDetectorResponsesSlot request. +func (client *DiagnosticsClient) listSiteDetectorResponsesSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, slot string, options *DiagnosticsClientListSiteDetectorResponsesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteDetectorResponsesSlotHandleResponse handles the ListSiteDetectorResponsesSlot response. +func (client *DiagnosticsClient) listSiteDetectorResponsesSlotHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDetectorResponsesSlotResponse, error) { + result := DiagnosticsClientListSiteDetectorResponsesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponseCollection); err != nil { + return DiagnosticsClientListSiteDetectorResponsesSlotResponse{}, err + } + return result, nil +} + +// NewListSiteDetectorsPager - Description for Get Detectors +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Diagnostic Category +// - options - DiagnosticsClientListSiteDetectorsOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorsPager +// method. +func (client *DiagnosticsClient) NewListSiteDetectorsPager(resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientListSiteDetectorsOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorsResponse] { + return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDetectorsResponse]{ + More: func(page DiagnosticsClientListSiteDetectorsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorsResponse) (DiagnosticsClientListSiteDetectorsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDetectorsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDetectorsCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) + }, nil) + if err != nil { + return DiagnosticsClientListSiteDetectorsResponse{}, err + } + return client.listSiteDetectorsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteDetectorsCreateRequest creates the ListSiteDetectors request. +func (client *DiagnosticsClient) listSiteDetectorsCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientListSiteDetectorsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteDetectorsHandleResponse handles the ListSiteDetectors response. +func (client *DiagnosticsClient) listSiteDetectorsHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDetectorsResponse, error) { + result := DiagnosticsClientListSiteDetectorsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticDetectorCollection); err != nil { + return DiagnosticsClientListSiteDetectorsResponse{}, err + } + return result, nil +} + +// NewListSiteDetectorsSlotPager - Description for Get Detectors +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - diagnosticCategory - Diagnostic Category +// - slot - Slot Name +// - options - DiagnosticsClientListSiteDetectorsSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorsSlotPager +// method. +func (client *DiagnosticsClient) NewListSiteDetectorsSlotPager(resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientListSiteDetectorsSlotOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDetectorsSlotResponse]{ + More: func(page DiagnosticsClientListSiteDetectorsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorsSlotResponse) (DiagnosticsClientListSiteDetectorsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDetectorsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDetectorsSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) + }, nil) + if err != nil { + return DiagnosticsClientListSiteDetectorsSlotResponse{}, err + } + return client.listSiteDetectorsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteDetectorsSlotCreateRequest creates the ListSiteDetectorsSlot request. +func (client *DiagnosticsClient) listSiteDetectorsSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientListSiteDetectorsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if diagnosticCategory == "" { + return nil, errors.New("parameter diagnosticCategory cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteDetectorsSlotHandleResponse handles the ListSiteDetectorsSlot response. +func (client *DiagnosticsClient) listSiteDetectorsSlotHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDetectorsSlotResponse, error) { + result := DiagnosticsClientListSiteDetectorsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticDetectorCollection); err != nil { + return DiagnosticsClientListSiteDetectorsSlotResponse{}, err + } + return result, nil +} + +// NewListSiteDiagnosticCategoriesPager - Description for Get Diagnostics Categories +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - options - DiagnosticsClientListSiteDiagnosticCategoriesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDiagnosticCategoriesPager +// method. +func (client *DiagnosticsClient) NewListSiteDiagnosticCategoriesPager(resourceGroupName string, siteName string, options *DiagnosticsClientListSiteDiagnosticCategoriesOptions) *runtime.Pager[DiagnosticsClientListSiteDiagnosticCategoriesResponse] { + return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDiagnosticCategoriesResponse]{ + More: func(page DiagnosticsClientListSiteDiagnosticCategoriesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDiagnosticCategoriesResponse) (DiagnosticsClientListSiteDiagnosticCategoriesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDiagnosticCategoriesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDiagnosticCategoriesCreateRequest(ctx, resourceGroupName, siteName, options) + }, nil) + if err != nil { + return DiagnosticsClientListSiteDiagnosticCategoriesResponse{}, err + } + return client.listSiteDiagnosticCategoriesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteDiagnosticCategoriesCreateRequest creates the ListSiteDiagnosticCategories request. +func (client *DiagnosticsClient) listSiteDiagnosticCategoriesCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *DiagnosticsClientListSiteDiagnosticCategoriesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteDiagnosticCategoriesHandleResponse handles the ListSiteDiagnosticCategories response. +func (client *DiagnosticsClient) listSiteDiagnosticCategoriesHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDiagnosticCategoriesResponse, error) { + result := DiagnosticsClientListSiteDiagnosticCategoriesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticCategoryCollection); err != nil { + return DiagnosticsClientListSiteDiagnosticCategoriesResponse{}, err + } + return result, nil +} + +// NewListSiteDiagnosticCategoriesSlotPager - Description for Get Diagnostics Categories +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site Name +// - slot - Slot Name +// - options - DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager +// method. +func (client *DiagnosticsClient) NewListSiteDiagnosticCategoriesSlotPager(resourceGroupName string, siteName string, slot string, options *DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions) *runtime.Pager[DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse]{ + More: func(page DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse) (DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDiagnosticCategoriesSlotCreateRequest(ctx, resourceGroupName, siteName, slot, options) + }, nil) + if err != nil { + return DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{}, err + } + return client.listSiteDiagnosticCategoriesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteDiagnosticCategoriesSlotCreateRequest creates the ListSiteDiagnosticCategoriesSlot request. +func (client *DiagnosticsClient) listSiteDiagnosticCategoriesSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, slot string, options *DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteDiagnosticCategoriesSlotHandleResponse handles the ListSiteDiagnosticCategoriesSlot response. +func (client *DiagnosticsClient) listSiteDiagnosticCategoriesSlotHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse, error) { + result := DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticCategoryCollection); err != nil { + return DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/domainregistrationprovider_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/domainregistrationprovider_client.go new file mode 100644 index 00000000..09e802c2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/domainregistrationprovider_client.go @@ -0,0 +1,90 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// DomainRegistrationProviderClient contains the methods for the DomainRegistrationProvider group. +// Don't use this type directly, use NewDomainRegistrationProviderClient() instead. +type DomainRegistrationProviderClient struct { + internal *arm.Client +} + +// NewDomainRegistrationProviderClient creates a new instance of DomainRegistrationProviderClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDomainRegistrationProviderClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DomainRegistrationProviderClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DomainRegistrationProviderClient{ + internal: cl, + } + return client, nil +} + +// NewListOperationsPager - Description for Implements Csm operations Api to exposes the list of available Csm Apis under +// the resource provider +// +// Generated from API version 2024-04-01 +// - options - DomainRegistrationProviderClientListOperationsOptions contains the optional parameters for the DomainRegistrationProviderClient.NewListOperationsPager +// method. +func (client *DomainRegistrationProviderClient) NewListOperationsPager(options *DomainRegistrationProviderClientListOperationsOptions) *runtime.Pager[DomainRegistrationProviderClientListOperationsResponse] { + return runtime.NewPager(runtime.PagingHandler[DomainRegistrationProviderClientListOperationsResponse]{ + More: func(page DomainRegistrationProviderClientListOperationsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DomainRegistrationProviderClientListOperationsResponse) (DomainRegistrationProviderClientListOperationsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainRegistrationProviderClient.NewListOperationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listOperationsCreateRequest(ctx, options) + }, nil) + if err != nil { + return DomainRegistrationProviderClientListOperationsResponse{}, err + } + return client.listOperationsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listOperationsCreateRequest creates the ListOperations request. +func (client *DomainRegistrationProviderClient) listOperationsCreateRequest(ctx context.Context, options *DomainRegistrationProviderClientListOperationsOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.DomainRegistration/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listOperationsHandleResponse handles the ListOperations response. +func (client *DomainRegistrationProviderClient) listOperationsHandleResponse(resp *http.Response) (DomainRegistrationProviderClientListOperationsResponse, error) { + result := DomainRegistrationProviderClientListOperationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmOperationCollection); err != nil { + return DomainRegistrationProviderClientListOperationsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/domains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/domains_client.go new file mode 100644 index 00000000..7942689a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/domains_client.go @@ -0,0 +1,1064 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// DomainsClient contains the methods for the Domains group. +// Don't use this type directly, use NewDomainsClient() instead. +type DomainsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDomainsClient creates a new instance of DomainsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DomainsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DomainsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckAvailability - Description for Check if a domain is available for registration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - identifier - Name of the domain. +// - options - DomainsClientCheckAvailabilityOptions contains the optional parameters for the DomainsClient.CheckAvailability +// method. +func (client *DomainsClient) CheckAvailability(ctx context.Context, identifier NameIdentifier, options *DomainsClientCheckAvailabilityOptions) (DomainsClientCheckAvailabilityResponse, error) { + var err error + const operationName = "DomainsClient.CheckAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkAvailabilityCreateRequest(ctx, identifier, options) + if err != nil { + return DomainsClientCheckAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientCheckAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientCheckAvailabilityResponse{}, err + } + resp, err := client.checkAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkAvailabilityCreateRequest creates the CheckAvailability request. +func (client *DomainsClient) checkAvailabilityCreateRequest(ctx context.Context, identifier NameIdentifier, options *DomainsClientCheckAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, identifier); err != nil { + return nil, err + } + return req, nil +} + +// checkAvailabilityHandleResponse handles the CheckAvailability response. +func (client *DomainsClient) checkAvailabilityHandleResponse(resp *http.Response) (DomainsClientCheckAvailabilityResponse, error) { + result := DomainsClientCheckAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DomainAvailabilityCheckResult); err != nil { + return DomainsClientCheckAvailabilityResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Description for Creates or updates a domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of the domain. +// - domain - Domain registration information. +// - options - DomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the DomainsClient.BeginCreateOrUpdate +// method. +func (client *DomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, domainName string, domain Domain, options *DomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DomainsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, domainName, domain, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Description for Creates or updates a domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *DomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, domainName string, domain Domain, options *DomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DomainsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, domainName, domain, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, domainName string, domain Domain, options *DomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, domain); err != nil { + return nil, err + } + return req, nil +} + +// CreateOrUpdateOwnershipIdentifier - Description for Creates an ownership identifier for a domain or updates identifier +// details for an existing identifier +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of domain. +// - name - Name of identifier. +// - domainOwnershipIdentifier - A JSON representation of the domain ownership properties. +// - options - DomainsClientCreateOrUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.CreateOrUpdateOwnershipIdentifier +// method. +func (client *DomainsClient) CreateOrUpdateOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier, options *DomainsClientCreateOrUpdateOwnershipIdentifierOptions) (DomainsClientCreateOrUpdateOwnershipIdentifierResponse, error) { + var err error + const operationName = "DomainsClient.CreateOrUpdateOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, domainOwnershipIdentifier, options) + if err != nil { + return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, err + } + resp, err := client.createOrUpdateOwnershipIdentifierHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateOwnershipIdentifierCreateRequest creates the CreateOrUpdateOwnershipIdentifier request. +func (client *DomainsClient) createOrUpdateOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier, options *DomainsClientCreateOrUpdateOwnershipIdentifierOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateOwnershipIdentifierHandleResponse handles the CreateOrUpdateOwnershipIdentifier response. +func (client *DomainsClient) createOrUpdateOwnershipIdentifierHandleResponse(resp *http.Response) (DomainsClientCreateOrUpdateOwnershipIdentifierResponse, error) { + result := DomainsClientCreateOrUpdateOwnershipIdentifierResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DomainOwnershipIdentifier); err != nil { + return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, err + } + return result, nil +} + +// Delete - Description for Delete a domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of the domain. +// - options - DomainsClientDeleteOptions contains the optional parameters for the DomainsClient.Delete method. +func (client *DomainsClient) Delete(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientDeleteOptions) (DomainsClientDeleteResponse, error) { + var err error + const operationName = "DomainsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, domainName, options) + if err != nil { + return DomainsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DomainsClientDeleteResponse{}, err + } + return DomainsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.ForceHardDeleteDomain != nil { + reqQP.Set("forceHardDeleteDomain", strconv.FormatBool(*options.ForceHardDeleteDomain)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteOwnershipIdentifier - Description for Delete ownership identifier for domain +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of domain. +// - name - Name of identifier. +// - options - DomainsClientDeleteOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.DeleteOwnershipIdentifier +// method. +func (client *DomainsClient) DeleteOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, options *DomainsClientDeleteOwnershipIdentifierOptions) (DomainsClientDeleteOwnershipIdentifierResponse, error) { + var err error + const operationName = "DomainsClient.DeleteOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, options) + if err != nil { + return DomainsClientDeleteOwnershipIdentifierResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientDeleteOwnershipIdentifierResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DomainsClientDeleteOwnershipIdentifierResponse{}, err + } + return DomainsClientDeleteOwnershipIdentifierResponse{}, nil +} + +// deleteOwnershipIdentifierCreateRequest creates the DeleteOwnershipIdentifier request. +func (client *DomainsClient) deleteOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, domainName string, name string, options *DomainsClientDeleteOwnershipIdentifierOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Description for Get a domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of the domain. +// - options - DomainsClientGetOptions contains the optional parameters for the DomainsClient.Get method. +func (client *DomainsClient) Get(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientGetOptions) (DomainsClientGetResponse, error) { + var err error + const operationName = "DomainsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, domainName, options) + if err != nil { + return DomainsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DomainsClient) getHandleResponse(resp *http.Response) (DomainsClientGetResponse, error) { + result := DomainsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Domain); err != nil { + return DomainsClientGetResponse{}, err + } + return result, nil +} + +// GetControlCenterSsoRequest - Description for Generate a single sign-on request for the domain management portal. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - options - DomainsClientGetControlCenterSsoRequestOptions contains the optional parameters for the DomainsClient.GetControlCenterSsoRequest +// method. +func (client *DomainsClient) GetControlCenterSsoRequest(ctx context.Context, options *DomainsClientGetControlCenterSsoRequestOptions) (DomainsClientGetControlCenterSsoRequestResponse, error) { + var err error + const operationName = "DomainsClient.GetControlCenterSsoRequest" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getControlCenterSsoRequestCreateRequest(ctx, options) + if err != nil { + return DomainsClientGetControlCenterSsoRequestResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientGetControlCenterSsoRequestResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientGetControlCenterSsoRequestResponse{}, err + } + resp, err := client.getControlCenterSsoRequestHandleResponse(httpResp) + return resp, err +} + +// getControlCenterSsoRequestCreateRequest creates the GetControlCenterSsoRequest request. +func (client *DomainsClient) getControlCenterSsoRequestCreateRequest(ctx context.Context, options *DomainsClientGetControlCenterSsoRequestOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getControlCenterSsoRequestHandleResponse handles the GetControlCenterSsoRequest response. +func (client *DomainsClient) getControlCenterSsoRequestHandleResponse(resp *http.Response) (DomainsClientGetControlCenterSsoRequestResponse, error) { + result := DomainsClientGetControlCenterSsoRequestResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DomainControlCenterSsoRequest); err != nil { + return DomainsClientGetControlCenterSsoRequestResponse{}, err + } + return result, nil +} + +// GetOwnershipIdentifier - Description for Get ownership identifier for domain +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of domain. +// - name - Name of identifier. +// - options - DomainsClientGetOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.GetOwnershipIdentifier +// method. +func (client *DomainsClient) GetOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, options *DomainsClientGetOwnershipIdentifierOptions) (DomainsClientGetOwnershipIdentifierResponse, error) { + var err error + const operationName = "DomainsClient.GetOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, options) + if err != nil { + return DomainsClientGetOwnershipIdentifierResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientGetOwnershipIdentifierResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientGetOwnershipIdentifierResponse{}, err + } + resp, err := client.getOwnershipIdentifierHandleResponse(httpResp) + return resp, err +} + +// getOwnershipIdentifierCreateRequest creates the GetOwnershipIdentifier request. +func (client *DomainsClient) getOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, domainName string, name string, options *DomainsClientGetOwnershipIdentifierOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getOwnershipIdentifierHandleResponse handles the GetOwnershipIdentifier response. +func (client *DomainsClient) getOwnershipIdentifierHandleResponse(resp *http.Response) (DomainsClientGetOwnershipIdentifierResponse, error) { + result := DomainsClientGetOwnershipIdentifierResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DomainOwnershipIdentifier); err != nil { + return DomainsClientGetOwnershipIdentifierResponse{}, err + } + return result, nil +} + +// NewListPager - Description for Get all domains in a subscription. +// +// Generated from API version 2024-04-01 +// - options - DomainsClientListOptions contains the optional parameters for the DomainsClient.NewListPager method. +func (client *DomainsClient) NewListPager(options *DomainsClientListOptions) *runtime.Pager[DomainsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DomainsClientListResponse]{ + More: func(page DomainsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DomainsClientListResponse) (DomainsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return DomainsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DomainsClient) listCreateRequest(ctx context.Context, options *DomainsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DomainsClient) listHandleResponse(resp *http.Response) (DomainsClientListResponse, error) { + result := DomainsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DomainCollection); err != nil { + return DomainsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Description for Get all domains in a resource group. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - options - DomainsClientListByResourceGroupOptions contains the optional parameters for the DomainsClient.NewListByResourceGroupPager +// method. +func (client *DomainsClient) NewListByResourceGroupPager(resourceGroupName string, options *DomainsClientListByResourceGroupOptions) *runtime.Pager[DomainsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[DomainsClientListByResourceGroupResponse]{ + More: func(page DomainsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DomainsClientListByResourceGroupResponse) (DomainsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return DomainsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *DomainsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DomainsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *DomainsClient) listByResourceGroupHandleResponse(resp *http.Response) (DomainsClientListByResourceGroupResponse, error) { + result := DomainsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DomainCollection); err != nil { + return DomainsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListOwnershipIdentifiersPager - Description for Lists domain ownership identifiers. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of domain. +// - options - DomainsClientListOwnershipIdentifiersOptions contains the optional parameters for the DomainsClient.NewListOwnershipIdentifiersPager +// method. +func (client *DomainsClient) NewListOwnershipIdentifiersPager(resourceGroupName string, domainName string, options *DomainsClientListOwnershipIdentifiersOptions) *runtime.Pager[DomainsClientListOwnershipIdentifiersResponse] { + return runtime.NewPager(runtime.PagingHandler[DomainsClientListOwnershipIdentifiersResponse]{ + More: func(page DomainsClientListOwnershipIdentifiersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DomainsClientListOwnershipIdentifiersResponse) (DomainsClientListOwnershipIdentifiersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainsClient.NewListOwnershipIdentifiersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listOwnershipIdentifiersCreateRequest(ctx, resourceGroupName, domainName, options) + }, nil) + if err != nil { + return DomainsClientListOwnershipIdentifiersResponse{}, err + } + return client.listOwnershipIdentifiersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listOwnershipIdentifiersCreateRequest creates the ListOwnershipIdentifiers request. +func (client *DomainsClient) listOwnershipIdentifiersCreateRequest(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientListOwnershipIdentifiersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listOwnershipIdentifiersHandleResponse handles the ListOwnershipIdentifiers response. +func (client *DomainsClient) listOwnershipIdentifiersHandleResponse(resp *http.Response) (DomainsClientListOwnershipIdentifiersResponse, error) { + result := DomainsClientListOwnershipIdentifiersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DomainOwnershipIdentifierCollection); err != nil { + return DomainsClientListOwnershipIdentifiersResponse{}, err + } + return result, nil +} + +// NewListRecommendationsPager - Description for Get domain name recommendations based on keywords. +// +// Generated from API version 2024-04-01 +// - parameters - Search parameters for domain name recommendations. +// - options - DomainsClientListRecommendationsOptions contains the optional parameters for the DomainsClient.NewListRecommendationsPager +// method. +func (client *DomainsClient) NewListRecommendationsPager(parameters DomainRecommendationSearchParameters, options *DomainsClientListRecommendationsOptions) *runtime.Pager[DomainsClientListRecommendationsResponse] { + return runtime.NewPager(runtime.PagingHandler[DomainsClientListRecommendationsResponse]{ + More: func(page DomainsClientListRecommendationsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DomainsClientListRecommendationsResponse) (DomainsClientListRecommendationsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainsClient.NewListRecommendationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRecommendationsCreateRequest(ctx, parameters, options) + }, nil) + if err != nil { + return DomainsClientListRecommendationsResponse{}, err + } + return client.listRecommendationsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listRecommendationsCreateRequest creates the ListRecommendations request. +func (client *DomainsClient) listRecommendationsCreateRequest(ctx context.Context, parameters DomainRecommendationSearchParameters, options *DomainsClientListRecommendationsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listRecommendationsHandleResponse handles the ListRecommendations response. +func (client *DomainsClient) listRecommendationsHandleResponse(resp *http.Response) (DomainsClientListRecommendationsResponse, error) { + result := DomainsClientListRecommendationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NameIdentifierCollection); err != nil { + return DomainsClientListRecommendationsResponse{}, err + } + return result, nil +} + +// Renew - Description for Renew a domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of the domain. +// - options - DomainsClientRenewOptions contains the optional parameters for the DomainsClient.Renew method. +func (client *DomainsClient) Renew(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientRenewOptions) (DomainsClientRenewResponse, error) { + var err error + const operationName = "DomainsClient.Renew" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.renewCreateRequest(ctx, resourceGroupName, domainName, options) + if err != nil { + return DomainsClientRenewResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientRenewResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DomainsClientRenewResponse{}, err + } + return DomainsClientRenewResponse{}, nil +} + +// renewCreateRequest creates the Renew request. +func (client *DomainsClient) renewCreateRequest(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientRenewOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// TransferOut - Transfer out domain to another registrar +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of domain. +// - options - DomainsClientTransferOutOptions contains the optional parameters for the DomainsClient.TransferOut method. +func (client *DomainsClient) TransferOut(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientTransferOutOptions) (DomainsClientTransferOutResponse, error) { + var err error + const operationName = "DomainsClient.TransferOut" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.transferOutCreateRequest(ctx, resourceGroupName, domainName, options) + if err != nil { + return DomainsClientTransferOutResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientTransferOutResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientTransferOutResponse{}, err + } + resp, err := client.transferOutHandleResponse(httpResp) + return resp, err +} + +// transferOutCreateRequest creates the TransferOut request. +func (client *DomainsClient) transferOutCreateRequest(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientTransferOutOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// transferOutHandleResponse handles the TransferOut response. +func (client *DomainsClient) transferOutHandleResponse(resp *http.Response) (DomainsClientTransferOutResponse, error) { + result := DomainsClientTransferOutResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Domain); err != nil { + return DomainsClientTransferOutResponse{}, err + } + return result, nil +} + +// Update - Description for Creates or updates a domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of the domain. +// - domain - Domain registration information. +// - options - DomainsClientUpdateOptions contains the optional parameters for the DomainsClient.Update method. +func (client *DomainsClient) Update(ctx context.Context, resourceGroupName string, domainName string, domain DomainPatchResource, options *DomainsClientUpdateOptions) (DomainsClientUpdateResponse, error) { + var err error + const operationName = "DomainsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, domainName, domain, options) + if err != nil { + return DomainsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return DomainsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *DomainsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, domainName string, domain DomainPatchResource, options *DomainsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, domain); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *DomainsClient) updateHandleResponse(resp *http.Response) (DomainsClientUpdateResponse, error) { + result := DomainsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Domain); err != nil { + return DomainsClientUpdateResponse{}, err + } + return result, nil +} + +// UpdateOwnershipIdentifier - Description for Creates an ownership identifier for a domain or updates identifier details +// for an existing identifier +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - domainName - Name of domain. +// - name - Name of identifier. +// - domainOwnershipIdentifier - A JSON representation of the domain ownership properties. +// - options - DomainsClientUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.UpdateOwnershipIdentifier +// method. +func (client *DomainsClient) UpdateOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier, options *DomainsClientUpdateOwnershipIdentifierOptions) (DomainsClientUpdateOwnershipIdentifierResponse, error) { + var err error + const operationName = "DomainsClient.UpdateOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, domainOwnershipIdentifier, options) + if err != nil { + return DomainsClientUpdateOwnershipIdentifierResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DomainsClientUpdateOwnershipIdentifierResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientUpdateOwnershipIdentifierResponse{}, err + } + resp, err := client.updateOwnershipIdentifierHandleResponse(httpResp) + return resp, err +} + +// updateOwnershipIdentifierCreateRequest creates the UpdateOwnershipIdentifier request. +func (client *DomainsClient) updateOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier, options *DomainsClientUpdateOwnershipIdentifierOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil +} + +// updateOwnershipIdentifierHandleResponse handles the UpdateOwnershipIdentifier response. +func (client *DomainsClient) updateOwnershipIdentifierHandleResponse(resp *http.Response) (DomainsClientUpdateOwnershipIdentifierResponse, error) { + result := DomainsClientUpdateOwnershipIdentifierResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DomainOwnershipIdentifier); err != nil { + return DomainsClientUpdateOwnershipIdentifierResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/environments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/environments_client.go new file mode 100644 index 00000000..f9b2ea0e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/environments_client.go @@ -0,0 +1,3427 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// EnvironmentsClient contains the methods for the AppServiceEnvironments group. +// Don't use this type directly, use NewEnvironmentsClient() instead. +type EnvironmentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewEnvironmentsClient creates a new instance of EnvironmentsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnvironmentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &EnvironmentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the +// EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection method. +func (client *EnvironmentsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.approveOrRejectPrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. +func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, privateEndpointWrapper); err != nil { + return nil, err + } + return req, nil +} + +// BeginChangeVnet - Description for Move an App Service Environment to a different VNET. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - vnetInfo - Details for the new virtual network. +// - options - EnvironmentsClientBeginChangeVnetOptions contains the optional parameters for the EnvironmentsClient.BeginChangeVnet +// method. +func (client *EnvironmentsClient) BeginChangeVnet(ctx context.Context, resourceGroupName string, name string, vnetInfo VirtualNetworkProfile, options *EnvironmentsClientBeginChangeVnetOptions) (*runtime.Poller[*runtime.Pager[EnvironmentsClientChangeVnetResponse]], error) { + pager := runtime.NewPager(runtime.PagingHandler[EnvironmentsClientChangeVnetResponse]{ + More: func(page EnvironmentsClientChangeVnetResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientChangeVnetResponse) (EnvironmentsClientChangeVnetResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.BeginChangeVnet") + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.changeVnetCreateRequest(ctx, resourceGroupName, name, vnetInfo, options) + }, nil) + if err != nil { + return EnvironmentsClientChangeVnetResponse{}, err + } + return client.changeVnetHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) + if options == nil || options.ResumeToken == "" { + resp, err := client.changeVnet(ctx, resourceGroupName, name, vnetInfo, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientChangeVnetResponse]]{ + Response: &pager, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[EnvironmentsClientChangeVnetResponse]]{ + Response: &pager, + Tracer: client.internal.Tracer(), + }) + } +} + +// ChangeVnet - Description for Move an App Service Environment to a different VNET. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentsClient) changeVnet(ctx context.Context, resourceGroupName string, name string, vnetInfo VirtualNetworkProfile, options *EnvironmentsClientBeginChangeVnetOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginChangeVnet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.changeVnetCreateRequest(ctx, resourceGroupName, name, vnetInfo, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// changeVnetCreateRequest creates the ChangeVnet request. +func (client *EnvironmentsClient) changeVnetCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetInfo VirtualNetworkProfile, options *EnvironmentsClientBeginChangeVnetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vnetInfo); err != nil { + return nil, err + } + return req, nil +} + +// changeVnetHandleResponse handles the ChangeVnet response. +func (client *EnvironmentsClient) changeVnetHandleResponse(resp *http.Response) (EnvironmentsClientChangeVnetResponse, error) { + result := EnvironmentsClientChangeVnetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { + return EnvironmentsClientChangeVnetResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Description for Create or update an App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - hostingEnvironmentEnvelope - Configuration details of the App Service Environment. +// - options - EnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdate +// method. +func (client *EnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentResource, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[EnvironmentsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, name, hostingEnvironmentEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Description for Create or update an App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentResource, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, hostingEnvironmentEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentResource, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdateMultiRolePool - Description for Create or update a multi-role pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - multiRolePoolEnvelope - Properties of the multi-role pool. +// - options - EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateMultiRolePool +// method. +func (client *EnvironmentsClient) BeginCreateOrUpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (*runtime.Poller[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdateMultiRolePool(ctx, resourceGroupName, name, multiRolePoolEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdateMultiRolePool - Description for Create or update a multi-role pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentsClient) createOrUpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginCreateOrUpdateMultiRolePool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateMultiRolePoolCreateRequest(ctx, resourceGroupName, name, multiRolePoolEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateMultiRolePoolCreateRequest creates the CreateOrUpdateMultiRolePool request. +func (client *EnvironmentsClient) createOrUpdateMultiRolePoolCreateRequest(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, multiRolePoolEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdateWorkerPool - Description for Create or update a worker pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - workerPoolName - Name of the worker pool. +// - workerPoolEnvelope - Properties of the worker pool. +// - options - EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateWorkerPool +// method. +func (client *EnvironmentsClient) BeginCreateOrUpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (*runtime.Poller[EnvironmentsClientCreateOrUpdateWorkerPoolResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdateWorkerPool(ctx, resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientCreateOrUpdateWorkerPoolResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientCreateOrUpdateWorkerPoolResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdateWorkerPool - Description for Create or update a worker pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentsClient) createOrUpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginCreateOrUpdateWorkerPool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateWorkerPoolCreateRequest creates the CreateOrUpdateWorkerPool request. +func (client *EnvironmentsClient) createOrUpdateWorkerPoolCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workerPoolName == "" { + return nil, errors.New("parameter workerPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, workerPoolEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Description for Delete an App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientBeginDeleteOptions contains the optional parameters for the EnvironmentsClient.BeginDelete +// method. +func (client *EnvironmentsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginDeleteOptions) (*runtime.Poller[EnvironmentsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Description for Delete an App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *EnvironmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.ForceDelete != nil { + reqQP.Set("forceDelete", strconv.FormatBool(*options.ForceDelete)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteAseCustomDNSSuffixConfiguration - Delete Custom Dns Suffix configuration of an App Service Environment +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration +// method. +func (client *EnvironmentsClient) DeleteAseCustomDNSSuffixConfiguration(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse, error) { + var err error + const operationName = "EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteAseCustomDNSSuffixConfigurationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, err + } + resp, err := client.deleteAseCustomDNSSuffixConfigurationHandleResponse(httpResp) + return resp, err +} + +// deleteAseCustomDNSSuffixConfigurationCreateRequest creates the DeleteAseCustomDNSSuffixConfiguration request. +func (client *EnvironmentsClient) deleteAseCustomDNSSuffixConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// deleteAseCustomDNSSuffixConfigurationHandleResponse handles the DeleteAseCustomDNSSuffixConfiguration response. +func (client *EnvironmentsClient) deleteAseCustomDNSSuffixConfigurationHandleResponse(resp *http.Response) (EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse, error) { + result := EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { + return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, err + } + return result, nil +} + +// BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginDeletePrivateEndpointConnection +// method. +func (client *EnvironmentsClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (*runtime.Poller[EnvironmentsClientDeletePrivateEndpointConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentsClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginDeletePrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. +func (client *EnvironmentsClient) deletePrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Description for Get the properties of an App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. +func (client *EnvironmentsClient) Get(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetOptions) (EnvironmentsClientGetResponse, error) { + var err error + const operationName = "EnvironmentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *EnvironmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *EnvironmentsClient) getHandleResponse(resp *http.Response) (EnvironmentsClientGetResponse, error) { + result := EnvironmentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentResource); err != nil { + return EnvironmentsClientGetResponse{}, err + } + return result, nil +} + +// GetAseCustomDNSSuffixConfiguration - Get Custom Dns Suffix configuration of an App Service Environment +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseCustomDNSSuffixConfiguration +// method. +func (client *EnvironmentsClient) GetAseCustomDNSSuffixConfiguration(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetAseCustomDNSSuffixConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAseCustomDNSSuffixConfigurationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, err + } + resp, err := client.getAseCustomDNSSuffixConfigurationHandleResponse(httpResp) + return resp, err +} + +// getAseCustomDNSSuffixConfigurationCreateRequest creates the GetAseCustomDNSSuffixConfiguration request. +func (client *EnvironmentsClient) getAseCustomDNSSuffixConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAseCustomDNSSuffixConfigurationHandleResponse handles the GetAseCustomDNSSuffixConfiguration response. +func (client *EnvironmentsClient) getAseCustomDNSSuffixConfigurationHandleResponse(resp *http.Response) (EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse, error) { + result := EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDNSSuffixConfiguration); err != nil { + return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, err + } + return result, nil +} + +// GetAseV3NetworkingConfiguration - Description for Get networking configuration of an App Service Environment +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientGetAseV3NetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseV3NetworkingConfiguration +// method. +func (client *EnvironmentsClient) GetAseV3NetworkingConfiguration(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetAseV3NetworkingConfigurationOptions) (EnvironmentsClientGetAseV3NetworkingConfigurationResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetAseV3NetworkingConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAseV3NetworkingConfigurationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, err + } + resp, err := client.getAseV3NetworkingConfigurationHandleResponse(httpResp) + return resp, err +} + +// getAseV3NetworkingConfigurationCreateRequest creates the GetAseV3NetworkingConfiguration request. +func (client *EnvironmentsClient) getAseV3NetworkingConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetAseV3NetworkingConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAseV3NetworkingConfigurationHandleResponse handles the GetAseV3NetworkingConfiguration response. +func (client *EnvironmentsClient) getAseV3NetworkingConfigurationHandleResponse(resp *http.Response) (EnvironmentsClientGetAseV3NetworkingConfigurationResponse, error) { + result := EnvironmentsClientGetAseV3NetworkingConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AseV3NetworkingConfiguration); err != nil { + return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, err + } + return result, nil +} + +// GetDiagnosticsItem - Description for Get a diagnostics item for an App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - diagnosticsName - Name of the diagnostics item. +// - options - EnvironmentsClientGetDiagnosticsItemOptions contains the optional parameters for the EnvironmentsClient.GetDiagnosticsItem +// method. +func (client *EnvironmentsClient) GetDiagnosticsItem(ctx context.Context, resourceGroupName string, name string, diagnosticsName string, options *EnvironmentsClientGetDiagnosticsItemOptions) (EnvironmentsClientGetDiagnosticsItemResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetDiagnosticsItem" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDiagnosticsItemCreateRequest(ctx, resourceGroupName, name, diagnosticsName, options) + if err != nil { + return EnvironmentsClientGetDiagnosticsItemResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientGetDiagnosticsItemResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetDiagnosticsItemResponse{}, err + } + resp, err := client.getDiagnosticsItemHandleResponse(httpResp) + return resp, err +} + +// getDiagnosticsItemCreateRequest creates the GetDiagnosticsItem request. +func (client *EnvironmentsClient) getDiagnosticsItemCreateRequest(ctx context.Context, resourceGroupName string, name string, diagnosticsName string, options *EnvironmentsClientGetDiagnosticsItemOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if diagnosticsName == "" { + return nil, errors.New("parameter diagnosticsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{diagnosticsName}", url.PathEscape(diagnosticsName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDiagnosticsItemHandleResponse handles the GetDiagnosticsItem response. +func (client *EnvironmentsClient) getDiagnosticsItemHandleResponse(resp *http.Response) (EnvironmentsClientGetDiagnosticsItemResponse, error) { + result := EnvironmentsClientGetDiagnosticsItemResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostingEnvironmentDiagnostics); err != nil { + return EnvironmentsClientGetDiagnosticsItemResponse{}, err + } + return result, nil +} + +// NewGetInboundNetworkDependenciesEndpointsPager - Description for Get the network endpoints of all inbound dependencies +// of an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager +// method. +func (client *EnvironmentsClient) NewGetInboundNetworkDependenciesEndpointsPager(resourceGroupName string, name string, options *EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions) *runtime.Pager[EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse]{ + More: func(page EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse) (EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getInboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{}, err + } + return client.getInboundNetworkDependenciesEndpointsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getInboundNetworkDependenciesEndpointsCreateRequest creates the GetInboundNetworkDependenciesEndpoints request. +func (client *EnvironmentsClient) getInboundNetworkDependenciesEndpointsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInboundNetworkDependenciesEndpointsHandleResponse handles the GetInboundNetworkDependenciesEndpoints response. +func (client *EnvironmentsClient) getInboundNetworkDependenciesEndpointsHandleResponse(resp *http.Response) (EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse, error) { + result := EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InboundEnvironmentEndpointCollection); err != nil { + return EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{}, err + } + return result, nil +} + +// GetMultiRolePool - Description for Get properties of a multi-role pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientGetMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.GetMultiRolePool +// method. +func (client *EnvironmentsClient) GetMultiRolePool(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetMultiRolePoolOptions) (EnvironmentsClientGetMultiRolePoolResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetMultiRolePool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getMultiRolePoolCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientGetMultiRolePoolResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientGetMultiRolePoolResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetMultiRolePoolResponse{}, err + } + resp, err := client.getMultiRolePoolHandleResponse(httpResp) + return resp, err +} + +// getMultiRolePoolCreateRequest creates the GetMultiRolePool request. +func (client *EnvironmentsClient) getMultiRolePoolCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetMultiRolePoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getMultiRolePoolHandleResponse handles the GetMultiRolePool response. +func (client *EnvironmentsClient) getMultiRolePoolHandleResponse(resp *http.Response) (EnvironmentsClientGetMultiRolePoolResponse, error) { + result := EnvironmentsClientGetMultiRolePoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolResource); err != nil { + return EnvironmentsClientGetMultiRolePoolResponse{}, err + } + return result, nil +} + +// NewGetOutboundNetworkDependenciesEndpointsPager - Description for Get the network endpoints of all outbound dependencies +// of an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager +// method. +func (client *EnvironmentsClient) NewGetOutboundNetworkDependenciesEndpointsPager(resourceGroupName string, name string, options *EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions) *runtime.Pager[EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse]{ + More: func(page EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse) (EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{}, err + } + return client.getOutboundNetworkDependenciesEndpointsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getOutboundNetworkDependenciesEndpointsCreateRequest creates the GetOutboundNetworkDependenciesEndpoints request. +func (client *EnvironmentsClient) getOutboundNetworkDependenciesEndpointsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getOutboundNetworkDependenciesEndpointsHandleResponse handles the GetOutboundNetworkDependenciesEndpoints response. +func (client *EnvironmentsClient) getOutboundNetworkDependenciesEndpointsHandleResponse(resp *http.Response) (EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse, error) { + result := EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OutboundEnvironmentEndpointCollection); err != nil { + return EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{}, err + } + return result, nil +} + +// GetPrivateEndpointConnection - Description for Gets a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - privateEndpointConnectionName - Name of the private endpoint connection. +// - options - EnvironmentsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.GetPrivateEndpointConnection +// method. +func (client *EnvironmentsClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientGetPrivateEndpointConnectionOptions) (EnvironmentsClientGetPrivateEndpointConnectionResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) + if err != nil { + return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, err + } + resp, err := client.getPrivateEndpointConnectionHandleResponse(httpResp) + return resp, err +} + +// getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. +func (client *EnvironmentsClient) getPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientGetPrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateEndpointConnectionHandleResponse handles the GetPrivateEndpointConnection response. +func (client *EnvironmentsClient) getPrivateEndpointConnectionHandleResponse(resp *http.Response) (EnvironmentsClientGetPrivateEndpointConnectionResponse, error) { + result := EnvironmentsClientGetPrivateEndpointConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RemotePrivateEndpointConnectionARMResource); err != nil { + return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, err + } + return result, nil +} + +// NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoints associated with a hosting +// environment +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the EnvironmentsClient.NewGetPrivateEndpointConnectionListPager +// method. +func (client *EnvironmentsClient) NewGetPrivateEndpointConnectionListPager(resourceGroupName string, name string, options *EnvironmentsClientGetPrivateEndpointConnectionListOptions) *runtime.Pager[EnvironmentsClientGetPrivateEndpointConnectionListResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientGetPrivateEndpointConnectionListResponse]{ + More: func(page EnvironmentsClientGetPrivateEndpointConnectionListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientGetPrivateEndpointConnectionListResponse) (EnvironmentsClientGetPrivateEndpointConnectionListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewGetPrivateEndpointConnectionListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientGetPrivateEndpointConnectionListResponse{}, err + } + return client.getPrivateEndpointConnectionListHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getPrivateEndpointConnectionListCreateRequest creates the GetPrivateEndpointConnectionList request. +func (client *EnvironmentsClient) getPrivateEndpointConnectionListCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetPrivateEndpointConnectionListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateEndpointConnectionListHandleResponse handles the GetPrivateEndpointConnectionList response. +func (client *EnvironmentsClient) getPrivateEndpointConnectionListHandleResponse(resp *http.Response) (EnvironmentsClientGetPrivateEndpointConnectionListResponse, error) { + result := EnvironmentsClientGetPrivateEndpointConnectionListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionCollection); err != nil { + return EnvironmentsClientGetPrivateEndpointConnectionListResponse{}, err + } + return result, nil +} + +// GetPrivateLinkResources - Description for Gets the private link resources +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientGetPrivateLinkResourcesOptions contains the optional parameters for the EnvironmentsClient.GetPrivateLinkResources +// method. +func (client *EnvironmentsClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetPrivateLinkResourcesOptions) (EnvironmentsClientGetPrivateLinkResourcesResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetPrivateLinkResources" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientGetPrivateLinkResourcesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientGetPrivateLinkResourcesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetPrivateLinkResourcesResponse{}, err + } + resp, err := client.getPrivateLinkResourcesHandleResponse(httpResp) + return resp, err +} + +// getPrivateLinkResourcesCreateRequest creates the GetPrivateLinkResources request. +func (client *EnvironmentsClient) getPrivateLinkResourcesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetPrivateLinkResourcesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateLinkResourcesHandleResponse handles the GetPrivateLinkResources response. +func (client *EnvironmentsClient) getPrivateLinkResourcesHandleResponse(resp *http.Response) (EnvironmentsClientGetPrivateLinkResourcesResponse, error) { + result := EnvironmentsClientGetPrivateLinkResourcesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourcesWrapper); err != nil { + return EnvironmentsClientGetPrivateLinkResourcesResponse{}, err + } + return result, nil +} + +// GetVipInfo - Description for Get IP addresses assigned to an App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientGetVipInfoOptions contains the optional parameters for the EnvironmentsClient.GetVipInfo method. +func (client *EnvironmentsClient) GetVipInfo(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetVipInfoOptions) (EnvironmentsClientGetVipInfoResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetVipInfo" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVipInfoCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientGetVipInfoResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientGetVipInfoResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetVipInfoResponse{}, err + } + resp, err := client.getVipInfoHandleResponse(httpResp) + return resp, err +} + +// getVipInfoCreateRequest creates the GetVipInfo request. +func (client *EnvironmentsClient) getVipInfoCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetVipInfoOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVipInfoHandleResponse handles the GetVipInfo response. +func (client *EnvironmentsClient) getVipInfoHandleResponse(resp *http.Response) (EnvironmentsClientGetVipInfoResponse, error) { + result := EnvironmentsClientGetVipInfoResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AddressResponse); err != nil { + return EnvironmentsClientGetVipInfoResponse{}, err + } + return result, nil +} + +// GetWorkerPool - Description for Get properties of a worker pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - workerPoolName - Name of the worker pool. +// - options - EnvironmentsClientGetWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.GetWorkerPool +// method. +func (client *EnvironmentsClient) GetWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientGetWorkerPoolOptions) (EnvironmentsClientGetWorkerPoolResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetWorkerPool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) + if err != nil { + return EnvironmentsClientGetWorkerPoolResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientGetWorkerPoolResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetWorkerPoolResponse{}, err + } + resp, err := client.getWorkerPoolHandleResponse(httpResp) + return resp, err +} + +// getWorkerPoolCreateRequest creates the GetWorkerPool request. +func (client *EnvironmentsClient) getWorkerPoolCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientGetWorkerPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workerPoolName == "" { + return nil, errors.New("parameter workerPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getWorkerPoolHandleResponse handles the GetWorkerPool response. +func (client *EnvironmentsClient) getWorkerPoolHandleResponse(resp *http.Response) (EnvironmentsClientGetWorkerPoolResponse, error) { + result := EnvironmentsClientGetWorkerPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolResource); err != nil { + return EnvironmentsClientGetWorkerPoolResponse{}, err + } + return result, nil +} + +// NewListPager - Description for Get all App Service Environments for a subscription. +// +// Generated from API version 2024-04-01 +// - options - EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.NewListPager method. +func (client *EnvironmentsClient) NewListPager(options *EnvironmentsClientListOptions) *runtime.Pager[EnvironmentsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListResponse]{ + More: func(page EnvironmentsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListResponse) (EnvironmentsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return EnvironmentsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *EnvironmentsClient) listCreateRequest(ctx context.Context, options *EnvironmentsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *EnvironmentsClient) listHandleResponse(resp *http.Response) (EnvironmentsClientListResponse, error) { + result := EnvironmentsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentCollection); err != nil { + return EnvironmentsClientListResponse{}, err + } + return result, nil +} + +// NewListAppServicePlansPager - Description for Get all App Service plans in an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListAppServicePlansOptions contains the optional parameters for the EnvironmentsClient.NewListAppServicePlansPager +// method. +func (client *EnvironmentsClient) NewListAppServicePlansPager(resourceGroupName string, name string, options *EnvironmentsClientListAppServicePlansOptions) *runtime.Pager[EnvironmentsClientListAppServicePlansResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListAppServicePlansResponse]{ + More: func(page EnvironmentsClientListAppServicePlansResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListAppServicePlansResponse) (EnvironmentsClientListAppServicePlansResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListAppServicePlansPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAppServicePlansCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientListAppServicePlansResponse{}, err + } + return client.listAppServicePlansHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAppServicePlansCreateRequest creates the ListAppServicePlans request. +func (client *EnvironmentsClient) listAppServicePlansCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListAppServicePlansOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAppServicePlansHandleResponse handles the ListAppServicePlans response. +func (client *EnvironmentsClient) listAppServicePlansHandleResponse(resp *http.Response) (EnvironmentsClientListAppServicePlansResponse, error) { + result := EnvironmentsClientListAppServicePlansResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PlanCollection); err != nil { + return EnvironmentsClientListAppServicePlansResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Description for Get all App Service Environments in a resource group. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - options - EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.NewListByResourceGroupPager +// method. +func (client *EnvironmentsClient) NewListByResourceGroupPager(resourceGroupName string, options *EnvironmentsClientListByResourceGroupOptions) *runtime.Pager[EnvironmentsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListByResourceGroupResponse]{ + More: func(page EnvironmentsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListByResourceGroupResponse) (EnvironmentsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return EnvironmentsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *EnvironmentsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *EnvironmentsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *EnvironmentsClient) listByResourceGroupHandleResponse(resp *http.Response) (EnvironmentsClientListByResourceGroupResponse, error) { + result := EnvironmentsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentCollection); err != nil { + return EnvironmentsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListCapacitiesPager - Description for Get the used, available, and total worker capacity an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListCapacitiesOptions contains the optional parameters for the EnvironmentsClient.NewListCapacitiesPager +// method. +func (client *EnvironmentsClient) NewListCapacitiesPager(resourceGroupName string, name string, options *EnvironmentsClientListCapacitiesOptions) *runtime.Pager[EnvironmentsClientListCapacitiesResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListCapacitiesResponse]{ + More: func(page EnvironmentsClientListCapacitiesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListCapacitiesResponse) (EnvironmentsClientListCapacitiesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListCapacitiesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCapacitiesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientListCapacitiesResponse{}, err + } + return client.listCapacitiesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCapacitiesCreateRequest creates the ListCapacities request. +func (client *EnvironmentsClient) listCapacitiesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListCapacitiesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCapacitiesHandleResponse handles the ListCapacities response. +func (client *EnvironmentsClient) listCapacitiesHandleResponse(resp *http.Response) (EnvironmentsClientListCapacitiesResponse, error) { + result := EnvironmentsClientListCapacitiesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StampCapacityCollection); err != nil { + return EnvironmentsClientListCapacitiesResponse{}, err + } + return result, nil +} + +// ListDiagnostics - Description for Get diagnostic information for an App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListDiagnosticsOptions contains the optional parameters for the EnvironmentsClient.ListDiagnostics +// method. +func (client *EnvironmentsClient) ListDiagnostics(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListDiagnosticsOptions) (EnvironmentsClientListDiagnosticsResponse, error) { + var err error + const operationName = "EnvironmentsClient.ListDiagnostics" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listDiagnosticsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientListDiagnosticsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientListDiagnosticsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientListDiagnosticsResponse{}, err + } + resp, err := client.listDiagnosticsHandleResponse(httpResp) + return resp, err +} + +// listDiagnosticsCreateRequest creates the ListDiagnostics request. +func (client *EnvironmentsClient) listDiagnosticsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListDiagnosticsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listDiagnosticsHandleResponse handles the ListDiagnostics response. +func (client *EnvironmentsClient) listDiagnosticsHandleResponse(resp *http.Response) (EnvironmentsClientListDiagnosticsResponse, error) { + result := EnvironmentsClientListDiagnosticsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostingEnvironmentDiagnosticsArray); err != nil { + return EnvironmentsClientListDiagnosticsResponse{}, err + } + return result, nil +} + +// NewListMultiRoleMetricDefinitionsPager - Description for Get metric definitions for a multi-role pool of an App Service +// Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListMultiRoleMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager +// method. +func (client *EnvironmentsClient) NewListMultiRoleMetricDefinitionsPager(resourceGroupName string, name string, options *EnvironmentsClientListMultiRoleMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListMultiRoleMetricDefinitionsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListMultiRoleMetricDefinitionsResponse]{ + More: func(page EnvironmentsClientListMultiRoleMetricDefinitionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRoleMetricDefinitionsResponse) (EnvironmentsClientListMultiRoleMetricDefinitionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMultiRoleMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientListMultiRoleMetricDefinitionsResponse{}, err + } + return client.listMultiRoleMetricDefinitionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listMultiRoleMetricDefinitionsCreateRequest creates the ListMultiRoleMetricDefinitions request. +func (client *EnvironmentsClient) listMultiRoleMetricDefinitionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListMultiRoleMetricDefinitionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMultiRoleMetricDefinitionsHandleResponse handles the ListMultiRoleMetricDefinitions response. +func (client *EnvironmentsClient) listMultiRoleMetricDefinitionsHandleResponse(resp *http.Response) (EnvironmentsClientListMultiRoleMetricDefinitionsResponse, error) { + result := EnvironmentsClientListMultiRoleMetricDefinitionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceMetricDefinitionCollection); err != nil { + return EnvironmentsClientListMultiRoleMetricDefinitionsResponse{}, err + } + return result, nil +} + +// NewListMultiRolePoolInstanceMetricDefinitionsPager - Description for Get metric definitions for a specific instance of +// a multi-role pool of an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - instance - Name of the instance in the multi-role pool. +// - options - EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions contains the optional parameters for the +// EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager method. +func (client *EnvironmentsClient) NewListMultiRolePoolInstanceMetricDefinitionsPager(resourceGroupName string, name string, instance string, options *EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse]{ + More: func(page EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse) (EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMultiRolePoolInstanceMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, instance, options) + }, nil) + if err != nil { + return EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{}, err + } + return client.listMultiRolePoolInstanceMetricDefinitionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listMultiRolePoolInstanceMetricDefinitionsCreateRequest creates the ListMultiRolePoolInstanceMetricDefinitions request. +func (client *EnvironmentsClient) listMultiRolePoolInstanceMetricDefinitionsCreateRequest(ctx context.Context, resourceGroupName string, name string, instance string, options *EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if instance == "" { + return nil, errors.New("parameter instance cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instance}", url.PathEscape(instance)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMultiRolePoolInstanceMetricDefinitionsHandleResponse handles the ListMultiRolePoolInstanceMetricDefinitions response. +func (client *EnvironmentsClient) listMultiRolePoolInstanceMetricDefinitionsHandleResponse(resp *http.Response) (EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse, error) { + result := EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceMetricDefinitionCollection); err != nil { + return EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{}, err + } + return result, nil +} + +// NewListMultiRolePoolSKUsPager - Description for Get available SKUs for scaling a multi-role pool. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListMultiRolePoolSKUsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolSKUsPager +// method. +func (client *EnvironmentsClient) NewListMultiRolePoolSKUsPager(resourceGroupName string, name string, options *EnvironmentsClientListMultiRolePoolSKUsOptions) *runtime.Pager[EnvironmentsClientListMultiRolePoolSKUsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListMultiRolePoolSKUsResponse]{ + More: func(page EnvironmentsClientListMultiRolePoolSKUsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRolePoolSKUsResponse) (EnvironmentsClientListMultiRolePoolSKUsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListMultiRolePoolSKUsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMultiRolePoolSKUsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientListMultiRolePoolSKUsResponse{}, err + } + return client.listMultiRolePoolSKUsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listMultiRolePoolSKUsCreateRequest creates the ListMultiRolePoolSKUs request. +func (client *EnvironmentsClient) listMultiRolePoolSKUsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListMultiRolePoolSKUsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMultiRolePoolSKUsHandleResponse handles the ListMultiRolePoolSKUs response. +func (client *EnvironmentsClient) listMultiRolePoolSKUsHandleResponse(resp *http.Response) (EnvironmentsClientListMultiRolePoolSKUsResponse, error) { + result := EnvironmentsClientListMultiRolePoolSKUsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SKUInfoCollection); err != nil { + return EnvironmentsClientListMultiRolePoolSKUsResponse{}, err + } + return result, nil +} + +// NewListMultiRolePoolsPager - Description for Get all multi-role pools. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListMultiRolePoolsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolsPager +// method. +func (client *EnvironmentsClient) NewListMultiRolePoolsPager(resourceGroupName string, name string, options *EnvironmentsClientListMultiRolePoolsOptions) *runtime.Pager[EnvironmentsClientListMultiRolePoolsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListMultiRolePoolsResponse]{ + More: func(page EnvironmentsClientListMultiRolePoolsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRolePoolsResponse) (EnvironmentsClientListMultiRolePoolsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListMultiRolePoolsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMultiRolePoolsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientListMultiRolePoolsResponse{}, err + } + return client.listMultiRolePoolsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listMultiRolePoolsCreateRequest creates the ListMultiRolePools request. +func (client *EnvironmentsClient) listMultiRolePoolsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListMultiRolePoolsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMultiRolePoolsHandleResponse handles the ListMultiRolePools response. +func (client *EnvironmentsClient) listMultiRolePoolsHandleResponse(resp *http.Response) (EnvironmentsClientListMultiRolePoolsResponse, error) { + result := EnvironmentsClientListMultiRolePoolsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolCollection); err != nil { + return EnvironmentsClientListMultiRolePoolsResponse{}, err + } + return result, nil +} + +// NewListMultiRoleUsagesPager - Description for Get usage metrics for a multi-role pool of an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListMultiRoleUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRoleUsagesPager +// method. +func (client *EnvironmentsClient) NewListMultiRoleUsagesPager(resourceGroupName string, name string, options *EnvironmentsClientListMultiRoleUsagesOptions) *runtime.Pager[EnvironmentsClientListMultiRoleUsagesResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListMultiRoleUsagesResponse]{ + More: func(page EnvironmentsClientListMultiRoleUsagesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRoleUsagesResponse) (EnvironmentsClientListMultiRoleUsagesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListMultiRoleUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMultiRoleUsagesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientListMultiRoleUsagesResponse{}, err + } + return client.listMultiRoleUsagesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listMultiRoleUsagesCreateRequest creates the ListMultiRoleUsages request. +func (client *EnvironmentsClient) listMultiRoleUsagesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListMultiRoleUsagesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMultiRoleUsagesHandleResponse handles the ListMultiRoleUsages response. +func (client *EnvironmentsClient) listMultiRoleUsagesHandleResponse(resp *http.Response) (EnvironmentsClientListMultiRoleUsagesResponse, error) { + result := EnvironmentsClientListMultiRoleUsagesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UsageCollection); err != nil { + return EnvironmentsClientListMultiRoleUsagesResponse{}, err + } + return result, nil +} + +// ListOperations - Description for List all currently running operations on the App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListOperationsOptions contains the optional parameters for the EnvironmentsClient.ListOperations +// method. +func (client *EnvironmentsClient) ListOperations(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListOperationsOptions) (EnvironmentsClientListOperationsResponse, error) { + var err error + const operationName = "EnvironmentsClient.ListOperations" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listOperationsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientListOperationsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientListOperationsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientListOperationsResponse{}, err + } + resp, err := client.listOperationsHandleResponse(httpResp) + return resp, err +} + +// listOperationsCreateRequest creates the ListOperations request. +func (client *EnvironmentsClient) listOperationsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListOperationsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listOperationsHandleResponse handles the ListOperations response. +func (client *EnvironmentsClient) listOperationsHandleResponse(resp *http.Response) (EnvironmentsClientListOperationsResponse, error) { + result := EnvironmentsClientListOperationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationArray); err != nil { + return EnvironmentsClientListOperationsResponse{}, err + } + return result, nil +} + +// NewListUsagesPager - Description for Get global usage metrics of an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListUsagesPager +// method. +func (client *EnvironmentsClient) NewListUsagesPager(resourceGroupName string, name string, options *EnvironmentsClientListUsagesOptions) *runtime.Pager[EnvironmentsClientListUsagesResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListUsagesResponse]{ + More: func(page EnvironmentsClientListUsagesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListUsagesResponse) (EnvironmentsClientListUsagesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientListUsagesResponse{}, err + } + return client.listUsagesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listUsagesCreateRequest creates the ListUsages request. +func (client *EnvironmentsClient) listUsagesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListUsagesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listUsagesHandleResponse handles the ListUsages response. +func (client *EnvironmentsClient) listUsagesHandleResponse(resp *http.Response) (EnvironmentsClientListUsagesResponse, error) { + result := EnvironmentsClientListUsagesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { + return EnvironmentsClientListUsagesResponse{}, err + } + return result, nil +} + +// NewListWebAppsPager - Description for Get all apps in an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListWebAppsOptions contains the optional parameters for the EnvironmentsClient.NewListWebAppsPager +// method. +func (client *EnvironmentsClient) NewListWebAppsPager(resourceGroupName string, name string, options *EnvironmentsClientListWebAppsOptions) *runtime.Pager[EnvironmentsClientListWebAppsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWebAppsResponse]{ + More: func(page EnvironmentsClientListWebAppsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListWebAppsResponse) (EnvironmentsClientListWebAppsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWebAppsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebAppsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientListWebAppsResponse{}, err + } + return client.listWebAppsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWebAppsCreateRequest creates the ListWebApps request. +func (client *EnvironmentsClient) listWebAppsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListWebAppsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.PropertiesToInclude != nil { + reqQP.Set("propertiesToInclude", *options.PropertiesToInclude) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWebAppsHandleResponse handles the ListWebApps response. +func (client *EnvironmentsClient) listWebAppsHandleResponse(resp *http.Response) (EnvironmentsClientListWebAppsResponse, error) { + result := EnvironmentsClientListWebAppsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { + return EnvironmentsClientListWebAppsResponse{}, err + } + return result, nil +} + +// NewListWebWorkerMetricDefinitionsPager - Description for Get metric definitions for a worker pool of an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - workerPoolName - Name of the worker pool. +// - options - EnvironmentsClientListWebWorkerMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager +// method. +func (client *EnvironmentsClient) NewListWebWorkerMetricDefinitionsPager(resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWebWorkerMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListWebWorkerMetricDefinitionsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWebWorkerMetricDefinitionsResponse]{ + More: func(page EnvironmentsClientListWebWorkerMetricDefinitionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListWebWorkerMetricDefinitionsResponse) (EnvironmentsClientListWebWorkerMetricDefinitionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebWorkerMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) + }, nil) + if err != nil { + return EnvironmentsClientListWebWorkerMetricDefinitionsResponse{}, err + } + return client.listWebWorkerMetricDefinitionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWebWorkerMetricDefinitionsCreateRequest creates the ListWebWorkerMetricDefinitions request. +func (client *EnvironmentsClient) listWebWorkerMetricDefinitionsCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWebWorkerMetricDefinitionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workerPoolName == "" { + return nil, errors.New("parameter workerPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWebWorkerMetricDefinitionsHandleResponse handles the ListWebWorkerMetricDefinitions response. +func (client *EnvironmentsClient) listWebWorkerMetricDefinitionsHandleResponse(resp *http.Response) (EnvironmentsClientListWebWorkerMetricDefinitionsResponse, error) { + result := EnvironmentsClientListWebWorkerMetricDefinitionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceMetricDefinitionCollection); err != nil { + return EnvironmentsClientListWebWorkerMetricDefinitionsResponse{}, err + } + return result, nil +} + +// NewListWebWorkerUsagesPager - Description for Get usage metrics for a worker pool of an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - workerPoolName - Name of the worker pool. +// - options - EnvironmentsClientListWebWorkerUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListWebWorkerUsagesPager +// method. +func (client *EnvironmentsClient) NewListWebWorkerUsagesPager(resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWebWorkerUsagesOptions) *runtime.Pager[EnvironmentsClientListWebWorkerUsagesResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWebWorkerUsagesResponse]{ + More: func(page EnvironmentsClientListWebWorkerUsagesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListWebWorkerUsagesResponse) (EnvironmentsClientListWebWorkerUsagesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWebWorkerUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebWorkerUsagesCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) + }, nil) + if err != nil { + return EnvironmentsClientListWebWorkerUsagesResponse{}, err + } + return client.listWebWorkerUsagesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWebWorkerUsagesCreateRequest creates the ListWebWorkerUsages request. +func (client *EnvironmentsClient) listWebWorkerUsagesCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWebWorkerUsagesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workerPoolName == "" { + return nil, errors.New("parameter workerPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWebWorkerUsagesHandleResponse handles the ListWebWorkerUsages response. +func (client *EnvironmentsClient) listWebWorkerUsagesHandleResponse(resp *http.Response) (EnvironmentsClientListWebWorkerUsagesResponse, error) { + result := EnvironmentsClientListWebWorkerUsagesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UsageCollection); err != nil { + return EnvironmentsClientListWebWorkerUsagesResponse{}, err + } + return result, nil +} + +// NewListWorkerPoolInstanceMetricDefinitionsPager - Description for Get metric definitions for a specific instance of a worker +// pool of an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - workerPoolName - Name of the worker pool. +// - instance - Name of the instance in the worker pool. +// - options - EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager +// method. +func (client *EnvironmentsClient) NewListWorkerPoolInstanceMetricDefinitionsPager(resourceGroupName string, name string, workerPoolName string, instance string, options *EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse]{ + More: func(page EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse) (EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWorkerPoolInstanceMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, workerPoolName, instance, options) + }, nil) + if err != nil { + return EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{}, err + } + return client.listWorkerPoolInstanceMetricDefinitionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWorkerPoolInstanceMetricDefinitionsCreateRequest creates the ListWorkerPoolInstanceMetricDefinitions request. +func (client *EnvironmentsClient) listWorkerPoolInstanceMetricDefinitionsCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string, options *EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workerPoolName == "" { + return nil, errors.New("parameter workerPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) + if instance == "" { + return nil, errors.New("parameter instance cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instance}", url.PathEscape(instance)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWorkerPoolInstanceMetricDefinitionsHandleResponse handles the ListWorkerPoolInstanceMetricDefinitions response. +func (client *EnvironmentsClient) listWorkerPoolInstanceMetricDefinitionsHandleResponse(resp *http.Response) (EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse, error) { + result := EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceMetricDefinitionCollection); err != nil { + return EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{}, err + } + return result, nil +} + +// NewListWorkerPoolSKUsPager - Description for Get available SKUs for scaling a worker pool. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - workerPoolName - Name of the worker pool. +// - options - EnvironmentsClientListWorkerPoolSKUsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolSKUsPager +// method. +func (client *EnvironmentsClient) NewListWorkerPoolSKUsPager(resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWorkerPoolSKUsOptions) *runtime.Pager[EnvironmentsClientListWorkerPoolSKUsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWorkerPoolSKUsResponse]{ + More: func(page EnvironmentsClientListWorkerPoolSKUsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListWorkerPoolSKUsResponse) (EnvironmentsClientListWorkerPoolSKUsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWorkerPoolSKUsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWorkerPoolSKUsCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) + }, nil) + if err != nil { + return EnvironmentsClientListWorkerPoolSKUsResponse{}, err + } + return client.listWorkerPoolSKUsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWorkerPoolSKUsCreateRequest creates the ListWorkerPoolSKUs request. +func (client *EnvironmentsClient) listWorkerPoolSKUsCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWorkerPoolSKUsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workerPoolName == "" { + return nil, errors.New("parameter workerPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWorkerPoolSKUsHandleResponse handles the ListWorkerPoolSKUs response. +func (client *EnvironmentsClient) listWorkerPoolSKUsHandleResponse(resp *http.Response) (EnvironmentsClientListWorkerPoolSKUsResponse, error) { + result := EnvironmentsClientListWorkerPoolSKUsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SKUInfoCollection); err != nil { + return EnvironmentsClientListWorkerPoolSKUsResponse{}, err + } + return result, nil +} + +// NewListWorkerPoolsPager - Description for Get all worker pools of an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientListWorkerPoolsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolsPager +// method. +func (client *EnvironmentsClient) NewListWorkerPoolsPager(resourceGroupName string, name string, options *EnvironmentsClientListWorkerPoolsOptions) *runtime.Pager[EnvironmentsClientListWorkerPoolsResponse] { + return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWorkerPoolsResponse]{ + More: func(page EnvironmentsClientListWorkerPoolsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientListWorkerPoolsResponse) (EnvironmentsClientListWorkerPoolsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWorkerPoolsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWorkerPoolsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientListWorkerPoolsResponse{}, err + } + return client.listWorkerPoolsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWorkerPoolsCreateRequest creates the ListWorkerPools request. +func (client *EnvironmentsClient) listWorkerPoolsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListWorkerPoolsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWorkerPoolsHandleResponse handles the ListWorkerPools response. +func (client *EnvironmentsClient) listWorkerPoolsHandleResponse(resp *http.Response) (EnvironmentsClientListWorkerPoolsResponse, error) { + result := EnvironmentsClientListWorkerPoolsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolCollection); err != nil { + return EnvironmentsClientListWorkerPoolsResponse{}, err + } + return result, nil +} + +// Reboot - Description for Reboot all machines in an App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientRebootOptions contains the optional parameters for the EnvironmentsClient.Reboot method. +func (client *EnvironmentsClient) Reboot(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientRebootOptions) (EnvironmentsClientRebootResponse, error) { + var err error + const operationName = "EnvironmentsClient.Reboot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.rebootCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientRebootResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientRebootResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientRebootResponse{}, err + } + return EnvironmentsClientRebootResponse{}, nil +} + +// rebootCreateRequest creates the Reboot request. +func (client *EnvironmentsClient) rebootCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientRebootOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginResume - Description for Resume an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientBeginResumeOptions contains the optional parameters for the EnvironmentsClient.BeginResume +// method. +func (client *EnvironmentsClient) BeginResume(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginResumeOptions) (*runtime.Poller[*runtime.Pager[EnvironmentsClientResumeResponse]], error) { + pager := runtime.NewPager(runtime.PagingHandler[EnvironmentsClientResumeResponse]{ + More: func(page EnvironmentsClientResumeResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientResumeResponse) (EnvironmentsClientResumeResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.BeginResume") + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.resumeCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientResumeResponse{}, err + } + return client.resumeHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) + if options == nil || options.ResumeToken == "" { + resp, err := client.resume(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientResumeResponse]]{ + Response: &pager, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[EnvironmentsClientResumeResponse]]{ + Response: &pager, + Tracer: client.internal.Tracer(), + }) + } +} + +// Resume - Description for Resume an App Service Environment. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentsClient) resume(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginResumeOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginResume" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resumeCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resumeCreateRequest creates the Resume request. +func (client *EnvironmentsClient) resumeCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginResumeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// resumeHandleResponse handles the Resume response. +func (client *EnvironmentsClient) resumeHandleResponse(resp *http.Response) (EnvironmentsClientResumeResponse, error) { + result := EnvironmentsClientResumeResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { + return EnvironmentsClientResumeResponse{}, err + } + return result, nil +} + +// BeginSuspend - Description for Suspend an App Service Environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientBeginSuspendOptions contains the optional parameters for the EnvironmentsClient.BeginSuspend +// method. +func (client *EnvironmentsClient) BeginSuspend(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginSuspendOptions) (*runtime.Poller[*runtime.Pager[EnvironmentsClientSuspendResponse]], error) { + pager := runtime.NewPager(runtime.PagingHandler[EnvironmentsClientSuspendResponse]{ + More: func(page EnvironmentsClientSuspendResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EnvironmentsClientSuspendResponse) (EnvironmentsClientSuspendResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.BeginSuspend") + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.suspendCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return EnvironmentsClientSuspendResponse{}, err + } + return client.suspendHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) + if options == nil || options.ResumeToken == "" { + resp, err := client.suspend(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientSuspendResponse]]{ + Response: &pager, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[EnvironmentsClientSuspendResponse]]{ + Response: &pager, + Tracer: client.internal.Tracer(), + }) + } +} + +// Suspend - Description for Suspend an App Service Environment. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentsClient) suspend(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginSuspendOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginSuspend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.suspendCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// suspendCreateRequest creates the Suspend request. +func (client *EnvironmentsClient) suspendCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginSuspendOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// suspendHandleResponse handles the Suspend response. +func (client *EnvironmentsClient) suspendHandleResponse(resp *http.Response) (EnvironmentsClientSuspendResponse, error) { + result := EnvironmentsClientSuspendResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { + return EnvironmentsClientSuspendResponse{}, err + } + return result, nil +} + +// TestUpgradeAvailableNotification - Send a test notification that an upgrade is available for this App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientTestUpgradeAvailableNotificationOptions contains the optional parameters for the EnvironmentsClient.TestUpgradeAvailableNotification +// method. +func (client *EnvironmentsClient) TestUpgradeAvailableNotification(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientTestUpgradeAvailableNotificationOptions) (EnvironmentsClientTestUpgradeAvailableNotificationResponse, error) { + var err error + const operationName = "EnvironmentsClient.TestUpgradeAvailableNotification" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.testUpgradeAvailableNotificationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, err + } + return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, nil +} + +// testUpgradeAvailableNotificationCreateRequest creates the TestUpgradeAvailableNotification request. +func (client *EnvironmentsClient) testUpgradeAvailableNotificationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientTestUpgradeAvailableNotificationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/testUpgradeAvailableNotification" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Update - Description for Create or update an App Service Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - hostingEnvironmentEnvelope - Configuration details of the App Service Environment. +// - options - EnvironmentsClientUpdateOptions contains the optional parameters for the EnvironmentsClient.Update method. +func (client *EnvironmentsClient) Update(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentPatchResource, options *EnvironmentsClientUpdateOptions) (EnvironmentsClientUpdateResponse, error) { + var err error + const operationName = "EnvironmentsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, name, hostingEnvironmentEnvelope, options) + if err != nil { + return EnvironmentsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *EnvironmentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentPatchResource, options *EnvironmentsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *EnvironmentsClient) updateHandleResponse(resp *http.Response) (EnvironmentsClientUpdateResponse, error) { + result := EnvironmentsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentResource); err != nil { + return EnvironmentsClientUpdateResponse{}, err + } + return result, nil +} + +// UpdateAseCustomDNSSuffixConfiguration - Update Custom Dns Suffix configuration of an App Service Environment +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration +// method. +func (client *EnvironmentsClient) UpdateAseCustomDNSSuffixConfiguration(ctx context.Context, resourceGroupName string, name string, customDNSSuffixConfiguration CustomDNSSuffixConfiguration, options *EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse, error) { + var err error + const operationName = "EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateAseCustomDNSSuffixConfigurationCreateRequest(ctx, resourceGroupName, name, customDNSSuffixConfiguration, options) + if err != nil { + return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, err + } + resp, err := client.updateAseCustomDNSSuffixConfigurationHandleResponse(httpResp) + return resp, err +} + +// updateAseCustomDNSSuffixConfigurationCreateRequest creates the UpdateAseCustomDNSSuffixConfiguration request. +func (client *EnvironmentsClient) updateAseCustomDNSSuffixConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, customDNSSuffixConfiguration CustomDNSSuffixConfiguration, options *EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, customDNSSuffixConfiguration); err != nil { + return nil, err + } + return req, nil +} + +// updateAseCustomDNSSuffixConfigurationHandleResponse handles the UpdateAseCustomDNSSuffixConfiguration response. +func (client *EnvironmentsClient) updateAseCustomDNSSuffixConfigurationHandleResponse(resp *http.Response) (EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse, error) { + result := EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDNSSuffixConfiguration); err != nil { + return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, err + } + return result, nil +} + +// UpdateAseNetworkingConfiguration - Description for Update networking configuration of an App Service Environment +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientUpdateAseNetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseNetworkingConfiguration +// method. +func (client *EnvironmentsClient) UpdateAseNetworkingConfiguration(ctx context.Context, resourceGroupName string, name string, aseNetworkingConfiguration AseV3NetworkingConfiguration, options *EnvironmentsClientUpdateAseNetworkingConfigurationOptions) (EnvironmentsClientUpdateAseNetworkingConfigurationResponse, error) { + var err error + const operationName = "EnvironmentsClient.UpdateAseNetworkingConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateAseNetworkingConfigurationCreateRequest(ctx, resourceGroupName, name, aseNetworkingConfiguration, options) + if err != nil { + return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, err + } + resp, err := client.updateAseNetworkingConfigurationHandleResponse(httpResp) + return resp, err +} + +// updateAseNetworkingConfigurationCreateRequest creates the UpdateAseNetworkingConfiguration request. +func (client *EnvironmentsClient) updateAseNetworkingConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, aseNetworkingConfiguration AseV3NetworkingConfiguration, options *EnvironmentsClientUpdateAseNetworkingConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, aseNetworkingConfiguration); err != nil { + return nil, err + } + return req, nil +} + +// updateAseNetworkingConfigurationHandleResponse handles the UpdateAseNetworkingConfiguration response. +func (client *EnvironmentsClient) updateAseNetworkingConfigurationHandleResponse(resp *http.Response) (EnvironmentsClientUpdateAseNetworkingConfigurationResponse, error) { + result := EnvironmentsClientUpdateAseNetworkingConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AseV3NetworkingConfiguration); err != nil { + return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, err + } + return result, nil +} + +// UpdateMultiRolePool - Description for Create or update a multi-role pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - multiRolePoolEnvelope - Properties of the multi-role pool. +// - options - EnvironmentsClientUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.UpdateMultiRolePool +// method. +func (client *EnvironmentsClient) UpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientUpdateMultiRolePoolOptions) (EnvironmentsClientUpdateMultiRolePoolResponse, error) { + var err error + const operationName = "EnvironmentsClient.UpdateMultiRolePool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateMultiRolePoolCreateRequest(ctx, resourceGroupName, name, multiRolePoolEnvelope, options) + if err != nil { + return EnvironmentsClientUpdateMultiRolePoolResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientUpdateMultiRolePoolResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateMultiRolePoolResponse{}, err + } + resp, err := client.updateMultiRolePoolHandleResponse(httpResp) + return resp, err +} + +// updateMultiRolePoolCreateRequest creates the UpdateMultiRolePool request. +func (client *EnvironmentsClient) updateMultiRolePoolCreateRequest(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientUpdateMultiRolePoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, multiRolePoolEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateMultiRolePoolHandleResponse handles the UpdateMultiRolePool response. +func (client *EnvironmentsClient) updateMultiRolePoolHandleResponse(resp *http.Response) (EnvironmentsClientUpdateMultiRolePoolResponse, error) { + result := EnvironmentsClientUpdateMultiRolePoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolResource); err != nil { + return EnvironmentsClientUpdateMultiRolePoolResponse{}, err + } + return result, nil +} + +// UpdateWorkerPool - Description for Create or update a worker pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - workerPoolName - Name of the worker pool. +// - workerPoolEnvelope - Properties of the worker pool. +// - options - EnvironmentsClientUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.UpdateWorkerPool +// method. +func (client *EnvironmentsClient) UpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientUpdateWorkerPoolOptions) (EnvironmentsClientUpdateWorkerPoolResponse, error) { + var err error + const operationName = "EnvironmentsClient.UpdateWorkerPool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) + if err != nil { + return EnvironmentsClientUpdateWorkerPoolResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EnvironmentsClientUpdateWorkerPoolResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateWorkerPoolResponse{}, err + } + resp, err := client.updateWorkerPoolHandleResponse(httpResp) + return resp, err +} + +// updateWorkerPoolCreateRequest creates the UpdateWorkerPool request. +func (client *EnvironmentsClient) updateWorkerPoolCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientUpdateWorkerPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workerPoolName == "" { + return nil, errors.New("parameter workerPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, workerPoolEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateWorkerPoolHandleResponse handles the UpdateWorkerPool response. +func (client *EnvironmentsClient) updateWorkerPoolHandleResponse(resp *http.Response) (EnvironmentsClientUpdateWorkerPoolResponse, error) { + result := EnvironmentsClientUpdateWorkerPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolResource); err != nil { + return EnvironmentsClientUpdateWorkerPoolResponse{}, err + } + return result, nil +} + +// BeginUpgrade - Description for Initiate an upgrade of an App Service Environment if one is available. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service Environment. +// - options - EnvironmentsClientBeginUpgradeOptions contains the optional parameters for the EnvironmentsClient.BeginUpgrade +// method. +func (client *EnvironmentsClient) BeginUpgrade(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginUpgradeOptions) (*runtime.Poller[EnvironmentsClientUpgradeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.upgrade(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientUpgradeResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientUpgradeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Upgrade - Description for Initiate an upgrade of an App Service Environment if one is available. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *EnvironmentsClient) upgrade(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginUpgradeOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginUpgrade" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.upgradeCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// upgradeCreateRequest creates the Upgrade request. +func (client *EnvironmentsClient) upgradeCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginUpgradeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/upgrade" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/getusagesinlocation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/getusagesinlocation_client.go new file mode 100644 index 00000000..bc201704 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/getusagesinlocation_client.go @@ -0,0 +1,104 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GetUsagesInLocationClient contains the methods for the GetUsagesInLocation group. +// Don't use this type directly, use NewGetUsagesInLocationClient() instead. +type GetUsagesInLocationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGetUsagesInLocationClient creates a new instance of GetUsagesInLocationClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGetUsagesInLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GetUsagesInLocationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GetUsagesInLocationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - List usages in cores for all skus used by a subscription in a given location, for a specific quota type. +// +// Generated from API version 2024-04-01 +// - location - The name of the Azure region. +// - options - GetUsagesInLocationClientListOptions contains the optional parameters for the GetUsagesInLocationClient.NewListPager +// method. +func (client *GetUsagesInLocationClient) NewListPager(location string, options *GetUsagesInLocationClientListOptions) *runtime.Pager[GetUsagesInLocationClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[GetUsagesInLocationClientListResponse]{ + More: func(page GetUsagesInLocationClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GetUsagesInLocationClientListResponse) (GetUsagesInLocationClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GetUsagesInLocationClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return GetUsagesInLocationClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *GetUsagesInLocationClient) listCreateRequest(ctx context.Context, location string, options *GetUsagesInLocationClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *GetUsagesInLocationClient) listHandleResponse(resp *http.Response) (GetUsagesInLocationClientListResponse, error) { + result := GetUsagesInLocationClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { + return GetUsagesInLocationClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/global_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/global_client.go new file mode 100644 index 00000000..6f17dcab --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/global_client.go @@ -0,0 +1,218 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GlobalClient contains the methods for the Global group. +// Don't use this type directly, use NewGlobalClient() instead. +type GlobalClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGlobalClient creates a new instance of GlobalClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGlobalClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GlobalClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GlobalClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// GetDeletedWebApp - Description for Get deleted app for a subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - deletedSiteID - The numeric ID of the deleted app, e.g. 12345 +// - options - GlobalClientGetDeletedWebAppOptions contains the optional parameters for the GlobalClient.GetDeletedWebApp method. +func (client *GlobalClient) GetDeletedWebApp(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppOptions) (GlobalClientGetDeletedWebAppResponse, error) { + var err error + const operationName = "GlobalClient.GetDeletedWebApp" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDeletedWebAppCreateRequest(ctx, deletedSiteID, options) + if err != nil { + return GlobalClientGetDeletedWebAppResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GlobalClientGetDeletedWebAppResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalClientGetDeletedWebAppResponse{}, err + } + resp, err := client.getDeletedWebAppHandleResponse(httpResp) + return resp, err +} + +// getDeletedWebAppCreateRequest creates the GetDeletedWebApp request. +func (client *GlobalClient) getDeletedWebAppCreateRequest(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}" + if deletedSiteID == "" { + return nil, errors.New("parameter deletedSiteID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deletedSiteId}", url.PathEscape(deletedSiteID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDeletedWebAppHandleResponse handles the GetDeletedWebApp response. +func (client *GlobalClient) getDeletedWebAppHandleResponse(resp *http.Response) (GlobalClientGetDeletedWebAppResponse, error) { + result := GlobalClientGetDeletedWebAppResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeletedSite); err != nil { + return GlobalClientGetDeletedWebAppResponse{}, err + } + return result, nil +} + +// GetDeletedWebAppSnapshots - Description for Get all deleted apps for a subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - deletedSiteID - The numeric ID of the deleted app, e.g. 12345 +// - options - GlobalClientGetDeletedWebAppSnapshotsOptions contains the optional parameters for the GlobalClient.GetDeletedWebAppSnapshots +// method. +func (client *GlobalClient) GetDeletedWebAppSnapshots(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppSnapshotsOptions) (GlobalClientGetDeletedWebAppSnapshotsResponse, error) { + var err error + const operationName = "GlobalClient.GetDeletedWebAppSnapshots" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDeletedWebAppSnapshotsCreateRequest(ctx, deletedSiteID, options) + if err != nil { + return GlobalClientGetDeletedWebAppSnapshotsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GlobalClientGetDeletedWebAppSnapshotsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalClientGetDeletedWebAppSnapshotsResponse{}, err + } + resp, err := client.getDeletedWebAppSnapshotsHandleResponse(httpResp) + return resp, err +} + +// getDeletedWebAppSnapshotsCreateRequest creates the GetDeletedWebAppSnapshots request. +func (client *GlobalClient) getDeletedWebAppSnapshotsCreateRequest(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppSnapshotsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots" + if deletedSiteID == "" { + return nil, errors.New("parameter deletedSiteID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deletedSiteId}", url.PathEscape(deletedSiteID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDeletedWebAppSnapshotsHandleResponse handles the GetDeletedWebAppSnapshots response. +func (client *GlobalClient) getDeletedWebAppSnapshotsHandleResponse(resp *http.Response) (GlobalClientGetDeletedWebAppSnapshotsResponse, error) { + result := GlobalClientGetDeletedWebAppSnapshotsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotArray); err != nil { + return GlobalClientGetDeletedWebAppSnapshotsResponse{}, err + } + return result, nil +} + +// GetSubscriptionOperationWithAsyncResponse - Description for Gets an operation in a subscription and given region +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - location - Location name +// - operationID - Operation Id +// - options - GlobalClientGetSubscriptionOperationWithAsyncResponseOptions contains the optional parameters for the GlobalClient.GetSubscriptionOperationWithAsyncResponse +// method. +func (client *GlobalClient) GetSubscriptionOperationWithAsyncResponse(ctx context.Context, location string, operationID string, options *GlobalClientGetSubscriptionOperationWithAsyncResponseOptions) (GlobalClientGetSubscriptionOperationWithAsyncResponseResponse, error) { + var err error + const operationName = "GlobalClient.GetSubscriptionOperationWithAsyncResponse" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSubscriptionOperationWithAsyncResponseCreateRequest(ctx, location, operationID, options) + if err != nil { + return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, err + } + return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, nil +} + +// getSubscriptionOperationWithAsyncResponseCreateRequest creates the GetSubscriptionOperationWithAsyncResponse request. +func (client *GlobalClient) getSubscriptionOperationWithAsyncResponseCreateRequest(ctx context.Context, location string, operationID string, options *GlobalClientGetSubscriptionOperationWithAsyncResponseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/kubeenvironments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/kubeenvironments_client.go new file mode 100644 index 00000000..20443dff --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/kubeenvironments_client.go @@ -0,0 +1,447 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// KubeEnvironmentsClient contains the methods for the KubeEnvironments group. +// Don't use this type directly, use NewKubeEnvironmentsClient() instead. +type KubeEnvironmentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewKubeEnvironmentsClient creates a new instance of KubeEnvironmentsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewKubeEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KubeEnvironmentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &KubeEnvironmentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Description for Creates or updates a Kubernetes Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the Kubernetes Environment. +// - kubeEnvironmentEnvelope - Configuration details of the Kubernetes Environment. +// - options - KubeEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.BeginCreateOrUpdate +// method. +func (client *KubeEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironment, options *KubeEnvironmentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[KubeEnvironmentsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, name, kubeEnvironmentEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KubeEnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KubeEnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Description for Creates or updates a Kubernetes Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *KubeEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironment, options *KubeEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KubeEnvironmentsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, kubeEnvironmentEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *KubeEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironment, options *KubeEnvironmentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Description for Delete a Kubernetes Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the Kubernetes Environment. +// - options - KubeEnvironmentsClientBeginDeleteOptions contains the optional parameters for the KubeEnvironmentsClient.BeginDelete +// method. +func (client *KubeEnvironmentsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientBeginDeleteOptions) (*runtime.Poller[KubeEnvironmentsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KubeEnvironmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KubeEnvironmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Description for Delete a Kubernetes Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *KubeEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "KubeEnvironmentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *KubeEnvironmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Description for Get the properties of a Kubernetes Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the Kubernetes Environment. +// - options - KubeEnvironmentsClientGetOptions contains the optional parameters for the KubeEnvironmentsClient.Get method. +func (client *KubeEnvironmentsClient) Get(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientGetOptions) (KubeEnvironmentsClientGetResponse, error) { + var err error + const operationName = "KubeEnvironmentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return KubeEnvironmentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return KubeEnvironmentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KubeEnvironmentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *KubeEnvironmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *KubeEnvironmentsClient) getHandleResponse(resp *http.Response) (KubeEnvironmentsClientGetResponse, error) { + result := KubeEnvironmentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.KubeEnvironment); err != nil { + return KubeEnvironmentsClientGetResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Description for Get all the Kubernetes Environments in a resource group. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - options - KubeEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the KubeEnvironmentsClient.NewListByResourceGroupPager +// method. +func (client *KubeEnvironmentsClient) NewListByResourceGroupPager(resourceGroupName string, options *KubeEnvironmentsClientListByResourceGroupOptions) *runtime.Pager[KubeEnvironmentsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[KubeEnvironmentsClientListByResourceGroupResponse]{ + More: func(page KubeEnvironmentsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *KubeEnvironmentsClientListByResourceGroupResponse) (KubeEnvironmentsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KubeEnvironmentsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return KubeEnvironmentsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *KubeEnvironmentsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *KubeEnvironmentsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *KubeEnvironmentsClient) listByResourceGroupHandleResponse(resp *http.Response) (KubeEnvironmentsClientListByResourceGroupResponse, error) { + result := KubeEnvironmentsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.KubeEnvironmentCollection); err != nil { + return KubeEnvironmentsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - Description for Get all Kubernetes Environments for a subscription. +// +// Generated from API version 2024-04-01 +// - options - KubeEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the KubeEnvironmentsClient.NewListBySubscriptionPager +// method. +func (client *KubeEnvironmentsClient) NewListBySubscriptionPager(options *KubeEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[KubeEnvironmentsClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[KubeEnvironmentsClientListBySubscriptionResponse]{ + More: func(page KubeEnvironmentsClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *KubeEnvironmentsClientListBySubscriptionResponse) (KubeEnvironmentsClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KubeEnvironmentsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return KubeEnvironmentsClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *KubeEnvironmentsClient) listBySubscriptionCreateRequest(ctx context.Context, options *KubeEnvironmentsClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *KubeEnvironmentsClient) listBySubscriptionHandleResponse(resp *http.Response) (KubeEnvironmentsClientListBySubscriptionResponse, error) { + result := KubeEnvironmentsClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.KubeEnvironmentCollection); err != nil { + return KubeEnvironmentsClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// Update - Description for Creates or updates a Kubernetes Environment. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the Kubernetes Environment. +// - kubeEnvironmentEnvelope - Configuration details of the Kubernetes Environment. +// - options - KubeEnvironmentsClientUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.Update method. +func (client *KubeEnvironmentsClient) Update(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironmentPatchResource, options *KubeEnvironmentsClientUpdateOptions) (KubeEnvironmentsClientUpdateResponse, error) { + var err error + const operationName = "KubeEnvironmentsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, name, kubeEnvironmentEnvelope, options) + if err != nil { + return KubeEnvironmentsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return KubeEnvironmentsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return KubeEnvironmentsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *KubeEnvironmentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironmentPatchResource, options *KubeEnvironmentsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *KubeEnvironmentsClient) updateHandleResponse(resp *http.Response) (KubeEnvironmentsClientUpdateResponse, error) { + result := KubeEnvironmentsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.KubeEnvironment); err != nil { + return KubeEnvironmentsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/models.go new file mode 100644 index 00000000..fcf65cb1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/models.go @@ -0,0 +1,11348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import "time" + +// APIDefinitionInfo - Information about the formal API definition for the app. +type APIDefinitionInfo struct { + // The URL of the API definition. + URL *string +} + +// APIKVReference - Description of site key vault references. +type APIKVReference struct { + // Kind of resource. + Kind *string + + // ApiKVReference resource specific properties + Properties *APIKVReferenceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +type APIKVReferenceCollection struct { + // REQUIRED; Collection of resources. + Value []*APIKVReference + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// APIKVReferenceProperties - ApiKVReference resource specific properties +type APIKVReferenceProperties struct { + ActiveVersion *string + Details *string + + // Managed service identity. + IdentityType *ManagedServiceIdentity + Reference *string + SecretName *string + SecretVersion *string + Source *string + Status *ResolveStatus + VaultName *string +} + +// APIManagementConfig - Azure API management (APIM) configuration linked to the app. +type APIManagementConfig struct { + // APIM-Api Identifier. + ID *string +} + +// AbnormalTimePeriod - Class representing Abnormal Time Period identified in diagnosis +type AbnormalTimePeriod struct { + // End time of the downtime + EndTime *time.Time + + // List of Possible Cause of downtime + Events []*DetectorAbnormalTimePeriod + + // List of proposed solutions + Solutions []*Solution + + // Start time of the downtime + StartTime *time.Time +} + +// Address information for domain registration. +type Address struct { + // REQUIRED; First line of an Address. + Address1 *string + + // REQUIRED; The city for the address. + City *string + + // REQUIRED; The country for the address. + Country *string + + // REQUIRED; The postal code for the address. + PostalCode *string + + // REQUIRED; The state or province for the address. + State *string + + // The second line of the Address. Optional. + Address2 *string +} + +// AddressResponse - Describes main public IP address and any extra virtual IPs. +type AddressResponse struct { + // Kind of resource. + Kind *string + + // AddressResponse resource specific properties + Properties *AddressResponseProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AddressResponseProperties - AddressResponse resource specific properties +type AddressResponseProperties struct { + // Virtual Network internal IP address of the App Service Environment if it is in internal load-balancing mode. + InternalIPAddress *string + + // IP addresses appearing on outbound connections. + OutboundIPAddresses []*string + + // Main public virtual IP. + ServiceIPAddress *string + + // Additional virtual IPs. + VipMappings []*VirtualIPMapping +} + +// AllowedAudiencesValidation - The configuration settings of the Allowed Audiences validation flow. +type AllowedAudiencesValidation struct { + // The configuration settings of the allowed list of audiences from which to validate the JWT token. + AllowedAudiences []*string +} + +// AllowedPrincipals - The configuration settings of the Azure Active Directory allowed principals. +type AllowedPrincipals struct { + // The list of the allowed groups. + Groups []*string + + // The list of the allowed identities. + Identities []*string +} + +// AnalysisData - Class Representing Detector Evidence used for analysis +type AnalysisData struct { + // Additional Source Data + Data [][]*NameValuePair + + // Detector Definition + DetectorDefinition *DetectorDefinition + + // Detector Meta Data + DetectorMetaData *ResponseMetaData + + // Source Metrics + Metrics []*DiagnosticMetricSet + + // Name of the Detector + Source *string +} + +// AnalysisDefinition - Definition of Analysis +type AnalysisDefinition struct { + // Kind of resource. + Kind *string + + // AnalysisDefinition resource specific properties + Properties *AnalysisDefinitionProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AnalysisDefinitionProperties - AnalysisDefinition resource specific properties +type AnalysisDefinitionProperties struct { + // READ-ONLY; Description of the Analysis + Description *string +} + +// AppCertificate - SSL certificate for an app. +type AppCertificate struct { + // REQUIRED; Resource Location. + Location *string + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // Certificate resource specific properties + Properties *AppCertificateProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AppCertificateCollection - Collection of certificates. +type AppCertificateCollection struct { + // REQUIRED; Collection of resources. + Value []*AppCertificate + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// AppCertificatePatchResource - ARM resource for a certificate. +type AppCertificatePatchResource struct { + // Kind of resource. + Kind *string + + // CertificatePatchResource resource specific properties + Properties *AppCertificatePatchResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AppCertificatePatchResourceProperties - CertificatePatchResource resource specific properties +type AppCertificatePatchResourceProperties struct { + // CNAME of the certificate to be issued via free certificate + CanonicalName *string + + // Method of domain validation for free cert + DomainValidationMethod *string + + // Host names the certificate applies to. + HostNames []*string + + // Key Vault Csm resource Id. + KeyVaultID *string + + // Key Vault secret name. + KeyVaultSecretName *string + + // Certificate password. + Password *string + + // Pfx blob. + PfxBlob []byte + + // Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + ServerFarmID *string + + // READ-ONLY; Raw bytes of .cer file + CerBlob []byte + + // READ-ONLY; Certificate expiration date. + ExpirationDate *time.Time + + // READ-ONLY; Friendly name of the certificate. + FriendlyName *string + + // READ-ONLY; Specification for the App Service Environment to use for the certificate. + HostingEnvironmentProfile *HostingEnvironmentProfile + + // READ-ONLY; Certificate issue Date. + IssueDate *time.Time + + // READ-ONLY; Certificate issuer. + Issuer *string + + // READ-ONLY; Status of the Key Vault secret. + KeyVaultSecretStatus *KeyVaultSecretStatus + + // READ-ONLY; Public key hash. + PublicKeyHash *string + + // READ-ONLY; Self link. + SelfLink *string + + // READ-ONLY; App name. + SiteName *string + + // READ-ONLY; Subject name of the certificate. + SubjectName *string + + // READ-ONLY; Certificate thumbprint. + Thumbprint *string + + // READ-ONLY; Is the certificate valid?. + Valid *bool +} + +// AppCertificateProperties - Certificate resource specific properties +type AppCertificateProperties struct { + // CNAME of the certificate to be issued via free certificate + CanonicalName *string + + // Method of domain validation for free cert + DomainValidationMethod *string + + // Host names the certificate applies to. + HostNames []*string + + // Key Vault Csm resource Id. + KeyVaultID *string + + // Key Vault secret name. + KeyVaultSecretName *string + + // Certificate password. + Password *string + + // Pfx blob. + PfxBlob []byte + + // Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + ServerFarmID *string + + // READ-ONLY; Raw bytes of .cer file + CerBlob []byte + + // READ-ONLY; Certificate expiration date. + ExpirationDate *time.Time + + // READ-ONLY; Friendly name of the certificate. + FriendlyName *string + + // READ-ONLY; Specification for the App Service Environment to use for the certificate. + HostingEnvironmentProfile *HostingEnvironmentProfile + + // READ-ONLY; Certificate issue Date. + IssueDate *time.Time + + // READ-ONLY; Certificate issuer. + Issuer *string + + // READ-ONLY; Status of the Key Vault secret. + KeyVaultSecretStatus *KeyVaultSecretStatus + + // READ-ONLY; Public key hash. + PublicKeyHash *string + + // READ-ONLY; Self link. + SelfLink *string + + // READ-ONLY; App name. + SiteName *string + + // READ-ONLY; Subject name of the certificate. + SubjectName *string + + // READ-ONLY; Certificate thumbprint. + Thumbprint *string + + // READ-ONLY; Is the certificate valid?. + Valid *bool +} + +// AppInsightsWebAppStackSettings - App Insights Web App stack settings. +type AppInsightsWebAppStackSettings struct { + // READ-ONLY; true if Application Insights is disabled by default for the stack; otherwise, false. + IsDefaultOff *bool + + // READ-ONLY; true if remote Application Insights is supported for the stack; otherwise, false. + IsSupported *bool +} + +type AppLogsConfiguration struct { + Destination *string + LogAnalyticsConfiguration *LogAnalyticsConfiguration +} + +// AppRegistration - The configuration settings of the app registration for providers that have app ids and app secrets +type AppRegistration struct { + // The App ID of the app used for login. + AppID *string + + // The app setting name that contains the app secret. + AppSecretSettingName *string +} + +// Apple - The configuration settings of the Apple provider. +type Apple struct { + // false if the Apple provider should not be enabled despite the set registration; otherwise, true. + Enabled *bool + + // The configuration settings of the login flow. + Login *LoginScopes + + // The configuration settings of the Apple registration. + Registration *AppleRegistration +} + +// AppleRegistration - The configuration settings of the registration for the Apple provider +type AppleRegistration struct { + // The Client ID of the app used for login. + ClientID *string + + // The app setting name that contains the client secret. + ClientSecretSettingName *string +} + +// ApplicationLogsConfig - Application logs configuration. +type ApplicationLogsConfig struct { + // Application logs to blob storage configuration. + AzureBlobStorage *AzureBlobStorageApplicationLogsConfig + + // Application logs to azure table storage configuration. + AzureTableStorage *AzureTableStorageApplicationLogsConfig + + // Application logs to file system configuration. + FileSystem *FileSystemApplicationLogsConfig +} + +// ApplicationStack - Application stack. +type ApplicationStack struct { + // Application stack dependency. + Dependency *string + + // Application stack display name. + Display *string + + // List of frameworks associated with application stack. + Frameworks []*ApplicationStack + + // true if this is the stack is deprecated; otherwise, false. + IsDeprecated []*ApplicationStack + + // List of major versions available. + MajorVersions []*StackMajorVersion + + // Application stack name. + Name *string +} + +// ApplicationStackCollection - Collection of Application Stacks +type ApplicationStackCollection struct { + // REQUIRED; Collection of resources. + Value []*ApplicationStackResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// ApplicationStackResource - ARM resource for a ApplicationStack. +type ApplicationStackResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *ApplicationStack + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +type ArcConfiguration struct { + ArtifactStorageAccessMode *string + ArtifactStorageClassName *string + ArtifactStorageMountPath *string + ArtifactStorageNodeName *string + ArtifactsStorageType *StorageType + FrontEndServiceConfiguration *FrontEndConfiguration + KubeConfig *string +} + +// ArmIDWrapper - A wrapper for an ARM resource id +type ArmIDWrapper struct { + // READ-ONLY + ID *string +} + +// ArmPlan - The plan object in Azure Resource Manager, represents a marketplace plan. +type ArmPlan struct { + // The name. + Name *string + + // The product. + Product *string + + // The promotion code. + PromotionCode *string + + // The publisher. + Publisher *string + + // Version of product. + Version *string +} + +// AseRegion - ASE region. +type AseRegion struct { + // Kind of resource. + Kind *string + + // ASE region resource specific properties + Properties *AseRegionProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AseRegionCollection - Collection of ASE regions. +type AseRegionCollection struct { + // REQUIRED; Collection of resources. + Value []*AseRegion + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// AseRegionProperties - ASE region resource specific properties +type AseRegionProperties struct { + // Available OSs in region. + AvailableOS []*string + + // Available Skus in region. + AvailableSKU []*string + + // READ-ONLY; Dedicated host enabled. + DedicatedHost *bool + + // READ-ONLY; Display name for region. + DisplayName *string + + // READ-ONLY; Is region standard. + Standard *bool + + // READ-ONLY; Zone redundant deployment enabled. + ZoneRedundant *bool +} + +// AseV3NetworkingConfiguration - Full view of networking configuration for an ASE. +type AseV3NetworkingConfiguration struct { + // Kind of resource. + Kind *string + + // AseV3NetworkingConfiguration resource specific properties + Properties *AseV3NetworkingConfigurationProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AseV3NetworkingConfigurationProperties - AseV3NetworkingConfiguration resource specific properties +type AseV3NetworkingConfigurationProperties struct { + // Property to enable and disable new private endpoint connection creation on ASE + AllowNewPrivateEndpointConnections *bool + + // Property to enable and disable FTP on ASEV3 + FtpEnabled *bool + + // Customer provided Inbound IP Address. Only able to be set on Ase create. + InboundIPAddressOverride *string + + // Property to enable and disable Remote Debug on ASEV3 + RemoteDebugEnabled *bool + + // READ-ONLY + ExternalInboundIPAddresses []*string + + // READ-ONLY + InternalInboundIPAddresses []*string + + // READ-ONLY + LinuxOutboundIPAddresses []*string + + // READ-ONLY + WindowsOutboundIPAddresses []*string +} + +// AuthPlatform - The configuration settings of the platform of App Service Authentication/Authorization. +type AuthPlatform struct { + // The path of the config file containing auth settings if they come from a file. If the path is relative, base will the site's + // root directory. + ConfigFilePath *string + + // true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. + Enabled *bool + + // 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 +} + +// AutoHealActions - Actions which to take by the auto-heal module when a rule is triggered. +type AutoHealActions struct { + // Predefined action to be taken. + ActionType *AutoHealActionType + + // Custom action to be taken. + CustomAction *AutoHealCustomAction + + // Minimum time the process must execute before taking the action + MinProcessExecutionTime *string +} + +// AutoHealCustomAction - Custom action to be executed when an auto heal rule is triggered. +type AutoHealCustomAction struct { + // Executable to be run. + Exe *string + + // Parameters for the executable. + Parameters *string +} + +// AutoHealRules - Rules that can be defined for auto-heal. +type AutoHealRules struct { + // Actions to be executed when a rule is triggered. + Actions *AutoHealActions + + // Conditions that describe when to execute the auto-heal actions. + Triggers *AutoHealTriggers +} + +// AutoHealTriggers - Triggers for auto-heal. +type AutoHealTriggers struct { + // A rule based on private bytes. + PrivateBytesInKB *int32 + + // A rule based on total requests. + Requests *RequestsBasedTrigger + + // A rule based on request execution time. + SlowRequests *SlowRequestsBasedTrigger + + // A rule based on multiple Slow Requests Rule with path + SlowRequestsWithPath []*SlowRequestsBasedTrigger + + // A rule based on status codes. + StatusCodes []*StatusCodesBasedTrigger + + // A rule based on status codes ranges. + StatusCodesRange []*StatusCodesRangeBasedTrigger +} + +// AzureActiveDirectory - The configuration settings of the Azure Active directory provider. +type AzureActiveDirectory struct { + // false if the Azure Active Directory provider should not be enabled despite the set registration; otherwise, true. + Enabled *bool + + // Gets a value indicating whether the Azure AD configuration was auto-provisioned using 1st party tooling. This is an internal + // flag primarily intended to support the Azure Management Portal. Users + // should not read or write to this property. + IsAutoProvisioned *bool + + // The configuration settings of the Azure Active Directory login flow. + Login *AzureActiveDirectoryLogin + + // The configuration settings of the Azure Active Directory app registration. + Registration *AzureActiveDirectoryRegistration + + // The configuration settings of the Azure Active Directory token validation flow. + Validation *AzureActiveDirectoryValidation +} + +// AzureActiveDirectoryLogin - The configuration settings of the Azure Active Directory login flow. +type AzureActiveDirectoryLogin struct { + // true if the www-authenticate provider should be omitted from the request; otherwise, false. + DisableWWWAuthenticate *bool + + // Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the + // form "key=value". + LoginParameters []*string +} + +// AzureActiveDirectoryRegistration - The configuration settings of the Azure Active Directory app registration. +type AzureActiveDirectoryRegistration struct { + // The Client ID of this relying party application, known as the clientid. 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-10.html + ClientID *string + + // An alternative to the client secret thumbprint, that is the issuer of a certificate used for signing purposes. This property + // acts as a replacement for the Client Secret Certificate Thumbprint. It is + // also optional. + ClientSecretCertificateIssuer *string + + // An alternative to the client secret thumbprint, that is the subject alternative name of a certificate used for signing + // purposes. This property acts as a replacement for the Client Secret Certificate + // Thumbprint. It is also optional. + ClientSecretCertificateSubjectAlternativeName *string + + // 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 + + // The app setting name that contains the client secret of the relying party application. + ClientSecretSettingName *string + + // 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://login.microsoftonline.com/v2.0/{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 + OpenIDIssuer *string +} + +// AzureActiveDirectoryValidation - The configuration settings of the Azure Active Directory token validation flow. +type AzureActiveDirectoryValidation struct { + // The list of audiences that can make successful authentication/authorization requests. + AllowedAudiences []*string + + // The configuration settings of the default authorization policy. + DefaultAuthorizationPolicy *DefaultAuthorizationPolicy + + // The configuration settings of the checks that should be made while validating the JWT Claims. + JwtClaimChecks *JwtClaimChecks +} + +// AzureBlobStorageApplicationLogsConfig - Application logs azure blob storage configuration. +type AzureBlobStorageApplicationLogsConfig struct { + // Log level. + Level *LogLevel + + // Retention in days. Remove blobs older than X days. 0 or lower means no retention. + RetentionInDays *int32 + + // SAS url to a azure blob container with read/write/list/delete permissions. + SasURL *string +} + +// AzureBlobStorageHTTPLogsConfig - Http logs to azure blob storage configuration. +type AzureBlobStorageHTTPLogsConfig struct { + // True if configuration is enabled, false if it is disabled and null if configuration is not set. + Enabled *bool + + // Retention in days. Remove blobs older than X days. 0 or lower means no retention. + RetentionInDays *int32 + + // SAS url to a azure blob container with read/write/list/delete permissions. + SasURL *string +} + +// AzureResourceErrorInfo - The azure resource error info. +type AzureResourceErrorInfo struct { + // REQUIRED; The error code. + Code *string + + // REQUIRED; The error message. + Message *string + + // The error details. + Details []*AzureResourceErrorInfo +} + +// AzureStaticWebApps - The configuration settings of the Azure Static Web Apps provider. +type AzureStaticWebApps struct { + // false if the Azure Static Web Apps provider should not be enabled despite the set registration; otherwise, true. + Enabled *bool + + // The configuration settings of the Azure Static Web Apps registration. + Registration *AzureStaticWebAppsRegistration +} + +// AzureStaticWebAppsRegistration - The configuration settings of the registration for the Azure Static Web Apps provider +type AzureStaticWebAppsRegistration struct { + // The Client ID of the app used for login. + ClientID *string +} + +// AzureStorageInfoValue - Azure Files or Blob Storage access information value for dictionary storage. +type AzureStorageInfoValue struct { + // Access key for the storage account. + AccessKey *string + + // Name of the storage account. + AccountName *string + + // Path to mount the storage within the site's runtime environment. + MountPath *string + + // Mounting protocol to use for the storage account. + Protocol *AzureStorageProtocol + + // Name of the file share (container name, for Blob storage). + ShareName *string + + // Type of storage. + Type *AzureStorageType + + // READ-ONLY; State of the storage account. + State *AzureStorageState +} + +// AzureStoragePropertyDictionaryResource - AzureStorageInfo dictionary resource. +type AzureStoragePropertyDictionaryResource struct { + // Kind of resource. + Kind *string + + // Azure storage accounts. + Properties map[string]*AzureStorageInfoValue + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AzureTableStorageApplicationLogsConfig - Application logs to Azure table storage configuration. +type AzureTableStorageApplicationLogsConfig struct { + // REQUIRED; SAS URL to an Azure table with add/query/delete permissions. + SasURL *string + + // Log level. + Level *LogLevel +} + +// BackupItem - Backup description. +type BackupItem struct { + // Kind of resource. + Kind *string + + // BackupItem resource specific properties + Properties *BackupItemProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// BackupItemCollection - Collection of backup items. +type BackupItemCollection struct { + // REQUIRED; Collection of resources. + Value []*BackupItem + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// BackupItemProperties - BackupItem resource specific properties +type BackupItemProperties struct { + // READ-ONLY; Id of the backup. + BackupID *int32 + + // READ-ONLY; Name of the blob which contains data for this backup. + BlobName *string + + // READ-ONLY; Unique correlation identifier. Please use this along with the timestamp while communicating with Azure support. + CorrelationID *string + + // READ-ONLY; Timestamp of the backup creation. + Created *time.Time + + // READ-ONLY; List of databases included in the backup. + Databases []*DatabaseBackupSetting + + // READ-ONLY; Timestamp when this backup finished. + FinishedTimeStamp *time.Time + + // READ-ONLY; Timestamp of a last restore operation which used this backup. + LastRestoreTimeStamp *time.Time + + // READ-ONLY; Details regarding this backup. Might contain an error message. + Log *string + + // READ-ONLY; Name of this backup. + Name *string + + // READ-ONLY; True if this backup has been created due to a schedule being triggered. + Scheduled *bool + + // READ-ONLY; Size of the backup in bytes. + SizeInBytes *int64 + + // READ-ONLY; Backup status. + Status *BackupItemStatus + + // READ-ONLY; SAS URL for the storage account container which contains this backup. + StorageAccountURL *string + + // READ-ONLY; Size of the original web app which has been backed up. + WebsiteSizeInBytes *int64 +} + +// BackupRequest - Description of a backup which will be performed. +type BackupRequest struct { + // Kind of resource. + Kind *string + + // BackupRequest resource specific properties + Properties *BackupRequestProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// BackupRequestProperties - BackupRequest resource specific properties +type BackupRequestProperties struct { + // REQUIRED; SAS URL to the container. + StorageAccountURL *string + + // Name of the backup. + BackupName *string + + // Schedule for the backup if it is executed periodically. + BackupSchedule *BackupSchedule + + // Databases included in the backup. + Databases []*DatabaseBackupSetting + + // True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. + Enabled *bool +} + +// BackupSchedule - Description of a backup schedule. Describes how often should be the backup performed and what should be +// the retention policy. +type BackupSchedule struct { + // REQUIRED; How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should + // be set to Day) + FrequencyInterval *int32 + + // REQUIRED; The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day + // and FrequencyInterval should be set to 7) + FrequencyUnit *FrequencyUnit + + // REQUIRED; True if the retention policy should always keep at least one backup in the storage account, regardless how old + // it is; false otherwise. + KeepAtLeastOneBackup *bool + + // REQUIRED; After how many days backups should be deleted. + RetentionPeriodInDays *int32 + + // When the schedule should start working. + StartTime *time.Time + + // READ-ONLY; Last time when this schedule was triggered. + LastExecutionTime *time.Time +} + +// BillingMeter - App Service billing entity that contains information about meter which the Azure billing system utilizes +// to charge users for services. +type BillingMeter struct { + // Kind of resource. + Kind *string + + // BillingMeter resource specific properties + Properties *BillingMeterProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// BillingMeterCollection - Collection of Billing Meters +type BillingMeterCollection struct { + // REQUIRED; Collection of resources. + Value []*BillingMeter + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// BillingMeterProperties - BillingMeter resource specific properties +type BillingMeterProperties struct { + // Azure Location of billable resource + BillingLocation *string + + // Friendly name of the meter + FriendlyName *string + + // Meter GUID onboarded in Commerce + MeterID *string + + // Meter Multiplier + Multiplier *float64 + + // App Service OS type meter used for + OSType *string + + // App Service ResourceType meter used for + ResourceType *string + + // Short Name from App Service Azure pricing Page + ShortName *string +} + +// BlobStorageTokenStore - The configuration settings of the storage of the tokens if blob storage is used. +type BlobStorageTokenStore struct { + // The name of the app setting containing the SAS URL of the blob storage containing the tokens. + SasURLSettingName *string +} + +// Capability - Describes the capabilities/features allowed for a specific SKU. +type Capability struct { + // Name of the SKU capability. + Name *string + + // Reason of the SKU capability. + Reason *string + + // Value of the SKU capability. + Value *string +} + +// Certificate - Key Vault container for a certificate that is purchased through Azure. +type Certificate struct { + // Key Vault resource Id. + KeyVaultID *string + + // Key Vault secret name. + KeyVaultSecretName *string + + // READ-ONLY; Status of the Key Vault secret. + ProvisioningState *KeyVaultSecretStatus +} + +// CertificateCollection - Collection of certificate order certificates. +type CertificateCollection struct { + // REQUIRED; Collection of resources. + Value []*CertificateResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// CertificateDetails - SSL certificate details. +type CertificateDetails struct { + // READ-ONLY; Certificate Issuer. + Issuer *string + + // READ-ONLY; Date Certificate is valid to. + NotAfter *time.Time + + // READ-ONLY; Date Certificate is valid from. + NotBefore *time.Time + + // READ-ONLY; Raw certificate data. + RawData *string + + // READ-ONLY; Certificate Serial Number. + SerialNumber *string + + // READ-ONLY; Certificate Signature algorithm. + SignatureAlgorithm *string + + // READ-ONLY; Certificate Subject. + Subject *string + + // READ-ONLY; Certificate Thumbprint. + Thumbprint *string + + // READ-ONLY; Certificate Version. + Version *int32 +} + +// CertificateEmail - SSL certificate email. +type CertificateEmail struct { + // Email id. + EmailID *string + + // Time stamp. + TimeStamp *time.Time +} + +// CertificateOrder - SSL certificate purchase order. +type CertificateOrder struct { + // REQUIRED; Resource Location. + Location *string + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // AppServiceCertificateOrder resource specific properties + Properties *CertificateOrderProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CertificateOrderAction - Certificate order action. +type CertificateOrderAction struct { + // READ-ONLY; Action type. + ActionType *CertificateOrderActionType + + // READ-ONLY; Time at which the certificate action was performed. + CreatedAt *time.Time +} + +// CertificateOrderCollection - Collection of certificate orders. +type CertificateOrderCollection struct { + // REQUIRED; Collection of resources. + Value []*CertificateOrder + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +type CertificateOrderContact struct { + Email *string + NameFirst *string + NameLast *string + Phone *string +} + +// CertificateOrderPatchResource - ARM resource for a certificate order that is purchased through Azure. +type CertificateOrderPatchResource struct { + // Kind of resource. + Kind *string + + // AppServiceCertificateOrderPatchResource resource specific properties + Properties *CertificateOrderPatchResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CertificateOrderPatchResourceProperties - AppServiceCertificateOrderPatchResource resource specific properties +type CertificateOrderPatchResourceProperties struct { + // REQUIRED; Certificate product type. + ProductType *CertificateProductType + + // true if the certificate should be automatically renewed when it expires; otherwise, false. + AutoRenew *bool + + // State of the Key Vault secret. + Certificates map[string]*Certificate + + // Last CSR that was created for this order. + Csr *string + + // Certificate distinguished name. + DistinguishedName *string + + // Certificate key size. + KeySize *int32 + + // Duration in years (must be 1). + ValidityInYears *int32 + + // READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment. + AppServiceCertificateNotRenewableReasons []*ResourceNotRenewableReason + + // READ-ONLY; Contact info + Contact *CertificateOrderContact + + // READ-ONLY; Domain verification token. + DomainVerificationToken *string + + // READ-ONLY; Certificate expiration time. + ExpirationTime *time.Time + + // READ-ONLY; Intermediate certificate. + Intermediate *CertificateDetails + + // READ-ONLY; true if private key is external; otherwise, false. + IsPrivateKeyExternal *bool + + // READ-ONLY; Certificate last issuance time. + LastCertificateIssuanceTime *time.Time + + // READ-ONLY; Time stamp when the certificate would be auto renewed next + NextAutoRenewalTimeStamp *time.Time + + // READ-ONLY; Status of certificate order. + ProvisioningState *ProvisioningState + + // READ-ONLY; Root certificate. + Root *CertificateDetails + + // READ-ONLY; Current serial number of the certificate. + SerialNumber *string + + // READ-ONLY; Signed certificate. + SignedCertificate *CertificateDetails + + // READ-ONLY; Current order status. + Status *CertificateOrderStatus +} + +// CertificateOrderProperties - AppServiceCertificateOrder resource specific properties +type CertificateOrderProperties struct { + // REQUIRED; Certificate product type. + ProductType *CertificateProductType + + // true if the certificate should be automatically renewed when it expires; otherwise, false. + AutoRenew *bool + + // State of the Key Vault secret. + Certificates map[string]*Certificate + + // Last CSR that was created for this order. + Csr *string + + // Certificate distinguished name. + DistinguishedName *string + + // Certificate key size. + KeySize *int32 + + // Duration in years (must be 1). + ValidityInYears *int32 + + // READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment. + AppServiceCertificateNotRenewableReasons []*ResourceNotRenewableReason + + // READ-ONLY; Contact info + Contact *CertificateOrderContact + + // READ-ONLY; Domain verification token. + DomainVerificationToken *string + + // READ-ONLY; Certificate expiration time. + ExpirationTime *time.Time + + // READ-ONLY; Intermediate certificate. + Intermediate *CertificateDetails + + // READ-ONLY; true if private key is external; otherwise, false. + IsPrivateKeyExternal *bool + + // READ-ONLY; Certificate last issuance time. + LastCertificateIssuanceTime *time.Time + + // READ-ONLY; Time stamp when the certificate would be auto renewed next + NextAutoRenewalTimeStamp *time.Time + + // READ-ONLY; Status of certificate order. + ProvisioningState *ProvisioningState + + // READ-ONLY; Root certificate. + Root *CertificateDetails + + // READ-ONLY; Current serial number of the certificate. + SerialNumber *string + + // READ-ONLY; Signed certificate. + SignedCertificate *CertificateDetails + + // READ-ONLY; Current order status. + Status *CertificateOrderStatus +} + +// CertificatePatchResource - Key Vault container ARM resource for a certificate that is purchased through Azure. +type CertificatePatchResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *Certificate + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CertificateResource - Key Vault container ARM resource for a certificate that is purchased through Azure. +type CertificateResource struct { + // REQUIRED; Resource Location. + Location *string + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // Core resource properties + Properties *Certificate + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CipherSuites - Describes valid TLS cipher suites. +type CipherSuites struct { + // List of TLS Cipher Suites that are supported by App Service. + Suites []*string +} + +// ClientRegistration - The configuration settings of the app registration for providers that have client ids and client secrets +type ClientRegistration struct { + // The Client ID of the app used for login. + ClientID *string + + // The app setting name that contains the client secret. + ClientSecretSettingName *string +} + +// CloningInfo - Information needed for cloning operation. +type CloningInfo struct { + // REQUIRED; ARM resource ID of the source app. App resource ID is of the form /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. + SourceWebAppID *string + + // Application setting overrides for cloned app. If specified, these settings override the settings cloned from source app. + // Otherwise, application settings from source app are retained. + AppSettingsOverrides map[string]*string + + // true to clone custom hostnames from source app; otherwise, false. + CloneCustomHostNames *bool + + // true to clone source control from source app; otherwise, false. + CloneSourceControl *bool + + // true to configure load balancing for source and destination app. + ConfigureLoadBalancing *bool + + // Correlation ID of cloning operation. This ID ties multiple cloning operations together to use the same snapshot. + CorrelationID *string + + // App Service Environment. + HostingEnvironment *string + + // true to overwrite destination app; otherwise, false. + Overwrite *bool + + // Location of source app ex: West US or North Europe + SourceWebAppLocation *string + + // ARM resource ID of the Traffic Manager profile to use, if it exists. Traffic Manager resource ID is of the form + // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}. + TrafficManagerProfileID *string + + // Name of Traffic Manager profile to create. This is only needed if Traffic Manager profile does not already exist. + TrafficManagerProfileName *string +} + +// Configuration - Non versioned Container App configuration properties that define the mutable settings of a Container app +type Configuration struct { + // ActiveRevisionsMode controls how active revisions are handled for the Container app:Multiple: multiple revisions can be + // active. If no value if provided, this is the defaultSingle: Only one revision + // can be active at a time. Revision weights can not be used in this mode + ActiveRevisionsMode *ActiveRevisionsMode + + // Ingress configurations. + Ingress *Ingress + + // Collection of private container registry credentials for containers used by the Container app + Registries []*RegistryCredentials + + // Collection of secrets used by a Container app + Secrets []*Secret +} + +// ConnStringInfo - Database connection string information. +type ConnStringInfo struct { + // Connection string value. + ConnectionString *string + + // Name of connection string. + Name *string + + // Type of database. + Type *ConnectionStringType +} + +// ConnStringValueTypePair - Database connection string value to type pair. +type ConnStringValueTypePair struct { + // REQUIRED; Type of database. + Type *ConnectionStringType + + // REQUIRED; Value of pair. + Value *string +} + +// ConnectionStringDictionary - String dictionary resource. +type ConnectionStringDictionary struct { + // Kind of resource. + Kind *string + + // Connection strings. + Properties map[string]*ConnStringValueTypePair + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// 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. +type Contact struct { + // REQUIRED; Email address. + Email *string + + // REQUIRED; First name. + NameFirst *string + + // REQUIRED; Last name. + NameLast *string + + // REQUIRED; Phone number. + Phone *string + + // Mailing address. + AddressMailing *Address + + // Fax number. + Fax *string + + // Job title. + JobTitle *string + + // Middle name. + NameMiddle *string + + // Organization contact belongs to. + Organization *string +} + +// Container App container definition. +type Container struct { + // Container start command arguments. + Args []*string + + // Container start command. + Command []*string + + // Container environment variables. + Env []*EnvironmentVar + + // Container image tag. + Image *string + + // Custom container name. + Name *string + + // Container resource requirements. + Resources *ContainerResources +} + +// ContainerApp - Container App. +type ContainerApp struct { + // REQUIRED; Resource Location. + Location *string + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // ContainerApp resource specific properties + Properties *ContainerAppProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ContainerAppCollection - Container App collection ARM resource. +type ContainerAppCollection struct { + // REQUIRED; Collection of resources. + Value []*ContainerApp + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// ContainerAppProperties - ContainerApp resource specific properties +type ContainerAppProperties struct { + // Non versioned Container App configuration properties. + Configuration *Configuration + + // Resource ID of the Container App's KubeEnvironment. + KubeEnvironmentID *string + + // Container App versioned application definition. + Template *Template + + // READ-ONLY; Fully Qualified Domain Name of the latest revision of the Container App. + LatestRevisionFqdn *string + + // READ-ONLY; Name of the latest revision of the Container App. + LatestRevisionName *string + + // READ-ONLY; Provisioning state of the Container App. + ProvisioningState *ContainerAppProvisioningState +} + +// ContainerAppSecret - Container App Secret. +type ContainerAppSecret struct { + // READ-ONLY; Secret Name. + Name *string + + // READ-ONLY; Secret Value. + Value *string +} + +type ContainerAppsConfiguration struct { + // Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet + // defined in appSubnetResourceId. Must not overlap with the IP range defined in + // platformReservedCidr, if defined. + AppSubnetResourceID *string + + // Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet + // defined in appSubnetResourceId. Must not overlap with the IP range defined in + // platformReservedCidr, if defined. + ControlPlaneSubnetResourceID *string + + // Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry + DaprAIInstrumentationKey *string + + // CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the IP range + // defined in platformReservedCidr, if defined. + DockerBridgeCidr *string + + // IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any + // other Subnet IP ranges. + PlatformReservedCidr *string + + // An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server + PlatformReservedDNSIP *string +} + +type ContainerCPUStatistics struct { + CPUUsage *ContainerCPUUsage + OnlineCPUCount *int32 + SystemCPUUsage *int64 + ThrottlingData *ContainerThrottlingData +} + +type ContainerCPUUsage struct { + KernelModeUsage *int64 + PerCPUUsage []*int64 + TotalUsage *int64 + UserModeUsage *int64 +} + +type ContainerInfo struct { + CurrentCPUStats *ContainerCPUStatistics + CurrentTimeStamp *time.Time + Eth0 *ContainerNetworkInterfaceStatistics + ID *string + MemoryStats *ContainerMemoryStatistics + Name *string + PreviousCPUStats *ContainerCPUStatistics + PreviousTimeStamp *time.Time +} + +type ContainerMemoryStatistics struct { + Limit *int64 + MaxUsage *int64 + Usage *int64 +} + +type ContainerNetworkInterfaceStatistics struct { + RxBytes *int64 + RxDropped *int64 + RxErrors *int64 + RxPackets *int64 + TxBytes *int64 + TxDropped *int64 + TxErrors *int64 + TxPackets *int64 +} + +// ContainerResources - Container App container resource requirements. +type ContainerResources struct { + // Required CPU in cores, e.g. 0.5 + CPU *float64 + + // Required memory, e.g. "250Mb" + Memory *string +} + +type ContainerThrottlingData struct { + Periods *int32 + ThrottledPeriods *int32 + ThrottledTime *int32 +} + +// ContentHash - The content hash. +type ContentHash struct { + // The algorithm of the content hash. + Algorithm *string + + // The value of the content hash. + Value *string +} + +// ContentLink - The content link. +type ContentLink struct { + // The content link URI. + URI *string + + // READ-ONLY; The content hash. + ContentHash *ContentHash + + // READ-ONLY; The content size. + ContentSize *int64 + + // READ-ONLY; The content version. + ContentVersion *string + + // READ-ONLY; The metadata. + Metadata any +} + +// ContinuousWebJob - Continuous Web Job Information. +type ContinuousWebJob struct { + // Kind of resource. + Kind *string + + // ContinuousWebJob resource specific properties + Properties *ContinuousWebJobProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ContinuousWebJobCollection - Collection of Kudu continuous web job information elements. +type ContinuousWebJobCollection struct { + // REQUIRED; Collection of resources. + Value []*ContinuousWebJob + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// ContinuousWebJobProperties - ContinuousWebJob resource specific properties +type ContinuousWebJobProperties struct { + // Detailed status. + DetailedStatus *string + + // Error information. + Error *string + + // Extra Info URL. + ExtraInfoURL *string + + // Log URL. + LogURL *string + + // Run command. + RunCommand *string + + // Job settings. + Settings map[string]any + + // Job status. + Status *ContinuousWebJobStatus + + // Job URL. + URL *string + + // Using SDK? + UsingSdk *bool + + // Job type. + WebJobType *WebJobType +} + +// CookieExpiration - The configuration settings of the session cookie's expiration. +type CookieExpiration struct { + // The convention used when determining the session cookie's expiration. + Convention *CookieExpirationConvention + + // The time after the request is made when the session cookie should expire. + TimeToExpiration *string +} + +// Correlation - The correlation property. +type Correlation struct { + // The client tracking id. + ClientTrackingID *string +} + +// CorsSettings - Cross-Origin Resource Sharing (CORS) settings for the app. +type CorsSettings struct { + // Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). + // Use "*" to allow all. + AllowedOrigins []*string + + // Gets or sets whether CORS requests with credentials are allowed. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requestswithcredentials + // for more details. + SupportCredentials *bool +} + +// CsmDeploymentStatus - Deployment status response payload. +type CsmDeploymentStatus struct { + // Kind of resource. + Kind *string + + // CsmDeploymentStatus resource specific properties + Properties *CsmDeploymentStatusProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CsmDeploymentStatusCollection - Deployment status collection ARM resource. +type CsmDeploymentStatusCollection struct { + // REQUIRED; Collection of resources. + Value []*CsmDeploymentStatus + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// CsmDeploymentStatusProperties - CsmDeploymentStatus resource specific properties +type CsmDeploymentStatusProperties struct { + // Deployment operation id. + DeploymentID *string + + // List of errors. + Errors []*ErrorEntity + + // List of URLs pointing to logs for instances which failed to provision. + FailedInstancesLogs []*string + + // Number of site instances failed to provision. + NumberOfInstancesFailed *int32 + + // Number of site instances currently being provisioned. + NumberOfInstancesInProgress *int32 + + // Number of site instances provisioned successfully. + NumberOfInstancesSuccessful *int32 + + // Deployment build status. + Status *DeploymentBuildStatus +} + +// 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 { + Resources []*string + TargetResourceGroup *string +} + +// CsmOperationCollection - Collection of Azure resource manager operation metadata. +type CsmOperationCollection struct { + // REQUIRED; Collection of resources. + Value []*CsmOperationDescription + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// CsmOperationDescription - Description of an operation available for Microsoft.Web resource provider. +type CsmOperationDescription struct { + // Meta data about operation used for display in portal. + Display *CsmOperationDisplay + IsDataAction *bool + Name *string + Origin *string + + // Properties available for a Microsoft.Web resource provider operation. + Properties *CsmOperationDescriptionProperties +} + +// CsmOperationDescriptionProperties - Properties available for a Microsoft.Web resource provider operation. +type CsmOperationDescriptionProperties struct { + // Resource metrics service provided by Microsoft.Insights resource provider. + ServiceSpecification *ServiceSpecification +} + +// CsmOperationDisplay - Meta data about operation used for display in portal. +type CsmOperationDisplay struct { + Description *string + Operation *string + Provider *string + Resource *string +} + +// CsmPublishingCredentialsPoliciesEntity - Publishing Credentials Policies parameters. +type CsmPublishingCredentialsPoliciesEntity struct { + // Kind of resource. + Kind *string + + // CsmPublishingCredentialsPoliciesEntity resource specific properties + Properties *CsmPublishingCredentialsPoliciesEntityProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CsmPublishingCredentialsPoliciesEntityProperties - CsmPublishingCredentialsPoliciesEntity resource specific properties +type CsmPublishingCredentialsPoliciesEntityProperties struct { + // REQUIRED; true to allow access to a publishing method; otherwise, false. + Allow *bool +} + +// CsmPublishingProfileOptions - Publishing options for requested profile. +type CsmPublishingProfileOptions struct { + // Name of the format. Valid values are: FileZilla3 WebDeploy -- default Ftp + Format *PublishingProfileFormat + + // Include the DisasterRecover endpoint if true + IncludeDisasterRecoveryEndpoints *bool +} + +// CsmSlotEntity - Deployment slot parameters. +type CsmSlotEntity struct { + // REQUIRED; true to preserve Virtual Network to the slot during swap; otherwise, false. + PreserveVnet *bool + + // REQUIRED; Destination deployment slot during swap operation. + TargetSlot *string +} + +// CsmUsageQuota - Usage of the quota resource. +type CsmUsageQuota struct { + // The current value of the resource counter. + CurrentValue *int64 + + // The resource limit. + Limit *int64 + + // Quota name. + Name *LocalizableString + + // Next reset time for the resource counter. + NextResetTime *time.Time + + // Units of measurement for the quota resource. + Unit *string +} + +// CsmUsageQuotaCollection - Collection of CSM usage quotas. +type CsmUsageQuotaCollection struct { + // REQUIRED; Collection of resources. + Value []*CsmUsageQuota + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// CustomDNSSuffixConfiguration - Full view of the custom domain suffix configuration for ASEv3. +type CustomDNSSuffixConfiguration struct { + // Kind of resource. + Kind *string + + // CustomDnsSuffixConfiguration resource specific properties + Properties *CustomDNSSuffixConfigurationProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CustomDNSSuffixConfigurationProperties - CustomDnsSuffixConfiguration resource specific properties +type CustomDNSSuffixConfigurationProperties struct { + // The URL referencing the Azure Key Vault certificate secret that should be used as the default SSL/TLS certificate for sites + // with the custom domain suffix. + CertificateURL *string + + // The default custom domain suffix to use for all sites deployed on the ASE. + DNSSuffix *string + + // 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 + + // READ-ONLY + ProvisioningDetails *string + + // READ-ONLY + ProvisioningState *CustomDNSSuffixProvisioningState +} + +// CustomHostnameAnalysisResult - Custom domain analysis. +type CustomHostnameAnalysisResult struct { + // Kind of resource. + Kind *string + + // CustomHostnameAnalysisResult resource specific properties + Properties *CustomHostnameAnalysisResultProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CustomHostnameAnalysisResultProperties - CustomHostnameAnalysisResult resource specific properties +type CustomHostnameAnalysisResultProperties struct { + // A records controller can see for this hostname. + ARecords []*string + + // Alternate CName records controller can see for this hostname. + AlternateCNameRecords []*string + + // Alternate TXT records controller can see for this hostname. + AlternateTxtRecords []*string + + // CName records controller can see for this hostname. + CNameRecords []*string + + // TXT records controller can see for this hostname. + TxtRecords []*string + + // READ-ONLY; Name of the conflicting app on scale unit if it's within the same subscription. + ConflictingAppResourceID *string + + // READ-ONLY; Raw failure information if DNS verification fails. + CustomDomainVerificationFailureInfo *ErrorEntity + + // READ-ONLY; DNS verification test result. + CustomDomainVerificationTest *DNSVerificationTestResult + + // READ-ONLY; true if there is a conflict across subscriptions; otherwise, false. + HasConflictAcrossSubscription *bool + + // READ-ONLY; true if there is a conflict on a scale unit; otherwise, false. + HasConflictOnScaleUnit *bool + + // READ-ONLY; true if hostname is already verified; otherwise, false. + IsHostnameAlreadyVerified *bool +} + +// CustomHostnameSites - A hostname and its assigned sites +type CustomHostnameSites struct { + // Kind of resource. + Kind *string + + // CustomHostnameSites resource specific properties + Properties *CustomHostnameSitesProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CustomHostnameSitesCollection - Collection of custom hostname sites +type CustomHostnameSitesCollection struct { + // REQUIRED; Collection of resources. + Value []*CustomHostnameSites + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// CustomHostnameSitesProperties - CustomHostnameSites resource specific properties +type CustomHostnameSitesProperties struct { + CustomHostname *string + Region *string + SiteResourceIDs []*Identifier +} + +// CustomOpenIDConnectProvider - The configuration settings of the custom Open ID Connect provider. +type CustomOpenIDConnectProvider struct { + // false if the custom Open ID provider provider should not be enabled; otherwise, true. + Enabled *bool + + // The configuration settings of the login flow of the custom Open ID Connect provider. + Login *OpenIDConnectLogin + + // The configuration settings of the app registration for the custom Open ID Connect provider. + Registration *OpenIDConnectRegistration +} + +// CustomScaleRule - Container App container Custom scaling rule. +type CustomScaleRule struct { + // Authentication secrets for the custom scale rule. + Auth []*ScaleRuleAuth + + // Metadata properties to describe custom scale rule. + Metadata map[string]*string + + // Type of the custom scale rule eg: azure-servicebus, redis etc. + Type *string +} + +// Dapr - Container App Dapr configuration. +type Dapr struct { + // Dapr application identifier + AppID *string + + // Port on which the Dapr side car + AppPort *int32 + + // Collection of Dapr components + Components []*DaprComponent + + // Boolean indicating if the Dapr side car is enabled + Enabled *bool +} + +// DaprComponent - Dapr component configuration +type DaprComponent struct { + // Component metadata + Metadata []*DaprMetadata + + // Component name + Name *string + + // Component type + Type *string + + // Component version + Version *string +} + +// DaprConfig - App Dapr configuration. +type DaprConfig struct { + // Dapr application identifier + AppID *string + + // Tells Dapr which port your application is listening on + AppPort *int32 + + // Enables API logging for the Dapr sidecar + EnableAPILogging *bool + + // Boolean indicating if the Dapr side car is enabled + Enabled *bool + + // Increasing max size of request body http servers parameter in MB to handle uploading of big files. Default is 4 MB. + HTTPMaxRequestSize *int32 + + // Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. + HTTPReadBufferSize *int32 + + // Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + LogLevel *DaprLogLevel +} + +// DaprMetadata - Container App Dapr component metadata. +type DaprMetadata struct { + // Metadata property name. + Name *string + + // Name of the Container App secret from which to pull the metadata property value. + SecretRef *string + + // Metadata property value. + Value *string +} + +// DataProviderMetadata - Additional configuration for a data providers +type DataProviderMetadata struct { + ProviderName *string + + // READ-ONLY; Settings for the data provider + PropertyBag []*KeyValuePairStringObject +} + +// DataSource - Class representing data source used by the detectors +type DataSource struct { + // Datasource Uri Links + DataSourceURI []*NameValuePair + + // Instructions if any for the data source + Instructions []*string +} + +// DataTableResponseColumn - Column definition +type DataTableResponseColumn struct { + // Name of the column + ColumnName *string + + // Column Type + ColumnType *string + + // Data type which looks like 'String' or 'Int32'. + DataType *string +} + +// DataTableResponseObject - Data Table which defines columns and raw row values +type DataTableResponseObject struct { + // List of columns with data types + Columns []*DataTableResponseColumn + + // Raw row values + Rows [][]*string + + // Name of the table + TableName *string +} + +// DatabaseBackupSetting - Database backup settings. +type DatabaseBackupSetting struct { + // REQUIRED; Database type (e.g. SqlAzure / MySql). + DatabaseType *DatabaseType + + // 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 + + // Contains a connection string name that is linked to the SiteConfig.ConnectionStrings. This is used during restore with + // overwrite connection strings options. + ConnectionStringName *string + Name *string +} + +// DatabaseConnection - Static Site Database Connection resource. +type DatabaseConnection struct { + // Kind of resource. + Kind *string + + // DatabaseConnection resource specific properties + Properties *DatabaseConnectionProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DatabaseConnectionCollection - Collection of static site database connections. +type DatabaseConnectionCollection struct { + // REQUIRED; Collection of resources. + Value []*DatabaseConnection + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// DatabaseConnectionOverview - Static Site Database Connection overview. +type DatabaseConnectionOverview struct { + // READ-ONLY; A list of configuration files associated with this database connection. + ConfigurationFiles []*StaticSiteDatabaseConnectionConfigurationFileOverview + + // 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 + + // READ-ONLY; If present, the name of this database connection resource. + Name *string + + // READ-ONLY; The region of the database resource. + Region *string + + // READ-ONLY; The resource id of the database. + ResourceID *string +} + +// DatabaseConnectionPatchRequest - Static Site Database Connection Request Properties resource when patching +type DatabaseConnectionPatchRequest struct { + // DatabaseConnectionPatchRequest resource specific properties + Properties *DatabaseConnectionPatchRequestProperties +} + +// DatabaseConnectionPatchRequestProperties - DatabaseConnectionPatchRequest resource specific properties +type DatabaseConnectionPatchRequestProperties struct { + // 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 + + // The connection string to use to connect to the database. + ConnectionString *string + + // The region of the database resource. + Region *string + + // The resource id of the database. + ResourceID *string +} + +// DatabaseConnectionProperties - DatabaseConnection resource specific properties +type DatabaseConnectionProperties struct { + // REQUIRED; The region of the database resource. + Region *string + + // REQUIRED; The resource id of the database. + ResourceID *string + + // 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 + + // The connection string to use to connect to the database. + ConnectionString *string + + // READ-ONLY; A list of configuration files associated with this database connection. + ConfigurationFiles []*StaticSiteDatabaseConnectionConfigurationFileOverview +} + +// DefaultAuthorizationPolicy - The configuration settings of the Azure Active Directory default authorization policy. +type DefaultAuthorizationPolicy struct { + // The configuration settings of the Azure Active Directory allowed applications. + AllowedApplications []*string + + // The configuration settings of the Azure Active Directory allowed principals. + AllowedPrincipals *AllowedPrincipals +} + +// DefaultErrorResponse - App Service error response. +type DefaultErrorResponse struct { + // READ-ONLY; Error model. + Error *DefaultErrorResponseError +} + +// DefaultErrorResponseError - Error model. +type DefaultErrorResponseError struct { + Details []*DefaultErrorResponseErrorDetailsItem + + // READ-ONLY; Standardized string to programmatically identify the error. + Code *string + + // READ-ONLY; More information to debug error. + Innererror *string + + // READ-ONLY; Detailed error description and debugging information. + Message *string + + // READ-ONLY; Detailed error description and debugging information. + Target *string +} + +// DefaultErrorResponseErrorDetailsItem - Detailed errors. +type DefaultErrorResponseErrorDetailsItem struct { + // READ-ONLY; Standardized string to programmatically identify the error. + Code *string + + // READ-ONLY; Detailed error description and debugging information. + Message *string + + // READ-ONLY; Detailed error description and debugging information. + Target *string +} + +// DeletedAppRestoreRequest - Details about restoring a deleted app. +type DeletedAppRestoreRequest struct { + // Kind of resource. + Kind *string + + // DeletedAppRestoreRequest resource specific properties + Properties *DeletedAppRestoreRequestProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DeletedAppRestoreRequestProperties - DeletedAppRestoreRequest resource specific properties +type DeletedAppRestoreRequestProperties struct { + // ARM resource ID of the deleted app. Example: /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} + DeletedSiteID *string + + // If true, deleted site configuration, in addition to content, will be restored. + RecoverConfiguration *bool + + // 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 + + // If true, the snapshot is retrieved from DRSecondary endpoint. + UseDRSecondary *bool +} + +// DeletedSite - A deleted app. +type DeletedSite struct { + // Kind of resource. + Kind *string + + // DeletedSite resource specific properties + Properties *DeletedSiteProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DeletedSiteProperties - DeletedSite resource specific properties +type DeletedSiteProperties struct { + // READ-ONLY; Numeric id for the deleted site + DeletedSiteID *int32 + + // READ-ONLY; Name of the deleted site + DeletedSiteName *string + + // READ-ONLY; Time in UTC when the app was deleted. + DeletedTimestamp *string + + // READ-ONLY; Geo Region of the deleted site + GeoRegionName *string + + // READ-ONLY; Kind of site that was deleted + Kind *string + + // READ-ONLY; ResourceGroup that contained the deleted site + ResourceGroup *string + + // READ-ONLY; Slot of the deleted site + Slot *string + + // READ-ONLY; Subscription containing the deleted site + Subscription *string +} + +// DeletedWebAppCollection - Collection of deleted apps. +type DeletedWebAppCollection struct { + // REQUIRED; Collection of resources. + Value []*DeletedSite + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// Deployment - User credentials used for publishing activity. +type Deployment struct { + // Kind of resource. + Kind *string + + // Deployment resource specific properties + Properties *DeploymentProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DeploymentCollection - Collection of app deployments. +type DeploymentCollection struct { + // REQUIRED; Collection of resources. + Value []*Deployment + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// DeploymentLocations - List of available locations (regions or App Service Environments) for deployment of App Service resources. +type DeploymentLocations struct { + // Available App Service Environments with basic information. + HostingEnvironmentDeploymentInfos []*HostingEnvironmentDeploymentInfo + + // Available App Service Environments with full descriptions of the environments. + HostingEnvironments []*Environment + + // Available regions. + Locations []*GeoRegion +} + +// DeploymentProperties - Deployment resource specific properties +type DeploymentProperties struct { + // True if deployment is currently active, false if completed and null if not started. + Active *bool + + // Who authored the deployment. + Author *string + + // Author email. + AuthorEmail *string + + // Who performed the deployment. + Deployer *string + + // Details on deployment. + Details *string + + // End time. + EndTime *time.Time + + // Details about deployment status. + Message *string + + // Start time. + StartTime *time.Time + + // Deployment status. + Status *int32 +} + +// DetectorAbnormalTimePeriod - Class representing Abnormal Time Period detected. +type DetectorAbnormalTimePeriod struct { + // End time of the correlated event + EndTime *time.Time + + // Message describing the event + Message *string + + // Downtime metadata + MetaData [][]*NameValuePair + + // Represents the rank of the Detector + Priority *float64 + + // List of proposed solutions + Solutions []*Solution + + // Represents the name of the Detector + Source *string + + // Start time of the correlated event + StartTime *time.Time + + // Represents the type of the Detector + Type *IssueType +} + +// DetectorDefinition - Class representing detector definition +type DetectorDefinition struct { + // READ-ONLY; Description of the detector + Description *string + + // READ-ONLY; Display name of the detector + DisplayName *string + + // READ-ONLY; Flag representing whether detector is enabled or not. + IsEnabled *bool + + // READ-ONLY; Detector Rank + Rank *float64 +} + +// DetectorDefinitionResource - ARM resource for a detector definition +type DetectorDefinitionResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *DetectorDefinition + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DetectorInfo - Definition of Detector +type DetectorInfo struct { + // READ-ONLY; Analysis Types for which this detector should apply to. + AnalysisType []*string + + // READ-ONLY; Author of the detector. + Author *string + + // READ-ONLY; Problem category. This serves for organizing group for detectors. + Category *string + + // READ-ONLY; Short description of the detector and its purpose. + Description *string + + // READ-ONLY; Id of detector + ID *string + + // READ-ONLY; Name of detector + Name *string + + // READ-ONLY; Defines score of a detector to power ML based matching. + Score *float32 + + // READ-ONLY; List of Support Topics for which this detector is enabled. + SupportTopicList []*SupportTopic + + // READ-ONLY; Whether this detector is an Analysis Detector or not. + Type *DetectorType +} + +// DetectorResponse - Class representing Response from Detector +type DetectorResponse struct { + // Kind of resource. + Kind *string + + // DetectorResponse resource specific properties + Properties *DetectorResponseProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DetectorResponseCollection - Collection of detector responses +type DetectorResponseCollection struct { + // REQUIRED; Collection of resources. + Value []*DetectorResponse + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// DetectorResponseProperties - DetectorResponse resource specific properties +type DetectorResponseProperties struct { + // Additional configuration for different data providers to be used by the UI + DataProvidersMetadata []*DataProviderMetadata + + // Data Set + Dataset []*DiagnosticData + + // metadata for the detector + Metadata *DetectorInfo + + // Indicates status of the most severe insight. + Status *Status + + // Suggested utterances where the detector can be applicable. + SuggestedUtterances *QueryUtterancesResults +} + +// DiagnosticAnalysis - Class representing a diagnostic analysis done on an application +type DiagnosticAnalysis struct { + // Kind of resource. + Kind *string + + // DiagnosticAnalysis resource specific properties + Properties *DiagnosticAnalysisProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DiagnosticAnalysisCollection - Collection of Diagnostic Analyses +type DiagnosticAnalysisCollection struct { + // REQUIRED; Collection of resources. + Value []*AnalysisDefinition + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// DiagnosticAnalysisProperties - DiagnosticAnalysis resource specific properties +type DiagnosticAnalysisProperties struct { + // List of time periods. + AbnormalTimePeriods []*AbnormalTimePeriod + + // End time of the period + EndTime *time.Time + + // Data by each detector for detectors that did not corelate + NonCorrelatedDetectors []*DetectorDefinition + + // Data by each detector + Payload []*AnalysisData + + // Start time of the period + StartTime *time.Time +} + +// DiagnosticCategory - Class representing detector definition +type DiagnosticCategory struct { + // Kind of resource. + Kind *string + + // DiagnosticCategory resource specific properties + Properties *DiagnosticCategoryProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DiagnosticCategoryCollection - Collection of Diagnostic Categories +type DiagnosticCategoryCollection struct { + // REQUIRED; Collection of resources. + Value []*DiagnosticCategory + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// DiagnosticCategoryProperties - DiagnosticCategory resource specific properties +type DiagnosticCategoryProperties struct { + // READ-ONLY; Description of the diagnostic category + Description *string +} + +// DiagnosticData - Set of data with rendering instructions +type DiagnosticData struct { + // Properties that describe how the table should be rendered + RenderingProperties *Rendering + + // Data in table form + Table *DataTableResponseObject +} + +// DiagnosticDetectorCollection - Collection of Diagnostic Detectors +type DiagnosticDetectorCollection struct { + // REQUIRED; Collection of resources. + Value []*DetectorDefinitionResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// DiagnosticDetectorResponse - Class representing Response from Diagnostic Detectors +type DiagnosticDetectorResponse struct { + // Kind of resource. + Kind *string + + // DiagnosticDetectorResponse resource specific properties + Properties *DiagnosticDetectorResponseProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DiagnosticDetectorResponseProperties - DiagnosticDetectorResponse resource specific properties +type DiagnosticDetectorResponseProperties struct { + // List of Correlated events found by the detector + AbnormalTimePeriods []*DetectorAbnormalTimePeriod + + // Additional Data that detector wants to send. + Data [][]*NameValuePair + + // Detector's definition + DetectorDefinition *DetectorDefinition + + // End time of the period + EndTime *time.Time + + // Flag representing Issue was detected. + IssueDetected *bool + + // Metrics provided by the detector + Metrics []*DiagnosticMetricSet + + // Meta Data + ResponseMetaData *ResponseMetaData + + // Start time of the period + StartTime *time.Time +} + +// DiagnosticMetricSample - Class representing Diagnostic Metric +type DiagnosticMetricSample struct { + // Whether the values are aggregates across all workers or not + IsAggregated *bool + + // Maximum of the metric sampled during the time period + Maximum *float64 + + // Minimum of the metric sampled during the time period + Minimum *float64 + + // Role Instance. Null if this counter is not per instance This is returned and should be whichever instance name we desire + // to be returned i.e. CPU and Memory return RDWORKERNAME (LargeDed…IN0) where + // RDWORKERNAME is Machine name below and RoleInstance name in parenthesis + RoleInstance *string + + // Time at which metric is measured + Timestamp *time.Time + + // Total value of the metric. If multiple measurements are made this will have sum of all. + Total *float64 +} + +// DiagnosticMetricSet - Class representing Diagnostic Metric information +type DiagnosticMetricSet struct { + // End time of the period + EndTime *time.Time + + // Name of the metric + Name *string + + // Start time of the period + StartTime *time.Time + + // Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D + TimeGrain *string + + // Metric's unit + Unit *string + + // Collection of metric values for the selected period based on the {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain} + Values []*DiagnosticMetricSample +} + +// Dimension of a resource metric. For e.g. instance specific HTTP requests for a web app, where instance name is dimension +// of the metric HTTP request +type Dimension struct { + DisplayName *string + InternalName *string + Name *string + ToBeExportedForShoebox *bool +} + +// Domain - Information about a domain. +type Domain struct { + // REQUIRED; Resource Location. + Location *string + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // Domain resource specific properties + Properties *DomainProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DomainAvailabilityCheckResult - Domain availability check result. +type DomainAvailabilityCheckResult struct { + // true if domain can be purchased using CreateDomain API; otherwise, false. + Available *bool + + // Valid values are Regular domain: Azure will charge the full price of domain registration, SoftDeleted: Purchasing this + // domain will simply restore it and this operation will not cost anything. + DomainType *DomainType + + // Name of the domain. + Name *string +} + +// DomainCollection - Collection of domains. +type DomainCollection struct { + // REQUIRED; Collection of resources. + Value []*Domain + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// DomainControlCenterSsoRequest - Single sign-on request information for domain management. +type DomainControlCenterSsoRequest struct { + // READ-ONLY; Post parameter key. + PostParameterKey *string + + // READ-ONLY; Post parameter value. Client should use 'application/x-www-form-urlencoded' encoding for this value. + PostParameterValue *string + + // READ-ONLY; URL where the single sign-on request is to be made. + URL *string +} + +// DomainOwnershipIdentifier - Domain ownership Identifier. +type DomainOwnershipIdentifier struct { + // Kind of resource. + Kind *string + + // DomainOwnershipIdentifier resource specific properties + Properties *DomainOwnershipIdentifierProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DomainOwnershipIdentifierCollection - Collection of domain ownership identifiers. +type DomainOwnershipIdentifierCollection struct { + // REQUIRED; Collection of resources. + Value []*DomainOwnershipIdentifier + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// DomainOwnershipIdentifierProperties - DomainOwnershipIdentifier resource specific properties +type DomainOwnershipIdentifierProperties struct { + // Ownership Id. + OwnershipID *string +} + +// DomainPatchResource - ARM resource for a domain. +type DomainPatchResource struct { + // Kind of resource. + Kind *string + + // DomainPatchResource resource specific properties + Properties *DomainPatchResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DomainPatchResourceProperties - DomainPatchResource resource specific properties +type DomainPatchResourceProperties struct { + // REQUIRED; Legal agreement consent. + Consent *DomainPurchaseConsent + + // REQUIRED; Administrative contact. + ContactAdmin *Contact + + // REQUIRED; Billing contact. + ContactBilling *Contact + + // REQUIRED; Registrant contact. + ContactRegistrant *Contact + + // REQUIRED; Technical contact. + ContactTech *Contact + AuthCode *string + + // true if the domain should be automatically renewed; otherwise, false. + AutoRenew *bool + + // Current DNS type + DNSType *DNSType + + // Azure DNS Zone to use + DNSZoneID *string + + // true if domain privacy is enabled for this domain; otherwise, false. + Privacy *bool + + // Target DNS type (would be used for migration) + TargetDNSType *DNSType + + // READ-ONLY; Domain creation timestamp. + CreatedTime *time.Time + + // READ-ONLY; Reasons why domain is not renewable. + DomainNotRenewableReasons []*ResourceNotRenewableReason + + // READ-ONLY; Domain expiration timestamp. + ExpirationTime *time.Time + + // READ-ONLY; Timestamp when the domain was renewed last time. + LastRenewedTime *time.Time + + // READ-ONLY; All hostnames derived from the domain and assigned to Azure resources. + ManagedHostNames []*HostName + + // READ-ONLY; Name servers. + NameServers []*string + + // READ-ONLY; Domain provisioning state. + ProvisioningState *ProvisioningState + + // READ-ONLY; true if Azure can assign this domain to App Service apps; otherwise, false. This value will be true if domain + // registration status is active and it is hosted on name servers Azure has programmatic + // access to. + ReadyForDNSRecordManagement *bool + + // READ-ONLY; Domain registration status. + RegistrationStatus *DomainStatus +} + +// DomainProperties - Domain resource specific properties +type DomainProperties struct { + // REQUIRED; Legal agreement consent. + Consent *DomainPurchaseConsent + + // REQUIRED; Administrative contact. + ContactAdmin *Contact + + // REQUIRED; Billing contact. + ContactBilling *Contact + + // REQUIRED; Registrant contact. + ContactRegistrant *Contact + + // REQUIRED; Technical contact. + ContactTech *Contact + AuthCode *string + + // true if the domain should be automatically renewed; otherwise, false. + AutoRenew *bool + + // Current DNS type + DNSType *DNSType + + // Azure DNS Zone to use + DNSZoneID *string + + // true if domain privacy is enabled for this domain; otherwise, false. + Privacy *bool + + // Target DNS type (would be used for migration) + TargetDNSType *DNSType + + // READ-ONLY; Domain creation timestamp. + CreatedTime *time.Time + + // READ-ONLY; Reasons why domain is not renewable. + DomainNotRenewableReasons []*ResourceNotRenewableReason + + // READ-ONLY; Domain expiration timestamp. + ExpirationTime *time.Time + + // READ-ONLY; Timestamp when the domain was renewed last time. + LastRenewedTime *time.Time + + // READ-ONLY; All hostnames derived from the domain and assigned to Azure resources. + ManagedHostNames []*HostName + + // READ-ONLY; Name servers. + NameServers []*string + + // READ-ONLY; Domain provisioning state. + ProvisioningState *ProvisioningState + + // READ-ONLY; true if Azure can assign this domain to App Service apps; otherwise, false. This value will be true if domain + // registration status is active and it is hosted on name servers Azure has programmatic + // access to. + ReadyForDNSRecordManagement *bool + + // READ-ONLY; Domain registration status. + RegistrationStatus *DomainStatus +} + +// DomainPurchaseConsent - Domain purchase consent object, representing acceptance of applicable legal agreements. +type DomainPurchaseConsent struct { + // Timestamp when the agreements were accepted. + AgreedAt *time.Time + + // Client IP address. + AgreedBy *string + + // List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under TopLevelDomain + // resource. + AgreementKeys []*string +} + +// DomainRecommendationSearchParameters - Domain recommendation search parameters. +type DomainRecommendationSearchParameters struct { + // Keywords to be used for generating domain recommendations. + Keywords *string + + // Maximum number of recommendations. + MaxDomainRecommendations *int32 +} + +// EnabledConfig - Enabled configuration. +type EnabledConfig struct { + // True if configuration is enabled, false if it is disabled and null if configuration is not set. + Enabled *bool +} + +// EndpointDependency - A domain name that a service is reached at, including details of the current connection status. +type EndpointDependency struct { + // The domain name of the dependency. + DomainName *string + + // The IP Addresses and Ports used when connecting to DomainName. + EndpointDetails []*EndpointDetail +} + +// EndpointDetail - Current TCP connectivity information from the App Service Environment to a single endpoint. +type EndpointDetail struct { + // An IP Address that Domain Name currently resolves to. + IPAddress *string + + // Whether it is possible to create a TCP connection from the App Service Environment to this IpAddress at this Port. + IsAccessible *bool + + // The time in milliseconds it takes for a TCP connection to be created from the App Service Environment to this IpAddress + // at this Port. + Latency *float64 + + // The port an endpoint is connected to. + Port *int32 +} + +// Environment - Description of an App Service Environment. +type Environment struct { + // REQUIRED; Description of the Virtual Network. + VirtualNetwork *VirtualNetworkProfile + + // Custom settings for changing the behavior of the App Service Environment. + ClusterSettings []*NameValuePair + + // Full view of the custom domain suffix configuration for ASEv3. + CustomDNSSuffixConfiguration *CustomDNSSuffixConfiguration + + // DNS suffix of the App Service Environment. + DNSSuffix *string + + // Dedicated Host Count + DedicatedHostCount *int32 + + // Scale factor for front-ends. + FrontEndScaleFactor *int32 + + // Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. + InternalLoadBalancingMode *LoadBalancingMode + + // Number of IP SSL addresses reserved for the App Service Environment. + IpsslAddressCount *int32 + + // Front-end VM size, e.g. "Medium", "Large". + MultiSize *string + + // Full view of networking configuration for an ASE. + NetworkingConfiguration *AseV3NetworkingConfiguration + + // Upgrade Preference + UpgradePreference *UpgradePreference + + // User added ip ranges to whitelist on ASE db + UserWhitelistedIPRanges []*string + + // Whether or not this App Service Environment is zone-redundant. + ZoneRedundant *bool + + // READ-ONLY; Flag that displays whether an ASE has linux workers or not + HasLinuxWorkers *bool + + // READ-ONLY; Maximum number of VMs in the App Service Environment. + MaximumNumberOfMachines *int32 + + // READ-ONLY; Number of front-end instances. + MultiRoleCount *int32 + + // READ-ONLY; Provisioning state of the App Service Environment. + ProvisioningState *ProvisioningState + + // READ-ONLY; Current status of the App Service Environment. + Status *HostingEnvironmentStatus + + // 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 + + // READ-ONLY; Whether an upgrade is available for this App Service Environment. + UpgradeAvailability *UpgradeAvailability +} + +// EnvironmentCollection - Collection of App Service Environments. +type EnvironmentCollection struct { + // REQUIRED; Collection of resources. + Value []*EnvironmentResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// EnvironmentPatchResource - ARM resource for a app service environment. +type EnvironmentPatchResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *Environment + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// EnvironmentResource - App Service Environment ARM resource. +type EnvironmentResource struct { + // REQUIRED; Resource Location. + Location *string + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // Core resource properties + Properties *Environment + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// EnvironmentVar - Container App container environment variable. +type EnvironmentVar struct { + // Environment variable name. + Name *string + + // Name of the Container App secret from which to pull the environment variable value. + SecretRef *string + + // Non-secret environment variable value. + Value *string +} + +type EnvironmentVariable struct { + // REQUIRED; Environment variable name + Name *string + + // REQUIRED; Environment variable value + Value *string +} + +// ErrorEntity - Body of the error response returned from the API. +type ErrorEntity struct { + // Basic error code. + Code *string + + // Error Details. + Details []*ErrorEntity + + // Type of error. + ExtendedCode *string + + // Inner errors. + InnerErrors []*ErrorEntity + + // Any details of the error. + Message *string + + // Message template. + MessageTemplate *string + + // Parameters for the template. + Parameters []*string + + // The error target. + Target *string +} + +// ErrorInfo - The error info. +type ErrorInfo struct { + // REQUIRED; The error code. + Code *string +} + +// ErrorProperties - Error properties indicate why the Logic service was not able to process the incoming request. The reason +// is provided in the error message. +type ErrorProperties struct { + // Error code. + Code *string + + // Error message indicating why the operation failed. + Message *string +} + +// ErrorResponse - Error response indicates Logic service is not able to process the incoming request. The error property +// contains the error details. +type ErrorResponse struct { + // The error properties. + Error *ErrorProperties +} + +// Experiments - Routing rules in production experiments. +type Experiments struct { + // List of ramp-up rules. + RampUpRules []*RampUpRule +} + +// Expression - The expression. +type Expression struct { + // The azure resource error info. + Error *AzureResourceErrorInfo + + // The sub expressions. + Subexpressions []*Expression + + // The text. + Text *string + + // Anything + Value any +} + +// ExpressionRoot - The expression root. +type ExpressionRoot struct { + // The azure resource error info. + Error *AzureResourceErrorInfo + + // The path. + Path *string + + // The sub expressions. + Subexpressions []*Expression + + // The text. + Text *string + + // Anything + Value any +} + +// ExpressionTraces - The expression traces. +type ExpressionTraces struct { + Inputs []*ExpressionRoot + + // The link used to get the next page of recommendations. + NextLink *string + + // Anything + Value any +} + +// ExtendedLocation - Extended Location. +type ExtendedLocation struct { + // Name of extended location. + Name *string + + // READ-ONLY; Type of extended location. + Type *string +} + +// Facebook - The configuration settings of the Facebook provider. +type Facebook struct { + // false if the Facebook provider should not be enabled despite the set registration; otherwise, true. + Enabled *bool + + // The version of the Facebook api to be used while logging in. + GraphAPIVersion *string + + // The configuration settings of the login flow. + Login *LoginScopes + + // The configuration settings of the app registration for the Facebook provider. + Registration *AppRegistration +} + +// FileSystemApplicationLogsConfig - Application logs to file system configuration. +type FileSystemApplicationLogsConfig struct { + // Log level. + Level *LogLevel +} + +// FileSystemHTTPLogsConfig - Http logs to file system configuration. +type FileSystemHTTPLogsConfig struct { + // True if configuration is enabled, false if it is disabled and null if configuration is not set. + Enabled *bool + + // Retention in days. Remove files older than X days. 0 or lower means no retention. + RetentionInDays *int32 + + // Maximum size in megabytes that http log files can use. When reached old log files will be removed to make space for new + // ones. Value can range between 25 and 100. + RetentionInMb *int32 +} + +// FileSystemTokenStore - The configuration settings of the storage of the tokens if a file system is used. +type FileSystemTokenStore struct { + // The directory in which the tokens will be stored. + Directory *string +} + +// FlowAccessControlConfiguration - The access control configuration. +type FlowAccessControlConfiguration struct { + // The access control configuration for workflow actions. + Actions *FlowAccessControlConfigurationPolicy + + // The access control configuration for accessing workflow run contents. + Contents *FlowAccessControlConfigurationPolicy + + // The access control configuration for invoking workflow triggers. + Triggers *FlowAccessControlConfigurationPolicy + + // The access control configuration for workflow management. + WorkflowManagement *FlowAccessControlConfigurationPolicy +} + +// FlowAccessControlConfigurationPolicy - The access control configuration policy. +type FlowAccessControlConfigurationPolicy struct { + // The allowed caller IP address ranges. + AllowedCallerIPAddresses []*IPAddressRange + + // The authentication policies for workflow. + OpenAuthenticationPolicies *OpenAuthenticationAccessPolicies +} + +// FlowEndpoints - The flow endpoints configuration. +type FlowEndpoints struct { + // The access endpoint ip address. + AccessEndpointIPAddresses []*IPAddress + + // The outgoing ip address. + OutgoingIPAddresses []*IPAddress +} + +// FlowEndpointsConfiguration - The endpoints configuration. +type FlowEndpointsConfiguration struct { + // The connector endpoints. + Connector *FlowEndpoints + + // The workflow endpoints. + Workflow *FlowEndpoints +} + +// ForwardProxy - The configuration settings of a forward proxy used to make the requests. +type ForwardProxy struct { + // The convention used to determine the url of the request made. + Convention *ForwardProxyConvention + + // The name of the header containing the host of the request. + CustomHostHeaderName *string + + // The name of the header containing the scheme of the request. + CustomProtoHeaderName *string +} + +type FrontEndConfiguration struct { + Kind *FrontEndServiceType +} + +// FunctionAppConfig - Function app configuration. +type FunctionAppConfig struct { + // Function app deployment configuration. + Deployment *FunctionsDeployment + + // Function app runtime settings. + Runtime *FunctionsRuntime + + // Function app scale and concurrency settings. + ScaleAndConcurrency *FunctionsScaleAndConcurrency +} + +// FunctionAppMajorVersion - Function App stack major version. +type FunctionAppMajorVersion struct { + // READ-ONLY; Function App stack major version (display only). + DisplayText *string + + // READ-ONLY; Minor versions associated with the major version. + MinorVersions []*FunctionAppMinorVersion + + // READ-ONLY; Function App stack major version name. + Value *string +} + +// FunctionAppMinorVersion - Function App stack minor version. +type FunctionAppMinorVersion struct { + // READ-ONLY; Function App stack (display only). + DisplayText *string + + // READ-ONLY; Settings associated with the minor version. + StackSettings *FunctionAppRuntimes + + // READ-ONLY; Function App stack name. + Value *string +} + +// FunctionAppRuntimeSettings - Function App runtime settings. +type FunctionAppRuntimeSettings struct { + // READ-ONLY; Application Insights settings associated with the minor version. + AppInsightsSettings *AppInsightsWebAppStackSettings + + // READ-ONLY; Application settings associated with the minor version. + AppSettingsDictionary map[string]*string + + // READ-ONLY; End-of-life date for the minor version. + EndOfLifeDate *time.Time + + // READ-ONLY; GitHub Actions settings associated with the minor version. + GitHubActionSettings *GitHubActionWebAppStackSettings + + // READ-ONLY; true if the stack version is auto-updated; otherwise, false. + IsAutoUpdate *bool + + // READ-ONLY; true if the minor version the default; otherwise, false. + IsDefault *bool + + // READ-ONLY; true if the stack is deprecated; otherwise, false. + IsDeprecated *bool + + // READ-ONLY; true if the minor version is early-access; otherwise, false. + IsEarlyAccess *bool + + // READ-ONLY; true if the stack should be hidden; otherwise, false. + IsHidden *bool + + // READ-ONLY; true if the stack is in preview; otherwise, false. + IsPreview *bool + + // READ-ONLY; true if remote debugging is supported for the stack; otherwise, false. + RemoteDebuggingSupported *bool + + // READ-ONLY; Function App stack minor version (runtime only). + RuntimeVersion *string + + // READ-ONLY; Configuration settings associated with the minor version. + SiteConfigPropertiesDictionary *SiteConfigPropertiesDictionary + + // READ-ONLY; List of supported Functions extension versions. + SupportedFunctionsExtensionVersions []*string +} + +// FunctionAppRuntimes - Function App stack runtimes. +type FunctionAppRuntimes struct { + // READ-ONLY; Linux-specific settings associated with the minor version. + LinuxRuntimeSettings *FunctionAppRuntimeSettings + + // READ-ONLY; Windows-specific settings associated with the minor version. + WindowsRuntimeSettings *FunctionAppRuntimeSettings +} + +// FunctionAppStack - Function App Stack. +type FunctionAppStack struct { + // Kind of resource. + Kind *string + + // FunctionAppStack resource specific properties + Properties *FunctionAppStackProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Function App stack location. + Location *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// FunctionAppStackCollection - Collection of Function app Stacks +type FunctionAppStackCollection struct { + // REQUIRED; Collection of resources. + Value []*FunctionAppStack + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// FunctionAppStackProperties - FunctionAppStack resource specific properties +type FunctionAppStackProperties struct { + // READ-ONLY; Function App stack (display only). + DisplayText *string + + // READ-ONLY; List of major versions available. + MajorVersions []*FunctionAppMajorVersion + + // READ-ONLY; Function App stack preferred OS. + PreferredOs *StackPreferredOs + + // READ-ONLY; Function App stack name. + Value *string +} + +// FunctionEnvelope - Function information. +type FunctionEnvelope struct { + // Kind of resource. + Kind *string + + // FunctionEnvelope resource specific properties + Properties *FunctionEnvelopeProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// FunctionEnvelopeCollection - Collection of Kudu function information elements. +type FunctionEnvelopeCollection struct { + // REQUIRED; Collection of resources. + Value []*FunctionEnvelope + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// FunctionEnvelopeProperties - FunctionEnvelope resource specific properties +type FunctionEnvelopeProperties struct { + // Config information. + Config any + + // Config URI. + ConfigHref *string + + // File list. + Files map[string]*string + + // Function App ID. + FunctionAppID *string + + // Function URI. + Href *string + + // The invocation URL + InvokeURLTemplate *string + + // Gets or sets a value indicating whether the function is disabled + IsDisabled *bool + + // The function language + Language *string + + // Script URI. + ScriptHref *string + + // Script root path URI. + ScriptRootPathHref *string + + // Secrets file URI. + SecretsFileHref *string + + // Test data used when testing via the Azure Portal. + TestData *string + + // Test data URI. + TestDataHref *string +} + +// FunctionSecrets - Function secrets. +type FunctionSecrets struct { + // Secret key. + Key *string + + // Trigger URL. + TriggerURL *string +} + +// FunctionsAlwaysReadyConfig - Sets the number of 'Always Ready' instances for a function group or a specific function. +type FunctionsAlwaysReadyConfig struct { + // Sets the number of 'Always Ready' instances for a given function group or a specific function. For additional information + // see https://aka.ms/flexconsumption/alwaysready. + InstanceCount *int32 + + // Either a function group or a function name is required. For additional information see https://aka.ms/flexconsumption/alwaysready. + Name *string +} + +// FunctionsDeployment - Configuration section for the function app deployment. +type FunctionsDeployment struct { + // Storage for deployed package used by the function app. + Storage *FunctionsDeploymentStorage +} + +// FunctionsDeploymentStorage - Storage for deployed package used by the function app. +type FunctionsDeploymentStorage struct { + // Authentication method to access the storage account for deployment. + Authentication *FunctionsDeploymentStorageAuthentication + + // Property to select Azure Storage type. Available options: blobContainer. + Type *FunctionsDeploymentStorageType + + // Property to set the URL for the selected Azure Storage type. Example: For blobContainer, the value could be https://.blob.core.windows.net/. + Value *string +} + +// FunctionsDeploymentStorageAuthentication - Authentication method to access the storage account for deployment. +type FunctionsDeploymentStorageAuthentication struct { + // Use this property for StorageAccountConnectionString. Set the name of the app setting that has the storage account connection + // string. Do not set a value for this property when using other + // authentication type. + StorageAccountConnectionStringName *string + + // Property to select authentication type to access the selected storage account. Available options: SystemAssignedIdentity, + // UserAssignedIdentity, StorageAccountConnectionString. + Type *AuthenticationType + + // Use this property for UserAssignedIdentity. Set the resource ID of the identity. Do not set a value for this property when + // using other authentication type. + UserAssignedIdentityResourceID *string +} + +// FunctionsRuntime - Function app runtime name and version. +type FunctionsRuntime struct { + // Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom + Name *RuntimeName + + // Function app runtime version. Example: 8 (for dotnet-isolated) + Version *string +} + +// FunctionsScaleAndConcurrency - Scale and concurrency settings for the function app. +type FunctionsScaleAndConcurrency struct { + // 'Always Ready' configuration for the function app. + AlwaysReady []*FunctionsAlwaysReadyConfig + + // Set the amount of memory allocated to each instance of the function app in MB. CPU and network bandwidth are allocated + // proportionally. + InstanceMemoryMB *int32 + + // The maximum number of instances for the function app. + MaximumInstanceCount *int32 + + // Scale and concurrency settings for the function app triggers. + Triggers *FunctionsScaleAndConcurrencyTriggers +} + +// FunctionsScaleAndConcurrencyTriggers - Scale and concurrency settings for the function app triggers. +type FunctionsScaleAndConcurrencyTriggers struct { + // Scale and concurrency settings for the HTTP trigger. + HTTP *FunctionsScaleAndConcurrencyTriggersHTTP +} + +// FunctionsScaleAndConcurrencyTriggersHTTP - Scale and concurrency settings for the HTTP trigger. +type FunctionsScaleAndConcurrencyTriggersHTTP struct { + // The maximum number of concurrent HTTP trigger invocations per instance. + PerInstanceConcurrency *int32 +} + +// GeoRegion - Geographical region. +type GeoRegion struct { + // Kind of resource. + Kind *string + + // GeoRegion resource specific properties + Properties *GeoRegionProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// GeoRegionCollection - Collection of geographical regions. +type GeoRegionCollection struct { + // REQUIRED; Collection of resources. + Value []*GeoRegion + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// GeoRegionProperties - GeoRegion resource specific properties +type GeoRegionProperties struct { + // READ-ONLY; Region description. + Description *string + + // READ-ONLY; Display name for region. + DisplayName *string + + // READ-ONLY; Display name for region. + OrgDomain *string +} + +// GitHub - The configuration settings of the GitHub provider. +type GitHub struct { + // false if the GitHub provider should not be enabled despite the set registration; otherwise, true. + Enabled *bool + + // The configuration settings of the login flow. + Login *LoginScopes + + // The configuration settings of the app registration for the GitHub provider. + Registration *ClientRegistration +} + +// GitHubActionCodeConfiguration - The GitHub action code configuration. +type GitHubActionCodeConfiguration struct { + // Runtime stack is used to determine the workflow file content for code base apps. + RuntimeStack *string + + // Runtime version is used to determine what build version to set in the workflow file. + RuntimeVersion *string +} + +// GitHubActionConfiguration - The GitHub action configuration. +type GitHubActionConfiguration struct { + // GitHub Action code configuration. + CodeConfiguration *GitHubActionCodeConfiguration + + // GitHub Action container configuration. + ContainerConfiguration *GitHubActionContainerConfiguration + + // Workflow option to determine whether the workflow file should be generated and written to the repository. + GenerateWorkflowFile *bool + + // This will help determine the workflow configuration to select. + IsLinux *bool +} + +// GitHubActionContainerConfiguration - The GitHub action container configuration. +type GitHubActionContainerConfiguration struct { + // The image name for the build. + ImageName *string + + // The password used to upload the image to the container registry. + Password *string + + // The server URL for the container registry where the build will be hosted. + ServerURL *string + + // The username used to upload the image to the container registry. + Username *string +} + +// GitHubActionWebAppStackSettings - GitHub Actions Web App stack settings. +type GitHubActionWebAppStackSettings struct { + // READ-ONLY; true if GitHub Actions is supported for the stack; otherwise, false. + IsSupported *bool + + // READ-ONLY; The minor version that is supported for GitHub Actions. + SupportedVersion *string +} + +// GithubToken - Github access token for Appservice CLI github integration. +type GithubToken struct { + // Github access token for Appservice CLI github integration + AccessToken *string + + // Error message if unable to get token + ErrorMessage *string + + // True if valid github token received, False otherwise + GotToken *bool + + // Scope of the github access token + Scope *string + + // token type + TokenType *string +} + +// GithubTokenRequest - Appservice Github token request content. +type GithubTokenRequest struct { + // REQUIRED; Code string to exchange for Github Access token + Code *string + + // REQUIRED; State string used for verification. + State *string +} + +// GlobalCsmSKUDescription - A Global SKU Description. +type GlobalCsmSKUDescription struct { + // Capabilities of the SKU, e.g., is traffic manager enabled? + Capabilities []*Capability + + // Min, max, and default scale values of the SKU. + Capacity *SKUCapacity + + // Family code of the resource SKU. + Family *string + + // Locations of the SKU. + Locations []*string + + // Name of the resource SKU. + Name *string + + // Size specifier of the resource SKU. + Size *string + + // Service Tier of the resource SKU. + Tier *string +} + +// GlobalValidation - The configuration settings that determines the validation flow of users using App Service Authentication/Authorization. +type GlobalValidation struct { + // The paths for which unauthenticated flow would not be redirected to the login page. + ExcludedPaths []*string + + // 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". + RedirectToProvider *string + + // true if the authentication flow is required any request is made; otherwise, false. + RequireAuthentication *bool + + // The action to take when an unauthenticated client attempts to access the app. + UnauthenticatedClientAction *UnauthenticatedClientActionV2 +} + +// Google - The configuration settings of the Google provider. +type Google struct { + // false if the Google provider should not be enabled despite the set registration; otherwise, true. + Enabled *bool + + // The configuration settings of the login flow. + Login *LoginScopes + + // The configuration settings of the app registration for the Google provider. + Registration *ClientRegistration + + // The configuration settings of the Azure Active Directory token validation flow. + Validation *AllowedAudiencesValidation +} + +// HTTPLogsConfig - Http logs configuration. +type HTTPLogsConfig struct { + // Http logs to azure blob storage configuration. + AzureBlobStorage *AzureBlobStorageHTTPLogsConfig + + // Http logs to file system configuration. + FileSystem *FileSystemHTTPLogsConfig +} + +// HTTPScaleRule - Container App container Custom scaling rule. +type HTTPScaleRule struct { + // Authentication secrets for the custom scale rule. + Auth []*ScaleRuleAuth + + // Metadata properties to describe http scale rule. + Metadata map[string]*string +} + +// HTTPSettings - The configuration settings of the HTTP requests for authentication and authorization requests made against +// App Service Authentication/Authorization. +type HTTPSettings struct { + // The configuration settings of a forward proxy used to make the requests. + ForwardProxy *ForwardProxy + + // false if the authentication/authorization responses not having the HTTPS scheme are permissible; otherwise, true. + RequireHTTPS *bool + + // The configuration settings of the paths HTTP requests. + Routes *HTTPSettingsRoutes +} + +// HTTPSettingsRoutes - The configuration settings of the paths HTTP requests. +type HTTPSettingsRoutes struct { + // The prefix that should precede all the authentication/authorization paths. + APIPrefix *string +} + +// 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 +// extension. +type HandlerMapping struct { + // Command-line arguments to be passed to the script processor. + Arguments *string + + // Requests with this extension will be handled using the specified FastCGI application. + Extension *string + + // The absolute path to the FastCGI application. + ScriptProcessor *string +} + +// HostKeys - Functions host level keys. +type HostKeys struct { + // Host level function keys. + FunctionKeys map[string]*string + + // Secret key. + MasterKey *string + + // System keys. + SystemKeys map[string]*string +} + +// HostName - Details of a hostname derived from a domain. +type HostName struct { + // Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic + // Manager name otherwise it will be the app name. + AzureResourceName *string + + // Type of the Azure resource the hostname is assigned to. + AzureResourceType *AzureResourceType + + // Type of the DNS record. + CustomHostNameDNSRecordType *CustomHostNameDNSRecordType + + // Type of the hostname. + HostNameType *HostNameType + + // Name of the hostname. + Name *string + + // List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic + // Manager. + SiteNames []*string +} + +// HostNameBinding - A hostname binding object. +type HostNameBinding struct { + // Kind of resource. + Kind *string + + // HostNameBinding resource specific properties + Properties *HostNameBindingProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// HostNameBindingCollection - Collection of hostname bindings. +type HostNameBindingCollection struct { + // REQUIRED; Collection of resources. + Value []*HostNameBinding + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// HostNameBindingProperties - HostNameBinding resource specific properties +type HostNameBindingProperties struct { + // Azure resource name. + AzureResourceName *string + + // Azure resource type. + AzureResourceType *AzureResourceType + + // Custom DNS record type. + CustomHostNameDNSRecordType *CustomHostNameDNSRecordType + + // Fully qualified ARM domain resource URI. + DomainID *string + + // Hostname type. + HostNameType *HostNameType + + // SSL type + SSLState *SSLState + + // App Service app name. + SiteName *string + + // SSL certificate thumbprint + Thumbprint *string + + // READ-ONLY; Virtual IP address assigned to the hostname if IP based SSL is enabled. + VirtualIP *string +} + +// HostNameSSLState - SSL-enabled hostname. +type HostNameSSLState struct { + // Indicates whether the hostname is a standard or repository hostname. + HostType *HostType + + // Hostname. + Name *string + + // SSL type. + SSLState *SSLState + + // SSL certificate thumbprint. + Thumbprint *string + + // Set to true to update existing hostname. + ToUpdate *bool + + // Virtual IP address assigned to the hostname if IP based SSL is enabled. + VirtualIP *string +} + +// HostingEnvironmentDeploymentInfo - Information needed to create resources on an App Service Environment. +type HostingEnvironmentDeploymentInfo struct { + // Location of the App Service Environment. + Location *string + + // Name of the App Service Environment. + Name *string +} + +// HostingEnvironmentDiagnostics - Diagnostics for an App Service Environment. +type HostingEnvironmentDiagnostics struct { + // Diagnostics output. + DiagnosticsOutput *string + + // Name/identifier of the diagnostics. + Name *string +} + +// HostingEnvironmentProfile - Specification for an App Service Environment to use for this resource. +type HostingEnvironmentProfile struct { + // Resource ID of the App Service Environment. + ID *string + + // READ-ONLY; Name of the App Service Environment. + Name *string + + // READ-ONLY; Resource type of the App Service Environment. + Type *string +} + +// HybridConnection - Hybrid Connection contract. This is used to configure a Hybrid Connection. +type HybridConnection struct { + // Kind of resource. + Kind *string + + // HybridConnection resource specific properties + Properties *HybridConnectionProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// HybridConnectionCollection - Collection of hostname bindings. +type HybridConnectionCollection struct { + // REQUIRED; Collection of resources. + Value []*HybridConnection + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// HybridConnectionKey - Hybrid Connection key contract. This has the send key name and value for a Hybrid Connection. +type HybridConnectionKey struct { + // Kind of resource. + Kind *string + + // HybridConnectionKey resource specific properties + Properties *HybridConnectionKeyProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// HybridConnectionKeyProperties - HybridConnectionKey resource specific properties +type HybridConnectionKeyProperties struct { + // READ-ONLY; The name of the send key. + SendKeyName *string + + // READ-ONLY; The value of the send key. + SendKeyValue *string +} + +// HybridConnectionLimits - Hybrid Connection limits contract. This is used to return the plan limits of Hybrid Connections. +type HybridConnectionLimits struct { + // Kind of resource. + Kind *string + + // HybridConnectionLimits resource specific properties + Properties *HybridConnectionLimitsProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// HybridConnectionLimitsProperties - HybridConnectionLimits resource specific properties +type HybridConnectionLimitsProperties struct { + // READ-ONLY; The current number of Hybrid Connections. + Current *int32 + + // READ-ONLY; The maximum number of Hybrid Connections allowed. + Maximum *int32 +} + +// HybridConnectionProperties - HybridConnection resource specific properties +type HybridConnectionProperties struct { + // The hostname of the endpoint. + Hostname *string + + // The port of the endpoint. + Port *int32 + + // The ARM URI to the Service Bus relay. + RelayArmURI *string + + // The name of the Service Bus relay. + RelayName *string + + // The name of the Service Bus key which has Send permissions. This is used to authenticate to Service Bus. + SendKeyName *string + + // The value of the Service Bus key. This is used to authenticate to Service Bus. In ARM this key will not be returned normally, + // use the POST /listKeys API instead. + SendKeyValue *string + + // The name of the Service Bus namespace. + ServiceBusNamespace *string + + // The suffix for the service bus endpoint. By default this is .servicebus.windows.net + ServiceBusSuffix *string +} + +// IPAddress - The ip address. +type IPAddress struct { + // The address. + Address *string +} + +// IPAddressRange - The ip address range. +type IPAddressRange struct { + // The IP address range. + AddressRange *string +} + +// IPSecurityRestriction - IP security restriction on an app. +type IPSecurityRestriction struct { + // Allow or Deny access for this IP range. + Action *string + + // IP restriction rule description. + Description *string + + // 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 + + // 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 + + // IP restriction rule name. + Name *string + + // Priority of IP restriction rule. + Priority *int32 + + // Subnet mask for the range of IP addresses the restriction is valid for. + SubnetMask *string + + // (internal) Subnet traffic tag + SubnetTrafficTag *int32 + + // Defines what this IP filter will be used for. This is to support IP filtering on proxies. + Tag *IPFilterTag + + // Virtual network resource id + VnetSubnetResourceID *string + + // (internal) Vnet traffic tag + VnetTrafficTag *int32 +} + +// Identifier - A domain specific resource identifier. +type Identifier struct { + // Kind of resource. + Kind *string + + // Identifier resource specific properties + Properties *IdentifierProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// IdentifierCollection - Collection of identifiers. +type IdentifierCollection struct { + // REQUIRED; Collection of resources. + Value []*Identifier + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// IdentifierProperties - Identifier resource specific properties +type IdentifierProperties struct { + // String representation of the identity. + Value *string +} + +// IdentityProviders - The configuration settings of each of the identity providers used to configure App Service Authentication/Authorization. +type IdentityProviders struct { + // The configuration settings of the Apple provider. + Apple *Apple + + // The configuration settings of the Azure Active directory provider. + AzureActiveDirectory *AzureActiveDirectory + + // The configuration settings of the Azure Static Web Apps provider. + AzureStaticWebApps *AzureStaticWebApps + + // The map of the name of the alias of each custom Open ID Connect provider to the configuration settings of the custom Open + // ID Connect provider. + CustomOpenIDConnectProviders map[string]*CustomOpenIDConnectProvider + + // The configuration settings of the Facebook provider. + Facebook *Facebook + + // The configuration settings of the GitHub provider. + GitHub *GitHub + + // The configuration settings of the Google provider. + Google *Google + + // The configuration settings of the legacy Microsoft Account provider. + LegacyMicrosoftAccount *LegacyMicrosoftAccount + + // The configuration settings of the Twitter provider. + Twitter *Twitter +} + +// InboundEnvironmentEndpoint - The IP Addresses and Ports that require inbound network access to and within the subnet of +// the App Service Environment. +type InboundEnvironmentEndpoint struct { + // Short text describing the purpose of the network traffic. + Description *string + + // The IP addresses that network traffic will originate from in cidr notation. + Endpoints []*string + + // The ports that network traffic will arrive to the App Service Environment at. + Ports []*string +} + +// InboundEnvironmentEndpointCollection - Collection of Inbound Environment Endpoints +type InboundEnvironmentEndpointCollection struct { + // REQUIRED; Collection of resources. + Value []*InboundEnvironmentEndpoint + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// Ingress - Container App Ingress configuration. +type Ingress struct { + // Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS + // connections + AllowInsecure *bool + + // Bool indicating if app exposes an external http endpoint + External *bool + + // Target Port in containers for traffic from ingress + TargetPort *int32 + Traffic []*TrafficWeight + + // Ingress transport protocol + Transport *IngressTransportMethod + + // READ-ONLY; Hostname. + Fqdn *string +} + +// JSONSchema - The JSON schema. +type JSONSchema struct { + // The JSON content. + Content *string + + // The JSON title. + Title *string +} + +// JwtClaimChecks - The configuration settings of the checks that should be made while validating the JWT Claims. +type JwtClaimChecks struct { + // The list of the allowed client applications. + AllowedClientApplications []*string + + // The list of the allowed groups. + AllowedGroups []*string +} + +// KeyInfo - Function key info. +type KeyInfo struct { + // Key name + Name *string + + // Key value + Value *string +} + +type KeyValuePairStringObject struct { + // READ-ONLY + Key *string + + // READ-ONLY; Anything + Value any +} + +// KubeEnvironment - A Kubernetes cluster specialized for web workloads by Azure App Service +type KubeEnvironment struct { + // REQUIRED; Resource Location. + Location *string + + // Extended Location. + ExtendedLocation *ExtendedLocation + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // KubeEnvironment resource specific properties + Properties *KubeEnvironmentProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// KubeEnvironmentCollection - Collection of Kubernetes Environments +type KubeEnvironmentCollection struct { + // REQUIRED; Collection of resources. + Value []*KubeEnvironment + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// KubeEnvironmentPatchResource - ARM resource for a KubeEnvironment when patching +type KubeEnvironmentPatchResource struct { + // Kind of resource. + Kind *string + + // KubeEnvironmentPatchResource resource specific properties + Properties *KubeEnvironmentPatchResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// KubeEnvironmentPatchResourceProperties - KubeEnvironmentPatchResource resource specific properties +type KubeEnvironmentPatchResourceProperties struct { + AksResourceID *string + + // Cluster configuration which enables the log daemon to export app logs to a destination. Currently only "log-analytics" + // is supported + AppLogsConfiguration *AppLogsConfiguration + + // Cluster configuration which determines the ARC cluster components types. Eg: Choosing between BuildService kind, FrontEnd + // Service ArtifactsStorageType etc. + ArcConfiguration *ArcConfiguration + + // Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration + ContainerAppsConfiguration *ContainerAppsConfiguration + + // Only visible within Vnet/Subnet + InternalLoadBalancerEnabled *bool + + // Static IP of the KubeEnvironment + StaticIP *string + + // READ-ONLY; Default Domain Name for the cluster + DefaultDomain *string + + // READ-ONLY; Any errors that occurred during deployment or deployment validation + DeploymentErrors *string + + // READ-ONLY; Provisioning state of the Kubernetes Environment. + ProvisioningState *KubeEnvironmentProvisioningState +} + +// KubeEnvironmentProfile - Specification for a Kubernetes Environment to use for this resource. +type KubeEnvironmentProfile struct { + // Resource ID of the Kubernetes Environment. + ID *string + + // READ-ONLY; Name of the Kubernetes Environment. + Name *string + + // READ-ONLY; Resource type of the Kubernetes Environment. + Type *string +} + +// KubeEnvironmentProperties - KubeEnvironment resource specific properties +type KubeEnvironmentProperties struct { + AksResourceID *string + + // Cluster configuration which enables the log daemon to export app logs to a destination. Currently only "log-analytics" + // is supported + AppLogsConfiguration *AppLogsConfiguration + + // Cluster configuration which determines the ARC cluster components types. Eg: Choosing between BuildService kind, FrontEnd + // Service ArtifactsStorageType etc. + ArcConfiguration *ArcConfiguration + + // Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration + ContainerAppsConfiguration *ContainerAppsConfiguration + + // Type of Kubernetes Environment. Only supported for Container App Environments with value as Managed + EnvironmentType *string + + // Only visible within Vnet/Subnet + InternalLoadBalancerEnabled *bool + + // Static IP of the KubeEnvironment + StaticIP *string + + // READ-ONLY; Default Domain Name for the cluster + DefaultDomain *string + + // READ-ONLY; Any errors that occurred during deployment or deployment validation + DeploymentErrors *string + + // READ-ONLY; Provisioning state of the Kubernetes Environment. + ProvisioningState *KubeEnvironmentProvisioningState +} + +// LegacyMicrosoftAccount - The configuration settings of the legacy Microsoft Account provider. +type LegacyMicrosoftAccount struct { + // false if the legacy Microsoft Account provider should not be enabled despite the set registration; otherwise, true. + Enabled *bool + + // The configuration settings of the login flow. + Login *LoginScopes + + // The configuration settings of the app registration for the legacy Microsoft Account provider. + Registration *ClientRegistration + + // The configuration settings of the legacy Microsoft Account provider token validation flow. + Validation *AllowedAudiencesValidation +} + +// LinuxJavaContainerSettings - Linux Java Container settings. +type LinuxJavaContainerSettings struct { + // READ-ONLY; End-of-life date for the minor version. + EndOfLifeDate *time.Time + + // READ-ONLY; true if the stack version is auto-updated; otherwise, false. + IsAutoUpdate *bool + + // READ-ONLY; true if the stack is deprecated; otherwise, false. + IsDeprecated *bool + + // READ-ONLY; true if the minor version is early-access; otherwise, false. + IsEarlyAccess *bool + + // READ-ONLY; true if the stack should be hidden; otherwise, false. + IsHidden *bool + + // READ-ONLY; true if the stack is in preview; otherwise, false. + IsPreview *bool + + // READ-ONLY; Java 11 version (runtime only). + Java11Runtime *string + + // READ-ONLY; Java 8 version (runtime only). + Java8Runtime *string +} + +// LocalizableString - Localizable string object containing the name and a localized value. +type LocalizableString struct { + // Localized name. + LocalizedValue *string + + // Non-localized name. + Value *string +} + +type LogAnalyticsConfiguration struct { + CustomerID *string + SharedKey *string +} + +// LogSpecification - Log Definition of a single resource metric. +type LogSpecification struct { + BlobDuration *string + DisplayName *string + LogFilterPattern *string + Name *string +} + +// Login - The configuration settings of the login flow of users using App Service Authentication/Authorization. +type Login struct { + // 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 + + // The configuration settings of the session cookie's expiration. + CookieExpiration *CookieExpiration + + // The configuration settings of the nonce used in the login flow. + Nonce *Nonce + + // true if the fragments from the request are preserved after the login request is made; otherwise, false. + PreserveURLFragmentsForLogins *bool + + // The routes that specify the endpoints used for login and logout requests. + Routes *LoginRoutes + + // The configuration settings of the token store. + TokenStore *TokenStore +} + +// LoginRoutes - The routes that specify the endpoints used for login and logout requests. +type LoginRoutes struct { + // The endpoint at which a logout request should be made. + LogoutEndpoint *string +} + +// LoginScopes - The configuration settings of the login flow, including the scopes that should be requested. +type LoginScopes struct { + // A list of the scopes that should be requested while authenticating. + Scopes []*string +} + +// MSDeploy ARM PUT information +type MSDeploy struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *MSDeployCore + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// MSDeployCore - MSDeploy ARM PUT core information +type MSDeployCore struct { + // Sets the AppOffline rule while the MSDeploy operation executes. Setting is false by default. + AppOffline *bool + + // SQL Connection String + ConnectionString *string + + // Database Type + DbType *string + + // Package URI + PackageURI *string + + // MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + SetParameters map[string]*string + + // URI of MSDeploy Parameters file. Must not be set if SetParameters is used. + SetParametersXMLFileURI *string + + // Controls whether the MSDeploy operation skips the AppData directory. If set to true, the existing AppData directory on + // the destination will not be deleted, and any App_Data directory in the source + // will be ignored. Setting is false by default. + SkipAppData *bool +} + +// MSDeployLog - MSDeploy log +type MSDeployLog struct { + // Kind of resource. + Kind *string + + // MSDeployLog resource specific properties + Properties *MSDeployLogProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// MSDeployLogEntry - MSDeploy log entry +type MSDeployLogEntry struct { + // READ-ONLY; Log entry message + Message *string + + // READ-ONLY; Timestamp of log entry + Time *time.Time + + // READ-ONLY; Log entry type + Type *MSDeployLogEntryType +} + +// MSDeployLogProperties - MSDeployLog resource specific properties +type MSDeployLogProperties struct { + // READ-ONLY; List of log entry messages + Entries []*MSDeployLogEntry +} + +// MSDeployStatus - MSDeploy ARM response +type MSDeployStatus struct { + // Kind of resource. + Kind *string + + // MSDeployStatus resource specific properties + Properties *MSDeployStatusProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// MSDeployStatusProperties - MSDeployStatus resource specific properties +type MSDeployStatusProperties struct { + // READ-ONLY; Whether the deployment operation has completed + Complete *bool + + // READ-ONLY; Username of deployer + Deployer *string + + // READ-ONLY; End time of deploy operation + EndTime *time.Time + + // READ-ONLY; Provisioning state + ProvisioningState *MSDeployProvisioningState + + // READ-ONLY; Start time of deploy operation + StartTime *time.Time +} + +// ManagedServiceIdentity - Managed service identity. +type ManagedServiceIdentity struct { + // Type of managed service identity. + Type *ManagedServiceIdentityType + + // 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 + + // READ-ONLY; Principal Id of managed service identity. + PrincipalID *string + + // READ-ONLY; Tenant of managed service identity. + TenantID *string +} + +// MetricAvailability - Retention policy of a resource metric. +type MetricAvailability struct { + BlobDuration *string + TimeGrain *string +} + +// MetricSpecification - Definition of a single resource metric. +type MetricSpecification struct { + AggregationType *string + Availabilities []*MetricAvailability + Category *string + Dimensions []*Dimension + DisplayDescription *string + DisplayName *string + EnableRegionalMdmAccount *bool + FillGapWithZero *bool + IsInternal *bool + MetricFilterPattern *string + Name *string + SourceMdmAccount *string + SourceMdmNamespace *string + SupportedAggregationTypes []*string + SupportedTimeGrainTypes []*string + SupportsInstanceLevelAggregation *bool + Unit *string +} + +// MigrateMySQLRequest - MySQL migration request. +type MigrateMySQLRequest struct { + // Kind of resource. + Kind *string + + // MigrateMySqlRequest resource specific properties + Properties *MigrateMySQLRequestProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// MigrateMySQLRequestProperties - MigrateMySqlRequest resource specific properties +type MigrateMySQLRequestProperties struct { + // REQUIRED; Connection string to the remote MySQL database. + ConnectionString *string + + // REQUIRED; The type of migration operation to be done + MigrationType *MySQLMigrationType +} + +// MigrateMySQLStatus - MySQL migration status. +type MigrateMySQLStatus struct { + // Kind of resource. + Kind *string + + // MigrateMySqlStatus resource specific properties + Properties *MigrateMySQLStatusProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// MigrateMySQLStatusProperties - MigrateMySqlStatus resource specific properties +type MigrateMySQLStatusProperties struct { + // READ-ONLY; True if the web app has in app MySql enabled + LocalMySQLEnabled *bool + + // READ-ONLY; Status of the migration task. + MigrationOperationStatus *OperationStatus + + // READ-ONLY; Operation ID for the migration task. + OperationID *string +} + +// NameIdentifier - Identifies an object. +type NameIdentifier struct { + // Name of the object. + Name *string +} + +// NameIdentifierCollection - Collection of domain name identifiers. +type NameIdentifierCollection struct { + // REQUIRED; Collection of resources. + Value []*NameIdentifier + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// NameValuePair - Name value pair. +type NameValuePair struct { + // Pair name. + Name *string + + // Pair value. + Value *string +} + +// NetworkFeatures - Full view of network features for an app (presently VNET integration and Hybrid Connections). +type NetworkFeatures struct { + // Kind of resource. + Kind *string + + // NetworkFeatures resource specific properties + Properties *NetworkFeaturesProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// NetworkFeaturesProperties - NetworkFeatures resource specific properties +type NetworkFeaturesProperties struct { + // READ-ONLY; The Hybrid Connections summary view. + HybridConnections []*RelayServiceConnectionEntity + + // READ-ONLY; The Hybrid Connection V2 (Service Bus) view. + HybridConnectionsV2 []*HybridConnection + + // READ-ONLY; The Virtual Network summary view. + VirtualNetworkConnection *VnetInfo + + // READ-ONLY; The Virtual Network name. + VirtualNetworkName *string +} + +// NetworkTrace - Network trace +type NetworkTrace struct { + // Detailed message of a network trace operation, e.g. error message in case of failure. + Message *string + + // Local file path for the captured network trace file. + Path *string + + // Current status of the network trace operation, same as Operation.Status (InProgress/Succeeded/Failed). + Status *string +} + +// Nonce - The configuration settings of the nonce used in the login flow. +type Nonce struct { + // The time after the request is made when the nonce should expire. + NonceExpirationInterval *string + + // false if the nonce should not be validated while completing the login flow; otherwise, true. + ValidateNonce *bool +} + +// OpenAuthenticationAccessPolicies - AuthenticationPolicy of type Open. +type OpenAuthenticationAccessPolicies struct { + // Open authentication policies. + Policies map[string]*OpenAuthenticationAccessPolicy +} + +// OpenAuthenticationAccessPolicy - Open authentication access policy defined by user. +type OpenAuthenticationAccessPolicy struct { + // The access policy claims. + Claims []*OpenAuthenticationPolicyClaim + + // Type of provider for OAuth. + Type *OpenAuthenticationProviderType +} + +// OpenAuthenticationPolicyClaim - Open authentication policy claim. +type OpenAuthenticationPolicyClaim struct { + // The name of the claim. + Name *string + + // The value of the claim. + Value *string +} + +// OpenIDConnectClientCredential - The authentication client credentials of the custom Open ID Connect provider. +type OpenIDConnectClientCredential struct { + // The app setting that contains the client secret for the custom Open ID Connect provider. + ClientSecretSettingName *string + + // The method that should be used to authenticate the user. + Method *string +} + +// OpenIDConnectConfig - The configuration settings of the endpoints used for the custom Open ID Connect provider. +type OpenIDConnectConfig struct { + // The endpoint to be used to make an authorization request. + AuthorizationEndpoint *string + + // The endpoint that provides the keys necessary to validate the token. + CertificationURI *string + + // The endpoint that issues the token. + Issuer *string + + // The endpoint to be used to request a token. + TokenEndpoint *string + + // The endpoint that contains all the configuration endpoints for the provider. + WellKnownOpenIDConfiguration *string +} + +// OpenIDConnectLogin - The configuration settings of the login flow of the custom Open ID Connect provider. +type OpenIDConnectLogin struct { + // The name of the claim that contains the users name. + NameClaimType *string + + // A list of the scopes that should be requested while authenticating. + Scopes []*string +} + +// OpenIDConnectRegistration - The configuration settings of the app registration for the custom Open ID Connect provider. +type OpenIDConnectRegistration struct { + // The authentication credentials of the custom Open ID Connect provider. + ClientCredential *OpenIDConnectClientCredential + + // The client id of the custom Open ID Connect provider. + ClientID *string + + // The configuration settings of the endpoints used for the custom Open ID Connect provider. + OpenIDConnectConfiguration *OpenIDConnectConfig +} + +// Operation - An operation on a resource. +type Operation struct { + // Time when operation has started. + CreatedTime *time.Time + + // Any errors associate with the operation. + Errors []*ErrorEntity + + // Time when operation will expire. + ExpirationTime *time.Time + + // Applicable only for stamp operation ids. + GeoMasterOperationID *string + + // Operation ID. + ID *string + + // Time when operation has been updated. + ModifiedTime *time.Time + + // Operation name. + Name *string + + // The current status of the operation. + Status *OperationStatus +} + +// OperationResult - The operation result definition. +type OperationResult struct { + // The workflow scope repetition code. + Code *string + + // The correlation properties. + Correlation *RunActionCorrelation + + // The end time of the workflow scope repetition. + EndTime *time.Time + + // Anything + Error any + IterationCount *int32 + + // Gets the retry histories. + RetryHistory []*RetryHistory + + // The start time of the workflow scope repetition. + StartTime *time.Time + + // The status of the workflow scope repetition. + Status *WorkflowStatus + + // READ-ONLY; Gets the inputs. + Inputs any + + // READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink + + // READ-ONLY; Gets the outputs. + Outputs any + + // READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink + + // READ-ONLY; Gets the tracked properties. + TrackedProperties any + + // READ-ONLY; Gets the tracking id. + TrackingID *string +} + +// OperationResultProperties - The run operation result properties. +type OperationResultProperties struct { + // The workflow scope repetition code. + Code *string + + // The correlation properties. + Correlation *RunActionCorrelation + + // The end time of the workflow scope repetition. + EndTime *time.Time + + // Anything + Error any + + // The start time of the workflow scope repetition. + StartTime *time.Time + + // The status of the workflow scope repetition. + Status *WorkflowStatus +} + +// OutboundEnvironmentEndpoint - Endpoints accessed for a common purpose that the App Service Environment requires outbound +// network access to. +type OutboundEnvironmentEndpoint struct { + // The type of service accessed by the App Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active + // Directory. + Category *string + + // The endpoints that the App Service Environment reaches the service at. + Endpoints []*EndpointDependency +} + +// OutboundEnvironmentEndpointCollection - Collection of Outbound Environment Endpoints +type OutboundEnvironmentEndpointCollection struct { + // REQUIRED; Collection of resources. + Value []*OutboundEnvironmentEndpoint + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// PerfMonCounterCollection - Collection of performance monitor counters. +type PerfMonCounterCollection struct { + // REQUIRED; Collection of resources. + Value []*PerfMonResponse + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// PerfMonResponse - Performance monitor API response. +type PerfMonResponse struct { + // The response code. + Code *string + + // The performance monitor counters. + Data *PerfMonSet + + // The message. + Message *string +} + +// PerfMonSample - Performance monitor sample in a set. +type PerfMonSample struct { + // Name of the server on which the measurement is made. + InstanceName *string + + // Point in time for which counter was measured. + Time *time.Time + + // Value of counter at a certain time. + Value *float64 +} + +// PerfMonSet - Metric information. +type PerfMonSet struct { + // End time of the period. + EndTime *time.Time + + // Unique key name of the counter. + Name *string + + // Start time of the period. + StartTime *time.Time + + // Presented time grain. + TimeGrain *string + + // Collection of workers that are active during this time. + Values []*PerfMonSample +} + +// Plan - App Service plan. +type Plan struct { + // REQUIRED; Resource Location. + Location *string + + // Extended Location. + ExtendedLocation *ExtendedLocation + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // AppServicePlan resource specific properties + Properties *PlanProperties + + // Description of a SKU for a scalable resource. + SKU *SKUDescription + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PlanCollection - Collection of App Service plans. +type PlanCollection struct { + // REQUIRED; Collection of resources. + Value []*Plan + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// PlanPatchResource - ARM resource for a app service plan. +type PlanPatchResource struct { + // Kind of resource. + Kind *string + + // AppServicePlanPatchResource resource specific properties + Properties *PlanPatchResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PlanPatchResourceProperties - AppServicePlanPatchResource resource specific properties +type PlanPatchResourceProperties struct { + // ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku + ElasticScaleEnabled *bool + + // The time when the server farm free offer expires. + FreeOfferExpirationTime *time.Time + + // Specification for the App Service Environment to use for the App Service plan. + HostingEnvironmentProfile *HostingEnvironmentProfile + + // If Hyper-V container app service plan true, false otherwise. + HyperV *bool + + // If true, this App Service Plan owns spot instances. + IsSpot *bool + + // Obsolete: If Hyper-V container app service plan true, false otherwise. + IsXenon *bool + + // Specification for the Kubernetes Environment to use for the App Service plan. + KubeEnvironmentProfile *KubeEnvironmentProfile + + // Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan + MaximumElasticWorkerCount *int32 + + // 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 + + // If Linux app service plan true, false otherwise. + Reserved *bool + + // The time when the server farm expires. Valid only if it is a spot server farm. + SpotExpirationTime *time.Time + + // Scaling worker count. + TargetWorkerCount *int32 + + // Scaling worker size ID. + TargetWorkerSizeID *int32 + + // Target worker tier assigned to the App Service plan. + WorkerTierName *string + + // 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 + + // READ-ONLY; Geographical location for the App Service plan. + GeoRegion *string + + // READ-ONLY; Maximum number of instances that can be assigned to this App Service plan. + MaximumNumberOfWorkers *int32 + + // READ-ONLY; Number of apps assigned to this App Service plan. + NumberOfSites *int32 + + // READ-ONLY; The number of instances that are assigned to this App Service plan. + NumberOfWorkers *int32 + + // READ-ONLY; Provisioning state of the App Service Plan. + ProvisioningState *ProvisioningState + + // READ-ONLY; Resource group of the App Service plan. + ResourceGroup *string + + // READ-ONLY; App Service plan status. + Status *StatusOptions + + // READ-ONLY; App Service plan subscription. + Subscription *string +} + +// PlanProperties - AppServicePlan resource specific properties +type PlanProperties struct { + // ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku + ElasticScaleEnabled *bool + + // The time when the server farm free offer expires. + FreeOfferExpirationTime *time.Time + + // Specification for the App Service Environment to use for the App Service plan. + HostingEnvironmentProfile *HostingEnvironmentProfile + + // If Hyper-V container app service plan true, false otherwise. + HyperV *bool + + // If true, this App Service Plan owns spot instances. + IsSpot *bool + + // Obsolete: If Hyper-V container app service plan true, false otherwise. + IsXenon *bool + + // Specification for the Kubernetes Environment to use for the App Service plan. + KubeEnvironmentProfile *KubeEnvironmentProfile + + // Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan + MaximumElasticWorkerCount *int32 + + // 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 + + // If Linux app service plan true, false otherwise. + Reserved *bool + + // The time when the server farm expires. Valid only if it is a spot server farm. + SpotExpirationTime *time.Time + + // Scaling worker count. + TargetWorkerCount *int32 + + // Scaling worker size ID. + TargetWorkerSizeID *int32 + + // Target worker tier assigned to the App Service plan. + WorkerTierName *string + + // 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 + + // READ-ONLY; Geographical location for the App Service plan. + GeoRegion *string + + // READ-ONLY; Maximum number of instances that can be assigned to this App Service plan. + MaximumNumberOfWorkers *int32 + + // READ-ONLY; Number of apps assigned to this App Service plan. + NumberOfSites *int32 + + // READ-ONLY; The number of instances that are assigned to this App Service plan. + NumberOfWorkers *int32 + + // READ-ONLY; Provisioning state of the App Service Plan. + ProvisioningState *ProvisioningState + + // READ-ONLY; Resource group of the App Service plan. + ResourceGroup *string + + // READ-ONLY; App Service plan status. + Status *StatusOptions + + // READ-ONLY; App Service plan subscription. + Subscription *string +} + +// PremierAddOn - Premier add-on. +type PremierAddOn struct { + // REQUIRED; Resource Location. + Location *string + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // PremierAddOn resource specific properties + Properties *PremierAddOnProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PremierAddOnOffer - Premier add-on offer. +type PremierAddOnOffer struct { + // Kind of resource. + Kind *string + + // PremierAddOnOffer resource specific properties + Properties *PremierAddOnOfferProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PremierAddOnOfferCollection - Collection of premier add-on offers. +type PremierAddOnOfferCollection struct { + // REQUIRED; Collection of resources. + Value []*PremierAddOnOffer + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// PremierAddOnOfferProperties - PremierAddOnOffer resource specific properties +type PremierAddOnOfferProperties struct { + // Legal terms URL. + LegalTermsURL *string + + // Marketplace offer. + MarketplaceOffer *string + + // Marketplace publisher. + MarketplacePublisher *string + + // Privacy policy URL. + PrivacyPolicyURL *string + + // Premier add on offer Product. + Product *string + + // true if promotion code is required; otherwise, false. + PromoCodeRequired *bool + + // Premier add on offer Quota. + Quota *int32 + + // Premier add on SKU. + SKU *string + + // Premier add on offer Vendor. + Vendor *string + + // App Service plans this offer is restricted to. + WebHostingPlanRestrictions *AppServicePlanRestrictions +} + +// PremierAddOnPatchResource - ARM resource for a PremierAddOn. +type PremierAddOnPatchResource struct { + // Kind of resource. + Kind *string + + // PremierAddOnPatchResource resource specific properties + Properties *PremierAddOnPatchResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PremierAddOnPatchResourceProperties - PremierAddOnPatchResource resource specific properties +type PremierAddOnPatchResourceProperties struct { + // Premier add on Marketplace offer. + MarketplaceOffer *string + + // Premier add on Marketplace publisher. + MarketplacePublisher *string + + // Premier add on Product. + Product *string + + // Premier add on SKU. + SKU *string + + // Premier add on Vendor. + Vendor *string +} + +// PremierAddOnProperties - PremierAddOn resource specific properties +type PremierAddOnProperties struct { + // Premier add on Marketplace offer. + MarketplaceOffer *string + + // Premier add on Marketplace publisher. + MarketplacePublisher *string + + // Premier add on Product. + Product *string + + // Premier add on SKU. + SKU *string + + // Premier add on Vendor. + Vendor *string +} + +// PrivateAccess - Description of the parameters of Private Access for a Web Site. +type PrivateAccess struct { + // Kind of resource. + Kind *string + + // PrivateAccess resource specific properties + Properties *PrivateAccessProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PrivateAccessProperties - PrivateAccess resource specific properties +type PrivateAccessProperties struct { + // Whether private access is enabled or not. + Enabled *bool + + // The Virtual Networks (and subnets) allowed to access the site privately. + VirtualNetworks []*PrivateAccessVirtualNetwork +} + +// PrivateAccessSubnet - Description of a Virtual Network subnet that is useable for private site access. +type PrivateAccessSubnet struct { + // The key (ID) of the subnet. + Key *int32 + + // The name of the subnet. + Name *string +} + +// PrivateAccessVirtualNetwork - Description of a Virtual Network that is useable for private site access. +type PrivateAccessVirtualNetwork struct { + // The key (ID) of the Virtual Network. + Key *int32 + + // The name of the Virtual Network. + Name *string + + // The ARM uri of the Virtual Network + ResourceID *string + + // A List of subnets that access is allowed to on this Virtual Network. An empty array (but not null) is interpreted to mean + // that all subnets are allowed within this Virtual Network. + Subnets []*PrivateAccessSubnet +} + +type PrivateEndpointConnectionCollection struct { + // REQUIRED; Collection of resources. + Value []*RemotePrivateEndpointConnectionARMResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// PrivateLinkConnectionApprovalRequest - A request to approve or reject a private endpoint connection +type PrivateLinkConnectionApprovalRequest struct { + // The state of a private link connection + PrivateLinkServiceConnectionState *PrivateLinkConnectionState +} + +// PrivateLinkConnectionApprovalRequestResource - Private Endpoint Connection Approval ARM resource. +type PrivateLinkConnectionApprovalRequestResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *PrivateLinkConnectionApprovalRequest + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PrivateLinkConnectionState - The state of a private link connection +type PrivateLinkConnectionState struct { + // ActionsRequired for a private link connection + ActionsRequired *string + + // Description of a private link connection + Description *string + + // Status of a private link connection + Status *string +} + +// PrivateLinkResource - A private link resource +type PrivateLinkResource struct { + // REQUIRED + ID *string + + // REQUIRED; Name of a private link resource + Name *string + + // REQUIRED; Properties of a private link resource + Properties *PrivateLinkResourceProperties + + // REQUIRED + Type *string +} + +// PrivateLinkResourceProperties - Properties of a private link resource +type PrivateLinkResourceProperties struct { + // READ-ONLY; GroupId of a private link resource + GroupID *string + + // READ-ONLY; RequiredMembers of a private link resource + RequiredMembers []*string + + // READ-ONLY; RequiredZoneNames of a private link resource + RequiredZoneNames []*string +} + +// PrivateLinkResourcesWrapper - Wrapper for a collection of private link resources +type PrivateLinkResourcesWrapper struct { + // REQUIRED + Value []*PrivateLinkResource +} + +// ProcessInfo - Process Information. +type ProcessInfo struct { + // Kind of resource. + Kind *string + + // ProcessInfo resource specific properties + Properties *ProcessInfoProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ProcessInfoCollection - Collection of Kudu process information elements. +type ProcessInfoCollection struct { + // REQUIRED; Collection of resources. + Value []*ProcessInfo + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// ProcessInfoProperties - ProcessInfo resource specific properties +type ProcessInfoProperties struct { + // Child process list. + Children []*string + + // Command line. + CommandLine *string + + // Deployment name. + DeploymentName *string + + // Description of process. + Description *string + + // List of environment variables. + EnvironmentVariables map[string]*string + + // File name of this process. + FileName *string + + // Handle count. + HandleCount *int32 + + // HRef URI. + Href *string + + // IIS Profile timeout (seconds). + IisProfileTimeoutInSeconds *float64 + + // Is the IIS Profile running? + IsIisProfileRunning *bool + + // Is profile running? + IsProfileRunning *bool + + // Is this the SCM site? + IsScmSite *bool + + // Is this a Web Job? + IsWebjob *bool + + // Minidump URI. + Minidump *string + + // Module count. + ModuleCount *int32 + + // List of modules. + Modules []*ProcessModuleInfo + + // Non-paged system memory. + NonPagedSystemMemory *int64 + + // List of open files. + OpenFileHandles []*string + + // Paged memory. + PagedMemory *int64 + + // Paged system memory. + PagedSystemMemory *int64 + + // Parent process. + Parent *string + + // Peak paged memory. + PeakPagedMemory *int64 + + // Peak virtual memory usage. + PeakVirtualMemory *int64 + + // Peak working set. + PeakWorkingSet *int64 + + // Private memory size. + PrivateMemory *int64 + + // Privileged CPU time. + PrivilegedCPUTime *string + + // Start time. + StartTime *time.Time + + // Thread count. + ThreadCount *int32 + + // Thread list. + Threads []*ProcessThreadInfo + + // Time stamp. + TimeStamp *time.Time + + // Total CPU time. + TotalCPUTime *string + + // User CPU time. + UserCPUTime *string + + // User name. + UserName *string + + // Virtual memory size. + VirtualMemory *int64 + + // Working set. + WorkingSet *int64 + + // READ-ONLY; ARM Identifier for deployment. + Identifier *int32 +} + +// ProcessModuleInfo - Process Module Information. +type ProcessModuleInfo struct { + // Kind of resource. + Kind *string + + // ProcessModuleInfo resource specific properties + Properties *ProcessModuleInfoProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ProcessModuleInfoCollection - Collection of Kudu thread information elements. +type ProcessModuleInfoCollection struct { + // REQUIRED; Collection of resources. + Value []*ProcessModuleInfo + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// ProcessModuleInfoProperties - ProcessModuleInfo resource specific properties +type ProcessModuleInfoProperties struct { + // Base address. Used as module identifier in ARM resource URI. + BaseAddress *string + + // File description. + FileDescription *string + + // File name. + FileName *string + + // File path. + FilePath *string + + // File version. + FileVersion *string + + // HRef URI. + Href *string + + // Is debug? + IsDebug *bool + + // Module language (locale). + Language *string + + // Module memory size. + ModuleMemorySize *int32 + + // Product name. + Product *string + + // Product version. + ProductVersion *string +} + +// ProcessThreadInfo - Process Thread Information. +type ProcessThreadInfo struct { + // Kind of resource. + Kind *string + + // ProcessThreadInfo resource specific properties + Properties *ProcessThreadInfoProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ProcessThreadInfoCollection - Collection of Kudu thread information elements. +type ProcessThreadInfoCollection struct { + // REQUIRED; Collection of resources. + Value []*ProcessThreadInfo + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// ProcessThreadInfoProperties - ProcessThreadInfo resource specific properties +type ProcessThreadInfoProperties struct { + // Base priority. + BasePriority *int32 + + // Current thread priority. + CurrentPriority *int32 + + // HRef URI. + Href *string + + // Thread priority level. + PriorityLevel *string + + // Process URI. + Process *string + + // Start address. + StartAddress *string + + // Start time. + StartTime *time.Time + + // Thread state. + State *string + + // Total processor time. + TotalProcessorTime *string + + // User processor time. + UserProcessorTime *string + + // Wait reason. + WaitReason *string + + // READ-ONLY; Site extension ID. + Identifier *int32 +} + +// ProxyOnlyResource - Azure proxy only resource. This resource is not tracked by Azure Resource Manager. +type ProxyOnlyResource struct { + // Kind of resource. + Kind *string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PublicCertificate - Public certificate object +type PublicCertificate struct { + // Kind of resource. + Kind *string + + // PublicCertificate resource specific properties + Properties *PublicCertificateProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PublicCertificateCollection - Collection of public certificates +type PublicCertificateCollection struct { + // REQUIRED; Collection of resources. + Value []*PublicCertificate + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// PublicCertificateProperties - PublicCertificate resource specific properties +type PublicCertificateProperties struct { + // Public Certificate byte array + Blob []byte + + // Public Certificate Location + PublicCertificateLocation *PublicCertificateLocation + + // READ-ONLY; Certificate Thumbprint + Thumbprint *string +} + +// PublishingCredentialsPoliciesCollection - Publishing Credentials Policies entity collection ARM resource. +type PublishingCredentialsPoliciesCollection struct { + // REQUIRED; Collection of resources. + Value []*CsmPublishingCredentialsPoliciesEntity + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// PushSettings - Push settings for the App. +type PushSettings struct { + // Kind of resource. + Kind *string + + // PushSettings resource specific properties + Properties *PushSettingsProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PushSettingsProperties - PushSettings resource specific properties +type PushSettingsProperties struct { + // REQUIRED; Gets or sets a flag indicating whether the Push endpoint is enabled. + IsPushEnabled *bool + + // Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration + // endpoint. + DynamicTagsJSON *string + + // Gets or sets a JSON string containing a list of tags that are whitelisted for use by the push registration endpoint. + TagWhitelistJSON *string + + // Gets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration + // endpoint. Tags can consist of alphanumeric characters and the following: '_', + // '@', '#', '.', ':', '-'. Validation should be performed at the PushRequestHandler. + TagsRequiringAuth *string +} + +// QueryUtterancesResult - Result for utterances query. +type QueryUtterancesResult struct { + // A sample utterance. + SampleUtterance *SampleUtterance + + // Score of a sample utterance. + Score *float32 +} + +// QueryUtterancesResults - Suggested utterances where the detector can be applicable +type QueryUtterancesResults struct { + // Search Query. + Query *string + + // Array of utterance results for search query. + Results []*QueryUtterancesResult +} + +// QueueScaleRule - Container App container Azure Queue based scaling rule. +type QueueScaleRule struct { + // Authentication secrets for the queue scale rule. + Auth []*ScaleRuleAuth + + // Queue length. + QueueLength *int32 + + // Queue name. + QueueName *string +} + +// RampUpRule - Routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to gradually +// change routing % based on performance. +type RampUpRule struct { + // Hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net. + ActionHostName *string + + // Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site + // extension for the scaffold and contracts. + // https://www.siteextensions.net/packages/TiPCallback/ + ChangeDecisionCallbackURL *string + + // Specifies interval in minutes to reevaluate ReroutePercentage. + ChangeIntervalInMinutes *int32 + + // In auto ramp up scenario this is the step to add/remove from ReroutePercentage until it reaches \nMinReroutePercentage + // orMaxReroutePercentage. Site metrics are checked every N minutes specified in + // ChangeIntervalInMinutes.\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified + // in ChangeDecisionCallbackUrl. + ChangeStep *float64 + + // Specifies upper boundary below which ReroutePercentage will stay. + MaxReroutePercentage *float64 + + // Specifies lower boundary above which ReroutePercentage will stay. + MinReroutePercentage *float64 + + // Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. + Name *string + + // Percentage of the traffic which will be redirected to ActionHostName. + ReroutePercentage *float64 +} + +// Recommendation - Represents a recommendation result generated by the recommendation engine. +type Recommendation struct { + // Kind of resource. + Kind *string + + // Recommendation resource specific properties + Properties *RecommendationProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RecommendationCollection - Collection of recommendations. +type RecommendationCollection struct { + // REQUIRED; Collection of resources. + Value []*Recommendation + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// RecommendationProperties - Recommendation resource specific properties +type RecommendationProperties struct { + // Name of action recommended by this object. + ActionName *string + + // Deep link to a blade on the portal. + BladeName *string + + // List of channels that this recommendation can apply. + Channels *Channels + + // Timestamp when this instance was created. + CreationTime *time.Time + + // UI friendly name of the rule (may not be unique). + DisplayName *string + + // True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. + Enabled *int32 + + // The end time in UTC of a range that the recommendation refers to. + EndTime *time.Time + + // Extension name of the portal if exists. + ExtensionName *string + + // Forward link to an external document associated with the rule. + ForwardLink *string + + // True if this is associated with a dynamically added rule + IsDynamic *bool + + // Level indicating how critical this recommendation can impact. + Level *NotificationLevel + + // Recommendation text. + Message *string + + // When to notify this recommendation next in UTC. Null means that this will never be notified anymore. + NextNotificationTime *time.Time + + // Date and time in UTC when this notification expires. + NotificationExpirationTime *time.Time + + // Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet. + NotifiedTime *time.Time + + // A GUID value that each recommendation object is associated with. + RecommendationID *string + + // Full ARM resource ID string that this recommendation object is associated with. + ResourceID *string + + // Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. + ResourceScope *ResourceScopeType + + // Unique name of the rule. + RuleName *string + + // A metric value measured by the rule. + Score *float64 + + // The beginning time in UTC of a range that the recommendation refers to. + StartTime *time.Time + + // The list of states of this recommendation. If it's null then it should be considered "Active". + States []*string + + // READ-ONLY; The list of category tags that this recommendation belongs to. + CategoryTags []*string +} + +// RecommendationRule - Represents a recommendation rule that the recommendation engine can perform. +type RecommendationRule struct { + // Kind of resource. + Kind *string + + // RecommendationRule resource specific properties + Properties *RecommendationRuleProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RecommendationRuleProperties - RecommendationRule resource specific properties +type RecommendationRuleProperties struct { + // Name of action that is recommended by this rule in string. + ActionName *string + + // Deep link to a blade on the portal. Applicable to dynamic rule only. + BladeName *string + + // List of available channels that this rule applies. + Channels *Channels + + // Localized detailed description of the rule. + Description *string + + // UI friendly name of the rule. + DisplayName *string + + // Extension name of the portal if exists. Applicable to dynamic rule only. + ExtensionName *string + + // Forward link to an external document associated with the rule. Applicable to dynamic rule only. + ForwardLink *string + + // True if this is associated with a dynamically added rule + IsDynamic *bool + + // Level of impact indicating how critical this rule is. + Level *NotificationLevel + + // Localized name of the rule (Good for UI). + Message *string + + // Recommendation ID of an associated recommendation object tied to the rule, if exists. If such an object doesn't exist, + // it is set to null. + RecommendationID *string + + // Unique name of the rule. + RecommendationName *string + + // READ-ONLY; The list of category tags that this recommendation rule belongs to. + CategoryTags []*string +} + +// RecurrenceSchedule - The recurrence schedule. +type RecurrenceSchedule struct { + // The hours. + Hours []*int32 + + // The minutes. + Minutes []*int32 + + // The month days. + MonthDays []*int32 + + // The monthly occurrences. + MonthlyOccurrences []*RecurrenceScheduleOccurrence + + // The days of the week. + WeekDays []*DaysOfWeek +} + +// RecurrenceScheduleOccurrence - The recurrence schedule occurrence. +type RecurrenceScheduleOccurrence struct { + // The day of the week. + Day *DayOfWeek + + // The occurrence. + Occurrence *int32 +} + +// RegenerateActionParameter - The access key regenerate action content. +type RegenerateActionParameter struct { + // The key type. + KeyType *KeyType +} + +// RegistryCredentials - Container App Private Registry +type RegistryCredentials struct { + // The name of the Secret that contains the registry login password + PasswordSecretRef *string + + // Container Registry Server + Server *string + + // Container Registry Username + Username *string +} + +// ReissueCertificateOrderRequest - Class representing certificate reissue request. +type ReissueCertificateOrderRequest struct { + // Kind of resource. + Kind *string + + // ReissueCertificateOrderRequest resource specific properties + Properties *ReissueCertificateOrderRequestProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ReissueCertificateOrderRequestProperties - ReissueCertificateOrderRequest resource specific properties +type ReissueCertificateOrderRequestProperties struct { + // Csr to be used for re-key operation. + Csr *string + + // Delay in hours to revoke existing certificate after the new certificate is issued. + DelayExistingRevokeInHours *int32 + + // Should we change the ASC type (from managed private key to external private key and vice versa). + IsPrivateKeyExternal *bool + + // Certificate Key Size. + KeySize *int32 +} + +// RelayServiceConnectionEntity - Hybrid Connection for an App Service app. +type RelayServiceConnectionEntity struct { + // Kind of resource. + Kind *string + + // RelayServiceConnectionEntity resource specific properties + Properties *RelayServiceConnectionEntityProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RelayServiceConnectionEntityProperties - RelayServiceConnectionEntity resource specific properties +type RelayServiceConnectionEntityProperties struct { + BiztalkURI *string + EntityConnectionString *string + EntityName *string + Hostname *string + Port *int32 + ResourceConnectionString *string + ResourceType *string +} + +// RemotePrivateEndpointConnection - A remote private endpoint connection +type RemotePrivateEndpointConnection struct { + // Kind of resource. + Kind *string + + // RemotePrivateEndpointConnection resource specific properties + Properties *RemotePrivateEndpointConnectionProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RemotePrivateEndpointConnectionARMResource - Remote Private Endpoint Connection ARM resource. +type RemotePrivateEndpointConnectionARMResource struct { + // Kind of resource. + Kind *string + + // RemotePrivateEndpointConnectionARMResource resource specific properties + Properties *RemotePrivateEndpointConnectionARMResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RemotePrivateEndpointConnectionARMResourceProperties - RemotePrivateEndpointConnectionARMResource resource specific properties +type RemotePrivateEndpointConnectionARMResourceProperties struct { + // Private IPAddresses mapped to the remote private endpoint + IPAddresses []*string + + // PrivateEndpoint of a remote private endpoint connection + PrivateEndpoint *ArmIDWrapper + + // The state of a private link connection + PrivateLinkServiceConnectionState *PrivateLinkConnectionState + + // READ-ONLY + ProvisioningState *string +} + +// RemotePrivateEndpointConnectionProperties - RemotePrivateEndpointConnection resource specific properties +type RemotePrivateEndpointConnectionProperties struct { + // Private IPAddresses mapped to the remote private endpoint + IPAddresses []*string + + // PrivateEndpoint of a remote private endpoint connection + PrivateEndpoint *ArmIDWrapper + + // The state of a private link connection + PrivateLinkServiceConnectionState *PrivateLinkConnectionState + + // READ-ONLY + ProvisioningState *string +} + +// Rendering - Instructions for rendering the data +type Rendering struct { + // Description of the data that will help it be interpreted + Description *string + + // Title of data + Title *string + + // Rendering Type + Type *RenderingType +} + +// RenewCertificateOrderRequest - Class representing certificate renew request. +type RenewCertificateOrderRequest struct { + // Kind of resource. + Kind *string + + // RenewCertificateOrderRequest resource specific properties + Properties *RenewCertificateOrderRequestProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RenewCertificateOrderRequestProperties - RenewCertificateOrderRequest resource specific properties +type RenewCertificateOrderRequestProperties struct { + // Csr to be used for re-key operation. + Csr *string + + // Should we change the ASC type (from managed private key to external private key and vice versa). + IsPrivateKeyExternal *bool + + // Certificate Key Size. + KeySize *int32 +} + +// RepetitionIndex - The workflow run action repetition index. +type RepetitionIndex struct { + // REQUIRED; The index. + ItemIndex *int32 + + // The scope. + ScopeName *string +} + +// Request - A request. +type Request struct { + // A list of all the headers attached to the request. + Headers any + + // The HTTP method used for the request. + Method *string + + // The destination for the request. + URI *string +} + +// RequestHistory - The request history. +type RequestHistory struct { + // The resource location. + Location *string + + // The request history properties. + Properties *RequestHistoryProperties + + // The resource tags. + Tags map[string]*string + + // READ-ONLY; The resource id. + ID *string + + // READ-ONLY; Gets the resource name. + Name *string + + // READ-ONLY; Gets the resource type. + Type *string +} + +// RequestHistoryListResult - The list of workflow request histories. +type RequestHistoryListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of workflow request histories. + Value []*RequestHistory +} + +// RequestHistoryProperties - The request history. +type RequestHistoryProperties struct { + // The time the request ended. + EndTime *time.Time + + // The request. + Request *Request + + // The response. + Response *Response + + // The time the request started. + StartTime *time.Time +} + +// RequestsBasedTrigger - Trigger based on total requests. +type RequestsBasedTrigger struct { + // Request Count. + Count *int32 + + // Time interval. + TimeInterval *string +} + +// Resource - Azure resource. This resource is tracked in Azure Resource Manager +type Resource struct { + // REQUIRED; Resource Location. + Location *string + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ResourceCollection - Collection of resources. +type ResourceCollection struct { + // REQUIRED; Collection of resources. + Value []*string + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// ResourceConfig - Function app resource requirements. +type ResourceConfig struct { + // Required CPU in cores, e.g. 0.5 + CPU *float64 + + // Required memory, e.g. "1Gi" + Memory *string +} + +// ResourceHealthMetadata - Used for getting ResourceHealthCheck settings. +type ResourceHealthMetadata struct { + // Kind of resource. + Kind *string + + // ResourceHealthMetadata resource specific properties + Properties *ResourceHealthMetadataProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ResourceHealthMetadataCollection - Collection of resource health metadata. +type ResourceHealthMetadataCollection struct { + // REQUIRED; Collection of resources. + Value []*ResourceHealthMetadata + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// ResourceHealthMetadataProperties - ResourceHealthMetadata resource specific properties +type ResourceHealthMetadataProperties struct { + // The category that the resource matches in the RHC Policy File + Category *string + + // Is there a health signal for the resource + SignalAvailability *bool +} + +// ResourceMetricAvailability - Metrics availability and retention. +type ResourceMetricAvailability struct { + // READ-ONLY; Retention period for the current time grain. + Retention *string + + // READ-ONLY; Time grain . + TimeGrain *string +} + +// ResourceMetricDefinition - Metadata for the metrics. +type ResourceMetricDefinition struct { + // Kind of resource. + Kind *string + + // ResourceMetricDefinition resource specific properties + Properties *ResourceMetricDefinitionProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ResourceMetricDefinitionCollection - Collection of metric definitions. +type ResourceMetricDefinitionCollection struct { + // REQUIRED; Collection of resources. + Value []*ResourceMetricDefinition + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// ResourceMetricDefinitionProperties - ResourceMetricDefinition resource specific properties +type ResourceMetricDefinitionProperties struct { + // READ-ONLY; List of time grains supported for the metric together with retention period. + MetricAvailabilities []*ResourceMetricAvailability + + // READ-ONLY; Primary aggregation type. + PrimaryAggregationType *string + + // READ-ONLY; Resource metric definition properties. + Properties map[string]*string + + // READ-ONLY; Resource URI. + ResourceURI *string + + // READ-ONLY; Unit of the metric. + Unit *string +} + +// ResourceNameAvailability - Information regarding availability of a resource name. +type ResourceNameAvailability struct { + // If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements + // so that the user can select a valid name. If reason == AlreadyExists, + // explain that resource name is already in use, and direct them to select a different name. + Message *string + + // true indicates name is valid and available. false indicates the name is invalid, unavailable, or both. + NameAvailable *bool + + // Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that + // the name is already in use and is therefore unavailable. + Reason *InAvailabilityReasonType +} + +// ResourceNameAvailabilityRequest - Resource name availability request content. +type ResourceNameAvailabilityRequest struct { + // REQUIRED; Resource name to verify. + Name *string + + // REQUIRED; Resource type used for verification. + Type *CheckNameResourceTypes + + // Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This + // must be of the form + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} + EnvironmentID *string + + // Is fully qualified domain name. + IsFqdn *bool +} + +// ResourceReference - The resource reference. +type ResourceReference struct { + // The resource id. + ID *string + + // READ-ONLY; Gets the resource name. + Name *string + + // READ-ONLY; Gets the resource type. + Type *string +} + +// Response - A response. +type Response struct { + // Details on the location of the body content. + BodyLink *ContentLink + + // A list of all the headers attached to the response. + Headers any + + // The status code of the response. + StatusCode *int32 +} + +// ResponseMessageEnvelopeRemotePrivateEndpointConnection - Message envelope that contains the common Azure resource manager +// properties and the resource provider specific content. +type ResponseMessageEnvelopeRemotePrivateEndpointConnection struct { + // Azure-AsyncOperation Error info. + Error *ErrorEntity + + // Resource Id. Typically ID is populated only for responses to GET requests. Caller is responsible for passing in this value + // for GET requests only. For example: + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename} + ID *string + + // MSI resource + Identity *ManagedServiceIdentity + + // Geographical region resource belongs to e.g. SouthCentralUS, SouthEastAsia. + Location *string + + // Name of resource. + Name *string + + // Azure resource manager plan. + Plan *ArmPlan + + // Resource specific properties. + Properties *RemotePrivateEndpointConnection + + // SKU description of the resource. + SKU *SKUDescription + + // Azure-AsyncOperation Status info. + Status *string + + // Tags associated with resource. + Tags map[string]*string + + // Type of resource e.g "Microsoft.Web/sites". + Type *string + + // Logical Availability Zones the service is hosted in + Zones []*string +} + +type ResponseMetaData struct { + // Source of the Data + DataSource *DataSource +} + +// RestoreRequest - Description of a restore request. +type RestoreRequest struct { + // Kind of resource. + Kind *string + + // RestoreRequest resource specific properties + Properties *RestoreRequestProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RestoreRequestProperties - RestoreRequest resource specific properties +type RestoreRequestProperties struct { + // REQUIRED; true if the restore operation can overwrite target app; otherwise, false. true is needed if trying to restore + // over an existing app. + Overwrite *bool + + // REQUIRED; SAS URL to the container. + StorageAccountURL *string + + // true if SiteConfig.ConnectionStrings should be set in new app; otherwise, false. + AdjustConnectionStrings *bool + + // Specify app service plan that will own restored site. + AppServicePlan *string + + // Name of a blob which contains the backup. + BlobName *string + + // Collection of databases which should be restored. This list has to match the list of databases included in the backup. + Databases []*DatabaseBackupSetting + + // App Service Environment name, if needed (only when restoring an app to an App Service Environment). + HostingEnvironment *string + + // 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 + + // Ignore the databases and only restore the site content + IgnoreDatabases *bool + + // Operation type. + OperationType *BackupRestoreOperationType + + // Name of an app. + SiteName *string +} + +// RetryHistory - The retry history. +type RetryHistory struct { + // Gets the client request Id. + ClientRequestID *string + + // Gets the status code. + Code *string + + // Gets the end time. + EndTime *time.Time + + // Gets the error response. + Error *ErrorResponse + + // Gets the service request Id. + ServiceRequestID *string + + // Gets the start time. + StartTime *time.Time +} + +// Revision - Container App Revision. +type Revision struct { + // REQUIRED; Resource Location. + Location *string + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // Revision resource specific properties + Properties *RevisionProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RevisionCollection - Container App Revisions collection ARM resource. +type RevisionCollection struct { + // REQUIRED; Collection of resources. + Value []*Revision + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// RevisionProperties - Revision resource specific properties +type RevisionProperties struct { + // READ-ONLY; Boolean describing if the Revision is Active + Active *bool + + // READ-ONLY; Timestamp describing when the revision was created by controller + CreatedTime *time.Time + + // READ-ONLY; Fully qualified domain name of the revision + Fqdn *string + + // READ-ONLY; Current health State of the revision + HealthState *RevisionHealthState + + // READ-ONLY; Optional Field - Platform Error Message + ProvisioningError *string + + // READ-ONLY; Current provisioning State of the revision + ProvisioningState *RevisionProvisioningState + + // READ-ONLY; Number of pods currently running for this revision + Replicas *int32 + + // 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 + + // READ-ONLY; Traffic weight assigned to this revision + TrafficWeight *int32 +} + +// RunActionCorrelation - The workflow run action correlation properties. +type RunActionCorrelation struct { + // The action tracking identifier. + ActionTrackingID *string + + // The client keywords. + ClientKeywords []*string + + // The client tracking identifier. + ClientTrackingID *string +} + +// RunCorrelation - The correlation properties. +type RunCorrelation struct { + // The client keywords. + ClientKeywords []*string + + // The client tracking identifier. + ClientTrackingID *string +} + +// SKUCapacity - Description of the App Service plan scale options. +type SKUCapacity struct { + // Default number of workers for this App Service plan SKU. + Default *int32 + + // Maximum number of Elastic workers for this App Service plan SKU. + ElasticMaximum *int32 + + // Maximum number of workers for this App Service plan SKU. + Maximum *int32 + + // Minimum number of workers for this App Service plan SKU. + Minimum *int32 + + // Available scale configurations for an App Service plan. + ScaleType *string +} + +// SKUDescription - Description of a SKU for a scalable resource. +type SKUDescription struct { + // Capabilities of the SKU, e.g., is traffic manager enabled? + Capabilities []*Capability + + // Current number of instances assigned to the resource. + Capacity *int32 + + // Family code of the resource SKU. + Family *string + + // Locations of the SKU. + Locations []*string + + // Name of the resource SKU. + Name *string + + // Min, max, and default scale values of the SKU. + SKUCapacity *SKUCapacity + + // Size specifier of the resource SKU. + Size *string + + // Service tier of the resource SKU. + Tier *string +} + +// SKUInfo - SKU discovery information. +type SKUInfo struct { + // Min, max, and default scale values of the SKU. + Capacity *SKUCapacity + + // Resource type that this SKU applies to. + ResourceType *string + + // Name and tier of the SKU. + SKU *SKUDescription +} + +// SKUInfoCollection - Collection of SKU information. +type SKUInfoCollection struct { + // REQUIRED; Collection of resources. + Value []*SKUInfo + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// SKUInfos - Collection of SKU information. +type SKUInfos struct { + // Resource type that this SKU applies to. + ResourceType *string + + // List of SKUs the subscription is able to use. + SKUs []*GlobalCsmSKUDescription +} + +// SampleUtterance - Sample utterance. +type SampleUtterance struct { + // Links attribute of sample utterance. + Links []*string + + // Question id of sample utterance (for stackoverflow questions titles). + Qid *string + + // Text attribute of sample utterance. + Text *string +} + +// Scale - Container App scaling configurations. +type Scale struct { + // Optional. Maximum number of container replicas. Defaults to 10 if not set. + MaxReplicas *int32 + + // Optional. Minimum number of container replicas. + MinReplicas *int32 + + // Scaling rules. + Rules []*ScaleRule +} + +// ScaleRule - Container App container scaling rule. +type ScaleRule struct { + // Azure Queue based scaling. + AzureQueue *QueueScaleRule + + // Custom scale rule. + Custom *CustomScaleRule + + // HTTP requests based scaling. + HTTP *HTTPScaleRule + + // Scale Rule Name + Name *string +} + +// ScaleRuleAuth - Auth Secrets for Container App Scale Rule +type ScaleRuleAuth struct { + // Name of the Container App secret from which to pull the auth params. + SecretRef *string + + // Trigger Parameter that uses the secret + TriggerParameter *string +} + +// Secret - Container App Secret. +type Secret struct { + // Secret Name. + Name *string + + // Secret Value. + Value *string +} + +// SecretsCollection - Container App Secrets Collection ARM resource. +type SecretsCollection struct { + // REQUIRED; Collection of resources. + Value []*ContainerAppSecret +} + +// ServiceSpecification - Resource metrics service provided by Microsoft.Insights resource provider. +type ServiceSpecification struct { + LogSpecifications []*LogSpecification + MetricSpecifications []*MetricSpecification +} + +// Site - A web app, a mobile app backend, or an API app. +type Site struct { + // REQUIRED; Resource Location. + Location *string + + // Extended Location. + ExtendedLocation *ExtendedLocation + + // Managed service identity. + Identity *ManagedServiceIdentity + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // Site resource specific properties + Properties *SiteProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SiteAuthSettings - Configuration settings for the Azure App Service Authentication / Authorization feature. +type SiteAuthSettings struct { + // Kind of resource. + Kind *string + + // SiteAuthSettings resource specific properties + Properties *SiteAuthSettingsProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SiteAuthSettingsProperties - SiteAuthSettings resource specific properties +type SiteAuthSettingsProperties struct { + // Gets a JSON string containing the Azure AD Acl settings. + AADClaimsAuthorization *string + + // 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 + + // 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 + + // 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 + + // The path of the config file containing auth settings. If the path is relative, base will the site's root directory. + AuthFilePath *string + + // The Client ID of this relying party application, known as the clientid. 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-10.html + ClientID *string + + // 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 + + // 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 + + // The app setting name that contains the client secret of the relying party application. + ClientSecretSettingName *string + + // 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 + + // 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". + DefaultProvider *BuiltInAuthenticationProvider + + // true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. + Enabled *bool + + // 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 + + // 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 + + // The app setting name that contains the app secret used for Facebook Login. + FacebookAppSecretSettingName *string + + // 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 + + // The Client Id of the GitHub app used for login. This setting is required for enabling Github login + GitHubClientID *string + + // The Client Secret of the GitHub app used for Github Login. This setting is required for enabling Github login. + GitHubClientSecret *string + + // The app setting name that contains the client secret of the Github app used for GitHub Login. + GitHubClientSecretSettingName *string + + // The OAuth 2.0 scopes that will be requested as part of GitHub Login authentication. This setting is optional + GitHubOAuthScopes []*string + + // 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 + + // 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 + + // The app setting name that contains the client secret associated with the Google web application. + GoogleClientSecretSettingName *string + + // 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 + + // "true" if the auth config settings should be read from a file, "false" otherwise + IsAuthFromFile *string + + // 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 + + // 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 + + // 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 + + // The app setting name containing the OAuth 2.0 client secret that was created for the app used for authentication. + MicrosoftAccountClientSecretSettingName *string + + // 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 + + // 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 + + // 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 + + // true to durably store platform-specific security tokens that are obtained during login flows; otherwise, false. The default + // is false. + TokenStoreEnabled *bool + + // 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 + + // 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 + + // The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. + TwitterConsumerSecretSettingName *string + + // The action to take when an unauthenticated client attempts to access the app. + UnauthenticatedClientAction *UnauthenticatedClientAction + + // Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. + ValidateIssuer *bool +} + +// SiteAuthSettingsV2 - Configuration settings for the Azure App Service Authentication / Authorization V2 feature. +type SiteAuthSettingsV2 struct { + // Kind of resource. + Kind *string + + // SiteAuthSettingsV2 resource specific properties + Properties *SiteAuthSettingsV2Properties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SiteAuthSettingsV2Properties - SiteAuthSettingsV2 resource specific properties +type SiteAuthSettingsV2Properties struct { + // The configuration settings that determines the validation flow of users using App Service Authentication/Authorization. + GlobalValidation *GlobalValidation + + // The configuration settings of the HTTP requests for authentication and authorization requests made against App Service + // Authentication/Authorization. + HTTPSettings *HTTPSettings + + // The configuration settings of each of the identity providers used to configure App Service Authentication/Authorization. + IdentityProviders *IdentityProviders + + // The configuration settings of the login flow of users using App Service Authentication/Authorization. + Login *Login + + // The configuration settings of the platform of App Service Authentication/Authorization. + Platform *AuthPlatform +} + +// SiteCloneability - Represents whether or not an app is cloneable. +type SiteCloneability struct { + // List of blocking application characteristics. + BlockingCharacteristics []*SiteCloneabilityCriterion + + // List of features enabled on app that prevent cloning. + BlockingFeatures []*SiteCloneabilityCriterion + + // Name of app. + Result *CloneAbilityResult + + // 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 +} + +// SiteCloneabilityCriterion - An app cloneability criterion. +type SiteCloneabilityCriterion struct { + // Description of criterion. + Description *string + + // Name of criterion. + Name *string +} + +// SiteConfig - Configuration of an App Service app. +type SiteConfig struct { + // Information about the formal API definition for the app. + APIDefinition *APIDefinitionInfo + + // Azure API management settings linked to the app. + APIManagementConfig *APIManagementConfig + + // Flag to use Managed Identity Creds for ACR pull + AcrUseManagedIdentityCreds *bool + + // If using user managed identity, the user managed identity ClientId + AcrUserManagedIdentityID *string + + // true if Always On is enabled; otherwise, false. + AlwaysOn *bool + + // App command line to launch. + AppCommandLine *string + + // Application settings. + AppSettings []*NameValuePair + + // true if Auto Heal is enabled; otherwise, false. + AutoHealEnabled *bool + + // Auto Heal rules. + AutoHealRules *AutoHealRules + + // Auto-swap slot name. + AutoSwapSlotName *string + + // List of Azure Storage Accounts. + AzureStorageAccounts map[string]*AzureStorageInfoValue + + // Connection strings. + ConnectionStrings []*ConnStringInfo + + // Cross-Origin Resource Sharing (CORS) settings. + Cors *CorsSettings + + // Default documents. + DefaultDocuments []*string + + // true if detailed error logging is enabled; otherwise, false. + DetailedErrorLoggingEnabled *bool + + // Document root. + DocumentRoot *string + + // 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 + + // This is work around for polymorphic types. + Experiments *Experiments + + // State of FTP / FTPS service + FtpsState *FtpsState + + // Maximum number of workers that a site can scale out to. This setting only applies to the Consumption and Elastic Premium + // Plans + FunctionAppScaleLimit *int32 + + // 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 + + // true if HTTP logging is enabled; otherwise, false. + HTTPLoggingEnabled *bool + + // Handler mappings. + HandlerMappings []*HandlerMapping + + // Health check path + HealthCheckPath *string + + // Http20Enabled: configures a web site to allow clients to connect over http2.0 + Http20Enabled *bool + + // IP security restrictions for main. + IPSecurityRestrictions []*IPSecurityRestriction + + // Default action for main access restriction if no rules are matched. + IPSecurityRestrictionsDefaultAction *DefaultAction + + // Java container. + JavaContainer *string + + // Java container version. + JavaContainerVersion *string + + // Java version. + JavaVersion *string + + // Identity to use for Key Vault Reference authentication. + KeyVaultReferenceIdentity *string + + // Site limits. + Limits *SiteLimits + + // Linux App Framework and version + LinuxFxVersion *string + + // Site load balancing. + LoadBalancing *SiteLoadBalancing + + // true to enable local MySQL; otherwise, false. + LocalMySQLEnabled *bool + + // HTTP logs directory size limit. + LogsDirectorySizeLimit *int32 + + // Managed pipeline mode. + ManagedPipelineMode *ManagedPipelineMode + + // Managed Service Identity Id + ManagedServiceIdentityID *int32 + + // Application metadata. This property cannot be retrieved, since it may contain secrets. + Metadata []*NameValuePair + + // The minimum strength TLS cipher suite allowed for an application + MinTLSCipherSuite *TLSCipherSuites + + // MinTlsVersion: configures the minimum version of TLS required for SSL requests + MinTLSVersion *SupportedTLSVersions + + // Number of minimum instance count for a site This setting only applies to the Elastic Plans + MinimumElasticInstanceCount *int32 + + // .NET Framework version. + NetFrameworkVersion *string + + // Version of Node.js. + NodeVersion *string + + // Number of workers. + NumberOfWorkers *int32 + + // Version of PHP. + PhpVersion *string + + // Version of PowerShell. + PowerShellVersion *string + + // Number of preWarmed instances. This setting only applies to the Consumption and Elastic Plans + PreWarmedInstanceCount *int32 + + // Property to allow or block all public traffic. + PublicNetworkAccess *string + + // Publishing user name. + PublishingUsername *string + + // Push endpoint settings. + Push *PushSettings + + // Version of Python. + PythonVersion *string + + // true if remote debugging is enabled; otherwise, false. + RemoteDebuggingEnabled *bool + + // Remote debugging version. + RemoteDebuggingVersion *string + + // true if request tracing is enabled; otherwise, false. + RequestTracingEnabled *bool + + // Request tracing expiration time. + RequestTracingExpirationTime *time.Time + + // IP security restrictions for scm. + ScmIPSecurityRestrictions []*IPSecurityRestriction + + // Default action for scm access restriction if no rules are matched. + ScmIPSecurityRestrictionsDefaultAction *DefaultAction + + // IP security restrictions for scm to use main. + ScmIPSecurityRestrictionsUseMain *bool + + // ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site + ScmMinTLSVersion *SupportedTLSVersions + + // SCM type. + ScmType *ScmType + + // Tracing options. + TracingOptions *string + + // true to use 32-bit worker process; otherwise, false. + Use32BitWorkerProcess *bool + + // Virtual applications. + VirtualApplications []*VirtualApplication + + // Virtual Network name. + VnetName *string + + // The number of private ports assigned to this app. These will be assigned dynamically on runtime. + VnetPrivatePortsCount *int32 + + // Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined + // Routes applied. + VnetRouteAllEnabled *bool + + // true if WebSocket is enabled; otherwise, false. + WebSocketsEnabled *bool + + // Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITETIMEZONE + // 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/Listoftzdatabasetimezones). + // For Windows, expects one of the time zones listed under HKEY + // LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones + WebsiteTimeZone *string + + // Xenon App Framework and version + WindowsFxVersion *string + + // Explicit Managed Service Identity Id + XManagedServiceIdentityID *int32 + + // READ-ONLY; Site MachineKey. + MachineKey *SiteMachineKey +} + +// SiteConfigPropertiesDictionary - Site config properties dictionary. +type SiteConfigPropertiesDictionary struct { + // READ-ONLY; JavaVersion configuration setting. + JavaVersion *string + + // READ-ONLY; LinuxFxVersion configuration setting. + LinuxFxVersion *string + + // READ-ONLY; PowerShellVersion configuration setting. + PowerShellVersion *string + + // READ-ONLY; true if use32BitWorkerProcess should be set to true for the stack; otherwise, false. + Use32BitWorkerProcess *bool +} + +// SiteConfigResource - Web app configuration ARM resource. +type SiteConfigResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *SiteConfig + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SiteConfigResourceCollection - Collection of site configurations. +type SiteConfigResourceCollection struct { + // REQUIRED; Collection of resources. + Value []*SiteConfigResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// SiteConfigurationSnapshotInfo - A snapshot of a web app configuration. +type SiteConfigurationSnapshotInfo struct { + // Kind of resource. + Kind *string + + // SiteConfigurationSnapshotInfo resource specific properties + Properties *SiteConfigurationSnapshotInfoProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SiteConfigurationSnapshotInfoCollection - Collection of metadata for the app configuration snapshots that can be restored. +type SiteConfigurationSnapshotInfoCollection struct { + // REQUIRED; Collection of resources. + Value []*SiteConfigurationSnapshotInfo + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// SiteConfigurationSnapshotInfoProperties - SiteConfigurationSnapshotInfo resource specific properties +type SiteConfigurationSnapshotInfoProperties struct { + // READ-ONLY; The id of the snapshot + SnapshotID *int32 + + // READ-ONLY; The time the snapshot was taken. + Time *time.Time +} + +// SiteContainer - Container of a site +type SiteContainer struct { + // Kind of resource. + Kind *string + + // SiteContainer resource specific properties + Properties *SiteContainerProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SiteContainerCollection - Collection of site containers +type SiteContainerCollection struct { + // REQUIRED; Collection of resources. + Value []*SiteContainer + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// SiteContainerProperties - SiteContainer resource specific properties +type SiteContainerProperties struct { + // REQUIRED; Image Name + Image *string + + // REQUIRED; true if the container is the main site container; false otherwise. + IsMain *bool + + // Auth Type + AuthType *AuthType + + // List of environment variables + EnvironmentVariables []*EnvironmentVariable + + // Password Secret + PasswordSecret *string + + // StartUp Command + StartUpCommand *string + + // Target Port + TargetPort *string + + // UserManagedIdentity ClientId + UserManagedIdentityClientID *string + + // User Name + UserName *string + + // List of volume mounts + VolumeMounts []*VolumeMount + + // READ-ONLY; Created Time + CreatedTime *time.Time + + // READ-ONLY; Last Modified Time + LastModifiedTime *time.Time +} + +type SiteDNSConfig struct { + // Alternate DNS server to be used by apps. This property replicates the WEBSITEDNSALT_SERVER app setting. + DNSAltServer *string + + // Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled. + DNSMaxCacheTimeout *int32 + + // Total number of retries for dns lookup. Allowed range: 1-5. Default is 3. + DNSRetryAttemptCount *int32 + + // Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3. + DNSRetryAttemptTimeout *int32 + + // List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set. + DNSServers []*string + + // READ-ONLY; Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers. Read-Only. + DNSLegacySortOrder *bool +} + +// SiteExtensionInfo - Site Extension Information. +type SiteExtensionInfo struct { + // Kind of resource. + Kind *string + + // SiteExtensionInfo resource specific properties + Properties *SiteExtensionInfoProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SiteExtensionInfoCollection - Collection of Kudu site extension information elements. +type SiteExtensionInfoCollection struct { + // REQUIRED; Collection of resources. + Value []*SiteExtensionInfo + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// SiteExtensionInfoProperties - SiteExtensionInfo resource specific properties +type SiteExtensionInfoProperties struct { + // List of authors. + Authors []*string + + // Site Extension comment. + Comment *string + + // Detailed description. + Description *string + + // Count of downloads. + DownloadCount *int32 + + // Site extension ID. + ExtensionID *string + + // Site extension type. + ExtensionType *SiteExtensionType + + // Extension URL. + ExtensionURL *string + + // Feed URL. + FeedURL *string + + // Icon URL. + IconURL *string + + // Installed timestamp. + InstalledDateTime *time.Time + + // Installer command line parameters. + InstallerCommandLineParams *string + + // License URL. + LicenseURL *string + + // true if the local version is the latest version; false otherwise. + LocalIsLatestVersion *bool + + // Local path. + LocalPath *string + + // Project URL. + ProjectURL *string + + // Provisioning state. + ProvisioningState *string + + // Published timestamp. + PublishedDateTime *time.Time + + // Summary description. + Summary *string + Title *string + + // Version information. + Version *string +} + +// SiteLimits - Metric limits set on an app. +type SiteLimits struct { + // Maximum allowed disk size usage in MB. + MaxDiskSizeInMb *int64 + + // Maximum allowed memory usage in MB. + MaxMemoryInMb *int64 + + // Maximum allowed CPU usage percentage. + MaxPercentageCPU *float64 +} + +// SiteLogsConfig - Configuration of App Service site logs. +type SiteLogsConfig struct { + // Kind of resource. + Kind *string + + // SiteLogsConfig resource specific properties + Properties *SiteLogsConfigProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SiteLogsConfigProperties - SiteLogsConfig resource specific properties +type SiteLogsConfigProperties struct { + // Application logs configuration. + ApplicationLogs *ApplicationLogsConfig + + // Detailed error messages configuration. + DetailedErrorMessages *EnabledConfig + + // Failed requests tracing configuration. + FailedRequestsTracing *EnabledConfig + + // HTTP logs configuration. + HTTPLogs *HTTPLogsConfig +} + +// SiteMachineKey - MachineKey of an app. +type SiteMachineKey struct { + // Algorithm used for decryption. + Decryption *string + + // Decryption key. + DecryptionKey *string + + // MachineKey validation. + Validation *string + + // Validation key. + ValidationKey *string +} + +// SitePatchResource - ARM resource for a site. +type SitePatchResource struct { + // Managed service identity. + Identity *ManagedServiceIdentity + + // Kind of resource. + Kind *string + + // SitePatchResource resource specific properties + Properties *SitePatchResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SitePatchResourceProperties - SitePatchResource resource specific properties +type SitePatchResourceProperties struct { + // 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 + + // true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false. + ClientCertEnabled *bool + + // client certificate authentication comma-separated exclusion paths + ClientCertExclusionPaths *string + + // 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. + ClientCertMode *ClientCertMode + + // If specified during app creation, the app is cloned from a source app. + CloningInfo *CloningInfo + + // Size of the function container. + ContainerSize *int32 + + // Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. + CustomDomainVerificationID *string + + // Property to configure various DNS related settings for a site. + DNSConfiguration *SiteDNSConfig + + // Maximum allowed daily memory-time quota (applicable on dynamic apps only). + DailyMemoryTimeQuota *int32 + + // true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline). + Enabled *bool + + // HttpsOnly: configures a web site to accept only https requests. Issues redirect for http requests + HTTPSOnly *bool + + // Hostname SSL states are used to manage the SSL bindings for app's hostnames. + HostNameSSLStates []*HostNameSSLState + + // true to disable the public hostnames of the app; otherwise, false. If true, the app is only accessible via API management + // process. + HostNamesDisabled *bool + + // App Service Environment to use for the app. + HostingEnvironmentProfile *HostingEnvironmentProfile + + // Hyper-V sandbox. + HyperV *bool + + // Obsolete: Hyper-V sandbox. + IsXenon *bool + + // Identity to use for Key Vault Reference authentication. + KeyVaultReferenceIdentity *string + + // Site redundancy mode + RedundancyMode *RedundancyMode + + // true if reserved; otherwise, false. + Reserved *bool + + // true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. + ScmSiteAlsoStopped *bool + + // Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + ServerFarmID *string + + // Configuration of the app. + SiteConfig *SiteConfig + + // Checks if Customer provided storage account is required + StorageAccountRequired *bool + + // 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 + + // READ-ONLY; Management information availability state for the app. + AvailabilityState *SiteAvailabilityState + + // READ-ONLY; Default hostname of the app. Read-only. + DefaultHostName *string + + // 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 + + // READ-ONLY; Hostnames associated with the app. + HostNames []*string + + // READ-ONLY; Specifies an operation id if this site has a pending operation. + InProgressOperationID *string + + // READ-ONLY; true if the app is a default container; otherwise, false. + IsDefaultContainer *bool + + // READ-ONLY; Last time the app was modified, in UTC. Read-only. + LastModifiedTimeUTC *time.Time + + // READ-ONLY; Maximum number of workers. This only applies to Functions container. + MaxNumberOfWorkers *int32 + + // 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 + + // 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 + + // READ-ONLY; Name of the repository site. + RepositorySiteName *string + + // READ-ONLY; Name of the resource group the app belongs to. Read-only. + ResourceGroup *string + + // READ-ONLY; Status of the last deployment slot swap operation. + SlotSwapStatus *SlotSwapStatus + + // READ-ONLY; Current state of the app. + State *string + + // READ-ONLY; App suspended till in case memory-time quota is exceeded. + SuspendedTill *time.Time + + // READ-ONLY; Specifies which deployment slot this app will swap into. Read-only. + TargetSwapSlot *string + + // READ-ONLY; Azure Traffic Manager hostnames associated with the app. Read-only. + TrafficManagerHostNames []*string + + // READ-ONLY; State indicating whether the app has exceeded its quota usage. Read-only. + UsageState *UsageState +} + +// SitePhpErrorLogFlag - Used for getting PHP error logging flag. +type SitePhpErrorLogFlag struct { + // Kind of resource. + Kind *string + + // SitePhpErrorLogFlag resource specific properties + Properties *SitePhpErrorLogFlagProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SitePhpErrorLogFlagProperties - SitePhpErrorLogFlag resource specific properties +type SitePhpErrorLogFlagProperties struct { + // Local log_errors setting. + LocalLogErrors *string + + // Local logerrorsmax_len setting. + LocalLogErrorsMaxLength *string + + // Master log_errors setting. + MasterLogErrors *string + + // Master logerrorsmax_len setting. + MasterLogErrorsMaxLength *string +} + +// SiteProperties - Site resource specific properties +type SiteProperties struct { + // Specifies the scope of uniqueness for the default hostname during resource creation + AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope + + // 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 + + // true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false. + ClientCertEnabled *bool + + // client certificate authentication comma-separated exclusion paths + ClientCertExclusionPaths *string + + // 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. + ClientCertMode *ClientCertMode + + // If specified during app creation, the app is cloned from a source app. + CloningInfo *CloningInfo + + // Size of the function container. + ContainerSize *int32 + + // Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification. + CustomDomainVerificationID *string + + // Property to configure various DNS related settings for a site. + DNSConfiguration *SiteDNSConfig + + // Maximum allowed daily memory-time quota (applicable on dynamic apps only). + DailyMemoryTimeQuota *int32 + + // Dapr configuration of the app. + DaprConfig *DaprConfig + + // true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline). + Enabled *bool + + // Whether to use end to end encryption between the FrontEnd and the Worker + EndToEndEncryptionEnabled *bool + + // Configuration specific of the Azure Function app. + FunctionAppConfig *FunctionAppConfig + + // HttpsOnly: configures a web site to accept only https requests. Issues redirect for http requests + HTTPSOnly *bool + + // Hostname SSL states are used to manage the SSL bindings for app's hostnames. + HostNameSSLStates []*HostNameSSLState + + // true to disable the public hostnames of the app; otherwise, false. If true, the app is only accessible via API management + // process. + HostNamesDisabled *bool + + // App Service Environment to use for the app. + HostingEnvironmentProfile *HostingEnvironmentProfile + + // Hyper-V sandbox. + HyperV *bool + + // Specifies the IP mode of the app. + IPMode *IPMode + + // Obsolete: Hyper-V sandbox. + IsXenon *bool + + // Identity to use for Key Vault Reference authentication. + KeyVaultReferenceIdentity *string + + // 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 + + // Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + PublicNetworkAccess *string + + // Site redundancy mode + RedundancyMode *RedundancyMode + + // true if reserved; otherwise, false. + Reserved *bool + + // Function app resource requirements. + ResourceConfig *ResourceConfig + + // true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. + ScmSiteAlsoStopped *bool + + // Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + ServerFarmID *string + + // Configuration of the app. + SiteConfig *SiteConfig + + // Checks if Customer provided storage account is required + StorageAccountRequired *bool + + // 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 + + // To enable Backup and Restore operations over virtual network + VnetBackupRestoreEnabled *bool + + // To enable accessing content over virtual network + VnetContentShareEnabled *bool + + // To enable pulling image over Virtual Network + VnetImagePullEnabled *bool + + // Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined + // Routes applied. + VnetRouteAllEnabled *bool + + // Workload profile name for function app to execute on. + WorkloadProfileName *string + + // READ-ONLY; Management information availability state for the app. + AvailabilityState *SiteAvailabilityState + + // READ-ONLY; Default hostname of the app. Read-only. + DefaultHostName *string + + // 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 + + // READ-ONLY; Hostnames associated with the app. + HostNames []*string + + // READ-ONLY; Specifies an operation id if this site has a pending operation. + InProgressOperationID *string + + // READ-ONLY; true if the app is a default container; otherwise, false. + IsDefaultContainer *bool + + // READ-ONLY; Last time the app was modified, in UTC. Read-only. + LastModifiedTimeUTC *time.Time + + // READ-ONLY; Maximum number of workers. This only applies to Functions container. + MaxNumberOfWorkers *int32 + + // 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 + + // 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 + + // READ-ONLY; Name of the repository site. + RepositorySiteName *string + + // READ-ONLY; Name of the resource group the app belongs to. Read-only. + ResourceGroup *string + + // READ-ONLY; Current SKU of application based on associated App Service Plan. Some valid SKU values are Free, Shared, Basic, + // Dynamic, FlexConsumption, Standard, Premium, PremiumV2, PremiumV3, Isolated, IsolatedV2 + SKU *string + + // READ-ONLY; Status of the last deployment slot swap operation. + SlotSwapStatus *SlotSwapStatus + + // READ-ONLY; Current state of the app. + State *string + + // READ-ONLY; App suspended till in case memory-time quota is exceeded. + SuspendedTill *time.Time + + // READ-ONLY; Specifies which deployment slot this app will swap into. Read-only. + TargetSwapSlot *string + + // READ-ONLY; Azure Traffic Manager hostnames associated with the app. Read-only. + TrafficManagerHostNames []*string + + // READ-ONLY; State indicating whether the app has exceeded its quota usage. Read-only. + UsageState *UsageState +} + +// SiteSeal - Site seal +type SiteSeal struct { + // REQUIRED; HTML snippet + HTML *string +} + +// SiteSealRequest - Site seal request. +type SiteSealRequest struct { + // If true use the light color theme for site seal; otherwise, use the default color theme. + LightTheme *bool + + // Locale of site seal. + Locale *string +} + +// SiteSourceControl - Source control configuration for an app. +type SiteSourceControl struct { + // Kind of resource. + Kind *string + + // SiteSourceControl resource specific properties + Properties *SiteSourceControlProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SiteSourceControlProperties - SiteSourceControl resource specific properties +type SiteSourceControlProperties struct { + // Name of branch to use for deployment. + Branch *string + + // true to enable deployment rollback; otherwise, false. + DeploymentRollbackEnabled *bool + + // If GitHub Action is selected, than the associated configuration. + GitHubActionConfiguration *GitHubActionConfiguration + + // true if this is deployed via GitHub action. + IsGitHubAction *bool + + // true to limit to manual integration; false to enable continuous integration (which configures webhooks into online repos + // like GitHub). + IsManualIntegration *bool + + // true for a Mercurial repository; false for a Git repository. + IsMercurial *bool + + // Repository or source control URL. + RepoURL *string +} + +// 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 { + // List of application settings names. + AppSettingNames []*string + + // List of external Azure storage account identifiers. + AzureStorageConfigNames []*string + + // List of connection string names. + ConnectionStringNames []*string +} + +// SlotConfigNamesResource - Slot Config names azure resource. +type SlotConfigNamesResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *SlotConfigNames + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SlotDifference - A setting difference between two deployment slots of an app. +type SlotDifference struct { + // Kind of resource. + Kind *string + + // SlotDifference resource specific properties + Properties *SlotDifferenceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SlotDifferenceCollection - Collection of slot differences. +type SlotDifferenceCollection struct { + // REQUIRED; Collection of resources. + Value []*SlotDifference + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// SlotDifferenceProperties - SlotDifference resource specific properties +type SlotDifferenceProperties struct { + // READ-ONLY; Description of the setting difference. + Description *string + + // READ-ONLY; Rule that describes how to process the setting difference during a slot swap. + DiffRule *string + + // READ-ONLY; Level of the difference: Information, Warning or Error. + Level *string + + // READ-ONLY; Name of the setting. + SettingName *string + + // READ-ONLY; The type of the setting: General, AppSetting or ConnectionString. + SettingType *string + + // READ-ONLY; Value of the setting in the current slot. + ValueInCurrentSlot *string + + // READ-ONLY; Value of the setting in the target slot. + ValueInTargetSlot *string +} + +// SlotSwapStatus - The status of the last successful slot swap operation. +type SlotSwapStatus struct { + // READ-ONLY; The destination slot of the last swap operation. + DestinationSlotName *string + + // READ-ONLY; The source slot of the last swap operation. + SourceSlotName *string + + // READ-ONLY; The time the last successful slot swap completed. + TimestampUTC *time.Time +} + +// SlowRequestsBasedTrigger - Trigger based on request execution time. +type SlowRequestsBasedTrigger struct { + // Request Count. + Count *int32 + + // Request Path. + Path *string + + // Time interval. + TimeInterval *string + + // Time taken. + TimeTaken *string +} + +// Snapshot - A snapshot of an app. +type Snapshot struct { + // Kind of resource. + Kind *string + + // Snapshot resource specific properties + Properties *SnapshotProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SnapshotCollection - Collection of snapshots which can be used to revert an app to a previous time. +type SnapshotCollection struct { + // REQUIRED; Collection of resources. + Value []*Snapshot + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// SnapshotProperties - Snapshot resource specific properties +type SnapshotProperties struct { + // READ-ONLY; The time the snapshot was taken. + Time *string +} + +// SnapshotRecoverySource - Specifies the web app that snapshot contents will be retrieved from. +type SnapshotRecoverySource struct { + // 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 + + // Geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS + Location *string +} + +// SnapshotRestoreRequest - Details about app recovery operation. +type SnapshotRestoreRequest struct { + // Kind of resource. + Kind *string + + // SnapshotRestoreRequest resource specific properties + Properties *SnapshotRestoreRequestProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SnapshotRestoreRequestProperties - SnapshotRestoreRequest resource specific properties +type SnapshotRestoreRequestProperties struct { + // REQUIRED; If true the restore operation can overwrite source app; otherwise, false. + Overwrite *bool + + // 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 + + // If true, site configuration, in addition to content, will be reverted. + RecoverConfiguration *bool + + // 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 + + // Point in time in which the app restore should be done, formatted as a DateTime string. + SnapshotTime *string + + // If true, the snapshot is retrieved from DRSecondary endpoint. + UseDRSecondary *bool +} + +// Solution - Class Representing Solution for problems detected. +type Solution struct { + // Solution Data. + Data [][]*NameValuePair + + // Description of the solution + Description *string + + // Display Name of the solution + DisplayName *string + + // Solution Id. + ID *float64 + + // Solution Metadata. + Metadata [][]*NameValuePair + + // Order of the solution. + Order *float64 + + // Type of Solution + Type *SolutionType +} + +// SourceControl - The source control OAuth token. +type SourceControl struct { + // Kind of resource. + Kind *string + + // SourceControl resource specific properties + Properties *SourceControlProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SourceControlCollection - Collection of source controls. +type SourceControlCollection struct { + // REQUIRED; Collection of resources. + Value []*SourceControl + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// SourceControlProperties - SourceControl resource specific properties +type SourceControlProperties struct { + // OAuth token expiration. + ExpirationTime *time.Time + + // OAuth refresh token. + RefreshToken *string + + // OAuth access token. + Token *string + + // OAuth access token secret. + TokenSecret *string +} + +// StackMajorVersion - Application stack major version. +type StackMajorVersion struct { + // Example: All the function apps need AppSetting: "FUNCTIONSWORKERRUNTIME" to be set stack name + AppSettingsDictionary map[string]any + + // true if this supports Application Insights; otherwise, false. + ApplicationInsights *bool + + // Application stack major version (display only). + DisplayVersion *string + + // true if this is the default major version; otherwise, false. + IsDefault *bool + + // true if this stack has been deprecated, otherwise false. + IsDeprecated *bool + + // true if this stack should be hidden for new customers on portal, otherwise false. + IsHidden *bool + + // true if this stack is in Preview, otherwise false. + IsPreview *bool + + // Minor versions associated with the major version. + MinorVersions []*StackMinorVersion + + // Application stack major version (runtime only). + RuntimeVersion *string + + // Example: All Linux Function Apps, need Use32BitWorkerProcess to be set to 0 + SiteConfigPropertiesDictionary map[string]any +} + +// StackMinorVersion - Application stack minor version. +type StackMinorVersion struct { + // Application stack minor version (display only). + DisplayVersion *string + + // true if this is the default minor version; otherwise, false. + IsDefault *bool + + // true if this supports Remote Debugging, otherwise false. + IsRemoteDebuggingEnabled *bool + + // Application stack minor version (runtime only). + RuntimeVersion *string +} + +// StampCapacity - Stamp capacity information. +type StampCapacity struct { + // Available capacity (# of machines, bytes of storage etc…). + AvailableCapacity *int64 + + // Shared/dedicated workers. + ComputeMode *ComputeModeOptions + + // If true, it includes basic apps. Basic apps are not used for capacity allocation. + ExcludeFromCapacityAllocation *bool + + // true if capacity is applicable for all apps; otherwise, false. + IsApplicableForAllComputeModes *bool + + // Is this a linux stamp capacity + IsLinux *bool + + // Name of the stamp. + Name *string + + // Shared or Dedicated. + SiteMode *string + + // Total capacity (# of machines, bytes of storage etc…). + TotalCapacity *int64 + + // Name of the unit. + Unit *string + + // Size of the machines. + WorkerSize *WorkerSizeOptions + + // Size ID of machines: 0 - Small 1 - Medium 2 - Large + WorkerSizeID *int32 +} + +// StampCapacityCollection - Collection of stamp capacities. +type StampCapacityCollection struct { + // REQUIRED; Collection of resources. + Value []*StampCapacity + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// StaticSite - A static site. +type StaticSite struct { + // false if config file is locked for this static web app; otherwise, true. + AllowConfigFileUpdates *bool + + // The target branch in the repository. + Branch *string + + // Build properties to configure on the repository. + BuildProperties *StaticSiteBuildProperties + + // State indicating the status of the enterprise grade CDN serving traffic to the static web app. + EnterpriseGradeCdnStatus *EnterpriseGradeCdnStatus + + // The provider that submitted the last deployment to the primary environment of the static site. + Provider *string + + // State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' + // or an empty string. + PublicNetworkAccess *string + + // A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. + RepositoryToken *string + + // URL for the repository of the static site. + RepositoryURL *string + + // State indicating whether staging environments are allowed or not allowed for a static web app. + StagingEnvironmentPolicy *StagingEnvironmentPolicy + + // Template options for generating a new repository. + TemplateProperties *StaticSiteTemplateOptions + + // READ-ONLY; The content distribution endpoint for the static site. + ContentDistributionEndpoint *string + + // READ-ONLY; The custom domains associated with this static site. + CustomDomains []*string + + // READ-ONLY; Database connections for the static site + DatabaseConnections []*DatabaseConnectionOverview + + // READ-ONLY; The default autogenerated hostname for the static site. + DefaultHostname *string + + // READ-ONLY; Identity to use for Key Vault Reference authentication. + KeyVaultReferenceIdentity *string + + // READ-ONLY; Backends linked to the static side + LinkedBackends []*StaticSiteLinkedBackend + + // READ-ONLY; Private endpoint connections + PrivateEndpointConnections []*ResponseMessageEnvelopeRemotePrivateEndpointConnection + + // READ-ONLY; User provided function apps registered with the static site + UserProvidedFunctionApps []*StaticSiteUserProvidedFunctionApp +} + +// StaticSiteARMResource - Static Site ARM resource. +type StaticSiteARMResource struct { + // REQUIRED; Resource Location. + Location *string + + // Managed service identity. + Identity *ManagedServiceIdentity + + // Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/ThingsYouShouldKnow/kindproperty.md#app-service-resource-kind-reference + // for + // details supported values for kind. + Kind *string + + // Core resource properties + Properties *StaticSite + + // Description of a SKU for a scalable resource. + SKU *SKUDescription + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteBasicAuthPropertiesARMResource - Static site basic auth properties ARM resource. +type StaticSiteBasicAuthPropertiesARMResource struct { + // Kind of resource. + Kind *string + + // StaticSiteBasicAuthPropertiesARMResource resource specific properties + Properties *StaticSiteBasicAuthPropertiesARMResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteBasicAuthPropertiesARMResourceProperties - StaticSiteBasicAuthPropertiesARMResource resource specific properties +type StaticSiteBasicAuthPropertiesARMResourceProperties struct { + // REQUIRED; State indicating if basic auth is enabled and for what environments it is active. + ApplicableEnvironmentsMode *string + + // The list of enabled environments for Basic Auth if ApplicableEnvironmentsMode is set to SpecifiedEnvironments. + Environments []*string + + // The password for basic auth. + Password *string + + // Url to the secret in Key Vault. + SecretURL *string + + // READ-ONLY; State indicating if basic auth has a secret and what type it is. + SecretState *string +} + +// StaticSiteBasicAuthPropertiesCollection - Collection of static site basic auth. +type StaticSiteBasicAuthPropertiesCollection struct { + // REQUIRED; Collection of resources. + Value []*StaticSiteBasicAuthPropertiesARMResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// StaticSiteBuildARMResource - Static Site Build ARM resource. +type StaticSiteBuildARMResource struct { + // Kind of resource. + Kind *string + + // StaticSiteBuildARMResource resource specific properties + Properties *StaticSiteBuildARMResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteBuildARMResourceProperties - StaticSiteBuildARMResource resource specific properties +type StaticSiteBuildARMResourceProperties struct { + // READ-ONLY; An identifier for the static site build. + BuildID *string + + // READ-ONLY; When this build was created. + CreatedTimeUTC *time.Time + + // READ-ONLY; Database connections for the static site build + DatabaseConnections []*DatabaseConnectionOverview + + // READ-ONLY; The hostname for a static site build. + Hostname *string + + // READ-ONLY; When this build was updated. + LastUpdatedOn *time.Time + + // READ-ONLY; Backends linked to the static side build + LinkedBackends []*StaticSiteLinkedBackend + + // READ-ONLY; The title of a pull request that a static site build is related to. + PullRequestTitle *string + + // READ-ONLY; The source branch. + SourceBranch *string + + // READ-ONLY; The status of the static site build. + Status *BuildStatus + + // READ-ONLY; User provided function apps registered with the static site build + UserProvidedFunctionApps []*StaticSiteUserProvidedFunctionApp +} + +// StaticSiteBuildCollection - Collection of static site builds. +type StaticSiteBuildCollection struct { + // REQUIRED; Collection of resources. + Value []*StaticSiteBuildARMResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// StaticSiteBuildProperties - Build properties for the static site. +type StaticSiteBuildProperties struct { + // A custom command to run during deployment of the Azure Functions API application. + APIBuildCommand *string + + // The path to the api code within the repository. + APILocation *string + + // Deprecated: The path of the app artifacts after building (deprecated in favor of OutputLocation) + AppArtifactLocation *string + + // A custom command to run during deployment of the static content application. + AppBuildCommand *string + + // The path to the app code within the repository. + AppLocation *string + + // Github Action secret name override. + GithubActionSecretNameOverride *string + + // The output path of the app after building. + OutputLocation *string + + // Skip Github Action workflow generation. + SkipGithubActionWorkflowGeneration *bool +} + +// StaticSiteCollection - Collection of static sites. +type StaticSiteCollection struct { + // REQUIRED; Collection of resources. + Value []*StaticSiteARMResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// StaticSiteCustomDomainOverviewARMResource - Static Site Custom Domain Overview ARM resource. +type StaticSiteCustomDomainOverviewARMResource struct { + // Kind of resource. + Kind *string + + // StaticSiteCustomDomainOverviewARMResource resource specific properties + Properties *StaticSiteCustomDomainOverviewARMResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteCustomDomainOverviewARMResourceProperties - StaticSiteCustomDomainOverviewARMResource resource specific properties +type StaticSiteCustomDomainOverviewARMResourceProperties struct { + // READ-ONLY; The date and time on which the custom domain was created for the static site. + CreatedOn *time.Time + + // READ-ONLY; The domain name for the static site custom domain. + DomainName *string + + // READ-ONLY + ErrorMessage *string + + // READ-ONLY; The status of the custom domain + Status *CustomDomainStatus + + // READ-ONLY; The TXT record validation token + ValidationToken *string +} + +// StaticSiteCustomDomainOverviewCollection - Collection of static site custom domains. +type StaticSiteCustomDomainOverviewCollection struct { + // REQUIRED; Collection of resources. + Value []*StaticSiteCustomDomainOverviewARMResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// StaticSiteCustomDomainRequestPropertiesARMResource - Static Site Custom Domain Request Properties ARM resource. +type StaticSiteCustomDomainRequestPropertiesARMResource struct { + // Kind of resource. + Kind *string + + // StaticSiteCustomDomainRequestPropertiesARMResource resource specific properties + Properties *StaticSiteCustomDomainRequestPropertiesARMResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteCustomDomainRequestPropertiesARMResourceProperties - StaticSiteCustomDomainRequestPropertiesARMResource resource +// specific properties +type StaticSiteCustomDomainRequestPropertiesARMResourceProperties struct { + // Validation method for adding a custom domain + ValidationMethod *string +} + +// StaticSiteDatabaseConnectionConfigurationFileOverview - A database connection configuration file +type StaticSiteDatabaseConnectionConfigurationFileOverview struct { + // READ-ONLY; The Base64 encoding of the file contents. + Contents *string + + // READ-ONLY; The name of the configuration file. + FileName *string + + // READ-ONLY; The type of configuration file. + Type *string +} + +// StaticSiteFunctionOverviewARMResource - Static Site Function Overview ARM resource. +type StaticSiteFunctionOverviewARMResource struct { + // Kind of resource. + Kind *string + + // StaticSiteFunctionOverviewARMResource resource specific properties + Properties *StaticSiteFunctionOverviewARMResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteFunctionOverviewARMResourceProperties - StaticSiteFunctionOverviewARMResource resource specific properties +type StaticSiteFunctionOverviewARMResourceProperties struct { + // READ-ONLY; The name for the function + FunctionName *string + + // READ-ONLY; The trigger type of the function + TriggerType *TriggerTypes +} + +// StaticSiteFunctionOverviewCollection - Collection of static site functions. +type StaticSiteFunctionOverviewCollection struct { + // REQUIRED; Collection of resources. + Value []*StaticSiteFunctionOverviewARMResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// StaticSiteLinkedBackend - Static Site Linked Backend ARM resource. +type StaticSiteLinkedBackend struct { + // The resource id of the backend linked to the static site + BackendResourceID *string + + // The region of the backend linked to the static site + Region *string + + // READ-ONLY; The date and time on which the backend was linked to the static site. + CreatedOn *time.Time + + // READ-ONLY; The provisioning state of the linking process. + ProvisioningState *string +} + +// StaticSiteLinkedBackendARMResource - Static Site Linked Backend ARM resource. +type StaticSiteLinkedBackendARMResource struct { + // Kind of resource. + Kind *string + + // StaticSiteLinkedBackendARMResource resource specific properties + Properties *StaticSiteLinkedBackendARMResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteLinkedBackendARMResourceProperties - StaticSiteLinkedBackendARMResource resource specific properties +type StaticSiteLinkedBackendARMResourceProperties struct { + // The resource id of the backend linked to the static site + BackendResourceID *string + + // The region of the backend linked to the static site + Region *string + + // READ-ONLY; The date and time on which the backend was linked to the static site. + CreatedOn *time.Time + + // READ-ONLY; The provisioning state of the linking process. + ProvisioningState *string +} + +// StaticSiteLinkedBackendsCollection - Collection of static site linked backends. +type StaticSiteLinkedBackendsCollection struct { + // REQUIRED; Collection of resources. + Value []*StaticSiteLinkedBackendARMResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// StaticSitePatchResource - ARM resource for a static site when patching +type StaticSitePatchResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *StaticSite + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteResetPropertiesARMResource - Static Site Reset Properties ARM resource. +type StaticSiteResetPropertiesARMResource struct { + // Kind of resource. + Kind *string + + // StaticSiteResetPropertiesARMResource resource specific properties + Properties *StaticSiteResetPropertiesARMResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteResetPropertiesARMResourceProperties - StaticSiteResetPropertiesARMResource resource specific properties +type StaticSiteResetPropertiesARMResourceProperties struct { + // The token which proves admin privileges to the repository. + RepositoryToken *string + + // Determines whether the repository should be updated with the new properties. + ShouldUpdateRepository *bool +} + +// StaticSiteTemplateOptions - Template Options for the static site. +type StaticSiteTemplateOptions struct { + // Description of the newly generated repository. + Description *string + + // Whether or not the newly generated repository is a private repository. Defaults to false (i.e. public). + IsPrivate *bool + + // Owner of the newly generated repository. + Owner *string + + // Name of the newly generated repository. + RepositoryName *string + + // URL of the template repository. The newly generated repository will be based on this one. + TemplateRepositoryURL *string +} + +// StaticSiteUserARMResource - Static Site User ARM resource. +type StaticSiteUserARMResource struct { + // Kind of resource. + Kind *string + + // StaticSiteUserARMResource resource specific properties + Properties *StaticSiteUserARMResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteUserARMResourceProperties - StaticSiteUserARMResource resource specific properties +type StaticSiteUserARMResourceProperties struct { + // The roles for the static site user, in free-form string format + Roles *string + + // READ-ONLY; The display name for the static site user. + DisplayName *string + + // READ-ONLY; The identity provider for the static site user. + Provider *string + + // READ-ONLY; The user id for the static site user. + UserID *string +} + +// StaticSiteUserCollection - Collection of static site custom users. +type StaticSiteUserCollection struct { + // REQUIRED; Collection of resources. + Value []*StaticSiteUserARMResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// StaticSiteUserInvitationRequestResource - Static sites user roles invitation resource. +type StaticSiteUserInvitationRequestResource struct { + // Kind of resource. + Kind *string + + // StaticSiteUserInvitationRequestResource resource specific properties + Properties *StaticSiteUserInvitationRequestResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteUserInvitationRequestResourceProperties - StaticSiteUserInvitationRequestResource resource specific properties +type StaticSiteUserInvitationRequestResourceProperties struct { + // The domain name for the static site custom domain. + Domain *string + + // The number of hours the sas token stays valid + NumHoursToExpiration *int32 + + // The identity provider for the static site user. + Provider *string + + // The roles for the static site user, in free-form string format + Roles *string + + // The user id for the static site user. + UserDetails *string +} + +// StaticSiteUserInvitationResponseResource - Static sites user roles invitation link resource. +type StaticSiteUserInvitationResponseResource struct { + // Kind of resource. + Kind *string + + // StaticSiteUserInvitationResponseResource resource specific properties + Properties *StaticSiteUserInvitationResponseResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteUserInvitationResponseResourceProperties - StaticSiteUserInvitationResponseResource resource specific properties +type StaticSiteUserInvitationResponseResourceProperties struct { + // READ-ONLY; The expiration time of the invitation + ExpiresOn *time.Time + + // READ-ONLY; The url for the invitation link + InvitationURL *string +} + +// StaticSiteUserProvidedFunctionApp - A static site user provided function. +type StaticSiteUserProvidedFunctionApp struct { + // Kind of resource. + Kind *string + + // StaticSiteUserProvidedFunctionApp resource specific properties + Properties *StaticSiteUserProvidedFunctionAppProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteUserProvidedFunctionAppARMResource - Static Site User Provided Function App ARM resource. +type StaticSiteUserProvidedFunctionAppARMResource struct { + // Kind of resource. + Kind *string + + // StaticSiteUserProvidedFunctionAppARMResource resource specific properties + Properties *StaticSiteUserProvidedFunctionAppARMResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSiteUserProvidedFunctionAppARMResourceProperties - StaticSiteUserProvidedFunctionAppARMResource resource specific +// properties +type StaticSiteUserProvidedFunctionAppARMResourceProperties struct { + // The region of the function app registered with the static site + FunctionAppRegion *string + + // The resource id of the function app registered with the static site + FunctionAppResourceID *string + + // READ-ONLY; The date and time on which the function app was registered with the static site. + CreatedOn *time.Time +} + +// StaticSiteUserProvidedFunctionAppProperties - StaticSiteUserProvidedFunctionApp resource specific properties +type StaticSiteUserProvidedFunctionAppProperties struct { + // The region of the function app registered with the static site + FunctionAppRegion *string + + // The resource id of the function app registered with the static site + FunctionAppResourceID *string + + // READ-ONLY; The date and time on which the function app was registered with the static site. + CreatedOn *time.Time +} + +// StaticSiteUserProvidedFunctionAppsCollection - Collection of static site user provided function apps. +type StaticSiteUserProvidedFunctionAppsCollection struct { + // REQUIRED; Collection of resources. + Value []*StaticSiteUserProvidedFunctionAppARMResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// StaticSiteZipDeployment - A static site zip deployment. +type StaticSiteZipDeployment struct { + // URL for the zipped api content + APIZipURL *string + + // URL for the zipped app content + AppZipURL *string + + // A title to label the deployment + DeploymentTitle *string + + // The language of the api content, if it exists + FunctionLanguage *string + + // The provider submitting this deployment + Provider *string +} + +// StaticSiteZipDeploymentARMResource - Static site zip deployment ARM resource. +type StaticSiteZipDeploymentARMResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *StaticSiteZipDeployment + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSitesWorkflowPreview - Preview for the Static Site Workflow to be generated +type StaticSitesWorkflowPreview struct { + // Kind of resource. + Kind *string + + // StaticSitesWorkflowPreview resource specific properties + Properties *StaticSitesWorkflowPreviewProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSitesWorkflowPreviewProperties - StaticSitesWorkflowPreview resource specific properties +type StaticSitesWorkflowPreviewProperties struct { + // READ-ONLY; The contents for the workflow file to be generated + Contents *string + + // READ-ONLY; The path for the workflow file to be generated + Path *string +} + +// StaticSitesWorkflowPreviewRequest - Request entity for previewing the Static Site workflow +type StaticSitesWorkflowPreviewRequest struct { + // Kind of resource. + Kind *string + + // StaticSitesWorkflowPreviewRequest resource specific properties + Properties *StaticSitesWorkflowPreviewRequestProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StaticSitesWorkflowPreviewRequestProperties - StaticSitesWorkflowPreviewRequest resource specific properties +type StaticSitesWorkflowPreviewRequestProperties struct { + // The target branch in the repository. + Branch *string + + // Build properties to configure on the repository. + BuildProperties *StaticSiteBuildProperties + + // URL for the repository of the static site. + RepositoryURL *string +} + +// Status - Identify the status of the most severe insight generated by the detector. +type Status struct { + // Descriptive message. + Message *string + + // Level of the most severe insight generated by the detector. + StatusID *InsightStatus +} + +// StatusCodesBasedTrigger - Trigger based on status code. +type StatusCodesBasedTrigger struct { + // Request Count. + Count *int32 + + // Request Path + Path *string + + // HTTP status code. + Status *int32 + + // Request Sub Status. + SubStatus *int32 + + // Time interval. + TimeInterval *string + + // Win32 error code. + Win32Status *int32 +} + +// StatusCodesRangeBasedTrigger - Trigger based on range of status codes. +type StatusCodesRangeBasedTrigger struct { + // Request Count. + Count *int32 + Path *string + + // HTTP status code. + StatusCodes *string + + // Time interval. + TimeInterval *string +} + +// StorageMigrationOptions - Options for app content migration. +type StorageMigrationOptions struct { + // Kind of resource. + Kind *string + + // StorageMigrationOptions resource specific properties + Properties *StorageMigrationOptionsProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StorageMigrationOptionsProperties - StorageMigrationOptions resource specific properties +type StorageMigrationOptionsProperties struct { + // REQUIRED; AzureFiles connection string. + AzurefilesConnectionString *string + + // REQUIRED; AzureFiles share. + AzurefilesShare *string + + // true if the app should be read only during copy operation; otherwise, false. + BlockWriteAccessToSite *bool + + // trueif the app should be switched over; otherwise, false. + SwitchSiteAfterMigration *bool +} + +// StorageMigrationResponse - Response for a migration of app content request. +type StorageMigrationResponse struct { + // Kind of resource. + Kind *string + + // StorageMigrationResponse resource specific properties + Properties *StorageMigrationResponseProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StorageMigrationResponseProperties - StorageMigrationResponse resource specific properties +type StorageMigrationResponseProperties struct { + // READ-ONLY; When server starts the migration process, it will return an operation ID identifying that particular migration + // operation. + OperationID *string +} + +// StringDictionary - String dictionary resource. +type StringDictionary struct { + // Kind of resource. + Kind *string + + // Settings. + Properties map[string]*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// StringList - String list resource. +type StringList struct { + // Kind of resource. + Kind *string + + // List of string resources. + Properties []*string + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SubResource - The sub resource type. +type SubResource struct { + // READ-ONLY; The resource id. + ID *string +} + +// SupportTopic - Defines a unique Support Topic +type SupportTopic struct { + // READ-ONLY; Support Topic Id + ID *string + + // READ-ONLY; Unique resource Id + PesID *string +} + +// SwiftVirtualNetwork - Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network +// integration. +type SwiftVirtualNetwork struct { + // Kind of resource. + Kind *string + + // SwiftVirtualNetwork resource specific properties + Properties *SwiftVirtualNetworkProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SwiftVirtualNetworkProperties - SwiftVirtualNetwork resource specific properties +type SwiftVirtualNetworkProperties struct { + // 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 + + // A flag that specifies if the scale unit this Web App is on supports Swift integration. + SwiftSupported *bool +} + +// 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 { + // List of container definitions for the Container App. + Containers []*Container + + // Dapr configuration for the Container App. + Dapr *Dapr + + // User friendly suffix that is appended to the revision name + RevisionSuffix *string + + // Scaling properties for the Container App. + Scale *Scale +} + +// TldLegalAgreement - Legal agreement for a top level domain. +type TldLegalAgreement struct { + // REQUIRED; Unique identifier for the agreement. + AgreementKey *string + + // REQUIRED; Agreement details. + Content *string + + // REQUIRED; Agreement title. + Title *string + + // URL where a copy of the agreement details is hosted. + URL *string +} + +// TldLegalAgreementCollection - Collection of top-level domain legal agreements. +type TldLegalAgreementCollection struct { + // REQUIRED; Collection of resources. + Value []*TldLegalAgreement + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// TokenStore - The configuration settings of the token store. +type TokenStore struct { + // The configuration settings of the storage of the tokens if blob storage is used. + AzureBlobStorage *BlobStorageTokenStore + + // true to durably store platform-specific security tokens that are obtained during login flows; otherwise, false. The default + // is false. + Enabled *bool + + // The configuration settings of the storage of the tokens if a file system is used. + FileSystem *FileSystemTokenStore + + // 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 +} + +// TopLevelDomain - A top level domain object. +type TopLevelDomain struct { + // Kind of resource. + Kind *string + + // TopLevelDomain resource specific properties + Properties *TopLevelDomainProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// TopLevelDomainAgreementOption - Options for retrieving the list of top level domain legal agreements. +type TopLevelDomainAgreementOption struct { + // If true, then the list of agreements will include agreements for domain transfer as well; otherwise, false. + ForTransfer *bool + + // If true, then the list of agreements will include agreements for domain privacy as well; otherwise, false. + IncludePrivacy *bool +} + +// TopLevelDomainCollection - Collection of Top-level domains. +type TopLevelDomainCollection struct { + // REQUIRED; Collection of resources. + Value []*TopLevelDomain + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// TopLevelDomainProperties - TopLevelDomain resource specific properties +type TopLevelDomainProperties struct { + // If true, then the top level domain supports domain privacy; otherwise, false. + Privacy *bool +} + +// TrafficWeight - Traffic weight assigned to a revision +type TrafficWeight struct { + // Indicates that the traffic weight belongs to a latest stable revision + LatestRevision *bool + + // Name of a revision + RevisionName *string + + // Traffic weight assigned to a revision + Weight *int32 +} + +// TriggeredJobHistory - Triggered Web Job History. List of Triggered Web Job Run Information elements. +type TriggeredJobHistory struct { + // Kind of resource. + Kind *string + + // TriggeredJobHistory resource specific properties + Properties *TriggeredJobHistoryProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// TriggeredJobHistoryCollection - Collection of Kudu continuous web job information elements. +type TriggeredJobHistoryCollection struct { + // REQUIRED; Collection of resources. + Value []*TriggeredJobHistory + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// TriggeredJobHistoryProperties - TriggeredJobHistory resource specific properties +type TriggeredJobHistoryProperties struct { + // List of triggered web job runs. + Runs []*TriggeredJobRun +} + +// TriggeredJobRun - Triggered Web Job Run Information. +type TriggeredJobRun struct { + // Job duration. + Duration *string + + // End time. + EndTime *time.Time + + // Error URL. + ErrorURL *string + + // Job name. + JobName *string + + // Output URL. + OutputURL *string + + // Start time. + StartTime *time.Time + + // Job status. + Status *TriggeredWebJobStatus + + // Job trigger. + Trigger *string + + // Job URL. + URL *string + + // Job ID. + WebJobID *string + + // Job name. + WebJobName *string +} + +// TriggeredWebJob - Triggered Web Job Information. +type TriggeredWebJob struct { + // Kind of resource. + Kind *string + + // TriggeredWebJob resource specific properties + Properties *TriggeredWebJobProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// TriggeredWebJobCollection - Collection of Kudu continuous web job information elements. +type TriggeredWebJobCollection struct { + // REQUIRED; Collection of resources. + Value []*TriggeredWebJob + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// TriggeredWebJobProperties - TriggeredWebJob resource specific properties +type TriggeredWebJobProperties struct { + // Error information. + Error *string + + // Extra Info URL. + ExtraInfoURL *string + + // History URL. + HistoryURL *string + + // Latest job run information. + LatestRun *TriggeredJobRun + + // Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + PublicNetworkAccess *string + + // Run command. + RunCommand *string + + // Scheduler Logs URL. + SchedulerLogsURL *string + + // Job settings. + Settings map[string]any + + // Checks if Customer provided storage account is required + StorageAccountRequired *bool + + // Job URL. + URL *string + + // Using SDK? + UsingSdk *bool + + // Job type. + WebJobType *WebJobType +} + +// Twitter - The configuration settings of the Twitter provider. +type Twitter struct { + // false if the Twitter provider should not be enabled despite the set registration; otherwise, true. + Enabled *bool + + // The configuration settings of the app registration for the Twitter provider. + Registration *TwitterRegistration +} + +// TwitterRegistration - The configuration settings of the app registration for the Twitter provider. +type TwitterRegistration struct { + // 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 + + // The app setting name that contains the OAuth 1.0a consumer secret of the Twitter application used for sign-in. + ConsumerSecretSettingName *string +} + +// Usage of the quota resource. +type Usage struct { + // Kind of resource. + Kind *string + + // Usage resource specific properties + Properties *UsageProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// UsageCollection - Collection of usages. +type UsageCollection struct { + // REQUIRED; Collection of resources. + Value []*Usage + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// UsageProperties - Usage resource specific properties +type UsageProperties struct { + // READ-ONLY; Compute mode used for this usage. + ComputeMode *ComputeModeOptions + + // READ-ONLY; The current value of the resource counter. + CurrentValue *int64 + + // READ-ONLY; Friendly name shown in the UI. + DisplayName *string + + // READ-ONLY; The resource limit. + Limit *int64 + + // READ-ONLY; Next reset time for the resource counter. + NextResetTime *time.Time + + // READ-ONLY; Name of the quota resource. + ResourceName *string + + // READ-ONLY; Site mode used for this usage. + SiteMode *string + + // READ-ONLY; Units of measurement for the quota resource. + Unit *string +} + +// User credentials used for publishing activity. +type User struct { + // Kind of resource. + Kind *string + + // User resource specific properties + Properties *UserProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// UserAssignedIdentity - User Assigned identity. +type UserAssignedIdentity struct { + // READ-ONLY; Client Id of user assigned identity + ClientID *string + + // READ-ONLY; Principal Id of user assigned identity + PrincipalID *string +} + +// UserProperties - User resource specific properties +type UserProperties struct { + // REQUIRED; Username used for publishing. + PublishingUserName *string + + // Password used for publishing. + PublishingPassword *string + + // Password hash used for publishing. + PublishingPasswordHash *string + + // Password hash salt used for publishing. + PublishingPasswordHashSalt *string + + // Url of SCM site. + ScmURI *string +} + +// ValidateProperties - App properties used for validation. +type ValidateProperties struct { + // App Service Environment Properties + AppServiceEnvironment *Environment + + // Target capacity of the App Service plan (number of VMs). + Capacity *int32 + + // Platform (windows or linux) + ContainerImagePlatform *string + + // Repository name (image name) + ContainerImageRepository *string + + // Image tag + ContainerImageTag *string + + // Base URL of the container registry + ContainerRegistryBaseURL *string + + // Password for to access the container registry + ContainerRegistryPassword *string + + // Username for to access the container registry + ContainerRegistryUsername *string + + // Name of App Service Environment where app or App Service plan should be created. + HostingEnvironment *string + + // true if App Service plan is for Spot instances; otherwise, false. + IsSpot *bool + + // true if App Service plan is running as a windows container + IsXenon *bool + + // true if App Service plan is for Linux workers; otherwise, false. + NeedLinuxWorkers *bool + + // Name of the target SKU for the App Service plan. + SKUName *string + + // ARM resource ID of an App Service plan that would host the app. + ServerFarmID *string +} + +// ValidateRequest - Resource validation request content. +type ValidateRequest struct { + // REQUIRED; Expected location of the resource. + Location *string + + // REQUIRED; Resource name to verify. + Name *string + + // REQUIRED; Properties of the resource to validate. + Properties *ValidateProperties + + // REQUIRED; Resource type used for verification. + Type *ValidateResourceTypes +} + +// ValidateResponse - Describes the result of resource validation. +type ValidateResponse struct { + // Error details for the case when validation fails. + Error *ValidateResponseError + + // Result of validation. + Status *string +} + +// ValidateResponseError - Error details for when validation fails. +type ValidateResponseError struct { + // Validation error code. + Code *string + + // Validation error message. + Message *string +} + +// VirtualApplication - Virtual application in an app. +type VirtualApplication struct { + // Physical path. + PhysicalPath *string + + // true if preloading is enabled; otherwise, false. + PreloadEnabled *bool + + // Virtual directories for virtual application. + VirtualDirectories []*VirtualDirectory + + // Virtual path. + VirtualPath *string +} + +// VirtualDirectory - Directory for virtual application. +type VirtualDirectory struct { + // Physical path. + PhysicalPath *string + + // Path to virtual application. + VirtualPath *string +} + +// VirtualIPMapping - Virtual IP mapping. +type VirtualIPMapping struct { + // Is virtual IP mapping in use. + InUse *bool + + // Internal HTTP port. + InternalHTTPPort *int32 + + // Internal HTTPS port. + InternalHTTPSPort *int32 + + // name of the service that virtual IP is assigned to + ServiceName *string + + // Virtual IP address. + VirtualIP *string +} + +// VirtualNetworkProfile - Specification for using a Virtual Network. +type VirtualNetworkProfile struct { + // REQUIRED; Resource id of the Virtual Network. + ID *string + + // Subnet within the Virtual Network. + Subnet *string + + // READ-ONLY; Name of the Virtual Network (read-only). + Name *string + + // READ-ONLY; Resource type of the Virtual Network (read-only). + Type *string +} + +// VnetGateway - The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN +// package. +type VnetGateway struct { + // Kind of resource. + Kind *string + + // VnetGateway resource specific properties + Properties *VnetGatewayProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VnetGatewayProperties - VnetGateway resource specific properties +type VnetGatewayProperties struct { + // REQUIRED; The URI where the VPN package can be downloaded. + VPNPackageURI *string + + // The Virtual Network name. + VnetName *string +} + +// VnetInfo - Virtual Network information contract. +type VnetInfo struct { + // A certificate file (.cer) blob containing the public key of the private key used to authenticate a Point-To-Site VPN connection. + CertBlob *string + + // DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. + DNSServers *string + + // Flag that is used to denote if this is VNET injection + IsSwift *bool + + // The Virtual Network's resource ID. + VnetResourceID *string + + // READ-ONLY; The client certificate thumbprint. + CertThumbprint *string + + // READ-ONLY; true if a resync is required; otherwise, false. + ResyncRequired *bool + + // READ-ONLY; The routes that this Virtual Network connection uses. + Routes []*VnetRoute +} + +// VnetInfoResource - Virtual Network information ARM resource. +type VnetInfoResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *VnetInfo + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VnetParameters - The required set of inputs to validate a VNET +type VnetParameters struct { + // Kind of resource. + Kind *string + + // VnetParameters resource specific properties + Properties *VnetParametersProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VnetParametersProperties - VnetParameters resource specific properties +type VnetParametersProperties struct { + // The ARM Resource ID of the subnet to validate + SubnetResourceID *string + + // The name of the VNET to be validated + VnetName *string + + // The Resource Group of the VNET to be validated + VnetResourceGroup *string + + // The subnet name to be validated + VnetSubnetName *string +} + +// VnetRoute - Virtual Network route contract used to pass routing information for a Virtual Network. +type VnetRoute struct { + // Kind of resource. + Kind *string + + // VnetRoute resource specific properties + Properties *VnetRouteProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VnetRouteProperties - VnetRoute resource specific properties +type VnetRouteProperties struct { + // The ending address for this route. If the start address is specified in CIDR notation, this must be omitted. + EndAddress *string + + // 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. + RouteType *RouteType + + // 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 +} + +// VnetValidationFailureDetails - A class that describes the reason for a validation failure. +type VnetValidationFailureDetails struct { + // Kind of resource. + Kind *string + + // VnetValidationFailureDetails resource specific properties + Properties *VnetValidationFailureDetailsProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VnetValidationFailureDetailsProperties - VnetValidationFailureDetails resource specific properties +type VnetValidationFailureDetailsProperties struct { + // A flag describing whether or not validation failed. + Failed *bool + + // A list of tests that failed in the validation. + FailedTests []*VnetValidationTestFailure + + // Text describing the validation outcome. + Message *string + + // A list of warnings generated during validation. + Warnings []*VnetValidationTestFailure +} + +// VnetValidationTestFailure - A class that describes a test that failed during NSG and UDR validation. +type VnetValidationTestFailure struct { + // Kind of resource. + Kind *string + + // VnetValidationTestFailure resource specific properties + Properties *VnetValidationTestFailureProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VnetValidationTestFailureProperties - VnetValidationTestFailure resource specific properties +type VnetValidationTestFailureProperties struct { + // The details of what caused the failure, e.g. the blocking rule name, etc. + Details *string + + // The name of the test that failed. + TestName *string +} + +type VolumeMount struct { + // REQUIRED; Target path on the container where volume is mounted on + ContainerMountPath *string + + // REQUIRED; Sub path in the volume where volume is mounted from. + VolumeSubPath *string + + // Config Data to be mounted on the volume + Data *string + + // Boolean to specify if the mount is read only on the container + ReadOnly *bool +} + +// WebAppCollection - Collection of App Service apps. +type WebAppCollection struct { + // REQUIRED; Collection of resources. + Value []*Site + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// WebAppInstanceStatusCollection - Collection of app instances. +type WebAppInstanceStatusCollection struct { + // REQUIRED; Collection of resources. + Value []*WebSiteInstanceStatus + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// WebAppMajorVersion - Web App stack major version. +type WebAppMajorVersion struct { + // READ-ONLY; Web App stack major version (display only). + DisplayText *string + + // READ-ONLY; Minor versions associated with the major version. + MinorVersions []*WebAppMinorVersion + + // READ-ONLY; Web App stack major version name. + Value *string +} + +// WebAppMinorVersion - Web App stack minor version. +type WebAppMinorVersion struct { + // READ-ONLY; Web App stack minor version (display only). + DisplayText *string + + // READ-ONLY; Settings associated with the minor version. + StackSettings *WebAppRuntimes + + // READ-ONLY; Web App stack major version name. + Value *string +} + +// WebAppRuntimeSettings - Web App runtime settings. +type WebAppRuntimeSettings struct { + // READ-ONLY; Application Insights settings associated with the minor version. + AppInsightsSettings *AppInsightsWebAppStackSettings + + // READ-ONLY; End-of-life date for the minor version. + EndOfLifeDate *time.Time + + // READ-ONLY; GitHub Actions settings associated with the minor version. + GitHubActionSettings *GitHubActionWebAppStackSettings + + // READ-ONLY; true if the stack version is auto-updated; otherwise, false. + IsAutoUpdate *bool + + // READ-ONLY; true if the stack is deprecated; otherwise, false. + IsDeprecated *bool + + // READ-ONLY; true if the minor version is early-access; otherwise, false. + IsEarlyAccess *bool + + // READ-ONLY; true if the stack should be hidden; otherwise, false. + IsHidden *bool + + // READ-ONLY; true if the stack is in preview; otherwise, false. + IsPreview *bool + + // READ-ONLY; true if remote debugging is supported for the stack; otherwise, false. + RemoteDebuggingSupported *bool + + // READ-ONLY; Web App stack minor version (runtime only). + RuntimeVersion *string +} + +// WebAppRuntimes - Web App stack runtimes. +type WebAppRuntimes struct { + // READ-ONLY; Linux-specific settings associated with the Java container minor version. + LinuxContainerSettings *LinuxJavaContainerSettings + + // READ-ONLY; Linux-specific settings associated with the minor version. + LinuxRuntimeSettings *WebAppRuntimeSettings + + // READ-ONLY; Windows-specific settings associated with the Java container minor version. + WindowsContainerSettings *WindowsJavaContainerSettings + + // READ-ONLY; Windows-specific settings associated with the minor version. + WindowsRuntimeSettings *WebAppRuntimeSettings +} + +// WebAppStack - Web App stack. +type WebAppStack struct { + // Kind of resource. + Kind *string + + // WebAppStack resource specific properties + Properties *WebAppStackProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Web App stack location. + Location *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// WebAppStackCollection - Collection of Web app Stacks +type WebAppStackCollection struct { + // REQUIRED; Collection of resources. + Value []*WebAppStack + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// WebAppStackProperties - WebAppStack resource specific properties +type WebAppStackProperties struct { + // READ-ONLY; Web App stack (display only). + DisplayText *string + + // READ-ONLY; List of major versions available. + MajorVersions []*WebAppMajorVersion + + // READ-ONLY; Web App stack preferred OS. + PreferredOs *StackPreferredOs + + // READ-ONLY; Web App stack name. + Value *string +} + +// WebJob - Web Job Information. +type WebJob struct { + // Kind of resource. + Kind *string + + // WebJob resource specific properties + Properties *WebJobProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// WebJobCollection - Collection of Kudu web job information elements. +type WebJobCollection struct { + // REQUIRED; Collection of resources. + Value []*WebJob + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// WebJobProperties - WebJob resource specific properties +type WebJobProperties struct { + // Error information. + Error *string + + // Extra Info URL. + ExtraInfoURL *string + + // Run command. + RunCommand *string + + // Job settings. + Settings map[string]any + + // Job URL. + URL *string + + // Using SDK? + UsingSdk *bool + + // Job type. + WebJobType *WebJobType +} + +type WebSiteInstanceStatus struct { + // Kind of resource. + Kind *string + + // WebSiteInstanceStatus resource specific properties + Properties *WebSiteInstanceStatusProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// WebSiteInstanceStatusProperties - WebSiteInstanceStatus resource specific properties +type WebSiteInstanceStatusProperties struct { + // Link to the console to web app instance + ConsoleURL *string + + // Dictionary of + Containers map[string]*ContainerInfo + + // Link to the Diagnose and Solve Portal + DetectorURL *string + + // Link to the console to web app instance + HealthCheckURL *string + + // The physical zone that the instance is in + PhysicalZone *string + State *SiteRuntimeState + + // Link to the GetStatusApi in Kudu + StatusURL *string +} + +// WindowsJavaContainerSettings - Windows Java Container settings. +type WindowsJavaContainerSettings struct { + // READ-ONLY; End-of-life date for the minor version. + EndOfLifeDate *time.Time + + // READ-ONLY; true if the stack version is auto-updated; otherwise, false. + IsAutoUpdate *bool + + // READ-ONLY; true if the stack is deprecated; otherwise, false. + IsDeprecated *bool + + // READ-ONLY; true if the minor version is early-access; otherwise, false. + IsEarlyAccess *bool + + // READ-ONLY; true if the stack should be hidden; otherwise, false. + IsHidden *bool + + // READ-ONLY; true if the stack is in preview; otherwise, false. + IsPreview *bool + + // READ-ONLY; Java container (runtime only). + JavaContainer *string + + // READ-ONLY; Java container version (runtime only). + JavaContainerVersion *string +} + +// WorkerPool - Worker pool of an App Service Environment. +type WorkerPool struct { + // Shared or dedicated app hosting. + ComputeMode *ComputeModeOptions + + // Number of instances in the worker pool. + WorkerCount *int32 + + // VM size of the worker pool instances. + WorkerSize *string + + // Worker size ID for referencing this worker pool. + WorkerSizeID *int32 + + // READ-ONLY; Names of all instances in the worker pool (read only). + InstanceNames []*string +} + +// WorkerPoolCollection - Collection of worker pools. +type WorkerPoolCollection struct { + // REQUIRED; Collection of resources. + Value []*WorkerPoolResource + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// WorkerPoolResource - Worker pool of an App Service Environment ARM resource. +type WorkerPoolResource struct { + // Kind of resource. + Kind *string + + // Core resource properties + Properties *WorkerPool + + // Description of a SKU for a scalable resource. + SKU *SKUDescription + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// Workflow - The workflow type. +type Workflow struct { + // Managed service identity. + Identity *ManagedServiceIdentity + + // The resource location. + Location *string + + // The workflow properties. + Properties *WorkflowProperties + + // The resource tags. + Tags map[string]*string + + // READ-ONLY; The resource id. + ID *string + + // READ-ONLY; Gets the resource name. + Name *string + + // READ-ONLY; Gets the resource type. + Type *string +} + +// WorkflowArtifacts - The workflow filter. +type WorkflowArtifacts struct { + // Application settings of the workflow. + AppSettings any + + // Files of the app. + Files map[string]any + + // Files of the app to delete. + FilesToDelete []*string +} + +// WorkflowEnvelope - Workflow properties definition. +type WorkflowEnvelope struct { + // The resource kind. + Kind *string + + // The resource location. + Location *string + + // Additional workflow properties. + Properties *WorkflowEnvelopeProperties + + // READ-ONLY; The resource id. + ID *string + + // READ-ONLY; Gets the resource name. + Name *string + + // READ-ONLY; Gets the resource type. + Type *string +} + +// WorkflowEnvelopeCollection - Collection of Kudu workflow information elements. +type WorkflowEnvelopeCollection struct { + // REQUIRED; Collection of resources. + Value []*WorkflowEnvelope + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// WorkflowEnvelopeProperties - Additional workflow properties. +type WorkflowEnvelopeProperties struct { + // Gets or sets the files. + Files map[string]any + + // Gets or sets the state of the workflow. + FlowState *WorkflowState + + // Gets or sets workflow health. + Health *WorkflowHealth +} + +// WorkflowFilter - The workflow filter. +type WorkflowFilter struct { + // The state of workflows. + State *WorkflowState +} + +// WorkflowHealth - Represents the workflow health. +type WorkflowHealth struct { + // REQUIRED; Gets or sets the workflow health state. + State *WorkflowHealthState + + // Gets or sets the workflow error. + Error *ErrorEntity +} + +// WorkflowListResult - The list of workflows. +type WorkflowListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The list of workflows. + Value []*Workflow +} + +// WorkflowOutputParameter - The workflow output parameter. +type WorkflowOutputParameter struct { + // The description. + Description *string + + // The metadata. + Metadata any + + // The type. + Type *ParameterType + + // The value. + Value any + + // READ-ONLY; Gets the error. + Error any +} + +// WorkflowParameter - The workflow parameters. +type WorkflowParameter struct { + // The description. + Description *string + + // The metadata. + Metadata any + + // The type. + Type *ParameterType + + // The value. + Value any +} + +// WorkflowProperties - The workflow properties. +type WorkflowProperties struct { + // The access control configuration. + AccessControl *FlowAccessControlConfiguration + + // The definition. + Definition any + + // The endpoints configuration. + EndpointsConfiguration *FlowEndpointsConfiguration + + // The integration account. + IntegrationAccount *ResourceReference + + // The integration service environment. + IntegrationServiceEnvironment *ResourceReference + + // The workflow kind. + Kind *Kind + + // The parameters. + Parameters map[string]*WorkflowParameter + + // The state. + State *WorkflowState + + // READ-ONLY; Gets the access endpoint. + AccessEndpoint *string + + // READ-ONLY; Gets the changed time. + ChangedTime *time.Time + + // READ-ONLY; Gets the created time. + CreatedTime *time.Time + + // READ-ONLY; Gets the provisioning state. + ProvisioningState *WorkflowProvisioningState + + // READ-ONLY; The sku. + SKU *WorkflowSKU + + // READ-ONLY; Gets the version. + Version *string +} + +// WorkflowResource - The base resource type. +type WorkflowResource struct { + // The resource location. + Location *string + + // The resource tags. + Tags map[string]*string + + // READ-ONLY; The resource id. + ID *string + + // READ-ONLY; Gets the resource name. + Name *string + + // READ-ONLY; Gets the resource type. + Type *string +} + +// WorkflowRun - The workflow run. +type WorkflowRun struct { + // The workflow run properties. + Properties *WorkflowRunProperties + + // READ-ONLY; The resource id. + ID *string + + // READ-ONLY; Gets the workflow run name. + Name *string + + // READ-ONLY; Gets the workflow run type. + Type *string +} + +// WorkflowRunAction - The workflow run action. +type WorkflowRunAction struct { + // The workflow run action properties. + Properties *WorkflowRunActionProperties + + // READ-ONLY; The resource id. + ID *string + + // READ-ONLY; Gets the workflow run action name. + Name *string + + // READ-ONLY; Gets the workflow run action type. + Type *string +} + +// WorkflowRunActionFilter - The workflow run action filter. +type WorkflowRunActionFilter struct { + // The status of workflow run action. + Status *WorkflowStatus +} + +// WorkflowRunActionListResult - The list of workflow run actions. +type WorkflowRunActionListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of workflow run actions. + Value []*WorkflowRunAction +} + +// WorkflowRunActionProperties - The workflow run action properties. +type WorkflowRunActionProperties struct { + // The correlation properties. + Correlation *RunActionCorrelation + + // Gets the retry histories. + RetryHistory []*RetryHistory + + // READ-ONLY; Gets the code. + Code *string + + // READ-ONLY; Gets the end time. + EndTime *time.Time + + // READ-ONLY; Gets the error. + Error any + + // READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink + + // READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink + + // READ-ONLY; Gets the start time. + StartTime *time.Time + + // READ-ONLY; Gets the status. + Status *WorkflowStatus + + // READ-ONLY; Gets the tracked properties. + TrackedProperties any + + // READ-ONLY; Gets the tracking id. + TrackingID *string +} + +// WorkflowRunActionRepetitionDefinition - The workflow run action repetition definition. +type WorkflowRunActionRepetitionDefinition struct { + // REQUIRED; The workflow run action repetition properties definition. + Properties *WorkflowRunActionRepetitionProperties + + // The resource location. + Location *string + + // The resource tags. + Tags map[string]*string + + // READ-ONLY; The resource id. + ID *string + + // READ-ONLY; Gets the resource name. + Name *string + + // READ-ONLY; Gets the resource type. + Type *string +} + +// WorkflowRunActionRepetitionDefinitionCollection - A collection of workflow run action repetitions. +type WorkflowRunActionRepetitionDefinitionCollection struct { + // The link used to get the next page of recommendations. + NextLink *string + Value []*WorkflowRunActionRepetitionDefinition +} + +// WorkflowRunActionRepetitionProperties - The workflow run action repetition properties definition. +type WorkflowRunActionRepetitionProperties struct { + // The workflow scope repetition code. + Code *string + + // The correlation properties. + Correlation *RunActionCorrelation + + // The end time of the workflow scope repetition. + EndTime *time.Time + + // Anything + Error any + IterationCount *int32 + + // The repetition indexes. + RepetitionIndexes []*RepetitionIndex + + // Gets the retry histories. + RetryHistory []*RetryHistory + + // The start time of the workflow scope repetition. + StartTime *time.Time + + // The status of the workflow scope repetition. + Status *WorkflowStatus + + // READ-ONLY; Gets the inputs. + Inputs any + + // READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink + + // READ-ONLY; Gets the outputs. + Outputs any + + // READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink + + // READ-ONLY; Gets the tracked properties. + TrackedProperties any + + // READ-ONLY; Gets the tracking id. + TrackingID *string +} + +// WorkflowRunFilter - The workflow run filter. +type WorkflowRunFilter struct { + // The status of workflow run. + Status *WorkflowStatus +} + +// WorkflowRunListResult - The list of workflow runs. +type WorkflowRunListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of workflow runs. + Value []*WorkflowRun +} + +// WorkflowRunProperties - The workflow run properties. +type WorkflowRunProperties struct { + // The run correlation. + Correlation *Correlation + + // READ-ONLY; Gets the code. + Code *string + + // READ-ONLY; Gets the correlation id. + CorrelationID *string + + // READ-ONLY; Gets the end time. + EndTime *time.Time + + // READ-ONLY; Gets the error. + Error any + + // READ-ONLY; Gets the outputs. + Outputs map[string]*WorkflowOutputParameter + + // READ-ONLY; Gets the response of the flow run. + Response *WorkflowRunTrigger + + // READ-ONLY; Gets the start time. + StartTime *time.Time + + // READ-ONLY; Gets the status. + Status *WorkflowStatus + + // READ-ONLY; Gets the fired trigger. + Trigger *WorkflowRunTrigger + + // READ-ONLY; Gets the wait end time. + WaitEndTime *time.Time + + // READ-ONLY; Gets the reference to workflow version. + Workflow *ResourceReference +} + +// WorkflowRunTrigger - The workflow run trigger. +type WorkflowRunTrigger struct { + // The run correlation. + Correlation *Correlation + + // READ-ONLY; Gets the code. + Code *string + + // READ-ONLY; Gets the end time. + EndTime *time.Time + + // READ-ONLY; Gets the error. + Error any + + // READ-ONLY; Gets the inputs. + Inputs any + + // READ-ONLY; Gets the link to inputs. + InputsLink *ContentLink + + // READ-ONLY; Gets the name. + Name *string + + // READ-ONLY; Gets the outputs. + Outputs any + + // READ-ONLY; Gets the link to outputs. + OutputsLink *ContentLink + + // READ-ONLY; Gets the scheduled time. + ScheduledTime *time.Time + + // READ-ONLY; Gets the start time. + StartTime *time.Time + + // READ-ONLY; Gets the status. + Status *WorkflowStatus + + // READ-ONLY; Gets the tracked properties. + TrackedProperties any + + // READ-ONLY; Gets the tracking id. + TrackingID *string +} + +// WorkflowSKU - The sku type. +type WorkflowSKU struct { + // REQUIRED; The name. + Name *WorkflowSKUName + + // The reference to plan. + Plan *ResourceReference +} + +// WorkflowTrigger - The workflow trigger. +type WorkflowTrigger struct { + // The workflow trigger properties. + Properties *WorkflowTriggerProperties + + // READ-ONLY; The resource id. + ID *string + + // READ-ONLY; Gets the workflow trigger name. + Name *string + + // READ-ONLY; Gets the workflow trigger type. + Type *string +} + +// WorkflowTriggerCallbackURL - The workflow trigger callback URL. +type WorkflowTriggerCallbackURL struct { + // Gets the workflow trigger callback URL query parameters. + Queries *WorkflowTriggerListCallbackURLQueries + + // Gets the workflow trigger callback URL relative path parameters. + RelativePathParameters []*string + + // READ-ONLY; Gets the workflow trigger callback URL base path. + BasePath *string + + // READ-ONLY; Gets the workflow trigger callback URL HTTP method. + Method *string + + // READ-ONLY; Gets the workflow trigger callback URL relative path. + RelativePath *string + + // READ-ONLY; Gets the workflow trigger callback URL. + Value *string +} + +// WorkflowTriggerFilter - The workflow trigger filter. +type WorkflowTriggerFilter struct { + // The state of workflow trigger. + State *WorkflowState +} + +// WorkflowTriggerHistory - The workflow trigger history. +type WorkflowTriggerHistory struct { + // Gets the workflow trigger history properties. + Properties *WorkflowTriggerHistoryProperties + + // READ-ONLY; The resource id. + ID *string + + // READ-ONLY; Gets the workflow trigger history name. + Name *string + + // READ-ONLY; Gets the workflow trigger history type. + Type *string +} + +// WorkflowTriggerHistoryFilter - The workflow trigger history filter. +type WorkflowTriggerHistoryFilter struct { + // The status of workflow trigger history. + Status *WorkflowStatus +} + +// WorkflowTriggerHistoryListResult - The list of workflow trigger histories. +type WorkflowTriggerHistoryListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of workflow trigger histories. + Value []*WorkflowTriggerHistory +} + +// WorkflowTriggerHistoryProperties - The workflow trigger history properties. +type WorkflowTriggerHistoryProperties struct { + // The run correlation. + Correlation *Correlation + + // READ-ONLY; Gets the code. + Code *string + + // READ-ONLY; Gets the end time. + EndTime *time.Time + + // READ-ONLY; Gets the error. + Error any + + // READ-ONLY; The value indicating whether trigger was fired. + Fired *bool + + // READ-ONLY; Gets the link to input parameters. + InputsLink *ContentLink + + // READ-ONLY; Gets the link to output parameters. + OutputsLink *ContentLink + + // READ-ONLY; Gets the reference to workflow run. + Run *ResourceReference + + // READ-ONLY; The scheduled time. + ScheduledTime *time.Time + + // READ-ONLY; Gets the start time. + StartTime *time.Time + + // READ-ONLY; Gets the status. + Status *WorkflowStatus + + // READ-ONLY; Gets the tracking id. + TrackingID *string +} + +// WorkflowTriggerListCallbackURLQueries - Gets the workflow trigger callback URL query parameters. +type WorkflowTriggerListCallbackURLQueries struct { + // The api version. + APIVersion *string + + // The SAS timestamp. + Se *string + + // The SAS signature. + Sig *string + + // The SAS permissions. + Sp *string + + // The SAS version. + Sv *string +} + +// WorkflowTriggerListResult - The list of workflow triggers. +type WorkflowTriggerListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of workflow triggers. + Value []*WorkflowTrigger +} + +// WorkflowTriggerProperties - The workflow trigger properties. +type WorkflowTriggerProperties struct { + // READ-ONLY; Gets the changed time. + ChangedTime *time.Time + + // READ-ONLY; Gets the created time. + CreatedTime *time.Time + + // READ-ONLY; Gets the last execution time. + LastExecutionTime *time.Time + + // READ-ONLY; Gets the next execution time. + NextExecutionTime *time.Time + + // READ-ONLY; Gets the provisioning state. + ProvisioningState *WorkflowTriggerProvisioningState + + // READ-ONLY; Gets the workflow trigger recurrence. + Recurrence *WorkflowTriggerRecurrence + + // READ-ONLY; Gets the state. + State *WorkflowState + + // READ-ONLY; Gets the status. + Status *WorkflowStatus + + // READ-ONLY; Gets the reference to workflow. + Workflow *ResourceReference +} + +// WorkflowTriggerRecurrence - The workflow trigger recurrence. +type WorkflowTriggerRecurrence struct { + // The end time. + EndTime *string + + // The frequency. + Frequency *RecurrenceFrequency + + // The interval. + Interval *int32 + + // The recurrence schedule. + Schedule *RecurrenceSchedule + + // The start time. + StartTime *string + + // The time zone. + TimeZone *string +} + +// WorkflowVersion - The workflow version. +type WorkflowVersion struct { + // The resource location. + Location *string + + // The workflow version properties. + Properties *WorkflowVersionProperties + + // The resource tags. + Tags map[string]*string + + // READ-ONLY; The resource id. + ID *string + + // READ-ONLY; Gets the resource name. + Name *string + + // READ-ONLY; Gets the resource type. + Type *string +} + +// WorkflowVersionListResult - The list of workflow versions. +type WorkflowVersionListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of workflow versions. + Value []*WorkflowVersion +} + +// WorkflowVersionProperties - The workflow version properties. +type WorkflowVersionProperties struct { + // The access control configuration. + AccessControl *FlowAccessControlConfiguration + + // The definition. + Definition any + + // The endpoints configuration. + EndpointsConfiguration *FlowEndpointsConfiguration + + // The integration account. + IntegrationAccount *ResourceReference + + // The parameters. + Parameters map[string]*WorkflowParameter + + // The state. + State *WorkflowState + + // READ-ONLY; Gets the access endpoint. + AccessEndpoint *string + + // READ-ONLY; Gets the changed time. + ChangedTime *time.Time + + // READ-ONLY; Gets the created time. + CreatedTime *time.Time + + // READ-ONLY; The provisioning state. + ProvisioningState *WorkflowProvisioningState + + // READ-ONLY; The sku. + SKU *WorkflowSKU + + // READ-ONLY; Gets the version. + Version *string +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/models_serde.go new file mode 100644 index 00000000..05359e41 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/models_serde.go @@ -0,0 +1,27621 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type APIDefinitionInfo. +func (a APIDefinitionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "url", a.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIDefinitionInfo. +func (a *APIDefinitionInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "url": + err = unpopulate(val, "URL", &a.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIKVReference. +func (a APIKVReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIKVReference. +func (a *APIKVReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIKVReferenceCollection. +func (a APIKVReferenceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIKVReferenceCollection. +func (a *APIKVReferenceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIKVReferenceProperties. +func (a APIKVReferenceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeVersion", a.ActiveVersion) + populate(objectMap, "details", a.Details) + populate(objectMap, "identityType", a.IdentityType) + populate(objectMap, "reference", a.Reference) + populate(objectMap, "secretName", a.SecretName) + populate(objectMap, "secretVersion", a.SecretVersion) + objectMap["source"] = "KeyVault" + populate(objectMap, "status", a.Status) + populate(objectMap, "vaultName", a.VaultName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIKVReferenceProperties. +func (a *APIKVReferenceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeVersion": + err = unpopulate(val, "ActiveVersion", &a.ActiveVersion) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &a.Details) + delete(rawMsg, key) + case "identityType": + err = unpopulate(val, "IdentityType", &a.IdentityType) + delete(rawMsg, key) + case "reference": + err = unpopulate(val, "Reference", &a.Reference) + delete(rawMsg, key) + case "secretName": + err = unpopulate(val, "SecretName", &a.SecretName) + delete(rawMsg, key) + case "secretVersion": + err = unpopulate(val, "SecretVersion", &a.SecretVersion) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &a.Source) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "vaultName": + err = unpopulate(val, "VaultName", &a.VaultName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIManagementConfig. +func (a APIManagementConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIManagementConfig. +func (a *APIManagementConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AbnormalTimePeriod. +func (a AbnormalTimePeriod) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "events", a.Events) + populate(objectMap, "solutions", a.Solutions) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AbnormalTimePeriod. +func (a *AbnormalTimePeriod) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "events": + err = unpopulate(val, "Events", &a.Events) + delete(rawMsg, key) + case "solutions": + err = unpopulate(val, "Solutions", &a.Solutions) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Address. +func (a Address) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address1", a.Address1) + populate(objectMap, "address2", a.Address2) + populate(objectMap, "city", a.City) + populate(objectMap, "country", a.Country) + populate(objectMap, "postalCode", a.PostalCode) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Address. +func (a *Address) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address1": + err = unpopulate(val, "Address1", &a.Address1) + delete(rawMsg, key) + case "address2": + err = unpopulate(val, "Address2", &a.Address2) + delete(rawMsg, key) + case "city": + err = unpopulate(val, "City", &a.City) + delete(rawMsg, key) + case "country": + err = unpopulate(val, "Country", &a.Country) + delete(rawMsg, key) + case "postalCode": + err = unpopulate(val, "PostalCode", &a.PostalCode) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddressResponse. +func (a AddressResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddressResponse. +func (a *AddressResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddressResponseProperties. +func (a AddressResponseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "internalIpAddress", a.InternalIPAddress) + populate(objectMap, "outboundIpAddresses", a.OutboundIPAddresses) + populate(objectMap, "serviceIpAddress", a.ServiceIPAddress) + populate(objectMap, "vipMappings", a.VipMappings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddressResponseProperties. +func (a *AddressResponseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "internalIpAddress": + err = unpopulate(val, "InternalIPAddress", &a.InternalIPAddress) + delete(rawMsg, key) + case "outboundIpAddresses": + err = unpopulate(val, "OutboundIPAddresses", &a.OutboundIPAddresses) + delete(rawMsg, key) + case "serviceIpAddress": + err = unpopulate(val, "ServiceIPAddress", &a.ServiceIPAddress) + delete(rawMsg, key) + case "vipMappings": + err = unpopulate(val, "VipMappings", &a.VipMappings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AllowedAudiencesValidation. +func (a AllowedAudiencesValidation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedAudiences", a.AllowedAudiences) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllowedAudiencesValidation. +func (a *AllowedAudiencesValidation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedAudiences": + err = unpopulate(val, "AllowedAudiences", &a.AllowedAudiences) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AllowedPrincipals. +func (a AllowedPrincipals) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groups", a.Groups) + populate(objectMap, "identities", a.Identities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllowedPrincipals. +func (a *AllowedPrincipals) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groups": + err = unpopulate(val, "Groups", &a.Groups) + delete(rawMsg, key) + case "identities": + err = unpopulate(val, "Identities", &a.Identities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AnalysisData. +func (a AnalysisData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", a.Data) + populate(objectMap, "detectorDefinition", a.DetectorDefinition) + populate(objectMap, "detectorMetaData", a.DetectorMetaData) + populate(objectMap, "metrics", a.Metrics) + populate(objectMap, "source", a.Source) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AnalysisData. +func (a *AnalysisData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &a.Data) + delete(rawMsg, key) + case "detectorDefinition": + err = unpopulate(val, "DetectorDefinition", &a.DetectorDefinition) + delete(rawMsg, key) + case "detectorMetaData": + err = unpopulate(val, "DetectorMetaData", &a.DetectorMetaData) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &a.Metrics) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &a.Source) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AnalysisDefinition. +func (a AnalysisDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AnalysisDefinition. +func (a *AnalysisDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AnalysisDefinitionProperties. +func (a AnalysisDefinitionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AnalysisDefinitionProperties. +func (a *AnalysisDefinitionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppCertificate. +func (a AppCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificate. +func (a *AppCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppCertificateCollection. +func (a AppCertificateCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificateCollection. +func (a *AppCertificateCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppCertificatePatchResource. +func (a AppCertificatePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificatePatchResource. +func (a *AppCertificatePatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppCertificatePatchResourceProperties. +func (a AppCertificatePatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "canonicalName", a.CanonicalName) + populateByteArray(objectMap, "cerBlob", a.CerBlob, func() any { + return runtime.EncodeByteArray(a.CerBlob, runtime.Base64StdFormat) + }) + populate(objectMap, "domainValidationMethod", a.DomainValidationMethod) + populateDateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "hostNames", a.HostNames) + populate(objectMap, "hostingEnvironmentProfile", a.HostingEnvironmentProfile) + populateDateTimeRFC3339(objectMap, "issueDate", a.IssueDate) + populate(objectMap, "issuer", a.Issuer) + populate(objectMap, "keyVaultId", a.KeyVaultID) + populate(objectMap, "keyVaultSecretName", a.KeyVaultSecretName) + populate(objectMap, "keyVaultSecretStatus", a.KeyVaultSecretStatus) + populate(objectMap, "password", a.Password) + populateByteArray(objectMap, "pfxBlob", a.PfxBlob, func() any { + return runtime.EncodeByteArray(a.PfxBlob, runtime.Base64StdFormat) + }) + populate(objectMap, "publicKeyHash", a.PublicKeyHash) + populate(objectMap, "selfLink", a.SelfLink) + populate(objectMap, "serverFarmId", a.ServerFarmID) + populate(objectMap, "siteName", a.SiteName) + populate(objectMap, "subjectName", a.SubjectName) + populate(objectMap, "thumbprint", a.Thumbprint) + populate(objectMap, "valid", a.Valid) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificatePatchResourceProperties. +func (a *AppCertificatePatchResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "canonicalName": + err = unpopulate(val, "CanonicalName", &a.CanonicalName) + delete(rawMsg, key) + case "cerBlob": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &a.CerBlob, runtime.Base64StdFormat) + } + delete(rawMsg, key) + case "domainValidationMethod": + err = unpopulate(val, "DomainValidationMethod", &a.DomainValidationMethod) + delete(rawMsg, key) + case "expirationDate": + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "hostNames": + err = unpopulate(val, "HostNames", &a.HostNames) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &a.HostingEnvironmentProfile) + delete(rawMsg, key) + case "issueDate": + err = unpopulateDateTimeRFC3339(val, "IssueDate", &a.IssueDate) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &a.Issuer) + delete(rawMsg, key) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &a.KeyVaultID) + delete(rawMsg, key) + case "keyVaultSecretName": + err = unpopulate(val, "KeyVaultSecretName", &a.KeyVaultSecretName) + delete(rawMsg, key) + case "keyVaultSecretStatus": + err = unpopulate(val, "KeyVaultSecretStatus", &a.KeyVaultSecretStatus) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &a.Password) + delete(rawMsg, key) + case "pfxBlob": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &a.PfxBlob, runtime.Base64StdFormat) + } + delete(rawMsg, key) + case "publicKeyHash": + err = unpopulate(val, "PublicKeyHash", &a.PublicKeyHash) + delete(rawMsg, key) + case "selfLink": + err = unpopulate(val, "SelfLink", &a.SelfLink) + delete(rawMsg, key) + case "serverFarmId": + err = unpopulate(val, "ServerFarmID", &a.ServerFarmID) + delete(rawMsg, key) + case "siteName": + err = unpopulate(val, "SiteName", &a.SiteName) + delete(rawMsg, key) + case "subjectName": + err = unpopulate(val, "SubjectName", &a.SubjectName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &a.Thumbprint) + delete(rawMsg, key) + case "valid": + err = unpopulate(val, "Valid", &a.Valid) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppCertificateProperties. +func (a AppCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "canonicalName", a.CanonicalName) + populateByteArray(objectMap, "cerBlob", a.CerBlob, func() any { + return runtime.EncodeByteArray(a.CerBlob, runtime.Base64StdFormat) + }) + populate(objectMap, "domainValidationMethod", a.DomainValidationMethod) + populateDateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "hostNames", a.HostNames) + populate(objectMap, "hostingEnvironmentProfile", a.HostingEnvironmentProfile) + populateDateTimeRFC3339(objectMap, "issueDate", a.IssueDate) + populate(objectMap, "issuer", a.Issuer) + populate(objectMap, "keyVaultId", a.KeyVaultID) + populate(objectMap, "keyVaultSecretName", a.KeyVaultSecretName) + populate(objectMap, "keyVaultSecretStatus", a.KeyVaultSecretStatus) + populate(objectMap, "password", a.Password) + populateByteArray(objectMap, "pfxBlob", a.PfxBlob, func() any { + return runtime.EncodeByteArray(a.PfxBlob, runtime.Base64StdFormat) + }) + populate(objectMap, "publicKeyHash", a.PublicKeyHash) + populate(objectMap, "selfLink", a.SelfLink) + populate(objectMap, "serverFarmId", a.ServerFarmID) + populate(objectMap, "siteName", a.SiteName) + populate(objectMap, "subjectName", a.SubjectName) + populate(objectMap, "thumbprint", a.Thumbprint) + populate(objectMap, "valid", a.Valid) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificateProperties. +func (a *AppCertificateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "canonicalName": + err = unpopulate(val, "CanonicalName", &a.CanonicalName) + delete(rawMsg, key) + case "cerBlob": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &a.CerBlob, runtime.Base64StdFormat) + } + delete(rawMsg, key) + case "domainValidationMethod": + err = unpopulate(val, "DomainValidationMethod", &a.DomainValidationMethod) + delete(rawMsg, key) + case "expirationDate": + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "hostNames": + err = unpopulate(val, "HostNames", &a.HostNames) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &a.HostingEnvironmentProfile) + delete(rawMsg, key) + case "issueDate": + err = unpopulateDateTimeRFC3339(val, "IssueDate", &a.IssueDate) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &a.Issuer) + delete(rawMsg, key) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &a.KeyVaultID) + delete(rawMsg, key) + case "keyVaultSecretName": + err = unpopulate(val, "KeyVaultSecretName", &a.KeyVaultSecretName) + delete(rawMsg, key) + case "keyVaultSecretStatus": + err = unpopulate(val, "KeyVaultSecretStatus", &a.KeyVaultSecretStatus) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &a.Password) + delete(rawMsg, key) + case "pfxBlob": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &a.PfxBlob, runtime.Base64StdFormat) + } + delete(rawMsg, key) + case "publicKeyHash": + err = unpopulate(val, "PublicKeyHash", &a.PublicKeyHash) + delete(rawMsg, key) + case "selfLink": + err = unpopulate(val, "SelfLink", &a.SelfLink) + delete(rawMsg, key) + case "serverFarmId": + err = unpopulate(val, "ServerFarmID", &a.ServerFarmID) + delete(rawMsg, key) + case "siteName": + err = unpopulate(val, "SiteName", &a.SiteName) + delete(rawMsg, key) + case "subjectName": + err = unpopulate(val, "SubjectName", &a.SubjectName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &a.Thumbprint) + delete(rawMsg, key) + case "valid": + err = unpopulate(val, "Valid", &a.Valid) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppInsightsWebAppStackSettings. +func (a AppInsightsWebAppStackSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isDefaultOff", a.IsDefaultOff) + populate(objectMap, "isSupported", a.IsSupported) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppInsightsWebAppStackSettings. +func (a *AppInsightsWebAppStackSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isDefaultOff": + err = unpopulate(val, "IsDefaultOff", &a.IsDefaultOff) + delete(rawMsg, key) + case "isSupported": + err = unpopulate(val, "IsSupported", &a.IsSupported) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppLogsConfiguration. +func (a AppLogsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destination", a.Destination) + populate(objectMap, "logAnalyticsConfiguration", a.LogAnalyticsConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppLogsConfiguration. +func (a *AppLogsConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destination": + err = unpopulate(val, "Destination", &a.Destination) + delete(rawMsg, key) + case "logAnalyticsConfiguration": + err = unpopulate(val, "LogAnalyticsConfiguration", &a.LogAnalyticsConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppRegistration. +func (a AppRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appId", a.AppID) + populate(objectMap, "appSecretSettingName", a.AppSecretSettingName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppRegistration. +func (a *AppRegistration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appId": + err = unpopulate(val, "AppID", &a.AppID) + delete(rawMsg, key) + case "appSecretSettingName": + err = unpopulate(val, "AppSecretSettingName", &a.AppSecretSettingName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Apple. +func (a Apple) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "login", a.Login) + populate(objectMap, "registration", a.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Apple. +func (a *Apple) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &a.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &a.Registration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppleRegistration. +func (a AppleRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", a.ClientID) + populate(objectMap, "clientSecretSettingName", a.ClientSecretSettingName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppleRegistration. +func (a *AppleRegistration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &a.ClientID) + delete(rawMsg, key) + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &a.ClientSecretSettingName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationLogsConfig. +func (a ApplicationLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureBlobStorage", a.AzureBlobStorage) + populate(objectMap, "azureTableStorage", a.AzureTableStorage) + populate(objectMap, "fileSystem", a.FileSystem) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationLogsConfig. +func (a *ApplicationLogsConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureBlobStorage": + err = unpopulate(val, "AzureBlobStorage", &a.AzureBlobStorage) + delete(rawMsg, key) + case "azureTableStorage": + err = unpopulate(val, "AzureTableStorage", &a.AzureTableStorage) + delete(rawMsg, key) + case "fileSystem": + err = unpopulate(val, "FileSystem", &a.FileSystem) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationStack. +func (a ApplicationStack) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dependency", a.Dependency) + populate(objectMap, "display", a.Display) + populate(objectMap, "frameworks", a.Frameworks) + populate(objectMap, "isDeprecated", a.IsDeprecated) + populate(objectMap, "majorVersions", a.MajorVersions) + populate(objectMap, "name", a.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationStack. +func (a *ApplicationStack) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dependency": + err = unpopulate(val, "Dependency", &a.Dependency) + delete(rawMsg, key) + case "display": + err = unpopulate(val, "Display", &a.Display) + delete(rawMsg, key) + case "frameworks": + err = unpopulate(val, "Frameworks", &a.Frameworks) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &a.IsDeprecated) + delete(rawMsg, key) + case "majorVersions": + err = unpopulate(val, "MajorVersions", &a.MajorVersions) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationStackCollection. +func (a ApplicationStackCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationStackCollection. +func (a *ApplicationStackCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationStackResource. +func (a ApplicationStackResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationStackResource. +func (a *ApplicationStackResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ArcConfiguration. +func (a ArcConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "artifactStorageAccessMode", a.ArtifactStorageAccessMode) + populate(objectMap, "artifactStorageClassName", a.ArtifactStorageClassName) + populate(objectMap, "artifactStorageMountPath", a.ArtifactStorageMountPath) + populate(objectMap, "artifactStorageNodeName", a.ArtifactStorageNodeName) + populate(objectMap, "artifactsStorageType", a.ArtifactsStorageType) + populate(objectMap, "frontEndServiceConfiguration", a.FrontEndServiceConfiguration) + populate(objectMap, "kubeConfig", a.KubeConfig) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ArcConfiguration. +func (a *ArcConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "artifactStorageAccessMode": + err = unpopulate(val, "ArtifactStorageAccessMode", &a.ArtifactStorageAccessMode) + delete(rawMsg, key) + case "artifactStorageClassName": + err = unpopulate(val, "ArtifactStorageClassName", &a.ArtifactStorageClassName) + delete(rawMsg, key) + case "artifactStorageMountPath": + err = unpopulate(val, "ArtifactStorageMountPath", &a.ArtifactStorageMountPath) + delete(rawMsg, key) + case "artifactStorageNodeName": + err = unpopulate(val, "ArtifactStorageNodeName", &a.ArtifactStorageNodeName) + delete(rawMsg, key) + case "artifactsStorageType": + err = unpopulate(val, "ArtifactsStorageType", &a.ArtifactsStorageType) + delete(rawMsg, key) + case "frontEndServiceConfiguration": + err = unpopulate(val, "FrontEndServiceConfiguration", &a.FrontEndServiceConfiguration) + delete(rawMsg, key) + case "kubeConfig": + err = unpopulate(val, "KubeConfig", &a.KubeConfig) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ArmIDWrapper. +func (a ArmIDWrapper) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ArmIDWrapper. +func (a *ArmIDWrapper) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ArmPlan. +func (a ArmPlan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", a.Name) + populate(objectMap, "product", a.Product) + populate(objectMap, "promotionCode", a.PromotionCode) + populate(objectMap, "publisher", a.Publisher) + populate(objectMap, "version", a.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ArmPlan. +func (a *ArmPlan) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &a.Product) + delete(rawMsg, key) + case "promotionCode": + err = unpopulate(val, "PromotionCode", &a.PromotionCode) + delete(rawMsg, key) + case "publisher": + err = unpopulate(val, "Publisher", &a.Publisher) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &a.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AseRegion. +func (a AseRegion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseRegion. +func (a *AseRegion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AseRegionCollection. +func (a AseRegionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseRegionCollection. +func (a *AseRegionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AseRegionProperties. +func (a AseRegionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableOS", a.AvailableOS) + populate(objectMap, "availableSku", a.AvailableSKU) + populate(objectMap, "dedicatedHost", a.DedicatedHost) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "standard", a.Standard) + populate(objectMap, "zoneRedundant", a.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseRegionProperties. +func (a *AseRegionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableOS": + err = unpopulate(val, "AvailableOS", &a.AvailableOS) + delete(rawMsg, key) + case "availableSku": + err = unpopulate(val, "AvailableSKU", &a.AvailableSKU) + delete(rawMsg, key) + case "dedicatedHost": + err = unpopulate(val, "DedicatedHost", &a.DedicatedHost) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "standard": + err = unpopulate(val, "Standard", &a.Standard) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &a.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AseV3NetworkingConfiguration. +func (a AseV3NetworkingConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseV3NetworkingConfiguration. +func (a *AseV3NetworkingConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AseV3NetworkingConfigurationProperties. +func (a AseV3NetworkingConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowNewPrivateEndpointConnections", a.AllowNewPrivateEndpointConnections) + populate(objectMap, "externalInboundIpAddresses", a.ExternalInboundIPAddresses) + populate(objectMap, "ftpEnabled", a.FtpEnabled) + populate(objectMap, "inboundIpAddressOverride", a.InboundIPAddressOverride) + populate(objectMap, "internalInboundIpAddresses", a.InternalInboundIPAddresses) + populate(objectMap, "linuxOutboundIpAddresses", a.LinuxOutboundIPAddresses) + populate(objectMap, "remoteDebugEnabled", a.RemoteDebugEnabled) + populate(objectMap, "windowsOutboundIpAddresses", a.WindowsOutboundIPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseV3NetworkingConfigurationProperties. +func (a *AseV3NetworkingConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowNewPrivateEndpointConnections": + err = unpopulate(val, "AllowNewPrivateEndpointConnections", &a.AllowNewPrivateEndpointConnections) + delete(rawMsg, key) + case "externalInboundIpAddresses": + err = unpopulate(val, "ExternalInboundIPAddresses", &a.ExternalInboundIPAddresses) + delete(rawMsg, key) + case "ftpEnabled": + err = unpopulate(val, "FtpEnabled", &a.FtpEnabled) + delete(rawMsg, key) + case "inboundIpAddressOverride": + err = unpopulate(val, "InboundIPAddressOverride", &a.InboundIPAddressOverride) + delete(rawMsg, key) + case "internalInboundIpAddresses": + err = unpopulate(val, "InternalInboundIPAddresses", &a.InternalInboundIPAddresses) + delete(rawMsg, key) + case "linuxOutboundIpAddresses": + err = unpopulate(val, "LinuxOutboundIPAddresses", &a.LinuxOutboundIPAddresses) + delete(rawMsg, key) + case "remoteDebugEnabled": + err = unpopulate(val, "RemoteDebugEnabled", &a.RemoteDebugEnabled) + delete(rawMsg, key) + case "windowsOutboundIpAddresses": + err = unpopulate(val, "WindowsOutboundIPAddresses", &a.WindowsOutboundIPAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthPlatform. +func (a AuthPlatform) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configFilePath", a.ConfigFilePath) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "runtimeVersion", a.RuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthPlatform. +func (a *AuthPlatform) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configFilePath": + err = unpopulate(val, "ConfigFilePath", &a.ConfigFilePath) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &a.RuntimeVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoHealActions. +func (a AutoHealActions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionType", a.ActionType) + populate(objectMap, "customAction", a.CustomAction) + populate(objectMap, "minProcessExecutionTime", a.MinProcessExecutionTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoHealActions. +func (a *AutoHealActions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &a.ActionType) + delete(rawMsg, key) + case "customAction": + err = unpopulate(val, "CustomAction", &a.CustomAction) + delete(rawMsg, key) + case "minProcessExecutionTime": + err = unpopulate(val, "MinProcessExecutionTime", &a.MinProcessExecutionTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoHealCustomAction. +func (a AutoHealCustomAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exe", a.Exe) + populate(objectMap, "parameters", a.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoHealCustomAction. +func (a *AutoHealCustomAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exe": + err = unpopulate(val, "Exe", &a.Exe) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &a.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoHealRules. +func (a AutoHealRules) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actions", a.Actions) + populate(objectMap, "triggers", a.Triggers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoHealRules. +func (a *AutoHealRules) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actions": + err = unpopulate(val, "Actions", &a.Actions) + delete(rawMsg, key) + case "triggers": + err = unpopulate(val, "Triggers", &a.Triggers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoHealTriggers. +func (a AutoHealTriggers) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateBytesInKB", a.PrivateBytesInKB) + populate(objectMap, "requests", a.Requests) + populate(objectMap, "slowRequests", a.SlowRequests) + populate(objectMap, "slowRequestsWithPath", a.SlowRequestsWithPath) + populate(objectMap, "statusCodes", a.StatusCodes) + populate(objectMap, "statusCodesRange", a.StatusCodesRange) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoHealTriggers. +func (a *AutoHealTriggers) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateBytesInKB": + err = unpopulate(val, "PrivateBytesInKB", &a.PrivateBytesInKB) + delete(rawMsg, key) + case "requests": + err = unpopulate(val, "Requests", &a.Requests) + delete(rawMsg, key) + case "slowRequests": + err = unpopulate(val, "SlowRequests", &a.SlowRequests) + delete(rawMsg, key) + case "slowRequestsWithPath": + err = unpopulate(val, "SlowRequestsWithPath", &a.SlowRequestsWithPath) + delete(rawMsg, key) + case "statusCodes": + err = unpopulate(val, "StatusCodes", &a.StatusCodes) + delete(rawMsg, key) + case "statusCodesRange": + err = unpopulate(val, "StatusCodesRange", &a.StatusCodesRange) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureActiveDirectory. +func (a AzureActiveDirectory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "isAutoProvisioned", a.IsAutoProvisioned) + populate(objectMap, "login", a.Login) + populate(objectMap, "registration", a.Registration) + populate(objectMap, "validation", a.Validation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureActiveDirectory. +func (a *AzureActiveDirectory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "isAutoProvisioned": + err = unpopulate(val, "IsAutoProvisioned", &a.IsAutoProvisioned) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &a.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &a.Registration) + delete(rawMsg, key) + case "validation": + err = unpopulate(val, "Validation", &a.Validation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureActiveDirectoryLogin. +func (a AzureActiveDirectoryLogin) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disableWWWAuthenticate", a.DisableWWWAuthenticate) + populate(objectMap, "loginParameters", a.LoginParameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureActiveDirectoryLogin. +func (a *AzureActiveDirectoryLogin) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disableWWWAuthenticate": + err = unpopulate(val, "DisableWWWAuthenticate", &a.DisableWWWAuthenticate) + delete(rawMsg, key) + case "loginParameters": + err = unpopulate(val, "LoginParameters", &a.LoginParameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureActiveDirectoryRegistration. +func (a AzureActiveDirectoryRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", a.ClientID) + populate(objectMap, "clientSecretCertificateIssuer", a.ClientSecretCertificateIssuer) + populate(objectMap, "clientSecretCertificateSubjectAlternativeName", a.ClientSecretCertificateSubjectAlternativeName) + populate(objectMap, "clientSecretCertificateThumbprint", a.ClientSecretCertificateThumbprint) + populate(objectMap, "clientSecretSettingName", a.ClientSecretSettingName) + populate(objectMap, "openIdIssuer", a.OpenIDIssuer) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureActiveDirectoryRegistration. +func (a *AzureActiveDirectoryRegistration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &a.ClientID) + delete(rawMsg, key) + case "clientSecretCertificateIssuer": + err = unpopulate(val, "ClientSecretCertificateIssuer", &a.ClientSecretCertificateIssuer) + delete(rawMsg, key) + case "clientSecretCertificateSubjectAlternativeName": + err = unpopulate(val, "ClientSecretCertificateSubjectAlternativeName", &a.ClientSecretCertificateSubjectAlternativeName) + delete(rawMsg, key) + case "clientSecretCertificateThumbprint": + err = unpopulate(val, "ClientSecretCertificateThumbprint", &a.ClientSecretCertificateThumbprint) + delete(rawMsg, key) + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &a.ClientSecretSettingName) + delete(rawMsg, key) + case "openIdIssuer": + err = unpopulate(val, "OpenIDIssuer", &a.OpenIDIssuer) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureActiveDirectoryValidation. +func (a AzureActiveDirectoryValidation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedAudiences", a.AllowedAudiences) + populate(objectMap, "defaultAuthorizationPolicy", a.DefaultAuthorizationPolicy) + populate(objectMap, "jwtClaimChecks", a.JwtClaimChecks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureActiveDirectoryValidation. +func (a *AzureActiveDirectoryValidation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedAudiences": + err = unpopulate(val, "AllowedAudiences", &a.AllowedAudiences) + delete(rawMsg, key) + case "defaultAuthorizationPolicy": + err = unpopulate(val, "DefaultAuthorizationPolicy", &a.DefaultAuthorizationPolicy) + delete(rawMsg, key) + case "jwtClaimChecks": + err = unpopulate(val, "JwtClaimChecks", &a.JwtClaimChecks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBlobStorageApplicationLogsConfig. +func (a AzureBlobStorageApplicationLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "level", a.Level) + populate(objectMap, "retentionInDays", a.RetentionInDays) + populate(objectMap, "sasUrl", a.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobStorageApplicationLogsConfig. +func (a *AzureBlobStorageApplicationLogsConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "level": + err = unpopulate(val, "Level", &a.Level) + delete(rawMsg, key) + case "retentionInDays": + err = unpopulate(val, "RetentionInDays", &a.RetentionInDays) + delete(rawMsg, key) + case "sasUrl": + err = unpopulate(val, "SasURL", &a.SasURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBlobStorageHTTPLogsConfig. +func (a AzureBlobStorageHTTPLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "retentionInDays", a.RetentionInDays) + populate(objectMap, "sasUrl", a.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobStorageHTTPLogsConfig. +func (a *AzureBlobStorageHTTPLogsConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "retentionInDays": + err = unpopulate(val, "RetentionInDays", &a.RetentionInDays) + delete(rawMsg, key) + case "sasUrl": + err = unpopulate(val, "SasURL", &a.SasURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureResourceErrorInfo. +func (a AzureResourceErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", a.Code) + populate(objectMap, "details", a.Details) + populate(objectMap, "message", a.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceErrorInfo. +func (a *AzureResourceErrorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &a.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &a.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &a.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStaticWebApps. +func (a AzureStaticWebApps) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "registration", a.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStaticWebApps. +func (a *AzureStaticWebApps) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &a.Registration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStaticWebAppsRegistration. +func (a AzureStaticWebAppsRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", a.ClientID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStaticWebAppsRegistration. +func (a *AzureStaticWebAppsRegistration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &a.ClientID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageInfoValue. +func (a AzureStorageInfoValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessKey", a.AccessKey) + populate(objectMap, "accountName", a.AccountName) + populate(objectMap, "mountPath", a.MountPath) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "shareName", a.ShareName) + populate(objectMap, "state", a.State) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageInfoValue. +func (a *AzureStorageInfoValue) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessKey": + err = unpopulate(val, "AccessKey", &a.AccessKey) + delete(rawMsg, key) + case "accountName": + err = unpopulate(val, "AccountName", &a.AccountName) + delete(rawMsg, key) + case "mountPath": + err = unpopulate(val, "MountPath", &a.MountPath) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "shareName": + err = unpopulate(val, "ShareName", &a.ShareName) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStoragePropertyDictionaryResource. +func (a AzureStoragePropertyDictionaryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStoragePropertyDictionaryResource. +func (a *AzureStoragePropertyDictionaryResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureTableStorageApplicationLogsConfig. +func (a AzureTableStorageApplicationLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "level", a.Level) + populate(objectMap, "sasUrl", a.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureTableStorageApplicationLogsConfig. +func (a *AzureTableStorageApplicationLogsConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "level": + err = unpopulate(val, "Level", &a.Level) + delete(rawMsg, key) + case "sasUrl": + err = unpopulate(val, "SasURL", &a.SasURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupItem. +func (b BackupItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "kind", b.Kind) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupItem. +func (b *BackupItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &b.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupItemCollection. +func (b BackupItemCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupItemCollection. +func (b *BackupItemCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupItemProperties. +func (b BackupItemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.BackupID) + populate(objectMap, "blobName", b.BlobName) + populate(objectMap, "correlationId", b.CorrelationID) + populateDateTimeRFC3339(objectMap, "created", b.Created) + populate(objectMap, "databases", b.Databases) + populateDateTimeRFC3339(objectMap, "finishedTimeStamp", b.FinishedTimeStamp) + populateDateTimeRFC3339(objectMap, "lastRestoreTimeStamp", b.LastRestoreTimeStamp) + populate(objectMap, "log", b.Log) + populate(objectMap, "name", b.Name) + populate(objectMap, "scheduled", b.Scheduled) + populate(objectMap, "sizeInBytes", b.SizeInBytes) + populate(objectMap, "status", b.Status) + populate(objectMap, "storageAccountUrl", b.StorageAccountURL) + populate(objectMap, "websiteSizeInBytes", b.WebsiteSizeInBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupItemProperties. +func (b *BackupItemProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "BackupID", &b.BackupID) + delete(rawMsg, key) + case "blobName": + err = unpopulate(val, "BlobName", &b.BlobName) + delete(rawMsg, key) + case "correlationId": + err = unpopulate(val, "CorrelationID", &b.CorrelationID) + delete(rawMsg, key) + case "created": + err = unpopulateDateTimeRFC3339(val, "Created", &b.Created) + delete(rawMsg, key) + case "databases": + err = unpopulate(val, "Databases", &b.Databases) + delete(rawMsg, key) + case "finishedTimeStamp": + err = unpopulateDateTimeRFC3339(val, "FinishedTimeStamp", &b.FinishedTimeStamp) + delete(rawMsg, key) + case "lastRestoreTimeStamp": + err = unpopulateDateTimeRFC3339(val, "LastRestoreTimeStamp", &b.LastRestoreTimeStamp) + delete(rawMsg, key) + case "log": + err = unpopulate(val, "Log", &b.Log) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "scheduled": + err = unpopulate(val, "Scheduled", &b.Scheduled) + delete(rawMsg, key) + case "sizeInBytes": + err = unpopulate(val, "SizeInBytes", &b.SizeInBytes) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &b.Status) + delete(rawMsg, key) + case "storageAccountUrl": + err = unpopulate(val, "StorageAccountURL", &b.StorageAccountURL) + delete(rawMsg, key) + case "websiteSizeInBytes": + err = unpopulate(val, "WebsiteSizeInBytes", &b.WebsiteSizeInBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupRequest. +func (b BackupRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "kind", b.Kind) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupRequest. +func (b *BackupRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &b.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupRequestProperties. +func (b BackupRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupName", b.BackupName) + populate(objectMap, "backupSchedule", b.BackupSchedule) + populate(objectMap, "databases", b.Databases) + populate(objectMap, "enabled", b.Enabled) + populate(objectMap, "storageAccountUrl", b.StorageAccountURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupRequestProperties. +func (b *BackupRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupName": + err = unpopulate(val, "BackupName", &b.BackupName) + delete(rawMsg, key) + case "backupSchedule": + err = unpopulate(val, "BackupSchedule", &b.BackupSchedule) + delete(rawMsg, key) + case "databases": + err = unpopulate(val, "Databases", &b.Databases) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &b.Enabled) + delete(rawMsg, key) + case "storageAccountUrl": + err = unpopulate(val, "StorageAccountURL", &b.StorageAccountURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupSchedule. +func (b BackupSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "frequencyInterval", b.FrequencyInterval) + populate(objectMap, "frequencyUnit", b.FrequencyUnit) + populate(objectMap, "keepAtLeastOneBackup", b.KeepAtLeastOneBackup) + populateDateTimeRFC3339(objectMap, "lastExecutionTime", b.LastExecutionTime) + populate(objectMap, "retentionPeriodInDays", b.RetentionPeriodInDays) + populateDateTimeRFC3339(objectMap, "startTime", b.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupSchedule. +func (b *BackupSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "frequencyInterval": + err = unpopulate(val, "FrequencyInterval", &b.FrequencyInterval) + delete(rawMsg, key) + case "frequencyUnit": + err = unpopulate(val, "FrequencyUnit", &b.FrequencyUnit) + delete(rawMsg, key) + case "keepAtLeastOneBackup": + err = unpopulate(val, "KeepAtLeastOneBackup", &b.KeepAtLeastOneBackup) + delete(rawMsg, key) + case "lastExecutionTime": + err = unpopulateDateTimeRFC3339(val, "LastExecutionTime", &b.LastExecutionTime) + delete(rawMsg, key) + case "retentionPeriodInDays": + err = unpopulate(val, "RetentionPeriodInDays", &b.RetentionPeriodInDays) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &b.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BillingMeter. +func (b BillingMeter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "kind", b.Kind) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeter. +func (b *BillingMeter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &b.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BillingMeterCollection. +func (b BillingMeterCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeterCollection. +func (b *BillingMeterCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BillingMeterProperties. +func (b BillingMeterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "billingLocation", b.BillingLocation) + populate(objectMap, "friendlyName", b.FriendlyName) + populate(objectMap, "meterId", b.MeterID) + populate(objectMap, "multiplier", b.Multiplier) + populate(objectMap, "osType", b.OSType) + populate(objectMap, "resourceType", b.ResourceType) + populate(objectMap, "shortName", b.ShortName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BillingMeterProperties. +func (b *BillingMeterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "billingLocation": + err = unpopulate(val, "BillingLocation", &b.BillingLocation) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &b.FriendlyName) + delete(rawMsg, key) + case "meterId": + err = unpopulate(val, "MeterID", &b.MeterID) + delete(rawMsg, key) + case "multiplier": + err = unpopulate(val, "Multiplier", &b.Multiplier) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &b.OSType) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &b.ResourceType) + delete(rawMsg, key) + case "shortName": + err = unpopulate(val, "ShortName", &b.ShortName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BlobStorageTokenStore. +func (b BlobStorageTokenStore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sasUrlSettingName", b.SasURLSettingName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BlobStorageTokenStore. +func (b *BlobStorageTokenStore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sasUrlSettingName": + err = unpopulate(val, "SasURLSettingName", &b.SasURLSettingName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Capability. +func (c Capability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + populate(objectMap, "reason", c.Reason) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Capability. +func (c *Capability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Certificate. +func (c Certificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyVaultId", c.KeyVaultID) + populate(objectMap, "keyVaultSecretName", c.KeyVaultSecretName) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Certificate. +func (c *Certificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &c.KeyVaultID) + delete(rawMsg, key) + case "keyVaultSecretName": + err = unpopulate(val, "KeyVaultSecretName", &c.KeyVaultSecretName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateCollection. +func (c CertificateCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateCollection. +func (c *CertificateCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateDetails. +func (c CertificateDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "issuer", c.Issuer) + populateDateTimeRFC3339(objectMap, "notAfter", c.NotAfter) + populateDateTimeRFC3339(objectMap, "notBefore", c.NotBefore) + populate(objectMap, "rawData", c.RawData) + populate(objectMap, "serialNumber", c.SerialNumber) + populate(objectMap, "signatureAlgorithm", c.SignatureAlgorithm) + populate(objectMap, "subject", c.Subject) + populate(objectMap, "thumbprint", c.Thumbprint) + populate(objectMap, "version", c.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateDetails. +func (c *CertificateDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "issuer": + err = unpopulate(val, "Issuer", &c.Issuer) + delete(rawMsg, key) + case "notAfter": + err = unpopulateDateTimeRFC3339(val, "NotAfter", &c.NotAfter) + delete(rawMsg, key) + case "notBefore": + err = unpopulateDateTimeRFC3339(val, "NotBefore", &c.NotBefore) + delete(rawMsg, key) + case "rawData": + err = unpopulate(val, "RawData", &c.RawData) + delete(rawMsg, key) + case "serialNumber": + err = unpopulate(val, "SerialNumber", &c.SerialNumber) + delete(rawMsg, key) + case "signatureAlgorithm": + err = unpopulate(val, "SignatureAlgorithm", &c.SignatureAlgorithm) + delete(rawMsg, key) + case "subject": + err = unpopulate(val, "Subject", &c.Subject) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &c.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateEmail. +func (c CertificateEmail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "emailId", c.EmailID) + populateDateTimeRFC3339(objectMap, "timeStamp", c.TimeStamp) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateEmail. +func (c *CertificateEmail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "emailId": + err = unpopulate(val, "EmailID", &c.EmailID) + delete(rawMsg, key) + case "timeStamp": + err = unpopulateDateTimeRFC3339(val, "TimeStamp", &c.TimeStamp) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrder. +func (c CertificateOrder) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrder. +func (c *CertificateOrder) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderAction. +func (c CertificateOrderAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionType", c.ActionType) + populateDateTimeRFC3339(objectMap, "createdAt", c.CreatedAt) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderAction. +func (c *CertificateOrderAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &c.ActionType) + delete(rawMsg, key) + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &c.CreatedAt) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderCollection. +func (c CertificateOrderCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderCollection. +func (c *CertificateOrderCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderContact. +func (c CertificateOrderContact) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "email", c.Email) + populate(objectMap, "nameFirst", c.NameFirst) + populate(objectMap, "nameLast", c.NameLast) + populate(objectMap, "phone", c.Phone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderContact. +func (c *CertificateOrderContact) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "email": + err = unpopulate(val, "Email", &c.Email) + delete(rawMsg, key) + case "nameFirst": + err = unpopulate(val, "NameFirst", &c.NameFirst) + delete(rawMsg, key) + case "nameLast": + err = unpopulate(val, "NameLast", &c.NameLast) + delete(rawMsg, key) + case "phone": + err = unpopulate(val, "Phone", &c.Phone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderPatchResource. +func (c CertificateOrderPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderPatchResource. +func (c *CertificateOrderPatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderPatchResourceProperties. +func (c CertificateOrderPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appServiceCertificateNotRenewableReasons", c.AppServiceCertificateNotRenewableReasons) + populate(objectMap, "autoRenew", c.AutoRenew) + populate(objectMap, "certificates", c.Certificates) + populate(objectMap, "contact", c.Contact) + populate(objectMap, "csr", c.Csr) + populate(objectMap, "distinguishedName", c.DistinguishedName) + populate(objectMap, "domainVerificationToken", c.DomainVerificationToken) + populateDateTimeRFC3339(objectMap, "expirationTime", c.ExpirationTime) + populate(objectMap, "intermediate", c.Intermediate) + populate(objectMap, "isPrivateKeyExternal", c.IsPrivateKeyExternal) + populate(objectMap, "keySize", c.KeySize) + populateDateTimeRFC3339(objectMap, "lastCertificateIssuanceTime", c.LastCertificateIssuanceTime) + populateDateTimeRFC3339(objectMap, "nextAutoRenewalTimeStamp", c.NextAutoRenewalTimeStamp) + populate(objectMap, "productType", c.ProductType) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "root", c.Root) + populate(objectMap, "serialNumber", c.SerialNumber) + populate(objectMap, "signedCertificate", c.SignedCertificate) + populate(objectMap, "status", c.Status) + populate(objectMap, "validityInYears", c.ValidityInYears) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderPatchResourceProperties. +func (c *CertificateOrderPatchResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appServiceCertificateNotRenewableReasons": + err = unpopulate(val, "AppServiceCertificateNotRenewableReasons", &c.AppServiceCertificateNotRenewableReasons) + delete(rawMsg, key) + case "autoRenew": + err = unpopulate(val, "AutoRenew", &c.AutoRenew) + delete(rawMsg, key) + case "certificates": + err = unpopulate(val, "Certificates", &c.Certificates) + delete(rawMsg, key) + case "contact": + err = unpopulate(val, "Contact", &c.Contact) + delete(rawMsg, key) + case "csr": + err = unpopulate(val, "Csr", &c.Csr) + delete(rawMsg, key) + case "distinguishedName": + err = unpopulate(val, "DistinguishedName", &c.DistinguishedName) + delete(rawMsg, key) + case "domainVerificationToken": + err = unpopulate(val, "DomainVerificationToken", &c.DomainVerificationToken) + delete(rawMsg, key) + case "expirationTime": + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) + delete(rawMsg, key) + case "intermediate": + err = unpopulate(val, "Intermediate", &c.Intermediate) + delete(rawMsg, key) + case "isPrivateKeyExternal": + err = unpopulate(val, "IsPrivateKeyExternal", &c.IsPrivateKeyExternal) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &c.KeySize) + delete(rawMsg, key) + case "lastCertificateIssuanceTime": + err = unpopulateDateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) + delete(rawMsg, key) + case "nextAutoRenewalTimeStamp": + err = unpopulateDateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) + delete(rawMsg, key) + case "productType": + err = unpopulate(val, "ProductType", &c.ProductType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "root": + err = unpopulate(val, "Root", &c.Root) + delete(rawMsg, key) + case "serialNumber": + err = unpopulate(val, "SerialNumber", &c.SerialNumber) + delete(rawMsg, key) + case "signedCertificate": + err = unpopulate(val, "SignedCertificate", &c.SignedCertificate) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + case "validityInYears": + err = unpopulate(val, "ValidityInYears", &c.ValidityInYears) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateOrderProperties. +func (c CertificateOrderProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appServiceCertificateNotRenewableReasons", c.AppServiceCertificateNotRenewableReasons) + populate(objectMap, "autoRenew", c.AutoRenew) + populate(objectMap, "certificates", c.Certificates) + populate(objectMap, "contact", c.Contact) + populate(objectMap, "csr", c.Csr) + populate(objectMap, "distinguishedName", c.DistinguishedName) + populate(objectMap, "domainVerificationToken", c.DomainVerificationToken) + populateDateTimeRFC3339(objectMap, "expirationTime", c.ExpirationTime) + populate(objectMap, "intermediate", c.Intermediate) + populate(objectMap, "isPrivateKeyExternal", c.IsPrivateKeyExternal) + populate(objectMap, "keySize", c.KeySize) + populateDateTimeRFC3339(objectMap, "lastCertificateIssuanceTime", c.LastCertificateIssuanceTime) + populateDateTimeRFC3339(objectMap, "nextAutoRenewalTimeStamp", c.NextAutoRenewalTimeStamp) + populate(objectMap, "productType", c.ProductType) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "root", c.Root) + populate(objectMap, "serialNumber", c.SerialNumber) + populate(objectMap, "signedCertificate", c.SignedCertificate) + populate(objectMap, "status", c.Status) + populate(objectMap, "validityInYears", c.ValidityInYears) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderProperties. +func (c *CertificateOrderProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appServiceCertificateNotRenewableReasons": + err = unpopulate(val, "AppServiceCertificateNotRenewableReasons", &c.AppServiceCertificateNotRenewableReasons) + delete(rawMsg, key) + case "autoRenew": + err = unpopulate(val, "AutoRenew", &c.AutoRenew) + delete(rawMsg, key) + case "certificates": + err = unpopulate(val, "Certificates", &c.Certificates) + delete(rawMsg, key) + case "contact": + err = unpopulate(val, "Contact", &c.Contact) + delete(rawMsg, key) + case "csr": + err = unpopulate(val, "Csr", &c.Csr) + delete(rawMsg, key) + case "distinguishedName": + err = unpopulate(val, "DistinguishedName", &c.DistinguishedName) + delete(rawMsg, key) + case "domainVerificationToken": + err = unpopulate(val, "DomainVerificationToken", &c.DomainVerificationToken) + delete(rawMsg, key) + case "expirationTime": + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) + delete(rawMsg, key) + case "intermediate": + err = unpopulate(val, "Intermediate", &c.Intermediate) + delete(rawMsg, key) + case "isPrivateKeyExternal": + err = unpopulate(val, "IsPrivateKeyExternal", &c.IsPrivateKeyExternal) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &c.KeySize) + delete(rawMsg, key) + case "lastCertificateIssuanceTime": + err = unpopulateDateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) + delete(rawMsg, key) + case "nextAutoRenewalTimeStamp": + err = unpopulateDateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) + delete(rawMsg, key) + case "productType": + err = unpopulate(val, "ProductType", &c.ProductType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "root": + err = unpopulate(val, "Root", &c.Root) + delete(rawMsg, key) + case "serialNumber": + err = unpopulate(val, "SerialNumber", &c.SerialNumber) + delete(rawMsg, key) + case "signedCertificate": + err = unpopulate(val, "SignedCertificate", &c.SignedCertificate) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + case "validityInYears": + err = unpopulate(val, "ValidityInYears", &c.ValidityInYears) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificatePatchResource. +func (c CertificatePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificatePatchResource. +func (c *CertificatePatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateResource. +func (c CertificateResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateResource. +func (c *CertificateResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CipherSuites. +func (c CipherSuites) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "suites", c.Suites) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CipherSuites. +func (c *CipherSuites) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "suites": + err = unpopulate(val, "Suites", &c.Suites) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientRegistration. +func (c ClientRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", c.ClientID) + populate(objectMap, "clientSecretSettingName", c.ClientSecretSettingName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientRegistration. +func (c *ClientRegistration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &c.ClientID) + delete(rawMsg, key) + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &c.ClientSecretSettingName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CloningInfo. +func (c CloningInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appSettingsOverrides", c.AppSettingsOverrides) + populate(objectMap, "cloneCustomHostNames", c.CloneCustomHostNames) + populate(objectMap, "cloneSourceControl", c.CloneSourceControl) + populate(objectMap, "configureLoadBalancing", c.ConfigureLoadBalancing) + populate(objectMap, "correlationId", c.CorrelationID) + populate(objectMap, "hostingEnvironment", c.HostingEnvironment) + populate(objectMap, "overwrite", c.Overwrite) + populate(objectMap, "sourceWebAppId", c.SourceWebAppID) + populate(objectMap, "sourceWebAppLocation", c.SourceWebAppLocation) + populate(objectMap, "trafficManagerProfileId", c.TrafficManagerProfileID) + populate(objectMap, "trafficManagerProfileName", c.TrafficManagerProfileName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CloningInfo. +func (c *CloningInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appSettingsOverrides": + err = unpopulate(val, "AppSettingsOverrides", &c.AppSettingsOverrides) + delete(rawMsg, key) + case "cloneCustomHostNames": + err = unpopulate(val, "CloneCustomHostNames", &c.CloneCustomHostNames) + delete(rawMsg, key) + case "cloneSourceControl": + err = unpopulate(val, "CloneSourceControl", &c.CloneSourceControl) + delete(rawMsg, key) + case "configureLoadBalancing": + err = unpopulate(val, "ConfigureLoadBalancing", &c.ConfigureLoadBalancing) + delete(rawMsg, key) + case "correlationId": + err = unpopulate(val, "CorrelationID", &c.CorrelationID) + delete(rawMsg, key) + case "hostingEnvironment": + err = unpopulate(val, "HostingEnvironment", &c.HostingEnvironment) + delete(rawMsg, key) + case "overwrite": + err = unpopulate(val, "Overwrite", &c.Overwrite) + delete(rawMsg, key) + case "sourceWebAppId": + err = unpopulate(val, "SourceWebAppID", &c.SourceWebAppID) + delete(rawMsg, key) + case "sourceWebAppLocation": + err = unpopulate(val, "SourceWebAppLocation", &c.SourceWebAppLocation) + delete(rawMsg, key) + case "trafficManagerProfileId": + err = unpopulate(val, "TrafficManagerProfileID", &c.TrafficManagerProfileID) + delete(rawMsg, key) + case "trafficManagerProfileName": + err = unpopulate(val, "TrafficManagerProfileName", &c.TrafficManagerProfileName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Configuration. +func (c Configuration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeRevisionsMode", c.ActiveRevisionsMode) + populate(objectMap, "ingress", c.Ingress) + populate(objectMap, "registries", c.Registries) + populate(objectMap, "secrets", c.Secrets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Configuration. +func (c *Configuration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeRevisionsMode": + err = unpopulate(val, "ActiveRevisionsMode", &c.ActiveRevisionsMode) + delete(rawMsg, key) + case "ingress": + err = unpopulate(val, "Ingress", &c.Ingress) + delete(rawMsg, key) + case "registries": + err = unpopulate(val, "Registries", &c.Registries) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &c.Secrets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnStringInfo. +func (c ConnStringInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionString", c.ConnectionString) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnStringInfo. +func (c *ConnStringInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionString": + err = unpopulate(val, "ConnectionString", &c.ConnectionString) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnStringValueTypePair. +func (c ConnStringValueTypePair) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", c.Type) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnStringValueTypePair. +func (c *ConnStringValueTypePair) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionStringDictionary. +func (c ConnectionStringDictionary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionStringDictionary. +func (c *ConnectionStringDictionary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Contact. +func (c Contact) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressMailing", c.AddressMailing) + populate(objectMap, "email", c.Email) + populate(objectMap, "fax", c.Fax) + populate(objectMap, "jobTitle", c.JobTitle) + populate(objectMap, "nameFirst", c.NameFirst) + populate(objectMap, "nameLast", c.NameLast) + populate(objectMap, "nameMiddle", c.NameMiddle) + populate(objectMap, "organization", c.Organization) + populate(objectMap, "phone", c.Phone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Contact. +func (c *Contact) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressMailing": + err = unpopulate(val, "AddressMailing", &c.AddressMailing) + delete(rawMsg, key) + case "email": + err = unpopulate(val, "Email", &c.Email) + delete(rawMsg, key) + case "fax": + err = unpopulate(val, "Fax", &c.Fax) + delete(rawMsg, key) + case "jobTitle": + err = unpopulate(val, "JobTitle", &c.JobTitle) + delete(rawMsg, key) + case "nameFirst": + err = unpopulate(val, "NameFirst", &c.NameFirst) + delete(rawMsg, key) + case "nameLast": + err = unpopulate(val, "NameLast", &c.NameLast) + delete(rawMsg, key) + case "nameMiddle": + err = unpopulate(val, "NameMiddle", &c.NameMiddle) + delete(rawMsg, key) + case "organization": + err = unpopulate(val, "Organization", &c.Organization) + delete(rawMsg, key) + case "phone": + err = unpopulate(val, "Phone", &c.Phone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Container. +func (c Container) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "args", c.Args) + populate(objectMap, "command", c.Command) + populate(objectMap, "env", c.Env) + populate(objectMap, "image", c.Image) + populate(objectMap, "name", c.Name) + populate(objectMap, "resources", c.Resources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Container. +func (c *Container) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "args": + err = unpopulate(val, "Args", &c.Args) + delete(rawMsg, key) + case "command": + err = unpopulate(val, "Command", &c.Command) + delete(rawMsg, key) + case "env": + err = unpopulate(val, "Env", &c.Env) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &c.Image) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &c.Resources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerApp. +func (c ContainerApp) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerApp. +func (c *ContainerApp) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerAppCollection. +func (c ContainerAppCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppCollection. +func (c *ContainerAppCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerAppProperties. +func (c ContainerAppProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configuration", c.Configuration) + populate(objectMap, "kubeEnvironmentId", c.KubeEnvironmentID) + populate(objectMap, "latestRevisionFqdn", c.LatestRevisionFqdn) + populate(objectMap, "latestRevisionName", c.LatestRevisionName) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "template", c.Template) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppProperties. +func (c *ContainerAppProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configuration": + err = unpopulate(val, "Configuration", &c.Configuration) + delete(rawMsg, key) + case "kubeEnvironmentId": + err = unpopulate(val, "KubeEnvironmentID", &c.KubeEnvironmentID) + delete(rawMsg, key) + case "latestRevisionFqdn": + err = unpopulate(val, "LatestRevisionFqdn", &c.LatestRevisionFqdn) + delete(rawMsg, key) + case "latestRevisionName": + err = unpopulate(val, "LatestRevisionName", &c.LatestRevisionName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "template": + err = unpopulate(val, "Template", &c.Template) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerAppSecret. +func (c ContainerAppSecret) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppSecret. +func (c *ContainerAppSecret) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerAppsConfiguration. +func (c ContainerAppsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appSubnetResourceId", c.AppSubnetResourceID) + populate(objectMap, "controlPlaneSubnetResourceId", c.ControlPlaneSubnetResourceID) + populate(objectMap, "daprAIInstrumentationKey", c.DaprAIInstrumentationKey) + populate(objectMap, "dockerBridgeCidr", c.DockerBridgeCidr) + populate(objectMap, "platformReservedCidr", c.PlatformReservedCidr) + populate(objectMap, "platformReservedDnsIP", c.PlatformReservedDNSIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerAppsConfiguration. +func (c *ContainerAppsConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appSubnetResourceId": + err = unpopulate(val, "AppSubnetResourceID", &c.AppSubnetResourceID) + delete(rawMsg, key) + case "controlPlaneSubnetResourceId": + err = unpopulate(val, "ControlPlaneSubnetResourceID", &c.ControlPlaneSubnetResourceID) + delete(rawMsg, key) + case "daprAIInstrumentationKey": + err = unpopulate(val, "DaprAIInstrumentationKey", &c.DaprAIInstrumentationKey) + delete(rawMsg, key) + case "dockerBridgeCidr": + err = unpopulate(val, "DockerBridgeCidr", &c.DockerBridgeCidr) + delete(rawMsg, key) + case "platformReservedCidr": + err = unpopulate(val, "PlatformReservedCidr", &c.PlatformReservedCidr) + delete(rawMsg, key) + case "platformReservedDnsIP": + err = unpopulate(val, "PlatformReservedDNSIP", &c.PlatformReservedDNSIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerCPUStatistics. +func (c ContainerCPUStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpuUsage", c.CPUUsage) + populate(objectMap, "onlineCpuCount", c.OnlineCPUCount) + populate(objectMap, "systemCpuUsage", c.SystemCPUUsage) + populate(objectMap, "throttlingData", c.ThrottlingData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerCPUStatistics. +func (c *ContainerCPUStatistics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpuUsage": + err = unpopulate(val, "CPUUsage", &c.CPUUsage) + delete(rawMsg, key) + case "onlineCpuCount": + err = unpopulate(val, "OnlineCPUCount", &c.OnlineCPUCount) + delete(rawMsg, key) + case "systemCpuUsage": + err = unpopulate(val, "SystemCPUUsage", &c.SystemCPUUsage) + delete(rawMsg, key) + case "throttlingData": + err = unpopulate(val, "ThrottlingData", &c.ThrottlingData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerCPUUsage. +func (c ContainerCPUUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "kernelModeUsage", c.KernelModeUsage) + populate(objectMap, "perCpuUsage", c.PerCPUUsage) + populate(objectMap, "totalUsage", c.TotalUsage) + populate(objectMap, "userModeUsage", c.UserModeUsage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerCPUUsage. +func (c *ContainerCPUUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "kernelModeUsage": + err = unpopulate(val, "KernelModeUsage", &c.KernelModeUsage) + delete(rawMsg, key) + case "perCpuUsage": + err = unpopulate(val, "PerCPUUsage", &c.PerCPUUsage) + delete(rawMsg, key) + case "totalUsage": + err = unpopulate(val, "TotalUsage", &c.TotalUsage) + delete(rawMsg, key) + case "userModeUsage": + err = unpopulate(val, "UserModeUsage", &c.UserModeUsage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerInfo. +func (c ContainerInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentCpuStats", c.CurrentCPUStats) + populateDateTimeRFC3339(objectMap, "currentTimeStamp", c.CurrentTimeStamp) + populate(objectMap, "eth0", c.Eth0) + populate(objectMap, "id", c.ID) + populate(objectMap, "memoryStats", c.MemoryStats) + populate(objectMap, "name", c.Name) + populate(objectMap, "previousCpuStats", c.PreviousCPUStats) + populateDateTimeRFC3339(objectMap, "previousTimeStamp", c.PreviousTimeStamp) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerInfo. +func (c *ContainerInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentCpuStats": + err = unpopulate(val, "CurrentCPUStats", &c.CurrentCPUStats) + delete(rawMsg, key) + case "currentTimeStamp": + err = unpopulateDateTimeRFC3339(val, "CurrentTimeStamp", &c.CurrentTimeStamp) + delete(rawMsg, key) + case "eth0": + err = unpopulate(val, "Eth0", &c.Eth0) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "memoryStats": + err = unpopulate(val, "MemoryStats", &c.MemoryStats) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "previousCpuStats": + err = unpopulate(val, "PreviousCPUStats", &c.PreviousCPUStats) + delete(rawMsg, key) + case "previousTimeStamp": + err = unpopulateDateTimeRFC3339(val, "PreviousTimeStamp", &c.PreviousTimeStamp) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerMemoryStatistics. +func (c ContainerMemoryStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "limit", c.Limit) + populate(objectMap, "maxUsage", c.MaxUsage) + populate(objectMap, "usage", c.Usage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerMemoryStatistics. +func (c *ContainerMemoryStatistics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limit": + err = unpopulate(val, "Limit", &c.Limit) + delete(rawMsg, key) + case "maxUsage": + err = unpopulate(val, "MaxUsage", &c.MaxUsage) + delete(rawMsg, key) + case "usage": + err = unpopulate(val, "Usage", &c.Usage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceStatistics. +func (c ContainerNetworkInterfaceStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rxBytes", c.RxBytes) + populate(objectMap, "rxDropped", c.RxDropped) + populate(objectMap, "rxErrors", c.RxErrors) + populate(objectMap, "rxPackets", c.RxPackets) + populate(objectMap, "txBytes", c.TxBytes) + populate(objectMap, "txDropped", c.TxDropped) + populate(objectMap, "txErrors", c.TxErrors) + populate(objectMap, "txPackets", c.TxPackets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfaceStatistics. +func (c *ContainerNetworkInterfaceStatistics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rxBytes": + err = unpopulate(val, "RxBytes", &c.RxBytes) + delete(rawMsg, key) + case "rxDropped": + err = unpopulate(val, "RxDropped", &c.RxDropped) + delete(rawMsg, key) + case "rxErrors": + err = unpopulate(val, "RxErrors", &c.RxErrors) + delete(rawMsg, key) + case "rxPackets": + err = unpopulate(val, "RxPackets", &c.RxPackets) + delete(rawMsg, key) + case "txBytes": + err = unpopulate(val, "TxBytes", &c.TxBytes) + delete(rawMsg, key) + case "txDropped": + err = unpopulate(val, "TxDropped", &c.TxDropped) + delete(rawMsg, key) + case "txErrors": + err = unpopulate(val, "TxErrors", &c.TxErrors) + delete(rawMsg, key) + case "txPackets": + err = unpopulate(val, "TxPackets", &c.TxPackets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerResources. +func (c ContainerResources) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", c.CPU) + populate(objectMap, "memory", c.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerResources. +func (c *ContainerResources) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &c.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &c.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerThrottlingData. +func (c ContainerThrottlingData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "periods", c.Periods) + populate(objectMap, "throttledPeriods", c.ThrottledPeriods) + populate(objectMap, "throttledTime", c.ThrottledTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerThrottlingData. +func (c *ContainerThrottlingData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "periods": + err = unpopulate(val, "Periods", &c.Periods) + delete(rawMsg, key) + case "throttledPeriods": + err = unpopulate(val, "ThrottledPeriods", &c.ThrottledPeriods) + delete(rawMsg, key) + case "throttledTime": + err = unpopulate(val, "ThrottledTime", &c.ThrottledTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContentHash. +func (c ContentHash) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "algorithm", c.Algorithm) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentHash. +func (c *ContentHash) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "algorithm": + err = unpopulate(val, "Algorithm", &c.Algorithm) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContentLink. +func (c ContentLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentHash", c.ContentHash) + populate(objectMap, "contentSize", c.ContentSize) + populate(objectMap, "contentVersion", c.ContentVersion) + populateAny(objectMap, "metadata", c.Metadata) + populate(objectMap, "uri", c.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContentLink. +func (c *ContentLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentHash": + err = unpopulate(val, "ContentHash", &c.ContentHash) + delete(rawMsg, key) + case "contentSize": + err = unpopulate(val, "ContentSize", &c.ContentSize) + delete(rawMsg, key) + case "contentVersion": + err = unpopulate(val, "ContentVersion", &c.ContentVersion) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &c.Metadata) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContinuousWebJob. +func (c ContinuousWebJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousWebJob. +func (c *ContinuousWebJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContinuousWebJobCollection. +func (c ContinuousWebJobCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousWebJobCollection. +func (c *ContinuousWebJobCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContinuousWebJobProperties. +func (c ContinuousWebJobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "detailed_status", c.DetailedStatus) + populate(objectMap, "error", c.Error) + populate(objectMap, "extra_info_url", c.ExtraInfoURL) + populate(objectMap, "log_url", c.LogURL) + populate(objectMap, "run_command", c.RunCommand) + populate(objectMap, "settings", c.Settings) + populate(objectMap, "status", c.Status) + populate(objectMap, "url", c.URL) + populate(objectMap, "using_sdk", c.UsingSdk) + populate(objectMap, "web_job_type", c.WebJobType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinuousWebJobProperties. +func (c *ContinuousWebJobProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "detailed_status": + err = unpopulate(val, "DetailedStatus", &c.DetailedStatus) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &c.Error) + delete(rawMsg, key) + case "extra_info_url": + err = unpopulate(val, "ExtraInfoURL", &c.ExtraInfoURL) + delete(rawMsg, key) + case "log_url": + err = unpopulate(val, "LogURL", &c.LogURL) + delete(rawMsg, key) + case "run_command": + err = unpopulate(val, "RunCommand", &c.RunCommand) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &c.Settings) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &c.URL) + delete(rawMsg, key) + case "using_sdk": + err = unpopulate(val, "UsingSdk", &c.UsingSdk) + delete(rawMsg, key) + case "web_job_type": + err = unpopulate(val, "WebJobType", &c.WebJobType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CookieExpiration. +func (c CookieExpiration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "convention", c.Convention) + populate(objectMap, "timeToExpiration", c.TimeToExpiration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CookieExpiration. +func (c *CookieExpiration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "convention": + err = unpopulate(val, "Convention", &c.Convention) + delete(rawMsg, key) + case "timeToExpiration": + err = unpopulate(val, "TimeToExpiration", &c.TimeToExpiration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Correlation. +func (c Correlation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientTrackingId", c.ClientTrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Correlation. +func (c *Correlation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientTrackingId": + err = unpopulate(val, "ClientTrackingID", &c.ClientTrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CorsSettings. +func (c CorsSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedOrigins", c.AllowedOrigins) + populate(objectMap, "supportCredentials", c.SupportCredentials) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CorsSettings. +func (c *CorsSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedOrigins": + err = unpopulate(val, "AllowedOrigins", &c.AllowedOrigins) + delete(rawMsg, key) + case "supportCredentials": + err = unpopulate(val, "SupportCredentials", &c.SupportCredentials) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmDeploymentStatus. +func (c CsmDeploymentStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmDeploymentStatus. +func (c *CsmDeploymentStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmDeploymentStatusCollection. +func (c CsmDeploymentStatusCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmDeploymentStatusCollection. +func (c *CsmDeploymentStatusCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmDeploymentStatusProperties. +func (c CsmDeploymentStatusProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deploymentId", c.DeploymentID) + populate(objectMap, "errors", c.Errors) + populate(objectMap, "failedInstancesLogs", c.FailedInstancesLogs) + populate(objectMap, "numberOfInstancesFailed", c.NumberOfInstancesFailed) + populate(objectMap, "numberOfInstancesInProgress", c.NumberOfInstancesInProgress) + populate(objectMap, "numberOfInstancesSuccessful", c.NumberOfInstancesSuccessful) + populate(objectMap, "status", c.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmDeploymentStatusProperties. +func (c *CsmDeploymentStatusProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deploymentId": + err = unpopulate(val, "DeploymentID", &c.DeploymentID) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &c.Errors) + delete(rawMsg, key) + case "failedInstancesLogs": + err = unpopulate(val, "FailedInstancesLogs", &c.FailedInstancesLogs) + delete(rawMsg, key) + case "numberOfInstancesFailed": + err = unpopulate(val, "NumberOfInstancesFailed", &c.NumberOfInstancesFailed) + delete(rawMsg, key) + case "numberOfInstancesInProgress": + err = unpopulate(val, "NumberOfInstancesInProgress", &c.NumberOfInstancesInProgress) + delete(rawMsg, key) + case "numberOfInstancesSuccessful": + err = unpopulate(val, "NumberOfInstancesSuccessful", &c.NumberOfInstancesSuccessful) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmMoveResourceEnvelope. +func (c CsmMoveResourceEnvelope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resources", c.Resources) + populate(objectMap, "targetResourceGroup", c.TargetResourceGroup) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmMoveResourceEnvelope. +func (c *CsmMoveResourceEnvelope) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resources": + err = unpopulate(val, "Resources", &c.Resources) + delete(rawMsg, key) + case "targetResourceGroup": + err = unpopulate(val, "TargetResourceGroup", &c.TargetResourceGroup) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmOperationCollection. +func (c CsmOperationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmOperationCollection. +func (c *CsmOperationCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmOperationDescription. +func (c CsmOperationDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", c.Display) + populate(objectMap, "isDataAction", c.IsDataAction) + populate(objectMap, "name", c.Name) + populate(objectMap, "origin", c.Origin) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmOperationDescription. +func (c *CsmOperationDescription) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &c.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &c.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &c.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmOperationDescriptionProperties. +func (c CsmOperationDescriptionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", c.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmOperationDescriptionProperties. +func (c *CsmOperationDescriptionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &c.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmOperationDisplay. +func (c CsmOperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", c.Description) + populate(objectMap, "operation", c.Operation) + populate(objectMap, "provider", c.Provider) + populate(objectMap, "resource", c.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmOperationDisplay. +func (c *CsmOperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &c.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &c.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &c.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmPublishingCredentialsPoliciesEntity. +func (c CsmPublishingCredentialsPoliciesEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmPublishingCredentialsPoliciesEntity. +func (c *CsmPublishingCredentialsPoliciesEntity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmPublishingCredentialsPoliciesEntityProperties. +func (c CsmPublishingCredentialsPoliciesEntityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allow", c.Allow) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmPublishingCredentialsPoliciesEntityProperties. +func (c *CsmPublishingCredentialsPoliciesEntityProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allow": + err = unpopulate(val, "Allow", &c.Allow) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmPublishingProfileOptions. +func (c CsmPublishingProfileOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "format", c.Format) + populate(objectMap, "includeDisasterRecoveryEndpoints", c.IncludeDisasterRecoveryEndpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmPublishingProfileOptions. +func (c *CsmPublishingProfileOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "format": + err = unpopulate(val, "Format", &c.Format) + delete(rawMsg, key) + case "includeDisasterRecoveryEndpoints": + err = unpopulate(val, "IncludeDisasterRecoveryEndpoints", &c.IncludeDisasterRecoveryEndpoints) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmSlotEntity. +func (c CsmSlotEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "preserveVnet", c.PreserveVnet) + populate(objectMap, "targetSlot", c.TargetSlot) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmSlotEntity. +func (c *CsmSlotEntity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "preserveVnet": + err = unpopulate(val, "PreserveVnet", &c.PreserveVnet) + delete(rawMsg, key) + case "targetSlot": + err = unpopulate(val, "TargetSlot", &c.TargetSlot) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmUsageQuota. +func (c CsmUsageQuota) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", c.CurrentValue) + populate(objectMap, "limit", c.Limit) + populate(objectMap, "name", c.Name) + populateDateTimeRFC3339(objectMap, "nextResetTime", c.NextResetTime) + populate(objectMap, "unit", c.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmUsageQuota. +func (c *CsmUsageQuota) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &c.CurrentValue) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &c.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "nextResetTime": + err = unpopulateDateTimeRFC3339(val, "NextResetTime", &c.NextResetTime) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &c.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CsmUsageQuotaCollection. +func (c CsmUsageQuotaCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CsmUsageQuotaCollection. +func (c *CsmUsageQuotaCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDNSSuffixConfiguration. +func (c CustomDNSSuffixConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDNSSuffixConfiguration. +func (c *CustomDNSSuffixConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDNSSuffixConfigurationProperties. +func (c CustomDNSSuffixConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateUrl", c.CertificateURL) + populate(objectMap, "dnsSuffix", c.DNSSuffix) + populate(objectMap, "keyVaultReferenceIdentity", c.KeyVaultReferenceIdentity) + populate(objectMap, "provisioningDetails", c.ProvisioningDetails) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDNSSuffixConfigurationProperties. +func (c *CustomDNSSuffixConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateUrl": + err = unpopulate(val, "CertificateURL", &c.CertificateURL) + delete(rawMsg, key) + case "dnsSuffix": + err = unpopulate(val, "DNSSuffix", &c.DNSSuffix) + delete(rawMsg, key) + case "keyVaultReferenceIdentity": + err = unpopulate(val, "KeyVaultReferenceIdentity", &c.KeyVaultReferenceIdentity) + delete(rawMsg, key) + case "provisioningDetails": + err = unpopulate(val, "ProvisioningDetails", &c.ProvisioningDetails) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResult. +func (c CustomHostnameAnalysisResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResult. +func (c *CustomHostnameAnalysisResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResultProperties. +func (c CustomHostnameAnalysisResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aRecords", c.ARecords) + populate(objectMap, "alternateCNameRecords", c.AlternateCNameRecords) + populate(objectMap, "alternateTxtRecords", c.AlternateTxtRecords) + populate(objectMap, "cNameRecords", c.CNameRecords) + populate(objectMap, "conflictingAppResourceId", c.ConflictingAppResourceID) + populate(objectMap, "customDomainVerificationFailureInfo", c.CustomDomainVerificationFailureInfo) + populate(objectMap, "customDomainVerificationTest", c.CustomDomainVerificationTest) + populate(objectMap, "hasConflictAcrossSubscription", c.HasConflictAcrossSubscription) + populate(objectMap, "hasConflictOnScaleUnit", c.HasConflictOnScaleUnit) + populate(objectMap, "isHostnameAlreadyVerified", c.IsHostnameAlreadyVerified) + populate(objectMap, "txtRecords", c.TxtRecords) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameAnalysisResultProperties. +func (c *CustomHostnameAnalysisResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aRecords": + err = unpopulate(val, "ARecords", &c.ARecords) + delete(rawMsg, key) + case "alternateCNameRecords": + err = unpopulate(val, "AlternateCNameRecords", &c.AlternateCNameRecords) + delete(rawMsg, key) + case "alternateTxtRecords": + err = unpopulate(val, "AlternateTxtRecords", &c.AlternateTxtRecords) + delete(rawMsg, key) + case "cNameRecords": + err = unpopulate(val, "CNameRecords", &c.CNameRecords) + delete(rawMsg, key) + case "conflictingAppResourceId": + err = unpopulate(val, "ConflictingAppResourceID", &c.ConflictingAppResourceID) + delete(rawMsg, key) + case "customDomainVerificationFailureInfo": + err = unpopulate(val, "CustomDomainVerificationFailureInfo", &c.CustomDomainVerificationFailureInfo) + delete(rawMsg, key) + case "customDomainVerificationTest": + err = unpopulate(val, "CustomDomainVerificationTest", &c.CustomDomainVerificationTest) + delete(rawMsg, key) + case "hasConflictAcrossSubscription": + err = unpopulate(val, "HasConflictAcrossSubscription", &c.HasConflictAcrossSubscription) + delete(rawMsg, key) + case "hasConflictOnScaleUnit": + err = unpopulate(val, "HasConflictOnScaleUnit", &c.HasConflictOnScaleUnit) + delete(rawMsg, key) + case "isHostnameAlreadyVerified": + err = unpopulate(val, "IsHostnameAlreadyVerified", &c.IsHostnameAlreadyVerified) + delete(rawMsg, key) + case "txtRecords": + err = unpopulate(val, "TxtRecords", &c.TxtRecords) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameSites. +func (c CustomHostnameSites) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "kind", c.Kind) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameSites. +func (c *CustomHostnameSites) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameSitesCollection. +func (c CustomHostnameSitesCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameSitesCollection. +func (c *CustomHostnameSitesCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomHostnameSitesProperties. +func (c CustomHostnameSitesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customHostname", c.CustomHostname) + populate(objectMap, "region", c.Region) + populate(objectMap, "siteResourceIds", c.SiteResourceIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomHostnameSitesProperties. +func (c *CustomHostnameSitesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customHostname": + err = unpopulate(val, "CustomHostname", &c.CustomHostname) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &c.Region) + delete(rawMsg, key) + case "siteResourceIds": + err = unpopulate(val, "SiteResourceIDs", &c.SiteResourceIDs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomOpenIDConnectProvider. +func (c CustomOpenIDConnectProvider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", c.Enabled) + populate(objectMap, "login", c.Login) + populate(objectMap, "registration", c.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomOpenIDConnectProvider. +func (c *CustomOpenIDConnectProvider) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &c.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &c.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &c.Registration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomScaleRule. +func (c CustomScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auth", c.Auth) + populate(objectMap, "metadata", c.Metadata) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomScaleRule. +func (c *CustomScaleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &c.Auth) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &c.Metadata) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Dapr. +func (d Dapr) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appId", d.AppID) + populate(objectMap, "appPort", d.AppPort) + populate(objectMap, "components", d.Components) + populate(objectMap, "enabled", d.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Dapr. +func (d *Dapr) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appId": + err = unpopulate(val, "AppID", &d.AppID) + delete(rawMsg, key) + case "appPort": + err = unpopulate(val, "AppPort", &d.AppPort) + delete(rawMsg, key) + case "components": + err = unpopulate(val, "Components", &d.Components) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &d.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DaprComponent. +func (d DaprComponent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "metadata", d.Metadata) + populate(objectMap, "name", d.Name) + populate(objectMap, "type", d.Type) + populate(objectMap, "version", d.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprComponent. +func (d *DaprComponent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "metadata": + err = unpopulate(val, "Metadata", &d.Metadata) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &d.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DaprConfig. +func (d DaprConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appId", d.AppID) + populate(objectMap, "appPort", d.AppPort) + populate(objectMap, "enableApiLogging", d.EnableAPILogging) + populate(objectMap, "enabled", d.Enabled) + populate(objectMap, "httpMaxRequestSize", d.HTTPMaxRequestSize) + populate(objectMap, "httpReadBufferSize", d.HTTPReadBufferSize) + populate(objectMap, "logLevel", d.LogLevel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprConfig. +func (d *DaprConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appId": + err = unpopulate(val, "AppID", &d.AppID) + delete(rawMsg, key) + case "appPort": + err = unpopulate(val, "AppPort", &d.AppPort) + delete(rawMsg, key) + case "enableApiLogging": + err = unpopulate(val, "EnableAPILogging", &d.EnableAPILogging) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &d.Enabled) + delete(rawMsg, key) + case "httpMaxRequestSize": + err = unpopulate(val, "HTTPMaxRequestSize", &d.HTTPMaxRequestSize) + delete(rawMsg, key) + case "httpReadBufferSize": + err = unpopulate(val, "HTTPReadBufferSize", &d.HTTPReadBufferSize) + delete(rawMsg, key) + case "logLevel": + err = unpopulate(val, "LogLevel", &d.LogLevel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DaprMetadata. +func (d DaprMetadata) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", d.Name) + populate(objectMap, "secretRef", d.SecretRef) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprMetadata. +func (d *DaprMetadata) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "secretRef": + err = unpopulate(val, "SecretRef", &d.SecretRef) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataProviderMetadata. +func (d DataProviderMetadata) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "propertyBag", d.PropertyBag) + populate(objectMap, "providerName", d.ProviderName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataProviderMetadata. +func (d *DataProviderMetadata) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "propertyBag": + err = unpopulate(val, "PropertyBag", &d.PropertyBag) + delete(rawMsg, key) + case "providerName": + err = unpopulate(val, "ProviderName", &d.ProviderName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataSource. +func (d DataSource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataSourceUri", d.DataSourceURI) + populate(objectMap, "instructions", d.Instructions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataSource. +func (d *DataSource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataSourceUri": + err = unpopulate(val, "DataSourceURI", &d.DataSourceURI) + delete(rawMsg, key) + case "instructions": + err = unpopulate(val, "Instructions", &d.Instructions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataTableResponseColumn. +func (d DataTableResponseColumn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columnName", d.ColumnName) + populate(objectMap, "columnType", d.ColumnType) + populate(objectMap, "dataType", d.DataType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataTableResponseColumn. +func (d *DataTableResponseColumn) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columnName": + err = unpopulate(val, "ColumnName", &d.ColumnName) + delete(rawMsg, key) + case "columnType": + err = unpopulate(val, "ColumnType", &d.ColumnType) + delete(rawMsg, key) + case "dataType": + err = unpopulate(val, "DataType", &d.DataType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataTableResponseObject. +func (d DataTableResponseObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columns", d.Columns) + populate(objectMap, "rows", d.Rows) + populate(objectMap, "tableName", d.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataTableResponseObject. +func (d *DataTableResponseObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "columns": + err = unpopulate(val, "Columns", &d.Columns) + delete(rawMsg, key) + case "rows": + err = unpopulate(val, "Rows", &d.Rows) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &d.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseBackupSetting. +func (d DatabaseBackupSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionString", d.ConnectionString) + populate(objectMap, "connectionStringName", d.ConnectionStringName) + populate(objectMap, "databaseType", d.DatabaseType) + populate(objectMap, "name", d.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseBackupSetting. +func (d *DatabaseBackupSetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionString": + err = unpopulate(val, "ConnectionString", &d.ConnectionString) + delete(rawMsg, key) + case "connectionStringName": + err = unpopulate(val, "ConnectionStringName", &d.ConnectionStringName) + delete(rawMsg, key) + case "databaseType": + err = unpopulate(val, "DatabaseType", &d.DatabaseType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnection. +func (d DatabaseConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnection. +func (d *DatabaseConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnectionCollection. +func (d DatabaseConnectionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnectionCollection. +func (d *DatabaseConnectionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnectionOverview. +func (d DatabaseConnectionOverview) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configurationFiles", d.ConfigurationFiles) + populate(objectMap, "connectionIdentity", d.ConnectionIdentity) + populate(objectMap, "name", d.Name) + populate(objectMap, "region", d.Region) + populate(objectMap, "resourceId", d.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnectionOverview. +func (d *DatabaseConnectionOverview) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configurationFiles": + err = unpopulate(val, "ConfigurationFiles", &d.ConfigurationFiles) + delete(rawMsg, key) + case "connectionIdentity": + err = unpopulate(val, "ConnectionIdentity", &d.ConnectionIdentity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &d.Region) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnectionPatchRequest. +func (d DatabaseConnectionPatchRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnectionPatchRequest. +func (d *DatabaseConnectionPatchRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnectionPatchRequestProperties. +func (d DatabaseConnectionPatchRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionIdentity", d.ConnectionIdentity) + populate(objectMap, "connectionString", d.ConnectionString) + populate(objectMap, "region", d.Region) + populate(objectMap, "resourceId", d.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnectionPatchRequestProperties. +func (d *DatabaseConnectionPatchRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionIdentity": + err = unpopulate(val, "ConnectionIdentity", &d.ConnectionIdentity) + delete(rawMsg, key) + case "connectionString": + err = unpopulate(val, "ConnectionString", &d.ConnectionString) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &d.Region) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseConnectionProperties. +func (d DatabaseConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configurationFiles", d.ConfigurationFiles) + populate(objectMap, "connectionIdentity", d.ConnectionIdentity) + populate(objectMap, "connectionString", d.ConnectionString) + populate(objectMap, "region", d.Region) + populate(objectMap, "resourceId", d.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConnectionProperties. +func (d *DatabaseConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configurationFiles": + err = unpopulate(val, "ConfigurationFiles", &d.ConfigurationFiles) + delete(rawMsg, key) + case "connectionIdentity": + err = unpopulate(val, "ConnectionIdentity", &d.ConnectionIdentity) + delete(rawMsg, key) + case "connectionString": + err = unpopulate(val, "ConnectionString", &d.ConnectionString) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &d.Region) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultAuthorizationPolicy. +func (d DefaultAuthorizationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedApplications", d.AllowedApplications) + populate(objectMap, "allowedPrincipals", d.AllowedPrincipals) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultAuthorizationPolicy. +func (d *DefaultAuthorizationPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedApplications": + err = unpopulate(val, "AllowedApplications", &d.AllowedApplications) + delete(rawMsg, key) + case "allowedPrincipals": + err = unpopulate(val, "AllowedPrincipals", &d.AllowedPrincipals) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponse. +func (d DefaultErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", d.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponse. +func (d *DefaultErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &d.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseError. +func (d DefaultErrorResponseError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", d.Code) + populate(objectMap, "details", d.Details) + populate(objectMap, "innererror", d.Innererror) + populate(objectMap, "message", d.Message) + populate(objectMap, "target", d.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseError. +func (d *DefaultErrorResponseError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &d.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &d.Details) + delete(rawMsg, key) + case "innererror": + err = unpopulate(val, "Innererror", &d.Innererror) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &d.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultErrorResponseErrorDetailsItem. +func (d DefaultErrorResponseErrorDetailsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", d.Code) + populate(objectMap, "message", d.Message) + populate(objectMap, "target", d.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultErrorResponseErrorDetailsItem. +func (d *DefaultErrorResponseErrorDetailsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &d.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &d.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedAppRestoreRequest. +func (d DeletedAppRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAppRestoreRequest. +func (d *DeletedAppRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedAppRestoreRequestProperties. +func (d DeletedAppRestoreRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deletedSiteId", d.DeletedSiteID) + populate(objectMap, "recoverConfiguration", d.RecoverConfiguration) + populate(objectMap, "snapshotTime", d.SnapshotTime) + populate(objectMap, "useDRSecondary", d.UseDRSecondary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedAppRestoreRequestProperties. +func (d *DeletedAppRestoreRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deletedSiteId": + err = unpopulate(val, "DeletedSiteID", &d.DeletedSiteID) + delete(rawMsg, key) + case "recoverConfiguration": + err = unpopulate(val, "RecoverConfiguration", &d.RecoverConfiguration) + delete(rawMsg, key) + case "snapshotTime": + err = unpopulate(val, "SnapshotTime", &d.SnapshotTime) + delete(rawMsg, key) + case "useDRSecondary": + err = unpopulate(val, "UseDRSecondary", &d.UseDRSecondary) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedSite. +func (d DeletedSite) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedSite. +func (d *DeletedSite) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedSiteProperties. +func (d DeletedSiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deletedSiteId", d.DeletedSiteID) + populate(objectMap, "deletedSiteName", d.DeletedSiteName) + populate(objectMap, "deletedTimestamp", d.DeletedTimestamp) + populate(objectMap, "geoRegionName", d.GeoRegionName) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "resourceGroup", d.ResourceGroup) + populate(objectMap, "slot", d.Slot) + populate(objectMap, "subscription", d.Subscription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedSiteProperties. +func (d *DeletedSiteProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deletedSiteId": + err = unpopulate(val, "DeletedSiteID", &d.DeletedSiteID) + delete(rawMsg, key) + case "deletedSiteName": + err = unpopulate(val, "DeletedSiteName", &d.DeletedSiteName) + delete(rawMsg, key) + case "deletedTimestamp": + err = unpopulate(val, "DeletedTimestamp", &d.DeletedTimestamp) + delete(rawMsg, key) + case "geoRegionName": + err = unpopulate(val, "GeoRegionName", &d.GeoRegionName) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &d.ResourceGroup) + delete(rawMsg, key) + case "slot": + err = unpopulate(val, "Slot", &d.Slot) + delete(rawMsg, key) + case "subscription": + err = unpopulate(val, "Subscription", &d.Subscription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedWebAppCollection. +func (d DeletedWebAppCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedWebAppCollection. +func (d *DeletedWebAppCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Deployment. +func (d Deployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Deployment. +func (d *Deployment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentCollection. +func (d DeploymentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentCollection. +func (d *DeploymentCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentLocations. +func (d DeploymentLocations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostingEnvironmentDeploymentInfos", d.HostingEnvironmentDeploymentInfos) + populate(objectMap, "hostingEnvironments", d.HostingEnvironments) + populate(objectMap, "locations", d.Locations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentLocations. +func (d *DeploymentLocations) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostingEnvironmentDeploymentInfos": + err = unpopulate(val, "HostingEnvironmentDeploymentInfos", &d.HostingEnvironmentDeploymentInfos) + delete(rawMsg, key) + case "hostingEnvironments": + err = unpopulate(val, "HostingEnvironments", &d.HostingEnvironments) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &d.Locations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentProperties. +func (d DeploymentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "active", d.Active) + populate(objectMap, "author", d.Author) + populate(objectMap, "author_email", d.AuthorEmail) + populate(objectMap, "deployer", d.Deployer) + populate(objectMap, "details", d.Details) + populateDateTimeRFC3339(objectMap, "end_time", d.EndTime) + populate(objectMap, "message", d.Message) + populateDateTimeRFC3339(objectMap, "start_time", d.StartTime) + populate(objectMap, "status", d.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentProperties. +func (d *DeploymentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "active": + err = unpopulate(val, "Active", &d.Active) + delete(rawMsg, key) + case "author": + err = unpopulate(val, "Author", &d.Author) + delete(rawMsg, key) + case "author_email": + err = unpopulate(val, "AuthorEmail", &d.AuthorEmail) + delete(rawMsg, key) + case "deployer": + err = unpopulate(val, "Deployer", &d.Deployer) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &d.Details) + delete(rawMsg, key) + case "end_time": + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "start_time": + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DetectorAbnormalTimePeriod. +func (d DetectorAbnormalTimePeriod) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) + populate(objectMap, "message", d.Message) + populate(objectMap, "metaData", d.MetaData) + populate(objectMap, "priority", d.Priority) + populate(objectMap, "solutions", d.Solutions) + populate(objectMap, "source", d.Source) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorAbnormalTimePeriod. +func (d *DetectorAbnormalTimePeriod) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + case "metaData": + err = unpopulate(val, "MetaData", &d.MetaData) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &d.Priority) + delete(rawMsg, key) + case "solutions": + err = unpopulate(val, "Solutions", &d.Solutions) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &d.Source) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DetectorDefinition. +func (d DetectorDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", d.Description) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "isEnabled", d.IsEnabled) + populate(objectMap, "rank", d.Rank) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorDefinition. +func (d *DetectorDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "isEnabled": + err = unpopulate(val, "IsEnabled", &d.IsEnabled) + delete(rawMsg, key) + case "rank": + err = unpopulate(val, "Rank", &d.Rank) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DetectorDefinitionResource. +func (d DetectorDefinitionResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorDefinitionResource. +func (d *DetectorDefinitionResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DetectorInfo. +func (d DetectorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "analysisType", d.AnalysisType) + populate(objectMap, "author", d.Author) + populate(objectMap, "category", d.Category) + populate(objectMap, "description", d.Description) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "score", d.Score) + populate(objectMap, "supportTopicList", d.SupportTopicList) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorInfo. +func (d *DetectorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "analysisType": + err = unpopulate(val, "AnalysisType", &d.AnalysisType) + delete(rawMsg, key) + case "author": + err = unpopulate(val, "Author", &d.Author) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &d.Category) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "score": + err = unpopulate(val, "Score", &d.Score) + delete(rawMsg, key) + case "supportTopicList": + err = unpopulate(val, "SupportTopicList", &d.SupportTopicList) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DetectorResponse. +func (d DetectorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorResponse. +func (d *DetectorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DetectorResponseCollection. +func (d DetectorResponseCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorResponseCollection. +func (d *DetectorResponseCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DetectorResponseProperties. +func (d DetectorResponseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataProvidersMetadata", d.DataProvidersMetadata) + populate(objectMap, "dataset", d.Dataset) + populate(objectMap, "metadata", d.Metadata) + populate(objectMap, "status", d.Status) + populate(objectMap, "suggestedUtterances", d.SuggestedUtterances) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorResponseProperties. +func (d *DetectorResponseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataProvidersMetadata": + err = unpopulate(val, "DataProvidersMetadata", &d.DataProvidersMetadata) + delete(rawMsg, key) + case "dataset": + err = unpopulate(val, "Dataset", &d.Dataset) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &d.Metadata) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + case "suggestedUtterances": + err = unpopulate(val, "SuggestedUtterances", &d.SuggestedUtterances) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticAnalysis. +func (d DiagnosticAnalysis) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticAnalysis. +func (d *DiagnosticAnalysis) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticAnalysisCollection. +func (d DiagnosticAnalysisCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticAnalysisCollection. +func (d *DiagnosticAnalysisCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticAnalysisProperties. +func (d DiagnosticAnalysisProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "abnormalTimePeriods", d.AbnormalTimePeriods) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) + populate(objectMap, "nonCorrelatedDetectors", d.NonCorrelatedDetectors) + populate(objectMap, "payload", d.Payload) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticAnalysisProperties. +func (d *DiagnosticAnalysisProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "abnormalTimePeriods": + err = unpopulate(val, "AbnormalTimePeriods", &d.AbnormalTimePeriods) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) + delete(rawMsg, key) + case "nonCorrelatedDetectors": + err = unpopulate(val, "NonCorrelatedDetectors", &d.NonCorrelatedDetectors) + delete(rawMsg, key) + case "payload": + err = unpopulate(val, "Payload", &d.Payload) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticCategory. +func (d DiagnosticCategory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticCategory. +func (d *DiagnosticCategory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticCategoryCollection. +func (d DiagnosticCategoryCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticCategoryCollection. +func (d *DiagnosticCategoryCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticCategoryProperties. +func (d DiagnosticCategoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", d.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticCategoryProperties. +func (d *DiagnosticCategoryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticData. +func (d DiagnosticData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "renderingProperties", d.RenderingProperties) + populate(objectMap, "table", d.Table) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticData. +func (d *DiagnosticData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "renderingProperties": + err = unpopulate(val, "RenderingProperties", &d.RenderingProperties) + delete(rawMsg, key) + case "table": + err = unpopulate(val, "Table", &d.Table) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticDetectorCollection. +func (d DiagnosticDetectorCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDetectorCollection. +func (d *DiagnosticDetectorCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticDetectorResponse. +func (d DiagnosticDetectorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDetectorResponse. +func (d *DiagnosticDetectorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticDetectorResponseProperties. +func (d DiagnosticDetectorResponseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "abnormalTimePeriods", d.AbnormalTimePeriods) + populate(objectMap, "data", d.Data) + populate(objectMap, "detectorDefinition", d.DetectorDefinition) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) + populate(objectMap, "issueDetected", d.IssueDetected) + populate(objectMap, "metrics", d.Metrics) + populate(objectMap, "responseMetaData", d.ResponseMetaData) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDetectorResponseProperties. +func (d *DiagnosticDetectorResponseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "abnormalTimePeriods": + err = unpopulate(val, "AbnormalTimePeriods", &d.AbnormalTimePeriods) + delete(rawMsg, key) + case "data": + err = unpopulate(val, "Data", &d.Data) + delete(rawMsg, key) + case "detectorDefinition": + err = unpopulate(val, "DetectorDefinition", &d.DetectorDefinition) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) + delete(rawMsg, key) + case "issueDetected": + err = unpopulate(val, "IssueDetected", &d.IssueDetected) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &d.Metrics) + delete(rawMsg, key) + case "responseMetaData": + err = unpopulate(val, "ResponseMetaData", &d.ResponseMetaData) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticMetricSample. +func (d DiagnosticMetricSample) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isAggregated", d.IsAggregated) + populate(objectMap, "maximum", d.Maximum) + populate(objectMap, "minimum", d.Minimum) + populate(objectMap, "roleInstance", d.RoleInstance) + populateDateTimeRFC3339(objectMap, "timestamp", d.Timestamp) + populate(objectMap, "total", d.Total) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticMetricSample. +func (d *DiagnosticMetricSample) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isAggregated": + err = unpopulate(val, "IsAggregated", &d.IsAggregated) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &d.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &d.Minimum) + delete(rawMsg, key) + case "roleInstance": + err = unpopulate(val, "RoleInstance", &d.RoleInstance) + delete(rawMsg, key) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &d.Timestamp) + delete(rawMsg, key) + case "total": + err = unpopulate(val, "Total", &d.Total) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnosticMetricSet. +func (d DiagnosticMetricSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) + populate(objectMap, "name", d.Name) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) + populate(objectMap, "timeGrain", d.TimeGrain) + populate(objectMap, "unit", d.Unit) + populate(objectMap, "values", d.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticMetricSet. +func (d *DiagnosticMetricSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &d.TimeGrain) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &d.Unit) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &d.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Dimension. +func (d Dimension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "internalName", d.InternalName) + populate(objectMap, "name", d.Name) + populate(objectMap, "toBeExportedForShoebox", d.ToBeExportedForShoebox) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Dimension. +func (d *Dimension) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "internalName": + err = unpopulate(val, "InternalName", &d.InternalName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "toBeExportedForShoebox": + err = unpopulate(val, "ToBeExportedForShoebox", &d.ToBeExportedForShoebox) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Domain. +func (d Domain) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Domain. +func (d *Domain) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainAvailabilityCheckResult. +func (d DomainAvailabilityCheckResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "available", d.Available) + populate(objectMap, "domainType", d.DomainType) + populate(objectMap, "name", d.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainAvailabilityCheckResult. +func (d *DomainAvailabilityCheckResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "available": + err = unpopulate(val, "Available", &d.Available) + delete(rawMsg, key) + case "domainType": + err = unpopulate(val, "DomainType", &d.DomainType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainCollection. +func (d DomainCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainCollection. +func (d *DomainCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainControlCenterSsoRequest. +func (d DomainControlCenterSsoRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "postParameterKey", d.PostParameterKey) + populate(objectMap, "postParameterValue", d.PostParameterValue) + populate(objectMap, "url", d.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainControlCenterSsoRequest. +func (d *DomainControlCenterSsoRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "postParameterKey": + err = unpopulate(val, "PostParameterKey", &d.PostParameterKey) + delete(rawMsg, key) + case "postParameterValue": + err = unpopulate(val, "PostParameterValue", &d.PostParameterValue) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &d.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainOwnershipIdentifier. +func (d DomainOwnershipIdentifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainOwnershipIdentifier. +func (d *DomainOwnershipIdentifier) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainOwnershipIdentifierCollection. +func (d DomainOwnershipIdentifierCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainOwnershipIdentifierCollection. +func (d *DomainOwnershipIdentifierCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainOwnershipIdentifierProperties. +func (d DomainOwnershipIdentifierProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ownershipId", d.OwnershipID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainOwnershipIdentifierProperties. +func (d *DomainOwnershipIdentifierProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ownershipId": + err = unpopulate(val, "OwnershipID", &d.OwnershipID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainPatchResource. +func (d DomainPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "kind", d.Kind) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainPatchResource. +func (d *DomainPatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainPatchResourceProperties. +func (d DomainPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authCode", d.AuthCode) + populate(objectMap, "autoRenew", d.AutoRenew) + populate(objectMap, "consent", d.Consent) + populate(objectMap, "contactAdmin", d.ContactAdmin) + populate(objectMap, "contactBilling", d.ContactBilling) + populate(objectMap, "contactRegistrant", d.ContactRegistrant) + populate(objectMap, "contactTech", d.ContactTech) + populateDateTimeRFC3339(objectMap, "createdTime", d.CreatedTime) + populate(objectMap, "dnsType", d.DNSType) + populate(objectMap, "dnsZoneId", d.DNSZoneID) + populate(objectMap, "domainNotRenewableReasons", d.DomainNotRenewableReasons) + populateDateTimeRFC3339(objectMap, "expirationTime", d.ExpirationTime) + populateDateTimeRFC3339(objectMap, "lastRenewedTime", d.LastRenewedTime) + populate(objectMap, "managedHostNames", d.ManagedHostNames) + populate(objectMap, "nameServers", d.NameServers) + populate(objectMap, "privacy", d.Privacy) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "readyForDnsRecordManagement", d.ReadyForDNSRecordManagement) + populate(objectMap, "registrationStatus", d.RegistrationStatus) + populate(objectMap, "targetDnsType", d.TargetDNSType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainPatchResourceProperties. +func (d *DomainPatchResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authCode": + err = unpopulate(val, "AuthCode", &d.AuthCode) + delete(rawMsg, key) + case "autoRenew": + err = unpopulate(val, "AutoRenew", &d.AutoRenew) + delete(rawMsg, key) + case "consent": + err = unpopulate(val, "Consent", &d.Consent) + delete(rawMsg, key) + case "contactAdmin": + err = unpopulate(val, "ContactAdmin", &d.ContactAdmin) + delete(rawMsg, key) + case "contactBilling": + err = unpopulate(val, "ContactBilling", &d.ContactBilling) + delete(rawMsg, key) + case "contactRegistrant": + err = unpopulate(val, "ContactRegistrant", &d.ContactRegistrant) + delete(rawMsg, key) + case "contactTech": + err = unpopulate(val, "ContactTech", &d.ContactTech) + delete(rawMsg, key) + case "createdTime": + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) + delete(rawMsg, key) + case "dnsType": + err = unpopulate(val, "DNSType", &d.DNSType) + delete(rawMsg, key) + case "dnsZoneId": + err = unpopulate(val, "DNSZoneID", &d.DNSZoneID) + delete(rawMsg, key) + case "domainNotRenewableReasons": + err = unpopulate(val, "DomainNotRenewableReasons", &d.DomainNotRenewableReasons) + delete(rawMsg, key) + case "expirationTime": + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) + delete(rawMsg, key) + case "lastRenewedTime": + err = unpopulateDateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) + delete(rawMsg, key) + case "managedHostNames": + err = unpopulate(val, "ManagedHostNames", &d.ManagedHostNames) + delete(rawMsg, key) + case "nameServers": + err = unpopulate(val, "NameServers", &d.NameServers) + delete(rawMsg, key) + case "privacy": + err = unpopulate(val, "Privacy", &d.Privacy) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "readyForDnsRecordManagement": + err = unpopulate(val, "ReadyForDNSRecordManagement", &d.ReadyForDNSRecordManagement) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) + delete(rawMsg, key) + case "targetDnsType": + err = unpopulate(val, "TargetDNSType", &d.TargetDNSType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainProperties. +func (d DomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authCode", d.AuthCode) + populate(objectMap, "autoRenew", d.AutoRenew) + populate(objectMap, "consent", d.Consent) + populate(objectMap, "contactAdmin", d.ContactAdmin) + populate(objectMap, "contactBilling", d.ContactBilling) + populate(objectMap, "contactRegistrant", d.ContactRegistrant) + populate(objectMap, "contactTech", d.ContactTech) + populateDateTimeRFC3339(objectMap, "createdTime", d.CreatedTime) + populate(objectMap, "dnsType", d.DNSType) + populate(objectMap, "dnsZoneId", d.DNSZoneID) + populate(objectMap, "domainNotRenewableReasons", d.DomainNotRenewableReasons) + populateDateTimeRFC3339(objectMap, "expirationTime", d.ExpirationTime) + populateDateTimeRFC3339(objectMap, "lastRenewedTime", d.LastRenewedTime) + populate(objectMap, "managedHostNames", d.ManagedHostNames) + populate(objectMap, "nameServers", d.NameServers) + populate(objectMap, "privacy", d.Privacy) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "readyForDnsRecordManagement", d.ReadyForDNSRecordManagement) + populate(objectMap, "registrationStatus", d.RegistrationStatus) + populate(objectMap, "targetDnsType", d.TargetDNSType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainProperties. +func (d *DomainProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authCode": + err = unpopulate(val, "AuthCode", &d.AuthCode) + delete(rawMsg, key) + case "autoRenew": + err = unpopulate(val, "AutoRenew", &d.AutoRenew) + delete(rawMsg, key) + case "consent": + err = unpopulate(val, "Consent", &d.Consent) + delete(rawMsg, key) + case "contactAdmin": + err = unpopulate(val, "ContactAdmin", &d.ContactAdmin) + delete(rawMsg, key) + case "contactBilling": + err = unpopulate(val, "ContactBilling", &d.ContactBilling) + delete(rawMsg, key) + case "contactRegistrant": + err = unpopulate(val, "ContactRegistrant", &d.ContactRegistrant) + delete(rawMsg, key) + case "contactTech": + err = unpopulate(val, "ContactTech", &d.ContactTech) + delete(rawMsg, key) + case "createdTime": + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) + delete(rawMsg, key) + case "dnsType": + err = unpopulate(val, "DNSType", &d.DNSType) + delete(rawMsg, key) + case "dnsZoneId": + err = unpopulate(val, "DNSZoneID", &d.DNSZoneID) + delete(rawMsg, key) + case "domainNotRenewableReasons": + err = unpopulate(val, "DomainNotRenewableReasons", &d.DomainNotRenewableReasons) + delete(rawMsg, key) + case "expirationTime": + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) + delete(rawMsg, key) + case "lastRenewedTime": + err = unpopulateDateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) + delete(rawMsg, key) + case "managedHostNames": + err = unpopulate(val, "ManagedHostNames", &d.ManagedHostNames) + delete(rawMsg, key) + case "nameServers": + err = unpopulate(val, "NameServers", &d.NameServers) + delete(rawMsg, key) + case "privacy": + err = unpopulate(val, "Privacy", &d.Privacy) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "readyForDnsRecordManagement": + err = unpopulate(val, "ReadyForDNSRecordManagement", &d.ReadyForDNSRecordManagement) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) + delete(rawMsg, key) + case "targetDnsType": + err = unpopulate(val, "TargetDNSType", &d.TargetDNSType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainPurchaseConsent. +func (d DomainPurchaseConsent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "agreedAt", d.AgreedAt) + populate(objectMap, "agreedBy", d.AgreedBy) + populate(objectMap, "agreementKeys", d.AgreementKeys) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainPurchaseConsent. +func (d *DomainPurchaseConsent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agreedAt": + err = unpopulateDateTimeRFC3339(val, "AgreedAt", &d.AgreedAt) + delete(rawMsg, key) + case "agreedBy": + err = unpopulate(val, "AgreedBy", &d.AgreedBy) + delete(rawMsg, key) + case "agreementKeys": + err = unpopulate(val, "AgreementKeys", &d.AgreementKeys) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainRecommendationSearchParameters. +func (d DomainRecommendationSearchParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keywords", d.Keywords) + populate(objectMap, "maxDomainRecommendations", d.MaxDomainRecommendations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainRecommendationSearchParameters. +func (d *DomainRecommendationSearchParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keywords": + err = unpopulate(val, "Keywords", &d.Keywords) + delete(rawMsg, key) + case "maxDomainRecommendations": + err = unpopulate(val, "MaxDomainRecommendations", &d.MaxDomainRecommendations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnabledConfig. +func (e EnabledConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", e.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnabledConfig. +func (e *EnabledConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &e.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointDependency. +func (e EndpointDependency) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "domainName", e.DomainName) + populate(objectMap, "endpointDetails", e.EndpointDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency. +func (e *EndpointDependency) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domainName": + err = unpopulate(val, "DomainName", &e.DomainName) + delete(rawMsg, key) + case "endpointDetails": + err = unpopulate(val, "EndpointDetails", &e.EndpointDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointDetail. +func (e EndpointDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddress", e.IPAddress) + populate(objectMap, "isAccessible", e.IsAccessible) + populate(objectMap, "latency", e.Latency) + populate(objectMap, "port", e.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail. +func (e *EndpointDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddress": + err = unpopulate(val, "IPAddress", &e.IPAddress) + delete(rawMsg, key) + case "isAccessible": + err = unpopulate(val, "IsAccessible", &e.IsAccessible) + delete(rawMsg, key) + case "latency": + err = unpopulate(val, "Latency", &e.Latency) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &e.Port) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Environment. +func (e Environment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clusterSettings", e.ClusterSettings) + populate(objectMap, "customDnsSuffixConfiguration", e.CustomDNSSuffixConfiguration) + populate(objectMap, "dnsSuffix", e.DNSSuffix) + populate(objectMap, "dedicatedHostCount", e.DedicatedHostCount) + populate(objectMap, "frontEndScaleFactor", e.FrontEndScaleFactor) + populate(objectMap, "hasLinuxWorkers", e.HasLinuxWorkers) + populate(objectMap, "internalLoadBalancingMode", e.InternalLoadBalancingMode) + populate(objectMap, "ipsslAddressCount", e.IpsslAddressCount) + populate(objectMap, "maximumNumberOfMachines", e.MaximumNumberOfMachines) + populate(objectMap, "multiRoleCount", e.MultiRoleCount) + populate(objectMap, "multiSize", e.MultiSize) + populate(objectMap, "networkingConfiguration", e.NetworkingConfiguration) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "status", e.Status) + populate(objectMap, "suspended", e.Suspended) + populate(objectMap, "upgradeAvailability", e.UpgradeAvailability) + populate(objectMap, "upgradePreference", e.UpgradePreference) + populate(objectMap, "userWhitelistedIpRanges", e.UserWhitelistedIPRanges) + populate(objectMap, "virtualNetwork", e.VirtualNetwork) + populate(objectMap, "zoneRedundant", e.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Environment. +func (e *Environment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clusterSettings": + err = unpopulate(val, "ClusterSettings", &e.ClusterSettings) + delete(rawMsg, key) + case "customDnsSuffixConfiguration": + err = unpopulate(val, "CustomDNSSuffixConfiguration", &e.CustomDNSSuffixConfiguration) + delete(rawMsg, key) + case "dnsSuffix": + err = unpopulate(val, "DNSSuffix", &e.DNSSuffix) + delete(rawMsg, key) + case "dedicatedHostCount": + err = unpopulate(val, "DedicatedHostCount", &e.DedicatedHostCount) + delete(rawMsg, key) + case "frontEndScaleFactor": + err = unpopulate(val, "FrontEndScaleFactor", &e.FrontEndScaleFactor) + delete(rawMsg, key) + case "hasLinuxWorkers": + err = unpopulate(val, "HasLinuxWorkers", &e.HasLinuxWorkers) + delete(rawMsg, key) + case "internalLoadBalancingMode": + err = unpopulate(val, "InternalLoadBalancingMode", &e.InternalLoadBalancingMode) + delete(rawMsg, key) + case "ipsslAddressCount": + err = unpopulate(val, "IpsslAddressCount", &e.IpsslAddressCount) + delete(rawMsg, key) + case "maximumNumberOfMachines": + err = unpopulate(val, "MaximumNumberOfMachines", &e.MaximumNumberOfMachines) + delete(rawMsg, key) + case "multiRoleCount": + err = unpopulate(val, "MultiRoleCount", &e.MultiRoleCount) + delete(rawMsg, key) + case "multiSize": + err = unpopulate(val, "MultiSize", &e.MultiSize) + delete(rawMsg, key) + case "networkingConfiguration": + err = unpopulate(val, "NetworkingConfiguration", &e.NetworkingConfiguration) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + case "suspended": + err = unpopulate(val, "Suspended", &e.Suspended) + delete(rawMsg, key) + case "upgradeAvailability": + err = unpopulate(val, "UpgradeAvailability", &e.UpgradeAvailability) + delete(rawMsg, key) + case "upgradePreference": + err = unpopulate(val, "UpgradePreference", &e.UpgradePreference) + delete(rawMsg, key) + case "userWhitelistedIpRanges": + err = unpopulate(val, "UserWhitelistedIPRanges", &e.UserWhitelistedIPRanges) + delete(rawMsg, key) + case "virtualNetwork": + err = unpopulate(val, "VirtualNetwork", &e.VirtualNetwork) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &e.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentCollection. +func (e EnvironmentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentCollection. +func (e *EnvironmentCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentPatchResource. +func (e EnvironmentPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "kind", e.Kind) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentPatchResource. +func (e *EnvironmentPatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentResource. +func (e EnvironmentResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "kind", e.Kind) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentResource. +func (e *EnvironmentResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVar. +func (e EnvironmentVar) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", e.Name) + populate(objectMap, "secretRef", e.SecretRef) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVar. +func (e *EnvironmentVar) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "secretRef": + err = unpopulate(val, "SecretRef", &e.SecretRef) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVariable. +func (e EnvironmentVariable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", e.Name) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVariable. +func (e *EnvironmentVariable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorEntity. +func (e ErrorEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "extendedCode", e.ExtendedCode) + populate(objectMap, "innerErrors", e.InnerErrors) + populate(objectMap, "message", e.Message) + populate(objectMap, "messageTemplate", e.MessageTemplate) + populate(objectMap, "parameters", e.Parameters) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorEntity. +func (e *ErrorEntity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "extendedCode": + err = unpopulate(val, "ExtendedCode", &e.ExtendedCode) + delete(rawMsg, key) + case "innerErrors": + err = unpopulate(val, "InnerErrors", &e.InnerErrors) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "messageTemplate": + err = unpopulate(val, "MessageTemplate", &e.MessageTemplate) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &e.Parameters) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorInfo. +func (e ErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorInfo. +func (e *ErrorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorProperties. +func (e ErrorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorProperties. +func (e *ErrorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. +func (e *ErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Experiments. +func (e Experiments) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rampUpRules", e.RampUpRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Experiments. +func (e *Experiments) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rampUpRules": + err = unpopulate(val, "RampUpRules", &e.RampUpRules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Expression. +func (e Expression) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", e.Error) + populate(objectMap, "subexpressions", e.Subexpressions) + populate(objectMap, "text", e.Text) + populateAny(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Expression. +func (e *Expression) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + case "subexpressions": + err = unpopulate(val, "Subexpressions", &e.Subexpressions) + delete(rawMsg, key) + case "text": + err = unpopulate(val, "Text", &e.Text) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressionRoot. +func (e ExpressionRoot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", e.Error) + populate(objectMap, "path", e.Path) + populate(objectMap, "subexpressions", e.Subexpressions) + populate(objectMap, "text", e.Text) + populateAny(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressionRoot. +func (e *ExpressionRoot) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &e.Path) + delete(rawMsg, key) + case "subexpressions": + err = unpopulate(val, "Subexpressions", &e.Subexpressions) + delete(rawMsg, key) + case "text": + err = unpopulate(val, "Text", &e.Text) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressionTraces. +func (e ExpressionTraces) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inputs", e.Inputs) + populate(objectMap, "nextLink", e.NextLink) + populateAny(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressionTraces. +func (e *ExpressionTraces) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inputs": + err = unpopulate(val, "Inputs", &e.Inputs) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. +func (e ExtendedLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", e.Name) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation. +func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Facebook. +func (f Facebook) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", f.Enabled) + populate(objectMap, "graphApiVersion", f.GraphAPIVersion) + populate(objectMap, "login", f.Login) + populate(objectMap, "registration", f.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Facebook. +func (f *Facebook) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &f.Enabled) + delete(rawMsg, key) + case "graphApiVersion": + err = unpopulate(val, "GraphAPIVersion", &f.GraphAPIVersion) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &f.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &f.Registration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FileSystemApplicationLogsConfig. +func (f FileSystemApplicationLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "level", f.Level) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileSystemApplicationLogsConfig. +func (f *FileSystemApplicationLogsConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "level": + err = unpopulate(val, "Level", &f.Level) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FileSystemHTTPLogsConfig. +func (f FileSystemHTTPLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", f.Enabled) + populate(objectMap, "retentionInDays", f.RetentionInDays) + populate(objectMap, "retentionInMb", f.RetentionInMb) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileSystemHTTPLogsConfig. +func (f *FileSystemHTTPLogsConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &f.Enabled) + delete(rawMsg, key) + case "retentionInDays": + err = unpopulate(val, "RetentionInDays", &f.RetentionInDays) + delete(rawMsg, key) + case "retentionInMb": + err = unpopulate(val, "RetentionInMb", &f.RetentionInMb) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FileSystemTokenStore. +func (f FileSystemTokenStore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "directory", f.Directory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FileSystemTokenStore. +func (f *FileSystemTokenStore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "directory": + err = unpopulate(val, "Directory", &f.Directory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowAccessControlConfiguration. +func (f FlowAccessControlConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actions", f.Actions) + populate(objectMap, "contents", f.Contents) + populate(objectMap, "triggers", f.Triggers) + populate(objectMap, "workflowManagement", f.WorkflowManagement) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowAccessControlConfiguration. +func (f *FlowAccessControlConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actions": + err = unpopulate(val, "Actions", &f.Actions) + delete(rawMsg, key) + case "contents": + err = unpopulate(val, "Contents", &f.Contents) + delete(rawMsg, key) + case "triggers": + err = unpopulate(val, "Triggers", &f.Triggers) + delete(rawMsg, key) + case "workflowManagement": + err = unpopulate(val, "WorkflowManagement", &f.WorkflowManagement) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowAccessControlConfigurationPolicy. +func (f FlowAccessControlConfigurationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedCallerIpAddresses", f.AllowedCallerIPAddresses) + populate(objectMap, "openAuthenticationPolicies", f.OpenAuthenticationPolicies) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowAccessControlConfigurationPolicy. +func (f *FlowAccessControlConfigurationPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedCallerIpAddresses": + err = unpopulate(val, "AllowedCallerIPAddresses", &f.AllowedCallerIPAddresses) + delete(rawMsg, key) + case "openAuthenticationPolicies": + err = unpopulate(val, "OpenAuthenticationPolicies", &f.OpenAuthenticationPolicies) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowEndpoints. +func (f FlowEndpoints) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessEndpointIpAddresses", f.AccessEndpointIPAddresses) + populate(objectMap, "outgoingIpAddresses", f.OutgoingIPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowEndpoints. +func (f *FlowEndpoints) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessEndpointIpAddresses": + err = unpopulate(val, "AccessEndpointIPAddresses", &f.AccessEndpointIPAddresses) + delete(rawMsg, key) + case "outgoingIpAddresses": + err = unpopulate(val, "OutgoingIPAddresses", &f.OutgoingIPAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowEndpointsConfiguration. +func (f FlowEndpointsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connector", f.Connector) + populate(objectMap, "workflow", f.Workflow) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowEndpointsConfiguration. +func (f *FlowEndpointsConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connector": + err = unpopulate(val, "Connector", &f.Connector) + delete(rawMsg, key) + case "workflow": + err = unpopulate(val, "Workflow", &f.Workflow) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ForwardProxy. +func (f ForwardProxy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "convention", f.Convention) + populate(objectMap, "customHostHeaderName", f.CustomHostHeaderName) + populate(objectMap, "customProtoHeaderName", f.CustomProtoHeaderName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ForwardProxy. +func (f *ForwardProxy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "convention": + err = unpopulate(val, "Convention", &f.Convention) + delete(rawMsg, key) + case "customHostHeaderName": + err = unpopulate(val, "CustomHostHeaderName", &f.CustomHostHeaderName) + delete(rawMsg, key) + case "customProtoHeaderName": + err = unpopulate(val, "CustomProtoHeaderName", &f.CustomProtoHeaderName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FrontEndConfiguration. +func (f FrontEndConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "kind", f.Kind) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FrontEndConfiguration. +func (f *FrontEndConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "kind": + err = unpopulate(val, "Kind", &f.Kind) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppConfig. +func (f FunctionAppConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deployment", f.Deployment) + populate(objectMap, "runtime", f.Runtime) + populate(objectMap, "scaleAndConcurrency", f.ScaleAndConcurrency) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppConfig. +func (f *FunctionAppConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deployment": + err = unpopulate(val, "Deployment", &f.Deployment) + delete(rawMsg, key) + case "runtime": + err = unpopulate(val, "Runtime", &f.Runtime) + delete(rawMsg, key) + case "scaleAndConcurrency": + err = unpopulate(val, "ScaleAndConcurrency", &f.ScaleAndConcurrency) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppMajorVersion. +func (f FunctionAppMajorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayText", f.DisplayText) + populate(objectMap, "minorVersions", f.MinorVersions) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppMajorVersion. +func (f *FunctionAppMajorVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &f.DisplayText) + delete(rawMsg, key) + case "minorVersions": + err = unpopulate(val, "MinorVersions", &f.MinorVersions) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppMinorVersion. +func (f FunctionAppMinorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayText", f.DisplayText) + populate(objectMap, "stackSettings", f.StackSettings) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppMinorVersion. +func (f *FunctionAppMinorVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &f.DisplayText) + delete(rawMsg, key) + case "stackSettings": + err = unpopulate(val, "StackSettings", &f.StackSettings) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppRuntimeSettings. +func (f FunctionAppRuntimeSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appInsightsSettings", f.AppInsightsSettings) + populate(objectMap, "appSettingsDictionary", f.AppSettingsDictionary) + populateDateTimeRFC3339(objectMap, "endOfLifeDate", f.EndOfLifeDate) + populate(objectMap, "gitHubActionSettings", f.GitHubActionSettings) + populate(objectMap, "isAutoUpdate", f.IsAutoUpdate) + populate(objectMap, "isDefault", f.IsDefault) + populate(objectMap, "isDeprecated", f.IsDeprecated) + populate(objectMap, "isEarlyAccess", f.IsEarlyAccess) + populate(objectMap, "isHidden", f.IsHidden) + populate(objectMap, "isPreview", f.IsPreview) + populate(objectMap, "remoteDebuggingSupported", f.RemoteDebuggingSupported) + populate(objectMap, "runtimeVersion", f.RuntimeVersion) + populate(objectMap, "siteConfigPropertiesDictionary", f.SiteConfigPropertiesDictionary) + populate(objectMap, "supportedFunctionsExtensionVersions", f.SupportedFunctionsExtensionVersions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppRuntimeSettings. +func (f *FunctionAppRuntimeSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsSettings": + err = unpopulate(val, "AppInsightsSettings", &f.AppInsightsSettings) + delete(rawMsg, key) + case "appSettingsDictionary": + err = unpopulate(val, "AppSettingsDictionary", &f.AppSettingsDictionary) + delete(rawMsg, key) + case "endOfLifeDate": + err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &f.EndOfLifeDate) + delete(rawMsg, key) + case "gitHubActionSettings": + err = unpopulate(val, "GitHubActionSettings", &f.GitHubActionSettings) + delete(rawMsg, key) + case "isAutoUpdate": + err = unpopulate(val, "IsAutoUpdate", &f.IsAutoUpdate) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &f.IsDefault) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &f.IsDeprecated) + delete(rawMsg, key) + case "isEarlyAccess": + err = unpopulate(val, "IsEarlyAccess", &f.IsEarlyAccess) + delete(rawMsg, key) + case "isHidden": + err = unpopulate(val, "IsHidden", &f.IsHidden) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &f.IsPreview) + delete(rawMsg, key) + case "remoteDebuggingSupported": + err = unpopulate(val, "RemoteDebuggingSupported", &f.RemoteDebuggingSupported) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &f.RuntimeVersion) + delete(rawMsg, key) + case "siteConfigPropertiesDictionary": + err = unpopulate(val, "SiteConfigPropertiesDictionary", &f.SiteConfigPropertiesDictionary) + delete(rawMsg, key) + case "supportedFunctionsExtensionVersions": + err = unpopulate(val, "SupportedFunctionsExtensionVersions", &f.SupportedFunctionsExtensionVersions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppRuntimes. +func (f FunctionAppRuntimes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "linuxRuntimeSettings", f.LinuxRuntimeSettings) + populate(objectMap, "windowsRuntimeSettings", f.WindowsRuntimeSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppRuntimes. +func (f *FunctionAppRuntimes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "linuxRuntimeSettings": + err = unpopulate(val, "LinuxRuntimeSettings", &f.LinuxRuntimeSettings) + delete(rawMsg, key) + case "windowsRuntimeSettings": + err = unpopulate(val, "WindowsRuntimeSettings", &f.WindowsRuntimeSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppStack. +func (f FunctionAppStack) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "kind", f.Kind) + populate(objectMap, "location", f.Location) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppStack. +func (f *FunctionAppStack) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &f.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &f.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppStackCollection. +func (f FunctionAppStackCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppStackCollection. +func (f *FunctionAppStackCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionAppStackProperties. +func (f FunctionAppStackProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayText", f.DisplayText) + populate(objectMap, "majorVersions", f.MajorVersions) + populate(objectMap, "preferredOs", f.PreferredOs) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppStackProperties. +func (f *FunctionAppStackProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &f.DisplayText) + delete(rawMsg, key) + case "majorVersions": + err = unpopulate(val, "MajorVersions", &f.MajorVersions) + delete(rawMsg, key) + case "preferredOs": + err = unpopulate(val, "PreferredOs", &f.PreferredOs) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionEnvelope. +func (f FunctionEnvelope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "kind", f.Kind) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionEnvelope. +func (f *FunctionEnvelope) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &f.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionEnvelopeCollection. +func (f FunctionEnvelopeCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionEnvelopeCollection. +func (f *FunctionEnvelopeCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionEnvelopeProperties. +func (f FunctionEnvelopeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "config", f.Config) + populate(objectMap, "config_href", f.ConfigHref) + populate(objectMap, "files", f.Files) + populate(objectMap, "function_app_id", f.FunctionAppID) + populate(objectMap, "href", f.Href) + populate(objectMap, "invoke_url_template", f.InvokeURLTemplate) + populate(objectMap, "isDisabled", f.IsDisabled) + populate(objectMap, "language", f.Language) + populate(objectMap, "script_href", f.ScriptHref) + populate(objectMap, "script_root_path_href", f.ScriptRootPathHref) + populate(objectMap, "secrets_file_href", f.SecretsFileHref) + populate(objectMap, "test_data", f.TestData) + populate(objectMap, "test_data_href", f.TestDataHref) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionEnvelopeProperties. +func (f *FunctionEnvelopeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "config": + err = unpopulate(val, "Config", &f.Config) + delete(rawMsg, key) + case "config_href": + err = unpopulate(val, "ConfigHref", &f.ConfigHref) + delete(rawMsg, key) + case "files": + err = unpopulate(val, "Files", &f.Files) + delete(rawMsg, key) + case "function_app_id": + err = unpopulate(val, "FunctionAppID", &f.FunctionAppID) + delete(rawMsg, key) + case "href": + err = unpopulate(val, "Href", &f.Href) + delete(rawMsg, key) + case "invoke_url_template": + err = unpopulate(val, "InvokeURLTemplate", &f.InvokeURLTemplate) + delete(rawMsg, key) + case "isDisabled": + err = unpopulate(val, "IsDisabled", &f.IsDisabled) + delete(rawMsg, key) + case "language": + err = unpopulate(val, "Language", &f.Language) + delete(rawMsg, key) + case "script_href": + err = unpopulate(val, "ScriptHref", &f.ScriptHref) + delete(rawMsg, key) + case "script_root_path_href": + err = unpopulate(val, "ScriptRootPathHref", &f.ScriptRootPathHref) + delete(rawMsg, key) + case "secrets_file_href": + err = unpopulate(val, "SecretsFileHref", &f.SecretsFileHref) + delete(rawMsg, key) + case "test_data": + err = unpopulate(val, "TestData", &f.TestData) + delete(rawMsg, key) + case "test_data_href": + err = unpopulate(val, "TestDataHref", &f.TestDataHref) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionSecrets. +func (f FunctionSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "key", f.Key) + populate(objectMap, "trigger_url", f.TriggerURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionSecrets. +func (f *FunctionSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &f.Key) + delete(rawMsg, key) + case "trigger_url": + err = unpopulate(val, "TriggerURL", &f.TriggerURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsAlwaysReadyConfig. +func (f FunctionsAlwaysReadyConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceCount", f.InstanceCount) + populate(objectMap, "name", f.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsAlwaysReadyConfig. +func (f *FunctionsAlwaysReadyConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceCount": + err = unpopulate(val, "InstanceCount", &f.InstanceCount) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsDeployment. +func (f FunctionsDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "storage", f.Storage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsDeployment. +func (f *FunctionsDeployment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "storage": + err = unpopulate(val, "Storage", &f.Storage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsDeploymentStorage. +func (f FunctionsDeploymentStorage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authentication", f.Authentication) + populate(objectMap, "type", f.Type) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsDeploymentStorage. +func (f *FunctionsDeploymentStorage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authentication": + err = unpopulate(val, "Authentication", &f.Authentication) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsDeploymentStorageAuthentication. +func (f FunctionsDeploymentStorageAuthentication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "storageAccountConnectionStringName", f.StorageAccountConnectionStringName) + populate(objectMap, "type", f.Type) + populate(objectMap, "userAssignedIdentityResourceId", f.UserAssignedIdentityResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsDeploymentStorageAuthentication. +func (f *FunctionsDeploymentStorageAuthentication) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "storageAccountConnectionStringName": + err = unpopulate(val, "StorageAccountConnectionStringName", &f.StorageAccountConnectionStringName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + case "userAssignedIdentityResourceId": + err = unpopulate(val, "UserAssignedIdentityResourceID", &f.UserAssignedIdentityResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsRuntime. +func (f FunctionsRuntime) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", f.Name) + populate(objectMap, "version", f.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsRuntime. +func (f *FunctionsRuntime) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &f.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsScaleAndConcurrency. +func (f FunctionsScaleAndConcurrency) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alwaysReady", f.AlwaysReady) + populate(objectMap, "instanceMemoryMB", f.InstanceMemoryMB) + populate(objectMap, "maximumInstanceCount", f.MaximumInstanceCount) + populate(objectMap, "triggers", f.Triggers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsScaleAndConcurrency. +func (f *FunctionsScaleAndConcurrency) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alwaysReady": + err = unpopulate(val, "AlwaysReady", &f.AlwaysReady) + delete(rawMsg, key) + case "instanceMemoryMB": + err = unpopulate(val, "InstanceMemoryMB", &f.InstanceMemoryMB) + delete(rawMsg, key) + case "maximumInstanceCount": + err = unpopulate(val, "MaximumInstanceCount", &f.MaximumInstanceCount) + delete(rawMsg, key) + case "triggers": + err = unpopulate(val, "Triggers", &f.Triggers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsScaleAndConcurrencyTriggers. +func (f FunctionsScaleAndConcurrencyTriggers) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "http", f.HTTP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsScaleAndConcurrencyTriggers. +func (f *FunctionsScaleAndConcurrencyTriggers) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "http": + err = unpopulate(val, "HTTP", &f.HTTP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FunctionsScaleAndConcurrencyTriggersHTTP. +func (f FunctionsScaleAndConcurrencyTriggersHTTP) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "perInstanceConcurrency", f.PerInstanceConcurrency) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionsScaleAndConcurrencyTriggersHTTP. +func (f *FunctionsScaleAndConcurrencyTriggersHTTP) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "perInstanceConcurrency": + err = unpopulate(val, "PerInstanceConcurrency", &f.PerInstanceConcurrency) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoRegion. +func (g GeoRegion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", g.ID) + populate(objectMap, "kind", g.Kind) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoRegion. +func (g *GeoRegion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &g.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoRegionCollection. +func (g GeoRegionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoRegionCollection. +func (g *GeoRegionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoRegionProperties. +func (g GeoRegionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", g.Description) + populate(objectMap, "displayName", g.DisplayName) + populate(objectMap, "orgDomain", g.OrgDomain) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoRegionProperties. +func (g *GeoRegionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &g.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &g.DisplayName) + delete(rawMsg, key) + case "orgDomain": + err = unpopulate(val, "OrgDomain", &g.OrgDomain) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitHub. +func (g GitHub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", g.Enabled) + populate(objectMap, "login", g.Login) + populate(objectMap, "registration", g.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitHub. +func (g *GitHub) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &g.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &g.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &g.Registration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitHubActionCodeConfiguration. +func (g GitHubActionCodeConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "runtimeStack", g.RuntimeStack) + populate(objectMap, "runtimeVersion", g.RuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitHubActionCodeConfiguration. +func (g *GitHubActionCodeConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "runtimeStack": + err = unpopulate(val, "RuntimeStack", &g.RuntimeStack) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &g.RuntimeVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitHubActionConfiguration. +func (g GitHubActionConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "codeConfiguration", g.CodeConfiguration) + populate(objectMap, "containerConfiguration", g.ContainerConfiguration) + populate(objectMap, "generateWorkflowFile", g.GenerateWorkflowFile) + populate(objectMap, "isLinux", g.IsLinux) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitHubActionConfiguration. +func (g *GitHubActionConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &g.CodeConfiguration) + delete(rawMsg, key) + case "containerConfiguration": + err = unpopulate(val, "ContainerConfiguration", &g.ContainerConfiguration) + delete(rawMsg, key) + case "generateWorkflowFile": + err = unpopulate(val, "GenerateWorkflowFile", &g.GenerateWorkflowFile) + delete(rawMsg, key) + case "isLinux": + err = unpopulate(val, "IsLinux", &g.IsLinux) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitHubActionContainerConfiguration. +func (g GitHubActionContainerConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "imageName", g.ImageName) + populate(objectMap, "password", g.Password) + populate(objectMap, "serverUrl", g.ServerURL) + populate(objectMap, "username", g.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitHubActionContainerConfiguration. +func (g *GitHubActionContainerConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "imageName": + err = unpopulate(val, "ImageName", &g.ImageName) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &g.Password) + delete(rawMsg, key) + case "serverUrl": + err = unpopulate(val, "ServerURL", &g.ServerURL) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &g.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GitHubActionWebAppStackSettings. +func (g GitHubActionWebAppStackSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isSupported", g.IsSupported) + populate(objectMap, "supportedVersion", g.SupportedVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GitHubActionWebAppStackSettings. +func (g *GitHubActionWebAppStackSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isSupported": + err = unpopulate(val, "IsSupported", &g.IsSupported) + delete(rawMsg, key) + case "supportedVersion": + err = unpopulate(val, "SupportedVersion", &g.SupportedVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GithubToken. +func (g GithubToken) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessToken", g.AccessToken) + populate(objectMap, "errorMessage", g.ErrorMessage) + populate(objectMap, "gotToken", g.GotToken) + populate(objectMap, "scope", g.Scope) + populate(objectMap, "tokenType", g.TokenType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GithubToken. +func (g *GithubToken) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessToken": + err = unpopulate(val, "AccessToken", &g.AccessToken) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &g.ErrorMessage) + delete(rawMsg, key) + case "gotToken": + err = unpopulate(val, "GotToken", &g.GotToken) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &g.Scope) + delete(rawMsg, key) + case "tokenType": + err = unpopulate(val, "TokenType", &g.TokenType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GithubTokenRequest. +func (g GithubTokenRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", g.Code) + populate(objectMap, "state", g.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GithubTokenRequest. +func (g *GithubTokenRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &g.Code) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &g.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GlobalCsmSKUDescription. +func (g GlobalCsmSKUDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capabilities", g.Capabilities) + populate(objectMap, "capacity", g.Capacity) + populate(objectMap, "family", g.Family) + populate(objectMap, "locations", g.Locations) + populate(objectMap, "name", g.Name) + populate(objectMap, "size", g.Size) + populate(objectMap, "tier", g.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GlobalCsmSKUDescription. +func (g *GlobalCsmSKUDescription) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capabilities": + err = unpopulate(val, "Capabilities", &g.Capabilities) + delete(rawMsg, key) + case "capacity": + err = unpopulate(val, "Capacity", &g.Capacity) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &g.Family) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &g.Locations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &g.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &g.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GlobalValidation. +func (g GlobalValidation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "excludedPaths", g.ExcludedPaths) + populate(objectMap, "redirectToProvider", g.RedirectToProvider) + populate(objectMap, "requireAuthentication", g.RequireAuthentication) + populate(objectMap, "unauthenticatedClientAction", g.UnauthenticatedClientAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GlobalValidation. +func (g *GlobalValidation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "excludedPaths": + err = unpopulate(val, "ExcludedPaths", &g.ExcludedPaths) + delete(rawMsg, key) + case "redirectToProvider": + err = unpopulate(val, "RedirectToProvider", &g.RedirectToProvider) + delete(rawMsg, key) + case "requireAuthentication": + err = unpopulate(val, "RequireAuthentication", &g.RequireAuthentication) + delete(rawMsg, key) + case "unauthenticatedClientAction": + err = unpopulate(val, "UnauthenticatedClientAction", &g.UnauthenticatedClientAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Google. +func (g Google) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", g.Enabled) + populate(objectMap, "login", g.Login) + populate(objectMap, "registration", g.Registration) + populate(objectMap, "validation", g.Validation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Google. +func (g *Google) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &g.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &g.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &g.Registration) + delete(rawMsg, key) + case "validation": + err = unpopulate(val, "Validation", &g.Validation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPLogsConfig. +func (h HTTPLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureBlobStorage", h.AzureBlobStorage) + populate(objectMap, "fileSystem", h.FileSystem) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPLogsConfig. +func (h *HTTPLogsConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureBlobStorage": + err = unpopulate(val, "AzureBlobStorage", &h.AzureBlobStorage) + delete(rawMsg, key) + case "fileSystem": + err = unpopulate(val, "FileSystem", &h.FileSystem) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPScaleRule. +func (h HTTPScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auth", h.Auth) + populate(objectMap, "metadata", h.Metadata) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPScaleRule. +func (h *HTTPScaleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &h.Auth) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &h.Metadata) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPSettings. +func (h HTTPSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "forwardProxy", h.ForwardProxy) + populate(objectMap, "requireHttps", h.RequireHTTPS) + populate(objectMap, "routes", h.Routes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPSettings. +func (h *HTTPSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "forwardProxy": + err = unpopulate(val, "ForwardProxy", &h.ForwardProxy) + delete(rawMsg, key) + case "requireHttps": + err = unpopulate(val, "RequireHTTPS", &h.RequireHTTPS) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &h.Routes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPSettingsRoutes. +func (h HTTPSettingsRoutes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiPrefix", h.APIPrefix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPSettingsRoutes. +func (h *HTTPSettingsRoutes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiPrefix": + err = unpopulate(val, "APIPrefix", &h.APIPrefix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HandlerMapping. +func (h HandlerMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "arguments", h.Arguments) + populate(objectMap, "extension", h.Extension) + populate(objectMap, "scriptProcessor", h.ScriptProcessor) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HandlerMapping. +func (h *HandlerMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "arguments": + err = unpopulate(val, "Arguments", &h.Arguments) + delete(rawMsg, key) + case "extension": + err = unpopulate(val, "Extension", &h.Extension) + delete(rawMsg, key) + case "scriptProcessor": + err = unpopulate(val, "ScriptProcessor", &h.ScriptProcessor) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostKeys. +func (h HostKeys) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "functionKeys", h.FunctionKeys) + populate(objectMap, "masterKey", h.MasterKey) + populate(objectMap, "systemKeys", h.SystemKeys) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostKeys. +func (h *HostKeys) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "functionKeys": + err = unpopulate(val, "FunctionKeys", &h.FunctionKeys) + delete(rawMsg, key) + case "masterKey": + err = unpopulate(val, "MasterKey", &h.MasterKey) + delete(rawMsg, key) + case "systemKeys": + err = unpopulate(val, "SystemKeys", &h.SystemKeys) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostName. +func (h HostName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureResourceName", h.AzureResourceName) + populate(objectMap, "azureResourceType", h.AzureResourceType) + populate(objectMap, "customHostNameDnsRecordType", h.CustomHostNameDNSRecordType) + populate(objectMap, "hostNameType", h.HostNameType) + populate(objectMap, "name", h.Name) + populate(objectMap, "siteNames", h.SiteNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostName. +func (h *HostName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureResourceName": + err = unpopulate(val, "AzureResourceName", &h.AzureResourceName) + delete(rawMsg, key) + case "azureResourceType": + err = unpopulate(val, "AzureResourceType", &h.AzureResourceType) + delete(rawMsg, key) + case "customHostNameDnsRecordType": + err = unpopulate(val, "CustomHostNameDNSRecordType", &h.CustomHostNameDNSRecordType) + delete(rawMsg, key) + case "hostNameType": + err = unpopulate(val, "HostNameType", &h.HostNameType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "siteNames": + err = unpopulate(val, "SiteNames", &h.SiteNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostNameBinding. +func (h HostNameBinding) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", h.ID) + populate(objectMap, "kind", h.Kind) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostNameBinding. +func (h *HostNameBinding) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &h.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostNameBindingCollection. +func (h HostNameBindingCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", h.NextLink) + populate(objectMap, "value", h.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostNameBindingCollection. +func (h *HostNameBindingCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &h.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &h.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostNameBindingProperties. +func (h HostNameBindingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureResourceName", h.AzureResourceName) + populate(objectMap, "azureResourceType", h.AzureResourceType) + populate(objectMap, "customHostNameDnsRecordType", h.CustomHostNameDNSRecordType) + populate(objectMap, "domainId", h.DomainID) + populate(objectMap, "hostNameType", h.HostNameType) + populate(objectMap, "sslState", h.SSLState) + populate(objectMap, "siteName", h.SiteName) + populate(objectMap, "thumbprint", h.Thumbprint) + populate(objectMap, "virtualIP", h.VirtualIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostNameBindingProperties. +func (h *HostNameBindingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureResourceName": + err = unpopulate(val, "AzureResourceName", &h.AzureResourceName) + delete(rawMsg, key) + case "azureResourceType": + err = unpopulate(val, "AzureResourceType", &h.AzureResourceType) + delete(rawMsg, key) + case "customHostNameDnsRecordType": + err = unpopulate(val, "CustomHostNameDNSRecordType", &h.CustomHostNameDNSRecordType) + delete(rawMsg, key) + case "domainId": + err = unpopulate(val, "DomainID", &h.DomainID) + delete(rawMsg, key) + case "hostNameType": + err = unpopulate(val, "HostNameType", &h.HostNameType) + delete(rawMsg, key) + case "sslState": + err = unpopulate(val, "SSLState", &h.SSLState) + delete(rawMsg, key) + case "siteName": + err = unpopulate(val, "SiteName", &h.SiteName) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &h.Thumbprint) + delete(rawMsg, key) + case "virtualIP": + err = unpopulate(val, "VirtualIP", &h.VirtualIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostNameSSLState. +func (h HostNameSSLState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostType", h.HostType) + populate(objectMap, "name", h.Name) + populate(objectMap, "sslState", h.SSLState) + populate(objectMap, "thumbprint", h.Thumbprint) + populate(objectMap, "toUpdate", h.ToUpdate) + populate(objectMap, "virtualIP", h.VirtualIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostNameSSLState. +func (h *HostNameSSLState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostType": + err = unpopulate(val, "HostType", &h.HostType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "sslState": + err = unpopulate(val, "SSLState", &h.SSLState) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &h.Thumbprint) + delete(rawMsg, key) + case "toUpdate": + err = unpopulate(val, "ToUpdate", &h.ToUpdate) + delete(rawMsg, key) + case "virtualIP": + err = unpopulate(val, "VirtualIP", &h.VirtualIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostingEnvironmentDeploymentInfo. +func (h HostingEnvironmentDeploymentInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", h.Location) + populate(objectMap, "name", h.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostingEnvironmentDeploymentInfo. +func (h *HostingEnvironmentDeploymentInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &h.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostingEnvironmentDiagnostics. +func (h HostingEnvironmentDiagnostics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diagnosticsOutput", h.DiagnosticsOutput) + populate(objectMap, "name", h.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostingEnvironmentDiagnostics. +func (h *HostingEnvironmentDiagnostics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diagnosticsOutput": + err = unpopulate(val, "DiagnosticsOutput", &h.DiagnosticsOutput) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostingEnvironmentProfile. +func (h HostingEnvironmentProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", h.ID) + populate(objectMap, "name", h.Name) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostingEnvironmentProfile. +func (h *HostingEnvironmentProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnection. +func (h HybridConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", h.ID) + populate(objectMap, "kind", h.Kind) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnection. +func (h *HybridConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &h.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionCollection. +func (h HybridConnectionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", h.NextLink) + populate(objectMap, "value", h.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionCollection. +func (h *HybridConnectionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &h.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &h.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionKey. +func (h HybridConnectionKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", h.ID) + populate(objectMap, "kind", h.Kind) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionKey. +func (h *HybridConnectionKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &h.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionKeyProperties. +func (h HybridConnectionKeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sendKeyName", h.SendKeyName) + populate(objectMap, "sendKeyValue", h.SendKeyValue) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionKeyProperties. +func (h *HybridConnectionKeyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sendKeyName": + err = unpopulate(val, "SendKeyName", &h.SendKeyName) + delete(rawMsg, key) + case "sendKeyValue": + err = unpopulate(val, "SendKeyValue", &h.SendKeyValue) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionLimits. +func (h HybridConnectionLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", h.ID) + populate(objectMap, "kind", h.Kind) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionLimits. +func (h *HybridConnectionLimits) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &h.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionLimitsProperties. +func (h HybridConnectionLimitsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "current", h.Current) + populate(objectMap, "maximum", h.Maximum) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionLimitsProperties. +func (h *HybridConnectionLimitsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "current": + err = unpopulate(val, "Current", &h.Current) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &h.Maximum) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HybridConnectionProperties. +func (h HybridConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostname", h.Hostname) + populate(objectMap, "port", h.Port) + populate(objectMap, "relayArmUri", h.RelayArmURI) + populate(objectMap, "relayName", h.RelayName) + populate(objectMap, "sendKeyName", h.SendKeyName) + populate(objectMap, "sendKeyValue", h.SendKeyValue) + populate(objectMap, "serviceBusNamespace", h.ServiceBusNamespace) + populate(objectMap, "serviceBusSuffix", h.ServiceBusSuffix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HybridConnectionProperties. +func (h *HybridConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostname": + err = unpopulate(val, "Hostname", &h.Hostname) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &h.Port) + delete(rawMsg, key) + case "relayArmUri": + err = unpopulate(val, "RelayArmURI", &h.RelayArmURI) + delete(rawMsg, key) + case "relayName": + err = unpopulate(val, "RelayName", &h.RelayName) + delete(rawMsg, key) + case "sendKeyName": + err = unpopulate(val, "SendKeyName", &h.SendKeyName) + delete(rawMsg, key) + case "sendKeyValue": + err = unpopulate(val, "SendKeyValue", &h.SendKeyValue) + delete(rawMsg, key) + case "serviceBusNamespace": + err = unpopulate(val, "ServiceBusNamespace", &h.ServiceBusNamespace) + delete(rawMsg, key) + case "serviceBusSuffix": + err = unpopulate(val, "ServiceBusSuffix", &h.ServiceBusSuffix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPAddress. +func (i IPAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", i.Address) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPAddress. +func (i *IPAddress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &i.Address) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPAddressRange. +func (i IPAddressRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressRange", i.AddressRange) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressRange. +func (i *IPAddressRange) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressRange": + err = unpopulate(val, "AddressRange", &i.AddressRange) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPSecurityRestriction. +func (i IPSecurityRestriction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", i.Action) + populate(objectMap, "description", i.Description) + populate(objectMap, "headers", i.Headers) + populate(objectMap, "ipAddress", i.IPAddress) + populate(objectMap, "name", i.Name) + populate(objectMap, "priority", i.Priority) + populate(objectMap, "subnetMask", i.SubnetMask) + populate(objectMap, "subnetTrafficTag", i.SubnetTrafficTag) + populate(objectMap, "tag", i.Tag) + populate(objectMap, "vnetSubnetResourceId", i.VnetSubnetResourceID) + populate(objectMap, "vnetTrafficTag", i.VnetTrafficTag) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPSecurityRestriction. +func (i *IPSecurityRestriction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &i.Action) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &i.Description) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &i.Headers) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &i.IPAddress) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &i.Priority) + delete(rawMsg, key) + case "subnetMask": + err = unpopulate(val, "SubnetMask", &i.SubnetMask) + delete(rawMsg, key) + case "subnetTrafficTag": + err = unpopulate(val, "SubnetTrafficTag", &i.SubnetTrafficTag) + delete(rawMsg, key) + case "tag": + err = unpopulate(val, "Tag", &i.Tag) + delete(rawMsg, key) + case "vnetSubnetResourceId": + err = unpopulate(val, "VnetSubnetResourceID", &i.VnetSubnetResourceID) + delete(rawMsg, key) + case "vnetTrafficTag": + err = unpopulate(val, "VnetTrafficTag", &i.VnetTrafficTag) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Identifier. +func (i Identifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "kind", i.Kind) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Identifier. +func (i *Identifier) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &i.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentifierCollection. +func (i IdentifierCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentifierCollection. +func (i *IdentifierCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentifierProperties. +func (i IdentifierProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentifierProperties. +func (i *IdentifierProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviders. +func (i IdentityProviders) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apple", i.Apple) + populate(objectMap, "azureActiveDirectory", i.AzureActiveDirectory) + populate(objectMap, "azureStaticWebApps", i.AzureStaticWebApps) + populate(objectMap, "customOpenIdConnectProviders", i.CustomOpenIDConnectProviders) + populate(objectMap, "facebook", i.Facebook) + populate(objectMap, "gitHub", i.GitHub) + populate(objectMap, "google", i.Google) + populate(objectMap, "legacyMicrosoftAccount", i.LegacyMicrosoftAccount) + populate(objectMap, "twitter", i.Twitter) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviders. +func (i *IdentityProviders) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apple": + err = unpopulate(val, "Apple", &i.Apple) + delete(rawMsg, key) + case "azureActiveDirectory": + err = unpopulate(val, "AzureActiveDirectory", &i.AzureActiveDirectory) + delete(rawMsg, key) + case "azureStaticWebApps": + err = unpopulate(val, "AzureStaticWebApps", &i.AzureStaticWebApps) + delete(rawMsg, key) + case "customOpenIdConnectProviders": + err = unpopulate(val, "CustomOpenIDConnectProviders", &i.CustomOpenIDConnectProviders) + delete(rawMsg, key) + case "facebook": + err = unpopulate(val, "Facebook", &i.Facebook) + delete(rawMsg, key) + case "gitHub": + err = unpopulate(val, "GitHub", &i.GitHub) + delete(rawMsg, key) + case "google": + err = unpopulate(val, "Google", &i.Google) + delete(rawMsg, key) + case "legacyMicrosoftAccount": + err = unpopulate(val, "LegacyMicrosoftAccount", &i.LegacyMicrosoftAccount) + delete(rawMsg, key) + case "twitter": + err = unpopulate(val, "Twitter", &i.Twitter) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundEnvironmentEndpoint. +func (i InboundEnvironmentEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", i.Description) + populate(objectMap, "endpoints", i.Endpoints) + populate(objectMap, "ports", i.Ports) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundEnvironmentEndpoint. +func (i *InboundEnvironmentEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &i.Description) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &i.Endpoints) + delete(rawMsg, key) + case "ports": + err = unpopulate(val, "Ports", &i.Ports) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundEnvironmentEndpointCollection. +func (i InboundEnvironmentEndpointCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundEnvironmentEndpointCollection. +func (i *InboundEnvironmentEndpointCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Ingress. +func (i Ingress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowInsecure", i.AllowInsecure) + populate(objectMap, "external", i.External) + populate(objectMap, "fqdn", i.Fqdn) + populate(objectMap, "targetPort", i.TargetPort) + populate(objectMap, "traffic", i.Traffic) + populate(objectMap, "transport", i.Transport) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Ingress. +func (i *Ingress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowInsecure": + err = unpopulate(val, "AllowInsecure", &i.AllowInsecure) + delete(rawMsg, key) + case "external": + err = unpopulate(val, "External", &i.External) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &i.Fqdn) + delete(rawMsg, key) + case "targetPort": + err = unpopulate(val, "TargetPort", &i.TargetPort) + delete(rawMsg, key) + case "traffic": + err = unpopulate(val, "Traffic", &i.Traffic) + delete(rawMsg, key) + case "transport": + err = unpopulate(val, "Transport", &i.Transport) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JSONSchema. +func (j JSONSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "content", j.Content) + populate(objectMap, "title", j.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JSONSchema. +func (j *JSONSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "content": + err = unpopulate(val, "Content", &j.Content) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &j.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JwtClaimChecks. +func (j JwtClaimChecks) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedClientApplications", j.AllowedClientApplications) + populate(objectMap, "allowedGroups", j.AllowedGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JwtClaimChecks. +func (j *JwtClaimChecks) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedClientApplications": + err = unpopulate(val, "AllowedClientApplications", &j.AllowedClientApplications) + delete(rawMsg, key) + case "allowedGroups": + err = unpopulate(val, "AllowedGroups", &j.AllowedGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyInfo. +func (k KeyInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", k.Name) + populate(objectMap, "value", k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyInfo. +func (k *KeyInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyValuePairStringObject. +func (k KeyValuePairStringObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "key", k.Key) + populateAny(objectMap, "value", k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyValuePairStringObject. +func (k *KeyValuePairStringObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &k.Key) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironment. +func (k KubeEnvironment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedLocation", k.ExtendedLocation) + populate(objectMap, "id", k.ID) + populate(objectMap, "kind", k.Kind) + populate(objectMap, "location", k.Location) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "tags", k.Tags) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironment. +func (k *KubeEnvironment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &k.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &k.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &k.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &k.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentCollection. +func (k KubeEnvironmentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", k.NextLink) + populate(objectMap, "value", k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironmentCollection. +func (k *KubeEnvironmentCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &k.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentPatchResource. +func (k KubeEnvironmentPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", k.ID) + populate(objectMap, "kind", k.Kind) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironmentPatchResource. +func (k *KubeEnvironmentPatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &k.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentPatchResourceProperties. +func (k KubeEnvironmentPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aksResourceID", k.AksResourceID) + populate(objectMap, "appLogsConfiguration", k.AppLogsConfiguration) + populate(objectMap, "arcConfiguration", k.ArcConfiguration) + populate(objectMap, "containerAppsConfiguration", k.ContainerAppsConfiguration) + populate(objectMap, "defaultDomain", k.DefaultDomain) + populate(objectMap, "deploymentErrors", k.DeploymentErrors) + populate(objectMap, "internalLoadBalancerEnabled", k.InternalLoadBalancerEnabled) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "staticIp", k.StaticIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironmentPatchResourceProperties. +func (k *KubeEnvironmentPatchResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aksResourceID": + err = unpopulate(val, "AksResourceID", &k.AksResourceID) + delete(rawMsg, key) + case "appLogsConfiguration": + err = unpopulate(val, "AppLogsConfiguration", &k.AppLogsConfiguration) + delete(rawMsg, key) + case "arcConfiguration": + err = unpopulate(val, "ArcConfiguration", &k.ArcConfiguration) + delete(rawMsg, key) + case "containerAppsConfiguration": + err = unpopulate(val, "ContainerAppsConfiguration", &k.ContainerAppsConfiguration) + delete(rawMsg, key) + case "defaultDomain": + err = unpopulate(val, "DefaultDomain", &k.DefaultDomain) + delete(rawMsg, key) + case "deploymentErrors": + err = unpopulate(val, "DeploymentErrors", &k.DeploymentErrors) + delete(rawMsg, key) + case "internalLoadBalancerEnabled": + err = unpopulate(val, "InternalLoadBalancerEnabled", &k.InternalLoadBalancerEnabled) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "staticIp": + err = unpopulate(val, "StaticIP", &k.StaticIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentProfile. +func (k KubeEnvironmentProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", k.ID) + populate(objectMap, "name", k.Name) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironmentProfile. +func (k *KubeEnvironmentProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentProperties. +func (k KubeEnvironmentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aksResourceID", k.AksResourceID) + populate(objectMap, "appLogsConfiguration", k.AppLogsConfiguration) + populate(objectMap, "arcConfiguration", k.ArcConfiguration) + populate(objectMap, "containerAppsConfiguration", k.ContainerAppsConfiguration) + populate(objectMap, "defaultDomain", k.DefaultDomain) + populate(objectMap, "deploymentErrors", k.DeploymentErrors) + populate(objectMap, "environmentType", k.EnvironmentType) + populate(objectMap, "internalLoadBalancerEnabled", k.InternalLoadBalancerEnabled) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "staticIp", k.StaticIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeEnvironmentProperties. +func (k *KubeEnvironmentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aksResourceID": + err = unpopulate(val, "AksResourceID", &k.AksResourceID) + delete(rawMsg, key) + case "appLogsConfiguration": + err = unpopulate(val, "AppLogsConfiguration", &k.AppLogsConfiguration) + delete(rawMsg, key) + case "arcConfiguration": + err = unpopulate(val, "ArcConfiguration", &k.ArcConfiguration) + delete(rawMsg, key) + case "containerAppsConfiguration": + err = unpopulate(val, "ContainerAppsConfiguration", &k.ContainerAppsConfiguration) + delete(rawMsg, key) + case "defaultDomain": + err = unpopulate(val, "DefaultDomain", &k.DefaultDomain) + delete(rawMsg, key) + case "deploymentErrors": + err = unpopulate(val, "DeploymentErrors", &k.DeploymentErrors) + delete(rawMsg, key) + case "environmentType": + err = unpopulate(val, "EnvironmentType", &k.EnvironmentType) + delete(rawMsg, key) + case "internalLoadBalancerEnabled": + err = unpopulate(val, "InternalLoadBalancerEnabled", &k.InternalLoadBalancerEnabled) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "staticIp": + err = unpopulate(val, "StaticIP", &k.StaticIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LegacyMicrosoftAccount. +func (l LegacyMicrosoftAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", l.Enabled) + populate(objectMap, "login", l.Login) + populate(objectMap, "registration", l.Registration) + populate(objectMap, "validation", l.Validation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LegacyMicrosoftAccount. +func (l *LegacyMicrosoftAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &l.Enabled) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &l.Login) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &l.Registration) + delete(rawMsg, key) + case "validation": + err = unpopulate(val, "Validation", &l.Validation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LinuxJavaContainerSettings. +func (l LinuxJavaContainerSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endOfLifeDate", l.EndOfLifeDate) + populate(objectMap, "isAutoUpdate", l.IsAutoUpdate) + populate(objectMap, "isDeprecated", l.IsDeprecated) + populate(objectMap, "isEarlyAccess", l.IsEarlyAccess) + populate(objectMap, "isHidden", l.IsHidden) + populate(objectMap, "isPreview", l.IsPreview) + populate(objectMap, "java11Runtime", l.Java11Runtime) + populate(objectMap, "java8Runtime", l.Java8Runtime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxJavaContainerSettings. +func (l *LinuxJavaContainerSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endOfLifeDate": + err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &l.EndOfLifeDate) + delete(rawMsg, key) + case "isAutoUpdate": + err = unpopulate(val, "IsAutoUpdate", &l.IsAutoUpdate) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &l.IsDeprecated) + delete(rawMsg, key) + case "isEarlyAccess": + err = unpopulate(val, "IsEarlyAccess", &l.IsEarlyAccess) + delete(rawMsg, key) + case "isHidden": + err = unpopulate(val, "IsHidden", &l.IsHidden) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &l.IsPreview) + delete(rawMsg, key) + case "java11Runtime": + err = unpopulate(val, "Java11Runtime", &l.Java11Runtime) + delete(rawMsg, key) + case "java8Runtime": + err = unpopulate(val, "Java8Runtime", &l.Java8Runtime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LocalizableString. +func (l LocalizableString) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", l.LocalizedValue) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LocalizableString. +func (l *LocalizableString) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &l.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogAnalyticsConfiguration. +func (l LogAnalyticsConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customerId", l.CustomerID) + populate(objectMap, "sharedKey", l.SharedKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsConfiguration. +func (l *LogAnalyticsConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customerId": + err = unpopulate(val, "CustomerID", &l.CustomerID) + delete(rawMsg, key) + case "sharedKey": + err = unpopulate(val, "SharedKey", &l.SharedKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", l.BlobDuration) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "logFilterPattern", l.LogFilterPattern) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &l.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "logFilterPattern": + err = unpopulate(val, "LogFilterPattern", &l.LogFilterPattern) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Login. +func (l Login) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedExternalRedirectUrls", l.AllowedExternalRedirectUrls) + populate(objectMap, "cookieExpiration", l.CookieExpiration) + populate(objectMap, "nonce", l.Nonce) + populate(objectMap, "preserveUrlFragmentsForLogins", l.PreserveURLFragmentsForLogins) + populate(objectMap, "routes", l.Routes) + populate(objectMap, "tokenStore", l.TokenStore) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Login. +func (l *Login) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedExternalRedirectUrls": + err = unpopulate(val, "AllowedExternalRedirectUrls", &l.AllowedExternalRedirectUrls) + delete(rawMsg, key) + case "cookieExpiration": + err = unpopulate(val, "CookieExpiration", &l.CookieExpiration) + delete(rawMsg, key) + case "nonce": + err = unpopulate(val, "Nonce", &l.Nonce) + delete(rawMsg, key) + case "preserveUrlFragmentsForLogins": + err = unpopulate(val, "PreserveURLFragmentsForLogins", &l.PreserveURLFragmentsForLogins) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &l.Routes) + delete(rawMsg, key) + case "tokenStore": + err = unpopulate(val, "TokenStore", &l.TokenStore) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoginRoutes. +func (l LoginRoutes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logoutEndpoint", l.LogoutEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoginRoutes. +func (l *LoginRoutes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logoutEndpoint": + err = unpopulate(val, "LogoutEndpoint", &l.LogoutEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoginScopes. +func (l LoginScopes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "scopes", l.Scopes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoginScopes. +func (l *LoginScopes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scopes": + err = unpopulate(val, "Scopes", &l.Scopes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeploy. +func (m MSDeploy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeploy. +func (m *MSDeploy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployCore. +func (m MSDeployCore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appOffline", m.AppOffline) + populate(objectMap, "connectionString", m.ConnectionString) + populate(objectMap, "dbType", m.DbType) + populate(objectMap, "packageUri", m.PackageURI) + populate(objectMap, "setParameters", m.SetParameters) + populate(objectMap, "setParametersXmlFileUri", m.SetParametersXMLFileURI) + populate(objectMap, "skipAppData", m.SkipAppData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployCore. +func (m *MSDeployCore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appOffline": + err = unpopulate(val, "AppOffline", &m.AppOffline) + delete(rawMsg, key) + case "connectionString": + err = unpopulate(val, "ConnectionString", &m.ConnectionString) + delete(rawMsg, key) + case "dbType": + err = unpopulate(val, "DbType", &m.DbType) + delete(rawMsg, key) + case "packageUri": + err = unpopulate(val, "PackageURI", &m.PackageURI) + delete(rawMsg, key) + case "setParameters": + err = unpopulate(val, "SetParameters", &m.SetParameters) + delete(rawMsg, key) + case "setParametersXmlFileUri": + err = unpopulate(val, "SetParametersXMLFileURI", &m.SetParametersXMLFileURI) + delete(rawMsg, key) + case "skipAppData": + err = unpopulate(val, "SkipAppData", &m.SkipAppData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployLog. +func (m MSDeployLog) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployLog. +func (m *MSDeployLog) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployLogEntry. +func (m MSDeployLogEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", m.Message) + populateDateTimeRFC3339(objectMap, "time", m.Time) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployLogEntry. +func (m *MSDeployLogEntry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &m.Message) + delete(rawMsg, key) + case "time": + err = unpopulateDateTimeRFC3339(val, "Time", &m.Time) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployLogProperties. +func (m MSDeployLogProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "entries", m.Entries) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployLogProperties. +func (m *MSDeployLogProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "entries": + err = unpopulate(val, "Entries", &m.Entries) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployStatus. +func (m MSDeployStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployStatus. +func (m *MSDeployStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSDeployStatusProperties. +func (m MSDeployStatusProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "complete", m.Complete) + populate(objectMap, "deployer", m.Deployer) + populateDateTimeRFC3339(objectMap, "endTime", m.EndTime) + populate(objectMap, "provisioningState", m.ProvisioningState) + populateDateTimeRFC3339(objectMap, "startTime", m.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployStatusProperties. +func (m *MSDeployStatusProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "complete": + err = unpopulate(val, "Complete", &m.Complete) + delete(rawMsg, key) + case "deployer": + err = unpopulate(val, "Deployer", &m.Deployer) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &m.EndTime) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &m.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricAvailability. +func (m MetricAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", m.BlobDuration) + populate(objectMap, "timeGrain", m.TimeGrain) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAvailability. +func (m *MetricAvailability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &m.BlobDuration) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &m.TimeGrain) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "availabilities", m.Availabilities) + populate(objectMap, "category", m.Category) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "enableRegionalMdmAccount", m.EnableRegionalMdmAccount) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "isInternal", m.IsInternal) + populate(objectMap, "metricFilterPattern", m.MetricFilterPattern) + populate(objectMap, "name", m.Name) + populate(objectMap, "sourceMdmAccount", m.SourceMdmAccount) + populate(objectMap, "sourceMdmNamespace", m.SourceMdmNamespace) + populate(objectMap, "supportedAggregationTypes", m.SupportedAggregationTypes) + populate(objectMap, "supportedTimeGrainTypes", m.SupportedTimeGrainTypes) + populate(objectMap, "supportsInstanceLevelAggregation", m.SupportsInstanceLevelAggregation) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "availabilities": + err = unpopulate(val, "Availabilities", &m.Availabilities) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &m.Category) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "enableRegionalMdmAccount": + err = unpopulate(val, "EnableRegionalMdmAccount", &m.EnableRegionalMdmAccount) + delete(rawMsg, key) + case "fillGapWithZero": + err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) + delete(rawMsg, key) + case "isInternal": + err = unpopulate(val, "IsInternal", &m.IsInternal) + delete(rawMsg, key) + case "metricFilterPattern": + err = unpopulate(val, "MetricFilterPattern", &m.MetricFilterPattern) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "sourceMdmAccount": + err = unpopulate(val, "SourceMdmAccount", &m.SourceMdmAccount) + delete(rawMsg, key) + case "sourceMdmNamespace": + err = unpopulate(val, "SourceMdmNamespace", &m.SourceMdmNamespace) + delete(rawMsg, key) + case "supportedAggregationTypes": + err = unpopulate(val, "SupportedAggregationTypes", &m.SupportedAggregationTypes) + delete(rawMsg, key) + case "supportedTimeGrainTypes": + err = unpopulate(val, "SupportedTimeGrainTypes", &m.SupportedTimeGrainTypes) + delete(rawMsg, key) + case "supportsInstanceLevelAggregation": + err = unpopulate(val, "SupportsInstanceLevelAggregation", &m.SupportsInstanceLevelAggregation) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateMySQLRequest. +func (m MigrateMySQLRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateMySQLRequest. +func (m *MigrateMySQLRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateMySQLRequestProperties. +func (m MigrateMySQLRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionString", m.ConnectionString) + populate(objectMap, "migrationType", m.MigrationType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateMySQLRequestProperties. +func (m *MigrateMySQLRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionString": + err = unpopulate(val, "ConnectionString", &m.ConnectionString) + delete(rawMsg, key) + case "migrationType": + err = unpopulate(val, "MigrationType", &m.MigrationType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateMySQLStatus. +func (m MigrateMySQLStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateMySQLStatus. +func (m *MigrateMySQLStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateMySQLStatusProperties. +func (m MigrateMySQLStatusProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localMySqlEnabled", m.LocalMySQLEnabled) + populate(objectMap, "migrationOperationStatus", m.MigrationOperationStatus) + populate(objectMap, "operationId", m.OperationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateMySQLStatusProperties. +func (m *MigrateMySQLStatusProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localMySqlEnabled": + err = unpopulate(val, "LocalMySQLEnabled", &m.LocalMySQLEnabled) + delete(rawMsg, key) + case "migrationOperationStatus": + err = unpopulate(val, "MigrationOperationStatus", &m.MigrationOperationStatus) + delete(rawMsg, key) + case "operationId": + err = unpopulate(val, "OperationID", &m.OperationID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NameIdentifier. +func (n NameIdentifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", n.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameIdentifier. +func (n *NameIdentifier) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NameIdentifierCollection. +func (n NameIdentifierCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameIdentifierCollection. +func (n *NameIdentifierCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &n.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NameValuePair. +func (n NameValuePair) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", n.Name) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameValuePair. +func (n *NameValuePair) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkFeatures. +func (n NetworkFeatures) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", n.ID) + populate(objectMap, "kind", n.Kind) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFeatures. +func (n *NetworkFeatures) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &n.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkFeaturesProperties. +func (n NetworkFeaturesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hybridConnections", n.HybridConnections) + populate(objectMap, "hybridConnectionsV2", n.HybridConnectionsV2) + populate(objectMap, "virtualNetworkConnection", n.VirtualNetworkConnection) + populate(objectMap, "virtualNetworkName", n.VirtualNetworkName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFeaturesProperties. +func (n *NetworkFeaturesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hybridConnections": + err = unpopulate(val, "HybridConnections", &n.HybridConnections) + delete(rawMsg, key) + case "hybridConnectionsV2": + err = unpopulate(val, "HybridConnectionsV2", &n.HybridConnectionsV2) + delete(rawMsg, key) + case "virtualNetworkConnection": + err = unpopulate(val, "VirtualNetworkConnection", &n.VirtualNetworkConnection) + delete(rawMsg, key) + case "virtualNetworkName": + err = unpopulate(val, "VirtualNetworkName", &n.VirtualNetworkName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkTrace. +func (n NetworkTrace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", n.Message) + populate(objectMap, "path", n.Path) + populate(objectMap, "status", n.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkTrace. +func (n *NetworkTrace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &n.Message) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &n.Path) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &n.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Nonce. +func (n Nonce) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nonceExpirationInterval", n.NonceExpirationInterval) + populate(objectMap, "validateNonce", n.ValidateNonce) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Nonce. +func (n *Nonce) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nonceExpirationInterval": + err = unpopulate(val, "NonceExpirationInterval", &n.NonceExpirationInterval) + delete(rawMsg, key) + case "validateNonce": + err = unpopulate(val, "ValidateNonce", &n.ValidateNonce) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenAuthenticationAccessPolicies. +func (o OpenAuthenticationAccessPolicies) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "policies", o.Policies) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenAuthenticationAccessPolicies. +func (o *OpenAuthenticationAccessPolicies) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "policies": + err = unpopulate(val, "Policies", &o.Policies) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenAuthenticationAccessPolicy. +func (o OpenAuthenticationAccessPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "claims", o.Claims) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenAuthenticationAccessPolicy. +func (o *OpenAuthenticationAccessPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "claims": + err = unpopulate(val, "Claims", &o.Claims) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenAuthenticationPolicyClaim. +func (o OpenAuthenticationPolicyClaim) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", o.Name) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenAuthenticationPolicyClaim. +func (o *OpenAuthenticationPolicyClaim) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectClientCredential. +func (o OpenIDConnectClientCredential) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientSecretSettingName", o.ClientSecretSettingName) + objectMap["method"] = "ClientSecretPost" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectClientCredential. +func (o *OpenIDConnectClientCredential) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &o.ClientSecretSettingName) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &o.Method) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectConfig. +func (o OpenIDConnectConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationEndpoint", o.AuthorizationEndpoint) + populate(objectMap, "certificationUri", o.CertificationURI) + populate(objectMap, "issuer", o.Issuer) + populate(objectMap, "tokenEndpoint", o.TokenEndpoint) + populate(objectMap, "wellKnownOpenIdConfiguration", o.WellKnownOpenIDConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectConfig. +func (o *OpenIDConnectConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationEndpoint": + err = unpopulate(val, "AuthorizationEndpoint", &o.AuthorizationEndpoint) + delete(rawMsg, key) + case "certificationUri": + err = unpopulate(val, "CertificationURI", &o.CertificationURI) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &o.Issuer) + delete(rawMsg, key) + case "tokenEndpoint": + err = unpopulate(val, "TokenEndpoint", &o.TokenEndpoint) + delete(rawMsg, key) + case "wellKnownOpenIdConfiguration": + err = unpopulate(val, "WellKnownOpenIDConfiguration", &o.WellKnownOpenIDConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectLogin. +func (o OpenIDConnectLogin) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nameClaimType", o.NameClaimType) + populate(objectMap, "scopes", o.Scopes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectLogin. +func (o *OpenIDConnectLogin) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nameClaimType": + err = unpopulate(val, "NameClaimType", &o.NameClaimType) + delete(rawMsg, key) + case "scopes": + err = unpopulate(val, "Scopes", &o.Scopes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectRegistration. +func (o OpenIDConnectRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientCredential", o.ClientCredential) + populate(objectMap, "clientId", o.ClientID) + populate(objectMap, "openIdConnectConfiguration", o.OpenIDConnectConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OpenIDConnectRegistration. +func (o *OpenIDConnectRegistration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientCredential": + err = unpopulate(val, "ClientCredential", &o.ClientCredential) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &o.ClientID) + delete(rawMsg, key) + case "openIdConnectConfiguration": + err = unpopulate(val, "OpenIDConnectConfiguration", &o.OpenIDConnectConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdTime", o.CreatedTime) + populate(objectMap, "errors", o.Errors) + populateDateTimeRFC3339(objectMap, "expirationTime", o.ExpirationTime) + populate(objectMap, "geoMasterOperationId", o.GeoMasterOperationID) + populate(objectMap, "id", o.ID) + populateDateTimeRFC3339(objectMap, "modifiedTime", o.ModifiedTime) + populate(objectMap, "name", o.Name) + populate(objectMap, "status", o.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdTime": + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &o.CreatedTime) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &o.Errors) + delete(rawMsg, key) + case "expirationTime": + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &o.ExpirationTime) + delete(rawMsg, key) + case "geoMasterOperationId": + err = unpopulate(val, "GeoMasterOperationID", &o.GeoMasterOperationID) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "modifiedTime": + err = unpopulateDateTimeRFC3339(val, "ModifiedTime", &o.ModifiedTime) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResult. +func (o OperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", o.Code) + populate(objectMap, "correlation", o.Correlation) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) + populateAny(objectMap, "error", o.Error) + populateAny(objectMap, "inputs", o.Inputs) + populate(objectMap, "inputsLink", o.InputsLink) + populate(objectMap, "iterationCount", o.IterationCount) + populateAny(objectMap, "outputs", o.Outputs) + populate(objectMap, "outputsLink", o.OutputsLink) + populate(objectMap, "retryHistory", o.RetryHistory) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) + populate(objectMap, "status", o.Status) + populateAny(objectMap, "trackedProperties", o.TrackedProperties) + populate(objectMap, "trackingId", o.TrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResult. +func (o *OperationResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &o.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &o.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &o.Error) + delete(rawMsg, key) + case "inputs": + err = unpopulate(val, "Inputs", &o.Inputs) + delete(rawMsg, key) + case "inputsLink": + err = unpopulate(val, "InputsLink", &o.InputsLink) + delete(rawMsg, key) + case "iterationCount": + err = unpopulate(val, "IterationCount", &o.IterationCount) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &o.Outputs) + delete(rawMsg, key) + case "outputsLink": + err = unpopulate(val, "OutputsLink", &o.OutputsLink) + delete(rawMsg, key) + case "retryHistory": + err = unpopulate(val, "RetryHistory", &o.RetryHistory) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + case "trackedProperties": + err = unpopulate(val, "TrackedProperties", &o.TrackedProperties) + delete(rawMsg, key) + case "trackingId": + err = unpopulate(val, "TrackingID", &o.TrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultProperties. +func (o OperationResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", o.Code) + populate(objectMap, "correlation", o.Correlation) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) + populateAny(objectMap, "error", o.Error) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) + populate(objectMap, "status", o.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultProperties. +func (o *OperationResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &o.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &o.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &o.Error) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpoint. +func (o OutboundEnvironmentEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "category", o.Category) + populate(objectMap, "endpoints", o.Endpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpoint. +func (o *OutboundEnvironmentEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "category": + err = unpopulate(val, "Category", &o.Category) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &o.Endpoints) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpointCollection. +func (o OutboundEnvironmentEndpointCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpointCollection. +func (o *OutboundEnvironmentEndpointCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PerfMonCounterCollection. +func (p PerfMonCounterCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonCounterCollection. +func (p *PerfMonCounterCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PerfMonResponse. +func (p PerfMonResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", p.Code) + populate(objectMap, "data", p.Data) + populate(objectMap, "message", p.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonResponse. +func (p *PerfMonResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &p.Code) + delete(rawMsg, key) + case "data": + err = unpopulate(val, "Data", &p.Data) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &p.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PerfMonSample. +func (p PerfMonSample) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceName", p.InstanceName) + populateDateTimeRFC3339(objectMap, "time", p.Time) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonSample. +func (p *PerfMonSample) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceName": + err = unpopulate(val, "InstanceName", &p.InstanceName) + delete(rawMsg, key) + case "time": + err = unpopulateDateTimeRFC3339(val, "Time", &p.Time) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PerfMonSet. +func (p PerfMonSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", p.EndTime) + populate(objectMap, "name", p.Name) + populateDateTimeRFC3339(objectMap, "startTime", p.StartTime) + populate(objectMap, "timeGrain", p.TimeGrain) + populate(objectMap, "values", p.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonSet. +func (p *PerfMonSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &p.EndTime) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &p.StartTime) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &p.TimeGrain) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &p.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Plan. +func (p Plan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Plan. +func (p *Plan) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlanCollection. +func (p PlanCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlanCollection. +func (p *PlanCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlanPatchResource. +func (p PlanPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlanPatchResource. +func (p *PlanPatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlanPatchResourceProperties. +func (p PlanPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "elasticScaleEnabled", p.ElasticScaleEnabled) + populateDateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) + populate(objectMap, "geoRegion", p.GeoRegion) + populate(objectMap, "hostingEnvironmentProfile", p.HostingEnvironmentProfile) + populate(objectMap, "hyperV", p.HyperV) + populate(objectMap, "isSpot", p.IsSpot) + populate(objectMap, "isXenon", p.IsXenon) + populate(objectMap, "kubeEnvironmentProfile", p.KubeEnvironmentProfile) + populate(objectMap, "maximumElasticWorkerCount", p.MaximumElasticWorkerCount) + populate(objectMap, "maximumNumberOfWorkers", p.MaximumNumberOfWorkers) + populate(objectMap, "numberOfSites", p.NumberOfSites) + populate(objectMap, "numberOfWorkers", p.NumberOfWorkers) + populate(objectMap, "perSiteScaling", p.PerSiteScaling) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "reserved", p.Reserved) + populate(objectMap, "resourceGroup", p.ResourceGroup) + populateDateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) + populate(objectMap, "status", p.Status) + populate(objectMap, "subscription", p.Subscription) + populate(objectMap, "targetWorkerCount", p.TargetWorkerCount) + populate(objectMap, "targetWorkerSizeId", p.TargetWorkerSizeID) + populate(objectMap, "workerTierName", p.WorkerTierName) + populate(objectMap, "zoneRedundant", p.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlanPatchResourceProperties. +func (p *PlanPatchResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "elasticScaleEnabled": + err = unpopulate(val, "ElasticScaleEnabled", &p.ElasticScaleEnabled) + delete(rawMsg, key) + case "freeOfferExpirationTime": + err = unpopulateDateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) + delete(rawMsg, key) + case "geoRegion": + err = unpopulate(val, "GeoRegion", &p.GeoRegion) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &p.HostingEnvironmentProfile) + delete(rawMsg, key) + case "hyperV": + err = unpopulate(val, "HyperV", &p.HyperV) + delete(rawMsg, key) + case "isSpot": + err = unpopulate(val, "IsSpot", &p.IsSpot) + delete(rawMsg, key) + case "isXenon": + err = unpopulate(val, "IsXenon", &p.IsXenon) + delete(rawMsg, key) + case "kubeEnvironmentProfile": + err = unpopulate(val, "KubeEnvironmentProfile", &p.KubeEnvironmentProfile) + delete(rawMsg, key) + case "maximumElasticWorkerCount": + err = unpopulate(val, "MaximumElasticWorkerCount", &p.MaximumElasticWorkerCount) + delete(rawMsg, key) + case "maximumNumberOfWorkers": + err = unpopulate(val, "MaximumNumberOfWorkers", &p.MaximumNumberOfWorkers) + delete(rawMsg, key) + case "numberOfSites": + err = unpopulate(val, "NumberOfSites", &p.NumberOfSites) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &p.NumberOfWorkers) + delete(rawMsg, key) + case "perSiteScaling": + err = unpopulate(val, "PerSiteScaling", &p.PerSiteScaling) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "reserved": + err = unpopulate(val, "Reserved", &p.Reserved) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &p.ResourceGroup) + delete(rawMsg, key) + case "spotExpirationTime": + err = unpopulateDateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + case "subscription": + err = unpopulate(val, "Subscription", &p.Subscription) + delete(rawMsg, key) + case "targetWorkerCount": + err = unpopulate(val, "TargetWorkerCount", &p.TargetWorkerCount) + delete(rawMsg, key) + case "targetWorkerSizeId": + err = unpopulate(val, "TargetWorkerSizeID", &p.TargetWorkerSizeID) + delete(rawMsg, key) + case "workerTierName": + err = unpopulate(val, "WorkerTierName", &p.WorkerTierName) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &p.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlanProperties. +func (p PlanProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "elasticScaleEnabled", p.ElasticScaleEnabled) + populateDateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) + populate(objectMap, "geoRegion", p.GeoRegion) + populate(objectMap, "hostingEnvironmentProfile", p.HostingEnvironmentProfile) + populate(objectMap, "hyperV", p.HyperV) + populate(objectMap, "isSpot", p.IsSpot) + populate(objectMap, "isXenon", p.IsXenon) + populate(objectMap, "kubeEnvironmentProfile", p.KubeEnvironmentProfile) + populate(objectMap, "maximumElasticWorkerCount", p.MaximumElasticWorkerCount) + populate(objectMap, "maximumNumberOfWorkers", p.MaximumNumberOfWorkers) + populate(objectMap, "numberOfSites", p.NumberOfSites) + populate(objectMap, "numberOfWorkers", p.NumberOfWorkers) + populate(objectMap, "perSiteScaling", p.PerSiteScaling) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "reserved", p.Reserved) + populate(objectMap, "resourceGroup", p.ResourceGroup) + populateDateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) + populate(objectMap, "status", p.Status) + populate(objectMap, "subscription", p.Subscription) + populate(objectMap, "targetWorkerCount", p.TargetWorkerCount) + populate(objectMap, "targetWorkerSizeId", p.TargetWorkerSizeID) + populate(objectMap, "workerTierName", p.WorkerTierName) + populate(objectMap, "zoneRedundant", p.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlanProperties. +func (p *PlanProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "elasticScaleEnabled": + err = unpopulate(val, "ElasticScaleEnabled", &p.ElasticScaleEnabled) + delete(rawMsg, key) + case "freeOfferExpirationTime": + err = unpopulateDateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) + delete(rawMsg, key) + case "geoRegion": + err = unpopulate(val, "GeoRegion", &p.GeoRegion) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &p.HostingEnvironmentProfile) + delete(rawMsg, key) + case "hyperV": + err = unpopulate(val, "HyperV", &p.HyperV) + delete(rawMsg, key) + case "isSpot": + err = unpopulate(val, "IsSpot", &p.IsSpot) + delete(rawMsg, key) + case "isXenon": + err = unpopulate(val, "IsXenon", &p.IsXenon) + delete(rawMsg, key) + case "kubeEnvironmentProfile": + err = unpopulate(val, "KubeEnvironmentProfile", &p.KubeEnvironmentProfile) + delete(rawMsg, key) + case "maximumElasticWorkerCount": + err = unpopulate(val, "MaximumElasticWorkerCount", &p.MaximumElasticWorkerCount) + delete(rawMsg, key) + case "maximumNumberOfWorkers": + err = unpopulate(val, "MaximumNumberOfWorkers", &p.MaximumNumberOfWorkers) + delete(rawMsg, key) + case "numberOfSites": + err = unpopulate(val, "NumberOfSites", &p.NumberOfSites) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &p.NumberOfWorkers) + delete(rawMsg, key) + case "perSiteScaling": + err = unpopulate(val, "PerSiteScaling", &p.PerSiteScaling) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "reserved": + err = unpopulate(val, "Reserved", &p.Reserved) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &p.ResourceGroup) + delete(rawMsg, key) + case "spotExpirationTime": + err = unpopulateDateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + case "subscription": + err = unpopulate(val, "Subscription", &p.Subscription) + delete(rawMsg, key) + case "targetWorkerCount": + err = unpopulate(val, "TargetWorkerCount", &p.TargetWorkerCount) + delete(rawMsg, key) + case "targetWorkerSizeId": + err = unpopulate(val, "TargetWorkerSizeID", &p.TargetWorkerSizeID) + delete(rawMsg, key) + case "workerTierName": + err = unpopulate(val, "WorkerTierName", &p.WorkerTierName) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &p.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOn. +func (p PremierAddOn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOn. +func (p *PremierAddOn) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnOffer. +func (p PremierAddOnOffer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnOffer. +func (p *PremierAddOnOffer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnOfferCollection. +func (p PremierAddOnOfferCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnOfferCollection. +func (p *PremierAddOnOfferCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnOfferProperties. +func (p PremierAddOnOfferProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "legalTermsUrl", p.LegalTermsURL) + populate(objectMap, "marketplaceOffer", p.MarketplaceOffer) + populate(objectMap, "marketplacePublisher", p.MarketplacePublisher) + populate(objectMap, "privacyPolicyUrl", p.PrivacyPolicyURL) + populate(objectMap, "product", p.Product) + populate(objectMap, "promoCodeRequired", p.PromoCodeRequired) + populate(objectMap, "quota", p.Quota) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "vendor", p.Vendor) + populate(objectMap, "webHostingPlanRestrictions", p.WebHostingPlanRestrictions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnOfferProperties. +func (p *PremierAddOnOfferProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "legalTermsUrl": + err = unpopulate(val, "LegalTermsURL", &p.LegalTermsURL) + delete(rawMsg, key) + case "marketplaceOffer": + err = unpopulate(val, "MarketplaceOffer", &p.MarketplaceOffer) + delete(rawMsg, key) + case "marketplacePublisher": + err = unpopulate(val, "MarketplacePublisher", &p.MarketplacePublisher) + delete(rawMsg, key) + case "privacyPolicyUrl": + err = unpopulate(val, "PrivacyPolicyURL", &p.PrivacyPolicyURL) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &p.Product) + delete(rawMsg, key) + case "promoCodeRequired": + err = unpopulate(val, "PromoCodeRequired", &p.PromoCodeRequired) + delete(rawMsg, key) + case "quota": + err = unpopulate(val, "Quota", &p.Quota) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "vendor": + err = unpopulate(val, "Vendor", &p.Vendor) + delete(rawMsg, key) + case "webHostingPlanRestrictions": + err = unpopulate(val, "WebHostingPlanRestrictions", &p.WebHostingPlanRestrictions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnPatchResource. +func (p PremierAddOnPatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnPatchResource. +func (p *PremierAddOnPatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnPatchResourceProperties. +func (p PremierAddOnPatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "marketplaceOffer", p.MarketplaceOffer) + populate(objectMap, "marketplacePublisher", p.MarketplacePublisher) + populate(objectMap, "product", p.Product) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "vendor", p.Vendor) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnPatchResourceProperties. +func (p *PremierAddOnPatchResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "marketplaceOffer": + err = unpopulate(val, "MarketplaceOffer", &p.MarketplaceOffer) + delete(rawMsg, key) + case "marketplacePublisher": + err = unpopulate(val, "MarketplacePublisher", &p.MarketplacePublisher) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &p.Product) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "vendor": + err = unpopulate(val, "Vendor", &p.Vendor) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PremierAddOnProperties. +func (p PremierAddOnProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "marketplaceOffer", p.MarketplaceOffer) + populate(objectMap, "marketplacePublisher", p.MarketplacePublisher) + populate(objectMap, "product", p.Product) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "vendor", p.Vendor) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PremierAddOnProperties. +func (p *PremierAddOnProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "marketplaceOffer": + err = unpopulate(val, "MarketplaceOffer", &p.MarketplaceOffer) + delete(rawMsg, key) + case "marketplacePublisher": + err = unpopulate(val, "MarketplacePublisher", &p.MarketplacePublisher) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &p.Product) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "vendor": + err = unpopulate(val, "Vendor", &p.Vendor) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateAccess. +func (p PrivateAccess) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateAccess. +func (p *PrivateAccess) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateAccessProperties. +func (p PrivateAccessProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", p.Enabled) + populate(objectMap, "virtualNetworks", p.VirtualNetworks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateAccessProperties. +func (p *PrivateAccessProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &p.Enabled) + delete(rawMsg, key) + case "virtualNetworks": + err = unpopulate(val, "VirtualNetworks", &p.VirtualNetworks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateAccessSubnet. +func (p PrivateAccessSubnet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "key", p.Key) + populate(objectMap, "name", p.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateAccessSubnet. +func (p *PrivateAccessSubnet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &p.Key) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateAccessVirtualNetwork. +func (p PrivateAccessVirtualNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "key", p.Key) + populate(objectMap, "name", p.Name) + populate(objectMap, "resourceId", p.ResourceID) + populate(objectMap, "subnets", p.Subnets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateAccessVirtualNetwork. +func (p *PrivateAccessVirtualNetwork) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &p.Key) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &p.ResourceID) + delete(rawMsg, key) + case "subnets": + err = unpopulate(val, "Subnets", &p.Subnets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionCollection. +func (p PrivateEndpointConnectionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionCollection. +func (p *PrivateEndpointConnectionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkConnectionApprovalRequest. +func (p PrivateLinkConnectionApprovalRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkConnectionApprovalRequest. +func (p *PrivateLinkConnectionApprovalRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkConnectionApprovalRequestResource. +func (p PrivateLinkConnectionApprovalRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkConnectionApprovalRequestResource. +func (p *PrivateLinkConnectionApprovalRequestResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkConnectionState. +func (p PrivateLinkConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkConnectionState. +func (p *PrivateLinkConnectionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourcesWrapper. +func (p PrivateLinkResourcesWrapper) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourcesWrapper. +func (p *PrivateLinkResourcesWrapper) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessInfo. +func (p ProcessInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessInfo. +func (p *ProcessInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessInfoCollection. +func (p ProcessInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessInfoCollection. +func (p *ProcessInfoCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessInfoProperties. +func (p ProcessInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "children", p.Children) + populate(objectMap, "command_line", p.CommandLine) + populate(objectMap, "deployment_name", p.DeploymentName) + populate(objectMap, "description", p.Description) + populate(objectMap, "environment_variables", p.EnvironmentVariables) + populate(objectMap, "file_name", p.FileName) + populate(objectMap, "handle_count", p.HandleCount) + populate(objectMap, "href", p.Href) + populate(objectMap, "identifier", p.Identifier) + populate(objectMap, "iis_profile_timeout_in_seconds", p.IisProfileTimeoutInSeconds) + populate(objectMap, "is_iis_profile_running", p.IsIisProfileRunning) + populate(objectMap, "is_profile_running", p.IsProfileRunning) + populate(objectMap, "is_scm_site", p.IsScmSite) + populate(objectMap, "is_webjob", p.IsWebjob) + populate(objectMap, "minidump", p.Minidump) + populate(objectMap, "module_count", p.ModuleCount) + populate(objectMap, "modules", p.Modules) + populate(objectMap, "non_paged_system_memory", p.NonPagedSystemMemory) + populate(objectMap, "open_file_handles", p.OpenFileHandles) + populate(objectMap, "paged_memory", p.PagedMemory) + populate(objectMap, "paged_system_memory", p.PagedSystemMemory) + populate(objectMap, "parent", p.Parent) + populate(objectMap, "peak_paged_memory", p.PeakPagedMemory) + populate(objectMap, "peak_virtual_memory", p.PeakVirtualMemory) + populate(objectMap, "peak_working_set", p.PeakWorkingSet) + populate(objectMap, "private_memory", p.PrivateMemory) + populate(objectMap, "privileged_cpu_time", p.PrivilegedCPUTime) + populateDateTimeRFC3339(objectMap, "start_time", p.StartTime) + populate(objectMap, "thread_count", p.ThreadCount) + populate(objectMap, "threads", p.Threads) + populateDateTimeRFC3339(objectMap, "time_stamp", p.TimeStamp) + populate(objectMap, "total_cpu_time", p.TotalCPUTime) + populate(objectMap, "user_cpu_time", p.UserCPUTime) + populate(objectMap, "user_name", p.UserName) + populate(objectMap, "virtual_memory", p.VirtualMemory) + populate(objectMap, "working_set", p.WorkingSet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessInfoProperties. +func (p *ProcessInfoProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "children": + err = unpopulate(val, "Children", &p.Children) + delete(rawMsg, key) + case "command_line": + err = unpopulate(val, "CommandLine", &p.CommandLine) + delete(rawMsg, key) + case "deployment_name": + err = unpopulate(val, "DeploymentName", &p.DeploymentName) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "environment_variables": + err = unpopulate(val, "EnvironmentVariables", &p.EnvironmentVariables) + delete(rawMsg, key) + case "file_name": + err = unpopulate(val, "FileName", &p.FileName) + delete(rawMsg, key) + case "handle_count": + err = unpopulate(val, "HandleCount", &p.HandleCount) + delete(rawMsg, key) + case "href": + err = unpopulate(val, "Href", &p.Href) + delete(rawMsg, key) + case "identifier": + err = unpopulate(val, "Identifier", &p.Identifier) + delete(rawMsg, key) + case "iis_profile_timeout_in_seconds": + err = unpopulate(val, "IisProfileTimeoutInSeconds", &p.IisProfileTimeoutInSeconds) + delete(rawMsg, key) + case "is_iis_profile_running": + err = unpopulate(val, "IsIisProfileRunning", &p.IsIisProfileRunning) + delete(rawMsg, key) + case "is_profile_running": + err = unpopulate(val, "IsProfileRunning", &p.IsProfileRunning) + delete(rawMsg, key) + case "is_scm_site": + err = unpopulate(val, "IsScmSite", &p.IsScmSite) + delete(rawMsg, key) + case "is_webjob": + err = unpopulate(val, "IsWebjob", &p.IsWebjob) + delete(rawMsg, key) + case "minidump": + err = unpopulate(val, "Minidump", &p.Minidump) + delete(rawMsg, key) + case "module_count": + err = unpopulate(val, "ModuleCount", &p.ModuleCount) + delete(rawMsg, key) + case "modules": + err = unpopulate(val, "Modules", &p.Modules) + delete(rawMsg, key) + case "non_paged_system_memory": + err = unpopulate(val, "NonPagedSystemMemory", &p.NonPagedSystemMemory) + delete(rawMsg, key) + case "open_file_handles": + err = unpopulate(val, "OpenFileHandles", &p.OpenFileHandles) + delete(rawMsg, key) + case "paged_memory": + err = unpopulate(val, "PagedMemory", &p.PagedMemory) + delete(rawMsg, key) + case "paged_system_memory": + err = unpopulate(val, "PagedSystemMemory", &p.PagedSystemMemory) + delete(rawMsg, key) + case "parent": + err = unpopulate(val, "Parent", &p.Parent) + delete(rawMsg, key) + case "peak_paged_memory": + err = unpopulate(val, "PeakPagedMemory", &p.PeakPagedMemory) + delete(rawMsg, key) + case "peak_virtual_memory": + err = unpopulate(val, "PeakVirtualMemory", &p.PeakVirtualMemory) + delete(rawMsg, key) + case "peak_working_set": + err = unpopulate(val, "PeakWorkingSet", &p.PeakWorkingSet) + delete(rawMsg, key) + case "private_memory": + err = unpopulate(val, "PrivateMemory", &p.PrivateMemory) + delete(rawMsg, key) + case "privileged_cpu_time": + err = unpopulate(val, "PrivilegedCPUTime", &p.PrivilegedCPUTime) + delete(rawMsg, key) + case "start_time": + err = unpopulateDateTimeRFC3339(val, "StartTime", &p.StartTime) + delete(rawMsg, key) + case "thread_count": + err = unpopulate(val, "ThreadCount", &p.ThreadCount) + delete(rawMsg, key) + case "threads": + err = unpopulate(val, "Threads", &p.Threads) + delete(rawMsg, key) + case "time_stamp": + err = unpopulateDateTimeRFC3339(val, "TimeStamp", &p.TimeStamp) + delete(rawMsg, key) + case "total_cpu_time": + err = unpopulate(val, "TotalCPUTime", &p.TotalCPUTime) + delete(rawMsg, key) + case "user_cpu_time": + err = unpopulate(val, "UserCPUTime", &p.UserCPUTime) + delete(rawMsg, key) + case "user_name": + err = unpopulate(val, "UserName", &p.UserName) + delete(rawMsg, key) + case "virtual_memory": + err = unpopulate(val, "VirtualMemory", &p.VirtualMemory) + delete(rawMsg, key) + case "working_set": + err = unpopulate(val, "WorkingSet", &p.WorkingSet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessModuleInfo. +func (p ProcessModuleInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessModuleInfo. +func (p *ProcessModuleInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessModuleInfoCollection. +func (p ProcessModuleInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessModuleInfoCollection. +func (p *ProcessModuleInfoCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessModuleInfoProperties. +func (p ProcessModuleInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "base_address", p.BaseAddress) + populate(objectMap, "file_description", p.FileDescription) + populate(objectMap, "file_name", p.FileName) + populate(objectMap, "file_path", p.FilePath) + populate(objectMap, "file_version", p.FileVersion) + populate(objectMap, "href", p.Href) + populate(objectMap, "is_debug", p.IsDebug) + populate(objectMap, "language", p.Language) + populate(objectMap, "module_memory_size", p.ModuleMemorySize) + populate(objectMap, "product", p.Product) + populate(objectMap, "product_version", p.ProductVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessModuleInfoProperties. +func (p *ProcessModuleInfoProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "base_address": + err = unpopulate(val, "BaseAddress", &p.BaseAddress) + delete(rawMsg, key) + case "file_description": + err = unpopulate(val, "FileDescription", &p.FileDescription) + delete(rawMsg, key) + case "file_name": + err = unpopulate(val, "FileName", &p.FileName) + delete(rawMsg, key) + case "file_path": + err = unpopulate(val, "FilePath", &p.FilePath) + delete(rawMsg, key) + case "file_version": + err = unpopulate(val, "FileVersion", &p.FileVersion) + delete(rawMsg, key) + case "href": + err = unpopulate(val, "Href", &p.Href) + delete(rawMsg, key) + case "is_debug": + err = unpopulate(val, "IsDebug", &p.IsDebug) + delete(rawMsg, key) + case "language": + err = unpopulate(val, "Language", &p.Language) + delete(rawMsg, key) + case "module_memory_size": + err = unpopulate(val, "ModuleMemorySize", &p.ModuleMemorySize) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &p.Product) + delete(rawMsg, key) + case "product_version": + err = unpopulate(val, "ProductVersion", &p.ProductVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessThreadInfo. +func (p ProcessThreadInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessThreadInfo. +func (p *ProcessThreadInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessThreadInfoCollection. +func (p ProcessThreadInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessThreadInfoCollection. +func (p *ProcessThreadInfoCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessThreadInfoProperties. +func (p ProcessThreadInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "base_priority", p.BasePriority) + populate(objectMap, "current_priority", p.CurrentPriority) + populate(objectMap, "href", p.Href) + populate(objectMap, "identifier", p.Identifier) + populate(objectMap, "priority_level", p.PriorityLevel) + populate(objectMap, "process", p.Process) + populate(objectMap, "start_address", p.StartAddress) + populateDateTimeRFC3339(objectMap, "start_time", p.StartTime) + populate(objectMap, "state", p.State) + populate(objectMap, "total_processor_time", p.TotalProcessorTime) + populate(objectMap, "user_processor_time", p.UserProcessorTime) + populate(objectMap, "wait_reason", p.WaitReason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessThreadInfoProperties. +func (p *ProcessThreadInfoProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "base_priority": + err = unpopulate(val, "BasePriority", &p.BasePriority) + delete(rawMsg, key) + case "current_priority": + err = unpopulate(val, "CurrentPriority", &p.CurrentPriority) + delete(rawMsg, key) + case "href": + err = unpopulate(val, "Href", &p.Href) + delete(rawMsg, key) + case "identifier": + err = unpopulate(val, "Identifier", &p.Identifier) + delete(rawMsg, key) + case "priority_level": + err = unpopulate(val, "PriorityLevel", &p.PriorityLevel) + delete(rawMsg, key) + case "process": + err = unpopulate(val, "Process", &p.Process) + delete(rawMsg, key) + case "start_address": + err = unpopulate(val, "StartAddress", &p.StartAddress) + delete(rawMsg, key) + case "start_time": + err = unpopulateDateTimeRFC3339(val, "StartTime", &p.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + case "total_processor_time": + err = unpopulate(val, "TotalProcessorTime", &p.TotalProcessorTime) + delete(rawMsg, key) + case "user_processor_time": + err = unpopulate(val, "UserProcessorTime", &p.UserProcessorTime) + delete(rawMsg, key) + case "wait_reason": + err = unpopulate(val, "WaitReason", &p.WaitReason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProxyOnlyResource. +func (p ProxyOnlyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyOnlyResource. +func (p *ProxyOnlyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicCertificate. +func (p PublicCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicCertificate. +func (p *PublicCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicCertificateCollection. +func (p PublicCertificateCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicCertificateCollection. +func (p *PublicCertificateCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicCertificateProperties. +func (p PublicCertificateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateByteArray(objectMap, "blob", p.Blob, func() any { + return runtime.EncodeByteArray(p.Blob, runtime.Base64StdFormat) + }) + populate(objectMap, "publicCertificateLocation", p.PublicCertificateLocation) + populate(objectMap, "thumbprint", p.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicCertificateProperties. +func (p *PublicCertificateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blob": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &p.Blob, runtime.Base64StdFormat) + } + delete(rawMsg, key) + case "publicCertificateLocation": + err = unpopulate(val, "PublicCertificateLocation", &p.PublicCertificateLocation) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &p.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublishingCredentialsPoliciesCollection. +func (p PublishingCredentialsPoliciesCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublishingCredentialsPoliciesCollection. +func (p *PublishingCredentialsPoliciesCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PushSettings. +func (p PushSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PushSettings. +func (p *PushSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PushSettingsProperties. +func (p PushSettingsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dynamicTagsJson", p.DynamicTagsJSON) + populate(objectMap, "isPushEnabled", p.IsPushEnabled) + populate(objectMap, "tagWhitelistJson", p.TagWhitelistJSON) + populate(objectMap, "tagsRequiringAuth", p.TagsRequiringAuth) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PushSettingsProperties. +func (p *PushSettingsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dynamicTagsJson": + err = unpopulate(val, "DynamicTagsJSON", &p.DynamicTagsJSON) + delete(rawMsg, key) + case "isPushEnabled": + err = unpopulate(val, "IsPushEnabled", &p.IsPushEnabled) + delete(rawMsg, key) + case "tagWhitelistJson": + err = unpopulate(val, "TagWhitelistJSON", &p.TagWhitelistJSON) + delete(rawMsg, key) + case "tagsRequiringAuth": + err = unpopulate(val, "TagsRequiringAuth", &p.TagsRequiringAuth) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryUtterancesResult. +func (q QueryUtterancesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sampleUtterance", q.SampleUtterance) + populate(objectMap, "score", q.Score) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryUtterancesResult. +func (q *QueryUtterancesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sampleUtterance": + err = unpopulate(val, "SampleUtterance", &q.SampleUtterance) + delete(rawMsg, key) + case "score": + err = unpopulate(val, "Score", &q.Score) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryUtterancesResults. +func (q QueryUtterancesResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "query", q.Query) + populate(objectMap, "results", q.Results) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryUtterancesResults. +func (q *QueryUtterancesResults) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "query": + err = unpopulate(val, "Query", &q.Query) + delete(rawMsg, key) + case "results": + err = unpopulate(val, "Results", &q.Results) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueueScaleRule. +func (q QueueScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auth", q.Auth) + populate(objectMap, "queueLength", q.QueueLength) + populate(objectMap, "queueName", q.QueueName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueueScaleRule. +func (q *QueueScaleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auth": + err = unpopulate(val, "Auth", &q.Auth) + delete(rawMsg, key) + case "queueLength": + err = unpopulate(val, "QueueLength", &q.QueueLength) + delete(rawMsg, key) + case "queueName": + err = unpopulate(val, "QueueName", &q.QueueName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RampUpRule. +func (r RampUpRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionHostName", r.ActionHostName) + populate(objectMap, "changeDecisionCallbackUrl", r.ChangeDecisionCallbackURL) + populate(objectMap, "changeIntervalInMinutes", r.ChangeIntervalInMinutes) + populate(objectMap, "changeStep", r.ChangeStep) + populate(objectMap, "maxReroutePercentage", r.MaxReroutePercentage) + populate(objectMap, "minReroutePercentage", r.MinReroutePercentage) + populate(objectMap, "name", r.Name) + populate(objectMap, "reroutePercentage", r.ReroutePercentage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RampUpRule. +func (r *RampUpRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionHostName": + err = unpopulate(val, "ActionHostName", &r.ActionHostName) + delete(rawMsg, key) + case "changeDecisionCallbackUrl": + err = unpopulate(val, "ChangeDecisionCallbackURL", &r.ChangeDecisionCallbackURL) + delete(rawMsg, key) + case "changeIntervalInMinutes": + err = unpopulate(val, "ChangeIntervalInMinutes", &r.ChangeIntervalInMinutes) + delete(rawMsg, key) + case "changeStep": + err = unpopulate(val, "ChangeStep", &r.ChangeStep) + delete(rawMsg, key) + case "maxReroutePercentage": + err = unpopulate(val, "MaxReroutePercentage", &r.MaxReroutePercentage) + delete(rawMsg, key) + case "minReroutePercentage": + err = unpopulate(val, "MinReroutePercentage", &r.MinReroutePercentage) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "reroutePercentage": + err = unpopulate(val, "ReroutePercentage", &r.ReroutePercentage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Recommendation. +func (r Recommendation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Recommendation. +func (r *Recommendation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendationCollection. +func (r RecommendationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationCollection. +func (r *RecommendationCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendationProperties. +func (r RecommendationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionName", r.ActionName) + populate(objectMap, "bladeName", r.BladeName) + populate(objectMap, "categoryTags", r.CategoryTags) + populate(objectMap, "channels", r.Channels) + populateDateTimeRFC3339(objectMap, "creationTime", r.CreationTime) + populate(objectMap, "displayName", r.DisplayName) + populate(objectMap, "enabled", r.Enabled) + populateDateTimeRFC3339(objectMap, "endTime", r.EndTime) + populate(objectMap, "extensionName", r.ExtensionName) + populate(objectMap, "forwardLink", r.ForwardLink) + populate(objectMap, "isDynamic", r.IsDynamic) + populate(objectMap, "level", r.Level) + populate(objectMap, "message", r.Message) + populateDateTimeRFC3339(objectMap, "nextNotificationTime", r.NextNotificationTime) + populateDateTimeRFC3339(objectMap, "notificationExpirationTime", r.NotificationExpirationTime) + populateDateTimeRFC3339(objectMap, "notifiedTime", r.NotifiedTime) + populate(objectMap, "recommendationId", r.RecommendationID) + populate(objectMap, "resourceId", r.ResourceID) + populate(objectMap, "resourceScope", r.ResourceScope) + populate(objectMap, "ruleName", r.RuleName) + populate(objectMap, "score", r.Score) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) + populate(objectMap, "states", r.States) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationProperties. +func (r *RecommendationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionName": + err = unpopulate(val, "ActionName", &r.ActionName) + delete(rawMsg, key) + case "bladeName": + err = unpopulate(val, "BladeName", &r.BladeName) + delete(rawMsg, key) + case "categoryTags": + err = unpopulate(val, "CategoryTags", &r.CategoryTags) + delete(rawMsg, key) + case "channels": + err = unpopulate(val, "Channels", &r.Channels) + delete(rawMsg, key) + case "creationTime": + err = unpopulateDateTimeRFC3339(val, "CreationTime", &r.CreationTime) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &r.DisplayName) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &r.Enabled) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &r.EndTime) + delete(rawMsg, key) + case "extensionName": + err = unpopulate(val, "ExtensionName", &r.ExtensionName) + delete(rawMsg, key) + case "forwardLink": + err = unpopulate(val, "ForwardLink", &r.ForwardLink) + delete(rawMsg, key) + case "isDynamic": + err = unpopulate(val, "IsDynamic", &r.IsDynamic) + delete(rawMsg, key) + case "level": + err = unpopulate(val, "Level", &r.Level) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &r.Message) + delete(rawMsg, key) + case "nextNotificationTime": + err = unpopulateDateTimeRFC3339(val, "NextNotificationTime", &r.NextNotificationTime) + delete(rawMsg, key) + case "notificationExpirationTime": + err = unpopulateDateTimeRFC3339(val, "NotificationExpirationTime", &r.NotificationExpirationTime) + delete(rawMsg, key) + case "notifiedTime": + err = unpopulateDateTimeRFC3339(val, "NotifiedTime", &r.NotifiedTime) + delete(rawMsg, key) + case "recommendationId": + err = unpopulate(val, "RecommendationID", &r.RecommendationID) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &r.ResourceID) + delete(rawMsg, key) + case "resourceScope": + err = unpopulate(val, "ResourceScope", &r.ResourceScope) + delete(rawMsg, key) + case "ruleName": + err = unpopulate(val, "RuleName", &r.RuleName) + delete(rawMsg, key) + case "score": + err = unpopulate(val, "Score", &r.Score) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + case "states": + err = unpopulate(val, "States", &r.States) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendationRule. +func (r RecommendationRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationRule. +func (r *RecommendationRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecommendationRuleProperties. +func (r RecommendationRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionName", r.ActionName) + populate(objectMap, "bladeName", r.BladeName) + populate(objectMap, "categoryTags", r.CategoryTags) + populate(objectMap, "channels", r.Channels) + populate(objectMap, "description", r.Description) + populate(objectMap, "displayName", r.DisplayName) + populate(objectMap, "extensionName", r.ExtensionName) + populate(objectMap, "forwardLink", r.ForwardLink) + populate(objectMap, "isDynamic", r.IsDynamic) + populate(objectMap, "level", r.Level) + populate(objectMap, "message", r.Message) + populate(objectMap, "recommendationId", r.RecommendationID) + populate(objectMap, "recommendationName", r.RecommendationName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationRuleProperties. +func (r *RecommendationRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionName": + err = unpopulate(val, "ActionName", &r.ActionName) + delete(rawMsg, key) + case "bladeName": + err = unpopulate(val, "BladeName", &r.BladeName) + delete(rawMsg, key) + case "categoryTags": + err = unpopulate(val, "CategoryTags", &r.CategoryTags) + delete(rawMsg, key) + case "channels": + err = unpopulate(val, "Channels", &r.Channels) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &r.DisplayName) + delete(rawMsg, key) + case "extensionName": + err = unpopulate(val, "ExtensionName", &r.ExtensionName) + delete(rawMsg, key) + case "forwardLink": + err = unpopulate(val, "ForwardLink", &r.ForwardLink) + delete(rawMsg, key) + case "isDynamic": + err = unpopulate(val, "IsDynamic", &r.IsDynamic) + delete(rawMsg, key) + case "level": + err = unpopulate(val, "Level", &r.Level) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &r.Message) + delete(rawMsg, key) + case "recommendationId": + err = unpopulate(val, "RecommendationID", &r.RecommendationID) + delete(rawMsg, key) + case "recommendationName": + err = unpopulate(val, "RecommendationName", &r.RecommendationName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecurrenceSchedule. +func (r RecurrenceSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hours", r.Hours) + populate(objectMap, "minutes", r.Minutes) + populate(objectMap, "monthDays", r.MonthDays) + populate(objectMap, "monthlyOccurrences", r.MonthlyOccurrences) + populate(objectMap, "weekDays", r.WeekDays) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecurrenceSchedule. +func (r *RecurrenceSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hours": + err = unpopulate(val, "Hours", &r.Hours) + delete(rawMsg, key) + case "minutes": + err = unpopulate(val, "Minutes", &r.Minutes) + delete(rawMsg, key) + case "monthDays": + err = unpopulate(val, "MonthDays", &r.MonthDays) + delete(rawMsg, key) + case "monthlyOccurrences": + err = unpopulate(val, "MonthlyOccurrences", &r.MonthlyOccurrences) + delete(rawMsg, key) + case "weekDays": + err = unpopulate(val, "WeekDays", &r.WeekDays) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecurrenceScheduleOccurrence. +func (r RecurrenceScheduleOccurrence) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "day", r.Day) + populate(objectMap, "occurrence", r.Occurrence) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecurrenceScheduleOccurrence. +func (r *RecurrenceScheduleOccurrence) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "day": + err = unpopulate(val, "Day", &r.Day) + delete(rawMsg, key) + case "occurrence": + err = unpopulate(val, "Occurrence", &r.Occurrence) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegenerateActionParameter. +func (r RegenerateActionParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyType", r.KeyType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateActionParameter. +func (r *RegenerateActionParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyType": + err = unpopulate(val, "KeyType", &r.KeyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistryCredentials. +func (r RegistryCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "passwordSecretRef", r.PasswordSecretRef) + populate(objectMap, "server", r.Server) + populate(objectMap, "username", r.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryCredentials. +func (r *RegistryCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "passwordSecretRef": + err = unpopulate(val, "PasswordSecretRef", &r.PasswordSecretRef) + delete(rawMsg, key) + case "server": + err = unpopulate(val, "Server", &r.Server) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &r.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReissueCertificateOrderRequest. +func (r ReissueCertificateOrderRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReissueCertificateOrderRequest. +func (r *ReissueCertificateOrderRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReissueCertificateOrderRequestProperties. +func (r ReissueCertificateOrderRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "csr", r.Csr) + populate(objectMap, "delayExistingRevokeInHours", r.DelayExistingRevokeInHours) + populate(objectMap, "isPrivateKeyExternal", r.IsPrivateKeyExternal) + populate(objectMap, "keySize", r.KeySize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReissueCertificateOrderRequestProperties. +func (r *ReissueCertificateOrderRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "csr": + err = unpopulate(val, "Csr", &r.Csr) + delete(rawMsg, key) + case "delayExistingRevokeInHours": + err = unpopulate(val, "DelayExistingRevokeInHours", &r.DelayExistingRevokeInHours) + delete(rawMsg, key) + case "isPrivateKeyExternal": + err = unpopulate(val, "IsPrivateKeyExternal", &r.IsPrivateKeyExternal) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &r.KeySize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RelayServiceConnectionEntity. +func (r RelayServiceConnectionEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RelayServiceConnectionEntity. +func (r *RelayServiceConnectionEntity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RelayServiceConnectionEntityProperties. +func (r RelayServiceConnectionEntityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "biztalkUri", r.BiztalkURI) + populate(objectMap, "entityConnectionString", r.EntityConnectionString) + populate(objectMap, "entityName", r.EntityName) + populate(objectMap, "hostname", r.Hostname) + populate(objectMap, "port", r.Port) + populate(objectMap, "resourceConnectionString", r.ResourceConnectionString) + populate(objectMap, "resourceType", r.ResourceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RelayServiceConnectionEntityProperties. +func (r *RelayServiceConnectionEntityProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "biztalkUri": + err = unpopulate(val, "BiztalkURI", &r.BiztalkURI) + delete(rawMsg, key) + case "entityConnectionString": + err = unpopulate(val, "EntityConnectionString", &r.EntityConnectionString) + delete(rawMsg, key) + case "entityName": + err = unpopulate(val, "EntityName", &r.EntityName) + delete(rawMsg, key) + case "hostname": + err = unpopulate(val, "Hostname", &r.Hostname) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &r.Port) + delete(rawMsg, key) + case "resourceConnectionString": + err = unpopulate(val, "ResourceConnectionString", &r.ResourceConnectionString) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &r.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnection. +func (r RemotePrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnection. +func (r *RemotePrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnectionARMResource. +func (r RemotePrivateEndpointConnectionARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnectionARMResource. +func (r *RemotePrivateEndpointConnectionARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnectionARMResourceProperties. +func (r RemotePrivateEndpointConnectionARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddresses", r.IPAddresses) + populate(objectMap, "privateEndpoint", r.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", r.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", r.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnectionARMResourceProperties. +func (r *RemotePrivateEndpointConnectionARMResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &r.IPAddresses) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &r.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &r.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnectionProperties. +func (r RemotePrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddresses", r.IPAddresses) + populate(objectMap, "privateEndpoint", r.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", r.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", r.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnectionProperties. +func (r *RemotePrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &r.IPAddresses) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &r.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &r.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Rendering. +func (r Rendering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "title", r.Title) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Rendering. +func (r *Rendering) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &r.Title) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RenewCertificateOrderRequest. +func (r RenewCertificateOrderRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RenewCertificateOrderRequest. +func (r *RenewCertificateOrderRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RenewCertificateOrderRequestProperties. +func (r RenewCertificateOrderRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "csr", r.Csr) + populate(objectMap, "isPrivateKeyExternal", r.IsPrivateKeyExternal) + populate(objectMap, "keySize", r.KeySize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RenewCertificateOrderRequestProperties. +func (r *RenewCertificateOrderRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "csr": + err = unpopulate(val, "Csr", &r.Csr) + delete(rawMsg, key) + case "isPrivateKeyExternal": + err = unpopulate(val, "IsPrivateKeyExternal", &r.IsPrivateKeyExternal) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &r.KeySize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RepetitionIndex. +func (r RepetitionIndex) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "itemIndex", r.ItemIndex) + populate(objectMap, "scopeName", r.ScopeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RepetitionIndex. +func (r *RepetitionIndex) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "itemIndex": + err = unpopulate(val, "ItemIndex", &r.ItemIndex) + delete(rawMsg, key) + case "scopeName": + err = unpopulate(val, "ScopeName", &r.ScopeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Request. +func (r Request) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "headers", r.Headers) + populate(objectMap, "method", r.Method) + populate(objectMap, "uri", r.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Request. +func (r *Request) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "headers": + err = unpopulate(val, "Headers", &r.Headers) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &r.Method) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &r.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestHistory. +func (r RequestHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestHistory. +func (r *RequestHistory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestHistoryListResult. +func (r RequestHistoryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestHistoryListResult. +func (r *RequestHistoryListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestHistoryProperties. +func (r RequestHistoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", r.EndTime) + populate(objectMap, "request", r.Request) + populate(objectMap, "response", r.Response) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestHistoryProperties. +func (r *RequestHistoryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &r.EndTime) + delete(rawMsg, key) + case "request": + err = unpopulate(val, "Request", &r.Request) + delete(rawMsg, key) + case "response": + err = unpopulate(val, "Response", &r.Response) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestsBasedTrigger. +func (r RequestsBasedTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", r.Count) + populate(objectMap, "timeInterval", r.TimeInterval) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestsBasedTrigger. +func (r *RequestsBasedTrigger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &r.Count) + delete(rawMsg, key) + case "timeInterval": + err = unpopulate(val, "TimeInterval", &r.TimeInterval) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceCollection. +func (r ResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCollection. +func (r *ResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceConfig. +func (r ResourceConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", r.CPU) + populate(objectMap, "memory", r.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceConfig. +func (r *ResourceConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &r.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &r.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceHealthMetadata. +func (r ResourceHealthMetadata) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHealthMetadata. +func (r *ResourceHealthMetadata) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceHealthMetadataCollection. +func (r ResourceHealthMetadataCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHealthMetadataCollection. +func (r *ResourceHealthMetadataCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceHealthMetadataProperties. +func (r ResourceHealthMetadataProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "category", r.Category) + populate(objectMap, "signalAvailability", r.SignalAvailability) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHealthMetadataProperties. +func (r *ResourceHealthMetadataProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "category": + err = unpopulate(val, "Category", &r.Category) + delete(rawMsg, key) + case "signalAvailability": + err = unpopulate(val, "SignalAvailability", &r.SignalAvailability) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceMetricAvailability. +func (r ResourceMetricAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "retention", r.Retention) + populate(objectMap, "timeGrain", r.TimeGrain) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMetricAvailability. +func (r *ResourceMetricAvailability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "retention": + err = unpopulate(val, "Retention", &r.Retention) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &r.TimeGrain) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceMetricDefinition. +func (r ResourceMetricDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMetricDefinition. +func (r *ResourceMetricDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceMetricDefinitionCollection. +func (r ResourceMetricDefinitionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMetricDefinitionCollection. +func (r *ResourceMetricDefinitionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceMetricDefinitionProperties. +func (r ResourceMetricDefinitionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "metricAvailabilities", r.MetricAvailabilities) + populate(objectMap, "primaryAggregationType", r.PrimaryAggregationType) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "resourceUri", r.ResourceURI) + populate(objectMap, "unit", r.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMetricDefinitionProperties. +func (r *ResourceMetricDefinitionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "metricAvailabilities": + err = unpopulate(val, "MetricAvailabilities", &r.MetricAvailabilities) + delete(rawMsg, key) + case "primaryAggregationType": + err = unpopulate(val, "PrimaryAggregationType", &r.PrimaryAggregationType) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "resourceUri": + err = unpopulate(val, "ResourceURI", &r.ResourceURI) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &r.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceNameAvailability. +func (r ResourceNameAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", r.Message) + populate(objectMap, "nameAvailable", r.NameAvailable) + populate(objectMap, "reason", r.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNameAvailability. +func (r *ResourceNameAvailability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &r.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &r.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &r.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceNameAvailabilityRequest. +func (r ResourceNameAvailabilityRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "environmentId", r.EnvironmentID) + populate(objectMap, "isFqdn", r.IsFqdn) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNameAvailabilityRequest. +func (r *ResourceNameAvailabilityRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "environmentId": + err = unpopulate(val, "EnvironmentID", &r.EnvironmentID) + delete(rawMsg, key) + case "isFqdn": + err = unpopulate(val, "IsFqdn", &r.IsFqdn) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceReference. +func (r ResourceReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceReference. +func (r *ResourceReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Response. +func (r Response) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bodyLink", r.BodyLink) + populateAny(objectMap, "headers", r.Headers) + populate(objectMap, "statusCode", r.StatusCode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Response. +func (r *Response) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bodyLink": + err = unpopulate(val, "BodyLink", &r.BodyLink) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &r.Headers) + delete(rawMsg, key) + case "statusCode": + err = unpopulate(val, "StatusCode", &r.StatusCode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResponseMessageEnvelopeRemotePrivateEndpointConnection. +func (r ResponseMessageEnvelopeRemotePrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", r.Error) + populate(objectMap, "id", r.ID) + populate(objectMap, "identity", r.Identity) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "plan", r.Plan) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "sku", r.SKU) + populate(objectMap, "status", r.Status) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + populate(objectMap, "zones", r.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResponseMessageEnvelopeRemotePrivateEndpointConnection. +func (r *ResponseMessageEnvelopeRemotePrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &r.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &r.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "plan": + err = unpopulate(val, "Plan", &r.Plan) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &r.SKU) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &r.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &r.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResponseMetaData. +func (r ResponseMetaData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataSource", r.DataSource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResponseMetaData. +func (r *ResponseMetaData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataSource": + err = unpopulate(val, "DataSource", &r.DataSource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestoreRequest. +func (r RestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreRequest. +func (r *RestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestoreRequestProperties. +func (r RestoreRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "adjustConnectionStrings", r.AdjustConnectionStrings) + populate(objectMap, "appServicePlan", r.AppServicePlan) + populate(objectMap, "blobName", r.BlobName) + populate(objectMap, "databases", r.Databases) + populate(objectMap, "hostingEnvironment", r.HostingEnvironment) + populate(objectMap, "ignoreConflictingHostNames", r.IgnoreConflictingHostNames) + populate(objectMap, "ignoreDatabases", r.IgnoreDatabases) + populate(objectMap, "operationType", r.OperationType) + populate(objectMap, "overwrite", r.Overwrite) + populate(objectMap, "siteName", r.SiteName) + populate(objectMap, "storageAccountUrl", r.StorageAccountURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreRequestProperties. +func (r *RestoreRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adjustConnectionStrings": + err = unpopulate(val, "AdjustConnectionStrings", &r.AdjustConnectionStrings) + delete(rawMsg, key) + case "appServicePlan": + err = unpopulate(val, "AppServicePlan", &r.AppServicePlan) + delete(rawMsg, key) + case "blobName": + err = unpopulate(val, "BlobName", &r.BlobName) + delete(rawMsg, key) + case "databases": + err = unpopulate(val, "Databases", &r.Databases) + delete(rawMsg, key) + case "hostingEnvironment": + err = unpopulate(val, "HostingEnvironment", &r.HostingEnvironment) + delete(rawMsg, key) + case "ignoreConflictingHostNames": + err = unpopulate(val, "IgnoreConflictingHostNames", &r.IgnoreConflictingHostNames) + delete(rawMsg, key) + case "ignoreDatabases": + err = unpopulate(val, "IgnoreDatabases", &r.IgnoreDatabases) + delete(rawMsg, key) + case "operationType": + err = unpopulate(val, "OperationType", &r.OperationType) + delete(rawMsg, key) + case "overwrite": + err = unpopulate(val, "Overwrite", &r.Overwrite) + delete(rawMsg, key) + case "siteName": + err = unpopulate(val, "SiteName", &r.SiteName) + delete(rawMsg, key) + case "storageAccountUrl": + err = unpopulate(val, "StorageAccountURL", &r.StorageAccountURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RetryHistory. +func (r RetryHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientRequestId", r.ClientRequestID) + populate(objectMap, "code", r.Code) + populateDateTimeRFC3339(objectMap, "endTime", r.EndTime) + populate(objectMap, "error", r.Error) + populate(objectMap, "serviceRequestId", r.ServiceRequestID) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RetryHistory. +func (r *RetryHistory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientRequestId": + err = unpopulate(val, "ClientRequestID", &r.ClientRequestID) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &r.Code) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &r.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &r.Error) + delete(rawMsg, key) + case "serviceRequestId": + err = unpopulate(val, "ServiceRequestID", &r.ServiceRequestID) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Revision. +func (r Revision) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Revision. +func (r *Revision) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RevisionCollection. +func (r RevisionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RevisionCollection. +func (r *RevisionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RevisionProperties. +func (r RevisionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "active", r.Active) + populateDateTimeRFC3339(objectMap, "createdTime", r.CreatedTime) + populate(objectMap, "fqdn", r.Fqdn) + populate(objectMap, "healthState", r.HealthState) + populate(objectMap, "provisioningError", r.ProvisioningError) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "replicas", r.Replicas) + populate(objectMap, "template", r.Template) + populate(objectMap, "trafficWeight", r.TrafficWeight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RevisionProperties. +func (r *RevisionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "active": + err = unpopulate(val, "Active", &r.Active) + delete(rawMsg, key) + case "createdTime": + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &r.CreatedTime) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &r.Fqdn) + delete(rawMsg, key) + case "healthState": + err = unpopulate(val, "HealthState", &r.HealthState) + delete(rawMsg, key) + case "provisioningError": + err = unpopulate(val, "ProvisioningError", &r.ProvisioningError) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "replicas": + err = unpopulate(val, "Replicas", &r.Replicas) + delete(rawMsg, key) + case "template": + err = unpopulate(val, "Template", &r.Template) + delete(rawMsg, key) + case "trafficWeight": + err = unpopulate(val, "TrafficWeight", &r.TrafficWeight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RunActionCorrelation. +func (r RunActionCorrelation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionTrackingId", r.ActionTrackingID) + populate(objectMap, "clientKeywords", r.ClientKeywords) + populate(objectMap, "clientTrackingId", r.ClientTrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RunActionCorrelation. +func (r *RunActionCorrelation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionTrackingId": + err = unpopulate(val, "ActionTrackingID", &r.ActionTrackingID) + delete(rawMsg, key) + case "clientKeywords": + err = unpopulate(val, "ClientKeywords", &r.ClientKeywords) + delete(rawMsg, key) + case "clientTrackingId": + err = unpopulate(val, "ClientTrackingID", &r.ClientTrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RunCorrelation. +func (r RunCorrelation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientKeywords", r.ClientKeywords) + populate(objectMap, "clientTrackingId", r.ClientTrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RunCorrelation. +func (r *RunCorrelation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientKeywords": + err = unpopulate(val, "ClientKeywords", &r.ClientKeywords) + delete(rawMsg, key) + case "clientTrackingId": + err = unpopulate(val, "ClientTrackingID", &r.ClientTrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUCapacity. +func (s SKUCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "default", s.Default) + populate(objectMap, "elasticMaximum", s.ElasticMaximum) + populate(objectMap, "maximum", s.Maximum) + populate(objectMap, "minimum", s.Minimum) + populate(objectMap, "scaleType", s.ScaleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity. +func (s *SKUCapacity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &s.Default) + delete(rawMsg, key) + case "elasticMaximum": + err = unpopulate(val, "ElasticMaximum", &s.ElasticMaximum) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &s.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &s.Minimum) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &s.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUDescription. +func (s SKUDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capabilities", s.Capabilities) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "family", s.Family) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "name", s.Name) + populate(objectMap, "skuCapacity", s.SKUCapacity) + populate(objectMap, "size", s.Size) + populate(objectMap, "tier", s.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescription. +func (s *SKUDescription) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capabilities": + err = unpopulate(val, "Capabilities", &s.Capabilities) + delete(rawMsg, key) + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &s.Family) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &s.Locations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "skuCapacity": + err = unpopulate(val, "SKUCapacity", &s.SKUCapacity) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &s.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUInfo. +func (s SKUInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "sku", s.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUInfo. +func (s *SKUInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUInfoCollection. +func (s SKUInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUInfoCollection. +func (s *SKUInfoCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUInfos. +func (s SKUInfos) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "skus", s.SKUs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUInfos. +func (s *SKUInfos) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + case "skus": + err = unpopulate(val, "SKUs", &s.SKUs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SampleUtterance. +func (s SampleUtterance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "links", s.Links) + populate(objectMap, "qid", s.Qid) + populate(objectMap, "text", s.Text) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SampleUtterance. +func (s *SampleUtterance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "links": + err = unpopulate(val, "Links", &s.Links) + delete(rawMsg, key) + case "qid": + err = unpopulate(val, "Qid", &s.Qid) + delete(rawMsg, key) + case "text": + err = unpopulate(val, "Text", &s.Text) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Scale. +func (s Scale) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxReplicas", s.MaxReplicas) + populate(objectMap, "minReplicas", s.MinReplicas) + populate(objectMap, "rules", s.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Scale. +func (s *Scale) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxReplicas": + err = unpopulate(val, "MaxReplicas", &s.MaxReplicas) + delete(rawMsg, key) + case "minReplicas": + err = unpopulate(val, "MinReplicas", &s.MinReplicas) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &s.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleRule. +func (s ScaleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureQueue", s.AzureQueue) + populate(objectMap, "custom", s.Custom) + populate(objectMap, "http", s.HTTP) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleRule. +func (s *ScaleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureQueue": + err = unpopulate(val, "AzureQueue", &s.AzureQueue) + delete(rawMsg, key) + case "custom": + err = unpopulate(val, "Custom", &s.Custom) + delete(rawMsg, key) + case "http": + err = unpopulate(val, "HTTP", &s.HTTP) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleRuleAuth. +func (s ScaleRuleAuth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "secretRef", s.SecretRef) + populate(objectMap, "triggerParameter", s.TriggerParameter) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleRuleAuth. +func (s *ScaleRuleAuth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "secretRef": + err = unpopulate(val, "SecretRef", &s.SecretRef) + delete(rawMsg, key) + case "triggerParameter": + err = unpopulate(val, "TriggerParameter", &s.TriggerParameter) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Secret. +func (s Secret) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Secret. +func (s *Secret) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretsCollection. +func (s SecretsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretsCollection. +func (s *SecretsCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", s.LogSpecifications) + populate(objectMap, "metricSpecifications", s.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Site. +func (s Site) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedLocation", s.ExtendedLocation) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Site. +func (s *Site) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &s.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteAuthSettings. +func (s SiteAuthSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteAuthSettings. +func (s *SiteAuthSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteAuthSettingsProperties. +func (s SiteAuthSettingsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadClaimsAuthorization", s.AADClaimsAuthorization) + populate(objectMap, "additionalLoginParams", s.AdditionalLoginParams) + populate(objectMap, "allowedAudiences", s.AllowedAudiences) + populate(objectMap, "allowedExternalRedirectUrls", s.AllowedExternalRedirectUrls) + populate(objectMap, "authFilePath", s.AuthFilePath) + populate(objectMap, "clientId", s.ClientID) + populate(objectMap, "clientSecret", s.ClientSecret) + populate(objectMap, "clientSecretCertificateThumbprint", s.ClientSecretCertificateThumbprint) + populate(objectMap, "clientSecretSettingName", s.ClientSecretSettingName) + populate(objectMap, "configVersion", s.ConfigVersion) + populate(objectMap, "defaultProvider", s.DefaultProvider) + populate(objectMap, "enabled", s.Enabled) + populate(objectMap, "facebookAppId", s.FacebookAppID) + populate(objectMap, "facebookAppSecret", s.FacebookAppSecret) + populate(objectMap, "facebookAppSecretSettingName", s.FacebookAppSecretSettingName) + populate(objectMap, "facebookOAuthScopes", s.FacebookOAuthScopes) + populate(objectMap, "gitHubClientId", s.GitHubClientID) + populate(objectMap, "gitHubClientSecret", s.GitHubClientSecret) + populate(objectMap, "gitHubClientSecretSettingName", s.GitHubClientSecretSettingName) + populate(objectMap, "gitHubOAuthScopes", s.GitHubOAuthScopes) + populate(objectMap, "googleClientId", s.GoogleClientID) + populate(objectMap, "googleClientSecret", s.GoogleClientSecret) + populate(objectMap, "googleClientSecretSettingName", s.GoogleClientSecretSettingName) + populate(objectMap, "googleOAuthScopes", s.GoogleOAuthScopes) + populate(objectMap, "isAuthFromFile", s.IsAuthFromFile) + populate(objectMap, "issuer", s.Issuer) + populate(objectMap, "microsoftAccountClientId", s.MicrosoftAccountClientID) + populate(objectMap, "microsoftAccountClientSecret", s.MicrosoftAccountClientSecret) + populate(objectMap, "microsoftAccountClientSecretSettingName", s.MicrosoftAccountClientSecretSettingName) + populate(objectMap, "microsoftAccountOAuthScopes", s.MicrosoftAccountOAuthScopes) + populate(objectMap, "runtimeVersion", s.RuntimeVersion) + populate(objectMap, "tokenRefreshExtensionHours", s.TokenRefreshExtensionHours) + populate(objectMap, "tokenStoreEnabled", s.TokenStoreEnabled) + populate(objectMap, "twitterConsumerKey", s.TwitterConsumerKey) + populate(objectMap, "twitterConsumerSecret", s.TwitterConsumerSecret) + populate(objectMap, "twitterConsumerSecretSettingName", s.TwitterConsumerSecretSettingName) + populate(objectMap, "unauthenticatedClientAction", s.UnauthenticatedClientAction) + populate(objectMap, "validateIssuer", s.ValidateIssuer) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteAuthSettingsProperties. +func (s *SiteAuthSettingsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadClaimsAuthorization": + err = unpopulate(val, "AADClaimsAuthorization", &s.AADClaimsAuthorization) + delete(rawMsg, key) + case "additionalLoginParams": + err = unpopulate(val, "AdditionalLoginParams", &s.AdditionalLoginParams) + delete(rawMsg, key) + case "allowedAudiences": + err = unpopulate(val, "AllowedAudiences", &s.AllowedAudiences) + delete(rawMsg, key) + case "allowedExternalRedirectUrls": + err = unpopulate(val, "AllowedExternalRedirectUrls", &s.AllowedExternalRedirectUrls) + delete(rawMsg, key) + case "authFilePath": + err = unpopulate(val, "AuthFilePath", &s.AuthFilePath) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &s.ClientID) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &s.ClientSecret) + delete(rawMsg, key) + case "clientSecretCertificateThumbprint": + err = unpopulate(val, "ClientSecretCertificateThumbprint", &s.ClientSecretCertificateThumbprint) + delete(rawMsg, key) + case "clientSecretSettingName": + err = unpopulate(val, "ClientSecretSettingName", &s.ClientSecretSettingName) + delete(rawMsg, key) + case "configVersion": + err = unpopulate(val, "ConfigVersion", &s.ConfigVersion) + delete(rawMsg, key) + case "defaultProvider": + err = unpopulate(val, "DefaultProvider", &s.DefaultProvider) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "facebookAppId": + err = unpopulate(val, "FacebookAppID", &s.FacebookAppID) + delete(rawMsg, key) + case "facebookAppSecret": + err = unpopulate(val, "FacebookAppSecret", &s.FacebookAppSecret) + delete(rawMsg, key) + case "facebookAppSecretSettingName": + err = unpopulate(val, "FacebookAppSecretSettingName", &s.FacebookAppSecretSettingName) + delete(rawMsg, key) + case "facebookOAuthScopes": + err = unpopulate(val, "FacebookOAuthScopes", &s.FacebookOAuthScopes) + delete(rawMsg, key) + case "gitHubClientId": + err = unpopulate(val, "GitHubClientID", &s.GitHubClientID) + delete(rawMsg, key) + case "gitHubClientSecret": + err = unpopulate(val, "GitHubClientSecret", &s.GitHubClientSecret) + delete(rawMsg, key) + case "gitHubClientSecretSettingName": + err = unpopulate(val, "GitHubClientSecretSettingName", &s.GitHubClientSecretSettingName) + delete(rawMsg, key) + case "gitHubOAuthScopes": + err = unpopulate(val, "GitHubOAuthScopes", &s.GitHubOAuthScopes) + delete(rawMsg, key) + case "googleClientId": + err = unpopulate(val, "GoogleClientID", &s.GoogleClientID) + delete(rawMsg, key) + case "googleClientSecret": + err = unpopulate(val, "GoogleClientSecret", &s.GoogleClientSecret) + delete(rawMsg, key) + case "googleClientSecretSettingName": + err = unpopulate(val, "GoogleClientSecretSettingName", &s.GoogleClientSecretSettingName) + delete(rawMsg, key) + case "googleOAuthScopes": + err = unpopulate(val, "GoogleOAuthScopes", &s.GoogleOAuthScopes) + delete(rawMsg, key) + case "isAuthFromFile": + err = unpopulate(val, "IsAuthFromFile", &s.IsAuthFromFile) + delete(rawMsg, key) + case "issuer": + err = unpopulate(val, "Issuer", &s.Issuer) + delete(rawMsg, key) + case "microsoftAccountClientId": + err = unpopulate(val, "MicrosoftAccountClientID", &s.MicrosoftAccountClientID) + delete(rawMsg, key) + case "microsoftAccountClientSecret": + err = unpopulate(val, "MicrosoftAccountClientSecret", &s.MicrosoftAccountClientSecret) + delete(rawMsg, key) + case "microsoftAccountClientSecretSettingName": + err = unpopulate(val, "MicrosoftAccountClientSecretSettingName", &s.MicrosoftAccountClientSecretSettingName) + delete(rawMsg, key) + case "microsoftAccountOAuthScopes": + err = unpopulate(val, "MicrosoftAccountOAuthScopes", &s.MicrosoftAccountOAuthScopes) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) + delete(rawMsg, key) + case "tokenRefreshExtensionHours": + err = unpopulate(val, "TokenRefreshExtensionHours", &s.TokenRefreshExtensionHours) + delete(rawMsg, key) + case "tokenStoreEnabled": + err = unpopulate(val, "TokenStoreEnabled", &s.TokenStoreEnabled) + delete(rawMsg, key) + case "twitterConsumerKey": + err = unpopulate(val, "TwitterConsumerKey", &s.TwitterConsumerKey) + delete(rawMsg, key) + case "twitterConsumerSecret": + err = unpopulate(val, "TwitterConsumerSecret", &s.TwitterConsumerSecret) + delete(rawMsg, key) + case "twitterConsumerSecretSettingName": + err = unpopulate(val, "TwitterConsumerSecretSettingName", &s.TwitterConsumerSecretSettingName) + delete(rawMsg, key) + case "unauthenticatedClientAction": + err = unpopulate(val, "UnauthenticatedClientAction", &s.UnauthenticatedClientAction) + delete(rawMsg, key) + case "validateIssuer": + err = unpopulate(val, "ValidateIssuer", &s.ValidateIssuer) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteAuthSettingsV2. +func (s SiteAuthSettingsV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteAuthSettingsV2. +func (s *SiteAuthSettingsV2) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteAuthSettingsV2Properties. +func (s SiteAuthSettingsV2Properties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "globalValidation", s.GlobalValidation) + populate(objectMap, "httpSettings", s.HTTPSettings) + populate(objectMap, "identityProviders", s.IdentityProviders) + populate(objectMap, "login", s.Login) + populate(objectMap, "platform", s.Platform) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteAuthSettingsV2Properties. +func (s *SiteAuthSettingsV2Properties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "globalValidation": + err = unpopulate(val, "GlobalValidation", &s.GlobalValidation) + delete(rawMsg, key) + case "httpSettings": + err = unpopulate(val, "HTTPSettings", &s.HTTPSettings) + delete(rawMsg, key) + case "identityProviders": + err = unpopulate(val, "IdentityProviders", &s.IdentityProviders) + delete(rawMsg, key) + case "login": + err = unpopulate(val, "Login", &s.Login) + delete(rawMsg, key) + case "platform": + err = unpopulate(val, "Platform", &s.Platform) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteCloneability. +func (s SiteCloneability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blockingCharacteristics", s.BlockingCharacteristics) + populate(objectMap, "blockingFeatures", s.BlockingFeatures) + populate(objectMap, "result", s.Result) + populate(objectMap, "unsupportedFeatures", s.UnsupportedFeatures) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteCloneability. +func (s *SiteCloneability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blockingCharacteristics": + err = unpopulate(val, "BlockingCharacteristics", &s.BlockingCharacteristics) + delete(rawMsg, key) + case "blockingFeatures": + err = unpopulate(val, "BlockingFeatures", &s.BlockingFeatures) + delete(rawMsg, key) + case "result": + err = unpopulate(val, "Result", &s.Result) + delete(rawMsg, key) + case "unsupportedFeatures": + err = unpopulate(val, "UnsupportedFeatures", &s.UnsupportedFeatures) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteCloneabilityCriterion. +func (s SiteCloneabilityCriterion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteCloneabilityCriterion. +func (s *SiteCloneabilityCriterion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfig. +func (s SiteConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiDefinition", s.APIDefinition) + populate(objectMap, "apiManagementConfig", s.APIManagementConfig) + populate(objectMap, "acrUseManagedIdentityCreds", s.AcrUseManagedIdentityCreds) + populate(objectMap, "acrUserManagedIdentityID", s.AcrUserManagedIdentityID) + populate(objectMap, "alwaysOn", s.AlwaysOn) + populate(objectMap, "appCommandLine", s.AppCommandLine) + populate(objectMap, "appSettings", s.AppSettings) + populate(objectMap, "autoHealEnabled", s.AutoHealEnabled) + populate(objectMap, "autoHealRules", s.AutoHealRules) + populate(objectMap, "autoSwapSlotName", s.AutoSwapSlotName) + populate(objectMap, "azureStorageAccounts", s.AzureStorageAccounts) + populate(objectMap, "connectionStrings", s.ConnectionStrings) + populate(objectMap, "cors", s.Cors) + populate(objectMap, "defaultDocuments", s.DefaultDocuments) + populate(objectMap, "detailedErrorLoggingEnabled", s.DetailedErrorLoggingEnabled) + populate(objectMap, "documentRoot", s.DocumentRoot) + populate(objectMap, "elasticWebAppScaleLimit", s.ElasticWebAppScaleLimit) + populate(objectMap, "experiments", s.Experiments) + populate(objectMap, "ftpsState", s.FtpsState) + populate(objectMap, "functionAppScaleLimit", s.FunctionAppScaleLimit) + populate(objectMap, "functionsRuntimeScaleMonitoringEnabled", s.FunctionsRuntimeScaleMonitoringEnabled) + populate(objectMap, "httpLoggingEnabled", s.HTTPLoggingEnabled) + populate(objectMap, "handlerMappings", s.HandlerMappings) + populate(objectMap, "healthCheckPath", s.HealthCheckPath) + populate(objectMap, "http20Enabled", s.Http20Enabled) + populate(objectMap, "ipSecurityRestrictions", s.IPSecurityRestrictions) + populate(objectMap, "ipSecurityRestrictionsDefaultAction", s.IPSecurityRestrictionsDefaultAction) + populate(objectMap, "javaContainer", s.JavaContainer) + populate(objectMap, "javaContainerVersion", s.JavaContainerVersion) + populate(objectMap, "javaVersion", s.JavaVersion) + populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) + populate(objectMap, "limits", s.Limits) + populate(objectMap, "linuxFxVersion", s.LinuxFxVersion) + populate(objectMap, "loadBalancing", s.LoadBalancing) + populate(objectMap, "localMySqlEnabled", s.LocalMySQLEnabled) + populate(objectMap, "logsDirectorySizeLimit", s.LogsDirectorySizeLimit) + populate(objectMap, "machineKey", s.MachineKey) + populate(objectMap, "managedPipelineMode", s.ManagedPipelineMode) + populate(objectMap, "managedServiceIdentityId", s.ManagedServiceIdentityID) + populate(objectMap, "metadata", s.Metadata) + populate(objectMap, "minTlsCipherSuite", s.MinTLSCipherSuite) + populate(objectMap, "minTlsVersion", s.MinTLSVersion) + populate(objectMap, "minimumElasticInstanceCount", s.MinimumElasticInstanceCount) + populate(objectMap, "netFrameworkVersion", s.NetFrameworkVersion) + populate(objectMap, "nodeVersion", s.NodeVersion) + populate(objectMap, "numberOfWorkers", s.NumberOfWorkers) + populate(objectMap, "phpVersion", s.PhpVersion) + populate(objectMap, "powerShellVersion", s.PowerShellVersion) + populate(objectMap, "preWarmedInstanceCount", s.PreWarmedInstanceCount) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + populate(objectMap, "publishingUsername", s.PublishingUsername) + populate(objectMap, "push", s.Push) + populate(objectMap, "pythonVersion", s.PythonVersion) + populate(objectMap, "remoteDebuggingEnabled", s.RemoteDebuggingEnabled) + populate(objectMap, "remoteDebuggingVersion", s.RemoteDebuggingVersion) + populate(objectMap, "requestTracingEnabled", s.RequestTracingEnabled) + populateDateTimeRFC3339(objectMap, "requestTracingExpirationTime", s.RequestTracingExpirationTime) + populate(objectMap, "scmIpSecurityRestrictions", s.ScmIPSecurityRestrictions) + populate(objectMap, "scmIpSecurityRestrictionsDefaultAction", s.ScmIPSecurityRestrictionsDefaultAction) + populate(objectMap, "scmIpSecurityRestrictionsUseMain", s.ScmIPSecurityRestrictionsUseMain) + populate(objectMap, "scmMinTlsVersion", s.ScmMinTLSVersion) + populate(objectMap, "scmType", s.ScmType) + populate(objectMap, "tracingOptions", s.TracingOptions) + populate(objectMap, "use32BitWorkerProcess", s.Use32BitWorkerProcess) + populate(objectMap, "virtualApplications", s.VirtualApplications) + populate(objectMap, "vnetName", s.VnetName) + populate(objectMap, "vnetPrivatePortsCount", s.VnetPrivatePortsCount) + populate(objectMap, "vnetRouteAllEnabled", s.VnetRouteAllEnabled) + populate(objectMap, "webSocketsEnabled", s.WebSocketsEnabled) + populate(objectMap, "websiteTimeZone", s.WebsiteTimeZone) + populate(objectMap, "windowsFxVersion", s.WindowsFxVersion) + populate(objectMap, "xManagedServiceIdentityId", s.XManagedServiceIdentityID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfig. +func (s *SiteConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiDefinition": + err = unpopulate(val, "APIDefinition", &s.APIDefinition) + delete(rawMsg, key) + case "apiManagementConfig": + err = unpopulate(val, "APIManagementConfig", &s.APIManagementConfig) + delete(rawMsg, key) + case "acrUseManagedIdentityCreds": + err = unpopulate(val, "AcrUseManagedIdentityCreds", &s.AcrUseManagedIdentityCreds) + delete(rawMsg, key) + case "acrUserManagedIdentityID": + err = unpopulate(val, "AcrUserManagedIdentityID", &s.AcrUserManagedIdentityID) + delete(rawMsg, key) + case "alwaysOn": + err = unpopulate(val, "AlwaysOn", &s.AlwaysOn) + delete(rawMsg, key) + case "appCommandLine": + err = unpopulate(val, "AppCommandLine", &s.AppCommandLine) + delete(rawMsg, key) + case "appSettings": + err = unpopulate(val, "AppSettings", &s.AppSettings) + delete(rawMsg, key) + case "autoHealEnabled": + err = unpopulate(val, "AutoHealEnabled", &s.AutoHealEnabled) + delete(rawMsg, key) + case "autoHealRules": + err = unpopulate(val, "AutoHealRules", &s.AutoHealRules) + delete(rawMsg, key) + case "autoSwapSlotName": + err = unpopulate(val, "AutoSwapSlotName", &s.AutoSwapSlotName) + delete(rawMsg, key) + case "azureStorageAccounts": + err = unpopulate(val, "AzureStorageAccounts", &s.AzureStorageAccounts) + delete(rawMsg, key) + case "connectionStrings": + err = unpopulate(val, "ConnectionStrings", &s.ConnectionStrings) + delete(rawMsg, key) + case "cors": + err = unpopulate(val, "Cors", &s.Cors) + delete(rawMsg, key) + case "defaultDocuments": + err = unpopulate(val, "DefaultDocuments", &s.DefaultDocuments) + delete(rawMsg, key) + case "detailedErrorLoggingEnabled": + err = unpopulate(val, "DetailedErrorLoggingEnabled", &s.DetailedErrorLoggingEnabled) + delete(rawMsg, key) + case "documentRoot": + err = unpopulate(val, "DocumentRoot", &s.DocumentRoot) + delete(rawMsg, key) + case "elasticWebAppScaleLimit": + err = unpopulate(val, "ElasticWebAppScaleLimit", &s.ElasticWebAppScaleLimit) + delete(rawMsg, key) + case "experiments": + err = unpopulate(val, "Experiments", &s.Experiments) + delete(rawMsg, key) + case "ftpsState": + err = unpopulate(val, "FtpsState", &s.FtpsState) + delete(rawMsg, key) + case "functionAppScaleLimit": + err = unpopulate(val, "FunctionAppScaleLimit", &s.FunctionAppScaleLimit) + delete(rawMsg, key) + case "functionsRuntimeScaleMonitoringEnabled": + err = unpopulate(val, "FunctionsRuntimeScaleMonitoringEnabled", &s.FunctionsRuntimeScaleMonitoringEnabled) + delete(rawMsg, key) + case "httpLoggingEnabled": + err = unpopulate(val, "HTTPLoggingEnabled", &s.HTTPLoggingEnabled) + delete(rawMsg, key) + case "handlerMappings": + err = unpopulate(val, "HandlerMappings", &s.HandlerMappings) + delete(rawMsg, key) + case "healthCheckPath": + err = unpopulate(val, "HealthCheckPath", &s.HealthCheckPath) + delete(rawMsg, key) + case "http20Enabled": + err = unpopulate(val, "Http20Enabled", &s.Http20Enabled) + delete(rawMsg, key) + case "ipSecurityRestrictions": + err = unpopulate(val, "IPSecurityRestrictions", &s.IPSecurityRestrictions) + delete(rawMsg, key) + case "ipSecurityRestrictionsDefaultAction": + err = unpopulate(val, "IPSecurityRestrictionsDefaultAction", &s.IPSecurityRestrictionsDefaultAction) + delete(rawMsg, key) + case "javaContainer": + err = unpopulate(val, "JavaContainer", &s.JavaContainer) + delete(rawMsg, key) + case "javaContainerVersion": + err = unpopulate(val, "JavaContainerVersion", &s.JavaContainerVersion) + delete(rawMsg, key) + case "javaVersion": + err = unpopulate(val, "JavaVersion", &s.JavaVersion) + delete(rawMsg, key) + case "keyVaultReferenceIdentity": + err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) + delete(rawMsg, key) + case "limits": + err = unpopulate(val, "Limits", &s.Limits) + delete(rawMsg, key) + case "linuxFxVersion": + err = unpopulate(val, "LinuxFxVersion", &s.LinuxFxVersion) + delete(rawMsg, key) + case "loadBalancing": + err = unpopulate(val, "LoadBalancing", &s.LoadBalancing) + delete(rawMsg, key) + case "localMySqlEnabled": + err = unpopulate(val, "LocalMySQLEnabled", &s.LocalMySQLEnabled) + delete(rawMsg, key) + case "logsDirectorySizeLimit": + err = unpopulate(val, "LogsDirectorySizeLimit", &s.LogsDirectorySizeLimit) + delete(rawMsg, key) + case "machineKey": + err = unpopulate(val, "MachineKey", &s.MachineKey) + delete(rawMsg, key) + case "managedPipelineMode": + err = unpopulate(val, "ManagedPipelineMode", &s.ManagedPipelineMode) + delete(rawMsg, key) + case "managedServiceIdentityId": + err = unpopulate(val, "ManagedServiceIdentityID", &s.ManagedServiceIdentityID) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &s.Metadata) + delete(rawMsg, key) + case "minTlsCipherSuite": + err = unpopulate(val, "MinTLSCipherSuite", &s.MinTLSCipherSuite) + delete(rawMsg, key) + case "minTlsVersion": + err = unpopulate(val, "MinTLSVersion", &s.MinTLSVersion) + delete(rawMsg, key) + case "minimumElasticInstanceCount": + err = unpopulate(val, "MinimumElasticInstanceCount", &s.MinimumElasticInstanceCount) + delete(rawMsg, key) + case "netFrameworkVersion": + err = unpopulate(val, "NetFrameworkVersion", &s.NetFrameworkVersion) + delete(rawMsg, key) + case "nodeVersion": + err = unpopulate(val, "NodeVersion", &s.NodeVersion) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &s.NumberOfWorkers) + delete(rawMsg, key) + case "phpVersion": + err = unpopulate(val, "PhpVersion", &s.PhpVersion) + delete(rawMsg, key) + case "powerShellVersion": + err = unpopulate(val, "PowerShellVersion", &s.PowerShellVersion) + delete(rawMsg, key) + case "preWarmedInstanceCount": + err = unpopulate(val, "PreWarmedInstanceCount", &s.PreWarmedInstanceCount) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + case "publishingUsername": + err = unpopulate(val, "PublishingUsername", &s.PublishingUsername) + delete(rawMsg, key) + case "push": + err = unpopulate(val, "Push", &s.Push) + delete(rawMsg, key) + case "pythonVersion": + err = unpopulate(val, "PythonVersion", &s.PythonVersion) + delete(rawMsg, key) + case "remoteDebuggingEnabled": + err = unpopulate(val, "RemoteDebuggingEnabled", &s.RemoteDebuggingEnabled) + delete(rawMsg, key) + case "remoteDebuggingVersion": + err = unpopulate(val, "RemoteDebuggingVersion", &s.RemoteDebuggingVersion) + delete(rawMsg, key) + case "requestTracingEnabled": + err = unpopulate(val, "RequestTracingEnabled", &s.RequestTracingEnabled) + delete(rawMsg, key) + case "requestTracingExpirationTime": + err = unpopulateDateTimeRFC3339(val, "RequestTracingExpirationTime", &s.RequestTracingExpirationTime) + delete(rawMsg, key) + case "scmIpSecurityRestrictions": + err = unpopulate(val, "ScmIPSecurityRestrictions", &s.ScmIPSecurityRestrictions) + delete(rawMsg, key) + case "scmIpSecurityRestrictionsDefaultAction": + err = unpopulate(val, "ScmIPSecurityRestrictionsDefaultAction", &s.ScmIPSecurityRestrictionsDefaultAction) + delete(rawMsg, key) + case "scmIpSecurityRestrictionsUseMain": + err = unpopulate(val, "ScmIPSecurityRestrictionsUseMain", &s.ScmIPSecurityRestrictionsUseMain) + delete(rawMsg, key) + case "scmMinTlsVersion": + err = unpopulate(val, "ScmMinTLSVersion", &s.ScmMinTLSVersion) + delete(rawMsg, key) + case "scmType": + err = unpopulate(val, "ScmType", &s.ScmType) + delete(rawMsg, key) + case "tracingOptions": + err = unpopulate(val, "TracingOptions", &s.TracingOptions) + delete(rawMsg, key) + case "use32BitWorkerProcess": + err = unpopulate(val, "Use32BitWorkerProcess", &s.Use32BitWorkerProcess) + delete(rawMsg, key) + case "virtualApplications": + err = unpopulate(val, "VirtualApplications", &s.VirtualApplications) + delete(rawMsg, key) + case "vnetName": + err = unpopulate(val, "VnetName", &s.VnetName) + delete(rawMsg, key) + case "vnetPrivatePortsCount": + err = unpopulate(val, "VnetPrivatePortsCount", &s.VnetPrivatePortsCount) + delete(rawMsg, key) + case "vnetRouteAllEnabled": + err = unpopulate(val, "VnetRouteAllEnabled", &s.VnetRouteAllEnabled) + delete(rawMsg, key) + case "webSocketsEnabled": + err = unpopulate(val, "WebSocketsEnabled", &s.WebSocketsEnabled) + delete(rawMsg, key) + case "websiteTimeZone": + err = unpopulate(val, "WebsiteTimeZone", &s.WebsiteTimeZone) + delete(rawMsg, key) + case "windowsFxVersion": + err = unpopulate(val, "WindowsFxVersion", &s.WindowsFxVersion) + delete(rawMsg, key) + case "xManagedServiceIdentityId": + err = unpopulate(val, "XManagedServiceIdentityID", &s.XManagedServiceIdentityID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigPropertiesDictionary. +func (s SiteConfigPropertiesDictionary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "javaVersion", s.JavaVersion) + populate(objectMap, "linuxFxVersion", s.LinuxFxVersion) + populate(objectMap, "powerShellVersion", s.PowerShellVersion) + populate(objectMap, "use32BitWorkerProcess", s.Use32BitWorkerProcess) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigPropertiesDictionary. +func (s *SiteConfigPropertiesDictionary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "javaVersion": + err = unpopulate(val, "JavaVersion", &s.JavaVersion) + delete(rawMsg, key) + case "linuxFxVersion": + err = unpopulate(val, "LinuxFxVersion", &s.LinuxFxVersion) + delete(rawMsg, key) + case "powerShellVersion": + err = unpopulate(val, "PowerShellVersion", &s.PowerShellVersion) + delete(rawMsg, key) + case "use32BitWorkerProcess": + err = unpopulate(val, "Use32BitWorkerProcess", &s.Use32BitWorkerProcess) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigResource. +func (s SiteConfigResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigResource. +func (s *SiteConfigResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigResourceCollection. +func (s SiteConfigResourceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigResourceCollection. +func (s *SiteConfigResourceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigurationSnapshotInfo. +func (s SiteConfigurationSnapshotInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigurationSnapshotInfo. +func (s *SiteConfigurationSnapshotInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigurationSnapshotInfoCollection. +func (s SiteConfigurationSnapshotInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigurationSnapshotInfoCollection. +func (s *SiteConfigurationSnapshotInfoCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteConfigurationSnapshotInfoProperties. +func (s SiteConfigurationSnapshotInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "snapshotId", s.SnapshotID) + populateDateTimeRFC3339(objectMap, "time", s.Time) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigurationSnapshotInfoProperties. +func (s *SiteConfigurationSnapshotInfoProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "snapshotId": + err = unpopulate(val, "SnapshotID", &s.SnapshotID) + delete(rawMsg, key) + case "time": + err = unpopulateDateTimeRFC3339(val, "Time", &s.Time) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteContainer. +func (s SiteContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteContainer. +func (s *SiteContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteContainerCollection. +func (s SiteContainerCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteContainerCollection. +func (s *SiteContainerCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteContainerProperties. +func (s SiteContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authType", s.AuthType) + populateDateTimeRFC3339(objectMap, "createdTime", s.CreatedTime) + populate(objectMap, "environmentVariables", s.EnvironmentVariables) + populate(objectMap, "image", s.Image) + populate(objectMap, "isMain", s.IsMain) + populateDateTimeRFC3339(objectMap, "lastModifiedTime", s.LastModifiedTime) + populate(objectMap, "passwordSecret", s.PasswordSecret) + populate(objectMap, "startUpCommand", s.StartUpCommand) + populate(objectMap, "targetPort", s.TargetPort) + populate(objectMap, "userManagedIdentityClientId", s.UserManagedIdentityClientID) + populate(objectMap, "userName", s.UserName) + populate(objectMap, "volumeMounts", s.VolumeMounts) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteContainerProperties. +func (s *SiteContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &s.AuthType) + delete(rawMsg, key) + case "createdTime": + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &s.CreatedTime) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &s.EnvironmentVariables) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &s.Image) + delete(rawMsg, key) + case "isMain": + err = unpopulate(val, "IsMain", &s.IsMain) + delete(rawMsg, key) + case "lastModifiedTime": + err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &s.LastModifiedTime) + delete(rawMsg, key) + case "passwordSecret": + err = unpopulate(val, "PasswordSecret", &s.PasswordSecret) + delete(rawMsg, key) + case "startUpCommand": + err = unpopulate(val, "StartUpCommand", &s.StartUpCommand) + delete(rawMsg, key) + case "targetPort": + err = unpopulate(val, "TargetPort", &s.TargetPort) + delete(rawMsg, key) + case "userManagedIdentityClientId": + err = unpopulate(val, "UserManagedIdentityClientID", &s.UserManagedIdentityClientID) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &s.UserName) + delete(rawMsg, key) + case "volumeMounts": + err = unpopulate(val, "VolumeMounts", &s.VolumeMounts) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteDNSConfig. +func (s SiteDNSConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dnsAltServer", s.DNSAltServer) + populate(objectMap, "dnsLegacySortOrder", s.DNSLegacySortOrder) + populate(objectMap, "dnsMaxCacheTimeout", s.DNSMaxCacheTimeout) + populate(objectMap, "dnsRetryAttemptCount", s.DNSRetryAttemptCount) + populate(objectMap, "dnsRetryAttemptTimeout", s.DNSRetryAttemptTimeout) + populate(objectMap, "dnsServers", s.DNSServers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteDNSConfig. +func (s *SiteDNSConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dnsAltServer": + err = unpopulate(val, "DNSAltServer", &s.DNSAltServer) + delete(rawMsg, key) + case "dnsLegacySortOrder": + err = unpopulate(val, "DNSLegacySortOrder", &s.DNSLegacySortOrder) + delete(rawMsg, key) + case "dnsMaxCacheTimeout": + err = unpopulate(val, "DNSMaxCacheTimeout", &s.DNSMaxCacheTimeout) + delete(rawMsg, key) + case "dnsRetryAttemptCount": + err = unpopulate(val, "DNSRetryAttemptCount", &s.DNSRetryAttemptCount) + delete(rawMsg, key) + case "dnsRetryAttemptTimeout": + err = unpopulate(val, "DNSRetryAttemptTimeout", &s.DNSRetryAttemptTimeout) + delete(rawMsg, key) + case "dnsServers": + err = unpopulate(val, "DNSServers", &s.DNSServers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteExtensionInfo. +func (s SiteExtensionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteExtensionInfo. +func (s *SiteExtensionInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteExtensionInfoCollection. +func (s SiteExtensionInfoCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteExtensionInfoCollection. +func (s *SiteExtensionInfoCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteExtensionInfoProperties. +func (s SiteExtensionInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authors", s.Authors) + populate(objectMap, "comment", s.Comment) + populate(objectMap, "description", s.Description) + populate(objectMap, "download_count", s.DownloadCount) + populate(objectMap, "extension_id", s.ExtensionID) + populate(objectMap, "extension_type", s.ExtensionType) + populate(objectMap, "extension_url", s.ExtensionURL) + populate(objectMap, "feed_url", s.FeedURL) + populate(objectMap, "icon_url", s.IconURL) + populateDateTimeRFC3339(objectMap, "installed_date_time", s.InstalledDateTime) + populate(objectMap, "installer_command_line_params", s.InstallerCommandLineParams) + populate(objectMap, "license_url", s.LicenseURL) + populate(objectMap, "local_is_latest_version", s.LocalIsLatestVersion) + populate(objectMap, "local_path", s.LocalPath) + populate(objectMap, "project_url", s.ProjectURL) + populate(objectMap, "provisioningState", s.ProvisioningState) + populateDateTimeRFC3339(objectMap, "published_date_time", s.PublishedDateTime) + populate(objectMap, "summary", s.Summary) + populate(objectMap, "title", s.Title) + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteExtensionInfoProperties. +func (s *SiteExtensionInfoProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authors": + err = unpopulate(val, "Authors", &s.Authors) + delete(rawMsg, key) + case "comment": + err = unpopulate(val, "Comment", &s.Comment) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "download_count": + err = unpopulate(val, "DownloadCount", &s.DownloadCount) + delete(rawMsg, key) + case "extension_id": + err = unpopulate(val, "ExtensionID", &s.ExtensionID) + delete(rawMsg, key) + case "extension_type": + err = unpopulate(val, "ExtensionType", &s.ExtensionType) + delete(rawMsg, key) + case "extension_url": + err = unpopulate(val, "ExtensionURL", &s.ExtensionURL) + delete(rawMsg, key) + case "feed_url": + err = unpopulate(val, "FeedURL", &s.FeedURL) + delete(rawMsg, key) + case "icon_url": + err = unpopulate(val, "IconURL", &s.IconURL) + delete(rawMsg, key) + case "installed_date_time": + err = unpopulateDateTimeRFC3339(val, "InstalledDateTime", &s.InstalledDateTime) + delete(rawMsg, key) + case "installer_command_line_params": + err = unpopulate(val, "InstallerCommandLineParams", &s.InstallerCommandLineParams) + delete(rawMsg, key) + case "license_url": + err = unpopulate(val, "LicenseURL", &s.LicenseURL) + delete(rawMsg, key) + case "local_is_latest_version": + err = unpopulate(val, "LocalIsLatestVersion", &s.LocalIsLatestVersion) + delete(rawMsg, key) + case "local_path": + err = unpopulate(val, "LocalPath", &s.LocalPath) + delete(rawMsg, key) + case "project_url": + err = unpopulate(val, "ProjectURL", &s.ProjectURL) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "published_date_time": + err = unpopulateDateTimeRFC3339(val, "PublishedDateTime", &s.PublishedDateTime) + delete(rawMsg, key) + case "summary": + err = unpopulate(val, "Summary", &s.Summary) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &s.Title) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteLimits. +func (s SiteLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxDiskSizeInMb", s.MaxDiskSizeInMb) + populate(objectMap, "maxMemoryInMb", s.MaxMemoryInMb) + populate(objectMap, "maxPercentageCpu", s.MaxPercentageCPU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteLimits. +func (s *SiteLimits) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxDiskSizeInMb": + err = unpopulate(val, "MaxDiskSizeInMb", &s.MaxDiskSizeInMb) + delete(rawMsg, key) + case "maxMemoryInMb": + err = unpopulate(val, "MaxMemoryInMb", &s.MaxMemoryInMb) + delete(rawMsg, key) + case "maxPercentageCpu": + err = unpopulate(val, "MaxPercentageCPU", &s.MaxPercentageCPU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteLogsConfig. +func (s SiteLogsConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteLogsConfig. +func (s *SiteLogsConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteLogsConfigProperties. +func (s SiteLogsConfigProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationLogs", s.ApplicationLogs) + populate(objectMap, "detailedErrorMessages", s.DetailedErrorMessages) + populate(objectMap, "failedRequestsTracing", s.FailedRequestsTracing) + populate(objectMap, "httpLogs", s.HTTPLogs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteLogsConfigProperties. +func (s *SiteLogsConfigProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationLogs": + err = unpopulate(val, "ApplicationLogs", &s.ApplicationLogs) + delete(rawMsg, key) + case "detailedErrorMessages": + err = unpopulate(val, "DetailedErrorMessages", &s.DetailedErrorMessages) + delete(rawMsg, key) + case "failedRequestsTracing": + err = unpopulate(val, "FailedRequestsTracing", &s.FailedRequestsTracing) + delete(rawMsg, key) + case "httpLogs": + err = unpopulate(val, "HTTPLogs", &s.HTTPLogs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteMachineKey. +func (s SiteMachineKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "decryption", s.Decryption) + populate(objectMap, "decryptionKey", s.DecryptionKey) + populate(objectMap, "validation", s.Validation) + populate(objectMap, "validationKey", s.ValidationKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteMachineKey. +func (s *SiteMachineKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "decryption": + err = unpopulate(val, "Decryption", &s.Decryption) + delete(rawMsg, key) + case "decryptionKey": + err = unpopulate(val, "DecryptionKey", &s.DecryptionKey) + delete(rawMsg, key) + case "validation": + err = unpopulate(val, "Validation", &s.Validation) + delete(rawMsg, key) + case "validationKey": + err = unpopulate(val, "ValidationKey", &s.ValidationKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SitePatchResource. +func (s SitePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SitePatchResource. +func (s *SitePatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SitePatchResourceProperties. +func (s SitePatchResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availabilityState", s.AvailabilityState) + populate(objectMap, "clientAffinityEnabled", s.ClientAffinityEnabled) + populate(objectMap, "clientCertEnabled", s.ClientCertEnabled) + populate(objectMap, "clientCertExclusionPaths", s.ClientCertExclusionPaths) + populate(objectMap, "clientCertMode", s.ClientCertMode) + populate(objectMap, "cloningInfo", s.CloningInfo) + populate(objectMap, "containerSize", s.ContainerSize) + populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) + populate(objectMap, "dnsConfiguration", s.DNSConfiguration) + populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) + populate(objectMap, "defaultHostName", s.DefaultHostName) + populate(objectMap, "enabled", s.Enabled) + populate(objectMap, "enabledHostNames", s.EnabledHostNames) + populate(objectMap, "httpsOnly", s.HTTPSOnly) + populate(objectMap, "hostNameSslStates", s.HostNameSSLStates) + populate(objectMap, "hostNames", s.HostNames) + populate(objectMap, "hostNamesDisabled", s.HostNamesDisabled) + populate(objectMap, "hostingEnvironmentProfile", s.HostingEnvironmentProfile) + populate(objectMap, "hyperV", s.HyperV) + populate(objectMap, "inProgressOperationId", s.InProgressOperationID) + populate(objectMap, "isDefaultContainer", s.IsDefaultContainer) + populate(objectMap, "isXenon", s.IsXenon) + populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) + populateDateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) + populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) + populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) + populate(objectMap, "possibleOutboundIpAddresses", s.PossibleOutboundIPAddresses) + populate(objectMap, "redundancyMode", s.RedundancyMode) + populate(objectMap, "repositorySiteName", s.RepositorySiteName) + populate(objectMap, "reserved", s.Reserved) + populate(objectMap, "resourceGroup", s.ResourceGroup) + populate(objectMap, "scmSiteAlsoStopped", s.ScmSiteAlsoStopped) + populate(objectMap, "serverFarmId", s.ServerFarmID) + populate(objectMap, "siteConfig", s.SiteConfig) + populate(objectMap, "slotSwapStatus", s.SlotSwapStatus) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountRequired", s.StorageAccountRequired) + populateDateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) + populate(objectMap, "targetSwapSlot", s.TargetSwapSlot) + populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) + populate(objectMap, "usageState", s.UsageState) + populate(objectMap, "virtualNetworkSubnetId", s.VirtualNetworkSubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SitePatchResourceProperties. +func (s *SitePatchResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availabilityState": + err = unpopulate(val, "AvailabilityState", &s.AvailabilityState) + delete(rawMsg, key) + case "clientAffinityEnabled": + err = unpopulate(val, "ClientAffinityEnabled", &s.ClientAffinityEnabled) + delete(rawMsg, key) + case "clientCertEnabled": + err = unpopulate(val, "ClientCertEnabled", &s.ClientCertEnabled) + delete(rawMsg, key) + case "clientCertExclusionPaths": + err = unpopulate(val, "ClientCertExclusionPaths", &s.ClientCertExclusionPaths) + delete(rawMsg, key) + case "clientCertMode": + err = unpopulate(val, "ClientCertMode", &s.ClientCertMode) + delete(rawMsg, key) + case "cloningInfo": + err = unpopulate(val, "CloningInfo", &s.CloningInfo) + delete(rawMsg, key) + case "containerSize": + err = unpopulate(val, "ContainerSize", &s.ContainerSize) + delete(rawMsg, key) + case "customDomainVerificationId": + err = unpopulate(val, "CustomDomainVerificationID", &s.CustomDomainVerificationID) + delete(rawMsg, key) + case "dnsConfiguration": + err = unpopulate(val, "DNSConfiguration", &s.DNSConfiguration) + delete(rawMsg, key) + case "dailyMemoryTimeQuota": + err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) + delete(rawMsg, key) + case "defaultHostName": + err = unpopulate(val, "DefaultHostName", &s.DefaultHostName) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "enabledHostNames": + err = unpopulate(val, "EnabledHostNames", &s.EnabledHostNames) + delete(rawMsg, key) + case "httpsOnly": + err = unpopulate(val, "HTTPSOnly", &s.HTTPSOnly) + delete(rawMsg, key) + case "hostNameSslStates": + err = unpopulate(val, "HostNameSSLStates", &s.HostNameSSLStates) + delete(rawMsg, key) + case "hostNames": + err = unpopulate(val, "HostNames", &s.HostNames) + delete(rawMsg, key) + case "hostNamesDisabled": + err = unpopulate(val, "HostNamesDisabled", &s.HostNamesDisabled) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &s.HostingEnvironmentProfile) + delete(rawMsg, key) + case "hyperV": + err = unpopulate(val, "HyperV", &s.HyperV) + delete(rawMsg, key) + case "inProgressOperationId": + err = unpopulate(val, "InProgressOperationID", &s.InProgressOperationID) + delete(rawMsg, key) + case "isDefaultContainer": + err = unpopulate(val, "IsDefaultContainer", &s.IsDefaultContainer) + delete(rawMsg, key) + case "isXenon": + err = unpopulate(val, "IsXenon", &s.IsXenon) + delete(rawMsg, key) + case "keyVaultReferenceIdentity": + err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) + delete(rawMsg, key) + case "lastModifiedTimeUtc": + err = unpopulateDateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) + delete(rawMsg, key) + case "maxNumberOfWorkers": + err = unpopulate(val, "MaxNumberOfWorkers", &s.MaxNumberOfWorkers) + delete(rawMsg, key) + case "outboundIpAddresses": + err = unpopulate(val, "OutboundIPAddresses", &s.OutboundIPAddresses) + delete(rawMsg, key) + case "possibleOutboundIpAddresses": + err = unpopulate(val, "PossibleOutboundIPAddresses", &s.PossibleOutboundIPAddresses) + delete(rawMsg, key) + case "redundancyMode": + err = unpopulate(val, "RedundancyMode", &s.RedundancyMode) + delete(rawMsg, key) + case "repositorySiteName": + err = unpopulate(val, "RepositorySiteName", &s.RepositorySiteName) + delete(rawMsg, key) + case "reserved": + err = unpopulate(val, "Reserved", &s.Reserved) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) + delete(rawMsg, key) + case "scmSiteAlsoStopped": + err = unpopulate(val, "ScmSiteAlsoStopped", &s.ScmSiteAlsoStopped) + delete(rawMsg, key) + case "serverFarmId": + err = unpopulate(val, "ServerFarmID", &s.ServerFarmID) + delete(rawMsg, key) + case "siteConfig": + err = unpopulate(val, "SiteConfig", &s.SiteConfig) + delete(rawMsg, key) + case "slotSwapStatus": + err = unpopulate(val, "SlotSwapStatus", &s.SlotSwapStatus) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountRequired": + err = unpopulate(val, "StorageAccountRequired", &s.StorageAccountRequired) + delete(rawMsg, key) + case "suspendedTill": + err = unpopulateDateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) + delete(rawMsg, key) + case "targetSwapSlot": + err = unpopulate(val, "TargetSwapSlot", &s.TargetSwapSlot) + delete(rawMsg, key) + case "trafficManagerHostNames": + err = unpopulate(val, "TrafficManagerHostNames", &s.TrafficManagerHostNames) + delete(rawMsg, key) + case "usageState": + err = unpopulate(val, "UsageState", &s.UsageState) + delete(rawMsg, key) + case "virtualNetworkSubnetId": + err = unpopulate(val, "VirtualNetworkSubnetID", &s.VirtualNetworkSubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SitePhpErrorLogFlag. +func (s SitePhpErrorLogFlag) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SitePhpErrorLogFlag. +func (s *SitePhpErrorLogFlag) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SitePhpErrorLogFlagProperties. +func (s SitePhpErrorLogFlagProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localLogErrors", s.LocalLogErrors) + populate(objectMap, "localLogErrorsMaxLength", s.LocalLogErrorsMaxLength) + populate(objectMap, "masterLogErrors", s.MasterLogErrors) + populate(objectMap, "masterLogErrorsMaxLength", s.MasterLogErrorsMaxLength) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SitePhpErrorLogFlagProperties. +func (s *SitePhpErrorLogFlagProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localLogErrors": + err = unpopulate(val, "LocalLogErrors", &s.LocalLogErrors) + delete(rawMsg, key) + case "localLogErrorsMaxLength": + err = unpopulate(val, "LocalLogErrorsMaxLength", &s.LocalLogErrorsMaxLength) + delete(rawMsg, key) + case "masterLogErrors": + err = unpopulate(val, "MasterLogErrors", &s.MasterLogErrors) + delete(rawMsg, key) + case "masterLogErrorsMaxLength": + err = unpopulate(val, "MasterLogErrorsMaxLength", &s.MasterLogErrorsMaxLength) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteProperties. +func (s SiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoGeneratedDomainNameLabelScope", s.AutoGeneratedDomainNameLabelScope) + populate(objectMap, "availabilityState", s.AvailabilityState) + populate(objectMap, "clientAffinityEnabled", s.ClientAffinityEnabled) + populate(objectMap, "clientCertEnabled", s.ClientCertEnabled) + populate(objectMap, "clientCertExclusionPaths", s.ClientCertExclusionPaths) + populate(objectMap, "clientCertMode", s.ClientCertMode) + populate(objectMap, "cloningInfo", s.CloningInfo) + populate(objectMap, "containerSize", s.ContainerSize) + populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) + populate(objectMap, "dnsConfiguration", s.DNSConfiguration) + populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) + populate(objectMap, "daprConfig", s.DaprConfig) + populate(objectMap, "defaultHostName", s.DefaultHostName) + populate(objectMap, "enabled", s.Enabled) + populate(objectMap, "enabledHostNames", s.EnabledHostNames) + populate(objectMap, "endToEndEncryptionEnabled", s.EndToEndEncryptionEnabled) + populate(objectMap, "functionAppConfig", s.FunctionAppConfig) + populate(objectMap, "httpsOnly", s.HTTPSOnly) + populate(objectMap, "hostNameSslStates", s.HostNameSSLStates) + populate(objectMap, "hostNames", s.HostNames) + populate(objectMap, "hostNamesDisabled", s.HostNamesDisabled) + populate(objectMap, "hostingEnvironmentProfile", s.HostingEnvironmentProfile) + populate(objectMap, "hyperV", s.HyperV) + populate(objectMap, "ipMode", s.IPMode) + populate(objectMap, "inProgressOperationId", s.InProgressOperationID) + populate(objectMap, "isDefaultContainer", s.IsDefaultContainer) + populate(objectMap, "isXenon", s.IsXenon) + populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) + populateDateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) + populate(objectMap, "managedEnvironmentId", s.ManagedEnvironmentID) + populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) + populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) + populate(objectMap, "possibleOutboundIpAddresses", s.PossibleOutboundIPAddresses) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + populate(objectMap, "redundancyMode", s.RedundancyMode) + populate(objectMap, "repositorySiteName", s.RepositorySiteName) + populate(objectMap, "reserved", s.Reserved) + populate(objectMap, "resourceConfig", s.ResourceConfig) + populate(objectMap, "resourceGroup", s.ResourceGroup) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "scmSiteAlsoStopped", s.ScmSiteAlsoStopped) + populate(objectMap, "serverFarmId", s.ServerFarmID) + populate(objectMap, "siteConfig", s.SiteConfig) + populate(objectMap, "slotSwapStatus", s.SlotSwapStatus) + populate(objectMap, "state", s.State) + populate(objectMap, "storageAccountRequired", s.StorageAccountRequired) + populateDateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) + populate(objectMap, "targetSwapSlot", s.TargetSwapSlot) + populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) + populate(objectMap, "usageState", s.UsageState) + populate(objectMap, "virtualNetworkSubnetId", s.VirtualNetworkSubnetID) + populate(objectMap, "vnetBackupRestoreEnabled", s.VnetBackupRestoreEnabled) + populate(objectMap, "vnetContentShareEnabled", s.VnetContentShareEnabled) + populate(objectMap, "vnetImagePullEnabled", s.VnetImagePullEnabled) + populate(objectMap, "vnetRouteAllEnabled", s.VnetRouteAllEnabled) + populate(objectMap, "workloadProfileName", s.WorkloadProfileName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteProperties. +func (s *SiteProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoGeneratedDomainNameLabelScope": + err = unpopulate(val, "AutoGeneratedDomainNameLabelScope", &s.AutoGeneratedDomainNameLabelScope) + delete(rawMsg, key) + case "availabilityState": + err = unpopulate(val, "AvailabilityState", &s.AvailabilityState) + delete(rawMsg, key) + case "clientAffinityEnabled": + err = unpopulate(val, "ClientAffinityEnabled", &s.ClientAffinityEnabled) + delete(rawMsg, key) + case "clientCertEnabled": + err = unpopulate(val, "ClientCertEnabled", &s.ClientCertEnabled) + delete(rawMsg, key) + case "clientCertExclusionPaths": + err = unpopulate(val, "ClientCertExclusionPaths", &s.ClientCertExclusionPaths) + delete(rawMsg, key) + case "clientCertMode": + err = unpopulate(val, "ClientCertMode", &s.ClientCertMode) + delete(rawMsg, key) + case "cloningInfo": + err = unpopulate(val, "CloningInfo", &s.CloningInfo) + delete(rawMsg, key) + case "containerSize": + err = unpopulate(val, "ContainerSize", &s.ContainerSize) + delete(rawMsg, key) + case "customDomainVerificationId": + err = unpopulate(val, "CustomDomainVerificationID", &s.CustomDomainVerificationID) + delete(rawMsg, key) + case "dnsConfiguration": + err = unpopulate(val, "DNSConfiguration", &s.DNSConfiguration) + delete(rawMsg, key) + case "dailyMemoryTimeQuota": + err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) + delete(rawMsg, key) + case "daprConfig": + err = unpopulate(val, "DaprConfig", &s.DaprConfig) + delete(rawMsg, key) + case "defaultHostName": + err = unpopulate(val, "DefaultHostName", &s.DefaultHostName) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "enabledHostNames": + err = unpopulate(val, "EnabledHostNames", &s.EnabledHostNames) + delete(rawMsg, key) + case "endToEndEncryptionEnabled": + err = unpopulate(val, "EndToEndEncryptionEnabled", &s.EndToEndEncryptionEnabled) + delete(rawMsg, key) + case "functionAppConfig": + err = unpopulate(val, "FunctionAppConfig", &s.FunctionAppConfig) + delete(rawMsg, key) + case "httpsOnly": + err = unpopulate(val, "HTTPSOnly", &s.HTTPSOnly) + delete(rawMsg, key) + case "hostNameSslStates": + err = unpopulate(val, "HostNameSSLStates", &s.HostNameSSLStates) + delete(rawMsg, key) + case "hostNames": + err = unpopulate(val, "HostNames", &s.HostNames) + delete(rawMsg, key) + case "hostNamesDisabled": + err = unpopulate(val, "HostNamesDisabled", &s.HostNamesDisabled) + delete(rawMsg, key) + case "hostingEnvironmentProfile": + err = unpopulate(val, "HostingEnvironmentProfile", &s.HostingEnvironmentProfile) + delete(rawMsg, key) + case "hyperV": + err = unpopulate(val, "HyperV", &s.HyperV) + delete(rawMsg, key) + case "ipMode": + err = unpopulate(val, "IPMode", &s.IPMode) + delete(rawMsg, key) + case "inProgressOperationId": + err = unpopulate(val, "InProgressOperationID", &s.InProgressOperationID) + delete(rawMsg, key) + case "isDefaultContainer": + err = unpopulate(val, "IsDefaultContainer", &s.IsDefaultContainer) + delete(rawMsg, key) + case "isXenon": + err = unpopulate(val, "IsXenon", &s.IsXenon) + delete(rawMsg, key) + case "keyVaultReferenceIdentity": + err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) + delete(rawMsg, key) + case "lastModifiedTimeUtc": + err = unpopulateDateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) + delete(rawMsg, key) + case "managedEnvironmentId": + err = unpopulate(val, "ManagedEnvironmentID", &s.ManagedEnvironmentID) + delete(rawMsg, key) + case "maxNumberOfWorkers": + err = unpopulate(val, "MaxNumberOfWorkers", &s.MaxNumberOfWorkers) + delete(rawMsg, key) + case "outboundIpAddresses": + err = unpopulate(val, "OutboundIPAddresses", &s.OutboundIPAddresses) + delete(rawMsg, key) + case "possibleOutboundIpAddresses": + err = unpopulate(val, "PossibleOutboundIPAddresses", &s.PossibleOutboundIPAddresses) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + case "redundancyMode": + err = unpopulate(val, "RedundancyMode", &s.RedundancyMode) + delete(rawMsg, key) + case "repositorySiteName": + err = unpopulate(val, "RepositorySiteName", &s.RepositorySiteName) + delete(rawMsg, key) + case "reserved": + err = unpopulate(val, "Reserved", &s.Reserved) + delete(rawMsg, key) + case "resourceConfig": + err = unpopulate(val, "ResourceConfig", &s.ResourceConfig) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "scmSiteAlsoStopped": + err = unpopulate(val, "ScmSiteAlsoStopped", &s.ScmSiteAlsoStopped) + delete(rawMsg, key) + case "serverFarmId": + err = unpopulate(val, "ServerFarmID", &s.ServerFarmID) + delete(rawMsg, key) + case "siteConfig": + err = unpopulate(val, "SiteConfig", &s.SiteConfig) + delete(rawMsg, key) + case "slotSwapStatus": + err = unpopulate(val, "SlotSwapStatus", &s.SlotSwapStatus) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "storageAccountRequired": + err = unpopulate(val, "StorageAccountRequired", &s.StorageAccountRequired) + delete(rawMsg, key) + case "suspendedTill": + err = unpopulateDateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) + delete(rawMsg, key) + case "targetSwapSlot": + err = unpopulate(val, "TargetSwapSlot", &s.TargetSwapSlot) + delete(rawMsg, key) + case "trafficManagerHostNames": + err = unpopulate(val, "TrafficManagerHostNames", &s.TrafficManagerHostNames) + delete(rawMsg, key) + case "usageState": + err = unpopulate(val, "UsageState", &s.UsageState) + delete(rawMsg, key) + case "virtualNetworkSubnetId": + err = unpopulate(val, "VirtualNetworkSubnetID", &s.VirtualNetworkSubnetID) + delete(rawMsg, key) + case "vnetBackupRestoreEnabled": + err = unpopulate(val, "VnetBackupRestoreEnabled", &s.VnetBackupRestoreEnabled) + delete(rawMsg, key) + case "vnetContentShareEnabled": + err = unpopulate(val, "VnetContentShareEnabled", &s.VnetContentShareEnabled) + delete(rawMsg, key) + case "vnetImagePullEnabled": + err = unpopulate(val, "VnetImagePullEnabled", &s.VnetImagePullEnabled) + delete(rawMsg, key) + case "vnetRouteAllEnabled": + err = unpopulate(val, "VnetRouteAllEnabled", &s.VnetRouteAllEnabled) + delete(rawMsg, key) + case "workloadProfileName": + err = unpopulate(val, "WorkloadProfileName", &s.WorkloadProfileName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteSeal. +func (s SiteSeal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "html", s.HTML) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteSeal. +func (s *SiteSeal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "html": + err = unpopulate(val, "HTML", &s.HTML) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteSealRequest. +func (s SiteSealRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "lightTheme", s.LightTheme) + populate(objectMap, "locale", s.Locale) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteSealRequest. +func (s *SiteSealRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lightTheme": + err = unpopulate(val, "LightTheme", &s.LightTheme) + delete(rawMsg, key) + case "locale": + err = unpopulate(val, "Locale", &s.Locale) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteSourceControl. +func (s SiteSourceControl) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteSourceControl. +func (s *SiteSourceControl) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SiteSourceControlProperties. +func (s SiteSourceControlProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "branch", s.Branch) + populate(objectMap, "deploymentRollbackEnabled", s.DeploymentRollbackEnabled) + populate(objectMap, "gitHubActionConfiguration", s.GitHubActionConfiguration) + populate(objectMap, "isGitHubAction", s.IsGitHubAction) + populate(objectMap, "isManualIntegration", s.IsManualIntegration) + populate(objectMap, "isMercurial", s.IsMercurial) + populate(objectMap, "repoUrl", s.RepoURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SiteSourceControlProperties. +func (s *SiteSourceControlProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "branch": + err = unpopulate(val, "Branch", &s.Branch) + delete(rawMsg, key) + case "deploymentRollbackEnabled": + err = unpopulate(val, "DeploymentRollbackEnabled", &s.DeploymentRollbackEnabled) + delete(rawMsg, key) + case "gitHubActionConfiguration": + err = unpopulate(val, "GitHubActionConfiguration", &s.GitHubActionConfiguration) + delete(rawMsg, key) + case "isGitHubAction": + err = unpopulate(val, "IsGitHubAction", &s.IsGitHubAction) + delete(rawMsg, key) + case "isManualIntegration": + err = unpopulate(val, "IsManualIntegration", &s.IsManualIntegration) + delete(rawMsg, key) + case "isMercurial": + err = unpopulate(val, "IsMercurial", &s.IsMercurial) + delete(rawMsg, key) + case "repoUrl": + err = unpopulate(val, "RepoURL", &s.RepoURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotConfigNames. +func (s SlotConfigNames) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appSettingNames", s.AppSettingNames) + populate(objectMap, "azureStorageConfigNames", s.AzureStorageConfigNames) + populate(objectMap, "connectionStringNames", s.ConnectionStringNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotConfigNames. +func (s *SlotConfigNames) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appSettingNames": + err = unpopulate(val, "AppSettingNames", &s.AppSettingNames) + delete(rawMsg, key) + case "azureStorageConfigNames": + err = unpopulate(val, "AzureStorageConfigNames", &s.AzureStorageConfigNames) + delete(rawMsg, key) + case "connectionStringNames": + err = unpopulate(val, "ConnectionStringNames", &s.ConnectionStringNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotConfigNamesResource. +func (s SlotConfigNamesResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotConfigNamesResource. +func (s *SlotConfigNamesResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotDifference. +func (s SlotDifference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotDifference. +func (s *SlotDifference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotDifferenceCollection. +func (s SlotDifferenceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotDifferenceCollection. +func (s *SlotDifferenceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotDifferenceProperties. +func (s SlotDifferenceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "diffRule", s.DiffRule) + populate(objectMap, "level", s.Level) + populate(objectMap, "settingName", s.SettingName) + populate(objectMap, "settingType", s.SettingType) + populate(objectMap, "valueInCurrentSlot", s.ValueInCurrentSlot) + populate(objectMap, "valueInTargetSlot", s.ValueInTargetSlot) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotDifferenceProperties. +func (s *SlotDifferenceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "diffRule": + err = unpopulate(val, "DiffRule", &s.DiffRule) + delete(rawMsg, key) + case "level": + err = unpopulate(val, "Level", &s.Level) + delete(rawMsg, key) + case "settingName": + err = unpopulate(val, "SettingName", &s.SettingName) + delete(rawMsg, key) + case "settingType": + err = unpopulate(val, "SettingType", &s.SettingType) + delete(rawMsg, key) + case "valueInCurrentSlot": + err = unpopulate(val, "ValueInCurrentSlot", &s.ValueInCurrentSlot) + delete(rawMsg, key) + case "valueInTargetSlot": + err = unpopulate(val, "ValueInTargetSlot", &s.ValueInTargetSlot) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlotSwapStatus. +func (s SlotSwapStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationSlotName", s.DestinationSlotName) + populate(objectMap, "sourceSlotName", s.SourceSlotName) + populateDateTimeRFC3339(objectMap, "timestampUtc", s.TimestampUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlotSwapStatus. +func (s *SlotSwapStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationSlotName": + err = unpopulate(val, "DestinationSlotName", &s.DestinationSlotName) + delete(rawMsg, key) + case "sourceSlotName": + err = unpopulate(val, "SourceSlotName", &s.SourceSlotName) + delete(rawMsg, key) + case "timestampUtc": + err = unpopulateDateTimeRFC3339(val, "TimestampUTC", &s.TimestampUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SlowRequestsBasedTrigger. +func (s SlowRequestsBasedTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", s.Count) + populate(objectMap, "path", s.Path) + populate(objectMap, "timeInterval", s.TimeInterval) + populate(objectMap, "timeTaken", s.TimeTaken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SlowRequestsBasedTrigger. +func (s *SlowRequestsBasedTrigger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &s.Count) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "timeInterval": + err = unpopulate(val, "TimeInterval", &s.TimeInterval) + delete(rawMsg, key) + case "timeTaken": + err = unpopulate(val, "TimeTaken", &s.TimeTaken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Snapshot. +func (s Snapshot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Snapshot. +func (s *Snapshot) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotCollection. +func (s SnapshotCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotCollection. +func (s *SnapshotCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotProperties. +func (s SnapshotProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "time", s.Time) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotProperties. +func (s *SnapshotProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "time": + err = unpopulate(val, "Time", &s.Time) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotRecoverySource. +func (s SnapshotRecoverySource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotRecoverySource. +func (s *SnapshotRecoverySource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotRestoreRequest. +func (s SnapshotRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotRestoreRequest. +func (s *SnapshotRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotRestoreRequestProperties. +func (s SnapshotRestoreRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ignoreConflictingHostNames", s.IgnoreConflictingHostNames) + populate(objectMap, "overwrite", s.Overwrite) + populate(objectMap, "recoverConfiguration", s.RecoverConfiguration) + populate(objectMap, "recoverySource", s.RecoverySource) + populate(objectMap, "snapshotTime", s.SnapshotTime) + populate(objectMap, "useDRSecondary", s.UseDRSecondary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotRestoreRequestProperties. +func (s *SnapshotRestoreRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ignoreConflictingHostNames": + err = unpopulate(val, "IgnoreConflictingHostNames", &s.IgnoreConflictingHostNames) + delete(rawMsg, key) + case "overwrite": + err = unpopulate(val, "Overwrite", &s.Overwrite) + delete(rawMsg, key) + case "recoverConfiguration": + err = unpopulate(val, "RecoverConfiguration", &s.RecoverConfiguration) + delete(rawMsg, key) + case "recoverySource": + err = unpopulate(val, "RecoverySource", &s.RecoverySource) + delete(rawMsg, key) + case "snapshotTime": + err = unpopulate(val, "SnapshotTime", &s.SnapshotTime) + delete(rawMsg, key) + case "useDRSecondary": + err = unpopulate(val, "UseDRSecondary", &s.UseDRSecondary) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Solution. +func (s Solution) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", s.Data) + populate(objectMap, "description", s.Description) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "id", s.ID) + populate(objectMap, "metadata", s.Metadata) + populate(objectMap, "order", s.Order) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Solution. +func (s *Solution) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &s.Data) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &s.Metadata) + delete(rawMsg, key) + case "order": + err = unpopulate(val, "Order", &s.Order) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SourceControl. +func (s SourceControl) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SourceControl. +func (s *SourceControl) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SourceControlCollection. +func (s SourceControlCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SourceControlCollection. +func (s *SourceControlCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SourceControlProperties. +func (s SourceControlProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expirationTime", s.ExpirationTime) + populate(objectMap, "refreshToken", s.RefreshToken) + populate(objectMap, "token", s.Token) + populate(objectMap, "tokenSecret", s.TokenSecret) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SourceControlProperties. +func (s *SourceControlProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expirationTime": + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &s.ExpirationTime) + delete(rawMsg, key) + case "refreshToken": + err = unpopulate(val, "RefreshToken", &s.RefreshToken) + delete(rawMsg, key) + case "token": + err = unpopulate(val, "Token", &s.Token) + delete(rawMsg, key) + case "tokenSecret": + err = unpopulate(val, "TokenSecret", &s.TokenSecret) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StackMajorVersion. +func (s StackMajorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appSettingsDictionary", s.AppSettingsDictionary) + populate(objectMap, "applicationInsights", s.ApplicationInsights) + populate(objectMap, "displayVersion", s.DisplayVersion) + populate(objectMap, "isDefault", s.IsDefault) + populate(objectMap, "isDeprecated", s.IsDeprecated) + populate(objectMap, "isHidden", s.IsHidden) + populate(objectMap, "isPreview", s.IsPreview) + populate(objectMap, "minorVersions", s.MinorVersions) + populate(objectMap, "runtimeVersion", s.RuntimeVersion) + populate(objectMap, "siteConfigPropertiesDictionary", s.SiteConfigPropertiesDictionary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StackMajorVersion. +func (s *StackMajorVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appSettingsDictionary": + err = unpopulate(val, "AppSettingsDictionary", &s.AppSettingsDictionary) + delete(rawMsg, key) + case "applicationInsights": + err = unpopulate(val, "ApplicationInsights", &s.ApplicationInsights) + delete(rawMsg, key) + case "displayVersion": + err = unpopulate(val, "DisplayVersion", &s.DisplayVersion) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &s.IsDefault) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &s.IsDeprecated) + delete(rawMsg, key) + case "isHidden": + err = unpopulate(val, "IsHidden", &s.IsHidden) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &s.IsPreview) + delete(rawMsg, key) + case "minorVersions": + err = unpopulate(val, "MinorVersions", &s.MinorVersions) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) + delete(rawMsg, key) + case "siteConfigPropertiesDictionary": + err = unpopulate(val, "SiteConfigPropertiesDictionary", &s.SiteConfigPropertiesDictionary) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StackMinorVersion. +func (s StackMinorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayVersion", s.DisplayVersion) + populate(objectMap, "isDefault", s.IsDefault) + populate(objectMap, "isRemoteDebuggingEnabled", s.IsRemoteDebuggingEnabled) + populate(objectMap, "runtimeVersion", s.RuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StackMinorVersion. +func (s *StackMinorVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayVersion": + err = unpopulate(val, "DisplayVersion", &s.DisplayVersion) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &s.IsDefault) + delete(rawMsg, key) + case "isRemoteDebuggingEnabled": + err = unpopulate(val, "IsRemoteDebuggingEnabled", &s.IsRemoteDebuggingEnabled) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StampCapacity. +func (s StampCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableCapacity", s.AvailableCapacity) + populate(objectMap, "computeMode", s.ComputeMode) + populate(objectMap, "excludeFromCapacityAllocation", s.ExcludeFromCapacityAllocation) + populate(objectMap, "isApplicableForAllComputeModes", s.IsApplicableForAllComputeModes) + populate(objectMap, "isLinux", s.IsLinux) + populate(objectMap, "name", s.Name) + populate(objectMap, "siteMode", s.SiteMode) + populate(objectMap, "totalCapacity", s.TotalCapacity) + populate(objectMap, "unit", s.Unit) + populate(objectMap, "workerSize", s.WorkerSize) + populate(objectMap, "workerSizeId", s.WorkerSizeID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StampCapacity. +func (s *StampCapacity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableCapacity": + err = unpopulate(val, "AvailableCapacity", &s.AvailableCapacity) + delete(rawMsg, key) + case "computeMode": + err = unpopulate(val, "ComputeMode", &s.ComputeMode) + delete(rawMsg, key) + case "excludeFromCapacityAllocation": + err = unpopulate(val, "ExcludeFromCapacityAllocation", &s.ExcludeFromCapacityAllocation) + delete(rawMsg, key) + case "isApplicableForAllComputeModes": + err = unpopulate(val, "IsApplicableForAllComputeModes", &s.IsApplicableForAllComputeModes) + delete(rawMsg, key) + case "isLinux": + err = unpopulate(val, "IsLinux", &s.IsLinux) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "siteMode": + err = unpopulate(val, "SiteMode", &s.SiteMode) + delete(rawMsg, key) + case "totalCapacity": + err = unpopulate(val, "TotalCapacity", &s.TotalCapacity) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &s.Unit) + delete(rawMsg, key) + case "workerSize": + err = unpopulate(val, "WorkerSize", &s.WorkerSize) + delete(rawMsg, key) + case "workerSizeId": + err = unpopulate(val, "WorkerSizeID", &s.WorkerSizeID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StampCapacityCollection. +func (s StampCapacityCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StampCapacityCollection. +func (s *StampCapacityCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSite. +func (s StaticSite) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowConfigFileUpdates", s.AllowConfigFileUpdates) + populate(objectMap, "branch", s.Branch) + populate(objectMap, "buildProperties", s.BuildProperties) + populate(objectMap, "contentDistributionEndpoint", s.ContentDistributionEndpoint) + populate(objectMap, "customDomains", s.CustomDomains) + populate(objectMap, "databaseConnections", s.DatabaseConnections) + populate(objectMap, "defaultHostname", s.DefaultHostname) + populate(objectMap, "enterpriseGradeCdnStatus", s.EnterpriseGradeCdnStatus) + populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) + populate(objectMap, "linkedBackends", s.LinkedBackends) + populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) + populate(objectMap, "provider", s.Provider) + populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) + populate(objectMap, "repositoryToken", s.RepositoryToken) + populate(objectMap, "repositoryUrl", s.RepositoryURL) + populate(objectMap, "stagingEnvironmentPolicy", s.StagingEnvironmentPolicy) + populate(objectMap, "templateProperties", s.TemplateProperties) + populate(objectMap, "userProvidedFunctionApps", s.UserProvidedFunctionApps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSite. +func (s *StaticSite) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowConfigFileUpdates": + err = unpopulate(val, "AllowConfigFileUpdates", &s.AllowConfigFileUpdates) + delete(rawMsg, key) + case "branch": + err = unpopulate(val, "Branch", &s.Branch) + delete(rawMsg, key) + case "buildProperties": + err = unpopulate(val, "BuildProperties", &s.BuildProperties) + delete(rawMsg, key) + case "contentDistributionEndpoint": + err = unpopulate(val, "ContentDistributionEndpoint", &s.ContentDistributionEndpoint) + delete(rawMsg, key) + case "customDomains": + err = unpopulate(val, "CustomDomains", &s.CustomDomains) + delete(rawMsg, key) + case "databaseConnections": + err = unpopulate(val, "DatabaseConnections", &s.DatabaseConnections) + delete(rawMsg, key) + case "defaultHostname": + err = unpopulate(val, "DefaultHostname", &s.DefaultHostname) + delete(rawMsg, key) + case "enterpriseGradeCdnStatus": + err = unpopulate(val, "EnterpriseGradeCdnStatus", &s.EnterpriseGradeCdnStatus) + delete(rawMsg, key) + case "keyVaultReferenceIdentity": + err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) + delete(rawMsg, key) + case "linkedBackends": + err = unpopulate(val, "LinkedBackends", &s.LinkedBackends) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &s.PrivateEndpointConnections) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &s.Provider) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) + delete(rawMsg, key) + case "repositoryToken": + err = unpopulate(val, "RepositoryToken", &s.RepositoryToken) + delete(rawMsg, key) + case "repositoryUrl": + err = unpopulate(val, "RepositoryURL", &s.RepositoryURL) + delete(rawMsg, key) + case "stagingEnvironmentPolicy": + err = unpopulate(val, "StagingEnvironmentPolicy", &s.StagingEnvironmentPolicy) + delete(rawMsg, key) + case "templateProperties": + err = unpopulate(val, "TemplateProperties", &s.TemplateProperties) + delete(rawMsg, key) + case "userProvidedFunctionApps": + err = unpopulate(val, "UserProvidedFunctionApps", &s.UserProvidedFunctionApps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteARMResource. +func (s StaticSiteARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteARMResource. +func (s *StaticSiteARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBasicAuthPropertiesARMResource. +func (s StaticSiteBasicAuthPropertiesARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBasicAuthPropertiesARMResource. +func (s *StaticSiteBasicAuthPropertiesARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBasicAuthPropertiesARMResourceProperties. +func (s StaticSiteBasicAuthPropertiesARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicableEnvironmentsMode", s.ApplicableEnvironmentsMode) + populate(objectMap, "environments", s.Environments) + populate(objectMap, "password", s.Password) + populate(objectMap, "secretState", s.SecretState) + populate(objectMap, "secretUrl", s.SecretURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBasicAuthPropertiesARMResourceProperties. +func (s *StaticSiteBasicAuthPropertiesARMResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicableEnvironmentsMode": + err = unpopulate(val, "ApplicableEnvironmentsMode", &s.ApplicableEnvironmentsMode) + delete(rawMsg, key) + case "environments": + err = unpopulate(val, "Environments", &s.Environments) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &s.Password) + delete(rawMsg, key) + case "secretState": + err = unpopulate(val, "SecretState", &s.SecretState) + delete(rawMsg, key) + case "secretUrl": + err = unpopulate(val, "SecretURL", &s.SecretURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBasicAuthPropertiesCollection. +func (s StaticSiteBasicAuthPropertiesCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBasicAuthPropertiesCollection. +func (s *StaticSiteBasicAuthPropertiesCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBuildARMResource. +func (s StaticSiteBuildARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBuildARMResource. +func (s *StaticSiteBuildARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBuildARMResourceProperties. +func (s StaticSiteBuildARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "buildId", s.BuildID) + populateDateTimeRFC3339(objectMap, "createdTimeUtc", s.CreatedTimeUTC) + populate(objectMap, "databaseConnections", s.DatabaseConnections) + populate(objectMap, "hostname", s.Hostname) + populateDateTimeRFC3339(objectMap, "lastUpdatedOn", s.LastUpdatedOn) + populate(objectMap, "linkedBackends", s.LinkedBackends) + populate(objectMap, "pullRequestTitle", s.PullRequestTitle) + populate(objectMap, "sourceBranch", s.SourceBranch) + populate(objectMap, "status", s.Status) + populate(objectMap, "userProvidedFunctionApps", s.UserProvidedFunctionApps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBuildARMResourceProperties. +func (s *StaticSiteBuildARMResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "buildId": + err = unpopulate(val, "BuildID", &s.BuildID) + delete(rawMsg, key) + case "createdTimeUtc": + err = unpopulateDateTimeRFC3339(val, "CreatedTimeUTC", &s.CreatedTimeUTC) + delete(rawMsg, key) + case "databaseConnections": + err = unpopulate(val, "DatabaseConnections", &s.DatabaseConnections) + delete(rawMsg, key) + case "hostname": + err = unpopulate(val, "Hostname", &s.Hostname) + delete(rawMsg, key) + case "lastUpdatedOn": + err = unpopulateDateTimeRFC3339(val, "LastUpdatedOn", &s.LastUpdatedOn) + delete(rawMsg, key) + case "linkedBackends": + err = unpopulate(val, "LinkedBackends", &s.LinkedBackends) + delete(rawMsg, key) + case "pullRequestTitle": + err = unpopulate(val, "PullRequestTitle", &s.PullRequestTitle) + delete(rawMsg, key) + case "sourceBranch": + err = unpopulate(val, "SourceBranch", &s.SourceBranch) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "userProvidedFunctionApps": + err = unpopulate(val, "UserProvidedFunctionApps", &s.UserProvidedFunctionApps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBuildCollection. +func (s StaticSiteBuildCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBuildCollection. +func (s *StaticSiteBuildCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteBuildProperties. +func (s StaticSiteBuildProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiBuildCommand", s.APIBuildCommand) + populate(objectMap, "apiLocation", s.APILocation) + populate(objectMap, "appArtifactLocation", s.AppArtifactLocation) + populate(objectMap, "appBuildCommand", s.AppBuildCommand) + populate(objectMap, "appLocation", s.AppLocation) + populate(objectMap, "githubActionSecretNameOverride", s.GithubActionSecretNameOverride) + populate(objectMap, "outputLocation", s.OutputLocation) + populate(objectMap, "skipGithubActionWorkflowGeneration", s.SkipGithubActionWorkflowGeneration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBuildProperties. +func (s *StaticSiteBuildProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiBuildCommand": + err = unpopulate(val, "APIBuildCommand", &s.APIBuildCommand) + delete(rawMsg, key) + case "apiLocation": + err = unpopulate(val, "APILocation", &s.APILocation) + delete(rawMsg, key) + case "appArtifactLocation": + err = unpopulate(val, "AppArtifactLocation", &s.AppArtifactLocation) + delete(rawMsg, key) + case "appBuildCommand": + err = unpopulate(val, "AppBuildCommand", &s.AppBuildCommand) + delete(rawMsg, key) + case "appLocation": + err = unpopulate(val, "AppLocation", &s.AppLocation) + delete(rawMsg, key) + case "githubActionSecretNameOverride": + err = unpopulate(val, "GithubActionSecretNameOverride", &s.GithubActionSecretNameOverride) + delete(rawMsg, key) + case "outputLocation": + err = unpopulate(val, "OutputLocation", &s.OutputLocation) + delete(rawMsg, key) + case "skipGithubActionWorkflowGeneration": + err = unpopulate(val, "SkipGithubActionWorkflowGeneration", &s.SkipGithubActionWorkflowGeneration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCollection. +func (s StaticSiteCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCollection. +func (s *StaticSiteCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainOverviewARMResource. +func (s StaticSiteCustomDomainOverviewARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainOverviewARMResource. +func (s *StaticSiteCustomDomainOverviewARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainOverviewARMResourceProperties. +func (s StaticSiteCustomDomainOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "domainName", s.DomainName) + populate(objectMap, "errorMessage", s.ErrorMessage) + populate(objectMap, "status", s.Status) + populate(objectMap, "validationToken", s.ValidationToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainOverviewARMResourceProperties. +func (s *StaticSiteCustomDomainOverviewARMResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdOn": + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "domainName": + err = unpopulate(val, "DomainName", &s.DomainName) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &s.ErrorMessage) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "validationToken": + err = unpopulate(val, "ValidationToken", &s.ValidationToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainOverviewCollection. +func (s StaticSiteCustomDomainOverviewCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainOverviewCollection. +func (s *StaticSiteCustomDomainOverviewCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainRequestPropertiesARMResource. +func (s StaticSiteCustomDomainRequestPropertiesARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainRequestPropertiesARMResource. +func (s *StaticSiteCustomDomainRequestPropertiesARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainRequestPropertiesARMResourceProperties. +func (s StaticSiteCustomDomainRequestPropertiesARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "validationMethod", s.ValidationMethod) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainRequestPropertiesARMResourceProperties. +func (s *StaticSiteCustomDomainRequestPropertiesARMResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "validationMethod": + err = unpopulate(val, "ValidationMethod", &s.ValidationMethod) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteDatabaseConnectionConfigurationFileOverview. +func (s StaticSiteDatabaseConnectionConfigurationFileOverview) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contents", s.Contents) + populate(objectMap, "fileName", s.FileName) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteDatabaseConnectionConfigurationFileOverview. +func (s *StaticSiteDatabaseConnectionConfigurationFileOverview) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contents": + err = unpopulate(val, "Contents", &s.Contents) + delete(rawMsg, key) + case "fileName": + err = unpopulate(val, "FileName", &s.FileName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteFunctionOverviewARMResource. +func (s StaticSiteFunctionOverviewARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteFunctionOverviewARMResource. +func (s *StaticSiteFunctionOverviewARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteFunctionOverviewARMResourceProperties. +func (s StaticSiteFunctionOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "functionName", s.FunctionName) + populate(objectMap, "triggerType", s.TriggerType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteFunctionOverviewARMResourceProperties. +func (s *StaticSiteFunctionOverviewARMResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "functionName": + err = unpopulate(val, "FunctionName", &s.FunctionName) + delete(rawMsg, key) + case "triggerType": + err = unpopulate(val, "TriggerType", &s.TriggerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteFunctionOverviewCollection. +func (s StaticSiteFunctionOverviewCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteFunctionOverviewCollection. +func (s *StaticSiteFunctionOverviewCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteLinkedBackend. +func (s StaticSiteLinkedBackend) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendResourceId", s.BackendResourceID) + populateDateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "region", s.Region) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteLinkedBackend. +func (s *StaticSiteLinkedBackend) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendResourceId": + err = unpopulate(val, "BackendResourceID", &s.BackendResourceID) + delete(rawMsg, key) + case "createdOn": + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &s.Region) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteLinkedBackendARMResource. +func (s StaticSiteLinkedBackendARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteLinkedBackendARMResource. +func (s *StaticSiteLinkedBackendARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteLinkedBackendARMResourceProperties. +func (s StaticSiteLinkedBackendARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendResourceId", s.BackendResourceID) + populateDateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "region", s.Region) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteLinkedBackendARMResourceProperties. +func (s *StaticSiteLinkedBackendARMResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendResourceId": + err = unpopulate(val, "BackendResourceID", &s.BackendResourceID) + delete(rawMsg, key) + case "createdOn": + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &s.Region) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteLinkedBackendsCollection. +func (s StaticSiteLinkedBackendsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteLinkedBackendsCollection. +func (s *StaticSiteLinkedBackendsCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSitePatchResource. +func (s StaticSitePatchResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitePatchResource. +func (s *StaticSitePatchResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteResetPropertiesARMResource. +func (s StaticSiteResetPropertiesARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteResetPropertiesARMResource. +func (s *StaticSiteResetPropertiesARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteResetPropertiesARMResourceProperties. +func (s StaticSiteResetPropertiesARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "repositoryToken", s.RepositoryToken) + populate(objectMap, "shouldUpdateRepository", s.ShouldUpdateRepository) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteResetPropertiesARMResourceProperties. +func (s *StaticSiteResetPropertiesARMResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "repositoryToken": + err = unpopulate(val, "RepositoryToken", &s.RepositoryToken) + delete(rawMsg, key) + case "shouldUpdateRepository": + err = unpopulate(val, "ShouldUpdateRepository", &s.ShouldUpdateRepository) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteTemplateOptions. +func (s StaticSiteTemplateOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "isPrivate", s.IsPrivate) + populate(objectMap, "owner", s.Owner) + populate(objectMap, "repositoryName", s.RepositoryName) + populate(objectMap, "templateRepositoryUrl", s.TemplateRepositoryURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteTemplateOptions. +func (s *StaticSiteTemplateOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "isPrivate": + err = unpopulate(val, "IsPrivate", &s.IsPrivate) + delete(rawMsg, key) + case "owner": + err = unpopulate(val, "Owner", &s.Owner) + delete(rawMsg, key) + case "repositoryName": + err = unpopulate(val, "RepositoryName", &s.RepositoryName) + delete(rawMsg, key) + case "templateRepositoryUrl": + err = unpopulate(val, "TemplateRepositoryURL", &s.TemplateRepositoryURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserARMResource. +func (s StaticSiteUserARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserARMResource. +func (s *StaticSiteUserARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserARMResourceProperties. +func (s StaticSiteUserARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "provider", s.Provider) + populate(objectMap, "roles", s.Roles) + populate(objectMap, "userId", s.UserID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserARMResourceProperties. +func (s *StaticSiteUserARMResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &s.Provider) + delete(rawMsg, key) + case "roles": + err = unpopulate(val, "Roles", &s.Roles) + delete(rawMsg, key) + case "userId": + err = unpopulate(val, "UserID", &s.UserID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserCollection. +func (s StaticSiteUserCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserCollection. +func (s *StaticSiteUserCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationRequestResource. +func (s StaticSiteUserInvitationRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserInvitationRequestResource. +func (s *StaticSiteUserInvitationRequestResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationRequestResourceProperties. +func (s StaticSiteUserInvitationRequestResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "domain", s.Domain) + populate(objectMap, "numHoursToExpiration", s.NumHoursToExpiration) + populate(objectMap, "provider", s.Provider) + populate(objectMap, "roles", s.Roles) + populate(objectMap, "userDetails", s.UserDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserInvitationRequestResourceProperties. +func (s *StaticSiteUserInvitationRequestResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domain": + err = unpopulate(val, "Domain", &s.Domain) + delete(rawMsg, key) + case "numHoursToExpiration": + err = unpopulate(val, "NumHoursToExpiration", &s.NumHoursToExpiration) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &s.Provider) + delete(rawMsg, key) + case "roles": + err = unpopulate(val, "Roles", &s.Roles) + delete(rawMsg, key) + case "userDetails": + err = unpopulate(val, "UserDetails", &s.UserDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationResponseResource. +func (s StaticSiteUserInvitationResponseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserInvitationResponseResource. +func (s *StaticSiteUserInvitationResponseResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationResponseResourceProperties. +func (s StaticSiteUserInvitationResponseResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expiresOn", s.ExpiresOn) + populate(objectMap, "invitationUrl", s.InvitationURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserInvitationResponseResourceProperties. +func (s *StaticSiteUserInvitationResponseResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiresOn": + err = unpopulateDateTimeRFC3339(val, "ExpiresOn", &s.ExpiresOn) + delete(rawMsg, key) + case "invitationUrl": + err = unpopulate(val, "InvitationURL", &s.InvitationURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionApp. +func (s StaticSiteUserProvidedFunctionApp) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionApp. +func (s *StaticSiteUserProvidedFunctionApp) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppARMResource. +func (s StaticSiteUserProvidedFunctionAppARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppARMResource. +func (s *StaticSiteUserProvidedFunctionAppARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppARMResourceProperties. +func (s StaticSiteUserProvidedFunctionAppARMResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "functionAppRegion", s.FunctionAppRegion) + populate(objectMap, "functionAppResourceId", s.FunctionAppResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppARMResourceProperties. +func (s *StaticSiteUserProvidedFunctionAppARMResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdOn": + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "functionAppRegion": + err = unpopulate(val, "FunctionAppRegion", &s.FunctionAppRegion) + delete(rawMsg, key) + case "functionAppResourceId": + err = unpopulate(val, "FunctionAppResourceID", &s.FunctionAppResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppProperties. +func (s StaticSiteUserProvidedFunctionAppProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "functionAppRegion", s.FunctionAppRegion) + populate(objectMap, "functionAppResourceId", s.FunctionAppResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppProperties. +func (s *StaticSiteUserProvidedFunctionAppProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdOn": + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "functionAppRegion": + err = unpopulate(val, "FunctionAppRegion", &s.FunctionAppRegion) + delete(rawMsg, key) + case "functionAppResourceId": + err = unpopulate(val, "FunctionAppResourceID", &s.FunctionAppResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppsCollection. +func (s StaticSiteUserProvidedFunctionAppsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppsCollection. +func (s *StaticSiteUserProvidedFunctionAppsCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteZipDeployment. +func (s StaticSiteZipDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiZipUrl", s.APIZipURL) + populate(objectMap, "appZipUrl", s.AppZipURL) + populate(objectMap, "deploymentTitle", s.DeploymentTitle) + populate(objectMap, "functionLanguage", s.FunctionLanguage) + populate(objectMap, "provider", s.Provider) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteZipDeployment. +func (s *StaticSiteZipDeployment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiZipUrl": + err = unpopulate(val, "APIZipURL", &s.APIZipURL) + delete(rawMsg, key) + case "appZipUrl": + err = unpopulate(val, "AppZipURL", &s.AppZipURL) + delete(rawMsg, key) + case "deploymentTitle": + err = unpopulate(val, "DeploymentTitle", &s.DeploymentTitle) + delete(rawMsg, key) + case "functionLanguage": + err = unpopulate(val, "FunctionLanguage", &s.FunctionLanguage) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &s.Provider) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSiteZipDeploymentARMResource. +func (s StaticSiteZipDeploymentARMResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteZipDeploymentARMResource. +func (s *StaticSiteZipDeploymentARMResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSitesWorkflowPreview. +func (s StaticSitesWorkflowPreview) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitesWorkflowPreview. +func (s *StaticSitesWorkflowPreview) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSitesWorkflowPreviewProperties. +func (s StaticSitesWorkflowPreviewProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contents", s.Contents) + populate(objectMap, "path", s.Path) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitesWorkflowPreviewProperties. +func (s *StaticSitesWorkflowPreviewProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contents": + err = unpopulate(val, "Contents", &s.Contents) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSitesWorkflowPreviewRequest. +func (s StaticSitesWorkflowPreviewRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitesWorkflowPreviewRequest. +func (s *StaticSitesWorkflowPreviewRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticSitesWorkflowPreviewRequestProperties. +func (s StaticSitesWorkflowPreviewRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "branch", s.Branch) + populate(objectMap, "buildProperties", s.BuildProperties) + populate(objectMap, "repositoryUrl", s.RepositoryURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitesWorkflowPreviewRequestProperties. +func (s *StaticSitesWorkflowPreviewRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "branch": + err = unpopulate(val, "Branch", &s.Branch) + delete(rawMsg, key) + case "buildProperties": + err = unpopulate(val, "BuildProperties", &s.BuildProperties) + delete(rawMsg, key) + case "repositoryUrl": + err = unpopulate(val, "RepositoryURL", &s.RepositoryURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Status. +func (s Status) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", s.Message) + populate(objectMap, "statusId", s.StatusID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Status. +func (s *Status) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &s.Message) + delete(rawMsg, key) + case "statusId": + err = unpopulate(val, "StatusID", &s.StatusID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StatusCodesBasedTrigger. +func (s StatusCodesBasedTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", s.Count) + populate(objectMap, "path", s.Path) + populate(objectMap, "status", s.Status) + populate(objectMap, "subStatus", s.SubStatus) + populate(objectMap, "timeInterval", s.TimeInterval) + populate(objectMap, "win32Status", s.Win32Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StatusCodesBasedTrigger. +func (s *StatusCodesBasedTrigger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &s.Count) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "subStatus": + err = unpopulate(val, "SubStatus", &s.SubStatus) + delete(rawMsg, key) + case "timeInterval": + err = unpopulate(val, "TimeInterval", &s.TimeInterval) + delete(rawMsg, key) + case "win32Status": + err = unpopulate(val, "Win32Status", &s.Win32Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StatusCodesRangeBasedTrigger. +func (s StatusCodesRangeBasedTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", s.Count) + populate(objectMap, "path", s.Path) + populate(objectMap, "statusCodes", s.StatusCodes) + populate(objectMap, "timeInterval", s.TimeInterval) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StatusCodesRangeBasedTrigger. +func (s *StatusCodesRangeBasedTrigger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &s.Count) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "statusCodes": + err = unpopulate(val, "StatusCodes", &s.StatusCodes) + delete(rawMsg, key) + case "timeInterval": + err = unpopulate(val, "TimeInterval", &s.TimeInterval) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageMigrationOptions. +func (s StorageMigrationOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMigrationOptions. +func (s *StorageMigrationOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageMigrationOptionsProperties. +func (s StorageMigrationOptionsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azurefilesConnectionString", s.AzurefilesConnectionString) + populate(objectMap, "azurefilesShare", s.AzurefilesShare) + populate(objectMap, "blockWriteAccessToSite", s.BlockWriteAccessToSite) + populate(objectMap, "switchSiteAfterMigration", s.SwitchSiteAfterMigration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMigrationOptionsProperties. +func (s *StorageMigrationOptionsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azurefilesConnectionString": + err = unpopulate(val, "AzurefilesConnectionString", &s.AzurefilesConnectionString) + delete(rawMsg, key) + case "azurefilesShare": + err = unpopulate(val, "AzurefilesShare", &s.AzurefilesShare) + delete(rawMsg, key) + case "blockWriteAccessToSite": + err = unpopulate(val, "BlockWriteAccessToSite", &s.BlockWriteAccessToSite) + delete(rawMsg, key) + case "switchSiteAfterMigration": + err = unpopulate(val, "SwitchSiteAfterMigration", &s.SwitchSiteAfterMigration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageMigrationResponse. +func (s StorageMigrationResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMigrationResponse. +func (s *StorageMigrationResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageMigrationResponseProperties. +func (s StorageMigrationResponseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "operationId", s.OperationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMigrationResponseProperties. +func (s *StorageMigrationResponseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operationId": + err = unpopulate(val, "OperationID", &s.OperationID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StringDictionary. +func (s StringDictionary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StringDictionary. +func (s *StringDictionary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StringList. +func (s StringList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StringList. +func (s *StringList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubResource. +func (s SubResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubResource. +func (s *SubResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportTopic. +func (s SupportTopic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "pesId", s.PesID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportTopic. +func (s *SupportTopic) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "pesId": + err = unpopulate(val, "PesID", &s.PesID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwiftVirtualNetwork. +func (s SwiftVirtualNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwiftVirtualNetwork. +func (s *SwiftVirtualNetwork) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwiftVirtualNetworkProperties. +func (s SwiftVirtualNetworkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "subnetResourceId", s.SubnetResourceID) + populate(objectMap, "swiftSupported", s.SwiftSupported) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwiftVirtualNetworkProperties. +func (s *SwiftVirtualNetworkProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "subnetResourceId": + err = unpopulate(val, "SubnetResourceID", &s.SubnetResourceID) + delete(rawMsg, key) + case "swiftSupported": + err = unpopulate(val, "SwiftSupported", &s.SwiftSupported) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Template. +func (t Template) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containers", t.Containers) + populate(objectMap, "dapr", t.Dapr) + populate(objectMap, "revisionSuffix", t.RevisionSuffix) + populate(objectMap, "scale", t.Scale) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Template. +func (t *Template) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containers": + err = unpopulate(val, "Containers", &t.Containers) + delete(rawMsg, key) + case "dapr": + err = unpopulate(val, "Dapr", &t.Dapr) + delete(rawMsg, key) + case "revisionSuffix": + err = unpopulate(val, "RevisionSuffix", &t.RevisionSuffix) + delete(rawMsg, key) + case "scale": + err = unpopulate(val, "Scale", &t.Scale) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TldLegalAgreement. +func (t TldLegalAgreement) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agreementKey", t.AgreementKey) + populate(objectMap, "content", t.Content) + populate(objectMap, "title", t.Title) + populate(objectMap, "url", t.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TldLegalAgreement. +func (t *TldLegalAgreement) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agreementKey": + err = unpopulate(val, "AgreementKey", &t.AgreementKey) + delete(rawMsg, key) + case "content": + err = unpopulate(val, "Content", &t.Content) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &t.Title) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &t.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TldLegalAgreementCollection. +func (t TldLegalAgreementCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TldLegalAgreementCollection. +func (t *TldLegalAgreementCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TokenStore. +func (t TokenStore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureBlobStorage", t.AzureBlobStorage) + populate(objectMap, "enabled", t.Enabled) + populate(objectMap, "fileSystem", t.FileSystem) + populate(objectMap, "tokenRefreshExtensionHours", t.TokenRefreshExtensionHours) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TokenStore. +func (t *TokenStore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureBlobStorage": + err = unpopulate(val, "AzureBlobStorage", &t.AzureBlobStorage) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &t.Enabled) + delete(rawMsg, key) + case "fileSystem": + err = unpopulate(val, "FileSystem", &t.FileSystem) + delete(rawMsg, key) + case "tokenRefreshExtensionHours": + err = unpopulate(val, "TokenRefreshExtensionHours", &t.TokenRefreshExtensionHours) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopLevelDomain. +func (t TopLevelDomain) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "kind", t.Kind) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopLevelDomain. +func (t *TopLevelDomain) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &t.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopLevelDomainAgreementOption. +func (t TopLevelDomainAgreementOption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "forTransfer", t.ForTransfer) + populate(objectMap, "includePrivacy", t.IncludePrivacy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopLevelDomainAgreementOption. +func (t *TopLevelDomainAgreementOption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "forTransfer": + err = unpopulate(val, "ForTransfer", &t.ForTransfer) + delete(rawMsg, key) + case "includePrivacy": + err = unpopulate(val, "IncludePrivacy", &t.IncludePrivacy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopLevelDomainCollection. +func (t TopLevelDomainCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopLevelDomainCollection. +func (t *TopLevelDomainCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopLevelDomainProperties. +func (t TopLevelDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privacy", t.Privacy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopLevelDomainProperties. +func (t *TopLevelDomainProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privacy": + err = unpopulate(val, "Privacy", &t.Privacy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrafficWeight. +func (t TrafficWeight) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "latestRevision", t.LatestRevision) + populate(objectMap, "revisionName", t.RevisionName) + populate(objectMap, "weight", t.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrafficWeight. +func (t *TrafficWeight) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "latestRevision": + err = unpopulate(val, "LatestRevision", &t.LatestRevision) + delete(rawMsg, key) + case "revisionName": + err = unpopulate(val, "RevisionName", &t.RevisionName) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &t.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredJobHistory. +func (t TriggeredJobHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "kind", t.Kind) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredJobHistory. +func (t *TriggeredJobHistory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &t.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredJobHistoryCollection. +func (t TriggeredJobHistoryCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredJobHistoryCollection. +func (t *TriggeredJobHistoryCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredJobHistoryProperties. +func (t TriggeredJobHistoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "runs", t.Runs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredJobHistoryProperties. +func (t *TriggeredJobHistoryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "runs": + err = unpopulate(val, "Runs", &t.Runs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredJobRun. +func (t TriggeredJobRun) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "duration", t.Duration) + populateDateTimeRFC3339(objectMap, "end_time", t.EndTime) + populate(objectMap, "error_url", t.ErrorURL) + populate(objectMap, "job_name", t.JobName) + populate(objectMap, "output_url", t.OutputURL) + populateDateTimeRFC3339(objectMap, "start_time", t.StartTime) + populate(objectMap, "status", t.Status) + populate(objectMap, "trigger", t.Trigger) + populate(objectMap, "url", t.URL) + populate(objectMap, "web_job_id", t.WebJobID) + populate(objectMap, "web_job_name", t.WebJobName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredJobRun. +func (t *TriggeredJobRun) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "duration": + err = unpopulate(val, "Duration", &t.Duration) + delete(rawMsg, key) + case "end_time": + err = unpopulateDateTimeRFC3339(val, "EndTime", &t.EndTime) + delete(rawMsg, key) + case "error_url": + err = unpopulate(val, "ErrorURL", &t.ErrorURL) + delete(rawMsg, key) + case "job_name": + err = unpopulate(val, "JobName", &t.JobName) + delete(rawMsg, key) + case "output_url": + err = unpopulate(val, "OutputURL", &t.OutputURL) + delete(rawMsg, key) + case "start_time": + err = unpopulateDateTimeRFC3339(val, "StartTime", &t.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &t.Status) + delete(rawMsg, key) + case "trigger": + err = unpopulate(val, "Trigger", &t.Trigger) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &t.URL) + delete(rawMsg, key) + case "web_job_id": + err = unpopulate(val, "WebJobID", &t.WebJobID) + delete(rawMsg, key) + case "web_job_name": + err = unpopulate(val, "WebJobName", &t.WebJobName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredWebJob. +func (t TriggeredWebJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "kind", t.Kind) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredWebJob. +func (t *TriggeredWebJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &t.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredWebJobCollection. +func (t TriggeredWebJobCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredWebJobCollection. +func (t *TriggeredWebJobCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggeredWebJobProperties. +func (t TriggeredWebJobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", t.Error) + populate(objectMap, "extra_info_url", t.ExtraInfoURL) + populate(objectMap, "history_url", t.HistoryURL) + populate(objectMap, "latest_run", t.LatestRun) + populate(objectMap, "publicNetworkAccess", t.PublicNetworkAccess) + populate(objectMap, "run_command", t.RunCommand) + populate(objectMap, "scheduler_logs_url", t.SchedulerLogsURL) + populate(objectMap, "settings", t.Settings) + populate(objectMap, "storageAccountRequired", t.StorageAccountRequired) + populate(objectMap, "url", t.URL) + populate(objectMap, "using_sdk", t.UsingSdk) + populate(objectMap, "web_job_type", t.WebJobType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredWebJobProperties. +func (t *TriggeredWebJobProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &t.Error) + delete(rawMsg, key) + case "extra_info_url": + err = unpopulate(val, "ExtraInfoURL", &t.ExtraInfoURL) + delete(rawMsg, key) + case "history_url": + err = unpopulate(val, "HistoryURL", &t.HistoryURL) + delete(rawMsg, key) + case "latest_run": + err = unpopulate(val, "LatestRun", &t.LatestRun) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &t.PublicNetworkAccess) + delete(rawMsg, key) + case "run_command": + err = unpopulate(val, "RunCommand", &t.RunCommand) + delete(rawMsg, key) + case "scheduler_logs_url": + err = unpopulate(val, "SchedulerLogsURL", &t.SchedulerLogsURL) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &t.Settings) + delete(rawMsg, key) + case "storageAccountRequired": + err = unpopulate(val, "StorageAccountRequired", &t.StorageAccountRequired) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &t.URL) + delete(rawMsg, key) + case "using_sdk": + err = unpopulate(val, "UsingSdk", &t.UsingSdk) + delete(rawMsg, key) + case "web_job_type": + err = unpopulate(val, "WebJobType", &t.WebJobType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Twitter. +func (t Twitter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", t.Enabled) + populate(objectMap, "registration", t.Registration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Twitter. +func (t *Twitter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &t.Enabled) + delete(rawMsg, key) + case "registration": + err = unpopulate(val, "Registration", &t.Registration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TwitterRegistration. +func (t TwitterRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "consumerKey", t.ConsumerKey) + populate(objectMap, "consumerSecretSettingName", t.ConsumerSecretSettingName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TwitterRegistration. +func (t *TwitterRegistration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "consumerKey": + err = unpopulate(val, "ConsumerKey", &t.ConsumerKey) + delete(rawMsg, key) + case "consumerSecretSettingName": + err = unpopulate(val, "ConsumerSecretSettingName", &t.ConsumerSecretSettingName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Usage. +func (u Usage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", u.ID) + populate(objectMap, "kind", u.Kind) + populate(objectMap, "name", u.Name) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "type", u.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Usage. +func (u *Usage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &u.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageCollection. +func (u UsageCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageCollection. +func (u *UsageCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageProperties. +func (u UsageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "computeMode", u.ComputeMode) + populate(objectMap, "currentValue", u.CurrentValue) + populate(objectMap, "displayName", u.DisplayName) + populate(objectMap, "limit", u.Limit) + populateDateTimeRFC3339(objectMap, "nextResetTime", u.NextResetTime) + populate(objectMap, "resourceName", u.ResourceName) + populate(objectMap, "siteMode", u.SiteMode) + populate(objectMap, "unit", u.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageProperties. +func (u *UsageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeMode": + err = unpopulate(val, "ComputeMode", &u.ComputeMode) + delete(rawMsg, key) + case "currentValue": + err = unpopulate(val, "CurrentValue", &u.CurrentValue) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &u.DisplayName) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &u.Limit) + delete(rawMsg, key) + case "nextResetTime": + err = unpopulateDateTimeRFC3339(val, "NextResetTime", &u.NextResetTime) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &u.ResourceName) + delete(rawMsg, key) + case "siteMode": + err = unpopulate(val, "SiteMode", &u.SiteMode) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &u.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type User. +func (u User) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", u.ID) + populate(objectMap, "kind", u.Kind) + populate(objectMap, "name", u.Name) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "type", u.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type User. +func (u *User) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &u.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. +func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserProperties. +func (u UserProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "publishingPassword", u.PublishingPassword) + populate(objectMap, "publishingPasswordHash", u.PublishingPasswordHash) + populate(objectMap, "publishingPasswordHashSalt", u.PublishingPasswordHashSalt) + populate(objectMap, "publishingUserName", u.PublishingUserName) + populate(objectMap, "scmUri", u.ScmURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserProperties. +func (u *UserProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publishingPassword": + err = unpopulate(val, "PublishingPassword", &u.PublishingPassword) + delete(rawMsg, key) + case "publishingPasswordHash": + err = unpopulate(val, "PublishingPasswordHash", &u.PublishingPasswordHash) + delete(rawMsg, key) + case "publishingPasswordHashSalt": + err = unpopulate(val, "PublishingPasswordHashSalt", &u.PublishingPasswordHashSalt) + delete(rawMsg, key) + case "publishingUserName": + err = unpopulate(val, "PublishingUserName", &u.PublishingUserName) + delete(rawMsg, key) + case "scmUri": + err = unpopulate(val, "ScmURI", &u.ScmURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateProperties. +func (v ValidateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appServiceEnvironment", v.AppServiceEnvironment) + populate(objectMap, "capacity", v.Capacity) + populate(objectMap, "containerImagePlatform", v.ContainerImagePlatform) + populate(objectMap, "containerImageRepository", v.ContainerImageRepository) + populate(objectMap, "containerImageTag", v.ContainerImageTag) + populate(objectMap, "containerRegistryBaseUrl", v.ContainerRegistryBaseURL) + populate(objectMap, "containerRegistryPassword", v.ContainerRegistryPassword) + populate(objectMap, "containerRegistryUsername", v.ContainerRegistryUsername) + populate(objectMap, "hostingEnvironment", v.HostingEnvironment) + populate(objectMap, "isSpot", v.IsSpot) + populate(objectMap, "isXenon", v.IsXenon) + populate(objectMap, "needLinuxWorkers", v.NeedLinuxWorkers) + populate(objectMap, "skuName", v.SKUName) + populate(objectMap, "serverFarmId", v.ServerFarmID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateProperties. +func (v *ValidateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appServiceEnvironment": + err = unpopulate(val, "AppServiceEnvironment", &v.AppServiceEnvironment) + delete(rawMsg, key) + case "capacity": + err = unpopulate(val, "Capacity", &v.Capacity) + delete(rawMsg, key) + case "containerImagePlatform": + err = unpopulate(val, "ContainerImagePlatform", &v.ContainerImagePlatform) + delete(rawMsg, key) + case "containerImageRepository": + err = unpopulate(val, "ContainerImageRepository", &v.ContainerImageRepository) + delete(rawMsg, key) + case "containerImageTag": + err = unpopulate(val, "ContainerImageTag", &v.ContainerImageTag) + delete(rawMsg, key) + case "containerRegistryBaseUrl": + err = unpopulate(val, "ContainerRegistryBaseURL", &v.ContainerRegistryBaseURL) + delete(rawMsg, key) + case "containerRegistryPassword": + err = unpopulate(val, "ContainerRegistryPassword", &v.ContainerRegistryPassword) + delete(rawMsg, key) + case "containerRegistryUsername": + err = unpopulate(val, "ContainerRegistryUsername", &v.ContainerRegistryUsername) + delete(rawMsg, key) + case "hostingEnvironment": + err = unpopulate(val, "HostingEnvironment", &v.HostingEnvironment) + delete(rawMsg, key) + case "isSpot": + err = unpopulate(val, "IsSpot", &v.IsSpot) + delete(rawMsg, key) + case "isXenon": + err = unpopulate(val, "IsXenon", &v.IsXenon) + delete(rawMsg, key) + case "needLinuxWorkers": + err = unpopulate(val, "NeedLinuxWorkers", &v.NeedLinuxWorkers) + delete(rawMsg, key) + case "skuName": + err = unpopulate(val, "SKUName", &v.SKUName) + delete(rawMsg, key) + case "serverFarmId": + err = unpopulate(val, "ServerFarmID", &v.ServerFarmID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateRequest. +func (v ValidateRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateRequest. +func (v *ValidateRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateResponse. +func (v ValidateResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", v.Error) + populate(objectMap, "status", v.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateResponse. +func (v *ValidateResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &v.Error) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &v.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateResponseError. +func (v ValidateResponseError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", v.Code) + populate(objectMap, "message", v.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateResponseError. +func (v *ValidateResponseError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &v.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &v.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplication. +func (v VirtualApplication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "physicalPath", v.PhysicalPath) + populate(objectMap, "preloadEnabled", v.PreloadEnabled) + populate(objectMap, "virtualDirectories", v.VirtualDirectories) + populate(objectMap, "virtualPath", v.VirtualPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplication. +func (v *VirtualApplication) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "physicalPath": + err = unpopulate(val, "PhysicalPath", &v.PhysicalPath) + delete(rawMsg, key) + case "preloadEnabled": + err = unpopulate(val, "PreloadEnabled", &v.PreloadEnabled) + delete(rawMsg, key) + case "virtualDirectories": + err = unpopulate(val, "VirtualDirectories", &v.VirtualDirectories) + delete(rawMsg, key) + case "virtualPath": + err = unpopulate(val, "VirtualPath", &v.VirtualPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualDirectory. +func (v VirtualDirectory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "physicalPath", v.PhysicalPath) + populate(objectMap, "virtualPath", v.VirtualPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualDirectory. +func (v *VirtualDirectory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "physicalPath": + err = unpopulate(val, "PhysicalPath", &v.PhysicalPath) + delete(rawMsg, key) + case "virtualPath": + err = unpopulate(val, "VirtualPath", &v.VirtualPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualIPMapping. +func (v VirtualIPMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inUse", v.InUse) + populate(objectMap, "internalHttpPort", v.InternalHTTPPort) + populate(objectMap, "internalHttpsPort", v.InternalHTTPSPort) + populate(objectMap, "serviceName", v.ServiceName) + populate(objectMap, "virtualIP", v.VirtualIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualIPMapping. +func (v *VirtualIPMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inUse": + err = unpopulate(val, "InUse", &v.InUse) + delete(rawMsg, key) + case "internalHttpPort": + err = unpopulate(val, "InternalHTTPPort", &v.InternalHTTPPort) + delete(rawMsg, key) + case "internalHttpsPort": + err = unpopulate(val, "InternalHTTPSPort", &v.InternalHTTPSPort) + delete(rawMsg, key) + case "serviceName": + err = unpopulate(val, "ServiceName", &v.ServiceName) + delete(rawMsg, key) + case "virtualIP": + err = unpopulate(val, "VirtualIP", &v.VirtualIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkProfile. +func (v VirtualNetworkProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "subnet", v.Subnet) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkProfile. +func (v *VirtualNetworkProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &v.Subnet) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetGateway. +func (v VnetGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetGateway. +func (v *VnetGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetGatewayProperties. +func (v VnetGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "vpnPackageUri", v.VPNPackageURI) + populate(objectMap, "vnetName", v.VnetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetGatewayProperties. +func (v *VnetGatewayProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "vpnPackageUri": + err = unpopulate(val, "VPNPackageURI", &v.VPNPackageURI) + delete(rawMsg, key) + case "vnetName": + err = unpopulate(val, "VnetName", &v.VnetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetInfo. +func (v VnetInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certBlob", v.CertBlob) + populate(objectMap, "certThumbprint", v.CertThumbprint) + populate(objectMap, "dnsServers", v.DNSServers) + populate(objectMap, "isSwift", v.IsSwift) + populate(objectMap, "resyncRequired", v.ResyncRequired) + populate(objectMap, "routes", v.Routes) + populate(objectMap, "vnetResourceId", v.VnetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetInfo. +func (v *VnetInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certBlob": + err = unpopulate(val, "CertBlob", &v.CertBlob) + delete(rawMsg, key) + case "certThumbprint": + err = unpopulate(val, "CertThumbprint", &v.CertThumbprint) + delete(rawMsg, key) + case "dnsServers": + err = unpopulate(val, "DNSServers", &v.DNSServers) + delete(rawMsg, key) + case "isSwift": + err = unpopulate(val, "IsSwift", &v.IsSwift) + delete(rawMsg, key) + case "resyncRequired": + err = unpopulate(val, "ResyncRequired", &v.ResyncRequired) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &v.Routes) + delete(rawMsg, key) + case "vnetResourceId": + err = unpopulate(val, "VnetResourceID", &v.VnetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetInfoResource. +func (v VnetInfoResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetInfoResource. +func (v *VnetInfoResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetParameters. +func (v VnetParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetParameters. +func (v *VnetParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetParametersProperties. +func (v VnetParametersProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "subnetResourceId", v.SubnetResourceID) + populate(objectMap, "vnetName", v.VnetName) + populate(objectMap, "vnetResourceGroup", v.VnetResourceGroup) + populate(objectMap, "vnetSubnetName", v.VnetSubnetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetParametersProperties. +func (v *VnetParametersProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "subnetResourceId": + err = unpopulate(val, "SubnetResourceID", &v.SubnetResourceID) + delete(rawMsg, key) + case "vnetName": + err = unpopulate(val, "VnetName", &v.VnetName) + delete(rawMsg, key) + case "vnetResourceGroup": + err = unpopulate(val, "VnetResourceGroup", &v.VnetResourceGroup) + delete(rawMsg, key) + case "vnetSubnetName": + err = unpopulate(val, "VnetSubnetName", &v.VnetSubnetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetRoute. +func (v VnetRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetRoute. +func (v *VnetRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetRouteProperties. +func (v VnetRouteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endAddress", v.EndAddress) + populate(objectMap, "routeType", v.RouteType) + populate(objectMap, "startAddress", v.StartAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetRouteProperties. +func (v *VnetRouteProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endAddress": + err = unpopulate(val, "EndAddress", &v.EndAddress) + delete(rawMsg, key) + case "routeType": + err = unpopulate(val, "RouteType", &v.RouteType) + delete(rawMsg, key) + case "startAddress": + err = unpopulate(val, "StartAddress", &v.StartAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetValidationFailureDetails. +func (v VnetValidationFailureDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetValidationFailureDetails. +func (v *VnetValidationFailureDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetValidationFailureDetailsProperties. +func (v VnetValidationFailureDetailsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failed", v.Failed) + populate(objectMap, "failedTests", v.FailedTests) + populate(objectMap, "message", v.Message) + populate(objectMap, "warnings", v.Warnings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetValidationFailureDetailsProperties. +func (v *VnetValidationFailureDetailsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failed": + err = unpopulate(val, "Failed", &v.Failed) + delete(rawMsg, key) + case "failedTests": + err = unpopulate(val, "FailedTests", &v.FailedTests) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &v.Message) + delete(rawMsg, key) + case "warnings": + err = unpopulate(val, "Warnings", &v.Warnings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetValidationTestFailure. +func (v VnetValidationTestFailure) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetValidationTestFailure. +func (v *VnetValidationTestFailure) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetValidationTestFailureProperties. +func (v VnetValidationTestFailureProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "details", v.Details) + populate(objectMap, "testName", v.TestName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetValidationTestFailureProperties. +func (v *VnetValidationTestFailureProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "details": + err = unpopulate(val, "Details", &v.Details) + delete(rawMsg, key) + case "testName": + err = unpopulate(val, "TestName", &v.TestName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeMount. +func (v VolumeMount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerMountPath", v.ContainerMountPath) + populate(objectMap, "data", v.Data) + populate(objectMap, "readOnly", v.ReadOnly) + populate(objectMap, "volumeSubPath", v.VolumeSubPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeMount. +func (v *VolumeMount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerMountPath": + err = unpopulate(val, "ContainerMountPath", &v.ContainerMountPath) + delete(rawMsg, key) + case "data": + err = unpopulate(val, "Data", &v.Data) + delete(rawMsg, key) + case "readOnly": + err = unpopulate(val, "ReadOnly", &v.ReadOnly) + delete(rawMsg, key) + case "volumeSubPath": + err = unpopulate(val, "VolumeSubPath", &v.VolumeSubPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppCollection. +func (w WebAppCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppCollection. +func (w *WebAppCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppInstanceStatusCollection. +func (w WebAppInstanceStatusCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppInstanceStatusCollection. +func (w *WebAppInstanceStatusCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppMajorVersion. +func (w WebAppMajorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayText", w.DisplayText) + populate(objectMap, "minorVersions", w.MinorVersions) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppMajorVersion. +func (w *WebAppMajorVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &w.DisplayText) + delete(rawMsg, key) + case "minorVersions": + err = unpopulate(val, "MinorVersions", &w.MinorVersions) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppMinorVersion. +func (w WebAppMinorVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayText", w.DisplayText) + populate(objectMap, "stackSettings", w.StackSettings) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppMinorVersion. +func (w *WebAppMinorVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &w.DisplayText) + delete(rawMsg, key) + case "stackSettings": + err = unpopulate(val, "StackSettings", &w.StackSettings) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppRuntimeSettings. +func (w WebAppRuntimeSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appInsightsSettings", w.AppInsightsSettings) + populateDateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) + populate(objectMap, "gitHubActionSettings", w.GitHubActionSettings) + populate(objectMap, "isAutoUpdate", w.IsAutoUpdate) + populate(objectMap, "isDeprecated", w.IsDeprecated) + populate(objectMap, "isEarlyAccess", w.IsEarlyAccess) + populate(objectMap, "isHidden", w.IsHidden) + populate(objectMap, "isPreview", w.IsPreview) + populate(objectMap, "remoteDebuggingSupported", w.RemoteDebuggingSupported) + populate(objectMap, "runtimeVersion", w.RuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppRuntimeSettings. +func (w *WebAppRuntimeSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsSettings": + err = unpopulate(val, "AppInsightsSettings", &w.AppInsightsSettings) + delete(rawMsg, key) + case "endOfLifeDate": + err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) + delete(rawMsg, key) + case "gitHubActionSettings": + err = unpopulate(val, "GitHubActionSettings", &w.GitHubActionSettings) + delete(rawMsg, key) + case "isAutoUpdate": + err = unpopulate(val, "IsAutoUpdate", &w.IsAutoUpdate) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &w.IsDeprecated) + delete(rawMsg, key) + case "isEarlyAccess": + err = unpopulate(val, "IsEarlyAccess", &w.IsEarlyAccess) + delete(rawMsg, key) + case "isHidden": + err = unpopulate(val, "IsHidden", &w.IsHidden) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &w.IsPreview) + delete(rawMsg, key) + case "remoteDebuggingSupported": + err = unpopulate(val, "RemoteDebuggingSupported", &w.RemoteDebuggingSupported) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &w.RuntimeVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppRuntimes. +func (w WebAppRuntimes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "linuxContainerSettings", w.LinuxContainerSettings) + populate(objectMap, "linuxRuntimeSettings", w.LinuxRuntimeSettings) + populate(objectMap, "windowsContainerSettings", w.WindowsContainerSettings) + populate(objectMap, "windowsRuntimeSettings", w.WindowsRuntimeSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppRuntimes. +func (w *WebAppRuntimes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "linuxContainerSettings": + err = unpopulate(val, "LinuxContainerSettings", &w.LinuxContainerSettings) + delete(rawMsg, key) + case "linuxRuntimeSettings": + err = unpopulate(val, "LinuxRuntimeSettings", &w.LinuxRuntimeSettings) + delete(rawMsg, key) + case "windowsContainerSettings": + err = unpopulate(val, "WindowsContainerSettings", &w.WindowsContainerSettings) + delete(rawMsg, key) + case "windowsRuntimeSettings": + err = unpopulate(val, "WindowsRuntimeSettings", &w.WindowsRuntimeSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppStack. +func (w WebAppStack) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppStack. +func (w *WebAppStack) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppStackCollection. +func (w WebAppStackCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppStackCollection. +func (w *WebAppStackCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebAppStackProperties. +func (w WebAppStackProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayText", w.DisplayText) + populate(objectMap, "majorVersions", w.MajorVersions) + populate(objectMap, "preferredOs", w.PreferredOs) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppStackProperties. +func (w *WebAppStackProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayText": + err = unpopulate(val, "DisplayText", &w.DisplayText) + delete(rawMsg, key) + case "majorVersions": + err = unpopulate(val, "MajorVersions", &w.MajorVersions) + delete(rawMsg, key) + case "preferredOs": + err = unpopulate(val, "PreferredOs", &w.PreferredOs) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebJob. +func (w WebJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebJob. +func (w *WebJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebJobCollection. +func (w WebJobCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebJobCollection. +func (w *WebJobCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebJobProperties. +func (w WebJobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", w.Error) + populate(objectMap, "extra_info_url", w.ExtraInfoURL) + populate(objectMap, "run_command", w.RunCommand) + populate(objectMap, "settings", w.Settings) + populate(objectMap, "url", w.URL) + populate(objectMap, "using_sdk", w.UsingSdk) + populate(objectMap, "web_job_type", w.WebJobType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebJobProperties. +func (w *WebJobProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "extra_info_url": + err = unpopulate(val, "ExtraInfoURL", &w.ExtraInfoURL) + delete(rawMsg, key) + case "run_command": + err = unpopulate(val, "RunCommand", &w.RunCommand) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &w.Settings) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &w.URL) + delete(rawMsg, key) + case "using_sdk": + err = unpopulate(val, "UsingSdk", &w.UsingSdk) + delete(rawMsg, key) + case "web_job_type": + err = unpopulate(val, "WebJobType", &w.WebJobType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebSiteInstanceStatus. +func (w WebSiteInstanceStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebSiteInstanceStatus. +func (w *WebSiteInstanceStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebSiteInstanceStatusProperties. +func (w WebSiteInstanceStatusProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "consoleUrl", w.ConsoleURL) + populate(objectMap, "containers", w.Containers) + populate(objectMap, "detectorUrl", w.DetectorURL) + populate(objectMap, "healthCheckUrl", w.HealthCheckURL) + populate(objectMap, "physicalZone", w.PhysicalZone) + populate(objectMap, "state", w.State) + populate(objectMap, "statusUrl", w.StatusURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebSiteInstanceStatusProperties. +func (w *WebSiteInstanceStatusProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "consoleUrl": + err = unpopulate(val, "ConsoleURL", &w.ConsoleURL) + delete(rawMsg, key) + case "containers": + err = unpopulate(val, "Containers", &w.Containers) + delete(rawMsg, key) + case "detectorUrl": + err = unpopulate(val, "DetectorURL", &w.DetectorURL) + delete(rawMsg, key) + case "healthCheckUrl": + err = unpopulate(val, "HealthCheckURL", &w.HealthCheckURL) + delete(rawMsg, key) + case "physicalZone": + err = unpopulate(val, "PhysicalZone", &w.PhysicalZone) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + case "statusUrl": + err = unpopulate(val, "StatusURL", &w.StatusURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WindowsJavaContainerSettings. +func (w WindowsJavaContainerSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) + populate(objectMap, "isAutoUpdate", w.IsAutoUpdate) + populate(objectMap, "isDeprecated", w.IsDeprecated) + populate(objectMap, "isEarlyAccess", w.IsEarlyAccess) + populate(objectMap, "isHidden", w.IsHidden) + populate(objectMap, "isPreview", w.IsPreview) + populate(objectMap, "javaContainer", w.JavaContainer) + populate(objectMap, "javaContainerVersion", w.JavaContainerVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WindowsJavaContainerSettings. +func (w *WindowsJavaContainerSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endOfLifeDate": + err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) + delete(rawMsg, key) + case "isAutoUpdate": + err = unpopulate(val, "IsAutoUpdate", &w.IsAutoUpdate) + delete(rawMsg, key) + case "isDeprecated": + err = unpopulate(val, "IsDeprecated", &w.IsDeprecated) + delete(rawMsg, key) + case "isEarlyAccess": + err = unpopulate(val, "IsEarlyAccess", &w.IsEarlyAccess) + delete(rawMsg, key) + case "isHidden": + err = unpopulate(val, "IsHidden", &w.IsHidden) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &w.IsPreview) + delete(rawMsg, key) + case "javaContainer": + err = unpopulate(val, "JavaContainer", &w.JavaContainer) + delete(rawMsg, key) + case "javaContainerVersion": + err = unpopulate(val, "JavaContainerVersion", &w.JavaContainerVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkerPool. +func (w WorkerPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "computeMode", w.ComputeMode) + populate(objectMap, "instanceNames", w.InstanceNames) + populate(objectMap, "workerCount", w.WorkerCount) + populate(objectMap, "workerSize", w.WorkerSize) + populate(objectMap, "workerSizeId", w.WorkerSizeID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkerPool. +func (w *WorkerPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeMode": + err = unpopulate(val, "ComputeMode", &w.ComputeMode) + delete(rawMsg, key) + case "instanceNames": + err = unpopulate(val, "InstanceNames", &w.InstanceNames) + delete(rawMsg, key) + case "workerCount": + err = unpopulate(val, "WorkerCount", &w.WorkerCount) + delete(rawMsg, key) + case "workerSize": + err = unpopulate(val, "WorkerSize", &w.WorkerSize) + delete(rawMsg, key) + case "workerSizeId": + err = unpopulate(val, "WorkerSizeID", &w.WorkerSizeID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkerPoolCollection. +func (w WorkerPoolCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkerPoolCollection. +func (w *WorkerPoolCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkerPoolResource. +func (w WorkerPoolResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "sku", w.SKU) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkerPoolResource. +func (w *WorkerPoolResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &w.SKU) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Workflow. +func (w Workflow) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "identity", w.Identity) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Workflow. +func (w *Workflow) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &w.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowArtifacts. +func (w WorkflowArtifacts) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "appSettings", w.AppSettings) + populate(objectMap, "files", w.Files) + populate(objectMap, "filesToDelete", w.FilesToDelete) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowArtifacts. +func (w *WorkflowArtifacts) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appSettings": + err = unpopulate(val, "AppSettings", &w.AppSettings) + delete(rawMsg, key) + case "files": + err = unpopulate(val, "Files", &w.Files) + delete(rawMsg, key) + case "filesToDelete": + err = unpopulate(val, "FilesToDelete", &w.FilesToDelete) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowEnvelope. +func (w WorkflowEnvelope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowEnvelope. +func (w *WorkflowEnvelope) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowEnvelopeCollection. +func (w WorkflowEnvelopeCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowEnvelopeCollection. +func (w *WorkflowEnvelopeCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowEnvelopeProperties. +func (w WorkflowEnvelopeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "files", w.Files) + populate(objectMap, "flowState", w.FlowState) + populate(objectMap, "health", w.Health) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowEnvelopeProperties. +func (w *WorkflowEnvelopeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "files": + err = unpopulate(val, "Files", &w.Files) + delete(rawMsg, key) + case "flowState": + err = unpopulate(val, "FlowState", &w.FlowState) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &w.Health) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowFilter. +func (w WorkflowFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", w.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowFilter. +func (w *WorkflowFilter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowHealth. +func (w WorkflowHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", w.Error) + populate(objectMap, "state", w.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowHealth. +func (w *WorkflowHealth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowListResult. +func (w WorkflowListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowListResult. +func (w *WorkflowListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowOutputParameter. +func (w WorkflowOutputParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", w.Description) + populateAny(objectMap, "error", w.Error) + populateAny(objectMap, "metadata", w.Metadata) + populate(objectMap, "type", w.Type) + populateAny(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowOutputParameter. +func (w *WorkflowOutputParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &w.Description) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &w.Metadata) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowParameter. +func (w WorkflowParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", w.Description) + populateAny(objectMap, "metadata", w.Metadata) + populate(objectMap, "type", w.Type) + populateAny(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowParameter. +func (w *WorkflowParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &w.Description) + delete(rawMsg, key) + case "metadata": + err = unpopulate(val, "Metadata", &w.Metadata) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowProperties. +func (w WorkflowProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessControl", w.AccessControl) + populate(objectMap, "accessEndpoint", w.AccessEndpoint) + populateDateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populateAny(objectMap, "definition", w.Definition) + populate(objectMap, "endpointsConfiguration", w.EndpointsConfiguration) + populate(objectMap, "integrationAccount", w.IntegrationAccount) + populate(objectMap, "integrationServiceEnvironment", w.IntegrationServiceEnvironment) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "parameters", w.Parameters) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "sku", w.SKU) + populate(objectMap, "state", w.State) + populate(objectMap, "version", w.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowProperties. +func (w *WorkflowProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessControl": + err = unpopulate(val, "AccessControl", &w.AccessControl) + delete(rawMsg, key) + case "accessEndpoint": + err = unpopulate(val, "AccessEndpoint", &w.AccessEndpoint) + delete(rawMsg, key) + case "changedTime": + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + delete(rawMsg, key) + case "createdTime": + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + delete(rawMsg, key) + case "definition": + err = unpopulate(val, "Definition", &w.Definition) + delete(rawMsg, key) + case "endpointsConfiguration": + err = unpopulate(val, "EndpointsConfiguration", &w.EndpointsConfiguration) + delete(rawMsg, key) + case "integrationAccount": + err = unpopulate(val, "IntegrationAccount", &w.IntegrationAccount) + delete(rawMsg, key) + case "integrationServiceEnvironment": + err = unpopulate(val, "IntegrationServiceEnvironment", &w.IntegrationServiceEnvironment) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &w.Parameters) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &w.SKU) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &w.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowResource. +func (w WorkflowResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowResource. +func (w *WorkflowResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRun. +func (w WorkflowRun) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRun. +func (w *WorkflowRun) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunAction. +func (w WorkflowRunAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunAction. +func (w *WorkflowRunAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionFilter. +func (w WorkflowRunActionFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "status", w.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionFilter. +func (w *WorkflowRunActionFilter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionListResult. +func (w WorkflowRunActionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionListResult. +func (w *WorkflowRunActionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionProperties. +func (w WorkflowRunActionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", w.Code) + populate(objectMap, "correlation", w.Correlation) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateAny(objectMap, "error", w.Error) + populate(objectMap, "inputsLink", w.InputsLink) + populate(objectMap, "outputsLink", w.OutputsLink) + populate(objectMap, "retryHistory", w.RetryHistory) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) + populate(objectMap, "status", w.Status) + populateAny(objectMap, "trackedProperties", w.TrackedProperties) + populate(objectMap, "trackingId", w.TrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionProperties. +func (w *WorkflowRunActionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &w.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &w.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "inputsLink": + err = unpopulate(val, "InputsLink", &w.InputsLink) + delete(rawMsg, key) + case "outputsLink": + err = unpopulate(val, "OutputsLink", &w.OutputsLink) + delete(rawMsg, key) + case "retryHistory": + err = unpopulate(val, "RetryHistory", &w.RetryHistory) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "trackedProperties": + err = unpopulate(val, "TrackedProperties", &w.TrackedProperties) + delete(rawMsg, key) + case "trackingId": + err = unpopulate(val, "TrackingID", &w.TrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionRepetitionDefinition. +func (w WorkflowRunActionRepetitionDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionRepetitionDefinition. +func (w *WorkflowRunActionRepetitionDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionRepetitionDefinitionCollection. +func (w WorkflowRunActionRepetitionDefinitionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionRepetitionDefinitionCollection. +func (w *WorkflowRunActionRepetitionDefinitionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunActionRepetitionProperties. +func (w WorkflowRunActionRepetitionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", w.Code) + populate(objectMap, "correlation", w.Correlation) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateAny(objectMap, "error", w.Error) + populateAny(objectMap, "inputs", w.Inputs) + populate(objectMap, "inputsLink", w.InputsLink) + populate(objectMap, "iterationCount", w.IterationCount) + populateAny(objectMap, "outputs", w.Outputs) + populate(objectMap, "outputsLink", w.OutputsLink) + populate(objectMap, "repetitionIndexes", w.RepetitionIndexes) + populate(objectMap, "retryHistory", w.RetryHistory) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) + populate(objectMap, "status", w.Status) + populateAny(objectMap, "trackedProperties", w.TrackedProperties) + populate(objectMap, "trackingId", w.TrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunActionRepetitionProperties. +func (w *WorkflowRunActionRepetitionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &w.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &w.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "inputs": + err = unpopulate(val, "Inputs", &w.Inputs) + delete(rawMsg, key) + case "inputsLink": + err = unpopulate(val, "InputsLink", &w.InputsLink) + delete(rawMsg, key) + case "iterationCount": + err = unpopulate(val, "IterationCount", &w.IterationCount) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &w.Outputs) + delete(rawMsg, key) + case "outputsLink": + err = unpopulate(val, "OutputsLink", &w.OutputsLink) + delete(rawMsg, key) + case "repetitionIndexes": + err = unpopulate(val, "RepetitionIndexes", &w.RepetitionIndexes) + delete(rawMsg, key) + case "retryHistory": + err = unpopulate(val, "RetryHistory", &w.RetryHistory) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "trackedProperties": + err = unpopulate(val, "TrackedProperties", &w.TrackedProperties) + delete(rawMsg, key) + case "trackingId": + err = unpopulate(val, "TrackingID", &w.TrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunFilter. +func (w WorkflowRunFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "status", w.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunFilter. +func (w *WorkflowRunFilter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunListResult. +func (w WorkflowRunListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunListResult. +func (w *WorkflowRunListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunProperties. +func (w WorkflowRunProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", w.Code) + populate(objectMap, "correlation", w.Correlation) + populate(objectMap, "correlationId", w.CorrelationID) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateAny(objectMap, "error", w.Error) + populate(objectMap, "outputs", w.Outputs) + populate(objectMap, "response", w.Response) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) + populate(objectMap, "status", w.Status) + populate(objectMap, "trigger", w.Trigger) + populateDateTimeRFC3339(objectMap, "waitEndTime", w.WaitEndTime) + populate(objectMap, "workflow", w.Workflow) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunProperties. +func (w *WorkflowRunProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &w.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &w.Correlation) + delete(rawMsg, key) + case "correlationId": + err = unpopulate(val, "CorrelationID", &w.CorrelationID) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &w.Outputs) + delete(rawMsg, key) + case "response": + err = unpopulate(val, "Response", &w.Response) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "trigger": + err = unpopulate(val, "Trigger", &w.Trigger) + delete(rawMsg, key) + case "waitEndTime": + err = unpopulateDateTimeRFC3339(val, "WaitEndTime", &w.WaitEndTime) + delete(rawMsg, key) + case "workflow": + err = unpopulate(val, "Workflow", &w.Workflow) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowRunTrigger. +func (w WorkflowRunTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", w.Code) + populate(objectMap, "correlation", w.Correlation) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateAny(objectMap, "error", w.Error) + populateAny(objectMap, "inputs", w.Inputs) + populate(objectMap, "inputsLink", w.InputsLink) + populate(objectMap, "name", w.Name) + populateAny(objectMap, "outputs", w.Outputs) + populate(objectMap, "outputsLink", w.OutputsLink) + populateDateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) + populate(objectMap, "status", w.Status) + populateAny(objectMap, "trackedProperties", w.TrackedProperties) + populate(objectMap, "trackingId", w.TrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowRunTrigger. +func (w *WorkflowRunTrigger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &w.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &w.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "inputs": + err = unpopulate(val, "Inputs", &w.Inputs) + delete(rawMsg, key) + case "inputsLink": + err = unpopulate(val, "InputsLink", &w.InputsLink) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &w.Outputs) + delete(rawMsg, key) + case "outputsLink": + err = unpopulate(val, "OutputsLink", &w.OutputsLink) + delete(rawMsg, key) + case "scheduledTime": + err = unpopulateDateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "trackedProperties": + err = unpopulate(val, "TrackedProperties", &w.TrackedProperties) + delete(rawMsg, key) + case "trackingId": + err = unpopulate(val, "TrackingID", &w.TrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowSKU. +func (w WorkflowSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", w.Name) + populate(objectMap, "plan", w.Plan) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowSKU. +func (w *WorkflowSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "plan": + err = unpopulate(val, "Plan", &w.Plan) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTrigger. +func (w WorkflowTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTrigger. +func (w *WorkflowTrigger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerCallbackURL. +func (w WorkflowTriggerCallbackURL) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "basePath", w.BasePath) + populate(objectMap, "method", w.Method) + populate(objectMap, "queries", w.Queries) + populate(objectMap, "relativePath", w.RelativePath) + populate(objectMap, "relativePathParameters", w.RelativePathParameters) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerCallbackURL. +func (w *WorkflowTriggerCallbackURL) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "basePath": + err = unpopulate(val, "BasePath", &w.BasePath) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &w.Method) + delete(rawMsg, key) + case "queries": + err = unpopulate(val, "Queries", &w.Queries) + delete(rawMsg, key) + case "relativePath": + err = unpopulate(val, "RelativePath", &w.RelativePath) + delete(rawMsg, key) + case "relativePathParameters": + err = unpopulate(val, "RelativePathParameters", &w.RelativePathParameters) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerFilter. +func (w WorkflowTriggerFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", w.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerFilter. +func (w *WorkflowTriggerFilter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerHistory. +func (w WorkflowTriggerHistory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerHistory. +func (w *WorkflowTriggerHistory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerHistoryFilter. +func (w WorkflowTriggerHistoryFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "status", w.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerHistoryFilter. +func (w *WorkflowTriggerHistoryFilter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerHistoryListResult. +func (w WorkflowTriggerHistoryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerHistoryListResult. +func (w *WorkflowTriggerHistoryListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerHistoryProperties. +func (w WorkflowTriggerHistoryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", w.Code) + populate(objectMap, "correlation", w.Correlation) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateAny(objectMap, "error", w.Error) + populate(objectMap, "fired", w.Fired) + populate(objectMap, "inputsLink", w.InputsLink) + populate(objectMap, "outputsLink", w.OutputsLink) + populate(objectMap, "run", w.Run) + populateDateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) + populate(objectMap, "status", w.Status) + populate(objectMap, "trackingId", w.TrackingID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerHistoryProperties. +func (w *WorkflowTriggerHistoryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &w.Code) + delete(rawMsg, key) + case "correlation": + err = unpopulate(val, "Correlation", &w.Correlation) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &w.Error) + delete(rawMsg, key) + case "fired": + err = unpopulate(val, "Fired", &w.Fired) + delete(rawMsg, key) + case "inputsLink": + err = unpopulate(val, "InputsLink", &w.InputsLink) + delete(rawMsg, key) + case "outputsLink": + err = unpopulate(val, "OutputsLink", &w.OutputsLink) + delete(rawMsg, key) + case "run": + err = unpopulate(val, "Run", &w.Run) + delete(rawMsg, key) + case "scheduledTime": + err = unpopulateDateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "trackingId": + err = unpopulate(val, "TrackingID", &w.TrackingID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerListCallbackURLQueries. +func (w WorkflowTriggerListCallbackURLQueries) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "api-version", w.APIVersion) + populate(objectMap, "se", w.Se) + populate(objectMap, "sig", w.Sig) + populate(objectMap, "sp", w.Sp) + populate(objectMap, "sv", w.Sv) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerListCallbackURLQueries. +func (w *WorkflowTriggerListCallbackURLQueries) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "api-version": + err = unpopulate(val, "APIVersion", &w.APIVersion) + delete(rawMsg, key) + case "se": + err = unpopulate(val, "Se", &w.Se) + delete(rawMsg, key) + case "sig": + err = unpopulate(val, "Sig", &w.Sig) + delete(rawMsg, key) + case "sp": + err = unpopulate(val, "Sp", &w.Sp) + delete(rawMsg, key) + case "sv": + err = unpopulate(val, "Sv", &w.Sv) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerListResult. +func (w WorkflowTriggerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerListResult. +func (w *WorkflowTriggerListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerProperties. +func (w WorkflowTriggerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populateDateTimeRFC3339(objectMap, "lastExecutionTime", w.LastExecutionTime) + populateDateTimeRFC3339(objectMap, "nextExecutionTime", w.NextExecutionTime) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "recurrence", w.Recurrence) + populate(objectMap, "state", w.State) + populate(objectMap, "status", w.Status) + populate(objectMap, "workflow", w.Workflow) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerProperties. +func (w *WorkflowTriggerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "changedTime": + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + delete(rawMsg, key) + case "createdTime": + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + delete(rawMsg, key) + case "lastExecutionTime": + err = unpopulateDateTimeRFC3339(val, "LastExecutionTime", &w.LastExecutionTime) + delete(rawMsg, key) + case "nextExecutionTime": + err = unpopulateDateTimeRFC3339(val, "NextExecutionTime", &w.NextExecutionTime) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "recurrence": + err = unpopulate(val, "Recurrence", &w.Recurrence) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &w.Status) + delete(rawMsg, key) + case "workflow": + err = unpopulate(val, "Workflow", &w.Workflow) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerRecurrence. +func (w WorkflowTriggerRecurrence) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endTime", w.EndTime) + populate(objectMap, "frequency", w.Frequency) + populate(objectMap, "interval", w.Interval) + populate(objectMap, "schedule", w.Schedule) + populate(objectMap, "startTime", w.StartTime) + populate(objectMap, "timeZone", w.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowTriggerRecurrence. +func (w *WorkflowTriggerRecurrence) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulate(val, "EndTime", &w.EndTime) + delete(rawMsg, key) + case "frequency": + err = unpopulate(val, "Frequency", &w.Frequency) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &w.Interval) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &w.Schedule) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &w.StartTime) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &w.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowVersion. +func (w WorkflowVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowVersion. +func (w *WorkflowVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowVersionListResult. +func (w WorkflowVersionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowVersionListResult. +func (w *WorkflowVersionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkflowVersionProperties. +func (w WorkflowVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessControl", w.AccessControl) + populate(objectMap, "accessEndpoint", w.AccessEndpoint) + populateDateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populateAny(objectMap, "definition", w.Definition) + populate(objectMap, "endpointsConfiguration", w.EndpointsConfiguration) + populate(objectMap, "integrationAccount", w.IntegrationAccount) + populate(objectMap, "parameters", w.Parameters) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "sku", w.SKU) + populate(objectMap, "state", w.State) + populate(objectMap, "version", w.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkflowVersionProperties. +func (w *WorkflowVersionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessControl": + err = unpopulate(val, "AccessControl", &w.AccessControl) + delete(rawMsg, key) + case "accessEndpoint": + err = unpopulate(val, "AccessEndpoint", &w.AccessEndpoint) + delete(rawMsg, key) + case "changedTime": + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + delete(rawMsg, key) + case "createdTime": + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + delete(rawMsg, key) + case "definition": + err = unpopulate(val, "Definition", &w.Definition) + delete(rawMsg, key) + case "endpointsConfiguration": + err = unpopulate(val, "EndpointsConfiguration", &w.EndpointsConfiguration) + delete(rawMsg, key) + case "integrationAccount": + err = unpopulate(val, "IntegrationAccount", &w.IntegrationAccount) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &w.Parameters) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &w.SKU) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &w.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func populateByteArray[T any](m map[string]any, k string, b []T, convert func() any) { + if azcore.IsNullValue(b) { + m[k] = nil + } else if len(b) == 0 { + return + } else { + m[k] = convert() + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/options.go new file mode 100644 index 00000000..61d0e350 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/options.go @@ -0,0 +1,4484 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import "time" + +// CertificateOrdersClientBeginCreateOrUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdateCertificate +// method. +type CertificateOrdersClientBeginCreateOrUpdateCertificateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CertificateOrdersClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdate +// method. +type CertificateOrdersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CertificateOrdersClientDeleteCertificateOptions contains the optional parameters for the CertificateOrdersClient.DeleteCertificate +// method. +type CertificateOrdersClientDeleteCertificateOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientDeleteOptions contains the optional parameters for the CertificateOrdersClient.Delete method. +type CertificateOrdersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientGetCertificateOptions contains the optional parameters for the CertificateOrdersClient.GetCertificate +// method. +type CertificateOrdersClientGetCertificateOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientGetOptions contains the optional parameters for the CertificateOrdersClient.Get method. +type CertificateOrdersClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientListByResourceGroupOptions contains the optional parameters for the CertificateOrdersClient.NewListByResourceGroupPager +// method. +type CertificateOrdersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientListCertificatesOptions contains the optional parameters for the CertificateOrdersClient.NewListCertificatesPager +// method. +type CertificateOrdersClientListCertificatesOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientListOptions contains the optional parameters for the CertificateOrdersClient.NewListPager method. +type CertificateOrdersClientListOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientReissueOptions contains the optional parameters for the CertificateOrdersClient.Reissue method. +type CertificateOrdersClientReissueOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientRenewOptions contains the optional parameters for the CertificateOrdersClient.Renew method. +type CertificateOrdersClientRenewOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientResendEmailOptions contains the optional parameters for the CertificateOrdersClient.ResendEmail +// method. +type CertificateOrdersClientResendEmailOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientResendRequestEmailsOptions contains the optional parameters for the CertificateOrdersClient.ResendRequestEmails +// method. +type CertificateOrdersClientResendRequestEmailsOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientRetrieveCertificateActionsOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateActions +// method. +type CertificateOrdersClientRetrieveCertificateActionsOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientRetrieveCertificateEmailHistoryOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateEmailHistory +// method. +type CertificateOrdersClientRetrieveCertificateEmailHistoryOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientRetrieveSiteSealOptions contains the optional parameters for the CertificateOrdersClient.RetrieveSiteSeal +// method. +type CertificateOrdersClientRetrieveSiteSealOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.UpdateCertificate +// method. +type CertificateOrdersClientUpdateCertificateOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientUpdateOptions contains the optional parameters for the CertificateOrdersClient.Update method. +type CertificateOrdersClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientValidatePurchaseInformationOptions contains the optional parameters for the CertificateOrdersClient.ValidatePurchaseInformation +// method. +type CertificateOrdersClientValidatePurchaseInformationOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientVerifyDomainOwnershipOptions contains the optional parameters for the CertificateOrdersClient.VerifyDomainOwnership +// method. +type CertificateOrdersClientVerifyDomainOwnershipOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions contains the optional parameters +// for the CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse method. +type CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions struct { + // The end time for the detector response. + EndTime *time.Time + + // The start time for detector response. + StartTime *time.Time + + // The time grain for the detector response. + TimeGrain *string +} + +// CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions contains the optional parameters +// for the CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager method. +type CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions struct { + // placeholder for future optional parameters +} + +// CertificateRegistrationProviderClientListOperationsOptions contains the optional parameters for the CertificateRegistrationProviderClient.NewListOperationsPager +// method. +type CertificateRegistrationProviderClientListOperationsOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. +type CertificatesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. +type CertificatesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. +type CertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientListByResourceGroupOptions contains the optional parameters for the CertificatesClient.NewListByResourceGroupPager +// method. +type CertificatesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. +type CertificatesClientListOptions struct { + // Return only information specified in the filter (using OData syntax). For example: $filter=KeyVaultId eq 'KeyVaultId' + Filter *string +} + +// CertificatesClientUpdateOptions contains the optional parameters for the CertificatesClient.Update method. +type CertificatesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate +// method. +type ContainerAppsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete method. +type ContainerAppsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. +type ContainerAppsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager +// method. +type ContainerAppsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager +// method. +type ContainerAppsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets method. +type ContainerAppsClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientActivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.ActivateRevision +// method. +type ContainerAppsRevisionsClientActivateRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientDeactivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.DeactivateRevision +// method. +type ContainerAppsRevisionsClientDeactivateRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientGetRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.GetRevision +// method. +type ContainerAppsRevisionsClientGetRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager +// method. +type ContainerAppsRevisionsClientListRevisionsOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientRestartRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.RestartRevision +// method. +type ContainerAppsRevisionsClientRestartRevisionOptions struct { + // placeholder for future optional parameters +} + +// DeletedWebAppsClientGetDeletedWebAppByLocationOptions contains the optional parameters for the DeletedWebAppsClient.GetDeletedWebAppByLocation +// method. +type DeletedWebAppsClientGetDeletedWebAppByLocationOptions struct { + // placeholder for future optional parameters +} + +// DeletedWebAppsClientListByLocationOptions contains the optional parameters for the DeletedWebAppsClient.NewListByLocationPager +// method. +type DeletedWebAppsClientListByLocationOptions struct { + // placeholder for future optional parameters +} + +// DeletedWebAppsClientListOptions contains the optional parameters for the DeletedWebAppsClient.NewListPager method. +type DeletedWebAppsClientListOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientExecuteSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysis +// method. +type DiagnosticsClientExecuteSiteAnalysisOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientExecuteSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysisSlot +// method. +type DiagnosticsClientExecuteSiteAnalysisSlotOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientExecuteSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetector +// method. +type DiagnosticsClientExecuteSiteDetectorOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientExecuteSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetectorSlot +// method. +type DiagnosticsClientExecuteSiteDetectorSlotOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetHostingEnvironmentDetectorResponse +// method. +type DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientGetSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysis method. +type DiagnosticsClientGetSiteAnalysisOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientGetSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysisSlot +// method. +type DiagnosticsClientGetSiteAnalysisSlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientGetSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetector method. +type DiagnosticsClientGetSiteDetectorOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientGetSiteDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponse +// method. +type DiagnosticsClientGetSiteDetectorResponseOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientGetSiteDetectorResponseSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponseSlot +// method. +type DiagnosticsClientGetSiteDetectorResponseSlotOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientGetSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorSlot +// method. +type DiagnosticsClientGetSiteDetectorSlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientGetSiteDiagnosticCategoryOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategory +// method. +type DiagnosticsClientGetSiteDiagnosticCategoryOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientGetSiteDiagnosticCategorySlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategorySlot +// method. +type DiagnosticsClientGetSiteDiagnosticCategorySlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager +// method. +type DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteAnalysesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteAnalysesPager +// method. +type DiagnosticsClientListSiteAnalysesOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteAnalysesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteAnalysesSlotPager +// method. +type DiagnosticsClientListSiteAnalysesSlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorResponsesPager +// method. +type DiagnosticsClientListSiteDetectorResponsesOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDetectorResponsesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorResponsesSlotPager +// method. +type DiagnosticsClientListSiteDetectorResponsesSlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDetectorsOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorsPager +// method. +type DiagnosticsClientListSiteDetectorsOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDetectorsSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorsSlotPager +// method. +type DiagnosticsClientListSiteDetectorsSlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDiagnosticCategoriesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDiagnosticCategoriesPager +// method. +type DiagnosticsClientListSiteDiagnosticCategoriesOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager +// method. +type DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions struct { + // placeholder for future optional parameters +} + +// DomainRegistrationProviderClientListOperationsOptions contains the optional parameters for the DomainRegistrationProviderClient.NewListOperationsPager +// method. +type DomainRegistrationProviderClientListOperationsOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the DomainsClient.BeginCreateOrUpdate method. +type DomainsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DomainsClientCheckAvailabilityOptions contains the optional parameters for the DomainsClient.CheckAvailability method. +type DomainsClientCheckAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientCreateOrUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.CreateOrUpdateOwnershipIdentifier +// method. +type DomainsClientCreateOrUpdateOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientDeleteOptions contains the optional parameters for the DomainsClient.Delete method. +type DomainsClientDeleteOptions struct { + // Specify true to delete the domain immediately. The default is false which deletes the domain after 24 hours. + ForceHardDeleteDomain *bool +} + +// DomainsClientDeleteOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.DeleteOwnershipIdentifier +// method. +type DomainsClientDeleteOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientGetControlCenterSsoRequestOptions contains the optional parameters for the DomainsClient.GetControlCenterSsoRequest +// method. +type DomainsClientGetControlCenterSsoRequestOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientGetOptions contains the optional parameters for the DomainsClient.Get method. +type DomainsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientGetOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.GetOwnershipIdentifier +// method. +type DomainsClientGetOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientListByResourceGroupOptions contains the optional parameters for the DomainsClient.NewListByResourceGroupPager +// method. +type DomainsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientListOptions contains the optional parameters for the DomainsClient.NewListPager method. +type DomainsClientListOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientListOwnershipIdentifiersOptions contains the optional parameters for the DomainsClient.NewListOwnershipIdentifiersPager +// method. +type DomainsClientListOwnershipIdentifiersOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientListRecommendationsOptions contains the optional parameters for the DomainsClient.NewListRecommendationsPager +// method. +type DomainsClientListRecommendationsOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientRenewOptions contains the optional parameters for the DomainsClient.Renew method. +type DomainsClientRenewOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientTransferOutOptions contains the optional parameters for the DomainsClient.TransferOut method. +type DomainsClientTransferOutOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientUpdateOptions contains the optional parameters for the DomainsClient.Update method. +type DomainsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.UpdateOwnershipIdentifier +// method. +type DomainsClientUpdateOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection +// method. +type EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginChangeVnetOptions contains the optional parameters for the EnvironmentsClient.BeginChangeVnet method. +type EnvironmentsClientBeginChangeVnetOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateMultiRolePool +// method. +type EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdate +// method. +type EnvironmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateWorkerPool +// method. +type EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginDeleteOptions contains the optional parameters for the EnvironmentsClient.BeginDelete method. +type EnvironmentsClientBeginDeleteOptions struct { + // Specify true to force the deletion even if the App Service Environment contains resources. The default is false. + ForceDelete *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginDeletePrivateEndpointConnection +// method. +type EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginResumeOptions contains the optional parameters for the EnvironmentsClient.BeginResume method. +type EnvironmentsClientBeginResumeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginSuspendOptions contains the optional parameters for the EnvironmentsClient.BeginSuspend method. +type EnvironmentsClientBeginSuspendOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginUpgradeOptions contains the optional parameters for the EnvironmentsClient.BeginUpgrade method. +type EnvironmentsClientBeginUpgradeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration +// method. +type EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseCustomDNSSuffixConfiguration +// method. +type EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetAseV3NetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseV3NetworkingConfiguration +// method. +type EnvironmentsClientGetAseV3NetworkingConfigurationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetDiagnosticsItemOptions contains the optional parameters for the EnvironmentsClient.GetDiagnosticsItem +// method. +type EnvironmentsClientGetDiagnosticsItemOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager +// method. +type EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.GetMultiRolePool +// method. +type EnvironmentsClientGetMultiRolePoolOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. +type EnvironmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager +// method. +type EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the EnvironmentsClient.NewGetPrivateEndpointConnectionListPager +// method. +type EnvironmentsClientGetPrivateEndpointConnectionListOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.GetPrivateEndpointConnection +// method. +type EnvironmentsClientGetPrivateEndpointConnectionOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetPrivateLinkResourcesOptions contains the optional parameters for the EnvironmentsClient.GetPrivateLinkResources +// method. +type EnvironmentsClientGetPrivateLinkResourcesOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetVipInfoOptions contains the optional parameters for the EnvironmentsClient.GetVipInfo method. +type EnvironmentsClientGetVipInfoOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.GetWorkerPool method. +type EnvironmentsClientGetWorkerPoolOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListAppServicePlansOptions contains the optional parameters for the EnvironmentsClient.NewListAppServicePlansPager +// method. +type EnvironmentsClientListAppServicePlansOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.NewListByResourceGroupPager +// method. +type EnvironmentsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListCapacitiesOptions contains the optional parameters for the EnvironmentsClient.NewListCapacitiesPager +// method. +type EnvironmentsClientListCapacitiesOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListDiagnosticsOptions contains the optional parameters for the EnvironmentsClient.ListDiagnostics method. +type EnvironmentsClientListDiagnosticsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListMultiRoleMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager +// method. +type EnvironmentsClientListMultiRoleMetricDefinitionsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager +// method. +type EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListMultiRolePoolSKUsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolSKUsPager +// method. +type EnvironmentsClientListMultiRolePoolSKUsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListMultiRolePoolsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolsPager +// method. +type EnvironmentsClientListMultiRolePoolsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListMultiRoleUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRoleUsagesPager +// method. +type EnvironmentsClientListMultiRoleUsagesOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListOperationsOptions contains the optional parameters for the EnvironmentsClient.ListOperations method. +type EnvironmentsClientListOperationsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.NewListPager method. +type EnvironmentsClientListOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListUsagesPager method. +type EnvironmentsClientListUsagesOptions struct { + // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' + // or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + // endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + Filter *string +} + +// EnvironmentsClientListWebAppsOptions contains the optional parameters for the EnvironmentsClient.NewListWebAppsPager method. +type EnvironmentsClientListWebAppsOptions struct { + // Comma separated list of app properties to include. + PropertiesToInclude *string +} + +// EnvironmentsClientListWebWorkerMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager +// method. +type EnvironmentsClientListWebWorkerMetricDefinitionsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListWebWorkerUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListWebWorkerUsagesPager +// method. +type EnvironmentsClientListWebWorkerUsagesOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager +// method. +type EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListWorkerPoolSKUsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolSKUsPager +// method. +type EnvironmentsClientListWorkerPoolSKUsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListWorkerPoolsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolsPager +// method. +type EnvironmentsClientListWorkerPoolsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientRebootOptions contains the optional parameters for the EnvironmentsClient.Reboot method. +type EnvironmentsClientRebootOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientTestUpgradeAvailableNotificationOptions contains the optional parameters for the EnvironmentsClient.TestUpgradeAvailableNotification +// method. +type EnvironmentsClientTestUpgradeAvailableNotificationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration +// method. +type EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientUpdateAseNetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseNetworkingConfiguration +// method. +type EnvironmentsClientUpdateAseNetworkingConfigurationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.UpdateMultiRolePool +// method. +type EnvironmentsClientUpdateMultiRolePoolOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientUpdateOptions contains the optional parameters for the EnvironmentsClient.Update method. +type EnvironmentsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.UpdateWorkerPool +// method. +type EnvironmentsClientUpdateWorkerPoolOptions struct { + // placeholder for future optional parameters +} + +// GetUsagesInLocationClientListOptions contains the optional parameters for the GetUsagesInLocationClient.NewListPager method. +type GetUsagesInLocationClientListOptions struct { + // placeholder for future optional parameters +} + +// GlobalClientGetDeletedWebAppOptions contains the optional parameters for the GlobalClient.GetDeletedWebApp method. +type GlobalClientGetDeletedWebAppOptions struct { + // placeholder for future optional parameters +} + +// GlobalClientGetDeletedWebAppSnapshotsOptions contains the optional parameters for the GlobalClient.GetDeletedWebAppSnapshots +// method. +type GlobalClientGetDeletedWebAppSnapshotsOptions struct { + // placeholder for future optional parameters +} + +// GlobalClientGetSubscriptionOperationWithAsyncResponseOptions contains the optional parameters for the GlobalClient.GetSubscriptionOperationWithAsyncResponse +// method. +type GlobalClientGetSubscriptionOperationWithAsyncResponseOptions struct { + // placeholder for future optional parameters +} + +// KubeEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.BeginCreateOrUpdate +// method. +type KubeEnvironmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KubeEnvironmentsClientBeginDeleteOptions contains the optional parameters for the KubeEnvironmentsClient.BeginDelete method. +type KubeEnvironmentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KubeEnvironmentsClientGetOptions contains the optional parameters for the KubeEnvironmentsClient.Get method. +type KubeEnvironmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// KubeEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the KubeEnvironmentsClient.NewListByResourceGroupPager +// method. +type KubeEnvironmentsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// KubeEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the KubeEnvironmentsClient.NewListBySubscriptionPager +// method. +type KubeEnvironmentsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// KubeEnvironmentsClientUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.Update method. +type KubeEnvironmentsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// PlansClientBeginCreateOrUpdateOptions contains the optional parameters for the PlansClient.BeginCreateOrUpdate method. +type PlansClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PlansClientCreateOrUpdateVnetRouteOptions contains the optional parameters for the PlansClient.CreateOrUpdateVnetRoute +// method. +type PlansClientCreateOrUpdateVnetRouteOptions struct { + // placeholder for future optional parameters +} + +// PlansClientDeleteHybridConnectionOptions contains the optional parameters for the PlansClient.DeleteHybridConnection method. +type PlansClientDeleteHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// PlansClientDeleteOptions contains the optional parameters for the PlansClient.Delete method. +type PlansClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PlansClientDeleteVnetRouteOptions contains the optional parameters for the PlansClient.DeleteVnetRoute method. +type PlansClientDeleteVnetRouteOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetHybridConnectionOptions contains the optional parameters for the PlansClient.GetHybridConnection method. +type PlansClientGetHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetHybridConnectionPlanLimitOptions contains the optional parameters for the PlansClient.GetHybridConnectionPlanLimit +// method. +type PlansClientGetHybridConnectionPlanLimitOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetOptions contains the optional parameters for the PlansClient.Get method. +type PlansClientGetOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetRouteForVnetOptions contains the optional parameters for the PlansClient.GetRouteForVnet method. +type PlansClientGetRouteForVnetOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetServerFarmSKUsOptions contains the optional parameters for the PlansClient.GetServerFarmSKUs method. +type PlansClientGetServerFarmSKUsOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetVnetFromServerFarmOptions contains the optional parameters for the PlansClient.GetVnetFromServerFarm method. +type PlansClientGetVnetFromServerFarmOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetVnetGatewayOptions contains the optional parameters for the PlansClient.GetVnetGateway method. +type PlansClientGetVnetGatewayOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListByResourceGroupOptions contains the optional parameters for the PlansClient.NewListByResourceGroupPager +// method. +type PlansClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListCapabilitiesOptions contains the optional parameters for the PlansClient.ListCapabilities method. +type PlansClientListCapabilitiesOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListHybridConnectionKeysOptions contains the optional parameters for the PlansClient.ListHybridConnectionKeys +// method. +type PlansClientListHybridConnectionKeysOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListHybridConnectionsOptions contains the optional parameters for the PlansClient.NewListHybridConnectionsPager +// method. +type PlansClientListHybridConnectionsOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListOptions contains the optional parameters for the PlansClient.NewListPager method. +type PlansClientListOptions struct { + // Specify true to return all App Service plan properties. The default is false, which returns a subset of the properties. + // Retrieval of all properties may increase the API latency. + Detailed *bool +} + +// PlansClientListRoutesForVnetOptions contains the optional parameters for the PlansClient.ListRoutesForVnet method. +type PlansClientListRoutesForVnetOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListUsagesOptions contains the optional parameters for the PlansClient.NewListUsagesPager method. +type PlansClientListUsagesOptions struct { + // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' + // or name.value eq 'Metric2'). + Filter *string +} + +// PlansClientListVnetsOptions contains the optional parameters for the PlansClient.ListVnets method. +type PlansClientListVnetsOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListWebAppsByHybridConnectionOptions contains the optional parameters for the PlansClient.NewListWebAppsByHybridConnectionPager +// method. +type PlansClientListWebAppsByHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListWebAppsOptions contains the optional parameters for the PlansClient.NewListWebAppsPager method. +type PlansClientListWebAppsOptions struct { + // Supported filter: $filter=state eq running. Returns only web apps that are currently running + Filter *string + + // Skip to a web app in the list of webapps associated with app service plan. If specified, the resulting list will contain + // web apps starting from (including) the skipToken. Otherwise, the resulting list + // contains web apps from the start of the list + SkipToken *string + + // List page size. If specified, results are paged. + Top *string +} + +// PlansClientRebootWorkerOptions contains the optional parameters for the PlansClient.RebootWorker method. +type PlansClientRebootWorkerOptions struct { + // placeholder for future optional parameters +} + +// PlansClientRestartWebAppsOptions contains the optional parameters for the PlansClient.RestartWebApps method. +type PlansClientRestartWebAppsOptions struct { + // Specify true to perform a soft restart, applies the configuration settings and restarts the apps if necessary. The default + // is false, which always restarts and reprovisions the apps + SoftRestart *bool +} + +// PlansClientUpdateOptions contains the optional parameters for the PlansClient.Update method. +type PlansClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// PlansClientUpdateVnetGatewayOptions contains the optional parameters for the PlansClient.UpdateVnetGateway method. +type PlansClientUpdateVnetGatewayOptions struct { + // placeholder for future optional parameters +} + +// PlansClientUpdateVnetRouteOptions contains the optional parameters for the PlansClient.UpdateVnetRoute method. +type PlansClientUpdateVnetRouteOptions struct { + // placeholder for future optional parameters +} + +// ProviderClientGetAvailableStacksOnPremOptions contains the optional parameters for the ProviderClient.NewGetAvailableStacksOnPremPager +// method. +type ProviderClientGetAvailableStacksOnPremOptions struct { + OSTypeSelected *ProviderOsTypeSelected +} + +// ProviderClientGetAvailableStacksOptions contains the optional parameters for the ProviderClient.NewGetAvailableStacksPager +// method. +type ProviderClientGetAvailableStacksOptions struct { + OSTypeSelected *ProviderOsTypeSelected +} + +// ProviderClientGetFunctionAppStacksForLocationOptions contains the optional parameters for the ProviderClient.NewGetFunctionAppStacksForLocationPager +// method. +type ProviderClientGetFunctionAppStacksForLocationOptions struct { + // Stack OS Type + StackOsType *ProviderStackOsType +} + +// ProviderClientGetFunctionAppStacksOptions contains the optional parameters for the ProviderClient.NewGetFunctionAppStacksPager +// method. +type ProviderClientGetFunctionAppStacksOptions struct { + // Stack OS Type + StackOsType *ProviderStackOsType +} + +// ProviderClientGetWebAppStacksForLocationOptions contains the optional parameters for the ProviderClient.NewGetWebAppStacksForLocationPager +// method. +type ProviderClientGetWebAppStacksForLocationOptions struct { + // Stack OS Type + StackOsType *ProviderStackOsType +} + +// ProviderClientGetWebAppStacksOptions contains the optional parameters for the ProviderClient.NewGetWebAppStacksPager method. +type ProviderClientGetWebAppStacksOptions struct { + // Stack OS Type + StackOsType *ProviderStackOsType +} + +// ProviderClientListOperationsOptions contains the optional parameters for the ProviderClient.NewListOperationsPager method. +type ProviderClientListOperationsOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientDisableAllForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableAllForHostingEnvironment +// method. +type RecommendationsClientDisableAllForHostingEnvironmentOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientDisableAllForWebAppOptions contains the optional parameters for the RecommendationsClient.DisableAllForWebApp +// method. +type RecommendationsClientDisableAllForWebAppOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientDisableRecommendationForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForHostingEnvironment +// method. +type RecommendationsClientDisableRecommendationForHostingEnvironmentOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientDisableRecommendationForSiteOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSite +// method. +type RecommendationsClientDisableRecommendationForSiteOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientDisableRecommendationForSubscriptionOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSubscription +// method. +type RecommendationsClientDisableRecommendationForSubscriptionOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByHostingEnvironment +// method. +type RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions struct { + // The GUID of the recommendation object if you query an expired one. You don't need to specify it to query an active entry. + RecommendationID *string + + // Specify true to update the last-seen timestamp of the recommendation object. + UpdateSeen *bool +} + +// RecommendationsClientGetRuleDetailsByWebAppOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByWebApp +// method. +type RecommendationsClientGetRuleDetailsByWebAppOptions struct { + // The GUID of the recommendation object if you query an expired one. You don't need to specify it to query an active entry. + RecommendationID *string + + // Specify true to update the last-seen timestamp of the recommendation object. + UpdateSeen *bool +} + +// RecommendationsClientListHistoryForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.NewListHistoryForHostingEnvironmentPager +// method. +type RecommendationsClientListHistoryForHostingEnvironmentOptions struct { + // Specify false to return all recommendations. The default is true, which returns only expired recommendations. + ExpiredOnly *bool + + // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + // duration'[PT1H|PT1M|P1D] + Filter *string +} + +// RecommendationsClientListHistoryForWebAppOptions contains the optional parameters for the RecommendationsClient.NewListHistoryForWebAppPager +// method. +type RecommendationsClientListHistoryForWebAppOptions struct { + // Specify false to return all recommendations. The default is true, which returns only expired recommendations. + ExpiredOnly *bool + + // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + // duration'[PT1H|PT1M|P1D] + Filter *string +} + +// RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.NewListPager method. +type RecommendationsClientListOptions struct { + // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. + Featured *bool + + // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + // duration'[PT1H|PT1M|P1D] + Filter *string +} + +// RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager +// method. +type RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions struct { + // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. + Featured *bool + + // Return only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' + // or channel eq 'Notification' + Filter *string +} + +// RecommendationsClientListRecommendedRulesForWebAppOptions contains the optional parameters for the RecommendationsClient.NewListRecommendedRulesForWebAppPager +// method. +type RecommendationsClientListRecommendedRulesForWebAppOptions struct { + // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. + Featured *bool + + // Return only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' + // or channel eq 'Notification' + Filter *string +} + +// RecommendationsClientResetAllFiltersForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForHostingEnvironment +// method. +type RecommendationsClientResetAllFiltersForHostingEnvironmentOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientResetAllFiltersForWebAppOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForWebApp +// method. +type RecommendationsClientResetAllFiltersForWebAppOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientResetAllFiltersOptions contains the optional parameters for the RecommendationsClient.ResetAllFilters +// method. +type RecommendationsClientResetAllFiltersOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientGetBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySite +// method. +type ResourceHealthMetadataClientGetBySiteOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientGetBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySiteSlot +// method. +type ResourceHealthMetadataClientGetBySiteSlotOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientListByResourceGroupOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListByResourceGroupPager +// method. +type ResourceHealthMetadataClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientListBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListBySitePager +// method. +type ResourceHealthMetadataClientListBySiteOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientListBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListBySiteSlotPager +// method. +type ResourceHealthMetadataClientListBySiteSlotOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientListOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListPager +// method. +type ResourceHealthMetadataClientListOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection +// method. +type StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain +// method. +type StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginCreateOrUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSite +// method. +type StaticSitesClientBeginCreateOrUpdateStaticSiteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild +// method. +type StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSite +// method. +type StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.BeginDeletePrivateEndpointConnection +// method. +type StaticSitesClientBeginDeletePrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginDeleteStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteBuild +// method. +type StaticSitesClientBeginDeleteStaticSiteBuildOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteCustomDomain +// method. +type StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginDeleteStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSite +// method. +type StaticSitesClientBeginDeleteStaticSiteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginDetachStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDetachStaticSite +// method. +type StaticSitesClientBeginDetachStaticSiteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginLinkBackendOptions contains the optional parameters for the StaticSitesClient.BeginLinkBackend method. +type StaticSitesClientBeginLinkBackendOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginLinkBackendToBuildOptions contains the optional parameters for the StaticSitesClient.BeginLinkBackendToBuild +// method. +type StaticSitesClientBeginLinkBackendToBuildOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions contains the optional parameters for the +// StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild method. +type StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions struct { + // Specify true to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is + // already configured on the function app. The default is false. + IsForced *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite +// method. +type StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions struct { + // Specify true to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is + // already configured on the function app. The default is false. + IsForced *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginValidateBackendForBuildOptions contains the optional parameters for the StaticSitesClient.BeginValidateBackendForBuild +// method. +type StaticSitesClientBeginValidateBackendForBuildOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginValidateBackendOptions contains the optional parameters for the StaticSitesClient.BeginValidateBackend +// method. +type StaticSitesClientBeginValidateBackendOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite +// method. +type StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientCreateOrUpdateBasicAuthOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBasicAuth +// method. +type StaticSitesClientCreateOrUpdateBasicAuthOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBuildDatabaseConnection +// method. +type StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateDatabaseConnection +// method. +type StaticSitesClientCreateOrUpdateDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteAppSettings +// method. +type StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings +// method. +type StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings +// method. +type StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings +// method. +type StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateUserRolesInvitationLinkOptions contains the optional parameters for the StaticSitesClient.CreateUserRolesInvitationLink +// method. +type StaticSitesClientCreateUserRolesInvitationLinkOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDeleteBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteBuildDatabaseConnection +// method. +type StaticSitesClientDeleteBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDeleteDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteDatabaseConnection +// method. +type StaticSitesClientDeleteDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDeleteStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.DeleteStaticSiteUser +// method. +type StaticSitesClientDeleteStaticSiteUserOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild +// method. +type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions contains the optional parameters for the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite +// method. +type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBasicAuthOptions contains the optional parameters for the StaticSitesClient.GetBasicAuth method. +type StaticSitesClientGetBasicAuthOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnection +// method. +type StaticSitesClientGetBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnectionWithDetails +// method. +type StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.NewGetBuildDatabaseConnectionsPager +// method. +type StaticSitesClientGetBuildDatabaseConnectionsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager +// method. +type StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnection +// method. +type StaticSitesClientGetDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnectionWithDetails +// method. +type StaticSitesClientGetDatabaseConnectionWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.NewGetDatabaseConnectionsPager +// method. +type StaticSitesClientGetDatabaseConnectionsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager +// method. +type StaticSitesClientGetDatabaseConnectionsWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetLinkedBackendForBuildOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackendForBuild +// method. +type StaticSitesClientGetLinkedBackendForBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetLinkedBackendOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackend method. +type StaticSitesClientGetLinkedBackendOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetLinkedBackendsForBuildOptions contains the optional parameters for the StaticSitesClient.NewGetLinkedBackendsForBuildPager +// method. +type StaticSitesClientGetLinkedBackendsForBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetLinkedBackendsOptions contains the optional parameters for the StaticSitesClient.NewGetLinkedBackendsPager +// method. +type StaticSitesClientGetLinkedBackendsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the StaticSitesClient.NewGetPrivateEndpointConnectionListPager +// method. +type StaticSitesClientGetPrivateEndpointConnectionListOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnection +// method. +type StaticSitesClientGetPrivateEndpointConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetPrivateLinkResourcesOptions contains the optional parameters for the StaticSitesClient.GetPrivateLinkResources +// method. +type StaticSitesClientGetPrivateLinkResourcesOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteBuild +// method. +type StaticSitesClientGetStaticSiteBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetStaticSiteBuildsOptions contains the optional parameters for the StaticSitesClient.NewGetStaticSiteBuildsPager +// method. +type StaticSitesClientGetStaticSiteBuildsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteCustomDomain +// method. +type StaticSitesClientGetStaticSiteCustomDomainOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetStaticSite method. +type StaticSitesClientGetStaticSiteOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetStaticSitesByResourceGroupOptions contains the optional parameters for the StaticSitesClient.NewGetStaticSitesByResourceGroupPager +// method. +type StaticSitesClientGetStaticSitesByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild +// method. +type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSite +// method. +type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager +// method. +type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions contains the optional parameters for the StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager +// method. +type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListBasicAuthOptions contains the optional parameters for the StaticSitesClient.NewListBasicAuthPager +// method. +type StaticSitesClientListBasicAuthOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListOptions contains the optional parameters for the StaticSitesClient.NewListPager method. +type StaticSitesClientListOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteAppSettings +// method. +type StaticSitesClientListStaticSiteAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildAppSettings +// method. +type StaticSitesClientListStaticSiteBuildAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildFunctionAppSettings +// method. +type StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteBuildFunctionsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteBuildFunctionsPager +// method. +type StaticSitesClientListStaticSiteBuildFunctionsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteConfiguredRolesOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteConfiguredRoles +// method. +type StaticSitesClientListStaticSiteConfiguredRolesOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteCustomDomainsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteCustomDomainsPager +// method. +type StaticSitesClientListStaticSiteCustomDomainsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctionAppSettings +// method. +type StaticSitesClientListStaticSiteFunctionAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteFunctionsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteFunctionsPager +// method. +type StaticSitesClientListStaticSiteFunctionsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteSecretsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteSecrets +// method. +type StaticSitesClientListStaticSiteSecretsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteUsersOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteUsersPager +// method. +type StaticSitesClientListStaticSiteUsersOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientPreviewWorkflowOptions contains the optional parameters for the StaticSitesClient.PreviewWorkflow method. +type StaticSitesClientPreviewWorkflowOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientResetStaticSiteAPIKeyOptions contains the optional parameters for the StaticSitesClient.ResetStaticSiteAPIKey +// method. +type StaticSitesClientResetStaticSiteAPIKeyOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientUnlinkBackendFromBuildOptions contains the optional parameters for the StaticSitesClient.UnlinkBackendFromBuild +// method. +type StaticSitesClientUnlinkBackendFromBuildOptions struct { + // Decides if auth will be removed from backend configuration + IsCleaningAuthConfig *bool +} + +// StaticSitesClientUnlinkBackendOptions contains the optional parameters for the StaticSitesClient.UnlinkBackend method. +type StaticSitesClientUnlinkBackendOptions struct { + // Decides if Easy Auth configuration will be removed from backend configuration + IsCleaningAuthConfig *bool +} + +// StaticSitesClientUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateBuildDatabaseConnection +// method. +type StaticSitesClientUpdateBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateDatabaseConnection +// method. +type StaticSitesClientUpdateDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSite method. +type StaticSitesClientUpdateStaticSiteOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientUpdateStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSiteUser +// method. +type StaticSitesClientUpdateStaticSiteUserOptions struct { + // placeholder for future optional parameters +} + +// TopLevelDomainsClientGetOptions contains the optional parameters for the TopLevelDomainsClient.Get method. +type TopLevelDomainsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TopLevelDomainsClientListAgreementsOptions contains the optional parameters for the TopLevelDomainsClient.NewListAgreementsPager +// method. +type TopLevelDomainsClientListAgreementsOptions struct { + // placeholder for future optional parameters +} + +// TopLevelDomainsClientListOptions contains the optional parameters for the TopLevelDomainsClient.NewListPager method. +type TopLevelDomainsClientListOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientAddPremierAddOnOptions contains the optional parameters for the WebAppsClient.AddPremierAddOn method. +type WebAppsClientAddPremierAddOnOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientAddPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.AddPremierAddOnSlot method. +type WebAppsClientAddPremierAddOnSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientAnalyzeCustomHostnameOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostname +// method. +type WebAppsClientAnalyzeCustomHostnameOptions struct { + // Custom hostname. + HostName *string +} + +// WebAppsClientAnalyzeCustomHostnameSlotOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostnameSlot +// method. +type WebAppsClientAnalyzeCustomHostnameSlotOptions struct { + // Custom hostname. + HostName *string +} + +// WebAppsClientApplySlotConfigToProductionOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigToProduction +// method. +type WebAppsClientApplySlotConfigToProductionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientApplySlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigurationSlot +// method. +type WebAppsClientApplySlotConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientBackupOptions contains the optional parameters for the WebAppsClient.Backup method. +type WebAppsClientBackupOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientBackupSlotOptions contains the optional parameters for the WebAppsClient.BackupSlot method. +type WebAppsClientBackupSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection +// method. +type WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot +// method. +type WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateFunctionOptions contains the optional parameters for the WebAppsClient.BeginCreateFunction method. +type WebAppsClientBeginCreateFunctionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceFunctionSlot +// method. +type WebAppsClientBeginCreateInstanceFunctionSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateInstanceMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperation +// method. +type WebAppsClientBeginCreateInstanceMSDeployOperationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperationSlot +// method. +type WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperation +// method. +type WebAppsClientBeginCreateMSDeployOperationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperationSlot +// method. +type WebAppsClientBeginCreateMSDeployOperationSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdate method. +type WebAppsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateOrUpdateSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSlot +// method. +type WebAppsClientBeginCreateOrUpdateSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateOrUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControl +// method. +type WebAppsClientBeginCreateOrUpdateSourceControlOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControlSlot +// method. +type WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnection +// method. +type WebAppsClientBeginDeletePrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnectionSlot +// method. +type WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginGetProductionSiteDeploymentStatusOptions contains the optional parameters for the WebAppsClient.BeginGetProductionSiteDeploymentStatus +// method. +type WebAppsClientBeginGetProductionSiteDeploymentStatusOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions contains the optional parameters for the WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot +// method. +type WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginInstallSiteExtensionOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtension +// method. +type WebAppsClientBeginInstallSiteExtensionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginInstallSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtensionSlot +// method. +type WebAppsClientBeginInstallSiteExtensionSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginListPublishingCredentialsOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentials +// method. +type WebAppsClientBeginListPublishingCredentialsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginListPublishingCredentialsSlotOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentialsSlot +// method. +type WebAppsClientBeginListPublishingCredentialsSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginMigrateMySQLOptions contains the optional parameters for the WebAppsClient.BeginMigrateMySQL method. +type WebAppsClientBeginMigrateMySQLOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginMigrateStorageOptions contains the optional parameters for the WebAppsClient.BeginMigrateStorage method. +type WebAppsClientBeginMigrateStorageOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreFromBackupBlobOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlob +// method. +type WebAppsClientBeginRestoreFromBackupBlobOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreFromBackupBlobSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlobSlot +// method. +type WebAppsClientBeginRestoreFromBackupBlobSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreFromDeletedAppOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedApp +// method. +type WebAppsClientBeginRestoreFromDeletedAppOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreFromDeletedAppSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedAppSlot +// method. +type WebAppsClientBeginRestoreFromDeletedAppSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreOptions contains the optional parameters for the WebAppsClient.BeginRestore method. +type WebAppsClientBeginRestoreOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSlot method. +type WebAppsClientBeginRestoreSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreSnapshotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshot method. +type WebAppsClientBeginRestoreSnapshotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreSnapshotSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshotSlot +// method. +type WebAppsClientBeginRestoreSnapshotSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginStartNetworkTraceOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTrace +// method. +type WebAppsClientBeginStartNetworkTraceOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // Resumes the LRO from the provided token. + ResumeToken string + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientBeginStartNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTraceSlot +// method. +type WebAppsClientBeginStartNetworkTraceSlotOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // Resumes the LRO from the provided token. + ResumeToken string + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperation +// method. +type WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // Resumes the LRO from the provided token. + ResumeToken string + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot +// method. +type WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // Resumes the LRO from the provided token. + ResumeToken string + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientBeginSwapSlotOptions contains the optional parameters for the WebAppsClient.BeginSwapSlot method. +type WebAppsClientBeginSwapSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginSwapSlotWithProductionOptions contains the optional parameters for the WebAppsClient.BeginSwapSlotWithProduction +// method. +type WebAppsClientBeginSwapSlotWithProductionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientCreateDeploymentOptions contains the optional parameters for the WebAppsClient.CreateDeployment method. +type WebAppsClientCreateDeploymentOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateDeploymentSlotOptions contains the optional parameters for the WebAppsClient.CreateDeploymentSlot method. +type WebAppsClientCreateDeploymentSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOneDeployOperationOptions contains the optional parameters for the WebAppsClient.CreateOneDeployOperation +// method. +type WebAppsClientCreateOneDeployOperationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfiguration +// method. +type WebAppsClientCreateOrUpdateConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfigurationSlot +// method. +type WebAppsClientCreateOrUpdateConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier +// method. +type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot +// method. +type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateFunctionSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecret +// method. +type WebAppsClientCreateOrUpdateFunctionSecretOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecretSlot +// method. +type WebAppsClientCreateOrUpdateFunctionSecretSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHostNameBindingOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBinding +// method. +type WebAppsClientCreateOrUpdateHostNameBindingOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBindingSlot +// method. +type WebAppsClientCreateOrUpdateHostNameBindingSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHostSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecret +// method. +type WebAppsClientCreateOrUpdateHostSecretOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHostSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecretSlot +// method. +type WebAppsClientCreateOrUpdateHostSecretSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnection +// method. +type WebAppsClientCreateOrUpdateHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnectionSlot +// method. +type WebAppsClientCreateOrUpdateHybridConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdatePublicCertificateOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificate +// method. +type WebAppsClientCreateOrUpdatePublicCertificateOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdatePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificateSlot +// method. +type WebAppsClientCreateOrUpdatePublicCertificateSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnection +// method. +type WebAppsClientCreateOrUpdateRelayServiceConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot +// method. +type WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateSiteContainerOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSiteContainer +// method. +type WebAppsClientCreateOrUpdateSiteContainerOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSiteContainerSlot +// method. +type WebAppsClientCreateOrUpdateSiteContainerSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck +// method. +type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot +// method. +type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGateway +// method. +type WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot +// method. +type WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnection +// method. +type WebAppsClientCreateOrUpdateVnetConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionSlot +// method. +type WebAppsClientCreateOrUpdateVnetConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteBackupConfigurationOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfiguration +// method. +type WebAppsClientDeleteBackupConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfigurationSlot +// method. +type WebAppsClientDeleteBackupConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteBackupOptions contains the optional parameters for the WebAppsClient.DeleteBackup method. +type WebAppsClientDeleteBackupOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteBackupSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupSlot method. +type WebAppsClientDeleteBackupSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteContinuousWebJobOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJob +// method. +type WebAppsClientDeleteContinuousWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJobSlot +// method. +type WebAppsClientDeleteContinuousWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteDeploymentOptions contains the optional parameters for the WebAppsClient.DeleteDeployment method. +type WebAppsClientDeleteDeploymentOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteDeploymentSlotOptions contains the optional parameters for the WebAppsClient.DeleteDeploymentSlot method. +type WebAppsClientDeleteDeploymentSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifier +// method. +type WebAppsClientDeleteDomainOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifierSlot +// method. +type WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteFunctionOptions contains the optional parameters for the WebAppsClient.DeleteFunction method. +type WebAppsClientDeleteFunctionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteFunctionSecretOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecret method. +type WebAppsClientDeleteFunctionSecretOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecretSlot +// method. +type WebAppsClientDeleteFunctionSecretSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHostNameBindingOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBinding +// method. +type WebAppsClientDeleteHostNameBindingOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBindingSlot +// method. +type WebAppsClientDeleteHostNameBindingSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHostSecretOptions contains the optional parameters for the WebAppsClient.DeleteHostSecret method. +type WebAppsClientDeleteHostSecretOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHostSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostSecretSlot method. +type WebAppsClientDeleteHostSecretSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHybridConnectionOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnection +// method. +type WebAppsClientDeleteHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnectionSlot +// method. +type WebAppsClientDeleteHybridConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceFunctionSlot +// method. +type WebAppsClientDeleteInstanceFunctionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteInstanceProcessOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcess +// method. +type WebAppsClientDeleteInstanceProcessOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcessSlot +// method. +type WebAppsClientDeleteInstanceProcessSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteOptions contains the optional parameters for the WebAppsClient.Delete method. +type WebAppsClientDeleteOptions struct { + // Specify false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. + DeleteEmptyServerFarm *bool + + // If true, web app metrics are also deleted. + DeleteMetrics *bool +} + +// WebAppsClientDeletePremierAddOnOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOn method. +type WebAppsClientDeletePremierAddOnOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeletePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOnSlot +// method. +type WebAppsClientDeletePremierAddOnSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteProcessOptions contains the optional parameters for the WebAppsClient.DeleteProcess method. +type WebAppsClientDeleteProcessOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteProcessSlot method. +type WebAppsClientDeleteProcessSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeletePublicCertificateOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificate +// method. +type WebAppsClientDeletePublicCertificateOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeletePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificateSlot +// method. +type WebAppsClientDeletePublicCertificateSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnection +// method. +type WebAppsClientDeleteRelayServiceConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnectionSlot +// method. +type WebAppsClientDeleteRelayServiceConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSiteContainerOptions contains the optional parameters for the WebAppsClient.DeleteSiteContainer method. +type WebAppsClientDeleteSiteContainerOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteContainerSlot +// method. +type WebAppsClientDeleteSiteContainerSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSiteExtensionOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtension method. +type WebAppsClientDeleteSiteExtensionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtensionSlot +// method. +type WebAppsClientDeleteSiteExtensionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSlotOptions contains the optional parameters for the WebAppsClient.DeleteSlot method. +type WebAppsClientDeleteSlotOptions struct { + // Specify false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. + DeleteEmptyServerFarm *bool + + // If true, web app metrics are also deleted. + DeleteMetrics *bool +} + +// WebAppsClientDeleteSourceControlOptions contains the optional parameters for the WebAppsClient.DeleteSourceControl method. +type WebAppsClientDeleteSourceControlOptions struct { + AdditionalFlags *string +} + +// WebAppsClientDeleteSourceControlSlotOptions contains the optional parameters for the WebAppsClient.DeleteSourceControlSlot +// method. +type WebAppsClientDeleteSourceControlSlotOptions struct { + AdditionalFlags *string +} + +// WebAppsClientDeleteSwiftVirtualNetworkOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetwork +// method. +type WebAppsClientDeleteSwiftVirtualNetworkOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSwiftVirtualNetworkSlotOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetworkSlot +// method. +type WebAppsClientDeleteSwiftVirtualNetworkSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJob +// method. +type WebAppsClientDeleteTriggeredWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJobSlot +// method. +type WebAppsClientDeleteTriggeredWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteVnetConnectionOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnection method. +type WebAppsClientDeleteVnetConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnectionSlot +// method. +type WebAppsClientDeleteVnetConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeployWorkflowArtifactsOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifacts +// method. +type WebAppsClientDeployWorkflowArtifactsOptions struct { + // Application settings and files of the workflow. + WorkflowArtifacts *WorkflowArtifacts +} + +// WebAppsClientDeployWorkflowArtifactsSlotOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifactsSlot +// method. +type WebAppsClientDeployWorkflowArtifactsSlotOptions struct { + // Application settings and files of the workflow. + WorkflowArtifacts *WorkflowArtifacts +} + +// WebAppsClientDiscoverBackupOptions contains the optional parameters for the WebAppsClient.DiscoverBackup method. +type WebAppsClientDiscoverBackupOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDiscoverBackupSlotOptions contains the optional parameters for the WebAppsClient.DiscoverBackupSlot method. +type WebAppsClientDiscoverBackupSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGenerateNewSitePublishingPasswordOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPassword +// method. +type WebAppsClientGenerateNewSitePublishingPasswordOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGenerateNewSitePublishingPasswordSlotOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPasswordSlot +// method. +type WebAppsClientGenerateNewSitePublishingPasswordSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAppSettingKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReference +// method. +type WebAppsClientGetAppSettingKeyVaultReferenceOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReferenceSlot +// method. +type WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAppSettingsKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager +// method. +type WebAppsClientGetAppSettingsKeyVaultReferencesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager +// method. +type WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsOptions contains the optional parameters for the WebAppsClient.GetAuthSettings method. +type WebAppsClientGetAuthSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsSlot method. +type WebAppsClientGetAuthSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsV2Options contains the optional parameters for the WebAppsClient.GetAuthSettingsV2 method. +type WebAppsClientGetAuthSettingsV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2Slot +// method. +type WebAppsClientGetAuthSettingsV2SlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsV2WithoutSecretsOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecrets +// method. +type WebAppsClientGetAuthSettingsV2WithoutSecretsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot +// method. +type WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetBackupConfigurationOptions contains the optional parameters for the WebAppsClient.GetBackupConfiguration +// method. +type WebAppsClientGetBackupConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetBackupConfigurationSlot +// method. +type WebAppsClientGetBackupConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetBackupStatusOptions contains the optional parameters for the WebAppsClient.GetBackupStatus method. +type WebAppsClientGetBackupStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetBackupStatusSlotOptions contains the optional parameters for the WebAppsClient.GetBackupStatusSlot method. +type WebAppsClientGetBackupStatusSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetConfigurationOptions contains the optional parameters for the WebAppsClient.GetConfiguration method. +type WebAppsClientGetConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSlot method. +type WebAppsClientGetConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshot +// method. +type WebAppsClientGetConfigurationSnapshotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshotSlot +// method. +type WebAppsClientGetConfigurationSnapshotSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetContainerLogsZipOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZip method. +type WebAppsClientGetContainerLogsZipOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetContainerLogsZipSlotOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZipSlot +// method. +type WebAppsClientGetContainerLogsZipSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetContinuousWebJobOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJob method. +type WebAppsClientGetContinuousWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJobSlot +// method. +type WebAppsClientGetContinuousWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDeploymentOptions contains the optional parameters for the WebAppsClient.GetDeployment method. +type WebAppsClientGetDeploymentOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDeploymentSlotOptions contains the optional parameters for the WebAppsClient.GetDeploymentSlot method. +type WebAppsClientGetDeploymentSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDiagnosticLogsConfigurationOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfiguration +// method. +type WebAppsClientGetDiagnosticLogsConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDiagnosticLogsConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfigurationSlot +// method. +type WebAppsClientGetDiagnosticLogsConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifier +// method. +type WebAppsClientGetDomainOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifierSlot +// method. +type WebAppsClientGetDomainOwnershipIdentifierSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetFtpAllowedOptions contains the optional parameters for the WebAppsClient.GetFtpAllowed method. +type WebAppsClientGetFtpAllowedOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetFtpAllowedSlot method. +type WebAppsClientGetFtpAllowedSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetFunctionOptions contains the optional parameters for the WebAppsClient.GetFunction method. +type WebAppsClientGetFunctionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetFunctionsAdminTokenOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminToken +// method. +type WebAppsClientGetFunctionsAdminTokenOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetFunctionsAdminTokenSlotOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminTokenSlot +// method. +type WebAppsClientGetFunctionsAdminTokenSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetHostNameBindingOptions contains the optional parameters for the WebAppsClient.GetHostNameBinding method. +type WebAppsClientGetHostNameBindingOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.GetHostNameBindingSlot +// method. +type WebAppsClientGetHostNameBindingSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetHybridConnectionOptions contains the optional parameters for the WebAppsClient.GetHybridConnection method. +type WebAppsClientGetHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetHybridConnectionSlot +// method. +type WebAppsClientGetHybridConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceFunctionSlot +// method. +type WebAppsClientGetInstanceFunctionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceInfoOptions contains the optional parameters for the WebAppsClient.GetInstanceInfo method. +type WebAppsClientGetInstanceInfoOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceInfoSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceInfoSlot method. +type WebAppsClientGetInstanceInfoSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLog +// method. +type WebAppsClientGetInstanceMSDeployLogOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLogSlot +// method. +type WebAppsClientGetInstanceMSDeployLogSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceMsDeployStatusOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatus +// method. +type WebAppsClientGetInstanceMsDeployStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceMsDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatusSlot +// method. +type WebAppsClientGetInstanceMsDeployStatusSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessDumpOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDump +// method. +type WebAppsClientGetInstanceProcessDumpOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDumpSlot +// method. +type WebAppsClientGetInstanceProcessDumpSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessModuleOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModule +// method. +type WebAppsClientGetInstanceProcessModuleOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModuleSlot +// method. +type WebAppsClientGetInstanceProcessModuleSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessOptions contains the optional parameters for the WebAppsClient.GetInstanceProcess method. +type WebAppsClientGetInstanceProcessOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessSlot +// method. +type WebAppsClientGetInstanceProcessSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceWorkflowSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceWorkflowSlot +// method. +type WebAppsClientGetInstanceWorkflowSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetMSDeployLog method. +type WebAppsClientGetMSDeployLogOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployLogSlot method. +type WebAppsClientGetMSDeployLogSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMSDeployStatusOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatus method. +type WebAppsClientGetMSDeployStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMSDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatusSlot +// method. +type WebAppsClientGetMSDeployStatusSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMigrateMySQLStatusOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatus +// method. +type WebAppsClientGetMigrateMySQLStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMigrateMySQLStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatusSlot +// method. +type WebAppsClientGetMigrateMySQLStatusSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperation +// method. +type WebAppsClientGetNetworkTraceOperationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlot +// method. +type WebAppsClientGetNetworkTraceOperationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTraceOperationSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlotV2 +// method. +type WebAppsClientGetNetworkTraceOperationSlotV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTraceOperationV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationV2 +// method. +type WebAppsClientGetNetworkTraceOperationV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTracesOptions contains the optional parameters for the WebAppsClient.GetNetworkTraces method. +type WebAppsClientGetNetworkTracesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTracesSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTracesSlot method. +type WebAppsClientGetNetworkTracesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTracesSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesSlotV2 +// method. +type WebAppsClientGetNetworkTracesSlotV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTracesV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesV2 method. +type WebAppsClientGetNetworkTracesV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetOneDeployStatusOptions contains the optional parameters for the WebAppsClient.GetOneDeployStatus method. +type WebAppsClientGetOneDeployStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetOptions contains the optional parameters for the WebAppsClient.Get method. +type WebAppsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPremierAddOnOptions contains the optional parameters for the WebAppsClient.GetPremierAddOn method. +type WebAppsClientGetPremierAddOnOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.GetPremierAddOnSlot method. +type WebAppsClientGetPremierAddOnSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateAccessOptions contains the optional parameters for the WebAppsClient.GetPrivateAccess method. +type WebAppsClientGetPrivateAccessOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateAccessSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateAccessSlot method. +type WebAppsClientGetPrivateAccessSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the WebAppsClient.NewGetPrivateEndpointConnectionListPager +// method. +type WebAppsClientGetPrivateEndpointConnectionListOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateEndpointConnectionListSlotOptions contains the optional parameters for the WebAppsClient.NewGetPrivateEndpointConnectionListSlotPager +// method. +type WebAppsClientGetPrivateEndpointConnectionListSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnection +// method. +type WebAppsClientGetPrivateEndpointConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionSlot +// method. +type WebAppsClientGetPrivateEndpointConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateLinkResourcesOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResources +// method. +type WebAppsClientGetPrivateLinkResourcesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateLinkResourcesSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResourcesSlot +// method. +type WebAppsClientGetPrivateLinkResourcesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessDumpOptions contains the optional parameters for the WebAppsClient.GetProcessDump method. +type WebAppsClientGetProcessDumpOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetProcessDumpSlot method. +type WebAppsClientGetProcessDumpSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessModuleOptions contains the optional parameters for the WebAppsClient.GetProcessModule method. +type WebAppsClientGetProcessModuleOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetProcessModuleSlot method. +type WebAppsClientGetProcessModuleSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessOptions contains the optional parameters for the WebAppsClient.GetProcess method. +type WebAppsClientGetProcessOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessSlotOptions contains the optional parameters for the WebAppsClient.GetProcessSlot method. +type WebAppsClientGetProcessSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPublicCertificateOptions contains the optional parameters for the WebAppsClient.GetPublicCertificate method. +type WebAppsClientGetPublicCertificateOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.GetPublicCertificateSlot +// method. +type WebAppsClientGetPublicCertificateSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnection +// method. +type WebAppsClientGetRelayServiceConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnectionSlot +// method. +type WebAppsClientGetRelayServiceConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetScmAllowedOptions contains the optional parameters for the WebAppsClient.GetScmAllowed method. +type WebAppsClientGetScmAllowedOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetScmAllowedSlot method. +type WebAppsClientGetScmAllowedSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReference +// method. +type WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot +// method. +type WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager +// method. +type WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager +// method. +type WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteContainerOptions contains the optional parameters for the WebAppsClient.GetSiteContainer method. +type WebAppsClientGetSiteContainerOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.GetSiteContainerSlot method. +type WebAppsClientGetSiteContainerSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteExtensionOptions contains the optional parameters for the WebAppsClient.GetSiteExtension method. +type WebAppsClientGetSiteExtensionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.GetSiteExtensionSlot method. +type WebAppsClientGetSiteExtensionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSitePhpErrorLogFlagOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlag +// method. +type WebAppsClientGetSitePhpErrorLogFlagOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSitePhpErrorLogFlagSlotOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlagSlot +// method. +type WebAppsClientGetSitePhpErrorLogFlagSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSlotOptions contains the optional parameters for the WebAppsClient.GetSlot method. +type WebAppsClientGetSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSourceControlOptions contains the optional parameters for the WebAppsClient.GetSourceControl method. +type WebAppsClientGetSourceControlOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSourceControlSlotOptions contains the optional parameters for the WebAppsClient.GetSourceControlSlot method. +type WebAppsClientGetSourceControlSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSwiftVirtualNetworkConnectionOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnection +// method. +type WebAppsClientGetSwiftVirtualNetworkConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnectionSlot +// method. +type WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistory +// method. +type WebAppsClientGetTriggeredWebJobHistoryOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistorySlot +// method. +type WebAppsClientGetTriggeredWebJobHistorySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJob method. +type WebAppsClientGetTriggeredWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobSlot +// method. +type WebAppsClientGetTriggeredWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGateway +// method. +type WebAppsClientGetVnetConnectionGatewayOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGatewaySlot +// method. +type WebAppsClientGetVnetConnectionGatewaySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetVnetConnectionOptions contains the optional parameters for the WebAppsClient.GetVnetConnection method. +type WebAppsClientGetVnetConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionSlot +// method. +type WebAppsClientGetVnetConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetWebJobOptions contains the optional parameters for the WebAppsClient.GetWebJob method. +type WebAppsClientGetWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetWebJobSlot method. +type WebAppsClientGetWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetWebSiteContainerLogsOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogs +// method. +type WebAppsClientGetWebSiteContainerLogsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetWebSiteContainerLogsSlotOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogsSlot +// method. +type WebAppsClientGetWebSiteContainerLogsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetWorkflowOptions contains the optional parameters for the WebAppsClient.GetWorkflow method. +type WebAppsClientGetWorkflowOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientIsCloneableOptions contains the optional parameters for the WebAppsClient.IsCloneable method. +type WebAppsClientIsCloneableOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientIsCloneableSlotOptions contains the optional parameters for the WebAppsClient.IsCloneableSlot method. +type WebAppsClientIsCloneableSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListApplicationSettingsOptions contains the optional parameters for the WebAppsClient.ListApplicationSettings +// method. +type WebAppsClientListApplicationSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListApplicationSettingsSlot +// method. +type WebAppsClientListApplicationSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccounts +// method. +type WebAppsClientListAzureStorageAccountsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccountsSlot +// method. +type WebAppsClientListAzureStorageAccountsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBackupStatusSecretsOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecrets +// method. +type WebAppsClientListBackupStatusSecretsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBackupStatusSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecretsSlot +// method. +type WebAppsClientListBackupStatusSecretsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBackupsOptions contains the optional parameters for the WebAppsClient.NewListBackupsPager method. +type WebAppsClientListBackupsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBackupsSlotOptions contains the optional parameters for the WebAppsClient.NewListBackupsSlotPager method. +type WebAppsClientListBackupsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBasicPublishingCredentialsPoliciesOptions contains the optional parameters for the WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager +// method. +type WebAppsClientListBasicPublishingCredentialsPoliciesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions contains the optional parameters for the WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager +// method. +type WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListByResourceGroupOptions contains the optional parameters for the WebAppsClient.NewListByResourceGroupPager +// method. +type WebAppsClientListByResourceGroupOptions struct { + // Specify true to include deployment slots in results. The default is false, which only gives you the production slot of + // all apps. + IncludeSlots *bool +} + +// WebAppsClientListConfigurationSnapshotInfoOptions contains the optional parameters for the WebAppsClient.NewListConfigurationSnapshotInfoPager +// method. +type WebAppsClientListConfigurationSnapshotInfoOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListConfigurationSnapshotInfoSlotOptions contains the optional parameters for the WebAppsClient.NewListConfigurationSnapshotInfoSlotPager +// method. +type WebAppsClientListConfigurationSnapshotInfoSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListConfigurationsOptions contains the optional parameters for the WebAppsClient.NewListConfigurationsPager +// method. +type WebAppsClientListConfigurationsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListConfigurationsSlotOptions contains the optional parameters for the WebAppsClient.NewListConfigurationsSlotPager +// method. +type WebAppsClientListConfigurationsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListConnectionStringsOptions contains the optional parameters for the WebAppsClient.ListConnectionStrings +// method. +type WebAppsClientListConnectionStringsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.ListConnectionStringsSlot +// method. +type WebAppsClientListConnectionStringsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListContinuousWebJobsOptions contains the optional parameters for the WebAppsClient.NewListContinuousWebJobsPager +// method. +type WebAppsClientListContinuousWebJobsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListContinuousWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListContinuousWebJobsSlotPager +// method. +type WebAppsClientListContinuousWebJobsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDeploymentLogOptions contains the optional parameters for the WebAppsClient.ListDeploymentLog method. +type WebAppsClientListDeploymentLogOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDeploymentLogSlotOptions contains the optional parameters for the WebAppsClient.ListDeploymentLogSlot +// method. +type WebAppsClientListDeploymentLogSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDeploymentsOptions contains the optional parameters for the WebAppsClient.NewListDeploymentsPager method. +type WebAppsClientListDeploymentsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDeploymentsSlotOptions contains the optional parameters for the WebAppsClient.NewListDeploymentsSlotPager +// method. +type WebAppsClientListDeploymentsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDomainOwnershipIdentifiersOptions contains the optional parameters for the WebAppsClient.NewListDomainOwnershipIdentifiersPager +// method. +type WebAppsClientListDomainOwnershipIdentifiersOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDomainOwnershipIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager +// method. +type WebAppsClientListDomainOwnershipIdentifiersSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListFunctionKeysOptions contains the optional parameters for the WebAppsClient.ListFunctionKeys method. +type WebAppsClientListFunctionKeysOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListFunctionKeysSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionKeysSlot method. +type WebAppsClientListFunctionKeysSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListFunctionSecretsOptions contains the optional parameters for the WebAppsClient.ListFunctionSecrets method. +type WebAppsClientListFunctionSecretsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListFunctionSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionSecretsSlot +// method. +type WebAppsClientListFunctionSecretsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListFunctionsOptions contains the optional parameters for the WebAppsClient.NewListFunctionsPager method. +type WebAppsClientListFunctionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHostKeysOptions contains the optional parameters for the WebAppsClient.ListHostKeys method. +type WebAppsClientListHostKeysOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHostKeysSlotOptions contains the optional parameters for the WebAppsClient.ListHostKeysSlot method. +type WebAppsClientListHostKeysSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHostNameBindingsOptions contains the optional parameters for the WebAppsClient.NewListHostNameBindingsPager +// method. +type WebAppsClientListHostNameBindingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHostNameBindingsSlotOptions contains the optional parameters for the WebAppsClient.NewListHostNameBindingsSlotPager +// method. +type WebAppsClientListHostNameBindingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHybridConnectionsOptions contains the optional parameters for the WebAppsClient.ListHybridConnections +// method. +type WebAppsClientListHybridConnectionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHybridConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListHybridConnectionsSlot +// method. +type WebAppsClientListHybridConnectionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceFunctionsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceFunctionsSlotPager +// method. +type WebAppsClientListInstanceFunctionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceIdentifiersOptions contains the optional parameters for the WebAppsClient.NewListInstanceIdentifiersPager +// method. +type WebAppsClientListInstanceIdentifiersOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceIdentifiersSlotPager +// method. +type WebAppsClientListInstanceIdentifiersSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessModulesOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessModulesPager +// method. +type WebAppsClientListInstanceProcessModulesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessModulesSlotPager +// method. +type WebAppsClientListInstanceProcessModulesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessThreadsOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessThreadsPager +// method. +type WebAppsClientListInstanceProcessThreadsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessThreadsSlotPager +// method. +type WebAppsClientListInstanceProcessThreadsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessesOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessesPager +// method. +type WebAppsClientListInstanceProcessesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessesSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessesSlotPager +// method. +type WebAppsClientListInstanceProcessesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceWorkflowsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceWorkflowsSlotPager +// method. +type WebAppsClientListInstanceWorkflowsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListMetadataOptions contains the optional parameters for the WebAppsClient.ListMetadata method. +type WebAppsClientListMetadataOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListMetadataSlotOptions contains the optional parameters for the WebAppsClient.ListMetadataSlot method. +type WebAppsClientListMetadataSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListNetworkFeaturesOptions contains the optional parameters for the WebAppsClient.ListNetworkFeatures method. +type WebAppsClientListNetworkFeaturesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListNetworkFeaturesSlotOptions contains the optional parameters for the WebAppsClient.ListNetworkFeaturesSlot +// method. +type WebAppsClientListNetworkFeaturesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListOptions contains the optional parameters for the WebAppsClient.NewListPager method. +type WebAppsClientListOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPerfMonCountersOptions contains the optional parameters for the WebAppsClient.NewListPerfMonCountersPager +// method. +type WebAppsClientListPerfMonCountersOptions struct { + // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z + // and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + // duration'[Hour|Minute|Day]'. + Filter *string +} + +// WebAppsClientListPerfMonCountersSlotOptions contains the optional parameters for the WebAppsClient.NewListPerfMonCountersSlotPager +// method. +type WebAppsClientListPerfMonCountersSlotOptions struct { + // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z + // and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + // duration'[Hour|Minute|Day]'. + Filter *string +} + +// WebAppsClientListPremierAddOnsOptions contains the optional parameters for the WebAppsClient.ListPremierAddOns method. +type WebAppsClientListPremierAddOnsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPremierAddOnsSlotOptions contains the optional parameters for the WebAppsClient.ListPremierAddOnsSlot +// method. +type WebAppsClientListPremierAddOnsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessModulesOptions contains the optional parameters for the WebAppsClient.NewListProcessModulesPager +// method. +type WebAppsClientListProcessModulesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessModulesSlotPager +// method. +type WebAppsClientListProcessModulesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessThreadsOptions contains the optional parameters for the WebAppsClient.NewListProcessThreadsPager +// method. +type WebAppsClientListProcessThreadsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessThreadsSlotPager +// method. +type WebAppsClientListProcessThreadsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessesOptions contains the optional parameters for the WebAppsClient.NewListProcessesPager method. +type WebAppsClientListProcessesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessesSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessesSlotPager +// method. +type WebAppsClientListProcessesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProductionSiteDeploymentStatusesOptions contains the optional parameters for the WebAppsClient.NewListProductionSiteDeploymentStatusesPager +// method. +type WebAppsClientListProductionSiteDeploymentStatusesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPublicCertificatesOptions contains the optional parameters for the WebAppsClient.NewListPublicCertificatesPager +// method. +type WebAppsClientListPublicCertificatesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPublicCertificatesSlotOptions contains the optional parameters for the WebAppsClient.NewListPublicCertificatesSlotPager +// method. +type WebAppsClientListPublicCertificatesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPublishingProfileXMLWithSecretsOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecrets +// method. +type WebAppsClientListPublishingProfileXMLWithSecretsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecretsSlot +// method. +type WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListRelayServiceConnectionsOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnections +// method. +type WebAppsClientListRelayServiceConnectionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListRelayServiceConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnectionsSlot +// method. +type WebAppsClientListRelayServiceConnectionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteBackupsOptions contains the optional parameters for the WebAppsClient.NewListSiteBackupsPager method. +type WebAppsClientListSiteBackupsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteBackupsSlotOptions contains the optional parameters for the WebAppsClient.NewListSiteBackupsSlotPager +// method. +type WebAppsClientListSiteBackupsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteContainersOptions contains the optional parameters for the WebAppsClient.NewListSiteContainersPager +// method. +type WebAppsClientListSiteContainersOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteContainersSlotOptions contains the optional parameters for the WebAppsClient.NewListSiteContainersSlotPager +// method. +type WebAppsClientListSiteContainersSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteExtensionsOptions contains the optional parameters for the WebAppsClient.NewListSiteExtensionsPager +// method. +type WebAppsClientListSiteExtensionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteExtensionsSlotOptions contains the optional parameters for the WebAppsClient.NewListSiteExtensionsSlotPager +// method. +type WebAppsClientListSiteExtensionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSitePushSettingsOptions contains the optional parameters for the WebAppsClient.ListSitePushSettings method. +type WebAppsClientListSitePushSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListSitePushSettingsSlot +// method. +type WebAppsClientListSitePushSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.ListSlotConfigurationNames +// method. +type WebAppsClientListSlotConfigurationNamesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSlotDifferencesFromProductionOptions contains the optional parameters for the WebAppsClient.NewListSlotDifferencesFromProductionPager +// method. +type WebAppsClientListSlotDifferencesFromProductionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSlotDifferencesSlotOptions contains the optional parameters for the WebAppsClient.NewListSlotDifferencesSlotPager +// method. +type WebAppsClientListSlotDifferencesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSlotSiteDeploymentStatusesSlotOptions contains the optional parameters for the WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager +// method. +type WebAppsClientListSlotSiteDeploymentStatusesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSlotsOptions contains the optional parameters for the WebAppsClient.NewListSlotsPager method. +type WebAppsClientListSlotsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSnapshotsFromDRSecondaryOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsFromDRSecondaryPager +// method. +type WebAppsClientListSnapshotsFromDRSecondaryOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSnapshotsFromDRSecondarySlotOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager +// method. +type WebAppsClientListSnapshotsFromDRSecondarySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSnapshotsOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsPager method. +type WebAppsClientListSnapshotsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSnapshotsSlotOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsSlotPager +// method. +type WebAppsClientListSnapshotsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggers +// method. +type WebAppsClientListSyncFunctionTriggersOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggersSlot +// method. +type WebAppsClientListSyncFunctionTriggersSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSyncStatusOptions contains the optional parameters for the WebAppsClient.ListSyncStatus method. +type WebAppsClientListSyncStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSyncStatusSlotOptions contains the optional parameters for the WebAppsClient.ListSyncStatusSlot method. +type WebAppsClientListSyncStatusSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobHistoryPager +// method. +type WebAppsClientListTriggeredWebJobHistoryOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobHistorySlotPager +// method. +type WebAppsClientListTriggeredWebJobHistorySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListTriggeredWebJobsOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobsPager +// method. +type WebAppsClientListTriggeredWebJobsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListTriggeredWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobsSlotPager +// method. +type WebAppsClientListTriggeredWebJobsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListUsagesOptions contains the optional parameters for the WebAppsClient.NewListUsagesPager method. +type WebAppsClientListUsagesOptions struct { + // Return only information specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or + // name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq + // 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + Filter *string +} + +// WebAppsClientListUsagesSlotOptions contains the optional parameters for the WebAppsClient.NewListUsagesSlotPager method. +type WebAppsClientListUsagesSlotOptions struct { + // Return only information specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or + // name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq + // 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + Filter *string +} + +// WebAppsClientListVnetConnectionsOptions contains the optional parameters for the WebAppsClient.ListVnetConnections method. +type WebAppsClientListVnetConnectionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListVnetConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListVnetConnectionsSlot +// method. +type WebAppsClientListVnetConnectionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWebJobsOptions contains the optional parameters for the WebAppsClient.NewListWebJobsPager method. +type WebAppsClientListWebJobsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListWebJobsSlotPager method. +type WebAppsClientListWebJobsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWorkflowsConnectionsOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnections +// method. +type WebAppsClientListWorkflowsConnectionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWorkflowsConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnectionsSlot +// method. +type WebAppsClientListWorkflowsConnectionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWorkflowsOptions contains the optional parameters for the WebAppsClient.NewListWorkflowsPager method. +type WebAppsClientListWorkflowsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientPutPrivateAccessVnetOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnet method. +type WebAppsClientPutPrivateAccessVnetOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientPutPrivateAccessVnetSlotOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnetSlot +// method. +type WebAppsClientPutPrivateAccessVnetSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientRecoverSiteConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshot +// method. +type WebAppsClientRecoverSiteConfigurationSnapshotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshotSlot +// method. +type WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientResetProductionSlotConfigOptions contains the optional parameters for the WebAppsClient.ResetProductionSlotConfig +// method. +type WebAppsClientResetProductionSlotConfigOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientResetSlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ResetSlotConfigurationSlot +// method. +type WebAppsClientResetSlotConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientRestartOptions contains the optional parameters for the WebAppsClient.Restart method. +type WebAppsClientRestartOptions struct { + // Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts + // and reprovisions the app. + SoftRestart *bool + + // Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + Synchronous *bool +} + +// WebAppsClientRestartSlotOptions contains the optional parameters for the WebAppsClient.RestartSlot method. +type WebAppsClientRestartSlotOptions struct { + // Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts + // and reprovisions the app. + SoftRestart *bool + + // Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + Synchronous *bool +} + +// WebAppsClientRunTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJob method. +type WebAppsClientRunTriggeredWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientRunTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJobSlot +// method. +type WebAppsClientRunTriggeredWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStartContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJob +// method. +type WebAppsClientStartContinuousWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStartContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJobSlot +// method. +type WebAppsClientStartContinuousWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStartOptions contains the optional parameters for the WebAppsClient.Start method. +type WebAppsClientStartOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStartSlotOptions contains the optional parameters for the WebAppsClient.StartSlot method. +type WebAppsClientStartSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStartWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTrace +// method. +type WebAppsClientStartWebSiteNetworkTraceOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientStartWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTraceSlot +// method. +type WebAppsClientStartWebSiteNetworkTraceSlotOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientStopContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJob method. +type WebAppsClientStopContinuousWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJobSlot +// method. +type WebAppsClientStopContinuousWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopNetworkTrace method. +type WebAppsClientStopNetworkTraceOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopNetworkTraceSlot method. +type WebAppsClientStopNetworkTraceSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopOptions contains the optional parameters for the WebAppsClient.Stop method. +type WebAppsClientStopOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopSlotOptions contains the optional parameters for the WebAppsClient.StopSlot method. +type WebAppsClientStopSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTrace +// method. +type WebAppsClientStopWebSiteNetworkTraceOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTraceSlot +// method. +type WebAppsClientStopWebSiteNetworkTraceSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggers method. +type WebAppsClientSyncFunctionTriggersOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggersSlot +// method. +type WebAppsClientSyncFunctionTriggersSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncFunctionsOptions contains the optional parameters for the WebAppsClient.SyncFunctions method. +type WebAppsClientSyncFunctionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncFunctionsSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionsSlot method. +type WebAppsClientSyncFunctionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncRepositoryOptions contains the optional parameters for the WebAppsClient.SyncRepository method. +type WebAppsClientSyncRepositoryOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncRepositorySlotOptions contains the optional parameters for the WebAppsClient.SyncRepositorySlot method. +type WebAppsClientSyncRepositorySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateApplicationSettingsOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettings +// method. +type WebAppsClientUpdateApplicationSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettingsSlot +// method. +type WebAppsClientUpdateApplicationSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAuthSettingsOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettings method. +type WebAppsClientUpdateAuthSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsSlot +// method. +type WebAppsClientUpdateAuthSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAuthSettingsV2Options contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2 method. +type WebAppsClientUpdateAuthSettingsV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2Slot +// method. +type WebAppsClientUpdateAuthSettingsV2SlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccounts +// method. +type WebAppsClientUpdateAzureStorageAccountsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccountsSlot +// method. +type WebAppsClientUpdateAzureStorageAccountsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateBackupConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfiguration +// method. +type WebAppsClientUpdateBackupConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfigurationSlot +// method. +type WebAppsClientUpdateBackupConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateConfiguration method. +type WebAppsClientUpdateConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateConfigurationSlot +// method. +type WebAppsClientUpdateConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateConnectionStringsOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStrings +// method. +type WebAppsClientUpdateConnectionStringsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStringsSlot +// method. +type WebAppsClientUpdateConnectionStringsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateDiagnosticLogsConfigOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfig +// method. +type WebAppsClientUpdateDiagnosticLogsConfigOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateDiagnosticLogsConfigSlotOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfigSlot +// method. +type WebAppsClientUpdateDiagnosticLogsConfigSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifier +// method. +type WebAppsClientUpdateDomainOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifierSlot +// method. +type WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateFtpAllowedOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowed method. +type WebAppsClientUpdateFtpAllowedOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowedSlot method. +type WebAppsClientUpdateFtpAllowedSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnection +// method. +type WebAppsClientUpdateHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnectionSlot +// method. +type WebAppsClientUpdateHybridConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateMachineKeyOptions contains the optional parameters for the WebAppsClient.UpdateMachineKey method. +type WebAppsClientUpdateMachineKeyOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateMetadataOptions contains the optional parameters for the WebAppsClient.UpdateMetadata method. +type WebAppsClientUpdateMetadataOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateMetadataSlotOptions contains the optional parameters for the WebAppsClient.UpdateMetadataSlot method. +type WebAppsClientUpdateMetadataSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateOptions contains the optional parameters for the WebAppsClient.Update method. +type WebAppsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdatePremierAddOnOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOn method. +type WebAppsClientUpdatePremierAddOnOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdatePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOnSlot +// method. +type WebAppsClientUpdatePremierAddOnSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnection +// method. +type WebAppsClientUpdateRelayServiceConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnectionSlot +// method. +type WebAppsClientUpdateRelayServiceConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateScmAllowedOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowed method. +type WebAppsClientUpdateScmAllowedOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowedSlot method. +type WebAppsClientUpdateScmAllowedSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSitePushSettingsOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettings +// method. +type WebAppsClientUpdateSitePushSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettingsSlot +// method. +type WebAppsClientUpdateSitePushSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.UpdateSlotConfigurationNames +// method. +type WebAppsClientUpdateSlotConfigurationNamesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSlotOptions contains the optional parameters for the WebAppsClient.UpdateSlot method. +type WebAppsClientUpdateSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.UpdateSourceControl method. +type WebAppsClientUpdateSourceControlOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.UpdateSourceControlSlot +// method. +type WebAppsClientUpdateSourceControlSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck +// method. +type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot +// method. +type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGateway +// method. +type WebAppsClientUpdateVnetConnectionGatewayOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGatewaySlot +// method. +type WebAppsClientUpdateVnetConnectionGatewaySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnection method. +type WebAppsClientUpdateVnetConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionSlot +// method. +type WebAppsClientUpdateVnetConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientCheckNameAvailabilityOptions contains the optional parameters for the WebSiteManagementClient.CheckNameAvailability +// method. +type WebSiteManagementClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientGetPublishingUserOptions contains the optional parameters for the WebSiteManagementClient.GetPublishingUser +// method. +type WebSiteManagementClientGetPublishingUserOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientGetSourceControlOptions contains the optional parameters for the WebSiteManagementClient.GetSourceControl +// method. +type WebSiteManagementClientGetSourceControlOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions contains the optional parameters for the WebSiteManagementClient.GetSubscriptionDeploymentLocations +// method. +type WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientListAseRegionsOptions contains the optional parameters for the WebSiteManagementClient.NewListAseRegionsPager +// method. +type WebSiteManagementClientListAseRegionsOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientListBillingMetersOptions contains the optional parameters for the WebSiteManagementClient.NewListBillingMetersPager +// method. +type WebSiteManagementClientListBillingMetersOptions struct { + // Azure Location of billable resource + BillingLocation *string + + // App Service OS type meters used for + OSType *string +} + +// WebSiteManagementClientListCustomHostNameSitesOptions contains the optional parameters for the WebSiteManagementClient.NewListCustomHostNameSitesPager +// method. +type WebSiteManagementClientListCustomHostNameSitesOptions struct { + // Specific hostname + Hostname *string +} + +// WebSiteManagementClientListGeoRegionsOptions contains the optional parameters for the WebSiteManagementClient.NewListGeoRegionsPager +// method. +type WebSiteManagementClientListGeoRegionsOptions struct { + // Specify true if you want to filter to only regions that support Linux Consumption Workers. + LinuxDynamicWorkersEnabled *bool + + // Specify true if you want to filter to only regions that support Linux workers. + LinuxWorkersEnabled *bool + + // Name of SKU used to filter the regions. + SKU *SKUName + + // Specify true if you want to filter to only regions that support Xenon workers. + XenonWorkersEnabled *bool +} + +// WebSiteManagementClientListPremierAddOnOffersOptions contains the optional parameters for the WebSiteManagementClient.NewListPremierAddOnOffersPager +// method. +type WebSiteManagementClientListPremierAddOnOffersOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientListSKUsOptions contains the optional parameters for the WebSiteManagementClient.ListSKUs method. +type WebSiteManagementClientListSKUsOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions contains the optional parameters for the WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager +// method. +type WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientListSourceControlsOptions contains the optional parameters for the WebSiteManagementClient.NewListSourceControlsPager +// method. +type WebSiteManagementClientListSourceControlsOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientMoveOptions contains the optional parameters for the WebSiteManagementClient.Move method. +type WebSiteManagementClientMoveOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientUpdatePublishingUserOptions contains the optional parameters for the WebSiteManagementClient.UpdatePublishingUser +// method. +type WebSiteManagementClientUpdatePublishingUserOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientUpdateSourceControlOptions contains the optional parameters for the WebSiteManagementClient.UpdateSourceControl +// method. +type WebSiteManagementClientUpdateSourceControlOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientValidateMoveOptions contains the optional parameters for the WebSiteManagementClient.ValidateMove +// method. +type WebSiteManagementClientValidateMoveOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientValidateOptions contains the optional parameters for the WebSiteManagementClient.Validate method. +type WebSiteManagementClientValidateOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientVerifyHostingEnvironmentVnetOptions contains the optional parameters for the WebSiteManagementClient.VerifyHostingEnvironmentVnet +// method. +type WebSiteManagementClientVerifyHostingEnvironmentVnetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.Get +// method. +type WorkflowRunActionRepetitionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager +// method. +type WorkflowRunActionRepetitionsClientListExpressionTracesOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListPager +// method. +type WorkflowRunActionRepetitionsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.Get +// method. +type WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsRequestHistoriesClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager +// method. +type WorkflowRunActionRepetitionsRequestHistoriesClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionScopeRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.Get +// method. +type WorkflowRunActionScopeRepetitionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionScopeRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.NewListPager +// method. +type WorkflowRunActionScopeRepetitionsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionsClientGetOptions contains the optional parameters for the WorkflowRunActionsClient.Get method. +type WorkflowRunActionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionsClient.NewListExpressionTracesPager +// method. +type WorkflowRunActionsClientListExpressionTracesOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionsClientListOptions contains the optional parameters for the WorkflowRunActionsClient.NewListPager method. +type WorkflowRunActionsClientListOptions struct { + // The filter to apply on the operation. Options for filters include: Status. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowRunsClientCancelOptions contains the optional parameters for the WorkflowRunsClient.Cancel method. +type WorkflowRunsClientCancelOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunsClientGetOptions contains the optional parameters for the WorkflowRunsClient.Get method. +type WorkflowRunsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunsClientListOptions contains the optional parameters for the WorkflowRunsClient.NewListPager method. +type WorkflowRunsClientListOptions struct { + // The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowTriggerHistoriesClientBeginResubmitOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.BeginResubmit +// method. +type WorkflowTriggerHistoriesClientBeginResubmitOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkflowTriggerHistoriesClientGetOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Get method. +type WorkflowTriggerHistoriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggerHistoriesClientListOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.NewListPager +// method. +type WorkflowTriggerHistoriesClientListOptions struct { + // The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowTriggersClientBeginRunOptions contains the optional parameters for the WorkflowTriggersClient.BeginRun method. +type WorkflowTriggersClientBeginRunOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkflowTriggersClientGetOptions contains the optional parameters for the WorkflowTriggersClient.Get method. +type WorkflowTriggersClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientGetSchemaJSONOptions contains the optional parameters for the WorkflowTriggersClient.GetSchemaJSON +// method. +type WorkflowTriggersClientGetSchemaJSONOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowTriggersClient.ListCallbackURL +// method. +type WorkflowTriggersClientListCallbackURLOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientListOptions contains the optional parameters for the WorkflowTriggersClient.NewListPager method. +type WorkflowTriggersClientListOptions struct { + // The filter to apply on the operation. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowVersionsClientGetOptions contains the optional parameters for the WorkflowVersionsClient.Get method. +type WorkflowVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowVersionsClientListOptions contains the optional parameters for the WorkflowVersionsClient.NewListPager method. +type WorkflowVersionsClientListOptions struct { + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowsClientRegenerateAccessKeyOptions contains the optional parameters for the WorkflowsClient.RegenerateAccessKey +// method. +type WorkflowsClientRegenerateAccessKeyOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientValidateOptions contains the optional parameters for the WorkflowsClient.Validate method. +type WorkflowsClientValidateOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/plans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/plans_client.go new file mode 100644 index 00000000..91c8f1ca --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/plans_client.go @@ -0,0 +1,1886 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// PlansClient contains the methods for the AppServicePlans group. +// Don't use this type directly, use NewPlansClient() instead. +type PlansClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPlansClient creates a new instance of PlansClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PlansClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PlansClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Description for Creates or updates an App Service Plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - appServicePlan - Details of the App Service plan. +// - options - PlansClientBeginCreateOrUpdateOptions contains the optional parameters for the PlansClient.BeginCreateOrUpdate +// method. +func (client *PlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, appServicePlan Plan, options *PlansClientBeginCreateOrUpdateOptions) (*runtime.Poller[PlansClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, name, appServicePlan, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PlansClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PlansClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Description for Creates or updates an App Service Plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *PlansClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, appServicePlan Plan, options *PlansClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PlansClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, appServicePlan, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PlansClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, appServicePlan Plan, options *PlansClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appServicePlan); err != nil { + return nil, err + } + return req, nil +} + +// CreateOrUpdateVnetRoute - Description for Create or update a Virtual Network route in an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - vnetName - Name of the Virtual Network. +// - routeName - Name of the Virtual Network route. +// - route - Definition of the Virtual Network route. +// - options - PlansClientCreateOrUpdateVnetRouteOptions contains the optional parameters for the PlansClient.CreateOrUpdateVnetRoute +// method. +func (client *PlansClient) CreateOrUpdateVnetRoute(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute, options *PlansClientCreateOrUpdateVnetRouteOptions) (PlansClientCreateOrUpdateVnetRouteResponse, error) { + var err error + const operationName = "PlansClient.CreateOrUpdateVnetRoute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateVnetRouteCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, route, options) + if err != nil { + return PlansClientCreateOrUpdateVnetRouteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientCreateOrUpdateVnetRouteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientCreateOrUpdateVnetRouteResponse{}, err + } + resp, err := client.createOrUpdateVnetRouteHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateVnetRouteCreateRequest creates the CreateOrUpdateVnetRoute request. +func (client *PlansClient) createOrUpdateVnetRouteCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute, options *PlansClientCreateOrUpdateVnetRouteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, route); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateVnetRouteHandleResponse handles the CreateOrUpdateVnetRoute response. +func (client *PlansClient) createOrUpdateVnetRouteHandleResponse(resp *http.Response) (PlansClientCreateOrUpdateVnetRouteResponse, error) { + result := PlansClientCreateOrUpdateVnetRouteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetRoute); err != nil { + return PlansClientCreateOrUpdateVnetRouteResponse{}, err + } + return result, nil +} + +// Delete - Description for Delete an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - options - PlansClientDeleteOptions contains the optional parameters for the PlansClient.Delete method. +func (client *PlansClient) Delete(ctx context.Context, resourceGroupName string, name string, options *PlansClientDeleteOptions) (PlansClientDeleteResponse, error) { + var err error + const operationName = "PlansClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return PlansClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PlansClientDeleteResponse{}, err + } + return PlansClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PlansClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteHybridConnection - Description for Delete a Hybrid Connection in use in an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - namespaceName - Name of the Service Bus namespace. +// - relayName - Name of the Service Bus relay. +// - options - PlansClientDeleteHybridConnectionOptions contains the optional parameters for the PlansClient.DeleteHybridConnection +// method. +func (client *PlansClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientDeleteHybridConnectionOptions) (PlansClientDeleteHybridConnectionResponse, error) { + var err error + const operationName = "PlansClient.DeleteHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) + if err != nil { + return PlansClientDeleteHybridConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientDeleteHybridConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PlansClientDeleteHybridConnectionResponse{}, err + } + return PlansClientDeleteHybridConnectionResponse{}, nil +} + +// deleteHybridConnectionCreateRequest creates the DeleteHybridConnection request. +func (client *PlansClient) deleteHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientDeleteHybridConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteVnetRoute - Description for Delete a Virtual Network route in an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - vnetName - Name of the Virtual Network. +// - routeName - Name of the Virtual Network route. +// - options - PlansClientDeleteVnetRouteOptions contains the optional parameters for the PlansClient.DeleteVnetRoute method. +func (client *PlansClient) DeleteVnetRoute(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *PlansClientDeleteVnetRouteOptions) (PlansClientDeleteVnetRouteResponse, error) { + var err error + const operationName = "PlansClient.DeleteVnetRoute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteVnetRouteCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, options) + if err != nil { + return PlansClientDeleteVnetRouteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientDeleteVnetRouteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientDeleteVnetRouteResponse{}, err + } + return PlansClientDeleteVnetRouteResponse{}, nil +} + +// deleteVnetRouteCreateRequest creates the DeleteVnetRoute request. +func (client *PlansClient) deleteVnetRouteCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *PlansClientDeleteVnetRouteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Description for Get an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - options - PlansClientGetOptions contains the optional parameters for the PlansClient.Get method. +func (client *PlansClient) Get(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetOptions) (PlansClientGetResponse, error) { + var err error + const operationName = "PlansClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return PlansClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PlansClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PlansClient) getHandleResponse(resp *http.Response) (PlansClientGetResponse, error) { + result := PlansClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Plan); err != nil { + return PlansClientGetResponse{}, err + } + return result, nil +} + +// GetHybridConnection - Description for Retrieve a Hybrid Connection in use in an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - namespaceName - Name of the Service Bus namespace. +// - relayName - Name of the Service Bus relay. +// - options - PlansClientGetHybridConnectionOptions contains the optional parameters for the PlansClient.GetHybridConnection +// method. +func (client *PlansClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientGetHybridConnectionOptions) (PlansClientGetHybridConnectionResponse, error) { + var err error + const operationName = "PlansClient.GetHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) + if err != nil { + return PlansClientGetHybridConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientGetHybridConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetHybridConnectionResponse{}, err + } + resp, err := client.getHybridConnectionHandleResponse(httpResp) + return resp, err +} + +// getHybridConnectionCreateRequest creates the GetHybridConnection request. +func (client *PlansClient) getHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientGetHybridConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHybridConnectionHandleResponse handles the GetHybridConnection response. +func (client *PlansClient) getHybridConnectionHandleResponse(resp *http.Response) (PlansClientGetHybridConnectionResponse, error) { + result := PlansClientGetHybridConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { + return PlansClientGetHybridConnectionResponse{}, err + } + return result, nil +} + +// GetHybridConnectionPlanLimit - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - options - PlansClientGetHybridConnectionPlanLimitOptions contains the optional parameters for the PlansClient.GetHybridConnectionPlanLimit +// method. +func (client *PlansClient) GetHybridConnectionPlanLimit(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetHybridConnectionPlanLimitOptions) (PlansClientGetHybridConnectionPlanLimitResponse, error) { + var err error + const operationName = "PlansClient.GetHybridConnectionPlanLimit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getHybridConnectionPlanLimitCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return PlansClientGetHybridConnectionPlanLimitResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientGetHybridConnectionPlanLimitResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetHybridConnectionPlanLimitResponse{}, err + } + resp, err := client.getHybridConnectionPlanLimitHandleResponse(httpResp) + return resp, err +} + +// getHybridConnectionPlanLimitCreateRequest creates the GetHybridConnectionPlanLimit request. +func (client *PlansClient) getHybridConnectionPlanLimitCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetHybridConnectionPlanLimitOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHybridConnectionPlanLimitHandleResponse handles the GetHybridConnectionPlanLimit response. +func (client *PlansClient) getHybridConnectionPlanLimitHandleResponse(resp *http.Response) (PlansClientGetHybridConnectionPlanLimitResponse, error) { + result := PlansClientGetHybridConnectionPlanLimitResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnectionLimits); err != nil { + return PlansClientGetHybridConnectionPlanLimitResponse{}, err + } + return result, nil +} + +// GetRouteForVnet - Description for Get a Virtual Network route in an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - vnetName - Name of the Virtual Network. +// - routeName - Name of the Virtual Network route. +// - options - PlansClientGetRouteForVnetOptions contains the optional parameters for the PlansClient.GetRouteForVnet method. +func (client *PlansClient) GetRouteForVnet(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *PlansClientGetRouteForVnetOptions) (PlansClientGetRouteForVnetResponse, error) { + var err error + const operationName = "PlansClient.GetRouteForVnet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getRouteForVnetCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, options) + if err != nil { + return PlansClientGetRouteForVnetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientGetRouteForVnetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetRouteForVnetResponse{}, err + } + resp, err := client.getRouteForVnetHandleResponse(httpResp) + return resp, err +} + +// getRouteForVnetCreateRequest creates the GetRouteForVnet request. +func (client *PlansClient) getRouteForVnetCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *PlansClientGetRouteForVnetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getRouteForVnetHandleResponse handles the GetRouteForVnet response. +func (client *PlansClient) getRouteForVnetHandleResponse(resp *http.Response) (PlansClientGetRouteForVnetResponse, error) { + result := PlansClientGetRouteForVnetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetRouteArray); err != nil { + return PlansClientGetRouteForVnetResponse{}, err + } + return result, nil +} + +// GetServerFarmSKUs - Description for Gets all selectable SKUs for a given App Service Plan +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of App Service Plan +// - options - PlansClientGetServerFarmSKUsOptions contains the optional parameters for the PlansClient.GetServerFarmSKUs method. +func (client *PlansClient) GetServerFarmSKUs(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetServerFarmSKUsOptions) (PlansClientGetServerFarmSKUsResponse, error) { + var err error + const operationName = "PlansClient.GetServerFarmSKUs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getServerFarmSKUsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return PlansClientGetServerFarmSKUsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientGetServerFarmSKUsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetServerFarmSKUsResponse{}, err + } + resp, err := client.getServerFarmSKUsHandleResponse(httpResp) + return resp, err +} + +// getServerFarmSKUsCreateRequest creates the GetServerFarmSKUs request. +func (client *PlansClient) getServerFarmSKUsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetServerFarmSKUsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getServerFarmSKUsHandleResponse handles the GetServerFarmSKUs response. +func (client *PlansClient) getServerFarmSKUsHandleResponse(resp *http.Response) (PlansClientGetServerFarmSKUsResponse, error) { + result := PlansClientGetServerFarmSKUsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { + return PlansClientGetServerFarmSKUsResponse{}, err + } + return result, nil +} + +// GetVnetFromServerFarm - Description for Get a Virtual Network associated with an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - vnetName - Name of the Virtual Network. +// - options - PlansClientGetVnetFromServerFarmOptions contains the optional parameters for the PlansClient.GetVnetFromServerFarm +// method. +func (client *PlansClient) GetVnetFromServerFarm(ctx context.Context, resourceGroupName string, name string, vnetName string, options *PlansClientGetVnetFromServerFarmOptions) (PlansClientGetVnetFromServerFarmResponse, error) { + var err error + const operationName = "PlansClient.GetVnetFromServerFarm" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVnetFromServerFarmCreateRequest(ctx, resourceGroupName, name, vnetName, options) + if err != nil { + return PlansClientGetVnetFromServerFarmResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientGetVnetFromServerFarmResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetVnetFromServerFarmResponse{}, err + } + resp, err := client.getVnetFromServerFarmHandleResponse(httpResp) + return resp, err +} + +// getVnetFromServerFarmCreateRequest creates the GetVnetFromServerFarm request. +func (client *PlansClient) getVnetFromServerFarmCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, options *PlansClientGetVnetFromServerFarmOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVnetFromServerFarmHandleResponse handles the GetVnetFromServerFarm response. +func (client *PlansClient) getVnetFromServerFarmHandleResponse(resp *http.Response) (PlansClientGetVnetFromServerFarmResponse, error) { + result := PlansClientGetVnetFromServerFarmResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { + return PlansClientGetVnetFromServerFarmResponse{}, err + } + return result, nil +} + +// GetVnetGateway - Description for Get a Virtual Network gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - vnetName - Name of the Virtual Network. +// - gatewayName - Name of the gateway. Only the 'primary' gateway is supported. +// - options - PlansClientGetVnetGatewayOptions contains the optional parameters for the PlansClient.GetVnetGateway method. +func (client *PlansClient) GetVnetGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *PlansClientGetVnetGatewayOptions) (PlansClientGetVnetGatewayResponse, error) { + var err error + const operationName = "PlansClient.GetVnetGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVnetGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, options) + if err != nil { + return PlansClientGetVnetGatewayResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientGetVnetGatewayResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetVnetGatewayResponse{}, err + } + resp, err := client.getVnetGatewayHandleResponse(httpResp) + return resp, err +} + +// getVnetGatewayCreateRequest creates the GetVnetGateway request. +func (client *PlansClient) getVnetGatewayCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *PlansClientGetVnetGatewayOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVnetGatewayHandleResponse handles the GetVnetGateway response. +func (client *PlansClient) getVnetGatewayHandleResponse(resp *http.Response) (PlansClientGetVnetGatewayResponse, error) { + result := PlansClientGetVnetGatewayResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { + return PlansClientGetVnetGatewayResponse{}, err + } + return result, nil +} + +// NewListPager - Description for Get all App Service plans for a subscription. +// +// Generated from API version 2024-04-01 +// - options - PlansClientListOptions contains the optional parameters for the PlansClient.NewListPager method. +func (client *PlansClient) NewListPager(options *PlansClientListOptions) *runtime.Pager[PlansClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PlansClientListResponse]{ + More: func(page PlansClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PlansClientListResponse) (PlansClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return PlansClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PlansClient) listCreateRequest(ctx context.Context, options *PlansClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.Detailed != nil { + reqQP.Set("detailed", strconv.FormatBool(*options.Detailed)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PlansClient) listHandleResponse(resp *http.Response) (PlansClientListResponse, error) { + result := PlansClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PlanCollection); err != nil { + return PlansClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Description for Get all App Service plans in a resource group. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - options - PlansClientListByResourceGroupOptions contains the optional parameters for the PlansClient.NewListByResourceGroupPager +// method. +func (client *PlansClient) NewListByResourceGroupPager(resourceGroupName string, options *PlansClientListByResourceGroupOptions) *runtime.Pager[PlansClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[PlansClientListByResourceGroupResponse]{ + More: func(page PlansClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PlansClientListByResourceGroupResponse) (PlansClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return PlansClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *PlansClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *PlansClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *PlansClient) listByResourceGroupHandleResponse(resp *http.Response) (PlansClientListByResourceGroupResponse, error) { + result := PlansClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PlanCollection); err != nil { + return PlansClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// ListCapabilities - Description for List all capabilities of an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - options - PlansClientListCapabilitiesOptions contains the optional parameters for the PlansClient.ListCapabilities method. +func (client *PlansClient) ListCapabilities(ctx context.Context, resourceGroupName string, name string, options *PlansClientListCapabilitiesOptions) (PlansClientListCapabilitiesResponse, error) { + var err error + const operationName = "PlansClient.ListCapabilities" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCapabilitiesCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return PlansClientListCapabilitiesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientListCapabilitiesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientListCapabilitiesResponse{}, err + } + resp, err := client.listCapabilitiesHandleResponse(httpResp) + return resp, err +} + +// listCapabilitiesCreateRequest creates the ListCapabilities request. +func (client *PlansClient) listCapabilitiesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientListCapabilitiesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCapabilitiesHandleResponse handles the ListCapabilities response. +func (client *PlansClient) listCapabilitiesHandleResponse(resp *http.Response) (PlansClientListCapabilitiesResponse, error) { + result := PlansClientListCapabilitiesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CapabilityArray); err != nil { + return PlansClientListCapabilitiesResponse{}, err + } + return result, nil +} + +// ListHybridConnectionKeys - Description for Get the send key name and value of a Hybrid Connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - namespaceName - The name of the Service Bus namespace. +// - relayName - The name of the Service Bus relay. +// - options - PlansClientListHybridConnectionKeysOptions contains the optional parameters for the PlansClient.ListHybridConnectionKeys +// method. +func (client *PlansClient) ListHybridConnectionKeys(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientListHybridConnectionKeysOptions) (PlansClientListHybridConnectionKeysResponse, error) { + var err error + const operationName = "PlansClient.ListHybridConnectionKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listHybridConnectionKeysCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) + if err != nil { + return PlansClientListHybridConnectionKeysResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientListHybridConnectionKeysResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientListHybridConnectionKeysResponse{}, err + } + resp, err := client.listHybridConnectionKeysHandleResponse(httpResp) + return resp, err +} + +// listHybridConnectionKeysCreateRequest creates the ListHybridConnectionKeys request. +func (client *PlansClient) listHybridConnectionKeysCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientListHybridConnectionKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHybridConnectionKeysHandleResponse handles the ListHybridConnectionKeys response. +func (client *PlansClient) listHybridConnectionKeysHandleResponse(resp *http.Response) (PlansClientListHybridConnectionKeysResponse, error) { + result := PlansClientListHybridConnectionKeysResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnectionKey); err != nil { + return PlansClientListHybridConnectionKeysResponse{}, err + } + return result, nil +} + +// NewListHybridConnectionsPager - Description for Retrieve all Hybrid Connections in use in an App Service plan. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - options - PlansClientListHybridConnectionsOptions contains the optional parameters for the PlansClient.NewListHybridConnectionsPager +// method. +func (client *PlansClient) NewListHybridConnectionsPager(resourceGroupName string, name string, options *PlansClientListHybridConnectionsOptions) *runtime.Pager[PlansClientListHybridConnectionsResponse] { + return runtime.NewPager(runtime.PagingHandler[PlansClientListHybridConnectionsResponse]{ + More: func(page PlansClientListHybridConnectionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PlansClientListHybridConnectionsResponse) (PlansClientListHybridConnectionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListHybridConnectionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHybridConnectionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return PlansClientListHybridConnectionsResponse{}, err + } + return client.listHybridConnectionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listHybridConnectionsCreateRequest creates the ListHybridConnections request. +func (client *PlansClient) listHybridConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientListHybridConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHybridConnectionsHandleResponse handles the ListHybridConnections response. +func (client *PlansClient) listHybridConnectionsHandleResponse(resp *http.Response) (PlansClientListHybridConnectionsResponse, error) { + result := PlansClientListHybridConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnectionCollection); err != nil { + return PlansClientListHybridConnectionsResponse{}, err + } + return result, nil +} + +// ListRoutesForVnet - Description for Get all routes that are associated with a Virtual Network in an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - vnetName - Name of the Virtual Network. +// - options - PlansClientListRoutesForVnetOptions contains the optional parameters for the PlansClient.ListRoutesForVnet method. +func (client *PlansClient) ListRoutesForVnet(ctx context.Context, resourceGroupName string, name string, vnetName string, options *PlansClientListRoutesForVnetOptions) (PlansClientListRoutesForVnetResponse, error) { + var err error + const operationName = "PlansClient.ListRoutesForVnet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listRoutesForVnetCreateRequest(ctx, resourceGroupName, name, vnetName, options) + if err != nil { + return PlansClientListRoutesForVnetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientListRoutesForVnetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientListRoutesForVnetResponse{}, err + } + resp, err := client.listRoutesForVnetHandleResponse(httpResp) + return resp, err +} + +// listRoutesForVnetCreateRequest creates the ListRoutesForVnet request. +func (client *PlansClient) listRoutesForVnetCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, options *PlansClientListRoutesForVnetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listRoutesForVnetHandleResponse handles the ListRoutesForVnet response. +func (client *PlansClient) listRoutesForVnetHandleResponse(resp *http.Response) (PlansClientListRoutesForVnetResponse, error) { + result := PlansClientListRoutesForVnetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetRouteArray); err != nil { + return PlansClientListRoutesForVnetResponse{}, err + } + return result, nil +} + +// NewListUsagesPager - Description for Gets server farm usage information +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of App Service Plan +// - options - PlansClientListUsagesOptions contains the optional parameters for the PlansClient.NewListUsagesPager method. +func (client *PlansClient) NewListUsagesPager(resourceGroupName string, name string, options *PlansClientListUsagesOptions) *runtime.Pager[PlansClientListUsagesResponse] { + return runtime.NewPager(runtime.PagingHandler[PlansClientListUsagesResponse]{ + More: func(page PlansClientListUsagesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PlansClientListUsagesResponse) (PlansClientListUsagesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return PlansClientListUsagesResponse{}, err + } + return client.listUsagesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listUsagesCreateRequest creates the ListUsages request. +func (client *PlansClient) listUsagesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientListUsagesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listUsagesHandleResponse handles the ListUsages response. +func (client *PlansClient) listUsagesHandleResponse(resp *http.Response) (PlansClientListUsagesResponse, error) { + result := PlansClientListUsagesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { + return PlansClientListUsagesResponse{}, err + } + return result, nil +} + +// ListVnets - Description for Get all Virtual Networks associated with an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - options - PlansClientListVnetsOptions contains the optional parameters for the PlansClient.ListVnets method. +func (client *PlansClient) ListVnets(ctx context.Context, resourceGroupName string, name string, options *PlansClientListVnetsOptions) (PlansClientListVnetsResponse, error) { + var err error + const operationName = "PlansClient.ListVnets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listVnetsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return PlansClientListVnetsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientListVnetsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientListVnetsResponse{}, err + } + resp, err := client.listVnetsHandleResponse(httpResp) + return resp, err +} + +// listVnetsCreateRequest creates the ListVnets request. +func (client *PlansClient) listVnetsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientListVnetsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVnetsHandleResponse handles the ListVnets response. +func (client *PlansClient) listVnetsHandleResponse(resp *http.Response) (PlansClientListVnetsResponse, error) { + result := PlansClientListVnetsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResourceArray); err != nil { + return PlansClientListVnetsResponse{}, err + } + return result, nil +} + +// NewListWebAppsPager - Description for Get all apps associated with an App Service plan. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - options - PlansClientListWebAppsOptions contains the optional parameters for the PlansClient.NewListWebAppsPager method. +func (client *PlansClient) NewListWebAppsPager(resourceGroupName string, name string, options *PlansClientListWebAppsOptions) *runtime.Pager[PlansClientListWebAppsResponse] { + return runtime.NewPager(runtime.PagingHandler[PlansClientListWebAppsResponse]{ + More: func(page PlansClientListWebAppsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PlansClientListWebAppsResponse) (PlansClientListWebAppsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListWebAppsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebAppsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return PlansClientListWebAppsResponse{}, err + } + return client.listWebAppsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWebAppsCreateRequest creates the ListWebApps request. +func (client *PlansClient) listWebAppsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientListWebAppsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", *options.Top) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWebAppsHandleResponse handles the ListWebApps response. +func (client *PlansClient) listWebAppsHandleResponse(resp *http.Response) (PlansClientListWebAppsResponse, error) { + result := PlansClientListWebAppsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { + return PlansClientListWebAppsResponse{}, err + } + return result, nil +} + +// NewListWebAppsByHybridConnectionPager - Description for Get all apps that use a Hybrid Connection in an App Service Plan. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - namespaceName - Name of the Hybrid Connection namespace. +// - relayName - Name of the Hybrid Connection relay. +// - options - PlansClientListWebAppsByHybridConnectionOptions contains the optional parameters for the PlansClient.NewListWebAppsByHybridConnectionPager +// method. +func (client *PlansClient) NewListWebAppsByHybridConnectionPager(resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientListWebAppsByHybridConnectionOptions) *runtime.Pager[PlansClientListWebAppsByHybridConnectionResponse] { + return runtime.NewPager(runtime.PagingHandler[PlansClientListWebAppsByHybridConnectionResponse]{ + More: func(page PlansClientListWebAppsByHybridConnectionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PlansClientListWebAppsByHybridConnectionResponse) (PlansClientListWebAppsByHybridConnectionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListWebAppsByHybridConnectionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebAppsByHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) + }, nil) + if err != nil { + return PlansClientListWebAppsByHybridConnectionResponse{}, err + } + return client.listWebAppsByHybridConnectionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWebAppsByHybridConnectionCreateRequest creates the ListWebAppsByHybridConnection request. +func (client *PlansClient) listWebAppsByHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientListWebAppsByHybridConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWebAppsByHybridConnectionHandleResponse handles the ListWebAppsByHybridConnection response. +func (client *PlansClient) listWebAppsByHybridConnectionHandleResponse(resp *http.Response) (PlansClientListWebAppsByHybridConnectionResponse, error) { + result := PlansClientListWebAppsByHybridConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceCollection); err != nil { + return PlansClientListWebAppsByHybridConnectionResponse{}, err + } + return result, nil +} + +// RebootWorker - Description for Reboot a worker machine in an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - workerName - Name of worker machine, which typically starts with RD. +// - options - PlansClientRebootWorkerOptions contains the optional parameters for the PlansClient.RebootWorker method. +func (client *PlansClient) RebootWorker(ctx context.Context, resourceGroupName string, name string, workerName string, options *PlansClientRebootWorkerOptions) (PlansClientRebootWorkerResponse, error) { + var err error + const operationName = "PlansClient.RebootWorker" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.rebootWorkerCreateRequest(ctx, resourceGroupName, name, workerName, options) + if err != nil { + return PlansClientRebootWorkerResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientRebootWorkerResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PlansClientRebootWorkerResponse{}, err + } + return PlansClientRebootWorkerResponse{}, nil +} + +// rebootWorkerCreateRequest creates the RebootWorker request. +func (client *PlansClient) rebootWorkerCreateRequest(ctx context.Context, resourceGroupName string, name string, workerName string, options *PlansClientRebootWorkerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workerName == "" { + return nil, errors.New("parameter workerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workerName}", url.PathEscape(workerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// RestartWebApps - Description for Restart all apps in an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - options - PlansClientRestartWebAppsOptions contains the optional parameters for the PlansClient.RestartWebApps method. +func (client *PlansClient) RestartWebApps(ctx context.Context, resourceGroupName string, name string, options *PlansClientRestartWebAppsOptions) (PlansClientRestartWebAppsResponse, error) { + var err error + const operationName = "PlansClient.RestartWebApps" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restartWebAppsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return PlansClientRestartWebAppsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientRestartWebAppsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PlansClientRestartWebAppsResponse{}, err + } + return PlansClientRestartWebAppsResponse{}, nil +} + +// restartWebAppsCreateRequest creates the RestartWebApps request. +func (client *PlansClient) restartWebAppsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientRestartWebAppsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.SoftRestart != nil { + reqQP.Set("softRestart", strconv.FormatBool(*options.SoftRestart)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Update - Description for Creates or updates an App Service Plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - appServicePlan - Details of the App Service plan. +// - options - PlansClientUpdateOptions contains the optional parameters for the PlansClient.Update method. +func (client *PlansClient) Update(ctx context.Context, resourceGroupName string, name string, appServicePlan PlanPatchResource, options *PlansClientUpdateOptions) (PlansClientUpdateResponse, error) { + var err error + const operationName = "PlansClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, name, appServicePlan, options) + if err != nil { + return PlansClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return PlansClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *PlansClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, appServicePlan PlanPatchResource, options *PlansClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appServicePlan); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *PlansClient) updateHandleResponse(resp *http.Response) (PlansClientUpdateResponse, error) { + result := PlansClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Plan); err != nil { + return PlansClientUpdateResponse{}, err + } + return result, nil +} + +// UpdateVnetGateway - Description for Update a Virtual Network gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - vnetName - Name of the Virtual Network. +// - gatewayName - Name of the gateway. Only the 'primary' gateway is supported. +// - connectionEnvelope - Definition of the gateway. +// - options - PlansClientUpdateVnetGatewayOptions contains the optional parameters for the PlansClient.UpdateVnetGateway method. +func (client *PlansClient) UpdateVnetGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *PlansClientUpdateVnetGatewayOptions) (PlansClientUpdateVnetGatewayResponse, error) { + var err error + const operationName = "PlansClient.UpdateVnetGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateVnetGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, options) + if err != nil { + return PlansClientUpdateVnetGatewayResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientUpdateVnetGatewayResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientUpdateVnetGatewayResponse{}, err + } + resp, err := client.updateVnetGatewayHandleResponse(httpResp) + return resp, err +} + +// updateVnetGatewayCreateRequest creates the UpdateVnetGateway request. +func (client *PlansClient) updateVnetGatewayCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *PlansClientUpdateVnetGatewayOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateVnetGatewayHandleResponse handles the UpdateVnetGateway response. +func (client *PlansClient) updateVnetGatewayHandleResponse(resp *http.Response) (PlansClientUpdateVnetGatewayResponse, error) { + result := PlansClientUpdateVnetGatewayResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { + return PlansClientUpdateVnetGatewayResponse{}, err + } + return result, nil +} + +// UpdateVnetRoute - Description for Create or update a Virtual Network route in an App Service plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the App Service plan. +// - vnetName - Name of the Virtual Network. +// - routeName - Name of the Virtual Network route. +// - route - Definition of the Virtual Network route. +// - options - PlansClientUpdateVnetRouteOptions contains the optional parameters for the PlansClient.UpdateVnetRoute method. +func (client *PlansClient) UpdateVnetRoute(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute, options *PlansClientUpdateVnetRouteOptions) (PlansClientUpdateVnetRouteResponse, error) { + var err error + const operationName = "PlansClient.UpdateVnetRoute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateVnetRouteCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, route, options) + if err != nil { + return PlansClientUpdateVnetRouteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PlansClientUpdateVnetRouteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientUpdateVnetRouteResponse{}, err + } + resp, err := client.updateVnetRouteHandleResponse(httpResp) + return resp, err +} + +// updateVnetRouteCreateRequest creates the UpdateVnetRoute request. +func (client *PlansClient) updateVnetRouteCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute, options *PlansClientUpdateVnetRouteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, route); err != nil { + return nil, err + } + return req, nil +} + +// updateVnetRouteHandleResponse handles the UpdateVnetRoute response. +func (client *PlansClient) updateVnetRouteHandleResponse(resp *http.Response) (PlansClientUpdateVnetRouteResponse, error) { + result := PlansClientUpdateVnetRouteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetRoute); err != nil { + return PlansClientUpdateVnetRouteResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/provider_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/provider_client.go new file mode 100644 index 00000000..f4da8297 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/provider_client.go @@ -0,0 +1,435 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProviderClient contains the methods for the Provider group. +// Don't use this type directly, use NewProviderClient() instead. +type ProviderClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProviderClient creates a new instance of ProviderClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProviderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProviderClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProviderClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewGetAvailableStacksPager - Description for Get available application frameworks and their versions +// +// Generated from API version 2024-04-01 +// - options - ProviderClientGetAvailableStacksOptions contains the optional parameters for the ProviderClient.NewGetAvailableStacksPager +// method. +func (client *ProviderClient) NewGetAvailableStacksPager(options *ProviderClientGetAvailableStacksOptions) *runtime.Pager[ProviderClientGetAvailableStacksResponse] { + return runtime.NewPager(runtime.PagingHandler[ProviderClientGetAvailableStacksResponse]{ + More: func(page ProviderClientGetAvailableStacksResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProviderClientGetAvailableStacksResponse) (ProviderClientGetAvailableStacksResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetAvailableStacksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAvailableStacksCreateRequest(ctx, options) + }, nil) + if err != nil { + return ProviderClientGetAvailableStacksResponse{}, err + } + return client.getAvailableStacksHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getAvailableStacksCreateRequest creates the GetAvailableStacks request. +func (client *ProviderClient) getAvailableStacksCreateRequest(ctx context.Context, options *ProviderClientGetAvailableStacksOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/availableStacks" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.OSTypeSelected != nil { + reqQP.Set("osTypeSelected", string(*options.OSTypeSelected)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAvailableStacksHandleResponse handles the GetAvailableStacks response. +func (client *ProviderClient) getAvailableStacksHandleResponse(resp *http.Response) (ProviderClientGetAvailableStacksResponse, error) { + result := ProviderClientGetAvailableStacksResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationStackCollection); err != nil { + return ProviderClientGetAvailableStacksResponse{}, err + } + return result, nil +} + +// NewGetAvailableStacksOnPremPager - Description for Get available application frameworks and their versions +// +// Generated from API version 2024-04-01 +// - options - ProviderClientGetAvailableStacksOnPremOptions contains the optional parameters for the ProviderClient.NewGetAvailableStacksOnPremPager +// method. +func (client *ProviderClient) NewGetAvailableStacksOnPremPager(options *ProviderClientGetAvailableStacksOnPremOptions) *runtime.Pager[ProviderClientGetAvailableStacksOnPremResponse] { + return runtime.NewPager(runtime.PagingHandler[ProviderClientGetAvailableStacksOnPremResponse]{ + More: func(page ProviderClientGetAvailableStacksOnPremResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProviderClientGetAvailableStacksOnPremResponse) (ProviderClientGetAvailableStacksOnPremResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetAvailableStacksOnPremPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAvailableStacksOnPremCreateRequest(ctx, options) + }, nil) + if err != nil { + return ProviderClientGetAvailableStacksOnPremResponse{}, err + } + return client.getAvailableStacksOnPremHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getAvailableStacksOnPremCreateRequest creates the GetAvailableStacksOnPrem request. +func (client *ProviderClient) getAvailableStacksOnPremCreateRequest(ctx context.Context, options *ProviderClientGetAvailableStacksOnPremOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.OSTypeSelected != nil { + reqQP.Set("osTypeSelected", string(*options.OSTypeSelected)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAvailableStacksOnPremHandleResponse handles the GetAvailableStacksOnPrem response. +func (client *ProviderClient) getAvailableStacksOnPremHandleResponse(resp *http.Response) (ProviderClientGetAvailableStacksOnPremResponse, error) { + result := ProviderClientGetAvailableStacksOnPremResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationStackCollection); err != nil { + return ProviderClientGetAvailableStacksOnPremResponse{}, err + } + return result, nil +} + +// NewGetFunctionAppStacksPager - Description for Get available Function app frameworks and their versions +// +// Generated from API version 2024-04-01 +// - options - ProviderClientGetFunctionAppStacksOptions contains the optional parameters for the ProviderClient.NewGetFunctionAppStacksPager +// method. +func (client *ProviderClient) NewGetFunctionAppStacksPager(options *ProviderClientGetFunctionAppStacksOptions) *runtime.Pager[ProviderClientGetFunctionAppStacksResponse] { + return runtime.NewPager(runtime.PagingHandler[ProviderClientGetFunctionAppStacksResponse]{ + More: func(page ProviderClientGetFunctionAppStacksResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProviderClientGetFunctionAppStacksResponse) (ProviderClientGetFunctionAppStacksResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetFunctionAppStacksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getFunctionAppStacksCreateRequest(ctx, options) + }, nil) + if err != nil { + return ProviderClientGetFunctionAppStacksResponse{}, err + } + return client.getFunctionAppStacksHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getFunctionAppStacksCreateRequest creates the GetFunctionAppStacks request. +func (client *ProviderClient) getFunctionAppStacksCreateRequest(ctx context.Context, options *ProviderClientGetFunctionAppStacksOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/functionAppStacks" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.StackOsType != nil { + reqQP.Set("stackOsType", string(*options.StackOsType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getFunctionAppStacksHandleResponse handles the GetFunctionAppStacks response. +func (client *ProviderClient) getFunctionAppStacksHandleResponse(resp *http.Response) (ProviderClientGetFunctionAppStacksResponse, error) { + result := ProviderClientGetFunctionAppStacksResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FunctionAppStackCollection); err != nil { + return ProviderClientGetFunctionAppStacksResponse{}, err + } + return result, nil +} + +// NewGetFunctionAppStacksForLocationPager - Description for Get available Function app frameworks and their versions for +// location +// +// Generated from API version 2024-04-01 +// - location - Function App stack location. +// - options - ProviderClientGetFunctionAppStacksForLocationOptions contains the optional parameters for the ProviderClient.NewGetFunctionAppStacksForLocationPager +// method. +func (client *ProviderClient) NewGetFunctionAppStacksForLocationPager(location string, options *ProviderClientGetFunctionAppStacksForLocationOptions) *runtime.Pager[ProviderClientGetFunctionAppStacksForLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[ProviderClientGetFunctionAppStacksForLocationResponse]{ + More: func(page ProviderClientGetFunctionAppStacksForLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProviderClientGetFunctionAppStacksForLocationResponse) (ProviderClientGetFunctionAppStacksForLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetFunctionAppStacksForLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getFunctionAppStacksForLocationCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return ProviderClientGetFunctionAppStacksForLocationResponse{}, err + } + return client.getFunctionAppStacksForLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getFunctionAppStacksForLocationCreateRequest creates the GetFunctionAppStacksForLocation request. +func (client *ProviderClient) getFunctionAppStacksForLocationCreateRequest(ctx context.Context, location string, options *ProviderClientGetFunctionAppStacksForLocationOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/locations/{location}/functionAppStacks" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.StackOsType != nil { + reqQP.Set("stackOsType", string(*options.StackOsType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getFunctionAppStacksForLocationHandleResponse handles the GetFunctionAppStacksForLocation response. +func (client *ProviderClient) getFunctionAppStacksForLocationHandleResponse(resp *http.Response) (ProviderClientGetFunctionAppStacksForLocationResponse, error) { + result := ProviderClientGetFunctionAppStacksForLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FunctionAppStackCollection); err != nil { + return ProviderClientGetFunctionAppStacksForLocationResponse{}, err + } + return result, nil +} + +// NewGetWebAppStacksPager - Description for Get available Web app frameworks and their versions +// +// Generated from API version 2024-04-01 +// - options - ProviderClientGetWebAppStacksOptions contains the optional parameters for the ProviderClient.NewGetWebAppStacksPager +// method. +func (client *ProviderClient) NewGetWebAppStacksPager(options *ProviderClientGetWebAppStacksOptions) *runtime.Pager[ProviderClientGetWebAppStacksResponse] { + return runtime.NewPager(runtime.PagingHandler[ProviderClientGetWebAppStacksResponse]{ + More: func(page ProviderClientGetWebAppStacksResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProviderClientGetWebAppStacksResponse) (ProviderClientGetWebAppStacksResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetWebAppStacksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getWebAppStacksCreateRequest(ctx, options) + }, nil) + if err != nil { + return ProviderClientGetWebAppStacksResponse{}, err + } + return client.getWebAppStacksHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getWebAppStacksCreateRequest creates the GetWebAppStacks request. +func (client *ProviderClient) getWebAppStacksCreateRequest(ctx context.Context, options *ProviderClientGetWebAppStacksOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/webAppStacks" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.StackOsType != nil { + reqQP.Set("stackOsType", string(*options.StackOsType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getWebAppStacksHandleResponse handles the GetWebAppStacks response. +func (client *ProviderClient) getWebAppStacksHandleResponse(resp *http.Response) (ProviderClientGetWebAppStacksResponse, error) { + result := ProviderClientGetWebAppStacksResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppStackCollection); err != nil { + return ProviderClientGetWebAppStacksResponse{}, err + } + return result, nil +} + +// NewGetWebAppStacksForLocationPager - Description for Get available Web app frameworks and their versions for location +// +// Generated from API version 2024-04-01 +// - location - Web App stack location. +// - options - ProviderClientGetWebAppStacksForLocationOptions contains the optional parameters for the ProviderClient.NewGetWebAppStacksForLocationPager +// method. +func (client *ProviderClient) NewGetWebAppStacksForLocationPager(location string, options *ProviderClientGetWebAppStacksForLocationOptions) *runtime.Pager[ProviderClientGetWebAppStacksForLocationResponse] { + return runtime.NewPager(runtime.PagingHandler[ProviderClientGetWebAppStacksForLocationResponse]{ + More: func(page ProviderClientGetWebAppStacksForLocationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProviderClientGetWebAppStacksForLocationResponse) (ProviderClientGetWebAppStacksForLocationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetWebAppStacksForLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getWebAppStacksForLocationCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return ProviderClientGetWebAppStacksForLocationResponse{}, err + } + return client.getWebAppStacksForLocationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getWebAppStacksForLocationCreateRequest creates the GetWebAppStacksForLocation request. +func (client *ProviderClient) getWebAppStacksForLocationCreateRequest(ctx context.Context, location string, options *ProviderClientGetWebAppStacksForLocationOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/locations/{location}/webAppStacks" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.StackOsType != nil { + reqQP.Set("stackOsType", string(*options.StackOsType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getWebAppStacksForLocationHandleResponse handles the GetWebAppStacksForLocation response. +func (client *ProviderClient) getWebAppStacksForLocationHandleResponse(resp *http.Response) (ProviderClientGetWebAppStacksForLocationResponse, error) { + result := ProviderClientGetWebAppStacksForLocationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppStackCollection); err != nil { + return ProviderClientGetWebAppStacksForLocationResponse{}, err + } + return result, nil +} + +// NewListOperationsPager - Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes +// resource metric definitions +// +// Generated from API version 2024-04-01 +// - options - ProviderClientListOperationsOptions contains the optional parameters for the ProviderClient.NewListOperationsPager +// method. +func (client *ProviderClient) NewListOperationsPager(options *ProviderClientListOperationsOptions) *runtime.Pager[ProviderClientListOperationsResponse] { + return runtime.NewPager(runtime.PagingHandler[ProviderClientListOperationsResponse]{ + More: func(page ProviderClientListOperationsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProviderClientListOperationsResponse) (ProviderClientListOperationsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewListOperationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listOperationsCreateRequest(ctx, options) + }, nil) + if err != nil { + return ProviderClientListOperationsResponse{}, err + } + return client.listOperationsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listOperationsCreateRequest creates the ListOperations request. +func (client *ProviderClient) listOperationsCreateRequest(ctx context.Context, options *ProviderClientListOperationsOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listOperationsHandleResponse handles the ListOperations response. +func (client *ProviderClient) listOperationsHandleResponse(resp *http.Response) (ProviderClientListOperationsResponse, error) { + result := ProviderClientListOperationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmOperationCollection); err != nil { + return ProviderClientListOperationsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/recommendations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/recommendations_client.go new file mode 100644 index 00000000..f1f8e67c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/recommendations_client.go @@ -0,0 +1,992 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RecommendationsClient contains the methods for the Recommendations group. +// Don't use this type directly, use NewRecommendationsClient() instead. +type RecommendationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRecommendationsClient creates a new instance of RecommendationsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRecommendationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecommendationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RecommendationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// DisableAllForHostingEnvironment - Description for Disable all recommendations for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - environmentName - Name of the app. +// - options - RecommendationsClientDisableAllForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableAllForHostingEnvironment +// method. +func (client *RecommendationsClient) DisableAllForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *RecommendationsClientDisableAllForHostingEnvironmentOptions) (RecommendationsClientDisableAllForHostingEnvironmentResponse, error) { + var err error + const operationName = "RecommendationsClient.DisableAllForHostingEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableAllForHostingEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, hostingEnvironmentName, options) + if err != nil { + return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, err + } + return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, nil +} + +// disableAllForHostingEnvironmentCreateRequest creates the DisableAllForHostingEnvironment request. +func (client *RecommendationsClient) disableAllForHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *RecommendationsClientDisableAllForHostingEnvironmentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostingEnvironmentName == "" { + return nil, errors.New("parameter hostingEnvironmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + reqQP.Set("environmentName", environmentName) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DisableAllForWebApp - Description for Disable all recommendations for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Name of the app. +// - options - RecommendationsClientDisableAllForWebAppOptions contains the optional parameters for the RecommendationsClient.DisableAllForWebApp +// method. +func (client *RecommendationsClient) DisableAllForWebApp(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientDisableAllForWebAppOptions) (RecommendationsClientDisableAllForWebAppResponse, error) { + var err error + const operationName = "RecommendationsClient.DisableAllForWebApp" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableAllForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) + if err != nil { + return RecommendationsClientDisableAllForWebAppResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendationsClientDisableAllForWebAppResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientDisableAllForWebAppResponse{}, err + } + return RecommendationsClientDisableAllForWebAppResponse{}, nil +} + +// disableAllForWebAppCreateRequest creates the DisableAllForWebApp request. +func (client *RecommendationsClient) disableAllForWebAppCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientDisableAllForWebAppOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DisableRecommendationForHostingEnvironment - Description for Disables the specific rule for a web site permanently. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - environmentName - Site name +// - name - Rule name +// - options - RecommendationsClientDisableRecommendationForHostingEnvironmentOptions contains the optional parameters for the +// RecommendationsClient.DisableRecommendationForHostingEnvironment method. +func (client *RecommendationsClient) DisableRecommendationForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, name string, hostingEnvironmentName string, options *RecommendationsClientDisableRecommendationForHostingEnvironmentOptions) (RecommendationsClientDisableRecommendationForHostingEnvironmentResponse, error) { + var err error + const operationName = "RecommendationsClient.DisableRecommendationForHostingEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableRecommendationForHostingEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, name, hostingEnvironmentName, options) + if err != nil { + return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, err + } + return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, nil +} + +// disableRecommendationForHostingEnvironmentCreateRequest creates the DisableRecommendationForHostingEnvironment request. +func (client *RecommendationsClient) disableRecommendationForHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, hostingEnvironmentName string, options *RecommendationsClientDisableRecommendationForHostingEnvironmentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if hostingEnvironmentName == "" { + return nil, errors.New("parameter hostingEnvironmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + reqQP.Set("environmentName", environmentName) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DisableRecommendationForSite - Description for Disables the specific rule for a web site permanently. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Site name +// - name - Rule name +// - options - RecommendationsClientDisableRecommendationForSiteOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSite +// method. +func (client *RecommendationsClient) DisableRecommendationForSite(ctx context.Context, resourceGroupName string, siteName string, name string, options *RecommendationsClientDisableRecommendationForSiteOptions) (RecommendationsClientDisableRecommendationForSiteResponse, error) { + var err error + const operationName = "RecommendationsClient.DisableRecommendationForSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableRecommendationForSiteCreateRequest(ctx, resourceGroupName, siteName, name, options) + if err != nil { + return RecommendationsClientDisableRecommendationForSiteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendationsClientDisableRecommendationForSiteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientDisableRecommendationForSiteResponse{}, err + } + return RecommendationsClientDisableRecommendationForSiteResponse{}, nil +} + +// disableRecommendationForSiteCreateRequest creates the DisableRecommendationForSite request. +func (client *RecommendationsClient) disableRecommendationForSiteCreateRequest(ctx context.Context, resourceGroupName string, siteName string, name string, options *RecommendationsClientDisableRecommendationForSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DisableRecommendationForSubscription - Description for Disables the specified rule so it will not apply to a subscription +// in the future. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - name - Rule name +// - options - RecommendationsClientDisableRecommendationForSubscriptionOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSubscription +// method. +func (client *RecommendationsClient) DisableRecommendationForSubscription(ctx context.Context, name string, options *RecommendationsClientDisableRecommendationForSubscriptionOptions) (RecommendationsClientDisableRecommendationForSubscriptionResponse, error) { + var err error + const operationName = "RecommendationsClient.DisableRecommendationForSubscription" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableRecommendationForSubscriptionCreateRequest(ctx, name, options) + if err != nil { + return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, err + } + return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, nil +} + +// disableRecommendationForSubscriptionCreateRequest creates the DisableRecommendationForSubscription request. +func (client *RecommendationsClient) disableRecommendationForSubscriptionCreateRequest(ctx context.Context, name string, options *RecommendationsClientDisableRecommendationForSubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable" + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetRuleDetailsByHostingEnvironment - Description for Get a recommendation rule for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - hostingEnvironmentName - Name of the hosting environment. +// - name - Name of the recommendation. +// - options - RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByHostingEnvironment +// method. +func (client *RecommendationsClient) GetRuleDetailsByHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, options *RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions) (RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse, error) { + var err error + const operationName = "RecommendationsClient.GetRuleDetailsByHostingEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getRuleDetailsByHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, name, options) + if err != nil { + return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, err + } + resp, err := client.getRuleDetailsByHostingEnvironmentHandleResponse(httpResp) + return resp, err +} + +// getRuleDetailsByHostingEnvironmentCreateRequest creates the GetRuleDetailsByHostingEnvironment request. +func (client *RecommendationsClient) getRuleDetailsByHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, options *RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostingEnvironmentName == "" { + return nil, errors.New("parameter hostingEnvironmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.RecommendationID != nil { + reqQP.Set("recommendationId", *options.RecommendationID) + } + if options != nil && options.UpdateSeen != nil { + reqQP.Set("updateSeen", strconv.FormatBool(*options.UpdateSeen)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getRuleDetailsByHostingEnvironmentHandleResponse handles the GetRuleDetailsByHostingEnvironment response. +func (client *RecommendationsClient) getRuleDetailsByHostingEnvironmentHandleResponse(resp *http.Response) (RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse, error) { + result := RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationRule); err != nil { + return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, err + } + return result, nil +} + +// GetRuleDetailsByWebApp - Description for Get a recommendation rule for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Name of the app. +// - name - Name of the recommendation. +// - options - RecommendationsClientGetRuleDetailsByWebAppOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByWebApp +// method. +func (client *RecommendationsClient) GetRuleDetailsByWebApp(ctx context.Context, resourceGroupName string, siteName string, name string, options *RecommendationsClientGetRuleDetailsByWebAppOptions) (RecommendationsClientGetRuleDetailsByWebAppResponse, error) { + var err error + const operationName = "RecommendationsClient.GetRuleDetailsByWebApp" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getRuleDetailsByWebAppCreateRequest(ctx, resourceGroupName, siteName, name, options) + if err != nil { + return RecommendationsClientGetRuleDetailsByWebAppResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendationsClientGetRuleDetailsByWebAppResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientGetRuleDetailsByWebAppResponse{}, err + } + resp, err := client.getRuleDetailsByWebAppHandleResponse(httpResp) + return resp, err +} + +// getRuleDetailsByWebAppCreateRequest creates the GetRuleDetailsByWebApp request. +func (client *RecommendationsClient) getRuleDetailsByWebAppCreateRequest(ctx context.Context, resourceGroupName string, siteName string, name string, options *RecommendationsClientGetRuleDetailsByWebAppOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.RecommendationID != nil { + reqQP.Set("recommendationId", *options.RecommendationID) + } + if options != nil && options.UpdateSeen != nil { + reqQP.Set("updateSeen", strconv.FormatBool(*options.UpdateSeen)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getRuleDetailsByWebAppHandleResponse handles the GetRuleDetailsByWebApp response. +func (client *RecommendationsClient) getRuleDetailsByWebAppHandleResponse(resp *http.Response) (RecommendationsClientGetRuleDetailsByWebAppResponse, error) { + result := RecommendationsClientGetRuleDetailsByWebAppResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationRule); err != nil { + return RecommendationsClientGetRuleDetailsByWebAppResponse{}, err + } + return result, nil +} + +// NewListPager - Description for List all recommendations for a subscription. +// +// Generated from API version 2024-04-01 +// - options - RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.NewListPager +// method. +func (client *RecommendationsClient) NewListPager(options *RecommendationsClientListOptions) *runtime.Pager[RecommendationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListResponse]{ + More: func(page RecommendationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RecommendationsClientListResponse) (RecommendationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecommendationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return RecommendationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RecommendationsClient) listCreateRequest(ctx context.Context, options *RecommendationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.Featured != nil { + reqQP.Set("featured", strconv.FormatBool(*options.Featured)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RecommendationsClient) listHandleResponse(resp *http.Response) (RecommendationsClientListResponse, error) { + result := RecommendationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationCollection); err != nil { + return RecommendationsClientListResponse{}, err + } + return result, nil +} + +// NewListHistoryForHostingEnvironmentPager - Description for Get past recommendations for an app, optionally specified by +// the time range. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - hostingEnvironmentName - Name of the hosting environment. +// - options - RecommendationsClientListHistoryForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.NewListHistoryForHostingEnvironmentPager +// method. +func (client *RecommendationsClient) NewListHistoryForHostingEnvironmentPager(resourceGroupName string, hostingEnvironmentName string, options *RecommendationsClientListHistoryForHostingEnvironmentOptions) *runtime.Pager[RecommendationsClientListHistoryForHostingEnvironmentResponse] { + return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListHistoryForHostingEnvironmentResponse]{ + More: func(page RecommendationsClientListHistoryForHostingEnvironmentResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RecommendationsClientListHistoryForHostingEnvironmentResponse) (RecommendationsClientListHistoryForHostingEnvironmentResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecommendationsClient.NewListHistoryForHostingEnvironmentPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHistoryForHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, options) + }, nil) + if err != nil { + return RecommendationsClientListHistoryForHostingEnvironmentResponse{}, err + } + return client.listHistoryForHostingEnvironmentHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listHistoryForHostingEnvironmentCreateRequest creates the ListHistoryForHostingEnvironment request. +func (client *RecommendationsClient) listHistoryForHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, options *RecommendationsClientListHistoryForHostingEnvironmentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostingEnvironmentName == "" { + return nil, errors.New("parameter hostingEnvironmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.ExpiredOnly != nil { + reqQP.Set("expiredOnly", strconv.FormatBool(*options.ExpiredOnly)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHistoryForHostingEnvironmentHandleResponse handles the ListHistoryForHostingEnvironment response. +func (client *RecommendationsClient) listHistoryForHostingEnvironmentHandleResponse(resp *http.Response) (RecommendationsClientListHistoryForHostingEnvironmentResponse, error) { + result := RecommendationsClientListHistoryForHostingEnvironmentResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationCollection); err != nil { + return RecommendationsClientListHistoryForHostingEnvironmentResponse{}, err + } + return result, nil +} + +// NewListHistoryForWebAppPager - Description for Get past recommendations for an app, optionally specified by the time range. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Name of the app. +// - options - RecommendationsClientListHistoryForWebAppOptions contains the optional parameters for the RecommendationsClient.NewListHistoryForWebAppPager +// method. +func (client *RecommendationsClient) NewListHistoryForWebAppPager(resourceGroupName string, siteName string, options *RecommendationsClientListHistoryForWebAppOptions) *runtime.Pager[RecommendationsClientListHistoryForWebAppResponse] { + return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListHistoryForWebAppResponse]{ + More: func(page RecommendationsClientListHistoryForWebAppResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RecommendationsClientListHistoryForWebAppResponse) (RecommendationsClientListHistoryForWebAppResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecommendationsClient.NewListHistoryForWebAppPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHistoryForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) + }, nil) + if err != nil { + return RecommendationsClientListHistoryForWebAppResponse{}, err + } + return client.listHistoryForWebAppHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listHistoryForWebAppCreateRequest creates the ListHistoryForWebApp request. +func (client *RecommendationsClient) listHistoryForWebAppCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientListHistoryForWebAppOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.ExpiredOnly != nil { + reqQP.Set("expiredOnly", strconv.FormatBool(*options.ExpiredOnly)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHistoryForWebAppHandleResponse handles the ListHistoryForWebApp response. +func (client *RecommendationsClient) listHistoryForWebAppHandleResponse(resp *http.Response) (RecommendationsClientListHistoryForWebAppResponse, error) { + result := RecommendationsClientListHistoryForWebAppResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationCollection); err != nil { + return RecommendationsClientListHistoryForWebAppResponse{}, err + } + return result, nil +} + +// NewListRecommendedRulesForHostingEnvironmentPager - Description for Get all recommendations for a hosting environment. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - hostingEnvironmentName - Name of the app. +// - options - RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions contains the optional parameters for the +// RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager method. +func (client *RecommendationsClient) NewListRecommendedRulesForHostingEnvironmentPager(resourceGroupName string, hostingEnvironmentName string, options *RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions) *runtime.Pager[RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse] { + return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse]{ + More: func(page RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse) (RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRecommendedRulesForHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, options) + }, nil) + if err != nil { + return RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{}, err + } + return client.listRecommendedRulesForHostingEnvironmentHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listRecommendedRulesForHostingEnvironmentCreateRequest creates the ListRecommendedRulesForHostingEnvironment request. +func (client *RecommendationsClient) listRecommendedRulesForHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, options *RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostingEnvironmentName == "" { + return nil, errors.New("parameter hostingEnvironmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.Featured != nil { + reqQP.Set("featured", strconv.FormatBool(*options.Featured)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listRecommendedRulesForHostingEnvironmentHandleResponse handles the ListRecommendedRulesForHostingEnvironment response. +func (client *RecommendationsClient) listRecommendedRulesForHostingEnvironmentHandleResponse(resp *http.Response) (RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse, error) { + result := RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationCollection); err != nil { + return RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{}, err + } + return result, nil +} + +// NewListRecommendedRulesForWebAppPager - Description for Get all recommendations for an app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Name of the app. +// - options - RecommendationsClientListRecommendedRulesForWebAppOptions contains the optional parameters for the RecommendationsClient.NewListRecommendedRulesForWebAppPager +// method. +func (client *RecommendationsClient) NewListRecommendedRulesForWebAppPager(resourceGroupName string, siteName string, options *RecommendationsClientListRecommendedRulesForWebAppOptions) *runtime.Pager[RecommendationsClientListRecommendedRulesForWebAppResponse] { + return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListRecommendedRulesForWebAppResponse]{ + More: func(page RecommendationsClientListRecommendedRulesForWebAppResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RecommendationsClientListRecommendedRulesForWebAppResponse) (RecommendationsClientListRecommendedRulesForWebAppResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecommendationsClient.NewListRecommendedRulesForWebAppPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRecommendedRulesForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) + }, nil) + if err != nil { + return RecommendationsClientListRecommendedRulesForWebAppResponse{}, err + } + return client.listRecommendedRulesForWebAppHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listRecommendedRulesForWebAppCreateRequest creates the ListRecommendedRulesForWebApp request. +func (client *RecommendationsClient) listRecommendedRulesForWebAppCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientListRecommendedRulesForWebAppOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.Featured != nil { + reqQP.Set("featured", strconv.FormatBool(*options.Featured)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listRecommendedRulesForWebAppHandleResponse handles the ListRecommendedRulesForWebApp response. +func (client *RecommendationsClient) listRecommendedRulesForWebAppHandleResponse(resp *http.Response) (RecommendationsClientListRecommendedRulesForWebAppResponse, error) { + result := RecommendationsClientListRecommendedRulesForWebAppResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationCollection); err != nil { + return RecommendationsClientListRecommendedRulesForWebAppResponse{}, err + } + return result, nil +} + +// ResetAllFilters - Description for Reset all recommendation opt-out settings for a subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - options - RecommendationsClientResetAllFiltersOptions contains the optional parameters for the RecommendationsClient.ResetAllFilters +// method. +func (client *RecommendationsClient) ResetAllFilters(ctx context.Context, options *RecommendationsClientResetAllFiltersOptions) (RecommendationsClientResetAllFiltersResponse, error) { + var err error + const operationName = "RecommendationsClient.ResetAllFilters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetAllFiltersCreateRequest(ctx, options) + if err != nil { + return RecommendationsClientResetAllFiltersResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendationsClientResetAllFiltersResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientResetAllFiltersResponse{}, err + } + return RecommendationsClientResetAllFiltersResponse{}, nil +} + +// resetAllFiltersCreateRequest creates the ResetAllFilters request. +func (client *RecommendationsClient) resetAllFiltersCreateRequest(ctx context.Context, options *RecommendationsClientResetAllFiltersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// ResetAllFiltersForHostingEnvironment - Description for Reset all recommendation opt-out settings for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - environmentName - Name of the app. +// - options - RecommendationsClientResetAllFiltersForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForHostingEnvironment +// method. +func (client *RecommendationsClient) ResetAllFiltersForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *RecommendationsClientResetAllFiltersForHostingEnvironmentOptions) (RecommendationsClientResetAllFiltersForHostingEnvironmentResponse, error) { + var err error + const operationName = "RecommendationsClient.ResetAllFiltersForHostingEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetAllFiltersForHostingEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, hostingEnvironmentName, options) + if err != nil { + return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, err + } + return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, nil +} + +// resetAllFiltersForHostingEnvironmentCreateRequest creates the ResetAllFiltersForHostingEnvironment request. +func (client *RecommendationsClient) resetAllFiltersForHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *RecommendationsClientResetAllFiltersForHostingEnvironmentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostingEnvironmentName == "" { + return nil, errors.New("parameter hostingEnvironmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + reqQP.Set("environmentName", environmentName) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// ResetAllFiltersForWebApp - Description for Reset all recommendation opt-out settings for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - siteName - Name of the app. +// - options - RecommendationsClientResetAllFiltersForWebAppOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForWebApp +// method. +func (client *RecommendationsClient) ResetAllFiltersForWebApp(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientResetAllFiltersForWebAppOptions) (RecommendationsClientResetAllFiltersForWebAppResponse, error) { + var err error + const operationName = "RecommendationsClient.ResetAllFiltersForWebApp" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetAllFiltersForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) + if err != nil { + return RecommendationsClientResetAllFiltersForWebAppResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecommendationsClientResetAllFiltersForWebAppResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientResetAllFiltersForWebAppResponse{}, err + } + return RecommendationsClientResetAllFiltersForWebAppResponse{}, nil +} + +// resetAllFiltersForWebAppCreateRequest creates the ResetAllFiltersForWebApp request. +func (client *RecommendationsClient) resetAllFiltersForWebAppCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientResetAllFiltersForWebAppOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/resourcehealthmetadata_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/resourcehealthmetadata_client.go new file mode 100644 index 00000000..d9a5b65d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/resourcehealthmetadata_client.go @@ -0,0 +1,430 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ResourceHealthMetadataClient contains the methods for the ResourceHealthMetadata group. +// Don't use this type directly, use NewResourceHealthMetadataClient() instead. +type ResourceHealthMetadataClient struct { + internal *arm.Client + subscriptionID string +} + +// NewResourceHealthMetadataClient creates a new instance of ResourceHealthMetadataClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewResourceHealthMetadataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceHealthMetadataClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ResourceHealthMetadataClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// GetBySite - Description for Gets the category of ResourceHealthMetadata to use for the given site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app +// - options - ResourceHealthMetadataClientGetBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySite +// method. +func (client *ResourceHealthMetadataClient) GetBySite(ctx context.Context, resourceGroupName string, name string, options *ResourceHealthMetadataClientGetBySiteOptions) (ResourceHealthMetadataClientGetBySiteResponse, error) { + var err error + const operationName = "ResourceHealthMetadataClient.GetBySite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBySiteCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return ResourceHealthMetadataClientGetBySiteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceHealthMetadataClientGetBySiteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceHealthMetadataClientGetBySiteResponse{}, err + } + resp, err := client.getBySiteHandleResponse(httpResp) + return resp, err +} + +// getBySiteCreateRequest creates the GetBySite request. +func (client *ResourceHealthMetadataClient) getBySiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ResourceHealthMetadataClientGetBySiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBySiteHandleResponse handles the GetBySite response. +func (client *ResourceHealthMetadataClient) getBySiteHandleResponse(resp *http.Response) (ResourceHealthMetadataClientGetBySiteResponse, error) { + result := ResourceHealthMetadataClientGetBySiteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadata); err != nil { + return ResourceHealthMetadataClientGetBySiteResponse{}, err + } + return result, nil +} + +// GetBySiteSlot - Description for Gets the category of ResourceHealthMetadata to use for the given site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - ResourceHealthMetadataClientGetBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySiteSlot +// method. +func (client *ResourceHealthMetadataClient) GetBySiteSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *ResourceHealthMetadataClientGetBySiteSlotOptions) (ResourceHealthMetadataClientGetBySiteSlotResponse, error) { + var err error + const operationName = "ResourceHealthMetadataClient.GetBySiteSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBySiteSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return ResourceHealthMetadataClientGetBySiteSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceHealthMetadataClientGetBySiteSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceHealthMetadataClientGetBySiteSlotResponse{}, err + } + resp, err := client.getBySiteSlotHandleResponse(httpResp) + return resp, err +} + +// getBySiteSlotCreateRequest creates the GetBySiteSlot request. +func (client *ResourceHealthMetadataClient) getBySiteSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *ResourceHealthMetadataClientGetBySiteSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBySiteSlotHandleResponse handles the GetBySiteSlot response. +func (client *ResourceHealthMetadataClient) getBySiteSlotHandleResponse(resp *http.Response) (ResourceHealthMetadataClientGetBySiteSlotResponse, error) { + result := ResourceHealthMetadataClientGetBySiteSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadata); err != nil { + return ResourceHealthMetadataClientGetBySiteSlotResponse{}, err + } + return result, nil +} + +// NewListPager - Description for List all ResourceHealthMetadata for all sites in the subscription. +// +// Generated from API version 2024-04-01 +// - options - ResourceHealthMetadataClientListOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListPager +// method. +func (client *ResourceHealthMetadataClient) NewListPager(options *ResourceHealthMetadataClientListOptions) *runtime.Pager[ResourceHealthMetadataClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceHealthMetadataClientListResponse]{ + More: func(page ResourceHealthMetadataClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListResponse) (ResourceHealthMetadataClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceHealthMetadataClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return ResourceHealthMetadataClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ResourceHealthMetadataClient) listCreateRequest(ctx context.Context, options *ResourceHealthMetadataClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ResourceHealthMetadataClient) listHandleResponse(resp *http.Response) (ResourceHealthMetadataClientListResponse, error) { + result := ResourceHealthMetadataClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadataCollection); err != nil { + return ResourceHealthMetadataClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Description for List all ResourceHealthMetadata for all sites in the resource group in the +// subscription. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - options - ResourceHealthMetadataClientListByResourceGroupOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListByResourceGroupPager +// method. +func (client *ResourceHealthMetadataClient) NewListByResourceGroupPager(resourceGroupName string, options *ResourceHealthMetadataClientListByResourceGroupOptions) *runtime.Pager[ResourceHealthMetadataClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceHealthMetadataClientListByResourceGroupResponse]{ + More: func(page ResourceHealthMetadataClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListByResourceGroupResponse) (ResourceHealthMetadataClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceHealthMetadataClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ResourceHealthMetadataClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ResourceHealthMetadataClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ResourceHealthMetadataClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ResourceHealthMetadataClient) listByResourceGroupHandleResponse(resp *http.Response) (ResourceHealthMetadataClientListByResourceGroupResponse, error) { + result := ResourceHealthMetadataClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadataCollection); err != nil { + return ResourceHealthMetadataClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySitePager - Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - ResourceHealthMetadataClientListBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListBySitePager +// method. +func (client *ResourceHealthMetadataClient) NewListBySitePager(resourceGroupName string, name string, options *ResourceHealthMetadataClientListBySiteOptions) *runtime.Pager[ResourceHealthMetadataClientListBySiteResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceHealthMetadataClientListBySiteResponse]{ + More: func(page ResourceHealthMetadataClientListBySiteResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListBySiteResponse) (ResourceHealthMetadataClientListBySiteResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceHealthMetadataClient.NewListBySitePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySiteCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return ResourceHealthMetadataClientListBySiteResponse{}, err + } + return client.listBySiteHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySiteCreateRequest creates the ListBySite request. +func (client *ResourceHealthMetadataClient) listBySiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ResourceHealthMetadataClientListBySiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySiteHandleResponse handles the ListBySite response. +func (client *ResourceHealthMetadataClient) listBySiteHandleResponse(resp *http.Response) (ResourceHealthMetadataClientListBySiteResponse, error) { + result := ResourceHealthMetadataClientListBySiteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadataCollection); err != nil { + return ResourceHealthMetadataClientListBySiteResponse{}, err + } + return result, nil +} + +// NewListBySiteSlotPager - Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - ResourceHealthMetadataClientListBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListBySiteSlotPager +// method. +func (client *ResourceHealthMetadataClient) NewListBySiteSlotPager(resourceGroupName string, name string, slot string, options *ResourceHealthMetadataClientListBySiteSlotOptions) *runtime.Pager[ResourceHealthMetadataClientListBySiteSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceHealthMetadataClientListBySiteSlotResponse]{ + More: func(page ResourceHealthMetadataClientListBySiteSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListBySiteSlotResponse) (ResourceHealthMetadataClientListBySiteSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceHealthMetadataClient.NewListBySiteSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySiteSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return ResourceHealthMetadataClientListBySiteSlotResponse{}, err + } + return client.listBySiteSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySiteSlotCreateRequest creates the ListBySiteSlot request. +func (client *ResourceHealthMetadataClient) listBySiteSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *ResourceHealthMetadataClientListBySiteSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySiteSlotHandleResponse handles the ListBySiteSlot response. +func (client *ResourceHealthMetadataClient) listBySiteSlotHandleResponse(resp *http.Response) (ResourceHealthMetadataClientListBySiteSlotResponse, error) { + result := ResourceHealthMetadataClientListBySiteSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadataCollection); err != nil { + return ResourceHealthMetadataClientListBySiteSlotResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/responses.go new file mode 100644 index 00000000..f022cbb1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/responses.go @@ -0,0 +1,4288 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "encoding/json" + "io" +) + +// CertificateOrdersClientCreateOrUpdateCertificateResponse contains the response from method CertificateOrdersClient.BeginCreateOrUpdateCertificate. +type CertificateOrdersClientCreateOrUpdateCertificateResponse struct { + // Key Vault container ARM resource for a certificate that is purchased through Azure. + CertificateResource +} + +// CertificateOrdersClientCreateOrUpdateResponse contains the response from method CertificateOrdersClient.BeginCreateOrUpdate. +type CertificateOrdersClientCreateOrUpdateResponse struct { + // SSL certificate purchase order. + CertificateOrder +} + +// CertificateOrdersClientDeleteCertificateResponse contains the response from method CertificateOrdersClient.DeleteCertificate. +type CertificateOrdersClientDeleteCertificateResponse struct { + // placeholder for future response values +} + +// CertificateOrdersClientDeleteResponse contains the response from method CertificateOrdersClient.Delete. +type CertificateOrdersClientDeleteResponse struct { + // placeholder for future response values +} + +// CertificateOrdersClientGetCertificateResponse contains the response from method CertificateOrdersClient.GetCertificate. +type CertificateOrdersClientGetCertificateResponse struct { + // Key Vault container ARM resource for a certificate that is purchased through Azure. + CertificateResource +} + +// CertificateOrdersClientGetResponse contains the response from method CertificateOrdersClient.Get. +type CertificateOrdersClientGetResponse struct { + // SSL certificate purchase order. + CertificateOrder +} + +// CertificateOrdersClientListByResourceGroupResponse contains the response from method CertificateOrdersClient.NewListByResourceGroupPager. +type CertificateOrdersClientListByResourceGroupResponse struct { + // Collection of certificate orders. + CertificateOrderCollection +} + +// CertificateOrdersClientListCertificatesResponse contains the response from method CertificateOrdersClient.NewListCertificatesPager. +type CertificateOrdersClientListCertificatesResponse struct { + // Collection of certificate order certificates. + CertificateCollection +} + +// CertificateOrdersClientListResponse contains the response from method CertificateOrdersClient.NewListPager. +type CertificateOrdersClientListResponse struct { + // Collection of certificate orders. + CertificateOrderCollection +} + +// CertificateOrdersClientReissueResponse contains the response from method CertificateOrdersClient.Reissue. +type CertificateOrdersClientReissueResponse struct { + // placeholder for future response values +} + +// CertificateOrdersClientRenewResponse contains the response from method CertificateOrdersClient.Renew. +type CertificateOrdersClientRenewResponse struct { + // placeholder for future response values +} + +// CertificateOrdersClientResendEmailResponse contains the response from method CertificateOrdersClient.ResendEmail. +type CertificateOrdersClientResendEmailResponse struct { + // placeholder for future response values +} + +// CertificateOrdersClientResendRequestEmailsResponse contains the response from method CertificateOrdersClient.ResendRequestEmails. +type CertificateOrdersClientResendRequestEmailsResponse struct { + // placeholder for future response values +} + +// CertificateOrdersClientRetrieveCertificateActionsResponse contains the response from method CertificateOrdersClient.RetrieveCertificateActions. +type CertificateOrdersClientRetrieveCertificateActionsResponse struct { + // Array of CertificateOrderAction + CertificateOrderActionArray []*CertificateOrderAction +} + +// CertificateOrdersClientRetrieveCertificateEmailHistoryResponse contains the response from method CertificateOrdersClient.RetrieveCertificateEmailHistory. +type CertificateOrdersClientRetrieveCertificateEmailHistoryResponse struct { + // Array of CertificateEmail + CertificateEmailArray []*CertificateEmail +} + +// CertificateOrdersClientRetrieveSiteSealResponse contains the response from method CertificateOrdersClient.RetrieveSiteSeal. +type CertificateOrdersClientRetrieveSiteSealResponse struct { + // Site seal + SiteSeal +} + +// CertificateOrdersClientUpdateCertificateResponse contains the response from method CertificateOrdersClient.UpdateCertificate. +type CertificateOrdersClientUpdateCertificateResponse struct { + // Key Vault container ARM resource for a certificate that is purchased through Azure. + CertificateResource +} + +// CertificateOrdersClientUpdateResponse contains the response from method CertificateOrdersClient.Update. +type CertificateOrdersClientUpdateResponse struct { + // SSL certificate purchase order. + CertificateOrder +} + +// CertificateOrdersClientValidatePurchaseInformationResponse contains the response from method CertificateOrdersClient.ValidatePurchaseInformation. +type CertificateOrdersClientValidatePurchaseInformationResponse struct { + // placeholder for future response values +} + +// CertificateOrdersClientVerifyDomainOwnershipResponse contains the response from method CertificateOrdersClient.VerifyDomainOwnership. +type CertificateOrdersClientVerifyDomainOwnershipResponse struct { + // placeholder for future response values +} + +// CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse contains the response from method +// CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse. +type CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse struct { + // Class representing Response from Detector + DetectorResponse +} + +// CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse contains the response from method +// CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager. +type CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse struct { + // Collection of detector responses + DetectorResponseCollection +} + +// CertificateRegistrationProviderClientListOperationsResponse contains the response from method CertificateRegistrationProviderClient.NewListOperationsPager. +type CertificateRegistrationProviderClientListOperationsResponse struct { + // Collection of Azure resource manager operation metadata. + CsmOperationCollection +} + +// CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. +type CertificatesClientCreateOrUpdateResponse struct { + // SSL certificate for an app. + AppCertificate +} + +// CertificatesClientDeleteResponse contains the response from method CertificatesClient.Delete. +type CertificatesClientDeleteResponse struct { + // placeholder for future response values +} + +// CertificatesClientGetResponse contains the response from method CertificatesClient.Get. +type CertificatesClientGetResponse struct { + // SSL certificate for an app. + AppCertificate +} + +// CertificatesClientListByResourceGroupResponse contains the response from method CertificatesClient.NewListByResourceGroupPager. +type CertificatesClientListByResourceGroupResponse struct { + // Collection of certificates. + AppCertificateCollection +} + +// CertificatesClientListResponse contains the response from method CertificatesClient.NewListPager. +type CertificatesClientListResponse struct { + // Collection of certificates. + AppCertificateCollection +} + +// CertificatesClientUpdateResponse contains the response from method CertificatesClient.Update. +type CertificatesClientUpdateResponse struct { + // SSL certificate for an app. + AppCertificate +} + +// ContainerAppsClientCreateOrUpdateResponse contains the response from method ContainerAppsClient.BeginCreateOrUpdate. +type ContainerAppsClientCreateOrUpdateResponse struct { + // Container App. + ContainerApp +} + +// ContainerAppsClientDeleteResponse contains the response from method ContainerAppsClient.BeginDelete. +type ContainerAppsClientDeleteResponse struct { + // placeholder for future response values +} + +// ContainerAppsClientGetResponse contains the response from method ContainerAppsClient.Get. +type ContainerAppsClientGetResponse struct { + // Container App. + ContainerApp +} + +// ContainerAppsClientListByResourceGroupResponse contains the response from method ContainerAppsClient.NewListByResourceGroupPager. +type ContainerAppsClientListByResourceGroupResponse struct { + // Container App collection ARM resource. + ContainerAppCollection +} + +// ContainerAppsClientListBySubscriptionResponse contains the response from method ContainerAppsClient.NewListBySubscriptionPager. +type ContainerAppsClientListBySubscriptionResponse struct { + // Container App collection ARM resource. + ContainerAppCollection +} + +// ContainerAppsClientListSecretsResponse contains the response from method ContainerAppsClient.ListSecrets. +type ContainerAppsClientListSecretsResponse struct { + // Container App Secrets Collection ARM resource. + SecretsCollection +} + +// ContainerAppsRevisionsClientActivateRevisionResponse contains the response from method ContainerAppsRevisionsClient.ActivateRevision. +type ContainerAppsRevisionsClientActivateRevisionResponse struct { + // placeholder for future response values +} + +// ContainerAppsRevisionsClientDeactivateRevisionResponse contains the response from method ContainerAppsRevisionsClient.DeactivateRevision. +type ContainerAppsRevisionsClientDeactivateRevisionResponse struct { + // placeholder for future response values +} + +// ContainerAppsRevisionsClientGetRevisionResponse contains the response from method ContainerAppsRevisionsClient.GetRevision. +type ContainerAppsRevisionsClientGetRevisionResponse struct { + // Container App Revision. + Revision +} + +// ContainerAppsRevisionsClientListRevisionsResponse contains the response from method ContainerAppsRevisionsClient.NewListRevisionsPager. +type ContainerAppsRevisionsClientListRevisionsResponse struct { + // Container App Revisions collection ARM resource. + RevisionCollection +} + +// ContainerAppsRevisionsClientRestartRevisionResponse contains the response from method ContainerAppsRevisionsClient.RestartRevision. +type ContainerAppsRevisionsClientRestartRevisionResponse struct { + // placeholder for future response values +} + +// DeletedWebAppsClientGetDeletedWebAppByLocationResponse contains the response from method DeletedWebAppsClient.GetDeletedWebAppByLocation. +type DeletedWebAppsClientGetDeletedWebAppByLocationResponse struct { + // A deleted app. + DeletedSite +} + +// DeletedWebAppsClientListByLocationResponse contains the response from method DeletedWebAppsClient.NewListByLocationPager. +type DeletedWebAppsClientListByLocationResponse struct { + // Collection of deleted apps. + DeletedWebAppCollection +} + +// DeletedWebAppsClientListResponse contains the response from method DeletedWebAppsClient.NewListPager. +type DeletedWebAppsClientListResponse struct { + // Collection of deleted apps. + DeletedWebAppCollection +} + +// DiagnosticsClientExecuteSiteAnalysisResponse contains the response from method DiagnosticsClient.ExecuteSiteAnalysis. +type DiagnosticsClientExecuteSiteAnalysisResponse struct { + // Class representing a diagnostic analysis done on an application + DiagnosticAnalysis +} + +// DiagnosticsClientExecuteSiteAnalysisSlotResponse contains the response from method DiagnosticsClient.ExecuteSiteAnalysisSlot. +type DiagnosticsClientExecuteSiteAnalysisSlotResponse struct { + // Class representing a diagnostic analysis done on an application + DiagnosticAnalysis +} + +// DiagnosticsClientExecuteSiteDetectorResponse contains the response from method DiagnosticsClient.ExecuteSiteDetector. +type DiagnosticsClientExecuteSiteDetectorResponse struct { + // Class representing Response from Diagnostic Detectors + DiagnosticDetectorResponse +} + +// DiagnosticsClientExecuteSiteDetectorSlotResponse contains the response from method DiagnosticsClient.ExecuteSiteDetectorSlot. +type DiagnosticsClientExecuteSiteDetectorSlotResponse struct { + // Class representing Response from Diagnostic Detectors + DiagnosticDetectorResponse +} + +// DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse contains the response from method DiagnosticsClient.GetHostingEnvironmentDetectorResponse. +type DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse struct { + // Class representing Response from Detector + DetectorResponse +} + +// DiagnosticsClientGetSiteAnalysisResponse contains the response from method DiagnosticsClient.GetSiteAnalysis. +type DiagnosticsClientGetSiteAnalysisResponse struct { + // Definition of Analysis + AnalysisDefinition +} + +// DiagnosticsClientGetSiteAnalysisSlotResponse contains the response from method DiagnosticsClient.GetSiteAnalysisSlot. +type DiagnosticsClientGetSiteAnalysisSlotResponse struct { + // Definition of Analysis + AnalysisDefinition +} + +// DiagnosticsClientGetSiteDetectorResponse contains the response from method DiagnosticsClient.GetSiteDetector. +type DiagnosticsClientGetSiteDetectorResponse struct { + // ARM resource for a detector definition + DetectorDefinitionResource +} + +// DiagnosticsClientGetSiteDetectorResponseResponse contains the response from method DiagnosticsClient.GetSiteDetectorResponse. +type DiagnosticsClientGetSiteDetectorResponseResponse struct { + // Class representing Response from Detector + DetectorResponse +} + +// DiagnosticsClientGetSiteDetectorResponseSlotResponse contains the response from method DiagnosticsClient.GetSiteDetectorResponseSlot. +type DiagnosticsClientGetSiteDetectorResponseSlotResponse struct { + // Class representing Response from Detector + DetectorResponse +} + +// DiagnosticsClientGetSiteDetectorSlotResponse contains the response from method DiagnosticsClient.GetSiteDetectorSlot. +type DiagnosticsClientGetSiteDetectorSlotResponse struct { + // ARM resource for a detector definition + DetectorDefinitionResource +} + +// DiagnosticsClientGetSiteDiagnosticCategoryResponse contains the response from method DiagnosticsClient.GetSiteDiagnosticCategory. +type DiagnosticsClientGetSiteDiagnosticCategoryResponse struct { + // Class representing detector definition + DiagnosticCategory +} + +// DiagnosticsClientGetSiteDiagnosticCategorySlotResponse contains the response from method DiagnosticsClient.GetSiteDiagnosticCategorySlot. +type DiagnosticsClientGetSiteDiagnosticCategorySlotResponse struct { + // Class representing detector definition + DiagnosticCategory +} + +// DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse contains the response from method DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager. +type DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse struct { + // Collection of detector responses + DetectorResponseCollection +} + +// DiagnosticsClientListSiteAnalysesResponse contains the response from method DiagnosticsClient.NewListSiteAnalysesPager. +type DiagnosticsClientListSiteAnalysesResponse struct { + // Collection of Diagnostic Analyses + DiagnosticAnalysisCollection +} + +// DiagnosticsClientListSiteAnalysesSlotResponse contains the response from method DiagnosticsClient.NewListSiteAnalysesSlotPager. +type DiagnosticsClientListSiteAnalysesSlotResponse struct { + // Collection of Diagnostic Analyses + DiagnosticAnalysisCollection +} + +// DiagnosticsClientListSiteDetectorResponsesResponse contains the response from method DiagnosticsClient.NewListSiteDetectorResponsesPager. +type DiagnosticsClientListSiteDetectorResponsesResponse struct { + // Collection of detector responses + DetectorResponseCollection +} + +// DiagnosticsClientListSiteDetectorResponsesSlotResponse contains the response from method DiagnosticsClient.NewListSiteDetectorResponsesSlotPager. +type DiagnosticsClientListSiteDetectorResponsesSlotResponse struct { + // Collection of detector responses + DetectorResponseCollection +} + +// DiagnosticsClientListSiteDetectorsResponse contains the response from method DiagnosticsClient.NewListSiteDetectorsPager. +type DiagnosticsClientListSiteDetectorsResponse struct { + // Collection of Diagnostic Detectors + DiagnosticDetectorCollection +} + +// DiagnosticsClientListSiteDetectorsSlotResponse contains the response from method DiagnosticsClient.NewListSiteDetectorsSlotPager. +type DiagnosticsClientListSiteDetectorsSlotResponse struct { + // Collection of Diagnostic Detectors + DiagnosticDetectorCollection +} + +// DiagnosticsClientListSiteDiagnosticCategoriesResponse contains the response from method DiagnosticsClient.NewListSiteDiagnosticCategoriesPager. +type DiagnosticsClientListSiteDiagnosticCategoriesResponse struct { + // Collection of Diagnostic Categories + DiagnosticCategoryCollection +} + +// DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse contains the response from method DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager. +type DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse struct { + // Collection of Diagnostic Categories + DiagnosticCategoryCollection +} + +// DomainRegistrationProviderClientListOperationsResponse contains the response from method DomainRegistrationProviderClient.NewListOperationsPager. +type DomainRegistrationProviderClientListOperationsResponse struct { + // Collection of Azure resource manager operation metadata. + CsmOperationCollection +} + +// DomainsClientCheckAvailabilityResponse contains the response from method DomainsClient.CheckAvailability. +type DomainsClientCheckAvailabilityResponse struct { + // Domain availability check result. + DomainAvailabilityCheckResult +} + +// DomainsClientCreateOrUpdateOwnershipIdentifierResponse contains the response from method DomainsClient.CreateOrUpdateOwnershipIdentifier. +type DomainsClientCreateOrUpdateOwnershipIdentifierResponse struct { + // Domain ownership Identifier. + DomainOwnershipIdentifier +} + +// DomainsClientCreateOrUpdateResponse contains the response from method DomainsClient.BeginCreateOrUpdate. +type DomainsClientCreateOrUpdateResponse struct { + // Information about a domain. + Domain +} + +// DomainsClientDeleteOwnershipIdentifierResponse contains the response from method DomainsClient.DeleteOwnershipIdentifier. +type DomainsClientDeleteOwnershipIdentifierResponse struct { + // placeholder for future response values +} + +// DomainsClientDeleteResponse contains the response from method DomainsClient.Delete. +type DomainsClientDeleteResponse struct { + // placeholder for future response values +} + +// DomainsClientGetControlCenterSsoRequestResponse contains the response from method DomainsClient.GetControlCenterSsoRequest. +type DomainsClientGetControlCenterSsoRequestResponse struct { + // Single sign-on request information for domain management. + DomainControlCenterSsoRequest +} + +// DomainsClientGetOwnershipIdentifierResponse contains the response from method DomainsClient.GetOwnershipIdentifier. +type DomainsClientGetOwnershipIdentifierResponse struct { + // Domain ownership Identifier. + DomainOwnershipIdentifier +} + +// DomainsClientGetResponse contains the response from method DomainsClient.Get. +type DomainsClientGetResponse struct { + // Information about a domain. + Domain +} + +// DomainsClientListByResourceGroupResponse contains the response from method DomainsClient.NewListByResourceGroupPager. +type DomainsClientListByResourceGroupResponse struct { + // Collection of domains. + DomainCollection +} + +// DomainsClientListOwnershipIdentifiersResponse contains the response from method DomainsClient.NewListOwnershipIdentifiersPager. +type DomainsClientListOwnershipIdentifiersResponse struct { + // Collection of domain ownership identifiers. + DomainOwnershipIdentifierCollection +} + +// DomainsClientListRecommendationsResponse contains the response from method DomainsClient.NewListRecommendationsPager. +type DomainsClientListRecommendationsResponse struct { + // Collection of domain name identifiers. + NameIdentifierCollection +} + +// DomainsClientListResponse contains the response from method DomainsClient.NewListPager. +type DomainsClientListResponse struct { + // Collection of domains. + DomainCollection +} + +// DomainsClientRenewResponse contains the response from method DomainsClient.Renew. +type DomainsClientRenewResponse struct { + // placeholder for future response values +} + +// DomainsClientTransferOutResponse contains the response from method DomainsClient.TransferOut. +type DomainsClientTransferOutResponse struct { + // Information about a domain. + Domain +} + +// DomainsClientUpdateOwnershipIdentifierResponse contains the response from method DomainsClient.UpdateOwnershipIdentifier. +type DomainsClientUpdateOwnershipIdentifierResponse struct { + // Domain ownership Identifier. + DomainOwnershipIdentifier +} + +// DomainsClientUpdateResponse contains the response from method DomainsClient.Update. +type DomainsClientUpdateResponse struct { + // Information about a domain. + Domain +} + +// EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse contains the response from method EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection. +type EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. + RemotePrivateEndpointConnectionARMResource +} + +// EnvironmentsClientChangeVnetResponse contains the response from method EnvironmentsClient.BeginChangeVnet. +type EnvironmentsClientChangeVnetResponse struct { + // Collection of App Service apps. + WebAppCollection +} + +// EnvironmentsClientCreateOrUpdateMultiRolePoolResponse contains the response from method EnvironmentsClient.BeginCreateOrUpdateMultiRolePool. +type EnvironmentsClientCreateOrUpdateMultiRolePoolResponse struct { + // Worker pool of an App Service Environment ARM resource. + WorkerPoolResource +} + +// EnvironmentsClientCreateOrUpdateResponse contains the response from method EnvironmentsClient.BeginCreateOrUpdate. +type EnvironmentsClientCreateOrUpdateResponse struct { + // App Service Environment ARM resource. + EnvironmentResource +} + +// EnvironmentsClientCreateOrUpdateWorkerPoolResponse contains the response from method EnvironmentsClient.BeginCreateOrUpdateWorkerPool. +type EnvironmentsClientCreateOrUpdateWorkerPoolResponse struct { + // Worker pool of an App Service Environment ARM resource. + WorkerPoolResource +} + +// EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse contains the response from method EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration. +type EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse struct { + // Anything + Interface any +} + +// EnvironmentsClientDeletePrivateEndpointConnectionResponse contains the response from method EnvironmentsClient.BeginDeletePrivateEndpointConnection. +type EnvironmentsClientDeletePrivateEndpointConnectionResponse struct { + // Anything + Interface any +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentsClientDeletePrivateEndpointConnectionResponse. +func (e *EnvironmentsClientDeletePrivateEndpointConnectionResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &e.Interface) +} + +// EnvironmentsClientDeleteResponse contains the response from method EnvironmentsClient.BeginDelete. +type EnvironmentsClientDeleteResponse struct { + // placeholder for future response values +} + +// EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse contains the response from method EnvironmentsClient.GetAseCustomDNSSuffixConfiguration. +type EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse struct { + // Full view of the custom domain suffix configuration for ASEv3. + CustomDNSSuffixConfiguration +} + +// EnvironmentsClientGetAseV3NetworkingConfigurationResponse contains the response from method EnvironmentsClient.GetAseV3NetworkingConfiguration. +type EnvironmentsClientGetAseV3NetworkingConfigurationResponse struct { + // Full view of networking configuration for an ASE. + AseV3NetworkingConfiguration +} + +// EnvironmentsClientGetDiagnosticsItemResponse contains the response from method EnvironmentsClient.GetDiagnosticsItem. +type EnvironmentsClientGetDiagnosticsItemResponse struct { + // Diagnostics for an App Service Environment. + HostingEnvironmentDiagnostics +} + +// EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse contains the response from method EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager. +type EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse struct { + // Collection of Inbound Environment Endpoints + InboundEnvironmentEndpointCollection +} + +// EnvironmentsClientGetMultiRolePoolResponse contains the response from method EnvironmentsClient.GetMultiRolePool. +type EnvironmentsClientGetMultiRolePoolResponse struct { + // Worker pool of an App Service Environment ARM resource. + WorkerPoolResource +} + +// EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse contains the response from method EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager. +type EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse struct { + // Collection of Outbound Environment Endpoints + OutboundEnvironmentEndpointCollection +} + +// EnvironmentsClientGetPrivateEndpointConnectionListResponse contains the response from method EnvironmentsClient.NewGetPrivateEndpointConnectionListPager. +type EnvironmentsClientGetPrivateEndpointConnectionListResponse struct { + PrivateEndpointConnectionCollection +} + +// EnvironmentsClientGetPrivateEndpointConnectionResponse contains the response from method EnvironmentsClient.GetPrivateEndpointConnection. +type EnvironmentsClientGetPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. + RemotePrivateEndpointConnectionARMResource +} + +// EnvironmentsClientGetPrivateLinkResourcesResponse contains the response from method EnvironmentsClient.GetPrivateLinkResources. +type EnvironmentsClientGetPrivateLinkResourcesResponse struct { + // Wrapper for a collection of private link resources + PrivateLinkResourcesWrapper +} + +// EnvironmentsClientGetResponse contains the response from method EnvironmentsClient.Get. +type EnvironmentsClientGetResponse struct { + // App Service Environment ARM resource. + EnvironmentResource +} + +// EnvironmentsClientGetVipInfoResponse contains the response from method EnvironmentsClient.GetVipInfo. +type EnvironmentsClientGetVipInfoResponse struct { + // Describes main public IP address and any extra virtual IPs. + AddressResponse +} + +// EnvironmentsClientGetWorkerPoolResponse contains the response from method EnvironmentsClient.GetWorkerPool. +type EnvironmentsClientGetWorkerPoolResponse struct { + // Worker pool of an App Service Environment ARM resource. + WorkerPoolResource +} + +// EnvironmentsClientListAppServicePlansResponse contains the response from method EnvironmentsClient.NewListAppServicePlansPager. +type EnvironmentsClientListAppServicePlansResponse struct { + // Collection of App Service plans. + PlanCollection +} + +// EnvironmentsClientListByResourceGroupResponse contains the response from method EnvironmentsClient.NewListByResourceGroupPager. +type EnvironmentsClientListByResourceGroupResponse struct { + // Collection of App Service Environments. + EnvironmentCollection +} + +// EnvironmentsClientListCapacitiesResponse contains the response from method EnvironmentsClient.NewListCapacitiesPager. +type EnvironmentsClientListCapacitiesResponse struct { + // Collection of stamp capacities. + StampCapacityCollection +} + +// EnvironmentsClientListDiagnosticsResponse contains the response from method EnvironmentsClient.ListDiagnostics. +type EnvironmentsClientListDiagnosticsResponse struct { + // Array of HostingEnvironmentDiagnostics + HostingEnvironmentDiagnosticsArray []*HostingEnvironmentDiagnostics +} + +// EnvironmentsClientListMultiRoleMetricDefinitionsResponse contains the response from method EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager. +type EnvironmentsClientListMultiRoleMetricDefinitionsResponse struct { + // Collection of metric definitions. + ResourceMetricDefinitionCollection +} + +// EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse contains the response from method EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager. +type EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse struct { + // Collection of metric definitions. + ResourceMetricDefinitionCollection +} + +// EnvironmentsClientListMultiRolePoolSKUsResponse contains the response from method EnvironmentsClient.NewListMultiRolePoolSKUsPager. +type EnvironmentsClientListMultiRolePoolSKUsResponse struct { + // Collection of SKU information. + SKUInfoCollection +} + +// EnvironmentsClientListMultiRolePoolsResponse contains the response from method EnvironmentsClient.NewListMultiRolePoolsPager. +type EnvironmentsClientListMultiRolePoolsResponse struct { + // Collection of worker pools. + WorkerPoolCollection +} + +// EnvironmentsClientListMultiRoleUsagesResponse contains the response from method EnvironmentsClient.NewListMultiRoleUsagesPager. +type EnvironmentsClientListMultiRoleUsagesResponse struct { + // Collection of usages. + UsageCollection +} + +// EnvironmentsClientListOperationsResponse contains the response from method EnvironmentsClient.ListOperations. +type EnvironmentsClientListOperationsResponse struct { + // Array of Operation + OperationArray []*Operation +} + +// EnvironmentsClientListResponse contains the response from method EnvironmentsClient.NewListPager. +type EnvironmentsClientListResponse struct { + // Collection of App Service Environments. + EnvironmentCollection +} + +// EnvironmentsClientListUsagesResponse contains the response from method EnvironmentsClient.NewListUsagesPager. +type EnvironmentsClientListUsagesResponse struct { + // Collection of CSM usage quotas. + CsmUsageQuotaCollection +} + +// EnvironmentsClientListWebAppsResponse contains the response from method EnvironmentsClient.NewListWebAppsPager. +type EnvironmentsClientListWebAppsResponse struct { + // Collection of App Service apps. + WebAppCollection +} + +// EnvironmentsClientListWebWorkerMetricDefinitionsResponse contains the response from method EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager. +type EnvironmentsClientListWebWorkerMetricDefinitionsResponse struct { + // Collection of metric definitions. + ResourceMetricDefinitionCollection +} + +// EnvironmentsClientListWebWorkerUsagesResponse contains the response from method EnvironmentsClient.NewListWebWorkerUsagesPager. +type EnvironmentsClientListWebWorkerUsagesResponse struct { + // Collection of usages. + UsageCollection +} + +// EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse contains the response from method EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager. +type EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse struct { + // Collection of metric definitions. + ResourceMetricDefinitionCollection +} + +// EnvironmentsClientListWorkerPoolSKUsResponse contains the response from method EnvironmentsClient.NewListWorkerPoolSKUsPager. +type EnvironmentsClientListWorkerPoolSKUsResponse struct { + // Collection of SKU information. + SKUInfoCollection +} + +// EnvironmentsClientListWorkerPoolsResponse contains the response from method EnvironmentsClient.NewListWorkerPoolsPager. +type EnvironmentsClientListWorkerPoolsResponse struct { + // Collection of worker pools. + WorkerPoolCollection +} + +// EnvironmentsClientRebootResponse contains the response from method EnvironmentsClient.Reboot. +type EnvironmentsClientRebootResponse struct { + // placeholder for future response values +} + +// EnvironmentsClientResumeResponse contains the response from method EnvironmentsClient.BeginResume. +type EnvironmentsClientResumeResponse struct { + // Collection of App Service apps. + WebAppCollection +} + +// EnvironmentsClientSuspendResponse contains the response from method EnvironmentsClient.BeginSuspend. +type EnvironmentsClientSuspendResponse struct { + // Collection of App Service apps. + WebAppCollection +} + +// EnvironmentsClientTestUpgradeAvailableNotificationResponse contains the response from method EnvironmentsClient.TestUpgradeAvailableNotification. +type EnvironmentsClientTestUpgradeAvailableNotificationResponse struct { + // placeholder for future response values +} + +// EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse contains the response from method EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration. +type EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse struct { + // Full view of the custom domain suffix configuration for ASEv3. + CustomDNSSuffixConfiguration +} + +// EnvironmentsClientUpdateAseNetworkingConfigurationResponse contains the response from method EnvironmentsClient.UpdateAseNetworkingConfiguration. +type EnvironmentsClientUpdateAseNetworkingConfigurationResponse struct { + // Full view of networking configuration for an ASE. + AseV3NetworkingConfiguration +} + +// EnvironmentsClientUpdateMultiRolePoolResponse contains the response from method EnvironmentsClient.UpdateMultiRolePool. +type EnvironmentsClientUpdateMultiRolePoolResponse struct { + // Worker pool of an App Service Environment ARM resource. + WorkerPoolResource +} + +// EnvironmentsClientUpdateResponse contains the response from method EnvironmentsClient.Update. +type EnvironmentsClientUpdateResponse struct { + // App Service Environment ARM resource. + EnvironmentResource +} + +// EnvironmentsClientUpdateWorkerPoolResponse contains the response from method EnvironmentsClient.UpdateWorkerPool. +type EnvironmentsClientUpdateWorkerPoolResponse struct { + // Worker pool of an App Service Environment ARM resource. + WorkerPoolResource +} + +// EnvironmentsClientUpgradeResponse contains the response from method EnvironmentsClient.BeginUpgrade. +type EnvironmentsClientUpgradeResponse struct { + // placeholder for future response values +} + +// GetUsagesInLocationClientListResponse contains the response from method GetUsagesInLocationClient.NewListPager. +type GetUsagesInLocationClientListResponse struct { + // Collection of CSM usage quotas. + CsmUsageQuotaCollection +} + +// GlobalClientGetDeletedWebAppResponse contains the response from method GlobalClient.GetDeletedWebApp. +type GlobalClientGetDeletedWebAppResponse struct { + // A deleted app. + DeletedSite +} + +// GlobalClientGetDeletedWebAppSnapshotsResponse contains the response from method GlobalClient.GetDeletedWebAppSnapshots. +type GlobalClientGetDeletedWebAppSnapshotsResponse struct { + // Array of Snapshot + SnapshotArray []*Snapshot +} + +// GlobalClientGetSubscriptionOperationWithAsyncResponseResponse contains the response from method GlobalClient.GetSubscriptionOperationWithAsyncResponse. +type GlobalClientGetSubscriptionOperationWithAsyncResponseResponse struct { + // placeholder for future response values +} + +// KubeEnvironmentsClientCreateOrUpdateResponse contains the response from method KubeEnvironmentsClient.BeginCreateOrUpdate. +type KubeEnvironmentsClientCreateOrUpdateResponse struct { + // A Kubernetes cluster specialized for web workloads by Azure App Service + KubeEnvironment +} + +// KubeEnvironmentsClientDeleteResponse contains the response from method KubeEnvironmentsClient.BeginDelete. +type KubeEnvironmentsClientDeleteResponse struct { + // placeholder for future response values +} + +// KubeEnvironmentsClientGetResponse contains the response from method KubeEnvironmentsClient.Get. +type KubeEnvironmentsClientGetResponse struct { + // A Kubernetes cluster specialized for web workloads by Azure App Service + KubeEnvironment +} + +// KubeEnvironmentsClientListByResourceGroupResponse contains the response from method KubeEnvironmentsClient.NewListByResourceGroupPager. +type KubeEnvironmentsClientListByResourceGroupResponse struct { + // Collection of Kubernetes Environments + KubeEnvironmentCollection +} + +// KubeEnvironmentsClientListBySubscriptionResponse contains the response from method KubeEnvironmentsClient.NewListBySubscriptionPager. +type KubeEnvironmentsClientListBySubscriptionResponse struct { + // Collection of Kubernetes Environments + KubeEnvironmentCollection +} + +// KubeEnvironmentsClientUpdateResponse contains the response from method KubeEnvironmentsClient.Update. +type KubeEnvironmentsClientUpdateResponse struct { + // A Kubernetes cluster specialized for web workloads by Azure App Service + KubeEnvironment +} + +// PlansClientCreateOrUpdateResponse contains the response from method PlansClient.BeginCreateOrUpdate. +type PlansClientCreateOrUpdateResponse struct { + // App Service plan. + Plan +} + +// PlansClientCreateOrUpdateVnetRouteResponse contains the response from method PlansClient.CreateOrUpdateVnetRoute. +type PlansClientCreateOrUpdateVnetRouteResponse struct { + // Virtual Network route contract used to pass routing information for a Virtual Network. + VnetRoute +} + +// PlansClientDeleteHybridConnectionResponse contains the response from method PlansClient.DeleteHybridConnection. +type PlansClientDeleteHybridConnectionResponse struct { + // placeholder for future response values +} + +// PlansClientDeleteResponse contains the response from method PlansClient.Delete. +type PlansClientDeleteResponse struct { + // placeholder for future response values +} + +// PlansClientDeleteVnetRouteResponse contains the response from method PlansClient.DeleteVnetRoute. +type PlansClientDeleteVnetRouteResponse struct { + // placeholder for future response values +} + +// PlansClientGetHybridConnectionPlanLimitResponse contains the response from method PlansClient.GetHybridConnectionPlanLimit. +type PlansClientGetHybridConnectionPlanLimitResponse struct { + // Hybrid Connection limits contract. This is used to return the plan limits of Hybrid Connections. + HybridConnectionLimits +} + +// PlansClientGetHybridConnectionResponse contains the response from method PlansClient.GetHybridConnection. +type PlansClientGetHybridConnectionResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. + HybridConnection +} + +// PlansClientGetResponse contains the response from method PlansClient.Get. +type PlansClientGetResponse struct { + // App Service plan. + Plan +} + +// PlansClientGetRouteForVnetResponse contains the response from method PlansClient.GetRouteForVnet. +type PlansClientGetRouteForVnetResponse struct { + // Array of VnetRoute + VnetRouteArray []*VnetRoute +} + +// PlansClientGetServerFarmSKUsResponse contains the response from method PlansClient.GetServerFarmSKUs. +type PlansClientGetServerFarmSKUsResponse struct { + // Anything + Interface any +} + +// PlansClientGetVnetFromServerFarmResponse contains the response from method PlansClient.GetVnetFromServerFarm. +type PlansClientGetVnetFromServerFarmResponse struct { + // Virtual Network information ARM resource. + VnetInfoResource +} + +// PlansClientGetVnetGatewayResponse contains the response from method PlansClient.GetVnetGateway. +type PlansClientGetVnetGatewayResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. + VnetGateway +} + +// PlansClientListByResourceGroupResponse contains the response from method PlansClient.NewListByResourceGroupPager. +type PlansClientListByResourceGroupResponse struct { + // Collection of App Service plans. + PlanCollection +} + +// PlansClientListCapabilitiesResponse contains the response from method PlansClient.ListCapabilities. +type PlansClientListCapabilitiesResponse struct { + // Array of Capability + CapabilityArray []*Capability +} + +// PlansClientListHybridConnectionKeysResponse contains the response from method PlansClient.ListHybridConnectionKeys. +type PlansClientListHybridConnectionKeysResponse struct { + // Hybrid Connection key contract. This has the send key name and value for a Hybrid Connection. + HybridConnectionKey +} + +// PlansClientListHybridConnectionsResponse contains the response from method PlansClient.NewListHybridConnectionsPager. +type PlansClientListHybridConnectionsResponse struct { + // Collection of hostname bindings. + HybridConnectionCollection +} + +// PlansClientListResponse contains the response from method PlansClient.NewListPager. +type PlansClientListResponse struct { + // Collection of App Service plans. + PlanCollection +} + +// PlansClientListRoutesForVnetResponse contains the response from method PlansClient.ListRoutesForVnet. +type PlansClientListRoutesForVnetResponse struct { + // Array of VnetRoute + VnetRouteArray []*VnetRoute +} + +// PlansClientListUsagesResponse contains the response from method PlansClient.NewListUsagesPager. +type PlansClientListUsagesResponse struct { + // Collection of CSM usage quotas. + CsmUsageQuotaCollection +} + +// PlansClientListVnetsResponse contains the response from method PlansClient.ListVnets. +type PlansClientListVnetsResponse struct { + // Array of VnetInfoResource + VnetInfoResourceArray []*VnetInfoResource +} + +// PlansClientListWebAppsByHybridConnectionResponse contains the response from method PlansClient.NewListWebAppsByHybridConnectionPager. +type PlansClientListWebAppsByHybridConnectionResponse struct { + // Collection of resources. + ResourceCollection +} + +// PlansClientListWebAppsResponse contains the response from method PlansClient.NewListWebAppsPager. +type PlansClientListWebAppsResponse struct { + // Collection of App Service apps. + WebAppCollection +} + +// PlansClientRebootWorkerResponse contains the response from method PlansClient.RebootWorker. +type PlansClientRebootWorkerResponse struct { + // placeholder for future response values +} + +// PlansClientRestartWebAppsResponse contains the response from method PlansClient.RestartWebApps. +type PlansClientRestartWebAppsResponse struct { + // placeholder for future response values +} + +// PlansClientUpdateResponse contains the response from method PlansClient.Update. +type PlansClientUpdateResponse struct { + // App Service plan. + Plan +} + +// PlansClientUpdateVnetGatewayResponse contains the response from method PlansClient.UpdateVnetGateway. +type PlansClientUpdateVnetGatewayResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. + VnetGateway +} + +// PlansClientUpdateVnetRouteResponse contains the response from method PlansClient.UpdateVnetRoute. +type PlansClientUpdateVnetRouteResponse struct { + // Virtual Network route contract used to pass routing information for a Virtual Network. + VnetRoute +} + +// ProviderClientGetAvailableStacksOnPremResponse contains the response from method ProviderClient.NewGetAvailableStacksOnPremPager. +type ProviderClientGetAvailableStacksOnPremResponse struct { + // Collection of Application Stacks + ApplicationStackCollection +} + +// ProviderClientGetAvailableStacksResponse contains the response from method ProviderClient.NewGetAvailableStacksPager. +type ProviderClientGetAvailableStacksResponse struct { + // Collection of Application Stacks + ApplicationStackCollection +} + +// ProviderClientGetFunctionAppStacksForLocationResponse contains the response from method ProviderClient.NewGetFunctionAppStacksForLocationPager. +type ProviderClientGetFunctionAppStacksForLocationResponse struct { + // Collection of Function app Stacks + FunctionAppStackCollection +} + +// ProviderClientGetFunctionAppStacksResponse contains the response from method ProviderClient.NewGetFunctionAppStacksPager. +type ProviderClientGetFunctionAppStacksResponse struct { + // Collection of Function app Stacks + FunctionAppStackCollection +} + +// ProviderClientGetWebAppStacksForLocationResponse contains the response from method ProviderClient.NewGetWebAppStacksForLocationPager. +type ProviderClientGetWebAppStacksForLocationResponse struct { + // Collection of Web app Stacks + WebAppStackCollection +} + +// ProviderClientGetWebAppStacksResponse contains the response from method ProviderClient.NewGetWebAppStacksPager. +type ProviderClientGetWebAppStacksResponse struct { + // Collection of Web app Stacks + WebAppStackCollection +} + +// ProviderClientListOperationsResponse contains the response from method ProviderClient.NewListOperationsPager. +type ProviderClientListOperationsResponse struct { + // Collection of Azure resource manager operation metadata. + CsmOperationCollection +} + +// RecommendationsClientDisableAllForHostingEnvironmentResponse contains the response from method RecommendationsClient.DisableAllForHostingEnvironment. +type RecommendationsClientDisableAllForHostingEnvironmentResponse struct { + // placeholder for future response values +} + +// RecommendationsClientDisableAllForWebAppResponse contains the response from method RecommendationsClient.DisableAllForWebApp. +type RecommendationsClientDisableAllForWebAppResponse struct { + // placeholder for future response values +} + +// RecommendationsClientDisableRecommendationForHostingEnvironmentResponse contains the response from method RecommendationsClient.DisableRecommendationForHostingEnvironment. +type RecommendationsClientDisableRecommendationForHostingEnvironmentResponse struct { + // placeholder for future response values +} + +// RecommendationsClientDisableRecommendationForSiteResponse contains the response from method RecommendationsClient.DisableRecommendationForSite. +type RecommendationsClientDisableRecommendationForSiteResponse struct { + // placeholder for future response values +} + +// RecommendationsClientDisableRecommendationForSubscriptionResponse contains the response from method RecommendationsClient.DisableRecommendationForSubscription. +type RecommendationsClientDisableRecommendationForSubscriptionResponse struct { + // placeholder for future response values +} + +// RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse contains the response from method RecommendationsClient.GetRuleDetailsByHostingEnvironment. +type RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse struct { + // Represents a recommendation rule that the recommendation engine can perform. + RecommendationRule +} + +// RecommendationsClientGetRuleDetailsByWebAppResponse contains the response from method RecommendationsClient.GetRuleDetailsByWebApp. +type RecommendationsClientGetRuleDetailsByWebAppResponse struct { + // Represents a recommendation rule that the recommendation engine can perform. + RecommendationRule +} + +// RecommendationsClientListHistoryForHostingEnvironmentResponse contains the response from method RecommendationsClient.NewListHistoryForHostingEnvironmentPager. +type RecommendationsClientListHistoryForHostingEnvironmentResponse struct { + // Collection of recommendations. + RecommendationCollection +} + +// RecommendationsClientListHistoryForWebAppResponse contains the response from method RecommendationsClient.NewListHistoryForWebAppPager. +type RecommendationsClientListHistoryForWebAppResponse struct { + // Collection of recommendations. + RecommendationCollection +} + +// RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse contains the response from method RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager. +type RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse struct { + // Collection of recommendations. + RecommendationCollection +} + +// RecommendationsClientListRecommendedRulesForWebAppResponse contains the response from method RecommendationsClient.NewListRecommendedRulesForWebAppPager. +type RecommendationsClientListRecommendedRulesForWebAppResponse struct { + // Collection of recommendations. + RecommendationCollection +} + +// RecommendationsClientListResponse contains the response from method RecommendationsClient.NewListPager. +type RecommendationsClientListResponse struct { + // Collection of recommendations. + RecommendationCollection +} + +// RecommendationsClientResetAllFiltersForHostingEnvironmentResponse contains the response from method RecommendationsClient.ResetAllFiltersForHostingEnvironment. +type RecommendationsClientResetAllFiltersForHostingEnvironmentResponse struct { + // placeholder for future response values +} + +// RecommendationsClientResetAllFiltersForWebAppResponse contains the response from method RecommendationsClient.ResetAllFiltersForWebApp. +type RecommendationsClientResetAllFiltersForWebAppResponse struct { + // placeholder for future response values +} + +// RecommendationsClientResetAllFiltersResponse contains the response from method RecommendationsClient.ResetAllFilters. +type RecommendationsClientResetAllFiltersResponse struct { + // placeholder for future response values +} + +// ResourceHealthMetadataClientGetBySiteResponse contains the response from method ResourceHealthMetadataClient.GetBySite. +type ResourceHealthMetadataClientGetBySiteResponse struct { + // Used for getting ResourceHealthCheck settings. + ResourceHealthMetadata +} + +// ResourceHealthMetadataClientGetBySiteSlotResponse contains the response from method ResourceHealthMetadataClient.GetBySiteSlot. +type ResourceHealthMetadataClientGetBySiteSlotResponse struct { + // Used for getting ResourceHealthCheck settings. + ResourceHealthMetadata +} + +// ResourceHealthMetadataClientListByResourceGroupResponse contains the response from method ResourceHealthMetadataClient.NewListByResourceGroupPager. +type ResourceHealthMetadataClientListByResourceGroupResponse struct { + // Collection of resource health metadata. + ResourceHealthMetadataCollection +} + +// ResourceHealthMetadataClientListBySiteResponse contains the response from method ResourceHealthMetadataClient.NewListBySitePager. +type ResourceHealthMetadataClientListBySiteResponse struct { + // Collection of resource health metadata. + ResourceHealthMetadataCollection +} + +// ResourceHealthMetadataClientListBySiteSlotResponse contains the response from method ResourceHealthMetadataClient.NewListBySiteSlotPager. +type ResourceHealthMetadataClientListBySiteSlotResponse struct { + // Collection of resource health metadata. + ResourceHealthMetadataCollection +} + +// ResourceHealthMetadataClientListResponse contains the response from method ResourceHealthMetadataClient.NewListPager. +type ResourceHealthMetadataClientListResponse struct { + // Collection of resource health metadata. + ResourceHealthMetadataCollection +} + +// StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse contains the response from method StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection. +type StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. + RemotePrivateEndpointConnectionARMResource +} + +// StaticSitesClientCreateOrUpdateBasicAuthResponse contains the response from method StaticSitesClient.CreateOrUpdateBasicAuth. +type StaticSitesClientCreateOrUpdateBasicAuthResponse struct { + // Static site basic auth properties ARM resource. + StaticSiteBasicAuthPropertiesARMResource +} + +// StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.CreateOrUpdateBuildDatabaseConnection. +type StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse struct { + // Static Site Database Connection resource. + DatabaseConnection +} + +// StaticSitesClientCreateOrUpdateDatabaseConnectionResponse contains the response from method StaticSitesClient.CreateOrUpdateDatabaseConnection. +type StaticSitesClientCreateOrUpdateDatabaseConnectionResponse struct { + // Static Site Database Connection resource. + DatabaseConnection +} + +// StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteAppSettings. +type StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse struct { + // String dictionary resource. + StringDictionary +} + +// StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings. +type StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse struct { + // String dictionary resource. + StringDictionary +} + +// StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings. +type StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse struct { + // String dictionary resource. + StringDictionary +} + +// StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse contains the response from method StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain. +type StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse struct { + // Static Site Custom Domain Overview ARM resource. + StaticSiteCustomDomainOverviewARMResource +} + +// StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings. +type StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse struct { + // String dictionary resource. + StringDictionary +} + +// StaticSitesClientCreateOrUpdateStaticSiteResponse contains the response from method StaticSitesClient.BeginCreateOrUpdateStaticSite. +type StaticSitesClientCreateOrUpdateStaticSiteResponse struct { + // Static Site ARM resource. + StaticSiteARMResource +} + +// StaticSitesClientCreateUserRolesInvitationLinkResponse contains the response from method StaticSitesClient.CreateUserRolesInvitationLink. +type StaticSitesClientCreateUserRolesInvitationLinkResponse struct { + // Static sites user roles invitation link resource. + StaticSiteUserInvitationResponseResource +} + +// StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse contains the response from method StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild. +type StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse struct { + // placeholder for future response values +} + +// StaticSitesClientCreateZipDeploymentForStaticSiteResponse contains the response from method StaticSitesClient.BeginCreateZipDeploymentForStaticSite. +type StaticSitesClientCreateZipDeploymentForStaticSiteResponse struct { + // placeholder for future response values +} + +// StaticSitesClientDeleteBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.DeleteBuildDatabaseConnection. +type StaticSitesClientDeleteBuildDatabaseConnectionResponse struct { + // placeholder for future response values +} + +// StaticSitesClientDeleteDatabaseConnectionResponse contains the response from method StaticSitesClient.DeleteDatabaseConnection. +type StaticSitesClientDeleteDatabaseConnectionResponse struct { + // placeholder for future response values +} + +// StaticSitesClientDeletePrivateEndpointConnectionResponse contains the response from method StaticSitesClient.BeginDeletePrivateEndpointConnection. +type StaticSitesClientDeletePrivateEndpointConnectionResponse struct { + // Anything + Interface any +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitesClientDeletePrivateEndpointConnectionResponse. +func (s *StaticSitesClientDeletePrivateEndpointConnectionResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &s.Interface) +} + +// StaticSitesClientDeleteStaticSiteBuildResponse contains the response from method StaticSitesClient.BeginDeleteStaticSiteBuild. +type StaticSitesClientDeleteStaticSiteBuildResponse struct { + // placeholder for future response values +} + +// StaticSitesClientDeleteStaticSiteCustomDomainResponse contains the response from method StaticSitesClient.BeginDeleteStaticSiteCustomDomain. +type StaticSitesClientDeleteStaticSiteCustomDomainResponse struct { + // placeholder for future response values +} + +// StaticSitesClientDeleteStaticSiteResponse contains the response from method StaticSitesClient.BeginDeleteStaticSite. +type StaticSitesClientDeleteStaticSiteResponse struct { + // placeholder for future response values +} + +// StaticSitesClientDeleteStaticSiteUserResponse contains the response from method StaticSitesClient.DeleteStaticSiteUser. +type StaticSitesClientDeleteStaticSiteUserResponse struct { + // placeholder for future response values +} + +// StaticSitesClientDetachStaticSiteResponse contains the response from method StaticSitesClient.BeginDetachStaticSite. +type StaticSitesClientDetachStaticSiteResponse struct { + // placeholder for future response values +} + +// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse contains the response from method StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild. +type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse struct { + // placeholder for future response values +} + +// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse contains the response from method StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite. +type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse struct { + // placeholder for future response values +} + +// StaticSitesClientGetBasicAuthResponse contains the response from method StaticSitesClient.GetBasicAuth. +type StaticSitesClientGetBasicAuthResponse struct { + // Static site basic auth properties ARM resource. + StaticSiteBasicAuthPropertiesARMResource +} + +// StaticSitesClientGetBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.GetBuildDatabaseConnection. +type StaticSitesClientGetBuildDatabaseConnectionResponse struct { + // Static Site Database Connection resource. + DatabaseConnection +} + +// StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse contains the response from method StaticSitesClient.GetBuildDatabaseConnectionWithDetails. +type StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse struct { + // Static Site Database Connection resource. + DatabaseConnection +} + +// StaticSitesClientGetBuildDatabaseConnectionsResponse contains the response from method StaticSitesClient.NewGetBuildDatabaseConnectionsPager. +type StaticSitesClientGetBuildDatabaseConnectionsResponse struct { + // Collection of static site database connections. + DatabaseConnectionCollection +} + +// StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse contains the response from method StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager. +type StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse struct { + // Collection of static site database connections. + DatabaseConnectionCollection +} + +// StaticSitesClientGetDatabaseConnectionResponse contains the response from method StaticSitesClient.GetDatabaseConnection. +type StaticSitesClientGetDatabaseConnectionResponse struct { + // Static Site Database Connection resource. + DatabaseConnection +} + +// StaticSitesClientGetDatabaseConnectionWithDetailsResponse contains the response from method StaticSitesClient.GetDatabaseConnectionWithDetails. +type StaticSitesClientGetDatabaseConnectionWithDetailsResponse struct { + // Static Site Database Connection resource. + DatabaseConnection +} + +// StaticSitesClientGetDatabaseConnectionsResponse contains the response from method StaticSitesClient.NewGetDatabaseConnectionsPager. +type StaticSitesClientGetDatabaseConnectionsResponse struct { + // Collection of static site database connections. + DatabaseConnectionCollection +} + +// StaticSitesClientGetDatabaseConnectionsWithDetailsResponse contains the response from method StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager. +type StaticSitesClientGetDatabaseConnectionsWithDetailsResponse struct { + // Collection of static site database connections. + DatabaseConnectionCollection +} + +// StaticSitesClientGetLinkedBackendForBuildResponse contains the response from method StaticSitesClient.GetLinkedBackendForBuild. +type StaticSitesClientGetLinkedBackendForBuildResponse struct { + // Static Site Linked Backend ARM resource. + StaticSiteLinkedBackendARMResource +} + +// StaticSitesClientGetLinkedBackendResponse contains the response from method StaticSitesClient.GetLinkedBackend. +type StaticSitesClientGetLinkedBackendResponse struct { + // Static Site Linked Backend ARM resource. + StaticSiteLinkedBackendARMResource +} + +// StaticSitesClientGetLinkedBackendsForBuildResponse contains the response from method StaticSitesClient.NewGetLinkedBackendsForBuildPager. +type StaticSitesClientGetLinkedBackendsForBuildResponse struct { + // Collection of static site linked backends. + StaticSiteLinkedBackendsCollection +} + +// StaticSitesClientGetLinkedBackendsResponse contains the response from method StaticSitesClient.NewGetLinkedBackendsPager. +type StaticSitesClientGetLinkedBackendsResponse struct { + // Collection of static site linked backends. + StaticSiteLinkedBackendsCollection +} + +// StaticSitesClientGetPrivateEndpointConnectionListResponse contains the response from method StaticSitesClient.NewGetPrivateEndpointConnectionListPager. +type StaticSitesClientGetPrivateEndpointConnectionListResponse struct { + PrivateEndpointConnectionCollection +} + +// StaticSitesClientGetPrivateEndpointConnectionResponse contains the response from method StaticSitesClient.GetPrivateEndpointConnection. +type StaticSitesClientGetPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. + RemotePrivateEndpointConnectionARMResource +} + +// StaticSitesClientGetPrivateLinkResourcesResponse contains the response from method StaticSitesClient.GetPrivateLinkResources. +type StaticSitesClientGetPrivateLinkResourcesResponse struct { + // Wrapper for a collection of private link resources + PrivateLinkResourcesWrapper +} + +// StaticSitesClientGetStaticSiteBuildResponse contains the response from method StaticSitesClient.GetStaticSiteBuild. +type StaticSitesClientGetStaticSiteBuildResponse struct { + // Static Site Build ARM resource. + StaticSiteBuildARMResource +} + +// StaticSitesClientGetStaticSiteBuildsResponse contains the response from method StaticSitesClient.NewGetStaticSiteBuildsPager. +type StaticSitesClientGetStaticSiteBuildsResponse struct { + // Collection of static site builds. + StaticSiteBuildCollection +} + +// StaticSitesClientGetStaticSiteCustomDomainResponse contains the response from method StaticSitesClient.GetStaticSiteCustomDomain. +type StaticSitesClientGetStaticSiteCustomDomainResponse struct { + // Static Site Custom Domain Overview ARM resource. + StaticSiteCustomDomainOverviewARMResource +} + +// StaticSitesClientGetStaticSiteResponse contains the response from method StaticSitesClient.GetStaticSite. +type StaticSitesClientGetStaticSiteResponse struct { + // Static Site ARM resource. + StaticSiteARMResource +} + +// StaticSitesClientGetStaticSitesByResourceGroupResponse contains the response from method StaticSitesClient.NewGetStaticSitesByResourceGroupPager. +type StaticSitesClientGetStaticSitesByResourceGroupResponse struct { + // Collection of static sites. + StaticSiteCollection +} + +// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse contains the response from method StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild. +type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse struct { + // Static Site User Provided Function App ARM resource. + StaticSiteUserProvidedFunctionAppARMResource +} + +// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse contains the response from method StaticSitesClient.GetUserProvidedFunctionAppForStaticSite. +type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse struct { + // Static Site User Provided Function App ARM resource. + StaticSiteUserProvidedFunctionAppARMResource +} + +// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse contains the response from method StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager. +type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse struct { + // Collection of static site user provided function apps. + StaticSiteUserProvidedFunctionAppsCollection +} + +// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse contains the response from method StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager. +type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse struct { + // Collection of static site user provided function apps. + StaticSiteUserProvidedFunctionAppsCollection +} + +// StaticSitesClientLinkBackendResponse contains the response from method StaticSitesClient.BeginLinkBackend. +type StaticSitesClientLinkBackendResponse struct { + // Static Site Linked Backend ARM resource. + StaticSiteLinkedBackendARMResource +} + +// StaticSitesClientLinkBackendToBuildResponse contains the response from method StaticSitesClient.BeginLinkBackendToBuild. +type StaticSitesClientLinkBackendToBuildResponse struct { + // Static Site Linked Backend ARM resource. + StaticSiteLinkedBackendARMResource +} + +// StaticSitesClientListBasicAuthResponse contains the response from method StaticSitesClient.NewListBasicAuthPager. +type StaticSitesClientListBasicAuthResponse struct { + // Collection of static site basic auth. + StaticSiteBasicAuthPropertiesCollection +} + +// StaticSitesClientListResponse contains the response from method StaticSitesClient.NewListPager. +type StaticSitesClientListResponse struct { + // Collection of static sites. + StaticSiteCollection +} + +// StaticSitesClientListStaticSiteAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteAppSettings. +type StaticSitesClientListStaticSiteAppSettingsResponse struct { + // String dictionary resource. + StringDictionary +} + +// StaticSitesClientListStaticSiteBuildAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteBuildAppSettings. +type StaticSitesClientListStaticSiteBuildAppSettingsResponse struct { + // String dictionary resource. + StringDictionary +} + +// StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteBuildFunctionAppSettings. +type StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse struct { + // String dictionary resource. + StringDictionary +} + +// StaticSitesClientListStaticSiteBuildFunctionsResponse contains the response from method StaticSitesClient.NewListStaticSiteBuildFunctionsPager. +type StaticSitesClientListStaticSiteBuildFunctionsResponse struct { + // Collection of static site functions. + StaticSiteFunctionOverviewCollection +} + +// StaticSitesClientListStaticSiteConfiguredRolesResponse contains the response from method StaticSitesClient.ListStaticSiteConfiguredRoles. +type StaticSitesClientListStaticSiteConfiguredRolesResponse struct { + // String list resource. + StringList +} + +// StaticSitesClientListStaticSiteCustomDomainsResponse contains the response from method StaticSitesClient.NewListStaticSiteCustomDomainsPager. +type StaticSitesClientListStaticSiteCustomDomainsResponse struct { + // Collection of static site custom domains. + StaticSiteCustomDomainOverviewCollection +} + +// StaticSitesClientListStaticSiteFunctionAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteFunctionAppSettings. +type StaticSitesClientListStaticSiteFunctionAppSettingsResponse struct { + // String dictionary resource. + StringDictionary +} + +// StaticSitesClientListStaticSiteFunctionsResponse contains the response from method StaticSitesClient.NewListStaticSiteFunctionsPager. +type StaticSitesClientListStaticSiteFunctionsResponse struct { + // Collection of static site functions. + StaticSiteFunctionOverviewCollection +} + +// StaticSitesClientListStaticSiteSecretsResponse contains the response from method StaticSitesClient.ListStaticSiteSecrets. +type StaticSitesClientListStaticSiteSecretsResponse struct { + // String dictionary resource. + StringDictionary +} + +// StaticSitesClientListStaticSiteUsersResponse contains the response from method StaticSitesClient.NewListStaticSiteUsersPager. +type StaticSitesClientListStaticSiteUsersResponse struct { + // Collection of static site custom users. + StaticSiteUserCollection +} + +// StaticSitesClientPreviewWorkflowResponse contains the response from method StaticSitesClient.PreviewWorkflow. +type StaticSitesClientPreviewWorkflowResponse struct { + // Preview for the Static Site Workflow to be generated + StaticSitesWorkflowPreview +} + +// StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse contains the response from method StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild. +type StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse struct { + // Static Site User Provided Function App ARM resource. + StaticSiteUserProvidedFunctionAppARMResource +} + +// StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse contains the response from method StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite. +type StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse struct { + // Static Site User Provided Function App ARM resource. + StaticSiteUserProvidedFunctionAppARMResource +} + +// StaticSitesClientResetStaticSiteAPIKeyResponse contains the response from method StaticSitesClient.ResetStaticSiteAPIKey. +type StaticSitesClientResetStaticSiteAPIKeyResponse struct { + // placeholder for future response values +} + +// StaticSitesClientUnlinkBackendFromBuildResponse contains the response from method StaticSitesClient.UnlinkBackendFromBuild. +type StaticSitesClientUnlinkBackendFromBuildResponse struct { + // placeholder for future response values +} + +// StaticSitesClientUnlinkBackendResponse contains the response from method StaticSitesClient.UnlinkBackend. +type StaticSitesClientUnlinkBackendResponse struct { + // placeholder for future response values +} + +// StaticSitesClientUpdateBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.UpdateBuildDatabaseConnection. +type StaticSitesClientUpdateBuildDatabaseConnectionResponse struct { + // Static Site Database Connection resource. + DatabaseConnection +} + +// StaticSitesClientUpdateDatabaseConnectionResponse contains the response from method StaticSitesClient.UpdateDatabaseConnection. +type StaticSitesClientUpdateDatabaseConnectionResponse struct { + // Static Site Database Connection resource. + DatabaseConnection +} + +// StaticSitesClientUpdateStaticSiteResponse contains the response from method StaticSitesClient.UpdateStaticSite. +type StaticSitesClientUpdateStaticSiteResponse struct { + // Static Site ARM resource. + StaticSiteARMResource +} + +// StaticSitesClientUpdateStaticSiteUserResponse contains the response from method StaticSitesClient.UpdateStaticSiteUser. +type StaticSitesClientUpdateStaticSiteUserResponse struct { + // Static Site User ARM resource. + StaticSiteUserARMResource +} + +// StaticSitesClientValidateBackendForBuildResponse contains the response from method StaticSitesClient.BeginValidateBackendForBuild. +type StaticSitesClientValidateBackendForBuildResponse struct { + // placeholder for future response values +} + +// StaticSitesClientValidateBackendResponse contains the response from method StaticSitesClient.BeginValidateBackend. +type StaticSitesClientValidateBackendResponse struct { + // placeholder for future response values +} + +// StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse contains the response from method StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite. +type StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse struct { + // placeholder for future response values +} + +// TopLevelDomainsClientGetResponse contains the response from method TopLevelDomainsClient.Get. +type TopLevelDomainsClientGetResponse struct { + // A top level domain object. + TopLevelDomain +} + +// TopLevelDomainsClientListAgreementsResponse contains the response from method TopLevelDomainsClient.NewListAgreementsPager. +type TopLevelDomainsClientListAgreementsResponse struct { + // Collection of top-level domain legal agreements. + TldLegalAgreementCollection +} + +// TopLevelDomainsClientListResponse contains the response from method TopLevelDomainsClient.NewListPager. +type TopLevelDomainsClientListResponse struct { + // Collection of Top-level domains. + TopLevelDomainCollection +} + +// WebAppsClientAddPremierAddOnResponse contains the response from method WebAppsClient.AddPremierAddOn. +type WebAppsClientAddPremierAddOnResponse struct { + // Premier add-on. + PremierAddOn +} + +// WebAppsClientAddPremierAddOnSlotResponse contains the response from method WebAppsClient.AddPremierAddOnSlot. +type WebAppsClientAddPremierAddOnSlotResponse struct { + // Premier add-on. + PremierAddOn +} + +// WebAppsClientAnalyzeCustomHostnameResponse contains the response from method WebAppsClient.AnalyzeCustomHostname. +type WebAppsClientAnalyzeCustomHostnameResponse struct { + // Custom domain analysis. + CustomHostnameAnalysisResult +} + +// WebAppsClientAnalyzeCustomHostnameSlotResponse contains the response from method WebAppsClient.AnalyzeCustomHostnameSlot. +type WebAppsClientAnalyzeCustomHostnameSlotResponse struct { + // Custom domain analysis. + CustomHostnameAnalysisResult +} + +// WebAppsClientApplySlotConfigToProductionResponse contains the response from method WebAppsClient.ApplySlotConfigToProduction. +type WebAppsClientApplySlotConfigToProductionResponse struct { + // placeholder for future response values +} + +// WebAppsClientApplySlotConfigurationSlotResponse contains the response from method WebAppsClient.ApplySlotConfigurationSlot. +type WebAppsClientApplySlotConfigurationSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse contains the response from method WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection. +type WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. + RemotePrivateEndpointConnectionARMResource +} + +// WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse contains the response from method WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot. +type WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse struct { + // Remote Private Endpoint Connection ARM resource. + RemotePrivateEndpointConnectionARMResource +} + +// WebAppsClientBackupResponse contains the response from method WebAppsClient.Backup. +type WebAppsClientBackupResponse struct { + // Backup description. + BackupItem +} + +// WebAppsClientBackupSlotResponse contains the response from method WebAppsClient.BackupSlot. +type WebAppsClientBackupSlotResponse struct { + // Backup description. + BackupItem +} + +// WebAppsClientCreateDeploymentResponse contains the response from method WebAppsClient.CreateDeployment. +type WebAppsClientCreateDeploymentResponse struct { + // User credentials used for publishing activity. + Deployment +} + +// WebAppsClientCreateDeploymentSlotResponse contains the response from method WebAppsClient.CreateDeploymentSlot. +type WebAppsClientCreateDeploymentSlotResponse struct { + // User credentials used for publishing activity. + Deployment +} + +// WebAppsClientCreateFunctionResponse contains the response from method WebAppsClient.BeginCreateFunction. +type WebAppsClientCreateFunctionResponse struct { + // Function information. + FunctionEnvelope +} + +// WebAppsClientCreateInstanceFunctionSlotResponse contains the response from method WebAppsClient.BeginCreateInstanceFunctionSlot. +type WebAppsClientCreateInstanceFunctionSlotResponse struct { + // Function information. + FunctionEnvelope +} + +// WebAppsClientCreateInstanceMSDeployOperationResponse contains the response from method WebAppsClient.BeginCreateInstanceMSDeployOperation. +type WebAppsClientCreateInstanceMSDeployOperationResponse struct { + // MSDeploy ARM response + MSDeployStatus +} + +// WebAppsClientCreateInstanceMSDeployOperationSlotResponse contains the response from method WebAppsClient.BeginCreateInstanceMSDeployOperationSlot. +type WebAppsClientCreateInstanceMSDeployOperationSlotResponse struct { + // MSDeploy ARM response + MSDeployStatus +} + +// WebAppsClientCreateMSDeployOperationResponse contains the response from method WebAppsClient.BeginCreateMSDeployOperation. +type WebAppsClientCreateMSDeployOperationResponse struct { + // MSDeploy ARM response + MSDeployStatus +} + +// WebAppsClientCreateMSDeployOperationSlotResponse contains the response from method WebAppsClient.BeginCreateMSDeployOperationSlot. +type WebAppsClientCreateMSDeployOperationSlotResponse struct { + // MSDeploy ARM response + MSDeployStatus +} + +// WebAppsClientCreateOneDeployOperationResponse contains the response from method WebAppsClient.CreateOneDeployOperation. +type WebAppsClientCreateOneDeployOperationResponse struct { + // Anything + Interface any +} + +// WebAppsClientCreateOrUpdateConfigurationResponse contains the response from method WebAppsClient.CreateOrUpdateConfiguration. +type WebAppsClientCreateOrUpdateConfigurationResponse struct { + // Web app configuration ARM resource. + SiteConfigResource +} + +// WebAppsClientCreateOrUpdateConfigurationSlotResponse contains the response from method WebAppsClient.CreateOrUpdateConfigurationSlot. +type WebAppsClientCreateOrUpdateConfigurationSlotResponse struct { + // Web app configuration ARM resource. + SiteConfigResource +} + +// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier. +type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse struct { + // A domain specific resource identifier. + Identifier +} + +// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot. +type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse struct { + // A domain specific resource identifier. + Identifier +} + +// WebAppsClientCreateOrUpdateFunctionSecretResponse contains the response from method WebAppsClient.CreateOrUpdateFunctionSecret. +type WebAppsClientCreateOrUpdateFunctionSecretResponse struct { + // Function key info. + KeyInfo +} + +// WebAppsClientCreateOrUpdateFunctionSecretSlotResponse contains the response from method WebAppsClient.CreateOrUpdateFunctionSecretSlot. +type WebAppsClientCreateOrUpdateFunctionSecretSlotResponse struct { + // Function key info. + KeyInfo +} + +// WebAppsClientCreateOrUpdateHostNameBindingResponse contains the response from method WebAppsClient.CreateOrUpdateHostNameBinding. +type WebAppsClientCreateOrUpdateHostNameBindingResponse struct { + // A hostname binding object. + HostNameBinding +} + +// WebAppsClientCreateOrUpdateHostNameBindingSlotResponse contains the response from method WebAppsClient.CreateOrUpdateHostNameBindingSlot. +type WebAppsClientCreateOrUpdateHostNameBindingSlotResponse struct { + // A hostname binding object. + HostNameBinding +} + +// WebAppsClientCreateOrUpdateHostSecretResponse contains the response from method WebAppsClient.CreateOrUpdateHostSecret. +type WebAppsClientCreateOrUpdateHostSecretResponse struct { + // Function key info. + KeyInfo +} + +// WebAppsClientCreateOrUpdateHostSecretSlotResponse contains the response from method WebAppsClient.CreateOrUpdateHostSecretSlot. +type WebAppsClientCreateOrUpdateHostSecretSlotResponse struct { + // Function key info. + KeyInfo +} + +// WebAppsClientCreateOrUpdateHybridConnectionResponse contains the response from method WebAppsClient.CreateOrUpdateHybridConnection. +type WebAppsClientCreateOrUpdateHybridConnectionResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. + HybridConnection +} + +// WebAppsClientCreateOrUpdateHybridConnectionSlotResponse contains the response from method WebAppsClient.CreateOrUpdateHybridConnectionSlot. +type WebAppsClientCreateOrUpdateHybridConnectionSlotResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. + HybridConnection +} + +// WebAppsClientCreateOrUpdatePublicCertificateResponse contains the response from method WebAppsClient.CreateOrUpdatePublicCertificate. +type WebAppsClientCreateOrUpdatePublicCertificateResponse struct { + // Public certificate object + PublicCertificate +} + +// WebAppsClientCreateOrUpdatePublicCertificateSlotResponse contains the response from method WebAppsClient.CreateOrUpdatePublicCertificateSlot. +type WebAppsClientCreateOrUpdatePublicCertificateSlotResponse struct { + // Public certificate object + PublicCertificate +} + +// WebAppsClientCreateOrUpdateRelayServiceConnectionResponse contains the response from method WebAppsClient.CreateOrUpdateRelayServiceConnection. +type WebAppsClientCreateOrUpdateRelayServiceConnectionResponse struct { + // Hybrid Connection for an App Service app. + RelayServiceConnectionEntity +} + +// WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot. +type WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse struct { + // Hybrid Connection for an App Service app. + RelayServiceConnectionEntity +} + +// WebAppsClientCreateOrUpdateResponse contains the response from method WebAppsClient.BeginCreateOrUpdate. +type WebAppsClientCreateOrUpdateResponse struct { + // A web app, a mobile app backend, or an API app. + Site +} + +// WebAppsClientCreateOrUpdateSiteContainerResponse contains the response from method WebAppsClient.CreateOrUpdateSiteContainer. +type WebAppsClientCreateOrUpdateSiteContainerResponse struct { + // Container of a site + SiteContainer +} + +// WebAppsClientCreateOrUpdateSiteContainerSlotResponse contains the response from method WebAppsClient.CreateOrUpdateSiteContainerSlot. +type WebAppsClientCreateOrUpdateSiteContainerSlotResponse struct { + // Container of a site + SiteContainer +} + +// WebAppsClientCreateOrUpdateSlotResponse contains the response from method WebAppsClient.BeginCreateOrUpdateSlot. +type WebAppsClientCreateOrUpdateSlotResponse struct { + // A web app, a mobile app backend, or an API app. + Site +} + +// WebAppsClientCreateOrUpdateSourceControlResponse contains the response from method WebAppsClient.BeginCreateOrUpdateSourceControl. +type WebAppsClientCreateOrUpdateSourceControlResponse struct { + // Source control configuration for an app. + SiteSourceControl +} + +// WebAppsClientCreateOrUpdateSourceControlSlotResponse contains the response from method WebAppsClient.BeginCreateOrUpdateSourceControlSlot. +type WebAppsClientCreateOrUpdateSourceControlSlotResponse struct { + // Source control configuration for an app. + SiteSourceControl +} + +// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse contains the response from method WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck. +type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. + SwiftVirtualNetwork +} + +// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse contains the response from method WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot. +type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. + SwiftVirtualNetwork +} + +// WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnectionGateway. +type WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. + VnetGateway +} + +// WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot. +type WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. + VnetGateway +} + +// WebAppsClientCreateOrUpdateVnetConnectionResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnection. +type WebAppsClientCreateOrUpdateVnetConnectionResponse struct { + // Virtual Network information ARM resource. + VnetInfoResource +} + +// WebAppsClientCreateOrUpdateVnetConnectionSlotResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnectionSlot. +type WebAppsClientCreateOrUpdateVnetConnectionSlotResponse struct { + // Virtual Network information ARM resource. + VnetInfoResource +} + +// WebAppsClientDeleteBackupConfigurationResponse contains the response from method WebAppsClient.DeleteBackupConfiguration. +type WebAppsClientDeleteBackupConfigurationResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteBackupConfigurationSlotResponse contains the response from method WebAppsClient.DeleteBackupConfigurationSlot. +type WebAppsClientDeleteBackupConfigurationSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteBackupResponse contains the response from method WebAppsClient.DeleteBackup. +type WebAppsClientDeleteBackupResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteBackupSlotResponse contains the response from method WebAppsClient.DeleteBackupSlot. +type WebAppsClientDeleteBackupSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteContinuousWebJobResponse contains the response from method WebAppsClient.DeleteContinuousWebJob. +type WebAppsClientDeleteContinuousWebJobResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteContinuousWebJobSlotResponse contains the response from method WebAppsClient.DeleteContinuousWebJobSlot. +type WebAppsClientDeleteContinuousWebJobSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteDeploymentResponse contains the response from method WebAppsClient.DeleteDeployment. +type WebAppsClientDeleteDeploymentResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteDeploymentSlotResponse contains the response from method WebAppsClient.DeleteDeploymentSlot. +type WebAppsClientDeleteDeploymentSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.DeleteDomainOwnershipIdentifier. +type WebAppsClientDeleteDomainOwnershipIdentifierResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.DeleteDomainOwnershipIdentifierSlot. +type WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteFunctionResponse contains the response from method WebAppsClient.DeleteFunction. +type WebAppsClientDeleteFunctionResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteFunctionSecretResponse contains the response from method WebAppsClient.DeleteFunctionSecret. +type WebAppsClientDeleteFunctionSecretResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteFunctionSecretSlotResponse contains the response from method WebAppsClient.DeleteFunctionSecretSlot. +type WebAppsClientDeleteFunctionSecretSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteHostNameBindingResponse contains the response from method WebAppsClient.DeleteHostNameBinding. +type WebAppsClientDeleteHostNameBindingResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteHostNameBindingSlotResponse contains the response from method WebAppsClient.DeleteHostNameBindingSlot. +type WebAppsClientDeleteHostNameBindingSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteHostSecretResponse contains the response from method WebAppsClient.DeleteHostSecret. +type WebAppsClientDeleteHostSecretResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteHostSecretSlotResponse contains the response from method WebAppsClient.DeleteHostSecretSlot. +type WebAppsClientDeleteHostSecretSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteHybridConnectionResponse contains the response from method WebAppsClient.DeleteHybridConnection. +type WebAppsClientDeleteHybridConnectionResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteHybridConnectionSlotResponse contains the response from method WebAppsClient.DeleteHybridConnectionSlot. +type WebAppsClientDeleteHybridConnectionSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteInstanceFunctionSlotResponse contains the response from method WebAppsClient.DeleteInstanceFunctionSlot. +type WebAppsClientDeleteInstanceFunctionSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteInstanceProcessResponse contains the response from method WebAppsClient.DeleteInstanceProcess. +type WebAppsClientDeleteInstanceProcessResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteInstanceProcessSlotResponse contains the response from method WebAppsClient.DeleteInstanceProcessSlot. +type WebAppsClientDeleteInstanceProcessSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeletePremierAddOnResponse contains the response from method WebAppsClient.DeletePremierAddOn. +type WebAppsClientDeletePremierAddOnResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeletePremierAddOnSlotResponse contains the response from method WebAppsClient.DeletePremierAddOnSlot. +type WebAppsClientDeletePremierAddOnSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeletePrivateEndpointConnectionResponse contains the response from method WebAppsClient.BeginDeletePrivateEndpointConnection. +type WebAppsClientDeletePrivateEndpointConnectionResponse struct { + // Anything + Interface any +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientDeletePrivateEndpointConnectionResponse. +func (w *WebAppsClientDeletePrivateEndpointConnectionResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &w.Interface) +} + +// WebAppsClientDeletePrivateEndpointConnectionSlotResponse contains the response from method WebAppsClient.BeginDeletePrivateEndpointConnectionSlot. +type WebAppsClientDeletePrivateEndpointConnectionSlotResponse struct { + // Anything + Interface any +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientDeletePrivateEndpointConnectionSlotResponse. +func (w *WebAppsClientDeletePrivateEndpointConnectionSlotResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &w.Interface) +} + +// WebAppsClientDeleteProcessResponse contains the response from method WebAppsClient.DeleteProcess. +type WebAppsClientDeleteProcessResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteProcessSlotResponse contains the response from method WebAppsClient.DeleteProcessSlot. +type WebAppsClientDeleteProcessSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeletePublicCertificateResponse contains the response from method WebAppsClient.DeletePublicCertificate. +type WebAppsClientDeletePublicCertificateResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeletePublicCertificateSlotResponse contains the response from method WebAppsClient.DeletePublicCertificateSlot. +type WebAppsClientDeletePublicCertificateSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteRelayServiceConnectionResponse contains the response from method WebAppsClient.DeleteRelayServiceConnection. +type WebAppsClientDeleteRelayServiceConnectionResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.DeleteRelayServiceConnectionSlot. +type WebAppsClientDeleteRelayServiceConnectionSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteResponse contains the response from method WebAppsClient.Delete. +type WebAppsClientDeleteResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteSiteContainerResponse contains the response from method WebAppsClient.DeleteSiteContainer. +type WebAppsClientDeleteSiteContainerResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteSiteContainerSlotResponse contains the response from method WebAppsClient.DeleteSiteContainerSlot. +type WebAppsClientDeleteSiteContainerSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteSiteExtensionResponse contains the response from method WebAppsClient.DeleteSiteExtension. +type WebAppsClientDeleteSiteExtensionResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteSiteExtensionSlotResponse contains the response from method WebAppsClient.DeleteSiteExtensionSlot. +type WebAppsClientDeleteSiteExtensionSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteSlotResponse contains the response from method WebAppsClient.DeleteSlot. +type WebAppsClientDeleteSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteSourceControlResponse contains the response from method WebAppsClient.DeleteSourceControl. +type WebAppsClientDeleteSourceControlResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteSourceControlSlotResponse contains the response from method WebAppsClient.DeleteSourceControlSlot. +type WebAppsClientDeleteSourceControlSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteSwiftVirtualNetworkResponse contains the response from method WebAppsClient.DeleteSwiftVirtualNetwork. +type WebAppsClientDeleteSwiftVirtualNetworkResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteSwiftVirtualNetworkSlotResponse contains the response from method WebAppsClient.DeleteSwiftVirtualNetworkSlot. +type WebAppsClientDeleteSwiftVirtualNetworkSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteTriggeredWebJobResponse contains the response from method WebAppsClient.DeleteTriggeredWebJob. +type WebAppsClientDeleteTriggeredWebJobResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteTriggeredWebJobSlotResponse contains the response from method WebAppsClient.DeleteTriggeredWebJobSlot. +type WebAppsClientDeleteTriggeredWebJobSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteVnetConnectionResponse contains the response from method WebAppsClient.DeleteVnetConnection. +type WebAppsClientDeleteVnetConnectionResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeleteVnetConnectionSlotResponse contains the response from method WebAppsClient.DeleteVnetConnectionSlot. +type WebAppsClientDeleteVnetConnectionSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeployWorkflowArtifactsResponse contains the response from method WebAppsClient.DeployWorkflowArtifacts. +type WebAppsClientDeployWorkflowArtifactsResponse struct { + // placeholder for future response values +} + +// WebAppsClientDeployWorkflowArtifactsSlotResponse contains the response from method WebAppsClient.DeployWorkflowArtifactsSlot. +type WebAppsClientDeployWorkflowArtifactsSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientDiscoverBackupResponse contains the response from method WebAppsClient.DiscoverBackup. +type WebAppsClientDiscoverBackupResponse struct { + // Description of a restore request. + RestoreRequest +} + +// WebAppsClientDiscoverBackupSlotResponse contains the response from method WebAppsClient.DiscoverBackupSlot. +type WebAppsClientDiscoverBackupSlotResponse struct { + // Description of a restore request. + RestoreRequest +} + +// WebAppsClientGenerateNewSitePublishingPasswordResponse contains the response from method WebAppsClient.GenerateNewSitePublishingPassword. +type WebAppsClientGenerateNewSitePublishingPasswordResponse struct { + // placeholder for future response values +} + +// WebAppsClientGenerateNewSitePublishingPasswordSlotResponse contains the response from method WebAppsClient.GenerateNewSitePublishingPasswordSlot. +type WebAppsClientGenerateNewSitePublishingPasswordSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientGetAppSettingKeyVaultReferenceResponse contains the response from method WebAppsClient.GetAppSettingKeyVaultReference. +type WebAppsClientGetAppSettingKeyVaultReferenceResponse struct { + // Description of site key vault references. + APIKVReference +} + +// WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse contains the response from method WebAppsClient.GetAppSettingKeyVaultReferenceSlot. +type WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse struct { + // Description of site key vault references. + APIKVReference +} + +// WebAppsClientGetAppSettingsKeyVaultReferencesResponse contains the response from method WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager. +type WebAppsClientGetAppSettingsKeyVaultReferencesResponse struct { + APIKVReferenceCollection +} + +// WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse contains the response from method WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager. +type WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse struct { + APIKVReferenceCollection +} + +// WebAppsClientGetAuthSettingsResponse contains the response from method WebAppsClient.GetAuthSettings. +type WebAppsClientGetAuthSettingsResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization feature. + SiteAuthSettings +} + +// WebAppsClientGetAuthSettingsSlotResponse contains the response from method WebAppsClient.GetAuthSettingsSlot. +type WebAppsClientGetAuthSettingsSlotResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization feature. + SiteAuthSettings +} + +// WebAppsClientGetAuthSettingsV2Response contains the response from method WebAppsClient.GetAuthSettingsV2. +type WebAppsClientGetAuthSettingsV2Response struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. + SiteAuthSettingsV2 +} + +// WebAppsClientGetAuthSettingsV2SlotResponse contains the response from method WebAppsClient.GetAuthSettingsV2Slot. +type WebAppsClientGetAuthSettingsV2SlotResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. + SiteAuthSettingsV2 +} + +// WebAppsClientGetAuthSettingsV2WithoutSecretsResponse contains the response from method WebAppsClient.GetAuthSettingsV2WithoutSecrets. +type WebAppsClientGetAuthSettingsV2WithoutSecretsResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. + SiteAuthSettingsV2 +} + +// WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse contains the response from method WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot. +type WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. + SiteAuthSettingsV2 +} + +// WebAppsClientGetBackupConfigurationResponse contains the response from method WebAppsClient.GetBackupConfiguration. +type WebAppsClientGetBackupConfigurationResponse struct { + // Description of a backup which will be performed. + BackupRequest +} + +// WebAppsClientGetBackupConfigurationSlotResponse contains the response from method WebAppsClient.GetBackupConfigurationSlot. +type WebAppsClientGetBackupConfigurationSlotResponse struct { + // Description of a backup which will be performed. + BackupRequest +} + +// WebAppsClientGetBackupStatusResponse contains the response from method WebAppsClient.GetBackupStatus. +type WebAppsClientGetBackupStatusResponse struct { + // Backup description. + BackupItem +} + +// WebAppsClientGetBackupStatusSlotResponse contains the response from method WebAppsClient.GetBackupStatusSlot. +type WebAppsClientGetBackupStatusSlotResponse struct { + // Backup description. + BackupItem +} + +// WebAppsClientGetConfigurationResponse contains the response from method WebAppsClient.GetConfiguration. +type WebAppsClientGetConfigurationResponse struct { + // Web app configuration ARM resource. + SiteConfigResource +} + +// WebAppsClientGetConfigurationSlotResponse contains the response from method WebAppsClient.GetConfigurationSlot. +type WebAppsClientGetConfigurationSlotResponse struct { + // Web app configuration ARM resource. + SiteConfigResource +} + +// WebAppsClientGetConfigurationSnapshotResponse contains the response from method WebAppsClient.GetConfigurationSnapshot. +type WebAppsClientGetConfigurationSnapshotResponse struct { + // Web app configuration ARM resource. + SiteConfigResource +} + +// WebAppsClientGetConfigurationSnapshotSlotResponse contains the response from method WebAppsClient.GetConfigurationSnapshotSlot. +type WebAppsClientGetConfigurationSnapshotSlotResponse struct { + // Web app configuration ARM resource. + SiteConfigResource +} + +// WebAppsClientGetContainerLogsZipResponse contains the response from method WebAppsClient.GetContainerLogsZip. +type WebAppsClientGetContainerLogsZipResponse struct { + // Body contains the streaming response. + Body io.ReadCloser +} + +// WebAppsClientGetContainerLogsZipSlotResponse contains the response from method WebAppsClient.GetContainerLogsZipSlot. +type WebAppsClientGetContainerLogsZipSlotResponse struct { + // Body contains the streaming response. + Body io.ReadCloser +} + +// WebAppsClientGetContinuousWebJobResponse contains the response from method WebAppsClient.GetContinuousWebJob. +type WebAppsClientGetContinuousWebJobResponse struct { + // Continuous Web Job Information. + ContinuousWebJob +} + +// WebAppsClientGetContinuousWebJobSlotResponse contains the response from method WebAppsClient.GetContinuousWebJobSlot. +type WebAppsClientGetContinuousWebJobSlotResponse struct { + // Continuous Web Job Information. + ContinuousWebJob +} + +// WebAppsClientGetDeploymentResponse contains the response from method WebAppsClient.GetDeployment. +type WebAppsClientGetDeploymentResponse struct { + // User credentials used for publishing activity. + Deployment +} + +// WebAppsClientGetDeploymentSlotResponse contains the response from method WebAppsClient.GetDeploymentSlot. +type WebAppsClientGetDeploymentSlotResponse struct { + // User credentials used for publishing activity. + Deployment +} + +// WebAppsClientGetDiagnosticLogsConfigurationResponse contains the response from method WebAppsClient.GetDiagnosticLogsConfiguration. +type WebAppsClientGetDiagnosticLogsConfigurationResponse struct { + // Configuration of App Service site logs. + SiteLogsConfig +} + +// WebAppsClientGetDiagnosticLogsConfigurationSlotResponse contains the response from method WebAppsClient.GetDiagnosticLogsConfigurationSlot. +type WebAppsClientGetDiagnosticLogsConfigurationSlotResponse struct { + // Configuration of App Service site logs. + SiteLogsConfig +} + +// WebAppsClientGetDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.GetDomainOwnershipIdentifier. +type WebAppsClientGetDomainOwnershipIdentifierResponse struct { + // A domain specific resource identifier. + Identifier +} + +// WebAppsClientGetDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.GetDomainOwnershipIdentifierSlot. +type WebAppsClientGetDomainOwnershipIdentifierSlotResponse struct { + // A domain specific resource identifier. + Identifier +} + +// WebAppsClientGetFtpAllowedResponse contains the response from method WebAppsClient.GetFtpAllowed. +type WebAppsClientGetFtpAllowedResponse struct { + // Publishing Credentials Policies parameters. + CsmPublishingCredentialsPoliciesEntity +} + +// WebAppsClientGetFtpAllowedSlotResponse contains the response from method WebAppsClient.GetFtpAllowedSlot. +type WebAppsClientGetFtpAllowedSlotResponse struct { + // Publishing Credentials Policies parameters. + CsmPublishingCredentialsPoliciesEntity +} + +// WebAppsClientGetFunctionResponse contains the response from method WebAppsClient.GetFunction. +type WebAppsClientGetFunctionResponse struct { + // Function information. + FunctionEnvelope +} + +// WebAppsClientGetFunctionsAdminTokenResponse contains the response from method WebAppsClient.GetFunctionsAdminToken. +type WebAppsClientGetFunctionsAdminTokenResponse struct { + Value *string +} + +// WebAppsClientGetFunctionsAdminTokenSlotResponse contains the response from method WebAppsClient.GetFunctionsAdminTokenSlot. +type WebAppsClientGetFunctionsAdminTokenSlotResponse struct { + Value *string +} + +// WebAppsClientGetHostNameBindingResponse contains the response from method WebAppsClient.GetHostNameBinding. +type WebAppsClientGetHostNameBindingResponse struct { + // A hostname binding object. + HostNameBinding +} + +// WebAppsClientGetHostNameBindingSlotResponse contains the response from method WebAppsClient.GetHostNameBindingSlot. +type WebAppsClientGetHostNameBindingSlotResponse struct { + // A hostname binding object. + HostNameBinding +} + +// WebAppsClientGetHybridConnectionResponse contains the response from method WebAppsClient.GetHybridConnection. +type WebAppsClientGetHybridConnectionResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. + HybridConnection +} + +// WebAppsClientGetHybridConnectionSlotResponse contains the response from method WebAppsClient.GetHybridConnectionSlot. +type WebAppsClientGetHybridConnectionSlotResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. + HybridConnection +} + +// WebAppsClientGetInstanceFunctionSlotResponse contains the response from method WebAppsClient.GetInstanceFunctionSlot. +type WebAppsClientGetInstanceFunctionSlotResponse struct { + // Function information. + FunctionEnvelope +} + +// WebAppsClientGetInstanceInfoResponse contains the response from method WebAppsClient.GetInstanceInfo. +type WebAppsClientGetInstanceInfoResponse struct { + WebSiteInstanceStatus +} + +// WebAppsClientGetInstanceInfoSlotResponse contains the response from method WebAppsClient.GetInstanceInfoSlot. +type WebAppsClientGetInstanceInfoSlotResponse struct { + WebSiteInstanceStatus +} + +// WebAppsClientGetInstanceMSDeployLogResponse contains the response from method WebAppsClient.GetInstanceMSDeployLog. +type WebAppsClientGetInstanceMSDeployLogResponse struct { + // MSDeploy log + MSDeployLog +} + +// WebAppsClientGetInstanceMSDeployLogSlotResponse contains the response from method WebAppsClient.GetInstanceMSDeployLogSlot. +type WebAppsClientGetInstanceMSDeployLogSlotResponse struct { + // MSDeploy log + MSDeployLog +} + +// WebAppsClientGetInstanceMsDeployStatusResponse contains the response from method WebAppsClient.GetInstanceMsDeployStatus. +type WebAppsClientGetInstanceMsDeployStatusResponse struct { + // MSDeploy ARM response + MSDeployStatus +} + +// WebAppsClientGetInstanceMsDeployStatusSlotResponse contains the response from method WebAppsClient.GetInstanceMsDeployStatusSlot. +type WebAppsClientGetInstanceMsDeployStatusSlotResponse struct { + // MSDeploy ARM response + MSDeployStatus +} + +// WebAppsClientGetInstanceProcessDumpResponse contains the response from method WebAppsClient.GetInstanceProcessDump. +type WebAppsClientGetInstanceProcessDumpResponse struct { + // Body contains the streaming response. + Body io.ReadCloser +} + +// WebAppsClientGetInstanceProcessDumpSlotResponse contains the response from method WebAppsClient.GetInstanceProcessDumpSlot. +type WebAppsClientGetInstanceProcessDumpSlotResponse struct { + // Body contains the streaming response. + Body io.ReadCloser +} + +// WebAppsClientGetInstanceProcessModuleResponse contains the response from method WebAppsClient.GetInstanceProcessModule. +type WebAppsClientGetInstanceProcessModuleResponse struct { + // Process Module Information. + ProcessModuleInfo +} + +// WebAppsClientGetInstanceProcessModuleSlotResponse contains the response from method WebAppsClient.GetInstanceProcessModuleSlot. +type WebAppsClientGetInstanceProcessModuleSlotResponse struct { + // Process Module Information. + ProcessModuleInfo +} + +// WebAppsClientGetInstanceProcessResponse contains the response from method WebAppsClient.GetInstanceProcess. +type WebAppsClientGetInstanceProcessResponse struct { + // Process Information. + ProcessInfo +} + +// WebAppsClientGetInstanceProcessSlotResponse contains the response from method WebAppsClient.GetInstanceProcessSlot. +type WebAppsClientGetInstanceProcessSlotResponse struct { + // Process Information. + ProcessInfo +} + +// WebAppsClientGetInstanceWorkflowSlotResponse contains the response from method WebAppsClient.GetInstanceWorkflowSlot. +type WebAppsClientGetInstanceWorkflowSlotResponse struct { + // Workflow properties definition. + WorkflowEnvelope +} + +// WebAppsClientGetMSDeployLogResponse contains the response from method WebAppsClient.GetMSDeployLog. +type WebAppsClientGetMSDeployLogResponse struct { + // MSDeploy log + MSDeployLog +} + +// WebAppsClientGetMSDeployLogSlotResponse contains the response from method WebAppsClient.GetMSDeployLogSlot. +type WebAppsClientGetMSDeployLogSlotResponse struct { + // MSDeploy log + MSDeployLog +} + +// WebAppsClientGetMSDeployStatusResponse contains the response from method WebAppsClient.GetMSDeployStatus. +type WebAppsClientGetMSDeployStatusResponse struct { + // MSDeploy ARM response + MSDeployStatus +} + +// WebAppsClientGetMSDeployStatusSlotResponse contains the response from method WebAppsClient.GetMSDeployStatusSlot. +type WebAppsClientGetMSDeployStatusSlotResponse struct { + // MSDeploy ARM response + MSDeployStatus +} + +// WebAppsClientGetMigrateMySQLStatusResponse contains the response from method WebAppsClient.GetMigrateMySQLStatus. +type WebAppsClientGetMigrateMySQLStatusResponse struct { + // MySQL migration status. + MigrateMySQLStatus +} + +// WebAppsClientGetMigrateMySQLStatusSlotResponse contains the response from method WebAppsClient.GetMigrateMySQLStatusSlot. +type WebAppsClientGetMigrateMySQLStatusSlotResponse struct { + // MySQL migration status. + MigrateMySQLStatus +} + +// WebAppsClientGetNetworkTraceOperationResponse contains the response from method WebAppsClient.GetNetworkTraceOperation. +type WebAppsClientGetNetworkTraceOperationResponse struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// WebAppsClientGetNetworkTraceOperationSlotResponse contains the response from method WebAppsClient.GetNetworkTraceOperationSlot. +type WebAppsClientGetNetworkTraceOperationSlotResponse struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// WebAppsClientGetNetworkTraceOperationSlotV2Response contains the response from method WebAppsClient.GetNetworkTraceOperationSlotV2. +type WebAppsClientGetNetworkTraceOperationSlotV2Response struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// WebAppsClientGetNetworkTraceOperationV2Response contains the response from method WebAppsClient.GetNetworkTraceOperationV2. +type WebAppsClientGetNetworkTraceOperationV2Response struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// WebAppsClientGetNetworkTracesResponse contains the response from method WebAppsClient.GetNetworkTraces. +type WebAppsClientGetNetworkTracesResponse struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// WebAppsClientGetNetworkTracesSlotResponse contains the response from method WebAppsClient.GetNetworkTracesSlot. +type WebAppsClientGetNetworkTracesSlotResponse struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// WebAppsClientGetNetworkTracesSlotV2Response contains the response from method WebAppsClient.GetNetworkTracesSlotV2. +type WebAppsClientGetNetworkTracesSlotV2Response struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// WebAppsClientGetNetworkTracesV2Response contains the response from method WebAppsClient.GetNetworkTracesV2. +type WebAppsClientGetNetworkTracesV2Response struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// WebAppsClientGetOneDeployStatusResponse contains the response from method WebAppsClient.GetOneDeployStatus. +type WebAppsClientGetOneDeployStatusResponse struct { + // Anything + Interface any +} + +// WebAppsClientGetPremierAddOnResponse contains the response from method WebAppsClient.GetPremierAddOn. +type WebAppsClientGetPremierAddOnResponse struct { + // Premier add-on. + PremierAddOn +} + +// WebAppsClientGetPremierAddOnSlotResponse contains the response from method WebAppsClient.GetPremierAddOnSlot. +type WebAppsClientGetPremierAddOnSlotResponse struct { + // Premier add-on. + PremierAddOn +} + +// WebAppsClientGetPrivateAccessResponse contains the response from method WebAppsClient.GetPrivateAccess. +type WebAppsClientGetPrivateAccessResponse struct { + // Description of the parameters of Private Access for a Web Site. + PrivateAccess +} + +// WebAppsClientGetPrivateAccessSlotResponse contains the response from method WebAppsClient.GetPrivateAccessSlot. +type WebAppsClientGetPrivateAccessSlotResponse struct { + // Description of the parameters of Private Access for a Web Site. + PrivateAccess +} + +// WebAppsClientGetPrivateEndpointConnectionListResponse contains the response from method WebAppsClient.NewGetPrivateEndpointConnectionListPager. +type WebAppsClientGetPrivateEndpointConnectionListResponse struct { + PrivateEndpointConnectionCollection +} + +// WebAppsClientGetPrivateEndpointConnectionListSlotResponse contains the response from method WebAppsClient.NewGetPrivateEndpointConnectionListSlotPager. +type WebAppsClientGetPrivateEndpointConnectionListSlotResponse struct { + PrivateEndpointConnectionCollection +} + +// WebAppsClientGetPrivateEndpointConnectionResponse contains the response from method WebAppsClient.GetPrivateEndpointConnection. +type WebAppsClientGetPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. + RemotePrivateEndpointConnectionARMResource +} + +// WebAppsClientGetPrivateEndpointConnectionSlotResponse contains the response from method WebAppsClient.GetPrivateEndpointConnectionSlot. +type WebAppsClientGetPrivateEndpointConnectionSlotResponse struct { + // Remote Private Endpoint Connection ARM resource. + RemotePrivateEndpointConnectionARMResource +} + +// WebAppsClientGetPrivateLinkResourcesResponse contains the response from method WebAppsClient.GetPrivateLinkResources. +type WebAppsClientGetPrivateLinkResourcesResponse struct { + // Wrapper for a collection of private link resources + PrivateLinkResourcesWrapper +} + +// WebAppsClientGetPrivateLinkResourcesSlotResponse contains the response from method WebAppsClient.GetPrivateLinkResourcesSlot. +type WebAppsClientGetPrivateLinkResourcesSlotResponse struct { + // Wrapper for a collection of private link resources + PrivateLinkResourcesWrapper +} + +// WebAppsClientGetProcessDumpResponse contains the response from method WebAppsClient.GetProcessDump. +type WebAppsClientGetProcessDumpResponse struct { + // Body contains the streaming response. + Body io.ReadCloser +} + +// WebAppsClientGetProcessDumpSlotResponse contains the response from method WebAppsClient.GetProcessDumpSlot. +type WebAppsClientGetProcessDumpSlotResponse struct { + // Body contains the streaming response. + Body io.ReadCloser +} + +// WebAppsClientGetProcessModuleResponse contains the response from method WebAppsClient.GetProcessModule. +type WebAppsClientGetProcessModuleResponse struct { + // Process Module Information. + ProcessModuleInfo +} + +// WebAppsClientGetProcessModuleSlotResponse contains the response from method WebAppsClient.GetProcessModuleSlot. +type WebAppsClientGetProcessModuleSlotResponse struct { + // Process Module Information. + ProcessModuleInfo +} + +// WebAppsClientGetProcessResponse contains the response from method WebAppsClient.GetProcess. +type WebAppsClientGetProcessResponse struct { + // Process Information. + ProcessInfo +} + +// WebAppsClientGetProcessSlotResponse contains the response from method WebAppsClient.GetProcessSlot. +type WebAppsClientGetProcessSlotResponse struct { + // Process Information. + ProcessInfo +} + +// WebAppsClientGetProductionSiteDeploymentStatusResponse contains the response from method WebAppsClient.BeginGetProductionSiteDeploymentStatus. +type WebAppsClientGetProductionSiteDeploymentStatusResponse struct { + // Deployment status response payload. + CsmDeploymentStatus +} + +// WebAppsClientGetPublicCertificateResponse contains the response from method WebAppsClient.GetPublicCertificate. +type WebAppsClientGetPublicCertificateResponse struct { + // Public certificate object + PublicCertificate +} + +// WebAppsClientGetPublicCertificateSlotResponse contains the response from method WebAppsClient.GetPublicCertificateSlot. +type WebAppsClientGetPublicCertificateSlotResponse struct { + // Public certificate object + PublicCertificate +} + +// WebAppsClientGetRelayServiceConnectionResponse contains the response from method WebAppsClient.GetRelayServiceConnection. +type WebAppsClientGetRelayServiceConnectionResponse struct { + // Hybrid Connection for an App Service app. + RelayServiceConnectionEntity +} + +// WebAppsClientGetRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.GetRelayServiceConnectionSlot. +type WebAppsClientGetRelayServiceConnectionSlotResponse struct { + // Hybrid Connection for an App Service app. + RelayServiceConnectionEntity +} + +// WebAppsClientGetResponse contains the response from method WebAppsClient.Get. +type WebAppsClientGetResponse struct { + // A web app, a mobile app backend, or an API app. + Site +} + +// WebAppsClientGetScmAllowedResponse contains the response from method WebAppsClient.GetScmAllowed. +type WebAppsClientGetScmAllowedResponse struct { + // Publishing Credentials Policies parameters. + CsmPublishingCredentialsPoliciesEntity +} + +// WebAppsClientGetScmAllowedSlotResponse contains the response from method WebAppsClient.GetScmAllowedSlot. +type WebAppsClientGetScmAllowedSlotResponse struct { + // Publishing Credentials Policies parameters. + CsmPublishingCredentialsPoliciesEntity +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse contains the response from method WebAppsClient.GetSiteConnectionStringKeyVaultReference. +type WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse struct { + // Description of site key vault references. + APIKVReference +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse contains the response from method WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot. +type WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse struct { + // Description of site key vault references. + APIKVReference +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse contains the response from method WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager. +type WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse struct { + APIKVReferenceCollection +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse contains the response from method WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager. +type WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse struct { + APIKVReferenceCollection +} + +// WebAppsClientGetSiteContainerResponse contains the response from method WebAppsClient.GetSiteContainer. +type WebAppsClientGetSiteContainerResponse struct { + // Container of a site + SiteContainer +} + +// WebAppsClientGetSiteContainerSlotResponse contains the response from method WebAppsClient.GetSiteContainerSlot. +type WebAppsClientGetSiteContainerSlotResponse struct { + // Container of a site + SiteContainer +} + +// WebAppsClientGetSiteExtensionResponse contains the response from method WebAppsClient.GetSiteExtension. +type WebAppsClientGetSiteExtensionResponse struct { + // Site Extension Information. + SiteExtensionInfo +} + +// WebAppsClientGetSiteExtensionSlotResponse contains the response from method WebAppsClient.GetSiteExtensionSlot. +type WebAppsClientGetSiteExtensionSlotResponse struct { + // Site Extension Information. + SiteExtensionInfo +} + +// WebAppsClientGetSitePhpErrorLogFlagResponse contains the response from method WebAppsClient.GetSitePhpErrorLogFlag. +type WebAppsClientGetSitePhpErrorLogFlagResponse struct { + // Used for getting PHP error logging flag. + SitePhpErrorLogFlag +} + +// WebAppsClientGetSitePhpErrorLogFlagSlotResponse contains the response from method WebAppsClient.GetSitePhpErrorLogFlagSlot. +type WebAppsClientGetSitePhpErrorLogFlagSlotResponse struct { + // Used for getting PHP error logging flag. + SitePhpErrorLogFlag +} + +// WebAppsClientGetSlotResponse contains the response from method WebAppsClient.GetSlot. +type WebAppsClientGetSlotResponse struct { + // A web app, a mobile app backend, or an API app. + Site +} + +// WebAppsClientGetSlotSiteDeploymentStatusSlotResponse contains the response from method WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot. +type WebAppsClientGetSlotSiteDeploymentStatusSlotResponse struct { + // Deployment status response payload. + CsmDeploymentStatus +} + +// WebAppsClientGetSourceControlResponse contains the response from method WebAppsClient.GetSourceControl. +type WebAppsClientGetSourceControlResponse struct { + // Source control configuration for an app. + SiteSourceControl +} + +// WebAppsClientGetSourceControlSlotResponse contains the response from method WebAppsClient.GetSourceControlSlot. +type WebAppsClientGetSourceControlSlotResponse struct { + // Source control configuration for an app. + SiteSourceControl +} + +// WebAppsClientGetSwiftVirtualNetworkConnectionResponse contains the response from method WebAppsClient.GetSwiftVirtualNetworkConnection. +type WebAppsClientGetSwiftVirtualNetworkConnectionResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. + SwiftVirtualNetwork +} + +// WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse contains the response from method WebAppsClient.GetSwiftVirtualNetworkConnectionSlot. +type WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. + SwiftVirtualNetwork +} + +// WebAppsClientGetTriggeredWebJobHistoryResponse contains the response from method WebAppsClient.GetTriggeredWebJobHistory. +type WebAppsClientGetTriggeredWebJobHistoryResponse struct { + // Triggered Web Job History. List of Triggered Web Job Run Information elements. + TriggeredJobHistory +} + +// WebAppsClientGetTriggeredWebJobHistorySlotResponse contains the response from method WebAppsClient.GetTriggeredWebJobHistorySlot. +type WebAppsClientGetTriggeredWebJobHistorySlotResponse struct { + // Triggered Web Job History. List of Triggered Web Job Run Information elements. + TriggeredJobHistory +} + +// WebAppsClientGetTriggeredWebJobResponse contains the response from method WebAppsClient.GetTriggeredWebJob. +type WebAppsClientGetTriggeredWebJobResponse struct { + // Triggered Web Job Information. + TriggeredWebJob +} + +// WebAppsClientGetTriggeredWebJobSlotResponse contains the response from method WebAppsClient.GetTriggeredWebJobSlot. +type WebAppsClientGetTriggeredWebJobSlotResponse struct { + // Triggered Web Job Information. + TriggeredWebJob +} + +// WebAppsClientGetVnetConnectionGatewayResponse contains the response from method WebAppsClient.GetVnetConnectionGateway. +type WebAppsClientGetVnetConnectionGatewayResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. + VnetGateway +} + +// WebAppsClientGetVnetConnectionGatewaySlotResponse contains the response from method WebAppsClient.GetVnetConnectionGatewaySlot. +type WebAppsClientGetVnetConnectionGatewaySlotResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. + VnetGateway +} + +// WebAppsClientGetVnetConnectionResponse contains the response from method WebAppsClient.GetVnetConnection. +type WebAppsClientGetVnetConnectionResponse struct { + // Virtual Network information ARM resource. + VnetInfoResource +} + +// WebAppsClientGetVnetConnectionSlotResponse contains the response from method WebAppsClient.GetVnetConnectionSlot. +type WebAppsClientGetVnetConnectionSlotResponse struct { + // Virtual Network information ARM resource. + VnetInfoResource +} + +// WebAppsClientGetWebJobResponse contains the response from method WebAppsClient.GetWebJob. +type WebAppsClientGetWebJobResponse struct { + // Web Job Information. + WebJob +} + +// WebAppsClientGetWebJobSlotResponse contains the response from method WebAppsClient.GetWebJobSlot. +type WebAppsClientGetWebJobSlotResponse struct { + // Web Job Information. + WebJob +} + +// WebAppsClientGetWebSiteContainerLogsResponse contains the response from method WebAppsClient.GetWebSiteContainerLogs. +type WebAppsClientGetWebSiteContainerLogsResponse struct { + // Body contains the streaming response. + Body io.ReadCloser +} + +// WebAppsClientGetWebSiteContainerLogsSlotResponse contains the response from method WebAppsClient.GetWebSiteContainerLogsSlot. +type WebAppsClientGetWebSiteContainerLogsSlotResponse struct { + // Body contains the streaming response. + Body io.ReadCloser +} + +// WebAppsClientGetWorkflowResponse contains the response from method WebAppsClient.GetWorkflow. +type WebAppsClientGetWorkflowResponse struct { + // Workflow properties definition. + WorkflowEnvelope +} + +// WebAppsClientInstallSiteExtensionResponse contains the response from method WebAppsClient.BeginInstallSiteExtension. +type WebAppsClientInstallSiteExtensionResponse struct { + // Site Extension Information. + SiteExtensionInfo +} + +// WebAppsClientInstallSiteExtensionSlotResponse contains the response from method WebAppsClient.BeginInstallSiteExtensionSlot. +type WebAppsClientInstallSiteExtensionSlotResponse struct { + // Site Extension Information. + SiteExtensionInfo +} + +// WebAppsClientIsCloneableResponse contains the response from method WebAppsClient.IsCloneable. +type WebAppsClientIsCloneableResponse struct { + // Represents whether or not an app is cloneable. + SiteCloneability +} + +// WebAppsClientIsCloneableSlotResponse contains the response from method WebAppsClient.IsCloneableSlot. +type WebAppsClientIsCloneableSlotResponse struct { + // Represents whether or not an app is cloneable. + SiteCloneability +} + +// WebAppsClientListApplicationSettingsResponse contains the response from method WebAppsClient.ListApplicationSettings. +type WebAppsClientListApplicationSettingsResponse struct { + // String dictionary resource. + StringDictionary +} + +// WebAppsClientListApplicationSettingsSlotResponse contains the response from method WebAppsClient.ListApplicationSettingsSlot. +type WebAppsClientListApplicationSettingsSlotResponse struct { + // String dictionary resource. + StringDictionary +} + +// WebAppsClientListAzureStorageAccountsResponse contains the response from method WebAppsClient.ListAzureStorageAccounts. +type WebAppsClientListAzureStorageAccountsResponse struct { + // AzureStorageInfo dictionary resource. + AzureStoragePropertyDictionaryResource +} + +// WebAppsClientListAzureStorageAccountsSlotResponse contains the response from method WebAppsClient.ListAzureStorageAccountsSlot. +type WebAppsClientListAzureStorageAccountsSlotResponse struct { + // AzureStorageInfo dictionary resource. + AzureStoragePropertyDictionaryResource +} + +// WebAppsClientListBackupStatusSecretsResponse contains the response from method WebAppsClient.ListBackupStatusSecrets. +type WebAppsClientListBackupStatusSecretsResponse struct { + // Backup description. + BackupItem +} + +// WebAppsClientListBackupStatusSecretsSlotResponse contains the response from method WebAppsClient.ListBackupStatusSecretsSlot. +type WebAppsClientListBackupStatusSecretsSlotResponse struct { + // Backup description. + BackupItem +} + +// WebAppsClientListBackupsResponse contains the response from method WebAppsClient.NewListBackupsPager. +type WebAppsClientListBackupsResponse struct { + // Collection of backup items. + BackupItemCollection +} + +// WebAppsClientListBackupsSlotResponse contains the response from method WebAppsClient.NewListBackupsSlotPager. +type WebAppsClientListBackupsSlotResponse struct { + // Collection of backup items. + BackupItemCollection +} + +// WebAppsClientListBasicPublishingCredentialsPoliciesResponse contains the response from method WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager. +type WebAppsClientListBasicPublishingCredentialsPoliciesResponse struct { + // Publishing Credentials Policies entity collection ARM resource. + PublishingCredentialsPoliciesCollection +} + +// WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse contains the response from method WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager. +type WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse struct { + // Publishing Credentials Policies entity collection ARM resource. + PublishingCredentialsPoliciesCollection +} + +// WebAppsClientListByResourceGroupResponse contains the response from method WebAppsClient.NewListByResourceGroupPager. +type WebAppsClientListByResourceGroupResponse struct { + // Collection of App Service apps. + WebAppCollection +} + +// WebAppsClientListConfigurationSnapshotInfoResponse contains the response from method WebAppsClient.NewListConfigurationSnapshotInfoPager. +type WebAppsClientListConfigurationSnapshotInfoResponse struct { + // Collection of metadata for the app configuration snapshots that can be restored. + SiteConfigurationSnapshotInfoCollection +} + +// WebAppsClientListConfigurationSnapshotInfoSlotResponse contains the response from method WebAppsClient.NewListConfigurationSnapshotInfoSlotPager. +type WebAppsClientListConfigurationSnapshotInfoSlotResponse struct { + // Collection of metadata for the app configuration snapshots that can be restored. + SiteConfigurationSnapshotInfoCollection +} + +// WebAppsClientListConfigurationsResponse contains the response from method WebAppsClient.NewListConfigurationsPager. +type WebAppsClientListConfigurationsResponse struct { + // Collection of site configurations. + SiteConfigResourceCollection +} + +// WebAppsClientListConfigurationsSlotResponse contains the response from method WebAppsClient.NewListConfigurationsSlotPager. +type WebAppsClientListConfigurationsSlotResponse struct { + // Collection of site configurations. + SiteConfigResourceCollection +} + +// WebAppsClientListConnectionStringsResponse contains the response from method WebAppsClient.ListConnectionStrings. +type WebAppsClientListConnectionStringsResponse struct { + // String dictionary resource. + ConnectionStringDictionary +} + +// WebAppsClientListConnectionStringsSlotResponse contains the response from method WebAppsClient.ListConnectionStringsSlot. +type WebAppsClientListConnectionStringsSlotResponse struct { + // String dictionary resource. + ConnectionStringDictionary +} + +// WebAppsClientListContinuousWebJobsResponse contains the response from method WebAppsClient.NewListContinuousWebJobsPager. +type WebAppsClientListContinuousWebJobsResponse struct { + // Collection of Kudu continuous web job information elements. + ContinuousWebJobCollection +} + +// WebAppsClientListContinuousWebJobsSlotResponse contains the response from method WebAppsClient.NewListContinuousWebJobsSlotPager. +type WebAppsClientListContinuousWebJobsSlotResponse struct { + // Collection of Kudu continuous web job information elements. + ContinuousWebJobCollection +} + +// WebAppsClientListDeploymentLogResponse contains the response from method WebAppsClient.ListDeploymentLog. +type WebAppsClientListDeploymentLogResponse struct { + // User credentials used for publishing activity. + Deployment +} + +// WebAppsClientListDeploymentLogSlotResponse contains the response from method WebAppsClient.ListDeploymentLogSlot. +type WebAppsClientListDeploymentLogSlotResponse struct { + // User credentials used for publishing activity. + Deployment +} + +// WebAppsClientListDeploymentsResponse contains the response from method WebAppsClient.NewListDeploymentsPager. +type WebAppsClientListDeploymentsResponse struct { + // Collection of app deployments. + DeploymentCollection +} + +// WebAppsClientListDeploymentsSlotResponse contains the response from method WebAppsClient.NewListDeploymentsSlotPager. +type WebAppsClientListDeploymentsSlotResponse struct { + // Collection of app deployments. + DeploymentCollection +} + +// WebAppsClientListDomainOwnershipIdentifiersResponse contains the response from method WebAppsClient.NewListDomainOwnershipIdentifiersPager. +type WebAppsClientListDomainOwnershipIdentifiersResponse struct { + // Collection of identifiers. + IdentifierCollection +} + +// WebAppsClientListDomainOwnershipIdentifiersSlotResponse contains the response from method WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager. +type WebAppsClientListDomainOwnershipIdentifiersSlotResponse struct { + // Collection of identifiers. + IdentifierCollection +} + +// WebAppsClientListFunctionKeysResponse contains the response from method WebAppsClient.ListFunctionKeys. +type WebAppsClientListFunctionKeysResponse struct { + // String dictionary resource. + StringDictionary +} + +// WebAppsClientListFunctionKeysSlotResponse contains the response from method WebAppsClient.ListFunctionKeysSlot. +type WebAppsClientListFunctionKeysSlotResponse struct { + // String dictionary resource. + StringDictionary +} + +// WebAppsClientListFunctionSecretsResponse contains the response from method WebAppsClient.ListFunctionSecrets. +type WebAppsClientListFunctionSecretsResponse struct { + // Function secrets. + FunctionSecrets +} + +// WebAppsClientListFunctionSecretsSlotResponse contains the response from method WebAppsClient.ListFunctionSecretsSlot. +type WebAppsClientListFunctionSecretsSlotResponse struct { + // Function secrets. + FunctionSecrets +} + +// WebAppsClientListFunctionsResponse contains the response from method WebAppsClient.NewListFunctionsPager. +type WebAppsClientListFunctionsResponse struct { + // Collection of Kudu function information elements. + FunctionEnvelopeCollection +} + +// WebAppsClientListHostKeysResponse contains the response from method WebAppsClient.ListHostKeys. +type WebAppsClientListHostKeysResponse struct { + // Functions host level keys. + HostKeys +} + +// WebAppsClientListHostKeysSlotResponse contains the response from method WebAppsClient.ListHostKeysSlot. +type WebAppsClientListHostKeysSlotResponse struct { + // Functions host level keys. + HostKeys +} + +// WebAppsClientListHostNameBindingsResponse contains the response from method WebAppsClient.NewListHostNameBindingsPager. +type WebAppsClientListHostNameBindingsResponse struct { + // Collection of hostname bindings. + HostNameBindingCollection +} + +// WebAppsClientListHostNameBindingsSlotResponse contains the response from method WebAppsClient.NewListHostNameBindingsSlotPager. +type WebAppsClientListHostNameBindingsSlotResponse struct { + // Collection of hostname bindings. + HostNameBindingCollection +} + +// WebAppsClientListHybridConnectionsResponse contains the response from method WebAppsClient.ListHybridConnections. +type WebAppsClientListHybridConnectionsResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. + HybridConnection +} + +// WebAppsClientListHybridConnectionsSlotResponse contains the response from method WebAppsClient.ListHybridConnectionsSlot. +type WebAppsClientListHybridConnectionsSlotResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. + HybridConnection +} + +// WebAppsClientListInstanceFunctionsSlotResponse contains the response from method WebAppsClient.NewListInstanceFunctionsSlotPager. +type WebAppsClientListInstanceFunctionsSlotResponse struct { + // Collection of Kudu function information elements. + FunctionEnvelopeCollection +} + +// WebAppsClientListInstanceIdentifiersResponse contains the response from method WebAppsClient.NewListInstanceIdentifiersPager. +type WebAppsClientListInstanceIdentifiersResponse struct { + // Collection of app instances. + WebAppInstanceStatusCollection +} + +// WebAppsClientListInstanceIdentifiersSlotResponse contains the response from method WebAppsClient.NewListInstanceIdentifiersSlotPager. +type WebAppsClientListInstanceIdentifiersSlotResponse struct { + // Collection of app instances. + WebAppInstanceStatusCollection +} + +// WebAppsClientListInstanceProcessModulesResponse contains the response from method WebAppsClient.NewListInstanceProcessModulesPager. +type WebAppsClientListInstanceProcessModulesResponse struct { + // Collection of Kudu thread information elements. + ProcessModuleInfoCollection +} + +// WebAppsClientListInstanceProcessModulesSlotResponse contains the response from method WebAppsClient.NewListInstanceProcessModulesSlotPager. +type WebAppsClientListInstanceProcessModulesSlotResponse struct { + // Collection of Kudu thread information elements. + ProcessModuleInfoCollection +} + +// WebAppsClientListInstanceProcessThreadsResponse contains the response from method WebAppsClient.NewListInstanceProcessThreadsPager. +type WebAppsClientListInstanceProcessThreadsResponse struct { + // Collection of Kudu thread information elements. + ProcessThreadInfoCollection +} + +// WebAppsClientListInstanceProcessThreadsSlotResponse contains the response from method WebAppsClient.NewListInstanceProcessThreadsSlotPager. +type WebAppsClientListInstanceProcessThreadsSlotResponse struct { + // Collection of Kudu thread information elements. + ProcessThreadInfoCollection +} + +// WebAppsClientListInstanceProcessesResponse contains the response from method WebAppsClient.NewListInstanceProcessesPager. +type WebAppsClientListInstanceProcessesResponse struct { + // Collection of Kudu process information elements. + ProcessInfoCollection +} + +// WebAppsClientListInstanceProcessesSlotResponse contains the response from method WebAppsClient.NewListInstanceProcessesSlotPager. +type WebAppsClientListInstanceProcessesSlotResponse struct { + // Collection of Kudu process information elements. + ProcessInfoCollection +} + +// WebAppsClientListInstanceWorkflowsSlotResponse contains the response from method WebAppsClient.NewListInstanceWorkflowsSlotPager. +type WebAppsClientListInstanceWorkflowsSlotResponse struct { + // Collection of Kudu workflow information elements. + WorkflowEnvelopeCollection +} + +// WebAppsClientListMetadataResponse contains the response from method WebAppsClient.ListMetadata. +type WebAppsClientListMetadataResponse struct { + // String dictionary resource. + StringDictionary +} + +// WebAppsClientListMetadataSlotResponse contains the response from method WebAppsClient.ListMetadataSlot. +type WebAppsClientListMetadataSlotResponse struct { + // String dictionary resource. + StringDictionary +} + +// WebAppsClientListNetworkFeaturesResponse contains the response from method WebAppsClient.ListNetworkFeatures. +type WebAppsClientListNetworkFeaturesResponse struct { + // Full view of network features for an app (presently VNET integration and Hybrid Connections). + NetworkFeatures +} + +// WebAppsClientListNetworkFeaturesSlotResponse contains the response from method WebAppsClient.ListNetworkFeaturesSlot. +type WebAppsClientListNetworkFeaturesSlotResponse struct { + // Full view of network features for an app (presently VNET integration and Hybrid Connections). + NetworkFeatures +} + +// WebAppsClientListPerfMonCountersResponse contains the response from method WebAppsClient.NewListPerfMonCountersPager. +type WebAppsClientListPerfMonCountersResponse struct { + // Collection of performance monitor counters. + PerfMonCounterCollection +} + +// WebAppsClientListPerfMonCountersSlotResponse contains the response from method WebAppsClient.NewListPerfMonCountersSlotPager. +type WebAppsClientListPerfMonCountersSlotResponse struct { + // Collection of performance monitor counters. + PerfMonCounterCollection +} + +// WebAppsClientListPremierAddOnsResponse contains the response from method WebAppsClient.ListPremierAddOns. +type WebAppsClientListPremierAddOnsResponse struct { + // Premier add-on. + PremierAddOn +} + +// WebAppsClientListPremierAddOnsSlotResponse contains the response from method WebAppsClient.ListPremierAddOnsSlot. +type WebAppsClientListPremierAddOnsSlotResponse struct { + // Premier add-on. + PremierAddOn +} + +// WebAppsClientListProcessModulesResponse contains the response from method WebAppsClient.NewListProcessModulesPager. +type WebAppsClientListProcessModulesResponse struct { + // Collection of Kudu thread information elements. + ProcessModuleInfoCollection +} + +// WebAppsClientListProcessModulesSlotResponse contains the response from method WebAppsClient.NewListProcessModulesSlotPager. +type WebAppsClientListProcessModulesSlotResponse struct { + // Collection of Kudu thread information elements. + ProcessModuleInfoCollection +} + +// WebAppsClientListProcessThreadsResponse contains the response from method WebAppsClient.NewListProcessThreadsPager. +type WebAppsClientListProcessThreadsResponse struct { + // Collection of Kudu thread information elements. + ProcessThreadInfoCollection +} + +// WebAppsClientListProcessThreadsSlotResponse contains the response from method WebAppsClient.NewListProcessThreadsSlotPager. +type WebAppsClientListProcessThreadsSlotResponse struct { + // Collection of Kudu thread information elements. + ProcessThreadInfoCollection +} + +// WebAppsClientListProcessesResponse contains the response from method WebAppsClient.NewListProcessesPager. +type WebAppsClientListProcessesResponse struct { + // Collection of Kudu process information elements. + ProcessInfoCollection +} + +// WebAppsClientListProcessesSlotResponse contains the response from method WebAppsClient.NewListProcessesSlotPager. +type WebAppsClientListProcessesSlotResponse struct { + // Collection of Kudu process information elements. + ProcessInfoCollection +} + +// WebAppsClientListProductionSiteDeploymentStatusesResponse contains the response from method WebAppsClient.NewListProductionSiteDeploymentStatusesPager. +type WebAppsClientListProductionSiteDeploymentStatusesResponse struct { + // Deployment status collection ARM resource. + CsmDeploymentStatusCollection +} + +// WebAppsClientListPublicCertificatesResponse contains the response from method WebAppsClient.NewListPublicCertificatesPager. +type WebAppsClientListPublicCertificatesResponse struct { + // Collection of public certificates + PublicCertificateCollection +} + +// WebAppsClientListPublicCertificatesSlotResponse contains the response from method WebAppsClient.NewListPublicCertificatesSlotPager. +type WebAppsClientListPublicCertificatesSlotResponse struct { + // Collection of public certificates + PublicCertificateCollection +} + +// WebAppsClientListPublishingCredentialsResponse contains the response from method WebAppsClient.BeginListPublishingCredentials. +type WebAppsClientListPublishingCredentialsResponse struct { + // User credentials used for publishing activity. + User +} + +// WebAppsClientListPublishingCredentialsSlotResponse contains the response from method WebAppsClient.BeginListPublishingCredentialsSlot. +type WebAppsClientListPublishingCredentialsSlotResponse struct { + // User credentials used for publishing activity. + User +} + +// WebAppsClientListPublishingProfileXMLWithSecretsResponse contains the response from method WebAppsClient.ListPublishingProfileXMLWithSecrets. +type WebAppsClientListPublishingProfileXMLWithSecretsResponse struct { + // Body contains the streaming response. + Body io.ReadCloser +} + +// WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse contains the response from method WebAppsClient.ListPublishingProfileXMLWithSecretsSlot. +type WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse struct { + // Body contains the streaming response. + Body io.ReadCloser +} + +// WebAppsClientListRelayServiceConnectionsResponse contains the response from method WebAppsClient.ListRelayServiceConnections. +type WebAppsClientListRelayServiceConnectionsResponse struct { + // Hybrid Connection for an App Service app. + RelayServiceConnectionEntity +} + +// WebAppsClientListRelayServiceConnectionsSlotResponse contains the response from method WebAppsClient.ListRelayServiceConnectionsSlot. +type WebAppsClientListRelayServiceConnectionsSlotResponse struct { + // Hybrid Connection for an App Service app. + RelayServiceConnectionEntity +} + +// WebAppsClientListResponse contains the response from method WebAppsClient.NewListPager. +type WebAppsClientListResponse struct { + // Collection of App Service apps. + WebAppCollection +} + +// WebAppsClientListSiteBackupsResponse contains the response from method WebAppsClient.NewListSiteBackupsPager. +type WebAppsClientListSiteBackupsResponse struct { + // Collection of backup items. + BackupItemCollection +} + +// WebAppsClientListSiteBackupsSlotResponse contains the response from method WebAppsClient.NewListSiteBackupsSlotPager. +type WebAppsClientListSiteBackupsSlotResponse struct { + // Collection of backup items. + BackupItemCollection +} + +// WebAppsClientListSiteContainersResponse contains the response from method WebAppsClient.NewListSiteContainersPager. +type WebAppsClientListSiteContainersResponse struct { + // Collection of site containers + SiteContainerCollection +} + +// WebAppsClientListSiteContainersSlotResponse contains the response from method WebAppsClient.NewListSiteContainersSlotPager. +type WebAppsClientListSiteContainersSlotResponse struct { + // Collection of site containers + SiteContainerCollection +} + +// WebAppsClientListSiteExtensionsResponse contains the response from method WebAppsClient.NewListSiteExtensionsPager. +type WebAppsClientListSiteExtensionsResponse struct { + // Collection of Kudu site extension information elements. + SiteExtensionInfoCollection +} + +// WebAppsClientListSiteExtensionsSlotResponse contains the response from method WebAppsClient.NewListSiteExtensionsSlotPager. +type WebAppsClientListSiteExtensionsSlotResponse struct { + // Collection of Kudu site extension information elements. + SiteExtensionInfoCollection +} + +// WebAppsClientListSitePushSettingsResponse contains the response from method WebAppsClient.ListSitePushSettings. +type WebAppsClientListSitePushSettingsResponse struct { + // Push settings for the App. + PushSettings +} + +// WebAppsClientListSitePushSettingsSlotResponse contains the response from method WebAppsClient.ListSitePushSettingsSlot. +type WebAppsClientListSitePushSettingsSlotResponse struct { + // Push settings for the App. + PushSettings +} + +// WebAppsClientListSlotConfigurationNamesResponse contains the response from method WebAppsClient.ListSlotConfigurationNames. +type WebAppsClientListSlotConfigurationNamesResponse struct { + // Slot Config names azure resource. + SlotConfigNamesResource +} + +// WebAppsClientListSlotDifferencesFromProductionResponse contains the response from method WebAppsClient.NewListSlotDifferencesFromProductionPager. +type WebAppsClientListSlotDifferencesFromProductionResponse struct { + // Collection of slot differences. + SlotDifferenceCollection +} + +// WebAppsClientListSlotDifferencesSlotResponse contains the response from method WebAppsClient.NewListSlotDifferencesSlotPager. +type WebAppsClientListSlotDifferencesSlotResponse struct { + // Collection of slot differences. + SlotDifferenceCollection +} + +// WebAppsClientListSlotSiteDeploymentStatusesSlotResponse contains the response from method WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager. +type WebAppsClientListSlotSiteDeploymentStatusesSlotResponse struct { + // Deployment status collection ARM resource. + CsmDeploymentStatusCollection +} + +// WebAppsClientListSlotsResponse contains the response from method WebAppsClient.NewListSlotsPager. +type WebAppsClientListSlotsResponse struct { + // Collection of App Service apps. + WebAppCollection +} + +// WebAppsClientListSnapshotsFromDRSecondaryResponse contains the response from method WebAppsClient.NewListSnapshotsFromDRSecondaryPager. +type WebAppsClientListSnapshotsFromDRSecondaryResponse struct { + // Collection of snapshots which can be used to revert an app to a previous time. + SnapshotCollection +} + +// WebAppsClientListSnapshotsFromDRSecondarySlotResponse contains the response from method WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager. +type WebAppsClientListSnapshotsFromDRSecondarySlotResponse struct { + // Collection of snapshots which can be used to revert an app to a previous time. + SnapshotCollection +} + +// WebAppsClientListSnapshotsResponse contains the response from method WebAppsClient.NewListSnapshotsPager. +type WebAppsClientListSnapshotsResponse struct { + // Collection of snapshots which can be used to revert an app to a previous time. + SnapshotCollection +} + +// WebAppsClientListSnapshotsSlotResponse contains the response from method WebAppsClient.NewListSnapshotsSlotPager. +type WebAppsClientListSnapshotsSlotResponse struct { + // Collection of snapshots which can be used to revert an app to a previous time. + SnapshotCollection +} + +// WebAppsClientListSyncFunctionTriggersResponse contains the response from method WebAppsClient.ListSyncFunctionTriggers. +type WebAppsClientListSyncFunctionTriggersResponse struct { + // Function secrets. + FunctionSecrets +} + +// WebAppsClientListSyncFunctionTriggersSlotResponse contains the response from method WebAppsClient.ListSyncFunctionTriggersSlot. +type WebAppsClientListSyncFunctionTriggersSlotResponse struct { + // Function secrets. + FunctionSecrets +} + +// WebAppsClientListSyncStatusResponse contains the response from method WebAppsClient.ListSyncStatus. +type WebAppsClientListSyncStatusResponse struct { + // placeholder for future response values +} + +// WebAppsClientListSyncStatusSlotResponse contains the response from method WebAppsClient.ListSyncStatusSlot. +type WebAppsClientListSyncStatusSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientListTriggeredWebJobHistoryResponse contains the response from method WebAppsClient.NewListTriggeredWebJobHistoryPager. +type WebAppsClientListTriggeredWebJobHistoryResponse struct { + // Collection of Kudu continuous web job information elements. + TriggeredJobHistoryCollection +} + +// WebAppsClientListTriggeredWebJobHistorySlotResponse contains the response from method WebAppsClient.NewListTriggeredWebJobHistorySlotPager. +type WebAppsClientListTriggeredWebJobHistorySlotResponse struct { + // Collection of Kudu continuous web job information elements. + TriggeredJobHistoryCollection +} + +// WebAppsClientListTriggeredWebJobsResponse contains the response from method WebAppsClient.NewListTriggeredWebJobsPager. +type WebAppsClientListTriggeredWebJobsResponse struct { + // Collection of Kudu continuous web job information elements. + TriggeredWebJobCollection +} + +// WebAppsClientListTriggeredWebJobsSlotResponse contains the response from method WebAppsClient.NewListTriggeredWebJobsSlotPager. +type WebAppsClientListTriggeredWebJobsSlotResponse struct { + // Collection of Kudu continuous web job information elements. + TriggeredWebJobCollection +} + +// WebAppsClientListUsagesResponse contains the response from method WebAppsClient.NewListUsagesPager. +type WebAppsClientListUsagesResponse struct { + // Collection of CSM usage quotas. + CsmUsageQuotaCollection +} + +// WebAppsClientListUsagesSlotResponse contains the response from method WebAppsClient.NewListUsagesSlotPager. +type WebAppsClientListUsagesSlotResponse struct { + // Collection of CSM usage quotas. + CsmUsageQuotaCollection +} + +// WebAppsClientListVnetConnectionsResponse contains the response from method WebAppsClient.ListVnetConnections. +type WebAppsClientListVnetConnectionsResponse struct { + // Array of VnetInfoResource + VnetInfoResourceArray []*VnetInfoResource +} + +// WebAppsClientListVnetConnectionsSlotResponse contains the response from method WebAppsClient.ListVnetConnectionsSlot. +type WebAppsClientListVnetConnectionsSlotResponse struct { + // Array of VnetInfoResource + VnetInfoResourceArray []*VnetInfoResource +} + +// WebAppsClientListWebJobsResponse contains the response from method WebAppsClient.NewListWebJobsPager. +type WebAppsClientListWebJobsResponse struct { + // Collection of Kudu web job information elements. + WebJobCollection +} + +// WebAppsClientListWebJobsSlotResponse contains the response from method WebAppsClient.NewListWebJobsSlotPager. +type WebAppsClientListWebJobsSlotResponse struct { + // Collection of Kudu web job information elements. + WebJobCollection +} + +// WebAppsClientListWorkflowsConnectionsResponse contains the response from method WebAppsClient.ListWorkflowsConnections. +type WebAppsClientListWorkflowsConnectionsResponse struct { + // Workflow properties definition. + WorkflowEnvelope +} + +// WebAppsClientListWorkflowsConnectionsSlotResponse contains the response from method WebAppsClient.ListWorkflowsConnectionsSlot. +type WebAppsClientListWorkflowsConnectionsSlotResponse struct { + // Workflow properties definition. + WorkflowEnvelope +} + +// WebAppsClientListWorkflowsResponse contains the response from method WebAppsClient.NewListWorkflowsPager. +type WebAppsClientListWorkflowsResponse struct { + // Collection of Kudu workflow information elements. + WorkflowEnvelopeCollection +} + +// WebAppsClientMigrateMySQLResponse contains the response from method WebAppsClient.BeginMigrateMySQL. +type WebAppsClientMigrateMySQLResponse struct { + // An operation on a resource. + Operation +} + +// WebAppsClientMigrateStorageResponse contains the response from method WebAppsClient.BeginMigrateStorage. +type WebAppsClientMigrateStorageResponse struct { + // Response for a migration of app content request. + StorageMigrationResponse +} + +// WebAppsClientPutPrivateAccessVnetResponse contains the response from method WebAppsClient.PutPrivateAccessVnet. +type WebAppsClientPutPrivateAccessVnetResponse struct { + // Description of the parameters of Private Access for a Web Site. + PrivateAccess +} + +// WebAppsClientPutPrivateAccessVnetSlotResponse contains the response from method WebAppsClient.PutPrivateAccessVnetSlot. +type WebAppsClientPutPrivateAccessVnetSlotResponse struct { + // Description of the parameters of Private Access for a Web Site. + PrivateAccess +} + +// WebAppsClientRecoverSiteConfigurationSnapshotResponse contains the response from method WebAppsClient.RecoverSiteConfigurationSnapshot. +type WebAppsClientRecoverSiteConfigurationSnapshotResponse struct { + // placeholder for future response values +} + +// WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse contains the response from method WebAppsClient.RecoverSiteConfigurationSnapshotSlot. +type WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientResetProductionSlotConfigResponse contains the response from method WebAppsClient.ResetProductionSlotConfig. +type WebAppsClientResetProductionSlotConfigResponse struct { + // placeholder for future response values +} + +// WebAppsClientResetSlotConfigurationSlotResponse contains the response from method WebAppsClient.ResetSlotConfigurationSlot. +type WebAppsClientResetSlotConfigurationSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientRestartResponse contains the response from method WebAppsClient.Restart. +type WebAppsClientRestartResponse struct { + // placeholder for future response values +} + +// WebAppsClientRestartSlotResponse contains the response from method WebAppsClient.RestartSlot. +type WebAppsClientRestartSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientRestoreFromBackupBlobResponse contains the response from method WebAppsClient.BeginRestoreFromBackupBlob. +type WebAppsClientRestoreFromBackupBlobResponse struct { + // placeholder for future response values +} + +// WebAppsClientRestoreFromBackupBlobSlotResponse contains the response from method WebAppsClient.BeginRestoreFromBackupBlobSlot. +type WebAppsClientRestoreFromBackupBlobSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientRestoreFromDeletedAppResponse contains the response from method WebAppsClient.BeginRestoreFromDeletedApp. +type WebAppsClientRestoreFromDeletedAppResponse struct { + // placeholder for future response values +} + +// WebAppsClientRestoreFromDeletedAppSlotResponse contains the response from method WebAppsClient.BeginRestoreFromDeletedAppSlot. +type WebAppsClientRestoreFromDeletedAppSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientRestoreResponse contains the response from method WebAppsClient.BeginRestore. +type WebAppsClientRestoreResponse struct { + // placeholder for future response values +} + +// WebAppsClientRestoreSlotResponse contains the response from method WebAppsClient.BeginRestoreSlot. +type WebAppsClientRestoreSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientRestoreSnapshotResponse contains the response from method WebAppsClient.BeginRestoreSnapshot. +type WebAppsClientRestoreSnapshotResponse struct { + // placeholder for future response values +} + +// WebAppsClientRestoreSnapshotSlotResponse contains the response from method WebAppsClient.BeginRestoreSnapshotSlot. +type WebAppsClientRestoreSnapshotSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientRunTriggeredWebJobResponse contains the response from method WebAppsClient.RunTriggeredWebJob. +type WebAppsClientRunTriggeredWebJobResponse struct { + // placeholder for future response values +} + +// WebAppsClientRunTriggeredWebJobSlotResponse contains the response from method WebAppsClient.RunTriggeredWebJobSlot. +type WebAppsClientRunTriggeredWebJobSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientStartContinuousWebJobResponse contains the response from method WebAppsClient.StartContinuousWebJob. +type WebAppsClientStartContinuousWebJobResponse struct { + // placeholder for future response values +} + +// WebAppsClientStartContinuousWebJobSlotResponse contains the response from method WebAppsClient.StartContinuousWebJobSlot. +type WebAppsClientStartContinuousWebJobSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientStartNetworkTraceResponse contains the response from method WebAppsClient.BeginStartNetworkTrace. +type WebAppsClientStartNetworkTraceResponse struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientStartNetworkTraceResponse. +func (w *WebAppsClientStartNetworkTraceResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &w.NetworkTraceArray) +} + +// WebAppsClientStartNetworkTraceSlotResponse contains the response from method WebAppsClient.BeginStartNetworkTraceSlot. +type WebAppsClientStartNetworkTraceSlotResponse struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientStartNetworkTraceSlotResponse. +func (w *WebAppsClientStartNetworkTraceSlotResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &w.NetworkTraceArray) +} + +// WebAppsClientStartResponse contains the response from method WebAppsClient.Start. +type WebAppsClientStartResponse struct { + // placeholder for future response values +} + +// WebAppsClientStartSlotResponse contains the response from method WebAppsClient.StartSlot. +type WebAppsClientStartSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientStartWebSiteNetworkTraceOperationResponse contains the response from method WebAppsClient.BeginStartWebSiteNetworkTraceOperation. +type WebAppsClientStartWebSiteNetworkTraceOperationResponse struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientStartWebSiteNetworkTraceOperationResponse. +func (w *WebAppsClientStartWebSiteNetworkTraceOperationResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &w.NetworkTraceArray) +} + +// WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse contains the response from method WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot. +type WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse struct { + // Array of NetworkTrace + NetworkTraceArray []*NetworkTrace +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse. +func (w *WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &w.NetworkTraceArray) +} + +// WebAppsClientStartWebSiteNetworkTraceResponse contains the response from method WebAppsClient.StartWebSiteNetworkTrace. +type WebAppsClientStartWebSiteNetworkTraceResponse struct { + Value *string +} + +// WebAppsClientStartWebSiteNetworkTraceSlotResponse contains the response from method WebAppsClient.StartWebSiteNetworkTraceSlot. +type WebAppsClientStartWebSiteNetworkTraceSlotResponse struct { + Value *string +} + +// WebAppsClientStopContinuousWebJobResponse contains the response from method WebAppsClient.StopContinuousWebJob. +type WebAppsClientStopContinuousWebJobResponse struct { + // placeholder for future response values +} + +// WebAppsClientStopContinuousWebJobSlotResponse contains the response from method WebAppsClient.StopContinuousWebJobSlot. +type WebAppsClientStopContinuousWebJobSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientStopNetworkTraceResponse contains the response from method WebAppsClient.StopNetworkTrace. +type WebAppsClientStopNetworkTraceResponse struct { + // placeholder for future response values +} + +// WebAppsClientStopNetworkTraceSlotResponse contains the response from method WebAppsClient.StopNetworkTraceSlot. +type WebAppsClientStopNetworkTraceSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientStopResponse contains the response from method WebAppsClient.Stop. +type WebAppsClientStopResponse struct { + // placeholder for future response values +} + +// WebAppsClientStopSlotResponse contains the response from method WebAppsClient.StopSlot. +type WebAppsClientStopSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientStopWebSiteNetworkTraceResponse contains the response from method WebAppsClient.StopWebSiteNetworkTrace. +type WebAppsClientStopWebSiteNetworkTraceResponse struct { + // placeholder for future response values +} + +// WebAppsClientStopWebSiteNetworkTraceSlotResponse contains the response from method WebAppsClient.StopWebSiteNetworkTraceSlot. +type WebAppsClientStopWebSiteNetworkTraceSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientSwapSlotResponse contains the response from method WebAppsClient.BeginSwapSlot. +type WebAppsClientSwapSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientSwapSlotWithProductionResponse contains the response from method WebAppsClient.BeginSwapSlotWithProduction. +type WebAppsClientSwapSlotWithProductionResponse struct { + // placeholder for future response values +} + +// WebAppsClientSyncFunctionTriggersResponse contains the response from method WebAppsClient.SyncFunctionTriggers. +type WebAppsClientSyncFunctionTriggersResponse struct { + // placeholder for future response values +} + +// WebAppsClientSyncFunctionTriggersSlotResponse contains the response from method WebAppsClient.SyncFunctionTriggersSlot. +type WebAppsClientSyncFunctionTriggersSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientSyncFunctionsResponse contains the response from method WebAppsClient.SyncFunctions. +type WebAppsClientSyncFunctionsResponse struct { + // placeholder for future response values +} + +// WebAppsClientSyncFunctionsSlotResponse contains the response from method WebAppsClient.SyncFunctionsSlot. +type WebAppsClientSyncFunctionsSlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientSyncRepositoryResponse contains the response from method WebAppsClient.SyncRepository. +type WebAppsClientSyncRepositoryResponse struct { + // placeholder for future response values +} + +// WebAppsClientSyncRepositorySlotResponse contains the response from method WebAppsClient.SyncRepositorySlot. +type WebAppsClientSyncRepositorySlotResponse struct { + // placeholder for future response values +} + +// WebAppsClientUpdateApplicationSettingsResponse contains the response from method WebAppsClient.UpdateApplicationSettings. +type WebAppsClientUpdateApplicationSettingsResponse struct { + // String dictionary resource. + StringDictionary +} + +// WebAppsClientUpdateApplicationSettingsSlotResponse contains the response from method WebAppsClient.UpdateApplicationSettingsSlot. +type WebAppsClientUpdateApplicationSettingsSlotResponse struct { + // String dictionary resource. + StringDictionary +} + +// WebAppsClientUpdateAuthSettingsResponse contains the response from method WebAppsClient.UpdateAuthSettings. +type WebAppsClientUpdateAuthSettingsResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization feature. + SiteAuthSettings +} + +// WebAppsClientUpdateAuthSettingsSlotResponse contains the response from method WebAppsClient.UpdateAuthSettingsSlot. +type WebAppsClientUpdateAuthSettingsSlotResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization feature. + SiteAuthSettings +} + +// WebAppsClientUpdateAuthSettingsV2Response contains the response from method WebAppsClient.UpdateAuthSettingsV2. +type WebAppsClientUpdateAuthSettingsV2Response struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. + SiteAuthSettingsV2 +} + +// WebAppsClientUpdateAuthSettingsV2SlotResponse contains the response from method WebAppsClient.UpdateAuthSettingsV2Slot. +type WebAppsClientUpdateAuthSettingsV2SlotResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. + SiteAuthSettingsV2 +} + +// WebAppsClientUpdateAzureStorageAccountsResponse contains the response from method WebAppsClient.UpdateAzureStorageAccounts. +type WebAppsClientUpdateAzureStorageAccountsResponse struct { + // AzureStorageInfo dictionary resource. + AzureStoragePropertyDictionaryResource +} + +// WebAppsClientUpdateAzureStorageAccountsSlotResponse contains the response from method WebAppsClient.UpdateAzureStorageAccountsSlot. +type WebAppsClientUpdateAzureStorageAccountsSlotResponse struct { + // AzureStorageInfo dictionary resource. + AzureStoragePropertyDictionaryResource +} + +// WebAppsClientUpdateBackupConfigurationResponse contains the response from method WebAppsClient.UpdateBackupConfiguration. +type WebAppsClientUpdateBackupConfigurationResponse struct { + // Description of a backup which will be performed. + BackupRequest +} + +// WebAppsClientUpdateBackupConfigurationSlotResponse contains the response from method WebAppsClient.UpdateBackupConfigurationSlot. +type WebAppsClientUpdateBackupConfigurationSlotResponse struct { + // Description of a backup which will be performed. + BackupRequest +} + +// WebAppsClientUpdateConfigurationResponse contains the response from method WebAppsClient.UpdateConfiguration. +type WebAppsClientUpdateConfigurationResponse struct { + // Web app configuration ARM resource. + SiteConfigResource +} + +// WebAppsClientUpdateConfigurationSlotResponse contains the response from method WebAppsClient.UpdateConfigurationSlot. +type WebAppsClientUpdateConfigurationSlotResponse struct { + // Web app configuration ARM resource. + SiteConfigResource +} + +// WebAppsClientUpdateConnectionStringsResponse contains the response from method WebAppsClient.UpdateConnectionStrings. +type WebAppsClientUpdateConnectionStringsResponse struct { + // String dictionary resource. + ConnectionStringDictionary +} + +// WebAppsClientUpdateConnectionStringsSlotResponse contains the response from method WebAppsClient.UpdateConnectionStringsSlot. +type WebAppsClientUpdateConnectionStringsSlotResponse struct { + // String dictionary resource. + ConnectionStringDictionary +} + +// WebAppsClientUpdateDiagnosticLogsConfigResponse contains the response from method WebAppsClient.UpdateDiagnosticLogsConfig. +type WebAppsClientUpdateDiagnosticLogsConfigResponse struct { + // Configuration of App Service site logs. + SiteLogsConfig +} + +// WebAppsClientUpdateDiagnosticLogsConfigSlotResponse contains the response from method WebAppsClient.UpdateDiagnosticLogsConfigSlot. +type WebAppsClientUpdateDiagnosticLogsConfigSlotResponse struct { + // Configuration of App Service site logs. + SiteLogsConfig +} + +// WebAppsClientUpdateDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.UpdateDomainOwnershipIdentifier. +type WebAppsClientUpdateDomainOwnershipIdentifierResponse struct { + // A domain specific resource identifier. + Identifier +} + +// WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.UpdateDomainOwnershipIdentifierSlot. +type WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse struct { + // A domain specific resource identifier. + Identifier +} + +// WebAppsClientUpdateFtpAllowedResponse contains the response from method WebAppsClient.UpdateFtpAllowed. +type WebAppsClientUpdateFtpAllowedResponse struct { + // Publishing Credentials Policies parameters. + CsmPublishingCredentialsPoliciesEntity +} + +// WebAppsClientUpdateFtpAllowedSlotResponse contains the response from method WebAppsClient.UpdateFtpAllowedSlot. +type WebAppsClientUpdateFtpAllowedSlotResponse struct { + // Publishing Credentials Policies parameters. + CsmPublishingCredentialsPoliciesEntity +} + +// WebAppsClientUpdateHybridConnectionResponse contains the response from method WebAppsClient.UpdateHybridConnection. +type WebAppsClientUpdateHybridConnectionResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. + HybridConnection +} + +// WebAppsClientUpdateHybridConnectionSlotResponse contains the response from method WebAppsClient.UpdateHybridConnectionSlot. +type WebAppsClientUpdateHybridConnectionSlotResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. + HybridConnection +} + +// WebAppsClientUpdateMachineKeyResponse contains the response from method WebAppsClient.UpdateMachineKey. +type WebAppsClientUpdateMachineKeyResponse struct { + // Anything + Interface any +} + +// WebAppsClientUpdateMetadataResponse contains the response from method WebAppsClient.UpdateMetadata. +type WebAppsClientUpdateMetadataResponse struct { + // String dictionary resource. + StringDictionary +} + +// WebAppsClientUpdateMetadataSlotResponse contains the response from method WebAppsClient.UpdateMetadataSlot. +type WebAppsClientUpdateMetadataSlotResponse struct { + // String dictionary resource. + StringDictionary +} + +// WebAppsClientUpdatePremierAddOnResponse contains the response from method WebAppsClient.UpdatePremierAddOn. +type WebAppsClientUpdatePremierAddOnResponse struct { + // Premier add-on. + PremierAddOn +} + +// WebAppsClientUpdatePremierAddOnSlotResponse contains the response from method WebAppsClient.UpdatePremierAddOnSlot. +type WebAppsClientUpdatePremierAddOnSlotResponse struct { + // Premier add-on. + PremierAddOn +} + +// WebAppsClientUpdateRelayServiceConnectionResponse contains the response from method WebAppsClient.UpdateRelayServiceConnection. +type WebAppsClientUpdateRelayServiceConnectionResponse struct { + // Hybrid Connection for an App Service app. + RelayServiceConnectionEntity +} + +// WebAppsClientUpdateRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.UpdateRelayServiceConnectionSlot. +type WebAppsClientUpdateRelayServiceConnectionSlotResponse struct { + // Hybrid Connection for an App Service app. + RelayServiceConnectionEntity +} + +// WebAppsClientUpdateResponse contains the response from method WebAppsClient.Update. +type WebAppsClientUpdateResponse struct { + // A web app, a mobile app backend, or an API app. + Site +} + +// WebAppsClientUpdateScmAllowedResponse contains the response from method WebAppsClient.UpdateScmAllowed. +type WebAppsClientUpdateScmAllowedResponse struct { + // Publishing Credentials Policies parameters. + CsmPublishingCredentialsPoliciesEntity +} + +// WebAppsClientUpdateScmAllowedSlotResponse contains the response from method WebAppsClient.UpdateScmAllowedSlot. +type WebAppsClientUpdateScmAllowedSlotResponse struct { + // Publishing Credentials Policies parameters. + CsmPublishingCredentialsPoliciesEntity +} + +// WebAppsClientUpdateSitePushSettingsResponse contains the response from method WebAppsClient.UpdateSitePushSettings. +type WebAppsClientUpdateSitePushSettingsResponse struct { + // Push settings for the App. + PushSettings +} + +// WebAppsClientUpdateSitePushSettingsSlotResponse contains the response from method WebAppsClient.UpdateSitePushSettingsSlot. +type WebAppsClientUpdateSitePushSettingsSlotResponse struct { + // Push settings for the App. + PushSettings +} + +// WebAppsClientUpdateSlotConfigurationNamesResponse contains the response from method WebAppsClient.UpdateSlotConfigurationNames. +type WebAppsClientUpdateSlotConfigurationNamesResponse struct { + // Slot Config names azure resource. + SlotConfigNamesResource +} + +// WebAppsClientUpdateSlotResponse contains the response from method WebAppsClient.UpdateSlot. +type WebAppsClientUpdateSlotResponse struct { + // A web app, a mobile app backend, or an API app. + Site +} + +// WebAppsClientUpdateSourceControlResponse contains the response from method WebAppsClient.UpdateSourceControl. +type WebAppsClientUpdateSourceControlResponse struct { + // Source control configuration for an app. + SiteSourceControl +} + +// WebAppsClientUpdateSourceControlSlotResponse contains the response from method WebAppsClient.UpdateSourceControlSlot. +type WebAppsClientUpdateSourceControlSlotResponse struct { + // Source control configuration for an app. + SiteSourceControl +} + +// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse contains the response from method WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck. +type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. + SwiftVirtualNetwork +} + +// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse contains the response from method WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot. +type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. + SwiftVirtualNetwork +} + +// WebAppsClientUpdateVnetConnectionGatewayResponse contains the response from method WebAppsClient.UpdateVnetConnectionGateway. +type WebAppsClientUpdateVnetConnectionGatewayResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. + VnetGateway +} + +// WebAppsClientUpdateVnetConnectionGatewaySlotResponse contains the response from method WebAppsClient.UpdateVnetConnectionGatewaySlot. +type WebAppsClientUpdateVnetConnectionGatewaySlotResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. + VnetGateway +} + +// WebAppsClientUpdateVnetConnectionResponse contains the response from method WebAppsClient.UpdateVnetConnection. +type WebAppsClientUpdateVnetConnectionResponse struct { + // Virtual Network information ARM resource. + VnetInfoResource +} + +// WebAppsClientUpdateVnetConnectionSlotResponse contains the response from method WebAppsClient.UpdateVnetConnectionSlot. +type WebAppsClientUpdateVnetConnectionSlotResponse struct { + // Virtual Network information ARM resource. + VnetInfoResource +} + +// WebSiteManagementClientCheckNameAvailabilityResponse contains the response from method WebSiteManagementClient.CheckNameAvailability. +type WebSiteManagementClientCheckNameAvailabilityResponse struct { + // Information regarding availability of a resource name. + ResourceNameAvailability +} + +// WebSiteManagementClientGetPublishingUserResponse contains the response from method WebSiteManagementClient.GetPublishingUser. +type WebSiteManagementClientGetPublishingUserResponse struct { + // User credentials used for publishing activity. + User +} + +// WebSiteManagementClientGetSourceControlResponse contains the response from method WebSiteManagementClient.GetSourceControl. +type WebSiteManagementClientGetSourceControlResponse struct { + // The source control OAuth token. + SourceControl +} + +// WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse contains the response from method WebSiteManagementClient.GetSubscriptionDeploymentLocations. +type WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse struct { + // List of available locations (regions or App Service Environments) for + // deployment of App Service resources. + DeploymentLocations +} + +// WebSiteManagementClientListAseRegionsResponse contains the response from method WebSiteManagementClient.NewListAseRegionsPager. +type WebSiteManagementClientListAseRegionsResponse struct { + // Collection of ASE regions. + AseRegionCollection +} + +// WebSiteManagementClientListBillingMetersResponse contains the response from method WebSiteManagementClient.NewListBillingMetersPager. +type WebSiteManagementClientListBillingMetersResponse struct { + // Collection of Billing Meters + BillingMeterCollection +} + +// WebSiteManagementClientListCustomHostNameSitesResponse contains the response from method WebSiteManagementClient.NewListCustomHostNameSitesPager. +type WebSiteManagementClientListCustomHostNameSitesResponse struct { + // Collection of custom hostname sites + CustomHostnameSitesCollection +} + +// WebSiteManagementClientListGeoRegionsResponse contains the response from method WebSiteManagementClient.NewListGeoRegionsPager. +type WebSiteManagementClientListGeoRegionsResponse struct { + // Collection of geographical regions. + GeoRegionCollection +} + +// WebSiteManagementClientListPremierAddOnOffersResponse contains the response from method WebSiteManagementClient.NewListPremierAddOnOffersPager. +type WebSiteManagementClientListPremierAddOnOffersResponse struct { + // Collection of premier add-on offers. + PremierAddOnOfferCollection +} + +// WebSiteManagementClientListSKUsResponse contains the response from method WebSiteManagementClient.ListSKUs. +type WebSiteManagementClientListSKUsResponse struct { + // Collection of SKU information. + SKUInfos +} + +// WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse contains the response from method WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager. +type WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse struct { + // Collection of identifiers. + IdentifierCollection +} + +// WebSiteManagementClientListSourceControlsResponse contains the response from method WebSiteManagementClient.NewListSourceControlsPager. +type WebSiteManagementClientListSourceControlsResponse struct { + // Collection of source controls. + SourceControlCollection +} + +// WebSiteManagementClientMoveResponse contains the response from method WebSiteManagementClient.Move. +type WebSiteManagementClientMoveResponse struct { + // placeholder for future response values +} + +// WebSiteManagementClientUpdatePublishingUserResponse contains the response from method WebSiteManagementClient.UpdatePublishingUser. +type WebSiteManagementClientUpdatePublishingUserResponse struct { + // User credentials used for publishing activity. + User +} + +// WebSiteManagementClientUpdateSourceControlResponse contains the response from method WebSiteManagementClient.UpdateSourceControl. +type WebSiteManagementClientUpdateSourceControlResponse struct { + // The source control OAuth token. + SourceControl +} + +// WebSiteManagementClientValidateMoveResponse contains the response from method WebSiteManagementClient.ValidateMove. +type WebSiteManagementClientValidateMoveResponse struct { + // placeholder for future response values +} + +// WebSiteManagementClientValidateResponse contains the response from method WebSiteManagementClient.Validate. +type WebSiteManagementClientValidateResponse struct { + // Describes the result of resource validation. + ValidateResponse +} + +// WebSiteManagementClientVerifyHostingEnvironmentVnetResponse contains the response from method WebSiteManagementClient.VerifyHostingEnvironmentVnet. +type WebSiteManagementClientVerifyHostingEnvironmentVnetResponse struct { + // A class that describes the reason for a validation failure. + VnetValidationFailureDetails +} + +// WorkflowRunActionRepetitionsClientGetResponse contains the response from method WorkflowRunActionRepetitionsClient.Get. +type WorkflowRunActionRepetitionsClientGetResponse struct { + // The workflow run action repetition definition. + WorkflowRunActionRepetitionDefinition +} + +// WorkflowRunActionRepetitionsClientListExpressionTracesResponse contains the response from method WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager. +type WorkflowRunActionRepetitionsClientListExpressionTracesResponse struct { + // The expression traces. + ExpressionTraces +} + +// WorkflowRunActionRepetitionsClientListResponse contains the response from method WorkflowRunActionRepetitionsClient.NewListPager. +type WorkflowRunActionRepetitionsClientListResponse struct { + // A collection of workflow run action repetitions. + WorkflowRunActionRepetitionDefinitionCollection +} + +// WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse contains the response from method WorkflowRunActionRepetitionsRequestHistoriesClient.Get. +type WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse struct { + // The request history. + RequestHistory +} + +// WorkflowRunActionRepetitionsRequestHistoriesClientListResponse contains the response from method WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager. +type WorkflowRunActionRepetitionsRequestHistoriesClientListResponse struct { + // The list of workflow request histories. + RequestHistoryListResult +} + +// WorkflowRunActionScopeRepetitionsClientGetResponse contains the response from method WorkflowRunActionScopeRepetitionsClient.Get. +type WorkflowRunActionScopeRepetitionsClientGetResponse struct { + // The workflow run action repetition definition. + WorkflowRunActionRepetitionDefinition +} + +// WorkflowRunActionScopeRepetitionsClientListResponse contains the response from method WorkflowRunActionScopeRepetitionsClient.NewListPager. +type WorkflowRunActionScopeRepetitionsClientListResponse struct { + // A collection of workflow run action repetitions. + WorkflowRunActionRepetitionDefinitionCollection +} + +// WorkflowRunActionsClientGetResponse contains the response from method WorkflowRunActionsClient.Get. +type WorkflowRunActionsClientGetResponse struct { + // The workflow run action. + WorkflowRunAction +} + +// WorkflowRunActionsClientListExpressionTracesResponse contains the response from method WorkflowRunActionsClient.NewListExpressionTracesPager. +type WorkflowRunActionsClientListExpressionTracesResponse struct { + // The expression traces. + ExpressionTraces +} + +// WorkflowRunActionsClientListResponse contains the response from method WorkflowRunActionsClient.NewListPager. +type WorkflowRunActionsClientListResponse struct { + // The list of workflow run actions. + WorkflowRunActionListResult +} + +// WorkflowRunsClientCancelResponse contains the response from method WorkflowRunsClient.Cancel. +type WorkflowRunsClientCancelResponse struct { + // placeholder for future response values +} + +// WorkflowRunsClientGetResponse contains the response from method WorkflowRunsClient.Get. +type WorkflowRunsClientGetResponse struct { + // The workflow run. + WorkflowRun +} + +// WorkflowRunsClientListResponse contains the response from method WorkflowRunsClient.NewListPager. +type WorkflowRunsClientListResponse struct { + // The list of workflow runs. + WorkflowRunListResult +} + +// WorkflowTriggerHistoriesClientGetResponse contains the response from method WorkflowTriggerHistoriesClient.Get. +type WorkflowTriggerHistoriesClientGetResponse struct { + // The workflow trigger history. + WorkflowTriggerHistory +} + +// WorkflowTriggerHistoriesClientListResponse contains the response from method WorkflowTriggerHistoriesClient.NewListPager. +type WorkflowTriggerHistoriesClientListResponse struct { + // The list of workflow trigger histories. + WorkflowTriggerHistoryListResult +} + +// WorkflowTriggerHistoriesClientResubmitResponse contains the response from method WorkflowTriggerHistoriesClient.BeginResubmit. +type WorkflowTriggerHistoriesClientResubmitResponse struct { + // placeholder for future response values +} + +// WorkflowTriggersClientGetResponse contains the response from method WorkflowTriggersClient.Get. +type WorkflowTriggersClientGetResponse struct { + // The workflow trigger. + WorkflowTrigger +} + +// WorkflowTriggersClientGetSchemaJSONResponse contains the response from method WorkflowTriggersClient.GetSchemaJSON. +type WorkflowTriggersClientGetSchemaJSONResponse struct { + // The JSON schema. + JSONSchema +} + +// WorkflowTriggersClientListCallbackURLResponse contains the response from method WorkflowTriggersClient.ListCallbackURL. +type WorkflowTriggersClientListCallbackURLResponse struct { + // The workflow trigger callback URL. + WorkflowTriggerCallbackURL +} + +// WorkflowTriggersClientListResponse contains the response from method WorkflowTriggersClient.NewListPager. +type WorkflowTriggersClientListResponse struct { + // The list of workflow triggers. + WorkflowTriggerListResult +} + +// WorkflowTriggersClientRunResponse contains the response from method WorkflowTriggersClient.BeginRun. +type WorkflowTriggersClientRunResponse struct { + // placeholder for future response values +} + +// WorkflowVersionsClientGetResponse contains the response from method WorkflowVersionsClient.Get. +type WorkflowVersionsClientGetResponse struct { + // The workflow version. + WorkflowVersion +} + +// WorkflowVersionsClientListResponse contains the response from method WorkflowVersionsClient.NewListPager. +type WorkflowVersionsClientListResponse struct { + // The list of workflow versions. + WorkflowVersionListResult +} + +// WorkflowsClientRegenerateAccessKeyResponse contains the response from method WorkflowsClient.RegenerateAccessKey. +type WorkflowsClientRegenerateAccessKeyResponse struct { + // placeholder for future response values +} + +// WorkflowsClientValidateResponse contains the response from method WorkflowsClient.Validate. +type WorkflowsClientValidateResponse struct { + // placeholder for future response values +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/staticsites_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/staticsites_client.go new file mode 100644 index 00000000..5abbbbb4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/staticsites_client.go @@ -0,0 +1,5451 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// StaticSitesClient contains the methods for the StaticSites group. +// Don't use this type directly, use NewStaticSitesClient() instead. +type StaticSitesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewStaticSitesClient creates a new instance of StaticSitesClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewStaticSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StaticSitesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &StaticSitesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - privateEndpointConnectionName - Name of the private endpoint connection. +// - privateEndpointWrapper - Request body. +// - options - StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the +// StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection method. +func (client *StaticSitesClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.approveOrRejectPrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. +func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, privateEndpointWrapper); err != nil { + return nil, err + } + return req, nil +} + +// CreateOrUpdateBasicAuth - Description for Adds or updates basic auth for a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - basicAuthName - name of the basic auth entry. +// - basicAuthEnvelope - A JSON representation of the basic auth properties. +// - options - StaticSitesClientCreateOrUpdateBasicAuthOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBasicAuth +// method. +func (client *StaticSitesClient) CreateOrUpdateBasicAuth(ctx context.Context, resourceGroupName string, name string, basicAuthName BasicAuthName, basicAuthEnvelope StaticSiteBasicAuthPropertiesARMResource, options *StaticSitesClientCreateOrUpdateBasicAuthOptions) (StaticSitesClientCreateOrUpdateBasicAuthResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateBasicAuth" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateBasicAuthCreateRequest(ctx, resourceGroupName, name, basicAuthName, basicAuthEnvelope, options) + if err != nil { + return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, err + } + resp, err := client.createOrUpdateBasicAuthHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateBasicAuthCreateRequest creates the CreateOrUpdateBasicAuth request. +func (client *StaticSitesClient) createOrUpdateBasicAuthCreateRequest(ctx context.Context, resourceGroupName string, name string, basicAuthName BasicAuthName, basicAuthEnvelope StaticSiteBasicAuthPropertiesARMResource, options *StaticSitesClientCreateOrUpdateBasicAuthOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if basicAuthName == "" { + return nil, errors.New("parameter basicAuthName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{basicAuthName}", url.PathEscape(string(basicAuthName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, basicAuthEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateBasicAuthHandleResponse handles the CreateOrUpdateBasicAuth response. +func (client *StaticSitesClient) createOrUpdateBasicAuthHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateBasicAuthResponse, error) { + result := StaticSitesClientCreateOrUpdateBasicAuthResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteBasicAuthPropertiesARMResource); err != nil { + return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, err + } + return result, nil +} + +// CreateOrUpdateBuildDatabaseConnection - Description for Create or update a database connection for a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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 +// - options - StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBuildDatabaseConnection +// method. +func (client *StaticSitesClient) CreateOrUpdateBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection, options *StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions) (StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateBuildDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, databaseConnectionRequestEnvelope, options) + if err != nil { + return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, err + } + resp, err := client.createOrUpdateBuildDatabaseConnectionHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateBuildDatabaseConnectionCreateRequest creates the CreateOrUpdateBuildDatabaseConnection request. +func (client *StaticSitesClient) createOrUpdateBuildDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection, options *StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateBuildDatabaseConnectionHandleResponse handles the CreateOrUpdateBuildDatabaseConnection response. +func (client *StaticSitesClient) createOrUpdateBuildDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse, error) { + result := StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, err + } + return result, nil +} + +// CreateOrUpdateDatabaseConnection - Description for Create or update a database connection for a static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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 +// - options - StaticSitesClientCreateOrUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateDatabaseConnection +// method. +func (client *StaticSitesClient) CreateOrUpdateDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection, options *StaticSitesClientCreateOrUpdateDatabaseConnectionOptions) (StaticSitesClientCreateOrUpdateDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, databaseConnectionRequestEnvelope, options) + if err != nil { + return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, err + } + resp, err := client.createOrUpdateDatabaseConnectionHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateDatabaseConnectionCreateRequest creates the CreateOrUpdateDatabaseConnection request. +func (client *StaticSitesClient) createOrUpdateDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection, options *StaticSitesClientCreateOrUpdateDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateDatabaseConnectionHandleResponse handles the CreateOrUpdateDatabaseConnection response. +func (client *StaticSitesClient) createOrUpdateDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateDatabaseConnectionResponse, error) { + result := StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdateStaticSite - Description for Creates a new static site in an existing resource group, or updates an +// existing static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site to create or update. +// - staticSiteEnvelope - A JSON representation of the staticsite properties. See example. +// - options - StaticSitesClientBeginCreateOrUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSite +// method. +func (client *StaticSitesClient) BeginCreateOrUpdateStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSiteARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteOptions) (*runtime.Poller[StaticSitesClientCreateOrUpdateStaticSiteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdateStaticSite(ctx, resourceGroupName, name, staticSiteEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientCreateOrUpdateStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientCreateOrUpdateStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdateStaticSite - Description for Creates a new static site in an existing resource group, or updates an existing +// static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) createOrUpdateStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSiteARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginCreateOrUpdateStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateStaticSiteCreateRequest creates the CreateOrUpdateStaticSite request. +func (client *StaticSitesClient) createOrUpdateStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSiteARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// CreateOrUpdateStaticSiteAppSettings - Description for Creates or updates the app settings of a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - appSettings - The dictionary containing the static site app settings to update. +// - options - StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteAppSettings +// method. +func (client *StaticSitesClient) CreateOrUpdateStaticSiteAppSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateStaticSiteAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateStaticSiteAppSettingsCreateRequest(ctx, resourceGroupName, name, appSettings, options) + if err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, err + } + resp, err := client.createOrUpdateStaticSiteAppSettingsHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateStaticSiteAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteAppSettings request. +func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateStaticSiteAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteAppSettings response. +func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse, error) { + result := StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, err + } + return result, nil +} + +// CreateOrUpdateStaticSiteBuildAppSettings - Description for Creates or updates the app settings of a static site build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - environmentName - The stage site identifier. +// - appSettings - The dictionary containing the static site app settings to update. +// - options - StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings +// method. +func (client *StaticSitesClient) CreateOrUpdateStaticSiteBuildAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateStaticSiteBuildAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, appSettings, options) + if err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, err + } + resp, err := client.createOrUpdateStaticSiteBuildAppSettingsHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateStaticSiteBuildAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteBuildAppSettings request. +func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateStaticSiteBuildAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteBuildAppSettings response. +func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse, error) { + result := StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, err + } + return result, nil +} + +// CreateOrUpdateStaticSiteBuildFunctionAppSettings - Description for Creates or updates the function app settings of a static +// site build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - environmentName - The stage site identifier. +// - appSettings - The dictionary containing the static site function app settings to update. +// - options - StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for +// the StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings method. +func (client *StaticSitesClient) CreateOrUpdateStaticSiteBuildFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateStaticSiteBuildFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, appSettings, options) + if err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, err + } + resp, err := client.createOrUpdateStaticSiteBuildFunctionAppSettingsHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateStaticSiteBuildFunctionAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteBuildFunctionAppSettings request. +func (client *StaticSitesClient) createOrUpdateStaticSiteBuildFunctionAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateStaticSiteBuildFunctionAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteBuildFunctionAppSettings response. +func (client *StaticSitesClient) createOrUpdateStaticSiteBuildFunctionAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse, error) { + result := StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdateStaticSiteCustomDomain - Description for Creates a new static site custom domain in an existing resource +// group and static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - domainName - The custom domain to create. +// - staticSiteCustomDomainRequestPropertiesEnvelope - A JSON representation of the static site custom domain request properties. +// See example. +// - options - StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain +// method. +func (client *StaticSitesClient) BeginCreateOrUpdateStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions) (*runtime.Poller[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdateStaticSiteCustomDomain(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdateStaticSiteCustomDomain - Description for Creates a new static site custom domain in an existing resource +// group and static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateStaticSiteCustomDomainCreateRequest creates the CreateOrUpdateStaticSiteCustomDomain request. +func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomainCreateRequest(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// CreateOrUpdateStaticSiteFunctionAppSettings - Description for Creates or updates the function app settings of a static +// site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - appSettings - The dictionary containing the static site function app settings to update. +// - options - StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions contains the optional parameters for the +// StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings method. +func (client *StaticSitesClient) CreateOrUpdateStaticSiteFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateStaticSiteFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, appSettings, options) + if err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, err + } + resp, err := client.createOrUpdateStaticSiteFunctionAppSettingsHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateStaticSiteFunctionAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteFunctionAppSettings request. +func (client *StaticSitesClient) createOrUpdateStaticSiteFunctionAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateStaticSiteFunctionAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteFunctionAppSettings response. +func (client *StaticSitesClient) createOrUpdateStaticSiteFunctionAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse, error) { + result := StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, err + } + return result, nil +} + +// CreateUserRolesInvitationLink - Description for Creates an invitation link for a user with the role +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientCreateUserRolesInvitationLinkOptions contains the optional parameters for the StaticSitesClient.CreateUserRolesInvitationLink +// method. +func (client *StaticSitesClient) CreateUserRolesInvitationLink(ctx context.Context, resourceGroupName string, name string, staticSiteUserRolesInvitationEnvelope StaticSiteUserInvitationRequestResource, options *StaticSitesClientCreateUserRolesInvitationLinkOptions) (StaticSitesClientCreateUserRolesInvitationLinkResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateUserRolesInvitationLink" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createUserRolesInvitationLinkCreateRequest(ctx, resourceGroupName, name, staticSiteUserRolesInvitationEnvelope, options) + if err != nil { + return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, err + } + resp, err := client.createUserRolesInvitationLinkHandleResponse(httpResp) + return resp, err +} + +// createUserRolesInvitationLinkCreateRequest creates the CreateUserRolesInvitationLink request. +func (client *StaticSitesClient) createUserRolesInvitationLinkCreateRequest(ctx context.Context, resourceGroupName string, name string, staticSiteUserRolesInvitationEnvelope StaticSiteUserInvitationRequestResource, options *StaticSitesClientCreateUserRolesInvitationLinkOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteUserRolesInvitationEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createUserRolesInvitationLinkHandleResponse handles the CreateUserRolesInvitationLink response. +func (client *StaticSitesClient) createUserRolesInvitationLinkHandleResponse(resp *http.Response) (StaticSitesClientCreateUserRolesInvitationLinkResponse, error) { + result := StaticSitesClientCreateUserRolesInvitationLinkResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserInvitationResponseResource); err != nil { + return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, err + } + return result, nil +} + +// BeginCreateZipDeploymentForStaticSite - Description for Deploys zipped content to a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - staticSiteZipDeploymentEnvelope - A JSON representation of the StaticSiteZipDeployment properties. See example. +// - options - StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSite +// method. +func (client *StaticSitesClient) BeginCreateZipDeploymentForStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions) (*runtime.Poller[StaticSitesClientCreateZipDeploymentForStaticSiteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createZipDeploymentForStaticSite(ctx, resourceGroupName, name, staticSiteZipDeploymentEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientCreateZipDeploymentForStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientCreateZipDeploymentForStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateZipDeploymentForStaticSite - Description for Deploys zipped content to a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) createZipDeploymentForStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginCreateZipDeploymentForStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createZipDeploymentForStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteZipDeploymentEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createZipDeploymentForStaticSiteCreateRequest creates the CreateZipDeploymentForStaticSite request. +func (client *StaticSitesClient) createZipDeploymentForStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateZipDeploymentForStaticSiteBuild - Description for Deploys zipped content to a specific environment of a static +// site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - environmentName - Name of the environment. +// - staticSiteZipDeploymentEnvelope - A JSON representation of the StaticSiteZipDeployment properties. See example. +// - options - StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild +// method. +func (client *StaticSitesClient) BeginCreateZipDeploymentForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions) (*runtime.Poller[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createZipDeploymentForStaticSiteBuild(ctx, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateZipDeploymentForStaticSiteBuild - Description for Deploys zipped content to a specific environment of a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createZipDeploymentForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createZipDeploymentForStaticSiteBuildCreateRequest creates the CreateZipDeploymentForStaticSiteBuild request. +func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// DeleteBuildDatabaseConnection - Delete a database connection for a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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. +// - options - StaticSitesClientDeleteBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteBuildDatabaseConnection +// method. +func (client *StaticSitesClient) DeleteBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientDeleteBuildDatabaseConnectionOptions) (StaticSitesClientDeleteBuildDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.DeleteBuildDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, options) + if err != nil { + return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, err + } + return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, nil +} + +// deleteBuildDatabaseConnectionCreateRequest creates the DeleteBuildDatabaseConnection request. +func (client *StaticSitesClient) deleteBuildDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientDeleteBuildDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteDatabaseConnection - Delete a database connection for a static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - databaseConnectionName - Name of the database connection. +// - options - StaticSitesClientDeleteDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteDatabaseConnection +// method. +func (client *StaticSitesClient) DeleteDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientDeleteDatabaseConnectionOptions) (StaticSitesClientDeleteDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.DeleteDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, options) + if err != nil { + return StaticSitesClientDeleteDatabaseConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientDeleteDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientDeleteDatabaseConnectionResponse{}, err + } + return StaticSitesClientDeleteDatabaseConnectionResponse{}, nil +} + +// deleteDatabaseConnectionCreateRequest creates the DeleteDatabaseConnection request. +func (client *StaticSitesClient) deleteDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientDeleteDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - privateEndpointConnectionName - Name of the private endpoint connection. +// - options - StaticSitesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.BeginDeletePrivateEndpointConnection +// method. +func (client *StaticSitesClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientBeginDeletePrivateEndpointConnectionOptions) (*runtime.Poller[StaticSitesClientDeletePrivateEndpointConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginDeletePrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. +func (client *StaticSitesClient) deletePrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientBeginDeletePrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDeleteStaticSite - Description for Deletes a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site to delete. +// - options - StaticSitesClientBeginDeleteStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSite +// method. +func (client *StaticSitesClient) BeginDeleteStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDeleteStaticSiteOptions) (*runtime.Poller[StaticSitesClientDeleteStaticSiteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteStaticSite(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientDeleteStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientDeleteStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeleteStaticSite - Description for Deletes a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) deleteStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDeleteStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginDeleteStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteStaticSiteCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteStaticSiteCreateRequest creates the DeleteStaticSite request. +func (client *StaticSitesClient) deleteStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDeleteStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDeleteStaticSiteBuild - Description for Deletes a static site build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - environmentName - The stage site identifier. +// - options - StaticSitesClientBeginDeleteStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteBuild +// method. +func (client *StaticSitesClient) BeginDeleteStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientBeginDeleteStaticSiteBuildOptions) (*runtime.Poller[StaticSitesClientDeleteStaticSiteBuildResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteStaticSiteBuild(ctx, resourceGroupName, name, environmentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientDeleteStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientDeleteStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeleteStaticSiteBuild - Description for Deletes a static site build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) deleteStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientBeginDeleteStaticSiteBuildOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginDeleteStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteStaticSiteBuildCreateRequest creates the DeleteStaticSiteBuild request. +func (client *StaticSitesClient) deleteStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientBeginDeleteStaticSiteBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDeleteStaticSiteCustomDomain - Description for Deletes a custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - domainName - The custom domain to delete. +// - options - StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteCustomDomain +// method. +func (client *StaticSitesClient) BeginDeleteStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions) (*runtime.Poller[StaticSitesClientDeleteStaticSiteCustomDomainResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteStaticSiteCustomDomain(ctx, resourceGroupName, name, domainName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientDeleteStaticSiteCustomDomainResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientDeleteStaticSiteCustomDomainResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeleteStaticSiteCustomDomain - Description for Deletes a custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) deleteStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginDeleteStaticSiteCustomDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteStaticSiteCustomDomainCreateRequest creates the DeleteStaticSiteCustomDomain request. +func (client *StaticSitesClient) deleteStaticSiteCustomDomainCreateRequest(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteStaticSiteUser - Description for Deletes the user entry from the static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the staticsite. +// - authprovider - The auth provider for this user. +// - userid - The user id of the user. +// - options - StaticSitesClientDeleteStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.DeleteStaticSiteUser +// method. +func (client *StaticSitesClient) DeleteStaticSiteUser(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, options *StaticSitesClientDeleteStaticSiteUserOptions) (StaticSitesClientDeleteStaticSiteUserResponse, error) { + var err error + const operationName = "StaticSitesClient.DeleteStaticSiteUser" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteStaticSiteUserCreateRequest(ctx, resourceGroupName, name, authprovider, userid, options) + if err != nil { + return StaticSitesClientDeleteStaticSiteUserResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientDeleteStaticSiteUserResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientDeleteStaticSiteUserResponse{}, err + } + return StaticSitesClientDeleteStaticSiteUserResponse{}, nil +} + +// deleteStaticSiteUserCreateRequest creates the DeleteStaticSiteUser request. +func (client *StaticSitesClient) deleteStaticSiteUserCreateRequest(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, options *StaticSitesClientDeleteStaticSiteUserOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if authprovider == "" { + return nil, errors.New("parameter authprovider cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authprovider}", url.PathEscape(authprovider)) + if userid == "" { + return nil, errors.New("parameter userid cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userid}", url.PathEscape(userid)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDetachStaticSite - Description for Detaches a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site to detach. +// - options - StaticSitesClientBeginDetachStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDetachStaticSite +// method. +func (client *StaticSitesClient) BeginDetachStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDetachStaticSiteOptions) (*runtime.Poller[StaticSitesClientDetachStaticSiteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.detachStaticSite(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientDetachStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientDetachStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DetachStaticSite - Description for Detaches a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) detachStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDetachStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginDetachStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.detachStaticSiteCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// detachStaticSiteCreateRequest creates the DetachStaticSite request. +func (client *StaticSitesClient) detachStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDetachStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DetachUserProvidedFunctionAppFromStaticSite - Description for Detach the user provided function app from the static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - functionAppName - Name of the function app registered with the static site. +// - options - StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions contains the optional parameters for the +// StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite method. +func (client *StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions) (StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse, error) { + var err error + const operationName = "StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.detachUserProvidedFunctionAppFromStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, options) + if err != nil { + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err + } + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, nil +} + +// detachUserProvidedFunctionAppFromStaticSiteCreateRequest creates the DetachUserProvidedFunctionAppFromStaticSite request. +func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionAppName == "" { + return nil, errors.New("parameter functionAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DetachUserProvidedFunctionAppFromStaticSiteBuild - Description for Detach the user provided function app from the static +// site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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. +// - options - StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions contains the optional parameters for +// the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild method. +func (client *StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions) (StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse, error) { + var err error + const operationName = "StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, options) + if err != nil { + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err + } + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, nil +} + +// detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest creates the DetachUserProvidedFunctionAppFromStaticSiteBuild request. +func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if functionAppName == "" { + return nil, errors.New("parameter functionAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetBasicAuth - Description for Gets the basic auth properties for a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - basicAuthName - name of the basic auth entry. +// - options - StaticSitesClientGetBasicAuthOptions contains the optional parameters for the StaticSitesClient.GetBasicAuth +// method. +func (client *StaticSitesClient) GetBasicAuth(ctx context.Context, resourceGroupName string, name string, basicAuthName BasicAuthName, options *StaticSitesClientGetBasicAuthOptions) (StaticSitesClientGetBasicAuthResponse, error) { + var err error + const operationName = "StaticSitesClient.GetBasicAuth" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBasicAuthCreateRequest(ctx, resourceGroupName, name, basicAuthName, options) + if err != nil { + return StaticSitesClientGetBasicAuthResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetBasicAuthResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetBasicAuthResponse{}, err + } + resp, err := client.getBasicAuthHandleResponse(httpResp) + return resp, err +} + +// getBasicAuthCreateRequest creates the GetBasicAuth request. +func (client *StaticSitesClient) getBasicAuthCreateRequest(ctx context.Context, resourceGroupName string, name string, basicAuthName BasicAuthName, options *StaticSitesClientGetBasicAuthOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if basicAuthName == "" { + return nil, errors.New("parameter basicAuthName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{basicAuthName}", url.PathEscape(string(basicAuthName))) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBasicAuthHandleResponse handles the GetBasicAuth response. +func (client *StaticSitesClient) getBasicAuthHandleResponse(resp *http.Response) (StaticSitesClientGetBasicAuthResponse, error) { + result := StaticSitesClientGetBasicAuthResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteBasicAuthPropertiesARMResource); err != nil { + return StaticSitesClientGetBasicAuthResponse{}, err + } + return result, nil +} + +// GetBuildDatabaseConnection - Returns overview of a database connection for a static site build by name +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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. +// - options - StaticSitesClientGetBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnection +// method. +func (client *StaticSitesClient) GetBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientGetBuildDatabaseConnectionOptions) (StaticSitesClientGetBuildDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.GetBuildDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, options) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetBuildDatabaseConnectionResponse{}, err + } + resp, err := client.getBuildDatabaseConnectionHandleResponse(httpResp) + return resp, err +} + +// getBuildDatabaseConnectionCreateRequest creates the GetBuildDatabaseConnection request. +func (client *StaticSitesClient) getBuildDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientGetBuildDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildDatabaseConnectionHandleResponse handles the GetBuildDatabaseConnection response. +func (client *StaticSitesClient) getBuildDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientGetBuildDatabaseConnectionResponse, error) { + result := StaticSitesClientGetBuildDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientGetBuildDatabaseConnectionResponse{}, err + } + return result, nil +} + +// GetBuildDatabaseConnectionWithDetails - Returns details of a database connection for a static site build by name +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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. +// - options - StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnectionWithDetails +// method. +func (client *StaticSitesClient) GetBuildDatabaseConnectionWithDetails(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions) (StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse, error) { + var err error + const operationName = "StaticSitesClient.GetBuildDatabaseConnectionWithDetails" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBuildDatabaseConnectionWithDetailsCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, options) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, err + } + resp, err := client.getBuildDatabaseConnectionWithDetailsHandleResponse(httpResp) + return resp, err +} + +// getBuildDatabaseConnectionWithDetailsCreateRequest creates the GetBuildDatabaseConnectionWithDetails request. +func (client *StaticSitesClient) getBuildDatabaseConnectionWithDetailsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}/show" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildDatabaseConnectionWithDetailsHandleResponse handles the GetBuildDatabaseConnectionWithDetails response. +func (client *StaticSitesClient) getBuildDatabaseConnectionWithDetailsHandleResponse(resp *http.Response) (StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse, error) { + result := StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, err + } + return result, nil +} + +// NewGetBuildDatabaseConnectionsPager - Returns overviews of database connections for a static site build +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - environmentName - The stage site identifier. +// - options - StaticSitesClientGetBuildDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.NewGetBuildDatabaseConnectionsPager +// method. +func (client *StaticSitesClient) NewGetBuildDatabaseConnectionsPager(resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetBuildDatabaseConnectionsOptions) *runtime.Pager[StaticSitesClientGetBuildDatabaseConnectionsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetBuildDatabaseConnectionsResponse]{ + More: func(page StaticSitesClientGetBuildDatabaseConnectionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetBuildDatabaseConnectionsResponse) (StaticSitesClientGetBuildDatabaseConnectionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetBuildDatabaseConnectionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getBuildDatabaseConnectionsCreateRequest(ctx, resourceGroupName, name, environmentName, options) + }, nil) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionsResponse{}, err + } + return client.getBuildDatabaseConnectionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getBuildDatabaseConnectionsCreateRequest creates the GetBuildDatabaseConnections request. +func (client *StaticSitesClient) getBuildDatabaseConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetBuildDatabaseConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildDatabaseConnectionsHandleResponse handles the GetBuildDatabaseConnections response. +func (client *StaticSitesClient) getBuildDatabaseConnectionsHandleResponse(resp *http.Response) (StaticSitesClientGetBuildDatabaseConnectionsResponse, error) { + result := StaticSitesClientGetBuildDatabaseConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnectionCollection); err != nil { + return StaticSitesClientGetBuildDatabaseConnectionsResponse{}, err + } + return result, nil +} + +// NewGetBuildDatabaseConnectionsWithDetailsPager - Returns details of database connections for a static site build +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - environmentName - The stage site identifier. +// - options - StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager +// method. +func (client *StaticSitesClient) NewGetBuildDatabaseConnectionsWithDetailsPager(resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions) *runtime.Pager[StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse]{ + More: func(page StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse) (StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getBuildDatabaseConnectionsWithDetailsCreateRequest(ctx, resourceGroupName, name, environmentName, options) + }, nil) + if err != nil { + return StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{}, err + } + return client.getBuildDatabaseConnectionsWithDetailsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getBuildDatabaseConnectionsWithDetailsCreateRequest creates the GetBuildDatabaseConnectionsWithDetails request. +func (client *StaticSitesClient) getBuildDatabaseConnectionsWithDetailsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/showDatabaseConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBuildDatabaseConnectionsWithDetailsHandleResponse handles the GetBuildDatabaseConnectionsWithDetails response. +func (client *StaticSitesClient) getBuildDatabaseConnectionsWithDetailsHandleResponse(resp *http.Response) (StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse, error) { + result := StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnectionCollection); err != nil { + return StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{}, err + } + return result, nil +} + +// GetDatabaseConnection - Returns overview of a database connection for a static site by name +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - databaseConnectionName - Name of the database connection. +// - options - StaticSitesClientGetDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnection +// method. +func (client *StaticSitesClient) GetDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientGetDatabaseConnectionOptions) (StaticSitesClientGetDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.GetDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, options) + if err != nil { + return StaticSitesClientGetDatabaseConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetDatabaseConnectionResponse{}, err + } + resp, err := client.getDatabaseConnectionHandleResponse(httpResp) + return resp, err +} + +// getDatabaseConnectionCreateRequest creates the GetDatabaseConnection request. +func (client *StaticSitesClient) getDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientGetDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDatabaseConnectionHandleResponse handles the GetDatabaseConnection response. +func (client *StaticSitesClient) getDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientGetDatabaseConnectionResponse, error) { + result := StaticSitesClientGetDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientGetDatabaseConnectionResponse{}, err + } + return result, nil +} + +// GetDatabaseConnectionWithDetails - Returns details of a database connection for a static site by name +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - databaseConnectionName - Name of the database connection. +// - options - StaticSitesClientGetDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnectionWithDetails +// method. +func (client *StaticSitesClient) GetDatabaseConnectionWithDetails(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientGetDatabaseConnectionWithDetailsOptions) (StaticSitesClientGetDatabaseConnectionWithDetailsResponse, error) { + var err error + const operationName = "StaticSitesClient.GetDatabaseConnectionWithDetails" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDatabaseConnectionWithDetailsCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, options) + if err != nil { + return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, err + } + resp, err := client.getDatabaseConnectionWithDetailsHandleResponse(httpResp) + return resp, err +} + +// getDatabaseConnectionWithDetailsCreateRequest creates the GetDatabaseConnectionWithDetails request. +func (client *StaticSitesClient) getDatabaseConnectionWithDetailsCreateRequest(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientGetDatabaseConnectionWithDetailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}/show" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDatabaseConnectionWithDetailsHandleResponse handles the GetDatabaseConnectionWithDetails response. +func (client *StaticSitesClient) getDatabaseConnectionWithDetailsHandleResponse(resp *http.Response) (StaticSitesClientGetDatabaseConnectionWithDetailsResponse, error) { + result := StaticSitesClientGetDatabaseConnectionWithDetailsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, err + } + return result, nil +} + +// NewGetDatabaseConnectionsPager - Returns overviews of database connections for a static site +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - options - StaticSitesClientGetDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.NewGetDatabaseConnectionsPager +// method. +func (client *StaticSitesClient) NewGetDatabaseConnectionsPager(resourceGroupName string, name string, options *StaticSitesClientGetDatabaseConnectionsOptions) *runtime.Pager[StaticSitesClientGetDatabaseConnectionsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetDatabaseConnectionsResponse]{ + More: func(page StaticSitesClientGetDatabaseConnectionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetDatabaseConnectionsResponse) (StaticSitesClientGetDatabaseConnectionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetDatabaseConnectionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getDatabaseConnectionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return StaticSitesClientGetDatabaseConnectionsResponse{}, err + } + return client.getDatabaseConnectionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getDatabaseConnectionsCreateRequest creates the GetDatabaseConnections request. +func (client *StaticSitesClient) getDatabaseConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetDatabaseConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDatabaseConnectionsHandleResponse handles the GetDatabaseConnections response. +func (client *StaticSitesClient) getDatabaseConnectionsHandleResponse(resp *http.Response) (StaticSitesClientGetDatabaseConnectionsResponse, error) { + result := StaticSitesClientGetDatabaseConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnectionCollection); err != nil { + return StaticSitesClientGetDatabaseConnectionsResponse{}, err + } + return result, nil +} + +// NewGetDatabaseConnectionsWithDetailsPager - Returns details of database connections for a static site +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - options - StaticSitesClientGetDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager +// method. +func (client *StaticSitesClient) NewGetDatabaseConnectionsWithDetailsPager(resourceGroupName string, name string, options *StaticSitesClientGetDatabaseConnectionsWithDetailsOptions) *runtime.Pager[StaticSitesClientGetDatabaseConnectionsWithDetailsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetDatabaseConnectionsWithDetailsResponse]{ + More: func(page StaticSitesClientGetDatabaseConnectionsWithDetailsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetDatabaseConnectionsWithDetailsResponse) (StaticSitesClientGetDatabaseConnectionsWithDetailsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getDatabaseConnectionsWithDetailsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{}, err + } + return client.getDatabaseConnectionsWithDetailsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getDatabaseConnectionsWithDetailsCreateRequest creates the GetDatabaseConnectionsWithDetails request. +func (client *StaticSitesClient) getDatabaseConnectionsWithDetailsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetDatabaseConnectionsWithDetailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/showDatabaseConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDatabaseConnectionsWithDetailsHandleResponse handles the GetDatabaseConnectionsWithDetails response. +func (client *StaticSitesClient) getDatabaseConnectionsWithDetailsHandleResponse(resp *http.Response) (StaticSitesClientGetDatabaseConnectionsWithDetailsResponse, error) { + result := StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnectionCollection); err != nil { + return StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{}, err + } + return result, nil +} + +// GetLinkedBackend - Returns the details of a linked backend linked to a static site by name +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - linkedBackendName - Name of the linked backend that should be retrieved +// - options - StaticSitesClientGetLinkedBackendOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackend +// method. +func (client *StaticSitesClient) GetLinkedBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, options *StaticSitesClientGetLinkedBackendOptions) (StaticSitesClientGetLinkedBackendResponse, error) { + var err error + const operationName = "StaticSitesClient.GetLinkedBackend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getLinkedBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, options) + if err != nil { + return StaticSitesClientGetLinkedBackendResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetLinkedBackendResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetLinkedBackendResponse{}, err + } + resp, err := client.getLinkedBackendHandleResponse(httpResp) + return resp, err +} + +// getLinkedBackendCreateRequest creates the GetLinkedBackend request. +func (client *StaticSitesClient) getLinkedBackendCreateRequest(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, options *StaticSitesClientGetLinkedBackendOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLinkedBackendHandleResponse handles the GetLinkedBackend response. +func (client *StaticSitesClient) getLinkedBackendHandleResponse(resp *http.Response) (StaticSitesClientGetLinkedBackendResponse, error) { + result := StaticSitesClientGetLinkedBackendResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteLinkedBackendARMResource); err != nil { + return StaticSitesClientGetLinkedBackendResponse{}, err + } + return result, nil +} + +// GetLinkedBackendForBuild - Returns the details of a linked backend linked to a static site build by name +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - environmentName - The stage site identifier +// - linkedBackendName - Name of the linked backend that should be retrieved +// - options - StaticSitesClientGetLinkedBackendForBuildOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackendForBuild +// method. +func (client *StaticSitesClient) GetLinkedBackendForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, options *StaticSitesClientGetLinkedBackendForBuildOptions) (StaticSitesClientGetLinkedBackendForBuildResponse, error) { + var err error + const operationName = "StaticSitesClient.GetLinkedBackendForBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getLinkedBackendForBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, options) + if err != nil { + return StaticSitesClientGetLinkedBackendForBuildResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetLinkedBackendForBuildResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetLinkedBackendForBuildResponse{}, err + } + resp, err := client.getLinkedBackendForBuildHandleResponse(httpResp) + return resp, err +} + +// getLinkedBackendForBuildCreateRequest creates the GetLinkedBackendForBuild request. +func (client *StaticSitesClient) getLinkedBackendForBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, options *StaticSitesClientGetLinkedBackendForBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLinkedBackendForBuildHandleResponse handles the GetLinkedBackendForBuild response. +func (client *StaticSitesClient) getLinkedBackendForBuildHandleResponse(resp *http.Response) (StaticSitesClientGetLinkedBackendForBuildResponse, error) { + result := StaticSitesClientGetLinkedBackendForBuildResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteLinkedBackendARMResource); err != nil { + return StaticSitesClientGetLinkedBackendForBuildResponse{}, err + } + return result, nil +} + +// NewGetLinkedBackendsPager - Returns details of all backends linked to a static site +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - options - StaticSitesClientGetLinkedBackendsOptions contains the optional parameters for the StaticSitesClient.NewGetLinkedBackendsPager +// method. +func (client *StaticSitesClient) NewGetLinkedBackendsPager(resourceGroupName string, name string, options *StaticSitesClientGetLinkedBackendsOptions) *runtime.Pager[StaticSitesClientGetLinkedBackendsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetLinkedBackendsResponse]{ + More: func(page StaticSitesClientGetLinkedBackendsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetLinkedBackendsResponse) (StaticSitesClientGetLinkedBackendsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetLinkedBackendsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getLinkedBackendsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return StaticSitesClientGetLinkedBackendsResponse{}, err + } + return client.getLinkedBackendsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getLinkedBackendsCreateRequest creates the GetLinkedBackends request. +func (client *StaticSitesClient) getLinkedBackendsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetLinkedBackendsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLinkedBackendsHandleResponse handles the GetLinkedBackends response. +func (client *StaticSitesClient) getLinkedBackendsHandleResponse(resp *http.Response) (StaticSitesClientGetLinkedBackendsResponse, error) { + result := StaticSitesClientGetLinkedBackendsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteLinkedBackendsCollection); err != nil { + return StaticSitesClientGetLinkedBackendsResponse{}, err + } + return result, nil +} + +// NewGetLinkedBackendsForBuildPager - Returns details of all backends linked to a static site build +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - environmentName - The stage site identifier +// - options - StaticSitesClientGetLinkedBackendsForBuildOptions contains the optional parameters for the StaticSitesClient.NewGetLinkedBackendsForBuildPager +// method. +func (client *StaticSitesClient) NewGetLinkedBackendsForBuildPager(resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetLinkedBackendsForBuildOptions) *runtime.Pager[StaticSitesClientGetLinkedBackendsForBuildResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetLinkedBackendsForBuildResponse]{ + More: func(page StaticSitesClientGetLinkedBackendsForBuildResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetLinkedBackendsForBuildResponse) (StaticSitesClientGetLinkedBackendsForBuildResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetLinkedBackendsForBuildPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getLinkedBackendsForBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) + }, nil) + if err != nil { + return StaticSitesClientGetLinkedBackendsForBuildResponse{}, err + } + return client.getLinkedBackendsForBuildHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getLinkedBackendsForBuildCreateRequest creates the GetLinkedBackendsForBuild request. +func (client *StaticSitesClient) getLinkedBackendsForBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetLinkedBackendsForBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLinkedBackendsForBuildHandleResponse handles the GetLinkedBackendsForBuild response. +func (client *StaticSitesClient) getLinkedBackendsForBuildHandleResponse(resp *http.Response) (StaticSitesClientGetLinkedBackendsForBuildResponse, error) { + result := StaticSitesClientGetLinkedBackendsForBuildResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteLinkedBackendsCollection); err != nil { + return StaticSitesClientGetLinkedBackendsForBuildResponse{}, err + } + return result, nil +} + +// GetPrivateEndpointConnection - Description for Gets a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - privateEndpointConnectionName - Name of the private endpoint connection. +// - options - StaticSitesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnection +// method. +func (client *StaticSitesClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientGetPrivateEndpointConnectionOptions) (StaticSitesClientGetPrivateEndpointConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.GetPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) + if err != nil { + return StaticSitesClientGetPrivateEndpointConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetPrivateEndpointConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetPrivateEndpointConnectionResponse{}, err + } + resp, err := client.getPrivateEndpointConnectionHandleResponse(httpResp) + return resp, err +} + +// getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. +func (client *StaticSitesClient) getPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientGetPrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateEndpointConnectionHandleResponse handles the GetPrivateEndpointConnection response. +func (client *StaticSitesClient) getPrivateEndpointConnectionHandleResponse(resp *http.Response) (StaticSitesClientGetPrivateEndpointConnectionResponse, error) { + result := StaticSitesClientGetPrivateEndpointConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RemotePrivateEndpointConnectionARMResource); err != nil { + return StaticSitesClientGetPrivateEndpointConnectionResponse{}, err + } + return result, nil +} + +// NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoint connections associated with +// a static site +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the StaticSitesClient.NewGetPrivateEndpointConnectionListPager +// method. +func (client *StaticSitesClient) NewGetPrivateEndpointConnectionListPager(resourceGroupName string, name string, options *StaticSitesClientGetPrivateEndpointConnectionListOptions) *runtime.Pager[StaticSitesClientGetPrivateEndpointConnectionListResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetPrivateEndpointConnectionListResponse]{ + More: func(page StaticSitesClientGetPrivateEndpointConnectionListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetPrivateEndpointConnectionListResponse) (StaticSitesClientGetPrivateEndpointConnectionListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetPrivateEndpointConnectionListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return StaticSitesClientGetPrivateEndpointConnectionListResponse{}, err + } + return client.getPrivateEndpointConnectionListHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getPrivateEndpointConnectionListCreateRequest creates the GetPrivateEndpointConnectionList request. +func (client *StaticSitesClient) getPrivateEndpointConnectionListCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetPrivateEndpointConnectionListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateEndpointConnectionListHandleResponse handles the GetPrivateEndpointConnectionList response. +func (client *StaticSitesClient) getPrivateEndpointConnectionListHandleResponse(resp *http.Response) (StaticSitesClientGetPrivateEndpointConnectionListResponse, error) { + result := StaticSitesClientGetPrivateEndpointConnectionListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionCollection); err != nil { + return StaticSitesClientGetPrivateEndpointConnectionListResponse{}, err + } + return result, nil +} + +// GetPrivateLinkResources - Description for Gets the private link resources +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - options - StaticSitesClientGetPrivateLinkResourcesOptions contains the optional parameters for the StaticSitesClient.GetPrivateLinkResources +// method. +func (client *StaticSitesClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetPrivateLinkResourcesOptions) (StaticSitesClientGetPrivateLinkResourcesResponse, error) { + var err error + const operationName = "StaticSitesClient.GetPrivateLinkResources" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return StaticSitesClientGetPrivateLinkResourcesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetPrivateLinkResourcesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetPrivateLinkResourcesResponse{}, err + } + resp, err := client.getPrivateLinkResourcesHandleResponse(httpResp) + return resp, err +} + +// getPrivateLinkResourcesCreateRequest creates the GetPrivateLinkResources request. +func (client *StaticSitesClient) getPrivateLinkResourcesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetPrivateLinkResourcesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateLinkResourcesHandleResponse handles the GetPrivateLinkResources response. +func (client *StaticSitesClient) getPrivateLinkResourcesHandleResponse(resp *http.Response) (StaticSitesClientGetPrivateLinkResourcesResponse, error) { + result := StaticSitesClientGetPrivateLinkResourcesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourcesWrapper); err != nil { + return StaticSitesClientGetPrivateLinkResourcesResponse{}, err + } + return result, nil +} + +// GetStaticSite - Description for Gets the details of a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientGetStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetStaticSite +// method. +func (client *StaticSitesClient) GetStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetStaticSiteOptions) (StaticSitesClientGetStaticSiteResponse, error) { + var err error + const operationName = "StaticSitesClient.GetStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getStaticSiteCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return StaticSitesClientGetStaticSiteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetStaticSiteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetStaticSiteResponse{}, err + } + resp, err := client.getStaticSiteHandleResponse(httpResp) + return resp, err +} + +// getStaticSiteCreateRequest creates the GetStaticSite request. +func (client *StaticSitesClient) getStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getStaticSiteHandleResponse handles the GetStaticSite response. +func (client *StaticSitesClient) getStaticSiteHandleResponse(resp *http.Response) (StaticSitesClientGetStaticSiteResponse, error) { + result := StaticSitesClientGetStaticSiteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteARMResource); err != nil { + return StaticSitesClientGetStaticSiteResponse{}, err + } + return result, nil +} + +// GetStaticSiteBuild - Description for Gets the details of a static site build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - environmentName - The stage site identifier. +// - options - StaticSitesClientGetStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteBuild +// method. +func (client *StaticSitesClient) GetStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetStaticSiteBuildOptions) (StaticSitesClientGetStaticSiteBuildResponse, error) { + var err error + const operationName = "StaticSitesClient.GetStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) + if err != nil { + return StaticSitesClientGetStaticSiteBuildResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetStaticSiteBuildResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetStaticSiteBuildResponse{}, err + } + resp, err := client.getStaticSiteBuildHandleResponse(httpResp) + return resp, err +} + +// getStaticSiteBuildCreateRequest creates the GetStaticSiteBuild request. +func (client *StaticSitesClient) getStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetStaticSiteBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getStaticSiteBuildHandleResponse handles the GetStaticSiteBuild response. +func (client *StaticSitesClient) getStaticSiteBuildHandleResponse(resp *http.Response) (StaticSitesClientGetStaticSiteBuildResponse, error) { + result := StaticSitesClientGetStaticSiteBuildResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteBuildARMResource); err != nil { + return StaticSitesClientGetStaticSiteBuildResponse{}, err + } + return result, nil +} + +// NewGetStaticSiteBuildsPager - Description for Gets all static site builds for a particular static site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientGetStaticSiteBuildsOptions contains the optional parameters for the StaticSitesClient.NewGetStaticSiteBuildsPager +// method. +func (client *StaticSitesClient) NewGetStaticSiteBuildsPager(resourceGroupName string, name string, options *StaticSitesClientGetStaticSiteBuildsOptions) *runtime.Pager[StaticSitesClientGetStaticSiteBuildsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetStaticSiteBuildsResponse]{ + More: func(page StaticSitesClientGetStaticSiteBuildsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetStaticSiteBuildsResponse) (StaticSitesClientGetStaticSiteBuildsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetStaticSiteBuildsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getStaticSiteBuildsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return StaticSitesClientGetStaticSiteBuildsResponse{}, err + } + return client.getStaticSiteBuildsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getStaticSiteBuildsCreateRequest creates the GetStaticSiteBuilds request. +func (client *StaticSitesClient) getStaticSiteBuildsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetStaticSiteBuildsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getStaticSiteBuildsHandleResponse handles the GetStaticSiteBuilds response. +func (client *StaticSitesClient) getStaticSiteBuildsHandleResponse(resp *http.Response) (StaticSitesClientGetStaticSiteBuildsResponse, error) { + result := StaticSitesClientGetStaticSiteBuildsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteBuildCollection); err != nil { + return StaticSitesClientGetStaticSiteBuildsResponse{}, err + } + return result, nil +} + +// GetStaticSiteCustomDomain - Description for Gets an existing custom domain for a particular static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site resource to search in. +// - domainName - The custom domain name. +// - options - StaticSitesClientGetStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteCustomDomain +// method. +func (client *StaticSitesClient) GetStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientGetStaticSiteCustomDomainOptions) (StaticSitesClientGetStaticSiteCustomDomainResponse, error) { + var err error + const operationName = "StaticSitesClient.GetStaticSiteCustomDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, options) + if err != nil { + return StaticSitesClientGetStaticSiteCustomDomainResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetStaticSiteCustomDomainResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetStaticSiteCustomDomainResponse{}, err + } + resp, err := client.getStaticSiteCustomDomainHandleResponse(httpResp) + return resp, err +} + +// getStaticSiteCustomDomainCreateRequest creates the GetStaticSiteCustomDomain request. +func (client *StaticSitesClient) getStaticSiteCustomDomainCreateRequest(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientGetStaticSiteCustomDomainOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getStaticSiteCustomDomainHandleResponse handles the GetStaticSiteCustomDomain response. +func (client *StaticSitesClient) getStaticSiteCustomDomainHandleResponse(resp *http.Response) (StaticSitesClientGetStaticSiteCustomDomainResponse, error) { + result := StaticSitesClientGetStaticSiteCustomDomainResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteCustomDomainOverviewARMResource); err != nil { + return StaticSitesClientGetStaticSiteCustomDomainResponse{}, err + } + return result, nil +} + +// NewGetStaticSitesByResourceGroupPager - Description for Gets all static sites in the specified resource group. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - options - StaticSitesClientGetStaticSitesByResourceGroupOptions contains the optional parameters for the StaticSitesClient.NewGetStaticSitesByResourceGroupPager +// method. +func (client *StaticSitesClient) NewGetStaticSitesByResourceGroupPager(resourceGroupName string, options *StaticSitesClientGetStaticSitesByResourceGroupOptions) *runtime.Pager[StaticSitesClientGetStaticSitesByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetStaticSitesByResourceGroupResponse]{ + More: func(page StaticSitesClientGetStaticSitesByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetStaticSitesByResourceGroupResponse) (StaticSitesClientGetStaticSitesByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetStaticSitesByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getStaticSitesByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return StaticSitesClientGetStaticSitesByResourceGroupResponse{}, err + } + return client.getStaticSitesByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getStaticSitesByResourceGroupCreateRequest creates the GetStaticSitesByResourceGroup request. +func (client *StaticSitesClient) getStaticSitesByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *StaticSitesClientGetStaticSitesByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getStaticSitesByResourceGroupHandleResponse handles the GetStaticSitesByResourceGroup response. +func (client *StaticSitesClient) getStaticSitesByResourceGroupHandleResponse(resp *http.Response) (StaticSitesClientGetStaticSitesByResourceGroupResponse, error) { + result := StaticSitesClientGetStaticSitesByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteCollection); err != nil { + return StaticSitesClientGetStaticSitesByResourceGroupResponse{}, err + } + return result, nil +} + +// GetUserProvidedFunctionAppForStaticSite - Description for Gets the details of the user provided function app registered +// with a static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - functionAppName - Name of the function app registered with the static site. +// - options - StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSite +// method. +func (client *StaticSitesClient) GetUserProvidedFunctionAppForStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions) (StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse, error) { + var err error + const operationName = "StaticSitesClient.GetUserProvidedFunctionAppForStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getUserProvidedFunctionAppForStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, options) + if err != nil { + return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, err + } + resp, err := client.getUserProvidedFunctionAppForStaticSiteHandleResponse(httpResp) + return resp, err +} + +// getUserProvidedFunctionAppForStaticSiteCreateRequest creates the GetUserProvidedFunctionAppForStaticSite request. +func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionAppName == "" { + return nil, errors.New("parameter functionAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getUserProvidedFunctionAppForStaticSiteHandleResponse handles the GetUserProvidedFunctionAppForStaticSite response. +func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteHandleResponse(resp *http.Response) (StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse, error) { + result := StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserProvidedFunctionAppARMResource); err != nil { + return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, err + } + return result, nil +} + +// GetUserProvidedFunctionAppForStaticSiteBuild - Description for Gets the details of the user provided function app registered +// with a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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. +// - options - StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions contains the optional parameters for the +// StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild method. +func (client *StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions) (StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse, error) { + var err error + const operationName = "StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getUserProvidedFunctionAppForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, options) + if err != nil { + return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, err + } + resp, err := client.getUserProvidedFunctionAppForStaticSiteBuildHandleResponse(httpResp) + return resp, err +} + +// getUserProvidedFunctionAppForStaticSiteBuildCreateRequest creates the GetUserProvidedFunctionAppForStaticSiteBuild request. +func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if functionAppName == "" { + return nil, errors.New("parameter functionAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getUserProvidedFunctionAppForStaticSiteBuildHandleResponse handles the GetUserProvidedFunctionAppForStaticSiteBuild response. +func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteBuildHandleResponse(resp *http.Response) (StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse, error) { + result := StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserProvidedFunctionAppARMResource); err != nil { + return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, err + } + return result, nil +} + +// NewGetUserProvidedFunctionAppsForStaticSitePager - Description for Gets the details of the user provided function apps +// registered with a static site +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions contains the optional parameters for the StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager +// method. +func (client *StaticSitesClient) NewGetUserProvidedFunctionAppsForStaticSitePager(resourceGroupName string, name string, options *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions) *runtime.Pager[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse]{ + More: func(page StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse) (StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getUserProvidedFunctionAppsForStaticSiteCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{}, err + } + return client.getUserProvidedFunctionAppsForStaticSiteHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getUserProvidedFunctionAppsForStaticSiteCreateRequest creates the GetUserProvidedFunctionAppsForStaticSite request. +func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getUserProvidedFunctionAppsForStaticSiteHandleResponse handles the GetUserProvidedFunctionAppsForStaticSite response. +func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteHandleResponse(resp *http.Response) (StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse, error) { + result := StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserProvidedFunctionAppsCollection); err != nil { + return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{}, err + } + return result, nil +} + +// NewGetUserProvidedFunctionAppsForStaticSiteBuildPager - Description for Gets the details of the user provided function +// apps registered with a static site build +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - environmentName - The stage site identifier. +// - options - StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions contains the optional parameters for the +// StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager method. +func (client *StaticSitesClient) NewGetUserProvidedFunctionAppsForStaticSiteBuildPager(resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions) *runtime.Pager[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse]{ + More: func(page StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse) (StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getUserProvidedFunctionAppsForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) + }, nil) + if err != nil { + return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{}, err + } + return client.getUserProvidedFunctionAppsForStaticSiteBuildHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getUserProvidedFunctionAppsForStaticSiteBuildCreateRequest creates the GetUserProvidedFunctionAppsForStaticSiteBuild request. +func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getUserProvidedFunctionAppsForStaticSiteBuildHandleResponse handles the GetUserProvidedFunctionAppsForStaticSiteBuild response. +func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildHandleResponse(resp *http.Response) (StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse, error) { + result := StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserProvidedFunctionAppsCollection); err != nil { + return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{}, err + } + return result, nil +} + +// BeginLinkBackend - Link backend to a static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - linkedBackendName - Name of the backend to link to the static site +// - staticSiteLinkedBackendEnvelope - A JSON representation of the linked backend request properties +// - options - StaticSitesClientBeginLinkBackendOptions contains the optional parameters for the StaticSitesClient.BeginLinkBackend +// method. +func (client *StaticSitesClient) BeginLinkBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendOptions) (*runtime.Poller[StaticSitesClientLinkBackendResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.linkBackend(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientLinkBackendResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientLinkBackendResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// LinkBackend - Link backend to a static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) linkBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginLinkBackend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.linkBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// linkBackendCreateRequest creates the LinkBackend request. +func (client *StaticSitesClient) linkBackendCreateRequest(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginLinkBackendToBuild - Link backend to a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - environmentName - The stage site identifier +// - linkedBackendName - Name of the backend to link to the static site +// - staticSiteLinkedBackendEnvelope - A JSON representation of the linked backend request properties +// - options - StaticSitesClientBeginLinkBackendToBuildOptions contains the optional parameters for the StaticSitesClient.BeginLinkBackendToBuild +// method. +func (client *StaticSitesClient) BeginLinkBackendToBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendToBuildOptions) (*runtime.Poller[StaticSitesClientLinkBackendToBuildResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.linkBackendToBuild(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientLinkBackendToBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientLinkBackendToBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// LinkBackendToBuild - Link backend to a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) linkBackendToBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendToBuildOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginLinkBackendToBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.linkBackendToBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// linkBackendToBuildCreateRequest creates the LinkBackendToBuild request. +func (client *StaticSitesClient) linkBackendToBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendToBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// NewListPager - Description for Get all Static Sites for a subscription. +// +// Generated from API version 2024-04-01 +// - options - StaticSitesClientListOptions contains the optional parameters for the StaticSitesClient.NewListPager method. +func (client *StaticSitesClient) NewListPager(options *StaticSitesClientListOptions) *runtime.Pager[StaticSitesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListResponse]{ + More: func(page StaticSitesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientListResponse) (StaticSitesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return StaticSitesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *StaticSitesClient) listCreateRequest(ctx context.Context, options *StaticSitesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *StaticSitesClient) listHandleResponse(resp *http.Response) (StaticSitesClientListResponse, error) { + result := StaticSitesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteCollection); err != nil { + return StaticSitesClientListResponse{}, err + } + return result, nil +} + +// NewListBasicAuthPager - Description for Gets the basic auth properties for a static site as a collection. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientListBasicAuthOptions contains the optional parameters for the StaticSitesClient.NewListBasicAuthPager +// method. +func (client *StaticSitesClient) NewListBasicAuthPager(resourceGroupName string, name string, options *StaticSitesClientListBasicAuthOptions) *runtime.Pager[StaticSitesClientListBasicAuthResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListBasicAuthResponse]{ + More: func(page StaticSitesClientListBasicAuthResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientListBasicAuthResponse) (StaticSitesClientListBasicAuthResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListBasicAuthPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBasicAuthCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return StaticSitesClientListBasicAuthResponse{}, err + } + return client.listBasicAuthHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBasicAuthCreateRequest creates the ListBasicAuth request. +func (client *StaticSitesClient) listBasicAuthCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListBasicAuthOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBasicAuthHandleResponse handles the ListBasicAuth response. +func (client *StaticSitesClient) listBasicAuthHandleResponse(resp *http.Response) (StaticSitesClientListBasicAuthResponse, error) { + result := StaticSitesClientListBasicAuthResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteBasicAuthPropertiesCollection); err != nil { + return StaticSitesClientListBasicAuthResponse{}, err + } + return result, nil +} + +// ListStaticSiteAppSettings - Description for Gets the application settings of a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientListStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteAppSettings +// method. +func (client *StaticSitesClient) ListStaticSiteAppSettings(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteAppSettingsOptions) (StaticSitesClientListStaticSiteAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listStaticSiteAppSettingsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return StaticSitesClientListStaticSiteAppSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientListStaticSiteAppSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteAppSettingsResponse{}, err + } + resp, err := client.listStaticSiteAppSettingsHandleResponse(httpResp) + return resp, err +} + +// listStaticSiteAppSettingsCreateRequest creates the ListStaticSiteAppSettings request. +func (client *StaticSitesClient) listStaticSiteAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteAppSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listStaticSiteAppSettingsHandleResponse handles the ListStaticSiteAppSettings response. +func (client *StaticSitesClient) listStaticSiteAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteAppSettingsResponse, error) { + result := StaticSitesClientListStaticSiteAppSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return StaticSitesClientListStaticSiteAppSettingsResponse{}, err + } + return result, nil +} + +// ListStaticSiteBuildAppSettings - Description for Gets the application settings of a static site build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - environmentName - The stage site identifier. +// - options - StaticSitesClientListStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildAppSettings +// method. +func (client *StaticSitesClient) ListStaticSiteBuildAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildAppSettingsOptions) (StaticSitesClientListStaticSiteBuildAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteBuildAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listStaticSiteBuildAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, options) + if err != nil { + return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, err + } + resp, err := client.listStaticSiteBuildAppSettingsHandleResponse(httpResp) + return resp, err +} + +// listStaticSiteBuildAppSettingsCreateRequest creates the ListStaticSiteBuildAppSettings request. +func (client *StaticSitesClient) listStaticSiteBuildAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildAppSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listStaticSiteBuildAppSettingsHandleResponse handles the ListStaticSiteBuildAppSettings response. +func (client *StaticSitesClient) listStaticSiteBuildAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteBuildAppSettingsResponse, error) { + result := StaticSitesClientListStaticSiteBuildAppSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, err + } + return result, nil +} + +// ListStaticSiteBuildFunctionAppSettings - Description for Gets the application settings of a static site build. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - environmentName - The stage site identifier. +// - options - StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildFunctionAppSettings +// method. +func (client *StaticSitesClient) ListStaticSiteBuildFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions) (StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteBuildFunctionAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listStaticSiteBuildFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, options) + if err != nil { + return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, err + } + resp, err := client.listStaticSiteBuildFunctionAppSettingsHandleResponse(httpResp) + return resp, err +} + +// listStaticSiteBuildFunctionAppSettingsCreateRequest creates the ListStaticSiteBuildFunctionAppSettings request. +func (client *StaticSitesClient) listStaticSiteBuildFunctionAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listStaticSiteBuildFunctionAppSettingsHandleResponse handles the ListStaticSiteBuildFunctionAppSettings response. +func (client *StaticSitesClient) listStaticSiteBuildFunctionAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse, error) { + result := StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, err + } + return result, nil +} + +// NewListStaticSiteBuildFunctionsPager - Description for Gets the functions of a particular static site build. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - environmentName - The stage site identifier. +// - options - StaticSitesClientListStaticSiteBuildFunctionsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteBuildFunctionsPager +// method. +func (client *StaticSitesClient) NewListStaticSiteBuildFunctionsPager(resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildFunctionsOptions) *runtime.Pager[StaticSitesClientListStaticSiteBuildFunctionsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListStaticSiteBuildFunctionsResponse]{ + More: func(page StaticSitesClientListStaticSiteBuildFunctionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteBuildFunctionsResponse) (StaticSitesClientListStaticSiteBuildFunctionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListStaticSiteBuildFunctionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listStaticSiteBuildFunctionsCreateRequest(ctx, resourceGroupName, name, environmentName, options) + }, nil) + if err != nil { + return StaticSitesClientListStaticSiteBuildFunctionsResponse{}, err + } + return client.listStaticSiteBuildFunctionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listStaticSiteBuildFunctionsCreateRequest creates the ListStaticSiteBuildFunctions request. +func (client *StaticSitesClient) listStaticSiteBuildFunctionsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildFunctionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listStaticSiteBuildFunctionsHandleResponse handles the ListStaticSiteBuildFunctions response. +func (client *StaticSitesClient) listStaticSiteBuildFunctionsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteBuildFunctionsResponse, error) { + result := StaticSitesClientListStaticSiteBuildFunctionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteFunctionOverviewCollection); err != nil { + return StaticSitesClientListStaticSiteBuildFunctionsResponse{}, err + } + return result, nil +} + +// ListStaticSiteConfiguredRoles - Description for Lists the roles configured for the static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientListStaticSiteConfiguredRolesOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteConfiguredRoles +// method. +func (client *StaticSitesClient) ListStaticSiteConfiguredRoles(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteConfiguredRolesOptions) (StaticSitesClientListStaticSiteConfiguredRolesResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteConfiguredRoles" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listStaticSiteConfiguredRolesCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, err + } + resp, err := client.listStaticSiteConfiguredRolesHandleResponse(httpResp) + return resp, err +} + +// listStaticSiteConfiguredRolesCreateRequest creates the ListStaticSiteConfiguredRoles request. +func (client *StaticSitesClient) listStaticSiteConfiguredRolesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteConfiguredRolesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listStaticSiteConfiguredRolesHandleResponse handles the ListStaticSiteConfiguredRoles response. +func (client *StaticSitesClient) listStaticSiteConfiguredRolesHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteConfiguredRolesResponse, error) { + result := StaticSitesClientListStaticSiteConfiguredRolesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringList); err != nil { + return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, err + } + return result, nil +} + +// NewListStaticSiteCustomDomainsPager - Description for Gets all static site custom domains for a particular static site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site resource to search in. +// - options - StaticSitesClientListStaticSiteCustomDomainsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteCustomDomainsPager +// method. +func (client *StaticSitesClient) NewListStaticSiteCustomDomainsPager(resourceGroupName string, name string, options *StaticSitesClientListStaticSiteCustomDomainsOptions) *runtime.Pager[StaticSitesClientListStaticSiteCustomDomainsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListStaticSiteCustomDomainsResponse]{ + More: func(page StaticSitesClientListStaticSiteCustomDomainsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteCustomDomainsResponse) (StaticSitesClientListStaticSiteCustomDomainsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListStaticSiteCustomDomainsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listStaticSiteCustomDomainsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return StaticSitesClientListStaticSiteCustomDomainsResponse{}, err + } + return client.listStaticSiteCustomDomainsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listStaticSiteCustomDomainsCreateRequest creates the ListStaticSiteCustomDomains request. +func (client *StaticSitesClient) listStaticSiteCustomDomainsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteCustomDomainsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listStaticSiteCustomDomainsHandleResponse handles the ListStaticSiteCustomDomains response. +func (client *StaticSitesClient) listStaticSiteCustomDomainsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteCustomDomainsResponse, error) { + result := StaticSitesClientListStaticSiteCustomDomainsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteCustomDomainOverviewCollection); err != nil { + return StaticSitesClientListStaticSiteCustomDomainsResponse{}, err + } + return result, nil +} + +// ListStaticSiteFunctionAppSettings - Description for Gets the application settings of a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientListStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctionAppSettings +// method. +func (client *StaticSitesClient) ListStaticSiteFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteFunctionAppSettingsOptions) (StaticSitesClientListStaticSiteFunctionAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteFunctionAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listStaticSiteFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, err + } + resp, err := client.listStaticSiteFunctionAppSettingsHandleResponse(httpResp) + return resp, err +} + +// listStaticSiteFunctionAppSettingsCreateRequest creates the ListStaticSiteFunctionAppSettings request. +func (client *StaticSitesClient) listStaticSiteFunctionAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteFunctionAppSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listStaticSiteFunctionAppSettingsHandleResponse handles the ListStaticSiteFunctionAppSettings response. +func (client *StaticSitesClient) listStaticSiteFunctionAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteFunctionAppSettingsResponse, error) { + result := StaticSitesClientListStaticSiteFunctionAppSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, err + } + return result, nil +} + +// NewListStaticSiteFunctionsPager - Description for Gets the functions of a static site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientListStaticSiteFunctionsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteFunctionsPager +// method. +func (client *StaticSitesClient) NewListStaticSiteFunctionsPager(resourceGroupName string, name string, options *StaticSitesClientListStaticSiteFunctionsOptions) *runtime.Pager[StaticSitesClientListStaticSiteFunctionsResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListStaticSiteFunctionsResponse]{ + More: func(page StaticSitesClientListStaticSiteFunctionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteFunctionsResponse) (StaticSitesClientListStaticSiteFunctionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListStaticSiteFunctionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listStaticSiteFunctionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return StaticSitesClientListStaticSiteFunctionsResponse{}, err + } + return client.listStaticSiteFunctionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listStaticSiteFunctionsCreateRequest creates the ListStaticSiteFunctions request. +func (client *StaticSitesClient) listStaticSiteFunctionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteFunctionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listStaticSiteFunctionsHandleResponse handles the ListStaticSiteFunctions response. +func (client *StaticSitesClient) listStaticSiteFunctionsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteFunctionsResponse, error) { + result := StaticSitesClientListStaticSiteFunctionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteFunctionOverviewCollection); err != nil { + return StaticSitesClientListStaticSiteFunctionsResponse{}, err + } + return result, nil +} + +// ListStaticSiteSecrets - Description for Lists the secrets for an existing static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientListStaticSiteSecretsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteSecrets +// method. +func (client *StaticSitesClient) ListStaticSiteSecrets(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteSecretsOptions) (StaticSitesClientListStaticSiteSecretsResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listStaticSiteSecretsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return StaticSitesClientListStaticSiteSecretsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientListStaticSiteSecretsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteSecretsResponse{}, err + } + resp, err := client.listStaticSiteSecretsHandleResponse(httpResp) + return resp, err +} + +// listStaticSiteSecretsCreateRequest creates the ListStaticSiteSecrets request. +func (client *StaticSitesClient) listStaticSiteSecretsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteSecretsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listStaticSiteSecretsHandleResponse handles the ListStaticSiteSecrets response. +func (client *StaticSitesClient) listStaticSiteSecretsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteSecretsResponse, error) { + result := StaticSitesClientListStaticSiteSecretsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return StaticSitesClientListStaticSiteSecretsResponse{}, err + } + return result, nil +} + +// NewListStaticSiteUsersPager - Description for Gets the list of users of a static site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - authprovider - The auth provider for the users. +// - options - StaticSitesClientListStaticSiteUsersOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteUsersPager +// method. +func (client *StaticSitesClient) NewListStaticSiteUsersPager(resourceGroupName string, name string, authprovider string, options *StaticSitesClientListStaticSiteUsersOptions) *runtime.Pager[StaticSitesClientListStaticSiteUsersResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListStaticSiteUsersResponse]{ + More: func(page StaticSitesClientListStaticSiteUsersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteUsersResponse) (StaticSitesClientListStaticSiteUsersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListStaticSiteUsersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listStaticSiteUsersCreateRequest(ctx, resourceGroupName, name, authprovider, options) + }, nil) + if err != nil { + return StaticSitesClientListStaticSiteUsersResponse{}, err + } + return client.listStaticSiteUsersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listStaticSiteUsersCreateRequest creates the ListStaticSiteUsers request. +func (client *StaticSitesClient) listStaticSiteUsersCreateRequest(ctx context.Context, resourceGroupName string, name string, authprovider string, options *StaticSitesClientListStaticSiteUsersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if authprovider == "" { + return nil, errors.New("parameter authprovider cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authprovider}", url.PathEscape(authprovider)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listStaticSiteUsersHandleResponse handles the ListStaticSiteUsers response. +func (client *StaticSitesClient) listStaticSiteUsersHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteUsersResponse, error) { + result := StaticSitesClientListStaticSiteUsersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserCollection); err != nil { + return StaticSitesClientListStaticSiteUsersResponse{}, err + } + return result, nil +} + +// PreviewWorkflow - Description for Generates a preview workflow file for the static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - location - Location where you plan to create the static site. +// - staticSitesWorkflowPreviewRequest - A JSON representation of the StaticSitesWorkflowPreviewRequest properties. See example. +// - options - StaticSitesClientPreviewWorkflowOptions contains the optional parameters for the StaticSitesClient.PreviewWorkflow +// method. +func (client *StaticSitesClient) PreviewWorkflow(ctx context.Context, location string, staticSitesWorkflowPreviewRequest StaticSitesWorkflowPreviewRequest, options *StaticSitesClientPreviewWorkflowOptions) (StaticSitesClientPreviewWorkflowResponse, error) { + var err error + const operationName = "StaticSitesClient.PreviewWorkflow" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.previewWorkflowCreateRequest(ctx, location, staticSitesWorkflowPreviewRequest, options) + if err != nil { + return StaticSitesClientPreviewWorkflowResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientPreviewWorkflowResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientPreviewWorkflowResponse{}, err + } + resp, err := client.previewWorkflowHandleResponse(httpResp) + return resp, err +} + +// previewWorkflowCreateRequest creates the PreviewWorkflow request. +func (client *StaticSitesClient) previewWorkflowCreateRequest(ctx context.Context, location string, staticSitesWorkflowPreviewRequest StaticSitesWorkflowPreviewRequest, options *StaticSitesClientPreviewWorkflowOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSitesWorkflowPreviewRequest); err != nil { + return nil, err + } + return req, nil +} + +// previewWorkflowHandleResponse handles the PreviewWorkflow response. +func (client *StaticSitesClient) previewWorkflowHandleResponse(resp *http.Response) (StaticSitesClientPreviewWorkflowResponse, error) { + result := StaticSitesClientPreviewWorkflowResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSitesWorkflowPreview); err != nil { + return StaticSitesClientPreviewWorkflowResponse{}, err + } + return result, nil +} + +// BeginRegisterUserProvidedFunctionAppWithStaticSite - Description for Register a user provided function app with a static +// site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - functionAppName - Name of the function app to register with the static site. +// - staticSiteUserProvidedFunctionEnvelope - A JSON representation of the user provided function app properties. See example. +// - options - StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions contains the optional parameters for +// the StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite method. +func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions) (*runtime.Poller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.registerUserProvidedFunctionAppWithStaticSite(ctx, resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RegisterUserProvidedFunctionAppWithStaticSite - Description for Register a user provided function app with a static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.registerUserProvidedFunctionAppWithStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// registerUserProvidedFunctionAppWithStaticSiteCreateRequest creates the RegisterUserProvidedFunctionAppWithStaticSite request. +func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionAppName == "" { + return nil, errors.New("parameter functionAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.IsForced != nil { + reqQP.Set("isForced", strconv.FormatBool(*options.IsForced)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild - Description for Register a user provided function app with a +// static site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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. +// - options - StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions contains the optional parameters +// for the StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild method. +func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions) (*runtime.Poller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.registerUserProvidedFunctionAppWithStaticSiteBuild(ctx, resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RegisterUserProvidedFunctionAppWithStaticSiteBuild - Description for Register a user provided function app with a static +// site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.registerUserProvidedFunctionAppWithStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// registerUserProvidedFunctionAppWithStaticSiteBuildCreateRequest creates the RegisterUserProvidedFunctionAppWithStaticSiteBuild request. +func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if functionAppName == "" { + return nil, errors.New("parameter functionAppName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.IsForced != nil { + reqQP.Set("isForced", strconv.FormatBool(*options.IsForced)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// ResetStaticSiteAPIKey - Description for Resets the api key for an existing static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - options - StaticSitesClientResetStaticSiteAPIKeyOptions contains the optional parameters for the StaticSitesClient.ResetStaticSiteAPIKey +// method. +func (client *StaticSitesClient) ResetStaticSiteAPIKey(ctx context.Context, resourceGroupName string, name string, resetPropertiesEnvelope StaticSiteResetPropertiesARMResource, options *StaticSitesClientResetStaticSiteAPIKeyOptions) (StaticSitesClientResetStaticSiteAPIKeyResponse, error) { + var err error + const operationName = "StaticSitesClient.ResetStaticSiteAPIKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetStaticSiteAPIKeyCreateRequest(ctx, resourceGroupName, name, resetPropertiesEnvelope, options) + if err != nil { + return StaticSitesClientResetStaticSiteAPIKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientResetStaticSiteAPIKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientResetStaticSiteAPIKeyResponse{}, err + } + return StaticSitesClientResetStaticSiteAPIKeyResponse{}, nil +} + +// resetStaticSiteAPIKeyCreateRequest creates the ResetStaticSiteAPIKey request. +func (client *StaticSitesClient) resetStaticSiteAPIKeyCreateRequest(ctx context.Context, resourceGroupName string, name string, resetPropertiesEnvelope StaticSiteResetPropertiesARMResource, options *StaticSitesClientResetStaticSiteAPIKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, resetPropertiesEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// UnlinkBackend - Unlink a backend from a static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - linkedBackendName - Name of the backend linked to the static site +// - options - StaticSitesClientUnlinkBackendOptions contains the optional parameters for the StaticSitesClient.UnlinkBackend +// method. +func (client *StaticSitesClient) UnlinkBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, options *StaticSitesClientUnlinkBackendOptions) (StaticSitesClientUnlinkBackendResponse, error) { + var err error + const operationName = "StaticSitesClient.UnlinkBackend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.unlinkBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, options) + if err != nil { + return StaticSitesClientUnlinkBackendResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientUnlinkBackendResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUnlinkBackendResponse{}, err + } + return StaticSitesClientUnlinkBackendResponse{}, nil +} + +// unlinkBackendCreateRequest creates the UnlinkBackend request. +func (client *StaticSitesClient) unlinkBackendCreateRequest(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, options *StaticSitesClientUnlinkBackendOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.IsCleaningAuthConfig != nil { + reqQP.Set("isCleaningAuthConfig", strconv.FormatBool(*options.IsCleaningAuthConfig)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// UnlinkBackendFromBuild - Unlink a backend from a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - environmentName - The stage site identifier +// - linkedBackendName - Name of the backend linked to the static site +// - options - StaticSitesClientUnlinkBackendFromBuildOptions contains the optional parameters for the StaticSitesClient.UnlinkBackendFromBuild +// method. +func (client *StaticSitesClient) UnlinkBackendFromBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, options *StaticSitesClientUnlinkBackendFromBuildOptions) (StaticSitesClientUnlinkBackendFromBuildResponse, error) { + var err error + const operationName = "StaticSitesClient.UnlinkBackendFromBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.unlinkBackendFromBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, options) + if err != nil { + return StaticSitesClientUnlinkBackendFromBuildResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientUnlinkBackendFromBuildResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUnlinkBackendFromBuildResponse{}, err + } + return StaticSitesClientUnlinkBackendFromBuildResponse{}, nil +} + +// unlinkBackendFromBuildCreateRequest creates the UnlinkBackendFromBuild request. +func (client *StaticSitesClient) unlinkBackendFromBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, options *StaticSitesClientUnlinkBackendFromBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.IsCleaningAuthConfig != nil { + reqQP.Set("isCleaningAuthConfig", strconv.FormatBool(*options.IsCleaningAuthConfig)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// UpdateBuildDatabaseConnection - Description for Create or update a database connection for a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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 +// - options - StaticSitesClientUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateBuildDatabaseConnection +// method. +func (client *StaticSitesClient) UpdateBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest, options *StaticSitesClientUpdateBuildDatabaseConnectionOptions) (StaticSitesClientUpdateBuildDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.UpdateBuildDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, databaseConnectionRequestEnvelope, options) + if err != nil { + return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, err + } + resp, err := client.updateBuildDatabaseConnectionHandleResponse(httpResp) + return resp, err +} + +// updateBuildDatabaseConnectionCreateRequest creates the UpdateBuildDatabaseConnection request. +func (client *StaticSitesClient) updateBuildDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest, options *StaticSitesClientUpdateBuildDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateBuildDatabaseConnectionHandleResponse handles the UpdateBuildDatabaseConnection response. +func (client *StaticSitesClient) updateBuildDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientUpdateBuildDatabaseConnectionResponse, error) { + result := StaticSitesClientUpdateBuildDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, err + } + return result, nil +} + +// UpdateDatabaseConnection - Description for Create or update a database connection for a static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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 +// - options - StaticSitesClientUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateDatabaseConnection +// method. +func (client *StaticSitesClient) UpdateDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest, options *StaticSitesClientUpdateDatabaseConnectionOptions) (StaticSitesClientUpdateDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.UpdateDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, databaseConnectionRequestEnvelope, options) + if err != nil { + return StaticSitesClientUpdateDatabaseConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientUpdateDatabaseConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUpdateDatabaseConnectionResponse{}, err + } + resp, err := client.updateDatabaseConnectionHandleResponse(httpResp) + return resp, err +} + +// updateDatabaseConnectionCreateRequest creates the UpdateDatabaseConnection request. +func (client *StaticSitesClient) updateDatabaseConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest, options *StaticSitesClientUpdateDatabaseConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if databaseConnectionName == "" { + return nil, errors.New("parameter databaseConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseConnectionName}", url.PathEscape(databaseConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateDatabaseConnectionHandleResponse handles the UpdateDatabaseConnection response. +func (client *StaticSitesClient) updateDatabaseConnectionHandleResponse(resp *http.Response) (StaticSitesClientUpdateDatabaseConnectionResponse, error) { + result := StaticSitesClientUpdateDatabaseConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseConnection); err != nil { + return StaticSitesClientUpdateDatabaseConnectionResponse{}, err + } + return result, nil +} + +// UpdateStaticSite - Description for Creates a new static site in an existing resource group, or updates an existing static +// site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site to create or update. +// - staticSiteEnvelope - A JSON representation of the staticsite properties. See example. +// - options - StaticSitesClientUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSite +// method. +func (client *StaticSitesClient) UpdateStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSitePatchResource, options *StaticSitesClientUpdateStaticSiteOptions) (StaticSitesClientUpdateStaticSiteResponse, error) { + var err error + const operationName = "StaticSitesClient.UpdateStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteEnvelope, options) + if err != nil { + return StaticSitesClientUpdateStaticSiteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientUpdateStaticSiteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUpdateStaticSiteResponse{}, err + } + resp, err := client.updateStaticSiteHandleResponse(httpResp) + return resp, err +} + +// updateStaticSiteCreateRequest creates the UpdateStaticSite request. +func (client *StaticSitesClient) updateStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSitePatchResource, options *StaticSitesClientUpdateStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateStaticSiteHandleResponse handles the UpdateStaticSite response. +func (client *StaticSitesClient) updateStaticSiteHandleResponse(resp *http.Response) (StaticSitesClientUpdateStaticSiteResponse, error) { + result := StaticSitesClientUpdateStaticSiteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteARMResource); err != nil { + return StaticSitesClientUpdateStaticSiteResponse{}, err + } + return result, nil +} + +// UpdateStaticSiteUser - Description for Updates a user entry with the listed roles +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - authprovider - The auth provider for this user. +// - userid - The user id of the user. +// - staticSiteUserEnvelope - A JSON representation of the StaticSiteUser properties. See example. +// - options - StaticSitesClientUpdateStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSiteUser +// method. +func (client *StaticSitesClient) UpdateStaticSiteUser(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, staticSiteUserEnvelope StaticSiteUserARMResource, options *StaticSitesClientUpdateStaticSiteUserOptions) (StaticSitesClientUpdateStaticSiteUserResponse, error) { + var err error + const operationName = "StaticSitesClient.UpdateStaticSiteUser" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateStaticSiteUserCreateRequest(ctx, resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope, options) + if err != nil { + return StaticSitesClientUpdateStaticSiteUserResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticSitesClientUpdateStaticSiteUserResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUpdateStaticSiteUserResponse{}, err + } + resp, err := client.updateStaticSiteUserHandleResponse(httpResp) + return resp, err +} + +// updateStaticSiteUserCreateRequest creates the UpdateStaticSiteUser request. +func (client *StaticSitesClient) updateStaticSiteUserCreateRequest(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, staticSiteUserEnvelope StaticSiteUserARMResource, options *StaticSitesClientUpdateStaticSiteUserOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if authprovider == "" { + return nil, errors.New("parameter authprovider cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authprovider}", url.PathEscape(authprovider)) + if userid == "" { + return nil, errors.New("parameter userid cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userid}", url.PathEscape(userid)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteUserEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateStaticSiteUserHandleResponse handles the UpdateStaticSiteUser response. +func (client *StaticSitesClient) updateStaticSiteUserHandleResponse(resp *http.Response) (StaticSitesClientUpdateStaticSiteUserResponse, error) { + result := StaticSitesClientUpdateStaticSiteUserResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserARMResource); err != nil { + return StaticSitesClientUpdateStaticSiteUserResponse{}, err + } + return result, nil +} + +// BeginValidateBackend - Validates that a backend can be linked to a static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - linkedBackendName - Name of the linked backend that should be retrieved +// - staticSiteLinkedBackendEnvelope - A JSON representation of the linked backend request properties +// - options - StaticSitesClientBeginValidateBackendOptions contains the optional parameters for the StaticSitesClient.BeginValidateBackend +// method. +func (client *StaticSitesClient) BeginValidateBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendOptions) (*runtime.Poller[StaticSitesClientValidateBackendResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validateBackend(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientValidateBackendResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientValidateBackendResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ValidateBackend - Validates that a backend can be linked to a static site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) validateBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginValidateBackend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateBackendCreateRequest creates the ValidateBackend request. +func (client *StaticSitesClient) validateBackendCreateRequest(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}/validate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginValidateBackendForBuild - Validates that a backend can be linked to a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site +// - environmentName - The stage site identifier +// - linkedBackendName - Name of the linked backend that should be retrieved +// - staticSiteLinkedBackendEnvelope - A JSON representation of the linked backend request properties +// - options - StaticSitesClientBeginValidateBackendForBuildOptions contains the optional parameters for the StaticSitesClient.BeginValidateBackendForBuild +// method. +func (client *StaticSitesClient) BeginValidateBackendForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendForBuildOptions) (*runtime.Poller[StaticSitesClientValidateBackendForBuildResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validateBackendForBuild(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientValidateBackendForBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientValidateBackendForBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ValidateBackendForBuild - Validates that a backend can be linked to a static site build +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) validateBackendForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendForBuildOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginValidateBackendForBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateBackendForBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateBackendForBuildCreateRequest creates the ValidateBackendForBuild request. +func (client *StaticSitesClient) validateBackendForBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendForBuildOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}/validate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if linkedBackendName == "" { + return nil, errors.New("parameter linkedBackendName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkedBackendName}", url.PathEscape(linkedBackendName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginValidateCustomDomainCanBeAddedToStaticSite - Description for Validates a particular custom domain can be added to +// a static site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the static site. +// - domainName - The custom domain to validate. +// - staticSiteCustomDomainRequestPropertiesEnvelope - A JSON representation of the static site custom domain request properties. +// See example. +// - options - StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions contains the optional parameters for +// the StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite method. +func (client *StaticSitesClient) BeginValidateCustomDomainCanBeAddedToStaticSite(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions) (*runtime.Poller[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validateCustomDomainCanBeAddedToStaticSite(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ValidateCustomDomainCanBeAddedToStaticSite - Description for Validates a particular custom domain can be added to a static +// site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *StaticSitesClient) validateCustomDomainCanBeAddedToStaticSite(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCustomDomainCanBeAddedToStaticSiteCreateRequest(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateCustomDomainCanBeAddedToStaticSiteCreateRequest creates the ValidateCustomDomainCanBeAddedToStaticSite request. +func (client *StaticSitesClient) validateCustomDomainCanBeAddedToStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainName == "" { + return nil, errors.New("parameter domainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/time_rfc3339.go new file mode 100644 index 00000000..a8042c37 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/time_rfc3339.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/topleveldomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/topleveldomains_client.go new file mode 100644 index 00000000..841f6589 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/topleveldomains_client.go @@ -0,0 +1,222 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// TopLevelDomainsClient contains the methods for the TopLevelDomains group. +// Don't use this type directly, use NewTopLevelDomainsClient() instead. +type TopLevelDomainsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTopLevelDomainsClient creates a new instance of TopLevelDomainsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTopLevelDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TopLevelDomainsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TopLevelDomainsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Description for Get details of a top-level domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - name - Name of the top-level domain. +// - options - TopLevelDomainsClientGetOptions contains the optional parameters for the TopLevelDomainsClient.Get method. +func (client *TopLevelDomainsClient) Get(ctx context.Context, name string, options *TopLevelDomainsClientGetOptions) (TopLevelDomainsClientGetResponse, error) { + var err error + const operationName = "TopLevelDomainsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, name, options) + if err != nil { + return TopLevelDomainsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TopLevelDomainsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TopLevelDomainsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *TopLevelDomainsClient) getCreateRequest(ctx context.Context, name string, options *TopLevelDomainsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}" + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *TopLevelDomainsClient) getHandleResponse(resp *http.Response) (TopLevelDomainsClientGetResponse, error) { + result := TopLevelDomainsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TopLevelDomain); err != nil { + return TopLevelDomainsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Description for Get all top-level domains supported for registration. +// +// Generated from API version 2024-04-01 +// - options - TopLevelDomainsClientListOptions contains the optional parameters for the TopLevelDomainsClient.NewListPager +// method. +func (client *TopLevelDomainsClient) NewListPager(options *TopLevelDomainsClientListOptions) *runtime.Pager[TopLevelDomainsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[TopLevelDomainsClientListResponse]{ + More: func(page TopLevelDomainsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TopLevelDomainsClientListResponse) (TopLevelDomainsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TopLevelDomainsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return TopLevelDomainsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *TopLevelDomainsClient) listCreateRequest(ctx context.Context, options *TopLevelDomainsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *TopLevelDomainsClient) listHandleResponse(resp *http.Response) (TopLevelDomainsClientListResponse, error) { + result := TopLevelDomainsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TopLevelDomainCollection); err != nil { + return TopLevelDomainsClientListResponse{}, err + } + return result, nil +} + +// NewListAgreementsPager - Description for Gets all legal agreements that user needs to accept before purchasing a domain. +// +// Generated from API version 2024-04-01 +// - name - Name of the top-level domain. +// - agreementOption - Domain agreement options. +// - options - TopLevelDomainsClientListAgreementsOptions contains the optional parameters for the TopLevelDomainsClient.NewListAgreementsPager +// method. +func (client *TopLevelDomainsClient) NewListAgreementsPager(name string, agreementOption TopLevelDomainAgreementOption, options *TopLevelDomainsClientListAgreementsOptions) *runtime.Pager[TopLevelDomainsClientListAgreementsResponse] { + return runtime.NewPager(runtime.PagingHandler[TopLevelDomainsClientListAgreementsResponse]{ + More: func(page TopLevelDomainsClientListAgreementsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TopLevelDomainsClientListAgreementsResponse) (TopLevelDomainsClientListAgreementsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TopLevelDomainsClient.NewListAgreementsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAgreementsCreateRequest(ctx, name, agreementOption, options) + }, nil) + if err != nil { + return TopLevelDomainsClientListAgreementsResponse{}, err + } + return client.listAgreementsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAgreementsCreateRequest creates the ListAgreements request. +func (client *TopLevelDomainsClient) listAgreementsCreateRequest(ctx context.Context, name string, agreementOption TopLevelDomainAgreementOption, options *TopLevelDomainsClientListAgreementsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements" + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, agreementOption); err != nil { + return nil, err + } + return req, nil +} + +// listAgreementsHandleResponse handles the ListAgreements response. +func (client *TopLevelDomainsClient) listAgreementsHandleResponse(resp *http.Response) (TopLevelDomainsClientListAgreementsResponse, error) { + result := TopLevelDomainsClientListAgreementsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TldLegalAgreementCollection); err != nil { + return TopLevelDomainsClientListAgreementsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/webapps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/webapps_client.go new file mode 100644 index 00000000..bc9ae899 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/webapps_client.go @@ -0,0 +1,29386 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WebAppsClient contains the methods for the WebApps group. +// Don't use this type directly, use NewWebAppsClient() instead. +type WebAppsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWebAppsClient creates a new instance of WebAppsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWebAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebAppsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WebAppsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// AddPremierAddOn - Description for Updates a named add-on of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - premierAddOnName - Add-on name. +// - premierAddOn - A JSON representation of the edited premier add-on. +// - options - WebAppsClientAddPremierAddOnOptions contains the optional parameters for the WebAppsClient.AddPremierAddOn method. +func (client *WebAppsClient) AddPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn, options *WebAppsClientAddPremierAddOnOptions) (WebAppsClientAddPremierAddOnResponse, error) { + var err error + const operationName = "WebAppsClient.AddPremierAddOn" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.addPremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, options) + if err != nil { + return WebAppsClientAddPremierAddOnResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientAddPremierAddOnResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientAddPremierAddOnResponse{}, err + } + resp, err := client.addPremierAddOnHandleResponse(httpResp) + return resp, err +} + +// addPremierAddOnCreateRequest creates the AddPremierAddOn request. +func (client *WebAppsClient) addPremierAddOnCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn, options *WebAppsClientAddPremierAddOnOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if premierAddOnName == "" { + return nil, errors.New("parameter premierAddOnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, premierAddOn); err != nil { + return nil, err + } + return req, nil +} + +// addPremierAddOnHandleResponse handles the AddPremierAddOn response. +func (client *WebAppsClient) addPremierAddOnHandleResponse(resp *http.Response) (WebAppsClientAddPremierAddOnResponse, error) { + result := WebAppsClientAddPremierAddOnResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { + return WebAppsClientAddPremierAddOnResponse{}, err + } + return result, nil +} + +// AddPremierAddOnSlot - Description for Updates a named add-on of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - premierAddOnName - Add-on name. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production +// slot. +// - premierAddOn - A JSON representation of the edited premier add-on. +// - options - WebAppsClientAddPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.AddPremierAddOnSlot +// method. +func (client *WebAppsClient) AddPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn PremierAddOn, options *WebAppsClientAddPremierAddOnSlotOptions) (WebAppsClientAddPremierAddOnSlotResponse, error) { + var err error + const operationName = "WebAppsClient.AddPremierAddOnSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.addPremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, premierAddOn, options) + if err != nil { + return WebAppsClientAddPremierAddOnSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientAddPremierAddOnSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientAddPremierAddOnSlotResponse{}, err + } + resp, err := client.addPremierAddOnSlotHandleResponse(httpResp) + return resp, err +} + +// addPremierAddOnSlotCreateRequest creates the AddPremierAddOnSlot request. +func (client *WebAppsClient) addPremierAddOnSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn PremierAddOn, options *WebAppsClientAddPremierAddOnSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if premierAddOnName == "" { + return nil, errors.New("parameter premierAddOnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, premierAddOn); err != nil { + return nil, err + } + return req, nil +} + +// addPremierAddOnSlotHandleResponse handles the AddPremierAddOnSlot response. +func (client *WebAppsClient) addPremierAddOnSlotHandleResponse(resp *http.Response) (WebAppsClientAddPremierAddOnSlotResponse, error) { + result := WebAppsClientAddPremierAddOnSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { + return WebAppsClientAddPremierAddOnSlotResponse{}, err + } + return result, nil +} + +// AnalyzeCustomHostname - Description for Analyze a custom hostname. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientAnalyzeCustomHostnameOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostname +// method. +func (client *WebAppsClient) AnalyzeCustomHostname(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientAnalyzeCustomHostnameOptions) (WebAppsClientAnalyzeCustomHostnameResponse, error) { + var err error + const operationName = "WebAppsClient.AnalyzeCustomHostname" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.analyzeCustomHostnameCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientAnalyzeCustomHostnameResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientAnalyzeCustomHostnameResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientAnalyzeCustomHostnameResponse{}, err + } + resp, err := client.analyzeCustomHostnameHandleResponse(httpResp) + return resp, err +} + +// analyzeCustomHostnameCreateRequest creates the AnalyzeCustomHostname request. +func (client *WebAppsClient) analyzeCustomHostnameCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientAnalyzeCustomHostnameOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.HostName != nil { + reqQP.Set("hostName", *options.HostName) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// analyzeCustomHostnameHandleResponse handles the AnalyzeCustomHostname response. +func (client *WebAppsClient) analyzeCustomHostnameHandleResponse(resp *http.Response) (WebAppsClientAnalyzeCustomHostnameResponse, error) { + result := WebAppsClientAnalyzeCustomHostnameResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomHostnameAnalysisResult); err != nil { + return WebAppsClientAnalyzeCustomHostnameResponse{}, err + } + return result, nil +} + +// AnalyzeCustomHostnameSlot - Description for Analyze a custom hostname. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - WebAppsClientAnalyzeCustomHostnameSlotOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostnameSlot +// method. +func (client *WebAppsClient) AnalyzeCustomHostnameSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientAnalyzeCustomHostnameSlotOptions) (WebAppsClientAnalyzeCustomHostnameSlotResponse, error) { + var err error + const operationName = "WebAppsClient.AnalyzeCustomHostnameSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.analyzeCustomHostnameSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, err + } + resp, err := client.analyzeCustomHostnameSlotHandleResponse(httpResp) + return resp, err +} + +// analyzeCustomHostnameSlotCreateRequest creates the AnalyzeCustomHostnameSlot request. +func (client *WebAppsClient) analyzeCustomHostnameSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientAnalyzeCustomHostnameSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.HostName != nil { + reqQP.Set("hostName", *options.HostName) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// analyzeCustomHostnameSlotHandleResponse handles the AnalyzeCustomHostnameSlot response. +func (client *WebAppsClient) analyzeCustomHostnameSlotHandleResponse(resp *http.Response) (WebAppsClientAnalyzeCustomHostnameSlotResponse, error) { + result := WebAppsClientAnalyzeCustomHostnameSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomHostnameAnalysisResult); err != nil { + return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, err + } + return result, nil +} + +// ApplySlotConfigToProduction - Description for Applies the configuration settings from the target slot onto the current +// slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slotSwapEntity - JSON object that contains the target slot name. See example. +// - options - WebAppsClientApplySlotConfigToProductionOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigToProduction +// method. +func (client *WebAppsClient) ApplySlotConfigToProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientApplySlotConfigToProductionOptions) (WebAppsClientApplySlotConfigToProductionResponse, error) { + var err error + const operationName = "WebAppsClient.ApplySlotConfigToProduction" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.applySlotConfigToProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) + if err != nil { + return WebAppsClientApplySlotConfigToProductionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientApplySlotConfigToProductionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientApplySlotConfigToProductionResponse{}, err + } + return WebAppsClientApplySlotConfigToProductionResponse{}, nil +} + +// applySlotConfigToProductionCreateRequest creates the ApplySlotConfigToProduction request. +func (client *WebAppsClient) applySlotConfigToProductionCreateRequest(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientApplySlotConfigToProductionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil +} + +// ApplySlotConfigurationSlot - Description for Applies the configuration settings from the target slot onto the current slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. +// - slotSwapEntity - JSON object that contains the target slot name. See example. +// - options - WebAppsClientApplySlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigurationSlot +// method. +func (client *WebAppsClient) ApplySlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientApplySlotConfigurationSlotOptions) (WebAppsClientApplySlotConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ApplySlotConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.applySlotConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) + if err != nil { + return WebAppsClientApplySlotConfigurationSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientApplySlotConfigurationSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientApplySlotConfigurationSlotResponse{}, err + } + return WebAppsClientApplySlotConfigurationSlotResponse{}, nil +} + +// applySlotConfigurationSlotCreateRequest creates the ApplySlotConfigurationSlot request. +func (client *WebAppsClient) applySlotConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientApplySlotConfigurationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil +} + +// BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - options - WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection +// method. +func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.approveOrRejectPrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. +func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, privateEndpointWrapper); err != nil { + return nil, err + } + return req, nil +} + +// BeginApproveOrRejectPrivateEndpointConnectionSlot - Description for Approves or rejects a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - options - WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions contains the optional parameters for the +// WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot method. +func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*runtime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.approveOrRejectPrivateEndpointConnectionSlot(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ApproveOrRejectPrivateEndpointConnectionSlot - Description for Approves or rejects a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.approveOrRejectPrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// approveOrRejectPrivateEndpointConnectionSlotCreateRequest creates the ApproveOrRejectPrivateEndpointConnectionSlot request. +func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper RemotePrivateEndpointConnectionARMResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, privateEndpointWrapper); err != nil { + return nil, err + } + return req, nil +} + +// Backup - Description for Creates a backup of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - request - Backup configuration. You can use the JSON response from the POST action as input here. +// - options - WebAppsClientBackupOptions contains the optional parameters for the WebAppsClient.Backup method. +func (client *WebAppsClient) Backup(ctx context.Context, resourceGroupName string, name string, request BackupRequest, options *WebAppsClientBackupOptions) (WebAppsClientBackupResponse, error) { + var err error + const operationName = "WebAppsClient.Backup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.backupCreateRequest(ctx, resourceGroupName, name, request, options) + if err != nil { + return WebAppsClientBackupResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientBackupResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientBackupResponse{}, err + } + resp, err := client.backupHandleResponse(httpResp) + return resp, err +} + +// backupCreateRequest creates the Backup request. +func (client *WebAppsClient) backupCreateRequest(ctx context.Context, resourceGroupName string, name string, request BackupRequest, options *WebAppsClientBackupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// backupHandleResponse handles the Backup response. +func (client *WebAppsClient) backupHandleResponse(resp *http.Response) (WebAppsClientBackupResponse, error) { + result := WebAppsClientBackupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { + return WebAppsClientBackupResponse{}, err + } + return result, nil +} + +// BackupSlot - Description for Creates a backup of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. +// - request - Backup configuration. You can use the JSON response from the POST action as input here. +// - options - WebAppsClientBackupSlotOptions contains the optional parameters for the WebAppsClient.BackupSlot method. +func (client *WebAppsClient) BackupSlot(ctx context.Context, resourceGroupName string, name string, slot string, request BackupRequest, options *WebAppsClientBackupSlotOptions) (WebAppsClientBackupSlotResponse, error) { + var err error + const operationName = "WebAppsClient.BackupSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.backupSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) + if err != nil { + return WebAppsClientBackupSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientBackupSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientBackupSlotResponse{}, err + } + resp, err := client.backupSlotHandleResponse(httpResp) + return resp, err +} + +// backupSlotCreateRequest creates the BackupSlot request. +func (client *WebAppsClient) backupSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, request BackupRequest, options *WebAppsClientBackupSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// backupSlotHandleResponse handles the BackupSlot response. +func (client *WebAppsClient) backupSlotHandleResponse(resp *http.Response) (WebAppsClientBackupSlotResponse, error) { + result := WebAppsClientBackupSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { + return WebAppsClientBackupSlotResponse{}, err + } + return result, nil +} + +// CreateDeployment - Description for Create a deployment for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - id - ID of an existing deployment. +// - deployment - Deployment details. +// - options - WebAppsClientCreateDeploymentOptions contains the optional parameters for the WebAppsClient.CreateDeployment +// method. +func (client *WebAppsClient) CreateDeployment(ctx context.Context, resourceGroupName string, name string, id string, deployment Deployment, options *WebAppsClientCreateDeploymentOptions) (WebAppsClientCreateDeploymentResponse, error) { + var err error + const operationName = "WebAppsClient.CreateDeployment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createDeploymentCreateRequest(ctx, resourceGroupName, name, id, deployment, options) + if err != nil { + return WebAppsClientCreateDeploymentResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateDeploymentResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateDeploymentResponse{}, err + } + resp, err := client.createDeploymentHandleResponse(httpResp) + return resp, err +} + +// createDeploymentCreateRequest creates the CreateDeployment request. +func (client *WebAppsClient) createDeploymentCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, deployment Deployment, options *WebAppsClientCreateDeploymentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, deployment); err != nil { + return nil, err + } + return req, nil +} + +// createDeploymentHandleResponse handles the CreateDeployment response. +func (client *WebAppsClient) createDeploymentHandleResponse(resp *http.Response) (WebAppsClientCreateDeploymentResponse, error) { + result := WebAppsClientCreateDeploymentResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { + return WebAppsClientCreateDeploymentResponse{}, err + } + return result, nil +} + +// CreateDeploymentSlot - Description for Create a deployment for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - id - ID of an existing deployment. +// - slot - Name of the deployment slot. If a slot is not specified, the API creates a deployment for the production slot. +// - deployment - Deployment details. +// - options - WebAppsClientCreateDeploymentSlotOptions contains the optional parameters for the WebAppsClient.CreateDeploymentSlot +// method. +func (client *WebAppsClient) CreateDeploymentSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, deployment Deployment, options *WebAppsClientCreateDeploymentSlotOptions) (WebAppsClientCreateDeploymentSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateDeploymentSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createDeploymentSlotCreateRequest(ctx, resourceGroupName, name, id, slot, deployment, options) + if err != nil { + return WebAppsClientCreateDeploymentSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateDeploymentSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateDeploymentSlotResponse{}, err + } + resp, err := client.createDeploymentSlotHandleResponse(httpResp) + return resp, err +} + +// createDeploymentSlotCreateRequest creates the CreateDeploymentSlot request. +func (client *WebAppsClient) createDeploymentSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, slot string, deployment Deployment, options *WebAppsClientCreateDeploymentSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, deployment); err != nil { + return nil, err + } + return req, nil +} + +// createDeploymentSlotHandleResponse handles the CreateDeploymentSlot response. +func (client *WebAppsClient) createDeploymentSlotHandleResponse(resp *http.Response) (WebAppsClientCreateDeploymentSlotResponse, error) { + result := WebAppsClientCreateDeploymentSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { + return WebAppsClientCreateDeploymentSlotResponse{}, err + } + return result, nil +} + +// BeginCreateFunction - Description for Create function for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - Function name. +// - functionEnvelope - Function details. +// - options - WebAppsClientBeginCreateFunctionOptions contains the optional parameters for the WebAppsClient.BeginCreateFunction +// method. +func (client *WebAppsClient) BeginCreateFunction(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateFunctionOptions) (*runtime.Poller[WebAppsClientCreateFunctionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createFunction(ctx, resourceGroupName, name, functionName, functionEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateFunctionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateFunctionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateFunction - Description for Create function for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) createFunction(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateFunctionOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateFunction" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createFunctionCreateRequest(ctx, resourceGroupName, name, functionName, functionEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createFunctionCreateRequest creates the CreateFunction request. +func (client *WebAppsClient) createFunctionCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateFunctionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, functionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateInstanceFunctionSlot - Description for Create function for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - Function name. +// - slot - Name of the deployment slot. +// - functionEnvelope - Function details. +// - options - WebAppsClientBeginCreateInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceFunctionSlot +// method. +func (client *WebAppsClient) BeginCreateInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateInstanceFunctionSlotOptions) (*runtime.Poller[WebAppsClientCreateInstanceFunctionSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createInstanceFunctionSlot(ctx, resourceGroupName, name, functionName, slot, functionEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateInstanceFunctionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateInstanceFunctionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateInstanceFunctionSlot - Description for Create function for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) createInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateInstanceFunctionSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateInstanceFunctionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, functionEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createInstanceFunctionSlotCreateRequest creates the CreateInstanceFunctionSlot request. +func (client *WebAppsClient) createInstanceFunctionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateInstanceFunctionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, functionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateInstanceMSDeployOperation - Description for Invoke the MSDeploy web app extension. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - instanceID - ID of web app instance. +// - msDeploy - Details of MSDeploy operation +// - options - WebAppsClientBeginCreateInstanceMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperation +// method. +func (client *WebAppsClient) BeginCreateInstanceMSDeployOperation(ctx context.Context, resourceGroupName string, name string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationOptions) (*runtime.Poller[WebAppsClientCreateInstanceMSDeployOperationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createInstanceMSDeployOperation(ctx, resourceGroupName, name, instanceID, msDeploy, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateInstanceMSDeployOperationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateInstanceMSDeployOperationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateInstanceMSDeployOperation - Description for Invoke the MSDeploy web app extension. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) createInstanceMSDeployOperation(ctx context.Context, resourceGroupName string, name string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateInstanceMSDeployOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createInstanceMSDeployOperationCreateRequest(ctx, resourceGroupName, name, instanceID, msDeploy, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createInstanceMSDeployOperationCreateRequest creates the CreateInstanceMSDeployOperation request. +func (client *WebAppsClient) createInstanceMSDeployOperationCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, msDeploy); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateInstanceMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - instanceID - ID of web app instance. +// - msDeploy - Details of MSDeploy operation +// - options - WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperationSlot +// method. +func (client *WebAppsClient) BeginCreateInstanceMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions) (*runtime.Poller[WebAppsClientCreateInstanceMSDeployOperationSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createInstanceMSDeployOperationSlot(ctx, resourceGroupName, name, slot, instanceID, msDeploy, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateInstanceMSDeployOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateInstanceMSDeployOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateInstanceMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) createInstanceMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateInstanceMSDeployOperationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createInstanceMSDeployOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, msDeploy, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createInstanceMSDeployOperationSlotCreateRequest creates the CreateInstanceMSDeployOperationSlot request. +func (client *WebAppsClient) createInstanceMSDeployOperationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, msDeploy); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateMSDeployOperation - Description for Invoke the MSDeploy web app extension. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - msDeploy - Details of MSDeploy operation +// - options - WebAppsClientBeginCreateMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperation +// method. +func (client *WebAppsClient) BeginCreateMSDeployOperation(ctx context.Context, resourceGroupName string, name string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationOptions) (*runtime.Poller[WebAppsClientCreateMSDeployOperationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createMSDeployOperation(ctx, resourceGroupName, name, msDeploy, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateMSDeployOperationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateMSDeployOperationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateMSDeployOperation - Description for Invoke the MSDeploy web app extension. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) createMSDeployOperation(ctx context.Context, resourceGroupName string, name string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateMSDeployOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createMSDeployOperationCreateRequest(ctx, resourceGroupName, name, msDeploy, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createMSDeployOperationCreateRequest creates the CreateMSDeployOperation request. +func (client *WebAppsClient) createMSDeployOperationCreateRequest(ctx context.Context, resourceGroupName string, name string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, msDeploy); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - msDeploy - Details of MSDeploy operation +// - options - WebAppsClientBeginCreateMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperationSlot +// method. +func (client *WebAppsClient) BeginCreateMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationSlotOptions) (*runtime.Poller[WebAppsClientCreateMSDeployOperationSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createMSDeployOperationSlot(ctx, resourceGroupName, name, slot, msDeploy, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateMSDeployOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateMSDeployOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) createMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateMSDeployOperationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createMSDeployOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, msDeploy, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createMSDeployOperationSlotCreateRequest creates the CreateMSDeployOperationSlot request. +func (client *WebAppsClient) createMSDeployOperationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, msDeploy); err != nil { + return nil, err + } + return req, nil +} + +// CreateOneDeployOperation - Description for Invoke the OneDeploy publish web app extension. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientCreateOneDeployOperationOptions contains the optional parameters for the WebAppsClient.CreateOneDeployOperation +// method. +func (client *WebAppsClient) CreateOneDeployOperation(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientCreateOneDeployOperationOptions) (WebAppsClientCreateOneDeployOperationResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOneDeployOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOneDeployOperationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientCreateOneDeployOperationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOneDeployOperationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOneDeployOperationResponse{}, err + } + resp, err := client.createOneDeployOperationHandleResponse(httpResp) + return resp, err +} + +// createOneDeployOperationCreateRequest creates the CreateOneDeployOperation request. +func (client *WebAppsClient) createOneDeployOperationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientCreateOneDeployOperationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// createOneDeployOperationHandleResponse handles the CreateOneDeployOperation response. +func (client *WebAppsClient) createOneDeployOperationHandleResponse(resp *http.Response) (WebAppsClientCreateOneDeployOperationResponse, error) { + result := WebAppsClientCreateOneDeployOperationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { + return WebAppsClientCreateOneDeployOperationResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an +// existing app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. +// - siteEnvelope - A JSON representation of the app properties. See example. +// - options - WebAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdate +// method. +func (client *WebAppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateOptions) (*runtime.Poller[WebAppsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, name, siteEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing +// app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, siteEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WebAppsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// CreateOrUpdateConfiguration - Description for Updates the configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - siteConfig - JSON representation of a SiteConfig object. See example. +// - options - WebAppsClientCreateOrUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfiguration +// method. +func (client *WebAppsClient) CreateOrUpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, options *WebAppsClientCreateOrUpdateConfigurationOptions) (WebAppsClientCreateOrUpdateConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateConfigurationCreateRequest(ctx, resourceGroupName, name, siteConfig, options) + if err != nil { + return WebAppsClientCreateOrUpdateConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateConfigurationResponse{}, err + } + resp, err := client.createOrUpdateConfigurationHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateConfigurationCreateRequest creates the CreateOrUpdateConfiguration request. +func (client *WebAppsClient) createOrUpdateConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, options *WebAppsClientCreateOrUpdateConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteConfig); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateConfigurationHandleResponse handles the CreateOrUpdateConfiguration response. +func (client *WebAppsClient) createOrUpdateConfigurationHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateConfigurationResponse, error) { + result := WebAppsClientCreateOrUpdateConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { + return WebAppsClientCreateOrUpdateConfigurationResponse{}, err + } + return result, nil +} + +// CreateOrUpdateConfigurationSlot - Description for Updates the configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. +// - siteConfig - JSON representation of a SiteConfig object. See example. +// - options - WebAppsClientCreateOrUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfigurationSlot +// method. +func (client *WebAppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig SiteConfigResource, options *WebAppsClientCreateOrUpdateConfigurationSlotOptions) (WebAppsClientCreateOrUpdateConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, siteConfig, options) + if err != nil { + return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, err + } + resp, err := client.createOrUpdateConfigurationSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateConfigurationSlotCreateRequest creates the CreateOrUpdateConfigurationSlot request. +func (client *WebAppsClient) createOrUpdateConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig SiteConfigResource, options *WebAppsClientCreateOrUpdateConfigurationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteConfig); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateConfigurationSlotHandleResponse handles the CreateOrUpdateConfigurationSlot response. +func (client *WebAppsClient) createOrUpdateConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateConfigurationSlotResponse, error) { + result := WebAppsClientCreateOrUpdateConfigurationSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { + return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, err + } + return result, nil +} + +// CreateOrUpdateDomainOwnershipIdentifier - Description for Creates a domain ownership identifier for web app, or updates +// an existing ownership identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - domainOwnershipIdentifierName - Name of domain ownership identifier. +// - domainOwnershipIdentifier - A JSON representation of the domain ownership properties. +// - options - WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier +// method. +func (client *WebAppsClient) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, options *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions) (WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, options) + if err != nil { + return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, err + } + resp, err := client.createOrUpdateDomainOwnershipIdentifierHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateDomainOwnershipIdentifierCreateRequest creates the CreateOrUpdateDomainOwnershipIdentifier request. +func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, options *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainOwnershipIdentifierName == "" { + return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateDomainOwnershipIdentifierHandleResponse handles the CreateOrUpdateDomainOwnershipIdentifier response. +func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse, error) { + result := WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { + return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, err + } + return result, nil +} + +// CreateOrUpdateDomainOwnershipIdentifierSlot - Description for Creates a domain ownership identifier for web app, or updates +// an existing ownership identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - domainOwnershipIdentifierName - Name of domain ownership identifier. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. +// - domainOwnershipIdentifier - A JSON representation of the domain ownership properties. +// - options - WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot +// method. +func (client *WebAppsClient) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier Identifier, options *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions) (WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier, options) + if err != nil { + return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, err + } + resp, err := client.createOrUpdateDomainOwnershipIdentifierSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateDomainOwnershipIdentifierSlotCreateRequest creates the CreateOrUpdateDomainOwnershipIdentifierSlot request. +func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier Identifier, options *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainOwnershipIdentifierName == "" { + return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateDomainOwnershipIdentifierSlotHandleResponse handles the CreateOrUpdateDomainOwnershipIdentifierSlot response. +func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse, error) { + result := WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { + return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, err + } + return result, nil +} + +// CreateOrUpdateFunctionSecret - Description for Add or update a function secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - The name of the function. +// - keyName - The name of the key. +// - key - The key to create or update +// - options - WebAppsClientCreateOrUpdateFunctionSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecret +// method. +func (client *WebAppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo, options *WebAppsClientCreateOrUpdateFunctionSecretOptions) (WebAppsClientCreateOrUpdateFunctionSecretResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateFunctionSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateFunctionSecretCreateRequest(ctx, resourceGroupName, name, functionName, keyName, key, options) + if err != nil { + return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, err + } + resp, err := client.createOrUpdateFunctionSecretHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateFunctionSecretCreateRequest creates the CreateOrUpdateFunctionSecret request. +func (client *WebAppsClient) createOrUpdateFunctionSecretCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo, options *WebAppsClientCreateOrUpdateFunctionSecretOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, key); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateFunctionSecretHandleResponse handles the CreateOrUpdateFunctionSecret response. +func (client *WebAppsClient) createOrUpdateFunctionSecretHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateFunctionSecretResponse, error) { + result := WebAppsClientCreateOrUpdateFunctionSecretResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.KeyInfo); err != nil { + return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, err + } + return result, nil +} + +// CreateOrUpdateFunctionSecretSlot - Description for Add or update a function secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - The name of the function. +// - keyName - The name of the key. +// - slot - Name of the deployment slot. +// - key - The key to create or update +// - options - WebAppsClientCreateOrUpdateFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecretSlot +// method. +func (client *WebAppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo, options *WebAppsClientCreateOrUpdateFunctionSecretSlotOptions) (WebAppsClientCreateOrUpdateFunctionSecretSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateFunctionSecretSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateFunctionSecretSlotCreateRequest(ctx, resourceGroupName, name, functionName, keyName, slot, key, options) + if err != nil { + return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, err + } + resp, err := client.createOrUpdateFunctionSecretSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateFunctionSecretSlotCreateRequest creates the CreateOrUpdateFunctionSecretSlot request. +func (client *WebAppsClient) createOrUpdateFunctionSecretSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo, options *WebAppsClientCreateOrUpdateFunctionSecretSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, key); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateFunctionSecretSlotHandleResponse handles the CreateOrUpdateFunctionSecretSlot response. +func (client *WebAppsClient) createOrUpdateFunctionSecretSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateFunctionSecretSlotResponse, error) { + result := WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.KeyInfo); err != nil { + return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, err + } + return result, nil +} + +// CreateOrUpdateHostNameBinding - Description for Creates a hostname binding for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - hostName - Hostname in the hostname binding. +// - hostNameBinding - Binding details. This is the JSON representation of a HostNameBinding object. +// - options - WebAppsClientCreateOrUpdateHostNameBindingOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBinding +// method. +func (client *WebAppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, options *WebAppsClientCreateOrUpdateHostNameBindingOptions) (WebAppsClientCreateOrUpdateHostNameBindingResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHostNameBinding" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateHostNameBindingCreateRequest(ctx, resourceGroupName, name, hostName, hostNameBinding, options) + if err != nil { + return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, err + } + resp, err := client.createOrUpdateHostNameBindingHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateHostNameBindingCreateRequest creates the CreateOrUpdateHostNameBinding request. +func (client *WebAppsClient) createOrUpdateHostNameBindingCreateRequest(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, options *WebAppsClientCreateOrUpdateHostNameBindingOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if hostName == "" { + return nil, errors.New("parameter hostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, hostNameBinding); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHostNameBindingHandleResponse handles the CreateOrUpdateHostNameBinding response. +func (client *WebAppsClient) createOrUpdateHostNameBindingHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHostNameBindingResponse, error) { + result := WebAppsClientCreateOrUpdateHostNameBindingResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBinding); err != nil { + return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, err + } + return result, nil +} + +// CreateOrUpdateHostNameBindingSlot - Description for Creates a hostname binding for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - hostName - Hostname in the hostname binding. +// - slot - Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. +// - hostNameBinding - Binding details. This is the JSON representation of a HostNameBinding object. +// - options - WebAppsClientCreateOrUpdateHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBindingSlot +// method. +func (client *WebAppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, slot string, hostNameBinding HostNameBinding, options *WebAppsClientCreateOrUpdateHostNameBindingSlotOptions) (WebAppsClientCreateOrUpdateHostNameBindingSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHostNameBindingSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateHostNameBindingSlotCreateRequest(ctx, resourceGroupName, name, hostName, slot, hostNameBinding, options) + if err != nil { + return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, err + } + resp, err := client.createOrUpdateHostNameBindingSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateHostNameBindingSlotCreateRequest creates the CreateOrUpdateHostNameBindingSlot request. +func (client *WebAppsClient) createOrUpdateHostNameBindingSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, hostName string, slot string, hostNameBinding HostNameBinding, options *WebAppsClientCreateOrUpdateHostNameBindingSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if hostName == "" { + return nil, errors.New("parameter hostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, hostNameBinding); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHostNameBindingSlotHandleResponse handles the CreateOrUpdateHostNameBindingSlot response. +func (client *WebAppsClient) createOrUpdateHostNameBindingSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHostNameBindingSlotResponse, error) { + result := WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBinding); err != nil { + return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, err + } + return result, nil +} + +// CreateOrUpdateHostSecret - Description for Add or update a host level secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - keyType - The type of host key. +// - keyName - The name of the key. +// - key - The key to create or update +// - options - WebAppsClientCreateOrUpdateHostSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecret +// method. +func (client *WebAppsClient) CreateOrUpdateHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo, options *WebAppsClientCreateOrUpdateHostSecretOptions) (WebAppsClientCreateOrUpdateHostSecretResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHostSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateHostSecretCreateRequest(ctx, resourceGroupName, name, keyType, keyName, key, options) + if err != nil { + return WebAppsClientCreateOrUpdateHostSecretResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateHostSecretResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHostSecretResponse{}, err + } + resp, err := client.createOrUpdateHostSecretHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateHostSecretCreateRequest creates the CreateOrUpdateHostSecret request. +func (client *WebAppsClient) createOrUpdateHostSecretCreateRequest(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo, options *WebAppsClientCreateOrUpdateHostSecretOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyType == "" { + return nil, errors.New("parameter keyType cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyType}", url.PathEscape(keyType)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, key); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHostSecretHandleResponse handles the CreateOrUpdateHostSecret response. +func (client *WebAppsClient) createOrUpdateHostSecretHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHostSecretResponse, error) { + result := WebAppsClientCreateOrUpdateHostSecretResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.KeyInfo); err != nil { + return WebAppsClientCreateOrUpdateHostSecretResponse{}, err + } + return result, nil +} + +// CreateOrUpdateHostSecretSlot - Description for Add or update a host level secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - keyType - The type of host key. +// - keyName - The name of the key. +// - slot - Name of the deployment slot. +// - key - The key to create or update +// - options - WebAppsClientCreateOrUpdateHostSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecretSlot +// method. +func (client *WebAppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo, options *WebAppsClientCreateOrUpdateHostSecretSlotOptions) (WebAppsClientCreateOrUpdateHostSecretSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHostSecretSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateHostSecretSlotCreateRequest(ctx, resourceGroupName, name, keyType, keyName, slot, key, options) + if err != nil { + return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, err + } + resp, err := client.createOrUpdateHostSecretSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateHostSecretSlotCreateRequest creates the CreateOrUpdateHostSecretSlot request. +func (client *WebAppsClient) createOrUpdateHostSecretSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo, options *WebAppsClientCreateOrUpdateHostSecretSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyType == "" { + return nil, errors.New("parameter keyType cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyType}", url.PathEscape(keyType)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, key); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHostSecretSlotHandleResponse handles the CreateOrUpdateHostSecretSlot response. +func (client *WebAppsClient) createOrUpdateHostSecretSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHostSecretSlotResponse, error) { + result := WebAppsClientCreateOrUpdateHostSecretSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.KeyInfo); err != nil { + return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, err + } + return result, nil +} + +// CreateOrUpdateHybridConnection - Description for Creates a new Hybrid Connection using a Service Bus relay. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - namespaceName - The namespace for this hybrid connection. +// - relayName - The relay name for this hybrid connection. +// - connectionEnvelope - The details of the hybrid connection. +// - options - WebAppsClientCreateOrUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnection +// method. +func (client *WebAppsClient) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, options *WebAppsClientCreateOrUpdateHybridConnectionOptions) (WebAppsClientCreateOrUpdateHybridConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, options) + if err != nil { + return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, err + } + resp, err := client.createOrUpdateHybridConnectionHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateHybridConnectionCreateRequest creates the CreateOrUpdateHybridConnection request. +func (client *WebAppsClient) createOrUpdateHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, options *WebAppsClientCreateOrUpdateHybridConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHybridConnectionHandleResponse handles the CreateOrUpdateHybridConnection response. +func (client *WebAppsClient) createOrUpdateHybridConnectionHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHybridConnectionResponse, error) { + result := WebAppsClientCreateOrUpdateHybridConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { + return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, err + } + return result, nil +} + +// CreateOrUpdateHybridConnectionSlot - Description for Creates a new Hybrid Connection using a Service Bus relay. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - namespaceName - The namespace for this hybrid connection. +// - relayName - The relay name for this hybrid connection. +// - slot - The name of the slot for the web app. +// - connectionEnvelope - The details of the hybrid connection. +// - options - WebAppsClientCreateOrUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnectionSlot +// method. +func (client *WebAppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope HybridConnection, options *WebAppsClientCreateOrUpdateHybridConnectionSlotOptions) (WebAppsClientCreateOrUpdateHybridConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHybridConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope, options) + if err != nil { + return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, err + } + resp, err := client.createOrUpdateHybridConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateHybridConnectionSlotCreateRequest creates the CreateOrUpdateHybridConnectionSlot request. +func (client *WebAppsClient) createOrUpdateHybridConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope HybridConnection, options *WebAppsClientCreateOrUpdateHybridConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHybridConnectionSlotHandleResponse handles the CreateOrUpdateHybridConnectionSlot response. +func (client *WebAppsClient) createOrUpdateHybridConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHybridConnectionSlotResponse, error) { + result := WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { + return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, err + } + return result, nil +} + +// CreateOrUpdatePublicCertificate - Description for Creates a hostname binding for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - publicCertificateName - Public certificate name. +// - publicCertificate - Public certificate details. This is the JSON representation of a PublicCertificate object. +// - options - WebAppsClientCreateOrUpdatePublicCertificateOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificate +// method. +func (client *WebAppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, options *WebAppsClientCreateOrUpdatePublicCertificateOptions) (WebAppsClientCreateOrUpdatePublicCertificateResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdatePublicCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdatePublicCertificateCreateRequest(ctx, resourceGroupName, name, publicCertificateName, publicCertificate, options) + if err != nil { + return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, err + } + resp, err := client.createOrUpdatePublicCertificateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdatePublicCertificateCreateRequest creates the CreateOrUpdatePublicCertificate request. +func (client *WebAppsClient) createOrUpdatePublicCertificateCreateRequest(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, options *WebAppsClientCreateOrUpdatePublicCertificateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if publicCertificateName == "" { + return nil, errors.New("parameter publicCertificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, publicCertificate); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdatePublicCertificateHandleResponse handles the CreateOrUpdatePublicCertificate response. +func (client *WebAppsClient) createOrUpdatePublicCertificateHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdatePublicCertificateResponse, error) { + result := WebAppsClientCreateOrUpdatePublicCertificateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificate); err != nil { + return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, err + } + return result, nil +} + +// CreateOrUpdatePublicCertificateSlot - Description for Creates a hostname binding for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - publicCertificateName - Public certificate name. +// - slot - Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. +// - publicCertificate - Public certificate details. This is the JSON representation of a PublicCertificate object. +// - options - WebAppsClientCreateOrUpdatePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificateSlot +// method. +func (client *WebAppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, slot string, publicCertificate PublicCertificate, options *WebAppsClientCreateOrUpdatePublicCertificateSlotOptions) (WebAppsClientCreateOrUpdatePublicCertificateSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdatePublicCertificateSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdatePublicCertificateSlotCreateRequest(ctx, resourceGroupName, name, publicCertificateName, slot, publicCertificate, options) + if err != nil { + return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, err + } + resp, err := client.createOrUpdatePublicCertificateSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdatePublicCertificateSlotCreateRequest creates the CreateOrUpdatePublicCertificateSlot request. +func (client *WebAppsClient) createOrUpdatePublicCertificateSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, slot string, publicCertificate PublicCertificate, options *WebAppsClientCreateOrUpdatePublicCertificateSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if publicCertificateName == "" { + return nil, errors.New("parameter publicCertificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, publicCertificate); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdatePublicCertificateSlotHandleResponse handles the CreateOrUpdatePublicCertificateSlot response. +func (client *WebAppsClient) createOrUpdatePublicCertificateSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdatePublicCertificateSlotResponse, error) { + result := WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificate); err != nil { + return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, err + } + return result, nil +} + +// CreateOrUpdateRelayServiceConnection - Description for Creates a new hybrid connection configuration (PUT), or updates +// an existing one (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - entityName - Name of the hybrid connection configuration. +// - connectionEnvelope - Details of the hybrid connection configuration. +// - options - WebAppsClientCreateOrUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnection +// method. +func (client *WebAppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientCreateOrUpdateRelayServiceConnectionOptions) (WebAppsClientCreateOrUpdateRelayServiceConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateRelayServiceConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, connectionEnvelope, options) + if err != nil { + return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, err + } + resp, err := client.createOrUpdateRelayServiceConnectionHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateRelayServiceConnectionCreateRequest creates the CreateOrUpdateRelayServiceConnection request. +func (client *WebAppsClient) createOrUpdateRelayServiceConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientCreateOrUpdateRelayServiceConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if entityName == "" { + return nil, errors.New("parameter entityName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateRelayServiceConnectionHandleResponse handles the CreateOrUpdateRelayServiceConnection response. +func (client *WebAppsClient) createOrUpdateRelayServiceConnectionHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateRelayServiceConnectionResponse, error) { + result := WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { + return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, err + } + return result, nil +} + +// CreateOrUpdateRelayServiceConnectionSlot - Description for Creates a new hybrid connection configuration (PUT), or updates +// an existing one (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - entityName - Name of the hybrid connection configuration. +// - slot - Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the +// production slot. +// - connectionEnvelope - Details of the hybrid connection configuration. +// - options - WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot +// method. +func (client *WebAppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions) (WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, connectionEnvelope, options) + if err != nil { + return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, err + } + resp, err := client.createOrUpdateRelayServiceConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateRelayServiceConnectionSlotCreateRequest creates the CreateOrUpdateRelayServiceConnectionSlot request. +func (client *WebAppsClient) createOrUpdateRelayServiceConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if entityName == "" { + return nil, errors.New("parameter entityName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateRelayServiceConnectionSlotHandleResponse handles the CreateOrUpdateRelayServiceConnectionSlot response. +func (client *WebAppsClient) createOrUpdateRelayServiceConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse, error) { + result := WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { + return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, err + } + return result, nil +} + +// CreateOrUpdateSiteContainer - Creates or Updates a site container for a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - containerName - Site Container Name +// - request - Container Entity +// - options - WebAppsClientCreateOrUpdateSiteContainerOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSiteContainer +// method. +func (client *WebAppsClient) CreateOrUpdateSiteContainer(ctx context.Context, resourceGroupName string, name string, containerName string, request SiteContainer, options *WebAppsClientCreateOrUpdateSiteContainerOptions) (WebAppsClientCreateOrUpdateSiteContainerResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateSiteContainer" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateSiteContainerCreateRequest(ctx, resourceGroupName, name, containerName, request, options) + if err != nil { + return WebAppsClientCreateOrUpdateSiteContainerResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateSiteContainerResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateSiteContainerResponse{}, err + } + resp, err := client.createOrUpdateSiteContainerHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateSiteContainerCreateRequest creates the CreateOrUpdateSiteContainer request. +func (client *WebAppsClient) createOrUpdateSiteContainerCreateRequest(ctx context.Context, resourceGroupName string, name string, containerName string, request SiteContainer, options *WebAppsClientCreateOrUpdateSiteContainerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateSiteContainerHandleResponse handles the CreateOrUpdateSiteContainer response. +func (client *WebAppsClient) createOrUpdateSiteContainerHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateSiteContainerResponse, error) { + result := WebAppsClientCreateOrUpdateSiteContainerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainer); err != nil { + return WebAppsClientCreateOrUpdateSiteContainerResponse{}, err + } + return result, nil +} + +// CreateOrUpdateSiteContainerSlot - Creates or Updates a site container for a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will create the container for the production slot. +// - containerName - Site Container Name +// - request - Container Entity +// - options - WebAppsClientCreateOrUpdateSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSiteContainerSlot +// method. +func (client *WebAppsClient) CreateOrUpdateSiteContainerSlot(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, request SiteContainer, options *WebAppsClientCreateOrUpdateSiteContainerSlotOptions) (WebAppsClientCreateOrUpdateSiteContainerSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateSiteContainerSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateSiteContainerSlotCreateRequest(ctx, resourceGroupName, name, slot, containerName, request, options) + if err != nil { + return WebAppsClientCreateOrUpdateSiteContainerSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateSiteContainerSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateSiteContainerSlotResponse{}, err + } + resp, err := client.createOrUpdateSiteContainerSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateSiteContainerSlotCreateRequest creates the CreateOrUpdateSiteContainerSlot request. +func (client *WebAppsClient) createOrUpdateSiteContainerSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, request SiteContainer, options *WebAppsClientCreateOrUpdateSiteContainerSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateSiteContainerSlotHandleResponse handles the CreateOrUpdateSiteContainerSlot response. +func (client *WebAppsClient) createOrUpdateSiteContainerSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateSiteContainerSlotResponse, error) { + result := WebAppsClientCreateOrUpdateSiteContainerSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainer); err != nil { + return WebAppsClientCreateOrUpdateSiteContainerSlotResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdateSlot - Description for Creates a new web, mobile, or API app in an existing resource group, or updates +// an existing app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. +// - slot - Name of the deployment slot to create or update. By default, this API attempts to create or modify the production +// slot. +// - siteEnvelope - A JSON representation of the app properties. See example. +// - options - WebAppsClientBeginCreateOrUpdateSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSlot +// method. +func (client *WebAppsClient) BeginCreateOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateSlotOptions) (*runtime.Poller[WebAppsClientCreateOrUpdateSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdateSlot(ctx, resourceGroupName, name, slot, siteEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateOrUpdateSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateOrUpdateSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdateSlot - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an +// existing app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) createOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateOrUpdateSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateSlotCreateRequest(ctx, resourceGroupName, name, slot, siteEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateSlotCreateRequest creates the CreateOrUpdateSlot request. +func (client *WebAppsClient) createOrUpdateSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdateSourceControl - Description for Updates the source control configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - siteSourceControl - JSON representation of a SiteSourceControl object. See example. +// - options - WebAppsClientBeginCreateOrUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControl +// method. +func (client *WebAppsClient) BeginCreateOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlOptions) (*runtime.Poller[WebAppsClientCreateOrUpdateSourceControlResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdateSourceControl(ctx, resourceGroupName, name, siteSourceControl, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateOrUpdateSourceControlResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateOrUpdateSourceControlResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdateSourceControl - Description for Updates the source control configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) createOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateOrUpdateSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateSourceControlCreateRequest(ctx, resourceGroupName, name, siteSourceControl, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateSourceControlCreateRequest creates the CreateOrUpdateSourceControl request. +func (client *WebAppsClient) createOrUpdateSourceControlCreateRequest(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteSourceControl); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdateSourceControlSlot - Description for Updates the source control configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for +// the production slot. +// - siteSourceControl - JSON representation of a SiteSourceControl object. See example. +// - options - WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControlSlot +// method. +func (client *WebAppsClient) BeginCreateOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions) (*runtime.Poller[WebAppsClientCreateOrUpdateSourceControlSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdateSourceControlSlot(ctx, resourceGroupName, name, slot, siteSourceControl, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateOrUpdateSourceControlSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateOrUpdateSourceControlSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdateSourceControlSlot - Description for Updates the source control configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) createOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateOrUpdateSourceControlSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, siteSourceControl, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateSourceControlSlotCreateRequest creates the CreateOrUpdateSourceControlSlot request. +func (client *WebAppsClient) createOrUpdateSourceControlSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteSourceControl); err != nil { + return nil, err + } + return req, nil +} + +// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck - Description for Integrates this Web App with a Virtual Network. +// This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has +// already been +// delegated, and is not in use by another App Service Plan other than the one this App is in. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - connectionEnvelope - Properties of the Virtual Network connection. See example. +// - options - WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for +// the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck method. +func (client *WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckCreateRequest(ctx, resourceGroupName, name, connectionEnvelope, options) + if err != nil { + return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err + } + resp, err := client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateSwiftVirtualNetworkConnectionWithCheckCreateRequest creates the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck request. +func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithCheckCreateRequest(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateSwiftVirtualNetworkConnectionWithCheckHandleResponse handles the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck response. +func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithCheckHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error) { + result := WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { + return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err + } + return result, nil +} + +// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot - Description for Integrates this Web App with a Virtual Network. +// This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has +// already been +// delegated, and is not in use by another App Service Plan other than the one this App is in. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production +// slot. +// - connectionEnvelope - Properties of the Virtual Network connection. See example. +// - options - WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters +// for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot method. +func (client *WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest(ctx, resourceGroupName, name, slot, connectionEnvelope, options) + if err != nil { + return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err + } + resp, err := client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest creates the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot request. +func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse handles the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot response. +func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error) { + result := WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { + return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err + } + return result, nil +} + +// CreateOrUpdateVnetConnection - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the +// connection properties (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of an existing Virtual Network. +// - connectionEnvelope - Properties of the Virtual Network connection. See example. +// - options - WebAppsClientCreateOrUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnection +// method. +func (client *WebAppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfoResource, options *WebAppsClientCreateOrUpdateVnetConnectionOptions) (WebAppsClientCreateOrUpdateVnetConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateVnetConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, connectionEnvelope, options) + if err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, err + } + resp, err := client.createOrUpdateVnetConnectionHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateVnetConnectionCreateRequest creates the CreateOrUpdateVnetConnection request. +func (client *WebAppsClient) createOrUpdateVnetConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfoResource, options *WebAppsClientCreateOrUpdateVnetConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateVnetConnectionHandleResponse handles the CreateOrUpdateVnetConnection response. +func (client *WebAppsClient) createOrUpdateVnetConnectionHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateVnetConnectionResponse, error) { + result := WebAppsClientCreateOrUpdateVnetConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, err + } + return result, nil +} + +// CreateOrUpdateVnetConnectionGateway - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it +// (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of the Virtual Network. +// - gatewayName - Name of the gateway. Currently, the only supported string is "primary". +// - connectionEnvelope - The properties to update this gateway with. +// - options - WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGateway +// method. +func (client *WebAppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions) (WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateVnetConnectionGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateVnetConnectionGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, options) + if err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, err + } + resp, err := client.createOrUpdateVnetConnectionGatewayHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateVnetConnectionGatewayCreateRequest creates the CreateOrUpdateVnetConnectionGateway request. +func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateVnetConnectionGatewayHandleResponse handles the CreateOrUpdateVnetConnectionGateway response. +func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse, error) { + result := WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, err + } + return result, nil +} + +// CreateOrUpdateVnetConnectionGatewaySlot - Description for Adds a gateway to a connected Virtual Network (PUT) or updates +// it (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of the Virtual Network. +// - gatewayName - Name of the gateway. Currently, the only supported string is "primary". +// - slot - Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production +// slot's Virtual Network. +// - connectionEnvelope - The properties to update this gateway with. +// - options - WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot +// method. +func (client *WebAppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope VnetGateway, options *WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions) (WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateVnetConnectionGatewaySlotCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope, options) + if err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, err + } + resp, err := client.createOrUpdateVnetConnectionGatewaySlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateVnetConnectionGatewaySlotCreateRequest creates the CreateOrUpdateVnetConnectionGatewaySlot request. +func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope VnetGateway, options *WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateVnetConnectionGatewaySlotHandleResponse handles the CreateOrUpdateVnetConnectionGatewaySlot response. +func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse, error) { + result := WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, err + } + return result, nil +} + +// CreateOrUpdateVnetConnectionSlot - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates +// the connection properties (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of an existing Virtual Network. +// - slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production +// slot. +// - connectionEnvelope - Properties of the Virtual Network connection. See example. +// - options - WebAppsClientCreateOrUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionSlot +// method. +func (client *WebAppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope VnetInfoResource, options *WebAppsClientCreateOrUpdateVnetConnectionSlotOptions) (WebAppsClientCreateOrUpdateVnetConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateVnetConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, connectionEnvelope, options) + if err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, err + } + resp, err := client.createOrUpdateVnetConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateVnetConnectionSlotCreateRequest creates the CreateOrUpdateVnetConnectionSlot request. +func (client *WebAppsClient) createOrUpdateVnetConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope VnetInfoResource, options *WebAppsClientCreateOrUpdateVnetConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateVnetConnectionSlotHandleResponse handles the CreateOrUpdateVnetConnectionSlot response. +func (client *WebAppsClient) createOrUpdateVnetConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateVnetConnectionSlotResponse, error) { + result := WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { + return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, err + } + return result, nil +} + +// Delete - Description for Deletes a web, mobile, or API app, or one of the deployment slots. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app to delete. +// - options - WebAppsClientDeleteOptions contains the optional parameters for the WebAppsClient.Delete method. +func (client *WebAppsClient) Delete(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteOptions) (WebAppsClientDeleteResponse, error) { + var err error + const operationName = "WebAppsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteResponse{}, err + } + return WebAppsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WebAppsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.DeleteEmptyServerFarm != nil { + reqQP.Set("deleteEmptyServerFarm", strconv.FormatBool(*options.DeleteEmptyServerFarm)) + } + if options != nil && options.DeleteMetrics != nil { + reqQP.Set("deleteMetrics", strconv.FormatBool(*options.DeleteMetrics)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteBackup - Description for Deletes a backup of an app by its ID. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - backupID - ID of the backup. +// - options - WebAppsClientDeleteBackupOptions contains the optional parameters for the WebAppsClient.DeleteBackup method. +func (client *WebAppsClient) DeleteBackup(ctx context.Context, resourceGroupName string, name string, backupID string, options *WebAppsClientDeleteBackupOptions) (WebAppsClientDeleteBackupResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteBackup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteBackupCreateRequest(ctx, resourceGroupName, name, backupID, options) + if err != nil { + return WebAppsClientDeleteBackupResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteBackupResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteBackupResponse{}, err + } + return WebAppsClientDeleteBackupResponse{}, nil +} + +// deleteBackupCreateRequest creates the DeleteBackup request. +func (client *WebAppsClient) deleteBackupCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, options *WebAppsClientDeleteBackupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if backupID == "" { + return nil, errors.New("parameter backupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteBackupConfiguration - Description for Deletes the backup configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientDeleteBackupConfigurationOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfiguration +// method. +func (client *WebAppsClient) DeleteBackupConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteBackupConfigurationOptions) (WebAppsClientDeleteBackupConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteBackupConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteBackupConfigurationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientDeleteBackupConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteBackupConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteBackupConfigurationResponse{}, err + } + return WebAppsClientDeleteBackupConfigurationResponse{}, nil +} + +// deleteBackupConfigurationCreateRequest creates the DeleteBackupConfiguration request. +func (client *WebAppsClient) deleteBackupConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteBackupConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteBackupConfigurationSlot - Description for Deletes the backup configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production +// slot. +// - options - WebAppsClientDeleteBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfigurationSlot +// method. +func (client *WebAppsClient) DeleteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteBackupConfigurationSlotOptions) (WebAppsClientDeleteBackupConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteBackupConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteBackupConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientDeleteBackupConfigurationSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteBackupConfigurationSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteBackupConfigurationSlotResponse{}, err + } + return WebAppsClientDeleteBackupConfigurationSlotResponse{}, nil +} + +// deleteBackupConfigurationSlotCreateRequest creates the DeleteBackupConfigurationSlot request. +func (client *WebAppsClient) deleteBackupConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteBackupConfigurationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteBackupSlot - Description for Deletes a backup of an app by its ID. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - backupID - ID of the backup. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete a backup of the production slot. +// - options - WebAppsClientDeleteBackupSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupSlot +// method. +func (client *WebAppsClient) DeleteBackupSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *WebAppsClientDeleteBackupSlotOptions) (WebAppsClientDeleteBackupSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteBackupSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteBackupSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, options) + if err != nil { + return WebAppsClientDeleteBackupSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteBackupSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteBackupSlotResponse{}, err + } + return WebAppsClientDeleteBackupSlotResponse{}, nil +} + +// deleteBackupSlotCreateRequest creates the DeleteBackupSlot request. +func (client *WebAppsClient) deleteBackupSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *WebAppsClientDeleteBackupSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if backupID == "" { + return nil, errors.New("parameter backupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteContinuousWebJob - Description for Delete a continuous web job by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - options - WebAppsClientDeleteContinuousWebJobOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJob +// method. +func (client *WebAppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientDeleteContinuousWebJobOptions) (WebAppsClientDeleteContinuousWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteContinuousWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) + if err != nil { + return WebAppsClientDeleteContinuousWebJobResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteContinuousWebJobResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteContinuousWebJobResponse{}, err + } + return WebAppsClientDeleteContinuousWebJobResponse{}, nil +} + +// deleteContinuousWebJobCreateRequest creates the DeleteContinuousWebJob request. +func (client *WebAppsClient) deleteContinuousWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientDeleteContinuousWebJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteContinuousWebJobSlot - Description for Delete a continuous web job by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +// - options - WebAppsClientDeleteContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJobSlot +// method. +func (client *WebAppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientDeleteContinuousWebJobSlotOptions) (WebAppsClientDeleteContinuousWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteContinuousWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) + if err != nil { + return WebAppsClientDeleteContinuousWebJobSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteContinuousWebJobSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteContinuousWebJobSlotResponse{}, err + } + return WebAppsClientDeleteContinuousWebJobSlotResponse{}, nil +} + +// deleteContinuousWebJobSlotCreateRequest creates the DeleteContinuousWebJobSlot request. +func (client *WebAppsClient) deleteContinuousWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientDeleteContinuousWebJobSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteDeployment - Description for Delete a deployment by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - id - Deployment ID. +// - options - WebAppsClientDeleteDeploymentOptions contains the optional parameters for the WebAppsClient.DeleteDeployment +// method. +func (client *WebAppsClient) DeleteDeployment(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientDeleteDeploymentOptions) (WebAppsClientDeleteDeploymentResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteDeployment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteDeploymentCreateRequest(ctx, resourceGroupName, name, id, options) + if err != nil { + return WebAppsClientDeleteDeploymentResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteDeploymentResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteDeploymentResponse{}, err + } + return WebAppsClientDeleteDeploymentResponse{}, nil +} + +// deleteDeploymentCreateRequest creates the DeleteDeployment request. +func (client *WebAppsClient) deleteDeploymentCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientDeleteDeploymentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteDeploymentSlot - Description for Delete a deployment by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - id - Deployment ID. +// - slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +// - options - WebAppsClientDeleteDeploymentSlotOptions contains the optional parameters for the WebAppsClient.DeleteDeploymentSlot +// method. +func (client *WebAppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientDeleteDeploymentSlotOptions) (WebAppsClientDeleteDeploymentSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteDeploymentSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteDeploymentSlotCreateRequest(ctx, resourceGroupName, name, id, slot, options) + if err != nil { + return WebAppsClientDeleteDeploymentSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteDeploymentSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteDeploymentSlotResponse{}, err + } + return WebAppsClientDeleteDeploymentSlotResponse{}, nil +} + +// deleteDeploymentSlotCreateRequest creates the DeleteDeploymentSlot request. +func (client *WebAppsClient) deleteDeploymentSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientDeleteDeploymentSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteDomainOwnershipIdentifier - Description for Deletes a domain ownership identifier for a web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - domainOwnershipIdentifierName - Name of domain ownership identifier. +// - options - WebAppsClientDeleteDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifier +// method. +func (client *WebAppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *WebAppsClientDeleteDomainOwnershipIdentifierOptions) (WebAppsClientDeleteDomainOwnershipIdentifierResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteDomainOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, options) + if err != nil { + return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, err + } + return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, nil +} + +// deleteDomainOwnershipIdentifierCreateRequest creates the DeleteDomainOwnershipIdentifier request. +func (client *WebAppsClient) deleteDomainOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *WebAppsClientDeleteDomainOwnershipIdentifierOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainOwnershipIdentifierName == "" { + return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteDomainOwnershipIdentifierSlot - Description for Deletes a domain ownership identifier for a web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - domainOwnershipIdentifierName - Name of domain ownership identifier. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. +// - options - WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifierSlot +// method. +func (client *WebAppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions) (WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteDomainOwnershipIdentifierSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, options) + if err != nil { + return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, err + } + return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, nil +} + +// deleteDomainOwnershipIdentifierSlotCreateRequest creates the DeleteDomainOwnershipIdentifierSlot request. +func (client *WebAppsClient) deleteDomainOwnershipIdentifierSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainOwnershipIdentifierName == "" { + return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteFunction - Description for Delete a function for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - Function name. +// - options - WebAppsClientDeleteFunctionOptions contains the optional parameters for the WebAppsClient.DeleteFunction method. +func (client *WebAppsClient) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientDeleteFunctionOptions) (WebAppsClientDeleteFunctionResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteFunction" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteFunctionCreateRequest(ctx, resourceGroupName, name, functionName, options) + if err != nil { + return WebAppsClientDeleteFunctionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteFunctionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteFunctionResponse{}, err + } + return WebAppsClientDeleteFunctionResponse{}, nil +} + +// deleteFunctionCreateRequest creates the DeleteFunction request. +func (client *WebAppsClient) deleteFunctionCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientDeleteFunctionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteFunctionSecret - Description for Delete a function secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - The name of the function. +// - keyName - The name of the key. +// - options - WebAppsClientDeleteFunctionSecretOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecret +// method. +func (client *WebAppsClient) DeleteFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, options *WebAppsClientDeleteFunctionSecretOptions) (WebAppsClientDeleteFunctionSecretResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteFunctionSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteFunctionSecretCreateRequest(ctx, resourceGroupName, name, functionName, keyName, options) + if err != nil { + return WebAppsClientDeleteFunctionSecretResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteFunctionSecretResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteFunctionSecretResponse{}, err + } + return WebAppsClientDeleteFunctionSecretResponse{}, nil +} + +// deleteFunctionSecretCreateRequest creates the DeleteFunctionSecret request. +func (client *WebAppsClient) deleteFunctionSecretCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, options *WebAppsClientDeleteFunctionSecretOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteFunctionSecretSlot - Description for Delete a function secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - The name of the function. +// - keyName - The name of the key. +// - slot - Name of the deployment slot. +// - options - WebAppsClientDeleteFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecretSlot +// method. +func (client *WebAppsClient) DeleteFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, options *WebAppsClientDeleteFunctionSecretSlotOptions) (WebAppsClientDeleteFunctionSecretSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteFunctionSecretSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteFunctionSecretSlotCreateRequest(ctx, resourceGroupName, name, functionName, keyName, slot, options) + if err != nil { + return WebAppsClientDeleteFunctionSecretSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteFunctionSecretSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteFunctionSecretSlotResponse{}, err + } + return WebAppsClientDeleteFunctionSecretSlotResponse{}, nil +} + +// deleteFunctionSecretSlotCreateRequest creates the DeleteFunctionSecretSlot request. +func (client *WebAppsClient) deleteFunctionSecretSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, options *WebAppsClientDeleteFunctionSecretSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteHostNameBinding - Description for Deletes a hostname binding for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - hostName - Hostname in the hostname binding. +// - options - WebAppsClientDeleteHostNameBindingOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBinding +// method. +func (client *WebAppsClient) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, options *WebAppsClientDeleteHostNameBindingOptions) (WebAppsClientDeleteHostNameBindingResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHostNameBinding" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteHostNameBindingCreateRequest(ctx, resourceGroupName, name, hostName, options) + if err != nil { + return WebAppsClientDeleteHostNameBindingResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteHostNameBindingResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHostNameBindingResponse{}, err + } + return WebAppsClientDeleteHostNameBindingResponse{}, nil +} + +// deleteHostNameBindingCreateRequest creates the DeleteHostNameBinding request. +func (client *WebAppsClient) deleteHostNameBindingCreateRequest(ctx context.Context, resourceGroupName string, name string, hostName string, options *WebAppsClientDeleteHostNameBindingOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if hostName == "" { + return nil, errors.New("parameter hostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteHostNameBindingSlot - Description for Deletes a hostname binding for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. +// - hostName - Hostname in the hostname binding. +// - options - WebAppsClientDeleteHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBindingSlot +// method. +func (client *WebAppsClient) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *WebAppsClientDeleteHostNameBindingSlotOptions) (WebAppsClientDeleteHostNameBindingSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHostNameBindingSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteHostNameBindingSlotCreateRequest(ctx, resourceGroupName, name, slot, hostName, options) + if err != nil { + return WebAppsClientDeleteHostNameBindingSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteHostNameBindingSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHostNameBindingSlotResponse{}, err + } + return WebAppsClientDeleteHostNameBindingSlotResponse{}, nil +} + +// deleteHostNameBindingSlotCreateRequest creates the DeleteHostNameBindingSlot request. +func (client *WebAppsClient) deleteHostNameBindingSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *WebAppsClientDeleteHostNameBindingSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if hostName == "" { + return nil, errors.New("parameter hostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteHostSecret - Description for Delete a host level secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - keyType - The type of host key. +// - keyName - The name of the key. +// - options - WebAppsClientDeleteHostSecretOptions contains the optional parameters for the WebAppsClient.DeleteHostSecret +// method. +func (client *WebAppsClient) DeleteHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, options *WebAppsClientDeleteHostSecretOptions) (WebAppsClientDeleteHostSecretResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHostSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteHostSecretCreateRequest(ctx, resourceGroupName, name, keyType, keyName, options) + if err != nil { + return WebAppsClientDeleteHostSecretResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteHostSecretResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHostSecretResponse{}, err + } + return WebAppsClientDeleteHostSecretResponse{}, nil +} + +// deleteHostSecretCreateRequest creates the DeleteHostSecret request. +func (client *WebAppsClient) deleteHostSecretCreateRequest(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, options *WebAppsClientDeleteHostSecretOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyType == "" { + return nil, errors.New("parameter keyType cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyType}", url.PathEscape(keyType)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteHostSecretSlot - Description for Delete a host level secret. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - keyType - The type of host key. +// - keyName - The name of the key. +// - slot - Name of the deployment slot. +// - options - WebAppsClientDeleteHostSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostSecretSlot +// method. +func (client *WebAppsClient) DeleteHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, options *WebAppsClientDeleteHostSecretSlotOptions) (WebAppsClientDeleteHostSecretSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHostSecretSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteHostSecretSlotCreateRequest(ctx, resourceGroupName, name, keyType, keyName, slot, options) + if err != nil { + return WebAppsClientDeleteHostSecretSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteHostSecretSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHostSecretSlotResponse{}, err + } + return WebAppsClientDeleteHostSecretSlotResponse{}, nil +} + +// deleteHostSecretSlotCreateRequest creates the DeleteHostSecretSlot request. +func (client *WebAppsClient) deleteHostSecretSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, options *WebAppsClientDeleteHostSecretSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyType == "" { + return nil, errors.New("parameter keyType cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyType}", url.PathEscape(keyType)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteHybridConnection - Description for Removes a Hybrid Connection from this site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - namespaceName - The namespace for this hybrid connection. +// - relayName - The relay name for this hybrid connection. +// - options - WebAppsClientDeleteHybridConnectionOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnection +// method. +func (client *WebAppsClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *WebAppsClientDeleteHybridConnectionOptions) (WebAppsClientDeleteHybridConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) + if err != nil { + return WebAppsClientDeleteHybridConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteHybridConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHybridConnectionResponse{}, err + } + return WebAppsClientDeleteHybridConnectionResponse{}, nil +} + +// deleteHybridConnectionCreateRequest creates the DeleteHybridConnection request. +func (client *WebAppsClient) deleteHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *WebAppsClientDeleteHybridConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteHybridConnectionSlot - Description for Removes a Hybrid Connection from this site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - namespaceName - The namespace for this hybrid connection. +// - relayName - The relay name for this hybrid connection. +// - slot - The name of the slot for the web app. +// - options - WebAppsClientDeleteHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnectionSlot +// method. +func (client *WebAppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *WebAppsClientDeleteHybridConnectionSlotOptions) (WebAppsClientDeleteHybridConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHybridConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, options) + if err != nil { + return WebAppsClientDeleteHybridConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteHybridConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHybridConnectionSlotResponse{}, err + } + return WebAppsClientDeleteHybridConnectionSlotResponse{}, nil +} + +// deleteHybridConnectionSlotCreateRequest creates the DeleteHybridConnectionSlot request. +func (client *WebAppsClient) deleteHybridConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *WebAppsClientDeleteHybridConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteInstanceFunctionSlot - Description for Delete a function for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - Function name. +// - slot - Name of the deployment slot. +// - options - WebAppsClientDeleteInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceFunctionSlot +// method. +func (client *WebAppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientDeleteInstanceFunctionSlotOptions) (WebAppsClientDeleteInstanceFunctionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteInstanceFunctionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) + if err != nil { + return WebAppsClientDeleteInstanceFunctionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteInstanceFunctionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteInstanceFunctionSlotResponse{}, err + } + return WebAppsClientDeleteInstanceFunctionSlotResponse{}, nil +} + +// deleteInstanceFunctionSlotCreateRequest creates the DeleteInstanceFunctionSlot request. +func (client *WebAppsClient) deleteInstanceFunctionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientDeleteInstanceFunctionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteInstanceProcess - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific +// scaled-out instance in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - 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". +// - options - WebAppsClientDeleteInstanceProcessOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcess +// method. +func (client *WebAppsClient) DeleteInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientDeleteInstanceProcessOptions) (WebAppsClientDeleteInstanceProcessResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteInstanceProcess" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteInstanceProcessCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) + if err != nil { + return WebAppsClientDeleteInstanceProcessResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteInstanceProcessResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteInstanceProcessResponse{}, err + } + return WebAppsClientDeleteInstanceProcessResponse{}, nil +} + +// deleteInstanceProcessCreateRequest creates the DeleteInstanceProcess request. +func (client *WebAppsClient) deleteInstanceProcessCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientDeleteInstanceProcessOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteInstanceProcessSlot - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific +// scaled-out instance in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - 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". +// - options - WebAppsClientDeleteInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcessSlot +// method. +func (client *WebAppsClient) DeleteInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientDeleteInstanceProcessSlotOptions) (WebAppsClientDeleteInstanceProcessSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteInstanceProcessSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteInstanceProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) + if err != nil { + return WebAppsClientDeleteInstanceProcessSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteInstanceProcessSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteInstanceProcessSlotResponse{}, err + } + return WebAppsClientDeleteInstanceProcessSlotResponse{}, nil +} + +// deleteInstanceProcessSlotCreateRequest creates the DeleteInstanceProcessSlot request. +func (client *WebAppsClient) deleteInstanceProcessSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientDeleteInstanceProcessSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeletePremierAddOn - Description for Delete a premier add-on from an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - premierAddOnName - Add-on name. +// - options - WebAppsClientDeletePremierAddOnOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOn +// method. +func (client *WebAppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *WebAppsClientDeletePremierAddOnOptions) (WebAppsClientDeletePremierAddOnResponse, error) { + var err error + const operationName = "WebAppsClient.DeletePremierAddOn" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deletePremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, options) + if err != nil { + return WebAppsClientDeletePremierAddOnResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeletePremierAddOnResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeletePremierAddOnResponse{}, err + } + return WebAppsClientDeletePremierAddOnResponse{}, nil +} + +// deletePremierAddOnCreateRequest creates the DeletePremierAddOn request. +func (client *WebAppsClient) deletePremierAddOnCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *WebAppsClientDeletePremierAddOnOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if premierAddOnName == "" { + return nil, errors.New("parameter premierAddOnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeletePremierAddOnSlot - Description for Delete a premier add-on from an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - premierAddOnName - Add-on name. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the production +// slot. +// - options - WebAppsClientDeletePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOnSlot +// method. +func (client *WebAppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *WebAppsClientDeletePremierAddOnSlotOptions) (WebAppsClientDeletePremierAddOnSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeletePremierAddOnSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deletePremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, options) + if err != nil { + return WebAppsClientDeletePremierAddOnSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeletePremierAddOnSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeletePremierAddOnSlotResponse{}, err + } + return WebAppsClientDeletePremierAddOnSlotResponse{}, nil +} + +// deletePremierAddOnSlotCreateRequest creates the DeletePremierAddOnSlot request. +func (client *WebAppsClient) deletePremierAddOnSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *WebAppsClientDeletePremierAddOnSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if premierAddOnName == "" { + return nil, errors.New("parameter premierAddOnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - options - WebAppsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnection +// method. +func (client *WebAppsClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientBeginDeletePrivateEndpointConnectionOptions) (*runtime.Poller[WebAppsClientDeletePrivateEndpointConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginDeletePrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. +func (client *WebAppsClient) deletePrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientBeginDeletePrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDeletePrivateEndpointConnectionSlot - Description for Deletes a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - options - WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnectionSlot +// method. +func (client *WebAppsClient) BeginDeletePrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions) (*runtime.Poller[WebAppsClientDeletePrivateEndpointConnectionSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deletePrivateEndpointConnectionSlot(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientDeletePrivateEndpointConnectionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientDeletePrivateEndpointConnectionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeletePrivateEndpointConnectionSlot - Description for Deletes a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) deletePrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginDeletePrivateEndpointConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deletePrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deletePrivateEndpointConnectionSlotCreateRequest creates the DeletePrivateEndpointConnectionSlot request. +func (client *WebAppsClient) deletePrivateEndpointConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteProcess - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out +// instance in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - options - WebAppsClientDeleteProcessOptions contains the optional parameters for the WebAppsClient.DeleteProcess method. +func (client *WebAppsClient) DeleteProcess(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientDeleteProcessOptions) (WebAppsClientDeleteProcessResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteProcess" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteProcessCreateRequest(ctx, resourceGroupName, name, processID, options) + if err != nil { + return WebAppsClientDeleteProcessResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteProcessResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteProcessResponse{}, err + } + return WebAppsClientDeleteProcessResponse{}, nil +} + +// deleteProcessCreateRequest creates the DeleteProcess request. +func (client *WebAppsClient) deleteProcessCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientDeleteProcessOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteProcessSlot - Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out +// instance in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientDeleteProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteProcessSlot +// method. +func (client *WebAppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientDeleteProcessSlotOptions) (WebAppsClientDeleteProcessSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteProcessSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) + if err != nil { + return WebAppsClientDeleteProcessSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteProcessSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteProcessSlotResponse{}, err + } + return WebAppsClientDeleteProcessSlotResponse{}, nil +} + +// deleteProcessSlotCreateRequest creates the DeleteProcessSlot request. +func (client *WebAppsClient) deleteProcessSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientDeleteProcessSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeletePublicCertificate - Description for Deletes a hostname binding for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - publicCertificateName - Public certificate name. +// - options - WebAppsClientDeletePublicCertificateOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificate +// method. +func (client *WebAppsClient) DeletePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *WebAppsClientDeletePublicCertificateOptions) (WebAppsClientDeletePublicCertificateResponse, error) { + var err error + const operationName = "WebAppsClient.DeletePublicCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deletePublicCertificateCreateRequest(ctx, resourceGroupName, name, publicCertificateName, options) + if err != nil { + return WebAppsClientDeletePublicCertificateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeletePublicCertificateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeletePublicCertificateResponse{}, err + } + return WebAppsClientDeletePublicCertificateResponse{}, nil +} + +// deletePublicCertificateCreateRequest creates the DeletePublicCertificate request. +func (client *WebAppsClient) deletePublicCertificateCreateRequest(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *WebAppsClientDeletePublicCertificateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if publicCertificateName == "" { + return nil, errors.New("parameter publicCertificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeletePublicCertificateSlot - Description for Deletes a hostname binding for an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. +// - publicCertificateName - Public certificate name. +// - options - WebAppsClientDeletePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificateSlot +// method. +func (client *WebAppsClient) DeletePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *WebAppsClientDeletePublicCertificateSlotOptions) (WebAppsClientDeletePublicCertificateSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeletePublicCertificateSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deletePublicCertificateSlotCreateRequest(ctx, resourceGroupName, name, slot, publicCertificateName, options) + if err != nil { + return WebAppsClientDeletePublicCertificateSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeletePublicCertificateSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeletePublicCertificateSlotResponse{}, err + } + return WebAppsClientDeletePublicCertificateSlotResponse{}, nil +} + +// deletePublicCertificateSlotCreateRequest creates the DeletePublicCertificateSlot request. +func (client *WebAppsClient) deletePublicCertificateSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *WebAppsClientDeletePublicCertificateSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if publicCertificateName == "" { + return nil, errors.New("parameter publicCertificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteRelayServiceConnection - Description for Deletes a relay service connection by its name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - entityName - Name of the hybrid connection configuration. +// - options - WebAppsClientDeleteRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnection +// method. +func (client *WebAppsClient) DeleteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, options *WebAppsClientDeleteRelayServiceConnectionOptions) (WebAppsClientDeleteRelayServiceConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteRelayServiceConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, options) + if err != nil { + return WebAppsClientDeleteRelayServiceConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteRelayServiceConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteRelayServiceConnectionResponse{}, err + } + return WebAppsClientDeleteRelayServiceConnectionResponse{}, nil +} + +// deleteRelayServiceConnectionCreateRequest creates the DeleteRelayServiceConnection request. +func (client *WebAppsClient) deleteRelayServiceConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, options *WebAppsClientDeleteRelayServiceConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if entityName == "" { + return nil, errors.New("parameter entityName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteRelayServiceConnectionSlot - Description for Deletes a relay service connection by its name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - entityName - Name of the hybrid connection configuration. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for the production +// slot. +// - options - WebAppsClientDeleteRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnectionSlot +// method. +func (client *WebAppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *WebAppsClientDeleteRelayServiceConnectionSlotOptions) (WebAppsClientDeleteRelayServiceConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteRelayServiceConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, options) + if err != nil { + return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, err + } + return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, nil +} + +// deleteRelayServiceConnectionSlotCreateRequest creates the DeleteRelayServiceConnectionSlot request. +func (client *WebAppsClient) deleteRelayServiceConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *WebAppsClientDeleteRelayServiceConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if entityName == "" { + return nil, errors.New("parameter entityName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSiteContainer - Deletes a site container for a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - containerName - Site Container Name +// - options - WebAppsClientDeleteSiteContainerOptions contains the optional parameters for the WebAppsClient.DeleteSiteContainer +// method. +func (client *WebAppsClient) DeleteSiteContainer(ctx context.Context, resourceGroupName string, name string, containerName string, options *WebAppsClientDeleteSiteContainerOptions) (WebAppsClientDeleteSiteContainerResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSiteContainer" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteSiteContainerCreateRequest(ctx, resourceGroupName, name, containerName, options) + if err != nil { + return WebAppsClientDeleteSiteContainerResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteSiteContainerResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSiteContainerResponse{}, err + } + return WebAppsClientDeleteSiteContainerResponse{}, nil +} + +// deleteSiteContainerCreateRequest creates the DeleteSiteContainer request. +func (client *WebAppsClient) deleteSiteContainerCreateRequest(ctx context.Context, resourceGroupName string, name string, containerName string, options *WebAppsClientDeleteSiteContainerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSiteContainerSlot - Deletes a site container for a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the container for the production slot. +// - containerName - Site Container Name +// - options - WebAppsClientDeleteSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteContainerSlot +// method. +func (client *WebAppsClient) DeleteSiteContainerSlot(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, options *WebAppsClientDeleteSiteContainerSlotOptions) (WebAppsClientDeleteSiteContainerSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSiteContainerSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteSiteContainerSlotCreateRequest(ctx, resourceGroupName, name, slot, containerName, options) + if err != nil { + return WebAppsClientDeleteSiteContainerSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteSiteContainerSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSiteContainerSlotResponse{}, err + } + return WebAppsClientDeleteSiteContainerSlotResponse{}, nil +} + +// deleteSiteContainerSlotCreateRequest creates the DeleteSiteContainerSlot request. +func (client *WebAppsClient) deleteSiteContainerSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, options *WebAppsClientDeleteSiteContainerSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSiteExtension - Description for Remove a site extension from a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - siteExtensionID - Site extension name. +// - options - WebAppsClientDeleteSiteExtensionOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtension +// method. +func (client *WebAppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientDeleteSiteExtensionOptions) (WebAppsClientDeleteSiteExtensionResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSiteExtension" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) + if err != nil { + return WebAppsClientDeleteSiteExtensionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteSiteExtensionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSiteExtensionResponse{}, err + } + return WebAppsClientDeleteSiteExtensionResponse{}, nil +} + +// deleteSiteExtensionCreateRequest creates the DeleteSiteExtension request. +func (client *WebAppsClient) deleteSiteExtensionCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientDeleteSiteExtensionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if siteExtensionID == "" { + return nil, errors.New("parameter siteExtensionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSiteExtensionSlot - Description for Remove a site extension from a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - siteExtensionID - Site extension name. +// - slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +// - options - WebAppsClientDeleteSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtensionSlot +// method. +func (client *WebAppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientDeleteSiteExtensionSlotOptions) (WebAppsClientDeleteSiteExtensionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSiteExtensionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) + if err != nil { + return WebAppsClientDeleteSiteExtensionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteSiteExtensionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSiteExtensionSlotResponse{}, err + } + return WebAppsClientDeleteSiteExtensionSlotResponse{}, nil +} + +// deleteSiteExtensionSlotCreateRequest creates the DeleteSiteExtensionSlot request. +func (client *WebAppsClient) deleteSiteExtensionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientDeleteSiteExtensionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if siteExtensionID == "" { + return nil, errors.New("parameter siteExtensionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSlot - Description for Deletes a web, mobile, or API app, or one of the deployment slots. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app to delete. +// - slot - Name of the deployment slot to delete. By default, the API deletes the production slot. +// - options - WebAppsClientDeleteSlotOptions contains the optional parameters for the WebAppsClient.DeleteSlot method. +func (client *WebAppsClient) DeleteSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSlotOptions) (WebAppsClientDeleteSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientDeleteSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSlotResponse{}, err + } + return WebAppsClientDeleteSlotResponse{}, nil +} + +// deleteSlotCreateRequest creates the DeleteSlot request. +func (client *WebAppsClient) deleteSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.DeleteEmptyServerFarm != nil { + reqQP.Set("deleteEmptyServerFarm", strconv.FormatBool(*options.DeleteEmptyServerFarm)) + } + if options != nil && options.DeleteMetrics != nil { + reqQP.Set("deleteMetrics", strconv.FormatBool(*options.DeleteMetrics)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSourceControl - Description for Deletes the source control configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientDeleteSourceControlOptions contains the optional parameters for the WebAppsClient.DeleteSourceControl +// method. +func (client *WebAppsClient) DeleteSourceControl(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteSourceControlOptions) (WebAppsClientDeleteSourceControlResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteSourceControlCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientDeleteSourceControlResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteSourceControlResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSourceControlResponse{}, err + } + return WebAppsClientDeleteSourceControlResponse{}, nil +} + +// deleteSourceControlCreateRequest creates the DeleteSourceControl request. +func (client *WebAppsClient) deleteSourceControlCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteSourceControlOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.AdditionalFlags != nil { + reqQP.Set("additionalFlags", *options.AdditionalFlags) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSourceControlSlot - Description for Deletes the source control configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for +// the production slot. +// - options - WebAppsClientDeleteSourceControlSlotOptions contains the optional parameters for the WebAppsClient.DeleteSourceControlSlot +// method. +func (client *WebAppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSourceControlSlotOptions) (WebAppsClientDeleteSourceControlSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSourceControlSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientDeleteSourceControlSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteSourceControlSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSourceControlSlotResponse{}, err + } + return WebAppsClientDeleteSourceControlSlotResponse{}, nil +} + +// deleteSourceControlSlotCreateRequest creates the DeleteSourceControlSlot request. +func (client *WebAppsClient) deleteSourceControlSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSourceControlSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.AdditionalFlags != nil { + reqQP.Set("additionalFlags", *options.AdditionalFlags) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSwiftVirtualNetwork - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientDeleteSwiftVirtualNetworkOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetwork +// method. +func (client *WebAppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteSwiftVirtualNetworkOptions) (WebAppsClientDeleteSwiftVirtualNetworkResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSwiftVirtualNetwork" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteSwiftVirtualNetworkCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, err + } + return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, nil +} + +// deleteSwiftVirtualNetworkCreateRequest creates the DeleteSwiftVirtualNetwork request. +func (client *WebAppsClient) deleteSwiftVirtualNetworkCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteSwiftVirtualNetworkOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteSwiftVirtualNetworkSlot - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. +// - options - WebAppsClientDeleteSwiftVirtualNetworkSlotOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetworkSlot +// method. +func (client *WebAppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSwiftVirtualNetworkSlotOptions) (WebAppsClientDeleteSwiftVirtualNetworkSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSwiftVirtualNetworkSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteSwiftVirtualNetworkSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, err + } + return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, nil +} + +// deleteSwiftVirtualNetworkSlotCreateRequest creates the DeleteSwiftVirtualNetworkSlot request. +func (client *WebAppsClient) deleteSwiftVirtualNetworkSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSwiftVirtualNetworkSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteTriggeredWebJob - Description for Delete a triggered web job by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - options - WebAppsClientDeleteTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJob +// method. +func (client *WebAppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientDeleteTriggeredWebJobOptions) (WebAppsClientDeleteTriggeredWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteTriggeredWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteTriggeredWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) + if err != nil { + return WebAppsClientDeleteTriggeredWebJobResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteTriggeredWebJobResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteTriggeredWebJobResponse{}, err + } + return WebAppsClientDeleteTriggeredWebJobResponse{}, nil +} + +// deleteTriggeredWebJobCreateRequest creates the DeleteTriggeredWebJob request. +func (client *WebAppsClient) deleteTriggeredWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientDeleteTriggeredWebJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteTriggeredWebJobSlot - Description for Delete a triggered web job by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - slot - Name of the deployment slot. If a slot is not specified, the API deletes web job for the production slot. +// - options - WebAppsClientDeleteTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJobSlot +// method. +func (client *WebAppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientDeleteTriggeredWebJobSlotOptions) (WebAppsClientDeleteTriggeredWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteTriggeredWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteTriggeredWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) + if err != nil { + return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, err + } + return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, nil +} + +// deleteTriggeredWebJobSlotCreateRequest creates the DeleteTriggeredWebJobSlot request. +func (client *WebAppsClient) deleteTriggeredWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientDeleteTriggeredWebJobSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteVnetConnection - Description for Deletes a connection from an app (or deployment slot to a named virtual network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of the virtual network. +// - options - WebAppsClientDeleteVnetConnectionOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnection +// method. +func (client *WebAppsClient) DeleteVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, options *WebAppsClientDeleteVnetConnectionOptions) (WebAppsClientDeleteVnetConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteVnetConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, options) + if err != nil { + return WebAppsClientDeleteVnetConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteVnetConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteVnetConnectionResponse{}, err + } + return WebAppsClientDeleteVnetConnectionResponse{}, nil +} + +// deleteVnetConnectionCreateRequest creates the DeleteVnetConnection request. +func (client *WebAppsClient) deleteVnetConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, options *WebAppsClientDeleteVnetConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteVnetConnectionSlot - Description for Deletes a connection from an app (or deployment slot to a named virtual network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of the virtual network. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. +// - options - WebAppsClientDeleteVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnectionSlot +// method. +func (client *WebAppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *WebAppsClientDeleteVnetConnectionSlotOptions) (WebAppsClientDeleteVnetConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteVnetConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, options) + if err != nil { + return WebAppsClientDeleteVnetConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeleteVnetConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteVnetConnectionSlotResponse{}, err + } + return WebAppsClientDeleteVnetConnectionSlotResponse{}, nil +} + +// deleteVnetConnectionSlotCreateRequest creates the DeleteVnetConnectionSlot request. +func (client *WebAppsClient) deleteVnetConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *WebAppsClientDeleteVnetConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeployWorkflowArtifacts - Description for Creates the artifacts for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - options - WebAppsClientDeployWorkflowArtifactsOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifacts +// method. +func (client *WebAppsClient) DeployWorkflowArtifacts(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeployWorkflowArtifactsOptions) (WebAppsClientDeployWorkflowArtifactsResponse, error) { + var err error + const operationName = "WebAppsClient.DeployWorkflowArtifacts" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deployWorkflowArtifactsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientDeployWorkflowArtifactsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeployWorkflowArtifactsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeployWorkflowArtifactsResponse{}, err + } + return WebAppsClientDeployWorkflowArtifactsResponse{}, nil +} + +// deployWorkflowArtifactsCreateRequest creates the DeployWorkflowArtifacts request. +func (client *WebAppsClient) deployWorkflowArtifactsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeployWorkflowArtifactsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployWorkflowArtifacts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.WorkflowArtifacts != nil { + if err := runtime.MarshalAsJSON(req, *options.WorkflowArtifacts); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// DeployWorkflowArtifactsSlot - Description for Creates the artifacts for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. +// - options - WebAppsClientDeployWorkflowArtifactsSlotOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifactsSlot +// method. +func (client *WebAppsClient) DeployWorkflowArtifactsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeployWorkflowArtifactsSlotOptions) (WebAppsClientDeployWorkflowArtifactsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeployWorkflowArtifactsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deployWorkflowArtifactsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, err + } + return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, nil +} + +// deployWorkflowArtifactsSlotCreateRequest creates the DeployWorkflowArtifactsSlot request. +func (client *WebAppsClient) deployWorkflowArtifactsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeployWorkflowArtifactsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployWorkflowArtifacts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.WorkflowArtifacts != nil { + if err := runtime.MarshalAsJSON(req, *options.WorkflowArtifacts); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// DiscoverBackup - Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use +// this to get information about the databases stored in a backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - request - A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. +// - options - WebAppsClientDiscoverBackupOptions contains the optional parameters for the WebAppsClient.DiscoverBackup method. +func (client *WebAppsClient) DiscoverBackup(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientDiscoverBackupOptions) (WebAppsClientDiscoverBackupResponse, error) { + var err error + const operationName = "WebAppsClient.DiscoverBackup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.discoverBackupCreateRequest(ctx, resourceGroupName, name, request, options) + if err != nil { + return WebAppsClientDiscoverBackupResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDiscoverBackupResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDiscoverBackupResponse{}, err + } + resp, err := client.discoverBackupHandleResponse(httpResp) + return resp, err +} + +// discoverBackupCreateRequest creates the DiscoverBackup request. +func (client *WebAppsClient) discoverBackupCreateRequest(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientDiscoverBackupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// discoverBackupHandleResponse handles the DiscoverBackup response. +func (client *WebAppsClient) discoverBackupHandleResponse(resp *http.Response) (WebAppsClientDiscoverBackupResponse, error) { + result := WebAppsClientDiscoverBackupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RestoreRequest); err != nil { + return WebAppsClientDiscoverBackupResponse{}, err + } + return result, nil +} + +// DiscoverBackupSlot - Description for Discovers an existing app backup that can be restored from a blob in Azure storage. +// Use this to get information about the databases stored in a backup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. +// - request - A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. +// - options - WebAppsClientDiscoverBackupSlotOptions contains the optional parameters for the WebAppsClient.DiscoverBackupSlot +// method. +func (client *WebAppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientDiscoverBackupSlotOptions) (WebAppsClientDiscoverBackupSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DiscoverBackupSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.discoverBackupSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) + if err != nil { + return WebAppsClientDiscoverBackupSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientDiscoverBackupSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDiscoverBackupSlotResponse{}, err + } + resp, err := client.discoverBackupSlotHandleResponse(httpResp) + return resp, err +} + +// discoverBackupSlotCreateRequest creates the DiscoverBackupSlot request. +func (client *WebAppsClient) discoverBackupSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientDiscoverBackupSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// discoverBackupSlotHandleResponse handles the DiscoverBackupSlot response. +func (client *WebAppsClient) discoverBackupSlotHandleResponse(resp *http.Response) (WebAppsClientDiscoverBackupSlotResponse, error) { + result := WebAppsClientDiscoverBackupSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RestoreRequest); err != nil { + return WebAppsClientDiscoverBackupSlotResponse{}, err + } + return result, nil +} + +// GenerateNewSitePublishingPassword - Description for Generates a new publishing password for an app (or deployment slot, +// if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGenerateNewSitePublishingPasswordOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPassword +// method. +func (client *WebAppsClient) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGenerateNewSitePublishingPasswordOptions) (WebAppsClientGenerateNewSitePublishingPasswordResponse, error) { + var err error + const operationName = "WebAppsClient.GenerateNewSitePublishingPassword" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateNewSitePublishingPasswordCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, err + } + return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, nil +} + +// generateNewSitePublishingPasswordCreateRequest creates the GenerateNewSitePublishingPassword request. +func (client *WebAppsClient) generateNewSitePublishingPasswordCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGenerateNewSitePublishingPasswordOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GenerateNewSitePublishingPasswordSlot - Description for Generates a new publishing password for an app (or deployment slot, +// if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production +// slot. +// - options - WebAppsClientGenerateNewSitePublishingPasswordSlotOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPasswordSlot +// method. +func (client *WebAppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGenerateNewSitePublishingPasswordSlotOptions) (WebAppsClientGenerateNewSitePublishingPasswordSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GenerateNewSitePublishingPasswordSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateNewSitePublishingPasswordSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, err + } + return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, nil +} + +// generateNewSitePublishingPasswordSlotCreateRequest creates the GenerateNewSitePublishingPasswordSlot request. +func (client *WebAppsClient) generateNewSitePublishingPasswordSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGenerateNewSitePublishingPasswordSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Description for Gets the details of a web, mobile, or API app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetOptions contains the optional parameters for the WebAppsClient.Get method. +func (client *WebAppsClient) Get(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetOptions) (WebAppsClientGetResponse, error) { + var err error + const operationName = "WebAppsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WebAppsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WebAppsClient) getHandleResponse(resp *http.Response) (WebAppsClientGetResponse, error) { + result := WebAppsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Site); err != nil { + return WebAppsClientGetResponse{}, err + } + return result, nil +} + +// GetAppSettingKeyVaultReference - Description for Gets the config reference and status of an app +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - appSettingKey - App Setting key name. +// - options - WebAppsClientGetAppSettingKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReference +// method. +func (client *WebAppsClient) GetAppSettingKeyVaultReference(ctx context.Context, resourceGroupName string, name string, appSettingKey string, options *WebAppsClientGetAppSettingKeyVaultReferenceOptions) (WebAppsClientGetAppSettingKeyVaultReferenceResponse, error) { + var err error + const operationName = "WebAppsClient.GetAppSettingKeyVaultReference" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAppSettingKeyVaultReferenceCreateRequest(ctx, resourceGroupName, name, appSettingKey, options) + if err != nil { + return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, err + } + resp, err := client.getAppSettingKeyVaultReferenceHandleResponse(httpResp) + return resp, err +} + +// getAppSettingKeyVaultReferenceCreateRequest creates the GetAppSettingKeyVaultReference request. +func (client *WebAppsClient) getAppSettingKeyVaultReferenceCreateRequest(ctx context.Context, resourceGroupName string, name string, appSettingKey string, options *WebAppsClientGetAppSettingKeyVaultReferenceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if appSettingKey == "" { + return nil, errors.New("parameter appSettingKey cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appSettingKey}", url.PathEscape(appSettingKey)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAppSettingKeyVaultReferenceHandleResponse handles the GetAppSettingKeyVaultReference response. +func (client *WebAppsClient) getAppSettingKeyVaultReferenceHandleResponse(resp *http.Response) (WebAppsClientGetAppSettingKeyVaultReferenceResponse, error) { + result := WebAppsClientGetAppSettingKeyVaultReferenceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReference); err != nil { + return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, err + } + return result, nil +} + +// GetAppSettingKeyVaultReferenceSlot - Description for Gets the config reference and status of an app +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - appSettingKey - App Setting key name. +// - options - WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReferenceSlot +// method. +func (client *WebAppsClient) GetAppSettingKeyVaultReferenceSlot(ctx context.Context, resourceGroupName string, name string, appSettingKey string, slot string, options *WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions) (WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetAppSettingKeyVaultReferenceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAppSettingKeyVaultReferenceSlotCreateRequest(ctx, resourceGroupName, name, appSettingKey, slot, options) + if err != nil { + return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, err + } + resp, err := client.getAppSettingKeyVaultReferenceSlotHandleResponse(httpResp) + return resp, err +} + +// getAppSettingKeyVaultReferenceSlotCreateRequest creates the GetAppSettingKeyVaultReferenceSlot request. +func (client *WebAppsClient) getAppSettingKeyVaultReferenceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, appSettingKey string, slot string, options *WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if appSettingKey == "" { + return nil, errors.New("parameter appSettingKey cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appSettingKey}", url.PathEscape(appSettingKey)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAppSettingKeyVaultReferenceSlotHandleResponse handles the GetAppSettingKeyVaultReferenceSlot response. +func (client *WebAppsClient) getAppSettingKeyVaultReferenceSlotHandleResponse(resp *http.Response) (WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse, error) { + result := WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReference); err != nil { + return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, err + } + return result, nil +} + +// NewGetAppSettingsKeyVaultReferencesPager - Description for Gets the config reference app settings and status of an app +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetAppSettingsKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager +// method. +func (client *WebAppsClient) NewGetAppSettingsKeyVaultReferencesPager(resourceGroupName string, name string, options *WebAppsClientGetAppSettingsKeyVaultReferencesOptions) *runtime.Pager[WebAppsClientGetAppSettingsKeyVaultReferencesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetAppSettingsKeyVaultReferencesResponse]{ + More: func(page WebAppsClientGetAppSettingsKeyVaultReferencesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientGetAppSettingsKeyVaultReferencesResponse) (WebAppsClientGetAppSettingsKeyVaultReferencesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAppSettingsKeyVaultReferencesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientGetAppSettingsKeyVaultReferencesResponse{}, err + } + return client.getAppSettingsKeyVaultReferencesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getAppSettingsKeyVaultReferencesCreateRequest creates the GetAppSettingsKeyVaultReferences request. +func (client *WebAppsClient) getAppSettingsKeyVaultReferencesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAppSettingsKeyVaultReferencesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAppSettingsKeyVaultReferencesHandleResponse handles the GetAppSettingsKeyVaultReferences response. +func (client *WebAppsClient) getAppSettingsKeyVaultReferencesHandleResponse(resp *http.Response) (WebAppsClientGetAppSettingsKeyVaultReferencesResponse, error) { + result := WebAppsClientGetAppSettingsKeyVaultReferencesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReferenceCollection); err != nil { + return WebAppsClientGetAppSettingsKeyVaultReferencesResponse{}, err + } + return result, nil +} + +// NewGetAppSettingsKeyVaultReferencesSlotPager - Description for Gets the config reference app settings and status of an +// app +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager +// method. +func (client *WebAppsClient) NewGetAppSettingsKeyVaultReferencesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions) *runtime.Pager[WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse]{ + More: func(page WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse) (WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAppSettingsKeyVaultReferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{}, err + } + return client.getAppSettingsKeyVaultReferencesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getAppSettingsKeyVaultReferencesSlotCreateRequest creates the GetAppSettingsKeyVaultReferencesSlot request. +func (client *WebAppsClient) getAppSettingsKeyVaultReferencesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAppSettingsKeyVaultReferencesSlotHandleResponse handles the GetAppSettingsKeyVaultReferencesSlot response. +func (client *WebAppsClient) getAppSettingsKeyVaultReferencesSlotHandleResponse(resp *http.Response) (WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse, error) { + result := WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReferenceCollection); err != nil { + return WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{}, err + } + return result, nil +} + +// GetAuthSettings - Description for Gets the Authentication/Authorization settings of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetAuthSettingsOptions contains the optional parameters for the WebAppsClient.GetAuthSettings method. +func (client *WebAppsClient) GetAuthSettings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsOptions) (WebAppsClientGetAuthSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAuthSettingsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetAuthSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetAuthSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsResponse{}, err + } + resp, err := client.getAuthSettingsHandleResponse(httpResp) + return resp, err +} + +// getAuthSettingsCreateRequest creates the GetAuthSettings request. +func (client *WebAppsClient) getAuthSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAuthSettingsHandleResponse handles the GetAuthSettings response. +func (client *WebAppsClient) getAuthSettingsHandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsResponse, error) { + result := WebAppsClientGetAuthSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettings); err != nil { + return WebAppsClientGetAuthSettingsResponse{}, err + } + return result, nil +} + +// GetAuthSettingsSlot - Description for Gets the Authentication/Authorization settings of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. +// - options - WebAppsClientGetAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsSlot +// method. +func (client *WebAppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsSlotOptions) (WebAppsClientGetAuthSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAuthSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetAuthSettingsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetAuthSettingsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsSlotResponse{}, err + } + resp, err := client.getAuthSettingsSlotHandleResponse(httpResp) + return resp, err +} + +// getAuthSettingsSlotCreateRequest creates the GetAuthSettingsSlot request. +func (client *WebAppsClient) getAuthSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAuthSettingsSlotHandleResponse handles the GetAuthSettingsSlot response. +func (client *WebAppsClient) getAuthSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsSlotResponse, error) { + result := WebAppsClientGetAuthSettingsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettings); err != nil { + return WebAppsClientGetAuthSettingsSlotResponse{}, err + } + return result, nil +} + +// GetAuthSettingsV2 - Description for Gets site's Authentication / Authorization settings for apps via the V2 format +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetAuthSettingsV2Options contains the optional parameters for the WebAppsClient.GetAuthSettingsV2 +// method. +func (client *WebAppsClient) GetAuthSettingsV2(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsV2Options) (WebAppsClientGetAuthSettingsV2Response, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettingsV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAuthSettingsV2CreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetAuthSettingsV2Response{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetAuthSettingsV2Response{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsV2Response{}, err + } + resp, err := client.getAuthSettingsV2HandleResponse(httpResp) + return resp, err +} + +// getAuthSettingsV2CreateRequest creates the GetAuthSettingsV2 request. +func (client *WebAppsClient) getAuthSettingsV2CreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsV2Options) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAuthSettingsV2HandleResponse handles the GetAuthSettingsV2 response. +func (client *WebAppsClient) getAuthSettingsV2HandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsV2Response, error) { + result := WebAppsClientGetAuthSettingsV2Response{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { + return WebAppsClientGetAuthSettingsV2Response{}, err + } + return result, nil +} + +// GetAuthSettingsV2Slot - Description for Gets site's Authentication / Authorization settings for apps via the V2 format +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. +// - options - WebAppsClientGetAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2Slot +// method. +func (client *WebAppsClient) GetAuthSettingsV2Slot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsV2SlotOptions) (WebAppsClientGetAuthSettingsV2SlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettingsV2Slot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAuthSettingsV2SlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetAuthSettingsV2SlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetAuthSettingsV2SlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsV2SlotResponse{}, err + } + resp, err := client.getAuthSettingsV2SlotHandleResponse(httpResp) + return resp, err +} + +// getAuthSettingsV2SlotCreateRequest creates the GetAuthSettingsV2Slot request. +func (client *WebAppsClient) getAuthSettingsV2SlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsV2SlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAuthSettingsV2SlotHandleResponse handles the GetAuthSettingsV2Slot response. +func (client *WebAppsClient) getAuthSettingsV2SlotHandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsV2SlotResponse, error) { + result := WebAppsClientGetAuthSettingsV2SlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { + return WebAppsClientGetAuthSettingsV2SlotResponse{}, err + } + return result, nil +} + +// GetAuthSettingsV2WithoutSecrets - Description for Gets site's Authentication / Authorization settings for apps via the +// V2 format +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetAuthSettingsV2WithoutSecretsOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecrets +// method. +func (client *WebAppsClient) GetAuthSettingsV2WithoutSecrets(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsV2WithoutSecretsOptions) (WebAppsClientGetAuthSettingsV2WithoutSecretsResponse, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettingsV2WithoutSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAuthSettingsV2WithoutSecretsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, err + } + resp, err := client.getAuthSettingsV2WithoutSecretsHandleResponse(httpResp) + return resp, err +} + +// getAuthSettingsV2WithoutSecretsCreateRequest creates the GetAuthSettingsV2WithoutSecrets request. +func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsV2WithoutSecretsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAuthSettingsV2WithoutSecretsHandleResponse handles the GetAuthSettingsV2WithoutSecrets response. +func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsHandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsV2WithoutSecretsResponse, error) { + result := WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { + return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, err + } + return result, nil +} + +// GetAuthSettingsV2WithoutSecretsSlot - Gets site's Authentication / Authorization settings for apps via the V2 format +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. +// - options - WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot +// method. +func (client *WebAppsClient) GetAuthSettingsV2WithoutSecretsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions) (WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAuthSettingsV2WithoutSecretsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, err + } + resp, err := client.getAuthSettingsV2WithoutSecretsSlotHandleResponse(httpResp) + return resp, err +} + +// getAuthSettingsV2WithoutSecretsSlotCreateRequest creates the GetAuthSettingsV2WithoutSecretsSlot request. +func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAuthSettingsV2WithoutSecretsSlotHandleResponse handles the GetAuthSettingsV2WithoutSecretsSlot response. +func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsSlotHandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse, error) { + result := WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { + return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, err + } + return result, nil +} + +// GetBackupConfiguration - Description for Gets the backup configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetBackupConfigurationOptions contains the optional parameters for the WebAppsClient.GetBackupConfiguration +// method. +func (client *WebAppsClient) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetBackupConfigurationOptions) (WebAppsClientGetBackupConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.GetBackupConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBackupConfigurationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetBackupConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetBackupConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetBackupConfigurationResponse{}, err + } + resp, err := client.getBackupConfigurationHandleResponse(httpResp) + return resp, err +} + +// getBackupConfigurationCreateRequest creates the GetBackupConfiguration request. +func (client *WebAppsClient) getBackupConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetBackupConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBackupConfigurationHandleResponse handles the GetBackupConfiguration response. +func (client *WebAppsClient) getBackupConfigurationHandleResponse(resp *http.Response) (WebAppsClientGetBackupConfigurationResponse, error) { + result := WebAppsClientGetBackupConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupRequest); err != nil { + return WebAppsClientGetBackupConfigurationResponse{}, err + } + return result, nil +} + +// GetBackupConfigurationSlot - Description for Gets the backup configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production +// slot. +// - options - WebAppsClientGetBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetBackupConfigurationSlot +// method. +func (client *WebAppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetBackupConfigurationSlotOptions) (WebAppsClientGetBackupConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetBackupConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBackupConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetBackupConfigurationSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetBackupConfigurationSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetBackupConfigurationSlotResponse{}, err + } + resp, err := client.getBackupConfigurationSlotHandleResponse(httpResp) + return resp, err +} + +// getBackupConfigurationSlotCreateRequest creates the GetBackupConfigurationSlot request. +func (client *WebAppsClient) getBackupConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetBackupConfigurationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBackupConfigurationSlotHandleResponse handles the GetBackupConfigurationSlot response. +func (client *WebAppsClient) getBackupConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientGetBackupConfigurationSlotResponse, error) { + result := WebAppsClientGetBackupConfigurationSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupRequest); err != nil { + return WebAppsClientGetBackupConfigurationSlotResponse{}, err + } + return result, nil +} + +// GetBackupStatus - Description for Gets a backup of an app by its ID. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - backupID - ID of the backup. +// - options - WebAppsClientGetBackupStatusOptions contains the optional parameters for the WebAppsClient.GetBackupStatus method. +func (client *WebAppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string, options *WebAppsClientGetBackupStatusOptions) (WebAppsClientGetBackupStatusResponse, error) { + var err error + const operationName = "WebAppsClient.GetBackupStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBackupStatusCreateRequest(ctx, resourceGroupName, name, backupID, options) + if err != nil { + return WebAppsClientGetBackupStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetBackupStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetBackupStatusResponse{}, err + } + resp, err := client.getBackupStatusHandleResponse(httpResp) + return resp, err +} + +// getBackupStatusCreateRequest creates the GetBackupStatus request. +func (client *WebAppsClient) getBackupStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, options *WebAppsClientGetBackupStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if backupID == "" { + return nil, errors.New("parameter backupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBackupStatusHandleResponse handles the GetBackupStatus response. +func (client *WebAppsClient) getBackupStatusHandleResponse(resp *http.Response) (WebAppsClientGetBackupStatusResponse, error) { + result := WebAppsClientGetBackupStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { + return WebAppsClientGetBackupStatusResponse{}, err + } + return result, nil +} + +// GetBackupStatusSlot - Description for Gets a backup of an app by its ID. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - backupID - ID of the backup. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get a backup of the production slot. +// - options - WebAppsClientGetBackupStatusSlotOptions contains the optional parameters for the WebAppsClient.GetBackupStatusSlot +// method. +func (client *WebAppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *WebAppsClientGetBackupStatusSlotOptions) (WebAppsClientGetBackupStatusSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetBackupStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBackupStatusSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, options) + if err != nil { + return WebAppsClientGetBackupStatusSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetBackupStatusSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetBackupStatusSlotResponse{}, err + } + resp, err := client.getBackupStatusSlotHandleResponse(httpResp) + return resp, err +} + +// getBackupStatusSlotCreateRequest creates the GetBackupStatusSlot request. +func (client *WebAppsClient) getBackupStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *WebAppsClientGetBackupStatusSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if backupID == "" { + return nil, errors.New("parameter backupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBackupStatusSlotHandleResponse handles the GetBackupStatusSlot response. +func (client *WebAppsClient) getBackupStatusSlotHandleResponse(resp *http.Response) (WebAppsClientGetBackupStatusSlotResponse, error) { + result := WebAppsClientGetBackupStatusSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { + return WebAppsClientGetBackupStatusSlotResponse{}, err + } + return result, nil +} + +// GetConfiguration - Description for Gets the configuration of an app, such as platform version and bitness, default documents, +// virtual applications, Always On, etc. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetConfigurationOptions contains the optional parameters for the WebAppsClient.GetConfiguration +// method. +func (client *WebAppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetConfigurationOptions) (WebAppsClientGetConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.GetConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getConfigurationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetConfigurationResponse{}, err + } + resp, err := client.getConfigurationHandleResponse(httpResp) + return resp, err +} + +// getConfigurationCreateRequest creates the GetConfiguration request. +func (client *WebAppsClient) getConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getConfigurationHandleResponse handles the GetConfiguration response. +func (client *WebAppsClient) getConfigurationHandleResponse(resp *http.Response) (WebAppsClientGetConfigurationResponse, error) { + result := WebAppsClientGetConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { + return WebAppsClientGetConfigurationResponse{}, err + } + return result, nil +} + +// GetConfigurationSlot - Description for Gets the configuration of an app, such as platform version and bitness, default +// documents, virtual applications, Always On, etc. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. +// - options - WebAppsClientGetConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSlot +// method. +func (client *WebAppsClient) GetConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetConfigurationSlotOptions) (WebAppsClientGetConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetConfigurationSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetConfigurationSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetConfigurationSlotResponse{}, err + } + resp, err := client.getConfigurationSlotHandleResponse(httpResp) + return resp, err +} + +// getConfigurationSlotCreateRequest creates the GetConfigurationSlot request. +func (client *WebAppsClient) getConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetConfigurationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getConfigurationSlotHandleResponse handles the GetConfigurationSlot response. +func (client *WebAppsClient) getConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientGetConfigurationSlotResponse, error) { + result := WebAppsClientGetConfigurationSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { + return WebAppsClientGetConfigurationSlotResponse{}, err + } + return result, nil +} + +// GetConfigurationSnapshot - Description for Gets a snapshot of the configuration of an app at a previous point in time. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - snapshotID - The ID of the snapshot to read. +// - options - WebAppsClientGetConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshot +// method. +func (client *WebAppsClient) GetConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *WebAppsClientGetConfigurationSnapshotOptions) (WebAppsClientGetConfigurationSnapshotResponse, error) { + var err error + const operationName = "WebAppsClient.GetConfigurationSnapshot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getConfigurationSnapshotCreateRequest(ctx, resourceGroupName, name, snapshotID, options) + if err != nil { + return WebAppsClientGetConfigurationSnapshotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetConfigurationSnapshotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetConfigurationSnapshotResponse{}, err + } + resp, err := client.getConfigurationSnapshotHandleResponse(httpResp) + return resp, err +} + +// getConfigurationSnapshotCreateRequest creates the GetConfigurationSnapshot request. +func (client *WebAppsClient) getConfigurationSnapshotCreateRequest(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *WebAppsClientGetConfigurationSnapshotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if snapshotID == "" { + return nil, errors.New("parameter snapshotID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotId}", url.PathEscape(snapshotID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getConfigurationSnapshotHandleResponse handles the GetConfigurationSnapshot response. +func (client *WebAppsClient) getConfigurationSnapshotHandleResponse(resp *http.Response) (WebAppsClientGetConfigurationSnapshotResponse, error) { + result := WebAppsClientGetConfigurationSnapshotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { + return WebAppsClientGetConfigurationSnapshotResponse{}, err + } + return result, nil +} + +// GetConfigurationSnapshotSlot - Description for Gets a snapshot of the configuration of an app at a previous point in time. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - snapshotID - The ID of the snapshot to read. +// - slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. +// - options - WebAppsClientGetConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshotSlot +// method. +func (client *WebAppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *WebAppsClientGetConfigurationSnapshotSlotOptions) (WebAppsClientGetConfigurationSnapshotSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetConfigurationSnapshotSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getConfigurationSnapshotSlotCreateRequest(ctx, resourceGroupName, name, snapshotID, slot, options) + if err != nil { + return WebAppsClientGetConfigurationSnapshotSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetConfigurationSnapshotSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetConfigurationSnapshotSlotResponse{}, err + } + resp, err := client.getConfigurationSnapshotSlotHandleResponse(httpResp) + return resp, err +} + +// getConfigurationSnapshotSlotCreateRequest creates the GetConfigurationSnapshotSlot request. +func (client *WebAppsClient) getConfigurationSnapshotSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *WebAppsClientGetConfigurationSnapshotSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if snapshotID == "" { + return nil, errors.New("parameter snapshotID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotId}", url.PathEscape(snapshotID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getConfigurationSnapshotSlotHandleResponse handles the GetConfigurationSnapshotSlot response. +func (client *WebAppsClient) getConfigurationSnapshotSlotHandleResponse(resp *http.Response) (WebAppsClientGetConfigurationSnapshotSlotResponse, error) { + result := WebAppsClientGetConfigurationSnapshotSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { + return WebAppsClientGetConfigurationSnapshotSlotResponse{}, err + } + return result, nil +} + +// GetContainerLogsZip - Description for Gets the ZIP archived docker log files for the given site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientGetContainerLogsZipOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZip +// method. +func (client *WebAppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetContainerLogsZipOptions) (WebAppsClientGetContainerLogsZipResponse, error) { + var err error + const operationName = "WebAppsClient.GetContainerLogsZip" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getContainerLogsZipCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetContainerLogsZipResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetContainerLogsZipResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetContainerLogsZipResponse{}, err + } + return WebAppsClientGetContainerLogsZipResponse{Body: httpResp.Body}, nil +} + +// getContainerLogsZipCreateRequest creates the GetContainerLogsZip request. +func (client *WebAppsClient) getContainerLogsZipCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetContainerLogsZipOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + runtime.SkipBodyDownload(req) + req.Raw().Header["Accept"] = []string{"application/zip"} + return req, nil +} + +// GetContainerLogsZipSlot - Description for Gets the ZIP archived docker log files for the given site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - WebAppsClientGetContainerLogsZipSlotOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZipSlot +// method. +func (client *WebAppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetContainerLogsZipSlotOptions) (WebAppsClientGetContainerLogsZipSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetContainerLogsZipSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getContainerLogsZipSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetContainerLogsZipSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetContainerLogsZipSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetContainerLogsZipSlotResponse{}, err + } + return WebAppsClientGetContainerLogsZipSlotResponse{Body: httpResp.Body}, nil +} + +// getContainerLogsZipSlotCreateRequest creates the GetContainerLogsZipSlot request. +func (client *WebAppsClient) getContainerLogsZipSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetContainerLogsZipSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + runtime.SkipBodyDownload(req) + req.Raw().Header["Accept"] = []string{"application/zip"} + return req, nil +} + +// GetContinuousWebJob - Description for Gets a continuous web job by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - options - WebAppsClientGetContinuousWebJobOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJob +// method. +func (client *WebAppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetContinuousWebJobOptions) (WebAppsClientGetContinuousWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.GetContinuousWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) + if err != nil { + return WebAppsClientGetContinuousWebJobResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetContinuousWebJobResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetContinuousWebJobResponse{}, err + } + resp, err := client.getContinuousWebJobHandleResponse(httpResp) + return resp, err +} + +// getContinuousWebJobCreateRequest creates the GetContinuousWebJob request. +func (client *WebAppsClient) getContinuousWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetContinuousWebJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getContinuousWebJobHandleResponse handles the GetContinuousWebJob response. +func (client *WebAppsClient) getContinuousWebJobHandleResponse(resp *http.Response) (WebAppsClientGetContinuousWebJobResponse, error) { + result := WebAppsClientGetContinuousWebJobResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ContinuousWebJob); err != nil { + return WebAppsClientGetContinuousWebJobResponse{}, err + } + return result, nil +} + +// GetContinuousWebJobSlot - Description for Gets a continuous web job by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +// - options - WebAppsClientGetContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJobSlot +// method. +func (client *WebAppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetContinuousWebJobSlotOptions) (WebAppsClientGetContinuousWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetContinuousWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) + if err != nil { + return WebAppsClientGetContinuousWebJobSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetContinuousWebJobSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetContinuousWebJobSlotResponse{}, err + } + resp, err := client.getContinuousWebJobSlotHandleResponse(httpResp) + return resp, err +} + +// getContinuousWebJobSlotCreateRequest creates the GetContinuousWebJobSlot request. +func (client *WebAppsClient) getContinuousWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetContinuousWebJobSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getContinuousWebJobSlotHandleResponse handles the GetContinuousWebJobSlot response. +func (client *WebAppsClient) getContinuousWebJobSlotHandleResponse(resp *http.Response) (WebAppsClientGetContinuousWebJobSlotResponse, error) { + result := WebAppsClientGetContinuousWebJobSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ContinuousWebJob); err != nil { + return WebAppsClientGetContinuousWebJobSlotResponse{}, err + } + return result, nil +} + +// GetDeployment - Description for Get a deployment by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - id - Deployment ID. +// - options - WebAppsClientGetDeploymentOptions contains the optional parameters for the WebAppsClient.GetDeployment method. +func (client *WebAppsClient) GetDeployment(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientGetDeploymentOptions) (WebAppsClientGetDeploymentResponse, error) { + var err error + const operationName = "WebAppsClient.GetDeployment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDeploymentCreateRequest(ctx, resourceGroupName, name, id, options) + if err != nil { + return WebAppsClientGetDeploymentResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetDeploymentResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDeploymentResponse{}, err + } + resp, err := client.getDeploymentHandleResponse(httpResp) + return resp, err +} + +// getDeploymentCreateRequest creates the GetDeployment request. +func (client *WebAppsClient) getDeploymentCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientGetDeploymentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDeploymentHandleResponse handles the GetDeployment response. +func (client *WebAppsClient) getDeploymentHandleResponse(resp *http.Response) (WebAppsClientGetDeploymentResponse, error) { + result := WebAppsClientGetDeploymentResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { + return WebAppsClientGetDeploymentResponse{}, err + } + return result, nil +} + +// GetDeploymentSlot - Description for Get a deployment by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - id - Deployment ID. +// - slot - Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production slot. +// - options - WebAppsClientGetDeploymentSlotOptions contains the optional parameters for the WebAppsClient.GetDeploymentSlot +// method. +func (client *WebAppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientGetDeploymentSlotOptions) (WebAppsClientGetDeploymentSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetDeploymentSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDeploymentSlotCreateRequest(ctx, resourceGroupName, name, id, slot, options) + if err != nil { + return WebAppsClientGetDeploymentSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetDeploymentSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDeploymentSlotResponse{}, err + } + resp, err := client.getDeploymentSlotHandleResponse(httpResp) + return resp, err +} + +// getDeploymentSlotCreateRequest creates the GetDeploymentSlot request. +func (client *WebAppsClient) getDeploymentSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientGetDeploymentSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDeploymentSlotHandleResponse handles the GetDeploymentSlot response. +func (client *WebAppsClient) getDeploymentSlotHandleResponse(resp *http.Response) (WebAppsClientGetDeploymentSlotResponse, error) { + result := WebAppsClientGetDeploymentSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { + return WebAppsClientGetDeploymentSlotResponse{}, err + } + return result, nil +} + +// GetDiagnosticLogsConfiguration - Description for Gets the logging configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetDiagnosticLogsConfigurationOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfiguration +// method. +func (client *WebAppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetDiagnosticLogsConfigurationOptions) (WebAppsClientGetDiagnosticLogsConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.GetDiagnosticLogsConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDiagnosticLogsConfigurationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, err + } + resp, err := client.getDiagnosticLogsConfigurationHandleResponse(httpResp) + return resp, err +} + +// getDiagnosticLogsConfigurationCreateRequest creates the GetDiagnosticLogsConfiguration request. +func (client *WebAppsClient) getDiagnosticLogsConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetDiagnosticLogsConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDiagnosticLogsConfigurationHandleResponse handles the GetDiagnosticLogsConfiguration response. +func (client *WebAppsClient) getDiagnosticLogsConfigurationHandleResponse(resp *http.Response) (WebAppsClientGetDiagnosticLogsConfigurationResponse, error) { + result := WebAppsClientGetDiagnosticLogsConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteLogsConfig); err != nil { + return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, err + } + return result, nil +} + +// GetDiagnosticLogsConfigurationSlot - Description for Gets the logging configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production +// slot. +// - options - WebAppsClientGetDiagnosticLogsConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfigurationSlot +// method. +func (client *WebAppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetDiagnosticLogsConfigurationSlotOptions) (WebAppsClientGetDiagnosticLogsConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetDiagnosticLogsConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDiagnosticLogsConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, err + } + resp, err := client.getDiagnosticLogsConfigurationSlotHandleResponse(httpResp) + return resp, err +} + +// getDiagnosticLogsConfigurationSlotCreateRequest creates the GetDiagnosticLogsConfigurationSlot request. +func (client *WebAppsClient) getDiagnosticLogsConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetDiagnosticLogsConfigurationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDiagnosticLogsConfigurationSlotHandleResponse handles the GetDiagnosticLogsConfigurationSlot response. +func (client *WebAppsClient) getDiagnosticLogsConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientGetDiagnosticLogsConfigurationSlotResponse, error) { + result := WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteLogsConfig); err != nil { + return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, err + } + return result, nil +} + +// GetDomainOwnershipIdentifier - Description for Get domain ownership identifier for web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - domainOwnershipIdentifierName - Name of domain ownership identifier. +// - options - WebAppsClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifier +// method. +func (client *WebAppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *WebAppsClientGetDomainOwnershipIdentifierOptions) (WebAppsClientGetDomainOwnershipIdentifierResponse, error) { + var err error + const operationName = "WebAppsClient.GetDomainOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, options) + if err != nil { + return WebAppsClientGetDomainOwnershipIdentifierResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetDomainOwnershipIdentifierResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDomainOwnershipIdentifierResponse{}, err + } + resp, err := client.getDomainOwnershipIdentifierHandleResponse(httpResp) + return resp, err +} + +// getDomainOwnershipIdentifierCreateRequest creates the GetDomainOwnershipIdentifier request. +func (client *WebAppsClient) getDomainOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *WebAppsClientGetDomainOwnershipIdentifierOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainOwnershipIdentifierName == "" { + return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDomainOwnershipIdentifierHandleResponse handles the GetDomainOwnershipIdentifier response. +func (client *WebAppsClient) getDomainOwnershipIdentifierHandleResponse(resp *http.Response) (WebAppsClientGetDomainOwnershipIdentifierResponse, error) { + result := WebAppsClientGetDomainOwnershipIdentifierResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { + return WebAppsClientGetDomainOwnershipIdentifierResponse{}, err + } + return result, nil +} + +// GetDomainOwnershipIdentifierSlot - Description for Get domain ownership identifier for web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - domainOwnershipIdentifierName - Name of domain ownership identifier. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. +// - options - WebAppsClientGetDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifierSlot +// method. +func (client *WebAppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *WebAppsClientGetDomainOwnershipIdentifierSlotOptions) (WebAppsClientGetDomainOwnershipIdentifierSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetDomainOwnershipIdentifierSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, options) + if err != nil { + return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, err + } + resp, err := client.getDomainOwnershipIdentifierSlotHandleResponse(httpResp) + return resp, err +} + +// getDomainOwnershipIdentifierSlotCreateRequest creates the GetDomainOwnershipIdentifierSlot request. +func (client *WebAppsClient) getDomainOwnershipIdentifierSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *WebAppsClientGetDomainOwnershipIdentifierSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainOwnershipIdentifierName == "" { + return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDomainOwnershipIdentifierSlotHandleResponse handles the GetDomainOwnershipIdentifierSlot response. +func (client *WebAppsClient) getDomainOwnershipIdentifierSlotHandleResponse(resp *http.Response) (WebAppsClientGetDomainOwnershipIdentifierSlotResponse, error) { + result := WebAppsClientGetDomainOwnershipIdentifierSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { + return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, err + } + return result, nil +} + +// GetFtpAllowed - Description for Returns whether FTP is allowed on the site or not. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetFtpAllowedOptions contains the optional parameters for the WebAppsClient.GetFtpAllowed method. +func (client *WebAppsClient) GetFtpAllowed(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetFtpAllowedOptions) (WebAppsClientGetFtpAllowedResponse, error) { + var err error + const operationName = "WebAppsClient.GetFtpAllowed" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getFtpAllowedCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetFtpAllowedResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetFtpAllowedResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetFtpAllowedResponse{}, err + } + resp, err := client.getFtpAllowedHandleResponse(httpResp) + return resp, err +} + +// getFtpAllowedCreateRequest creates the GetFtpAllowed request. +func (client *WebAppsClient) getFtpAllowedCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetFtpAllowedOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getFtpAllowedHandleResponse handles the GetFtpAllowed response. +func (client *WebAppsClient) getFtpAllowedHandleResponse(resp *http.Response) (WebAppsClientGetFtpAllowedResponse, error) { + result := WebAppsClientGetFtpAllowedResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { + return WebAppsClientGetFtpAllowedResponse{}, err + } + return result, nil +} + +// GetFtpAllowedSlot - Description for Returns whether FTP is allowed on the site or not. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetFtpAllowedSlot +// method. +func (client *WebAppsClient) GetFtpAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetFtpAllowedSlotOptions) (WebAppsClientGetFtpAllowedSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetFtpAllowedSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getFtpAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetFtpAllowedSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetFtpAllowedSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetFtpAllowedSlotResponse{}, err + } + resp, err := client.getFtpAllowedSlotHandleResponse(httpResp) + return resp, err +} + +// getFtpAllowedSlotCreateRequest creates the GetFtpAllowedSlot request. +func (client *WebAppsClient) getFtpAllowedSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetFtpAllowedSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getFtpAllowedSlotHandleResponse handles the GetFtpAllowedSlot response. +func (client *WebAppsClient) getFtpAllowedSlotHandleResponse(resp *http.Response) (WebAppsClientGetFtpAllowedSlotResponse, error) { + result := WebAppsClientGetFtpAllowedSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { + return WebAppsClientGetFtpAllowedSlotResponse{}, err + } + return result, nil +} + +// GetFunction - Description for Get function information by its ID for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - Function name. +// - options - WebAppsClientGetFunctionOptions contains the optional parameters for the WebAppsClient.GetFunction method. +func (client *WebAppsClient) GetFunction(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientGetFunctionOptions) (WebAppsClientGetFunctionResponse, error) { + var err error + const operationName = "WebAppsClient.GetFunction" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getFunctionCreateRequest(ctx, resourceGroupName, name, functionName, options) + if err != nil { + return WebAppsClientGetFunctionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetFunctionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetFunctionResponse{}, err + } + resp, err := client.getFunctionHandleResponse(httpResp) + return resp, err +} + +// getFunctionCreateRequest creates the GetFunction request. +func (client *WebAppsClient) getFunctionCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientGetFunctionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getFunctionHandleResponse handles the GetFunction response. +func (client *WebAppsClient) getFunctionHandleResponse(resp *http.Response) (WebAppsClientGetFunctionResponse, error) { + result := WebAppsClientGetFunctionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FunctionEnvelope); err != nil { + return WebAppsClientGetFunctionResponse{}, err + } + return result, nil +} + +// GetFunctionsAdminToken - Description for Fetch a short lived token that can be exchanged for a master key. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientGetFunctionsAdminTokenOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminToken +// method. +func (client *WebAppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetFunctionsAdminTokenOptions) (WebAppsClientGetFunctionsAdminTokenResponse, error) { + var err error + const operationName = "WebAppsClient.GetFunctionsAdminToken" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getFunctionsAdminTokenCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetFunctionsAdminTokenResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetFunctionsAdminTokenResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetFunctionsAdminTokenResponse{}, err + } + resp, err := client.getFunctionsAdminTokenHandleResponse(httpResp) + return resp, err +} + +// getFunctionsAdminTokenCreateRequest creates the GetFunctionsAdminToken request. +func (client *WebAppsClient) getFunctionsAdminTokenCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetFunctionsAdminTokenOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getFunctionsAdminTokenHandleResponse handles the GetFunctionsAdminToken response. +func (client *WebAppsClient) getFunctionsAdminTokenHandleResponse(resp *http.Response) (WebAppsClientGetFunctionsAdminTokenResponse, error) { + result := WebAppsClientGetFunctionsAdminTokenResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { + return WebAppsClientGetFunctionsAdminTokenResponse{}, err + } + return result, nil +} + +// GetFunctionsAdminTokenSlot - Description for Fetch a short lived token that can be exchanged for a master key. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - WebAppsClientGetFunctionsAdminTokenSlotOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminTokenSlot +// method. +func (client *WebAppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetFunctionsAdminTokenSlotOptions) (WebAppsClientGetFunctionsAdminTokenSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetFunctionsAdminTokenSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getFunctionsAdminTokenSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, err + } + resp, err := client.getFunctionsAdminTokenSlotHandleResponse(httpResp) + return resp, err +} + +// getFunctionsAdminTokenSlotCreateRequest creates the GetFunctionsAdminTokenSlot request. +func (client *WebAppsClient) getFunctionsAdminTokenSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetFunctionsAdminTokenSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getFunctionsAdminTokenSlotHandleResponse handles the GetFunctionsAdminTokenSlot response. +func (client *WebAppsClient) getFunctionsAdminTokenSlotHandleResponse(resp *http.Response) (WebAppsClientGetFunctionsAdminTokenSlotResponse, error) { + result := WebAppsClientGetFunctionsAdminTokenSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { + return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, err + } + return result, nil +} + +// GetHostNameBinding - Description for Get the named hostname binding for an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - hostName - Hostname in the hostname binding. +// - options - WebAppsClientGetHostNameBindingOptions contains the optional parameters for the WebAppsClient.GetHostNameBinding +// method. +func (client *WebAppsClient) GetHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, options *WebAppsClientGetHostNameBindingOptions) (WebAppsClientGetHostNameBindingResponse, error) { + var err error + const operationName = "WebAppsClient.GetHostNameBinding" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getHostNameBindingCreateRequest(ctx, resourceGroupName, name, hostName, options) + if err != nil { + return WebAppsClientGetHostNameBindingResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetHostNameBindingResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetHostNameBindingResponse{}, err + } + resp, err := client.getHostNameBindingHandleResponse(httpResp) + return resp, err +} + +// getHostNameBindingCreateRequest creates the GetHostNameBinding request. +func (client *WebAppsClient) getHostNameBindingCreateRequest(ctx context.Context, resourceGroupName string, name string, hostName string, options *WebAppsClientGetHostNameBindingOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if hostName == "" { + return nil, errors.New("parameter hostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHostNameBindingHandleResponse handles the GetHostNameBinding response. +func (client *WebAppsClient) getHostNameBindingHandleResponse(resp *http.Response) (WebAppsClientGetHostNameBindingResponse, error) { + result := WebAppsClientGetHostNameBindingResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBinding); err != nil { + return WebAppsClientGetHostNameBindingResponse{}, err + } + return result, nil +} + +// GetHostNameBindingSlot - Description for Get the named hostname binding for an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. +// - hostName - Hostname in the hostname binding. +// - options - WebAppsClientGetHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.GetHostNameBindingSlot +// method. +func (client *WebAppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *WebAppsClientGetHostNameBindingSlotOptions) (WebAppsClientGetHostNameBindingSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetHostNameBindingSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getHostNameBindingSlotCreateRequest(ctx, resourceGroupName, name, slot, hostName, options) + if err != nil { + return WebAppsClientGetHostNameBindingSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetHostNameBindingSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetHostNameBindingSlotResponse{}, err + } + resp, err := client.getHostNameBindingSlotHandleResponse(httpResp) + return resp, err +} + +// getHostNameBindingSlotCreateRequest creates the GetHostNameBindingSlot request. +func (client *WebAppsClient) getHostNameBindingSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *WebAppsClientGetHostNameBindingSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if hostName == "" { + return nil, errors.New("parameter hostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHostNameBindingSlotHandleResponse handles the GetHostNameBindingSlot response. +func (client *WebAppsClient) getHostNameBindingSlotHandleResponse(resp *http.Response) (WebAppsClientGetHostNameBindingSlotResponse, error) { + result := WebAppsClientGetHostNameBindingSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBinding); err != nil { + return WebAppsClientGetHostNameBindingSlotResponse{}, err + } + return result, nil +} + +// GetHybridConnection - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - namespaceName - The namespace for this hybrid connection. +// - relayName - The relay name for this hybrid connection. +// - options - WebAppsClientGetHybridConnectionOptions contains the optional parameters for the WebAppsClient.GetHybridConnection +// method. +func (client *WebAppsClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *WebAppsClientGetHybridConnectionOptions) (WebAppsClientGetHybridConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.GetHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) + if err != nil { + return WebAppsClientGetHybridConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetHybridConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetHybridConnectionResponse{}, err + } + resp, err := client.getHybridConnectionHandleResponse(httpResp) + return resp, err +} + +// getHybridConnectionCreateRequest creates the GetHybridConnection request. +func (client *WebAppsClient) getHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *WebAppsClientGetHybridConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHybridConnectionHandleResponse handles the GetHybridConnection response. +func (client *WebAppsClient) getHybridConnectionHandleResponse(resp *http.Response) (WebAppsClientGetHybridConnectionResponse, error) { + result := WebAppsClientGetHybridConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { + return WebAppsClientGetHybridConnectionResponse{}, err + } + return result, nil +} + +// GetHybridConnectionSlot - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - namespaceName - The namespace for this hybrid connection. +// - relayName - The relay name for this hybrid connection. +// - slot - The name of the slot for the web app. +// - options - WebAppsClientGetHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetHybridConnectionSlot +// method. +func (client *WebAppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *WebAppsClientGetHybridConnectionSlotOptions) (WebAppsClientGetHybridConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetHybridConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, options) + if err != nil { + return WebAppsClientGetHybridConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetHybridConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetHybridConnectionSlotResponse{}, err + } + resp, err := client.getHybridConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// getHybridConnectionSlotCreateRequest creates the GetHybridConnectionSlot request. +func (client *WebAppsClient) getHybridConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *WebAppsClientGetHybridConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHybridConnectionSlotHandleResponse handles the GetHybridConnectionSlot response. +func (client *WebAppsClient) getHybridConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientGetHybridConnectionSlotResponse, error) { + result := WebAppsClientGetHybridConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { + return WebAppsClientGetHybridConnectionSlotResponse{}, err + } + return result, nil +} + +// GetInstanceFunctionSlot - Description for Get function information by its ID for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - Function name. +// - slot - Name of the deployment slot. +// - options - WebAppsClientGetInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceFunctionSlot +// method. +func (client *WebAppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientGetInstanceFunctionSlotOptions) (WebAppsClientGetInstanceFunctionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceFunctionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) + if err != nil { + return WebAppsClientGetInstanceFunctionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceFunctionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceFunctionSlotResponse{}, err + } + resp, err := client.getInstanceFunctionSlotHandleResponse(httpResp) + return resp, err +} + +// getInstanceFunctionSlotCreateRequest creates the GetInstanceFunctionSlot request. +func (client *WebAppsClient) getInstanceFunctionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientGetInstanceFunctionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceFunctionSlotHandleResponse handles the GetInstanceFunctionSlot response. +func (client *WebAppsClient) getInstanceFunctionSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceFunctionSlotResponse, error) { + result := WebAppsClientGetInstanceFunctionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FunctionEnvelope); err != nil { + return WebAppsClientGetInstanceFunctionSlotResponse{}, err + } + return result, nil +} + +// GetInstanceInfo - Description for Gets all scale-out instances of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetInstanceInfoOptions contains the optional parameters for the WebAppsClient.GetInstanceInfo method. +func (client *WebAppsClient) GetInstanceInfo(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceInfoOptions) (WebAppsClientGetInstanceInfoResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceInfo" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceInfoCreateRequest(ctx, resourceGroupName, name, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceInfoResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceInfoResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceInfoResponse{}, err + } + resp, err := client.getInstanceInfoHandleResponse(httpResp) + return resp, err +} + +// getInstanceInfoCreateRequest creates the GetInstanceInfo request. +func (client *WebAppsClient) getInstanceInfoCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceInfoOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceInfoHandleResponse handles the GetInstanceInfo response. +func (client *WebAppsClient) getInstanceInfoHandleResponse(resp *http.Response) (WebAppsClientGetInstanceInfoResponse, error) { + result := WebAppsClientGetInstanceInfoResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebSiteInstanceStatus); err != nil { + return WebAppsClientGetInstanceInfoResponse{}, err + } + return result, nil +} + +// GetInstanceInfoSlot - Description for Gets all scale-out instances of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. +// - options - WebAppsClientGetInstanceInfoSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceInfoSlot +// method. +func (client *WebAppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string, options *WebAppsClientGetInstanceInfoSlotOptions) (WebAppsClientGetInstanceInfoSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceInfoSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceInfoSlotCreateRequest(ctx, resourceGroupName, name, instanceID, slot, options) + if err != nil { + return WebAppsClientGetInstanceInfoSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceInfoSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceInfoSlotResponse{}, err + } + resp, err := client.getInstanceInfoSlotHandleResponse(httpResp) + return resp, err +} + +// getInstanceInfoSlotCreateRequest creates the GetInstanceInfoSlot request. +func (client *WebAppsClient) getInstanceInfoSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string, options *WebAppsClientGetInstanceInfoSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceInfoSlotHandleResponse handles the GetInstanceInfoSlot response. +func (client *WebAppsClient) getInstanceInfoSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceInfoSlotResponse, error) { + result := WebAppsClientGetInstanceInfoSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebSiteInstanceStatus); err != nil { + return WebAppsClientGetInstanceInfoSlotResponse{}, err + } + return result, nil +} + +// GetInstanceMSDeployLog - Description for Get the MSDeploy Log for the last MSDeploy operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - instanceID - ID of web app instance. +// - options - WebAppsClientGetInstanceMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLog +// method. +func (client *WebAppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceMSDeployLogOptions) (WebAppsClientGetInstanceMSDeployLogResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceMSDeployLog" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceMSDeployLogCreateRequest(ctx, resourceGroupName, name, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceMSDeployLogResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceMSDeployLogResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceMSDeployLogResponse{}, err + } + resp, err := client.getInstanceMSDeployLogHandleResponse(httpResp) + return resp, err +} + +// getInstanceMSDeployLogCreateRequest creates the GetInstanceMSDeployLog request. +func (client *WebAppsClient) getInstanceMSDeployLogCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceMSDeployLogOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceMSDeployLogHandleResponse handles the GetInstanceMSDeployLog response. +func (client *WebAppsClient) getInstanceMSDeployLogHandleResponse(resp *http.Response) (WebAppsClientGetInstanceMSDeployLogResponse, error) { + result := WebAppsClientGetInstanceMSDeployLogResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployLog); err != nil { + return WebAppsClientGetInstanceMSDeployLogResponse{}, err + } + return result, nil +} + +// GetInstanceMSDeployLogSlot - Description for Get the MSDeploy Log for the last MSDeploy operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - instanceID - ID of web app instance. +// - options - WebAppsClientGetInstanceMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLogSlot +// method. +func (client *WebAppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientGetInstanceMSDeployLogSlotOptions) (WebAppsClientGetInstanceMSDeployLogSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceMSDeployLogSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceMSDeployLogSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, err + } + resp, err := client.getInstanceMSDeployLogSlotHandleResponse(httpResp) + return resp, err +} + +// getInstanceMSDeployLogSlotCreateRequest creates the GetInstanceMSDeployLogSlot request. +func (client *WebAppsClient) getInstanceMSDeployLogSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientGetInstanceMSDeployLogSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceMSDeployLogSlotHandleResponse handles the GetInstanceMSDeployLogSlot response. +func (client *WebAppsClient) getInstanceMSDeployLogSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceMSDeployLogSlotResponse, error) { + result := WebAppsClientGetInstanceMSDeployLogSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployLog); err != nil { + return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, err + } + return result, nil +} + +// GetInstanceMsDeployStatus - Description for Get the status of the last MSDeploy operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - instanceID - ID of web app instance. +// - options - WebAppsClientGetInstanceMsDeployStatusOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatus +// method. +func (client *WebAppsClient) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceMsDeployStatusOptions) (WebAppsClientGetInstanceMsDeployStatusResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceMsDeployStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceMsDeployStatusCreateRequest(ctx, resourceGroupName, name, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceMsDeployStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceMsDeployStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceMsDeployStatusResponse{}, err + } + resp, err := client.getInstanceMsDeployStatusHandleResponse(httpResp) + return resp, err +} + +// getInstanceMsDeployStatusCreateRequest creates the GetInstanceMsDeployStatus request. +func (client *WebAppsClient) getInstanceMsDeployStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceMsDeployStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceMsDeployStatusHandleResponse handles the GetInstanceMsDeployStatus response. +func (client *WebAppsClient) getInstanceMsDeployStatusHandleResponse(resp *http.Response) (WebAppsClientGetInstanceMsDeployStatusResponse, error) { + result := WebAppsClientGetInstanceMsDeployStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployStatus); err != nil { + return WebAppsClientGetInstanceMsDeployStatusResponse{}, err + } + return result, nil +} + +// GetInstanceMsDeployStatusSlot - Description for Get the status of the last MSDeploy operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - instanceID - ID of web app instance. +// - options - WebAppsClientGetInstanceMsDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatusSlot +// method. +func (client *WebAppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientGetInstanceMsDeployStatusSlotOptions) (WebAppsClientGetInstanceMsDeployStatusSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceMsDeployStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceMsDeployStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, err + } + resp, err := client.getInstanceMsDeployStatusSlotHandleResponse(httpResp) + return resp, err +} + +// getInstanceMsDeployStatusSlotCreateRequest creates the GetInstanceMsDeployStatusSlot request. +func (client *WebAppsClient) getInstanceMsDeployStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientGetInstanceMsDeployStatusSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceMsDeployStatusSlotHandleResponse handles the GetInstanceMsDeployStatusSlot response. +func (client *WebAppsClient) getInstanceMsDeployStatusSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceMsDeployStatusSlotResponse, error) { + result := WebAppsClientGetInstanceMsDeployStatusSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployStatus); err != nil { + return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, err + } + return result, nil +} + +// GetInstanceProcess - Description for Get process information by its ID for a specific scaled-out instance in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - 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". +// - options - WebAppsClientGetInstanceProcessOptions contains the optional parameters for the WebAppsClient.GetInstanceProcess +// method. +func (client *WebAppsClient) GetInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientGetInstanceProcessOptions) (WebAppsClientGetInstanceProcessResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcess" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceProcessCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceProcessResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceProcessResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessResponse{}, err + } + resp, err := client.getInstanceProcessHandleResponse(httpResp) + return resp, err +} + +// getInstanceProcessCreateRequest creates the GetInstanceProcess request. +func (client *WebAppsClient) getInstanceProcessCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientGetInstanceProcessOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceProcessHandleResponse handles the GetInstanceProcess response. +func (client *WebAppsClient) getInstanceProcessHandleResponse(resp *http.Response) (WebAppsClientGetInstanceProcessResponse, error) { + result := WebAppsClientGetInstanceProcessResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfo); err != nil { + return WebAppsClientGetInstanceProcessResponse{}, err + } + return result, nil +} + +// GetInstanceProcessDump - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in +// a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - 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". +// - options - WebAppsClientGetInstanceProcessDumpOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDump +// method. +func (client *WebAppsClient) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientGetInstanceProcessDumpOptions) (WebAppsClientGetInstanceProcessDumpResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcessDump" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceProcessDumpCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceProcessDumpResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceProcessDumpResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessDumpResponse{}, err + } + return WebAppsClientGetInstanceProcessDumpResponse{Body: httpResp.Body}, nil +} + +// getInstanceProcessDumpCreateRequest creates the GetInstanceProcessDump request. +func (client *WebAppsClient) getInstanceProcessDumpCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientGetInstanceProcessDumpOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + runtime.SkipBodyDownload(req) + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetInstanceProcessDumpSlot - Description for Get a memory dump of a process by its ID for a specific scaled-out instance +// in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - 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". +// - options - WebAppsClientGetInstanceProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDumpSlot +// method. +func (client *WebAppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessDumpSlotOptions) (WebAppsClientGetInstanceProcessDumpSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcessDumpSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceProcessDumpSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceProcessDumpSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceProcessDumpSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessDumpSlotResponse{}, err + } + return WebAppsClientGetInstanceProcessDumpSlotResponse{Body: httpResp.Body}, nil +} + +// getInstanceProcessDumpSlotCreateRequest creates the GetInstanceProcessDumpSlot request. +func (client *WebAppsClient) getInstanceProcessDumpSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessDumpSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + runtime.SkipBodyDownload(req) + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetInstanceProcessModule - Description for Get process information by its ID for a specific scaled-out instance in a web +// site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - baseAddress - Module base address. +// - 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". +// - options - WebAppsClientGetInstanceProcessModuleOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModule +// method. +func (client *WebAppsClient) GetInstanceProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string, options *WebAppsClientGetInstanceProcessModuleOptions) (WebAppsClientGetInstanceProcessModuleResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcessModule" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceProcessModuleCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceProcessModuleResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceProcessModuleResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessModuleResponse{}, err + } + resp, err := client.getInstanceProcessModuleHandleResponse(httpResp) + return resp, err +} + +// getInstanceProcessModuleCreateRequest creates the GetInstanceProcessModule request. +func (client *WebAppsClient) getInstanceProcessModuleCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string, options *WebAppsClientGetInstanceProcessModuleOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if baseAddress == "" { + return nil, errors.New("parameter baseAddress cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{baseAddress}", url.PathEscape(baseAddress)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceProcessModuleHandleResponse handles the GetInstanceProcessModule response. +func (client *WebAppsClient) getInstanceProcessModuleHandleResponse(resp *http.Response) (WebAppsClientGetInstanceProcessModuleResponse, error) { + result := WebAppsClientGetInstanceProcessModuleResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfo); err != nil { + return WebAppsClientGetInstanceProcessModuleResponse{}, err + } + return result, nil +} + +// GetInstanceProcessModuleSlot - Description for Get process information by its ID for a specific scaled-out instance in +// a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - baseAddress - Module base address. +// - 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". +// - options - WebAppsClientGetInstanceProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModuleSlot +// method. +func (client *WebAppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessModuleSlotOptions) (WebAppsClientGetInstanceProcessModuleSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcessModuleSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceProcessModuleSlotCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceProcessModuleSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceProcessModuleSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessModuleSlotResponse{}, err + } + resp, err := client.getInstanceProcessModuleSlotHandleResponse(httpResp) + return resp, err +} + +// getInstanceProcessModuleSlotCreateRequest creates the GetInstanceProcessModuleSlot request. +func (client *WebAppsClient) getInstanceProcessModuleSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessModuleSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if baseAddress == "" { + return nil, errors.New("parameter baseAddress cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{baseAddress}", url.PathEscape(baseAddress)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceProcessModuleSlotHandleResponse handles the GetInstanceProcessModuleSlot response. +func (client *WebAppsClient) getInstanceProcessModuleSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceProcessModuleSlotResponse, error) { + result := WebAppsClientGetInstanceProcessModuleSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfo); err != nil { + return WebAppsClientGetInstanceProcessModuleSlotResponse{}, err + } + return result, nil +} + +// GetInstanceProcessSlot - Description for Get process information by its ID for a specific scaled-out instance in a web +// site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - 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". +// - options - WebAppsClientGetInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessSlot +// method. +func (client *WebAppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessSlotOptions) (WebAppsClientGetInstanceProcessSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcessSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) + if err != nil { + return WebAppsClientGetInstanceProcessSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceProcessSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessSlotResponse{}, err + } + resp, err := client.getInstanceProcessSlotHandleResponse(httpResp) + return resp, err +} + +// getInstanceProcessSlotCreateRequest creates the GetInstanceProcessSlot request. +func (client *WebAppsClient) getInstanceProcessSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceProcessSlotHandleResponse handles the GetInstanceProcessSlot response. +func (client *WebAppsClient) getInstanceProcessSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceProcessSlotResponse, error) { + result := WebAppsClientGetInstanceProcessSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfo); err != nil { + return WebAppsClientGetInstanceProcessSlotResponse{}, err + } + return result, nil +} + +// GetInstanceWorkflowSlot - Get workflow information by its ID for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. +// - workflowName - Workflow name. +// - options - WebAppsClientGetInstanceWorkflowSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceWorkflowSlot +// method. +func (client *WebAppsClient) GetInstanceWorkflowSlot(ctx context.Context, resourceGroupName string, name string, slot string, workflowName string, options *WebAppsClientGetInstanceWorkflowSlotOptions) (WebAppsClientGetInstanceWorkflowSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceWorkflowSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInstanceWorkflowSlotCreateRequest(ctx, resourceGroupName, name, slot, workflowName, options) + if err != nil { + return WebAppsClientGetInstanceWorkflowSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetInstanceWorkflowSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceWorkflowSlotResponse{}, err + } + resp, err := client.getInstanceWorkflowSlotHandleResponse(httpResp) + return resp, err +} + +// getInstanceWorkflowSlotCreateRequest creates the GetInstanceWorkflowSlot request. +func (client *WebAppsClient) getInstanceWorkflowSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, workflowName string, options *WebAppsClientGetInstanceWorkflowSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInstanceWorkflowSlotHandleResponse handles the GetInstanceWorkflowSlot response. +func (client *WebAppsClient) getInstanceWorkflowSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceWorkflowSlotResponse, error) { + result := WebAppsClientGetInstanceWorkflowSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelope); err != nil { + return WebAppsClientGetInstanceWorkflowSlotResponse{}, err + } + return result, nil +} + +// GetMSDeployLog - Description for Get the MSDeploy Log for the last MSDeploy operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientGetMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetMSDeployLog method. +func (client *WebAppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployLogOptions) (WebAppsClientGetMSDeployLogResponse, error) { + var err error + const operationName = "WebAppsClient.GetMSDeployLog" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getMSDeployLogCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetMSDeployLogResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetMSDeployLogResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMSDeployLogResponse{}, err + } + resp, err := client.getMSDeployLogHandleResponse(httpResp) + return resp, err +} + +// getMSDeployLogCreateRequest creates the GetMSDeployLog request. +func (client *WebAppsClient) getMSDeployLogCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployLogOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getMSDeployLogHandleResponse handles the GetMSDeployLog response. +func (client *WebAppsClient) getMSDeployLogHandleResponse(resp *http.Response) (WebAppsClientGetMSDeployLogResponse, error) { + result := WebAppsClientGetMSDeployLogResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployLog); err != nil { + return WebAppsClientGetMSDeployLogResponse{}, err + } + return result, nil +} + +// GetMSDeployLogSlot - Description for Get the MSDeploy Log for the last MSDeploy operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - WebAppsClientGetMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployLogSlot +// method. +func (client *WebAppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMSDeployLogSlotOptions) (WebAppsClientGetMSDeployLogSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetMSDeployLogSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getMSDeployLogSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetMSDeployLogSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetMSDeployLogSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMSDeployLogSlotResponse{}, err + } + resp, err := client.getMSDeployLogSlotHandleResponse(httpResp) + return resp, err +} + +// getMSDeployLogSlotCreateRequest creates the GetMSDeployLogSlot request. +func (client *WebAppsClient) getMSDeployLogSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMSDeployLogSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getMSDeployLogSlotHandleResponse handles the GetMSDeployLogSlot response. +func (client *WebAppsClient) getMSDeployLogSlotHandleResponse(resp *http.Response) (WebAppsClientGetMSDeployLogSlotResponse, error) { + result := WebAppsClientGetMSDeployLogSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployLog); err != nil { + return WebAppsClientGetMSDeployLogSlotResponse{}, err + } + return result, nil +} + +// GetMSDeployStatus - Description for Get the status of the last MSDeploy operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientGetMSDeployStatusOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatus +// method. +func (client *WebAppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployStatusOptions) (WebAppsClientGetMSDeployStatusResponse, error) { + var err error + const operationName = "WebAppsClient.GetMSDeployStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getMSDeployStatusCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetMSDeployStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetMSDeployStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMSDeployStatusResponse{}, err + } + resp, err := client.getMSDeployStatusHandleResponse(httpResp) + return resp, err +} + +// getMSDeployStatusCreateRequest creates the GetMSDeployStatus request. +func (client *WebAppsClient) getMSDeployStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getMSDeployStatusHandleResponse handles the GetMSDeployStatus response. +func (client *WebAppsClient) getMSDeployStatusHandleResponse(resp *http.Response) (WebAppsClientGetMSDeployStatusResponse, error) { + result := WebAppsClientGetMSDeployStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployStatus); err != nil { + return WebAppsClientGetMSDeployStatusResponse{}, err + } + return result, nil +} + +// GetMSDeployStatusSlot - Description for Get the status of the last MSDeploy operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - WebAppsClientGetMSDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatusSlot +// method. +func (client *WebAppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMSDeployStatusSlotOptions) (WebAppsClientGetMSDeployStatusSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetMSDeployStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getMSDeployStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetMSDeployStatusSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetMSDeployStatusSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMSDeployStatusSlotResponse{}, err + } + resp, err := client.getMSDeployStatusSlotHandleResponse(httpResp) + return resp, err +} + +// getMSDeployStatusSlotCreateRequest creates the GetMSDeployStatusSlot request. +func (client *WebAppsClient) getMSDeployStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMSDeployStatusSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getMSDeployStatusSlotHandleResponse handles the GetMSDeployStatusSlot response. +func (client *WebAppsClient) getMSDeployStatusSlotHandleResponse(resp *http.Response) (WebAppsClientGetMSDeployStatusSlotResponse, error) { + result := WebAppsClientGetMSDeployStatusSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployStatus); err != nil { + return WebAppsClientGetMSDeployStatusSlotResponse{}, err + } + return result, nil +} + +// GetMigrateMySQLStatus - Description for Returns the status of MySql in app migration, if one is active, and whether or +// not MySql in app is enabled +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientGetMigrateMySQLStatusOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatus +// method. +func (client *WebAppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMigrateMySQLStatusOptions) (WebAppsClientGetMigrateMySQLStatusResponse, error) { + var err error + const operationName = "WebAppsClient.GetMigrateMySQLStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getMigrateMySQLStatusCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetMigrateMySQLStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetMigrateMySQLStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMigrateMySQLStatusResponse{}, err + } + resp, err := client.getMigrateMySQLStatusHandleResponse(httpResp) + return resp, err +} + +// getMigrateMySQLStatusCreateRequest creates the GetMigrateMySQLStatus request. +func (client *WebAppsClient) getMigrateMySQLStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMigrateMySQLStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getMigrateMySQLStatusHandleResponse handles the GetMigrateMySQLStatus response. +func (client *WebAppsClient) getMigrateMySQLStatusHandleResponse(resp *http.Response) (WebAppsClientGetMigrateMySQLStatusResponse, error) { + result := WebAppsClientGetMigrateMySQLStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MigrateMySQLStatus); err != nil { + return WebAppsClientGetMigrateMySQLStatusResponse{}, err + } + return result, nil +} + +// GetMigrateMySQLStatusSlot - Description for Returns the status of MySql in app migration, if one is active, and whether +// or not MySql in app is enabled +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of the deployment slot. +// - options - WebAppsClientGetMigrateMySQLStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatusSlot +// method. +func (client *WebAppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMigrateMySQLStatusSlotOptions) (WebAppsClientGetMigrateMySQLStatusSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetMigrateMySQLStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getMigrateMySQLStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, err + } + resp, err := client.getMigrateMySQLStatusSlotHandleResponse(httpResp) + return resp, err +} + +// getMigrateMySQLStatusSlotCreateRequest creates the GetMigrateMySQLStatusSlot request. +func (client *WebAppsClient) getMigrateMySQLStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMigrateMySQLStatusSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getMigrateMySQLStatusSlotHandleResponse handles the GetMigrateMySQLStatusSlot response. +func (client *WebAppsClient) getMigrateMySQLStatusSlotHandleResponse(resp *http.Response) (WebAppsClientGetMigrateMySQLStatusSlotResponse, error) { + result := WebAppsClientGetMigrateMySQLStatusSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MigrateMySQLStatus); err != nil { + return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, err + } + return result, nil +} + +// GetNetworkTraceOperation - Description for Gets a named operation for a network trace capturing (or deployment slot, if +// specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - operationID - GUID of the operation. +// - options - WebAppsClientGetNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperation +// method. +func (client *WebAppsClient) GetNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTraceOperationOptions) (WebAppsClientGetNetworkTraceOperationResponse, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTraceOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getNetworkTraceOperationCreateRequest(ctx, resourceGroupName, name, operationID, options) + if err != nil { + return WebAppsClientGetNetworkTraceOperationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetNetworkTraceOperationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTraceOperationResponse{}, err + } + resp, err := client.getNetworkTraceOperationHandleResponse(httpResp) + return resp, err +} + +// getNetworkTraceOperationCreateRequest creates the GetNetworkTraceOperation request. +func (client *WebAppsClient) getNetworkTraceOperationCreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTraceOperationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getNetworkTraceOperationHandleResponse handles the GetNetworkTraceOperation response. +func (client *WebAppsClient) getNetworkTraceOperationHandleResponse(resp *http.Response) (WebAppsClientGetNetworkTraceOperationResponse, error) { + result := WebAppsClientGetNetworkTraceOperationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { + return WebAppsClientGetNetworkTraceOperationResponse{}, err + } + return result, nil +} + +// GetNetworkTraceOperationSlot - Description for Gets a named operation for a network trace capturing (or deployment slot, +// if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - operationID - GUID of the operation. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. +// - options - WebAppsClientGetNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlot +// method. +func (client *WebAppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTraceOperationSlotOptions) (WebAppsClientGetNetworkTraceOperationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTraceOperationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getNetworkTraceOperationSlotCreateRequest(ctx, resourceGroupName, name, operationID, slot, options) + if err != nil { + return WebAppsClientGetNetworkTraceOperationSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetNetworkTraceOperationSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTraceOperationSlotResponse{}, err + } + resp, err := client.getNetworkTraceOperationSlotHandleResponse(httpResp) + return resp, err +} + +// getNetworkTraceOperationSlotCreateRequest creates the GetNetworkTraceOperationSlot request. +func (client *WebAppsClient) getNetworkTraceOperationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTraceOperationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getNetworkTraceOperationSlotHandleResponse handles the GetNetworkTraceOperationSlot response. +func (client *WebAppsClient) getNetworkTraceOperationSlotHandleResponse(resp *http.Response) (WebAppsClientGetNetworkTraceOperationSlotResponse, error) { + result := WebAppsClientGetNetworkTraceOperationSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { + return WebAppsClientGetNetworkTraceOperationSlotResponse{}, err + } + return result, nil +} + +// GetNetworkTraceOperationSlotV2 - Description for Gets a named operation for a network trace capturing (or deployment slot, +// if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - operationID - GUID of the operation. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. +// - options - WebAppsClientGetNetworkTraceOperationSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlotV2 +// method. +func (client *WebAppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTraceOperationSlotV2Options) (WebAppsClientGetNetworkTraceOperationSlotV2Response, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTraceOperationSlotV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getNetworkTraceOperationSlotV2CreateRequest(ctx, resourceGroupName, name, operationID, slot, options) + if err != nil { + return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, err + } + resp, err := client.getNetworkTraceOperationSlotV2HandleResponse(httpResp) + return resp, err +} + +// getNetworkTraceOperationSlotV2CreateRequest creates the GetNetworkTraceOperationSlotV2 request. +func (client *WebAppsClient) getNetworkTraceOperationSlotV2CreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTraceOperationSlotV2Options) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getNetworkTraceOperationSlotV2HandleResponse handles the GetNetworkTraceOperationSlotV2 response. +func (client *WebAppsClient) getNetworkTraceOperationSlotV2HandleResponse(resp *http.Response) (WebAppsClientGetNetworkTraceOperationSlotV2Response, error) { + result := WebAppsClientGetNetworkTraceOperationSlotV2Response{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { + return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, err + } + return result, nil +} + +// GetNetworkTraceOperationV2 - Description for Gets a named operation for a network trace capturing (or deployment slot, +// if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - operationID - GUID of the operation. +// - options - WebAppsClientGetNetworkTraceOperationV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationV2 +// method. +func (client *WebAppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTraceOperationV2Options) (WebAppsClientGetNetworkTraceOperationV2Response, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTraceOperationV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getNetworkTraceOperationV2CreateRequest(ctx, resourceGroupName, name, operationID, options) + if err != nil { + return WebAppsClientGetNetworkTraceOperationV2Response{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetNetworkTraceOperationV2Response{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTraceOperationV2Response{}, err + } + resp, err := client.getNetworkTraceOperationV2HandleResponse(httpResp) + return resp, err +} + +// getNetworkTraceOperationV2CreateRequest creates the GetNetworkTraceOperationV2 request. +func (client *WebAppsClient) getNetworkTraceOperationV2CreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTraceOperationV2Options) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getNetworkTraceOperationV2HandleResponse handles the GetNetworkTraceOperationV2 response. +func (client *WebAppsClient) getNetworkTraceOperationV2HandleResponse(resp *http.Response) (WebAppsClientGetNetworkTraceOperationV2Response, error) { + result := WebAppsClientGetNetworkTraceOperationV2Response{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { + return WebAppsClientGetNetworkTraceOperationV2Response{}, err + } + return result, nil +} + +// GetNetworkTraces - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - operationID - GUID of the operation. +// - options - WebAppsClientGetNetworkTracesOptions contains the optional parameters for the WebAppsClient.GetNetworkTraces +// method. +func (client *WebAppsClient) GetNetworkTraces(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTracesOptions) (WebAppsClientGetNetworkTracesResponse, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTraces" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getNetworkTracesCreateRequest(ctx, resourceGroupName, name, operationID, options) + if err != nil { + return WebAppsClientGetNetworkTracesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetNetworkTracesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTracesResponse{}, err + } + resp, err := client.getNetworkTracesHandleResponse(httpResp) + return resp, err +} + +// getNetworkTracesCreateRequest creates the GetNetworkTraces request. +func (client *WebAppsClient) getNetworkTracesCreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTracesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getNetworkTracesHandleResponse handles the GetNetworkTraces response. +func (client *WebAppsClient) getNetworkTracesHandleResponse(resp *http.Response) (WebAppsClientGetNetworkTracesResponse, error) { + result := WebAppsClientGetNetworkTracesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { + return WebAppsClientGetNetworkTracesResponse{}, err + } + return result, nil +} + +// GetNetworkTracesSlot - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - operationID - GUID of the operation. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. +// - options - WebAppsClientGetNetworkTracesSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTracesSlot +// method. +func (client *WebAppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTracesSlotOptions) (WebAppsClientGetNetworkTracesSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTracesSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getNetworkTracesSlotCreateRequest(ctx, resourceGroupName, name, operationID, slot, options) + if err != nil { + return WebAppsClientGetNetworkTracesSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetNetworkTracesSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTracesSlotResponse{}, err + } + resp, err := client.getNetworkTracesSlotHandleResponse(httpResp) + return resp, err +} + +// getNetworkTracesSlotCreateRequest creates the GetNetworkTracesSlot request. +func (client *WebAppsClient) getNetworkTracesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTracesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getNetworkTracesSlotHandleResponse handles the GetNetworkTracesSlot response. +func (client *WebAppsClient) getNetworkTracesSlotHandleResponse(resp *http.Response) (WebAppsClientGetNetworkTracesSlotResponse, error) { + result := WebAppsClientGetNetworkTracesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { + return WebAppsClientGetNetworkTracesSlotResponse{}, err + } + return result, nil +} + +// GetNetworkTracesSlotV2 - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - operationID - GUID of the operation. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. +// - options - WebAppsClientGetNetworkTracesSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesSlotV2 +// method. +func (client *WebAppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTracesSlotV2Options) (WebAppsClientGetNetworkTracesSlotV2Response, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTracesSlotV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getNetworkTracesSlotV2CreateRequest(ctx, resourceGroupName, name, operationID, slot, options) + if err != nil { + return WebAppsClientGetNetworkTracesSlotV2Response{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetNetworkTracesSlotV2Response{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTracesSlotV2Response{}, err + } + resp, err := client.getNetworkTracesSlotV2HandleResponse(httpResp) + return resp, err +} + +// getNetworkTracesSlotV2CreateRequest creates the GetNetworkTracesSlotV2 request. +func (client *WebAppsClient) getNetworkTracesSlotV2CreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTracesSlotV2Options) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getNetworkTracesSlotV2HandleResponse handles the GetNetworkTracesSlotV2 response. +func (client *WebAppsClient) getNetworkTracesSlotV2HandleResponse(resp *http.Response) (WebAppsClientGetNetworkTracesSlotV2Response, error) { + result := WebAppsClientGetNetworkTracesSlotV2Response{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { + return WebAppsClientGetNetworkTracesSlotV2Response{}, err + } + return result, nil +} + +// GetNetworkTracesV2 - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - operationID - GUID of the operation. +// - options - WebAppsClientGetNetworkTracesV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesV2 +// method. +func (client *WebAppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTracesV2Options) (WebAppsClientGetNetworkTracesV2Response, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTracesV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getNetworkTracesV2CreateRequest(ctx, resourceGroupName, name, operationID, options) + if err != nil { + return WebAppsClientGetNetworkTracesV2Response{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetNetworkTracesV2Response{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTracesV2Response{}, err + } + resp, err := client.getNetworkTracesV2HandleResponse(httpResp) + return resp, err +} + +// getNetworkTracesV2CreateRequest creates the GetNetworkTracesV2 request. +func (client *WebAppsClient) getNetworkTracesV2CreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTracesV2Options) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getNetworkTracesV2HandleResponse handles the GetNetworkTracesV2 response. +func (client *WebAppsClient) getNetworkTracesV2HandleResponse(resp *http.Response) (WebAppsClientGetNetworkTracesV2Response, error) { + result := WebAppsClientGetNetworkTracesV2Response{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { + return WebAppsClientGetNetworkTracesV2Response{}, err + } + return result, nil +} + +// GetOneDeployStatus - Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the +// site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientGetOneDeployStatusOptions contains the optional parameters for the WebAppsClient.GetOneDeployStatus +// method. +func (client *WebAppsClient) GetOneDeployStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetOneDeployStatusOptions) (WebAppsClientGetOneDeployStatusResponse, error) { + var err error + const operationName = "WebAppsClient.GetOneDeployStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getOneDeployStatusCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetOneDeployStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetOneDeployStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetOneDeployStatusResponse{}, err + } + resp, err := client.getOneDeployStatusHandleResponse(httpResp) + return resp, err +} + +// getOneDeployStatusCreateRequest creates the GetOneDeployStatus request. +func (client *WebAppsClient) getOneDeployStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetOneDeployStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getOneDeployStatusHandleResponse handles the GetOneDeployStatus response. +func (client *WebAppsClient) getOneDeployStatusHandleResponse(resp *http.Response) (WebAppsClientGetOneDeployStatusResponse, error) { + result := WebAppsClientGetOneDeployStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { + return WebAppsClientGetOneDeployStatusResponse{}, err + } + return result, nil +} + +// GetPremierAddOn - Description for Gets a named add-on of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - premierAddOnName - Add-on name. +// - options - WebAppsClientGetPremierAddOnOptions contains the optional parameters for the WebAppsClient.GetPremierAddOn method. +func (client *WebAppsClient) GetPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *WebAppsClientGetPremierAddOnOptions) (WebAppsClientGetPremierAddOnResponse, error) { + var err error + const operationName = "WebAppsClient.GetPremierAddOn" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, options) + if err != nil { + return WebAppsClientGetPremierAddOnResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetPremierAddOnResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPremierAddOnResponse{}, err + } + resp, err := client.getPremierAddOnHandleResponse(httpResp) + return resp, err +} + +// getPremierAddOnCreateRequest creates the GetPremierAddOn request. +func (client *WebAppsClient) getPremierAddOnCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *WebAppsClientGetPremierAddOnOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if premierAddOnName == "" { + return nil, errors.New("parameter premierAddOnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPremierAddOnHandleResponse handles the GetPremierAddOn response. +func (client *WebAppsClient) getPremierAddOnHandleResponse(resp *http.Response) (WebAppsClientGetPremierAddOnResponse, error) { + result := WebAppsClientGetPremierAddOnResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { + return WebAppsClientGetPremierAddOnResponse{}, err + } + return result, nil +} + +// GetPremierAddOnSlot - Description for Gets a named add-on of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - premierAddOnName - Add-on name. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the production slot. +// - options - WebAppsClientGetPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.GetPremierAddOnSlot +// method. +func (client *WebAppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *WebAppsClientGetPremierAddOnSlotOptions) (WebAppsClientGetPremierAddOnSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetPremierAddOnSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, options) + if err != nil { + return WebAppsClientGetPremierAddOnSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetPremierAddOnSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPremierAddOnSlotResponse{}, err + } + resp, err := client.getPremierAddOnSlotHandleResponse(httpResp) + return resp, err +} + +// getPremierAddOnSlotCreateRequest creates the GetPremierAddOnSlot request. +func (client *WebAppsClient) getPremierAddOnSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *WebAppsClientGetPremierAddOnSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if premierAddOnName == "" { + return nil, errors.New("parameter premierAddOnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPremierAddOnSlotHandleResponse handles the GetPremierAddOnSlot response. +func (client *WebAppsClient) getPremierAddOnSlotHandleResponse(resp *http.Response) (WebAppsClientGetPremierAddOnSlotResponse, error) { + result := WebAppsClientGetPremierAddOnSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { + return WebAppsClientGetPremierAddOnSlotResponse{}, err + } + return result, nil +} + +// GetPrivateAccess - Description for Gets data around private site access enablement and authorized Virtual Networks that +// can access the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - options - WebAppsClientGetPrivateAccessOptions contains the optional parameters for the WebAppsClient.GetPrivateAccess +// method. +func (client *WebAppsClient) GetPrivateAccess(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateAccessOptions) (WebAppsClientGetPrivateAccessResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateAccess" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateAccessCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetPrivateAccessResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetPrivateAccessResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateAccessResponse{}, err + } + resp, err := client.getPrivateAccessHandleResponse(httpResp) + return resp, err +} + +// getPrivateAccessCreateRequest creates the GetPrivateAccess request. +func (client *WebAppsClient) getPrivateAccessCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateAccessOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateAccessHandleResponse handles the GetPrivateAccess response. +func (client *WebAppsClient) getPrivateAccessHandleResponse(resp *http.Response) (WebAppsClientGetPrivateAccessResponse, error) { + result := WebAppsClientGetPrivateAccessResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateAccess); err != nil { + return WebAppsClientGetPrivateAccessResponse{}, err + } + return result, nil +} + +// GetPrivateAccessSlot - Description for Gets data around private site access enablement and authorized Virtual Networks +// that can access the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - slot - The name of the slot for the web app. +// - options - WebAppsClientGetPrivateAccessSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateAccessSlot +// method. +func (client *WebAppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateAccessSlotOptions) (WebAppsClientGetPrivateAccessSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateAccessSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateAccessSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetPrivateAccessSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetPrivateAccessSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateAccessSlotResponse{}, err + } + resp, err := client.getPrivateAccessSlotHandleResponse(httpResp) + return resp, err +} + +// getPrivateAccessSlotCreateRequest creates the GetPrivateAccessSlot request. +func (client *WebAppsClient) getPrivateAccessSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateAccessSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateAccessSlotHandleResponse handles the GetPrivateAccessSlot response. +func (client *WebAppsClient) getPrivateAccessSlotHandleResponse(resp *http.Response) (WebAppsClientGetPrivateAccessSlotResponse, error) { + result := WebAppsClientGetPrivateAccessSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateAccess); err != nil { + return WebAppsClientGetPrivateAccessSlotResponse{}, err + } + return result, nil +} + +// GetPrivateEndpointConnection - Description for Gets a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - privateEndpointConnectionName - Name of the private endpoint connection. +// - options - WebAppsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnection +// method. +func (client *WebAppsClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientGetPrivateEndpointConnectionOptions) (WebAppsClientGetPrivateEndpointConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) + if err != nil { + return WebAppsClientGetPrivateEndpointConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetPrivateEndpointConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateEndpointConnectionResponse{}, err + } + resp, err := client.getPrivateEndpointConnectionHandleResponse(httpResp) + return resp, err +} + +// getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. +func (client *WebAppsClient) getPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientGetPrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateEndpointConnectionHandleResponse handles the GetPrivateEndpointConnection response. +func (client *WebAppsClient) getPrivateEndpointConnectionHandleResponse(resp *http.Response) (WebAppsClientGetPrivateEndpointConnectionResponse, error) { + result := WebAppsClientGetPrivateEndpointConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RemotePrivateEndpointConnectionARMResource); err != nil { + return WebAppsClientGetPrivateEndpointConnectionResponse{}, err + } + return result, nil +} + +// NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoint connections associated with +// a site +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - options - WebAppsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the WebAppsClient.NewGetPrivateEndpointConnectionListPager +// method. +func (client *WebAppsClient) NewGetPrivateEndpointConnectionListPager(resourceGroupName string, name string, options *WebAppsClientGetPrivateEndpointConnectionListOptions) *runtime.Pager[WebAppsClientGetPrivateEndpointConnectionListResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetPrivateEndpointConnectionListResponse]{ + More: func(page WebAppsClientGetPrivateEndpointConnectionListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientGetPrivateEndpointConnectionListResponse) (WebAppsClientGetPrivateEndpointConnectionListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetPrivateEndpointConnectionListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientGetPrivateEndpointConnectionListResponse{}, err + } + return client.getPrivateEndpointConnectionListHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getPrivateEndpointConnectionListCreateRequest creates the GetPrivateEndpointConnectionList request. +func (client *WebAppsClient) getPrivateEndpointConnectionListCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateEndpointConnectionListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateEndpointConnectionListHandleResponse handles the GetPrivateEndpointConnectionList response. +func (client *WebAppsClient) getPrivateEndpointConnectionListHandleResponse(resp *http.Response) (WebAppsClientGetPrivateEndpointConnectionListResponse, error) { + result := WebAppsClientGetPrivateEndpointConnectionListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionCollection); err != nil { + return WebAppsClientGetPrivateEndpointConnectionListResponse{}, err + } + return result, nil +} + +// NewGetPrivateEndpointConnectionListSlotPager - Description for Gets the list of private endpoint connections associated +// with a site +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - slot - Name of the site deployment slot. +// - options - WebAppsClientGetPrivateEndpointConnectionListSlotOptions contains the optional parameters for the WebAppsClient.NewGetPrivateEndpointConnectionListSlotPager +// method. +func (client *WebAppsClient) NewGetPrivateEndpointConnectionListSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateEndpointConnectionListSlotOptions) *runtime.Pager[WebAppsClientGetPrivateEndpointConnectionListSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetPrivateEndpointConnectionListSlotResponse]{ + More: func(page WebAppsClientGetPrivateEndpointConnectionListSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientGetPrivateEndpointConnectionListSlotResponse) (WebAppsClientGetPrivateEndpointConnectionListSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetPrivateEndpointConnectionListSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getPrivateEndpointConnectionListSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientGetPrivateEndpointConnectionListSlotResponse{}, err + } + return client.getPrivateEndpointConnectionListSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getPrivateEndpointConnectionListSlotCreateRequest creates the GetPrivateEndpointConnectionListSlot request. +func (client *WebAppsClient) getPrivateEndpointConnectionListSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateEndpointConnectionListSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateEndpointConnectionListSlotHandleResponse handles the GetPrivateEndpointConnectionListSlot response. +func (client *WebAppsClient) getPrivateEndpointConnectionListSlotHandleResponse(resp *http.Response) (WebAppsClientGetPrivateEndpointConnectionListSlotResponse, error) { + result := WebAppsClientGetPrivateEndpointConnectionListSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionCollection); err != nil { + return WebAppsClientGetPrivateEndpointConnectionListSlotResponse{}, err + } + return result, nil +} + +// GetPrivateEndpointConnectionSlot - Description for Gets a private endpoint connection +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - privateEndpointConnectionName - Name of the private endpoint connection. +// - slot - Name of the site deployment slot. +// - options - WebAppsClientGetPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionSlot +// method. +func (client *WebAppsClient) GetPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientGetPrivateEndpointConnectionSlotOptions) (WebAppsClientGetPrivateEndpointConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateEndpointConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, options) + if err != nil { + return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, err + } + resp, err := client.getPrivateEndpointConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// getPrivateEndpointConnectionSlotCreateRequest creates the GetPrivateEndpointConnectionSlot request. +func (client *WebAppsClient) getPrivateEndpointConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientGetPrivateEndpointConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateEndpointConnectionSlotHandleResponse handles the GetPrivateEndpointConnectionSlot response. +func (client *WebAppsClient) getPrivateEndpointConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientGetPrivateEndpointConnectionSlotResponse, error) { + result := WebAppsClientGetPrivateEndpointConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RemotePrivateEndpointConnectionARMResource); err != nil { + return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, err + } + return result, nil +} + +// GetPrivateLinkResources - Description for Gets the private link resources +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - options - WebAppsClientGetPrivateLinkResourcesOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResources +// method. +func (client *WebAppsClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateLinkResourcesOptions) (WebAppsClientGetPrivateLinkResourcesResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateLinkResources" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetPrivateLinkResourcesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetPrivateLinkResourcesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateLinkResourcesResponse{}, err + } + resp, err := client.getPrivateLinkResourcesHandleResponse(httpResp) + return resp, err +} + +// getPrivateLinkResourcesCreateRequest creates the GetPrivateLinkResources request. +func (client *WebAppsClient) getPrivateLinkResourcesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateLinkResourcesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateLinkResourcesHandleResponse handles the GetPrivateLinkResources response. +func (client *WebAppsClient) getPrivateLinkResourcesHandleResponse(resp *http.Response) (WebAppsClientGetPrivateLinkResourcesResponse, error) { + result := WebAppsClientGetPrivateLinkResourcesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourcesWrapper); err != nil { + return WebAppsClientGetPrivateLinkResourcesResponse{}, err + } + return result, nil +} + +// GetPrivateLinkResourcesSlot - Description for Gets the private link resources +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the site. +// - options - WebAppsClientGetPrivateLinkResourcesSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResourcesSlot +// method. +func (client *WebAppsClient) GetPrivateLinkResourcesSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateLinkResourcesSlotOptions) (WebAppsClientGetPrivateLinkResourcesSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateLinkResourcesSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateLinkResourcesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, err + } + resp, err := client.getPrivateLinkResourcesSlotHandleResponse(httpResp) + return resp, err +} + +// getPrivateLinkResourcesSlotCreateRequest creates the GetPrivateLinkResourcesSlot request. +func (client *WebAppsClient) getPrivateLinkResourcesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateLinkResourcesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateLinkResourcesSlotHandleResponse handles the GetPrivateLinkResourcesSlot response. +func (client *WebAppsClient) getPrivateLinkResourcesSlotHandleResponse(resp *http.Response) (WebAppsClientGetPrivateLinkResourcesSlotResponse, error) { + result := WebAppsClientGetPrivateLinkResourcesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourcesWrapper); err != nil { + return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, err + } + return result, nil +} + +// GetProcess - Description for Get process information by its ID for a specific scaled-out instance in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - options - WebAppsClientGetProcessOptions contains the optional parameters for the WebAppsClient.GetProcess method. +func (client *WebAppsClient) GetProcess(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientGetProcessOptions) (WebAppsClientGetProcessResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcess" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getProcessCreateRequest(ctx, resourceGroupName, name, processID, options) + if err != nil { + return WebAppsClientGetProcessResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetProcessResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessResponse{}, err + } + resp, err := client.getProcessHandleResponse(httpResp) + return resp, err +} + +// getProcessCreateRequest creates the GetProcess request. +func (client *WebAppsClient) getProcessCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientGetProcessOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getProcessHandleResponse handles the GetProcess response. +func (client *WebAppsClient) getProcessHandleResponse(resp *http.Response) (WebAppsClientGetProcessResponse, error) { + result := WebAppsClientGetProcessResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfo); err != nil { + return WebAppsClientGetProcessResponse{}, err + } + return result, nil +} + +// GetProcessDump - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - options - WebAppsClientGetProcessDumpOptions contains the optional parameters for the WebAppsClient.GetProcessDump method. +func (client *WebAppsClient) GetProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientGetProcessDumpOptions) (WebAppsClientGetProcessDumpResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcessDump" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getProcessDumpCreateRequest(ctx, resourceGroupName, name, processID, options) + if err != nil { + return WebAppsClientGetProcessDumpResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetProcessDumpResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessDumpResponse{}, err + } + return WebAppsClientGetProcessDumpResponse{Body: httpResp.Body}, nil +} + +// getProcessDumpCreateRequest creates the GetProcessDump request. +func (client *WebAppsClient) getProcessDumpCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientGetProcessDumpOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + runtime.SkipBodyDownload(req) + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetProcessDumpSlot - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web +// site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientGetProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetProcessDumpSlot +// method. +func (client *WebAppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientGetProcessDumpSlotOptions) (WebAppsClientGetProcessDumpSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcessDumpSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getProcessDumpSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) + if err != nil { + return WebAppsClientGetProcessDumpSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetProcessDumpSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessDumpSlotResponse{}, err + } + return WebAppsClientGetProcessDumpSlotResponse{Body: httpResp.Body}, nil +} + +// getProcessDumpSlotCreateRequest creates the GetProcessDumpSlot request. +func (client *WebAppsClient) getProcessDumpSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientGetProcessDumpSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + runtime.SkipBodyDownload(req) + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetProcessModule - Description for Get process information by its ID for a specific scaled-out instance in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - baseAddress - Module base address. +// - options - WebAppsClientGetProcessModuleOptions contains the optional parameters for the WebAppsClient.GetProcessModule +// method. +func (client *WebAppsClient) GetProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, options *WebAppsClientGetProcessModuleOptions) (WebAppsClientGetProcessModuleResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcessModule" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getProcessModuleCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, options) + if err != nil { + return WebAppsClientGetProcessModuleResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetProcessModuleResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessModuleResponse{}, err + } + resp, err := client.getProcessModuleHandleResponse(httpResp) + return resp, err +} + +// getProcessModuleCreateRequest creates the GetProcessModule request. +func (client *WebAppsClient) getProcessModuleCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, options *WebAppsClientGetProcessModuleOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if baseAddress == "" { + return nil, errors.New("parameter baseAddress cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{baseAddress}", url.PathEscape(baseAddress)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getProcessModuleHandleResponse handles the GetProcessModule response. +func (client *WebAppsClient) getProcessModuleHandleResponse(resp *http.Response) (WebAppsClientGetProcessModuleResponse, error) { + result := WebAppsClientGetProcessModuleResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfo); err != nil { + return WebAppsClientGetProcessModuleResponse{}, err + } + return result, nil +} + +// GetProcessModuleSlot - Description for Get process information by its ID for a specific scaled-out instance in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - baseAddress - Module base address. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientGetProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetProcessModuleSlot +// method. +func (client *WebAppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, options *WebAppsClientGetProcessModuleSlotOptions) (WebAppsClientGetProcessModuleSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcessModuleSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getProcessModuleSlotCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, slot, options) + if err != nil { + return WebAppsClientGetProcessModuleSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetProcessModuleSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessModuleSlotResponse{}, err + } + resp, err := client.getProcessModuleSlotHandleResponse(httpResp) + return resp, err +} + +// getProcessModuleSlotCreateRequest creates the GetProcessModuleSlot request. +func (client *WebAppsClient) getProcessModuleSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, options *WebAppsClientGetProcessModuleSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if baseAddress == "" { + return nil, errors.New("parameter baseAddress cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{baseAddress}", url.PathEscape(baseAddress)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getProcessModuleSlotHandleResponse handles the GetProcessModuleSlot response. +func (client *WebAppsClient) getProcessModuleSlotHandleResponse(resp *http.Response) (WebAppsClientGetProcessModuleSlotResponse, error) { + result := WebAppsClientGetProcessModuleSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfo); err != nil { + return WebAppsClientGetProcessModuleSlotResponse{}, err + } + return result, nil +} + +// GetProcessSlot - Description for Get process information by its ID for a specific scaled-out instance in a web site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientGetProcessSlotOptions contains the optional parameters for the WebAppsClient.GetProcessSlot method. +func (client *WebAppsClient) GetProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientGetProcessSlotOptions) (WebAppsClientGetProcessSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcessSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) + if err != nil { + return WebAppsClientGetProcessSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetProcessSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessSlotResponse{}, err + } + resp, err := client.getProcessSlotHandleResponse(httpResp) + return resp, err +} + +// getProcessSlotCreateRequest creates the GetProcessSlot request. +func (client *WebAppsClient) getProcessSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientGetProcessSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getProcessSlotHandleResponse handles the GetProcessSlot response. +func (client *WebAppsClient) getProcessSlotHandleResponse(resp *http.Response) (WebAppsClientGetProcessSlotResponse, error) { + result := WebAppsClientGetProcessSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfo); err != nil { + return WebAppsClientGetProcessSlotResponse{}, err + } + return result, nil +} + +// BeginGetProductionSiteDeploymentStatus - Gets the deployment status for an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - deploymentStatusID - GUID of the deployment operation. +// - options - WebAppsClientBeginGetProductionSiteDeploymentStatusOptions contains the optional parameters for the WebAppsClient.BeginGetProductionSiteDeploymentStatus +// method. +func (client *WebAppsClient) BeginGetProductionSiteDeploymentStatus(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string, options *WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (*runtime.Poller[WebAppsClientGetProductionSiteDeploymentStatusResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getProductionSiteDeploymentStatus(ctx, resourceGroupName, name, deploymentStatusID, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientGetProductionSiteDeploymentStatusResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientGetProductionSiteDeploymentStatusResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetProductionSiteDeploymentStatus - Gets the deployment status for an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) getProductionSiteDeploymentStatus(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string, options *WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginGetProductionSiteDeploymentStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getProductionSiteDeploymentStatusCreateRequest(ctx, resourceGroupName, name, deploymentStatusID, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getProductionSiteDeploymentStatusCreateRequest creates the GetProductionSiteDeploymentStatus request. +func (client *WebAppsClient) getProductionSiteDeploymentStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string, options *WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus/{deploymentStatusId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if deploymentStatusID == "" { + return nil, errors.New("parameter deploymentStatusID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentStatusId}", url.PathEscape(deploymentStatusID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetPublicCertificate - Description for Get the named public certificate for an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - publicCertificateName - Public certificate name. +// - options - WebAppsClientGetPublicCertificateOptions contains the optional parameters for the WebAppsClient.GetPublicCertificate +// method. +func (client *WebAppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *WebAppsClientGetPublicCertificateOptions) (WebAppsClientGetPublicCertificateResponse, error) { + var err error + const operationName = "WebAppsClient.GetPublicCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPublicCertificateCreateRequest(ctx, resourceGroupName, name, publicCertificateName, options) + if err != nil { + return WebAppsClientGetPublicCertificateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetPublicCertificateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPublicCertificateResponse{}, err + } + resp, err := client.getPublicCertificateHandleResponse(httpResp) + return resp, err +} + +// getPublicCertificateCreateRequest creates the GetPublicCertificate request. +func (client *WebAppsClient) getPublicCertificateCreateRequest(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *WebAppsClientGetPublicCertificateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if publicCertificateName == "" { + return nil, errors.New("parameter publicCertificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPublicCertificateHandleResponse handles the GetPublicCertificate response. +func (client *WebAppsClient) getPublicCertificateHandleResponse(resp *http.Response) (WebAppsClientGetPublicCertificateResponse, error) { + result := WebAppsClientGetPublicCertificateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificate); err != nil { + return WebAppsClientGetPublicCertificateResponse{}, err + } + return result, nil +} + +// GetPublicCertificateSlot - Description for Get the named public certificate for an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. +// - publicCertificateName - Public certificate name. +// - options - WebAppsClientGetPublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.GetPublicCertificateSlot +// method. +func (client *WebAppsClient) GetPublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *WebAppsClientGetPublicCertificateSlotOptions) (WebAppsClientGetPublicCertificateSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetPublicCertificateSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPublicCertificateSlotCreateRequest(ctx, resourceGroupName, name, slot, publicCertificateName, options) + if err != nil { + return WebAppsClientGetPublicCertificateSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetPublicCertificateSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPublicCertificateSlotResponse{}, err + } + resp, err := client.getPublicCertificateSlotHandleResponse(httpResp) + return resp, err +} + +// getPublicCertificateSlotCreateRequest creates the GetPublicCertificateSlot request. +func (client *WebAppsClient) getPublicCertificateSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *WebAppsClientGetPublicCertificateSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if publicCertificateName == "" { + return nil, errors.New("parameter publicCertificateName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPublicCertificateSlotHandleResponse handles the GetPublicCertificateSlot response. +func (client *WebAppsClient) getPublicCertificateSlotHandleResponse(resp *http.Response) (WebAppsClientGetPublicCertificateSlotResponse, error) { + result := WebAppsClientGetPublicCertificateSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificate); err != nil { + return WebAppsClientGetPublicCertificateSlotResponse{}, err + } + return result, nil +} + +// GetRelayServiceConnection - Description for Gets a hybrid connection configuration by its name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - entityName - Name of the hybrid connection. +// - options - WebAppsClientGetRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnection +// method. +func (client *WebAppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, options *WebAppsClientGetRelayServiceConnectionOptions) (WebAppsClientGetRelayServiceConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.GetRelayServiceConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, options) + if err != nil { + return WebAppsClientGetRelayServiceConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetRelayServiceConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetRelayServiceConnectionResponse{}, err + } + resp, err := client.getRelayServiceConnectionHandleResponse(httpResp) + return resp, err +} + +// getRelayServiceConnectionCreateRequest creates the GetRelayServiceConnection request. +func (client *WebAppsClient) getRelayServiceConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, options *WebAppsClientGetRelayServiceConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if entityName == "" { + return nil, errors.New("parameter entityName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getRelayServiceConnectionHandleResponse handles the GetRelayServiceConnection response. +func (client *WebAppsClient) getRelayServiceConnectionHandleResponse(resp *http.Response) (WebAppsClientGetRelayServiceConnectionResponse, error) { + result := WebAppsClientGetRelayServiceConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { + return WebAppsClientGetRelayServiceConnectionResponse{}, err + } + return result, nil +} + +// GetRelayServiceConnectionSlot - Description for Gets a hybrid connection configuration by its name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - entityName - Name of the hybrid connection. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the production +// slot. +// - options - WebAppsClientGetRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnectionSlot +// method. +func (client *WebAppsClient) GetRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *WebAppsClientGetRelayServiceConnectionSlotOptions) (WebAppsClientGetRelayServiceConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetRelayServiceConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, options) + if err != nil { + return WebAppsClientGetRelayServiceConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetRelayServiceConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetRelayServiceConnectionSlotResponse{}, err + } + resp, err := client.getRelayServiceConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// getRelayServiceConnectionSlotCreateRequest creates the GetRelayServiceConnectionSlot request. +func (client *WebAppsClient) getRelayServiceConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *WebAppsClientGetRelayServiceConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if entityName == "" { + return nil, errors.New("parameter entityName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getRelayServiceConnectionSlotHandleResponse handles the GetRelayServiceConnectionSlot response. +func (client *WebAppsClient) getRelayServiceConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientGetRelayServiceConnectionSlotResponse, error) { + result := WebAppsClientGetRelayServiceConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { + return WebAppsClientGetRelayServiceConnectionSlotResponse{}, err + } + return result, nil +} + +// GetScmAllowed - Description for Returns whether Scm basic auth is allowed on the site or not. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetScmAllowedOptions contains the optional parameters for the WebAppsClient.GetScmAllowed method. +func (client *WebAppsClient) GetScmAllowed(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetScmAllowedOptions) (WebAppsClientGetScmAllowedResponse, error) { + var err error + const operationName = "WebAppsClient.GetScmAllowed" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getScmAllowedCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetScmAllowedResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetScmAllowedResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetScmAllowedResponse{}, err + } + resp, err := client.getScmAllowedHandleResponse(httpResp) + return resp, err +} + +// getScmAllowedCreateRequest creates the GetScmAllowed request. +func (client *WebAppsClient) getScmAllowedCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetScmAllowedOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getScmAllowedHandleResponse handles the GetScmAllowed response. +func (client *WebAppsClient) getScmAllowedHandleResponse(resp *http.Response) (WebAppsClientGetScmAllowedResponse, error) { + result := WebAppsClientGetScmAllowedResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { + return WebAppsClientGetScmAllowedResponse{}, err + } + return result, nil +} + +// GetScmAllowedSlot - Description for Returns whether Scm basic auth is allowed on the site or not. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetScmAllowedSlot +// method. +func (client *WebAppsClient) GetScmAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetScmAllowedSlotOptions) (WebAppsClientGetScmAllowedSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetScmAllowedSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getScmAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetScmAllowedSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetScmAllowedSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetScmAllowedSlotResponse{}, err + } + resp, err := client.getScmAllowedSlotHandleResponse(httpResp) + return resp, err +} + +// getScmAllowedSlotCreateRequest creates the GetScmAllowedSlot request. +func (client *WebAppsClient) getScmAllowedSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetScmAllowedSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getScmAllowedSlotHandleResponse handles the GetScmAllowedSlot response. +func (client *WebAppsClient) getScmAllowedSlotHandleResponse(resp *http.Response) (WebAppsClientGetScmAllowedSlotResponse, error) { + result := WebAppsClientGetScmAllowedSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { + return WebAppsClientGetScmAllowedSlotResponse{}, err + } + return result, nil +} + +// GetSiteConnectionStringKeyVaultReference - Description for Gets the config reference and status of an app +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReference +// method. +func (client *WebAppsClient) GetSiteConnectionStringKeyVaultReference(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions) (WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse, error) { + var err error + const operationName = "WebAppsClient.GetSiteConnectionStringKeyVaultReference" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteConnectionStringKeyVaultReferenceCreateRequest(ctx, resourceGroupName, name, connectionStringKey, options) + if err != nil { + return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, err + } + resp, err := client.getSiteConnectionStringKeyVaultReferenceHandleResponse(httpResp) + return resp, err +} + +// getSiteConnectionStringKeyVaultReferenceCreateRequest creates the GetSiteConnectionStringKeyVaultReference request. +func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceCreateRequest(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if connectionStringKey == "" { + return nil, errors.New("parameter connectionStringKey cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionStringKey}", url.PathEscape(connectionStringKey)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteConnectionStringKeyVaultReferenceHandleResponse handles the GetSiteConnectionStringKeyVaultReference response. +func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceHandleResponse(resp *http.Response) (WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse, error) { + result := WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReference); err != nil { + return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, err + } + return result, nil +} + +// GetSiteConnectionStringKeyVaultReferenceSlot - Description for Gets the config reference and status of an app +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot +// method. +func (client *WebAppsClient) GetSiteConnectionStringKeyVaultReferenceSlot(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, slot string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions) (WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteConnectionStringKeyVaultReferenceSlotCreateRequest(ctx, resourceGroupName, name, connectionStringKey, slot, options) + if err != nil { + return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, err + } + resp, err := client.getSiteConnectionStringKeyVaultReferenceSlotHandleResponse(httpResp) + return resp, err +} + +// getSiteConnectionStringKeyVaultReferenceSlotCreateRequest creates the GetSiteConnectionStringKeyVaultReferenceSlot request. +func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, slot string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if connectionStringKey == "" { + return nil, errors.New("parameter connectionStringKey cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionStringKey}", url.PathEscape(connectionStringKey)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteConnectionStringKeyVaultReferenceSlotHandleResponse handles the GetSiteConnectionStringKeyVaultReferenceSlot response. +func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceSlotHandleResponse(resp *http.Response) (WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse, error) { + result := WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReference); err != nil { + return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, err + } + return result, nil +} + +// NewGetSiteConnectionStringKeyVaultReferencesPager - Description for Gets the config reference app settings and status of +// an app +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager +// method. +func (client *WebAppsClient) NewGetSiteConnectionStringKeyVaultReferencesPager(resourceGroupName string, name string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions) *runtime.Pager[WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse]{ + More: func(page WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse) (WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getSiteConnectionStringKeyVaultReferencesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{}, err + } + return client.getSiteConnectionStringKeyVaultReferencesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getSiteConnectionStringKeyVaultReferencesCreateRequest creates the GetSiteConnectionStringKeyVaultReferences request. +func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteConnectionStringKeyVaultReferencesHandleResponse handles the GetSiteConnectionStringKeyVaultReferences response. +func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesHandleResponse(resp *http.Response) (WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse, error) { + result := WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReferenceCollection); err != nil { + return WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{}, err + } + return result, nil +} + +// NewGetSiteConnectionStringKeyVaultReferencesSlotPager - Description for Gets the config reference app settings and status +// of an app +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager +// method. +func (client *WebAppsClient) NewGetSiteConnectionStringKeyVaultReferencesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions) *runtime.Pager[WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse]{ + More: func(page WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse) (WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getSiteConnectionStringKeyVaultReferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{}, err + } + return client.getSiteConnectionStringKeyVaultReferencesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getSiteConnectionStringKeyVaultReferencesSlotCreateRequest creates the GetSiteConnectionStringKeyVaultReferencesSlot request. +func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteConnectionStringKeyVaultReferencesSlotHandleResponse handles the GetSiteConnectionStringKeyVaultReferencesSlot response. +func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesSlotHandleResponse(resp *http.Response) (WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse, error) { + result := WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReferenceCollection); err != nil { + return WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{}, err + } + return result, nil +} + +// GetSiteContainer - Gets a site container of a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - containerName - Site Container Name +// - options - WebAppsClientGetSiteContainerOptions contains the optional parameters for the WebAppsClient.GetSiteContainer +// method. +func (client *WebAppsClient) GetSiteContainer(ctx context.Context, resourceGroupName string, name string, containerName string, options *WebAppsClientGetSiteContainerOptions) (WebAppsClientGetSiteContainerResponse, error) { + var err error + const operationName = "WebAppsClient.GetSiteContainer" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteContainerCreateRequest(ctx, resourceGroupName, name, containerName, options) + if err != nil { + return WebAppsClientGetSiteContainerResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSiteContainerResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSiteContainerResponse{}, err + } + resp, err := client.getSiteContainerHandleResponse(httpResp) + return resp, err +} + +// getSiteContainerCreateRequest creates the GetSiteContainer request. +func (client *WebAppsClient) getSiteContainerCreateRequest(ctx context.Context, resourceGroupName string, name string, containerName string, options *WebAppsClientGetSiteContainerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteContainerHandleResponse handles the GetSiteContainer response. +func (client *WebAppsClient) getSiteContainerHandleResponse(resp *http.Response) (WebAppsClientGetSiteContainerResponse, error) { + result := WebAppsClientGetSiteContainerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainer); err != nil { + return WebAppsClientGetSiteContainerResponse{}, err + } + return result, nil +} + +// GetSiteContainerSlot - Gets a site container of a site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the Site Container for the production +// slot. +// - containerName - Site Container Name +// - options - WebAppsClientGetSiteContainerSlotOptions contains the optional parameters for the WebAppsClient.GetSiteContainerSlot +// method. +func (client *WebAppsClient) GetSiteContainerSlot(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, options *WebAppsClientGetSiteContainerSlotOptions) (WebAppsClientGetSiteContainerSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSiteContainerSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteContainerSlotCreateRequest(ctx, resourceGroupName, name, slot, containerName, options) + if err != nil { + return WebAppsClientGetSiteContainerSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSiteContainerSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSiteContainerSlotResponse{}, err + } + resp, err := client.getSiteContainerSlotHandleResponse(httpResp) + return resp, err +} + +// getSiteContainerSlotCreateRequest creates the GetSiteContainerSlot request. +func (client *WebAppsClient) getSiteContainerSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, containerName string, options *WebAppsClientGetSiteContainerSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteContainerSlotHandleResponse handles the GetSiteContainerSlot response. +func (client *WebAppsClient) getSiteContainerSlotHandleResponse(resp *http.Response) (WebAppsClientGetSiteContainerSlotResponse, error) { + result := WebAppsClientGetSiteContainerSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainer); err != nil { + return WebAppsClientGetSiteContainerSlotResponse{}, err + } + return result, nil +} + +// GetSiteExtension - Description for Get site extension information by its ID for a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - siteExtensionID - Site extension name. +// - options - WebAppsClientGetSiteExtensionOptions contains the optional parameters for the WebAppsClient.GetSiteExtension +// method. +func (client *WebAppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientGetSiteExtensionOptions) (WebAppsClientGetSiteExtensionResponse, error) { + var err error + const operationName = "WebAppsClient.GetSiteExtension" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) + if err != nil { + return WebAppsClientGetSiteExtensionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSiteExtensionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSiteExtensionResponse{}, err + } + resp, err := client.getSiteExtensionHandleResponse(httpResp) + return resp, err +} + +// getSiteExtensionCreateRequest creates the GetSiteExtension request. +func (client *WebAppsClient) getSiteExtensionCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientGetSiteExtensionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if siteExtensionID == "" { + return nil, errors.New("parameter siteExtensionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteExtensionHandleResponse handles the GetSiteExtension response. +func (client *WebAppsClient) getSiteExtensionHandleResponse(resp *http.Response) (WebAppsClientGetSiteExtensionResponse, error) { + result := WebAppsClientGetSiteExtensionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteExtensionInfo); err != nil { + return WebAppsClientGetSiteExtensionResponse{}, err + } + return result, nil +} + +// GetSiteExtensionSlot - Description for Get site extension information by its ID for a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - siteExtensionID - Site extension name. +// - slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. +// - options - WebAppsClientGetSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.GetSiteExtensionSlot +// method. +func (client *WebAppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientGetSiteExtensionSlotOptions) (WebAppsClientGetSiteExtensionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSiteExtensionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) + if err != nil { + return WebAppsClientGetSiteExtensionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSiteExtensionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSiteExtensionSlotResponse{}, err + } + resp, err := client.getSiteExtensionSlotHandleResponse(httpResp) + return resp, err +} + +// getSiteExtensionSlotCreateRequest creates the GetSiteExtensionSlot request. +func (client *WebAppsClient) getSiteExtensionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientGetSiteExtensionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if siteExtensionID == "" { + return nil, errors.New("parameter siteExtensionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSiteExtensionSlotHandleResponse handles the GetSiteExtensionSlot response. +func (client *WebAppsClient) getSiteExtensionSlotHandleResponse(resp *http.Response) (WebAppsClientGetSiteExtensionSlotResponse, error) { + result := WebAppsClientGetSiteExtensionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteExtensionInfo); err != nil { + return WebAppsClientGetSiteExtensionSlotResponse{}, err + } + return result, nil +} + +// GetSitePhpErrorLogFlag - Description for Gets web app's event logs. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientGetSitePhpErrorLogFlagOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlag +// method. +func (client *WebAppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSitePhpErrorLogFlagOptions) (WebAppsClientGetSitePhpErrorLogFlagResponse, error) { + var err error + const operationName = "WebAppsClient.GetSitePhpErrorLogFlag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSitePhpErrorLogFlagCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetSitePhpErrorLogFlagResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSitePhpErrorLogFlagResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSitePhpErrorLogFlagResponse{}, err + } + resp, err := client.getSitePhpErrorLogFlagHandleResponse(httpResp) + return resp, err +} + +// getSitePhpErrorLogFlagCreateRequest creates the GetSitePhpErrorLogFlag request. +func (client *WebAppsClient) getSitePhpErrorLogFlagCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSitePhpErrorLogFlagOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSitePhpErrorLogFlagHandleResponse handles the GetSitePhpErrorLogFlag response. +func (client *WebAppsClient) getSitePhpErrorLogFlagHandleResponse(resp *http.Response) (WebAppsClientGetSitePhpErrorLogFlagResponse, error) { + result := WebAppsClientGetSitePhpErrorLogFlagResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SitePhpErrorLogFlag); err != nil { + return WebAppsClientGetSitePhpErrorLogFlagResponse{}, err + } + return result, nil +} + +// GetSitePhpErrorLogFlagSlot - Description for Gets web app's event logs. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - WebAppsClientGetSitePhpErrorLogFlagSlotOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlagSlot +// method. +func (client *WebAppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSitePhpErrorLogFlagSlotOptions) (WebAppsClientGetSitePhpErrorLogFlagSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSitePhpErrorLogFlagSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSitePhpErrorLogFlagSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, err + } + resp, err := client.getSitePhpErrorLogFlagSlotHandleResponse(httpResp) + return resp, err +} + +// getSitePhpErrorLogFlagSlotCreateRequest creates the GetSitePhpErrorLogFlagSlot request. +func (client *WebAppsClient) getSitePhpErrorLogFlagSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSitePhpErrorLogFlagSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSitePhpErrorLogFlagSlotHandleResponse handles the GetSitePhpErrorLogFlagSlot response. +func (client *WebAppsClient) getSitePhpErrorLogFlagSlotHandleResponse(resp *http.Response) (WebAppsClientGetSitePhpErrorLogFlagSlotResponse, error) { + result := WebAppsClientGetSitePhpErrorLogFlagSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SitePhpErrorLogFlag); err != nil { + return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, err + } + return result, nil +} + +// GetSlot - Description for Gets the details of a web, mobile, or API app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. By default, this API returns the production slot. +// - options - WebAppsClientGetSlotOptions contains the optional parameters for the WebAppsClient.GetSlot method. +func (client *WebAppsClient) GetSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSlotOptions) (WebAppsClientGetSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSlotResponse{}, err + } + resp, err := client.getSlotHandleResponse(httpResp) + return resp, err +} + +// getSlotCreateRequest creates the GetSlot request. +func (client *WebAppsClient) getSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSlotHandleResponse handles the GetSlot response. +func (client *WebAppsClient) getSlotHandleResponse(resp *http.Response) (WebAppsClientGetSlotResponse, error) { + result := WebAppsClientGetSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Site); err != nil { + return WebAppsClientGetSlotResponse{}, err + } + return result, nil +} + +// BeginGetSlotSiteDeploymentStatusSlot - Gets the deployment status for an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production +// slot. +// - deploymentStatusID - GUID of the deployment operation. +// - options - WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions contains the optional parameters for the WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot +// method. +func (client *WebAppsClient) BeginGetSlotSiteDeploymentStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string, options *WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (*runtime.Poller[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getSlotSiteDeploymentStatusSlot(ctx, resourceGroupName, name, slot, deploymentStatusID, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetSlotSiteDeploymentStatusSlot - Gets the deployment status for an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) getSlotSiteDeploymentStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string, options *WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSlotSiteDeploymentStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, deploymentStatusID, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getSlotSiteDeploymentStatusSlotCreateRequest creates the GetSlotSiteDeploymentStatusSlot request. +func (client *WebAppsClient) getSlotSiteDeploymentStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string, options *WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus/{deploymentStatusId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if deploymentStatusID == "" { + return nil, errors.New("parameter deploymentStatusID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{deploymentStatusId}", url.PathEscape(deploymentStatusID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetSourceControl - Description for Gets the source control configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetSourceControlOptions contains the optional parameters for the WebAppsClient.GetSourceControl +// method. +func (client *WebAppsClient) GetSourceControl(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSourceControlOptions) (WebAppsClientGetSourceControlResponse, error) { + var err error + const operationName = "WebAppsClient.GetSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSourceControlCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetSourceControlResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSourceControlResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSourceControlResponse{}, err + } + resp, err := client.getSourceControlHandleResponse(httpResp) + return resp, err +} + +// getSourceControlCreateRequest creates the GetSourceControl request. +func (client *WebAppsClient) getSourceControlCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSourceControlOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSourceControlHandleResponse handles the GetSourceControl response. +func (client *WebAppsClient) getSourceControlHandleResponse(resp *http.Response) (WebAppsClientGetSourceControlResponse, error) { + result := WebAppsClientGetSourceControlResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteSourceControl); err != nil { + return WebAppsClientGetSourceControlResponse{}, err + } + return result, nil +} + +// GetSourceControlSlot - Description for Gets the source control configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the +// production slot. +// - options - WebAppsClientGetSourceControlSlotOptions contains the optional parameters for the WebAppsClient.GetSourceControlSlot +// method. +func (client *WebAppsClient) GetSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSourceControlSlotOptions) (WebAppsClientGetSourceControlSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSourceControlSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetSourceControlSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSourceControlSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSourceControlSlotResponse{}, err + } + resp, err := client.getSourceControlSlotHandleResponse(httpResp) + return resp, err +} + +// getSourceControlSlotCreateRequest creates the GetSourceControlSlot request. +func (client *WebAppsClient) getSourceControlSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSourceControlSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSourceControlSlotHandleResponse handles the GetSourceControlSlot response. +func (client *WebAppsClient) getSourceControlSlotHandleResponse(resp *http.Response) (WebAppsClientGetSourceControlSlotResponse, error) { + result := WebAppsClientGetSourceControlSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteSourceControl); err != nil { + return WebAppsClientGetSourceControlSlotResponse{}, err + } + return result, nil +} + +// GetSwiftVirtualNetworkConnection - Description for Gets a Swift Virtual Network connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientGetSwiftVirtualNetworkConnectionOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnection +// method. +func (client *WebAppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSwiftVirtualNetworkConnectionOptions) (WebAppsClientGetSwiftVirtualNetworkConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.GetSwiftVirtualNetworkConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSwiftVirtualNetworkConnectionCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, err + } + resp, err := client.getSwiftVirtualNetworkConnectionHandleResponse(httpResp) + return resp, err +} + +// getSwiftVirtualNetworkConnectionCreateRequest creates the GetSwiftVirtualNetworkConnection request. +func (client *WebAppsClient) getSwiftVirtualNetworkConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSwiftVirtualNetworkConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSwiftVirtualNetworkConnectionHandleResponse handles the GetSwiftVirtualNetworkConnection response. +func (client *WebAppsClient) getSwiftVirtualNetworkConnectionHandleResponse(resp *http.Response) (WebAppsClientGetSwiftVirtualNetworkConnectionResponse, error) { + result := WebAppsClientGetSwiftVirtualNetworkConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { + return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, err + } + return result, nil +} + +// GetSwiftVirtualNetworkConnectionSlot - Description for Gets a Swift Virtual Network connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual +// Network. +// - options - WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnectionSlot +// method. +func (client *WebAppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions) (WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSwiftVirtualNetworkConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSwiftVirtualNetworkConnectionSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, err + } + resp, err := client.getSwiftVirtualNetworkConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// getSwiftVirtualNetworkConnectionSlotCreateRequest creates the GetSwiftVirtualNetworkConnectionSlot request. +func (client *WebAppsClient) getSwiftVirtualNetworkConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSwiftVirtualNetworkConnectionSlotHandleResponse handles the GetSwiftVirtualNetworkConnectionSlot response. +func (client *WebAppsClient) getSwiftVirtualNetworkConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse, error) { + result := WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { + return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, err + } + return result, nil +} + +// GetTriggeredWebJob - Description for Gets a triggered web job by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - options - WebAppsClientGetTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJob +// method. +func (client *WebAppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetTriggeredWebJobOptions) (WebAppsClientGetTriggeredWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.GetTriggeredWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getTriggeredWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) + if err != nil { + return WebAppsClientGetTriggeredWebJobResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetTriggeredWebJobResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetTriggeredWebJobResponse{}, err + } + resp, err := client.getTriggeredWebJobHandleResponse(httpResp) + return resp, err +} + +// getTriggeredWebJobCreateRequest creates the GetTriggeredWebJob request. +func (client *WebAppsClient) getTriggeredWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetTriggeredWebJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getTriggeredWebJobHandleResponse handles the GetTriggeredWebJob response. +func (client *WebAppsClient) getTriggeredWebJobHandleResponse(resp *http.Response) (WebAppsClientGetTriggeredWebJobResponse, error) { + result := WebAppsClientGetTriggeredWebJobResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredWebJob); err != nil { + return WebAppsClientGetTriggeredWebJobResponse{}, err + } + return result, nil +} + +// GetTriggeredWebJobHistory - Description for Gets a triggered web job's history by its ID for an app, , or a deployment +// slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - id - History ID. +// - options - WebAppsClientGetTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistory +// method. +func (client *WebAppsClient) GetTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, options *WebAppsClientGetTriggeredWebJobHistoryOptions) (WebAppsClientGetTriggeredWebJobHistoryResponse, error) { + var err error + const operationName = "WebAppsClient.GetTriggeredWebJobHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getTriggeredWebJobHistoryCreateRequest(ctx, resourceGroupName, name, webJobName, id, options) + if err != nil { + return WebAppsClientGetTriggeredWebJobHistoryResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetTriggeredWebJobHistoryResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetTriggeredWebJobHistoryResponse{}, err + } + resp, err := client.getTriggeredWebJobHistoryHandleResponse(httpResp) + return resp, err +} + +// getTriggeredWebJobHistoryCreateRequest creates the GetTriggeredWebJobHistory request. +func (client *WebAppsClient) getTriggeredWebJobHistoryCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, options *WebAppsClientGetTriggeredWebJobHistoryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getTriggeredWebJobHistoryHandleResponse handles the GetTriggeredWebJobHistory response. +func (client *WebAppsClient) getTriggeredWebJobHistoryHandleResponse(resp *http.Response) (WebAppsClientGetTriggeredWebJobHistoryResponse, error) { + result := WebAppsClientGetTriggeredWebJobHistoryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredJobHistory); err != nil { + return WebAppsClientGetTriggeredWebJobHistoryResponse{}, err + } + return result, nil +} + +// GetTriggeredWebJobHistorySlot - Description for Gets a triggered web job's history by its ID for an app, , or a deployment +// slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - id - History ID. +// - slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. +// - options - WebAppsClientGetTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistorySlot +// method. +func (client *WebAppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, slot string, options *WebAppsClientGetTriggeredWebJobHistorySlotOptions) (WebAppsClientGetTriggeredWebJobHistorySlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetTriggeredWebJobHistorySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getTriggeredWebJobHistorySlotCreateRequest(ctx, resourceGroupName, name, webJobName, id, slot, options) + if err != nil { + return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, err + } + resp, err := client.getTriggeredWebJobHistorySlotHandleResponse(httpResp) + return resp, err +} + +// getTriggeredWebJobHistorySlotCreateRequest creates the GetTriggeredWebJobHistorySlot request. +func (client *WebAppsClient) getTriggeredWebJobHistorySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, slot string, options *WebAppsClientGetTriggeredWebJobHistorySlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getTriggeredWebJobHistorySlotHandleResponse handles the GetTriggeredWebJobHistorySlot response. +func (client *WebAppsClient) getTriggeredWebJobHistorySlotHandleResponse(resp *http.Response) (WebAppsClientGetTriggeredWebJobHistorySlotResponse, error) { + result := WebAppsClientGetTriggeredWebJobHistorySlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredJobHistory); err != nil { + return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, err + } + return result, nil +} + +// GetTriggeredWebJobSlot - Description for Gets a triggered web job by its ID for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. +// - options - WebAppsClientGetTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobSlot +// method. +func (client *WebAppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetTriggeredWebJobSlotOptions) (WebAppsClientGetTriggeredWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetTriggeredWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getTriggeredWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) + if err != nil { + return WebAppsClientGetTriggeredWebJobSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetTriggeredWebJobSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetTriggeredWebJobSlotResponse{}, err + } + resp, err := client.getTriggeredWebJobSlotHandleResponse(httpResp) + return resp, err +} + +// getTriggeredWebJobSlotCreateRequest creates the GetTriggeredWebJobSlot request. +func (client *WebAppsClient) getTriggeredWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetTriggeredWebJobSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getTriggeredWebJobSlotHandleResponse handles the GetTriggeredWebJobSlot response. +func (client *WebAppsClient) getTriggeredWebJobSlotHandleResponse(resp *http.Response) (WebAppsClientGetTriggeredWebJobSlotResponse, error) { + result := WebAppsClientGetTriggeredWebJobSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredWebJob); err != nil { + return WebAppsClientGetTriggeredWebJobSlotResponse{}, err + } + return result, nil +} + +// GetVnetConnection - Description for Gets a virtual network the app (or deployment slot) is connected to by name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of the virtual network. +// - options - WebAppsClientGetVnetConnectionOptions contains the optional parameters for the WebAppsClient.GetVnetConnection +// method. +func (client *WebAppsClient) GetVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, options *WebAppsClientGetVnetConnectionOptions) (WebAppsClientGetVnetConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.GetVnetConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, options) + if err != nil { + return WebAppsClientGetVnetConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetVnetConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetVnetConnectionResponse{}, err + } + resp, err := client.getVnetConnectionHandleResponse(httpResp) + return resp, err +} + +// getVnetConnectionCreateRequest creates the GetVnetConnection request. +func (client *WebAppsClient) getVnetConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, options *WebAppsClientGetVnetConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVnetConnectionHandleResponse handles the GetVnetConnection response. +func (client *WebAppsClient) getVnetConnectionHandleResponse(resp *http.Response) (WebAppsClientGetVnetConnectionResponse, error) { + result := WebAppsClientGetVnetConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { + return WebAppsClientGetVnetConnectionResponse{}, err + } + return result, nil +} + +// GetVnetConnectionGateway - Description for Gets an app's Virtual Network gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of the Virtual Network. +// - gatewayName - Name of the gateway. Currently, the only supported string is "primary". +// - options - WebAppsClientGetVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGateway +// method. +func (client *WebAppsClient) GetVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *WebAppsClientGetVnetConnectionGatewayOptions) (WebAppsClientGetVnetConnectionGatewayResponse, error) { + var err error + const operationName = "WebAppsClient.GetVnetConnectionGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVnetConnectionGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, options) + if err != nil { + return WebAppsClientGetVnetConnectionGatewayResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetVnetConnectionGatewayResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetVnetConnectionGatewayResponse{}, err + } + resp, err := client.getVnetConnectionGatewayHandleResponse(httpResp) + return resp, err +} + +// getVnetConnectionGatewayCreateRequest creates the GetVnetConnectionGateway request. +func (client *WebAppsClient) getVnetConnectionGatewayCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *WebAppsClientGetVnetConnectionGatewayOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVnetConnectionGatewayHandleResponse handles the GetVnetConnectionGateway response. +func (client *WebAppsClient) getVnetConnectionGatewayHandleResponse(resp *http.Response) (WebAppsClientGetVnetConnectionGatewayResponse, error) { + result := WebAppsClientGetVnetConnectionGatewayResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { + return WebAppsClientGetVnetConnectionGatewayResponse{}, err + } + return result, nil +} + +// GetVnetConnectionGatewaySlot - Description for Gets an app's Virtual Network gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of the Virtual Network. +// - gatewayName - Name of the gateway. Currently, the only supported string is "primary". +// - slot - Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual +// Network. +// - options - WebAppsClientGetVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGatewaySlot +// method. +func (client *WebAppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, options *WebAppsClientGetVnetConnectionGatewaySlotOptions) (WebAppsClientGetVnetConnectionGatewaySlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetVnetConnectionGatewaySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVnetConnectionGatewaySlotCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, slot, options) + if err != nil { + return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, err + } + resp, err := client.getVnetConnectionGatewaySlotHandleResponse(httpResp) + return resp, err +} + +// getVnetConnectionGatewaySlotCreateRequest creates the GetVnetConnectionGatewaySlot request. +func (client *WebAppsClient) getVnetConnectionGatewaySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, options *WebAppsClientGetVnetConnectionGatewaySlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVnetConnectionGatewaySlotHandleResponse handles the GetVnetConnectionGatewaySlot response. +func (client *WebAppsClient) getVnetConnectionGatewaySlotHandleResponse(resp *http.Response) (WebAppsClientGetVnetConnectionGatewaySlotResponse, error) { + result := WebAppsClientGetVnetConnectionGatewaySlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { + return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, err + } + return result, nil +} + +// GetVnetConnectionSlot - Description for Gets a virtual network the app (or deployment slot) is connected to by name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of the virtual network. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the named virtual network for the production +// slot. +// - options - WebAppsClientGetVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionSlot +// method. +func (client *WebAppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *WebAppsClientGetVnetConnectionSlotOptions) (WebAppsClientGetVnetConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetVnetConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, options) + if err != nil { + return WebAppsClientGetVnetConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetVnetConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetVnetConnectionSlotResponse{}, err + } + resp, err := client.getVnetConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// getVnetConnectionSlotCreateRequest creates the GetVnetConnectionSlot request. +func (client *WebAppsClient) getVnetConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *WebAppsClientGetVnetConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVnetConnectionSlotHandleResponse handles the GetVnetConnectionSlot response. +func (client *WebAppsClient) getVnetConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientGetVnetConnectionSlotResponse, error) { + result := WebAppsClientGetVnetConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { + return WebAppsClientGetVnetConnectionSlotResponse{}, err + } + return result, nil +} + +// GetWebJob - Description for Get webjob information for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of the web job. +// - options - WebAppsClientGetWebJobOptions contains the optional parameters for the WebAppsClient.GetWebJob method. +func (client *WebAppsClient) GetWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetWebJobOptions) (WebAppsClientGetWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.GetWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) + if err != nil { + return WebAppsClientGetWebJobResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetWebJobResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetWebJobResponse{}, err + } + resp, err := client.getWebJobHandleResponse(httpResp) + return resp, err +} + +// getWebJobCreateRequest creates the GetWebJob request. +func (client *WebAppsClient) getWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetWebJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getWebJobHandleResponse handles the GetWebJob response. +func (client *WebAppsClient) getWebJobHandleResponse(resp *http.Response) (WebAppsClientGetWebJobResponse, error) { + result := WebAppsClientGetWebJobResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebJob); err != nil { + return WebAppsClientGetWebJobResponse{}, err + } + return result, nil +} + +// GetWebJobSlot - Description for Get webjob information for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of the web job. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientGetWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetWebJobSlot method. +func (client *WebAppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetWebJobSlotOptions) (WebAppsClientGetWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) + if err != nil { + return WebAppsClientGetWebJobSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetWebJobSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetWebJobSlotResponse{}, err + } + resp, err := client.getWebJobSlotHandleResponse(httpResp) + return resp, err +} + +// getWebJobSlotCreateRequest creates the GetWebJobSlot request. +func (client *WebAppsClient) getWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetWebJobSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getWebJobSlotHandleResponse handles the GetWebJobSlot response. +func (client *WebAppsClient) getWebJobSlotHandleResponse(resp *http.Response) (WebAppsClientGetWebJobSlotResponse, error) { + result := WebAppsClientGetWebJobSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebJob); err != nil { + return WebAppsClientGetWebJobSlotResponse{}, err + } + return result, nil +} + +// GetWebSiteContainerLogs - Description for Gets the last lines of docker logs for the given site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientGetWebSiteContainerLogsOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogs +// method. +func (client *WebAppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetWebSiteContainerLogsOptions) (WebAppsClientGetWebSiteContainerLogsResponse, error) { + var err error + const operationName = "WebAppsClient.GetWebSiteContainerLogs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getWebSiteContainerLogsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientGetWebSiteContainerLogsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetWebSiteContainerLogsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetWebSiteContainerLogsResponse{}, err + } + return WebAppsClientGetWebSiteContainerLogsResponse{Body: httpResp.Body}, nil +} + +// getWebSiteContainerLogsCreateRequest creates the GetWebSiteContainerLogs request. +func (client *WebAppsClient) getWebSiteContainerLogsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetWebSiteContainerLogsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + runtime.SkipBodyDownload(req) + req.Raw().Header["Accept"] = []string{"application/octet-stream"} + return req, nil +} + +// GetWebSiteContainerLogsSlot - Description for Gets the last lines of docker logs for the given site +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - WebAppsClientGetWebSiteContainerLogsSlotOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogsSlot +// method. +func (client *WebAppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetWebSiteContainerLogsSlotOptions) (WebAppsClientGetWebSiteContainerLogsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetWebSiteContainerLogsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getWebSiteContainerLogsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientGetWebSiteContainerLogsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetWebSiteContainerLogsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetWebSiteContainerLogsSlotResponse{}, err + } + return WebAppsClientGetWebSiteContainerLogsSlotResponse{Body: httpResp.Body}, nil +} + +// getWebSiteContainerLogsSlotCreateRequest creates the GetWebSiteContainerLogsSlot request. +func (client *WebAppsClient) getWebSiteContainerLogsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetWebSiteContainerLogsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + runtime.SkipBodyDownload(req) + req.Raw().Header["Accept"] = []string{"application/octet-stream"} + return req, nil +} + +// GetWorkflow - Get workflow information by its ID for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - Workflow name. +// - options - WebAppsClientGetWorkflowOptions contains the optional parameters for the WebAppsClient.GetWorkflow method. +func (client *WebAppsClient) GetWorkflow(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WebAppsClientGetWorkflowOptions) (WebAppsClientGetWorkflowResponse, error) { + var err error + const operationName = "WebAppsClient.GetWorkflow" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getWorkflowCreateRequest(ctx, resourceGroupName, name, workflowName, options) + if err != nil { + return WebAppsClientGetWorkflowResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientGetWorkflowResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetWorkflowResponse{}, err + } + resp, err := client.getWorkflowHandleResponse(httpResp) + return resp, err +} + +// getWorkflowCreateRequest creates the GetWorkflow request. +func (client *WebAppsClient) getWorkflowCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WebAppsClientGetWorkflowOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getWorkflowHandleResponse handles the GetWorkflow response. +func (client *WebAppsClient) getWorkflowHandleResponse(resp *http.Response) (WebAppsClientGetWorkflowResponse, error) { + result := WebAppsClientGetWorkflowResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelope); err != nil { + return WebAppsClientGetWorkflowResponse{}, err + } + return result, nil +} + +// BeginInstallSiteExtension - Description for Install site extension on a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - siteExtensionID - Site extension name. +// - options - WebAppsClientBeginInstallSiteExtensionOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtension +// method. +func (client *WebAppsClient) BeginInstallSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientBeginInstallSiteExtensionOptions) (*runtime.Poller[WebAppsClientInstallSiteExtensionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.installSiteExtension(ctx, resourceGroupName, name, siteExtensionID, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientInstallSiteExtensionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientInstallSiteExtensionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// InstallSiteExtension - Description for Install site extension on a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) installSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientBeginInstallSiteExtensionOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginInstallSiteExtension" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.installSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// installSiteExtensionCreateRequest creates the InstallSiteExtension request. +func (client *WebAppsClient) installSiteExtensionCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientBeginInstallSiteExtensionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if siteExtensionID == "" { + return nil, errors.New("parameter siteExtensionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginInstallSiteExtensionSlot - Description for Install site extension on a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - siteExtensionID - Site extension name. +// - slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. +// - options - WebAppsClientBeginInstallSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtensionSlot +// method. +func (client *WebAppsClient) BeginInstallSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientBeginInstallSiteExtensionSlotOptions) (*runtime.Poller[WebAppsClientInstallSiteExtensionSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.installSiteExtensionSlot(ctx, resourceGroupName, name, siteExtensionID, slot, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientInstallSiteExtensionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientInstallSiteExtensionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// InstallSiteExtensionSlot - Description for Install site extension on a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) installSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientBeginInstallSiteExtensionSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginInstallSiteExtensionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.installSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// installSiteExtensionSlotCreateRequest creates the InstallSiteExtensionSlot request. +func (client *WebAppsClient) installSiteExtensionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientBeginInstallSiteExtensionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if siteExtensionID == "" { + return nil, errors.New("parameter siteExtensionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// IsCloneable - Description for Shows whether an app can be cloned to another resource group or subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientIsCloneableOptions contains the optional parameters for the WebAppsClient.IsCloneable method. +func (client *WebAppsClient) IsCloneable(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientIsCloneableOptions) (WebAppsClientIsCloneableResponse, error) { + var err error + const operationName = "WebAppsClient.IsCloneable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.isCloneableCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientIsCloneableResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientIsCloneableResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientIsCloneableResponse{}, err + } + resp, err := client.isCloneableHandleResponse(httpResp) + return resp, err +} + +// isCloneableCreateRequest creates the IsCloneable request. +func (client *WebAppsClient) isCloneableCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientIsCloneableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// isCloneableHandleResponse handles the IsCloneable response. +func (client *WebAppsClient) isCloneableHandleResponse(resp *http.Response) (WebAppsClientIsCloneableResponse, error) { + result := WebAppsClientIsCloneableResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteCloneability); err != nil { + return WebAppsClientIsCloneableResponse{}, err + } + return result, nil +} + +// IsCloneableSlot - Description for Shows whether an app can be cloned to another resource group or subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. By default, this API returns information on the production slot. +// - options - WebAppsClientIsCloneableSlotOptions contains the optional parameters for the WebAppsClient.IsCloneableSlot method. +func (client *WebAppsClient) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientIsCloneableSlotOptions) (WebAppsClientIsCloneableSlotResponse, error) { + var err error + const operationName = "WebAppsClient.IsCloneableSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.isCloneableSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientIsCloneableSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientIsCloneableSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientIsCloneableSlotResponse{}, err + } + resp, err := client.isCloneableSlotHandleResponse(httpResp) + return resp, err +} + +// isCloneableSlotCreateRequest creates the IsCloneableSlot request. +func (client *WebAppsClient) isCloneableSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientIsCloneableSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// isCloneableSlotHandleResponse handles the IsCloneableSlot response. +func (client *WebAppsClient) isCloneableSlotHandleResponse(resp *http.Response) (WebAppsClientIsCloneableSlotResponse, error) { + result := WebAppsClientIsCloneableSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteCloneability); err != nil { + return WebAppsClientIsCloneableSlotResponse{}, err + } + return result, nil +} + +// NewListPager - Description for Get all apps for a subscription. +// +// Generated from API version 2024-04-01 +// - options - WebAppsClientListOptions contains the optional parameters for the WebAppsClient.NewListPager method. +func (client *WebAppsClient) NewListPager(options *WebAppsClientListOptions) *runtime.Pager[WebAppsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListResponse]{ + More: func(page WebAppsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListResponse) (WebAppsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return WebAppsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WebAppsClient) listCreateRequest(ctx context.Context, options *WebAppsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WebAppsClient) listHandleResponse(resp *http.Response) (WebAppsClientListResponse, error) { + result := WebAppsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { + return WebAppsClientListResponse{}, err + } + return result, nil +} + +// ListApplicationSettings - Description for Gets the application settings of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListApplicationSettingsOptions contains the optional parameters for the WebAppsClient.ListApplicationSettings +// method. +func (client *WebAppsClient) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListApplicationSettingsOptions) (WebAppsClientListApplicationSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.ListApplicationSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listApplicationSettingsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListApplicationSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListApplicationSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListApplicationSettingsResponse{}, err + } + resp, err := client.listApplicationSettingsHandleResponse(httpResp) + return resp, err +} + +// listApplicationSettingsCreateRequest creates the ListApplicationSettings request. +func (client *WebAppsClient) listApplicationSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListApplicationSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listApplicationSettingsHandleResponse handles the ListApplicationSettings response. +func (client *WebAppsClient) listApplicationSettingsHandleResponse(resp *http.Response) (WebAppsClientListApplicationSettingsResponse, error) { + result := WebAppsClientListApplicationSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return WebAppsClientListApplicationSettingsResponse{}, err + } + return result, nil +} + +// ListApplicationSettingsSlot - Description for Gets the application settings of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production +// slot. +// - options - WebAppsClientListApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListApplicationSettingsSlot +// method. +func (client *WebAppsClient) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListApplicationSettingsSlotOptions) (WebAppsClientListApplicationSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListApplicationSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listApplicationSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListApplicationSettingsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListApplicationSettingsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListApplicationSettingsSlotResponse{}, err + } + resp, err := client.listApplicationSettingsSlotHandleResponse(httpResp) + return resp, err +} + +// listApplicationSettingsSlotCreateRequest creates the ListApplicationSettingsSlot request. +func (client *WebAppsClient) listApplicationSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListApplicationSettingsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listApplicationSettingsSlotHandleResponse handles the ListApplicationSettingsSlot response. +func (client *WebAppsClient) listApplicationSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientListApplicationSettingsSlotResponse, error) { + result := WebAppsClientListApplicationSettingsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return WebAppsClientListApplicationSettingsSlotResponse{}, err + } + return result, nil +} + +// ListAzureStorageAccounts - Description for Gets the Azure storage account configurations of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccounts +// method. +func (client *WebAppsClient) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListAzureStorageAccountsOptions) (WebAppsClientListAzureStorageAccountsResponse, error) { + var err error + const operationName = "WebAppsClient.ListAzureStorageAccounts" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listAzureStorageAccountsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListAzureStorageAccountsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListAzureStorageAccountsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListAzureStorageAccountsResponse{}, err + } + resp, err := client.listAzureStorageAccountsHandleResponse(httpResp) + return resp, err +} + +// listAzureStorageAccountsCreateRequest creates the ListAzureStorageAccounts request. +func (client *WebAppsClient) listAzureStorageAccountsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListAzureStorageAccountsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAzureStorageAccountsHandleResponse handles the ListAzureStorageAccounts response. +func (client *WebAppsClient) listAzureStorageAccountsHandleResponse(resp *http.Response) (WebAppsClientListAzureStorageAccountsResponse, error) { + result := WebAppsClientListAzureStorageAccountsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureStoragePropertyDictionaryResource); err != nil { + return WebAppsClientListAzureStorageAccountsResponse{}, err + } + return result, nil +} + +// ListAzureStorageAccountsSlot - Description for Gets the Azure storage account configurations of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations +// for the production slot. +// - options - WebAppsClientListAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccountsSlot +// method. +func (client *WebAppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListAzureStorageAccountsSlotOptions) (WebAppsClientListAzureStorageAccountsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListAzureStorageAccountsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listAzureStorageAccountsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListAzureStorageAccountsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListAzureStorageAccountsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListAzureStorageAccountsSlotResponse{}, err + } + resp, err := client.listAzureStorageAccountsSlotHandleResponse(httpResp) + return resp, err +} + +// listAzureStorageAccountsSlotCreateRequest creates the ListAzureStorageAccountsSlot request. +func (client *WebAppsClient) listAzureStorageAccountsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListAzureStorageAccountsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAzureStorageAccountsSlotHandleResponse handles the ListAzureStorageAccountsSlot response. +func (client *WebAppsClient) listAzureStorageAccountsSlotHandleResponse(resp *http.Response) (WebAppsClientListAzureStorageAccountsSlotResponse, error) { + result := WebAppsClientListAzureStorageAccountsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureStoragePropertyDictionaryResource); err != nil { + return WebAppsClientListAzureStorageAccountsSlotResponse{}, err + } + return result, nil +} + +// ListBackupStatusSecrets - Description for Gets status of a web app backup that may be in progress, including secrets associated +// with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the +// backup if a new URL is passed in the request body. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - 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. +// - options - WebAppsClientListBackupStatusSecretsOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecrets +// method. +func (client *WebAppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, options *WebAppsClientListBackupStatusSecretsOptions) (WebAppsClientListBackupStatusSecretsResponse, error) { + var err error + const operationName = "WebAppsClient.ListBackupStatusSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listBackupStatusSecretsCreateRequest(ctx, resourceGroupName, name, backupID, request, options) + if err != nil { + return WebAppsClientListBackupStatusSecretsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListBackupStatusSecretsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListBackupStatusSecretsResponse{}, err + } + resp, err := client.listBackupStatusSecretsHandleResponse(httpResp) + return resp, err +} + +// listBackupStatusSecretsCreateRequest creates the ListBackupStatusSecrets request. +func (client *WebAppsClient) listBackupStatusSecretsCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, options *WebAppsClientListBackupStatusSecretsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if backupID == "" { + return nil, errors.New("parameter backupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// listBackupStatusSecretsHandleResponse handles the ListBackupStatusSecrets response. +func (client *WebAppsClient) listBackupStatusSecretsHandleResponse(resp *http.Response) (WebAppsClientListBackupStatusSecretsResponse, error) { + result := WebAppsClientListBackupStatusSecretsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { + return WebAppsClientListBackupStatusSecretsResponse{}, err + } + return result, nil +} + +// ListBackupStatusSecretsSlot - Description for Gets status of a web app backup that may be in progress, including secrets +// associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the +// backup if a new URL is passed in the request body. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - backupID - ID of backup. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - request - Information on backup request. +// - options - WebAppsClientListBackupStatusSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecretsSlot +// method. +func (client *WebAppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request BackupRequest, options *WebAppsClientListBackupStatusSecretsSlotOptions) (WebAppsClientListBackupStatusSecretsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListBackupStatusSecretsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listBackupStatusSecretsSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, request, options) + if err != nil { + return WebAppsClientListBackupStatusSecretsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListBackupStatusSecretsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListBackupStatusSecretsSlotResponse{}, err + } + resp, err := client.listBackupStatusSecretsSlotHandleResponse(httpResp) + return resp, err +} + +// listBackupStatusSecretsSlotCreateRequest creates the ListBackupStatusSecretsSlot request. +func (client *WebAppsClient) listBackupStatusSecretsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request BackupRequest, options *WebAppsClientListBackupStatusSecretsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if backupID == "" { + return nil, errors.New("parameter backupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// listBackupStatusSecretsSlotHandleResponse handles the ListBackupStatusSecretsSlot response. +func (client *WebAppsClient) listBackupStatusSecretsSlotHandleResponse(resp *http.Response) (WebAppsClientListBackupStatusSecretsSlotResponse, error) { + result := WebAppsClientListBackupStatusSecretsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { + return WebAppsClientListBackupStatusSecretsSlotResponse{}, err + } + return result, nil +} + +// NewListBackupsPager - Description for Gets existing backups of an app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListBackupsOptions contains the optional parameters for the WebAppsClient.NewListBackupsPager method. +func (client *WebAppsClient) NewListBackupsPager(resourceGroupName string, name string, options *WebAppsClientListBackupsOptions) *runtime.Pager[WebAppsClientListBackupsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListBackupsResponse]{ + More: func(page WebAppsClientListBackupsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListBackupsResponse) (WebAppsClientListBackupsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListBackupsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBackupsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListBackupsResponse{}, err + } + return client.listBackupsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBackupsCreateRequest creates the ListBackups request. +func (client *WebAppsClient) listBackupsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListBackupsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBackupsHandleResponse handles the ListBackups response. +func (client *WebAppsClient) listBackupsHandleResponse(resp *http.Response) (WebAppsClientListBackupsResponse, error) { + result := WebAppsClientListBackupsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupItemCollection); err != nil { + return WebAppsClientListBackupsResponse{}, err + } + return result, nil +} + +// NewListBackupsSlotPager - Description for Gets existing backups of an app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. +// - options - WebAppsClientListBackupsSlotOptions contains the optional parameters for the WebAppsClient.NewListBackupsSlotPager +// method. +func (client *WebAppsClient) NewListBackupsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListBackupsSlotOptions) *runtime.Pager[WebAppsClientListBackupsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListBackupsSlotResponse]{ + More: func(page WebAppsClientListBackupsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListBackupsSlotResponse) (WebAppsClientListBackupsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListBackupsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBackupsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListBackupsSlotResponse{}, err + } + return client.listBackupsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBackupsSlotCreateRequest creates the ListBackupsSlot request. +func (client *WebAppsClient) listBackupsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListBackupsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBackupsSlotHandleResponse handles the ListBackupsSlot response. +func (client *WebAppsClient) listBackupsSlotHandleResponse(resp *http.Response) (WebAppsClientListBackupsSlotResponse, error) { + result := WebAppsClientListBackupsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupItemCollection); err != nil { + return WebAppsClientListBackupsSlotResponse{}, err + } + return result, nil +} + +// NewListBasicPublishingCredentialsPoliciesPager - Description for Returns whether Scm basic auth is allowed and whether +// Ftp is allowed for a given site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListBasicPublishingCredentialsPoliciesOptions contains the optional parameters for the WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager +// method. +func (client *WebAppsClient) NewListBasicPublishingCredentialsPoliciesPager(resourceGroupName string, name string, options *WebAppsClientListBasicPublishingCredentialsPoliciesOptions) *runtime.Pager[WebAppsClientListBasicPublishingCredentialsPoliciesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListBasicPublishingCredentialsPoliciesResponse]{ + More: func(page WebAppsClientListBasicPublishingCredentialsPoliciesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListBasicPublishingCredentialsPoliciesResponse) (WebAppsClientListBasicPublishingCredentialsPoliciesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBasicPublishingCredentialsPoliciesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListBasicPublishingCredentialsPoliciesResponse{}, err + } + return client.listBasicPublishingCredentialsPoliciesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBasicPublishingCredentialsPoliciesCreateRequest creates the ListBasicPublishingCredentialsPolicies request. +func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListBasicPublishingCredentialsPoliciesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBasicPublishingCredentialsPoliciesHandleResponse handles the ListBasicPublishingCredentialsPolicies response. +func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesHandleResponse(resp *http.Response) (WebAppsClientListBasicPublishingCredentialsPoliciesResponse, error) { + result := WebAppsClientListBasicPublishingCredentialsPoliciesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublishingCredentialsPoliciesCollection); err != nil { + return WebAppsClientListBasicPublishingCredentialsPoliciesResponse{}, err + } + return result, nil +} + +// NewListBasicPublishingCredentialsPoliciesSlotPager - Description for Returns whether Scm basic auth is allowed and whether +// Ftp is allowed for a given site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions contains the optional parameters for the WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager +// method. +func (client *WebAppsClient) NewListBasicPublishingCredentialsPoliciesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions) *runtime.Pager[WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse]{ + More: func(page WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse) (WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBasicPublishingCredentialsPoliciesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{}, err + } + return client.listBasicPublishingCredentialsPoliciesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBasicPublishingCredentialsPoliciesSlotCreateRequest creates the ListBasicPublishingCredentialsPoliciesSlot request. +func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBasicPublishingCredentialsPoliciesSlotHandleResponse handles the ListBasicPublishingCredentialsPoliciesSlot response. +func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesSlotHandleResponse(resp *http.Response) (WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse, error) { + result := WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublishingCredentialsPoliciesCollection); err != nil { + return WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Description for Gets all web, mobile, and API apps in the specified resource group. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - options - WebAppsClientListByResourceGroupOptions contains the optional parameters for the WebAppsClient.NewListByResourceGroupPager +// method. +func (client *WebAppsClient) NewListByResourceGroupPager(resourceGroupName string, options *WebAppsClientListByResourceGroupOptions) *runtime.Pager[WebAppsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListByResourceGroupResponse]{ + More: func(page WebAppsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListByResourceGroupResponse) (WebAppsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return WebAppsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *WebAppsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *WebAppsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.IncludeSlots != nil { + reqQP.Set("includeSlots", strconv.FormatBool(*options.IncludeSlots)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *WebAppsClient) listByResourceGroupHandleResponse(resp *http.Response) (WebAppsClientListByResourceGroupResponse, error) { + result := WebAppsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { + return WebAppsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListConfigurationSnapshotInfoPager - Description for Gets a list of web app configuration snapshots identifiers. Each +// element of the list contains a timestamp and the ID of the snapshot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListConfigurationSnapshotInfoOptions contains the optional parameters for the WebAppsClient.NewListConfigurationSnapshotInfoPager +// method. +func (client *WebAppsClient) NewListConfigurationSnapshotInfoPager(resourceGroupName string, name string, options *WebAppsClientListConfigurationSnapshotInfoOptions) *runtime.Pager[WebAppsClientListConfigurationSnapshotInfoResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListConfigurationSnapshotInfoResponse]{ + More: func(page WebAppsClientListConfigurationSnapshotInfoResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationSnapshotInfoResponse) (WebAppsClientListConfigurationSnapshotInfoResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListConfigurationSnapshotInfoPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listConfigurationSnapshotInfoCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListConfigurationSnapshotInfoResponse{}, err + } + return client.listConfigurationSnapshotInfoHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listConfigurationSnapshotInfoCreateRequest creates the ListConfigurationSnapshotInfo request. +func (client *WebAppsClient) listConfigurationSnapshotInfoCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListConfigurationSnapshotInfoOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listConfigurationSnapshotInfoHandleResponse handles the ListConfigurationSnapshotInfo response. +func (client *WebAppsClient) listConfigurationSnapshotInfoHandleResponse(resp *http.Response) (WebAppsClientListConfigurationSnapshotInfoResponse, error) { + result := WebAppsClientListConfigurationSnapshotInfoResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigurationSnapshotInfoCollection); err != nil { + return WebAppsClientListConfigurationSnapshotInfoResponse{}, err + } + return result, nil +} + +// NewListConfigurationSnapshotInfoSlotPager - Description for Gets a list of web app configuration snapshots identifiers. +// Each element of the list contains a timestamp and the ID of the snapshot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. +// - options - WebAppsClientListConfigurationSnapshotInfoSlotOptions contains the optional parameters for the WebAppsClient.NewListConfigurationSnapshotInfoSlotPager +// method. +func (client *WebAppsClient) NewListConfigurationSnapshotInfoSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListConfigurationSnapshotInfoSlotOptions) *runtime.Pager[WebAppsClientListConfigurationSnapshotInfoSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListConfigurationSnapshotInfoSlotResponse]{ + More: func(page WebAppsClientListConfigurationSnapshotInfoSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationSnapshotInfoSlotResponse) (WebAppsClientListConfigurationSnapshotInfoSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListConfigurationSnapshotInfoSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listConfigurationSnapshotInfoSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListConfigurationSnapshotInfoSlotResponse{}, err + } + return client.listConfigurationSnapshotInfoSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listConfigurationSnapshotInfoSlotCreateRequest creates the ListConfigurationSnapshotInfoSlot request. +func (client *WebAppsClient) listConfigurationSnapshotInfoSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListConfigurationSnapshotInfoSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listConfigurationSnapshotInfoSlotHandleResponse handles the ListConfigurationSnapshotInfoSlot response. +func (client *WebAppsClient) listConfigurationSnapshotInfoSlotHandleResponse(resp *http.Response) (WebAppsClientListConfigurationSnapshotInfoSlotResponse, error) { + result := WebAppsClientListConfigurationSnapshotInfoSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigurationSnapshotInfoCollection); err != nil { + return WebAppsClientListConfigurationSnapshotInfoSlotResponse{}, err + } + return result, nil +} + +// NewListConfigurationsPager - Description for List the configurations of an app +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListConfigurationsOptions contains the optional parameters for the WebAppsClient.NewListConfigurationsPager +// method. +func (client *WebAppsClient) NewListConfigurationsPager(resourceGroupName string, name string, options *WebAppsClientListConfigurationsOptions) *runtime.Pager[WebAppsClientListConfigurationsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListConfigurationsResponse]{ + More: func(page WebAppsClientListConfigurationsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationsResponse) (WebAppsClientListConfigurationsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListConfigurationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listConfigurationsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListConfigurationsResponse{}, err + } + return client.listConfigurationsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listConfigurationsCreateRequest creates the ListConfigurations request. +func (client *WebAppsClient) listConfigurationsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListConfigurationsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listConfigurationsHandleResponse handles the ListConfigurations response. +func (client *WebAppsClient) listConfigurationsHandleResponse(resp *http.Response) (WebAppsClientListConfigurationsResponse, error) { + result := WebAppsClientListConfigurationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResourceCollection); err != nil { + return WebAppsClientListConfigurationsResponse{}, err + } + return result, nil +} + +// NewListConfigurationsSlotPager - Description for List the configurations of an app +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. +// - options - WebAppsClientListConfigurationsSlotOptions contains the optional parameters for the WebAppsClient.NewListConfigurationsSlotPager +// method. +func (client *WebAppsClient) NewListConfigurationsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListConfigurationsSlotOptions) *runtime.Pager[WebAppsClientListConfigurationsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListConfigurationsSlotResponse]{ + More: func(page WebAppsClientListConfigurationsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationsSlotResponse) (WebAppsClientListConfigurationsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListConfigurationsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listConfigurationsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListConfigurationsSlotResponse{}, err + } + return client.listConfigurationsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listConfigurationsSlotCreateRequest creates the ListConfigurationsSlot request. +func (client *WebAppsClient) listConfigurationsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListConfigurationsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listConfigurationsSlotHandleResponse handles the ListConfigurationsSlot response. +func (client *WebAppsClient) listConfigurationsSlotHandleResponse(resp *http.Response) (WebAppsClientListConfigurationsSlotResponse, error) { + result := WebAppsClientListConfigurationsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResourceCollection); err != nil { + return WebAppsClientListConfigurationsSlotResponse{}, err + } + return result, nil +} + +// ListConnectionStrings - Description for Gets the connection strings of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListConnectionStringsOptions contains the optional parameters for the WebAppsClient.ListConnectionStrings +// method. +func (client *WebAppsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListConnectionStringsOptions) (WebAppsClientListConnectionStringsResponse, error) { + var err error + const operationName = "WebAppsClient.ListConnectionStrings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listConnectionStringsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListConnectionStringsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListConnectionStringsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListConnectionStringsResponse{}, err + } + resp, err := client.listConnectionStringsHandleResponse(httpResp) + return resp, err +} + +// listConnectionStringsCreateRequest creates the ListConnectionStrings request. +func (client *WebAppsClient) listConnectionStringsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListConnectionStringsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listConnectionStringsHandleResponse handles the ListConnectionStrings response. +func (client *WebAppsClient) listConnectionStringsHandleResponse(resp *http.Response) (WebAppsClientListConnectionStringsResponse, error) { + result := WebAppsClientListConnectionStringsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionStringDictionary); err != nil { + return WebAppsClientListConnectionStringsResponse{}, err + } + return result, nil +} + +// ListConnectionStringsSlot - Description for Gets the connection strings of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production +// slot. +// - options - WebAppsClientListConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.ListConnectionStringsSlot +// method. +func (client *WebAppsClient) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListConnectionStringsSlotOptions) (WebAppsClientListConnectionStringsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListConnectionStringsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listConnectionStringsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListConnectionStringsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListConnectionStringsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListConnectionStringsSlotResponse{}, err + } + resp, err := client.listConnectionStringsSlotHandleResponse(httpResp) + return resp, err +} + +// listConnectionStringsSlotCreateRequest creates the ListConnectionStringsSlot request. +func (client *WebAppsClient) listConnectionStringsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListConnectionStringsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listConnectionStringsSlotHandleResponse handles the ListConnectionStringsSlot response. +func (client *WebAppsClient) listConnectionStringsSlotHandleResponse(resp *http.Response) (WebAppsClientListConnectionStringsSlotResponse, error) { + result := WebAppsClientListConnectionStringsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionStringDictionary); err != nil { + return WebAppsClientListConnectionStringsSlotResponse{}, err + } + return result, nil +} + +// NewListContinuousWebJobsPager - Description for List continuous web jobs for an app, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - options - WebAppsClientListContinuousWebJobsOptions contains the optional parameters for the WebAppsClient.NewListContinuousWebJobsPager +// method. +func (client *WebAppsClient) NewListContinuousWebJobsPager(resourceGroupName string, name string, options *WebAppsClientListContinuousWebJobsOptions) *runtime.Pager[WebAppsClientListContinuousWebJobsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListContinuousWebJobsResponse]{ + More: func(page WebAppsClientListContinuousWebJobsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListContinuousWebJobsResponse) (WebAppsClientListContinuousWebJobsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListContinuousWebJobsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listContinuousWebJobsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListContinuousWebJobsResponse{}, err + } + return client.listContinuousWebJobsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listContinuousWebJobsCreateRequest creates the ListContinuousWebJobs request. +func (client *WebAppsClient) listContinuousWebJobsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListContinuousWebJobsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listContinuousWebJobsHandleResponse handles the ListContinuousWebJobs response. +func (client *WebAppsClient) listContinuousWebJobsHandleResponse(resp *http.Response) (WebAppsClientListContinuousWebJobsResponse, error) { + result := WebAppsClientListContinuousWebJobsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ContinuousWebJobCollection); err != nil { + return WebAppsClientListContinuousWebJobsResponse{}, err + } + return result, nil +} + +// NewListContinuousWebJobsSlotPager - Description for List continuous web jobs for an app, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +// - options - WebAppsClientListContinuousWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListContinuousWebJobsSlotPager +// method. +func (client *WebAppsClient) NewListContinuousWebJobsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListContinuousWebJobsSlotOptions) *runtime.Pager[WebAppsClientListContinuousWebJobsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListContinuousWebJobsSlotResponse]{ + More: func(page WebAppsClientListContinuousWebJobsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListContinuousWebJobsSlotResponse) (WebAppsClientListContinuousWebJobsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListContinuousWebJobsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listContinuousWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListContinuousWebJobsSlotResponse{}, err + } + return client.listContinuousWebJobsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listContinuousWebJobsSlotCreateRequest creates the ListContinuousWebJobsSlot request. +func (client *WebAppsClient) listContinuousWebJobsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListContinuousWebJobsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listContinuousWebJobsSlotHandleResponse handles the ListContinuousWebJobsSlot response. +func (client *WebAppsClient) listContinuousWebJobsSlotHandleResponse(resp *http.Response) (WebAppsClientListContinuousWebJobsSlotResponse, error) { + result := WebAppsClientListContinuousWebJobsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ContinuousWebJobCollection); err != nil { + return WebAppsClientListContinuousWebJobsSlotResponse{}, err + } + return result, nil +} + +// ListDeploymentLog - Description for List deployment log for specific deployment for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - id - The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". +// - options - WebAppsClientListDeploymentLogOptions contains the optional parameters for the WebAppsClient.ListDeploymentLog +// method. +func (client *WebAppsClient) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientListDeploymentLogOptions) (WebAppsClientListDeploymentLogResponse, error) { + var err error + const operationName = "WebAppsClient.ListDeploymentLog" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listDeploymentLogCreateRequest(ctx, resourceGroupName, name, id, options) + if err != nil { + return WebAppsClientListDeploymentLogResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListDeploymentLogResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListDeploymentLogResponse{}, err + } + resp, err := client.listDeploymentLogHandleResponse(httpResp) + return resp, err +} + +// listDeploymentLogCreateRequest creates the ListDeploymentLog request. +func (client *WebAppsClient) listDeploymentLogCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientListDeploymentLogOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listDeploymentLogHandleResponse handles the ListDeploymentLog response. +func (client *WebAppsClient) listDeploymentLogHandleResponse(resp *http.Response) (WebAppsClientListDeploymentLogResponse, error) { + result := WebAppsClientListDeploymentLogResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { + return WebAppsClientListDeploymentLogResponse{}, err + } + return result, nil +} + +// ListDeploymentLogSlot - Description for List deployment log for specific deployment for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - id - The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientListDeploymentLogSlotOptions contains the optional parameters for the WebAppsClient.ListDeploymentLogSlot +// method. +func (client *WebAppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientListDeploymentLogSlotOptions) (WebAppsClientListDeploymentLogSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListDeploymentLogSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listDeploymentLogSlotCreateRequest(ctx, resourceGroupName, name, id, slot, options) + if err != nil { + return WebAppsClientListDeploymentLogSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListDeploymentLogSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListDeploymentLogSlotResponse{}, err + } + resp, err := client.listDeploymentLogSlotHandleResponse(httpResp) + return resp, err +} + +// listDeploymentLogSlotCreateRequest creates the ListDeploymentLogSlot request. +func (client *WebAppsClient) listDeploymentLogSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientListDeploymentLogSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listDeploymentLogSlotHandleResponse handles the ListDeploymentLogSlot response. +func (client *WebAppsClient) listDeploymentLogSlotHandleResponse(resp *http.Response) (WebAppsClientListDeploymentLogSlotResponse, error) { + result := WebAppsClientListDeploymentLogSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { + return WebAppsClientListDeploymentLogSlotResponse{}, err + } + return result, nil +} + +// NewListDeploymentsPager - Description for List deployments for an app, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListDeploymentsOptions contains the optional parameters for the WebAppsClient.NewListDeploymentsPager +// method. +func (client *WebAppsClient) NewListDeploymentsPager(resourceGroupName string, name string, options *WebAppsClientListDeploymentsOptions) *runtime.Pager[WebAppsClientListDeploymentsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListDeploymentsResponse]{ + More: func(page WebAppsClientListDeploymentsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListDeploymentsResponse) (WebAppsClientListDeploymentsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListDeploymentsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDeploymentsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListDeploymentsResponse{}, err + } + return client.listDeploymentsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listDeploymentsCreateRequest creates the ListDeployments request. +func (client *WebAppsClient) listDeploymentsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListDeploymentsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listDeploymentsHandleResponse handles the ListDeployments response. +func (client *WebAppsClient) listDeploymentsHandleResponse(resp *http.Response) (WebAppsClientListDeploymentsResponse, error) { + result := WebAppsClientListDeploymentsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentCollection); err != nil { + return WebAppsClientListDeploymentsResponse{}, err + } + return result, nil +} + +// NewListDeploymentsSlotPager - Description for List deployments for an app, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientListDeploymentsSlotOptions contains the optional parameters for the WebAppsClient.NewListDeploymentsSlotPager +// method. +func (client *WebAppsClient) NewListDeploymentsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListDeploymentsSlotOptions) *runtime.Pager[WebAppsClientListDeploymentsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListDeploymentsSlotResponse]{ + More: func(page WebAppsClientListDeploymentsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListDeploymentsSlotResponse) (WebAppsClientListDeploymentsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListDeploymentsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDeploymentsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListDeploymentsSlotResponse{}, err + } + return client.listDeploymentsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listDeploymentsSlotCreateRequest creates the ListDeploymentsSlot request. +func (client *WebAppsClient) listDeploymentsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListDeploymentsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listDeploymentsSlotHandleResponse handles the ListDeploymentsSlot response. +func (client *WebAppsClient) listDeploymentsSlotHandleResponse(resp *http.Response) (WebAppsClientListDeploymentsSlotResponse, error) { + result := WebAppsClientListDeploymentsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentCollection); err != nil { + return WebAppsClientListDeploymentsSlotResponse{}, err + } + return result, nil +} + +// NewListDomainOwnershipIdentifiersPager - Description for Lists ownership identifiers for domain associated with web app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListDomainOwnershipIdentifiersOptions contains the optional parameters for the WebAppsClient.NewListDomainOwnershipIdentifiersPager +// method. +func (client *WebAppsClient) NewListDomainOwnershipIdentifiersPager(resourceGroupName string, name string, options *WebAppsClientListDomainOwnershipIdentifiersOptions) *runtime.Pager[WebAppsClientListDomainOwnershipIdentifiersResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListDomainOwnershipIdentifiersResponse]{ + More: func(page WebAppsClientListDomainOwnershipIdentifiersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListDomainOwnershipIdentifiersResponse) (WebAppsClientListDomainOwnershipIdentifiersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListDomainOwnershipIdentifiersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDomainOwnershipIdentifiersCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListDomainOwnershipIdentifiersResponse{}, err + } + return client.listDomainOwnershipIdentifiersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listDomainOwnershipIdentifiersCreateRequest creates the ListDomainOwnershipIdentifiers request. +func (client *WebAppsClient) listDomainOwnershipIdentifiersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListDomainOwnershipIdentifiersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listDomainOwnershipIdentifiersHandleResponse handles the ListDomainOwnershipIdentifiers response. +func (client *WebAppsClient) listDomainOwnershipIdentifiersHandleResponse(resp *http.Response) (WebAppsClientListDomainOwnershipIdentifiersResponse, error) { + result := WebAppsClientListDomainOwnershipIdentifiersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IdentifierCollection); err != nil { + return WebAppsClientListDomainOwnershipIdentifiersResponse{}, err + } + return result, nil +} + +// NewListDomainOwnershipIdentifiersSlotPager - Description for Lists ownership identifiers for domain associated with web +// app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. +// - options - WebAppsClientListDomainOwnershipIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager +// method. +func (client *WebAppsClient) NewListDomainOwnershipIdentifiersSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListDomainOwnershipIdentifiersSlotOptions) *runtime.Pager[WebAppsClientListDomainOwnershipIdentifiersSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListDomainOwnershipIdentifiersSlotResponse]{ + More: func(page WebAppsClientListDomainOwnershipIdentifiersSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListDomainOwnershipIdentifiersSlotResponse) (WebAppsClientListDomainOwnershipIdentifiersSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDomainOwnershipIdentifiersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListDomainOwnershipIdentifiersSlotResponse{}, err + } + return client.listDomainOwnershipIdentifiersSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listDomainOwnershipIdentifiersSlotCreateRequest creates the ListDomainOwnershipIdentifiersSlot request. +func (client *WebAppsClient) listDomainOwnershipIdentifiersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListDomainOwnershipIdentifiersSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listDomainOwnershipIdentifiersSlotHandleResponse handles the ListDomainOwnershipIdentifiersSlot response. +func (client *WebAppsClient) listDomainOwnershipIdentifiersSlotHandleResponse(resp *http.Response) (WebAppsClientListDomainOwnershipIdentifiersSlotResponse, error) { + result := WebAppsClientListDomainOwnershipIdentifiersSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IdentifierCollection); err != nil { + return WebAppsClientListDomainOwnershipIdentifiersSlotResponse{}, err + } + return result, nil +} + +// ListFunctionKeys - Description for Get function keys for a function in a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - Function name. +// - options - WebAppsClientListFunctionKeysOptions contains the optional parameters for the WebAppsClient.ListFunctionKeys +// method. +func (client *WebAppsClient) ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientListFunctionKeysOptions) (WebAppsClientListFunctionKeysResponse, error) { + var err error + const operationName = "WebAppsClient.ListFunctionKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listFunctionKeysCreateRequest(ctx, resourceGroupName, name, functionName, options) + if err != nil { + return WebAppsClientListFunctionKeysResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListFunctionKeysResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListFunctionKeysResponse{}, err + } + resp, err := client.listFunctionKeysHandleResponse(httpResp) + return resp, err +} + +// listFunctionKeysCreateRequest creates the ListFunctionKeys request. +func (client *WebAppsClient) listFunctionKeysCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientListFunctionKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listFunctionKeysHandleResponse handles the ListFunctionKeys response. +func (client *WebAppsClient) listFunctionKeysHandleResponse(resp *http.Response) (WebAppsClientListFunctionKeysResponse, error) { + result := WebAppsClientListFunctionKeysResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return WebAppsClientListFunctionKeysResponse{}, err + } + return result, nil +} + +// ListFunctionKeysSlot - Description for Get function keys for a function in a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - Function name. +// - slot - Name of the deployment slot. +// - options - WebAppsClientListFunctionKeysSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionKeysSlot +// method. +func (client *WebAppsClient) ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientListFunctionKeysSlotOptions) (WebAppsClientListFunctionKeysSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListFunctionKeysSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listFunctionKeysSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) + if err != nil { + return WebAppsClientListFunctionKeysSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListFunctionKeysSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListFunctionKeysSlotResponse{}, err + } + resp, err := client.listFunctionKeysSlotHandleResponse(httpResp) + return resp, err +} + +// listFunctionKeysSlotCreateRequest creates the ListFunctionKeysSlot request. +func (client *WebAppsClient) listFunctionKeysSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientListFunctionKeysSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listFunctionKeysSlotHandleResponse handles the ListFunctionKeysSlot response. +func (client *WebAppsClient) listFunctionKeysSlotHandleResponse(resp *http.Response) (WebAppsClientListFunctionKeysSlotResponse, error) { + result := WebAppsClientListFunctionKeysSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return WebAppsClientListFunctionKeysSlotResponse{}, err + } + return result, nil +} + +// ListFunctionSecrets - Description for Get function secrets for a function in a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - Function name. +// - options - WebAppsClientListFunctionSecretsOptions contains the optional parameters for the WebAppsClient.ListFunctionSecrets +// method. +func (client *WebAppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientListFunctionSecretsOptions) (WebAppsClientListFunctionSecretsResponse, error) { + var err error + const operationName = "WebAppsClient.ListFunctionSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listFunctionSecretsCreateRequest(ctx, resourceGroupName, name, functionName, options) + if err != nil { + return WebAppsClientListFunctionSecretsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListFunctionSecretsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListFunctionSecretsResponse{}, err + } + resp, err := client.listFunctionSecretsHandleResponse(httpResp) + return resp, err +} + +// listFunctionSecretsCreateRequest creates the ListFunctionSecrets request. +func (client *WebAppsClient) listFunctionSecretsCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientListFunctionSecretsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listFunctionSecretsHandleResponse handles the ListFunctionSecrets response. +func (client *WebAppsClient) listFunctionSecretsHandleResponse(resp *http.Response) (WebAppsClientListFunctionSecretsResponse, error) { + result := WebAppsClientListFunctionSecretsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FunctionSecrets); err != nil { + return WebAppsClientListFunctionSecretsResponse{}, err + } + return result, nil +} + +// ListFunctionSecretsSlot - Description for Get function secrets for a function in a web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - functionName - Function name. +// - slot - Name of the deployment slot. +// - options - WebAppsClientListFunctionSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionSecretsSlot +// method. +func (client *WebAppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientListFunctionSecretsSlotOptions) (WebAppsClientListFunctionSecretsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListFunctionSecretsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listFunctionSecretsSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) + if err != nil { + return WebAppsClientListFunctionSecretsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListFunctionSecretsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListFunctionSecretsSlotResponse{}, err + } + resp, err := client.listFunctionSecretsSlotHandleResponse(httpResp) + return resp, err +} + +// listFunctionSecretsSlotCreateRequest creates the ListFunctionSecretsSlot request. +func (client *WebAppsClient) listFunctionSecretsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientListFunctionSecretsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if functionName == "" { + return nil, errors.New("parameter functionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listFunctionSecretsSlotHandleResponse handles the ListFunctionSecretsSlot response. +func (client *WebAppsClient) listFunctionSecretsSlotHandleResponse(resp *http.Response) (WebAppsClientListFunctionSecretsSlotResponse, error) { + result := WebAppsClientListFunctionSecretsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FunctionSecrets); err != nil { + return WebAppsClientListFunctionSecretsSlotResponse{}, err + } + return result, nil +} + +// NewListFunctionsPager - Description for List the functions for a web site, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - options - WebAppsClientListFunctionsOptions contains the optional parameters for the WebAppsClient.NewListFunctionsPager +// method. +func (client *WebAppsClient) NewListFunctionsPager(resourceGroupName string, name string, options *WebAppsClientListFunctionsOptions) *runtime.Pager[WebAppsClientListFunctionsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListFunctionsResponse]{ + More: func(page WebAppsClientListFunctionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListFunctionsResponse) (WebAppsClientListFunctionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListFunctionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listFunctionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListFunctionsResponse{}, err + } + return client.listFunctionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listFunctionsCreateRequest creates the ListFunctions request. +func (client *WebAppsClient) listFunctionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListFunctionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listFunctionsHandleResponse handles the ListFunctions response. +func (client *WebAppsClient) listFunctionsHandleResponse(resp *http.Response) (WebAppsClientListFunctionsResponse, error) { + result := WebAppsClientListFunctionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FunctionEnvelopeCollection); err != nil { + return WebAppsClientListFunctionsResponse{}, err + } + return result, nil +} + +// ListHostKeys - Description for Get host secrets for a function app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - options - WebAppsClientListHostKeysOptions contains the optional parameters for the WebAppsClient.ListHostKeys method. +func (client *WebAppsClient) ListHostKeys(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHostKeysOptions) (WebAppsClientListHostKeysResponse, error) { + var err error + const operationName = "WebAppsClient.ListHostKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listHostKeysCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListHostKeysResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListHostKeysResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListHostKeysResponse{}, err + } + resp, err := client.listHostKeysHandleResponse(httpResp) + return resp, err +} + +// listHostKeysCreateRequest creates the ListHostKeys request. +func (client *WebAppsClient) listHostKeysCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHostKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHostKeysHandleResponse handles the ListHostKeys response. +func (client *WebAppsClient) listHostKeysHandleResponse(resp *http.Response) (WebAppsClientListHostKeysResponse, error) { + result := WebAppsClientListHostKeysResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostKeys); err != nil { + return WebAppsClientListHostKeysResponse{}, err + } + return result, nil +} + +// ListHostKeysSlot - Description for Get host secrets for a function app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. +// - options - WebAppsClientListHostKeysSlotOptions contains the optional parameters for the WebAppsClient.ListHostKeysSlot +// method. +func (client *WebAppsClient) ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHostKeysSlotOptions) (WebAppsClientListHostKeysSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListHostKeysSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listHostKeysSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListHostKeysSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListHostKeysSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListHostKeysSlotResponse{}, err + } + resp, err := client.listHostKeysSlotHandleResponse(httpResp) + return resp, err +} + +// listHostKeysSlotCreateRequest creates the ListHostKeysSlot request. +func (client *WebAppsClient) listHostKeysSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHostKeysSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHostKeysSlotHandleResponse handles the ListHostKeysSlot response. +func (client *WebAppsClient) listHostKeysSlotHandleResponse(resp *http.Response) (WebAppsClientListHostKeysSlotResponse, error) { + result := WebAppsClientListHostKeysSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostKeys); err != nil { + return WebAppsClientListHostKeysSlotResponse{}, err + } + return result, nil +} + +// NewListHostNameBindingsPager - Description for Get hostname bindings for an app or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListHostNameBindingsOptions contains the optional parameters for the WebAppsClient.NewListHostNameBindingsPager +// method. +func (client *WebAppsClient) NewListHostNameBindingsPager(resourceGroupName string, name string, options *WebAppsClientListHostNameBindingsOptions) *runtime.Pager[WebAppsClientListHostNameBindingsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListHostNameBindingsResponse]{ + More: func(page WebAppsClientListHostNameBindingsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListHostNameBindingsResponse) (WebAppsClientListHostNameBindingsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListHostNameBindingsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHostNameBindingsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListHostNameBindingsResponse{}, err + } + return client.listHostNameBindingsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listHostNameBindingsCreateRequest creates the ListHostNameBindings request. +func (client *WebAppsClient) listHostNameBindingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHostNameBindingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHostNameBindingsHandleResponse handles the ListHostNameBindings response. +func (client *WebAppsClient) listHostNameBindingsHandleResponse(resp *http.Response) (WebAppsClientListHostNameBindingsResponse, error) { + result := WebAppsClientListHostNameBindingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBindingCollection); err != nil { + return WebAppsClientListHostNameBindingsResponse{}, err + } + return result, nil +} + +// NewListHostNameBindingsSlotPager - Description for Get hostname bindings for an app or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. +// - options - WebAppsClientListHostNameBindingsSlotOptions contains the optional parameters for the WebAppsClient.NewListHostNameBindingsSlotPager +// method. +func (client *WebAppsClient) NewListHostNameBindingsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListHostNameBindingsSlotOptions) *runtime.Pager[WebAppsClientListHostNameBindingsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListHostNameBindingsSlotResponse]{ + More: func(page WebAppsClientListHostNameBindingsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListHostNameBindingsSlotResponse) (WebAppsClientListHostNameBindingsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListHostNameBindingsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHostNameBindingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListHostNameBindingsSlotResponse{}, err + } + return client.listHostNameBindingsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listHostNameBindingsSlotCreateRequest creates the ListHostNameBindingsSlot request. +func (client *WebAppsClient) listHostNameBindingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHostNameBindingsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHostNameBindingsSlotHandleResponse handles the ListHostNameBindingsSlot response. +func (client *WebAppsClient) listHostNameBindingsSlotHandleResponse(resp *http.Response) (WebAppsClientListHostNameBindingsSlotResponse, error) { + result := WebAppsClientListHostNameBindingsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBindingCollection); err != nil { + return WebAppsClientListHostNameBindingsSlotResponse{}, err + } + return result, nil +} + +// ListHybridConnections - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - options - WebAppsClientListHybridConnectionsOptions contains the optional parameters for the WebAppsClient.ListHybridConnections +// method. +func (client *WebAppsClient) ListHybridConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHybridConnectionsOptions) (WebAppsClientListHybridConnectionsResponse, error) { + var err error + const operationName = "WebAppsClient.ListHybridConnections" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listHybridConnectionsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListHybridConnectionsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListHybridConnectionsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListHybridConnectionsResponse{}, err + } + resp, err := client.listHybridConnectionsHandleResponse(httpResp) + return resp, err +} + +// listHybridConnectionsCreateRequest creates the ListHybridConnections request. +func (client *WebAppsClient) listHybridConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHybridConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHybridConnectionsHandleResponse handles the ListHybridConnections response. +func (client *WebAppsClient) listHybridConnectionsHandleResponse(resp *http.Response) (WebAppsClientListHybridConnectionsResponse, error) { + result := WebAppsClientListHybridConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { + return WebAppsClientListHybridConnectionsResponse{}, err + } + return result, nil +} + +// ListHybridConnectionsSlot - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - slot - The name of the slot for the web app. +// - options - WebAppsClientListHybridConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListHybridConnectionsSlot +// method. +func (client *WebAppsClient) ListHybridConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHybridConnectionsSlotOptions) (WebAppsClientListHybridConnectionsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListHybridConnectionsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listHybridConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListHybridConnectionsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListHybridConnectionsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListHybridConnectionsSlotResponse{}, err + } + resp, err := client.listHybridConnectionsSlotHandleResponse(httpResp) + return resp, err +} + +// listHybridConnectionsSlotCreateRequest creates the ListHybridConnectionsSlot request. +func (client *WebAppsClient) listHybridConnectionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHybridConnectionsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHybridConnectionsSlotHandleResponse handles the ListHybridConnectionsSlot response. +func (client *WebAppsClient) listHybridConnectionsSlotHandleResponse(resp *http.Response) (WebAppsClientListHybridConnectionsSlotResponse, error) { + result := WebAppsClientListHybridConnectionsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { + return WebAppsClientListHybridConnectionsSlotResponse{}, err + } + return result, nil +} + +// NewListInstanceFunctionsSlotPager - Description for List the functions for a web site, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. +// - options - WebAppsClientListInstanceFunctionsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceFunctionsSlotPager +// method. +func (client *WebAppsClient) NewListInstanceFunctionsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceFunctionsSlotOptions) *runtime.Pager[WebAppsClientListInstanceFunctionsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceFunctionsSlotResponse]{ + More: func(page WebAppsClientListInstanceFunctionsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceFunctionsSlotResponse) (WebAppsClientListInstanceFunctionsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceFunctionsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceFunctionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListInstanceFunctionsSlotResponse{}, err + } + return client.listInstanceFunctionsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInstanceFunctionsSlotCreateRequest creates the ListInstanceFunctionsSlot request. +func (client *WebAppsClient) listInstanceFunctionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceFunctionsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceFunctionsSlotHandleResponse handles the ListInstanceFunctionsSlot response. +func (client *WebAppsClient) listInstanceFunctionsSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceFunctionsSlotResponse, error) { + result := WebAppsClientListInstanceFunctionsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FunctionEnvelopeCollection); err != nil { + return WebAppsClientListInstanceFunctionsSlotResponse{}, err + } + return result, nil +} + +// NewListInstanceIdentifiersPager - Description for Gets all scale-out instances of an app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListInstanceIdentifiersOptions contains the optional parameters for the WebAppsClient.NewListInstanceIdentifiersPager +// method. +func (client *WebAppsClient) NewListInstanceIdentifiersPager(resourceGroupName string, name string, options *WebAppsClientListInstanceIdentifiersOptions) *runtime.Pager[WebAppsClientListInstanceIdentifiersResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceIdentifiersResponse]{ + More: func(page WebAppsClientListInstanceIdentifiersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceIdentifiersResponse) (WebAppsClientListInstanceIdentifiersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceIdentifiersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceIdentifiersCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListInstanceIdentifiersResponse{}, err + } + return client.listInstanceIdentifiersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInstanceIdentifiersCreateRequest creates the ListInstanceIdentifiers request. +func (client *WebAppsClient) listInstanceIdentifiersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListInstanceIdentifiersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceIdentifiersHandleResponse handles the ListInstanceIdentifiers response. +func (client *WebAppsClient) listInstanceIdentifiersHandleResponse(resp *http.Response) (WebAppsClientListInstanceIdentifiersResponse, error) { + result := WebAppsClientListInstanceIdentifiersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppInstanceStatusCollection); err != nil { + return WebAppsClientListInstanceIdentifiersResponse{}, err + } + return result, nil +} + +// NewListInstanceIdentifiersSlotPager - Description for Gets all scale-out instances of an app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. +// - options - WebAppsClientListInstanceIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceIdentifiersSlotPager +// method. +func (client *WebAppsClient) NewListInstanceIdentifiersSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceIdentifiersSlotOptions) *runtime.Pager[WebAppsClientListInstanceIdentifiersSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceIdentifiersSlotResponse]{ + More: func(page WebAppsClientListInstanceIdentifiersSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceIdentifiersSlotResponse) (WebAppsClientListInstanceIdentifiersSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceIdentifiersSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceIdentifiersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListInstanceIdentifiersSlotResponse{}, err + } + return client.listInstanceIdentifiersSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInstanceIdentifiersSlotCreateRequest creates the ListInstanceIdentifiersSlot request. +func (client *WebAppsClient) listInstanceIdentifiersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceIdentifiersSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceIdentifiersSlotHandleResponse handles the ListInstanceIdentifiersSlot response. +func (client *WebAppsClient) listInstanceIdentifiersSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceIdentifiersSlotResponse, error) { + result := WebAppsClientListInstanceIdentifiersSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppInstanceStatusCollection); err != nil { + return WebAppsClientListInstanceIdentifiersSlotResponse{}, err + } + return result, nil +} + +// NewListInstanceProcessModulesPager - Description for List module information for a process by its ID for a specific scaled-out +// instance in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - 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". +// - options - WebAppsClientListInstanceProcessModulesOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessModulesPager +// method. +func (client *WebAppsClient) NewListInstanceProcessModulesPager(resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientListInstanceProcessModulesOptions) *runtime.Pager[WebAppsClientListInstanceProcessModulesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessModulesResponse]{ + More: func(page WebAppsClientListInstanceProcessModulesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessModulesResponse) (WebAppsClientListInstanceProcessModulesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessModulesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessModulesCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) + }, nil) + if err != nil { + return WebAppsClientListInstanceProcessModulesResponse{}, err + } + return client.listInstanceProcessModulesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInstanceProcessModulesCreateRequest creates the ListInstanceProcessModules request. +func (client *WebAppsClient) listInstanceProcessModulesCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientListInstanceProcessModulesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceProcessModulesHandleResponse handles the ListInstanceProcessModules response. +func (client *WebAppsClient) listInstanceProcessModulesHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessModulesResponse, error) { + result := WebAppsClientListInstanceProcessModulesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfoCollection); err != nil { + return WebAppsClientListInstanceProcessModulesResponse{}, err + } + return result, nil +} + +// NewListInstanceProcessModulesSlotPager - Description for List module information for a process by its ID for a specific +// scaled-out instance in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - 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". +// - options - WebAppsClientListInstanceProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessModulesSlotPager +// method. +func (client *WebAppsClient) NewListInstanceProcessModulesSlotPager(resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientListInstanceProcessModulesSlotOptions) *runtime.Pager[WebAppsClientListInstanceProcessModulesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessModulesSlotResponse]{ + More: func(page WebAppsClientListInstanceProcessModulesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessModulesSlotResponse) (WebAppsClientListInstanceProcessModulesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessModulesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessModulesSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) + }, nil) + if err != nil { + return WebAppsClientListInstanceProcessModulesSlotResponse{}, err + } + return client.listInstanceProcessModulesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInstanceProcessModulesSlotCreateRequest creates the ListInstanceProcessModulesSlot request. +func (client *WebAppsClient) listInstanceProcessModulesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientListInstanceProcessModulesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceProcessModulesSlotHandleResponse handles the ListInstanceProcessModulesSlot response. +func (client *WebAppsClient) listInstanceProcessModulesSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessModulesSlotResponse, error) { + result := WebAppsClientListInstanceProcessModulesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfoCollection); err != nil { + return WebAppsClientListInstanceProcessModulesSlotResponse{}, err + } + return result, nil +} + +// NewListInstanceProcessThreadsPager - Description for List the threads in a process by its ID for a specific scaled-out +// instance in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - 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". +// - options - WebAppsClientListInstanceProcessThreadsOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessThreadsPager +// method. +func (client *WebAppsClient) NewListInstanceProcessThreadsPager(resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientListInstanceProcessThreadsOptions) *runtime.Pager[WebAppsClientListInstanceProcessThreadsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessThreadsResponse]{ + More: func(page WebAppsClientListInstanceProcessThreadsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessThreadsResponse) (WebAppsClientListInstanceProcessThreadsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessThreadsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessThreadsCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) + }, nil) + if err != nil { + return WebAppsClientListInstanceProcessThreadsResponse{}, err + } + return client.listInstanceProcessThreadsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInstanceProcessThreadsCreateRequest creates the ListInstanceProcessThreads request. +func (client *WebAppsClient) listInstanceProcessThreadsCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientListInstanceProcessThreadsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceProcessThreadsHandleResponse handles the ListInstanceProcessThreads response. +func (client *WebAppsClient) listInstanceProcessThreadsHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessThreadsResponse, error) { + result := WebAppsClientListInstanceProcessThreadsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessThreadInfoCollection); err != nil { + return WebAppsClientListInstanceProcessThreadsResponse{}, err + } + return result, nil +} + +// NewListInstanceProcessThreadsSlotPager - Description for List the threads in a process by its ID for a specific scaled-out +// instance in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - 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". +// - options - WebAppsClientListInstanceProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessThreadsSlotPager +// method. +func (client *WebAppsClient) NewListInstanceProcessThreadsSlotPager(resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientListInstanceProcessThreadsSlotOptions) *runtime.Pager[WebAppsClientListInstanceProcessThreadsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessThreadsSlotResponse]{ + More: func(page WebAppsClientListInstanceProcessThreadsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessThreadsSlotResponse) (WebAppsClientListInstanceProcessThreadsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessThreadsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessThreadsSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) + }, nil) + if err != nil { + return WebAppsClientListInstanceProcessThreadsSlotResponse{}, err + } + return client.listInstanceProcessThreadsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInstanceProcessThreadsSlotCreateRequest creates the ListInstanceProcessThreadsSlot request. +func (client *WebAppsClient) listInstanceProcessThreadsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientListInstanceProcessThreadsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceProcessThreadsSlotHandleResponse handles the ListInstanceProcessThreadsSlot response. +func (client *WebAppsClient) listInstanceProcessThreadsSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessThreadsSlotResponse, error) { + result := WebAppsClientListInstanceProcessThreadsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessThreadInfoCollection); err != nil { + return WebAppsClientListInstanceProcessThreadsSlotResponse{}, err + } + return result, nil +} + +// NewListInstanceProcessesPager - Description for Get list of processes for a web site, or a deployment slot, or for a specific +// scaled-out instance in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET +// api/sites/{siteName}/instances". +// - options - WebAppsClientListInstanceProcessesOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessesPager +// method. +func (client *WebAppsClient) NewListInstanceProcessesPager(resourceGroupName string, name string, instanceID string, options *WebAppsClientListInstanceProcessesOptions) *runtime.Pager[WebAppsClientListInstanceProcessesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessesResponse]{ + More: func(page WebAppsClientListInstanceProcessesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessesResponse) (WebAppsClientListInstanceProcessesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessesCreateRequest(ctx, resourceGroupName, name, instanceID, options) + }, nil) + if err != nil { + return WebAppsClientListInstanceProcessesResponse{}, err + } + return client.listInstanceProcessesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInstanceProcessesCreateRequest creates the ListInstanceProcesses request. +func (client *WebAppsClient) listInstanceProcessesCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientListInstanceProcessesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceProcessesHandleResponse handles the ListInstanceProcesses response. +func (client *WebAppsClient) listInstanceProcessesHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessesResponse, error) { + result := WebAppsClientListInstanceProcessesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfoCollection); err != nil { + return WebAppsClientListInstanceProcessesResponse{}, err + } + return result, nil +} + +// NewListInstanceProcessesSlotPager - Description for Get list of processes for a web site, or a deployment slot, or for +// a specific scaled-out instance in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - 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". +// - options - WebAppsClientListInstanceProcessesSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessesSlotPager +// method. +func (client *WebAppsClient) NewListInstanceProcessesSlotPager(resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientListInstanceProcessesSlotOptions) *runtime.Pager[WebAppsClientListInstanceProcessesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessesSlotResponse]{ + More: func(page WebAppsClientListInstanceProcessesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessesSlotResponse) (WebAppsClientListInstanceProcessesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessesSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, options) + }, nil) + if err != nil { + return WebAppsClientListInstanceProcessesSlotResponse{}, err + } + return client.listInstanceProcessesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInstanceProcessesSlotCreateRequest creates the ListInstanceProcessesSlot request. +func (client *WebAppsClient) listInstanceProcessesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientListInstanceProcessesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if instanceID == "" { + return nil, errors.New("parameter instanceID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceProcessesSlotHandleResponse handles the ListInstanceProcessesSlot response. +func (client *WebAppsClient) listInstanceProcessesSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessesSlotResponse, error) { + result := WebAppsClientListInstanceProcessesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfoCollection); err != nil { + return WebAppsClientListInstanceProcessesSlotResponse{}, err + } + return result, nil +} + +// NewListInstanceWorkflowsSlotPager - List the workflows for a web site, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. +// - options - WebAppsClientListInstanceWorkflowsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceWorkflowsSlotPager +// method. +func (client *WebAppsClient) NewListInstanceWorkflowsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceWorkflowsSlotOptions) *runtime.Pager[WebAppsClientListInstanceWorkflowsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceWorkflowsSlotResponse]{ + More: func(page WebAppsClientListInstanceWorkflowsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceWorkflowsSlotResponse) (WebAppsClientListInstanceWorkflowsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceWorkflowsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceWorkflowsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListInstanceWorkflowsSlotResponse{}, err + } + return client.listInstanceWorkflowsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listInstanceWorkflowsSlotCreateRequest creates the ListInstanceWorkflowsSlot request. +func (client *WebAppsClient) listInstanceWorkflowsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceWorkflowsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listInstanceWorkflowsSlotHandleResponse handles the ListInstanceWorkflowsSlot response. +func (client *WebAppsClient) listInstanceWorkflowsSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceWorkflowsSlotResponse, error) { + result := WebAppsClientListInstanceWorkflowsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelopeCollection); err != nil { + return WebAppsClientListInstanceWorkflowsSlotResponse{}, err + } + return result, nil +} + +// ListMetadata - Description for Gets the metadata of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListMetadataOptions contains the optional parameters for the WebAppsClient.ListMetadata method. +func (client *WebAppsClient) ListMetadata(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListMetadataOptions) (WebAppsClientListMetadataResponse, error) { + var err error + const operationName = "WebAppsClient.ListMetadata" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listMetadataCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListMetadataResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListMetadataResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListMetadataResponse{}, err + } + resp, err := client.listMetadataHandleResponse(httpResp) + return resp, err +} + +// listMetadataCreateRequest creates the ListMetadata request. +func (client *WebAppsClient) listMetadataCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListMetadataOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMetadataHandleResponse handles the ListMetadata response. +func (client *WebAppsClient) listMetadataHandleResponse(resp *http.Response) (WebAppsClientListMetadataResponse, error) { + result := WebAppsClientListMetadataResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return WebAppsClientListMetadataResponse{}, err + } + return result, nil +} + +// ListMetadataSlot - Description for Gets the metadata of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. +// - options - WebAppsClientListMetadataSlotOptions contains the optional parameters for the WebAppsClient.ListMetadataSlot +// method. +func (client *WebAppsClient) ListMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListMetadataSlotOptions) (WebAppsClientListMetadataSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListMetadataSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listMetadataSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListMetadataSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListMetadataSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListMetadataSlotResponse{}, err + } + resp, err := client.listMetadataSlotHandleResponse(httpResp) + return resp, err +} + +// listMetadataSlotCreateRequest creates the ListMetadataSlot request. +func (client *WebAppsClient) listMetadataSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListMetadataSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMetadataSlotHandleResponse handles the ListMetadataSlot response. +func (client *WebAppsClient) listMetadataSlotHandleResponse(resp *http.Response) (WebAppsClientListMetadataSlotResponse, error) { + result := WebAppsClientListMetadataSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return WebAppsClientListMetadataSlotResponse{}, err + } + return result, nil +} + +// ListNetworkFeatures - Description for Gets all network features used by the app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - view - The type of view. Only "summary" is supported at this time. +// - options - WebAppsClientListNetworkFeaturesOptions contains the optional parameters for the WebAppsClient.ListNetworkFeatures +// method. +func (client *WebAppsClient) ListNetworkFeatures(ctx context.Context, resourceGroupName string, name string, view string, options *WebAppsClientListNetworkFeaturesOptions) (WebAppsClientListNetworkFeaturesResponse, error) { + var err error + const operationName = "WebAppsClient.ListNetworkFeatures" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listNetworkFeaturesCreateRequest(ctx, resourceGroupName, name, view, options) + if err != nil { + return WebAppsClientListNetworkFeaturesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListNetworkFeaturesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListNetworkFeaturesResponse{}, err + } + resp, err := client.listNetworkFeaturesHandleResponse(httpResp) + return resp, err +} + +// listNetworkFeaturesCreateRequest creates the ListNetworkFeatures request. +func (client *WebAppsClient) listNetworkFeaturesCreateRequest(ctx context.Context, resourceGroupName string, name string, view string, options *WebAppsClientListNetworkFeaturesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if view == "" { + return nil, errors.New("parameter view cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{view}", url.PathEscape(view)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listNetworkFeaturesHandleResponse handles the ListNetworkFeatures response. +func (client *WebAppsClient) listNetworkFeaturesHandleResponse(resp *http.Response) (WebAppsClientListNetworkFeaturesResponse, error) { + result := WebAppsClientListNetworkFeaturesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkFeatures); err != nil { + return WebAppsClientListNetworkFeaturesResponse{}, err + } + return result, nil +} + +// ListNetworkFeaturesSlot - Description for Gets all network features used by the app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - view - The type of view. Only "summary" is supported at this time. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get network features for the production slot. +// - options - WebAppsClientListNetworkFeaturesSlotOptions contains the optional parameters for the WebAppsClient.ListNetworkFeaturesSlot +// method. +func (client *WebAppsClient) ListNetworkFeaturesSlot(ctx context.Context, resourceGroupName string, name string, view string, slot string, options *WebAppsClientListNetworkFeaturesSlotOptions) (WebAppsClientListNetworkFeaturesSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListNetworkFeaturesSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listNetworkFeaturesSlotCreateRequest(ctx, resourceGroupName, name, view, slot, options) + if err != nil { + return WebAppsClientListNetworkFeaturesSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListNetworkFeaturesSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListNetworkFeaturesSlotResponse{}, err + } + resp, err := client.listNetworkFeaturesSlotHandleResponse(httpResp) + return resp, err +} + +// listNetworkFeaturesSlotCreateRequest creates the ListNetworkFeaturesSlot request. +func (client *WebAppsClient) listNetworkFeaturesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, view string, slot string, options *WebAppsClientListNetworkFeaturesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if view == "" { + return nil, errors.New("parameter view cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{view}", url.PathEscape(view)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listNetworkFeaturesSlotHandleResponse handles the ListNetworkFeaturesSlot response. +func (client *WebAppsClient) listNetworkFeaturesSlotHandleResponse(resp *http.Response) (WebAppsClientListNetworkFeaturesSlotResponse, error) { + result := WebAppsClientListNetworkFeaturesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkFeatures); err != nil { + return WebAppsClientListNetworkFeaturesSlotResponse{}, err + } + return result, nil +} + +// NewListPerfMonCountersPager - Description for Gets perfmon counters for web app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientListPerfMonCountersOptions contains the optional parameters for the WebAppsClient.NewListPerfMonCountersPager +// method. +func (client *WebAppsClient) NewListPerfMonCountersPager(resourceGroupName string, name string, options *WebAppsClientListPerfMonCountersOptions) *runtime.Pager[WebAppsClientListPerfMonCountersResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListPerfMonCountersResponse]{ + More: func(page WebAppsClientListPerfMonCountersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListPerfMonCountersResponse) (WebAppsClientListPerfMonCountersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListPerfMonCountersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPerfMonCountersCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListPerfMonCountersResponse{}, err + } + return client.listPerfMonCountersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listPerfMonCountersCreateRequest creates the ListPerfMonCounters request. +func (client *WebAppsClient) listPerfMonCountersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListPerfMonCountersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listPerfMonCountersHandleResponse handles the ListPerfMonCounters response. +func (client *WebAppsClient) listPerfMonCountersHandleResponse(resp *http.Response) (WebAppsClientListPerfMonCountersResponse, error) { + result := WebAppsClientListPerfMonCountersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PerfMonCounterCollection); err != nil { + return WebAppsClientListPerfMonCountersResponse{}, err + } + return result, nil +} + +// NewListPerfMonCountersSlotPager - Description for Gets perfmon counters for web app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - WebAppsClientListPerfMonCountersSlotOptions contains the optional parameters for the WebAppsClient.NewListPerfMonCountersSlotPager +// method. +func (client *WebAppsClient) NewListPerfMonCountersSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListPerfMonCountersSlotOptions) *runtime.Pager[WebAppsClientListPerfMonCountersSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListPerfMonCountersSlotResponse]{ + More: func(page WebAppsClientListPerfMonCountersSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListPerfMonCountersSlotResponse) (WebAppsClientListPerfMonCountersSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListPerfMonCountersSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPerfMonCountersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListPerfMonCountersSlotResponse{}, err + } + return client.listPerfMonCountersSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listPerfMonCountersSlotCreateRequest creates the ListPerfMonCountersSlot request. +func (client *WebAppsClient) listPerfMonCountersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListPerfMonCountersSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listPerfMonCountersSlotHandleResponse handles the ListPerfMonCountersSlot response. +func (client *WebAppsClient) listPerfMonCountersSlotHandleResponse(resp *http.Response) (WebAppsClientListPerfMonCountersSlotResponse, error) { + result := WebAppsClientListPerfMonCountersSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PerfMonCounterCollection); err != nil { + return WebAppsClientListPerfMonCountersSlotResponse{}, err + } + return result, nil +} + +// ListPremierAddOns - Description for Gets the premier add-ons of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListPremierAddOnsOptions contains the optional parameters for the WebAppsClient.ListPremierAddOns +// method. +func (client *WebAppsClient) ListPremierAddOns(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListPremierAddOnsOptions) (WebAppsClientListPremierAddOnsResponse, error) { + var err error + const operationName = "WebAppsClient.ListPremierAddOns" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listPremierAddOnsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListPremierAddOnsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListPremierAddOnsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListPremierAddOnsResponse{}, err + } + resp, err := client.listPremierAddOnsHandleResponse(httpResp) + return resp, err +} + +// listPremierAddOnsCreateRequest creates the ListPremierAddOns request. +func (client *WebAppsClient) listPremierAddOnsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListPremierAddOnsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listPremierAddOnsHandleResponse handles the ListPremierAddOns response. +func (client *WebAppsClient) listPremierAddOnsHandleResponse(resp *http.Response) (WebAppsClientListPremierAddOnsResponse, error) { + result := WebAppsClientListPremierAddOnsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { + return WebAppsClientListPremierAddOnsResponse{}, err + } + return result, nil +} + +// ListPremierAddOnsSlot - Description for Gets the premier add-ons of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production +// slot. +// - options - WebAppsClientListPremierAddOnsSlotOptions contains the optional parameters for the WebAppsClient.ListPremierAddOnsSlot +// method. +func (client *WebAppsClient) ListPremierAddOnsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListPremierAddOnsSlotOptions) (WebAppsClientListPremierAddOnsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListPremierAddOnsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listPremierAddOnsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListPremierAddOnsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListPremierAddOnsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListPremierAddOnsSlotResponse{}, err + } + resp, err := client.listPremierAddOnsSlotHandleResponse(httpResp) + return resp, err +} + +// listPremierAddOnsSlotCreateRequest creates the ListPremierAddOnsSlot request. +func (client *WebAppsClient) listPremierAddOnsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListPremierAddOnsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listPremierAddOnsSlotHandleResponse handles the ListPremierAddOnsSlot response. +func (client *WebAppsClient) listPremierAddOnsSlotHandleResponse(resp *http.Response) (WebAppsClientListPremierAddOnsSlotResponse, error) { + result := WebAppsClientListPremierAddOnsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { + return WebAppsClientListPremierAddOnsSlotResponse{}, err + } + return result, nil +} + +// NewListProcessModulesPager - Description for List module information for a process by its ID for a specific scaled-out +// instance in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - options - WebAppsClientListProcessModulesOptions contains the optional parameters for the WebAppsClient.NewListProcessModulesPager +// method. +func (client *WebAppsClient) NewListProcessModulesPager(resourceGroupName string, name string, processID string, options *WebAppsClientListProcessModulesOptions) *runtime.Pager[WebAppsClientListProcessModulesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessModulesResponse]{ + More: func(page WebAppsClientListProcessModulesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListProcessModulesResponse) (WebAppsClientListProcessModulesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessModulesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessModulesCreateRequest(ctx, resourceGroupName, name, processID, options) + }, nil) + if err != nil { + return WebAppsClientListProcessModulesResponse{}, err + } + return client.listProcessModulesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listProcessModulesCreateRequest creates the ListProcessModules request. +func (client *WebAppsClient) listProcessModulesCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientListProcessModulesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listProcessModulesHandleResponse handles the ListProcessModules response. +func (client *WebAppsClient) listProcessModulesHandleResponse(resp *http.Response) (WebAppsClientListProcessModulesResponse, error) { + result := WebAppsClientListProcessModulesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfoCollection); err != nil { + return WebAppsClientListProcessModulesResponse{}, err + } + return result, nil +} + +// NewListProcessModulesSlotPager - Description for List module information for a process by its ID for a specific scaled-out +// instance in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientListProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessModulesSlotPager +// method. +func (client *WebAppsClient) NewListProcessModulesSlotPager(resourceGroupName string, name string, processID string, slot string, options *WebAppsClientListProcessModulesSlotOptions) *runtime.Pager[WebAppsClientListProcessModulesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessModulesSlotResponse]{ + More: func(page WebAppsClientListProcessModulesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListProcessModulesSlotResponse) (WebAppsClientListProcessModulesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessModulesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessModulesSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) + }, nil) + if err != nil { + return WebAppsClientListProcessModulesSlotResponse{}, err + } + return client.listProcessModulesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listProcessModulesSlotCreateRequest creates the ListProcessModulesSlot request. +func (client *WebAppsClient) listProcessModulesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientListProcessModulesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listProcessModulesSlotHandleResponse handles the ListProcessModulesSlot response. +func (client *WebAppsClient) listProcessModulesSlotHandleResponse(resp *http.Response) (WebAppsClientListProcessModulesSlotResponse, error) { + result := WebAppsClientListProcessModulesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfoCollection); err != nil { + return WebAppsClientListProcessModulesSlotResponse{}, err + } + return result, nil +} + +// NewListProcessThreadsPager - Description for List the threads in a process by its ID for a specific scaled-out instance +// in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - options - WebAppsClientListProcessThreadsOptions contains the optional parameters for the WebAppsClient.NewListProcessThreadsPager +// method. +func (client *WebAppsClient) NewListProcessThreadsPager(resourceGroupName string, name string, processID string, options *WebAppsClientListProcessThreadsOptions) *runtime.Pager[WebAppsClientListProcessThreadsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessThreadsResponse]{ + More: func(page WebAppsClientListProcessThreadsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListProcessThreadsResponse) (WebAppsClientListProcessThreadsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessThreadsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessThreadsCreateRequest(ctx, resourceGroupName, name, processID, options) + }, nil) + if err != nil { + return WebAppsClientListProcessThreadsResponse{}, err + } + return client.listProcessThreadsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listProcessThreadsCreateRequest creates the ListProcessThreads request. +func (client *WebAppsClient) listProcessThreadsCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientListProcessThreadsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listProcessThreadsHandleResponse handles the ListProcessThreads response. +func (client *WebAppsClient) listProcessThreadsHandleResponse(resp *http.Response) (WebAppsClientListProcessThreadsResponse, error) { + result := WebAppsClientListProcessThreadsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessThreadInfoCollection); err != nil { + return WebAppsClientListProcessThreadsResponse{}, err + } + return result, nil +} + +// NewListProcessThreadsSlotPager - Description for List the threads in a process by its ID for a specific scaled-out instance +// in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - processID - PID. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientListProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessThreadsSlotPager +// method. +func (client *WebAppsClient) NewListProcessThreadsSlotPager(resourceGroupName string, name string, processID string, slot string, options *WebAppsClientListProcessThreadsSlotOptions) *runtime.Pager[WebAppsClientListProcessThreadsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessThreadsSlotResponse]{ + More: func(page WebAppsClientListProcessThreadsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListProcessThreadsSlotResponse) (WebAppsClientListProcessThreadsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessThreadsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessThreadsSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) + }, nil) + if err != nil { + return WebAppsClientListProcessThreadsSlotResponse{}, err + } + return client.listProcessThreadsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listProcessThreadsSlotCreateRequest creates the ListProcessThreadsSlot request. +func (client *WebAppsClient) listProcessThreadsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientListProcessThreadsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if processID == "" { + return nil, errors.New("parameter processID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listProcessThreadsSlotHandleResponse handles the ListProcessThreadsSlot response. +func (client *WebAppsClient) listProcessThreadsSlotHandleResponse(resp *http.Response) (WebAppsClientListProcessThreadsSlotResponse, error) { + result := WebAppsClientListProcessThreadsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessThreadInfoCollection); err != nil { + return WebAppsClientListProcessThreadsSlotResponse{}, err + } + return result, nil +} + +// NewListProcessesPager - Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out +// instance in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - options - WebAppsClientListProcessesOptions contains the optional parameters for the WebAppsClient.NewListProcessesPager +// method. +func (client *WebAppsClient) NewListProcessesPager(resourceGroupName string, name string, options *WebAppsClientListProcessesOptions) *runtime.Pager[WebAppsClientListProcessesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessesResponse]{ + More: func(page WebAppsClientListProcessesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListProcessesResponse) (WebAppsClientListProcessesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListProcessesResponse{}, err + } + return client.listProcessesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listProcessesCreateRequest creates the ListProcesses request. +func (client *WebAppsClient) listProcessesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListProcessesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listProcessesHandleResponse handles the ListProcesses response. +func (client *WebAppsClient) listProcessesHandleResponse(resp *http.Response) (WebAppsClientListProcessesResponse, error) { + result := WebAppsClientListProcessesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfoCollection); err != nil { + return WebAppsClientListProcessesResponse{}, err + } + return result, nil +} + +// NewListProcessesSlotPager - Description for Get list of processes for a web site, or a deployment slot, or for a specific +// scaled-out instance in a web site. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientListProcessesSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessesSlotPager +// method. +func (client *WebAppsClient) NewListProcessesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListProcessesSlotOptions) *runtime.Pager[WebAppsClientListProcessesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessesSlotResponse]{ + More: func(page WebAppsClientListProcessesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListProcessesSlotResponse) (WebAppsClientListProcessesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListProcessesSlotResponse{}, err + } + return client.listProcessesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listProcessesSlotCreateRequest creates the ListProcessesSlot request. +func (client *WebAppsClient) listProcessesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListProcessesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listProcessesSlotHandleResponse handles the ListProcessesSlot response. +func (client *WebAppsClient) listProcessesSlotHandleResponse(resp *http.Response) (WebAppsClientListProcessesSlotResponse, error) { + result := WebAppsClientListProcessesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfoCollection); err != nil { + return WebAppsClientListProcessesSlotResponse{}, err + } + return result, nil +} + +// NewListProductionSiteDeploymentStatusesPager - List deployment statuses for an app (or deployment slot, if specified). +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListProductionSiteDeploymentStatusesOptions contains the optional parameters for the WebAppsClient.NewListProductionSiteDeploymentStatusesPager +// method. +func (client *WebAppsClient) NewListProductionSiteDeploymentStatusesPager(resourceGroupName string, name string, options *WebAppsClientListProductionSiteDeploymentStatusesOptions) *runtime.Pager[WebAppsClientListProductionSiteDeploymentStatusesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProductionSiteDeploymentStatusesResponse]{ + More: func(page WebAppsClientListProductionSiteDeploymentStatusesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListProductionSiteDeploymentStatusesResponse) (WebAppsClientListProductionSiteDeploymentStatusesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProductionSiteDeploymentStatusesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProductionSiteDeploymentStatusesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListProductionSiteDeploymentStatusesResponse{}, err + } + return client.listProductionSiteDeploymentStatusesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listProductionSiteDeploymentStatusesCreateRequest creates the ListProductionSiteDeploymentStatuses request. +func (client *WebAppsClient) listProductionSiteDeploymentStatusesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListProductionSiteDeploymentStatusesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listProductionSiteDeploymentStatusesHandleResponse handles the ListProductionSiteDeploymentStatuses response. +func (client *WebAppsClient) listProductionSiteDeploymentStatusesHandleResponse(resp *http.Response) (WebAppsClientListProductionSiteDeploymentStatusesResponse, error) { + result := WebAppsClientListProductionSiteDeploymentStatusesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmDeploymentStatusCollection); err != nil { + return WebAppsClientListProductionSiteDeploymentStatusesResponse{}, err + } + return result, nil +} + +// NewListPublicCertificatesPager - Description for Get public certificates for an app or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListPublicCertificatesOptions contains the optional parameters for the WebAppsClient.NewListPublicCertificatesPager +// method. +func (client *WebAppsClient) NewListPublicCertificatesPager(resourceGroupName string, name string, options *WebAppsClientListPublicCertificatesOptions) *runtime.Pager[WebAppsClientListPublicCertificatesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListPublicCertificatesResponse]{ + More: func(page WebAppsClientListPublicCertificatesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListPublicCertificatesResponse) (WebAppsClientListPublicCertificatesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListPublicCertificatesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPublicCertificatesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListPublicCertificatesResponse{}, err + } + return client.listPublicCertificatesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listPublicCertificatesCreateRequest creates the ListPublicCertificates request. +func (client *WebAppsClient) listPublicCertificatesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListPublicCertificatesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listPublicCertificatesHandleResponse handles the ListPublicCertificates response. +func (client *WebAppsClient) listPublicCertificatesHandleResponse(resp *http.Response) (WebAppsClientListPublicCertificatesResponse, error) { + result := WebAppsClientListPublicCertificatesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificateCollection); err != nil { + return WebAppsClientListPublicCertificatesResponse{}, err + } + return result, nil +} + +// NewListPublicCertificatesSlotPager - Description for Get public certificates for an app or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. +// - options - WebAppsClientListPublicCertificatesSlotOptions contains the optional parameters for the WebAppsClient.NewListPublicCertificatesSlotPager +// method. +func (client *WebAppsClient) NewListPublicCertificatesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListPublicCertificatesSlotOptions) *runtime.Pager[WebAppsClientListPublicCertificatesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListPublicCertificatesSlotResponse]{ + More: func(page WebAppsClientListPublicCertificatesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListPublicCertificatesSlotResponse) (WebAppsClientListPublicCertificatesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListPublicCertificatesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPublicCertificatesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListPublicCertificatesSlotResponse{}, err + } + return client.listPublicCertificatesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listPublicCertificatesSlotCreateRequest creates the ListPublicCertificatesSlot request. +func (client *WebAppsClient) listPublicCertificatesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListPublicCertificatesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listPublicCertificatesSlotHandleResponse handles the ListPublicCertificatesSlot response. +func (client *WebAppsClient) listPublicCertificatesSlotHandleResponse(resp *http.Response) (WebAppsClientListPublicCertificatesSlotResponse, error) { + result := WebAppsClientListPublicCertificatesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificateCollection); err != nil { + return WebAppsClientListPublicCertificatesSlotResponse{}, err + } + return result, nil +} + +// BeginListPublishingCredentials - Description for Gets the Git/FTP publishing credentials of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientBeginListPublishingCredentialsOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentials +// method. +func (client *WebAppsClient) BeginListPublishingCredentials(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginListPublishingCredentialsOptions) (*runtime.Poller[WebAppsClientListPublishingCredentialsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listPublishingCredentials(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientListPublishingCredentialsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientListPublishingCredentialsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListPublishingCredentials - Description for Gets the Git/FTP publishing credentials of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) listPublishingCredentials(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginListPublishingCredentialsOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginListPublishingCredentials" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listPublishingCredentialsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listPublishingCredentialsCreateRequest creates the ListPublishingCredentials request. +func (client *WebAppsClient) listPublishingCredentialsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginListPublishingCredentialsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginListPublishingCredentialsSlot - Description for Gets the Git/FTP publishing credentials of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production +// slot. +// - options - WebAppsClientBeginListPublishingCredentialsSlotOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentialsSlot +// method. +func (client *WebAppsClient) BeginListPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginListPublishingCredentialsSlotOptions) (*runtime.Poller[WebAppsClientListPublishingCredentialsSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listPublishingCredentialsSlot(ctx, resourceGroupName, name, slot, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientListPublishingCredentialsSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientListPublishingCredentialsSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListPublishingCredentialsSlot - Description for Gets the Git/FTP publishing credentials of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) listPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginListPublishingCredentialsSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginListPublishingCredentialsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listPublishingCredentialsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listPublishingCredentialsSlotCreateRequest creates the ListPublishingCredentialsSlot request. +func (client *WebAppsClient) listPublishingCredentialsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginListPublishingCredentialsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// ListPublishingProfileXMLWithSecrets - Description for Gets the publishing profile for an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - publishingProfileOptions - Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} +// to get a FileZilla publishing profile. +// - options - WebAppsClientListPublishingProfileXMLWithSecretsOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecrets +// method. +func (client *WebAppsClient) ListPublishingProfileXMLWithSecrets(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, options *WebAppsClientListPublishingProfileXMLWithSecretsOptions) (WebAppsClientListPublishingProfileXMLWithSecretsResponse, error) { + var err error + const operationName = "WebAppsClient.ListPublishingProfileXMLWithSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listPublishingProfileXMLWithSecretsCreateRequest(ctx, resourceGroupName, name, publishingProfileOptions, options) + if err != nil { + return WebAppsClientListPublishingProfileXMLWithSecretsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListPublishingProfileXMLWithSecretsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListPublishingProfileXMLWithSecretsResponse{}, err + } + return WebAppsClientListPublishingProfileXMLWithSecretsResponse{Body: httpResp.Body}, nil +} + +// listPublishingProfileXMLWithSecretsCreateRequest creates the ListPublishingProfileXMLWithSecrets request. +func (client *WebAppsClient) listPublishingProfileXMLWithSecretsCreateRequest(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, options *WebAppsClientListPublishingProfileXMLWithSecretsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + runtime.SkipBodyDownload(req) + req.Raw().Header["Accept"] = []string{"application/xml"} + if err := runtime.MarshalAsJSON(req, publishingProfileOptions); err != nil { + return nil, err + } + return req, nil +} + +// ListPublishingProfileXMLWithSecretsSlot - Description for Gets the publishing profile for an app (or deployment slot, if +// specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production +// slot. +// - publishingProfileOptions - Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} +// to get a FileZilla publishing profile. +// - options - WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecretsSlot +// method. +func (client *WebAppsClient) ListPublishingProfileXMLWithSecretsSlot(ctx context.Context, resourceGroupName string, name string, slot string, publishingProfileOptions CsmPublishingProfileOptions, options *WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions) (WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListPublishingProfileXMLWithSecretsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listPublishingProfileXMLWithSecretsSlotCreateRequest(ctx, resourceGroupName, name, slot, publishingProfileOptions, options) + if err != nil { + return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{}, err + } + return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{Body: httpResp.Body}, nil +} + +// listPublishingProfileXMLWithSecretsSlotCreateRequest creates the ListPublishingProfileXMLWithSecretsSlot request. +func (client *WebAppsClient) listPublishingProfileXMLWithSecretsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, publishingProfileOptions CsmPublishingProfileOptions, options *WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + runtime.SkipBodyDownload(req) + req.Raw().Header["Accept"] = []string{"application/xml"} + if err := runtime.MarshalAsJSON(req, publishingProfileOptions); err != nil { + return nil, err + } + return req, nil +} + +// ListRelayServiceConnections - Description for Gets hybrid connections configured for an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListRelayServiceConnectionsOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnections +// method. +func (client *WebAppsClient) ListRelayServiceConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListRelayServiceConnectionsOptions) (WebAppsClientListRelayServiceConnectionsResponse, error) { + var err error + const operationName = "WebAppsClient.ListRelayServiceConnections" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listRelayServiceConnectionsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListRelayServiceConnectionsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListRelayServiceConnectionsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListRelayServiceConnectionsResponse{}, err + } + resp, err := client.listRelayServiceConnectionsHandleResponse(httpResp) + return resp, err +} + +// listRelayServiceConnectionsCreateRequest creates the ListRelayServiceConnections request. +func (client *WebAppsClient) listRelayServiceConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListRelayServiceConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listRelayServiceConnectionsHandleResponse handles the ListRelayServiceConnections response. +func (client *WebAppsClient) listRelayServiceConnectionsHandleResponse(resp *http.Response) (WebAppsClientListRelayServiceConnectionsResponse, error) { + result := WebAppsClientListRelayServiceConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { + return WebAppsClientListRelayServiceConnectionsResponse{}, err + } + return result, nil +} + +// ListRelayServiceConnectionsSlot - Description for Gets hybrid connections configured for an app (or deployment slot, if +// specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production +// slot. +// - options - WebAppsClientListRelayServiceConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnectionsSlot +// method. +func (client *WebAppsClient) ListRelayServiceConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListRelayServiceConnectionsSlotOptions) (WebAppsClientListRelayServiceConnectionsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListRelayServiceConnectionsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listRelayServiceConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListRelayServiceConnectionsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListRelayServiceConnectionsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListRelayServiceConnectionsSlotResponse{}, err + } + resp, err := client.listRelayServiceConnectionsSlotHandleResponse(httpResp) + return resp, err +} + +// listRelayServiceConnectionsSlotCreateRequest creates the ListRelayServiceConnectionsSlot request. +func (client *WebAppsClient) listRelayServiceConnectionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListRelayServiceConnectionsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listRelayServiceConnectionsSlotHandleResponse handles the ListRelayServiceConnectionsSlot response. +func (client *WebAppsClient) listRelayServiceConnectionsSlotHandleResponse(resp *http.Response) (WebAppsClientListRelayServiceConnectionsSlotResponse, error) { + result := WebAppsClientListRelayServiceConnectionsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { + return WebAppsClientListRelayServiceConnectionsSlotResponse{}, err + } + return result, nil +} + +// NewListSiteBackupsPager - Description for Gets existing backups of an app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListSiteBackupsOptions contains the optional parameters for the WebAppsClient.NewListSiteBackupsPager +// method. +func (client *WebAppsClient) NewListSiteBackupsPager(resourceGroupName string, name string, options *WebAppsClientListSiteBackupsOptions) *runtime.Pager[WebAppsClientListSiteBackupsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteBackupsResponse]{ + More: func(page WebAppsClientListSiteBackupsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSiteBackupsResponse) (WebAppsClientListSiteBackupsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSiteBackupsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteBackupsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListSiteBackupsResponse{}, err + } + return client.listSiteBackupsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteBackupsCreateRequest creates the ListSiteBackups request. +func (client *WebAppsClient) listSiteBackupsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSiteBackupsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteBackupsHandleResponse handles the ListSiteBackups response. +func (client *WebAppsClient) listSiteBackupsHandleResponse(resp *http.Response) (WebAppsClientListSiteBackupsResponse, error) { + result := WebAppsClientListSiteBackupsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupItemCollection); err != nil { + return WebAppsClientListSiteBackupsResponse{}, err + } + return result, nil +} + +// NewListSiteBackupsSlotPager - Description for Gets existing backups of an app. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. +// - options - WebAppsClientListSiteBackupsSlotOptions contains the optional parameters for the WebAppsClient.NewListSiteBackupsSlotPager +// method. +func (client *WebAppsClient) NewListSiteBackupsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSiteBackupsSlotOptions) *runtime.Pager[WebAppsClientListSiteBackupsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteBackupsSlotResponse]{ + More: func(page WebAppsClientListSiteBackupsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSiteBackupsSlotResponse) (WebAppsClientListSiteBackupsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSiteBackupsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteBackupsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListSiteBackupsSlotResponse{}, err + } + return client.listSiteBackupsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteBackupsSlotCreateRequest creates the ListSiteBackupsSlot request. +func (client *WebAppsClient) listSiteBackupsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSiteBackupsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteBackupsSlotHandleResponse handles the ListSiteBackupsSlot response. +func (client *WebAppsClient) listSiteBackupsSlotHandleResponse(resp *http.Response) (WebAppsClientListSiteBackupsSlotResponse, error) { + result := WebAppsClientListSiteBackupsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupItemCollection); err != nil { + return WebAppsClientListSiteBackupsSlotResponse{}, err + } + return result, nil +} + +// NewListSiteContainersPager - Lists all the site containers of a site, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListSiteContainersOptions contains the optional parameters for the WebAppsClient.NewListSiteContainersPager +// method. +func (client *WebAppsClient) NewListSiteContainersPager(resourceGroupName string, name string, options *WebAppsClientListSiteContainersOptions) *runtime.Pager[WebAppsClientListSiteContainersResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteContainersResponse]{ + More: func(page WebAppsClientListSiteContainersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSiteContainersResponse) (WebAppsClientListSiteContainersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSiteContainersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteContainersCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListSiteContainersResponse{}, err + } + return client.listSiteContainersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteContainersCreateRequest creates the ListSiteContainers request. +func (client *WebAppsClient) listSiteContainersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSiteContainersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteContainersHandleResponse handles the ListSiteContainers response. +func (client *WebAppsClient) listSiteContainersHandleResponse(resp *http.Response) (WebAppsClientListSiteContainersResponse, error) { + result := WebAppsClientListSiteContainersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainerCollection); err != nil { + return WebAppsClientListSiteContainersResponse{}, err + } + return result, nil +} + +// NewListSiteContainersSlotPager - Lists all the site containers of a site, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get a list of site containers for the production +// slot. +// - options - WebAppsClientListSiteContainersSlotOptions contains the optional parameters for the WebAppsClient.NewListSiteContainersSlotPager +// method. +func (client *WebAppsClient) NewListSiteContainersSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSiteContainersSlotOptions) *runtime.Pager[WebAppsClientListSiteContainersSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteContainersSlotResponse]{ + More: func(page WebAppsClientListSiteContainersSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSiteContainersSlotResponse) (WebAppsClientListSiteContainersSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSiteContainersSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteContainersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListSiteContainersSlotResponse{}, err + } + return client.listSiteContainersSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteContainersSlotCreateRequest creates the ListSiteContainersSlot request. +func (client *WebAppsClient) listSiteContainersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSiteContainersSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteContainersSlotHandleResponse handles the ListSiteContainersSlot response. +func (client *WebAppsClient) listSiteContainersSlotHandleResponse(resp *http.Response) (WebAppsClientListSiteContainersSlotResponse, error) { + result := WebAppsClientListSiteContainersSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteContainerCollection); err != nil { + return WebAppsClientListSiteContainersSlotResponse{}, err + } + return result, nil +} + +// NewListSiteExtensionsPager - Description for Get list of siteextensions for a web site, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - options - WebAppsClientListSiteExtensionsOptions contains the optional parameters for the WebAppsClient.NewListSiteExtensionsPager +// method. +func (client *WebAppsClient) NewListSiteExtensionsPager(resourceGroupName string, name string, options *WebAppsClientListSiteExtensionsOptions) *runtime.Pager[WebAppsClientListSiteExtensionsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteExtensionsResponse]{ + More: func(page WebAppsClientListSiteExtensionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSiteExtensionsResponse) (WebAppsClientListSiteExtensionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSiteExtensionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteExtensionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListSiteExtensionsResponse{}, err + } + return client.listSiteExtensionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteExtensionsCreateRequest creates the ListSiteExtensions request. +func (client *WebAppsClient) listSiteExtensionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSiteExtensionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteExtensionsHandleResponse handles the ListSiteExtensions response. +func (client *WebAppsClient) listSiteExtensionsHandleResponse(resp *http.Response) (WebAppsClientListSiteExtensionsResponse, error) { + result := WebAppsClientListSiteExtensionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteExtensionInfoCollection); err != nil { + return WebAppsClientListSiteExtensionsResponse{}, err + } + return result, nil +} + +// NewListSiteExtensionsSlotPager - Description for Get list of siteextensions for a web site, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. +// - options - WebAppsClientListSiteExtensionsSlotOptions contains the optional parameters for the WebAppsClient.NewListSiteExtensionsSlotPager +// method. +func (client *WebAppsClient) NewListSiteExtensionsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSiteExtensionsSlotOptions) *runtime.Pager[WebAppsClientListSiteExtensionsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteExtensionsSlotResponse]{ + More: func(page WebAppsClientListSiteExtensionsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSiteExtensionsSlotResponse) (WebAppsClientListSiteExtensionsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSiteExtensionsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteExtensionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListSiteExtensionsSlotResponse{}, err + } + return client.listSiteExtensionsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteExtensionsSlotCreateRequest creates the ListSiteExtensionsSlot request. +func (client *WebAppsClient) listSiteExtensionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSiteExtensionsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSiteExtensionsSlotHandleResponse handles the ListSiteExtensionsSlot response. +func (client *WebAppsClient) listSiteExtensionsSlotHandleResponse(resp *http.Response) (WebAppsClientListSiteExtensionsSlotResponse, error) { + result := WebAppsClientListSiteExtensionsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteExtensionInfoCollection); err != nil { + return WebAppsClientListSiteExtensionsSlotResponse{}, err + } + return result, nil +} + +// ListSitePushSettings - Description for Gets the Push settings associated with web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientListSitePushSettingsOptions contains the optional parameters for the WebAppsClient.ListSitePushSettings +// method. +func (client *WebAppsClient) ListSitePushSettings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSitePushSettingsOptions) (WebAppsClientListSitePushSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.ListSitePushSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSitePushSettingsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListSitePushSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListSitePushSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSitePushSettingsResponse{}, err + } + resp, err := client.listSitePushSettingsHandleResponse(httpResp) + return resp, err +} + +// listSitePushSettingsCreateRequest creates the ListSitePushSettings request. +func (client *WebAppsClient) listSitePushSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSitePushSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSitePushSettingsHandleResponse handles the ListSitePushSettings response. +func (client *WebAppsClient) listSitePushSettingsHandleResponse(resp *http.Response) (WebAppsClientListSitePushSettingsResponse, error) { + result := WebAppsClientListSitePushSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PushSettings); err != nil { + return WebAppsClientListSitePushSettingsResponse{}, err + } + return result, nil +} + +// ListSitePushSettingsSlot - Description for Gets the Push settings associated with web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - WebAppsClientListSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListSitePushSettingsSlot +// method. +func (client *WebAppsClient) ListSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSitePushSettingsSlotOptions) (WebAppsClientListSitePushSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListSitePushSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSitePushSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListSitePushSettingsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListSitePushSettingsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSitePushSettingsSlotResponse{}, err + } + resp, err := client.listSitePushSettingsSlotHandleResponse(httpResp) + return resp, err +} + +// listSitePushSettingsSlotCreateRequest creates the ListSitePushSettingsSlot request. +func (client *WebAppsClient) listSitePushSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSitePushSettingsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSitePushSettingsSlotHandleResponse handles the ListSitePushSettingsSlot response. +func (client *WebAppsClient) listSitePushSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientListSitePushSettingsSlotResponse, error) { + result := WebAppsClientListSitePushSettingsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PushSettings); err != nil { + return WebAppsClientListSitePushSettingsSlotResponse{}, err + } + return result, nil +} + +// ListSlotConfigurationNames - Description for Gets the names of app settings and connection strings that stick to the slot +// (not swapped). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.ListSlotConfigurationNames +// method. +func (client *WebAppsClient) ListSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSlotConfigurationNamesOptions) (WebAppsClientListSlotConfigurationNamesResponse, error) { + var err error + const operationName = "WebAppsClient.ListSlotConfigurationNames" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSlotConfigurationNamesCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListSlotConfigurationNamesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListSlotConfigurationNamesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSlotConfigurationNamesResponse{}, err + } + resp, err := client.listSlotConfigurationNamesHandleResponse(httpResp) + return resp, err +} + +// listSlotConfigurationNamesCreateRequest creates the ListSlotConfigurationNames request. +func (client *WebAppsClient) listSlotConfigurationNamesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSlotConfigurationNamesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSlotConfigurationNamesHandleResponse handles the ListSlotConfigurationNames response. +func (client *WebAppsClient) listSlotConfigurationNamesHandleResponse(resp *http.Response) (WebAppsClientListSlotConfigurationNamesResponse, error) { + result := WebAppsClientListSlotConfigurationNamesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SlotConfigNamesResource); err != nil { + return WebAppsClientListSlotConfigurationNamesResponse{}, err + } + return result, nil +} + +// NewListSlotDifferencesFromProductionPager - Description for Get the difference in configuration settings between two web +// app slots. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slotSwapEntity - JSON object that contains the target slot name. See example. +// - options - WebAppsClientListSlotDifferencesFromProductionOptions contains the optional parameters for the WebAppsClient.NewListSlotDifferencesFromProductionPager +// method. +func (client *WebAppsClient) NewListSlotDifferencesFromProductionPager(resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientListSlotDifferencesFromProductionOptions) *runtime.Pager[WebAppsClientListSlotDifferencesFromProductionResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSlotDifferencesFromProductionResponse]{ + More: func(page WebAppsClientListSlotDifferencesFromProductionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSlotDifferencesFromProductionResponse) (WebAppsClientListSlotDifferencesFromProductionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSlotDifferencesFromProductionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSlotDifferencesFromProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) + }, nil) + if err != nil { + return WebAppsClientListSlotDifferencesFromProductionResponse{}, err + } + return client.listSlotDifferencesFromProductionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSlotDifferencesFromProductionCreateRequest creates the ListSlotDifferencesFromProduction request. +func (client *WebAppsClient) listSlotDifferencesFromProductionCreateRequest(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientListSlotDifferencesFromProductionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil +} + +// listSlotDifferencesFromProductionHandleResponse handles the ListSlotDifferencesFromProduction response. +func (client *WebAppsClient) listSlotDifferencesFromProductionHandleResponse(resp *http.Response) (WebAppsClientListSlotDifferencesFromProductionResponse, error) { + result := WebAppsClientListSlotDifferencesFromProductionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SlotDifferenceCollection); err != nil { + return WebAppsClientListSlotDifferencesFromProductionResponse{}, err + } + return result, nil +} + +// NewListSlotDifferencesSlotPager - Description for Get the difference in configuration settings between two web app slots. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. +// - slotSwapEntity - JSON object that contains the target slot name. See example. +// - options - WebAppsClientListSlotDifferencesSlotOptions contains the optional parameters for the WebAppsClient.NewListSlotDifferencesSlotPager +// method. +func (client *WebAppsClient) NewListSlotDifferencesSlotPager(resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientListSlotDifferencesSlotOptions) *runtime.Pager[WebAppsClientListSlotDifferencesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSlotDifferencesSlotResponse]{ + More: func(page WebAppsClientListSlotDifferencesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSlotDifferencesSlotResponse) (WebAppsClientListSlotDifferencesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSlotDifferencesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSlotDifferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) + }, nil) + if err != nil { + return WebAppsClientListSlotDifferencesSlotResponse{}, err + } + return client.listSlotDifferencesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSlotDifferencesSlotCreateRequest creates the ListSlotDifferencesSlot request. +func (client *WebAppsClient) listSlotDifferencesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientListSlotDifferencesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil +} + +// listSlotDifferencesSlotHandleResponse handles the ListSlotDifferencesSlot response. +func (client *WebAppsClient) listSlotDifferencesSlotHandleResponse(resp *http.Response) (WebAppsClientListSlotDifferencesSlotResponse, error) { + result := WebAppsClientListSlotDifferencesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SlotDifferenceCollection); err != nil { + return WebAppsClientListSlotDifferencesSlotResponse{}, err + } + return result, nil +} + +// NewListSlotSiteDeploymentStatusesSlotPager - List deployment statuses for an app (or deployment slot, if specified). +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production +// slot. +// - options - WebAppsClientListSlotSiteDeploymentStatusesSlotOptions contains the optional parameters for the WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager +// method. +func (client *WebAppsClient) NewListSlotSiteDeploymentStatusesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSlotSiteDeploymentStatusesSlotOptions) *runtime.Pager[WebAppsClientListSlotSiteDeploymentStatusesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSlotSiteDeploymentStatusesSlotResponse]{ + More: func(page WebAppsClientListSlotSiteDeploymentStatusesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSlotSiteDeploymentStatusesSlotResponse) (WebAppsClientListSlotSiteDeploymentStatusesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSlotSiteDeploymentStatusesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{}, err + } + return client.listSlotSiteDeploymentStatusesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSlotSiteDeploymentStatusesSlotCreateRequest creates the ListSlotSiteDeploymentStatusesSlot request. +func (client *WebAppsClient) listSlotSiteDeploymentStatusesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSlotSiteDeploymentStatusesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSlotSiteDeploymentStatusesSlotHandleResponse handles the ListSlotSiteDeploymentStatusesSlot response. +func (client *WebAppsClient) listSlotSiteDeploymentStatusesSlotHandleResponse(resp *http.Response) (WebAppsClientListSlotSiteDeploymentStatusesSlotResponse, error) { + result := WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmDeploymentStatusCollection); err != nil { + return WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{}, err + } + return result, nil +} + +// NewListSlotsPager - Description for Gets an app's deployment slots. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListSlotsOptions contains the optional parameters for the WebAppsClient.NewListSlotsPager method. +func (client *WebAppsClient) NewListSlotsPager(resourceGroupName string, name string, options *WebAppsClientListSlotsOptions) *runtime.Pager[WebAppsClientListSlotsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSlotsResponse]{ + More: func(page WebAppsClientListSlotsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSlotsResponse) (WebAppsClientListSlotsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSlotsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSlotsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListSlotsResponse{}, err + } + return client.listSlotsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSlotsCreateRequest creates the ListSlots request. +func (client *WebAppsClient) listSlotsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSlotsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSlotsHandleResponse handles the ListSlots response. +func (client *WebAppsClient) listSlotsHandleResponse(resp *http.Response) (WebAppsClientListSlotsResponse, error) { + result := WebAppsClientListSlotsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { + return WebAppsClientListSlotsResponse{}, err + } + return result, nil +} + +// NewListSnapshotsPager - Description for Returns all Snapshots to the user. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Website Name. +// - options - WebAppsClientListSnapshotsOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsPager +// method. +func (client *WebAppsClient) NewListSnapshotsPager(resourceGroupName string, name string, options *WebAppsClientListSnapshotsOptions) *runtime.Pager[WebAppsClientListSnapshotsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSnapshotsResponse]{ + More: func(page WebAppsClientListSnapshotsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsResponse) (WebAppsClientListSnapshotsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSnapshotsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSnapshotsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListSnapshotsResponse{}, err + } + return client.listSnapshotsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSnapshotsCreateRequest creates the ListSnapshots request. +func (client *WebAppsClient) listSnapshotsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSnapshotsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSnapshotsHandleResponse handles the ListSnapshots response. +func (client *WebAppsClient) listSnapshotsHandleResponse(resp *http.Response) (WebAppsClientListSnapshotsResponse, error) { + result := WebAppsClientListSnapshotsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotCollection); err != nil { + return WebAppsClientListSnapshotsResponse{}, err + } + return result, nil +} + +// NewListSnapshotsFromDRSecondaryPager - Description for Returns all Snapshots to the user from DRSecondary endpoint. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Website Name. +// - options - WebAppsClientListSnapshotsFromDRSecondaryOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsFromDRSecondaryPager +// method. +func (client *WebAppsClient) NewListSnapshotsFromDRSecondaryPager(resourceGroupName string, name string, options *WebAppsClientListSnapshotsFromDRSecondaryOptions) *runtime.Pager[WebAppsClientListSnapshotsFromDRSecondaryResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSnapshotsFromDRSecondaryResponse]{ + More: func(page WebAppsClientListSnapshotsFromDRSecondaryResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsFromDRSecondaryResponse) (WebAppsClientListSnapshotsFromDRSecondaryResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSnapshotsFromDRSecondaryPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSnapshotsFromDRSecondaryCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListSnapshotsFromDRSecondaryResponse{}, err + } + return client.listSnapshotsFromDRSecondaryHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSnapshotsFromDRSecondaryCreateRequest creates the ListSnapshotsFromDRSecondary request. +func (client *WebAppsClient) listSnapshotsFromDRSecondaryCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSnapshotsFromDRSecondaryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSnapshotsFromDRSecondaryHandleResponse handles the ListSnapshotsFromDRSecondary response. +func (client *WebAppsClient) listSnapshotsFromDRSecondaryHandleResponse(resp *http.Response) (WebAppsClientListSnapshotsFromDRSecondaryResponse, error) { + result := WebAppsClientListSnapshotsFromDRSecondaryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotCollection); err != nil { + return WebAppsClientListSnapshotsFromDRSecondaryResponse{}, err + } + return result, nil +} + +// NewListSnapshotsFromDRSecondarySlotPager - Description for Returns all Snapshots to the user from DRSecondary endpoint. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Website Name. +// - slot - Website Slot. +// - options - WebAppsClientListSnapshotsFromDRSecondarySlotOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager +// method. +func (client *WebAppsClient) NewListSnapshotsFromDRSecondarySlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSnapshotsFromDRSecondarySlotOptions) *runtime.Pager[WebAppsClientListSnapshotsFromDRSecondarySlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSnapshotsFromDRSecondarySlotResponse]{ + More: func(page WebAppsClientListSnapshotsFromDRSecondarySlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsFromDRSecondarySlotResponse) (WebAppsClientListSnapshotsFromDRSecondarySlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSnapshotsFromDRSecondarySlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListSnapshotsFromDRSecondarySlotResponse{}, err + } + return client.listSnapshotsFromDRSecondarySlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSnapshotsFromDRSecondarySlotCreateRequest creates the ListSnapshotsFromDRSecondarySlot request. +func (client *WebAppsClient) listSnapshotsFromDRSecondarySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSnapshotsFromDRSecondarySlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSnapshotsFromDRSecondarySlotHandleResponse handles the ListSnapshotsFromDRSecondarySlot response. +func (client *WebAppsClient) listSnapshotsFromDRSecondarySlotHandleResponse(resp *http.Response) (WebAppsClientListSnapshotsFromDRSecondarySlotResponse, error) { + result := WebAppsClientListSnapshotsFromDRSecondarySlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotCollection); err != nil { + return WebAppsClientListSnapshotsFromDRSecondarySlotResponse{}, err + } + return result, nil +} + +// NewListSnapshotsSlotPager - Description for Returns all Snapshots to the user. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Website Name. +// - slot - Website Slot. +// - options - WebAppsClientListSnapshotsSlotOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsSlotPager +// method. +func (client *WebAppsClient) NewListSnapshotsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSnapshotsSlotOptions) *runtime.Pager[WebAppsClientListSnapshotsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSnapshotsSlotResponse]{ + More: func(page WebAppsClientListSnapshotsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsSlotResponse) (WebAppsClientListSnapshotsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSnapshotsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSnapshotsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListSnapshotsSlotResponse{}, err + } + return client.listSnapshotsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSnapshotsSlotCreateRequest creates the ListSnapshotsSlot request. +func (client *WebAppsClient) listSnapshotsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSnapshotsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSnapshotsSlotHandleResponse handles the ListSnapshotsSlot response. +func (client *WebAppsClient) listSnapshotsSlotHandleResponse(resp *http.Response) (WebAppsClientListSnapshotsSlotResponse, error) { + result := WebAppsClientListSnapshotsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotCollection); err != nil { + return WebAppsClientListSnapshotsSlotResponse{}, err + } + return result, nil +} + +// ListSyncFunctionTriggers - Description for This is to allow calling via powershell and ARM template. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggers +// method. +func (client *WebAppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSyncFunctionTriggersOptions) (WebAppsClientListSyncFunctionTriggersResponse, error) { + var err error + const operationName = "WebAppsClient.ListSyncFunctionTriggers" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSyncFunctionTriggersCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListSyncFunctionTriggersResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListSyncFunctionTriggersResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSyncFunctionTriggersResponse{}, err + } + resp, err := client.listSyncFunctionTriggersHandleResponse(httpResp) + return resp, err +} + +// listSyncFunctionTriggersCreateRequest creates the ListSyncFunctionTriggers request. +func (client *WebAppsClient) listSyncFunctionTriggersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSyncFunctionTriggersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSyncFunctionTriggersHandleResponse handles the ListSyncFunctionTriggers response. +func (client *WebAppsClient) listSyncFunctionTriggersHandleResponse(resp *http.Response) (WebAppsClientListSyncFunctionTriggersResponse, error) { + result := WebAppsClientListSyncFunctionTriggersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FunctionSecrets); err != nil { + return WebAppsClientListSyncFunctionTriggersResponse{}, err + } + return result, nil +} + +// ListSyncFunctionTriggersSlot - Description for This is to allow calling via powershell and ARM template. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. +// - options - WebAppsClientListSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggersSlot +// method. +func (client *WebAppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSyncFunctionTriggersSlotOptions) (WebAppsClientListSyncFunctionTriggersSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListSyncFunctionTriggersSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSyncFunctionTriggersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListSyncFunctionTriggersSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListSyncFunctionTriggersSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSyncFunctionTriggersSlotResponse{}, err + } + resp, err := client.listSyncFunctionTriggersSlotHandleResponse(httpResp) + return resp, err +} + +// listSyncFunctionTriggersSlotCreateRequest creates the ListSyncFunctionTriggersSlot request. +func (client *WebAppsClient) listSyncFunctionTriggersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSyncFunctionTriggersSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSyncFunctionTriggersSlotHandleResponse handles the ListSyncFunctionTriggersSlot response. +func (client *WebAppsClient) listSyncFunctionTriggersSlotHandleResponse(resp *http.Response) (WebAppsClientListSyncFunctionTriggersSlotResponse, error) { + result := WebAppsClientListSyncFunctionTriggersSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FunctionSecrets); err != nil { + return WebAppsClientListSyncFunctionTriggersSlotResponse{}, err + } + return result, nil +} + +// ListSyncStatus - Description for This is to allow calling via powershell and ARM template. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListSyncStatusOptions contains the optional parameters for the WebAppsClient.ListSyncStatus method. +func (client *WebAppsClient) ListSyncStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSyncStatusOptions) (WebAppsClientListSyncStatusResponse, error) { + var err error + const operationName = "WebAppsClient.ListSyncStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSyncStatusCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListSyncStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListSyncStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSyncStatusResponse{}, err + } + return WebAppsClientListSyncStatusResponse{}, nil +} + +// listSyncStatusCreateRequest creates the ListSyncStatus request. +func (client *WebAppsClient) listSyncStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSyncStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// ListSyncStatusSlot - Description for This is to allow calling via powershell and ARM template. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. +// - options - WebAppsClientListSyncStatusSlotOptions contains the optional parameters for the WebAppsClient.ListSyncStatusSlot +// method. +func (client *WebAppsClient) ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSyncStatusSlotOptions) (WebAppsClientListSyncStatusSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListSyncStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSyncStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListSyncStatusSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListSyncStatusSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSyncStatusSlotResponse{}, err + } + return WebAppsClientListSyncStatusSlotResponse{}, nil +} + +// listSyncStatusSlotCreateRequest creates the ListSyncStatusSlot request. +func (client *WebAppsClient) listSyncStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSyncStatusSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListTriggeredWebJobHistoryPager - Description for List a triggered web job's history for an app, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - options - WebAppsClientListTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobHistoryPager +// method. +func (client *WebAppsClient) NewListTriggeredWebJobHistoryPager(resourceGroupName string, name string, webJobName string, options *WebAppsClientListTriggeredWebJobHistoryOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobHistoryResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListTriggeredWebJobHistoryResponse]{ + More: func(page WebAppsClientListTriggeredWebJobHistoryResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobHistoryResponse) (WebAppsClientListTriggeredWebJobHistoryResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListTriggeredWebJobHistoryPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listTriggeredWebJobHistoryCreateRequest(ctx, resourceGroupName, name, webJobName, options) + }, nil) + if err != nil { + return WebAppsClientListTriggeredWebJobHistoryResponse{}, err + } + return client.listTriggeredWebJobHistoryHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listTriggeredWebJobHistoryCreateRequest creates the ListTriggeredWebJobHistory request. +func (client *WebAppsClient) listTriggeredWebJobHistoryCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientListTriggeredWebJobHistoryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listTriggeredWebJobHistoryHandleResponse handles the ListTriggeredWebJobHistory response. +func (client *WebAppsClient) listTriggeredWebJobHistoryHandleResponse(resp *http.Response) (WebAppsClientListTriggeredWebJobHistoryResponse, error) { + result := WebAppsClientListTriggeredWebJobHistoryResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredJobHistoryCollection); err != nil { + return WebAppsClientListTriggeredWebJobHistoryResponse{}, err + } + return result, nil +} + +// NewListTriggeredWebJobHistorySlotPager - Description for List a triggered web job's history for an app, or a deployment +// slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. +// - options - WebAppsClientListTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobHistorySlotPager +// method. +func (client *WebAppsClient) NewListTriggeredWebJobHistorySlotPager(resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientListTriggeredWebJobHistorySlotOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobHistorySlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListTriggeredWebJobHistorySlotResponse]{ + More: func(page WebAppsClientListTriggeredWebJobHistorySlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobHistorySlotResponse) (WebAppsClientListTriggeredWebJobHistorySlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListTriggeredWebJobHistorySlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listTriggeredWebJobHistorySlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) + }, nil) + if err != nil { + return WebAppsClientListTriggeredWebJobHistorySlotResponse{}, err + } + return client.listTriggeredWebJobHistorySlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listTriggeredWebJobHistorySlotCreateRequest creates the ListTriggeredWebJobHistorySlot request. +func (client *WebAppsClient) listTriggeredWebJobHistorySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientListTriggeredWebJobHistorySlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listTriggeredWebJobHistorySlotHandleResponse handles the ListTriggeredWebJobHistorySlot response. +func (client *WebAppsClient) listTriggeredWebJobHistorySlotHandleResponse(resp *http.Response) (WebAppsClientListTriggeredWebJobHistorySlotResponse, error) { + result := WebAppsClientListTriggeredWebJobHistorySlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredJobHistoryCollection); err != nil { + return WebAppsClientListTriggeredWebJobHistorySlotResponse{}, err + } + return result, nil +} + +// NewListTriggeredWebJobsPager - Description for List triggered web jobs for an app, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - options - WebAppsClientListTriggeredWebJobsOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobsPager +// method. +func (client *WebAppsClient) NewListTriggeredWebJobsPager(resourceGroupName string, name string, options *WebAppsClientListTriggeredWebJobsOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListTriggeredWebJobsResponse]{ + More: func(page WebAppsClientListTriggeredWebJobsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobsResponse) (WebAppsClientListTriggeredWebJobsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListTriggeredWebJobsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listTriggeredWebJobsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListTriggeredWebJobsResponse{}, err + } + return client.listTriggeredWebJobsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listTriggeredWebJobsCreateRequest creates the ListTriggeredWebJobs request. +func (client *WebAppsClient) listTriggeredWebJobsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListTriggeredWebJobsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listTriggeredWebJobsHandleResponse handles the ListTriggeredWebJobs response. +func (client *WebAppsClient) listTriggeredWebJobsHandleResponse(resp *http.Response) (WebAppsClientListTriggeredWebJobsResponse, error) { + result := WebAppsClientListTriggeredWebJobsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredWebJobCollection); err != nil { + return WebAppsClientListTriggeredWebJobsResponse{}, err + } + return result, nil +} + +// NewListTriggeredWebJobsSlotPager - Description for List triggered web jobs for an app, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +// - options - WebAppsClientListTriggeredWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobsSlotPager +// method. +func (client *WebAppsClient) NewListTriggeredWebJobsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListTriggeredWebJobsSlotOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListTriggeredWebJobsSlotResponse]{ + More: func(page WebAppsClientListTriggeredWebJobsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobsSlotResponse) (WebAppsClientListTriggeredWebJobsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListTriggeredWebJobsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listTriggeredWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListTriggeredWebJobsSlotResponse{}, err + } + return client.listTriggeredWebJobsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listTriggeredWebJobsSlotCreateRequest creates the ListTriggeredWebJobsSlot request. +func (client *WebAppsClient) listTriggeredWebJobsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListTriggeredWebJobsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listTriggeredWebJobsSlotHandleResponse handles the ListTriggeredWebJobsSlot response. +func (client *WebAppsClient) listTriggeredWebJobsSlotHandleResponse(resp *http.Response) (WebAppsClientListTriggeredWebJobsSlotResponse, error) { + result := WebAppsClientListTriggeredWebJobsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredWebJobCollection); err != nil { + return WebAppsClientListTriggeredWebJobsSlotResponse{}, err + } + return result, nil +} + +// NewListUsagesPager - Description for Gets the quota usage information of an app (or deployment slot, if specified). +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListUsagesOptions contains the optional parameters for the WebAppsClient.NewListUsagesPager method. +func (client *WebAppsClient) NewListUsagesPager(resourceGroupName string, name string, options *WebAppsClientListUsagesOptions) *runtime.Pager[WebAppsClientListUsagesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListUsagesResponse]{ + More: func(page WebAppsClientListUsagesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListUsagesResponse) (WebAppsClientListUsagesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListUsagesResponse{}, err + } + return client.listUsagesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listUsagesCreateRequest creates the ListUsages request. +func (client *WebAppsClient) listUsagesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListUsagesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listUsagesHandleResponse handles the ListUsages response. +func (client *WebAppsClient) listUsagesHandleResponse(resp *http.Response) (WebAppsClientListUsagesResponse, error) { + result := WebAppsClientListUsagesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { + return WebAppsClientListUsagesResponse{}, err + } + return result, nil +} + +// NewListUsagesSlotPager - Description for Gets the quota usage information of an app (or deployment slot, if specified). +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. +// - options - WebAppsClientListUsagesSlotOptions contains the optional parameters for the WebAppsClient.NewListUsagesSlotPager +// method. +func (client *WebAppsClient) NewListUsagesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListUsagesSlotOptions) *runtime.Pager[WebAppsClientListUsagesSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListUsagesSlotResponse]{ + More: func(page WebAppsClientListUsagesSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListUsagesSlotResponse) (WebAppsClientListUsagesSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListUsagesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listUsagesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListUsagesSlotResponse{}, err + } + return client.listUsagesSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listUsagesSlotCreateRequest creates the ListUsagesSlot request. +func (client *WebAppsClient) listUsagesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListUsagesSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + unencodedParams := []string{req.Raw().URL.RawQuery} + if options != nil && options.Filter != nil { + unencodedParams = append(unencodedParams, "$filter="+*options.Filter) + } + req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listUsagesSlotHandleResponse handles the ListUsagesSlot response. +func (client *WebAppsClient) listUsagesSlotHandleResponse(resp *http.Response) (WebAppsClientListUsagesSlotResponse, error) { + result := WebAppsClientListUsagesSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { + return WebAppsClientListUsagesSlotResponse{}, err + } + return result, nil +} + +// ListVnetConnections - Description for Gets the virtual networks the app (or deployment slot) is connected to. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientListVnetConnectionsOptions contains the optional parameters for the WebAppsClient.ListVnetConnections +// method. +func (client *WebAppsClient) ListVnetConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListVnetConnectionsOptions) (WebAppsClientListVnetConnectionsResponse, error) { + var err error + const operationName = "WebAppsClient.ListVnetConnections" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listVnetConnectionsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListVnetConnectionsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListVnetConnectionsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListVnetConnectionsResponse{}, err + } + resp, err := client.listVnetConnectionsHandleResponse(httpResp) + return resp, err +} + +// listVnetConnectionsCreateRequest creates the ListVnetConnections request. +func (client *WebAppsClient) listVnetConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListVnetConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVnetConnectionsHandleResponse handles the ListVnetConnections response. +func (client *WebAppsClient) listVnetConnectionsHandleResponse(resp *http.Response) (WebAppsClientListVnetConnectionsResponse, error) { + result := WebAppsClientListVnetConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResourceArray); err != nil { + return WebAppsClientListVnetConnectionsResponse{}, err + } + return result, nil +} + +// ListVnetConnectionsSlot - Description for Gets the virtual networks the app (or deployment slot) is connected to. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production +// slot. +// - options - WebAppsClientListVnetConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListVnetConnectionsSlot +// method. +func (client *WebAppsClient) ListVnetConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListVnetConnectionsSlotOptions) (WebAppsClientListVnetConnectionsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListVnetConnectionsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listVnetConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListVnetConnectionsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListVnetConnectionsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListVnetConnectionsSlotResponse{}, err + } + resp, err := client.listVnetConnectionsSlotHandleResponse(httpResp) + return resp, err +} + +// listVnetConnectionsSlotCreateRequest creates the ListVnetConnectionsSlot request. +func (client *WebAppsClient) listVnetConnectionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListVnetConnectionsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVnetConnectionsSlotHandleResponse handles the ListVnetConnectionsSlot response. +func (client *WebAppsClient) listVnetConnectionsSlotHandleResponse(resp *http.Response) (WebAppsClientListVnetConnectionsSlotResponse, error) { + result := WebAppsClientListVnetConnectionsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResourceArray); err != nil { + return WebAppsClientListVnetConnectionsSlotResponse{}, err + } + return result, nil +} + +// NewListWebJobsPager - Description for List webjobs for an app, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - options - WebAppsClientListWebJobsOptions contains the optional parameters for the WebAppsClient.NewListWebJobsPager method. +func (client *WebAppsClient) NewListWebJobsPager(resourceGroupName string, name string, options *WebAppsClientListWebJobsOptions) *runtime.Pager[WebAppsClientListWebJobsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListWebJobsResponse]{ + More: func(page WebAppsClientListWebJobsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListWebJobsResponse) (WebAppsClientListWebJobsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListWebJobsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebJobsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListWebJobsResponse{}, err + } + return client.listWebJobsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWebJobsCreateRequest creates the ListWebJobs request. +func (client *WebAppsClient) listWebJobsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListWebJobsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWebJobsHandleResponse handles the ListWebJobs response. +func (client *WebAppsClient) listWebJobsHandleResponse(resp *http.Response) (WebAppsClientListWebJobsResponse, error) { + result := WebAppsClientListWebJobsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebJobCollection); err != nil { + return WebAppsClientListWebJobsResponse{}, err + } + return result, nil +} + +// NewListWebJobsSlotPager - Description for List webjobs for an app, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +// - options - WebAppsClientListWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListWebJobsSlotPager +// method. +func (client *WebAppsClient) NewListWebJobsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListWebJobsSlotOptions) *runtime.Pager[WebAppsClientListWebJobsSlotResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListWebJobsSlotResponse]{ + More: func(page WebAppsClientListWebJobsSlotResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListWebJobsSlotResponse) (WebAppsClientListWebJobsSlotResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListWebJobsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) + if err != nil { + return WebAppsClientListWebJobsSlotResponse{}, err + } + return client.listWebJobsSlotHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWebJobsSlotCreateRequest creates the ListWebJobsSlot request. +func (client *WebAppsClient) listWebJobsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListWebJobsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWebJobsSlotHandleResponse handles the ListWebJobsSlot response. +func (client *WebAppsClient) listWebJobsSlotHandleResponse(resp *http.Response) (WebAppsClientListWebJobsSlotResponse, error) { + result := WebAppsClientListWebJobsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebJobCollection); err != nil { + return WebAppsClientListWebJobsSlotResponse{}, err + } + return result, nil +} + +// NewListWorkflowsPager - List the workflows for a web site, or a deployment slot. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - options - WebAppsClientListWorkflowsOptions contains the optional parameters for the WebAppsClient.NewListWorkflowsPager +// method. +func (client *WebAppsClient) NewListWorkflowsPager(resourceGroupName string, name string, options *WebAppsClientListWorkflowsOptions) *runtime.Pager[WebAppsClientListWorkflowsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebAppsClientListWorkflowsResponse]{ + More: func(page WebAppsClientListWorkflowsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebAppsClientListWorkflowsResponse) (WebAppsClientListWorkflowsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListWorkflowsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWorkflowsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) + if err != nil { + return WebAppsClientListWorkflowsResponse{}, err + } + return client.listWorkflowsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listWorkflowsCreateRequest creates the ListWorkflows request. +func (client *WebAppsClient) listWorkflowsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListWorkflowsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWorkflowsHandleResponse handles the ListWorkflows response. +func (client *WebAppsClient) listWorkflowsHandleResponse(resp *http.Response) (WebAppsClientListWorkflowsResponse, error) { + result := WebAppsClientListWorkflowsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelopeCollection); err != nil { + return WebAppsClientListWorkflowsResponse{}, err + } + return result, nil +} + +// ListWorkflowsConnections - Lists logic app's connections for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - options - WebAppsClientListWorkflowsConnectionsOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnections +// method. +func (client *WebAppsClient) ListWorkflowsConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListWorkflowsConnectionsOptions) (WebAppsClientListWorkflowsConnectionsResponse, error) { + var err error + const operationName = "WebAppsClient.ListWorkflowsConnections" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listWorkflowsConnectionsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientListWorkflowsConnectionsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListWorkflowsConnectionsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListWorkflowsConnectionsResponse{}, err + } + resp, err := client.listWorkflowsConnectionsHandleResponse(httpResp) + return resp, err +} + +// listWorkflowsConnectionsCreateRequest creates the ListWorkflowsConnections request. +func (client *WebAppsClient) listWorkflowsConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListWorkflowsConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listWorkflowsConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWorkflowsConnectionsHandleResponse handles the ListWorkflowsConnections response. +func (client *WebAppsClient) listWorkflowsConnectionsHandleResponse(resp *http.Response) (WebAppsClientListWorkflowsConnectionsResponse, error) { + result := WebAppsClientListWorkflowsConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelope); err != nil { + return WebAppsClientListWorkflowsConnectionsResponse{}, err + } + return result, nil +} + +// ListWorkflowsConnectionsSlot - Lists logic app's connections for web site, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - slot - Name of the deployment slot. +// - options - WebAppsClientListWorkflowsConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnectionsSlot +// method. +func (client *WebAppsClient) ListWorkflowsConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListWorkflowsConnectionsSlotOptions) (WebAppsClientListWorkflowsConnectionsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListWorkflowsConnectionsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listWorkflowsConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientListWorkflowsConnectionsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientListWorkflowsConnectionsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListWorkflowsConnectionsSlotResponse{}, err + } + resp, err := client.listWorkflowsConnectionsSlotHandleResponse(httpResp) + return resp, err +} + +// listWorkflowsConnectionsSlotCreateRequest creates the ListWorkflowsConnectionsSlot request. +func (client *WebAppsClient) listWorkflowsConnectionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListWorkflowsConnectionsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listWorkflowsConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listWorkflowsConnectionsSlotHandleResponse handles the ListWorkflowsConnectionsSlot response. +func (client *WebAppsClient) listWorkflowsConnectionsSlotHandleResponse(resp *http.Response) (WebAppsClientListWorkflowsConnectionsSlotResponse, error) { + result := WebAppsClientListWorkflowsConnectionsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowEnvelope); err != nil { + return WebAppsClientListWorkflowsConnectionsSlotResponse{}, err + } + return result, nil +} + +// BeginMigrateMySQL - Description for Migrates a local (in-app) MySql database to a remote MySql database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - migrationRequestEnvelope - MySql migration options. +// - options - WebAppsClientBeginMigrateMySQLOptions contains the optional parameters for the WebAppsClient.BeginMigrateMySQL +// method. +func (client *WebAppsClient) BeginMigrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest, options *WebAppsClientBeginMigrateMySQLOptions) (*runtime.Poller[WebAppsClientMigrateMySQLResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrateMySQL(ctx, resourceGroupName, name, migrationRequestEnvelope, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientMigrateMySQLResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientMigrateMySQLResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// MigrateMySQL - Description for Migrates a local (in-app) MySql database to a remote MySql database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) migrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest, options *WebAppsClientBeginMigrateMySQLOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginMigrateMySQL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateMySQLCreateRequest(ctx, resourceGroupName, name, migrationRequestEnvelope, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrateMySQLCreateRequest creates the MigrateMySQL request. +func (client *WebAppsClient) migrateMySQLCreateRequest(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest, options *WebAppsClientBeginMigrateMySQLOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, migrationRequestEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// BeginMigrateStorage - Description for Restores a web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - subscriptionName - Azure subscription. +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - migrationOptions - Migration migrationOptions. +// - options - WebAppsClientBeginMigrateStorageOptions contains the optional parameters for the WebAppsClient.BeginMigrateStorage +// method. +func (client *WebAppsClient) BeginMigrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions, options *WebAppsClientBeginMigrateStorageOptions) (*runtime.Poller[WebAppsClientMigrateStorageResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrateStorage(ctx, subscriptionName, resourceGroupName, name, migrationOptions, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientMigrateStorageResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientMigrateStorageResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// MigrateStorage - Description for Restores a web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) migrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions, options *WebAppsClientBeginMigrateStorageOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginMigrateStorage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateStorageCreateRequest(ctx, subscriptionName, resourceGroupName, name, migrationOptions, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrateStorageCreateRequest creates the MigrateStorage request. +func (client *WebAppsClient) migrateStorageCreateRequest(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions, options *WebAppsClientBeginMigrateStorageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + reqQP.Set("subscriptionName", subscriptionName) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, migrationOptions); err != nil { + return nil, err + } + return req, nil +} + +// PutPrivateAccessVnet - Description for Sets data around private site access enablement and authorized Virtual Networks +// that can access the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - access - The information for the private access +// - options - WebAppsClientPutPrivateAccessVnetOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnet +// method. +func (client *WebAppsClient) PutPrivateAccessVnet(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, options *WebAppsClientPutPrivateAccessVnetOptions) (WebAppsClientPutPrivateAccessVnetResponse, error) { + var err error + const operationName = "WebAppsClient.PutPrivateAccessVnet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.putPrivateAccessVnetCreateRequest(ctx, resourceGroupName, name, access, options) + if err != nil { + return WebAppsClientPutPrivateAccessVnetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientPutPrivateAccessVnetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientPutPrivateAccessVnetResponse{}, err + } + resp, err := client.putPrivateAccessVnetHandleResponse(httpResp) + return resp, err +} + +// putPrivateAccessVnetCreateRequest creates the PutPrivateAccessVnet request. +func (client *WebAppsClient) putPrivateAccessVnetCreateRequest(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, options *WebAppsClientPutPrivateAccessVnetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, access); err != nil { + return nil, err + } + return req, nil +} + +// putPrivateAccessVnetHandleResponse handles the PutPrivateAccessVnet response. +func (client *WebAppsClient) putPrivateAccessVnetHandleResponse(resp *http.Response) (WebAppsClientPutPrivateAccessVnetResponse, error) { + result := WebAppsClientPutPrivateAccessVnetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateAccess); err != nil { + return WebAppsClientPutPrivateAccessVnetResponse{}, err + } + return result, nil +} + +// PutPrivateAccessVnetSlot - Description for Sets data around private site access enablement and authorized Virtual Networks +// that can access the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - slot - The name of the slot for the web app. +// - access - The information for the private access +// - options - WebAppsClientPutPrivateAccessVnetSlotOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnetSlot +// method. +func (client *WebAppsClient) PutPrivateAccessVnetSlot(ctx context.Context, resourceGroupName string, name string, slot string, access PrivateAccess, options *WebAppsClientPutPrivateAccessVnetSlotOptions) (WebAppsClientPutPrivateAccessVnetSlotResponse, error) { + var err error + const operationName = "WebAppsClient.PutPrivateAccessVnetSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.putPrivateAccessVnetSlotCreateRequest(ctx, resourceGroupName, name, slot, access, options) + if err != nil { + return WebAppsClientPutPrivateAccessVnetSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientPutPrivateAccessVnetSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientPutPrivateAccessVnetSlotResponse{}, err + } + resp, err := client.putPrivateAccessVnetSlotHandleResponse(httpResp) + return resp, err +} + +// putPrivateAccessVnetSlotCreateRequest creates the PutPrivateAccessVnetSlot request. +func (client *WebAppsClient) putPrivateAccessVnetSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, access PrivateAccess, options *WebAppsClientPutPrivateAccessVnetSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, access); err != nil { + return nil, err + } + return req, nil +} + +// putPrivateAccessVnetSlotHandleResponse handles the PutPrivateAccessVnetSlot response. +func (client *WebAppsClient) putPrivateAccessVnetSlotHandleResponse(resp *http.Response) (WebAppsClientPutPrivateAccessVnetSlotResponse, error) { + result := WebAppsClientPutPrivateAccessVnetSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateAccess); err != nil { + return WebAppsClientPutPrivateAccessVnetSlotResponse{}, err + } + return result, nil +} + +// RecoverSiteConfigurationSnapshot - Description for Reverts the configuration of an app to a previous snapshot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - snapshotID - The ID of the snapshot to read. +// - options - WebAppsClientRecoverSiteConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshot +// method. +func (client *WebAppsClient) RecoverSiteConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *WebAppsClientRecoverSiteConfigurationSnapshotOptions) (WebAppsClientRecoverSiteConfigurationSnapshotResponse, error) { + var err error + const operationName = "WebAppsClient.RecoverSiteConfigurationSnapshot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.recoverSiteConfigurationSnapshotCreateRequest(ctx, resourceGroupName, name, snapshotID, options) + if err != nil { + return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, err + } + return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, nil +} + +// recoverSiteConfigurationSnapshotCreateRequest creates the RecoverSiteConfigurationSnapshot request. +func (client *WebAppsClient) recoverSiteConfigurationSnapshotCreateRequest(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *WebAppsClientRecoverSiteConfigurationSnapshotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if snapshotID == "" { + return nil, errors.New("parameter snapshotID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotId}", url.PathEscape(snapshotID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// RecoverSiteConfigurationSnapshotSlot - Description for Reverts the configuration of an app to a previous snapshot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - snapshotID - The ID of the snapshot to read. +// - slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. +// - options - WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshotSlot +// method. +func (client *WebAppsClient) RecoverSiteConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions) (WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse, error) { + var err error + const operationName = "WebAppsClient.RecoverSiteConfigurationSnapshotSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.recoverSiteConfigurationSnapshotSlotCreateRequest(ctx, resourceGroupName, name, snapshotID, slot, options) + if err != nil { + return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, err + } + return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, nil +} + +// recoverSiteConfigurationSnapshotSlotCreateRequest creates the RecoverSiteConfigurationSnapshotSlot request. +func (client *WebAppsClient) recoverSiteConfigurationSnapshotSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if snapshotID == "" { + return nil, errors.New("parameter snapshotID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotId}", url.PathEscape(snapshotID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// ResetProductionSlotConfig - Description for Resets the configuration settings of the current slot if they were previously +// modified by calling the API with POST. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientResetProductionSlotConfigOptions contains the optional parameters for the WebAppsClient.ResetProductionSlotConfig +// method. +func (client *WebAppsClient) ResetProductionSlotConfig(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientResetProductionSlotConfigOptions) (WebAppsClientResetProductionSlotConfigResponse, error) { + var err error + const operationName = "WebAppsClient.ResetProductionSlotConfig" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetProductionSlotConfigCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientResetProductionSlotConfigResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientResetProductionSlotConfigResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientResetProductionSlotConfigResponse{}, err + } + return WebAppsClientResetProductionSlotConfigResponse{}, nil +} + +// resetProductionSlotConfigCreateRequest creates the ResetProductionSlotConfig request. +func (client *WebAppsClient) resetProductionSlotConfigCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientResetProductionSlotConfigOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// ResetSlotConfigurationSlot - Description for Resets the configuration settings of the current slot if they were previously +// modified by calling the API with POST. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production +// slot. +// - options - WebAppsClientResetSlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ResetSlotConfigurationSlot +// method. +func (client *WebAppsClient) ResetSlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientResetSlotConfigurationSlotOptions) (WebAppsClientResetSlotConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ResetSlotConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetSlotConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientResetSlotConfigurationSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientResetSlotConfigurationSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientResetSlotConfigurationSlotResponse{}, err + } + return WebAppsClientResetSlotConfigurationSlotResponse{}, nil +} + +// resetSlotConfigurationSlotCreateRequest creates the ResetSlotConfigurationSlot request. +func (client *WebAppsClient) resetSlotConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientResetSlotConfigurationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Restart - Description for Restarts an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientRestartOptions contains the optional parameters for the WebAppsClient.Restart method. +func (client *WebAppsClient) Restart(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientRestartOptions) (WebAppsClientRestartResponse, error) { + var err error + const operationName = "WebAppsClient.Restart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restartCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientRestartResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientRestartResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRestartResponse{}, err + } + return WebAppsClientRestartResponse{}, nil +} + +// restartCreateRequest creates the Restart request. +func (client *WebAppsClient) restartCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientRestartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.SoftRestart != nil { + reqQP.Set("softRestart", strconv.FormatBool(*options.SoftRestart)) + } + if options != nil && options.Synchronous != nil { + reqQP.Set("synchronous", strconv.FormatBool(*options.Synchronous)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// RestartSlot - Description for Restarts an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will restart the production slot. +// - options - WebAppsClientRestartSlotOptions contains the optional parameters for the WebAppsClient.RestartSlot method. +func (client *WebAppsClient) RestartSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientRestartSlotOptions) (WebAppsClientRestartSlotResponse, error) { + var err error + const operationName = "WebAppsClient.RestartSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restartSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientRestartSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientRestartSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRestartSlotResponse{}, err + } + return WebAppsClientRestartSlotResponse{}, nil +} + +// restartSlotCreateRequest creates the RestartSlot request. +func (client *WebAppsClient) restartSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientRestartSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.SoftRestart != nil { + reqQP.Set("softRestart", strconv.FormatBool(*options.SoftRestart)) + } + if options != nil && options.Synchronous != nil { + reqQP.Set("synchronous", strconv.FormatBool(*options.Synchronous)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginRestore - Description for Restores a specific backup to another app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - backupID - ID of the backup. +// - request - Information on restore request . +// - options - WebAppsClientBeginRestoreOptions contains the optional parameters for the WebAppsClient.BeginRestore method. +func (client *WebAppsClient) BeginRestore(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, options *WebAppsClientBeginRestoreOptions) (*runtime.Poller[WebAppsClientRestoreResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restore(ctx, resourceGroupName, name, backupID, request, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Restore - Description for Restores a specific backup to another app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) restore(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, options *WebAppsClientBeginRestoreOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestore" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreCreateRequest(ctx, resourceGroupName, name, backupID, request, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreCreateRequest creates the Restore request. +func (client *WebAppsClient) restoreCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, options *WebAppsClientBeginRestoreOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if backupID == "" { + return nil, errors.New("parameter backupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// BeginRestoreFromBackupBlob - Description for Restores an app from a backup blob in Azure Storage. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - request - Information on restore request . +// - options - WebAppsClientBeginRestoreFromBackupBlobOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlob +// method. +func (client *WebAppsClient) BeginRestoreFromBackupBlob(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobOptions) (*runtime.Poller[WebAppsClientRestoreFromBackupBlobResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restoreFromBackupBlob(ctx, resourceGroupName, name, request, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreFromBackupBlobResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreFromBackupBlobResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RestoreFromBackupBlob - Description for Restores an app from a backup blob in Azure Storage. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) restoreFromBackupBlob(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreFromBackupBlob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreFromBackupBlobCreateRequest(ctx, resourceGroupName, name, request, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreFromBackupBlobCreateRequest creates the RestoreFromBackupBlob request. +func (client *WebAppsClient) restoreFromBackupBlobCreateRequest(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// BeginRestoreFromBackupBlobSlot - Description for Restores an app from a backup blob in Azure Storage. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. +// - request - Information on restore request . +// - options - WebAppsClientBeginRestoreFromBackupBlobSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlobSlot +// method. +func (client *WebAppsClient) BeginRestoreFromBackupBlobSlot(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobSlotOptions) (*runtime.Poller[WebAppsClientRestoreFromBackupBlobSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restoreFromBackupBlobSlot(ctx, resourceGroupName, name, slot, request, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreFromBackupBlobSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreFromBackupBlobSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RestoreFromBackupBlobSlot - Description for Restores an app from a backup blob in Azure Storage. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) restoreFromBackupBlobSlot(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreFromBackupBlobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreFromBackupBlobSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreFromBackupBlobSlotCreateRequest creates the RestoreFromBackupBlobSlot request. +func (client *WebAppsClient) restoreFromBackupBlobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// BeginRestoreFromDeletedApp - Description for Restores a deleted web app to this web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - restoreRequest - Deleted web app restore information. +// - options - WebAppsClientBeginRestoreFromDeletedAppOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedApp +// method. +func (client *WebAppsClient) BeginRestoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppOptions) (*runtime.Poller[WebAppsClientRestoreFromDeletedAppResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restoreFromDeletedApp(ctx, resourceGroupName, name, restoreRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreFromDeletedAppResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreFromDeletedAppResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RestoreFromDeletedApp - Description for Restores a deleted web app to this web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) restoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreFromDeletedApp" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreFromDeletedAppCreateRequest(ctx, resourceGroupName, name, restoreRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreFromDeletedAppCreateRequest creates the RestoreFromDeletedApp request. +func (client *WebAppsClient) restoreFromDeletedAppCreateRequest(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, restoreRequest); err != nil { + return nil, err + } + return req, nil +} + +// BeginRestoreFromDeletedAppSlot - Description for Restores a deleted web app to this web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - restoreRequest - Deleted web app restore information. +// - options - WebAppsClientBeginRestoreFromDeletedAppSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedAppSlot +// method. +func (client *WebAppsClient) BeginRestoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppSlotOptions) (*runtime.Poller[WebAppsClientRestoreFromDeletedAppSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restoreFromDeletedAppSlot(ctx, resourceGroupName, name, slot, restoreRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreFromDeletedAppSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreFromDeletedAppSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RestoreFromDeletedAppSlot - Description for Restores a deleted web app to this web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) restoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreFromDeletedAppSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreFromDeletedAppSlotCreateRequest(ctx, resourceGroupName, name, slot, restoreRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreFromDeletedAppSlotCreateRequest creates the RestoreFromDeletedAppSlot request. +func (client *WebAppsClient) restoreFromDeletedAppSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, restoreRequest); err != nil { + return nil, err + } + return req, nil +} + +// BeginRestoreSlot - Description for Restores a specific backup to another app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - backupID - ID of the backup. +// - slot - Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. +// - request - Information on restore request . +// - options - WebAppsClientBeginRestoreSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSlot +// method. +func (client *WebAppsClient) BeginRestoreSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreSlotOptions) (*runtime.Poller[WebAppsClientRestoreSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restoreSlot(ctx, resourceGroupName, name, backupID, slot, request, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RestoreSlot - Description for Restores a specific backup to another app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) restoreSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, request, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreSlotCreateRequest creates the RestoreSlot request. +func (client *WebAppsClient) restoreSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if backupID == "" { + return nil, errors.New("parameter backupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// BeginRestoreSnapshot - Description for Restores a web app from a snapshot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - restoreRequest - Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots +// API. +// - options - WebAppsClientBeginRestoreSnapshotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshot +// method. +func (client *WebAppsClient) BeginRestoreSnapshot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotOptions) (*runtime.Poller[WebAppsClientRestoreSnapshotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restoreSnapshot(ctx, resourceGroupName, name, restoreRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreSnapshotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreSnapshotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RestoreSnapshot - Description for Restores a web app from a snapshot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) restoreSnapshot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreSnapshot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreSnapshotCreateRequest(ctx, resourceGroupName, name, restoreRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreSnapshotCreateRequest creates the RestoreSnapshot request. +func (client *WebAppsClient) restoreSnapshotCreateRequest(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, restoreRequest); err != nil { + return nil, err + } + return req, nil +} + +// BeginRestoreSnapshotSlot - Description for Restores a web app from a snapshot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - restoreRequest - Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots +// API. +// - options - WebAppsClientBeginRestoreSnapshotSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshotSlot +// method. +func (client *WebAppsClient) BeginRestoreSnapshotSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotSlotOptions) (*runtime.Poller[WebAppsClientRestoreSnapshotSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restoreSnapshotSlot(ctx, resourceGroupName, name, slot, restoreRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreSnapshotSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreSnapshotSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RestoreSnapshotSlot - Description for Restores a web app from a snapshot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) restoreSnapshotSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreSnapshotSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreSnapshotSlotCreateRequest(ctx, resourceGroupName, name, slot, restoreRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreSnapshotSlotCreateRequest creates the RestoreSnapshotSlot request. +func (client *WebAppsClient) restoreSnapshotSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, restoreRequest); err != nil { + return nil, err + } + return req, nil +} + +// RunTriggeredWebJob - Description for Run a triggered web job for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - options - WebAppsClientRunTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJob +// method. +func (client *WebAppsClient) RunTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientRunTriggeredWebJobOptions) (WebAppsClientRunTriggeredWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.RunTriggeredWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.runTriggeredWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) + if err != nil { + return WebAppsClientRunTriggeredWebJobResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientRunTriggeredWebJobResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRunTriggeredWebJobResponse{}, err + } + return WebAppsClientRunTriggeredWebJobResponse{}, nil +} + +// runTriggeredWebJobCreateRequest creates the RunTriggeredWebJob request. +func (client *WebAppsClient) runTriggeredWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientRunTriggeredWebJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// RunTriggeredWebJobSlot - Description for Run a triggered web job for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. +// - options - WebAppsClientRunTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJobSlot +// method. +func (client *WebAppsClient) RunTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientRunTriggeredWebJobSlotOptions) (WebAppsClientRunTriggeredWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.RunTriggeredWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.runTriggeredWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) + if err != nil { + return WebAppsClientRunTriggeredWebJobSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientRunTriggeredWebJobSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRunTriggeredWebJobSlotResponse{}, err + } + return WebAppsClientRunTriggeredWebJobSlotResponse{}, nil +} + +// runTriggeredWebJobSlotCreateRequest creates the RunTriggeredWebJobSlot request. +func (client *WebAppsClient) runTriggeredWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientRunTriggeredWebJobSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Start - Description for Starts an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientStartOptions contains the optional parameters for the WebAppsClient.Start method. +func (client *WebAppsClient) Start(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStartOptions) (WebAppsClientStartResponse, error) { + var err error + const operationName = "WebAppsClient.Start" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientStartResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStartResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartResponse{}, err + } + return WebAppsClientStartResponse{}, nil +} + +// startCreateRequest creates the Start request. +func (client *WebAppsClient) startCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StartContinuousWebJob - Description for Start a continuous web job for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - options - WebAppsClientStartContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJob +// method. +func (client *WebAppsClient) StartContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientStartContinuousWebJobOptions) (WebAppsClientStartContinuousWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.StartContinuousWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) + if err != nil { + return WebAppsClientStartContinuousWebJobResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStartContinuousWebJobResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartContinuousWebJobResponse{}, err + } + return WebAppsClientStartContinuousWebJobResponse{}, nil +} + +// startContinuousWebJobCreateRequest creates the StartContinuousWebJob request. +func (client *WebAppsClient) startContinuousWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientStartContinuousWebJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StartContinuousWebJobSlot - Description for Start a continuous web job for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +// - options - WebAppsClientStartContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJobSlot +// method. +func (client *WebAppsClient) StartContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientStartContinuousWebJobSlotOptions) (WebAppsClientStartContinuousWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StartContinuousWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) + if err != nil { + return WebAppsClientStartContinuousWebJobSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStartContinuousWebJobSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartContinuousWebJobSlotResponse{}, err + } + return WebAppsClientStartContinuousWebJobSlotResponse{}, nil +} + +// startContinuousWebJobSlotCreateRequest creates the StartContinuousWebJobSlot request. +func (client *WebAppsClient) startContinuousWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientStartContinuousWebJobSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStartNetworkTrace - Description for Start capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - options - WebAppsClientBeginStartNetworkTraceOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTrace +// method. +func (client *WebAppsClient) BeginStartNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartNetworkTraceOptions) (*runtime.Poller[WebAppsClientStartNetworkTraceResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startNetworkTrace(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientStartNetworkTraceResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientStartNetworkTraceResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartNetworkTrace - Description for Start capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) startNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartNetworkTraceOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginStartNetworkTrace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startNetworkTraceCreateRequest creates the StartNetworkTrace request. +func (client *WebAppsClient) startNetworkTraceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartNetworkTraceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.DurationInSeconds != nil { + reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) + } + if options != nil && options.MaxFrameLength != nil { + reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) + } + if options != nil && options.SasURL != nil { + reqQP.Set("sasUrl", *options.SasURL) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStartNetworkTraceSlot - Description for Start capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - slot - The name of the slot for this web app. +// - options - WebAppsClientBeginStartNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTraceSlot +// method. +func (client *WebAppsClient) BeginStartNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartNetworkTraceSlotOptions) (*runtime.Poller[WebAppsClientStartNetworkTraceSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startNetworkTraceSlot(ctx, resourceGroupName, name, slot, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientStartNetworkTraceSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientStartNetworkTraceSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartNetworkTraceSlot - Description for Start capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) startNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartNetworkTraceSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginStartNetworkTraceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startNetworkTraceSlotCreateRequest creates the StartNetworkTraceSlot request. +func (client *WebAppsClient) startNetworkTraceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartNetworkTraceSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.DurationInSeconds != nil { + reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) + } + if options != nil && options.MaxFrameLength != nil { + reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) + } + if options != nil && options.SasURL != nil { + reqQP.Set("sasUrl", *options.SasURL) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StartSlot - Description for Starts an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will start the production slot. +// - options - WebAppsClientStartSlotOptions contains the optional parameters for the WebAppsClient.StartSlot method. +func (client *WebAppsClient) StartSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStartSlotOptions) (WebAppsClientStartSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StartSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientStartSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStartSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartSlotResponse{}, err + } + return WebAppsClientStartSlotResponse{}, nil +} + +// startSlotCreateRequest creates the StartSlot request. +func (client *WebAppsClient) startSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStartSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StartWebSiteNetworkTrace - Description for Start capturing network packets for the site (To be deprecated). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - options - WebAppsClientStartWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTrace +// method. +func (client *WebAppsClient) StartWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStartWebSiteNetworkTraceOptions) (WebAppsClientStartWebSiteNetworkTraceResponse, error) { + var err error + const operationName = "WebAppsClient.StartWebSiteNetworkTrace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startWebSiteNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientStartWebSiteNetworkTraceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStartWebSiteNetworkTraceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartWebSiteNetworkTraceResponse{}, err + } + resp, err := client.startWebSiteNetworkTraceHandleResponse(httpResp) + return resp, err +} + +// startWebSiteNetworkTraceCreateRequest creates the StartWebSiteNetworkTrace request. +func (client *WebAppsClient) startWebSiteNetworkTraceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStartWebSiteNetworkTraceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.DurationInSeconds != nil { + reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) + } + if options != nil && options.MaxFrameLength != nil { + reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) + } + if options != nil && options.SasURL != nil { + reqQP.Set("sasUrl", *options.SasURL) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// startWebSiteNetworkTraceHandleResponse handles the StartWebSiteNetworkTrace response. +func (client *WebAppsClient) startWebSiteNetworkTraceHandleResponse(resp *http.Response) (WebAppsClientStartWebSiteNetworkTraceResponse, error) { + result := WebAppsClientStartWebSiteNetworkTraceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { + return WebAppsClientStartWebSiteNetworkTraceResponse{}, err + } + return result, nil +} + +// BeginStartWebSiteNetworkTraceOperation - Description for Start capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - options - WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperation +// method. +func (client *WebAppsClient) BeginStartWebSiteNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions) (*runtime.Poller[WebAppsClientStartWebSiteNetworkTraceOperationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startWebSiteNetworkTraceOperation(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientStartWebSiteNetworkTraceOperationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientStartWebSiteNetworkTraceOperationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartWebSiteNetworkTraceOperation - Description for Start capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) startWebSiteNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginStartWebSiteNetworkTraceOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startWebSiteNetworkTraceOperationCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startWebSiteNetworkTraceOperationCreateRequest creates the StartWebSiteNetworkTraceOperation request. +func (client *WebAppsClient) startWebSiteNetworkTraceOperationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.DurationInSeconds != nil { + reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) + } + if options != nil && options.MaxFrameLength != nil { + reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) + } + if options != nil && options.SasURL != nil { + reqQP.Set("sasUrl", *options.SasURL) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStartWebSiteNetworkTraceOperationSlot - Description for Start capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - slot - The name of the slot for this web app. +// - options - WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot +// method. +func (client *WebAppsClient) BeginStartWebSiteNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions) (*runtime.Poller[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startWebSiteNetworkTraceOperationSlot(ctx, resourceGroupName, name, slot, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartWebSiteNetworkTraceOperationSlot - Description for Start capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startWebSiteNetworkTraceOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startWebSiteNetworkTraceOperationSlotCreateRequest creates the StartWebSiteNetworkTraceOperationSlot request. +func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.DurationInSeconds != nil { + reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) + } + if options != nil && options.MaxFrameLength != nil { + reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) + } + if options != nil && options.SasURL != nil { + reqQP.Set("sasUrl", *options.SasURL) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StartWebSiteNetworkTraceSlot - Description for Start capturing network packets for the site (To be deprecated). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - slot - The name of the slot for this web app. +// - options - WebAppsClientStartWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTraceSlot +// method. +func (client *WebAppsClient) StartWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStartWebSiteNetworkTraceSlotOptions) (WebAppsClientStartWebSiteNetworkTraceSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StartWebSiteNetworkTraceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startWebSiteNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, err + } + resp, err := client.startWebSiteNetworkTraceSlotHandleResponse(httpResp) + return resp, err +} + +// startWebSiteNetworkTraceSlotCreateRequest creates the StartWebSiteNetworkTraceSlot request. +func (client *WebAppsClient) startWebSiteNetworkTraceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStartWebSiteNetworkTraceSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.DurationInSeconds != nil { + reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) + } + if options != nil && options.MaxFrameLength != nil { + reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) + } + if options != nil && options.SasURL != nil { + reqQP.Set("sasUrl", *options.SasURL) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// startWebSiteNetworkTraceSlotHandleResponse handles the StartWebSiteNetworkTraceSlot response. +func (client *WebAppsClient) startWebSiteNetworkTraceSlotHandleResponse(resp *http.Response) (WebAppsClientStartWebSiteNetworkTraceSlotResponse, error) { + result := WebAppsClientStartWebSiteNetworkTraceSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { + return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, err + } + return result, nil +} + +// Stop - Description for Stops an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientStopOptions contains the optional parameters for the WebAppsClient.Stop method. +func (client *WebAppsClient) Stop(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopOptions) (WebAppsClientStopResponse, error) { + var err error + const operationName = "WebAppsClient.Stop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientStopResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStopResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopResponse{}, err + } + return WebAppsClientStopResponse{}, nil +} + +// stopCreateRequest creates the Stop request. +func (client *WebAppsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StopContinuousWebJob - Description for Stop a continuous web job for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - options - WebAppsClientStopContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJob +// method. +func (client *WebAppsClient) StopContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientStopContinuousWebJobOptions) (WebAppsClientStopContinuousWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.StopContinuousWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) + if err != nil { + return WebAppsClientStopContinuousWebJobResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStopContinuousWebJobResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopContinuousWebJobResponse{}, err + } + return WebAppsClientStopContinuousWebJobResponse{}, nil +} + +// stopContinuousWebJobCreateRequest creates the StopContinuousWebJob request. +func (client *WebAppsClient) stopContinuousWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientStopContinuousWebJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StopContinuousWebJobSlot - Description for Stop a continuous web job for an app, or a deployment slot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - webJobName - Name of Web Job. +// - slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +// - options - WebAppsClientStopContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJobSlot +// method. +func (client *WebAppsClient) StopContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientStopContinuousWebJobSlotOptions) (WebAppsClientStopContinuousWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StopContinuousWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) + if err != nil { + return WebAppsClientStopContinuousWebJobSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStopContinuousWebJobSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopContinuousWebJobSlotResponse{}, err + } + return WebAppsClientStopContinuousWebJobSlotResponse{}, nil +} + +// stopContinuousWebJobSlotCreateRequest creates the StopContinuousWebJobSlot request. +func (client *WebAppsClient) stopContinuousWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientStopContinuousWebJobSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if webJobName == "" { + return nil, errors.New("parameter webJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StopNetworkTrace - Description for Stop ongoing capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - options - WebAppsClientStopNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopNetworkTrace +// method. +func (client *WebAppsClient) StopNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopNetworkTraceOptions) (WebAppsClientStopNetworkTraceResponse, error) { + var err error + const operationName = "WebAppsClient.StopNetworkTrace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientStopNetworkTraceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStopNetworkTraceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopNetworkTraceResponse{}, err + } + return WebAppsClientStopNetworkTraceResponse{}, nil +} + +// stopNetworkTraceCreateRequest creates the StopNetworkTrace request. +func (client *WebAppsClient) stopNetworkTraceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopNetworkTraceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StopNetworkTraceSlot - Description for Stop ongoing capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - slot - The name of the slot for this web app. +// - options - WebAppsClientStopNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopNetworkTraceSlot +// method. +func (client *WebAppsClient) StopNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopNetworkTraceSlotOptions) (WebAppsClientStopNetworkTraceSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StopNetworkTraceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientStopNetworkTraceSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStopNetworkTraceSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopNetworkTraceSlotResponse{}, err + } + return WebAppsClientStopNetworkTraceSlotResponse{}, nil +} + +// stopNetworkTraceSlotCreateRequest creates the StopNetworkTraceSlot request. +func (client *WebAppsClient) stopNetworkTraceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopNetworkTraceSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StopSlot - Description for Stops an app (or deployment slot, if specified). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will stop the production slot. +// - options - WebAppsClientStopSlotOptions contains the optional parameters for the WebAppsClient.StopSlot method. +func (client *WebAppsClient) StopSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopSlotOptions) (WebAppsClientStopSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StopSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientStopSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStopSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopSlotResponse{}, err + } + return WebAppsClientStopSlotResponse{}, nil +} + +// stopSlotCreateRequest creates the StopSlot request. +func (client *WebAppsClient) stopSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StopWebSiteNetworkTrace - Description for Stop ongoing capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - options - WebAppsClientStopWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTrace +// method. +func (client *WebAppsClient) StopWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopWebSiteNetworkTraceOptions) (WebAppsClientStopWebSiteNetworkTraceResponse, error) { + var err error + const operationName = "WebAppsClient.StopWebSiteNetworkTrace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopWebSiteNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientStopWebSiteNetworkTraceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStopWebSiteNetworkTraceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopWebSiteNetworkTraceResponse{}, err + } + return WebAppsClientStopWebSiteNetworkTraceResponse{}, nil +} + +// stopWebSiteNetworkTraceCreateRequest creates the StopWebSiteNetworkTrace request. +func (client *WebAppsClient) stopWebSiteNetworkTraceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopWebSiteNetworkTraceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// StopWebSiteNetworkTraceSlot - Description for Stop ongoing capturing network packets for the site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - slot - The name of the slot for this web app. +// - options - WebAppsClientStopWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTraceSlot +// method. +func (client *WebAppsClient) StopWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopWebSiteNetworkTraceSlotOptions) (WebAppsClientStopWebSiteNetworkTraceSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StopWebSiteNetworkTraceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopWebSiteNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, err + } + return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, nil +} + +// stopWebSiteNetworkTraceSlotCreateRequest creates the StopWebSiteNetworkTraceSlot request. +func (client *WebAppsClient) stopWebSiteNetworkTraceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopWebSiteNetworkTraceSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginSwapSlot - Description for Swaps two deployment slots of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. +// - slotSwapEntity - JSON object that contains the target slot name. See example. +// - options - WebAppsClientBeginSwapSlotOptions contains the optional parameters for the WebAppsClient.BeginSwapSlot method. +func (client *WebAppsClient) BeginSwapSlot(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotOptions) (*runtime.Poller[WebAppsClientSwapSlotResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.swapSlot(ctx, resourceGroupName, name, slot, slotSwapEntity, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientSwapSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientSwapSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SwapSlot - Description for Swaps two deployment slots of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) swapSlot(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginSwapSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.swapSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// swapSlotCreateRequest creates the SwapSlot request. +func (client *WebAppsClient) swapSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil +} + +// BeginSwapSlotWithProduction - Description for Swaps two deployment slots of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slotSwapEntity - JSON object that contains the target slot name. See example. +// - options - WebAppsClientBeginSwapSlotWithProductionOptions contains the optional parameters for the WebAppsClient.BeginSwapSlotWithProduction +// method. +func (client *WebAppsClient) BeginSwapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotWithProductionOptions) (*runtime.Poller[WebAppsClientSwapSlotWithProductionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.swapSlotWithProduction(ctx, resourceGroupName, name, slotSwapEntity, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientSwapSlotWithProductionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientSwapSlotWithProductionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SwapSlotWithProduction - Description for Swaps two deployment slots of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WebAppsClient) swapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotWithProductionOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginSwapSlotWithProduction" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.swapSlotWithProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// swapSlotWithProductionCreateRequest creates the SwapSlotWithProduction request. +func (client *WebAppsClient) swapSlotWithProductionCreateRequest(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotWithProductionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil +} + +// SyncFunctionTriggers - Description for Syncs function trigger metadata to the management database +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggers +// method. +func (client *WebAppsClient) SyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncFunctionTriggersOptions) (WebAppsClientSyncFunctionTriggersResponse, error) { + var err error + const operationName = "WebAppsClient.SyncFunctionTriggers" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.syncFunctionTriggersCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientSyncFunctionTriggersResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientSyncFunctionTriggersResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncFunctionTriggersResponse{}, err + } + return WebAppsClientSyncFunctionTriggersResponse{}, nil +} + +// syncFunctionTriggersCreateRequest creates the SyncFunctionTriggers request. +func (client *WebAppsClient) syncFunctionTriggersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncFunctionTriggersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// SyncFunctionTriggersSlot - Description for Syncs function trigger metadata to the management database +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. +// - options - WebAppsClientSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggersSlot +// method. +func (client *WebAppsClient) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncFunctionTriggersSlotOptions) (WebAppsClientSyncFunctionTriggersSlotResponse, error) { + var err error + const operationName = "WebAppsClient.SyncFunctionTriggersSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.syncFunctionTriggersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientSyncFunctionTriggersSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientSyncFunctionTriggersSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncFunctionTriggersSlotResponse{}, err + } + return WebAppsClientSyncFunctionTriggersSlotResponse{}, nil +} + +// syncFunctionTriggersSlotCreateRequest creates the SyncFunctionTriggersSlot request. +func (client *WebAppsClient) syncFunctionTriggersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncFunctionTriggersSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// SyncFunctions - Description for Syncs function trigger metadata to the management database +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientSyncFunctionsOptions contains the optional parameters for the WebAppsClient.SyncFunctions method. +func (client *WebAppsClient) SyncFunctions(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncFunctionsOptions) (WebAppsClientSyncFunctionsResponse, error) { + var err error + const operationName = "WebAppsClient.SyncFunctions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.syncFunctionsCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientSyncFunctionsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientSyncFunctionsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncFunctionsResponse{}, err + } + return WebAppsClientSyncFunctionsResponse{}, nil +} + +// syncFunctionsCreateRequest creates the SyncFunctions request. +func (client *WebAppsClient) syncFunctionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncFunctionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// SyncFunctionsSlot - Description for Syncs function trigger metadata to the management database +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. +// - options - WebAppsClientSyncFunctionsSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionsSlot +// method. +func (client *WebAppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncFunctionsSlotOptions) (WebAppsClientSyncFunctionsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.SyncFunctionsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.syncFunctionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientSyncFunctionsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientSyncFunctionsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncFunctionsSlotResponse{}, err + } + return WebAppsClientSyncFunctionsSlotResponse{}, nil +} + +// syncFunctionsSlotCreateRequest creates the SyncFunctionsSlot request. +func (client *WebAppsClient) syncFunctionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncFunctionsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// SyncRepository - Description for Sync web app repository. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - options - WebAppsClientSyncRepositoryOptions contains the optional parameters for the WebAppsClient.SyncRepository method. +func (client *WebAppsClient) SyncRepository(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncRepositoryOptions) (WebAppsClientSyncRepositoryResponse, error) { + var err error + const operationName = "WebAppsClient.SyncRepository" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.syncRepositoryCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientSyncRepositoryResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientSyncRepositoryResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncRepositoryResponse{}, err + } + return WebAppsClientSyncRepositoryResponse{}, nil +} + +// syncRepositoryCreateRequest creates the SyncRepository request. +func (client *WebAppsClient) syncRepositoryCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncRepositoryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// SyncRepositorySlot - Description for Sync web app repository. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - options - WebAppsClientSyncRepositorySlotOptions contains the optional parameters for the WebAppsClient.SyncRepositorySlot +// method. +func (client *WebAppsClient) SyncRepositorySlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncRepositorySlotOptions) (WebAppsClientSyncRepositorySlotResponse, error) { + var err error + const operationName = "WebAppsClient.SyncRepositorySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.syncRepositorySlotCreateRequest(ctx, resourceGroupName, name, slot, options) + if err != nil { + return WebAppsClientSyncRepositorySlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientSyncRepositorySlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncRepositorySlotResponse{}, err + } + return WebAppsClientSyncRepositorySlotResponse{}, nil +} + +// syncRepositorySlotCreateRequest creates the SyncRepositorySlot request. +func (client *WebAppsClient) syncRepositorySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncRepositorySlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Update - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. +// - siteEnvelope - A JSON representation of the app properties. See example. +// - options - WebAppsClientUpdateOptions contains the optional parameters for the WebAppsClient.Update method. +func (client *WebAppsClient) Update(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, options *WebAppsClientUpdateOptions) (WebAppsClientUpdateResponse, error) { + var err error + const operationName = "WebAppsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, name, siteEnvelope, options) + if err != nil { + return WebAppsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WebAppsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, options *WebAppsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WebAppsClient) updateHandleResponse(resp *http.Response) (WebAppsClientUpdateResponse, error) { + result := WebAppsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Site); err != nil { + return WebAppsClientUpdateResponse{}, err + } + return result, nil +} + +// UpdateApplicationSettings - Description for Replaces the application settings of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - appSettings - Application settings of the app. +// - options - WebAppsClientUpdateApplicationSettingsOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettings +// method. +func (client *WebAppsClient) UpdateApplicationSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *WebAppsClientUpdateApplicationSettingsOptions) (WebAppsClientUpdateApplicationSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateApplicationSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateApplicationSettingsCreateRequest(ctx, resourceGroupName, name, appSettings, options) + if err != nil { + return WebAppsClientUpdateApplicationSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateApplicationSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateApplicationSettingsResponse{}, err + } + resp, err := client.updateApplicationSettingsHandleResponse(httpResp) + return resp, err +} + +// updateApplicationSettingsCreateRequest creates the UpdateApplicationSettings request. +func (client *WebAppsClient) updateApplicationSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *WebAppsClientUpdateApplicationSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil +} + +// updateApplicationSettingsHandleResponse handles the UpdateApplicationSettings response. +func (client *WebAppsClient) updateApplicationSettingsHandleResponse(resp *http.Response) (WebAppsClientUpdateApplicationSettingsResponse, error) { + result := WebAppsClientUpdateApplicationSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return WebAppsClientUpdateApplicationSettingsResponse{}, err + } + return result, nil +} + +// UpdateApplicationSettingsSlot - Description for Replaces the application settings of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production +// slot. +// - appSettings - Application settings of the app. +// - options - WebAppsClientUpdateApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettingsSlot +// method. +func (client *WebAppsClient) UpdateApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, appSettings StringDictionary, options *WebAppsClientUpdateApplicationSettingsSlotOptions) (WebAppsClientUpdateApplicationSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateApplicationSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateApplicationSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, appSettings, options) + if err != nil { + return WebAppsClientUpdateApplicationSettingsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateApplicationSettingsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateApplicationSettingsSlotResponse{}, err + } + resp, err := client.updateApplicationSettingsSlotHandleResponse(httpResp) + return resp, err +} + +// updateApplicationSettingsSlotCreateRequest creates the UpdateApplicationSettingsSlot request. +func (client *WebAppsClient) updateApplicationSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, appSettings StringDictionary, options *WebAppsClientUpdateApplicationSettingsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil +} + +// updateApplicationSettingsSlotHandleResponse handles the UpdateApplicationSettingsSlot response. +func (client *WebAppsClient) updateApplicationSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateApplicationSettingsSlotResponse, error) { + result := WebAppsClientUpdateApplicationSettingsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return WebAppsClientUpdateApplicationSettingsSlotResponse{}, err + } + return result, nil +} + +// UpdateAuthSettings - Description for Updates the Authentication / Authorization settings associated with web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - siteAuthSettings - Auth settings associated with web app. +// - options - WebAppsClientUpdateAuthSettingsOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettings +// method. +func (client *WebAppsClient) UpdateAuthSettings(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, options *WebAppsClientUpdateAuthSettingsOptions) (WebAppsClientUpdateAuthSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateAuthSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateAuthSettingsCreateRequest(ctx, resourceGroupName, name, siteAuthSettings, options) + if err != nil { + return WebAppsClientUpdateAuthSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateAuthSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAuthSettingsResponse{}, err + } + resp, err := client.updateAuthSettingsHandleResponse(httpResp) + return resp, err +} + +// updateAuthSettingsCreateRequest creates the UpdateAuthSettings request. +func (client *WebAppsClient) updateAuthSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, options *WebAppsClientUpdateAuthSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteAuthSettings); err != nil { + return nil, err + } + return req, nil +} + +// updateAuthSettingsHandleResponse handles the UpdateAuthSettings response. +func (client *WebAppsClient) updateAuthSettingsHandleResponse(resp *http.Response) (WebAppsClientUpdateAuthSettingsResponse, error) { + result := WebAppsClientUpdateAuthSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettings); err != nil { + return WebAppsClientUpdateAuthSettingsResponse{}, err + } + return result, nil +} + +// UpdateAuthSettingsSlot - Description for Updates the Authentication / Authorization settings associated with web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - siteAuthSettings - Auth settings associated with web app. +// - options - WebAppsClientUpdateAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsSlot +// method. +func (client *WebAppsClient) UpdateAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettings SiteAuthSettings, options *WebAppsClientUpdateAuthSettingsSlotOptions) (WebAppsClientUpdateAuthSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateAuthSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateAuthSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, siteAuthSettings, options) + if err != nil { + return WebAppsClientUpdateAuthSettingsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateAuthSettingsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAuthSettingsSlotResponse{}, err + } + resp, err := client.updateAuthSettingsSlotHandleResponse(httpResp) + return resp, err +} + +// updateAuthSettingsSlotCreateRequest creates the UpdateAuthSettingsSlot request. +func (client *WebAppsClient) updateAuthSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettings SiteAuthSettings, options *WebAppsClientUpdateAuthSettingsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteAuthSettings); err != nil { + return nil, err + } + return req, nil +} + +// updateAuthSettingsSlotHandleResponse handles the UpdateAuthSettingsSlot response. +func (client *WebAppsClient) updateAuthSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateAuthSettingsSlotResponse, error) { + result := WebAppsClientUpdateAuthSettingsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettings); err != nil { + return WebAppsClientUpdateAuthSettingsSlotResponse{}, err + } + return result, nil +} + +// UpdateAuthSettingsV2 - Description for Updates site's Authentication / Authorization settings for apps via the V2 format +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - siteAuthSettingsV2 - Auth settings associated with web app. +// - options - WebAppsClientUpdateAuthSettingsV2Options contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2 +// method. +func (client *WebAppsClient) UpdateAuthSettingsV2(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2, options *WebAppsClientUpdateAuthSettingsV2Options) (WebAppsClientUpdateAuthSettingsV2Response, error) { + var err error + const operationName = "WebAppsClient.UpdateAuthSettingsV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateAuthSettingsV2CreateRequest(ctx, resourceGroupName, name, siteAuthSettingsV2, options) + if err != nil { + return WebAppsClientUpdateAuthSettingsV2Response{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateAuthSettingsV2Response{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAuthSettingsV2Response{}, err + } + resp, err := client.updateAuthSettingsV2HandleResponse(httpResp) + return resp, err +} + +// updateAuthSettingsV2CreateRequest creates the UpdateAuthSettingsV2 request. +func (client *WebAppsClient) updateAuthSettingsV2CreateRequest(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2, options *WebAppsClientUpdateAuthSettingsV2Options) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteAuthSettingsV2); err != nil { + return nil, err + } + return req, nil +} + +// updateAuthSettingsV2HandleResponse handles the UpdateAuthSettingsV2 response. +func (client *WebAppsClient) updateAuthSettingsV2HandleResponse(resp *http.Response) (WebAppsClientUpdateAuthSettingsV2Response, error) { + result := WebAppsClientUpdateAuthSettingsV2Response{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { + return WebAppsClientUpdateAuthSettingsV2Response{}, err + } + return result, nil +} + +// UpdateAuthSettingsV2Slot - Description for Updates site's Authentication / Authorization settings for apps via the V2 format +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - siteAuthSettingsV2 - Auth settings associated with web app. +// - options - WebAppsClientUpdateAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2Slot +// method. +func (client *WebAppsClient) UpdateAuthSettingsV2Slot(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettingsV2 SiteAuthSettingsV2, options *WebAppsClientUpdateAuthSettingsV2SlotOptions) (WebAppsClientUpdateAuthSettingsV2SlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateAuthSettingsV2Slot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateAuthSettingsV2SlotCreateRequest(ctx, resourceGroupName, name, slot, siteAuthSettingsV2, options) + if err != nil { + return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, err + } + resp, err := client.updateAuthSettingsV2SlotHandleResponse(httpResp) + return resp, err +} + +// updateAuthSettingsV2SlotCreateRequest creates the UpdateAuthSettingsV2Slot request. +func (client *WebAppsClient) updateAuthSettingsV2SlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettingsV2 SiteAuthSettingsV2, options *WebAppsClientUpdateAuthSettingsV2SlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteAuthSettingsV2); err != nil { + return nil, err + } + return req, nil +} + +// updateAuthSettingsV2SlotHandleResponse handles the UpdateAuthSettingsV2Slot response. +func (client *WebAppsClient) updateAuthSettingsV2SlotHandleResponse(resp *http.Response) (WebAppsClientUpdateAuthSettingsV2SlotResponse, error) { + result := WebAppsClientUpdateAuthSettingsV2SlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { + return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, err + } + return result, nil +} + +// UpdateAzureStorageAccounts - Description for Updates the Azure storage account configurations of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - azureStorageAccounts - Azure storage accounts of the app. +// - options - WebAppsClientUpdateAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccounts +// method. +func (client *WebAppsClient) UpdateAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, options *WebAppsClientUpdateAzureStorageAccountsOptions) (WebAppsClientUpdateAzureStorageAccountsResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateAzureStorageAccounts" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateAzureStorageAccountsCreateRequest(ctx, resourceGroupName, name, azureStorageAccounts, options) + if err != nil { + return WebAppsClientUpdateAzureStorageAccountsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateAzureStorageAccountsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAzureStorageAccountsResponse{}, err + } + resp, err := client.updateAzureStorageAccountsHandleResponse(httpResp) + return resp, err +} + +// updateAzureStorageAccountsCreateRequest creates the UpdateAzureStorageAccounts request. +func (client *WebAppsClient) updateAzureStorageAccountsCreateRequest(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, options *WebAppsClientUpdateAzureStorageAccountsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, azureStorageAccounts); err != nil { + return nil, err + } + return req, nil +} + +// updateAzureStorageAccountsHandleResponse handles the UpdateAzureStorageAccounts response. +func (client *WebAppsClient) updateAzureStorageAccountsHandleResponse(resp *http.Response) (WebAppsClientUpdateAzureStorageAccountsResponse, error) { + result := WebAppsClientUpdateAzureStorageAccountsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureStoragePropertyDictionaryResource); err != nil { + return WebAppsClientUpdateAzureStorageAccountsResponse{}, err + } + return result, nil +} + +// UpdateAzureStorageAccountsSlot - Description for Updates the Azure storage account configurations of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations +// for the production slot. +// - azureStorageAccounts - Azure storage accounts of the app. +// - options - WebAppsClientUpdateAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccountsSlot +// method. +func (client *WebAppsClient) UpdateAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string, azureStorageAccounts AzureStoragePropertyDictionaryResource, options *WebAppsClientUpdateAzureStorageAccountsSlotOptions) (WebAppsClientUpdateAzureStorageAccountsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateAzureStorageAccountsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateAzureStorageAccountsSlotCreateRequest(ctx, resourceGroupName, name, slot, azureStorageAccounts, options) + if err != nil { + return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, err + } + resp, err := client.updateAzureStorageAccountsSlotHandleResponse(httpResp) + return resp, err +} + +// updateAzureStorageAccountsSlotCreateRequest creates the UpdateAzureStorageAccountsSlot request. +func (client *WebAppsClient) updateAzureStorageAccountsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, azureStorageAccounts AzureStoragePropertyDictionaryResource, options *WebAppsClientUpdateAzureStorageAccountsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, azureStorageAccounts); err != nil { + return nil, err + } + return req, nil +} + +// updateAzureStorageAccountsSlotHandleResponse handles the UpdateAzureStorageAccountsSlot response. +func (client *WebAppsClient) updateAzureStorageAccountsSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateAzureStorageAccountsSlotResponse, error) { + result := WebAppsClientUpdateAzureStorageAccountsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureStoragePropertyDictionaryResource); err != nil { + return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, err + } + return result, nil +} + +// UpdateBackupConfiguration - Description for Updates the backup configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - request - Edited backup configuration. +// - options - WebAppsClientUpdateBackupConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfiguration +// method. +func (client *WebAppsClient) UpdateBackupConfiguration(ctx context.Context, resourceGroupName string, name string, request BackupRequest, options *WebAppsClientUpdateBackupConfigurationOptions) (WebAppsClientUpdateBackupConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateBackupConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateBackupConfigurationCreateRequest(ctx, resourceGroupName, name, request, options) + if err != nil { + return WebAppsClientUpdateBackupConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateBackupConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateBackupConfigurationResponse{}, err + } + resp, err := client.updateBackupConfigurationHandleResponse(httpResp) + return resp, err +} + +// updateBackupConfigurationCreateRequest creates the UpdateBackupConfiguration request. +func (client *WebAppsClient) updateBackupConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, request BackupRequest, options *WebAppsClientUpdateBackupConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// updateBackupConfigurationHandleResponse handles the UpdateBackupConfiguration response. +func (client *WebAppsClient) updateBackupConfigurationHandleResponse(resp *http.Response) (WebAppsClientUpdateBackupConfigurationResponse, error) { + result := WebAppsClientUpdateBackupConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupRequest); err != nil { + return WebAppsClientUpdateBackupConfigurationResponse{}, err + } + return result, nil +} + +// UpdateBackupConfigurationSlot - Description for Updates the backup configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production +// slot. +// - request - Edited backup configuration. +// - options - WebAppsClientUpdateBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfigurationSlot +// method. +func (client *WebAppsClient) UpdateBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, request BackupRequest, options *WebAppsClientUpdateBackupConfigurationSlotOptions) (WebAppsClientUpdateBackupConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateBackupConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateBackupConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) + if err != nil { + return WebAppsClientUpdateBackupConfigurationSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateBackupConfigurationSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateBackupConfigurationSlotResponse{}, err + } + resp, err := client.updateBackupConfigurationSlotHandleResponse(httpResp) + return resp, err +} + +// updateBackupConfigurationSlotCreateRequest creates the UpdateBackupConfigurationSlot request. +func (client *WebAppsClient) updateBackupConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, request BackupRequest, options *WebAppsClientUpdateBackupConfigurationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// updateBackupConfigurationSlotHandleResponse handles the UpdateBackupConfigurationSlot response. +func (client *WebAppsClient) updateBackupConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateBackupConfigurationSlotResponse, error) { + result := WebAppsClientUpdateBackupConfigurationSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupRequest); err != nil { + return WebAppsClientUpdateBackupConfigurationSlotResponse{}, err + } + return result, nil +} + +// UpdateConfiguration - Description for Updates the configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - siteConfig - JSON representation of a SiteConfig object. See example. +// - options - WebAppsClientUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateConfiguration +// method. +func (client *WebAppsClient) UpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, options *WebAppsClientUpdateConfigurationOptions) (WebAppsClientUpdateConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateConfigurationCreateRequest(ctx, resourceGroupName, name, siteConfig, options) + if err != nil { + return WebAppsClientUpdateConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateConfigurationResponse{}, err + } + resp, err := client.updateConfigurationHandleResponse(httpResp) + return resp, err +} + +// updateConfigurationCreateRequest creates the UpdateConfiguration request. +func (client *WebAppsClient) updateConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, options *WebAppsClientUpdateConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteConfig); err != nil { + return nil, err + } + return req, nil +} + +// updateConfigurationHandleResponse handles the UpdateConfiguration response. +func (client *WebAppsClient) updateConfigurationHandleResponse(resp *http.Response) (WebAppsClientUpdateConfigurationResponse, error) { + result := WebAppsClientUpdateConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { + return WebAppsClientUpdateConfigurationResponse{}, err + } + return result, nil +} + +// UpdateConfigurationSlot - Description for Updates the configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. +// - siteConfig - JSON representation of a SiteConfig object. See example. +// - options - WebAppsClientUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateConfigurationSlot +// method. +func (client *WebAppsClient) UpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig SiteConfigResource, options *WebAppsClientUpdateConfigurationSlotOptions) (WebAppsClientUpdateConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, siteConfig, options) + if err != nil { + return WebAppsClientUpdateConfigurationSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateConfigurationSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateConfigurationSlotResponse{}, err + } + resp, err := client.updateConfigurationSlotHandleResponse(httpResp) + return resp, err +} + +// updateConfigurationSlotCreateRequest creates the UpdateConfigurationSlot request. +func (client *WebAppsClient) updateConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig SiteConfigResource, options *WebAppsClientUpdateConfigurationSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteConfig); err != nil { + return nil, err + } + return req, nil +} + +// updateConfigurationSlotHandleResponse handles the UpdateConfigurationSlot response. +func (client *WebAppsClient) updateConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateConfigurationSlotResponse, error) { + result := WebAppsClientUpdateConfigurationSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { + return WebAppsClientUpdateConfigurationSlotResponse{}, err + } + return result, nil +} + +// UpdateConnectionStrings - Description for Replaces the connection strings of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - connectionStrings - Connection strings of the app or deployment slot. See example. +// - options - WebAppsClientUpdateConnectionStringsOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStrings +// method. +func (client *WebAppsClient) UpdateConnectionStrings(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, options *WebAppsClientUpdateConnectionStringsOptions) (WebAppsClientUpdateConnectionStringsResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateConnectionStrings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateConnectionStringsCreateRequest(ctx, resourceGroupName, name, connectionStrings, options) + if err != nil { + return WebAppsClientUpdateConnectionStringsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateConnectionStringsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateConnectionStringsResponse{}, err + } + resp, err := client.updateConnectionStringsHandleResponse(httpResp) + return resp, err +} + +// updateConnectionStringsCreateRequest creates the UpdateConnectionStrings request. +func (client *WebAppsClient) updateConnectionStringsCreateRequest(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, options *WebAppsClientUpdateConnectionStringsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionStrings); err != nil { + return nil, err + } + return req, nil +} + +// updateConnectionStringsHandleResponse handles the UpdateConnectionStrings response. +func (client *WebAppsClient) updateConnectionStringsHandleResponse(resp *http.Response) (WebAppsClientUpdateConnectionStringsResponse, error) { + result := WebAppsClientUpdateConnectionStringsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionStringDictionary); err != nil { + return WebAppsClientUpdateConnectionStringsResponse{}, err + } + return result, nil +} + +// UpdateConnectionStringsSlot - Description for Replaces the connection strings of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production +// slot. +// - connectionStrings - Connection strings of the app or deployment slot. See example. +// - options - WebAppsClientUpdateConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStringsSlot +// method. +func (client *WebAppsClient) UpdateConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string, connectionStrings ConnectionStringDictionary, options *WebAppsClientUpdateConnectionStringsSlotOptions) (WebAppsClientUpdateConnectionStringsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateConnectionStringsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateConnectionStringsSlotCreateRequest(ctx, resourceGroupName, name, slot, connectionStrings, options) + if err != nil { + return WebAppsClientUpdateConnectionStringsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateConnectionStringsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateConnectionStringsSlotResponse{}, err + } + resp, err := client.updateConnectionStringsSlotHandleResponse(httpResp) + return resp, err +} + +// updateConnectionStringsSlotCreateRequest creates the UpdateConnectionStringsSlot request. +func (client *WebAppsClient) updateConnectionStringsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, connectionStrings ConnectionStringDictionary, options *WebAppsClientUpdateConnectionStringsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionStrings); err != nil { + return nil, err + } + return req, nil +} + +// updateConnectionStringsSlotHandleResponse handles the UpdateConnectionStringsSlot response. +func (client *WebAppsClient) updateConnectionStringsSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateConnectionStringsSlotResponse, error) { + result := WebAppsClientUpdateConnectionStringsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionStringDictionary); err != nil { + return WebAppsClientUpdateConnectionStringsSlotResponse{}, err + } + return result, nil +} + +// UpdateDiagnosticLogsConfig - Description for Updates the logging configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - siteLogsConfig - A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. +// - options - WebAppsClientUpdateDiagnosticLogsConfigOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfig +// method. +func (client *WebAppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, options *WebAppsClientUpdateDiagnosticLogsConfigOptions) (WebAppsClientUpdateDiagnosticLogsConfigResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateDiagnosticLogsConfig" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateDiagnosticLogsConfigCreateRequest(ctx, resourceGroupName, name, siteLogsConfig, options) + if err != nil { + return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, err + } + resp, err := client.updateDiagnosticLogsConfigHandleResponse(httpResp) + return resp, err +} + +// updateDiagnosticLogsConfigCreateRequest creates the UpdateDiagnosticLogsConfig request. +func (client *WebAppsClient) updateDiagnosticLogsConfigCreateRequest(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, options *WebAppsClientUpdateDiagnosticLogsConfigOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteLogsConfig); err != nil { + return nil, err + } + return req, nil +} + +// updateDiagnosticLogsConfigHandleResponse handles the UpdateDiagnosticLogsConfig response. +func (client *WebAppsClient) updateDiagnosticLogsConfigHandleResponse(resp *http.Response) (WebAppsClientUpdateDiagnosticLogsConfigResponse, error) { + result := WebAppsClientUpdateDiagnosticLogsConfigResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteLogsConfig); err != nil { + return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, err + } + return result, nil +} + +// UpdateDiagnosticLogsConfigSlot - Description for Updates the logging configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production +// slot. +// - siteLogsConfig - A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. +// - options - WebAppsClientUpdateDiagnosticLogsConfigSlotOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfigSlot +// method. +func (client *WebAppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteLogsConfig SiteLogsConfig, options *WebAppsClientUpdateDiagnosticLogsConfigSlotOptions) (WebAppsClientUpdateDiagnosticLogsConfigSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateDiagnosticLogsConfigSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateDiagnosticLogsConfigSlotCreateRequest(ctx, resourceGroupName, name, slot, siteLogsConfig, options) + if err != nil { + return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, err + } + resp, err := client.updateDiagnosticLogsConfigSlotHandleResponse(httpResp) + return resp, err +} + +// updateDiagnosticLogsConfigSlotCreateRequest creates the UpdateDiagnosticLogsConfigSlot request. +func (client *WebAppsClient) updateDiagnosticLogsConfigSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteLogsConfig SiteLogsConfig, options *WebAppsClientUpdateDiagnosticLogsConfigSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteLogsConfig); err != nil { + return nil, err + } + return req, nil +} + +// updateDiagnosticLogsConfigSlotHandleResponse handles the UpdateDiagnosticLogsConfigSlot response. +func (client *WebAppsClient) updateDiagnosticLogsConfigSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateDiagnosticLogsConfigSlotResponse, error) { + result := WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteLogsConfig); err != nil { + return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, err + } + return result, nil +} + +// UpdateDomainOwnershipIdentifier - Description for Creates a domain ownership identifier for web app, or updates an existing +// ownership identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - domainOwnershipIdentifierName - Name of domain ownership identifier. +// - domainOwnershipIdentifier - A JSON representation of the domain ownership properties. +// - options - WebAppsClientUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifier +// method. +func (client *WebAppsClient) UpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, options *WebAppsClientUpdateDomainOwnershipIdentifierOptions) (WebAppsClientUpdateDomainOwnershipIdentifierResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateDomainOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, options) + if err != nil { + return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, err + } + resp, err := client.updateDomainOwnershipIdentifierHandleResponse(httpResp) + return resp, err +} + +// updateDomainOwnershipIdentifierCreateRequest creates the UpdateDomainOwnershipIdentifier request. +func (client *WebAppsClient) updateDomainOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, options *WebAppsClientUpdateDomainOwnershipIdentifierOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainOwnershipIdentifierName == "" { + return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil +} + +// updateDomainOwnershipIdentifierHandleResponse handles the UpdateDomainOwnershipIdentifier response. +func (client *WebAppsClient) updateDomainOwnershipIdentifierHandleResponse(resp *http.Response) (WebAppsClientUpdateDomainOwnershipIdentifierResponse, error) { + result := WebAppsClientUpdateDomainOwnershipIdentifierResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { + return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, err + } + return result, nil +} + +// UpdateDomainOwnershipIdentifierSlot - Description for Creates a domain ownership identifier for web app, or updates an +// existing ownership identifier. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - domainOwnershipIdentifierName - Name of domain ownership identifier. +// - slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. +// - domainOwnershipIdentifier - A JSON representation of the domain ownership properties. +// - options - WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifierSlot +// method. +func (client *WebAppsClient) UpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier Identifier, options *WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions) (WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateDomainOwnershipIdentifierSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier, options) + if err != nil { + return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, err + } + resp, err := client.updateDomainOwnershipIdentifierSlotHandleResponse(httpResp) + return resp, err +} + +// updateDomainOwnershipIdentifierSlotCreateRequest creates the UpdateDomainOwnershipIdentifierSlot request. +func (client *WebAppsClient) updateDomainOwnershipIdentifierSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier Identifier, options *WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if domainOwnershipIdentifierName == "" { + return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil +} + +// updateDomainOwnershipIdentifierSlotHandleResponse handles the UpdateDomainOwnershipIdentifierSlot response. +func (client *WebAppsClient) updateDomainOwnershipIdentifierSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse, error) { + result := WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { + return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, err + } + return result, nil +} + +// UpdateFtpAllowed - Description for Updates whether FTP is allowed on the site or not. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientUpdateFtpAllowedOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowed +// method. +func (client *WebAppsClient) UpdateFtpAllowed(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateFtpAllowedOptions) (WebAppsClientUpdateFtpAllowedResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateFtpAllowed" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateFtpAllowedCreateRequest(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity, options) + if err != nil { + return WebAppsClientUpdateFtpAllowedResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateFtpAllowedResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateFtpAllowedResponse{}, err + } + resp, err := client.updateFtpAllowedHandleResponse(httpResp) + return resp, err +} + +// updateFtpAllowedCreateRequest creates the UpdateFtpAllowed request. +func (client *WebAppsClient) updateFtpAllowedCreateRequest(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateFtpAllowedOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity); err != nil { + return nil, err + } + return req, nil +} + +// updateFtpAllowedHandleResponse handles the UpdateFtpAllowed response. +func (client *WebAppsClient) updateFtpAllowedHandleResponse(resp *http.Response) (WebAppsClientUpdateFtpAllowedResponse, error) { + result := WebAppsClientUpdateFtpAllowedResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { + return WebAppsClientUpdateFtpAllowedResponse{}, err + } + return result, nil +} + +// UpdateFtpAllowedSlot - Description for Updates whether FTP is allowed on the site or not. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientUpdateFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowedSlot +// method. +func (client *WebAppsClient) UpdateFtpAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateFtpAllowedSlotOptions) (WebAppsClientUpdateFtpAllowedSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateFtpAllowedSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateFtpAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity, options) + if err != nil { + return WebAppsClientUpdateFtpAllowedSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateFtpAllowedSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateFtpAllowedSlotResponse{}, err + } + resp, err := client.updateFtpAllowedSlotHandleResponse(httpResp) + return resp, err +} + +// updateFtpAllowedSlotCreateRequest creates the UpdateFtpAllowedSlot request. +func (client *WebAppsClient) updateFtpAllowedSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateFtpAllowedSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity); err != nil { + return nil, err + } + return req, nil +} + +// updateFtpAllowedSlotHandleResponse handles the UpdateFtpAllowedSlot response. +func (client *WebAppsClient) updateFtpAllowedSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateFtpAllowedSlotResponse, error) { + result := WebAppsClientUpdateFtpAllowedSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { + return WebAppsClientUpdateFtpAllowedSlotResponse{}, err + } + return result, nil +} + +// UpdateHybridConnection - Description for Creates a new Hybrid Connection using a Service Bus relay. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - namespaceName - The namespace for this hybrid connection. +// - relayName - The relay name for this hybrid connection. +// - connectionEnvelope - The details of the hybrid connection. +// - options - WebAppsClientUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnection +// method. +func (client *WebAppsClient) UpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, options *WebAppsClientUpdateHybridConnectionOptions) (WebAppsClientUpdateHybridConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, options) + if err != nil { + return WebAppsClientUpdateHybridConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateHybridConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateHybridConnectionResponse{}, err + } + resp, err := client.updateHybridConnectionHandleResponse(httpResp) + return resp, err +} + +// updateHybridConnectionCreateRequest creates the UpdateHybridConnection request. +func (client *WebAppsClient) updateHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, options *WebAppsClientUpdateHybridConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateHybridConnectionHandleResponse handles the UpdateHybridConnection response. +func (client *WebAppsClient) updateHybridConnectionHandleResponse(resp *http.Response) (WebAppsClientUpdateHybridConnectionResponse, error) { + result := WebAppsClientUpdateHybridConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { + return WebAppsClientUpdateHybridConnectionResponse{}, err + } + return result, nil +} + +// UpdateHybridConnectionSlot - Description for Creates a new Hybrid Connection using a Service Bus relay. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - The name of the web app. +// - namespaceName - The namespace for this hybrid connection. +// - relayName - The relay name for this hybrid connection. +// - slot - The name of the slot for the web app. +// - connectionEnvelope - The details of the hybrid connection. +// - options - WebAppsClientUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnectionSlot +// method. +func (client *WebAppsClient) UpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope HybridConnection, options *WebAppsClientUpdateHybridConnectionSlotOptions) (WebAppsClientUpdateHybridConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateHybridConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope, options) + if err != nil { + return WebAppsClientUpdateHybridConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateHybridConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateHybridConnectionSlotResponse{}, err + } + resp, err := client.updateHybridConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// updateHybridConnectionSlotCreateRequest creates the UpdateHybridConnectionSlot request. +func (client *WebAppsClient) updateHybridConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope HybridConnection, options *WebAppsClientUpdateHybridConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if namespaceName == "" { + return nil, errors.New("parameter namespaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) + if relayName == "" { + return nil, errors.New("parameter relayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateHybridConnectionSlotHandleResponse handles the UpdateHybridConnectionSlot response. +func (client *WebAppsClient) updateHybridConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateHybridConnectionSlotResponse, error) { + result := WebAppsClientUpdateHybridConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { + return WebAppsClientUpdateHybridConnectionSlotResponse{}, err + } + return result, nil +} + +// UpdateMachineKey - Updates the machine key of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientUpdateMachineKeyOptions contains the optional parameters for the WebAppsClient.UpdateMachineKey +// method. +func (client *WebAppsClient) UpdateMachineKey(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientUpdateMachineKeyOptions) (WebAppsClientUpdateMachineKeyResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateMachineKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateMachineKeyCreateRequest(ctx, resourceGroupName, name, options) + if err != nil { + return WebAppsClientUpdateMachineKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateMachineKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateMachineKeyResponse{}, err + } + resp, err := client.updateMachineKeyHandleResponse(httpResp) + return resp, err +} + +// updateMachineKeyCreateRequest creates the UpdateMachineKey request. +func (client *WebAppsClient) updateMachineKeyCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientUpdateMachineKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/updatemachinekey" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// updateMachineKeyHandleResponse handles the UpdateMachineKey response. +func (client *WebAppsClient) updateMachineKeyHandleResponse(resp *http.Response) (WebAppsClientUpdateMachineKeyResponse, error) { + result := WebAppsClientUpdateMachineKeyResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { + return WebAppsClientUpdateMachineKeyResponse{}, err + } + return result, nil +} + +// UpdateMetadata - Description for Replaces the metadata of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - metadata - Edited metadata of the app or deployment slot. See example. +// - options - WebAppsClientUpdateMetadataOptions contains the optional parameters for the WebAppsClient.UpdateMetadata method. +func (client *WebAppsClient) UpdateMetadata(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, options *WebAppsClientUpdateMetadataOptions) (WebAppsClientUpdateMetadataResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateMetadata" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateMetadataCreateRequest(ctx, resourceGroupName, name, metadata, options) + if err != nil { + return WebAppsClientUpdateMetadataResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateMetadataResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateMetadataResponse{}, err + } + resp, err := client.updateMetadataHandleResponse(httpResp) + return resp, err +} + +// updateMetadataCreateRequest creates the UpdateMetadata request. +func (client *WebAppsClient) updateMetadataCreateRequest(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, options *WebAppsClientUpdateMetadataOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, metadata); err != nil { + return nil, err + } + return req, nil +} + +// updateMetadataHandleResponse handles the UpdateMetadata response. +func (client *WebAppsClient) updateMetadataHandleResponse(resp *http.Response) (WebAppsClientUpdateMetadataResponse, error) { + result := WebAppsClientUpdateMetadataResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return WebAppsClientUpdateMetadataResponse{}, err + } + return result, nil +} + +// UpdateMetadataSlot - Description for Replaces the metadata of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. +// - metadata - Edited metadata of the app or deployment slot. See example. +// - options - WebAppsClientUpdateMetadataSlotOptions contains the optional parameters for the WebAppsClient.UpdateMetadataSlot +// method. +func (client *WebAppsClient) UpdateMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string, metadata StringDictionary, options *WebAppsClientUpdateMetadataSlotOptions) (WebAppsClientUpdateMetadataSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateMetadataSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateMetadataSlotCreateRequest(ctx, resourceGroupName, name, slot, metadata, options) + if err != nil { + return WebAppsClientUpdateMetadataSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateMetadataSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateMetadataSlotResponse{}, err + } + resp, err := client.updateMetadataSlotHandleResponse(httpResp) + return resp, err +} + +// updateMetadataSlotCreateRequest creates the UpdateMetadataSlot request. +func (client *WebAppsClient) updateMetadataSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, metadata StringDictionary, options *WebAppsClientUpdateMetadataSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, metadata); err != nil { + return nil, err + } + return req, nil +} + +// updateMetadataSlotHandleResponse handles the UpdateMetadataSlot response. +func (client *WebAppsClient) updateMetadataSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateMetadataSlotResponse, error) { + result := WebAppsClientUpdateMetadataSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { + return WebAppsClientUpdateMetadataSlotResponse{}, err + } + return result, nil +} + +// UpdatePremierAddOn - Description for Updates a named add-on of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - premierAddOnName - Add-on name. +// - premierAddOn - A JSON representation of the edited premier add-on. +// - options - WebAppsClientUpdatePremierAddOnOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOn +// method. +func (client *WebAppsClient) UpdatePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, options *WebAppsClientUpdatePremierAddOnOptions) (WebAppsClientUpdatePremierAddOnResponse, error) { + var err error + const operationName = "WebAppsClient.UpdatePremierAddOn" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updatePremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, options) + if err != nil { + return WebAppsClientUpdatePremierAddOnResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdatePremierAddOnResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdatePremierAddOnResponse{}, err + } + resp, err := client.updatePremierAddOnHandleResponse(httpResp) + return resp, err +} + +// updatePremierAddOnCreateRequest creates the UpdatePremierAddOn request. +func (client *WebAppsClient) updatePremierAddOnCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, options *WebAppsClientUpdatePremierAddOnOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if premierAddOnName == "" { + return nil, errors.New("parameter premierAddOnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, premierAddOn); err != nil { + return nil, err + } + return req, nil +} + +// updatePremierAddOnHandleResponse handles the UpdatePremierAddOn response. +func (client *WebAppsClient) updatePremierAddOnHandleResponse(resp *http.Response) (WebAppsClientUpdatePremierAddOnResponse, error) { + result := WebAppsClientUpdatePremierAddOnResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { + return WebAppsClientUpdatePremierAddOnResponse{}, err + } + return result, nil +} + +// UpdatePremierAddOnSlot - Description for Updates a named add-on of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - premierAddOnName - Add-on name. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production +// slot. +// - premierAddOn - A JSON representation of the edited premier add-on. +// - options - WebAppsClientUpdatePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOnSlot +// method. +func (client *WebAppsClient) UpdatePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn PremierAddOnPatchResource, options *WebAppsClientUpdatePremierAddOnSlotOptions) (WebAppsClientUpdatePremierAddOnSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdatePremierAddOnSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updatePremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, premierAddOn, options) + if err != nil { + return WebAppsClientUpdatePremierAddOnSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdatePremierAddOnSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdatePremierAddOnSlotResponse{}, err + } + resp, err := client.updatePremierAddOnSlotHandleResponse(httpResp) + return resp, err +} + +// updatePremierAddOnSlotCreateRequest creates the UpdatePremierAddOnSlot request. +func (client *WebAppsClient) updatePremierAddOnSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn PremierAddOnPatchResource, options *WebAppsClientUpdatePremierAddOnSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if premierAddOnName == "" { + return nil, errors.New("parameter premierAddOnName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, premierAddOn); err != nil { + return nil, err + } + return req, nil +} + +// updatePremierAddOnSlotHandleResponse handles the UpdatePremierAddOnSlot response. +func (client *WebAppsClient) updatePremierAddOnSlotHandleResponse(resp *http.Response) (WebAppsClientUpdatePremierAddOnSlotResponse, error) { + result := WebAppsClientUpdatePremierAddOnSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { + return WebAppsClientUpdatePremierAddOnSlotResponse{}, err + } + return result, nil +} + +// UpdateRelayServiceConnection - Description for Creates a new hybrid connection configuration (PUT), or updates an existing +// one (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - entityName - Name of the hybrid connection configuration. +// - connectionEnvelope - Details of the hybrid connection configuration. +// - options - WebAppsClientUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnection +// method. +func (client *WebAppsClient) UpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientUpdateRelayServiceConnectionOptions) (WebAppsClientUpdateRelayServiceConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateRelayServiceConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, connectionEnvelope, options) + if err != nil { + return WebAppsClientUpdateRelayServiceConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateRelayServiceConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateRelayServiceConnectionResponse{}, err + } + resp, err := client.updateRelayServiceConnectionHandleResponse(httpResp) + return resp, err +} + +// updateRelayServiceConnectionCreateRequest creates the UpdateRelayServiceConnection request. +func (client *WebAppsClient) updateRelayServiceConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientUpdateRelayServiceConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if entityName == "" { + return nil, errors.New("parameter entityName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateRelayServiceConnectionHandleResponse handles the UpdateRelayServiceConnection response. +func (client *WebAppsClient) updateRelayServiceConnectionHandleResponse(resp *http.Response) (WebAppsClientUpdateRelayServiceConnectionResponse, error) { + result := WebAppsClientUpdateRelayServiceConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { + return WebAppsClientUpdateRelayServiceConnectionResponse{}, err + } + return result, nil +} + +// UpdateRelayServiceConnectionSlot - Description for Creates a new hybrid connection configuration (PUT), or updates an existing +// one (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - entityName - Name of the hybrid connection configuration. +// - slot - Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the +// production slot. +// - connectionEnvelope - Details of the hybrid connection configuration. +// - options - WebAppsClientUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnectionSlot +// method. +func (client *WebAppsClient) UpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientUpdateRelayServiceConnectionSlotOptions) (WebAppsClientUpdateRelayServiceConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateRelayServiceConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, connectionEnvelope, options) + if err != nil { + return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, err + } + resp, err := client.updateRelayServiceConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// updateRelayServiceConnectionSlotCreateRequest creates the UpdateRelayServiceConnectionSlot request. +func (client *WebAppsClient) updateRelayServiceConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientUpdateRelayServiceConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if entityName == "" { + return nil, errors.New("parameter entityName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateRelayServiceConnectionSlotHandleResponse handles the UpdateRelayServiceConnectionSlot response. +func (client *WebAppsClient) updateRelayServiceConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateRelayServiceConnectionSlotResponse, error) { + result := WebAppsClientUpdateRelayServiceConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { + return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, err + } + return result, nil +} + +// UpdateScmAllowed - Description for Updates whether user publishing credentials are allowed on the site or not. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientUpdateScmAllowedOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowed +// method. +func (client *WebAppsClient) UpdateScmAllowed(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateScmAllowedOptions) (WebAppsClientUpdateScmAllowedResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateScmAllowed" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateScmAllowedCreateRequest(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity, options) + if err != nil { + return WebAppsClientUpdateScmAllowedResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateScmAllowedResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateScmAllowedResponse{}, err + } + resp, err := client.updateScmAllowedHandleResponse(httpResp) + return resp, err +} + +// updateScmAllowedCreateRequest creates the UpdateScmAllowed request. +func (client *WebAppsClient) updateScmAllowedCreateRequest(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateScmAllowedOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity); err != nil { + return nil, err + } + return req, nil +} + +// updateScmAllowedHandleResponse handles the UpdateScmAllowed response. +func (client *WebAppsClient) updateScmAllowedHandleResponse(resp *http.Response) (WebAppsClientUpdateScmAllowedResponse, error) { + result := WebAppsClientUpdateScmAllowedResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { + return WebAppsClientUpdateScmAllowedResponse{}, err + } + return result, nil +} + +// UpdateScmAllowedSlot - Description for Updates whether user publishing credentials are allowed on the site or not. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - options - WebAppsClientUpdateScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowedSlot +// method. +func (client *WebAppsClient) UpdateScmAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateScmAllowedSlotOptions) (WebAppsClientUpdateScmAllowedSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateScmAllowedSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateScmAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity, options) + if err != nil { + return WebAppsClientUpdateScmAllowedSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateScmAllowedSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateScmAllowedSlotResponse{}, err + } + resp, err := client.updateScmAllowedSlotHandleResponse(httpResp) + return resp, err +} + +// updateScmAllowedSlotCreateRequest creates the UpdateScmAllowedSlot request. +func (client *WebAppsClient) updateScmAllowedSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateScmAllowedSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity); err != nil { + return nil, err + } + return req, nil +} + +// updateScmAllowedSlotHandleResponse handles the UpdateScmAllowedSlot response. +func (client *WebAppsClient) updateScmAllowedSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateScmAllowedSlotResponse, error) { + result := WebAppsClientUpdateScmAllowedSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { + return WebAppsClientUpdateScmAllowedSlotResponse{}, err + } + return result, nil +} + +// UpdateSitePushSettings - Description for Updates the Push settings associated with web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - pushSettings - Push settings associated with web app. +// - options - WebAppsClientUpdateSitePushSettingsOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettings +// method. +func (client *WebAppsClient) UpdateSitePushSettings(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, options *WebAppsClientUpdateSitePushSettingsOptions) (WebAppsClientUpdateSitePushSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSitePushSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateSitePushSettingsCreateRequest(ctx, resourceGroupName, name, pushSettings, options) + if err != nil { + return WebAppsClientUpdateSitePushSettingsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateSitePushSettingsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSitePushSettingsResponse{}, err + } + resp, err := client.updateSitePushSettingsHandleResponse(httpResp) + return resp, err +} + +// updateSitePushSettingsCreateRequest creates the UpdateSitePushSettings request. +func (client *WebAppsClient) updateSitePushSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, options *WebAppsClientUpdateSitePushSettingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, pushSettings); err != nil { + return nil, err + } + return req, nil +} + +// updateSitePushSettingsHandleResponse handles the UpdateSitePushSettings response. +func (client *WebAppsClient) updateSitePushSettingsHandleResponse(resp *http.Response) (WebAppsClientUpdateSitePushSettingsResponse, error) { + result := WebAppsClientUpdateSitePushSettingsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PushSettings); err != nil { + return WebAppsClientUpdateSitePushSettingsResponse{}, err + } + return result, nil +} + +// UpdateSitePushSettingsSlot - Description for Updates the Push settings associated with web app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of web app. +// - slot - Name of web app slot. If not specified then will default to production slot. +// - pushSettings - Push settings associated with web app. +// - options - WebAppsClientUpdateSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettingsSlot +// method. +func (client *WebAppsClient) UpdateSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, pushSettings PushSettings, options *WebAppsClientUpdateSitePushSettingsSlotOptions) (WebAppsClientUpdateSitePushSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSitePushSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateSitePushSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, pushSettings, options) + if err != nil { + return WebAppsClientUpdateSitePushSettingsSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateSitePushSettingsSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSitePushSettingsSlotResponse{}, err + } + resp, err := client.updateSitePushSettingsSlotHandleResponse(httpResp) + return resp, err +} + +// updateSitePushSettingsSlotCreateRequest creates the UpdateSitePushSettingsSlot request. +func (client *WebAppsClient) updateSitePushSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, pushSettings PushSettings, options *WebAppsClientUpdateSitePushSettingsSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, pushSettings); err != nil { + return nil, err + } + return req, nil +} + +// updateSitePushSettingsSlotHandleResponse handles the UpdateSitePushSettingsSlot response. +func (client *WebAppsClient) updateSitePushSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateSitePushSettingsSlotResponse, error) { + result := WebAppsClientUpdateSitePushSettingsSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PushSettings); err != nil { + return WebAppsClientUpdateSitePushSettingsSlotResponse{}, err + } + return result, nil +} + +// UpdateSlot - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing +// app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. +// - slot - Name of the deployment slot to create or update. By default, this API attempts to create or modify the production +// slot. +// - siteEnvelope - A JSON representation of the app properties. See example. +// - options - WebAppsClientUpdateSlotOptions contains the optional parameters for the WebAppsClient.UpdateSlot method. +func (client *WebAppsClient) UpdateSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope SitePatchResource, options *WebAppsClientUpdateSlotOptions) (WebAppsClientUpdateSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateSlotCreateRequest(ctx, resourceGroupName, name, slot, siteEnvelope, options) + if err != nil { + return WebAppsClientUpdateSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSlotResponse{}, err + } + resp, err := client.updateSlotHandleResponse(httpResp) + return resp, err +} + +// updateSlotCreateRequest creates the UpdateSlot request. +func (client *WebAppsClient) updateSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope SitePatchResource, options *WebAppsClientUpdateSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateSlotHandleResponse handles the UpdateSlot response. +func (client *WebAppsClient) updateSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateSlotResponse, error) { + result := WebAppsClientUpdateSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Site); err != nil { + return WebAppsClientUpdateSlotResponse{}, err + } + return result, nil +} + +// UpdateSlotConfigurationNames - Description for Updates the names of application settings and connection string that remain +// with the slot during swap operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slotConfigNames - Names of application settings and connection strings. See example. +// - options - WebAppsClientUpdateSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.UpdateSlotConfigurationNames +// method. +func (client *WebAppsClient) UpdateSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource, options *WebAppsClientUpdateSlotConfigurationNamesOptions) (WebAppsClientUpdateSlotConfigurationNamesResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSlotConfigurationNames" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateSlotConfigurationNamesCreateRequest(ctx, resourceGroupName, name, slotConfigNames, options) + if err != nil { + return WebAppsClientUpdateSlotConfigurationNamesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateSlotConfigurationNamesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSlotConfigurationNamesResponse{}, err + } + resp, err := client.updateSlotConfigurationNamesHandleResponse(httpResp) + return resp, err +} + +// updateSlotConfigurationNamesCreateRequest creates the UpdateSlotConfigurationNames request. +func (client *WebAppsClient) updateSlotConfigurationNamesCreateRequest(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource, options *WebAppsClientUpdateSlotConfigurationNamesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, slotConfigNames); err != nil { + return nil, err + } + return req, nil +} + +// updateSlotConfigurationNamesHandleResponse handles the UpdateSlotConfigurationNames response. +func (client *WebAppsClient) updateSlotConfigurationNamesHandleResponse(resp *http.Response) (WebAppsClientUpdateSlotConfigurationNamesResponse, error) { + result := WebAppsClientUpdateSlotConfigurationNamesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SlotConfigNamesResource); err != nil { + return WebAppsClientUpdateSlotConfigurationNamesResponse{}, err + } + return result, nil +} + +// UpdateSourceControl - Description for Updates the source control configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - siteSourceControl - JSON representation of a SiteSourceControl object. See example. +// - options - WebAppsClientUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.UpdateSourceControl +// method. +func (client *WebAppsClient) UpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientUpdateSourceControlOptions) (WebAppsClientUpdateSourceControlResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateSourceControlCreateRequest(ctx, resourceGroupName, name, siteSourceControl, options) + if err != nil { + return WebAppsClientUpdateSourceControlResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateSourceControlResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSourceControlResponse{}, err + } + resp, err := client.updateSourceControlHandleResponse(httpResp) + return resp, err +} + +// updateSourceControlCreateRequest creates the UpdateSourceControl request. +func (client *WebAppsClient) updateSourceControlCreateRequest(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientUpdateSourceControlOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteSourceControl); err != nil { + return nil, err + } + return req, nil +} + +// updateSourceControlHandleResponse handles the UpdateSourceControl response. +func (client *WebAppsClient) updateSourceControlHandleResponse(resp *http.Response) (WebAppsClientUpdateSourceControlResponse, error) { + result := WebAppsClientUpdateSourceControlResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteSourceControl); err != nil { + return WebAppsClientUpdateSourceControlResponse{}, err + } + return result, nil +} + +// UpdateSourceControlSlot - Description for Updates the source control configuration of an app. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for +// the production slot. +// - siteSourceControl - JSON representation of a SiteSourceControl object. See example. +// - options - WebAppsClientUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.UpdateSourceControlSlot +// method. +func (client *WebAppsClient) UpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientUpdateSourceControlSlotOptions) (WebAppsClientUpdateSourceControlSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSourceControlSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, siteSourceControl, options) + if err != nil { + return WebAppsClientUpdateSourceControlSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateSourceControlSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSourceControlSlotResponse{}, err + } + resp, err := client.updateSourceControlSlotHandleResponse(httpResp) + return resp, err +} + +// updateSourceControlSlotCreateRequest creates the UpdateSourceControlSlot request. +func (client *WebAppsClient) updateSourceControlSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientUpdateSourceControlSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, siteSourceControl); err != nil { + return nil, err + } + return req, nil +} + +// updateSourceControlSlotHandleResponse handles the UpdateSourceControlSlot response. +func (client *WebAppsClient) updateSourceControlSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateSourceControlSlotResponse, error) { + result := WebAppsClientUpdateSourceControlSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SiteSourceControl); err != nil { + return WebAppsClientUpdateSourceControlSlotResponse{}, err + } + return result, nil +} + +// UpdateSwiftVirtualNetworkConnectionWithCheck - Description for Integrates this Web App with a Virtual Network. This requires +// that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been +// delegated, and is not in use by another App Service Plan other than the one this App is in. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - connectionEnvelope - Properties of the Virtual Network connection. See example. +// - options - WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck +// method. +func (client *WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheck(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateSwiftVirtualNetworkConnectionWithCheckCreateRequest(ctx, resourceGroupName, name, connectionEnvelope, options) + if err != nil { + return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err + } + resp, err := client.updateSwiftVirtualNetworkConnectionWithCheckHandleResponse(httpResp) + return resp, err +} + +// updateSwiftVirtualNetworkConnectionWithCheckCreateRequest creates the UpdateSwiftVirtualNetworkConnectionWithCheck request. +func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckCreateRequest(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateSwiftVirtualNetworkConnectionWithCheckHandleResponse handles the UpdateSwiftVirtualNetworkConnectionWithCheck response. +func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckHandleResponse(resp *http.Response) (WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error) { + result := WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { + return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err + } + return result, nil +} + +// UpdateSwiftVirtualNetworkConnectionWithCheckSlot - Description for Integrates this Web App with a Virtual Network. This +// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already +// been +// delegated, and is not in use by another App Service Plan other than the one this App is in. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production +// slot. +// - connectionEnvelope - Properties of the Virtual Network connection. See example. +// - options - WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the +// WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot method. +func (client *WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest(ctx, resourceGroupName, name, slot, connectionEnvelope, options) + if err != nil { + return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err + } + resp, err := client.updateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(httpResp) + return resp, err +} + +// updateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest creates the UpdateSwiftVirtualNetworkConnectionWithCheckSlot request. +func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse handles the UpdateSwiftVirtualNetworkConnectionWithCheckSlot response. +func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error) { + result := WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { + return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err + } + return result, nil +} + +// UpdateVnetConnection - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection +// properties (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of an existing Virtual Network. +// - connectionEnvelope - Properties of the Virtual Network connection. See example. +// - options - WebAppsClientUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnection +// method. +func (client *WebAppsClient) UpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfoResource, options *WebAppsClientUpdateVnetConnectionOptions) (WebAppsClientUpdateVnetConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateVnetConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, connectionEnvelope, options) + if err != nil { + return WebAppsClientUpdateVnetConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateVnetConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateVnetConnectionResponse{}, err + } + resp, err := client.updateVnetConnectionHandleResponse(httpResp) + return resp, err +} + +// updateVnetConnectionCreateRequest creates the UpdateVnetConnection request. +func (client *WebAppsClient) updateVnetConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfoResource, options *WebAppsClientUpdateVnetConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateVnetConnectionHandleResponse handles the UpdateVnetConnection response. +func (client *WebAppsClient) updateVnetConnectionHandleResponse(resp *http.Response) (WebAppsClientUpdateVnetConnectionResponse, error) { + result := WebAppsClientUpdateVnetConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { + return WebAppsClientUpdateVnetConnectionResponse{}, err + } + return result, nil +} + +// UpdateVnetConnectionGateway - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of the Virtual Network. +// - gatewayName - Name of the gateway. Currently, the only supported string is "primary". +// - connectionEnvelope - The properties to update this gateway with. +// - options - WebAppsClientUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGateway +// method. +func (client *WebAppsClient) UpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *WebAppsClientUpdateVnetConnectionGatewayOptions) (WebAppsClientUpdateVnetConnectionGatewayResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateVnetConnectionGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateVnetConnectionGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, options) + if err != nil { + return WebAppsClientUpdateVnetConnectionGatewayResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateVnetConnectionGatewayResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateVnetConnectionGatewayResponse{}, err + } + resp, err := client.updateVnetConnectionGatewayHandleResponse(httpResp) + return resp, err +} + +// updateVnetConnectionGatewayCreateRequest creates the UpdateVnetConnectionGateway request. +func (client *WebAppsClient) updateVnetConnectionGatewayCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *WebAppsClientUpdateVnetConnectionGatewayOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateVnetConnectionGatewayHandleResponse handles the UpdateVnetConnectionGateway response. +func (client *WebAppsClient) updateVnetConnectionGatewayHandleResponse(resp *http.Response) (WebAppsClientUpdateVnetConnectionGatewayResponse, error) { + result := WebAppsClientUpdateVnetConnectionGatewayResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { + return WebAppsClientUpdateVnetConnectionGatewayResponse{}, err + } + return result, nil +} + +// UpdateVnetConnectionGatewaySlot - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of the Virtual Network. +// - gatewayName - Name of the gateway. Currently, the only supported string is "primary". +// - slot - Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production +// slot's Virtual Network. +// - connectionEnvelope - The properties to update this gateway with. +// - options - WebAppsClientUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGatewaySlot +// method. +func (client *WebAppsClient) UpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope VnetGateway, options *WebAppsClientUpdateVnetConnectionGatewaySlotOptions) (WebAppsClientUpdateVnetConnectionGatewaySlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateVnetConnectionGatewaySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateVnetConnectionGatewaySlotCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope, options) + if err != nil { + return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, err + } + resp, err := client.updateVnetConnectionGatewaySlotHandleResponse(httpResp) + return resp, err +} + +// updateVnetConnectionGatewaySlotCreateRequest creates the UpdateVnetConnectionGatewaySlot request. +func (client *WebAppsClient) updateVnetConnectionGatewaySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope VnetGateway, options *WebAppsClientUpdateVnetConnectionGatewaySlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateVnetConnectionGatewaySlotHandleResponse handles the UpdateVnetConnectionGatewaySlot response. +func (client *WebAppsClient) updateVnetConnectionGatewaySlotHandleResponse(resp *http.Response) (WebAppsClientUpdateVnetConnectionGatewaySlotResponse, error) { + result := WebAppsClientUpdateVnetConnectionGatewaySlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { + return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, err + } + return result, nil +} + +// UpdateVnetConnectionSlot - Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection +// properties (PATCH). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Name of the app. +// - vnetName - Name of an existing Virtual Network. +// - slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production +// slot. +// - connectionEnvelope - Properties of the Virtual Network connection. See example. +// - options - WebAppsClientUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionSlot +// method. +func (client *WebAppsClient) UpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope VnetInfoResource, options *WebAppsClientUpdateVnetConnectionSlotOptions) (WebAppsClientUpdateVnetConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateVnetConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, connectionEnvelope, options) + if err != nil { + return WebAppsClientUpdateVnetConnectionSlotResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebAppsClientUpdateVnetConnectionSlotResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateVnetConnectionSlotResponse{}, err + } + resp, err := client.updateVnetConnectionSlotHandleResponse(httpResp) + return resp, err +} + +// updateVnetConnectionSlotCreateRequest creates the UpdateVnetConnectionSlot request. +func (client *WebAppsClient) updateVnetConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope VnetInfoResource, options *WebAppsClientUpdateVnetConnectionSlotOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if vnetName == "" { + return nil, errors.New("parameter vnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) + if slot == "" { + return nil, errors.New("parameter slot cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// updateVnetConnectionSlotHandleResponse handles the UpdateVnetConnectionSlot response. +func (client *WebAppsClient) updateVnetConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateVnetConnectionSlotResponse, error) { + result := WebAppsClientUpdateVnetConnectionSlotResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { + return WebAppsClientUpdateVnetConnectionSlotResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/websitemanagement_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/websitemanagement_client.go new file mode 100644 index 00000000..174f8168 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/websitemanagement_client.go @@ -0,0 +1,1073 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WebSiteManagementClient contains the methods for the WebSiteManagementClient group. +// Don't use this type directly, use NewWebSiteManagementClient() instead. +type WebSiteManagementClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWebSiteManagementClient creates a new instance of WebSiteManagementClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWebSiteManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebSiteManagementClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WebSiteManagementClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckNameAvailability - Description for Check if a resource name is available. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - request - Name availability request. +// - options - WebSiteManagementClientCheckNameAvailabilityOptions contains the optional parameters for the WebSiteManagementClient.CheckNameAvailability +// method. +func (client *WebSiteManagementClient) CheckNameAvailability(ctx context.Context, request ResourceNameAvailabilityRequest, options *WebSiteManagementClientCheckNameAvailabilityOptions) (WebSiteManagementClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "WebSiteManagementClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkNameAvailabilityCreateRequest(ctx, request, options) + if err != nil { + return WebSiteManagementClientCheckNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientCheckNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientCheckNameAvailabilityResponse{}, err + } + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. +func (client *WebSiteManagementClient) checkNameAvailabilityCreateRequest(ctx context.Context, request ResourceNameAvailabilityRequest, options *WebSiteManagementClientCheckNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. +func (client *WebSiteManagementClient) checkNameAvailabilityHandleResponse(resp *http.Response) (WebSiteManagementClientCheckNameAvailabilityResponse, error) { + result := WebSiteManagementClientCheckNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceNameAvailability); err != nil { + return WebSiteManagementClientCheckNameAvailabilityResponse{}, err + } + return result, nil +} + +// GetPublishingUser - Description for Gets publishing user +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - options - WebSiteManagementClientGetPublishingUserOptions contains the optional parameters for the WebSiteManagementClient.GetPublishingUser +// method. +func (client *WebSiteManagementClient) GetPublishingUser(ctx context.Context, options *WebSiteManagementClientGetPublishingUserOptions) (WebSiteManagementClientGetPublishingUserResponse, error) { + var err error + const operationName = "WebSiteManagementClient.GetPublishingUser" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPublishingUserCreateRequest(ctx, options) + if err != nil { + return WebSiteManagementClientGetPublishingUserResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientGetPublishingUserResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientGetPublishingUserResponse{}, err + } + resp, err := client.getPublishingUserHandleResponse(httpResp) + return resp, err +} + +// getPublishingUserCreateRequest creates the GetPublishingUser request. +func (client *WebSiteManagementClient) getPublishingUserCreateRequest(ctx context.Context, options *WebSiteManagementClientGetPublishingUserOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/publishingUsers/web" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPublishingUserHandleResponse handles the GetPublishingUser response. +func (client *WebSiteManagementClient) getPublishingUserHandleResponse(resp *http.Response) (WebSiteManagementClientGetPublishingUserResponse, error) { + result := WebSiteManagementClientGetPublishingUserResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.User); err != nil { + return WebSiteManagementClientGetPublishingUserResponse{}, err + } + return result, nil +} + +// GetSourceControl - Description for Gets source control token +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - sourceControlType - Type of source control +// - options - WebSiteManagementClientGetSourceControlOptions contains the optional parameters for the WebSiteManagementClient.GetSourceControl +// method. +func (client *WebSiteManagementClient) GetSourceControl(ctx context.Context, sourceControlType string, options *WebSiteManagementClientGetSourceControlOptions) (WebSiteManagementClientGetSourceControlResponse, error) { + var err error + const operationName = "WebSiteManagementClient.GetSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSourceControlCreateRequest(ctx, sourceControlType, options) + if err != nil { + return WebSiteManagementClientGetSourceControlResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientGetSourceControlResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientGetSourceControlResponse{}, err + } + resp, err := client.getSourceControlHandleResponse(httpResp) + return resp, err +} + +// getSourceControlCreateRequest creates the GetSourceControl request. +func (client *WebSiteManagementClient) getSourceControlCreateRequest(ctx context.Context, sourceControlType string, options *WebSiteManagementClientGetSourceControlOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}" + if sourceControlType == "" { + return nil, errors.New("parameter sourceControlType cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sourceControlType}", url.PathEscape(sourceControlType)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSourceControlHandleResponse handles the GetSourceControl response. +func (client *WebSiteManagementClient) getSourceControlHandleResponse(resp *http.Response) (WebSiteManagementClientGetSourceControlResponse, error) { + result := WebSiteManagementClientGetSourceControlResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SourceControl); err != nil { + return WebSiteManagementClientGetSourceControlResponse{}, err + } + return result, nil +} + +// GetSubscriptionDeploymentLocations - Description for Gets list of available geo regions plus ministamps +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - options - WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions contains the optional parameters for the WebSiteManagementClient.GetSubscriptionDeploymentLocations +// method. +func (client *WebSiteManagementClient) GetSubscriptionDeploymentLocations(ctx context.Context, options *WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions) (WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse, error) { + var err error + const operationName = "WebSiteManagementClient.GetSubscriptionDeploymentLocations" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSubscriptionDeploymentLocationsCreateRequest(ctx, options) + if err != nil { + return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, err + } + resp, err := client.getSubscriptionDeploymentLocationsHandleResponse(httpResp) + return resp, err +} + +// getSubscriptionDeploymentLocationsCreateRequest creates the GetSubscriptionDeploymentLocations request. +func (client *WebSiteManagementClient) getSubscriptionDeploymentLocationsCreateRequest(ctx context.Context, options *WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSubscriptionDeploymentLocationsHandleResponse handles the GetSubscriptionDeploymentLocations response. +func (client *WebSiteManagementClient) getSubscriptionDeploymentLocationsHandleResponse(resp *http.Response) (WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse, error) { + result := WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentLocations); err != nil { + return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, err + } + return result, nil +} + +// NewListAseRegionsPager - Description for get a list of available ASE regions and its supported Skus. +// +// Generated from API version 2024-04-01 +// - options - WebSiteManagementClientListAseRegionsOptions contains the optional parameters for the WebSiteManagementClient.NewListAseRegionsPager +// method. +func (client *WebSiteManagementClient) NewListAseRegionsPager(options *WebSiteManagementClientListAseRegionsOptions) *runtime.Pager[WebSiteManagementClientListAseRegionsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListAseRegionsResponse]{ + More: func(page WebSiteManagementClientListAseRegionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebSiteManagementClientListAseRegionsResponse) (WebSiteManagementClientListAseRegionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListAseRegionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAseRegionsCreateRequest(ctx, options) + }, nil) + if err != nil { + return WebSiteManagementClientListAseRegionsResponse{}, err + } + return client.listAseRegionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAseRegionsCreateRequest creates the ListAseRegions request. +func (client *WebSiteManagementClient) listAseRegionsCreateRequest(ctx context.Context, options *WebSiteManagementClientListAseRegionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAseRegionsHandleResponse handles the ListAseRegions response. +func (client *WebSiteManagementClient) listAseRegionsHandleResponse(resp *http.Response) (WebSiteManagementClientListAseRegionsResponse, error) { + result := WebSiteManagementClientListAseRegionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AseRegionCollection); err != nil { + return WebSiteManagementClientListAseRegionsResponse{}, err + } + return result, nil +} + +// NewListBillingMetersPager - Description for Gets a list of meters for a given location. +// +// Generated from API version 2024-04-01 +// - options - WebSiteManagementClientListBillingMetersOptions contains the optional parameters for the WebSiteManagementClient.NewListBillingMetersPager +// method. +func (client *WebSiteManagementClient) NewListBillingMetersPager(options *WebSiteManagementClientListBillingMetersOptions) *runtime.Pager[WebSiteManagementClientListBillingMetersResponse] { + return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListBillingMetersResponse]{ + More: func(page WebSiteManagementClientListBillingMetersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebSiteManagementClientListBillingMetersResponse) (WebSiteManagementClientListBillingMetersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListBillingMetersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBillingMetersCreateRequest(ctx, options) + }, nil) + if err != nil { + return WebSiteManagementClientListBillingMetersResponse{}, err + } + return client.listBillingMetersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBillingMetersCreateRequest creates the ListBillingMeters request. +func (client *WebSiteManagementClient) listBillingMetersCreateRequest(ctx context.Context, options *WebSiteManagementClientListBillingMetersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.BillingLocation != nil { + reqQP.Set("billingLocation", *options.BillingLocation) + } + if options != nil && options.OSType != nil { + reqQP.Set("osType", *options.OSType) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBillingMetersHandleResponse handles the ListBillingMeters response. +func (client *WebSiteManagementClient) listBillingMetersHandleResponse(resp *http.Response) (WebSiteManagementClientListBillingMetersResponse, error) { + result := WebSiteManagementClientListBillingMetersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BillingMeterCollection); err != nil { + return WebSiteManagementClientListBillingMetersResponse{}, err + } + return result, nil +} + +// NewListCustomHostNameSitesPager - Get custom hostnames under this subscription +// +// Generated from API version 2024-04-01 +// - options - WebSiteManagementClientListCustomHostNameSitesOptions contains the optional parameters for the WebSiteManagementClient.NewListCustomHostNameSitesPager +// method. +func (client *WebSiteManagementClient) NewListCustomHostNameSitesPager(options *WebSiteManagementClientListCustomHostNameSitesOptions) *runtime.Pager[WebSiteManagementClientListCustomHostNameSitesResponse] { + return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListCustomHostNameSitesResponse]{ + More: func(page WebSiteManagementClientListCustomHostNameSitesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebSiteManagementClientListCustomHostNameSitesResponse) (WebSiteManagementClientListCustomHostNameSitesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListCustomHostNameSitesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCustomHostNameSitesCreateRequest(ctx, options) + }, nil) + if err != nil { + return WebSiteManagementClientListCustomHostNameSitesResponse{}, err + } + return client.listCustomHostNameSitesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCustomHostNameSitesCreateRequest creates the ListCustomHostNameSites request. +func (client *WebSiteManagementClient) listCustomHostNameSitesCreateRequest(ctx context.Context, options *WebSiteManagementClientListCustomHostNameSitesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.Hostname != nil { + reqQP.Set("hostname", *options.Hostname) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCustomHostNameSitesHandleResponse handles the ListCustomHostNameSites response. +func (client *WebSiteManagementClient) listCustomHostNameSitesHandleResponse(resp *http.Response) (WebSiteManagementClientListCustomHostNameSitesResponse, error) { + result := WebSiteManagementClientListCustomHostNameSitesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomHostnameSitesCollection); err != nil { + return WebSiteManagementClientListCustomHostNameSitesResponse{}, err + } + return result, nil +} + +// NewListGeoRegionsPager - Description for Get a list of available geographical regions. +// +// Generated from API version 2024-04-01 +// - options - WebSiteManagementClientListGeoRegionsOptions contains the optional parameters for the WebSiteManagementClient.NewListGeoRegionsPager +// method. +func (client *WebSiteManagementClient) NewListGeoRegionsPager(options *WebSiteManagementClientListGeoRegionsOptions) *runtime.Pager[WebSiteManagementClientListGeoRegionsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListGeoRegionsResponse]{ + More: func(page WebSiteManagementClientListGeoRegionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebSiteManagementClientListGeoRegionsResponse) (WebSiteManagementClientListGeoRegionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListGeoRegionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listGeoRegionsCreateRequest(ctx, options) + }, nil) + if err != nil { + return WebSiteManagementClientListGeoRegionsResponse{}, err + } + return client.listGeoRegionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listGeoRegionsCreateRequest creates the ListGeoRegions request. +func (client *WebSiteManagementClient) listGeoRegionsCreateRequest(ctx context.Context, options *WebSiteManagementClientListGeoRegionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + if options != nil && options.LinuxDynamicWorkersEnabled != nil { + reqQP.Set("linuxDynamicWorkersEnabled", strconv.FormatBool(*options.LinuxDynamicWorkersEnabled)) + } + if options != nil && options.LinuxWorkersEnabled != nil { + reqQP.Set("linuxWorkersEnabled", strconv.FormatBool(*options.LinuxWorkersEnabled)) + } + if options != nil && options.SKU != nil { + reqQP.Set("sku", string(*options.SKU)) + } + if options != nil && options.XenonWorkersEnabled != nil { + reqQP.Set("xenonWorkersEnabled", strconv.FormatBool(*options.XenonWorkersEnabled)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listGeoRegionsHandleResponse handles the ListGeoRegions response. +func (client *WebSiteManagementClient) listGeoRegionsHandleResponse(resp *http.Response) (WebSiteManagementClientListGeoRegionsResponse, error) { + result := WebSiteManagementClientListGeoRegionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GeoRegionCollection); err != nil { + return WebSiteManagementClientListGeoRegionsResponse{}, err + } + return result, nil +} + +// NewListPremierAddOnOffersPager - Description for List all premier add-on offers. +// +// Generated from API version 2024-04-01 +// - options - WebSiteManagementClientListPremierAddOnOffersOptions contains the optional parameters for the WebSiteManagementClient.NewListPremierAddOnOffersPager +// method. +func (client *WebSiteManagementClient) NewListPremierAddOnOffersPager(options *WebSiteManagementClientListPremierAddOnOffersOptions) *runtime.Pager[WebSiteManagementClientListPremierAddOnOffersResponse] { + return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListPremierAddOnOffersResponse]{ + More: func(page WebSiteManagementClientListPremierAddOnOffersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebSiteManagementClientListPremierAddOnOffersResponse) (WebSiteManagementClientListPremierAddOnOffersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListPremierAddOnOffersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPremierAddOnOffersCreateRequest(ctx, options) + }, nil) + if err != nil { + return WebSiteManagementClientListPremierAddOnOffersResponse{}, err + } + return client.listPremierAddOnOffersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listPremierAddOnOffersCreateRequest creates the ListPremierAddOnOffers request. +func (client *WebSiteManagementClient) listPremierAddOnOffersCreateRequest(ctx context.Context, options *WebSiteManagementClientListPremierAddOnOffersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listPremierAddOnOffersHandleResponse handles the ListPremierAddOnOffers response. +func (client *WebSiteManagementClient) listPremierAddOnOffersHandleResponse(resp *http.Response) (WebSiteManagementClientListPremierAddOnOffersResponse, error) { + result := WebSiteManagementClientListPremierAddOnOffersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOnOfferCollection); err != nil { + return WebSiteManagementClientListPremierAddOnOffersResponse{}, err + } + return result, nil +} + +// ListSKUs - Description for List all SKUs. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - options - WebSiteManagementClientListSKUsOptions contains the optional parameters for the WebSiteManagementClient.ListSKUs +// method. +func (client *WebSiteManagementClient) ListSKUs(ctx context.Context, options *WebSiteManagementClientListSKUsOptions) (WebSiteManagementClientListSKUsResponse, error) { + var err error + const operationName = "WebSiteManagementClient.ListSKUs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSKUsCreateRequest(ctx, options) + if err != nil { + return WebSiteManagementClientListSKUsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientListSKUsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientListSKUsResponse{}, err + } + resp, err := client.listSKUsHandleResponse(httpResp) + return resp, err +} + +// listSKUsCreateRequest creates the ListSKUs request. +func (client *WebSiteManagementClient) listSKUsCreateRequest(ctx context.Context, options *WebSiteManagementClientListSKUsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSKUsHandleResponse handles the ListSKUs response. +func (client *WebSiteManagementClient) listSKUsHandleResponse(resp *http.Response) (WebSiteManagementClientListSKUsResponse, error) { + result := WebSiteManagementClientListSKUsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SKUInfos); err != nil { + return WebSiteManagementClientListSKUsResponse{}, err + } + return result, nil +} + +// NewListSiteIdentifiersAssignedToHostNamePager - Description for List all apps that are assigned to a hostname. +// +// Generated from API version 2024-04-01 +// - nameIdentifier - Hostname information. +// - options - WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions contains the optional parameters for the +// WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager method. +func (client *WebSiteManagementClient) NewListSiteIdentifiersAssignedToHostNamePager(nameIdentifier NameIdentifier, options *WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions) *runtime.Pager[WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse] { + return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse]{ + More: func(page WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse) (WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteIdentifiersAssignedToHostNameCreateRequest(ctx, nameIdentifier, options) + }, nil) + if err != nil { + return WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{}, err + } + return client.listSiteIdentifiersAssignedToHostNameHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSiteIdentifiersAssignedToHostNameCreateRequest creates the ListSiteIdentifiersAssignedToHostName request. +func (client *WebSiteManagementClient) listSiteIdentifiersAssignedToHostNameCreateRequest(ctx context.Context, nameIdentifier NameIdentifier, options *WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, nameIdentifier); err != nil { + return nil, err + } + return req, nil +} + +// listSiteIdentifiersAssignedToHostNameHandleResponse handles the ListSiteIdentifiersAssignedToHostName response. +func (client *WebSiteManagementClient) listSiteIdentifiersAssignedToHostNameHandleResponse(resp *http.Response) (WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse, error) { + result := WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IdentifierCollection); err != nil { + return WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{}, err + } + return result, nil +} + +// NewListSourceControlsPager - Description for Gets the source controls available for Azure websites. +// +// Generated from API version 2024-04-01 +// - options - WebSiteManagementClientListSourceControlsOptions contains the optional parameters for the WebSiteManagementClient.NewListSourceControlsPager +// method. +func (client *WebSiteManagementClient) NewListSourceControlsPager(options *WebSiteManagementClientListSourceControlsOptions) *runtime.Pager[WebSiteManagementClientListSourceControlsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListSourceControlsResponse]{ + More: func(page WebSiteManagementClientListSourceControlsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebSiteManagementClientListSourceControlsResponse) (WebSiteManagementClientListSourceControlsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListSourceControlsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSourceControlsCreateRequest(ctx, options) + }, nil) + if err != nil { + return WebSiteManagementClientListSourceControlsResponse{}, err + } + return client.listSourceControlsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSourceControlsCreateRequest creates the ListSourceControls request. +func (client *WebSiteManagementClient) listSourceControlsCreateRequest(ctx context.Context, options *WebSiteManagementClientListSourceControlsOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/sourcecontrols" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSourceControlsHandleResponse handles the ListSourceControls response. +func (client *WebSiteManagementClient) listSourceControlsHandleResponse(resp *http.Response) (WebSiteManagementClientListSourceControlsResponse, error) { + result := WebSiteManagementClientListSourceControlsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SourceControlCollection); err != nil { + return WebSiteManagementClientListSourceControlsResponse{}, err + } + return result, nil +} + +// Move - Description for Move resources between resource groups. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - moveResourceEnvelope - Object that represents the resource to move. +// - options - WebSiteManagementClientMoveOptions contains the optional parameters for the WebSiteManagementClient.Move method. +func (client *WebSiteManagementClient) Move(ctx context.Context, resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope, options *WebSiteManagementClientMoveOptions) (WebSiteManagementClientMoveResponse, error) { + var err error + const operationName = "WebSiteManagementClient.Move" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.moveCreateRequest(ctx, resourceGroupName, moveResourceEnvelope, options) + if err != nil { + return WebSiteManagementClientMoveResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientMoveResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientMoveResponse{}, err + } + return WebSiteManagementClientMoveResponse{}, nil +} + +// moveCreateRequest creates the Move request. +func (client *WebSiteManagementClient) moveCreateRequest(ctx context.Context, resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope, options *WebSiteManagementClientMoveOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, moveResourceEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// UpdatePublishingUser - Description for Updates publishing user +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - userDetails - Details of publishing user +// - options - WebSiteManagementClientUpdatePublishingUserOptions contains the optional parameters for the WebSiteManagementClient.UpdatePublishingUser +// method. +func (client *WebSiteManagementClient) UpdatePublishingUser(ctx context.Context, userDetails User, options *WebSiteManagementClientUpdatePublishingUserOptions) (WebSiteManagementClientUpdatePublishingUserResponse, error) { + var err error + const operationName = "WebSiteManagementClient.UpdatePublishingUser" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updatePublishingUserCreateRequest(ctx, userDetails, options) + if err != nil { + return WebSiteManagementClientUpdatePublishingUserResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientUpdatePublishingUserResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientUpdatePublishingUserResponse{}, err + } + resp, err := client.updatePublishingUserHandleResponse(httpResp) + return resp, err +} + +// updatePublishingUserCreateRequest creates the UpdatePublishingUser request. +func (client *WebSiteManagementClient) updatePublishingUserCreateRequest(ctx context.Context, userDetails User, options *WebSiteManagementClientUpdatePublishingUserOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/publishingUsers/web" + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, userDetails); err != nil { + return nil, err + } + return req, nil +} + +// updatePublishingUserHandleResponse handles the UpdatePublishingUser response. +func (client *WebSiteManagementClient) updatePublishingUserHandleResponse(resp *http.Response) (WebSiteManagementClientUpdatePublishingUserResponse, error) { + result := WebSiteManagementClientUpdatePublishingUserResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.User); err != nil { + return WebSiteManagementClientUpdatePublishingUserResponse{}, err + } + return result, nil +} + +// UpdateSourceControl - Description for Updates source control token +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - sourceControlType - Type of source control +// - requestMessage - Source control token information +// - options - WebSiteManagementClientUpdateSourceControlOptions contains the optional parameters for the WebSiteManagementClient.UpdateSourceControl +// method. +func (client *WebSiteManagementClient) UpdateSourceControl(ctx context.Context, sourceControlType string, requestMessage SourceControl, options *WebSiteManagementClientUpdateSourceControlOptions) (WebSiteManagementClientUpdateSourceControlResponse, error) { + var err error + const operationName = "WebSiteManagementClient.UpdateSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateSourceControlCreateRequest(ctx, sourceControlType, requestMessage, options) + if err != nil { + return WebSiteManagementClientUpdateSourceControlResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientUpdateSourceControlResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientUpdateSourceControlResponse{}, err + } + resp, err := client.updateSourceControlHandleResponse(httpResp) + return resp, err +} + +// updateSourceControlCreateRequest creates the UpdateSourceControl request. +func (client *WebSiteManagementClient) updateSourceControlCreateRequest(ctx context.Context, sourceControlType string, requestMessage SourceControl, options *WebSiteManagementClientUpdateSourceControlOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}" + if sourceControlType == "" { + return nil, errors.New("parameter sourceControlType cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sourceControlType}", url.PathEscape(sourceControlType)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, requestMessage); err != nil { + return nil, err + } + return req, nil +} + +// updateSourceControlHandleResponse handles the UpdateSourceControl response. +func (client *WebSiteManagementClient) updateSourceControlHandleResponse(resp *http.Response) (WebSiteManagementClientUpdateSourceControlResponse, error) { + result := WebSiteManagementClientUpdateSourceControlResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SourceControl); err != nil { + return WebSiteManagementClientUpdateSourceControlResponse{}, err + } + return result, nil +} + +// Validate - Description for Validate if a resource can be created. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - validateRequest - Request with the resources to validate. +// - options - WebSiteManagementClientValidateOptions contains the optional parameters for the WebSiteManagementClient.Validate +// method. +func (client *WebSiteManagementClient) Validate(ctx context.Context, resourceGroupName string, validateRequest ValidateRequest, options *WebSiteManagementClientValidateOptions) (WebSiteManagementClientValidateResponse, error) { + var err error + const operationName = "WebSiteManagementClient.Validate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCreateRequest(ctx, resourceGroupName, validateRequest, options) + if err != nil { + return WebSiteManagementClientValidateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientValidateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientValidateResponse{}, err + } + resp, err := client.validateHandleResponse(httpResp) + return resp, err +} + +// validateCreateRequest creates the Validate request. +func (client *WebSiteManagementClient) validateCreateRequest(ctx context.Context, resourceGroupName string, validateRequest ValidateRequest, options *WebSiteManagementClientValidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, validateRequest); err != nil { + return nil, err + } + return req, nil +} + +// validateHandleResponse handles the Validate response. +func (client *WebSiteManagementClient) validateHandleResponse(resp *http.Response) (WebSiteManagementClientValidateResponse, error) { + result := WebSiteManagementClientValidateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ValidateResponse); err != nil { + return WebSiteManagementClientValidateResponse{}, err + } + return result, nil +} + +// ValidateMove - Description for Validate whether a resource can be moved. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - moveResourceEnvelope - Object that represents the resource to move. +// - options - WebSiteManagementClientValidateMoveOptions contains the optional parameters for the WebSiteManagementClient.ValidateMove +// method. +func (client *WebSiteManagementClient) ValidateMove(ctx context.Context, resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope, options *WebSiteManagementClientValidateMoveOptions) (WebSiteManagementClientValidateMoveResponse, error) { + var err error + const operationName = "WebSiteManagementClient.ValidateMove" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateMoveCreateRequest(ctx, resourceGroupName, moveResourceEnvelope, options) + if err != nil { + return WebSiteManagementClientValidateMoveResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientValidateMoveResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientValidateMoveResponse{}, err + } + return WebSiteManagementClientValidateMoveResponse{}, nil +} + +// validateMoveCreateRequest creates the ValidateMove request. +func (client *WebSiteManagementClient) validateMoveCreateRequest(ctx context.Context, resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope, options *WebSiteManagementClientValidateMoveOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, moveResourceEnvelope); err != nil { + return nil, err + } + return req, nil +} + +// VerifyHostingEnvironmentVnet - Description for Verifies if this VNET is compatible with an App Service Environment by analyzing +// the Network Security Group rules. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - parameters - VNET information +// - options - WebSiteManagementClientVerifyHostingEnvironmentVnetOptions contains the optional parameters for the WebSiteManagementClient.VerifyHostingEnvironmentVnet +// method. +func (client *WebSiteManagementClient) VerifyHostingEnvironmentVnet(ctx context.Context, parameters VnetParameters, options *WebSiteManagementClientVerifyHostingEnvironmentVnetOptions) (WebSiteManagementClientVerifyHostingEnvironmentVnetResponse, error) { + var err error + const operationName = "WebSiteManagementClient.VerifyHostingEnvironmentVnet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.verifyHostingEnvironmentVnetCreateRequest(ctx, parameters, options) + if err != nil { + return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, err + } + resp, err := client.verifyHostingEnvironmentVnetHandleResponse(httpResp) + return resp, err +} + +// verifyHostingEnvironmentVnetCreateRequest creates the VerifyHostingEnvironmentVnet request. +func (client *WebSiteManagementClient) verifyHostingEnvironmentVnetCreateRequest(ctx context.Context, parameters VnetParameters, options *WebSiteManagementClientVerifyHostingEnvironmentVnetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// verifyHostingEnvironmentVnetHandleResponse handles the VerifyHostingEnvironmentVnet response. +func (client *WebSiteManagementClient) verifyHostingEnvironmentVnetHandleResponse(resp *http.Response) (WebSiteManagementClientVerifyHostingEnvironmentVnetResponse, error) { + result := WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VnetValidationFailureDetails); err != nil { + return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactionrepetitions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactionrepetitions_client.go new file mode 100644 index 00000000..c5932944 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactionrepetitions_client.go @@ -0,0 +1,294 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkflowRunActionRepetitionsClient contains the methods for the WorkflowRunActionRepetitions group. +// Don't use this type directly, use NewWorkflowRunActionRepetitionsClient() instead. +type WorkflowRunActionRepetitionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkflowRunActionRepetitionsClient creates a new instance of WorkflowRunActionRepetitionsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkflowRunActionRepetitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionRepetitionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkflowRunActionRepetitionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get a workflow run action repetition. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - actionName - The workflow action name. +// - repetitionName - The workflow repetition. +// - options - WorkflowRunActionRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.Get +// method. +func (client *WorkflowRunActionRepetitionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsClientGetOptions) (WorkflowRunActionRepetitionsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionRepetitionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) + if err != nil { + return WorkflowRunActionRepetitionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowRunActionRepetitionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionRepetitionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkflowRunActionRepetitionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + if repetitionName == "" { + return nil, errors.New("parameter repetitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{repetitionName}", url.PathEscape(repetitionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowRunActionRepetitionsClient) getHandleResponse(resp *http.Response) (WorkflowRunActionRepetitionsClientGetResponse, error) { + result := WorkflowRunActionRepetitionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunActionRepetitionDefinition); err != nil { + return WorkflowRunActionRepetitionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Get all of a workflow run action repetitions. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - actionName - The workflow action name. +// - options - WorkflowRunActionRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListPager +// method. +func (client *WorkflowRunActionRepetitionsClient) NewListPager(resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionRepetitionsClientListOptions) *runtime.Pager[WorkflowRunActionRepetitionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionRepetitionsClientListResponse]{ + More: func(page WorkflowRunActionRepetitionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkflowRunActionRepetitionsClientListResponse) (WorkflowRunActionRepetitionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionRepetitionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) + }, nil) + if err != nil { + return WorkflowRunActionRepetitionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowRunActionRepetitionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionRepetitionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowRunActionRepetitionsClient) listHandleResponse(resp *http.Response) (WorkflowRunActionRepetitionsClientListResponse, error) { + result := WorkflowRunActionRepetitionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunActionRepetitionDefinitionCollection); err != nil { + return WorkflowRunActionRepetitionsClientListResponse{}, err + } + return result, nil +} + +// NewListExpressionTracesPager - Lists a workflow run expression trace. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - actionName - The workflow action name. +// - repetitionName - The workflow repetition. +// - options - WorkflowRunActionRepetitionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager +// method. +func (client *WorkflowRunActionRepetitionsClient) NewListExpressionTracesPager(resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsClientListExpressionTracesOptions) *runtime.Pager[WorkflowRunActionRepetitionsClientListExpressionTracesResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionRepetitionsClientListExpressionTracesResponse]{ + More: func(page WorkflowRunActionRepetitionsClientListExpressionTracesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkflowRunActionRepetitionsClientListExpressionTracesResponse) (WorkflowRunActionRepetitionsClientListExpressionTracesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listExpressionTracesCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) + }, nil) + if err != nil { + return WorkflowRunActionRepetitionsClientListExpressionTracesResponse{}, err + } + return client.listExpressionTracesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listExpressionTracesCreateRequest creates the ListExpressionTraces request. +func (client *WorkflowRunActionRepetitionsClient) listExpressionTracesCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsClientListExpressionTracesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + if repetitionName == "" { + return nil, errors.New("parameter repetitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{repetitionName}", url.PathEscape(repetitionName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listExpressionTracesHandleResponse handles the ListExpressionTraces response. +func (client *WorkflowRunActionRepetitionsClient) listExpressionTracesHandleResponse(resp *http.Response) (WorkflowRunActionRepetitionsClientListExpressionTracesResponse, error) { + result := WorkflowRunActionRepetitionsClientListExpressionTracesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressionTraces); err != nil { + return WorkflowRunActionRepetitionsClientListExpressionTracesResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactionrepetitionsrequesthistories_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactionrepetitionsrequesthistories_client.go new file mode 100644 index 00000000..e7b7a019 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactionrepetitionsrequesthistories_client.go @@ -0,0 +1,219 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkflowRunActionRepetitionsRequestHistoriesClient contains the methods for the WorkflowRunActionRepetitionsRequestHistories group. +// Don't use this type directly, use NewWorkflowRunActionRepetitionsRequestHistoriesClient() instead. +type WorkflowRunActionRepetitionsRequestHistoriesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkflowRunActionRepetitionsRequestHistoriesClient creates a new instance of WorkflowRunActionRepetitionsRequestHistoriesClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionRepetitionsRequestHistoriesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkflowRunActionRepetitionsRequestHistoriesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a workflow run repetition request history. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - actionName - The workflow action name. +// - repetitionName - The workflow repetition. +// - requestHistoryName - The request history name. +// - options - WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.Get +// method. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string, options *WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions) (WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionRepetitionsRequestHistoriesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName, options) + if err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string, options *WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + if repetitionName == "" { + return nil, errors.New("parameter repetitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{repetitionName}", url.PathEscape(repetitionName)) + if requestHistoryName == "" { + return nil, errors.New("parameter requestHistoryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{requestHistoryName}", url.PathEscape(requestHistoryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) getHandleResponse(resp *http.Response) (WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse, error) { + result := WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RequestHistory); err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List a workflow run repetition request history. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - actionName - The workflow action name. +// - repetitionName - The workflow repetition. +// - options - WorkflowRunActionRepetitionsRequestHistoriesClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager +// method. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) NewListPager(resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsRequestHistoriesClientListOptions) *runtime.Pager[WorkflowRunActionRepetitionsRequestHistoriesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionRepetitionsRequestHistoriesClientListResponse]{ + More: func(page WorkflowRunActionRepetitionsRequestHistoriesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkflowRunActionRepetitionsRequestHistoriesClientListResponse) (WorkflowRunActionRepetitionsRequestHistoriesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) + }, nil) + if err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsRequestHistoriesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + if repetitionName == "" { + return nil, errors.New("parameter repetitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{repetitionName}", url.PathEscape(repetitionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) listHandleResponse(resp *http.Response) (WorkflowRunActionRepetitionsRequestHistoriesClientListResponse, error) { + result := WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RequestHistoryListResult); err != nil { + return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactions_client.go new file mode 100644 index 00000000..e30b4b9e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactions_client.go @@ -0,0 +1,285 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkflowRunActionsClient contains the methods for the WorkflowRunActions group. +// Don't use this type directly, use NewWorkflowRunActionsClient() instead. +type WorkflowRunActionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkflowRunActionsClient creates a new instance of WorkflowRunActionsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkflowRunActionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkflowRunActionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a workflow run action. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - actionName - The workflow action name. +// - options - WorkflowRunActionsClientGetOptions contains the optional parameters for the WorkflowRunActionsClient.Get method. +func (client *WorkflowRunActionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionsClientGetOptions) (WorkflowRunActionsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) + if err != nil { + return WorkflowRunActionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowRunActionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkflowRunActionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowRunActionsClient) getHandleResponse(resp *http.Response) (WorkflowRunActionsClientGetResponse, error) { + result := WorkflowRunActionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunAction); err != nil { + return WorkflowRunActionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of workflow run actions. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - options - WorkflowRunActionsClientListOptions contains the optional parameters for the WorkflowRunActionsClient.NewListPager +// method. +func (client *WorkflowRunActionsClient) NewListPager(resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunActionsClientListOptions) *runtime.Pager[WorkflowRunActionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionsClientListResponse]{ + More: func(page WorkflowRunActionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkflowRunActionsClientListResponse) (WorkflowRunActionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, options) + }, nil) + if err != nil { + return WorkflowRunActionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowRunActionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunActionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowRunActionsClient) listHandleResponse(resp *http.Response) (WorkflowRunActionsClientListResponse, error) { + result := WorkflowRunActionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunActionListResult); err != nil { + return WorkflowRunActionsClientListResponse{}, err + } + return result, nil +} + +// NewListExpressionTracesPager - Lists a workflow run expression trace. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - actionName - The workflow action name. +// - options - WorkflowRunActionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionsClient.NewListExpressionTracesPager +// method. +func (client *WorkflowRunActionsClient) NewListExpressionTracesPager(resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionsClientListExpressionTracesOptions) *runtime.Pager[WorkflowRunActionsClientListExpressionTracesResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionsClientListExpressionTracesResponse]{ + More: func(page WorkflowRunActionsClientListExpressionTracesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkflowRunActionsClientListExpressionTracesResponse) (WorkflowRunActionsClientListExpressionTracesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionsClient.NewListExpressionTracesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listExpressionTracesCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) + }, nil) + if err != nil { + return WorkflowRunActionsClientListExpressionTracesResponse{}, err + } + return client.listExpressionTracesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listExpressionTracesCreateRequest creates the ListExpressionTraces request. +func (client *WorkflowRunActionsClient) listExpressionTracesCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionsClientListExpressionTracesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listExpressionTracesHandleResponse handles the ListExpressionTraces response. +func (client *WorkflowRunActionsClient) listExpressionTracesHandleResponse(resp *http.Response) (WorkflowRunActionsClientListExpressionTracesResponse, error) { + result := WorkflowRunActionsClientListExpressionTracesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressionTraces); err != nil { + return WorkflowRunActionsClientListExpressionTracesResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactionscoperepetitions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactionscoperepetitions_client.go new file mode 100644 index 00000000..82a2ce0c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowrunactionscoperepetitions_client.go @@ -0,0 +1,209 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkflowRunActionScopeRepetitionsClient contains the methods for the WorkflowRunActionScopeRepetitions group. +// Don't use this type directly, use NewWorkflowRunActionScopeRepetitionsClient() instead. +type WorkflowRunActionScopeRepetitionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkflowRunActionScopeRepetitionsClient creates a new instance of WorkflowRunActionScopeRepetitionsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionScopeRepetitionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkflowRunActionScopeRepetitionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get a workflow run action scoped repetition. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - actionName - The workflow action name. +// - repetitionName - The workflow repetition. +// - options - WorkflowRunActionScopeRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.Get +// method. +func (client *WorkflowRunActionScopeRepetitionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionScopeRepetitionsClientGetOptions) (WorkflowRunActionScopeRepetitionsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionScopeRepetitionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) + if err != nil { + return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkflowRunActionScopeRepetitionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionScopeRepetitionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + if repetitionName == "" { + return nil, errors.New("parameter repetitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{repetitionName}", url.PathEscape(repetitionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowRunActionScopeRepetitionsClient) getHandleResponse(resp *http.Response) (WorkflowRunActionScopeRepetitionsClientGetResponse, error) { + result := WorkflowRunActionScopeRepetitionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunActionRepetitionDefinition); err != nil { + return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List the workflow run action scoped repetitions. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - actionName - The workflow action name. +// - options - WorkflowRunActionScopeRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.NewListPager +// method. +func (client *WorkflowRunActionScopeRepetitionsClient) NewListPager(resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionScopeRepetitionsClientListOptions) *runtime.Pager[WorkflowRunActionScopeRepetitionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunActionScopeRepetitionsClientListResponse]{ + More: func(page WorkflowRunActionScopeRepetitionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkflowRunActionScopeRepetitionsClientListResponse) (WorkflowRunActionScopeRepetitionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionScopeRepetitionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) + }, nil) + if err != nil { + return WorkflowRunActionScopeRepetitionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowRunActionScopeRepetitionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionScopeRepetitionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + if actionName == "" { + return nil, errors.New("parameter actionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{actionName}", url.PathEscape(actionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowRunActionScopeRepetitionsClient) listHandleResponse(resp *http.Response) (WorkflowRunActionScopeRepetitionsClientListResponse, error) { + result := WorkflowRunActionScopeRepetitionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunActionRepetitionDefinitionCollection); err != nil { + return WorkflowRunActionScopeRepetitionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowruns_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowruns_client.go new file mode 100644 index 00000000..44178063 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowruns_client.go @@ -0,0 +1,258 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkflowRunsClient contains the methods for the WorkflowRuns group. +// Don't use this type directly, use NewWorkflowRunsClient() instead. +type WorkflowRunsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkflowRunsClient creates a new instance of WorkflowRunsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkflowRunsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkflowRunsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Cancel - Cancels a workflow run. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - options - WorkflowRunsClientCancelOptions contains the optional parameters for the WorkflowRunsClient.Cancel method. +func (client *WorkflowRunsClient) Cancel(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunsClientCancelOptions) (WorkflowRunsClientCancelResponse, error) { + var err error + const operationName = "WorkflowRunsClient.Cancel" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.cancelCreateRequest(ctx, resourceGroupName, name, workflowName, runName, options) + if err != nil { + return WorkflowRunsClientCancelResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowRunsClientCancelResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunsClientCancelResponse{}, err + } + return WorkflowRunsClientCancelResponse{}, nil +} + +// cancelCreateRequest creates the Cancel request. +func (client *WorkflowRunsClient) cancelCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunsClientCancelOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/cancel" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a workflow run. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - runName - The workflow run name. +// - options - WorkflowRunsClientGetOptions contains the optional parameters for the WorkflowRunsClient.Get method. +func (client *WorkflowRunsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunsClientGetOptions) (WorkflowRunsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, options) + if err != nil { + return WorkflowRunsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowRunsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkflowRunsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if runName == "" { + return nil, errors.New("parameter runName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{runName}", url.PathEscape(runName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowRunsClient) getHandleResponse(resp *http.Response) (WorkflowRunsClientGetResponse, error) { + result := WorkflowRunsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRun); err != nil { + return WorkflowRunsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of workflow runs. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - options - WorkflowRunsClientListOptions contains the optional parameters for the WorkflowRunsClient.NewListPager method. +func (client *WorkflowRunsClient) NewListPager(resourceGroupName string, name string, workflowName string, options *WorkflowRunsClientListOptions) *runtime.Pager[WorkflowRunsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowRunsClientListResponse]{ + More: func(page WorkflowRunsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkflowRunsClientListResponse) (WorkflowRunsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, options) + }, nil) + if err != nil { + return WorkflowRunsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowRunsClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WorkflowRunsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowRunsClient) listHandleResponse(resp *http.Response) (WorkflowRunsClientListResponse, error) { + result := WorkflowRunsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowRunListResult); err != nil { + return WorkflowRunsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflows_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflows_client.go new file mode 100644 index 00000000..8874ac3f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflows_client.go @@ -0,0 +1,171 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WorkflowsClient contains the methods for the Workflows group. +// Don't use this type directly, use NewWorkflowsClient() instead. +type WorkflowsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkflowsClient creates a new instance of WorkflowsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkflowsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkflowsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// RegenerateAccessKey - Regenerates the callback URL access key for request triggers. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - keyType - The access key type. +// - options - WorkflowsClientRegenerateAccessKeyOptions contains the optional parameters for the WorkflowsClient.RegenerateAccessKey +// method. +func (client *WorkflowsClient) RegenerateAccessKey(ctx context.Context, resourceGroupName string, name string, workflowName string, keyType RegenerateActionParameter, options *WorkflowsClientRegenerateAccessKeyOptions) (WorkflowsClientRegenerateAccessKeyResponse, error) { + var err error + const operationName = "WorkflowsClient.RegenerateAccessKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.regenerateAccessKeyCreateRequest(ctx, resourceGroupName, name, workflowName, keyType, options) + if err != nil { + return WorkflowsClientRegenerateAccessKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowsClientRegenerateAccessKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientRegenerateAccessKeyResponse{}, err + } + return WorkflowsClientRegenerateAccessKeyResponse{}, nil +} + +// regenerateAccessKeyCreateRequest creates the RegenerateAccessKey request. +func (client *WorkflowsClient) regenerateAccessKeyCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, keyType RegenerateActionParameter, options *WorkflowsClientRegenerateAccessKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/regenerateAccessKey" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, keyType); err != nil { + return nil, err + } + return req, nil +} + +// Validate - Validates the workflow definition. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - validate - The workflow. +// - options - WorkflowsClientValidateOptions contains the optional parameters for the WorkflowsClient.Validate method. +func (client *WorkflowsClient) Validate(ctx context.Context, resourceGroupName string, name string, workflowName string, validate Workflow, options *WorkflowsClientValidateOptions) (WorkflowsClientValidateResponse, error) { + var err error + const operationName = "WorkflowsClient.Validate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCreateRequest(ctx, resourceGroupName, name, workflowName, validate, options) + if err != nil { + return WorkflowsClientValidateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowsClientValidateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientValidateResponse{}, err + } + return WorkflowsClientValidateResponse{}, nil +} + +// validateCreateRequest creates the Validate request. +func (client *WorkflowsClient) validateCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, validate Workflow, options *WorkflowsClientValidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/validate" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, validate); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowtriggerhistories_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowtriggerhistories_client.go new file mode 100644 index 00000000..76ca6d3f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowtriggerhistories_client.go @@ -0,0 +1,297 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkflowTriggerHistoriesClient contains the methods for the WorkflowTriggerHistories group. +// Don't use this type directly, use NewWorkflowTriggerHistoriesClient() instead. +type WorkflowTriggerHistoriesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkflowTriggerHistoriesClient creates a new instance of WorkflowTriggerHistoriesClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkflowTriggerHistoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowTriggerHistoriesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkflowTriggerHistoriesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a workflow trigger history. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - triggerName - The workflow trigger name. +// - historyName - The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. +// - options - WorkflowTriggerHistoriesClientGetOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Get +// method. +func (client *WorkflowTriggerHistoriesClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientGetOptions) (WorkflowTriggerHistoriesClientGetResponse, error) { + var err error + const operationName = "WorkflowTriggerHistoriesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, historyName, options) + if err != nil { + return WorkflowTriggerHistoriesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowTriggerHistoriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggerHistoriesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkflowTriggerHistoriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + if historyName == "" { + return nil, errors.New("parameter historyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{historyName}", url.PathEscape(historyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowTriggerHistoriesClient) getHandleResponse(resp *http.Response) (WorkflowTriggerHistoriesClientGetResponse, error) { + result := WorkflowTriggerHistoriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowTriggerHistory); err != nil { + return WorkflowTriggerHistoriesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of workflow trigger histories. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - triggerName - The workflow trigger name. +// - options - WorkflowTriggerHistoriesClientListOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.NewListPager +// method. +func (client *WorkflowTriggerHistoriesClient) NewListPager(resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggerHistoriesClientListOptions) *runtime.Pager[WorkflowTriggerHistoriesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowTriggerHistoriesClientListResponse]{ + More: func(page WorkflowTriggerHistoriesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkflowTriggerHistoriesClientListResponse) (WorkflowTriggerHistoriesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowTriggerHistoriesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) + }, nil) + if err != nil { + return WorkflowTriggerHistoriesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowTriggerHistoriesClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggerHistoriesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowTriggerHistoriesClient) listHandleResponse(resp *http.Response) (WorkflowTriggerHistoriesClientListResponse, error) { + result := WorkflowTriggerHistoriesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowTriggerHistoryListResult); err != nil { + return WorkflowTriggerHistoriesClientListResponse{}, err + } + return result, nil +} + +// BeginResubmit - Resubmits a workflow run based on the trigger history. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - triggerName - The workflow trigger name. +// - historyName - The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. +// - options - WorkflowTriggerHistoriesClientBeginResubmitOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.BeginResubmit +// method. +func (client *WorkflowTriggerHistoriesClient) BeginResubmit(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientBeginResubmitOptions) (*runtime.Poller[WorkflowTriggerHistoriesClientResubmitResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resubmit(ctx, resourceGroupName, name, workflowName, triggerName, historyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkflowTriggerHistoriesClientResubmitResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkflowTriggerHistoriesClientResubmitResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Resubmit - Resubmits a workflow run based on the trigger history. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WorkflowTriggerHistoriesClient) resubmit(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientBeginResubmitOptions) (*http.Response, error) { + var err error + const operationName = "WorkflowTriggerHistoriesClient.BeginResubmit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resubmitCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, historyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resubmitCreateRequest creates the Resubmit request. +func (client *WorkflowTriggerHistoriesClient) resubmitCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientBeginResubmitOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + if historyName == "" { + return nil, errors.New("parameter historyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{historyName}", url.PathEscape(historyName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowtriggers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowtriggers_client.go new file mode 100644 index 00000000..3d9ec027 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowtriggers_client.go @@ -0,0 +1,431 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkflowTriggersClient contains the methods for the WorkflowTriggers group. +// Don't use this type directly, use NewWorkflowTriggersClient() instead. +type WorkflowTriggersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkflowTriggersClient creates a new instance of WorkflowTriggersClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkflowTriggersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowTriggersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkflowTriggersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a workflow trigger. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - triggerName - The workflow trigger name. +// - options - WorkflowTriggersClientGetOptions contains the optional parameters for the WorkflowTriggersClient.Get method. +func (client *WorkflowTriggersClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientGetOptions) (WorkflowTriggersClientGetResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) + if err != nil { + return WorkflowTriggersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowTriggersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkflowTriggersClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowTriggersClient) getHandleResponse(resp *http.Response) (WorkflowTriggersClientGetResponse, error) { + result := WorkflowTriggersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowTrigger); err != nil { + return WorkflowTriggersClientGetResponse{}, err + } + return result, nil +} + +// GetSchemaJSON - Get the trigger schema as JSON. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - triggerName - The workflow trigger name. +// - options - WorkflowTriggersClientGetSchemaJSONOptions contains the optional parameters for the WorkflowTriggersClient.GetSchemaJSON +// method. +func (client *WorkflowTriggersClient) GetSchemaJSON(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientGetSchemaJSONOptions) (WorkflowTriggersClientGetSchemaJSONResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.GetSchemaJSON" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSchemaJSONCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) + if err != nil { + return WorkflowTriggersClientGetSchemaJSONResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowTriggersClientGetSchemaJSONResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientGetSchemaJSONResponse{}, err + } + resp, err := client.getSchemaJSONHandleResponse(httpResp) + return resp, err +} + +// getSchemaJSONCreateRequest creates the GetSchemaJSON request. +func (client *WorkflowTriggersClient) getSchemaJSONCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientGetSchemaJSONOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/schemas/json" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSchemaJSONHandleResponse handles the GetSchemaJSON response. +func (client *WorkflowTriggersClient) getSchemaJSONHandleResponse(resp *http.Response) (WorkflowTriggersClientGetSchemaJSONResponse, error) { + result := WorkflowTriggersClientGetSchemaJSONResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JSONSchema); err != nil { + return WorkflowTriggersClientGetSchemaJSONResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of workflow triggers. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - options - WorkflowTriggersClientListOptions contains the optional parameters for the WorkflowTriggersClient.NewListPager +// method. +func (client *WorkflowTriggersClient) NewListPager(resourceGroupName string, name string, workflowName string, options *WorkflowTriggersClientListOptions) *runtime.Pager[WorkflowTriggersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowTriggersClientListResponse]{ + More: func(page WorkflowTriggersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkflowTriggersClientListResponse) (WorkflowTriggersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowTriggersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, options) + }, nil) + if err != nil { + return WorkflowTriggersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowTriggersClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WorkflowTriggersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowTriggersClient) listHandleResponse(resp *http.Response) (WorkflowTriggersClientListResponse, error) { + result := WorkflowTriggersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowTriggerListResult); err != nil { + return WorkflowTriggersClientListResponse{}, err + } + return result, nil +} + +// ListCallbackURL - Get the callback URL for a workflow trigger. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - triggerName - The workflow trigger name. +// - options - WorkflowTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowTriggersClient.ListCallbackURL +// method. +func (client *WorkflowTriggersClient) ListCallbackURL(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientListCallbackURLOptions) (WorkflowTriggersClientListCallbackURLResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.ListCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCallbackURLCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) + if err != nil { + return WorkflowTriggersClientListCallbackURLResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowTriggersClientListCallbackURLResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientListCallbackURLResponse{}, err + } + resp, err := client.listCallbackURLHandleResponse(httpResp) + return resp, err +} + +// listCallbackURLCreateRequest creates the ListCallbackURL request. +func (client *WorkflowTriggersClient) listCallbackURLCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientListCallbackURLOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCallbackURLHandleResponse handles the ListCallbackURL response. +func (client *WorkflowTriggersClient) listCallbackURLHandleResponse(resp *http.Response) (WorkflowTriggersClientListCallbackURLResponse, error) { + result := WorkflowTriggersClientListCallbackURLResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowTriggerCallbackURL); err != nil { + return WorkflowTriggersClientListCallbackURLResponse{}, err + } + return result, nil +} + +// BeginRun - Runs a workflow trigger. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - triggerName - The workflow trigger name. +// - options - WorkflowTriggersClientBeginRunOptions contains the optional parameters for the WorkflowTriggersClient.BeginRun +// method. +func (client *WorkflowTriggersClient) BeginRun(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientBeginRunOptions) (*runtime.Poller[WorkflowTriggersClientRunResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.run(ctx, resourceGroupName, name, workflowName, triggerName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkflowTriggersClientRunResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkflowTriggersClientRunResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Run - Runs a workflow trigger. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *WorkflowTriggersClient) run(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientBeginRunOptions) (*http.Response, error) { + var err error + const operationName = "WorkflowTriggersClient.BeginRun" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.runCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// runCreateRequest creates the Run request. +func (client *WorkflowTriggersClient) runCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientBeginRunOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/run" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if triggerName == "" { + return nil, errors.New("parameter triggerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{triggerName}", url.PathEscape(triggerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowversions_client.go new file mode 100644 index 00000000..172997ca --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4/workflowversions_client.go @@ -0,0 +1,192 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkflowVersionsClient contains the methods for the WorkflowVersions group. +// Don't use this type directly, use NewWorkflowVersionsClient() instead. +type WorkflowVersionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkflowVersionsClient creates a new instance of WorkflowVersionsClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkflowVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowVersionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkflowVersionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a workflow version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - versionID - The workflow versionId. +// - options - WorkflowVersionsClientGetOptions contains the optional parameters for the WorkflowVersionsClient.Get method. +func (client *WorkflowVersionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, versionID string, options *WorkflowVersionsClientGetOptions) (WorkflowVersionsClientGetResponse, error) { + var err error + const operationName = "WorkflowVersionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, versionID, options) + if err != nil { + return WorkflowVersionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkflowVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowVersionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkflowVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, versionID string, options *WorkflowVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + if versionID == "" { + return nil, errors.New("parameter versionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{versionId}", url.PathEscape(versionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkflowVersionsClient) getHandleResponse(resp *http.Response) (WorkflowVersionsClientGetResponse, error) { + result := WorkflowVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowVersion); err != nil { + return WorkflowVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of workflow versions. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - Name of the resource group to which the resource belongs. +// - name - Site name. +// - workflowName - The workflow name. +// - options - WorkflowVersionsClientListOptions contains the optional parameters for the WorkflowVersionsClient.NewListPager +// method. +func (client *WorkflowVersionsClient) NewListPager(resourceGroupName string, name string, workflowName string, options *WorkflowVersionsClientListOptions) *runtime.Pager[WorkflowVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkflowVersionsClientListResponse]{ + More: func(page WorkflowVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkflowVersionsClientListResponse) (WorkflowVersionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowVersionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, options) + }, nil) + if err != nil { + return WorkflowVersionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WorkflowVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WorkflowVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if workflowName == "" { + return nil, errors.New("parameter workflowName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workflowName}", url.PathEscape(workflowName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WorkflowVersionsClient) listHandleResponse(resp *http.Response) (WorkflowVersionsClientListResponse, error) { + result := WorkflowVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkflowVersionListResult); err != nil { + return WorkflowVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateorders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateorders_client.go deleted file mode 100644 index df37a62a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateorders_client.go +++ /dev/null @@ -1,1182 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// CertificateOrdersClient contains the methods for the AppServiceCertificateOrders group. -// Don't use this type directly, use NewCertificateOrdersClient() instead. -type CertificateOrdersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewCertificateOrdersClient creates a new instance of CertificateOrdersClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewCertificateOrdersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateOrdersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &CertificateOrdersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update a certificate purchase order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// certificateDistinguishedName - Distinguished name to use for the certificate order. -// options - CertificateOrdersClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdate -// method. -func (client *CertificateOrdersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrder, options *CertificateOrdersClientBeginCreateOrUpdateOptions) (*runtime.Poller[CertificateOrdersClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, certificateOrderName, certificateDistinguishedName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CertificateOrdersClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[CertificateOrdersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update a certificate purchase order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *CertificateOrdersClient) createOrUpdate(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrder, options *CertificateOrdersClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, certificateOrderName, certificateDistinguishedName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *CertificateOrdersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrder, options *CertificateOrdersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateDistinguishedName) -} - -// BeginCreateOrUpdateCertificate - Creates or updates a certificate and associates with key vault secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// name - Name of the certificate. -// keyVaultCertificate - Key vault certificate resource Id. -// options - CertificateOrdersClientBeginCreateOrUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdateCertificate -// method. -func (client *CertificateOrdersClient) BeginCreateOrUpdateCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificateResource, options *CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (*runtime.Poller[CertificateOrdersClientCreateOrUpdateCertificateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdateCertificate(ctx, resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CertificateOrdersClientCreateOrUpdateCertificateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[CertificateOrdersClientCreateOrUpdateCertificateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdateCertificate - Creates or updates a certificate and associates with key vault secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *CertificateOrdersClient) createOrUpdateCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificateResource, options *CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCertificateCreateRequest creates the CreateOrUpdateCertificate request. -func (client *CertificateOrdersClient) createOrUpdateCertificateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificateResource, options *CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, keyVaultCertificate) -} - -// Delete - Delete an existing certificate order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// options - CertificateOrdersClientDeleteOptions contains the optional parameters for the CertificateOrdersClient.Delete -// method. -func (client *CertificateOrdersClient) Delete(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientDeleteOptions) (CertificateOrdersClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, certificateOrderName, options) - if err != nil { - return CertificateOrdersClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CertificateOrdersClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return CertificateOrdersClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *CertificateOrdersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteCertificate - Delete the certificate associated with a certificate order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// name - Name of the certificate. -// options - CertificateOrdersClientDeleteCertificateOptions contains the optional parameters for the CertificateOrdersClient.DeleteCertificate -// method. -func (client *CertificateOrdersClient) DeleteCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *CertificateOrdersClientDeleteCertificateOptions) (CertificateOrdersClientDeleteCertificateResponse, error) { - req, err := client.deleteCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, options) - if err != nil { - return CertificateOrdersClientDeleteCertificateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientDeleteCertificateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CertificateOrdersClientDeleteCertificateResponse{}, runtime.NewResponseError(resp) - } - return CertificateOrdersClientDeleteCertificateResponse{}, nil -} - -// deleteCertificateCreateRequest creates the DeleteCertificate request. -func (client *CertificateOrdersClient) deleteCertificateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *CertificateOrdersClientDeleteCertificateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a certificate order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order.. -// options - CertificateOrdersClientGetOptions contains the optional parameters for the CertificateOrdersClient.Get method. -func (client *CertificateOrdersClient) Get(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientGetOptions) (CertificateOrdersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, certificateOrderName, options) - if err != nil { - return CertificateOrdersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *CertificateOrdersClient) getCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *CertificateOrdersClient) getHandleResponse(resp *http.Response) (CertificateOrdersClientGetResponse, error) { - result := CertificateOrdersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOrder); err != nil { - return CertificateOrdersClientGetResponse{}, err - } - return result, nil -} - -// GetCertificate - Get the certificate associated with a certificate order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// name - Name of the certificate. -// options - CertificateOrdersClientGetCertificateOptions contains the optional parameters for the CertificateOrdersClient.GetCertificate -// method. -func (client *CertificateOrdersClient) GetCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *CertificateOrdersClientGetCertificateOptions) (CertificateOrdersClientGetCertificateResponse, error) { - req, err := client.getCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, options) - if err != nil { - return CertificateOrdersClientGetCertificateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientGetCertificateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientGetCertificateResponse{}, runtime.NewResponseError(resp) - } - return client.getCertificateHandleResponse(resp) -} - -// getCertificateCreateRequest creates the GetCertificate request. -func (client *CertificateOrdersClient) getCertificateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *CertificateOrdersClientGetCertificateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getCertificateHandleResponse handles the GetCertificate response. -func (client *CertificateOrdersClient) getCertificateHandleResponse(resp *http.Response) (CertificateOrdersClientGetCertificateResponse, error) { - result := CertificateOrdersClientGetCertificateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateResource); err != nil { - return CertificateOrdersClientGetCertificateResponse{}, err - } - return result, nil -} - -// NewListPager - List all certificate orders in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - CertificateOrdersClientListOptions contains the optional parameters for the CertificateOrdersClient.List method. -func (client *CertificateOrdersClient) NewListPager(options *CertificateOrdersClientListOptions) *runtime.Pager[CertificateOrdersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[CertificateOrdersClientListResponse]{ - More: func(page CertificateOrdersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CertificateOrdersClientListResponse) (CertificateOrdersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificateOrdersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *CertificateOrdersClient) listCreateRequest(ctx context.Context, options *CertificateOrdersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *CertificateOrdersClient) listHandleResponse(resp *http.Response) (CertificateOrdersClientListResponse, error) { - result := CertificateOrdersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOrderCollection); err != nil { - return CertificateOrdersClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get certificate orders in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - CertificateOrdersClientListByResourceGroupOptions contains the optional parameters for the CertificateOrdersClient.ListByResourceGroup -// method. -func (client *CertificateOrdersClient) NewListByResourceGroupPager(resourceGroupName string, options *CertificateOrdersClientListByResourceGroupOptions) *runtime.Pager[CertificateOrdersClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[CertificateOrdersClientListByResourceGroupResponse]{ - More: func(page CertificateOrdersClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CertificateOrdersClientListByResourceGroupResponse) (CertificateOrdersClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificateOrdersClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *CertificateOrdersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *CertificateOrdersClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *CertificateOrdersClient) listByResourceGroupHandleResponse(resp *http.Response) (CertificateOrdersClientListByResourceGroupResponse, error) { - result := CertificateOrdersClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOrderCollection); err != nil { - return CertificateOrdersClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListCertificatesPager - List all certificates associated with a certificate order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// options - CertificateOrdersClientListCertificatesOptions contains the optional parameters for the CertificateOrdersClient.ListCertificates -// method. -func (client *CertificateOrdersClient) NewListCertificatesPager(resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientListCertificatesOptions) *runtime.Pager[CertificateOrdersClientListCertificatesResponse] { - return runtime.NewPager(runtime.PagingHandler[CertificateOrdersClientListCertificatesResponse]{ - More: func(page CertificateOrdersClientListCertificatesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CertificateOrdersClientListCertificatesResponse) (CertificateOrdersClientListCertificatesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCertificatesCreateRequest(ctx, resourceGroupName, certificateOrderName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificateOrdersClientListCertificatesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientListCertificatesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientListCertificatesResponse{}, runtime.NewResponseError(resp) - } - return client.listCertificatesHandleResponse(resp) - }, - }) -} - -// listCertificatesCreateRequest creates the ListCertificates request. -func (client *CertificateOrdersClient) listCertificatesCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientListCertificatesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listCertificatesHandleResponse handles the ListCertificates response. -func (client *CertificateOrdersClient) listCertificatesHandleResponse(resp *http.Response) (CertificateOrdersClientListCertificatesResponse, error) { - result := CertificateOrdersClientListCertificatesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateCollection); err != nil { - return CertificateOrdersClientListCertificatesResponse{}, err - } - return result, nil -} - -// Reissue - Reissue an existing certificate order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// reissueCertificateOrderRequest - Parameters for the reissue. -// options - CertificateOrdersClientReissueOptions contains the optional parameters for the CertificateOrdersClient.Reissue -// method. -func (client *CertificateOrdersClient) Reissue(ctx context.Context, resourceGroupName string, certificateOrderName string, reissueCertificateOrderRequest ReissueCertificateOrderRequest, options *CertificateOrdersClientReissueOptions) (CertificateOrdersClientReissueResponse, error) { - req, err := client.reissueCreateRequest(ctx, resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, options) - if err != nil { - return CertificateOrdersClientReissueResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientReissueResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientReissueResponse{}, runtime.NewResponseError(resp) - } - return CertificateOrdersClientReissueResponse{}, nil -} - -// reissueCreateRequest creates the Reissue request. -func (client *CertificateOrdersClient) reissueCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, reissueCertificateOrderRequest ReissueCertificateOrderRequest, options *CertificateOrdersClientReissueOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, reissueCertificateOrderRequest) -} - -// Renew - Renew an existing certificate order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// renewCertificateOrderRequest - Renew parameters -// options - CertificateOrdersClientRenewOptions contains the optional parameters for the CertificateOrdersClient.Renew method. -func (client *CertificateOrdersClient) Renew(ctx context.Context, resourceGroupName string, certificateOrderName string, renewCertificateOrderRequest RenewCertificateOrderRequest, options *CertificateOrdersClientRenewOptions) (CertificateOrdersClientRenewResponse, error) { - req, err := client.renewCreateRequest(ctx, resourceGroupName, certificateOrderName, renewCertificateOrderRequest, options) - if err != nil { - return CertificateOrdersClientRenewResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientRenewResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientRenewResponse{}, runtime.NewResponseError(resp) - } - return CertificateOrdersClientRenewResponse{}, nil -} - -// renewCreateRequest creates the Renew request. -func (client *CertificateOrdersClient) renewCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, renewCertificateOrderRequest RenewCertificateOrderRequest, options *CertificateOrdersClientRenewOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, renewCertificateOrderRequest) -} - -// ResendEmail - Resend certificate email. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// options - CertificateOrdersClientResendEmailOptions contains the optional parameters for the CertificateOrdersClient.ResendEmail -// method. -func (client *CertificateOrdersClient) ResendEmail(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientResendEmailOptions) (CertificateOrdersClientResendEmailResponse, error) { - req, err := client.resendEmailCreateRequest(ctx, resourceGroupName, certificateOrderName, options) - if err != nil { - return CertificateOrdersClientResendEmailResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientResendEmailResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientResendEmailResponse{}, runtime.NewResponseError(resp) - } - return CertificateOrdersClientResendEmailResponse{}, nil -} - -// resendEmailCreateRequest creates the ResendEmail request. -func (client *CertificateOrdersClient) resendEmailCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientResendEmailOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// ResendRequestEmails - Resend domain verification ownership email containing steps on how to verify a domain for a given -// certificate order -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// nameIdentifier - Email address -// options - CertificateOrdersClientResendRequestEmailsOptions contains the optional parameters for the CertificateOrdersClient.ResendRequestEmails -// method. -func (client *CertificateOrdersClient) ResendRequestEmails(ctx context.Context, resourceGroupName string, certificateOrderName string, nameIdentifier NameIdentifier, options *CertificateOrdersClientResendRequestEmailsOptions) (CertificateOrdersClientResendRequestEmailsResponse, error) { - req, err := client.resendRequestEmailsCreateRequest(ctx, resourceGroupName, certificateOrderName, nameIdentifier, options) - if err != nil { - return CertificateOrdersClientResendRequestEmailsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientResendRequestEmailsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientResendRequestEmailsResponse{}, runtime.NewResponseError(resp) - } - return CertificateOrdersClientResendRequestEmailsResponse{}, nil -} - -// resendRequestEmailsCreateRequest creates the ResendRequestEmails request. -func (client *CertificateOrdersClient) resendRequestEmailsCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, nameIdentifier NameIdentifier, options *CertificateOrdersClientResendRequestEmailsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, nameIdentifier) -} - -// RetrieveCertificateActions - Retrieve the list of certificate actions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the certificate order. -// options - CertificateOrdersClientRetrieveCertificateActionsOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateActions -// method. -func (client *CertificateOrdersClient) RetrieveCertificateActions(ctx context.Context, resourceGroupName string, name string, options *CertificateOrdersClientRetrieveCertificateActionsOptions) (CertificateOrdersClientRetrieveCertificateActionsResponse, error) { - req, err := client.retrieveCertificateActionsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return CertificateOrdersClientRetrieveCertificateActionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientRetrieveCertificateActionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientRetrieveCertificateActionsResponse{}, runtime.NewResponseError(resp) - } - return client.retrieveCertificateActionsHandleResponse(resp) -} - -// retrieveCertificateActionsCreateRequest creates the RetrieveCertificateActions request. -func (client *CertificateOrdersClient) retrieveCertificateActionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *CertificateOrdersClientRetrieveCertificateActionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// retrieveCertificateActionsHandleResponse handles the RetrieveCertificateActions response. -func (client *CertificateOrdersClient) retrieveCertificateActionsHandleResponse(resp *http.Response) (CertificateOrdersClientRetrieveCertificateActionsResponse, error) { - result := CertificateOrdersClientRetrieveCertificateActionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOrderActionArray); err != nil { - return CertificateOrdersClientRetrieveCertificateActionsResponse{}, err - } - return result, nil -} - -// RetrieveCertificateEmailHistory - Retrieve email history. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the certificate order. -// options - CertificateOrdersClientRetrieveCertificateEmailHistoryOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateEmailHistory -// method. -func (client *CertificateOrdersClient) RetrieveCertificateEmailHistory(ctx context.Context, resourceGroupName string, name string, options *CertificateOrdersClientRetrieveCertificateEmailHistoryOptions) (CertificateOrdersClientRetrieveCertificateEmailHistoryResponse, error) { - req, err := client.retrieveCertificateEmailHistoryCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, runtime.NewResponseError(resp) - } - return client.retrieveCertificateEmailHistoryHandleResponse(resp) -} - -// retrieveCertificateEmailHistoryCreateRequest creates the RetrieveCertificateEmailHistory request. -func (client *CertificateOrdersClient) retrieveCertificateEmailHistoryCreateRequest(ctx context.Context, resourceGroupName string, name string, options *CertificateOrdersClientRetrieveCertificateEmailHistoryOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// retrieveCertificateEmailHistoryHandleResponse handles the RetrieveCertificateEmailHistory response. -func (client *CertificateOrdersClient) retrieveCertificateEmailHistoryHandleResponse(resp *http.Response) (CertificateOrdersClientRetrieveCertificateEmailHistoryResponse, error) { - result := CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateEmailArray); err != nil { - return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, err - } - return result, nil -} - -// RetrieveSiteSeal - This method is used to obtain the site seal information for an issued certificate. A site seal is a -// graphic that the certificate purchaser can embed on their web site to show their visitors -// information about their SSL certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed -// that contains detailed information about the SSL certificate. The site seal -// token is used to link the site seal graphic image to the appropriate certificate details pop-up page display when a user -// clicks on the site seal. The site seal images are expected to be static images -// and hosted by the reseller, to minimize delays for customer page load times. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// siteSealRequest - Site seal request. -// options - CertificateOrdersClientRetrieveSiteSealOptions contains the optional parameters for the CertificateOrdersClient.RetrieveSiteSeal -// method. -func (client *CertificateOrdersClient) RetrieveSiteSeal(ctx context.Context, resourceGroupName string, certificateOrderName string, siteSealRequest SiteSealRequest, options *CertificateOrdersClientRetrieveSiteSealOptions) (CertificateOrdersClientRetrieveSiteSealResponse, error) { - req, err := client.retrieveSiteSealCreateRequest(ctx, resourceGroupName, certificateOrderName, siteSealRequest, options) - if err != nil { - return CertificateOrdersClientRetrieveSiteSealResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientRetrieveSiteSealResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientRetrieveSiteSealResponse{}, runtime.NewResponseError(resp) - } - return client.retrieveSiteSealHandleResponse(resp) -} - -// retrieveSiteSealCreateRequest creates the RetrieveSiteSeal request. -func (client *CertificateOrdersClient) retrieveSiteSealCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, siteSealRequest SiteSealRequest, options *CertificateOrdersClientRetrieveSiteSealOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteSealRequest) -} - -// retrieveSiteSealHandleResponse handles the RetrieveSiteSeal response. -func (client *CertificateOrdersClient) retrieveSiteSealHandleResponse(resp *http.Response) (CertificateOrdersClientRetrieveSiteSealResponse, error) { - result := CertificateOrdersClientRetrieveSiteSealResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteSeal); err != nil { - return CertificateOrdersClientRetrieveSiteSealResponse{}, err - } - return result, nil -} - -// Update - Create or update a certificate purchase order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// certificateDistinguishedName - Distinguished name to use for the certificate order. -// options - CertificateOrdersClientUpdateOptions contains the optional parameters for the CertificateOrdersClient.Update -// method. -func (client *CertificateOrdersClient) Update(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrderPatchResource, options *CertificateOrdersClientUpdateOptions) (CertificateOrdersClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, certificateOrderName, certificateDistinguishedName, options) - if err != nil { - return CertificateOrdersClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *CertificateOrdersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrderPatchResource, options *CertificateOrdersClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateDistinguishedName) -} - -// updateHandleResponse handles the Update response. -func (client *CertificateOrdersClient) updateHandleResponse(resp *http.Response) (CertificateOrdersClientUpdateResponse, error) { - result := CertificateOrdersClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateOrder); err != nil { - return CertificateOrdersClientUpdateResponse{}, err - } - return result, nil -} - -// UpdateCertificate - Creates or updates a certificate and associates with key vault secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// name - Name of the certificate. -// keyVaultCertificate - Key vault certificate resource Id. -// options - CertificateOrdersClientUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.UpdateCertificate -// method. -func (client *CertificateOrdersClient) UpdateCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificatePatchResource, options *CertificateOrdersClientUpdateCertificateOptions) (CertificateOrdersClientUpdateCertificateResponse, error) { - req, err := client.updateCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) - if err != nil { - return CertificateOrdersClientUpdateCertificateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientUpdateCertificateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientUpdateCertificateResponse{}, runtime.NewResponseError(resp) - } - return client.updateCertificateHandleResponse(resp) -} - -// updateCertificateCreateRequest creates the UpdateCertificate request. -func (client *CertificateOrdersClient) updateCertificateCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificatePatchResource, options *CertificateOrdersClientUpdateCertificateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, keyVaultCertificate) -} - -// updateCertificateHandleResponse handles the UpdateCertificate response. -func (client *CertificateOrdersClient) updateCertificateHandleResponse(resp *http.Response) (CertificateOrdersClientUpdateCertificateResponse, error) { - result := CertificateOrdersClientUpdateCertificateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CertificateResource); err != nil { - return CertificateOrdersClientUpdateCertificateResponse{}, err - } - return result, nil -} - -// ValidatePurchaseInformation - Validate information for a certificate order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// appServiceCertificateOrder - Information for a certificate order. -// options - CertificateOrdersClientValidatePurchaseInformationOptions contains the optional parameters for the CertificateOrdersClient.ValidatePurchaseInformation -// method. -func (client *CertificateOrdersClient) ValidatePurchaseInformation(ctx context.Context, appServiceCertificateOrder CertificateOrder, options *CertificateOrdersClientValidatePurchaseInformationOptions) (CertificateOrdersClientValidatePurchaseInformationResponse, error) { - req, err := client.validatePurchaseInformationCreateRequest(ctx, appServiceCertificateOrder, options) - if err != nil { - return CertificateOrdersClientValidatePurchaseInformationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientValidatePurchaseInformationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientValidatePurchaseInformationResponse{}, runtime.NewResponseError(resp) - } - return CertificateOrdersClientValidatePurchaseInformationResponse{}, nil -} - -// validatePurchaseInformationCreateRequest creates the ValidatePurchaseInformation request. -func (client *CertificateOrdersClient) validatePurchaseInformationCreateRequest(ctx context.Context, appServiceCertificateOrder CertificateOrder, options *CertificateOrdersClientValidatePurchaseInformationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appServiceCertificateOrder) -} - -// VerifyDomainOwnership - Verify domain ownership for this certificate order. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - Name of the certificate order. -// options - CertificateOrdersClientVerifyDomainOwnershipOptions contains the optional parameters for the CertificateOrdersClient.VerifyDomainOwnership -// method. -func (client *CertificateOrdersClient) VerifyDomainOwnership(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientVerifyDomainOwnershipOptions) (CertificateOrdersClientVerifyDomainOwnershipResponse, error) { - req, err := client.verifyDomainOwnershipCreateRequest(ctx, resourceGroupName, certificateOrderName, options) - if err != nil { - return CertificateOrdersClientVerifyDomainOwnershipResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersClientVerifyDomainOwnershipResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientVerifyDomainOwnershipResponse{}, runtime.NewResponseError(resp) - } - return CertificateOrdersClientVerifyDomainOwnershipResponse{}, nil -} - -// verifyDomainOwnershipCreateRequest creates the VerifyDomainOwnership request. -func (client *CertificateOrdersClient) verifyDomainOwnershipCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientVerifyDomainOwnershipOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateordersdiagnostics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateordersdiagnostics_client.go deleted file mode 100644 index 073bc165..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateordersdiagnostics_client.go +++ /dev/null @@ -1,199 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" - "time" -) - -// CertificateOrdersDiagnosticsClient contains the methods for the CertificateOrdersDiagnostics group. -// Don't use this type directly, use NewCertificateOrdersDiagnosticsClient() instead. -type CertificateOrdersDiagnosticsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewCertificateOrdersDiagnosticsClient creates a new instance of CertificateOrdersDiagnosticsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewCertificateOrdersDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateOrdersDiagnosticsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &CertificateOrdersDiagnosticsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// GetAppServiceCertificateOrderDetectorResponse - Microsoft.CertificateRegistration call to get a detector response from -// App Lens. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - The certificate order name for which the response is needed. -// detectorName - The detector name which needs to be run. -// options - CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions contains the optional -// parameters for the CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse method. -func (client *CertificateOrdersDiagnosticsClient) GetAppServiceCertificateOrderDetectorResponse(ctx context.Context, resourceGroupName string, certificateOrderName string, detectorName string, options *CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions) (CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse, error) { - req, err := client.getAppServiceCertificateOrderDetectorResponseCreateRequest(ctx, resourceGroupName, certificateOrderName, detectorName, options) - if err != nil { - return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, runtime.NewResponseError(resp) - } - return client.getAppServiceCertificateOrderDetectorResponseHandleResponse(resp) -} - -// getAppServiceCertificateOrderDetectorResponseCreateRequest creates the GetAppServiceCertificateOrderDetectorResponse request. -func (client *CertificateOrdersDiagnosticsClient) getAppServiceCertificateOrderDetectorResponseCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, detectorName string, options *CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if detectorName == "" { - return nil, errors.New("parameter detectorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StartTime != nil { - reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) - } - if options != nil && options.EndTime != nil { - reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) - } - if options != nil && options.TimeGrain != nil { - reqQP.Set("timeGrain", *options.TimeGrain) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAppServiceCertificateOrderDetectorResponseHandleResponse handles the GetAppServiceCertificateOrderDetectorResponse response. -func (client *CertificateOrdersDiagnosticsClient) getAppServiceCertificateOrderDetectorResponseHandleResponse(resp *http.Response) (CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse, error) { - result := CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponse); err != nil { - return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, err - } - return result, nil -} - -// NewListAppServiceCertificateOrderDetectorResponsePager - Microsoft.CertificateRegistration to get the list of detectors -// for this RP. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// certificateOrderName - The certificate order name for which the response is needed. -// options - CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions contains the optional -// parameters for the CertificateOrdersDiagnosticsClient.ListAppServiceCertificateOrderDetectorResponse method. -func (client *CertificateOrdersDiagnosticsClient) NewListAppServiceCertificateOrderDetectorResponsePager(resourceGroupName string, certificateOrderName string, options *CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions) *runtime.Pager[CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse] { - return runtime.NewPager(runtime.PagingHandler[CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse]{ - More: func(page CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse) (CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAppServiceCertificateOrderDetectorResponseCreateRequest(ctx, resourceGroupName, certificateOrderName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{}, runtime.NewResponseError(resp) - } - return client.listAppServiceCertificateOrderDetectorResponseHandleResponse(resp) - }, - }) -} - -// listAppServiceCertificateOrderDetectorResponseCreateRequest creates the ListAppServiceCertificateOrderDetectorResponse request. -func (client *CertificateOrdersDiagnosticsClient) listAppServiceCertificateOrderDetectorResponseCreateRequest(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if certificateOrderName == "" { - return nil, errors.New("parameter certificateOrderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{certificateOrderName}", url.PathEscape(certificateOrderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAppServiceCertificateOrderDetectorResponseHandleResponse handles the ListAppServiceCertificateOrderDetectorResponse response. -func (client *CertificateOrdersDiagnosticsClient) listAppServiceCertificateOrderDetectorResponseHandleResponse(resp *http.Response) (CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse, error) { - result := CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponseCollection); err != nil { - return CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateregistrationprovider_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateregistrationprovider_client.go deleted file mode 100644 index 53864983..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificateregistrationprovider_client.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// CertificateRegistrationProviderClient contains the methods for the CertificateRegistrationProvider group. -// Don't use this type directly, use NewCertificateRegistrationProviderClient() instead. -type CertificateRegistrationProviderClient struct { - host string - pl runtime.Pipeline -} - -// NewCertificateRegistrationProviderClient creates a new instance of CertificateRegistrationProviderClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewCertificateRegistrationProviderClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateRegistrationProviderClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &CertificateRegistrationProviderClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListOperationsPager - Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - CertificateRegistrationProviderClientListOperationsOptions contains the optional parameters for the CertificateRegistrationProviderClient.ListOperations -// method. -func (client *CertificateRegistrationProviderClient) NewListOperationsPager(options *CertificateRegistrationProviderClientListOperationsOptions) *runtime.Pager[CertificateRegistrationProviderClientListOperationsResponse] { - return runtime.NewPager(runtime.PagingHandler[CertificateRegistrationProviderClientListOperationsResponse]{ - More: func(page CertificateRegistrationProviderClientListOperationsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CertificateRegistrationProviderClientListOperationsResponse) (CertificateRegistrationProviderClientListOperationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listOperationsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificateRegistrationProviderClientListOperationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificateRegistrationProviderClientListOperationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateRegistrationProviderClientListOperationsResponse{}, runtime.NewResponseError(resp) - } - return client.listOperationsHandleResponse(resp) - }, - }) -} - -// listOperationsCreateRequest creates the ListOperations request. -func (client *CertificateRegistrationProviderClient) listOperationsCreateRequest(ctx context.Context, options *CertificateRegistrationProviderClientListOperationsOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.CertificateRegistration/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listOperationsHandleResponse handles the ListOperations response. -func (client *CertificateRegistrationProviderClient) listOperationsHandleResponse(resp *http.Response) (CertificateRegistrationProviderClientListOperationsResponse, error) { - result := CertificateRegistrationProviderClientListOperationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmOperationCollection); err != nil { - return CertificateRegistrationProviderClientListOperationsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificates_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificates_client.go deleted file mode 100644 index 51148580..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_certificates_client.go +++ /dev/null @@ -1,402 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// CertificatesClient contains the methods for the Certificates group. -// Don't use this type directly, use NewCertificatesClient() instead. -type CertificatesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewCertificatesClient creates a new instance of CertificatesClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &CertificatesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create or update a certificate. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the certificate. -// certificateEnvelope - Details of certificate, if it exists already. -// options - CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate -// method. -func (client *CertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, certificateEnvelope AppCertificate, options *CertificatesClientCreateOrUpdateOptions) (CertificatesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, certificateEnvelope, options) - if err != nil { - return CertificatesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificatesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, certificateEnvelope AppCertificate, options *CertificatesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateEnvelope) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Response) (CertificatesClientCreateOrUpdateResponse, error) { - result := CertificatesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppCertificate); err != nil { - return CertificatesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete a certificate. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the certificate. -// options - CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. -func (client *CertificatesClient) Delete(ctx context.Context, resourceGroupName string, name string, options *CertificatesClientDeleteOptions) (CertificatesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return CertificatesClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificatesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CertificatesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return CertificatesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *CertificatesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a certificate. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the certificate. -// options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. -func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, name string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return CertificatesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificatesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *CertificatesClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *CertificatesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *CertificatesClient) getHandleResponse(resp *http.Response) (CertificatesClientGetResponse, error) { - result := CertificatesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppCertificate); err != nil { - return CertificatesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get all certificates for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.List method. -func (client *CertificatesClient) NewListPager(options *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[CertificatesClientListResponse]{ - More: func(page CertificatesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CertificatesClientListResponse) (CertificatesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificatesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificatesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *CertificatesClient) listCreateRequest(ctx context.Context, options *CertificatesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *CertificatesClient) listHandleResponse(resp *http.Response) (CertificatesClientListResponse, error) { - result := CertificatesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppCertificateCollection); err != nil { - return CertificatesClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get all certificates in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - CertificatesClientListByResourceGroupOptions contains the optional parameters for the CertificatesClient.ListByResourceGroup -// method. -func (client *CertificatesClient) NewListByResourceGroupPager(resourceGroupName string, options *CertificatesClientListByResourceGroupOptions) *runtime.Pager[CertificatesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[CertificatesClientListByResourceGroupResponse]{ - More: func(page CertificatesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CertificatesClientListByResourceGroupResponse) (CertificatesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificatesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificatesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *CertificatesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *CertificatesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *CertificatesClient) listByResourceGroupHandleResponse(resp *http.Response) (CertificatesClientListByResourceGroupResponse, error) { - result := CertificatesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppCertificateCollection); err != nil { - return CertificatesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// Update - Create or update a certificate. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the certificate. -// certificateEnvelope - Details of certificate, if it exists already. -// options - CertificatesClientUpdateOptions contains the optional parameters for the CertificatesClient.Update method. -func (client *CertificatesClient) Update(ctx context.Context, resourceGroupName string, name string, certificateEnvelope AppCertificatePatchResource, options *CertificatesClientUpdateOptions) (CertificatesClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, name, certificateEnvelope, options) - if err != nil { - return CertificatesClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CertificatesClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, certificateEnvelope AppCertificatePatchResource, options *CertificatesClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateEnvelope) -} - -// updateHandleResponse handles the Update response. -func (client *CertificatesClient) updateHandleResponse(resp *http.Response) (CertificatesClientUpdateResponse, error) { - result := CertificatesClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AppCertificate); err != nil { - return CertificatesClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_constants.go deleted file mode 100644 index fa583ac7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_constants.go +++ /dev/null @@ -1,2046 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -const ( - moduleName = "armappservice" - moduleVersion = "v1.0.0" -) - -// ActiveRevisionsMode - ActiveRevisionsMode controls how active revisions are handled for the Container app:Multiple: multiple -// revisions can be active. If no value if provided, this is the defaultSingle: Only one revision -// can be active at a time. Revision weights can not be used in this mode -type ActiveRevisionsMode string - -const ( - ActiveRevisionsModeMultiple ActiveRevisionsMode = "multiple" - ActiveRevisionsModeSingle ActiveRevisionsMode = "single" -) - -// PossibleActiveRevisionsModeValues returns the possible values for the ActiveRevisionsMode const type. -func PossibleActiveRevisionsModeValues() []ActiveRevisionsMode { - return []ActiveRevisionsMode{ - ActiveRevisionsModeMultiple, - ActiveRevisionsModeSingle, - } -} - -type AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem string - -const ( - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem = "ExpirationNotInRenewalTimeRange" - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem = "RegistrationStatusNotSupportedForRenewal" - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem = "SubscriptionNotActive" -) - -// PossibleAppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemValues returns the possible values for the AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem const type. -func PossibleAppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemValues() []AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem { - return []AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem{ - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange, - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal, - AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive, - } -} - -type AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem string - -const ( - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem = "ExpirationNotInRenewalTimeRange" - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem = "RegistrationStatusNotSupportedForRenewal" - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem = "SubscriptionNotActive" -) - -// PossibleAppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemValues returns the possible values for the AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem const type. -func PossibleAppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemValues() []AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem { - return []AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem{ - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemExpirationNotInRenewalTimeRange, - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal, - AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItemSubscriptionNotActive, - } -} - -// AppServicePlanRestrictions - App Service plans this offer is restricted to. -type AppServicePlanRestrictions string - -const ( - AppServicePlanRestrictionsNone AppServicePlanRestrictions = "None" - AppServicePlanRestrictionsFree AppServicePlanRestrictions = "Free" - AppServicePlanRestrictionsShared AppServicePlanRestrictions = "Shared" - AppServicePlanRestrictionsBasic AppServicePlanRestrictions = "Basic" - AppServicePlanRestrictionsStandard AppServicePlanRestrictions = "Standard" - AppServicePlanRestrictionsPremium AppServicePlanRestrictions = "Premium" -) - -// PossibleAppServicePlanRestrictionsValues returns the possible values for the AppServicePlanRestrictions const type. -func PossibleAppServicePlanRestrictionsValues() []AppServicePlanRestrictions { - return []AppServicePlanRestrictions{ - AppServicePlanRestrictionsNone, - AppServicePlanRestrictionsFree, - AppServicePlanRestrictionsShared, - AppServicePlanRestrictionsBasic, - AppServicePlanRestrictionsStandard, - AppServicePlanRestrictionsPremium, - } -} - -// AutoHealActionType - Predefined action to be taken. -type AutoHealActionType string - -const ( - AutoHealActionTypeRecycle AutoHealActionType = "Recycle" - AutoHealActionTypeLogEvent AutoHealActionType = "LogEvent" - AutoHealActionTypeCustomAction AutoHealActionType = "CustomAction" -) - -// PossibleAutoHealActionTypeValues returns the possible values for the AutoHealActionType const type. -func PossibleAutoHealActionTypeValues() []AutoHealActionType { - return []AutoHealActionType{ - AutoHealActionTypeRecycle, - AutoHealActionTypeLogEvent, - AutoHealActionTypeCustomAction, - } -} - -// AzureResourceType - Type of the Azure resource the hostname is assigned to. -type AzureResourceType string - -const ( - AzureResourceTypeWebsite AzureResourceType = "Website" - AzureResourceTypeTrafficManager AzureResourceType = "TrafficManager" -) - -// PossibleAzureResourceTypeValues returns the possible values for the AzureResourceType const type. -func PossibleAzureResourceTypeValues() []AzureResourceType { - return []AzureResourceType{ - AzureResourceTypeWebsite, - AzureResourceTypeTrafficManager, - } -} - -// AzureStorageState - State of the storage account. -type AzureStorageState string - -const ( - AzureStorageStateOk AzureStorageState = "Ok" - AzureStorageStateInvalidCredentials AzureStorageState = "InvalidCredentials" - AzureStorageStateInvalidShare AzureStorageState = "InvalidShare" - AzureStorageStateNotValidated AzureStorageState = "NotValidated" -) - -// PossibleAzureStorageStateValues returns the possible values for the AzureStorageState const type. -func PossibleAzureStorageStateValues() []AzureStorageState { - return []AzureStorageState{ - AzureStorageStateOk, - AzureStorageStateInvalidCredentials, - AzureStorageStateInvalidShare, - AzureStorageStateNotValidated, - } -} - -// AzureStorageType - Type of storage. -type AzureStorageType string - -const ( - AzureStorageTypeAzureFiles AzureStorageType = "AzureFiles" - AzureStorageTypeAzureBlob AzureStorageType = "AzureBlob" -) - -// PossibleAzureStorageTypeValues returns the possible values for the AzureStorageType const type. -func PossibleAzureStorageTypeValues() []AzureStorageType { - return []AzureStorageType{ - AzureStorageTypeAzureFiles, - AzureStorageTypeAzureBlob, - } -} - -// BackupItemStatus - Backup status. -type BackupItemStatus string - -const ( - BackupItemStatusInProgress BackupItemStatus = "InProgress" - BackupItemStatusFailed BackupItemStatus = "Failed" - BackupItemStatusSucceeded BackupItemStatus = "Succeeded" - BackupItemStatusTimedOut BackupItemStatus = "TimedOut" - BackupItemStatusCreated BackupItemStatus = "Created" - BackupItemStatusSkipped BackupItemStatus = "Skipped" - BackupItemStatusPartiallySucceeded BackupItemStatus = "PartiallySucceeded" - BackupItemStatusDeleteInProgress BackupItemStatus = "DeleteInProgress" - BackupItemStatusDeleteFailed BackupItemStatus = "DeleteFailed" - BackupItemStatusDeleted BackupItemStatus = "Deleted" -) - -// PossibleBackupItemStatusValues returns the possible values for the BackupItemStatus const type. -func PossibleBackupItemStatusValues() []BackupItemStatus { - return []BackupItemStatus{ - BackupItemStatusInProgress, - BackupItemStatusFailed, - BackupItemStatusSucceeded, - BackupItemStatusTimedOut, - BackupItemStatusCreated, - BackupItemStatusSkipped, - BackupItemStatusPartiallySucceeded, - BackupItemStatusDeleteInProgress, - BackupItemStatusDeleteFailed, - BackupItemStatusDeleted, - } -} - -// BackupRestoreOperationType - Operation type. -type BackupRestoreOperationType string - -const ( - BackupRestoreOperationTypeDefault BackupRestoreOperationType = "Default" - BackupRestoreOperationTypeClone BackupRestoreOperationType = "Clone" - BackupRestoreOperationTypeRelocation BackupRestoreOperationType = "Relocation" - BackupRestoreOperationTypeSnapshot BackupRestoreOperationType = "Snapshot" - BackupRestoreOperationTypeCloudFS BackupRestoreOperationType = "CloudFS" -) - -// PossibleBackupRestoreOperationTypeValues returns the possible values for the BackupRestoreOperationType const type. -func PossibleBackupRestoreOperationTypeValues() []BackupRestoreOperationType { - return []BackupRestoreOperationType{ - BackupRestoreOperationTypeDefault, - BackupRestoreOperationTypeClone, - BackupRestoreOperationTypeRelocation, - BackupRestoreOperationTypeSnapshot, - BackupRestoreOperationTypeCloudFS, - } -} - -// BuildStatus - The status of the static site build. -type BuildStatus string - -const ( - BuildStatusDeleting BuildStatus = "Deleting" - BuildStatusDeploying BuildStatus = "Deploying" - BuildStatusDetached BuildStatus = "Detached" - BuildStatusFailed BuildStatus = "Failed" - BuildStatusReady BuildStatus = "Ready" - BuildStatusUploading BuildStatus = "Uploading" - BuildStatusWaitingForDeployment BuildStatus = "WaitingForDeployment" -) - -// PossibleBuildStatusValues returns the possible values for the BuildStatus const type. -func PossibleBuildStatusValues() []BuildStatus { - return []BuildStatus{ - BuildStatusDeleting, - BuildStatusDeploying, - BuildStatusDetached, - BuildStatusFailed, - BuildStatusReady, - BuildStatusUploading, - BuildStatusWaitingForDeployment, - } -} - -// BuiltInAuthenticationProvider - 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". -type BuiltInAuthenticationProvider string - -const ( - BuiltInAuthenticationProviderAzureActiveDirectory BuiltInAuthenticationProvider = "AzureActiveDirectory" - BuiltInAuthenticationProviderFacebook BuiltInAuthenticationProvider = "Facebook" - BuiltInAuthenticationProviderGoogle BuiltInAuthenticationProvider = "Google" - BuiltInAuthenticationProviderMicrosoftAccount BuiltInAuthenticationProvider = "MicrosoftAccount" - BuiltInAuthenticationProviderTwitter BuiltInAuthenticationProvider = "Twitter" - BuiltInAuthenticationProviderGithub BuiltInAuthenticationProvider = "Github" -) - -// PossibleBuiltInAuthenticationProviderValues returns the possible values for the BuiltInAuthenticationProvider const type. -func PossibleBuiltInAuthenticationProviderValues() []BuiltInAuthenticationProvider { - return []BuiltInAuthenticationProvider{ - BuiltInAuthenticationProviderAzureActiveDirectory, - BuiltInAuthenticationProviderFacebook, - BuiltInAuthenticationProviderGoogle, - BuiltInAuthenticationProviderMicrosoftAccount, - BuiltInAuthenticationProviderTwitter, - BuiltInAuthenticationProviderGithub, - } -} - -// CertificateOrderActionType - Action type. -type CertificateOrderActionType string - -const ( - CertificateOrderActionTypeCertificateIssued CertificateOrderActionType = "CertificateIssued" - CertificateOrderActionTypeCertificateOrderCanceled CertificateOrderActionType = "CertificateOrderCanceled" - CertificateOrderActionTypeCertificateOrderCreated CertificateOrderActionType = "CertificateOrderCreated" - CertificateOrderActionTypeCertificateRevoked CertificateOrderActionType = "CertificateRevoked" - CertificateOrderActionTypeDomainValidationComplete CertificateOrderActionType = "DomainValidationComplete" - CertificateOrderActionTypeFraudDetected CertificateOrderActionType = "FraudDetected" - CertificateOrderActionTypeOrgNameChange CertificateOrderActionType = "OrgNameChange" - CertificateOrderActionTypeOrgValidationComplete CertificateOrderActionType = "OrgValidationComplete" - CertificateOrderActionTypeSanDrop CertificateOrderActionType = "SanDrop" - CertificateOrderActionTypeFraudCleared CertificateOrderActionType = "FraudCleared" - CertificateOrderActionTypeCertificateExpired CertificateOrderActionType = "CertificateExpired" - CertificateOrderActionTypeCertificateExpirationWarning CertificateOrderActionType = "CertificateExpirationWarning" - CertificateOrderActionTypeFraudDocumentationRequired CertificateOrderActionType = "FraudDocumentationRequired" - CertificateOrderActionTypeUnknown CertificateOrderActionType = "Unknown" -) - -// PossibleCertificateOrderActionTypeValues returns the possible values for the CertificateOrderActionType const type. -func PossibleCertificateOrderActionTypeValues() []CertificateOrderActionType { - return []CertificateOrderActionType{ - CertificateOrderActionTypeCertificateIssued, - CertificateOrderActionTypeCertificateOrderCanceled, - CertificateOrderActionTypeCertificateOrderCreated, - CertificateOrderActionTypeCertificateRevoked, - CertificateOrderActionTypeDomainValidationComplete, - CertificateOrderActionTypeFraudDetected, - CertificateOrderActionTypeOrgNameChange, - CertificateOrderActionTypeOrgValidationComplete, - CertificateOrderActionTypeSanDrop, - CertificateOrderActionTypeFraudCleared, - CertificateOrderActionTypeCertificateExpired, - CertificateOrderActionTypeCertificateExpirationWarning, - CertificateOrderActionTypeFraudDocumentationRequired, - CertificateOrderActionTypeUnknown, - } -} - -// CertificateOrderStatus - Current order status. -type CertificateOrderStatus string - -const ( - CertificateOrderStatusPendingissuance CertificateOrderStatus = "Pendingissuance" - CertificateOrderStatusIssued CertificateOrderStatus = "Issued" - CertificateOrderStatusRevoked CertificateOrderStatus = "Revoked" - CertificateOrderStatusCanceled CertificateOrderStatus = "Canceled" - CertificateOrderStatusDenied CertificateOrderStatus = "Denied" - CertificateOrderStatusPendingrevocation CertificateOrderStatus = "Pendingrevocation" - CertificateOrderStatusPendingRekey CertificateOrderStatus = "PendingRekey" - CertificateOrderStatusUnused CertificateOrderStatus = "Unused" - CertificateOrderStatusExpired CertificateOrderStatus = "Expired" - CertificateOrderStatusNotSubmitted CertificateOrderStatus = "NotSubmitted" -) - -// PossibleCertificateOrderStatusValues returns the possible values for the CertificateOrderStatus const type. -func PossibleCertificateOrderStatusValues() []CertificateOrderStatus { - return []CertificateOrderStatus{ - CertificateOrderStatusPendingissuance, - CertificateOrderStatusIssued, - CertificateOrderStatusRevoked, - CertificateOrderStatusCanceled, - CertificateOrderStatusDenied, - CertificateOrderStatusPendingrevocation, - CertificateOrderStatusPendingRekey, - CertificateOrderStatusUnused, - CertificateOrderStatusExpired, - CertificateOrderStatusNotSubmitted, - } -} - -// CertificateProductType - Certificate product type. -type CertificateProductType string - -const ( - CertificateProductTypeStandardDomainValidatedSSL CertificateProductType = "StandardDomainValidatedSsl" - CertificateProductTypeStandardDomainValidatedWildCardSSL CertificateProductType = "StandardDomainValidatedWildCardSsl" -) - -// PossibleCertificateProductTypeValues returns the possible values for the CertificateProductType const type. -func PossibleCertificateProductTypeValues() []CertificateProductType { - return []CertificateProductType{ - CertificateProductTypeStandardDomainValidatedSSL, - CertificateProductTypeStandardDomainValidatedWildCardSSL, - } -} - -// Channels - List of channels that this recommendation can apply. -type Channels string - -const ( - ChannelsNotification Channels = "Notification" - ChannelsAPI Channels = "Api" - ChannelsEmail Channels = "Email" - ChannelsWebhook Channels = "Webhook" - ChannelsAll Channels = "All" -) - -// PossibleChannelsValues returns the possible values for the Channels const type. -func PossibleChannelsValues() []Channels { - return []Channels{ - ChannelsNotification, - ChannelsAPI, - ChannelsEmail, - ChannelsWebhook, - ChannelsAll, - } -} - -// CheckNameResourceTypes - Resource type used for verification. -type CheckNameResourceTypes string - -const ( - CheckNameResourceTypesHostingEnvironment CheckNameResourceTypes = "HostingEnvironment" - CheckNameResourceTypesMicrosoftWebHostingEnvironments CheckNameResourceTypes = "Microsoft.Web/hostingEnvironments" - CheckNameResourceTypesMicrosoftWebPublishingUsers CheckNameResourceTypes = "Microsoft.Web/publishingUsers" - CheckNameResourceTypesMicrosoftWebSites CheckNameResourceTypes = "Microsoft.Web/sites" - CheckNameResourceTypesMicrosoftWebSitesSlots CheckNameResourceTypes = "Microsoft.Web/sites/slots" - CheckNameResourceTypesPublishingUser CheckNameResourceTypes = "PublishingUser" - CheckNameResourceTypesSite CheckNameResourceTypes = "Site" - CheckNameResourceTypesSlot CheckNameResourceTypes = "Slot" -) - -// PossibleCheckNameResourceTypesValues returns the possible values for the CheckNameResourceTypes const type. -func PossibleCheckNameResourceTypesValues() []CheckNameResourceTypes { - return []CheckNameResourceTypes{ - CheckNameResourceTypesHostingEnvironment, - CheckNameResourceTypesMicrosoftWebHostingEnvironments, - CheckNameResourceTypesMicrosoftWebPublishingUsers, - CheckNameResourceTypesMicrosoftWebSites, - CheckNameResourceTypesMicrosoftWebSitesSlots, - CheckNameResourceTypesPublishingUser, - CheckNameResourceTypesSite, - CheckNameResourceTypesSlot, - } -} - -// 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. -type ClientCertMode string - -const ( - ClientCertModeRequired ClientCertMode = "Required" - ClientCertModeOptional ClientCertMode = "Optional" - ClientCertModeOptionalInteractiveUser ClientCertMode = "OptionalInteractiveUser" -) - -// PossibleClientCertModeValues returns the possible values for the ClientCertMode const type. -func PossibleClientCertModeValues() []ClientCertMode { - return []ClientCertMode{ - ClientCertModeRequired, - ClientCertModeOptional, - ClientCertModeOptionalInteractiveUser, - } -} - -// CloneAbilityResult - Name of app. -type CloneAbilityResult string - -const ( - CloneAbilityResultCloneable CloneAbilityResult = "Cloneable" - CloneAbilityResultPartiallyCloneable CloneAbilityResult = "PartiallyCloneable" - CloneAbilityResultNotCloneable CloneAbilityResult = "NotCloneable" -) - -// PossibleCloneAbilityResultValues returns the possible values for the CloneAbilityResult const type. -func PossibleCloneAbilityResultValues() []CloneAbilityResult { - return []CloneAbilityResult{ - CloneAbilityResultCloneable, - CloneAbilityResultPartiallyCloneable, - CloneAbilityResultNotCloneable, - } -} - -// ComputeModeOptions - Shared/dedicated workers. -type ComputeModeOptions string - -const ( - ComputeModeOptionsShared ComputeModeOptions = "Shared" - ComputeModeOptionsDedicated ComputeModeOptions = "Dedicated" - ComputeModeOptionsDynamic ComputeModeOptions = "Dynamic" -) - -// PossibleComputeModeOptionsValues returns the possible values for the ComputeModeOptions const type. -func PossibleComputeModeOptionsValues() []ComputeModeOptions { - return []ComputeModeOptions{ - ComputeModeOptionsShared, - ComputeModeOptionsDedicated, - ComputeModeOptionsDynamic, - } -} - -// ConnectionStringType - Type of database. -type ConnectionStringType string - -const ( - ConnectionStringTypeMySQL ConnectionStringType = "MySql" - ConnectionStringTypeSQLServer ConnectionStringType = "SQLServer" - ConnectionStringTypeSQLAzure ConnectionStringType = "SQLAzure" - ConnectionStringTypeCustom ConnectionStringType = "Custom" - ConnectionStringTypeNotificationHub ConnectionStringType = "NotificationHub" - ConnectionStringTypeServiceBus ConnectionStringType = "ServiceBus" - ConnectionStringTypeEventHub ConnectionStringType = "EventHub" - ConnectionStringTypeAPIHub ConnectionStringType = "ApiHub" - ConnectionStringTypeDocDb ConnectionStringType = "DocDb" - ConnectionStringTypeRedisCache ConnectionStringType = "RedisCache" - ConnectionStringTypePostgreSQL ConnectionStringType = "PostgreSQL" -) - -// PossibleConnectionStringTypeValues returns the possible values for the ConnectionStringType const type. -func PossibleConnectionStringTypeValues() []ConnectionStringType { - return []ConnectionStringType{ - ConnectionStringTypeMySQL, - ConnectionStringTypeSQLServer, - ConnectionStringTypeSQLAzure, - ConnectionStringTypeCustom, - ConnectionStringTypeNotificationHub, - ConnectionStringTypeServiceBus, - ConnectionStringTypeEventHub, - ConnectionStringTypeAPIHub, - ConnectionStringTypeDocDb, - ConnectionStringTypeRedisCache, - ConnectionStringTypePostgreSQL, - } -} - -// ContainerAppProvisioningState - Provisioning state of the Container App. -type ContainerAppProvisioningState string - -const ( - ContainerAppProvisioningStateCanceled ContainerAppProvisioningState = "Canceled" - ContainerAppProvisioningStateFailed ContainerAppProvisioningState = "Failed" - ContainerAppProvisioningStateInProgress ContainerAppProvisioningState = "InProgress" - ContainerAppProvisioningStateSucceeded ContainerAppProvisioningState = "Succeeded" -) - -// PossibleContainerAppProvisioningStateValues returns the possible values for the ContainerAppProvisioningState const type. -func PossibleContainerAppProvisioningStateValues() []ContainerAppProvisioningState { - return []ContainerAppProvisioningState{ - ContainerAppProvisioningStateCanceled, - ContainerAppProvisioningStateFailed, - ContainerAppProvisioningStateInProgress, - ContainerAppProvisioningStateSucceeded, - } -} - -// ContinuousWebJobStatus - Job status. -type ContinuousWebJobStatus string - -const ( - ContinuousWebJobStatusInitializing ContinuousWebJobStatus = "Initializing" - ContinuousWebJobStatusStarting ContinuousWebJobStatus = "Starting" - ContinuousWebJobStatusRunning ContinuousWebJobStatus = "Running" - ContinuousWebJobStatusPendingRestart ContinuousWebJobStatus = "PendingRestart" - ContinuousWebJobStatusStopped ContinuousWebJobStatus = "Stopped" -) - -// PossibleContinuousWebJobStatusValues returns the possible values for the ContinuousWebJobStatus const type. -func PossibleContinuousWebJobStatusValues() []ContinuousWebJobStatus { - return []ContinuousWebJobStatus{ - ContinuousWebJobStatusInitializing, - ContinuousWebJobStatusStarting, - ContinuousWebJobStatusRunning, - ContinuousWebJobStatusPendingRestart, - ContinuousWebJobStatusStopped, - } -} - -// CookieExpirationConvention - The convention used when determining the session cookie's expiration. -type CookieExpirationConvention string - -const ( - CookieExpirationConventionFixedTime CookieExpirationConvention = "FixedTime" - CookieExpirationConventionIdentityProviderDerived CookieExpirationConvention = "IdentityProviderDerived" -) - -// PossibleCookieExpirationConventionValues returns the possible values for the CookieExpirationConvention const type. -func PossibleCookieExpirationConventionValues() []CookieExpirationConvention { - return []CookieExpirationConvention{ - CookieExpirationConventionFixedTime, - CookieExpirationConventionIdentityProviderDerived, - } -} - -// CustomDomainStatus - The status of the custom domain -type CustomDomainStatus string - -const ( - CustomDomainStatusAdding CustomDomainStatus = "Adding" - CustomDomainStatusDeleting CustomDomainStatus = "Deleting" - CustomDomainStatusFailed CustomDomainStatus = "Failed" - CustomDomainStatusReady CustomDomainStatus = "Ready" - CustomDomainStatusRetrievingValidationToken CustomDomainStatus = "RetrievingValidationToken" - CustomDomainStatusValidating CustomDomainStatus = "Validating" -) - -// PossibleCustomDomainStatusValues returns the possible values for the CustomDomainStatus const type. -func PossibleCustomDomainStatusValues() []CustomDomainStatus { - return []CustomDomainStatus{ - CustomDomainStatusAdding, - CustomDomainStatusDeleting, - CustomDomainStatusFailed, - CustomDomainStatusReady, - CustomDomainStatusRetrievingValidationToken, - CustomDomainStatusValidating, - } -} - -// CustomHostNameDNSRecordType - Type of the DNS record. -type CustomHostNameDNSRecordType string - -const ( - CustomHostNameDNSRecordTypeCName CustomHostNameDNSRecordType = "CName" - CustomHostNameDNSRecordTypeA CustomHostNameDNSRecordType = "A" -) - -// PossibleCustomHostNameDNSRecordTypeValues returns the possible values for the CustomHostNameDNSRecordType const type. -func PossibleCustomHostNameDNSRecordTypeValues() []CustomHostNameDNSRecordType { - return []CustomHostNameDNSRecordType{ - CustomHostNameDNSRecordTypeCName, - CustomHostNameDNSRecordTypeA, - } -} - -// DNSType - Current DNS type -type DNSType string - -const ( - DNSTypeAzureDNS DNSType = "AzureDns" - DNSTypeDefaultDomainRegistrarDNS DNSType = "DefaultDomainRegistrarDns" -) - -// PossibleDNSTypeValues returns the possible values for the DNSType const type. -func PossibleDNSTypeValues() []DNSType { - return []DNSType{ - DNSTypeAzureDNS, - DNSTypeDefaultDomainRegistrarDNS, - } -} - -// DNSVerificationTestResult - DNS verification test result. -type DNSVerificationTestResult string - -const ( - DNSVerificationTestResultPassed DNSVerificationTestResult = "Passed" - DNSVerificationTestResultFailed DNSVerificationTestResult = "Failed" - DNSVerificationTestResultSkipped DNSVerificationTestResult = "Skipped" -) - -// PossibleDNSVerificationTestResultValues returns the possible values for the DNSVerificationTestResult const type. -func PossibleDNSVerificationTestResultValues() []DNSVerificationTestResult { - return []DNSVerificationTestResult{ - DNSVerificationTestResultPassed, - DNSVerificationTestResultFailed, - DNSVerificationTestResultSkipped, - } -} - -// DatabaseType - Database type (e.g. SqlAzure / MySql). -type DatabaseType string - -const ( - DatabaseTypeLocalMySQL DatabaseType = "LocalMySql" - DatabaseTypeMySQL DatabaseType = "MySql" - DatabaseTypePostgreSQL DatabaseType = "PostgreSql" - DatabaseTypeSQLAzure DatabaseType = "SqlAzure" -) - -// PossibleDatabaseTypeValues returns the possible values for the DatabaseType const type. -func PossibleDatabaseTypeValues() []DatabaseType { - return []DatabaseType{ - DatabaseTypeLocalMySQL, - DatabaseTypeMySQL, - DatabaseTypePostgreSQL, - DatabaseTypeSQLAzure, - } -} - -// DetectorType - Whether this detector is an Analysis Detector or not. -type DetectorType string - -const ( - DetectorTypeDetector DetectorType = "Detector" - DetectorTypeAnalysis DetectorType = "Analysis" - DetectorTypeCategoryOverview DetectorType = "CategoryOverview" -) - -// PossibleDetectorTypeValues returns the possible values for the DetectorType const type. -func PossibleDetectorTypeValues() []DetectorType { - return []DetectorType{ - DetectorTypeDetector, - DetectorTypeAnalysis, - DetectorTypeCategoryOverview, - } -} - -type DomainPatchResourcePropertiesDomainNotRenewableReasonsItem string - -const ( - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange DomainPatchResourcePropertiesDomainNotRenewableReasonsItem = "ExpirationNotInRenewalTimeRange" - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal DomainPatchResourcePropertiesDomainNotRenewableReasonsItem = "RegistrationStatusNotSupportedForRenewal" - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemSubscriptionNotActive DomainPatchResourcePropertiesDomainNotRenewableReasonsItem = "SubscriptionNotActive" -) - -// PossibleDomainPatchResourcePropertiesDomainNotRenewableReasonsItemValues returns the possible values for the DomainPatchResourcePropertiesDomainNotRenewableReasonsItem const type. -func PossibleDomainPatchResourcePropertiesDomainNotRenewableReasonsItemValues() []DomainPatchResourcePropertiesDomainNotRenewableReasonsItem { - return []DomainPatchResourcePropertiesDomainNotRenewableReasonsItem{ - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange, - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal, - DomainPatchResourcePropertiesDomainNotRenewableReasonsItemSubscriptionNotActive, - } -} - -type DomainPropertiesDomainNotRenewableReasonsItem string - -const ( - DomainPropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange DomainPropertiesDomainNotRenewableReasonsItem = "ExpirationNotInRenewalTimeRange" - DomainPropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal DomainPropertiesDomainNotRenewableReasonsItem = "RegistrationStatusNotSupportedForRenewal" - DomainPropertiesDomainNotRenewableReasonsItemSubscriptionNotActive DomainPropertiesDomainNotRenewableReasonsItem = "SubscriptionNotActive" -) - -// PossibleDomainPropertiesDomainNotRenewableReasonsItemValues returns the possible values for the DomainPropertiesDomainNotRenewableReasonsItem const type. -func PossibleDomainPropertiesDomainNotRenewableReasonsItemValues() []DomainPropertiesDomainNotRenewableReasonsItem { - return []DomainPropertiesDomainNotRenewableReasonsItem{ - DomainPropertiesDomainNotRenewableReasonsItemExpirationNotInRenewalTimeRange, - DomainPropertiesDomainNotRenewableReasonsItemRegistrationStatusNotSupportedForRenewal, - DomainPropertiesDomainNotRenewableReasonsItemSubscriptionNotActive, - } -} - -// DomainStatus - Domain registration status. -type DomainStatus string - -const ( - DomainStatusActive DomainStatus = "Active" - DomainStatusAwaiting DomainStatus = "Awaiting" - DomainStatusCancelled DomainStatus = "Cancelled" - DomainStatusConfiscated DomainStatus = "Confiscated" - DomainStatusDisabled DomainStatus = "Disabled" - DomainStatusExcluded DomainStatus = "Excluded" - DomainStatusExpired DomainStatus = "Expired" - DomainStatusFailed DomainStatus = "Failed" - DomainStatusHeld DomainStatus = "Held" - DomainStatusLocked DomainStatus = "Locked" - DomainStatusParked DomainStatus = "Parked" - DomainStatusPending DomainStatus = "Pending" - DomainStatusReserved DomainStatus = "Reserved" - DomainStatusReverted DomainStatus = "Reverted" - DomainStatusSuspended DomainStatus = "Suspended" - DomainStatusTransferred DomainStatus = "Transferred" - DomainStatusUnknown DomainStatus = "Unknown" - DomainStatusUnlocked DomainStatus = "Unlocked" - DomainStatusUnparked DomainStatus = "Unparked" - DomainStatusUpdated DomainStatus = "Updated" - DomainStatusJSONConverterFailed DomainStatus = "JsonConverterFailed" -) - -// PossibleDomainStatusValues returns the possible values for the DomainStatus const type. -func PossibleDomainStatusValues() []DomainStatus { - return []DomainStatus{ - DomainStatusActive, - DomainStatusAwaiting, - DomainStatusCancelled, - DomainStatusConfiscated, - DomainStatusDisabled, - DomainStatusExcluded, - DomainStatusExpired, - DomainStatusFailed, - DomainStatusHeld, - DomainStatusLocked, - DomainStatusParked, - DomainStatusPending, - DomainStatusReserved, - DomainStatusReverted, - DomainStatusSuspended, - DomainStatusTransferred, - DomainStatusUnknown, - DomainStatusUnlocked, - DomainStatusUnparked, - DomainStatusUpdated, - DomainStatusJSONConverterFailed, - } -} - -// DomainType - Valid values are Regular domain: Azure will charge the full price of domain registration, SoftDeleted: Purchasing -// this domain will simply restore it and this operation will not cost anything. -type DomainType string - -const ( - DomainTypeRegular DomainType = "Regular" - DomainTypeSoftDeleted DomainType = "SoftDeleted" -) - -// PossibleDomainTypeValues returns the possible values for the DomainType const type. -func PossibleDomainTypeValues() []DomainType { - return []DomainType{ - DomainTypeRegular, - DomainTypeSoftDeleted, - } -} - -// EnterpriseGradeCdnStatus - State indicating the status of the enterprise grade CDN serving traffic to the static web app. -type EnterpriseGradeCdnStatus string - -const ( - EnterpriseGradeCdnStatusDisabled EnterpriseGradeCdnStatus = "Disabled" - EnterpriseGradeCdnStatusDisabling EnterpriseGradeCdnStatus = "Disabling" - EnterpriseGradeCdnStatusEnabled EnterpriseGradeCdnStatus = "Enabled" - EnterpriseGradeCdnStatusEnabling EnterpriseGradeCdnStatus = "Enabling" -) - -// PossibleEnterpriseGradeCdnStatusValues returns the possible values for the EnterpriseGradeCdnStatus const type. -func PossibleEnterpriseGradeCdnStatusValues() []EnterpriseGradeCdnStatus { - return []EnterpriseGradeCdnStatus{ - EnterpriseGradeCdnStatusDisabled, - EnterpriseGradeCdnStatusDisabling, - EnterpriseGradeCdnStatusEnabled, - EnterpriseGradeCdnStatusEnabling, - } -} - -type Enum15 string - -const ( - Enum15All Enum15 = "All" - Enum15Linux Enum15 = "Linux" - Enum15LinuxFunctions Enum15 = "LinuxFunctions" - Enum15Windows Enum15 = "Windows" - Enum15WindowsFunctions Enum15 = "WindowsFunctions" -) - -// PossibleEnum15Values returns the possible values for the Enum15 const type. -func PossibleEnum15Values() []Enum15 { - return []Enum15{ - Enum15All, - Enum15Linux, - Enum15LinuxFunctions, - Enum15Windows, - Enum15WindowsFunctions, - } -} - -type Enum16 string - -const ( - Enum16All Enum16 = "All" - Enum16Linux Enum16 = "Linux" - Enum16Windows Enum16 = "Windows" -) - -// PossibleEnum16Values returns the possible values for the Enum16 const type. -func PossibleEnum16Values() []Enum16 { - return []Enum16{ - Enum16All, - Enum16Linux, - Enum16Windows, - } -} - -type Enum17 string - -const ( - Enum17All Enum17 = "All" - Enum17Linux Enum17 = "Linux" - Enum17Windows Enum17 = "Windows" -) - -// PossibleEnum17Values returns the possible values for the Enum17 const type. -func PossibleEnum17Values() []Enum17 { - return []Enum17{ - Enum17All, - Enum17Linux, - Enum17Windows, - } -} - -type Enum18 string - -const ( - Enum18All Enum18 = "All" - Enum18Linux Enum18 = "Linux" - Enum18Windows Enum18 = "Windows" -) - -// PossibleEnum18Values returns the possible values for the Enum18 const type. -func PossibleEnum18Values() []Enum18 { - return []Enum18{ - Enum18All, - Enum18Linux, - Enum18Windows, - } -} - -type Enum19 string - -const ( - Enum19All Enum19 = "All" - Enum19Linux Enum19 = "Linux" - Enum19Windows Enum19 = "Windows" -) - -// PossibleEnum19Values returns the possible values for the Enum19 const type. -func PossibleEnum19Values() []Enum19 { - return []Enum19{ - Enum19All, - Enum19Linux, - Enum19Windows, - } -} - -type Enum20 string - -const ( - Enum20All Enum20 = "All" - Enum20Linux Enum20 = "Linux" - Enum20LinuxFunctions Enum20 = "LinuxFunctions" - Enum20Windows Enum20 = "Windows" - Enum20WindowsFunctions Enum20 = "WindowsFunctions" -) - -// PossibleEnum20Values returns the possible values for the Enum20 const type. -func PossibleEnum20Values() []Enum20 { - return []Enum20{ - Enum20All, - Enum20Linux, - Enum20LinuxFunctions, - Enum20Windows, - Enum20WindowsFunctions, - } -} - -// ForwardProxyConvention - The convention used to determine the url of the request made. -type ForwardProxyConvention string - -const ( - ForwardProxyConventionNoProxy ForwardProxyConvention = "NoProxy" - ForwardProxyConventionStandard ForwardProxyConvention = "Standard" - ForwardProxyConventionCustom ForwardProxyConvention = "Custom" -) - -// PossibleForwardProxyConventionValues returns the possible values for the ForwardProxyConvention const type. -func PossibleForwardProxyConventionValues() []ForwardProxyConvention { - return []ForwardProxyConvention{ - ForwardProxyConventionNoProxy, - ForwardProxyConventionStandard, - ForwardProxyConventionCustom, - } -} - -// FrequencyUnit - The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set -// to Day and FrequencyInterval should be set to 7) -type FrequencyUnit string - -const ( - FrequencyUnitDay FrequencyUnit = "Day" - FrequencyUnitHour FrequencyUnit = "Hour" -) - -// PossibleFrequencyUnitValues returns the possible values for the FrequencyUnit const type. -func PossibleFrequencyUnitValues() []FrequencyUnit { - return []FrequencyUnit{ - FrequencyUnitDay, - FrequencyUnitHour, - } -} - -type FrontEndServiceType string - -const ( - FrontEndServiceTypeNodePort FrontEndServiceType = "NodePort" - FrontEndServiceTypeLoadBalancer FrontEndServiceType = "LoadBalancer" -) - -// PossibleFrontEndServiceTypeValues returns the possible values for the FrontEndServiceType const type. -func PossibleFrontEndServiceTypeValues() []FrontEndServiceType { - return []FrontEndServiceType{ - FrontEndServiceTypeNodePort, - FrontEndServiceTypeLoadBalancer, - } -} - -// FtpsState - State of FTP / FTPS service -type FtpsState string - -const ( - FtpsStateAllAllowed FtpsState = "AllAllowed" - FtpsStateDisabled FtpsState = "Disabled" - FtpsStateFtpsOnly FtpsState = "FtpsOnly" -) - -// PossibleFtpsStateValues returns the possible values for the FtpsState const type. -func PossibleFtpsStateValues() []FtpsState { - return []FtpsState{ - FtpsStateAllAllowed, - FtpsStateDisabled, - FtpsStateFtpsOnly, - } -} - -// HostNameType - Type of the hostname. -type HostNameType string - -const ( - HostNameTypeVerified HostNameType = "Verified" - HostNameTypeManaged HostNameType = "Managed" -) - -// PossibleHostNameTypeValues returns the possible values for the HostNameType const type. -func PossibleHostNameTypeValues() []HostNameType { - return []HostNameType{ - HostNameTypeVerified, - HostNameTypeManaged, - } -} - -// HostType - Indicates whether the hostname is a standard or repository hostname. -type HostType string - -const ( - HostTypeStandard HostType = "Standard" - HostTypeRepository HostType = "Repository" -) - -// PossibleHostTypeValues returns the possible values for the HostType const type. -func PossibleHostTypeValues() []HostType { - return []HostType{ - HostTypeStandard, - HostTypeRepository, - } -} - -// HostingEnvironmentStatus - Current status of the App Service Environment. -type HostingEnvironmentStatus string - -const ( - HostingEnvironmentStatusPreparing HostingEnvironmentStatus = "Preparing" - HostingEnvironmentStatusReady HostingEnvironmentStatus = "Ready" - HostingEnvironmentStatusScaling HostingEnvironmentStatus = "Scaling" - HostingEnvironmentStatusDeleting HostingEnvironmentStatus = "Deleting" -) - -// PossibleHostingEnvironmentStatusValues returns the possible values for the HostingEnvironmentStatus const type. -func PossibleHostingEnvironmentStatusValues() []HostingEnvironmentStatus { - return []HostingEnvironmentStatus{ - HostingEnvironmentStatusPreparing, - HostingEnvironmentStatusReady, - HostingEnvironmentStatusScaling, - HostingEnvironmentStatusDeleting, - } -} - -// IPFilterTag - Defines what this IP filter will be used for. This is to support IP filtering on proxies. -type IPFilterTag string - -const ( - IPFilterTagDefault IPFilterTag = "Default" - IPFilterTagServiceTag IPFilterTag = "ServiceTag" - IPFilterTagXffProxy IPFilterTag = "XffProxy" -) - -// PossibleIPFilterTagValues returns the possible values for the IPFilterTag const type. -func PossibleIPFilterTagValues() []IPFilterTag { - return []IPFilterTag{ - IPFilterTagDefault, - IPFilterTagServiceTag, - IPFilterTagXffProxy, - } -} - -// InAvailabilityReasonType - Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists -// indicates that the name is already in use and is therefore unavailable. -type InAvailabilityReasonType string - -const ( - InAvailabilityReasonTypeAlreadyExists InAvailabilityReasonType = "AlreadyExists" - InAvailabilityReasonTypeInvalid InAvailabilityReasonType = "Invalid" -) - -// PossibleInAvailabilityReasonTypeValues returns the possible values for the InAvailabilityReasonType const type. -func PossibleInAvailabilityReasonTypeValues() []InAvailabilityReasonType { - return []InAvailabilityReasonType{ - InAvailabilityReasonTypeAlreadyExists, - InAvailabilityReasonTypeInvalid, - } -} - -// IngressTransportMethod - Ingress transport protocol -type IngressTransportMethod string - -const ( - IngressTransportMethodAuto IngressTransportMethod = "auto" - IngressTransportMethodHTTP IngressTransportMethod = "http" - IngressTransportMethodHTTP2 IngressTransportMethod = "http2" -) - -// PossibleIngressTransportMethodValues returns the possible values for the IngressTransportMethod const type. -func PossibleIngressTransportMethodValues() []IngressTransportMethod { - return []IngressTransportMethod{ - IngressTransportMethodAuto, - IngressTransportMethodHTTP, - IngressTransportMethodHTTP2, - } -} - -// InsightStatus - Level of the most severe insight generated by the detector. -type InsightStatus string - -const ( - InsightStatusCritical InsightStatus = "Critical" - InsightStatusWarning InsightStatus = "Warning" - InsightStatusInfo InsightStatus = "Info" - InsightStatusSuccess InsightStatus = "Success" - InsightStatusNone InsightStatus = "None" -) - -// PossibleInsightStatusValues returns the possible values for the InsightStatus const type. -func PossibleInsightStatusValues() []InsightStatus { - return []InsightStatus{ - InsightStatusCritical, - InsightStatusWarning, - InsightStatusInfo, - InsightStatusSuccess, - InsightStatusNone, - } -} - -// IssueType - Represents the type of the Detector -type IssueType string - -const ( - IssueTypeServiceIncident IssueType = "ServiceIncident" - IssueTypeAppDeployment IssueType = "AppDeployment" - IssueTypeAppCrash IssueType = "AppCrash" - IssueTypeRuntimeIssueDetected IssueType = "RuntimeIssueDetected" - IssueTypeAseDeployment IssueType = "AseDeployment" - IssueTypeUserIssue IssueType = "UserIssue" - IssueTypePlatformIssue IssueType = "PlatformIssue" - IssueTypeOther IssueType = "Other" -) - -// PossibleIssueTypeValues returns the possible values for the IssueType const type. -func PossibleIssueTypeValues() []IssueType { - return []IssueType{ - IssueTypeServiceIncident, - IssueTypeAppDeployment, - IssueTypeAppCrash, - IssueTypeRuntimeIssueDetected, - IssueTypeAseDeployment, - IssueTypeUserIssue, - IssueTypePlatformIssue, - IssueTypeOther, - } -} - -// KeyVaultSecretStatus - Status of the Key Vault secret. -type KeyVaultSecretStatus string - -const ( - KeyVaultSecretStatusInitialized KeyVaultSecretStatus = "Initialized" - KeyVaultSecretStatusWaitingOnCertificateOrder KeyVaultSecretStatus = "WaitingOnCertificateOrder" - KeyVaultSecretStatusSucceeded KeyVaultSecretStatus = "Succeeded" - KeyVaultSecretStatusCertificateOrderFailed KeyVaultSecretStatus = "CertificateOrderFailed" - KeyVaultSecretStatusOperationNotPermittedOnKeyVault KeyVaultSecretStatus = "OperationNotPermittedOnKeyVault" - KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault KeyVaultSecretStatus = "AzureServiceUnauthorizedToAccessKeyVault" - KeyVaultSecretStatusKeyVaultDoesNotExist KeyVaultSecretStatus = "KeyVaultDoesNotExist" - KeyVaultSecretStatusKeyVaultSecretDoesNotExist KeyVaultSecretStatus = "KeyVaultSecretDoesNotExist" - KeyVaultSecretStatusUnknownError KeyVaultSecretStatus = "UnknownError" - KeyVaultSecretStatusExternalPrivateKey KeyVaultSecretStatus = "ExternalPrivateKey" - KeyVaultSecretStatusUnknown KeyVaultSecretStatus = "Unknown" -) - -// PossibleKeyVaultSecretStatusValues returns the possible values for the KeyVaultSecretStatus const type. -func PossibleKeyVaultSecretStatusValues() []KeyVaultSecretStatus { - return []KeyVaultSecretStatus{ - KeyVaultSecretStatusInitialized, - KeyVaultSecretStatusWaitingOnCertificateOrder, - KeyVaultSecretStatusSucceeded, - KeyVaultSecretStatusCertificateOrderFailed, - KeyVaultSecretStatusOperationNotPermittedOnKeyVault, - KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault, - KeyVaultSecretStatusKeyVaultDoesNotExist, - KeyVaultSecretStatusKeyVaultSecretDoesNotExist, - KeyVaultSecretStatusUnknownError, - KeyVaultSecretStatusExternalPrivateKey, - KeyVaultSecretStatusUnknown, - } -} - -// KubeEnvironmentProvisioningState - Provisioning state of the Kubernetes Environment. -type KubeEnvironmentProvisioningState string - -const ( - KubeEnvironmentProvisioningStateSucceeded KubeEnvironmentProvisioningState = "Succeeded" - KubeEnvironmentProvisioningStateFailed KubeEnvironmentProvisioningState = "Failed" - KubeEnvironmentProvisioningStateCanceled KubeEnvironmentProvisioningState = "Canceled" - KubeEnvironmentProvisioningStateWaiting KubeEnvironmentProvisioningState = "Waiting" - KubeEnvironmentProvisioningStateInitializationInProgress KubeEnvironmentProvisioningState = "InitializationInProgress" - KubeEnvironmentProvisioningStateInfrastructureSetupInProgress KubeEnvironmentProvisioningState = "InfrastructureSetupInProgress" - KubeEnvironmentProvisioningStateInfrastructureSetupComplete KubeEnvironmentProvisioningState = "InfrastructureSetupComplete" - KubeEnvironmentProvisioningStateScheduledForDelete KubeEnvironmentProvisioningState = "ScheduledForDelete" - KubeEnvironmentProvisioningStateUpgradeRequested KubeEnvironmentProvisioningState = "UpgradeRequested" - KubeEnvironmentProvisioningStateUpgradeFailed KubeEnvironmentProvisioningState = "UpgradeFailed" -) - -// PossibleKubeEnvironmentProvisioningStateValues returns the possible values for the KubeEnvironmentProvisioningState const type. -func PossibleKubeEnvironmentProvisioningStateValues() []KubeEnvironmentProvisioningState { - return []KubeEnvironmentProvisioningState{ - KubeEnvironmentProvisioningStateSucceeded, - KubeEnvironmentProvisioningStateFailed, - KubeEnvironmentProvisioningStateCanceled, - KubeEnvironmentProvisioningStateWaiting, - KubeEnvironmentProvisioningStateInitializationInProgress, - KubeEnvironmentProvisioningStateInfrastructureSetupInProgress, - KubeEnvironmentProvisioningStateInfrastructureSetupComplete, - KubeEnvironmentProvisioningStateScheduledForDelete, - KubeEnvironmentProvisioningStateUpgradeRequested, - KubeEnvironmentProvisioningStateUpgradeFailed, - } -} - -// LoadBalancingMode - Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. -type LoadBalancingMode string - -const ( - LoadBalancingModeNone LoadBalancingMode = "None" - LoadBalancingModePublishing LoadBalancingMode = "Publishing" - LoadBalancingModeWeb LoadBalancingMode = "Web" - LoadBalancingModeWebPublishing LoadBalancingMode = "Web, Publishing" -) - -// PossibleLoadBalancingModeValues returns the possible values for the LoadBalancingMode const type. -func PossibleLoadBalancingModeValues() []LoadBalancingMode { - return []LoadBalancingMode{ - LoadBalancingModeNone, - LoadBalancingModePublishing, - LoadBalancingModeWeb, - LoadBalancingModeWebPublishing, - } -} - -// LogLevel - Log level. -type LogLevel string - -const ( - LogLevelOff LogLevel = "Off" - LogLevelVerbose LogLevel = "Verbose" - LogLevelInformation LogLevel = "Information" - LogLevelWarning LogLevel = "Warning" - LogLevelError LogLevel = "Error" -) - -// PossibleLogLevelValues returns the possible values for the LogLevel const type. -func PossibleLogLevelValues() []LogLevel { - return []LogLevel{ - LogLevelOff, - LogLevelVerbose, - LogLevelInformation, - LogLevelWarning, - LogLevelError, - } -} - -// MSDeployLogEntryType - Log entry type -type MSDeployLogEntryType string - -const ( - MSDeployLogEntryTypeMessage MSDeployLogEntryType = "Message" - MSDeployLogEntryTypeWarning MSDeployLogEntryType = "Warning" - MSDeployLogEntryTypeError MSDeployLogEntryType = "Error" -) - -// PossibleMSDeployLogEntryTypeValues returns the possible values for the MSDeployLogEntryType const type. -func PossibleMSDeployLogEntryTypeValues() []MSDeployLogEntryType { - return []MSDeployLogEntryType{ - MSDeployLogEntryTypeMessage, - MSDeployLogEntryTypeWarning, - MSDeployLogEntryTypeError, - } -} - -// MSDeployProvisioningState - Provisioning state -type MSDeployProvisioningState string - -const ( - MSDeployProvisioningStateAccepted MSDeployProvisioningState = "accepted" - MSDeployProvisioningStateRunning MSDeployProvisioningState = "running" - MSDeployProvisioningStateSucceeded MSDeployProvisioningState = "succeeded" - MSDeployProvisioningStateFailed MSDeployProvisioningState = "failed" - MSDeployProvisioningStateCanceled MSDeployProvisioningState = "canceled" -) - -// PossibleMSDeployProvisioningStateValues returns the possible values for the MSDeployProvisioningState const type. -func PossibleMSDeployProvisioningStateValues() []MSDeployProvisioningState { - return []MSDeployProvisioningState{ - MSDeployProvisioningStateAccepted, - MSDeployProvisioningStateRunning, - MSDeployProvisioningStateSucceeded, - MSDeployProvisioningStateFailed, - MSDeployProvisioningStateCanceled, - } -} - -// ManagedPipelineMode - Managed pipeline mode. -type ManagedPipelineMode string - -const ( - ManagedPipelineModeIntegrated ManagedPipelineMode = "Integrated" - ManagedPipelineModeClassic ManagedPipelineMode = "Classic" -) - -// PossibleManagedPipelineModeValues returns the possible values for the ManagedPipelineMode const type. -func PossibleManagedPipelineModeValues() []ManagedPipelineMode { - return []ManagedPipelineMode{ - ManagedPipelineModeIntegrated, - ManagedPipelineModeClassic, - } -} - -// ManagedServiceIdentityType - Type of managed service identity. -type ManagedServiceIdentityType string - -const ( - ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" - ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" - ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned" - ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" -) - -// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. -func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { - return []ManagedServiceIdentityType{ - ManagedServiceIdentityTypeSystemAssigned, - ManagedServiceIdentityTypeUserAssigned, - ManagedServiceIdentityTypeSystemAssignedUserAssigned, - ManagedServiceIdentityTypeNone, - } -} - -// MySQLMigrationType - The type of migration operation to be done -type MySQLMigrationType string - -const ( - MySQLMigrationTypeLocalToRemote MySQLMigrationType = "LocalToRemote" - MySQLMigrationTypeRemoteToLocal MySQLMigrationType = "RemoteToLocal" -) - -// PossibleMySQLMigrationTypeValues returns the possible values for the MySQLMigrationType const type. -func PossibleMySQLMigrationTypeValues() []MySQLMigrationType { - return []MySQLMigrationType{ - MySQLMigrationTypeLocalToRemote, - MySQLMigrationTypeRemoteToLocal, - } -} - -// NotificationLevel - Level indicating how critical this recommendation can impact. -type NotificationLevel string - -const ( - NotificationLevelCritical NotificationLevel = "Critical" - NotificationLevelWarning NotificationLevel = "Warning" - NotificationLevelInformation NotificationLevel = "Information" - NotificationLevelNonUrgentSuggestion NotificationLevel = "NonUrgentSuggestion" -) - -// PossibleNotificationLevelValues returns the possible values for the NotificationLevel const type. -func PossibleNotificationLevelValues() []NotificationLevel { - return []NotificationLevel{ - NotificationLevelCritical, - NotificationLevelWarning, - NotificationLevelInformation, - NotificationLevelNonUrgentSuggestion, - } -} - -// OperationStatus - The current status of the operation. -type OperationStatus string - -const ( - OperationStatusInProgress OperationStatus = "InProgress" - OperationStatusFailed OperationStatus = "Failed" - OperationStatusSucceeded OperationStatus = "Succeeded" - OperationStatusTimedOut OperationStatus = "TimedOut" - OperationStatusCreated OperationStatus = "Created" -) - -// PossibleOperationStatusValues returns the possible values for the OperationStatus const type. -func PossibleOperationStatusValues() []OperationStatus { - return []OperationStatus{ - OperationStatusInProgress, - OperationStatusFailed, - OperationStatusSucceeded, - OperationStatusTimedOut, - OperationStatusCreated, - } -} - -// ProvisioningState - Status of certificate order. -type ProvisioningState string - -const ( - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateInProgress ProvisioningState = "InProgress" - ProvisioningStateDeleting ProvisioningState = "Deleting" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateSucceeded, - ProvisioningStateFailed, - ProvisioningStateCanceled, - ProvisioningStateInProgress, - ProvisioningStateDeleting, - } -} - -// PublicCertificateLocation - Public Certificate Location -type PublicCertificateLocation string - -const ( - PublicCertificateLocationCurrentUserMy PublicCertificateLocation = "CurrentUserMy" - PublicCertificateLocationLocalMachineMy PublicCertificateLocation = "LocalMachineMy" - PublicCertificateLocationUnknown PublicCertificateLocation = "Unknown" -) - -// PossiblePublicCertificateLocationValues returns the possible values for the PublicCertificateLocation const type. -func PossiblePublicCertificateLocationValues() []PublicCertificateLocation { - return []PublicCertificateLocation{ - PublicCertificateLocationCurrentUserMy, - PublicCertificateLocationLocalMachineMy, - PublicCertificateLocationUnknown, - } -} - -// PublishingProfileFormat - Name of the format. Valid values are: FileZilla3 WebDeploy -- default Ftp -type PublishingProfileFormat string - -const ( - PublishingProfileFormatFileZilla3 PublishingProfileFormat = "FileZilla3" - PublishingProfileFormatFtp PublishingProfileFormat = "Ftp" - PublishingProfileFormatWebDeploy PublishingProfileFormat = "WebDeploy" -) - -// PossiblePublishingProfileFormatValues returns the possible values for the PublishingProfileFormat const type. -func PossiblePublishingProfileFormatValues() []PublishingProfileFormat { - return []PublishingProfileFormat{ - PublishingProfileFormatFileZilla3, - PublishingProfileFormatFtp, - PublishingProfileFormatWebDeploy, - } -} - -// RedundancyMode - Site redundancy mode -type RedundancyMode string - -const ( - RedundancyModeNone RedundancyMode = "None" - RedundancyModeManual RedundancyMode = "Manual" - RedundancyModeFailover RedundancyMode = "Failover" - RedundancyModeActiveActive RedundancyMode = "ActiveActive" - RedundancyModeGeoRedundant RedundancyMode = "GeoRedundant" -) - -// PossibleRedundancyModeValues returns the possible values for the RedundancyMode const type. -func PossibleRedundancyModeValues() []RedundancyMode { - return []RedundancyMode{ - RedundancyModeNone, - RedundancyModeManual, - RedundancyModeFailover, - RedundancyModeActiveActive, - RedundancyModeGeoRedundant, - } -} - -// RenderingType - Rendering Type -type RenderingType string - -const ( - RenderingTypeNoGraph RenderingType = "NoGraph" - RenderingTypeTable RenderingType = "Table" - RenderingTypeTimeSeries RenderingType = "TimeSeries" - RenderingTypeTimeSeriesPerInstance RenderingType = "TimeSeriesPerInstance" - RenderingTypePieChart RenderingType = "PieChart" - RenderingTypeDataSummary RenderingType = "DataSummary" - RenderingTypeEmail RenderingType = "Email" - RenderingTypeInsights RenderingType = "Insights" - RenderingTypeDynamicInsight RenderingType = "DynamicInsight" - RenderingTypeMarkdown RenderingType = "Markdown" - RenderingTypeDetector RenderingType = "Detector" - RenderingTypeDropDown RenderingType = "DropDown" - RenderingTypeCard RenderingType = "Card" - RenderingTypeSolution RenderingType = "Solution" - RenderingTypeGuage RenderingType = "Guage" - RenderingTypeForm RenderingType = "Form" - RenderingTypeChangeSets RenderingType = "ChangeSets" - RenderingTypeChangeAnalysisOnboarding RenderingType = "ChangeAnalysisOnboarding" - RenderingTypeChangesView RenderingType = "ChangesView" - RenderingTypeAppInsight RenderingType = "AppInsight" - RenderingTypeDependencyGraph RenderingType = "DependencyGraph" - RenderingTypeDownTime RenderingType = "DownTime" - RenderingTypeSummaryCard RenderingType = "SummaryCard" - RenderingTypeSearchComponent RenderingType = "SearchComponent" - RenderingTypeAppInsightEnablement RenderingType = "AppInsightEnablement" -) - -// PossibleRenderingTypeValues returns the possible values for the RenderingType const type. -func PossibleRenderingTypeValues() []RenderingType { - return []RenderingType{ - RenderingTypeNoGraph, - RenderingTypeTable, - RenderingTypeTimeSeries, - RenderingTypeTimeSeriesPerInstance, - RenderingTypePieChart, - RenderingTypeDataSummary, - RenderingTypeEmail, - RenderingTypeInsights, - RenderingTypeDynamicInsight, - RenderingTypeMarkdown, - RenderingTypeDetector, - RenderingTypeDropDown, - RenderingTypeCard, - RenderingTypeSolution, - RenderingTypeGuage, - RenderingTypeForm, - RenderingTypeChangeSets, - RenderingTypeChangeAnalysisOnboarding, - RenderingTypeChangesView, - RenderingTypeAppInsight, - RenderingTypeDependencyGraph, - RenderingTypeDownTime, - RenderingTypeSummaryCard, - RenderingTypeSearchComponent, - RenderingTypeAppInsightEnablement, - } -} - -type ResolveStatus string - -const ( - ResolveStatusInitialized ResolveStatus = "Initialized" - ResolveStatusResolved ResolveStatus = "Resolved" - ResolveStatusInvalidSyntax ResolveStatus = "InvalidSyntax" - ResolveStatusMSINotEnabled ResolveStatus = "MSINotEnabled" - ResolveStatusVaultNotFound ResolveStatus = "VaultNotFound" - ResolveStatusSecretNotFound ResolveStatus = "SecretNotFound" - ResolveStatusSecretVersionNotFound ResolveStatus = "SecretVersionNotFound" - ResolveStatusAccessToKeyVaultDenied ResolveStatus = "AccessToKeyVaultDenied" - ResolveStatusOtherReasons ResolveStatus = "OtherReasons" - ResolveStatusFetchTimedOut ResolveStatus = "FetchTimedOut" - ResolveStatusUnauthorizedClient ResolveStatus = "UnauthorizedClient" -) - -// PossibleResolveStatusValues returns the possible values for the ResolveStatus const type. -func PossibleResolveStatusValues() []ResolveStatus { - return []ResolveStatus{ - ResolveStatusInitialized, - ResolveStatusResolved, - ResolveStatusInvalidSyntax, - ResolveStatusMSINotEnabled, - ResolveStatusVaultNotFound, - ResolveStatusSecretNotFound, - ResolveStatusSecretVersionNotFound, - ResolveStatusAccessToKeyVaultDenied, - ResolveStatusOtherReasons, - ResolveStatusFetchTimedOut, - ResolveStatusUnauthorizedClient, - } -} - -// ResourceScopeType - Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. -type ResourceScopeType string - -const ( - ResourceScopeTypeServerFarm ResourceScopeType = "ServerFarm" - ResourceScopeTypeSubscription ResourceScopeType = "Subscription" - ResourceScopeTypeWebSite ResourceScopeType = "WebSite" -) - -// PossibleResourceScopeTypeValues returns the possible values for the ResourceScopeType const type. -func PossibleResourceScopeTypeValues() []ResourceScopeType { - return []ResourceScopeType{ - ResourceScopeTypeServerFarm, - ResourceScopeTypeSubscription, - ResourceScopeTypeWebSite, - } -} - -// RevisionHealthState - Current health State of the revision -type RevisionHealthState string - -const ( - RevisionHealthStateHealthy RevisionHealthState = "Healthy" - RevisionHealthStateNone RevisionHealthState = "None" - RevisionHealthStateUnhealthy RevisionHealthState = "Unhealthy" -) - -// PossibleRevisionHealthStateValues returns the possible values for the RevisionHealthState const type. -func PossibleRevisionHealthStateValues() []RevisionHealthState { - return []RevisionHealthState{ - RevisionHealthStateHealthy, - RevisionHealthStateNone, - RevisionHealthStateUnhealthy, - } -} - -// RevisionProvisioningState - Current provisioning State of the revision -type RevisionProvisioningState string - -const ( - RevisionProvisioningStateDeprovisioned RevisionProvisioningState = "Deprovisioned" - RevisionProvisioningStateDeprovisioning RevisionProvisioningState = "Deprovisioning" - RevisionProvisioningStateFailed RevisionProvisioningState = "Failed" - RevisionProvisioningStateProvisioned RevisionProvisioningState = "Provisioned" - RevisionProvisioningStateProvisioning RevisionProvisioningState = "Provisioning" -) - -// PossibleRevisionProvisioningStateValues returns the possible values for the RevisionProvisioningState const type. -func PossibleRevisionProvisioningStateValues() []RevisionProvisioningState { - return []RevisionProvisioningState{ - RevisionProvisioningStateDeprovisioned, - RevisionProvisioningStateDeprovisioning, - RevisionProvisioningStateFailed, - RevisionProvisioningStateProvisioned, - RevisionProvisioningStateProvisioning, - } -} - -// 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. -type RouteType string - -const ( - RouteTypeDEFAULT RouteType = "DEFAULT" - RouteTypeINHERITED RouteType = "INHERITED" - RouteTypeSTATIC RouteType = "STATIC" -) - -// PossibleRouteTypeValues returns the possible values for the RouteType const type. -func PossibleRouteTypeValues() []RouteType { - return []RouteType{ - RouteTypeDEFAULT, - RouteTypeINHERITED, - RouteTypeSTATIC, - } -} - -type SKUName string - -const ( - SKUNameBasic SKUName = "Basic" - SKUNameDynamic SKUName = "Dynamic" - SKUNameElasticIsolated SKUName = "ElasticIsolated" - SKUNameElasticPremium SKUName = "ElasticPremium" - SKUNameFree SKUName = "Free" - SKUNameIsolated SKUName = "Isolated" - SKUNameIsolatedV2 SKUName = "IsolatedV2" - SKUNamePremium SKUName = "Premium" - SKUNamePremiumContainer SKUName = "PremiumContainer" - SKUNamePremiumV2 SKUName = "PremiumV2" - SKUNamePremiumV3 SKUName = "PremiumV3" - SKUNameShared SKUName = "Shared" - SKUNameStandard SKUName = "Standard" -) - -// PossibleSKUNameValues returns the possible values for the SKUName const type. -func PossibleSKUNameValues() []SKUName { - return []SKUName{ - SKUNameBasic, - SKUNameDynamic, - SKUNameElasticIsolated, - SKUNameElasticPremium, - SKUNameFree, - SKUNameIsolated, - SKUNameIsolatedV2, - SKUNamePremium, - SKUNamePremiumContainer, - SKUNamePremiumV2, - SKUNamePremiumV3, - SKUNameShared, - SKUNameStandard, - } -} - -// SSLState - SSL type -type SSLState string - -const ( - SSLStateDisabled SSLState = "Disabled" - SSLStateSniEnabled SSLState = "SniEnabled" - SSLStateIPBasedEnabled SSLState = "IpBasedEnabled" -) - -// PossibleSSLStateValues returns the possible values for the SSLState const type. -func PossibleSSLStateValues() []SSLState { - return []SSLState{ - SSLStateDisabled, - SSLStateSniEnabled, - SSLStateIPBasedEnabled, - } -} - -// ScmType - SCM type. -type ScmType string - -const ( - ScmTypeBitbucketGit ScmType = "BitbucketGit" - ScmTypeBitbucketHg ScmType = "BitbucketHg" - ScmTypeCodePlexGit ScmType = "CodePlexGit" - ScmTypeCodePlexHg ScmType = "CodePlexHg" - ScmTypeDropbox ScmType = "Dropbox" - ScmTypeExternalGit ScmType = "ExternalGit" - ScmTypeExternalHg ScmType = "ExternalHg" - ScmTypeGitHub ScmType = "GitHub" - ScmTypeLocalGit ScmType = "LocalGit" - ScmTypeNone ScmType = "None" - ScmTypeOneDrive ScmType = "OneDrive" - ScmTypeTfs ScmType = "Tfs" - ScmTypeVSO ScmType = "VSO" - ScmTypeVSTSRM ScmType = "VSTSRM" -) - -// PossibleScmTypeValues returns the possible values for the ScmType const type. -func PossibleScmTypeValues() []ScmType { - return []ScmType{ - ScmTypeBitbucketGit, - ScmTypeBitbucketHg, - ScmTypeCodePlexGit, - ScmTypeCodePlexHg, - ScmTypeDropbox, - ScmTypeExternalGit, - ScmTypeExternalHg, - ScmTypeGitHub, - ScmTypeLocalGit, - ScmTypeNone, - ScmTypeOneDrive, - ScmTypeTfs, - ScmTypeVSO, - ScmTypeVSTSRM, - } -} - -// SiteAvailabilityState - Management information availability state for the app. -type SiteAvailabilityState string - -const ( - SiteAvailabilityStateNormal SiteAvailabilityState = "Normal" - SiteAvailabilityStateLimited SiteAvailabilityState = "Limited" - SiteAvailabilityStateDisasterRecoveryMode SiteAvailabilityState = "DisasterRecoveryMode" -) - -// PossibleSiteAvailabilityStateValues returns the possible values for the SiteAvailabilityState const type. -func PossibleSiteAvailabilityStateValues() []SiteAvailabilityState { - return []SiteAvailabilityState{ - SiteAvailabilityStateNormal, - SiteAvailabilityStateLimited, - SiteAvailabilityStateDisasterRecoveryMode, - } -} - -// SiteExtensionType - Site extension type. -type SiteExtensionType string - -const ( - SiteExtensionTypeGallery SiteExtensionType = "Gallery" - SiteExtensionTypeWebRoot SiteExtensionType = "WebRoot" -) - -// PossibleSiteExtensionTypeValues returns the possible values for the SiteExtensionType const type. -func PossibleSiteExtensionTypeValues() []SiteExtensionType { - return []SiteExtensionType{ - SiteExtensionTypeGallery, - SiteExtensionTypeWebRoot, - } -} - -// SiteLoadBalancing - Site load balancing. -type SiteLoadBalancing string - -const ( - SiteLoadBalancingWeightedRoundRobin SiteLoadBalancing = "WeightedRoundRobin" - SiteLoadBalancingLeastRequests SiteLoadBalancing = "LeastRequests" - SiteLoadBalancingLeastResponseTime SiteLoadBalancing = "LeastResponseTime" - SiteLoadBalancingWeightedTotalTraffic SiteLoadBalancing = "WeightedTotalTraffic" - SiteLoadBalancingRequestHash SiteLoadBalancing = "RequestHash" - SiteLoadBalancingPerSiteRoundRobin SiteLoadBalancing = "PerSiteRoundRobin" -) - -// PossibleSiteLoadBalancingValues returns the possible values for the SiteLoadBalancing const type. -func PossibleSiteLoadBalancingValues() []SiteLoadBalancing { - return []SiteLoadBalancing{ - SiteLoadBalancingWeightedRoundRobin, - SiteLoadBalancingLeastRequests, - SiteLoadBalancingLeastResponseTime, - SiteLoadBalancingWeightedTotalTraffic, - SiteLoadBalancingRequestHash, - SiteLoadBalancingPerSiteRoundRobin, - } -} - -type SiteRuntimeState string - -const ( - SiteRuntimeStateREADY SiteRuntimeState = "READY" - SiteRuntimeStateSTOPPED SiteRuntimeState = "STOPPED" - SiteRuntimeStateUNKNOWN SiteRuntimeState = "UNKNOWN" -) - -// PossibleSiteRuntimeStateValues returns the possible values for the SiteRuntimeState const type. -func PossibleSiteRuntimeStateValues() []SiteRuntimeState { - return []SiteRuntimeState{ - SiteRuntimeStateREADY, - SiteRuntimeStateSTOPPED, - SiteRuntimeStateUNKNOWN, - } -} - -// SolutionType - Type of Solution -type SolutionType string - -const ( - SolutionTypeQuickSolution SolutionType = "QuickSolution" - SolutionTypeDeepInvestigation SolutionType = "DeepInvestigation" - SolutionTypeBestPractices SolutionType = "BestPractices" -) - -// PossibleSolutionTypeValues returns the possible values for the SolutionType const type. -func PossibleSolutionTypeValues() []SolutionType { - return []SolutionType{ - SolutionTypeQuickSolution, - SolutionTypeDeepInvestigation, - SolutionTypeBestPractices, - } -} - -// StackPreferredOs - Function App stack preferred OS. -type StackPreferredOs string - -const ( - StackPreferredOsWindows StackPreferredOs = "Windows" - StackPreferredOsLinux StackPreferredOs = "Linux" -) - -// PossibleStackPreferredOsValues returns the possible values for the StackPreferredOs const type. -func PossibleStackPreferredOsValues() []StackPreferredOs { - return []StackPreferredOs{ - StackPreferredOsWindows, - StackPreferredOsLinux, - } -} - -// StagingEnvironmentPolicy - State indicating whether staging environments are allowed or not allowed for a static web app. -type StagingEnvironmentPolicy string - -const ( - StagingEnvironmentPolicyEnabled StagingEnvironmentPolicy = "Enabled" - StagingEnvironmentPolicyDisabled StagingEnvironmentPolicy = "Disabled" -) - -// PossibleStagingEnvironmentPolicyValues returns the possible values for the StagingEnvironmentPolicy const type. -func PossibleStagingEnvironmentPolicyValues() []StagingEnvironmentPolicy { - return []StagingEnvironmentPolicy{ - StagingEnvironmentPolicyEnabled, - StagingEnvironmentPolicyDisabled, - } -} - -// StatusOptions - App Service plan status. -type StatusOptions string - -const ( - StatusOptionsReady StatusOptions = "Ready" - StatusOptionsPending StatusOptions = "Pending" - StatusOptionsCreating StatusOptions = "Creating" -) - -// PossibleStatusOptionsValues returns the possible values for the StatusOptions const type. -func PossibleStatusOptionsValues() []StatusOptions { - return []StatusOptions{ - StatusOptionsReady, - StatusOptionsPending, - StatusOptionsCreating, - } -} - -type StorageType string - -const ( - StorageTypeLocalNode StorageType = "LocalNode" - StorageTypeNetworkFileSystem StorageType = "NetworkFileSystem" -) - -// PossibleStorageTypeValues returns the possible values for the StorageType const type. -func PossibleStorageTypeValues() []StorageType { - return []StorageType{ - StorageTypeLocalNode, - StorageTypeNetworkFileSystem, - } -} - -// SupportedTLSVersions - MinTlsVersion: configures the minimum version of TLS required for SSL requests -type SupportedTLSVersions string - -const ( - SupportedTLSVersionsOne0 SupportedTLSVersions = "1.0" - SupportedTLSVersionsOne1 SupportedTLSVersions = "1.1" - SupportedTLSVersionsOne2 SupportedTLSVersions = "1.2" -) - -// PossibleSupportedTLSVersionsValues returns the possible values for the SupportedTLSVersions const type. -func PossibleSupportedTLSVersionsValues() []SupportedTLSVersions { - return []SupportedTLSVersions{ - SupportedTLSVersionsOne0, - SupportedTLSVersionsOne1, - SupportedTLSVersionsOne2, - } -} - -// TriggerTypes - The trigger type of the function -type TriggerTypes string - -const ( - TriggerTypesHTTPTrigger TriggerTypes = "HttpTrigger" - TriggerTypesUnknown TriggerTypes = "Unknown" -) - -// PossibleTriggerTypesValues returns the possible values for the TriggerTypes const type. -func PossibleTriggerTypesValues() []TriggerTypes { - return []TriggerTypes{ - TriggerTypesHTTPTrigger, - TriggerTypesUnknown, - } -} - -// TriggeredWebJobStatus - Job status. -type TriggeredWebJobStatus string - -const ( - TriggeredWebJobStatusSuccess TriggeredWebJobStatus = "Success" - TriggeredWebJobStatusFailed TriggeredWebJobStatus = "Failed" - TriggeredWebJobStatusError TriggeredWebJobStatus = "Error" -) - -// PossibleTriggeredWebJobStatusValues returns the possible values for the TriggeredWebJobStatus const type. -func PossibleTriggeredWebJobStatusValues() []TriggeredWebJobStatus { - return []TriggeredWebJobStatus{ - TriggeredWebJobStatusSuccess, - TriggeredWebJobStatusFailed, - TriggeredWebJobStatusError, - } -} - -// UnauthenticatedClientAction - The action to take when an unauthenticated client attempts to access the app. -type UnauthenticatedClientAction string - -const ( - UnauthenticatedClientActionRedirectToLoginPage UnauthenticatedClientAction = "RedirectToLoginPage" - UnauthenticatedClientActionAllowAnonymous UnauthenticatedClientAction = "AllowAnonymous" -) - -// PossibleUnauthenticatedClientActionValues returns the possible values for the UnauthenticatedClientAction const type. -func PossibleUnauthenticatedClientActionValues() []UnauthenticatedClientAction { - return []UnauthenticatedClientAction{ - UnauthenticatedClientActionRedirectToLoginPage, - UnauthenticatedClientActionAllowAnonymous, - } -} - -// UnauthenticatedClientActionV2 - The action to take when an unauthenticated client attempts to access the app. -type UnauthenticatedClientActionV2 string - -const ( - UnauthenticatedClientActionV2RedirectToLoginPage UnauthenticatedClientActionV2 = "RedirectToLoginPage" - UnauthenticatedClientActionV2AllowAnonymous UnauthenticatedClientActionV2 = "AllowAnonymous" - UnauthenticatedClientActionV2Return401 UnauthenticatedClientActionV2 = "Return401" - UnauthenticatedClientActionV2Return403 UnauthenticatedClientActionV2 = "Return403" -) - -// PossibleUnauthenticatedClientActionV2Values returns the possible values for the UnauthenticatedClientActionV2 const type. -func PossibleUnauthenticatedClientActionV2Values() []UnauthenticatedClientActionV2 { - return []UnauthenticatedClientActionV2{ - UnauthenticatedClientActionV2RedirectToLoginPage, - UnauthenticatedClientActionV2AllowAnonymous, - UnauthenticatedClientActionV2Return401, - UnauthenticatedClientActionV2Return403, - } -} - -// UsageState - State indicating whether the app has exceeded its quota usage. Read-only. -type UsageState string - -const ( - UsageStateNormal UsageState = "Normal" - UsageStateExceeded UsageState = "Exceeded" -) - -// PossibleUsageStateValues returns the possible values for the UsageState const type. -func PossibleUsageStateValues() []UsageState { - return []UsageState{ - UsageStateNormal, - UsageStateExceeded, - } -} - -// ValidateResourceTypes - Resource type used for verification. -type ValidateResourceTypes string - -const ( - ValidateResourceTypesMicrosoftWebHostingEnvironments ValidateResourceTypes = "Microsoft.Web/hostingEnvironments" - ValidateResourceTypesServerFarm ValidateResourceTypes = "ServerFarm" - ValidateResourceTypesSite ValidateResourceTypes = "Site" -) - -// PossibleValidateResourceTypesValues returns the possible values for the ValidateResourceTypes const type. -func PossibleValidateResourceTypesValues() []ValidateResourceTypes { - return []ValidateResourceTypes{ - ValidateResourceTypesMicrosoftWebHostingEnvironments, - ValidateResourceTypesServerFarm, - ValidateResourceTypesSite, - } -} - -// WebJobType - Job type. -type WebJobType string - -const ( - WebJobTypeContinuous WebJobType = "Continuous" - WebJobTypeTriggered WebJobType = "Triggered" -) - -// PossibleWebJobTypeValues returns the possible values for the WebJobType const type. -func PossibleWebJobTypeValues() []WebJobType { - return []WebJobType{ - WebJobTypeContinuous, - WebJobTypeTriggered, - } -} - -// WorkerSizeOptions - Size of the machines. -type WorkerSizeOptions string - -const ( - WorkerSizeOptionsSmall WorkerSizeOptions = "Small" - WorkerSizeOptionsMedium WorkerSizeOptions = "Medium" - WorkerSizeOptionsLarge WorkerSizeOptions = "Large" - WorkerSizeOptionsD1 WorkerSizeOptions = "D1" - WorkerSizeOptionsD2 WorkerSizeOptions = "D2" - WorkerSizeOptionsD3 WorkerSizeOptions = "D3" - WorkerSizeOptionsSmallV3 WorkerSizeOptions = "SmallV3" - WorkerSizeOptionsMediumV3 WorkerSizeOptions = "MediumV3" - WorkerSizeOptionsLargeV3 WorkerSizeOptions = "LargeV3" - WorkerSizeOptionsNestedSmall WorkerSizeOptions = "NestedSmall" - WorkerSizeOptionsNestedSmallLinux WorkerSizeOptions = "NestedSmallLinux" - WorkerSizeOptionsDefault WorkerSizeOptions = "Default" -) - -// PossibleWorkerSizeOptionsValues returns the possible values for the WorkerSizeOptions const type. -func PossibleWorkerSizeOptionsValues() []WorkerSizeOptions { - return []WorkerSizeOptions{ - WorkerSizeOptionsSmall, - WorkerSizeOptionsMedium, - WorkerSizeOptionsLarge, - WorkerSizeOptionsD1, - WorkerSizeOptionsD2, - WorkerSizeOptionsD3, - WorkerSizeOptionsSmallV3, - WorkerSizeOptionsMediumV3, - WorkerSizeOptionsLargeV3, - WorkerSizeOptionsNestedSmall, - WorkerSizeOptionsNestedSmallLinux, - WorkerSizeOptionsDefault, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_containerapps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_containerapps_client.go deleted file mode 100644 index b9a42048..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_containerapps_client.go +++ /dev/null @@ -1,414 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ContainerAppsClient contains the methods for the ContainerApps group. -// Don't use this type directly, use NewContainerAppsClient() instead. -type ContainerAppsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewContainerAppsClient creates a new instance of ContainerAppsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewContainerAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ContainerAppsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update a Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the Container App. -// options - ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate -// method. -func (client *ContainerAppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ContainerAppsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, name, containerAppEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ContainerAppsClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ContainerAppsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update a Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *ContainerAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, containerAppEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, containerAppEnvelope) -} - -// BeginDelete - Delete a Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the Container App. -// options - ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete -// method. -func (client *ContainerAppsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientBeginDeleteOptions) (*runtime.Poller[ContainerAppsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ContainerAppsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ContainerAppsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete a Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *ContainerAppsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the properties of a Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the Container App. -// options - ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. -func (client *ContainerAppsClient) Get(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientGetOptions) (ContainerAppsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return ContainerAppsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ContainerAppsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ContainerAppsClient) getHandleResponse(resp *http.Response) (ContainerAppsClientGetResponse, error) { - result := ContainerAppsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ContainerApp); err != nil { - return ContainerAppsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get the Container Apps in a given resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.ListByResourceGroup -// method. -func (client *ContainerAppsClient) NewListByResourceGroupPager(resourceGroupName string, options *ContainerAppsClientListByResourceGroupOptions) *runtime.Pager[ContainerAppsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ContainerAppsClientListByResourceGroupResponse]{ - More: func(page ContainerAppsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ContainerAppsClientListByResourceGroupResponse) (ContainerAppsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ContainerAppsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ContainerAppsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ContainerAppsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ContainerAppsClient) listByResourceGroupHandleResponse(resp *http.Response) (ContainerAppsClientListByResourceGroupResponse, error) { - result := ContainerAppsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ContainerAppCollection); err != nil { - return ContainerAppsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Get the Container Apps in a given subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.ListBySubscription -// method. -func (client *ContainerAppsClient) NewListBySubscriptionPager(options *ContainerAppsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[ContainerAppsClientListBySubscriptionResponse]{ - More: func(page ContainerAppsClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ContainerAppsClientListBySubscriptionResponse) (ContainerAppsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ContainerAppsClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ContainerAppsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.Context, options *ContainerAppsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *ContainerAppsClient) listBySubscriptionHandleResponse(resp *http.Response) (ContainerAppsClientListBySubscriptionResponse, error) { - result := ContainerAppsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ContainerAppCollection); err != nil { - return ContainerAppsClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// ListSecrets - List secrets for a container app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// name - Name of the Container App. -// options - ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets -// method. -func (client *ContainerAppsClient) ListSecrets(ctx context.Context, name string, options *ContainerAppsClientListSecretsOptions) (ContainerAppsClientListSecretsResponse, error) { - req, err := client.listSecretsCreateRequest(ctx, name, options) - if err != nil { - return ContainerAppsClientListSecretsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ContainerAppsClientListSecretsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientListSecretsResponse{}, runtime.NewResponseError(resp) - } - return client.listSecretsHandleResponse(resp) -} - -// listSecretsCreateRequest creates the ListSecrets request. -func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, name string, options *ContainerAppsClientListSecretsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSecretsHandleResponse handles the ListSecrets response. -func (client *ContainerAppsClient) listSecretsHandleResponse(resp *http.Response) (ContainerAppsClientListSecretsResponse, error) { - result := ContainerAppsClientListSecretsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecretsCollection); err != nil { - return ContainerAppsClientListSecretsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_containerappsrevisions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_containerappsrevisions_client.go deleted file mode 100644 index 66dc6d34..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_containerappsrevisions_client.go +++ /dev/null @@ -1,346 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ContainerAppsRevisionsClient contains the methods for the ContainerAppsRevisions group. -// Don't use this type directly, use NewContainerAppsRevisionsClient() instead. -type ContainerAppsRevisionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewContainerAppsRevisionsClient creates a new instance of ContainerAppsRevisionsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewContainerAppsRevisionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsRevisionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ContainerAppsRevisionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// ActivateRevision - Activates a revision for a Container App -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// containerAppName - Name of the Container App. -// name - Name of the Container App Revision to activate -// options - ContainerAppsRevisionsClientActivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.ActivateRevision -// method. -func (client *ContainerAppsRevisionsClient) ActivateRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientActivateRevisionOptions) (ContainerAppsRevisionsClientActivateRevisionResponse, error) { - req, err := client.activateRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) - if err != nil { - return ContainerAppsRevisionsClientActivateRevisionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ContainerAppsRevisionsClientActivateRevisionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientActivateRevisionResponse{}, runtime.NewResponseError(resp) - } - return ContainerAppsRevisionsClientActivateRevisionResponse{}, nil -} - -// activateRevisionCreateRequest creates the ActivateRevision request. -func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientActivateRevisionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/activate" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeactivateRevision - Deactivates a revision for a Container App -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// containerAppName - Name of the Container App. -// name - Name of the Container App Revision to deactivate -// options - ContainerAppsRevisionsClientDeactivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.DeactivateRevision -// method. -func (client *ContainerAppsRevisionsClient) DeactivateRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientDeactivateRevisionOptions) (ContainerAppsRevisionsClientDeactivateRevisionResponse, error) { - req, err := client.deactivateRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) - if err != nil { - return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, runtime.NewResponseError(resp) - } - return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, nil -} - -// deactivateRevisionCreateRequest creates the DeactivateRevision request. -func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientDeactivateRevisionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/deactivate" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GetRevision - Get a revision of a Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// containerAppName - Name of the Container App. -// name - Name of the Container App Revision. -// options - ContainerAppsRevisionsClientGetRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.GetRevision -// method. -func (client *ContainerAppsRevisionsClient) GetRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientGetRevisionOptions) (ContainerAppsRevisionsClientGetRevisionResponse, error) { - req, err := client.getRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) - if err != nil { - return ContainerAppsRevisionsClientGetRevisionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ContainerAppsRevisionsClientGetRevisionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientGetRevisionResponse{}, runtime.NewResponseError(resp) - } - return client.getRevisionHandleResponse(resp) -} - -// getRevisionCreateRequest creates the GetRevision request. -func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientGetRevisionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getRevisionHandleResponse handles the GetRevision response. -func (client *ContainerAppsRevisionsClient) getRevisionHandleResponse(resp *http.Response) (ContainerAppsRevisionsClientGetRevisionResponse, error) { - result := ContainerAppsRevisionsClientGetRevisionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Revision); err != nil { - return ContainerAppsRevisionsClientGetRevisionResponse{}, err - } - return result, nil -} - -// NewListRevisionsPager - Get the Revisions for a given Container App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// containerAppName - Name of the Container App for which Revisions are needed. -// options - ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.ListRevisions -// method. -func (client *ContainerAppsRevisionsClient) NewListRevisionsPager(resourceGroupName string, containerAppName string, options *ContainerAppsRevisionsClientListRevisionsOptions) *runtime.Pager[ContainerAppsRevisionsClientListRevisionsResponse] { - return runtime.NewPager(runtime.PagingHandler[ContainerAppsRevisionsClientListRevisionsResponse]{ - More: func(page ContainerAppsRevisionsClientListRevisionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ContainerAppsRevisionsClientListRevisionsResponse) (ContainerAppsRevisionsClientListRevisionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRevisionsCreateRequest(ctx, resourceGroupName, containerAppName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ContainerAppsRevisionsClientListRevisionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ContainerAppsRevisionsClientListRevisionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientListRevisionsResponse{}, runtime.NewResponseError(resp) - } - return client.listRevisionsHandleResponse(resp) - }, - }) -} - -// listRevisionsCreateRequest creates the ListRevisions request. -func (client *ContainerAppsRevisionsClient) listRevisionsCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, options *ContainerAppsRevisionsClientListRevisionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listRevisionsHandleResponse handles the ListRevisions response. -func (client *ContainerAppsRevisionsClient) listRevisionsHandleResponse(resp *http.Response) (ContainerAppsRevisionsClientListRevisionsResponse, error) { - result := ContainerAppsRevisionsClientListRevisionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RevisionCollection); err != nil { - return ContainerAppsRevisionsClientListRevisionsResponse{}, err - } - return result, nil -} - -// RestartRevision - Restarts a revision for a Container App -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// containerAppName - Name of the Container App. -// name - Name of the Container App Revision to restart -// options - ContainerAppsRevisionsClientRestartRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.RestartRevision -// method. -func (client *ContainerAppsRevisionsClient) RestartRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientRestartRevisionOptions) (ContainerAppsRevisionsClientRestartRevisionResponse, error) { - req, err := client.restartRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) - if err != nil { - return ContainerAppsRevisionsClientRestartRevisionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ContainerAppsRevisionsClientRestartRevisionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientRestartRevisionResponse{}, runtime.NewResponseError(resp) - } - return ContainerAppsRevisionsClientRestartRevisionResponse{}, nil -} - -// restartRevisionCreateRequest creates the RestartRevision request. -func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientRestartRevisionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/restart" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if containerAppName == "" { - return nil, errors.New("parameter containerAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerAppName}", url.PathEscape(containerAppName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_deletedwebapps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_deletedwebapps_client.go deleted file mode 100644 index 69db1aca..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_deletedwebapps_client.go +++ /dev/null @@ -1,234 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DeletedWebAppsClient contains the methods for the DeletedWebApps group. -// Don't use this type directly, use NewDeletedWebAppsClient() instead. -type DeletedWebAppsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDeletedWebAppsClient creates a new instance of DeletedWebAppsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDeletedWebAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedWebAppsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DeletedWebAppsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// GetDeletedWebAppByLocation - Get deleted app for a subscription at location. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// deletedSiteID - The numeric ID of the deleted app, e.g. 12345 -// options - DeletedWebAppsClientGetDeletedWebAppByLocationOptions contains the optional parameters for the DeletedWebAppsClient.GetDeletedWebAppByLocation -// method. -func (client *DeletedWebAppsClient) GetDeletedWebAppByLocation(ctx context.Context, location string, deletedSiteID string, options *DeletedWebAppsClientGetDeletedWebAppByLocationOptions) (DeletedWebAppsClientGetDeletedWebAppByLocationResponse, error) { - req, err := client.getDeletedWebAppByLocationCreateRequest(ctx, location, deletedSiteID, options) - if err != nil { - return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, runtime.NewResponseError(resp) - } - return client.getDeletedWebAppByLocationHandleResponse(resp) -} - -// getDeletedWebAppByLocationCreateRequest creates the GetDeletedWebAppByLocation request. -func (client *DeletedWebAppsClient) getDeletedWebAppByLocationCreateRequest(ctx context.Context, location string, deletedSiteID string, options *DeletedWebAppsClientGetDeletedWebAppByLocationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if deletedSiteID == "" { - return nil, errors.New("parameter deletedSiteID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deletedSiteId}", url.PathEscape(deletedSiteID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDeletedWebAppByLocationHandleResponse handles the GetDeletedWebAppByLocation response. -func (client *DeletedWebAppsClient) getDeletedWebAppByLocationHandleResponse(resp *http.Response) (DeletedWebAppsClientGetDeletedWebAppByLocationResponse, error) { - result := DeletedWebAppsClientGetDeletedWebAppByLocationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeletedSite); err != nil { - return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, err - } - return result, nil -} - -// NewListPager - Get all deleted apps for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - DeletedWebAppsClientListOptions contains the optional parameters for the DeletedWebAppsClient.List method. -func (client *DeletedWebAppsClient) NewListPager(options *DeletedWebAppsClientListOptions) *runtime.Pager[DeletedWebAppsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[DeletedWebAppsClientListResponse]{ - More: func(page DeletedWebAppsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DeletedWebAppsClientListResponse) (DeletedWebAppsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeletedWebAppsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DeletedWebAppsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedWebAppsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *DeletedWebAppsClient) listCreateRequest(ctx context.Context, options *DeletedWebAppsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DeletedWebAppsClient) listHandleResponse(resp *http.Response) (DeletedWebAppsClientListResponse, error) { - result := DeletedWebAppsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeletedWebAppCollection); err != nil { - return DeletedWebAppsClientListResponse{}, err - } - return result, nil -} - -// NewListByLocationPager - Get all deleted apps for a subscription at location -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - DeletedWebAppsClientListByLocationOptions contains the optional parameters for the DeletedWebAppsClient.ListByLocation -// method. -func (client *DeletedWebAppsClient) NewListByLocationPager(location string, options *DeletedWebAppsClientListByLocationOptions) *runtime.Pager[DeletedWebAppsClientListByLocationResponse] { - return runtime.NewPager(runtime.PagingHandler[DeletedWebAppsClientListByLocationResponse]{ - More: func(page DeletedWebAppsClientListByLocationResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DeletedWebAppsClientListByLocationResponse) (DeletedWebAppsClientListByLocationResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByLocationCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DeletedWebAppsClientListByLocationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DeletedWebAppsClientListByLocationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedWebAppsClientListByLocationResponse{}, runtime.NewResponseError(resp) - } - return client.listByLocationHandleResponse(resp) - }, - }) -} - -// listByLocationCreateRequest creates the ListByLocation request. -func (client *DeletedWebAppsClient) listByLocationCreateRequest(ctx context.Context, location string, options *DeletedWebAppsClientListByLocationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByLocationHandleResponse handles the ListByLocation response. -func (client *DeletedWebAppsClient) listByLocationHandleResponse(resp *http.Response) (DeletedWebAppsClientListByLocationResponse, error) { - result := DeletedWebAppsClientListByLocationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeletedWebAppCollection); err != nil { - return DeletedWebAppsClientListByLocationResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_diagnostics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_diagnostics_client.go deleted file mode 100644 index e932095b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_diagnostics_client.go +++ /dev/null @@ -1,1665 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" - "time" -) - -// DiagnosticsClient contains the methods for the Diagnostics group. -// Don't use this type directly, use NewDiagnosticsClient() instead. -type DiagnosticsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDiagnosticsClient creates a new instance of DiagnosticsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiagnosticsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DiagnosticsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// ExecuteSiteAnalysis - Execute Analysis -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Category Name -// analysisName - Analysis Resource Name -// options - DiagnosticsClientExecuteSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysis -// method. -func (client *DiagnosticsClient) ExecuteSiteAnalysis(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *DiagnosticsClientExecuteSiteAnalysisOptions) (DiagnosticsClientExecuteSiteAnalysisResponse, error) { - req, err := client.executeSiteAnalysisCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, options) - if err != nil { - return DiagnosticsClientExecuteSiteAnalysisResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientExecuteSiteAnalysisResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientExecuteSiteAnalysisResponse{}, runtime.NewResponseError(resp) - } - return client.executeSiteAnalysisHandleResponse(resp) -} - -// executeSiteAnalysisCreateRequest creates the ExecuteSiteAnalysis request. -func (client *DiagnosticsClient) executeSiteAnalysisCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *DiagnosticsClientExecuteSiteAnalysisOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if analysisName == "" { - return nil, errors.New("parameter analysisName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{analysisName}", url.PathEscape(analysisName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StartTime != nil { - reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) - } - if options != nil && options.EndTime != nil { - reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) - } - if options != nil && options.TimeGrain != nil { - reqQP.Set("timeGrain", *options.TimeGrain) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// executeSiteAnalysisHandleResponse handles the ExecuteSiteAnalysis response. -func (client *DiagnosticsClient) executeSiteAnalysisHandleResponse(resp *http.Response) (DiagnosticsClientExecuteSiteAnalysisResponse, error) { - result := DiagnosticsClientExecuteSiteAnalysisResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticAnalysis); err != nil { - return DiagnosticsClientExecuteSiteAnalysisResponse{}, err - } - return result, nil -} - -// ExecuteSiteAnalysisSlot - Execute Analysis -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Category Name -// analysisName - Analysis Resource Name -// slot - Slot Name -// options - DiagnosticsClientExecuteSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysisSlot -// method. -func (client *DiagnosticsClient) ExecuteSiteAnalysisSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *DiagnosticsClientExecuteSiteAnalysisSlotOptions) (DiagnosticsClientExecuteSiteAnalysisSlotResponse, error) { - req, err := client.executeSiteAnalysisSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, slot, options) - if err != nil { - return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, runtime.NewResponseError(resp) - } - return client.executeSiteAnalysisSlotHandleResponse(resp) -} - -// executeSiteAnalysisSlotCreateRequest creates the ExecuteSiteAnalysisSlot request. -func (client *DiagnosticsClient) executeSiteAnalysisSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *DiagnosticsClientExecuteSiteAnalysisSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if analysisName == "" { - return nil, errors.New("parameter analysisName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{analysisName}", url.PathEscape(analysisName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StartTime != nil { - reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) - } - if options != nil && options.EndTime != nil { - reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) - } - if options != nil && options.TimeGrain != nil { - reqQP.Set("timeGrain", *options.TimeGrain) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// executeSiteAnalysisSlotHandleResponse handles the ExecuteSiteAnalysisSlot response. -func (client *DiagnosticsClient) executeSiteAnalysisSlotHandleResponse(resp *http.Response) (DiagnosticsClientExecuteSiteAnalysisSlotResponse, error) { - result := DiagnosticsClientExecuteSiteAnalysisSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticAnalysis); err != nil { - return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, err - } - return result, nil -} - -// ExecuteSiteDetector - Execute Detector -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// detectorName - Detector Resource Name -// diagnosticCategory - Category Name -// options - DiagnosticsClientExecuteSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetector -// method. -func (client *DiagnosticsClient) ExecuteSiteDetector(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, options *DiagnosticsClientExecuteSiteDetectorOptions) (DiagnosticsClientExecuteSiteDetectorResponse, error) { - req, err := client.executeSiteDetectorCreateRequest(ctx, resourceGroupName, siteName, detectorName, diagnosticCategory, options) - if err != nil { - return DiagnosticsClientExecuteSiteDetectorResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientExecuteSiteDetectorResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientExecuteSiteDetectorResponse{}, runtime.NewResponseError(resp) - } - return client.executeSiteDetectorHandleResponse(resp) -} - -// executeSiteDetectorCreateRequest creates the ExecuteSiteDetector request. -func (client *DiagnosticsClient) executeSiteDetectorCreateRequest(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, options *DiagnosticsClientExecuteSiteDetectorOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if detectorName == "" { - return nil, errors.New("parameter detectorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StartTime != nil { - reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) - } - if options != nil && options.EndTime != nil { - reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) - } - if options != nil && options.TimeGrain != nil { - reqQP.Set("timeGrain", *options.TimeGrain) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// executeSiteDetectorHandleResponse handles the ExecuteSiteDetector response. -func (client *DiagnosticsClient) executeSiteDetectorHandleResponse(resp *http.Response) (DiagnosticsClientExecuteSiteDetectorResponse, error) { - result := DiagnosticsClientExecuteSiteDetectorResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticDetectorResponse); err != nil { - return DiagnosticsClientExecuteSiteDetectorResponse{}, err - } - return result, nil -} - -// ExecuteSiteDetectorSlot - Execute Detector -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// detectorName - Detector Resource Name -// diagnosticCategory - Category Name -// slot - Slot Name -// options - DiagnosticsClientExecuteSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetectorSlot -// method. -func (client *DiagnosticsClient) ExecuteSiteDetectorSlot(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, slot string, options *DiagnosticsClientExecuteSiteDetectorSlotOptions) (DiagnosticsClientExecuteSiteDetectorSlotResponse, error) { - req, err := client.executeSiteDetectorSlotCreateRequest(ctx, resourceGroupName, siteName, detectorName, diagnosticCategory, slot, options) - if err != nil { - return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, runtime.NewResponseError(resp) - } - return client.executeSiteDetectorSlotHandleResponse(resp) -} - -// executeSiteDetectorSlotCreateRequest creates the ExecuteSiteDetectorSlot request. -func (client *DiagnosticsClient) executeSiteDetectorSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, slot string, options *DiagnosticsClientExecuteSiteDetectorSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if detectorName == "" { - return nil, errors.New("parameter detectorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StartTime != nil { - reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) - } - if options != nil && options.EndTime != nil { - reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) - } - if options != nil && options.TimeGrain != nil { - reqQP.Set("timeGrain", *options.TimeGrain) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// executeSiteDetectorSlotHandleResponse handles the ExecuteSiteDetectorSlot response. -func (client *DiagnosticsClient) executeSiteDetectorSlotHandleResponse(resp *http.Response) (DiagnosticsClientExecuteSiteDetectorSlotResponse, error) { - result := DiagnosticsClientExecuteSiteDetectorSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticDetectorResponse); err != nil { - return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, err - } - return result, nil -} - -// GetHostingEnvironmentDetectorResponse - Get Hosting Environment Detector Response -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - App Service Environment Name -// detectorName - Detector Resource Name -// options - DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetHostingEnvironmentDetectorResponse -// method. -func (client *DiagnosticsClient) GetHostingEnvironmentDetectorResponse(ctx context.Context, resourceGroupName string, name string, detectorName string, options *DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions) (DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse, error) { - req, err := client.getHostingEnvironmentDetectorResponseCreateRequest(ctx, resourceGroupName, name, detectorName, options) - if err != nil { - return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, runtime.NewResponseError(resp) - } - return client.getHostingEnvironmentDetectorResponseHandleResponse(resp) -} - -// getHostingEnvironmentDetectorResponseCreateRequest creates the GetHostingEnvironmentDetectorResponse request. -func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseCreateRequest(ctx context.Context, resourceGroupName string, name string, detectorName string, options *DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if detectorName == "" { - return nil, errors.New("parameter detectorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StartTime != nil { - reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) - } - if options != nil && options.EndTime != nil { - reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) - } - if options != nil && options.TimeGrain != nil { - reqQP.Set("timeGrain", *options.TimeGrain) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHostingEnvironmentDetectorResponseHandleResponse handles the GetHostingEnvironmentDetectorResponse response. -func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseHandleResponse(resp *http.Response) (DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse, error) { - result := DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponse); err != nil { - return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, err - } - return result, nil -} - -// GetSiteAnalysis - Get Site Analysis -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Diagnostic Category -// analysisName - Analysis Name -// options - DiagnosticsClientGetSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysis -// method. -func (client *DiagnosticsClient) GetSiteAnalysis(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *DiagnosticsClientGetSiteAnalysisOptions) (DiagnosticsClientGetSiteAnalysisResponse, error) { - req, err := client.getSiteAnalysisCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, options) - if err != nil { - return DiagnosticsClientGetSiteAnalysisResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientGetSiteAnalysisResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteAnalysisResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteAnalysisHandleResponse(resp) -} - -// getSiteAnalysisCreateRequest creates the GetSiteAnalysis request. -func (client *DiagnosticsClient) getSiteAnalysisCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *DiagnosticsClientGetSiteAnalysisOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if analysisName == "" { - return nil, errors.New("parameter analysisName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{analysisName}", url.PathEscape(analysisName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteAnalysisHandleResponse handles the GetSiteAnalysis response. -func (client *DiagnosticsClient) getSiteAnalysisHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteAnalysisResponse, error) { - result := DiagnosticsClientGetSiteAnalysisResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AnalysisDefinition); err != nil { - return DiagnosticsClientGetSiteAnalysisResponse{}, err - } - return result, nil -} - -// GetSiteAnalysisSlot - Get Site Analysis -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Diagnostic Category -// analysisName - Analysis Name -// slot - Slot - optional -// options - DiagnosticsClientGetSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysisSlot -// method. -func (client *DiagnosticsClient) GetSiteAnalysisSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *DiagnosticsClientGetSiteAnalysisSlotOptions) (DiagnosticsClientGetSiteAnalysisSlotResponse, error) { - req, err := client.getSiteAnalysisSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, slot, options) - if err != nil { - return DiagnosticsClientGetSiteAnalysisSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientGetSiteAnalysisSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteAnalysisSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteAnalysisSlotHandleResponse(resp) -} - -// getSiteAnalysisSlotCreateRequest creates the GetSiteAnalysisSlot request. -func (client *DiagnosticsClient) getSiteAnalysisSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *DiagnosticsClientGetSiteAnalysisSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if analysisName == "" { - return nil, errors.New("parameter analysisName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{analysisName}", url.PathEscape(analysisName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteAnalysisSlotHandleResponse handles the GetSiteAnalysisSlot response. -func (client *DiagnosticsClient) getSiteAnalysisSlotHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteAnalysisSlotResponse, error) { - result := DiagnosticsClientGetSiteAnalysisSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AnalysisDefinition); err != nil { - return DiagnosticsClientGetSiteAnalysisSlotResponse{}, err - } - return result, nil -} - -// GetSiteDetector - Get Detector -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Diagnostic Category -// detectorName - Detector Name -// options - DiagnosticsClientGetSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetector -// method. -func (client *DiagnosticsClient) GetSiteDetector(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, options *DiagnosticsClientGetSiteDetectorOptions) (DiagnosticsClientGetSiteDetectorResponse, error) { - req, err := client.getSiteDetectorCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, detectorName, options) - if err != nil { - return DiagnosticsClientGetSiteDetectorResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientGetSiteDetectorResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDetectorResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteDetectorHandleResponse(resp) -} - -// getSiteDetectorCreateRequest creates the GetSiteDetector request. -func (client *DiagnosticsClient) getSiteDetectorCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, options *DiagnosticsClientGetSiteDetectorOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if detectorName == "" { - return nil, errors.New("parameter detectorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteDetectorHandleResponse handles the GetSiteDetector response. -func (client *DiagnosticsClient) getSiteDetectorHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDetectorResponse, error) { - result := DiagnosticsClientGetSiteDetectorResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DetectorDefinitionResource); err != nil { - return DiagnosticsClientGetSiteDetectorResponse{}, err - } - return result, nil -} - -// GetSiteDetectorResponse - Get site detector response -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// detectorName - Detector Resource Name -// options - DiagnosticsClientGetSiteDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponse -// method. -func (client *DiagnosticsClient) GetSiteDetectorResponse(ctx context.Context, resourceGroupName string, siteName string, detectorName string, options *DiagnosticsClientGetSiteDetectorResponseOptions) (DiagnosticsClientGetSiteDetectorResponseResponse, error) { - req, err := client.getSiteDetectorResponseCreateRequest(ctx, resourceGroupName, siteName, detectorName, options) - if err != nil { - return DiagnosticsClientGetSiteDetectorResponseResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientGetSiteDetectorResponseResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDetectorResponseResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteDetectorResponseHandleResponse(resp) -} - -// getSiteDetectorResponseCreateRequest creates the GetSiteDetectorResponse request. -func (client *DiagnosticsClient) getSiteDetectorResponseCreateRequest(ctx context.Context, resourceGroupName string, siteName string, detectorName string, options *DiagnosticsClientGetSiteDetectorResponseOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if detectorName == "" { - return nil, errors.New("parameter detectorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StartTime != nil { - reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) - } - if options != nil && options.EndTime != nil { - reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) - } - if options != nil && options.TimeGrain != nil { - reqQP.Set("timeGrain", *options.TimeGrain) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteDetectorResponseHandleResponse handles the GetSiteDetectorResponse response. -func (client *DiagnosticsClient) getSiteDetectorResponseHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDetectorResponseResponse, error) { - result := DiagnosticsClientGetSiteDetectorResponseResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponse); err != nil { - return DiagnosticsClientGetSiteDetectorResponseResponse{}, err - } - return result, nil -} - -// GetSiteDetectorResponseSlot - Get site detector response -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// detectorName - Detector Resource Name -// slot - Slot Name -// options - DiagnosticsClientGetSiteDetectorResponseSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponseSlot -// method. -func (client *DiagnosticsClient) GetSiteDetectorResponseSlot(ctx context.Context, resourceGroupName string, siteName string, detectorName string, slot string, options *DiagnosticsClientGetSiteDetectorResponseSlotOptions) (DiagnosticsClientGetSiteDetectorResponseSlotResponse, error) { - req, err := client.getSiteDetectorResponseSlotCreateRequest(ctx, resourceGroupName, siteName, detectorName, slot, options) - if err != nil { - return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteDetectorResponseSlotHandleResponse(resp) -} - -// getSiteDetectorResponseSlotCreateRequest creates the GetSiteDetectorResponseSlot request. -func (client *DiagnosticsClient) getSiteDetectorResponseSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, detectorName string, slot string, options *DiagnosticsClientGetSiteDetectorResponseSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if detectorName == "" { - return nil, errors.New("parameter detectorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StartTime != nil { - reqQP.Set("startTime", options.StartTime.Format(time.RFC3339Nano)) - } - if options != nil && options.EndTime != nil { - reqQP.Set("endTime", options.EndTime.Format(time.RFC3339Nano)) - } - if options != nil && options.TimeGrain != nil { - reqQP.Set("timeGrain", *options.TimeGrain) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteDetectorResponseSlotHandleResponse handles the GetSiteDetectorResponseSlot response. -func (client *DiagnosticsClient) getSiteDetectorResponseSlotHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDetectorResponseSlotResponse, error) { - result := DiagnosticsClientGetSiteDetectorResponseSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponse); err != nil { - return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, err - } - return result, nil -} - -// GetSiteDetectorSlot - Get Detector -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Diagnostic Category -// detectorName - Detector Name -// slot - Slot Name -// options - DiagnosticsClientGetSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorSlot -// method. -func (client *DiagnosticsClient) GetSiteDetectorSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, slot string, options *DiagnosticsClientGetSiteDetectorSlotOptions) (DiagnosticsClientGetSiteDetectorSlotResponse, error) { - req, err := client.getSiteDetectorSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, detectorName, slot, options) - if err != nil { - return DiagnosticsClientGetSiteDetectorSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientGetSiteDetectorSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDetectorSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteDetectorSlotHandleResponse(resp) -} - -// getSiteDetectorSlotCreateRequest creates the GetSiteDetectorSlot request. -func (client *DiagnosticsClient) getSiteDetectorSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, slot string, options *DiagnosticsClientGetSiteDetectorSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if detectorName == "" { - return nil, errors.New("parameter detectorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{detectorName}", url.PathEscape(detectorName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteDetectorSlotHandleResponse handles the GetSiteDetectorSlot response. -func (client *DiagnosticsClient) getSiteDetectorSlotHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDetectorSlotResponse, error) { - result := DiagnosticsClientGetSiteDetectorSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DetectorDefinitionResource); err != nil { - return DiagnosticsClientGetSiteDetectorSlotResponse{}, err - } - return result, nil -} - -// GetSiteDiagnosticCategory - Get Diagnostics Category -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Diagnostic Category -// options - DiagnosticsClientGetSiteDiagnosticCategoryOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategory -// method. -func (client *DiagnosticsClient) GetSiteDiagnosticCategory(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientGetSiteDiagnosticCategoryOptions) (DiagnosticsClientGetSiteDiagnosticCategoryResponse, error) { - req, err := client.getSiteDiagnosticCategoryCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) - if err != nil { - return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteDiagnosticCategoryHandleResponse(resp) -} - -// getSiteDiagnosticCategoryCreateRequest creates the GetSiteDiagnosticCategory request. -func (client *DiagnosticsClient) getSiteDiagnosticCategoryCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientGetSiteDiagnosticCategoryOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteDiagnosticCategoryHandleResponse handles the GetSiteDiagnosticCategory response. -func (client *DiagnosticsClient) getSiteDiagnosticCategoryHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDiagnosticCategoryResponse, error) { - result := DiagnosticsClientGetSiteDiagnosticCategoryResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticCategory); err != nil { - return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, err - } - return result, nil -} - -// GetSiteDiagnosticCategorySlot - Get Diagnostics Category -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Diagnostic Category -// slot - Slot Name -// options - DiagnosticsClientGetSiteDiagnosticCategorySlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategorySlot -// method. -func (client *DiagnosticsClient) GetSiteDiagnosticCategorySlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientGetSiteDiagnosticCategorySlotOptions) (DiagnosticsClientGetSiteDiagnosticCategorySlotResponse, error) { - req, err := client.getSiteDiagnosticCategorySlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) - if err != nil { - return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteDiagnosticCategorySlotHandleResponse(resp) -} - -// getSiteDiagnosticCategorySlotCreateRequest creates the GetSiteDiagnosticCategorySlot request. -func (client *DiagnosticsClient) getSiteDiagnosticCategorySlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientGetSiteDiagnosticCategorySlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteDiagnosticCategorySlotHandleResponse handles the GetSiteDiagnosticCategorySlot response. -func (client *DiagnosticsClient) getSiteDiagnosticCategorySlotHandleResponse(resp *http.Response) (DiagnosticsClientGetSiteDiagnosticCategorySlotResponse, error) { - result := DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticCategory); err != nil { - return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, err - } - return result, nil -} - -// NewListHostingEnvironmentDetectorResponsesPager - List Hosting Environment Detector Responses -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site Name -// options - DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.ListHostingEnvironmentDetectorResponses -// method. -func (client *DiagnosticsClient) NewListHostingEnvironmentDetectorResponsesPager(resourceGroupName string, name string, options *DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions) *runtime.Pager[DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse] { - return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse]{ - More: func(page DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse) (DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHostingEnvironmentDetectorResponsesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{}, runtime.NewResponseError(resp) - } - return client.listHostingEnvironmentDetectorResponsesHandleResponse(resp) - }, - }) -} - -// listHostingEnvironmentDetectorResponsesCreateRequest creates the ListHostingEnvironmentDetectorResponses request. -func (client *DiagnosticsClient) listHostingEnvironmentDetectorResponsesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHostingEnvironmentDetectorResponsesHandleResponse handles the ListHostingEnvironmentDetectorResponses response. -func (client *DiagnosticsClient) listHostingEnvironmentDetectorResponsesHandleResponse(resp *http.Response) (DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse, error) { - result := DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponseCollection); err != nil { - return DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{}, err - } - return result, nil -} - -// NewListSiteAnalysesPager - Get Site Analyses -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Diagnostic Category -// options - DiagnosticsClientListSiteAnalysesOptions contains the optional parameters for the DiagnosticsClient.ListSiteAnalyses -// method. -func (client *DiagnosticsClient) NewListSiteAnalysesPager(resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientListSiteAnalysesOptions) *runtime.Pager[DiagnosticsClientListSiteAnalysesResponse] { - return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteAnalysesResponse]{ - More: func(page DiagnosticsClientListSiteAnalysesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteAnalysesResponse) (DiagnosticsClientListSiteAnalysesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteAnalysesCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteAnalysesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientListSiteAnalysesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteAnalysesResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteAnalysesHandleResponse(resp) - }, - }) -} - -// listSiteAnalysesCreateRequest creates the ListSiteAnalyses request. -func (client *DiagnosticsClient) listSiteAnalysesCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientListSiteAnalysesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteAnalysesHandleResponse handles the ListSiteAnalyses response. -func (client *DiagnosticsClient) listSiteAnalysesHandleResponse(resp *http.Response) (DiagnosticsClientListSiteAnalysesResponse, error) { - result := DiagnosticsClientListSiteAnalysesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticAnalysisCollection); err != nil { - return DiagnosticsClientListSiteAnalysesResponse{}, err - } - return result, nil -} - -// NewListSiteAnalysesSlotPager - Get Site Analyses -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Diagnostic Category -// slot - Slot Name -// options - DiagnosticsClientListSiteAnalysesSlotOptions contains the optional parameters for the DiagnosticsClient.ListSiteAnalysesSlot -// method. -func (client *DiagnosticsClient) NewListSiteAnalysesSlotPager(resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientListSiteAnalysesSlotOptions) *runtime.Pager[DiagnosticsClientListSiteAnalysesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteAnalysesSlotResponse]{ - More: func(page DiagnosticsClientListSiteAnalysesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteAnalysesSlotResponse) (DiagnosticsClientListSiteAnalysesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteAnalysesSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteAnalysesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientListSiteAnalysesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteAnalysesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteAnalysesSlotHandleResponse(resp) - }, - }) -} - -// listSiteAnalysesSlotCreateRequest creates the ListSiteAnalysesSlot request. -func (client *DiagnosticsClient) listSiteAnalysesSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientListSiteAnalysesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteAnalysesSlotHandleResponse handles the ListSiteAnalysesSlot response. -func (client *DiagnosticsClient) listSiteAnalysesSlotHandleResponse(resp *http.Response) (DiagnosticsClientListSiteAnalysesSlotResponse, error) { - result := DiagnosticsClientListSiteAnalysesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticAnalysisCollection); err != nil { - return DiagnosticsClientListSiteAnalysesSlotResponse{}, err - } - return result, nil -} - -// NewListSiteDetectorResponsesPager - List Site Detector Responses -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// options - DiagnosticsClientListSiteDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.ListSiteDetectorResponses -// method. -func (client *DiagnosticsClient) NewListSiteDetectorResponsesPager(resourceGroupName string, siteName string, options *DiagnosticsClientListSiteDetectorResponsesOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorResponsesResponse] { - return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDetectorResponsesResponse]{ - More: func(page DiagnosticsClientListSiteDetectorResponsesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorResponsesResponse) (DiagnosticsClientListSiteDetectorResponsesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDetectorResponsesCreateRequest(ctx, resourceGroupName, siteName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteDetectorResponsesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientListSiteDetectorResponsesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDetectorResponsesResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteDetectorResponsesHandleResponse(resp) - }, - }) -} - -// listSiteDetectorResponsesCreateRequest creates the ListSiteDetectorResponses request. -func (client *DiagnosticsClient) listSiteDetectorResponsesCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *DiagnosticsClientListSiteDetectorResponsesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteDetectorResponsesHandleResponse handles the ListSiteDetectorResponses response. -func (client *DiagnosticsClient) listSiteDetectorResponsesHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDetectorResponsesResponse, error) { - result := DiagnosticsClientListSiteDetectorResponsesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponseCollection); err != nil { - return DiagnosticsClientListSiteDetectorResponsesResponse{}, err - } - return result, nil -} - -// NewListSiteDetectorResponsesSlotPager - List Site Detector Responses -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// slot - Slot Name -// options - DiagnosticsClientListSiteDetectorResponsesSlotOptions contains the optional parameters for the DiagnosticsClient.ListSiteDetectorResponsesSlot -// method. -func (client *DiagnosticsClient) NewListSiteDetectorResponsesSlotPager(resourceGroupName string, siteName string, slot string, options *DiagnosticsClientListSiteDetectorResponsesSlotOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorResponsesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDetectorResponsesSlotResponse]{ - More: func(page DiagnosticsClientListSiteDetectorResponsesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorResponsesSlotResponse) (DiagnosticsClientListSiteDetectorResponsesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDetectorResponsesSlotCreateRequest(ctx, resourceGroupName, siteName, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteDetectorResponsesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientListSiteDetectorResponsesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDetectorResponsesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteDetectorResponsesSlotHandleResponse(resp) - }, - }) -} - -// listSiteDetectorResponsesSlotCreateRequest creates the ListSiteDetectorResponsesSlot request. -func (client *DiagnosticsClient) listSiteDetectorResponsesSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, slot string, options *DiagnosticsClientListSiteDetectorResponsesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteDetectorResponsesSlotHandleResponse handles the ListSiteDetectorResponsesSlot response. -func (client *DiagnosticsClient) listSiteDetectorResponsesSlotHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDetectorResponsesSlotResponse, error) { - result := DiagnosticsClientListSiteDetectorResponsesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DetectorResponseCollection); err != nil { - return DiagnosticsClientListSiteDetectorResponsesSlotResponse{}, err - } - return result, nil -} - -// NewListSiteDetectorsPager - Get Detectors -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Diagnostic Category -// options - DiagnosticsClientListSiteDetectorsOptions contains the optional parameters for the DiagnosticsClient.ListSiteDetectors -// method. -func (client *DiagnosticsClient) NewListSiteDetectorsPager(resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientListSiteDetectorsOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorsResponse] { - return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDetectorsResponse]{ - More: func(page DiagnosticsClientListSiteDetectorsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorsResponse) (DiagnosticsClientListSiteDetectorsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDetectorsCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteDetectorsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientListSiteDetectorsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDetectorsResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteDetectorsHandleResponse(resp) - }, - }) -} - -// listSiteDetectorsCreateRequest creates the ListSiteDetectors request. -func (client *DiagnosticsClient) listSiteDetectorsCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientListSiteDetectorsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteDetectorsHandleResponse handles the ListSiteDetectors response. -func (client *DiagnosticsClient) listSiteDetectorsHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDetectorsResponse, error) { - result := DiagnosticsClientListSiteDetectorsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticDetectorCollection); err != nil { - return DiagnosticsClientListSiteDetectorsResponse{}, err - } - return result, nil -} - -// NewListSiteDetectorsSlotPager - Get Detectors -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// diagnosticCategory - Diagnostic Category -// slot - Slot Name -// options - DiagnosticsClientListSiteDetectorsSlotOptions contains the optional parameters for the DiagnosticsClient.ListSiteDetectorsSlot -// method. -func (client *DiagnosticsClient) NewListSiteDetectorsSlotPager(resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientListSiteDetectorsSlotOptions) *runtime.Pager[DiagnosticsClientListSiteDetectorsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDetectorsSlotResponse]{ - More: func(page DiagnosticsClientListSiteDetectorsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorsSlotResponse) (DiagnosticsClientListSiteDetectorsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDetectorsSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteDetectorsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientListSiteDetectorsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDetectorsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteDetectorsSlotHandleResponse(resp) - }, - }) -} - -// listSiteDetectorsSlotCreateRequest creates the ListSiteDetectorsSlot request. -func (client *DiagnosticsClient) listSiteDetectorsSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientListSiteDetectorsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if diagnosticCategory == "" { - return nil, errors.New("parameter diagnosticCategory cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticCategory}", url.PathEscape(diagnosticCategory)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteDetectorsSlotHandleResponse handles the ListSiteDetectorsSlot response. -func (client *DiagnosticsClient) listSiteDetectorsSlotHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDetectorsSlotResponse, error) { - result := DiagnosticsClientListSiteDetectorsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticDetectorCollection); err != nil { - return DiagnosticsClientListSiteDetectorsSlotResponse{}, err - } - return result, nil -} - -// NewListSiteDiagnosticCategoriesPager - Get Diagnostics Categories -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// options - DiagnosticsClientListSiteDiagnosticCategoriesOptions contains the optional parameters for the DiagnosticsClient.ListSiteDiagnosticCategories -// method. -func (client *DiagnosticsClient) NewListSiteDiagnosticCategoriesPager(resourceGroupName string, siteName string, options *DiagnosticsClientListSiteDiagnosticCategoriesOptions) *runtime.Pager[DiagnosticsClientListSiteDiagnosticCategoriesResponse] { - return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDiagnosticCategoriesResponse]{ - More: func(page DiagnosticsClientListSiteDiagnosticCategoriesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDiagnosticCategoriesResponse) (DiagnosticsClientListSiteDiagnosticCategoriesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDiagnosticCategoriesCreateRequest(ctx, resourceGroupName, siteName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteDiagnosticCategoriesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientListSiteDiagnosticCategoriesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDiagnosticCategoriesResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteDiagnosticCategoriesHandleResponse(resp) - }, - }) -} - -// listSiteDiagnosticCategoriesCreateRequest creates the ListSiteDiagnosticCategories request. -func (client *DiagnosticsClient) listSiteDiagnosticCategoriesCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *DiagnosticsClientListSiteDiagnosticCategoriesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteDiagnosticCategoriesHandleResponse handles the ListSiteDiagnosticCategories response. -func (client *DiagnosticsClient) listSiteDiagnosticCategoriesHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDiagnosticCategoriesResponse, error) { - result := DiagnosticsClientListSiteDiagnosticCategoriesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticCategoryCollection); err != nil { - return DiagnosticsClientListSiteDiagnosticCategoriesResponse{}, err - } - return result, nil -} - -// NewListSiteDiagnosticCategoriesSlotPager - Get Diagnostics Categories -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site Name -// slot - Slot Name -// options - DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions contains the optional parameters for the DiagnosticsClient.ListSiteDiagnosticCategoriesSlot -// method. -func (client *DiagnosticsClient) NewListSiteDiagnosticCategoriesSlotPager(resourceGroupName string, siteName string, slot string, options *DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions) *runtime.Pager[DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse]{ - More: func(page DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse) (DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDiagnosticCategoriesSlotCreateRequest(ctx, resourceGroupName, siteName, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteDiagnosticCategoriesSlotHandleResponse(resp) - }, - }) -} - -// listSiteDiagnosticCategoriesSlotCreateRequest creates the ListSiteDiagnosticCategoriesSlot request. -func (client *DiagnosticsClient) listSiteDiagnosticCategoriesSlotCreateRequest(ctx context.Context, resourceGroupName string, siteName string, slot string, options *DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteDiagnosticCategoriesSlotHandleResponse handles the ListSiteDiagnosticCategoriesSlot response. -func (client *DiagnosticsClient) listSiteDiagnosticCategoriesSlotHandleResponse(resp *http.Response) (DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse, error) { - result := DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticCategoryCollection); err != nil { - return DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_domainregistrationprovider_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_domainregistrationprovider_client.go deleted file mode 100644 index f6ea4522..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_domainregistrationprovider_client.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// DomainRegistrationProviderClient contains the methods for the DomainRegistrationProvider group. -// Don't use this type directly, use NewDomainRegistrationProviderClient() instead. -type DomainRegistrationProviderClient struct { - host string - pl runtime.Pipeline -} - -// NewDomainRegistrationProviderClient creates a new instance of DomainRegistrationProviderClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDomainRegistrationProviderClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DomainRegistrationProviderClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DomainRegistrationProviderClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListOperationsPager - Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - DomainRegistrationProviderClientListOperationsOptions contains the optional parameters for the DomainRegistrationProviderClient.ListOperations -// method. -func (client *DomainRegistrationProviderClient) NewListOperationsPager(options *DomainRegistrationProviderClientListOperationsOptions) *runtime.Pager[DomainRegistrationProviderClientListOperationsResponse] { - return runtime.NewPager(runtime.PagingHandler[DomainRegistrationProviderClientListOperationsResponse]{ - More: func(page DomainRegistrationProviderClientListOperationsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DomainRegistrationProviderClientListOperationsResponse) (DomainRegistrationProviderClientListOperationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listOperationsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DomainRegistrationProviderClientListOperationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainRegistrationProviderClientListOperationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainRegistrationProviderClientListOperationsResponse{}, runtime.NewResponseError(resp) - } - return client.listOperationsHandleResponse(resp) - }, - }) -} - -// listOperationsCreateRequest creates the ListOperations request. -func (client *DomainRegistrationProviderClient) listOperationsCreateRequest(ctx context.Context, options *DomainRegistrationProviderClientListOperationsOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.DomainRegistration/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listOperationsHandleResponse handles the ListOperations response. -func (client *DomainRegistrationProviderClient) listOperationsHandleResponse(resp *http.Response) (DomainRegistrationProviderClientListOperationsResponse, error) { - result := DomainRegistrationProviderClientListOperationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmOperationCollection); err != nil { - return DomainRegistrationProviderClientListOperationsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_domains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_domains_client.go deleted file mode 100644 index ab5f6ac2..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_domains_client.go +++ /dev/null @@ -1,979 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// DomainsClient contains the methods for the Domains group. -// Don't use this type directly, use NewDomainsClient() instead. -type DomainsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDomainsClient creates a new instance of DomainsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DomainsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DomainsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CheckAvailability - Check if a domain is available for registration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// identifier - Name of the domain. -// options - DomainsClientCheckAvailabilityOptions contains the optional parameters for the DomainsClient.CheckAvailability -// method. -func (client *DomainsClient) CheckAvailability(ctx context.Context, identifier NameIdentifier, options *DomainsClientCheckAvailabilityOptions) (DomainsClientCheckAvailabilityResponse, error) { - req, err := client.checkAvailabilityCreateRequest(ctx, identifier, options) - if err != nil { - return DomainsClientCheckAvailabilityResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientCheckAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientCheckAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkAvailabilityHandleResponse(resp) -} - -// checkAvailabilityCreateRequest creates the CheckAvailability request. -func (client *DomainsClient) checkAvailabilityCreateRequest(ctx context.Context, identifier NameIdentifier, options *DomainsClientCheckAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, identifier) -} - -// checkAvailabilityHandleResponse handles the CheckAvailability response. -func (client *DomainsClient) checkAvailabilityHandleResponse(resp *http.Response) (DomainsClientCheckAvailabilityResponse, error) { - result := DomainsClientCheckAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DomainAvailabilityCheckResult); err != nil { - return DomainsClientCheckAvailabilityResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdate - Creates or updates a domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of the domain. -// domain - Domain registration information. -// options - DomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the DomainsClient.BeginCreateOrUpdate -// method. -func (client *DomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, domainName string, domain Domain, options *DomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DomainsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, domainName, domain, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[DomainsClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[DomainsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *DomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, domainName string, domain Domain, options *DomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, domainName, domain, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DomainsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, domainName string, domain Domain, options *DomainsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domain) -} - -// CreateOrUpdateOwnershipIdentifier - Creates an ownership identifier for a domain or updates identifier details for an existing -// identifier -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of domain. -// name - Name of identifier. -// domainOwnershipIdentifier - A JSON representation of the domain ownership properties. -// options - DomainsClientCreateOrUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.CreateOrUpdateOwnershipIdentifier -// method. -func (client *DomainsClient) CreateOrUpdateOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier, options *DomainsClientCreateOrUpdateOwnershipIdentifierOptions) (DomainsClientCreateOrUpdateOwnershipIdentifierResponse, error) { - req, err := client.createOrUpdateOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, domainOwnershipIdentifier, options) - if err != nil { - return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateOwnershipIdentifierHandleResponse(resp) -} - -// createOrUpdateOwnershipIdentifierCreateRequest creates the CreateOrUpdateOwnershipIdentifier request. -func (client *DomainsClient) createOrUpdateOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier, options *DomainsClientCreateOrUpdateOwnershipIdentifierOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) -} - -// createOrUpdateOwnershipIdentifierHandleResponse handles the CreateOrUpdateOwnershipIdentifier response. -func (client *DomainsClient) createOrUpdateOwnershipIdentifierHandleResponse(resp *http.Response) (DomainsClientCreateOrUpdateOwnershipIdentifierResponse, error) { - result := DomainsClientCreateOrUpdateOwnershipIdentifierResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DomainOwnershipIdentifier); err != nil { - return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, err - } - return result, nil -} - -// Delete - Delete a domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of the domain. -// options - DomainsClientDeleteOptions contains the optional parameters for the DomainsClient.Delete method. -func (client *DomainsClient) Delete(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientDeleteOptions) (DomainsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, domainName, options) - if err != nil { - return DomainsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DomainsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return DomainsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.ForceHardDeleteDomain != nil { - reqQP.Set("forceHardDeleteDomain", strconv.FormatBool(*options.ForceHardDeleteDomain)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteOwnershipIdentifier - Delete ownership identifier for domain -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of domain. -// name - Name of identifier. -// options - DomainsClientDeleteOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.DeleteOwnershipIdentifier -// method. -func (client *DomainsClient) DeleteOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, options *DomainsClientDeleteOwnershipIdentifierOptions) (DomainsClientDeleteOwnershipIdentifierResponse, error) { - req, err := client.deleteOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, options) - if err != nil { - return DomainsClientDeleteOwnershipIdentifierResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientDeleteOwnershipIdentifierResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DomainsClientDeleteOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) - } - return DomainsClientDeleteOwnershipIdentifierResponse{}, nil -} - -// deleteOwnershipIdentifierCreateRequest creates the DeleteOwnershipIdentifier request. -func (client *DomainsClient) deleteOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, domainName string, name string, options *DomainsClientDeleteOwnershipIdentifierOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of the domain. -// options - DomainsClientGetOptions contains the optional parameters for the DomainsClient.Get method. -func (client *DomainsClient) Get(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientGetOptions) (DomainsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, domainName, options) - if err != nil { - return DomainsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DomainsClient) getHandleResponse(resp *http.Response) (DomainsClientGetResponse, error) { - result := DomainsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Domain); err != nil { - return DomainsClientGetResponse{}, err - } - return result, nil -} - -// GetControlCenterSsoRequest - Generate a single sign-on request for the domain management portal. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - DomainsClientGetControlCenterSsoRequestOptions contains the optional parameters for the DomainsClient.GetControlCenterSsoRequest -// method. -func (client *DomainsClient) GetControlCenterSsoRequest(ctx context.Context, options *DomainsClientGetControlCenterSsoRequestOptions) (DomainsClientGetControlCenterSsoRequestResponse, error) { - req, err := client.getControlCenterSsoRequestCreateRequest(ctx, options) - if err != nil { - return DomainsClientGetControlCenterSsoRequestResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientGetControlCenterSsoRequestResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientGetControlCenterSsoRequestResponse{}, runtime.NewResponseError(resp) - } - return client.getControlCenterSsoRequestHandleResponse(resp) -} - -// getControlCenterSsoRequestCreateRequest creates the GetControlCenterSsoRequest request. -func (client *DomainsClient) getControlCenterSsoRequestCreateRequest(ctx context.Context, options *DomainsClientGetControlCenterSsoRequestOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getControlCenterSsoRequestHandleResponse handles the GetControlCenterSsoRequest response. -func (client *DomainsClient) getControlCenterSsoRequestHandleResponse(resp *http.Response) (DomainsClientGetControlCenterSsoRequestResponse, error) { - result := DomainsClientGetControlCenterSsoRequestResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DomainControlCenterSsoRequest); err != nil { - return DomainsClientGetControlCenterSsoRequestResponse{}, err - } - return result, nil -} - -// GetOwnershipIdentifier - Get ownership identifier for domain -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of domain. -// name - Name of identifier. -// options - DomainsClientGetOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.GetOwnershipIdentifier -// method. -func (client *DomainsClient) GetOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, options *DomainsClientGetOwnershipIdentifierOptions) (DomainsClientGetOwnershipIdentifierResponse, error) { - req, err := client.getOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, options) - if err != nil { - return DomainsClientGetOwnershipIdentifierResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientGetOwnershipIdentifierResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientGetOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) - } - return client.getOwnershipIdentifierHandleResponse(resp) -} - -// getOwnershipIdentifierCreateRequest creates the GetOwnershipIdentifier request. -func (client *DomainsClient) getOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, domainName string, name string, options *DomainsClientGetOwnershipIdentifierOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getOwnershipIdentifierHandleResponse handles the GetOwnershipIdentifier response. -func (client *DomainsClient) getOwnershipIdentifierHandleResponse(resp *http.Response) (DomainsClientGetOwnershipIdentifierResponse, error) { - result := DomainsClientGetOwnershipIdentifierResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DomainOwnershipIdentifier); err != nil { - return DomainsClientGetOwnershipIdentifierResponse{}, err - } - return result, nil -} - -// NewListPager - Get all domains in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - DomainsClientListOptions contains the optional parameters for the DomainsClient.List method. -func (client *DomainsClient) NewListPager(options *DomainsClientListOptions) *runtime.Pager[DomainsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[DomainsClientListResponse]{ - More: func(page DomainsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DomainsClientListResponse) (DomainsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DomainsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *DomainsClient) listCreateRequest(ctx context.Context, options *DomainsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DomainsClient) listHandleResponse(resp *http.Response) (DomainsClientListResponse, error) { - result := DomainsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DomainCollection); err != nil { - return DomainsClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get all domains in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - DomainsClientListByResourceGroupOptions contains the optional parameters for the DomainsClient.ListByResourceGroup -// method. -func (client *DomainsClient) NewListByResourceGroupPager(resourceGroupName string, options *DomainsClientListByResourceGroupOptions) *runtime.Pager[DomainsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[DomainsClientListByResourceGroupResponse]{ - More: func(page DomainsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DomainsClientListByResourceGroupResponse) (DomainsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DomainsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *DomainsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DomainsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *DomainsClient) listByResourceGroupHandleResponse(resp *http.Response) (DomainsClientListByResourceGroupResponse, error) { - result := DomainsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DomainCollection); err != nil { - return DomainsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListOwnershipIdentifiersPager - Lists domain ownership identifiers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of domain. -// options - DomainsClientListOwnershipIdentifiersOptions contains the optional parameters for the DomainsClient.ListOwnershipIdentifiers -// method. -func (client *DomainsClient) NewListOwnershipIdentifiersPager(resourceGroupName string, domainName string, options *DomainsClientListOwnershipIdentifiersOptions) *runtime.Pager[DomainsClientListOwnershipIdentifiersResponse] { - return runtime.NewPager(runtime.PagingHandler[DomainsClientListOwnershipIdentifiersResponse]{ - More: func(page DomainsClientListOwnershipIdentifiersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DomainsClientListOwnershipIdentifiersResponse) (DomainsClientListOwnershipIdentifiersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listOwnershipIdentifiersCreateRequest(ctx, resourceGroupName, domainName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DomainsClientListOwnershipIdentifiersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientListOwnershipIdentifiersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientListOwnershipIdentifiersResponse{}, runtime.NewResponseError(resp) - } - return client.listOwnershipIdentifiersHandleResponse(resp) - }, - }) -} - -// listOwnershipIdentifiersCreateRequest creates the ListOwnershipIdentifiers request. -func (client *DomainsClient) listOwnershipIdentifiersCreateRequest(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientListOwnershipIdentifiersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listOwnershipIdentifiersHandleResponse handles the ListOwnershipIdentifiers response. -func (client *DomainsClient) listOwnershipIdentifiersHandleResponse(resp *http.Response) (DomainsClientListOwnershipIdentifiersResponse, error) { - result := DomainsClientListOwnershipIdentifiersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DomainOwnershipIdentifierCollection); err != nil { - return DomainsClientListOwnershipIdentifiersResponse{}, err - } - return result, nil -} - -// NewListRecommendationsPager - Get domain name recommendations based on keywords. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// parameters - Search parameters for domain name recommendations. -// options - DomainsClientListRecommendationsOptions contains the optional parameters for the DomainsClient.ListRecommendations -// method. -func (client *DomainsClient) NewListRecommendationsPager(parameters DomainRecommendationSearchParameters, options *DomainsClientListRecommendationsOptions) *runtime.Pager[DomainsClientListRecommendationsResponse] { - return runtime.NewPager(runtime.PagingHandler[DomainsClientListRecommendationsResponse]{ - More: func(page DomainsClientListRecommendationsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DomainsClientListRecommendationsResponse) (DomainsClientListRecommendationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRecommendationsCreateRequest(ctx, parameters, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DomainsClientListRecommendationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientListRecommendationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientListRecommendationsResponse{}, runtime.NewResponseError(resp) - } - return client.listRecommendationsHandleResponse(resp) - }, - }) -} - -// listRecommendationsCreateRequest creates the ListRecommendations request. -func (client *DomainsClient) listRecommendationsCreateRequest(ctx context.Context, parameters DomainRecommendationSearchParameters, options *DomainsClientListRecommendationsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// listRecommendationsHandleResponse handles the ListRecommendations response. -func (client *DomainsClient) listRecommendationsHandleResponse(resp *http.Response) (DomainsClientListRecommendationsResponse, error) { - result := DomainsClientListRecommendationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NameIdentifierCollection); err != nil { - return DomainsClientListRecommendationsResponse{}, err - } - return result, nil -} - -// Renew - Renew a domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of the domain. -// options - DomainsClientRenewOptions contains the optional parameters for the DomainsClient.Renew method. -func (client *DomainsClient) Renew(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientRenewOptions) (DomainsClientRenewResponse, error) { - req, err := client.renewCreateRequest(ctx, resourceGroupName, domainName, options) - if err != nil { - return DomainsClientRenewResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientRenewResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return DomainsClientRenewResponse{}, runtime.NewResponseError(resp) - } - return DomainsClientRenewResponse{}, nil -} - -// renewCreateRequest creates the Renew request. -func (client *DomainsClient) renewCreateRequest(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientRenewOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// TransferOut - Transfer out domain to another registrar -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of domain. -// options - DomainsClientTransferOutOptions contains the optional parameters for the DomainsClient.TransferOut method. -func (client *DomainsClient) TransferOut(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientTransferOutOptions) (DomainsClientTransferOutResponse, error) { - req, err := client.transferOutCreateRequest(ctx, resourceGroupName, domainName, options) - if err != nil { - return DomainsClientTransferOutResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientTransferOutResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientTransferOutResponse{}, runtime.NewResponseError(resp) - } - return client.transferOutHandleResponse(resp) -} - -// transferOutCreateRequest creates the TransferOut request. -func (client *DomainsClient) transferOutCreateRequest(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientTransferOutOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// transferOutHandleResponse handles the TransferOut response. -func (client *DomainsClient) transferOutHandleResponse(resp *http.Response) (DomainsClientTransferOutResponse, error) { - result := DomainsClientTransferOutResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Domain); err != nil { - return DomainsClientTransferOutResponse{}, err - } - return result, nil -} - -// Update - Creates or updates a domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of the domain. -// domain - Domain registration information. -// options - DomainsClientUpdateOptions contains the optional parameters for the DomainsClient.Update method. -func (client *DomainsClient) Update(ctx context.Context, resourceGroupName string, domainName string, domain DomainPatchResource, options *DomainsClientUpdateOptions) (DomainsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, domainName, domain, options) - if err != nil { - return DomainsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return DomainsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *DomainsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, domainName string, domain DomainPatchResource, options *DomainsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domain) -} - -// updateHandleResponse handles the Update response. -func (client *DomainsClient) updateHandleResponse(resp *http.Response) (DomainsClientUpdateResponse, error) { - result := DomainsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Domain); err != nil { - return DomainsClientUpdateResponse{}, err - } - return result, nil -} - -// UpdateOwnershipIdentifier - Creates an ownership identifier for a domain or updates identifier details for an existing -// identifier -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// domainName - Name of domain. -// name - Name of identifier. -// domainOwnershipIdentifier - A JSON representation of the domain ownership properties. -// options - DomainsClientUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.UpdateOwnershipIdentifier -// method. -func (client *DomainsClient) UpdateOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier, options *DomainsClientUpdateOwnershipIdentifierOptions) (DomainsClientUpdateOwnershipIdentifierResponse, error) { - req, err := client.updateOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, domainOwnershipIdentifier, options) - if err != nil { - return DomainsClientUpdateOwnershipIdentifierResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DomainsClientUpdateOwnershipIdentifierResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientUpdateOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) - } - return client.updateOwnershipIdentifierHandleResponse(resp) -} - -// updateOwnershipIdentifierCreateRequest creates the UpdateOwnershipIdentifier request. -func (client *DomainsClient) updateOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier, options *DomainsClientUpdateOwnershipIdentifierOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) -} - -// updateOwnershipIdentifierHandleResponse handles the UpdateOwnershipIdentifier response. -func (client *DomainsClient) updateOwnershipIdentifierHandleResponse(resp *http.Response) (DomainsClientUpdateOwnershipIdentifierResponse, error) { - result := DomainsClientUpdateOwnershipIdentifierResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DomainOwnershipIdentifier); err != nil { - return DomainsClientUpdateOwnershipIdentifierResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_environments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_environments_client.go deleted file mode 100644 index 47ae9d51..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_environments_client.go +++ /dev/null @@ -1,2959 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// EnvironmentsClient contains the methods for the AppServiceEnvironments group. -// Don't use this type directly, use NewEnvironmentsClient() instead. -type EnvironmentsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewEnvironmentsClient creates a new instance of EnvironmentsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnvironmentsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &EnvironmentsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the -// EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection method. -func (client *EnvironmentsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.approveOrRejectPrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// ApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { - req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. -func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) -} - -// BeginChangeVnet - Move an App Service Environment to a different VNET. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// vnetInfo - Details for the new virtual network. -// options - EnvironmentsClientBeginChangeVnetOptions contains the optional parameters for the EnvironmentsClient.BeginChangeVnet -// method. -func (client *EnvironmentsClient) BeginChangeVnet(ctx context.Context, resourceGroupName string, name string, vnetInfo VirtualNetworkProfile, options *EnvironmentsClientBeginChangeVnetOptions) (*runtime.Poller[*runtime.Pager[EnvironmentsClientChangeVnetResponse]], error) { - pager := runtime.NewPager(runtime.PagingHandler[EnvironmentsClientChangeVnetResponse]{ - More: func(page EnvironmentsClientChangeVnetResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientChangeVnetResponse) (EnvironmentsClientChangeVnetResponse, error) { - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - if err != nil { - return EnvironmentsClientChangeVnetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientChangeVnetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientChangeVnetResponse{}, runtime.NewResponseError(resp) - } - return client.changeVnetHandleResponse(resp) - }, - }) - if options == nil || options.ResumeToken == "" { - resp, err := client.changeVnet(ctx, resourceGroupName, name, vnetInfo, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientChangeVnetResponse]]{ - Response: &pager, - }) - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.pl, &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[EnvironmentsClientChangeVnetResponse]]{ - Response: &pager, - }) - } -} - -// ChangeVnet - Move an App Service Environment to a different VNET. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *EnvironmentsClient) changeVnet(ctx context.Context, resourceGroupName string, name string, vnetInfo VirtualNetworkProfile, options *EnvironmentsClientBeginChangeVnetOptions) (*http.Response, error) { - req, err := client.changeVnetCreateRequest(ctx, resourceGroupName, name, vnetInfo, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// changeVnetCreateRequest creates the ChangeVnet request. -func (client *EnvironmentsClient) changeVnetCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetInfo VirtualNetworkProfile, options *EnvironmentsClientBeginChangeVnetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vnetInfo) -} - -// changeVnetHandleResponse handles the ChangeVnet response. -func (client *EnvironmentsClient) changeVnetHandleResponse(resp *http.Response) (EnvironmentsClientChangeVnetResponse, error) { - result := EnvironmentsClientChangeVnetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { - return EnvironmentsClientChangeVnetResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdate - Create or update an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// hostingEnvironmentEnvelope - Configuration details of the App Service Environment. -// options - EnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdate -// method. -func (client *EnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentResource, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[EnvironmentsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, name, hostingEnvironmentEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EnvironmentsClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *EnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentResource, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, hostingEnvironmentEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentResource, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope) -} - -// BeginCreateOrUpdateMultiRolePool - Create or update a multi-role pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// multiRolePoolEnvelope - Properties of the multi-role pool. -// options - EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateMultiRolePool -// method. -func (client *EnvironmentsClient) BeginCreateOrUpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (*runtime.Poller[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdateMultiRolePool(ctx, resourceGroupName, name, multiRolePoolEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdateMultiRolePool - Create or update a multi-role pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *EnvironmentsClient) createOrUpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (*http.Response, error) { - req, err := client.createOrUpdateMultiRolePoolCreateRequest(ctx, resourceGroupName, name, multiRolePoolEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateMultiRolePoolCreateRequest creates the CreateOrUpdateMultiRolePool request. -func (client *EnvironmentsClient) createOrUpdateMultiRolePoolCreateRequest(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, multiRolePoolEnvelope) -} - -// BeginCreateOrUpdateWorkerPool - Create or update a worker pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// workerPoolName - Name of the worker pool. -// workerPoolEnvelope - Properties of the worker pool. -// options - EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateWorkerPool -// method. -func (client *EnvironmentsClient) BeginCreateOrUpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (*runtime.Poller[EnvironmentsClientCreateOrUpdateWorkerPoolResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdateWorkerPool(ctx, resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EnvironmentsClientCreateOrUpdateWorkerPoolResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientCreateOrUpdateWorkerPoolResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdateWorkerPool - Create or update a worker pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *EnvironmentsClient) createOrUpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (*http.Response, error) { - req, err := client.createOrUpdateWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateWorkerPoolCreateRequest creates the CreateOrUpdateWorkerPool request. -func (client *EnvironmentsClient) createOrUpdateWorkerPoolCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if workerPoolName == "" { - return nil, errors.New("parameter workerPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workerPoolEnvelope) -} - -// BeginDelete - Delete an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientBeginDeleteOptions contains the optional parameters for the EnvironmentsClient.BeginDelete -// method. -func (client *EnvironmentsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginDeleteOptions) (*runtime.Poller[EnvironmentsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EnvironmentsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *EnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *EnvironmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.ForceDelete != nil { - reqQP.Set("forceDelete", strconv.FormatBool(*options.ForceDelete)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDeletePrivateEndpointConnection - Deletes a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginDeletePrivateEndpointConnection -// method. -func (client *EnvironmentsClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (*runtime.Poller[EnvironmentsClientDeletePrivateEndpointConnectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EnvironmentsClientDeletePrivateEndpointConnectionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientDeletePrivateEndpointConnectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// DeletePrivateEndpointConnection - Deletes a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *EnvironmentsClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { - req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. -func (client *EnvironmentsClient) deletePrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the properties of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. -func (client *EnvironmentsClient) Get(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetOptions) (EnvironmentsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return EnvironmentsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *EnvironmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *EnvironmentsClient) getHandleResponse(resp *http.Response) (EnvironmentsClientGetResponse, error) { - result := EnvironmentsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentResource); err != nil { - return EnvironmentsClientGetResponse{}, err - } - return result, nil -} - -// GetAseV3NetworkingConfiguration - Get networking configuration of an App Service Environment -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientGetAseV3NetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseV3NetworkingConfiguration -// method. -func (client *EnvironmentsClient) GetAseV3NetworkingConfiguration(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetAseV3NetworkingConfigurationOptions) (EnvironmentsClientGetAseV3NetworkingConfigurationResponse, error) { - req, err := client.getAseV3NetworkingConfigurationCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, runtime.NewResponseError(resp) - } - return client.getAseV3NetworkingConfigurationHandleResponse(resp) -} - -// getAseV3NetworkingConfigurationCreateRequest creates the GetAseV3NetworkingConfiguration request. -func (client *EnvironmentsClient) getAseV3NetworkingConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetAseV3NetworkingConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAseV3NetworkingConfigurationHandleResponse handles the GetAseV3NetworkingConfiguration response. -func (client *EnvironmentsClient) getAseV3NetworkingConfigurationHandleResponse(resp *http.Response) (EnvironmentsClientGetAseV3NetworkingConfigurationResponse, error) { - result := EnvironmentsClientGetAseV3NetworkingConfigurationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AseV3NetworkingConfiguration); err != nil { - return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, err - } - return result, nil -} - -// GetDiagnosticsItem - Get a diagnostics item for an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// diagnosticsName - Name of the diagnostics item. -// options - EnvironmentsClientGetDiagnosticsItemOptions contains the optional parameters for the EnvironmentsClient.GetDiagnosticsItem -// method. -func (client *EnvironmentsClient) GetDiagnosticsItem(ctx context.Context, resourceGroupName string, name string, diagnosticsName string, options *EnvironmentsClientGetDiagnosticsItemOptions) (EnvironmentsClientGetDiagnosticsItemResponse, error) { - req, err := client.getDiagnosticsItemCreateRequest(ctx, resourceGroupName, name, diagnosticsName, options) - if err != nil { - return EnvironmentsClientGetDiagnosticsItemResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetDiagnosticsItemResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetDiagnosticsItemResponse{}, runtime.NewResponseError(resp) - } - return client.getDiagnosticsItemHandleResponse(resp) -} - -// getDiagnosticsItemCreateRequest creates the GetDiagnosticsItem request. -func (client *EnvironmentsClient) getDiagnosticsItemCreateRequest(ctx context.Context, resourceGroupName string, name string, diagnosticsName string, options *EnvironmentsClientGetDiagnosticsItemOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if diagnosticsName == "" { - return nil, errors.New("parameter diagnosticsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{diagnosticsName}", url.PathEscape(diagnosticsName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDiagnosticsItemHandleResponse handles the GetDiagnosticsItem response. -func (client *EnvironmentsClient) getDiagnosticsItemHandleResponse(resp *http.Response) (EnvironmentsClientGetDiagnosticsItemResponse, error) { - result := EnvironmentsClientGetDiagnosticsItemResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostingEnvironmentDiagnostics); err != nil { - return EnvironmentsClientGetDiagnosticsItemResponse{}, err - } - return result, nil -} - -// NewGetInboundNetworkDependenciesEndpointsPager - Get the network endpoints of all inbound dependencies of an App Service -// Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.GetInboundNetworkDependenciesEndpoints -// method. -func (client *EnvironmentsClient) NewGetInboundNetworkDependenciesEndpointsPager(resourceGroupName string, name string, options *EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions) *runtime.Pager[EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse]{ - More: func(page EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse) (EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getInboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{}, runtime.NewResponseError(resp) - } - return client.getInboundNetworkDependenciesEndpointsHandleResponse(resp) - }, - }) -} - -// getInboundNetworkDependenciesEndpointsCreateRequest creates the GetInboundNetworkDependenciesEndpoints request. -func (client *EnvironmentsClient) getInboundNetworkDependenciesEndpointsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInboundNetworkDependenciesEndpointsHandleResponse handles the GetInboundNetworkDependenciesEndpoints response. -func (client *EnvironmentsClient) getInboundNetworkDependenciesEndpointsHandleResponse(resp *http.Response) (EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse, error) { - result := EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InboundEnvironmentEndpointCollection); err != nil { - return EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{}, err - } - return result, nil -} - -// GetMultiRolePool - Get properties of a multi-role pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientGetMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.GetMultiRolePool -// method. -func (client *EnvironmentsClient) GetMultiRolePool(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetMultiRolePoolOptions) (EnvironmentsClientGetMultiRolePoolResponse, error) { - req, err := client.getMultiRolePoolCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return EnvironmentsClientGetMultiRolePoolResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetMultiRolePoolResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetMultiRolePoolResponse{}, runtime.NewResponseError(resp) - } - return client.getMultiRolePoolHandleResponse(resp) -} - -// getMultiRolePoolCreateRequest creates the GetMultiRolePool request. -func (client *EnvironmentsClient) getMultiRolePoolCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetMultiRolePoolOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getMultiRolePoolHandleResponse handles the GetMultiRolePool response. -func (client *EnvironmentsClient) getMultiRolePoolHandleResponse(resp *http.Response) (EnvironmentsClientGetMultiRolePoolResponse, error) { - result := EnvironmentsClientGetMultiRolePoolResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolResource); err != nil { - return EnvironmentsClientGetMultiRolePoolResponse{}, err - } - return result, nil -} - -// NewGetOutboundNetworkDependenciesEndpointsPager - Get the network endpoints of all outbound dependencies of an App Service -// Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.GetOutboundNetworkDependenciesEndpoints -// method. -func (client *EnvironmentsClient) NewGetOutboundNetworkDependenciesEndpointsPager(resourceGroupName string, name string, options *EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions) *runtime.Pager[EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse]{ - More: func(page EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse) (EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{}, runtime.NewResponseError(resp) - } - return client.getOutboundNetworkDependenciesEndpointsHandleResponse(resp) - }, - }) -} - -// getOutboundNetworkDependenciesEndpointsCreateRequest creates the GetOutboundNetworkDependenciesEndpoints request. -func (client *EnvironmentsClient) getOutboundNetworkDependenciesEndpointsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getOutboundNetworkDependenciesEndpointsHandleResponse handles the GetOutboundNetworkDependenciesEndpoints response. -func (client *EnvironmentsClient) getOutboundNetworkDependenciesEndpointsHandleResponse(resp *http.Response) (EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse, error) { - result := EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OutboundEnvironmentEndpointCollection); err != nil { - return EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{}, err - } - return result, nil -} - -// GetPrivateEndpointConnection - Gets a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// privateEndpointConnectionName - Name of the private endpoint connection. -// options - EnvironmentsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.GetPrivateEndpointConnection -// method. -func (client *EnvironmentsClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientGetPrivateEndpointConnectionOptions) (EnvironmentsClientGetPrivateEndpointConnectionResponse, error) { - req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) - if err != nil { - return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateEndpointConnectionHandleResponse(resp) -} - -// getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. -func (client *EnvironmentsClient) getPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientGetPrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateEndpointConnectionHandleResponse handles the GetPrivateEndpointConnection response. -func (client *EnvironmentsClient) getPrivateEndpointConnectionHandleResponse(resp *http.Response) (EnvironmentsClientGetPrivateEndpointConnectionResponse, error) { - result := EnvironmentsClientGetPrivateEndpointConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RemotePrivateEndpointConnectionARMResource); err != nil { - return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, err - } - return result, nil -} - -// NewGetPrivateEndpointConnectionListPager - Gets the list of private endpoints associated with a hosting environment -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the EnvironmentsClient.GetPrivateEndpointConnectionList -// method. -func (client *EnvironmentsClient) NewGetPrivateEndpointConnectionListPager(resourceGroupName string, name string, options *EnvironmentsClientGetPrivateEndpointConnectionListOptions) *runtime.Pager[EnvironmentsClientGetPrivateEndpointConnectionListResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientGetPrivateEndpointConnectionListResponse]{ - More: func(page EnvironmentsClientGetPrivateEndpointConnectionListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientGetPrivateEndpointConnectionListResponse) (EnvironmentsClientGetPrivateEndpointConnectionListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientGetPrivateEndpointConnectionListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetPrivateEndpointConnectionListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetPrivateEndpointConnectionListResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateEndpointConnectionListHandleResponse(resp) - }, - }) -} - -// getPrivateEndpointConnectionListCreateRequest creates the GetPrivateEndpointConnectionList request. -func (client *EnvironmentsClient) getPrivateEndpointConnectionListCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetPrivateEndpointConnectionListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateEndpointConnectionListHandleResponse handles the GetPrivateEndpointConnectionList response. -func (client *EnvironmentsClient) getPrivateEndpointConnectionListHandleResponse(resp *http.Response) (EnvironmentsClientGetPrivateEndpointConnectionListResponse, error) { - result := EnvironmentsClientGetPrivateEndpointConnectionListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionCollection); err != nil { - return EnvironmentsClientGetPrivateEndpointConnectionListResponse{}, err - } - return result, nil -} - -// GetPrivateLinkResources - Gets the private link resources -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientGetPrivateLinkResourcesOptions contains the optional parameters for the EnvironmentsClient.GetPrivateLinkResources -// method. -func (client *EnvironmentsClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetPrivateLinkResourcesOptions) (EnvironmentsClientGetPrivateLinkResourcesResponse, error) { - req, err := client.getPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return EnvironmentsClientGetPrivateLinkResourcesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetPrivateLinkResourcesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetPrivateLinkResourcesResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateLinkResourcesHandleResponse(resp) -} - -// getPrivateLinkResourcesCreateRequest creates the GetPrivateLinkResources request. -func (client *EnvironmentsClient) getPrivateLinkResourcesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetPrivateLinkResourcesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateLinkResourcesHandleResponse handles the GetPrivateLinkResources response. -func (client *EnvironmentsClient) getPrivateLinkResourcesHandleResponse(resp *http.Response) (EnvironmentsClientGetPrivateLinkResourcesResponse, error) { - result := EnvironmentsClientGetPrivateLinkResourcesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourcesWrapper); err != nil { - return EnvironmentsClientGetPrivateLinkResourcesResponse{}, err - } - return result, nil -} - -// GetVipInfo - Get IP addresses assigned to an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientGetVipInfoOptions contains the optional parameters for the EnvironmentsClient.GetVipInfo method. -func (client *EnvironmentsClient) GetVipInfo(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetVipInfoOptions) (EnvironmentsClientGetVipInfoResponse, error) { - req, err := client.getVipInfoCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return EnvironmentsClientGetVipInfoResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetVipInfoResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetVipInfoResponse{}, runtime.NewResponseError(resp) - } - return client.getVipInfoHandleResponse(resp) -} - -// getVipInfoCreateRequest creates the GetVipInfo request. -func (client *EnvironmentsClient) getVipInfoCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetVipInfoOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVipInfoHandleResponse handles the GetVipInfo response. -func (client *EnvironmentsClient) getVipInfoHandleResponse(resp *http.Response) (EnvironmentsClientGetVipInfoResponse, error) { - result := EnvironmentsClientGetVipInfoResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AddressResponse); err != nil { - return EnvironmentsClientGetVipInfoResponse{}, err - } - return result, nil -} - -// GetWorkerPool - Get properties of a worker pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// workerPoolName - Name of the worker pool. -// options - EnvironmentsClientGetWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.GetWorkerPool -// method. -func (client *EnvironmentsClient) GetWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientGetWorkerPoolOptions) (EnvironmentsClientGetWorkerPoolResponse, error) { - req, err := client.getWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) - if err != nil { - return EnvironmentsClientGetWorkerPoolResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientGetWorkerPoolResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetWorkerPoolResponse{}, runtime.NewResponseError(resp) - } - return client.getWorkerPoolHandleResponse(resp) -} - -// getWorkerPoolCreateRequest creates the GetWorkerPool request. -func (client *EnvironmentsClient) getWorkerPoolCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientGetWorkerPoolOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if workerPoolName == "" { - return nil, errors.New("parameter workerPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getWorkerPoolHandleResponse handles the GetWorkerPool response. -func (client *EnvironmentsClient) getWorkerPoolHandleResponse(resp *http.Response) (EnvironmentsClientGetWorkerPoolResponse, error) { - result := EnvironmentsClientGetWorkerPoolResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolResource); err != nil { - return EnvironmentsClientGetWorkerPoolResponse{}, err - } - return result, nil -} - -// NewListPager - Get all App Service Environments for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.List method. -func (client *EnvironmentsClient) NewListPager(options *EnvironmentsClientListOptions) *runtime.Pager[EnvironmentsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListResponse]{ - More: func(page EnvironmentsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListResponse) (EnvironmentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *EnvironmentsClient) listCreateRequest(ctx context.Context, options *EnvironmentsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *EnvironmentsClient) listHandleResponse(resp *http.Response) (EnvironmentsClientListResponse, error) { - result := EnvironmentsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentCollection); err != nil { - return EnvironmentsClientListResponse{}, err - } - return result, nil -} - -// NewListAppServicePlansPager - Get all App Service plans in an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListAppServicePlansOptions contains the optional parameters for the EnvironmentsClient.ListAppServicePlans -// method. -func (client *EnvironmentsClient) NewListAppServicePlansPager(resourceGroupName string, name string, options *EnvironmentsClientListAppServicePlansOptions) *runtime.Pager[EnvironmentsClientListAppServicePlansResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListAppServicePlansResponse]{ - More: func(page EnvironmentsClientListAppServicePlansResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListAppServicePlansResponse) (EnvironmentsClientListAppServicePlansResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAppServicePlansCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListAppServicePlansResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListAppServicePlansResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListAppServicePlansResponse{}, runtime.NewResponseError(resp) - } - return client.listAppServicePlansHandleResponse(resp) - }, - }) -} - -// listAppServicePlansCreateRequest creates the ListAppServicePlans request. -func (client *EnvironmentsClient) listAppServicePlansCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListAppServicePlansOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAppServicePlansHandleResponse handles the ListAppServicePlans response. -func (client *EnvironmentsClient) listAppServicePlansHandleResponse(resp *http.Response) (EnvironmentsClientListAppServicePlansResponse, error) { - result := EnvironmentsClientListAppServicePlansResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PlanCollection); err != nil { - return EnvironmentsClientListAppServicePlansResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get all App Service Environments in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.ListByResourceGroup -// method. -func (client *EnvironmentsClient) NewListByResourceGroupPager(resourceGroupName string, options *EnvironmentsClientListByResourceGroupOptions) *runtime.Pager[EnvironmentsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListByResourceGroupResponse]{ - More: func(page EnvironmentsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListByResourceGroupResponse) (EnvironmentsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *EnvironmentsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *EnvironmentsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *EnvironmentsClient) listByResourceGroupHandleResponse(resp *http.Response) (EnvironmentsClientListByResourceGroupResponse, error) { - result := EnvironmentsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentCollection); err != nil { - return EnvironmentsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListCapacitiesPager - Get the used, available, and total worker capacity an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListCapacitiesOptions contains the optional parameters for the EnvironmentsClient.ListCapacities -// method. -func (client *EnvironmentsClient) NewListCapacitiesPager(resourceGroupName string, name string, options *EnvironmentsClientListCapacitiesOptions) *runtime.Pager[EnvironmentsClientListCapacitiesResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListCapacitiesResponse]{ - More: func(page EnvironmentsClientListCapacitiesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListCapacitiesResponse) (EnvironmentsClientListCapacitiesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCapacitiesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListCapacitiesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListCapacitiesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListCapacitiesResponse{}, runtime.NewResponseError(resp) - } - return client.listCapacitiesHandleResponse(resp) - }, - }) -} - -// listCapacitiesCreateRequest creates the ListCapacities request. -func (client *EnvironmentsClient) listCapacitiesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListCapacitiesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listCapacitiesHandleResponse handles the ListCapacities response. -func (client *EnvironmentsClient) listCapacitiesHandleResponse(resp *http.Response) (EnvironmentsClientListCapacitiesResponse, error) { - result := EnvironmentsClientListCapacitiesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StampCapacityCollection); err != nil { - return EnvironmentsClientListCapacitiesResponse{}, err - } - return result, nil -} - -// ListDiagnostics - Get diagnostic information for an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListDiagnosticsOptions contains the optional parameters for the EnvironmentsClient.ListDiagnostics -// method. -func (client *EnvironmentsClient) ListDiagnostics(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListDiagnosticsOptions) (EnvironmentsClientListDiagnosticsResponse, error) { - req, err := client.listDiagnosticsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return EnvironmentsClientListDiagnosticsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListDiagnosticsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListDiagnosticsResponse{}, runtime.NewResponseError(resp) - } - return client.listDiagnosticsHandleResponse(resp) -} - -// listDiagnosticsCreateRequest creates the ListDiagnostics request. -func (client *EnvironmentsClient) listDiagnosticsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListDiagnosticsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listDiagnosticsHandleResponse handles the ListDiagnostics response. -func (client *EnvironmentsClient) listDiagnosticsHandleResponse(resp *http.Response) (EnvironmentsClientListDiagnosticsResponse, error) { - result := EnvironmentsClientListDiagnosticsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostingEnvironmentDiagnosticsArray); err != nil { - return EnvironmentsClientListDiagnosticsResponse{}, err - } - return result, nil -} - -// NewListMultiRoleMetricDefinitionsPager - Get metric definitions for a multi-role pool of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListMultiRoleMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.ListMultiRoleMetricDefinitions -// method. -func (client *EnvironmentsClient) NewListMultiRoleMetricDefinitionsPager(resourceGroupName string, name string, options *EnvironmentsClientListMultiRoleMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListMultiRoleMetricDefinitionsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListMultiRoleMetricDefinitionsResponse]{ - More: func(page EnvironmentsClientListMultiRoleMetricDefinitionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRoleMetricDefinitionsResponse) (EnvironmentsClientListMultiRoleMetricDefinitionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listMultiRoleMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListMultiRoleMetricDefinitionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListMultiRoleMetricDefinitionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListMultiRoleMetricDefinitionsResponse{}, runtime.NewResponseError(resp) - } - return client.listMultiRoleMetricDefinitionsHandleResponse(resp) - }, - }) -} - -// listMultiRoleMetricDefinitionsCreateRequest creates the ListMultiRoleMetricDefinitions request. -func (client *EnvironmentsClient) listMultiRoleMetricDefinitionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListMultiRoleMetricDefinitionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listMultiRoleMetricDefinitionsHandleResponse handles the ListMultiRoleMetricDefinitions response. -func (client *EnvironmentsClient) listMultiRoleMetricDefinitionsHandleResponse(resp *http.Response) (EnvironmentsClientListMultiRoleMetricDefinitionsResponse, error) { - result := EnvironmentsClientListMultiRoleMetricDefinitionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceMetricDefinitionCollection); err != nil { - return EnvironmentsClientListMultiRoleMetricDefinitionsResponse{}, err - } - return result, nil -} - -// NewListMultiRolePoolInstanceMetricDefinitionsPager - Get metric definitions for a specific instance of a multi-role pool -// of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// instance - Name of the instance in the multi-role pool. -// options - EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions contains the optional parameters for the -// EnvironmentsClient.ListMultiRolePoolInstanceMetricDefinitions method. -func (client *EnvironmentsClient) NewListMultiRolePoolInstanceMetricDefinitionsPager(resourceGroupName string, name string, instance string, options *EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse]{ - More: func(page EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse) (EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listMultiRolePoolInstanceMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, instance, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{}, runtime.NewResponseError(resp) - } - return client.listMultiRolePoolInstanceMetricDefinitionsHandleResponse(resp) - }, - }) -} - -// listMultiRolePoolInstanceMetricDefinitionsCreateRequest creates the ListMultiRolePoolInstanceMetricDefinitions request. -func (client *EnvironmentsClient) listMultiRolePoolInstanceMetricDefinitionsCreateRequest(ctx context.Context, resourceGroupName string, name string, instance string, options *EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if instance == "" { - return nil, errors.New("parameter instance cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instance}", url.PathEscape(instance)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listMultiRolePoolInstanceMetricDefinitionsHandleResponse handles the ListMultiRolePoolInstanceMetricDefinitions response. -func (client *EnvironmentsClient) listMultiRolePoolInstanceMetricDefinitionsHandleResponse(resp *http.Response) (EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse, error) { - result := EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceMetricDefinitionCollection); err != nil { - return EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{}, err - } - return result, nil -} - -// NewListMultiRolePoolSKUsPager - Get available SKUs for scaling a multi-role pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListMultiRolePoolSKUsOptions contains the optional parameters for the EnvironmentsClient.ListMultiRolePoolSKUs -// method. -func (client *EnvironmentsClient) NewListMultiRolePoolSKUsPager(resourceGroupName string, name string, options *EnvironmentsClientListMultiRolePoolSKUsOptions) *runtime.Pager[EnvironmentsClientListMultiRolePoolSKUsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListMultiRolePoolSKUsResponse]{ - More: func(page EnvironmentsClientListMultiRolePoolSKUsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRolePoolSKUsResponse) (EnvironmentsClientListMultiRolePoolSKUsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listMultiRolePoolSKUsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListMultiRolePoolSKUsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListMultiRolePoolSKUsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListMultiRolePoolSKUsResponse{}, runtime.NewResponseError(resp) - } - return client.listMultiRolePoolSKUsHandleResponse(resp) - }, - }) -} - -// listMultiRolePoolSKUsCreateRequest creates the ListMultiRolePoolSKUs request. -func (client *EnvironmentsClient) listMultiRolePoolSKUsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListMultiRolePoolSKUsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listMultiRolePoolSKUsHandleResponse handles the ListMultiRolePoolSKUs response. -func (client *EnvironmentsClient) listMultiRolePoolSKUsHandleResponse(resp *http.Response) (EnvironmentsClientListMultiRolePoolSKUsResponse, error) { - result := EnvironmentsClientListMultiRolePoolSKUsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SKUInfoCollection); err != nil { - return EnvironmentsClientListMultiRolePoolSKUsResponse{}, err - } - return result, nil -} - -// NewListMultiRolePoolsPager - Get all multi-role pools. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListMultiRolePoolsOptions contains the optional parameters for the EnvironmentsClient.ListMultiRolePools -// method. -func (client *EnvironmentsClient) NewListMultiRolePoolsPager(resourceGroupName string, name string, options *EnvironmentsClientListMultiRolePoolsOptions) *runtime.Pager[EnvironmentsClientListMultiRolePoolsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListMultiRolePoolsResponse]{ - More: func(page EnvironmentsClientListMultiRolePoolsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRolePoolsResponse) (EnvironmentsClientListMultiRolePoolsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listMultiRolePoolsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListMultiRolePoolsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListMultiRolePoolsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListMultiRolePoolsResponse{}, runtime.NewResponseError(resp) - } - return client.listMultiRolePoolsHandleResponse(resp) - }, - }) -} - -// listMultiRolePoolsCreateRequest creates the ListMultiRolePools request. -func (client *EnvironmentsClient) listMultiRolePoolsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListMultiRolePoolsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listMultiRolePoolsHandleResponse handles the ListMultiRolePools response. -func (client *EnvironmentsClient) listMultiRolePoolsHandleResponse(resp *http.Response) (EnvironmentsClientListMultiRolePoolsResponse, error) { - result := EnvironmentsClientListMultiRolePoolsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolCollection); err != nil { - return EnvironmentsClientListMultiRolePoolsResponse{}, err - } - return result, nil -} - -// NewListMultiRoleUsagesPager - Get usage metrics for a multi-role pool of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListMultiRoleUsagesOptions contains the optional parameters for the EnvironmentsClient.ListMultiRoleUsages -// method. -func (client *EnvironmentsClient) NewListMultiRoleUsagesPager(resourceGroupName string, name string, options *EnvironmentsClientListMultiRoleUsagesOptions) *runtime.Pager[EnvironmentsClientListMultiRoleUsagesResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListMultiRoleUsagesResponse]{ - More: func(page EnvironmentsClientListMultiRoleUsagesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRoleUsagesResponse) (EnvironmentsClientListMultiRoleUsagesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listMultiRoleUsagesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListMultiRoleUsagesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListMultiRoleUsagesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListMultiRoleUsagesResponse{}, runtime.NewResponseError(resp) - } - return client.listMultiRoleUsagesHandleResponse(resp) - }, - }) -} - -// listMultiRoleUsagesCreateRequest creates the ListMultiRoleUsages request. -func (client *EnvironmentsClient) listMultiRoleUsagesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListMultiRoleUsagesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listMultiRoleUsagesHandleResponse handles the ListMultiRoleUsages response. -func (client *EnvironmentsClient) listMultiRoleUsagesHandleResponse(resp *http.Response) (EnvironmentsClientListMultiRoleUsagesResponse, error) { - result := EnvironmentsClientListMultiRoleUsagesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UsageCollection); err != nil { - return EnvironmentsClientListMultiRoleUsagesResponse{}, err - } - return result, nil -} - -// ListOperations - List all currently running operations on the App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListOperationsOptions contains the optional parameters for the EnvironmentsClient.ListOperations -// method. -func (client *EnvironmentsClient) ListOperations(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListOperationsOptions) (EnvironmentsClientListOperationsResponse, error) { - req, err := client.listOperationsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return EnvironmentsClientListOperationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListOperationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListOperationsResponse{}, runtime.NewResponseError(resp) - } - return client.listOperationsHandleResponse(resp) -} - -// listOperationsCreateRequest creates the ListOperations request. -func (client *EnvironmentsClient) listOperationsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListOperationsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listOperationsHandleResponse handles the ListOperations response. -func (client *EnvironmentsClient) listOperationsHandleResponse(resp *http.Response) (EnvironmentsClientListOperationsResponse, error) { - result := EnvironmentsClientListOperationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationArray); err != nil { - return EnvironmentsClientListOperationsResponse{}, err - } - return result, nil -} - -// NewListUsagesPager - Get global usage metrics of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListUsagesOptions contains the optional parameters for the EnvironmentsClient.ListUsages method. -func (client *EnvironmentsClient) NewListUsagesPager(resourceGroupName string, name string, options *EnvironmentsClientListUsagesOptions) *runtime.Pager[EnvironmentsClientListUsagesResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListUsagesResponse]{ - More: func(page EnvironmentsClientListUsagesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListUsagesResponse) (EnvironmentsClientListUsagesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListUsagesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListUsagesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListUsagesResponse{}, runtime.NewResponseError(resp) - } - return client.listUsagesHandleResponse(resp) - }, - }) -} - -// listUsagesCreateRequest creates the ListUsages request. -func (client *EnvironmentsClient) listUsagesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListUsagesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listUsagesHandleResponse handles the ListUsages response. -func (client *EnvironmentsClient) listUsagesHandleResponse(resp *http.Response) (EnvironmentsClientListUsagesResponse, error) { - result := EnvironmentsClientListUsagesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { - return EnvironmentsClientListUsagesResponse{}, err - } - return result, nil -} - -// NewListWebAppsPager - Get all apps in an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListWebAppsOptions contains the optional parameters for the EnvironmentsClient.ListWebApps -// method. -func (client *EnvironmentsClient) NewListWebAppsPager(resourceGroupName string, name string, options *EnvironmentsClientListWebAppsOptions) *runtime.Pager[EnvironmentsClientListWebAppsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWebAppsResponse]{ - More: func(page EnvironmentsClientListWebAppsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListWebAppsResponse) (EnvironmentsClientListWebAppsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebAppsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListWebAppsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListWebAppsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWebAppsResponse{}, runtime.NewResponseError(resp) - } - return client.listWebAppsHandleResponse(resp) - }, - }) -} - -// listWebAppsCreateRequest creates the ListWebApps request. -func (client *EnvironmentsClient) listWebAppsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListWebAppsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.PropertiesToInclude != nil { - reqQP.Set("propertiesToInclude", *options.PropertiesToInclude) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWebAppsHandleResponse handles the ListWebApps response. -func (client *EnvironmentsClient) listWebAppsHandleResponse(resp *http.Response) (EnvironmentsClientListWebAppsResponse, error) { - result := EnvironmentsClientListWebAppsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { - return EnvironmentsClientListWebAppsResponse{}, err - } - return result, nil -} - -// NewListWebWorkerMetricDefinitionsPager - Get metric definitions for a worker pool of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// workerPoolName - Name of the worker pool. -// options - EnvironmentsClientListWebWorkerMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.ListWebWorkerMetricDefinitions -// method. -func (client *EnvironmentsClient) NewListWebWorkerMetricDefinitionsPager(resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWebWorkerMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListWebWorkerMetricDefinitionsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWebWorkerMetricDefinitionsResponse]{ - More: func(page EnvironmentsClientListWebWorkerMetricDefinitionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListWebWorkerMetricDefinitionsResponse) (EnvironmentsClientListWebWorkerMetricDefinitionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebWorkerMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListWebWorkerMetricDefinitionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListWebWorkerMetricDefinitionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWebWorkerMetricDefinitionsResponse{}, runtime.NewResponseError(resp) - } - return client.listWebWorkerMetricDefinitionsHandleResponse(resp) - }, - }) -} - -// listWebWorkerMetricDefinitionsCreateRequest creates the ListWebWorkerMetricDefinitions request. -func (client *EnvironmentsClient) listWebWorkerMetricDefinitionsCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWebWorkerMetricDefinitionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if workerPoolName == "" { - return nil, errors.New("parameter workerPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWebWorkerMetricDefinitionsHandleResponse handles the ListWebWorkerMetricDefinitions response. -func (client *EnvironmentsClient) listWebWorkerMetricDefinitionsHandleResponse(resp *http.Response) (EnvironmentsClientListWebWorkerMetricDefinitionsResponse, error) { - result := EnvironmentsClientListWebWorkerMetricDefinitionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceMetricDefinitionCollection); err != nil { - return EnvironmentsClientListWebWorkerMetricDefinitionsResponse{}, err - } - return result, nil -} - -// NewListWebWorkerUsagesPager - Get usage metrics for a worker pool of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// workerPoolName - Name of the worker pool. -// options - EnvironmentsClientListWebWorkerUsagesOptions contains the optional parameters for the EnvironmentsClient.ListWebWorkerUsages -// method. -func (client *EnvironmentsClient) NewListWebWorkerUsagesPager(resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWebWorkerUsagesOptions) *runtime.Pager[EnvironmentsClientListWebWorkerUsagesResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWebWorkerUsagesResponse]{ - More: func(page EnvironmentsClientListWebWorkerUsagesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListWebWorkerUsagesResponse) (EnvironmentsClientListWebWorkerUsagesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebWorkerUsagesCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListWebWorkerUsagesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListWebWorkerUsagesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWebWorkerUsagesResponse{}, runtime.NewResponseError(resp) - } - return client.listWebWorkerUsagesHandleResponse(resp) - }, - }) -} - -// listWebWorkerUsagesCreateRequest creates the ListWebWorkerUsages request. -func (client *EnvironmentsClient) listWebWorkerUsagesCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWebWorkerUsagesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if workerPoolName == "" { - return nil, errors.New("parameter workerPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWebWorkerUsagesHandleResponse handles the ListWebWorkerUsages response. -func (client *EnvironmentsClient) listWebWorkerUsagesHandleResponse(resp *http.Response) (EnvironmentsClientListWebWorkerUsagesResponse, error) { - result := EnvironmentsClientListWebWorkerUsagesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UsageCollection); err != nil { - return EnvironmentsClientListWebWorkerUsagesResponse{}, err - } - return result, nil -} - -// NewListWorkerPoolInstanceMetricDefinitionsPager - Get metric definitions for a specific instance of a worker pool of an -// App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// workerPoolName - Name of the worker pool. -// instance - Name of the instance in the worker pool. -// options - EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.ListWorkerPoolInstanceMetricDefinitions -// method. -func (client *EnvironmentsClient) NewListWorkerPoolInstanceMetricDefinitionsPager(resourceGroupName string, name string, workerPoolName string, instance string, options *EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions) *runtime.Pager[EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse]{ - More: func(page EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse) (EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWorkerPoolInstanceMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, workerPoolName, instance, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{}, runtime.NewResponseError(resp) - } - return client.listWorkerPoolInstanceMetricDefinitionsHandleResponse(resp) - }, - }) -} - -// listWorkerPoolInstanceMetricDefinitionsCreateRequest creates the ListWorkerPoolInstanceMetricDefinitions request. -func (client *EnvironmentsClient) listWorkerPoolInstanceMetricDefinitionsCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, instance string, options *EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if workerPoolName == "" { - return nil, errors.New("parameter workerPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) - if instance == "" { - return nil, errors.New("parameter instance cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instance}", url.PathEscape(instance)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWorkerPoolInstanceMetricDefinitionsHandleResponse handles the ListWorkerPoolInstanceMetricDefinitions response. -func (client *EnvironmentsClient) listWorkerPoolInstanceMetricDefinitionsHandleResponse(resp *http.Response) (EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse, error) { - result := EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceMetricDefinitionCollection); err != nil { - return EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{}, err - } - return result, nil -} - -// NewListWorkerPoolSKUsPager - Get available SKUs for scaling a worker pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// workerPoolName - Name of the worker pool. -// options - EnvironmentsClientListWorkerPoolSKUsOptions contains the optional parameters for the EnvironmentsClient.ListWorkerPoolSKUs -// method. -func (client *EnvironmentsClient) NewListWorkerPoolSKUsPager(resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWorkerPoolSKUsOptions) *runtime.Pager[EnvironmentsClientListWorkerPoolSKUsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWorkerPoolSKUsResponse]{ - More: func(page EnvironmentsClientListWorkerPoolSKUsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListWorkerPoolSKUsResponse) (EnvironmentsClientListWorkerPoolSKUsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWorkerPoolSKUsCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListWorkerPoolSKUsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListWorkerPoolSKUsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWorkerPoolSKUsResponse{}, runtime.NewResponseError(resp) - } - return client.listWorkerPoolSKUsHandleResponse(resp) - }, - }) -} - -// listWorkerPoolSKUsCreateRequest creates the ListWorkerPoolSKUs request. -func (client *EnvironmentsClient) listWorkerPoolSKUsCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientListWorkerPoolSKUsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if workerPoolName == "" { - return nil, errors.New("parameter workerPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWorkerPoolSKUsHandleResponse handles the ListWorkerPoolSKUs response. -func (client *EnvironmentsClient) listWorkerPoolSKUsHandleResponse(resp *http.Response) (EnvironmentsClientListWorkerPoolSKUsResponse, error) { - result := EnvironmentsClientListWorkerPoolSKUsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SKUInfoCollection); err != nil { - return EnvironmentsClientListWorkerPoolSKUsResponse{}, err - } - return result, nil -} - -// NewListWorkerPoolsPager - Get all worker pools of an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientListWorkerPoolsOptions contains the optional parameters for the EnvironmentsClient.ListWorkerPools -// method. -func (client *EnvironmentsClient) NewListWorkerPoolsPager(resourceGroupName string, name string, options *EnvironmentsClientListWorkerPoolsOptions) *runtime.Pager[EnvironmentsClientListWorkerPoolsResponse] { - return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListWorkerPoolsResponse]{ - More: func(page EnvironmentsClientListWorkerPoolsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientListWorkerPoolsResponse) (EnvironmentsClientListWorkerPoolsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWorkerPoolsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListWorkerPoolsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientListWorkerPoolsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWorkerPoolsResponse{}, runtime.NewResponseError(resp) - } - return client.listWorkerPoolsHandleResponse(resp) - }, - }) -} - -// listWorkerPoolsCreateRequest creates the ListWorkerPools request. -func (client *EnvironmentsClient) listWorkerPoolsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListWorkerPoolsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWorkerPoolsHandleResponse handles the ListWorkerPools response. -func (client *EnvironmentsClient) listWorkerPoolsHandleResponse(resp *http.Response) (EnvironmentsClientListWorkerPoolsResponse, error) { - result := EnvironmentsClientListWorkerPoolsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolCollection); err != nil { - return EnvironmentsClientListWorkerPoolsResponse{}, err - } - return result, nil -} - -// Reboot - Reboot all machines in an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientRebootOptions contains the optional parameters for the EnvironmentsClient.Reboot method. -func (client *EnvironmentsClient) Reboot(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientRebootOptions) (EnvironmentsClientRebootResponse, error) { - req, err := client.rebootCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return EnvironmentsClientRebootResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientRebootResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return EnvironmentsClientRebootResponse{}, runtime.NewResponseError(resp) - } - return EnvironmentsClientRebootResponse{}, nil -} - -// rebootCreateRequest creates the Reboot request. -func (client *EnvironmentsClient) rebootCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientRebootOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginResume - Resume an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientBeginResumeOptions contains the optional parameters for the EnvironmentsClient.BeginResume -// method. -func (client *EnvironmentsClient) BeginResume(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginResumeOptions) (*runtime.Poller[*runtime.Pager[EnvironmentsClientResumeResponse]], error) { - pager := runtime.NewPager(runtime.PagingHandler[EnvironmentsClientResumeResponse]{ - More: func(page EnvironmentsClientResumeResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientResumeResponse) (EnvironmentsClientResumeResponse, error) { - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - if err != nil { - return EnvironmentsClientResumeResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientResumeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientResumeResponse{}, runtime.NewResponseError(resp) - } - return client.resumeHandleResponse(resp) - }, - }) - if options == nil || options.ResumeToken == "" { - resp, err := client.resume(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientResumeResponse]]{ - Response: &pager, - }) - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.pl, &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[EnvironmentsClientResumeResponse]]{ - Response: &pager, - }) - } -} - -// Resume - Resume an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *EnvironmentsClient) resume(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginResumeOptions) (*http.Response, error) { - req, err := client.resumeCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resumeCreateRequest creates the Resume request. -func (client *EnvironmentsClient) resumeCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginResumeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// resumeHandleResponse handles the Resume response. -func (client *EnvironmentsClient) resumeHandleResponse(resp *http.Response) (EnvironmentsClientResumeResponse, error) { - result := EnvironmentsClientResumeResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { - return EnvironmentsClientResumeResponse{}, err - } - return result, nil -} - -// BeginSuspend - Suspend an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientBeginSuspendOptions contains the optional parameters for the EnvironmentsClient.BeginSuspend -// method. -func (client *EnvironmentsClient) BeginSuspend(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginSuspendOptions) (*runtime.Poller[*runtime.Pager[EnvironmentsClientSuspendResponse]], error) { - pager := runtime.NewPager(runtime.PagingHandler[EnvironmentsClientSuspendResponse]{ - More: func(page EnvironmentsClientSuspendResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EnvironmentsClientSuspendResponse) (EnvironmentsClientSuspendResponse, error) { - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - if err != nil { - return EnvironmentsClientSuspendResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientSuspendResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientSuspendResponse{}, runtime.NewResponseError(resp) - } - return client.suspendHandleResponse(resp) - }, - }) - if options == nil || options.ResumeToken == "" { - resp, err := client.suspend(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientSuspendResponse]]{ - Response: &pager, - }) - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.pl, &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[EnvironmentsClientSuspendResponse]]{ - Response: &pager, - }) - } -} - -// Suspend - Suspend an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *EnvironmentsClient) suspend(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginSuspendOptions) (*http.Response, error) { - req, err := client.suspendCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// suspendCreateRequest creates the Suspend request. -func (client *EnvironmentsClient) suspendCreateRequest(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginSuspendOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// suspendHandleResponse handles the Suspend response. -func (client *EnvironmentsClient) suspendHandleResponse(resp *http.Response) (EnvironmentsClientSuspendResponse, error) { - result := EnvironmentsClientSuspendResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { - return EnvironmentsClientSuspendResponse{}, err - } - return result, nil -} - -// Update - Create or update an App Service Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// hostingEnvironmentEnvelope - Configuration details of the App Service Environment. -// options - EnvironmentsClientUpdateOptions contains the optional parameters for the EnvironmentsClient.Update method. -func (client *EnvironmentsClient) Update(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentPatchResource, options *EnvironmentsClientUpdateOptions) (EnvironmentsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, name, hostingEnvironmentEnvelope, options) - if err != nil { - return EnvironmentsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return EnvironmentsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *EnvironmentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentPatchResource, options *EnvironmentsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope) -} - -// updateHandleResponse handles the Update response. -func (client *EnvironmentsClient) updateHandleResponse(resp *http.Response) (EnvironmentsClientUpdateResponse, error) { - result := EnvironmentsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentResource); err != nil { - return EnvironmentsClientUpdateResponse{}, err - } - return result, nil -} - -// UpdateAseNetworkingConfiguration - Update networking configuration of an App Service Environment -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// options - EnvironmentsClientUpdateAseNetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseNetworkingConfiguration -// method. -func (client *EnvironmentsClient) UpdateAseNetworkingConfiguration(ctx context.Context, resourceGroupName string, name string, aseNetworkingConfiguration AseV3NetworkingConfiguration, options *EnvironmentsClientUpdateAseNetworkingConfigurationOptions) (EnvironmentsClientUpdateAseNetworkingConfigurationResponse, error) { - req, err := client.updateAseNetworkingConfigurationCreateRequest(ctx, resourceGroupName, name, aseNetworkingConfiguration, options) - if err != nil { - return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, runtime.NewResponseError(resp) - } - return client.updateAseNetworkingConfigurationHandleResponse(resp) -} - -// updateAseNetworkingConfigurationCreateRequest creates the UpdateAseNetworkingConfiguration request. -func (client *EnvironmentsClient) updateAseNetworkingConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, aseNetworkingConfiguration AseV3NetworkingConfiguration, options *EnvironmentsClientUpdateAseNetworkingConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, aseNetworkingConfiguration) -} - -// updateAseNetworkingConfigurationHandleResponse handles the UpdateAseNetworkingConfiguration response. -func (client *EnvironmentsClient) updateAseNetworkingConfigurationHandleResponse(resp *http.Response) (EnvironmentsClientUpdateAseNetworkingConfigurationResponse, error) { - result := EnvironmentsClientUpdateAseNetworkingConfigurationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AseV3NetworkingConfiguration); err != nil { - return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, err - } - return result, nil -} - -// UpdateMultiRolePool - Create or update a multi-role pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// multiRolePoolEnvelope - Properties of the multi-role pool. -// options - EnvironmentsClientUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.UpdateMultiRolePool -// method. -func (client *EnvironmentsClient) UpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientUpdateMultiRolePoolOptions) (EnvironmentsClientUpdateMultiRolePoolResponse, error) { - req, err := client.updateMultiRolePoolCreateRequest(ctx, resourceGroupName, name, multiRolePoolEnvelope, options) - if err != nil { - return EnvironmentsClientUpdateMultiRolePoolResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientUpdateMultiRolePoolResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return EnvironmentsClientUpdateMultiRolePoolResponse{}, runtime.NewResponseError(resp) - } - return client.updateMultiRolePoolHandleResponse(resp) -} - -// updateMultiRolePoolCreateRequest creates the UpdateMultiRolePool request. -func (client *EnvironmentsClient) updateMultiRolePoolCreateRequest(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientUpdateMultiRolePoolOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, multiRolePoolEnvelope) -} - -// updateMultiRolePoolHandleResponse handles the UpdateMultiRolePool response. -func (client *EnvironmentsClient) updateMultiRolePoolHandleResponse(resp *http.Response) (EnvironmentsClientUpdateMultiRolePoolResponse, error) { - result := EnvironmentsClientUpdateMultiRolePoolResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolResource); err != nil { - return EnvironmentsClientUpdateMultiRolePoolResponse{}, err - } - return result, nil -} - -// UpdateWorkerPool - Create or update a worker pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service Environment. -// workerPoolName - Name of the worker pool. -// workerPoolEnvelope - Properties of the worker pool. -// options - EnvironmentsClientUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.UpdateWorkerPool -// method. -func (client *EnvironmentsClient) UpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientUpdateWorkerPoolOptions) (EnvironmentsClientUpdateWorkerPoolResponse, error) { - req, err := client.updateWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) - if err != nil { - return EnvironmentsClientUpdateWorkerPoolResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EnvironmentsClientUpdateWorkerPoolResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return EnvironmentsClientUpdateWorkerPoolResponse{}, runtime.NewResponseError(resp) - } - return client.updateWorkerPoolHandleResponse(resp) -} - -// updateWorkerPoolCreateRequest creates the UpdateWorkerPool request. -func (client *EnvironmentsClient) updateWorkerPoolCreateRequest(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientUpdateWorkerPoolOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if workerPoolName == "" { - return nil, errors.New("parameter workerPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workerPoolName}", url.PathEscape(workerPoolName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workerPoolEnvelope) -} - -// updateWorkerPoolHandleResponse handles the UpdateWorkerPool response. -func (client *EnvironmentsClient) updateWorkerPoolHandleResponse(resp *http.Response) (EnvironmentsClientUpdateWorkerPoolResponse, error) { - result := EnvironmentsClientUpdateWorkerPoolResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkerPoolResource); err != nil { - return EnvironmentsClientUpdateWorkerPoolResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_global_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_global_client.go deleted file mode 100644 index 48a55328..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_global_client.go +++ /dev/null @@ -1,206 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// GlobalClient contains the methods for the Global group. -// Don't use this type directly, use NewGlobalClient() instead. -type GlobalClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewGlobalClient creates a new instance of GlobalClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewGlobalClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GlobalClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &GlobalClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// GetDeletedWebApp - Get deleted app for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// deletedSiteID - The numeric ID of the deleted app, e.g. 12345 -// options - GlobalClientGetDeletedWebAppOptions contains the optional parameters for the GlobalClient.GetDeletedWebApp method. -func (client *GlobalClient) GetDeletedWebApp(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppOptions) (GlobalClientGetDeletedWebAppResponse, error) { - req, err := client.getDeletedWebAppCreateRequest(ctx, deletedSiteID, options) - if err != nil { - return GlobalClientGetDeletedWebAppResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GlobalClientGetDeletedWebAppResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalClientGetDeletedWebAppResponse{}, runtime.NewResponseError(resp) - } - return client.getDeletedWebAppHandleResponse(resp) -} - -// getDeletedWebAppCreateRequest creates the GetDeletedWebApp request. -func (client *GlobalClient) getDeletedWebAppCreateRequest(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}" - if deletedSiteID == "" { - return nil, errors.New("parameter deletedSiteID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deletedSiteId}", url.PathEscape(deletedSiteID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDeletedWebAppHandleResponse handles the GetDeletedWebApp response. -func (client *GlobalClient) getDeletedWebAppHandleResponse(resp *http.Response) (GlobalClientGetDeletedWebAppResponse, error) { - result := GlobalClientGetDeletedWebAppResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeletedSite); err != nil { - return GlobalClientGetDeletedWebAppResponse{}, err - } - return result, nil -} - -// GetDeletedWebAppSnapshots - Get all deleted apps for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// deletedSiteID - The numeric ID of the deleted app, e.g. 12345 -// options - GlobalClientGetDeletedWebAppSnapshotsOptions contains the optional parameters for the GlobalClient.GetDeletedWebAppSnapshots -// method. -func (client *GlobalClient) GetDeletedWebAppSnapshots(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppSnapshotsOptions) (GlobalClientGetDeletedWebAppSnapshotsResponse, error) { - req, err := client.getDeletedWebAppSnapshotsCreateRequest(ctx, deletedSiteID, options) - if err != nil { - return GlobalClientGetDeletedWebAppSnapshotsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GlobalClientGetDeletedWebAppSnapshotsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalClientGetDeletedWebAppSnapshotsResponse{}, runtime.NewResponseError(resp) - } - return client.getDeletedWebAppSnapshotsHandleResponse(resp) -} - -// getDeletedWebAppSnapshotsCreateRequest creates the GetDeletedWebAppSnapshots request. -func (client *GlobalClient) getDeletedWebAppSnapshotsCreateRequest(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppSnapshotsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots" - if deletedSiteID == "" { - return nil, errors.New("parameter deletedSiteID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{deletedSiteId}", url.PathEscape(deletedSiteID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDeletedWebAppSnapshotsHandleResponse handles the GetDeletedWebAppSnapshots response. -func (client *GlobalClient) getDeletedWebAppSnapshotsHandleResponse(resp *http.Response) (GlobalClientGetDeletedWebAppSnapshotsResponse, error) { - result := GlobalClientGetDeletedWebAppSnapshotsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotArray); err != nil { - return GlobalClientGetDeletedWebAppSnapshotsResponse{}, err - } - return result, nil -} - -// GetSubscriptionOperationWithAsyncResponse - Gets an operation in a subscription and given region -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// location - Location name -// operationID - Operation Id -// options - GlobalClientGetSubscriptionOperationWithAsyncResponseOptions contains the optional parameters for the GlobalClient.GetSubscriptionOperationWithAsyncResponse -// method. -func (client *GlobalClient) GetSubscriptionOperationWithAsyncResponse(ctx context.Context, location string, operationID string, options *GlobalClientGetSubscriptionOperationWithAsyncResponseOptions) (GlobalClientGetSubscriptionOperationWithAsyncResponseResponse, error) { - req, err := client.getSubscriptionOperationWithAsyncResponseCreateRequest(ctx, location, operationID, options) - if err != nil { - return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, runtime.NewResponseError(resp) - } - return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, nil -} - -// getSubscriptionOperationWithAsyncResponseCreateRequest creates the GetSubscriptionOperationWithAsyncResponse request. -func (client *GlobalClient) getSubscriptionOperationWithAsyncResponseCreateRequest(ctx context.Context, location string, operationID string, options *GlobalClientGetSubscriptionOperationWithAsyncResponseOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_kubeenvironments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_kubeenvironments_client.go deleted file mode 100644 index 0b019b28..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_kubeenvironments_client.go +++ /dev/null @@ -1,420 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// KubeEnvironmentsClient contains the methods for the KubeEnvironments group. -// Don't use this type directly, use NewKubeEnvironmentsClient() instead. -type KubeEnvironmentsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewKubeEnvironmentsClient creates a new instance of KubeEnvironmentsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewKubeEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KubeEnvironmentsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &KubeEnvironmentsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a Kubernetes Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the Kubernetes Environment. -// kubeEnvironmentEnvelope - Configuration details of the Kubernetes Environment. -// options - KubeEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.BeginCreateOrUpdate -// method. -func (client *KubeEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironment, options *KubeEnvironmentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[KubeEnvironmentsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, name, kubeEnvironmentEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[KubeEnvironmentsClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[KubeEnvironmentsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a Kubernetes Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *KubeEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironment, options *KubeEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, kubeEnvironmentEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *KubeEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironment, options *KubeEnvironmentsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope) -} - -// BeginDelete - Delete a Kubernetes Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the Kubernetes Environment. -// options - KubeEnvironmentsClientBeginDeleteOptions contains the optional parameters for the KubeEnvironmentsClient.BeginDelete -// method. -func (client *KubeEnvironmentsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientBeginDeleteOptions) (*runtime.Poller[KubeEnvironmentsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[KubeEnvironmentsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[KubeEnvironmentsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete a Kubernetes Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *KubeEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *KubeEnvironmentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the properties of a Kubernetes Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the Kubernetes Environment. -// options - KubeEnvironmentsClientGetOptions contains the optional parameters for the KubeEnvironmentsClient.Get method. -func (client *KubeEnvironmentsClient) Get(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientGetOptions) (KubeEnvironmentsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return KubeEnvironmentsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return KubeEnvironmentsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KubeEnvironmentsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *KubeEnvironmentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *KubeEnvironmentsClient) getHandleResponse(resp *http.Response) (KubeEnvironmentsClientGetResponse, error) { - result := KubeEnvironmentsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.KubeEnvironment); err != nil { - return KubeEnvironmentsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get all the Kubernetes Environments in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - KubeEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the KubeEnvironmentsClient.ListByResourceGroup -// method. -func (client *KubeEnvironmentsClient) NewListByResourceGroupPager(resourceGroupName string, options *KubeEnvironmentsClientListByResourceGroupOptions) *runtime.Pager[KubeEnvironmentsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[KubeEnvironmentsClientListByResourceGroupResponse]{ - More: func(page KubeEnvironmentsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *KubeEnvironmentsClientListByResourceGroupResponse) (KubeEnvironmentsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return KubeEnvironmentsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return KubeEnvironmentsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KubeEnvironmentsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *KubeEnvironmentsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *KubeEnvironmentsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *KubeEnvironmentsClient) listByResourceGroupHandleResponse(resp *http.Response) (KubeEnvironmentsClientListByResourceGroupResponse, error) { - result := KubeEnvironmentsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.KubeEnvironmentCollection); err != nil { - return KubeEnvironmentsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Get all Kubernetes Environments for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - KubeEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the KubeEnvironmentsClient.ListBySubscription -// method. -func (client *KubeEnvironmentsClient) NewListBySubscriptionPager(options *KubeEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[KubeEnvironmentsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[KubeEnvironmentsClientListBySubscriptionResponse]{ - More: func(page KubeEnvironmentsClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *KubeEnvironmentsClientListBySubscriptionResponse) (KubeEnvironmentsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return KubeEnvironmentsClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return KubeEnvironmentsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KubeEnvironmentsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *KubeEnvironmentsClient) listBySubscriptionCreateRequest(ctx context.Context, options *KubeEnvironmentsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *KubeEnvironmentsClient) listBySubscriptionHandleResponse(resp *http.Response) (KubeEnvironmentsClientListBySubscriptionResponse, error) { - result := KubeEnvironmentsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.KubeEnvironmentCollection); err != nil { - return KubeEnvironmentsClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Creates or updates a Kubernetes Environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the Kubernetes Environment. -// kubeEnvironmentEnvelope - Configuration details of the Kubernetes Environment. -// options - KubeEnvironmentsClientUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.Update method. -func (client *KubeEnvironmentsClient) Update(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironmentPatchResource, options *KubeEnvironmentsClientUpdateOptions) (KubeEnvironmentsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, name, kubeEnvironmentEnvelope, options) - if err != nil { - return KubeEnvironmentsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return KubeEnvironmentsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return KubeEnvironmentsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *KubeEnvironmentsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironmentPatchResource, options *KubeEnvironmentsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope) -} - -// updateHandleResponse handles the Update response. -func (client *KubeEnvironmentsClient) updateHandleResponse(resp *http.Response) (KubeEnvironmentsClientUpdateResponse, error) { - result := KubeEnvironmentsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.KubeEnvironment); err != nil { - return KubeEnvironmentsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_models.go deleted file mode 100644 index db174ec8..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_models.go +++ /dev/null @@ -1,13409 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import "time" - -// APIDefinitionInfo - Information about the formal API definition for the app. -type APIDefinitionInfo struct { - // The URL of the API definition. - URL *string `json:"url,omitempty"` -} - -// APIKVReference - Description of site key vault references. -type APIKVReference struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // ApiKVReference resource specific properties - Properties *APIKVReferenceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -type APIKVReferenceCollection struct { - // REQUIRED; Collection of resources. - Value []*APIKVReference `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// APIKVReferenceProperties - ApiKVReference resource specific properties -type APIKVReferenceProperties struct { - ActiveVersion *string `json:"activeVersion,omitempty"` - Details *string `json:"details,omitempty"` - - // Managed service identity. - IdentityType *ManagedServiceIdentity `json:"identityType,omitempty"` - Reference *string `json:"reference,omitempty"` - SecretName *string `json:"secretName,omitempty"` - SecretVersion *string `json:"secretVersion,omitempty"` - Source *string `json:"source,omitempty"` - Status *ResolveStatus `json:"status,omitempty"` - VaultName *string `json:"vaultName,omitempty"` -} - -// APIManagementConfig - Azure API management (APIM) configuration linked to the app. -type APIManagementConfig struct { - // APIM-Api Identifier. - ID *string `json:"id,omitempty"` -} - -// AbnormalTimePeriod - Class representing Abnormal Time Period identified in diagnosis -type AbnormalTimePeriod struct { - // End time of the downtime - EndTime *time.Time `json:"endTime,omitempty"` - - // List of Possible Cause of downtime - Events []*DetectorAbnormalTimePeriod `json:"events,omitempty"` - - // List of proposed solutions - Solutions []*Solution `json:"solutions,omitempty"` - - // Start time of the downtime - StartTime *time.Time `json:"startTime,omitempty"` -} - -// Address information for domain registration. -type Address struct { - // REQUIRED; First line of an Address. - Address1 *string `json:"address1,omitempty"` - - // REQUIRED; The city for the address. - City *string `json:"city,omitempty"` - - // REQUIRED; The country for the address. - Country *string `json:"country,omitempty"` - - // REQUIRED; The postal code for the address. - PostalCode *string `json:"postalCode,omitempty"` - - // REQUIRED; The state or province for the address. - State *string `json:"state,omitempty"` - - // The second line of the Address. Optional. - Address2 *string `json:"address2,omitempty"` -} - -// AddressResponse - Describes main public IP address and any extra virtual IPs. -type AddressResponse struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // AddressResponse resource specific properties - Properties *AddressResponseProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AddressResponseProperties - AddressResponse resource specific properties -type AddressResponseProperties struct { - // Virtual Network internal IP address of the App Service Environment if it is in internal load-balancing mode. - InternalIPAddress *string `json:"internalIpAddress,omitempty"` - - // IP addresses appearing on outbound connections. - OutboundIPAddresses []*string `json:"outboundIpAddresses,omitempty"` - - // Main public virtual IP. - ServiceIPAddress *string `json:"serviceIpAddress,omitempty"` - - // Additional virtual IPs. - VipMappings []*VirtualIPMapping `json:"vipMappings,omitempty"` -} - -// AllowedAudiencesValidation - The configuration settings of the Allowed Audiences validation flow. -type AllowedAudiencesValidation struct { - // The configuration settings of the allowed list of audiences from which to validate the JWT token. - AllowedAudiences []*string `json:"allowedAudiences,omitempty"` -} - -// AllowedPrincipals - The configuration settings of the Azure Active Directory allowed principals. -type AllowedPrincipals struct { - // The list of the allowed groups. - Groups []*string `json:"groups,omitempty"` - - // The list of the allowed identities. - Identities []*string `json:"identities,omitempty"` -} - -// AnalysisData - Class Representing Detector Evidence used for analysis -type AnalysisData struct { - // Additional Source Data - Data [][]*NameValuePair `json:"data,omitempty"` - - // Detector Definition - DetectorDefinition *DetectorDefinition `json:"detectorDefinition,omitempty"` - - // Detector Meta Data - DetectorMetaData *ResponseMetaData `json:"detectorMetaData,omitempty"` - - // Source Metrics - Metrics []*DiagnosticMetricSet `json:"metrics,omitempty"` - - // Name of the Detector - Source *string `json:"source,omitempty"` -} - -// AnalysisDefinition - Definition of Analysis -type AnalysisDefinition struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // AnalysisDefinition resource specific properties - Properties *AnalysisDefinitionProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AnalysisDefinitionProperties - AnalysisDefinition resource specific properties -type AnalysisDefinitionProperties struct { - // READ-ONLY; Description of the Analysis - Description *string `json:"description,omitempty" azure:"ro"` -} - -// AppCertificate - SSL certificate for an app. -type AppCertificate struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Certificate resource specific properties - Properties *AppCertificateProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AppCertificateCollection - Collection of certificates. -type AppCertificateCollection struct { - // REQUIRED; Collection of resources. - Value []*AppCertificate `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// AppCertificatePatchResource - ARM resource for a certificate. -type AppCertificatePatchResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // CertificatePatchResource resource specific properties - Properties *AppCertificatePatchResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AppCertificatePatchResourceProperties - CertificatePatchResource resource specific properties -type AppCertificatePatchResourceProperties struct { - // CNAME of the certificate to be issued via free certificate - CanonicalName *string `json:"canonicalName,omitempty"` - - // Method of domain validation for free cert - DomainValidationMethod *string `json:"domainValidationMethod,omitempty"` - - // Host names the certificate applies to. - HostNames []*string `json:"hostNames,omitempty"` - - // Key Vault Csm resource Id. - KeyVaultID *string `json:"keyVaultId,omitempty"` - - // Key Vault secret name. - KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"` - - // Certificate password. - Password *string `json:"password,omitempty"` - - // Pfx blob. - PfxBlob []byte `json:"pfxBlob,omitempty"` - - // Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - ServerFarmID *string `json:"serverFarmId,omitempty"` - - // READ-ONLY; Raw bytes of .cer file - CerBlob []byte `json:"cerBlob,omitempty" azure:"ro"` - - // READ-ONLY; Certificate expiration date. - ExpirationDate *time.Time `json:"expirationDate,omitempty" azure:"ro"` - - // READ-ONLY; Friendly name of the certificate. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` - - // READ-ONLY; Specification for the App Service Environment to use for the certificate. - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty" azure:"ro"` - - // READ-ONLY; Certificate issue Date. - IssueDate *time.Time `json:"issueDate,omitempty" azure:"ro"` - - // READ-ONLY; Certificate issuer. - Issuer *string `json:"issuer,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Key Vault secret. - KeyVaultSecretStatus *KeyVaultSecretStatus `json:"keyVaultSecretStatus,omitempty" azure:"ro"` - - // READ-ONLY; Public key hash. - PublicKeyHash *string `json:"publicKeyHash,omitempty" azure:"ro"` - - // READ-ONLY; Self link. - SelfLink *string `json:"selfLink,omitempty" azure:"ro"` - - // READ-ONLY; App name. - SiteName *string `json:"siteName,omitempty" azure:"ro"` - - // READ-ONLY; Subject name of the certificate. - SubjectName *string `json:"subjectName,omitempty" azure:"ro"` - - // READ-ONLY; Certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` - - // READ-ONLY; Is the certificate valid?. - Valid *bool `json:"valid,omitempty" azure:"ro"` -} - -// AppCertificateProperties - Certificate resource specific properties -type AppCertificateProperties struct { - // CNAME of the certificate to be issued via free certificate - CanonicalName *string `json:"canonicalName,omitempty"` - - // Method of domain validation for free cert - DomainValidationMethod *string `json:"domainValidationMethod,omitempty"` - - // Host names the certificate applies to. - HostNames []*string `json:"hostNames,omitempty"` - - // Key Vault Csm resource Id. - KeyVaultID *string `json:"keyVaultId,omitempty"` - - // Key Vault secret name. - KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"` - - // Certificate password. - Password *string `json:"password,omitempty"` - - // Pfx blob. - PfxBlob []byte `json:"pfxBlob,omitempty"` - - // Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - ServerFarmID *string `json:"serverFarmId,omitempty"` - - // READ-ONLY; Raw bytes of .cer file - CerBlob []byte `json:"cerBlob,omitempty" azure:"ro"` - - // READ-ONLY; Certificate expiration date. - ExpirationDate *time.Time `json:"expirationDate,omitempty" azure:"ro"` - - // READ-ONLY; Friendly name of the certificate. - FriendlyName *string `json:"friendlyName,omitempty" azure:"ro"` - - // READ-ONLY; Specification for the App Service Environment to use for the certificate. - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty" azure:"ro"` - - // READ-ONLY; Certificate issue Date. - IssueDate *time.Time `json:"issueDate,omitempty" azure:"ro"` - - // READ-ONLY; Certificate issuer. - Issuer *string `json:"issuer,omitempty" azure:"ro"` - - // READ-ONLY; Status of the Key Vault secret. - KeyVaultSecretStatus *KeyVaultSecretStatus `json:"keyVaultSecretStatus,omitempty" azure:"ro"` - - // READ-ONLY; Public key hash. - PublicKeyHash *string `json:"publicKeyHash,omitempty" azure:"ro"` - - // READ-ONLY; Self link. - SelfLink *string `json:"selfLink,omitempty" azure:"ro"` - - // READ-ONLY; App name. - SiteName *string `json:"siteName,omitempty" azure:"ro"` - - // READ-ONLY; Subject name of the certificate. - SubjectName *string `json:"subjectName,omitempty" azure:"ro"` - - // READ-ONLY; Certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` - - // READ-ONLY; Is the certificate valid?. - Valid *bool `json:"valid,omitempty" azure:"ro"` -} - -// AppInsightsWebAppStackSettings - App Insights Web App stack settings. -type AppInsightsWebAppStackSettings struct { - // READ-ONLY; true if Application Insights is disabled by default for the stack; otherwise, false. - IsDefaultOff *bool `json:"isDefaultOff,omitempty" azure:"ro"` - - // READ-ONLY; true if remote Application Insights is supported for the stack; otherwise, false. - IsSupported *bool `json:"isSupported,omitempty" azure:"ro"` -} - -type AppLogsConfiguration struct { - Destination *string `json:"destination,omitempty"` - LogAnalyticsConfiguration *LogAnalyticsConfiguration `json:"logAnalyticsConfiguration,omitempty"` -} - -// AppRegistration - The configuration settings of the app registration for providers that have app ids and app secrets -type AppRegistration struct { - // The App ID of the app used for login. - AppID *string `json:"appId,omitempty"` - - // The app setting name that contains the app secret. - AppSecretSettingName *string `json:"appSecretSettingName,omitempty"` -} - -// Apple - The configuration settings of the Apple provider. -type Apple struct { - // false if the Apple provider should not be enabled despite the set registration; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - - // The configuration settings of the login flow. - Login *LoginScopes `json:"login,omitempty"` - - // The configuration settings of the Apple registration. - Registration *AppleRegistration `json:"registration,omitempty"` -} - -// AppleRegistration - The configuration settings of the registration for the Apple provider -type AppleRegistration struct { - // The Client ID of the app used for login. - ClientID *string `json:"clientId,omitempty"` - - // The app setting name that contains the client secret. - ClientSecretSettingName *string `json:"clientSecretSettingName,omitempty"` -} - -// ApplicationLogsConfig - Application logs configuration. -type ApplicationLogsConfig struct { - // Application logs to blob storage configuration. - AzureBlobStorage *AzureBlobStorageApplicationLogsConfig `json:"azureBlobStorage,omitempty"` - - // Application logs to azure table storage configuration. - AzureTableStorage *AzureTableStorageApplicationLogsConfig `json:"azureTableStorage,omitempty"` - - // Application logs to file system configuration. - FileSystem *FileSystemApplicationLogsConfig `json:"fileSystem,omitempty"` -} - -// ApplicationStack - Application stack. -type ApplicationStack struct { - // Application stack dependency. - Dependency *string `json:"dependency,omitempty"` - - // Application stack display name. - Display *string `json:"display,omitempty"` - - // List of frameworks associated with application stack. - Frameworks []*ApplicationStack `json:"frameworks,omitempty"` - - // true if this is the stack is deprecated; otherwise, false. - IsDeprecated []*ApplicationStack `json:"isDeprecated,omitempty"` - - // List of major versions available. - MajorVersions []*StackMajorVersion `json:"majorVersions,omitempty"` - - // Application stack name. - Name *string `json:"name,omitempty"` -} - -// ApplicationStackCollection - Collection of Application Stacks -type ApplicationStackCollection struct { - // REQUIRED; Collection of resources. - Value []*ApplicationStackResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ApplicationStackResource - ARM resource for a ApplicationStack. -type ApplicationStackResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *ApplicationStack `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -type ArcConfiguration struct { - ArtifactStorageAccessMode *string `json:"artifactStorageAccessMode,omitempty"` - ArtifactStorageClassName *string `json:"artifactStorageClassName,omitempty"` - ArtifactStorageMountPath *string `json:"artifactStorageMountPath,omitempty"` - ArtifactStorageNodeName *string `json:"artifactStorageNodeName,omitempty"` - ArtifactsStorageType *StorageType `json:"artifactsStorageType,omitempty"` - FrontEndServiceConfiguration *FrontEndConfiguration `json:"frontEndServiceConfiguration,omitempty"` - KubeConfig *string `json:"kubeConfig,omitempty"` -} - -// ArmIDWrapper - A wrapper for an ARM resource id -type ArmIDWrapper struct { - // READ-ONLY - ID *string `json:"id,omitempty" azure:"ro"` -} - -// ArmPlan - The plan object in Azure Resource Manager, represents a marketplace plan. -type ArmPlan struct { - // The name. - Name *string `json:"name,omitempty"` - - // The product. - Product *string `json:"product,omitempty"` - - // The promotion code. - PromotionCode *string `json:"promotionCode,omitempty"` - - // The publisher. - Publisher *string `json:"publisher,omitempty"` - - // Version of product. - Version *string `json:"version,omitempty"` -} - -// AseV3NetworkingConfiguration - Full view of networking configuration for an ASE. -type AseV3NetworkingConfiguration struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // AseV3NetworkingConfiguration resource specific properties - Properties *AseV3NetworkingConfigurationProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AseV3NetworkingConfigurationProperties - AseV3NetworkingConfiguration resource specific properties -type AseV3NetworkingConfigurationProperties struct { - // Property to enable and disable new private endpoint connection creation on ASE - AllowNewPrivateEndpointConnections *bool `json:"allowNewPrivateEndpointConnections,omitempty"` - - // READ-ONLY - ExternalInboundIPAddresses []*string `json:"externalInboundIpAddresses,omitempty" azure:"ro"` - - // READ-ONLY - InternalInboundIPAddresses []*string `json:"internalInboundIpAddresses,omitempty" azure:"ro"` - - // READ-ONLY - LinuxOutboundIPAddresses []*string `json:"linuxOutboundIpAddresses,omitempty" azure:"ro"` - - // READ-ONLY - WindowsOutboundIPAddresses []*string `json:"windowsOutboundIpAddresses,omitempty" azure:"ro"` -} - -// AuthPlatform - The configuration settings of the platform of App Service Authentication/Authorization. -type AuthPlatform struct { - // The path of the config file containing auth settings if they come from a file. If the path is relative, base will the site's - // root directory. - ConfigFilePath *string `json:"configFilePath,omitempty"` - - // true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. - Enabled *bool `json:"enabled,omitempty"` - - // 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"` -} - -// AutoHealActions - Actions which to take by the auto-heal module when a rule is triggered. -type AutoHealActions struct { - // Predefined action to be taken. - ActionType *AutoHealActionType `json:"actionType,omitempty"` - - // Custom action to be taken. - CustomAction *AutoHealCustomAction `json:"customAction,omitempty"` - - // Minimum time the process must execute before taking the action - MinProcessExecutionTime *string `json:"minProcessExecutionTime,omitempty"` -} - -// AutoHealCustomAction - Custom action to be executed when an auto heal rule is triggered. -type AutoHealCustomAction struct { - // Executable to be run. - Exe *string `json:"exe,omitempty"` - - // Parameters for the executable. - Parameters *string `json:"parameters,omitempty"` -} - -// AutoHealRules - Rules that can be defined for auto-heal. -type AutoHealRules struct { - // Actions to be executed when a rule is triggered. - Actions *AutoHealActions `json:"actions,omitempty"` - - // Conditions that describe when to execute the auto-heal actions. - Triggers *AutoHealTriggers `json:"triggers,omitempty"` -} - -// AutoHealTriggers - Triggers for auto-heal. -type AutoHealTriggers struct { - // A rule based on private bytes. - PrivateBytesInKB *int32 `json:"privateBytesInKB,omitempty"` - - // A rule based on total requests. - Requests *RequestsBasedTrigger `json:"requests,omitempty"` - - // A rule based on request execution time. - SlowRequests *SlowRequestsBasedTrigger `json:"slowRequests,omitempty"` - - // A rule based on multiple Slow Requests Rule with path - SlowRequestsWithPath []*SlowRequestsBasedTrigger `json:"slowRequestsWithPath,omitempty"` - - // A rule based on status codes. - StatusCodes []*StatusCodesBasedTrigger `json:"statusCodes,omitempty"` - - // A rule based on status codes ranges. - StatusCodesRange []*StatusCodesRangeBasedTrigger `json:"statusCodesRange,omitempty"` -} - -// AzureActiveDirectory - The configuration settings of the Azure Active directory provider. -type AzureActiveDirectory struct { - // false if the Azure Active Directory provider should not be enabled despite the set registration; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - - // Gets a value indicating whether the Azure AD configuration was auto-provisioned using 1st party tooling. This is an internal - // flag primarily intended to support the Azure Management Portal. Users - // should not read or write to this property. - IsAutoProvisioned *bool `json:"isAutoProvisioned,omitempty"` - - // The configuration settings of the Azure Active Directory login flow. - Login *AzureActiveDirectoryLogin `json:"login,omitempty"` - - // The configuration settings of the Azure Active Directory app registration. - Registration *AzureActiveDirectoryRegistration `json:"registration,omitempty"` - - // The configuration settings of the Azure Active Directory token validation flow. - Validation *AzureActiveDirectoryValidation `json:"validation,omitempty"` -} - -// AzureActiveDirectoryLogin - The configuration settings of the Azure Active Directory login flow. -type AzureActiveDirectoryLogin struct { - // true if the www-authenticate provider should be omitted from the request; otherwise, false. - DisableWWWAuthenticate *bool `json:"disableWWWAuthenticate,omitempty"` - - // Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the - // form "key=value". - LoginParameters []*string `json:"loginParameters,omitempty"` -} - -// AzureActiveDirectoryRegistration - The configuration settings of the Azure Active Directory app registration. -type AzureActiveDirectoryRegistration struct { - // The Client ID of this relying party application, known as the clientid. 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-10.html - ClientID *string `json:"clientId,omitempty"` - - // An alternative to the client secret thumbprint, that is the issuer of a certificate used for signing purposes. This property - // acts as a replacement for the Client Secret Certificate Thumbprint. It is - // also optional. - ClientSecretCertificateIssuer *string `json:"clientSecretCertificateIssuer,omitempty"` - - // An alternative to the client secret thumbprint, that is the subject alternative name of a certificate used for signing - // purposes. This property acts as a replacement for the Client Secret Certificate - // Thumbprint. It is also optional. - ClientSecretCertificateSubjectAlternativeName *string `json:"clientSecretCertificateSubjectAlternativeName,omitempty"` - - // 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"` - - // The app setting name that contains the client secret of the relying party application. - ClientSecretSettingName *string `json:"clientSecretSettingName,omitempty"` - - // 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://login.microsoftonline.com/v2.0/{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 - OpenIDIssuer *string `json:"openIdIssuer,omitempty"` -} - -// AzureActiveDirectoryValidation - The configuration settings of the Azure Active Directory token validation flow. -type AzureActiveDirectoryValidation struct { - // The list of audiences that can make successful authentication/authorization requests. - AllowedAudiences []*string `json:"allowedAudiences,omitempty"` - - // The configuration settings of the default authorization policy. - DefaultAuthorizationPolicy *DefaultAuthorizationPolicy `json:"defaultAuthorizationPolicy,omitempty"` - - // The configuration settings of the checks that should be made while validating the JWT Claims. - JwtClaimChecks *JwtClaimChecks `json:"jwtClaimChecks,omitempty"` -} - -// AzureBlobStorageApplicationLogsConfig - Application logs azure blob storage configuration. -type AzureBlobStorageApplicationLogsConfig struct { - // Log level. - Level *LogLevel `json:"level,omitempty"` - - // Retention in days. Remove blobs older than X days. 0 or lower means no retention. - RetentionInDays *int32 `json:"retentionInDays,omitempty"` - - // SAS url to a azure blob container with read/write/list/delete permissions. - SasURL *string `json:"sasUrl,omitempty"` -} - -// AzureBlobStorageHTTPLogsConfig - Http logs to azure blob storage configuration. -type AzureBlobStorageHTTPLogsConfig struct { - // True if configuration is enabled, false if it is disabled and null if configuration is not set. - Enabled *bool `json:"enabled,omitempty"` - - // Retention in days. Remove blobs older than X days. 0 or lower means no retention. - RetentionInDays *int32 `json:"retentionInDays,omitempty"` - - // SAS url to a azure blob container with read/write/list/delete permissions. - SasURL *string `json:"sasUrl,omitempty"` -} - -// AzureStaticWebApps - The configuration settings of the Azure Static Web Apps provider. -type AzureStaticWebApps struct { - // false if the Azure Static Web Apps provider should not be enabled despite the set registration; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - - // The configuration settings of the Azure Static Web Apps registration. - Registration *AzureStaticWebAppsRegistration `json:"registration,omitempty"` -} - -// AzureStaticWebAppsRegistration - The configuration settings of the registration for the Azure Static Web Apps provider -type AzureStaticWebAppsRegistration struct { - // The Client ID of the app used for login. - ClientID *string `json:"clientId,omitempty"` -} - -// AzureStorageInfoValue - Azure Files or Blob Storage access information value for dictionary storage. -type AzureStorageInfoValue struct { - // Access key for the storage account. - AccessKey *string `json:"accessKey,omitempty"` - - // Name of the storage account. - AccountName *string `json:"accountName,omitempty"` - - // Path to mount the storage within the site's runtime environment. - MountPath *string `json:"mountPath,omitempty"` - - // Name of the file share (container name, for Blob storage). - ShareName *string `json:"shareName,omitempty"` - - // Type of storage. - Type *AzureStorageType `json:"type,omitempty"` - - // READ-ONLY; State of the storage account. - State *AzureStorageState `json:"state,omitempty" azure:"ro"` -} - -// AzureStoragePropertyDictionaryResource - AzureStorageInfo dictionary resource. -type AzureStoragePropertyDictionaryResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Azure storage accounts. - Properties map[string]*AzureStorageInfoValue `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AzureTableStorageApplicationLogsConfig - Application logs to Azure table storage configuration. -type AzureTableStorageApplicationLogsConfig struct { - // REQUIRED; SAS URL to an Azure table with add/query/delete permissions. - SasURL *string `json:"sasUrl,omitempty"` - - // Log level. - Level *LogLevel `json:"level,omitempty"` -} - -// BackupItem - Backup description. -type BackupItem struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // BackupItem resource specific properties - Properties *BackupItemProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupItemCollection - Collection of backup items. -type BackupItemCollection struct { - // REQUIRED; Collection of resources. - Value []*BackupItem `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// BackupItemProperties - BackupItem resource specific properties -type BackupItemProperties struct { - // READ-ONLY; Id of the backup. - BackupID *int32 `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of the blob which contains data for this backup. - BlobName *string `json:"blobName,omitempty" azure:"ro"` - - // READ-ONLY; Unique correlation identifier. Please use this along with the timestamp while communicating with Azure support. - CorrelationID *string `json:"correlationId,omitempty" azure:"ro"` - - // READ-ONLY; Timestamp of the backup creation. - Created *time.Time `json:"created,omitempty" azure:"ro"` - - // READ-ONLY; List of databases included in the backup. - Databases []*DatabaseBackupSetting `json:"databases,omitempty" azure:"ro"` - - // READ-ONLY; Timestamp when this backup finished. - FinishedTimeStamp *time.Time `json:"finishedTimeStamp,omitempty" azure:"ro"` - - // READ-ONLY; Timestamp of a last restore operation which used this backup. - LastRestoreTimeStamp *time.Time `json:"lastRestoreTimeStamp,omitempty" azure:"ro"` - - // READ-ONLY; Details regarding this backup. Might contain an error message. - Log *string `json:"log,omitempty" azure:"ro"` - - // READ-ONLY; Name of this backup. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; True if this backup has been created due to a schedule being triggered. - Scheduled *bool `json:"scheduled,omitempty" azure:"ro"` - - // READ-ONLY; Size of the backup in bytes. - SizeInBytes *int64 `json:"sizeInBytes,omitempty" azure:"ro"` - - // READ-ONLY; Backup status. - Status *BackupItemStatus `json:"status,omitempty" azure:"ro"` - - // READ-ONLY; SAS URL for the storage account container which contains this backup. - StorageAccountURL *string `json:"storageAccountUrl,omitempty" azure:"ro"` - - // READ-ONLY; Size of the original web app which has been backed up. - WebsiteSizeInBytes *int64 `json:"websiteSizeInBytes,omitempty" azure:"ro"` -} - -// BackupRequest - Description of a backup which will be performed. -type BackupRequest struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // BackupRequest resource specific properties - Properties *BackupRequestProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupRequestProperties - BackupRequest resource specific properties -type BackupRequestProperties struct { - // REQUIRED; SAS URL to the container. - StorageAccountURL *string `json:"storageAccountUrl,omitempty"` - - // Name of the backup. - BackupName *string `json:"backupName,omitempty"` - - // Schedule for the backup if it is executed periodically. - BackupSchedule *BackupSchedule `json:"backupSchedule,omitempty"` - - // Databases included in the backup. - Databases []*DatabaseBackupSetting `json:"databases,omitempty"` - - // True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. - Enabled *bool `json:"enabled,omitempty"` -} - -// BackupSchedule - Description of a backup schedule. Describes how often should be the backup performed and what should be -// the retention policy. -type BackupSchedule struct { - // REQUIRED; How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should - // be set to Day) - FrequencyInterval *int32 `json:"frequencyInterval,omitempty"` - - // REQUIRED; The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day - // and FrequencyInterval should be set to 7) - FrequencyUnit *FrequencyUnit `json:"frequencyUnit,omitempty"` - - // REQUIRED; True if the retention policy should always keep at least one backup in the storage account, regardless how old - // it is; false otherwise. - KeepAtLeastOneBackup *bool `json:"keepAtLeastOneBackup,omitempty"` - - // REQUIRED; After how many days backups should be deleted. - RetentionPeriodInDays *int32 `json:"retentionPeriodInDays,omitempty"` - - // When the schedule should start working. - StartTime *time.Time `json:"startTime,omitempty"` - - // READ-ONLY; Last time when this schedule was triggered. - LastExecutionTime *time.Time `json:"lastExecutionTime,omitempty" azure:"ro"` -} - -// BillingMeter - App Service billing entity that contains information about meter which the Azure billing system utilizes -// to charge users for services. -type BillingMeter struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // BillingMeter resource specific properties - Properties *BillingMeterProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BillingMeterCollection - Collection of Billing Meters -type BillingMeterCollection struct { - // REQUIRED; Collection of resources. - Value []*BillingMeter `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// BillingMeterProperties - BillingMeter resource specific properties -type BillingMeterProperties struct { - // Azure Location of billable resource - BillingLocation *string `json:"billingLocation,omitempty"` - - // Friendly name of the meter - FriendlyName *string `json:"friendlyName,omitempty"` - - // Meter GUID onboarded in Commerce - MeterID *string `json:"meterId,omitempty"` - - // Meter Multiplier - Multiplier *float64 `json:"multiplier,omitempty"` - - // App Service OS type meter used for - OSType *string `json:"osType,omitempty"` - - // App Service ResourceType meter used for - ResourceType *string `json:"resourceType,omitempty"` - - // Short Name from App Service Azure pricing Page - ShortName *string `json:"shortName,omitempty"` -} - -// BlobStorageTokenStore - The configuration settings of the storage of the tokens if blob storage is used. -type BlobStorageTokenStore struct { - // The name of the app setting containing the SAS URL of the blob storage containing the tokens. - SasURLSettingName *string `json:"sasUrlSettingName,omitempty"` -} - -// Capability - Describes the capabilities/features allowed for a specific SKU. -type Capability struct { - // Name of the SKU capability. - Name *string `json:"name,omitempty"` - - // Reason of the SKU capability. - Reason *string `json:"reason,omitempty"` - - // Value of the SKU capability. - Value *string `json:"value,omitempty"` -} - -// Certificate - Key Vault container for a certificate that is purchased through Azure. -type Certificate struct { - // Key Vault resource Id. - KeyVaultID *string `json:"keyVaultId,omitempty"` - - // Key Vault secret name. - KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"` - - // READ-ONLY; Status of the Key Vault secret. - ProvisioningState *KeyVaultSecretStatus `json:"provisioningState,omitempty" azure:"ro"` -} - -// CertificateCollection - Collection of certificate order certificates. -type CertificateCollection struct { - // REQUIRED; Collection of resources. - Value []*CertificateResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// CertificateDetails - SSL certificate details. -type CertificateDetails struct { - // READ-ONLY; Certificate Issuer. - Issuer *string `json:"issuer,omitempty" azure:"ro"` - - // READ-ONLY; Date Certificate is valid to. - NotAfter *time.Time `json:"notAfter,omitempty" azure:"ro"` - - // READ-ONLY; Date Certificate is valid from. - NotBefore *time.Time `json:"notBefore,omitempty" azure:"ro"` - - // READ-ONLY; Raw certificate data. - RawData *string `json:"rawData,omitempty" azure:"ro"` - - // READ-ONLY; Certificate Serial Number. - SerialNumber *string `json:"serialNumber,omitempty" azure:"ro"` - - // READ-ONLY; Certificate Signature algorithm. - SignatureAlgorithm *string `json:"signatureAlgorithm,omitempty" azure:"ro"` - - // READ-ONLY; Certificate Subject. - Subject *string `json:"subject,omitempty" azure:"ro"` - - // READ-ONLY; Certificate Thumbprint. - Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` - - // READ-ONLY; Certificate Version. - Version *int32 `json:"version,omitempty" azure:"ro"` -} - -// CertificateEmail - SSL certificate email. -type CertificateEmail struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // CertificateEmail resource specific properties - Properties *CertificateEmailProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CertificateEmailProperties - CertificateEmail resource specific properties -type CertificateEmailProperties struct { - // Email id. - EmailID *string `json:"emailId,omitempty"` - - // Time stamp. - TimeStamp *time.Time `json:"timeStamp,omitempty"` -} - -// CertificateOrder - SSL certificate purchase order. -type CertificateOrder struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // AppServiceCertificateOrder resource specific properties - Properties *CertificateOrderProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CertificateOrderAction - Certificate order action. -type CertificateOrderAction struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // CertificateOrderAction resource specific properties - Properties *CertificateOrderActionProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CertificateOrderActionProperties - CertificateOrderAction resource specific properties -type CertificateOrderActionProperties struct { - // READ-ONLY; Action type. - ActionType *CertificateOrderActionType `json:"actionType,omitempty" azure:"ro"` - - // READ-ONLY; Time at which the certificate action was performed. - CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"` -} - -// CertificateOrderCollection - Collection of certificate orders. -type CertificateOrderCollection struct { - // REQUIRED; Collection of resources. - Value []*CertificateOrder `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -type CertificateOrderContact struct { - Email *string `json:"email,omitempty"` - NameFirst *string `json:"nameFirst,omitempty"` - NameLast *string `json:"nameLast,omitempty"` - Phone *string `json:"phone,omitempty"` -} - -// CertificateOrderPatchResource - ARM resource for a certificate order that is purchased through Azure. -type CertificateOrderPatchResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // AppServiceCertificateOrderPatchResource resource specific properties - Properties *CertificateOrderPatchResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CertificateOrderPatchResourceProperties - AppServiceCertificateOrderPatchResource resource specific properties -type CertificateOrderPatchResourceProperties struct { - // REQUIRED; Certificate product type. - ProductType *CertificateProductType `json:"productType,omitempty"` - - // true if the certificate should be automatically renewed when it expires; otherwise, false. - AutoRenew *bool `json:"autoRenew,omitempty"` - - // State of the Key Vault secret. - Certificates map[string]*Certificate `json:"certificates,omitempty"` - - // Last CSR that was created for this order. - Csr *string `json:"csr,omitempty"` - - // Certificate distinguished name. - DistinguishedName *string `json:"distinguishedName,omitempty"` - - // Certificate key size. - KeySize *int32 `json:"keySize,omitempty"` - - // Duration in years (must be 1). - ValidityInYears *int32 `json:"validityInYears,omitempty"` - - // READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment. - AppServiceCertificateNotRenewableReasons []*AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem `json:"appServiceCertificateNotRenewableReasons,omitempty" azure:"ro"` - - // READ-ONLY; Contact info - Contact *CertificateOrderContact `json:"contact,omitempty" azure:"ro"` - - // READ-ONLY; Domain verification token. - DomainVerificationToken *string `json:"domainVerificationToken,omitempty" azure:"ro"` - - // READ-ONLY; Certificate expiration time. - ExpirationTime *time.Time `json:"expirationTime,omitempty" azure:"ro"` - - // READ-ONLY; Intermediate certificate. - Intermediate *CertificateDetails `json:"intermediate,omitempty" azure:"ro"` - - // READ-ONLY; true if private key is external; otherwise, false. - IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty" azure:"ro"` - - // READ-ONLY; Certificate last issuance time. - LastCertificateIssuanceTime *time.Time `json:"lastCertificateIssuanceTime,omitempty" azure:"ro"` - - // READ-ONLY; Time stamp when the certificate would be auto renewed next - NextAutoRenewalTimeStamp *time.Time `json:"nextAutoRenewalTimeStamp,omitempty" azure:"ro"` - - // READ-ONLY; Status of certificate order. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Root certificate. - Root *CertificateDetails `json:"root,omitempty" azure:"ro"` - - // READ-ONLY; Current serial number of the certificate. - SerialNumber *string `json:"serialNumber,omitempty" azure:"ro"` - - // READ-ONLY; Signed certificate. - SignedCertificate *CertificateDetails `json:"signedCertificate,omitempty" azure:"ro"` - - // READ-ONLY; Current order status. - Status *CertificateOrderStatus `json:"status,omitempty" azure:"ro"` -} - -// CertificateOrderProperties - AppServiceCertificateOrder resource specific properties -type CertificateOrderProperties struct { - // REQUIRED; Certificate product type. - ProductType *CertificateProductType `json:"productType,omitempty"` - - // true if the certificate should be automatically renewed when it expires; otherwise, false. - AutoRenew *bool `json:"autoRenew,omitempty"` - - // State of the Key Vault secret. - Certificates map[string]*Certificate `json:"certificates,omitempty"` - - // Last CSR that was created for this order. - Csr *string `json:"csr,omitempty"` - - // Certificate distinguished name. - DistinguishedName *string `json:"distinguishedName,omitempty"` - - // Certificate key size. - KeySize *int32 `json:"keySize,omitempty"` - - // Duration in years (must be 1). - ValidityInYears *int32 `json:"validityInYears,omitempty"` - - // READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment. - AppServiceCertificateNotRenewableReasons []*AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem `json:"appServiceCertificateNotRenewableReasons,omitempty" azure:"ro"` - - // READ-ONLY; Contact info - Contact *CertificateOrderContact `json:"contact,omitempty" azure:"ro"` - - // READ-ONLY; Domain verification token. - DomainVerificationToken *string `json:"domainVerificationToken,omitempty" azure:"ro"` - - // READ-ONLY; Certificate expiration time. - ExpirationTime *time.Time `json:"expirationTime,omitempty" azure:"ro"` - - // READ-ONLY; Intermediate certificate. - Intermediate *CertificateDetails `json:"intermediate,omitempty" azure:"ro"` - - // READ-ONLY; true if private key is external; otherwise, false. - IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty" azure:"ro"` - - // READ-ONLY; Certificate last issuance time. - LastCertificateIssuanceTime *time.Time `json:"lastCertificateIssuanceTime,omitempty" azure:"ro"` - - // READ-ONLY; Time stamp when the certificate would be auto renewed next - NextAutoRenewalTimeStamp *time.Time `json:"nextAutoRenewalTimeStamp,omitempty" azure:"ro"` - - // READ-ONLY; Status of certificate order. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Root certificate. - Root *CertificateDetails `json:"root,omitempty" azure:"ro"` - - // READ-ONLY; Current serial number of the certificate. - SerialNumber *string `json:"serialNumber,omitempty" azure:"ro"` - - // READ-ONLY; Signed certificate. - SignedCertificate *CertificateDetails `json:"signedCertificate,omitempty" azure:"ro"` - - // READ-ONLY; Current order status. - Status *CertificateOrderStatus `json:"status,omitempty" azure:"ro"` -} - -// CertificateOrdersClientBeginCreateOrUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdateCertificate -// method. -type CertificateOrdersClientBeginCreateOrUpdateCertificateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CertificateOrdersClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdate -// method. -type CertificateOrdersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CertificateOrdersClientDeleteCertificateOptions contains the optional parameters for the CertificateOrdersClient.DeleteCertificate -// method. -type CertificateOrdersClientDeleteCertificateOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientDeleteOptions contains the optional parameters for the CertificateOrdersClient.Delete method. -type CertificateOrdersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientGetCertificateOptions contains the optional parameters for the CertificateOrdersClient.GetCertificate -// method. -type CertificateOrdersClientGetCertificateOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientGetOptions contains the optional parameters for the CertificateOrdersClient.Get method. -type CertificateOrdersClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientListByResourceGroupOptions contains the optional parameters for the CertificateOrdersClient.ListByResourceGroup -// method. -type CertificateOrdersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientListCertificatesOptions contains the optional parameters for the CertificateOrdersClient.ListCertificates -// method. -type CertificateOrdersClientListCertificatesOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientListOptions contains the optional parameters for the CertificateOrdersClient.List method. -type CertificateOrdersClientListOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientReissueOptions contains the optional parameters for the CertificateOrdersClient.Reissue method. -type CertificateOrdersClientReissueOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientRenewOptions contains the optional parameters for the CertificateOrdersClient.Renew method. -type CertificateOrdersClientRenewOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientResendEmailOptions contains the optional parameters for the CertificateOrdersClient.ResendEmail -// method. -type CertificateOrdersClientResendEmailOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientResendRequestEmailsOptions contains the optional parameters for the CertificateOrdersClient.ResendRequestEmails -// method. -type CertificateOrdersClientResendRequestEmailsOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientRetrieveCertificateActionsOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateActions -// method. -type CertificateOrdersClientRetrieveCertificateActionsOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientRetrieveCertificateEmailHistoryOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateEmailHistory -// method. -type CertificateOrdersClientRetrieveCertificateEmailHistoryOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientRetrieveSiteSealOptions contains the optional parameters for the CertificateOrdersClient.RetrieveSiteSeal -// method. -type CertificateOrdersClientRetrieveSiteSealOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.UpdateCertificate -// method. -type CertificateOrdersClientUpdateCertificateOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientUpdateOptions contains the optional parameters for the CertificateOrdersClient.Update method. -type CertificateOrdersClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientValidatePurchaseInformationOptions contains the optional parameters for the CertificateOrdersClient.ValidatePurchaseInformation -// method. -type CertificateOrdersClientValidatePurchaseInformationOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientVerifyDomainOwnershipOptions contains the optional parameters for the CertificateOrdersClient.VerifyDomainOwnership -// method. -type CertificateOrdersClientVerifyDomainOwnershipOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions contains the optional parameters -// for the CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse method. -type CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions struct { - // The end time for the detector response. - EndTime *time.Time - // The start time for detector response. - StartTime *time.Time - // The time grain for the detector response. - TimeGrain *string -} - -// CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions contains the optional parameters -// for the CertificateOrdersDiagnosticsClient.ListAppServiceCertificateOrderDetectorResponse method. -type CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions struct { - // placeholder for future optional parameters -} - -// CertificatePatchResource - Key Vault container ARM resource for a certificate that is purchased through Azure. -type CertificatePatchResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *Certificate `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CertificateRegistrationProviderClientListOperationsOptions contains the optional parameters for the CertificateRegistrationProviderClient.ListOperations -// method. -type CertificateRegistrationProviderClientListOperationsOptions struct { - // placeholder for future optional parameters -} - -// CertificateResource - Key Vault container ARM resource for a certificate that is purchased through Azure. -type CertificateResource struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *Certificate `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. -type CertificatesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. -type CertificatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. -type CertificatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientListByResourceGroupOptions contains the optional parameters for the CertificatesClient.ListByResourceGroup -// method. -type CertificatesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.List method. -type CertificatesClientListOptions struct { - // Return only information specified in the filter (using OData syntax). For example: $filter=KeyVaultId eq 'KeyVaultId' - Filter *string -} - -// CertificatesClientUpdateOptions contains the optional parameters for the CertificatesClient.Update method. -type CertificatesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ClientRegistration - The configuration settings of the app registration for providers that have client ids and client secrets -type ClientRegistration struct { - // The Client ID of the app used for login. - ClientID *string `json:"clientId,omitempty"` - - // The app setting name that contains the client secret. - ClientSecretSettingName *string `json:"clientSecretSettingName,omitempty"` -} - -// CloningInfo - Information needed for cloning operation. -type CloningInfo struct { - // REQUIRED; ARM resource ID of the source app. App resource ID is of the form /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. - SourceWebAppID *string `json:"sourceWebAppId,omitempty"` - - // Application setting overrides for cloned app. If specified, these settings override the settings cloned from source app. - // Otherwise, application settings from source app are retained. - AppSettingsOverrides map[string]*string `json:"appSettingsOverrides,omitempty"` - - // true to clone custom hostnames from source app; otherwise, false. - CloneCustomHostNames *bool `json:"cloneCustomHostNames,omitempty"` - - // true to clone source control from source app; otherwise, false. - CloneSourceControl *bool `json:"cloneSourceControl,omitempty"` - - // true to configure load balancing for source and destination app. - ConfigureLoadBalancing *bool `json:"configureLoadBalancing,omitempty"` - - // Correlation ID of cloning operation. This ID ties multiple cloning operations together to use the same snapshot. - CorrelationID *string `json:"correlationId,omitempty"` - - // App Service Environment. - HostingEnvironment *string `json:"hostingEnvironment,omitempty"` - - // true to overwrite destination app; otherwise, false. - Overwrite *bool `json:"overwrite,omitempty"` - - // Location of source app ex: West US or North Europe - SourceWebAppLocation *string `json:"sourceWebAppLocation,omitempty"` - - // ARM resource ID of the Traffic Manager profile to use, if it exists. Traffic Manager resource ID is of the form - // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}. - TrafficManagerProfileID *string `json:"trafficManagerProfileId,omitempty"` - - // Name of Traffic Manager profile to create. This is only needed if Traffic Manager profile does not already exist. - TrafficManagerProfileName *string `json:"trafficManagerProfileName,omitempty"` -} - -// Configuration - Non versioned Container App configuration properties that define the mutable settings of a Container app -type Configuration struct { - // ActiveRevisionsMode controls how active revisions are handled for the Container app:Multiple: multiple revisions can be - // active. If no value if provided, this is the defaultSingle: Only one revision - // can be active at a time. Revision weights can not be used in this mode - ActiveRevisionsMode *ActiveRevisionsMode `json:"activeRevisionsMode,omitempty"` - - // Ingress configurations. - Ingress *Ingress `json:"ingress,omitempty"` - - // Collection of private container registry credentials for containers used by the Container app - Registries []*RegistryCredentials `json:"registries,omitempty"` - - // Collection of secrets used by a Container app - Secrets []*Secret `json:"secrets,omitempty"` -} - -// ConnStringInfo - Database connection string information. -type ConnStringInfo struct { - // Connection string value. - ConnectionString *string `json:"connectionString,omitempty"` - - // Name of connection string. - Name *string `json:"name,omitempty"` - - // Type of database. - Type *ConnectionStringType `json:"type,omitempty"` -} - -// ConnStringValueTypePair - Database connection string value to type pair. -type ConnStringValueTypePair struct { - // REQUIRED; Type of database. - Type *ConnectionStringType `json:"type,omitempty"` - - // REQUIRED; Value of pair. - Value *string `json:"value,omitempty"` -} - -// ConnectionStringDictionary - String dictionary resource. -type ConnectionStringDictionary struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Connection strings. - Properties map[string]*ConnStringValueTypePair `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// 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. -type Contact struct { - // REQUIRED; Email address. - Email *string `json:"email,omitempty"` - - // REQUIRED; First name. - NameFirst *string `json:"nameFirst,omitempty"` - - // REQUIRED; Last name. - NameLast *string `json:"nameLast,omitempty"` - - // REQUIRED; Phone number. - Phone *string `json:"phone,omitempty"` - - // Mailing address. - AddressMailing *Address `json:"addressMailing,omitempty"` - - // Fax number. - Fax *string `json:"fax,omitempty"` - - // Job title. - JobTitle *string `json:"jobTitle,omitempty"` - - // Middle name. - NameMiddle *string `json:"nameMiddle,omitempty"` - - // Organization contact belongs to. - Organization *string `json:"organization,omitempty"` -} - -// Container App container definition. -type Container struct { - // Container start command arguments. - Args []*string `json:"args,omitempty"` - - // Container start command. - Command []*string `json:"command,omitempty"` - - // Container environment variables. - Env []*EnvironmentVar `json:"env,omitempty"` - - // Container image tag. - Image *string `json:"image,omitempty"` - - // Custom container name. - Name *string `json:"name,omitempty"` - - // Container resource requirements. - Resources *ContainerResources `json:"resources,omitempty"` -} - -// ContainerApp - Container App. -type ContainerApp struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // ContainerApp resource specific properties - Properties *ContainerAppProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ContainerAppCollection - Container App collection ARM resource. -type ContainerAppCollection struct { - // REQUIRED; Collection of resources. - Value []*ContainerApp `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ContainerAppProperties - ContainerApp resource specific properties -type ContainerAppProperties struct { - // Non versioned Container App configuration properties. - Configuration *Configuration `json:"configuration,omitempty"` - - // Resource ID of the Container App's KubeEnvironment. - KubeEnvironmentID *string `json:"kubeEnvironmentId,omitempty"` - - // Container App versioned application definition. - Template *Template `json:"template,omitempty"` - - // READ-ONLY; Fully Qualified Domain Name of the latest revision of the Container App. - LatestRevisionFqdn *string `json:"latestRevisionFqdn,omitempty" azure:"ro"` - - // READ-ONLY; Name of the latest revision of the Container App. - LatestRevisionName *string `json:"latestRevisionName,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Container App. - ProvisioningState *ContainerAppProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ContainerAppSecret - Container App Secret. -type ContainerAppSecret struct { - // READ-ONLY; Secret Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Secret Value. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate -// method. -type ContainerAppsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete method. -type ContainerAppsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. -type ContainerAppsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.ListByResourceGroup -// method. -type ContainerAppsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.ListBySubscription -// method. -type ContainerAppsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets method. -type ContainerAppsClientListSecretsOptions struct { - // placeholder for future optional parameters -} - -type ContainerAppsConfiguration struct { - // Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet - // defined in appSubnetResourceId. Must not overlap with the IP range defined in - // platformReservedCidr, if defined. - AppSubnetResourceID *string `json:"appSubnetResourceId,omitempty"` - - // Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet - // defined in appSubnetResourceId. Must not overlap with the IP range defined in - // platformReservedCidr, if defined. - ControlPlaneSubnetResourceID *string `json:"controlPlaneSubnetResourceId,omitempty"` - - // Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry - DaprAIInstrumentationKey *string `json:"daprAIInstrumentationKey,omitempty"` - - // CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the IP range - // defined in platformReservedCidr, if defined. - DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"` - - // IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any - // other Subnet IP ranges. - PlatformReservedCidr *string `json:"platformReservedCidr,omitempty"` - - // An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server - PlatformReservedDNSIP *string `json:"platformReservedDnsIP,omitempty"` -} - -// ContainerAppsRevisionsClientActivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.ActivateRevision -// method. -type ContainerAppsRevisionsClientActivateRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientDeactivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.DeactivateRevision -// method. -type ContainerAppsRevisionsClientDeactivateRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientGetRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.GetRevision -// method. -type ContainerAppsRevisionsClientGetRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.ListRevisions -// method. -type ContainerAppsRevisionsClientListRevisionsOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientRestartRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.RestartRevision -// method. -type ContainerAppsRevisionsClientRestartRevisionOptions struct { - // placeholder for future optional parameters -} - -type ContainerCPUStatistics struct { - CPUUsage *ContainerCPUUsage `json:"cpuUsage,omitempty"` - OnlineCPUCount *int32 `json:"onlineCpuCount,omitempty"` - SystemCPUUsage *int64 `json:"systemCpuUsage,omitempty"` - ThrottlingData *ContainerThrottlingData `json:"throttlingData,omitempty"` -} - -type ContainerCPUUsage struct { - KernelModeUsage *int64 `json:"kernelModeUsage,omitempty"` - PerCPUUsage []*int64 `json:"perCpuUsage,omitempty"` - TotalUsage *int64 `json:"totalUsage,omitempty"` - UserModeUsage *int64 `json:"userModeUsage,omitempty"` -} - -type ContainerInfo struct { - CurrentCPUStats *ContainerCPUStatistics `json:"currentCpuStats,omitempty"` - CurrentTimeStamp *time.Time `json:"currentTimeStamp,omitempty"` - Eth0 *ContainerNetworkInterfaceStatistics `json:"eth0,omitempty"` - ID *string `json:"id,omitempty"` - MemoryStats *ContainerMemoryStatistics `json:"memoryStats,omitempty"` - Name *string `json:"name,omitempty"` - PreviousCPUStats *ContainerCPUStatistics `json:"previousCpuStats,omitempty"` - PreviousTimeStamp *time.Time `json:"previousTimeStamp,omitempty"` -} - -type ContainerMemoryStatistics struct { - Limit *int64 `json:"limit,omitempty"` - MaxUsage *int64 `json:"maxUsage,omitempty"` - Usage *int64 `json:"usage,omitempty"` -} - -type ContainerNetworkInterfaceStatistics struct { - RxBytes *int64 `json:"rxBytes,omitempty"` - RxDropped *int64 `json:"rxDropped,omitempty"` - RxErrors *int64 `json:"rxErrors,omitempty"` - RxPackets *int64 `json:"rxPackets,omitempty"` - TxBytes *int64 `json:"txBytes,omitempty"` - TxDropped *int64 `json:"txDropped,omitempty"` - TxErrors *int64 `json:"txErrors,omitempty"` - TxPackets *int64 `json:"txPackets,omitempty"` -} - -// ContainerResources - Container App container resource requirements. -type ContainerResources struct { - // Required CPU in cores, e.g. 0.5 - CPU *float64 `json:"cpu,omitempty"` - - // Required memory, e.g. "250Mb" - Memory *string `json:"memory,omitempty"` -} - -type ContainerThrottlingData struct { - Periods *int32 `json:"periods,omitempty"` - ThrottledPeriods *int32 `json:"throttledPeriods,omitempty"` - ThrottledTime *int32 `json:"throttledTime,omitempty"` -} - -// ContinuousWebJob - Continuous Web Job Information. -type ContinuousWebJob struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // ContinuousWebJob resource specific properties - Properties *ContinuousWebJobProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ContinuousWebJobCollection - Collection of Kudu continuous web job information elements. -type ContinuousWebJobCollection struct { - // REQUIRED; Collection of resources. - Value []*ContinuousWebJob `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ContinuousWebJobProperties - ContinuousWebJob resource specific properties -type ContinuousWebJobProperties struct { - // Detailed status. - DetailedStatus *string `json:"detailed_status,omitempty"` - - // Error information. - Error *string `json:"error,omitempty"` - - // Extra Info URL. - ExtraInfoURL *string `json:"extra_info_url,omitempty"` - - // Log URL. - LogURL *string `json:"log_url,omitempty"` - - // Run command. - RunCommand *string `json:"run_command,omitempty"` - - // Job settings. - Settings map[string]interface{} `json:"settings,omitempty"` - - // Job status. - Status *ContinuousWebJobStatus `json:"status,omitempty"` - - // Job URL. - URL *string `json:"url,omitempty"` - - // Using SDK? - UsingSdk *bool `json:"using_sdk,omitempty"` - - // Job type. - WebJobType *WebJobType `json:"web_job_type,omitempty"` -} - -// CookieExpiration - The configuration settings of the session cookie's expiration. -type CookieExpiration struct { - // The convention used when determining the session cookie's expiration. - Convention *CookieExpirationConvention `json:"convention,omitempty"` - - // The time after the request is made when the session cookie should expire. - TimeToExpiration *string `json:"timeToExpiration,omitempty"` -} - -// CorsSettings - Cross-Origin Resource Sharing (CORS) settings for the app. -type CorsSettings struct { - // Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). - // Use "*" to allow all. - AllowedOrigins []*string `json:"allowedOrigins,omitempty"` - - // Gets or sets whether CORS requests with credentials are allowed. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requestswithcredentials - // for more details. - 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 { - Resources []*string `json:"resources,omitempty"` - TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` -} - -// CsmOperationCollection - Collection of Azure resource manager operation metadata. -type CsmOperationCollection struct { - // REQUIRED; Collection of resources. - Value []*CsmOperationDescription `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// CsmOperationDescription - Description of an operation available for Microsoft.Web resource provider. -type CsmOperationDescription struct { - // Meta data about operation used for display in portal. - Display *CsmOperationDisplay `json:"display,omitempty"` - IsDataAction *bool `json:"isDataAction,omitempty"` - Name *string `json:"name,omitempty"` - Origin *string `json:"origin,omitempty"` - - // Properties available for a Microsoft.Web resource provider operation. - Properties *CsmOperationDescriptionProperties `json:"properties,omitempty"` -} - -// CsmOperationDescriptionProperties - Properties available for a Microsoft.Web resource provider operation. -type CsmOperationDescriptionProperties struct { - // Resource metrics service provided by Microsoft.Insights resource provider. - ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// CsmOperationDisplay - Meta data about operation used for display in portal. -type CsmOperationDisplay struct { - Description *string `json:"description,omitempty"` - Operation *string `json:"operation,omitempty"` - Provider *string `json:"provider,omitempty"` - Resource *string `json:"resource,omitempty"` -} - -// CsmPublishingCredentialsPoliciesEntity - Publishing Credentials Policies parameters. -type CsmPublishingCredentialsPoliciesEntity struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // CsmPublishingCredentialsPoliciesEntity resource specific properties - Properties *CsmPublishingCredentialsPoliciesEntityProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CsmPublishingCredentialsPoliciesEntityProperties - CsmPublishingCredentialsPoliciesEntity resource specific properties -type CsmPublishingCredentialsPoliciesEntityProperties struct { - // REQUIRED; true to allow access to a publishing method; otherwise, false. - Allow *bool `json:"allow,omitempty"` -} - -// CsmPublishingProfileOptions - Publishing options for requested profile. -type CsmPublishingProfileOptions struct { - // Name of the format. Valid values are: FileZilla3 WebDeploy -- default Ftp - Format *PublishingProfileFormat `json:"format,omitempty"` - - // Include the DisasterRecover endpoint if true - IncludeDisasterRecoveryEndpoints *bool `json:"includeDisasterRecoveryEndpoints,omitempty"` -} - -// CsmSlotEntity - Deployment slot parameters. -type CsmSlotEntity struct { - // REQUIRED; true to preserve Virtual Network to the slot during swap; otherwise, false. - PreserveVnet *bool `json:"preserveVnet,omitempty"` - - // REQUIRED; Destination deployment slot during swap operation. - TargetSlot *string `json:"targetSlot,omitempty"` -} - -// CsmUsageQuota - Usage of the quota resource. -type CsmUsageQuota struct { - // The current value of the resource counter. - CurrentValue *int64 `json:"currentValue,omitempty"` - - // The resource limit. - Limit *int64 `json:"limit,omitempty"` - - // Quota name. - Name *LocalizableString `json:"name,omitempty"` - - // Next reset time for the resource counter. - NextResetTime *time.Time `json:"nextResetTime,omitempty"` - - // Units of measurement for the quota resource. - Unit *string `json:"unit,omitempty"` -} - -// CsmUsageQuotaCollection - Collection of CSM usage quotas. -type CsmUsageQuotaCollection struct { - // REQUIRED; Collection of resources. - Value []*CsmUsageQuota `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// CustomHostnameAnalysisResult - Custom domain analysis. -type CustomHostnameAnalysisResult struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // CustomHostnameAnalysisResult resource specific properties - Properties *CustomHostnameAnalysisResultProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CustomHostnameAnalysisResultProperties - CustomHostnameAnalysisResult resource specific properties -type CustomHostnameAnalysisResultProperties struct { - // A records controller can see for this hostname. - ARecords []*string `json:"aRecords,omitempty"` - - // Alternate CName records controller can see for this hostname. - AlternateCNameRecords []*string `json:"alternateCNameRecords,omitempty"` - - // Alternate TXT records controller can see for this hostname. - AlternateTxtRecords []*string `json:"alternateTxtRecords,omitempty"` - - // CName records controller can see for this hostname. - CNameRecords []*string `json:"cNameRecords,omitempty"` - - // TXT records controller can see for this hostname. - TxtRecords []*string `json:"txtRecords,omitempty"` - - // READ-ONLY; Name of the conflicting app on scale unit if it's within the same subscription. - ConflictingAppResourceID *string `json:"conflictingAppResourceId,omitempty" azure:"ro"` - - // READ-ONLY; Raw failure information if DNS verification fails. - CustomDomainVerificationFailureInfo *ErrorEntity `json:"customDomainVerificationFailureInfo,omitempty" azure:"ro"` - - // READ-ONLY; DNS verification test result. - CustomDomainVerificationTest *DNSVerificationTestResult `json:"customDomainVerificationTest,omitempty" azure:"ro"` - - // READ-ONLY; true if there is a conflict across subscriptions; otherwise, false. - HasConflictAcrossSubscription *bool `json:"hasConflictAcrossSubscription,omitempty" azure:"ro"` - - // READ-ONLY; true if there is a conflict on a scale unit; otherwise, false. - HasConflictOnScaleUnit *bool `json:"hasConflictOnScaleUnit,omitempty" azure:"ro"` - - // READ-ONLY; true if hostname is already verified; otherwise, false. - IsHostnameAlreadyVerified *bool `json:"isHostnameAlreadyVerified,omitempty" azure:"ro"` -} - -// CustomHostnameSites - A hostname and its assigned sites -type CustomHostnameSites struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // CustomHostnameSites resource specific properties - Properties *CustomHostnameSitesProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CustomHostnameSitesCollection - Collection of custom hostname sites -type CustomHostnameSitesCollection struct { - // REQUIRED; Collection of resources. - Value []*CustomHostnameSites `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// CustomHostnameSitesProperties - CustomHostnameSites resource specific properties -type CustomHostnameSitesProperties struct { - CustomHostname *string `json:"customHostname,omitempty"` - Region *string `json:"region,omitempty"` - SiteResourceIDs []*Identifier `json:"siteResourceIds,omitempty"` -} - -// CustomOpenIDConnectProvider - The configuration settings of the custom Open ID Connect provider. -type CustomOpenIDConnectProvider struct { - // false if the custom Open ID provider provider should not be enabled; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - - // The configuration settings of the login flow of the custom Open ID Connect provider. - Login *OpenIDConnectLogin `json:"login,omitempty"` - - // The configuration settings of the app registration for the custom Open ID Connect provider. - Registration *OpenIDConnectRegistration `json:"registration,omitempty"` -} - -// CustomScaleRule - Container App container Custom scaling rule. -type CustomScaleRule struct { - // Authentication secrets for the custom scale rule. - Auth []*ScaleRuleAuth `json:"auth,omitempty"` - - // Metadata properties to describe custom scale rule. - Metadata map[string]*string `json:"metadata,omitempty"` - - // Type of the custom scale rule eg: azure-servicebus, redis etc. - Type *string `json:"type,omitempty"` -} - -// Dapr - Container App Dapr configuration. -type Dapr struct { - // Dapr application identifier - AppID *string `json:"appId,omitempty"` - - // Port on which the Dapr side car - AppPort *int32 `json:"appPort,omitempty"` - - // Collection of Dapr components - Components []*DaprComponent `json:"components,omitempty"` - - // Boolean indicating if the Dapr side car is enabled - Enabled *bool `json:"enabled,omitempty"` -} - -// DaprComponent - Dapr component configuration -type DaprComponent struct { - // Component metadata - Metadata []*DaprMetadata `json:"metadata,omitempty"` - - // Component name - Name *string `json:"name,omitempty"` - - // Component type - Type *string `json:"type,omitempty"` - - // Component version - Version *string `json:"version,omitempty"` -} - -// DaprMetadata - Container App Dapr component metadata. -type DaprMetadata struct { - // Metadata property name. - Name *string `json:"name,omitempty"` - - // Name of the Container App secret from which to pull the metadata property value. - SecretRef *string `json:"secretRef,omitempty"` - - // Metadata property value. - Value *string `json:"value,omitempty"` -} - -// DataProviderMetadata - Additional configuration for a data providers -type DataProviderMetadata struct { - ProviderName *string `json:"providerName,omitempty"` - - // READ-ONLY; Settings for the data provider - PropertyBag []*KeyValuePairStringObject `json:"propertyBag,omitempty" azure:"ro"` -} - -// DataSource - Class representing data source used by the detectors -type DataSource struct { - // Datasource Uri Links - DataSourceURI []*NameValuePair `json:"dataSourceUri,omitempty"` - - // Instructions if any for the data source - Instructions []*string `json:"instructions,omitempty"` -} - -// DataTableResponseColumn - Column definition -type DataTableResponseColumn struct { - // Name of the column - ColumnName *string `json:"columnName,omitempty"` - - // Column Type - ColumnType *string `json:"columnType,omitempty"` - - // Data type which looks like 'String' or 'Int32'. - DataType *string `json:"dataType,omitempty"` -} - -// DataTableResponseObject - Data Table which defines columns and raw row values -type DataTableResponseObject struct { - // List of columns with data types - Columns []*DataTableResponseColumn `json:"columns,omitempty"` - - // Raw row values - Rows [][]*string `json:"rows,omitempty"` - - // Name of the table - TableName *string `json:"tableName,omitempty"` -} - -// DatabaseBackupSetting - Database backup settings. -type DatabaseBackupSetting struct { - // REQUIRED; Database type (e.g. SqlAzure / MySql). - DatabaseType *DatabaseType `json:"databaseType,omitempty"` - - // 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"` - - // 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"` - Name *string `json:"name,omitempty"` -} - -// DefaultAuthorizationPolicy - The configuration settings of the Azure Active Directory default authorization policy. -type DefaultAuthorizationPolicy struct { - // The configuration settings of the Azure Active Directory allowed applications. - AllowedApplications []*string `json:"allowedApplications,omitempty"` - - // The configuration settings of the Azure Active Directory allowed principals. - AllowedPrincipals *AllowedPrincipals `json:"allowedPrincipals,omitempty"` -} - -// DefaultErrorResponse - App Service error response. -type DefaultErrorResponse struct { - // READ-ONLY; Error model. - Error *DefaultErrorResponseError `json:"error,omitempty" azure:"ro"` -} - -// DefaultErrorResponseError - Error model. -type DefaultErrorResponseError struct { - Details []*DefaultErrorResponseErrorDetailsItem `json:"details,omitempty"` - - // READ-ONLY; Standardized string to programmatically identify the error. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; More information to debug error. - Innererror *string `json:"innererror,omitempty" azure:"ro"` - - // READ-ONLY; Detailed error description and debugging information. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; Detailed error description and debugging information. - Target *string `json:"target,omitempty" azure:"ro"` -} - -// DefaultErrorResponseErrorDetailsItem - Detailed errors. -type DefaultErrorResponseErrorDetailsItem struct { - // READ-ONLY; Standardized string to programmatically identify the error. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; Detailed error description and debugging information. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; Detailed error description and debugging information. - Target *string `json:"target,omitempty" azure:"ro"` -} - -// DeletedAppRestoreRequest - Details about restoring a deleted app. -type DeletedAppRestoreRequest struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // DeletedAppRestoreRequest resource specific properties - Properties *DeletedAppRestoreRequestProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DeletedAppRestoreRequestProperties - DeletedAppRestoreRequest resource specific properties -type DeletedAppRestoreRequestProperties struct { - // ARM resource ID of the deleted app. Example: /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} - DeletedSiteID *string `json:"deletedSiteId,omitempty"` - - // If true, deleted site configuration, in addition to content, will be restored. - RecoverConfiguration *bool `json:"recoverConfiguration,omitempty"` - - // 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"` - - // If true, the snapshot is retrieved from DRSecondary endpoint. - UseDRSecondary *bool `json:"useDRSecondary,omitempty"` -} - -// DeletedSite - A deleted app. -type DeletedSite struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // DeletedSite resource specific properties - Properties *DeletedSiteProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DeletedSiteProperties - DeletedSite resource specific properties -type DeletedSiteProperties struct { - // READ-ONLY; Numeric id for the deleted site - DeletedSiteID *int32 `json:"deletedSiteId,omitempty" azure:"ro"` - - // READ-ONLY; Name of the deleted site - DeletedSiteName *string `json:"deletedSiteName,omitempty" azure:"ro"` - - // READ-ONLY; Time in UTC when the app was deleted. - DeletedTimestamp *string `json:"deletedTimestamp,omitempty" azure:"ro"` - - // READ-ONLY; Geo Region of the deleted site - GeoRegionName *string `json:"geoRegionName,omitempty" azure:"ro"` - - // READ-ONLY; Kind of site that was deleted - Kind *string `json:"kind,omitempty" azure:"ro"` - - // READ-ONLY; ResourceGroup that contained the deleted site - ResourceGroup *string `json:"resourceGroup,omitempty" azure:"ro"` - - // READ-ONLY; Slot of the deleted site - Slot *string `json:"slot,omitempty" azure:"ro"` - - // READ-ONLY; Subscription containing the deleted site - Subscription *string `json:"subscription,omitempty" azure:"ro"` -} - -// DeletedWebAppCollection - Collection of deleted apps. -type DeletedWebAppCollection struct { - // REQUIRED; Collection of resources. - Value []*DeletedSite `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DeletedWebAppsClientGetDeletedWebAppByLocationOptions contains the optional parameters for the DeletedWebAppsClient.GetDeletedWebAppByLocation -// method. -type DeletedWebAppsClientGetDeletedWebAppByLocationOptions struct { - // placeholder for future optional parameters -} - -// DeletedWebAppsClientListByLocationOptions contains the optional parameters for the DeletedWebAppsClient.ListByLocation -// method. -type DeletedWebAppsClientListByLocationOptions struct { - // placeholder for future optional parameters -} - -// DeletedWebAppsClientListOptions contains the optional parameters for the DeletedWebAppsClient.List method. -type DeletedWebAppsClientListOptions struct { - // placeholder for future optional parameters -} - -// Deployment - User credentials used for publishing activity. -type Deployment struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Deployment resource specific properties - Properties *DeploymentProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DeploymentCollection - Collection of app deployments. -type DeploymentCollection struct { - // REQUIRED; Collection of resources. - Value []*Deployment `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DeploymentLocations - List of available locations (regions or App Service Environments) for deployment of App Service resources. -type DeploymentLocations struct { - // Available App Service Environments with basic information. - HostingEnvironmentDeploymentInfos []*HostingEnvironmentDeploymentInfo `json:"hostingEnvironmentDeploymentInfos,omitempty"` - - // Available App Service Environments with full descriptions of the environments. - HostingEnvironments []*Environment `json:"hostingEnvironments,omitempty"` - - // Available regions. - Locations []*GeoRegion `json:"locations,omitempty"` -} - -// DeploymentProperties - Deployment resource specific properties -type DeploymentProperties struct { - // True if deployment is currently active, false if completed and null if not started. - Active *bool `json:"active,omitempty"` - - // Who authored the deployment. - Author *string `json:"author,omitempty"` - - // Author email. - AuthorEmail *string `json:"author_email,omitempty"` - - // Who performed the deployment. - Deployer *string `json:"deployer,omitempty"` - - // Details on deployment. - Details *string `json:"details,omitempty"` - - // End time. - EndTime *time.Time `json:"end_time,omitempty"` - - // Details about deployment status. - Message *string `json:"message,omitempty"` - - // Start time. - StartTime *time.Time `json:"start_time,omitempty"` - - // Deployment status. - Status *int32 `json:"status,omitempty"` -} - -// DetectorAbnormalTimePeriod - Class representing Abnormal Time Period detected. -type DetectorAbnormalTimePeriod struct { - // End time of the correlated event - EndTime *time.Time `json:"endTime,omitempty"` - - // Message describing the event - Message *string `json:"message,omitempty"` - - // Downtime metadata - MetaData [][]*NameValuePair `json:"metaData,omitempty"` - - // Represents the rank of the Detector - Priority *float64 `json:"priority,omitempty"` - - // List of proposed solutions - Solutions []*Solution `json:"solutions,omitempty"` - - // Represents the name of the Detector - Source *string `json:"source,omitempty"` - - // Start time of the correlated event - StartTime *time.Time `json:"startTime,omitempty"` - - // Represents the type of the Detector - Type *IssueType `json:"type,omitempty"` -} - -// DetectorDefinition - Class representing detector definition -type DetectorDefinition struct { - // READ-ONLY; Description of the detector - Description *string `json:"description,omitempty" azure:"ro"` - - // READ-ONLY; Display name of the detector - DisplayName *string `json:"displayName,omitempty" azure:"ro"` - - // READ-ONLY; Flag representing whether detector is enabled or not. - IsEnabled *bool `json:"isEnabled,omitempty" azure:"ro"` - - // READ-ONLY; Detector Rank - Rank *float64 `json:"rank,omitempty" azure:"ro"` -} - -// DetectorDefinitionResource - ARM resource for a detector definition -type DetectorDefinitionResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *DetectorDefinition `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DetectorInfo - Definition of Detector -type DetectorInfo struct { - // READ-ONLY; Analysis Types for which this detector should apply to. - AnalysisType []*string `json:"analysisType,omitempty" azure:"ro"` - - // READ-ONLY; Author of the detector. - Author *string `json:"author,omitempty" azure:"ro"` - - // READ-ONLY; Problem category. This serves for organizing group for detectors. - Category *string `json:"category,omitempty" azure:"ro"` - - // READ-ONLY; Short description of the detector and its purpose. - Description *string `json:"description,omitempty" azure:"ro"` - - // READ-ONLY; Id of detector - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of detector - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Defines score of a detector to power ML based matching. - Score *float32 `json:"score,omitempty" azure:"ro"` - - // READ-ONLY; List of Support Topics for which this detector is enabled. - SupportTopicList []*SupportTopic `json:"supportTopicList,omitempty" azure:"ro"` - - // READ-ONLY; Whether this detector is an Analysis Detector or not. - Type *DetectorType `json:"type,omitempty" azure:"ro"` -} - -// DetectorResponse - Class representing Response from Detector -type DetectorResponse struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // DetectorResponse resource specific properties - Properties *DetectorResponseProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DetectorResponseCollection - Collection of detector responses -type DetectorResponseCollection struct { - // REQUIRED; Collection of resources. - Value []*DetectorResponse `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DetectorResponseProperties - DetectorResponse resource specific properties -type DetectorResponseProperties struct { - // Additional configuration for different data providers to be used by the UI - DataProvidersMetadata []*DataProviderMetadata `json:"dataProvidersMetadata,omitempty"` - - // Data Set - Dataset []*DiagnosticData `json:"dataset,omitempty"` - - // metadata for the detector - Metadata *DetectorInfo `json:"metadata,omitempty"` - - // Indicates status of the most severe insight. - Status *Status `json:"status,omitempty"` - - // Suggested utterances where the detector can be applicable. - SuggestedUtterances *QueryUtterancesResults `json:"suggestedUtterances,omitempty"` -} - -// DiagnosticAnalysis - Class representing a diagnostic analysis done on an application -type DiagnosticAnalysis struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // DiagnosticAnalysis resource specific properties - Properties *DiagnosticAnalysisProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DiagnosticAnalysisCollection - Collection of Diagnostic Analyses -type DiagnosticAnalysisCollection struct { - // REQUIRED; Collection of resources. - Value []*AnalysisDefinition `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DiagnosticAnalysisProperties - DiagnosticAnalysis resource specific properties -type DiagnosticAnalysisProperties struct { - // List of time periods. - AbnormalTimePeriods []*AbnormalTimePeriod `json:"abnormalTimePeriods,omitempty"` - - // End time of the period - EndTime *time.Time `json:"endTime,omitempty"` - - // Data by each detector for detectors that did not corelate - NonCorrelatedDetectors []*DetectorDefinition `json:"nonCorrelatedDetectors,omitempty"` - - // Data by each detector - Payload []*AnalysisData `json:"payload,omitempty"` - - // Start time of the period - StartTime *time.Time `json:"startTime,omitempty"` -} - -// DiagnosticCategory - Class representing detector definition -type DiagnosticCategory struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // DiagnosticCategory resource specific properties - Properties *DiagnosticCategoryProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DiagnosticCategoryCollection - Collection of Diagnostic Categories -type DiagnosticCategoryCollection struct { - // REQUIRED; Collection of resources. - Value []*DiagnosticCategory `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DiagnosticCategoryProperties - DiagnosticCategory resource specific properties -type DiagnosticCategoryProperties struct { - // READ-ONLY; Description of the diagnostic category - Description *string `json:"description,omitempty" azure:"ro"` -} - -// DiagnosticData - Set of data with rendering instructions -type DiagnosticData struct { - // Properties that describe how the table should be rendered - RenderingProperties *Rendering `json:"renderingProperties,omitempty"` - - // Data in table form - Table *DataTableResponseObject `json:"table,omitempty"` -} - -// DiagnosticDetectorCollection - Collection of Diagnostic Detectors -type DiagnosticDetectorCollection struct { - // REQUIRED; Collection of resources. - Value []*DetectorDefinitionResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DiagnosticDetectorResponse - Class representing Response from Diagnostic Detectors -type DiagnosticDetectorResponse struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // DiagnosticDetectorResponse resource specific properties - Properties *DiagnosticDetectorResponseProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DiagnosticDetectorResponseProperties - DiagnosticDetectorResponse resource specific properties -type DiagnosticDetectorResponseProperties struct { - // List of Correlated events found by the detector - AbnormalTimePeriods []*DetectorAbnormalTimePeriod `json:"abnormalTimePeriods,omitempty"` - - // Additional Data that detector wants to send. - Data [][]*NameValuePair `json:"data,omitempty"` - - // Detector's definition - DetectorDefinition *DetectorDefinition `json:"detectorDefinition,omitempty"` - - // End time of the period - EndTime *time.Time `json:"endTime,omitempty"` - - // Flag representing Issue was detected. - IssueDetected *bool `json:"issueDetected,omitempty"` - - // Metrics provided by the detector - Metrics []*DiagnosticMetricSet `json:"metrics,omitempty"` - - // Meta Data - ResponseMetaData *ResponseMetaData `json:"responseMetaData,omitempty"` - - // Start time of the period - StartTime *time.Time `json:"startTime,omitempty"` -} - -// DiagnosticMetricSample - Class representing Diagnostic Metric -type DiagnosticMetricSample struct { - // Whether the values are aggregates across all workers or not - IsAggregated *bool `json:"isAggregated,omitempty"` - - // Maximum of the metric sampled during the time period - Maximum *float64 `json:"maximum,omitempty"` - - // Minimum of the metric sampled during the time period - Minimum *float64 `json:"minimum,omitempty"` - - // Role Instance. Null if this counter is not per instance This is returned and should be whichever instance name we desire - // to be returned i.e. CPU and Memory return RDWORKERNAME (LargeDed…IN0) where - // RDWORKERNAME is Machine name below and RoleInstance name in parenthesis - RoleInstance *string `json:"roleInstance,omitempty"` - - // Time at which metric is measured - Timestamp *time.Time `json:"timestamp,omitempty"` - - // Total value of the metric. If multiple measurements are made this will have sum of all. - Total *float64 `json:"total,omitempty"` -} - -// DiagnosticMetricSet - Class representing Diagnostic Metric information -type DiagnosticMetricSet struct { - // End time of the period - EndTime *time.Time `json:"endTime,omitempty"` - - // Name of the metric - Name *string `json:"name,omitempty"` - - // Start time of the period - StartTime *time.Time `json:"startTime,omitempty"` - - // Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D - TimeGrain *string `json:"timeGrain,omitempty"` - - // Metric's unit - Unit *string `json:"unit,omitempty"` - - // Collection of metric values for the selected period based on the {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain} - Values []*DiagnosticMetricSample `json:"values,omitempty"` -} - -// DiagnosticsClientExecuteSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysis -// method. -type DiagnosticsClientExecuteSiteAnalysisOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientExecuteSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysisSlot -// method. -type DiagnosticsClientExecuteSiteAnalysisSlotOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientExecuteSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetector -// method. -type DiagnosticsClientExecuteSiteDetectorOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientExecuteSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetectorSlot -// method. -type DiagnosticsClientExecuteSiteDetectorSlotOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetHostingEnvironmentDetectorResponse -// method. -type DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientGetSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysis method. -type DiagnosticsClientGetSiteAnalysisOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientGetSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysisSlot -// method. -type DiagnosticsClientGetSiteAnalysisSlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientGetSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetector method. -type DiagnosticsClientGetSiteDetectorOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientGetSiteDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponse -// method. -type DiagnosticsClientGetSiteDetectorResponseOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientGetSiteDetectorResponseSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponseSlot -// method. -type DiagnosticsClientGetSiteDetectorResponseSlotOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientGetSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorSlot -// method. -type DiagnosticsClientGetSiteDetectorSlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientGetSiteDiagnosticCategoryOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategory -// method. -type DiagnosticsClientGetSiteDiagnosticCategoryOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientGetSiteDiagnosticCategorySlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategorySlot -// method. -type DiagnosticsClientGetSiteDiagnosticCategorySlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.ListHostingEnvironmentDetectorResponses -// method. -type DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteAnalysesOptions contains the optional parameters for the DiagnosticsClient.ListSiteAnalyses method. -type DiagnosticsClientListSiteAnalysesOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteAnalysesSlotOptions contains the optional parameters for the DiagnosticsClient.ListSiteAnalysesSlot -// method. -type DiagnosticsClientListSiteAnalysesSlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.ListSiteDetectorResponses -// method. -type DiagnosticsClientListSiteDetectorResponsesOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDetectorResponsesSlotOptions contains the optional parameters for the DiagnosticsClient.ListSiteDetectorResponsesSlot -// method. -type DiagnosticsClientListSiteDetectorResponsesSlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDetectorsOptions contains the optional parameters for the DiagnosticsClient.ListSiteDetectors -// method. -type DiagnosticsClientListSiteDetectorsOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDetectorsSlotOptions contains the optional parameters for the DiagnosticsClient.ListSiteDetectorsSlot -// method. -type DiagnosticsClientListSiteDetectorsSlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDiagnosticCategoriesOptions contains the optional parameters for the DiagnosticsClient.ListSiteDiagnosticCategories -// method. -type DiagnosticsClientListSiteDiagnosticCategoriesOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions contains the optional parameters for the DiagnosticsClient.ListSiteDiagnosticCategoriesSlot -// method. -type DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions struct { - // placeholder for future optional parameters -} - -// Dimension of a resource metric. For e.g. instance specific HTTP requests for a web app, where instance name is dimension -// of the metric HTTP request -type Dimension struct { - DisplayName *string `json:"displayName,omitempty"` - InternalName *string `json:"internalName,omitempty"` - Name *string `json:"name,omitempty"` - ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"` -} - -// Domain - Information about a domain. -type Domain struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Domain resource specific properties - Properties *DomainProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DomainAvailabilityCheckResult - Domain availability check result. -type DomainAvailabilityCheckResult struct { - // true if domain can be purchased using CreateDomain API; otherwise, false. - Available *bool `json:"available,omitempty"` - - // Valid values are Regular domain: Azure will charge the full price of domain registration, SoftDeleted: Purchasing this - // domain will simply restore it and this operation will not cost anything. - DomainType *DomainType `json:"domainType,omitempty"` - - // Name of the domain. - Name *string `json:"name,omitempty"` -} - -// DomainCollection - Collection of domains. -type DomainCollection struct { - // REQUIRED; Collection of resources. - Value []*Domain `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DomainControlCenterSsoRequest - Single sign-on request information for domain management. -type DomainControlCenterSsoRequest struct { - // READ-ONLY; Post parameter key. - PostParameterKey *string `json:"postParameterKey,omitempty" azure:"ro"` - - // READ-ONLY; Post parameter value. Client should use 'application/x-www-form-urlencoded' encoding for this value. - PostParameterValue *string `json:"postParameterValue,omitempty" azure:"ro"` - - // READ-ONLY; URL where the single sign-on request is to be made. - URL *string `json:"url,omitempty" azure:"ro"` -} - -// DomainOwnershipIdentifier - Domain ownership Identifier. -type DomainOwnershipIdentifier struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // DomainOwnershipIdentifier resource specific properties - Properties *DomainOwnershipIdentifierProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DomainOwnershipIdentifierCollection - Collection of domain ownership identifiers. -type DomainOwnershipIdentifierCollection struct { - // REQUIRED; Collection of resources. - Value []*DomainOwnershipIdentifier `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DomainOwnershipIdentifierProperties - DomainOwnershipIdentifier resource specific properties -type DomainOwnershipIdentifierProperties struct { - // Ownership Id. - OwnershipID *string `json:"ownershipId,omitempty"` -} - -// DomainPatchResource - ARM resource for a domain. -type DomainPatchResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // DomainPatchResource resource specific properties - Properties *DomainPatchResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DomainPatchResourceProperties - DomainPatchResource resource specific properties -type DomainPatchResourceProperties struct { - // REQUIRED; Legal agreement consent. - Consent *DomainPurchaseConsent `json:"consent,omitempty"` - - // REQUIRED; Administrative contact. - ContactAdmin *Contact `json:"contactAdmin,omitempty"` - - // REQUIRED; Billing contact. - ContactBilling *Contact `json:"contactBilling,omitempty"` - - // REQUIRED; Registrant contact. - ContactRegistrant *Contact `json:"contactRegistrant,omitempty"` - - // REQUIRED; Technical contact. - ContactTech *Contact `json:"contactTech,omitempty"` - AuthCode *string `json:"authCode,omitempty"` - - // true if the domain should be automatically renewed; otherwise, false. - AutoRenew *bool `json:"autoRenew,omitempty"` - - // Current DNS type - DNSType *DNSType `json:"dnsType,omitempty"` - - // Azure DNS Zone to use - DNSZoneID *string `json:"dnsZoneId,omitempty"` - - // true if domain privacy is enabled for this domain; otherwise, false. - Privacy *bool `json:"privacy,omitempty"` - - // Target DNS type (would be used for migration) - TargetDNSType *DNSType `json:"targetDnsType,omitempty"` - - // READ-ONLY; Domain creation timestamp. - CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` - - // READ-ONLY; Reasons why domain is not renewable. - DomainNotRenewableReasons []*DomainPatchResourcePropertiesDomainNotRenewableReasonsItem `json:"domainNotRenewableReasons,omitempty" azure:"ro"` - - // READ-ONLY; Domain expiration timestamp. - ExpirationTime *time.Time `json:"expirationTime,omitempty" azure:"ro"` - - // READ-ONLY; Timestamp when the domain was renewed last time. - LastRenewedTime *time.Time `json:"lastRenewedTime,omitempty" azure:"ro"` - - // READ-ONLY; All hostnames derived from the domain and assigned to Azure resources. - ManagedHostNames []*HostName `json:"managedHostNames,omitempty" azure:"ro"` - - // READ-ONLY; Name servers. - NameServers []*string `json:"nameServers,omitempty" azure:"ro"` - - // READ-ONLY; Domain provisioning state. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; true if Azure can assign this domain to App Service apps; otherwise, false. This value will be true if domain - // registration status is active and it is hosted on name servers Azure has programmatic - // access to. - ReadyForDNSRecordManagement *bool `json:"readyForDnsRecordManagement,omitempty" azure:"ro"` - - // READ-ONLY; Domain registration status. - RegistrationStatus *DomainStatus `json:"registrationStatus,omitempty" azure:"ro"` -} - -// DomainProperties - Domain resource specific properties -type DomainProperties struct { - // REQUIRED; Legal agreement consent. - Consent *DomainPurchaseConsent `json:"consent,omitempty"` - - // REQUIRED; Administrative contact. - ContactAdmin *Contact `json:"contactAdmin,omitempty"` - - // REQUIRED; Billing contact. - ContactBilling *Contact `json:"contactBilling,omitempty"` - - // REQUIRED; Registrant contact. - ContactRegistrant *Contact `json:"contactRegistrant,omitempty"` - - // REQUIRED; Technical contact. - ContactTech *Contact `json:"contactTech,omitempty"` - AuthCode *string `json:"authCode,omitempty"` - - // true if the domain should be automatically renewed; otherwise, false. - AutoRenew *bool `json:"autoRenew,omitempty"` - - // Current DNS type - DNSType *DNSType `json:"dnsType,omitempty"` - - // Azure DNS Zone to use - DNSZoneID *string `json:"dnsZoneId,omitempty"` - - // true if domain privacy is enabled for this domain; otherwise, false. - Privacy *bool `json:"privacy,omitempty"` - - // Target DNS type (would be used for migration) - TargetDNSType *DNSType `json:"targetDnsType,omitempty"` - - // READ-ONLY; Domain creation timestamp. - CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` - - // READ-ONLY; Reasons why domain is not renewable. - DomainNotRenewableReasons []*DomainPropertiesDomainNotRenewableReasonsItem `json:"domainNotRenewableReasons,omitempty" azure:"ro"` - - // READ-ONLY; Domain expiration timestamp. - ExpirationTime *time.Time `json:"expirationTime,omitempty" azure:"ro"` - - // READ-ONLY; Timestamp when the domain was renewed last time. - LastRenewedTime *time.Time `json:"lastRenewedTime,omitempty" azure:"ro"` - - // READ-ONLY; All hostnames derived from the domain and assigned to Azure resources. - ManagedHostNames []*HostName `json:"managedHostNames,omitempty" azure:"ro"` - - // READ-ONLY; Name servers. - NameServers []*string `json:"nameServers,omitempty" azure:"ro"` - - // READ-ONLY; Domain provisioning state. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; true if Azure can assign this domain to App Service apps; otherwise, false. This value will be true if domain - // registration status is active and it is hosted on name servers Azure has programmatic - // access to. - ReadyForDNSRecordManagement *bool `json:"readyForDnsRecordManagement,omitempty" azure:"ro"` - - // READ-ONLY; Domain registration status. - RegistrationStatus *DomainStatus `json:"registrationStatus,omitempty" azure:"ro"` -} - -// DomainPurchaseConsent - Domain purchase consent object, representing acceptance of applicable legal agreements. -type DomainPurchaseConsent struct { - // Timestamp when the agreements were accepted. - AgreedAt *time.Time `json:"agreedAt,omitempty"` - - // Client IP address. - AgreedBy *string `json:"agreedBy,omitempty"` - - // List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under TopLevelDomain - // resource. - AgreementKeys []*string `json:"agreementKeys,omitempty"` -} - -// DomainRecommendationSearchParameters - Domain recommendation search parameters. -type DomainRecommendationSearchParameters struct { - // Keywords to be used for generating domain recommendations. - Keywords *string `json:"keywords,omitempty"` - - // Maximum number of recommendations. - MaxDomainRecommendations *int32 `json:"maxDomainRecommendations,omitempty"` -} - -// DomainRegistrationProviderClientListOperationsOptions contains the optional parameters for the DomainRegistrationProviderClient.ListOperations -// method. -type DomainRegistrationProviderClientListOperationsOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the DomainsClient.BeginCreateOrUpdate method. -type DomainsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DomainsClientCheckAvailabilityOptions contains the optional parameters for the DomainsClient.CheckAvailability method. -type DomainsClientCheckAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientCreateOrUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.CreateOrUpdateOwnershipIdentifier -// method. -type DomainsClientCreateOrUpdateOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientDeleteOptions contains the optional parameters for the DomainsClient.Delete method. -type DomainsClientDeleteOptions struct { - // Specify true to delete the domain immediately. The default is false which deletes the domain after 24 hours. - ForceHardDeleteDomain *bool -} - -// DomainsClientDeleteOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.DeleteOwnershipIdentifier -// method. -type DomainsClientDeleteOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientGetControlCenterSsoRequestOptions contains the optional parameters for the DomainsClient.GetControlCenterSsoRequest -// method. -type DomainsClientGetControlCenterSsoRequestOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientGetOptions contains the optional parameters for the DomainsClient.Get method. -type DomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientGetOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.GetOwnershipIdentifier -// method. -type DomainsClientGetOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientListByResourceGroupOptions contains the optional parameters for the DomainsClient.ListByResourceGroup method. -type DomainsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientListOptions contains the optional parameters for the DomainsClient.List method. -type DomainsClientListOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientListOwnershipIdentifiersOptions contains the optional parameters for the DomainsClient.ListOwnershipIdentifiers -// method. -type DomainsClientListOwnershipIdentifiersOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientListRecommendationsOptions contains the optional parameters for the DomainsClient.ListRecommendations method. -type DomainsClientListRecommendationsOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientRenewOptions contains the optional parameters for the DomainsClient.Renew method. -type DomainsClientRenewOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientTransferOutOptions contains the optional parameters for the DomainsClient.TransferOut method. -type DomainsClientTransferOutOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientUpdateOptions contains the optional parameters for the DomainsClient.Update method. -type DomainsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.UpdateOwnershipIdentifier -// method. -type DomainsClientUpdateOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// EnabledConfig - Enabled configuration. -type EnabledConfig struct { - // True if configuration is enabled, false if it is disabled and null if configuration is not set. - Enabled *bool `json:"enabled,omitempty"` -} - -// EndpointDependency - A domain name that a service is reached at, including details of the current connection status. -type EndpointDependency struct { - // The domain name of the dependency. - DomainName *string `json:"domainName,omitempty"` - - // The IP Addresses and Ports used when connecting to DomainName. - EndpointDetails []*EndpointDetail `json:"endpointDetails,omitempty"` -} - -// EndpointDetail - Current TCP connectivity information from the App Service Environment to a single endpoint. -type EndpointDetail struct { - // An IP Address that Domain Name currently resolves to. - IPAddress *string `json:"ipAddress,omitempty"` - - // Whether it is possible to create a TCP connection from the App Service Environment to this IpAddress at this Port. - IsAccessible *bool `json:"isAccessible,omitempty"` - - // The time in milliseconds it takes for a TCP connection to be created from the App Service Environment to this IpAddress - // at this Port. - Latency *float64 `json:"latency,omitempty"` - - // The port an endpoint is connected to. - Port *int32 `json:"port,omitempty"` -} - -// Environment - Description of an App Service Environment. -type Environment struct { - // REQUIRED; Description of the Virtual Network. - VirtualNetwork *VirtualNetworkProfile `json:"virtualNetwork,omitempty"` - - // Custom settings for changing the behavior of the App Service Environment. - ClusterSettings []*NameValuePair `json:"clusterSettings,omitempty"` - - // DNS suffix of the App Service Environment. - DNSSuffix *string `json:"dnsSuffix,omitempty"` - - // Dedicated Host Count - DedicatedHostCount *int32 `json:"dedicatedHostCount,omitempty"` - - // Scale factor for front-ends. - FrontEndScaleFactor *int32 `json:"frontEndScaleFactor,omitempty"` - - // Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. - InternalLoadBalancingMode *LoadBalancingMode `json:"internalLoadBalancingMode,omitempty"` - - // Number of IP SSL addresses reserved for the App Service Environment. - IpsslAddressCount *int32 `json:"ipsslAddressCount,omitempty"` - - // Front-end VM size, e.g. "Medium", "Large". - MultiSize *string `json:"multiSize,omitempty"` - - // User added ip ranges to whitelist on ASE db - UserWhitelistedIPRanges []*string `json:"userWhitelistedIpRanges,omitempty"` - - // Whether or not this App Service Environment is zone-redundant. - ZoneRedundant *bool `json:"zoneRedundant,omitempty"` - - // READ-ONLY; Flag that displays whether an ASE has linux workers or not - HasLinuxWorkers *bool `json:"hasLinuxWorkers,omitempty" azure:"ro"` - - // READ-ONLY; Maximum number of VMs in the App Service Environment. - MaximumNumberOfMachines *int32 `json:"maximumNumberOfMachines,omitempty" azure:"ro"` - - // READ-ONLY; Number of front-end instances. - MultiRoleCount *int32 `json:"multiRoleCount,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the App Service Environment. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Current status of the App Service Environment. - Status *HostingEnvironmentStatus `json:"status,omitempty" azure:"ro"` - - // 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" azure:"ro"` -} - -// EnvironmentCollection - Collection of App Service Environments. -type EnvironmentCollection struct { - // REQUIRED; Collection of resources. - Value []*EnvironmentResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// EnvironmentPatchResource - ARM resource for a app service environment. -type EnvironmentPatchResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *Environment `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// EnvironmentResource - App Service Environment ARM resource. -type EnvironmentResource struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *Environment `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// EnvironmentVar - Container App container environment variable. -type EnvironmentVar struct { - // Environment variable name. - Name *string `json:"name,omitempty"` - - // Name of the Container App secret from which to pull the environment variable value. - SecretRef *string `json:"secretRef,omitempty"` - - // Non-secret environment variable value. - Value *string `json:"value,omitempty"` -} - -// EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection -// method. -type EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginChangeVnetOptions contains the optional parameters for the EnvironmentsClient.BeginChangeVnet method. -type EnvironmentsClientBeginChangeVnetOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateMultiRolePool -// method. -type EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdate -// method. -type EnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateWorkerPool -// method. -type EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginDeleteOptions contains the optional parameters for the EnvironmentsClient.BeginDelete method. -type EnvironmentsClientBeginDeleteOptions struct { - // Specify true to force the deletion even if the App Service Environment contains resources. The default is false. - ForceDelete *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginDeletePrivateEndpointConnection -// method. -type EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginResumeOptions contains the optional parameters for the EnvironmentsClient.BeginResume method. -type EnvironmentsClientBeginResumeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginSuspendOptions contains the optional parameters for the EnvironmentsClient.BeginSuspend method. -type EnvironmentsClientBeginSuspendOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientGetAseV3NetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseV3NetworkingConfiguration -// method. -type EnvironmentsClientGetAseV3NetworkingConfigurationOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetDiagnosticsItemOptions contains the optional parameters for the EnvironmentsClient.GetDiagnosticsItem -// method. -type EnvironmentsClientGetDiagnosticsItemOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.GetInboundNetworkDependenciesEndpoints -// method. -type EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.GetMultiRolePool -// method. -type EnvironmentsClientGetMultiRolePoolOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. -type EnvironmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.GetOutboundNetworkDependenciesEndpoints -// method. -type EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the EnvironmentsClient.GetPrivateEndpointConnectionList -// method. -type EnvironmentsClientGetPrivateEndpointConnectionListOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.GetPrivateEndpointConnection -// method. -type EnvironmentsClientGetPrivateEndpointConnectionOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetPrivateLinkResourcesOptions contains the optional parameters for the EnvironmentsClient.GetPrivateLinkResources -// method. -type EnvironmentsClientGetPrivateLinkResourcesOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetVipInfoOptions contains the optional parameters for the EnvironmentsClient.GetVipInfo method. -type EnvironmentsClientGetVipInfoOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.GetWorkerPool method. -type EnvironmentsClientGetWorkerPoolOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListAppServicePlansOptions contains the optional parameters for the EnvironmentsClient.ListAppServicePlans -// method. -type EnvironmentsClientListAppServicePlansOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.ListByResourceGroup -// method. -type EnvironmentsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListCapacitiesOptions contains the optional parameters for the EnvironmentsClient.ListCapacities method. -type EnvironmentsClientListCapacitiesOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListDiagnosticsOptions contains the optional parameters for the EnvironmentsClient.ListDiagnostics method. -type EnvironmentsClientListDiagnosticsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListMultiRoleMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.ListMultiRoleMetricDefinitions -// method. -type EnvironmentsClientListMultiRoleMetricDefinitionsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.ListMultiRolePoolInstanceMetricDefinitions -// method. -type EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListMultiRolePoolSKUsOptions contains the optional parameters for the EnvironmentsClient.ListMultiRolePoolSKUs -// method. -type EnvironmentsClientListMultiRolePoolSKUsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListMultiRolePoolsOptions contains the optional parameters for the EnvironmentsClient.ListMultiRolePools -// method. -type EnvironmentsClientListMultiRolePoolsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListMultiRoleUsagesOptions contains the optional parameters for the EnvironmentsClient.ListMultiRoleUsages -// method. -type EnvironmentsClientListMultiRoleUsagesOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListOperationsOptions contains the optional parameters for the EnvironmentsClient.ListOperations method. -type EnvironmentsClientListOperationsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.List method. -type EnvironmentsClientListOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListUsagesOptions contains the optional parameters for the EnvironmentsClient.ListUsages method. -type EnvironmentsClientListUsagesOptions struct { - // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' - // or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and - // endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. - Filter *string -} - -// EnvironmentsClientListWebAppsOptions contains the optional parameters for the EnvironmentsClient.ListWebApps method. -type EnvironmentsClientListWebAppsOptions struct { - // Comma separated list of app properties to include. - PropertiesToInclude *string -} - -// EnvironmentsClientListWebWorkerMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.ListWebWorkerMetricDefinitions -// method. -type EnvironmentsClientListWebWorkerMetricDefinitionsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListWebWorkerUsagesOptions contains the optional parameters for the EnvironmentsClient.ListWebWorkerUsages -// method. -type EnvironmentsClientListWebWorkerUsagesOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.ListWorkerPoolInstanceMetricDefinitions -// method. -type EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListWorkerPoolSKUsOptions contains the optional parameters for the EnvironmentsClient.ListWorkerPoolSKUs -// method. -type EnvironmentsClientListWorkerPoolSKUsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListWorkerPoolsOptions contains the optional parameters for the EnvironmentsClient.ListWorkerPools method. -type EnvironmentsClientListWorkerPoolsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientRebootOptions contains the optional parameters for the EnvironmentsClient.Reboot method. -type EnvironmentsClientRebootOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientUpdateAseNetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseNetworkingConfiguration -// method. -type EnvironmentsClientUpdateAseNetworkingConfigurationOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.UpdateMultiRolePool -// method. -type EnvironmentsClientUpdateMultiRolePoolOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientUpdateOptions contains the optional parameters for the EnvironmentsClient.Update method. -type EnvironmentsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.UpdateWorkerPool -// method. -type EnvironmentsClientUpdateWorkerPoolOptions struct { - // placeholder for future optional parameters -} - -// ErrorEntity - Body of the error response returned from the API. -type ErrorEntity struct { - // Basic error code. - Code *string `json:"code,omitempty"` - - // Error Details. - Details []*ErrorEntity `json:"details,omitempty"` - - // Type of error. - ExtendedCode *string `json:"extendedCode,omitempty"` - - // Inner errors. - InnerErrors []*ErrorEntity `json:"innerErrors,omitempty"` - - // Any details of the error. - Message *string `json:"message,omitempty"` - - // Message template. - MessageTemplate *string `json:"messageTemplate,omitempty"` - - // Parameters for the template. - Parameters []*string `json:"parameters,omitempty"` - - // The error target. - Target *string `json:"target,omitempty"` -} - -// Experiments - Routing rules in production experiments. -type Experiments struct { - // List of ramp-up rules. - RampUpRules []*RampUpRule `json:"rampUpRules,omitempty"` -} - -// ExtendedLocation - Extended Location. -type ExtendedLocation struct { - // Name of extended location. - Name *string `json:"name,omitempty"` - - // READ-ONLY; Type of extended location. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// Facebook - The configuration settings of the Facebook provider. -type Facebook struct { - // false if the Facebook provider should not be enabled despite the set registration; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - - // The version of the Facebook api to be used while logging in. - GraphAPIVersion *string `json:"graphApiVersion,omitempty"` - - // The configuration settings of the login flow. - Login *LoginScopes `json:"login,omitempty"` - - // The configuration settings of the app registration for the Facebook provider. - Registration *AppRegistration `json:"registration,omitempty"` -} - -// FileSystemApplicationLogsConfig - Application logs to file system configuration. -type FileSystemApplicationLogsConfig struct { - // Log level. - Level *LogLevel `json:"level,omitempty"` -} - -// FileSystemHTTPLogsConfig - Http logs to file system configuration. -type FileSystemHTTPLogsConfig struct { - // True if configuration is enabled, false if it is disabled and null if configuration is not set. - Enabled *bool `json:"enabled,omitempty"` - - // Retention in days. Remove files older than X days. 0 or lower means no retention. - RetentionInDays *int32 `json:"retentionInDays,omitempty"` - - // Maximum size in megabytes that http log files can use. When reached old log files will be removed to make space for new - // ones. Value can range between 25 and 100. - RetentionInMb *int32 `json:"retentionInMb,omitempty"` -} - -// FileSystemTokenStore - The configuration settings of the storage of the tokens if a file system is used. -type FileSystemTokenStore struct { - // The directory in which the tokens will be stored. - Directory *string `json:"directory,omitempty"` -} - -// ForwardProxy - The configuration settings of a forward proxy used to make the requests. -type ForwardProxy struct { - // The convention used to determine the url of the request made. - Convention *ForwardProxyConvention `json:"convention,omitempty"` - - // The name of the header containing the host of the request. - CustomHostHeaderName *string `json:"customHostHeaderName,omitempty"` - - // The name of the header containing the scheme of the request. - CustomProtoHeaderName *string `json:"customProtoHeaderName,omitempty"` -} - -type FrontEndConfiguration struct { - Kind *FrontEndServiceType `json:"kind,omitempty"` -} - -// FunctionAppMajorVersion - Function App stack major version. -type FunctionAppMajorVersion struct { - // READ-ONLY; Function App stack major version (display only). - DisplayText *string `json:"displayText,omitempty" azure:"ro"` - - // READ-ONLY; Minor versions associated with the major version. - MinorVersions []*FunctionAppMinorVersion `json:"minorVersions,omitempty" azure:"ro"` - - // READ-ONLY; Function App stack major version name. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// FunctionAppMinorVersion - Function App stack minor version. -type FunctionAppMinorVersion struct { - // READ-ONLY; Function App stack (display only). - DisplayText *string `json:"displayText,omitempty" azure:"ro"` - - // READ-ONLY; Settings associated with the minor version. - StackSettings *FunctionAppRuntimes `json:"stackSettings,omitempty" azure:"ro"` - - // READ-ONLY; Function App stack name. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// FunctionAppRuntimeSettings - Function App runtime settings. -type FunctionAppRuntimeSettings struct { - // READ-ONLY; Application Insights settings associated with the minor version. - AppInsightsSettings *AppInsightsWebAppStackSettings `json:"appInsightsSettings,omitempty" azure:"ro"` - - // READ-ONLY; Application settings associated with the minor version. - AppSettingsDictionary map[string]*string `json:"appSettingsDictionary,omitempty" azure:"ro"` - - // READ-ONLY; End-of-life date for the minor version. - EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty" azure:"ro"` - - // READ-ONLY; GitHub Actions settings associated with the minor version. - GitHubActionSettings *GitHubActionWebAppStackSettings `json:"gitHubActionSettings,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack version is auto-updated; otherwise, false. - IsAutoUpdate *bool `json:"isAutoUpdate,omitempty" azure:"ro"` - - // READ-ONLY; true if the minor version the default; otherwise, false. - IsDefault *bool `json:"isDefault,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack is deprecated; otherwise, false. - IsDeprecated *bool `json:"isDeprecated,omitempty" azure:"ro"` - - // READ-ONLY; true if the minor version is early-access; otherwise, false. - IsEarlyAccess *bool `json:"isEarlyAccess,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack should be hidden; otherwise, false. - IsHidden *bool `json:"isHidden,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack is in preview; otherwise, false. - IsPreview *bool `json:"isPreview,omitempty" azure:"ro"` - - // READ-ONLY; true if remote debugging is supported for the stack; otherwise, false. - RemoteDebuggingSupported *bool `json:"remoteDebuggingSupported,omitempty" azure:"ro"` - - // READ-ONLY; Function App stack minor version (runtime only). - RuntimeVersion *string `json:"runtimeVersion,omitempty" azure:"ro"` - - // READ-ONLY; Configuration settings associated with the minor version. - SiteConfigPropertiesDictionary *SiteConfigPropertiesDictionary `json:"siteConfigPropertiesDictionary,omitempty" azure:"ro"` - - // READ-ONLY; List of supported Functions extension versions. - SupportedFunctionsExtensionVersions []*string `json:"supportedFunctionsExtensionVersions,omitempty" azure:"ro"` -} - -// FunctionAppRuntimes - Function App stack runtimes. -type FunctionAppRuntimes struct { - // READ-ONLY; Linux-specific settings associated with the minor version. - LinuxRuntimeSettings *FunctionAppRuntimeSettings `json:"linuxRuntimeSettings,omitempty" azure:"ro"` - - // READ-ONLY; Windows-specific settings associated with the minor version. - WindowsRuntimeSettings *FunctionAppRuntimeSettings `json:"windowsRuntimeSettings,omitempty" azure:"ro"` -} - -// FunctionAppStack - Function App Stack. -type FunctionAppStack struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // FunctionAppStack resource specific properties - Properties *FunctionAppStackProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Function App stack location. - Location *string `json:"location,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// FunctionAppStackCollection - Collection of Function app Stacks -type FunctionAppStackCollection struct { - // REQUIRED; Collection of resources. - Value []*FunctionAppStack `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// FunctionAppStackProperties - FunctionAppStack resource specific properties -type FunctionAppStackProperties struct { - // READ-ONLY; Function App stack (display only). - DisplayText *string `json:"displayText,omitempty" azure:"ro"` - - // READ-ONLY; List of major versions available. - MajorVersions []*FunctionAppMajorVersion `json:"majorVersions,omitempty" azure:"ro"` - - // READ-ONLY; Function App stack preferred OS. - PreferredOs *StackPreferredOs `json:"preferredOs,omitempty" azure:"ro"` - - // READ-ONLY; Function App stack name. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// FunctionEnvelope - Function information. -type FunctionEnvelope struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // FunctionEnvelope resource specific properties - Properties *FunctionEnvelopeProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// FunctionEnvelopeCollection - Collection of Kudu function information elements. -type FunctionEnvelopeCollection struct { - // REQUIRED; Collection of resources. - Value []*FunctionEnvelope `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// FunctionEnvelopeProperties - FunctionEnvelope resource specific properties -type FunctionEnvelopeProperties struct { - // Config information. - Config interface{} `json:"config,omitempty"` - - // Config URI. - ConfigHref *string `json:"config_href,omitempty"` - - // File list. - Files map[string]*string `json:"files,omitempty"` - - // Function App ID. - FunctionAppID *string `json:"function_app_id,omitempty"` - - // Function URI. - Href *string `json:"href,omitempty"` - - // The invocation URL - InvokeURLTemplate *string `json:"invoke_url_template,omitempty"` - - // Gets or sets a value indicating whether the function is disabled - IsDisabled *bool `json:"isDisabled,omitempty"` - - // The function language - Language *string `json:"language,omitempty"` - - // Script URI. - ScriptHref *string `json:"script_href,omitempty"` - - // Script root path URI. - ScriptRootPathHref *string `json:"script_root_path_href,omitempty"` - - // Secrets file URI. - SecretsFileHref *string `json:"secrets_file_href,omitempty"` - - // Test data used when testing via the Azure Portal. - TestData *string `json:"test_data,omitempty"` - - // Test data URI. - TestDataHref *string `json:"test_data_href,omitempty"` -} - -// FunctionSecrets - Function secrets. -type FunctionSecrets struct { - // Secret key. - Key *string `json:"key,omitempty"` - - // Trigger URL. - TriggerURL *string `json:"trigger_url,omitempty"` -} - -// GeoRegion - Geographical region. -type GeoRegion struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // GeoRegion resource specific properties - Properties *GeoRegionProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GeoRegionCollection - Collection of geographical regions. -type GeoRegionCollection struct { - // REQUIRED; Collection of resources. - Value []*GeoRegion `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// GeoRegionProperties - GeoRegion resource specific properties -type GeoRegionProperties struct { - // READ-ONLY; Region description. - Description *string `json:"description,omitempty" azure:"ro"` - - // READ-ONLY; Display name for region. - DisplayName *string `json:"displayName,omitempty" azure:"ro"` - - // READ-ONLY; Display name for region. - OrgDomain *string `json:"orgDomain,omitempty" azure:"ro"` -} - -// GitHub - The configuration settings of the GitHub provider. -type GitHub struct { - // false if the GitHub provider should not be enabled despite the set registration; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - - // The configuration settings of the login flow. - Login *LoginScopes `json:"login,omitempty"` - - // The configuration settings of the app registration for the GitHub provider. - Registration *ClientRegistration `json:"registration,omitempty"` -} - -// GitHubActionCodeConfiguration - The GitHub action code configuration. -type GitHubActionCodeConfiguration struct { - // Runtime stack is used to determine the workflow file content for code base apps. - RuntimeStack *string `json:"runtimeStack,omitempty"` - - // Runtime version is used to determine what build version to set in the workflow file. - RuntimeVersion *string `json:"runtimeVersion,omitempty"` -} - -// GitHubActionConfiguration - The GitHub action configuration. -type GitHubActionConfiguration struct { - // GitHub Action code configuration. - CodeConfiguration *GitHubActionCodeConfiguration `json:"codeConfiguration,omitempty"` - - // GitHub Action container configuration. - ContainerConfiguration *GitHubActionContainerConfiguration `json:"containerConfiguration,omitempty"` - - // Workflow option to determine whether the workflow file should be generated and written to the repository. - GenerateWorkflowFile *bool `json:"generateWorkflowFile,omitempty"` - - // This will help determine the workflow configuration to select. - IsLinux *bool `json:"isLinux,omitempty"` -} - -// GitHubActionContainerConfiguration - The GitHub action container configuration. -type GitHubActionContainerConfiguration struct { - // The image name for the build. - ImageName *string `json:"imageName,omitempty"` - - // The password used to upload the image to the container registry. - Password *string `json:"password,omitempty"` - - // The server URL for the container registry where the build will be hosted. - ServerURL *string `json:"serverUrl,omitempty"` - - // The username used to upload the image to the container registry. - Username *string `json:"username,omitempty"` -} - -// GitHubActionWebAppStackSettings - GitHub Actions Web App stack settings. -type GitHubActionWebAppStackSettings struct { - // READ-ONLY; true if GitHub Actions is supported for the stack; otherwise, false. - IsSupported *bool `json:"isSupported,omitempty" azure:"ro"` - - // READ-ONLY; The minor version that is supported for GitHub Actions. - SupportedVersion *string `json:"supportedVersion,omitempty" azure:"ro"` -} - -// GithubToken - Github access token for Appservice CLI github integration. -type GithubToken struct { - // Github access token for Appservice CLI github integration - AccessToken *string `json:"accessToken,omitempty"` - - // Error message if unable to get token - ErrorMessage *string `json:"errorMessage,omitempty"` - - // True if valid github token received, False otherwise - GotToken *bool `json:"gotToken,omitempty"` - - // Scope of the github access token - Scope *string `json:"scope,omitempty"` - - // token type - TokenType *string `json:"tokenType,omitempty"` -} - -// GithubTokenRequest - Appservice Github token request content. -type GithubTokenRequest struct { - // REQUIRED; Code string to exchange for Github Access token - Code *string `json:"code,omitempty"` - - // REQUIRED; State string used for verification. - State *string `json:"state,omitempty"` -} - -// GlobalClientGetDeletedWebAppOptions contains the optional parameters for the GlobalClient.GetDeletedWebApp method. -type GlobalClientGetDeletedWebAppOptions struct { - // placeholder for future optional parameters -} - -// GlobalClientGetDeletedWebAppSnapshotsOptions contains the optional parameters for the GlobalClient.GetDeletedWebAppSnapshots -// method. -type GlobalClientGetDeletedWebAppSnapshotsOptions struct { - // placeholder for future optional parameters -} - -// GlobalClientGetSubscriptionOperationWithAsyncResponseOptions contains the optional parameters for the GlobalClient.GetSubscriptionOperationWithAsyncResponse -// method. -type GlobalClientGetSubscriptionOperationWithAsyncResponseOptions struct { - // placeholder for future optional parameters -} - -// GlobalCsmSKUDescription - A Global SKU Description. -type GlobalCsmSKUDescription struct { - // Capabilities of the SKU, e.g., is traffic manager enabled? - Capabilities []*Capability `json:"capabilities,omitempty"` - - // Min, max, and default scale values of the SKU. - Capacity *SKUCapacity `json:"capacity,omitempty"` - - // Family code of the resource SKU. - Family *string `json:"family,omitempty"` - - // Locations of the SKU. - Locations []*string `json:"locations,omitempty"` - - // Name of the resource SKU. - Name *string `json:"name,omitempty"` - - // Size specifier of the resource SKU. - Size *string `json:"size,omitempty"` - - // Service Tier of the resource SKU. - Tier *string `json:"tier,omitempty"` -} - -// GlobalValidation - The configuration settings that determines the validation flow of users using App Service Authentication/Authorization. -type GlobalValidation struct { - // The paths for which unauthenticated flow would not be redirected to the login page. - ExcludedPaths []*string `json:"excludedPaths,omitempty"` - - // 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". - RedirectToProvider *string `json:"redirectToProvider,omitempty"` - - // true if the authentication flow is required any request is made; otherwise, false. - RequireAuthentication *bool `json:"requireAuthentication,omitempty"` - - // The action to take when an unauthenticated client attempts to access the app. - UnauthenticatedClientAction *UnauthenticatedClientActionV2 `json:"unauthenticatedClientAction,omitempty"` -} - -// Google - The configuration settings of the Google provider. -type Google struct { - // false if the Google provider should not be enabled despite the set registration; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - - // The configuration settings of the login flow. - Login *LoginScopes `json:"login,omitempty"` - - // The configuration settings of the app registration for the Google provider. - Registration *ClientRegistration `json:"registration,omitempty"` - - // The configuration settings of the Azure Active Directory token validation flow. - Validation *AllowedAudiencesValidation `json:"validation,omitempty"` -} - -// HTTPLogsConfig - Http logs configuration. -type HTTPLogsConfig struct { - // Http logs to azure blob storage configuration. - AzureBlobStorage *AzureBlobStorageHTTPLogsConfig `json:"azureBlobStorage,omitempty"` - - // Http logs to file system configuration. - FileSystem *FileSystemHTTPLogsConfig `json:"fileSystem,omitempty"` -} - -// HTTPScaleRule - Container App container Custom scaling rule. -type HTTPScaleRule struct { - // Authentication secrets for the custom scale rule. - Auth []*ScaleRuleAuth `json:"auth,omitempty"` - - // Metadata properties to describe http scale rule. - Metadata map[string]*string `json:"metadata,omitempty"` -} - -// HTTPSettings - The configuration settings of the HTTP requests for authentication and authorization requests made against -// App Service Authentication/Authorization. -type HTTPSettings struct { - // The configuration settings of a forward proxy used to make the requests. - ForwardProxy *ForwardProxy `json:"forwardProxy,omitempty"` - - // false if the authentication/authorization responses not having the HTTPS scheme are permissible; otherwise, true. - RequireHTTPS *bool `json:"requireHttps,omitempty"` - - // The configuration settings of the paths HTTP requests. - Routes *HTTPSettingsRoutes `json:"routes,omitempty"` -} - -// HTTPSettingsRoutes - The configuration settings of the paths HTTP requests. -type HTTPSettingsRoutes struct { - // 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 -// extension. -type HandlerMapping struct { - // Command-line arguments to be passed to the script processor. - Arguments *string `json:"arguments,omitempty"` - - // Requests with this extension will be handled using the specified FastCGI application. - Extension *string `json:"extension,omitempty"` - - // The absolute path to the FastCGI application. - ScriptProcessor *string `json:"scriptProcessor,omitempty"` -} - -// HostKeys - Functions host level keys. -type HostKeys struct { - // Host level function keys. - FunctionKeys map[string]*string `json:"functionKeys,omitempty"` - - // Secret key. - MasterKey *string `json:"masterKey,omitempty"` - - // System keys. - SystemKeys map[string]*string `json:"systemKeys,omitempty"` -} - -// HostName - Details of a hostname derived from a domain. -type HostName struct { - // Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic - // Manager name otherwise it will be the app name. - AzureResourceName *string `json:"azureResourceName,omitempty"` - - // Type of the Azure resource the hostname is assigned to. - AzureResourceType *AzureResourceType `json:"azureResourceType,omitempty"` - - // Type of the DNS record. - CustomHostNameDNSRecordType *CustomHostNameDNSRecordType `json:"customHostNameDnsRecordType,omitempty"` - - // Type of the hostname. - HostNameType *HostNameType `json:"hostNameType,omitempty"` - - // Name of the hostname. - Name *string `json:"name,omitempty"` - - // List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic - // Manager. - SiteNames []*string `json:"siteNames,omitempty"` -} - -// HostNameBinding - A hostname binding object. -type HostNameBinding struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // HostNameBinding resource specific properties - Properties *HostNameBindingProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// HostNameBindingCollection - Collection of hostname bindings. -type HostNameBindingCollection struct { - // REQUIRED; Collection of resources. - Value []*HostNameBinding `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// HostNameBindingProperties - HostNameBinding resource specific properties -type HostNameBindingProperties struct { - // Azure resource name. - AzureResourceName *string `json:"azureResourceName,omitempty"` - - // Azure resource type. - AzureResourceType *AzureResourceType `json:"azureResourceType,omitempty"` - - // Custom DNS record type. - CustomHostNameDNSRecordType *CustomHostNameDNSRecordType `json:"customHostNameDnsRecordType,omitempty"` - - // Fully qualified ARM domain resource URI. - DomainID *string `json:"domainId,omitempty"` - - // Hostname type. - HostNameType *HostNameType `json:"hostNameType,omitempty"` - - // SSL type - SSLState *SSLState `json:"sslState,omitempty"` - - // App Service app name. - SiteName *string `json:"siteName,omitempty"` - - // SSL certificate thumbprint - Thumbprint *string `json:"thumbprint,omitempty"` - - // READ-ONLY; Virtual IP address assigned to the hostname if IP based SSL is enabled. - VirtualIP *string `json:"virtualIP,omitempty" azure:"ro"` -} - -// HostNameSSLState - SSL-enabled hostname. -type HostNameSSLState struct { - // Indicates whether the hostname is a standard or repository hostname. - HostType *HostType `json:"hostType,omitempty"` - - // Hostname. - Name *string `json:"name,omitempty"` - - // SSL type. - SSLState *SSLState `json:"sslState,omitempty"` - - // SSL certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` - - // Set to true to update existing hostname. - ToUpdate *bool `json:"toUpdate,omitempty"` - - // Virtual IP address assigned to the hostname if IP based SSL is enabled. - VirtualIP *string `json:"virtualIP,omitempty"` -} - -// HostingEnvironmentDeploymentInfo - Information needed to create resources on an App Service Environment. -type HostingEnvironmentDeploymentInfo struct { - // Location of the App Service Environment. - Location *string `json:"location,omitempty"` - - // Name of the App Service Environment. - Name *string `json:"name,omitempty"` -} - -// HostingEnvironmentDiagnostics - Diagnostics for an App Service Environment. -type HostingEnvironmentDiagnostics struct { - // Diagnostics output. - DiagnosticsOutput *string `json:"diagnosticsOutput,omitempty"` - - // Name/identifier of the diagnostics. - Name *string `json:"name,omitempty"` -} - -// HostingEnvironmentProfile - Specification for an App Service Environment to use for this resource. -type HostingEnvironmentProfile struct { - // Resource ID of the App Service Environment. - ID *string `json:"id,omitempty"` - - // READ-ONLY; Name of the App Service Environment. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type of the App Service Environment. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// HybridConnection - Hybrid Connection contract. This is used to configure a Hybrid Connection. -type HybridConnection struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // HybridConnection resource specific properties - Properties *HybridConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// HybridConnectionCollection - Collection of hostname bindings. -type HybridConnectionCollection struct { - // REQUIRED; Collection of resources. - Value []*HybridConnection `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// HybridConnectionKey - Hybrid Connection key contract. This has the send key name and value for a Hybrid Connection. -type HybridConnectionKey struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // HybridConnectionKey resource specific properties - Properties *HybridConnectionKeyProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// HybridConnectionKeyProperties - HybridConnectionKey resource specific properties -type HybridConnectionKeyProperties struct { - // READ-ONLY; The name of the send key. - SendKeyName *string `json:"sendKeyName,omitempty" azure:"ro"` - - // READ-ONLY; The value of the send key. - SendKeyValue *string `json:"sendKeyValue,omitempty" azure:"ro"` -} - -// HybridConnectionLimits - Hybrid Connection limits contract. This is used to return the plan limits of Hybrid Connections. -type HybridConnectionLimits struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // HybridConnectionLimits resource specific properties - Properties *HybridConnectionLimitsProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// HybridConnectionLimitsProperties - HybridConnectionLimits resource specific properties -type HybridConnectionLimitsProperties struct { - // READ-ONLY; The current number of Hybrid Connections. - Current *int32 `json:"current,omitempty" azure:"ro"` - - // READ-ONLY; The maximum number of Hybrid Connections allowed. - Maximum *int32 `json:"maximum,omitempty" azure:"ro"` -} - -// HybridConnectionProperties - HybridConnection resource specific properties -type HybridConnectionProperties struct { - // The hostname of the endpoint. - Hostname *string `json:"hostname,omitempty"` - - // The port of the endpoint. - Port *int32 `json:"port,omitempty"` - - // The ARM URI to the Service Bus relay. - RelayArmURI *string `json:"relayArmUri,omitempty"` - - // The name of the Service Bus relay. - RelayName *string `json:"relayName,omitempty"` - - // The name of the Service Bus key which has Send permissions. This is used to authenticate to Service Bus. - SendKeyName *string `json:"sendKeyName,omitempty"` - - // The value of the Service Bus key. This is used to authenticate to Service Bus. In ARM this key will not be returned normally, - // use the POST /listKeys API instead. - SendKeyValue *string `json:"sendKeyValue,omitempty"` - - // The name of the Service Bus namespace. - ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` - - // The suffix for the service bus endpoint. By default this is .servicebus.windows.net - ServiceBusSuffix *string `json:"serviceBusSuffix,omitempty"` -} - -// IPSecurityRestriction - IP security restriction on an app. -type IPSecurityRestriction struct { - // Allow or Deny access for this IP range. - Action *string `json:"action,omitempty"` - - // IP restriction rule description. - Description *string `json:"description,omitempty"` - - // 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,omitempty"` - - // 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"` - - // IP restriction rule name. - Name *string `json:"name,omitempty"` - - // Priority of IP restriction rule. - Priority *int32 `json:"priority,omitempty"` - - // Subnet mask for the range of IP addresses the restriction is valid for. - SubnetMask *string `json:"subnetMask,omitempty"` - - // (internal) Subnet traffic tag - SubnetTrafficTag *int32 `json:"subnetTrafficTag,omitempty"` - - // Defines what this IP filter will be used for. This is to support IP filtering on proxies. - Tag *IPFilterTag `json:"tag,omitempty"` - - // Virtual network resource id - VnetSubnetResourceID *string `json:"vnetSubnetResourceId,omitempty"` - - // (internal) Vnet traffic tag - VnetTrafficTag *int32 `json:"vnetTrafficTag,omitempty"` -} - -// Identifier - A domain specific resource identifier. -type Identifier struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Identifier resource specific properties - Properties *IdentifierProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// IdentifierCollection - Collection of identifiers. -type IdentifierCollection struct { - // REQUIRED; Collection of resources. - Value []*Identifier `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// IdentifierProperties - Identifier resource specific properties -type IdentifierProperties struct { - // String representation of the identity. - Value *string `json:"id,omitempty"` -} - -// IdentityProviders - The configuration settings of each of the identity providers used to configure App Service Authentication/Authorization. -type IdentityProviders struct { - // The configuration settings of the Apple provider. - Apple *Apple `json:"apple,omitempty"` - - // The configuration settings of the Azure Active directory provider. - AzureActiveDirectory *AzureActiveDirectory `json:"azureActiveDirectory,omitempty"` - - // The configuration settings of the Azure Static Web Apps provider. - AzureStaticWebApps *AzureStaticWebApps `json:"azureStaticWebApps,omitempty"` - - // The map of the name of the alias of each custom Open ID Connect provider to the configuration settings of the custom Open - // ID Connect provider. - CustomOpenIDConnectProviders map[string]*CustomOpenIDConnectProvider `json:"customOpenIdConnectProviders,omitempty"` - - // The configuration settings of the Facebook provider. - Facebook *Facebook `json:"facebook,omitempty"` - - // The configuration settings of the GitHub provider. - GitHub *GitHub `json:"gitHub,omitempty"` - - // The configuration settings of the Google provider. - Google *Google `json:"google,omitempty"` - - // The configuration settings of the legacy Microsoft Account provider. - LegacyMicrosoftAccount *LegacyMicrosoftAccount `json:"legacyMicrosoftAccount,omitempty"` - - // The configuration settings of the Twitter provider. - Twitter *Twitter `json:"twitter,omitempty"` -} - -// InboundEnvironmentEndpoint - The IP Addresses and Ports that require inbound network access to and within the subnet of -// the App Service Environment. -type InboundEnvironmentEndpoint struct { - // Short text describing the purpose of the network traffic. - Description *string `json:"description,omitempty"` - - // The IP addresses that network traffic will originate from in cidr notation. - Endpoints []*string `json:"endpoints,omitempty"` - - // The ports that network traffic will arrive to the App Service Environment at. - Ports []*string `json:"ports,omitempty"` -} - -// InboundEnvironmentEndpointCollection - Collection of Inbound Environment Endpoints -type InboundEnvironmentEndpointCollection struct { - // REQUIRED; Collection of resources. - Value []*InboundEnvironmentEndpoint `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// Ingress - Container App Ingress configuration. -type Ingress struct { - // Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS - // connections - AllowInsecure *bool `json:"allowInsecure,omitempty"` - - // Bool indicating if app exposes an external http endpoint - External *bool `json:"external,omitempty"` - - // Target Port in containers for traffic from ingress - TargetPort *int32 `json:"targetPort,omitempty"` - Traffic []*TrafficWeight `json:"traffic,omitempty"` - - // Ingress transport protocol - Transport *IngressTransportMethod `json:"transport,omitempty"` - - // READ-ONLY; Hostname. - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` -} - -// JwtClaimChecks - The configuration settings of the checks that should be made while validating the JWT Claims. -type JwtClaimChecks struct { - // The list of the allowed client applications. - AllowedClientApplications []*string `json:"allowedClientApplications,omitempty"` - - // The list of the allowed groups. - AllowedGroups []*string `json:"allowedGroups,omitempty"` -} - -// KeyInfo - Function key info. -type KeyInfo struct { - // Key name - Name *string `json:"name,omitempty"` - - // Key value - Value *string `json:"value,omitempty"` -} - -type KeyValuePairStringObject struct { - // READ-ONLY - Key *string `json:"key,omitempty" azure:"ro"` - - // READ-ONLY; Anything - Value interface{} `json:"value,omitempty" azure:"ro"` -} - -// KubeEnvironment - A Kubernetes cluster specialized for web workloads by Azure App Service -type KubeEnvironment struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Extended Location. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // KubeEnvironment resource specific properties - Properties *KubeEnvironmentProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// KubeEnvironmentCollection - Collection of Kubernetes Environments -type KubeEnvironmentCollection struct { - // REQUIRED; Collection of resources. - Value []*KubeEnvironment `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// KubeEnvironmentPatchResource - ARM resource for a KubeEnvironment when patching -type KubeEnvironmentPatchResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // KubeEnvironmentPatchResource resource specific properties - Properties *KubeEnvironmentPatchResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// KubeEnvironmentPatchResourceProperties - KubeEnvironmentPatchResource resource specific properties -type KubeEnvironmentPatchResourceProperties struct { - AksResourceID *string `json:"aksResourceID,omitempty"` - - // Cluster configuration which enables the log daemon to export app logs to a destination. Currently only "log-analytics" - // is supported - AppLogsConfiguration *AppLogsConfiguration `json:"appLogsConfiguration,omitempty"` - - // Cluster configuration which determines the ARC cluster components types. Eg: Choosing between BuildService kind, FrontEnd - // Service ArtifactsStorageType etc. - ArcConfiguration *ArcConfiguration `json:"arcConfiguration,omitempty"` - - // Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration - ContainerAppsConfiguration *ContainerAppsConfiguration `json:"containerAppsConfiguration,omitempty"` - - // Only visible within Vnet/Subnet - InternalLoadBalancerEnabled *bool `json:"internalLoadBalancerEnabled,omitempty"` - - // Static IP of the KubeEnvironment - StaticIP *string `json:"staticIp,omitempty"` - - // READ-ONLY; Default Domain Name for the cluster - DefaultDomain *string `json:"defaultDomain,omitempty" azure:"ro"` - - // READ-ONLY; Any errors that occurred during deployment or deployment validation - DeploymentErrors *string `json:"deploymentErrors,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Kubernetes Environment. - ProvisioningState *KubeEnvironmentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// KubeEnvironmentProfile - Specification for a Kubernetes Environment to use for this resource. -type KubeEnvironmentProfile struct { - // Resource ID of the Kubernetes Environment. - ID *string `json:"id,omitempty"` - - // READ-ONLY; Name of the Kubernetes Environment. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type of the Kubernetes Environment. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// KubeEnvironmentProperties - KubeEnvironment resource specific properties -type KubeEnvironmentProperties struct { - AksResourceID *string `json:"aksResourceID,omitempty"` - - // Cluster configuration which enables the log daemon to export app logs to a destination. Currently only "log-analytics" - // is supported - AppLogsConfiguration *AppLogsConfiguration `json:"appLogsConfiguration,omitempty"` - - // Cluster configuration which determines the ARC cluster components types. Eg: Choosing between BuildService kind, FrontEnd - // Service ArtifactsStorageType etc. - ArcConfiguration *ArcConfiguration `json:"arcConfiguration,omitempty"` - - // Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration - ContainerAppsConfiguration *ContainerAppsConfiguration `json:"containerAppsConfiguration,omitempty"` - - // Type of Kubernetes Environment. Only supported for Container App Environments with value as Managed - EnvironmentType *string `json:"environmentType,omitempty"` - - // Only visible within Vnet/Subnet - InternalLoadBalancerEnabled *bool `json:"internalLoadBalancerEnabled,omitempty"` - - // Static IP of the KubeEnvironment - StaticIP *string `json:"staticIp,omitempty"` - - // READ-ONLY; Default Domain Name for the cluster - DefaultDomain *string `json:"defaultDomain,omitempty" azure:"ro"` - - // READ-ONLY; Any errors that occurred during deployment or deployment validation - DeploymentErrors *string `json:"deploymentErrors,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the Kubernetes Environment. - ProvisioningState *KubeEnvironmentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// KubeEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.BeginCreateOrUpdate -// method. -type KubeEnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KubeEnvironmentsClientBeginDeleteOptions contains the optional parameters for the KubeEnvironmentsClient.BeginDelete method. -type KubeEnvironmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KubeEnvironmentsClientGetOptions contains the optional parameters for the KubeEnvironmentsClient.Get method. -type KubeEnvironmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// KubeEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the KubeEnvironmentsClient.ListByResourceGroup -// method. -type KubeEnvironmentsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// KubeEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the KubeEnvironmentsClient.ListBySubscription -// method. -type KubeEnvironmentsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// KubeEnvironmentsClientUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.Update method. -type KubeEnvironmentsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// LegacyMicrosoftAccount - The configuration settings of the legacy Microsoft Account provider. -type LegacyMicrosoftAccount struct { - // false if the legacy Microsoft Account provider should not be enabled despite the set registration; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - - // The configuration settings of the login flow. - Login *LoginScopes `json:"login,omitempty"` - - // The configuration settings of the app registration for the legacy Microsoft Account provider. - Registration *ClientRegistration `json:"registration,omitempty"` - - // The configuration settings of the legacy Microsoft Account provider token validation flow. - Validation *AllowedAudiencesValidation `json:"validation,omitempty"` -} - -// LinuxJavaContainerSettings - Linux Java Container settings. -type LinuxJavaContainerSettings struct { - // READ-ONLY; End-of-life date for the minor version. - EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack version is auto-updated; otherwise, false. - IsAutoUpdate *bool `json:"isAutoUpdate,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack is deprecated; otherwise, false. - IsDeprecated *bool `json:"isDeprecated,omitempty" azure:"ro"` - - // READ-ONLY; true if the minor version is early-access; otherwise, false. - IsEarlyAccess *bool `json:"isEarlyAccess,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack should be hidden; otherwise, false. - IsHidden *bool `json:"isHidden,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack is in preview; otherwise, false. - IsPreview *bool `json:"isPreview,omitempty" azure:"ro"` - - // READ-ONLY; Java 11 version (runtime only). - Java11Runtime *string `json:"java11Runtime,omitempty" azure:"ro"` - - // READ-ONLY; Java 8 version (runtime only). - Java8Runtime *string `json:"java8Runtime,omitempty" azure:"ro"` -} - -// LocalizableString - Localizable string object containing the name and a localized value. -type LocalizableString struct { - // Localized name. - LocalizedValue *string `json:"localizedValue,omitempty"` - - // Non-localized name. - Value *string `json:"value,omitempty"` -} - -type LogAnalyticsConfiguration struct { - CustomerID *string `json:"customerId,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` -} - -// LogSpecification - Log Definition of a single resource metric. -type LogSpecification struct { - BlobDuration *string `json:"blobDuration,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - LogFilterPattern *string `json:"logFilterPattern,omitempty"` - Name *string `json:"name,omitempty"` -} - -// Login - The configuration settings of the login flow of users using App Service Authentication/Authorization. -type Login struct { - // 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"` - - // The configuration settings of the session cookie's expiration. - CookieExpiration *CookieExpiration `json:"cookieExpiration,omitempty"` - - // The configuration settings of the nonce used in the login flow. - Nonce *Nonce `json:"nonce,omitempty"` - - // true if the fragments from the request are preserved after the login request is made; otherwise, false. - PreserveURLFragmentsForLogins *bool `json:"preserveUrlFragmentsForLogins,omitempty"` - - // The routes that specify the endpoints used for login and logout requests. - Routes *LoginRoutes `json:"routes,omitempty"` - - // The configuration settings of the token store. - TokenStore *TokenStore `json:"tokenStore,omitempty"` -} - -// LoginRoutes - The routes that specify the endpoints used for login and logout requests. -type LoginRoutes struct { - // The endpoint at which a logout request should be made. - LogoutEndpoint *string `json:"logoutEndpoint,omitempty"` -} - -// LoginScopes - The configuration settings of the login flow, including the scopes that should be requested. -type LoginScopes struct { - // A list of the scopes that should be requested while authenticating. - Scopes []*string `json:"scopes,omitempty"` -} - -// MSDeploy ARM PUT information -type MSDeploy struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *MSDeployCore `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MSDeployCore - MSDeploy ARM PUT core information -type MSDeployCore struct { - // Sets the AppOffline rule while the MSDeploy operation executes. Setting is false by default. - AppOffline *bool `json:"appOffline,omitempty"` - - // SQL Connection String - ConnectionString *string `json:"connectionString,omitempty"` - - // Database Type - DbType *string `json:"dbType,omitempty"` - - // Package URI - PackageURI *string `json:"packageUri,omitempty"` - - // MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. - SetParameters map[string]*string `json:"setParameters,omitempty"` - - // URI of MSDeploy Parameters file. Must not be set if SetParameters is used. - SetParametersXMLFileURI *string `json:"setParametersXmlFileUri,omitempty"` - - // Controls whether the MSDeploy operation skips the AppData directory. If set to true, the existing AppData directory on - // the destination will not be deleted, and any App_Data directory in the source - // will be ignored. Setting is false by default. - SkipAppData *bool `json:"skipAppData,omitempty"` -} - -// MSDeployLog - MSDeploy log -type MSDeployLog struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // MSDeployLog resource specific properties - Properties *MSDeployLogProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MSDeployLogEntry - MSDeploy log entry -type MSDeployLogEntry struct { - // READ-ONLY; Log entry message - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; Timestamp of log entry - Time *time.Time `json:"time,omitempty" azure:"ro"` - - // READ-ONLY; Log entry type - Type *MSDeployLogEntryType `json:"type,omitempty" azure:"ro"` -} - -// MSDeployLogProperties - MSDeployLog resource specific properties -type MSDeployLogProperties struct { - // READ-ONLY; List of log entry messages - Entries []*MSDeployLogEntry `json:"entries,omitempty" azure:"ro"` -} - -// MSDeployStatus - MSDeploy ARM response -type MSDeployStatus struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // MSDeployStatus resource specific properties - Properties *MSDeployStatusProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MSDeployStatusProperties - MSDeployStatus resource specific properties -type MSDeployStatusProperties struct { - // READ-ONLY; Whether the deployment operation has completed - Complete *bool `json:"complete,omitempty" azure:"ro"` - - // READ-ONLY; Username of deployer - Deployer *string `json:"deployer,omitempty" azure:"ro"` - - // READ-ONLY; End time of deploy operation - EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state - ProvisioningState *MSDeployProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Start time of deploy operation - StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` -} - -// ManagedServiceIdentity - Managed service identity. -type ManagedServiceIdentity struct { - // Type of managed service identity. - Type *ManagedServiceIdentityType `json:"type,omitempty"` - - // 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,omitempty"` - - // READ-ONLY; Principal Id of managed service identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` - - // READ-ONLY; Tenant of managed service identity. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// MetricAvailability - Retention policy of a resource metric. -type MetricAvailability struct { - BlobDuration *string `json:"blobDuration,omitempty"` - TimeGrain *string `json:"timeGrain,omitempty"` -} - -// MetricSpecification - Definition of a single resource metric. -type MetricSpecification struct { - AggregationType *string `json:"aggregationType,omitempty"` - Availabilities []*MetricAvailability `json:"availabilities,omitempty"` - Category *string `json:"category,omitempty"` - Dimensions []*Dimension `json:"dimensions,omitempty"` - DisplayDescription *string `json:"displayDescription,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` - IsInternal *bool `json:"isInternal,omitempty"` - MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` - Name *string `json:"name,omitempty"` - SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` - SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` - SupportedAggregationTypes []*string `json:"supportedAggregationTypes,omitempty"` - SupportedTimeGrainTypes []*string `json:"supportedTimeGrainTypes,omitempty"` - SupportsInstanceLevelAggregation *bool `json:"supportsInstanceLevelAggregation,omitempty"` - Unit *string `json:"unit,omitempty"` -} - -// MigrateMySQLRequest - MySQL migration request. -type MigrateMySQLRequest struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // MigrateMySqlRequest resource specific properties - Properties *MigrateMySQLRequestProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MigrateMySQLRequestProperties - MigrateMySqlRequest resource specific properties -type MigrateMySQLRequestProperties struct { - // REQUIRED; Connection string to the remote MySQL database. - ConnectionString *string `json:"connectionString,omitempty"` - - // REQUIRED; The type of migration operation to be done - MigrationType *MySQLMigrationType `json:"migrationType,omitempty"` -} - -// MigrateMySQLStatus - MySQL migration status. -type MigrateMySQLStatus struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // MigrateMySqlStatus resource specific properties - Properties *MigrateMySQLStatusProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MigrateMySQLStatusProperties - MigrateMySqlStatus resource specific properties -type MigrateMySQLStatusProperties struct { - // READ-ONLY; True if the web app has in app MySql enabled - LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty" azure:"ro"` - - // READ-ONLY; Status of the migration task. - MigrationOperationStatus *OperationStatus `json:"migrationOperationStatus,omitempty" azure:"ro"` - - // READ-ONLY; Operation ID for the migration task. - OperationID *string `json:"operationId,omitempty" azure:"ro"` -} - -// NameIdentifier - Identifies an object. -type NameIdentifier struct { - // Name of the object. - Name *string `json:"name,omitempty"` -} - -// NameIdentifierCollection - Collection of domain name identifiers. -type NameIdentifierCollection struct { - // REQUIRED; Collection of resources. - Value []*NameIdentifier `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// NameValuePair - Name value pair. -type NameValuePair struct { - // Pair name. - Name *string `json:"name,omitempty"` - - // Pair value. - Value *string `json:"value,omitempty"` -} - -// NetworkFeatures - Full view of network features for an app (presently VNET integration and Hybrid Connections). -type NetworkFeatures struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // NetworkFeatures resource specific properties - Properties *NetworkFeaturesProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// NetworkFeaturesProperties - NetworkFeatures resource specific properties -type NetworkFeaturesProperties struct { - // READ-ONLY; The Hybrid Connections summary view. - HybridConnections []*RelayServiceConnectionEntity `json:"hybridConnections,omitempty" azure:"ro"` - - // READ-ONLY; The Hybrid Connection V2 (Service Bus) view. - HybridConnectionsV2 []*HybridConnection `json:"hybridConnectionsV2,omitempty" azure:"ro"` - - // READ-ONLY; The Virtual Network summary view. - VirtualNetworkConnection *VnetInfo `json:"virtualNetworkConnection,omitempty" azure:"ro"` - - // READ-ONLY; The Virtual Network name. - VirtualNetworkName *string `json:"virtualNetworkName,omitempty" azure:"ro"` -} - -// NetworkTrace - Network trace -type NetworkTrace struct { - // Detailed message of a network trace operation, e.g. error message in case of failure. - Message *string `json:"message,omitempty"` - - // Local file path for the captured network trace file. - Path *string `json:"path,omitempty"` - - // Current status of the network trace operation, same as Operation.Status (InProgress/Succeeded/Failed). - Status *string `json:"status,omitempty"` -} - -// Nonce - The configuration settings of the nonce used in the login flow. -type Nonce struct { - // The time after the request is made when the nonce should expire. - NonceExpirationInterval *string `json:"nonceExpirationInterval,omitempty"` - - // false if the nonce should not be validated while completing the login flow; otherwise, true. - ValidateNonce *bool `json:"validateNonce,omitempty"` -} - -// OpenIDConnectClientCredential - The authentication client credentials of the custom Open ID Connect provider. -type OpenIDConnectClientCredential struct { - // The app setting that contains the client secret for the custom Open ID Connect provider. - ClientSecretSettingName *string `json:"clientSecretSettingName,omitempty"` - - // The method that should be used to authenticate the user. - Method *string `json:"method,omitempty"` -} - -// OpenIDConnectConfig - The configuration settings of the endpoints used for the custom Open ID Connect provider. -type OpenIDConnectConfig struct { - // The endpoint to be used to make an authorization request. - AuthorizationEndpoint *string `json:"authorizationEndpoint,omitempty"` - - // The endpoint that provides the keys necessary to validate the token. - CertificationURI *string `json:"certificationUri,omitempty"` - - // The endpoint that issues the token. - Issuer *string `json:"issuer,omitempty"` - - // The endpoint to be used to request a token. - TokenEndpoint *string `json:"tokenEndpoint,omitempty"` - - // The endpoint that contains all the configuration endpoints for the provider. - WellKnownOpenIDConfiguration *string `json:"wellKnownOpenIdConfiguration,omitempty"` -} - -// OpenIDConnectLogin - The configuration settings of the login flow of the custom Open ID Connect provider. -type OpenIDConnectLogin struct { - // The name of the claim that contains the users name. - NameClaimType *string `json:"nameClaimType,omitempty"` - - // A list of the scopes that should be requested while authenticating. - Scopes []*string `json:"scopes,omitempty"` -} - -// OpenIDConnectRegistration - The configuration settings of the app registration for the custom Open ID Connect provider. -type OpenIDConnectRegistration struct { - // The authentication credentials of the custom Open ID Connect provider. - ClientCredential *OpenIDConnectClientCredential `json:"clientCredential,omitempty"` - - // The client id of the custom Open ID Connect provider. - ClientID *string `json:"clientId,omitempty"` - - // The configuration settings of the endpoints used for the custom Open ID Connect provider. - OpenIDConnectConfiguration *OpenIDConnectConfig `json:"openIdConnectConfiguration,omitempty"` -} - -// Operation - An operation on a resource. -type Operation struct { - // Time when operation has started. - CreatedTime *time.Time `json:"createdTime,omitempty"` - - // Any errors associate with the operation. - Errors []*ErrorEntity `json:"errors,omitempty"` - - // Time when operation will expire. - ExpirationTime *time.Time `json:"expirationTime,omitempty"` - - // Applicable only for stamp operation ids. - GeoMasterOperationID *string `json:"geoMasterOperationId,omitempty"` - - // Operation ID. - ID *string `json:"id,omitempty"` - - // Time when operation has been updated. - ModifiedTime *time.Time `json:"modifiedTime,omitempty"` - - // Operation name. - Name *string `json:"name,omitempty"` - - // The current status of the operation. - Status *OperationStatus `json:"status,omitempty"` -} - -// OutboundEnvironmentEndpoint - Endpoints accessed for a common purpose that the App Service Environment requires outbound -// network access to. -type OutboundEnvironmentEndpoint struct { - // The type of service accessed by the App Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active - // Directory. - Category *string `json:"category,omitempty"` - - // The endpoints that the App Service Environment reaches the service at. - Endpoints []*EndpointDependency `json:"endpoints,omitempty"` -} - -// OutboundEnvironmentEndpointCollection - Collection of Outbound Environment Endpoints -type OutboundEnvironmentEndpointCollection struct { - // REQUIRED; Collection of resources. - Value []*OutboundEnvironmentEndpoint `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PerfMonCounterCollection - Collection of performance monitor counters. -type PerfMonCounterCollection struct { - // REQUIRED; Collection of resources. - Value []*PerfMonResponse `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PerfMonResponse - Performance monitor API response. -type PerfMonResponse struct { - // The response code. - Code *string `json:"code,omitempty"` - - // The performance monitor counters. - Data *PerfMonSet `json:"data,omitempty"` - - // The message. - Message *string `json:"message,omitempty"` -} - -// PerfMonSample - Performance monitor sample in a set. -type PerfMonSample struct { - // Name of the server on which the measurement is made. - InstanceName *string `json:"instanceName,omitempty"` - - // Point in time for which counter was measured. - Time *time.Time `json:"time,omitempty"` - - // Value of counter at a certain time. - Value *float64 `json:"value,omitempty"` -} - -// PerfMonSet - Metric information. -type PerfMonSet struct { - // End time of the period. - EndTime *time.Time `json:"endTime,omitempty"` - - // Unique key name of the counter. - Name *string `json:"name,omitempty"` - - // Start time of the period. - StartTime *time.Time `json:"startTime,omitempty"` - - // Presented time grain. - TimeGrain *string `json:"timeGrain,omitempty"` - - // Collection of workers that are active during this time. - Values []*PerfMonSample `json:"values,omitempty"` -} - -// Plan - App Service plan. -type Plan struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Extended Location. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // AppServicePlan resource specific properties - Properties *PlanProperties `json:"properties,omitempty"` - - // Description of a SKU for a scalable resource. - SKU *SKUDescription `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PlanCollection - Collection of App Service plans. -type PlanCollection struct { - // REQUIRED; Collection of resources. - Value []*Plan `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PlanPatchResource - ARM resource for a app service plan. -type PlanPatchResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // AppServicePlanPatchResource resource specific properties - Properties *PlanPatchResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PlanPatchResourceProperties - AppServicePlanPatchResource resource specific properties -type PlanPatchResourceProperties struct { - // ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku - ElasticScaleEnabled *bool `json:"elasticScaleEnabled,omitempty"` - - // The time when the server farm free offer expires. - FreeOfferExpirationTime *time.Time `json:"freeOfferExpirationTime,omitempty"` - - // Specification for the App Service Environment to use for the App Service plan. - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - - // If Hyper-V container app service plan true, false otherwise. - HyperV *bool `json:"hyperV,omitempty"` - - // If true, this App Service Plan owns spot instances. - IsSpot *bool `json:"isSpot,omitempty"` - - // Obsolete: If Hyper-V container app service plan true, false otherwise. - IsXenon *bool `json:"isXenon,omitempty"` - - // Specification for the Kubernetes Environment to use for the App Service plan. - KubeEnvironmentProfile *KubeEnvironmentProfile `json:"kubeEnvironmentProfile,omitempty"` - - // Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan - MaximumElasticWorkerCount *int32 `json:"maximumElasticWorkerCount,omitempty"` - - // 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"` - - // If Linux app service plan true, false otherwise. - Reserved *bool `json:"reserved,omitempty"` - - // The time when the server farm expires. Valid only if it is a spot server farm. - SpotExpirationTime *time.Time `json:"spotExpirationTime,omitempty"` - - // Scaling worker count. - TargetWorkerCount *int32 `json:"targetWorkerCount,omitempty"` - - // Scaling worker size ID. - TargetWorkerSizeID *int32 `json:"targetWorkerSizeId,omitempty"` - - // Target worker tier assigned to the App Service plan. - WorkerTierName *string `json:"workerTierName,omitempty"` - - // 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"` - - // READ-ONLY; Geographical location for the App Service plan. - GeoRegion *string `json:"geoRegion,omitempty" azure:"ro"` - - // READ-ONLY; Maximum number of instances that can be assigned to this App Service plan. - MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty" azure:"ro"` - - // READ-ONLY; Number of apps assigned to this App Service plan. - NumberOfSites *int32 `json:"numberOfSites,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the App Service Plan. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Resource group of the App Service plan. - ResourceGroup *string `json:"resourceGroup,omitempty" azure:"ro"` - - // READ-ONLY; App Service plan status. - Status *StatusOptions `json:"status,omitempty" azure:"ro"` - - // READ-ONLY; App Service plan subscription. - Subscription *string `json:"subscription,omitempty" azure:"ro"` -} - -// PlanProperties - AppServicePlan resource specific properties -type PlanProperties struct { - // ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku - ElasticScaleEnabled *bool `json:"elasticScaleEnabled,omitempty"` - - // The time when the server farm free offer expires. - FreeOfferExpirationTime *time.Time `json:"freeOfferExpirationTime,omitempty"` - - // Specification for the App Service Environment to use for the App Service plan. - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - - // If Hyper-V container app service plan true, false otherwise. - HyperV *bool `json:"hyperV,omitempty"` - - // If true, this App Service Plan owns spot instances. - IsSpot *bool `json:"isSpot,omitempty"` - - // Obsolete: If Hyper-V container app service plan true, false otherwise. - IsXenon *bool `json:"isXenon,omitempty"` - - // Specification for the Kubernetes Environment to use for the App Service plan. - KubeEnvironmentProfile *KubeEnvironmentProfile `json:"kubeEnvironmentProfile,omitempty"` - - // Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan - MaximumElasticWorkerCount *int32 `json:"maximumElasticWorkerCount,omitempty"` - - // 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"` - - // If Linux app service plan true, false otherwise. - Reserved *bool `json:"reserved,omitempty"` - - // The time when the server farm expires. Valid only if it is a spot server farm. - SpotExpirationTime *time.Time `json:"spotExpirationTime,omitempty"` - - // Scaling worker count. - TargetWorkerCount *int32 `json:"targetWorkerCount,omitempty"` - - // Scaling worker size ID. - TargetWorkerSizeID *int32 `json:"targetWorkerSizeId,omitempty"` - - // Target worker tier assigned to the App Service plan. - WorkerTierName *string `json:"workerTierName,omitempty"` - - // 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"` - - // READ-ONLY; Geographical location for the App Service plan. - GeoRegion *string `json:"geoRegion,omitempty" azure:"ro"` - - // READ-ONLY; Maximum number of instances that can be assigned to this App Service plan. - MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty" azure:"ro"` - - // READ-ONLY; Number of apps assigned to this App Service plan. - NumberOfSites *int32 `json:"numberOfSites,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the App Service Plan. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Resource group of the App Service plan. - ResourceGroup *string `json:"resourceGroup,omitempty" azure:"ro"` - - // READ-ONLY; App Service plan status. - Status *StatusOptions `json:"status,omitempty" azure:"ro"` - - // READ-ONLY; App Service plan subscription. - Subscription *string `json:"subscription,omitempty" azure:"ro"` -} - -// PlansClientBeginCreateOrUpdateOptions contains the optional parameters for the PlansClient.BeginCreateOrUpdate method. -type PlansClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PlansClientCreateOrUpdateVnetRouteOptions contains the optional parameters for the PlansClient.CreateOrUpdateVnetRoute -// method. -type PlansClientCreateOrUpdateVnetRouteOptions struct { - // placeholder for future optional parameters -} - -// PlansClientDeleteHybridConnectionOptions contains the optional parameters for the PlansClient.DeleteHybridConnection method. -type PlansClientDeleteHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// PlansClientDeleteOptions contains the optional parameters for the PlansClient.Delete method. -type PlansClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// PlansClientDeleteVnetRouteOptions contains the optional parameters for the PlansClient.DeleteVnetRoute method. -type PlansClientDeleteVnetRouteOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetHybridConnectionOptions contains the optional parameters for the PlansClient.GetHybridConnection method. -type PlansClientGetHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetHybridConnectionPlanLimitOptions contains the optional parameters for the PlansClient.GetHybridConnectionPlanLimit -// method. -type PlansClientGetHybridConnectionPlanLimitOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetOptions contains the optional parameters for the PlansClient.Get method. -type PlansClientGetOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetRouteForVnetOptions contains the optional parameters for the PlansClient.GetRouteForVnet method. -type PlansClientGetRouteForVnetOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetServerFarmSKUsOptions contains the optional parameters for the PlansClient.GetServerFarmSKUs method. -type PlansClientGetServerFarmSKUsOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetVnetFromServerFarmOptions contains the optional parameters for the PlansClient.GetVnetFromServerFarm method. -type PlansClientGetVnetFromServerFarmOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetVnetGatewayOptions contains the optional parameters for the PlansClient.GetVnetGateway method. -type PlansClientGetVnetGatewayOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListByResourceGroupOptions contains the optional parameters for the PlansClient.ListByResourceGroup method. -type PlansClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListCapabilitiesOptions contains the optional parameters for the PlansClient.ListCapabilities method. -type PlansClientListCapabilitiesOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListHybridConnectionKeysOptions contains the optional parameters for the PlansClient.ListHybridConnectionKeys -// method. -type PlansClientListHybridConnectionKeysOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListHybridConnectionsOptions contains the optional parameters for the PlansClient.ListHybridConnections method. -type PlansClientListHybridConnectionsOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListOptions contains the optional parameters for the PlansClient.List method. -type PlansClientListOptions struct { - // Specify true to return all App Service plan properties. The default is false, which returns a subset of the properties. - // Retrieval of all properties may increase the API latency. - Detailed *bool -} - -// PlansClientListRoutesForVnetOptions contains the optional parameters for the PlansClient.ListRoutesForVnet method. -type PlansClientListRoutesForVnetOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListUsagesOptions contains the optional parameters for the PlansClient.ListUsages method. -type PlansClientListUsagesOptions struct { - // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' - // or name.value eq 'Metric2'). - Filter *string -} - -// PlansClientListVnetsOptions contains the optional parameters for the PlansClient.ListVnets method. -type PlansClientListVnetsOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListWebAppsByHybridConnectionOptions contains the optional parameters for the PlansClient.ListWebAppsByHybridConnection -// method. -type PlansClientListWebAppsByHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListWebAppsOptions contains the optional parameters for the PlansClient.ListWebApps method. -type PlansClientListWebAppsOptions struct { - // Supported filter: $filter=state eq running. Returns only web apps that are currently running - Filter *string - // Skip to a web app in the list of webapps associated with app service plan. If specified, the resulting list will contain - // web apps starting from (including) the skipToken. Otherwise, the resulting list - // contains web apps from the start of the list - SkipToken *string - // List page size. If specified, results are paged. - Top *string -} - -// PlansClientRebootWorkerOptions contains the optional parameters for the PlansClient.RebootWorker method. -type PlansClientRebootWorkerOptions struct { - // placeholder for future optional parameters -} - -// PlansClientRestartWebAppsOptions contains the optional parameters for the PlansClient.RestartWebApps method. -type PlansClientRestartWebAppsOptions struct { - // Specify true to perform a soft restart, applies the configuration settings and restarts the apps if necessary. The default - // is false, which always restarts and reprovisions the apps - SoftRestart *bool -} - -// PlansClientUpdateOptions contains the optional parameters for the PlansClient.Update method. -type PlansClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// PlansClientUpdateVnetGatewayOptions contains the optional parameters for the PlansClient.UpdateVnetGateway method. -type PlansClientUpdateVnetGatewayOptions struct { - // placeholder for future optional parameters -} - -// PlansClientUpdateVnetRouteOptions contains the optional parameters for the PlansClient.UpdateVnetRoute method. -type PlansClientUpdateVnetRouteOptions struct { - // placeholder for future optional parameters -} - -// PremierAddOn - Premier add-on. -type PremierAddOn struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // PremierAddOn resource specific properties - Properties *PremierAddOnProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PremierAddOnOffer - Premier add-on offer. -type PremierAddOnOffer struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // PremierAddOnOffer resource specific properties - Properties *PremierAddOnOfferProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PremierAddOnOfferCollection - Collection of premier add-on offers. -type PremierAddOnOfferCollection struct { - // REQUIRED; Collection of resources. - Value []*PremierAddOnOffer `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PremierAddOnOfferProperties - PremierAddOnOffer resource specific properties -type PremierAddOnOfferProperties struct { - // Legal terms URL. - LegalTermsURL *string `json:"legalTermsUrl,omitempty"` - - // Marketplace offer. - MarketplaceOffer *string `json:"marketplaceOffer,omitempty"` - - // Marketplace publisher. - MarketplacePublisher *string `json:"marketplacePublisher,omitempty"` - - // Privacy policy URL. - PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"` - - // Premier add on offer Product. - Product *string `json:"product,omitempty"` - - // true if promotion code is required; otherwise, false. - PromoCodeRequired *bool `json:"promoCodeRequired,omitempty"` - - // Premier add on offer Quota. - Quota *int32 `json:"quota,omitempty"` - - // Premier add on SKU. - SKU *string `json:"sku,omitempty"` - - // Premier add on offer Vendor. - Vendor *string `json:"vendor,omitempty"` - - // App Service plans this offer is restricted to. - WebHostingPlanRestrictions *AppServicePlanRestrictions `json:"webHostingPlanRestrictions,omitempty"` -} - -// PremierAddOnPatchResource - ARM resource for a PremierAddOn. -type PremierAddOnPatchResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // PremierAddOnPatchResource resource specific properties - Properties *PremierAddOnPatchResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PremierAddOnPatchResourceProperties - PremierAddOnPatchResource resource specific properties -type PremierAddOnPatchResourceProperties struct { - // Premier add on Marketplace offer. - MarketplaceOffer *string `json:"marketplaceOffer,omitempty"` - - // Premier add on Marketplace publisher. - MarketplacePublisher *string `json:"marketplacePublisher,omitempty"` - - // Premier add on Product. - Product *string `json:"product,omitempty"` - - // Premier add on SKU. - SKU *string `json:"sku,omitempty"` - - // Premier add on Vendor. - Vendor *string `json:"vendor,omitempty"` -} - -// PremierAddOnProperties - PremierAddOn resource specific properties -type PremierAddOnProperties struct { - // Premier add on Marketplace offer. - MarketplaceOffer *string `json:"marketplaceOffer,omitempty"` - - // Premier add on Marketplace publisher. - MarketplacePublisher *string `json:"marketplacePublisher,omitempty"` - - // Premier add on Product. - Product *string `json:"product,omitempty"` - - // Premier add on SKU. - SKU *string `json:"sku,omitempty"` - - // Premier add on Vendor. - Vendor *string `json:"vendor,omitempty"` -} - -// PrivateAccess - Description of the parameters of Private Access for a Web Site. -type PrivateAccess struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // PrivateAccess resource specific properties - Properties *PrivateAccessProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateAccessProperties - PrivateAccess resource specific properties -type PrivateAccessProperties struct { - // Whether private access is enabled or not. - Enabled *bool `json:"enabled,omitempty"` - - // The Virtual Networks (and subnets) allowed to access the site privately. - VirtualNetworks []*PrivateAccessVirtualNetwork `json:"virtualNetworks,omitempty"` -} - -// PrivateAccessSubnet - Description of a Virtual Network subnet that is useable for private site access. -type PrivateAccessSubnet struct { - // The key (ID) of the subnet. - Key *int32 `json:"key,omitempty"` - - // The name of the subnet. - Name *string `json:"name,omitempty"` -} - -// PrivateAccessVirtualNetwork - Description of a Virtual Network that is useable for private site access. -type PrivateAccessVirtualNetwork struct { - // The key (ID) of the Virtual Network. - Key *int32 `json:"key,omitempty"` - - // The name of the Virtual Network. - Name *string `json:"name,omitempty"` - - // The ARM uri of the Virtual Network - ResourceID *string `json:"resourceId,omitempty"` - - // A List of subnets that access is allowed to on this Virtual Network. An empty array (but not null) is interpreted to mean - // that all subnets are allowed within this Virtual Network. - Subnets []*PrivateAccessSubnet `json:"subnets,omitempty"` -} - -type PrivateEndpointConnectionCollection struct { - // REQUIRED; Collection of resources. - Value []*RemotePrivateEndpointConnectionARMResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PrivateLinkConnectionApprovalRequest - A request to approve or reject a private endpoint connection -type PrivateLinkConnectionApprovalRequest struct { - // The state of a private link connection - PrivateLinkServiceConnectionState *PrivateLinkConnectionState `json:"privateLinkServiceConnectionState,omitempty"` -} - -// PrivateLinkConnectionApprovalRequestResource - Private Endpoint Connection Approval ARM resource. -type PrivateLinkConnectionApprovalRequestResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *PrivateLinkConnectionApprovalRequest `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateLinkConnectionState - The state of a private link connection -type PrivateLinkConnectionState struct { - // ActionsRequired for a private link connection - ActionsRequired *string `json:"actionsRequired,omitempty"` - - // Description of a private link connection - Description *string `json:"description,omitempty"` - - // Status of a private link connection - Status *string `json:"status,omitempty"` -} - -// PrivateLinkResource - A private link resource -type PrivateLinkResource struct { - // REQUIRED - ID *string `json:"id,omitempty"` - - // REQUIRED; Name of a private link resource - Name *string `json:"name,omitempty"` - - // REQUIRED; Properties of a private link resource - Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` - - // REQUIRED - Type *string `json:"type,omitempty"` -} - -// PrivateLinkResourceProperties - Properties of a private link resource -type PrivateLinkResourceProperties struct { - // READ-ONLY; GroupId of a private link resource - GroupID *string `json:"groupId,omitempty" azure:"ro"` - - // READ-ONLY; RequiredMembers of a private link resource - RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` - - // READ-ONLY; RequiredZoneNames of a private link resource - RequiredZoneNames []*string `json:"requiredZoneNames,omitempty" azure:"ro"` -} - -// PrivateLinkResourcesWrapper - Wrapper for a collection of private link resources -type PrivateLinkResourcesWrapper struct { - // REQUIRED - Value []*PrivateLinkResource `json:"value,omitempty"` -} - -// ProcessInfo - Process Information. -type ProcessInfo struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // ProcessInfo resource specific properties - Properties *ProcessInfoProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProcessInfoCollection - Collection of Kudu process information elements. -type ProcessInfoCollection struct { - // REQUIRED; Collection of resources. - Value []*ProcessInfo `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ProcessInfoProperties - ProcessInfo resource specific properties -type ProcessInfoProperties struct { - // Child process list. - Children []*string `json:"children,omitempty"` - - // Command line. - CommandLine *string `json:"command_line,omitempty"` - - // Deployment name. - DeploymentName *string `json:"deployment_name,omitempty"` - - // Description of process. - Description *string `json:"description,omitempty"` - - // List of environment variables. - EnvironmentVariables map[string]*string `json:"environment_variables,omitempty"` - - // File name of this process. - FileName *string `json:"file_name,omitempty"` - - // Handle count. - HandleCount *int32 `json:"handle_count,omitempty"` - - // HRef URI. - Href *string `json:"href,omitempty"` - - // IIS Profile timeout (seconds). - IisProfileTimeoutInSeconds *float64 `json:"iis_profile_timeout_in_seconds,omitempty"` - - // Is the IIS Profile running? - IsIisProfileRunning *bool `json:"is_iis_profile_running,omitempty"` - - // Is profile running? - IsProfileRunning *bool `json:"is_profile_running,omitempty"` - - // Is this the SCM site? - IsScmSite *bool `json:"is_scm_site,omitempty"` - - // Is this a Web Job? - IsWebjob *bool `json:"is_webjob,omitempty"` - - // Minidump URI. - Minidump *string `json:"minidump,omitempty"` - - // Module count. - ModuleCount *int32 `json:"module_count,omitempty"` - - // List of modules. - Modules []*ProcessModuleInfo `json:"modules,omitempty"` - - // Non-paged system memory. - NonPagedSystemMemory *int64 `json:"non_paged_system_memory,omitempty"` - - // List of open files. - OpenFileHandles []*string `json:"open_file_handles,omitempty"` - - // Paged memory. - PagedMemory *int64 `json:"paged_memory,omitempty"` - - // Paged system memory. - PagedSystemMemory *int64 `json:"paged_system_memory,omitempty"` - - // Parent process. - Parent *string `json:"parent,omitempty"` - - // Peak paged memory. - PeakPagedMemory *int64 `json:"peak_paged_memory,omitempty"` - - // Peak virtual memory usage. - PeakVirtualMemory *int64 `json:"peak_virtual_memory,omitempty"` - - // Peak working set. - PeakWorkingSet *int64 `json:"peak_working_set,omitempty"` - - // Private memory size. - PrivateMemory *int64 `json:"private_memory,omitempty"` - - // Privileged CPU time. - PrivilegedCPUTime *string `json:"privileged_cpu_time,omitempty"` - - // Start time. - StartTime *time.Time `json:"start_time,omitempty"` - - // Thread count. - ThreadCount *int32 `json:"thread_count,omitempty"` - - // Thread list. - Threads []*ProcessThreadInfo `json:"threads,omitempty"` - - // Time stamp. - TimeStamp *time.Time `json:"time_stamp,omitempty"` - - // Total CPU time. - TotalCPUTime *string `json:"total_cpu_time,omitempty"` - - // User CPU time. - UserCPUTime *string `json:"user_cpu_time,omitempty"` - - // User name. - UserName *string `json:"user_name,omitempty"` - - // Virtual memory size. - VirtualMemory *int64 `json:"virtual_memory,omitempty"` - - // Working set. - WorkingSet *int64 `json:"working_set,omitempty"` - - // READ-ONLY; ARM Identifier for deployment. - Identifier *int32 `json:"identifier,omitempty" azure:"ro"` -} - -// ProcessModuleInfo - Process Module Information. -type ProcessModuleInfo struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // ProcessModuleInfo resource specific properties - Properties *ProcessModuleInfoProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProcessModuleInfoCollection - Collection of Kudu thread information elements. -type ProcessModuleInfoCollection struct { - // REQUIRED; Collection of resources. - Value []*ProcessModuleInfo `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ProcessModuleInfoProperties - ProcessModuleInfo resource specific properties -type ProcessModuleInfoProperties struct { - // Base address. Used as module identifier in ARM resource URI. - BaseAddress *string `json:"base_address,omitempty"` - - // File description. - FileDescription *string `json:"file_description,omitempty"` - - // File name. - FileName *string `json:"file_name,omitempty"` - - // File path. - FilePath *string `json:"file_path,omitempty"` - - // File version. - FileVersion *string `json:"file_version,omitempty"` - - // HRef URI. - Href *string `json:"href,omitempty"` - - // Is debug? - IsDebug *bool `json:"is_debug,omitempty"` - - // Module language (locale). - Language *string `json:"language,omitempty"` - - // Module memory size. - ModuleMemorySize *int32 `json:"module_memory_size,omitempty"` - - // Product name. - Product *string `json:"product,omitempty"` - - // Product version. - ProductVersion *string `json:"product_version,omitempty"` -} - -// ProcessThreadInfo - Process Thread Information. -type ProcessThreadInfo struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // ProcessThreadInfo resource specific properties - Properties *ProcessThreadInfoProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProcessThreadInfoCollection - Collection of Kudu thread information elements. -type ProcessThreadInfoCollection struct { - // REQUIRED; Collection of resources. - Value []*ProcessThreadInfo `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ProcessThreadInfoProperties - ProcessThreadInfo resource specific properties -type ProcessThreadInfoProperties struct { - // Base priority. - BasePriority *int32 `json:"base_priority,omitempty"` - - // Current thread priority. - CurrentPriority *int32 `json:"current_priority,omitempty"` - - // HRef URI. - Href *string `json:"href,omitempty"` - - // Thread priority level. - PriorityLevel *string `json:"priority_level,omitempty"` - - // Process URI. - Process *string `json:"process,omitempty"` - - // Start address. - StartAddress *string `json:"start_address,omitempty"` - - // Start time. - StartTime *time.Time `json:"start_time,omitempty"` - - // Thread state. - State *string `json:"state,omitempty"` - - // Total processor time. - TotalProcessorTime *string `json:"total_processor_time,omitempty"` - - // User processor time. - UserProcessorTime *string `json:"user_processor_time,omitempty"` - - // Wait reason. - WaitReason *string `json:"wait_reason,omitempty"` - - // READ-ONLY; Site extension ID. - Identifier *int32 `json:"identifier,omitempty" azure:"ro"` -} - -// ProviderClientGetAvailableStacksOnPremOptions contains the optional parameters for the ProviderClient.GetAvailableStacksOnPrem -// method. -type ProviderClientGetAvailableStacksOnPremOptions struct { - OSTypeSelected *Enum20 -} - -// ProviderClientGetAvailableStacksOptions contains the optional parameters for the ProviderClient.GetAvailableStacks method. -type ProviderClientGetAvailableStacksOptions struct { - OSTypeSelected *Enum15 -} - -// ProviderClientGetFunctionAppStacksForLocationOptions contains the optional parameters for the ProviderClient.GetFunctionAppStacksForLocation -// method. -type ProviderClientGetFunctionAppStacksForLocationOptions struct { - // Stack OS Type - StackOsType *Enum17 -} - -// ProviderClientGetFunctionAppStacksOptions contains the optional parameters for the ProviderClient.GetFunctionAppStacks -// method. -type ProviderClientGetFunctionAppStacksOptions struct { - // Stack OS Type - StackOsType *Enum16 -} - -// ProviderClientGetWebAppStacksForLocationOptions contains the optional parameters for the ProviderClient.GetWebAppStacksForLocation -// method. -type ProviderClientGetWebAppStacksForLocationOptions struct { - // Stack OS Type - StackOsType *Enum18 -} - -// ProviderClientGetWebAppStacksOptions contains the optional parameters for the ProviderClient.GetWebAppStacks method. -type ProviderClientGetWebAppStacksOptions struct { - // Stack OS Type - StackOsType *Enum19 -} - -// ProviderClientListOperationsOptions contains the optional parameters for the ProviderClient.ListOperations method. -type ProviderClientListOperationsOptions struct { - // placeholder for future optional parameters -} - -// ProxyOnlyResource - Azure proxy only resource. This resource is not tracked by Azure Resource Manager. -type ProxyOnlyResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PublicCertificate - Public certificate object -type PublicCertificate struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // PublicCertificate resource specific properties - Properties *PublicCertificateProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PublicCertificateCollection - Collection of public certificates -type PublicCertificateCollection struct { - // REQUIRED; Collection of resources. - Value []*PublicCertificate `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PublicCertificateProperties - PublicCertificate resource specific properties -type PublicCertificateProperties struct { - // Public Certificate byte array - Blob []byte `json:"blob,omitempty"` - - // Public Certificate Location - PublicCertificateLocation *PublicCertificateLocation `json:"publicCertificateLocation,omitempty"` - - // READ-ONLY; Certificate Thumbprint - Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` -} - -// PublishingCredentialsPoliciesCollection - Publishing Credentials Policies entity collection ARM resource. -type PublishingCredentialsPoliciesCollection struct { - // REQUIRED; Collection of resources. - Value []*CsmPublishingCredentialsPoliciesEntity `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PushSettings - Push settings for the App. -type PushSettings struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // PushSettings resource specific properties - Properties *PushSettingsProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PushSettingsProperties - PushSettings resource specific properties -type PushSettingsProperties struct { - // REQUIRED; Gets or sets a flag indicating whether the Push endpoint is enabled. - IsPushEnabled *bool `json:"isPushEnabled,omitempty"` - - // Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration - // endpoint. - DynamicTagsJSON *string `json:"dynamicTagsJson,omitempty"` - - // Gets or sets a JSON string containing a list of tags that are whitelisted for use by the push registration endpoint. - TagWhitelistJSON *string `json:"tagWhitelistJson,omitempty"` - - // Gets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration - // endpoint. Tags can consist of alphanumeric characters and the following: '_', - // '@', '#', '.', ':', '-'. Validation should be performed at the PushRequestHandler. - TagsRequiringAuth *string `json:"tagsRequiringAuth,omitempty"` -} - -// QueryUtterancesResult - Result for utterances query. -type QueryUtterancesResult struct { - // A sample utterance. - SampleUtterance *SampleUtterance `json:"sampleUtterance,omitempty"` - - // Score of a sample utterance. - Score *float32 `json:"score,omitempty"` -} - -// QueryUtterancesResults - Suggested utterances where the detector can be applicable -type QueryUtterancesResults struct { - // Search Query. - Query *string `json:"query,omitempty"` - - // Array of utterance results for search query. - Results []*QueryUtterancesResult `json:"results,omitempty"` -} - -// QueueScaleRule - Container App container Azure Queue based scaling rule. -type QueueScaleRule struct { - // Authentication secrets for the queue scale rule. - Auth []*ScaleRuleAuth `json:"auth,omitempty"` - - // Queue length. - QueueLength *int32 `json:"queueLength,omitempty"` - - // Queue name. - QueueName *string `json:"queueName,omitempty"` -} - -// RampUpRule - Routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to gradually -// change routing % based on performance. -type RampUpRule struct { - // Hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net. - ActionHostName *string `json:"actionHostName,omitempty"` - - // Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site - // extension for the scaffold and contracts. - // https://www.siteextensions.net/packages/TiPCallback/ - ChangeDecisionCallbackURL *string `json:"changeDecisionCallbackUrl,omitempty"` - - // Specifies interval in minutes to reevaluate ReroutePercentage. - ChangeIntervalInMinutes *int32 `json:"changeIntervalInMinutes,omitempty"` - - // In auto ramp up scenario this is the step to add/remove from ReroutePercentage until it reaches \nMinReroutePercentage - // orMaxReroutePercentage. Site metrics are checked every N minutes specified in - // ChangeIntervalInMinutes.\nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified - // in ChangeDecisionCallbackUrl. - ChangeStep *float64 `json:"changeStep,omitempty"` - - // Specifies upper boundary below which ReroutePercentage will stay. - MaxReroutePercentage *float64 `json:"maxReroutePercentage,omitempty"` - - // Specifies lower boundary above which ReroutePercentage will stay. - MinReroutePercentage *float64 `json:"minReroutePercentage,omitempty"` - - // Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. - Name *string `json:"name,omitempty"` - - // Percentage of the traffic which will be redirected to ActionHostName. - ReroutePercentage *float64 `json:"reroutePercentage,omitempty"` -} - -// Recommendation - Represents a recommendation result generated by the recommendation engine. -type Recommendation struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Recommendation resource specific properties - Properties *RecommendationProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RecommendationCollection - Collection of recommendations. -type RecommendationCollection struct { - // REQUIRED; Collection of resources. - Value []*Recommendation `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// RecommendationProperties - Recommendation resource specific properties -type RecommendationProperties struct { - // Name of action recommended by this object. - ActionName *string `json:"actionName,omitempty"` - - // Deep link to a blade on the portal. - BladeName *string `json:"bladeName,omitempty"` - - // List of channels that this recommendation can apply. - Channels *Channels `json:"channels,omitempty"` - - // Timestamp when this instance was created. - CreationTime *time.Time `json:"creationTime,omitempty"` - - // UI friendly name of the rule (may not be unique). - DisplayName *string `json:"displayName,omitempty"` - - // True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. - Enabled *int32 `json:"enabled,omitempty"` - - // The end time in UTC of a range that the recommendation refers to. - EndTime *time.Time `json:"endTime,omitempty"` - - // Extension name of the portal if exists. - ExtensionName *string `json:"extensionName,omitempty"` - - // Forward link to an external document associated with the rule. - ForwardLink *string `json:"forwardLink,omitempty"` - - // True if this is associated with a dynamically added rule - IsDynamic *bool `json:"isDynamic,omitempty"` - - // Level indicating how critical this recommendation can impact. - Level *NotificationLevel `json:"level,omitempty"` - - // Recommendation text. - Message *string `json:"message,omitempty"` - - // When to notify this recommendation next in UTC. Null means that this will never be notified anymore. - NextNotificationTime *time.Time `json:"nextNotificationTime,omitempty"` - - // Date and time in UTC when this notification expires. - NotificationExpirationTime *time.Time `json:"notificationExpirationTime,omitempty"` - - // Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet. - NotifiedTime *time.Time `json:"notifiedTime,omitempty"` - - // A GUID value that each recommendation object is associated with. - RecommendationID *string `json:"recommendationId,omitempty"` - - // Full ARM resource ID string that this recommendation object is associated with. - ResourceID *string `json:"resourceId,omitempty"` - - // Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. - ResourceScope *ResourceScopeType `json:"resourceScope,omitempty"` - - // Unique name of the rule. - RuleName *string `json:"ruleName,omitempty"` - - // A metric value measured by the rule. - Score *float64 `json:"score,omitempty"` - - // The beginning time in UTC of a range that the recommendation refers to. - StartTime *time.Time `json:"startTime,omitempty"` - - // The list of states of this recommendation. If it's null then it should be considered "Active". - States []*string `json:"states,omitempty"` - - // READ-ONLY; The list of category tags that this recommendation belongs to. - CategoryTags []*string `json:"categoryTags,omitempty" azure:"ro"` -} - -// RecommendationRule - Represents a recommendation rule that the recommendation engine can perform. -type RecommendationRule struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // RecommendationRule resource specific properties - Properties *RecommendationRuleProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RecommendationRuleProperties - RecommendationRule resource specific properties -type RecommendationRuleProperties struct { - // Name of action that is recommended by this rule in string. - ActionName *string `json:"actionName,omitempty"` - - // Deep link to a blade on the portal. Applicable to dynamic rule only. - BladeName *string `json:"bladeName,omitempty"` - - // List of available channels that this rule applies. - Channels *Channels `json:"channels,omitempty"` - - // Localized detailed description of the rule. - Description *string `json:"description,omitempty"` - - // UI friendly name of the rule. - DisplayName *string `json:"displayName,omitempty"` - - // Extension name of the portal if exists. Applicable to dynamic rule only. - ExtensionName *string `json:"extensionName,omitempty"` - - // Forward link to an external document associated with the rule. Applicable to dynamic rule only. - ForwardLink *string `json:"forwardLink,omitempty"` - - // True if this is associated with a dynamically added rule - IsDynamic *bool `json:"isDynamic,omitempty"` - - // Level of impact indicating how critical this rule is. - Level *NotificationLevel `json:"level,omitempty"` - - // Localized name of the rule (Good for UI). - Message *string `json:"message,omitempty"` - - // Recommendation ID of an associated recommendation object tied to the rule, if exists. If such an object doesn't exist, - // it is set to null. - RecommendationID *string `json:"recommendationId,omitempty"` - - // Unique name of the rule. - RecommendationName *string `json:"recommendationName,omitempty"` - - // READ-ONLY; The list of category tags that this recommendation rule belongs to. - CategoryTags []*string `json:"categoryTags,omitempty" azure:"ro"` -} - -// RecommendationsClientDisableAllForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableAllForHostingEnvironment -// method. -type RecommendationsClientDisableAllForHostingEnvironmentOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientDisableAllForWebAppOptions contains the optional parameters for the RecommendationsClient.DisableAllForWebApp -// method. -type RecommendationsClientDisableAllForWebAppOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientDisableRecommendationForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForHostingEnvironment -// method. -type RecommendationsClientDisableRecommendationForHostingEnvironmentOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientDisableRecommendationForSiteOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSite -// method. -type RecommendationsClientDisableRecommendationForSiteOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientDisableRecommendationForSubscriptionOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSubscription -// method. -type RecommendationsClientDisableRecommendationForSubscriptionOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByHostingEnvironment -// method. -type RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions struct { - // The GUID of the recommendation object if you query an expired one. You don't need to specify it to query an active entry. - RecommendationID *string - // Specify true to update the last-seen timestamp of the recommendation object. - UpdateSeen *bool -} - -// RecommendationsClientGetRuleDetailsByWebAppOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByWebApp -// method. -type RecommendationsClientGetRuleDetailsByWebAppOptions struct { - // The GUID of the recommendation object if you query an expired one. You don't need to specify it to query an active entry. - RecommendationID *string - // Specify true to update the last-seen timestamp of the recommendation object. - UpdateSeen *bool -} - -// RecommendationsClientListHistoryForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ListHistoryForHostingEnvironment -// method. -type RecommendationsClientListHistoryForHostingEnvironmentOptions struct { - // Specify false to return all recommendations. The default is true, which returns only expired recommendations. - ExpiredOnly *bool - // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime - // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - // duration'[PT1H|PT1M|P1D] - Filter *string -} - -// RecommendationsClientListHistoryForWebAppOptions contains the optional parameters for the RecommendationsClient.ListHistoryForWebApp -// method. -type RecommendationsClientListHistoryForWebAppOptions struct { - // Specify false to return all recommendations. The default is true, which returns only expired recommendations. - ExpiredOnly *bool - // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime - // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - // duration'[PT1H|PT1M|P1D] - Filter *string -} - -// RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.List method. -type RecommendationsClientListOptions struct { - // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. - Featured *bool - // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime - // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - // duration'[PT1H|PT1M|P1D] - Filter *string -} - -// RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ListRecommendedRulesForHostingEnvironment -// method. -type RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions struct { - // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. - Featured *bool - // Return only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' - // or channel eq 'Notification' - Filter *string -} - -// RecommendationsClientListRecommendedRulesForWebAppOptions contains the optional parameters for the RecommendationsClient.ListRecommendedRulesForWebApp -// method. -type RecommendationsClientListRecommendedRulesForWebAppOptions struct { - // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. - Featured *bool - // Return only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' - // or channel eq 'Notification' - Filter *string -} - -// RecommendationsClientResetAllFiltersForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForHostingEnvironment -// method. -type RecommendationsClientResetAllFiltersForHostingEnvironmentOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientResetAllFiltersForWebAppOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForWebApp -// method. -type RecommendationsClientResetAllFiltersForWebAppOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientResetAllFiltersOptions contains the optional parameters for the RecommendationsClient.ResetAllFilters -// method. -type RecommendationsClientResetAllFiltersOptions struct { - // placeholder for future optional parameters -} - -// RegistryCredentials - Container App Private Registry -type RegistryCredentials struct { - // The name of the Secret that contains the registry login password - PasswordSecretRef *string `json:"passwordSecretRef,omitempty"` - - // Container Registry Server - Server *string `json:"server,omitempty"` - - // Container Registry Username - Username *string `json:"username,omitempty"` -} - -// ReissueCertificateOrderRequest - Class representing certificate reissue request. -type ReissueCertificateOrderRequest struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // ReissueCertificateOrderRequest resource specific properties - Properties *ReissueCertificateOrderRequestProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ReissueCertificateOrderRequestProperties - ReissueCertificateOrderRequest resource specific properties -type ReissueCertificateOrderRequestProperties struct { - // Csr to be used for re-key operation. - Csr *string `json:"csr,omitempty"` - - // Delay in hours to revoke existing certificate after the new certificate is issued. - DelayExistingRevokeInHours *int32 `json:"delayExistingRevokeInHours,omitempty"` - - // Should we change the ASC type (from managed private key to external private key and vice versa). - IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"` - - // Certificate Key Size. - KeySize *int32 `json:"keySize,omitempty"` -} - -// RelayServiceConnectionEntity - Hybrid Connection for an App Service app. -type RelayServiceConnectionEntity struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // RelayServiceConnectionEntity resource specific properties - Properties *RelayServiceConnectionEntityProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RelayServiceConnectionEntityProperties - RelayServiceConnectionEntity resource specific properties -type RelayServiceConnectionEntityProperties struct { - BiztalkURI *string `json:"biztalkUri,omitempty"` - EntityConnectionString *string `json:"entityConnectionString,omitempty"` - EntityName *string `json:"entityName,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Port *int32 `json:"port,omitempty"` - ResourceConnectionString *string `json:"resourceConnectionString,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` -} - -// RemotePrivateEndpointConnection - A remote private endpoint connection -type RemotePrivateEndpointConnection struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // RemotePrivateEndpointConnection resource specific properties - Properties *RemotePrivateEndpointConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RemotePrivateEndpointConnectionARMResource - Remote Private Endpoint Connection ARM resource. -type RemotePrivateEndpointConnectionARMResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // RemotePrivateEndpointConnectionARMResource resource specific properties - Properties *RemotePrivateEndpointConnectionARMResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RemotePrivateEndpointConnectionARMResourceProperties - RemotePrivateEndpointConnectionARMResource resource specific properties -type RemotePrivateEndpointConnectionARMResourceProperties struct { - // Private IPAddresses mapped to the remote private endpoint - IPAddresses []*string `json:"ipAddresses,omitempty"` - - // PrivateEndpoint of a remote private endpoint connection - PrivateEndpoint *ArmIDWrapper `json:"privateEndpoint,omitempty"` - - // The state of a private link connection - PrivateLinkServiceConnectionState *PrivateLinkConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - - // READ-ONLY - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// RemotePrivateEndpointConnectionProperties - RemotePrivateEndpointConnection resource specific properties -type RemotePrivateEndpointConnectionProperties struct { - // Private IPAddresses mapped to the remote private endpoint - IPAddresses []*string `json:"ipAddresses,omitempty"` - - // PrivateEndpoint of a remote private endpoint connection - PrivateEndpoint *ArmIDWrapper `json:"privateEndpoint,omitempty"` - - // The state of a private link connection - PrivateLinkServiceConnectionState *PrivateLinkConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - - // READ-ONLY - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// Rendering - Instructions for rendering the data -type Rendering struct { - // Description of the data that will help it be interpreted - Description *string `json:"description,omitempty"` - - // Title of data - Title *string `json:"title,omitempty"` - - // Rendering Type - Type *RenderingType `json:"type,omitempty"` -} - -// RenewCertificateOrderRequest - Class representing certificate renew request. -type RenewCertificateOrderRequest struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // RenewCertificateOrderRequest resource specific properties - Properties *RenewCertificateOrderRequestProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RenewCertificateOrderRequestProperties - RenewCertificateOrderRequest resource specific properties -type RenewCertificateOrderRequestProperties struct { - // Csr to be used for re-key operation. - Csr *string `json:"csr,omitempty"` - - // Should we change the ASC type (from managed private key to external private key and vice versa). - IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"` - - // Certificate Key Size. - KeySize *int32 `json:"keySize,omitempty"` -} - -// RequestsBasedTrigger - Trigger based on total requests. -type RequestsBasedTrigger struct { - // Request Count. - Count *int32 `json:"count,omitempty"` - - // Time interval. - TimeInterval *string `json:"timeInterval,omitempty"` -} - -// Resource - Azure resource. This resource is tracked in Azure Resource Manager -type Resource struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceCollection - Collection of resources. -type ResourceCollection struct { - // REQUIRED; Collection of resources. - Value []*string `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ResourceHealthMetadata - Used for getting ResourceHealthCheck settings. -type ResourceHealthMetadata struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // ResourceHealthMetadata resource specific properties - Properties *ResourceHealthMetadataProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceHealthMetadataClientGetBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySite -// method. -type ResourceHealthMetadataClientGetBySiteOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataClientGetBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySiteSlot -// method. -type ResourceHealthMetadataClientGetBySiteSlotOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataClientListByResourceGroupOptions contains the optional parameters for the ResourceHealthMetadataClient.ListByResourceGroup -// method. -type ResourceHealthMetadataClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataClientListBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.ListBySite -// method. -type ResourceHealthMetadataClientListBySiteOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataClientListBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.ListBySiteSlot -// method. -type ResourceHealthMetadataClientListBySiteSlotOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataClientListOptions contains the optional parameters for the ResourceHealthMetadataClient.List method. -type ResourceHealthMetadataClientListOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataCollection - Collection of resource health metadata. -type ResourceHealthMetadataCollection struct { - // REQUIRED; Collection of resources. - Value []*ResourceHealthMetadata `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ResourceHealthMetadataProperties - ResourceHealthMetadata resource specific properties -type ResourceHealthMetadataProperties struct { - // The category that the resource matches in the RHC Policy File - Category *string `json:"category,omitempty"` - - // Is there a health signal for the resource - SignalAvailability *bool `json:"signalAvailability,omitempty"` -} - -// ResourceMetricAvailability - Metrics availability and retention. -type ResourceMetricAvailability struct { - // READ-ONLY; Retention period for the current time grain. - Retention *string `json:"retention,omitempty" azure:"ro"` - - // READ-ONLY; Time grain . - TimeGrain *string `json:"timeGrain,omitempty" azure:"ro"` -} - -// ResourceMetricDefinition - Metadata for the metrics. -type ResourceMetricDefinition struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // ResourceMetricDefinition resource specific properties - Properties *ResourceMetricDefinitionProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceMetricDefinitionCollection - Collection of metric definitions. -type ResourceMetricDefinitionCollection struct { - // REQUIRED; Collection of resources. - Value []*ResourceMetricDefinition `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ResourceMetricDefinitionProperties - ResourceMetricDefinition resource specific properties -type ResourceMetricDefinitionProperties struct { - // READ-ONLY; List of time grains supported for the metric together with retention period. - MetricAvailabilities []*ResourceMetricAvailability `json:"metricAvailabilities,omitempty" azure:"ro"` - - // READ-ONLY; Primary aggregation type. - PrimaryAggregationType *string `json:"primaryAggregationType,omitempty" azure:"ro"` - - // READ-ONLY; Resource metric definition properties. - Properties map[string]*string `json:"properties,omitempty" azure:"ro"` - - // READ-ONLY; Resource URI. - ResourceURI *string `json:"resourceUri,omitempty" azure:"ro"` - - // READ-ONLY; Unit of the metric. - Unit *string `json:"unit,omitempty" azure:"ro"` -} - -// ResourceNameAvailability - Information regarding availability of a resource name. -type ResourceNameAvailability struct { - // If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements - // so that the user can select a valid name. If reason == AlreadyExists, - // explain that resource name is already in use, and direct them to select a different name. - Message *string `json:"message,omitempty"` - - // true indicates name is valid and available. false indicates the name is invalid, unavailable, or both. - NameAvailable *bool `json:"nameAvailable,omitempty"` - - // Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that - // the name is already in use and is therefore unavailable. - Reason *InAvailabilityReasonType `json:"reason,omitempty"` -} - -// ResourceNameAvailabilityRequest - Resource name availability request content. -type ResourceNameAvailabilityRequest struct { - // REQUIRED; Resource name to verify. - Name *string `json:"name,omitempty"` - - // REQUIRED; Resource type used for verification. - Type *CheckNameResourceTypes `json:"type,omitempty"` - - // Is fully qualified domain name. - IsFqdn *bool `json:"isFqdn,omitempty"` -} - -// ResponseMessageEnvelopeRemotePrivateEndpointConnection - Message envelope that contains the common Azure resource manager -// properties and the resource provider specific content. -type ResponseMessageEnvelopeRemotePrivateEndpointConnection struct { - // Azure-AsyncOperation Error info. - Error *ErrorEntity `json:"error,omitempty"` - - // Resource Id. Typically ID is populated only for responses to GET requests. Caller is responsible for passing in this value - // for GET requests only. For example: - // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename} - ID *string `json:"id,omitempty"` - - // MSI resource - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Geographical region resource belongs to e.g. SouthCentralUS, SouthEastAsia. - Location *string `json:"location,omitempty"` - - // Name of resource. - Name *string `json:"name,omitempty"` - - // Azure resource manager plan. - Plan *ArmPlan `json:"plan,omitempty"` - - // Resource specific properties. - Properties *RemotePrivateEndpointConnection `json:"properties,omitempty"` - - // SKU description of the resource. - SKU *SKUDescription `json:"sku,omitempty"` - - // Azure-AsyncOperation Status info. - Status *string `json:"status,omitempty"` - - // Tags associated with resource. - Tags map[string]*string `json:"tags,omitempty"` - - // Type of resource e.g "Microsoft.Web/sites". - Type *string `json:"type,omitempty"` - - // Logical Availability Zones the service is hosted in - Zones []*string `json:"zones,omitempty"` -} - -type ResponseMetaData struct { - // Source of the Data - DataSource *DataSource `json:"dataSource,omitempty"` -} - -// RestoreRequest - Description of a restore request. -type RestoreRequest struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // RestoreRequest resource specific properties - Properties *RestoreRequestProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RestoreRequestProperties - RestoreRequest resource specific properties -type RestoreRequestProperties struct { - // REQUIRED; 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"` - - // REQUIRED; SAS URL to the container. - StorageAccountURL *string `json:"storageAccountUrl,omitempty"` - - // true if SiteConfig.ConnectionStrings should be set in new app; otherwise, false. - AdjustConnectionStrings *bool `json:"adjustConnectionStrings,omitempty"` - - // Specify app service plan that will own restored site. - AppServicePlan *string `json:"appServicePlan,omitempty"` - - // Name of a blob which contains the backup. - BlobName *string `json:"blobName,omitempty"` - - // 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"` - - // App Service Environment name, if needed (only when restoring an app to an App Service Environment). - HostingEnvironment *string `json:"hostingEnvironment,omitempty"` - - // 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"` - - // Ignore the databases and only restore the site content - IgnoreDatabases *bool `json:"ignoreDatabases,omitempty"` - - // Operation type. - OperationType *BackupRestoreOperationType `json:"operationType,omitempty"` - - // Name of an app. - SiteName *string `json:"siteName,omitempty"` -} - -// Revision - Container App Revision. -type Revision struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Revision resource specific properties - Properties *RevisionProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RevisionCollection - Container App Revisions collection ARM resource. -type RevisionCollection struct { - // REQUIRED; Collection of resources. - Value []*Revision `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// RevisionProperties - Revision resource specific properties -type RevisionProperties struct { - // READ-ONLY; Boolean describing if the Revision is Active - Active *bool `json:"active,omitempty" azure:"ro"` - - // READ-ONLY; Timestamp describing when the revision was created by controller - CreatedTime *time.Time `json:"createdTime,omitempty" azure:"ro"` - - // READ-ONLY; Fully qualified domain name of the revision - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - - // READ-ONLY; Current health State of the revision - HealthState *RevisionHealthState `json:"healthState,omitempty" azure:"ro"` - - // READ-ONLY; Optional Field - Platform Error Message - ProvisioningError *string `json:"provisioningError,omitempty" azure:"ro"` - - // READ-ONLY; Current provisioning State of the revision - ProvisioningState *RevisionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Number of pods currently running for this revision - Replicas *int32 `json:"replicas,omitempty" azure:"ro"` - - // 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" azure:"ro"` - - // READ-ONLY; Traffic weight assigned to this revision - TrafficWeight *int32 `json:"trafficWeight,omitempty" azure:"ro"` -} - -// SKUCapacity - Description of the App Service plan scale options. -type SKUCapacity struct { - // Default number of workers for this App Service plan SKU. - Default *int32 `json:"default,omitempty"` - - // Maximum number of Elastic workers for this App Service plan SKU. - ElasticMaximum *int32 `json:"elasticMaximum,omitempty"` - - // Maximum number of workers for this App Service plan SKU. - Maximum *int32 `json:"maximum,omitempty"` - - // Minimum number of workers for this App Service plan SKU. - Minimum *int32 `json:"minimum,omitempty"` - - // 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 { - // Capabilities of the SKU, e.g., is traffic manager enabled? - Capabilities []*Capability `json:"capabilities,omitempty"` - - // Current number of instances assigned to the resource. - Capacity *int32 `json:"capacity,omitempty"` - - // Family code of the resource SKU. - Family *string `json:"family,omitempty"` - - // Locations of the SKU. - Locations []*string `json:"locations,omitempty"` - - // Name of the resource SKU. - Name *string `json:"name,omitempty"` - - // Min, max, and default scale values of the SKU. - SKUCapacity *SKUCapacity `json:"skuCapacity,omitempty"` - - // Size specifier of the resource SKU. - Size *string `json:"size,omitempty"` - - // Service tier of the resource SKU. - Tier *string `json:"tier,omitempty"` -} - -// SKUInfo - SKU discovery information. -type SKUInfo struct { - // Min, max, and default scale values of the SKU. - Capacity *SKUCapacity `json:"capacity,omitempty"` - - // Resource type that this SKU applies to. - ResourceType *string `json:"resourceType,omitempty"` - - // Name and tier of the SKU. - SKU *SKUDescription `json:"sku,omitempty"` -} - -// SKUInfoCollection - Collection of SKU information. -type SKUInfoCollection struct { - // REQUIRED; Collection of resources. - Value []*SKUInfo `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// SKUInfos - Collection of SKU information. -type SKUInfos struct { - // Resource type that this SKU applies to. - ResourceType *string `json:"resourceType,omitempty"` - - // List of SKUs the subscription is able to use. - SKUs []*GlobalCsmSKUDescription `json:"skus,omitempty"` -} - -// SampleUtterance - Sample utterance. -type SampleUtterance struct { - // Links attribute of sample utterance. - Links []*string `json:"links,omitempty"` - - // Question id of sample utterance (for stackoverflow questions titles). - Qid *string `json:"qid,omitempty"` - - // Text attribute of sample utterance. - Text *string `json:"text,omitempty"` -} - -// Scale - Container App scaling configurations. -type Scale struct { - // Optional. Maximum number of container replicas. Defaults to 10 if not set. - MaxReplicas *int32 `json:"maxReplicas,omitempty"` - - // Optional. Minimum number of container replicas. - MinReplicas *int32 `json:"minReplicas,omitempty"` - - // Scaling rules. - Rules []*ScaleRule `json:"rules,omitempty"` -} - -// ScaleRule - Container App container scaling rule. -type ScaleRule struct { - // Azure Queue based scaling. - AzureQueue *QueueScaleRule `json:"azureQueue,omitempty"` - - // Custom scale rule. - Custom *CustomScaleRule `json:"custom,omitempty"` - - // HTTP requests based scaling. - HTTP *HTTPScaleRule `json:"http,omitempty"` - - // Scale Rule Name - Name *string `json:"name,omitempty"` -} - -// ScaleRuleAuth - Auth Secrets for Container App Scale Rule -type ScaleRuleAuth struct { - // Name of the Container App secret from which to pull the auth params. - SecretRef *string `json:"secretRef,omitempty"` - - // Trigger Parameter that uses the secret - TriggerParameter *string `json:"triggerParameter,omitempty"` -} - -// Secret - Container App Secret. -type Secret struct { - // Secret Name. - Name *string `json:"name,omitempty"` - - // Secret Value. - Value *string `json:"value,omitempty"` -} - -// SecretsCollection - Container App Secrets Collection ARM resource. -type SecretsCollection struct { - // REQUIRED; Collection of resources. - Value []*ContainerAppSecret `json:"value,omitempty"` -} - -// ServiceSpecification - Resource metrics service provided by Microsoft.Insights resource provider. -type ServiceSpecification struct { - LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"` - MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` -} - -// Site - A web app, a mobile app backend, or an API app. -type Site struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Extended Location. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Managed service identity. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Site resource specific properties - Properties *SiteProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SiteAuthSettings - Configuration settings for the Azure App Service Authentication / Authorization feature. -type SiteAuthSettings struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SiteAuthSettings resource specific properties - Properties *SiteAuthSettingsProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SiteAuthSettingsProperties - SiteAuthSettings resource specific properties -type SiteAuthSettingsProperties struct { - // Gets a JSON string containing the Azure AD Acl settings. - AADClaimsAuthorization *string `json:"aadClaimsAuthorization,omitempty"` - - // 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"` - - // 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"` - - // 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"` - - // 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"` - - // The Client ID of this relying party application, known as the clientid. 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-10.html - ClientID *string `json:"clientId,omitempty"` - - // 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"` - - // 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"` - - // The app setting name that contains the client secret of the relying party application. - ClientSecretSettingName *string `json:"clientSecretSettingName,omitempty"` - - // 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"` - - // 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". - DefaultProvider *BuiltInAuthenticationProvider `json:"defaultProvider,omitempty"` - - // true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. - Enabled *bool `json:"enabled,omitempty"` - - // 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"` - - // 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"` - - // The app setting name that contains the app secret used for Facebook Login. - FacebookAppSecretSettingName *string `json:"facebookAppSecretSettingName,omitempty"` - - // 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"` - - // The Client Id of the GitHub app used for login. This setting is required for enabling Github login - GitHubClientID *string `json:"gitHubClientId,omitempty"` - - // The Client Secret of the GitHub app used for Github Login. This setting is required for enabling Github login. - GitHubClientSecret *string `json:"gitHubClientSecret,omitempty"` - - // The app setting name that contains the client secret of the Github app used for GitHub Login. - GitHubClientSecretSettingName *string `json:"gitHubClientSecretSettingName,omitempty"` - - // The OAuth 2.0 scopes that will be requested as part of GitHub Login authentication. This setting is optional - GitHubOAuthScopes []*string `json:"gitHubOAuthScopes,omitempty"` - - // 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"` - - // 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"` - - // The app setting name that contains the client secret associated with the Google web application. - GoogleClientSecretSettingName *string `json:"googleClientSecretSettingName,omitempty"` - - // 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"` - - // "true" if the auth config settings should be read from a file, "false" otherwise - IsAuthFromFile *string `json:"isAuthFromFile,omitempty"` - - // 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"` - - // 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"` - - // 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"` - - // 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"` - - // 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"` - - // 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"` - - // 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"` - - // 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"` - - // 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"` - - // 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"` - - // 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"` - - // The action to take when an unauthenticated client attempts to access the app. - UnauthenticatedClientAction *UnauthenticatedClientAction `json:"unauthenticatedClientAction,omitempty"` - - // Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. - ValidateIssuer *bool `json:"validateIssuer,omitempty"` -} - -// SiteAuthSettingsV2 - Configuration settings for the Azure App Service Authentication / Authorization V2 feature. -type SiteAuthSettingsV2 struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SiteAuthSettingsV2 resource specific properties - Properties *SiteAuthSettingsV2Properties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SiteAuthSettingsV2Properties - SiteAuthSettingsV2 resource specific properties -type SiteAuthSettingsV2Properties struct { - // The configuration settings that determines the validation flow of users using App Service Authentication/Authorization. - GlobalValidation *GlobalValidation `json:"globalValidation,omitempty"` - - // The configuration settings of the HTTP requests for authentication and authorization requests made against App Service - // Authentication/Authorization. - HTTPSettings *HTTPSettings `json:"httpSettings,omitempty"` - - // The configuration settings of each of the identity providers used to configure App Service Authentication/Authorization. - IdentityProviders *IdentityProviders `json:"identityProviders,omitempty"` - - // The configuration settings of the login flow of users using App Service Authentication/Authorization. - Login *Login `json:"login,omitempty"` - - // The configuration settings of the platform of App Service Authentication/Authorization. - Platform *AuthPlatform `json:"platform,omitempty"` -} - -// SiteCloneability - Represents whether or not an app is cloneable. -type SiteCloneability struct { - // List of blocking application characteristics. - BlockingCharacteristics []*SiteCloneabilityCriterion `json:"blockingCharacteristics,omitempty"` - - // List of features enabled on app that prevent cloning. - BlockingFeatures []*SiteCloneabilityCriterion `json:"blockingFeatures,omitempty"` - - // Name of app. - Result *CloneAbilityResult `json:"result,omitempty"` - - // 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"` -} - -// SiteCloneabilityCriterion - An app cloneability criterion. -type SiteCloneabilityCriterion struct { - // Description of criterion. - Description *string `json:"description,omitempty"` - - // Name of criterion. - Name *string `json:"name,omitempty"` -} - -// SiteConfig - Configuration of an App Service app. -type SiteConfig struct { - // Information about the formal API definition for the app. - APIDefinition *APIDefinitionInfo `json:"apiDefinition,omitempty"` - - // Azure API management settings linked to the app. - APIManagementConfig *APIManagementConfig `json:"apiManagementConfig,omitempty"` - - // Flag to use Managed Identity Creds for ACR pull - AcrUseManagedIdentityCreds *bool `json:"acrUseManagedIdentityCreds,omitempty"` - - // If using user managed identity, the user managed identity ClientId - AcrUserManagedIdentityID *string `json:"acrUserManagedIdentityID,omitempty"` - - // true if Always On is enabled; otherwise, false. - AlwaysOn *bool `json:"alwaysOn,omitempty"` - - // App command line to launch. - AppCommandLine *string `json:"appCommandLine,omitempty"` - - // Application settings. - AppSettings []*NameValuePair `json:"appSettings,omitempty"` - - // true if Auto Heal is enabled; otherwise, false. - AutoHealEnabled *bool `json:"autoHealEnabled,omitempty"` - - // Auto Heal rules. - AutoHealRules *AutoHealRules `json:"autoHealRules,omitempty"` - - // Auto-swap slot name. - AutoSwapSlotName *string `json:"autoSwapSlotName,omitempty"` - - // List of Azure Storage Accounts. - AzureStorageAccounts map[string]*AzureStorageInfoValue `json:"azureStorageAccounts,omitempty"` - - // Connection strings. - ConnectionStrings []*ConnStringInfo `json:"connectionStrings,omitempty"` - - // Cross-Origin Resource Sharing (CORS) settings. - Cors *CorsSettings `json:"cors,omitempty"` - - // Default documents. - DefaultDocuments []*string `json:"defaultDocuments,omitempty"` - - // true if detailed error logging is enabled; otherwise, false. - DetailedErrorLoggingEnabled *bool `json:"detailedErrorLoggingEnabled,omitempty"` - - // Document root. - DocumentRoot *string `json:"documentRoot,omitempty"` - - // This is work around for polymorphic types. - Experiments *Experiments `json:"experiments,omitempty"` - - // State of FTP / FTPS service - FtpsState *FtpsState `json:"ftpsState,omitempty"` - - // 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"` - - // 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"` - - // true if HTTP logging is enabled; otherwise, false. - HTTPLoggingEnabled *bool `json:"httpLoggingEnabled,omitempty"` - - // Handler mappings. - HandlerMappings []*HandlerMapping `json:"handlerMappings,omitempty"` - - // Health check path - HealthCheckPath *string `json:"healthCheckPath,omitempty"` - - // Http20Enabled: configures a web site to allow clients to connect over http2.0 - Http20Enabled *bool `json:"http20Enabled,omitempty"` - - // IP security restrictions for main. - IPSecurityRestrictions []*IPSecurityRestriction `json:"ipSecurityRestrictions,omitempty"` - - // Java container. - JavaContainer *string `json:"javaContainer,omitempty"` - - // Java container version. - JavaContainerVersion *string `json:"javaContainerVersion,omitempty"` - - // Java version. - JavaVersion *string `json:"javaVersion,omitempty"` - - // Identity to use for Key Vault Reference authentication. - KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` - - // Site limits. - Limits *SiteLimits `json:"limits,omitempty"` - - // Linux App Framework and version - LinuxFxVersion *string `json:"linuxFxVersion,omitempty"` - - // Site load balancing. - LoadBalancing *SiteLoadBalancing `json:"loadBalancing,omitempty"` - - // true to enable local MySQL; otherwise, false. - LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty"` - - // HTTP logs directory size limit. - LogsDirectorySizeLimit *int32 `json:"logsDirectorySizeLimit,omitempty"` - - // Managed pipeline mode. - ManagedPipelineMode *ManagedPipelineMode `json:"managedPipelineMode,omitempty"` - - // Managed Service Identity Id - ManagedServiceIdentityID *int32 `json:"managedServiceIdentityId,omitempty"` - - // MinTlsVersion: configures the minimum version of TLS required for SSL requests - MinTLSVersion *SupportedTLSVersions `json:"minTlsVersion,omitempty"` - - // Number of minimum instance count for a site This setting only applies to the Elastic Plans - MinimumElasticInstanceCount *int32 `json:"minimumElasticInstanceCount,omitempty"` - - // .NET Framework version. - NetFrameworkVersion *string `json:"netFrameworkVersion,omitempty"` - - // Version of Node.js. - NodeVersion *string `json:"nodeVersion,omitempty"` - - // Number of workers. - NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` - - // Version of PHP. - PhpVersion *string `json:"phpVersion,omitempty"` - - // Version of PowerShell. - PowerShellVersion *string `json:"powerShellVersion,omitempty"` - - // Number of preWarmed instances. This setting only applies to the Consumption and Elastic Plans - PreWarmedInstanceCount *int32 `json:"preWarmedInstanceCount,omitempty"` - - // Property to allow or block all public traffic. - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` - - // Publishing user name. - PublishingUsername *string `json:"publishingUsername,omitempty"` - - // Push endpoint settings. - Push *PushSettings `json:"push,omitempty"` - - // Version of Python. - PythonVersion *string `json:"pythonVersion,omitempty"` - - // true if remote debugging is enabled; otherwise, false. - RemoteDebuggingEnabled *bool `json:"remoteDebuggingEnabled,omitempty"` - - // Remote debugging version. - RemoteDebuggingVersion *string `json:"remoteDebuggingVersion,omitempty"` - - // true if request tracing is enabled; otherwise, false. - RequestTracingEnabled *bool `json:"requestTracingEnabled,omitempty"` - - // Request tracing expiration time. - RequestTracingExpirationTime *time.Time `json:"requestTracingExpirationTime,omitempty"` - - // IP security restrictions for scm. - ScmIPSecurityRestrictions []*IPSecurityRestriction `json:"scmIpSecurityRestrictions,omitempty"` - - // IP security restrictions for scm to use main. - ScmIPSecurityRestrictionsUseMain *bool `json:"scmIpSecurityRestrictionsUseMain,omitempty"` - - // ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site - ScmMinTLSVersion *SupportedTLSVersions `json:"scmMinTlsVersion,omitempty"` - - // SCM type. - ScmType *ScmType `json:"scmType,omitempty"` - - // Tracing options. - TracingOptions *string `json:"tracingOptions,omitempty"` - - // true to use 32-bit worker process; otherwise, false. - Use32BitWorkerProcess *bool `json:"use32BitWorkerProcess,omitempty"` - - // Virtual applications. - VirtualApplications []*VirtualApplication `json:"virtualApplications,omitempty"` - - // Virtual Network name. - VnetName *string `json:"vnetName,omitempty"` - - // The number of private ports assigned to this app. These will be assigned dynamically on runtime. - VnetPrivatePortsCount *int32 `json:"vnetPrivatePortsCount,omitempty"` - - // Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined - // Routes applied. - VnetRouteAllEnabled *bool `json:"vnetRouteAllEnabled,omitempty"` - - // true if WebSocket is enabled; otherwise, false. - WebSocketsEnabled *bool `json:"webSocketsEnabled,omitempty"` - - // Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITETIMEZONE - // 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/Listoftzdatabasetimezones). - // 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"` - - // Xenon App Framework and version - WindowsFxVersion *string `json:"windowsFxVersion,omitempty"` - - // Explicit Managed Service Identity Id - XManagedServiceIdentityID *int32 `json:"xManagedServiceIdentityId,omitempty"` - - // READ-ONLY; Site MachineKey. - MachineKey *SiteMachineKey `json:"machineKey,omitempty" azure:"ro"` -} - -// SiteConfigPropertiesDictionary - Site config properties dictionary. -type SiteConfigPropertiesDictionary struct { - // READ-ONLY; JavaVersion configuration setting. - JavaVersion *string `json:"javaVersion,omitempty" azure:"ro"` - - // READ-ONLY; LinuxFxVersion configuration setting. - LinuxFxVersion *string `json:"linuxFxVersion,omitempty" azure:"ro"` - - // READ-ONLY; PowerShellVersion configuration setting. - PowerShellVersion *string `json:"powerShellVersion,omitempty" azure:"ro"` - - // READ-ONLY; true if use32BitWorkerProcess should be set to true for the stack; otherwise, false. - Use32BitWorkerProcess *bool `json:"use32BitWorkerProcess,omitempty" azure:"ro"` -} - -// SiteConfigResource - Web app configuration ARM resource. -type SiteConfigResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *SiteConfig `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SiteConfigResourceCollection - Collection of site configurations. -type SiteConfigResourceCollection struct { - // REQUIRED; Collection of resources. - Value []*SiteConfigResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// SiteConfigurationSnapshotInfo - A snapshot of a web app configuration. -type SiteConfigurationSnapshotInfo struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SiteConfigurationSnapshotInfo resource specific properties - Properties *SiteConfigurationSnapshotInfoProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SiteConfigurationSnapshotInfoCollection - Collection of metadata for the app configuration snapshots that can be restored. -type SiteConfigurationSnapshotInfoCollection struct { - // REQUIRED; Collection of resources. - Value []*SiteConfigurationSnapshotInfo `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// SiteConfigurationSnapshotInfoProperties - SiteConfigurationSnapshotInfo resource specific properties -type SiteConfigurationSnapshotInfoProperties struct { - // READ-ONLY; The id of the snapshot - SnapshotID *int32 `json:"snapshotId,omitempty" azure:"ro"` - - // READ-ONLY; The time the snapshot was taken. - Time *time.Time `json:"time,omitempty" azure:"ro"` -} - -// SiteExtensionInfo - Site Extension Information. -type SiteExtensionInfo struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SiteExtensionInfo resource specific properties - Properties *SiteExtensionInfoProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SiteExtensionInfoCollection - Collection of Kudu site extension information elements. -type SiteExtensionInfoCollection struct { - // REQUIRED; Collection of resources. - Value []*SiteExtensionInfo `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// SiteExtensionInfoProperties - SiteExtensionInfo resource specific properties -type SiteExtensionInfoProperties struct { - // List of authors. - Authors []*string `json:"authors,omitempty"` - - // Site Extension comment. - Comment *string `json:"comment,omitempty"` - - // Detailed description. - Description *string `json:"description,omitempty"` - - // Count of downloads. - DownloadCount *int32 `json:"download_count,omitempty"` - - // Site extension ID. - ExtensionID *string `json:"extension_id,omitempty"` - - // Site extension type. - ExtensionType *SiteExtensionType `json:"extension_type,omitempty"` - - // Extension URL. - ExtensionURL *string `json:"extension_url,omitempty"` - - // Feed URL. - FeedURL *string `json:"feed_url,omitempty"` - - // Icon URL. - IconURL *string `json:"icon_url,omitempty"` - - // Installed timestamp. - InstalledDateTime *time.Time `json:"installed_date_time,omitempty"` - - // Installer command line parameters. - InstallerCommandLineParams *string `json:"installer_command_line_params,omitempty"` - - // License URL. - LicenseURL *string `json:"license_url,omitempty"` - - // true if the local version is the latest version; false otherwise. - LocalIsLatestVersion *bool `json:"local_is_latest_version,omitempty"` - - // Local path. - LocalPath *string `json:"local_path,omitempty"` - - // Project URL. - ProjectURL *string `json:"project_url,omitempty"` - - // Provisioning state. - ProvisioningState *string `json:"provisioningState,omitempty"` - - // Published timestamp. - PublishedDateTime *time.Time `json:"published_date_time,omitempty"` - - // Summary description. - Summary *string `json:"summary,omitempty"` - Title *string `json:"title,omitempty"` - - // Version information. - Version *string `json:"version,omitempty"` -} - -// SiteLimits - Metric limits set on an app. -type SiteLimits struct { - // Maximum allowed disk size usage in MB. - MaxDiskSizeInMb *int64 `json:"maxDiskSizeInMb,omitempty"` - - // Maximum allowed memory usage in MB. - MaxMemoryInMb *int64 `json:"maxMemoryInMb,omitempty"` - - // Maximum allowed CPU usage percentage. - MaxPercentageCPU *float64 `json:"maxPercentageCpu,omitempty"` -} - -// SiteLogsConfig - Configuration of App Service site logs. -type SiteLogsConfig struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SiteLogsConfig resource specific properties - Properties *SiteLogsConfigProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SiteLogsConfigProperties - SiteLogsConfig resource specific properties -type SiteLogsConfigProperties struct { - // Application logs configuration. - ApplicationLogs *ApplicationLogsConfig `json:"applicationLogs,omitempty"` - - // Detailed error messages configuration. - DetailedErrorMessages *EnabledConfig `json:"detailedErrorMessages,omitempty"` - - // Failed requests tracing configuration. - FailedRequestsTracing *EnabledConfig `json:"failedRequestsTracing,omitempty"` - - // HTTP logs configuration. - HTTPLogs *HTTPLogsConfig `json:"httpLogs,omitempty"` -} - -// SiteMachineKey - MachineKey of an app. -type SiteMachineKey struct { - // Algorithm used for decryption. - Decryption *string `json:"decryption,omitempty"` - - // Decryption key. - DecryptionKey *string `json:"decryptionKey,omitempty"` - - // MachineKey validation. - Validation *string `json:"validation,omitempty"` - - // Validation key. - ValidationKey *string `json:"validationKey,omitempty"` -} - -// SitePatchResource - ARM resource for a site. -type SitePatchResource struct { - // Managed service identity. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SitePatchResource resource specific properties - Properties *SitePatchResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SitePatchResourceProperties - SitePatchResource resource specific properties -type SitePatchResourceProperties struct { - // 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"` - - // true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false. - ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` - - // client certificate authentication comma-separated exclusion paths - ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"` - - // 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. - ClientCertMode *ClientCertMode `json:"clientCertMode,omitempty"` - - // If specified during app creation, the app is cloned from a source app. - CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` - - // Size of the function container. - ContainerSize *int32 `json:"containerSize,omitempty"` - - // 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"` - - // Maximum allowed daily memory-time quota (applicable on dynamic apps only). - DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"` - - // 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"` - - // HttpsOnly: configures a web site to accept only https requests. Issues redirect for http requests - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - - // Hostname SSL states are used to manage the SSL bindings for app's hostnames. - HostNameSSLStates []*HostNameSSLState `json:"hostNameSslStates,omitempty"` - - // 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"` - - // App Service Environment to use for the app. - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - - // Hyper-V sandbox. - HyperV *bool `json:"hyperV,omitempty"` - - // Obsolete: Hyper-V sandbox. - IsXenon *bool `json:"isXenon,omitempty"` - - // Identity to use for Key Vault Reference authentication. - KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` - - // Site redundancy mode - RedundancyMode *RedundancyMode `json:"redundancyMode,omitempty"` - - // true if reserved; otherwise, false. - Reserved *bool `json:"reserved,omitempty"` - - // true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. - ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` - - // Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - ServerFarmID *string `json:"serverFarmId,omitempty"` - - // Configuration of the app. - SiteConfig *SiteConfig `json:"siteConfig,omitempty"` - - // Checks if Customer provided storage account is required - StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` - - // 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"` - - // READ-ONLY; Management information availability state for the app. - AvailabilityState *SiteAvailabilityState `json:"availabilityState,omitempty" azure:"ro"` - - // READ-ONLY; Default hostname of the app. Read-only. - DefaultHostName *string `json:"defaultHostName,omitempty" azure:"ro"` - - // 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" azure:"ro"` - - // READ-ONLY; Hostnames associated with the app. - HostNames []*string `json:"hostNames,omitempty" azure:"ro"` - - // READ-ONLY; Specifies an operation id if this site has a pending operation. - InProgressOperationID *string `json:"inProgressOperationId,omitempty" azure:"ro"` - - // READ-ONLY; true if the app is a default container; otherwise, false. - IsDefaultContainer *bool `json:"isDefaultContainer,omitempty" azure:"ro"` - - // READ-ONLY; Last time the app was modified, in UTC. Read-only. - LastModifiedTimeUTC *time.Time `json:"lastModifiedTimeUtc,omitempty" azure:"ro"` - - // READ-ONLY; Maximum number of workers. This only applies to Functions container. - MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty" azure:"ro"` - - // 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" azure:"ro"` - - // 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" azure:"ro"` - - // READ-ONLY; Name of the repository site. - RepositorySiteName *string `json:"repositorySiteName,omitempty" azure:"ro"` - - // READ-ONLY; Name of the resource group the app belongs to. Read-only. - ResourceGroup *string `json:"resourceGroup,omitempty" azure:"ro"` - - // READ-ONLY; Status of the last deployment slot swap operation. - SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty" azure:"ro"` - - // READ-ONLY; Current state of the app. - State *string `json:"state,omitempty" azure:"ro"` - - // READ-ONLY; App suspended till in case memory-time quota is exceeded. - SuspendedTill *time.Time `json:"suspendedTill,omitempty" azure:"ro"` - - // READ-ONLY; Specifies which deployment slot this app will swap into. Read-only. - TargetSwapSlot *string `json:"targetSwapSlot,omitempty" azure:"ro"` - - // READ-ONLY; Azure Traffic Manager hostnames associated with the app. Read-only. - TrafficManagerHostNames []*string `json:"trafficManagerHostNames,omitempty" azure:"ro"` - - // READ-ONLY; State indicating whether the app has exceeded its quota usage. Read-only. - UsageState *UsageState `json:"usageState,omitempty" azure:"ro"` -} - -// SitePhpErrorLogFlag - Used for getting PHP error logging flag. -type SitePhpErrorLogFlag struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SitePhpErrorLogFlag resource specific properties - Properties *SitePhpErrorLogFlagProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SitePhpErrorLogFlagProperties - SitePhpErrorLogFlag resource specific properties -type SitePhpErrorLogFlagProperties struct { - // Local log_errors setting. - LocalLogErrors *string `json:"localLogErrors,omitempty"` - - // Local logerrorsmax_len setting. - LocalLogErrorsMaxLength *string `json:"localLogErrorsMaxLength,omitempty"` - - // Master log_errors setting. - MasterLogErrors *string `json:"masterLogErrors,omitempty"` - - // Master logerrorsmax_len setting. - MasterLogErrorsMaxLength *string `json:"masterLogErrorsMaxLength,omitempty"` -} - -// SiteProperties - Site resource specific properties -type SiteProperties struct { - // 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"` - - // true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false. - ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` - - // client certificate authentication comma-separated exclusion paths - ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"` - - // 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. - ClientCertMode *ClientCertMode `json:"clientCertMode,omitempty"` - - // If specified during app creation, the app is cloned from a source app. - CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` - - // Size of the function container. - ContainerSize *int32 `json:"containerSize,omitempty"` - - // 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"` - - // Maximum allowed daily memory-time quota (applicable on dynamic apps only). - DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"` - - // 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"` - - // HttpsOnly: configures a web site to accept only https requests. Issues redirect for http requests - HTTPSOnly *bool `json:"httpsOnly,omitempty"` - - // Hostname SSL states are used to manage the SSL bindings for app's hostnames. - HostNameSSLStates []*HostNameSSLState `json:"hostNameSslStates,omitempty"` - - // 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"` - - // App Service Environment to use for the app. - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - - // Hyper-V sandbox. - HyperV *bool `json:"hyperV,omitempty"` - - // Obsolete: Hyper-V sandbox. - IsXenon *bool `json:"isXenon,omitempty"` - - // Identity to use for Key Vault Reference authentication. - KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty"` - - // Site redundancy mode - RedundancyMode *RedundancyMode `json:"redundancyMode,omitempty"` - - // true if reserved; otherwise, false. - Reserved *bool `json:"reserved,omitempty"` - - // true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. - ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` - - // Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - ServerFarmID *string `json:"serverFarmId,omitempty"` - - // Configuration of the app. - SiteConfig *SiteConfig `json:"siteConfig,omitempty"` - - // Checks if Customer provided storage account is required - StorageAccountRequired *bool `json:"storageAccountRequired,omitempty"` - - // 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"` - - // READ-ONLY; Management information availability state for the app. - AvailabilityState *SiteAvailabilityState `json:"availabilityState,omitempty" azure:"ro"` - - // READ-ONLY; Default hostname of the app. Read-only. - DefaultHostName *string `json:"defaultHostName,omitempty" azure:"ro"` - - // 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" azure:"ro"` - - // READ-ONLY; Hostnames associated with the app. - HostNames []*string `json:"hostNames,omitempty" azure:"ro"` - - // READ-ONLY; Specifies an operation id if this site has a pending operation. - InProgressOperationID *string `json:"inProgressOperationId,omitempty" azure:"ro"` - - // READ-ONLY; true if the app is a default container; otherwise, false. - IsDefaultContainer *bool `json:"isDefaultContainer,omitempty" azure:"ro"` - - // READ-ONLY; Last time the app was modified, in UTC. Read-only. - LastModifiedTimeUTC *time.Time `json:"lastModifiedTimeUtc,omitempty" azure:"ro"` - - // READ-ONLY; Maximum number of workers. This only applies to Functions container. - MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty" azure:"ro"` - - // 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" azure:"ro"` - - // 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" azure:"ro"` - - // READ-ONLY; Name of the repository site. - RepositorySiteName *string `json:"repositorySiteName,omitempty" azure:"ro"` - - // READ-ONLY; Name of the resource group the app belongs to. Read-only. - ResourceGroup *string `json:"resourceGroup,omitempty" azure:"ro"` - - // READ-ONLY; Status of the last deployment slot swap operation. - SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty" azure:"ro"` - - // READ-ONLY; Current state of the app. - State *string `json:"state,omitempty" azure:"ro"` - - // READ-ONLY; App suspended till in case memory-time quota is exceeded. - SuspendedTill *time.Time `json:"suspendedTill,omitempty" azure:"ro"` - - // READ-ONLY; Specifies which deployment slot this app will swap into. Read-only. - TargetSwapSlot *string `json:"targetSwapSlot,omitempty" azure:"ro"` - - // READ-ONLY; Azure Traffic Manager hostnames associated with the app. Read-only. - TrafficManagerHostNames []*string `json:"trafficManagerHostNames,omitempty" azure:"ro"` - - // READ-ONLY; State indicating whether the app has exceeded its quota usage. Read-only. - UsageState *UsageState `json:"usageState,omitempty" azure:"ro"` -} - -// SiteSeal - Site seal -type SiteSeal struct { - // REQUIRED; HTML snippet - HTML *string `json:"html,omitempty"` -} - -// SiteSealRequest - Site seal request. -type SiteSealRequest struct { - // If true use the light color theme for site seal; otherwise, use the default color theme. - LightTheme *bool `json:"lightTheme,omitempty"` - - // Locale of site seal. - Locale *string `json:"locale,omitempty"` -} - -// SiteSourceControl - Source control configuration for an app. -type SiteSourceControl struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SiteSourceControl resource specific properties - Properties *SiteSourceControlProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SiteSourceControlProperties - SiteSourceControl resource specific properties -type SiteSourceControlProperties struct { - // Name of branch to use for deployment. - Branch *string `json:"branch,omitempty"` - - // true to enable deployment rollback; otherwise, false. - DeploymentRollbackEnabled *bool `json:"deploymentRollbackEnabled,omitempty"` - - // If GitHub Action is selected, than the associated configuration. - GitHubActionConfiguration *GitHubActionConfiguration `json:"gitHubActionConfiguration,omitempty"` - - // true if this is deployed via GitHub action. - IsGitHubAction *bool `json:"isGitHubAction,omitempty"` - - // true to limit to manual integration; false to enable continuous integration (which configures webhooks into online repos - // like GitHub). - IsManualIntegration *bool `json:"isManualIntegration,omitempty"` - - // true for a Mercurial repository; false for a Git repository. - IsMercurial *bool `json:"isMercurial,omitempty"` - - // Repository or source control URL. - RepoURL *string `json:"repoUrl,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 { - // List of application settings names. - AppSettingNames []*string `json:"appSettingNames,omitempty"` - - // List of external Azure storage account identifiers. - AzureStorageConfigNames []*string `json:"azureStorageConfigNames,omitempty"` - - // List of connection string names. - ConnectionStringNames []*string `json:"connectionStringNames,omitempty"` -} - -// SlotConfigNamesResource - Slot Config names azure resource. -type SlotConfigNamesResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *SlotConfigNames `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SlotDifference - A setting difference between two deployment slots of an app. -type SlotDifference struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SlotDifference resource specific properties - Properties *SlotDifferenceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SlotDifferenceCollection - Collection of slot differences. -type SlotDifferenceCollection struct { - // REQUIRED; Collection of resources. - Value []*SlotDifference `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// SlotDifferenceProperties - SlotDifference resource specific properties -type SlotDifferenceProperties struct { - // READ-ONLY; Description of the setting difference. - Description *string `json:"description,omitempty" azure:"ro"` - - // READ-ONLY; Rule that describes how to process the setting difference during a slot swap. - DiffRule *string `json:"diffRule,omitempty" azure:"ro"` - - // READ-ONLY; Level of the difference: Information, Warning or Error. - Level *string `json:"level,omitempty" azure:"ro"` - - // READ-ONLY; Name of the setting. - SettingName *string `json:"settingName,omitempty" azure:"ro"` - - // READ-ONLY; The type of the setting: General, AppSetting or ConnectionString. - SettingType *string `json:"settingType,omitempty" azure:"ro"` - - // READ-ONLY; Value of the setting in the current slot. - ValueInCurrentSlot *string `json:"valueInCurrentSlot,omitempty" azure:"ro"` - - // READ-ONLY; Value of the setting in the target slot. - ValueInTargetSlot *string `json:"valueInTargetSlot,omitempty" azure:"ro"` -} - -// SlotSwapStatus - The status of the last successful slot swap operation. -type SlotSwapStatus struct { - // READ-ONLY; The destination slot of the last swap operation. - DestinationSlotName *string `json:"destinationSlotName,omitempty" azure:"ro"` - - // READ-ONLY; The source slot of the last swap operation. - SourceSlotName *string `json:"sourceSlotName,omitempty" azure:"ro"` - - // READ-ONLY; The time the last successful slot swap completed. - TimestampUTC *time.Time `json:"timestampUtc,omitempty" azure:"ro"` -} - -// SlowRequestsBasedTrigger - Trigger based on request execution time. -type SlowRequestsBasedTrigger struct { - // Request Count. - Count *int32 `json:"count,omitempty"` - - // Request Path. - Path *string `json:"path,omitempty"` - - // Time interval. - TimeInterval *string `json:"timeInterval,omitempty"` - - // Time taken. - TimeTaken *string `json:"timeTaken,omitempty"` -} - -// Snapshot - A snapshot of an app. -type Snapshot struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Snapshot resource specific properties - Properties *SnapshotProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SnapshotCollection - Collection of snapshots which can be used to revert an app to a previous time. -type SnapshotCollection struct { - // REQUIRED; Collection of resources. - Value []*Snapshot `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// SnapshotProperties - Snapshot resource specific properties -type SnapshotProperties struct { - // READ-ONLY; The time the snapshot was taken. - Time *string `json:"time,omitempty" azure:"ro"` -} - -// SnapshotRecoverySource - Specifies the web app that snapshot contents will be retrieved from. -type SnapshotRecoverySource struct { - // 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"` - - // Geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS - Location *string `json:"location,omitempty"` -} - -// SnapshotRestoreRequest - Details about app recovery operation. -type SnapshotRestoreRequest struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SnapshotRestoreRequest resource specific properties - Properties *SnapshotRestoreRequestProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SnapshotRestoreRequestProperties - SnapshotRestoreRequest resource specific properties -type SnapshotRestoreRequestProperties struct { - // REQUIRED; If true the restore operation can overwrite source app; otherwise, false. - Overwrite *bool `json:"overwrite,omitempty"` - - // 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"` - - // If true, site configuration, in addition to content, will be reverted. - RecoverConfiguration *bool `json:"recoverConfiguration,omitempty"` - - // 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"` - - // Point in time in which the app restore should be done, formatted as a DateTime string. - SnapshotTime *string `json:"snapshotTime,omitempty"` - - // If true, the snapshot is retrieved from DRSecondary endpoint. - UseDRSecondary *bool `json:"useDRSecondary,omitempty"` -} - -// Solution - Class Representing Solution for problems detected. -type Solution struct { - // Solution Data. - Data [][]*NameValuePair `json:"data,omitempty"` - - // Description of the solution - Description *string `json:"description,omitempty"` - - // Display Name of the solution - DisplayName *string `json:"displayName,omitempty"` - - // Solution Id. - ID *float64 `json:"id,omitempty"` - - // Solution Metadata. - Metadata [][]*NameValuePair `json:"metadata,omitempty"` - - // Order of the solution. - Order *float64 `json:"order,omitempty"` - - // Type of Solution - Type *SolutionType `json:"type,omitempty"` -} - -// SourceControl - The source control OAuth token. -type SourceControl struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SourceControl resource specific properties - Properties *SourceControlProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SourceControlCollection - Collection of source controls. -type SourceControlCollection struct { - // REQUIRED; Collection of resources. - Value []*SourceControl `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// SourceControlProperties - SourceControl resource specific properties -type SourceControlProperties struct { - // OAuth token expiration. - ExpirationTime *time.Time `json:"expirationTime,omitempty"` - - // OAuth refresh token. - RefreshToken *string `json:"refreshToken,omitempty"` - - // OAuth access token. - Token *string `json:"token,omitempty"` - - // OAuth access token secret. - TokenSecret *string `json:"tokenSecret,omitempty"` -} - -// StackMajorVersion - Application stack major version. -type StackMajorVersion struct { - // Example: All the function apps need AppSetting: "FUNCTIONSWORKERRUNTIME" to be set stack name - AppSettingsDictionary map[string]interface{} `json:"appSettingsDictionary,omitempty"` - - // true if this supports Application Insights; otherwise, false. - ApplicationInsights *bool `json:"applicationInsights,omitempty"` - - // Application stack major version (display only). - DisplayVersion *string `json:"displayVersion,omitempty"` - - // true if this is the default major version; otherwise, false. - IsDefault *bool `json:"isDefault,omitempty"` - - // true if this stack has been deprecated, otherwise false. - IsDeprecated *bool `json:"isDeprecated,omitempty"` - - // true if this stack should be hidden for new customers on portal, otherwise false. - IsHidden *bool `json:"isHidden,omitempty"` - - // true if this stack is in Preview, otherwise false. - IsPreview *bool `json:"isPreview,omitempty"` - - // Minor versions associated with the major version. - MinorVersions []*StackMinorVersion `json:"minorVersions,omitempty"` - - // Application stack major version (runtime only). - RuntimeVersion *string `json:"runtimeVersion,omitempty"` - - // Example: All Linux Function Apps, need Use32BitWorkerProcess to be set to 0 - SiteConfigPropertiesDictionary map[string]interface{} `json:"siteConfigPropertiesDictionary,omitempty"` -} - -// StackMinorVersion - Application stack minor version. -type StackMinorVersion struct { - // Application stack minor version (display only). - DisplayVersion *string `json:"displayVersion,omitempty"` - - // true if this is the default minor version; otherwise, false. - IsDefault *bool `json:"isDefault,omitempty"` - - // true if this supports Remote Debugging, otherwise false. - IsRemoteDebuggingEnabled *bool `json:"isRemoteDebuggingEnabled,omitempty"` - - // Application stack minor version (runtime only). - RuntimeVersion *string `json:"runtimeVersion,omitempty"` -} - -// StampCapacity - Stamp capacity information. -type StampCapacity struct { - // Available capacity (# of machines, bytes of storage etc…). - AvailableCapacity *int64 `json:"availableCapacity,omitempty"` - - // Shared/dedicated workers. - ComputeMode *ComputeModeOptions `json:"computeMode,omitempty"` - - // If true, it includes basic apps. Basic apps are not used for capacity allocation. - ExcludeFromCapacityAllocation *bool `json:"excludeFromCapacityAllocation,omitempty"` - - // true if capacity is applicable for all apps; otherwise, false. - IsApplicableForAllComputeModes *bool `json:"isApplicableForAllComputeModes,omitempty"` - - // Is this a linux stamp capacity - IsLinux *bool `json:"isLinux,omitempty"` - - // Name of the stamp. - Name *string `json:"name,omitempty"` - - // Shared or Dedicated. - SiteMode *string `json:"siteMode,omitempty"` - - // Total capacity (# of machines, bytes of storage etc…). - TotalCapacity *int64 `json:"totalCapacity,omitempty"` - - // Name of the unit. - Unit *string `json:"unit,omitempty"` - - // Size of the machines. - WorkerSize *WorkerSizeOptions `json:"workerSize,omitempty"` - - // Size ID of machines: 0 - Small 1 - Medium 2 - Large - WorkerSizeID *int32 `json:"workerSizeId,omitempty"` -} - -// StampCapacityCollection - Collection of stamp capacities. -type StampCapacityCollection struct { - // REQUIRED; Collection of resources. - Value []*StampCapacity `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// StaticSite - A static site. -type StaticSite struct { - // false if config file is locked for this static web app; otherwise, true. - AllowConfigFileUpdates *bool `json:"allowConfigFileUpdates,omitempty"` - - // The target branch in the repository. - Branch *string `json:"branch,omitempty"` - - // Build properties to configure on the repository. - BuildProperties *StaticSiteBuildProperties `json:"buildProperties,omitempty"` - - // State indicating the status of the enterprise grade CDN serving traffic to the static web app. - EnterpriseGradeCdnStatus *EnterpriseGradeCdnStatus `json:"enterpriseGradeCdnStatus,omitempty"` - - // The provider that submitted the last deployment to the primary environment of the static site. - Provider *string `json:"provider,omitempty"` - - // A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. - RepositoryToken *string `json:"repositoryToken,omitempty"` - - // URL for the repository of the static site. - RepositoryURL *string `json:"repositoryUrl,omitempty"` - - // State indicating whether staging environments are allowed or not allowed for a static web app. - StagingEnvironmentPolicy *StagingEnvironmentPolicy `json:"stagingEnvironmentPolicy,omitempty"` - - // Template options for generating a new repository. - TemplateProperties *StaticSiteTemplateOptions `json:"templateProperties,omitempty"` - - // READ-ONLY; The content distribution endpoint for the static site. - ContentDistributionEndpoint *string `json:"contentDistributionEndpoint,omitempty" azure:"ro"` - - // READ-ONLY; The custom domains associated with this static site. - CustomDomains []*string `json:"customDomains,omitempty" azure:"ro"` - - // READ-ONLY; The default autogenerated hostname for the static site. - DefaultHostname *string `json:"defaultHostname,omitempty" azure:"ro"` - - // READ-ONLY; Identity to use for Key Vault Reference authentication. - KeyVaultReferenceIdentity *string `json:"keyVaultReferenceIdentity,omitempty" azure:"ro"` - - // READ-ONLY; Private endpoint connections - PrivateEndpointConnections []*ResponseMessageEnvelopeRemotePrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` - - // READ-ONLY; User provided function apps registered with the static site - UserProvidedFunctionApps []*StaticSiteUserProvidedFunctionApp `json:"userProvidedFunctionApps,omitempty" azure:"ro"` -} - -// StaticSiteARMResource - Static Site ARM resource. -type StaticSiteARMResource struct { - // REQUIRED; Resource Location. - Location *string `json:"location,omitempty"` - - // Managed service identity. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *StaticSite `json:"properties,omitempty"` - - // Description of a SKU for a scalable resource. - SKU *SKUDescription `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteBuildARMResource - Static Site Build ARM resource. -type StaticSiteBuildARMResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSiteBuildARMResource resource specific properties - Properties *StaticSiteBuildARMResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteBuildARMResourceProperties - StaticSiteBuildARMResource resource specific properties -type StaticSiteBuildARMResourceProperties struct { - // READ-ONLY; An identifier for the static site build. - BuildID *string `json:"buildId,omitempty" azure:"ro"` - - // READ-ONLY; When this build was created. - CreatedTimeUTC *time.Time `json:"createdTimeUtc,omitempty" azure:"ro"` - - // READ-ONLY; The hostname for a static site build. - Hostname *string `json:"hostname,omitempty" azure:"ro"` - - // READ-ONLY; When this build was updated. - LastUpdatedOn *time.Time `json:"lastUpdatedOn,omitempty" azure:"ro"` - - // READ-ONLY; The title of a pull request that a static site build is related to. - PullRequestTitle *string `json:"pullRequestTitle,omitempty" azure:"ro"` - - // READ-ONLY; The source branch. - SourceBranch *string `json:"sourceBranch,omitempty" azure:"ro"` - - // READ-ONLY; The status of the static site build. - Status *BuildStatus `json:"status,omitempty" azure:"ro"` - - // READ-ONLY; User provided function apps registered with the static site build - UserProvidedFunctionApps []*StaticSiteUserProvidedFunctionApp `json:"userProvidedFunctionApps,omitempty" azure:"ro"` -} - -// StaticSiteBuildCollection - Collection of static site builds. -type StaticSiteBuildCollection struct { - // REQUIRED; Collection of resources. - Value []*StaticSiteBuildARMResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// StaticSiteBuildProperties - Build properties for the static site. -type StaticSiteBuildProperties struct { - // A custom command to run during deployment of the Azure Functions API application. - APIBuildCommand *string `json:"apiBuildCommand,omitempty"` - - // The path to the api code within the repository. - APILocation *string `json:"apiLocation,omitempty"` - - // Deprecated: The path of the app artifacts after building (deprecated in favor of OutputLocation) - AppArtifactLocation *string `json:"appArtifactLocation,omitempty"` - - // A custom command to run during deployment of the static content application. - AppBuildCommand *string `json:"appBuildCommand,omitempty"` - - // The path to the app code within the repository. - AppLocation *string `json:"appLocation,omitempty"` - - // Github Action secret name override. - GithubActionSecretNameOverride *string `json:"githubActionSecretNameOverride,omitempty"` - - // The output path of the app after building. - OutputLocation *string `json:"outputLocation,omitempty"` - - // Skip Github Action workflow generation. - SkipGithubActionWorkflowGeneration *bool `json:"skipGithubActionWorkflowGeneration,omitempty"` -} - -// StaticSiteCollection - Collection of static sites. -type StaticSiteCollection struct { - // REQUIRED; Collection of resources. - Value []*StaticSiteARMResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// StaticSiteCustomDomainOverviewARMResource - Static Site Custom Domain Overview ARM resource. -type StaticSiteCustomDomainOverviewARMResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSiteCustomDomainOverviewARMResource resource specific properties - Properties *StaticSiteCustomDomainOverviewARMResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteCustomDomainOverviewARMResourceProperties - StaticSiteCustomDomainOverviewARMResource resource specific properties -type StaticSiteCustomDomainOverviewARMResourceProperties struct { - // READ-ONLY; The date and time on which the custom domain was created for the static site. - CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` - - // READ-ONLY; The domain name for the static site custom domain. - DomainName *string `json:"domainName,omitempty" azure:"ro"` - - // READ-ONLY - ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` - - // READ-ONLY; The status of the custom domain - Status *CustomDomainStatus `json:"status,omitempty" azure:"ro"` - - // READ-ONLY; The TXT record validation token - ValidationToken *string `json:"validationToken,omitempty" azure:"ro"` -} - -// StaticSiteCustomDomainOverviewCollection - Collection of static site custom domains. -type StaticSiteCustomDomainOverviewCollection struct { - // REQUIRED; Collection of resources. - Value []*StaticSiteCustomDomainOverviewARMResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// StaticSiteCustomDomainRequestPropertiesARMResource - Static Site Custom Domain Request Properties ARM resource. -type StaticSiteCustomDomainRequestPropertiesARMResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSiteCustomDomainRequestPropertiesARMResource resource specific properties - Properties *StaticSiteCustomDomainRequestPropertiesARMResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteCustomDomainRequestPropertiesARMResourceProperties - StaticSiteCustomDomainRequestPropertiesARMResource resource -// specific properties -type StaticSiteCustomDomainRequestPropertiesARMResourceProperties struct { - // Validation method for adding a custom domain - ValidationMethod *string `json:"validationMethod,omitempty"` -} - -// StaticSiteFunctionOverviewARMResource - Static Site Function Overview ARM resource. -type StaticSiteFunctionOverviewARMResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSiteFunctionOverviewARMResource resource specific properties - Properties *StaticSiteFunctionOverviewARMResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteFunctionOverviewARMResourceProperties - StaticSiteFunctionOverviewARMResource resource specific properties -type StaticSiteFunctionOverviewARMResourceProperties struct { - // READ-ONLY; The name for the function - FunctionName *string `json:"functionName,omitempty" azure:"ro"` - - // READ-ONLY; The trigger type of the function - TriggerType *TriggerTypes `json:"triggerType,omitempty" azure:"ro"` -} - -// StaticSiteFunctionOverviewCollection - Collection of static site functions. -type StaticSiteFunctionOverviewCollection struct { - // REQUIRED; Collection of resources. - Value []*StaticSiteFunctionOverviewARMResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// StaticSitePatchResource - ARM resource for a static site when patching -type StaticSitePatchResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *StaticSite `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteResetPropertiesARMResource - Static Site Reset Properties ARM resource. -type StaticSiteResetPropertiesARMResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSiteResetPropertiesARMResource resource specific properties - Properties *StaticSiteResetPropertiesARMResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteResetPropertiesARMResourceProperties - StaticSiteResetPropertiesARMResource resource specific properties -type StaticSiteResetPropertiesARMResourceProperties struct { - // The token which proves admin privileges to the repository. - RepositoryToken *string `json:"repositoryToken,omitempty"` - - // 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 { - // Description of the newly generated repository. - Description *string `json:"description,omitempty"` - - // Whether or not the newly generated repository is a private repository. Defaults to false (i.e. public). - IsPrivate *bool `json:"isPrivate,omitempty"` - - // Owner of the newly generated repository. - Owner *string `json:"owner,omitempty"` - - // Name of the newly generated repository. - RepositoryName *string `json:"repositoryName,omitempty"` - - // URL of the template repository. The newly generated repository will be based on this one. - TemplateRepositoryURL *string `json:"templateRepositoryUrl,omitempty"` -} - -// StaticSiteUserARMResource - Static Site User ARM resource. -type StaticSiteUserARMResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSiteUserARMResource resource specific properties - Properties *StaticSiteUserARMResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteUserARMResourceProperties - StaticSiteUserARMResource resource specific properties -type StaticSiteUserARMResourceProperties struct { - // The roles for the static site user, in free-form string format - Roles *string `json:"roles,omitempty"` - - // READ-ONLY; The display name for the static site user. - DisplayName *string `json:"displayName,omitempty" azure:"ro"` - - // READ-ONLY; The identity provider for the static site user. - Provider *string `json:"provider,omitempty" azure:"ro"` - - // READ-ONLY; The user id for the static site user. - UserID *string `json:"userId,omitempty" azure:"ro"` -} - -// StaticSiteUserCollection - Collection of static site custom users. -type StaticSiteUserCollection struct { - // REQUIRED; Collection of resources. - Value []*StaticSiteUserARMResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// StaticSiteUserInvitationRequestResource - Static sites user roles invitation resource. -type StaticSiteUserInvitationRequestResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSiteUserInvitationRequestResource resource specific properties - Properties *StaticSiteUserInvitationRequestResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteUserInvitationRequestResourceProperties - StaticSiteUserInvitationRequestResource resource specific properties -type StaticSiteUserInvitationRequestResourceProperties struct { - // The domain name for the static site custom domain. - Domain *string `json:"domain,omitempty"` - - // The number of hours the sas token stays valid - NumHoursToExpiration *int32 `json:"numHoursToExpiration,omitempty"` - - // The identity provider for the static site user. - Provider *string `json:"provider,omitempty"` - - // The roles for the static site user, in free-form string format - Roles *string `json:"roles,omitempty"` - - // The user id for the static site user. - UserDetails *string `json:"userDetails,omitempty"` -} - -// StaticSiteUserInvitationResponseResource - Static sites user roles invitation link resource. -type StaticSiteUserInvitationResponseResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSiteUserInvitationResponseResource resource specific properties - Properties *StaticSiteUserInvitationResponseResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteUserInvitationResponseResourceProperties - StaticSiteUserInvitationResponseResource resource specific properties -type StaticSiteUserInvitationResponseResourceProperties struct { - // READ-ONLY; The expiration time of the invitation - ExpiresOn *time.Time `json:"expiresOn,omitempty" azure:"ro"` - - // READ-ONLY; The url for the invitation link - InvitationURL *string `json:"invitationUrl,omitempty" azure:"ro"` -} - -// StaticSiteUserProvidedFunctionApp - A static site user provided function. -type StaticSiteUserProvidedFunctionApp struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSiteUserProvidedFunctionApp resource specific properties - Properties *StaticSiteUserProvidedFunctionAppProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteUserProvidedFunctionAppARMResource - Static Site User Provided Function App ARM resource. -type StaticSiteUserProvidedFunctionAppARMResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSiteUserProvidedFunctionAppARMResource resource specific properties - Properties *StaticSiteUserProvidedFunctionAppARMResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSiteUserProvidedFunctionAppARMResourceProperties - StaticSiteUserProvidedFunctionAppARMResource resource specific -// properties -type StaticSiteUserProvidedFunctionAppARMResourceProperties struct { - // The region of the function app registered with the static site - FunctionAppRegion *string `json:"functionAppRegion,omitempty"` - - // The resource id of the function app registered with the static site - FunctionAppResourceID *string `json:"functionAppResourceId,omitempty"` - - // READ-ONLY; The date and time on which the function app was registered with the static site. - CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` -} - -// StaticSiteUserProvidedFunctionAppProperties - StaticSiteUserProvidedFunctionApp resource specific properties -type StaticSiteUserProvidedFunctionAppProperties struct { - // The region of the function app registered with the static site - FunctionAppRegion *string `json:"functionAppRegion,omitempty"` - - // The resource id of the function app registered with the static site - FunctionAppResourceID *string `json:"functionAppResourceId,omitempty"` - - // READ-ONLY; The date and time on which the function app was registered with the static site. - CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` -} - -// StaticSiteUserProvidedFunctionAppsCollection - Collection of static site user provided function apps. -type StaticSiteUserProvidedFunctionAppsCollection struct { - // REQUIRED; Collection of resources. - Value []*StaticSiteUserProvidedFunctionAppARMResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// StaticSiteZipDeployment - A static site zip deployment. -type StaticSiteZipDeployment struct { - // URL for the zipped api content - APIZipURL *string `json:"apiZipUrl,omitempty"` - - // URL for the zipped app content - AppZipURL *string `json:"appZipUrl,omitempty"` - - // A title to label the deployment - DeploymentTitle *string `json:"deploymentTitle,omitempty"` - - // The language of the api content, if it exists - FunctionLanguage *string `json:"functionLanguage,omitempty"` - - // The provider submitting this deployment - Provider *string `json:"provider,omitempty"` -} - -// StaticSiteZipDeploymentARMResource - Static site zip deployment ARM resource. -type StaticSiteZipDeploymentARMResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *StaticSiteZipDeployment `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection -// method. -type StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain -// method. -type StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginCreateOrUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSite -// method. -type StaticSitesClientBeginCreateOrUpdateStaticSiteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild -// method. -type StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSite -// method. -type StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.BeginDeletePrivateEndpointConnection -// method. -type StaticSitesClientBeginDeletePrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginDeleteStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteBuild -// method. -type StaticSitesClientBeginDeleteStaticSiteBuildOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteCustomDomain -// method. -type StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginDeleteStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSite -// method. -type StaticSitesClientBeginDeleteStaticSiteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginDetachStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDetachStaticSite -// method. -type StaticSitesClientBeginDetachStaticSiteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions contains the optional parameters for the -// StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild method. -type StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions struct { - // Specify true to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is - // already configured on the function app. The default is false. - IsForced *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite -// method. -type StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions struct { - // Specify true to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is - // already configured on the function app. The default is false. - IsForced *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite -// method. -type StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteAppSettings -// method. -type StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings -// method. -type StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings -// method. -type StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings -// method. -type StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateUserRolesInvitationLinkOptions contains the optional parameters for the StaticSitesClient.CreateUserRolesInvitationLink -// method. -type StaticSitesClientCreateUserRolesInvitationLinkOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientDeleteStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.DeleteStaticSiteUser -// method. -type StaticSitesClientDeleteStaticSiteUserOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild -// method. -type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions contains the optional parameters for the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite -// method. -type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnectionList -// method. -type StaticSitesClientGetPrivateEndpointConnectionListOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnection -// method. -type StaticSitesClientGetPrivateEndpointConnectionOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetPrivateLinkResourcesOptions contains the optional parameters for the StaticSitesClient.GetPrivateLinkResources -// method. -type StaticSitesClientGetPrivateLinkResourcesOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteBuild -// method. -type StaticSitesClientGetStaticSiteBuildOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetStaticSiteBuildsOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteBuilds -// method. -type StaticSitesClientGetStaticSiteBuildsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteCustomDomain -// method. -type StaticSitesClientGetStaticSiteCustomDomainOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetStaticSite method. -type StaticSitesClientGetStaticSiteOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetStaticSitesByResourceGroupOptions contains the optional parameters for the StaticSitesClient.GetStaticSitesByResourceGroup -// method. -type StaticSitesClientGetStaticSitesByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild -// method. -type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSite -// method. -type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild -// method. -type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite -// method. -type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListOptions contains the optional parameters for the StaticSitesClient.List method. -type StaticSitesClientListOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteAppSettings -// method. -type StaticSitesClientListStaticSiteAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildAppSettings -// method. -type StaticSitesClientListStaticSiteBuildAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildFunctionAppSettings -// method. -type StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteBuildFunctionsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildFunctions -// method. -type StaticSitesClientListStaticSiteBuildFunctionsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteConfiguredRolesOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteConfiguredRoles -// method. -type StaticSitesClientListStaticSiteConfiguredRolesOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteCustomDomainsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteCustomDomains -// method. -type StaticSitesClientListStaticSiteCustomDomainsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctionAppSettings -// method. -type StaticSitesClientListStaticSiteFunctionAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteFunctionsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctions -// method. -type StaticSitesClientListStaticSiteFunctionsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteSecretsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteSecrets -// method. -type StaticSitesClientListStaticSiteSecretsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteUsersOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteUsers -// method. -type StaticSitesClientListStaticSiteUsersOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientPreviewWorkflowOptions contains the optional parameters for the StaticSitesClient.PreviewWorkflow method. -type StaticSitesClientPreviewWorkflowOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientResetStaticSiteAPIKeyOptions contains the optional parameters for the StaticSitesClient.ResetStaticSiteAPIKey -// method. -type StaticSitesClientResetStaticSiteAPIKeyOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSite method. -type StaticSitesClientUpdateStaticSiteOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientUpdateStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSiteUser -// method. -type StaticSitesClientUpdateStaticSiteUserOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesWorkflowPreview - Preview for the Static Site Workflow to be generated -type StaticSitesWorkflowPreview struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSitesWorkflowPreview resource specific properties - Properties *StaticSitesWorkflowPreviewProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSitesWorkflowPreviewProperties - StaticSitesWorkflowPreview resource specific properties -type StaticSitesWorkflowPreviewProperties struct { - // READ-ONLY; The contents for the workflow file to be generated - Contents *string `json:"contents,omitempty" azure:"ro"` - - // READ-ONLY; The path for the workflow file to be generated - Path *string `json:"path,omitempty" azure:"ro"` -} - -// StaticSitesWorkflowPreviewRequest - Request entity for previewing the Static Site workflow -type StaticSitesWorkflowPreviewRequest struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StaticSitesWorkflowPreviewRequest resource specific properties - Properties *StaticSitesWorkflowPreviewRequestProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticSitesWorkflowPreviewRequestProperties - StaticSitesWorkflowPreviewRequest resource specific properties -type StaticSitesWorkflowPreviewRequestProperties struct { - // The target branch in the repository. - Branch *string `json:"branch,omitempty"` - - // Build properties to configure on the repository. - BuildProperties *StaticSiteBuildProperties `json:"buildProperties,omitempty"` - - // URL for the repository of the static site. - RepositoryURL *string `json:"repositoryUrl,omitempty"` -} - -// Status - Identify the status of the most severe insight generated by the detector. -type Status struct { - // Descriptive message. - Message *string `json:"message,omitempty"` - - // Level of the most severe insight generated by the detector. - StatusID *InsightStatus `json:"statusId,omitempty"` -} - -// StatusCodesBasedTrigger - Trigger based on status code. -type StatusCodesBasedTrigger struct { - // Request Count. - Count *int32 `json:"count,omitempty"` - - // Request Path - Path *string `json:"path,omitempty"` - - // HTTP status code. - Status *int32 `json:"status,omitempty"` - - // Request Sub Status. - SubStatus *int32 `json:"subStatus,omitempty"` - - // Time interval. - TimeInterval *string `json:"timeInterval,omitempty"` - - // Win32 error code. - Win32Status *int32 `json:"win32Status,omitempty"` -} - -// StatusCodesRangeBasedTrigger - Trigger based on range of status codes. -type StatusCodesRangeBasedTrigger struct { - // Request Count. - Count *int32 `json:"count,omitempty"` - Path *string `json:"path,omitempty"` - - // HTTP status code. - StatusCodes *string `json:"statusCodes,omitempty"` - - // Time interval. - TimeInterval *string `json:"timeInterval,omitempty"` -} - -// StorageMigrationOptions - Options for app content migration. -type StorageMigrationOptions struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StorageMigrationOptions resource specific properties - Properties *StorageMigrationOptionsProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StorageMigrationOptionsProperties - StorageMigrationOptions resource specific properties -type StorageMigrationOptionsProperties struct { - // REQUIRED; AzureFiles connection string. - AzurefilesConnectionString *string `json:"azurefilesConnectionString,omitempty"` - - // REQUIRED; AzureFiles share. - AzurefilesShare *string `json:"azurefilesShare,omitempty"` - - // true if the app should be read only during copy operation; otherwise, false. - BlockWriteAccessToSite *bool `json:"blockWriteAccessToSite,omitempty"` - - // trueif the app should be switched over; otherwise, false. - SwitchSiteAfterMigration *bool `json:"switchSiteAfterMigration,omitempty"` -} - -// StorageMigrationResponse - Response for a migration of app content request. -type StorageMigrationResponse struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // StorageMigrationResponse resource specific properties - Properties *StorageMigrationResponseProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StorageMigrationResponseProperties - StorageMigrationResponse resource specific properties -type StorageMigrationResponseProperties struct { - // READ-ONLY; When server starts the migration process, it will return an operation ID identifying that particular migration - // operation. - OperationID *string `json:"operationId,omitempty" azure:"ro"` -} - -// StringDictionary - String dictionary resource. -type StringDictionary struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Settings. - Properties map[string]*string `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StringList - String list resource. -type StringList struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // List of string resources. - Properties []*string `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SupportTopic - Defines a unique Support Topic -type SupportTopic struct { - // READ-ONLY; Support Topic Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Unique resource Id - PesID *string `json:"pesId,omitempty" azure:"ro"` -} - -// SwiftVirtualNetwork - Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network -// integration. -type SwiftVirtualNetwork struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // SwiftVirtualNetwork resource specific properties - Properties *SwiftVirtualNetworkProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SwiftVirtualNetworkProperties - SwiftVirtualNetwork resource specific properties -type SwiftVirtualNetworkProperties struct { - // 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"` - - // 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 { - // List of container definitions for the Container App. - Containers []*Container `json:"containers,omitempty"` - - // Dapr configuration for the Container App. - Dapr *Dapr `json:"dapr,omitempty"` - - // User friendly suffix that is appended to the revision name - RevisionSuffix *string `json:"revisionSuffix,omitempty"` - - // Scaling properties for the Container App. - Scale *Scale `json:"scale,omitempty"` -} - -// TldLegalAgreement - Legal agreement for a top level domain. -type TldLegalAgreement struct { - // REQUIRED; Unique identifier for the agreement. - AgreementKey *string `json:"agreementKey,omitempty"` - - // REQUIRED; Agreement details. - Content *string `json:"content,omitempty"` - - // REQUIRED; Agreement title. - Title *string `json:"title,omitempty"` - - // 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 { - // REQUIRED; Collection of resources. - Value []*TldLegalAgreement `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// TokenStore - The configuration settings of the token store. -type TokenStore struct { - // The configuration settings of the storage of the tokens if blob storage is used. - AzureBlobStorage *BlobStorageTokenStore `json:"azureBlobStorage,omitempty"` - - // 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"` - - // The configuration settings of the storage of the tokens if a file system is used. - FileSystem *FileSystemTokenStore `json:"fileSystem,omitempty"` - - // 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"` -} - -// TopLevelDomain - A top level domain object. -type TopLevelDomain struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // TopLevelDomain resource specific properties - Properties *TopLevelDomainProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// TopLevelDomainAgreementOption - Options for retrieving the list of top level domain legal agreements. -type TopLevelDomainAgreementOption struct { - // If true, then the list of agreements will include agreements for domain transfer as well; otherwise, false. - ForTransfer *bool `json:"forTransfer,omitempty"` - - // If true, then the list of agreements will include agreements for domain privacy as well; otherwise, false. - IncludePrivacy *bool `json:"includePrivacy,omitempty"` -} - -// TopLevelDomainCollection - Collection of Top-level domains. -type TopLevelDomainCollection struct { - // REQUIRED; Collection of resources. - Value []*TopLevelDomain `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// TopLevelDomainProperties - TopLevelDomain resource specific properties -type TopLevelDomainProperties struct { - // If true, then the top level domain supports domain privacy; otherwise, false. - Privacy *bool `json:"privacy,omitempty"` -} - -// TopLevelDomainsClientGetOptions contains the optional parameters for the TopLevelDomainsClient.Get method. -type TopLevelDomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// TopLevelDomainsClientListAgreementsOptions contains the optional parameters for the TopLevelDomainsClient.ListAgreements -// method. -type TopLevelDomainsClientListAgreementsOptions struct { - // placeholder for future optional parameters -} - -// TopLevelDomainsClientListOptions contains the optional parameters for the TopLevelDomainsClient.List method. -type TopLevelDomainsClientListOptions struct { - // placeholder for future optional parameters -} - -// TrafficWeight - Traffic weight assigned to a revision -type TrafficWeight struct { - // Indicates that the traffic weight belongs to a latest stable revision - LatestRevision *bool `json:"latestRevision,omitempty"` - - // Name of a revision - RevisionName *string `json:"revisionName,omitempty"` - - // Traffic weight assigned to a revision - Weight *int32 `json:"weight,omitempty"` -} - -// TriggeredJobHistory - Triggered Web Job History. List of Triggered Web Job Run Information elements. -type TriggeredJobHistory struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // TriggeredJobHistory resource specific properties - Properties *TriggeredJobHistoryProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// TriggeredJobHistoryCollection - Collection of Kudu continuous web job information elements. -type TriggeredJobHistoryCollection struct { - // REQUIRED; Collection of resources. - Value []*TriggeredJobHistory `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// TriggeredJobHistoryProperties - TriggeredJobHistory resource specific properties -type TriggeredJobHistoryProperties struct { - // List of triggered web job runs. - Runs []*TriggeredJobRun `json:"runs,omitempty"` -} - -// TriggeredJobRun - Triggered Web Job Run Information. -type TriggeredJobRun struct { - // Job duration. - Duration *string `json:"duration,omitempty"` - - // End time. - EndTime *time.Time `json:"end_time,omitempty"` - - // Error URL. - ErrorURL *string `json:"error_url,omitempty"` - - // Job name. - JobName *string `json:"job_name,omitempty"` - - // Output URL. - OutputURL *string `json:"output_url,omitempty"` - - // Start time. - StartTime *time.Time `json:"start_time,omitempty"` - - // Job status. - Status *TriggeredWebJobStatus `json:"status,omitempty"` - - // Job trigger. - Trigger *string `json:"trigger,omitempty"` - - // Job URL. - URL *string `json:"url,omitempty"` - - // Job ID. - WebJobID *string `json:"web_job_id,omitempty"` - - // Job name. - WebJobName *string `json:"web_job_name,omitempty"` -} - -// TriggeredWebJob - Triggered Web Job Information. -type TriggeredWebJob struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // TriggeredWebJob resource specific properties - Properties *TriggeredWebJobProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// TriggeredWebJobCollection - Collection of Kudu continuous web job information elements. -type TriggeredWebJobCollection struct { - // REQUIRED; Collection of resources. - Value []*TriggeredWebJob `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// TriggeredWebJobProperties - TriggeredWebJob resource specific properties -type TriggeredWebJobProperties struct { - // Error information. - Error *string `json:"error,omitempty"` - - // Extra Info URL. - ExtraInfoURL *string `json:"extra_info_url,omitempty"` - - // History URL. - HistoryURL *string `json:"history_url,omitempty"` - - // Latest job run information. - LatestRun *TriggeredJobRun `json:"latest_run,omitempty"` - - // Run command. - RunCommand *string `json:"run_command,omitempty"` - - // Scheduler Logs URL. - SchedulerLogsURL *string `json:"scheduler_logs_url,omitempty"` - - // Job settings. - Settings map[string]interface{} `json:"settings,omitempty"` - - // Job URL. - URL *string `json:"url,omitempty"` - - // Using SDK? - UsingSdk *bool `json:"using_sdk,omitempty"` - - // Job type. - WebJobType *WebJobType `json:"web_job_type,omitempty"` -} - -// Twitter - The configuration settings of the Twitter provider. -type Twitter struct { - // false if the Twitter provider should not be enabled despite the set registration; otherwise, true. - Enabled *bool `json:"enabled,omitempty"` - - // The configuration settings of the app registration for the Twitter provider. - Registration *TwitterRegistration `json:"registration,omitempty"` -} - -// TwitterRegistration - The configuration settings of the app registration for the Twitter provider. -type TwitterRegistration struct { - // 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"` - - // 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"` -} - -// Usage of the quota resource. -type Usage struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Usage resource specific properties - Properties *UsageProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// UsageCollection - Collection of usages. -type UsageCollection struct { - // REQUIRED; Collection of resources. - Value []*Usage `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// UsageProperties - Usage resource specific properties -type UsageProperties struct { - // READ-ONLY; Compute mode used for this usage. - ComputeMode *ComputeModeOptions `json:"computeMode,omitempty" azure:"ro"` - - // READ-ONLY; The current value of the resource counter. - CurrentValue *int64 `json:"currentValue,omitempty" azure:"ro"` - - // READ-ONLY; Friendly name shown in the UI. - DisplayName *string `json:"displayName,omitempty" azure:"ro"` - - // READ-ONLY; The resource limit. - Limit *int64 `json:"limit,omitempty" azure:"ro"` - - // READ-ONLY; Next reset time for the resource counter. - NextResetTime *time.Time `json:"nextResetTime,omitempty" azure:"ro"` - - // READ-ONLY; Name of the quota resource. - ResourceName *string `json:"resourceName,omitempty" azure:"ro"` - - // READ-ONLY; Site mode used for this usage. - SiteMode *string `json:"siteMode,omitempty" azure:"ro"` - - // READ-ONLY; Units of measurement for the quota resource. - Unit *string `json:"unit,omitempty" azure:"ro"` -} - -// User credentials used for publishing activity. -type User struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // User resource specific properties - Properties *UserProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// UserAssignedIdentity - User Assigned identity. -type UserAssignedIdentity struct { - // READ-ONLY; Client Id of user assigned identity - ClientID *string `json:"clientId,omitempty" azure:"ro"` - - // READ-ONLY; Principal Id of user assigned identity - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` -} - -// UserProperties - User resource specific properties -type UserProperties struct { - // REQUIRED; Username used for publishing. - PublishingUserName *string `json:"publishingUserName,omitempty"` - - // Password used for publishing. - PublishingPassword *string `json:"publishingPassword,omitempty"` - - // Password hash used for publishing. - PublishingPasswordHash *string `json:"publishingPasswordHash,omitempty"` - - // Password hash salt used for publishing. - PublishingPasswordHashSalt *string `json:"publishingPasswordHashSalt,omitempty"` - - // Url of SCM site. - ScmURI *string `json:"scmUri,omitempty"` -} - -// ValidateProperties - App properties used for validation. -type ValidateProperties struct { - // App Service Environment Properties - AppServiceEnvironment *Environment `json:"appServiceEnvironment,omitempty"` - - // Target capacity of the App Service plan (number of VMs). - Capacity *int32 `json:"capacity,omitempty"` - - // Platform (windows or linux) - ContainerImagePlatform *string `json:"containerImagePlatform,omitempty"` - - // Repository name (image name) - ContainerImageRepository *string `json:"containerImageRepository,omitempty"` - - // Image tag - ContainerImageTag *string `json:"containerImageTag,omitempty"` - - // Base URL of the container registry - ContainerRegistryBaseURL *string `json:"containerRegistryBaseUrl,omitempty"` - - // Password for to access the container registry - ContainerRegistryPassword *string `json:"containerRegistryPassword,omitempty"` - - // Username for to access the container registry - ContainerRegistryUsername *string `json:"containerRegistryUsername,omitempty"` - - // Name of App Service Environment where app or App Service plan should be created. - HostingEnvironment *string `json:"hostingEnvironment,omitempty"` - - // true if App Service plan is for Spot instances; otherwise, false. - IsSpot *bool `json:"isSpot,omitempty"` - - // true if App Service plan is running as a windows container - IsXenon *bool `json:"isXenon,omitempty"` - - // true if App Service plan is for Linux workers; otherwise, false. - NeedLinuxWorkers *bool `json:"needLinuxWorkers,omitempty"` - - // Name of the target SKU for the App Service plan. - SKUName *string `json:"skuName,omitempty"` - - // ARM resource ID of an App Service plan that would host the app. - ServerFarmID *string `json:"serverFarmId,omitempty"` -} - -// ValidateRequest - Resource validation request content. -type ValidateRequest struct { - // REQUIRED; Expected location of the resource. - Location *string `json:"location,omitempty"` - - // REQUIRED; Resource name to verify. - Name *string `json:"name,omitempty"` - - // REQUIRED; Properties of the resource to validate. - Properties *ValidateProperties `json:"properties,omitempty"` - - // REQUIRED; Resource type used for verification. - Type *ValidateResourceTypes `json:"type,omitempty"` -} - -// ValidateResponse - Describes the result of resource validation. -type ValidateResponse struct { - // Error details for the case when validation fails. - Error *ValidateResponseError `json:"error,omitempty"` - - // Result of validation. - Status *string `json:"status,omitempty"` -} - -// ValidateResponseError - Error details for when validation fails. -type ValidateResponseError struct { - // Validation error code. - Code *string `json:"code,omitempty"` - - // Validation error message. - Message *string `json:"message,omitempty"` -} - -// VirtualApplication - Virtual application in an app. -type VirtualApplication struct { - // Physical path. - PhysicalPath *string `json:"physicalPath,omitempty"` - - // true if preloading is enabled; otherwise, false. - PreloadEnabled *bool `json:"preloadEnabled,omitempty"` - - // Virtual directories for virtual application. - VirtualDirectories []*VirtualDirectory `json:"virtualDirectories,omitempty"` - - // Virtual path. - VirtualPath *string `json:"virtualPath,omitempty"` -} - -// VirtualDirectory - Directory for virtual application. -type VirtualDirectory struct { - // Physical path. - PhysicalPath *string `json:"physicalPath,omitempty"` - - // Path to virtual application. - VirtualPath *string `json:"virtualPath,omitempty"` -} - -// VirtualIPMapping - Virtual IP mapping. -type VirtualIPMapping struct { - // Is virtual IP mapping in use. - InUse *bool `json:"inUse,omitempty"` - - // Internal HTTP port. - InternalHTTPPort *int32 `json:"internalHttpPort,omitempty"` - - // Internal HTTPS port. - InternalHTTPSPort *int32 `json:"internalHttpsPort,omitempty"` - - // name of the service that virtual IP is assigned to - ServiceName *string `json:"serviceName,omitempty"` - - // Virtual IP address. - VirtualIP *string `json:"virtualIP,omitempty"` -} - -// VirtualNetworkProfile - Specification for using a Virtual Network. -type VirtualNetworkProfile struct { - // REQUIRED; Resource id of the Virtual Network. - ID *string `json:"id,omitempty"` - - // Subnet within the Virtual Network. - Subnet *string `json:"subnet,omitempty"` - - // READ-ONLY; Name of the Virtual Network (read-only). - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type of the Virtual Network (read-only). - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VnetGateway - The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN -// package. -type VnetGateway struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // VnetGateway resource specific properties - Properties *VnetGatewayProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VnetGatewayProperties - VnetGateway resource specific properties -type VnetGatewayProperties struct { - // REQUIRED; The URI where the VPN package can be downloaded. - VPNPackageURI *string `json:"vpnPackageUri,omitempty"` - - // The Virtual Network name. - VnetName *string `json:"vnetName,omitempty"` -} - -// VnetInfo - Virtual Network information contract. -type VnetInfo struct { - // 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"` - - // DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. - DNSServers *string `json:"dnsServers,omitempty"` - - // Flag that is used to denote if this is VNET injection - IsSwift *bool `json:"isSwift,omitempty"` - - // The Virtual Network's resource ID. - VnetResourceID *string `json:"vnetResourceId,omitempty"` - - // READ-ONLY; The client certificate thumbprint. - CertThumbprint *string `json:"certThumbprint,omitempty" azure:"ro"` - - // READ-ONLY; true if a resync is required; otherwise, false. - ResyncRequired *bool `json:"resyncRequired,omitempty" azure:"ro"` - - // READ-ONLY; The routes that this Virtual Network connection uses. - Routes []*VnetRoute `json:"routes,omitempty" azure:"ro"` -} - -// VnetInfoResource - Virtual Network information ARM resource. -type VnetInfoResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *VnetInfo `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VnetParameters - The required set of inputs to validate a VNET -type VnetParameters struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // VnetParameters resource specific properties - Properties *VnetParametersProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VnetParametersProperties - VnetParameters resource specific properties -type VnetParametersProperties struct { - // The ARM Resource ID of the subnet to validate - SubnetResourceID *string `json:"subnetResourceId,omitempty"` - - // The name of the VNET to be validated - VnetName *string `json:"vnetName,omitempty"` - - // The Resource Group of the VNET to be validated - VnetResourceGroup *string `json:"vnetResourceGroup,omitempty"` - - // The subnet name to be validated - VnetSubnetName *string `json:"vnetSubnetName,omitempty"` -} - -// VnetRoute - Virtual Network route contract used to pass routing information for a Virtual Network. -type VnetRoute struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // VnetRoute resource specific properties - Properties *VnetRouteProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VnetRouteProperties - VnetRoute resource specific properties -type VnetRouteProperties struct { - // The ending address for this route. If the start address is specified in CIDR notation, this must be omitted. - EndAddress *string `json:"endAddress,omitempty"` - - // 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. - RouteType *RouteType `json:"routeType,omitempty"` - - // 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"` -} - -// VnetValidationFailureDetails - A class that describes the reason for a validation failure. -type VnetValidationFailureDetails struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // VnetValidationFailureDetails resource specific properties - Properties *VnetValidationFailureDetailsProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VnetValidationFailureDetailsProperties - VnetValidationFailureDetails resource specific properties -type VnetValidationFailureDetailsProperties struct { - // A flag describing whether or not validation failed. - Failed *bool `json:"failed,omitempty"` - - // A list of tests that failed in the validation. - FailedTests []*VnetValidationTestFailure `json:"failedTests,omitempty"` - - // Text describing the validation outcome. - Message *string `json:"message,omitempty"` - - // A list of warnings generated during validation. - Warnings []*VnetValidationTestFailure `json:"warnings,omitempty"` -} - -// VnetValidationTestFailure - A class that describes a test that failed during NSG and UDR validation. -type VnetValidationTestFailure struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // VnetValidationTestFailure resource specific properties - Properties *VnetValidationTestFailureProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VnetValidationTestFailureProperties - VnetValidationTestFailure resource specific properties -type VnetValidationTestFailureProperties struct { - // The details of what caused the failure, e.g. the blocking rule name, etc. - Details *string `json:"details,omitempty"` - - // The name of the test that failed. - TestName *string `json:"testName,omitempty"` -} - -// WebAppCollection - Collection of App Service apps. -type WebAppCollection struct { - // REQUIRED; Collection of resources. - Value []*Site `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// WebAppInstanceStatusCollection - Collection of app instances. -type WebAppInstanceStatusCollection struct { - // REQUIRED; Collection of resources. - Value []*WebSiteInstanceStatus `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// WebAppMajorVersion - Web App stack major version. -type WebAppMajorVersion struct { - // READ-ONLY; Web App stack major version (display only). - DisplayText *string `json:"displayText,omitempty" azure:"ro"` - - // READ-ONLY; Minor versions associated with the major version. - MinorVersions []*WebAppMinorVersion `json:"minorVersions,omitempty" azure:"ro"` - - // READ-ONLY; Web App stack major version name. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// WebAppMinorVersion - Web App stack minor version. -type WebAppMinorVersion struct { - // READ-ONLY; Web App stack minor version (display only). - DisplayText *string `json:"displayText,omitempty" azure:"ro"` - - // READ-ONLY; Settings associated with the minor version. - StackSettings *WebAppRuntimes `json:"stackSettings,omitempty" azure:"ro"` - - // READ-ONLY; Web App stack major version name. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// WebAppRuntimeSettings - Web App runtime settings. -type WebAppRuntimeSettings struct { - // READ-ONLY; Application Insights settings associated with the minor version. - AppInsightsSettings *AppInsightsWebAppStackSettings `json:"appInsightsSettings,omitempty" azure:"ro"` - - // READ-ONLY; End-of-life date for the minor version. - EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty" azure:"ro"` - - // READ-ONLY; GitHub Actions settings associated with the minor version. - GitHubActionSettings *GitHubActionWebAppStackSettings `json:"gitHubActionSettings,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack version is auto-updated; otherwise, false. - IsAutoUpdate *bool `json:"isAutoUpdate,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack is deprecated; otherwise, false. - IsDeprecated *bool `json:"isDeprecated,omitempty" azure:"ro"` - - // READ-ONLY; true if the minor version is early-access; otherwise, false. - IsEarlyAccess *bool `json:"isEarlyAccess,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack should be hidden; otherwise, false. - IsHidden *bool `json:"isHidden,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack is in preview; otherwise, false. - IsPreview *bool `json:"isPreview,omitempty" azure:"ro"` - - // READ-ONLY; true if remote debugging is supported for the stack; otherwise, false. - RemoteDebuggingSupported *bool `json:"remoteDebuggingSupported,omitempty" azure:"ro"` - - // READ-ONLY; Web App stack minor version (runtime only). - RuntimeVersion *string `json:"runtimeVersion,omitempty" azure:"ro"` -} - -// WebAppRuntimes - Web App stack runtimes. -type WebAppRuntimes struct { - // READ-ONLY; Linux-specific settings associated with the Java container minor version. - LinuxContainerSettings *LinuxJavaContainerSettings `json:"linuxContainerSettings,omitempty" azure:"ro"` - - // READ-ONLY; Linux-specific settings associated with the minor version. - LinuxRuntimeSettings *WebAppRuntimeSettings `json:"linuxRuntimeSettings,omitempty" azure:"ro"` - - // READ-ONLY; Windows-specific settings associated with the Java container minor version. - WindowsContainerSettings *WindowsJavaContainerSettings `json:"windowsContainerSettings,omitempty" azure:"ro"` - - // READ-ONLY; Windows-specific settings associated with the minor version. - WindowsRuntimeSettings *WebAppRuntimeSettings `json:"windowsRuntimeSettings,omitempty" azure:"ro"` -} - -// WebAppStack - Web App stack. -type WebAppStack struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // WebAppStack resource specific properties - Properties *WebAppStackProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Web App stack location. - Location *string `json:"location,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WebAppStackCollection - Collection of Web app Stacks -type WebAppStackCollection struct { - // REQUIRED; Collection of resources. - Value []*WebAppStack `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// WebAppStackProperties - WebAppStack resource specific properties -type WebAppStackProperties struct { - // READ-ONLY; Web App stack (display only). - DisplayText *string `json:"displayText,omitempty" azure:"ro"` - - // READ-ONLY; List of major versions available. - MajorVersions []*WebAppMajorVersion `json:"majorVersions,omitempty" azure:"ro"` - - // READ-ONLY; Web App stack preferred OS. - PreferredOs *StackPreferredOs `json:"preferredOs,omitempty" azure:"ro"` - - // READ-ONLY; Web App stack name. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// WebAppsClientAddPremierAddOnOptions contains the optional parameters for the WebAppsClient.AddPremierAddOn method. -type WebAppsClientAddPremierAddOnOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientAddPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.AddPremierAddOnSlot method. -type WebAppsClientAddPremierAddOnSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientAnalyzeCustomHostnameOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostname -// method. -type WebAppsClientAnalyzeCustomHostnameOptions struct { - // Custom hostname. - HostName *string -} - -// WebAppsClientAnalyzeCustomHostnameSlotOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostnameSlot -// method. -type WebAppsClientAnalyzeCustomHostnameSlotOptions struct { - // Custom hostname. - HostName *string -} - -// WebAppsClientApplySlotConfigToProductionOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigToProduction -// method. -type WebAppsClientApplySlotConfigToProductionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientApplySlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigurationSlot -// method. -type WebAppsClientApplySlotConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientBackupOptions contains the optional parameters for the WebAppsClient.Backup method. -type WebAppsClientBackupOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientBackupSlotOptions contains the optional parameters for the WebAppsClient.BackupSlot method. -type WebAppsClientBackupSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection -// method. -type WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot -// method. -type WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginCreateFunctionOptions contains the optional parameters for the WebAppsClient.BeginCreateFunction method. -type WebAppsClientBeginCreateFunctionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginCreateInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceFunctionSlot -// method. -type WebAppsClientBeginCreateInstanceFunctionSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginCreateInstanceMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperation -// method. -type WebAppsClientBeginCreateInstanceMSDeployOperationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperationSlot -// method. -type WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginCreateMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperation -// method. -type WebAppsClientBeginCreateMSDeployOperationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginCreateMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperationSlot -// method. -type WebAppsClientBeginCreateMSDeployOperationSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdate method. -type WebAppsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginCreateOrUpdateSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSlot -// method. -type WebAppsClientBeginCreateOrUpdateSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginCreateOrUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControl -// method. -type WebAppsClientBeginCreateOrUpdateSourceControlOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControlSlot -// method. -type WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnection -// method. -type WebAppsClientBeginDeletePrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnectionSlot -// method. -type WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginInstallSiteExtensionOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtension -// method. -type WebAppsClientBeginInstallSiteExtensionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginInstallSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtensionSlot -// method. -type WebAppsClientBeginInstallSiteExtensionSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginListPublishingCredentialsOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentials -// method. -type WebAppsClientBeginListPublishingCredentialsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginListPublishingCredentialsSlotOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentialsSlot -// method. -type WebAppsClientBeginListPublishingCredentialsSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginMigrateMySQLOptions contains the optional parameters for the WebAppsClient.BeginMigrateMySQL method. -type WebAppsClientBeginMigrateMySQLOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginMigrateStorageOptions contains the optional parameters for the WebAppsClient.BeginMigrateStorage method. -type WebAppsClientBeginMigrateStorageOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreFromBackupBlobOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlob -// method. -type WebAppsClientBeginRestoreFromBackupBlobOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreFromBackupBlobSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlobSlot -// method. -type WebAppsClientBeginRestoreFromBackupBlobSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreFromDeletedAppOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedApp -// method. -type WebAppsClientBeginRestoreFromDeletedAppOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreFromDeletedAppSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedAppSlot -// method. -type WebAppsClientBeginRestoreFromDeletedAppSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreOptions contains the optional parameters for the WebAppsClient.BeginRestore method. -type WebAppsClientBeginRestoreOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSlot method. -type WebAppsClientBeginRestoreSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreSnapshotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshot method. -type WebAppsClientBeginRestoreSnapshotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreSnapshotSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshotSlot -// method. -type WebAppsClientBeginRestoreSnapshotSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginStartNetworkTraceOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTrace -// method. -type WebAppsClientBeginStartNetworkTraceOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // Resumes the LRO from the provided token. - ResumeToken string - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientBeginStartNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTraceSlot -// method. -type WebAppsClientBeginStartNetworkTraceSlotOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // Resumes the LRO from the provided token. - ResumeToken string - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperation -// method. -type WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // Resumes the LRO from the provided token. - ResumeToken string - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot -// method. -type WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // Resumes the LRO from the provided token. - ResumeToken string - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientBeginSwapSlotOptions contains the optional parameters for the WebAppsClient.BeginSwapSlot method. -type WebAppsClientBeginSwapSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginSwapSlotWithProductionOptions contains the optional parameters for the WebAppsClient.BeginSwapSlotWithProduction -// method. -type WebAppsClientBeginSwapSlotWithProductionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientCreateDeploymentOptions contains the optional parameters for the WebAppsClient.CreateDeployment method. -type WebAppsClientCreateDeploymentOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateDeploymentSlotOptions contains the optional parameters for the WebAppsClient.CreateDeploymentSlot method. -type WebAppsClientCreateDeploymentSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOneDeployOperationOptions contains the optional parameters for the WebAppsClient.CreateOneDeployOperation -// method. -type WebAppsClientCreateOneDeployOperationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfiguration -// method. -type WebAppsClientCreateOrUpdateConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfigurationSlot -// method. -type WebAppsClientCreateOrUpdateConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier -// method. -type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot -// method. -type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateFunctionSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecret -// method. -type WebAppsClientCreateOrUpdateFunctionSecretOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecretSlot -// method. -type WebAppsClientCreateOrUpdateFunctionSecretSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHostNameBindingOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBinding -// method. -type WebAppsClientCreateOrUpdateHostNameBindingOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBindingSlot -// method. -type WebAppsClientCreateOrUpdateHostNameBindingSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHostSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecret -// method. -type WebAppsClientCreateOrUpdateHostSecretOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHostSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecretSlot -// method. -type WebAppsClientCreateOrUpdateHostSecretSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnection -// method. -type WebAppsClientCreateOrUpdateHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnectionSlot -// method. -type WebAppsClientCreateOrUpdateHybridConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdatePublicCertificateOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificate -// method. -type WebAppsClientCreateOrUpdatePublicCertificateOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdatePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificateSlot -// method. -type WebAppsClientCreateOrUpdatePublicCertificateSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnection -// method. -type WebAppsClientCreateOrUpdateRelayServiceConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot -// method. -type WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck -// method. -type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot -// method. -type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGateway -// method. -type WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot -// method. -type WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnection -// method. -type WebAppsClientCreateOrUpdateVnetConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionSlot -// method. -type WebAppsClientCreateOrUpdateVnetConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteBackupConfigurationOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfiguration -// method. -type WebAppsClientDeleteBackupConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfigurationSlot -// method. -type WebAppsClientDeleteBackupConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteBackupOptions contains the optional parameters for the WebAppsClient.DeleteBackup method. -type WebAppsClientDeleteBackupOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteBackupSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupSlot method. -type WebAppsClientDeleteBackupSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteContinuousWebJobOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJob -// method. -type WebAppsClientDeleteContinuousWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJobSlot -// method. -type WebAppsClientDeleteContinuousWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteDeploymentOptions contains the optional parameters for the WebAppsClient.DeleteDeployment method. -type WebAppsClientDeleteDeploymentOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteDeploymentSlotOptions contains the optional parameters for the WebAppsClient.DeleteDeploymentSlot method. -type WebAppsClientDeleteDeploymentSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifier -// method. -type WebAppsClientDeleteDomainOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifierSlot -// method. -type WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteFunctionOptions contains the optional parameters for the WebAppsClient.DeleteFunction method. -type WebAppsClientDeleteFunctionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteFunctionSecretOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecret method. -type WebAppsClientDeleteFunctionSecretOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecretSlot -// method. -type WebAppsClientDeleteFunctionSecretSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHostNameBindingOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBinding -// method. -type WebAppsClientDeleteHostNameBindingOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBindingSlot -// method. -type WebAppsClientDeleteHostNameBindingSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHostSecretOptions contains the optional parameters for the WebAppsClient.DeleteHostSecret method. -type WebAppsClientDeleteHostSecretOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHostSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostSecretSlot method. -type WebAppsClientDeleteHostSecretSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHybridConnectionOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnection -// method. -type WebAppsClientDeleteHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnectionSlot -// method. -type WebAppsClientDeleteHybridConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceFunctionSlot -// method. -type WebAppsClientDeleteInstanceFunctionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteInstanceProcessOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcess -// method. -type WebAppsClientDeleteInstanceProcessOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcessSlot -// method. -type WebAppsClientDeleteInstanceProcessSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteOptions contains the optional parameters for the WebAppsClient.Delete method. -type WebAppsClientDeleteOptions struct { - // Specify false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. - DeleteEmptyServerFarm *bool - // If true, web app metrics are also deleted. - DeleteMetrics *bool -} - -// WebAppsClientDeletePremierAddOnOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOn method. -type WebAppsClientDeletePremierAddOnOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeletePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOnSlot -// method. -type WebAppsClientDeletePremierAddOnSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteProcessOptions contains the optional parameters for the WebAppsClient.DeleteProcess method. -type WebAppsClientDeleteProcessOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteProcessSlot method. -type WebAppsClientDeleteProcessSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeletePublicCertificateOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificate -// method. -type WebAppsClientDeletePublicCertificateOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeletePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificateSlot -// method. -type WebAppsClientDeletePublicCertificateSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnection -// method. -type WebAppsClientDeleteRelayServiceConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnectionSlot -// method. -type WebAppsClientDeleteRelayServiceConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteSiteExtensionOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtension method. -type WebAppsClientDeleteSiteExtensionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtensionSlot -// method. -type WebAppsClientDeleteSiteExtensionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteSlotOptions contains the optional parameters for the WebAppsClient.DeleteSlot method. -type WebAppsClientDeleteSlotOptions struct { - // Specify false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. - DeleteEmptyServerFarm *bool - // If true, web app metrics are also deleted. - DeleteMetrics *bool -} - -// WebAppsClientDeleteSourceControlOptions contains the optional parameters for the WebAppsClient.DeleteSourceControl method. -type WebAppsClientDeleteSourceControlOptions struct { - AdditionalFlags *string -} - -// WebAppsClientDeleteSourceControlSlotOptions contains the optional parameters for the WebAppsClient.DeleteSourceControlSlot -// method. -type WebAppsClientDeleteSourceControlSlotOptions struct { - AdditionalFlags *string -} - -// WebAppsClientDeleteSwiftVirtualNetworkOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetwork -// method. -type WebAppsClientDeleteSwiftVirtualNetworkOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteSwiftVirtualNetworkSlotOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetworkSlot -// method. -type WebAppsClientDeleteSwiftVirtualNetworkSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJob -// method. -type WebAppsClientDeleteTriggeredWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJobSlot -// method. -type WebAppsClientDeleteTriggeredWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteVnetConnectionOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnection method. -type WebAppsClientDeleteVnetConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnectionSlot -// method. -type WebAppsClientDeleteVnetConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDiscoverBackupOptions contains the optional parameters for the WebAppsClient.DiscoverBackup method. -type WebAppsClientDiscoverBackupOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDiscoverBackupSlotOptions contains the optional parameters for the WebAppsClient.DiscoverBackupSlot method. -type WebAppsClientDiscoverBackupSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGenerateNewSitePublishingPasswordOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPassword -// method. -type WebAppsClientGenerateNewSitePublishingPasswordOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGenerateNewSitePublishingPasswordSlotOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPasswordSlot -// method. -type WebAppsClientGenerateNewSitePublishingPasswordSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAppSettingKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReference -// method. -type WebAppsClientGetAppSettingKeyVaultReferenceOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReferenceSlot -// method. -type WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAppSettingsKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.GetAppSettingsKeyVaultReferences -// method. -type WebAppsClientGetAppSettingsKeyVaultReferencesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.GetAppSettingsKeyVaultReferencesSlot -// method. -type WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsOptions contains the optional parameters for the WebAppsClient.GetAuthSettings method. -type WebAppsClientGetAuthSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsSlot method. -type WebAppsClientGetAuthSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsV2Options contains the optional parameters for the WebAppsClient.GetAuthSettingsV2 method. -type WebAppsClientGetAuthSettingsV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2Slot -// method. -type WebAppsClientGetAuthSettingsV2SlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsV2WithoutSecretsOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecrets -// method. -type WebAppsClientGetAuthSettingsV2WithoutSecretsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot -// method. -type WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetBackupConfigurationOptions contains the optional parameters for the WebAppsClient.GetBackupConfiguration -// method. -type WebAppsClientGetBackupConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetBackupConfigurationSlot -// method. -type WebAppsClientGetBackupConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetBackupStatusOptions contains the optional parameters for the WebAppsClient.GetBackupStatus method. -type WebAppsClientGetBackupStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetBackupStatusSlotOptions contains the optional parameters for the WebAppsClient.GetBackupStatusSlot method. -type WebAppsClientGetBackupStatusSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetConfigurationOptions contains the optional parameters for the WebAppsClient.GetConfiguration method. -type WebAppsClientGetConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSlot method. -type WebAppsClientGetConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshot -// method. -type WebAppsClientGetConfigurationSnapshotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshotSlot -// method. -type WebAppsClientGetConfigurationSnapshotSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetContainerLogsZipOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZip method. -type WebAppsClientGetContainerLogsZipOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetContainerLogsZipSlotOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZipSlot -// method. -type WebAppsClientGetContainerLogsZipSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetContinuousWebJobOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJob method. -type WebAppsClientGetContinuousWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJobSlot -// method. -type WebAppsClientGetContinuousWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDeploymentOptions contains the optional parameters for the WebAppsClient.GetDeployment method. -type WebAppsClientGetDeploymentOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDeploymentSlotOptions contains the optional parameters for the WebAppsClient.GetDeploymentSlot method. -type WebAppsClientGetDeploymentSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDiagnosticLogsConfigurationOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfiguration -// method. -type WebAppsClientGetDiagnosticLogsConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDiagnosticLogsConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfigurationSlot -// method. -type WebAppsClientGetDiagnosticLogsConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifier -// method. -type WebAppsClientGetDomainOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifierSlot -// method. -type WebAppsClientGetDomainOwnershipIdentifierSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetFtpAllowedOptions contains the optional parameters for the WebAppsClient.GetFtpAllowed method. -type WebAppsClientGetFtpAllowedOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetFtpAllowedSlot method. -type WebAppsClientGetFtpAllowedSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetFunctionOptions contains the optional parameters for the WebAppsClient.GetFunction method. -type WebAppsClientGetFunctionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetFunctionsAdminTokenOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminToken -// method. -type WebAppsClientGetFunctionsAdminTokenOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetFunctionsAdminTokenSlotOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminTokenSlot -// method. -type WebAppsClientGetFunctionsAdminTokenSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetHostNameBindingOptions contains the optional parameters for the WebAppsClient.GetHostNameBinding method. -type WebAppsClientGetHostNameBindingOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.GetHostNameBindingSlot -// method. -type WebAppsClientGetHostNameBindingSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetHybridConnectionOptions contains the optional parameters for the WebAppsClient.GetHybridConnection method. -type WebAppsClientGetHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetHybridConnectionSlot -// method. -type WebAppsClientGetHybridConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceFunctionSlot -// method. -type WebAppsClientGetInstanceFunctionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceInfoOptions contains the optional parameters for the WebAppsClient.GetInstanceInfo method. -type WebAppsClientGetInstanceInfoOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceInfoSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceInfoSlot method. -type WebAppsClientGetInstanceInfoSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLog -// method. -type WebAppsClientGetInstanceMSDeployLogOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLogSlot -// method. -type WebAppsClientGetInstanceMSDeployLogSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceMsDeployStatusOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatus -// method. -type WebAppsClientGetInstanceMsDeployStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceMsDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatusSlot -// method. -type WebAppsClientGetInstanceMsDeployStatusSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessDumpOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDump -// method. -type WebAppsClientGetInstanceProcessDumpOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDumpSlot -// method. -type WebAppsClientGetInstanceProcessDumpSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessModuleOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModule -// method. -type WebAppsClientGetInstanceProcessModuleOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModuleSlot -// method. -type WebAppsClientGetInstanceProcessModuleSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessOptions contains the optional parameters for the WebAppsClient.GetInstanceProcess method. -type WebAppsClientGetInstanceProcessOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessSlot -// method. -type WebAppsClientGetInstanceProcessSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetMSDeployLog method. -type WebAppsClientGetMSDeployLogOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployLogSlot method. -type WebAppsClientGetMSDeployLogSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMSDeployStatusOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatus method. -type WebAppsClientGetMSDeployStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMSDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatusSlot -// method. -type WebAppsClientGetMSDeployStatusSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMigrateMySQLStatusOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatus -// method. -type WebAppsClientGetMigrateMySQLStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMigrateMySQLStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatusSlot -// method. -type WebAppsClientGetMigrateMySQLStatusSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperation -// method. -type WebAppsClientGetNetworkTraceOperationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlot -// method. -type WebAppsClientGetNetworkTraceOperationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTraceOperationSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlotV2 -// method. -type WebAppsClientGetNetworkTraceOperationSlotV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTraceOperationV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationV2 -// method. -type WebAppsClientGetNetworkTraceOperationV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTracesOptions contains the optional parameters for the WebAppsClient.GetNetworkTraces method. -type WebAppsClientGetNetworkTracesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTracesSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTracesSlot method. -type WebAppsClientGetNetworkTracesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTracesSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesSlotV2 -// method. -type WebAppsClientGetNetworkTracesSlotV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTracesV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesV2 method. -type WebAppsClientGetNetworkTracesV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetOneDeployStatusOptions contains the optional parameters for the WebAppsClient.GetOneDeployStatus method. -type WebAppsClientGetOneDeployStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetOptions contains the optional parameters for the WebAppsClient.Get method. -type WebAppsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPremierAddOnOptions contains the optional parameters for the WebAppsClient.GetPremierAddOn method. -type WebAppsClientGetPremierAddOnOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.GetPremierAddOnSlot method. -type WebAppsClientGetPremierAddOnSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateAccessOptions contains the optional parameters for the WebAppsClient.GetPrivateAccess method. -type WebAppsClientGetPrivateAccessOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateAccessSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateAccessSlot method. -type WebAppsClientGetPrivateAccessSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionList -// method. -type WebAppsClientGetPrivateEndpointConnectionListOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateEndpointConnectionListSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionListSlot -// method. -type WebAppsClientGetPrivateEndpointConnectionListSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnection -// method. -type WebAppsClientGetPrivateEndpointConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionSlot -// method. -type WebAppsClientGetPrivateEndpointConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateLinkResourcesOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResources -// method. -type WebAppsClientGetPrivateLinkResourcesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateLinkResourcesSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResourcesSlot -// method. -type WebAppsClientGetPrivateLinkResourcesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessDumpOptions contains the optional parameters for the WebAppsClient.GetProcessDump method. -type WebAppsClientGetProcessDumpOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetProcessDumpSlot method. -type WebAppsClientGetProcessDumpSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessModuleOptions contains the optional parameters for the WebAppsClient.GetProcessModule method. -type WebAppsClientGetProcessModuleOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetProcessModuleSlot method. -type WebAppsClientGetProcessModuleSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessOptions contains the optional parameters for the WebAppsClient.GetProcess method. -type WebAppsClientGetProcessOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessSlotOptions contains the optional parameters for the WebAppsClient.GetProcessSlot method. -type WebAppsClientGetProcessSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPublicCertificateOptions contains the optional parameters for the WebAppsClient.GetPublicCertificate method. -type WebAppsClientGetPublicCertificateOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.GetPublicCertificateSlot -// method. -type WebAppsClientGetPublicCertificateSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnection -// method. -type WebAppsClientGetRelayServiceConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnectionSlot -// method. -type WebAppsClientGetRelayServiceConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetScmAllowedOptions contains the optional parameters for the WebAppsClient.GetScmAllowed method. -type WebAppsClientGetScmAllowedOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetScmAllowedSlot method. -type WebAppsClientGetScmAllowedSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReference -// method. -type WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot -// method. -type WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferences -// method. -type WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferencesSlot -// method. -type WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteExtensionOptions contains the optional parameters for the WebAppsClient.GetSiteExtension method. -type WebAppsClientGetSiteExtensionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.GetSiteExtensionSlot method. -type WebAppsClientGetSiteExtensionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSitePhpErrorLogFlagOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlag -// method. -type WebAppsClientGetSitePhpErrorLogFlagOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSitePhpErrorLogFlagSlotOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlagSlot -// method. -type WebAppsClientGetSitePhpErrorLogFlagSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSlotOptions contains the optional parameters for the WebAppsClient.GetSlot method. -type WebAppsClientGetSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSourceControlOptions contains the optional parameters for the WebAppsClient.GetSourceControl method. -type WebAppsClientGetSourceControlOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSourceControlSlotOptions contains the optional parameters for the WebAppsClient.GetSourceControlSlot method. -type WebAppsClientGetSourceControlSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSwiftVirtualNetworkConnectionOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnection -// method. -type WebAppsClientGetSwiftVirtualNetworkConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnectionSlot -// method. -type WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistory -// method. -type WebAppsClientGetTriggeredWebJobHistoryOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistorySlot -// method. -type WebAppsClientGetTriggeredWebJobHistorySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJob method. -type WebAppsClientGetTriggeredWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobSlot -// method. -type WebAppsClientGetTriggeredWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGateway -// method. -type WebAppsClientGetVnetConnectionGatewayOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGatewaySlot -// method. -type WebAppsClientGetVnetConnectionGatewaySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetVnetConnectionOptions contains the optional parameters for the WebAppsClient.GetVnetConnection method. -type WebAppsClientGetVnetConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionSlot -// method. -type WebAppsClientGetVnetConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetWebJobOptions contains the optional parameters for the WebAppsClient.GetWebJob method. -type WebAppsClientGetWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetWebJobSlot method. -type WebAppsClientGetWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetWebSiteContainerLogsOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogs -// method. -type WebAppsClientGetWebSiteContainerLogsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetWebSiteContainerLogsSlotOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogsSlot -// method. -type WebAppsClientGetWebSiteContainerLogsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientIsCloneableOptions contains the optional parameters for the WebAppsClient.IsCloneable method. -type WebAppsClientIsCloneableOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientIsCloneableSlotOptions contains the optional parameters for the WebAppsClient.IsCloneableSlot method. -type WebAppsClientIsCloneableSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListApplicationSettingsOptions contains the optional parameters for the WebAppsClient.ListApplicationSettings -// method. -type WebAppsClientListApplicationSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListApplicationSettingsSlot -// method. -type WebAppsClientListApplicationSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccounts -// method. -type WebAppsClientListAzureStorageAccountsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccountsSlot -// method. -type WebAppsClientListAzureStorageAccountsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBackupStatusSecretsOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecrets -// method. -type WebAppsClientListBackupStatusSecretsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBackupStatusSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecretsSlot -// method. -type WebAppsClientListBackupStatusSecretsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBackupsOptions contains the optional parameters for the WebAppsClient.ListBackups method. -type WebAppsClientListBackupsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBackupsSlotOptions contains the optional parameters for the WebAppsClient.ListBackupsSlot method. -type WebAppsClientListBackupsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBasicPublishingCredentialsPoliciesOptions contains the optional parameters for the WebAppsClient.ListBasicPublishingCredentialsPolicies -// method. -type WebAppsClientListBasicPublishingCredentialsPoliciesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions contains the optional parameters for the WebAppsClient.ListBasicPublishingCredentialsPoliciesSlot -// method. -type WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListByResourceGroupOptions contains the optional parameters for the WebAppsClient.ListByResourceGroup method. -type WebAppsClientListByResourceGroupOptions struct { - // Specify true to include deployment slots in results. The default is false, which only gives you the production slot of - // all apps. - IncludeSlots *bool -} - -// WebAppsClientListConfigurationSnapshotInfoOptions contains the optional parameters for the WebAppsClient.ListConfigurationSnapshotInfo -// method. -type WebAppsClientListConfigurationSnapshotInfoOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListConfigurationSnapshotInfoSlotOptions contains the optional parameters for the WebAppsClient.ListConfigurationSnapshotInfoSlot -// method. -type WebAppsClientListConfigurationSnapshotInfoSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListConfigurationsOptions contains the optional parameters for the WebAppsClient.ListConfigurations method. -type WebAppsClientListConfigurationsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListConfigurationsSlotOptions contains the optional parameters for the WebAppsClient.ListConfigurationsSlot -// method. -type WebAppsClientListConfigurationsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListConnectionStringsOptions contains the optional parameters for the WebAppsClient.ListConnectionStrings -// method. -type WebAppsClientListConnectionStringsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.ListConnectionStringsSlot -// method. -type WebAppsClientListConnectionStringsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListContinuousWebJobsOptions contains the optional parameters for the WebAppsClient.ListContinuousWebJobs -// method. -type WebAppsClientListContinuousWebJobsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListContinuousWebJobsSlotOptions contains the optional parameters for the WebAppsClient.ListContinuousWebJobsSlot -// method. -type WebAppsClientListContinuousWebJobsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDeploymentLogOptions contains the optional parameters for the WebAppsClient.ListDeploymentLog method. -type WebAppsClientListDeploymentLogOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDeploymentLogSlotOptions contains the optional parameters for the WebAppsClient.ListDeploymentLogSlot -// method. -type WebAppsClientListDeploymentLogSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDeploymentsOptions contains the optional parameters for the WebAppsClient.ListDeployments method. -type WebAppsClientListDeploymentsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDeploymentsSlotOptions contains the optional parameters for the WebAppsClient.ListDeploymentsSlot method. -type WebAppsClientListDeploymentsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDomainOwnershipIdentifiersOptions contains the optional parameters for the WebAppsClient.ListDomainOwnershipIdentifiers -// method. -type WebAppsClientListDomainOwnershipIdentifiersOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDomainOwnershipIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.ListDomainOwnershipIdentifiersSlot -// method. -type WebAppsClientListDomainOwnershipIdentifiersSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListFunctionKeysOptions contains the optional parameters for the WebAppsClient.ListFunctionKeys method. -type WebAppsClientListFunctionKeysOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListFunctionKeysSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionKeysSlot method. -type WebAppsClientListFunctionKeysSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListFunctionSecretsOptions contains the optional parameters for the WebAppsClient.ListFunctionSecrets method. -type WebAppsClientListFunctionSecretsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListFunctionSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionSecretsSlot -// method. -type WebAppsClientListFunctionSecretsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListFunctionsOptions contains the optional parameters for the WebAppsClient.ListFunctions method. -type WebAppsClientListFunctionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHostKeysOptions contains the optional parameters for the WebAppsClient.ListHostKeys method. -type WebAppsClientListHostKeysOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHostKeysSlotOptions contains the optional parameters for the WebAppsClient.ListHostKeysSlot method. -type WebAppsClientListHostKeysSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHostNameBindingsOptions contains the optional parameters for the WebAppsClient.ListHostNameBindings method. -type WebAppsClientListHostNameBindingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHostNameBindingsSlotOptions contains the optional parameters for the WebAppsClient.ListHostNameBindingsSlot -// method. -type WebAppsClientListHostNameBindingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHybridConnectionsOptions contains the optional parameters for the WebAppsClient.ListHybridConnections -// method. -type WebAppsClientListHybridConnectionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHybridConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListHybridConnectionsSlot -// method. -type WebAppsClientListHybridConnectionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceFunctionsSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceFunctionsSlot -// method. -type WebAppsClientListInstanceFunctionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceIdentifiersOptions contains the optional parameters for the WebAppsClient.ListInstanceIdentifiers -// method. -type WebAppsClientListInstanceIdentifiersOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceIdentifiersSlot -// method. -type WebAppsClientListInstanceIdentifiersSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessModulesOptions contains the optional parameters for the WebAppsClient.ListInstanceProcessModules -// method. -type WebAppsClientListInstanceProcessModulesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceProcessModulesSlot -// method. -type WebAppsClientListInstanceProcessModulesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessThreadsOptions contains the optional parameters for the WebAppsClient.ListInstanceProcessThreads -// method. -type WebAppsClientListInstanceProcessThreadsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceProcessThreadsSlot -// method. -type WebAppsClientListInstanceProcessThreadsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessesOptions contains the optional parameters for the WebAppsClient.ListInstanceProcesses -// method. -type WebAppsClientListInstanceProcessesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessesSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceProcessesSlot -// method. -type WebAppsClientListInstanceProcessesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListMetadataOptions contains the optional parameters for the WebAppsClient.ListMetadata method. -type WebAppsClientListMetadataOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListMetadataSlotOptions contains the optional parameters for the WebAppsClient.ListMetadataSlot method. -type WebAppsClientListMetadataSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListNetworkFeaturesOptions contains the optional parameters for the WebAppsClient.ListNetworkFeatures method. -type WebAppsClientListNetworkFeaturesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListNetworkFeaturesSlotOptions contains the optional parameters for the WebAppsClient.ListNetworkFeaturesSlot -// method. -type WebAppsClientListNetworkFeaturesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListOptions contains the optional parameters for the WebAppsClient.List method. -type WebAppsClientListOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPerfMonCountersOptions contains the optional parameters for the WebAppsClient.ListPerfMonCounters method. -type WebAppsClientListPerfMonCountersOptions struct { - // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z - // and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - // duration'[Hour|Minute|Day]'. - Filter *string -} - -// WebAppsClientListPerfMonCountersSlotOptions contains the optional parameters for the WebAppsClient.ListPerfMonCountersSlot -// method. -type WebAppsClientListPerfMonCountersSlotOptions struct { - // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z - // and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - // duration'[Hour|Minute|Day]'. - Filter *string -} - -// WebAppsClientListPremierAddOnsOptions contains the optional parameters for the WebAppsClient.ListPremierAddOns method. -type WebAppsClientListPremierAddOnsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPremierAddOnsSlotOptions contains the optional parameters for the WebAppsClient.ListPremierAddOnsSlot -// method. -type WebAppsClientListPremierAddOnsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessModulesOptions contains the optional parameters for the WebAppsClient.ListProcessModules method. -type WebAppsClientListProcessModulesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.ListProcessModulesSlot -// method. -type WebAppsClientListProcessModulesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessThreadsOptions contains the optional parameters for the WebAppsClient.ListProcessThreads method. -type WebAppsClientListProcessThreadsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.ListProcessThreadsSlot -// method. -type WebAppsClientListProcessThreadsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessesOptions contains the optional parameters for the WebAppsClient.ListProcesses method. -type WebAppsClientListProcessesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessesSlotOptions contains the optional parameters for the WebAppsClient.ListProcessesSlot method. -type WebAppsClientListProcessesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPublicCertificatesOptions contains the optional parameters for the WebAppsClient.ListPublicCertificates -// method. -type WebAppsClientListPublicCertificatesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPublicCertificatesSlotOptions contains the optional parameters for the WebAppsClient.ListPublicCertificatesSlot -// method. -type WebAppsClientListPublicCertificatesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPublishingProfileXMLWithSecretsOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecrets -// method. -type WebAppsClientListPublishingProfileXMLWithSecretsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecretsSlot -// method. -type WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListRelayServiceConnectionsOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnections -// method. -type WebAppsClientListRelayServiceConnectionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListRelayServiceConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnectionsSlot -// method. -type WebAppsClientListRelayServiceConnectionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSiteBackupsOptions contains the optional parameters for the WebAppsClient.ListSiteBackups method. -type WebAppsClientListSiteBackupsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSiteBackupsSlotOptions contains the optional parameters for the WebAppsClient.ListSiteBackupsSlot method. -type WebAppsClientListSiteBackupsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSiteExtensionsOptions contains the optional parameters for the WebAppsClient.ListSiteExtensions method. -type WebAppsClientListSiteExtensionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSiteExtensionsSlotOptions contains the optional parameters for the WebAppsClient.ListSiteExtensionsSlot -// method. -type WebAppsClientListSiteExtensionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSitePushSettingsOptions contains the optional parameters for the WebAppsClient.ListSitePushSettings method. -type WebAppsClientListSitePushSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListSitePushSettingsSlot -// method. -type WebAppsClientListSitePushSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.ListSlotConfigurationNames -// method. -type WebAppsClientListSlotConfigurationNamesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSlotDifferencesFromProductionOptions contains the optional parameters for the WebAppsClient.ListSlotDifferencesFromProduction -// method. -type WebAppsClientListSlotDifferencesFromProductionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSlotDifferencesSlotOptions contains the optional parameters for the WebAppsClient.ListSlotDifferencesSlot -// method. -type WebAppsClientListSlotDifferencesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSlotsOptions contains the optional parameters for the WebAppsClient.ListSlots method. -type WebAppsClientListSlotsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSnapshotsFromDRSecondaryOptions contains the optional parameters for the WebAppsClient.ListSnapshotsFromDRSecondary -// method. -type WebAppsClientListSnapshotsFromDRSecondaryOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSnapshotsFromDRSecondarySlotOptions contains the optional parameters for the WebAppsClient.ListSnapshotsFromDRSecondarySlot -// method. -type WebAppsClientListSnapshotsFromDRSecondarySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSnapshotsOptions contains the optional parameters for the WebAppsClient.ListSnapshots method. -type WebAppsClientListSnapshotsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSnapshotsSlotOptions contains the optional parameters for the WebAppsClient.ListSnapshotsSlot method. -type WebAppsClientListSnapshotsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggers -// method. -type WebAppsClientListSyncFunctionTriggersOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggersSlot -// method. -type WebAppsClientListSyncFunctionTriggersSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSyncStatusOptions contains the optional parameters for the WebAppsClient.ListSyncStatus method. -type WebAppsClientListSyncStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSyncStatusSlotOptions contains the optional parameters for the WebAppsClient.ListSyncStatusSlot method. -type WebAppsClientListSyncStatusSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.ListTriggeredWebJobHistory -// method. -type WebAppsClientListTriggeredWebJobHistoryOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.ListTriggeredWebJobHistorySlot -// method. -type WebAppsClientListTriggeredWebJobHistorySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListTriggeredWebJobsOptions contains the optional parameters for the WebAppsClient.ListTriggeredWebJobs method. -type WebAppsClientListTriggeredWebJobsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListTriggeredWebJobsSlotOptions contains the optional parameters for the WebAppsClient.ListTriggeredWebJobsSlot -// method. -type WebAppsClientListTriggeredWebJobsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListUsagesOptions contains the optional parameters for the WebAppsClient.ListUsages method. -type WebAppsClientListUsagesOptions struct { - // Return only information specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - // name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq - // 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. - Filter *string -} - -// WebAppsClientListUsagesSlotOptions contains the optional parameters for the WebAppsClient.ListUsagesSlot method. -type WebAppsClientListUsagesSlotOptions struct { - // Return only information specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - // name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq - // 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. - Filter *string -} - -// WebAppsClientListVnetConnectionsOptions contains the optional parameters for the WebAppsClient.ListVnetConnections method. -type WebAppsClientListVnetConnectionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListVnetConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListVnetConnectionsSlot -// method. -type WebAppsClientListVnetConnectionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListWebJobsOptions contains the optional parameters for the WebAppsClient.ListWebJobs method. -type WebAppsClientListWebJobsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListWebJobsSlotOptions contains the optional parameters for the WebAppsClient.ListWebJobsSlot method. -type WebAppsClientListWebJobsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientPutPrivateAccessVnetOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnet method. -type WebAppsClientPutPrivateAccessVnetOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientPutPrivateAccessVnetSlotOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnetSlot -// method. -type WebAppsClientPutPrivateAccessVnetSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientRecoverSiteConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshot -// method. -type WebAppsClientRecoverSiteConfigurationSnapshotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshotSlot -// method. -type WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientResetProductionSlotConfigOptions contains the optional parameters for the WebAppsClient.ResetProductionSlotConfig -// method. -type WebAppsClientResetProductionSlotConfigOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientResetSlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ResetSlotConfigurationSlot -// method. -type WebAppsClientResetSlotConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientRestartOptions contains the optional parameters for the WebAppsClient.Restart method. -type WebAppsClientRestartOptions struct { - // Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts - // and reprovisions the app. - SoftRestart *bool - // Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). - Synchronous *bool -} - -// WebAppsClientRestartSlotOptions contains the optional parameters for the WebAppsClient.RestartSlot method. -type WebAppsClientRestartSlotOptions struct { - // Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts - // and reprovisions the app. - SoftRestart *bool - // Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). - Synchronous *bool -} - -// WebAppsClientRunTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJob method. -type WebAppsClientRunTriggeredWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientRunTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJobSlot -// method. -type WebAppsClientRunTriggeredWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStartContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJob -// method. -type WebAppsClientStartContinuousWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStartContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJobSlot -// method. -type WebAppsClientStartContinuousWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStartOptions contains the optional parameters for the WebAppsClient.Start method. -type WebAppsClientStartOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStartSlotOptions contains the optional parameters for the WebAppsClient.StartSlot method. -type WebAppsClientStartSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStartWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTrace -// method. -type WebAppsClientStartWebSiteNetworkTraceOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientStartWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTraceSlot -// method. -type WebAppsClientStartWebSiteNetworkTraceSlotOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientStopContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJob method. -type WebAppsClientStopContinuousWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJobSlot -// method. -type WebAppsClientStopContinuousWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopNetworkTrace method. -type WebAppsClientStopNetworkTraceOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopNetworkTraceSlot method. -type WebAppsClientStopNetworkTraceSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopOptions contains the optional parameters for the WebAppsClient.Stop method. -type WebAppsClientStopOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopSlotOptions contains the optional parameters for the WebAppsClient.StopSlot method. -type WebAppsClientStopSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTrace -// method. -type WebAppsClientStopWebSiteNetworkTraceOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTraceSlot -// method. -type WebAppsClientStopWebSiteNetworkTraceSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggers method. -type WebAppsClientSyncFunctionTriggersOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggersSlot -// method. -type WebAppsClientSyncFunctionTriggersSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncFunctionsOptions contains the optional parameters for the WebAppsClient.SyncFunctions method. -type WebAppsClientSyncFunctionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncFunctionsSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionsSlot method. -type WebAppsClientSyncFunctionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncRepositoryOptions contains the optional parameters for the WebAppsClient.SyncRepository method. -type WebAppsClientSyncRepositoryOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncRepositorySlotOptions contains the optional parameters for the WebAppsClient.SyncRepositorySlot method. -type WebAppsClientSyncRepositorySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateApplicationSettingsOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettings -// method. -type WebAppsClientUpdateApplicationSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettingsSlot -// method. -type WebAppsClientUpdateApplicationSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAuthSettingsOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettings method. -type WebAppsClientUpdateAuthSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsSlot -// method. -type WebAppsClientUpdateAuthSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAuthSettingsV2Options contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2 method. -type WebAppsClientUpdateAuthSettingsV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2Slot -// method. -type WebAppsClientUpdateAuthSettingsV2SlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccounts -// method. -type WebAppsClientUpdateAzureStorageAccountsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccountsSlot -// method. -type WebAppsClientUpdateAzureStorageAccountsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateBackupConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfiguration -// method. -type WebAppsClientUpdateBackupConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfigurationSlot -// method. -type WebAppsClientUpdateBackupConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateConfiguration method. -type WebAppsClientUpdateConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateConfigurationSlot -// method. -type WebAppsClientUpdateConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateConnectionStringsOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStrings -// method. -type WebAppsClientUpdateConnectionStringsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStringsSlot -// method. -type WebAppsClientUpdateConnectionStringsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateDiagnosticLogsConfigOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfig -// method. -type WebAppsClientUpdateDiagnosticLogsConfigOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateDiagnosticLogsConfigSlotOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfigSlot -// method. -type WebAppsClientUpdateDiagnosticLogsConfigSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifier -// method. -type WebAppsClientUpdateDomainOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifierSlot -// method. -type WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateFtpAllowedOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowed method. -type WebAppsClientUpdateFtpAllowedOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowedSlot method. -type WebAppsClientUpdateFtpAllowedSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnection -// method. -type WebAppsClientUpdateHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnectionSlot -// method. -type WebAppsClientUpdateHybridConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateMetadataOptions contains the optional parameters for the WebAppsClient.UpdateMetadata method. -type WebAppsClientUpdateMetadataOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateMetadataSlotOptions contains the optional parameters for the WebAppsClient.UpdateMetadataSlot method. -type WebAppsClientUpdateMetadataSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateOptions contains the optional parameters for the WebAppsClient.Update method. -type WebAppsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdatePremierAddOnOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOn method. -type WebAppsClientUpdatePremierAddOnOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdatePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOnSlot -// method. -type WebAppsClientUpdatePremierAddOnSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnection -// method. -type WebAppsClientUpdateRelayServiceConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnectionSlot -// method. -type WebAppsClientUpdateRelayServiceConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateScmAllowedOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowed method. -type WebAppsClientUpdateScmAllowedOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowedSlot method. -type WebAppsClientUpdateScmAllowedSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSitePushSettingsOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettings -// method. -type WebAppsClientUpdateSitePushSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettingsSlot -// method. -type WebAppsClientUpdateSitePushSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.UpdateSlotConfigurationNames -// method. -type WebAppsClientUpdateSlotConfigurationNamesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSlotOptions contains the optional parameters for the WebAppsClient.UpdateSlot method. -type WebAppsClientUpdateSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.UpdateSourceControl method. -type WebAppsClientUpdateSourceControlOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.UpdateSourceControlSlot -// method. -type WebAppsClientUpdateSourceControlSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck -// method. -type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot -// method. -type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGateway -// method. -type WebAppsClientUpdateVnetConnectionGatewayOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGatewaySlot -// method. -type WebAppsClientUpdateVnetConnectionGatewaySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnection method. -type WebAppsClientUpdateVnetConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionSlot -// method. -type WebAppsClientUpdateVnetConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebJob - Web Job Information. -type WebJob struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // WebJob resource specific properties - Properties *WebJobProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WebJobCollection - Collection of Kudu web job information elements. -type WebJobCollection struct { - // REQUIRED; Collection of resources. - Value []*WebJob `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// WebJobProperties - WebJob resource specific properties -type WebJobProperties struct { - // Error information. - Error *string `json:"error,omitempty"` - - // Extra Info URL. - ExtraInfoURL *string `json:"extra_info_url,omitempty"` - - // Run command. - RunCommand *string `json:"run_command,omitempty"` - - // Job settings. - Settings map[string]interface{} `json:"settings,omitempty"` - - // Job URL. - URL *string `json:"url,omitempty"` - - // Using SDK? - UsingSdk *bool `json:"using_sdk,omitempty"` - - // Job type. - WebJobType *WebJobType `json:"web_job_type,omitempty"` -} - -type WebSiteInstanceStatus struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // WebSiteInstanceStatus resource specific properties - Properties *WebSiteInstanceStatusProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WebSiteInstanceStatusProperties - WebSiteInstanceStatus resource specific properties -type WebSiteInstanceStatusProperties struct { - // Link to the console to web app instance - ConsoleURL *string `json:"consoleUrl,omitempty"` - - // Dictionary of - Containers map[string]*ContainerInfo `json:"containers,omitempty"` - - // Link to the Diagnose and Solve Portal - DetectorURL *string `json:"detectorUrl,omitempty"` - - // Link to the console to web app instance - HealthCheckURL *string `json:"healthCheckUrl,omitempty"` - State *SiteRuntimeState `json:"state,omitempty"` - - // Link to the GetStatusApi in Kudu - StatusURL *string `json:"statusUrl,omitempty"` -} - -// WebSiteManagementClientCheckNameAvailabilityOptions contains the optional parameters for the WebSiteManagementClient.CheckNameAvailability -// method. -type WebSiteManagementClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientGetPublishingUserOptions contains the optional parameters for the WebSiteManagementClient.GetPublishingUser -// method. -type WebSiteManagementClientGetPublishingUserOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientGetSourceControlOptions contains the optional parameters for the WebSiteManagementClient.GetSourceControl -// method. -type WebSiteManagementClientGetSourceControlOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions contains the optional parameters for the WebSiteManagementClient.GetSubscriptionDeploymentLocations -// method. -type WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientListBillingMetersOptions contains the optional parameters for the WebSiteManagementClient.ListBillingMeters -// method. -type WebSiteManagementClientListBillingMetersOptions struct { - // Azure Location of billable resource - BillingLocation *string - // App Service OS type meters used for - OSType *string -} - -// WebSiteManagementClientListCustomHostNameSitesOptions contains the optional parameters for the WebSiteManagementClient.ListCustomHostNameSites -// method. -type WebSiteManagementClientListCustomHostNameSitesOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientListGeoRegionsOptions contains the optional parameters for the WebSiteManagementClient.ListGeoRegions -// method. -type WebSiteManagementClientListGeoRegionsOptions struct { - // Specify true if you want to filter to only regions that support Linux Consumption Workers. - LinuxDynamicWorkersEnabled *bool - // Specify true if you want to filter to only regions that support Linux workers. - LinuxWorkersEnabled *bool - // Name of SKU used to filter the regions. - SKU *SKUName - // Specify true if you want to filter to only regions that support Xenon workers. - XenonWorkersEnabled *bool -} - -// WebSiteManagementClientListPremierAddOnOffersOptions contains the optional parameters for the WebSiteManagementClient.ListPremierAddOnOffers -// method. -type WebSiteManagementClientListPremierAddOnOffersOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientListSKUsOptions contains the optional parameters for the WebSiteManagementClient.ListSKUs method. -type WebSiteManagementClientListSKUsOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions contains the optional parameters for the WebSiteManagementClient.ListSiteIdentifiersAssignedToHostName -// method. -type WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientListSourceControlsOptions contains the optional parameters for the WebSiteManagementClient.ListSourceControls -// method. -type WebSiteManagementClientListSourceControlsOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientMoveOptions contains the optional parameters for the WebSiteManagementClient.Move method. -type WebSiteManagementClientMoveOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientUpdatePublishingUserOptions contains the optional parameters for the WebSiteManagementClient.UpdatePublishingUser -// method. -type WebSiteManagementClientUpdatePublishingUserOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientUpdateSourceControlOptions contains the optional parameters for the WebSiteManagementClient.UpdateSourceControl -// method. -type WebSiteManagementClientUpdateSourceControlOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientValidateMoveOptions contains the optional parameters for the WebSiteManagementClient.ValidateMove -// method. -type WebSiteManagementClientValidateMoveOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientValidateOptions contains the optional parameters for the WebSiteManagementClient.Validate method. -type WebSiteManagementClientValidateOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientVerifyHostingEnvironmentVnetOptions contains the optional parameters for the WebSiteManagementClient.VerifyHostingEnvironmentVnet -// method. -type WebSiteManagementClientVerifyHostingEnvironmentVnetOptions struct { - // placeholder for future optional parameters -} - -// WindowsJavaContainerSettings - Windows Java Container settings. -type WindowsJavaContainerSettings struct { - // READ-ONLY; End-of-life date for the minor version. - EndOfLifeDate *time.Time `json:"endOfLifeDate,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack version is auto-updated; otherwise, false. - IsAutoUpdate *bool `json:"isAutoUpdate,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack is deprecated; otherwise, false. - IsDeprecated *bool `json:"isDeprecated,omitempty" azure:"ro"` - - // READ-ONLY; true if the minor version is early-access; otherwise, false. - IsEarlyAccess *bool `json:"isEarlyAccess,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack should be hidden; otherwise, false. - IsHidden *bool `json:"isHidden,omitempty" azure:"ro"` - - // READ-ONLY; true if the stack is in preview; otherwise, false. - IsPreview *bool `json:"isPreview,omitempty" azure:"ro"` - - // READ-ONLY; Java container (runtime only). - JavaContainer *string `json:"javaContainer,omitempty" azure:"ro"` - - // READ-ONLY; Java container version (runtime only). - JavaContainerVersion *string `json:"javaContainerVersion,omitempty" azure:"ro"` -} - -// WorkerPool - Worker pool of an App Service Environment. -type WorkerPool struct { - // Shared or dedicated app hosting. - ComputeMode *ComputeModeOptions `json:"computeMode,omitempty"` - - // Number of instances in the worker pool. - WorkerCount *int32 `json:"workerCount,omitempty"` - - // VM size of the worker pool instances. - WorkerSize *string `json:"workerSize,omitempty"` - - // Worker size ID for referencing this worker pool. - WorkerSizeID *int32 `json:"workerSizeId,omitempty"` - - // READ-ONLY; Names of all instances in the worker pool (read only). - InstanceNames []*string `json:"instanceNames,omitempty" azure:"ro"` -} - -// WorkerPoolCollection - Collection of worker pools. -type WorkerPoolCollection struct { - // REQUIRED; Collection of resources. - Value []*WorkerPoolResource `json:"value,omitempty"` - - // READ-ONLY; Link to next page of resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// WorkerPoolResource - Worker pool of an App Service Environment ARM resource. -type WorkerPoolResource struct { - // Kind of resource. - Kind *string `json:"kind,omitempty"` - - // Core resource properties - Properties *WorkerPool `json:"properties,omitempty"` - - // Description of a SKU for a scalable resource. - SKU *SKUDescription `json:"sku,omitempty"` - - // READ-ONLY; Resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_models_serde.go deleted file mode 100644 index 006f0136..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_models_serde.go +++ /dev/null @@ -1,5042 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type AbnormalTimePeriod. -func (a AbnormalTimePeriod) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "events", a.Events) - populate(objectMap, "solutions", a.Solutions) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AbnormalTimePeriod. -func (a *AbnormalTimePeriod) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) - delete(rawMsg, key) - case "events": - err = unpopulate(val, "Events", &a.Events) - delete(rawMsg, key) - case "solutions": - err = unpopulate(val, "Solutions", &a.Solutions) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AddressResponseProperties. -func (a AddressResponseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "internalIpAddress", a.InternalIPAddress) - populate(objectMap, "outboundIpAddresses", a.OutboundIPAddresses) - populate(objectMap, "serviceIpAddress", a.ServiceIPAddress) - populate(objectMap, "vipMappings", a.VipMappings) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AllowedAudiencesValidation. -func (a AllowedAudiencesValidation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedAudiences", a.AllowedAudiences) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AllowedPrincipals. -func (a AllowedPrincipals) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groups", a.Groups) - populate(objectMap, "identities", a.Identities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AnalysisData. -func (a AnalysisData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "data", a.Data) - populate(objectMap, "detectorDefinition", a.DetectorDefinition) - populate(objectMap, "detectorMetaData", a.DetectorMetaData) - populate(objectMap, "metrics", a.Metrics) - populate(objectMap, "source", a.Source) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AppCertificate. -func (a AppCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "kind", a.Kind) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AppCertificatePatchResource. -func (a AppCertificatePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "kind", a.Kind) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AppCertificatePatchResourceProperties. -func (a AppCertificatePatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "canonicalName", a.CanonicalName) - populateByteArray(objectMap, "cerBlob", a.CerBlob, runtime.Base64StdFormat) - populate(objectMap, "domainValidationMethod", a.DomainValidationMethod) - populateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "hostNames", a.HostNames) - populate(objectMap, "hostingEnvironmentProfile", a.HostingEnvironmentProfile) - populateTimeRFC3339(objectMap, "issueDate", a.IssueDate) - populate(objectMap, "issuer", a.Issuer) - populate(objectMap, "keyVaultId", a.KeyVaultID) - populate(objectMap, "keyVaultSecretName", a.KeyVaultSecretName) - populate(objectMap, "keyVaultSecretStatus", a.KeyVaultSecretStatus) - populate(objectMap, "password", a.Password) - populateByteArray(objectMap, "pfxBlob", a.PfxBlob, runtime.Base64StdFormat) - populate(objectMap, "publicKeyHash", a.PublicKeyHash) - populate(objectMap, "selfLink", a.SelfLink) - populate(objectMap, "serverFarmId", a.ServerFarmID) - populate(objectMap, "siteName", a.SiteName) - populate(objectMap, "subjectName", a.SubjectName) - populate(objectMap, "thumbprint", a.Thumbprint) - populate(objectMap, "valid", a.Valid) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificatePatchResourceProperties. -func (a *AppCertificatePatchResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "canonicalName": - err = unpopulate(val, "CanonicalName", &a.CanonicalName) - delete(rawMsg, key) - case "cerBlob": - err = runtime.DecodeByteArray(string(val), &a.CerBlob, runtime.Base64StdFormat) - delete(rawMsg, key) - case "domainValidationMethod": - err = unpopulate(val, "DomainValidationMethod", &a.DomainValidationMethod) - delete(rawMsg, key) - case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "hostNames": - err = unpopulate(val, "HostNames", &a.HostNames) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &a.HostingEnvironmentProfile) - delete(rawMsg, key) - case "issueDate": - err = unpopulateTimeRFC3339(val, "IssueDate", &a.IssueDate) - delete(rawMsg, key) - case "issuer": - err = unpopulate(val, "Issuer", &a.Issuer) - delete(rawMsg, key) - case "keyVaultId": - err = unpopulate(val, "KeyVaultID", &a.KeyVaultID) - delete(rawMsg, key) - case "keyVaultSecretName": - err = unpopulate(val, "KeyVaultSecretName", &a.KeyVaultSecretName) - delete(rawMsg, key) - case "keyVaultSecretStatus": - err = unpopulate(val, "KeyVaultSecretStatus", &a.KeyVaultSecretStatus) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &a.Password) - delete(rawMsg, key) - case "pfxBlob": - err = runtime.DecodeByteArray(string(val), &a.PfxBlob, runtime.Base64StdFormat) - delete(rawMsg, key) - case "publicKeyHash": - err = unpopulate(val, "PublicKeyHash", &a.PublicKeyHash) - delete(rawMsg, key) - case "selfLink": - err = unpopulate(val, "SelfLink", &a.SelfLink) - delete(rawMsg, key) - case "serverFarmId": - err = unpopulate(val, "ServerFarmID", &a.ServerFarmID) - delete(rawMsg, key) - case "siteName": - err = unpopulate(val, "SiteName", &a.SiteName) - delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &a.SubjectName) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &a.Thumbprint) - delete(rawMsg, key) - case "valid": - err = unpopulate(val, "Valid", &a.Valid) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AppCertificateProperties. -func (a AppCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "canonicalName", a.CanonicalName) - populateByteArray(objectMap, "cerBlob", a.CerBlob, runtime.Base64StdFormat) - populate(objectMap, "domainValidationMethod", a.DomainValidationMethod) - populateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "hostNames", a.HostNames) - populate(objectMap, "hostingEnvironmentProfile", a.HostingEnvironmentProfile) - populateTimeRFC3339(objectMap, "issueDate", a.IssueDate) - populate(objectMap, "issuer", a.Issuer) - populate(objectMap, "keyVaultId", a.KeyVaultID) - populate(objectMap, "keyVaultSecretName", a.KeyVaultSecretName) - populate(objectMap, "keyVaultSecretStatus", a.KeyVaultSecretStatus) - populate(objectMap, "password", a.Password) - populateByteArray(objectMap, "pfxBlob", a.PfxBlob, runtime.Base64StdFormat) - populate(objectMap, "publicKeyHash", a.PublicKeyHash) - populate(objectMap, "selfLink", a.SelfLink) - populate(objectMap, "serverFarmId", a.ServerFarmID) - populate(objectMap, "siteName", a.SiteName) - populate(objectMap, "subjectName", a.SubjectName) - populate(objectMap, "thumbprint", a.Thumbprint) - populate(objectMap, "valid", a.Valid) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AppCertificateProperties. -func (a *AppCertificateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "canonicalName": - err = unpopulate(val, "CanonicalName", &a.CanonicalName) - delete(rawMsg, key) - case "cerBlob": - err = runtime.DecodeByteArray(string(val), &a.CerBlob, runtime.Base64StdFormat) - delete(rawMsg, key) - case "domainValidationMethod": - err = unpopulate(val, "DomainValidationMethod", &a.DomainValidationMethod) - delete(rawMsg, key) - case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "hostNames": - err = unpopulate(val, "HostNames", &a.HostNames) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &a.HostingEnvironmentProfile) - delete(rawMsg, key) - case "issueDate": - err = unpopulateTimeRFC3339(val, "IssueDate", &a.IssueDate) - delete(rawMsg, key) - case "issuer": - err = unpopulate(val, "Issuer", &a.Issuer) - delete(rawMsg, key) - case "keyVaultId": - err = unpopulate(val, "KeyVaultID", &a.KeyVaultID) - delete(rawMsg, key) - case "keyVaultSecretName": - err = unpopulate(val, "KeyVaultSecretName", &a.KeyVaultSecretName) - delete(rawMsg, key) - case "keyVaultSecretStatus": - err = unpopulate(val, "KeyVaultSecretStatus", &a.KeyVaultSecretStatus) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &a.Password) - delete(rawMsg, key) - case "pfxBlob": - err = runtime.DecodeByteArray(string(val), &a.PfxBlob, runtime.Base64StdFormat) - delete(rawMsg, key) - case "publicKeyHash": - err = unpopulate(val, "PublicKeyHash", &a.PublicKeyHash) - delete(rawMsg, key) - case "selfLink": - err = unpopulate(val, "SelfLink", &a.SelfLink) - delete(rawMsg, key) - case "serverFarmId": - err = unpopulate(val, "ServerFarmID", &a.ServerFarmID) - delete(rawMsg, key) - case "siteName": - err = unpopulate(val, "SiteName", &a.SiteName) - delete(rawMsg, key) - case "subjectName": - err = unpopulate(val, "SubjectName", &a.SubjectName) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &a.Thumbprint) - delete(rawMsg, key) - case "valid": - err = unpopulate(val, "Valid", &a.Valid) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationStack. -func (a ApplicationStack) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dependency", a.Dependency) - populate(objectMap, "display", a.Display) - populate(objectMap, "frameworks", a.Frameworks) - populate(objectMap, "isDeprecated", a.IsDeprecated) - populate(objectMap, "majorVersions", a.MajorVersions) - populate(objectMap, "name", a.Name) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AseV3NetworkingConfigurationProperties. -func (a AseV3NetworkingConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowNewPrivateEndpointConnections", a.AllowNewPrivateEndpointConnections) - populate(objectMap, "externalInboundIpAddresses", a.ExternalInboundIPAddresses) - populate(objectMap, "internalInboundIpAddresses", a.InternalInboundIPAddresses) - populate(objectMap, "linuxOutboundIpAddresses", a.LinuxOutboundIPAddresses) - populate(objectMap, "windowsOutboundIpAddresses", a.WindowsOutboundIPAddresses) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AutoHealTriggers. -func (a AutoHealTriggers) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateBytesInKB", a.PrivateBytesInKB) - populate(objectMap, "requests", a.Requests) - populate(objectMap, "slowRequests", a.SlowRequests) - populate(objectMap, "slowRequestsWithPath", a.SlowRequestsWithPath) - populate(objectMap, "statusCodes", a.StatusCodes) - populate(objectMap, "statusCodesRange", a.StatusCodesRange) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureActiveDirectoryLogin. -func (a AzureActiveDirectoryLogin) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disableWWWAuthenticate", a.DisableWWWAuthenticate) - populate(objectMap, "loginParameters", a.LoginParameters) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureActiveDirectoryValidation. -func (a AzureActiveDirectoryValidation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedAudiences", a.AllowedAudiences) - populate(objectMap, "defaultAuthorizationPolicy", a.DefaultAuthorizationPolicy) - populate(objectMap, "jwtClaimChecks", a.JwtClaimChecks) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureStoragePropertyDictionaryResource. -func (a AzureStoragePropertyDictionaryResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "kind", a.Kind) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupItemProperties. -func (b BackupItemProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.BackupID) - populate(objectMap, "blobName", b.BlobName) - populate(objectMap, "correlationId", b.CorrelationID) - populateTimeRFC3339(objectMap, "created", b.Created) - populate(objectMap, "databases", b.Databases) - populateTimeRFC3339(objectMap, "finishedTimeStamp", b.FinishedTimeStamp) - populateTimeRFC3339(objectMap, "lastRestoreTimeStamp", b.LastRestoreTimeStamp) - populate(objectMap, "log", b.Log) - populate(objectMap, "name", b.Name) - populate(objectMap, "scheduled", b.Scheduled) - populate(objectMap, "sizeInBytes", b.SizeInBytes) - populate(objectMap, "status", b.Status) - populate(objectMap, "storageAccountUrl", b.StorageAccountURL) - populate(objectMap, "websiteSizeInBytes", b.WebsiteSizeInBytes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupItemProperties. -func (b *BackupItemProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "BackupID", &b.BackupID) - delete(rawMsg, key) - case "blobName": - err = unpopulate(val, "BlobName", &b.BlobName) - delete(rawMsg, key) - case "correlationId": - err = unpopulate(val, "CorrelationID", &b.CorrelationID) - delete(rawMsg, key) - case "created": - err = unpopulateTimeRFC3339(val, "Created", &b.Created) - delete(rawMsg, key) - case "databases": - err = unpopulate(val, "Databases", &b.Databases) - delete(rawMsg, key) - case "finishedTimeStamp": - err = unpopulateTimeRFC3339(val, "FinishedTimeStamp", &b.FinishedTimeStamp) - delete(rawMsg, key) - case "lastRestoreTimeStamp": - err = unpopulateTimeRFC3339(val, "LastRestoreTimeStamp", &b.LastRestoreTimeStamp) - delete(rawMsg, key) - case "log": - err = unpopulate(val, "Log", &b.Log) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "scheduled": - err = unpopulate(val, "Scheduled", &b.Scheduled) - delete(rawMsg, key) - case "sizeInBytes": - err = unpopulate(val, "SizeInBytes", &b.SizeInBytes) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &b.Status) - delete(rawMsg, key) - case "storageAccountUrl": - err = unpopulate(val, "StorageAccountURL", &b.StorageAccountURL) - delete(rawMsg, key) - case "websiteSizeInBytes": - err = unpopulate(val, "WebsiteSizeInBytes", &b.WebsiteSizeInBytes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackupRequestProperties. -func (b BackupRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupName", b.BackupName) - populate(objectMap, "backupSchedule", b.BackupSchedule) - populate(objectMap, "databases", b.Databases) - populate(objectMap, "enabled", b.Enabled) - populate(objectMap, "storageAccountUrl", b.StorageAccountURL) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupSchedule. -func (b BackupSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "frequencyInterval", b.FrequencyInterval) - populate(objectMap, "frequencyUnit", b.FrequencyUnit) - populate(objectMap, "keepAtLeastOneBackup", b.KeepAtLeastOneBackup) - populateTimeRFC3339(objectMap, "lastExecutionTime", b.LastExecutionTime) - populate(objectMap, "retentionPeriodInDays", b.RetentionPeriodInDays) - populateTimeRFC3339(objectMap, "startTime", b.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupSchedule. -func (b *BackupSchedule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "frequencyInterval": - err = unpopulate(val, "FrequencyInterval", &b.FrequencyInterval) - delete(rawMsg, key) - case "frequencyUnit": - err = unpopulate(val, "FrequencyUnit", &b.FrequencyUnit) - delete(rawMsg, key) - case "keepAtLeastOneBackup": - err = unpopulate(val, "KeepAtLeastOneBackup", &b.KeepAtLeastOneBackup) - delete(rawMsg, key) - case "lastExecutionTime": - err = unpopulateTimeRFC3339(val, "LastExecutionTime", &b.LastExecutionTime) - delete(rawMsg, key) - case "retentionPeriodInDays": - err = unpopulate(val, "RetentionPeriodInDays", &b.RetentionPeriodInDays) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &b.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateDetails. -func (c CertificateDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "issuer", c.Issuer) - populateTimeRFC3339(objectMap, "notAfter", c.NotAfter) - populateTimeRFC3339(objectMap, "notBefore", c.NotBefore) - populate(objectMap, "rawData", c.RawData) - populate(objectMap, "serialNumber", c.SerialNumber) - populate(objectMap, "signatureAlgorithm", c.SignatureAlgorithm) - populate(objectMap, "subject", c.Subject) - populate(objectMap, "thumbprint", c.Thumbprint) - populate(objectMap, "version", c.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateDetails. -func (c *CertificateDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "issuer": - err = unpopulate(val, "Issuer", &c.Issuer) - delete(rawMsg, key) - case "notAfter": - err = unpopulateTimeRFC3339(val, "NotAfter", &c.NotAfter) - delete(rawMsg, key) - case "notBefore": - err = unpopulateTimeRFC3339(val, "NotBefore", &c.NotBefore) - delete(rawMsg, key) - case "rawData": - err = unpopulate(val, "RawData", &c.RawData) - delete(rawMsg, key) - case "serialNumber": - err = unpopulate(val, "SerialNumber", &c.SerialNumber) - delete(rawMsg, key) - case "signatureAlgorithm": - err = unpopulate(val, "SignatureAlgorithm", &c.SignatureAlgorithm) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &c.Subject) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &c.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateEmailProperties. -func (c CertificateEmailProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "emailId", c.EmailID) - populateTimeRFC3339(objectMap, "timeStamp", c.TimeStamp) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateEmailProperties. -func (c *CertificateEmailProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "emailId": - err = unpopulate(val, "EmailID", &c.EmailID) - delete(rawMsg, key) - case "timeStamp": - err = unpopulateTimeRFC3339(val, "TimeStamp", &c.TimeStamp) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateOrder. -func (c CertificateOrder) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateOrderActionProperties. -func (c CertificateOrderActionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionType", c.ActionType) - populateTimeRFC3339(objectMap, "createdAt", c.CreatedAt) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderActionProperties. -func (c *CertificateOrderActionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionType": - err = unpopulate(val, "ActionType", &c.ActionType) - delete(rawMsg, key) - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &c.CreatedAt) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateOrderPatchResource. -func (c CertificateOrderPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateOrderPatchResourceProperties. -func (c CertificateOrderPatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appServiceCertificateNotRenewableReasons", c.AppServiceCertificateNotRenewableReasons) - populate(objectMap, "autoRenew", c.AutoRenew) - populate(objectMap, "certificates", c.Certificates) - populate(objectMap, "contact", c.Contact) - populate(objectMap, "csr", c.Csr) - populate(objectMap, "distinguishedName", c.DistinguishedName) - populate(objectMap, "domainVerificationToken", c.DomainVerificationToken) - populateTimeRFC3339(objectMap, "expirationTime", c.ExpirationTime) - populate(objectMap, "intermediate", c.Intermediate) - populate(objectMap, "isPrivateKeyExternal", c.IsPrivateKeyExternal) - populate(objectMap, "keySize", c.KeySize) - populateTimeRFC3339(objectMap, "lastCertificateIssuanceTime", c.LastCertificateIssuanceTime) - populateTimeRFC3339(objectMap, "nextAutoRenewalTimeStamp", c.NextAutoRenewalTimeStamp) - populate(objectMap, "productType", c.ProductType) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "root", c.Root) - populate(objectMap, "serialNumber", c.SerialNumber) - populate(objectMap, "signedCertificate", c.SignedCertificate) - populate(objectMap, "status", c.Status) - populate(objectMap, "validityInYears", c.ValidityInYears) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderPatchResourceProperties. -func (c *CertificateOrderPatchResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appServiceCertificateNotRenewableReasons": - err = unpopulate(val, "AppServiceCertificateNotRenewableReasons", &c.AppServiceCertificateNotRenewableReasons) - delete(rawMsg, key) - case "autoRenew": - err = unpopulate(val, "AutoRenew", &c.AutoRenew) - delete(rawMsg, key) - case "certificates": - err = unpopulate(val, "Certificates", &c.Certificates) - delete(rawMsg, key) - case "contact": - err = unpopulate(val, "Contact", &c.Contact) - delete(rawMsg, key) - case "csr": - err = unpopulate(val, "Csr", &c.Csr) - delete(rawMsg, key) - case "distinguishedName": - err = unpopulate(val, "DistinguishedName", &c.DistinguishedName) - delete(rawMsg, key) - case "domainVerificationToken": - err = unpopulate(val, "DomainVerificationToken", &c.DomainVerificationToken) - delete(rawMsg, key) - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) - delete(rawMsg, key) - case "intermediate": - err = unpopulate(val, "Intermediate", &c.Intermediate) - delete(rawMsg, key) - case "isPrivateKeyExternal": - err = unpopulate(val, "IsPrivateKeyExternal", &c.IsPrivateKeyExternal) - delete(rawMsg, key) - case "keySize": - err = unpopulate(val, "KeySize", &c.KeySize) - delete(rawMsg, key) - case "lastCertificateIssuanceTime": - err = unpopulateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) - delete(rawMsg, key) - case "nextAutoRenewalTimeStamp": - err = unpopulateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) - delete(rawMsg, key) - case "productType": - err = unpopulate(val, "ProductType", &c.ProductType) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "root": - err = unpopulate(val, "Root", &c.Root) - delete(rawMsg, key) - case "serialNumber": - err = unpopulate(val, "SerialNumber", &c.SerialNumber) - delete(rawMsg, key) - case "signedCertificate": - err = unpopulate(val, "SignedCertificate", &c.SignedCertificate) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &c.Status) - delete(rawMsg, key) - case "validityInYears": - err = unpopulate(val, "ValidityInYears", &c.ValidityInYears) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateOrderProperties. -func (c CertificateOrderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appServiceCertificateNotRenewableReasons", c.AppServiceCertificateNotRenewableReasons) - populate(objectMap, "autoRenew", c.AutoRenew) - populate(objectMap, "certificates", c.Certificates) - populate(objectMap, "contact", c.Contact) - populate(objectMap, "csr", c.Csr) - populate(objectMap, "distinguishedName", c.DistinguishedName) - populate(objectMap, "domainVerificationToken", c.DomainVerificationToken) - populateTimeRFC3339(objectMap, "expirationTime", c.ExpirationTime) - populate(objectMap, "intermediate", c.Intermediate) - populate(objectMap, "isPrivateKeyExternal", c.IsPrivateKeyExternal) - populate(objectMap, "keySize", c.KeySize) - populateTimeRFC3339(objectMap, "lastCertificateIssuanceTime", c.LastCertificateIssuanceTime) - populateTimeRFC3339(objectMap, "nextAutoRenewalTimeStamp", c.NextAutoRenewalTimeStamp) - populate(objectMap, "productType", c.ProductType) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "root", c.Root) - populate(objectMap, "serialNumber", c.SerialNumber) - populate(objectMap, "signedCertificate", c.SignedCertificate) - populate(objectMap, "status", c.Status) - populate(objectMap, "validityInYears", c.ValidityInYears) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateOrderProperties. -func (c *CertificateOrderProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appServiceCertificateNotRenewableReasons": - err = unpopulate(val, "AppServiceCertificateNotRenewableReasons", &c.AppServiceCertificateNotRenewableReasons) - delete(rawMsg, key) - case "autoRenew": - err = unpopulate(val, "AutoRenew", &c.AutoRenew) - delete(rawMsg, key) - case "certificates": - err = unpopulate(val, "Certificates", &c.Certificates) - delete(rawMsg, key) - case "contact": - err = unpopulate(val, "Contact", &c.Contact) - delete(rawMsg, key) - case "csr": - err = unpopulate(val, "Csr", &c.Csr) - delete(rawMsg, key) - case "distinguishedName": - err = unpopulate(val, "DistinguishedName", &c.DistinguishedName) - delete(rawMsg, key) - case "domainVerificationToken": - err = unpopulate(val, "DomainVerificationToken", &c.DomainVerificationToken) - delete(rawMsg, key) - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) - delete(rawMsg, key) - case "intermediate": - err = unpopulate(val, "Intermediate", &c.Intermediate) - delete(rawMsg, key) - case "isPrivateKeyExternal": - err = unpopulate(val, "IsPrivateKeyExternal", &c.IsPrivateKeyExternal) - delete(rawMsg, key) - case "keySize": - err = unpopulate(val, "KeySize", &c.KeySize) - delete(rawMsg, key) - case "lastCertificateIssuanceTime": - err = unpopulateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) - delete(rawMsg, key) - case "nextAutoRenewalTimeStamp": - err = unpopulateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) - delete(rawMsg, key) - case "productType": - err = unpopulate(val, "ProductType", &c.ProductType) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "root": - err = unpopulate(val, "Root", &c.Root) - delete(rawMsg, key) - case "serialNumber": - err = unpopulate(val, "SerialNumber", &c.SerialNumber) - delete(rawMsg, key) - case "signedCertificate": - err = unpopulate(val, "SignedCertificate", &c.SignedCertificate) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &c.Status) - delete(rawMsg, key) - case "validityInYears": - err = unpopulate(val, "ValidityInYears", &c.ValidityInYears) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificatePatchResource. -func (c CertificatePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateResource. -func (c CertificateResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CloningInfo. -func (c CloningInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appSettingsOverrides", c.AppSettingsOverrides) - populate(objectMap, "cloneCustomHostNames", c.CloneCustomHostNames) - populate(objectMap, "cloneSourceControl", c.CloneSourceControl) - populate(objectMap, "configureLoadBalancing", c.ConfigureLoadBalancing) - populate(objectMap, "correlationId", c.CorrelationID) - populate(objectMap, "hostingEnvironment", c.HostingEnvironment) - populate(objectMap, "overwrite", c.Overwrite) - populate(objectMap, "sourceWebAppId", c.SourceWebAppID) - populate(objectMap, "sourceWebAppLocation", c.SourceWebAppLocation) - populate(objectMap, "trafficManagerProfileId", c.TrafficManagerProfileID) - populate(objectMap, "trafficManagerProfileName", c.TrafficManagerProfileName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Configuration. -func (c Configuration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeRevisionsMode", c.ActiveRevisionsMode) - populate(objectMap, "ingress", c.Ingress) - populate(objectMap, "registries", c.Registries) - populate(objectMap, "secrets", c.Secrets) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionStringDictionary. -func (c ConnectionStringDictionary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Container. -func (c Container) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "args", c.Args) - populate(objectMap, "command", c.Command) - populate(objectMap, "env", c.Env) - populate(objectMap, "image", c.Image) - populate(objectMap, "name", c.Name) - populate(objectMap, "resources", c.Resources) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerApp. -func (c ContainerApp) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "kind", c.Kind) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerCPUUsage. -func (c ContainerCPUUsage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "kernelModeUsage", c.KernelModeUsage) - populate(objectMap, "perCpuUsage", c.PerCPUUsage) - populate(objectMap, "totalUsage", c.TotalUsage) - populate(objectMap, "userModeUsage", c.UserModeUsage) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerInfo. -func (c ContainerInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "currentCpuStats", c.CurrentCPUStats) - populateTimeRFC3339(objectMap, "currentTimeStamp", c.CurrentTimeStamp) - populate(objectMap, "eth0", c.Eth0) - populate(objectMap, "id", c.ID) - populate(objectMap, "memoryStats", c.MemoryStats) - populate(objectMap, "name", c.Name) - populate(objectMap, "previousCpuStats", c.PreviousCPUStats) - populateTimeRFC3339(objectMap, "previousTimeStamp", c.PreviousTimeStamp) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerInfo. -func (c *ContainerInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentCpuStats": - err = unpopulate(val, "CurrentCPUStats", &c.CurrentCPUStats) - delete(rawMsg, key) - case "currentTimeStamp": - err = unpopulateTimeRFC3339(val, "CurrentTimeStamp", &c.CurrentTimeStamp) - delete(rawMsg, key) - case "eth0": - err = unpopulate(val, "Eth0", &c.Eth0) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "memoryStats": - err = unpopulate(val, "MemoryStats", &c.MemoryStats) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "previousCpuStats": - err = unpopulate(val, "PreviousCPUStats", &c.PreviousCPUStats) - delete(rawMsg, key) - case "previousTimeStamp": - err = unpopulateTimeRFC3339(val, "PreviousTimeStamp", &c.PreviousTimeStamp) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContinuousWebJobProperties. -func (c ContinuousWebJobProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "detailed_status", c.DetailedStatus) - populate(objectMap, "error", c.Error) - populate(objectMap, "extra_info_url", c.ExtraInfoURL) - populate(objectMap, "log_url", c.LogURL) - populate(objectMap, "run_command", c.RunCommand) - populate(objectMap, "settings", c.Settings) - populate(objectMap, "status", c.Status) - populate(objectMap, "url", c.URL) - populate(objectMap, "using_sdk", c.UsingSdk) - populate(objectMap, "web_job_type", c.WebJobType) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CorsSettings. -func (c CorsSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedOrigins", c.AllowedOrigins) - populate(objectMap, "supportCredentials", c.SupportCredentials) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CsmMoveResourceEnvelope. -func (c CsmMoveResourceEnvelope) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "resources", c.Resources) - populate(objectMap, "targetResourceGroup", c.TargetResourceGroup) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CsmUsageQuota. -func (c *CsmUsageQuota) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentValue": - err = unpopulate(val, "CurrentValue", &c.CurrentValue) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &c.Limit) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &c.NextResetTime) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &c.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomHostnameAnalysisResultProperties. -func (c CustomHostnameAnalysisResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aRecords", c.ARecords) - populate(objectMap, "alternateCNameRecords", c.AlternateCNameRecords) - populate(objectMap, "alternateTxtRecords", c.AlternateTxtRecords) - populate(objectMap, "cNameRecords", c.CNameRecords) - populate(objectMap, "conflictingAppResourceId", c.ConflictingAppResourceID) - populate(objectMap, "customDomainVerificationFailureInfo", c.CustomDomainVerificationFailureInfo) - populate(objectMap, "customDomainVerificationTest", c.CustomDomainVerificationTest) - populate(objectMap, "hasConflictAcrossSubscription", c.HasConflictAcrossSubscription) - populate(objectMap, "hasConflictOnScaleUnit", c.HasConflictOnScaleUnit) - populate(objectMap, "isHostnameAlreadyVerified", c.IsHostnameAlreadyVerified) - populate(objectMap, "txtRecords", c.TxtRecords) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CustomHostnameSitesProperties. -func (c CustomHostnameSitesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customHostname", c.CustomHostname) - populate(objectMap, "region", c.Region) - populate(objectMap, "siteResourceIds", c.SiteResourceIDs) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CustomScaleRule. -func (c CustomScaleRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auth", c.Auth) - populate(objectMap, "metadata", c.Metadata) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Dapr. -func (d Dapr) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appId", d.AppID) - populate(objectMap, "appPort", d.AppPort) - populate(objectMap, "components", d.Components) - populate(objectMap, "enabled", d.Enabled) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DaprComponent. -func (d DaprComponent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "name", d.Name) - populate(objectMap, "type", d.Type) - populate(objectMap, "version", d.Version) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataProviderMetadata. -func (d DataProviderMetadata) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "propertyBag", d.PropertyBag) - populate(objectMap, "providerName", d.ProviderName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataSource. -func (d DataSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataSourceUri", d.DataSourceURI) - populate(objectMap, "instructions", d.Instructions) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataTableResponseObject. -func (d DataTableResponseObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "columns", d.Columns) - populate(objectMap, "rows", d.Rows) - populate(objectMap, "tableName", d.TableName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DefaultAuthorizationPolicy. -func (d DefaultAuthorizationPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedApplications", d.AllowedApplications) - populate(objectMap, "allowedPrincipals", d.AllowedPrincipals) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentProperties. -func (d DeploymentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "active", d.Active) - populate(objectMap, "author", d.Author) - populate(objectMap, "author_email", d.AuthorEmail) - populate(objectMap, "deployer", d.Deployer) - populate(objectMap, "details", d.Details) - populateTimeRFC3339(objectMap, "end_time", d.EndTime) - populate(objectMap, "message", d.Message) - populateTimeRFC3339(objectMap, "start_time", d.StartTime) - populate(objectMap, "status", d.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentProperties. -func (d *DeploymentProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "active": - err = unpopulate(val, "Active", &d.Active) - delete(rawMsg, key) - case "author": - err = unpopulate(val, "Author", &d.Author) - delete(rawMsg, key) - case "author_email": - err = unpopulate(val, "AuthorEmail", &d.AuthorEmail) - delete(rawMsg, key) - case "deployer": - err = unpopulate(val, "Deployer", &d.Deployer) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &d.Details) - delete(rawMsg, key) - case "end_time": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &d.Message) - delete(rawMsg, key) - case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DetectorAbnormalTimePeriod. -func (d DetectorAbnormalTimePeriod) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) - populate(objectMap, "message", d.Message) - populate(objectMap, "metaData", d.MetaData) - populate(objectMap, "priority", d.Priority) - populate(objectMap, "solutions", d.Solutions) - populate(objectMap, "source", d.Source) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DetectorAbnormalTimePeriod. -func (d *DetectorAbnormalTimePeriod) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &d.Message) - delete(rawMsg, key) - case "metaData": - err = unpopulate(val, "MetaData", &d.MetaData) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &d.Priority) - delete(rawMsg, key) - case "solutions": - err = unpopulate(val, "Solutions", &d.Solutions) - delete(rawMsg, key) - case "source": - err = unpopulate(val, "Source", &d.Source) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DetectorInfo. -func (d DetectorInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "analysisType", d.AnalysisType) - populate(objectMap, "author", d.Author) - populate(objectMap, "category", d.Category) - populate(objectMap, "description", d.Description) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "score", d.Score) - populate(objectMap, "supportTopicList", d.SupportTopicList) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DetectorResponseProperties. -func (d DetectorResponseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataProvidersMetadata", d.DataProvidersMetadata) - populate(objectMap, "dataset", d.Dataset) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "status", d.Status) - populate(objectMap, "suggestedUtterances", d.SuggestedUtterances) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticAnalysisProperties. -func (d DiagnosticAnalysisProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "abnormalTimePeriods", d.AbnormalTimePeriods) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) - populate(objectMap, "nonCorrelatedDetectors", d.NonCorrelatedDetectors) - populate(objectMap, "payload", d.Payload) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticAnalysisProperties. -func (d *DiagnosticAnalysisProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "abnormalTimePeriods": - err = unpopulate(val, "AbnormalTimePeriods", &d.AbnormalTimePeriods) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) - delete(rawMsg, key) - case "nonCorrelatedDetectors": - err = unpopulate(val, "NonCorrelatedDetectors", &d.NonCorrelatedDetectors) - delete(rawMsg, key) - case "payload": - err = unpopulate(val, "Payload", &d.Payload) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticDetectorResponseProperties. -func (d DiagnosticDetectorResponseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "abnormalTimePeriods", d.AbnormalTimePeriods) - populate(objectMap, "data", d.Data) - populate(objectMap, "detectorDefinition", d.DetectorDefinition) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) - populate(objectMap, "issueDetected", d.IssueDetected) - populate(objectMap, "metrics", d.Metrics) - populate(objectMap, "responseMetaData", d.ResponseMetaData) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticDetectorResponseProperties. -func (d *DiagnosticDetectorResponseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "abnormalTimePeriods": - err = unpopulate(val, "AbnormalTimePeriods", &d.AbnormalTimePeriods) - delete(rawMsg, key) - case "data": - err = unpopulate(val, "Data", &d.Data) - delete(rawMsg, key) - case "detectorDefinition": - err = unpopulate(val, "DetectorDefinition", &d.DetectorDefinition) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) - delete(rawMsg, key) - case "issueDetected": - err = unpopulate(val, "IssueDetected", &d.IssueDetected) - delete(rawMsg, key) - case "metrics": - err = unpopulate(val, "Metrics", &d.Metrics) - delete(rawMsg, key) - case "responseMetaData": - err = unpopulate(val, "ResponseMetaData", &d.ResponseMetaData) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticMetricSample. -func (d DiagnosticMetricSample) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isAggregated", d.IsAggregated) - populate(objectMap, "maximum", d.Maximum) - populate(objectMap, "minimum", d.Minimum) - populate(objectMap, "roleInstance", d.RoleInstance) - populateTimeRFC3339(objectMap, "timestamp", d.Timestamp) - populate(objectMap, "total", d.Total) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticMetricSample. -func (d *DiagnosticMetricSample) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isAggregated": - err = unpopulate(val, "IsAggregated", &d.IsAggregated) - delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &d.Maximum) - delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &d.Minimum) - delete(rawMsg, key) - case "roleInstance": - err = unpopulate(val, "RoleInstance", &d.RoleInstance) - delete(rawMsg, key) - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &d.Timestamp) - delete(rawMsg, key) - case "total": - err = unpopulate(val, "Total", &d.Total) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticMetricSet. -func (d DiagnosticMetricSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) - populate(objectMap, "name", d.Name) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) - populate(objectMap, "timeGrain", d.TimeGrain) - populate(objectMap, "unit", d.Unit) - populate(objectMap, "values", d.Values) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticMetricSet. -func (d *DiagnosticMetricSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) - delete(rawMsg, key) - case "timeGrain": - err = unpopulate(val, "TimeGrain", &d.TimeGrain) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &d.Unit) - delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &d.Values) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Domain. -func (d Domain) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DomainOwnershipIdentifier. -func (d DomainOwnershipIdentifier) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DomainPatchResource. -func (d DomainPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DomainPatchResourceProperties. -func (d DomainPatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authCode", d.AuthCode) - populate(objectMap, "autoRenew", d.AutoRenew) - populate(objectMap, "consent", d.Consent) - populate(objectMap, "contactAdmin", d.ContactAdmin) - populate(objectMap, "contactBilling", d.ContactBilling) - populate(objectMap, "contactRegistrant", d.ContactRegistrant) - populate(objectMap, "contactTech", d.ContactTech) - populateTimeRFC3339(objectMap, "createdTime", d.CreatedTime) - populate(objectMap, "dnsType", d.DNSType) - populate(objectMap, "dnsZoneId", d.DNSZoneID) - populate(objectMap, "domainNotRenewableReasons", d.DomainNotRenewableReasons) - populateTimeRFC3339(objectMap, "expirationTime", d.ExpirationTime) - populateTimeRFC3339(objectMap, "lastRenewedTime", d.LastRenewedTime) - populate(objectMap, "managedHostNames", d.ManagedHostNames) - populate(objectMap, "nameServers", d.NameServers) - populate(objectMap, "privacy", d.Privacy) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "readyForDnsRecordManagement", d.ReadyForDNSRecordManagement) - populate(objectMap, "registrationStatus", d.RegistrationStatus) - populate(objectMap, "targetDnsType", d.TargetDNSType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DomainPatchResourceProperties. -func (d *DomainPatchResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authCode": - err = unpopulate(val, "AuthCode", &d.AuthCode) - delete(rawMsg, key) - case "autoRenew": - err = unpopulate(val, "AutoRenew", &d.AutoRenew) - delete(rawMsg, key) - case "consent": - err = unpopulate(val, "Consent", &d.Consent) - delete(rawMsg, key) - case "contactAdmin": - err = unpopulate(val, "ContactAdmin", &d.ContactAdmin) - delete(rawMsg, key) - case "contactBilling": - err = unpopulate(val, "ContactBilling", &d.ContactBilling) - delete(rawMsg, key) - case "contactRegistrant": - err = unpopulate(val, "ContactRegistrant", &d.ContactRegistrant) - delete(rawMsg, key) - case "contactTech": - err = unpopulate(val, "ContactTech", &d.ContactTech) - delete(rawMsg, key) - case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) - delete(rawMsg, key) - case "dnsType": - err = unpopulate(val, "DNSType", &d.DNSType) - delete(rawMsg, key) - case "dnsZoneId": - err = unpopulate(val, "DNSZoneID", &d.DNSZoneID) - delete(rawMsg, key) - case "domainNotRenewableReasons": - err = unpopulate(val, "DomainNotRenewableReasons", &d.DomainNotRenewableReasons) - delete(rawMsg, key) - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) - delete(rawMsg, key) - case "lastRenewedTime": - err = unpopulateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) - delete(rawMsg, key) - case "managedHostNames": - err = unpopulate(val, "ManagedHostNames", &d.ManagedHostNames) - delete(rawMsg, key) - case "nameServers": - err = unpopulate(val, "NameServers", &d.NameServers) - delete(rawMsg, key) - case "privacy": - err = unpopulate(val, "Privacy", &d.Privacy) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "readyForDnsRecordManagement": - err = unpopulate(val, "ReadyForDNSRecordManagement", &d.ReadyForDNSRecordManagement) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) - delete(rawMsg, key) - case "targetDnsType": - err = unpopulate(val, "TargetDNSType", &d.TargetDNSType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DomainProperties. -func (d DomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authCode", d.AuthCode) - populate(objectMap, "autoRenew", d.AutoRenew) - populate(objectMap, "consent", d.Consent) - populate(objectMap, "contactAdmin", d.ContactAdmin) - populate(objectMap, "contactBilling", d.ContactBilling) - populate(objectMap, "contactRegistrant", d.ContactRegistrant) - populate(objectMap, "contactTech", d.ContactTech) - populateTimeRFC3339(objectMap, "createdTime", d.CreatedTime) - populate(objectMap, "dnsType", d.DNSType) - populate(objectMap, "dnsZoneId", d.DNSZoneID) - populate(objectMap, "domainNotRenewableReasons", d.DomainNotRenewableReasons) - populateTimeRFC3339(objectMap, "expirationTime", d.ExpirationTime) - populateTimeRFC3339(objectMap, "lastRenewedTime", d.LastRenewedTime) - populate(objectMap, "managedHostNames", d.ManagedHostNames) - populate(objectMap, "nameServers", d.NameServers) - populate(objectMap, "privacy", d.Privacy) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "readyForDnsRecordManagement", d.ReadyForDNSRecordManagement) - populate(objectMap, "registrationStatus", d.RegistrationStatus) - populate(objectMap, "targetDnsType", d.TargetDNSType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DomainProperties. -func (d *DomainProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authCode": - err = unpopulate(val, "AuthCode", &d.AuthCode) - delete(rawMsg, key) - case "autoRenew": - err = unpopulate(val, "AutoRenew", &d.AutoRenew) - delete(rawMsg, key) - case "consent": - err = unpopulate(val, "Consent", &d.Consent) - delete(rawMsg, key) - case "contactAdmin": - err = unpopulate(val, "ContactAdmin", &d.ContactAdmin) - delete(rawMsg, key) - case "contactBilling": - err = unpopulate(val, "ContactBilling", &d.ContactBilling) - delete(rawMsg, key) - case "contactRegistrant": - err = unpopulate(val, "ContactRegistrant", &d.ContactRegistrant) - delete(rawMsg, key) - case "contactTech": - err = unpopulate(val, "ContactTech", &d.ContactTech) - delete(rawMsg, key) - case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) - delete(rawMsg, key) - case "dnsType": - err = unpopulate(val, "DNSType", &d.DNSType) - delete(rawMsg, key) - case "dnsZoneId": - err = unpopulate(val, "DNSZoneID", &d.DNSZoneID) - delete(rawMsg, key) - case "domainNotRenewableReasons": - err = unpopulate(val, "DomainNotRenewableReasons", &d.DomainNotRenewableReasons) - delete(rawMsg, key) - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) - delete(rawMsg, key) - case "lastRenewedTime": - err = unpopulateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) - delete(rawMsg, key) - case "managedHostNames": - err = unpopulate(val, "ManagedHostNames", &d.ManagedHostNames) - delete(rawMsg, key) - case "nameServers": - err = unpopulate(val, "NameServers", &d.NameServers) - delete(rawMsg, key) - case "privacy": - err = unpopulate(val, "Privacy", &d.Privacy) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "readyForDnsRecordManagement": - err = unpopulate(val, "ReadyForDNSRecordManagement", &d.ReadyForDNSRecordManagement) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) - delete(rawMsg, key) - case "targetDnsType": - err = unpopulate(val, "TargetDNSType", &d.TargetDNSType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DomainPurchaseConsent. -func (d DomainPurchaseConsent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "agreedAt", d.AgreedAt) - populate(objectMap, "agreedBy", d.AgreedBy) - populate(objectMap, "agreementKeys", d.AgreementKeys) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DomainPurchaseConsent. -func (d *DomainPurchaseConsent) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agreedAt": - err = unpopulateTimeRFC3339(val, "AgreedAt", &d.AgreedAt) - delete(rawMsg, key) - case "agreedBy": - err = unpopulate(val, "AgreedBy", &d.AgreedBy) - delete(rawMsg, key) - case "agreementKeys": - err = unpopulate(val, "AgreementKeys", &d.AgreementKeys) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Environment. -func (e Environment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clusterSettings", e.ClusterSettings) - populate(objectMap, "dnsSuffix", e.DNSSuffix) - populate(objectMap, "dedicatedHostCount", e.DedicatedHostCount) - populate(objectMap, "frontEndScaleFactor", e.FrontEndScaleFactor) - populate(objectMap, "hasLinuxWorkers", e.HasLinuxWorkers) - populate(objectMap, "internalLoadBalancingMode", e.InternalLoadBalancingMode) - populate(objectMap, "ipsslAddressCount", e.IpsslAddressCount) - populate(objectMap, "maximumNumberOfMachines", e.MaximumNumberOfMachines) - populate(objectMap, "multiRoleCount", e.MultiRoleCount) - populate(objectMap, "multiSize", e.MultiSize) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "status", e.Status) - populate(objectMap, "suspended", e.Suspended) - populate(objectMap, "userWhitelistedIpRanges", e.UserWhitelistedIPRanges) - populate(objectMap, "virtualNetwork", e.VirtualNetwork) - populate(objectMap, "zoneRedundant", e.ZoneRedundant) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type EnvironmentPatchResource. -func (e EnvironmentPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "kind", e.Kind) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type EnvironmentResource. -func (e EnvironmentResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "kind", e.Kind) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorEntity. -func (e ErrorEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "extendedCode", e.ExtendedCode) - populate(objectMap, "innerErrors", e.InnerErrors) - populate(objectMap, "message", e.Message) - populate(objectMap, "messageTemplate", e.MessageTemplate) - populate(objectMap, "parameters", e.Parameters) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Experiments. -func (e Experiments) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "rampUpRules", e.RampUpRules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FunctionAppMajorVersion. -func (f FunctionAppMajorVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayText", f.DisplayText) - populate(objectMap, "minorVersions", f.MinorVersions) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FunctionAppRuntimeSettings. -func (f FunctionAppRuntimeSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appInsightsSettings", f.AppInsightsSettings) - populate(objectMap, "appSettingsDictionary", f.AppSettingsDictionary) - populateTimeRFC3339(objectMap, "endOfLifeDate", f.EndOfLifeDate) - populate(objectMap, "gitHubActionSettings", f.GitHubActionSettings) - populate(objectMap, "isAutoUpdate", f.IsAutoUpdate) - populate(objectMap, "isDefault", f.IsDefault) - populate(objectMap, "isDeprecated", f.IsDeprecated) - populate(objectMap, "isEarlyAccess", f.IsEarlyAccess) - populate(objectMap, "isHidden", f.IsHidden) - populate(objectMap, "isPreview", f.IsPreview) - populate(objectMap, "remoteDebuggingSupported", f.RemoteDebuggingSupported) - populate(objectMap, "runtimeVersion", f.RuntimeVersion) - populate(objectMap, "siteConfigPropertiesDictionary", f.SiteConfigPropertiesDictionary) - populate(objectMap, "supportedFunctionsExtensionVersions", f.SupportedFunctionsExtensionVersions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionAppRuntimeSettings. -func (f *FunctionAppRuntimeSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appInsightsSettings": - err = unpopulate(val, "AppInsightsSettings", &f.AppInsightsSettings) - delete(rawMsg, key) - case "appSettingsDictionary": - err = unpopulate(val, "AppSettingsDictionary", &f.AppSettingsDictionary) - delete(rawMsg, key) - case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &f.EndOfLifeDate) - delete(rawMsg, key) - case "gitHubActionSettings": - err = unpopulate(val, "GitHubActionSettings", &f.GitHubActionSettings) - delete(rawMsg, key) - case "isAutoUpdate": - err = unpopulate(val, "IsAutoUpdate", &f.IsAutoUpdate) - delete(rawMsg, key) - case "isDefault": - err = unpopulate(val, "IsDefault", &f.IsDefault) - delete(rawMsg, key) - case "isDeprecated": - err = unpopulate(val, "IsDeprecated", &f.IsDeprecated) - delete(rawMsg, key) - case "isEarlyAccess": - err = unpopulate(val, "IsEarlyAccess", &f.IsEarlyAccess) - delete(rawMsg, key) - case "isHidden": - err = unpopulate(val, "IsHidden", &f.IsHidden) - delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &f.IsPreview) - delete(rawMsg, key) - case "remoteDebuggingSupported": - err = unpopulate(val, "RemoteDebuggingSupported", &f.RemoteDebuggingSupported) - delete(rawMsg, key) - case "runtimeVersion": - err = unpopulate(val, "RuntimeVersion", &f.RuntimeVersion) - delete(rawMsg, key) - case "siteConfigPropertiesDictionary": - err = unpopulate(val, "SiteConfigPropertiesDictionary", &f.SiteConfigPropertiesDictionary) - delete(rawMsg, key) - case "supportedFunctionsExtensionVersions": - err = unpopulate(val, "SupportedFunctionsExtensionVersions", &f.SupportedFunctionsExtensionVersions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FunctionAppStackProperties. -func (f FunctionAppStackProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayText", f.DisplayText) - populate(objectMap, "majorVersions", f.MajorVersions) - populate(objectMap, "preferredOs", f.PreferredOs) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FunctionEnvelopeProperties. -func (f FunctionEnvelopeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "config", &f.Config) - populate(objectMap, "config_href", f.ConfigHref) - populate(objectMap, "files", f.Files) - populate(objectMap, "function_app_id", f.FunctionAppID) - populate(objectMap, "href", f.Href) - populate(objectMap, "invoke_url_template", f.InvokeURLTemplate) - populate(objectMap, "isDisabled", f.IsDisabled) - populate(objectMap, "language", f.Language) - populate(objectMap, "script_href", f.ScriptHref) - populate(objectMap, "script_root_path_href", f.ScriptRootPathHref) - populate(objectMap, "secrets_file_href", f.SecretsFileHref) - populate(objectMap, "test_data", f.TestData) - populate(objectMap, "test_data_href", f.TestDataHref) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type GlobalValidation. -func (g GlobalValidation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "excludedPaths", g.ExcludedPaths) - populate(objectMap, "redirectToProvider", g.RedirectToProvider) - populate(objectMap, "requireAuthentication", g.RequireAuthentication) - populate(objectMap, "unauthenticatedClientAction", g.UnauthenticatedClientAction) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type HTTPScaleRule. -func (h HTTPScaleRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auth", h.Auth) - populate(objectMap, "metadata", h.Metadata) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type HostName. -func (h HostName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureResourceName", h.AzureResourceName) - populate(objectMap, "azureResourceType", h.AzureResourceType) - populate(objectMap, "customHostNameDnsRecordType", h.CustomHostNameDNSRecordType) - populate(objectMap, "hostNameType", h.HostNameType) - populate(objectMap, "name", h.Name) - populate(objectMap, "siteNames", h.SiteNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type HybridConnection. -func (h HybridConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", h.ID) - populate(objectMap, "kind", h.Kind) - populate(objectMap, "name", h.Name) - populate(objectMap, "properties", h.Properties) - populate(objectMap, "type", h.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type IPSecurityRestriction. -func (i IPSecurityRestriction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", i.Action) - populate(objectMap, "description", i.Description) - populate(objectMap, "headers", i.Headers) - populate(objectMap, "ipAddress", i.IPAddress) - populate(objectMap, "name", i.Name) - populate(objectMap, "priority", i.Priority) - populate(objectMap, "subnetMask", i.SubnetMask) - populate(objectMap, "subnetTrafficTag", i.SubnetTrafficTag) - populate(objectMap, "tag", i.Tag) - populate(objectMap, "vnetSubnetResourceId", i.VnetSubnetResourceID) - populate(objectMap, "vnetTrafficTag", i.VnetTrafficTag) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Identifier. -func (i Identifier) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", i.ID) - populate(objectMap, "kind", i.Kind) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviders. -func (i IdentityProviders) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "apple", i.Apple) - populate(objectMap, "azureActiveDirectory", i.AzureActiveDirectory) - populate(objectMap, "azureStaticWebApps", i.AzureStaticWebApps) - populate(objectMap, "customOpenIdConnectProviders", i.CustomOpenIDConnectProviders) - populate(objectMap, "facebook", i.Facebook) - populate(objectMap, "gitHub", i.GitHub) - populate(objectMap, "google", i.Google) - populate(objectMap, "legacyMicrosoftAccount", i.LegacyMicrosoftAccount) - populate(objectMap, "twitter", i.Twitter) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Ingress. -func (i Ingress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowInsecure", i.AllowInsecure) - populate(objectMap, "external", i.External) - populate(objectMap, "fqdn", i.Fqdn) - populate(objectMap, "targetPort", i.TargetPort) - populate(objectMap, "traffic", i.Traffic) - populate(objectMap, "transport", i.Transport) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type JwtClaimChecks. -func (j JwtClaimChecks) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedClientApplications", j.AllowedClientApplications) - populate(objectMap, "allowedGroups", j.AllowedGroups) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type KubeEnvironment. -func (k KubeEnvironment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extendedLocation", k.ExtendedLocation) - populate(objectMap, "id", k.ID) - populate(objectMap, "kind", k.Kind) - populate(objectMap, "location", k.Location) - populate(objectMap, "name", k.Name) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "tags", k.Tags) - populate(objectMap, "type", k.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type KubeEnvironmentPatchResource. -func (k KubeEnvironmentPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", k.ID) - populate(objectMap, "kind", k.Kind) - populate(objectMap, "name", k.Name) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "type", k.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LinuxJavaContainerSettings. -func (l LinuxJavaContainerSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endOfLifeDate", l.EndOfLifeDate) - populate(objectMap, "isAutoUpdate", l.IsAutoUpdate) - populate(objectMap, "isDeprecated", l.IsDeprecated) - populate(objectMap, "isEarlyAccess", l.IsEarlyAccess) - populate(objectMap, "isHidden", l.IsHidden) - populate(objectMap, "isPreview", l.IsPreview) - populate(objectMap, "java11Runtime", l.Java11Runtime) - populate(objectMap, "java8Runtime", l.Java8Runtime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxJavaContainerSettings. -func (l *LinuxJavaContainerSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &l.EndOfLifeDate) - delete(rawMsg, key) - case "isAutoUpdate": - err = unpopulate(val, "IsAutoUpdate", &l.IsAutoUpdate) - delete(rawMsg, key) - case "isDeprecated": - err = unpopulate(val, "IsDeprecated", &l.IsDeprecated) - delete(rawMsg, key) - case "isEarlyAccess": - err = unpopulate(val, "IsEarlyAccess", &l.IsEarlyAccess) - delete(rawMsg, key) - case "isHidden": - err = unpopulate(val, "IsHidden", &l.IsHidden) - delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &l.IsPreview) - delete(rawMsg, key) - case "java11Runtime": - err = unpopulate(val, "Java11Runtime", &l.Java11Runtime) - delete(rawMsg, key) - case "java8Runtime": - err = unpopulate(val, "Java8Runtime", &l.Java8Runtime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Login. -func (l Login) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedExternalRedirectUrls", l.AllowedExternalRedirectUrls) - populate(objectMap, "cookieExpiration", l.CookieExpiration) - populate(objectMap, "nonce", l.Nonce) - populate(objectMap, "preserveUrlFragmentsForLogins", l.PreserveURLFragmentsForLogins) - populate(objectMap, "routes", l.Routes) - populate(objectMap, "tokenStore", l.TokenStore) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LoginScopes. -func (l LoginScopes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "scopes", l.Scopes) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MSDeployCore. -func (m MSDeployCore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appOffline", m.AppOffline) - populate(objectMap, "connectionString", m.ConnectionString) - populate(objectMap, "dbType", m.DbType) - populate(objectMap, "packageUri", m.PackageURI) - populate(objectMap, "setParameters", m.SetParameters) - populate(objectMap, "setParametersXmlFileUri", m.SetParametersXMLFileURI) - populate(objectMap, "skipAppData", m.SkipAppData) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MSDeployLogEntry. -func (m MSDeployLogEntry) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "message", m.Message) - populateTimeRFC3339(objectMap, "time", m.Time) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployLogEntry. -func (m *MSDeployLogEntry) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "message": - err = unpopulate(val, "Message", &m.Message) - delete(rawMsg, key) - case "time": - err = unpopulateTimeRFC3339(val, "Time", &m.Time) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MSDeployLogProperties. -func (m MSDeployLogProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "entries", m.Entries) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MSDeployStatusProperties. -func (m MSDeployStatusProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "complete", m.Complete) - populate(objectMap, "deployer", m.Deployer) - populateTimeRFC3339(objectMap, "endTime", m.EndTime) - populate(objectMap, "provisioningState", m.ProvisioningState) - populateTimeRFC3339(objectMap, "startTime", m.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MSDeployStatusProperties. -func (m *MSDeployStatusProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "complete": - err = unpopulate(val, "Complete", &m.Complete) - delete(rawMsg, key) - case "deployer": - err = unpopulate(val, "Deployer", &m.Deployer) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &m.EndTime) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &m.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. -func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkFeaturesProperties. -func (n NetworkFeaturesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hybridConnections", n.HybridConnections) - populate(objectMap, "hybridConnectionsV2", n.HybridConnectionsV2) - populate(objectMap, "virtualNetworkConnection", n.VirtualNetworkConnection) - populate(objectMap, "virtualNetworkName", n.VirtualNetworkName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type OpenIDConnectLogin. -func (o OpenIDConnectLogin) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nameClaimType", o.NameClaimType) - populate(objectMap, "scopes", o.Scopes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. -func (o *Operation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &o.CreatedTime) - delete(rawMsg, key) - case "errors": - err = unpopulate(val, "Errors", &o.Errors) - delete(rawMsg, key) - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &o.ExpirationTime) - delete(rawMsg, key) - case "geoMasterOperationId": - err = unpopulate(val, "GeoMasterOperationID", &o.GeoMasterOperationID) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "modifiedTime": - err = unpopulateTimeRFC3339(val, "ModifiedTime", &o.ModifiedTime) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &o.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonSample. -func (p *PerfMonSample) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceName": - err = unpopulate(val, "InstanceName", &p.InstanceName) - delete(rawMsg, key) - case "time": - err = unpopulateTimeRFC3339(val, "Time", &p.Time) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PerfMonSet. -func (p *PerfMonSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &p.EndTime) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) - delete(rawMsg, key) - case "timeGrain": - err = unpopulate(val, "TimeGrain", &p.TimeGrain) - delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &p.Values) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Plan. -func (p Plan) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "kind", p.Kind) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PlanPatchResource. -func (p PlanPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "kind", p.Kind) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PlanPatchResourceProperties. -func (p PlanPatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "elasticScaleEnabled", p.ElasticScaleEnabled) - populateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) - populate(objectMap, "geoRegion", p.GeoRegion) - populate(objectMap, "hostingEnvironmentProfile", p.HostingEnvironmentProfile) - populate(objectMap, "hyperV", p.HyperV) - populate(objectMap, "isSpot", p.IsSpot) - populate(objectMap, "isXenon", p.IsXenon) - populate(objectMap, "kubeEnvironmentProfile", p.KubeEnvironmentProfile) - populate(objectMap, "maximumElasticWorkerCount", p.MaximumElasticWorkerCount) - populate(objectMap, "maximumNumberOfWorkers", p.MaximumNumberOfWorkers) - populate(objectMap, "numberOfSites", p.NumberOfSites) - populate(objectMap, "perSiteScaling", p.PerSiteScaling) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "reserved", p.Reserved) - populate(objectMap, "resourceGroup", p.ResourceGroup) - populateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) - populate(objectMap, "status", p.Status) - populate(objectMap, "subscription", p.Subscription) - populate(objectMap, "targetWorkerCount", p.TargetWorkerCount) - populate(objectMap, "targetWorkerSizeId", p.TargetWorkerSizeID) - populate(objectMap, "workerTierName", p.WorkerTierName) - populate(objectMap, "zoneRedundant", p.ZoneRedundant) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PlanPatchResourceProperties. -func (p *PlanPatchResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "elasticScaleEnabled": - err = unpopulate(val, "ElasticScaleEnabled", &p.ElasticScaleEnabled) - delete(rawMsg, key) - case "freeOfferExpirationTime": - err = unpopulateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) - delete(rawMsg, key) - case "geoRegion": - err = unpopulate(val, "GeoRegion", &p.GeoRegion) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &p.HostingEnvironmentProfile) - delete(rawMsg, key) - case "hyperV": - err = unpopulate(val, "HyperV", &p.HyperV) - delete(rawMsg, key) - case "isSpot": - err = unpopulate(val, "IsSpot", &p.IsSpot) - delete(rawMsg, key) - case "isXenon": - err = unpopulate(val, "IsXenon", &p.IsXenon) - delete(rawMsg, key) - case "kubeEnvironmentProfile": - err = unpopulate(val, "KubeEnvironmentProfile", &p.KubeEnvironmentProfile) - delete(rawMsg, key) - case "maximumElasticWorkerCount": - err = unpopulate(val, "MaximumElasticWorkerCount", &p.MaximumElasticWorkerCount) - delete(rawMsg, key) - case "maximumNumberOfWorkers": - err = unpopulate(val, "MaximumNumberOfWorkers", &p.MaximumNumberOfWorkers) - delete(rawMsg, key) - case "numberOfSites": - err = unpopulate(val, "NumberOfSites", &p.NumberOfSites) - delete(rawMsg, key) - case "perSiteScaling": - err = unpopulate(val, "PerSiteScaling", &p.PerSiteScaling) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "reserved": - err = unpopulate(val, "Reserved", &p.Reserved) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &p.ResourceGroup) - delete(rawMsg, key) - case "spotExpirationTime": - err = unpopulateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) - delete(rawMsg, key) - case "subscription": - err = unpopulate(val, "Subscription", &p.Subscription) - delete(rawMsg, key) - case "targetWorkerCount": - err = unpopulate(val, "TargetWorkerCount", &p.TargetWorkerCount) - delete(rawMsg, key) - case "targetWorkerSizeId": - err = unpopulate(val, "TargetWorkerSizeID", &p.TargetWorkerSizeID) - delete(rawMsg, key) - case "workerTierName": - err = unpopulate(val, "WorkerTierName", &p.WorkerTierName) - delete(rawMsg, key) - case "zoneRedundant": - err = unpopulate(val, "ZoneRedundant", &p.ZoneRedundant) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PlanProperties. -func (p PlanProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "elasticScaleEnabled", p.ElasticScaleEnabled) - populateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) - populate(objectMap, "geoRegion", p.GeoRegion) - populate(objectMap, "hostingEnvironmentProfile", p.HostingEnvironmentProfile) - populate(objectMap, "hyperV", p.HyperV) - populate(objectMap, "isSpot", p.IsSpot) - populate(objectMap, "isXenon", p.IsXenon) - populate(objectMap, "kubeEnvironmentProfile", p.KubeEnvironmentProfile) - populate(objectMap, "maximumElasticWorkerCount", p.MaximumElasticWorkerCount) - populate(objectMap, "maximumNumberOfWorkers", p.MaximumNumberOfWorkers) - populate(objectMap, "numberOfSites", p.NumberOfSites) - populate(objectMap, "perSiteScaling", p.PerSiteScaling) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "reserved", p.Reserved) - populate(objectMap, "resourceGroup", p.ResourceGroup) - populateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) - populate(objectMap, "status", p.Status) - populate(objectMap, "subscription", p.Subscription) - populate(objectMap, "targetWorkerCount", p.TargetWorkerCount) - populate(objectMap, "targetWorkerSizeId", p.TargetWorkerSizeID) - populate(objectMap, "workerTierName", p.WorkerTierName) - populate(objectMap, "zoneRedundant", p.ZoneRedundant) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PlanProperties. -func (p *PlanProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "elasticScaleEnabled": - err = unpopulate(val, "ElasticScaleEnabled", &p.ElasticScaleEnabled) - delete(rawMsg, key) - case "freeOfferExpirationTime": - err = unpopulateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) - delete(rawMsg, key) - case "geoRegion": - err = unpopulate(val, "GeoRegion", &p.GeoRegion) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &p.HostingEnvironmentProfile) - delete(rawMsg, key) - case "hyperV": - err = unpopulate(val, "HyperV", &p.HyperV) - delete(rawMsg, key) - case "isSpot": - err = unpopulate(val, "IsSpot", &p.IsSpot) - delete(rawMsg, key) - case "isXenon": - err = unpopulate(val, "IsXenon", &p.IsXenon) - delete(rawMsg, key) - case "kubeEnvironmentProfile": - err = unpopulate(val, "KubeEnvironmentProfile", &p.KubeEnvironmentProfile) - delete(rawMsg, key) - case "maximumElasticWorkerCount": - err = unpopulate(val, "MaximumElasticWorkerCount", &p.MaximumElasticWorkerCount) - delete(rawMsg, key) - case "maximumNumberOfWorkers": - err = unpopulate(val, "MaximumNumberOfWorkers", &p.MaximumNumberOfWorkers) - delete(rawMsg, key) - case "numberOfSites": - err = unpopulate(val, "NumberOfSites", &p.NumberOfSites) - delete(rawMsg, key) - case "perSiteScaling": - err = unpopulate(val, "PerSiteScaling", &p.PerSiteScaling) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "reserved": - err = unpopulate(val, "Reserved", &p.Reserved) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &p.ResourceGroup) - delete(rawMsg, key) - case "spotExpirationTime": - err = unpopulateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) - delete(rawMsg, key) - case "subscription": - err = unpopulate(val, "Subscription", &p.Subscription) - delete(rawMsg, key) - case "targetWorkerCount": - err = unpopulate(val, "TargetWorkerCount", &p.TargetWorkerCount) - delete(rawMsg, key) - case "targetWorkerSizeId": - err = unpopulate(val, "TargetWorkerSizeID", &p.TargetWorkerSizeID) - delete(rawMsg, key) - case "workerTierName": - err = unpopulate(val, "WorkerTierName", &p.WorkerTierName) - delete(rawMsg, key) - case "zoneRedundant": - err = unpopulate(val, "ZoneRedundant", &p.ZoneRedundant) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PremierAddOn. -func (p PremierAddOn) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "kind", p.Kind) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PremierAddOnPatchResource. -func (p PremierAddOnPatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "kind", p.Kind) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateAccessProperties. -func (p PrivateAccessProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enabled", p.Enabled) - populate(objectMap, "virtualNetworks", p.VirtualNetworks) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateAccessVirtualNetwork. -func (p PrivateAccessVirtualNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "key", p.Key) - populate(objectMap, "name", p.Name) - populate(objectMap, "resourceId", p.ResourceID) - populate(objectMap, "subnets", p.Subnets) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ProcessInfoProperties. -func (p ProcessInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "children", p.Children) - populate(objectMap, "command_line", p.CommandLine) - populate(objectMap, "deployment_name", p.DeploymentName) - populate(objectMap, "description", p.Description) - populate(objectMap, "environment_variables", p.EnvironmentVariables) - populate(objectMap, "file_name", p.FileName) - populate(objectMap, "handle_count", p.HandleCount) - populate(objectMap, "href", p.Href) - populate(objectMap, "identifier", p.Identifier) - populate(objectMap, "iis_profile_timeout_in_seconds", p.IisProfileTimeoutInSeconds) - populate(objectMap, "is_iis_profile_running", p.IsIisProfileRunning) - populate(objectMap, "is_profile_running", p.IsProfileRunning) - populate(objectMap, "is_scm_site", p.IsScmSite) - populate(objectMap, "is_webjob", p.IsWebjob) - populate(objectMap, "minidump", p.Minidump) - populate(objectMap, "module_count", p.ModuleCount) - populate(objectMap, "modules", p.Modules) - populate(objectMap, "non_paged_system_memory", p.NonPagedSystemMemory) - populate(objectMap, "open_file_handles", p.OpenFileHandles) - populate(objectMap, "paged_memory", p.PagedMemory) - populate(objectMap, "paged_system_memory", p.PagedSystemMemory) - populate(objectMap, "parent", p.Parent) - populate(objectMap, "peak_paged_memory", p.PeakPagedMemory) - populate(objectMap, "peak_virtual_memory", p.PeakVirtualMemory) - populate(objectMap, "peak_working_set", p.PeakWorkingSet) - populate(objectMap, "private_memory", p.PrivateMemory) - populate(objectMap, "privileged_cpu_time", p.PrivilegedCPUTime) - populateTimeRFC3339(objectMap, "start_time", p.StartTime) - populate(objectMap, "thread_count", p.ThreadCount) - populate(objectMap, "threads", p.Threads) - populateTimeRFC3339(objectMap, "time_stamp", p.TimeStamp) - populate(objectMap, "total_cpu_time", p.TotalCPUTime) - populate(objectMap, "user_cpu_time", p.UserCPUTime) - populate(objectMap, "user_name", p.UserName) - populate(objectMap, "virtual_memory", p.VirtualMemory) - populate(objectMap, "working_set", p.WorkingSet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessInfoProperties. -func (p *ProcessInfoProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "children": - err = unpopulate(val, "Children", &p.Children) - delete(rawMsg, key) - case "command_line": - err = unpopulate(val, "CommandLine", &p.CommandLine) - delete(rawMsg, key) - case "deployment_name": - err = unpopulate(val, "DeploymentName", &p.DeploymentName) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "environment_variables": - err = unpopulate(val, "EnvironmentVariables", &p.EnvironmentVariables) - delete(rawMsg, key) - case "file_name": - err = unpopulate(val, "FileName", &p.FileName) - delete(rawMsg, key) - case "handle_count": - err = unpopulate(val, "HandleCount", &p.HandleCount) - delete(rawMsg, key) - case "href": - err = unpopulate(val, "Href", &p.Href) - delete(rawMsg, key) - case "identifier": - err = unpopulate(val, "Identifier", &p.Identifier) - delete(rawMsg, key) - case "iis_profile_timeout_in_seconds": - err = unpopulate(val, "IisProfileTimeoutInSeconds", &p.IisProfileTimeoutInSeconds) - delete(rawMsg, key) - case "is_iis_profile_running": - err = unpopulate(val, "IsIisProfileRunning", &p.IsIisProfileRunning) - delete(rawMsg, key) - case "is_profile_running": - err = unpopulate(val, "IsProfileRunning", &p.IsProfileRunning) - delete(rawMsg, key) - case "is_scm_site": - err = unpopulate(val, "IsScmSite", &p.IsScmSite) - delete(rawMsg, key) - case "is_webjob": - err = unpopulate(val, "IsWebjob", &p.IsWebjob) - delete(rawMsg, key) - case "minidump": - err = unpopulate(val, "Minidump", &p.Minidump) - delete(rawMsg, key) - case "module_count": - err = unpopulate(val, "ModuleCount", &p.ModuleCount) - delete(rawMsg, key) - case "modules": - err = unpopulate(val, "Modules", &p.Modules) - delete(rawMsg, key) - case "non_paged_system_memory": - err = unpopulate(val, "NonPagedSystemMemory", &p.NonPagedSystemMemory) - delete(rawMsg, key) - case "open_file_handles": - err = unpopulate(val, "OpenFileHandles", &p.OpenFileHandles) - delete(rawMsg, key) - case "paged_memory": - err = unpopulate(val, "PagedMemory", &p.PagedMemory) - delete(rawMsg, key) - case "paged_system_memory": - err = unpopulate(val, "PagedSystemMemory", &p.PagedSystemMemory) - delete(rawMsg, key) - case "parent": - err = unpopulate(val, "Parent", &p.Parent) - delete(rawMsg, key) - case "peak_paged_memory": - err = unpopulate(val, "PeakPagedMemory", &p.PeakPagedMemory) - delete(rawMsg, key) - case "peak_virtual_memory": - err = unpopulate(val, "PeakVirtualMemory", &p.PeakVirtualMemory) - delete(rawMsg, key) - case "peak_working_set": - err = unpopulate(val, "PeakWorkingSet", &p.PeakWorkingSet) - delete(rawMsg, key) - case "private_memory": - err = unpopulate(val, "PrivateMemory", &p.PrivateMemory) - delete(rawMsg, key) - case "privileged_cpu_time": - err = unpopulate(val, "PrivilegedCPUTime", &p.PrivilegedCPUTime) - delete(rawMsg, key) - case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) - delete(rawMsg, key) - case "thread_count": - err = unpopulate(val, "ThreadCount", &p.ThreadCount) - delete(rawMsg, key) - case "threads": - err = unpopulate(val, "Threads", &p.Threads) - delete(rawMsg, key) - case "time_stamp": - err = unpopulateTimeRFC3339(val, "TimeStamp", &p.TimeStamp) - delete(rawMsg, key) - case "total_cpu_time": - err = unpopulate(val, "TotalCPUTime", &p.TotalCPUTime) - delete(rawMsg, key) - case "user_cpu_time": - err = unpopulate(val, "UserCPUTime", &p.UserCPUTime) - delete(rawMsg, key) - case "user_name": - err = unpopulate(val, "UserName", &p.UserName) - delete(rawMsg, key) - case "virtual_memory": - err = unpopulate(val, "VirtualMemory", &p.VirtualMemory) - delete(rawMsg, key) - case "working_set": - err = unpopulate(val, "WorkingSet", &p.WorkingSet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProcessThreadInfoProperties. -func (p ProcessThreadInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "base_priority", p.BasePriority) - populate(objectMap, "current_priority", p.CurrentPriority) - populate(objectMap, "href", p.Href) - populate(objectMap, "identifier", p.Identifier) - populate(objectMap, "priority_level", p.PriorityLevel) - populate(objectMap, "process", p.Process) - populate(objectMap, "start_address", p.StartAddress) - populateTimeRFC3339(objectMap, "start_time", p.StartTime) - populate(objectMap, "state", p.State) - populate(objectMap, "total_processor_time", p.TotalProcessorTime) - populate(objectMap, "user_processor_time", p.UserProcessorTime) - populate(objectMap, "wait_reason", p.WaitReason) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessThreadInfoProperties. -func (p *ProcessThreadInfoProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "base_priority": - err = unpopulate(val, "BasePriority", &p.BasePriority) - delete(rawMsg, key) - case "current_priority": - err = unpopulate(val, "CurrentPriority", &p.CurrentPriority) - delete(rawMsg, key) - case "href": - err = unpopulate(val, "Href", &p.Href) - delete(rawMsg, key) - case "identifier": - err = unpopulate(val, "Identifier", &p.Identifier) - delete(rawMsg, key) - case "priority_level": - err = unpopulate(val, "PriorityLevel", &p.PriorityLevel) - delete(rawMsg, key) - case "process": - err = unpopulate(val, "Process", &p.Process) - delete(rawMsg, key) - case "start_address": - err = unpopulate(val, "StartAddress", &p.StartAddress) - delete(rawMsg, key) - case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &p.State) - delete(rawMsg, key) - case "total_processor_time": - err = unpopulate(val, "TotalProcessorTime", &p.TotalProcessorTime) - delete(rawMsg, key) - case "user_processor_time": - err = unpopulate(val, "UserProcessorTime", &p.UserProcessorTime) - delete(rawMsg, key) - case "wait_reason": - err = unpopulate(val, "WaitReason", &p.WaitReason) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicCertificateProperties. -func (p PublicCertificateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateByteArray(objectMap, "blob", p.Blob, runtime.Base64StdFormat) - populate(objectMap, "publicCertificateLocation", p.PublicCertificateLocation) - populate(objectMap, "thumbprint", p.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicCertificateProperties. -func (p *PublicCertificateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blob": - err = runtime.DecodeByteArray(string(val), &p.Blob, runtime.Base64StdFormat) - delete(rawMsg, key) - case "publicCertificateLocation": - err = unpopulate(val, "PublicCertificateLocation", &p.PublicCertificateLocation) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &p.Thumbprint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QueryUtterancesResults. -func (q QueryUtterancesResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "query", q.Query) - populate(objectMap, "results", q.Results) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type QueueScaleRule. -func (q QueueScaleRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auth", q.Auth) - populate(objectMap, "queueLength", q.QueueLength) - populate(objectMap, "queueName", q.QueueName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RecommendationProperties. -func (r RecommendationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionName", r.ActionName) - populate(objectMap, "bladeName", r.BladeName) - populate(objectMap, "categoryTags", r.CategoryTags) - populate(objectMap, "channels", r.Channels) - populateTimeRFC3339(objectMap, "creationTime", r.CreationTime) - populate(objectMap, "displayName", r.DisplayName) - populate(objectMap, "enabled", r.Enabled) - populateTimeRFC3339(objectMap, "endTime", r.EndTime) - populate(objectMap, "extensionName", r.ExtensionName) - populate(objectMap, "forwardLink", r.ForwardLink) - populate(objectMap, "isDynamic", r.IsDynamic) - populate(objectMap, "level", r.Level) - populate(objectMap, "message", r.Message) - populateTimeRFC3339(objectMap, "nextNotificationTime", r.NextNotificationTime) - populateTimeRFC3339(objectMap, "notificationExpirationTime", r.NotificationExpirationTime) - populateTimeRFC3339(objectMap, "notifiedTime", r.NotifiedTime) - populate(objectMap, "recommendationId", r.RecommendationID) - populate(objectMap, "resourceId", r.ResourceID) - populate(objectMap, "resourceScope", r.ResourceScope) - populate(objectMap, "ruleName", r.RuleName) - populate(objectMap, "score", r.Score) - populateTimeRFC3339(objectMap, "startTime", r.StartTime) - populate(objectMap, "states", r.States) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendationProperties. -func (r *RecommendationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionName": - err = unpopulate(val, "ActionName", &r.ActionName) - delete(rawMsg, key) - case "bladeName": - err = unpopulate(val, "BladeName", &r.BladeName) - delete(rawMsg, key) - case "categoryTags": - err = unpopulate(val, "CategoryTags", &r.CategoryTags) - delete(rawMsg, key) - case "channels": - err = unpopulate(val, "Channels", &r.Channels) - delete(rawMsg, key) - case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &r.CreationTime) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &r.DisplayName) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &r.Enabled) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &r.EndTime) - delete(rawMsg, key) - case "extensionName": - err = unpopulate(val, "ExtensionName", &r.ExtensionName) - delete(rawMsg, key) - case "forwardLink": - err = unpopulate(val, "ForwardLink", &r.ForwardLink) - delete(rawMsg, key) - case "isDynamic": - err = unpopulate(val, "IsDynamic", &r.IsDynamic) - delete(rawMsg, key) - case "level": - err = unpopulate(val, "Level", &r.Level) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &r.Message) - delete(rawMsg, key) - case "nextNotificationTime": - err = unpopulateTimeRFC3339(val, "NextNotificationTime", &r.NextNotificationTime) - delete(rawMsg, key) - case "notificationExpirationTime": - err = unpopulateTimeRFC3339(val, "NotificationExpirationTime", &r.NotificationExpirationTime) - delete(rawMsg, key) - case "notifiedTime": - err = unpopulateTimeRFC3339(val, "NotifiedTime", &r.NotifiedTime) - delete(rawMsg, key) - case "recommendationId": - err = unpopulate(val, "RecommendationID", &r.RecommendationID) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &r.ResourceID) - delete(rawMsg, key) - case "resourceScope": - err = unpopulate(val, "ResourceScope", &r.ResourceScope) - delete(rawMsg, key) - case "ruleName": - err = unpopulate(val, "RuleName", &r.RuleName) - delete(rawMsg, key) - case "score": - err = unpopulate(val, "Score", &r.Score) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) - delete(rawMsg, key) - case "states": - err = unpopulate(val, "States", &r.States) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecommendationRuleProperties. -func (r RecommendationRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionName", r.ActionName) - populate(objectMap, "bladeName", r.BladeName) - populate(objectMap, "categoryTags", r.CategoryTags) - populate(objectMap, "channels", r.Channels) - populate(objectMap, "description", r.Description) - populate(objectMap, "displayName", r.DisplayName) - populate(objectMap, "extensionName", r.ExtensionName) - populate(objectMap, "forwardLink", r.ForwardLink) - populate(objectMap, "isDynamic", r.IsDynamic) - populate(objectMap, "level", r.Level) - populate(objectMap, "message", r.Message) - populate(objectMap, "recommendationId", r.RecommendationID) - populate(objectMap, "recommendationName", r.RecommendationName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RelayServiceConnectionEntity. -func (r RelayServiceConnectionEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "kind", r.Kind) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnectionARMResourceProperties. -func (r RemotePrivateEndpointConnectionARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipAddresses", r.IPAddresses) - populate(objectMap, "privateEndpoint", r.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", r.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", r.ProvisioningState) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnectionProperties. -func (r RemotePrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipAddresses", r.IPAddresses) - populate(objectMap, "privateEndpoint", r.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", r.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", r.ProvisioningState) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "kind", r.Kind) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceMetricDefinitionProperties. -func (r ResourceMetricDefinitionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "metricAvailabilities", r.MetricAvailabilities) - populate(objectMap, "primaryAggregationType", r.PrimaryAggregationType) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "resourceUri", r.ResourceURI) - populate(objectMap, "unit", r.Unit) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResponseMessageEnvelopeRemotePrivateEndpointConnection. -func (r ResponseMessageEnvelopeRemotePrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "error", r.Error) - populate(objectMap, "id", r.ID) - populate(objectMap, "identity", r.Identity) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "plan", r.Plan) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "sku", r.SKU) - populate(objectMap, "status", r.Status) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - populate(objectMap, "zones", r.Zones) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RestoreRequestProperties. -func (r RestoreRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "adjustConnectionStrings", r.AdjustConnectionStrings) - populate(objectMap, "appServicePlan", r.AppServicePlan) - populate(objectMap, "blobName", r.BlobName) - populate(objectMap, "databases", r.Databases) - populate(objectMap, "hostingEnvironment", r.HostingEnvironment) - populate(objectMap, "ignoreConflictingHostNames", r.IgnoreConflictingHostNames) - populate(objectMap, "ignoreDatabases", r.IgnoreDatabases) - populate(objectMap, "operationType", r.OperationType) - populate(objectMap, "overwrite", r.Overwrite) - populate(objectMap, "siteName", r.SiteName) - populate(objectMap, "storageAccountUrl", r.StorageAccountURL) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Revision. -func (r Revision) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "kind", r.Kind) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RevisionProperties. -func (r RevisionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "active", r.Active) - populateTimeRFC3339(objectMap, "createdTime", r.CreatedTime) - populate(objectMap, "fqdn", r.Fqdn) - populate(objectMap, "healthState", r.HealthState) - populate(objectMap, "provisioningError", r.ProvisioningError) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "replicas", r.Replicas) - populate(objectMap, "template", r.Template) - populate(objectMap, "trafficWeight", r.TrafficWeight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RevisionProperties. -func (r *RevisionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "active": - err = unpopulate(val, "Active", &r.Active) - delete(rawMsg, key) - case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &r.CreatedTime) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &r.Fqdn) - delete(rawMsg, key) - case "healthState": - err = unpopulate(val, "HealthState", &r.HealthState) - delete(rawMsg, key) - case "provisioningError": - err = unpopulate(val, "ProvisioningError", &r.ProvisioningError) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "replicas": - err = unpopulate(val, "Replicas", &r.Replicas) - delete(rawMsg, key) - case "template": - err = unpopulate(val, "Template", &r.Template) - delete(rawMsg, key) - case "trafficWeight": - err = unpopulate(val, "TrafficWeight", &r.TrafficWeight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKUDescription. -func (s SKUDescription) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capabilities", s.Capabilities) - populate(objectMap, "capacity", s.Capacity) - populate(objectMap, "family", s.Family) - populate(objectMap, "locations", s.Locations) - populate(objectMap, "name", s.Name) - populate(objectMap, "skuCapacity", s.SKUCapacity) - populate(objectMap, "size", s.Size) - populate(objectMap, "tier", s.Tier) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SampleUtterance. -func (s SampleUtterance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "links", s.Links) - populate(objectMap, "qid", s.Qid) - populate(objectMap, "text", s.Text) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Scale. -func (s Scale) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "maxReplicas", s.MaxReplicas) - populate(objectMap, "minReplicas", s.MinReplicas) - populate(objectMap, "rules", s.Rules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Site. -func (s Site) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extendedLocation", s.ExtendedLocation) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SiteAuthSettingsProperties. -func (s SiteAuthSettingsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aadClaimsAuthorization", s.AADClaimsAuthorization) - populate(objectMap, "additionalLoginParams", s.AdditionalLoginParams) - populate(objectMap, "allowedAudiences", s.AllowedAudiences) - populate(objectMap, "allowedExternalRedirectUrls", s.AllowedExternalRedirectUrls) - populate(objectMap, "authFilePath", s.AuthFilePath) - populate(objectMap, "clientId", s.ClientID) - populate(objectMap, "clientSecret", s.ClientSecret) - populate(objectMap, "clientSecretCertificateThumbprint", s.ClientSecretCertificateThumbprint) - populate(objectMap, "clientSecretSettingName", s.ClientSecretSettingName) - populate(objectMap, "configVersion", s.ConfigVersion) - populate(objectMap, "defaultProvider", s.DefaultProvider) - populate(objectMap, "enabled", s.Enabled) - populate(objectMap, "facebookAppId", s.FacebookAppID) - populate(objectMap, "facebookAppSecret", s.FacebookAppSecret) - populate(objectMap, "facebookAppSecretSettingName", s.FacebookAppSecretSettingName) - populate(objectMap, "facebookOAuthScopes", s.FacebookOAuthScopes) - populate(objectMap, "gitHubClientId", s.GitHubClientID) - populate(objectMap, "gitHubClientSecret", s.GitHubClientSecret) - populate(objectMap, "gitHubClientSecretSettingName", s.GitHubClientSecretSettingName) - populate(objectMap, "gitHubOAuthScopes", s.GitHubOAuthScopes) - populate(objectMap, "googleClientId", s.GoogleClientID) - populate(objectMap, "googleClientSecret", s.GoogleClientSecret) - populate(objectMap, "googleClientSecretSettingName", s.GoogleClientSecretSettingName) - populate(objectMap, "googleOAuthScopes", s.GoogleOAuthScopes) - populate(objectMap, "isAuthFromFile", s.IsAuthFromFile) - populate(objectMap, "issuer", s.Issuer) - populate(objectMap, "microsoftAccountClientId", s.MicrosoftAccountClientID) - populate(objectMap, "microsoftAccountClientSecret", s.MicrosoftAccountClientSecret) - populate(objectMap, "microsoftAccountClientSecretSettingName", s.MicrosoftAccountClientSecretSettingName) - populate(objectMap, "microsoftAccountOAuthScopes", s.MicrosoftAccountOAuthScopes) - populate(objectMap, "runtimeVersion", s.RuntimeVersion) - populate(objectMap, "tokenRefreshExtensionHours", s.TokenRefreshExtensionHours) - populate(objectMap, "tokenStoreEnabled", s.TokenStoreEnabled) - populate(objectMap, "twitterConsumerKey", s.TwitterConsumerKey) - populate(objectMap, "twitterConsumerSecret", s.TwitterConsumerSecret) - populate(objectMap, "twitterConsumerSecretSettingName", s.TwitterConsumerSecretSettingName) - populate(objectMap, "unauthenticatedClientAction", s.UnauthenticatedClientAction) - populate(objectMap, "validateIssuer", s.ValidateIssuer) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SiteConfig. -func (s SiteConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "apiDefinition", s.APIDefinition) - populate(objectMap, "apiManagementConfig", s.APIManagementConfig) - populate(objectMap, "acrUseManagedIdentityCreds", s.AcrUseManagedIdentityCreds) - populate(objectMap, "acrUserManagedIdentityID", s.AcrUserManagedIdentityID) - populate(objectMap, "alwaysOn", s.AlwaysOn) - populate(objectMap, "appCommandLine", s.AppCommandLine) - populate(objectMap, "appSettings", s.AppSettings) - populate(objectMap, "autoHealEnabled", s.AutoHealEnabled) - populate(objectMap, "autoHealRules", s.AutoHealRules) - populate(objectMap, "autoSwapSlotName", s.AutoSwapSlotName) - populate(objectMap, "azureStorageAccounts", s.AzureStorageAccounts) - populate(objectMap, "connectionStrings", s.ConnectionStrings) - populate(objectMap, "cors", s.Cors) - populate(objectMap, "defaultDocuments", s.DefaultDocuments) - populate(objectMap, "detailedErrorLoggingEnabled", s.DetailedErrorLoggingEnabled) - populate(objectMap, "documentRoot", s.DocumentRoot) - populate(objectMap, "experiments", s.Experiments) - populate(objectMap, "ftpsState", s.FtpsState) - populate(objectMap, "functionAppScaleLimit", s.FunctionAppScaleLimit) - populate(objectMap, "functionsRuntimeScaleMonitoringEnabled", s.FunctionsRuntimeScaleMonitoringEnabled) - populate(objectMap, "httpLoggingEnabled", s.HTTPLoggingEnabled) - populate(objectMap, "handlerMappings", s.HandlerMappings) - populate(objectMap, "healthCheckPath", s.HealthCheckPath) - populate(objectMap, "http20Enabled", s.Http20Enabled) - populate(objectMap, "ipSecurityRestrictions", s.IPSecurityRestrictions) - populate(objectMap, "javaContainer", s.JavaContainer) - populate(objectMap, "javaContainerVersion", s.JavaContainerVersion) - populate(objectMap, "javaVersion", s.JavaVersion) - populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) - populate(objectMap, "limits", s.Limits) - populate(objectMap, "linuxFxVersion", s.LinuxFxVersion) - populate(objectMap, "loadBalancing", s.LoadBalancing) - populate(objectMap, "localMySqlEnabled", s.LocalMySQLEnabled) - populate(objectMap, "logsDirectorySizeLimit", s.LogsDirectorySizeLimit) - populate(objectMap, "machineKey", s.MachineKey) - populate(objectMap, "managedPipelineMode", s.ManagedPipelineMode) - populate(objectMap, "managedServiceIdentityId", s.ManagedServiceIdentityID) - populate(objectMap, "minTlsVersion", s.MinTLSVersion) - populate(objectMap, "minimumElasticInstanceCount", s.MinimumElasticInstanceCount) - populate(objectMap, "netFrameworkVersion", s.NetFrameworkVersion) - populate(objectMap, "nodeVersion", s.NodeVersion) - populate(objectMap, "numberOfWorkers", s.NumberOfWorkers) - populate(objectMap, "phpVersion", s.PhpVersion) - populate(objectMap, "powerShellVersion", s.PowerShellVersion) - populate(objectMap, "preWarmedInstanceCount", s.PreWarmedInstanceCount) - populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess) - populate(objectMap, "publishingUsername", s.PublishingUsername) - populate(objectMap, "push", s.Push) - populate(objectMap, "pythonVersion", s.PythonVersion) - populate(objectMap, "remoteDebuggingEnabled", s.RemoteDebuggingEnabled) - populate(objectMap, "remoteDebuggingVersion", s.RemoteDebuggingVersion) - populate(objectMap, "requestTracingEnabled", s.RequestTracingEnabled) - populateTimeRFC3339(objectMap, "requestTracingExpirationTime", s.RequestTracingExpirationTime) - populate(objectMap, "scmIpSecurityRestrictions", s.ScmIPSecurityRestrictions) - populate(objectMap, "scmIpSecurityRestrictionsUseMain", s.ScmIPSecurityRestrictionsUseMain) - populate(objectMap, "scmMinTlsVersion", s.ScmMinTLSVersion) - populate(objectMap, "scmType", s.ScmType) - populate(objectMap, "tracingOptions", s.TracingOptions) - populate(objectMap, "use32BitWorkerProcess", s.Use32BitWorkerProcess) - populate(objectMap, "virtualApplications", s.VirtualApplications) - populate(objectMap, "vnetName", s.VnetName) - populate(objectMap, "vnetPrivatePortsCount", s.VnetPrivatePortsCount) - populate(objectMap, "vnetRouteAllEnabled", s.VnetRouteAllEnabled) - populate(objectMap, "webSocketsEnabled", s.WebSocketsEnabled) - populate(objectMap, "websiteTimeZone", s.WebsiteTimeZone) - populate(objectMap, "windowsFxVersion", s.WindowsFxVersion) - populate(objectMap, "xManagedServiceIdentityId", s.XManagedServiceIdentityID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfig. -func (s *SiteConfig) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "apiDefinition": - err = unpopulate(val, "APIDefinition", &s.APIDefinition) - delete(rawMsg, key) - case "apiManagementConfig": - err = unpopulate(val, "APIManagementConfig", &s.APIManagementConfig) - delete(rawMsg, key) - case "acrUseManagedIdentityCreds": - err = unpopulate(val, "AcrUseManagedIdentityCreds", &s.AcrUseManagedIdentityCreds) - delete(rawMsg, key) - case "acrUserManagedIdentityID": - err = unpopulate(val, "AcrUserManagedIdentityID", &s.AcrUserManagedIdentityID) - delete(rawMsg, key) - case "alwaysOn": - err = unpopulate(val, "AlwaysOn", &s.AlwaysOn) - delete(rawMsg, key) - case "appCommandLine": - err = unpopulate(val, "AppCommandLine", &s.AppCommandLine) - delete(rawMsg, key) - case "appSettings": - err = unpopulate(val, "AppSettings", &s.AppSettings) - delete(rawMsg, key) - case "autoHealEnabled": - err = unpopulate(val, "AutoHealEnabled", &s.AutoHealEnabled) - delete(rawMsg, key) - case "autoHealRules": - err = unpopulate(val, "AutoHealRules", &s.AutoHealRules) - delete(rawMsg, key) - case "autoSwapSlotName": - err = unpopulate(val, "AutoSwapSlotName", &s.AutoSwapSlotName) - delete(rawMsg, key) - case "azureStorageAccounts": - err = unpopulate(val, "AzureStorageAccounts", &s.AzureStorageAccounts) - delete(rawMsg, key) - case "connectionStrings": - err = unpopulate(val, "ConnectionStrings", &s.ConnectionStrings) - delete(rawMsg, key) - case "cors": - err = unpopulate(val, "Cors", &s.Cors) - delete(rawMsg, key) - case "defaultDocuments": - err = unpopulate(val, "DefaultDocuments", &s.DefaultDocuments) - delete(rawMsg, key) - case "detailedErrorLoggingEnabled": - err = unpopulate(val, "DetailedErrorLoggingEnabled", &s.DetailedErrorLoggingEnabled) - delete(rawMsg, key) - case "documentRoot": - err = unpopulate(val, "DocumentRoot", &s.DocumentRoot) - delete(rawMsg, key) - case "experiments": - err = unpopulate(val, "Experiments", &s.Experiments) - delete(rawMsg, key) - case "ftpsState": - err = unpopulate(val, "FtpsState", &s.FtpsState) - delete(rawMsg, key) - case "functionAppScaleLimit": - err = unpopulate(val, "FunctionAppScaleLimit", &s.FunctionAppScaleLimit) - delete(rawMsg, key) - case "functionsRuntimeScaleMonitoringEnabled": - err = unpopulate(val, "FunctionsRuntimeScaleMonitoringEnabled", &s.FunctionsRuntimeScaleMonitoringEnabled) - delete(rawMsg, key) - case "httpLoggingEnabled": - err = unpopulate(val, "HTTPLoggingEnabled", &s.HTTPLoggingEnabled) - delete(rawMsg, key) - case "handlerMappings": - err = unpopulate(val, "HandlerMappings", &s.HandlerMappings) - delete(rawMsg, key) - case "healthCheckPath": - err = unpopulate(val, "HealthCheckPath", &s.HealthCheckPath) - delete(rawMsg, key) - case "http20Enabled": - err = unpopulate(val, "Http20Enabled", &s.Http20Enabled) - delete(rawMsg, key) - case "ipSecurityRestrictions": - err = unpopulate(val, "IPSecurityRestrictions", &s.IPSecurityRestrictions) - delete(rawMsg, key) - case "javaContainer": - err = unpopulate(val, "JavaContainer", &s.JavaContainer) - delete(rawMsg, key) - case "javaContainerVersion": - err = unpopulate(val, "JavaContainerVersion", &s.JavaContainerVersion) - delete(rawMsg, key) - case "javaVersion": - err = unpopulate(val, "JavaVersion", &s.JavaVersion) - delete(rawMsg, key) - case "keyVaultReferenceIdentity": - err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) - delete(rawMsg, key) - case "limits": - err = unpopulate(val, "Limits", &s.Limits) - delete(rawMsg, key) - case "linuxFxVersion": - err = unpopulate(val, "LinuxFxVersion", &s.LinuxFxVersion) - delete(rawMsg, key) - case "loadBalancing": - err = unpopulate(val, "LoadBalancing", &s.LoadBalancing) - delete(rawMsg, key) - case "localMySqlEnabled": - err = unpopulate(val, "LocalMySQLEnabled", &s.LocalMySQLEnabled) - delete(rawMsg, key) - case "logsDirectorySizeLimit": - err = unpopulate(val, "LogsDirectorySizeLimit", &s.LogsDirectorySizeLimit) - delete(rawMsg, key) - case "machineKey": - err = unpopulate(val, "MachineKey", &s.MachineKey) - delete(rawMsg, key) - case "managedPipelineMode": - err = unpopulate(val, "ManagedPipelineMode", &s.ManagedPipelineMode) - delete(rawMsg, key) - case "managedServiceIdentityId": - err = unpopulate(val, "ManagedServiceIdentityID", &s.ManagedServiceIdentityID) - delete(rawMsg, key) - case "minTlsVersion": - err = unpopulate(val, "MinTLSVersion", &s.MinTLSVersion) - delete(rawMsg, key) - case "minimumElasticInstanceCount": - err = unpopulate(val, "MinimumElasticInstanceCount", &s.MinimumElasticInstanceCount) - delete(rawMsg, key) - case "netFrameworkVersion": - err = unpopulate(val, "NetFrameworkVersion", &s.NetFrameworkVersion) - delete(rawMsg, key) - case "nodeVersion": - err = unpopulate(val, "NodeVersion", &s.NodeVersion) - delete(rawMsg, key) - case "numberOfWorkers": - err = unpopulate(val, "NumberOfWorkers", &s.NumberOfWorkers) - delete(rawMsg, key) - case "phpVersion": - err = unpopulate(val, "PhpVersion", &s.PhpVersion) - delete(rawMsg, key) - case "powerShellVersion": - err = unpopulate(val, "PowerShellVersion", &s.PowerShellVersion) - delete(rawMsg, key) - case "preWarmedInstanceCount": - err = unpopulate(val, "PreWarmedInstanceCount", &s.PreWarmedInstanceCount) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess) - delete(rawMsg, key) - case "publishingUsername": - err = unpopulate(val, "PublishingUsername", &s.PublishingUsername) - delete(rawMsg, key) - case "push": - err = unpopulate(val, "Push", &s.Push) - delete(rawMsg, key) - case "pythonVersion": - err = unpopulate(val, "PythonVersion", &s.PythonVersion) - delete(rawMsg, key) - case "remoteDebuggingEnabled": - err = unpopulate(val, "RemoteDebuggingEnabled", &s.RemoteDebuggingEnabled) - delete(rawMsg, key) - case "remoteDebuggingVersion": - err = unpopulate(val, "RemoteDebuggingVersion", &s.RemoteDebuggingVersion) - delete(rawMsg, key) - case "requestTracingEnabled": - err = unpopulate(val, "RequestTracingEnabled", &s.RequestTracingEnabled) - delete(rawMsg, key) - case "requestTracingExpirationTime": - err = unpopulateTimeRFC3339(val, "RequestTracingExpirationTime", &s.RequestTracingExpirationTime) - delete(rawMsg, key) - case "scmIpSecurityRestrictions": - err = unpopulate(val, "ScmIPSecurityRestrictions", &s.ScmIPSecurityRestrictions) - delete(rawMsg, key) - case "scmIpSecurityRestrictionsUseMain": - err = unpopulate(val, "ScmIPSecurityRestrictionsUseMain", &s.ScmIPSecurityRestrictionsUseMain) - delete(rawMsg, key) - case "scmMinTlsVersion": - err = unpopulate(val, "ScmMinTLSVersion", &s.ScmMinTLSVersion) - delete(rawMsg, key) - case "scmType": - err = unpopulate(val, "ScmType", &s.ScmType) - delete(rawMsg, key) - case "tracingOptions": - err = unpopulate(val, "TracingOptions", &s.TracingOptions) - delete(rawMsg, key) - case "use32BitWorkerProcess": - err = unpopulate(val, "Use32BitWorkerProcess", &s.Use32BitWorkerProcess) - delete(rawMsg, key) - case "virtualApplications": - err = unpopulate(val, "VirtualApplications", &s.VirtualApplications) - delete(rawMsg, key) - case "vnetName": - err = unpopulate(val, "VnetName", &s.VnetName) - delete(rawMsg, key) - case "vnetPrivatePortsCount": - err = unpopulate(val, "VnetPrivatePortsCount", &s.VnetPrivatePortsCount) - delete(rawMsg, key) - case "vnetRouteAllEnabled": - err = unpopulate(val, "VnetRouteAllEnabled", &s.VnetRouteAllEnabled) - delete(rawMsg, key) - case "webSocketsEnabled": - err = unpopulate(val, "WebSocketsEnabled", &s.WebSocketsEnabled) - delete(rawMsg, key) - case "websiteTimeZone": - err = unpopulate(val, "WebsiteTimeZone", &s.WebsiteTimeZone) - delete(rawMsg, key) - case "windowsFxVersion": - err = unpopulate(val, "WindowsFxVersion", &s.WindowsFxVersion) - delete(rawMsg, key) - case "xManagedServiceIdentityId": - err = unpopulate(val, "XManagedServiceIdentityID", &s.XManagedServiceIdentityID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SiteConfigResource. -func (s SiteConfigResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SiteConfigurationSnapshotInfoProperties. -func (s SiteConfigurationSnapshotInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "snapshotId", s.SnapshotID) - populateTimeRFC3339(objectMap, "time", s.Time) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SiteConfigurationSnapshotInfoProperties. -func (s *SiteConfigurationSnapshotInfoProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "snapshotId": - err = unpopulate(val, "SnapshotID", &s.SnapshotID) - delete(rawMsg, key) - case "time": - err = unpopulateTimeRFC3339(val, "Time", &s.Time) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SiteExtensionInfoProperties. -func (s SiteExtensionInfoProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authors", s.Authors) - populate(objectMap, "comment", s.Comment) - populate(objectMap, "description", s.Description) - populate(objectMap, "download_count", s.DownloadCount) - populate(objectMap, "extension_id", s.ExtensionID) - populate(objectMap, "extension_type", s.ExtensionType) - populate(objectMap, "extension_url", s.ExtensionURL) - populate(objectMap, "feed_url", s.FeedURL) - populate(objectMap, "icon_url", s.IconURL) - populateTimeRFC3339(objectMap, "installed_date_time", s.InstalledDateTime) - populate(objectMap, "installer_command_line_params", s.InstallerCommandLineParams) - populate(objectMap, "license_url", s.LicenseURL) - populate(objectMap, "local_is_latest_version", s.LocalIsLatestVersion) - populate(objectMap, "local_path", s.LocalPath) - populate(objectMap, "project_url", s.ProjectURL) - populate(objectMap, "provisioningState", s.ProvisioningState) - populateTimeRFC3339(objectMap, "published_date_time", s.PublishedDateTime) - populate(objectMap, "summary", s.Summary) - populate(objectMap, "title", s.Title) - populate(objectMap, "version", s.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SiteExtensionInfoProperties. -func (s *SiteExtensionInfoProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authors": - err = unpopulate(val, "Authors", &s.Authors) - delete(rawMsg, key) - case "comment": - err = unpopulate(val, "Comment", &s.Comment) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "download_count": - err = unpopulate(val, "DownloadCount", &s.DownloadCount) - delete(rawMsg, key) - case "extension_id": - err = unpopulate(val, "ExtensionID", &s.ExtensionID) - delete(rawMsg, key) - case "extension_type": - err = unpopulate(val, "ExtensionType", &s.ExtensionType) - delete(rawMsg, key) - case "extension_url": - err = unpopulate(val, "ExtensionURL", &s.ExtensionURL) - delete(rawMsg, key) - case "feed_url": - err = unpopulate(val, "FeedURL", &s.FeedURL) - delete(rawMsg, key) - case "icon_url": - err = unpopulate(val, "IconURL", &s.IconURL) - delete(rawMsg, key) - case "installed_date_time": - err = unpopulateTimeRFC3339(val, "InstalledDateTime", &s.InstalledDateTime) - delete(rawMsg, key) - case "installer_command_line_params": - err = unpopulate(val, "InstallerCommandLineParams", &s.InstallerCommandLineParams) - delete(rawMsg, key) - case "license_url": - err = unpopulate(val, "LicenseURL", &s.LicenseURL) - delete(rawMsg, key) - case "local_is_latest_version": - err = unpopulate(val, "LocalIsLatestVersion", &s.LocalIsLatestVersion) - delete(rawMsg, key) - case "local_path": - err = unpopulate(val, "LocalPath", &s.LocalPath) - delete(rawMsg, key) - case "project_url": - err = unpopulate(val, "ProjectURL", &s.ProjectURL) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "published_date_time": - err = unpopulateTimeRFC3339(val, "PublishedDateTime", &s.PublishedDateTime) - delete(rawMsg, key) - case "summary": - err = unpopulate(val, "Summary", &s.Summary) - delete(rawMsg, key) - case "title": - err = unpopulate(val, "Title", &s.Title) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &s.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SitePatchResource. -func (s SitePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SitePatchResourceProperties. -func (s SitePatchResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "availabilityState", s.AvailabilityState) - populate(objectMap, "clientAffinityEnabled", s.ClientAffinityEnabled) - populate(objectMap, "clientCertEnabled", s.ClientCertEnabled) - populate(objectMap, "clientCertExclusionPaths", s.ClientCertExclusionPaths) - populate(objectMap, "clientCertMode", s.ClientCertMode) - populate(objectMap, "cloningInfo", s.CloningInfo) - populate(objectMap, "containerSize", s.ContainerSize) - populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) - populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) - populate(objectMap, "defaultHostName", s.DefaultHostName) - populate(objectMap, "enabled", s.Enabled) - populate(objectMap, "enabledHostNames", s.EnabledHostNames) - populate(objectMap, "httpsOnly", s.HTTPSOnly) - populate(objectMap, "hostNameSslStates", s.HostNameSSLStates) - populate(objectMap, "hostNames", s.HostNames) - populate(objectMap, "hostNamesDisabled", s.HostNamesDisabled) - populate(objectMap, "hostingEnvironmentProfile", s.HostingEnvironmentProfile) - populate(objectMap, "hyperV", s.HyperV) - populate(objectMap, "inProgressOperationId", s.InProgressOperationID) - populate(objectMap, "isDefaultContainer", s.IsDefaultContainer) - populate(objectMap, "isXenon", s.IsXenon) - populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) - populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) - populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) - populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) - populate(objectMap, "possibleOutboundIpAddresses", s.PossibleOutboundIPAddresses) - populate(objectMap, "redundancyMode", s.RedundancyMode) - populate(objectMap, "repositorySiteName", s.RepositorySiteName) - populate(objectMap, "reserved", s.Reserved) - populate(objectMap, "resourceGroup", s.ResourceGroup) - populate(objectMap, "scmSiteAlsoStopped", s.ScmSiteAlsoStopped) - populate(objectMap, "serverFarmId", s.ServerFarmID) - populate(objectMap, "siteConfig", s.SiteConfig) - populate(objectMap, "slotSwapStatus", s.SlotSwapStatus) - populate(objectMap, "state", s.State) - populate(objectMap, "storageAccountRequired", s.StorageAccountRequired) - populateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) - populate(objectMap, "targetSwapSlot", s.TargetSwapSlot) - populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) - populate(objectMap, "usageState", s.UsageState) - populate(objectMap, "virtualNetworkSubnetId", s.VirtualNetworkSubnetID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SitePatchResourceProperties. -func (s *SitePatchResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "availabilityState": - err = unpopulate(val, "AvailabilityState", &s.AvailabilityState) - delete(rawMsg, key) - case "clientAffinityEnabled": - err = unpopulate(val, "ClientAffinityEnabled", &s.ClientAffinityEnabled) - delete(rawMsg, key) - case "clientCertEnabled": - err = unpopulate(val, "ClientCertEnabled", &s.ClientCertEnabled) - delete(rawMsg, key) - case "clientCertExclusionPaths": - err = unpopulate(val, "ClientCertExclusionPaths", &s.ClientCertExclusionPaths) - delete(rawMsg, key) - case "clientCertMode": - err = unpopulate(val, "ClientCertMode", &s.ClientCertMode) - delete(rawMsg, key) - case "cloningInfo": - err = unpopulate(val, "CloningInfo", &s.CloningInfo) - delete(rawMsg, key) - case "containerSize": - err = unpopulate(val, "ContainerSize", &s.ContainerSize) - delete(rawMsg, key) - case "customDomainVerificationId": - err = unpopulate(val, "CustomDomainVerificationID", &s.CustomDomainVerificationID) - delete(rawMsg, key) - case "dailyMemoryTimeQuota": - err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) - delete(rawMsg, key) - case "defaultHostName": - err = unpopulate(val, "DefaultHostName", &s.DefaultHostName) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &s.Enabled) - delete(rawMsg, key) - case "enabledHostNames": - err = unpopulate(val, "EnabledHostNames", &s.EnabledHostNames) - delete(rawMsg, key) - case "httpsOnly": - err = unpopulate(val, "HTTPSOnly", &s.HTTPSOnly) - delete(rawMsg, key) - case "hostNameSslStates": - err = unpopulate(val, "HostNameSSLStates", &s.HostNameSSLStates) - delete(rawMsg, key) - case "hostNames": - err = unpopulate(val, "HostNames", &s.HostNames) - delete(rawMsg, key) - case "hostNamesDisabled": - err = unpopulate(val, "HostNamesDisabled", &s.HostNamesDisabled) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &s.HostingEnvironmentProfile) - delete(rawMsg, key) - case "hyperV": - err = unpopulate(val, "HyperV", &s.HyperV) - delete(rawMsg, key) - case "inProgressOperationId": - err = unpopulate(val, "InProgressOperationID", &s.InProgressOperationID) - delete(rawMsg, key) - case "isDefaultContainer": - err = unpopulate(val, "IsDefaultContainer", &s.IsDefaultContainer) - delete(rawMsg, key) - case "isXenon": - err = unpopulate(val, "IsXenon", &s.IsXenon) - delete(rawMsg, key) - case "keyVaultReferenceIdentity": - err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) - delete(rawMsg, key) - case "lastModifiedTimeUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) - delete(rawMsg, key) - case "maxNumberOfWorkers": - err = unpopulate(val, "MaxNumberOfWorkers", &s.MaxNumberOfWorkers) - delete(rawMsg, key) - case "outboundIpAddresses": - err = unpopulate(val, "OutboundIPAddresses", &s.OutboundIPAddresses) - delete(rawMsg, key) - case "possibleOutboundIpAddresses": - err = unpopulate(val, "PossibleOutboundIPAddresses", &s.PossibleOutboundIPAddresses) - delete(rawMsg, key) - case "redundancyMode": - err = unpopulate(val, "RedundancyMode", &s.RedundancyMode) - delete(rawMsg, key) - case "repositorySiteName": - err = unpopulate(val, "RepositorySiteName", &s.RepositorySiteName) - delete(rawMsg, key) - case "reserved": - err = unpopulate(val, "Reserved", &s.Reserved) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) - delete(rawMsg, key) - case "scmSiteAlsoStopped": - err = unpopulate(val, "ScmSiteAlsoStopped", &s.ScmSiteAlsoStopped) - delete(rawMsg, key) - case "serverFarmId": - err = unpopulate(val, "ServerFarmID", &s.ServerFarmID) - delete(rawMsg, key) - case "siteConfig": - err = unpopulate(val, "SiteConfig", &s.SiteConfig) - delete(rawMsg, key) - case "slotSwapStatus": - err = unpopulate(val, "SlotSwapStatus", &s.SlotSwapStatus) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - case "storageAccountRequired": - err = unpopulate(val, "StorageAccountRequired", &s.StorageAccountRequired) - delete(rawMsg, key) - case "suspendedTill": - err = unpopulateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) - delete(rawMsg, key) - case "targetSwapSlot": - err = unpopulate(val, "TargetSwapSlot", &s.TargetSwapSlot) - delete(rawMsg, key) - case "trafficManagerHostNames": - err = unpopulate(val, "TrafficManagerHostNames", &s.TrafficManagerHostNames) - delete(rawMsg, key) - case "usageState": - err = unpopulate(val, "UsageState", &s.UsageState) - delete(rawMsg, key) - case "virtualNetworkSubnetId": - err = unpopulate(val, "VirtualNetworkSubnetID", &s.VirtualNetworkSubnetID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SiteProperties. -func (s SiteProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "availabilityState", s.AvailabilityState) - populate(objectMap, "clientAffinityEnabled", s.ClientAffinityEnabled) - populate(objectMap, "clientCertEnabled", s.ClientCertEnabled) - populate(objectMap, "clientCertExclusionPaths", s.ClientCertExclusionPaths) - populate(objectMap, "clientCertMode", s.ClientCertMode) - populate(objectMap, "cloningInfo", s.CloningInfo) - populate(objectMap, "containerSize", s.ContainerSize) - populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) - populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) - populate(objectMap, "defaultHostName", s.DefaultHostName) - populate(objectMap, "enabled", s.Enabled) - populate(objectMap, "enabledHostNames", s.EnabledHostNames) - populate(objectMap, "httpsOnly", s.HTTPSOnly) - populate(objectMap, "hostNameSslStates", s.HostNameSSLStates) - populate(objectMap, "hostNames", s.HostNames) - populate(objectMap, "hostNamesDisabled", s.HostNamesDisabled) - populate(objectMap, "hostingEnvironmentProfile", s.HostingEnvironmentProfile) - populate(objectMap, "hyperV", s.HyperV) - populate(objectMap, "inProgressOperationId", s.InProgressOperationID) - populate(objectMap, "isDefaultContainer", s.IsDefaultContainer) - populate(objectMap, "isXenon", s.IsXenon) - populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) - populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) - populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) - populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) - populate(objectMap, "possibleOutboundIpAddresses", s.PossibleOutboundIPAddresses) - populate(objectMap, "redundancyMode", s.RedundancyMode) - populate(objectMap, "repositorySiteName", s.RepositorySiteName) - populate(objectMap, "reserved", s.Reserved) - populate(objectMap, "resourceGroup", s.ResourceGroup) - populate(objectMap, "scmSiteAlsoStopped", s.ScmSiteAlsoStopped) - populate(objectMap, "serverFarmId", s.ServerFarmID) - populate(objectMap, "siteConfig", s.SiteConfig) - populate(objectMap, "slotSwapStatus", s.SlotSwapStatus) - populate(objectMap, "state", s.State) - populate(objectMap, "storageAccountRequired", s.StorageAccountRequired) - populateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) - populate(objectMap, "targetSwapSlot", s.TargetSwapSlot) - populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) - populate(objectMap, "usageState", s.UsageState) - populate(objectMap, "virtualNetworkSubnetId", s.VirtualNetworkSubnetID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SiteProperties. -func (s *SiteProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "availabilityState": - err = unpopulate(val, "AvailabilityState", &s.AvailabilityState) - delete(rawMsg, key) - case "clientAffinityEnabled": - err = unpopulate(val, "ClientAffinityEnabled", &s.ClientAffinityEnabled) - delete(rawMsg, key) - case "clientCertEnabled": - err = unpopulate(val, "ClientCertEnabled", &s.ClientCertEnabled) - delete(rawMsg, key) - case "clientCertExclusionPaths": - err = unpopulate(val, "ClientCertExclusionPaths", &s.ClientCertExclusionPaths) - delete(rawMsg, key) - case "clientCertMode": - err = unpopulate(val, "ClientCertMode", &s.ClientCertMode) - delete(rawMsg, key) - case "cloningInfo": - err = unpopulate(val, "CloningInfo", &s.CloningInfo) - delete(rawMsg, key) - case "containerSize": - err = unpopulate(val, "ContainerSize", &s.ContainerSize) - delete(rawMsg, key) - case "customDomainVerificationId": - err = unpopulate(val, "CustomDomainVerificationID", &s.CustomDomainVerificationID) - delete(rawMsg, key) - case "dailyMemoryTimeQuota": - err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) - delete(rawMsg, key) - case "defaultHostName": - err = unpopulate(val, "DefaultHostName", &s.DefaultHostName) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &s.Enabled) - delete(rawMsg, key) - case "enabledHostNames": - err = unpopulate(val, "EnabledHostNames", &s.EnabledHostNames) - delete(rawMsg, key) - case "httpsOnly": - err = unpopulate(val, "HTTPSOnly", &s.HTTPSOnly) - delete(rawMsg, key) - case "hostNameSslStates": - err = unpopulate(val, "HostNameSSLStates", &s.HostNameSSLStates) - delete(rawMsg, key) - case "hostNames": - err = unpopulate(val, "HostNames", &s.HostNames) - delete(rawMsg, key) - case "hostNamesDisabled": - err = unpopulate(val, "HostNamesDisabled", &s.HostNamesDisabled) - delete(rawMsg, key) - case "hostingEnvironmentProfile": - err = unpopulate(val, "HostingEnvironmentProfile", &s.HostingEnvironmentProfile) - delete(rawMsg, key) - case "hyperV": - err = unpopulate(val, "HyperV", &s.HyperV) - delete(rawMsg, key) - case "inProgressOperationId": - err = unpopulate(val, "InProgressOperationID", &s.InProgressOperationID) - delete(rawMsg, key) - case "isDefaultContainer": - err = unpopulate(val, "IsDefaultContainer", &s.IsDefaultContainer) - delete(rawMsg, key) - case "isXenon": - err = unpopulate(val, "IsXenon", &s.IsXenon) - delete(rawMsg, key) - case "keyVaultReferenceIdentity": - err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) - delete(rawMsg, key) - case "lastModifiedTimeUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) - delete(rawMsg, key) - case "maxNumberOfWorkers": - err = unpopulate(val, "MaxNumberOfWorkers", &s.MaxNumberOfWorkers) - delete(rawMsg, key) - case "outboundIpAddresses": - err = unpopulate(val, "OutboundIPAddresses", &s.OutboundIPAddresses) - delete(rawMsg, key) - case "possibleOutboundIpAddresses": - err = unpopulate(val, "PossibleOutboundIPAddresses", &s.PossibleOutboundIPAddresses) - delete(rawMsg, key) - case "redundancyMode": - err = unpopulate(val, "RedundancyMode", &s.RedundancyMode) - delete(rawMsg, key) - case "repositorySiteName": - err = unpopulate(val, "RepositorySiteName", &s.RepositorySiteName) - delete(rawMsg, key) - case "reserved": - err = unpopulate(val, "Reserved", &s.Reserved) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) - delete(rawMsg, key) - case "scmSiteAlsoStopped": - err = unpopulate(val, "ScmSiteAlsoStopped", &s.ScmSiteAlsoStopped) - delete(rawMsg, key) - case "serverFarmId": - err = unpopulate(val, "ServerFarmID", &s.ServerFarmID) - delete(rawMsg, key) - case "siteConfig": - err = unpopulate(val, "SiteConfig", &s.SiteConfig) - delete(rawMsg, key) - case "slotSwapStatus": - err = unpopulate(val, "SlotSwapStatus", &s.SlotSwapStatus) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - case "storageAccountRequired": - err = unpopulate(val, "StorageAccountRequired", &s.StorageAccountRequired) - delete(rawMsg, key) - case "suspendedTill": - err = unpopulateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) - delete(rawMsg, key) - case "targetSwapSlot": - err = unpopulate(val, "TargetSwapSlot", &s.TargetSwapSlot) - delete(rawMsg, key) - case "trafficManagerHostNames": - err = unpopulate(val, "TrafficManagerHostNames", &s.TrafficManagerHostNames) - delete(rawMsg, key) - case "usageState": - err = unpopulate(val, "UsageState", &s.UsageState) - delete(rawMsg, key) - case "virtualNetworkSubnetId": - err = unpopulate(val, "VirtualNetworkSubnetID", &s.VirtualNetworkSubnetID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SiteSourceControl. -func (s SiteSourceControl) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SlotConfigNames. -func (s SlotConfigNames) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appSettingNames", s.AppSettingNames) - populate(objectMap, "azureStorageConfigNames", s.AzureStorageConfigNames) - populate(objectMap, "connectionStringNames", s.ConnectionStringNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SlotSwapStatus. -func (s SlotSwapStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationSlotName", s.DestinationSlotName) - populate(objectMap, "sourceSlotName", s.SourceSlotName) - populateTimeRFC3339(objectMap, "timestampUtc", s.TimestampUTC) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SlotSwapStatus. -func (s *SlotSwapStatus) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinationSlotName": - err = unpopulate(val, "DestinationSlotName", &s.DestinationSlotName) - delete(rawMsg, key) - case "sourceSlotName": - err = unpopulate(val, "SourceSlotName", &s.SourceSlotName) - delete(rawMsg, key) - case "timestampUtc": - err = unpopulateTimeRFC3339(val, "TimestampUTC", &s.TimestampUTC) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Solution. -func (s Solution) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "data", s.Data) - populate(objectMap, "description", s.Description) - populate(objectMap, "displayName", s.DisplayName) - populate(objectMap, "id", s.ID) - populate(objectMap, "metadata", s.Metadata) - populate(objectMap, "order", s.Order) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SourceControlProperties. -func (s SourceControlProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "expirationTime", s.ExpirationTime) - populate(objectMap, "refreshToken", s.RefreshToken) - populate(objectMap, "token", s.Token) - populate(objectMap, "tokenSecret", s.TokenSecret) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SourceControlProperties. -func (s *SourceControlProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &s.ExpirationTime) - delete(rawMsg, key) - case "refreshToken": - err = unpopulate(val, "RefreshToken", &s.RefreshToken) - delete(rawMsg, key) - case "token": - err = unpopulate(val, "Token", &s.Token) - delete(rawMsg, key) - case "tokenSecret": - err = unpopulate(val, "TokenSecret", &s.TokenSecret) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StackMajorVersion. -func (s StackMajorVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appSettingsDictionary", s.AppSettingsDictionary) - populate(objectMap, "applicationInsights", s.ApplicationInsights) - populate(objectMap, "displayVersion", s.DisplayVersion) - populate(objectMap, "isDefault", s.IsDefault) - populate(objectMap, "isDeprecated", s.IsDeprecated) - populate(objectMap, "isHidden", s.IsHidden) - populate(objectMap, "isPreview", s.IsPreview) - populate(objectMap, "minorVersions", s.MinorVersions) - populate(objectMap, "runtimeVersion", s.RuntimeVersion) - populate(objectMap, "siteConfigPropertiesDictionary", s.SiteConfigPropertiesDictionary) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSite. -func (s StaticSite) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowConfigFileUpdates", s.AllowConfigFileUpdates) - populate(objectMap, "branch", s.Branch) - populate(objectMap, "buildProperties", s.BuildProperties) - populate(objectMap, "contentDistributionEndpoint", s.ContentDistributionEndpoint) - populate(objectMap, "customDomains", s.CustomDomains) - populate(objectMap, "defaultHostname", s.DefaultHostname) - populate(objectMap, "enterpriseGradeCdnStatus", s.EnterpriseGradeCdnStatus) - populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) - populate(objectMap, "privateEndpointConnections", s.PrivateEndpointConnections) - populate(objectMap, "provider", s.Provider) - populate(objectMap, "repositoryToken", s.RepositoryToken) - populate(objectMap, "repositoryUrl", s.RepositoryURL) - populate(objectMap, "stagingEnvironmentPolicy", s.StagingEnvironmentPolicy) - populate(objectMap, "templateProperties", s.TemplateProperties) - populate(objectMap, "userProvidedFunctionApps", s.UserProvidedFunctionApps) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteARMResource. -func (s StaticSiteARMResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "sku", s.SKU) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteBuildARMResourceProperties. -func (s StaticSiteBuildARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "buildId", s.BuildID) - populateTimeRFC3339(objectMap, "createdTimeUtc", s.CreatedTimeUTC) - populate(objectMap, "hostname", s.Hostname) - populateTimeRFC3339(objectMap, "lastUpdatedOn", s.LastUpdatedOn) - populate(objectMap, "pullRequestTitle", s.PullRequestTitle) - populate(objectMap, "sourceBranch", s.SourceBranch) - populate(objectMap, "status", s.Status) - populate(objectMap, "userProvidedFunctionApps", s.UserProvidedFunctionApps) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteBuildARMResourceProperties. -func (s *StaticSiteBuildARMResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "buildId": - err = unpopulate(val, "BuildID", &s.BuildID) - delete(rawMsg, key) - case "createdTimeUtc": - err = unpopulateTimeRFC3339(val, "CreatedTimeUTC", &s.CreatedTimeUTC) - delete(rawMsg, key) - case "hostname": - err = unpopulate(val, "Hostname", &s.Hostname) - delete(rawMsg, key) - case "lastUpdatedOn": - err = unpopulateTimeRFC3339(val, "LastUpdatedOn", &s.LastUpdatedOn) - delete(rawMsg, key) - case "pullRequestTitle": - err = unpopulate(val, "PullRequestTitle", &s.PullRequestTitle) - delete(rawMsg, key) - case "sourceBranch": - err = unpopulate(val, "SourceBranch", &s.SourceBranch) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) - delete(rawMsg, key) - case "userProvidedFunctionApps": - err = unpopulate(val, "UserProvidedFunctionApps", &s.UserProvidedFunctionApps) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainOverviewARMResourceProperties. -func (s StaticSiteCustomDomainOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) - populate(objectMap, "domainName", s.DomainName) - populate(objectMap, "errorMessage", s.ErrorMessage) - populate(objectMap, "status", s.Status) - populate(objectMap, "validationToken", s.ValidationToken) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteCustomDomainOverviewARMResourceProperties. -func (s *StaticSiteCustomDomainOverviewARMResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) - delete(rawMsg, key) - case "domainName": - err = unpopulate(val, "DomainName", &s.DomainName) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &s.ErrorMessage) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) - delete(rawMsg, key) - case "validationToken": - err = unpopulate(val, "ValidationToken", &s.ValidationToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSitePatchResource. -func (s StaticSitePatchResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserARMResource. -func (s StaticSiteUserARMResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationResponseResourceProperties. -func (s StaticSiteUserInvitationResponseResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "expiresOn", s.ExpiresOn) - populate(objectMap, "invitationUrl", s.InvitationURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserInvitationResponseResourceProperties. -func (s *StaticSiteUserInvitationResponseResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expiresOn": - err = unpopulateTimeRFC3339(val, "ExpiresOn", &s.ExpiresOn) - delete(rawMsg, key) - case "invitationUrl": - err = unpopulate(val, "InvitationURL", &s.InvitationURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppARMResourceProperties. -func (s StaticSiteUserProvidedFunctionAppARMResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) - populate(objectMap, "functionAppRegion", s.FunctionAppRegion) - populate(objectMap, "functionAppResourceId", s.FunctionAppResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppARMResourceProperties. -func (s *StaticSiteUserProvidedFunctionAppARMResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) - delete(rawMsg, key) - case "functionAppRegion": - err = unpopulate(val, "FunctionAppRegion", &s.FunctionAppRegion) - delete(rawMsg, key) - case "functionAppResourceId": - err = unpopulate(val, "FunctionAppResourceID", &s.FunctionAppResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppProperties. -func (s StaticSiteUserProvidedFunctionAppProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) - populate(objectMap, "functionAppRegion", s.FunctionAppRegion) - populate(objectMap, "functionAppResourceId", s.FunctionAppResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSiteUserProvidedFunctionAppProperties. -func (s *StaticSiteUserProvidedFunctionAppProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) - delete(rawMsg, key) - case "functionAppRegion": - err = unpopulate(val, "FunctionAppRegion", &s.FunctionAppRegion) - delete(rawMsg, key) - case "functionAppResourceId": - err = unpopulate(val, "FunctionAppResourceID", &s.FunctionAppResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StringDictionary. -func (s StringDictionary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StringList. -func (s StringList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SwiftVirtualNetwork. -func (s SwiftVirtualNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Template. -func (t Template) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containers", t.Containers) - populate(objectMap, "dapr", t.Dapr) - populate(objectMap, "revisionSuffix", t.RevisionSuffix) - populate(objectMap, "scale", t.Scale) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type TriggeredJobHistoryProperties. -func (t TriggeredJobHistoryProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "runs", t.Runs) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type TriggeredJobRun. -func (t TriggeredJobRun) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "duration", t.Duration) - populateTimeRFC3339(objectMap, "end_time", t.EndTime) - populate(objectMap, "error_url", t.ErrorURL) - populate(objectMap, "job_name", t.JobName) - populate(objectMap, "output_url", t.OutputURL) - populateTimeRFC3339(objectMap, "start_time", t.StartTime) - populate(objectMap, "status", t.Status) - populate(objectMap, "trigger", t.Trigger) - populate(objectMap, "url", t.URL) - populate(objectMap, "web_job_id", t.WebJobID) - populate(objectMap, "web_job_name", t.WebJobName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TriggeredJobRun. -func (t *TriggeredJobRun) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "duration": - err = unpopulate(val, "Duration", &t.Duration) - delete(rawMsg, key) - case "end_time": - err = unpopulateTimeRFC3339(val, "EndTime", &t.EndTime) - delete(rawMsg, key) - case "error_url": - err = unpopulate(val, "ErrorURL", &t.ErrorURL) - delete(rawMsg, key) - case "job_name": - err = unpopulate(val, "JobName", &t.JobName) - delete(rawMsg, key) - case "output_url": - err = unpopulate(val, "OutputURL", &t.OutputURL) - delete(rawMsg, key) - case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &t.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &t.Status) - delete(rawMsg, key) - case "trigger": - err = unpopulate(val, "Trigger", &t.Trigger) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &t.URL) - delete(rawMsg, key) - case "web_job_id": - err = unpopulate(val, "WebJobID", &t.WebJobID) - delete(rawMsg, key) - case "web_job_name": - err = unpopulate(val, "WebJobName", &t.WebJobName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TriggeredWebJobProperties. -func (t TriggeredWebJobProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "error", t.Error) - populate(objectMap, "extra_info_url", t.ExtraInfoURL) - populate(objectMap, "history_url", t.HistoryURL) - populate(objectMap, "latest_run", t.LatestRun) - populate(objectMap, "run_command", t.RunCommand) - populate(objectMap, "scheduler_logs_url", t.SchedulerLogsURL) - populate(objectMap, "settings", t.Settings) - populate(objectMap, "url", t.URL) - populate(objectMap, "using_sdk", t.UsingSdk) - populate(objectMap, "web_job_type", t.WebJobType) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type UsageProperties. -func (u UsageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeMode", u.ComputeMode) - populate(objectMap, "currentValue", u.CurrentValue) - populate(objectMap, "displayName", u.DisplayName) - populate(objectMap, "limit", u.Limit) - populateTimeRFC3339(objectMap, "nextResetTime", u.NextResetTime) - populate(objectMap, "resourceName", u.ResourceName) - populate(objectMap, "siteMode", u.SiteMode) - populate(objectMap, "unit", u.Unit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UsageProperties. -func (u *UsageProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeMode": - err = unpopulate(val, "ComputeMode", &u.ComputeMode) - delete(rawMsg, key) - case "currentValue": - err = unpopulate(val, "CurrentValue", &u.CurrentValue) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &u.DisplayName) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &u.Limit) - delete(rawMsg, key) - case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &u.NextResetTime) - delete(rawMsg, key) - case "resourceName": - err = unpopulate(val, "ResourceName", &u.ResourceName) - delete(rawMsg, key) - case "siteMode": - err = unpopulate(val, "SiteMode", &u.SiteMode) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &u.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplication. -func (v VirtualApplication) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "physicalPath", v.PhysicalPath) - populate(objectMap, "preloadEnabled", v.PreloadEnabled) - populate(objectMap, "virtualDirectories", v.VirtualDirectories) - populate(objectMap, "virtualPath", v.VirtualPath) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VnetGateway. -func (v VnetGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "kind", v.Kind) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VnetInfo. -func (v VnetInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "certBlob", v.CertBlob) - populate(objectMap, "certThumbprint", v.CertThumbprint) - populate(objectMap, "dnsServers", v.DNSServers) - populate(objectMap, "isSwift", v.IsSwift) - populate(objectMap, "resyncRequired", v.ResyncRequired) - populate(objectMap, "routes", v.Routes) - populate(objectMap, "vnetResourceId", v.VnetResourceID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VnetInfoResource. -func (v VnetInfoResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "kind", v.Kind) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VnetRoute. -func (v VnetRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "kind", v.Kind) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VnetValidationFailureDetailsProperties. -func (v VnetValidationFailureDetailsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "failed", v.Failed) - populate(objectMap, "failedTests", v.FailedTests) - populate(objectMap, "message", v.Message) - populate(objectMap, "warnings", v.Warnings) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WebAppMajorVersion. -func (w WebAppMajorVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayText", w.DisplayText) - populate(objectMap, "minorVersions", w.MinorVersions) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WebAppRuntimeSettings. -func (w WebAppRuntimeSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appInsightsSettings", w.AppInsightsSettings) - populateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) - populate(objectMap, "gitHubActionSettings", w.GitHubActionSettings) - populate(objectMap, "isAutoUpdate", w.IsAutoUpdate) - populate(objectMap, "isDeprecated", w.IsDeprecated) - populate(objectMap, "isEarlyAccess", w.IsEarlyAccess) - populate(objectMap, "isHidden", w.IsHidden) - populate(objectMap, "isPreview", w.IsPreview) - populate(objectMap, "remoteDebuggingSupported", w.RemoteDebuggingSupported) - populate(objectMap, "runtimeVersion", w.RuntimeVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppRuntimeSettings. -func (w *WebAppRuntimeSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appInsightsSettings": - err = unpopulate(val, "AppInsightsSettings", &w.AppInsightsSettings) - delete(rawMsg, key) - case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) - delete(rawMsg, key) - case "gitHubActionSettings": - err = unpopulate(val, "GitHubActionSettings", &w.GitHubActionSettings) - delete(rawMsg, key) - case "isAutoUpdate": - err = unpopulate(val, "IsAutoUpdate", &w.IsAutoUpdate) - delete(rawMsg, key) - case "isDeprecated": - err = unpopulate(val, "IsDeprecated", &w.IsDeprecated) - delete(rawMsg, key) - case "isEarlyAccess": - err = unpopulate(val, "IsEarlyAccess", &w.IsEarlyAccess) - delete(rawMsg, key) - case "isHidden": - err = unpopulate(val, "IsHidden", &w.IsHidden) - delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &w.IsPreview) - delete(rawMsg, key) - case "remoteDebuggingSupported": - err = unpopulate(val, "RemoteDebuggingSupported", &w.RemoteDebuggingSupported) - delete(rawMsg, key) - case "runtimeVersion": - err = unpopulate(val, "RuntimeVersion", &w.RuntimeVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WebAppStackProperties. -func (w WebAppStackProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayText", w.DisplayText) - populate(objectMap, "majorVersions", w.MajorVersions) - populate(objectMap, "preferredOs", w.PreferredOs) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WebJobProperties. -func (w WebJobProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "error", w.Error) - populate(objectMap, "extra_info_url", w.ExtraInfoURL) - populate(objectMap, "run_command", w.RunCommand) - populate(objectMap, "settings", w.Settings) - populate(objectMap, "url", w.URL) - populate(objectMap, "using_sdk", w.UsingSdk) - populate(objectMap, "web_job_type", w.WebJobType) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WebSiteInstanceStatusProperties. -func (w WebSiteInstanceStatusProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "consoleUrl", w.ConsoleURL) - populate(objectMap, "containers", w.Containers) - populate(objectMap, "detectorUrl", w.DetectorURL) - populate(objectMap, "healthCheckUrl", w.HealthCheckURL) - populate(objectMap, "state", w.State) - populate(objectMap, "statusUrl", w.StatusURL) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WindowsJavaContainerSettings. -func (w WindowsJavaContainerSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) - populate(objectMap, "isAutoUpdate", w.IsAutoUpdate) - populate(objectMap, "isDeprecated", w.IsDeprecated) - populate(objectMap, "isEarlyAccess", w.IsEarlyAccess) - populate(objectMap, "isHidden", w.IsHidden) - populate(objectMap, "isPreview", w.IsPreview) - populate(objectMap, "javaContainer", w.JavaContainer) - populate(objectMap, "javaContainerVersion", w.JavaContainerVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WindowsJavaContainerSettings. -func (w *WindowsJavaContainerSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) - delete(rawMsg, key) - case "isAutoUpdate": - err = unpopulate(val, "IsAutoUpdate", &w.IsAutoUpdate) - delete(rawMsg, key) - case "isDeprecated": - err = unpopulate(val, "IsDeprecated", &w.IsDeprecated) - delete(rawMsg, key) - case "isEarlyAccess": - err = unpopulate(val, "IsEarlyAccess", &w.IsEarlyAccess) - delete(rawMsg, key) - case "isHidden": - err = unpopulate(val, "IsHidden", &w.IsHidden) - delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &w.IsPreview) - delete(rawMsg, key) - case "javaContainer": - err = unpopulate(val, "JavaContainer", &w.JavaContainer) - delete(rawMsg, key) - case "javaContainerVersion": - err = unpopulate(val, "JavaContainerVersion", &w.JavaContainerVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkerPool. -func (w WorkerPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeMode", w.ComputeMode) - populate(objectMap, "instanceNames", w.InstanceNames) - populate(objectMap, "workerCount", w.WorkerCount) - populate(objectMap, "workerSize", w.WorkerSize) - populate(objectMap, "workerSizeId", w.WorkerSizeID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkerPoolResource. -func (w WorkerPoolResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", w.ID) - populate(objectMap, "kind", w.Kind) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "sku", w.SKU) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func populateByteArray(m map[string]interface{}, k string, b []byte, f runtime.Base64Encoding) { - if azcore.IsNullValue(b) { - m[k] = nil - } else if len(b) == 0 { - return - } else { - m[k] = runtime.EncodeByteArray(b, f) - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_plans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_plans_client.go deleted file mode 100644 index 26a4b522..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_plans_client.go +++ /dev/null @@ -1,1744 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// PlansClient contains the methods for the AppServicePlans group. -// Don't use this type directly, use NewPlansClient() instead. -type PlansClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPlansClient creates a new instance of PlansClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PlansClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PlansClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates an App Service Plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// appServicePlan - Details of the App Service plan. -// options - PlansClientBeginCreateOrUpdateOptions contains the optional parameters for the PlansClient.BeginCreateOrUpdate -// method. -func (client *PlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, appServicePlan Plan, options *PlansClientBeginCreateOrUpdateOptions) (*runtime.Poller[PlansClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, name, appServicePlan, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PlansClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[PlansClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates an App Service Plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *PlansClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, appServicePlan Plan, options *PlansClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, appServicePlan, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PlansClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, appServicePlan Plan, options *PlansClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appServicePlan) -} - -// CreateOrUpdateVnetRoute - Create or update a Virtual Network route in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// vnetName - Name of the Virtual Network. -// routeName - Name of the Virtual Network route. -// route - Definition of the Virtual Network route. -// options - PlansClientCreateOrUpdateVnetRouteOptions contains the optional parameters for the PlansClient.CreateOrUpdateVnetRoute -// method. -func (client *PlansClient) CreateOrUpdateVnetRoute(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute, options *PlansClientCreateOrUpdateVnetRouteOptions) (PlansClientCreateOrUpdateVnetRouteResponse, error) { - req, err := client.createOrUpdateVnetRouteCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, route, options) - if err != nil { - return PlansClientCreateOrUpdateVnetRouteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientCreateOrUpdateVnetRouteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientCreateOrUpdateVnetRouteResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateVnetRouteHandleResponse(resp) -} - -// createOrUpdateVnetRouteCreateRequest creates the CreateOrUpdateVnetRoute request. -func (client *PlansClient) createOrUpdateVnetRouteCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute, options *PlansClientCreateOrUpdateVnetRouteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, route) -} - -// createOrUpdateVnetRouteHandleResponse handles the CreateOrUpdateVnetRoute response. -func (client *PlansClient) createOrUpdateVnetRouteHandleResponse(resp *http.Response) (PlansClientCreateOrUpdateVnetRouteResponse, error) { - result := PlansClientCreateOrUpdateVnetRouteResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetRoute); err != nil { - return PlansClientCreateOrUpdateVnetRouteResponse{}, err - } - return result, nil -} - -// Delete - Delete an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// options - PlansClientDeleteOptions contains the optional parameters for the PlansClient.Delete method. -func (client *PlansClient) Delete(ctx context.Context, resourceGroupName string, name string, options *PlansClientDeleteOptions) (PlansClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return PlansClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PlansClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return PlansClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PlansClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteHybridConnection - Delete a Hybrid Connection in use in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// namespaceName - Name of the Service Bus namespace. -// relayName - Name of the Service Bus relay. -// options - PlansClientDeleteHybridConnectionOptions contains the optional parameters for the PlansClient.DeleteHybridConnection -// method. -func (client *PlansClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientDeleteHybridConnectionOptions) (PlansClientDeleteHybridConnectionResponse, error) { - req, err := client.deleteHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) - if err != nil { - return PlansClientDeleteHybridConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientDeleteHybridConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PlansClientDeleteHybridConnectionResponse{}, runtime.NewResponseError(resp) - } - return PlansClientDeleteHybridConnectionResponse{}, nil -} - -// deleteHybridConnectionCreateRequest creates the DeleteHybridConnection request. -func (client *PlansClient) deleteHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientDeleteHybridConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteVnetRoute - Delete a Virtual Network route in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// vnetName - Name of the Virtual Network. -// routeName - Name of the Virtual Network route. -// options - PlansClientDeleteVnetRouteOptions contains the optional parameters for the PlansClient.DeleteVnetRoute method. -func (client *PlansClient) DeleteVnetRoute(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *PlansClientDeleteVnetRouteOptions) (PlansClientDeleteVnetRouteResponse, error) { - req, err := client.deleteVnetRouteCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, options) - if err != nil { - return PlansClientDeleteVnetRouteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientDeleteVnetRouteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientDeleteVnetRouteResponse{}, runtime.NewResponseError(resp) - } - return PlansClientDeleteVnetRouteResponse{}, nil -} - -// deleteVnetRouteCreateRequest creates the DeleteVnetRoute request. -func (client *PlansClient) deleteVnetRouteCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *PlansClientDeleteVnetRouteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// options - PlansClientGetOptions contains the optional parameters for the PlansClient.Get method. -func (client *PlansClient) Get(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetOptions) (PlansClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return PlansClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PlansClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PlansClient) getHandleResponse(resp *http.Response) (PlansClientGetResponse, error) { - result := PlansClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Plan); err != nil { - return PlansClientGetResponse{}, err - } - return result, nil -} - -// GetHybridConnection - Retrieve a Hybrid Connection in use in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// namespaceName - Name of the Service Bus namespace. -// relayName - Name of the Service Bus relay. -// options - PlansClientGetHybridConnectionOptions contains the optional parameters for the PlansClient.GetHybridConnection -// method. -func (client *PlansClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientGetHybridConnectionOptions) (PlansClientGetHybridConnectionResponse, error) { - req, err := client.getHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) - if err != nil { - return PlansClientGetHybridConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientGetHybridConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetHybridConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.getHybridConnectionHandleResponse(resp) -} - -// getHybridConnectionCreateRequest creates the GetHybridConnection request. -func (client *PlansClient) getHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientGetHybridConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHybridConnectionHandleResponse handles the GetHybridConnection response. -func (client *PlansClient) getHybridConnectionHandleResponse(resp *http.Response) (PlansClientGetHybridConnectionResponse, error) { - result := PlansClientGetHybridConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { - return PlansClientGetHybridConnectionResponse{}, err - } - return result, nil -} - -// GetHybridConnectionPlanLimit - Get the maximum number of Hybrid Connections allowed in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// options - PlansClientGetHybridConnectionPlanLimitOptions contains the optional parameters for the PlansClient.GetHybridConnectionPlanLimit -// method. -func (client *PlansClient) GetHybridConnectionPlanLimit(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetHybridConnectionPlanLimitOptions) (PlansClientGetHybridConnectionPlanLimitResponse, error) { - req, err := client.getHybridConnectionPlanLimitCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return PlansClientGetHybridConnectionPlanLimitResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientGetHybridConnectionPlanLimitResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetHybridConnectionPlanLimitResponse{}, runtime.NewResponseError(resp) - } - return client.getHybridConnectionPlanLimitHandleResponse(resp) -} - -// getHybridConnectionPlanLimitCreateRequest creates the GetHybridConnectionPlanLimit request. -func (client *PlansClient) getHybridConnectionPlanLimitCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetHybridConnectionPlanLimitOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHybridConnectionPlanLimitHandleResponse handles the GetHybridConnectionPlanLimit response. -func (client *PlansClient) getHybridConnectionPlanLimitHandleResponse(resp *http.Response) (PlansClientGetHybridConnectionPlanLimitResponse, error) { - result := PlansClientGetHybridConnectionPlanLimitResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnectionLimits); err != nil { - return PlansClientGetHybridConnectionPlanLimitResponse{}, err - } - return result, nil -} - -// GetRouteForVnet - Get a Virtual Network route in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// vnetName - Name of the Virtual Network. -// routeName - Name of the Virtual Network route. -// options - PlansClientGetRouteForVnetOptions contains the optional parameters for the PlansClient.GetRouteForVnet method. -func (client *PlansClient) GetRouteForVnet(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *PlansClientGetRouteForVnetOptions) (PlansClientGetRouteForVnetResponse, error) { - req, err := client.getRouteForVnetCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, options) - if err != nil { - return PlansClientGetRouteForVnetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientGetRouteForVnetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetRouteForVnetResponse{}, runtime.NewResponseError(resp) - } - return client.getRouteForVnetHandleResponse(resp) -} - -// getRouteForVnetCreateRequest creates the GetRouteForVnet request. -func (client *PlansClient) getRouteForVnetCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *PlansClientGetRouteForVnetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getRouteForVnetHandleResponse handles the GetRouteForVnet response. -func (client *PlansClient) getRouteForVnetHandleResponse(resp *http.Response) (PlansClientGetRouteForVnetResponse, error) { - result := PlansClientGetRouteForVnetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetRouteArray); err != nil { - return PlansClientGetRouteForVnetResponse{}, err - } - return result, nil -} - -// GetServerFarmSKUs - Gets all selectable SKUs for a given App Service Plan -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of App Service Plan -// options - PlansClientGetServerFarmSKUsOptions contains the optional parameters for the PlansClient.GetServerFarmSKUs method. -func (client *PlansClient) GetServerFarmSKUs(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetServerFarmSKUsOptions) (PlansClientGetServerFarmSKUsResponse, error) { - req, err := client.getServerFarmSKUsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return PlansClientGetServerFarmSKUsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientGetServerFarmSKUsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetServerFarmSKUsResponse{}, runtime.NewResponseError(resp) - } - return client.getServerFarmSKUsHandleResponse(resp) -} - -// getServerFarmSKUsCreateRequest creates the GetServerFarmSKUs request. -func (client *PlansClient) getServerFarmSKUsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetServerFarmSKUsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getServerFarmSKUsHandleResponse handles the GetServerFarmSKUs response. -func (client *PlansClient) getServerFarmSKUsHandleResponse(resp *http.Response) (PlansClientGetServerFarmSKUsResponse, error) { - result := PlansClientGetServerFarmSKUsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { - return PlansClientGetServerFarmSKUsResponse{}, err - } - return result, nil -} - -// GetVnetFromServerFarm - Get a Virtual Network associated with an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// vnetName - Name of the Virtual Network. -// options - PlansClientGetVnetFromServerFarmOptions contains the optional parameters for the PlansClient.GetVnetFromServerFarm -// method. -func (client *PlansClient) GetVnetFromServerFarm(ctx context.Context, resourceGroupName string, name string, vnetName string, options *PlansClientGetVnetFromServerFarmOptions) (PlansClientGetVnetFromServerFarmResponse, error) { - req, err := client.getVnetFromServerFarmCreateRequest(ctx, resourceGroupName, name, vnetName, options) - if err != nil { - return PlansClientGetVnetFromServerFarmResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientGetVnetFromServerFarmResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetVnetFromServerFarmResponse{}, runtime.NewResponseError(resp) - } - return client.getVnetFromServerFarmHandleResponse(resp) -} - -// getVnetFromServerFarmCreateRequest creates the GetVnetFromServerFarm request. -func (client *PlansClient) getVnetFromServerFarmCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, options *PlansClientGetVnetFromServerFarmOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVnetFromServerFarmHandleResponse handles the GetVnetFromServerFarm response. -func (client *PlansClient) getVnetFromServerFarmHandleResponse(resp *http.Response) (PlansClientGetVnetFromServerFarmResponse, error) { - result := PlansClientGetVnetFromServerFarmResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { - return PlansClientGetVnetFromServerFarmResponse{}, err - } - return result, nil -} - -// GetVnetGateway - Get a Virtual Network gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// vnetName - Name of the Virtual Network. -// gatewayName - Name of the gateway. Only the 'primary' gateway is supported. -// options - PlansClientGetVnetGatewayOptions contains the optional parameters for the PlansClient.GetVnetGateway method. -func (client *PlansClient) GetVnetGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *PlansClientGetVnetGatewayOptions) (PlansClientGetVnetGatewayResponse, error) { - req, err := client.getVnetGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, options) - if err != nil { - return PlansClientGetVnetGatewayResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientGetVnetGatewayResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetVnetGatewayResponse{}, runtime.NewResponseError(resp) - } - return client.getVnetGatewayHandleResponse(resp) -} - -// getVnetGatewayCreateRequest creates the GetVnetGateway request. -func (client *PlansClient) getVnetGatewayCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *PlansClientGetVnetGatewayOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVnetGatewayHandleResponse handles the GetVnetGateway response. -func (client *PlansClient) getVnetGatewayHandleResponse(resp *http.Response) (PlansClientGetVnetGatewayResponse, error) { - result := PlansClientGetVnetGatewayResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { - return PlansClientGetVnetGatewayResponse{}, err - } - return result, nil -} - -// NewListPager - Get all App Service plans for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - PlansClientListOptions contains the optional parameters for the PlansClient.List method. -func (client *PlansClient) NewListPager(options *PlansClientListOptions) *runtime.Pager[PlansClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PlansClientListResponse]{ - More: func(page PlansClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PlansClientListResponse) (PlansClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PlansClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PlansClient) listCreateRequest(ctx context.Context, options *PlansClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Detailed != nil { - reqQP.Set("detailed", strconv.FormatBool(*options.Detailed)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PlansClient) listHandleResponse(resp *http.Response) (PlansClientListResponse, error) { - result := PlansClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PlanCollection); err != nil { - return PlansClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get all App Service plans in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - PlansClientListByResourceGroupOptions contains the optional parameters for the PlansClient.ListByResourceGroup -// method. -func (client *PlansClient) NewListByResourceGroupPager(resourceGroupName string, options *PlansClientListByResourceGroupOptions) *runtime.Pager[PlansClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[PlansClientListByResourceGroupResponse]{ - More: func(page PlansClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PlansClientListByResourceGroupResponse) (PlansClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PlansClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *PlansClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *PlansClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *PlansClient) listByResourceGroupHandleResponse(resp *http.Response) (PlansClientListByResourceGroupResponse, error) { - result := PlansClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PlanCollection); err != nil { - return PlansClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// ListCapabilities - List all capabilities of an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// options - PlansClientListCapabilitiesOptions contains the optional parameters for the PlansClient.ListCapabilities method. -func (client *PlansClient) ListCapabilities(ctx context.Context, resourceGroupName string, name string, options *PlansClientListCapabilitiesOptions) (PlansClientListCapabilitiesResponse, error) { - req, err := client.listCapabilitiesCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return PlansClientListCapabilitiesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientListCapabilitiesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListCapabilitiesResponse{}, runtime.NewResponseError(resp) - } - return client.listCapabilitiesHandleResponse(resp) -} - -// listCapabilitiesCreateRequest creates the ListCapabilities request. -func (client *PlansClient) listCapabilitiesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientListCapabilitiesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listCapabilitiesHandleResponse handles the ListCapabilities response. -func (client *PlansClient) listCapabilitiesHandleResponse(resp *http.Response) (PlansClientListCapabilitiesResponse, error) { - result := PlansClientListCapabilitiesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CapabilityArray); err != nil { - return PlansClientListCapabilitiesResponse{}, err - } - return result, nil -} - -// ListHybridConnectionKeys - Get the send key name and value of a Hybrid Connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// namespaceName - The name of the Service Bus namespace. -// relayName - The name of the Service Bus relay. -// options - PlansClientListHybridConnectionKeysOptions contains the optional parameters for the PlansClient.ListHybridConnectionKeys -// method. -func (client *PlansClient) ListHybridConnectionKeys(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientListHybridConnectionKeysOptions) (PlansClientListHybridConnectionKeysResponse, error) { - req, err := client.listHybridConnectionKeysCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) - if err != nil { - return PlansClientListHybridConnectionKeysResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientListHybridConnectionKeysResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListHybridConnectionKeysResponse{}, runtime.NewResponseError(resp) - } - return client.listHybridConnectionKeysHandleResponse(resp) -} - -// listHybridConnectionKeysCreateRequest creates the ListHybridConnectionKeys request. -func (client *PlansClient) listHybridConnectionKeysCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientListHybridConnectionKeysOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHybridConnectionKeysHandleResponse handles the ListHybridConnectionKeys response. -func (client *PlansClient) listHybridConnectionKeysHandleResponse(resp *http.Response) (PlansClientListHybridConnectionKeysResponse, error) { - result := PlansClientListHybridConnectionKeysResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnectionKey); err != nil { - return PlansClientListHybridConnectionKeysResponse{}, err - } - return result, nil -} - -// NewListHybridConnectionsPager - Retrieve all Hybrid Connections in use in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// options - PlansClientListHybridConnectionsOptions contains the optional parameters for the PlansClient.ListHybridConnections -// method. -func (client *PlansClient) NewListHybridConnectionsPager(resourceGroupName string, name string, options *PlansClientListHybridConnectionsOptions) *runtime.Pager[PlansClientListHybridConnectionsResponse] { - return runtime.NewPager(runtime.PagingHandler[PlansClientListHybridConnectionsResponse]{ - More: func(page PlansClientListHybridConnectionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PlansClientListHybridConnectionsResponse) (PlansClientListHybridConnectionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHybridConnectionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PlansClientListHybridConnectionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientListHybridConnectionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListHybridConnectionsResponse{}, runtime.NewResponseError(resp) - } - return client.listHybridConnectionsHandleResponse(resp) - }, - }) -} - -// listHybridConnectionsCreateRequest creates the ListHybridConnections request. -func (client *PlansClient) listHybridConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientListHybridConnectionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHybridConnectionsHandleResponse handles the ListHybridConnections response. -func (client *PlansClient) listHybridConnectionsHandleResponse(resp *http.Response) (PlansClientListHybridConnectionsResponse, error) { - result := PlansClientListHybridConnectionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnectionCollection); err != nil { - return PlansClientListHybridConnectionsResponse{}, err - } - return result, nil -} - -// ListRoutesForVnet - Get all routes that are associated with a Virtual Network in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// vnetName - Name of the Virtual Network. -// options - PlansClientListRoutesForVnetOptions contains the optional parameters for the PlansClient.ListRoutesForVnet method. -func (client *PlansClient) ListRoutesForVnet(ctx context.Context, resourceGroupName string, name string, vnetName string, options *PlansClientListRoutesForVnetOptions) (PlansClientListRoutesForVnetResponse, error) { - req, err := client.listRoutesForVnetCreateRequest(ctx, resourceGroupName, name, vnetName, options) - if err != nil { - return PlansClientListRoutesForVnetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientListRoutesForVnetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListRoutesForVnetResponse{}, runtime.NewResponseError(resp) - } - return client.listRoutesForVnetHandleResponse(resp) -} - -// listRoutesForVnetCreateRequest creates the ListRoutesForVnet request. -func (client *PlansClient) listRoutesForVnetCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, options *PlansClientListRoutesForVnetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listRoutesForVnetHandleResponse handles the ListRoutesForVnet response. -func (client *PlansClient) listRoutesForVnetHandleResponse(resp *http.Response) (PlansClientListRoutesForVnetResponse, error) { - result := PlansClientListRoutesForVnetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetRouteArray); err != nil { - return PlansClientListRoutesForVnetResponse{}, err - } - return result, nil -} - -// NewListUsagesPager - Gets server farm usage information -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of App Service Plan -// options - PlansClientListUsagesOptions contains the optional parameters for the PlansClient.ListUsages method. -func (client *PlansClient) NewListUsagesPager(resourceGroupName string, name string, options *PlansClientListUsagesOptions) *runtime.Pager[PlansClientListUsagesResponse] { - return runtime.NewPager(runtime.PagingHandler[PlansClientListUsagesResponse]{ - More: func(page PlansClientListUsagesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PlansClientListUsagesResponse) (PlansClientListUsagesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PlansClientListUsagesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientListUsagesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListUsagesResponse{}, runtime.NewResponseError(resp) - } - return client.listUsagesHandleResponse(resp) - }, - }) -} - -// listUsagesCreateRequest creates the ListUsages request. -func (client *PlansClient) listUsagesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientListUsagesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listUsagesHandleResponse handles the ListUsages response. -func (client *PlansClient) listUsagesHandleResponse(resp *http.Response) (PlansClientListUsagesResponse, error) { - result := PlansClientListUsagesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { - return PlansClientListUsagesResponse{}, err - } - return result, nil -} - -// ListVnets - Get all Virtual Networks associated with an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// options - PlansClientListVnetsOptions contains the optional parameters for the PlansClient.ListVnets method. -func (client *PlansClient) ListVnets(ctx context.Context, resourceGroupName string, name string, options *PlansClientListVnetsOptions) (PlansClientListVnetsResponse, error) { - req, err := client.listVnetsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return PlansClientListVnetsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientListVnetsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListVnetsResponse{}, runtime.NewResponseError(resp) - } - return client.listVnetsHandleResponse(resp) -} - -// listVnetsCreateRequest creates the ListVnets request. -func (client *PlansClient) listVnetsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientListVnetsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listVnetsHandleResponse handles the ListVnets response. -func (client *PlansClient) listVnetsHandleResponse(resp *http.Response) (PlansClientListVnetsResponse, error) { - result := PlansClientListVnetsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResourceArray); err != nil { - return PlansClientListVnetsResponse{}, err - } - return result, nil -} - -// NewListWebAppsPager - Get all apps associated with an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// options - PlansClientListWebAppsOptions contains the optional parameters for the PlansClient.ListWebApps method. -func (client *PlansClient) NewListWebAppsPager(resourceGroupName string, name string, options *PlansClientListWebAppsOptions) *runtime.Pager[PlansClientListWebAppsResponse] { - return runtime.NewPager(runtime.PagingHandler[PlansClientListWebAppsResponse]{ - More: func(page PlansClientListWebAppsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PlansClientListWebAppsResponse) (PlansClientListWebAppsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebAppsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PlansClientListWebAppsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientListWebAppsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListWebAppsResponse{}, runtime.NewResponseError(resp) - } - return client.listWebAppsHandleResponse(resp) - }, - }) -} - -// listWebAppsCreateRequest creates the ListWebApps request. -func (client *PlansClient) listWebAppsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientListWebAppsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - if options != nil && options.Top != nil { - reqQP.Set("$top", *options.Top) - } - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWebAppsHandleResponse handles the ListWebApps response. -func (client *PlansClient) listWebAppsHandleResponse(resp *http.Response) (PlansClientListWebAppsResponse, error) { - result := PlansClientListWebAppsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { - return PlansClientListWebAppsResponse{}, err - } - return result, nil -} - -// NewListWebAppsByHybridConnectionPager - Get all apps that use a Hybrid Connection in an App Service Plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// namespaceName - Name of the Hybrid Connection namespace. -// relayName - Name of the Hybrid Connection relay. -// options - PlansClientListWebAppsByHybridConnectionOptions contains the optional parameters for the PlansClient.ListWebAppsByHybridConnection -// method. -func (client *PlansClient) NewListWebAppsByHybridConnectionPager(resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientListWebAppsByHybridConnectionOptions) *runtime.Pager[PlansClientListWebAppsByHybridConnectionResponse] { - return runtime.NewPager(runtime.PagingHandler[PlansClientListWebAppsByHybridConnectionResponse]{ - More: func(page PlansClientListWebAppsByHybridConnectionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PlansClientListWebAppsByHybridConnectionResponse) (PlansClientListWebAppsByHybridConnectionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebAppsByHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PlansClientListWebAppsByHybridConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientListWebAppsByHybridConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListWebAppsByHybridConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.listWebAppsByHybridConnectionHandleResponse(resp) - }, - }) -} - -// listWebAppsByHybridConnectionCreateRequest creates the ListWebAppsByHybridConnection request. -func (client *PlansClient) listWebAppsByHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientListWebAppsByHybridConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWebAppsByHybridConnectionHandleResponse handles the ListWebAppsByHybridConnection response. -func (client *PlansClient) listWebAppsByHybridConnectionHandleResponse(resp *http.Response) (PlansClientListWebAppsByHybridConnectionResponse, error) { - result := PlansClientListWebAppsByHybridConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceCollection); err != nil { - return PlansClientListWebAppsByHybridConnectionResponse{}, err - } - return result, nil -} - -// RebootWorker - Reboot a worker machine in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// workerName - Name of worker machine, which typically starts with RD. -// options - PlansClientRebootWorkerOptions contains the optional parameters for the PlansClient.RebootWorker method. -func (client *PlansClient) RebootWorker(ctx context.Context, resourceGroupName string, name string, workerName string, options *PlansClientRebootWorkerOptions) (PlansClientRebootWorkerResponse, error) { - req, err := client.rebootWorkerCreateRequest(ctx, resourceGroupName, name, workerName, options) - if err != nil { - return PlansClientRebootWorkerResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientRebootWorkerResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return PlansClientRebootWorkerResponse{}, runtime.NewResponseError(resp) - } - return PlansClientRebootWorkerResponse{}, nil -} - -// rebootWorkerCreateRequest creates the RebootWorker request. -func (client *PlansClient) rebootWorkerCreateRequest(ctx context.Context, resourceGroupName string, name string, workerName string, options *PlansClientRebootWorkerOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if workerName == "" { - return nil, errors.New("parameter workerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workerName}", url.PathEscape(workerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// RestartWebApps - Restart all apps in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// options - PlansClientRestartWebAppsOptions contains the optional parameters for the PlansClient.RestartWebApps method. -func (client *PlansClient) RestartWebApps(ctx context.Context, resourceGroupName string, name string, options *PlansClientRestartWebAppsOptions) (PlansClientRestartWebAppsResponse, error) { - req, err := client.restartWebAppsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return PlansClientRestartWebAppsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientRestartWebAppsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return PlansClientRestartWebAppsResponse{}, runtime.NewResponseError(resp) - } - return PlansClientRestartWebAppsResponse{}, nil -} - -// restartWebAppsCreateRequest creates the RestartWebApps request. -func (client *PlansClient) restartWebAppsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *PlansClientRestartWebAppsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.SoftRestart != nil { - reqQP.Set("softRestart", strconv.FormatBool(*options.SoftRestart)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Update - Creates or updates an App Service Plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// appServicePlan - Details of the App Service plan. -// options - PlansClientUpdateOptions contains the optional parameters for the PlansClient.Update method. -func (client *PlansClient) Update(ctx context.Context, resourceGroupName string, name string, appServicePlan PlanPatchResource, options *PlansClientUpdateOptions) (PlansClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, name, appServicePlan, options) - if err != nil { - return PlansClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return PlansClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *PlansClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, appServicePlan PlanPatchResource, options *PlansClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appServicePlan) -} - -// updateHandleResponse handles the Update response. -func (client *PlansClient) updateHandleResponse(resp *http.Response) (PlansClientUpdateResponse, error) { - result := PlansClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Plan); err != nil { - return PlansClientUpdateResponse{}, err - } - return result, nil -} - -// UpdateVnetGateway - Update a Virtual Network gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// vnetName - Name of the Virtual Network. -// gatewayName - Name of the gateway. Only the 'primary' gateway is supported. -// connectionEnvelope - Definition of the gateway. -// options - PlansClientUpdateVnetGatewayOptions contains the optional parameters for the PlansClient.UpdateVnetGateway method. -func (client *PlansClient) UpdateVnetGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *PlansClientUpdateVnetGatewayOptions) (PlansClientUpdateVnetGatewayResponse, error) { - req, err := client.updateVnetGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, options) - if err != nil { - return PlansClientUpdateVnetGatewayResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientUpdateVnetGatewayResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientUpdateVnetGatewayResponse{}, runtime.NewResponseError(resp) - } - return client.updateVnetGatewayHandleResponse(resp) -} - -// updateVnetGatewayCreateRequest creates the UpdateVnetGateway request. -func (client *PlansClient) updateVnetGatewayCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *PlansClientUpdateVnetGatewayOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateVnetGatewayHandleResponse handles the UpdateVnetGateway response. -func (client *PlansClient) updateVnetGatewayHandleResponse(resp *http.Response) (PlansClientUpdateVnetGatewayResponse, error) { - result := PlansClientUpdateVnetGatewayResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { - return PlansClientUpdateVnetGatewayResponse{}, err - } - return result, nil -} - -// UpdateVnetRoute - Create or update a Virtual Network route in an App Service plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the App Service plan. -// vnetName - Name of the Virtual Network. -// routeName - Name of the Virtual Network route. -// route - Definition of the Virtual Network route. -// options - PlansClientUpdateVnetRouteOptions contains the optional parameters for the PlansClient.UpdateVnetRoute method. -func (client *PlansClient) UpdateVnetRoute(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute, options *PlansClientUpdateVnetRouteOptions) (PlansClientUpdateVnetRouteResponse, error) { - req, err := client.updateVnetRouteCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, route, options) - if err != nil { - return PlansClientUpdateVnetRouteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PlansClientUpdateVnetRouteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientUpdateVnetRouteResponse{}, runtime.NewResponseError(resp) - } - return client.updateVnetRouteHandleResponse(resp) -} - -// updateVnetRouteCreateRequest creates the UpdateVnetRoute request. -func (client *PlansClient) updateVnetRouteCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute, options *PlansClientUpdateVnetRouteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, route) -} - -// updateVnetRouteHandleResponse handles the UpdateVnetRoute response. -func (client *PlansClient) updateVnetRouteHandleResponse(resp *http.Response) (PlansClientUpdateVnetRouteResponse, error) { - result := PlansClientUpdateVnetRouteResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetRoute); err != nil { - return PlansClientUpdateVnetRouteResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_provider_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_provider_client.go deleted file mode 100644 index 93c341ca..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_provider_client.go +++ /dev/null @@ -1,479 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProviderClient contains the methods for the Provider group. -// Don't use this type directly, use NewProviderClient() instead. -type ProviderClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProviderClient creates a new instance of ProviderClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProviderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProviderClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProviderClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewGetAvailableStacksPager - Get available application frameworks and their versions -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - ProviderClientGetAvailableStacksOptions contains the optional parameters for the ProviderClient.GetAvailableStacks -// method. -func (client *ProviderClient) NewGetAvailableStacksPager(options *ProviderClientGetAvailableStacksOptions) *runtime.Pager[ProviderClientGetAvailableStacksResponse] { - return runtime.NewPager(runtime.PagingHandler[ProviderClientGetAvailableStacksResponse]{ - More: func(page ProviderClientGetAvailableStacksResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProviderClientGetAvailableStacksResponse) (ProviderClientGetAvailableStacksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getAvailableStacksCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientGetAvailableStacksResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProviderClientGetAvailableStacksResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetAvailableStacksResponse{}, runtime.NewResponseError(resp) - } - return client.getAvailableStacksHandleResponse(resp) - }, - }) -} - -// getAvailableStacksCreateRequest creates the GetAvailableStacks request. -func (client *ProviderClient) getAvailableStacksCreateRequest(ctx context.Context, options *ProviderClientGetAvailableStacksOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/availableStacks" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.OSTypeSelected != nil { - reqQP.Set("osTypeSelected", string(*options.OSTypeSelected)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAvailableStacksHandleResponse handles the GetAvailableStacks response. -func (client *ProviderClient) getAvailableStacksHandleResponse(resp *http.Response) (ProviderClientGetAvailableStacksResponse, error) { - result := ProviderClientGetAvailableStacksResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationStackCollection); err != nil { - return ProviderClientGetAvailableStacksResponse{}, err - } - return result, nil -} - -// NewGetAvailableStacksOnPremPager - Get available application frameworks and their versions -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - ProviderClientGetAvailableStacksOnPremOptions contains the optional parameters for the ProviderClient.GetAvailableStacksOnPrem -// method. -func (client *ProviderClient) NewGetAvailableStacksOnPremPager(options *ProviderClientGetAvailableStacksOnPremOptions) *runtime.Pager[ProviderClientGetAvailableStacksOnPremResponse] { - return runtime.NewPager(runtime.PagingHandler[ProviderClientGetAvailableStacksOnPremResponse]{ - More: func(page ProviderClientGetAvailableStacksOnPremResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProviderClientGetAvailableStacksOnPremResponse) (ProviderClientGetAvailableStacksOnPremResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getAvailableStacksOnPremCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientGetAvailableStacksOnPremResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProviderClientGetAvailableStacksOnPremResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetAvailableStacksOnPremResponse{}, runtime.NewResponseError(resp) - } - return client.getAvailableStacksOnPremHandleResponse(resp) - }, - }) -} - -// getAvailableStacksOnPremCreateRequest creates the GetAvailableStacksOnPrem request. -func (client *ProviderClient) getAvailableStacksOnPremCreateRequest(ctx context.Context, options *ProviderClientGetAvailableStacksOnPremOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.OSTypeSelected != nil { - reqQP.Set("osTypeSelected", string(*options.OSTypeSelected)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAvailableStacksOnPremHandleResponse handles the GetAvailableStacksOnPrem response. -func (client *ProviderClient) getAvailableStacksOnPremHandleResponse(resp *http.Response) (ProviderClientGetAvailableStacksOnPremResponse, error) { - result := ProviderClientGetAvailableStacksOnPremResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationStackCollection); err != nil { - return ProviderClientGetAvailableStacksOnPremResponse{}, err - } - return result, nil -} - -// NewGetFunctionAppStacksPager - Get available Function app frameworks and their versions -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - ProviderClientGetFunctionAppStacksOptions contains the optional parameters for the ProviderClient.GetFunctionAppStacks -// method. -func (client *ProviderClient) NewGetFunctionAppStacksPager(options *ProviderClientGetFunctionAppStacksOptions) *runtime.Pager[ProviderClientGetFunctionAppStacksResponse] { - return runtime.NewPager(runtime.PagingHandler[ProviderClientGetFunctionAppStacksResponse]{ - More: func(page ProviderClientGetFunctionAppStacksResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProviderClientGetFunctionAppStacksResponse) (ProviderClientGetFunctionAppStacksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getFunctionAppStacksCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientGetFunctionAppStacksResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProviderClientGetFunctionAppStacksResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetFunctionAppStacksResponse{}, runtime.NewResponseError(resp) - } - return client.getFunctionAppStacksHandleResponse(resp) - }, - }) -} - -// getFunctionAppStacksCreateRequest creates the GetFunctionAppStacks request. -func (client *ProviderClient) getFunctionAppStacksCreateRequest(ctx context.Context, options *ProviderClientGetFunctionAppStacksOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/functionAppStacks" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StackOsType != nil { - reqQP.Set("stackOsType", string(*options.StackOsType)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getFunctionAppStacksHandleResponse handles the GetFunctionAppStacks response. -func (client *ProviderClient) getFunctionAppStacksHandleResponse(resp *http.Response) (ProviderClientGetFunctionAppStacksResponse, error) { - result := ProviderClientGetFunctionAppStacksResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FunctionAppStackCollection); err != nil { - return ProviderClientGetFunctionAppStacksResponse{}, err - } - return result, nil -} - -// NewGetFunctionAppStacksForLocationPager - Get available Function app frameworks and their versions for location -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// location - Function App stack location. -// options - ProviderClientGetFunctionAppStacksForLocationOptions contains the optional parameters for the ProviderClient.GetFunctionAppStacksForLocation -// method. -func (client *ProviderClient) NewGetFunctionAppStacksForLocationPager(location string, options *ProviderClientGetFunctionAppStacksForLocationOptions) *runtime.Pager[ProviderClientGetFunctionAppStacksForLocationResponse] { - return runtime.NewPager(runtime.PagingHandler[ProviderClientGetFunctionAppStacksForLocationResponse]{ - More: func(page ProviderClientGetFunctionAppStacksForLocationResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProviderClientGetFunctionAppStacksForLocationResponse) (ProviderClientGetFunctionAppStacksForLocationResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getFunctionAppStacksForLocationCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientGetFunctionAppStacksForLocationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProviderClientGetFunctionAppStacksForLocationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetFunctionAppStacksForLocationResponse{}, runtime.NewResponseError(resp) - } - return client.getFunctionAppStacksForLocationHandleResponse(resp) - }, - }) -} - -// getFunctionAppStacksForLocationCreateRequest creates the GetFunctionAppStacksForLocation request. -func (client *ProviderClient) getFunctionAppStacksForLocationCreateRequest(ctx context.Context, location string, options *ProviderClientGetFunctionAppStacksForLocationOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/locations/{location}/functionAppStacks" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StackOsType != nil { - reqQP.Set("stackOsType", string(*options.StackOsType)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getFunctionAppStacksForLocationHandleResponse handles the GetFunctionAppStacksForLocation response. -func (client *ProviderClient) getFunctionAppStacksForLocationHandleResponse(resp *http.Response) (ProviderClientGetFunctionAppStacksForLocationResponse, error) { - result := ProviderClientGetFunctionAppStacksForLocationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FunctionAppStackCollection); err != nil { - return ProviderClientGetFunctionAppStacksForLocationResponse{}, err - } - return result, nil -} - -// NewGetWebAppStacksPager - Get available Web app frameworks and their versions -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - ProviderClientGetWebAppStacksOptions contains the optional parameters for the ProviderClient.GetWebAppStacks -// method. -func (client *ProviderClient) NewGetWebAppStacksPager(options *ProviderClientGetWebAppStacksOptions) *runtime.Pager[ProviderClientGetWebAppStacksResponse] { - return runtime.NewPager(runtime.PagingHandler[ProviderClientGetWebAppStacksResponse]{ - More: func(page ProviderClientGetWebAppStacksResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProviderClientGetWebAppStacksResponse) (ProviderClientGetWebAppStacksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getWebAppStacksCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientGetWebAppStacksResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProviderClientGetWebAppStacksResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetWebAppStacksResponse{}, runtime.NewResponseError(resp) - } - return client.getWebAppStacksHandleResponse(resp) - }, - }) -} - -// getWebAppStacksCreateRequest creates the GetWebAppStacks request. -func (client *ProviderClient) getWebAppStacksCreateRequest(ctx context.Context, options *ProviderClientGetWebAppStacksOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/webAppStacks" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StackOsType != nil { - reqQP.Set("stackOsType", string(*options.StackOsType)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getWebAppStacksHandleResponse handles the GetWebAppStacks response. -func (client *ProviderClient) getWebAppStacksHandleResponse(resp *http.Response) (ProviderClientGetWebAppStacksResponse, error) { - result := ProviderClientGetWebAppStacksResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppStackCollection); err != nil { - return ProviderClientGetWebAppStacksResponse{}, err - } - return result, nil -} - -// NewGetWebAppStacksForLocationPager - Get available Web app frameworks and their versions for location -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// location - Web App stack location. -// options - ProviderClientGetWebAppStacksForLocationOptions contains the optional parameters for the ProviderClient.GetWebAppStacksForLocation -// method. -func (client *ProviderClient) NewGetWebAppStacksForLocationPager(location string, options *ProviderClientGetWebAppStacksForLocationOptions) *runtime.Pager[ProviderClientGetWebAppStacksForLocationResponse] { - return runtime.NewPager(runtime.PagingHandler[ProviderClientGetWebAppStacksForLocationResponse]{ - More: func(page ProviderClientGetWebAppStacksForLocationResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProviderClientGetWebAppStacksForLocationResponse) (ProviderClientGetWebAppStacksForLocationResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getWebAppStacksForLocationCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientGetWebAppStacksForLocationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProviderClientGetWebAppStacksForLocationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetWebAppStacksForLocationResponse{}, runtime.NewResponseError(resp) - } - return client.getWebAppStacksForLocationHandleResponse(resp) - }, - }) -} - -// getWebAppStacksForLocationCreateRequest creates the GetWebAppStacksForLocation request. -func (client *ProviderClient) getWebAppStacksForLocationCreateRequest(ctx context.Context, location string, options *ProviderClientGetWebAppStacksForLocationOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/locations/{location}/webAppStacks" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.StackOsType != nil { - reqQP.Set("stackOsType", string(*options.StackOsType)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getWebAppStacksForLocationHandleResponse handles the GetWebAppStacksForLocation response. -func (client *ProviderClient) getWebAppStacksForLocationHandleResponse(resp *http.Response) (ProviderClientGetWebAppStacksForLocationResponse, error) { - result := ProviderClientGetWebAppStacksForLocationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppStackCollection); err != nil { - return ProviderClientGetWebAppStacksForLocationResponse{}, err - } - return result, nil -} - -// NewListOperationsPager - Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric -// definitions -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - ProviderClientListOperationsOptions contains the optional parameters for the ProviderClient.ListOperations method. -func (client *ProviderClient) NewListOperationsPager(options *ProviderClientListOperationsOptions) *runtime.Pager[ProviderClientListOperationsResponse] { - return runtime.NewPager(runtime.PagingHandler[ProviderClientListOperationsResponse]{ - More: func(page ProviderClientListOperationsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProviderClientListOperationsResponse) (ProviderClientListOperationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listOperationsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientListOperationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProviderClientListOperationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientListOperationsResponse{}, runtime.NewResponseError(resp) - } - return client.listOperationsHandleResponse(resp) - }, - }) -} - -// listOperationsCreateRequest creates the ListOperations request. -func (client *ProviderClient) listOperationsCreateRequest(ctx context.Context, options *ProviderClientListOperationsOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listOperationsHandleResponse handles the ListOperations response. -func (client *ProviderClient) listOperationsHandleResponse(resp *http.Response) (ProviderClientListOperationsResponse, error) { - result := ProviderClientListOperationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmOperationCollection); err != nil { - return ProviderClientListOperationsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_recommendations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_recommendations_client.go deleted file mode 100644 index 37feeb72..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_recommendations_client.go +++ /dev/null @@ -1,953 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// RecommendationsClient contains the methods for the Recommendations group. -// Don't use this type directly, use NewRecommendationsClient() instead. -type RecommendationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRecommendationsClient creates a new instance of RecommendationsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRecommendationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecommendationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RecommendationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// DisableAllForHostingEnvironment - Disable all recommendations for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// environmentName - Name of the app. -// options - RecommendationsClientDisableAllForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableAllForHostingEnvironment -// method. -func (client *RecommendationsClient) DisableAllForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *RecommendationsClientDisableAllForHostingEnvironmentOptions) (RecommendationsClientDisableAllForHostingEnvironmentResponse, error) { - req, err := client.disableAllForHostingEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, hostingEnvironmentName, options) - if err != nil { - return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, runtime.NewResponseError(resp) - } - return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, nil -} - -// disableAllForHostingEnvironmentCreateRequest creates the DisableAllForHostingEnvironment request. -func (client *RecommendationsClient) disableAllForHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *RecommendationsClientDisableAllForHostingEnvironmentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostingEnvironmentName == "" { - return nil, errors.New("parameter hostingEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DisableAllForWebApp - Disable all recommendations for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Name of the app. -// options - RecommendationsClientDisableAllForWebAppOptions contains the optional parameters for the RecommendationsClient.DisableAllForWebApp -// method. -func (client *RecommendationsClient) DisableAllForWebApp(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientDisableAllForWebAppOptions) (RecommendationsClientDisableAllForWebAppResponse, error) { - req, err := client.disableAllForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) - if err != nil { - return RecommendationsClientDisableAllForWebAppResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientDisableAllForWebAppResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return RecommendationsClientDisableAllForWebAppResponse{}, runtime.NewResponseError(resp) - } - return RecommendationsClientDisableAllForWebAppResponse{}, nil -} - -// disableAllForWebAppCreateRequest creates the DisableAllForWebApp request. -func (client *RecommendationsClient) disableAllForWebAppCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientDisableAllForWebAppOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DisableRecommendationForHostingEnvironment - Disables the specific rule for a web site permanently. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// environmentName - Site name -// name - Rule name -// options - RecommendationsClientDisableRecommendationForHostingEnvironmentOptions contains the optional parameters for the -// RecommendationsClient.DisableRecommendationForHostingEnvironment method. -func (client *RecommendationsClient) DisableRecommendationForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, name string, hostingEnvironmentName string, options *RecommendationsClientDisableRecommendationForHostingEnvironmentOptions) (RecommendationsClientDisableRecommendationForHostingEnvironmentResponse, error) { - req, err := client.disableRecommendationForHostingEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, name, hostingEnvironmentName, options) - if err != nil { - return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, runtime.NewResponseError(resp) - } - return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, nil -} - -// disableRecommendationForHostingEnvironmentCreateRequest creates the DisableRecommendationForHostingEnvironment request. -func (client *RecommendationsClient) disableRecommendationForHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, name string, hostingEnvironmentName string, options *RecommendationsClientDisableRecommendationForHostingEnvironmentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if hostingEnvironmentName == "" { - return nil, errors.New("parameter hostingEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DisableRecommendationForSite - Disables the specific rule for a web site permanently. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Site name -// name - Rule name -// options - RecommendationsClientDisableRecommendationForSiteOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSite -// method. -func (client *RecommendationsClient) DisableRecommendationForSite(ctx context.Context, resourceGroupName string, siteName string, name string, options *RecommendationsClientDisableRecommendationForSiteOptions) (RecommendationsClientDisableRecommendationForSiteResponse, error) { - req, err := client.disableRecommendationForSiteCreateRequest(ctx, resourceGroupName, siteName, name, options) - if err != nil { - return RecommendationsClientDisableRecommendationForSiteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientDisableRecommendationForSiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientDisableRecommendationForSiteResponse{}, runtime.NewResponseError(resp) - } - return RecommendationsClientDisableRecommendationForSiteResponse{}, nil -} - -// disableRecommendationForSiteCreateRequest creates the DisableRecommendationForSite request. -func (client *RecommendationsClient) disableRecommendationForSiteCreateRequest(ctx context.Context, resourceGroupName string, siteName string, name string, options *RecommendationsClientDisableRecommendationForSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DisableRecommendationForSubscription - Disables the specified rule so it will not apply to a subscription in the future. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// name - Rule name -// options - RecommendationsClientDisableRecommendationForSubscriptionOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSubscription -// method. -func (client *RecommendationsClient) DisableRecommendationForSubscription(ctx context.Context, name string, options *RecommendationsClientDisableRecommendationForSubscriptionOptions) (RecommendationsClientDisableRecommendationForSubscriptionResponse, error) { - req, err := client.disableRecommendationForSubscriptionCreateRequest(ctx, name, options) - if err != nil { - return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, runtime.NewResponseError(resp) - } - return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, nil -} - -// disableRecommendationForSubscriptionCreateRequest creates the DisableRecommendationForSubscription request. -func (client *RecommendationsClient) disableRecommendationForSubscriptionCreateRequest(ctx context.Context, name string, options *RecommendationsClientDisableRecommendationForSubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable" - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GetRuleDetailsByHostingEnvironment - Get a recommendation rule for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// hostingEnvironmentName - Name of the hosting environment. -// name - Name of the recommendation. -// options - RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByHostingEnvironment -// method. -func (client *RecommendationsClient) GetRuleDetailsByHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, options *RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions) (RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse, error) { - req, err := client.getRuleDetailsByHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, name, options) - if err != nil { - return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, runtime.NewResponseError(resp) - } - return client.getRuleDetailsByHostingEnvironmentHandleResponse(resp) -} - -// getRuleDetailsByHostingEnvironmentCreateRequest creates the GetRuleDetailsByHostingEnvironment request. -func (client *RecommendationsClient) getRuleDetailsByHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, options *RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostingEnvironmentName == "" { - return nil, errors.New("parameter hostingEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.UpdateSeen != nil { - reqQP.Set("updateSeen", strconv.FormatBool(*options.UpdateSeen)) - } - if options != nil && options.RecommendationID != nil { - reqQP.Set("recommendationId", *options.RecommendationID) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getRuleDetailsByHostingEnvironmentHandleResponse handles the GetRuleDetailsByHostingEnvironment response. -func (client *RecommendationsClient) getRuleDetailsByHostingEnvironmentHandleResponse(resp *http.Response) (RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse, error) { - result := RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationRule); err != nil { - return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, err - } - return result, nil -} - -// GetRuleDetailsByWebApp - Get a recommendation rule for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Name of the app. -// name - Name of the recommendation. -// options - RecommendationsClientGetRuleDetailsByWebAppOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByWebApp -// method. -func (client *RecommendationsClient) GetRuleDetailsByWebApp(ctx context.Context, resourceGroupName string, siteName string, name string, options *RecommendationsClientGetRuleDetailsByWebAppOptions) (RecommendationsClientGetRuleDetailsByWebAppResponse, error) { - req, err := client.getRuleDetailsByWebAppCreateRequest(ctx, resourceGroupName, siteName, name, options) - if err != nil { - return RecommendationsClientGetRuleDetailsByWebAppResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientGetRuleDetailsByWebAppResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientGetRuleDetailsByWebAppResponse{}, runtime.NewResponseError(resp) - } - return client.getRuleDetailsByWebAppHandleResponse(resp) -} - -// getRuleDetailsByWebAppCreateRequest creates the GetRuleDetailsByWebApp request. -func (client *RecommendationsClient) getRuleDetailsByWebAppCreateRequest(ctx context.Context, resourceGroupName string, siteName string, name string, options *RecommendationsClientGetRuleDetailsByWebAppOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.UpdateSeen != nil { - reqQP.Set("updateSeen", strconv.FormatBool(*options.UpdateSeen)) - } - if options != nil && options.RecommendationID != nil { - reqQP.Set("recommendationId", *options.RecommendationID) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getRuleDetailsByWebAppHandleResponse handles the GetRuleDetailsByWebApp response. -func (client *RecommendationsClient) getRuleDetailsByWebAppHandleResponse(resp *http.Response) (RecommendationsClientGetRuleDetailsByWebAppResponse, error) { - result := RecommendationsClientGetRuleDetailsByWebAppResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationRule); err != nil { - return RecommendationsClientGetRuleDetailsByWebAppResponse{}, err - } - return result, nil -} - -// NewListPager - List all recommendations for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.List method. -func (client *RecommendationsClient) NewListPager(options *RecommendationsClientListOptions) *runtime.Pager[RecommendationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListResponse]{ - More: func(page RecommendationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RecommendationsClientListResponse) (RecommendationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RecommendationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *RecommendationsClient) listCreateRequest(ctx context.Context, options *RecommendationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Featured != nil { - reqQP.Set("featured", strconv.FormatBool(*options.Featured)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *RecommendationsClient) listHandleResponse(resp *http.Response) (RecommendationsClientListResponse, error) { - result := RecommendationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationCollection); err != nil { - return RecommendationsClientListResponse{}, err - } - return result, nil -} - -// NewListHistoryForHostingEnvironmentPager - Get past recommendations for an app, optionally specified by the time range. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// hostingEnvironmentName - Name of the hosting environment. -// options - RecommendationsClientListHistoryForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ListHistoryForHostingEnvironment -// method. -func (client *RecommendationsClient) NewListHistoryForHostingEnvironmentPager(resourceGroupName string, hostingEnvironmentName string, options *RecommendationsClientListHistoryForHostingEnvironmentOptions) *runtime.Pager[RecommendationsClientListHistoryForHostingEnvironmentResponse] { - return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListHistoryForHostingEnvironmentResponse]{ - More: func(page RecommendationsClientListHistoryForHostingEnvironmentResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RecommendationsClientListHistoryForHostingEnvironmentResponse) (RecommendationsClientListHistoryForHostingEnvironmentResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHistoryForHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RecommendationsClientListHistoryForHostingEnvironmentResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientListHistoryForHostingEnvironmentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientListHistoryForHostingEnvironmentResponse{}, runtime.NewResponseError(resp) - } - return client.listHistoryForHostingEnvironmentHandleResponse(resp) - }, - }) -} - -// listHistoryForHostingEnvironmentCreateRequest creates the ListHistoryForHostingEnvironment request. -func (client *RecommendationsClient) listHistoryForHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, options *RecommendationsClientListHistoryForHostingEnvironmentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostingEnvironmentName == "" { - return nil, errors.New("parameter hostingEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.ExpiredOnly != nil { - reqQP.Set("expiredOnly", strconv.FormatBool(*options.ExpiredOnly)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHistoryForHostingEnvironmentHandleResponse handles the ListHistoryForHostingEnvironment response. -func (client *RecommendationsClient) listHistoryForHostingEnvironmentHandleResponse(resp *http.Response) (RecommendationsClientListHistoryForHostingEnvironmentResponse, error) { - result := RecommendationsClientListHistoryForHostingEnvironmentResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationCollection); err != nil { - return RecommendationsClientListHistoryForHostingEnvironmentResponse{}, err - } - return result, nil -} - -// NewListHistoryForWebAppPager - Get past recommendations for an app, optionally specified by the time range. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Name of the app. -// options - RecommendationsClientListHistoryForWebAppOptions contains the optional parameters for the RecommendationsClient.ListHistoryForWebApp -// method. -func (client *RecommendationsClient) NewListHistoryForWebAppPager(resourceGroupName string, siteName string, options *RecommendationsClientListHistoryForWebAppOptions) *runtime.Pager[RecommendationsClientListHistoryForWebAppResponse] { - return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListHistoryForWebAppResponse]{ - More: func(page RecommendationsClientListHistoryForWebAppResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RecommendationsClientListHistoryForWebAppResponse) (RecommendationsClientListHistoryForWebAppResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHistoryForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RecommendationsClientListHistoryForWebAppResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientListHistoryForWebAppResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientListHistoryForWebAppResponse{}, runtime.NewResponseError(resp) - } - return client.listHistoryForWebAppHandleResponse(resp) - }, - }) -} - -// listHistoryForWebAppCreateRequest creates the ListHistoryForWebApp request. -func (client *RecommendationsClient) listHistoryForWebAppCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientListHistoryForWebAppOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.ExpiredOnly != nil { - reqQP.Set("expiredOnly", strconv.FormatBool(*options.ExpiredOnly)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHistoryForWebAppHandleResponse handles the ListHistoryForWebApp response. -func (client *RecommendationsClient) listHistoryForWebAppHandleResponse(resp *http.Response) (RecommendationsClientListHistoryForWebAppResponse, error) { - result := RecommendationsClientListHistoryForWebAppResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationCollection); err != nil { - return RecommendationsClientListHistoryForWebAppResponse{}, err - } - return result, nil -} - -// NewListRecommendedRulesForHostingEnvironmentPager - Get all recommendations for a hosting environment. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// hostingEnvironmentName - Name of the app. -// options - RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions contains the optional parameters for the -// RecommendationsClient.ListRecommendedRulesForHostingEnvironment method. -func (client *RecommendationsClient) NewListRecommendedRulesForHostingEnvironmentPager(resourceGroupName string, hostingEnvironmentName string, options *RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions) *runtime.Pager[RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse] { - return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse]{ - More: func(page RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse) (RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRecommendedRulesForHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{}, runtime.NewResponseError(resp) - } - return client.listRecommendedRulesForHostingEnvironmentHandleResponse(resp) - }, - }) -} - -// listRecommendedRulesForHostingEnvironmentCreateRequest creates the ListRecommendedRulesForHostingEnvironment request. -func (client *RecommendationsClient) listRecommendedRulesForHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, options *RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostingEnvironmentName == "" { - return nil, errors.New("parameter hostingEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Featured != nil { - reqQP.Set("featured", strconv.FormatBool(*options.Featured)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listRecommendedRulesForHostingEnvironmentHandleResponse handles the ListRecommendedRulesForHostingEnvironment response. -func (client *RecommendationsClient) listRecommendedRulesForHostingEnvironmentHandleResponse(resp *http.Response) (RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse, error) { - result := RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationCollection); err != nil { - return RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{}, err - } - return result, nil -} - -// NewListRecommendedRulesForWebAppPager - Get all recommendations for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Name of the app. -// options - RecommendationsClientListRecommendedRulesForWebAppOptions contains the optional parameters for the RecommendationsClient.ListRecommendedRulesForWebApp -// method. -func (client *RecommendationsClient) NewListRecommendedRulesForWebAppPager(resourceGroupName string, siteName string, options *RecommendationsClientListRecommendedRulesForWebAppOptions) *runtime.Pager[RecommendationsClientListRecommendedRulesForWebAppResponse] { - return runtime.NewPager(runtime.PagingHandler[RecommendationsClientListRecommendedRulesForWebAppResponse]{ - More: func(page RecommendationsClientListRecommendedRulesForWebAppResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RecommendationsClientListRecommendedRulesForWebAppResponse) (RecommendationsClientListRecommendedRulesForWebAppResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRecommendedRulesForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RecommendationsClientListRecommendedRulesForWebAppResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientListRecommendedRulesForWebAppResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientListRecommendedRulesForWebAppResponse{}, runtime.NewResponseError(resp) - } - return client.listRecommendedRulesForWebAppHandleResponse(resp) - }, - }) -} - -// listRecommendedRulesForWebAppCreateRequest creates the ListRecommendedRulesForWebApp request. -func (client *RecommendationsClient) listRecommendedRulesForWebAppCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientListRecommendedRulesForWebAppOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Featured != nil { - reqQP.Set("featured", strconv.FormatBool(*options.Featured)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listRecommendedRulesForWebAppHandleResponse handles the ListRecommendedRulesForWebApp response. -func (client *RecommendationsClient) listRecommendedRulesForWebAppHandleResponse(resp *http.Response) (RecommendationsClientListRecommendedRulesForWebAppResponse, error) { - result := RecommendationsClientListRecommendedRulesForWebAppResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecommendationCollection); err != nil { - return RecommendationsClientListRecommendedRulesForWebAppResponse{}, err - } - return result, nil -} - -// ResetAllFilters - Reset all recommendation opt-out settings for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - RecommendationsClientResetAllFiltersOptions contains the optional parameters for the RecommendationsClient.ResetAllFilters -// method. -func (client *RecommendationsClient) ResetAllFilters(ctx context.Context, options *RecommendationsClientResetAllFiltersOptions) (RecommendationsClientResetAllFiltersResponse, error) { - req, err := client.resetAllFiltersCreateRequest(ctx, options) - if err != nil { - return RecommendationsClientResetAllFiltersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientResetAllFiltersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return RecommendationsClientResetAllFiltersResponse{}, runtime.NewResponseError(resp) - } - return RecommendationsClientResetAllFiltersResponse{}, nil -} - -// resetAllFiltersCreateRequest creates the ResetAllFilters request. -func (client *RecommendationsClient) resetAllFiltersCreateRequest(ctx context.Context, options *RecommendationsClientResetAllFiltersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// ResetAllFiltersForHostingEnvironment - Reset all recommendation opt-out settings for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// environmentName - Name of the app. -// options - RecommendationsClientResetAllFiltersForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForHostingEnvironment -// method. -func (client *RecommendationsClient) ResetAllFiltersForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *RecommendationsClientResetAllFiltersForHostingEnvironmentOptions) (RecommendationsClientResetAllFiltersForHostingEnvironmentResponse, error) { - req, err := client.resetAllFiltersForHostingEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, hostingEnvironmentName, options) - if err != nil { - return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, runtime.NewResponseError(resp) - } - return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, nil -} - -// resetAllFiltersForHostingEnvironmentCreateRequest creates the ResetAllFiltersForHostingEnvironment request. -func (client *RecommendationsClient) resetAllFiltersForHostingEnvironmentCreateRequest(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *RecommendationsClientResetAllFiltersForHostingEnvironmentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostingEnvironmentName == "" { - return nil, errors.New("parameter hostingEnvironmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostingEnvironmentName}", url.PathEscape(hostingEnvironmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// ResetAllFiltersForWebApp - Reset all recommendation opt-out settings for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// siteName - Name of the app. -// options - RecommendationsClientResetAllFiltersForWebAppOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForWebApp -// method. -func (client *RecommendationsClient) ResetAllFiltersForWebApp(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientResetAllFiltersForWebAppOptions) (RecommendationsClientResetAllFiltersForWebAppResponse, error) { - req, err := client.resetAllFiltersForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) - if err != nil { - return RecommendationsClientResetAllFiltersForWebAppResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecommendationsClientResetAllFiltersForWebAppResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return RecommendationsClientResetAllFiltersForWebAppResponse{}, runtime.NewResponseError(resp) - } - return RecommendationsClientResetAllFiltersForWebAppResponse{}, nil -} - -// resetAllFiltersForWebAppCreateRequest creates the ResetAllFiltersForWebApp request. -func (client *RecommendationsClient) resetAllFiltersForWebAppCreateRequest(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientResetAllFiltersForWebAppOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_resourcehealthmetadata_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_resourcehealthmetadata_client.go deleted file mode 100644 index e6674d39..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_resourcehealthmetadata_client.go +++ /dev/null @@ -1,444 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ResourceHealthMetadataClient contains the methods for the ResourceHealthMetadata group. -// Don't use this type directly, use NewResourceHealthMetadataClient() instead. -type ResourceHealthMetadataClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewResourceHealthMetadataClient creates a new instance of ResourceHealthMetadataClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewResourceHealthMetadataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceHealthMetadataClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ResourceHealthMetadataClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// GetBySite - Gets the category of ResourceHealthMetadata to use for the given site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app -// options - ResourceHealthMetadataClientGetBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySite -// method. -func (client *ResourceHealthMetadataClient) GetBySite(ctx context.Context, resourceGroupName string, name string, options *ResourceHealthMetadataClientGetBySiteOptions) (ResourceHealthMetadataClientGetBySiteResponse, error) { - req, err := client.getBySiteCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return ResourceHealthMetadataClientGetBySiteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceHealthMetadataClientGetBySiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientGetBySiteResponse{}, runtime.NewResponseError(resp) - } - return client.getBySiteHandleResponse(resp) -} - -// getBySiteCreateRequest creates the GetBySite request. -func (client *ResourceHealthMetadataClient) getBySiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ResourceHealthMetadataClientGetBySiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBySiteHandleResponse handles the GetBySite response. -func (client *ResourceHealthMetadataClient) getBySiteHandleResponse(resp *http.Response) (ResourceHealthMetadataClientGetBySiteResponse, error) { - result := ResourceHealthMetadataClientGetBySiteResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadata); err != nil { - return ResourceHealthMetadataClientGetBySiteResponse{}, err - } - return result, nil -} - -// GetBySiteSlot - Gets the category of ResourceHealthMetadata to use for the given site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app -// slot - Name of web app slot. If not specified then will default to production slot. -// options - ResourceHealthMetadataClientGetBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySiteSlot -// method. -func (client *ResourceHealthMetadataClient) GetBySiteSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *ResourceHealthMetadataClientGetBySiteSlotOptions) (ResourceHealthMetadataClientGetBySiteSlotResponse, error) { - req, err := client.getBySiteSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return ResourceHealthMetadataClientGetBySiteSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceHealthMetadataClientGetBySiteSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientGetBySiteSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getBySiteSlotHandleResponse(resp) -} - -// getBySiteSlotCreateRequest creates the GetBySiteSlot request. -func (client *ResourceHealthMetadataClient) getBySiteSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *ResourceHealthMetadataClientGetBySiteSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBySiteSlotHandleResponse handles the GetBySiteSlot response. -func (client *ResourceHealthMetadataClient) getBySiteSlotHandleResponse(resp *http.Response) (ResourceHealthMetadataClientGetBySiteSlotResponse, error) { - result := ResourceHealthMetadataClientGetBySiteSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadata); err != nil { - return ResourceHealthMetadataClientGetBySiteSlotResponse{}, err - } - return result, nil -} - -// NewListPager - List all ResourceHealthMetadata for all sites in the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - ResourceHealthMetadataClientListOptions contains the optional parameters for the ResourceHealthMetadataClient.List -// method. -func (client *ResourceHealthMetadataClient) NewListPager(options *ResourceHealthMetadataClientListOptions) *runtime.Pager[ResourceHealthMetadataClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceHealthMetadataClientListResponse]{ - More: func(page ResourceHealthMetadataClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListResponse) (ResourceHealthMetadataClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceHealthMetadataClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceHealthMetadataClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ResourceHealthMetadataClient) listCreateRequest(ctx context.Context, options *ResourceHealthMetadataClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ResourceHealthMetadataClient) listHandleResponse(resp *http.Response) (ResourceHealthMetadataClientListResponse, error) { - result := ResourceHealthMetadataClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadataCollection); err != nil { - return ResourceHealthMetadataClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List all ResourceHealthMetadata for all sites in the resource group in the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - ResourceHealthMetadataClientListByResourceGroupOptions contains the optional parameters for the ResourceHealthMetadataClient.ListByResourceGroup -// method. -func (client *ResourceHealthMetadataClient) NewListByResourceGroupPager(resourceGroupName string, options *ResourceHealthMetadataClientListByResourceGroupOptions) *runtime.Pager[ResourceHealthMetadataClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceHealthMetadataClientListByResourceGroupResponse]{ - More: func(page ResourceHealthMetadataClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListByResourceGroupResponse) (ResourceHealthMetadataClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceHealthMetadataClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceHealthMetadataClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ResourceHealthMetadataClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ResourceHealthMetadataClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ResourceHealthMetadataClient) listByResourceGroupHandleResponse(resp *http.Response) (ResourceHealthMetadataClientListByResourceGroupResponse, error) { - result := ResourceHealthMetadataClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadataCollection); err != nil { - return ResourceHealthMetadataClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySitePager - Gets the category of ResourceHealthMetadata to use for the given site as a collection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - ResourceHealthMetadataClientListBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.ListBySite -// method. -func (client *ResourceHealthMetadataClient) NewListBySitePager(resourceGroupName string, name string, options *ResourceHealthMetadataClientListBySiteOptions) *runtime.Pager[ResourceHealthMetadataClientListBySiteResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceHealthMetadataClientListBySiteResponse]{ - More: func(page ResourceHealthMetadataClientListBySiteResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListBySiteResponse) (ResourceHealthMetadataClientListBySiteResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySiteCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceHealthMetadataClientListBySiteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceHealthMetadataClientListBySiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientListBySiteResponse{}, runtime.NewResponseError(resp) - } - return client.listBySiteHandleResponse(resp) - }, - }) -} - -// listBySiteCreateRequest creates the ListBySite request. -func (client *ResourceHealthMetadataClient) listBySiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ResourceHealthMetadataClientListBySiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySiteHandleResponse handles the ListBySite response. -func (client *ResourceHealthMetadataClient) listBySiteHandleResponse(resp *http.Response) (ResourceHealthMetadataClientListBySiteResponse, error) { - result := ResourceHealthMetadataClientListBySiteResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadataCollection); err != nil { - return ResourceHealthMetadataClientListBySiteResponse{}, err - } - return result, nil -} - -// NewListBySiteSlotPager - Gets the category of ResourceHealthMetadata to use for the given site as a collection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - ResourceHealthMetadataClientListBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.ListBySiteSlot -// method. -func (client *ResourceHealthMetadataClient) NewListBySiteSlotPager(resourceGroupName string, name string, slot string, options *ResourceHealthMetadataClientListBySiteSlotOptions) *runtime.Pager[ResourceHealthMetadataClientListBySiteSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceHealthMetadataClientListBySiteSlotResponse]{ - More: func(page ResourceHealthMetadataClientListBySiteSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListBySiteSlotResponse) (ResourceHealthMetadataClientListBySiteSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySiteSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceHealthMetadataClientListBySiteSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceHealthMetadataClientListBySiteSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientListBySiteSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listBySiteSlotHandleResponse(resp) - }, - }) -} - -// listBySiteSlotCreateRequest creates the ListBySiteSlot request. -func (client *ResourceHealthMetadataClient) listBySiteSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *ResourceHealthMetadataClientListBySiteSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySiteSlotHandleResponse handles the ListBySiteSlot response. -func (client *ResourceHealthMetadataClient) listBySiteSlotHandleResponse(resp *http.Response) (ResourceHealthMetadataClientListBySiteSlotResponse, error) { - result := ResourceHealthMetadataClientListBySiteSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceHealthMetadataCollection); err != nil { - return ResourceHealthMetadataClientListBySiteSlotResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_response_types.go deleted file mode 100644 index 615eb2e6..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_response_types.go +++ /dev/null @@ -1,3356 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "encoding/json" - "io" -) - -// CertificateOrdersClientCreateOrUpdateCertificateResponse contains the response from method CertificateOrdersClient.CreateOrUpdateCertificate. -type CertificateOrdersClientCreateOrUpdateCertificateResponse struct { - CertificateResource -} - -// CertificateOrdersClientCreateOrUpdateResponse contains the response from method CertificateOrdersClient.CreateOrUpdate. -type CertificateOrdersClientCreateOrUpdateResponse struct { - CertificateOrder -} - -// CertificateOrdersClientDeleteCertificateResponse contains the response from method CertificateOrdersClient.DeleteCertificate. -type CertificateOrdersClientDeleteCertificateResponse struct { - // placeholder for future response values -} - -// CertificateOrdersClientDeleteResponse contains the response from method CertificateOrdersClient.Delete. -type CertificateOrdersClientDeleteResponse struct { - // placeholder for future response values -} - -// CertificateOrdersClientGetCertificateResponse contains the response from method CertificateOrdersClient.GetCertificate. -type CertificateOrdersClientGetCertificateResponse struct { - CertificateResource -} - -// CertificateOrdersClientGetResponse contains the response from method CertificateOrdersClient.Get. -type CertificateOrdersClientGetResponse struct { - CertificateOrder -} - -// CertificateOrdersClientListByResourceGroupResponse contains the response from method CertificateOrdersClient.ListByResourceGroup. -type CertificateOrdersClientListByResourceGroupResponse struct { - CertificateOrderCollection -} - -// CertificateOrdersClientListCertificatesResponse contains the response from method CertificateOrdersClient.ListCertificates. -type CertificateOrdersClientListCertificatesResponse struct { - CertificateCollection -} - -// CertificateOrdersClientListResponse contains the response from method CertificateOrdersClient.List. -type CertificateOrdersClientListResponse struct { - CertificateOrderCollection -} - -// CertificateOrdersClientReissueResponse contains the response from method CertificateOrdersClient.Reissue. -type CertificateOrdersClientReissueResponse struct { - // placeholder for future response values -} - -// CertificateOrdersClientRenewResponse contains the response from method CertificateOrdersClient.Renew. -type CertificateOrdersClientRenewResponse struct { - // placeholder for future response values -} - -// CertificateOrdersClientResendEmailResponse contains the response from method CertificateOrdersClient.ResendEmail. -type CertificateOrdersClientResendEmailResponse struct { - // placeholder for future response values -} - -// CertificateOrdersClientResendRequestEmailsResponse contains the response from method CertificateOrdersClient.ResendRequestEmails. -type CertificateOrdersClientResendRequestEmailsResponse struct { - // placeholder for future response values -} - -// CertificateOrdersClientRetrieveCertificateActionsResponse contains the response from method CertificateOrdersClient.RetrieveCertificateActions. -type CertificateOrdersClientRetrieveCertificateActionsResponse struct { - // Array of CertificateOrderAction - CertificateOrderActionArray []*CertificateOrderAction -} - -// CertificateOrdersClientRetrieveCertificateEmailHistoryResponse contains the response from method CertificateOrdersClient.RetrieveCertificateEmailHistory. -type CertificateOrdersClientRetrieveCertificateEmailHistoryResponse struct { - // Array of CertificateEmail - CertificateEmailArray []*CertificateEmail -} - -// CertificateOrdersClientRetrieveSiteSealResponse contains the response from method CertificateOrdersClient.RetrieveSiteSeal. -type CertificateOrdersClientRetrieveSiteSealResponse struct { - SiteSeal -} - -// CertificateOrdersClientUpdateCertificateResponse contains the response from method CertificateOrdersClient.UpdateCertificate. -type CertificateOrdersClientUpdateCertificateResponse struct { - CertificateResource -} - -// CertificateOrdersClientUpdateResponse contains the response from method CertificateOrdersClient.Update. -type CertificateOrdersClientUpdateResponse struct { - CertificateOrder -} - -// CertificateOrdersClientValidatePurchaseInformationResponse contains the response from method CertificateOrdersClient.ValidatePurchaseInformation. -type CertificateOrdersClientValidatePurchaseInformationResponse struct { - // placeholder for future response values -} - -// CertificateOrdersClientVerifyDomainOwnershipResponse contains the response from method CertificateOrdersClient.VerifyDomainOwnership. -type CertificateOrdersClientVerifyDomainOwnershipResponse struct { - // placeholder for future response values -} - -// CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse contains the response from method -// CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse. -type CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse struct { - DetectorResponse -} - -// CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse contains the response from method -// CertificateOrdersDiagnosticsClient.ListAppServiceCertificateOrderDetectorResponse. -type CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse struct { - DetectorResponseCollection -} - -// CertificateRegistrationProviderClientListOperationsResponse contains the response from method CertificateRegistrationProviderClient.ListOperations. -type CertificateRegistrationProviderClientListOperationsResponse struct { - CsmOperationCollection -} - -// CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. -type CertificatesClientCreateOrUpdateResponse struct { - AppCertificate -} - -// CertificatesClientDeleteResponse contains the response from method CertificatesClient.Delete. -type CertificatesClientDeleteResponse struct { - // placeholder for future response values -} - -// CertificatesClientGetResponse contains the response from method CertificatesClient.Get. -type CertificatesClientGetResponse struct { - AppCertificate -} - -// CertificatesClientListByResourceGroupResponse contains the response from method CertificatesClient.ListByResourceGroup. -type CertificatesClientListByResourceGroupResponse struct { - AppCertificateCollection -} - -// CertificatesClientListResponse contains the response from method CertificatesClient.List. -type CertificatesClientListResponse struct { - AppCertificateCollection -} - -// CertificatesClientUpdateResponse contains the response from method CertificatesClient.Update. -type CertificatesClientUpdateResponse struct { - AppCertificate -} - -// ContainerAppsClientCreateOrUpdateResponse contains the response from method ContainerAppsClient.CreateOrUpdate. -type ContainerAppsClientCreateOrUpdateResponse struct { - ContainerApp -} - -// ContainerAppsClientDeleteResponse contains the response from method ContainerAppsClient.Delete. -type ContainerAppsClientDeleteResponse struct { - // placeholder for future response values -} - -// ContainerAppsClientGetResponse contains the response from method ContainerAppsClient.Get. -type ContainerAppsClientGetResponse struct { - ContainerApp -} - -// ContainerAppsClientListByResourceGroupResponse contains the response from method ContainerAppsClient.ListByResourceGroup. -type ContainerAppsClientListByResourceGroupResponse struct { - ContainerAppCollection -} - -// ContainerAppsClientListBySubscriptionResponse contains the response from method ContainerAppsClient.ListBySubscription. -type ContainerAppsClientListBySubscriptionResponse struct { - ContainerAppCollection -} - -// ContainerAppsClientListSecretsResponse contains the response from method ContainerAppsClient.ListSecrets. -type ContainerAppsClientListSecretsResponse struct { - SecretsCollection -} - -// ContainerAppsRevisionsClientActivateRevisionResponse contains the response from method ContainerAppsRevisionsClient.ActivateRevision. -type ContainerAppsRevisionsClientActivateRevisionResponse struct { - // placeholder for future response values -} - -// ContainerAppsRevisionsClientDeactivateRevisionResponse contains the response from method ContainerAppsRevisionsClient.DeactivateRevision. -type ContainerAppsRevisionsClientDeactivateRevisionResponse struct { - // placeholder for future response values -} - -// ContainerAppsRevisionsClientGetRevisionResponse contains the response from method ContainerAppsRevisionsClient.GetRevision. -type ContainerAppsRevisionsClientGetRevisionResponse struct { - Revision -} - -// ContainerAppsRevisionsClientListRevisionsResponse contains the response from method ContainerAppsRevisionsClient.ListRevisions. -type ContainerAppsRevisionsClientListRevisionsResponse struct { - RevisionCollection -} - -// ContainerAppsRevisionsClientRestartRevisionResponse contains the response from method ContainerAppsRevisionsClient.RestartRevision. -type ContainerAppsRevisionsClientRestartRevisionResponse struct { - // placeholder for future response values -} - -// DeletedWebAppsClientGetDeletedWebAppByLocationResponse contains the response from method DeletedWebAppsClient.GetDeletedWebAppByLocation. -type DeletedWebAppsClientGetDeletedWebAppByLocationResponse struct { - DeletedSite -} - -// DeletedWebAppsClientListByLocationResponse contains the response from method DeletedWebAppsClient.ListByLocation. -type DeletedWebAppsClientListByLocationResponse struct { - DeletedWebAppCollection -} - -// DeletedWebAppsClientListResponse contains the response from method DeletedWebAppsClient.List. -type DeletedWebAppsClientListResponse struct { - DeletedWebAppCollection -} - -// DiagnosticsClientExecuteSiteAnalysisResponse contains the response from method DiagnosticsClient.ExecuteSiteAnalysis. -type DiagnosticsClientExecuteSiteAnalysisResponse struct { - DiagnosticAnalysis -} - -// DiagnosticsClientExecuteSiteAnalysisSlotResponse contains the response from method DiagnosticsClient.ExecuteSiteAnalysisSlot. -type DiagnosticsClientExecuteSiteAnalysisSlotResponse struct { - DiagnosticAnalysis -} - -// DiagnosticsClientExecuteSiteDetectorResponse contains the response from method DiagnosticsClient.ExecuteSiteDetector. -type DiagnosticsClientExecuteSiteDetectorResponse struct { - DiagnosticDetectorResponse -} - -// DiagnosticsClientExecuteSiteDetectorSlotResponse contains the response from method DiagnosticsClient.ExecuteSiteDetectorSlot. -type DiagnosticsClientExecuteSiteDetectorSlotResponse struct { - DiagnosticDetectorResponse -} - -// DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse contains the response from method DiagnosticsClient.GetHostingEnvironmentDetectorResponse. -type DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse struct { - DetectorResponse -} - -// DiagnosticsClientGetSiteAnalysisResponse contains the response from method DiagnosticsClient.GetSiteAnalysis. -type DiagnosticsClientGetSiteAnalysisResponse struct { - AnalysisDefinition -} - -// DiagnosticsClientGetSiteAnalysisSlotResponse contains the response from method DiagnosticsClient.GetSiteAnalysisSlot. -type DiagnosticsClientGetSiteAnalysisSlotResponse struct { - AnalysisDefinition -} - -// DiagnosticsClientGetSiteDetectorResponse contains the response from method DiagnosticsClient.GetSiteDetector. -type DiagnosticsClientGetSiteDetectorResponse struct { - DetectorDefinitionResource -} - -// DiagnosticsClientGetSiteDetectorResponseResponse contains the response from method DiagnosticsClient.GetSiteDetectorResponse. -type DiagnosticsClientGetSiteDetectorResponseResponse struct { - DetectorResponse -} - -// DiagnosticsClientGetSiteDetectorResponseSlotResponse contains the response from method DiagnosticsClient.GetSiteDetectorResponseSlot. -type DiagnosticsClientGetSiteDetectorResponseSlotResponse struct { - DetectorResponse -} - -// DiagnosticsClientGetSiteDetectorSlotResponse contains the response from method DiagnosticsClient.GetSiteDetectorSlot. -type DiagnosticsClientGetSiteDetectorSlotResponse struct { - DetectorDefinitionResource -} - -// DiagnosticsClientGetSiteDiagnosticCategoryResponse contains the response from method DiagnosticsClient.GetSiteDiagnosticCategory. -type DiagnosticsClientGetSiteDiagnosticCategoryResponse struct { - DiagnosticCategory -} - -// DiagnosticsClientGetSiteDiagnosticCategorySlotResponse contains the response from method DiagnosticsClient.GetSiteDiagnosticCategorySlot. -type DiagnosticsClientGetSiteDiagnosticCategorySlotResponse struct { - DiagnosticCategory -} - -// DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse contains the response from method DiagnosticsClient.ListHostingEnvironmentDetectorResponses. -type DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse struct { - DetectorResponseCollection -} - -// DiagnosticsClientListSiteAnalysesResponse contains the response from method DiagnosticsClient.ListSiteAnalyses. -type DiagnosticsClientListSiteAnalysesResponse struct { - DiagnosticAnalysisCollection -} - -// DiagnosticsClientListSiteAnalysesSlotResponse contains the response from method DiagnosticsClient.ListSiteAnalysesSlot. -type DiagnosticsClientListSiteAnalysesSlotResponse struct { - DiagnosticAnalysisCollection -} - -// DiagnosticsClientListSiteDetectorResponsesResponse contains the response from method DiagnosticsClient.ListSiteDetectorResponses. -type DiagnosticsClientListSiteDetectorResponsesResponse struct { - DetectorResponseCollection -} - -// DiagnosticsClientListSiteDetectorResponsesSlotResponse contains the response from method DiagnosticsClient.ListSiteDetectorResponsesSlot. -type DiagnosticsClientListSiteDetectorResponsesSlotResponse struct { - DetectorResponseCollection -} - -// DiagnosticsClientListSiteDetectorsResponse contains the response from method DiagnosticsClient.ListSiteDetectors. -type DiagnosticsClientListSiteDetectorsResponse struct { - DiagnosticDetectorCollection -} - -// DiagnosticsClientListSiteDetectorsSlotResponse contains the response from method DiagnosticsClient.ListSiteDetectorsSlot. -type DiagnosticsClientListSiteDetectorsSlotResponse struct { - DiagnosticDetectorCollection -} - -// DiagnosticsClientListSiteDiagnosticCategoriesResponse contains the response from method DiagnosticsClient.ListSiteDiagnosticCategories. -type DiagnosticsClientListSiteDiagnosticCategoriesResponse struct { - DiagnosticCategoryCollection -} - -// DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse contains the response from method DiagnosticsClient.ListSiteDiagnosticCategoriesSlot. -type DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse struct { - DiagnosticCategoryCollection -} - -// DomainRegistrationProviderClientListOperationsResponse contains the response from method DomainRegistrationProviderClient.ListOperations. -type DomainRegistrationProviderClientListOperationsResponse struct { - CsmOperationCollection -} - -// DomainsClientCheckAvailabilityResponse contains the response from method DomainsClient.CheckAvailability. -type DomainsClientCheckAvailabilityResponse struct { - DomainAvailabilityCheckResult -} - -// DomainsClientCreateOrUpdateOwnershipIdentifierResponse contains the response from method DomainsClient.CreateOrUpdateOwnershipIdentifier. -type DomainsClientCreateOrUpdateOwnershipIdentifierResponse struct { - DomainOwnershipIdentifier -} - -// DomainsClientCreateOrUpdateResponse contains the response from method DomainsClient.CreateOrUpdate. -type DomainsClientCreateOrUpdateResponse struct { - Domain -} - -// DomainsClientDeleteOwnershipIdentifierResponse contains the response from method DomainsClient.DeleteOwnershipIdentifier. -type DomainsClientDeleteOwnershipIdentifierResponse struct { - // placeholder for future response values -} - -// DomainsClientDeleteResponse contains the response from method DomainsClient.Delete. -type DomainsClientDeleteResponse struct { - // placeholder for future response values -} - -// DomainsClientGetControlCenterSsoRequestResponse contains the response from method DomainsClient.GetControlCenterSsoRequest. -type DomainsClientGetControlCenterSsoRequestResponse struct { - DomainControlCenterSsoRequest -} - -// DomainsClientGetOwnershipIdentifierResponse contains the response from method DomainsClient.GetOwnershipIdentifier. -type DomainsClientGetOwnershipIdentifierResponse struct { - DomainOwnershipIdentifier -} - -// DomainsClientGetResponse contains the response from method DomainsClient.Get. -type DomainsClientGetResponse struct { - Domain -} - -// DomainsClientListByResourceGroupResponse contains the response from method DomainsClient.ListByResourceGroup. -type DomainsClientListByResourceGroupResponse struct { - DomainCollection -} - -// DomainsClientListOwnershipIdentifiersResponse contains the response from method DomainsClient.ListOwnershipIdentifiers. -type DomainsClientListOwnershipIdentifiersResponse struct { - DomainOwnershipIdentifierCollection -} - -// DomainsClientListRecommendationsResponse contains the response from method DomainsClient.ListRecommendations. -type DomainsClientListRecommendationsResponse struct { - NameIdentifierCollection -} - -// DomainsClientListResponse contains the response from method DomainsClient.List. -type DomainsClientListResponse struct { - DomainCollection -} - -// DomainsClientRenewResponse contains the response from method DomainsClient.Renew. -type DomainsClientRenewResponse struct { - // placeholder for future response values -} - -// DomainsClientTransferOutResponse contains the response from method DomainsClient.TransferOut. -type DomainsClientTransferOutResponse struct { - Domain -} - -// DomainsClientUpdateOwnershipIdentifierResponse contains the response from method DomainsClient.UpdateOwnershipIdentifier. -type DomainsClientUpdateOwnershipIdentifierResponse struct { - DomainOwnershipIdentifier -} - -// DomainsClientUpdateResponse contains the response from method DomainsClient.Update. -type DomainsClientUpdateResponse struct { - Domain -} - -// EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse contains the response from method EnvironmentsClient.ApproveOrRejectPrivateEndpointConnection. -type EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse struct { - RemotePrivateEndpointConnectionARMResource -} - -// EnvironmentsClientChangeVnetResponse contains the response from method EnvironmentsClient.ChangeVnet. -type EnvironmentsClientChangeVnetResponse struct { - WebAppCollection -} - -// EnvironmentsClientCreateOrUpdateMultiRolePoolResponse contains the response from method EnvironmentsClient.CreateOrUpdateMultiRolePool. -type EnvironmentsClientCreateOrUpdateMultiRolePoolResponse struct { - WorkerPoolResource -} - -// EnvironmentsClientCreateOrUpdateResponse contains the response from method EnvironmentsClient.CreateOrUpdate. -type EnvironmentsClientCreateOrUpdateResponse struct { - EnvironmentResource -} - -// EnvironmentsClientCreateOrUpdateWorkerPoolResponse contains the response from method EnvironmentsClient.CreateOrUpdateWorkerPool. -type EnvironmentsClientCreateOrUpdateWorkerPoolResponse struct { - WorkerPoolResource -} - -// EnvironmentsClientDeletePrivateEndpointConnectionResponse contains the response from method EnvironmentsClient.DeletePrivateEndpointConnection. -type EnvironmentsClientDeletePrivateEndpointConnectionResponse struct { - // Anything - Interface interface{} -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentsClientDeletePrivateEndpointConnectionResponse. -func (e *EnvironmentsClientDeletePrivateEndpointConnectionResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &e.Interface) -} - -// EnvironmentsClientDeleteResponse contains the response from method EnvironmentsClient.Delete. -type EnvironmentsClientDeleteResponse struct { - // placeholder for future response values -} - -// EnvironmentsClientGetAseV3NetworkingConfigurationResponse contains the response from method EnvironmentsClient.GetAseV3NetworkingConfiguration. -type EnvironmentsClientGetAseV3NetworkingConfigurationResponse struct { - AseV3NetworkingConfiguration -} - -// EnvironmentsClientGetDiagnosticsItemResponse contains the response from method EnvironmentsClient.GetDiagnosticsItem. -type EnvironmentsClientGetDiagnosticsItemResponse struct { - HostingEnvironmentDiagnostics -} - -// EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse contains the response from method EnvironmentsClient.GetInboundNetworkDependenciesEndpoints. -type EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse struct { - InboundEnvironmentEndpointCollection -} - -// EnvironmentsClientGetMultiRolePoolResponse contains the response from method EnvironmentsClient.GetMultiRolePool. -type EnvironmentsClientGetMultiRolePoolResponse struct { - WorkerPoolResource -} - -// EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse contains the response from method EnvironmentsClient.GetOutboundNetworkDependenciesEndpoints. -type EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse struct { - OutboundEnvironmentEndpointCollection -} - -// EnvironmentsClientGetPrivateEndpointConnectionListResponse contains the response from method EnvironmentsClient.GetPrivateEndpointConnectionList. -type EnvironmentsClientGetPrivateEndpointConnectionListResponse struct { - PrivateEndpointConnectionCollection -} - -// EnvironmentsClientGetPrivateEndpointConnectionResponse contains the response from method EnvironmentsClient.GetPrivateEndpointConnection. -type EnvironmentsClientGetPrivateEndpointConnectionResponse struct { - RemotePrivateEndpointConnectionARMResource -} - -// EnvironmentsClientGetPrivateLinkResourcesResponse contains the response from method EnvironmentsClient.GetPrivateLinkResources. -type EnvironmentsClientGetPrivateLinkResourcesResponse struct { - PrivateLinkResourcesWrapper -} - -// EnvironmentsClientGetResponse contains the response from method EnvironmentsClient.Get. -type EnvironmentsClientGetResponse struct { - EnvironmentResource -} - -// EnvironmentsClientGetVipInfoResponse contains the response from method EnvironmentsClient.GetVipInfo. -type EnvironmentsClientGetVipInfoResponse struct { - AddressResponse -} - -// EnvironmentsClientGetWorkerPoolResponse contains the response from method EnvironmentsClient.GetWorkerPool. -type EnvironmentsClientGetWorkerPoolResponse struct { - WorkerPoolResource -} - -// EnvironmentsClientListAppServicePlansResponse contains the response from method EnvironmentsClient.ListAppServicePlans. -type EnvironmentsClientListAppServicePlansResponse struct { - PlanCollection -} - -// EnvironmentsClientListByResourceGroupResponse contains the response from method EnvironmentsClient.ListByResourceGroup. -type EnvironmentsClientListByResourceGroupResponse struct { - EnvironmentCollection -} - -// EnvironmentsClientListCapacitiesResponse contains the response from method EnvironmentsClient.ListCapacities. -type EnvironmentsClientListCapacitiesResponse struct { - StampCapacityCollection -} - -// EnvironmentsClientListDiagnosticsResponse contains the response from method EnvironmentsClient.ListDiagnostics. -type EnvironmentsClientListDiagnosticsResponse struct { - // Array of HostingEnvironmentDiagnostics - HostingEnvironmentDiagnosticsArray []*HostingEnvironmentDiagnostics -} - -// EnvironmentsClientListMultiRoleMetricDefinitionsResponse contains the response from method EnvironmentsClient.ListMultiRoleMetricDefinitions. -type EnvironmentsClientListMultiRoleMetricDefinitionsResponse struct { - ResourceMetricDefinitionCollection -} - -// EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse contains the response from method EnvironmentsClient.ListMultiRolePoolInstanceMetricDefinitions. -type EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse struct { - ResourceMetricDefinitionCollection -} - -// EnvironmentsClientListMultiRolePoolSKUsResponse contains the response from method EnvironmentsClient.ListMultiRolePoolSKUs. -type EnvironmentsClientListMultiRolePoolSKUsResponse struct { - SKUInfoCollection -} - -// EnvironmentsClientListMultiRolePoolsResponse contains the response from method EnvironmentsClient.ListMultiRolePools. -type EnvironmentsClientListMultiRolePoolsResponse struct { - WorkerPoolCollection -} - -// EnvironmentsClientListMultiRoleUsagesResponse contains the response from method EnvironmentsClient.ListMultiRoleUsages. -type EnvironmentsClientListMultiRoleUsagesResponse struct { - UsageCollection -} - -// EnvironmentsClientListOperationsResponse contains the response from method EnvironmentsClient.ListOperations. -type EnvironmentsClientListOperationsResponse struct { - // Array of Operation - OperationArray []*Operation -} - -// EnvironmentsClientListResponse contains the response from method EnvironmentsClient.List. -type EnvironmentsClientListResponse struct { - EnvironmentCollection -} - -// EnvironmentsClientListUsagesResponse contains the response from method EnvironmentsClient.ListUsages. -type EnvironmentsClientListUsagesResponse struct { - CsmUsageQuotaCollection -} - -// EnvironmentsClientListWebAppsResponse contains the response from method EnvironmentsClient.ListWebApps. -type EnvironmentsClientListWebAppsResponse struct { - WebAppCollection -} - -// EnvironmentsClientListWebWorkerMetricDefinitionsResponse contains the response from method EnvironmentsClient.ListWebWorkerMetricDefinitions. -type EnvironmentsClientListWebWorkerMetricDefinitionsResponse struct { - ResourceMetricDefinitionCollection -} - -// EnvironmentsClientListWebWorkerUsagesResponse contains the response from method EnvironmentsClient.ListWebWorkerUsages. -type EnvironmentsClientListWebWorkerUsagesResponse struct { - UsageCollection -} - -// EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse contains the response from method EnvironmentsClient.ListWorkerPoolInstanceMetricDefinitions. -type EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse struct { - ResourceMetricDefinitionCollection -} - -// EnvironmentsClientListWorkerPoolSKUsResponse contains the response from method EnvironmentsClient.ListWorkerPoolSKUs. -type EnvironmentsClientListWorkerPoolSKUsResponse struct { - SKUInfoCollection -} - -// EnvironmentsClientListWorkerPoolsResponse contains the response from method EnvironmentsClient.ListWorkerPools. -type EnvironmentsClientListWorkerPoolsResponse struct { - WorkerPoolCollection -} - -// EnvironmentsClientRebootResponse contains the response from method EnvironmentsClient.Reboot. -type EnvironmentsClientRebootResponse struct { - // placeholder for future response values -} - -// EnvironmentsClientResumeResponse contains the response from method EnvironmentsClient.Resume. -type EnvironmentsClientResumeResponse struct { - WebAppCollection -} - -// EnvironmentsClientSuspendResponse contains the response from method EnvironmentsClient.Suspend. -type EnvironmentsClientSuspendResponse struct { - WebAppCollection -} - -// EnvironmentsClientUpdateAseNetworkingConfigurationResponse contains the response from method EnvironmentsClient.UpdateAseNetworkingConfiguration. -type EnvironmentsClientUpdateAseNetworkingConfigurationResponse struct { - AseV3NetworkingConfiguration -} - -// EnvironmentsClientUpdateMultiRolePoolResponse contains the response from method EnvironmentsClient.UpdateMultiRolePool. -type EnvironmentsClientUpdateMultiRolePoolResponse struct { - WorkerPoolResource -} - -// EnvironmentsClientUpdateResponse contains the response from method EnvironmentsClient.Update. -type EnvironmentsClientUpdateResponse struct { - EnvironmentResource -} - -// EnvironmentsClientUpdateWorkerPoolResponse contains the response from method EnvironmentsClient.UpdateWorkerPool. -type EnvironmentsClientUpdateWorkerPoolResponse struct { - WorkerPoolResource -} - -// GlobalClientGetDeletedWebAppResponse contains the response from method GlobalClient.GetDeletedWebApp. -type GlobalClientGetDeletedWebAppResponse struct { - DeletedSite -} - -// GlobalClientGetDeletedWebAppSnapshotsResponse contains the response from method GlobalClient.GetDeletedWebAppSnapshots. -type GlobalClientGetDeletedWebAppSnapshotsResponse struct { - // Array of Snapshot - SnapshotArray []*Snapshot -} - -// GlobalClientGetSubscriptionOperationWithAsyncResponseResponse contains the response from method GlobalClient.GetSubscriptionOperationWithAsyncResponse. -type GlobalClientGetSubscriptionOperationWithAsyncResponseResponse struct { - // placeholder for future response values -} - -// KubeEnvironmentsClientCreateOrUpdateResponse contains the response from method KubeEnvironmentsClient.CreateOrUpdate. -type KubeEnvironmentsClientCreateOrUpdateResponse struct { - KubeEnvironment -} - -// KubeEnvironmentsClientDeleteResponse contains the response from method KubeEnvironmentsClient.Delete. -type KubeEnvironmentsClientDeleteResponse struct { - // placeholder for future response values -} - -// KubeEnvironmentsClientGetResponse contains the response from method KubeEnvironmentsClient.Get. -type KubeEnvironmentsClientGetResponse struct { - KubeEnvironment -} - -// KubeEnvironmentsClientListByResourceGroupResponse contains the response from method KubeEnvironmentsClient.ListByResourceGroup. -type KubeEnvironmentsClientListByResourceGroupResponse struct { - KubeEnvironmentCollection -} - -// KubeEnvironmentsClientListBySubscriptionResponse contains the response from method KubeEnvironmentsClient.ListBySubscription. -type KubeEnvironmentsClientListBySubscriptionResponse struct { - KubeEnvironmentCollection -} - -// KubeEnvironmentsClientUpdateResponse contains the response from method KubeEnvironmentsClient.Update. -type KubeEnvironmentsClientUpdateResponse struct { - KubeEnvironment -} - -// PlansClientCreateOrUpdateResponse contains the response from method PlansClient.CreateOrUpdate. -type PlansClientCreateOrUpdateResponse struct { - Plan -} - -// PlansClientCreateOrUpdateVnetRouteResponse contains the response from method PlansClient.CreateOrUpdateVnetRoute. -type PlansClientCreateOrUpdateVnetRouteResponse struct { - VnetRoute -} - -// PlansClientDeleteHybridConnectionResponse contains the response from method PlansClient.DeleteHybridConnection. -type PlansClientDeleteHybridConnectionResponse struct { - // placeholder for future response values -} - -// PlansClientDeleteResponse contains the response from method PlansClient.Delete. -type PlansClientDeleteResponse struct { - // placeholder for future response values -} - -// PlansClientDeleteVnetRouteResponse contains the response from method PlansClient.DeleteVnetRoute. -type PlansClientDeleteVnetRouteResponse struct { - // placeholder for future response values -} - -// PlansClientGetHybridConnectionPlanLimitResponse contains the response from method PlansClient.GetHybridConnectionPlanLimit. -type PlansClientGetHybridConnectionPlanLimitResponse struct { - HybridConnectionLimits -} - -// PlansClientGetHybridConnectionResponse contains the response from method PlansClient.GetHybridConnection. -type PlansClientGetHybridConnectionResponse struct { - HybridConnection -} - -// PlansClientGetResponse contains the response from method PlansClient.Get. -type PlansClientGetResponse struct { - Plan -} - -// PlansClientGetRouteForVnetResponse contains the response from method PlansClient.GetRouteForVnet. -type PlansClientGetRouteForVnetResponse struct { - // Array of VnetRoute - VnetRouteArray []*VnetRoute -} - -// PlansClientGetServerFarmSKUsResponse contains the response from method PlansClient.GetServerFarmSKUs. -type PlansClientGetServerFarmSKUsResponse struct { - // Anything - Interface interface{} -} - -// PlansClientGetVnetFromServerFarmResponse contains the response from method PlansClient.GetVnetFromServerFarm. -type PlansClientGetVnetFromServerFarmResponse struct { - VnetInfoResource -} - -// PlansClientGetVnetGatewayResponse contains the response from method PlansClient.GetVnetGateway. -type PlansClientGetVnetGatewayResponse struct { - VnetGateway -} - -// PlansClientListByResourceGroupResponse contains the response from method PlansClient.ListByResourceGroup. -type PlansClientListByResourceGroupResponse struct { - PlanCollection -} - -// PlansClientListCapabilitiesResponse contains the response from method PlansClient.ListCapabilities. -type PlansClientListCapabilitiesResponse struct { - // Array of Capability - CapabilityArray []*Capability -} - -// PlansClientListHybridConnectionKeysResponse contains the response from method PlansClient.ListHybridConnectionKeys. -type PlansClientListHybridConnectionKeysResponse struct { - HybridConnectionKey -} - -// PlansClientListHybridConnectionsResponse contains the response from method PlansClient.ListHybridConnections. -type PlansClientListHybridConnectionsResponse struct { - HybridConnectionCollection -} - -// PlansClientListResponse contains the response from method PlansClient.List. -type PlansClientListResponse struct { - PlanCollection -} - -// PlansClientListRoutesForVnetResponse contains the response from method PlansClient.ListRoutesForVnet. -type PlansClientListRoutesForVnetResponse struct { - // Array of VnetRoute - VnetRouteArray []*VnetRoute -} - -// PlansClientListUsagesResponse contains the response from method PlansClient.ListUsages. -type PlansClientListUsagesResponse struct { - CsmUsageQuotaCollection -} - -// PlansClientListVnetsResponse contains the response from method PlansClient.ListVnets. -type PlansClientListVnetsResponse struct { - // Array of VnetInfoResource - VnetInfoResourceArray []*VnetInfoResource -} - -// PlansClientListWebAppsByHybridConnectionResponse contains the response from method PlansClient.ListWebAppsByHybridConnection. -type PlansClientListWebAppsByHybridConnectionResponse struct { - ResourceCollection -} - -// PlansClientListWebAppsResponse contains the response from method PlansClient.ListWebApps. -type PlansClientListWebAppsResponse struct { - WebAppCollection -} - -// PlansClientRebootWorkerResponse contains the response from method PlansClient.RebootWorker. -type PlansClientRebootWorkerResponse struct { - // placeholder for future response values -} - -// PlansClientRestartWebAppsResponse contains the response from method PlansClient.RestartWebApps. -type PlansClientRestartWebAppsResponse struct { - // placeholder for future response values -} - -// PlansClientUpdateResponse contains the response from method PlansClient.Update. -type PlansClientUpdateResponse struct { - Plan -} - -// PlansClientUpdateVnetGatewayResponse contains the response from method PlansClient.UpdateVnetGateway. -type PlansClientUpdateVnetGatewayResponse struct { - VnetGateway -} - -// PlansClientUpdateVnetRouteResponse contains the response from method PlansClient.UpdateVnetRoute. -type PlansClientUpdateVnetRouteResponse struct { - VnetRoute -} - -// ProviderClientGetAvailableStacksOnPremResponse contains the response from method ProviderClient.GetAvailableStacksOnPrem. -type ProviderClientGetAvailableStacksOnPremResponse struct { - ApplicationStackCollection -} - -// ProviderClientGetAvailableStacksResponse contains the response from method ProviderClient.GetAvailableStacks. -type ProviderClientGetAvailableStacksResponse struct { - ApplicationStackCollection -} - -// ProviderClientGetFunctionAppStacksForLocationResponse contains the response from method ProviderClient.GetFunctionAppStacksForLocation. -type ProviderClientGetFunctionAppStacksForLocationResponse struct { - FunctionAppStackCollection -} - -// ProviderClientGetFunctionAppStacksResponse contains the response from method ProviderClient.GetFunctionAppStacks. -type ProviderClientGetFunctionAppStacksResponse struct { - FunctionAppStackCollection -} - -// ProviderClientGetWebAppStacksForLocationResponse contains the response from method ProviderClient.GetWebAppStacksForLocation. -type ProviderClientGetWebAppStacksForLocationResponse struct { - WebAppStackCollection -} - -// ProviderClientGetWebAppStacksResponse contains the response from method ProviderClient.GetWebAppStacks. -type ProviderClientGetWebAppStacksResponse struct { - WebAppStackCollection -} - -// ProviderClientListOperationsResponse contains the response from method ProviderClient.ListOperations. -type ProviderClientListOperationsResponse struct { - CsmOperationCollection -} - -// RecommendationsClientDisableAllForHostingEnvironmentResponse contains the response from method RecommendationsClient.DisableAllForHostingEnvironment. -type RecommendationsClientDisableAllForHostingEnvironmentResponse struct { - // placeholder for future response values -} - -// RecommendationsClientDisableAllForWebAppResponse contains the response from method RecommendationsClient.DisableAllForWebApp. -type RecommendationsClientDisableAllForWebAppResponse struct { - // placeholder for future response values -} - -// RecommendationsClientDisableRecommendationForHostingEnvironmentResponse contains the response from method RecommendationsClient.DisableRecommendationForHostingEnvironment. -type RecommendationsClientDisableRecommendationForHostingEnvironmentResponse struct { - // placeholder for future response values -} - -// RecommendationsClientDisableRecommendationForSiteResponse contains the response from method RecommendationsClient.DisableRecommendationForSite. -type RecommendationsClientDisableRecommendationForSiteResponse struct { - // placeholder for future response values -} - -// RecommendationsClientDisableRecommendationForSubscriptionResponse contains the response from method RecommendationsClient.DisableRecommendationForSubscription. -type RecommendationsClientDisableRecommendationForSubscriptionResponse struct { - // placeholder for future response values -} - -// RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse contains the response from method RecommendationsClient.GetRuleDetailsByHostingEnvironment. -type RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse struct { - RecommendationRule -} - -// RecommendationsClientGetRuleDetailsByWebAppResponse contains the response from method RecommendationsClient.GetRuleDetailsByWebApp. -type RecommendationsClientGetRuleDetailsByWebAppResponse struct { - RecommendationRule -} - -// RecommendationsClientListHistoryForHostingEnvironmentResponse contains the response from method RecommendationsClient.ListHistoryForHostingEnvironment. -type RecommendationsClientListHistoryForHostingEnvironmentResponse struct { - RecommendationCollection -} - -// RecommendationsClientListHistoryForWebAppResponse contains the response from method RecommendationsClient.ListHistoryForWebApp. -type RecommendationsClientListHistoryForWebAppResponse struct { - RecommendationCollection -} - -// RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse contains the response from method RecommendationsClient.ListRecommendedRulesForHostingEnvironment. -type RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse struct { - RecommendationCollection -} - -// RecommendationsClientListRecommendedRulesForWebAppResponse contains the response from method RecommendationsClient.ListRecommendedRulesForWebApp. -type RecommendationsClientListRecommendedRulesForWebAppResponse struct { - RecommendationCollection -} - -// RecommendationsClientListResponse contains the response from method RecommendationsClient.List. -type RecommendationsClientListResponse struct { - RecommendationCollection -} - -// RecommendationsClientResetAllFiltersForHostingEnvironmentResponse contains the response from method RecommendationsClient.ResetAllFiltersForHostingEnvironment. -type RecommendationsClientResetAllFiltersForHostingEnvironmentResponse struct { - // placeholder for future response values -} - -// RecommendationsClientResetAllFiltersForWebAppResponse contains the response from method RecommendationsClient.ResetAllFiltersForWebApp. -type RecommendationsClientResetAllFiltersForWebAppResponse struct { - // placeholder for future response values -} - -// RecommendationsClientResetAllFiltersResponse contains the response from method RecommendationsClient.ResetAllFilters. -type RecommendationsClientResetAllFiltersResponse struct { - // placeholder for future response values -} - -// ResourceHealthMetadataClientGetBySiteResponse contains the response from method ResourceHealthMetadataClient.GetBySite. -type ResourceHealthMetadataClientGetBySiteResponse struct { - ResourceHealthMetadata -} - -// ResourceHealthMetadataClientGetBySiteSlotResponse contains the response from method ResourceHealthMetadataClient.GetBySiteSlot. -type ResourceHealthMetadataClientGetBySiteSlotResponse struct { - ResourceHealthMetadata -} - -// ResourceHealthMetadataClientListByResourceGroupResponse contains the response from method ResourceHealthMetadataClient.ListByResourceGroup. -type ResourceHealthMetadataClientListByResourceGroupResponse struct { - ResourceHealthMetadataCollection -} - -// ResourceHealthMetadataClientListBySiteResponse contains the response from method ResourceHealthMetadataClient.ListBySite. -type ResourceHealthMetadataClientListBySiteResponse struct { - ResourceHealthMetadataCollection -} - -// ResourceHealthMetadataClientListBySiteSlotResponse contains the response from method ResourceHealthMetadataClient.ListBySiteSlot. -type ResourceHealthMetadataClientListBySiteSlotResponse struct { - ResourceHealthMetadataCollection -} - -// ResourceHealthMetadataClientListResponse contains the response from method ResourceHealthMetadataClient.List. -type ResourceHealthMetadataClientListResponse struct { - ResourceHealthMetadataCollection -} - -// StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse contains the response from method StaticSitesClient.ApproveOrRejectPrivateEndpointConnection. -type StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse struct { - RemotePrivateEndpointConnectionARMResource -} - -// StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteAppSettings. -type StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse struct { - StringDictionary -} - -// StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings. -type StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse struct { - StringDictionary -} - -// StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings. -type StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse struct { - StringDictionary -} - -// StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteCustomDomain. -type StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse struct { - StaticSiteCustomDomainOverviewARMResource -} - -// StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings. -type StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse struct { - StringDictionary -} - -// StaticSitesClientCreateOrUpdateStaticSiteResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSite. -type StaticSitesClientCreateOrUpdateStaticSiteResponse struct { - StaticSiteARMResource -} - -// StaticSitesClientCreateUserRolesInvitationLinkResponse contains the response from method StaticSitesClient.CreateUserRolesInvitationLink. -type StaticSitesClientCreateUserRolesInvitationLinkResponse struct { - StaticSiteUserInvitationResponseResource -} - -// StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse contains the response from method StaticSitesClient.CreateZipDeploymentForStaticSiteBuild. -type StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse struct { - // placeholder for future response values -} - -// StaticSitesClientCreateZipDeploymentForStaticSiteResponse contains the response from method StaticSitesClient.CreateZipDeploymentForStaticSite. -type StaticSitesClientCreateZipDeploymentForStaticSiteResponse struct { - // placeholder for future response values -} - -// StaticSitesClientDeletePrivateEndpointConnectionResponse contains the response from method StaticSitesClient.DeletePrivateEndpointConnection. -type StaticSitesClientDeletePrivateEndpointConnectionResponse struct { - // Anything - Interface interface{} -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticSitesClientDeletePrivateEndpointConnectionResponse. -func (s *StaticSitesClientDeletePrivateEndpointConnectionResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &s.Interface) -} - -// StaticSitesClientDeleteStaticSiteBuildResponse contains the response from method StaticSitesClient.DeleteStaticSiteBuild. -type StaticSitesClientDeleteStaticSiteBuildResponse struct { - // placeholder for future response values -} - -// StaticSitesClientDeleteStaticSiteCustomDomainResponse contains the response from method StaticSitesClient.DeleteStaticSiteCustomDomain. -type StaticSitesClientDeleteStaticSiteCustomDomainResponse struct { - // placeholder for future response values -} - -// StaticSitesClientDeleteStaticSiteResponse contains the response from method StaticSitesClient.DeleteStaticSite. -type StaticSitesClientDeleteStaticSiteResponse struct { - // placeholder for future response values -} - -// StaticSitesClientDeleteStaticSiteUserResponse contains the response from method StaticSitesClient.DeleteStaticSiteUser. -type StaticSitesClientDeleteStaticSiteUserResponse struct { - // placeholder for future response values -} - -// StaticSitesClientDetachStaticSiteResponse contains the response from method StaticSitesClient.DetachStaticSite. -type StaticSitesClientDetachStaticSiteResponse struct { - // placeholder for future response values -} - -// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse contains the response from method StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild. -type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse struct { - // placeholder for future response values -} - -// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse contains the response from method StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite. -type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse struct { - // placeholder for future response values -} - -// StaticSitesClientGetPrivateEndpointConnectionListResponse contains the response from method StaticSitesClient.GetPrivateEndpointConnectionList. -type StaticSitesClientGetPrivateEndpointConnectionListResponse struct { - PrivateEndpointConnectionCollection -} - -// StaticSitesClientGetPrivateEndpointConnectionResponse contains the response from method StaticSitesClient.GetPrivateEndpointConnection. -type StaticSitesClientGetPrivateEndpointConnectionResponse struct { - RemotePrivateEndpointConnectionARMResource -} - -// StaticSitesClientGetPrivateLinkResourcesResponse contains the response from method StaticSitesClient.GetPrivateLinkResources. -type StaticSitesClientGetPrivateLinkResourcesResponse struct { - PrivateLinkResourcesWrapper -} - -// StaticSitesClientGetStaticSiteBuildResponse contains the response from method StaticSitesClient.GetStaticSiteBuild. -type StaticSitesClientGetStaticSiteBuildResponse struct { - StaticSiteBuildARMResource -} - -// StaticSitesClientGetStaticSiteBuildsResponse contains the response from method StaticSitesClient.GetStaticSiteBuilds. -type StaticSitesClientGetStaticSiteBuildsResponse struct { - StaticSiteBuildCollection -} - -// StaticSitesClientGetStaticSiteCustomDomainResponse contains the response from method StaticSitesClient.GetStaticSiteCustomDomain. -type StaticSitesClientGetStaticSiteCustomDomainResponse struct { - StaticSiteCustomDomainOverviewARMResource -} - -// StaticSitesClientGetStaticSiteResponse contains the response from method StaticSitesClient.GetStaticSite. -type StaticSitesClientGetStaticSiteResponse struct { - StaticSiteARMResource -} - -// StaticSitesClientGetStaticSitesByResourceGroupResponse contains the response from method StaticSitesClient.GetStaticSitesByResourceGroup. -type StaticSitesClientGetStaticSitesByResourceGroupResponse struct { - StaticSiteCollection -} - -// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse contains the response from method StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild. -type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse struct { - StaticSiteUserProvidedFunctionAppARMResource -} - -// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse contains the response from method StaticSitesClient.GetUserProvidedFunctionAppForStaticSite. -type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse struct { - StaticSiteUserProvidedFunctionAppARMResource -} - -// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse contains the response from method StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild. -type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse struct { - StaticSiteUserProvidedFunctionAppsCollection -} - -// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse contains the response from method StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite. -type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse struct { - StaticSiteUserProvidedFunctionAppsCollection -} - -// StaticSitesClientListResponse contains the response from method StaticSitesClient.List. -type StaticSitesClientListResponse struct { - StaticSiteCollection -} - -// StaticSitesClientListStaticSiteAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteAppSettings. -type StaticSitesClientListStaticSiteAppSettingsResponse struct { - StringDictionary -} - -// StaticSitesClientListStaticSiteBuildAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteBuildAppSettings. -type StaticSitesClientListStaticSiteBuildAppSettingsResponse struct { - StringDictionary -} - -// StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteBuildFunctionAppSettings. -type StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse struct { - StringDictionary -} - -// StaticSitesClientListStaticSiteBuildFunctionsResponse contains the response from method StaticSitesClient.ListStaticSiteBuildFunctions. -type StaticSitesClientListStaticSiteBuildFunctionsResponse struct { - StaticSiteFunctionOverviewCollection -} - -// StaticSitesClientListStaticSiteConfiguredRolesResponse contains the response from method StaticSitesClient.ListStaticSiteConfiguredRoles. -type StaticSitesClientListStaticSiteConfiguredRolesResponse struct { - StringList -} - -// StaticSitesClientListStaticSiteCustomDomainsResponse contains the response from method StaticSitesClient.ListStaticSiteCustomDomains. -type StaticSitesClientListStaticSiteCustomDomainsResponse struct { - StaticSiteCustomDomainOverviewCollection -} - -// StaticSitesClientListStaticSiteFunctionAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteFunctionAppSettings. -type StaticSitesClientListStaticSiteFunctionAppSettingsResponse struct { - StringDictionary -} - -// StaticSitesClientListStaticSiteFunctionsResponse contains the response from method StaticSitesClient.ListStaticSiteFunctions. -type StaticSitesClientListStaticSiteFunctionsResponse struct { - StaticSiteFunctionOverviewCollection -} - -// StaticSitesClientListStaticSiteSecretsResponse contains the response from method StaticSitesClient.ListStaticSiteSecrets. -type StaticSitesClientListStaticSiteSecretsResponse struct { - StringDictionary -} - -// StaticSitesClientListStaticSiteUsersResponse contains the response from method StaticSitesClient.ListStaticSiteUsers. -type StaticSitesClientListStaticSiteUsersResponse struct { - StaticSiteUserCollection -} - -// StaticSitesClientPreviewWorkflowResponse contains the response from method StaticSitesClient.PreviewWorkflow. -type StaticSitesClientPreviewWorkflowResponse struct { - StaticSitesWorkflowPreview -} - -// StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse contains the response from method StaticSitesClient.RegisterUserProvidedFunctionAppWithStaticSiteBuild. -type StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse struct { - StaticSiteUserProvidedFunctionAppARMResource -} - -// StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse contains the response from method StaticSitesClient.RegisterUserProvidedFunctionAppWithStaticSite. -type StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse struct { - StaticSiteUserProvidedFunctionAppARMResource -} - -// StaticSitesClientResetStaticSiteAPIKeyResponse contains the response from method StaticSitesClient.ResetStaticSiteAPIKey. -type StaticSitesClientResetStaticSiteAPIKeyResponse struct { - // placeholder for future response values -} - -// StaticSitesClientUpdateStaticSiteResponse contains the response from method StaticSitesClient.UpdateStaticSite. -type StaticSitesClientUpdateStaticSiteResponse struct { - StaticSiteARMResource -} - -// StaticSitesClientUpdateStaticSiteUserResponse contains the response from method StaticSitesClient.UpdateStaticSiteUser. -type StaticSitesClientUpdateStaticSiteUserResponse struct { - StaticSiteUserARMResource -} - -// StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse contains the response from method StaticSitesClient.ValidateCustomDomainCanBeAddedToStaticSite. -type StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse struct { - // placeholder for future response values -} - -// TopLevelDomainsClientGetResponse contains the response from method TopLevelDomainsClient.Get. -type TopLevelDomainsClientGetResponse struct { - TopLevelDomain -} - -// TopLevelDomainsClientListAgreementsResponse contains the response from method TopLevelDomainsClient.ListAgreements. -type TopLevelDomainsClientListAgreementsResponse struct { - TldLegalAgreementCollection -} - -// TopLevelDomainsClientListResponse contains the response from method TopLevelDomainsClient.List. -type TopLevelDomainsClientListResponse struct { - TopLevelDomainCollection -} - -// WebAppsClientAddPremierAddOnResponse contains the response from method WebAppsClient.AddPremierAddOn. -type WebAppsClientAddPremierAddOnResponse struct { - PremierAddOn -} - -// WebAppsClientAddPremierAddOnSlotResponse contains the response from method WebAppsClient.AddPremierAddOnSlot. -type WebAppsClientAddPremierAddOnSlotResponse struct { - PremierAddOn -} - -// WebAppsClientAnalyzeCustomHostnameResponse contains the response from method WebAppsClient.AnalyzeCustomHostname. -type WebAppsClientAnalyzeCustomHostnameResponse struct { - CustomHostnameAnalysisResult -} - -// WebAppsClientAnalyzeCustomHostnameSlotResponse contains the response from method WebAppsClient.AnalyzeCustomHostnameSlot. -type WebAppsClientAnalyzeCustomHostnameSlotResponse struct { - CustomHostnameAnalysisResult -} - -// WebAppsClientApplySlotConfigToProductionResponse contains the response from method WebAppsClient.ApplySlotConfigToProduction. -type WebAppsClientApplySlotConfigToProductionResponse struct { - // placeholder for future response values -} - -// WebAppsClientApplySlotConfigurationSlotResponse contains the response from method WebAppsClient.ApplySlotConfigurationSlot. -type WebAppsClientApplySlotConfigurationSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse contains the response from method WebAppsClient.ApproveOrRejectPrivateEndpointConnection. -type WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse struct { - RemotePrivateEndpointConnectionARMResource -} - -// WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse contains the response from method WebAppsClient.ApproveOrRejectPrivateEndpointConnectionSlot. -type WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse struct { - RemotePrivateEndpointConnectionARMResource -} - -// WebAppsClientBackupResponse contains the response from method WebAppsClient.Backup. -type WebAppsClientBackupResponse struct { - BackupItem -} - -// WebAppsClientBackupSlotResponse contains the response from method WebAppsClient.BackupSlot. -type WebAppsClientBackupSlotResponse struct { - BackupItem -} - -// WebAppsClientCreateDeploymentResponse contains the response from method WebAppsClient.CreateDeployment. -type WebAppsClientCreateDeploymentResponse struct { - Deployment -} - -// WebAppsClientCreateDeploymentSlotResponse contains the response from method WebAppsClient.CreateDeploymentSlot. -type WebAppsClientCreateDeploymentSlotResponse struct { - Deployment -} - -// WebAppsClientCreateFunctionResponse contains the response from method WebAppsClient.CreateFunction. -type WebAppsClientCreateFunctionResponse struct { - FunctionEnvelope -} - -// WebAppsClientCreateInstanceFunctionSlotResponse contains the response from method WebAppsClient.CreateInstanceFunctionSlot. -type WebAppsClientCreateInstanceFunctionSlotResponse struct { - FunctionEnvelope -} - -// WebAppsClientCreateInstanceMSDeployOperationResponse contains the response from method WebAppsClient.CreateInstanceMSDeployOperation. -type WebAppsClientCreateInstanceMSDeployOperationResponse struct { - MSDeployStatus -} - -// WebAppsClientCreateInstanceMSDeployOperationSlotResponse contains the response from method WebAppsClient.CreateInstanceMSDeployOperationSlot. -type WebAppsClientCreateInstanceMSDeployOperationSlotResponse struct { - MSDeployStatus -} - -// WebAppsClientCreateMSDeployOperationResponse contains the response from method WebAppsClient.CreateMSDeployOperation. -type WebAppsClientCreateMSDeployOperationResponse struct { - MSDeployStatus -} - -// WebAppsClientCreateMSDeployOperationSlotResponse contains the response from method WebAppsClient.CreateMSDeployOperationSlot. -type WebAppsClientCreateMSDeployOperationSlotResponse struct { - MSDeployStatus -} - -// WebAppsClientCreateOneDeployOperationResponse contains the response from method WebAppsClient.CreateOneDeployOperation. -type WebAppsClientCreateOneDeployOperationResponse struct { - // Anything - Interface interface{} -} - -// WebAppsClientCreateOrUpdateConfigurationResponse contains the response from method WebAppsClient.CreateOrUpdateConfiguration. -type WebAppsClientCreateOrUpdateConfigurationResponse struct { - SiteConfigResource -} - -// WebAppsClientCreateOrUpdateConfigurationSlotResponse contains the response from method WebAppsClient.CreateOrUpdateConfigurationSlot. -type WebAppsClientCreateOrUpdateConfigurationSlotResponse struct { - SiteConfigResource -} - -// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier. -type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse struct { - Identifier -} - -// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot. -type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse struct { - Identifier -} - -// WebAppsClientCreateOrUpdateFunctionSecretResponse contains the response from method WebAppsClient.CreateOrUpdateFunctionSecret. -type WebAppsClientCreateOrUpdateFunctionSecretResponse struct { - KeyInfo -} - -// WebAppsClientCreateOrUpdateFunctionSecretSlotResponse contains the response from method WebAppsClient.CreateOrUpdateFunctionSecretSlot. -type WebAppsClientCreateOrUpdateFunctionSecretSlotResponse struct { - KeyInfo -} - -// WebAppsClientCreateOrUpdateHostNameBindingResponse contains the response from method WebAppsClient.CreateOrUpdateHostNameBinding. -type WebAppsClientCreateOrUpdateHostNameBindingResponse struct { - HostNameBinding -} - -// WebAppsClientCreateOrUpdateHostNameBindingSlotResponse contains the response from method WebAppsClient.CreateOrUpdateHostNameBindingSlot. -type WebAppsClientCreateOrUpdateHostNameBindingSlotResponse struct { - HostNameBinding -} - -// WebAppsClientCreateOrUpdateHostSecretResponse contains the response from method WebAppsClient.CreateOrUpdateHostSecret. -type WebAppsClientCreateOrUpdateHostSecretResponse struct { - KeyInfo -} - -// WebAppsClientCreateOrUpdateHostSecretSlotResponse contains the response from method WebAppsClient.CreateOrUpdateHostSecretSlot. -type WebAppsClientCreateOrUpdateHostSecretSlotResponse struct { - KeyInfo -} - -// WebAppsClientCreateOrUpdateHybridConnectionResponse contains the response from method WebAppsClient.CreateOrUpdateHybridConnection. -type WebAppsClientCreateOrUpdateHybridConnectionResponse struct { - HybridConnection -} - -// WebAppsClientCreateOrUpdateHybridConnectionSlotResponse contains the response from method WebAppsClient.CreateOrUpdateHybridConnectionSlot. -type WebAppsClientCreateOrUpdateHybridConnectionSlotResponse struct { - HybridConnection -} - -// WebAppsClientCreateOrUpdatePublicCertificateResponse contains the response from method WebAppsClient.CreateOrUpdatePublicCertificate. -type WebAppsClientCreateOrUpdatePublicCertificateResponse struct { - PublicCertificate -} - -// WebAppsClientCreateOrUpdatePublicCertificateSlotResponse contains the response from method WebAppsClient.CreateOrUpdatePublicCertificateSlot. -type WebAppsClientCreateOrUpdatePublicCertificateSlotResponse struct { - PublicCertificate -} - -// WebAppsClientCreateOrUpdateRelayServiceConnectionResponse contains the response from method WebAppsClient.CreateOrUpdateRelayServiceConnection. -type WebAppsClientCreateOrUpdateRelayServiceConnectionResponse struct { - RelayServiceConnectionEntity -} - -// WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot. -type WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse struct { - RelayServiceConnectionEntity -} - -// WebAppsClientCreateOrUpdateResponse contains the response from method WebAppsClient.CreateOrUpdate. -type WebAppsClientCreateOrUpdateResponse struct { - Site -} - -// WebAppsClientCreateOrUpdateSlotResponse contains the response from method WebAppsClient.CreateOrUpdateSlot. -type WebAppsClientCreateOrUpdateSlotResponse struct { - Site -} - -// WebAppsClientCreateOrUpdateSourceControlResponse contains the response from method WebAppsClient.CreateOrUpdateSourceControl. -type WebAppsClientCreateOrUpdateSourceControlResponse struct { - SiteSourceControl -} - -// WebAppsClientCreateOrUpdateSourceControlSlotResponse contains the response from method WebAppsClient.CreateOrUpdateSourceControlSlot. -type WebAppsClientCreateOrUpdateSourceControlSlotResponse struct { - SiteSourceControl -} - -// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse contains the response from method WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck. -type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse struct { - SwiftVirtualNetwork -} - -// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse contains the response from method WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot. -type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse struct { - SwiftVirtualNetwork -} - -// WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnectionGateway. -type WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse struct { - VnetGateway -} - -// WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot. -type WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse struct { - VnetGateway -} - -// WebAppsClientCreateOrUpdateVnetConnectionResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnection. -type WebAppsClientCreateOrUpdateVnetConnectionResponse struct { - VnetInfoResource -} - -// WebAppsClientCreateOrUpdateVnetConnectionSlotResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnectionSlot. -type WebAppsClientCreateOrUpdateVnetConnectionSlotResponse struct { - VnetInfoResource -} - -// WebAppsClientDeleteBackupConfigurationResponse contains the response from method WebAppsClient.DeleteBackupConfiguration. -type WebAppsClientDeleteBackupConfigurationResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteBackupConfigurationSlotResponse contains the response from method WebAppsClient.DeleteBackupConfigurationSlot. -type WebAppsClientDeleteBackupConfigurationSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteBackupResponse contains the response from method WebAppsClient.DeleteBackup. -type WebAppsClientDeleteBackupResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteBackupSlotResponse contains the response from method WebAppsClient.DeleteBackupSlot. -type WebAppsClientDeleteBackupSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteContinuousWebJobResponse contains the response from method WebAppsClient.DeleteContinuousWebJob. -type WebAppsClientDeleteContinuousWebJobResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteContinuousWebJobSlotResponse contains the response from method WebAppsClient.DeleteContinuousWebJobSlot. -type WebAppsClientDeleteContinuousWebJobSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteDeploymentResponse contains the response from method WebAppsClient.DeleteDeployment. -type WebAppsClientDeleteDeploymentResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteDeploymentSlotResponse contains the response from method WebAppsClient.DeleteDeploymentSlot. -type WebAppsClientDeleteDeploymentSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.DeleteDomainOwnershipIdentifier. -type WebAppsClientDeleteDomainOwnershipIdentifierResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.DeleteDomainOwnershipIdentifierSlot. -type WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteFunctionResponse contains the response from method WebAppsClient.DeleteFunction. -type WebAppsClientDeleteFunctionResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteFunctionSecretResponse contains the response from method WebAppsClient.DeleteFunctionSecret. -type WebAppsClientDeleteFunctionSecretResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteFunctionSecretSlotResponse contains the response from method WebAppsClient.DeleteFunctionSecretSlot. -type WebAppsClientDeleteFunctionSecretSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteHostNameBindingResponse contains the response from method WebAppsClient.DeleteHostNameBinding. -type WebAppsClientDeleteHostNameBindingResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteHostNameBindingSlotResponse contains the response from method WebAppsClient.DeleteHostNameBindingSlot. -type WebAppsClientDeleteHostNameBindingSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteHostSecretResponse contains the response from method WebAppsClient.DeleteHostSecret. -type WebAppsClientDeleteHostSecretResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteHostSecretSlotResponse contains the response from method WebAppsClient.DeleteHostSecretSlot. -type WebAppsClientDeleteHostSecretSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteHybridConnectionResponse contains the response from method WebAppsClient.DeleteHybridConnection. -type WebAppsClientDeleteHybridConnectionResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteHybridConnectionSlotResponse contains the response from method WebAppsClient.DeleteHybridConnectionSlot. -type WebAppsClientDeleteHybridConnectionSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteInstanceFunctionSlotResponse contains the response from method WebAppsClient.DeleteInstanceFunctionSlot. -type WebAppsClientDeleteInstanceFunctionSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteInstanceProcessResponse contains the response from method WebAppsClient.DeleteInstanceProcess. -type WebAppsClientDeleteInstanceProcessResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteInstanceProcessSlotResponse contains the response from method WebAppsClient.DeleteInstanceProcessSlot. -type WebAppsClientDeleteInstanceProcessSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeletePremierAddOnResponse contains the response from method WebAppsClient.DeletePremierAddOn. -type WebAppsClientDeletePremierAddOnResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeletePremierAddOnSlotResponse contains the response from method WebAppsClient.DeletePremierAddOnSlot. -type WebAppsClientDeletePremierAddOnSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeletePrivateEndpointConnectionResponse contains the response from method WebAppsClient.DeletePrivateEndpointConnection. -type WebAppsClientDeletePrivateEndpointConnectionResponse struct { - // Anything - Interface interface{} -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientDeletePrivateEndpointConnectionResponse. -func (w *WebAppsClientDeletePrivateEndpointConnectionResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &w.Interface) -} - -// WebAppsClientDeletePrivateEndpointConnectionSlotResponse contains the response from method WebAppsClient.DeletePrivateEndpointConnectionSlot. -type WebAppsClientDeletePrivateEndpointConnectionSlotResponse struct { - // Anything - Interface interface{} -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientDeletePrivateEndpointConnectionSlotResponse. -func (w *WebAppsClientDeletePrivateEndpointConnectionSlotResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &w.Interface) -} - -// WebAppsClientDeleteProcessResponse contains the response from method WebAppsClient.DeleteProcess. -type WebAppsClientDeleteProcessResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteProcessSlotResponse contains the response from method WebAppsClient.DeleteProcessSlot. -type WebAppsClientDeleteProcessSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeletePublicCertificateResponse contains the response from method WebAppsClient.DeletePublicCertificate. -type WebAppsClientDeletePublicCertificateResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeletePublicCertificateSlotResponse contains the response from method WebAppsClient.DeletePublicCertificateSlot. -type WebAppsClientDeletePublicCertificateSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteRelayServiceConnectionResponse contains the response from method WebAppsClient.DeleteRelayServiceConnection. -type WebAppsClientDeleteRelayServiceConnectionResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.DeleteRelayServiceConnectionSlot. -type WebAppsClientDeleteRelayServiceConnectionSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteResponse contains the response from method WebAppsClient.Delete. -type WebAppsClientDeleteResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteSiteExtensionResponse contains the response from method WebAppsClient.DeleteSiteExtension. -type WebAppsClientDeleteSiteExtensionResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteSiteExtensionSlotResponse contains the response from method WebAppsClient.DeleteSiteExtensionSlot. -type WebAppsClientDeleteSiteExtensionSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteSlotResponse contains the response from method WebAppsClient.DeleteSlot. -type WebAppsClientDeleteSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteSourceControlResponse contains the response from method WebAppsClient.DeleteSourceControl. -type WebAppsClientDeleteSourceControlResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteSourceControlSlotResponse contains the response from method WebAppsClient.DeleteSourceControlSlot. -type WebAppsClientDeleteSourceControlSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteSwiftVirtualNetworkResponse contains the response from method WebAppsClient.DeleteSwiftVirtualNetwork. -type WebAppsClientDeleteSwiftVirtualNetworkResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteSwiftVirtualNetworkSlotResponse contains the response from method WebAppsClient.DeleteSwiftVirtualNetworkSlot. -type WebAppsClientDeleteSwiftVirtualNetworkSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteTriggeredWebJobResponse contains the response from method WebAppsClient.DeleteTriggeredWebJob. -type WebAppsClientDeleteTriggeredWebJobResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteTriggeredWebJobSlotResponse contains the response from method WebAppsClient.DeleteTriggeredWebJobSlot. -type WebAppsClientDeleteTriggeredWebJobSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteVnetConnectionResponse contains the response from method WebAppsClient.DeleteVnetConnection. -type WebAppsClientDeleteVnetConnectionResponse struct { - // placeholder for future response values -} - -// WebAppsClientDeleteVnetConnectionSlotResponse contains the response from method WebAppsClient.DeleteVnetConnectionSlot. -type WebAppsClientDeleteVnetConnectionSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientDiscoverBackupResponse contains the response from method WebAppsClient.DiscoverBackup. -type WebAppsClientDiscoverBackupResponse struct { - RestoreRequest -} - -// WebAppsClientDiscoverBackupSlotResponse contains the response from method WebAppsClient.DiscoverBackupSlot. -type WebAppsClientDiscoverBackupSlotResponse struct { - RestoreRequest -} - -// WebAppsClientGenerateNewSitePublishingPasswordResponse contains the response from method WebAppsClient.GenerateNewSitePublishingPassword. -type WebAppsClientGenerateNewSitePublishingPasswordResponse struct { - // placeholder for future response values -} - -// WebAppsClientGenerateNewSitePublishingPasswordSlotResponse contains the response from method WebAppsClient.GenerateNewSitePublishingPasswordSlot. -type WebAppsClientGenerateNewSitePublishingPasswordSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientGetAppSettingKeyVaultReferenceResponse contains the response from method WebAppsClient.GetAppSettingKeyVaultReference. -type WebAppsClientGetAppSettingKeyVaultReferenceResponse struct { - APIKVReference -} - -// WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse contains the response from method WebAppsClient.GetAppSettingKeyVaultReferenceSlot. -type WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse struct { - APIKVReference -} - -// WebAppsClientGetAppSettingsKeyVaultReferencesResponse contains the response from method WebAppsClient.GetAppSettingsKeyVaultReferences. -type WebAppsClientGetAppSettingsKeyVaultReferencesResponse struct { - APIKVReferenceCollection -} - -// WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse contains the response from method WebAppsClient.GetAppSettingsKeyVaultReferencesSlot. -type WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse struct { - APIKVReferenceCollection -} - -// WebAppsClientGetAuthSettingsResponse contains the response from method WebAppsClient.GetAuthSettings. -type WebAppsClientGetAuthSettingsResponse struct { - SiteAuthSettings -} - -// WebAppsClientGetAuthSettingsSlotResponse contains the response from method WebAppsClient.GetAuthSettingsSlot. -type WebAppsClientGetAuthSettingsSlotResponse struct { - SiteAuthSettings -} - -// WebAppsClientGetAuthSettingsV2Response contains the response from method WebAppsClient.GetAuthSettingsV2. -type WebAppsClientGetAuthSettingsV2Response struct { - SiteAuthSettingsV2 -} - -// WebAppsClientGetAuthSettingsV2SlotResponse contains the response from method WebAppsClient.GetAuthSettingsV2Slot. -type WebAppsClientGetAuthSettingsV2SlotResponse struct { - SiteAuthSettingsV2 -} - -// WebAppsClientGetAuthSettingsV2WithoutSecretsResponse contains the response from method WebAppsClient.GetAuthSettingsV2WithoutSecrets. -type WebAppsClientGetAuthSettingsV2WithoutSecretsResponse struct { - SiteAuthSettingsV2 -} - -// WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse contains the response from method WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot. -type WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse struct { - SiteAuthSettingsV2 -} - -// WebAppsClientGetBackupConfigurationResponse contains the response from method WebAppsClient.GetBackupConfiguration. -type WebAppsClientGetBackupConfigurationResponse struct { - BackupRequest -} - -// WebAppsClientGetBackupConfigurationSlotResponse contains the response from method WebAppsClient.GetBackupConfigurationSlot. -type WebAppsClientGetBackupConfigurationSlotResponse struct { - BackupRequest -} - -// WebAppsClientGetBackupStatusResponse contains the response from method WebAppsClient.GetBackupStatus. -type WebAppsClientGetBackupStatusResponse struct { - BackupItem -} - -// WebAppsClientGetBackupStatusSlotResponse contains the response from method WebAppsClient.GetBackupStatusSlot. -type WebAppsClientGetBackupStatusSlotResponse struct { - BackupItem -} - -// WebAppsClientGetConfigurationResponse contains the response from method WebAppsClient.GetConfiguration. -type WebAppsClientGetConfigurationResponse struct { - SiteConfigResource -} - -// WebAppsClientGetConfigurationSlotResponse contains the response from method WebAppsClient.GetConfigurationSlot. -type WebAppsClientGetConfigurationSlotResponse struct { - SiteConfigResource -} - -// WebAppsClientGetConfigurationSnapshotResponse contains the response from method WebAppsClient.GetConfigurationSnapshot. -type WebAppsClientGetConfigurationSnapshotResponse struct { - SiteConfigResource -} - -// WebAppsClientGetConfigurationSnapshotSlotResponse contains the response from method WebAppsClient.GetConfigurationSnapshotSlot. -type WebAppsClientGetConfigurationSnapshotSlotResponse struct { - SiteConfigResource -} - -// WebAppsClientGetContainerLogsZipResponse contains the response from method WebAppsClient.GetContainerLogsZip. -type WebAppsClientGetContainerLogsZipResponse struct { - // Body contains the streaming response. - Body io.ReadCloser -} - -// WebAppsClientGetContainerLogsZipSlotResponse contains the response from method WebAppsClient.GetContainerLogsZipSlot. -type WebAppsClientGetContainerLogsZipSlotResponse struct { - // Body contains the streaming response. - Body io.ReadCloser -} - -// WebAppsClientGetContinuousWebJobResponse contains the response from method WebAppsClient.GetContinuousWebJob. -type WebAppsClientGetContinuousWebJobResponse struct { - ContinuousWebJob -} - -// WebAppsClientGetContinuousWebJobSlotResponse contains the response from method WebAppsClient.GetContinuousWebJobSlot. -type WebAppsClientGetContinuousWebJobSlotResponse struct { - ContinuousWebJob -} - -// WebAppsClientGetDeploymentResponse contains the response from method WebAppsClient.GetDeployment. -type WebAppsClientGetDeploymentResponse struct { - Deployment -} - -// WebAppsClientGetDeploymentSlotResponse contains the response from method WebAppsClient.GetDeploymentSlot. -type WebAppsClientGetDeploymentSlotResponse struct { - Deployment -} - -// WebAppsClientGetDiagnosticLogsConfigurationResponse contains the response from method WebAppsClient.GetDiagnosticLogsConfiguration. -type WebAppsClientGetDiagnosticLogsConfigurationResponse struct { - SiteLogsConfig -} - -// WebAppsClientGetDiagnosticLogsConfigurationSlotResponse contains the response from method WebAppsClient.GetDiagnosticLogsConfigurationSlot. -type WebAppsClientGetDiagnosticLogsConfigurationSlotResponse struct { - SiteLogsConfig -} - -// WebAppsClientGetDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.GetDomainOwnershipIdentifier. -type WebAppsClientGetDomainOwnershipIdentifierResponse struct { - Identifier -} - -// WebAppsClientGetDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.GetDomainOwnershipIdentifierSlot. -type WebAppsClientGetDomainOwnershipIdentifierSlotResponse struct { - Identifier -} - -// WebAppsClientGetFtpAllowedResponse contains the response from method WebAppsClient.GetFtpAllowed. -type WebAppsClientGetFtpAllowedResponse struct { - CsmPublishingCredentialsPoliciesEntity -} - -// WebAppsClientGetFtpAllowedSlotResponse contains the response from method WebAppsClient.GetFtpAllowedSlot. -type WebAppsClientGetFtpAllowedSlotResponse struct { - CsmPublishingCredentialsPoliciesEntity -} - -// WebAppsClientGetFunctionResponse contains the response from method WebAppsClient.GetFunction. -type WebAppsClientGetFunctionResponse struct { - FunctionEnvelope -} - -// WebAppsClientGetFunctionsAdminTokenResponse contains the response from method WebAppsClient.GetFunctionsAdminToken. -type WebAppsClientGetFunctionsAdminTokenResponse struct { - Value *string -} - -// WebAppsClientGetFunctionsAdminTokenSlotResponse contains the response from method WebAppsClient.GetFunctionsAdminTokenSlot. -type WebAppsClientGetFunctionsAdminTokenSlotResponse struct { - Value *string -} - -// WebAppsClientGetHostNameBindingResponse contains the response from method WebAppsClient.GetHostNameBinding. -type WebAppsClientGetHostNameBindingResponse struct { - HostNameBinding -} - -// WebAppsClientGetHostNameBindingSlotResponse contains the response from method WebAppsClient.GetHostNameBindingSlot. -type WebAppsClientGetHostNameBindingSlotResponse struct { - HostNameBinding -} - -// WebAppsClientGetHybridConnectionResponse contains the response from method WebAppsClient.GetHybridConnection. -type WebAppsClientGetHybridConnectionResponse struct { - HybridConnection -} - -// WebAppsClientGetHybridConnectionSlotResponse contains the response from method WebAppsClient.GetHybridConnectionSlot. -type WebAppsClientGetHybridConnectionSlotResponse struct { - HybridConnection -} - -// WebAppsClientGetInstanceFunctionSlotResponse contains the response from method WebAppsClient.GetInstanceFunctionSlot. -type WebAppsClientGetInstanceFunctionSlotResponse struct { - FunctionEnvelope -} - -// WebAppsClientGetInstanceInfoResponse contains the response from method WebAppsClient.GetInstanceInfo. -type WebAppsClientGetInstanceInfoResponse struct { - WebSiteInstanceStatus -} - -// WebAppsClientGetInstanceInfoSlotResponse contains the response from method WebAppsClient.GetInstanceInfoSlot. -type WebAppsClientGetInstanceInfoSlotResponse struct { - WebSiteInstanceStatus -} - -// WebAppsClientGetInstanceMSDeployLogResponse contains the response from method WebAppsClient.GetInstanceMSDeployLog. -type WebAppsClientGetInstanceMSDeployLogResponse struct { - MSDeployLog -} - -// WebAppsClientGetInstanceMSDeployLogSlotResponse contains the response from method WebAppsClient.GetInstanceMSDeployLogSlot. -type WebAppsClientGetInstanceMSDeployLogSlotResponse struct { - MSDeployLog -} - -// WebAppsClientGetInstanceMsDeployStatusResponse contains the response from method WebAppsClient.GetInstanceMsDeployStatus. -type WebAppsClientGetInstanceMsDeployStatusResponse struct { - MSDeployStatus -} - -// WebAppsClientGetInstanceMsDeployStatusSlotResponse contains the response from method WebAppsClient.GetInstanceMsDeployStatusSlot. -type WebAppsClientGetInstanceMsDeployStatusSlotResponse struct { - MSDeployStatus -} - -// WebAppsClientGetInstanceProcessDumpResponse contains the response from method WebAppsClient.GetInstanceProcessDump. -type WebAppsClientGetInstanceProcessDumpResponse struct { - // Body contains the streaming response. - Body io.ReadCloser -} - -// WebAppsClientGetInstanceProcessDumpSlotResponse contains the response from method WebAppsClient.GetInstanceProcessDumpSlot. -type WebAppsClientGetInstanceProcessDumpSlotResponse struct { - // Body contains the streaming response. - Body io.ReadCloser -} - -// WebAppsClientGetInstanceProcessModuleResponse contains the response from method WebAppsClient.GetInstanceProcessModule. -type WebAppsClientGetInstanceProcessModuleResponse struct { - ProcessModuleInfo -} - -// WebAppsClientGetInstanceProcessModuleSlotResponse contains the response from method WebAppsClient.GetInstanceProcessModuleSlot. -type WebAppsClientGetInstanceProcessModuleSlotResponse struct { - ProcessModuleInfo -} - -// WebAppsClientGetInstanceProcessResponse contains the response from method WebAppsClient.GetInstanceProcess. -type WebAppsClientGetInstanceProcessResponse struct { - ProcessInfo -} - -// WebAppsClientGetInstanceProcessSlotResponse contains the response from method WebAppsClient.GetInstanceProcessSlot. -type WebAppsClientGetInstanceProcessSlotResponse struct { - ProcessInfo -} - -// WebAppsClientGetMSDeployLogResponse contains the response from method WebAppsClient.GetMSDeployLog. -type WebAppsClientGetMSDeployLogResponse struct { - MSDeployLog -} - -// WebAppsClientGetMSDeployLogSlotResponse contains the response from method WebAppsClient.GetMSDeployLogSlot. -type WebAppsClientGetMSDeployLogSlotResponse struct { - MSDeployLog -} - -// WebAppsClientGetMSDeployStatusResponse contains the response from method WebAppsClient.GetMSDeployStatus. -type WebAppsClientGetMSDeployStatusResponse struct { - MSDeployStatus -} - -// WebAppsClientGetMSDeployStatusSlotResponse contains the response from method WebAppsClient.GetMSDeployStatusSlot. -type WebAppsClientGetMSDeployStatusSlotResponse struct { - MSDeployStatus -} - -// WebAppsClientGetMigrateMySQLStatusResponse contains the response from method WebAppsClient.GetMigrateMySQLStatus. -type WebAppsClientGetMigrateMySQLStatusResponse struct { - MigrateMySQLStatus -} - -// WebAppsClientGetMigrateMySQLStatusSlotResponse contains the response from method WebAppsClient.GetMigrateMySQLStatusSlot. -type WebAppsClientGetMigrateMySQLStatusSlotResponse struct { - MigrateMySQLStatus -} - -// WebAppsClientGetNetworkTraceOperationResponse contains the response from method WebAppsClient.GetNetworkTraceOperation. -type WebAppsClientGetNetworkTraceOperationResponse struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// WebAppsClientGetNetworkTraceOperationSlotResponse contains the response from method WebAppsClient.GetNetworkTraceOperationSlot. -type WebAppsClientGetNetworkTraceOperationSlotResponse struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// WebAppsClientGetNetworkTraceOperationSlotV2Response contains the response from method WebAppsClient.GetNetworkTraceOperationSlotV2. -type WebAppsClientGetNetworkTraceOperationSlotV2Response struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// WebAppsClientGetNetworkTraceOperationV2Response contains the response from method WebAppsClient.GetNetworkTraceOperationV2. -type WebAppsClientGetNetworkTraceOperationV2Response struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// WebAppsClientGetNetworkTracesResponse contains the response from method WebAppsClient.GetNetworkTraces. -type WebAppsClientGetNetworkTracesResponse struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// WebAppsClientGetNetworkTracesSlotResponse contains the response from method WebAppsClient.GetNetworkTracesSlot. -type WebAppsClientGetNetworkTracesSlotResponse struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// WebAppsClientGetNetworkTracesSlotV2Response contains the response from method WebAppsClient.GetNetworkTracesSlotV2. -type WebAppsClientGetNetworkTracesSlotV2Response struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// WebAppsClientGetNetworkTracesV2Response contains the response from method WebAppsClient.GetNetworkTracesV2. -type WebAppsClientGetNetworkTracesV2Response struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// WebAppsClientGetOneDeployStatusResponse contains the response from method WebAppsClient.GetOneDeployStatus. -type WebAppsClientGetOneDeployStatusResponse struct { - // Anything - Interface interface{} -} - -// WebAppsClientGetPremierAddOnResponse contains the response from method WebAppsClient.GetPremierAddOn. -type WebAppsClientGetPremierAddOnResponse struct { - PremierAddOn -} - -// WebAppsClientGetPremierAddOnSlotResponse contains the response from method WebAppsClient.GetPremierAddOnSlot. -type WebAppsClientGetPremierAddOnSlotResponse struct { - PremierAddOn -} - -// WebAppsClientGetPrivateAccessResponse contains the response from method WebAppsClient.GetPrivateAccess. -type WebAppsClientGetPrivateAccessResponse struct { - PrivateAccess -} - -// WebAppsClientGetPrivateAccessSlotResponse contains the response from method WebAppsClient.GetPrivateAccessSlot. -type WebAppsClientGetPrivateAccessSlotResponse struct { - PrivateAccess -} - -// WebAppsClientGetPrivateEndpointConnectionListResponse contains the response from method WebAppsClient.GetPrivateEndpointConnectionList. -type WebAppsClientGetPrivateEndpointConnectionListResponse struct { - PrivateEndpointConnectionCollection -} - -// WebAppsClientGetPrivateEndpointConnectionListSlotResponse contains the response from method WebAppsClient.GetPrivateEndpointConnectionListSlot. -type WebAppsClientGetPrivateEndpointConnectionListSlotResponse struct { - PrivateEndpointConnectionCollection -} - -// WebAppsClientGetPrivateEndpointConnectionResponse contains the response from method WebAppsClient.GetPrivateEndpointConnection. -type WebAppsClientGetPrivateEndpointConnectionResponse struct { - RemotePrivateEndpointConnectionARMResource -} - -// WebAppsClientGetPrivateEndpointConnectionSlotResponse contains the response from method WebAppsClient.GetPrivateEndpointConnectionSlot. -type WebAppsClientGetPrivateEndpointConnectionSlotResponse struct { - RemotePrivateEndpointConnectionARMResource -} - -// WebAppsClientGetPrivateLinkResourcesResponse contains the response from method WebAppsClient.GetPrivateLinkResources. -type WebAppsClientGetPrivateLinkResourcesResponse struct { - PrivateLinkResourcesWrapper -} - -// WebAppsClientGetPrivateLinkResourcesSlotResponse contains the response from method WebAppsClient.GetPrivateLinkResourcesSlot. -type WebAppsClientGetPrivateLinkResourcesSlotResponse struct { - PrivateLinkResourcesWrapper -} - -// WebAppsClientGetProcessDumpResponse contains the response from method WebAppsClient.GetProcessDump. -type WebAppsClientGetProcessDumpResponse struct { - // Body contains the streaming response. - Body io.ReadCloser -} - -// WebAppsClientGetProcessDumpSlotResponse contains the response from method WebAppsClient.GetProcessDumpSlot. -type WebAppsClientGetProcessDumpSlotResponse struct { - // Body contains the streaming response. - Body io.ReadCloser -} - -// WebAppsClientGetProcessModuleResponse contains the response from method WebAppsClient.GetProcessModule. -type WebAppsClientGetProcessModuleResponse struct { - ProcessModuleInfo -} - -// WebAppsClientGetProcessModuleSlotResponse contains the response from method WebAppsClient.GetProcessModuleSlot. -type WebAppsClientGetProcessModuleSlotResponse struct { - ProcessModuleInfo -} - -// WebAppsClientGetProcessResponse contains the response from method WebAppsClient.GetProcess. -type WebAppsClientGetProcessResponse struct { - ProcessInfo -} - -// WebAppsClientGetProcessSlotResponse contains the response from method WebAppsClient.GetProcessSlot. -type WebAppsClientGetProcessSlotResponse struct { - ProcessInfo -} - -// WebAppsClientGetPublicCertificateResponse contains the response from method WebAppsClient.GetPublicCertificate. -type WebAppsClientGetPublicCertificateResponse struct { - PublicCertificate -} - -// WebAppsClientGetPublicCertificateSlotResponse contains the response from method WebAppsClient.GetPublicCertificateSlot. -type WebAppsClientGetPublicCertificateSlotResponse struct { - PublicCertificate -} - -// WebAppsClientGetRelayServiceConnectionResponse contains the response from method WebAppsClient.GetRelayServiceConnection. -type WebAppsClientGetRelayServiceConnectionResponse struct { - RelayServiceConnectionEntity -} - -// WebAppsClientGetRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.GetRelayServiceConnectionSlot. -type WebAppsClientGetRelayServiceConnectionSlotResponse struct { - RelayServiceConnectionEntity -} - -// WebAppsClientGetResponse contains the response from method WebAppsClient.Get. -type WebAppsClientGetResponse struct { - Site -} - -// WebAppsClientGetScmAllowedResponse contains the response from method WebAppsClient.GetScmAllowed. -type WebAppsClientGetScmAllowedResponse struct { - CsmPublishingCredentialsPoliciesEntity -} - -// WebAppsClientGetScmAllowedSlotResponse contains the response from method WebAppsClient.GetScmAllowedSlot. -type WebAppsClientGetScmAllowedSlotResponse struct { - CsmPublishingCredentialsPoliciesEntity -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse contains the response from method WebAppsClient.GetSiteConnectionStringKeyVaultReference. -type WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse struct { - APIKVReference -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse contains the response from method WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot. -type WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse struct { - APIKVReference -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse contains the response from method WebAppsClient.GetSiteConnectionStringKeyVaultReferences. -type WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse struct { - APIKVReferenceCollection -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse contains the response from method WebAppsClient.GetSiteConnectionStringKeyVaultReferencesSlot. -type WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse struct { - APIKVReferenceCollection -} - -// WebAppsClientGetSiteExtensionResponse contains the response from method WebAppsClient.GetSiteExtension. -type WebAppsClientGetSiteExtensionResponse struct { - SiteExtensionInfo -} - -// WebAppsClientGetSiteExtensionSlotResponse contains the response from method WebAppsClient.GetSiteExtensionSlot. -type WebAppsClientGetSiteExtensionSlotResponse struct { - SiteExtensionInfo -} - -// WebAppsClientGetSitePhpErrorLogFlagResponse contains the response from method WebAppsClient.GetSitePhpErrorLogFlag. -type WebAppsClientGetSitePhpErrorLogFlagResponse struct { - SitePhpErrorLogFlag -} - -// WebAppsClientGetSitePhpErrorLogFlagSlotResponse contains the response from method WebAppsClient.GetSitePhpErrorLogFlagSlot. -type WebAppsClientGetSitePhpErrorLogFlagSlotResponse struct { - SitePhpErrorLogFlag -} - -// WebAppsClientGetSlotResponse contains the response from method WebAppsClient.GetSlot. -type WebAppsClientGetSlotResponse struct { - Site -} - -// WebAppsClientGetSourceControlResponse contains the response from method WebAppsClient.GetSourceControl. -type WebAppsClientGetSourceControlResponse struct { - SiteSourceControl -} - -// WebAppsClientGetSourceControlSlotResponse contains the response from method WebAppsClient.GetSourceControlSlot. -type WebAppsClientGetSourceControlSlotResponse struct { - SiteSourceControl -} - -// WebAppsClientGetSwiftVirtualNetworkConnectionResponse contains the response from method WebAppsClient.GetSwiftVirtualNetworkConnection. -type WebAppsClientGetSwiftVirtualNetworkConnectionResponse struct { - SwiftVirtualNetwork -} - -// WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse contains the response from method WebAppsClient.GetSwiftVirtualNetworkConnectionSlot. -type WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse struct { - SwiftVirtualNetwork -} - -// WebAppsClientGetTriggeredWebJobHistoryResponse contains the response from method WebAppsClient.GetTriggeredWebJobHistory. -type WebAppsClientGetTriggeredWebJobHistoryResponse struct { - TriggeredJobHistory -} - -// WebAppsClientGetTriggeredWebJobHistorySlotResponse contains the response from method WebAppsClient.GetTriggeredWebJobHistorySlot. -type WebAppsClientGetTriggeredWebJobHistorySlotResponse struct { - TriggeredJobHistory -} - -// WebAppsClientGetTriggeredWebJobResponse contains the response from method WebAppsClient.GetTriggeredWebJob. -type WebAppsClientGetTriggeredWebJobResponse struct { - TriggeredWebJob -} - -// WebAppsClientGetTriggeredWebJobSlotResponse contains the response from method WebAppsClient.GetTriggeredWebJobSlot. -type WebAppsClientGetTriggeredWebJobSlotResponse struct { - TriggeredWebJob -} - -// WebAppsClientGetVnetConnectionGatewayResponse contains the response from method WebAppsClient.GetVnetConnectionGateway. -type WebAppsClientGetVnetConnectionGatewayResponse struct { - VnetGateway -} - -// WebAppsClientGetVnetConnectionGatewaySlotResponse contains the response from method WebAppsClient.GetVnetConnectionGatewaySlot. -type WebAppsClientGetVnetConnectionGatewaySlotResponse struct { - VnetGateway -} - -// WebAppsClientGetVnetConnectionResponse contains the response from method WebAppsClient.GetVnetConnection. -type WebAppsClientGetVnetConnectionResponse struct { - VnetInfoResource -} - -// WebAppsClientGetVnetConnectionSlotResponse contains the response from method WebAppsClient.GetVnetConnectionSlot. -type WebAppsClientGetVnetConnectionSlotResponse struct { - VnetInfoResource -} - -// WebAppsClientGetWebJobResponse contains the response from method WebAppsClient.GetWebJob. -type WebAppsClientGetWebJobResponse struct { - WebJob -} - -// WebAppsClientGetWebJobSlotResponse contains the response from method WebAppsClient.GetWebJobSlot. -type WebAppsClientGetWebJobSlotResponse struct { - WebJob -} - -// WebAppsClientGetWebSiteContainerLogsResponse contains the response from method WebAppsClient.GetWebSiteContainerLogs. -type WebAppsClientGetWebSiteContainerLogsResponse struct { - // Body contains the streaming response. - Body io.ReadCloser -} - -// WebAppsClientGetWebSiteContainerLogsSlotResponse contains the response from method WebAppsClient.GetWebSiteContainerLogsSlot. -type WebAppsClientGetWebSiteContainerLogsSlotResponse struct { - // Body contains the streaming response. - Body io.ReadCloser -} - -// WebAppsClientInstallSiteExtensionResponse contains the response from method WebAppsClient.InstallSiteExtension. -type WebAppsClientInstallSiteExtensionResponse struct { - SiteExtensionInfo -} - -// WebAppsClientInstallSiteExtensionSlotResponse contains the response from method WebAppsClient.InstallSiteExtensionSlot. -type WebAppsClientInstallSiteExtensionSlotResponse struct { - SiteExtensionInfo -} - -// WebAppsClientIsCloneableResponse contains the response from method WebAppsClient.IsCloneable. -type WebAppsClientIsCloneableResponse struct { - SiteCloneability -} - -// WebAppsClientIsCloneableSlotResponse contains the response from method WebAppsClient.IsCloneableSlot. -type WebAppsClientIsCloneableSlotResponse struct { - SiteCloneability -} - -// WebAppsClientListApplicationSettingsResponse contains the response from method WebAppsClient.ListApplicationSettings. -type WebAppsClientListApplicationSettingsResponse struct { - StringDictionary -} - -// WebAppsClientListApplicationSettingsSlotResponse contains the response from method WebAppsClient.ListApplicationSettingsSlot. -type WebAppsClientListApplicationSettingsSlotResponse struct { - StringDictionary -} - -// WebAppsClientListAzureStorageAccountsResponse contains the response from method WebAppsClient.ListAzureStorageAccounts. -type WebAppsClientListAzureStorageAccountsResponse struct { - AzureStoragePropertyDictionaryResource -} - -// WebAppsClientListAzureStorageAccountsSlotResponse contains the response from method WebAppsClient.ListAzureStorageAccountsSlot. -type WebAppsClientListAzureStorageAccountsSlotResponse struct { - AzureStoragePropertyDictionaryResource -} - -// WebAppsClientListBackupStatusSecretsResponse contains the response from method WebAppsClient.ListBackupStatusSecrets. -type WebAppsClientListBackupStatusSecretsResponse struct { - BackupItem -} - -// WebAppsClientListBackupStatusSecretsSlotResponse contains the response from method WebAppsClient.ListBackupStatusSecretsSlot. -type WebAppsClientListBackupStatusSecretsSlotResponse struct { - BackupItem -} - -// WebAppsClientListBackupsResponse contains the response from method WebAppsClient.ListBackups. -type WebAppsClientListBackupsResponse struct { - BackupItemCollection -} - -// WebAppsClientListBackupsSlotResponse contains the response from method WebAppsClient.ListBackupsSlot. -type WebAppsClientListBackupsSlotResponse struct { - BackupItemCollection -} - -// WebAppsClientListBasicPublishingCredentialsPoliciesResponse contains the response from method WebAppsClient.ListBasicPublishingCredentialsPolicies. -type WebAppsClientListBasicPublishingCredentialsPoliciesResponse struct { - PublishingCredentialsPoliciesCollection -} - -// WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse contains the response from method WebAppsClient.ListBasicPublishingCredentialsPoliciesSlot. -type WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse struct { - PublishingCredentialsPoliciesCollection -} - -// WebAppsClientListByResourceGroupResponse contains the response from method WebAppsClient.ListByResourceGroup. -type WebAppsClientListByResourceGroupResponse struct { - WebAppCollection -} - -// WebAppsClientListConfigurationSnapshotInfoResponse contains the response from method WebAppsClient.ListConfigurationSnapshotInfo. -type WebAppsClientListConfigurationSnapshotInfoResponse struct { - SiteConfigurationSnapshotInfoCollection -} - -// WebAppsClientListConfigurationSnapshotInfoSlotResponse contains the response from method WebAppsClient.ListConfigurationSnapshotInfoSlot. -type WebAppsClientListConfigurationSnapshotInfoSlotResponse struct { - SiteConfigurationSnapshotInfoCollection -} - -// WebAppsClientListConfigurationsResponse contains the response from method WebAppsClient.ListConfigurations. -type WebAppsClientListConfigurationsResponse struct { - SiteConfigResourceCollection -} - -// WebAppsClientListConfigurationsSlotResponse contains the response from method WebAppsClient.ListConfigurationsSlot. -type WebAppsClientListConfigurationsSlotResponse struct { - SiteConfigResourceCollection -} - -// WebAppsClientListConnectionStringsResponse contains the response from method WebAppsClient.ListConnectionStrings. -type WebAppsClientListConnectionStringsResponse struct { - ConnectionStringDictionary -} - -// WebAppsClientListConnectionStringsSlotResponse contains the response from method WebAppsClient.ListConnectionStringsSlot. -type WebAppsClientListConnectionStringsSlotResponse struct { - ConnectionStringDictionary -} - -// WebAppsClientListContinuousWebJobsResponse contains the response from method WebAppsClient.ListContinuousWebJobs. -type WebAppsClientListContinuousWebJobsResponse struct { - ContinuousWebJobCollection -} - -// WebAppsClientListContinuousWebJobsSlotResponse contains the response from method WebAppsClient.ListContinuousWebJobsSlot. -type WebAppsClientListContinuousWebJobsSlotResponse struct { - ContinuousWebJobCollection -} - -// WebAppsClientListDeploymentLogResponse contains the response from method WebAppsClient.ListDeploymentLog. -type WebAppsClientListDeploymentLogResponse struct { - Deployment -} - -// WebAppsClientListDeploymentLogSlotResponse contains the response from method WebAppsClient.ListDeploymentLogSlot. -type WebAppsClientListDeploymentLogSlotResponse struct { - Deployment -} - -// WebAppsClientListDeploymentsResponse contains the response from method WebAppsClient.ListDeployments. -type WebAppsClientListDeploymentsResponse struct { - DeploymentCollection -} - -// WebAppsClientListDeploymentsSlotResponse contains the response from method WebAppsClient.ListDeploymentsSlot. -type WebAppsClientListDeploymentsSlotResponse struct { - DeploymentCollection -} - -// WebAppsClientListDomainOwnershipIdentifiersResponse contains the response from method WebAppsClient.ListDomainOwnershipIdentifiers. -type WebAppsClientListDomainOwnershipIdentifiersResponse struct { - IdentifierCollection -} - -// WebAppsClientListDomainOwnershipIdentifiersSlotResponse contains the response from method WebAppsClient.ListDomainOwnershipIdentifiersSlot. -type WebAppsClientListDomainOwnershipIdentifiersSlotResponse struct { - IdentifierCollection -} - -// WebAppsClientListFunctionKeysResponse contains the response from method WebAppsClient.ListFunctionKeys. -type WebAppsClientListFunctionKeysResponse struct { - StringDictionary -} - -// WebAppsClientListFunctionKeysSlotResponse contains the response from method WebAppsClient.ListFunctionKeysSlot. -type WebAppsClientListFunctionKeysSlotResponse struct { - StringDictionary -} - -// WebAppsClientListFunctionSecretsResponse contains the response from method WebAppsClient.ListFunctionSecrets. -type WebAppsClientListFunctionSecretsResponse struct { - FunctionSecrets -} - -// WebAppsClientListFunctionSecretsSlotResponse contains the response from method WebAppsClient.ListFunctionSecretsSlot. -type WebAppsClientListFunctionSecretsSlotResponse struct { - FunctionSecrets -} - -// WebAppsClientListFunctionsResponse contains the response from method WebAppsClient.ListFunctions. -type WebAppsClientListFunctionsResponse struct { - FunctionEnvelopeCollection -} - -// WebAppsClientListHostKeysResponse contains the response from method WebAppsClient.ListHostKeys. -type WebAppsClientListHostKeysResponse struct { - HostKeys -} - -// WebAppsClientListHostKeysSlotResponse contains the response from method WebAppsClient.ListHostKeysSlot. -type WebAppsClientListHostKeysSlotResponse struct { - HostKeys -} - -// WebAppsClientListHostNameBindingsResponse contains the response from method WebAppsClient.ListHostNameBindings. -type WebAppsClientListHostNameBindingsResponse struct { - HostNameBindingCollection -} - -// WebAppsClientListHostNameBindingsSlotResponse contains the response from method WebAppsClient.ListHostNameBindingsSlot. -type WebAppsClientListHostNameBindingsSlotResponse struct { - HostNameBindingCollection -} - -// WebAppsClientListHybridConnectionsResponse contains the response from method WebAppsClient.ListHybridConnections. -type WebAppsClientListHybridConnectionsResponse struct { - HybridConnection -} - -// WebAppsClientListHybridConnectionsSlotResponse contains the response from method WebAppsClient.ListHybridConnectionsSlot. -type WebAppsClientListHybridConnectionsSlotResponse struct { - HybridConnection -} - -// WebAppsClientListInstanceFunctionsSlotResponse contains the response from method WebAppsClient.ListInstanceFunctionsSlot. -type WebAppsClientListInstanceFunctionsSlotResponse struct { - FunctionEnvelopeCollection -} - -// WebAppsClientListInstanceIdentifiersResponse contains the response from method WebAppsClient.ListInstanceIdentifiers. -type WebAppsClientListInstanceIdentifiersResponse struct { - WebAppInstanceStatusCollection -} - -// WebAppsClientListInstanceIdentifiersSlotResponse contains the response from method WebAppsClient.ListInstanceIdentifiersSlot. -type WebAppsClientListInstanceIdentifiersSlotResponse struct { - WebAppInstanceStatusCollection -} - -// WebAppsClientListInstanceProcessModulesResponse contains the response from method WebAppsClient.ListInstanceProcessModules. -type WebAppsClientListInstanceProcessModulesResponse struct { - ProcessModuleInfoCollection -} - -// WebAppsClientListInstanceProcessModulesSlotResponse contains the response from method WebAppsClient.ListInstanceProcessModulesSlot. -type WebAppsClientListInstanceProcessModulesSlotResponse struct { - ProcessModuleInfoCollection -} - -// WebAppsClientListInstanceProcessThreadsResponse contains the response from method WebAppsClient.ListInstanceProcessThreads. -type WebAppsClientListInstanceProcessThreadsResponse struct { - ProcessThreadInfoCollection -} - -// WebAppsClientListInstanceProcessThreadsSlotResponse contains the response from method WebAppsClient.ListInstanceProcessThreadsSlot. -type WebAppsClientListInstanceProcessThreadsSlotResponse struct { - ProcessThreadInfoCollection -} - -// WebAppsClientListInstanceProcessesResponse contains the response from method WebAppsClient.ListInstanceProcesses. -type WebAppsClientListInstanceProcessesResponse struct { - ProcessInfoCollection -} - -// WebAppsClientListInstanceProcessesSlotResponse contains the response from method WebAppsClient.ListInstanceProcessesSlot. -type WebAppsClientListInstanceProcessesSlotResponse struct { - ProcessInfoCollection -} - -// WebAppsClientListMetadataResponse contains the response from method WebAppsClient.ListMetadata. -type WebAppsClientListMetadataResponse struct { - StringDictionary -} - -// WebAppsClientListMetadataSlotResponse contains the response from method WebAppsClient.ListMetadataSlot. -type WebAppsClientListMetadataSlotResponse struct { - StringDictionary -} - -// WebAppsClientListNetworkFeaturesResponse contains the response from method WebAppsClient.ListNetworkFeatures. -type WebAppsClientListNetworkFeaturesResponse struct { - NetworkFeatures -} - -// WebAppsClientListNetworkFeaturesSlotResponse contains the response from method WebAppsClient.ListNetworkFeaturesSlot. -type WebAppsClientListNetworkFeaturesSlotResponse struct { - NetworkFeatures -} - -// WebAppsClientListPerfMonCountersResponse contains the response from method WebAppsClient.ListPerfMonCounters. -type WebAppsClientListPerfMonCountersResponse struct { - PerfMonCounterCollection -} - -// WebAppsClientListPerfMonCountersSlotResponse contains the response from method WebAppsClient.ListPerfMonCountersSlot. -type WebAppsClientListPerfMonCountersSlotResponse struct { - PerfMonCounterCollection -} - -// WebAppsClientListPremierAddOnsResponse contains the response from method WebAppsClient.ListPremierAddOns. -type WebAppsClientListPremierAddOnsResponse struct { - PremierAddOn -} - -// WebAppsClientListPremierAddOnsSlotResponse contains the response from method WebAppsClient.ListPremierAddOnsSlot. -type WebAppsClientListPremierAddOnsSlotResponse struct { - PremierAddOn -} - -// WebAppsClientListProcessModulesResponse contains the response from method WebAppsClient.ListProcessModules. -type WebAppsClientListProcessModulesResponse struct { - ProcessModuleInfoCollection -} - -// WebAppsClientListProcessModulesSlotResponse contains the response from method WebAppsClient.ListProcessModulesSlot. -type WebAppsClientListProcessModulesSlotResponse struct { - ProcessModuleInfoCollection -} - -// WebAppsClientListProcessThreadsResponse contains the response from method WebAppsClient.ListProcessThreads. -type WebAppsClientListProcessThreadsResponse struct { - ProcessThreadInfoCollection -} - -// WebAppsClientListProcessThreadsSlotResponse contains the response from method WebAppsClient.ListProcessThreadsSlot. -type WebAppsClientListProcessThreadsSlotResponse struct { - ProcessThreadInfoCollection -} - -// WebAppsClientListProcessesResponse contains the response from method WebAppsClient.ListProcesses. -type WebAppsClientListProcessesResponse struct { - ProcessInfoCollection -} - -// WebAppsClientListProcessesSlotResponse contains the response from method WebAppsClient.ListProcessesSlot. -type WebAppsClientListProcessesSlotResponse struct { - ProcessInfoCollection -} - -// WebAppsClientListPublicCertificatesResponse contains the response from method WebAppsClient.ListPublicCertificates. -type WebAppsClientListPublicCertificatesResponse struct { - PublicCertificateCollection -} - -// WebAppsClientListPublicCertificatesSlotResponse contains the response from method WebAppsClient.ListPublicCertificatesSlot. -type WebAppsClientListPublicCertificatesSlotResponse struct { - PublicCertificateCollection -} - -// WebAppsClientListPublishingCredentialsResponse contains the response from method WebAppsClient.ListPublishingCredentials. -type WebAppsClientListPublishingCredentialsResponse struct { - User -} - -// WebAppsClientListPublishingCredentialsSlotResponse contains the response from method WebAppsClient.ListPublishingCredentialsSlot. -type WebAppsClientListPublishingCredentialsSlotResponse struct { - User -} - -// WebAppsClientListPublishingProfileXMLWithSecretsResponse contains the response from method WebAppsClient.ListPublishingProfileXMLWithSecrets. -type WebAppsClientListPublishingProfileXMLWithSecretsResponse struct { - // Body contains the streaming response. - Body io.ReadCloser -} - -// WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse contains the response from method WebAppsClient.ListPublishingProfileXMLWithSecretsSlot. -type WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse struct { - // Body contains the streaming response. - Body io.ReadCloser -} - -// WebAppsClientListRelayServiceConnectionsResponse contains the response from method WebAppsClient.ListRelayServiceConnections. -type WebAppsClientListRelayServiceConnectionsResponse struct { - RelayServiceConnectionEntity -} - -// WebAppsClientListRelayServiceConnectionsSlotResponse contains the response from method WebAppsClient.ListRelayServiceConnectionsSlot. -type WebAppsClientListRelayServiceConnectionsSlotResponse struct { - RelayServiceConnectionEntity -} - -// WebAppsClientListResponse contains the response from method WebAppsClient.List. -type WebAppsClientListResponse struct { - WebAppCollection -} - -// WebAppsClientListSiteBackupsResponse contains the response from method WebAppsClient.ListSiteBackups. -type WebAppsClientListSiteBackupsResponse struct { - BackupItemCollection -} - -// WebAppsClientListSiteBackupsSlotResponse contains the response from method WebAppsClient.ListSiteBackupsSlot. -type WebAppsClientListSiteBackupsSlotResponse struct { - BackupItemCollection -} - -// WebAppsClientListSiteExtensionsResponse contains the response from method WebAppsClient.ListSiteExtensions. -type WebAppsClientListSiteExtensionsResponse struct { - SiteExtensionInfoCollection -} - -// WebAppsClientListSiteExtensionsSlotResponse contains the response from method WebAppsClient.ListSiteExtensionsSlot. -type WebAppsClientListSiteExtensionsSlotResponse struct { - SiteExtensionInfoCollection -} - -// WebAppsClientListSitePushSettingsResponse contains the response from method WebAppsClient.ListSitePushSettings. -type WebAppsClientListSitePushSettingsResponse struct { - PushSettings -} - -// WebAppsClientListSitePushSettingsSlotResponse contains the response from method WebAppsClient.ListSitePushSettingsSlot. -type WebAppsClientListSitePushSettingsSlotResponse struct { - PushSettings -} - -// WebAppsClientListSlotConfigurationNamesResponse contains the response from method WebAppsClient.ListSlotConfigurationNames. -type WebAppsClientListSlotConfigurationNamesResponse struct { - SlotConfigNamesResource -} - -// WebAppsClientListSlotDifferencesFromProductionResponse contains the response from method WebAppsClient.ListSlotDifferencesFromProduction. -type WebAppsClientListSlotDifferencesFromProductionResponse struct { - SlotDifferenceCollection -} - -// WebAppsClientListSlotDifferencesSlotResponse contains the response from method WebAppsClient.ListSlotDifferencesSlot. -type WebAppsClientListSlotDifferencesSlotResponse struct { - SlotDifferenceCollection -} - -// WebAppsClientListSlotsResponse contains the response from method WebAppsClient.ListSlots. -type WebAppsClientListSlotsResponse struct { - WebAppCollection -} - -// WebAppsClientListSnapshotsFromDRSecondaryResponse contains the response from method WebAppsClient.ListSnapshotsFromDRSecondary. -type WebAppsClientListSnapshotsFromDRSecondaryResponse struct { - SnapshotCollection -} - -// WebAppsClientListSnapshotsFromDRSecondarySlotResponse contains the response from method WebAppsClient.ListSnapshotsFromDRSecondarySlot. -type WebAppsClientListSnapshotsFromDRSecondarySlotResponse struct { - SnapshotCollection -} - -// WebAppsClientListSnapshotsResponse contains the response from method WebAppsClient.ListSnapshots. -type WebAppsClientListSnapshotsResponse struct { - SnapshotCollection -} - -// WebAppsClientListSnapshotsSlotResponse contains the response from method WebAppsClient.ListSnapshotsSlot. -type WebAppsClientListSnapshotsSlotResponse struct { - SnapshotCollection -} - -// WebAppsClientListSyncFunctionTriggersResponse contains the response from method WebAppsClient.ListSyncFunctionTriggers. -type WebAppsClientListSyncFunctionTriggersResponse struct { - FunctionSecrets -} - -// WebAppsClientListSyncFunctionTriggersSlotResponse contains the response from method WebAppsClient.ListSyncFunctionTriggersSlot. -type WebAppsClientListSyncFunctionTriggersSlotResponse struct { - FunctionSecrets -} - -// WebAppsClientListSyncStatusResponse contains the response from method WebAppsClient.ListSyncStatus. -type WebAppsClientListSyncStatusResponse struct { - // placeholder for future response values -} - -// WebAppsClientListSyncStatusSlotResponse contains the response from method WebAppsClient.ListSyncStatusSlot. -type WebAppsClientListSyncStatusSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientListTriggeredWebJobHistoryResponse contains the response from method WebAppsClient.ListTriggeredWebJobHistory. -type WebAppsClientListTriggeredWebJobHistoryResponse struct { - TriggeredJobHistoryCollection -} - -// WebAppsClientListTriggeredWebJobHistorySlotResponse contains the response from method WebAppsClient.ListTriggeredWebJobHistorySlot. -type WebAppsClientListTriggeredWebJobHistorySlotResponse struct { - TriggeredJobHistoryCollection -} - -// WebAppsClientListTriggeredWebJobsResponse contains the response from method WebAppsClient.ListTriggeredWebJobs. -type WebAppsClientListTriggeredWebJobsResponse struct { - TriggeredWebJobCollection -} - -// WebAppsClientListTriggeredWebJobsSlotResponse contains the response from method WebAppsClient.ListTriggeredWebJobsSlot. -type WebAppsClientListTriggeredWebJobsSlotResponse struct { - TriggeredWebJobCollection -} - -// WebAppsClientListUsagesResponse contains the response from method WebAppsClient.ListUsages. -type WebAppsClientListUsagesResponse struct { - CsmUsageQuotaCollection -} - -// WebAppsClientListUsagesSlotResponse contains the response from method WebAppsClient.ListUsagesSlot. -type WebAppsClientListUsagesSlotResponse struct { - CsmUsageQuotaCollection -} - -// WebAppsClientListVnetConnectionsResponse contains the response from method WebAppsClient.ListVnetConnections. -type WebAppsClientListVnetConnectionsResponse struct { - // Array of VnetInfoResource - VnetInfoResourceArray []*VnetInfoResource -} - -// WebAppsClientListVnetConnectionsSlotResponse contains the response from method WebAppsClient.ListVnetConnectionsSlot. -type WebAppsClientListVnetConnectionsSlotResponse struct { - // Array of VnetInfoResource - VnetInfoResourceArray []*VnetInfoResource -} - -// WebAppsClientListWebJobsResponse contains the response from method WebAppsClient.ListWebJobs. -type WebAppsClientListWebJobsResponse struct { - WebJobCollection -} - -// WebAppsClientListWebJobsSlotResponse contains the response from method WebAppsClient.ListWebJobsSlot. -type WebAppsClientListWebJobsSlotResponse struct { - WebJobCollection -} - -// WebAppsClientMigrateMySQLResponse contains the response from method WebAppsClient.MigrateMySQL. -type WebAppsClientMigrateMySQLResponse struct { - Operation -} - -// WebAppsClientMigrateStorageResponse contains the response from method WebAppsClient.MigrateStorage. -type WebAppsClientMigrateStorageResponse struct { - StorageMigrationResponse -} - -// WebAppsClientPutPrivateAccessVnetResponse contains the response from method WebAppsClient.PutPrivateAccessVnet. -type WebAppsClientPutPrivateAccessVnetResponse struct { - PrivateAccess -} - -// WebAppsClientPutPrivateAccessVnetSlotResponse contains the response from method WebAppsClient.PutPrivateAccessVnetSlot. -type WebAppsClientPutPrivateAccessVnetSlotResponse struct { - PrivateAccess -} - -// WebAppsClientRecoverSiteConfigurationSnapshotResponse contains the response from method WebAppsClient.RecoverSiteConfigurationSnapshot. -type WebAppsClientRecoverSiteConfigurationSnapshotResponse struct { - // placeholder for future response values -} - -// WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse contains the response from method WebAppsClient.RecoverSiteConfigurationSnapshotSlot. -type WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientResetProductionSlotConfigResponse contains the response from method WebAppsClient.ResetProductionSlotConfig. -type WebAppsClientResetProductionSlotConfigResponse struct { - // placeholder for future response values -} - -// WebAppsClientResetSlotConfigurationSlotResponse contains the response from method WebAppsClient.ResetSlotConfigurationSlot. -type WebAppsClientResetSlotConfigurationSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientRestartResponse contains the response from method WebAppsClient.Restart. -type WebAppsClientRestartResponse struct { - // placeholder for future response values -} - -// WebAppsClientRestartSlotResponse contains the response from method WebAppsClient.RestartSlot. -type WebAppsClientRestartSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientRestoreFromBackupBlobResponse contains the response from method WebAppsClient.RestoreFromBackupBlob. -type WebAppsClientRestoreFromBackupBlobResponse struct { - // placeholder for future response values -} - -// WebAppsClientRestoreFromBackupBlobSlotResponse contains the response from method WebAppsClient.RestoreFromBackupBlobSlot. -type WebAppsClientRestoreFromBackupBlobSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientRestoreFromDeletedAppResponse contains the response from method WebAppsClient.RestoreFromDeletedApp. -type WebAppsClientRestoreFromDeletedAppResponse struct { - // placeholder for future response values -} - -// WebAppsClientRestoreFromDeletedAppSlotResponse contains the response from method WebAppsClient.RestoreFromDeletedAppSlot. -type WebAppsClientRestoreFromDeletedAppSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientRestoreResponse contains the response from method WebAppsClient.Restore. -type WebAppsClientRestoreResponse struct { - // placeholder for future response values -} - -// WebAppsClientRestoreSlotResponse contains the response from method WebAppsClient.RestoreSlot. -type WebAppsClientRestoreSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientRestoreSnapshotResponse contains the response from method WebAppsClient.RestoreSnapshot. -type WebAppsClientRestoreSnapshotResponse struct { - // placeholder for future response values -} - -// WebAppsClientRestoreSnapshotSlotResponse contains the response from method WebAppsClient.RestoreSnapshotSlot. -type WebAppsClientRestoreSnapshotSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientRunTriggeredWebJobResponse contains the response from method WebAppsClient.RunTriggeredWebJob. -type WebAppsClientRunTriggeredWebJobResponse struct { - // placeholder for future response values -} - -// WebAppsClientRunTriggeredWebJobSlotResponse contains the response from method WebAppsClient.RunTriggeredWebJobSlot. -type WebAppsClientRunTriggeredWebJobSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientStartContinuousWebJobResponse contains the response from method WebAppsClient.StartContinuousWebJob. -type WebAppsClientStartContinuousWebJobResponse struct { - // placeholder for future response values -} - -// WebAppsClientStartContinuousWebJobSlotResponse contains the response from method WebAppsClient.StartContinuousWebJobSlot. -type WebAppsClientStartContinuousWebJobSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientStartNetworkTraceResponse contains the response from method WebAppsClient.StartNetworkTrace. -type WebAppsClientStartNetworkTraceResponse struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientStartNetworkTraceResponse. -func (w *WebAppsClientStartNetworkTraceResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &w.NetworkTraceArray) -} - -// WebAppsClientStartNetworkTraceSlotResponse contains the response from method WebAppsClient.StartNetworkTraceSlot. -type WebAppsClientStartNetworkTraceSlotResponse struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientStartNetworkTraceSlotResponse. -func (w *WebAppsClientStartNetworkTraceSlotResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &w.NetworkTraceArray) -} - -// WebAppsClientStartResponse contains the response from method WebAppsClient.Start. -type WebAppsClientStartResponse struct { - // placeholder for future response values -} - -// WebAppsClientStartSlotResponse contains the response from method WebAppsClient.StartSlot. -type WebAppsClientStartSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientStartWebSiteNetworkTraceOperationResponse contains the response from method WebAppsClient.StartWebSiteNetworkTraceOperation. -type WebAppsClientStartWebSiteNetworkTraceOperationResponse struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientStartWebSiteNetworkTraceOperationResponse. -func (w *WebAppsClientStartWebSiteNetworkTraceOperationResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &w.NetworkTraceArray) -} - -// WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse contains the response from method WebAppsClient.StartWebSiteNetworkTraceOperationSlot. -type WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse struct { - // Array of NetworkTrace - NetworkTraceArray []*NetworkTrace -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse. -func (w *WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &w.NetworkTraceArray) -} - -// WebAppsClientStartWebSiteNetworkTraceResponse contains the response from method WebAppsClient.StartWebSiteNetworkTrace. -type WebAppsClientStartWebSiteNetworkTraceResponse struct { - Value *string -} - -// WebAppsClientStartWebSiteNetworkTraceSlotResponse contains the response from method WebAppsClient.StartWebSiteNetworkTraceSlot. -type WebAppsClientStartWebSiteNetworkTraceSlotResponse struct { - Value *string -} - -// WebAppsClientStopContinuousWebJobResponse contains the response from method WebAppsClient.StopContinuousWebJob. -type WebAppsClientStopContinuousWebJobResponse struct { - // placeholder for future response values -} - -// WebAppsClientStopContinuousWebJobSlotResponse contains the response from method WebAppsClient.StopContinuousWebJobSlot. -type WebAppsClientStopContinuousWebJobSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientStopNetworkTraceResponse contains the response from method WebAppsClient.StopNetworkTrace. -type WebAppsClientStopNetworkTraceResponse struct { - // placeholder for future response values -} - -// WebAppsClientStopNetworkTraceSlotResponse contains the response from method WebAppsClient.StopNetworkTraceSlot. -type WebAppsClientStopNetworkTraceSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientStopResponse contains the response from method WebAppsClient.Stop. -type WebAppsClientStopResponse struct { - // placeholder for future response values -} - -// WebAppsClientStopSlotResponse contains the response from method WebAppsClient.StopSlot. -type WebAppsClientStopSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientStopWebSiteNetworkTraceResponse contains the response from method WebAppsClient.StopWebSiteNetworkTrace. -type WebAppsClientStopWebSiteNetworkTraceResponse struct { - // placeholder for future response values -} - -// WebAppsClientStopWebSiteNetworkTraceSlotResponse contains the response from method WebAppsClient.StopWebSiteNetworkTraceSlot. -type WebAppsClientStopWebSiteNetworkTraceSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientSwapSlotResponse contains the response from method WebAppsClient.SwapSlot. -type WebAppsClientSwapSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientSwapSlotWithProductionResponse contains the response from method WebAppsClient.SwapSlotWithProduction. -type WebAppsClientSwapSlotWithProductionResponse struct { - // placeholder for future response values -} - -// WebAppsClientSyncFunctionTriggersResponse contains the response from method WebAppsClient.SyncFunctionTriggers. -type WebAppsClientSyncFunctionTriggersResponse struct { - // placeholder for future response values -} - -// WebAppsClientSyncFunctionTriggersSlotResponse contains the response from method WebAppsClient.SyncFunctionTriggersSlot. -type WebAppsClientSyncFunctionTriggersSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientSyncFunctionsResponse contains the response from method WebAppsClient.SyncFunctions. -type WebAppsClientSyncFunctionsResponse struct { - // placeholder for future response values -} - -// WebAppsClientSyncFunctionsSlotResponse contains the response from method WebAppsClient.SyncFunctionsSlot. -type WebAppsClientSyncFunctionsSlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientSyncRepositoryResponse contains the response from method WebAppsClient.SyncRepository. -type WebAppsClientSyncRepositoryResponse struct { - // placeholder for future response values -} - -// WebAppsClientSyncRepositorySlotResponse contains the response from method WebAppsClient.SyncRepositorySlot. -type WebAppsClientSyncRepositorySlotResponse struct { - // placeholder for future response values -} - -// WebAppsClientUpdateApplicationSettingsResponse contains the response from method WebAppsClient.UpdateApplicationSettings. -type WebAppsClientUpdateApplicationSettingsResponse struct { - StringDictionary -} - -// WebAppsClientUpdateApplicationSettingsSlotResponse contains the response from method WebAppsClient.UpdateApplicationSettingsSlot. -type WebAppsClientUpdateApplicationSettingsSlotResponse struct { - StringDictionary -} - -// WebAppsClientUpdateAuthSettingsResponse contains the response from method WebAppsClient.UpdateAuthSettings. -type WebAppsClientUpdateAuthSettingsResponse struct { - SiteAuthSettings -} - -// WebAppsClientUpdateAuthSettingsSlotResponse contains the response from method WebAppsClient.UpdateAuthSettingsSlot. -type WebAppsClientUpdateAuthSettingsSlotResponse struct { - SiteAuthSettings -} - -// WebAppsClientUpdateAuthSettingsV2Response contains the response from method WebAppsClient.UpdateAuthSettingsV2. -type WebAppsClientUpdateAuthSettingsV2Response struct { - SiteAuthSettingsV2 -} - -// WebAppsClientUpdateAuthSettingsV2SlotResponse contains the response from method WebAppsClient.UpdateAuthSettingsV2Slot. -type WebAppsClientUpdateAuthSettingsV2SlotResponse struct { - SiteAuthSettingsV2 -} - -// WebAppsClientUpdateAzureStorageAccountsResponse contains the response from method WebAppsClient.UpdateAzureStorageAccounts. -type WebAppsClientUpdateAzureStorageAccountsResponse struct { - AzureStoragePropertyDictionaryResource -} - -// WebAppsClientUpdateAzureStorageAccountsSlotResponse contains the response from method WebAppsClient.UpdateAzureStorageAccountsSlot. -type WebAppsClientUpdateAzureStorageAccountsSlotResponse struct { - AzureStoragePropertyDictionaryResource -} - -// WebAppsClientUpdateBackupConfigurationResponse contains the response from method WebAppsClient.UpdateBackupConfiguration. -type WebAppsClientUpdateBackupConfigurationResponse struct { - BackupRequest -} - -// WebAppsClientUpdateBackupConfigurationSlotResponse contains the response from method WebAppsClient.UpdateBackupConfigurationSlot. -type WebAppsClientUpdateBackupConfigurationSlotResponse struct { - BackupRequest -} - -// WebAppsClientUpdateConfigurationResponse contains the response from method WebAppsClient.UpdateConfiguration. -type WebAppsClientUpdateConfigurationResponse struct { - SiteConfigResource -} - -// WebAppsClientUpdateConfigurationSlotResponse contains the response from method WebAppsClient.UpdateConfigurationSlot. -type WebAppsClientUpdateConfigurationSlotResponse struct { - SiteConfigResource -} - -// WebAppsClientUpdateConnectionStringsResponse contains the response from method WebAppsClient.UpdateConnectionStrings. -type WebAppsClientUpdateConnectionStringsResponse struct { - ConnectionStringDictionary -} - -// WebAppsClientUpdateConnectionStringsSlotResponse contains the response from method WebAppsClient.UpdateConnectionStringsSlot. -type WebAppsClientUpdateConnectionStringsSlotResponse struct { - ConnectionStringDictionary -} - -// WebAppsClientUpdateDiagnosticLogsConfigResponse contains the response from method WebAppsClient.UpdateDiagnosticLogsConfig. -type WebAppsClientUpdateDiagnosticLogsConfigResponse struct { - SiteLogsConfig -} - -// WebAppsClientUpdateDiagnosticLogsConfigSlotResponse contains the response from method WebAppsClient.UpdateDiagnosticLogsConfigSlot. -type WebAppsClientUpdateDiagnosticLogsConfigSlotResponse struct { - SiteLogsConfig -} - -// WebAppsClientUpdateDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.UpdateDomainOwnershipIdentifier. -type WebAppsClientUpdateDomainOwnershipIdentifierResponse struct { - Identifier -} - -// WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.UpdateDomainOwnershipIdentifierSlot. -type WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse struct { - Identifier -} - -// WebAppsClientUpdateFtpAllowedResponse contains the response from method WebAppsClient.UpdateFtpAllowed. -type WebAppsClientUpdateFtpAllowedResponse struct { - CsmPublishingCredentialsPoliciesEntity -} - -// WebAppsClientUpdateFtpAllowedSlotResponse contains the response from method WebAppsClient.UpdateFtpAllowedSlot. -type WebAppsClientUpdateFtpAllowedSlotResponse struct { - CsmPublishingCredentialsPoliciesEntity -} - -// WebAppsClientUpdateHybridConnectionResponse contains the response from method WebAppsClient.UpdateHybridConnection. -type WebAppsClientUpdateHybridConnectionResponse struct { - HybridConnection -} - -// WebAppsClientUpdateHybridConnectionSlotResponse contains the response from method WebAppsClient.UpdateHybridConnectionSlot. -type WebAppsClientUpdateHybridConnectionSlotResponse struct { - HybridConnection -} - -// WebAppsClientUpdateMetadataResponse contains the response from method WebAppsClient.UpdateMetadata. -type WebAppsClientUpdateMetadataResponse struct { - StringDictionary -} - -// WebAppsClientUpdateMetadataSlotResponse contains the response from method WebAppsClient.UpdateMetadataSlot. -type WebAppsClientUpdateMetadataSlotResponse struct { - StringDictionary -} - -// WebAppsClientUpdatePremierAddOnResponse contains the response from method WebAppsClient.UpdatePremierAddOn. -type WebAppsClientUpdatePremierAddOnResponse struct { - PremierAddOn -} - -// WebAppsClientUpdatePremierAddOnSlotResponse contains the response from method WebAppsClient.UpdatePremierAddOnSlot. -type WebAppsClientUpdatePremierAddOnSlotResponse struct { - PremierAddOn -} - -// WebAppsClientUpdateRelayServiceConnectionResponse contains the response from method WebAppsClient.UpdateRelayServiceConnection. -type WebAppsClientUpdateRelayServiceConnectionResponse struct { - RelayServiceConnectionEntity -} - -// WebAppsClientUpdateRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.UpdateRelayServiceConnectionSlot. -type WebAppsClientUpdateRelayServiceConnectionSlotResponse struct { - RelayServiceConnectionEntity -} - -// WebAppsClientUpdateResponse contains the response from method WebAppsClient.Update. -type WebAppsClientUpdateResponse struct { - Site -} - -// WebAppsClientUpdateScmAllowedResponse contains the response from method WebAppsClient.UpdateScmAllowed. -type WebAppsClientUpdateScmAllowedResponse struct { - CsmPublishingCredentialsPoliciesEntity -} - -// WebAppsClientUpdateScmAllowedSlotResponse contains the response from method WebAppsClient.UpdateScmAllowedSlot. -type WebAppsClientUpdateScmAllowedSlotResponse struct { - CsmPublishingCredentialsPoliciesEntity -} - -// WebAppsClientUpdateSitePushSettingsResponse contains the response from method WebAppsClient.UpdateSitePushSettings. -type WebAppsClientUpdateSitePushSettingsResponse struct { - PushSettings -} - -// WebAppsClientUpdateSitePushSettingsSlotResponse contains the response from method WebAppsClient.UpdateSitePushSettingsSlot. -type WebAppsClientUpdateSitePushSettingsSlotResponse struct { - PushSettings -} - -// WebAppsClientUpdateSlotConfigurationNamesResponse contains the response from method WebAppsClient.UpdateSlotConfigurationNames. -type WebAppsClientUpdateSlotConfigurationNamesResponse struct { - SlotConfigNamesResource -} - -// WebAppsClientUpdateSlotResponse contains the response from method WebAppsClient.UpdateSlot. -type WebAppsClientUpdateSlotResponse struct { - Site -} - -// WebAppsClientUpdateSourceControlResponse contains the response from method WebAppsClient.UpdateSourceControl. -type WebAppsClientUpdateSourceControlResponse struct { - SiteSourceControl -} - -// WebAppsClientUpdateSourceControlSlotResponse contains the response from method WebAppsClient.UpdateSourceControlSlot. -type WebAppsClientUpdateSourceControlSlotResponse struct { - SiteSourceControl -} - -// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse contains the response from method WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck. -type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse struct { - SwiftVirtualNetwork -} - -// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse contains the response from method WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot. -type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse struct { - SwiftVirtualNetwork -} - -// WebAppsClientUpdateVnetConnectionGatewayResponse contains the response from method WebAppsClient.UpdateVnetConnectionGateway. -type WebAppsClientUpdateVnetConnectionGatewayResponse struct { - VnetGateway -} - -// WebAppsClientUpdateVnetConnectionGatewaySlotResponse contains the response from method WebAppsClient.UpdateVnetConnectionGatewaySlot. -type WebAppsClientUpdateVnetConnectionGatewaySlotResponse struct { - VnetGateway -} - -// WebAppsClientUpdateVnetConnectionResponse contains the response from method WebAppsClient.UpdateVnetConnection. -type WebAppsClientUpdateVnetConnectionResponse struct { - VnetInfoResource -} - -// WebAppsClientUpdateVnetConnectionSlotResponse contains the response from method WebAppsClient.UpdateVnetConnectionSlot. -type WebAppsClientUpdateVnetConnectionSlotResponse struct { - VnetInfoResource -} - -// WebSiteManagementClientCheckNameAvailabilityResponse contains the response from method WebSiteManagementClient.CheckNameAvailability. -type WebSiteManagementClientCheckNameAvailabilityResponse struct { - ResourceNameAvailability -} - -// WebSiteManagementClientGetPublishingUserResponse contains the response from method WebSiteManagementClient.GetPublishingUser. -type WebSiteManagementClientGetPublishingUserResponse struct { - User -} - -// WebSiteManagementClientGetSourceControlResponse contains the response from method WebSiteManagementClient.GetSourceControl. -type WebSiteManagementClientGetSourceControlResponse struct { - SourceControl -} - -// WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse contains the response from method WebSiteManagementClient.GetSubscriptionDeploymentLocations. -type WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse struct { - DeploymentLocations -} - -// WebSiteManagementClientListBillingMetersResponse contains the response from method WebSiteManagementClient.ListBillingMeters. -type WebSiteManagementClientListBillingMetersResponse struct { - BillingMeterCollection -} - -// WebSiteManagementClientListCustomHostNameSitesResponse contains the response from method WebSiteManagementClient.ListCustomHostNameSites. -type WebSiteManagementClientListCustomHostNameSitesResponse struct { - CustomHostnameSitesCollection -} - -// WebSiteManagementClientListGeoRegionsResponse contains the response from method WebSiteManagementClient.ListGeoRegions. -type WebSiteManagementClientListGeoRegionsResponse struct { - GeoRegionCollection -} - -// WebSiteManagementClientListPremierAddOnOffersResponse contains the response from method WebSiteManagementClient.ListPremierAddOnOffers. -type WebSiteManagementClientListPremierAddOnOffersResponse struct { - PremierAddOnOfferCollection -} - -// WebSiteManagementClientListSKUsResponse contains the response from method WebSiteManagementClient.ListSKUs. -type WebSiteManagementClientListSKUsResponse struct { - SKUInfos -} - -// WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse contains the response from method WebSiteManagementClient.ListSiteIdentifiersAssignedToHostName. -type WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse struct { - IdentifierCollection -} - -// WebSiteManagementClientListSourceControlsResponse contains the response from method WebSiteManagementClient.ListSourceControls. -type WebSiteManagementClientListSourceControlsResponse struct { - SourceControlCollection -} - -// WebSiteManagementClientMoveResponse contains the response from method WebSiteManagementClient.Move. -type WebSiteManagementClientMoveResponse struct { - // placeholder for future response values -} - -// WebSiteManagementClientUpdatePublishingUserResponse contains the response from method WebSiteManagementClient.UpdatePublishingUser. -type WebSiteManagementClientUpdatePublishingUserResponse struct { - User -} - -// WebSiteManagementClientUpdateSourceControlResponse contains the response from method WebSiteManagementClient.UpdateSourceControl. -type WebSiteManagementClientUpdateSourceControlResponse struct { - SourceControl -} - -// WebSiteManagementClientValidateMoveResponse contains the response from method WebSiteManagementClient.ValidateMove. -type WebSiteManagementClientValidateMoveResponse struct { - // placeholder for future response values -} - -// WebSiteManagementClientValidateResponse contains the response from method WebSiteManagementClient.Validate. -type WebSiteManagementClientValidateResponse struct { - ValidateResponse -} - -// WebSiteManagementClientVerifyHostingEnvironmentVnetResponse contains the response from method WebSiteManagementClient.VerifyHostingEnvironmentVnet. -type WebSiteManagementClientVerifyHostingEnvironmentVnetResponse struct { - VnetValidationFailureDetails -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_staticsites_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_staticsites_client.go deleted file mode 100644 index a0b55676..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_staticsites_client.go +++ /dev/null @@ -1,3122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// StaticSitesClient contains the methods for the StaticSites group. -// Don't use this type directly, use NewStaticSitesClient() instead. -type StaticSitesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewStaticSitesClient creates a new instance of StaticSitesClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewStaticSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StaticSitesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &StaticSitesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// privateEndpointConnectionName - Name of the private endpoint connection. -// privateEndpointWrapper - Request body. -// options - StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the -// StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection method. -func (client *StaticSitesClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.approveOrRejectPrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// ApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { - req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. -func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) -} - -// BeginCreateOrUpdateStaticSite - Creates a new static site in an existing resource group, or updates an existing static -// site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site to create or update. -// staticSiteEnvelope - A JSON representation of the staticsite properties. See example. -// options - StaticSitesClientBeginCreateOrUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSite -// method. -func (client *StaticSitesClient) BeginCreateOrUpdateStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSiteARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteOptions) (*runtime.Poller[StaticSitesClientCreateOrUpdateStaticSiteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdateStaticSite(ctx, resourceGroupName, name, staticSiteEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientCreateOrUpdateStaticSiteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientCreateOrUpdateStaticSiteResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdateStaticSite - Creates a new static site in an existing resource group, or updates an existing static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) createOrUpdateStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSiteARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteOptions) (*http.Response, error) { - req, err := client.createOrUpdateStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateStaticSiteCreateRequest creates the CreateOrUpdateStaticSite request. -func (client *StaticSitesClient) createOrUpdateStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSiteARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteEnvelope) -} - -// CreateOrUpdateStaticSiteAppSettings - Creates or updates the app settings of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// appSettings - The dictionary containing the static site app settings to update. -// options - StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteAppSettings -// method. -func (client *StaticSitesClient) CreateOrUpdateStaticSiteAppSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse, error) { - req, err := client.createOrUpdateStaticSiteAppSettingsCreateRequest(ctx, resourceGroupName, name, appSettings, options) - if err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateStaticSiteAppSettingsHandleResponse(resp) -} - -// createOrUpdateStaticSiteAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteAppSettings request. -func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) -} - -// createOrUpdateStaticSiteAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteAppSettings response. -func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse, error) { - result := StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, err - } - return result, nil -} - -// CreateOrUpdateStaticSiteBuildAppSettings - Creates or updates the app settings of a static site build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// environmentName - The stage site identifier. -// appSettings - The dictionary containing the static site app settings to update. -// options - StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings -// method. -func (client *StaticSitesClient) CreateOrUpdateStaticSiteBuildAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse, error) { - req, err := client.createOrUpdateStaticSiteBuildAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, appSettings, options) - if err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateStaticSiteBuildAppSettingsHandleResponse(resp) -} - -// createOrUpdateStaticSiteBuildAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteBuildAppSettings request. -func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) -} - -// createOrUpdateStaticSiteBuildAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteBuildAppSettings response. -func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse, error) { - result := StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, err - } - return result, nil -} - -// CreateOrUpdateStaticSiteBuildFunctionAppSettings - Creates or updates the function app settings of a static site build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// environmentName - The stage site identifier. -// appSettings - The dictionary containing the static site function app settings to update. -// options - StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for -// the StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings method. -func (client *StaticSitesClient) CreateOrUpdateStaticSiteBuildFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse, error) { - req, err := client.createOrUpdateStaticSiteBuildFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, appSettings, options) - if err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateStaticSiteBuildFunctionAppSettingsHandleResponse(resp) -} - -// createOrUpdateStaticSiteBuildFunctionAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteBuildFunctionAppSettings request. -func (client *StaticSitesClient) createOrUpdateStaticSiteBuildFunctionAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) -} - -// createOrUpdateStaticSiteBuildFunctionAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteBuildFunctionAppSettings response. -func (client *StaticSitesClient) createOrUpdateStaticSiteBuildFunctionAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse, error) { - result := StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdateStaticSiteCustomDomain - Creates a new static site custom domain in an existing resource group and static -// site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// domainName - The custom domain to create. -// staticSiteCustomDomainRequestPropertiesEnvelope - A JSON representation of the static site custom domain request properties. -// See example. -// options - StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain -// method. -func (client *StaticSitesClient) BeginCreateOrUpdateStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions) (*runtime.Poller[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdateStaticSiteCustomDomain(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdateStaticSiteCustomDomain - Creates a new static site custom domain in an existing resource group and static -// site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions) (*http.Response, error) { - req, err := client.createOrUpdateStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateStaticSiteCustomDomainCreateRequest creates the CreateOrUpdateStaticSiteCustomDomain request. -func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomainCreateRequest(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope) -} - -// CreateOrUpdateStaticSiteFunctionAppSettings - Creates or updates the function app settings of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// appSettings - The dictionary containing the static site function app settings to update. -// options - StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions contains the optional parameters for the -// StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings method. -func (client *StaticSitesClient) CreateOrUpdateStaticSiteFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse, error) { - req, err := client.createOrUpdateStaticSiteFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, appSettings, options) - if err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateStaticSiteFunctionAppSettingsHandleResponse(resp) -} - -// createOrUpdateStaticSiteFunctionAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteFunctionAppSettings request. -func (client *StaticSitesClient) createOrUpdateStaticSiteFunctionAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) -} - -// createOrUpdateStaticSiteFunctionAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteFunctionAppSettings response. -func (client *StaticSitesClient) createOrUpdateStaticSiteFunctionAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse, error) { - result := StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, err - } - return result, nil -} - -// CreateUserRolesInvitationLink - Creates an invitation link for a user with the role -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientCreateUserRolesInvitationLinkOptions contains the optional parameters for the StaticSitesClient.CreateUserRolesInvitationLink -// method. -func (client *StaticSitesClient) CreateUserRolesInvitationLink(ctx context.Context, resourceGroupName string, name string, staticSiteUserRolesInvitationEnvelope StaticSiteUserInvitationRequestResource, options *StaticSitesClientCreateUserRolesInvitationLinkOptions) (StaticSitesClientCreateUserRolesInvitationLinkResponse, error) { - req, err := client.createUserRolesInvitationLinkCreateRequest(ctx, resourceGroupName, name, staticSiteUserRolesInvitationEnvelope, options) - if err != nil { - return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, runtime.NewResponseError(resp) - } - return client.createUserRolesInvitationLinkHandleResponse(resp) -} - -// createUserRolesInvitationLinkCreateRequest creates the CreateUserRolesInvitationLink request. -func (client *StaticSitesClient) createUserRolesInvitationLinkCreateRequest(ctx context.Context, resourceGroupName string, name string, staticSiteUserRolesInvitationEnvelope StaticSiteUserInvitationRequestResource, options *StaticSitesClientCreateUserRolesInvitationLinkOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteUserRolesInvitationEnvelope) -} - -// createUserRolesInvitationLinkHandleResponse handles the CreateUserRolesInvitationLink response. -func (client *StaticSitesClient) createUserRolesInvitationLinkHandleResponse(resp *http.Response) (StaticSitesClientCreateUserRolesInvitationLinkResponse, error) { - result := StaticSitesClientCreateUserRolesInvitationLinkResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserInvitationResponseResource); err != nil { - return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, err - } - return result, nil -} - -// BeginCreateZipDeploymentForStaticSite - Deploys zipped content to a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// staticSiteZipDeploymentEnvelope - A JSON representation of the StaticSiteZipDeployment properties. See example. -// options - StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSite -// method. -func (client *StaticSitesClient) BeginCreateZipDeploymentForStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions) (*runtime.Poller[StaticSitesClientCreateZipDeploymentForStaticSiteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createZipDeploymentForStaticSite(ctx, resourceGroupName, name, staticSiteZipDeploymentEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientCreateZipDeploymentForStaticSiteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientCreateZipDeploymentForStaticSiteResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateZipDeploymentForStaticSite - Deploys zipped content to a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) createZipDeploymentForStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions) (*http.Response, error) { - req, err := client.createZipDeploymentForStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteZipDeploymentEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createZipDeploymentForStaticSiteCreateRequest creates the CreateZipDeploymentForStaticSite request. -func (client *StaticSitesClient) createZipDeploymentForStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope) -} - -// BeginCreateZipDeploymentForStaticSiteBuild - Deploys zipped content to a specific environment of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// environmentName - Name of the environment. -// staticSiteZipDeploymentEnvelope - A JSON representation of the StaticSiteZipDeployment properties. See example. -// options - StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild -// method. -func (client *StaticSitesClient) BeginCreateZipDeploymentForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions) (*runtime.Poller[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createZipDeploymentForStaticSiteBuild(ctx, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateZipDeploymentForStaticSiteBuild - Deploys zipped content to a specific environment of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions) (*http.Response, error) { - req, err := client.createZipDeploymentForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createZipDeploymentForStaticSiteBuildCreateRequest creates the CreateZipDeploymentForStaticSiteBuild request. -func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope) -} - -// BeginDeletePrivateEndpointConnection - Deletes a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// privateEndpointConnectionName - Name of the private endpoint connection. -// options - StaticSitesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.BeginDeletePrivateEndpointConnection -// method. -func (client *StaticSitesClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientBeginDeletePrivateEndpointConnectionOptions) (*runtime.Poller[StaticSitesClientDeletePrivateEndpointConnectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientDeletePrivateEndpointConnectionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientDeletePrivateEndpointConnectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// DeletePrivateEndpointConnection - Deletes a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { - req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. -func (client *StaticSitesClient) deletePrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientBeginDeletePrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDeleteStaticSite - Deletes a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site to delete. -// options - StaticSitesClientBeginDeleteStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSite -// method. -func (client *StaticSitesClient) BeginDeleteStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDeleteStaticSiteOptions) (*runtime.Poller[StaticSitesClientDeleteStaticSiteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteStaticSite(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientDeleteStaticSiteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientDeleteStaticSiteResponse](options.ResumeToken, client.pl, nil) - } -} - -// DeleteStaticSite - Deletes a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) deleteStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDeleteStaticSiteOptions) (*http.Response, error) { - req, err := client.deleteStaticSiteCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteStaticSiteCreateRequest creates the DeleteStaticSite request. -func (client *StaticSitesClient) deleteStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDeleteStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDeleteStaticSiteBuild - Deletes a static site build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// environmentName - The stage site identifier. -// options - StaticSitesClientBeginDeleteStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteBuild -// method. -func (client *StaticSitesClient) BeginDeleteStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientBeginDeleteStaticSiteBuildOptions) (*runtime.Poller[StaticSitesClientDeleteStaticSiteBuildResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteStaticSiteBuild(ctx, resourceGroupName, name, environmentName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientDeleteStaticSiteBuildResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientDeleteStaticSiteBuildResponse](options.ResumeToken, client.pl, nil) - } -} - -// DeleteStaticSiteBuild - Deletes a static site build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) deleteStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientBeginDeleteStaticSiteBuildOptions) (*http.Response, error) { - req, err := client.deleteStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteStaticSiteBuildCreateRequest creates the DeleteStaticSiteBuild request. -func (client *StaticSitesClient) deleteStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientBeginDeleteStaticSiteBuildOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDeleteStaticSiteCustomDomain - Deletes a custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// domainName - The custom domain to delete. -// options - StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteCustomDomain -// method. -func (client *StaticSitesClient) BeginDeleteStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions) (*runtime.Poller[StaticSitesClientDeleteStaticSiteCustomDomainResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteStaticSiteCustomDomain(ctx, resourceGroupName, name, domainName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientDeleteStaticSiteCustomDomainResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientDeleteStaticSiteCustomDomainResponse](options.ResumeToken, client.pl, nil) - } -} - -// DeleteStaticSiteCustomDomain - Deletes a custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) deleteStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions) (*http.Response, error) { - req, err := client.deleteStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteStaticSiteCustomDomainCreateRequest creates the DeleteStaticSiteCustomDomain request. -func (client *StaticSitesClient) deleteStaticSiteCustomDomainCreateRequest(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteStaticSiteUser - Deletes the user entry from the static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the staticsite. -// authprovider - The auth provider for this user. -// userid - The user id of the user. -// options - StaticSitesClientDeleteStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.DeleteStaticSiteUser -// method. -func (client *StaticSitesClient) DeleteStaticSiteUser(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, options *StaticSitesClientDeleteStaticSiteUserOptions) (StaticSitesClientDeleteStaticSiteUserResponse, error) { - req, err := client.deleteStaticSiteUserCreateRequest(ctx, resourceGroupName, name, authprovider, userid, options) - if err != nil { - return StaticSitesClientDeleteStaticSiteUserResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientDeleteStaticSiteUserResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientDeleteStaticSiteUserResponse{}, runtime.NewResponseError(resp) - } - return StaticSitesClientDeleteStaticSiteUserResponse{}, nil -} - -// deleteStaticSiteUserCreateRequest creates the DeleteStaticSiteUser request. -func (client *StaticSitesClient) deleteStaticSiteUserCreateRequest(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, options *StaticSitesClientDeleteStaticSiteUserOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if authprovider == "" { - return nil, errors.New("parameter authprovider cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{authprovider}", url.PathEscape(authprovider)) - if userid == "" { - return nil, errors.New("parameter userid cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userid}", url.PathEscape(userid)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDetachStaticSite - Detaches a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site to detach. -// options - StaticSitesClientBeginDetachStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDetachStaticSite -// method. -func (client *StaticSitesClient) BeginDetachStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDetachStaticSiteOptions) (*runtime.Poller[StaticSitesClientDetachStaticSiteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.detachStaticSite(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientDetachStaticSiteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientDetachStaticSiteResponse](options.ResumeToken, client.pl, nil) - } -} - -// DetachStaticSite - Detaches a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) detachStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDetachStaticSiteOptions) (*http.Response, error) { - req, err := client.detachStaticSiteCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// detachStaticSiteCreateRequest creates the DetachStaticSite request. -func (client *StaticSitesClient) detachStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDetachStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DetachUserProvidedFunctionAppFromStaticSite - Detach the user provided function app from the static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// functionAppName - Name of the function app registered with the static site. -// options - StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions contains the optional parameters for the -// StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite method. -func (client *StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions) (StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse, error) { - req, err := client.detachUserProvidedFunctionAppFromStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, options) - if err != nil { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, runtime.NewResponseError(resp) - } - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, nil -} - -// detachUserProvidedFunctionAppFromStaticSiteCreateRequest creates the DetachUserProvidedFunctionAppFromStaticSite request. -func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionAppName == "" { - return nil, errors.New("parameter functionAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DetachUserProvidedFunctionAppFromStaticSiteBuild - Detach the user provided function app from the static site build -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// 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. -// options - StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions contains the optional parameters for -// the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild method. -func (client *StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions) (StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse, error) { - req, err := client.detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, options) - if err != nil { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, runtime.NewResponseError(resp) - } - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, nil -} - -// detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest creates the DetachUserProvidedFunctionAppFromStaticSiteBuild request. -func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if functionAppName == "" { - return nil, errors.New("parameter functionAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GetPrivateEndpointConnection - Gets a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// privateEndpointConnectionName - Name of the private endpoint connection. -// options - StaticSitesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnection -// method. -func (client *StaticSitesClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientGetPrivateEndpointConnectionOptions) (StaticSitesClientGetPrivateEndpointConnectionResponse, error) { - req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) - if err != nil { - return StaticSitesClientGetPrivateEndpointConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetPrivateEndpointConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetPrivateEndpointConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateEndpointConnectionHandleResponse(resp) -} - -// getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. -func (client *StaticSitesClient) getPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientGetPrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateEndpointConnectionHandleResponse handles the GetPrivateEndpointConnection response. -func (client *StaticSitesClient) getPrivateEndpointConnectionHandleResponse(resp *http.Response) (StaticSitesClientGetPrivateEndpointConnectionResponse, error) { - result := StaticSitesClientGetPrivateEndpointConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RemotePrivateEndpointConnectionARMResource); err != nil { - return StaticSitesClientGetPrivateEndpointConnectionResponse{}, err - } - return result, nil -} - -// NewGetPrivateEndpointConnectionListPager - Gets the list of private endpoint connections associated with a static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnectionList -// method. -func (client *StaticSitesClient) NewGetPrivateEndpointConnectionListPager(resourceGroupName string, name string, options *StaticSitesClientGetPrivateEndpointConnectionListOptions) *runtime.Pager[StaticSitesClientGetPrivateEndpointConnectionListResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetPrivateEndpointConnectionListResponse]{ - More: func(page StaticSitesClientGetPrivateEndpointConnectionListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticSitesClientGetPrivateEndpointConnectionListResponse) (StaticSitesClientGetPrivateEndpointConnectionListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetPrivateEndpointConnectionListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetPrivateEndpointConnectionListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetPrivateEndpointConnectionListResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateEndpointConnectionListHandleResponse(resp) - }, - }) -} - -// getPrivateEndpointConnectionListCreateRequest creates the GetPrivateEndpointConnectionList request. -func (client *StaticSitesClient) getPrivateEndpointConnectionListCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetPrivateEndpointConnectionListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateEndpointConnectionListHandleResponse handles the GetPrivateEndpointConnectionList response. -func (client *StaticSitesClient) getPrivateEndpointConnectionListHandleResponse(resp *http.Response) (StaticSitesClientGetPrivateEndpointConnectionListResponse, error) { - result := StaticSitesClientGetPrivateEndpointConnectionListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionCollection); err != nil { - return StaticSitesClientGetPrivateEndpointConnectionListResponse{}, err - } - return result, nil -} - -// GetPrivateLinkResources - Gets the private link resources -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// options - StaticSitesClientGetPrivateLinkResourcesOptions contains the optional parameters for the StaticSitesClient.GetPrivateLinkResources -// method. -func (client *StaticSitesClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetPrivateLinkResourcesOptions) (StaticSitesClientGetPrivateLinkResourcesResponse, error) { - req, err := client.getPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return StaticSitesClientGetPrivateLinkResourcesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetPrivateLinkResourcesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetPrivateLinkResourcesResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateLinkResourcesHandleResponse(resp) -} - -// getPrivateLinkResourcesCreateRequest creates the GetPrivateLinkResources request. -func (client *StaticSitesClient) getPrivateLinkResourcesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetPrivateLinkResourcesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateLinkResourcesHandleResponse handles the GetPrivateLinkResources response. -func (client *StaticSitesClient) getPrivateLinkResourcesHandleResponse(resp *http.Response) (StaticSitesClientGetPrivateLinkResourcesResponse, error) { - result := StaticSitesClientGetPrivateLinkResourcesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourcesWrapper); err != nil { - return StaticSitesClientGetPrivateLinkResourcesResponse{}, err - } - return result, nil -} - -// GetStaticSite - Gets the details of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientGetStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetStaticSite -// method. -func (client *StaticSitesClient) GetStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetStaticSiteOptions) (StaticSitesClientGetStaticSiteResponse, error) { - req, err := client.getStaticSiteCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return StaticSitesClientGetStaticSiteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetStaticSiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetStaticSiteResponse{}, runtime.NewResponseError(resp) - } - return client.getStaticSiteHandleResponse(resp) -} - -// getStaticSiteCreateRequest creates the GetStaticSite request. -func (client *StaticSitesClient) getStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getStaticSiteHandleResponse handles the GetStaticSite response. -func (client *StaticSitesClient) getStaticSiteHandleResponse(resp *http.Response) (StaticSitesClientGetStaticSiteResponse, error) { - result := StaticSitesClientGetStaticSiteResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteARMResource); err != nil { - return StaticSitesClientGetStaticSiteResponse{}, err - } - return result, nil -} - -// GetStaticSiteBuild - Gets the details of a static site build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// environmentName - The stage site identifier. -// options - StaticSitesClientGetStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteBuild -// method. -func (client *StaticSitesClient) GetStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetStaticSiteBuildOptions) (StaticSitesClientGetStaticSiteBuildResponse, error) { - req, err := client.getStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) - if err != nil { - return StaticSitesClientGetStaticSiteBuildResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetStaticSiteBuildResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetStaticSiteBuildResponse{}, runtime.NewResponseError(resp) - } - return client.getStaticSiteBuildHandleResponse(resp) -} - -// getStaticSiteBuildCreateRequest creates the GetStaticSiteBuild request. -func (client *StaticSitesClient) getStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetStaticSiteBuildOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getStaticSiteBuildHandleResponse handles the GetStaticSiteBuild response. -func (client *StaticSitesClient) getStaticSiteBuildHandleResponse(resp *http.Response) (StaticSitesClientGetStaticSiteBuildResponse, error) { - result := StaticSitesClientGetStaticSiteBuildResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteBuildARMResource); err != nil { - return StaticSitesClientGetStaticSiteBuildResponse{}, err - } - return result, nil -} - -// NewGetStaticSiteBuildsPager - Gets all static site builds for a particular static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientGetStaticSiteBuildsOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteBuilds -// method. -func (client *StaticSitesClient) NewGetStaticSiteBuildsPager(resourceGroupName string, name string, options *StaticSitesClientGetStaticSiteBuildsOptions) *runtime.Pager[StaticSitesClientGetStaticSiteBuildsResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetStaticSiteBuildsResponse]{ - More: func(page StaticSitesClientGetStaticSiteBuildsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticSitesClientGetStaticSiteBuildsResponse) (StaticSitesClientGetStaticSiteBuildsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getStaticSiteBuildsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetStaticSiteBuildsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetStaticSiteBuildsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetStaticSiteBuildsResponse{}, runtime.NewResponseError(resp) - } - return client.getStaticSiteBuildsHandleResponse(resp) - }, - }) -} - -// getStaticSiteBuildsCreateRequest creates the GetStaticSiteBuilds request. -func (client *StaticSitesClient) getStaticSiteBuildsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetStaticSiteBuildsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getStaticSiteBuildsHandleResponse handles the GetStaticSiteBuilds response. -func (client *StaticSitesClient) getStaticSiteBuildsHandleResponse(resp *http.Response) (StaticSitesClientGetStaticSiteBuildsResponse, error) { - result := StaticSitesClientGetStaticSiteBuildsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteBuildCollection); err != nil { - return StaticSitesClientGetStaticSiteBuildsResponse{}, err - } - return result, nil -} - -// GetStaticSiteCustomDomain - Gets an existing custom domain for a particular static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site resource to search in. -// domainName - The custom domain name. -// options - StaticSitesClientGetStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteCustomDomain -// method. -func (client *StaticSitesClient) GetStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientGetStaticSiteCustomDomainOptions) (StaticSitesClientGetStaticSiteCustomDomainResponse, error) { - req, err := client.getStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, options) - if err != nil { - return StaticSitesClientGetStaticSiteCustomDomainResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetStaticSiteCustomDomainResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetStaticSiteCustomDomainResponse{}, runtime.NewResponseError(resp) - } - return client.getStaticSiteCustomDomainHandleResponse(resp) -} - -// getStaticSiteCustomDomainCreateRequest creates the GetStaticSiteCustomDomain request. -func (client *StaticSitesClient) getStaticSiteCustomDomainCreateRequest(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientGetStaticSiteCustomDomainOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getStaticSiteCustomDomainHandleResponse handles the GetStaticSiteCustomDomain response. -func (client *StaticSitesClient) getStaticSiteCustomDomainHandleResponse(resp *http.Response) (StaticSitesClientGetStaticSiteCustomDomainResponse, error) { - result := StaticSitesClientGetStaticSiteCustomDomainResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteCustomDomainOverviewARMResource); err != nil { - return StaticSitesClientGetStaticSiteCustomDomainResponse{}, err - } - return result, nil -} - -// NewGetStaticSitesByResourceGroupPager - Gets all static sites in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - StaticSitesClientGetStaticSitesByResourceGroupOptions contains the optional parameters for the StaticSitesClient.GetStaticSitesByResourceGroup -// method. -func (client *StaticSitesClient) NewGetStaticSitesByResourceGroupPager(resourceGroupName string, options *StaticSitesClientGetStaticSitesByResourceGroupOptions) *runtime.Pager[StaticSitesClientGetStaticSitesByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetStaticSitesByResourceGroupResponse]{ - More: func(page StaticSitesClientGetStaticSitesByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticSitesClientGetStaticSitesByResourceGroupResponse) (StaticSitesClientGetStaticSitesByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getStaticSitesByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetStaticSitesByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetStaticSitesByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetStaticSitesByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.getStaticSitesByResourceGroupHandleResponse(resp) - }, - }) -} - -// getStaticSitesByResourceGroupCreateRequest creates the GetStaticSitesByResourceGroup request. -func (client *StaticSitesClient) getStaticSitesByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *StaticSitesClientGetStaticSitesByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getStaticSitesByResourceGroupHandleResponse handles the GetStaticSitesByResourceGroup response. -func (client *StaticSitesClient) getStaticSitesByResourceGroupHandleResponse(resp *http.Response) (StaticSitesClientGetStaticSitesByResourceGroupResponse, error) { - result := StaticSitesClientGetStaticSitesByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteCollection); err != nil { - return StaticSitesClientGetStaticSitesByResourceGroupResponse{}, err - } - return result, nil -} - -// GetUserProvidedFunctionAppForStaticSite - Gets the details of the user provided function app registered with a static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// functionAppName - Name of the function app registered with the static site. -// options - StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSite -// method. -func (client *StaticSitesClient) GetUserProvidedFunctionAppForStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions) (StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse, error) { - req, err := client.getUserProvidedFunctionAppForStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, options) - if err != nil { - return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, runtime.NewResponseError(resp) - } - return client.getUserProvidedFunctionAppForStaticSiteHandleResponse(resp) -} - -// getUserProvidedFunctionAppForStaticSiteCreateRequest creates the GetUserProvidedFunctionAppForStaticSite request. -func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionAppName == "" { - return nil, errors.New("parameter functionAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getUserProvidedFunctionAppForStaticSiteHandleResponse handles the GetUserProvidedFunctionAppForStaticSite response. -func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteHandleResponse(resp *http.Response) (StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse, error) { - result := StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserProvidedFunctionAppARMResource); err != nil { - return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, err - } - return result, nil -} - -// GetUserProvidedFunctionAppForStaticSiteBuild - Gets the details of the user provided function app registered with a static -// site build -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// 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. -// options - StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions contains the optional parameters for the -// StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild method. -func (client *StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions) (StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse, error) { - req, err := client.getUserProvidedFunctionAppForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, options) - if err != nil { - return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, runtime.NewResponseError(resp) - } - return client.getUserProvidedFunctionAppForStaticSiteBuildHandleResponse(resp) -} - -// getUserProvidedFunctionAppForStaticSiteBuildCreateRequest creates the GetUserProvidedFunctionAppForStaticSiteBuild request. -func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if functionAppName == "" { - return nil, errors.New("parameter functionAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getUserProvidedFunctionAppForStaticSiteBuildHandleResponse handles the GetUserProvidedFunctionAppForStaticSiteBuild response. -func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteBuildHandleResponse(resp *http.Response) (StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse, error) { - result := StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserProvidedFunctionAppARMResource); err != nil { - return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, err - } - return result, nil -} - -// NewGetUserProvidedFunctionAppsForStaticSitePager - Gets the details of the user provided function apps registered with -// a static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppsForStaticSite -// method. -func (client *StaticSitesClient) NewGetUserProvidedFunctionAppsForStaticSitePager(resourceGroupName string, name string, options *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions) *runtime.Pager[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse]{ - More: func(page StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse) (StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getUserProvidedFunctionAppsForStaticSiteCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{}, runtime.NewResponseError(resp) - } - return client.getUserProvidedFunctionAppsForStaticSiteHandleResponse(resp) - }, - }) -} - -// getUserProvidedFunctionAppsForStaticSiteCreateRequest creates the GetUserProvidedFunctionAppsForStaticSite request. -func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getUserProvidedFunctionAppsForStaticSiteHandleResponse handles the GetUserProvidedFunctionAppsForStaticSite response. -func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteHandleResponse(resp *http.Response) (StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse, error) { - result := StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserProvidedFunctionAppsCollection); err != nil { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{}, err - } - return result, nil -} - -// NewGetUserProvidedFunctionAppsForStaticSiteBuildPager - Gets the details of the user provided function apps registered -// with a static site build -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// environmentName - The stage site identifier. -// options - StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions contains the optional parameters for the -// StaticSitesClient.GetUserProvidedFunctionAppsForStaticSiteBuild method. -func (client *StaticSitesClient) NewGetUserProvidedFunctionAppsForStaticSiteBuildPager(resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions) *runtime.Pager[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse]{ - More: func(page StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse) (StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getUserProvidedFunctionAppsForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{}, runtime.NewResponseError(resp) - } - return client.getUserProvidedFunctionAppsForStaticSiteBuildHandleResponse(resp) - }, - }) -} - -// getUserProvidedFunctionAppsForStaticSiteBuildCreateRequest creates the GetUserProvidedFunctionAppsForStaticSiteBuild request. -func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getUserProvidedFunctionAppsForStaticSiteBuildHandleResponse handles the GetUserProvidedFunctionAppsForStaticSiteBuild response. -func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildHandleResponse(resp *http.Response) (StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse, error) { - result := StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserProvidedFunctionAppsCollection); err != nil { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{}, err - } - return result, nil -} - -// NewListPager - Get all Static Sites for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - StaticSitesClientListOptions contains the optional parameters for the StaticSitesClient.List method. -func (client *StaticSitesClient) NewListPager(options *StaticSitesClientListOptions) *runtime.Pager[StaticSitesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListResponse]{ - More: func(page StaticSitesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticSitesClientListResponse) (StaticSitesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *StaticSitesClient) listCreateRequest(ctx context.Context, options *StaticSitesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *StaticSitesClient) listHandleResponse(resp *http.Response) (StaticSitesClientListResponse, error) { - result := StaticSitesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteCollection); err != nil { - return StaticSitesClientListResponse{}, err - } - return result, nil -} - -// ListStaticSiteAppSettings - Gets the application settings of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientListStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteAppSettings -// method. -func (client *StaticSitesClient) ListStaticSiteAppSettings(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteAppSettingsOptions) (StaticSitesClientListStaticSiteAppSettingsResponse, error) { - req, err := client.listStaticSiteAppSettingsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return StaticSitesClientListStaticSiteAppSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListStaticSiteAppSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteAppSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.listStaticSiteAppSettingsHandleResponse(resp) -} - -// listStaticSiteAppSettingsCreateRequest creates the ListStaticSiteAppSettings request. -func (client *StaticSitesClient) listStaticSiteAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteAppSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listStaticSiteAppSettingsHandleResponse handles the ListStaticSiteAppSettings response. -func (client *StaticSitesClient) listStaticSiteAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteAppSettingsResponse, error) { - result := StaticSitesClientListStaticSiteAppSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return StaticSitesClientListStaticSiteAppSettingsResponse{}, err - } - return result, nil -} - -// ListStaticSiteBuildAppSettings - Gets the application settings of a static site build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// environmentName - The stage site identifier. -// options - StaticSitesClientListStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildAppSettings -// method. -func (client *StaticSitesClient) ListStaticSiteBuildAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildAppSettingsOptions) (StaticSitesClientListStaticSiteBuildAppSettingsResponse, error) { - req, err := client.listStaticSiteBuildAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, options) - if err != nil { - return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.listStaticSiteBuildAppSettingsHandleResponse(resp) -} - -// listStaticSiteBuildAppSettingsCreateRequest creates the ListStaticSiteBuildAppSettings request. -func (client *StaticSitesClient) listStaticSiteBuildAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildAppSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listStaticSiteBuildAppSettingsHandleResponse handles the ListStaticSiteBuildAppSettings response. -func (client *StaticSitesClient) listStaticSiteBuildAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteBuildAppSettingsResponse, error) { - result := StaticSitesClientListStaticSiteBuildAppSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, err - } - return result, nil -} - -// ListStaticSiteBuildFunctionAppSettings - Gets the application settings of a static site build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// environmentName - The stage site identifier. -// options - StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildFunctionAppSettings -// method. -func (client *StaticSitesClient) ListStaticSiteBuildFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions) (StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse, error) { - req, err := client.listStaticSiteBuildFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, options) - if err != nil { - return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.listStaticSiteBuildFunctionAppSettingsHandleResponse(resp) -} - -// listStaticSiteBuildFunctionAppSettingsCreateRequest creates the ListStaticSiteBuildFunctionAppSettings request. -func (client *StaticSitesClient) listStaticSiteBuildFunctionAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listStaticSiteBuildFunctionAppSettingsHandleResponse handles the ListStaticSiteBuildFunctionAppSettings response. -func (client *StaticSitesClient) listStaticSiteBuildFunctionAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse, error) { - result := StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, err - } - return result, nil -} - -// NewListStaticSiteBuildFunctionsPager - Gets the functions of a particular static site build. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// environmentName - The stage site identifier. -// options - StaticSitesClientListStaticSiteBuildFunctionsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildFunctions -// method. -func (client *StaticSitesClient) NewListStaticSiteBuildFunctionsPager(resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildFunctionsOptions) *runtime.Pager[StaticSitesClientListStaticSiteBuildFunctionsResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListStaticSiteBuildFunctionsResponse]{ - More: func(page StaticSitesClientListStaticSiteBuildFunctionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteBuildFunctionsResponse) (StaticSitesClientListStaticSiteBuildFunctionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listStaticSiteBuildFunctionsCreateRequest(ctx, resourceGroupName, name, environmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientListStaticSiteBuildFunctionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListStaticSiteBuildFunctionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteBuildFunctionsResponse{}, runtime.NewResponseError(resp) - } - return client.listStaticSiteBuildFunctionsHandleResponse(resp) - }, - }) -} - -// listStaticSiteBuildFunctionsCreateRequest creates the ListStaticSiteBuildFunctions request. -func (client *StaticSitesClient) listStaticSiteBuildFunctionsCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildFunctionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listStaticSiteBuildFunctionsHandleResponse handles the ListStaticSiteBuildFunctions response. -func (client *StaticSitesClient) listStaticSiteBuildFunctionsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteBuildFunctionsResponse, error) { - result := StaticSitesClientListStaticSiteBuildFunctionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteFunctionOverviewCollection); err != nil { - return StaticSitesClientListStaticSiteBuildFunctionsResponse{}, err - } - return result, nil -} - -// ListStaticSiteConfiguredRoles - Lists the roles configured for the static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientListStaticSiteConfiguredRolesOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteConfiguredRoles -// method. -func (client *StaticSitesClient) ListStaticSiteConfiguredRoles(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteConfiguredRolesOptions) (StaticSitesClientListStaticSiteConfiguredRolesResponse, error) { - req, err := client.listStaticSiteConfiguredRolesCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, runtime.NewResponseError(resp) - } - return client.listStaticSiteConfiguredRolesHandleResponse(resp) -} - -// listStaticSiteConfiguredRolesCreateRequest creates the ListStaticSiteConfiguredRoles request. -func (client *StaticSitesClient) listStaticSiteConfiguredRolesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteConfiguredRolesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listStaticSiteConfiguredRolesHandleResponse handles the ListStaticSiteConfiguredRoles response. -func (client *StaticSitesClient) listStaticSiteConfiguredRolesHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteConfiguredRolesResponse, error) { - result := StaticSitesClientListStaticSiteConfiguredRolesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringList); err != nil { - return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, err - } - return result, nil -} - -// NewListStaticSiteCustomDomainsPager - Gets all static site custom domains for a particular static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site resource to search in. -// options - StaticSitesClientListStaticSiteCustomDomainsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteCustomDomains -// method. -func (client *StaticSitesClient) NewListStaticSiteCustomDomainsPager(resourceGroupName string, name string, options *StaticSitesClientListStaticSiteCustomDomainsOptions) *runtime.Pager[StaticSitesClientListStaticSiteCustomDomainsResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListStaticSiteCustomDomainsResponse]{ - More: func(page StaticSitesClientListStaticSiteCustomDomainsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteCustomDomainsResponse) (StaticSitesClientListStaticSiteCustomDomainsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listStaticSiteCustomDomainsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientListStaticSiteCustomDomainsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListStaticSiteCustomDomainsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteCustomDomainsResponse{}, runtime.NewResponseError(resp) - } - return client.listStaticSiteCustomDomainsHandleResponse(resp) - }, - }) -} - -// listStaticSiteCustomDomainsCreateRequest creates the ListStaticSiteCustomDomains request. -func (client *StaticSitesClient) listStaticSiteCustomDomainsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteCustomDomainsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listStaticSiteCustomDomainsHandleResponse handles the ListStaticSiteCustomDomains response. -func (client *StaticSitesClient) listStaticSiteCustomDomainsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteCustomDomainsResponse, error) { - result := StaticSitesClientListStaticSiteCustomDomainsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteCustomDomainOverviewCollection); err != nil { - return StaticSitesClientListStaticSiteCustomDomainsResponse{}, err - } - return result, nil -} - -// ListStaticSiteFunctionAppSettings - Gets the application settings of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientListStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctionAppSettings -// method. -func (client *StaticSitesClient) ListStaticSiteFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteFunctionAppSettingsOptions) (StaticSitesClientListStaticSiteFunctionAppSettingsResponse, error) { - req, err := client.listStaticSiteFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.listStaticSiteFunctionAppSettingsHandleResponse(resp) -} - -// listStaticSiteFunctionAppSettingsCreateRequest creates the ListStaticSiteFunctionAppSettings request. -func (client *StaticSitesClient) listStaticSiteFunctionAppSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteFunctionAppSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listStaticSiteFunctionAppSettingsHandleResponse handles the ListStaticSiteFunctionAppSettings response. -func (client *StaticSitesClient) listStaticSiteFunctionAppSettingsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteFunctionAppSettingsResponse, error) { - result := StaticSitesClientListStaticSiteFunctionAppSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, err - } - return result, nil -} - -// NewListStaticSiteFunctionsPager - Gets the functions of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientListStaticSiteFunctionsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctions -// method. -func (client *StaticSitesClient) NewListStaticSiteFunctionsPager(resourceGroupName string, name string, options *StaticSitesClientListStaticSiteFunctionsOptions) *runtime.Pager[StaticSitesClientListStaticSiteFunctionsResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListStaticSiteFunctionsResponse]{ - More: func(page StaticSitesClientListStaticSiteFunctionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteFunctionsResponse) (StaticSitesClientListStaticSiteFunctionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listStaticSiteFunctionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientListStaticSiteFunctionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListStaticSiteFunctionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteFunctionsResponse{}, runtime.NewResponseError(resp) - } - return client.listStaticSiteFunctionsHandleResponse(resp) - }, - }) -} - -// listStaticSiteFunctionsCreateRequest creates the ListStaticSiteFunctions request. -func (client *StaticSitesClient) listStaticSiteFunctionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteFunctionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listStaticSiteFunctionsHandleResponse handles the ListStaticSiteFunctions response. -func (client *StaticSitesClient) listStaticSiteFunctionsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteFunctionsResponse, error) { - result := StaticSitesClientListStaticSiteFunctionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteFunctionOverviewCollection); err != nil { - return StaticSitesClientListStaticSiteFunctionsResponse{}, err - } - return result, nil -} - -// ListStaticSiteSecrets - Lists the secrets for an existing static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientListStaticSiteSecretsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteSecrets -// method. -func (client *StaticSitesClient) ListStaticSiteSecrets(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteSecretsOptions) (StaticSitesClientListStaticSiteSecretsResponse, error) { - req, err := client.listStaticSiteSecretsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return StaticSitesClientListStaticSiteSecretsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListStaticSiteSecretsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteSecretsResponse{}, runtime.NewResponseError(resp) - } - return client.listStaticSiteSecretsHandleResponse(resp) -} - -// listStaticSiteSecretsCreateRequest creates the ListStaticSiteSecrets request. -func (client *StaticSitesClient) listStaticSiteSecretsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteSecretsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listStaticSiteSecretsHandleResponse handles the ListStaticSiteSecrets response. -func (client *StaticSitesClient) listStaticSiteSecretsHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteSecretsResponse, error) { - result := StaticSitesClientListStaticSiteSecretsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return StaticSitesClientListStaticSiteSecretsResponse{}, err - } - return result, nil -} - -// NewListStaticSiteUsersPager - Gets the list of users of a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// authprovider - The auth provider for the users. -// options - StaticSitesClientListStaticSiteUsersOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteUsers -// method. -func (client *StaticSitesClient) NewListStaticSiteUsersPager(resourceGroupName string, name string, authprovider string, options *StaticSitesClientListStaticSiteUsersOptions) *runtime.Pager[StaticSitesClientListStaticSiteUsersResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListStaticSiteUsersResponse]{ - More: func(page StaticSitesClientListStaticSiteUsersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteUsersResponse) (StaticSitesClientListStaticSiteUsersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listStaticSiteUsersCreateRequest(ctx, resourceGroupName, name, authprovider, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientListStaticSiteUsersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientListStaticSiteUsersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteUsersResponse{}, runtime.NewResponseError(resp) - } - return client.listStaticSiteUsersHandleResponse(resp) - }, - }) -} - -// listStaticSiteUsersCreateRequest creates the ListStaticSiteUsers request. -func (client *StaticSitesClient) listStaticSiteUsersCreateRequest(ctx context.Context, resourceGroupName string, name string, authprovider string, options *StaticSitesClientListStaticSiteUsersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if authprovider == "" { - return nil, errors.New("parameter authprovider cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{authprovider}", url.PathEscape(authprovider)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listStaticSiteUsersHandleResponse handles the ListStaticSiteUsers response. -func (client *StaticSitesClient) listStaticSiteUsersHandleResponse(resp *http.Response) (StaticSitesClientListStaticSiteUsersResponse, error) { - result := StaticSitesClientListStaticSiteUsersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserCollection); err != nil { - return StaticSitesClientListStaticSiteUsersResponse{}, err - } - return result, nil -} - -// PreviewWorkflow - Generates a preview workflow file for the static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// location - Location where you plan to create the static site. -// staticSitesWorkflowPreviewRequest - A JSON representation of the StaticSitesWorkflowPreviewRequest properties. See example. -// options - StaticSitesClientPreviewWorkflowOptions contains the optional parameters for the StaticSitesClient.PreviewWorkflow -// method. -func (client *StaticSitesClient) PreviewWorkflow(ctx context.Context, location string, staticSitesWorkflowPreviewRequest StaticSitesWorkflowPreviewRequest, options *StaticSitesClientPreviewWorkflowOptions) (StaticSitesClientPreviewWorkflowResponse, error) { - req, err := client.previewWorkflowCreateRequest(ctx, location, staticSitesWorkflowPreviewRequest, options) - if err != nil { - return StaticSitesClientPreviewWorkflowResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientPreviewWorkflowResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientPreviewWorkflowResponse{}, runtime.NewResponseError(resp) - } - return client.previewWorkflowHandleResponse(resp) -} - -// previewWorkflowCreateRequest creates the PreviewWorkflow request. -func (client *StaticSitesClient) previewWorkflowCreateRequest(ctx context.Context, location string, staticSitesWorkflowPreviewRequest StaticSitesWorkflowPreviewRequest, options *StaticSitesClientPreviewWorkflowOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSitesWorkflowPreviewRequest) -} - -// previewWorkflowHandleResponse handles the PreviewWorkflow response. -func (client *StaticSitesClient) previewWorkflowHandleResponse(resp *http.Response) (StaticSitesClientPreviewWorkflowResponse, error) { - result := StaticSitesClientPreviewWorkflowResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSitesWorkflowPreview); err != nil { - return StaticSitesClientPreviewWorkflowResponse{}, err - } - return result, nil -} - -// BeginRegisterUserProvidedFunctionAppWithStaticSite - Register a user provided function app with a static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// 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. -// options - StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions contains the optional parameters for -// the StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite method. -func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions) (*runtime.Poller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.registerUserProvidedFunctionAppWithStaticSite(ctx, resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse](options.ResumeToken, client.pl, nil) - } -} - -// RegisterUserProvidedFunctionAppWithStaticSite - Register a user provided function app with a static site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions) (*http.Response, error) { - req, err := client.registerUserProvidedFunctionAppWithStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// registerUserProvidedFunctionAppWithStaticSiteCreateRequest creates the RegisterUserProvidedFunctionAppWithStaticSite request. -func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionAppName == "" { - return nil, errors.New("parameter functionAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.IsForced != nil { - reqQP.Set("isForced", strconv.FormatBool(*options.IsForced)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope) -} - -// BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild - Register a user provided function app with a static site build -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// 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. -// options - StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions contains the optional parameters -// for the StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild method. -func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions) (*runtime.Poller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.registerUserProvidedFunctionAppWithStaticSiteBuild(ctx, resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse](options.ResumeToken, client.pl, nil) - } -} - -// RegisterUserProvidedFunctionAppWithStaticSiteBuild - Register a user provided function app with a static site build -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions) (*http.Response, error) { - req, err := client.registerUserProvidedFunctionAppWithStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// registerUserProvidedFunctionAppWithStaticSiteBuildCreateRequest creates the RegisterUserProvidedFunctionAppWithStaticSiteBuild request. -func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBuildCreateRequest(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if environmentName == "" { - return nil, errors.New("parameter environmentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) - if functionAppName == "" { - return nil, errors.New("parameter functionAppName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionAppName}", url.PathEscape(functionAppName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.IsForced != nil { - reqQP.Set("isForced", strconv.FormatBool(*options.IsForced)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope) -} - -// ResetStaticSiteAPIKey - Resets the api key for an existing static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// options - StaticSitesClientResetStaticSiteAPIKeyOptions contains the optional parameters for the StaticSitesClient.ResetStaticSiteAPIKey -// method. -func (client *StaticSitesClient) ResetStaticSiteAPIKey(ctx context.Context, resourceGroupName string, name string, resetPropertiesEnvelope StaticSiteResetPropertiesARMResource, options *StaticSitesClientResetStaticSiteAPIKeyOptions) (StaticSitesClientResetStaticSiteAPIKeyResponse, error) { - req, err := client.resetStaticSiteAPIKeyCreateRequest(ctx, resourceGroupName, name, resetPropertiesEnvelope, options) - if err != nil { - return StaticSitesClientResetStaticSiteAPIKeyResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientResetStaticSiteAPIKeyResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientResetStaticSiteAPIKeyResponse{}, runtime.NewResponseError(resp) - } - return StaticSitesClientResetStaticSiteAPIKeyResponse{}, nil -} - -// resetStaticSiteAPIKeyCreateRequest creates the ResetStaticSiteAPIKey request. -func (client *StaticSitesClient) resetStaticSiteAPIKeyCreateRequest(ctx context.Context, resourceGroupName string, name string, resetPropertiesEnvelope StaticSiteResetPropertiesARMResource, options *StaticSitesClientResetStaticSiteAPIKeyOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resetPropertiesEnvelope) -} - -// UpdateStaticSite - Creates a new static site in an existing resource group, or updates an existing static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site to create or update. -// staticSiteEnvelope - A JSON representation of the staticsite properties. See example. -// options - StaticSitesClientUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSite -// method. -func (client *StaticSitesClient) UpdateStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSitePatchResource, options *StaticSitesClientUpdateStaticSiteOptions) (StaticSitesClientUpdateStaticSiteResponse, error) { - req, err := client.updateStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteEnvelope, options) - if err != nil { - return StaticSitesClientUpdateStaticSiteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientUpdateStaticSiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return StaticSitesClientUpdateStaticSiteResponse{}, runtime.NewResponseError(resp) - } - return client.updateStaticSiteHandleResponse(resp) -} - -// updateStaticSiteCreateRequest creates the UpdateStaticSite request. -func (client *StaticSitesClient) updateStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSitePatchResource, options *StaticSitesClientUpdateStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteEnvelope) -} - -// updateStaticSiteHandleResponse handles the UpdateStaticSite response. -func (client *StaticSitesClient) updateStaticSiteHandleResponse(resp *http.Response) (StaticSitesClientUpdateStaticSiteResponse, error) { - result := StaticSitesClientUpdateStaticSiteResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteARMResource); err != nil { - return StaticSitesClientUpdateStaticSiteResponse{}, err - } - return result, nil -} - -// UpdateStaticSiteUser - Updates a user entry with the listed roles -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// authprovider - The auth provider for this user. -// userid - The user id of the user. -// staticSiteUserEnvelope - A JSON representation of the StaticSiteUser properties. See example. -// options - StaticSitesClientUpdateStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSiteUser -// method. -func (client *StaticSitesClient) UpdateStaticSiteUser(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, staticSiteUserEnvelope StaticSiteUserARMResource, options *StaticSitesClientUpdateStaticSiteUserOptions) (StaticSitesClientUpdateStaticSiteUserResponse, error) { - req, err := client.updateStaticSiteUserCreateRequest(ctx, resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope, options) - if err != nil { - return StaticSitesClientUpdateStaticSiteUserResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticSitesClientUpdateStaticSiteUserResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientUpdateStaticSiteUserResponse{}, runtime.NewResponseError(resp) - } - return client.updateStaticSiteUserHandleResponse(resp) -} - -// updateStaticSiteUserCreateRequest creates the UpdateStaticSiteUser request. -func (client *StaticSitesClient) updateStaticSiteUserCreateRequest(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, staticSiteUserEnvelope StaticSiteUserARMResource, options *StaticSitesClientUpdateStaticSiteUserOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if authprovider == "" { - return nil, errors.New("parameter authprovider cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{authprovider}", url.PathEscape(authprovider)) - if userid == "" { - return nil, errors.New("parameter userid cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userid}", url.PathEscape(userid)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteUserEnvelope) -} - -// updateStaticSiteUserHandleResponse handles the UpdateStaticSiteUser response. -func (client *StaticSitesClient) updateStaticSiteUserHandleResponse(resp *http.Response) (StaticSitesClientUpdateStaticSiteUserResponse, error) { - result := StaticSitesClientUpdateStaticSiteUserResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticSiteUserARMResource); err != nil { - return StaticSitesClientUpdateStaticSiteUserResponse{}, err - } - return result, nil -} - -// BeginValidateCustomDomainCanBeAddedToStaticSite - Validates a particular custom domain can be added to a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the static site. -// domainName - The custom domain to validate. -// staticSiteCustomDomainRequestPropertiesEnvelope - A JSON representation of the static site custom domain request properties. -// See example. -// options - StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions contains the optional parameters for -// the StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite method. -func (client *StaticSitesClient) BeginValidateCustomDomainCanBeAddedToStaticSite(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions) (*runtime.Poller[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.validateCustomDomainCanBeAddedToStaticSite(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse](options.ResumeToken, client.pl, nil) - } -} - -// ValidateCustomDomainCanBeAddedToStaticSite - Validates a particular custom domain can be added to a static site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *StaticSitesClient) validateCustomDomainCanBeAddedToStaticSite(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions) (*http.Response, error) { - req, err := client.validateCustomDomainCanBeAddedToStaticSiteCreateRequest(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// validateCustomDomainCanBeAddedToStaticSiteCreateRequest creates the ValidateCustomDomainCanBeAddedToStaticSite request. -func (client *StaticSitesClient) validateCustomDomainCanBeAddedToStaticSiteCreateRequest(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainName == "" { - return nil, errors.New("parameter domainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainName}", url.PathEscape(domainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_time_rfc3339.go deleted file mode 100644 index c5897c2a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_time_rfc3339.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_topleveldomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_topleveldomains_client.go deleted file mode 100644 index 11bcab9d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_topleveldomains_client.go +++ /dev/null @@ -1,231 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// TopLevelDomainsClient contains the methods for the TopLevelDomains group. -// Don't use this type directly, use NewTopLevelDomainsClient() instead. -type TopLevelDomainsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewTopLevelDomainsClient creates a new instance of TopLevelDomainsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewTopLevelDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TopLevelDomainsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &TopLevelDomainsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get details of a top-level domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// name - Name of the top-level domain. -// options - TopLevelDomainsClientGetOptions contains the optional parameters for the TopLevelDomainsClient.Get method. -func (client *TopLevelDomainsClient) Get(ctx context.Context, name string, options *TopLevelDomainsClientGetOptions) (TopLevelDomainsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, name, options) - if err != nil { - return TopLevelDomainsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return TopLevelDomainsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TopLevelDomainsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *TopLevelDomainsClient) getCreateRequest(ctx context.Context, name string, options *TopLevelDomainsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}" - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *TopLevelDomainsClient) getHandleResponse(resp *http.Response) (TopLevelDomainsClientGetResponse, error) { - result := TopLevelDomainsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TopLevelDomain); err != nil { - return TopLevelDomainsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get all top-level domains supported for registration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - TopLevelDomainsClientListOptions contains the optional parameters for the TopLevelDomainsClient.List method. -func (client *TopLevelDomainsClient) NewListPager(options *TopLevelDomainsClientListOptions) *runtime.Pager[TopLevelDomainsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[TopLevelDomainsClientListResponse]{ - More: func(page TopLevelDomainsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *TopLevelDomainsClientListResponse) (TopLevelDomainsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TopLevelDomainsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return TopLevelDomainsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TopLevelDomainsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *TopLevelDomainsClient) listCreateRequest(ctx context.Context, options *TopLevelDomainsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *TopLevelDomainsClient) listHandleResponse(resp *http.Response) (TopLevelDomainsClientListResponse, error) { - result := TopLevelDomainsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TopLevelDomainCollection); err != nil { - return TopLevelDomainsClientListResponse{}, err - } - return result, nil -} - -// NewListAgreementsPager - Gets all legal agreements that user needs to accept before purchasing a domain. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// name - Name of the top-level domain. -// agreementOption - Domain agreement options. -// options - TopLevelDomainsClientListAgreementsOptions contains the optional parameters for the TopLevelDomainsClient.ListAgreements -// method. -func (client *TopLevelDomainsClient) NewListAgreementsPager(name string, agreementOption TopLevelDomainAgreementOption, options *TopLevelDomainsClientListAgreementsOptions) *runtime.Pager[TopLevelDomainsClientListAgreementsResponse] { - return runtime.NewPager(runtime.PagingHandler[TopLevelDomainsClientListAgreementsResponse]{ - More: func(page TopLevelDomainsClientListAgreementsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *TopLevelDomainsClientListAgreementsResponse) (TopLevelDomainsClientListAgreementsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAgreementsCreateRequest(ctx, name, agreementOption, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TopLevelDomainsClientListAgreementsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return TopLevelDomainsClientListAgreementsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TopLevelDomainsClientListAgreementsResponse{}, runtime.NewResponseError(resp) - } - return client.listAgreementsHandleResponse(resp) - }, - }) -} - -// listAgreementsCreateRequest creates the ListAgreements request. -func (client *TopLevelDomainsClient) listAgreementsCreateRequest(ctx context.Context, name string, agreementOption TopLevelDomainAgreementOption, options *TopLevelDomainsClientListAgreementsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements" - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, agreementOption) -} - -// listAgreementsHandleResponse handles the ListAgreements response. -func (client *TopLevelDomainsClient) listAgreementsHandleResponse(resp *http.Response) (TopLevelDomainsClientListAgreementsResponse, error) { - result := TopLevelDomainsClientListAgreementsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TldLegalAgreementCollection); err != nil { - return TopLevelDomainsClientListAgreementsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_webapps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_webapps_client.go deleted file mode 100644 index 0ceae503..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_webapps_client.go +++ /dev/null @@ -1,25130 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// WebAppsClient contains the methods for the WebApps group. -// Don't use this type directly, use NewWebAppsClient() instead. -type WebAppsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewWebAppsClient creates a new instance of WebAppsClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewWebAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebAppsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &WebAppsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// AddPremierAddOn - Updates a named add-on of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// premierAddOnName - Add-on name. -// premierAddOn - A JSON representation of the edited premier add-on. -// options - WebAppsClientAddPremierAddOnOptions contains the optional parameters for the WebAppsClient.AddPremierAddOn method. -func (client *WebAppsClient) AddPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn, options *WebAppsClientAddPremierAddOnOptions) (WebAppsClientAddPremierAddOnResponse, error) { - req, err := client.addPremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, options) - if err != nil { - return WebAppsClientAddPremierAddOnResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientAddPremierAddOnResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientAddPremierAddOnResponse{}, runtime.NewResponseError(resp) - } - return client.addPremierAddOnHandleResponse(resp) -} - -// addPremierAddOnCreateRequest creates the AddPremierAddOn request. -func (client *WebAppsClient) addPremierAddOnCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn, options *WebAppsClientAddPremierAddOnOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if premierAddOnName == "" { - return nil, errors.New("parameter premierAddOnName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, premierAddOn) -} - -// addPremierAddOnHandleResponse handles the AddPremierAddOn response. -func (client *WebAppsClient) addPremierAddOnHandleResponse(resp *http.Response) (WebAppsClientAddPremierAddOnResponse, error) { - result := WebAppsClientAddPremierAddOnResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { - return WebAppsClientAddPremierAddOnResponse{}, err - } - return result, nil -} - -// AddPremierAddOnSlot - Updates a named add-on of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// premierAddOnName - Add-on name. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production -// slot. -// premierAddOn - A JSON representation of the edited premier add-on. -// options - WebAppsClientAddPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.AddPremierAddOnSlot -// method. -func (client *WebAppsClient) AddPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn PremierAddOn, options *WebAppsClientAddPremierAddOnSlotOptions) (WebAppsClientAddPremierAddOnSlotResponse, error) { - req, err := client.addPremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, premierAddOn, options) - if err != nil { - return WebAppsClientAddPremierAddOnSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientAddPremierAddOnSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientAddPremierAddOnSlotResponse{}, runtime.NewResponseError(resp) - } - return client.addPremierAddOnSlotHandleResponse(resp) -} - -// addPremierAddOnSlotCreateRequest creates the AddPremierAddOnSlot request. -func (client *WebAppsClient) addPremierAddOnSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn PremierAddOn, options *WebAppsClientAddPremierAddOnSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if premierAddOnName == "" { - return nil, errors.New("parameter premierAddOnName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, premierAddOn) -} - -// addPremierAddOnSlotHandleResponse handles the AddPremierAddOnSlot response. -func (client *WebAppsClient) addPremierAddOnSlotHandleResponse(resp *http.Response) (WebAppsClientAddPremierAddOnSlotResponse, error) { - result := WebAppsClientAddPremierAddOnSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { - return WebAppsClientAddPremierAddOnSlotResponse{}, err - } - return result, nil -} - -// AnalyzeCustomHostname - Analyze a custom hostname. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientAnalyzeCustomHostnameOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostname -// method. -func (client *WebAppsClient) AnalyzeCustomHostname(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientAnalyzeCustomHostnameOptions) (WebAppsClientAnalyzeCustomHostnameResponse, error) { - req, err := client.analyzeCustomHostnameCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientAnalyzeCustomHostnameResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientAnalyzeCustomHostnameResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientAnalyzeCustomHostnameResponse{}, runtime.NewResponseError(resp) - } - return client.analyzeCustomHostnameHandleResponse(resp) -} - -// analyzeCustomHostnameCreateRequest creates the AnalyzeCustomHostname request. -func (client *WebAppsClient) analyzeCustomHostnameCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientAnalyzeCustomHostnameOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.HostName != nil { - reqQP.Set("hostName", *options.HostName) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// analyzeCustomHostnameHandleResponse handles the AnalyzeCustomHostname response. -func (client *WebAppsClient) analyzeCustomHostnameHandleResponse(resp *http.Response) (WebAppsClientAnalyzeCustomHostnameResponse, error) { - result := WebAppsClientAnalyzeCustomHostnameResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomHostnameAnalysisResult); err != nil { - return WebAppsClientAnalyzeCustomHostnameResponse{}, err - } - return result, nil -} - -// AnalyzeCustomHostnameSlot - Analyze a custom hostname. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - WebAppsClientAnalyzeCustomHostnameSlotOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostnameSlot -// method. -func (client *WebAppsClient) AnalyzeCustomHostnameSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientAnalyzeCustomHostnameSlotOptions) (WebAppsClientAnalyzeCustomHostnameSlotResponse, error) { - req, err := client.analyzeCustomHostnameSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, runtime.NewResponseError(resp) - } - return client.analyzeCustomHostnameSlotHandleResponse(resp) -} - -// analyzeCustomHostnameSlotCreateRequest creates the AnalyzeCustomHostnameSlot request. -func (client *WebAppsClient) analyzeCustomHostnameSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientAnalyzeCustomHostnameSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.HostName != nil { - reqQP.Set("hostName", *options.HostName) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// analyzeCustomHostnameSlotHandleResponse handles the AnalyzeCustomHostnameSlot response. -func (client *WebAppsClient) analyzeCustomHostnameSlotHandleResponse(resp *http.Response) (WebAppsClientAnalyzeCustomHostnameSlotResponse, error) { - result := WebAppsClientAnalyzeCustomHostnameSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomHostnameAnalysisResult); err != nil { - return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, err - } - return result, nil -} - -// ApplySlotConfigToProduction - Applies the configuration settings from the target slot onto the current slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slotSwapEntity - JSON object that contains the target slot name. See example. -// options - WebAppsClientApplySlotConfigToProductionOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigToProduction -// method. -func (client *WebAppsClient) ApplySlotConfigToProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientApplySlotConfigToProductionOptions) (WebAppsClientApplySlotConfigToProductionResponse, error) { - req, err := client.applySlotConfigToProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) - if err != nil { - return WebAppsClientApplySlotConfigToProductionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientApplySlotConfigToProductionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientApplySlotConfigToProductionResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientApplySlotConfigToProductionResponse{}, nil -} - -// applySlotConfigToProductionCreateRequest creates the ApplySlotConfigToProduction request. -func (client *WebAppsClient) applySlotConfigToProductionCreateRequest(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientApplySlotConfigToProductionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) -} - -// ApplySlotConfigurationSlot - Applies the configuration settings from the target slot onto the current slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. -// slotSwapEntity - JSON object that contains the target slot name. See example. -// options - WebAppsClientApplySlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigurationSlot -// method. -func (client *WebAppsClient) ApplySlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientApplySlotConfigurationSlotOptions) (WebAppsClientApplySlotConfigurationSlotResponse, error) { - req, err := client.applySlotConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) - if err != nil { - return WebAppsClientApplySlotConfigurationSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientApplySlotConfigurationSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientApplySlotConfigurationSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientApplySlotConfigurationSlotResponse{}, nil -} - -// applySlotConfigurationSlotCreateRequest creates the ApplySlotConfigurationSlot request. -func (client *WebAppsClient) applySlotConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientApplySlotConfigurationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) -} - -// BeginApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// options - WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection -// method. -func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*runtime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.approveOrRejectPrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// ApproveOrRejectPrivateEndpointConnection - Approves or rejects a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { - req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. -func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) -} - -// BeginApproveOrRejectPrivateEndpointConnectionSlot - Approves or rejects a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// options - WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions contains the optional parameters for the -// WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot method. -func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*runtime.Poller[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.approveOrRejectPrivateEndpointConnectionSlot(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// ApproveOrRejectPrivateEndpointConnectionSlot - Approves or rejects a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*http.Response, error) { - req, err := client.approveOrRejectPrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// approveOrRejectPrivateEndpointConnectionSlotCreateRequest creates the ApproveOrRejectPrivateEndpointConnectionSlot request. -func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) -} - -// Backup - Creates a backup of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// request - Backup configuration. You can use the JSON response from the POST action as input here. -// options - WebAppsClientBackupOptions contains the optional parameters for the WebAppsClient.Backup method. -func (client *WebAppsClient) Backup(ctx context.Context, resourceGroupName string, name string, request BackupRequest, options *WebAppsClientBackupOptions) (WebAppsClientBackupResponse, error) { - req, err := client.backupCreateRequest(ctx, resourceGroupName, name, request, options) - if err != nil { - return WebAppsClientBackupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientBackupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientBackupResponse{}, runtime.NewResponseError(resp) - } - return client.backupHandleResponse(resp) -} - -// backupCreateRequest creates the Backup request. -func (client *WebAppsClient) backupCreateRequest(ctx context.Context, resourceGroupName string, name string, request BackupRequest, options *WebAppsClientBackupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// backupHandleResponse handles the Backup response. -func (client *WebAppsClient) backupHandleResponse(resp *http.Response) (WebAppsClientBackupResponse, error) { - result := WebAppsClientBackupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { - return WebAppsClientBackupResponse{}, err - } - return result, nil -} - -// BackupSlot - Creates a backup of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. -// request - Backup configuration. You can use the JSON response from the POST action as input here. -// options - WebAppsClientBackupSlotOptions contains the optional parameters for the WebAppsClient.BackupSlot method. -func (client *WebAppsClient) BackupSlot(ctx context.Context, resourceGroupName string, name string, slot string, request BackupRequest, options *WebAppsClientBackupSlotOptions) (WebAppsClientBackupSlotResponse, error) { - req, err := client.backupSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) - if err != nil { - return WebAppsClientBackupSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientBackupSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientBackupSlotResponse{}, runtime.NewResponseError(resp) - } - return client.backupSlotHandleResponse(resp) -} - -// backupSlotCreateRequest creates the BackupSlot request. -func (client *WebAppsClient) backupSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, request BackupRequest, options *WebAppsClientBackupSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// backupSlotHandleResponse handles the BackupSlot response. -func (client *WebAppsClient) backupSlotHandleResponse(resp *http.Response) (WebAppsClientBackupSlotResponse, error) { - result := WebAppsClientBackupSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { - return WebAppsClientBackupSlotResponse{}, err - } - return result, nil -} - -// CreateDeployment - Create a deployment for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// id - ID of an existing deployment. -// deployment - Deployment details. -// options - WebAppsClientCreateDeploymentOptions contains the optional parameters for the WebAppsClient.CreateDeployment -// method. -func (client *WebAppsClient) CreateDeployment(ctx context.Context, resourceGroupName string, name string, id string, deployment Deployment, options *WebAppsClientCreateDeploymentOptions) (WebAppsClientCreateDeploymentResponse, error) { - req, err := client.createDeploymentCreateRequest(ctx, resourceGroupName, name, id, deployment, options) - if err != nil { - return WebAppsClientCreateDeploymentResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateDeploymentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateDeploymentResponse{}, runtime.NewResponseError(resp) - } - return client.createDeploymentHandleResponse(resp) -} - -// createDeploymentCreateRequest creates the CreateDeployment request. -func (client *WebAppsClient) createDeploymentCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, deployment Deployment, options *WebAppsClientCreateDeploymentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if id == "" { - return nil, errors.New("parameter id cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, deployment) -} - -// createDeploymentHandleResponse handles the CreateDeployment response. -func (client *WebAppsClient) createDeploymentHandleResponse(resp *http.Response) (WebAppsClientCreateDeploymentResponse, error) { - result := WebAppsClientCreateDeploymentResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { - return WebAppsClientCreateDeploymentResponse{}, err - } - return result, nil -} - -// CreateDeploymentSlot - Create a deployment for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// id - ID of an existing deployment. -// slot - Name of the deployment slot. If a slot is not specified, the API creates a deployment for the production slot. -// deployment - Deployment details. -// options - WebAppsClientCreateDeploymentSlotOptions contains the optional parameters for the WebAppsClient.CreateDeploymentSlot -// method. -func (client *WebAppsClient) CreateDeploymentSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, deployment Deployment, options *WebAppsClientCreateDeploymentSlotOptions) (WebAppsClientCreateDeploymentSlotResponse, error) { - req, err := client.createDeploymentSlotCreateRequest(ctx, resourceGroupName, name, id, slot, deployment, options) - if err != nil { - return WebAppsClientCreateDeploymentSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateDeploymentSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateDeploymentSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createDeploymentSlotHandleResponse(resp) -} - -// createDeploymentSlotCreateRequest creates the CreateDeploymentSlot request. -func (client *WebAppsClient) createDeploymentSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, slot string, deployment Deployment, options *WebAppsClientCreateDeploymentSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if id == "" { - return nil, errors.New("parameter id cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, deployment) -} - -// createDeploymentSlotHandleResponse handles the CreateDeploymentSlot response. -func (client *WebAppsClient) createDeploymentSlotHandleResponse(resp *http.Response) (WebAppsClientCreateDeploymentSlotResponse, error) { - result := WebAppsClientCreateDeploymentSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { - return WebAppsClientCreateDeploymentSlotResponse{}, err - } - return result, nil -} - -// BeginCreateFunction - Create function for web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - Function name. -// functionEnvelope - Function details. -// options - WebAppsClientBeginCreateFunctionOptions contains the optional parameters for the WebAppsClient.BeginCreateFunction -// method. -func (client *WebAppsClient) BeginCreateFunction(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateFunctionOptions) (*runtime.Poller[WebAppsClientCreateFunctionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createFunction(ctx, resourceGroupName, name, functionName, functionEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientCreateFunctionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateFunctionResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateFunction - Create function for web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) createFunction(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateFunctionOptions) (*http.Response, error) { - req, err := client.createFunctionCreateRequest(ctx, resourceGroupName, name, functionName, functionEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createFunctionCreateRequest creates the CreateFunction request. -func (client *WebAppsClient) createFunctionCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateFunctionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, functionEnvelope) -} - -// BeginCreateInstanceFunctionSlot - Create function for web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - Function name. -// slot - Name of the deployment slot. -// functionEnvelope - Function details. -// options - WebAppsClientBeginCreateInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceFunctionSlot -// method. -func (client *WebAppsClient) BeginCreateInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateInstanceFunctionSlotOptions) (*runtime.Poller[WebAppsClientCreateInstanceFunctionSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createInstanceFunctionSlot(ctx, resourceGroupName, name, functionName, slot, functionEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientCreateInstanceFunctionSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateInstanceFunctionSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateInstanceFunctionSlot - Create function for web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) createInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateInstanceFunctionSlotOptions) (*http.Response, error) { - req, err := client.createInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, functionEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createInstanceFunctionSlotCreateRequest creates the CreateInstanceFunctionSlot request. -func (client *WebAppsClient) createInstanceFunctionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateInstanceFunctionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, functionEnvelope) -} - -// BeginCreateInstanceMSDeployOperation - Invoke the MSDeploy web app extension. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// instanceID - ID of web app instance. -// msDeploy - Details of MSDeploy operation -// options - WebAppsClientBeginCreateInstanceMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperation -// method. -func (client *WebAppsClient) BeginCreateInstanceMSDeployOperation(ctx context.Context, resourceGroupName string, name string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationOptions) (*runtime.Poller[WebAppsClientCreateInstanceMSDeployOperationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createInstanceMSDeployOperation(ctx, resourceGroupName, name, instanceID, msDeploy, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientCreateInstanceMSDeployOperationResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateInstanceMSDeployOperationResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateInstanceMSDeployOperation - Invoke the MSDeploy web app extension. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) createInstanceMSDeployOperation(ctx context.Context, resourceGroupName string, name string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationOptions) (*http.Response, error) { - req, err := client.createInstanceMSDeployOperationCreateRequest(ctx, resourceGroupName, name, instanceID, msDeploy, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createInstanceMSDeployOperationCreateRequest creates the CreateInstanceMSDeployOperation request. -func (client *WebAppsClient) createInstanceMSDeployOperationCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, msDeploy) -} - -// BeginCreateInstanceMSDeployOperationSlot - Invoke the MSDeploy web app extension. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// instanceID - ID of web app instance. -// msDeploy - Details of MSDeploy operation -// options - WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperationSlot -// method. -func (client *WebAppsClient) BeginCreateInstanceMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions) (*runtime.Poller[WebAppsClientCreateInstanceMSDeployOperationSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createInstanceMSDeployOperationSlot(ctx, resourceGroupName, name, slot, instanceID, msDeploy, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientCreateInstanceMSDeployOperationSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateInstanceMSDeployOperationSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateInstanceMSDeployOperationSlot - Invoke the MSDeploy web app extension. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) createInstanceMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions) (*http.Response, error) { - req, err := client.createInstanceMSDeployOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, msDeploy, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createInstanceMSDeployOperationSlotCreateRequest creates the CreateInstanceMSDeployOperationSlot request. -func (client *WebAppsClient) createInstanceMSDeployOperationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, msDeploy) -} - -// BeginCreateMSDeployOperation - Invoke the MSDeploy web app extension. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// msDeploy - Details of MSDeploy operation -// options - WebAppsClientBeginCreateMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperation -// method. -func (client *WebAppsClient) BeginCreateMSDeployOperation(ctx context.Context, resourceGroupName string, name string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationOptions) (*runtime.Poller[WebAppsClientCreateMSDeployOperationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createMSDeployOperation(ctx, resourceGroupName, name, msDeploy, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientCreateMSDeployOperationResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateMSDeployOperationResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateMSDeployOperation - Invoke the MSDeploy web app extension. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) createMSDeployOperation(ctx context.Context, resourceGroupName string, name string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationOptions) (*http.Response, error) { - req, err := client.createMSDeployOperationCreateRequest(ctx, resourceGroupName, name, msDeploy, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createMSDeployOperationCreateRequest creates the CreateMSDeployOperation request. -func (client *WebAppsClient) createMSDeployOperationCreateRequest(ctx context.Context, resourceGroupName string, name string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, msDeploy) -} - -// BeginCreateMSDeployOperationSlot - Invoke the MSDeploy web app extension. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// msDeploy - Details of MSDeploy operation -// options - WebAppsClientBeginCreateMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperationSlot -// method. -func (client *WebAppsClient) BeginCreateMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationSlotOptions) (*runtime.Poller[WebAppsClientCreateMSDeployOperationSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createMSDeployOperationSlot(ctx, resourceGroupName, name, slot, msDeploy, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientCreateMSDeployOperationSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateMSDeployOperationSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateMSDeployOperationSlot - Invoke the MSDeploy web app extension. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) createMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationSlotOptions) (*http.Response, error) { - req, err := client.createMSDeployOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, msDeploy, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createMSDeployOperationSlotCreateRequest creates the CreateMSDeployOperationSlot request. -func (client *WebAppsClient) createMSDeployOperationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, msDeploy) -} - -// CreateOneDeployOperation - Invoke the OneDeploy publish web app extension. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientCreateOneDeployOperationOptions contains the optional parameters for the WebAppsClient.CreateOneDeployOperation -// method. -func (client *WebAppsClient) CreateOneDeployOperation(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientCreateOneDeployOperationOptions) (WebAppsClientCreateOneDeployOperationResponse, error) { - req, err := client.createOneDeployOperationCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientCreateOneDeployOperationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOneDeployOperationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOneDeployOperationResponse{}, runtime.NewResponseError(resp) - } - return client.createOneDeployOperationHandleResponse(resp) -} - -// createOneDeployOperationCreateRequest creates the CreateOneDeployOperation request. -func (client *WebAppsClient) createOneDeployOperationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientCreateOneDeployOperationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// createOneDeployOperationHandleResponse handles the CreateOneDeployOperation response. -func (client *WebAppsClient) createOneDeployOperationHandleResponse(resp *http.Response) (WebAppsClientCreateOneDeployOperationResponse, error) { - result := WebAppsClientCreateOneDeployOperationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { - return WebAppsClientCreateOneDeployOperationResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdate - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. -// siteEnvelope - A JSON representation of the app properties. See example. -// options - WebAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdate -// method. -func (client *WebAppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateOptions) (*runtime.Poller[WebAppsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, name, siteEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, siteEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *WebAppsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteEnvelope) -} - -// CreateOrUpdateConfiguration - Updates the configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// siteConfig - JSON representation of a SiteConfig object. See example. -// options - WebAppsClientCreateOrUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfiguration -// method. -func (client *WebAppsClient) CreateOrUpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, options *WebAppsClientCreateOrUpdateConfigurationOptions) (WebAppsClientCreateOrUpdateConfigurationResponse, error) { - req, err := client.createOrUpdateConfigurationCreateRequest(ctx, resourceGroupName, name, siteConfig, options) - if err != nil { - return WebAppsClientCreateOrUpdateConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateConfigurationResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateConfigurationHandleResponse(resp) -} - -// createOrUpdateConfigurationCreateRequest creates the CreateOrUpdateConfiguration request. -func (client *WebAppsClient) createOrUpdateConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, options *WebAppsClientCreateOrUpdateConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteConfig) -} - -// createOrUpdateConfigurationHandleResponse handles the CreateOrUpdateConfiguration response. -func (client *WebAppsClient) createOrUpdateConfigurationHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateConfigurationResponse, error) { - result := WebAppsClientCreateOrUpdateConfigurationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { - return WebAppsClientCreateOrUpdateConfigurationResponse{}, err - } - return result, nil -} - -// CreateOrUpdateConfigurationSlot - Updates the configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. -// siteConfig - JSON representation of a SiteConfig object. See example. -// options - WebAppsClientCreateOrUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfigurationSlot -// method. -func (client *WebAppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig SiteConfigResource, options *WebAppsClientCreateOrUpdateConfigurationSlotOptions) (WebAppsClientCreateOrUpdateConfigurationSlotResponse, error) { - req, err := client.createOrUpdateConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, siteConfig, options) - if err != nil { - return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateConfigurationSlotHandleResponse(resp) -} - -// createOrUpdateConfigurationSlotCreateRequest creates the CreateOrUpdateConfigurationSlot request. -func (client *WebAppsClient) createOrUpdateConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig SiteConfigResource, options *WebAppsClientCreateOrUpdateConfigurationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteConfig) -} - -// createOrUpdateConfigurationSlotHandleResponse handles the CreateOrUpdateConfigurationSlot response. -func (client *WebAppsClient) createOrUpdateConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateConfigurationSlotResponse, error) { - result := WebAppsClientCreateOrUpdateConfigurationSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { - return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, err - } - return result, nil -} - -// CreateOrUpdateDomainOwnershipIdentifier - Creates a domain ownership identifier for web app, or updates an existing ownership -// identifier. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// domainOwnershipIdentifierName - Name of domain ownership identifier. -// domainOwnershipIdentifier - A JSON representation of the domain ownership properties. -// options - WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier -// method. -func (client *WebAppsClient) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, options *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions) (WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse, error) { - req, err := client.createOrUpdateDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, options) - if err != nil { - return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateDomainOwnershipIdentifierHandleResponse(resp) -} - -// createOrUpdateDomainOwnershipIdentifierCreateRequest creates the CreateOrUpdateDomainOwnershipIdentifier request. -func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, options *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainOwnershipIdentifierName == "" { - return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) -} - -// createOrUpdateDomainOwnershipIdentifierHandleResponse handles the CreateOrUpdateDomainOwnershipIdentifier response. -func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse, error) { - result := WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { - return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, err - } - return result, nil -} - -// CreateOrUpdateDomainOwnershipIdentifierSlot - Creates a domain ownership identifier for web app, or updates an existing -// ownership identifier. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// domainOwnershipIdentifierName - Name of domain ownership identifier. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. -// domainOwnershipIdentifier - A JSON representation of the domain ownership properties. -// options - WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot -// method. -func (client *WebAppsClient) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier Identifier, options *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions) (WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse, error) { - req, err := client.createOrUpdateDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier, options) - if err != nil { - return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateDomainOwnershipIdentifierSlotHandleResponse(resp) -} - -// createOrUpdateDomainOwnershipIdentifierSlotCreateRequest creates the CreateOrUpdateDomainOwnershipIdentifierSlot request. -func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier Identifier, options *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainOwnershipIdentifierName == "" { - return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) -} - -// createOrUpdateDomainOwnershipIdentifierSlotHandleResponse handles the CreateOrUpdateDomainOwnershipIdentifierSlot response. -func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse, error) { - result := WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { - return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, err - } - return result, nil -} - -// CreateOrUpdateFunctionSecret - Add or update a function secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - The name of the function. -// keyName - The name of the key. -// key - The key to create or update -// options - WebAppsClientCreateOrUpdateFunctionSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecret -// method. -func (client *WebAppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo, options *WebAppsClientCreateOrUpdateFunctionSecretOptions) (WebAppsClientCreateOrUpdateFunctionSecretResponse, error) { - req, err := client.createOrUpdateFunctionSecretCreateRequest(ctx, resourceGroupName, name, functionName, keyName, key, options) - if err != nil { - return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateFunctionSecretHandleResponse(resp) -} - -// createOrUpdateFunctionSecretCreateRequest creates the CreateOrUpdateFunctionSecret request. -func (client *WebAppsClient) createOrUpdateFunctionSecretCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo, options *WebAppsClientCreateOrUpdateFunctionSecretOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if keyName == "" { - return nil, errors.New("parameter keyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, key) -} - -// createOrUpdateFunctionSecretHandleResponse handles the CreateOrUpdateFunctionSecret response. -func (client *WebAppsClient) createOrUpdateFunctionSecretHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateFunctionSecretResponse, error) { - result := WebAppsClientCreateOrUpdateFunctionSecretResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.KeyInfo); err != nil { - return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, err - } - return result, nil -} - -// CreateOrUpdateFunctionSecretSlot - Add or update a function secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - The name of the function. -// keyName - The name of the key. -// slot - Name of the deployment slot. -// key - The key to create or update -// options - WebAppsClientCreateOrUpdateFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecretSlot -// method. -func (client *WebAppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo, options *WebAppsClientCreateOrUpdateFunctionSecretSlotOptions) (WebAppsClientCreateOrUpdateFunctionSecretSlotResponse, error) { - req, err := client.createOrUpdateFunctionSecretSlotCreateRequest(ctx, resourceGroupName, name, functionName, keyName, slot, key, options) - if err != nil { - return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateFunctionSecretSlotHandleResponse(resp) -} - -// createOrUpdateFunctionSecretSlotCreateRequest creates the CreateOrUpdateFunctionSecretSlot request. -func (client *WebAppsClient) createOrUpdateFunctionSecretSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo, options *WebAppsClientCreateOrUpdateFunctionSecretSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if keyName == "" { - return nil, errors.New("parameter keyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, key) -} - -// createOrUpdateFunctionSecretSlotHandleResponse handles the CreateOrUpdateFunctionSecretSlot response. -func (client *WebAppsClient) createOrUpdateFunctionSecretSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateFunctionSecretSlotResponse, error) { - result := WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.KeyInfo); err != nil { - return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, err - } - return result, nil -} - -// CreateOrUpdateHostNameBinding - Creates a hostname binding for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// hostName - Hostname in the hostname binding. -// hostNameBinding - Binding details. This is the JSON representation of a HostNameBinding object. -// options - WebAppsClientCreateOrUpdateHostNameBindingOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBinding -// method. -func (client *WebAppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, options *WebAppsClientCreateOrUpdateHostNameBindingOptions) (WebAppsClientCreateOrUpdateHostNameBindingResponse, error) { - req, err := client.createOrUpdateHostNameBindingCreateRequest(ctx, resourceGroupName, name, hostName, hostNameBinding, options) - if err != nil { - return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHostNameBindingHandleResponse(resp) -} - -// createOrUpdateHostNameBindingCreateRequest creates the CreateOrUpdateHostNameBinding request. -func (client *WebAppsClient) createOrUpdateHostNameBindingCreateRequest(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, options *WebAppsClientCreateOrUpdateHostNameBindingOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if hostName == "" { - return nil, errors.New("parameter hostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hostNameBinding) -} - -// createOrUpdateHostNameBindingHandleResponse handles the CreateOrUpdateHostNameBinding response. -func (client *WebAppsClient) createOrUpdateHostNameBindingHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHostNameBindingResponse, error) { - result := WebAppsClientCreateOrUpdateHostNameBindingResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBinding); err != nil { - return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, err - } - return result, nil -} - -// CreateOrUpdateHostNameBindingSlot - Creates a hostname binding for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// hostName - Hostname in the hostname binding. -// slot - Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. -// hostNameBinding - Binding details. This is the JSON representation of a HostNameBinding object. -// options - WebAppsClientCreateOrUpdateHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBindingSlot -// method. -func (client *WebAppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, slot string, hostNameBinding HostNameBinding, options *WebAppsClientCreateOrUpdateHostNameBindingSlotOptions) (WebAppsClientCreateOrUpdateHostNameBindingSlotResponse, error) { - req, err := client.createOrUpdateHostNameBindingSlotCreateRequest(ctx, resourceGroupName, name, hostName, slot, hostNameBinding, options) - if err != nil { - return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHostNameBindingSlotHandleResponse(resp) -} - -// createOrUpdateHostNameBindingSlotCreateRequest creates the CreateOrUpdateHostNameBindingSlot request. -func (client *WebAppsClient) createOrUpdateHostNameBindingSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, hostName string, slot string, hostNameBinding HostNameBinding, options *WebAppsClientCreateOrUpdateHostNameBindingSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if hostName == "" { - return nil, errors.New("parameter hostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hostNameBinding) -} - -// createOrUpdateHostNameBindingSlotHandleResponse handles the CreateOrUpdateHostNameBindingSlot response. -func (client *WebAppsClient) createOrUpdateHostNameBindingSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHostNameBindingSlotResponse, error) { - result := WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBinding); err != nil { - return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, err - } - return result, nil -} - -// CreateOrUpdateHostSecret - Add or update a host level secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// keyType - The type of host key. -// keyName - The name of the key. -// key - The key to create or update -// options - WebAppsClientCreateOrUpdateHostSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecret -// method. -func (client *WebAppsClient) CreateOrUpdateHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo, options *WebAppsClientCreateOrUpdateHostSecretOptions) (WebAppsClientCreateOrUpdateHostSecretResponse, error) { - req, err := client.createOrUpdateHostSecretCreateRequest(ctx, resourceGroupName, name, keyType, keyName, key, options) - if err != nil { - return WebAppsClientCreateOrUpdateHostSecretResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateHostSecretResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebAppsClientCreateOrUpdateHostSecretResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHostSecretHandleResponse(resp) -} - -// createOrUpdateHostSecretCreateRequest creates the CreateOrUpdateHostSecret request. -func (client *WebAppsClient) createOrUpdateHostSecretCreateRequest(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo, options *WebAppsClientCreateOrUpdateHostSecretOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if keyType == "" { - return nil, errors.New("parameter keyType cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyType}", url.PathEscape(keyType)) - if keyName == "" { - return nil, errors.New("parameter keyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, key) -} - -// createOrUpdateHostSecretHandleResponse handles the CreateOrUpdateHostSecret response. -func (client *WebAppsClient) createOrUpdateHostSecretHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHostSecretResponse, error) { - result := WebAppsClientCreateOrUpdateHostSecretResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.KeyInfo); err != nil { - return WebAppsClientCreateOrUpdateHostSecretResponse{}, err - } - return result, nil -} - -// CreateOrUpdateHostSecretSlot - Add or update a host level secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// keyType - The type of host key. -// keyName - The name of the key. -// slot - Name of the deployment slot. -// key - The key to create or update -// options - WebAppsClientCreateOrUpdateHostSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecretSlot -// method. -func (client *WebAppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo, options *WebAppsClientCreateOrUpdateHostSecretSlotOptions) (WebAppsClientCreateOrUpdateHostSecretSlotResponse, error) { - req, err := client.createOrUpdateHostSecretSlotCreateRequest(ctx, resourceGroupName, name, keyType, keyName, slot, key, options) - if err != nil { - return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHostSecretSlotHandleResponse(resp) -} - -// createOrUpdateHostSecretSlotCreateRequest creates the CreateOrUpdateHostSecretSlot request. -func (client *WebAppsClient) createOrUpdateHostSecretSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo, options *WebAppsClientCreateOrUpdateHostSecretSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if keyType == "" { - return nil, errors.New("parameter keyType cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyType}", url.PathEscape(keyType)) - if keyName == "" { - return nil, errors.New("parameter keyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, key) -} - -// createOrUpdateHostSecretSlotHandleResponse handles the CreateOrUpdateHostSecretSlot response. -func (client *WebAppsClient) createOrUpdateHostSecretSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHostSecretSlotResponse, error) { - result := WebAppsClientCreateOrUpdateHostSecretSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.KeyInfo); err != nil { - return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, err - } - return result, nil -} - -// CreateOrUpdateHybridConnection - Creates a new Hybrid Connection using a Service Bus relay. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// namespaceName - The namespace for this hybrid connection. -// relayName - The relay name for this hybrid connection. -// connectionEnvelope - The details of the hybrid connection. -// options - WebAppsClientCreateOrUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnection -// method. -func (client *WebAppsClient) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, options *WebAppsClientCreateOrUpdateHybridConnectionOptions) (WebAppsClientCreateOrUpdateHybridConnectionResponse, error) { - req, err := client.createOrUpdateHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, options) - if err != nil { - return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHybridConnectionHandleResponse(resp) -} - -// createOrUpdateHybridConnectionCreateRequest creates the CreateOrUpdateHybridConnection request. -func (client *WebAppsClient) createOrUpdateHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, options *WebAppsClientCreateOrUpdateHybridConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// createOrUpdateHybridConnectionHandleResponse handles the CreateOrUpdateHybridConnection response. -func (client *WebAppsClient) createOrUpdateHybridConnectionHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHybridConnectionResponse, error) { - result := WebAppsClientCreateOrUpdateHybridConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { - return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, err - } - return result, nil -} - -// CreateOrUpdateHybridConnectionSlot - Creates a new Hybrid Connection using a Service Bus relay. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// namespaceName - The namespace for this hybrid connection. -// relayName - The relay name for this hybrid connection. -// slot - The name of the slot for the web app. -// connectionEnvelope - The details of the hybrid connection. -// options - WebAppsClientCreateOrUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnectionSlot -// method. -func (client *WebAppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope HybridConnection, options *WebAppsClientCreateOrUpdateHybridConnectionSlotOptions) (WebAppsClientCreateOrUpdateHybridConnectionSlotResponse, error) { - req, err := client.createOrUpdateHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope, options) - if err != nil { - return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHybridConnectionSlotHandleResponse(resp) -} - -// createOrUpdateHybridConnectionSlotCreateRequest creates the CreateOrUpdateHybridConnectionSlot request. -func (client *WebAppsClient) createOrUpdateHybridConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope HybridConnection, options *WebAppsClientCreateOrUpdateHybridConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// createOrUpdateHybridConnectionSlotHandleResponse handles the CreateOrUpdateHybridConnectionSlot response. -func (client *WebAppsClient) createOrUpdateHybridConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateHybridConnectionSlotResponse, error) { - result := WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { - return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, err - } - return result, nil -} - -// CreateOrUpdatePublicCertificate - Creates a hostname binding for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// publicCertificateName - Public certificate name. -// publicCertificate - Public certificate details. This is the JSON representation of a PublicCertificate object. -// options - WebAppsClientCreateOrUpdatePublicCertificateOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificate -// method. -func (client *WebAppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, options *WebAppsClientCreateOrUpdatePublicCertificateOptions) (WebAppsClientCreateOrUpdatePublicCertificateResponse, error) { - req, err := client.createOrUpdatePublicCertificateCreateRequest(ctx, resourceGroupName, name, publicCertificateName, publicCertificate, options) - if err != nil { - return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdatePublicCertificateHandleResponse(resp) -} - -// createOrUpdatePublicCertificateCreateRequest creates the CreateOrUpdatePublicCertificate request. -func (client *WebAppsClient) createOrUpdatePublicCertificateCreateRequest(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, options *WebAppsClientCreateOrUpdatePublicCertificateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if publicCertificateName == "" { - return nil, errors.New("parameter publicCertificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, publicCertificate) -} - -// createOrUpdatePublicCertificateHandleResponse handles the CreateOrUpdatePublicCertificate response. -func (client *WebAppsClient) createOrUpdatePublicCertificateHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdatePublicCertificateResponse, error) { - result := WebAppsClientCreateOrUpdatePublicCertificateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificate); err != nil { - return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, err - } - return result, nil -} - -// CreateOrUpdatePublicCertificateSlot - Creates a hostname binding for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// publicCertificateName - Public certificate name. -// slot - Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. -// publicCertificate - Public certificate details. This is the JSON representation of a PublicCertificate object. -// options - WebAppsClientCreateOrUpdatePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificateSlot -// method. -func (client *WebAppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, slot string, publicCertificate PublicCertificate, options *WebAppsClientCreateOrUpdatePublicCertificateSlotOptions) (WebAppsClientCreateOrUpdatePublicCertificateSlotResponse, error) { - req, err := client.createOrUpdatePublicCertificateSlotCreateRequest(ctx, resourceGroupName, name, publicCertificateName, slot, publicCertificate, options) - if err != nil { - return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdatePublicCertificateSlotHandleResponse(resp) -} - -// createOrUpdatePublicCertificateSlotCreateRequest creates the CreateOrUpdatePublicCertificateSlot request. -func (client *WebAppsClient) createOrUpdatePublicCertificateSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, slot string, publicCertificate PublicCertificate, options *WebAppsClientCreateOrUpdatePublicCertificateSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if publicCertificateName == "" { - return nil, errors.New("parameter publicCertificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, publicCertificate) -} - -// createOrUpdatePublicCertificateSlotHandleResponse handles the CreateOrUpdatePublicCertificateSlot response. -func (client *WebAppsClient) createOrUpdatePublicCertificateSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdatePublicCertificateSlotResponse, error) { - result := WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificate); err != nil { - return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, err - } - return result, nil -} - -// CreateOrUpdateRelayServiceConnection - Creates a new hybrid connection configuration (PUT), or updates an existing one -// (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// entityName - Name of the hybrid connection configuration. -// connectionEnvelope - Details of the hybrid connection configuration. -// options - WebAppsClientCreateOrUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnection -// method. -func (client *WebAppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientCreateOrUpdateRelayServiceConnectionOptions) (WebAppsClientCreateOrUpdateRelayServiceConnectionResponse, error) { - req, err := client.createOrUpdateRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, connectionEnvelope, options) - if err != nil { - return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateRelayServiceConnectionHandleResponse(resp) -} - -// createOrUpdateRelayServiceConnectionCreateRequest creates the CreateOrUpdateRelayServiceConnection request. -func (client *WebAppsClient) createOrUpdateRelayServiceConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientCreateOrUpdateRelayServiceConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if entityName == "" { - return nil, errors.New("parameter entityName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// createOrUpdateRelayServiceConnectionHandleResponse handles the CreateOrUpdateRelayServiceConnection response. -func (client *WebAppsClient) createOrUpdateRelayServiceConnectionHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateRelayServiceConnectionResponse, error) { - result := WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { - return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, err - } - return result, nil -} - -// CreateOrUpdateRelayServiceConnectionSlot - Creates a new hybrid connection configuration (PUT), or updates an existing -// one (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// entityName - Name of the hybrid connection configuration. -// slot - Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the -// production slot. -// connectionEnvelope - Details of the hybrid connection configuration. -// options - WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot -// method. -func (client *WebAppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions) (WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse, error) { - req, err := client.createOrUpdateRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, connectionEnvelope, options) - if err != nil { - return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateRelayServiceConnectionSlotHandleResponse(resp) -} - -// createOrUpdateRelayServiceConnectionSlotCreateRequest creates the CreateOrUpdateRelayServiceConnectionSlot request. -func (client *WebAppsClient) createOrUpdateRelayServiceConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if entityName == "" { - return nil, errors.New("parameter entityName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// createOrUpdateRelayServiceConnectionSlotHandleResponse handles the CreateOrUpdateRelayServiceConnectionSlot response. -func (client *WebAppsClient) createOrUpdateRelayServiceConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse, error) { - result := WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { - return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdateSlot - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. -// slot - Name of the deployment slot to create or update. By default, this API attempts to create or modify the production -// slot. -// siteEnvelope - A JSON representation of the app properties. See example. -// options - WebAppsClientBeginCreateOrUpdateSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSlot -// method. -func (client *WebAppsClient) BeginCreateOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateSlotOptions) (*runtime.Poller[WebAppsClientCreateOrUpdateSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdateSlot(ctx, resourceGroupName, name, slot, siteEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientCreateOrUpdateSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateOrUpdateSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdateSlot - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) createOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateSlotOptions) (*http.Response, error) { - req, err := client.createOrUpdateSlotCreateRequest(ctx, resourceGroupName, name, slot, siteEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateSlotCreateRequest creates the CreateOrUpdateSlot request. -func (client *WebAppsClient) createOrUpdateSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteEnvelope) -} - -// BeginCreateOrUpdateSourceControl - Updates the source control configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// siteSourceControl - JSON representation of a SiteSourceControl object. See example. -// options - WebAppsClientBeginCreateOrUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControl -// method. -func (client *WebAppsClient) BeginCreateOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlOptions) (*runtime.Poller[WebAppsClientCreateOrUpdateSourceControlResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdateSourceControl(ctx, resourceGroupName, name, siteSourceControl, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientCreateOrUpdateSourceControlResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateOrUpdateSourceControlResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdateSourceControl - Updates the source control configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) createOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlOptions) (*http.Response, error) { - req, err := client.createOrUpdateSourceControlCreateRequest(ctx, resourceGroupName, name, siteSourceControl, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateSourceControlCreateRequest creates the CreateOrUpdateSourceControl request. -func (client *WebAppsClient) createOrUpdateSourceControlCreateRequest(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteSourceControl) -} - -// BeginCreateOrUpdateSourceControlSlot - Updates the source control configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for -// the production slot. -// siteSourceControl - JSON representation of a SiteSourceControl object. See example. -// options - WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControlSlot -// method. -func (client *WebAppsClient) BeginCreateOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions) (*runtime.Poller[WebAppsClientCreateOrUpdateSourceControlSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdateSourceControlSlot(ctx, resourceGroupName, name, slot, siteSourceControl, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientCreateOrUpdateSourceControlSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateOrUpdateSourceControlSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdateSourceControlSlot - Updates the source control configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) createOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions) (*http.Response, error) { - req, err := client.createOrUpdateSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, siteSourceControl, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateSourceControlSlotCreateRequest creates the CreateOrUpdateSourceControlSlot request. -func (client *WebAppsClient) createOrUpdateSourceControlSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteSourceControl) -} - -// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck - Integrates this Web App with a Virtual Network. This requires that -// 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, -// and is -// not in use by another App Service Plan other than the one this App is in. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// connectionEnvelope - Properties of the Virtual Network connection. See example. -// options - WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for -// the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck method. -func (client *WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error) { - req, err := client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckCreateRequest(ctx, resourceGroupName, name, connectionEnvelope, options) - if err != nil { - return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckHandleResponse(resp) -} - -// createOrUpdateSwiftVirtualNetworkConnectionWithCheckCreateRequest creates the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck request. -func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithCheckCreateRequest(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// createOrUpdateSwiftVirtualNetworkConnectionWithCheckHandleResponse handles the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck response. -func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithCheckHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error) { - result := WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { - return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err - } - return result, nil -} - -// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot - Integrates this Web App with a Virtual Network. This requires -// that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been -// delegated, and is -// not in use by another App Service Plan other than the one this App is in. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production -// slot. -// connectionEnvelope - Properties of the Virtual Network connection. See example. -// options - WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters -// for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot method. -func (client *WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error) { - req, err := client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest(ctx, resourceGroupName, name, slot, connectionEnvelope, options) - if err != nil { - return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(resp) -} - -// createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest creates the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot request. -func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse handles the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot response. -func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error) { - result := WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { - return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err - } - return result, nil -} - -// CreateOrUpdateVnetConnection - Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties -// (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of an existing Virtual Network. -// connectionEnvelope - Properties of the Virtual Network connection. See example. -// options - WebAppsClientCreateOrUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnection -// method. -func (client *WebAppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfoResource, options *WebAppsClientCreateOrUpdateVnetConnectionOptions) (WebAppsClientCreateOrUpdateVnetConnectionResponse, error) { - req, err := client.createOrUpdateVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, connectionEnvelope, options) - if err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateVnetConnectionHandleResponse(resp) -} - -// createOrUpdateVnetConnectionCreateRequest creates the CreateOrUpdateVnetConnection request. -func (client *WebAppsClient) createOrUpdateVnetConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfoResource, options *WebAppsClientCreateOrUpdateVnetConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// createOrUpdateVnetConnectionHandleResponse handles the CreateOrUpdateVnetConnection response. -func (client *WebAppsClient) createOrUpdateVnetConnectionHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateVnetConnectionResponse, error) { - result := WebAppsClientCreateOrUpdateVnetConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, err - } - return result, nil -} - -// CreateOrUpdateVnetConnectionGateway - Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of the Virtual Network. -// gatewayName - Name of the gateway. Currently, the only supported string is "primary". -// connectionEnvelope - The properties to update this gateway with. -// options - WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGateway -// method. -func (client *WebAppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions) (WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse, error) { - req, err := client.createOrUpdateVnetConnectionGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, options) - if err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateVnetConnectionGatewayHandleResponse(resp) -} - -// createOrUpdateVnetConnectionGatewayCreateRequest creates the CreateOrUpdateVnetConnectionGateway request. -func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// createOrUpdateVnetConnectionGatewayHandleResponse handles the CreateOrUpdateVnetConnectionGateway response. -func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse, error) { - result := WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, err - } - return result, nil -} - -// CreateOrUpdateVnetConnectionGatewaySlot - Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of the Virtual Network. -// gatewayName - Name of the gateway. Currently, the only supported string is "primary". -// slot - Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production -// slot's Virtual Network. -// connectionEnvelope - The properties to update this gateway with. -// options - WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot -// method. -func (client *WebAppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope VnetGateway, options *WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions) (WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse, error) { - req, err := client.createOrUpdateVnetConnectionGatewaySlotCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope, options) - if err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateVnetConnectionGatewaySlotHandleResponse(resp) -} - -// createOrUpdateVnetConnectionGatewaySlotCreateRequest creates the CreateOrUpdateVnetConnectionGatewaySlot request. -func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope VnetGateway, options *WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// createOrUpdateVnetConnectionGatewaySlotHandleResponse handles the CreateOrUpdateVnetConnectionGatewaySlot response. -func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse, error) { - result := WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, err - } - return result, nil -} - -// CreateOrUpdateVnetConnectionSlot - Adds a Virtual Network connection to an app or slot (PUT) or updates the connection -// properties (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of an existing Virtual Network. -// slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production -// slot. -// connectionEnvelope - Properties of the Virtual Network connection. See example. -// options - WebAppsClientCreateOrUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionSlot -// method. -func (client *WebAppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope VnetInfoResource, options *WebAppsClientCreateOrUpdateVnetConnectionSlotOptions) (WebAppsClientCreateOrUpdateVnetConnectionSlotResponse, error) { - req, err := client.createOrUpdateVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, connectionEnvelope, options) - if err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateVnetConnectionSlotHandleResponse(resp) -} - -// createOrUpdateVnetConnectionSlotCreateRequest creates the CreateOrUpdateVnetConnectionSlot request. -func (client *WebAppsClient) createOrUpdateVnetConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope VnetInfoResource, options *WebAppsClientCreateOrUpdateVnetConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// createOrUpdateVnetConnectionSlotHandleResponse handles the CreateOrUpdateVnetConnectionSlot response. -func (client *WebAppsClient) createOrUpdateVnetConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientCreateOrUpdateVnetConnectionSlotResponse, error) { - result := WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { - return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, err - } - return result, nil -} - -// Delete - Deletes a web, mobile, or API app, or one of the deployment slots. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app to delete. -// options - WebAppsClientDeleteOptions contains the optional parameters for the WebAppsClient.Delete method. -func (client *WebAppsClient) Delete(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteOptions) (WebAppsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *WebAppsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.DeleteMetrics != nil { - reqQP.Set("deleteMetrics", strconv.FormatBool(*options.DeleteMetrics)) - } - if options != nil && options.DeleteEmptyServerFarm != nil { - reqQP.Set("deleteEmptyServerFarm", strconv.FormatBool(*options.DeleteEmptyServerFarm)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteBackup - Deletes a backup of an app by its ID. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// backupID - ID of the backup. -// options - WebAppsClientDeleteBackupOptions contains the optional parameters for the WebAppsClient.DeleteBackup method. -func (client *WebAppsClient) DeleteBackup(ctx context.Context, resourceGroupName string, name string, backupID string, options *WebAppsClientDeleteBackupOptions) (WebAppsClientDeleteBackupResponse, error) { - req, err := client.deleteBackupCreateRequest(ctx, resourceGroupName, name, backupID, options) - if err != nil { - return WebAppsClientDeleteBackupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteBackupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteBackupResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteBackupResponse{}, nil -} - -// deleteBackupCreateRequest creates the DeleteBackup request. -func (client *WebAppsClient) deleteBackupCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, options *WebAppsClientDeleteBackupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if backupID == "" { - return nil, errors.New("parameter backupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteBackupConfiguration - Deletes the backup configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientDeleteBackupConfigurationOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfiguration -// method. -func (client *WebAppsClient) DeleteBackupConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteBackupConfigurationOptions) (WebAppsClientDeleteBackupConfigurationResponse, error) { - req, err := client.deleteBackupConfigurationCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientDeleteBackupConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteBackupConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteBackupConfigurationResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteBackupConfigurationResponse{}, nil -} - -// deleteBackupConfigurationCreateRequest creates the DeleteBackupConfiguration request. -func (client *WebAppsClient) deleteBackupConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteBackupConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteBackupConfigurationSlot - Deletes the backup configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production -// slot. -// options - WebAppsClientDeleteBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfigurationSlot -// method. -func (client *WebAppsClient) DeleteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteBackupConfigurationSlotOptions) (WebAppsClientDeleteBackupConfigurationSlotResponse, error) { - req, err := client.deleteBackupConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientDeleteBackupConfigurationSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteBackupConfigurationSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteBackupConfigurationSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteBackupConfigurationSlotResponse{}, nil -} - -// deleteBackupConfigurationSlotCreateRequest creates the DeleteBackupConfigurationSlot request. -func (client *WebAppsClient) deleteBackupConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteBackupConfigurationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteBackupSlot - Deletes a backup of an app by its ID. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// backupID - ID of the backup. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete a backup of the production slot. -// options - WebAppsClientDeleteBackupSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupSlot -// method. -func (client *WebAppsClient) DeleteBackupSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *WebAppsClientDeleteBackupSlotOptions) (WebAppsClientDeleteBackupSlotResponse, error) { - req, err := client.deleteBackupSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, options) - if err != nil { - return WebAppsClientDeleteBackupSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteBackupSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteBackupSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteBackupSlotResponse{}, nil -} - -// deleteBackupSlotCreateRequest creates the DeleteBackupSlot request. -func (client *WebAppsClient) deleteBackupSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *WebAppsClientDeleteBackupSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if backupID == "" { - return nil, errors.New("parameter backupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteContinuousWebJob - Delete a continuous web job by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// options - WebAppsClientDeleteContinuousWebJobOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJob -// method. -func (client *WebAppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientDeleteContinuousWebJobOptions) (WebAppsClientDeleteContinuousWebJobResponse, error) { - req, err := client.deleteContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) - if err != nil { - return WebAppsClientDeleteContinuousWebJobResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteContinuousWebJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteContinuousWebJobResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteContinuousWebJobResponse{}, nil -} - -// deleteContinuousWebJobCreateRequest creates the DeleteContinuousWebJob request. -func (client *WebAppsClient) deleteContinuousWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientDeleteContinuousWebJobOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteContinuousWebJobSlot - Delete a continuous web job by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. -// options - WebAppsClientDeleteContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJobSlot -// method. -func (client *WebAppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientDeleteContinuousWebJobSlotOptions) (WebAppsClientDeleteContinuousWebJobSlotResponse, error) { - req, err := client.deleteContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) - if err != nil { - return WebAppsClientDeleteContinuousWebJobSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteContinuousWebJobSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteContinuousWebJobSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteContinuousWebJobSlotResponse{}, nil -} - -// deleteContinuousWebJobSlotCreateRequest creates the DeleteContinuousWebJobSlot request. -func (client *WebAppsClient) deleteContinuousWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientDeleteContinuousWebJobSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteDeployment - Delete a deployment by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// id - Deployment ID. -// options - WebAppsClientDeleteDeploymentOptions contains the optional parameters for the WebAppsClient.DeleteDeployment -// method. -func (client *WebAppsClient) DeleteDeployment(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientDeleteDeploymentOptions) (WebAppsClientDeleteDeploymentResponse, error) { - req, err := client.deleteDeploymentCreateRequest(ctx, resourceGroupName, name, id, options) - if err != nil { - return WebAppsClientDeleteDeploymentResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteDeploymentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteDeploymentResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteDeploymentResponse{}, nil -} - -// deleteDeploymentCreateRequest creates the DeleteDeployment request. -func (client *WebAppsClient) deleteDeploymentCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientDeleteDeploymentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if id == "" { - return nil, errors.New("parameter id cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteDeploymentSlot - Delete a deployment by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// id - Deployment ID. -// slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. -// options - WebAppsClientDeleteDeploymentSlotOptions contains the optional parameters for the WebAppsClient.DeleteDeploymentSlot -// method. -func (client *WebAppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientDeleteDeploymentSlotOptions) (WebAppsClientDeleteDeploymentSlotResponse, error) { - req, err := client.deleteDeploymentSlotCreateRequest(ctx, resourceGroupName, name, id, slot, options) - if err != nil { - return WebAppsClientDeleteDeploymentSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteDeploymentSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteDeploymentSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteDeploymentSlotResponse{}, nil -} - -// deleteDeploymentSlotCreateRequest creates the DeleteDeploymentSlot request. -func (client *WebAppsClient) deleteDeploymentSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientDeleteDeploymentSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if id == "" { - return nil, errors.New("parameter id cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteDomainOwnershipIdentifier - Deletes a domain ownership identifier for a web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// domainOwnershipIdentifierName - Name of domain ownership identifier. -// options - WebAppsClientDeleteDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifier -// method. -func (client *WebAppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *WebAppsClientDeleteDomainOwnershipIdentifierOptions) (WebAppsClientDeleteDomainOwnershipIdentifierResponse, error) { - req, err := client.deleteDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, options) - if err != nil { - return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, nil -} - -// deleteDomainOwnershipIdentifierCreateRequest creates the DeleteDomainOwnershipIdentifier request. -func (client *WebAppsClient) deleteDomainOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *WebAppsClientDeleteDomainOwnershipIdentifierOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainOwnershipIdentifierName == "" { - return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteDomainOwnershipIdentifierSlot - Deletes a domain ownership identifier for a web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// domainOwnershipIdentifierName - Name of domain ownership identifier. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. -// options - WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifierSlot -// method. -func (client *WebAppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions) (WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse, error) { - req, err := client.deleteDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, options) - if err != nil { - return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, nil -} - -// deleteDomainOwnershipIdentifierSlotCreateRequest creates the DeleteDomainOwnershipIdentifierSlot request. -func (client *WebAppsClient) deleteDomainOwnershipIdentifierSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainOwnershipIdentifierName == "" { - return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteFunction - Delete a function for web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - Function name. -// options - WebAppsClientDeleteFunctionOptions contains the optional parameters for the WebAppsClient.DeleteFunction method. -func (client *WebAppsClient) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientDeleteFunctionOptions) (WebAppsClientDeleteFunctionResponse, error) { - req, err := client.deleteFunctionCreateRequest(ctx, resourceGroupName, name, functionName, options) - if err != nil { - return WebAppsClientDeleteFunctionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteFunctionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteFunctionResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteFunctionResponse{}, nil -} - -// deleteFunctionCreateRequest creates the DeleteFunction request. -func (client *WebAppsClient) deleteFunctionCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientDeleteFunctionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteFunctionSecret - Delete a function secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - The name of the function. -// keyName - The name of the key. -// options - WebAppsClientDeleteFunctionSecretOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecret -// method. -func (client *WebAppsClient) DeleteFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, options *WebAppsClientDeleteFunctionSecretOptions) (WebAppsClientDeleteFunctionSecretResponse, error) { - req, err := client.deleteFunctionSecretCreateRequest(ctx, resourceGroupName, name, functionName, keyName, options) - if err != nil { - return WebAppsClientDeleteFunctionSecretResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteFunctionSecretResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteFunctionSecretResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteFunctionSecretResponse{}, nil -} - -// deleteFunctionSecretCreateRequest creates the DeleteFunctionSecret request. -func (client *WebAppsClient) deleteFunctionSecretCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, options *WebAppsClientDeleteFunctionSecretOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if keyName == "" { - return nil, errors.New("parameter keyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteFunctionSecretSlot - Delete a function secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - The name of the function. -// keyName - The name of the key. -// slot - Name of the deployment slot. -// options - WebAppsClientDeleteFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecretSlot -// method. -func (client *WebAppsClient) DeleteFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, options *WebAppsClientDeleteFunctionSecretSlotOptions) (WebAppsClientDeleteFunctionSecretSlotResponse, error) { - req, err := client.deleteFunctionSecretSlotCreateRequest(ctx, resourceGroupName, name, functionName, keyName, slot, options) - if err != nil { - return WebAppsClientDeleteFunctionSecretSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteFunctionSecretSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteFunctionSecretSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteFunctionSecretSlotResponse{}, nil -} - -// deleteFunctionSecretSlotCreateRequest creates the DeleteFunctionSecretSlot request. -func (client *WebAppsClient) deleteFunctionSecretSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, options *WebAppsClientDeleteFunctionSecretSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if keyName == "" { - return nil, errors.New("parameter keyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteHostNameBinding - Deletes a hostname binding for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// hostName - Hostname in the hostname binding. -// options - WebAppsClientDeleteHostNameBindingOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBinding -// method. -func (client *WebAppsClient) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, options *WebAppsClientDeleteHostNameBindingOptions) (WebAppsClientDeleteHostNameBindingResponse, error) { - req, err := client.deleteHostNameBindingCreateRequest(ctx, resourceGroupName, name, hostName, options) - if err != nil { - return WebAppsClientDeleteHostNameBindingResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteHostNameBindingResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteHostNameBindingResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteHostNameBindingResponse{}, nil -} - -// deleteHostNameBindingCreateRequest creates the DeleteHostNameBinding request. -func (client *WebAppsClient) deleteHostNameBindingCreateRequest(ctx context.Context, resourceGroupName string, name string, hostName string, options *WebAppsClientDeleteHostNameBindingOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if hostName == "" { - return nil, errors.New("parameter hostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteHostNameBindingSlot - Deletes a hostname binding for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. -// hostName - Hostname in the hostname binding. -// options - WebAppsClientDeleteHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBindingSlot -// method. -func (client *WebAppsClient) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *WebAppsClientDeleteHostNameBindingSlotOptions) (WebAppsClientDeleteHostNameBindingSlotResponse, error) { - req, err := client.deleteHostNameBindingSlotCreateRequest(ctx, resourceGroupName, name, slot, hostName, options) - if err != nil { - return WebAppsClientDeleteHostNameBindingSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteHostNameBindingSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteHostNameBindingSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteHostNameBindingSlotResponse{}, nil -} - -// deleteHostNameBindingSlotCreateRequest creates the DeleteHostNameBindingSlot request. -func (client *WebAppsClient) deleteHostNameBindingSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *WebAppsClientDeleteHostNameBindingSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if hostName == "" { - return nil, errors.New("parameter hostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteHostSecret - Delete a host level secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// keyType - The type of host key. -// keyName - The name of the key. -// options - WebAppsClientDeleteHostSecretOptions contains the optional parameters for the WebAppsClient.DeleteHostSecret -// method. -func (client *WebAppsClient) DeleteHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, options *WebAppsClientDeleteHostSecretOptions) (WebAppsClientDeleteHostSecretResponse, error) { - req, err := client.deleteHostSecretCreateRequest(ctx, resourceGroupName, name, keyType, keyName, options) - if err != nil { - return WebAppsClientDeleteHostSecretResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteHostSecretResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteHostSecretResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteHostSecretResponse{}, nil -} - -// deleteHostSecretCreateRequest creates the DeleteHostSecret request. -func (client *WebAppsClient) deleteHostSecretCreateRequest(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, options *WebAppsClientDeleteHostSecretOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if keyType == "" { - return nil, errors.New("parameter keyType cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyType}", url.PathEscape(keyType)) - if keyName == "" { - return nil, errors.New("parameter keyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteHostSecretSlot - Delete a host level secret. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// keyType - The type of host key. -// keyName - The name of the key. -// slot - Name of the deployment slot. -// options - WebAppsClientDeleteHostSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostSecretSlot -// method. -func (client *WebAppsClient) DeleteHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, options *WebAppsClientDeleteHostSecretSlotOptions) (WebAppsClientDeleteHostSecretSlotResponse, error) { - req, err := client.deleteHostSecretSlotCreateRequest(ctx, resourceGroupName, name, keyType, keyName, slot, options) - if err != nil { - return WebAppsClientDeleteHostSecretSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteHostSecretSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteHostSecretSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteHostSecretSlotResponse{}, nil -} - -// deleteHostSecretSlotCreateRequest creates the DeleteHostSecretSlot request. -func (client *WebAppsClient) deleteHostSecretSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, options *WebAppsClientDeleteHostSecretSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if keyType == "" { - return nil, errors.New("parameter keyType cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyType}", url.PathEscape(keyType)) - if keyName == "" { - return nil, errors.New("parameter keyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteHybridConnection - Removes a Hybrid Connection from this site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// namespaceName - The namespace for this hybrid connection. -// relayName - The relay name for this hybrid connection. -// options - WebAppsClientDeleteHybridConnectionOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnection -// method. -func (client *WebAppsClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *WebAppsClientDeleteHybridConnectionOptions) (WebAppsClientDeleteHybridConnectionResponse, error) { - req, err := client.deleteHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) - if err != nil { - return WebAppsClientDeleteHybridConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteHybridConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteHybridConnectionResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteHybridConnectionResponse{}, nil -} - -// deleteHybridConnectionCreateRequest creates the DeleteHybridConnection request. -func (client *WebAppsClient) deleteHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *WebAppsClientDeleteHybridConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteHybridConnectionSlot - Removes a Hybrid Connection from this site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// namespaceName - The namespace for this hybrid connection. -// relayName - The relay name for this hybrid connection. -// slot - The name of the slot for the web app. -// options - WebAppsClientDeleteHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnectionSlot -// method. -func (client *WebAppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *WebAppsClientDeleteHybridConnectionSlotOptions) (WebAppsClientDeleteHybridConnectionSlotResponse, error) { - req, err := client.deleteHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, options) - if err != nil { - return WebAppsClientDeleteHybridConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteHybridConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteHybridConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteHybridConnectionSlotResponse{}, nil -} - -// deleteHybridConnectionSlotCreateRequest creates the DeleteHybridConnectionSlot request. -func (client *WebAppsClient) deleteHybridConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *WebAppsClientDeleteHybridConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteInstanceFunctionSlot - Delete a function for web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - Function name. -// slot - Name of the deployment slot. -// options - WebAppsClientDeleteInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceFunctionSlot -// method. -func (client *WebAppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientDeleteInstanceFunctionSlotOptions) (WebAppsClientDeleteInstanceFunctionSlotResponse, error) { - req, err := client.deleteInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) - if err != nil { - return WebAppsClientDeleteInstanceFunctionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteInstanceFunctionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteInstanceFunctionSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteInstanceFunctionSlotResponse{}, nil -} - -// deleteInstanceFunctionSlotCreateRequest creates the DeleteInstanceFunctionSlot request. -func (client *WebAppsClient) deleteInstanceFunctionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientDeleteInstanceFunctionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteInstanceProcess - Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance -// in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// 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". -// options - WebAppsClientDeleteInstanceProcessOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcess -// method. -func (client *WebAppsClient) DeleteInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientDeleteInstanceProcessOptions) (WebAppsClientDeleteInstanceProcessResponse, error) { - req, err := client.deleteInstanceProcessCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) - if err != nil { - return WebAppsClientDeleteInstanceProcessResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteInstanceProcessResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteInstanceProcessResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteInstanceProcessResponse{}, nil -} - -// deleteInstanceProcessCreateRequest creates the DeleteInstanceProcess request. -func (client *WebAppsClient) deleteInstanceProcessCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientDeleteInstanceProcessOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteInstanceProcessSlot - Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out -// instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// 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". -// options - WebAppsClientDeleteInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcessSlot -// method. -func (client *WebAppsClient) DeleteInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientDeleteInstanceProcessSlotOptions) (WebAppsClientDeleteInstanceProcessSlotResponse, error) { - req, err := client.deleteInstanceProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) - if err != nil { - return WebAppsClientDeleteInstanceProcessSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteInstanceProcessSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteInstanceProcessSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteInstanceProcessSlotResponse{}, nil -} - -// deleteInstanceProcessSlotCreateRequest creates the DeleteInstanceProcessSlot request. -func (client *WebAppsClient) deleteInstanceProcessSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientDeleteInstanceProcessSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeletePremierAddOn - Delete a premier add-on from an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// premierAddOnName - Add-on name. -// options - WebAppsClientDeletePremierAddOnOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOn -// method. -func (client *WebAppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *WebAppsClientDeletePremierAddOnOptions) (WebAppsClientDeletePremierAddOnResponse, error) { - req, err := client.deletePremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, options) - if err != nil { - return WebAppsClientDeletePremierAddOnResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeletePremierAddOnResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeletePremierAddOnResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeletePremierAddOnResponse{}, nil -} - -// deletePremierAddOnCreateRequest creates the DeletePremierAddOn request. -func (client *WebAppsClient) deletePremierAddOnCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *WebAppsClientDeletePremierAddOnOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if premierAddOnName == "" { - return nil, errors.New("parameter premierAddOnName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeletePremierAddOnSlot - Delete a premier add-on from an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// premierAddOnName - Add-on name. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the production -// slot. -// options - WebAppsClientDeletePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOnSlot -// method. -func (client *WebAppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *WebAppsClientDeletePremierAddOnSlotOptions) (WebAppsClientDeletePremierAddOnSlotResponse, error) { - req, err := client.deletePremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, options) - if err != nil { - return WebAppsClientDeletePremierAddOnSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeletePremierAddOnSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeletePremierAddOnSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeletePremierAddOnSlotResponse{}, nil -} - -// deletePremierAddOnSlotCreateRequest creates the DeletePremierAddOnSlot request. -func (client *WebAppsClient) deletePremierAddOnSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *WebAppsClientDeletePremierAddOnSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if premierAddOnName == "" { - return nil, errors.New("parameter premierAddOnName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDeletePrivateEndpointConnection - Deletes a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// options - WebAppsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnection -// method. -func (client *WebAppsClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientBeginDeletePrivateEndpointConnectionOptions) (*runtime.Poller[WebAppsClientDeletePrivateEndpointConnectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, name, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientDeletePrivateEndpointConnectionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientDeletePrivateEndpointConnectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// DeletePrivateEndpointConnection - Deletes a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { - req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. -func (client *WebAppsClient) deletePrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientBeginDeletePrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDeletePrivateEndpointConnectionSlot - Deletes a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// options - WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnectionSlot -// method. -func (client *WebAppsClient) BeginDeletePrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions) (*runtime.Poller[WebAppsClientDeletePrivateEndpointConnectionSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deletePrivateEndpointConnectionSlot(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientDeletePrivateEndpointConnectionSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientDeletePrivateEndpointConnectionSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// DeletePrivateEndpointConnectionSlot - Deletes a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) deletePrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions) (*http.Response, error) { - req, err := client.deletePrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deletePrivateEndpointConnectionSlotCreateRequest creates the DeletePrivateEndpointConnectionSlot request. -func (client *WebAppsClient) deletePrivateEndpointConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteProcess - Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in -// a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// options - WebAppsClientDeleteProcessOptions contains the optional parameters for the WebAppsClient.DeleteProcess method. -func (client *WebAppsClient) DeleteProcess(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientDeleteProcessOptions) (WebAppsClientDeleteProcessResponse, error) { - req, err := client.deleteProcessCreateRequest(ctx, resourceGroupName, name, processID, options) - if err != nil { - return WebAppsClientDeleteProcessResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteProcessResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteProcessResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteProcessResponse{}, nil -} - -// deleteProcessCreateRequest creates the DeleteProcess request. -func (client *WebAppsClient) deleteProcessCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientDeleteProcessOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteProcessSlot - Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance -// in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// options - WebAppsClientDeleteProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteProcessSlot -// method. -func (client *WebAppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientDeleteProcessSlotOptions) (WebAppsClientDeleteProcessSlotResponse, error) { - req, err := client.deleteProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) - if err != nil { - return WebAppsClientDeleteProcessSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteProcessSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteProcessSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteProcessSlotResponse{}, nil -} - -// deleteProcessSlotCreateRequest creates the DeleteProcessSlot request. -func (client *WebAppsClient) deleteProcessSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientDeleteProcessSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeletePublicCertificate - Deletes a hostname binding for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// publicCertificateName - Public certificate name. -// options - WebAppsClientDeletePublicCertificateOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificate -// method. -func (client *WebAppsClient) DeletePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *WebAppsClientDeletePublicCertificateOptions) (WebAppsClientDeletePublicCertificateResponse, error) { - req, err := client.deletePublicCertificateCreateRequest(ctx, resourceGroupName, name, publicCertificateName, options) - if err != nil { - return WebAppsClientDeletePublicCertificateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeletePublicCertificateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeletePublicCertificateResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeletePublicCertificateResponse{}, nil -} - -// deletePublicCertificateCreateRequest creates the DeletePublicCertificate request. -func (client *WebAppsClient) deletePublicCertificateCreateRequest(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *WebAppsClientDeletePublicCertificateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if publicCertificateName == "" { - return nil, errors.New("parameter publicCertificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeletePublicCertificateSlot - Deletes a hostname binding for an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. -// publicCertificateName - Public certificate name. -// options - WebAppsClientDeletePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificateSlot -// method. -func (client *WebAppsClient) DeletePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *WebAppsClientDeletePublicCertificateSlotOptions) (WebAppsClientDeletePublicCertificateSlotResponse, error) { - req, err := client.deletePublicCertificateSlotCreateRequest(ctx, resourceGroupName, name, slot, publicCertificateName, options) - if err != nil { - return WebAppsClientDeletePublicCertificateSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeletePublicCertificateSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeletePublicCertificateSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeletePublicCertificateSlotResponse{}, nil -} - -// deletePublicCertificateSlotCreateRequest creates the DeletePublicCertificateSlot request. -func (client *WebAppsClient) deletePublicCertificateSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *WebAppsClientDeletePublicCertificateSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if publicCertificateName == "" { - return nil, errors.New("parameter publicCertificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteRelayServiceConnection - Deletes a relay service connection by its name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// entityName - Name of the hybrid connection configuration. -// options - WebAppsClientDeleteRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnection -// method. -func (client *WebAppsClient) DeleteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, options *WebAppsClientDeleteRelayServiceConnectionOptions) (WebAppsClientDeleteRelayServiceConnectionResponse, error) { - req, err := client.deleteRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, options) - if err != nil { - return WebAppsClientDeleteRelayServiceConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteRelayServiceConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteRelayServiceConnectionResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteRelayServiceConnectionResponse{}, nil -} - -// deleteRelayServiceConnectionCreateRequest creates the DeleteRelayServiceConnection request. -func (client *WebAppsClient) deleteRelayServiceConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, options *WebAppsClientDeleteRelayServiceConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if entityName == "" { - return nil, errors.New("parameter entityName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteRelayServiceConnectionSlot - Deletes a relay service connection by its name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// entityName - Name of the hybrid connection configuration. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for the production -// slot. -// options - WebAppsClientDeleteRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnectionSlot -// method. -func (client *WebAppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *WebAppsClientDeleteRelayServiceConnectionSlotOptions) (WebAppsClientDeleteRelayServiceConnectionSlotResponse, error) { - req, err := client.deleteRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, options) - if err != nil { - return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, nil -} - -// deleteRelayServiceConnectionSlotCreateRequest creates the DeleteRelayServiceConnectionSlot request. -func (client *WebAppsClient) deleteRelayServiceConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *WebAppsClientDeleteRelayServiceConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if entityName == "" { - return nil, errors.New("parameter entityName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteSiteExtension - Remove a site extension from a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// siteExtensionID - Site extension name. -// options - WebAppsClientDeleteSiteExtensionOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtension -// method. -func (client *WebAppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientDeleteSiteExtensionOptions) (WebAppsClientDeleteSiteExtensionResponse, error) { - req, err := client.deleteSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) - if err != nil { - return WebAppsClientDeleteSiteExtensionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteSiteExtensionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteSiteExtensionResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteSiteExtensionResponse{}, nil -} - -// deleteSiteExtensionCreateRequest creates the DeleteSiteExtension request. -func (client *WebAppsClient) deleteSiteExtensionCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientDeleteSiteExtensionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if siteExtensionID == "" { - return nil, errors.New("parameter siteExtensionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteSiteExtensionSlot - Remove a site extension from a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// siteExtensionID - Site extension name. -// slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. -// options - WebAppsClientDeleteSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtensionSlot -// method. -func (client *WebAppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientDeleteSiteExtensionSlotOptions) (WebAppsClientDeleteSiteExtensionSlotResponse, error) { - req, err := client.deleteSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) - if err != nil { - return WebAppsClientDeleteSiteExtensionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteSiteExtensionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteSiteExtensionSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteSiteExtensionSlotResponse{}, nil -} - -// deleteSiteExtensionSlotCreateRequest creates the DeleteSiteExtensionSlot request. -func (client *WebAppsClient) deleteSiteExtensionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientDeleteSiteExtensionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if siteExtensionID == "" { - return nil, errors.New("parameter siteExtensionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteSlot - Deletes a web, mobile, or API app, or one of the deployment slots. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app to delete. -// slot - Name of the deployment slot to delete. By default, the API deletes the production slot. -// options - WebAppsClientDeleteSlotOptions contains the optional parameters for the WebAppsClient.DeleteSlot method. -func (client *WebAppsClient) DeleteSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSlotOptions) (WebAppsClientDeleteSlotResponse, error) { - req, err := client.deleteSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientDeleteSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteSlotResponse{}, nil -} - -// deleteSlotCreateRequest creates the DeleteSlot request. -func (client *WebAppsClient) deleteSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.DeleteMetrics != nil { - reqQP.Set("deleteMetrics", strconv.FormatBool(*options.DeleteMetrics)) - } - if options != nil && options.DeleteEmptyServerFarm != nil { - reqQP.Set("deleteEmptyServerFarm", strconv.FormatBool(*options.DeleteEmptyServerFarm)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteSourceControl - Deletes the source control configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientDeleteSourceControlOptions contains the optional parameters for the WebAppsClient.DeleteSourceControl -// method. -func (client *WebAppsClient) DeleteSourceControl(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteSourceControlOptions) (WebAppsClientDeleteSourceControlResponse, error) { - req, err := client.deleteSourceControlCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientDeleteSourceControlResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteSourceControlResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientDeleteSourceControlResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteSourceControlResponse{}, nil -} - -// deleteSourceControlCreateRequest creates the DeleteSourceControl request. -func (client *WebAppsClient) deleteSourceControlCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteSourceControlOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.AdditionalFlags != nil { - reqQP.Set("additionalFlags", *options.AdditionalFlags) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteSourceControlSlot - Deletes the source control configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for -// the production slot. -// options - WebAppsClientDeleteSourceControlSlotOptions contains the optional parameters for the WebAppsClient.DeleteSourceControlSlot -// method. -func (client *WebAppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSourceControlSlotOptions) (WebAppsClientDeleteSourceControlSlotResponse, error) { - req, err := client.deleteSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientDeleteSourceControlSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteSourceControlSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientDeleteSourceControlSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteSourceControlSlotResponse{}, nil -} - -// deleteSourceControlSlotCreateRequest creates the DeleteSourceControlSlot request. -func (client *WebAppsClient) deleteSourceControlSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSourceControlSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.AdditionalFlags != nil { - reqQP.Set("additionalFlags", *options.AdditionalFlags) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteSwiftVirtualNetwork - Deletes a Swift Virtual Network connection from an app (or deployment slot). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientDeleteSwiftVirtualNetworkOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetwork -// method. -func (client *WebAppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteSwiftVirtualNetworkOptions) (WebAppsClientDeleteSwiftVirtualNetworkResponse, error) { - req, err := client.deleteSwiftVirtualNetworkCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, nil -} - -// deleteSwiftVirtualNetworkCreateRequest creates the DeleteSwiftVirtualNetwork request. -func (client *WebAppsClient) deleteSwiftVirtualNetworkCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteSwiftVirtualNetworkOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteSwiftVirtualNetworkSlot - Deletes a Swift Virtual Network connection from an app (or deployment slot). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. -// options - WebAppsClientDeleteSwiftVirtualNetworkSlotOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetworkSlot -// method. -func (client *WebAppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSwiftVirtualNetworkSlotOptions) (WebAppsClientDeleteSwiftVirtualNetworkSlotResponse, error) { - req, err := client.deleteSwiftVirtualNetworkSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, nil -} - -// deleteSwiftVirtualNetworkSlotCreateRequest creates the DeleteSwiftVirtualNetworkSlot request. -func (client *WebAppsClient) deleteSwiftVirtualNetworkSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSwiftVirtualNetworkSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteTriggeredWebJob - Delete a triggered web job by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// options - WebAppsClientDeleteTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJob -// method. -func (client *WebAppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientDeleteTriggeredWebJobOptions) (WebAppsClientDeleteTriggeredWebJobResponse, error) { - req, err := client.deleteTriggeredWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) - if err != nil { - return WebAppsClientDeleteTriggeredWebJobResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteTriggeredWebJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteTriggeredWebJobResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteTriggeredWebJobResponse{}, nil -} - -// deleteTriggeredWebJobCreateRequest creates the DeleteTriggeredWebJob request. -func (client *WebAppsClient) deleteTriggeredWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientDeleteTriggeredWebJobOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteTriggeredWebJobSlot - Delete a triggered web job by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// slot - Name of the deployment slot. If a slot is not specified, the API deletes web job for the production slot. -// options - WebAppsClientDeleteTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJobSlot -// method. -func (client *WebAppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientDeleteTriggeredWebJobSlotOptions) (WebAppsClientDeleteTriggeredWebJobSlotResponse, error) { - req, err := client.deleteTriggeredWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) - if err != nil { - return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, nil -} - -// deleteTriggeredWebJobSlotCreateRequest creates the DeleteTriggeredWebJobSlot request. -func (client *WebAppsClient) deleteTriggeredWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientDeleteTriggeredWebJobSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteVnetConnection - Deletes a connection from an app (or deployment slot to a named virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of the virtual network. -// options - WebAppsClientDeleteVnetConnectionOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnection -// method. -func (client *WebAppsClient) DeleteVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, options *WebAppsClientDeleteVnetConnectionOptions) (WebAppsClientDeleteVnetConnectionResponse, error) { - req, err := client.deleteVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, options) - if err != nil { - return WebAppsClientDeleteVnetConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteVnetConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteVnetConnectionResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteVnetConnectionResponse{}, nil -} - -// deleteVnetConnectionCreateRequest creates the DeleteVnetConnection request. -func (client *WebAppsClient) deleteVnetConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, options *WebAppsClientDeleteVnetConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DeleteVnetConnectionSlot - Deletes a connection from an app (or deployment slot to a named virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of the virtual network. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. -// options - WebAppsClientDeleteVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnectionSlot -// method. -func (client *WebAppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *WebAppsClientDeleteVnetConnectionSlotOptions) (WebAppsClientDeleteVnetConnectionSlotResponse, error) { - req, err := client.deleteVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, options) - if err != nil { - return WebAppsClientDeleteVnetConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDeleteVnetConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteVnetConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientDeleteVnetConnectionSlotResponse{}, nil -} - -// deleteVnetConnectionSlotCreateRequest creates the DeleteVnetConnectionSlot request. -func (client *WebAppsClient) deleteVnetConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *WebAppsClientDeleteVnetConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DiscoverBackup - Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information -// about the databases stored in a backup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// request - A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. -// options - WebAppsClientDiscoverBackupOptions contains the optional parameters for the WebAppsClient.DiscoverBackup method. -func (client *WebAppsClient) DiscoverBackup(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientDiscoverBackupOptions) (WebAppsClientDiscoverBackupResponse, error) { - req, err := client.discoverBackupCreateRequest(ctx, resourceGroupName, name, request, options) - if err != nil { - return WebAppsClientDiscoverBackupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDiscoverBackupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDiscoverBackupResponse{}, runtime.NewResponseError(resp) - } - return client.discoverBackupHandleResponse(resp) -} - -// discoverBackupCreateRequest creates the DiscoverBackup request. -func (client *WebAppsClient) discoverBackupCreateRequest(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientDiscoverBackupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// discoverBackupHandleResponse handles the DiscoverBackup response. -func (client *WebAppsClient) discoverBackupHandleResponse(resp *http.Response) (WebAppsClientDiscoverBackupResponse, error) { - result := WebAppsClientDiscoverBackupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RestoreRequest); err != nil { - return WebAppsClientDiscoverBackupResponse{}, err - } - return result, nil -} - -// DiscoverBackupSlot - Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get -// information about the databases stored in a backup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. -// request - A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. -// options - WebAppsClientDiscoverBackupSlotOptions contains the optional parameters for the WebAppsClient.DiscoverBackupSlot -// method. -func (client *WebAppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientDiscoverBackupSlotOptions) (WebAppsClientDiscoverBackupSlotResponse, error) { - req, err := client.discoverBackupSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) - if err != nil { - return WebAppsClientDiscoverBackupSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientDiscoverBackupSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDiscoverBackupSlotResponse{}, runtime.NewResponseError(resp) - } - return client.discoverBackupSlotHandleResponse(resp) -} - -// discoverBackupSlotCreateRequest creates the DiscoverBackupSlot request. -func (client *WebAppsClient) discoverBackupSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientDiscoverBackupSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// discoverBackupSlotHandleResponse handles the DiscoverBackupSlot response. -func (client *WebAppsClient) discoverBackupSlotHandleResponse(resp *http.Response) (WebAppsClientDiscoverBackupSlotResponse, error) { - result := WebAppsClientDiscoverBackupSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RestoreRequest); err != nil { - return WebAppsClientDiscoverBackupSlotResponse{}, err - } - return result, nil -} - -// GenerateNewSitePublishingPassword - Generates a new publishing password for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGenerateNewSitePublishingPasswordOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPassword -// method. -func (client *WebAppsClient) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGenerateNewSitePublishingPasswordOptions) (WebAppsClientGenerateNewSitePublishingPasswordResponse, error) { - req, err := client.generateNewSitePublishingPasswordCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, nil -} - -// generateNewSitePublishingPasswordCreateRequest creates the GenerateNewSitePublishingPassword request. -func (client *WebAppsClient) generateNewSitePublishingPasswordCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGenerateNewSitePublishingPasswordOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GenerateNewSitePublishingPasswordSlot - Generates a new publishing password for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production -// slot. -// options - WebAppsClientGenerateNewSitePublishingPasswordSlotOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPasswordSlot -// method. -func (client *WebAppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGenerateNewSitePublishingPasswordSlotOptions) (WebAppsClientGenerateNewSitePublishingPasswordSlotResponse, error) { - req, err := client.generateNewSitePublishingPasswordSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, nil -} - -// generateNewSitePublishingPasswordSlotCreateRequest creates the GenerateNewSitePublishingPasswordSlot request. -func (client *WebAppsClient) generateNewSitePublishingPasswordSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGenerateNewSitePublishingPasswordSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the details of a web, mobile, or API app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetOptions contains the optional parameters for the WebAppsClient.Get method. -func (client *WebAppsClient) Get(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetOptions) (WebAppsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *WebAppsClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *WebAppsClient) getHandleResponse(resp *http.Response) (WebAppsClientGetResponse, error) { - result := WebAppsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Site); err != nil { - return WebAppsClientGetResponse{}, err - } - return result, nil -} - -// GetAppSettingKeyVaultReference - Gets the config reference and status of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// appSettingKey - App Setting key name. -// options - WebAppsClientGetAppSettingKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReference -// method. -func (client *WebAppsClient) GetAppSettingKeyVaultReference(ctx context.Context, resourceGroupName string, name string, appSettingKey string, options *WebAppsClientGetAppSettingKeyVaultReferenceOptions) (WebAppsClientGetAppSettingKeyVaultReferenceResponse, error) { - req, err := client.getAppSettingKeyVaultReferenceCreateRequest(ctx, resourceGroupName, name, appSettingKey, options) - if err != nil { - return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, runtime.NewResponseError(resp) - } - return client.getAppSettingKeyVaultReferenceHandleResponse(resp) -} - -// getAppSettingKeyVaultReferenceCreateRequest creates the GetAppSettingKeyVaultReference request. -func (client *WebAppsClient) getAppSettingKeyVaultReferenceCreateRequest(ctx context.Context, resourceGroupName string, name string, appSettingKey string, options *WebAppsClientGetAppSettingKeyVaultReferenceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if appSettingKey == "" { - return nil, errors.New("parameter appSettingKey cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appSettingKey}", url.PathEscape(appSettingKey)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAppSettingKeyVaultReferenceHandleResponse handles the GetAppSettingKeyVaultReference response. -func (client *WebAppsClient) getAppSettingKeyVaultReferenceHandleResponse(resp *http.Response) (WebAppsClientGetAppSettingKeyVaultReferenceResponse, error) { - result := WebAppsClientGetAppSettingKeyVaultReferenceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReference); err != nil { - return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, err - } - return result, nil -} - -// GetAppSettingKeyVaultReferenceSlot - Gets the config reference and status of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// appSettingKey - App Setting key name. -// options - WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReferenceSlot -// method. -func (client *WebAppsClient) GetAppSettingKeyVaultReferenceSlot(ctx context.Context, resourceGroupName string, name string, appSettingKey string, slot string, options *WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions) (WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse, error) { - req, err := client.getAppSettingKeyVaultReferenceSlotCreateRequest(ctx, resourceGroupName, name, appSettingKey, slot, options) - if err != nil { - return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getAppSettingKeyVaultReferenceSlotHandleResponse(resp) -} - -// getAppSettingKeyVaultReferenceSlotCreateRequest creates the GetAppSettingKeyVaultReferenceSlot request. -func (client *WebAppsClient) getAppSettingKeyVaultReferenceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, appSettingKey string, slot string, options *WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if appSettingKey == "" { - return nil, errors.New("parameter appSettingKey cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{appSettingKey}", url.PathEscape(appSettingKey)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAppSettingKeyVaultReferenceSlotHandleResponse handles the GetAppSettingKeyVaultReferenceSlot response. -func (client *WebAppsClient) getAppSettingKeyVaultReferenceSlotHandleResponse(resp *http.Response) (WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse, error) { - result := WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReference); err != nil { - return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, err - } - return result, nil -} - -// NewGetAppSettingsKeyVaultReferencesPager - Gets the config reference app settings and status of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetAppSettingsKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.GetAppSettingsKeyVaultReferences -// method. -func (client *WebAppsClient) NewGetAppSettingsKeyVaultReferencesPager(resourceGroupName string, name string, options *WebAppsClientGetAppSettingsKeyVaultReferencesOptions) *runtime.Pager[WebAppsClientGetAppSettingsKeyVaultReferencesResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetAppSettingsKeyVaultReferencesResponse]{ - More: func(page WebAppsClientGetAppSettingsKeyVaultReferencesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientGetAppSettingsKeyVaultReferencesResponse) (WebAppsClientGetAppSettingsKeyVaultReferencesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getAppSettingsKeyVaultReferencesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientGetAppSettingsKeyVaultReferencesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetAppSettingsKeyVaultReferencesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAppSettingsKeyVaultReferencesResponse{}, runtime.NewResponseError(resp) - } - return client.getAppSettingsKeyVaultReferencesHandleResponse(resp) - }, - }) -} - -// getAppSettingsKeyVaultReferencesCreateRequest creates the GetAppSettingsKeyVaultReferences request. -func (client *WebAppsClient) getAppSettingsKeyVaultReferencesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAppSettingsKeyVaultReferencesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAppSettingsKeyVaultReferencesHandleResponse handles the GetAppSettingsKeyVaultReferences response. -func (client *WebAppsClient) getAppSettingsKeyVaultReferencesHandleResponse(resp *http.Response) (WebAppsClientGetAppSettingsKeyVaultReferencesResponse, error) { - result := WebAppsClientGetAppSettingsKeyVaultReferencesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReferenceCollection); err != nil { - return WebAppsClientGetAppSettingsKeyVaultReferencesResponse{}, err - } - return result, nil -} - -// NewGetAppSettingsKeyVaultReferencesSlotPager - Gets the config reference app settings and status of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.GetAppSettingsKeyVaultReferencesSlot -// method. -func (client *WebAppsClient) NewGetAppSettingsKeyVaultReferencesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions) *runtime.Pager[WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse]{ - More: func(page WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse) (WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getAppSettingsKeyVaultReferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getAppSettingsKeyVaultReferencesSlotHandleResponse(resp) - }, - }) -} - -// getAppSettingsKeyVaultReferencesSlotCreateRequest creates the GetAppSettingsKeyVaultReferencesSlot request. -func (client *WebAppsClient) getAppSettingsKeyVaultReferencesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAppSettingsKeyVaultReferencesSlotHandleResponse handles the GetAppSettingsKeyVaultReferencesSlot response. -func (client *WebAppsClient) getAppSettingsKeyVaultReferencesSlotHandleResponse(resp *http.Response) (WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse, error) { - result := WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReferenceCollection); err != nil { - return WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{}, err - } - return result, nil -} - -// GetAuthSettings - Gets the Authentication/Authorization settings of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetAuthSettingsOptions contains the optional parameters for the WebAppsClient.GetAuthSettings method. -func (client *WebAppsClient) GetAuthSettings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsOptions) (WebAppsClientGetAuthSettingsResponse, error) { - req, err := client.getAuthSettingsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetAuthSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetAuthSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.getAuthSettingsHandleResponse(resp) -} - -// getAuthSettingsCreateRequest creates the GetAuthSettings request. -func (client *WebAppsClient) getAuthSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAuthSettingsHandleResponse handles the GetAuthSettings response. -func (client *WebAppsClient) getAuthSettingsHandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsResponse, error) { - result := WebAppsClientGetAuthSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettings); err != nil { - return WebAppsClientGetAuthSettingsResponse{}, err - } - return result, nil -} - -// GetAuthSettingsSlot - Gets the Authentication/Authorization settings of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. -// options - WebAppsClientGetAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsSlot -// method. -func (client *WebAppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsSlotOptions) (WebAppsClientGetAuthSettingsSlotResponse, error) { - req, err := client.getAuthSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetAuthSettingsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetAuthSettingsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getAuthSettingsSlotHandleResponse(resp) -} - -// getAuthSettingsSlotCreateRequest creates the GetAuthSettingsSlot request. -func (client *WebAppsClient) getAuthSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAuthSettingsSlotHandleResponse handles the GetAuthSettingsSlot response. -func (client *WebAppsClient) getAuthSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsSlotResponse, error) { - result := WebAppsClientGetAuthSettingsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettings); err != nil { - return WebAppsClientGetAuthSettingsSlotResponse{}, err - } - return result, nil -} - -// GetAuthSettingsV2 - Gets site's Authentication / Authorization settings for apps via the V2 format -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetAuthSettingsV2Options contains the optional parameters for the WebAppsClient.GetAuthSettingsV2 -// method. -func (client *WebAppsClient) GetAuthSettingsV2(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsV2Options) (WebAppsClientGetAuthSettingsV2Response, error) { - req, err := client.getAuthSettingsV2CreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetAuthSettingsV2Response{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetAuthSettingsV2Response{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsV2Response{}, runtime.NewResponseError(resp) - } - return client.getAuthSettingsV2HandleResponse(resp) -} - -// getAuthSettingsV2CreateRequest creates the GetAuthSettingsV2 request. -func (client *WebAppsClient) getAuthSettingsV2CreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsV2Options) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAuthSettingsV2HandleResponse handles the GetAuthSettingsV2 response. -func (client *WebAppsClient) getAuthSettingsV2HandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsV2Response, error) { - result := WebAppsClientGetAuthSettingsV2Response{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { - return WebAppsClientGetAuthSettingsV2Response{}, err - } - return result, nil -} - -// GetAuthSettingsV2Slot - Gets site's Authentication / Authorization settings for apps via the V2 format -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. -// options - WebAppsClientGetAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2Slot -// method. -func (client *WebAppsClient) GetAuthSettingsV2Slot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsV2SlotOptions) (WebAppsClientGetAuthSettingsV2SlotResponse, error) { - req, err := client.getAuthSettingsV2SlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetAuthSettingsV2SlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetAuthSettingsV2SlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsV2SlotResponse{}, runtime.NewResponseError(resp) - } - return client.getAuthSettingsV2SlotHandleResponse(resp) -} - -// getAuthSettingsV2SlotCreateRequest creates the GetAuthSettingsV2Slot request. -func (client *WebAppsClient) getAuthSettingsV2SlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsV2SlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAuthSettingsV2SlotHandleResponse handles the GetAuthSettingsV2Slot response. -func (client *WebAppsClient) getAuthSettingsV2SlotHandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsV2SlotResponse, error) { - result := WebAppsClientGetAuthSettingsV2SlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { - return WebAppsClientGetAuthSettingsV2SlotResponse{}, err - } - return result, nil -} - -// GetAuthSettingsV2WithoutSecrets - Gets site's Authentication / Authorization settings for apps via the V2 format -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetAuthSettingsV2WithoutSecretsOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecrets -// method. -func (client *WebAppsClient) GetAuthSettingsV2WithoutSecrets(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsV2WithoutSecretsOptions) (WebAppsClientGetAuthSettingsV2WithoutSecretsResponse, error) { - req, err := client.getAuthSettingsV2WithoutSecretsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, runtime.NewResponseError(resp) - } - return client.getAuthSettingsV2WithoutSecretsHandleResponse(resp) -} - -// getAuthSettingsV2WithoutSecretsCreateRequest creates the GetAuthSettingsV2WithoutSecrets request. -func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsV2WithoutSecretsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAuthSettingsV2WithoutSecretsHandleResponse handles the GetAuthSettingsV2WithoutSecrets response. -func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsHandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsV2WithoutSecretsResponse, error) { - result := WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { - return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, err - } - return result, nil -} - -// GetAuthSettingsV2WithoutSecretsSlot - Gets site's Authentication / Authorization settings for apps via the V2 format -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. -// options - WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot -// method. -func (client *WebAppsClient) GetAuthSettingsV2WithoutSecretsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions) (WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse, error) { - req, err := client.getAuthSettingsV2WithoutSecretsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getAuthSettingsV2WithoutSecretsSlotHandleResponse(resp) -} - -// getAuthSettingsV2WithoutSecretsSlotCreateRequest creates the GetAuthSettingsV2WithoutSecretsSlot request. -func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getAuthSettingsV2WithoutSecretsSlotHandleResponse handles the GetAuthSettingsV2WithoutSecretsSlot response. -func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsSlotHandleResponse(resp *http.Response) (WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse, error) { - result := WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { - return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, err - } - return result, nil -} - -// GetBackupConfiguration - Gets the backup configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetBackupConfigurationOptions contains the optional parameters for the WebAppsClient.GetBackupConfiguration -// method. -func (client *WebAppsClient) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetBackupConfigurationOptions) (WebAppsClientGetBackupConfigurationResponse, error) { - req, err := client.getBackupConfigurationCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetBackupConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetBackupConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetBackupConfigurationResponse{}, runtime.NewResponseError(resp) - } - return client.getBackupConfigurationHandleResponse(resp) -} - -// getBackupConfigurationCreateRequest creates the GetBackupConfiguration request. -func (client *WebAppsClient) getBackupConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetBackupConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBackupConfigurationHandleResponse handles the GetBackupConfiguration response. -func (client *WebAppsClient) getBackupConfigurationHandleResponse(resp *http.Response) (WebAppsClientGetBackupConfigurationResponse, error) { - result := WebAppsClientGetBackupConfigurationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupRequest); err != nil { - return WebAppsClientGetBackupConfigurationResponse{}, err - } - return result, nil -} - -// GetBackupConfigurationSlot - Gets the backup configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production -// slot. -// options - WebAppsClientGetBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetBackupConfigurationSlot -// method. -func (client *WebAppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetBackupConfigurationSlotOptions) (WebAppsClientGetBackupConfigurationSlotResponse, error) { - req, err := client.getBackupConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetBackupConfigurationSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetBackupConfigurationSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetBackupConfigurationSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getBackupConfigurationSlotHandleResponse(resp) -} - -// getBackupConfigurationSlotCreateRequest creates the GetBackupConfigurationSlot request. -func (client *WebAppsClient) getBackupConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetBackupConfigurationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBackupConfigurationSlotHandleResponse handles the GetBackupConfigurationSlot response. -func (client *WebAppsClient) getBackupConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientGetBackupConfigurationSlotResponse, error) { - result := WebAppsClientGetBackupConfigurationSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupRequest); err != nil { - return WebAppsClientGetBackupConfigurationSlotResponse{}, err - } - return result, nil -} - -// GetBackupStatus - Gets a backup of an app by its ID. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// backupID - ID of the backup. -// options - WebAppsClientGetBackupStatusOptions contains the optional parameters for the WebAppsClient.GetBackupStatus method. -func (client *WebAppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string, options *WebAppsClientGetBackupStatusOptions) (WebAppsClientGetBackupStatusResponse, error) { - req, err := client.getBackupStatusCreateRequest(ctx, resourceGroupName, name, backupID, options) - if err != nil { - return WebAppsClientGetBackupStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetBackupStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetBackupStatusResponse{}, runtime.NewResponseError(resp) - } - return client.getBackupStatusHandleResponse(resp) -} - -// getBackupStatusCreateRequest creates the GetBackupStatus request. -func (client *WebAppsClient) getBackupStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, options *WebAppsClientGetBackupStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if backupID == "" { - return nil, errors.New("parameter backupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBackupStatusHandleResponse handles the GetBackupStatus response. -func (client *WebAppsClient) getBackupStatusHandleResponse(resp *http.Response) (WebAppsClientGetBackupStatusResponse, error) { - result := WebAppsClientGetBackupStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { - return WebAppsClientGetBackupStatusResponse{}, err - } - return result, nil -} - -// GetBackupStatusSlot - Gets a backup of an app by its ID. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// backupID - ID of the backup. -// slot - Name of the deployment slot. If a slot is not specified, the API will get a backup of the production slot. -// options - WebAppsClientGetBackupStatusSlotOptions contains the optional parameters for the WebAppsClient.GetBackupStatusSlot -// method. -func (client *WebAppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *WebAppsClientGetBackupStatusSlotOptions) (WebAppsClientGetBackupStatusSlotResponse, error) { - req, err := client.getBackupStatusSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, options) - if err != nil { - return WebAppsClientGetBackupStatusSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetBackupStatusSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetBackupStatusSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getBackupStatusSlotHandleResponse(resp) -} - -// getBackupStatusSlotCreateRequest creates the GetBackupStatusSlot request. -func (client *WebAppsClient) getBackupStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *WebAppsClientGetBackupStatusSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if backupID == "" { - return nil, errors.New("parameter backupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBackupStatusSlotHandleResponse handles the GetBackupStatusSlot response. -func (client *WebAppsClient) getBackupStatusSlotHandleResponse(resp *http.Response) (WebAppsClientGetBackupStatusSlotResponse, error) { - result := WebAppsClientGetBackupStatusSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { - return WebAppsClientGetBackupStatusSlotResponse{}, err - } - return result, nil -} - -// GetConfiguration - Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, -// Always On, etc. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetConfigurationOptions contains the optional parameters for the WebAppsClient.GetConfiguration -// method. -func (client *WebAppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetConfigurationOptions) (WebAppsClientGetConfigurationResponse, error) { - req, err := client.getConfigurationCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetConfigurationResponse{}, runtime.NewResponseError(resp) - } - return client.getConfigurationHandleResponse(resp) -} - -// getConfigurationCreateRequest creates the GetConfiguration request. -func (client *WebAppsClient) getConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getConfigurationHandleResponse handles the GetConfiguration response. -func (client *WebAppsClient) getConfigurationHandleResponse(resp *http.Response) (WebAppsClientGetConfigurationResponse, error) { - result := WebAppsClientGetConfigurationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { - return WebAppsClientGetConfigurationResponse{}, err - } - return result, nil -} - -// GetConfigurationSlot - Gets the configuration of an app, such as platform version and bitness, default documents, virtual -// applications, Always On, etc. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. -// options - WebAppsClientGetConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSlot -// method. -func (client *WebAppsClient) GetConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetConfigurationSlotOptions) (WebAppsClientGetConfigurationSlotResponse, error) { - req, err := client.getConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetConfigurationSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetConfigurationSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetConfigurationSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getConfigurationSlotHandleResponse(resp) -} - -// getConfigurationSlotCreateRequest creates the GetConfigurationSlot request. -func (client *WebAppsClient) getConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetConfigurationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getConfigurationSlotHandleResponse handles the GetConfigurationSlot response. -func (client *WebAppsClient) getConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientGetConfigurationSlotResponse, error) { - result := WebAppsClientGetConfigurationSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { - return WebAppsClientGetConfigurationSlotResponse{}, err - } - return result, nil -} - -// GetConfigurationSnapshot - Gets a snapshot of the configuration of an app at a previous point in time. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// snapshotID - The ID of the snapshot to read. -// options - WebAppsClientGetConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshot -// method. -func (client *WebAppsClient) GetConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *WebAppsClientGetConfigurationSnapshotOptions) (WebAppsClientGetConfigurationSnapshotResponse, error) { - req, err := client.getConfigurationSnapshotCreateRequest(ctx, resourceGroupName, name, snapshotID, options) - if err != nil { - return WebAppsClientGetConfigurationSnapshotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetConfigurationSnapshotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetConfigurationSnapshotResponse{}, runtime.NewResponseError(resp) - } - return client.getConfigurationSnapshotHandleResponse(resp) -} - -// getConfigurationSnapshotCreateRequest creates the GetConfigurationSnapshot request. -func (client *WebAppsClient) getConfigurationSnapshotCreateRequest(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *WebAppsClientGetConfigurationSnapshotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if snapshotID == "" { - return nil, errors.New("parameter snapshotID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotId}", url.PathEscape(snapshotID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getConfigurationSnapshotHandleResponse handles the GetConfigurationSnapshot response. -func (client *WebAppsClient) getConfigurationSnapshotHandleResponse(resp *http.Response) (WebAppsClientGetConfigurationSnapshotResponse, error) { - result := WebAppsClientGetConfigurationSnapshotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { - return WebAppsClientGetConfigurationSnapshotResponse{}, err - } - return result, nil -} - -// GetConfigurationSnapshotSlot - Gets a snapshot of the configuration of an app at a previous point in time. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// snapshotID - The ID of the snapshot to read. -// slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. -// options - WebAppsClientGetConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshotSlot -// method. -func (client *WebAppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *WebAppsClientGetConfigurationSnapshotSlotOptions) (WebAppsClientGetConfigurationSnapshotSlotResponse, error) { - req, err := client.getConfigurationSnapshotSlotCreateRequest(ctx, resourceGroupName, name, snapshotID, slot, options) - if err != nil { - return WebAppsClientGetConfigurationSnapshotSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetConfigurationSnapshotSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetConfigurationSnapshotSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getConfigurationSnapshotSlotHandleResponse(resp) -} - -// getConfigurationSnapshotSlotCreateRequest creates the GetConfigurationSnapshotSlot request. -func (client *WebAppsClient) getConfigurationSnapshotSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *WebAppsClientGetConfigurationSnapshotSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if snapshotID == "" { - return nil, errors.New("parameter snapshotID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotId}", url.PathEscape(snapshotID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getConfigurationSnapshotSlotHandleResponse handles the GetConfigurationSnapshotSlot response. -func (client *WebAppsClient) getConfigurationSnapshotSlotHandleResponse(resp *http.Response) (WebAppsClientGetConfigurationSnapshotSlotResponse, error) { - result := WebAppsClientGetConfigurationSnapshotSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { - return WebAppsClientGetConfigurationSnapshotSlotResponse{}, err - } - return result, nil -} - -// GetContainerLogsZip - Gets the ZIP archived docker log files for the given site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientGetContainerLogsZipOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZip -// method. -func (client *WebAppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetContainerLogsZipOptions) (WebAppsClientGetContainerLogsZipResponse, error) { - req, err := client.getContainerLogsZipCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetContainerLogsZipResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetContainerLogsZipResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGetContainerLogsZipResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientGetContainerLogsZipResponse{Body: resp.Body}, nil -} - -// getContainerLogsZipCreateRequest creates the GetContainerLogsZip request. -func (client *WebAppsClient) getContainerLogsZipCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetContainerLogsZipOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - runtime.SkipBodyDownload(req) - req.Raw().Header["Accept"] = []string{"application/zip"} - return req, nil -} - -// GetContainerLogsZipSlot - Gets the ZIP archived docker log files for the given site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - WebAppsClientGetContainerLogsZipSlotOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZipSlot -// method. -func (client *WebAppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetContainerLogsZipSlotOptions) (WebAppsClientGetContainerLogsZipSlotResponse, error) { - req, err := client.getContainerLogsZipSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetContainerLogsZipSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetContainerLogsZipSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGetContainerLogsZipSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientGetContainerLogsZipSlotResponse{Body: resp.Body}, nil -} - -// getContainerLogsZipSlotCreateRequest creates the GetContainerLogsZipSlot request. -func (client *WebAppsClient) getContainerLogsZipSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetContainerLogsZipSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - runtime.SkipBodyDownload(req) - req.Raw().Header["Accept"] = []string{"application/zip"} - return req, nil -} - -// GetContinuousWebJob - Gets a continuous web job by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// options - WebAppsClientGetContinuousWebJobOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJob -// method. -func (client *WebAppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetContinuousWebJobOptions) (WebAppsClientGetContinuousWebJobResponse, error) { - req, err := client.getContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) - if err != nil { - return WebAppsClientGetContinuousWebJobResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetContinuousWebJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetContinuousWebJobResponse{}, runtime.NewResponseError(resp) - } - return client.getContinuousWebJobHandleResponse(resp) -} - -// getContinuousWebJobCreateRequest creates the GetContinuousWebJob request. -func (client *WebAppsClient) getContinuousWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetContinuousWebJobOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getContinuousWebJobHandleResponse handles the GetContinuousWebJob response. -func (client *WebAppsClient) getContinuousWebJobHandleResponse(resp *http.Response) (WebAppsClientGetContinuousWebJobResponse, error) { - result := WebAppsClientGetContinuousWebJobResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ContinuousWebJob); err != nil { - return WebAppsClientGetContinuousWebJobResponse{}, err - } - return result, nil -} - -// GetContinuousWebJobSlot - Gets a continuous web job by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. -// options - WebAppsClientGetContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJobSlot -// method. -func (client *WebAppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetContinuousWebJobSlotOptions) (WebAppsClientGetContinuousWebJobSlotResponse, error) { - req, err := client.getContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) - if err != nil { - return WebAppsClientGetContinuousWebJobSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetContinuousWebJobSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetContinuousWebJobSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getContinuousWebJobSlotHandleResponse(resp) -} - -// getContinuousWebJobSlotCreateRequest creates the GetContinuousWebJobSlot request. -func (client *WebAppsClient) getContinuousWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetContinuousWebJobSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getContinuousWebJobSlotHandleResponse handles the GetContinuousWebJobSlot response. -func (client *WebAppsClient) getContinuousWebJobSlotHandleResponse(resp *http.Response) (WebAppsClientGetContinuousWebJobSlotResponse, error) { - result := WebAppsClientGetContinuousWebJobSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ContinuousWebJob); err != nil { - return WebAppsClientGetContinuousWebJobSlotResponse{}, err - } - return result, nil -} - -// GetDeployment - Get a deployment by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// id - Deployment ID. -// options - WebAppsClientGetDeploymentOptions contains the optional parameters for the WebAppsClient.GetDeployment method. -func (client *WebAppsClient) GetDeployment(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientGetDeploymentOptions) (WebAppsClientGetDeploymentResponse, error) { - req, err := client.getDeploymentCreateRequest(ctx, resourceGroupName, name, id, options) - if err != nil { - return WebAppsClientGetDeploymentResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetDeploymentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDeploymentResponse{}, runtime.NewResponseError(resp) - } - return client.getDeploymentHandleResponse(resp) -} - -// getDeploymentCreateRequest creates the GetDeployment request. -func (client *WebAppsClient) getDeploymentCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientGetDeploymentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if id == "" { - return nil, errors.New("parameter id cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDeploymentHandleResponse handles the GetDeployment response. -func (client *WebAppsClient) getDeploymentHandleResponse(resp *http.Response) (WebAppsClientGetDeploymentResponse, error) { - result := WebAppsClientGetDeploymentResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { - return WebAppsClientGetDeploymentResponse{}, err - } - return result, nil -} - -// GetDeploymentSlot - Get a deployment by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// id - Deployment ID. -// slot - Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production slot. -// options - WebAppsClientGetDeploymentSlotOptions contains the optional parameters for the WebAppsClient.GetDeploymentSlot -// method. -func (client *WebAppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientGetDeploymentSlotOptions) (WebAppsClientGetDeploymentSlotResponse, error) { - req, err := client.getDeploymentSlotCreateRequest(ctx, resourceGroupName, name, id, slot, options) - if err != nil { - return WebAppsClientGetDeploymentSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetDeploymentSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDeploymentSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getDeploymentSlotHandleResponse(resp) -} - -// getDeploymentSlotCreateRequest creates the GetDeploymentSlot request. -func (client *WebAppsClient) getDeploymentSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientGetDeploymentSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if id == "" { - return nil, errors.New("parameter id cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDeploymentSlotHandleResponse handles the GetDeploymentSlot response. -func (client *WebAppsClient) getDeploymentSlotHandleResponse(resp *http.Response) (WebAppsClientGetDeploymentSlotResponse, error) { - result := WebAppsClientGetDeploymentSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { - return WebAppsClientGetDeploymentSlotResponse{}, err - } - return result, nil -} - -// GetDiagnosticLogsConfiguration - Gets the logging configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetDiagnosticLogsConfigurationOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfiguration -// method. -func (client *WebAppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetDiagnosticLogsConfigurationOptions) (WebAppsClientGetDiagnosticLogsConfigurationResponse, error) { - req, err := client.getDiagnosticLogsConfigurationCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, runtime.NewResponseError(resp) - } - return client.getDiagnosticLogsConfigurationHandleResponse(resp) -} - -// getDiagnosticLogsConfigurationCreateRequest creates the GetDiagnosticLogsConfiguration request. -func (client *WebAppsClient) getDiagnosticLogsConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetDiagnosticLogsConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDiagnosticLogsConfigurationHandleResponse handles the GetDiagnosticLogsConfiguration response. -func (client *WebAppsClient) getDiagnosticLogsConfigurationHandleResponse(resp *http.Response) (WebAppsClientGetDiagnosticLogsConfigurationResponse, error) { - result := WebAppsClientGetDiagnosticLogsConfigurationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteLogsConfig); err != nil { - return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, err - } - return result, nil -} - -// GetDiagnosticLogsConfigurationSlot - Gets the logging configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production -// slot. -// options - WebAppsClientGetDiagnosticLogsConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfigurationSlot -// method. -func (client *WebAppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetDiagnosticLogsConfigurationSlotOptions) (WebAppsClientGetDiagnosticLogsConfigurationSlotResponse, error) { - req, err := client.getDiagnosticLogsConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getDiagnosticLogsConfigurationSlotHandleResponse(resp) -} - -// getDiagnosticLogsConfigurationSlotCreateRequest creates the GetDiagnosticLogsConfigurationSlot request. -func (client *WebAppsClient) getDiagnosticLogsConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetDiagnosticLogsConfigurationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDiagnosticLogsConfigurationSlotHandleResponse handles the GetDiagnosticLogsConfigurationSlot response. -func (client *WebAppsClient) getDiagnosticLogsConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientGetDiagnosticLogsConfigurationSlotResponse, error) { - result := WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteLogsConfig); err != nil { - return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, err - } - return result, nil -} - -// GetDomainOwnershipIdentifier - Get domain ownership identifier for web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// domainOwnershipIdentifierName - Name of domain ownership identifier. -// options - WebAppsClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifier -// method. -func (client *WebAppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *WebAppsClientGetDomainOwnershipIdentifierOptions) (WebAppsClientGetDomainOwnershipIdentifierResponse, error) { - req, err := client.getDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, options) - if err != nil { - return WebAppsClientGetDomainOwnershipIdentifierResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetDomainOwnershipIdentifierResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDomainOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) - } - return client.getDomainOwnershipIdentifierHandleResponse(resp) -} - -// getDomainOwnershipIdentifierCreateRequest creates the GetDomainOwnershipIdentifier request. -func (client *WebAppsClient) getDomainOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *WebAppsClientGetDomainOwnershipIdentifierOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainOwnershipIdentifierName == "" { - return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDomainOwnershipIdentifierHandleResponse handles the GetDomainOwnershipIdentifier response. -func (client *WebAppsClient) getDomainOwnershipIdentifierHandleResponse(resp *http.Response) (WebAppsClientGetDomainOwnershipIdentifierResponse, error) { - result := WebAppsClientGetDomainOwnershipIdentifierResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { - return WebAppsClientGetDomainOwnershipIdentifierResponse{}, err - } - return result, nil -} - -// GetDomainOwnershipIdentifierSlot - Get domain ownership identifier for web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// domainOwnershipIdentifierName - Name of domain ownership identifier. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. -// options - WebAppsClientGetDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifierSlot -// method. -func (client *WebAppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *WebAppsClientGetDomainOwnershipIdentifierSlotOptions) (WebAppsClientGetDomainOwnershipIdentifierSlotResponse, error) { - req, err := client.getDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, options) - if err != nil { - return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getDomainOwnershipIdentifierSlotHandleResponse(resp) -} - -// getDomainOwnershipIdentifierSlotCreateRequest creates the GetDomainOwnershipIdentifierSlot request. -func (client *WebAppsClient) getDomainOwnershipIdentifierSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *WebAppsClientGetDomainOwnershipIdentifierSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainOwnershipIdentifierName == "" { - return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDomainOwnershipIdentifierSlotHandleResponse handles the GetDomainOwnershipIdentifierSlot response. -func (client *WebAppsClient) getDomainOwnershipIdentifierSlotHandleResponse(resp *http.Response) (WebAppsClientGetDomainOwnershipIdentifierSlotResponse, error) { - result := WebAppsClientGetDomainOwnershipIdentifierSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { - return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, err - } - return result, nil -} - -// GetFtpAllowed - Returns whether FTP is allowed on the site or not. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetFtpAllowedOptions contains the optional parameters for the WebAppsClient.GetFtpAllowed method. -func (client *WebAppsClient) GetFtpAllowed(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetFtpAllowedOptions) (WebAppsClientGetFtpAllowedResponse, error) { - req, err := client.getFtpAllowedCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetFtpAllowedResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetFtpAllowedResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetFtpAllowedResponse{}, runtime.NewResponseError(resp) - } - return client.getFtpAllowedHandleResponse(resp) -} - -// getFtpAllowedCreateRequest creates the GetFtpAllowed request. -func (client *WebAppsClient) getFtpAllowedCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetFtpAllowedOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getFtpAllowedHandleResponse handles the GetFtpAllowed response. -func (client *WebAppsClient) getFtpAllowedHandleResponse(resp *http.Response) (WebAppsClientGetFtpAllowedResponse, error) { - result := WebAppsClientGetFtpAllowedResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { - return WebAppsClientGetFtpAllowedResponse{}, err - } - return result, nil -} - -// GetFtpAllowedSlot - Returns whether FTP is allowed on the site or not. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetFtpAllowedSlot -// method. -func (client *WebAppsClient) GetFtpAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetFtpAllowedSlotOptions) (WebAppsClientGetFtpAllowedSlotResponse, error) { - req, err := client.getFtpAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetFtpAllowedSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetFtpAllowedSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetFtpAllowedSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getFtpAllowedSlotHandleResponse(resp) -} - -// getFtpAllowedSlotCreateRequest creates the GetFtpAllowedSlot request. -func (client *WebAppsClient) getFtpAllowedSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetFtpAllowedSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getFtpAllowedSlotHandleResponse handles the GetFtpAllowedSlot response. -func (client *WebAppsClient) getFtpAllowedSlotHandleResponse(resp *http.Response) (WebAppsClientGetFtpAllowedSlotResponse, error) { - result := WebAppsClientGetFtpAllowedSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { - return WebAppsClientGetFtpAllowedSlotResponse{}, err - } - return result, nil -} - -// GetFunction - Get function information by its ID for web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - Function name. -// options - WebAppsClientGetFunctionOptions contains the optional parameters for the WebAppsClient.GetFunction method. -func (client *WebAppsClient) GetFunction(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientGetFunctionOptions) (WebAppsClientGetFunctionResponse, error) { - req, err := client.getFunctionCreateRequest(ctx, resourceGroupName, name, functionName, options) - if err != nil { - return WebAppsClientGetFunctionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetFunctionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetFunctionResponse{}, runtime.NewResponseError(resp) - } - return client.getFunctionHandleResponse(resp) -} - -// getFunctionCreateRequest creates the GetFunction request. -func (client *WebAppsClient) getFunctionCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientGetFunctionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getFunctionHandleResponse handles the GetFunction response. -func (client *WebAppsClient) getFunctionHandleResponse(resp *http.Response) (WebAppsClientGetFunctionResponse, error) { - result := WebAppsClientGetFunctionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FunctionEnvelope); err != nil { - return WebAppsClientGetFunctionResponse{}, err - } - return result, nil -} - -// GetFunctionsAdminToken - Fetch a short lived token that can be exchanged for a master key. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientGetFunctionsAdminTokenOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminToken -// method. -func (client *WebAppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetFunctionsAdminTokenOptions) (WebAppsClientGetFunctionsAdminTokenResponse, error) { - req, err := client.getFunctionsAdminTokenCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetFunctionsAdminTokenResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetFunctionsAdminTokenResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetFunctionsAdminTokenResponse{}, runtime.NewResponseError(resp) - } - return client.getFunctionsAdminTokenHandleResponse(resp) -} - -// getFunctionsAdminTokenCreateRequest creates the GetFunctionsAdminToken request. -func (client *WebAppsClient) getFunctionsAdminTokenCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetFunctionsAdminTokenOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getFunctionsAdminTokenHandleResponse handles the GetFunctionsAdminToken response. -func (client *WebAppsClient) getFunctionsAdminTokenHandleResponse(resp *http.Response) (WebAppsClientGetFunctionsAdminTokenResponse, error) { - result := WebAppsClientGetFunctionsAdminTokenResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { - return WebAppsClientGetFunctionsAdminTokenResponse{}, err - } - return result, nil -} - -// GetFunctionsAdminTokenSlot - Fetch a short lived token that can be exchanged for a master key. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - WebAppsClientGetFunctionsAdminTokenSlotOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminTokenSlot -// method. -func (client *WebAppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetFunctionsAdminTokenSlotOptions) (WebAppsClientGetFunctionsAdminTokenSlotResponse, error) { - req, err := client.getFunctionsAdminTokenSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getFunctionsAdminTokenSlotHandleResponse(resp) -} - -// getFunctionsAdminTokenSlotCreateRequest creates the GetFunctionsAdminTokenSlot request. -func (client *WebAppsClient) getFunctionsAdminTokenSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetFunctionsAdminTokenSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getFunctionsAdminTokenSlotHandleResponse handles the GetFunctionsAdminTokenSlot response. -func (client *WebAppsClient) getFunctionsAdminTokenSlotHandleResponse(resp *http.Response) (WebAppsClientGetFunctionsAdminTokenSlotResponse, error) { - result := WebAppsClientGetFunctionsAdminTokenSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { - return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, err - } - return result, nil -} - -// GetHostNameBinding - Get the named hostname binding for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// hostName - Hostname in the hostname binding. -// options - WebAppsClientGetHostNameBindingOptions contains the optional parameters for the WebAppsClient.GetHostNameBinding -// method. -func (client *WebAppsClient) GetHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, options *WebAppsClientGetHostNameBindingOptions) (WebAppsClientGetHostNameBindingResponse, error) { - req, err := client.getHostNameBindingCreateRequest(ctx, resourceGroupName, name, hostName, options) - if err != nil { - return WebAppsClientGetHostNameBindingResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetHostNameBindingResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetHostNameBindingResponse{}, runtime.NewResponseError(resp) - } - return client.getHostNameBindingHandleResponse(resp) -} - -// getHostNameBindingCreateRequest creates the GetHostNameBinding request. -func (client *WebAppsClient) getHostNameBindingCreateRequest(ctx context.Context, resourceGroupName string, name string, hostName string, options *WebAppsClientGetHostNameBindingOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if hostName == "" { - return nil, errors.New("parameter hostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHostNameBindingHandleResponse handles the GetHostNameBinding response. -func (client *WebAppsClient) getHostNameBindingHandleResponse(resp *http.Response) (WebAppsClientGetHostNameBindingResponse, error) { - result := WebAppsClientGetHostNameBindingResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBinding); err != nil { - return WebAppsClientGetHostNameBindingResponse{}, err - } - return result, nil -} - -// GetHostNameBindingSlot - Get the named hostname binding for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. -// hostName - Hostname in the hostname binding. -// options - WebAppsClientGetHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.GetHostNameBindingSlot -// method. -func (client *WebAppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *WebAppsClientGetHostNameBindingSlotOptions) (WebAppsClientGetHostNameBindingSlotResponse, error) { - req, err := client.getHostNameBindingSlotCreateRequest(ctx, resourceGroupName, name, slot, hostName, options) - if err != nil { - return WebAppsClientGetHostNameBindingSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetHostNameBindingSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetHostNameBindingSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getHostNameBindingSlotHandleResponse(resp) -} - -// getHostNameBindingSlotCreateRequest creates the GetHostNameBindingSlot request. -func (client *WebAppsClient) getHostNameBindingSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *WebAppsClientGetHostNameBindingSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if hostName == "" { - return nil, errors.New("parameter hostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHostNameBindingSlotHandleResponse handles the GetHostNameBindingSlot response. -func (client *WebAppsClient) getHostNameBindingSlotHandleResponse(resp *http.Response) (WebAppsClientGetHostNameBindingSlotResponse, error) { - result := WebAppsClientGetHostNameBindingSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBinding); err != nil { - return WebAppsClientGetHostNameBindingSlotResponse{}, err - } - return result, nil -} - -// GetHybridConnection - Retrieves a specific Service Bus Hybrid Connection used by this Web App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// namespaceName - The namespace for this hybrid connection. -// relayName - The relay name for this hybrid connection. -// options - WebAppsClientGetHybridConnectionOptions contains the optional parameters for the WebAppsClient.GetHybridConnection -// method. -func (client *WebAppsClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *WebAppsClientGetHybridConnectionOptions) (WebAppsClientGetHybridConnectionResponse, error) { - req, err := client.getHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) - if err != nil { - return WebAppsClientGetHybridConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetHybridConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetHybridConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.getHybridConnectionHandleResponse(resp) -} - -// getHybridConnectionCreateRequest creates the GetHybridConnection request. -func (client *WebAppsClient) getHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *WebAppsClientGetHybridConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHybridConnectionHandleResponse handles the GetHybridConnection response. -func (client *WebAppsClient) getHybridConnectionHandleResponse(resp *http.Response) (WebAppsClientGetHybridConnectionResponse, error) { - result := WebAppsClientGetHybridConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { - return WebAppsClientGetHybridConnectionResponse{}, err - } - return result, nil -} - -// GetHybridConnectionSlot - Retrieves a specific Service Bus Hybrid Connection used by this Web App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// namespaceName - The namespace for this hybrid connection. -// relayName - The relay name for this hybrid connection. -// slot - The name of the slot for the web app. -// options - WebAppsClientGetHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetHybridConnectionSlot -// method. -func (client *WebAppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *WebAppsClientGetHybridConnectionSlotOptions) (WebAppsClientGetHybridConnectionSlotResponse, error) { - req, err := client.getHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, options) - if err != nil { - return WebAppsClientGetHybridConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetHybridConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetHybridConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getHybridConnectionSlotHandleResponse(resp) -} - -// getHybridConnectionSlotCreateRequest creates the GetHybridConnectionSlot request. -func (client *WebAppsClient) getHybridConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *WebAppsClientGetHybridConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHybridConnectionSlotHandleResponse handles the GetHybridConnectionSlot response. -func (client *WebAppsClient) getHybridConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientGetHybridConnectionSlotResponse, error) { - result := WebAppsClientGetHybridConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { - return WebAppsClientGetHybridConnectionSlotResponse{}, err - } - return result, nil -} - -// GetInstanceFunctionSlot - Get function information by its ID for web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - Function name. -// slot - Name of the deployment slot. -// options - WebAppsClientGetInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceFunctionSlot -// method. -func (client *WebAppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientGetInstanceFunctionSlotOptions) (WebAppsClientGetInstanceFunctionSlotResponse, error) { - req, err := client.getInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) - if err != nil { - return WebAppsClientGetInstanceFunctionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceFunctionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceFunctionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceFunctionSlotHandleResponse(resp) -} - -// getInstanceFunctionSlotCreateRequest creates the GetInstanceFunctionSlot request. -func (client *WebAppsClient) getInstanceFunctionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientGetInstanceFunctionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceFunctionSlotHandleResponse handles the GetInstanceFunctionSlot response. -func (client *WebAppsClient) getInstanceFunctionSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceFunctionSlotResponse, error) { - result := WebAppsClientGetInstanceFunctionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FunctionEnvelope); err != nil { - return WebAppsClientGetInstanceFunctionSlotResponse{}, err - } - return result, nil -} - -// GetInstanceInfo - Gets all scale-out instances of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetInstanceInfoOptions contains the optional parameters for the WebAppsClient.GetInstanceInfo method. -func (client *WebAppsClient) GetInstanceInfo(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceInfoOptions) (WebAppsClientGetInstanceInfoResponse, error) { - req, err := client.getInstanceInfoCreateRequest(ctx, resourceGroupName, name, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceInfoResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceInfoResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceInfoResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceInfoHandleResponse(resp) -} - -// getInstanceInfoCreateRequest creates the GetInstanceInfo request. -func (client *WebAppsClient) getInstanceInfoCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceInfoOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceInfoHandleResponse handles the GetInstanceInfo response. -func (client *WebAppsClient) getInstanceInfoHandleResponse(resp *http.Response) (WebAppsClientGetInstanceInfoResponse, error) { - result := WebAppsClientGetInstanceInfoResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebSiteInstanceStatus); err != nil { - return WebAppsClientGetInstanceInfoResponse{}, err - } - return result, nil -} - -// GetInstanceInfoSlot - Gets all scale-out instances of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. -// options - WebAppsClientGetInstanceInfoSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceInfoSlot -// method. -func (client *WebAppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string, options *WebAppsClientGetInstanceInfoSlotOptions) (WebAppsClientGetInstanceInfoSlotResponse, error) { - req, err := client.getInstanceInfoSlotCreateRequest(ctx, resourceGroupName, name, instanceID, slot, options) - if err != nil { - return WebAppsClientGetInstanceInfoSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceInfoSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceInfoSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceInfoSlotHandleResponse(resp) -} - -// getInstanceInfoSlotCreateRequest creates the GetInstanceInfoSlot request. -func (client *WebAppsClient) getInstanceInfoSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string, options *WebAppsClientGetInstanceInfoSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceInfoSlotHandleResponse handles the GetInstanceInfoSlot response. -func (client *WebAppsClient) getInstanceInfoSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceInfoSlotResponse, error) { - result := WebAppsClientGetInstanceInfoSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebSiteInstanceStatus); err != nil { - return WebAppsClientGetInstanceInfoSlotResponse{}, err - } - return result, nil -} - -// GetInstanceMSDeployLog - Get the MSDeploy Log for the last MSDeploy operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// instanceID - ID of web app instance. -// options - WebAppsClientGetInstanceMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLog -// method. -func (client *WebAppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceMSDeployLogOptions) (WebAppsClientGetInstanceMSDeployLogResponse, error) { - req, err := client.getInstanceMSDeployLogCreateRequest(ctx, resourceGroupName, name, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceMSDeployLogResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceMSDeployLogResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceMSDeployLogResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceMSDeployLogHandleResponse(resp) -} - -// getInstanceMSDeployLogCreateRequest creates the GetInstanceMSDeployLog request. -func (client *WebAppsClient) getInstanceMSDeployLogCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceMSDeployLogOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceMSDeployLogHandleResponse handles the GetInstanceMSDeployLog response. -func (client *WebAppsClient) getInstanceMSDeployLogHandleResponse(resp *http.Response) (WebAppsClientGetInstanceMSDeployLogResponse, error) { - result := WebAppsClientGetInstanceMSDeployLogResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployLog); err != nil { - return WebAppsClientGetInstanceMSDeployLogResponse{}, err - } - return result, nil -} - -// GetInstanceMSDeployLogSlot - Get the MSDeploy Log for the last MSDeploy operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// instanceID - ID of web app instance. -// options - WebAppsClientGetInstanceMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLogSlot -// method. -func (client *WebAppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientGetInstanceMSDeployLogSlotOptions) (WebAppsClientGetInstanceMSDeployLogSlotResponse, error) { - req, err := client.getInstanceMSDeployLogSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceMSDeployLogSlotHandleResponse(resp) -} - -// getInstanceMSDeployLogSlotCreateRequest creates the GetInstanceMSDeployLogSlot request. -func (client *WebAppsClient) getInstanceMSDeployLogSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientGetInstanceMSDeployLogSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceMSDeployLogSlotHandleResponse handles the GetInstanceMSDeployLogSlot response. -func (client *WebAppsClient) getInstanceMSDeployLogSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceMSDeployLogSlotResponse, error) { - result := WebAppsClientGetInstanceMSDeployLogSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployLog); err != nil { - return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, err - } - return result, nil -} - -// GetInstanceMsDeployStatus - Get the status of the last MSDeploy operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// instanceID - ID of web app instance. -// options - WebAppsClientGetInstanceMsDeployStatusOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatus -// method. -func (client *WebAppsClient) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceMsDeployStatusOptions) (WebAppsClientGetInstanceMsDeployStatusResponse, error) { - req, err := client.getInstanceMsDeployStatusCreateRequest(ctx, resourceGroupName, name, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceMsDeployStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceMsDeployStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceMsDeployStatusResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceMsDeployStatusHandleResponse(resp) -} - -// getInstanceMsDeployStatusCreateRequest creates the GetInstanceMsDeployStatus request. -func (client *WebAppsClient) getInstanceMsDeployStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceMsDeployStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceMsDeployStatusHandleResponse handles the GetInstanceMsDeployStatus response. -func (client *WebAppsClient) getInstanceMsDeployStatusHandleResponse(resp *http.Response) (WebAppsClientGetInstanceMsDeployStatusResponse, error) { - result := WebAppsClientGetInstanceMsDeployStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployStatus); err != nil { - return WebAppsClientGetInstanceMsDeployStatusResponse{}, err - } - return result, nil -} - -// GetInstanceMsDeployStatusSlot - Get the status of the last MSDeploy operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// instanceID - ID of web app instance. -// options - WebAppsClientGetInstanceMsDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatusSlot -// method. -func (client *WebAppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientGetInstanceMsDeployStatusSlotOptions) (WebAppsClientGetInstanceMsDeployStatusSlotResponse, error) { - req, err := client.getInstanceMsDeployStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceMsDeployStatusSlotHandleResponse(resp) -} - -// getInstanceMsDeployStatusSlotCreateRequest creates the GetInstanceMsDeployStatusSlot request. -func (client *WebAppsClient) getInstanceMsDeployStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientGetInstanceMsDeployStatusSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceMsDeployStatusSlotHandleResponse handles the GetInstanceMsDeployStatusSlot response. -func (client *WebAppsClient) getInstanceMsDeployStatusSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceMsDeployStatusSlotResponse, error) { - result := WebAppsClientGetInstanceMsDeployStatusSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployStatus); err != nil { - return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, err - } - return result, nil -} - -// GetInstanceProcess - Get process information by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// 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". -// options - WebAppsClientGetInstanceProcessOptions contains the optional parameters for the WebAppsClient.GetInstanceProcess -// method. -func (client *WebAppsClient) GetInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientGetInstanceProcessOptions) (WebAppsClientGetInstanceProcessResponse, error) { - req, err := client.getInstanceProcessCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceProcessResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceProcessResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceProcessHandleResponse(resp) -} - -// getInstanceProcessCreateRequest creates the GetInstanceProcess request. -func (client *WebAppsClient) getInstanceProcessCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientGetInstanceProcessOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceProcessHandleResponse handles the GetInstanceProcess response. -func (client *WebAppsClient) getInstanceProcessHandleResponse(resp *http.Response) (WebAppsClientGetInstanceProcessResponse, error) { - result := WebAppsClientGetInstanceProcessResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfo); err != nil { - return WebAppsClientGetInstanceProcessResponse{}, err - } - return result, nil -} - -// GetInstanceProcessDump - Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// 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". -// options - WebAppsClientGetInstanceProcessDumpOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDump -// method. -func (client *WebAppsClient) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientGetInstanceProcessDumpOptions) (WebAppsClientGetInstanceProcessDumpResponse, error) { - req, err := client.getInstanceProcessDumpCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceProcessDumpResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceProcessDumpResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessDumpResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientGetInstanceProcessDumpResponse{Body: resp.Body}, nil -} - -// getInstanceProcessDumpCreateRequest creates the GetInstanceProcessDump request. -func (client *WebAppsClient) getInstanceProcessDumpCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientGetInstanceProcessDumpOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - runtime.SkipBodyDownload(req) - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GetInstanceProcessDumpSlot - Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// 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". -// options - WebAppsClientGetInstanceProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDumpSlot -// method. -func (client *WebAppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessDumpSlotOptions) (WebAppsClientGetInstanceProcessDumpSlotResponse, error) { - req, err := client.getInstanceProcessDumpSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceProcessDumpSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceProcessDumpSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessDumpSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientGetInstanceProcessDumpSlotResponse{Body: resp.Body}, nil -} - -// getInstanceProcessDumpSlotCreateRequest creates the GetInstanceProcessDumpSlot request. -func (client *WebAppsClient) getInstanceProcessDumpSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessDumpSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - runtime.SkipBodyDownload(req) - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GetInstanceProcessModule - Get process information by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// baseAddress - Module base address. -// 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". -// options - WebAppsClientGetInstanceProcessModuleOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModule -// method. -func (client *WebAppsClient) GetInstanceProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string, options *WebAppsClientGetInstanceProcessModuleOptions) (WebAppsClientGetInstanceProcessModuleResponse, error) { - req, err := client.getInstanceProcessModuleCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceProcessModuleResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceProcessModuleResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessModuleResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceProcessModuleHandleResponse(resp) -} - -// getInstanceProcessModuleCreateRequest creates the GetInstanceProcessModule request. -func (client *WebAppsClient) getInstanceProcessModuleCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string, options *WebAppsClientGetInstanceProcessModuleOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if baseAddress == "" { - return nil, errors.New("parameter baseAddress cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{baseAddress}", url.PathEscape(baseAddress)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceProcessModuleHandleResponse handles the GetInstanceProcessModule response. -func (client *WebAppsClient) getInstanceProcessModuleHandleResponse(resp *http.Response) (WebAppsClientGetInstanceProcessModuleResponse, error) { - result := WebAppsClientGetInstanceProcessModuleResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfo); err != nil { - return WebAppsClientGetInstanceProcessModuleResponse{}, err - } - return result, nil -} - -// GetInstanceProcessModuleSlot - Get process information by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// baseAddress - Module base address. -// 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". -// options - WebAppsClientGetInstanceProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModuleSlot -// method. -func (client *WebAppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessModuleSlotOptions) (WebAppsClientGetInstanceProcessModuleSlotResponse, error) { - req, err := client.getInstanceProcessModuleSlotCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceProcessModuleSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceProcessModuleSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessModuleSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceProcessModuleSlotHandleResponse(resp) -} - -// getInstanceProcessModuleSlotCreateRequest creates the GetInstanceProcessModuleSlot request. -func (client *WebAppsClient) getInstanceProcessModuleSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessModuleSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if baseAddress == "" { - return nil, errors.New("parameter baseAddress cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{baseAddress}", url.PathEscape(baseAddress)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceProcessModuleSlotHandleResponse handles the GetInstanceProcessModuleSlot response. -func (client *WebAppsClient) getInstanceProcessModuleSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceProcessModuleSlotResponse, error) { - result := WebAppsClientGetInstanceProcessModuleSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfo); err != nil { - return WebAppsClientGetInstanceProcessModuleSlotResponse{}, err - } - return result, nil -} - -// GetInstanceProcessSlot - Get process information by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// 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. -// 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". -// options - WebAppsClientGetInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessSlot -// method. -func (client *WebAppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessSlotOptions) (WebAppsClientGetInstanceProcessSlotResponse, error) { - req, err := client.getInstanceProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) - if err != nil { - return WebAppsClientGetInstanceProcessSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetInstanceProcessSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getInstanceProcessSlotHandleResponse(resp) -} - -// getInstanceProcessSlotCreateRequest creates the GetInstanceProcessSlot request. -func (client *WebAppsClient) getInstanceProcessSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInstanceProcessSlotHandleResponse handles the GetInstanceProcessSlot response. -func (client *WebAppsClient) getInstanceProcessSlotHandleResponse(resp *http.Response) (WebAppsClientGetInstanceProcessSlotResponse, error) { - result := WebAppsClientGetInstanceProcessSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfo); err != nil { - return WebAppsClientGetInstanceProcessSlotResponse{}, err - } - return result, nil -} - -// GetMSDeployLog - Get the MSDeploy Log for the last MSDeploy operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientGetMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetMSDeployLog method. -func (client *WebAppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployLogOptions) (WebAppsClientGetMSDeployLogResponse, error) { - req, err := client.getMSDeployLogCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetMSDeployLogResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetMSDeployLogResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMSDeployLogResponse{}, runtime.NewResponseError(resp) - } - return client.getMSDeployLogHandleResponse(resp) -} - -// getMSDeployLogCreateRequest creates the GetMSDeployLog request. -func (client *WebAppsClient) getMSDeployLogCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployLogOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getMSDeployLogHandleResponse handles the GetMSDeployLog response. -func (client *WebAppsClient) getMSDeployLogHandleResponse(resp *http.Response) (WebAppsClientGetMSDeployLogResponse, error) { - result := WebAppsClientGetMSDeployLogResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployLog); err != nil { - return WebAppsClientGetMSDeployLogResponse{}, err - } - return result, nil -} - -// GetMSDeployLogSlot - Get the MSDeploy Log for the last MSDeploy operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - WebAppsClientGetMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployLogSlot -// method. -func (client *WebAppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMSDeployLogSlotOptions) (WebAppsClientGetMSDeployLogSlotResponse, error) { - req, err := client.getMSDeployLogSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetMSDeployLogSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetMSDeployLogSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMSDeployLogSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getMSDeployLogSlotHandleResponse(resp) -} - -// getMSDeployLogSlotCreateRequest creates the GetMSDeployLogSlot request. -func (client *WebAppsClient) getMSDeployLogSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMSDeployLogSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getMSDeployLogSlotHandleResponse handles the GetMSDeployLogSlot response. -func (client *WebAppsClient) getMSDeployLogSlotHandleResponse(resp *http.Response) (WebAppsClientGetMSDeployLogSlotResponse, error) { - result := WebAppsClientGetMSDeployLogSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployLog); err != nil { - return WebAppsClientGetMSDeployLogSlotResponse{}, err - } - return result, nil -} - -// GetMSDeployStatus - Get the status of the last MSDeploy operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientGetMSDeployStatusOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatus -// method. -func (client *WebAppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployStatusOptions) (WebAppsClientGetMSDeployStatusResponse, error) { - req, err := client.getMSDeployStatusCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetMSDeployStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetMSDeployStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMSDeployStatusResponse{}, runtime.NewResponseError(resp) - } - return client.getMSDeployStatusHandleResponse(resp) -} - -// getMSDeployStatusCreateRequest creates the GetMSDeployStatus request. -func (client *WebAppsClient) getMSDeployStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getMSDeployStatusHandleResponse handles the GetMSDeployStatus response. -func (client *WebAppsClient) getMSDeployStatusHandleResponse(resp *http.Response) (WebAppsClientGetMSDeployStatusResponse, error) { - result := WebAppsClientGetMSDeployStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployStatus); err != nil { - return WebAppsClientGetMSDeployStatusResponse{}, err - } - return result, nil -} - -// GetMSDeployStatusSlot - Get the status of the last MSDeploy operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - WebAppsClientGetMSDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatusSlot -// method. -func (client *WebAppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMSDeployStatusSlotOptions) (WebAppsClientGetMSDeployStatusSlotResponse, error) { - req, err := client.getMSDeployStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetMSDeployStatusSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetMSDeployStatusSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMSDeployStatusSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getMSDeployStatusSlotHandleResponse(resp) -} - -// getMSDeployStatusSlotCreateRequest creates the GetMSDeployStatusSlot request. -func (client *WebAppsClient) getMSDeployStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMSDeployStatusSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getMSDeployStatusSlotHandleResponse handles the GetMSDeployStatusSlot response. -func (client *WebAppsClient) getMSDeployStatusSlotHandleResponse(resp *http.Response) (WebAppsClientGetMSDeployStatusSlotResponse, error) { - result := WebAppsClientGetMSDeployStatusSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSDeployStatus); err != nil { - return WebAppsClientGetMSDeployStatusSlotResponse{}, err - } - return result, nil -} - -// GetMigrateMySQLStatus - Returns the status of MySql in app migration, if one is active, and whether or not MySql in app -// is enabled -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientGetMigrateMySQLStatusOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatus -// method. -func (client *WebAppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMigrateMySQLStatusOptions) (WebAppsClientGetMigrateMySQLStatusResponse, error) { - req, err := client.getMigrateMySQLStatusCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetMigrateMySQLStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetMigrateMySQLStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMigrateMySQLStatusResponse{}, runtime.NewResponseError(resp) - } - return client.getMigrateMySQLStatusHandleResponse(resp) -} - -// getMigrateMySQLStatusCreateRequest creates the GetMigrateMySQLStatus request. -func (client *WebAppsClient) getMigrateMySQLStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMigrateMySQLStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getMigrateMySQLStatusHandleResponse handles the GetMigrateMySQLStatus response. -func (client *WebAppsClient) getMigrateMySQLStatusHandleResponse(resp *http.Response) (WebAppsClientGetMigrateMySQLStatusResponse, error) { - result := WebAppsClientGetMigrateMySQLStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MigrateMySQLStatus); err != nil { - return WebAppsClientGetMigrateMySQLStatusResponse{}, err - } - return result, nil -} - -// GetMigrateMySQLStatusSlot - Returns the status of MySql in app migration, if one is active, and whether or not MySql in -// app is enabled -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of the deployment slot. -// options - WebAppsClientGetMigrateMySQLStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatusSlot -// method. -func (client *WebAppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMigrateMySQLStatusSlotOptions) (WebAppsClientGetMigrateMySQLStatusSlotResponse, error) { - req, err := client.getMigrateMySQLStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getMigrateMySQLStatusSlotHandleResponse(resp) -} - -// getMigrateMySQLStatusSlotCreateRequest creates the GetMigrateMySQLStatusSlot request. -func (client *WebAppsClient) getMigrateMySQLStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMigrateMySQLStatusSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getMigrateMySQLStatusSlotHandleResponse handles the GetMigrateMySQLStatusSlot response. -func (client *WebAppsClient) getMigrateMySQLStatusSlotHandleResponse(resp *http.Response) (WebAppsClientGetMigrateMySQLStatusSlotResponse, error) { - result := WebAppsClientGetMigrateMySQLStatusSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MigrateMySQLStatus); err != nil { - return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, err - } - return result, nil -} - -// GetNetworkTraceOperation - Gets a named operation for a network trace capturing (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// operationID - GUID of the operation. -// options - WebAppsClientGetNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperation -// method. -func (client *WebAppsClient) GetNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTraceOperationOptions) (WebAppsClientGetNetworkTraceOperationResponse, error) { - req, err := client.getNetworkTraceOperationCreateRequest(ctx, resourceGroupName, name, operationID, options) - if err != nil { - return WebAppsClientGetNetworkTraceOperationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetNetworkTraceOperationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientGetNetworkTraceOperationResponse{}, runtime.NewResponseError(resp) - } - return client.getNetworkTraceOperationHandleResponse(resp) -} - -// getNetworkTraceOperationCreateRequest creates the GetNetworkTraceOperation request. -func (client *WebAppsClient) getNetworkTraceOperationCreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTraceOperationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getNetworkTraceOperationHandleResponse handles the GetNetworkTraceOperation response. -func (client *WebAppsClient) getNetworkTraceOperationHandleResponse(resp *http.Response) (WebAppsClientGetNetworkTraceOperationResponse, error) { - result := WebAppsClientGetNetworkTraceOperationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { - return WebAppsClientGetNetworkTraceOperationResponse{}, err - } - return result, nil -} - -// GetNetworkTraceOperationSlot - Gets a named operation for a network trace capturing (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// operationID - GUID of the operation. -// slot - Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. -// options - WebAppsClientGetNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlot -// method. -func (client *WebAppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTraceOperationSlotOptions) (WebAppsClientGetNetworkTraceOperationSlotResponse, error) { - req, err := client.getNetworkTraceOperationSlotCreateRequest(ctx, resourceGroupName, name, operationID, slot, options) - if err != nil { - return WebAppsClientGetNetworkTraceOperationSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetNetworkTraceOperationSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientGetNetworkTraceOperationSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getNetworkTraceOperationSlotHandleResponse(resp) -} - -// getNetworkTraceOperationSlotCreateRequest creates the GetNetworkTraceOperationSlot request. -func (client *WebAppsClient) getNetworkTraceOperationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTraceOperationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getNetworkTraceOperationSlotHandleResponse handles the GetNetworkTraceOperationSlot response. -func (client *WebAppsClient) getNetworkTraceOperationSlotHandleResponse(resp *http.Response) (WebAppsClientGetNetworkTraceOperationSlotResponse, error) { - result := WebAppsClientGetNetworkTraceOperationSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { - return WebAppsClientGetNetworkTraceOperationSlotResponse{}, err - } - return result, nil -} - -// GetNetworkTraceOperationSlotV2 - Gets a named operation for a network trace capturing (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// operationID - GUID of the operation. -// slot - Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. -// options - WebAppsClientGetNetworkTraceOperationSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlotV2 -// method. -func (client *WebAppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTraceOperationSlotV2Options) (WebAppsClientGetNetworkTraceOperationSlotV2Response, error) { - req, err := client.getNetworkTraceOperationSlotV2CreateRequest(ctx, resourceGroupName, name, operationID, slot, options) - if err != nil { - return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, runtime.NewResponseError(resp) - } - return client.getNetworkTraceOperationSlotV2HandleResponse(resp) -} - -// getNetworkTraceOperationSlotV2CreateRequest creates the GetNetworkTraceOperationSlotV2 request. -func (client *WebAppsClient) getNetworkTraceOperationSlotV2CreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTraceOperationSlotV2Options) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getNetworkTraceOperationSlotV2HandleResponse handles the GetNetworkTraceOperationSlotV2 response. -func (client *WebAppsClient) getNetworkTraceOperationSlotV2HandleResponse(resp *http.Response) (WebAppsClientGetNetworkTraceOperationSlotV2Response, error) { - result := WebAppsClientGetNetworkTraceOperationSlotV2Response{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { - return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, err - } - return result, nil -} - -// GetNetworkTraceOperationV2 - Gets a named operation for a network trace capturing (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// operationID - GUID of the operation. -// options - WebAppsClientGetNetworkTraceOperationV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationV2 -// method. -func (client *WebAppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTraceOperationV2Options) (WebAppsClientGetNetworkTraceOperationV2Response, error) { - req, err := client.getNetworkTraceOperationV2CreateRequest(ctx, resourceGroupName, name, operationID, options) - if err != nil { - return WebAppsClientGetNetworkTraceOperationV2Response{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetNetworkTraceOperationV2Response{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientGetNetworkTraceOperationV2Response{}, runtime.NewResponseError(resp) - } - return client.getNetworkTraceOperationV2HandleResponse(resp) -} - -// getNetworkTraceOperationV2CreateRequest creates the GetNetworkTraceOperationV2 request. -func (client *WebAppsClient) getNetworkTraceOperationV2CreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTraceOperationV2Options) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getNetworkTraceOperationV2HandleResponse handles the GetNetworkTraceOperationV2 response. -func (client *WebAppsClient) getNetworkTraceOperationV2HandleResponse(resp *http.Response) (WebAppsClientGetNetworkTraceOperationV2Response, error) { - result := WebAppsClientGetNetworkTraceOperationV2Response{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { - return WebAppsClientGetNetworkTraceOperationV2Response{}, err - } - return result, nil -} - -// GetNetworkTraces - Gets a named operation for a network trace capturing (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// operationID - GUID of the operation. -// options - WebAppsClientGetNetworkTracesOptions contains the optional parameters for the WebAppsClient.GetNetworkTraces -// method. -func (client *WebAppsClient) GetNetworkTraces(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTracesOptions) (WebAppsClientGetNetworkTracesResponse, error) { - req, err := client.getNetworkTracesCreateRequest(ctx, resourceGroupName, name, operationID, options) - if err != nil { - return WebAppsClientGetNetworkTracesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetNetworkTracesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetNetworkTracesResponse{}, runtime.NewResponseError(resp) - } - return client.getNetworkTracesHandleResponse(resp) -} - -// getNetworkTracesCreateRequest creates the GetNetworkTraces request. -func (client *WebAppsClient) getNetworkTracesCreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTracesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getNetworkTracesHandleResponse handles the GetNetworkTraces response. -func (client *WebAppsClient) getNetworkTracesHandleResponse(resp *http.Response) (WebAppsClientGetNetworkTracesResponse, error) { - result := WebAppsClientGetNetworkTracesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { - return WebAppsClientGetNetworkTracesResponse{}, err - } - return result, nil -} - -// GetNetworkTracesSlot - Gets a named operation for a network trace capturing (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// operationID - GUID of the operation. -// slot - Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. -// options - WebAppsClientGetNetworkTracesSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTracesSlot -// method. -func (client *WebAppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTracesSlotOptions) (WebAppsClientGetNetworkTracesSlotResponse, error) { - req, err := client.getNetworkTracesSlotCreateRequest(ctx, resourceGroupName, name, operationID, slot, options) - if err != nil { - return WebAppsClientGetNetworkTracesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetNetworkTracesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetNetworkTracesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getNetworkTracesSlotHandleResponse(resp) -} - -// getNetworkTracesSlotCreateRequest creates the GetNetworkTracesSlot request. -func (client *WebAppsClient) getNetworkTracesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTracesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getNetworkTracesSlotHandleResponse handles the GetNetworkTracesSlot response. -func (client *WebAppsClient) getNetworkTracesSlotHandleResponse(resp *http.Response) (WebAppsClientGetNetworkTracesSlotResponse, error) { - result := WebAppsClientGetNetworkTracesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { - return WebAppsClientGetNetworkTracesSlotResponse{}, err - } - return result, nil -} - -// GetNetworkTracesSlotV2 - Gets a named operation for a network trace capturing (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// operationID - GUID of the operation. -// slot - Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. -// options - WebAppsClientGetNetworkTracesSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesSlotV2 -// method. -func (client *WebAppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTracesSlotV2Options) (WebAppsClientGetNetworkTracesSlotV2Response, error) { - req, err := client.getNetworkTracesSlotV2CreateRequest(ctx, resourceGroupName, name, operationID, slot, options) - if err != nil { - return WebAppsClientGetNetworkTracesSlotV2Response{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetNetworkTracesSlotV2Response{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetNetworkTracesSlotV2Response{}, runtime.NewResponseError(resp) - } - return client.getNetworkTracesSlotV2HandleResponse(resp) -} - -// getNetworkTracesSlotV2CreateRequest creates the GetNetworkTracesSlotV2 request. -func (client *WebAppsClient) getNetworkTracesSlotV2CreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTracesSlotV2Options) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getNetworkTracesSlotV2HandleResponse handles the GetNetworkTracesSlotV2 response. -func (client *WebAppsClient) getNetworkTracesSlotV2HandleResponse(resp *http.Response) (WebAppsClientGetNetworkTracesSlotV2Response, error) { - result := WebAppsClientGetNetworkTracesSlotV2Response{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { - return WebAppsClientGetNetworkTracesSlotV2Response{}, err - } - return result, nil -} - -// GetNetworkTracesV2 - Gets a named operation for a network trace capturing (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// operationID - GUID of the operation. -// options - WebAppsClientGetNetworkTracesV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesV2 -// method. -func (client *WebAppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTracesV2Options) (WebAppsClientGetNetworkTracesV2Response, error) { - req, err := client.getNetworkTracesV2CreateRequest(ctx, resourceGroupName, name, operationID, options) - if err != nil { - return WebAppsClientGetNetworkTracesV2Response{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetNetworkTracesV2Response{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetNetworkTracesV2Response{}, runtime.NewResponseError(resp) - } - return client.getNetworkTracesV2HandleResponse(resp) -} - -// getNetworkTracesV2CreateRequest creates the GetNetworkTracesV2 request. -func (client *WebAppsClient) getNetworkTracesV2CreateRequest(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTracesV2Options) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getNetworkTracesV2HandleResponse handles the GetNetworkTracesV2 response. -func (client *WebAppsClient) getNetworkTracesV2HandleResponse(resp *http.Response) (WebAppsClientGetNetworkTracesV2Response, error) { - result := WebAppsClientGetNetworkTracesV2Response{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkTraceArray); err != nil { - return WebAppsClientGetNetworkTracesV2Response{}, err - } - return result, nil -} - -// GetOneDeployStatus - Invoke onedeploy status API /api/deployments and gets the deployment status for the site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientGetOneDeployStatusOptions contains the optional parameters for the WebAppsClient.GetOneDeployStatus -// method. -func (client *WebAppsClient) GetOneDeployStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetOneDeployStatusOptions) (WebAppsClientGetOneDeployStatusResponse, error) { - req, err := client.getOneDeployStatusCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetOneDeployStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetOneDeployStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetOneDeployStatusResponse{}, runtime.NewResponseError(resp) - } - return client.getOneDeployStatusHandleResponse(resp) -} - -// getOneDeployStatusCreateRequest creates the GetOneDeployStatus request. -func (client *WebAppsClient) getOneDeployStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetOneDeployStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getOneDeployStatusHandleResponse handles the GetOneDeployStatus response. -func (client *WebAppsClient) getOneDeployStatusHandleResponse(resp *http.Response) (WebAppsClientGetOneDeployStatusResponse, error) { - result := WebAppsClientGetOneDeployStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { - return WebAppsClientGetOneDeployStatusResponse{}, err - } - return result, nil -} - -// GetPremierAddOn - Gets a named add-on of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// premierAddOnName - Add-on name. -// options - WebAppsClientGetPremierAddOnOptions contains the optional parameters for the WebAppsClient.GetPremierAddOn method. -func (client *WebAppsClient) GetPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *WebAppsClientGetPremierAddOnOptions) (WebAppsClientGetPremierAddOnResponse, error) { - req, err := client.getPremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, options) - if err != nil { - return WebAppsClientGetPremierAddOnResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPremierAddOnResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPremierAddOnResponse{}, runtime.NewResponseError(resp) - } - return client.getPremierAddOnHandleResponse(resp) -} - -// getPremierAddOnCreateRequest creates the GetPremierAddOn request. -func (client *WebAppsClient) getPremierAddOnCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *WebAppsClientGetPremierAddOnOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if premierAddOnName == "" { - return nil, errors.New("parameter premierAddOnName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPremierAddOnHandleResponse handles the GetPremierAddOn response. -func (client *WebAppsClient) getPremierAddOnHandleResponse(resp *http.Response) (WebAppsClientGetPremierAddOnResponse, error) { - result := WebAppsClientGetPremierAddOnResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { - return WebAppsClientGetPremierAddOnResponse{}, err - } - return result, nil -} - -// GetPremierAddOnSlot - Gets a named add-on of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// premierAddOnName - Add-on name. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the production slot. -// options - WebAppsClientGetPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.GetPremierAddOnSlot -// method. -func (client *WebAppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *WebAppsClientGetPremierAddOnSlotOptions) (WebAppsClientGetPremierAddOnSlotResponse, error) { - req, err := client.getPremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, options) - if err != nil { - return WebAppsClientGetPremierAddOnSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPremierAddOnSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPremierAddOnSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getPremierAddOnSlotHandleResponse(resp) -} - -// getPremierAddOnSlotCreateRequest creates the GetPremierAddOnSlot request. -func (client *WebAppsClient) getPremierAddOnSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *WebAppsClientGetPremierAddOnSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if premierAddOnName == "" { - return nil, errors.New("parameter premierAddOnName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPremierAddOnSlotHandleResponse handles the GetPremierAddOnSlot response. -func (client *WebAppsClient) getPremierAddOnSlotHandleResponse(resp *http.Response) (WebAppsClientGetPremierAddOnSlotResponse, error) { - result := WebAppsClientGetPremierAddOnSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { - return WebAppsClientGetPremierAddOnSlotResponse{}, err - } - return result, nil -} - -// GetPrivateAccess - Gets data around private site access enablement and authorized Virtual Networks that can access the -// site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// options - WebAppsClientGetPrivateAccessOptions contains the optional parameters for the WebAppsClient.GetPrivateAccess -// method. -func (client *WebAppsClient) GetPrivateAccess(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateAccessOptions) (WebAppsClientGetPrivateAccessResponse, error) { - req, err := client.getPrivateAccessCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetPrivateAccessResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPrivateAccessResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateAccessResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateAccessHandleResponse(resp) -} - -// getPrivateAccessCreateRequest creates the GetPrivateAccess request. -func (client *WebAppsClient) getPrivateAccessCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateAccessOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateAccessHandleResponse handles the GetPrivateAccess response. -func (client *WebAppsClient) getPrivateAccessHandleResponse(resp *http.Response) (WebAppsClientGetPrivateAccessResponse, error) { - result := WebAppsClientGetPrivateAccessResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateAccess); err != nil { - return WebAppsClientGetPrivateAccessResponse{}, err - } - return result, nil -} - -// GetPrivateAccessSlot - Gets data around private site access enablement and authorized Virtual Networks that can access -// the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// slot - The name of the slot for the web app. -// options - WebAppsClientGetPrivateAccessSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateAccessSlot -// method. -func (client *WebAppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateAccessSlotOptions) (WebAppsClientGetPrivateAccessSlotResponse, error) { - req, err := client.getPrivateAccessSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetPrivateAccessSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPrivateAccessSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateAccessSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateAccessSlotHandleResponse(resp) -} - -// getPrivateAccessSlotCreateRequest creates the GetPrivateAccessSlot request. -func (client *WebAppsClient) getPrivateAccessSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateAccessSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateAccessSlotHandleResponse handles the GetPrivateAccessSlot response. -func (client *WebAppsClient) getPrivateAccessSlotHandleResponse(resp *http.Response) (WebAppsClientGetPrivateAccessSlotResponse, error) { - result := WebAppsClientGetPrivateAccessSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateAccess); err != nil { - return WebAppsClientGetPrivateAccessSlotResponse{}, err - } - return result, nil -} - -// GetPrivateEndpointConnection - Gets a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// privateEndpointConnectionName - Name of the private endpoint connection. -// options - WebAppsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnection -// method. -func (client *WebAppsClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientGetPrivateEndpointConnectionOptions) (WebAppsClientGetPrivateEndpointConnectionResponse, error) { - req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) - if err != nil { - return WebAppsClientGetPrivateEndpointConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPrivateEndpointConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateEndpointConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateEndpointConnectionHandleResponse(resp) -} - -// getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. -func (client *WebAppsClient) getPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientGetPrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateEndpointConnectionHandleResponse handles the GetPrivateEndpointConnection response. -func (client *WebAppsClient) getPrivateEndpointConnectionHandleResponse(resp *http.Response) (WebAppsClientGetPrivateEndpointConnectionResponse, error) { - result := WebAppsClientGetPrivateEndpointConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RemotePrivateEndpointConnectionARMResource); err != nil { - return WebAppsClientGetPrivateEndpointConnectionResponse{}, err - } - return result, nil -} - -// NewGetPrivateEndpointConnectionListPager - Gets the list of private endpoint connections associated with a site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// options - WebAppsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionList -// method. -func (client *WebAppsClient) NewGetPrivateEndpointConnectionListPager(resourceGroupName string, name string, options *WebAppsClientGetPrivateEndpointConnectionListOptions) *runtime.Pager[WebAppsClientGetPrivateEndpointConnectionListResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetPrivateEndpointConnectionListResponse]{ - More: func(page WebAppsClientGetPrivateEndpointConnectionListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientGetPrivateEndpointConnectionListResponse) (WebAppsClientGetPrivateEndpointConnectionListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientGetPrivateEndpointConnectionListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPrivateEndpointConnectionListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateEndpointConnectionListResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateEndpointConnectionListHandleResponse(resp) - }, - }) -} - -// getPrivateEndpointConnectionListCreateRequest creates the GetPrivateEndpointConnectionList request. -func (client *WebAppsClient) getPrivateEndpointConnectionListCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateEndpointConnectionListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateEndpointConnectionListHandleResponse handles the GetPrivateEndpointConnectionList response. -func (client *WebAppsClient) getPrivateEndpointConnectionListHandleResponse(resp *http.Response) (WebAppsClientGetPrivateEndpointConnectionListResponse, error) { - result := WebAppsClientGetPrivateEndpointConnectionListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionCollection); err != nil { - return WebAppsClientGetPrivateEndpointConnectionListResponse{}, err - } - return result, nil -} - -// NewGetPrivateEndpointConnectionListSlotPager - Gets the list of private endpoint connections associated with a site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// slot - Name of the site deployment slot. -// options - WebAppsClientGetPrivateEndpointConnectionListSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionListSlot -// method. -func (client *WebAppsClient) NewGetPrivateEndpointConnectionListSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateEndpointConnectionListSlotOptions) *runtime.Pager[WebAppsClientGetPrivateEndpointConnectionListSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetPrivateEndpointConnectionListSlotResponse]{ - More: func(page WebAppsClientGetPrivateEndpointConnectionListSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientGetPrivateEndpointConnectionListSlotResponse) (WebAppsClientGetPrivateEndpointConnectionListSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getPrivateEndpointConnectionListSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientGetPrivateEndpointConnectionListSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPrivateEndpointConnectionListSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateEndpointConnectionListSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateEndpointConnectionListSlotHandleResponse(resp) - }, - }) -} - -// getPrivateEndpointConnectionListSlotCreateRequest creates the GetPrivateEndpointConnectionListSlot request. -func (client *WebAppsClient) getPrivateEndpointConnectionListSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateEndpointConnectionListSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateEndpointConnectionListSlotHandleResponse handles the GetPrivateEndpointConnectionListSlot response. -func (client *WebAppsClient) getPrivateEndpointConnectionListSlotHandleResponse(resp *http.Response) (WebAppsClientGetPrivateEndpointConnectionListSlotResponse, error) { - result := WebAppsClientGetPrivateEndpointConnectionListSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionCollection); err != nil { - return WebAppsClientGetPrivateEndpointConnectionListSlotResponse{}, err - } - return result, nil -} - -// GetPrivateEndpointConnectionSlot - Gets a private endpoint connection -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// privateEndpointConnectionName - Name of the private endpoint connection. -// slot - Name of the site deployment slot. -// options - WebAppsClientGetPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionSlot -// method. -func (client *WebAppsClient) GetPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientGetPrivateEndpointConnectionSlotOptions) (WebAppsClientGetPrivateEndpointConnectionSlotResponse, error) { - req, err := client.getPrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, options) - if err != nil { - return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateEndpointConnectionSlotHandleResponse(resp) -} - -// getPrivateEndpointConnectionSlotCreateRequest creates the GetPrivateEndpointConnectionSlot request. -func (client *WebAppsClient) getPrivateEndpointConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientGetPrivateEndpointConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateEndpointConnectionSlotHandleResponse handles the GetPrivateEndpointConnectionSlot response. -func (client *WebAppsClient) getPrivateEndpointConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientGetPrivateEndpointConnectionSlotResponse, error) { - result := WebAppsClientGetPrivateEndpointConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RemotePrivateEndpointConnectionARMResource); err != nil { - return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, err - } - return result, nil -} - -// GetPrivateLinkResources - Gets the private link resources -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// options - WebAppsClientGetPrivateLinkResourcesOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResources -// method. -func (client *WebAppsClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateLinkResourcesOptions) (WebAppsClientGetPrivateLinkResourcesResponse, error) { - req, err := client.getPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetPrivateLinkResourcesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPrivateLinkResourcesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateLinkResourcesResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateLinkResourcesHandleResponse(resp) -} - -// getPrivateLinkResourcesCreateRequest creates the GetPrivateLinkResources request. -func (client *WebAppsClient) getPrivateLinkResourcesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateLinkResourcesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateLinkResourcesHandleResponse handles the GetPrivateLinkResources response. -func (client *WebAppsClient) getPrivateLinkResourcesHandleResponse(resp *http.Response) (WebAppsClientGetPrivateLinkResourcesResponse, error) { - result := WebAppsClientGetPrivateLinkResourcesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourcesWrapper); err != nil { - return WebAppsClientGetPrivateLinkResourcesResponse{}, err - } - return result, nil -} - -// GetPrivateLinkResourcesSlot - Gets the private link resources -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the site. -// options - WebAppsClientGetPrivateLinkResourcesSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResourcesSlot -// method. -func (client *WebAppsClient) GetPrivateLinkResourcesSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateLinkResourcesSlotOptions) (WebAppsClientGetPrivateLinkResourcesSlotResponse, error) { - req, err := client.getPrivateLinkResourcesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateLinkResourcesSlotHandleResponse(resp) -} - -// getPrivateLinkResourcesSlotCreateRequest creates the GetPrivateLinkResourcesSlot request. -func (client *WebAppsClient) getPrivateLinkResourcesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateLinkResourcesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateLinkResourcesSlotHandleResponse handles the GetPrivateLinkResourcesSlot response. -func (client *WebAppsClient) getPrivateLinkResourcesSlotHandleResponse(resp *http.Response) (WebAppsClientGetPrivateLinkResourcesSlotResponse, error) { - result := WebAppsClientGetPrivateLinkResourcesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourcesWrapper); err != nil { - return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, err - } - return result, nil -} - -// GetProcess - Get process information by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// options - WebAppsClientGetProcessOptions contains the optional parameters for the WebAppsClient.GetProcess method. -func (client *WebAppsClient) GetProcess(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientGetProcessOptions) (WebAppsClientGetProcessResponse, error) { - req, err := client.getProcessCreateRequest(ctx, resourceGroupName, name, processID, options) - if err != nil { - return WebAppsClientGetProcessResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetProcessResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessResponse{}, runtime.NewResponseError(resp) - } - return client.getProcessHandleResponse(resp) -} - -// getProcessCreateRequest creates the GetProcess request. -func (client *WebAppsClient) getProcessCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientGetProcessOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getProcessHandleResponse handles the GetProcess response. -func (client *WebAppsClient) getProcessHandleResponse(resp *http.Response) (WebAppsClientGetProcessResponse, error) { - result := WebAppsClientGetProcessResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfo); err != nil { - return WebAppsClientGetProcessResponse{}, err - } - return result, nil -} - -// GetProcessDump - Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// options - WebAppsClientGetProcessDumpOptions contains the optional parameters for the WebAppsClient.GetProcessDump method. -func (client *WebAppsClient) GetProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientGetProcessDumpOptions) (WebAppsClientGetProcessDumpResponse, error) { - req, err := client.getProcessDumpCreateRequest(ctx, resourceGroupName, name, processID, options) - if err != nil { - return WebAppsClientGetProcessDumpResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetProcessDumpResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessDumpResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientGetProcessDumpResponse{Body: resp.Body}, nil -} - -// getProcessDumpCreateRequest creates the GetProcessDump request. -func (client *WebAppsClient) getProcessDumpCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientGetProcessDumpOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - runtime.SkipBodyDownload(req) - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GetProcessDumpSlot - Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// options - WebAppsClientGetProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetProcessDumpSlot -// method. -func (client *WebAppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientGetProcessDumpSlotOptions) (WebAppsClientGetProcessDumpSlotResponse, error) { - req, err := client.getProcessDumpSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) - if err != nil { - return WebAppsClientGetProcessDumpSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetProcessDumpSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessDumpSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientGetProcessDumpSlotResponse{Body: resp.Body}, nil -} - -// getProcessDumpSlotCreateRequest creates the GetProcessDumpSlot request. -func (client *WebAppsClient) getProcessDumpSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientGetProcessDumpSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - runtime.SkipBodyDownload(req) - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GetProcessModule - Get process information by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// baseAddress - Module base address. -// options - WebAppsClientGetProcessModuleOptions contains the optional parameters for the WebAppsClient.GetProcessModule -// method. -func (client *WebAppsClient) GetProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, options *WebAppsClientGetProcessModuleOptions) (WebAppsClientGetProcessModuleResponse, error) { - req, err := client.getProcessModuleCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, options) - if err != nil { - return WebAppsClientGetProcessModuleResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetProcessModuleResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessModuleResponse{}, runtime.NewResponseError(resp) - } - return client.getProcessModuleHandleResponse(resp) -} - -// getProcessModuleCreateRequest creates the GetProcessModule request. -func (client *WebAppsClient) getProcessModuleCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, options *WebAppsClientGetProcessModuleOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if baseAddress == "" { - return nil, errors.New("parameter baseAddress cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{baseAddress}", url.PathEscape(baseAddress)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getProcessModuleHandleResponse handles the GetProcessModule response. -func (client *WebAppsClient) getProcessModuleHandleResponse(resp *http.Response) (WebAppsClientGetProcessModuleResponse, error) { - result := WebAppsClientGetProcessModuleResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfo); err != nil { - return WebAppsClientGetProcessModuleResponse{}, err - } - return result, nil -} - -// GetProcessModuleSlot - Get process information by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// baseAddress - Module base address. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// options - WebAppsClientGetProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetProcessModuleSlot -// method. -func (client *WebAppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, options *WebAppsClientGetProcessModuleSlotOptions) (WebAppsClientGetProcessModuleSlotResponse, error) { - req, err := client.getProcessModuleSlotCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, slot, options) - if err != nil { - return WebAppsClientGetProcessModuleSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetProcessModuleSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessModuleSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getProcessModuleSlotHandleResponse(resp) -} - -// getProcessModuleSlotCreateRequest creates the GetProcessModuleSlot request. -func (client *WebAppsClient) getProcessModuleSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, options *WebAppsClientGetProcessModuleSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if baseAddress == "" { - return nil, errors.New("parameter baseAddress cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{baseAddress}", url.PathEscape(baseAddress)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getProcessModuleSlotHandleResponse handles the GetProcessModuleSlot response. -func (client *WebAppsClient) getProcessModuleSlotHandleResponse(resp *http.Response) (WebAppsClientGetProcessModuleSlotResponse, error) { - result := WebAppsClientGetProcessModuleSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfo); err != nil { - return WebAppsClientGetProcessModuleSlotResponse{}, err - } - return result, nil -} - -// GetProcessSlot - Get process information by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// options - WebAppsClientGetProcessSlotOptions contains the optional parameters for the WebAppsClient.GetProcessSlot method. -func (client *WebAppsClient) GetProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientGetProcessSlotOptions) (WebAppsClientGetProcessSlotResponse, error) { - req, err := client.getProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) - if err != nil { - return WebAppsClientGetProcessSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetProcessSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getProcessSlotHandleResponse(resp) -} - -// getProcessSlotCreateRequest creates the GetProcessSlot request. -func (client *WebAppsClient) getProcessSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientGetProcessSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getProcessSlotHandleResponse handles the GetProcessSlot response. -func (client *WebAppsClient) getProcessSlotHandleResponse(resp *http.Response) (WebAppsClientGetProcessSlotResponse, error) { - result := WebAppsClientGetProcessSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfo); err != nil { - return WebAppsClientGetProcessSlotResponse{}, err - } - return result, nil -} - -// GetPublicCertificate - Get the named public certificate for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// publicCertificateName - Public certificate name. -// options - WebAppsClientGetPublicCertificateOptions contains the optional parameters for the WebAppsClient.GetPublicCertificate -// method. -func (client *WebAppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *WebAppsClientGetPublicCertificateOptions) (WebAppsClientGetPublicCertificateResponse, error) { - req, err := client.getPublicCertificateCreateRequest(ctx, resourceGroupName, name, publicCertificateName, options) - if err != nil { - return WebAppsClientGetPublicCertificateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPublicCertificateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPublicCertificateResponse{}, runtime.NewResponseError(resp) - } - return client.getPublicCertificateHandleResponse(resp) -} - -// getPublicCertificateCreateRequest creates the GetPublicCertificate request. -func (client *WebAppsClient) getPublicCertificateCreateRequest(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *WebAppsClientGetPublicCertificateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if publicCertificateName == "" { - return nil, errors.New("parameter publicCertificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPublicCertificateHandleResponse handles the GetPublicCertificate response. -func (client *WebAppsClient) getPublicCertificateHandleResponse(resp *http.Response) (WebAppsClientGetPublicCertificateResponse, error) { - result := WebAppsClientGetPublicCertificateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificate); err != nil { - return WebAppsClientGetPublicCertificateResponse{}, err - } - return result, nil -} - -// GetPublicCertificateSlot - Get the named public certificate for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. -// publicCertificateName - Public certificate name. -// options - WebAppsClientGetPublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.GetPublicCertificateSlot -// method. -func (client *WebAppsClient) GetPublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *WebAppsClientGetPublicCertificateSlotOptions) (WebAppsClientGetPublicCertificateSlotResponse, error) { - req, err := client.getPublicCertificateSlotCreateRequest(ctx, resourceGroupName, name, slot, publicCertificateName, options) - if err != nil { - return WebAppsClientGetPublicCertificateSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetPublicCertificateSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPublicCertificateSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getPublicCertificateSlotHandleResponse(resp) -} - -// getPublicCertificateSlotCreateRequest creates the GetPublicCertificateSlot request. -func (client *WebAppsClient) getPublicCertificateSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *WebAppsClientGetPublicCertificateSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if publicCertificateName == "" { - return nil, errors.New("parameter publicCertificateName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicCertificateName}", url.PathEscape(publicCertificateName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPublicCertificateSlotHandleResponse handles the GetPublicCertificateSlot response. -func (client *WebAppsClient) getPublicCertificateSlotHandleResponse(resp *http.Response) (WebAppsClientGetPublicCertificateSlotResponse, error) { - result := WebAppsClientGetPublicCertificateSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificate); err != nil { - return WebAppsClientGetPublicCertificateSlotResponse{}, err - } - return result, nil -} - -// GetRelayServiceConnection - Gets a hybrid connection configuration by its name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// entityName - Name of the hybrid connection. -// options - WebAppsClientGetRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnection -// method. -func (client *WebAppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, options *WebAppsClientGetRelayServiceConnectionOptions) (WebAppsClientGetRelayServiceConnectionResponse, error) { - req, err := client.getRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, options) - if err != nil { - return WebAppsClientGetRelayServiceConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetRelayServiceConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetRelayServiceConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.getRelayServiceConnectionHandleResponse(resp) -} - -// getRelayServiceConnectionCreateRequest creates the GetRelayServiceConnection request. -func (client *WebAppsClient) getRelayServiceConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, options *WebAppsClientGetRelayServiceConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if entityName == "" { - return nil, errors.New("parameter entityName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getRelayServiceConnectionHandleResponse handles the GetRelayServiceConnection response. -func (client *WebAppsClient) getRelayServiceConnectionHandleResponse(resp *http.Response) (WebAppsClientGetRelayServiceConnectionResponse, error) { - result := WebAppsClientGetRelayServiceConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { - return WebAppsClientGetRelayServiceConnectionResponse{}, err - } - return result, nil -} - -// GetRelayServiceConnectionSlot - Gets a hybrid connection configuration by its name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// entityName - Name of the hybrid connection. -// slot - Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the production -// slot. -// options - WebAppsClientGetRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnectionSlot -// method. -func (client *WebAppsClient) GetRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *WebAppsClientGetRelayServiceConnectionSlotOptions) (WebAppsClientGetRelayServiceConnectionSlotResponse, error) { - req, err := client.getRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, options) - if err != nil { - return WebAppsClientGetRelayServiceConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetRelayServiceConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetRelayServiceConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getRelayServiceConnectionSlotHandleResponse(resp) -} - -// getRelayServiceConnectionSlotCreateRequest creates the GetRelayServiceConnectionSlot request. -func (client *WebAppsClient) getRelayServiceConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *WebAppsClientGetRelayServiceConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if entityName == "" { - return nil, errors.New("parameter entityName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getRelayServiceConnectionSlotHandleResponse handles the GetRelayServiceConnectionSlot response. -func (client *WebAppsClient) getRelayServiceConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientGetRelayServiceConnectionSlotResponse, error) { - result := WebAppsClientGetRelayServiceConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { - return WebAppsClientGetRelayServiceConnectionSlotResponse{}, err - } - return result, nil -} - -// GetScmAllowed - Returns whether Scm basic auth is allowed on the site or not. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetScmAllowedOptions contains the optional parameters for the WebAppsClient.GetScmAllowed method. -func (client *WebAppsClient) GetScmAllowed(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetScmAllowedOptions) (WebAppsClientGetScmAllowedResponse, error) { - req, err := client.getScmAllowedCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetScmAllowedResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetScmAllowedResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetScmAllowedResponse{}, runtime.NewResponseError(resp) - } - return client.getScmAllowedHandleResponse(resp) -} - -// getScmAllowedCreateRequest creates the GetScmAllowed request. -func (client *WebAppsClient) getScmAllowedCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetScmAllowedOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getScmAllowedHandleResponse handles the GetScmAllowed response. -func (client *WebAppsClient) getScmAllowedHandleResponse(resp *http.Response) (WebAppsClientGetScmAllowedResponse, error) { - result := WebAppsClientGetScmAllowedResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { - return WebAppsClientGetScmAllowedResponse{}, err - } - return result, nil -} - -// GetScmAllowedSlot - Returns whether Scm basic auth is allowed on the site or not. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetScmAllowedSlot -// method. -func (client *WebAppsClient) GetScmAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetScmAllowedSlotOptions) (WebAppsClientGetScmAllowedSlotResponse, error) { - req, err := client.getScmAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetScmAllowedSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetScmAllowedSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetScmAllowedSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getScmAllowedSlotHandleResponse(resp) -} - -// getScmAllowedSlotCreateRequest creates the GetScmAllowedSlot request. -func (client *WebAppsClient) getScmAllowedSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetScmAllowedSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getScmAllowedSlotHandleResponse handles the GetScmAllowedSlot response. -func (client *WebAppsClient) getScmAllowedSlotHandleResponse(resp *http.Response) (WebAppsClientGetScmAllowedSlotResponse, error) { - result := WebAppsClientGetScmAllowedSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { - return WebAppsClientGetScmAllowedSlotResponse{}, err - } - return result, nil -} - -// GetSiteConnectionStringKeyVaultReference - Gets the config reference and status of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReference -// method. -func (client *WebAppsClient) GetSiteConnectionStringKeyVaultReference(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions) (WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse, error) { - req, err := client.getSiteConnectionStringKeyVaultReferenceCreateRequest(ctx, resourceGroupName, name, connectionStringKey, options) - if err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteConnectionStringKeyVaultReferenceHandleResponse(resp) -} - -// getSiteConnectionStringKeyVaultReferenceCreateRequest creates the GetSiteConnectionStringKeyVaultReference request. -func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceCreateRequest(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if connectionStringKey == "" { - return nil, errors.New("parameter connectionStringKey cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionStringKey}", url.PathEscape(connectionStringKey)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteConnectionStringKeyVaultReferenceHandleResponse handles the GetSiteConnectionStringKeyVaultReference response. -func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceHandleResponse(resp *http.Response) (WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse, error) { - result := WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReference); err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, err - } - return result, nil -} - -// GetSiteConnectionStringKeyVaultReferenceSlot - Gets the config reference and status of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot -// method. -func (client *WebAppsClient) GetSiteConnectionStringKeyVaultReferenceSlot(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, slot string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions) (WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse, error) { - req, err := client.getSiteConnectionStringKeyVaultReferenceSlotCreateRequest(ctx, resourceGroupName, name, connectionStringKey, slot, options) - if err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteConnectionStringKeyVaultReferenceSlotHandleResponse(resp) -} - -// getSiteConnectionStringKeyVaultReferenceSlotCreateRequest creates the GetSiteConnectionStringKeyVaultReferenceSlot request. -func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, slot string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if connectionStringKey == "" { - return nil, errors.New("parameter connectionStringKey cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionStringKey}", url.PathEscape(connectionStringKey)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteConnectionStringKeyVaultReferenceSlotHandleResponse handles the GetSiteConnectionStringKeyVaultReferenceSlot response. -func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceSlotHandleResponse(resp *http.Response) (WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse, error) { - result := WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReference); err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, err - } - return result, nil -} - -// NewGetSiteConnectionStringKeyVaultReferencesPager - Gets the config reference app settings and status of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferences -// method. -func (client *WebAppsClient) NewGetSiteConnectionStringKeyVaultReferencesPager(resourceGroupName string, name string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions) *runtime.Pager[WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse]{ - More: func(page WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse) (WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getSiteConnectionStringKeyVaultReferencesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteConnectionStringKeyVaultReferencesHandleResponse(resp) - }, - }) -} - -// getSiteConnectionStringKeyVaultReferencesCreateRequest creates the GetSiteConnectionStringKeyVaultReferences request. -func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteConnectionStringKeyVaultReferencesHandleResponse handles the GetSiteConnectionStringKeyVaultReferences response. -func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesHandleResponse(resp *http.Response) (WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse, error) { - result := WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReferenceCollection); err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{}, err - } - return result, nil -} - -// NewGetSiteConnectionStringKeyVaultReferencesSlotPager - Gets the config reference app settings and status of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferencesSlot -// method. -func (client *WebAppsClient) NewGetSiteConnectionStringKeyVaultReferencesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions) *runtime.Pager[WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse]{ - More: func(page WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse) (WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getSiteConnectionStringKeyVaultReferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteConnectionStringKeyVaultReferencesSlotHandleResponse(resp) - }, - }) -} - -// getSiteConnectionStringKeyVaultReferencesSlotCreateRequest creates the GetSiteConnectionStringKeyVaultReferencesSlot request. -func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteConnectionStringKeyVaultReferencesSlotHandleResponse handles the GetSiteConnectionStringKeyVaultReferencesSlot response. -func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesSlotHandleResponse(resp *http.Response) (WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse, error) { - result := WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIKVReferenceCollection); err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{}, err - } - return result, nil -} - -// GetSiteExtension - Get site extension information by its ID for a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// siteExtensionID - Site extension name. -// options - WebAppsClientGetSiteExtensionOptions contains the optional parameters for the WebAppsClient.GetSiteExtension -// method. -func (client *WebAppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientGetSiteExtensionOptions) (WebAppsClientGetSiteExtensionResponse, error) { - req, err := client.getSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) - if err != nil { - return WebAppsClientGetSiteExtensionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSiteExtensionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteExtensionResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteExtensionHandleResponse(resp) -} - -// getSiteExtensionCreateRequest creates the GetSiteExtension request. -func (client *WebAppsClient) getSiteExtensionCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientGetSiteExtensionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if siteExtensionID == "" { - return nil, errors.New("parameter siteExtensionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteExtensionHandleResponse handles the GetSiteExtension response. -func (client *WebAppsClient) getSiteExtensionHandleResponse(resp *http.Response) (WebAppsClientGetSiteExtensionResponse, error) { - result := WebAppsClientGetSiteExtensionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteExtensionInfo); err != nil { - return WebAppsClientGetSiteExtensionResponse{}, err - } - return result, nil -} - -// GetSiteExtensionSlot - Get site extension information by its ID for a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// siteExtensionID - Site extension name. -// slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. -// options - WebAppsClientGetSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.GetSiteExtensionSlot -// method. -func (client *WebAppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientGetSiteExtensionSlotOptions) (WebAppsClientGetSiteExtensionSlotResponse, error) { - req, err := client.getSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) - if err != nil { - return WebAppsClientGetSiteExtensionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSiteExtensionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteExtensionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSiteExtensionSlotHandleResponse(resp) -} - -// getSiteExtensionSlotCreateRequest creates the GetSiteExtensionSlot request. -func (client *WebAppsClient) getSiteExtensionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientGetSiteExtensionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if siteExtensionID == "" { - return nil, errors.New("parameter siteExtensionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSiteExtensionSlotHandleResponse handles the GetSiteExtensionSlot response. -func (client *WebAppsClient) getSiteExtensionSlotHandleResponse(resp *http.Response) (WebAppsClientGetSiteExtensionSlotResponse, error) { - result := WebAppsClientGetSiteExtensionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteExtensionInfo); err != nil { - return WebAppsClientGetSiteExtensionSlotResponse{}, err - } - return result, nil -} - -// GetSitePhpErrorLogFlag - Gets web app's event logs. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientGetSitePhpErrorLogFlagOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlag -// method. -func (client *WebAppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSitePhpErrorLogFlagOptions) (WebAppsClientGetSitePhpErrorLogFlagResponse, error) { - req, err := client.getSitePhpErrorLogFlagCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetSitePhpErrorLogFlagResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSitePhpErrorLogFlagResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSitePhpErrorLogFlagResponse{}, runtime.NewResponseError(resp) - } - return client.getSitePhpErrorLogFlagHandleResponse(resp) -} - -// getSitePhpErrorLogFlagCreateRequest creates the GetSitePhpErrorLogFlag request. -func (client *WebAppsClient) getSitePhpErrorLogFlagCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSitePhpErrorLogFlagOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSitePhpErrorLogFlagHandleResponse handles the GetSitePhpErrorLogFlag response. -func (client *WebAppsClient) getSitePhpErrorLogFlagHandleResponse(resp *http.Response) (WebAppsClientGetSitePhpErrorLogFlagResponse, error) { - result := WebAppsClientGetSitePhpErrorLogFlagResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SitePhpErrorLogFlag); err != nil { - return WebAppsClientGetSitePhpErrorLogFlagResponse{}, err - } - return result, nil -} - -// GetSitePhpErrorLogFlagSlot - Gets web app's event logs. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - WebAppsClientGetSitePhpErrorLogFlagSlotOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlagSlot -// method. -func (client *WebAppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSitePhpErrorLogFlagSlotOptions) (WebAppsClientGetSitePhpErrorLogFlagSlotResponse, error) { - req, err := client.getSitePhpErrorLogFlagSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSitePhpErrorLogFlagSlotHandleResponse(resp) -} - -// getSitePhpErrorLogFlagSlotCreateRequest creates the GetSitePhpErrorLogFlagSlot request. -func (client *WebAppsClient) getSitePhpErrorLogFlagSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSitePhpErrorLogFlagSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSitePhpErrorLogFlagSlotHandleResponse handles the GetSitePhpErrorLogFlagSlot response. -func (client *WebAppsClient) getSitePhpErrorLogFlagSlotHandleResponse(resp *http.Response) (WebAppsClientGetSitePhpErrorLogFlagSlotResponse, error) { - result := WebAppsClientGetSitePhpErrorLogFlagSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SitePhpErrorLogFlag); err != nil { - return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, err - } - return result, nil -} - -// GetSlot - Gets the details of a web, mobile, or API app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. By default, this API returns the production slot. -// options - WebAppsClientGetSlotOptions contains the optional parameters for the WebAppsClient.GetSlot method. -func (client *WebAppsClient) GetSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSlotOptions) (WebAppsClientGetSlotResponse, error) { - req, err := client.getSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSlotHandleResponse(resp) -} - -// getSlotCreateRequest creates the GetSlot request. -func (client *WebAppsClient) getSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSlotHandleResponse handles the GetSlot response. -func (client *WebAppsClient) getSlotHandleResponse(resp *http.Response) (WebAppsClientGetSlotResponse, error) { - result := WebAppsClientGetSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Site); err != nil { - return WebAppsClientGetSlotResponse{}, err - } - return result, nil -} - -// GetSourceControl - Gets the source control configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetSourceControlOptions contains the optional parameters for the WebAppsClient.GetSourceControl -// method. -func (client *WebAppsClient) GetSourceControl(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSourceControlOptions) (WebAppsClientGetSourceControlResponse, error) { - req, err := client.getSourceControlCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetSourceControlResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSourceControlResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return WebAppsClientGetSourceControlResponse{}, runtime.NewResponseError(resp) - } - return client.getSourceControlHandleResponse(resp) -} - -// getSourceControlCreateRequest creates the GetSourceControl request. -func (client *WebAppsClient) getSourceControlCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSourceControlOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSourceControlHandleResponse handles the GetSourceControl response. -func (client *WebAppsClient) getSourceControlHandleResponse(resp *http.Response) (WebAppsClientGetSourceControlResponse, error) { - result := WebAppsClientGetSourceControlResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteSourceControl); err != nil { - return WebAppsClientGetSourceControlResponse{}, err - } - return result, nil -} - -// GetSourceControlSlot - Gets the source control configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the -// production slot. -// options - WebAppsClientGetSourceControlSlotOptions contains the optional parameters for the WebAppsClient.GetSourceControlSlot -// method. -func (client *WebAppsClient) GetSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSourceControlSlotOptions) (WebAppsClientGetSourceControlSlotResponse, error) { - req, err := client.getSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetSourceControlSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSourceControlSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return WebAppsClientGetSourceControlSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSourceControlSlotHandleResponse(resp) -} - -// getSourceControlSlotCreateRequest creates the GetSourceControlSlot request. -func (client *WebAppsClient) getSourceControlSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSourceControlSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSourceControlSlotHandleResponse handles the GetSourceControlSlot response. -func (client *WebAppsClient) getSourceControlSlotHandleResponse(resp *http.Response) (WebAppsClientGetSourceControlSlotResponse, error) { - result := WebAppsClientGetSourceControlSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteSourceControl); err != nil { - return WebAppsClientGetSourceControlSlotResponse{}, err - } - return result, nil -} - -// GetSwiftVirtualNetworkConnection - Gets a Swift Virtual Network connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientGetSwiftVirtualNetworkConnectionOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnection -// method. -func (client *WebAppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSwiftVirtualNetworkConnectionOptions) (WebAppsClientGetSwiftVirtualNetworkConnectionResponse, error) { - req, err := client.getSwiftVirtualNetworkConnectionCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.getSwiftVirtualNetworkConnectionHandleResponse(resp) -} - -// getSwiftVirtualNetworkConnectionCreateRequest creates the GetSwiftVirtualNetworkConnection request. -func (client *WebAppsClient) getSwiftVirtualNetworkConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSwiftVirtualNetworkConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSwiftVirtualNetworkConnectionHandleResponse handles the GetSwiftVirtualNetworkConnection response. -func (client *WebAppsClient) getSwiftVirtualNetworkConnectionHandleResponse(resp *http.Response) (WebAppsClientGetSwiftVirtualNetworkConnectionResponse, error) { - result := WebAppsClientGetSwiftVirtualNetworkConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { - return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, err - } - return result, nil -} - -// GetSwiftVirtualNetworkConnectionSlot - Gets a Swift Virtual Network connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual -// Network. -// options - WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnectionSlot -// method. -func (client *WebAppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions) (WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse, error) { - req, err := client.getSwiftVirtualNetworkConnectionSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getSwiftVirtualNetworkConnectionSlotHandleResponse(resp) -} - -// getSwiftVirtualNetworkConnectionSlotCreateRequest creates the GetSwiftVirtualNetworkConnectionSlot request. -func (client *WebAppsClient) getSwiftVirtualNetworkConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSwiftVirtualNetworkConnectionSlotHandleResponse handles the GetSwiftVirtualNetworkConnectionSlot response. -func (client *WebAppsClient) getSwiftVirtualNetworkConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse, error) { - result := WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { - return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, err - } - return result, nil -} - -// GetTriggeredWebJob - Gets a triggered web job by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// options - WebAppsClientGetTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJob -// method. -func (client *WebAppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetTriggeredWebJobOptions) (WebAppsClientGetTriggeredWebJobResponse, error) { - req, err := client.getTriggeredWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) - if err != nil { - return WebAppsClientGetTriggeredWebJobResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetTriggeredWebJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetTriggeredWebJobResponse{}, runtime.NewResponseError(resp) - } - return client.getTriggeredWebJobHandleResponse(resp) -} - -// getTriggeredWebJobCreateRequest creates the GetTriggeredWebJob request. -func (client *WebAppsClient) getTriggeredWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetTriggeredWebJobOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getTriggeredWebJobHandleResponse handles the GetTriggeredWebJob response. -func (client *WebAppsClient) getTriggeredWebJobHandleResponse(resp *http.Response) (WebAppsClientGetTriggeredWebJobResponse, error) { - result := WebAppsClientGetTriggeredWebJobResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredWebJob); err != nil { - return WebAppsClientGetTriggeredWebJobResponse{}, err - } - return result, nil -} - -// GetTriggeredWebJobHistory - Gets a triggered web job's history by its ID for an app, , or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// id - History ID. -// options - WebAppsClientGetTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistory -// method. -func (client *WebAppsClient) GetTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, options *WebAppsClientGetTriggeredWebJobHistoryOptions) (WebAppsClientGetTriggeredWebJobHistoryResponse, error) { - req, err := client.getTriggeredWebJobHistoryCreateRequest(ctx, resourceGroupName, name, webJobName, id, options) - if err != nil { - return WebAppsClientGetTriggeredWebJobHistoryResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetTriggeredWebJobHistoryResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetTriggeredWebJobHistoryResponse{}, runtime.NewResponseError(resp) - } - return client.getTriggeredWebJobHistoryHandleResponse(resp) -} - -// getTriggeredWebJobHistoryCreateRequest creates the GetTriggeredWebJobHistory request. -func (client *WebAppsClient) getTriggeredWebJobHistoryCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, options *WebAppsClientGetTriggeredWebJobHistoryOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if id == "" { - return nil, errors.New("parameter id cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getTriggeredWebJobHistoryHandleResponse handles the GetTriggeredWebJobHistory response. -func (client *WebAppsClient) getTriggeredWebJobHistoryHandleResponse(resp *http.Response) (WebAppsClientGetTriggeredWebJobHistoryResponse, error) { - result := WebAppsClientGetTriggeredWebJobHistoryResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredJobHistory); err != nil { - return WebAppsClientGetTriggeredWebJobHistoryResponse{}, err - } - return result, nil -} - -// GetTriggeredWebJobHistorySlot - Gets a triggered web job's history by its ID for an app, , or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// id - History ID. -// slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. -// options - WebAppsClientGetTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistorySlot -// method. -func (client *WebAppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, slot string, options *WebAppsClientGetTriggeredWebJobHistorySlotOptions) (WebAppsClientGetTriggeredWebJobHistorySlotResponse, error) { - req, err := client.getTriggeredWebJobHistorySlotCreateRequest(ctx, resourceGroupName, name, webJobName, id, slot, options) - if err != nil { - return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, runtime.NewResponseError(resp) - } - return client.getTriggeredWebJobHistorySlotHandleResponse(resp) -} - -// getTriggeredWebJobHistorySlotCreateRequest creates the GetTriggeredWebJobHistorySlot request. -func (client *WebAppsClient) getTriggeredWebJobHistorySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, slot string, options *WebAppsClientGetTriggeredWebJobHistorySlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if id == "" { - return nil, errors.New("parameter id cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getTriggeredWebJobHistorySlotHandleResponse handles the GetTriggeredWebJobHistorySlot response. -func (client *WebAppsClient) getTriggeredWebJobHistorySlotHandleResponse(resp *http.Response) (WebAppsClientGetTriggeredWebJobHistorySlotResponse, error) { - result := WebAppsClientGetTriggeredWebJobHistorySlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredJobHistory); err != nil { - return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, err - } - return result, nil -} - -// GetTriggeredWebJobSlot - Gets a triggered web job by its ID for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. -// options - WebAppsClientGetTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobSlot -// method. -func (client *WebAppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetTriggeredWebJobSlotOptions) (WebAppsClientGetTriggeredWebJobSlotResponse, error) { - req, err := client.getTriggeredWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) - if err != nil { - return WebAppsClientGetTriggeredWebJobSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetTriggeredWebJobSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetTriggeredWebJobSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getTriggeredWebJobSlotHandleResponse(resp) -} - -// getTriggeredWebJobSlotCreateRequest creates the GetTriggeredWebJobSlot request. -func (client *WebAppsClient) getTriggeredWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetTriggeredWebJobSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getTriggeredWebJobSlotHandleResponse handles the GetTriggeredWebJobSlot response. -func (client *WebAppsClient) getTriggeredWebJobSlotHandleResponse(resp *http.Response) (WebAppsClientGetTriggeredWebJobSlotResponse, error) { - result := WebAppsClientGetTriggeredWebJobSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredWebJob); err != nil { - return WebAppsClientGetTriggeredWebJobSlotResponse{}, err - } - return result, nil -} - -// GetVnetConnection - Gets a virtual network the app (or deployment slot) is connected to by name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of the virtual network. -// options - WebAppsClientGetVnetConnectionOptions contains the optional parameters for the WebAppsClient.GetVnetConnection -// method. -func (client *WebAppsClient) GetVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, options *WebAppsClientGetVnetConnectionOptions) (WebAppsClientGetVnetConnectionResponse, error) { - req, err := client.getVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, options) - if err != nil { - return WebAppsClientGetVnetConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetVnetConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetVnetConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.getVnetConnectionHandleResponse(resp) -} - -// getVnetConnectionCreateRequest creates the GetVnetConnection request. -func (client *WebAppsClient) getVnetConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, options *WebAppsClientGetVnetConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVnetConnectionHandleResponse handles the GetVnetConnection response. -func (client *WebAppsClient) getVnetConnectionHandleResponse(resp *http.Response) (WebAppsClientGetVnetConnectionResponse, error) { - result := WebAppsClientGetVnetConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { - return WebAppsClientGetVnetConnectionResponse{}, err - } - return result, nil -} - -// GetVnetConnectionGateway - Gets an app's Virtual Network gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of the Virtual Network. -// gatewayName - Name of the gateway. Currently, the only supported string is "primary". -// options - WebAppsClientGetVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGateway -// method. -func (client *WebAppsClient) GetVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *WebAppsClientGetVnetConnectionGatewayOptions) (WebAppsClientGetVnetConnectionGatewayResponse, error) { - req, err := client.getVnetConnectionGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, options) - if err != nil { - return WebAppsClientGetVnetConnectionGatewayResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetVnetConnectionGatewayResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetVnetConnectionGatewayResponse{}, runtime.NewResponseError(resp) - } - return client.getVnetConnectionGatewayHandleResponse(resp) -} - -// getVnetConnectionGatewayCreateRequest creates the GetVnetConnectionGateway request. -func (client *WebAppsClient) getVnetConnectionGatewayCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *WebAppsClientGetVnetConnectionGatewayOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVnetConnectionGatewayHandleResponse handles the GetVnetConnectionGateway response. -func (client *WebAppsClient) getVnetConnectionGatewayHandleResponse(resp *http.Response) (WebAppsClientGetVnetConnectionGatewayResponse, error) { - result := WebAppsClientGetVnetConnectionGatewayResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { - return WebAppsClientGetVnetConnectionGatewayResponse{}, err - } - return result, nil -} - -// GetVnetConnectionGatewaySlot - Gets an app's Virtual Network gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of the Virtual Network. -// gatewayName - Name of the gateway. Currently, the only supported string is "primary". -// slot - Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual -// Network. -// options - WebAppsClientGetVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGatewaySlot -// method. -func (client *WebAppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, options *WebAppsClientGetVnetConnectionGatewaySlotOptions) (WebAppsClientGetVnetConnectionGatewaySlotResponse, error) { - req, err := client.getVnetConnectionGatewaySlotCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, slot, options) - if err != nil { - return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, runtime.NewResponseError(resp) - } - return client.getVnetConnectionGatewaySlotHandleResponse(resp) -} - -// getVnetConnectionGatewaySlotCreateRequest creates the GetVnetConnectionGatewaySlot request. -func (client *WebAppsClient) getVnetConnectionGatewaySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, options *WebAppsClientGetVnetConnectionGatewaySlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVnetConnectionGatewaySlotHandleResponse handles the GetVnetConnectionGatewaySlot response. -func (client *WebAppsClient) getVnetConnectionGatewaySlotHandleResponse(resp *http.Response) (WebAppsClientGetVnetConnectionGatewaySlotResponse, error) { - result := WebAppsClientGetVnetConnectionGatewaySlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { - return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, err - } - return result, nil -} - -// GetVnetConnectionSlot - Gets a virtual network the app (or deployment slot) is connected to by name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of the virtual network. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the named virtual network for the production -// slot. -// options - WebAppsClientGetVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionSlot -// method. -func (client *WebAppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *WebAppsClientGetVnetConnectionSlotOptions) (WebAppsClientGetVnetConnectionSlotResponse, error) { - req, err := client.getVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, options) - if err != nil { - return WebAppsClientGetVnetConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetVnetConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetVnetConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getVnetConnectionSlotHandleResponse(resp) -} - -// getVnetConnectionSlotCreateRequest creates the GetVnetConnectionSlot request. -func (client *WebAppsClient) getVnetConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *WebAppsClientGetVnetConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVnetConnectionSlotHandleResponse handles the GetVnetConnectionSlot response. -func (client *WebAppsClient) getVnetConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientGetVnetConnectionSlotResponse, error) { - result := WebAppsClientGetVnetConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { - return WebAppsClientGetVnetConnectionSlotResponse{}, err - } - return result, nil -} - -// GetWebJob - Get webjob information for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of the web job. -// options - WebAppsClientGetWebJobOptions contains the optional parameters for the WebAppsClient.GetWebJob method. -func (client *WebAppsClient) GetWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetWebJobOptions) (WebAppsClientGetWebJobResponse, error) { - req, err := client.getWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) - if err != nil { - return WebAppsClientGetWebJobResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetWebJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetWebJobResponse{}, runtime.NewResponseError(resp) - } - return client.getWebJobHandleResponse(resp) -} - -// getWebJobCreateRequest creates the GetWebJob request. -func (client *WebAppsClient) getWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetWebJobOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getWebJobHandleResponse handles the GetWebJob response. -func (client *WebAppsClient) getWebJobHandleResponse(resp *http.Response) (WebAppsClientGetWebJobResponse, error) { - result := WebAppsClientGetWebJobResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebJob); err != nil { - return WebAppsClientGetWebJobResponse{}, err - } - return result, nil -} - -// GetWebJobSlot - Get webjob information for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of the web job. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// options - WebAppsClientGetWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetWebJobSlot method. -func (client *WebAppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetWebJobSlotOptions) (WebAppsClientGetWebJobSlotResponse, error) { - req, err := client.getWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) - if err != nil { - return WebAppsClientGetWebJobSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetWebJobSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetWebJobSlotResponse{}, runtime.NewResponseError(resp) - } - return client.getWebJobSlotHandleResponse(resp) -} - -// getWebJobSlotCreateRequest creates the GetWebJobSlot request. -func (client *WebAppsClient) getWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetWebJobSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getWebJobSlotHandleResponse handles the GetWebJobSlot response. -func (client *WebAppsClient) getWebJobSlotHandleResponse(resp *http.Response) (WebAppsClientGetWebJobSlotResponse, error) { - result := WebAppsClientGetWebJobSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebJob); err != nil { - return WebAppsClientGetWebJobSlotResponse{}, err - } - return result, nil -} - -// GetWebSiteContainerLogs - Gets the last lines of docker logs for the given site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientGetWebSiteContainerLogsOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogs -// method. -func (client *WebAppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetWebSiteContainerLogsOptions) (WebAppsClientGetWebSiteContainerLogsResponse, error) { - req, err := client.getWebSiteContainerLogsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientGetWebSiteContainerLogsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetWebSiteContainerLogsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGetWebSiteContainerLogsResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientGetWebSiteContainerLogsResponse{Body: resp.Body}, nil -} - -// getWebSiteContainerLogsCreateRequest creates the GetWebSiteContainerLogs request. -func (client *WebAppsClient) getWebSiteContainerLogsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetWebSiteContainerLogsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - runtime.SkipBodyDownload(req) - req.Raw().Header["Accept"] = []string{"application/octet-stream"} - return req, nil -} - -// GetWebSiteContainerLogsSlot - Gets the last lines of docker logs for the given site -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - WebAppsClientGetWebSiteContainerLogsSlotOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogsSlot -// method. -func (client *WebAppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetWebSiteContainerLogsSlotOptions) (WebAppsClientGetWebSiteContainerLogsSlotResponse, error) { - req, err := client.getWebSiteContainerLogsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientGetWebSiteContainerLogsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientGetWebSiteContainerLogsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGetWebSiteContainerLogsSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientGetWebSiteContainerLogsSlotResponse{Body: resp.Body}, nil -} - -// getWebSiteContainerLogsSlotCreateRequest creates the GetWebSiteContainerLogsSlot request. -func (client *WebAppsClient) getWebSiteContainerLogsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetWebSiteContainerLogsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - runtime.SkipBodyDownload(req) - req.Raw().Header["Accept"] = []string{"application/octet-stream"} - return req, nil -} - -// BeginInstallSiteExtension - Install site extension on a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// siteExtensionID - Site extension name. -// options - WebAppsClientBeginInstallSiteExtensionOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtension -// method. -func (client *WebAppsClient) BeginInstallSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientBeginInstallSiteExtensionOptions) (*runtime.Poller[WebAppsClientInstallSiteExtensionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.installSiteExtension(ctx, resourceGroupName, name, siteExtensionID, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientInstallSiteExtensionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientInstallSiteExtensionResponse](options.ResumeToken, client.pl, nil) - } -} - -// InstallSiteExtension - Install site extension on a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) installSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientBeginInstallSiteExtensionOptions) (*http.Response, error) { - req, err := client.installSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// installSiteExtensionCreateRequest creates the InstallSiteExtension request. -func (client *WebAppsClient) installSiteExtensionCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientBeginInstallSiteExtensionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if siteExtensionID == "" { - return nil, errors.New("parameter siteExtensionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginInstallSiteExtensionSlot - Install site extension on a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// siteExtensionID - Site extension name. -// slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. -// options - WebAppsClientBeginInstallSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtensionSlot -// method. -func (client *WebAppsClient) BeginInstallSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientBeginInstallSiteExtensionSlotOptions) (*runtime.Poller[WebAppsClientInstallSiteExtensionSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.installSiteExtensionSlot(ctx, resourceGroupName, name, siteExtensionID, slot, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientInstallSiteExtensionSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientInstallSiteExtensionSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// InstallSiteExtensionSlot - Install site extension on a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) installSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientBeginInstallSiteExtensionSlotOptions) (*http.Response, error) { - req, err := client.installSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// installSiteExtensionSlotCreateRequest creates the InstallSiteExtensionSlot request. -func (client *WebAppsClient) installSiteExtensionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientBeginInstallSiteExtensionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if siteExtensionID == "" { - return nil, errors.New("parameter siteExtensionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteExtensionId}", url.PathEscape(siteExtensionID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// IsCloneable - Shows whether an app can be cloned to another resource group or subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientIsCloneableOptions contains the optional parameters for the WebAppsClient.IsCloneable method. -func (client *WebAppsClient) IsCloneable(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientIsCloneableOptions) (WebAppsClientIsCloneableResponse, error) { - req, err := client.isCloneableCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientIsCloneableResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientIsCloneableResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientIsCloneableResponse{}, runtime.NewResponseError(resp) - } - return client.isCloneableHandleResponse(resp) -} - -// isCloneableCreateRequest creates the IsCloneable request. -func (client *WebAppsClient) isCloneableCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientIsCloneableOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// isCloneableHandleResponse handles the IsCloneable response. -func (client *WebAppsClient) isCloneableHandleResponse(resp *http.Response) (WebAppsClientIsCloneableResponse, error) { - result := WebAppsClientIsCloneableResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteCloneability); err != nil { - return WebAppsClientIsCloneableResponse{}, err - } - return result, nil -} - -// IsCloneableSlot - Shows whether an app can be cloned to another resource group or subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. By default, this API returns information on the production slot. -// options - WebAppsClientIsCloneableSlotOptions contains the optional parameters for the WebAppsClient.IsCloneableSlot method. -func (client *WebAppsClient) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientIsCloneableSlotOptions) (WebAppsClientIsCloneableSlotResponse, error) { - req, err := client.isCloneableSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientIsCloneableSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientIsCloneableSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientIsCloneableSlotResponse{}, runtime.NewResponseError(resp) - } - return client.isCloneableSlotHandleResponse(resp) -} - -// isCloneableSlotCreateRequest creates the IsCloneableSlot request. -func (client *WebAppsClient) isCloneableSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientIsCloneableSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// isCloneableSlotHandleResponse handles the IsCloneableSlot response. -func (client *WebAppsClient) isCloneableSlotHandleResponse(resp *http.Response) (WebAppsClientIsCloneableSlotResponse, error) { - result := WebAppsClientIsCloneableSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteCloneability); err != nil { - return WebAppsClientIsCloneableSlotResponse{}, err - } - return result, nil -} - -// NewListPager - Get all apps for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - WebAppsClientListOptions contains the optional parameters for the WebAppsClient.List method. -func (client *WebAppsClient) NewListPager(options *WebAppsClientListOptions) *runtime.Pager[WebAppsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListResponse]{ - More: func(page WebAppsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListResponse) (WebAppsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *WebAppsClient) listCreateRequest(ctx context.Context, options *WebAppsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *WebAppsClient) listHandleResponse(resp *http.Response) (WebAppsClientListResponse, error) { - result := WebAppsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { - return WebAppsClientListResponse{}, err - } - return result, nil -} - -// ListApplicationSettings - Gets the application settings of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListApplicationSettingsOptions contains the optional parameters for the WebAppsClient.ListApplicationSettings -// method. -func (client *WebAppsClient) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListApplicationSettingsOptions) (WebAppsClientListApplicationSettingsResponse, error) { - req, err := client.listApplicationSettingsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListApplicationSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListApplicationSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListApplicationSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.listApplicationSettingsHandleResponse(resp) -} - -// listApplicationSettingsCreateRequest creates the ListApplicationSettings request. -func (client *WebAppsClient) listApplicationSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListApplicationSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listApplicationSettingsHandleResponse handles the ListApplicationSettings response. -func (client *WebAppsClient) listApplicationSettingsHandleResponse(resp *http.Response) (WebAppsClientListApplicationSettingsResponse, error) { - result := WebAppsClientListApplicationSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return WebAppsClientListApplicationSettingsResponse{}, err - } - return result, nil -} - -// ListApplicationSettingsSlot - Gets the application settings of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production -// slot. -// options - WebAppsClientListApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListApplicationSettingsSlot -// method. -func (client *WebAppsClient) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListApplicationSettingsSlotOptions) (WebAppsClientListApplicationSettingsSlotResponse, error) { - req, err := client.listApplicationSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListApplicationSettingsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListApplicationSettingsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListApplicationSettingsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listApplicationSettingsSlotHandleResponse(resp) -} - -// listApplicationSettingsSlotCreateRequest creates the ListApplicationSettingsSlot request. -func (client *WebAppsClient) listApplicationSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListApplicationSettingsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listApplicationSettingsSlotHandleResponse handles the ListApplicationSettingsSlot response. -func (client *WebAppsClient) listApplicationSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientListApplicationSettingsSlotResponse, error) { - result := WebAppsClientListApplicationSettingsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return WebAppsClientListApplicationSettingsSlotResponse{}, err - } - return result, nil -} - -// ListAzureStorageAccounts - Gets the Azure storage account configurations of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccounts -// method. -func (client *WebAppsClient) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListAzureStorageAccountsOptions) (WebAppsClientListAzureStorageAccountsResponse, error) { - req, err := client.listAzureStorageAccountsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListAzureStorageAccountsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListAzureStorageAccountsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListAzureStorageAccountsResponse{}, runtime.NewResponseError(resp) - } - return client.listAzureStorageAccountsHandleResponse(resp) -} - -// listAzureStorageAccountsCreateRequest creates the ListAzureStorageAccounts request. -func (client *WebAppsClient) listAzureStorageAccountsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListAzureStorageAccountsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAzureStorageAccountsHandleResponse handles the ListAzureStorageAccounts response. -func (client *WebAppsClient) listAzureStorageAccountsHandleResponse(resp *http.Response) (WebAppsClientListAzureStorageAccountsResponse, error) { - result := WebAppsClientListAzureStorageAccountsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureStoragePropertyDictionaryResource); err != nil { - return WebAppsClientListAzureStorageAccountsResponse{}, err - } - return result, nil -} - -// ListAzureStorageAccountsSlot - Gets the Azure storage account configurations of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations -// for the production slot. -// options - WebAppsClientListAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccountsSlot -// method. -func (client *WebAppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListAzureStorageAccountsSlotOptions) (WebAppsClientListAzureStorageAccountsSlotResponse, error) { - req, err := client.listAzureStorageAccountsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListAzureStorageAccountsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListAzureStorageAccountsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListAzureStorageAccountsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listAzureStorageAccountsSlotHandleResponse(resp) -} - -// listAzureStorageAccountsSlotCreateRequest creates the ListAzureStorageAccountsSlot request. -func (client *WebAppsClient) listAzureStorageAccountsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListAzureStorageAccountsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAzureStorageAccountsSlotHandleResponse handles the ListAzureStorageAccountsSlot response. -func (client *WebAppsClient) listAzureStorageAccountsSlotHandleResponse(resp *http.Response) (WebAppsClientListAzureStorageAccountsSlotResponse, error) { - result := WebAppsClientListAzureStorageAccountsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureStoragePropertyDictionaryResource); err != nil { - return WebAppsClientListAzureStorageAccountsSlotResponse{}, err - } - return result, nil -} - -// ListBackupStatusSecrets - Gets status of a web app backup that may be in progress, including secrets associated with the -// backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new -// URL is passed in the request body. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// 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. -// options - WebAppsClientListBackupStatusSecretsOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecrets -// method. -func (client *WebAppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, options *WebAppsClientListBackupStatusSecretsOptions) (WebAppsClientListBackupStatusSecretsResponse, error) { - req, err := client.listBackupStatusSecretsCreateRequest(ctx, resourceGroupName, name, backupID, request, options) - if err != nil { - return WebAppsClientListBackupStatusSecretsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListBackupStatusSecretsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBackupStatusSecretsResponse{}, runtime.NewResponseError(resp) - } - return client.listBackupStatusSecretsHandleResponse(resp) -} - -// listBackupStatusSecretsCreateRequest creates the ListBackupStatusSecrets request. -func (client *WebAppsClient) listBackupStatusSecretsCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, options *WebAppsClientListBackupStatusSecretsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if backupID == "" { - return nil, errors.New("parameter backupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// listBackupStatusSecretsHandleResponse handles the ListBackupStatusSecrets response. -func (client *WebAppsClient) listBackupStatusSecretsHandleResponse(resp *http.Response) (WebAppsClientListBackupStatusSecretsResponse, error) { - result := WebAppsClientListBackupStatusSecretsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { - return WebAppsClientListBackupStatusSecretsResponse{}, err - } - return result, nil -} - -// ListBackupStatusSecretsSlot - Gets status of a web app backup that may be in progress, including secrets associated with -// the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new -// URL is passed in the request body. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// backupID - ID of backup. -// slot - Name of web app slot. If not specified then will default to production slot. -// request - Information on backup request. -// options - WebAppsClientListBackupStatusSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecretsSlot -// method. -func (client *WebAppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request BackupRequest, options *WebAppsClientListBackupStatusSecretsSlotOptions) (WebAppsClientListBackupStatusSecretsSlotResponse, error) { - req, err := client.listBackupStatusSecretsSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, request, options) - if err != nil { - return WebAppsClientListBackupStatusSecretsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListBackupStatusSecretsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBackupStatusSecretsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listBackupStatusSecretsSlotHandleResponse(resp) -} - -// listBackupStatusSecretsSlotCreateRequest creates the ListBackupStatusSecretsSlot request. -func (client *WebAppsClient) listBackupStatusSecretsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request BackupRequest, options *WebAppsClientListBackupStatusSecretsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if backupID == "" { - return nil, errors.New("parameter backupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// listBackupStatusSecretsSlotHandleResponse handles the ListBackupStatusSecretsSlot response. -func (client *WebAppsClient) listBackupStatusSecretsSlotHandleResponse(resp *http.Response) (WebAppsClientListBackupStatusSecretsSlotResponse, error) { - result := WebAppsClientListBackupStatusSecretsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupItem); err != nil { - return WebAppsClientListBackupStatusSecretsSlotResponse{}, err - } - return result, nil -} - -// NewListBackupsPager - Gets existing backups of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListBackupsOptions contains the optional parameters for the WebAppsClient.ListBackups method. -func (client *WebAppsClient) NewListBackupsPager(resourceGroupName string, name string, options *WebAppsClientListBackupsOptions) *runtime.Pager[WebAppsClientListBackupsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListBackupsResponse]{ - More: func(page WebAppsClientListBackupsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListBackupsResponse) (WebAppsClientListBackupsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBackupsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListBackupsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListBackupsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBackupsResponse{}, runtime.NewResponseError(resp) - } - return client.listBackupsHandleResponse(resp) - }, - }) -} - -// listBackupsCreateRequest creates the ListBackups request. -func (client *WebAppsClient) listBackupsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListBackupsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBackupsHandleResponse handles the ListBackups response. -func (client *WebAppsClient) listBackupsHandleResponse(resp *http.Response) (WebAppsClientListBackupsResponse, error) { - result := WebAppsClientListBackupsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupItemCollection); err != nil { - return WebAppsClientListBackupsResponse{}, err - } - return result, nil -} - -// NewListBackupsSlotPager - Gets existing backups of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. -// options - WebAppsClientListBackupsSlotOptions contains the optional parameters for the WebAppsClient.ListBackupsSlot method. -func (client *WebAppsClient) NewListBackupsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListBackupsSlotOptions) *runtime.Pager[WebAppsClientListBackupsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListBackupsSlotResponse]{ - More: func(page WebAppsClientListBackupsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListBackupsSlotResponse) (WebAppsClientListBackupsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBackupsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListBackupsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListBackupsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBackupsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listBackupsSlotHandleResponse(resp) - }, - }) -} - -// listBackupsSlotCreateRequest creates the ListBackupsSlot request. -func (client *WebAppsClient) listBackupsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListBackupsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBackupsSlotHandleResponse handles the ListBackupsSlot response. -func (client *WebAppsClient) listBackupsSlotHandleResponse(resp *http.Response) (WebAppsClientListBackupsSlotResponse, error) { - result := WebAppsClientListBackupsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupItemCollection); err != nil { - return WebAppsClientListBackupsSlotResponse{}, err - } - return result, nil -} - -// NewListBasicPublishingCredentialsPoliciesPager - Returns whether Scm basic auth is allowed and whether Ftp is allowed for -// a given site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListBasicPublishingCredentialsPoliciesOptions contains the optional parameters for the WebAppsClient.ListBasicPublishingCredentialsPolicies -// method. -func (client *WebAppsClient) NewListBasicPublishingCredentialsPoliciesPager(resourceGroupName string, name string, options *WebAppsClientListBasicPublishingCredentialsPoliciesOptions) *runtime.Pager[WebAppsClientListBasicPublishingCredentialsPoliciesResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListBasicPublishingCredentialsPoliciesResponse]{ - More: func(page WebAppsClientListBasicPublishingCredentialsPoliciesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListBasicPublishingCredentialsPoliciesResponse) (WebAppsClientListBasicPublishingCredentialsPoliciesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBasicPublishingCredentialsPoliciesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListBasicPublishingCredentialsPoliciesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListBasicPublishingCredentialsPoliciesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBasicPublishingCredentialsPoliciesResponse{}, runtime.NewResponseError(resp) - } - return client.listBasicPublishingCredentialsPoliciesHandleResponse(resp) - }, - }) -} - -// listBasicPublishingCredentialsPoliciesCreateRequest creates the ListBasicPublishingCredentialsPolicies request. -func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListBasicPublishingCredentialsPoliciesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBasicPublishingCredentialsPoliciesHandleResponse handles the ListBasicPublishingCredentialsPolicies response. -func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesHandleResponse(resp *http.Response) (WebAppsClientListBasicPublishingCredentialsPoliciesResponse, error) { - result := WebAppsClientListBasicPublishingCredentialsPoliciesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublishingCredentialsPoliciesCollection); err != nil { - return WebAppsClientListBasicPublishingCredentialsPoliciesResponse{}, err - } - return result, nil -} - -// NewListBasicPublishingCredentialsPoliciesSlotPager - Returns whether Scm basic auth is allowed and whether Ftp is allowed -// for a given site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions contains the optional parameters for the WebAppsClient.ListBasicPublishingCredentialsPoliciesSlot -// method. -func (client *WebAppsClient) NewListBasicPublishingCredentialsPoliciesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions) *runtime.Pager[WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse]{ - More: func(page WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse) (WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBasicPublishingCredentialsPoliciesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listBasicPublishingCredentialsPoliciesSlotHandleResponse(resp) - }, - }) -} - -// listBasicPublishingCredentialsPoliciesSlotCreateRequest creates the ListBasicPublishingCredentialsPoliciesSlot request. -func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBasicPublishingCredentialsPoliciesSlotHandleResponse handles the ListBasicPublishingCredentialsPoliciesSlot response. -func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesSlotHandleResponse(resp *http.Response) (WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse, error) { - result := WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublishingCredentialsPoliciesCollection); err != nil { - return WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Gets all web, mobile, and API apps in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// options - WebAppsClientListByResourceGroupOptions contains the optional parameters for the WebAppsClient.ListByResourceGroup -// method. -func (client *WebAppsClient) NewListByResourceGroupPager(resourceGroupName string, options *WebAppsClientListByResourceGroupOptions) *runtime.Pager[WebAppsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListByResourceGroupResponse]{ - More: func(page WebAppsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListByResourceGroupResponse) (WebAppsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *WebAppsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *WebAppsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.IncludeSlots != nil { - reqQP.Set("includeSlots", strconv.FormatBool(*options.IncludeSlots)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *WebAppsClient) listByResourceGroupHandleResponse(resp *http.Response) (WebAppsClientListByResourceGroupResponse, error) { - result := WebAppsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { - return WebAppsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListConfigurationSnapshotInfoPager - Gets a list of web app configuration snapshots identifiers. Each element of the -// list contains a timestamp and the ID of the snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListConfigurationSnapshotInfoOptions contains the optional parameters for the WebAppsClient.ListConfigurationSnapshotInfo -// method. -func (client *WebAppsClient) NewListConfigurationSnapshotInfoPager(resourceGroupName string, name string, options *WebAppsClientListConfigurationSnapshotInfoOptions) *runtime.Pager[WebAppsClientListConfigurationSnapshotInfoResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListConfigurationSnapshotInfoResponse]{ - More: func(page WebAppsClientListConfigurationSnapshotInfoResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationSnapshotInfoResponse) (WebAppsClientListConfigurationSnapshotInfoResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listConfigurationSnapshotInfoCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListConfigurationSnapshotInfoResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListConfigurationSnapshotInfoResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConfigurationSnapshotInfoResponse{}, runtime.NewResponseError(resp) - } - return client.listConfigurationSnapshotInfoHandleResponse(resp) - }, - }) -} - -// listConfigurationSnapshotInfoCreateRequest creates the ListConfigurationSnapshotInfo request. -func (client *WebAppsClient) listConfigurationSnapshotInfoCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListConfigurationSnapshotInfoOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listConfigurationSnapshotInfoHandleResponse handles the ListConfigurationSnapshotInfo response. -func (client *WebAppsClient) listConfigurationSnapshotInfoHandleResponse(resp *http.Response) (WebAppsClientListConfigurationSnapshotInfoResponse, error) { - result := WebAppsClientListConfigurationSnapshotInfoResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigurationSnapshotInfoCollection); err != nil { - return WebAppsClientListConfigurationSnapshotInfoResponse{}, err - } - return result, nil -} - -// NewListConfigurationSnapshotInfoSlotPager - Gets a list of web app configuration snapshots identifiers. Each element of -// the list contains a timestamp and the ID of the snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. -// options - WebAppsClientListConfigurationSnapshotInfoSlotOptions contains the optional parameters for the WebAppsClient.ListConfigurationSnapshotInfoSlot -// method. -func (client *WebAppsClient) NewListConfigurationSnapshotInfoSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListConfigurationSnapshotInfoSlotOptions) *runtime.Pager[WebAppsClientListConfigurationSnapshotInfoSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListConfigurationSnapshotInfoSlotResponse]{ - More: func(page WebAppsClientListConfigurationSnapshotInfoSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationSnapshotInfoSlotResponse) (WebAppsClientListConfigurationSnapshotInfoSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listConfigurationSnapshotInfoSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListConfigurationSnapshotInfoSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListConfigurationSnapshotInfoSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConfigurationSnapshotInfoSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listConfigurationSnapshotInfoSlotHandleResponse(resp) - }, - }) -} - -// listConfigurationSnapshotInfoSlotCreateRequest creates the ListConfigurationSnapshotInfoSlot request. -func (client *WebAppsClient) listConfigurationSnapshotInfoSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListConfigurationSnapshotInfoSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listConfigurationSnapshotInfoSlotHandleResponse handles the ListConfigurationSnapshotInfoSlot response. -func (client *WebAppsClient) listConfigurationSnapshotInfoSlotHandleResponse(resp *http.Response) (WebAppsClientListConfigurationSnapshotInfoSlotResponse, error) { - result := WebAppsClientListConfigurationSnapshotInfoSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigurationSnapshotInfoCollection); err != nil { - return WebAppsClientListConfigurationSnapshotInfoSlotResponse{}, err - } - return result, nil -} - -// NewListConfigurationsPager - List the configurations of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListConfigurationsOptions contains the optional parameters for the WebAppsClient.ListConfigurations -// method. -func (client *WebAppsClient) NewListConfigurationsPager(resourceGroupName string, name string, options *WebAppsClientListConfigurationsOptions) *runtime.Pager[WebAppsClientListConfigurationsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListConfigurationsResponse]{ - More: func(page WebAppsClientListConfigurationsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationsResponse) (WebAppsClientListConfigurationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listConfigurationsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListConfigurationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListConfigurationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConfigurationsResponse{}, runtime.NewResponseError(resp) - } - return client.listConfigurationsHandleResponse(resp) - }, - }) -} - -// listConfigurationsCreateRequest creates the ListConfigurations request. -func (client *WebAppsClient) listConfigurationsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListConfigurationsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listConfigurationsHandleResponse handles the ListConfigurations response. -func (client *WebAppsClient) listConfigurationsHandleResponse(resp *http.Response) (WebAppsClientListConfigurationsResponse, error) { - result := WebAppsClientListConfigurationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResourceCollection); err != nil { - return WebAppsClientListConfigurationsResponse{}, err - } - return result, nil -} - -// NewListConfigurationsSlotPager - List the configurations of an app -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. -// options - WebAppsClientListConfigurationsSlotOptions contains the optional parameters for the WebAppsClient.ListConfigurationsSlot -// method. -func (client *WebAppsClient) NewListConfigurationsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListConfigurationsSlotOptions) *runtime.Pager[WebAppsClientListConfigurationsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListConfigurationsSlotResponse]{ - More: func(page WebAppsClientListConfigurationsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationsSlotResponse) (WebAppsClientListConfigurationsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listConfigurationsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListConfigurationsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListConfigurationsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConfigurationsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listConfigurationsSlotHandleResponse(resp) - }, - }) -} - -// listConfigurationsSlotCreateRequest creates the ListConfigurationsSlot request. -func (client *WebAppsClient) listConfigurationsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListConfigurationsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listConfigurationsSlotHandleResponse handles the ListConfigurationsSlot response. -func (client *WebAppsClient) listConfigurationsSlotHandleResponse(resp *http.Response) (WebAppsClientListConfigurationsSlotResponse, error) { - result := WebAppsClientListConfigurationsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResourceCollection); err != nil { - return WebAppsClientListConfigurationsSlotResponse{}, err - } - return result, nil -} - -// ListConnectionStrings - Gets the connection strings of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListConnectionStringsOptions contains the optional parameters for the WebAppsClient.ListConnectionStrings -// method. -func (client *WebAppsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListConnectionStringsOptions) (WebAppsClientListConnectionStringsResponse, error) { - req, err := client.listConnectionStringsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListConnectionStringsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListConnectionStringsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConnectionStringsResponse{}, runtime.NewResponseError(resp) - } - return client.listConnectionStringsHandleResponse(resp) -} - -// listConnectionStringsCreateRequest creates the ListConnectionStrings request. -func (client *WebAppsClient) listConnectionStringsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListConnectionStringsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listConnectionStringsHandleResponse handles the ListConnectionStrings response. -func (client *WebAppsClient) listConnectionStringsHandleResponse(resp *http.Response) (WebAppsClientListConnectionStringsResponse, error) { - result := WebAppsClientListConnectionStringsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionStringDictionary); err != nil { - return WebAppsClientListConnectionStringsResponse{}, err - } - return result, nil -} - -// ListConnectionStringsSlot - Gets the connection strings of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production -// slot. -// options - WebAppsClientListConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.ListConnectionStringsSlot -// method. -func (client *WebAppsClient) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListConnectionStringsSlotOptions) (WebAppsClientListConnectionStringsSlotResponse, error) { - req, err := client.listConnectionStringsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListConnectionStringsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListConnectionStringsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConnectionStringsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listConnectionStringsSlotHandleResponse(resp) -} - -// listConnectionStringsSlotCreateRequest creates the ListConnectionStringsSlot request. -func (client *WebAppsClient) listConnectionStringsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListConnectionStringsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listConnectionStringsSlotHandleResponse handles the ListConnectionStringsSlot response. -func (client *WebAppsClient) listConnectionStringsSlotHandleResponse(resp *http.Response) (WebAppsClientListConnectionStringsSlotResponse, error) { - result := WebAppsClientListConnectionStringsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionStringDictionary); err != nil { - return WebAppsClientListConnectionStringsSlotResponse{}, err - } - return result, nil -} - -// NewListContinuousWebJobsPager - List continuous web jobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// options - WebAppsClientListContinuousWebJobsOptions contains the optional parameters for the WebAppsClient.ListContinuousWebJobs -// method. -func (client *WebAppsClient) NewListContinuousWebJobsPager(resourceGroupName string, name string, options *WebAppsClientListContinuousWebJobsOptions) *runtime.Pager[WebAppsClientListContinuousWebJobsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListContinuousWebJobsResponse]{ - More: func(page WebAppsClientListContinuousWebJobsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListContinuousWebJobsResponse) (WebAppsClientListContinuousWebJobsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listContinuousWebJobsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListContinuousWebJobsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListContinuousWebJobsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListContinuousWebJobsResponse{}, runtime.NewResponseError(resp) - } - return client.listContinuousWebJobsHandleResponse(resp) - }, - }) -} - -// listContinuousWebJobsCreateRequest creates the ListContinuousWebJobs request. -func (client *WebAppsClient) listContinuousWebJobsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListContinuousWebJobsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listContinuousWebJobsHandleResponse handles the ListContinuousWebJobs response. -func (client *WebAppsClient) listContinuousWebJobsHandleResponse(resp *http.Response) (WebAppsClientListContinuousWebJobsResponse, error) { - result := WebAppsClientListContinuousWebJobsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ContinuousWebJobCollection); err != nil { - return WebAppsClientListContinuousWebJobsResponse{}, err - } - return result, nil -} - -// NewListContinuousWebJobsSlotPager - List continuous web jobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. -// options - WebAppsClientListContinuousWebJobsSlotOptions contains the optional parameters for the WebAppsClient.ListContinuousWebJobsSlot -// method. -func (client *WebAppsClient) NewListContinuousWebJobsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListContinuousWebJobsSlotOptions) *runtime.Pager[WebAppsClientListContinuousWebJobsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListContinuousWebJobsSlotResponse]{ - More: func(page WebAppsClientListContinuousWebJobsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListContinuousWebJobsSlotResponse) (WebAppsClientListContinuousWebJobsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listContinuousWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListContinuousWebJobsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListContinuousWebJobsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListContinuousWebJobsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listContinuousWebJobsSlotHandleResponse(resp) - }, - }) -} - -// listContinuousWebJobsSlotCreateRequest creates the ListContinuousWebJobsSlot request. -func (client *WebAppsClient) listContinuousWebJobsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListContinuousWebJobsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listContinuousWebJobsSlotHandleResponse handles the ListContinuousWebJobsSlot response. -func (client *WebAppsClient) listContinuousWebJobsSlotHandleResponse(resp *http.Response) (WebAppsClientListContinuousWebJobsSlotResponse, error) { - result := WebAppsClientListContinuousWebJobsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ContinuousWebJobCollection); err != nil { - return WebAppsClientListContinuousWebJobsSlotResponse{}, err - } - return result, nil -} - -// ListDeploymentLog - List deployment log for specific deployment for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// id - The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". -// options - WebAppsClientListDeploymentLogOptions contains the optional parameters for the WebAppsClient.ListDeploymentLog -// method. -func (client *WebAppsClient) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientListDeploymentLogOptions) (WebAppsClientListDeploymentLogResponse, error) { - req, err := client.listDeploymentLogCreateRequest(ctx, resourceGroupName, name, id, options) - if err != nil { - return WebAppsClientListDeploymentLogResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListDeploymentLogResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDeploymentLogResponse{}, runtime.NewResponseError(resp) - } - return client.listDeploymentLogHandleResponse(resp) -} - -// listDeploymentLogCreateRequest creates the ListDeploymentLog request. -func (client *WebAppsClient) listDeploymentLogCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientListDeploymentLogOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if id == "" { - return nil, errors.New("parameter id cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listDeploymentLogHandleResponse handles the ListDeploymentLog response. -func (client *WebAppsClient) listDeploymentLogHandleResponse(resp *http.Response) (WebAppsClientListDeploymentLogResponse, error) { - result := WebAppsClientListDeploymentLogResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { - return WebAppsClientListDeploymentLogResponse{}, err - } - return result, nil -} - -// ListDeploymentLogSlot - List deployment log for specific deployment for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// id - The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// options - WebAppsClientListDeploymentLogSlotOptions contains the optional parameters for the WebAppsClient.ListDeploymentLogSlot -// method. -func (client *WebAppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientListDeploymentLogSlotOptions) (WebAppsClientListDeploymentLogSlotResponse, error) { - req, err := client.listDeploymentLogSlotCreateRequest(ctx, resourceGroupName, name, id, slot, options) - if err != nil { - return WebAppsClientListDeploymentLogSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListDeploymentLogSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDeploymentLogSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listDeploymentLogSlotHandleResponse(resp) -} - -// listDeploymentLogSlotCreateRequest creates the ListDeploymentLogSlot request. -func (client *WebAppsClient) listDeploymentLogSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientListDeploymentLogSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if id == "" { - return nil, errors.New("parameter id cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listDeploymentLogSlotHandleResponse handles the ListDeploymentLogSlot response. -func (client *WebAppsClient) listDeploymentLogSlotHandleResponse(resp *http.Response) (WebAppsClientListDeploymentLogSlotResponse, error) { - result := WebAppsClientListDeploymentLogSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Deployment); err != nil { - return WebAppsClientListDeploymentLogSlotResponse{}, err - } - return result, nil -} - -// NewListDeploymentsPager - List deployments for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListDeploymentsOptions contains the optional parameters for the WebAppsClient.ListDeployments method. -func (client *WebAppsClient) NewListDeploymentsPager(resourceGroupName string, name string, options *WebAppsClientListDeploymentsOptions) *runtime.Pager[WebAppsClientListDeploymentsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListDeploymentsResponse]{ - More: func(page WebAppsClientListDeploymentsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListDeploymentsResponse) (WebAppsClientListDeploymentsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDeploymentsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListDeploymentsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListDeploymentsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDeploymentsResponse{}, runtime.NewResponseError(resp) - } - return client.listDeploymentsHandleResponse(resp) - }, - }) -} - -// listDeploymentsCreateRequest creates the ListDeployments request. -func (client *WebAppsClient) listDeploymentsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListDeploymentsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listDeploymentsHandleResponse handles the ListDeployments response. -func (client *WebAppsClient) listDeploymentsHandleResponse(resp *http.Response) (WebAppsClientListDeploymentsResponse, error) { - result := WebAppsClientListDeploymentsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentCollection); err != nil { - return WebAppsClientListDeploymentsResponse{}, err - } - return result, nil -} - -// NewListDeploymentsSlotPager - List deployments for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// options - WebAppsClientListDeploymentsSlotOptions contains the optional parameters for the WebAppsClient.ListDeploymentsSlot -// method. -func (client *WebAppsClient) NewListDeploymentsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListDeploymentsSlotOptions) *runtime.Pager[WebAppsClientListDeploymentsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListDeploymentsSlotResponse]{ - More: func(page WebAppsClientListDeploymentsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListDeploymentsSlotResponse) (WebAppsClientListDeploymentsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDeploymentsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListDeploymentsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListDeploymentsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDeploymentsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listDeploymentsSlotHandleResponse(resp) - }, - }) -} - -// listDeploymentsSlotCreateRequest creates the ListDeploymentsSlot request. -func (client *WebAppsClient) listDeploymentsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListDeploymentsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listDeploymentsSlotHandleResponse handles the ListDeploymentsSlot response. -func (client *WebAppsClient) listDeploymentsSlotHandleResponse(resp *http.Response) (WebAppsClientListDeploymentsSlotResponse, error) { - result := WebAppsClientListDeploymentsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentCollection); err != nil { - return WebAppsClientListDeploymentsSlotResponse{}, err - } - return result, nil -} - -// NewListDomainOwnershipIdentifiersPager - Lists ownership identifiers for domain associated with web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListDomainOwnershipIdentifiersOptions contains the optional parameters for the WebAppsClient.ListDomainOwnershipIdentifiers -// method. -func (client *WebAppsClient) NewListDomainOwnershipIdentifiersPager(resourceGroupName string, name string, options *WebAppsClientListDomainOwnershipIdentifiersOptions) *runtime.Pager[WebAppsClientListDomainOwnershipIdentifiersResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListDomainOwnershipIdentifiersResponse]{ - More: func(page WebAppsClientListDomainOwnershipIdentifiersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListDomainOwnershipIdentifiersResponse) (WebAppsClientListDomainOwnershipIdentifiersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDomainOwnershipIdentifiersCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListDomainOwnershipIdentifiersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListDomainOwnershipIdentifiersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDomainOwnershipIdentifiersResponse{}, runtime.NewResponseError(resp) - } - return client.listDomainOwnershipIdentifiersHandleResponse(resp) - }, - }) -} - -// listDomainOwnershipIdentifiersCreateRequest creates the ListDomainOwnershipIdentifiers request. -func (client *WebAppsClient) listDomainOwnershipIdentifiersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListDomainOwnershipIdentifiersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listDomainOwnershipIdentifiersHandleResponse handles the ListDomainOwnershipIdentifiers response. -func (client *WebAppsClient) listDomainOwnershipIdentifiersHandleResponse(resp *http.Response) (WebAppsClientListDomainOwnershipIdentifiersResponse, error) { - result := WebAppsClientListDomainOwnershipIdentifiersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IdentifierCollection); err != nil { - return WebAppsClientListDomainOwnershipIdentifiersResponse{}, err - } - return result, nil -} - -// NewListDomainOwnershipIdentifiersSlotPager - Lists ownership identifiers for domain associated with web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. -// options - WebAppsClientListDomainOwnershipIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.ListDomainOwnershipIdentifiersSlot -// method. -func (client *WebAppsClient) NewListDomainOwnershipIdentifiersSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListDomainOwnershipIdentifiersSlotOptions) *runtime.Pager[WebAppsClientListDomainOwnershipIdentifiersSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListDomainOwnershipIdentifiersSlotResponse]{ - More: func(page WebAppsClientListDomainOwnershipIdentifiersSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListDomainOwnershipIdentifiersSlotResponse) (WebAppsClientListDomainOwnershipIdentifiersSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDomainOwnershipIdentifiersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListDomainOwnershipIdentifiersSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListDomainOwnershipIdentifiersSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDomainOwnershipIdentifiersSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listDomainOwnershipIdentifiersSlotHandleResponse(resp) - }, - }) -} - -// listDomainOwnershipIdentifiersSlotCreateRequest creates the ListDomainOwnershipIdentifiersSlot request. -func (client *WebAppsClient) listDomainOwnershipIdentifiersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListDomainOwnershipIdentifiersSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listDomainOwnershipIdentifiersSlotHandleResponse handles the ListDomainOwnershipIdentifiersSlot response. -func (client *WebAppsClient) listDomainOwnershipIdentifiersSlotHandleResponse(resp *http.Response) (WebAppsClientListDomainOwnershipIdentifiersSlotResponse, error) { - result := WebAppsClientListDomainOwnershipIdentifiersSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IdentifierCollection); err != nil { - return WebAppsClientListDomainOwnershipIdentifiersSlotResponse{}, err - } - return result, nil -} - -// ListFunctionKeys - Get function keys for a function in a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - Function name. -// options - WebAppsClientListFunctionKeysOptions contains the optional parameters for the WebAppsClient.ListFunctionKeys -// method. -func (client *WebAppsClient) ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientListFunctionKeysOptions) (WebAppsClientListFunctionKeysResponse, error) { - req, err := client.listFunctionKeysCreateRequest(ctx, resourceGroupName, name, functionName, options) - if err != nil { - return WebAppsClientListFunctionKeysResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListFunctionKeysResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListFunctionKeysResponse{}, runtime.NewResponseError(resp) - } - return client.listFunctionKeysHandleResponse(resp) -} - -// listFunctionKeysCreateRequest creates the ListFunctionKeys request. -func (client *WebAppsClient) listFunctionKeysCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientListFunctionKeysOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listFunctionKeysHandleResponse handles the ListFunctionKeys response. -func (client *WebAppsClient) listFunctionKeysHandleResponse(resp *http.Response) (WebAppsClientListFunctionKeysResponse, error) { - result := WebAppsClientListFunctionKeysResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return WebAppsClientListFunctionKeysResponse{}, err - } - return result, nil -} - -// ListFunctionKeysSlot - Get function keys for a function in a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - Function name. -// slot - Name of the deployment slot. -// options - WebAppsClientListFunctionKeysSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionKeysSlot -// method. -func (client *WebAppsClient) ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientListFunctionKeysSlotOptions) (WebAppsClientListFunctionKeysSlotResponse, error) { - req, err := client.listFunctionKeysSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) - if err != nil { - return WebAppsClientListFunctionKeysSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListFunctionKeysSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListFunctionKeysSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listFunctionKeysSlotHandleResponse(resp) -} - -// listFunctionKeysSlotCreateRequest creates the ListFunctionKeysSlot request. -func (client *WebAppsClient) listFunctionKeysSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientListFunctionKeysSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listFunctionKeysSlotHandleResponse handles the ListFunctionKeysSlot response. -func (client *WebAppsClient) listFunctionKeysSlotHandleResponse(resp *http.Response) (WebAppsClientListFunctionKeysSlotResponse, error) { - result := WebAppsClientListFunctionKeysSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return WebAppsClientListFunctionKeysSlotResponse{}, err - } - return result, nil -} - -// ListFunctionSecrets - Get function secrets for a function in a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - Function name. -// options - WebAppsClientListFunctionSecretsOptions contains the optional parameters for the WebAppsClient.ListFunctionSecrets -// method. -func (client *WebAppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientListFunctionSecretsOptions) (WebAppsClientListFunctionSecretsResponse, error) { - req, err := client.listFunctionSecretsCreateRequest(ctx, resourceGroupName, name, functionName, options) - if err != nil { - return WebAppsClientListFunctionSecretsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListFunctionSecretsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListFunctionSecretsResponse{}, runtime.NewResponseError(resp) - } - return client.listFunctionSecretsHandleResponse(resp) -} - -// listFunctionSecretsCreateRequest creates the ListFunctionSecrets request. -func (client *WebAppsClient) listFunctionSecretsCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientListFunctionSecretsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listFunctionSecretsHandleResponse handles the ListFunctionSecrets response. -func (client *WebAppsClient) listFunctionSecretsHandleResponse(resp *http.Response) (WebAppsClientListFunctionSecretsResponse, error) { - result := WebAppsClientListFunctionSecretsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FunctionSecrets); err != nil { - return WebAppsClientListFunctionSecretsResponse{}, err - } - return result, nil -} - -// ListFunctionSecretsSlot - Get function secrets for a function in a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// functionName - Function name. -// slot - Name of the deployment slot. -// options - WebAppsClientListFunctionSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionSecretsSlot -// method. -func (client *WebAppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientListFunctionSecretsSlotOptions) (WebAppsClientListFunctionSecretsSlotResponse, error) { - req, err := client.listFunctionSecretsSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) - if err != nil { - return WebAppsClientListFunctionSecretsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListFunctionSecretsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListFunctionSecretsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listFunctionSecretsSlotHandleResponse(resp) -} - -// listFunctionSecretsSlotCreateRequest creates the ListFunctionSecretsSlot request. -func (client *WebAppsClient) listFunctionSecretsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientListFunctionSecretsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if functionName == "" { - return nil, errors.New("parameter functionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{functionName}", url.PathEscape(functionName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listFunctionSecretsSlotHandleResponse handles the ListFunctionSecretsSlot response. -func (client *WebAppsClient) listFunctionSecretsSlotHandleResponse(resp *http.Response) (WebAppsClientListFunctionSecretsSlotResponse, error) { - result := WebAppsClientListFunctionSecretsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FunctionSecrets); err != nil { - return WebAppsClientListFunctionSecretsSlotResponse{}, err - } - return result, nil -} - -// NewListFunctionsPager - List the functions for a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// options - WebAppsClientListFunctionsOptions contains the optional parameters for the WebAppsClient.ListFunctions method. -func (client *WebAppsClient) NewListFunctionsPager(resourceGroupName string, name string, options *WebAppsClientListFunctionsOptions) *runtime.Pager[WebAppsClientListFunctionsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListFunctionsResponse]{ - More: func(page WebAppsClientListFunctionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListFunctionsResponse) (WebAppsClientListFunctionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listFunctionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListFunctionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListFunctionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListFunctionsResponse{}, runtime.NewResponseError(resp) - } - return client.listFunctionsHandleResponse(resp) - }, - }) -} - -// listFunctionsCreateRequest creates the ListFunctions request. -func (client *WebAppsClient) listFunctionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListFunctionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listFunctionsHandleResponse handles the ListFunctions response. -func (client *WebAppsClient) listFunctionsHandleResponse(resp *http.Response) (WebAppsClientListFunctionsResponse, error) { - result := WebAppsClientListFunctionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FunctionEnvelopeCollection); err != nil { - return WebAppsClientListFunctionsResponse{}, err - } - return result, nil -} - -// ListHostKeys - Get host secrets for a function app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// options - WebAppsClientListHostKeysOptions contains the optional parameters for the WebAppsClient.ListHostKeys method. -func (client *WebAppsClient) ListHostKeys(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHostKeysOptions) (WebAppsClientListHostKeysResponse, error) { - req, err := client.listHostKeysCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListHostKeysResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListHostKeysResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHostKeysResponse{}, runtime.NewResponseError(resp) - } - return client.listHostKeysHandleResponse(resp) -} - -// listHostKeysCreateRequest creates the ListHostKeys request. -func (client *WebAppsClient) listHostKeysCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHostKeysOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHostKeysHandleResponse handles the ListHostKeys response. -func (client *WebAppsClient) listHostKeysHandleResponse(resp *http.Response) (WebAppsClientListHostKeysResponse, error) { - result := WebAppsClientListHostKeysResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostKeys); err != nil { - return WebAppsClientListHostKeysResponse{}, err - } - return result, nil -} - -// ListHostKeysSlot - Get host secrets for a function app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// slot - Name of the deployment slot. -// options - WebAppsClientListHostKeysSlotOptions contains the optional parameters for the WebAppsClient.ListHostKeysSlot -// method. -func (client *WebAppsClient) ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHostKeysSlotOptions) (WebAppsClientListHostKeysSlotResponse, error) { - req, err := client.listHostKeysSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListHostKeysSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListHostKeysSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHostKeysSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listHostKeysSlotHandleResponse(resp) -} - -// listHostKeysSlotCreateRequest creates the ListHostKeysSlot request. -func (client *WebAppsClient) listHostKeysSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHostKeysSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHostKeysSlotHandleResponse handles the ListHostKeysSlot response. -func (client *WebAppsClient) listHostKeysSlotHandleResponse(resp *http.Response) (WebAppsClientListHostKeysSlotResponse, error) { - result := WebAppsClientListHostKeysSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostKeys); err != nil { - return WebAppsClientListHostKeysSlotResponse{}, err - } - return result, nil -} - -// NewListHostNameBindingsPager - Get hostname bindings for an app or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListHostNameBindingsOptions contains the optional parameters for the WebAppsClient.ListHostNameBindings -// method. -func (client *WebAppsClient) NewListHostNameBindingsPager(resourceGroupName string, name string, options *WebAppsClientListHostNameBindingsOptions) *runtime.Pager[WebAppsClientListHostNameBindingsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListHostNameBindingsResponse]{ - More: func(page WebAppsClientListHostNameBindingsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListHostNameBindingsResponse) (WebAppsClientListHostNameBindingsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHostNameBindingsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListHostNameBindingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListHostNameBindingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHostNameBindingsResponse{}, runtime.NewResponseError(resp) - } - return client.listHostNameBindingsHandleResponse(resp) - }, - }) -} - -// listHostNameBindingsCreateRequest creates the ListHostNameBindings request. -func (client *WebAppsClient) listHostNameBindingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHostNameBindingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHostNameBindingsHandleResponse handles the ListHostNameBindings response. -func (client *WebAppsClient) listHostNameBindingsHandleResponse(resp *http.Response) (WebAppsClientListHostNameBindingsResponse, error) { - result := WebAppsClientListHostNameBindingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBindingCollection); err != nil { - return WebAppsClientListHostNameBindingsResponse{}, err - } - return result, nil -} - -// NewListHostNameBindingsSlotPager - Get hostname bindings for an app or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. -// options - WebAppsClientListHostNameBindingsSlotOptions contains the optional parameters for the WebAppsClient.ListHostNameBindingsSlot -// method. -func (client *WebAppsClient) NewListHostNameBindingsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListHostNameBindingsSlotOptions) *runtime.Pager[WebAppsClientListHostNameBindingsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListHostNameBindingsSlotResponse]{ - More: func(page WebAppsClientListHostNameBindingsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListHostNameBindingsSlotResponse) (WebAppsClientListHostNameBindingsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHostNameBindingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListHostNameBindingsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListHostNameBindingsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHostNameBindingsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listHostNameBindingsSlotHandleResponse(resp) - }, - }) -} - -// listHostNameBindingsSlotCreateRequest creates the ListHostNameBindingsSlot request. -func (client *WebAppsClient) listHostNameBindingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHostNameBindingsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHostNameBindingsSlotHandleResponse handles the ListHostNameBindingsSlot response. -func (client *WebAppsClient) listHostNameBindingsSlotHandleResponse(resp *http.Response) (WebAppsClientListHostNameBindingsSlotResponse, error) { - result := WebAppsClientListHostNameBindingsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostNameBindingCollection); err != nil { - return WebAppsClientListHostNameBindingsSlotResponse{}, err - } - return result, nil -} - -// ListHybridConnections - Retrieves all Service Bus Hybrid Connections used by this Web App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// options - WebAppsClientListHybridConnectionsOptions contains the optional parameters for the WebAppsClient.ListHybridConnections -// method. -func (client *WebAppsClient) ListHybridConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHybridConnectionsOptions) (WebAppsClientListHybridConnectionsResponse, error) { - req, err := client.listHybridConnectionsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListHybridConnectionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListHybridConnectionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHybridConnectionsResponse{}, runtime.NewResponseError(resp) - } - return client.listHybridConnectionsHandleResponse(resp) -} - -// listHybridConnectionsCreateRequest creates the ListHybridConnections request. -func (client *WebAppsClient) listHybridConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHybridConnectionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHybridConnectionsHandleResponse handles the ListHybridConnections response. -func (client *WebAppsClient) listHybridConnectionsHandleResponse(resp *http.Response) (WebAppsClientListHybridConnectionsResponse, error) { - result := WebAppsClientListHybridConnectionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { - return WebAppsClientListHybridConnectionsResponse{}, err - } - return result, nil -} - -// ListHybridConnectionsSlot - Retrieves all Service Bus Hybrid Connections used by this Web App. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// slot - The name of the slot for the web app. -// options - WebAppsClientListHybridConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListHybridConnectionsSlot -// method. -func (client *WebAppsClient) ListHybridConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHybridConnectionsSlotOptions) (WebAppsClientListHybridConnectionsSlotResponse, error) { - req, err := client.listHybridConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListHybridConnectionsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListHybridConnectionsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHybridConnectionsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listHybridConnectionsSlotHandleResponse(resp) -} - -// listHybridConnectionsSlotCreateRequest creates the ListHybridConnectionsSlot request. -func (client *WebAppsClient) listHybridConnectionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHybridConnectionsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHybridConnectionsSlotHandleResponse handles the ListHybridConnectionsSlot response. -func (client *WebAppsClient) listHybridConnectionsSlotHandleResponse(resp *http.Response) (WebAppsClientListHybridConnectionsSlotResponse, error) { - result := WebAppsClientListHybridConnectionsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { - return WebAppsClientListHybridConnectionsSlotResponse{}, err - } - return result, nil -} - -// NewListInstanceFunctionsSlotPager - List the functions for a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// slot - Name of the deployment slot. -// options - WebAppsClientListInstanceFunctionsSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceFunctionsSlot -// method. -func (client *WebAppsClient) NewListInstanceFunctionsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceFunctionsSlotOptions) *runtime.Pager[WebAppsClientListInstanceFunctionsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceFunctionsSlotResponse]{ - More: func(page WebAppsClientListInstanceFunctionsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceFunctionsSlotResponse) (WebAppsClientListInstanceFunctionsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceFunctionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceFunctionsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListInstanceFunctionsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceFunctionsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listInstanceFunctionsSlotHandleResponse(resp) - }, - }) -} - -// listInstanceFunctionsSlotCreateRequest creates the ListInstanceFunctionsSlot request. -func (client *WebAppsClient) listInstanceFunctionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceFunctionsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listInstanceFunctionsSlotHandleResponse handles the ListInstanceFunctionsSlot response. -func (client *WebAppsClient) listInstanceFunctionsSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceFunctionsSlotResponse, error) { - result := WebAppsClientListInstanceFunctionsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FunctionEnvelopeCollection); err != nil { - return WebAppsClientListInstanceFunctionsSlotResponse{}, err - } - return result, nil -} - -// NewListInstanceIdentifiersPager - Gets all scale-out instances of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListInstanceIdentifiersOptions contains the optional parameters for the WebAppsClient.ListInstanceIdentifiers -// method. -func (client *WebAppsClient) NewListInstanceIdentifiersPager(resourceGroupName string, name string, options *WebAppsClientListInstanceIdentifiersOptions) *runtime.Pager[WebAppsClientListInstanceIdentifiersResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceIdentifiersResponse]{ - More: func(page WebAppsClientListInstanceIdentifiersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceIdentifiersResponse) (WebAppsClientListInstanceIdentifiersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceIdentifiersCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceIdentifiersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListInstanceIdentifiersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceIdentifiersResponse{}, runtime.NewResponseError(resp) - } - return client.listInstanceIdentifiersHandleResponse(resp) - }, - }) -} - -// listInstanceIdentifiersCreateRequest creates the ListInstanceIdentifiers request. -func (client *WebAppsClient) listInstanceIdentifiersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListInstanceIdentifiersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listInstanceIdentifiersHandleResponse handles the ListInstanceIdentifiers response. -func (client *WebAppsClient) listInstanceIdentifiersHandleResponse(resp *http.Response) (WebAppsClientListInstanceIdentifiersResponse, error) { - result := WebAppsClientListInstanceIdentifiersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppInstanceStatusCollection); err != nil { - return WebAppsClientListInstanceIdentifiersResponse{}, err - } - return result, nil -} - -// NewListInstanceIdentifiersSlotPager - Gets all scale-out instances of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. -// options - WebAppsClientListInstanceIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceIdentifiersSlot -// method. -func (client *WebAppsClient) NewListInstanceIdentifiersSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceIdentifiersSlotOptions) *runtime.Pager[WebAppsClientListInstanceIdentifiersSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceIdentifiersSlotResponse]{ - More: func(page WebAppsClientListInstanceIdentifiersSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceIdentifiersSlotResponse) (WebAppsClientListInstanceIdentifiersSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceIdentifiersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceIdentifiersSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListInstanceIdentifiersSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceIdentifiersSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listInstanceIdentifiersSlotHandleResponse(resp) - }, - }) -} - -// listInstanceIdentifiersSlotCreateRequest creates the ListInstanceIdentifiersSlot request. -func (client *WebAppsClient) listInstanceIdentifiersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListInstanceIdentifiersSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listInstanceIdentifiersSlotHandleResponse handles the ListInstanceIdentifiersSlot response. -func (client *WebAppsClient) listInstanceIdentifiersSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceIdentifiersSlotResponse, error) { - result := WebAppsClientListInstanceIdentifiersSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppInstanceStatusCollection); err != nil { - return WebAppsClientListInstanceIdentifiersSlotResponse{}, err - } - return result, nil -} - -// NewListInstanceProcessModulesPager - List module information for a process by its ID for a specific scaled-out instance -// in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// 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". -// options - WebAppsClientListInstanceProcessModulesOptions contains the optional parameters for the WebAppsClient.ListInstanceProcessModules -// method. -func (client *WebAppsClient) NewListInstanceProcessModulesPager(resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientListInstanceProcessModulesOptions) *runtime.Pager[WebAppsClientListInstanceProcessModulesResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessModulesResponse]{ - More: func(page WebAppsClientListInstanceProcessModulesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessModulesResponse) (WebAppsClientListInstanceProcessModulesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessModulesCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceProcessModulesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListInstanceProcessModulesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessModulesResponse{}, runtime.NewResponseError(resp) - } - return client.listInstanceProcessModulesHandleResponse(resp) - }, - }) -} - -// listInstanceProcessModulesCreateRequest creates the ListInstanceProcessModules request. -func (client *WebAppsClient) listInstanceProcessModulesCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientListInstanceProcessModulesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listInstanceProcessModulesHandleResponse handles the ListInstanceProcessModules response. -func (client *WebAppsClient) listInstanceProcessModulesHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessModulesResponse, error) { - result := WebAppsClientListInstanceProcessModulesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfoCollection); err != nil { - return WebAppsClientListInstanceProcessModulesResponse{}, err - } - return result, nil -} - -// NewListInstanceProcessModulesSlotPager - List module information for a process by its ID for a specific scaled-out instance -// in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// 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. -// 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". -// options - WebAppsClientListInstanceProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceProcessModulesSlot -// method. -func (client *WebAppsClient) NewListInstanceProcessModulesSlotPager(resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientListInstanceProcessModulesSlotOptions) *runtime.Pager[WebAppsClientListInstanceProcessModulesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessModulesSlotResponse]{ - More: func(page WebAppsClientListInstanceProcessModulesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessModulesSlotResponse) (WebAppsClientListInstanceProcessModulesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessModulesSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceProcessModulesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListInstanceProcessModulesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessModulesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listInstanceProcessModulesSlotHandleResponse(resp) - }, - }) -} - -// listInstanceProcessModulesSlotCreateRequest creates the ListInstanceProcessModulesSlot request. -func (client *WebAppsClient) listInstanceProcessModulesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientListInstanceProcessModulesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listInstanceProcessModulesSlotHandleResponse handles the ListInstanceProcessModulesSlot response. -func (client *WebAppsClient) listInstanceProcessModulesSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessModulesSlotResponse, error) { - result := WebAppsClientListInstanceProcessModulesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfoCollection); err != nil { - return WebAppsClientListInstanceProcessModulesSlotResponse{}, err - } - return result, nil -} - -// NewListInstanceProcessThreadsPager - List the threads in a process by its ID for a specific scaled-out instance in a web -// site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// 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". -// options - WebAppsClientListInstanceProcessThreadsOptions contains the optional parameters for the WebAppsClient.ListInstanceProcessThreads -// method. -func (client *WebAppsClient) NewListInstanceProcessThreadsPager(resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientListInstanceProcessThreadsOptions) *runtime.Pager[WebAppsClientListInstanceProcessThreadsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessThreadsResponse]{ - More: func(page WebAppsClientListInstanceProcessThreadsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessThreadsResponse) (WebAppsClientListInstanceProcessThreadsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessThreadsCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceProcessThreadsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListInstanceProcessThreadsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessThreadsResponse{}, runtime.NewResponseError(resp) - } - return client.listInstanceProcessThreadsHandleResponse(resp) - }, - }) -} - -// listInstanceProcessThreadsCreateRequest creates the ListInstanceProcessThreads request. -func (client *WebAppsClient) listInstanceProcessThreadsCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientListInstanceProcessThreadsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listInstanceProcessThreadsHandleResponse handles the ListInstanceProcessThreads response. -func (client *WebAppsClient) listInstanceProcessThreadsHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessThreadsResponse, error) { - result := WebAppsClientListInstanceProcessThreadsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessThreadInfoCollection); err != nil { - return WebAppsClientListInstanceProcessThreadsResponse{}, err - } - return result, nil -} - -// NewListInstanceProcessThreadsSlotPager - List the threads in a process by its ID for a specific scaled-out instance in -// a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// 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. -// 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". -// options - WebAppsClientListInstanceProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceProcessThreadsSlot -// method. -func (client *WebAppsClient) NewListInstanceProcessThreadsSlotPager(resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientListInstanceProcessThreadsSlotOptions) *runtime.Pager[WebAppsClientListInstanceProcessThreadsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessThreadsSlotResponse]{ - More: func(page WebAppsClientListInstanceProcessThreadsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessThreadsSlotResponse) (WebAppsClientListInstanceProcessThreadsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessThreadsSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceProcessThreadsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListInstanceProcessThreadsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessThreadsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listInstanceProcessThreadsSlotHandleResponse(resp) - }, - }) -} - -// listInstanceProcessThreadsSlotCreateRequest creates the ListInstanceProcessThreadsSlot request. -func (client *WebAppsClient) listInstanceProcessThreadsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientListInstanceProcessThreadsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listInstanceProcessThreadsSlotHandleResponse handles the ListInstanceProcessThreadsSlot response. -func (client *WebAppsClient) listInstanceProcessThreadsSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessThreadsSlotResponse, error) { - result := WebAppsClientListInstanceProcessThreadsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessThreadInfoCollection); err != nil { - return WebAppsClientListInstanceProcessThreadsSlotResponse{}, err - } - return result, nil -} - -// NewListInstanceProcessesPager - Get list of processes for a web site, or a deployment slot, or for a specific scaled-out -// instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET -// api/sites/{siteName}/instances". -// options - WebAppsClientListInstanceProcessesOptions contains the optional parameters for the WebAppsClient.ListInstanceProcesses -// method. -func (client *WebAppsClient) NewListInstanceProcessesPager(resourceGroupName string, name string, instanceID string, options *WebAppsClientListInstanceProcessesOptions) *runtime.Pager[WebAppsClientListInstanceProcessesResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessesResponse]{ - More: func(page WebAppsClientListInstanceProcessesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessesResponse) (WebAppsClientListInstanceProcessesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessesCreateRequest(ctx, resourceGroupName, name, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceProcessesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListInstanceProcessesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessesResponse{}, runtime.NewResponseError(resp) - } - return client.listInstanceProcessesHandleResponse(resp) - }, - }) -} - -// listInstanceProcessesCreateRequest creates the ListInstanceProcesses request. -func (client *WebAppsClient) listInstanceProcessesCreateRequest(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientListInstanceProcessesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listInstanceProcessesHandleResponse handles the ListInstanceProcesses response. -func (client *WebAppsClient) listInstanceProcessesHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessesResponse, error) { - result := WebAppsClientListInstanceProcessesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfoCollection); err != nil { - return WebAppsClientListInstanceProcessesResponse{}, err - } - return result, nil -} - -// NewListInstanceProcessesSlotPager - Get list of processes for a web site, or a deployment slot, or for a specific scaled-out -// instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// 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". -// options - WebAppsClientListInstanceProcessesSlotOptions contains the optional parameters for the WebAppsClient.ListInstanceProcessesSlot -// method. -func (client *WebAppsClient) NewListInstanceProcessesSlotPager(resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientListInstanceProcessesSlotOptions) *runtime.Pager[WebAppsClientListInstanceProcessesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListInstanceProcessesSlotResponse]{ - More: func(page WebAppsClientListInstanceProcessesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessesSlotResponse) (WebAppsClientListInstanceProcessesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessesSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceProcessesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListInstanceProcessesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listInstanceProcessesSlotHandleResponse(resp) - }, - }) -} - -// listInstanceProcessesSlotCreateRequest creates the ListInstanceProcessesSlot request. -func (client *WebAppsClient) listInstanceProcessesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientListInstanceProcessesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if instanceID == "" { - return nil, errors.New("parameter instanceID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listInstanceProcessesSlotHandleResponse handles the ListInstanceProcessesSlot response. -func (client *WebAppsClient) listInstanceProcessesSlotHandleResponse(resp *http.Response) (WebAppsClientListInstanceProcessesSlotResponse, error) { - result := WebAppsClientListInstanceProcessesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfoCollection); err != nil { - return WebAppsClientListInstanceProcessesSlotResponse{}, err - } - return result, nil -} - -// ListMetadata - Gets the metadata of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListMetadataOptions contains the optional parameters for the WebAppsClient.ListMetadata method. -func (client *WebAppsClient) ListMetadata(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListMetadataOptions) (WebAppsClientListMetadataResponse, error) { - req, err := client.listMetadataCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListMetadataResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListMetadataResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListMetadataResponse{}, runtime.NewResponseError(resp) - } - return client.listMetadataHandleResponse(resp) -} - -// listMetadataCreateRequest creates the ListMetadata request. -func (client *WebAppsClient) listMetadataCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListMetadataOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listMetadataHandleResponse handles the ListMetadata response. -func (client *WebAppsClient) listMetadataHandleResponse(resp *http.Response) (WebAppsClientListMetadataResponse, error) { - result := WebAppsClientListMetadataResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return WebAppsClientListMetadataResponse{}, err - } - return result, nil -} - -// ListMetadataSlot - Gets the metadata of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. -// options - WebAppsClientListMetadataSlotOptions contains the optional parameters for the WebAppsClient.ListMetadataSlot -// method. -func (client *WebAppsClient) ListMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListMetadataSlotOptions) (WebAppsClientListMetadataSlotResponse, error) { - req, err := client.listMetadataSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListMetadataSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListMetadataSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListMetadataSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listMetadataSlotHandleResponse(resp) -} - -// listMetadataSlotCreateRequest creates the ListMetadataSlot request. -func (client *WebAppsClient) listMetadataSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListMetadataSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listMetadataSlotHandleResponse handles the ListMetadataSlot response. -func (client *WebAppsClient) listMetadataSlotHandleResponse(resp *http.Response) (WebAppsClientListMetadataSlotResponse, error) { - result := WebAppsClientListMetadataSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return WebAppsClientListMetadataSlotResponse{}, err - } - return result, nil -} - -// ListNetworkFeatures - Gets all network features used by the app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// view - The type of view. Only "summary" is supported at this time. -// options - WebAppsClientListNetworkFeaturesOptions contains the optional parameters for the WebAppsClient.ListNetworkFeatures -// method. -func (client *WebAppsClient) ListNetworkFeatures(ctx context.Context, resourceGroupName string, name string, view string, options *WebAppsClientListNetworkFeaturesOptions) (WebAppsClientListNetworkFeaturesResponse, error) { - req, err := client.listNetworkFeaturesCreateRequest(ctx, resourceGroupName, name, view, options) - if err != nil { - return WebAppsClientListNetworkFeaturesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListNetworkFeaturesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListNetworkFeaturesResponse{}, runtime.NewResponseError(resp) - } - return client.listNetworkFeaturesHandleResponse(resp) -} - -// listNetworkFeaturesCreateRequest creates the ListNetworkFeatures request. -func (client *WebAppsClient) listNetworkFeaturesCreateRequest(ctx context.Context, resourceGroupName string, name string, view string, options *WebAppsClientListNetworkFeaturesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if view == "" { - return nil, errors.New("parameter view cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{view}", url.PathEscape(view)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listNetworkFeaturesHandleResponse handles the ListNetworkFeatures response. -func (client *WebAppsClient) listNetworkFeaturesHandleResponse(resp *http.Response) (WebAppsClientListNetworkFeaturesResponse, error) { - result := WebAppsClientListNetworkFeaturesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkFeatures); err != nil { - return WebAppsClientListNetworkFeaturesResponse{}, err - } - return result, nil -} - -// ListNetworkFeaturesSlot - Gets all network features used by the app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// view - The type of view. Only "summary" is supported at this time. -// slot - Name of the deployment slot. If a slot is not specified, the API will get network features for the production slot. -// options - WebAppsClientListNetworkFeaturesSlotOptions contains the optional parameters for the WebAppsClient.ListNetworkFeaturesSlot -// method. -func (client *WebAppsClient) ListNetworkFeaturesSlot(ctx context.Context, resourceGroupName string, name string, view string, slot string, options *WebAppsClientListNetworkFeaturesSlotOptions) (WebAppsClientListNetworkFeaturesSlotResponse, error) { - req, err := client.listNetworkFeaturesSlotCreateRequest(ctx, resourceGroupName, name, view, slot, options) - if err != nil { - return WebAppsClientListNetworkFeaturesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListNetworkFeaturesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListNetworkFeaturesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listNetworkFeaturesSlotHandleResponse(resp) -} - -// listNetworkFeaturesSlotCreateRequest creates the ListNetworkFeaturesSlot request. -func (client *WebAppsClient) listNetworkFeaturesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, view string, slot string, options *WebAppsClientListNetworkFeaturesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if view == "" { - return nil, errors.New("parameter view cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{view}", url.PathEscape(view)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listNetworkFeaturesSlotHandleResponse handles the ListNetworkFeaturesSlot response. -func (client *WebAppsClient) listNetworkFeaturesSlotHandleResponse(resp *http.Response) (WebAppsClientListNetworkFeaturesSlotResponse, error) { - result := WebAppsClientListNetworkFeaturesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkFeatures); err != nil { - return WebAppsClientListNetworkFeaturesSlotResponse{}, err - } - return result, nil -} - -// NewListPerfMonCountersPager - Gets perfmon counters for web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientListPerfMonCountersOptions contains the optional parameters for the WebAppsClient.ListPerfMonCounters -// method. -func (client *WebAppsClient) NewListPerfMonCountersPager(resourceGroupName string, name string, options *WebAppsClientListPerfMonCountersOptions) *runtime.Pager[WebAppsClientListPerfMonCountersResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListPerfMonCountersResponse]{ - More: func(page WebAppsClientListPerfMonCountersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListPerfMonCountersResponse) (WebAppsClientListPerfMonCountersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPerfMonCountersCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListPerfMonCountersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListPerfMonCountersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPerfMonCountersResponse{}, runtime.NewResponseError(resp) - } - return client.listPerfMonCountersHandleResponse(resp) - }, - }) -} - -// listPerfMonCountersCreateRequest creates the ListPerfMonCounters request. -func (client *WebAppsClient) listPerfMonCountersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListPerfMonCountersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listPerfMonCountersHandleResponse handles the ListPerfMonCounters response. -func (client *WebAppsClient) listPerfMonCountersHandleResponse(resp *http.Response) (WebAppsClientListPerfMonCountersResponse, error) { - result := WebAppsClientListPerfMonCountersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PerfMonCounterCollection); err != nil { - return WebAppsClientListPerfMonCountersResponse{}, err - } - return result, nil -} - -// NewListPerfMonCountersSlotPager - Gets perfmon counters for web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - WebAppsClientListPerfMonCountersSlotOptions contains the optional parameters for the WebAppsClient.ListPerfMonCountersSlot -// method. -func (client *WebAppsClient) NewListPerfMonCountersSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListPerfMonCountersSlotOptions) *runtime.Pager[WebAppsClientListPerfMonCountersSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListPerfMonCountersSlotResponse]{ - More: func(page WebAppsClientListPerfMonCountersSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListPerfMonCountersSlotResponse) (WebAppsClientListPerfMonCountersSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPerfMonCountersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListPerfMonCountersSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListPerfMonCountersSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPerfMonCountersSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listPerfMonCountersSlotHandleResponse(resp) - }, - }) -} - -// listPerfMonCountersSlotCreateRequest creates the ListPerfMonCountersSlot request. -func (client *WebAppsClient) listPerfMonCountersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListPerfMonCountersSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listPerfMonCountersSlotHandleResponse handles the ListPerfMonCountersSlot response. -func (client *WebAppsClient) listPerfMonCountersSlotHandleResponse(resp *http.Response) (WebAppsClientListPerfMonCountersSlotResponse, error) { - result := WebAppsClientListPerfMonCountersSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PerfMonCounterCollection); err != nil { - return WebAppsClientListPerfMonCountersSlotResponse{}, err - } - return result, nil -} - -// ListPremierAddOns - Gets the premier add-ons of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListPremierAddOnsOptions contains the optional parameters for the WebAppsClient.ListPremierAddOns -// method. -func (client *WebAppsClient) ListPremierAddOns(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListPremierAddOnsOptions) (WebAppsClientListPremierAddOnsResponse, error) { - req, err := client.listPremierAddOnsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListPremierAddOnsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListPremierAddOnsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPremierAddOnsResponse{}, runtime.NewResponseError(resp) - } - return client.listPremierAddOnsHandleResponse(resp) -} - -// listPremierAddOnsCreateRequest creates the ListPremierAddOns request. -func (client *WebAppsClient) listPremierAddOnsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListPremierAddOnsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listPremierAddOnsHandleResponse handles the ListPremierAddOns response. -func (client *WebAppsClient) listPremierAddOnsHandleResponse(resp *http.Response) (WebAppsClientListPremierAddOnsResponse, error) { - result := WebAppsClientListPremierAddOnsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { - return WebAppsClientListPremierAddOnsResponse{}, err - } - return result, nil -} - -// ListPremierAddOnsSlot - Gets the premier add-ons of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production -// slot. -// options - WebAppsClientListPremierAddOnsSlotOptions contains the optional parameters for the WebAppsClient.ListPremierAddOnsSlot -// method. -func (client *WebAppsClient) ListPremierAddOnsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListPremierAddOnsSlotOptions) (WebAppsClientListPremierAddOnsSlotResponse, error) { - req, err := client.listPremierAddOnsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListPremierAddOnsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListPremierAddOnsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPremierAddOnsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listPremierAddOnsSlotHandleResponse(resp) -} - -// listPremierAddOnsSlotCreateRequest creates the ListPremierAddOnsSlot request. -func (client *WebAppsClient) listPremierAddOnsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListPremierAddOnsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listPremierAddOnsSlotHandleResponse handles the ListPremierAddOnsSlot response. -func (client *WebAppsClient) listPremierAddOnsSlotHandleResponse(resp *http.Response) (WebAppsClientListPremierAddOnsSlotResponse, error) { - result := WebAppsClientListPremierAddOnsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { - return WebAppsClientListPremierAddOnsSlotResponse{}, err - } - return result, nil -} - -// NewListProcessModulesPager - List module information for a process by its ID for a specific scaled-out instance in a web -// site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// options - WebAppsClientListProcessModulesOptions contains the optional parameters for the WebAppsClient.ListProcessModules -// method. -func (client *WebAppsClient) NewListProcessModulesPager(resourceGroupName string, name string, processID string, options *WebAppsClientListProcessModulesOptions) *runtime.Pager[WebAppsClientListProcessModulesResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessModulesResponse]{ - More: func(page WebAppsClientListProcessModulesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListProcessModulesResponse) (WebAppsClientListProcessModulesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessModulesCreateRequest(ctx, resourceGroupName, name, processID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListProcessModulesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListProcessModulesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessModulesResponse{}, runtime.NewResponseError(resp) - } - return client.listProcessModulesHandleResponse(resp) - }, - }) -} - -// listProcessModulesCreateRequest creates the ListProcessModules request. -func (client *WebAppsClient) listProcessModulesCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientListProcessModulesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listProcessModulesHandleResponse handles the ListProcessModules response. -func (client *WebAppsClient) listProcessModulesHandleResponse(resp *http.Response) (WebAppsClientListProcessModulesResponse, error) { - result := WebAppsClientListProcessModulesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfoCollection); err != nil { - return WebAppsClientListProcessModulesResponse{}, err - } - return result, nil -} - -// NewListProcessModulesSlotPager - List module information for a process by its ID for a specific scaled-out instance in -// a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// options - WebAppsClientListProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.ListProcessModulesSlot -// method. -func (client *WebAppsClient) NewListProcessModulesSlotPager(resourceGroupName string, name string, processID string, slot string, options *WebAppsClientListProcessModulesSlotOptions) *runtime.Pager[WebAppsClientListProcessModulesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessModulesSlotResponse]{ - More: func(page WebAppsClientListProcessModulesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListProcessModulesSlotResponse) (WebAppsClientListProcessModulesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessModulesSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListProcessModulesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListProcessModulesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessModulesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listProcessModulesSlotHandleResponse(resp) - }, - }) -} - -// listProcessModulesSlotCreateRequest creates the ListProcessModulesSlot request. -func (client *WebAppsClient) listProcessModulesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientListProcessModulesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listProcessModulesSlotHandleResponse handles the ListProcessModulesSlot response. -func (client *WebAppsClient) listProcessModulesSlotHandleResponse(resp *http.Response) (WebAppsClientListProcessModulesSlotResponse, error) { - result := WebAppsClientListProcessModulesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessModuleInfoCollection); err != nil { - return WebAppsClientListProcessModulesSlotResponse{}, err - } - return result, nil -} - -// NewListProcessThreadsPager - List the threads in a process by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// options - WebAppsClientListProcessThreadsOptions contains the optional parameters for the WebAppsClient.ListProcessThreads -// method. -func (client *WebAppsClient) NewListProcessThreadsPager(resourceGroupName string, name string, processID string, options *WebAppsClientListProcessThreadsOptions) *runtime.Pager[WebAppsClientListProcessThreadsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessThreadsResponse]{ - More: func(page WebAppsClientListProcessThreadsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListProcessThreadsResponse) (WebAppsClientListProcessThreadsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessThreadsCreateRequest(ctx, resourceGroupName, name, processID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListProcessThreadsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListProcessThreadsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessThreadsResponse{}, runtime.NewResponseError(resp) - } - return client.listProcessThreadsHandleResponse(resp) - }, - }) -} - -// listProcessThreadsCreateRequest creates the ListProcessThreads request. -func (client *WebAppsClient) listProcessThreadsCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientListProcessThreadsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listProcessThreadsHandleResponse handles the ListProcessThreads response. -func (client *WebAppsClient) listProcessThreadsHandleResponse(resp *http.Response) (WebAppsClientListProcessThreadsResponse, error) { - result := WebAppsClientListProcessThreadsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessThreadInfoCollection); err != nil { - return WebAppsClientListProcessThreadsResponse{}, err - } - return result, nil -} - -// NewListProcessThreadsSlotPager - List the threads in a process by its ID for a specific scaled-out instance in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// processID - PID. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// options - WebAppsClientListProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.ListProcessThreadsSlot -// method. -func (client *WebAppsClient) NewListProcessThreadsSlotPager(resourceGroupName string, name string, processID string, slot string, options *WebAppsClientListProcessThreadsSlotOptions) *runtime.Pager[WebAppsClientListProcessThreadsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessThreadsSlotResponse]{ - More: func(page WebAppsClientListProcessThreadsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListProcessThreadsSlotResponse) (WebAppsClientListProcessThreadsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessThreadsSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListProcessThreadsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListProcessThreadsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessThreadsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listProcessThreadsSlotHandleResponse(resp) - }, - }) -} - -// listProcessThreadsSlotCreateRequest creates the ListProcessThreadsSlot request. -func (client *WebAppsClient) listProcessThreadsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientListProcessThreadsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if processID == "" { - return nil, errors.New("parameter processID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{processId}", url.PathEscape(processID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listProcessThreadsSlotHandleResponse handles the ListProcessThreadsSlot response. -func (client *WebAppsClient) listProcessThreadsSlotHandleResponse(resp *http.Response) (WebAppsClientListProcessThreadsSlotResponse, error) { - result := WebAppsClientListProcessThreadsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessThreadInfoCollection); err != nil { - return WebAppsClientListProcessThreadsSlotResponse{}, err - } - return result, nil -} - -// NewListProcessesPager - Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance -// in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// options - WebAppsClientListProcessesOptions contains the optional parameters for the WebAppsClient.ListProcesses method. -func (client *WebAppsClient) NewListProcessesPager(resourceGroupName string, name string, options *WebAppsClientListProcessesOptions) *runtime.Pager[WebAppsClientListProcessesResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessesResponse]{ - More: func(page WebAppsClientListProcessesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListProcessesResponse) (WebAppsClientListProcessesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListProcessesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListProcessesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessesResponse{}, runtime.NewResponseError(resp) - } - return client.listProcessesHandleResponse(resp) - }, - }) -} - -// listProcessesCreateRequest creates the ListProcesses request. -func (client *WebAppsClient) listProcessesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListProcessesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listProcessesHandleResponse handles the ListProcesses response. -func (client *WebAppsClient) listProcessesHandleResponse(resp *http.Response) (WebAppsClientListProcessesResponse, error) { - result := WebAppsClientListProcessesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfoCollection); err != nil { - return WebAppsClientListProcessesResponse{}, err - } - return result, nil -} - -// NewListProcessesSlotPager - Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance -// in a web site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. -// options - WebAppsClientListProcessesSlotOptions contains the optional parameters for the WebAppsClient.ListProcessesSlot -// method. -func (client *WebAppsClient) NewListProcessesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListProcessesSlotOptions) *runtime.Pager[WebAppsClientListProcessesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListProcessesSlotResponse]{ - More: func(page WebAppsClientListProcessesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListProcessesSlotResponse) (WebAppsClientListProcessesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListProcessesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListProcessesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listProcessesSlotHandleResponse(resp) - }, - }) -} - -// listProcessesSlotCreateRequest creates the ListProcessesSlot request. -func (client *WebAppsClient) listProcessesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListProcessesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listProcessesSlotHandleResponse handles the ListProcessesSlot response. -func (client *WebAppsClient) listProcessesSlotHandleResponse(resp *http.Response) (WebAppsClientListProcessesSlotResponse, error) { - result := WebAppsClientListProcessesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProcessInfoCollection); err != nil { - return WebAppsClientListProcessesSlotResponse{}, err - } - return result, nil -} - -// NewListPublicCertificatesPager - Get public certificates for an app or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListPublicCertificatesOptions contains the optional parameters for the WebAppsClient.ListPublicCertificates -// method. -func (client *WebAppsClient) NewListPublicCertificatesPager(resourceGroupName string, name string, options *WebAppsClientListPublicCertificatesOptions) *runtime.Pager[WebAppsClientListPublicCertificatesResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListPublicCertificatesResponse]{ - More: func(page WebAppsClientListPublicCertificatesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListPublicCertificatesResponse) (WebAppsClientListPublicCertificatesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPublicCertificatesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListPublicCertificatesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListPublicCertificatesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPublicCertificatesResponse{}, runtime.NewResponseError(resp) - } - return client.listPublicCertificatesHandleResponse(resp) - }, - }) -} - -// listPublicCertificatesCreateRequest creates the ListPublicCertificates request. -func (client *WebAppsClient) listPublicCertificatesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListPublicCertificatesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listPublicCertificatesHandleResponse handles the ListPublicCertificates response. -func (client *WebAppsClient) listPublicCertificatesHandleResponse(resp *http.Response) (WebAppsClientListPublicCertificatesResponse, error) { - result := WebAppsClientListPublicCertificatesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificateCollection); err != nil { - return WebAppsClientListPublicCertificatesResponse{}, err - } - return result, nil -} - -// NewListPublicCertificatesSlotPager - Get public certificates for an app or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. -// options - WebAppsClientListPublicCertificatesSlotOptions contains the optional parameters for the WebAppsClient.ListPublicCertificatesSlot -// method. -func (client *WebAppsClient) NewListPublicCertificatesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListPublicCertificatesSlotOptions) *runtime.Pager[WebAppsClientListPublicCertificatesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListPublicCertificatesSlotResponse]{ - More: func(page WebAppsClientListPublicCertificatesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListPublicCertificatesSlotResponse) (WebAppsClientListPublicCertificatesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPublicCertificatesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListPublicCertificatesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListPublicCertificatesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPublicCertificatesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listPublicCertificatesSlotHandleResponse(resp) - }, - }) -} - -// listPublicCertificatesSlotCreateRequest creates the ListPublicCertificatesSlot request. -func (client *WebAppsClient) listPublicCertificatesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListPublicCertificatesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listPublicCertificatesSlotHandleResponse handles the ListPublicCertificatesSlot response. -func (client *WebAppsClient) listPublicCertificatesSlotHandleResponse(resp *http.Response) (WebAppsClientListPublicCertificatesSlotResponse, error) { - result := WebAppsClientListPublicCertificatesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicCertificateCollection); err != nil { - return WebAppsClientListPublicCertificatesSlotResponse{}, err - } - return result, nil -} - -// BeginListPublishingCredentials - Gets the Git/FTP publishing credentials of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientBeginListPublishingCredentialsOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentials -// method. -func (client *WebAppsClient) BeginListPublishingCredentials(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginListPublishingCredentialsOptions) (*runtime.Poller[WebAppsClientListPublishingCredentialsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listPublishingCredentials(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientListPublishingCredentialsResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientListPublishingCredentialsResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListPublishingCredentials - Gets the Git/FTP publishing credentials of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) listPublishingCredentials(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginListPublishingCredentialsOptions) (*http.Response, error) { - req, err := client.listPublishingCredentialsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listPublishingCredentialsCreateRequest creates the ListPublishingCredentials request. -func (client *WebAppsClient) listPublishingCredentialsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginListPublishingCredentialsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginListPublishingCredentialsSlot - Gets the Git/FTP publishing credentials of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production -// slot. -// options - WebAppsClientBeginListPublishingCredentialsSlotOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentialsSlot -// method. -func (client *WebAppsClient) BeginListPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginListPublishingCredentialsSlotOptions) (*runtime.Poller[WebAppsClientListPublishingCredentialsSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listPublishingCredentialsSlot(ctx, resourceGroupName, name, slot, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientListPublishingCredentialsSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientListPublishingCredentialsSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListPublishingCredentialsSlot - Gets the Git/FTP publishing credentials of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) listPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginListPublishingCredentialsSlotOptions) (*http.Response, error) { - req, err := client.listPublishingCredentialsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listPublishingCredentialsSlotCreateRequest creates the ListPublishingCredentialsSlot request. -func (client *WebAppsClient) listPublishingCredentialsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginListPublishingCredentialsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// ListPublishingProfileXMLWithSecrets - Gets the publishing profile for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// publishingProfileOptions - Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} -// to get a FileZilla publishing profile. -// options - WebAppsClientListPublishingProfileXMLWithSecretsOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecrets -// method. -func (client *WebAppsClient) ListPublishingProfileXMLWithSecrets(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, options *WebAppsClientListPublishingProfileXMLWithSecretsOptions) (WebAppsClientListPublishingProfileXMLWithSecretsResponse, error) { - req, err := client.listPublishingProfileXMLWithSecretsCreateRequest(ctx, resourceGroupName, name, publishingProfileOptions, options) - if err != nil { - return WebAppsClientListPublishingProfileXMLWithSecretsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListPublishingProfileXMLWithSecretsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPublishingProfileXMLWithSecretsResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientListPublishingProfileXMLWithSecretsResponse{Body: resp.Body}, nil -} - -// listPublishingProfileXMLWithSecretsCreateRequest creates the ListPublishingProfileXMLWithSecrets request. -func (client *WebAppsClient) listPublishingProfileXMLWithSecretsCreateRequest(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, options *WebAppsClientListPublishingProfileXMLWithSecretsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - runtime.SkipBodyDownload(req) - req.Raw().Header["Accept"] = []string{"application/xml"} - return req, runtime.MarshalAsJSON(req, publishingProfileOptions) -} - -// ListPublishingProfileXMLWithSecretsSlot - Gets the publishing profile for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production -// slot. -// publishingProfileOptions - Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} -// to get a FileZilla publishing profile. -// options - WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecretsSlot -// method. -func (client *WebAppsClient) ListPublishingProfileXMLWithSecretsSlot(ctx context.Context, resourceGroupName string, name string, slot string, publishingProfileOptions CsmPublishingProfileOptions, options *WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions) (WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse, error) { - req, err := client.listPublishingProfileXMLWithSecretsSlotCreateRequest(ctx, resourceGroupName, name, slot, publishingProfileOptions, options) - if err != nil { - return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{Body: resp.Body}, nil -} - -// listPublishingProfileXMLWithSecretsSlotCreateRequest creates the ListPublishingProfileXMLWithSecretsSlot request. -func (client *WebAppsClient) listPublishingProfileXMLWithSecretsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, publishingProfileOptions CsmPublishingProfileOptions, options *WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - runtime.SkipBodyDownload(req) - req.Raw().Header["Accept"] = []string{"application/xml"} - return req, runtime.MarshalAsJSON(req, publishingProfileOptions) -} - -// ListRelayServiceConnections - Gets hybrid connections configured for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListRelayServiceConnectionsOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnections -// method. -func (client *WebAppsClient) ListRelayServiceConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListRelayServiceConnectionsOptions) (WebAppsClientListRelayServiceConnectionsResponse, error) { - req, err := client.listRelayServiceConnectionsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListRelayServiceConnectionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListRelayServiceConnectionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListRelayServiceConnectionsResponse{}, runtime.NewResponseError(resp) - } - return client.listRelayServiceConnectionsHandleResponse(resp) -} - -// listRelayServiceConnectionsCreateRequest creates the ListRelayServiceConnections request. -func (client *WebAppsClient) listRelayServiceConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListRelayServiceConnectionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listRelayServiceConnectionsHandleResponse handles the ListRelayServiceConnections response. -func (client *WebAppsClient) listRelayServiceConnectionsHandleResponse(resp *http.Response) (WebAppsClientListRelayServiceConnectionsResponse, error) { - result := WebAppsClientListRelayServiceConnectionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { - return WebAppsClientListRelayServiceConnectionsResponse{}, err - } - return result, nil -} - -// ListRelayServiceConnectionsSlot - Gets hybrid connections configured for an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production -// slot. -// options - WebAppsClientListRelayServiceConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnectionsSlot -// method. -func (client *WebAppsClient) ListRelayServiceConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListRelayServiceConnectionsSlotOptions) (WebAppsClientListRelayServiceConnectionsSlotResponse, error) { - req, err := client.listRelayServiceConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListRelayServiceConnectionsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListRelayServiceConnectionsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListRelayServiceConnectionsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listRelayServiceConnectionsSlotHandleResponse(resp) -} - -// listRelayServiceConnectionsSlotCreateRequest creates the ListRelayServiceConnectionsSlot request. -func (client *WebAppsClient) listRelayServiceConnectionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListRelayServiceConnectionsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listRelayServiceConnectionsSlotHandleResponse handles the ListRelayServiceConnectionsSlot response. -func (client *WebAppsClient) listRelayServiceConnectionsSlotHandleResponse(resp *http.Response) (WebAppsClientListRelayServiceConnectionsSlotResponse, error) { - result := WebAppsClientListRelayServiceConnectionsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { - return WebAppsClientListRelayServiceConnectionsSlotResponse{}, err - } - return result, nil -} - -// NewListSiteBackupsPager - Gets existing backups of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListSiteBackupsOptions contains the optional parameters for the WebAppsClient.ListSiteBackups method. -func (client *WebAppsClient) NewListSiteBackupsPager(resourceGroupName string, name string, options *WebAppsClientListSiteBackupsOptions) *runtime.Pager[WebAppsClientListSiteBackupsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteBackupsResponse]{ - More: func(page WebAppsClientListSiteBackupsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSiteBackupsResponse) (WebAppsClientListSiteBackupsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteBackupsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSiteBackupsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSiteBackupsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSiteBackupsResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteBackupsHandleResponse(resp) - }, - }) -} - -// listSiteBackupsCreateRequest creates the ListSiteBackups request. -func (client *WebAppsClient) listSiteBackupsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSiteBackupsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteBackupsHandleResponse handles the ListSiteBackups response. -func (client *WebAppsClient) listSiteBackupsHandleResponse(resp *http.Response) (WebAppsClientListSiteBackupsResponse, error) { - result := WebAppsClientListSiteBackupsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupItemCollection); err != nil { - return WebAppsClientListSiteBackupsResponse{}, err - } - return result, nil -} - -// NewListSiteBackupsSlotPager - Gets existing backups of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. -// options - WebAppsClientListSiteBackupsSlotOptions contains the optional parameters for the WebAppsClient.ListSiteBackupsSlot -// method. -func (client *WebAppsClient) NewListSiteBackupsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSiteBackupsSlotOptions) *runtime.Pager[WebAppsClientListSiteBackupsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteBackupsSlotResponse]{ - More: func(page WebAppsClientListSiteBackupsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSiteBackupsSlotResponse) (WebAppsClientListSiteBackupsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteBackupsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSiteBackupsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSiteBackupsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSiteBackupsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteBackupsSlotHandleResponse(resp) - }, - }) -} - -// listSiteBackupsSlotCreateRequest creates the ListSiteBackupsSlot request. -func (client *WebAppsClient) listSiteBackupsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSiteBackupsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteBackupsSlotHandleResponse handles the ListSiteBackupsSlot response. -func (client *WebAppsClient) listSiteBackupsSlotHandleResponse(resp *http.Response) (WebAppsClientListSiteBackupsSlotResponse, error) { - result := WebAppsClientListSiteBackupsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupItemCollection); err != nil { - return WebAppsClientListSiteBackupsSlotResponse{}, err - } - return result, nil -} - -// NewListSiteExtensionsPager - Get list of siteextensions for a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// options - WebAppsClientListSiteExtensionsOptions contains the optional parameters for the WebAppsClient.ListSiteExtensions -// method. -func (client *WebAppsClient) NewListSiteExtensionsPager(resourceGroupName string, name string, options *WebAppsClientListSiteExtensionsOptions) *runtime.Pager[WebAppsClientListSiteExtensionsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteExtensionsResponse]{ - More: func(page WebAppsClientListSiteExtensionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSiteExtensionsResponse) (WebAppsClientListSiteExtensionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteExtensionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSiteExtensionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSiteExtensionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSiteExtensionsResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteExtensionsHandleResponse(resp) - }, - }) -} - -// listSiteExtensionsCreateRequest creates the ListSiteExtensions request. -func (client *WebAppsClient) listSiteExtensionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSiteExtensionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteExtensionsHandleResponse handles the ListSiteExtensions response. -func (client *WebAppsClient) listSiteExtensionsHandleResponse(resp *http.Response) (WebAppsClientListSiteExtensionsResponse, error) { - result := WebAppsClientListSiteExtensionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteExtensionInfoCollection); err != nil { - return WebAppsClientListSiteExtensionsResponse{}, err - } - return result, nil -} - -// NewListSiteExtensionsSlotPager - Get list of siteextensions for a web site, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. -// options - WebAppsClientListSiteExtensionsSlotOptions contains the optional parameters for the WebAppsClient.ListSiteExtensionsSlot -// method. -func (client *WebAppsClient) NewListSiteExtensionsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSiteExtensionsSlotOptions) *runtime.Pager[WebAppsClientListSiteExtensionsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSiteExtensionsSlotResponse]{ - More: func(page WebAppsClientListSiteExtensionsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSiteExtensionsSlotResponse) (WebAppsClientListSiteExtensionsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteExtensionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSiteExtensionsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSiteExtensionsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSiteExtensionsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteExtensionsSlotHandleResponse(resp) - }, - }) -} - -// listSiteExtensionsSlotCreateRequest creates the ListSiteExtensionsSlot request. -func (client *WebAppsClient) listSiteExtensionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSiteExtensionsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSiteExtensionsSlotHandleResponse handles the ListSiteExtensionsSlot response. -func (client *WebAppsClient) listSiteExtensionsSlotHandleResponse(resp *http.Response) (WebAppsClientListSiteExtensionsSlotResponse, error) { - result := WebAppsClientListSiteExtensionsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteExtensionInfoCollection); err != nil { - return WebAppsClientListSiteExtensionsSlotResponse{}, err - } - return result, nil -} - -// ListSitePushSettings - Gets the Push settings associated with web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientListSitePushSettingsOptions contains the optional parameters for the WebAppsClient.ListSitePushSettings -// method. -func (client *WebAppsClient) ListSitePushSettings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSitePushSettingsOptions) (WebAppsClientListSitePushSettingsResponse, error) { - req, err := client.listSitePushSettingsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListSitePushSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSitePushSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSitePushSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.listSitePushSettingsHandleResponse(resp) -} - -// listSitePushSettingsCreateRequest creates the ListSitePushSettings request. -func (client *WebAppsClient) listSitePushSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSitePushSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSitePushSettingsHandleResponse handles the ListSitePushSettings response. -func (client *WebAppsClient) listSitePushSettingsHandleResponse(resp *http.Response) (WebAppsClientListSitePushSettingsResponse, error) { - result := WebAppsClientListSitePushSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PushSettings); err != nil { - return WebAppsClientListSitePushSettingsResponse{}, err - } - return result, nil -} - -// ListSitePushSettingsSlot - Gets the Push settings associated with web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - WebAppsClientListSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListSitePushSettingsSlot -// method. -func (client *WebAppsClient) ListSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSitePushSettingsSlotOptions) (WebAppsClientListSitePushSettingsSlotResponse, error) { - req, err := client.listSitePushSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListSitePushSettingsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSitePushSettingsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSitePushSettingsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSitePushSettingsSlotHandleResponse(resp) -} - -// listSitePushSettingsSlotCreateRequest creates the ListSitePushSettingsSlot request. -func (client *WebAppsClient) listSitePushSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSitePushSettingsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSitePushSettingsSlotHandleResponse handles the ListSitePushSettingsSlot response. -func (client *WebAppsClient) listSitePushSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientListSitePushSettingsSlotResponse, error) { - result := WebAppsClientListSitePushSettingsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PushSettings); err != nil { - return WebAppsClientListSitePushSettingsSlotResponse{}, err - } - return result, nil -} - -// ListSlotConfigurationNames - Gets the names of app settings and connection strings that stick to the slot (not swapped). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.ListSlotConfigurationNames -// method. -func (client *WebAppsClient) ListSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSlotConfigurationNamesOptions) (WebAppsClientListSlotConfigurationNamesResponse, error) { - req, err := client.listSlotConfigurationNamesCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListSlotConfigurationNamesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSlotConfigurationNamesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSlotConfigurationNamesResponse{}, runtime.NewResponseError(resp) - } - return client.listSlotConfigurationNamesHandleResponse(resp) -} - -// listSlotConfigurationNamesCreateRequest creates the ListSlotConfigurationNames request. -func (client *WebAppsClient) listSlotConfigurationNamesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSlotConfigurationNamesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSlotConfigurationNamesHandleResponse handles the ListSlotConfigurationNames response. -func (client *WebAppsClient) listSlotConfigurationNamesHandleResponse(resp *http.Response) (WebAppsClientListSlotConfigurationNamesResponse, error) { - result := WebAppsClientListSlotConfigurationNamesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SlotConfigNamesResource); err != nil { - return WebAppsClientListSlotConfigurationNamesResponse{}, err - } - return result, nil -} - -// NewListSlotDifferencesFromProductionPager - Get the difference in configuration settings between two web app slots. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slotSwapEntity - JSON object that contains the target slot name. See example. -// options - WebAppsClientListSlotDifferencesFromProductionOptions contains the optional parameters for the WebAppsClient.ListSlotDifferencesFromProduction -// method. -func (client *WebAppsClient) NewListSlotDifferencesFromProductionPager(resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientListSlotDifferencesFromProductionOptions) *runtime.Pager[WebAppsClientListSlotDifferencesFromProductionResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSlotDifferencesFromProductionResponse]{ - More: func(page WebAppsClientListSlotDifferencesFromProductionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSlotDifferencesFromProductionResponse) (WebAppsClientListSlotDifferencesFromProductionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSlotDifferencesFromProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSlotDifferencesFromProductionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSlotDifferencesFromProductionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSlotDifferencesFromProductionResponse{}, runtime.NewResponseError(resp) - } - return client.listSlotDifferencesFromProductionHandleResponse(resp) - }, - }) -} - -// listSlotDifferencesFromProductionCreateRequest creates the ListSlotDifferencesFromProduction request. -func (client *WebAppsClient) listSlotDifferencesFromProductionCreateRequest(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientListSlotDifferencesFromProductionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) -} - -// listSlotDifferencesFromProductionHandleResponse handles the ListSlotDifferencesFromProduction response. -func (client *WebAppsClient) listSlotDifferencesFromProductionHandleResponse(resp *http.Response) (WebAppsClientListSlotDifferencesFromProductionResponse, error) { - result := WebAppsClientListSlotDifferencesFromProductionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SlotDifferenceCollection); err != nil { - return WebAppsClientListSlotDifferencesFromProductionResponse{}, err - } - return result, nil -} - -// NewListSlotDifferencesSlotPager - Get the difference in configuration settings between two web app slots. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. -// slotSwapEntity - JSON object that contains the target slot name. See example. -// options - WebAppsClientListSlotDifferencesSlotOptions contains the optional parameters for the WebAppsClient.ListSlotDifferencesSlot -// method. -func (client *WebAppsClient) NewListSlotDifferencesSlotPager(resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientListSlotDifferencesSlotOptions) *runtime.Pager[WebAppsClientListSlotDifferencesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSlotDifferencesSlotResponse]{ - More: func(page WebAppsClientListSlotDifferencesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSlotDifferencesSlotResponse) (WebAppsClientListSlotDifferencesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSlotDifferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSlotDifferencesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSlotDifferencesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSlotDifferencesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSlotDifferencesSlotHandleResponse(resp) - }, - }) -} - -// listSlotDifferencesSlotCreateRequest creates the ListSlotDifferencesSlot request. -func (client *WebAppsClient) listSlotDifferencesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientListSlotDifferencesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) -} - -// listSlotDifferencesSlotHandleResponse handles the ListSlotDifferencesSlot response. -func (client *WebAppsClient) listSlotDifferencesSlotHandleResponse(resp *http.Response) (WebAppsClientListSlotDifferencesSlotResponse, error) { - result := WebAppsClientListSlotDifferencesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SlotDifferenceCollection); err != nil { - return WebAppsClientListSlotDifferencesSlotResponse{}, err - } - return result, nil -} - -// NewListSlotsPager - Gets an app's deployment slots. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListSlotsOptions contains the optional parameters for the WebAppsClient.ListSlots method. -func (client *WebAppsClient) NewListSlotsPager(resourceGroupName string, name string, options *WebAppsClientListSlotsOptions) *runtime.Pager[WebAppsClientListSlotsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSlotsResponse]{ - More: func(page WebAppsClientListSlotsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSlotsResponse) (WebAppsClientListSlotsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSlotsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSlotsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSlotsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSlotsResponse{}, runtime.NewResponseError(resp) - } - return client.listSlotsHandleResponse(resp) - }, - }) -} - -// listSlotsCreateRequest creates the ListSlots request. -func (client *WebAppsClient) listSlotsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSlotsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSlotsHandleResponse handles the ListSlots response. -func (client *WebAppsClient) listSlotsHandleResponse(resp *http.Response) (WebAppsClientListSlotsResponse, error) { - result := WebAppsClientListSlotsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebAppCollection); err != nil { - return WebAppsClientListSlotsResponse{}, err - } - return result, nil -} - -// NewListSnapshotsPager - Returns all Snapshots to the user. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Website Name. -// options - WebAppsClientListSnapshotsOptions contains the optional parameters for the WebAppsClient.ListSnapshots method. -func (client *WebAppsClient) NewListSnapshotsPager(resourceGroupName string, name string, options *WebAppsClientListSnapshotsOptions) *runtime.Pager[WebAppsClientListSnapshotsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSnapshotsResponse]{ - More: func(page WebAppsClientListSnapshotsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsResponse) (WebAppsClientListSnapshotsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSnapshotsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSnapshotsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSnapshotsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSnapshotsResponse{}, runtime.NewResponseError(resp) - } - return client.listSnapshotsHandleResponse(resp) - }, - }) -} - -// listSnapshotsCreateRequest creates the ListSnapshots request. -func (client *WebAppsClient) listSnapshotsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSnapshotsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSnapshotsHandleResponse handles the ListSnapshots response. -func (client *WebAppsClient) listSnapshotsHandleResponse(resp *http.Response) (WebAppsClientListSnapshotsResponse, error) { - result := WebAppsClientListSnapshotsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotCollection); err != nil { - return WebAppsClientListSnapshotsResponse{}, err - } - return result, nil -} - -// NewListSnapshotsFromDRSecondaryPager - Returns all Snapshots to the user from DRSecondary endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Website Name. -// options - WebAppsClientListSnapshotsFromDRSecondaryOptions contains the optional parameters for the WebAppsClient.ListSnapshotsFromDRSecondary -// method. -func (client *WebAppsClient) NewListSnapshotsFromDRSecondaryPager(resourceGroupName string, name string, options *WebAppsClientListSnapshotsFromDRSecondaryOptions) *runtime.Pager[WebAppsClientListSnapshotsFromDRSecondaryResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSnapshotsFromDRSecondaryResponse]{ - More: func(page WebAppsClientListSnapshotsFromDRSecondaryResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsFromDRSecondaryResponse) (WebAppsClientListSnapshotsFromDRSecondaryResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSnapshotsFromDRSecondaryCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSnapshotsFromDRSecondaryResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSnapshotsFromDRSecondaryResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSnapshotsFromDRSecondaryResponse{}, runtime.NewResponseError(resp) - } - return client.listSnapshotsFromDRSecondaryHandleResponse(resp) - }, - }) -} - -// listSnapshotsFromDRSecondaryCreateRequest creates the ListSnapshotsFromDRSecondary request. -func (client *WebAppsClient) listSnapshotsFromDRSecondaryCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSnapshotsFromDRSecondaryOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSnapshotsFromDRSecondaryHandleResponse handles the ListSnapshotsFromDRSecondary response. -func (client *WebAppsClient) listSnapshotsFromDRSecondaryHandleResponse(resp *http.Response) (WebAppsClientListSnapshotsFromDRSecondaryResponse, error) { - result := WebAppsClientListSnapshotsFromDRSecondaryResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotCollection); err != nil { - return WebAppsClientListSnapshotsFromDRSecondaryResponse{}, err - } - return result, nil -} - -// NewListSnapshotsFromDRSecondarySlotPager - Returns all Snapshots to the user from DRSecondary endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Website Name. -// slot - Website Slot. -// options - WebAppsClientListSnapshotsFromDRSecondarySlotOptions contains the optional parameters for the WebAppsClient.ListSnapshotsFromDRSecondarySlot -// method. -func (client *WebAppsClient) NewListSnapshotsFromDRSecondarySlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSnapshotsFromDRSecondarySlotOptions) *runtime.Pager[WebAppsClientListSnapshotsFromDRSecondarySlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSnapshotsFromDRSecondarySlotResponse]{ - More: func(page WebAppsClientListSnapshotsFromDRSecondarySlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsFromDRSecondarySlotResponse) (WebAppsClientListSnapshotsFromDRSecondarySlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSnapshotsFromDRSecondarySlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSnapshotsFromDRSecondarySlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSnapshotsFromDRSecondarySlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSnapshotsFromDRSecondarySlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSnapshotsFromDRSecondarySlotHandleResponse(resp) - }, - }) -} - -// listSnapshotsFromDRSecondarySlotCreateRequest creates the ListSnapshotsFromDRSecondarySlot request. -func (client *WebAppsClient) listSnapshotsFromDRSecondarySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSnapshotsFromDRSecondarySlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSnapshotsFromDRSecondarySlotHandleResponse handles the ListSnapshotsFromDRSecondarySlot response. -func (client *WebAppsClient) listSnapshotsFromDRSecondarySlotHandleResponse(resp *http.Response) (WebAppsClientListSnapshotsFromDRSecondarySlotResponse, error) { - result := WebAppsClientListSnapshotsFromDRSecondarySlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotCollection); err != nil { - return WebAppsClientListSnapshotsFromDRSecondarySlotResponse{}, err - } - return result, nil -} - -// NewListSnapshotsSlotPager - Returns all Snapshots to the user. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Website Name. -// slot - Website Slot. -// options - WebAppsClientListSnapshotsSlotOptions contains the optional parameters for the WebAppsClient.ListSnapshotsSlot -// method. -func (client *WebAppsClient) NewListSnapshotsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListSnapshotsSlotOptions) *runtime.Pager[WebAppsClientListSnapshotsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListSnapshotsSlotResponse]{ - More: func(page WebAppsClientListSnapshotsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsSlotResponse) (WebAppsClientListSnapshotsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSnapshotsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSnapshotsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSnapshotsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSnapshotsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSnapshotsSlotHandleResponse(resp) - }, - }) -} - -// listSnapshotsSlotCreateRequest creates the ListSnapshotsSlot request. -func (client *WebAppsClient) listSnapshotsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSnapshotsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSnapshotsSlotHandleResponse handles the ListSnapshotsSlot response. -func (client *WebAppsClient) listSnapshotsSlotHandleResponse(resp *http.Response) (WebAppsClientListSnapshotsSlotResponse, error) { - result := WebAppsClientListSnapshotsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotCollection); err != nil { - return WebAppsClientListSnapshotsSlotResponse{}, err - } - return result, nil -} - -// ListSyncFunctionTriggers - This is to allow calling via powershell and ARM template. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggers -// method. -func (client *WebAppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSyncFunctionTriggersOptions) (WebAppsClientListSyncFunctionTriggersResponse, error) { - req, err := client.listSyncFunctionTriggersCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListSyncFunctionTriggersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSyncFunctionTriggersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSyncFunctionTriggersResponse{}, runtime.NewResponseError(resp) - } - return client.listSyncFunctionTriggersHandleResponse(resp) -} - -// listSyncFunctionTriggersCreateRequest creates the ListSyncFunctionTriggers request. -func (client *WebAppsClient) listSyncFunctionTriggersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSyncFunctionTriggersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSyncFunctionTriggersHandleResponse handles the ListSyncFunctionTriggers response. -func (client *WebAppsClient) listSyncFunctionTriggersHandleResponse(resp *http.Response) (WebAppsClientListSyncFunctionTriggersResponse, error) { - result := WebAppsClientListSyncFunctionTriggersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FunctionSecrets); err != nil { - return WebAppsClientListSyncFunctionTriggersResponse{}, err - } - return result, nil -} - -// ListSyncFunctionTriggersSlot - This is to allow calling via powershell and ARM template. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. -// options - WebAppsClientListSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggersSlot -// method. -func (client *WebAppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSyncFunctionTriggersSlotOptions) (WebAppsClientListSyncFunctionTriggersSlotResponse, error) { - req, err := client.listSyncFunctionTriggersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListSyncFunctionTriggersSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSyncFunctionTriggersSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSyncFunctionTriggersSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listSyncFunctionTriggersSlotHandleResponse(resp) -} - -// listSyncFunctionTriggersSlotCreateRequest creates the ListSyncFunctionTriggersSlot request. -func (client *WebAppsClient) listSyncFunctionTriggersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSyncFunctionTriggersSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSyncFunctionTriggersSlotHandleResponse handles the ListSyncFunctionTriggersSlot response. -func (client *WebAppsClient) listSyncFunctionTriggersSlotHandleResponse(resp *http.Response) (WebAppsClientListSyncFunctionTriggersSlotResponse, error) { - result := WebAppsClientListSyncFunctionTriggersSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FunctionSecrets); err != nil { - return WebAppsClientListSyncFunctionTriggersSlotResponse{}, err - } - return result, nil -} - -// ListSyncStatus - This is to allow calling via powershell and ARM template. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListSyncStatusOptions contains the optional parameters for the WebAppsClient.ListSyncStatus method. -func (client *WebAppsClient) ListSyncStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSyncStatusOptions) (WebAppsClientListSyncStatusResponse, error) { - req, err := client.listSyncStatusCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListSyncStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSyncStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientListSyncStatusResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientListSyncStatusResponse{}, nil -} - -// listSyncStatusCreateRequest creates the ListSyncStatus request. -func (client *WebAppsClient) listSyncStatusCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSyncStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// ListSyncStatusSlot - This is to allow calling via powershell and ARM template. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. -// options - WebAppsClientListSyncStatusSlotOptions contains the optional parameters for the WebAppsClient.ListSyncStatusSlot -// method. -func (client *WebAppsClient) ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSyncStatusSlotOptions) (WebAppsClientListSyncStatusSlotResponse, error) { - req, err := client.listSyncStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListSyncStatusSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListSyncStatusSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientListSyncStatusSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientListSyncStatusSlotResponse{}, nil -} - -// listSyncStatusSlotCreateRequest creates the ListSyncStatusSlot request. -func (client *WebAppsClient) listSyncStatusSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSyncStatusSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// NewListTriggeredWebJobHistoryPager - List a triggered web job's history for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// options - WebAppsClientListTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.ListTriggeredWebJobHistory -// method. -func (client *WebAppsClient) NewListTriggeredWebJobHistoryPager(resourceGroupName string, name string, webJobName string, options *WebAppsClientListTriggeredWebJobHistoryOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobHistoryResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListTriggeredWebJobHistoryResponse]{ - More: func(page WebAppsClientListTriggeredWebJobHistoryResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobHistoryResponse) (WebAppsClientListTriggeredWebJobHistoryResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listTriggeredWebJobHistoryCreateRequest(ctx, resourceGroupName, name, webJobName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListTriggeredWebJobHistoryResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListTriggeredWebJobHistoryResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListTriggeredWebJobHistoryResponse{}, runtime.NewResponseError(resp) - } - return client.listTriggeredWebJobHistoryHandleResponse(resp) - }, - }) -} - -// listTriggeredWebJobHistoryCreateRequest creates the ListTriggeredWebJobHistory request. -func (client *WebAppsClient) listTriggeredWebJobHistoryCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientListTriggeredWebJobHistoryOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listTriggeredWebJobHistoryHandleResponse handles the ListTriggeredWebJobHistory response. -func (client *WebAppsClient) listTriggeredWebJobHistoryHandleResponse(resp *http.Response) (WebAppsClientListTriggeredWebJobHistoryResponse, error) { - result := WebAppsClientListTriggeredWebJobHistoryResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredJobHistoryCollection); err != nil { - return WebAppsClientListTriggeredWebJobHistoryResponse{}, err - } - return result, nil -} - -// NewListTriggeredWebJobHistorySlotPager - List a triggered web job's history for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. -// options - WebAppsClientListTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.ListTriggeredWebJobHistorySlot -// method. -func (client *WebAppsClient) NewListTriggeredWebJobHistorySlotPager(resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientListTriggeredWebJobHistorySlotOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobHistorySlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListTriggeredWebJobHistorySlotResponse]{ - More: func(page WebAppsClientListTriggeredWebJobHistorySlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobHistorySlotResponse) (WebAppsClientListTriggeredWebJobHistorySlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listTriggeredWebJobHistorySlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListTriggeredWebJobHistorySlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListTriggeredWebJobHistorySlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListTriggeredWebJobHistorySlotResponse{}, runtime.NewResponseError(resp) - } - return client.listTriggeredWebJobHistorySlotHandleResponse(resp) - }, - }) -} - -// listTriggeredWebJobHistorySlotCreateRequest creates the ListTriggeredWebJobHistorySlot request. -func (client *WebAppsClient) listTriggeredWebJobHistorySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientListTriggeredWebJobHistorySlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listTriggeredWebJobHistorySlotHandleResponse handles the ListTriggeredWebJobHistorySlot response. -func (client *WebAppsClient) listTriggeredWebJobHistorySlotHandleResponse(resp *http.Response) (WebAppsClientListTriggeredWebJobHistorySlotResponse, error) { - result := WebAppsClientListTriggeredWebJobHistorySlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredJobHistoryCollection); err != nil { - return WebAppsClientListTriggeredWebJobHistorySlotResponse{}, err - } - return result, nil -} - -// NewListTriggeredWebJobsPager - List triggered web jobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// options - WebAppsClientListTriggeredWebJobsOptions contains the optional parameters for the WebAppsClient.ListTriggeredWebJobs -// method. -func (client *WebAppsClient) NewListTriggeredWebJobsPager(resourceGroupName string, name string, options *WebAppsClientListTriggeredWebJobsOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListTriggeredWebJobsResponse]{ - More: func(page WebAppsClientListTriggeredWebJobsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobsResponse) (WebAppsClientListTriggeredWebJobsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listTriggeredWebJobsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListTriggeredWebJobsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListTriggeredWebJobsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListTriggeredWebJobsResponse{}, runtime.NewResponseError(resp) - } - return client.listTriggeredWebJobsHandleResponse(resp) - }, - }) -} - -// listTriggeredWebJobsCreateRequest creates the ListTriggeredWebJobs request. -func (client *WebAppsClient) listTriggeredWebJobsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListTriggeredWebJobsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listTriggeredWebJobsHandleResponse handles the ListTriggeredWebJobs response. -func (client *WebAppsClient) listTriggeredWebJobsHandleResponse(resp *http.Response) (WebAppsClientListTriggeredWebJobsResponse, error) { - result := WebAppsClientListTriggeredWebJobsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredWebJobCollection); err != nil { - return WebAppsClientListTriggeredWebJobsResponse{}, err - } - return result, nil -} - -// NewListTriggeredWebJobsSlotPager - List triggered web jobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. -// options - WebAppsClientListTriggeredWebJobsSlotOptions contains the optional parameters for the WebAppsClient.ListTriggeredWebJobsSlot -// method. -func (client *WebAppsClient) NewListTriggeredWebJobsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListTriggeredWebJobsSlotOptions) *runtime.Pager[WebAppsClientListTriggeredWebJobsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListTriggeredWebJobsSlotResponse]{ - More: func(page WebAppsClientListTriggeredWebJobsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobsSlotResponse) (WebAppsClientListTriggeredWebJobsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listTriggeredWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListTriggeredWebJobsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListTriggeredWebJobsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListTriggeredWebJobsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listTriggeredWebJobsSlotHandleResponse(resp) - }, - }) -} - -// listTriggeredWebJobsSlotCreateRequest creates the ListTriggeredWebJobsSlot request. -func (client *WebAppsClient) listTriggeredWebJobsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListTriggeredWebJobsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listTriggeredWebJobsSlotHandleResponse handles the ListTriggeredWebJobsSlot response. -func (client *WebAppsClient) listTriggeredWebJobsSlotHandleResponse(resp *http.Response) (WebAppsClientListTriggeredWebJobsSlotResponse, error) { - result := WebAppsClientListTriggeredWebJobsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TriggeredWebJobCollection); err != nil { - return WebAppsClientListTriggeredWebJobsSlotResponse{}, err - } - return result, nil -} - -// NewListUsagesPager - Gets the quota usage information of an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListUsagesOptions contains the optional parameters for the WebAppsClient.ListUsages method. -func (client *WebAppsClient) NewListUsagesPager(resourceGroupName string, name string, options *WebAppsClientListUsagesOptions) *runtime.Pager[WebAppsClientListUsagesResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListUsagesResponse]{ - More: func(page WebAppsClientListUsagesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListUsagesResponse) (WebAppsClientListUsagesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListUsagesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListUsagesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListUsagesResponse{}, runtime.NewResponseError(resp) - } - return client.listUsagesHandleResponse(resp) - }, - }) -} - -// listUsagesCreateRequest creates the ListUsages request. -func (client *WebAppsClient) listUsagesCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListUsagesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listUsagesHandleResponse handles the ListUsages response. -func (client *WebAppsClient) listUsagesHandleResponse(resp *http.Response) (WebAppsClientListUsagesResponse, error) { - result := WebAppsClientListUsagesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { - return WebAppsClientListUsagesResponse{}, err - } - return result, nil -} - -// NewListUsagesSlotPager - Gets the quota usage information of an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. -// options - WebAppsClientListUsagesSlotOptions contains the optional parameters for the WebAppsClient.ListUsagesSlot method. -func (client *WebAppsClient) NewListUsagesSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListUsagesSlotOptions) *runtime.Pager[WebAppsClientListUsagesSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListUsagesSlotResponse]{ - More: func(page WebAppsClientListUsagesSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListUsagesSlotResponse) (WebAppsClientListUsagesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listUsagesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListUsagesSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListUsagesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListUsagesSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listUsagesSlotHandleResponse(resp) - }, - }) -} - -// listUsagesSlotCreateRequest creates the ListUsagesSlot request. -func (client *WebAppsClient) listUsagesSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListUsagesSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - unencodedParams := []string{req.Raw().URL.RawQuery} - if options != nil && options.Filter != nil { - unencodedParams = append(unencodedParams, "$filter="+*options.Filter) - } - req.Raw().URL.RawQuery = strings.Join(unencodedParams, "&") - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listUsagesSlotHandleResponse handles the ListUsagesSlot response. -func (client *WebAppsClient) listUsagesSlotHandleResponse(resp *http.Response) (WebAppsClientListUsagesSlotResponse, error) { - result := WebAppsClientListUsagesSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { - return WebAppsClientListUsagesSlotResponse{}, err - } - return result, nil -} - -// ListVnetConnections - Gets the virtual networks the app (or deployment slot) is connected to. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientListVnetConnectionsOptions contains the optional parameters for the WebAppsClient.ListVnetConnections -// method. -func (client *WebAppsClient) ListVnetConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListVnetConnectionsOptions) (WebAppsClientListVnetConnectionsResponse, error) { - req, err := client.listVnetConnectionsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientListVnetConnectionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListVnetConnectionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListVnetConnectionsResponse{}, runtime.NewResponseError(resp) - } - return client.listVnetConnectionsHandleResponse(resp) -} - -// listVnetConnectionsCreateRequest creates the ListVnetConnections request. -func (client *WebAppsClient) listVnetConnectionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListVnetConnectionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listVnetConnectionsHandleResponse handles the ListVnetConnections response. -func (client *WebAppsClient) listVnetConnectionsHandleResponse(resp *http.Response) (WebAppsClientListVnetConnectionsResponse, error) { - result := WebAppsClientListVnetConnectionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResourceArray); err != nil { - return WebAppsClientListVnetConnectionsResponse{}, err - } - return result, nil -} - -// ListVnetConnectionsSlot - Gets the virtual networks the app (or deployment slot) is connected to. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production -// slot. -// options - WebAppsClientListVnetConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListVnetConnectionsSlot -// method. -func (client *WebAppsClient) ListVnetConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListVnetConnectionsSlotOptions) (WebAppsClientListVnetConnectionsSlotResponse, error) { - req, err := client.listVnetConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientListVnetConnectionsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListVnetConnectionsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListVnetConnectionsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listVnetConnectionsSlotHandleResponse(resp) -} - -// listVnetConnectionsSlotCreateRequest creates the ListVnetConnectionsSlot request. -func (client *WebAppsClient) listVnetConnectionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListVnetConnectionsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listVnetConnectionsSlotHandleResponse handles the ListVnetConnectionsSlot response. -func (client *WebAppsClient) listVnetConnectionsSlotHandleResponse(resp *http.Response) (WebAppsClientListVnetConnectionsSlotResponse, error) { - result := WebAppsClientListVnetConnectionsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResourceArray); err != nil { - return WebAppsClientListVnetConnectionsSlotResponse{}, err - } - return result, nil -} - -// NewListWebJobsPager - List webjobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// options - WebAppsClientListWebJobsOptions contains the optional parameters for the WebAppsClient.ListWebJobs method. -func (client *WebAppsClient) NewListWebJobsPager(resourceGroupName string, name string, options *WebAppsClientListWebJobsOptions) *runtime.Pager[WebAppsClientListWebJobsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListWebJobsResponse]{ - More: func(page WebAppsClientListWebJobsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListWebJobsResponse) (WebAppsClientListWebJobsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebJobsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListWebJobsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListWebJobsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListWebJobsResponse{}, runtime.NewResponseError(resp) - } - return client.listWebJobsHandleResponse(resp) - }, - }) -} - -// listWebJobsCreateRequest creates the ListWebJobs request. -func (client *WebAppsClient) listWebJobsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListWebJobsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWebJobsHandleResponse handles the ListWebJobs response. -func (client *WebAppsClient) listWebJobsHandleResponse(resp *http.Response) (WebAppsClientListWebJobsResponse, error) { - result := WebAppsClientListWebJobsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebJobCollection); err != nil { - return WebAppsClientListWebJobsResponse{}, err - } - return result, nil -} - -// NewListWebJobsSlotPager - List webjobs for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// 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. -// options - WebAppsClientListWebJobsSlotOptions contains the optional parameters for the WebAppsClient.ListWebJobsSlot method. -func (client *WebAppsClient) NewListWebJobsSlotPager(resourceGroupName string, name string, slot string, options *WebAppsClientListWebJobsSlotOptions) *runtime.Pager[WebAppsClientListWebJobsSlotResponse] { - return runtime.NewPager(runtime.PagingHandler[WebAppsClientListWebJobsSlotResponse]{ - More: func(page WebAppsClientListWebJobsSlotResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebAppsClientListWebJobsSlotResponse) (WebAppsClientListWebJobsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListWebJobsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientListWebJobsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListWebJobsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.listWebJobsSlotHandleResponse(resp) - }, - }) -} - -// listWebJobsSlotCreateRequest creates the ListWebJobsSlot request. -func (client *WebAppsClient) listWebJobsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListWebJobsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listWebJobsSlotHandleResponse handles the ListWebJobsSlot response. -func (client *WebAppsClient) listWebJobsSlotHandleResponse(resp *http.Response) (WebAppsClientListWebJobsSlotResponse, error) { - result := WebAppsClientListWebJobsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebJobCollection); err != nil { - return WebAppsClientListWebJobsSlotResponse{}, err - } - return result, nil -} - -// BeginMigrateMySQL - Migrates a local (in-app) MySql database to a remote MySql database. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// migrationRequestEnvelope - MySql migration options. -// options - WebAppsClientBeginMigrateMySQLOptions contains the optional parameters for the WebAppsClient.BeginMigrateMySQL -// method. -func (client *WebAppsClient) BeginMigrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest, options *WebAppsClientBeginMigrateMySQLOptions) (*runtime.Poller[WebAppsClientMigrateMySQLResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.migrateMySQL(ctx, resourceGroupName, name, migrationRequestEnvelope, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientMigrateMySQLResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientMigrateMySQLResponse](options.ResumeToken, client.pl, nil) - } -} - -// MigrateMySQL - Migrates a local (in-app) MySql database to a remote MySql database. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) migrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest, options *WebAppsClientBeginMigrateMySQLOptions) (*http.Response, error) { - req, err := client.migrateMySQLCreateRequest(ctx, resourceGroupName, name, migrationRequestEnvelope, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// migrateMySQLCreateRequest creates the MigrateMySQL request. -func (client *WebAppsClient) migrateMySQLCreateRequest(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest, options *WebAppsClientBeginMigrateMySQLOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, migrationRequestEnvelope) -} - -// BeginMigrateStorage - Restores a web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// subscriptionName - Azure subscription. -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// migrationOptions - Migration migrationOptions. -// options - WebAppsClientBeginMigrateStorageOptions contains the optional parameters for the WebAppsClient.BeginMigrateStorage -// method. -func (client *WebAppsClient) BeginMigrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions, options *WebAppsClientBeginMigrateStorageOptions) (*runtime.Poller[WebAppsClientMigrateStorageResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.migrateStorage(ctx, subscriptionName, resourceGroupName, name, migrationOptions, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientMigrateStorageResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientMigrateStorageResponse](options.ResumeToken, client.pl, nil) - } -} - -// MigrateStorage - Restores a web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) migrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions, options *WebAppsClientBeginMigrateStorageOptions) (*http.Response, error) { - req, err := client.migrateStorageCreateRequest(ctx, subscriptionName, resourceGroupName, name, migrationOptions, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// migrateStorageCreateRequest creates the MigrateStorage request. -func (client *WebAppsClient) migrateStorageCreateRequest(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions, options *WebAppsClientBeginMigrateStorageOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("subscriptionName", subscriptionName) - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, migrationOptions) -} - -// PutPrivateAccessVnet - Sets data around private site access enablement and authorized Virtual Networks that can access -// the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// access - The information for the private access -// options - WebAppsClientPutPrivateAccessVnetOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnet -// method. -func (client *WebAppsClient) PutPrivateAccessVnet(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, options *WebAppsClientPutPrivateAccessVnetOptions) (WebAppsClientPutPrivateAccessVnetResponse, error) { - req, err := client.putPrivateAccessVnetCreateRequest(ctx, resourceGroupName, name, access, options) - if err != nil { - return WebAppsClientPutPrivateAccessVnetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientPutPrivateAccessVnetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientPutPrivateAccessVnetResponse{}, runtime.NewResponseError(resp) - } - return client.putPrivateAccessVnetHandleResponse(resp) -} - -// putPrivateAccessVnetCreateRequest creates the PutPrivateAccessVnet request. -func (client *WebAppsClient) putPrivateAccessVnetCreateRequest(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, options *WebAppsClientPutPrivateAccessVnetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, access) -} - -// putPrivateAccessVnetHandleResponse handles the PutPrivateAccessVnet response. -func (client *WebAppsClient) putPrivateAccessVnetHandleResponse(resp *http.Response) (WebAppsClientPutPrivateAccessVnetResponse, error) { - result := WebAppsClientPutPrivateAccessVnetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateAccess); err != nil { - return WebAppsClientPutPrivateAccessVnetResponse{}, err - } - return result, nil -} - -// PutPrivateAccessVnetSlot - Sets data around private site access enablement and authorized Virtual Networks that can access -// the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// slot - The name of the slot for the web app. -// access - The information for the private access -// options - WebAppsClientPutPrivateAccessVnetSlotOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnetSlot -// method. -func (client *WebAppsClient) PutPrivateAccessVnetSlot(ctx context.Context, resourceGroupName string, name string, slot string, access PrivateAccess, options *WebAppsClientPutPrivateAccessVnetSlotOptions) (WebAppsClientPutPrivateAccessVnetSlotResponse, error) { - req, err := client.putPrivateAccessVnetSlotCreateRequest(ctx, resourceGroupName, name, slot, access, options) - if err != nil { - return WebAppsClientPutPrivateAccessVnetSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientPutPrivateAccessVnetSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientPutPrivateAccessVnetSlotResponse{}, runtime.NewResponseError(resp) - } - return client.putPrivateAccessVnetSlotHandleResponse(resp) -} - -// putPrivateAccessVnetSlotCreateRequest creates the PutPrivateAccessVnetSlot request. -func (client *WebAppsClient) putPrivateAccessVnetSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, access PrivateAccess, options *WebAppsClientPutPrivateAccessVnetSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, access) -} - -// putPrivateAccessVnetSlotHandleResponse handles the PutPrivateAccessVnetSlot response. -func (client *WebAppsClient) putPrivateAccessVnetSlotHandleResponse(resp *http.Response) (WebAppsClientPutPrivateAccessVnetSlotResponse, error) { - result := WebAppsClientPutPrivateAccessVnetSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateAccess); err != nil { - return WebAppsClientPutPrivateAccessVnetSlotResponse{}, err - } - return result, nil -} - -// RecoverSiteConfigurationSnapshot - Reverts the configuration of an app to a previous snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// snapshotID - The ID of the snapshot to read. -// options - WebAppsClientRecoverSiteConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshot -// method. -func (client *WebAppsClient) RecoverSiteConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *WebAppsClientRecoverSiteConfigurationSnapshotOptions) (WebAppsClientRecoverSiteConfigurationSnapshotResponse, error) { - req, err := client.recoverSiteConfigurationSnapshotCreateRequest(ctx, resourceGroupName, name, snapshotID, options) - if err != nil { - return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, nil -} - -// recoverSiteConfigurationSnapshotCreateRequest creates the RecoverSiteConfigurationSnapshot request. -func (client *WebAppsClient) recoverSiteConfigurationSnapshotCreateRequest(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *WebAppsClientRecoverSiteConfigurationSnapshotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if snapshotID == "" { - return nil, errors.New("parameter snapshotID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotId}", url.PathEscape(snapshotID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// RecoverSiteConfigurationSnapshotSlot - Reverts the configuration of an app to a previous snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// snapshotID - The ID of the snapshot to read. -// slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. -// options - WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshotSlot -// method. -func (client *WebAppsClient) RecoverSiteConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions) (WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse, error) { - req, err := client.recoverSiteConfigurationSnapshotSlotCreateRequest(ctx, resourceGroupName, name, snapshotID, slot, options) - if err != nil { - return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, nil -} - -// recoverSiteConfigurationSnapshotSlotCreateRequest creates the RecoverSiteConfigurationSnapshotSlot request. -func (client *WebAppsClient) recoverSiteConfigurationSnapshotSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if snapshotID == "" { - return nil, errors.New("parameter snapshotID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotId}", url.PathEscape(snapshotID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// ResetProductionSlotConfig - Resets the configuration settings of the current slot if they were previously modified by calling -// the API with POST. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientResetProductionSlotConfigOptions contains the optional parameters for the WebAppsClient.ResetProductionSlotConfig -// method. -func (client *WebAppsClient) ResetProductionSlotConfig(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientResetProductionSlotConfigOptions) (WebAppsClientResetProductionSlotConfigResponse, error) { - req, err := client.resetProductionSlotConfigCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientResetProductionSlotConfigResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientResetProductionSlotConfigResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientResetProductionSlotConfigResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientResetProductionSlotConfigResponse{}, nil -} - -// resetProductionSlotConfigCreateRequest creates the ResetProductionSlotConfig request. -func (client *WebAppsClient) resetProductionSlotConfigCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientResetProductionSlotConfigOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// ResetSlotConfigurationSlot - Resets the configuration settings of the current slot if they were previously modified by -// calling the API with POST. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production -// slot. -// options - WebAppsClientResetSlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ResetSlotConfigurationSlot -// method. -func (client *WebAppsClient) ResetSlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientResetSlotConfigurationSlotOptions) (WebAppsClientResetSlotConfigurationSlotResponse, error) { - req, err := client.resetSlotConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientResetSlotConfigurationSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientResetSlotConfigurationSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientResetSlotConfigurationSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientResetSlotConfigurationSlotResponse{}, nil -} - -// resetSlotConfigurationSlotCreateRequest creates the ResetSlotConfigurationSlot request. -func (client *WebAppsClient) resetSlotConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientResetSlotConfigurationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Restart - Restarts an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientRestartOptions contains the optional parameters for the WebAppsClient.Restart method. -func (client *WebAppsClient) Restart(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientRestartOptions) (WebAppsClientRestartResponse, error) { - req, err := client.restartCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientRestartResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientRestartResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientRestartResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientRestartResponse{}, nil -} - -// restartCreateRequest creates the Restart request. -func (client *WebAppsClient) restartCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientRestartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.SoftRestart != nil { - reqQP.Set("softRestart", strconv.FormatBool(*options.SoftRestart)) - } - if options != nil && options.Synchronous != nil { - reqQP.Set("synchronous", strconv.FormatBool(*options.Synchronous)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// RestartSlot - Restarts an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will restart the production slot. -// options - WebAppsClientRestartSlotOptions contains the optional parameters for the WebAppsClient.RestartSlot method. -func (client *WebAppsClient) RestartSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientRestartSlotOptions) (WebAppsClientRestartSlotResponse, error) { - req, err := client.restartSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientRestartSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientRestartSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientRestartSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientRestartSlotResponse{}, nil -} - -// restartSlotCreateRequest creates the RestartSlot request. -func (client *WebAppsClient) restartSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientRestartSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.SoftRestart != nil { - reqQP.Set("softRestart", strconv.FormatBool(*options.SoftRestart)) - } - if options != nil && options.Synchronous != nil { - reqQP.Set("synchronous", strconv.FormatBool(*options.Synchronous)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginRestore - Restores a specific backup to another app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// backupID - ID of the backup. -// request - Information on restore request . -// options - WebAppsClientBeginRestoreOptions contains the optional parameters for the WebAppsClient.BeginRestore method. -func (client *WebAppsClient) BeginRestore(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, options *WebAppsClientBeginRestoreOptions) (*runtime.Poller[WebAppsClientRestoreResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restore(ctx, resourceGroupName, name, backupID, request, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientRestoreResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreResponse](options.ResumeToken, client.pl, nil) - } -} - -// Restore - Restores a specific backup to another app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) restore(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, options *WebAppsClientBeginRestoreOptions) (*http.Response, error) { - req, err := client.restoreCreateRequest(ctx, resourceGroupName, name, backupID, request, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restoreCreateRequest creates the Restore request. -func (client *WebAppsClient) restoreCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, options *WebAppsClientBeginRestoreOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if backupID == "" { - return nil, errors.New("parameter backupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// BeginRestoreFromBackupBlob - Restores an app from a backup blob in Azure Storage. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// request - Information on restore request . -// options - WebAppsClientBeginRestoreFromBackupBlobOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlob -// method. -func (client *WebAppsClient) BeginRestoreFromBackupBlob(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobOptions) (*runtime.Poller[WebAppsClientRestoreFromBackupBlobResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restoreFromBackupBlob(ctx, resourceGroupName, name, request, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientRestoreFromBackupBlobResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreFromBackupBlobResponse](options.ResumeToken, client.pl, nil) - } -} - -// RestoreFromBackupBlob - Restores an app from a backup blob in Azure Storage. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) restoreFromBackupBlob(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobOptions) (*http.Response, error) { - req, err := client.restoreFromBackupBlobCreateRequest(ctx, resourceGroupName, name, request, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restoreFromBackupBlobCreateRequest creates the RestoreFromBackupBlob request. -func (client *WebAppsClient) restoreFromBackupBlobCreateRequest(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// BeginRestoreFromBackupBlobSlot - Restores an app from a backup blob in Azure Storage. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. -// request - Information on restore request . -// options - WebAppsClientBeginRestoreFromBackupBlobSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlobSlot -// method. -func (client *WebAppsClient) BeginRestoreFromBackupBlobSlot(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobSlotOptions) (*runtime.Poller[WebAppsClientRestoreFromBackupBlobSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restoreFromBackupBlobSlot(ctx, resourceGroupName, name, slot, request, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientRestoreFromBackupBlobSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreFromBackupBlobSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// RestoreFromBackupBlobSlot - Restores an app from a backup blob in Azure Storage. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) restoreFromBackupBlobSlot(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobSlotOptions) (*http.Response, error) { - req, err := client.restoreFromBackupBlobSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restoreFromBackupBlobSlotCreateRequest creates the RestoreFromBackupBlobSlot request. -func (client *WebAppsClient) restoreFromBackupBlobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// BeginRestoreFromDeletedApp - Restores a deleted web app to this web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// restoreRequest - Deleted web app restore information. -// options - WebAppsClientBeginRestoreFromDeletedAppOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedApp -// method. -func (client *WebAppsClient) BeginRestoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppOptions) (*runtime.Poller[WebAppsClientRestoreFromDeletedAppResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restoreFromDeletedApp(ctx, resourceGroupName, name, restoreRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientRestoreFromDeletedAppResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreFromDeletedAppResponse](options.ResumeToken, client.pl, nil) - } -} - -// RestoreFromDeletedApp - Restores a deleted web app to this web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) restoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppOptions) (*http.Response, error) { - req, err := client.restoreFromDeletedAppCreateRequest(ctx, resourceGroupName, name, restoreRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restoreFromDeletedAppCreateRequest creates the RestoreFromDeletedApp request. -func (client *WebAppsClient) restoreFromDeletedAppCreateRequest(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, restoreRequest) -} - -// BeginRestoreFromDeletedAppSlot - Restores a deleted web app to this web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// restoreRequest - Deleted web app restore information. -// options - WebAppsClientBeginRestoreFromDeletedAppSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedAppSlot -// method. -func (client *WebAppsClient) BeginRestoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppSlotOptions) (*runtime.Poller[WebAppsClientRestoreFromDeletedAppSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restoreFromDeletedAppSlot(ctx, resourceGroupName, name, slot, restoreRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientRestoreFromDeletedAppSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreFromDeletedAppSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// RestoreFromDeletedAppSlot - Restores a deleted web app to this web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) restoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppSlotOptions) (*http.Response, error) { - req, err := client.restoreFromDeletedAppSlotCreateRequest(ctx, resourceGroupName, name, slot, restoreRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restoreFromDeletedAppSlotCreateRequest creates the RestoreFromDeletedAppSlot request. -func (client *WebAppsClient) restoreFromDeletedAppSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, restoreRequest) -} - -// BeginRestoreSlot - Restores a specific backup to another app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// backupID - ID of the backup. -// slot - Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. -// request - Information on restore request . -// options - WebAppsClientBeginRestoreSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSlot -// method. -func (client *WebAppsClient) BeginRestoreSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreSlotOptions) (*runtime.Poller[WebAppsClientRestoreSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restoreSlot(ctx, resourceGroupName, name, backupID, slot, request, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientRestoreSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// RestoreSlot - Restores a specific backup to another app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) restoreSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreSlotOptions) (*http.Response, error) { - req, err := client.restoreSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, request, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restoreSlotCreateRequest creates the RestoreSlot request. -func (client *WebAppsClient) restoreSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if backupID == "" { - return nil, errors.New("parameter backupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupId}", url.PathEscape(backupID)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// BeginRestoreSnapshot - Restores a web app from a snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// restoreRequest - Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots -// API. -// options - WebAppsClientBeginRestoreSnapshotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshot -// method. -func (client *WebAppsClient) BeginRestoreSnapshot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotOptions) (*runtime.Poller[WebAppsClientRestoreSnapshotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restoreSnapshot(ctx, resourceGroupName, name, restoreRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientRestoreSnapshotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreSnapshotResponse](options.ResumeToken, client.pl, nil) - } -} - -// RestoreSnapshot - Restores a web app from a snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) restoreSnapshot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotOptions) (*http.Response, error) { - req, err := client.restoreSnapshotCreateRequest(ctx, resourceGroupName, name, restoreRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restoreSnapshotCreateRequest creates the RestoreSnapshot request. -func (client *WebAppsClient) restoreSnapshotCreateRequest(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, restoreRequest) -} - -// BeginRestoreSnapshotSlot - Restores a web app from a snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// restoreRequest - Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots -// API. -// options - WebAppsClientBeginRestoreSnapshotSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshotSlot -// method. -func (client *WebAppsClient) BeginRestoreSnapshotSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotSlotOptions) (*runtime.Poller[WebAppsClientRestoreSnapshotSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restoreSnapshotSlot(ctx, resourceGroupName, name, slot, restoreRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientRestoreSnapshotSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreSnapshotSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// RestoreSnapshotSlot - Restores a web app from a snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) restoreSnapshotSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotSlotOptions) (*http.Response, error) { - req, err := client.restoreSnapshotSlotCreateRequest(ctx, resourceGroupName, name, slot, restoreRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restoreSnapshotSlotCreateRequest creates the RestoreSnapshotSlot request. -func (client *WebAppsClient) restoreSnapshotSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, restoreRequest) -} - -// RunTriggeredWebJob - Run a triggered web job for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// options - WebAppsClientRunTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJob -// method. -func (client *WebAppsClient) RunTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientRunTriggeredWebJobOptions) (WebAppsClientRunTriggeredWebJobResponse, error) { - req, err := client.runTriggeredWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) - if err != nil { - return WebAppsClientRunTriggeredWebJobResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientRunTriggeredWebJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientRunTriggeredWebJobResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientRunTriggeredWebJobResponse{}, nil -} - -// runTriggeredWebJobCreateRequest creates the RunTriggeredWebJob request. -func (client *WebAppsClient) runTriggeredWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientRunTriggeredWebJobOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// RunTriggeredWebJobSlot - Run a triggered web job for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. -// options - WebAppsClientRunTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJobSlot -// method. -func (client *WebAppsClient) RunTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientRunTriggeredWebJobSlotOptions) (WebAppsClientRunTriggeredWebJobSlotResponse, error) { - req, err := client.runTriggeredWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) - if err != nil { - return WebAppsClientRunTriggeredWebJobSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientRunTriggeredWebJobSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientRunTriggeredWebJobSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientRunTriggeredWebJobSlotResponse{}, nil -} - -// runTriggeredWebJobSlotCreateRequest creates the RunTriggeredWebJobSlot request. -func (client *WebAppsClient) runTriggeredWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientRunTriggeredWebJobSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Start - Starts an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientStartOptions contains the optional parameters for the WebAppsClient.Start method. -func (client *WebAppsClient) Start(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStartOptions) (WebAppsClientStartResponse, error) { - req, err := client.startCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientStartResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStartResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStartResponse{}, nil -} - -// startCreateRequest creates the Start request. -func (client *WebAppsClient) startCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StartContinuousWebJob - Start a continuous web job for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// options - WebAppsClientStartContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJob -// method. -func (client *WebAppsClient) StartContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientStartContinuousWebJobOptions) (WebAppsClientStartContinuousWebJobResponse, error) { - req, err := client.startContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) - if err != nil { - return WebAppsClientStartContinuousWebJobResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStartContinuousWebJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartContinuousWebJobResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStartContinuousWebJobResponse{}, nil -} - -// startContinuousWebJobCreateRequest creates the StartContinuousWebJob request. -func (client *WebAppsClient) startContinuousWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientStartContinuousWebJobOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StartContinuousWebJobSlot - Start a continuous web job for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. -// options - WebAppsClientStartContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJobSlot -// method. -func (client *WebAppsClient) StartContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientStartContinuousWebJobSlotOptions) (WebAppsClientStartContinuousWebJobSlotResponse, error) { - req, err := client.startContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) - if err != nil { - return WebAppsClientStartContinuousWebJobSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStartContinuousWebJobSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartContinuousWebJobSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStartContinuousWebJobSlotResponse{}, nil -} - -// startContinuousWebJobSlotCreateRequest creates the StartContinuousWebJobSlot request. -func (client *WebAppsClient) startContinuousWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientStartContinuousWebJobSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStartNetworkTrace - Start capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// options - WebAppsClientBeginStartNetworkTraceOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTrace -// method. -func (client *WebAppsClient) BeginStartNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartNetworkTraceOptions) (*runtime.Poller[WebAppsClientStartNetworkTraceResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.startNetworkTrace(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientStartNetworkTraceResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientStartNetworkTraceResponse](options.ResumeToken, client.pl, nil) - } -} - -// StartNetworkTrace - Start capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) startNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartNetworkTraceOptions) (*http.Response, error) { - req, err := client.startNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startNetworkTraceCreateRequest creates the StartNetworkTrace request. -func (client *WebAppsClient) startNetworkTraceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartNetworkTraceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.DurationInSeconds != nil { - reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) - } - if options != nil && options.MaxFrameLength != nil { - reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) - } - if options != nil && options.SasURL != nil { - reqQP.Set("sasUrl", *options.SasURL) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStartNetworkTraceSlot - Start capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// slot - The name of the slot for this web app. -// options - WebAppsClientBeginStartNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTraceSlot -// method. -func (client *WebAppsClient) BeginStartNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartNetworkTraceSlotOptions) (*runtime.Poller[WebAppsClientStartNetworkTraceSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.startNetworkTraceSlot(ctx, resourceGroupName, name, slot, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientStartNetworkTraceSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientStartNetworkTraceSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// StartNetworkTraceSlot - Start capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) startNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartNetworkTraceSlotOptions) (*http.Response, error) { - req, err := client.startNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startNetworkTraceSlotCreateRequest creates the StartNetworkTraceSlot request. -func (client *WebAppsClient) startNetworkTraceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartNetworkTraceSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.DurationInSeconds != nil { - reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) - } - if options != nil && options.MaxFrameLength != nil { - reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) - } - if options != nil && options.SasURL != nil { - reqQP.Set("sasUrl", *options.SasURL) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StartSlot - Starts an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will start the production slot. -// options - WebAppsClientStartSlotOptions contains the optional parameters for the WebAppsClient.StartSlot method. -func (client *WebAppsClient) StartSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStartSlotOptions) (WebAppsClientStartSlotResponse, error) { - req, err := client.startSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientStartSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStartSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStartSlotResponse{}, nil -} - -// startSlotCreateRequest creates the StartSlot request. -func (client *WebAppsClient) startSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStartSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StartWebSiteNetworkTrace - Start capturing network packets for the site (To be deprecated). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// options - WebAppsClientStartWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTrace -// method. -func (client *WebAppsClient) StartWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStartWebSiteNetworkTraceOptions) (WebAppsClientStartWebSiteNetworkTraceResponse, error) { - req, err := client.startWebSiteNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientStartWebSiteNetworkTraceResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStartWebSiteNetworkTraceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartWebSiteNetworkTraceResponse{}, runtime.NewResponseError(resp) - } - return client.startWebSiteNetworkTraceHandleResponse(resp) -} - -// startWebSiteNetworkTraceCreateRequest creates the StartWebSiteNetworkTrace request. -func (client *WebAppsClient) startWebSiteNetworkTraceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStartWebSiteNetworkTraceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.DurationInSeconds != nil { - reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) - } - if options != nil && options.MaxFrameLength != nil { - reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) - } - if options != nil && options.SasURL != nil { - reqQP.Set("sasUrl", *options.SasURL) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// startWebSiteNetworkTraceHandleResponse handles the StartWebSiteNetworkTrace response. -func (client *WebAppsClient) startWebSiteNetworkTraceHandleResponse(resp *http.Response) (WebAppsClientStartWebSiteNetworkTraceResponse, error) { - result := WebAppsClientStartWebSiteNetworkTraceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { - return WebAppsClientStartWebSiteNetworkTraceResponse{}, err - } - return result, nil -} - -// BeginStartWebSiteNetworkTraceOperation - Start capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// options - WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperation -// method. -func (client *WebAppsClient) BeginStartWebSiteNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions) (*runtime.Poller[WebAppsClientStartWebSiteNetworkTraceOperationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.startWebSiteNetworkTraceOperation(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientStartWebSiteNetworkTraceOperationResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientStartWebSiteNetworkTraceOperationResponse](options.ResumeToken, client.pl, nil) - } -} - -// StartWebSiteNetworkTraceOperation - Start capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) startWebSiteNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions) (*http.Response, error) { - req, err := client.startWebSiteNetworkTraceOperationCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startWebSiteNetworkTraceOperationCreateRequest creates the StartWebSiteNetworkTraceOperation request. -func (client *WebAppsClient) startWebSiteNetworkTraceOperationCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.DurationInSeconds != nil { - reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) - } - if options != nil && options.MaxFrameLength != nil { - reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) - } - if options != nil && options.SasURL != nil { - reqQP.Set("sasUrl", *options.SasURL) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStartWebSiteNetworkTraceOperationSlot - Start capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// slot - The name of the slot for this web app. -// options - WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot -// method. -func (client *WebAppsClient) BeginStartWebSiteNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions) (*runtime.Poller[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.startWebSiteNetworkTraceOperationSlot(ctx, resourceGroupName, name, slot, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// StartWebSiteNetworkTraceOperationSlot - Start capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions) (*http.Response, error) { - req, err := client.startWebSiteNetworkTraceOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startWebSiteNetworkTraceOperationSlotCreateRequest creates the StartWebSiteNetworkTraceOperationSlot request. -func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.DurationInSeconds != nil { - reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) - } - if options != nil && options.MaxFrameLength != nil { - reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) - } - if options != nil && options.SasURL != nil { - reqQP.Set("sasUrl", *options.SasURL) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StartWebSiteNetworkTraceSlot - Start capturing network packets for the site (To be deprecated). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// slot - The name of the slot for this web app. -// options - WebAppsClientStartWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTraceSlot -// method. -func (client *WebAppsClient) StartWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStartWebSiteNetworkTraceSlotOptions) (WebAppsClientStartWebSiteNetworkTraceSlotResponse, error) { - req, err := client.startWebSiteNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, runtime.NewResponseError(resp) - } - return client.startWebSiteNetworkTraceSlotHandleResponse(resp) -} - -// startWebSiteNetworkTraceSlotCreateRequest creates the StartWebSiteNetworkTraceSlot request. -func (client *WebAppsClient) startWebSiteNetworkTraceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStartWebSiteNetworkTraceSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.DurationInSeconds != nil { - reqQP.Set("durationInSeconds", strconv.FormatInt(int64(*options.DurationInSeconds), 10)) - } - if options != nil && options.MaxFrameLength != nil { - reqQP.Set("maxFrameLength", strconv.FormatInt(int64(*options.MaxFrameLength), 10)) - } - if options != nil && options.SasURL != nil { - reqQP.Set("sasUrl", *options.SasURL) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// startWebSiteNetworkTraceSlotHandleResponse handles the StartWebSiteNetworkTraceSlot response. -func (client *WebAppsClient) startWebSiteNetworkTraceSlotHandleResponse(resp *http.Response) (WebAppsClientStartWebSiteNetworkTraceSlotResponse, error) { - result := WebAppsClientStartWebSiteNetworkTraceSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { - return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, err - } - return result, nil -} - -// Stop - Stops an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientStopOptions contains the optional parameters for the WebAppsClient.Stop method. -func (client *WebAppsClient) Stop(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopOptions) (WebAppsClientStopResponse, error) { - req, err := client.stopCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientStopResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStopResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStopResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStopResponse{}, nil -} - -// stopCreateRequest creates the Stop request. -func (client *WebAppsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StopContinuousWebJob - Stop a continuous web job for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// options - WebAppsClientStopContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJob -// method. -func (client *WebAppsClient) StopContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientStopContinuousWebJobOptions) (WebAppsClientStopContinuousWebJobResponse, error) { - req, err := client.stopContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) - if err != nil { - return WebAppsClientStopContinuousWebJobResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStopContinuousWebJobResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStopContinuousWebJobResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStopContinuousWebJobResponse{}, nil -} - -// stopContinuousWebJobCreateRequest creates the StopContinuousWebJob request. -func (client *WebAppsClient) stopContinuousWebJobCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientStopContinuousWebJobOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StopContinuousWebJobSlot - Stop a continuous web job for an app, or a deployment slot. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Site name. -// webJobName - Name of Web Job. -// slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. -// options - WebAppsClientStopContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJobSlot -// method. -func (client *WebAppsClient) StopContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientStopContinuousWebJobSlotOptions) (WebAppsClientStopContinuousWebJobSlotResponse, error) { - req, err := client.stopContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) - if err != nil { - return WebAppsClientStopContinuousWebJobSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStopContinuousWebJobSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStopContinuousWebJobSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStopContinuousWebJobSlotResponse{}, nil -} - -// stopContinuousWebJobSlotCreateRequest creates the StopContinuousWebJobSlot request. -func (client *WebAppsClient) stopContinuousWebJobSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientStopContinuousWebJobSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if webJobName == "" { - return nil, errors.New("parameter webJobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{webJobName}", url.PathEscape(webJobName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StopNetworkTrace - Stop ongoing capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// options - WebAppsClientStopNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopNetworkTrace -// method. -func (client *WebAppsClient) StopNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopNetworkTraceOptions) (WebAppsClientStopNetworkTraceResponse, error) { - req, err := client.stopNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientStopNetworkTraceResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStopNetworkTraceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientStopNetworkTraceResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStopNetworkTraceResponse{}, nil -} - -// stopNetworkTraceCreateRequest creates the StopNetworkTrace request. -func (client *WebAppsClient) stopNetworkTraceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopNetworkTraceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StopNetworkTraceSlot - Stop ongoing capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// slot - The name of the slot for this web app. -// options - WebAppsClientStopNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopNetworkTraceSlot -// method. -func (client *WebAppsClient) StopNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopNetworkTraceSlotOptions) (WebAppsClientStopNetworkTraceSlotResponse, error) { - req, err := client.stopNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientStopNetworkTraceSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStopNetworkTraceSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientStopNetworkTraceSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStopNetworkTraceSlotResponse{}, nil -} - -// stopNetworkTraceSlotCreateRequest creates the StopNetworkTraceSlot request. -func (client *WebAppsClient) stopNetworkTraceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopNetworkTraceSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StopSlot - Stops an app (or deployment slot, if specified). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will stop the production slot. -// options - WebAppsClientStopSlotOptions contains the optional parameters for the WebAppsClient.StopSlot method. -func (client *WebAppsClient) StopSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopSlotOptions) (WebAppsClientStopSlotResponse, error) { - req, err := client.stopSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientStopSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStopSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStopSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStopSlotResponse{}, nil -} - -// stopSlotCreateRequest creates the StopSlot request. -func (client *WebAppsClient) stopSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StopWebSiteNetworkTrace - Stop ongoing capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// options - WebAppsClientStopWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTrace -// method. -func (client *WebAppsClient) StopWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopWebSiteNetworkTraceOptions) (WebAppsClientStopWebSiteNetworkTraceResponse, error) { - req, err := client.stopWebSiteNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientStopWebSiteNetworkTraceResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStopWebSiteNetworkTraceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientStopWebSiteNetworkTraceResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStopWebSiteNetworkTraceResponse{}, nil -} - -// stopWebSiteNetworkTraceCreateRequest creates the StopWebSiteNetworkTrace request. -func (client *WebAppsClient) stopWebSiteNetworkTraceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopWebSiteNetworkTraceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// StopWebSiteNetworkTraceSlot - Stop ongoing capturing network packets for the site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// slot - The name of the slot for this web app. -// options - WebAppsClientStopWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTraceSlot -// method. -func (client *WebAppsClient) StopWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopWebSiteNetworkTraceSlotOptions) (WebAppsClientStopWebSiteNetworkTraceSlotResponse, error) { - req, err := client.stopWebSiteNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, nil -} - -// stopWebSiteNetworkTraceSlotCreateRequest creates the StopWebSiteNetworkTraceSlot request. -func (client *WebAppsClient) stopWebSiteNetworkTraceSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopWebSiteNetworkTraceSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginSwapSlot - Swaps two deployment slots of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. -// slotSwapEntity - JSON object that contains the target slot name. See example. -// options - WebAppsClientBeginSwapSlotOptions contains the optional parameters for the WebAppsClient.BeginSwapSlot method. -func (client *WebAppsClient) BeginSwapSlot(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotOptions) (*runtime.Poller[WebAppsClientSwapSlotResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.swapSlot(ctx, resourceGroupName, name, slot, slotSwapEntity, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientSwapSlotResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientSwapSlotResponse](options.ResumeToken, client.pl, nil) - } -} - -// SwapSlot - Swaps two deployment slots of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) swapSlot(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotOptions) (*http.Response, error) { - req, err := client.swapSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// swapSlotCreateRequest creates the SwapSlot request. -func (client *WebAppsClient) swapSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) -} - -// BeginSwapSlotWithProduction - Swaps two deployment slots of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slotSwapEntity - JSON object that contains the target slot name. See example. -// options - WebAppsClientBeginSwapSlotWithProductionOptions contains the optional parameters for the WebAppsClient.BeginSwapSlotWithProduction -// method. -func (client *WebAppsClient) BeginSwapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotWithProductionOptions) (*runtime.Poller[WebAppsClientSwapSlotWithProductionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.swapSlotWithProduction(ctx, resourceGroupName, name, slotSwapEntity, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[WebAppsClientSwapSlotWithProductionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[WebAppsClientSwapSlotWithProductionResponse](options.ResumeToken, client.pl, nil) - } -} - -// SwapSlotWithProduction - Swaps two deployment slots of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -func (client *WebAppsClient) swapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotWithProductionOptions) (*http.Response, error) { - req, err := client.swapSlotWithProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// swapSlotWithProductionCreateRequest creates the SwapSlotWithProduction request. -func (client *WebAppsClient) swapSlotWithProductionCreateRequest(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotWithProductionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) -} - -// SyncFunctionTriggers - Syncs function trigger metadata to the management database -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggers -// method. -func (client *WebAppsClient) SyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncFunctionTriggersOptions) (WebAppsClientSyncFunctionTriggersResponse, error) { - req, err := client.syncFunctionTriggersCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientSyncFunctionTriggersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientSyncFunctionTriggersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientSyncFunctionTriggersResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientSyncFunctionTriggersResponse{}, nil -} - -// syncFunctionTriggersCreateRequest creates the SyncFunctionTriggers request. -func (client *WebAppsClient) syncFunctionTriggersCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncFunctionTriggersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// SyncFunctionTriggersSlot - Syncs function trigger metadata to the management database -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. -// options - WebAppsClientSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggersSlot -// method. -func (client *WebAppsClient) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncFunctionTriggersSlotOptions) (WebAppsClientSyncFunctionTriggersSlotResponse, error) { - req, err := client.syncFunctionTriggersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientSyncFunctionTriggersSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientSyncFunctionTriggersSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientSyncFunctionTriggersSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientSyncFunctionTriggersSlotResponse{}, nil -} - -// syncFunctionTriggersSlotCreateRequest creates the SyncFunctionTriggersSlot request. -func (client *WebAppsClient) syncFunctionTriggersSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncFunctionTriggersSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// SyncFunctions - Syncs function trigger metadata to the management database -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientSyncFunctionsOptions contains the optional parameters for the WebAppsClient.SyncFunctions method. -func (client *WebAppsClient) SyncFunctions(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncFunctionsOptions) (WebAppsClientSyncFunctionsResponse, error) { - req, err := client.syncFunctionsCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientSyncFunctionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientSyncFunctionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientSyncFunctionsResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientSyncFunctionsResponse{}, nil -} - -// syncFunctionsCreateRequest creates the SyncFunctions request. -func (client *WebAppsClient) syncFunctionsCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncFunctionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// SyncFunctionsSlot - Syncs function trigger metadata to the management database -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. -// options - WebAppsClientSyncFunctionsSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionsSlot -// method. -func (client *WebAppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncFunctionsSlotOptions) (WebAppsClientSyncFunctionsSlotResponse, error) { - req, err := client.syncFunctionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientSyncFunctionsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientSyncFunctionsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientSyncFunctionsSlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientSyncFunctionsSlotResponse{}, nil -} - -// syncFunctionsSlotCreateRequest creates the SyncFunctionsSlot request. -func (client *WebAppsClient) syncFunctionsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncFunctionsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// SyncRepository - Sync web app repository. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// options - WebAppsClientSyncRepositoryOptions contains the optional parameters for the WebAppsClient.SyncRepository method. -func (client *WebAppsClient) SyncRepository(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncRepositoryOptions) (WebAppsClientSyncRepositoryResponse, error) { - req, err := client.syncRepositoryCreateRequest(ctx, resourceGroupName, name, options) - if err != nil { - return WebAppsClientSyncRepositoryResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientSyncRepositoryResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientSyncRepositoryResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientSyncRepositoryResponse{}, nil -} - -// syncRepositoryCreateRequest creates the SyncRepository request. -func (client *WebAppsClient) syncRepositoryCreateRequest(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncRepositoryOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// SyncRepositorySlot - Sync web app repository. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// options - WebAppsClientSyncRepositorySlotOptions contains the optional parameters for the WebAppsClient.SyncRepositorySlot -// method. -func (client *WebAppsClient) SyncRepositorySlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncRepositorySlotOptions) (WebAppsClientSyncRepositorySlotResponse, error) { - req, err := client.syncRepositorySlotCreateRequest(ctx, resourceGroupName, name, slot, options) - if err != nil { - return WebAppsClientSyncRepositorySlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientSyncRepositorySlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientSyncRepositorySlotResponse{}, runtime.NewResponseError(resp) - } - return WebAppsClientSyncRepositorySlotResponse{}, nil -} - -// syncRepositorySlotCreateRequest creates the SyncRepositorySlot request. -func (client *WebAppsClient) syncRepositorySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncRepositorySlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Update - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. -// siteEnvelope - A JSON representation of the app properties. See example. -// options - WebAppsClientUpdateOptions contains the optional parameters for the WebAppsClient.Update method. -func (client *WebAppsClient) Update(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, options *WebAppsClientUpdateOptions) (WebAppsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, name, siteEnvelope, options) - if err != nil { - return WebAppsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *WebAppsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, options *WebAppsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteEnvelope) -} - -// updateHandleResponse handles the Update response. -func (client *WebAppsClient) updateHandleResponse(resp *http.Response) (WebAppsClientUpdateResponse, error) { - result := WebAppsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Site); err != nil { - return WebAppsClientUpdateResponse{}, err - } - return result, nil -} - -// UpdateApplicationSettings - Replaces the application settings of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// appSettings - Application settings of the app. -// options - WebAppsClientUpdateApplicationSettingsOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettings -// method. -func (client *WebAppsClient) UpdateApplicationSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *WebAppsClientUpdateApplicationSettingsOptions) (WebAppsClientUpdateApplicationSettingsResponse, error) { - req, err := client.updateApplicationSettingsCreateRequest(ctx, resourceGroupName, name, appSettings, options) - if err != nil { - return WebAppsClientUpdateApplicationSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateApplicationSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateApplicationSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.updateApplicationSettingsHandleResponse(resp) -} - -// updateApplicationSettingsCreateRequest creates the UpdateApplicationSettings request. -func (client *WebAppsClient) updateApplicationSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *WebAppsClientUpdateApplicationSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) -} - -// updateApplicationSettingsHandleResponse handles the UpdateApplicationSettings response. -func (client *WebAppsClient) updateApplicationSettingsHandleResponse(resp *http.Response) (WebAppsClientUpdateApplicationSettingsResponse, error) { - result := WebAppsClientUpdateApplicationSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return WebAppsClientUpdateApplicationSettingsResponse{}, err - } - return result, nil -} - -// UpdateApplicationSettingsSlot - Replaces the application settings of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production -// slot. -// appSettings - Application settings of the app. -// options - WebAppsClientUpdateApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettingsSlot -// method. -func (client *WebAppsClient) UpdateApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, appSettings StringDictionary, options *WebAppsClientUpdateApplicationSettingsSlotOptions) (WebAppsClientUpdateApplicationSettingsSlotResponse, error) { - req, err := client.updateApplicationSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, appSettings, options) - if err != nil { - return WebAppsClientUpdateApplicationSettingsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateApplicationSettingsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateApplicationSettingsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateApplicationSettingsSlotHandleResponse(resp) -} - -// updateApplicationSettingsSlotCreateRequest creates the UpdateApplicationSettingsSlot request. -func (client *WebAppsClient) updateApplicationSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, appSettings StringDictionary, options *WebAppsClientUpdateApplicationSettingsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) -} - -// updateApplicationSettingsSlotHandleResponse handles the UpdateApplicationSettingsSlot response. -func (client *WebAppsClient) updateApplicationSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateApplicationSettingsSlotResponse, error) { - result := WebAppsClientUpdateApplicationSettingsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return WebAppsClientUpdateApplicationSettingsSlotResponse{}, err - } - return result, nil -} - -// UpdateAuthSettings - Updates the Authentication / Authorization settings associated with web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// siteAuthSettings - Auth settings associated with web app. -// options - WebAppsClientUpdateAuthSettingsOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettings -// method. -func (client *WebAppsClient) UpdateAuthSettings(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, options *WebAppsClientUpdateAuthSettingsOptions) (WebAppsClientUpdateAuthSettingsResponse, error) { - req, err := client.updateAuthSettingsCreateRequest(ctx, resourceGroupName, name, siteAuthSettings, options) - if err != nil { - return WebAppsClientUpdateAuthSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateAuthSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAuthSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.updateAuthSettingsHandleResponse(resp) -} - -// updateAuthSettingsCreateRequest creates the UpdateAuthSettings request. -func (client *WebAppsClient) updateAuthSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, options *WebAppsClientUpdateAuthSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteAuthSettings) -} - -// updateAuthSettingsHandleResponse handles the UpdateAuthSettings response. -func (client *WebAppsClient) updateAuthSettingsHandleResponse(resp *http.Response) (WebAppsClientUpdateAuthSettingsResponse, error) { - result := WebAppsClientUpdateAuthSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettings); err != nil { - return WebAppsClientUpdateAuthSettingsResponse{}, err - } - return result, nil -} - -// UpdateAuthSettingsSlot - Updates the Authentication / Authorization settings associated with web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// siteAuthSettings - Auth settings associated with web app. -// options - WebAppsClientUpdateAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsSlot -// method. -func (client *WebAppsClient) UpdateAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettings SiteAuthSettings, options *WebAppsClientUpdateAuthSettingsSlotOptions) (WebAppsClientUpdateAuthSettingsSlotResponse, error) { - req, err := client.updateAuthSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, siteAuthSettings, options) - if err != nil { - return WebAppsClientUpdateAuthSettingsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateAuthSettingsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAuthSettingsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateAuthSettingsSlotHandleResponse(resp) -} - -// updateAuthSettingsSlotCreateRequest creates the UpdateAuthSettingsSlot request. -func (client *WebAppsClient) updateAuthSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettings SiteAuthSettings, options *WebAppsClientUpdateAuthSettingsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteAuthSettings) -} - -// updateAuthSettingsSlotHandleResponse handles the UpdateAuthSettingsSlot response. -func (client *WebAppsClient) updateAuthSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateAuthSettingsSlotResponse, error) { - result := WebAppsClientUpdateAuthSettingsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettings); err != nil { - return WebAppsClientUpdateAuthSettingsSlotResponse{}, err - } - return result, nil -} - -// UpdateAuthSettingsV2 - Updates site's Authentication / Authorization settings for apps via the V2 format -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// siteAuthSettingsV2 - Auth settings associated with web app. -// options - WebAppsClientUpdateAuthSettingsV2Options contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2 -// method. -func (client *WebAppsClient) UpdateAuthSettingsV2(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2, options *WebAppsClientUpdateAuthSettingsV2Options) (WebAppsClientUpdateAuthSettingsV2Response, error) { - req, err := client.updateAuthSettingsV2CreateRequest(ctx, resourceGroupName, name, siteAuthSettingsV2, options) - if err != nil { - return WebAppsClientUpdateAuthSettingsV2Response{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateAuthSettingsV2Response{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAuthSettingsV2Response{}, runtime.NewResponseError(resp) - } - return client.updateAuthSettingsV2HandleResponse(resp) -} - -// updateAuthSettingsV2CreateRequest creates the UpdateAuthSettingsV2 request. -func (client *WebAppsClient) updateAuthSettingsV2CreateRequest(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2, options *WebAppsClientUpdateAuthSettingsV2Options) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteAuthSettingsV2) -} - -// updateAuthSettingsV2HandleResponse handles the UpdateAuthSettingsV2 response. -func (client *WebAppsClient) updateAuthSettingsV2HandleResponse(resp *http.Response) (WebAppsClientUpdateAuthSettingsV2Response, error) { - result := WebAppsClientUpdateAuthSettingsV2Response{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { - return WebAppsClientUpdateAuthSettingsV2Response{}, err - } - return result, nil -} - -// UpdateAuthSettingsV2Slot - Updates site's Authentication / Authorization settings for apps via the V2 format -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// siteAuthSettingsV2 - Auth settings associated with web app. -// options - WebAppsClientUpdateAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2Slot -// method. -func (client *WebAppsClient) UpdateAuthSettingsV2Slot(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettingsV2 SiteAuthSettingsV2, options *WebAppsClientUpdateAuthSettingsV2SlotOptions) (WebAppsClientUpdateAuthSettingsV2SlotResponse, error) { - req, err := client.updateAuthSettingsV2SlotCreateRequest(ctx, resourceGroupName, name, slot, siteAuthSettingsV2, options) - if err != nil { - return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateAuthSettingsV2SlotHandleResponse(resp) -} - -// updateAuthSettingsV2SlotCreateRequest creates the UpdateAuthSettingsV2Slot request. -func (client *WebAppsClient) updateAuthSettingsV2SlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettingsV2 SiteAuthSettingsV2, options *WebAppsClientUpdateAuthSettingsV2SlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteAuthSettingsV2) -} - -// updateAuthSettingsV2SlotHandleResponse handles the UpdateAuthSettingsV2Slot response. -func (client *WebAppsClient) updateAuthSettingsV2SlotHandleResponse(resp *http.Response) (WebAppsClientUpdateAuthSettingsV2SlotResponse, error) { - result := WebAppsClientUpdateAuthSettingsV2SlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteAuthSettingsV2); err != nil { - return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, err - } - return result, nil -} - -// UpdateAzureStorageAccounts - Updates the Azure storage account configurations of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// azureStorageAccounts - Azure storage accounts of the app. -// options - WebAppsClientUpdateAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccounts -// method. -func (client *WebAppsClient) UpdateAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, options *WebAppsClientUpdateAzureStorageAccountsOptions) (WebAppsClientUpdateAzureStorageAccountsResponse, error) { - req, err := client.updateAzureStorageAccountsCreateRequest(ctx, resourceGroupName, name, azureStorageAccounts, options) - if err != nil { - return WebAppsClientUpdateAzureStorageAccountsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateAzureStorageAccountsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAzureStorageAccountsResponse{}, runtime.NewResponseError(resp) - } - return client.updateAzureStorageAccountsHandleResponse(resp) -} - -// updateAzureStorageAccountsCreateRequest creates the UpdateAzureStorageAccounts request. -func (client *WebAppsClient) updateAzureStorageAccountsCreateRequest(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, options *WebAppsClientUpdateAzureStorageAccountsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, azureStorageAccounts) -} - -// updateAzureStorageAccountsHandleResponse handles the UpdateAzureStorageAccounts response. -func (client *WebAppsClient) updateAzureStorageAccountsHandleResponse(resp *http.Response) (WebAppsClientUpdateAzureStorageAccountsResponse, error) { - result := WebAppsClientUpdateAzureStorageAccountsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureStoragePropertyDictionaryResource); err != nil { - return WebAppsClientUpdateAzureStorageAccountsResponse{}, err - } - return result, nil -} - -// UpdateAzureStorageAccountsSlot - Updates the Azure storage account configurations of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations -// for the production slot. -// azureStorageAccounts - Azure storage accounts of the app. -// options - WebAppsClientUpdateAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccountsSlot -// method. -func (client *WebAppsClient) UpdateAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string, azureStorageAccounts AzureStoragePropertyDictionaryResource, options *WebAppsClientUpdateAzureStorageAccountsSlotOptions) (WebAppsClientUpdateAzureStorageAccountsSlotResponse, error) { - req, err := client.updateAzureStorageAccountsSlotCreateRequest(ctx, resourceGroupName, name, slot, azureStorageAccounts, options) - if err != nil { - return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateAzureStorageAccountsSlotHandleResponse(resp) -} - -// updateAzureStorageAccountsSlotCreateRequest creates the UpdateAzureStorageAccountsSlot request. -func (client *WebAppsClient) updateAzureStorageAccountsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, azureStorageAccounts AzureStoragePropertyDictionaryResource, options *WebAppsClientUpdateAzureStorageAccountsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, azureStorageAccounts) -} - -// updateAzureStorageAccountsSlotHandleResponse handles the UpdateAzureStorageAccountsSlot response. -func (client *WebAppsClient) updateAzureStorageAccountsSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateAzureStorageAccountsSlotResponse, error) { - result := WebAppsClientUpdateAzureStorageAccountsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureStoragePropertyDictionaryResource); err != nil { - return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, err - } - return result, nil -} - -// UpdateBackupConfiguration - Updates the backup configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// request - Edited backup configuration. -// options - WebAppsClientUpdateBackupConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfiguration -// method. -func (client *WebAppsClient) UpdateBackupConfiguration(ctx context.Context, resourceGroupName string, name string, request BackupRequest, options *WebAppsClientUpdateBackupConfigurationOptions) (WebAppsClientUpdateBackupConfigurationResponse, error) { - req, err := client.updateBackupConfigurationCreateRequest(ctx, resourceGroupName, name, request, options) - if err != nil { - return WebAppsClientUpdateBackupConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateBackupConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateBackupConfigurationResponse{}, runtime.NewResponseError(resp) - } - return client.updateBackupConfigurationHandleResponse(resp) -} - -// updateBackupConfigurationCreateRequest creates the UpdateBackupConfiguration request. -func (client *WebAppsClient) updateBackupConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, request BackupRequest, options *WebAppsClientUpdateBackupConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// updateBackupConfigurationHandleResponse handles the UpdateBackupConfiguration response. -func (client *WebAppsClient) updateBackupConfigurationHandleResponse(resp *http.Response) (WebAppsClientUpdateBackupConfigurationResponse, error) { - result := WebAppsClientUpdateBackupConfigurationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupRequest); err != nil { - return WebAppsClientUpdateBackupConfigurationResponse{}, err - } - return result, nil -} - -// UpdateBackupConfigurationSlot - Updates the backup configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production -// slot. -// request - Edited backup configuration. -// options - WebAppsClientUpdateBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfigurationSlot -// method. -func (client *WebAppsClient) UpdateBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, request BackupRequest, options *WebAppsClientUpdateBackupConfigurationSlotOptions) (WebAppsClientUpdateBackupConfigurationSlotResponse, error) { - req, err := client.updateBackupConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) - if err != nil { - return WebAppsClientUpdateBackupConfigurationSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateBackupConfigurationSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateBackupConfigurationSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateBackupConfigurationSlotHandleResponse(resp) -} - -// updateBackupConfigurationSlotCreateRequest creates the UpdateBackupConfigurationSlot request. -func (client *WebAppsClient) updateBackupConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, request BackupRequest, options *WebAppsClientUpdateBackupConfigurationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// updateBackupConfigurationSlotHandleResponse handles the UpdateBackupConfigurationSlot response. -func (client *WebAppsClient) updateBackupConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateBackupConfigurationSlotResponse, error) { - result := WebAppsClientUpdateBackupConfigurationSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupRequest); err != nil { - return WebAppsClientUpdateBackupConfigurationSlotResponse{}, err - } - return result, nil -} - -// UpdateConfiguration - Updates the configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// siteConfig - JSON representation of a SiteConfig object. See example. -// options - WebAppsClientUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateConfiguration -// method. -func (client *WebAppsClient) UpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, options *WebAppsClientUpdateConfigurationOptions) (WebAppsClientUpdateConfigurationResponse, error) { - req, err := client.updateConfigurationCreateRequest(ctx, resourceGroupName, name, siteConfig, options) - if err != nil { - return WebAppsClientUpdateConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateConfigurationResponse{}, runtime.NewResponseError(resp) - } - return client.updateConfigurationHandleResponse(resp) -} - -// updateConfigurationCreateRequest creates the UpdateConfiguration request. -func (client *WebAppsClient) updateConfigurationCreateRequest(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, options *WebAppsClientUpdateConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteConfig) -} - -// updateConfigurationHandleResponse handles the UpdateConfiguration response. -func (client *WebAppsClient) updateConfigurationHandleResponse(resp *http.Response) (WebAppsClientUpdateConfigurationResponse, error) { - result := WebAppsClientUpdateConfigurationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { - return WebAppsClientUpdateConfigurationResponse{}, err - } - return result, nil -} - -// UpdateConfigurationSlot - Updates the configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. -// siteConfig - JSON representation of a SiteConfig object. See example. -// options - WebAppsClientUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateConfigurationSlot -// method. -func (client *WebAppsClient) UpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig SiteConfigResource, options *WebAppsClientUpdateConfigurationSlotOptions) (WebAppsClientUpdateConfigurationSlotResponse, error) { - req, err := client.updateConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, siteConfig, options) - if err != nil { - return WebAppsClientUpdateConfigurationSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateConfigurationSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateConfigurationSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateConfigurationSlotHandleResponse(resp) -} - -// updateConfigurationSlotCreateRequest creates the UpdateConfigurationSlot request. -func (client *WebAppsClient) updateConfigurationSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig SiteConfigResource, options *WebAppsClientUpdateConfigurationSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteConfig) -} - -// updateConfigurationSlotHandleResponse handles the UpdateConfigurationSlot response. -func (client *WebAppsClient) updateConfigurationSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateConfigurationSlotResponse, error) { - result := WebAppsClientUpdateConfigurationSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteConfigResource); err != nil { - return WebAppsClientUpdateConfigurationSlotResponse{}, err - } - return result, nil -} - -// UpdateConnectionStrings - Replaces the connection strings of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// connectionStrings - Connection strings of the app or deployment slot. See example. -// options - WebAppsClientUpdateConnectionStringsOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStrings -// method. -func (client *WebAppsClient) UpdateConnectionStrings(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, options *WebAppsClientUpdateConnectionStringsOptions) (WebAppsClientUpdateConnectionStringsResponse, error) { - req, err := client.updateConnectionStringsCreateRequest(ctx, resourceGroupName, name, connectionStrings, options) - if err != nil { - return WebAppsClientUpdateConnectionStringsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateConnectionStringsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateConnectionStringsResponse{}, runtime.NewResponseError(resp) - } - return client.updateConnectionStringsHandleResponse(resp) -} - -// updateConnectionStringsCreateRequest creates the UpdateConnectionStrings request. -func (client *WebAppsClient) updateConnectionStringsCreateRequest(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, options *WebAppsClientUpdateConnectionStringsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionStrings) -} - -// updateConnectionStringsHandleResponse handles the UpdateConnectionStrings response. -func (client *WebAppsClient) updateConnectionStringsHandleResponse(resp *http.Response) (WebAppsClientUpdateConnectionStringsResponse, error) { - result := WebAppsClientUpdateConnectionStringsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionStringDictionary); err != nil { - return WebAppsClientUpdateConnectionStringsResponse{}, err - } - return result, nil -} - -// UpdateConnectionStringsSlot - Replaces the connection strings of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production -// slot. -// connectionStrings - Connection strings of the app or deployment slot. See example. -// options - WebAppsClientUpdateConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStringsSlot -// method. -func (client *WebAppsClient) UpdateConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string, connectionStrings ConnectionStringDictionary, options *WebAppsClientUpdateConnectionStringsSlotOptions) (WebAppsClientUpdateConnectionStringsSlotResponse, error) { - req, err := client.updateConnectionStringsSlotCreateRequest(ctx, resourceGroupName, name, slot, connectionStrings, options) - if err != nil { - return WebAppsClientUpdateConnectionStringsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateConnectionStringsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateConnectionStringsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateConnectionStringsSlotHandleResponse(resp) -} - -// updateConnectionStringsSlotCreateRequest creates the UpdateConnectionStringsSlot request. -func (client *WebAppsClient) updateConnectionStringsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, connectionStrings ConnectionStringDictionary, options *WebAppsClientUpdateConnectionStringsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionStrings) -} - -// updateConnectionStringsSlotHandleResponse handles the UpdateConnectionStringsSlot response. -func (client *WebAppsClient) updateConnectionStringsSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateConnectionStringsSlotResponse, error) { - result := WebAppsClientUpdateConnectionStringsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionStringDictionary); err != nil { - return WebAppsClientUpdateConnectionStringsSlotResponse{}, err - } - return result, nil -} - -// UpdateDiagnosticLogsConfig - Updates the logging configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// siteLogsConfig - A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. -// options - WebAppsClientUpdateDiagnosticLogsConfigOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfig -// method. -func (client *WebAppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, options *WebAppsClientUpdateDiagnosticLogsConfigOptions) (WebAppsClientUpdateDiagnosticLogsConfigResponse, error) { - req, err := client.updateDiagnosticLogsConfigCreateRequest(ctx, resourceGroupName, name, siteLogsConfig, options) - if err != nil { - return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, runtime.NewResponseError(resp) - } - return client.updateDiagnosticLogsConfigHandleResponse(resp) -} - -// updateDiagnosticLogsConfigCreateRequest creates the UpdateDiagnosticLogsConfig request. -func (client *WebAppsClient) updateDiagnosticLogsConfigCreateRequest(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, options *WebAppsClientUpdateDiagnosticLogsConfigOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteLogsConfig) -} - -// updateDiagnosticLogsConfigHandleResponse handles the UpdateDiagnosticLogsConfig response. -func (client *WebAppsClient) updateDiagnosticLogsConfigHandleResponse(resp *http.Response) (WebAppsClientUpdateDiagnosticLogsConfigResponse, error) { - result := WebAppsClientUpdateDiagnosticLogsConfigResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteLogsConfig); err != nil { - return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, err - } - return result, nil -} - -// UpdateDiagnosticLogsConfigSlot - Updates the logging configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production -// slot. -// siteLogsConfig - A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. -// options - WebAppsClientUpdateDiagnosticLogsConfigSlotOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfigSlot -// method. -func (client *WebAppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteLogsConfig SiteLogsConfig, options *WebAppsClientUpdateDiagnosticLogsConfigSlotOptions) (WebAppsClientUpdateDiagnosticLogsConfigSlotResponse, error) { - req, err := client.updateDiagnosticLogsConfigSlotCreateRequest(ctx, resourceGroupName, name, slot, siteLogsConfig, options) - if err != nil { - return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateDiagnosticLogsConfigSlotHandleResponse(resp) -} - -// updateDiagnosticLogsConfigSlotCreateRequest creates the UpdateDiagnosticLogsConfigSlot request. -func (client *WebAppsClient) updateDiagnosticLogsConfigSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteLogsConfig SiteLogsConfig, options *WebAppsClientUpdateDiagnosticLogsConfigSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteLogsConfig) -} - -// updateDiagnosticLogsConfigSlotHandleResponse handles the UpdateDiagnosticLogsConfigSlot response. -func (client *WebAppsClient) updateDiagnosticLogsConfigSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateDiagnosticLogsConfigSlotResponse, error) { - result := WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteLogsConfig); err != nil { - return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, err - } - return result, nil -} - -// UpdateDomainOwnershipIdentifier - Creates a domain ownership identifier for web app, or updates an existing ownership identifier. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// domainOwnershipIdentifierName - Name of domain ownership identifier. -// domainOwnershipIdentifier - A JSON representation of the domain ownership properties. -// options - WebAppsClientUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifier -// method. -func (client *WebAppsClient) UpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, options *WebAppsClientUpdateDomainOwnershipIdentifierOptions) (WebAppsClientUpdateDomainOwnershipIdentifierResponse, error) { - req, err := client.updateDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, options) - if err != nil { - return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) - } - return client.updateDomainOwnershipIdentifierHandleResponse(resp) -} - -// updateDomainOwnershipIdentifierCreateRequest creates the UpdateDomainOwnershipIdentifier request. -func (client *WebAppsClient) updateDomainOwnershipIdentifierCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, options *WebAppsClientUpdateDomainOwnershipIdentifierOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainOwnershipIdentifierName == "" { - return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) -} - -// updateDomainOwnershipIdentifierHandleResponse handles the UpdateDomainOwnershipIdentifier response. -func (client *WebAppsClient) updateDomainOwnershipIdentifierHandleResponse(resp *http.Response) (WebAppsClientUpdateDomainOwnershipIdentifierResponse, error) { - result := WebAppsClientUpdateDomainOwnershipIdentifierResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { - return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, err - } - return result, nil -} - -// UpdateDomainOwnershipIdentifierSlot - Creates a domain ownership identifier for web app, or updates an existing ownership -// identifier. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// domainOwnershipIdentifierName - Name of domain ownership identifier. -// slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. -// domainOwnershipIdentifier - A JSON representation of the domain ownership properties. -// options - WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifierSlot -// method. -func (client *WebAppsClient) UpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier Identifier, options *WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions) (WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse, error) { - req, err := client.updateDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier, options) - if err != nil { - return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateDomainOwnershipIdentifierSlotHandleResponse(resp) -} - -// updateDomainOwnershipIdentifierSlotCreateRequest creates the UpdateDomainOwnershipIdentifierSlot request. -func (client *WebAppsClient) updateDomainOwnershipIdentifierSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier Identifier, options *WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if domainOwnershipIdentifierName == "" { - return nil, errors.New("parameter domainOwnershipIdentifierName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{domainOwnershipIdentifierName}", url.PathEscape(domainOwnershipIdentifierName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) -} - -// updateDomainOwnershipIdentifierSlotHandleResponse handles the UpdateDomainOwnershipIdentifierSlot response. -func (client *WebAppsClient) updateDomainOwnershipIdentifierSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse, error) { - result := WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Identifier); err != nil { - return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, err - } - return result, nil -} - -// UpdateFtpAllowed - Updates whether FTP is allowed on the site or not. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientUpdateFtpAllowedOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowed -// method. -func (client *WebAppsClient) UpdateFtpAllowed(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateFtpAllowedOptions) (WebAppsClientUpdateFtpAllowedResponse, error) { - req, err := client.updateFtpAllowedCreateRequest(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity, options) - if err != nil { - return WebAppsClientUpdateFtpAllowedResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateFtpAllowedResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateFtpAllowedResponse{}, runtime.NewResponseError(resp) - } - return client.updateFtpAllowedHandleResponse(resp) -} - -// updateFtpAllowedCreateRequest creates the UpdateFtpAllowed request. -func (client *WebAppsClient) updateFtpAllowedCreateRequest(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateFtpAllowedOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) -} - -// updateFtpAllowedHandleResponse handles the UpdateFtpAllowed response. -func (client *WebAppsClient) updateFtpAllowedHandleResponse(resp *http.Response) (WebAppsClientUpdateFtpAllowedResponse, error) { - result := WebAppsClientUpdateFtpAllowedResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { - return WebAppsClientUpdateFtpAllowedResponse{}, err - } - return result, nil -} - -// UpdateFtpAllowedSlot - Updates whether FTP is allowed on the site or not. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientUpdateFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowedSlot -// method. -func (client *WebAppsClient) UpdateFtpAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateFtpAllowedSlotOptions) (WebAppsClientUpdateFtpAllowedSlotResponse, error) { - req, err := client.updateFtpAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity, options) - if err != nil { - return WebAppsClientUpdateFtpAllowedSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateFtpAllowedSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateFtpAllowedSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateFtpAllowedSlotHandleResponse(resp) -} - -// updateFtpAllowedSlotCreateRequest creates the UpdateFtpAllowedSlot request. -func (client *WebAppsClient) updateFtpAllowedSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateFtpAllowedSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) -} - -// updateFtpAllowedSlotHandleResponse handles the UpdateFtpAllowedSlot response. -func (client *WebAppsClient) updateFtpAllowedSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateFtpAllowedSlotResponse, error) { - result := WebAppsClientUpdateFtpAllowedSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { - return WebAppsClientUpdateFtpAllowedSlotResponse{}, err - } - return result, nil -} - -// UpdateHybridConnection - Creates a new Hybrid Connection using a Service Bus relay. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// namespaceName - The namespace for this hybrid connection. -// relayName - The relay name for this hybrid connection. -// connectionEnvelope - The details of the hybrid connection. -// options - WebAppsClientUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnection -// method. -func (client *WebAppsClient) UpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, options *WebAppsClientUpdateHybridConnectionOptions) (WebAppsClientUpdateHybridConnectionResponse, error) { - req, err := client.updateHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, options) - if err != nil { - return WebAppsClientUpdateHybridConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateHybridConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateHybridConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.updateHybridConnectionHandleResponse(resp) -} - -// updateHybridConnectionCreateRequest creates the UpdateHybridConnection request. -func (client *WebAppsClient) updateHybridConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, options *WebAppsClientUpdateHybridConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateHybridConnectionHandleResponse handles the UpdateHybridConnection response. -func (client *WebAppsClient) updateHybridConnectionHandleResponse(resp *http.Response) (WebAppsClientUpdateHybridConnectionResponse, error) { - result := WebAppsClientUpdateHybridConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { - return WebAppsClientUpdateHybridConnectionResponse{}, err - } - return result, nil -} - -// UpdateHybridConnectionSlot - Creates a new Hybrid Connection using a Service Bus relay. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - The name of the web app. -// namespaceName - The namespace for this hybrid connection. -// relayName - The relay name for this hybrid connection. -// slot - The name of the slot for the web app. -// connectionEnvelope - The details of the hybrid connection. -// options - WebAppsClientUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnectionSlot -// method. -func (client *WebAppsClient) UpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope HybridConnection, options *WebAppsClientUpdateHybridConnectionSlotOptions) (WebAppsClientUpdateHybridConnectionSlotResponse, error) { - req, err := client.updateHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope, options) - if err != nil { - return WebAppsClientUpdateHybridConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateHybridConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateHybridConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateHybridConnectionSlotHandleResponse(resp) -} - -// updateHybridConnectionSlotCreateRequest creates the UpdateHybridConnectionSlot request. -func (client *WebAppsClient) updateHybridConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope HybridConnection, options *WebAppsClientUpdateHybridConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if namespaceName == "" { - return nil, errors.New("parameter namespaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{namespaceName}", url.PathEscape(namespaceName)) - if relayName == "" { - return nil, errors.New("parameter relayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{relayName}", url.PathEscape(relayName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateHybridConnectionSlotHandleResponse handles the UpdateHybridConnectionSlot response. -func (client *WebAppsClient) updateHybridConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateHybridConnectionSlotResponse, error) { - result := WebAppsClientUpdateHybridConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HybridConnection); err != nil { - return WebAppsClientUpdateHybridConnectionSlotResponse{}, err - } - return result, nil -} - -// UpdateMetadata - Replaces the metadata of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// metadata - Edited metadata of the app or deployment slot. See example. -// options - WebAppsClientUpdateMetadataOptions contains the optional parameters for the WebAppsClient.UpdateMetadata method. -func (client *WebAppsClient) UpdateMetadata(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, options *WebAppsClientUpdateMetadataOptions) (WebAppsClientUpdateMetadataResponse, error) { - req, err := client.updateMetadataCreateRequest(ctx, resourceGroupName, name, metadata, options) - if err != nil { - return WebAppsClientUpdateMetadataResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateMetadataResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateMetadataResponse{}, runtime.NewResponseError(resp) - } - return client.updateMetadataHandleResponse(resp) -} - -// updateMetadataCreateRequest creates the UpdateMetadata request. -func (client *WebAppsClient) updateMetadataCreateRequest(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, options *WebAppsClientUpdateMetadataOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, metadata) -} - -// updateMetadataHandleResponse handles the UpdateMetadata response. -func (client *WebAppsClient) updateMetadataHandleResponse(resp *http.Response) (WebAppsClientUpdateMetadataResponse, error) { - result := WebAppsClientUpdateMetadataResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return WebAppsClientUpdateMetadataResponse{}, err - } - return result, nil -} - -// UpdateMetadataSlot - Replaces the metadata of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. -// metadata - Edited metadata of the app or deployment slot. See example. -// options - WebAppsClientUpdateMetadataSlotOptions contains the optional parameters for the WebAppsClient.UpdateMetadataSlot -// method. -func (client *WebAppsClient) UpdateMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string, metadata StringDictionary, options *WebAppsClientUpdateMetadataSlotOptions) (WebAppsClientUpdateMetadataSlotResponse, error) { - req, err := client.updateMetadataSlotCreateRequest(ctx, resourceGroupName, name, slot, metadata, options) - if err != nil { - return WebAppsClientUpdateMetadataSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateMetadataSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateMetadataSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateMetadataSlotHandleResponse(resp) -} - -// updateMetadataSlotCreateRequest creates the UpdateMetadataSlot request. -func (client *WebAppsClient) updateMetadataSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, metadata StringDictionary, options *WebAppsClientUpdateMetadataSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, metadata) -} - -// updateMetadataSlotHandleResponse handles the UpdateMetadataSlot response. -func (client *WebAppsClient) updateMetadataSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateMetadataSlotResponse, error) { - result := WebAppsClientUpdateMetadataSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringDictionary); err != nil { - return WebAppsClientUpdateMetadataSlotResponse{}, err - } - return result, nil -} - -// UpdatePremierAddOn - Updates a named add-on of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// premierAddOnName - Add-on name. -// premierAddOn - A JSON representation of the edited premier add-on. -// options - WebAppsClientUpdatePremierAddOnOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOn -// method. -func (client *WebAppsClient) UpdatePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, options *WebAppsClientUpdatePremierAddOnOptions) (WebAppsClientUpdatePremierAddOnResponse, error) { - req, err := client.updatePremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, options) - if err != nil { - return WebAppsClientUpdatePremierAddOnResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdatePremierAddOnResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdatePremierAddOnResponse{}, runtime.NewResponseError(resp) - } - return client.updatePremierAddOnHandleResponse(resp) -} - -// updatePremierAddOnCreateRequest creates the UpdatePremierAddOn request. -func (client *WebAppsClient) updatePremierAddOnCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, options *WebAppsClientUpdatePremierAddOnOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if premierAddOnName == "" { - return nil, errors.New("parameter premierAddOnName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, premierAddOn) -} - -// updatePremierAddOnHandleResponse handles the UpdatePremierAddOn response. -func (client *WebAppsClient) updatePremierAddOnHandleResponse(resp *http.Response) (WebAppsClientUpdatePremierAddOnResponse, error) { - result := WebAppsClientUpdatePremierAddOnResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { - return WebAppsClientUpdatePremierAddOnResponse{}, err - } - return result, nil -} - -// UpdatePremierAddOnSlot - Updates a named add-on of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// premierAddOnName - Add-on name. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production -// slot. -// premierAddOn - A JSON representation of the edited premier add-on. -// options - WebAppsClientUpdatePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOnSlot -// method. -func (client *WebAppsClient) UpdatePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn PremierAddOnPatchResource, options *WebAppsClientUpdatePremierAddOnSlotOptions) (WebAppsClientUpdatePremierAddOnSlotResponse, error) { - req, err := client.updatePremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, premierAddOn, options) - if err != nil { - return WebAppsClientUpdatePremierAddOnSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdatePremierAddOnSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdatePremierAddOnSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updatePremierAddOnSlotHandleResponse(resp) -} - -// updatePremierAddOnSlotCreateRequest creates the UpdatePremierAddOnSlot request. -func (client *WebAppsClient) updatePremierAddOnSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn PremierAddOnPatchResource, options *WebAppsClientUpdatePremierAddOnSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if premierAddOnName == "" { - return nil, errors.New("parameter premierAddOnName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{premierAddOnName}", url.PathEscape(premierAddOnName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, premierAddOn) -} - -// updatePremierAddOnSlotHandleResponse handles the UpdatePremierAddOnSlot response. -func (client *WebAppsClient) updatePremierAddOnSlotHandleResponse(resp *http.Response) (WebAppsClientUpdatePremierAddOnSlotResponse, error) { - result := WebAppsClientUpdatePremierAddOnSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOn); err != nil { - return WebAppsClientUpdatePremierAddOnSlotResponse{}, err - } - return result, nil -} - -// UpdateRelayServiceConnection - Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// entityName - Name of the hybrid connection configuration. -// connectionEnvelope - Details of the hybrid connection configuration. -// options - WebAppsClientUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnection -// method. -func (client *WebAppsClient) UpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientUpdateRelayServiceConnectionOptions) (WebAppsClientUpdateRelayServiceConnectionResponse, error) { - req, err := client.updateRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, connectionEnvelope, options) - if err != nil { - return WebAppsClientUpdateRelayServiceConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateRelayServiceConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateRelayServiceConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.updateRelayServiceConnectionHandleResponse(resp) -} - -// updateRelayServiceConnectionCreateRequest creates the UpdateRelayServiceConnection request. -func (client *WebAppsClient) updateRelayServiceConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientUpdateRelayServiceConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if entityName == "" { - return nil, errors.New("parameter entityName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateRelayServiceConnectionHandleResponse handles the UpdateRelayServiceConnection response. -func (client *WebAppsClient) updateRelayServiceConnectionHandleResponse(resp *http.Response) (WebAppsClientUpdateRelayServiceConnectionResponse, error) { - result := WebAppsClientUpdateRelayServiceConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { - return WebAppsClientUpdateRelayServiceConnectionResponse{}, err - } - return result, nil -} - -// UpdateRelayServiceConnectionSlot - Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// entityName - Name of the hybrid connection configuration. -// slot - Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the -// production slot. -// connectionEnvelope - Details of the hybrid connection configuration. -// options - WebAppsClientUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnectionSlot -// method. -func (client *WebAppsClient) UpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientUpdateRelayServiceConnectionSlotOptions) (WebAppsClientUpdateRelayServiceConnectionSlotResponse, error) { - req, err := client.updateRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, connectionEnvelope, options) - if err != nil { - return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateRelayServiceConnectionSlotHandleResponse(resp) -} - -// updateRelayServiceConnectionSlotCreateRequest creates the UpdateRelayServiceConnectionSlot request. -func (client *WebAppsClient) updateRelayServiceConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientUpdateRelayServiceConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if entityName == "" { - return nil, errors.New("parameter entityName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{entityName}", url.PathEscape(entityName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateRelayServiceConnectionSlotHandleResponse handles the UpdateRelayServiceConnectionSlot response. -func (client *WebAppsClient) updateRelayServiceConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateRelayServiceConnectionSlotResponse, error) { - result := WebAppsClientUpdateRelayServiceConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RelayServiceConnectionEntity); err != nil { - return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, err - } - return result, nil -} - -// UpdateScmAllowed - Updates whether user publishing credentials are allowed on the site or not. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientUpdateScmAllowedOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowed -// method. -func (client *WebAppsClient) UpdateScmAllowed(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateScmAllowedOptions) (WebAppsClientUpdateScmAllowedResponse, error) { - req, err := client.updateScmAllowedCreateRequest(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity, options) - if err != nil { - return WebAppsClientUpdateScmAllowedResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateScmAllowedResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateScmAllowedResponse{}, runtime.NewResponseError(resp) - } - return client.updateScmAllowedHandleResponse(resp) -} - -// updateScmAllowedCreateRequest creates the UpdateScmAllowed request. -func (client *WebAppsClient) updateScmAllowedCreateRequest(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateScmAllowedOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) -} - -// updateScmAllowedHandleResponse handles the UpdateScmAllowed response. -func (client *WebAppsClient) updateScmAllowedHandleResponse(resp *http.Response) (WebAppsClientUpdateScmAllowedResponse, error) { - result := WebAppsClientUpdateScmAllowedResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { - return WebAppsClientUpdateScmAllowedResponse{}, err - } - return result, nil -} - -// UpdateScmAllowedSlot - Updates whether user publishing credentials are allowed on the site or not. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// options - WebAppsClientUpdateScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowedSlot -// method. -func (client *WebAppsClient) UpdateScmAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateScmAllowedSlotOptions) (WebAppsClientUpdateScmAllowedSlotResponse, error) { - req, err := client.updateScmAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity, options) - if err != nil { - return WebAppsClientUpdateScmAllowedSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateScmAllowedSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateScmAllowedSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateScmAllowedSlotHandleResponse(resp) -} - -// updateScmAllowedSlotCreateRequest creates the UpdateScmAllowedSlot request. -func (client *WebAppsClient) updateScmAllowedSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateScmAllowedSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) -} - -// updateScmAllowedSlotHandleResponse handles the UpdateScmAllowedSlot response. -func (client *WebAppsClient) updateScmAllowedSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateScmAllowedSlotResponse, error) { - result := WebAppsClientUpdateScmAllowedSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CsmPublishingCredentialsPoliciesEntity); err != nil { - return WebAppsClientUpdateScmAllowedSlotResponse{}, err - } - return result, nil -} - -// UpdateSitePushSettings - Updates the Push settings associated with web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// pushSettings - Push settings associated with web app. -// options - WebAppsClientUpdateSitePushSettingsOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettings -// method. -func (client *WebAppsClient) UpdateSitePushSettings(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, options *WebAppsClientUpdateSitePushSettingsOptions) (WebAppsClientUpdateSitePushSettingsResponse, error) { - req, err := client.updateSitePushSettingsCreateRequest(ctx, resourceGroupName, name, pushSettings, options) - if err != nil { - return WebAppsClientUpdateSitePushSettingsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateSitePushSettingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateSitePushSettingsResponse{}, runtime.NewResponseError(resp) - } - return client.updateSitePushSettingsHandleResponse(resp) -} - -// updateSitePushSettingsCreateRequest creates the UpdateSitePushSettings request. -func (client *WebAppsClient) updateSitePushSettingsCreateRequest(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, options *WebAppsClientUpdateSitePushSettingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, pushSettings) -} - -// updateSitePushSettingsHandleResponse handles the UpdateSitePushSettings response. -func (client *WebAppsClient) updateSitePushSettingsHandleResponse(resp *http.Response) (WebAppsClientUpdateSitePushSettingsResponse, error) { - result := WebAppsClientUpdateSitePushSettingsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PushSettings); err != nil { - return WebAppsClientUpdateSitePushSettingsResponse{}, err - } - return result, nil -} - -// UpdateSitePushSettingsSlot - Updates the Push settings associated with web app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of web app. -// slot - Name of web app slot. If not specified then will default to production slot. -// pushSettings - Push settings associated with web app. -// options - WebAppsClientUpdateSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettingsSlot -// method. -func (client *WebAppsClient) UpdateSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, pushSettings PushSettings, options *WebAppsClientUpdateSitePushSettingsSlotOptions) (WebAppsClientUpdateSitePushSettingsSlotResponse, error) { - req, err := client.updateSitePushSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, pushSettings, options) - if err != nil { - return WebAppsClientUpdateSitePushSettingsSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateSitePushSettingsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateSitePushSettingsSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateSitePushSettingsSlotHandleResponse(resp) -} - -// updateSitePushSettingsSlotCreateRequest creates the UpdateSitePushSettingsSlot request. -func (client *WebAppsClient) updateSitePushSettingsSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, pushSettings PushSettings, options *WebAppsClientUpdateSitePushSettingsSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, pushSettings) -} - -// updateSitePushSettingsSlotHandleResponse handles the UpdateSitePushSettingsSlot response. -func (client *WebAppsClient) updateSitePushSettingsSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateSitePushSettingsSlotResponse, error) { - result := WebAppsClientUpdateSitePushSettingsSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PushSettings); err != nil { - return WebAppsClientUpdateSitePushSettingsSlotResponse{}, err - } - return result, nil -} - -// UpdateSlot - Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. -// slot - Name of the deployment slot to create or update. By default, this API attempts to create or modify the production -// slot. -// siteEnvelope - A JSON representation of the app properties. See example. -// options - WebAppsClientUpdateSlotOptions contains the optional parameters for the WebAppsClient.UpdateSlot method. -func (client *WebAppsClient) UpdateSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope SitePatchResource, options *WebAppsClientUpdateSlotOptions) (WebAppsClientUpdateSlotResponse, error) { - req, err := client.updateSlotCreateRequest(ctx, resourceGroupName, name, slot, siteEnvelope, options) - if err != nil { - return WebAppsClientUpdateSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientUpdateSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateSlotHandleResponse(resp) -} - -// updateSlotCreateRequest creates the UpdateSlot request. -func (client *WebAppsClient) updateSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope SitePatchResource, options *WebAppsClientUpdateSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteEnvelope) -} - -// updateSlotHandleResponse handles the UpdateSlot response. -func (client *WebAppsClient) updateSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateSlotResponse, error) { - result := WebAppsClientUpdateSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Site); err != nil { - return WebAppsClientUpdateSlotResponse{}, err - } - return result, nil -} - -// UpdateSlotConfigurationNames - Updates the names of application settings and connection string that remain with the slot -// during swap operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slotConfigNames - Names of application settings and connection strings. See example. -// options - WebAppsClientUpdateSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.UpdateSlotConfigurationNames -// method. -func (client *WebAppsClient) UpdateSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource, options *WebAppsClientUpdateSlotConfigurationNamesOptions) (WebAppsClientUpdateSlotConfigurationNamesResponse, error) { - req, err := client.updateSlotConfigurationNamesCreateRequest(ctx, resourceGroupName, name, slotConfigNames, options) - if err != nil { - return WebAppsClientUpdateSlotConfigurationNamesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateSlotConfigurationNamesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateSlotConfigurationNamesResponse{}, runtime.NewResponseError(resp) - } - return client.updateSlotConfigurationNamesHandleResponse(resp) -} - -// updateSlotConfigurationNamesCreateRequest creates the UpdateSlotConfigurationNames request. -func (client *WebAppsClient) updateSlotConfigurationNamesCreateRequest(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource, options *WebAppsClientUpdateSlotConfigurationNamesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotConfigNames) -} - -// updateSlotConfigurationNamesHandleResponse handles the UpdateSlotConfigurationNames response. -func (client *WebAppsClient) updateSlotConfigurationNamesHandleResponse(resp *http.Response) (WebAppsClientUpdateSlotConfigurationNamesResponse, error) { - result := WebAppsClientUpdateSlotConfigurationNamesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SlotConfigNamesResource); err != nil { - return WebAppsClientUpdateSlotConfigurationNamesResponse{}, err - } - return result, nil -} - -// UpdateSourceControl - Updates the source control configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// siteSourceControl - JSON representation of a SiteSourceControl object. See example. -// options - WebAppsClientUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.UpdateSourceControl -// method. -func (client *WebAppsClient) UpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientUpdateSourceControlOptions) (WebAppsClientUpdateSourceControlResponse, error) { - req, err := client.updateSourceControlCreateRequest(ctx, resourceGroupName, name, siteSourceControl, options) - if err != nil { - return WebAppsClientUpdateSourceControlResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateSourceControlResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return WebAppsClientUpdateSourceControlResponse{}, runtime.NewResponseError(resp) - } - return client.updateSourceControlHandleResponse(resp) -} - -// updateSourceControlCreateRequest creates the UpdateSourceControl request. -func (client *WebAppsClient) updateSourceControlCreateRequest(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientUpdateSourceControlOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteSourceControl) -} - -// updateSourceControlHandleResponse handles the UpdateSourceControl response. -func (client *WebAppsClient) updateSourceControlHandleResponse(resp *http.Response) (WebAppsClientUpdateSourceControlResponse, error) { - result := WebAppsClientUpdateSourceControlResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteSourceControl); err != nil { - return WebAppsClientUpdateSourceControlResponse{}, err - } - return result, nil -} - -// UpdateSourceControlSlot - Updates the source control configuration of an app. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for -// the production slot. -// siteSourceControl - JSON representation of a SiteSourceControl object. See example. -// options - WebAppsClientUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.UpdateSourceControlSlot -// method. -func (client *WebAppsClient) UpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientUpdateSourceControlSlotOptions) (WebAppsClientUpdateSourceControlSlotResponse, error) { - req, err := client.updateSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, siteSourceControl, options) - if err != nil { - return WebAppsClientUpdateSourceControlSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateSourceControlSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return WebAppsClientUpdateSourceControlSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateSourceControlSlotHandleResponse(resp) -} - -// updateSourceControlSlotCreateRequest creates the UpdateSourceControlSlot request. -func (client *WebAppsClient) updateSourceControlSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientUpdateSourceControlSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteSourceControl) -} - -// updateSourceControlSlotHandleResponse handles the UpdateSourceControlSlot response. -func (client *WebAppsClient) updateSourceControlSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateSourceControlSlotResponse, error) { - result := WebAppsClientUpdateSourceControlSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SiteSourceControl); err != nil { - return WebAppsClientUpdateSourceControlSlotResponse{}, err - } - return result, nil -} - -// UpdateSwiftVirtualNetworkConnectionWithCheck - Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" -// is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is -// not in use by another App Service Plan other than the one this App is in. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// connectionEnvelope - Properties of the Virtual Network connection. See example. -// options - WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck -// method. -func (client *WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheck(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error) { - req, err := client.updateSwiftVirtualNetworkConnectionWithCheckCreateRequest(ctx, resourceGroupName, name, connectionEnvelope, options) - if err != nil { - return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, runtime.NewResponseError(resp) - } - return client.updateSwiftVirtualNetworkConnectionWithCheckHandleResponse(resp) -} - -// updateSwiftVirtualNetworkConnectionWithCheckCreateRequest creates the UpdateSwiftVirtualNetworkConnectionWithCheck request. -func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckCreateRequest(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateSwiftVirtualNetworkConnectionWithCheckHandleResponse handles the UpdateSwiftVirtualNetworkConnectionWithCheck response. -func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckHandleResponse(resp *http.Response) (WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error) { - result := WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { - return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err - } - return result, nil -} - -// UpdateSwiftVirtualNetworkConnectionWithCheckSlot - Integrates this Web App with a Virtual Network. This requires that 1) -// "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, -// and is -// not in use by another App Service Plan other than the one this App is in. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production -// slot. -// connectionEnvelope - Properties of the Virtual Network connection. See example. -// options - WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the -// WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot method. -func (client *WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error) { - req, err := client.updateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest(ctx, resourceGroupName, name, slot, connectionEnvelope, options) - if err != nil { - return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(resp) -} - -// updateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest creates the UpdateSwiftVirtualNetworkConnectionWithCheckSlot request. -func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse handles the UpdateSwiftVirtualNetworkConnectionWithCheckSlot response. -func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error) { - result := WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SwiftVirtualNetwork); err != nil { - return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err - } - return result, nil -} - -// UpdateVnetConnection - Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of an existing Virtual Network. -// connectionEnvelope - Properties of the Virtual Network connection. See example. -// options - WebAppsClientUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnection -// method. -func (client *WebAppsClient) UpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfoResource, options *WebAppsClientUpdateVnetConnectionOptions) (WebAppsClientUpdateVnetConnectionResponse, error) { - req, err := client.updateVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, connectionEnvelope, options) - if err != nil { - return WebAppsClientUpdateVnetConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateVnetConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateVnetConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.updateVnetConnectionHandleResponse(resp) -} - -// updateVnetConnectionCreateRequest creates the UpdateVnetConnection request. -func (client *WebAppsClient) updateVnetConnectionCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfoResource, options *WebAppsClientUpdateVnetConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateVnetConnectionHandleResponse handles the UpdateVnetConnection response. -func (client *WebAppsClient) updateVnetConnectionHandleResponse(resp *http.Response) (WebAppsClientUpdateVnetConnectionResponse, error) { - result := WebAppsClientUpdateVnetConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { - return WebAppsClientUpdateVnetConnectionResponse{}, err - } - return result, nil -} - -// UpdateVnetConnectionGateway - Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of the Virtual Network. -// gatewayName - Name of the gateway. Currently, the only supported string is "primary". -// connectionEnvelope - The properties to update this gateway with. -// options - WebAppsClientUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGateway -// method. -func (client *WebAppsClient) UpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *WebAppsClientUpdateVnetConnectionGatewayOptions) (WebAppsClientUpdateVnetConnectionGatewayResponse, error) { - req, err := client.updateVnetConnectionGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, options) - if err != nil { - return WebAppsClientUpdateVnetConnectionGatewayResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateVnetConnectionGatewayResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateVnetConnectionGatewayResponse{}, runtime.NewResponseError(resp) - } - return client.updateVnetConnectionGatewayHandleResponse(resp) -} - -// updateVnetConnectionGatewayCreateRequest creates the UpdateVnetConnectionGateway request. -func (client *WebAppsClient) updateVnetConnectionGatewayCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *WebAppsClientUpdateVnetConnectionGatewayOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateVnetConnectionGatewayHandleResponse handles the UpdateVnetConnectionGateway response. -func (client *WebAppsClient) updateVnetConnectionGatewayHandleResponse(resp *http.Response) (WebAppsClientUpdateVnetConnectionGatewayResponse, error) { - result := WebAppsClientUpdateVnetConnectionGatewayResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { - return WebAppsClientUpdateVnetConnectionGatewayResponse{}, err - } - return result, nil -} - -// UpdateVnetConnectionGatewaySlot - Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of the Virtual Network. -// gatewayName - Name of the gateway. Currently, the only supported string is "primary". -// slot - Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production -// slot's Virtual Network. -// connectionEnvelope - The properties to update this gateway with. -// options - WebAppsClientUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGatewaySlot -// method. -func (client *WebAppsClient) UpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope VnetGateway, options *WebAppsClientUpdateVnetConnectionGatewaySlotOptions) (WebAppsClientUpdateVnetConnectionGatewaySlotResponse, error) { - req, err := client.updateVnetConnectionGatewaySlotCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope, options) - if err != nil { - return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateVnetConnectionGatewaySlotHandleResponse(resp) -} - -// updateVnetConnectionGatewaySlotCreateRequest creates the UpdateVnetConnectionGatewaySlot request. -func (client *WebAppsClient) updateVnetConnectionGatewaySlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope VnetGateway, options *WebAppsClientUpdateVnetConnectionGatewaySlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateVnetConnectionGatewaySlotHandleResponse handles the UpdateVnetConnectionGatewaySlot response. -func (client *WebAppsClient) updateVnetConnectionGatewaySlotHandleResponse(resp *http.Response) (WebAppsClientUpdateVnetConnectionGatewaySlotResponse, error) { - result := WebAppsClientUpdateVnetConnectionGatewaySlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetGateway); err != nil { - return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, err - } - return result, nil -} - -// UpdateVnetConnectionSlot - Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties -// (PATCH). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// name - Name of the app. -// vnetName - Name of an existing Virtual Network. -// slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production -// slot. -// connectionEnvelope - Properties of the Virtual Network connection. See example. -// options - WebAppsClientUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionSlot -// method. -func (client *WebAppsClient) UpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope VnetInfoResource, options *WebAppsClientUpdateVnetConnectionSlotOptions) (WebAppsClientUpdateVnetConnectionSlotResponse, error) { - req, err := client.updateVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, connectionEnvelope, options) - if err != nil { - return WebAppsClientUpdateVnetConnectionSlotResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebAppsClientUpdateVnetConnectionSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateVnetConnectionSlotResponse{}, runtime.NewResponseError(resp) - } - return client.updateVnetConnectionSlotHandleResponse(resp) -} - -// updateVnetConnectionSlotCreateRequest creates the UpdateVnetConnectionSlot request. -func (client *WebAppsClient) updateVnetConnectionSlotCreateRequest(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope VnetInfoResource, options *WebAppsClientUpdateVnetConnectionSlotOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if vnetName == "" { - return nil, errors.New("parameter vnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vnetName}", url.PathEscape(vnetName)) - if slot == "" { - return nil, errors.New("parameter slot cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{slot}", url.PathEscape(slot)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) -} - -// updateVnetConnectionSlotHandleResponse handles the UpdateVnetConnectionSlot response. -func (client *WebAppsClient) updateVnetConnectionSlotHandleResponse(resp *http.Response) (WebAppsClientUpdateVnetConnectionSlotResponse, error) { - result := WebAppsClientUpdateVnetConnectionSlotResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetInfoResource); err != nil { - return WebAppsClientUpdateVnetConnectionSlotResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_websitemanagement_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_websitemanagement_client.go deleted file mode 100644 index 26448ca1..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/zz_generated_websitemanagement_client.go +++ /dev/null @@ -1,946 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armappservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// WebSiteManagementClient contains the methods for the WebSiteManagementClient group. -// Don't use this type directly, use NewWebSiteManagementClient() instead. -type WebSiteManagementClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewWebSiteManagementClient creates a new instance of WebSiteManagementClient with the specified values. -// subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewWebSiteManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebSiteManagementClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &WebSiteManagementClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CheckNameAvailability - Check if a resource name is available. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// request - Name availability request. -// options - WebSiteManagementClientCheckNameAvailabilityOptions contains the optional parameters for the WebSiteManagementClient.CheckNameAvailability -// method. -func (client *WebSiteManagementClient) CheckNameAvailability(ctx context.Context, request ResourceNameAvailabilityRequest, options *WebSiteManagementClientCheckNameAvailabilityOptions) (WebSiteManagementClientCheckNameAvailabilityResponse, error) { - req, err := client.checkNameAvailabilityCreateRequest(ctx, request, options) - if err != nil { - return WebSiteManagementClientCheckNameAvailabilityResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientCheckNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkNameAvailabilityHandleResponse(resp) -} - -// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *WebSiteManagementClient) checkNameAvailabilityCreateRequest(ctx context.Context, request ResourceNameAvailabilityRequest, options *WebSiteManagementClientCheckNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. -func (client *WebSiteManagementClient) checkNameAvailabilityHandleResponse(resp *http.Response) (WebSiteManagementClientCheckNameAvailabilityResponse, error) { - result := WebSiteManagementClientCheckNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceNameAvailability); err != nil { - return WebSiteManagementClientCheckNameAvailabilityResponse{}, err - } - return result, nil -} - -// GetPublishingUser - Gets publishing user -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - WebSiteManagementClientGetPublishingUserOptions contains the optional parameters for the WebSiteManagementClient.GetPublishingUser -// method. -func (client *WebSiteManagementClient) GetPublishingUser(ctx context.Context, options *WebSiteManagementClientGetPublishingUserOptions) (WebSiteManagementClientGetPublishingUserResponse, error) { - req, err := client.getPublishingUserCreateRequest(ctx, options) - if err != nil { - return WebSiteManagementClientGetPublishingUserResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientGetPublishingUserResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientGetPublishingUserResponse{}, runtime.NewResponseError(resp) - } - return client.getPublishingUserHandleResponse(resp) -} - -// getPublishingUserCreateRequest creates the GetPublishingUser request. -func (client *WebSiteManagementClient) getPublishingUserCreateRequest(ctx context.Context, options *WebSiteManagementClientGetPublishingUserOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/publishingUsers/web" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPublishingUserHandleResponse handles the GetPublishingUser response. -func (client *WebSiteManagementClient) getPublishingUserHandleResponse(resp *http.Response) (WebSiteManagementClientGetPublishingUserResponse, error) { - result := WebSiteManagementClientGetPublishingUserResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.User); err != nil { - return WebSiteManagementClientGetPublishingUserResponse{}, err - } - return result, nil -} - -// GetSourceControl - Gets source control token -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// sourceControlType - Type of source control -// options - WebSiteManagementClientGetSourceControlOptions contains the optional parameters for the WebSiteManagementClient.GetSourceControl -// method. -func (client *WebSiteManagementClient) GetSourceControl(ctx context.Context, sourceControlType string, options *WebSiteManagementClientGetSourceControlOptions) (WebSiteManagementClientGetSourceControlResponse, error) { - req, err := client.getSourceControlCreateRequest(ctx, sourceControlType, options) - if err != nil { - return WebSiteManagementClientGetSourceControlResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientGetSourceControlResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientGetSourceControlResponse{}, runtime.NewResponseError(resp) - } - return client.getSourceControlHandleResponse(resp) -} - -// getSourceControlCreateRequest creates the GetSourceControl request. -func (client *WebSiteManagementClient) getSourceControlCreateRequest(ctx context.Context, sourceControlType string, options *WebSiteManagementClientGetSourceControlOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}" - if sourceControlType == "" { - return nil, errors.New("parameter sourceControlType cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sourceControlType}", url.PathEscape(sourceControlType)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSourceControlHandleResponse handles the GetSourceControl response. -func (client *WebSiteManagementClient) getSourceControlHandleResponse(resp *http.Response) (WebSiteManagementClientGetSourceControlResponse, error) { - result := WebSiteManagementClientGetSourceControlResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SourceControl); err != nil { - return WebSiteManagementClientGetSourceControlResponse{}, err - } - return result, nil -} - -// GetSubscriptionDeploymentLocations - Gets list of available geo regions plus ministamps -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions contains the optional parameters for the WebSiteManagementClient.GetSubscriptionDeploymentLocations -// method. -func (client *WebSiteManagementClient) GetSubscriptionDeploymentLocations(ctx context.Context, options *WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions) (WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse, error) { - req, err := client.getSubscriptionDeploymentLocationsCreateRequest(ctx, options) - if err != nil { - return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, runtime.NewResponseError(resp) - } - return client.getSubscriptionDeploymentLocationsHandleResponse(resp) -} - -// getSubscriptionDeploymentLocationsCreateRequest creates the GetSubscriptionDeploymentLocations request. -func (client *WebSiteManagementClient) getSubscriptionDeploymentLocationsCreateRequest(ctx context.Context, options *WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSubscriptionDeploymentLocationsHandleResponse handles the GetSubscriptionDeploymentLocations response. -func (client *WebSiteManagementClient) getSubscriptionDeploymentLocationsHandleResponse(resp *http.Response) (WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse, error) { - result := WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentLocations); err != nil { - return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, err - } - return result, nil -} - -// NewListBillingMetersPager - Gets a list of meters for a given location. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - WebSiteManagementClientListBillingMetersOptions contains the optional parameters for the WebSiteManagementClient.ListBillingMeters -// method. -func (client *WebSiteManagementClient) NewListBillingMetersPager(options *WebSiteManagementClientListBillingMetersOptions) *runtime.Pager[WebSiteManagementClientListBillingMetersResponse] { - return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListBillingMetersResponse]{ - More: func(page WebSiteManagementClientListBillingMetersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebSiteManagementClientListBillingMetersResponse) (WebSiteManagementClientListBillingMetersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBillingMetersCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebSiteManagementClientListBillingMetersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientListBillingMetersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListBillingMetersResponse{}, runtime.NewResponseError(resp) - } - return client.listBillingMetersHandleResponse(resp) - }, - }) -} - -// listBillingMetersCreateRequest creates the ListBillingMeters request. -func (client *WebSiteManagementClient) listBillingMetersCreateRequest(ctx context.Context, options *WebSiteManagementClientListBillingMetersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.BillingLocation != nil { - reqQP.Set("billingLocation", *options.BillingLocation) - } - if options != nil && options.OSType != nil { - reqQP.Set("osType", *options.OSType) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBillingMetersHandleResponse handles the ListBillingMeters response. -func (client *WebSiteManagementClient) listBillingMetersHandleResponse(resp *http.Response) (WebSiteManagementClientListBillingMetersResponse, error) { - result := WebSiteManagementClientListBillingMetersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BillingMeterCollection); err != nil { - return WebSiteManagementClientListBillingMetersResponse{}, err - } - return result, nil -} - -// NewListCustomHostNameSitesPager - Get custom hostnames under this subscription -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - WebSiteManagementClientListCustomHostNameSitesOptions contains the optional parameters for the WebSiteManagementClient.ListCustomHostNameSites -// method. -func (client *WebSiteManagementClient) NewListCustomHostNameSitesPager(options *WebSiteManagementClientListCustomHostNameSitesOptions) *runtime.Pager[WebSiteManagementClientListCustomHostNameSitesResponse] { - return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListCustomHostNameSitesResponse]{ - More: func(page WebSiteManagementClientListCustomHostNameSitesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebSiteManagementClientListCustomHostNameSitesResponse) (WebSiteManagementClientListCustomHostNameSitesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCustomHostNameSitesCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebSiteManagementClientListCustomHostNameSitesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientListCustomHostNameSitesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListCustomHostNameSitesResponse{}, runtime.NewResponseError(resp) - } - return client.listCustomHostNameSitesHandleResponse(resp) - }, - }) -} - -// listCustomHostNameSitesCreateRequest creates the ListCustomHostNameSites request. -func (client *WebSiteManagementClient) listCustomHostNameSitesCreateRequest(ctx context.Context, options *WebSiteManagementClientListCustomHostNameSitesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listCustomHostNameSitesHandleResponse handles the ListCustomHostNameSites response. -func (client *WebSiteManagementClient) listCustomHostNameSitesHandleResponse(resp *http.Response) (WebSiteManagementClientListCustomHostNameSitesResponse, error) { - result := WebSiteManagementClientListCustomHostNameSitesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomHostnameSitesCollection); err != nil { - return WebSiteManagementClientListCustomHostNameSitesResponse{}, err - } - return result, nil -} - -// NewListGeoRegionsPager - Get a list of available geographical regions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - WebSiteManagementClientListGeoRegionsOptions contains the optional parameters for the WebSiteManagementClient.ListGeoRegions -// method. -func (client *WebSiteManagementClient) NewListGeoRegionsPager(options *WebSiteManagementClientListGeoRegionsOptions) *runtime.Pager[WebSiteManagementClientListGeoRegionsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListGeoRegionsResponse]{ - More: func(page WebSiteManagementClientListGeoRegionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebSiteManagementClientListGeoRegionsResponse) (WebSiteManagementClientListGeoRegionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listGeoRegionsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebSiteManagementClientListGeoRegionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientListGeoRegionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListGeoRegionsResponse{}, runtime.NewResponseError(resp) - } - return client.listGeoRegionsHandleResponse(resp) - }, - }) -} - -// listGeoRegionsCreateRequest creates the ListGeoRegions request. -func (client *WebSiteManagementClient) listGeoRegionsCreateRequest(ctx context.Context, options *WebSiteManagementClientListGeoRegionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.SKU != nil { - reqQP.Set("sku", string(*options.SKU)) - } - if options != nil && options.LinuxWorkersEnabled != nil { - reqQP.Set("linuxWorkersEnabled", strconv.FormatBool(*options.LinuxWorkersEnabled)) - } - if options != nil && options.XenonWorkersEnabled != nil { - reqQP.Set("xenonWorkersEnabled", strconv.FormatBool(*options.XenonWorkersEnabled)) - } - if options != nil && options.LinuxDynamicWorkersEnabled != nil { - reqQP.Set("linuxDynamicWorkersEnabled", strconv.FormatBool(*options.LinuxDynamicWorkersEnabled)) - } - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listGeoRegionsHandleResponse handles the ListGeoRegions response. -func (client *WebSiteManagementClient) listGeoRegionsHandleResponse(resp *http.Response) (WebSiteManagementClientListGeoRegionsResponse, error) { - result := WebSiteManagementClientListGeoRegionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GeoRegionCollection); err != nil { - return WebSiteManagementClientListGeoRegionsResponse{}, err - } - return result, nil -} - -// NewListPremierAddOnOffersPager - List all premier add-on offers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - WebSiteManagementClientListPremierAddOnOffersOptions contains the optional parameters for the WebSiteManagementClient.ListPremierAddOnOffers -// method. -func (client *WebSiteManagementClient) NewListPremierAddOnOffersPager(options *WebSiteManagementClientListPremierAddOnOffersOptions) *runtime.Pager[WebSiteManagementClientListPremierAddOnOffersResponse] { - return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListPremierAddOnOffersResponse]{ - More: func(page WebSiteManagementClientListPremierAddOnOffersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebSiteManagementClientListPremierAddOnOffersResponse) (WebSiteManagementClientListPremierAddOnOffersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPremierAddOnOffersCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebSiteManagementClientListPremierAddOnOffersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientListPremierAddOnOffersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListPremierAddOnOffersResponse{}, runtime.NewResponseError(resp) - } - return client.listPremierAddOnOffersHandleResponse(resp) - }, - }) -} - -// listPremierAddOnOffersCreateRequest creates the ListPremierAddOnOffers request. -func (client *WebSiteManagementClient) listPremierAddOnOffersCreateRequest(ctx context.Context, options *WebSiteManagementClientListPremierAddOnOffersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listPremierAddOnOffersHandleResponse handles the ListPremierAddOnOffers response. -func (client *WebSiteManagementClient) listPremierAddOnOffersHandleResponse(resp *http.Response) (WebSiteManagementClientListPremierAddOnOffersResponse, error) { - result := WebSiteManagementClientListPremierAddOnOffersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PremierAddOnOfferCollection); err != nil { - return WebSiteManagementClientListPremierAddOnOffersResponse{}, err - } - return result, nil -} - -// ListSKUs - List all SKUs. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - WebSiteManagementClientListSKUsOptions contains the optional parameters for the WebSiteManagementClient.ListSKUs -// method. -func (client *WebSiteManagementClient) ListSKUs(ctx context.Context, options *WebSiteManagementClientListSKUsOptions) (WebSiteManagementClientListSKUsResponse, error) { - req, err := client.listSKUsCreateRequest(ctx, options) - if err != nil { - return WebSiteManagementClientListSKUsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientListSKUsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListSKUsResponse{}, runtime.NewResponseError(resp) - } - return client.listSKUsHandleResponse(resp) -} - -// listSKUsCreateRequest creates the ListSKUs request. -func (client *WebSiteManagementClient) listSKUsCreateRequest(ctx context.Context, options *WebSiteManagementClientListSKUsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSKUsHandleResponse handles the ListSKUs response. -func (client *WebSiteManagementClient) listSKUsHandleResponse(resp *http.Response) (WebSiteManagementClientListSKUsResponse, error) { - result := WebSiteManagementClientListSKUsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SKUInfos); err != nil { - return WebSiteManagementClientListSKUsResponse{}, err - } - return result, nil -} - -// NewListSiteIdentifiersAssignedToHostNamePager - List all apps that are assigned to a hostname. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// nameIdentifier - Hostname information. -// options - WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions contains the optional parameters for the -// WebSiteManagementClient.ListSiteIdentifiersAssignedToHostName method. -func (client *WebSiteManagementClient) NewListSiteIdentifiersAssignedToHostNamePager(nameIdentifier NameIdentifier, options *WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions) *runtime.Pager[WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse] { - return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse]{ - More: func(page WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse) (WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteIdentifiersAssignedToHostNameCreateRequest(ctx, nameIdentifier, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{}, runtime.NewResponseError(resp) - } - return client.listSiteIdentifiersAssignedToHostNameHandleResponse(resp) - }, - }) -} - -// listSiteIdentifiersAssignedToHostNameCreateRequest creates the ListSiteIdentifiersAssignedToHostName request. -func (client *WebSiteManagementClient) listSiteIdentifiersAssignedToHostNameCreateRequest(ctx context.Context, nameIdentifier NameIdentifier, options *WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, nameIdentifier) -} - -// listSiteIdentifiersAssignedToHostNameHandleResponse handles the ListSiteIdentifiersAssignedToHostName response. -func (client *WebSiteManagementClient) listSiteIdentifiersAssignedToHostNameHandleResponse(resp *http.Response) (WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse, error) { - result := WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IdentifierCollection); err != nil { - return WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{}, err - } - return result, nil -} - -// NewListSourceControlsPager - Gets the source controls available for Azure websites. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// options - WebSiteManagementClientListSourceControlsOptions contains the optional parameters for the WebSiteManagementClient.ListSourceControls -// method. -func (client *WebSiteManagementClient) NewListSourceControlsPager(options *WebSiteManagementClientListSourceControlsOptions) *runtime.Pager[WebSiteManagementClientListSourceControlsResponse] { - return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListSourceControlsResponse]{ - More: func(page WebSiteManagementClientListSourceControlsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebSiteManagementClientListSourceControlsResponse) (WebSiteManagementClientListSourceControlsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSourceControlsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebSiteManagementClientListSourceControlsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientListSourceControlsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListSourceControlsResponse{}, runtime.NewResponseError(resp) - } - return client.listSourceControlsHandleResponse(resp) - }, - }) -} - -// listSourceControlsCreateRequest creates the ListSourceControls request. -func (client *WebSiteManagementClient) listSourceControlsCreateRequest(ctx context.Context, options *WebSiteManagementClientListSourceControlsOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/sourcecontrols" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSourceControlsHandleResponse handles the ListSourceControls response. -func (client *WebSiteManagementClient) listSourceControlsHandleResponse(resp *http.Response) (WebSiteManagementClientListSourceControlsResponse, error) { - result := WebSiteManagementClientListSourceControlsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SourceControlCollection); err != nil { - return WebSiteManagementClientListSourceControlsResponse{}, err - } - return result, nil -} - -// Move - Move resources between resource groups. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// moveResourceEnvelope - Object that represents the resource to move. -// options - WebSiteManagementClientMoveOptions contains the optional parameters for the WebSiteManagementClient.Move method. -func (client *WebSiteManagementClient) Move(ctx context.Context, resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope, options *WebSiteManagementClientMoveOptions) (WebSiteManagementClientMoveResponse, error) { - req, err := client.moveCreateRequest(ctx, resourceGroupName, moveResourceEnvelope, options) - if err != nil { - return WebSiteManagementClientMoveResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientMoveResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebSiteManagementClientMoveResponse{}, runtime.NewResponseError(resp) - } - return WebSiteManagementClientMoveResponse{}, nil -} - -// moveCreateRequest creates the Move request. -func (client *WebSiteManagementClient) moveCreateRequest(ctx context.Context, resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope, options *WebSiteManagementClientMoveOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, moveResourceEnvelope) -} - -// UpdatePublishingUser - Updates publishing user -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// userDetails - Details of publishing user -// options - WebSiteManagementClientUpdatePublishingUserOptions contains the optional parameters for the WebSiteManagementClient.UpdatePublishingUser -// method. -func (client *WebSiteManagementClient) UpdatePublishingUser(ctx context.Context, userDetails User, options *WebSiteManagementClientUpdatePublishingUserOptions) (WebSiteManagementClientUpdatePublishingUserResponse, error) { - req, err := client.updatePublishingUserCreateRequest(ctx, userDetails, options) - if err != nil { - return WebSiteManagementClientUpdatePublishingUserResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientUpdatePublishingUserResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientUpdatePublishingUserResponse{}, runtime.NewResponseError(resp) - } - return client.updatePublishingUserHandleResponse(resp) -} - -// updatePublishingUserCreateRequest creates the UpdatePublishingUser request. -func (client *WebSiteManagementClient) updatePublishingUserCreateRequest(ctx context.Context, userDetails User, options *WebSiteManagementClientUpdatePublishingUserOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/publishingUsers/web" - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, userDetails) -} - -// updatePublishingUserHandleResponse handles the UpdatePublishingUser response. -func (client *WebSiteManagementClient) updatePublishingUserHandleResponse(resp *http.Response) (WebSiteManagementClientUpdatePublishingUserResponse, error) { - result := WebSiteManagementClientUpdatePublishingUserResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.User); err != nil { - return WebSiteManagementClientUpdatePublishingUserResponse{}, err - } - return result, nil -} - -// UpdateSourceControl - Updates source control token -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// sourceControlType - Type of source control -// requestMessage - Source control token information -// options - WebSiteManagementClientUpdateSourceControlOptions contains the optional parameters for the WebSiteManagementClient.UpdateSourceControl -// method. -func (client *WebSiteManagementClient) UpdateSourceControl(ctx context.Context, sourceControlType string, requestMessage SourceControl, options *WebSiteManagementClientUpdateSourceControlOptions) (WebSiteManagementClientUpdateSourceControlResponse, error) { - req, err := client.updateSourceControlCreateRequest(ctx, sourceControlType, requestMessage, options) - if err != nil { - return WebSiteManagementClientUpdateSourceControlResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientUpdateSourceControlResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientUpdateSourceControlResponse{}, runtime.NewResponseError(resp) - } - return client.updateSourceControlHandleResponse(resp) -} - -// updateSourceControlCreateRequest creates the UpdateSourceControl request. -func (client *WebSiteManagementClient) updateSourceControlCreateRequest(ctx context.Context, sourceControlType string, requestMessage SourceControl, options *WebSiteManagementClientUpdateSourceControlOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}" - if sourceControlType == "" { - return nil, errors.New("parameter sourceControlType cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sourceControlType}", url.PathEscape(sourceControlType)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, requestMessage) -} - -// updateSourceControlHandleResponse handles the UpdateSourceControl response. -func (client *WebSiteManagementClient) updateSourceControlHandleResponse(resp *http.Response) (WebSiteManagementClientUpdateSourceControlResponse, error) { - result := WebSiteManagementClientUpdateSourceControlResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SourceControl); err != nil { - return WebSiteManagementClientUpdateSourceControlResponse{}, err - } - return result, nil -} - -// Validate - Validate if a resource can be created. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// validateRequest - Request with the resources to validate. -// options - WebSiteManagementClientValidateOptions contains the optional parameters for the WebSiteManagementClient.Validate -// method. -func (client *WebSiteManagementClient) Validate(ctx context.Context, resourceGroupName string, validateRequest ValidateRequest, options *WebSiteManagementClientValidateOptions) (WebSiteManagementClientValidateResponse, error) { - req, err := client.validateCreateRequest(ctx, resourceGroupName, validateRequest, options) - if err != nil { - return WebSiteManagementClientValidateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientValidateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientValidateResponse{}, runtime.NewResponseError(resp) - } - return client.validateHandleResponse(resp) -} - -// validateCreateRequest creates the Validate request. -func (client *WebSiteManagementClient) validateCreateRequest(ctx context.Context, resourceGroupName string, validateRequest ValidateRequest, options *WebSiteManagementClientValidateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validateRequest) -} - -// validateHandleResponse handles the Validate response. -func (client *WebSiteManagementClient) validateHandleResponse(resp *http.Response) (WebSiteManagementClientValidateResponse, error) { - result := WebSiteManagementClientValidateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ValidateResponse); err != nil { - return WebSiteManagementClientValidateResponse{}, err - } - return result, nil -} - -// ValidateMove - Validate whether a resource can be moved. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// resourceGroupName - Name of the resource group to which the resource belongs. -// moveResourceEnvelope - Object that represents the resource to move. -// options - WebSiteManagementClientValidateMoveOptions contains the optional parameters for the WebSiteManagementClient.ValidateMove -// method. -func (client *WebSiteManagementClient) ValidateMove(ctx context.Context, resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope, options *WebSiteManagementClientValidateMoveOptions) (WebSiteManagementClientValidateMoveResponse, error) { - req, err := client.validateMoveCreateRequest(ctx, resourceGroupName, moveResourceEnvelope, options) - if err != nil { - return WebSiteManagementClientValidateMoveResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientValidateMoveResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebSiteManagementClientValidateMoveResponse{}, runtime.NewResponseError(resp) - } - return WebSiteManagementClientValidateMoveResponse{}, nil -} - -// validateMoveCreateRequest creates the ValidateMove request. -func (client *WebSiteManagementClient) validateMoveCreateRequest(ctx context.Context, resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope, options *WebSiteManagementClientValidateMoveOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, moveResourceEnvelope) -} - -// VerifyHostingEnvironmentVnet - Verifies if this VNET is compatible with an App Service Environment by analyzing the Network -// Security Group rules. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-03-01 -// parameters - VNET information -// options - WebSiteManagementClientVerifyHostingEnvironmentVnetOptions contains the optional parameters for the WebSiteManagementClient.VerifyHostingEnvironmentVnet -// method. -func (client *WebSiteManagementClient) VerifyHostingEnvironmentVnet(ctx context.Context, parameters VnetParameters, options *WebSiteManagementClientVerifyHostingEnvironmentVnetOptions) (WebSiteManagementClientVerifyHostingEnvironmentVnetResponse, error) { - req, err := client.verifyHostingEnvironmentVnetCreateRequest(ctx, parameters, options) - if err != nil { - return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, runtime.NewResponseError(resp) - } - return client.verifyHostingEnvironmentVnetHandleResponse(resp) -} - -// verifyHostingEnvironmentVnetCreateRequest creates the VerifyHostingEnvironmentVnet request. -func (client *WebSiteManagementClient) verifyHostingEnvironmentVnetCreateRequest(ctx context.Context, parameters VnetParameters, options *WebSiteManagementClientVerifyHostingEnvironmentVnetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// verifyHostingEnvironmentVnetHandleResponse handles the VerifyHostingEnvironmentVnet response. -func (client *WebSiteManagementClient) verifyHostingEnvironmentVnetHandleResponse(resp *http.Response) (WebSiteManagementClientVerifyHostingEnvironmentVnetResponse, error) { - result := WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VnetValidationFailureDetails); err != nil { - return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/CHANGELOG.md deleted file mode 100644 index 2336cde1..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/CHANGELOG.md +++ /dev/null @@ -1,20 +0,0 @@ -# Release History - -## 1.1.1 (2023-04-14) -### Bug Fixes - -- Fix serialization bug of empty value of `any` type. - -## 1.1.0 (2023-03-27) -### Features Added - -- New struct `ClientFactory` which is a client factory used to create any client in this module - - -## 1.0.0 (2022-05-17) - -The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. - -To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). - -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/README.md deleted file mode 100644 index 09a196d3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Azure Content Delivery Network Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn) - -The `armcdn` module provides operations for working with Azure Content Delivery Network. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/cdn/armcdn) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Content Delivery Network module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Content Delivery Network. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Client Factory - -Azure Content Delivery Network module consists of one or more clients. We provide a client factory which could be used to create any client in this module. - -```go -clientFactory, err := armcdn.NewClientFactory(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -clientFactory, err := armcdn.NewClientFactory(, cred, &options) -``` - -## Clients - -A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. - -```go -client := clientFactory.NewManagementClient() -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Content Delivery Network` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdprofiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdprofiles_client.go deleted file mode 100644 index 1d1b91f5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdprofiles_client.go +++ /dev/null @@ -1,176 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AFDProfilesClient contains the methods for the AFDProfiles group. -// Don't use this type directly, use NewAFDProfilesClient() instead. -type AFDProfilesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewAFDProfilesClient creates a new instance of AFDProfilesClient with the specified values. -// - subscriptionID - Azure Subscription ID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewAFDProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDProfilesClient, error) { - cl, err := arm.NewClient(moduleName+".AFDProfilesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &AFDProfilesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CheckHostNameAvailability - Check the name availability of a host name. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the -// resource group. -// - checkHostNameAvailabilityInput - Custom domain to be validated. -// - options - AFDProfilesClientCheckHostNameAvailabilityOptions contains the optional parameters for the AFDProfilesClient.CheckHostNameAvailability -// method. -func (client *AFDProfilesClient) CheckHostNameAvailability(ctx context.Context, resourceGroupName string, profileName string, checkHostNameAvailabilityInput CheckHostNameAvailabilityInput, options *AFDProfilesClientCheckHostNameAvailabilityOptions) (AFDProfilesClientCheckHostNameAvailabilityResponse, error) { - req, err := client.checkHostNameAvailabilityCreateRequest(ctx, resourceGroupName, profileName, checkHostNameAvailabilityInput, options) - if err != nil { - return AFDProfilesClientCheckHostNameAvailabilityResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AFDProfilesClientCheckHostNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDProfilesClientCheckHostNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkHostNameAvailabilityHandleResponse(resp) -} - -// checkHostNameAvailabilityCreateRequest creates the CheckHostNameAvailability request. -func (client *AFDProfilesClient) checkHostNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, profileName string, checkHostNameAvailabilityInput CheckHostNameAvailabilityInput, options *AFDProfilesClientCheckHostNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkHostNameAvailabilityInput) -} - -// checkHostNameAvailabilityHandleResponse handles the CheckHostNameAvailability response. -func (client *AFDProfilesClient) checkHostNameAvailabilityHandleResponse(resp *http.Response) (AFDProfilesClientCheckHostNameAvailabilityResponse, error) { - result := AFDProfilesClientCheckHostNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityOutput); err != nil { - return AFDProfilesClientCheckHostNameAvailabilityResponse{}, err - } - return result, nil -} - -// NewListResourceUsagePager - Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the -// resource group. -// - options - AFDProfilesClientListResourceUsageOptions contains the optional parameters for the AFDProfilesClient.NewListResourceUsagePager -// method. -func (client *AFDProfilesClient) NewListResourceUsagePager(resourceGroupName string, profileName string, options *AFDProfilesClientListResourceUsageOptions) *runtime.Pager[AFDProfilesClientListResourceUsageResponse] { - return runtime.NewPager(runtime.PagingHandler[AFDProfilesClientListResourceUsageResponse]{ - More: func(page AFDProfilesClientListResourceUsageResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AFDProfilesClientListResourceUsageResponse) (AFDProfilesClientListResourceUsageResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AFDProfilesClientListResourceUsageResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AFDProfilesClientListResourceUsageResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDProfilesClientListResourceUsageResponse{}, runtime.NewResponseError(resp) - } - return client.listResourceUsageHandleResponse(resp) - }, - }) -} - -// listResourceUsageCreateRequest creates the ListResourceUsage request. -func (client *AFDProfilesClient) listResourceUsageCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *AFDProfilesClientListResourceUsageOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listResourceUsageHandleResponse handles the ListResourceUsage response. -func (client *AFDProfilesClient) listResourceUsageHandleResponse(resp *http.Response) (AFDProfilesClientListResourceUsageResponse, error) { - result := AFDProfilesClientListResourceUsageResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UsagesListResult); err != nil { - return AFDProfilesClientListResourceUsageResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/assets.json deleted file mode 100644 index 75409217..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "go", - "TagPrefix": "go/resourcemanager/cdn/armcdn", - "Tag": "go/resourcemanager/cdn/armcdn_99fb79facf" -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/autorest.md deleted file mode 100644 index e880e960..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/autorest.md +++ /dev/null @@ -1,14 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/cdn/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 -modelerfour: - lenient-model-deduplication: true -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/build.go deleted file mode 100644 index 3cced146..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/cdn/armcdn - -package armcdn diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/ci.yml deleted file mode 100644 index f111d2c3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/cdn/armcdn/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/cdn/armcdn/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/cdn/armcdn' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/client_factory.go deleted file mode 100644 index 84b1cc56..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/client_factory.go +++ /dev/null @@ -1,154 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" -) - -// ClientFactory is a client factory used to create any client in this module. -// Don't use this type directly, use NewClientFactory instead. -type ClientFactory struct { - subscriptionID string - credential azcore.TokenCredential - options *arm.ClientOptions -} - -// NewClientFactory creates a new instance of ClientFactory with the specified values. -// The parameter values will be propagated to any client created from this factory. -// - subscriptionID - Azure Subscription ID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) - if err != nil { - return nil, err - } - return &ClientFactory{ - subscriptionID: subscriptionID, credential: credential, - options: options.Clone(), - }, nil -} - -func (c *ClientFactory) NewManagementClient() *ManagementClient { - subClient, _ := NewManagementClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAFDProfilesClient() *AFDProfilesClient { - subClient, _ := NewAFDProfilesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAFDCustomDomainsClient() *AFDCustomDomainsClient { - subClient, _ := NewAFDCustomDomainsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAFDEndpointsClient() *AFDEndpointsClient { - subClient, _ := NewAFDEndpointsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAFDOriginGroupsClient() *AFDOriginGroupsClient { - subClient, _ := NewAFDOriginGroupsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAFDOriginsClient() *AFDOriginsClient { - subClient, _ := NewAFDOriginsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewRoutesClient() *RoutesClient { - subClient, _ := NewRoutesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewRuleSetsClient() *RuleSetsClient { - subClient, _ := NewRuleSetsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewRulesClient() *RulesClient { - subClient, _ := NewRulesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewSecurityPoliciesClient() *SecurityPoliciesClient { - subClient, _ := NewSecurityPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewSecretsClient() *SecretsClient { - subClient, _ := NewSecretsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewValidateClient() *ValidateClient { - subClient, _ := NewValidateClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewLogAnalyticsClient() *LogAnalyticsClient { - subClient, _ := NewLogAnalyticsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewProfilesClient() *ProfilesClient { - subClient, _ := NewProfilesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewEndpointsClient() *EndpointsClient { - subClient, _ := NewEndpointsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOriginsClient() *OriginsClient { - subClient, _ := NewOriginsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOriginGroupsClient() *OriginGroupsClient { - subClient, _ := NewOriginGroupsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewCustomDomainsClient() *CustomDomainsClient { - subClient, _ := NewCustomDomainsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewResourceUsageClient() *ResourceUsageClient { - subClient, _ := NewResourceUsageClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewEdgeNodesClient() *EdgeNodesClient { - subClient, _ := NewEdgeNodesClient(c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPoliciesClient() *PoliciesClient { - subClient, _ := NewPoliciesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewManagedRuleSetsClient() *ManagedRuleSetsClient { - subClient, _ := NewManagedRuleSetsClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/constants.go deleted file mode 100644 index 90e18a3f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/constants.go +++ /dev/null @@ -1,2687 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -const ( - moduleName = "armcdn" - moduleVersion = "v1.1.1" -) - -// AFDEndpointProtocols - Supported protocols for the customer's endpoint. -type AFDEndpointProtocols string - -const ( - AFDEndpointProtocolsHTTP AFDEndpointProtocols = "Http" - AFDEndpointProtocolsHTTPS AFDEndpointProtocols = "Https" -) - -// PossibleAFDEndpointProtocolsValues returns the possible values for the AFDEndpointProtocols const type. -func PossibleAFDEndpointProtocolsValues() []AFDEndpointProtocols { - return []AFDEndpointProtocols{ - AFDEndpointProtocolsHTTP, - AFDEndpointProtocolsHTTPS, - } -} - -// ActionType - Defines the action to take on rule match. -type ActionType string - -const ( - ActionTypeAllow ActionType = "Allow" - ActionTypeBlock ActionType = "Block" - ActionTypeLog ActionType = "Log" - ActionTypeRedirect ActionType = "Redirect" -) - -// PossibleActionTypeValues returns the possible values for the ActionType const type. -func PossibleActionTypeValues() []ActionType { - return []ActionType{ - ActionTypeAllow, - ActionTypeBlock, - ActionTypeLog, - ActionTypeRedirect, - } -} - -// AfdCertificateType - Defines the source of the SSL certificate. -type AfdCertificateType string - -const ( - AfdCertificateTypeAzureFirstPartyManagedCertificate AfdCertificateType = "AzureFirstPartyManagedCertificate" - AfdCertificateTypeCustomerCertificate AfdCertificateType = "CustomerCertificate" - AfdCertificateTypeManagedCertificate AfdCertificateType = "ManagedCertificate" -) - -// PossibleAfdCertificateTypeValues returns the possible values for the AfdCertificateType const type. -func PossibleAfdCertificateTypeValues() []AfdCertificateType { - return []AfdCertificateType{ - AfdCertificateTypeAzureFirstPartyManagedCertificate, - AfdCertificateTypeCustomerCertificate, - AfdCertificateTypeManagedCertificate, - } -} - -// AfdMinimumTLSVersion - TLS protocol version that will be used for Https -type AfdMinimumTLSVersion string - -const ( - AfdMinimumTLSVersionTLS10 AfdMinimumTLSVersion = "TLS10" - AfdMinimumTLSVersionTLS12 AfdMinimumTLSVersion = "TLS12" -) - -// PossibleAfdMinimumTLSVersionValues returns the possible values for the AfdMinimumTLSVersion const type. -func PossibleAfdMinimumTLSVersionValues() []AfdMinimumTLSVersion { - return []AfdMinimumTLSVersion{ - AfdMinimumTLSVersionTLS10, - AfdMinimumTLSVersionTLS12, - } -} - -// AfdProvisioningState - Provisioning status -type AfdProvisioningState string - -const ( - AfdProvisioningStateCreating AfdProvisioningState = "Creating" - AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" - AfdProvisioningStateFailed AfdProvisioningState = "Failed" - AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" - AfdProvisioningStateUpdating AfdProvisioningState = "Updating" -) - -// PossibleAfdProvisioningStateValues returns the possible values for the AfdProvisioningState const type. -func PossibleAfdProvisioningStateValues() []AfdProvisioningState { - return []AfdProvisioningState{ - AfdProvisioningStateCreating, - AfdProvisioningStateDeleting, - AfdProvisioningStateFailed, - AfdProvisioningStateSucceeded, - AfdProvisioningStateUpdating, - } -} - -// AfdQueryStringCachingBehavior - Defines how Frontdoor caches requests that include query strings. You can ignore any query -// strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific -// query strings. -type AfdQueryStringCachingBehavior string - -const ( - AfdQueryStringCachingBehaviorIgnoreQueryString AfdQueryStringCachingBehavior = "IgnoreQueryString" - AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings AfdQueryStringCachingBehavior = "IgnoreSpecifiedQueryStrings" - AfdQueryStringCachingBehaviorIncludeSpecifiedQueryStrings AfdQueryStringCachingBehavior = "IncludeSpecifiedQueryStrings" - AfdQueryStringCachingBehaviorUseQueryString AfdQueryStringCachingBehavior = "UseQueryString" -) - -// PossibleAfdQueryStringCachingBehaviorValues returns the possible values for the AfdQueryStringCachingBehavior const type. -func PossibleAfdQueryStringCachingBehaviorValues() []AfdQueryStringCachingBehavior { - return []AfdQueryStringCachingBehavior{ - AfdQueryStringCachingBehaviorIgnoreQueryString, - AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings, - AfdQueryStringCachingBehaviorIncludeSpecifiedQueryStrings, - AfdQueryStringCachingBehaviorUseQueryString, - } -} - -// Algorithm - Algorithm to use for URL signing -type Algorithm string - -const ( - AlgorithmSHA256 Algorithm = "SHA256" -) - -// PossibleAlgorithmValues returns the possible values for the Algorithm const type. -func PossibleAlgorithmValues() []Algorithm { - return []Algorithm{ - AlgorithmSHA256, - } -} - -// AutoGeneratedDomainNameLabelScope - Indicates the endpoint name reuse scope. The default value is TenantReuse. -type AutoGeneratedDomainNameLabelScope string - -const ( - AutoGeneratedDomainNameLabelScopeNoReuse AutoGeneratedDomainNameLabelScope = "NoReuse" - AutoGeneratedDomainNameLabelScopeResourceGroupReuse AutoGeneratedDomainNameLabelScope = "ResourceGroupReuse" - AutoGeneratedDomainNameLabelScopeSubscriptionReuse AutoGeneratedDomainNameLabelScope = "SubscriptionReuse" - AutoGeneratedDomainNameLabelScopeTenantReuse AutoGeneratedDomainNameLabelScope = "TenantReuse" -) - -// PossibleAutoGeneratedDomainNameLabelScopeValues returns the possible values for the AutoGeneratedDomainNameLabelScope const type. -func PossibleAutoGeneratedDomainNameLabelScopeValues() []AutoGeneratedDomainNameLabelScope { - return []AutoGeneratedDomainNameLabelScope{ - AutoGeneratedDomainNameLabelScopeNoReuse, - AutoGeneratedDomainNameLabelScopeResourceGroupReuse, - AutoGeneratedDomainNameLabelScopeSubscriptionReuse, - AutoGeneratedDomainNameLabelScopeTenantReuse, - } -} - -// CacheBehavior - Caching behavior for the requests -type CacheBehavior string - -const ( - CacheBehaviorBypassCache CacheBehavior = "BypassCache" - CacheBehaviorOverride CacheBehavior = "Override" - CacheBehaviorSetIfMissing CacheBehavior = "SetIfMissing" -) - -// PossibleCacheBehaviorValues returns the possible values for the CacheBehavior const type. -func PossibleCacheBehaviorValues() []CacheBehavior { - return []CacheBehavior{ - CacheBehaviorBypassCache, - CacheBehaviorOverride, - CacheBehaviorSetIfMissing, - } -} - -type CacheExpirationActionParametersTypeName string - -const ( - CacheExpirationActionParametersTypeNameDeliveryRuleCacheExpirationActionParameters CacheExpirationActionParametersTypeName = "DeliveryRuleCacheExpirationActionParameters" -) - -// PossibleCacheExpirationActionParametersTypeNameValues returns the possible values for the CacheExpirationActionParametersTypeName const type. -func PossibleCacheExpirationActionParametersTypeNameValues() []CacheExpirationActionParametersTypeName { - return []CacheExpirationActionParametersTypeName{ - CacheExpirationActionParametersTypeNameDeliveryRuleCacheExpirationActionParameters, - } -} - -type CacheKeyQueryStringActionParametersTypeName string - -const ( - CacheKeyQueryStringActionParametersTypeNameDeliveryRuleCacheKeyQueryStringBehaviorActionParameters CacheKeyQueryStringActionParametersTypeName = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" -) - -// PossibleCacheKeyQueryStringActionParametersTypeNameValues returns the possible values for the CacheKeyQueryStringActionParametersTypeName const type. -func PossibleCacheKeyQueryStringActionParametersTypeNameValues() []CacheKeyQueryStringActionParametersTypeName { - return []CacheKeyQueryStringActionParametersTypeName{ - CacheKeyQueryStringActionParametersTypeNameDeliveryRuleCacheKeyQueryStringBehaviorActionParameters, - } -} - -// CacheType - The level at which the content needs to be cached. -type CacheType string - -const ( - CacheTypeAll CacheType = "All" -) - -// PossibleCacheTypeValues returns the possible values for the CacheType const type. -func PossibleCacheTypeValues() []CacheType { - return []CacheType{ - CacheTypeAll, - } -} - -type CdnCertificateSourceParametersTypeName string - -const ( - CdnCertificateSourceParametersTypeNameCdnCertificateSourceParameters CdnCertificateSourceParametersTypeName = "CdnCertificateSourceParameters" -) - -// PossibleCdnCertificateSourceParametersTypeNameValues returns the possible values for the CdnCertificateSourceParametersTypeName const type. -func PossibleCdnCertificateSourceParametersTypeNameValues() []CdnCertificateSourceParametersTypeName { - return []CdnCertificateSourceParametersTypeName{ - CdnCertificateSourceParametersTypeNameCdnCertificateSourceParameters, - } -} - -// CertificateSource - Defines the source of the SSL certificate. -type CertificateSource string - -const ( - CertificateSourceAzureKeyVault CertificateSource = "AzureKeyVault" - CertificateSourceCdn CertificateSource = "Cdn" -) - -// PossibleCertificateSourceValues returns the possible values for the CertificateSource const type. -func PossibleCertificateSourceValues() []CertificateSource { - return []CertificateSource{ - CertificateSourceAzureKeyVault, - CertificateSourceCdn, - } -} - -// CertificateType - Type of certificate used -type CertificateType string - -const ( - CertificateTypeDedicated CertificateType = "Dedicated" - CertificateTypeShared CertificateType = "Shared" -) - -// PossibleCertificateTypeValues returns the possible values for the CertificateType const type. -func PossibleCertificateTypeValues() []CertificateType { - return []CertificateType{ - CertificateTypeDedicated, - CertificateTypeShared, - } -} - -type ClientPortMatchConditionParametersTypeName string - -const ( - ClientPortMatchConditionParametersTypeNameDeliveryRuleClientPortConditionParameters ClientPortMatchConditionParametersTypeName = "DeliveryRuleClientPortConditionParameters" -) - -// PossibleClientPortMatchConditionParametersTypeNameValues returns the possible values for the ClientPortMatchConditionParametersTypeName const type. -func PossibleClientPortMatchConditionParametersTypeNameValues() []ClientPortMatchConditionParametersTypeName { - return []ClientPortMatchConditionParametersTypeName{ - ClientPortMatchConditionParametersTypeNameDeliveryRuleClientPortConditionParameters, - } -} - -// ClientPortOperator - Describes operator to be matched -type ClientPortOperator string - -const ( - ClientPortOperatorAny ClientPortOperator = "Any" - ClientPortOperatorBeginsWith ClientPortOperator = "BeginsWith" - ClientPortOperatorContains ClientPortOperator = "Contains" - ClientPortOperatorEndsWith ClientPortOperator = "EndsWith" - ClientPortOperatorEqual ClientPortOperator = "Equal" - ClientPortOperatorGreaterThan ClientPortOperator = "GreaterThan" - ClientPortOperatorGreaterThanOrEqual ClientPortOperator = "GreaterThanOrEqual" - ClientPortOperatorLessThan ClientPortOperator = "LessThan" - ClientPortOperatorLessThanOrEqual ClientPortOperator = "LessThanOrEqual" - ClientPortOperatorRegEx ClientPortOperator = "RegEx" -) - -// PossibleClientPortOperatorValues returns the possible values for the ClientPortOperator const type. -func PossibleClientPortOperatorValues() []ClientPortOperator { - return []ClientPortOperator{ - ClientPortOperatorAny, - ClientPortOperatorBeginsWith, - ClientPortOperatorContains, - ClientPortOperatorEndsWith, - ClientPortOperatorEqual, - ClientPortOperatorGreaterThan, - ClientPortOperatorGreaterThanOrEqual, - ClientPortOperatorLessThan, - ClientPortOperatorLessThanOrEqual, - ClientPortOperatorRegEx, - } -} - -type CookiesMatchConditionParametersTypeName string - -const ( - CookiesMatchConditionParametersTypeNameDeliveryRuleCookiesConditionParameters CookiesMatchConditionParametersTypeName = "DeliveryRuleCookiesConditionParameters" -) - -// PossibleCookiesMatchConditionParametersTypeNameValues returns the possible values for the CookiesMatchConditionParametersTypeName const type. -func PossibleCookiesMatchConditionParametersTypeNameValues() []CookiesMatchConditionParametersTypeName { - return []CookiesMatchConditionParametersTypeName{ - CookiesMatchConditionParametersTypeNameDeliveryRuleCookiesConditionParameters, - } -} - -// CookiesOperator - Describes operator to be matched -type CookiesOperator string - -const ( - CookiesOperatorAny CookiesOperator = "Any" - CookiesOperatorBeginsWith CookiesOperator = "BeginsWith" - CookiesOperatorContains CookiesOperator = "Contains" - CookiesOperatorEndsWith CookiesOperator = "EndsWith" - CookiesOperatorEqual CookiesOperator = "Equal" - CookiesOperatorGreaterThan CookiesOperator = "GreaterThan" - CookiesOperatorGreaterThanOrEqual CookiesOperator = "GreaterThanOrEqual" - CookiesOperatorLessThan CookiesOperator = "LessThan" - CookiesOperatorLessThanOrEqual CookiesOperator = "LessThanOrEqual" - CookiesOperatorRegEx CookiesOperator = "RegEx" -) - -// PossibleCookiesOperatorValues returns the possible values for the CookiesOperator const type. -func PossibleCookiesOperatorValues() []CookiesOperator { - return []CookiesOperator{ - CookiesOperatorAny, - CookiesOperatorBeginsWith, - CookiesOperatorContains, - CookiesOperatorEndsWith, - CookiesOperatorEqual, - CookiesOperatorGreaterThan, - CookiesOperatorGreaterThanOrEqual, - CookiesOperatorLessThan, - CookiesOperatorLessThanOrEqual, - CookiesOperatorRegEx, - } -} - -// CustomDomainResourceState - Resource status of the custom domain. -type CustomDomainResourceState string - -const ( - CustomDomainResourceStateActive CustomDomainResourceState = "Active" - CustomDomainResourceStateCreating CustomDomainResourceState = "Creating" - CustomDomainResourceStateDeleting CustomDomainResourceState = "Deleting" -) - -// PossibleCustomDomainResourceStateValues returns the possible values for the CustomDomainResourceState const type. -func PossibleCustomDomainResourceStateValues() []CustomDomainResourceState { - return []CustomDomainResourceState{ - CustomDomainResourceStateActive, - CustomDomainResourceStateCreating, - CustomDomainResourceStateDeleting, - } -} - -// CustomHTTPSProvisioningState - Provisioning status of the custom domain. -type CustomHTTPSProvisioningState string - -const ( - CustomHTTPSProvisioningStateDisabled CustomHTTPSProvisioningState = "Disabled" - CustomHTTPSProvisioningStateDisabling CustomHTTPSProvisioningState = "Disabling" - CustomHTTPSProvisioningStateEnabled CustomHTTPSProvisioningState = "Enabled" - CustomHTTPSProvisioningStateEnabling CustomHTTPSProvisioningState = "Enabling" - CustomHTTPSProvisioningStateFailed CustomHTTPSProvisioningState = "Failed" -) - -// PossibleCustomHTTPSProvisioningStateValues returns the possible values for the CustomHTTPSProvisioningState const type. -func PossibleCustomHTTPSProvisioningStateValues() []CustomHTTPSProvisioningState { - return []CustomHTTPSProvisioningState{ - CustomHTTPSProvisioningStateDisabled, - CustomHTTPSProvisioningStateDisabling, - CustomHTTPSProvisioningStateEnabled, - CustomHTTPSProvisioningStateEnabling, - CustomHTTPSProvisioningStateFailed, - } -} - -// CustomHTTPSProvisioningSubstate - Provisioning substate shows the progress of custom HTTPS enabling/disabling process step -// by step. -type CustomHTTPSProvisioningSubstate string - -const ( - CustomHTTPSProvisioningSubstateCertificateDeleted CustomHTTPSProvisioningSubstate = "CertificateDeleted" - CustomHTTPSProvisioningSubstateCertificateDeployed CustomHTTPSProvisioningSubstate = "CertificateDeployed" - CustomHTTPSProvisioningSubstateDeletingCertificate CustomHTTPSProvisioningSubstate = "DeletingCertificate" - CustomHTTPSProvisioningSubstateDeployingCertificate CustomHTTPSProvisioningSubstate = "DeployingCertificate" - CustomHTTPSProvisioningSubstateDomainControlValidationRequestApproved CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestApproved" - CustomHTTPSProvisioningSubstateDomainControlValidationRequestRejected CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestRejected" - CustomHTTPSProvisioningSubstateDomainControlValidationRequestTimedOut CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestTimedOut" - CustomHTTPSProvisioningSubstateIssuingCertificate CustomHTTPSProvisioningSubstate = "IssuingCertificate" - CustomHTTPSProvisioningSubstatePendingDomainControlValidationREquestApproval CustomHTTPSProvisioningSubstate = "PendingDomainControlValidationREquestApproval" - CustomHTTPSProvisioningSubstateSubmittingDomainControlValidationRequest CustomHTTPSProvisioningSubstate = "SubmittingDomainControlValidationRequest" -) - -// PossibleCustomHTTPSProvisioningSubstateValues returns the possible values for the CustomHTTPSProvisioningSubstate const type. -func PossibleCustomHTTPSProvisioningSubstateValues() []CustomHTTPSProvisioningSubstate { - return []CustomHTTPSProvisioningSubstate{ - CustomHTTPSProvisioningSubstateCertificateDeleted, - CustomHTTPSProvisioningSubstateCertificateDeployed, - CustomHTTPSProvisioningSubstateDeletingCertificate, - CustomHTTPSProvisioningSubstateDeployingCertificate, - CustomHTTPSProvisioningSubstateDomainControlValidationRequestApproved, - CustomHTTPSProvisioningSubstateDomainControlValidationRequestRejected, - CustomHTTPSProvisioningSubstateDomainControlValidationRequestTimedOut, - CustomHTTPSProvisioningSubstateIssuingCertificate, - CustomHTTPSProvisioningSubstatePendingDomainControlValidationREquestApproval, - CustomHTTPSProvisioningSubstateSubmittingDomainControlValidationRequest, - } -} - -// CustomRuleEnabledState - Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. -type CustomRuleEnabledState string - -const ( - CustomRuleEnabledStateDisabled CustomRuleEnabledState = "Disabled" - CustomRuleEnabledStateEnabled CustomRuleEnabledState = "Enabled" -) - -// PossibleCustomRuleEnabledStateValues returns the possible values for the CustomRuleEnabledState const type. -func PossibleCustomRuleEnabledStateValues() []CustomRuleEnabledState { - return []CustomRuleEnabledState{ - CustomRuleEnabledStateDisabled, - CustomRuleEnabledStateEnabled, - } -} - -// DeleteRule - Describes the action that shall be taken when the certificate is removed from Key Vault. -type DeleteRule string - -const ( - DeleteRuleNoAction DeleteRule = "NoAction" -) - -// PossibleDeleteRuleValues returns the possible values for the DeleteRule const type. -func PossibleDeleteRuleValues() []DeleteRule { - return []DeleteRule{ - DeleteRuleNoAction, - } -} - -// DeliveryRuleAction - The name of the action for the delivery rule. -type DeliveryRuleAction string - -const ( - DeliveryRuleActionCacheExpiration DeliveryRuleAction = "CacheExpiration" - DeliveryRuleActionCacheKeyQueryString DeliveryRuleAction = "CacheKeyQueryString" - DeliveryRuleActionModifyRequestHeader DeliveryRuleAction = "ModifyRequestHeader" - DeliveryRuleActionModifyResponseHeader DeliveryRuleAction = "ModifyResponseHeader" - DeliveryRuleActionOriginGroupOverride DeliveryRuleAction = "OriginGroupOverride" - DeliveryRuleActionRouteConfigurationOverride DeliveryRuleAction = "RouteConfigurationOverride" - DeliveryRuleActionURLRedirect DeliveryRuleAction = "UrlRedirect" - DeliveryRuleActionURLRewrite DeliveryRuleAction = "UrlRewrite" - DeliveryRuleActionURLSigning DeliveryRuleAction = "UrlSigning" -) - -// PossibleDeliveryRuleActionValues returns the possible values for the DeliveryRuleAction const type. -func PossibleDeliveryRuleActionValues() []DeliveryRuleAction { - return []DeliveryRuleAction{ - DeliveryRuleActionCacheExpiration, - DeliveryRuleActionCacheKeyQueryString, - DeliveryRuleActionModifyRequestHeader, - DeliveryRuleActionModifyResponseHeader, - DeliveryRuleActionOriginGroupOverride, - DeliveryRuleActionRouteConfigurationOverride, - DeliveryRuleActionURLRedirect, - DeliveryRuleActionURLRewrite, - DeliveryRuleActionURLSigning, - } -} - -type DeploymentStatus string - -const ( - DeploymentStatusFailed DeploymentStatus = "Failed" - DeploymentStatusInProgress DeploymentStatus = "InProgress" - DeploymentStatusNotStarted DeploymentStatus = "NotStarted" - DeploymentStatusSucceeded DeploymentStatus = "Succeeded" -) - -// PossibleDeploymentStatusValues returns the possible values for the DeploymentStatus const type. -func PossibleDeploymentStatusValues() []DeploymentStatus { - return []DeploymentStatus{ - DeploymentStatusFailed, - DeploymentStatusInProgress, - DeploymentStatusNotStarted, - DeploymentStatusSucceeded, - } -} - -// DestinationProtocol - Protocol to use for the redirect. The default value is MatchRequest -type DestinationProtocol string - -const ( - DestinationProtocolHTTP DestinationProtocol = "Http" - DestinationProtocolHTTPS DestinationProtocol = "Https" - DestinationProtocolMatchRequest DestinationProtocol = "MatchRequest" -) - -// PossibleDestinationProtocolValues returns the possible values for the DestinationProtocol const type. -func PossibleDestinationProtocolValues() []DestinationProtocol { - return []DestinationProtocol{ - DestinationProtocolHTTP, - DestinationProtocolHTTPS, - DestinationProtocolMatchRequest, - } -} - -// DomainValidationState - Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. -// DCV stands for DomainControlValidation. -type DomainValidationState string - -const ( - DomainValidationStateApproved DomainValidationState = "Approved" - DomainValidationStateInternalError DomainValidationState = "InternalError" - DomainValidationStatePending DomainValidationState = "Pending" - DomainValidationStatePendingRevalidation DomainValidationState = "PendingRevalidation" - DomainValidationStateRefreshingValidationToken DomainValidationState = "RefreshingValidationToken" - DomainValidationStateRejected DomainValidationState = "Rejected" - DomainValidationStateSubmitting DomainValidationState = "Submitting" - DomainValidationStateTimedOut DomainValidationState = "TimedOut" - DomainValidationStateUnknown DomainValidationState = "Unknown" -) - -// PossibleDomainValidationStateValues returns the possible values for the DomainValidationState const type. -func PossibleDomainValidationStateValues() []DomainValidationState { - return []DomainValidationState{ - DomainValidationStateApproved, - DomainValidationStateInternalError, - DomainValidationStatePending, - DomainValidationStatePendingRevalidation, - DomainValidationStateRefreshingValidationToken, - DomainValidationStateRejected, - DomainValidationStateSubmitting, - DomainValidationStateTimedOut, - DomainValidationStateUnknown, - } -} - -// EnabledState - Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' -type EnabledState string - -const ( - EnabledStateDisabled EnabledState = "Disabled" - EnabledStateEnabled EnabledState = "Enabled" -) - -// PossibleEnabledStateValues returns the possible values for the EnabledState const type. -func PossibleEnabledStateValues() []EnabledState { - return []EnabledState{ - EnabledStateDisabled, - EnabledStateEnabled, - } -} - -// EndpointProvisioningState - Provisioning status of the endpoint. -type EndpointProvisioningState string - -const ( - EndpointProvisioningStateCreating EndpointProvisioningState = "Creating" - EndpointProvisioningStateDeleting EndpointProvisioningState = "Deleting" - EndpointProvisioningStateFailed EndpointProvisioningState = "Failed" - EndpointProvisioningStateSucceeded EndpointProvisioningState = "Succeeded" - EndpointProvisioningStateUpdating EndpointProvisioningState = "Updating" -) - -// PossibleEndpointProvisioningStateValues returns the possible values for the EndpointProvisioningState const type. -func PossibleEndpointProvisioningStateValues() []EndpointProvisioningState { - return []EndpointProvisioningState{ - EndpointProvisioningStateCreating, - EndpointProvisioningStateDeleting, - EndpointProvisioningStateFailed, - EndpointProvisioningStateSucceeded, - EndpointProvisioningStateUpdating, - } -} - -// EndpointResourceState - Resource status of the endpoint. -type EndpointResourceState string - -const ( - EndpointResourceStateCreating EndpointResourceState = "Creating" - EndpointResourceStateDeleting EndpointResourceState = "Deleting" - EndpointResourceStateRunning EndpointResourceState = "Running" - EndpointResourceStateStarting EndpointResourceState = "Starting" - EndpointResourceStateStopped EndpointResourceState = "Stopped" - EndpointResourceStateStopping EndpointResourceState = "Stopping" -) - -// PossibleEndpointResourceStateValues returns the possible values for the EndpointResourceState const type. -func PossibleEndpointResourceStateValues() []EndpointResourceState { - return []EndpointResourceState{ - EndpointResourceStateCreating, - EndpointResourceStateDeleting, - EndpointResourceStateRunning, - EndpointResourceStateStarting, - EndpointResourceStateStopped, - EndpointResourceStateStopping, - } -} - -// ForwardingProtocol - Protocol this rule will use when forwarding traffic to backends. -type ForwardingProtocol string - -const ( - ForwardingProtocolHTTPOnly ForwardingProtocol = "HttpOnly" - ForwardingProtocolHTTPSOnly ForwardingProtocol = "HttpsOnly" - ForwardingProtocolMatchRequest ForwardingProtocol = "MatchRequest" -) - -// PossibleForwardingProtocolValues returns the possible values for the ForwardingProtocol const type. -func PossibleForwardingProtocolValues() []ForwardingProtocol { - return []ForwardingProtocol{ - ForwardingProtocolHTTPOnly, - ForwardingProtocolHTTPSOnly, - ForwardingProtocolMatchRequest, - } -} - -// GeoFilterActions - Action of the geo filter, i.e. allow or block access. -type GeoFilterActions string - -const ( - GeoFilterActionsBlock GeoFilterActions = "Block" - GeoFilterActionsAllow GeoFilterActions = "Allow" -) - -// PossibleGeoFilterActionsValues returns the possible values for the GeoFilterActions const type. -func PossibleGeoFilterActionsValues() []GeoFilterActions { - return []GeoFilterActions{ - GeoFilterActionsBlock, - GeoFilterActionsAllow, - } -} - -// HTTPSRedirect - Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up -// this rule and it will be the first rule that gets executed. -type HTTPSRedirect string - -const ( - HTTPSRedirectDisabled HTTPSRedirect = "Disabled" - HTTPSRedirectEnabled HTTPSRedirect = "Enabled" -) - -// PossibleHTTPSRedirectValues returns the possible values for the HTTPSRedirect const type. -func PossibleHTTPSRedirectValues() []HTTPSRedirect { - return []HTTPSRedirect{ - HTTPSRedirectDisabled, - HTTPSRedirectEnabled, - } -} - -type HTTPVersionMatchConditionParametersTypeName string - -const ( - HTTPVersionMatchConditionParametersTypeNameDeliveryRuleHTTPVersionConditionParameters HTTPVersionMatchConditionParametersTypeName = "DeliveryRuleHttpVersionConditionParameters" -) - -// PossibleHTTPVersionMatchConditionParametersTypeNameValues returns the possible values for the HTTPVersionMatchConditionParametersTypeName const type. -func PossibleHTTPVersionMatchConditionParametersTypeNameValues() []HTTPVersionMatchConditionParametersTypeName { - return []HTTPVersionMatchConditionParametersTypeName{ - HTTPVersionMatchConditionParametersTypeNameDeliveryRuleHTTPVersionConditionParameters, - } -} - -// HTTPVersionOperator - Describes operator to be matched -type HTTPVersionOperator string - -const ( - HTTPVersionOperatorEqual HTTPVersionOperator = "Equal" -) - -// PossibleHTTPVersionOperatorValues returns the possible values for the HTTPVersionOperator const type. -func PossibleHTTPVersionOperatorValues() []HTTPVersionOperator { - return []HTTPVersionOperator{ - HTTPVersionOperatorEqual, - } -} - -// HeaderAction - Action to perform -type HeaderAction string - -const ( - HeaderActionAppend HeaderAction = "Append" - HeaderActionDelete HeaderAction = "Delete" - HeaderActionOverwrite HeaderAction = "Overwrite" -) - -// PossibleHeaderActionValues returns the possible values for the HeaderAction const type. -func PossibleHeaderActionValues() []HeaderAction { - return []HeaderAction{ - HeaderActionAppend, - HeaderActionDelete, - HeaderActionOverwrite, - } -} - -type HeaderActionParametersTypeName string - -const ( - HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters HeaderActionParametersTypeName = "DeliveryRuleHeaderActionParameters" -) - -// PossibleHeaderActionParametersTypeNameValues returns the possible values for the HeaderActionParametersTypeName const type. -func PossibleHeaderActionParametersTypeNameValues() []HeaderActionParametersTypeName { - return []HeaderActionParametersTypeName{ - HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters, - } -} - -// HealthProbeRequestType - The type of health probe request that is made. -type HealthProbeRequestType string - -const ( - HealthProbeRequestTypeNotSet HealthProbeRequestType = "NotSet" - HealthProbeRequestTypeGET HealthProbeRequestType = "GET" - HealthProbeRequestTypeHEAD HealthProbeRequestType = "HEAD" -) - -// PossibleHealthProbeRequestTypeValues returns the possible values for the HealthProbeRequestType const type. -func PossibleHealthProbeRequestTypeValues() []HealthProbeRequestType { - return []HealthProbeRequestType{ - HealthProbeRequestTypeNotSet, - HealthProbeRequestTypeGET, - HealthProbeRequestTypeHEAD, - } -} - -type HostNameMatchConditionParametersTypeName string - -const ( - HostNameMatchConditionParametersTypeNameDeliveryRuleHostNameConditionParameters HostNameMatchConditionParametersTypeName = "DeliveryRuleHostNameConditionParameters" -) - -// PossibleHostNameMatchConditionParametersTypeNameValues returns the possible values for the HostNameMatchConditionParametersTypeName const type. -func PossibleHostNameMatchConditionParametersTypeNameValues() []HostNameMatchConditionParametersTypeName { - return []HostNameMatchConditionParametersTypeName{ - HostNameMatchConditionParametersTypeNameDeliveryRuleHostNameConditionParameters, - } -} - -// HostNameOperator - Describes operator to be matched -type HostNameOperator string - -const ( - HostNameOperatorAny HostNameOperator = "Any" - HostNameOperatorBeginsWith HostNameOperator = "BeginsWith" - HostNameOperatorContains HostNameOperator = "Contains" - HostNameOperatorEndsWith HostNameOperator = "EndsWith" - HostNameOperatorEqual HostNameOperator = "Equal" - HostNameOperatorGreaterThan HostNameOperator = "GreaterThan" - HostNameOperatorGreaterThanOrEqual HostNameOperator = "GreaterThanOrEqual" - HostNameOperatorLessThan HostNameOperator = "LessThan" - HostNameOperatorLessThanOrEqual HostNameOperator = "LessThanOrEqual" - HostNameOperatorRegEx HostNameOperator = "RegEx" -) - -// PossibleHostNameOperatorValues returns the possible values for the HostNameOperator const type. -func PossibleHostNameOperatorValues() []HostNameOperator { - return []HostNameOperator{ - HostNameOperatorAny, - HostNameOperatorBeginsWith, - HostNameOperatorContains, - HostNameOperatorEndsWith, - HostNameOperatorEqual, - HostNameOperatorGreaterThan, - HostNameOperatorGreaterThanOrEqual, - HostNameOperatorLessThan, - HostNameOperatorLessThanOrEqual, - HostNameOperatorRegEx, - } -} - -// IdentityType - The type of identity that creates/modifies resources -type IdentityType string - -const ( - IdentityTypeApplication IdentityType = "application" - IdentityTypeKey IdentityType = "key" - IdentityTypeManagedIdentity IdentityType = "managedIdentity" - IdentityTypeUser IdentityType = "user" -) - -// PossibleIdentityTypeValues returns the possible values for the IdentityType const type. -func PossibleIdentityTypeValues() []IdentityType { - return []IdentityType{ - IdentityTypeApplication, - IdentityTypeKey, - IdentityTypeManagedIdentity, - IdentityTypeUser, - } -} - -type IsDeviceMatchConditionParametersMatchValuesItem string - -const ( - IsDeviceMatchConditionParametersMatchValuesItemDesktop IsDeviceMatchConditionParametersMatchValuesItem = "Desktop" - IsDeviceMatchConditionParametersMatchValuesItemMobile IsDeviceMatchConditionParametersMatchValuesItem = "Mobile" -) - -// PossibleIsDeviceMatchConditionParametersMatchValuesItemValues returns the possible values for the IsDeviceMatchConditionParametersMatchValuesItem const type. -func PossibleIsDeviceMatchConditionParametersMatchValuesItemValues() []IsDeviceMatchConditionParametersMatchValuesItem { - return []IsDeviceMatchConditionParametersMatchValuesItem{ - IsDeviceMatchConditionParametersMatchValuesItemDesktop, - IsDeviceMatchConditionParametersMatchValuesItemMobile, - } -} - -type IsDeviceMatchConditionParametersTypeName string - -const ( - IsDeviceMatchConditionParametersTypeNameDeliveryRuleIsDeviceConditionParameters IsDeviceMatchConditionParametersTypeName = "DeliveryRuleIsDeviceConditionParameters" -) - -// PossibleIsDeviceMatchConditionParametersTypeNameValues returns the possible values for the IsDeviceMatchConditionParametersTypeName const type. -func PossibleIsDeviceMatchConditionParametersTypeNameValues() []IsDeviceMatchConditionParametersTypeName { - return []IsDeviceMatchConditionParametersTypeName{ - IsDeviceMatchConditionParametersTypeNameDeliveryRuleIsDeviceConditionParameters, - } -} - -// IsDeviceOperator - Describes operator to be matched -type IsDeviceOperator string - -const ( - IsDeviceOperatorEqual IsDeviceOperator = "Equal" -) - -// PossibleIsDeviceOperatorValues returns the possible values for the IsDeviceOperator const type. -func PossibleIsDeviceOperatorValues() []IsDeviceOperator { - return []IsDeviceOperator{ - IsDeviceOperatorEqual, - } -} - -type KeyVaultCertificateSourceParametersTypeName string - -const ( - KeyVaultCertificateSourceParametersTypeNameKeyVaultCertificateSourceParameters KeyVaultCertificateSourceParametersTypeName = "KeyVaultCertificateSourceParameters" -) - -// PossibleKeyVaultCertificateSourceParametersTypeNameValues returns the possible values for the KeyVaultCertificateSourceParametersTypeName const type. -func PossibleKeyVaultCertificateSourceParametersTypeNameValues() []KeyVaultCertificateSourceParametersTypeName { - return []KeyVaultCertificateSourceParametersTypeName{ - KeyVaultCertificateSourceParametersTypeNameKeyVaultCertificateSourceParameters, - } -} - -type KeyVaultSigningKeyParametersTypeName string - -const ( - KeyVaultSigningKeyParametersTypeNameKeyVaultSigningKeyParameters KeyVaultSigningKeyParametersTypeName = "KeyVaultSigningKeyParameters" -) - -// PossibleKeyVaultSigningKeyParametersTypeNameValues returns the possible values for the KeyVaultSigningKeyParametersTypeName const type. -func PossibleKeyVaultSigningKeyParametersTypeNameValues() []KeyVaultSigningKeyParametersTypeName { - return []KeyVaultSigningKeyParametersTypeName{ - KeyVaultSigningKeyParametersTypeNameKeyVaultSigningKeyParameters, - } -} - -// LinkToDefaultDomain - whether this route will be linked to the default endpoint domain. -type LinkToDefaultDomain string - -const ( - LinkToDefaultDomainDisabled LinkToDefaultDomain = "Disabled" - LinkToDefaultDomainEnabled LinkToDefaultDomain = "Enabled" -) - -// PossibleLinkToDefaultDomainValues returns the possible values for the LinkToDefaultDomain const type. -func PossibleLinkToDefaultDomainValues() []LinkToDefaultDomain { - return []LinkToDefaultDomain{ - LinkToDefaultDomainDisabled, - LinkToDefaultDomainEnabled, - } -} - -type LogMetric string - -const ( - LogMetricClientRequestBandwidth LogMetric = "clientRequestBandwidth" - LogMetricClientRequestCount LogMetric = "clientRequestCount" - LogMetricClientRequestTraffic LogMetric = "clientRequestTraffic" - LogMetricOriginRequestBandwidth LogMetric = "originRequestBandwidth" - LogMetricOriginRequestTraffic LogMetric = "originRequestTraffic" - LogMetricTotalLatency LogMetric = "totalLatency" -) - -// PossibleLogMetricValues returns the possible values for the LogMetric const type. -func PossibleLogMetricValues() []LogMetric { - return []LogMetric{ - LogMetricClientRequestBandwidth, - LogMetricClientRequestCount, - LogMetricClientRequestTraffic, - LogMetricOriginRequestBandwidth, - LogMetricOriginRequestTraffic, - LogMetricTotalLatency, - } -} - -type LogMetricsGranularity string - -const ( - LogMetricsGranularityP1D LogMetricsGranularity = "P1D" - LogMetricsGranularityPT1H LogMetricsGranularity = "PT1H" - LogMetricsGranularityPT5M LogMetricsGranularity = "PT5M" -) - -// PossibleLogMetricsGranularityValues returns the possible values for the LogMetricsGranularity const type. -func PossibleLogMetricsGranularityValues() []LogMetricsGranularity { - return []LogMetricsGranularity{ - LogMetricsGranularityP1D, - LogMetricsGranularityPT1H, - LogMetricsGranularityPT5M, - } -} - -type LogMetricsGroupBy string - -const ( - LogMetricsGroupByCacheStatus LogMetricsGroupBy = "cacheStatus" - LogMetricsGroupByCountryOrRegion LogMetricsGroupBy = "countryOrRegion" - LogMetricsGroupByCustomDomain LogMetricsGroupBy = "customDomain" - LogMetricsGroupByHTTPStatusCode LogMetricsGroupBy = "httpStatusCode" - LogMetricsGroupByProtocol LogMetricsGroupBy = "protocol" -) - -// PossibleLogMetricsGroupByValues returns the possible values for the LogMetricsGroupBy const type. -func PossibleLogMetricsGroupByValues() []LogMetricsGroupBy { - return []LogMetricsGroupBy{ - LogMetricsGroupByCacheStatus, - LogMetricsGroupByCountryOrRegion, - LogMetricsGroupByCustomDomain, - LogMetricsGroupByHTTPStatusCode, - LogMetricsGroupByProtocol, - } -} - -type LogRanking string - -const ( - LogRankingBrowser LogRanking = "browser" - LogRankingCountryOrRegion LogRanking = "countryOrRegion" - LogRankingReferrer LogRanking = "referrer" - LogRankingURL LogRanking = "url" - LogRankingUserAgent LogRanking = "userAgent" -) - -// PossibleLogRankingValues returns the possible values for the LogRanking const type. -func PossibleLogRankingValues() []LogRanking { - return []LogRanking{ - LogRankingBrowser, - LogRankingCountryOrRegion, - LogRankingReferrer, - LogRankingURL, - LogRankingUserAgent, - } -} - -type LogRankingMetric string - -const ( - LogRankingMetricClientRequestCount LogRankingMetric = "clientRequestCount" - LogRankingMetricClientRequestTraffic LogRankingMetric = "clientRequestTraffic" - LogRankingMetricErrorCount LogRankingMetric = "errorCount" - LogRankingMetricHitCount LogRankingMetric = "hitCount" - LogRankingMetricMissCount LogRankingMetric = "missCount" - LogRankingMetricUserErrorCount LogRankingMetric = "userErrorCount" -) - -// PossibleLogRankingMetricValues returns the possible values for the LogRankingMetric const type. -func PossibleLogRankingMetricValues() []LogRankingMetric { - return []LogRankingMetric{ - LogRankingMetricClientRequestCount, - LogRankingMetricClientRequestTraffic, - LogRankingMetricErrorCount, - LogRankingMetricHitCount, - LogRankingMetricMissCount, - LogRankingMetricUserErrorCount, - } -} - -// ManagedRuleEnabledState - Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. -type ManagedRuleEnabledState string - -const ( - ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" - ManagedRuleEnabledStateEnabled ManagedRuleEnabledState = "Enabled" -) - -// PossibleManagedRuleEnabledStateValues returns the possible values for the ManagedRuleEnabledState const type. -func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { - return []ManagedRuleEnabledState{ - ManagedRuleEnabledStateDisabled, - ManagedRuleEnabledStateEnabled, - } -} - -// MatchProcessingBehavior - If this rule is a match should the rules engine continue running the remaining rules or stop. -// If not present, defaults to Continue. -type MatchProcessingBehavior string - -const ( - MatchProcessingBehaviorContinue MatchProcessingBehavior = "Continue" - MatchProcessingBehaviorStop MatchProcessingBehavior = "Stop" -) - -// PossibleMatchProcessingBehaviorValues returns the possible values for the MatchProcessingBehavior const type. -func PossibleMatchProcessingBehaviorValues() []MatchProcessingBehavior { - return []MatchProcessingBehavior{ - MatchProcessingBehaviorContinue, - MatchProcessingBehaviorStop, - } -} - -// MatchVariable - The name of the condition for the delivery rule. -type MatchVariable string - -const ( - MatchVariableClientPort MatchVariable = "ClientPort" - MatchVariableCookies MatchVariable = "Cookies" - MatchVariableHTTPVersion MatchVariable = "HttpVersion" - MatchVariableHostName MatchVariable = "HostName" - MatchVariableIsDevice MatchVariable = "IsDevice" - MatchVariablePostArgs MatchVariable = "PostArgs" - MatchVariableQueryString MatchVariable = "QueryString" - MatchVariableRemoteAddress MatchVariable = "RemoteAddress" - MatchVariableRequestBody MatchVariable = "RequestBody" - MatchVariableRequestHeader MatchVariable = "RequestHeader" - MatchVariableRequestMethod MatchVariable = "RequestMethod" - MatchVariableRequestScheme MatchVariable = "RequestScheme" - MatchVariableRequestURI MatchVariable = "RequestUri" - MatchVariableSSLProtocol MatchVariable = "SslProtocol" - MatchVariableServerPort MatchVariable = "ServerPort" - MatchVariableSocketAddr MatchVariable = "SocketAddr" - MatchVariableURLFileExtension MatchVariable = "UrlFileExtension" - MatchVariableURLFileName MatchVariable = "UrlFileName" - MatchVariableURLPath MatchVariable = "UrlPath" -) - -// PossibleMatchVariableValues returns the possible values for the MatchVariable const type. -func PossibleMatchVariableValues() []MatchVariable { - return []MatchVariable{ - MatchVariableClientPort, - MatchVariableCookies, - MatchVariableHTTPVersion, - MatchVariableHostName, - MatchVariableIsDevice, - MatchVariablePostArgs, - MatchVariableQueryString, - MatchVariableRemoteAddress, - MatchVariableRequestBody, - MatchVariableRequestHeader, - MatchVariableRequestMethod, - MatchVariableRequestScheme, - MatchVariableRequestURI, - MatchVariableSSLProtocol, - MatchVariableServerPort, - MatchVariableSocketAddr, - MatchVariableURLFileExtension, - MatchVariableURLFileName, - MatchVariableURLPath, - } -} - -type MetricsResponseGranularity string - -const ( - MetricsResponseGranularityP1D MetricsResponseGranularity = "P1D" - MetricsResponseGranularityPT1H MetricsResponseGranularity = "PT1H" - MetricsResponseGranularityPT5M MetricsResponseGranularity = "PT5M" -) - -// PossibleMetricsResponseGranularityValues returns the possible values for the MetricsResponseGranularity const type. -func PossibleMetricsResponseGranularityValues() []MetricsResponseGranularity { - return []MetricsResponseGranularity{ - MetricsResponseGranularityP1D, - MetricsResponseGranularityPT1H, - MetricsResponseGranularityPT5M, - } -} - -type MetricsResponseSeriesItemUnit string - -const ( - MetricsResponseSeriesItemUnitBitsPerSecond MetricsResponseSeriesItemUnit = "bitsPerSecond" - MetricsResponseSeriesItemUnitBytes MetricsResponseSeriesItemUnit = "bytes" - MetricsResponseSeriesItemUnitCount MetricsResponseSeriesItemUnit = "count" - MetricsResponseSeriesItemUnitMilliSeconds MetricsResponseSeriesItemUnit = "milliSeconds" -) - -// PossibleMetricsResponseSeriesItemUnitValues returns the possible values for the MetricsResponseSeriesItemUnit const type. -func PossibleMetricsResponseSeriesItemUnitValues() []MetricsResponseSeriesItemUnit { - return []MetricsResponseSeriesItemUnit{ - MetricsResponseSeriesItemUnitBitsPerSecond, - MetricsResponseSeriesItemUnitBytes, - MetricsResponseSeriesItemUnitCount, - MetricsResponseSeriesItemUnitMilliSeconds, - } -} - -// MinimumTLSVersion - TLS protocol version that will be used for Https -type MinimumTLSVersion string - -const ( - MinimumTLSVersionNone MinimumTLSVersion = "None" - MinimumTLSVersionTLS10 MinimumTLSVersion = "TLS10" - MinimumTLSVersionTLS12 MinimumTLSVersion = "TLS12" -) - -// PossibleMinimumTLSVersionValues returns the possible values for the MinimumTLSVersion const type. -func PossibleMinimumTLSVersionValues() []MinimumTLSVersion { - return []MinimumTLSVersion{ - MinimumTLSVersionNone, - MinimumTLSVersionTLS10, - MinimumTLSVersionTLS12, - } -} - -// Operator - Describes operator to be matched -type Operator string - -const ( - OperatorAny Operator = "Any" - OperatorBeginsWith Operator = "BeginsWith" - OperatorContains Operator = "Contains" - OperatorEndsWith Operator = "EndsWith" - OperatorEqual Operator = "Equal" - OperatorGeoMatch Operator = "GeoMatch" - OperatorGreaterThan Operator = "GreaterThan" - OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual" - OperatorIPMatch Operator = "IPMatch" - OperatorLessThan Operator = "LessThan" - OperatorLessThanOrEqual Operator = "LessThanOrEqual" - OperatorRegEx Operator = "RegEx" -) - -// PossibleOperatorValues returns the possible values for the Operator const type. -func PossibleOperatorValues() []Operator { - return []Operator{ - OperatorAny, - OperatorBeginsWith, - OperatorContains, - OperatorEndsWith, - OperatorEqual, - OperatorGeoMatch, - OperatorGreaterThan, - OperatorGreaterThanOrEqual, - OperatorIPMatch, - OperatorLessThan, - OperatorLessThanOrEqual, - OperatorRegEx, - } -} - -// OptimizationType - Specifies what scenario the customer wants this CDN endpoint to optimize, e.g. Download, Media services. -// With this information we can apply scenario driven optimization. -type OptimizationType string - -const ( - OptimizationTypeDynamicSiteAcceleration OptimizationType = "DynamicSiteAcceleration" - OptimizationTypeGeneralMediaStreaming OptimizationType = "GeneralMediaStreaming" - OptimizationTypeGeneralWebDelivery OptimizationType = "GeneralWebDelivery" - OptimizationTypeLargeFileDownload OptimizationType = "LargeFileDownload" - OptimizationTypeVideoOnDemandMediaStreaming OptimizationType = "VideoOnDemandMediaStreaming" -) - -// PossibleOptimizationTypeValues returns the possible values for the OptimizationType const type. -func PossibleOptimizationTypeValues() []OptimizationType { - return []OptimizationType{ - OptimizationTypeDynamicSiteAcceleration, - OptimizationTypeGeneralMediaStreaming, - OptimizationTypeGeneralWebDelivery, - OptimizationTypeLargeFileDownload, - OptimizationTypeVideoOnDemandMediaStreaming, - } -} - -type OriginGroupOverrideActionParametersTypeName string - -const ( - OriginGroupOverrideActionParametersTypeNameDeliveryRuleOriginGroupOverrideActionParameters OriginGroupOverrideActionParametersTypeName = "DeliveryRuleOriginGroupOverrideActionParameters" -) - -// PossibleOriginGroupOverrideActionParametersTypeNameValues returns the possible values for the OriginGroupOverrideActionParametersTypeName const type. -func PossibleOriginGroupOverrideActionParametersTypeNameValues() []OriginGroupOverrideActionParametersTypeName { - return []OriginGroupOverrideActionParametersTypeName{ - OriginGroupOverrideActionParametersTypeNameDeliveryRuleOriginGroupOverrideActionParameters, - } -} - -// OriginGroupProvisioningState - Provisioning status of the origin group. -type OriginGroupProvisioningState string - -const ( - OriginGroupProvisioningStateCreating OriginGroupProvisioningState = "Creating" - OriginGroupProvisioningStateDeleting OriginGroupProvisioningState = "Deleting" - OriginGroupProvisioningStateFailed OriginGroupProvisioningState = "Failed" - OriginGroupProvisioningStateSucceeded OriginGroupProvisioningState = "Succeeded" - OriginGroupProvisioningStateUpdating OriginGroupProvisioningState = "Updating" -) - -// PossibleOriginGroupProvisioningStateValues returns the possible values for the OriginGroupProvisioningState const type. -func PossibleOriginGroupProvisioningStateValues() []OriginGroupProvisioningState { - return []OriginGroupProvisioningState{ - OriginGroupProvisioningStateCreating, - OriginGroupProvisioningStateDeleting, - OriginGroupProvisioningStateFailed, - OriginGroupProvisioningStateSucceeded, - OriginGroupProvisioningStateUpdating, - } -} - -// OriginGroupResourceState - Resource status of the origin group. -type OriginGroupResourceState string - -const ( - OriginGroupResourceStateActive OriginGroupResourceState = "Active" - OriginGroupResourceStateCreating OriginGroupResourceState = "Creating" - OriginGroupResourceStateDeleting OriginGroupResourceState = "Deleting" -) - -// PossibleOriginGroupResourceStateValues returns the possible values for the OriginGroupResourceState const type. -func PossibleOriginGroupResourceStateValues() []OriginGroupResourceState { - return []OriginGroupResourceState{ - OriginGroupResourceStateActive, - OriginGroupResourceStateCreating, - OriginGroupResourceStateDeleting, - } -} - -// OriginProvisioningState - Provisioning status of the origin. -type OriginProvisioningState string - -const ( - OriginProvisioningStateCreating OriginProvisioningState = "Creating" - OriginProvisioningStateDeleting OriginProvisioningState = "Deleting" - OriginProvisioningStateFailed OriginProvisioningState = "Failed" - OriginProvisioningStateSucceeded OriginProvisioningState = "Succeeded" - OriginProvisioningStateUpdating OriginProvisioningState = "Updating" -) - -// PossibleOriginProvisioningStateValues returns the possible values for the OriginProvisioningState const type. -func PossibleOriginProvisioningStateValues() []OriginProvisioningState { - return []OriginProvisioningState{ - OriginProvisioningStateCreating, - OriginProvisioningStateDeleting, - OriginProvisioningStateFailed, - OriginProvisioningStateSucceeded, - OriginProvisioningStateUpdating, - } -} - -// OriginResourceState - Resource status of the origin. -type OriginResourceState string - -const ( - OriginResourceStateActive OriginResourceState = "Active" - OriginResourceStateCreating OriginResourceState = "Creating" - OriginResourceStateDeleting OriginResourceState = "Deleting" -) - -// PossibleOriginResourceStateValues returns the possible values for the OriginResourceState const type. -func PossibleOriginResourceStateValues() []OriginResourceState { - return []OriginResourceState{ - OriginResourceStateActive, - OriginResourceStateCreating, - OriginResourceStateDeleting, - } -} - -// ParamIndicator - Indicates the purpose of the parameter -type ParamIndicator string - -const ( - ParamIndicatorExpires ParamIndicator = "Expires" - ParamIndicatorKeyID ParamIndicator = "KeyId" - ParamIndicatorSignature ParamIndicator = "Signature" -) - -// PossibleParamIndicatorValues returns the possible values for the ParamIndicator const type. -func PossibleParamIndicatorValues() []ParamIndicator { - return []ParamIndicator{ - ParamIndicatorExpires, - ParamIndicatorKeyID, - ParamIndicatorSignature, - } -} - -// PolicyEnabledState - describes if the policy is in enabled state or disabled state -type PolicyEnabledState string - -const ( - PolicyEnabledStateDisabled PolicyEnabledState = "Disabled" - PolicyEnabledStateEnabled PolicyEnabledState = "Enabled" -) - -// PossiblePolicyEnabledStateValues returns the possible values for the PolicyEnabledState const type. -func PossiblePolicyEnabledStateValues() []PolicyEnabledState { - return []PolicyEnabledState{ - PolicyEnabledStateDisabled, - PolicyEnabledStateEnabled, - } -} - -// PolicyMode - Describes if it is in detection mode or prevention mode at policy level. -type PolicyMode string - -const ( - PolicyModeDetection PolicyMode = "Detection" - PolicyModePrevention PolicyMode = "Prevention" -) - -// PossiblePolicyModeValues returns the possible values for the PolicyMode const type. -func PossiblePolicyModeValues() []PolicyMode { - return []PolicyMode{ - PolicyModeDetection, - PolicyModePrevention, - } -} - -// PolicyResourceState - Resource status of the policy. -type PolicyResourceState string - -const ( - PolicyResourceStateCreating PolicyResourceState = "Creating" - PolicyResourceStateDeleting PolicyResourceState = "Deleting" - PolicyResourceStateDisabled PolicyResourceState = "Disabled" - PolicyResourceStateDisabling PolicyResourceState = "Disabling" - PolicyResourceStateEnabled PolicyResourceState = "Enabled" - PolicyResourceStateEnabling PolicyResourceState = "Enabling" -) - -// PossiblePolicyResourceStateValues returns the possible values for the PolicyResourceState const type. -func PossiblePolicyResourceStateValues() []PolicyResourceState { - return []PolicyResourceState{ - PolicyResourceStateCreating, - PolicyResourceStateDeleting, - PolicyResourceStateDisabled, - PolicyResourceStateDisabling, - PolicyResourceStateEnabled, - PolicyResourceStateEnabling, - } -} - -// PolicySettingsDefaultCustomBlockResponseStatusCode - If the action type is block, this field defines the default customer -// overridable http response status code. -type PolicySettingsDefaultCustomBlockResponseStatusCode int32 - -const ( - PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredFive PolicySettingsDefaultCustomBlockResponseStatusCode = 405 - PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredSix PolicySettingsDefaultCustomBlockResponseStatusCode = 406 - PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredThree PolicySettingsDefaultCustomBlockResponseStatusCode = 403 - PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredTwentyNine PolicySettingsDefaultCustomBlockResponseStatusCode = 429 - PolicySettingsDefaultCustomBlockResponseStatusCodeTwoHundred PolicySettingsDefaultCustomBlockResponseStatusCode = 200 -) - -// PossiblePolicySettingsDefaultCustomBlockResponseStatusCodeValues returns the possible values for the PolicySettingsDefaultCustomBlockResponseStatusCode const type. -func PossiblePolicySettingsDefaultCustomBlockResponseStatusCodeValues() []PolicySettingsDefaultCustomBlockResponseStatusCode { - return []PolicySettingsDefaultCustomBlockResponseStatusCode{ - PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredFive, - PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredSix, - PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredThree, - PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredTwentyNine, - PolicySettingsDefaultCustomBlockResponseStatusCodeTwoHundred, - } -} - -type PostArgsMatchConditionParametersTypeName string - -const ( - PostArgsMatchConditionParametersTypeNameDeliveryRulePostArgsConditionParameters PostArgsMatchConditionParametersTypeName = "DeliveryRulePostArgsConditionParameters" -) - -// PossiblePostArgsMatchConditionParametersTypeNameValues returns the possible values for the PostArgsMatchConditionParametersTypeName const type. -func PossiblePostArgsMatchConditionParametersTypeNameValues() []PostArgsMatchConditionParametersTypeName { - return []PostArgsMatchConditionParametersTypeName{ - PostArgsMatchConditionParametersTypeNameDeliveryRulePostArgsConditionParameters, - } -} - -// PostArgsOperator - Describes operator to be matched -type PostArgsOperator string - -const ( - PostArgsOperatorAny PostArgsOperator = "Any" - PostArgsOperatorBeginsWith PostArgsOperator = "BeginsWith" - PostArgsOperatorContains PostArgsOperator = "Contains" - PostArgsOperatorEndsWith PostArgsOperator = "EndsWith" - PostArgsOperatorEqual PostArgsOperator = "Equal" - PostArgsOperatorGreaterThan PostArgsOperator = "GreaterThan" - PostArgsOperatorGreaterThanOrEqual PostArgsOperator = "GreaterThanOrEqual" - PostArgsOperatorLessThan PostArgsOperator = "LessThan" - PostArgsOperatorLessThanOrEqual PostArgsOperator = "LessThanOrEqual" - PostArgsOperatorRegEx PostArgsOperator = "RegEx" -) - -// PossiblePostArgsOperatorValues returns the possible values for the PostArgsOperator const type. -func PossiblePostArgsOperatorValues() []PostArgsOperator { - return []PostArgsOperator{ - PostArgsOperatorAny, - PostArgsOperatorBeginsWith, - PostArgsOperatorContains, - PostArgsOperatorEndsWith, - PostArgsOperatorEqual, - PostArgsOperatorGreaterThan, - PostArgsOperatorGreaterThanOrEqual, - PostArgsOperatorLessThan, - PostArgsOperatorLessThanOrEqual, - PostArgsOperatorRegEx, - } -} - -// PrivateEndpointStatus - The approval status for the connection to the Private Link -type PrivateEndpointStatus string - -const ( - PrivateEndpointStatusApproved PrivateEndpointStatus = "Approved" - PrivateEndpointStatusDisconnected PrivateEndpointStatus = "Disconnected" - PrivateEndpointStatusPending PrivateEndpointStatus = "Pending" - PrivateEndpointStatusRejected PrivateEndpointStatus = "Rejected" - PrivateEndpointStatusTimeout PrivateEndpointStatus = "Timeout" -) - -// PossiblePrivateEndpointStatusValues returns the possible values for the PrivateEndpointStatus const type. -func PossiblePrivateEndpointStatusValues() []PrivateEndpointStatus { - return []PrivateEndpointStatus{ - PrivateEndpointStatusApproved, - PrivateEndpointStatusDisconnected, - PrivateEndpointStatusPending, - PrivateEndpointStatusRejected, - PrivateEndpointStatusTimeout, - } -} - -// ProbeProtocol - Protocol to use for health probe. -type ProbeProtocol string - -const ( - ProbeProtocolNotSet ProbeProtocol = "NotSet" - ProbeProtocolHTTP ProbeProtocol = "Http" - ProbeProtocolHTTPS ProbeProtocol = "Https" -) - -// PossibleProbeProtocolValues returns the possible values for the ProbeProtocol const type. -func PossibleProbeProtocolValues() []ProbeProtocol { - return []ProbeProtocol{ - ProbeProtocolNotSet, - ProbeProtocolHTTP, - ProbeProtocolHTTPS, - } -} - -// ProfileProvisioningState - Provisioning status of the profile. -type ProfileProvisioningState string - -const ( - ProfileProvisioningStateCreating ProfileProvisioningState = "Creating" - ProfileProvisioningStateDeleting ProfileProvisioningState = "Deleting" - ProfileProvisioningStateFailed ProfileProvisioningState = "Failed" - ProfileProvisioningStateSucceeded ProfileProvisioningState = "Succeeded" - ProfileProvisioningStateUpdating ProfileProvisioningState = "Updating" -) - -// PossibleProfileProvisioningStateValues returns the possible values for the ProfileProvisioningState const type. -func PossibleProfileProvisioningStateValues() []ProfileProvisioningState { - return []ProfileProvisioningState{ - ProfileProvisioningStateCreating, - ProfileProvisioningStateDeleting, - ProfileProvisioningStateFailed, - ProfileProvisioningStateSucceeded, - ProfileProvisioningStateUpdating, - } -} - -// ProfileResourceState - Resource status of the profile. -type ProfileResourceState string - -const ( - ProfileResourceStateActive ProfileResourceState = "Active" - ProfileResourceStateCreating ProfileResourceState = "Creating" - ProfileResourceStateDeleting ProfileResourceState = "Deleting" - ProfileResourceStateDisabled ProfileResourceState = "Disabled" -) - -// PossibleProfileResourceStateValues returns the possible values for the ProfileResourceState const type. -func PossibleProfileResourceStateValues() []ProfileResourceState { - return []ProfileResourceState{ - ProfileResourceStateActive, - ProfileResourceStateCreating, - ProfileResourceStateDeleting, - ProfileResourceStateDisabled, - } -} - -// ProtocolType - Defines the TLS extension protocol that is used for secure delivery. -type ProtocolType string - -const ( - ProtocolTypeIPBased ProtocolType = "IPBased" - ProtocolTypeServerNameIndication ProtocolType = "ServerNameIndication" -) - -// PossibleProtocolTypeValues returns the possible values for the ProtocolType const type. -func PossibleProtocolTypeValues() []ProtocolType { - return []ProtocolType{ - ProtocolTypeIPBased, - ProtocolTypeServerNameIndication, - } -} - -// ProvisioningState - Provisioning state of the WebApplicationFirewallPolicy. -type ProvisioningState string - -const ( - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateCreating, - ProvisioningStateFailed, - ProvisioningStateSucceeded, - } -} - -// QueryStringBehavior - Caching behavior for the requests -type QueryStringBehavior string - -const ( - QueryStringBehaviorExclude QueryStringBehavior = "Exclude" - QueryStringBehaviorExcludeAll QueryStringBehavior = "ExcludeAll" - QueryStringBehaviorInclude QueryStringBehavior = "Include" - QueryStringBehaviorIncludeAll QueryStringBehavior = "IncludeAll" -) - -// PossibleQueryStringBehaviorValues returns the possible values for the QueryStringBehavior const type. -func PossibleQueryStringBehaviorValues() []QueryStringBehavior { - return []QueryStringBehavior{ - QueryStringBehaviorExclude, - QueryStringBehaviorExcludeAll, - QueryStringBehaviorInclude, - QueryStringBehaviorIncludeAll, - } -} - -// QueryStringCachingBehavior - Defines how CDN caches requests that include query strings. You can ignore any query strings -// when caching, bypass caching to prevent requests that contain query strings from being cached, or cache -// every request with a unique URL. -type QueryStringCachingBehavior string - -const ( - QueryStringCachingBehaviorIgnoreQueryString QueryStringCachingBehavior = "IgnoreQueryString" - QueryStringCachingBehaviorBypassCaching QueryStringCachingBehavior = "BypassCaching" - QueryStringCachingBehaviorUseQueryString QueryStringCachingBehavior = "UseQueryString" - QueryStringCachingBehaviorNotSet QueryStringCachingBehavior = "NotSet" -) - -// PossibleQueryStringCachingBehaviorValues returns the possible values for the QueryStringCachingBehavior const type. -func PossibleQueryStringCachingBehaviorValues() []QueryStringCachingBehavior { - return []QueryStringCachingBehavior{ - QueryStringCachingBehaviorIgnoreQueryString, - QueryStringCachingBehaviorBypassCaching, - QueryStringCachingBehaviorUseQueryString, - QueryStringCachingBehaviorNotSet, - } -} - -type QueryStringMatchConditionParametersTypeName string - -const ( - QueryStringMatchConditionParametersTypeNameDeliveryRuleQueryStringConditionParameters QueryStringMatchConditionParametersTypeName = "DeliveryRuleQueryStringConditionParameters" -) - -// PossibleQueryStringMatchConditionParametersTypeNameValues returns the possible values for the QueryStringMatchConditionParametersTypeName const type. -func PossibleQueryStringMatchConditionParametersTypeNameValues() []QueryStringMatchConditionParametersTypeName { - return []QueryStringMatchConditionParametersTypeName{ - QueryStringMatchConditionParametersTypeNameDeliveryRuleQueryStringConditionParameters, - } -} - -// QueryStringOperator - Describes operator to be matched -type QueryStringOperator string - -const ( - QueryStringOperatorAny QueryStringOperator = "Any" - QueryStringOperatorBeginsWith QueryStringOperator = "BeginsWith" - QueryStringOperatorContains QueryStringOperator = "Contains" - QueryStringOperatorEndsWith QueryStringOperator = "EndsWith" - QueryStringOperatorEqual QueryStringOperator = "Equal" - QueryStringOperatorGreaterThan QueryStringOperator = "GreaterThan" - QueryStringOperatorGreaterThanOrEqual QueryStringOperator = "GreaterThanOrEqual" - QueryStringOperatorLessThan QueryStringOperator = "LessThan" - QueryStringOperatorLessThanOrEqual QueryStringOperator = "LessThanOrEqual" - QueryStringOperatorRegEx QueryStringOperator = "RegEx" -) - -// PossibleQueryStringOperatorValues returns the possible values for the QueryStringOperator const type. -func PossibleQueryStringOperatorValues() []QueryStringOperator { - return []QueryStringOperator{ - QueryStringOperatorAny, - QueryStringOperatorBeginsWith, - QueryStringOperatorContains, - QueryStringOperatorEndsWith, - QueryStringOperatorEqual, - QueryStringOperatorGreaterThan, - QueryStringOperatorGreaterThanOrEqual, - QueryStringOperatorLessThan, - QueryStringOperatorLessThanOrEqual, - QueryStringOperatorRegEx, - } -} - -// RedirectType - The redirect type the rule will use when redirecting traffic. -type RedirectType string - -const ( - RedirectTypeFound RedirectType = "Found" - RedirectTypeMoved RedirectType = "Moved" - RedirectTypePermanentRedirect RedirectType = "PermanentRedirect" - RedirectTypeTemporaryRedirect RedirectType = "TemporaryRedirect" -) - -// PossibleRedirectTypeValues returns the possible values for the RedirectType const type. -func PossibleRedirectTypeValues() []RedirectType { - return []RedirectType{ - RedirectTypeFound, - RedirectTypeMoved, - RedirectTypePermanentRedirect, - RedirectTypeTemporaryRedirect, - } -} - -type RemoteAddressMatchConditionParametersTypeName string - -const ( - RemoteAddressMatchConditionParametersTypeNameDeliveryRuleRemoteAddressConditionParameters RemoteAddressMatchConditionParametersTypeName = "DeliveryRuleRemoteAddressConditionParameters" -) - -// PossibleRemoteAddressMatchConditionParametersTypeNameValues returns the possible values for the RemoteAddressMatchConditionParametersTypeName const type. -func PossibleRemoteAddressMatchConditionParametersTypeNameValues() []RemoteAddressMatchConditionParametersTypeName { - return []RemoteAddressMatchConditionParametersTypeName{ - RemoteAddressMatchConditionParametersTypeNameDeliveryRuleRemoteAddressConditionParameters, - } -} - -// RemoteAddressOperator - Describes operator to be matched -type RemoteAddressOperator string - -const ( - RemoteAddressOperatorAny RemoteAddressOperator = "Any" - RemoteAddressOperatorGeoMatch RemoteAddressOperator = "GeoMatch" - RemoteAddressOperatorIPMatch RemoteAddressOperator = "IPMatch" -) - -// PossibleRemoteAddressOperatorValues returns the possible values for the RemoteAddressOperator const type. -func PossibleRemoteAddressOperatorValues() []RemoteAddressOperator { - return []RemoteAddressOperator{ - RemoteAddressOperatorAny, - RemoteAddressOperatorGeoMatch, - RemoteAddressOperatorIPMatch, - } -} - -type RequestBodyMatchConditionParametersTypeName string - -const ( - RequestBodyMatchConditionParametersTypeNameDeliveryRuleRequestBodyConditionParameters RequestBodyMatchConditionParametersTypeName = "DeliveryRuleRequestBodyConditionParameters" -) - -// PossibleRequestBodyMatchConditionParametersTypeNameValues returns the possible values for the RequestBodyMatchConditionParametersTypeName const type. -func PossibleRequestBodyMatchConditionParametersTypeNameValues() []RequestBodyMatchConditionParametersTypeName { - return []RequestBodyMatchConditionParametersTypeName{ - RequestBodyMatchConditionParametersTypeNameDeliveryRuleRequestBodyConditionParameters, - } -} - -// RequestBodyOperator - Describes operator to be matched -type RequestBodyOperator string - -const ( - RequestBodyOperatorAny RequestBodyOperator = "Any" - RequestBodyOperatorBeginsWith RequestBodyOperator = "BeginsWith" - RequestBodyOperatorContains RequestBodyOperator = "Contains" - RequestBodyOperatorEndsWith RequestBodyOperator = "EndsWith" - RequestBodyOperatorEqual RequestBodyOperator = "Equal" - RequestBodyOperatorGreaterThan RequestBodyOperator = "GreaterThan" - RequestBodyOperatorGreaterThanOrEqual RequestBodyOperator = "GreaterThanOrEqual" - RequestBodyOperatorLessThan RequestBodyOperator = "LessThan" - RequestBodyOperatorLessThanOrEqual RequestBodyOperator = "LessThanOrEqual" - RequestBodyOperatorRegEx RequestBodyOperator = "RegEx" -) - -// PossibleRequestBodyOperatorValues returns the possible values for the RequestBodyOperator const type. -func PossibleRequestBodyOperatorValues() []RequestBodyOperator { - return []RequestBodyOperator{ - RequestBodyOperatorAny, - RequestBodyOperatorBeginsWith, - RequestBodyOperatorContains, - RequestBodyOperatorEndsWith, - RequestBodyOperatorEqual, - RequestBodyOperatorGreaterThan, - RequestBodyOperatorGreaterThanOrEqual, - RequestBodyOperatorLessThan, - RequestBodyOperatorLessThanOrEqual, - RequestBodyOperatorRegEx, - } -} - -type RequestHeaderMatchConditionParametersTypeName string - -const ( - RequestHeaderMatchConditionParametersTypeNameDeliveryRuleRequestHeaderConditionParameters RequestHeaderMatchConditionParametersTypeName = "DeliveryRuleRequestHeaderConditionParameters" -) - -// PossibleRequestHeaderMatchConditionParametersTypeNameValues returns the possible values for the RequestHeaderMatchConditionParametersTypeName const type. -func PossibleRequestHeaderMatchConditionParametersTypeNameValues() []RequestHeaderMatchConditionParametersTypeName { - return []RequestHeaderMatchConditionParametersTypeName{ - RequestHeaderMatchConditionParametersTypeNameDeliveryRuleRequestHeaderConditionParameters, - } -} - -// RequestHeaderOperator - Describes operator to be matched -type RequestHeaderOperator string - -const ( - RequestHeaderOperatorAny RequestHeaderOperator = "Any" - RequestHeaderOperatorBeginsWith RequestHeaderOperator = "BeginsWith" - RequestHeaderOperatorContains RequestHeaderOperator = "Contains" - RequestHeaderOperatorEndsWith RequestHeaderOperator = "EndsWith" - RequestHeaderOperatorEqual RequestHeaderOperator = "Equal" - RequestHeaderOperatorGreaterThan RequestHeaderOperator = "GreaterThan" - RequestHeaderOperatorGreaterThanOrEqual RequestHeaderOperator = "GreaterThanOrEqual" - RequestHeaderOperatorLessThan RequestHeaderOperator = "LessThan" - RequestHeaderOperatorLessThanOrEqual RequestHeaderOperator = "LessThanOrEqual" - RequestHeaderOperatorRegEx RequestHeaderOperator = "RegEx" -) - -// PossibleRequestHeaderOperatorValues returns the possible values for the RequestHeaderOperator const type. -func PossibleRequestHeaderOperatorValues() []RequestHeaderOperator { - return []RequestHeaderOperator{ - RequestHeaderOperatorAny, - RequestHeaderOperatorBeginsWith, - RequestHeaderOperatorContains, - RequestHeaderOperatorEndsWith, - RequestHeaderOperatorEqual, - RequestHeaderOperatorGreaterThan, - RequestHeaderOperatorGreaterThanOrEqual, - RequestHeaderOperatorLessThan, - RequestHeaderOperatorLessThanOrEqual, - RequestHeaderOperatorRegEx, - } -} - -type RequestMethodMatchConditionParametersMatchValuesItem string - -const ( - RequestMethodMatchConditionParametersMatchValuesItemDELETE RequestMethodMatchConditionParametersMatchValuesItem = "DELETE" - RequestMethodMatchConditionParametersMatchValuesItemGET RequestMethodMatchConditionParametersMatchValuesItem = "GET" - RequestMethodMatchConditionParametersMatchValuesItemHEAD RequestMethodMatchConditionParametersMatchValuesItem = "HEAD" - RequestMethodMatchConditionParametersMatchValuesItemOPTIONS RequestMethodMatchConditionParametersMatchValuesItem = "OPTIONS" - RequestMethodMatchConditionParametersMatchValuesItemPOST RequestMethodMatchConditionParametersMatchValuesItem = "POST" - RequestMethodMatchConditionParametersMatchValuesItemPUT RequestMethodMatchConditionParametersMatchValuesItem = "PUT" - RequestMethodMatchConditionParametersMatchValuesItemTRACE RequestMethodMatchConditionParametersMatchValuesItem = "TRACE" -) - -// PossibleRequestMethodMatchConditionParametersMatchValuesItemValues returns the possible values for the RequestMethodMatchConditionParametersMatchValuesItem const type. -func PossibleRequestMethodMatchConditionParametersMatchValuesItemValues() []RequestMethodMatchConditionParametersMatchValuesItem { - return []RequestMethodMatchConditionParametersMatchValuesItem{ - RequestMethodMatchConditionParametersMatchValuesItemDELETE, - RequestMethodMatchConditionParametersMatchValuesItemGET, - RequestMethodMatchConditionParametersMatchValuesItemHEAD, - RequestMethodMatchConditionParametersMatchValuesItemOPTIONS, - RequestMethodMatchConditionParametersMatchValuesItemPOST, - RequestMethodMatchConditionParametersMatchValuesItemPUT, - RequestMethodMatchConditionParametersMatchValuesItemTRACE, - } -} - -type RequestMethodMatchConditionParametersTypeName string - -const ( - RequestMethodMatchConditionParametersTypeNameDeliveryRuleRequestMethodConditionParameters RequestMethodMatchConditionParametersTypeName = "DeliveryRuleRequestMethodConditionParameters" -) - -// PossibleRequestMethodMatchConditionParametersTypeNameValues returns the possible values for the RequestMethodMatchConditionParametersTypeName const type. -func PossibleRequestMethodMatchConditionParametersTypeNameValues() []RequestMethodMatchConditionParametersTypeName { - return []RequestMethodMatchConditionParametersTypeName{ - RequestMethodMatchConditionParametersTypeNameDeliveryRuleRequestMethodConditionParameters, - } -} - -// RequestMethodOperator - Describes operator to be matched -type RequestMethodOperator string - -const ( - RequestMethodOperatorEqual RequestMethodOperator = "Equal" -) - -// PossibleRequestMethodOperatorValues returns the possible values for the RequestMethodOperator const type. -func PossibleRequestMethodOperatorValues() []RequestMethodOperator { - return []RequestMethodOperator{ - RequestMethodOperatorEqual, - } -} - -type RequestSchemeMatchConditionParametersMatchValuesItem string - -const ( - RequestSchemeMatchConditionParametersMatchValuesItemHTTP RequestSchemeMatchConditionParametersMatchValuesItem = "HTTP" - RequestSchemeMatchConditionParametersMatchValuesItemHTTPS RequestSchemeMatchConditionParametersMatchValuesItem = "HTTPS" -) - -// PossibleRequestSchemeMatchConditionParametersMatchValuesItemValues returns the possible values for the RequestSchemeMatchConditionParametersMatchValuesItem const type. -func PossibleRequestSchemeMatchConditionParametersMatchValuesItemValues() []RequestSchemeMatchConditionParametersMatchValuesItem { - return []RequestSchemeMatchConditionParametersMatchValuesItem{ - RequestSchemeMatchConditionParametersMatchValuesItemHTTP, - RequestSchemeMatchConditionParametersMatchValuesItemHTTPS, - } -} - -// RequestSchemeMatchConditionParametersOperator - Describes operator to be matched -type RequestSchemeMatchConditionParametersOperator string - -const ( - RequestSchemeMatchConditionParametersOperatorEqual RequestSchemeMatchConditionParametersOperator = "Equal" -) - -// PossibleRequestSchemeMatchConditionParametersOperatorValues returns the possible values for the RequestSchemeMatchConditionParametersOperator const type. -func PossibleRequestSchemeMatchConditionParametersOperatorValues() []RequestSchemeMatchConditionParametersOperator { - return []RequestSchemeMatchConditionParametersOperator{ - RequestSchemeMatchConditionParametersOperatorEqual, - } -} - -type RequestSchemeMatchConditionParametersTypeName string - -const ( - RequestSchemeMatchConditionParametersTypeNameDeliveryRuleRequestSchemeConditionParameters RequestSchemeMatchConditionParametersTypeName = "DeliveryRuleRequestSchemeConditionParameters" -) - -// PossibleRequestSchemeMatchConditionParametersTypeNameValues returns the possible values for the RequestSchemeMatchConditionParametersTypeName const type. -func PossibleRequestSchemeMatchConditionParametersTypeNameValues() []RequestSchemeMatchConditionParametersTypeName { - return []RequestSchemeMatchConditionParametersTypeName{ - RequestSchemeMatchConditionParametersTypeNameDeliveryRuleRequestSchemeConditionParameters, - } -} - -type RequestURIMatchConditionParametersTypeName string - -const ( - RequestURIMatchConditionParametersTypeNameDeliveryRuleRequestURIConditionParameters RequestURIMatchConditionParametersTypeName = "DeliveryRuleRequestUriConditionParameters" -) - -// PossibleRequestURIMatchConditionParametersTypeNameValues returns the possible values for the RequestURIMatchConditionParametersTypeName const type. -func PossibleRequestURIMatchConditionParametersTypeNameValues() []RequestURIMatchConditionParametersTypeName { - return []RequestURIMatchConditionParametersTypeName{ - RequestURIMatchConditionParametersTypeNameDeliveryRuleRequestURIConditionParameters, - } -} - -// RequestURIOperator - Describes operator to be matched -type RequestURIOperator string - -const ( - RequestURIOperatorAny RequestURIOperator = "Any" - RequestURIOperatorBeginsWith RequestURIOperator = "BeginsWith" - RequestURIOperatorContains RequestURIOperator = "Contains" - RequestURIOperatorEndsWith RequestURIOperator = "EndsWith" - RequestURIOperatorEqual RequestURIOperator = "Equal" - RequestURIOperatorGreaterThan RequestURIOperator = "GreaterThan" - RequestURIOperatorGreaterThanOrEqual RequestURIOperator = "GreaterThanOrEqual" - RequestURIOperatorLessThan RequestURIOperator = "LessThan" - RequestURIOperatorLessThanOrEqual RequestURIOperator = "LessThanOrEqual" - RequestURIOperatorRegEx RequestURIOperator = "RegEx" -) - -// PossibleRequestURIOperatorValues returns the possible values for the RequestURIOperator const type. -func PossibleRequestURIOperatorValues() []RequestURIOperator { - return []RequestURIOperator{ - RequestURIOperatorAny, - RequestURIOperatorBeginsWith, - RequestURIOperatorContains, - RequestURIOperatorEndsWith, - RequestURIOperatorEqual, - RequestURIOperatorGreaterThan, - RequestURIOperatorGreaterThanOrEqual, - RequestURIOperatorLessThan, - RequestURIOperatorLessThanOrEqual, - RequestURIOperatorRegEx, - } -} - -// ResourceType - Type of CDN resource used in CheckNameAvailability. -type ResourceType string - -const ( - ResourceTypeMicrosoftCdnProfilesAfdEndpoints ResourceType = "Microsoft.Cdn/Profiles/AfdEndpoints" - ResourceTypeMicrosoftCdnProfilesEndpoints ResourceType = "Microsoft.Cdn/Profiles/Endpoints" -) - -// PossibleResourceTypeValues returns the possible values for the ResourceType const type. -func PossibleResourceTypeValues() []ResourceType { - return []ResourceType{ - ResourceTypeMicrosoftCdnProfilesAfdEndpoints, - ResourceTypeMicrosoftCdnProfilesEndpoints, - } -} - -// ResourceUsageUnit - Unit of the usage. e.g. count. -type ResourceUsageUnit string - -const ( - ResourceUsageUnitCount ResourceUsageUnit = "count" -) - -// PossibleResourceUsageUnitValues returns the possible values for the ResourceUsageUnit const type. -func PossibleResourceUsageUnitValues() []ResourceUsageUnit { - return []ResourceUsageUnit{ - ResourceUsageUnitCount, - } -} - -// ResponseBasedDetectedErrorTypes - Type of response errors for real user requests for which origin will be deemed unhealthy -type ResponseBasedDetectedErrorTypes string - -const ( - ResponseBasedDetectedErrorTypesNone ResponseBasedDetectedErrorTypes = "None" - ResponseBasedDetectedErrorTypesTCPErrorsOnly ResponseBasedDetectedErrorTypes = "TcpErrorsOnly" - ResponseBasedDetectedErrorTypesTCPAndHTTPErrors ResponseBasedDetectedErrorTypes = "TcpAndHttpErrors" -) - -// PossibleResponseBasedDetectedErrorTypesValues returns the possible values for the ResponseBasedDetectedErrorTypes const type. -func PossibleResponseBasedDetectedErrorTypesValues() []ResponseBasedDetectedErrorTypes { - return []ResponseBasedDetectedErrorTypes{ - ResponseBasedDetectedErrorTypesNone, - ResponseBasedDetectedErrorTypesTCPErrorsOnly, - ResponseBasedDetectedErrorTypesTCPAndHTTPErrors, - } -} - -type RouteConfigurationOverrideActionParametersTypeName string - -const ( - RouteConfigurationOverrideActionParametersTypeNameDeliveryRuleRouteConfigurationOverrideActionParameters RouteConfigurationOverrideActionParametersTypeName = "DeliveryRuleRouteConfigurationOverrideActionParameters" -) - -// PossibleRouteConfigurationOverrideActionParametersTypeNameValues returns the possible values for the RouteConfigurationOverrideActionParametersTypeName const type. -func PossibleRouteConfigurationOverrideActionParametersTypeNameValues() []RouteConfigurationOverrideActionParametersTypeName { - return []RouteConfigurationOverrideActionParametersTypeName{ - RouteConfigurationOverrideActionParametersTypeNameDeliveryRuleRouteConfigurationOverrideActionParameters, - } -} - -// RuleCacheBehavior - Caching behavior for the requests -type RuleCacheBehavior string - -const ( - RuleCacheBehaviorHonorOrigin RuleCacheBehavior = "HonorOrigin" - RuleCacheBehaviorOverrideAlways RuleCacheBehavior = "OverrideAlways" - RuleCacheBehaviorOverrideIfOriginMissing RuleCacheBehavior = "OverrideIfOriginMissing" -) - -// PossibleRuleCacheBehaviorValues returns the possible values for the RuleCacheBehavior const type. -func PossibleRuleCacheBehaviorValues() []RuleCacheBehavior { - return []RuleCacheBehavior{ - RuleCacheBehaviorHonorOrigin, - RuleCacheBehaviorOverrideAlways, - RuleCacheBehaviorOverrideIfOriginMissing, - } -} - -// RuleIsCompressionEnabled - Indicates whether content compression is enabled. If compression is enabled, content will be -// served as compressed if user requests for a compressed version. Content won't be compressed on -// AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. -type RuleIsCompressionEnabled string - -const ( - RuleIsCompressionEnabledDisabled RuleIsCompressionEnabled = "Disabled" - RuleIsCompressionEnabledEnabled RuleIsCompressionEnabled = "Enabled" -) - -// PossibleRuleIsCompressionEnabledValues returns the possible values for the RuleIsCompressionEnabled const type. -func PossibleRuleIsCompressionEnabledValues() []RuleIsCompressionEnabled { - return []RuleIsCompressionEnabled{ - RuleIsCompressionEnabledDisabled, - RuleIsCompressionEnabledEnabled, - } -} - -// RuleQueryStringCachingBehavior - Defines how Frontdoor caches requests that include query strings. You can ignore any query -// strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific -// query strings. -type RuleQueryStringCachingBehavior string - -const ( - RuleQueryStringCachingBehaviorIgnoreQueryString RuleQueryStringCachingBehavior = "IgnoreQueryString" - RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings RuleQueryStringCachingBehavior = "IgnoreSpecifiedQueryStrings" - RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings RuleQueryStringCachingBehavior = "IncludeSpecifiedQueryStrings" - RuleQueryStringCachingBehaviorUseQueryString RuleQueryStringCachingBehavior = "UseQueryString" -) - -// PossibleRuleQueryStringCachingBehaviorValues returns the possible values for the RuleQueryStringCachingBehavior const type. -func PossibleRuleQueryStringCachingBehaviorValues() []RuleQueryStringCachingBehavior { - return []RuleQueryStringCachingBehavior{ - RuleQueryStringCachingBehaviorIgnoreQueryString, - RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings, - RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings, - RuleQueryStringCachingBehaviorUseQueryString, - } -} - -// SKUName - Name of the pricing tier. -type SKUName string - -const ( - SKUNameCustomVerizon SKUName = "Custom_Verizon" - SKUNamePremiumAzureFrontDoor SKUName = "Premium_AzureFrontDoor" - SKUNamePremiumVerizon SKUName = "Premium_Verizon" - SKUNameStandard955BandWidthChinaCdn SKUName = "Standard_955BandWidth_ChinaCdn" - SKUNameStandardAkamai SKUName = "Standard_Akamai" - SKUNameStandardAvgBandWidthChinaCdn SKUName = "Standard_AvgBandWidth_ChinaCdn" - SKUNameStandardAzureFrontDoor SKUName = "Standard_AzureFrontDoor" - SKUNameStandardChinaCdn SKUName = "Standard_ChinaCdn" - SKUNameStandardMicrosoft SKUName = "Standard_Microsoft" - SKUNameStandardPlus955BandWidthChinaCdn SKUName = "StandardPlus_955BandWidth_ChinaCdn" - SKUNameStandardPlusAvgBandWidthChinaCdn SKUName = "StandardPlus_AvgBandWidth_ChinaCdn" - SKUNameStandardPlusChinaCdn SKUName = "StandardPlus_ChinaCdn" - SKUNameStandardVerizon SKUName = "Standard_Verizon" -) - -// PossibleSKUNameValues returns the possible values for the SKUName const type. -func PossibleSKUNameValues() []SKUName { - return []SKUName{ - SKUNameCustomVerizon, - SKUNamePremiumAzureFrontDoor, - SKUNamePremiumVerizon, - SKUNameStandard955BandWidthChinaCdn, - SKUNameStandardAkamai, - SKUNameStandardAvgBandWidthChinaCdn, - SKUNameStandardAzureFrontDoor, - SKUNameStandardChinaCdn, - SKUNameStandardMicrosoft, - SKUNameStandardPlus955BandWidthChinaCdn, - SKUNameStandardPlusAvgBandWidthChinaCdn, - SKUNameStandardPlusChinaCdn, - SKUNameStandardVerizon, - } -} - -// SSLProtocol - The protocol of an established TLS connection. -type SSLProtocol string - -const ( - SSLProtocolTLSv1 SSLProtocol = "TLSv1" - SSLProtocolTLSv11 SSLProtocol = "TLSv1.1" - SSLProtocolTLSv12 SSLProtocol = "TLSv1.2" -) - -// PossibleSSLProtocolValues returns the possible values for the SSLProtocol const type. -func PossibleSSLProtocolValues() []SSLProtocol { - return []SSLProtocol{ - SSLProtocolTLSv1, - SSLProtocolTLSv11, - SSLProtocolTLSv12, - } -} - -type SSLProtocolMatchConditionParametersTypeName string - -const ( - SSLProtocolMatchConditionParametersTypeNameDeliveryRuleSSLProtocolConditionParameters SSLProtocolMatchConditionParametersTypeName = "DeliveryRuleSslProtocolConditionParameters" -) - -// PossibleSSLProtocolMatchConditionParametersTypeNameValues returns the possible values for the SSLProtocolMatchConditionParametersTypeName const type. -func PossibleSSLProtocolMatchConditionParametersTypeNameValues() []SSLProtocolMatchConditionParametersTypeName { - return []SSLProtocolMatchConditionParametersTypeName{ - SSLProtocolMatchConditionParametersTypeNameDeliveryRuleSSLProtocolConditionParameters, - } -} - -// SSLProtocolOperator - Describes operator to be matched -type SSLProtocolOperator string - -const ( - SSLProtocolOperatorEqual SSLProtocolOperator = "Equal" -) - -// PossibleSSLProtocolOperatorValues returns the possible values for the SSLProtocolOperator const type. -func PossibleSSLProtocolOperatorValues() []SSLProtocolOperator { - return []SSLProtocolOperator{ - SSLProtocolOperatorEqual, - } -} - -// SecretType - The type of the secret resource. -type SecretType string - -const ( - SecretTypeAzureFirstPartyManagedCertificate SecretType = "AzureFirstPartyManagedCertificate" - SecretTypeCustomerCertificate SecretType = "CustomerCertificate" - SecretTypeManagedCertificate SecretType = "ManagedCertificate" - SecretTypeURLSigningKey SecretType = "UrlSigningKey" -) - -// PossibleSecretTypeValues returns the possible values for the SecretType const type. -func PossibleSecretTypeValues() []SecretType { - return []SecretType{ - SecretTypeAzureFirstPartyManagedCertificate, - SecretTypeCustomerCertificate, - SecretTypeManagedCertificate, - SecretTypeURLSigningKey, - } -} - -// SecurityPolicyType - The type of the Security policy to create. -type SecurityPolicyType string - -const ( - SecurityPolicyTypeWebApplicationFirewall SecurityPolicyType = "WebApplicationFirewall" -) - -// PossibleSecurityPolicyTypeValues returns the possible values for the SecurityPolicyType const type. -func PossibleSecurityPolicyTypeValues() []SecurityPolicyType { - return []SecurityPolicyType{ - SecurityPolicyTypeWebApplicationFirewall, - } -} - -type ServerPortMatchConditionParametersTypeName string - -const ( - ServerPortMatchConditionParametersTypeNameDeliveryRuleServerPortConditionParameters ServerPortMatchConditionParametersTypeName = "DeliveryRuleServerPortConditionParameters" -) - -// PossibleServerPortMatchConditionParametersTypeNameValues returns the possible values for the ServerPortMatchConditionParametersTypeName const type. -func PossibleServerPortMatchConditionParametersTypeNameValues() []ServerPortMatchConditionParametersTypeName { - return []ServerPortMatchConditionParametersTypeName{ - ServerPortMatchConditionParametersTypeNameDeliveryRuleServerPortConditionParameters, - } -} - -// ServerPortOperator - Describes operator to be matched -type ServerPortOperator string - -const ( - ServerPortOperatorAny ServerPortOperator = "Any" - ServerPortOperatorBeginsWith ServerPortOperator = "BeginsWith" - ServerPortOperatorContains ServerPortOperator = "Contains" - ServerPortOperatorEndsWith ServerPortOperator = "EndsWith" - ServerPortOperatorEqual ServerPortOperator = "Equal" - ServerPortOperatorGreaterThan ServerPortOperator = "GreaterThan" - ServerPortOperatorGreaterThanOrEqual ServerPortOperator = "GreaterThanOrEqual" - ServerPortOperatorLessThan ServerPortOperator = "LessThan" - ServerPortOperatorLessThanOrEqual ServerPortOperator = "LessThanOrEqual" - ServerPortOperatorRegEx ServerPortOperator = "RegEx" -) - -// PossibleServerPortOperatorValues returns the possible values for the ServerPortOperator const type. -func PossibleServerPortOperatorValues() []ServerPortOperator { - return []ServerPortOperator{ - ServerPortOperatorAny, - ServerPortOperatorBeginsWith, - ServerPortOperatorContains, - ServerPortOperatorEndsWith, - ServerPortOperatorEqual, - ServerPortOperatorGreaterThan, - ServerPortOperatorGreaterThanOrEqual, - ServerPortOperatorLessThan, - ServerPortOperatorLessThanOrEqual, - ServerPortOperatorRegEx, - } -} - -// SharedPrivateLinkResourceStatus - Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, -// or Timeout. -type SharedPrivateLinkResourceStatus string - -const ( - SharedPrivateLinkResourceStatusPending SharedPrivateLinkResourceStatus = "Pending" - SharedPrivateLinkResourceStatusApproved SharedPrivateLinkResourceStatus = "Approved" - SharedPrivateLinkResourceStatusRejected SharedPrivateLinkResourceStatus = "Rejected" - SharedPrivateLinkResourceStatusDisconnected SharedPrivateLinkResourceStatus = "Disconnected" - SharedPrivateLinkResourceStatusTimeout SharedPrivateLinkResourceStatus = "Timeout" -) - -// PossibleSharedPrivateLinkResourceStatusValues returns the possible values for the SharedPrivateLinkResourceStatus const type. -func PossibleSharedPrivateLinkResourceStatusValues() []SharedPrivateLinkResourceStatus { - return []SharedPrivateLinkResourceStatus{ - SharedPrivateLinkResourceStatusPending, - SharedPrivateLinkResourceStatusApproved, - SharedPrivateLinkResourceStatusRejected, - SharedPrivateLinkResourceStatusDisconnected, - SharedPrivateLinkResourceStatusTimeout, - } -} - -type SocketAddrMatchConditionParametersTypeName string - -const ( - SocketAddrMatchConditionParametersTypeNameDeliveryRuleSocketAddrConditionParameters SocketAddrMatchConditionParametersTypeName = "DeliveryRuleSocketAddrConditionParameters" -) - -// PossibleSocketAddrMatchConditionParametersTypeNameValues returns the possible values for the SocketAddrMatchConditionParametersTypeName const type. -func PossibleSocketAddrMatchConditionParametersTypeNameValues() []SocketAddrMatchConditionParametersTypeName { - return []SocketAddrMatchConditionParametersTypeName{ - SocketAddrMatchConditionParametersTypeNameDeliveryRuleSocketAddrConditionParameters, - } -} - -// SocketAddrOperator - Describes operator to be matched -type SocketAddrOperator string - -const ( - SocketAddrOperatorAny SocketAddrOperator = "Any" - SocketAddrOperatorIPMatch SocketAddrOperator = "IPMatch" -) - -// PossibleSocketAddrOperatorValues returns the possible values for the SocketAddrOperator const type. -func PossibleSocketAddrOperatorValues() []SocketAddrOperator { - return []SocketAddrOperator{ - SocketAddrOperatorAny, - SocketAddrOperatorIPMatch, - } -} - -// Status - The validation status. -type Status string - -const ( - StatusAccessDenied Status = "AccessDenied" - StatusCertificateExpired Status = "CertificateExpired" - StatusInvalid Status = "Invalid" - StatusValid Status = "Valid" -) - -// PossibleStatusValues returns the possible values for the Status const type. -func PossibleStatusValues() []Status { - return []Status{ - StatusAccessDenied, - StatusCertificateExpired, - StatusInvalid, - StatusValid, - } -} - -// Transform - Describes what transforms are applied before matching -type Transform string - -const ( - TransformLowercase Transform = "Lowercase" - TransformRemoveNulls Transform = "RemoveNulls" - TransformTrim Transform = "Trim" - TransformURLDecode Transform = "UrlDecode" - TransformURLEncode Transform = "UrlEncode" - TransformUppercase Transform = "Uppercase" -) - -// PossibleTransformValues returns the possible values for the Transform const type. -func PossibleTransformValues() []Transform { - return []Transform{ - TransformLowercase, - TransformRemoveNulls, - TransformTrim, - TransformURLDecode, - TransformURLEncode, - TransformUppercase, - } -} - -// TransformType - Describes what transforms were applied before matching. -type TransformType string - -const ( - TransformTypeLowercase TransformType = "Lowercase" - TransformTypeRemoveNulls TransformType = "RemoveNulls" - TransformTypeTrim TransformType = "Trim" - TransformTypeURLDecode TransformType = "UrlDecode" - TransformTypeURLEncode TransformType = "UrlEncode" - TransformTypeUppercase TransformType = "Uppercase" -) - -// PossibleTransformTypeValues returns the possible values for the TransformType const type. -func PossibleTransformTypeValues() []TransformType { - return []TransformType{ - TransformTypeLowercase, - TransformTypeRemoveNulls, - TransformTypeTrim, - TransformTypeURLDecode, - TransformTypeURLEncode, - TransformTypeUppercase, - } -} - -type URLFileExtensionMatchConditionParametersTypeName string - -const ( - URLFileExtensionMatchConditionParametersTypeNameDeliveryRuleURLFileExtensionMatchConditionParameters URLFileExtensionMatchConditionParametersTypeName = "DeliveryRuleUrlFileExtensionMatchConditionParameters" -) - -// PossibleURLFileExtensionMatchConditionParametersTypeNameValues returns the possible values for the URLFileExtensionMatchConditionParametersTypeName const type. -func PossibleURLFileExtensionMatchConditionParametersTypeNameValues() []URLFileExtensionMatchConditionParametersTypeName { - return []URLFileExtensionMatchConditionParametersTypeName{ - URLFileExtensionMatchConditionParametersTypeNameDeliveryRuleURLFileExtensionMatchConditionParameters, - } -} - -// URLFileExtensionOperator - Describes operator to be matched -type URLFileExtensionOperator string - -const ( - URLFileExtensionOperatorAny URLFileExtensionOperator = "Any" - URLFileExtensionOperatorBeginsWith URLFileExtensionOperator = "BeginsWith" - URLFileExtensionOperatorContains URLFileExtensionOperator = "Contains" - URLFileExtensionOperatorEndsWith URLFileExtensionOperator = "EndsWith" - URLFileExtensionOperatorEqual URLFileExtensionOperator = "Equal" - URLFileExtensionOperatorGreaterThan URLFileExtensionOperator = "GreaterThan" - URLFileExtensionOperatorGreaterThanOrEqual URLFileExtensionOperator = "GreaterThanOrEqual" - URLFileExtensionOperatorLessThan URLFileExtensionOperator = "LessThan" - URLFileExtensionOperatorLessThanOrEqual URLFileExtensionOperator = "LessThanOrEqual" - URLFileExtensionOperatorRegEx URLFileExtensionOperator = "RegEx" -) - -// PossibleURLFileExtensionOperatorValues returns the possible values for the URLFileExtensionOperator const type. -func PossibleURLFileExtensionOperatorValues() []URLFileExtensionOperator { - return []URLFileExtensionOperator{ - URLFileExtensionOperatorAny, - URLFileExtensionOperatorBeginsWith, - URLFileExtensionOperatorContains, - URLFileExtensionOperatorEndsWith, - URLFileExtensionOperatorEqual, - URLFileExtensionOperatorGreaterThan, - URLFileExtensionOperatorGreaterThanOrEqual, - URLFileExtensionOperatorLessThan, - URLFileExtensionOperatorLessThanOrEqual, - URLFileExtensionOperatorRegEx, - } -} - -type URLFileNameMatchConditionParametersTypeName string - -const ( - URLFileNameMatchConditionParametersTypeNameDeliveryRuleURLFilenameConditionParameters URLFileNameMatchConditionParametersTypeName = "DeliveryRuleUrlFilenameConditionParameters" -) - -// PossibleURLFileNameMatchConditionParametersTypeNameValues returns the possible values for the URLFileNameMatchConditionParametersTypeName const type. -func PossibleURLFileNameMatchConditionParametersTypeNameValues() []URLFileNameMatchConditionParametersTypeName { - return []URLFileNameMatchConditionParametersTypeName{ - URLFileNameMatchConditionParametersTypeNameDeliveryRuleURLFilenameConditionParameters, - } -} - -// URLFileNameOperator - Describes operator to be matched -type URLFileNameOperator string - -const ( - URLFileNameOperatorAny URLFileNameOperator = "Any" - URLFileNameOperatorBeginsWith URLFileNameOperator = "BeginsWith" - URLFileNameOperatorContains URLFileNameOperator = "Contains" - URLFileNameOperatorEndsWith URLFileNameOperator = "EndsWith" - URLFileNameOperatorEqual URLFileNameOperator = "Equal" - URLFileNameOperatorGreaterThan URLFileNameOperator = "GreaterThan" - URLFileNameOperatorGreaterThanOrEqual URLFileNameOperator = "GreaterThanOrEqual" - URLFileNameOperatorLessThan URLFileNameOperator = "LessThan" - URLFileNameOperatorLessThanOrEqual URLFileNameOperator = "LessThanOrEqual" - URLFileNameOperatorRegEx URLFileNameOperator = "RegEx" -) - -// PossibleURLFileNameOperatorValues returns the possible values for the URLFileNameOperator const type. -func PossibleURLFileNameOperatorValues() []URLFileNameOperator { - return []URLFileNameOperator{ - URLFileNameOperatorAny, - URLFileNameOperatorBeginsWith, - URLFileNameOperatorContains, - URLFileNameOperatorEndsWith, - URLFileNameOperatorEqual, - URLFileNameOperatorGreaterThan, - URLFileNameOperatorGreaterThanOrEqual, - URLFileNameOperatorLessThan, - URLFileNameOperatorLessThanOrEqual, - URLFileNameOperatorRegEx, - } -} - -type URLPathMatchConditionParametersTypeName string - -const ( - URLPathMatchConditionParametersTypeNameDeliveryRuleURLPathMatchConditionParameters URLPathMatchConditionParametersTypeName = "DeliveryRuleUrlPathMatchConditionParameters" -) - -// PossibleURLPathMatchConditionParametersTypeNameValues returns the possible values for the URLPathMatchConditionParametersTypeName const type. -func PossibleURLPathMatchConditionParametersTypeNameValues() []URLPathMatchConditionParametersTypeName { - return []URLPathMatchConditionParametersTypeName{ - URLPathMatchConditionParametersTypeNameDeliveryRuleURLPathMatchConditionParameters, - } -} - -// URLPathOperator - Describes operator to be matched -type URLPathOperator string - -const ( - URLPathOperatorAny URLPathOperator = "Any" - URLPathOperatorBeginsWith URLPathOperator = "BeginsWith" - URLPathOperatorContains URLPathOperator = "Contains" - URLPathOperatorEndsWith URLPathOperator = "EndsWith" - URLPathOperatorEqual URLPathOperator = "Equal" - URLPathOperatorGreaterThan URLPathOperator = "GreaterThan" - URLPathOperatorGreaterThanOrEqual URLPathOperator = "GreaterThanOrEqual" - URLPathOperatorLessThan URLPathOperator = "LessThan" - URLPathOperatorLessThanOrEqual URLPathOperator = "LessThanOrEqual" - URLPathOperatorRegEx URLPathOperator = "RegEx" - URLPathOperatorWildcard URLPathOperator = "Wildcard" -) - -// PossibleURLPathOperatorValues returns the possible values for the URLPathOperator const type. -func PossibleURLPathOperatorValues() []URLPathOperator { - return []URLPathOperator{ - URLPathOperatorAny, - URLPathOperatorBeginsWith, - URLPathOperatorContains, - URLPathOperatorEndsWith, - URLPathOperatorEqual, - URLPathOperatorGreaterThan, - URLPathOperatorGreaterThanOrEqual, - URLPathOperatorLessThan, - URLPathOperatorLessThanOrEqual, - URLPathOperatorRegEx, - URLPathOperatorWildcard, - } -} - -type URLRedirectActionParametersTypeName string - -const ( - URLRedirectActionParametersTypeNameDeliveryRuleURLRedirectActionParameters URLRedirectActionParametersTypeName = "DeliveryRuleUrlRedirectActionParameters" -) - -// PossibleURLRedirectActionParametersTypeNameValues returns the possible values for the URLRedirectActionParametersTypeName const type. -func PossibleURLRedirectActionParametersTypeNameValues() []URLRedirectActionParametersTypeName { - return []URLRedirectActionParametersTypeName{ - URLRedirectActionParametersTypeNameDeliveryRuleURLRedirectActionParameters, - } -} - -type URLRewriteActionParametersTypeName string - -const ( - URLRewriteActionParametersTypeNameDeliveryRuleURLRewriteActionParameters URLRewriteActionParametersTypeName = "DeliveryRuleUrlRewriteActionParameters" -) - -// PossibleURLRewriteActionParametersTypeNameValues returns the possible values for the URLRewriteActionParametersTypeName const type. -func PossibleURLRewriteActionParametersTypeNameValues() []URLRewriteActionParametersTypeName { - return []URLRewriteActionParametersTypeName{ - URLRewriteActionParametersTypeNameDeliveryRuleURLRewriteActionParameters, - } -} - -type URLSigningActionParametersTypeName string - -const ( - URLSigningActionParametersTypeNameDeliveryRuleURLSigningActionParameters URLSigningActionParametersTypeName = "DeliveryRuleUrlSigningActionParameters" -) - -// PossibleURLSigningActionParametersTypeNameValues returns the possible values for the URLSigningActionParametersTypeName const type. -func PossibleURLSigningActionParametersTypeNameValues() []URLSigningActionParametersTypeName { - return []URLSigningActionParametersTypeName{ - URLSigningActionParametersTypeNameDeliveryRuleURLSigningActionParameters, - } -} - -// UpdateRule - Describes the action that shall be taken when the certificate is updated in Key Vault. -type UpdateRule string - -const ( - UpdateRuleNoAction UpdateRule = "NoAction" -) - -// PossibleUpdateRuleValues returns the possible values for the UpdateRule const type. -func PossibleUpdateRuleValues() []UpdateRule { - return []UpdateRule{ - UpdateRuleNoAction, - } -} - -// UsageUnit - An enum describing the unit of measurement. -type UsageUnit string - -const ( - UsageUnitCount UsageUnit = "Count" -) - -// PossibleUsageUnitValues returns the possible values for the UsageUnit const type. -func PossibleUsageUnitValues() []UsageUnit { - return []UsageUnit{ - UsageUnitCount, - } -} - -type WafAction string - -const ( - WafActionAllow WafAction = "allow" - WafActionBlock WafAction = "block" - WafActionLog WafAction = "log" - WafActionRedirect WafAction = "redirect" -) - -// PossibleWafActionValues returns the possible values for the WafAction const type. -func PossibleWafActionValues() []WafAction { - return []WafAction{ - WafActionAllow, - WafActionBlock, - WafActionLog, - WafActionRedirect, - } -} - -type WafGranularity string - -const ( - WafGranularityP1D WafGranularity = "P1D" - WafGranularityPT1H WafGranularity = "PT1H" - WafGranularityPT5M WafGranularity = "PT5M" -) - -// PossibleWafGranularityValues returns the possible values for the WafGranularity const type. -func PossibleWafGranularityValues() []WafGranularity { - return []WafGranularity{ - WafGranularityP1D, - WafGranularityPT1H, - WafGranularityPT5M, - } -} - -// WafMatchVariable - Match variable to compare against. -type WafMatchVariable string - -const ( - WafMatchVariableCookies WafMatchVariable = "Cookies" - WafMatchVariablePostArgs WafMatchVariable = "PostArgs" - WafMatchVariableQueryString WafMatchVariable = "QueryString" - WafMatchVariableRemoteAddr WafMatchVariable = "RemoteAddr" - WafMatchVariableRequestBody WafMatchVariable = "RequestBody" - WafMatchVariableRequestHeader WafMatchVariable = "RequestHeader" - WafMatchVariableRequestMethod WafMatchVariable = "RequestMethod" - WafMatchVariableRequestURI WafMatchVariable = "RequestUri" - WafMatchVariableSocketAddr WafMatchVariable = "SocketAddr" -) - -// PossibleWafMatchVariableValues returns the possible values for the WafMatchVariable const type. -func PossibleWafMatchVariableValues() []WafMatchVariable { - return []WafMatchVariable{ - WafMatchVariableCookies, - WafMatchVariablePostArgs, - WafMatchVariableQueryString, - WafMatchVariableRemoteAddr, - WafMatchVariableRequestBody, - WafMatchVariableRequestHeader, - WafMatchVariableRequestMethod, - WafMatchVariableRequestURI, - WafMatchVariableSocketAddr, - } -} - -type WafMetric string - -const ( - WafMetricClientRequestCount WafMetric = "clientRequestCount" -) - -// PossibleWafMetricValues returns the possible values for the WafMetric const type. -func PossibleWafMetricValues() []WafMetric { - return []WafMetric{ - WafMetricClientRequestCount, - } -} - -type WafMetricsResponseGranularity string - -const ( - WafMetricsResponseGranularityP1D WafMetricsResponseGranularity = "P1D" - WafMetricsResponseGranularityPT1H WafMetricsResponseGranularity = "PT1H" - WafMetricsResponseGranularityPT5M WafMetricsResponseGranularity = "PT5M" -) - -// PossibleWafMetricsResponseGranularityValues returns the possible values for the WafMetricsResponseGranularity const type. -func PossibleWafMetricsResponseGranularityValues() []WafMetricsResponseGranularity { - return []WafMetricsResponseGranularity{ - WafMetricsResponseGranularityP1D, - WafMetricsResponseGranularityPT1H, - WafMetricsResponseGranularityPT5M, - } -} - -type WafMetricsResponseSeriesItemUnit string - -const ( - WafMetricsResponseSeriesItemUnitCount WafMetricsResponseSeriesItemUnit = "count" -) - -// PossibleWafMetricsResponseSeriesItemUnitValues returns the possible values for the WafMetricsResponseSeriesItemUnit const type. -func PossibleWafMetricsResponseSeriesItemUnitValues() []WafMetricsResponseSeriesItemUnit { - return []WafMetricsResponseSeriesItemUnit{ - WafMetricsResponseSeriesItemUnitCount, - } -} - -type WafRankingGroupBy string - -const ( - WafRankingGroupByCustomDomain WafRankingGroupBy = "customDomain" - WafRankingGroupByHTTPStatusCode WafRankingGroupBy = "httpStatusCode" -) - -// PossibleWafRankingGroupByValues returns the possible values for the WafRankingGroupBy const type. -func PossibleWafRankingGroupByValues() []WafRankingGroupBy { - return []WafRankingGroupBy{ - WafRankingGroupByCustomDomain, - WafRankingGroupByHTTPStatusCode, - } -} - -type WafRankingType string - -const ( - WafRankingTypeAction WafRankingType = "action" - WafRankingTypeClientIP WafRankingType = "clientIp" - WafRankingTypeCountryOrRegion WafRankingType = "countryOrRegion" - WafRankingTypeRuleGroup WafRankingType = "ruleGroup" - WafRankingTypeRuleID WafRankingType = "ruleId" - WafRankingTypeRuleType WafRankingType = "ruleType" - WafRankingTypeURL WafRankingType = "url" - WafRankingTypeUserAgent WafRankingType = "userAgent" -) - -// PossibleWafRankingTypeValues returns the possible values for the WafRankingType const type. -func PossibleWafRankingTypeValues() []WafRankingType { - return []WafRankingType{ - WafRankingTypeAction, - WafRankingTypeClientIP, - WafRankingTypeCountryOrRegion, - WafRankingTypeRuleGroup, - WafRankingTypeRuleID, - WafRankingTypeRuleType, - WafRankingTypeURL, - WafRankingTypeUserAgent, - } -} - -type WafRuleType string - -const ( - WafRuleTypeBot WafRuleType = "bot" - WafRuleTypeCustom WafRuleType = "custom" - WafRuleTypeManaged WafRuleType = "managed" -) - -// PossibleWafRuleTypeValues returns the possible values for the WafRuleType const type. -func PossibleWafRuleTypeValues() []WafRuleType { - return []WafRuleType{ - WafRuleTypeBot, - WafRuleTypeCustom, - WafRuleTypeManaged, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/customdomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/customdomains_client.go deleted file mode 100644 index de4570a7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/customdomains_client.go +++ /dev/null @@ -1,477 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// CustomDomainsClient contains the methods for the CustomDomains group. -// Don't use this type directly, use NewCustomDomainsClient() instead. -type CustomDomainsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewCustomDomainsClient creates a new instance of CustomDomainsClient with the specified values. -// - subscriptionID - Azure Subscription ID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomDomainsClient, error) { - cl, err := arm.NewClient(moduleName+".CustomDomainsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &CustomDomainsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreate - Creates a new custom domain within an endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - customDomainName - Name of the custom domain within an endpoint. -// - customDomainProperties - Properties required to create a new custom domain. -// - options - CustomDomainsClientBeginCreateOptions contains the optional parameters for the CustomDomainsClient.BeginCreate -// method. -func (client *CustomDomainsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, options *CustomDomainsClientBeginCreateOptions) (*runtime.Poller[CustomDomainsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, profileName, endpointName, customDomainName, customDomainProperties, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CustomDomainsClientCreateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[CustomDomainsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Create - Creates a new custom domain within an endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *CustomDomainsClient) create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, options *CustomDomainsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainName, customDomainProperties, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *CustomDomainsClient) createCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, options *CustomDomainsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if customDomainName == "" { - return nil, errors.New("parameter customDomainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customDomainName}", url.PathEscape(customDomainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customDomainProperties) -} - -// BeginDelete - Deletes an existing custom domain within an endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - customDomainName - Name of the custom domain within an endpoint. -// - options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete -// method. -func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CustomDomainsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[CustomDomainsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Deletes an existing custom domain within an endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *CustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *CustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if customDomainName == "" { - return nil, errors.New("parameter customDomainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customDomainName}", url.PathEscape(customDomainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// DisableCustomHTTPS - Disable https delivery of the custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - customDomainName - Name of the custom domain within an endpoint. -// - options - CustomDomainsClientDisableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.DisableCustomHTTPS -// method. -func (client *CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientDisableCustomHTTPSOptions) (CustomDomainsClientDisableCustomHTTPSResponse, error) { - req, err := client.disableCustomHTTPSCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) - if err != nil { - return CustomDomainsClientDisableCustomHTTPSResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CustomDomainsClientDisableCustomHTTPSResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return CustomDomainsClientDisableCustomHTTPSResponse{}, runtime.NewResponseError(resp) - } - return client.disableCustomHTTPSHandleResponse(resp) -} - -// disableCustomHTTPSCreateRequest creates the DisableCustomHTTPS request. -func (client *CustomDomainsClient) disableCustomHTTPSCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientDisableCustomHTTPSOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if customDomainName == "" { - return nil, errors.New("parameter customDomainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customDomainName}", url.PathEscape(customDomainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// disableCustomHTTPSHandleResponse handles the DisableCustomHTTPS response. -func (client *CustomDomainsClient) disableCustomHTTPSHandleResponse(resp *http.Response) (CustomDomainsClientDisableCustomHTTPSResponse, error) { - result := CustomDomainsClientDisableCustomHTTPSResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomain); err != nil { - return CustomDomainsClientDisableCustomHTTPSResponse{}, err - } - return result, nil -} - -// EnableCustomHTTPS - Enable https delivery of the custom domain. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - customDomainName - Name of the custom domain within an endpoint. -// - options - CustomDomainsClientEnableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.EnableCustomHTTPS -// method. -func (client *CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientEnableCustomHTTPSOptions) (CustomDomainsClientEnableCustomHTTPSResponse, error) { - req, err := client.enableCustomHTTPSCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) - if err != nil { - return CustomDomainsClientEnableCustomHTTPSResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CustomDomainsClientEnableCustomHTTPSResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return CustomDomainsClientEnableCustomHTTPSResponse{}, runtime.NewResponseError(resp) - } - return client.enableCustomHTTPSHandleResponse(resp) -} - -// enableCustomHTTPSCreateRequest creates the EnableCustomHTTPS request. -func (client *CustomDomainsClient) enableCustomHTTPSCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientEnableCustomHTTPSOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if customDomainName == "" { - return nil, errors.New("parameter customDomainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customDomainName}", url.PathEscape(customDomainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.CustomDomainHTTPSParameters != nil { - return req, runtime.MarshalAsJSON(req, options.CustomDomainHTTPSParameters) - } - return req, nil -} - -// enableCustomHTTPSHandleResponse handles the EnableCustomHTTPS response. -func (client *CustomDomainsClient) enableCustomHTTPSHandleResponse(resp *http.Response) (CustomDomainsClientEnableCustomHTTPSResponse, error) { - result := CustomDomainsClientEnableCustomHTTPSResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomain); err != nil { - return CustomDomainsClientEnableCustomHTTPSResponse{}, err - } - return result, nil -} - -// Get - Gets an existing custom domain within an endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - customDomainName - Name of the custom domain within an endpoint. -// - options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. -func (client *CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) - if err != nil { - return CustomDomainsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CustomDomainsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomDomainsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *CustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if customDomainName == "" { - return nil, errors.New("parameter customDomainName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customDomainName}", url.PathEscape(customDomainName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *CustomDomainsClient) getHandleResponse(resp *http.Response) (CustomDomainsClientGetResponse, error) { - result := CustomDomainsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomain); err != nil { - return CustomDomainsClientGetResponse{}, err - } - return result, nil -} - -// NewListByEndpointPager - Lists all of the existing custom domains within an endpoint. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - options - CustomDomainsClientListByEndpointOptions contains the optional parameters for the CustomDomainsClient.NewListByEndpointPager -// method. -func (client *CustomDomainsClient) NewListByEndpointPager(resourceGroupName string, profileName string, endpointName string, options *CustomDomainsClientListByEndpointOptions) *runtime.Pager[CustomDomainsClientListByEndpointResponse] { - return runtime.NewPager(runtime.PagingHandler[CustomDomainsClientListByEndpointResponse]{ - More: func(page CustomDomainsClientListByEndpointResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CustomDomainsClientListByEndpointResponse) (CustomDomainsClientListByEndpointResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByEndpointCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CustomDomainsClientListByEndpointResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CustomDomainsClientListByEndpointResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomDomainsClientListByEndpointResponse{}, runtime.NewResponseError(resp) - } - return client.listByEndpointHandleResponse(resp) - }, - }) -} - -// listByEndpointCreateRequest creates the ListByEndpoint request. -func (client *CustomDomainsClient) listByEndpointCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *CustomDomainsClientListByEndpointOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByEndpointHandleResponse handles the ListByEndpoint response. -func (client *CustomDomainsClient) listByEndpointHandleResponse(resp *http.Response) (CustomDomainsClientListByEndpointResponse, error) { - result := CustomDomainsClientListByEndpointResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainListResult); err != nil { - return CustomDomainsClientListByEndpointResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/endpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/endpoints_client.go deleted file mode 100644 index b98ba251..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/endpoints_client.go +++ /dev/null @@ -1,819 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// EndpointsClient contains the methods for the Endpoints group. -// Don't use this type directly, use NewEndpointsClient() instead. -type EndpointsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewEndpointsClient creates a new instance of EndpointsClient with the specified values. -// - subscriptionID - Azure Subscription ID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointsClient, error) { - cl, err := arm.NewClient(moduleName+".EndpointsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &EndpointsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreate - Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group -// and profile. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - endpoint - Endpoint properties -// - options - EndpointsClientBeginCreateOptions contains the optional parameters for the EndpointsClient.BeginCreate method. -func (client *EndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, options *EndpointsClientBeginCreateOptions) (*runtime.Poller[EndpointsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, profileName, endpointName, endpoint, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EndpointsClientCreateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[EndpointsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Create - Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and -// profile. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *EndpointsClient) create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, options *EndpointsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, endpointName, endpoint, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *EndpointsClient) createCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, options *EndpointsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, endpoint) -} - -// BeginDelete - Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource -// group and profile. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - options - EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method. -func (client *EndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*runtime.Poller[EndpointsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, profileName, endpointName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EndpointsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[EndpointsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group -// and profile. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *EndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *EndpointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and -// profile. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - options - EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method. -func (client *EndpointsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientGetOptions) (EndpointsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) - if err != nil { - return EndpointsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EndpointsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EndpointsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *EndpointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *EndpointsClient) getHandleResponse(resp *http.Response) (EndpointsClientGetResponse, error) { - result := EndpointsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Endpoint); err != nil { - return EndpointsClientGetResponse{}, err - } - return result, nil -} - -// NewListByProfilePager - Lists existing CDN endpoints. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - options - EndpointsClientListByProfileOptions contains the optional parameters for the EndpointsClient.NewListByProfilePager -// method. -func (client *EndpointsClient) NewListByProfilePager(resourceGroupName string, profileName string, options *EndpointsClientListByProfileOptions) *runtime.Pager[EndpointsClientListByProfileResponse] { - return runtime.NewPager(runtime.PagingHandler[EndpointsClientListByProfileResponse]{ - More: func(page EndpointsClientListByProfileResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EndpointsClientListByProfileResponse) (EndpointsClientListByProfileResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EndpointsClientListByProfileResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EndpointsClientListByProfileResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EndpointsClientListByProfileResponse{}, runtime.NewResponseError(resp) - } - return client.listByProfileHandleResponse(resp) - }, - }) -} - -// listByProfileCreateRequest creates the ListByProfile request. -func (client *EndpointsClient) listByProfileCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *EndpointsClientListByProfileOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByProfileHandleResponse handles the ListByProfile response. -func (client *EndpointsClient) listByProfileHandleResponse(resp *http.Response) (EndpointsClientListByProfileResponse, error) { - result := EndpointsClientListByProfileResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EndpointListResult); err != nil { - return EndpointsClientListByProfileResponse{}, err - } - return result, nil -} - -// NewListResourceUsagePager - Checks the quota and usage of geo filters and custom domains under the given endpoint. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - options - EndpointsClientListResourceUsageOptions contains the optional parameters for the EndpointsClient.NewListResourceUsagePager -// method. -func (client *EndpointsClient) NewListResourceUsagePager(resourceGroupName string, profileName string, endpointName string, options *EndpointsClientListResourceUsageOptions) *runtime.Pager[EndpointsClientListResourceUsageResponse] { - return runtime.NewPager(runtime.PagingHandler[EndpointsClientListResourceUsageResponse]{ - More: func(page EndpointsClientListResourceUsageResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EndpointsClientListResourceUsageResponse) (EndpointsClientListResourceUsageResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EndpointsClientListResourceUsageResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EndpointsClientListResourceUsageResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EndpointsClientListResourceUsageResponse{}, runtime.NewResponseError(resp) - } - return client.listResourceUsageHandleResponse(resp) - }, - }) -} - -// listResourceUsageCreateRequest creates the ListResourceUsage request. -func (client *EndpointsClient) listResourceUsageCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientListResourceUsageOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listResourceUsageHandleResponse handles the ListResourceUsage response. -func (client *EndpointsClient) listResourceUsageHandleResponse(resp *http.Response) (EndpointsClientListResourceUsageResponse, error) { - result := EndpointsClientListResourceUsageResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceUsageListResult); err != nil { - return EndpointsClientListResourceUsageResponse{}, err - } - return result, nil -} - -// BeginLoadContent - Pre-loads a content to CDN. Available for Verizon Profiles. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - contentFilePaths - The path to the content to be loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads -// a single file -// - options - EndpointsClientBeginLoadContentOptions contains the optional parameters for the EndpointsClient.BeginLoadContent -// method. -func (client *EndpointsClient) BeginLoadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, options *EndpointsClientBeginLoadContentOptions) (*runtime.Poller[EndpointsClientLoadContentResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.loadContent(ctx, resourceGroupName, profileName, endpointName, contentFilePaths, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EndpointsClientLoadContentResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[EndpointsClientLoadContentResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// LoadContent - Pre-loads a content to CDN. Available for Verizon Profiles. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *EndpointsClient) loadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, options *EndpointsClientBeginLoadContentOptions) (*http.Response, error) { - req, err := client.loadContentCreateRequest(ctx, resourceGroupName, profileName, endpointName, contentFilePaths, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// loadContentCreateRequest creates the LoadContent request. -func (client *EndpointsClient) loadContentCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, options *EndpointsClientBeginLoadContentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, contentFilePaths) -} - -// BeginPurgeContent - Removes a content from CDN. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - contentFilePaths - The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' which removes -// a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and -// files in the directory. -// - options - EndpointsClientBeginPurgeContentOptions contains the optional parameters for the EndpointsClient.BeginPurgeContent -// method. -func (client *EndpointsClient) BeginPurgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters, options *EndpointsClientBeginPurgeContentOptions) (*runtime.Poller[EndpointsClientPurgeContentResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.purgeContent(ctx, resourceGroupName, profileName, endpointName, contentFilePaths, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EndpointsClientPurgeContentResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[EndpointsClientPurgeContentResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// PurgeContent - Removes a content from CDN. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *EndpointsClient) purgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters, options *EndpointsClientBeginPurgeContentOptions) (*http.Response, error) { - req, err := client.purgeContentCreateRequest(ctx, resourceGroupName, profileName, endpointName, contentFilePaths, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// purgeContentCreateRequest creates the PurgeContent request. -func (client *EndpointsClient) purgeContentCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters, options *EndpointsClientBeginPurgeContentOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, contentFilePaths) -} - -// BeginStart - Starts an existing CDN endpoint that is on a stopped state. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - options - EndpointsClientBeginStartOptions contains the optional parameters for the EndpointsClient.BeginStart method. -func (client *EndpointsClient) BeginStart(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStartOptions) (*runtime.Poller[EndpointsClientStartResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.start(ctx, resourceGroupName, profileName, endpointName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EndpointsClientStartResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[EndpointsClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Start - Starts an existing CDN endpoint that is on a stopped state. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *EndpointsClient) start(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStartOptions) (*http.Response, error) { - req, err := client.startCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startCreateRequest creates the Start request. -func (client *EndpointsClient) startCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStop - Stops an existing running CDN endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - options - EndpointsClientBeginStopOptions contains the optional parameters for the EndpointsClient.BeginStop method. -func (client *EndpointsClient) BeginStop(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStopOptions) (*runtime.Poller[EndpointsClientStopResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stop(ctx, resourceGroupName, profileName, endpointName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EndpointsClientStopResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[EndpointsClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Stop - Stops an existing running CDN endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *EndpointsClient) stop(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStopOptions) (*http.Response, error) { - req, err := client.stopCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopCreateRequest creates the Stop request. -func (client *EndpointsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginUpdate - Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource -// group and profile. Only tags can be updated after creating an endpoint. To update origins, -// use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, -// use the Update Custom Domain operation. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - endpointUpdateProperties - Endpoint update properties -// - options - EndpointsClientBeginUpdateOptions contains the optional parameters for the EndpointsClient.BeginUpdate method. -func (client *EndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, options *EndpointsClientBeginUpdateOptions) (*runtime.Poller[EndpointsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, profileName, endpointName, endpointUpdateProperties, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[EndpointsClientUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[EndpointsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Update - Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group -// and profile. Only tags can be updated after creating an endpoint. To update origins, -// use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, -// use the Update Custom Domain operation. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *EndpointsClient) update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, options *EndpointsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, endpointName, endpointUpdateProperties, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *EndpointsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, options *EndpointsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, endpointUpdateProperties) -} - -// ValidateCustomDomain - Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - customDomainProperties - Custom domain to be validated. -// - options - EndpointsClientValidateCustomDomainOptions contains the optional parameters for the EndpointsClient.ValidateCustomDomain -// method. -func (client *EndpointsClient) ValidateCustomDomain(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput, options *EndpointsClientValidateCustomDomainOptions) (EndpointsClientValidateCustomDomainResponse, error) { - req, err := client.validateCustomDomainCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainProperties, options) - if err != nil { - return EndpointsClientValidateCustomDomainResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EndpointsClientValidateCustomDomainResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EndpointsClientValidateCustomDomainResponse{}, runtime.NewResponseError(resp) - } - return client.validateCustomDomainHandleResponse(resp) -} - -// validateCustomDomainCreateRequest creates the ValidateCustomDomain request. -func (client *EndpointsClient) validateCustomDomainCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput, options *EndpointsClientValidateCustomDomainOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customDomainProperties) -} - -// validateCustomDomainHandleResponse handles the ValidateCustomDomain response. -func (client *EndpointsClient) validateCustomDomainHandleResponse(resp *http.Response) (EndpointsClientValidateCustomDomainResponse, error) { - result := EndpointsClientValidateCustomDomainResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ValidateCustomDomainOutput); err != nil { - return EndpointsClientValidateCustomDomainResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/management_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/management_client.go deleted file mode 100644 index 370af36a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/management_client.go +++ /dev/null @@ -1,247 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ManagementClient contains the methods for the CdnManagementClient group. -// Don't use this type directly, use NewManagementClient() instead. -type ManagementClient struct { - internal *arm.Client - subscriptionID string -} - -// NewManagementClient creates a new instance of ManagementClient with the specified values. -// - subscriptionID - Azure Subscription ID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error) { - cl, err := arm.NewClient(moduleName+".ManagementClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ManagementClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CheckEndpointNameAvailability - Check the availability of a resource name. This is needed for resources where name is globally -// unique, such as a afdx endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - checkEndpointNameAvailabilityInput - Input to check. -// - options - ManagementClientCheckEndpointNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckEndpointNameAvailability -// method. -func (client *ManagementClient) CheckEndpointNameAvailability(ctx context.Context, resourceGroupName string, checkEndpointNameAvailabilityInput CheckEndpointNameAvailabilityInput, options *ManagementClientCheckEndpointNameAvailabilityOptions) (ManagementClientCheckEndpointNameAvailabilityResponse, error) { - req, err := client.checkEndpointNameAvailabilityCreateRequest(ctx, resourceGroupName, checkEndpointNameAvailabilityInput, options) - if err != nil { - return ManagementClientCheckEndpointNameAvailabilityResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagementClientCheckEndpointNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientCheckEndpointNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkEndpointNameAvailabilityHandleResponse(resp) -} - -// checkEndpointNameAvailabilityCreateRequest creates the CheckEndpointNameAvailability request. -func (client *ManagementClient) checkEndpointNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, checkEndpointNameAvailabilityInput CheckEndpointNameAvailabilityInput, options *ManagementClientCheckEndpointNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkEndpointNameAvailabilityInput) -} - -// checkEndpointNameAvailabilityHandleResponse handles the CheckEndpointNameAvailability response. -func (client *ManagementClient) checkEndpointNameAvailabilityHandleResponse(resp *http.Response) (ManagementClientCheckEndpointNameAvailabilityResponse, error) { - result := ManagementClientCheckEndpointNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckEndpointNameAvailabilityOutput); err != nil { - return ManagementClientCheckEndpointNameAvailabilityResponse{}, err - } - return result, nil -} - -// CheckNameAvailability - Check the availability of a resource name. This is needed for resources where name is globally -// unique, such as a CDN endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - checkNameAvailabilityInput - Input to check. -// - options - ManagementClientCheckNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckNameAvailability -// method. -func (client *ManagementClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput, options *ManagementClientCheckNameAvailabilityOptions) (ManagementClientCheckNameAvailabilityResponse, error) { - req, err := client.checkNameAvailabilityCreateRequest(ctx, checkNameAvailabilityInput, options) - if err != nil { - return ManagementClientCheckNameAvailabilityResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagementClientCheckNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkNameAvailabilityHandleResponse(resp) -} - -// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *ManagementClient) checkNameAvailabilityCreateRequest(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput, options *ManagementClientCheckNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Cdn/checkNameAvailability" - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkNameAvailabilityInput) -} - -// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. -func (client *ManagementClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ManagementClientCheckNameAvailabilityResponse, error) { - result := ManagementClientCheckNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityOutput); err != nil { - return ManagementClientCheckNameAvailabilityResponse{}, err - } - return result, nil -} - -// CheckNameAvailabilityWithSubscription - Check the availability of a resource name. This is needed for resources where name -// is globally unique, such as a CDN endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - checkNameAvailabilityInput - Input to check. -// - options - ManagementClientCheckNameAvailabilityWithSubscriptionOptions contains the optional parameters for the ManagementClient.CheckNameAvailabilityWithSubscription -// method. -func (client *ManagementClient) CheckNameAvailabilityWithSubscription(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput, options *ManagementClientCheckNameAvailabilityWithSubscriptionOptions) (ManagementClientCheckNameAvailabilityWithSubscriptionResponse, error) { - req, err := client.checkNameAvailabilityWithSubscriptionCreateRequest(ctx, checkNameAvailabilityInput, options) - if err != nil { - return ManagementClientCheckNameAvailabilityWithSubscriptionResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagementClientCheckNameAvailabilityWithSubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientCheckNameAvailabilityWithSubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.checkNameAvailabilityWithSubscriptionHandleResponse(resp) -} - -// checkNameAvailabilityWithSubscriptionCreateRequest creates the CheckNameAvailabilityWithSubscription request. -func (client *ManagementClient) checkNameAvailabilityWithSubscriptionCreateRequest(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput, options *ManagementClientCheckNameAvailabilityWithSubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, checkNameAvailabilityInput) -} - -// checkNameAvailabilityWithSubscriptionHandleResponse handles the CheckNameAvailabilityWithSubscription response. -func (client *ManagementClient) checkNameAvailabilityWithSubscriptionHandleResponse(resp *http.Response) (ManagementClientCheckNameAvailabilityWithSubscriptionResponse, error) { - result := ManagementClientCheckNameAvailabilityWithSubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityOutput); err != nil { - return ManagementClientCheckNameAvailabilityWithSubscriptionResponse{}, err - } - return result, nil -} - -// ValidateProbe - Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file -// hosted on the origin server to help accelerate the delivery of dynamic content via the CDN -// endpoint. This path is relative to the origin path specified in the endpoint configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - validateProbeInput - Input to check. -// - options - ManagementClientValidateProbeOptions contains the optional parameters for the ManagementClient.ValidateProbe -// method. -func (client *ManagementClient) ValidateProbe(ctx context.Context, validateProbeInput ValidateProbeInput, options *ManagementClientValidateProbeOptions) (ManagementClientValidateProbeResponse, error) { - req, err := client.validateProbeCreateRequest(ctx, validateProbeInput, options) - if err != nil { - return ManagementClientValidateProbeResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagementClientValidateProbeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientValidateProbeResponse{}, runtime.NewResponseError(resp) - } - return client.validateProbeHandleResponse(resp) -} - -// validateProbeCreateRequest creates the ValidateProbe request. -func (client *ManagementClient) validateProbeCreateRequest(ctx context.Context, validateProbeInput ValidateProbeInput, options *ManagementClientValidateProbeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validateProbeInput) -} - -// validateProbeHandleResponse handles the ValidateProbe response. -func (client *ManagementClient) validateProbeHandleResponse(resp *http.Response) (ManagementClientValidateProbeResponse, error) { - result := ManagementClientValidateProbeResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ValidateProbeOutput); err != nil { - return ManagementClientValidateProbeResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/models.go deleted file mode 100644 index af7f280b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/models.go +++ /dev/null @@ -1,4431 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import "time" - -// AFDCustomDomainsClientBeginCreateOptions contains the optional parameters for the AFDCustomDomainsClient.BeginCreate method. -type AFDCustomDomainsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDCustomDomainsClientBeginDeleteOptions contains the optional parameters for the AFDCustomDomainsClient.BeginDelete method. -type AFDCustomDomainsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDCustomDomainsClientBeginRefreshValidationTokenOptions contains the optional parameters for the AFDCustomDomainsClient.BeginRefreshValidationToken -// method. -type AFDCustomDomainsClientBeginRefreshValidationTokenOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDCustomDomainsClientBeginUpdateOptions contains the optional parameters for the AFDCustomDomainsClient.BeginUpdate method. -type AFDCustomDomainsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDCustomDomainsClientGetOptions contains the optional parameters for the AFDCustomDomainsClient.Get method. -type AFDCustomDomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AFDCustomDomainsClientListByProfileOptions contains the optional parameters for the AFDCustomDomainsClient.NewListByProfilePager -// method. -type AFDCustomDomainsClientListByProfileOptions struct { - // placeholder for future optional parameters -} - -// AFDDomain - Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. -// www.contoso.com. -type AFDDomain struct { - // The JSON object that contains the properties of the domain to create. - Properties *AFDDomainProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// AFDDomainHTTPSParameters - The JSON object that contains the properties to secure a domain. -type AFDDomainHTTPSParameters struct { - // REQUIRED; Defines the source of the SSL certificate. - CertificateType *AfdCertificateType - - // TLS protocol version that will be used for Https - MinimumTLSVersion *AfdMinimumTLSVersion - - // Resource reference to the secret. ie. subs/rg/profile/secret - Secret *ResourceReference -} - -// AFDDomainListResult - Result of the request to list domains. It contains a list of domain objects and a URL link to get -// the next set of results. -type AFDDomainListResult struct { - // URL to get the next set of domain objects if there are any. - NextLink *string - - // READ-ONLY; List of AzureFrontDoor domains within a profile. - Value []*AFDDomain -} - -// AFDDomainProperties - The JSON object that contains the properties of the domain to create. -type AFDDomainProperties struct { - // REQUIRED; The host name of the domain. Must be a domain name. - HostName *string - - // Resource reference to the Azure DNS zone - AzureDNSZone *ResourceReference - - // Resource reference to the Azure resource where custom domain ownership was prevalidated - PreValidatedCustomDomainResourceID *ResourceReference - - // The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own - // certificate. If not specified, enabling ssl uses AzureFrontDoor managed - // certificate by default. - TLSSettings *AFDDomainHTTPSParameters - - // READ-ONLY - DeploymentStatus *DeploymentStatus - - // READ-ONLY; Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands - // for DomainControlValidation. - DomainValidationState *DomainValidationState - - // READ-ONLY; The name of the profile which holds the domain. - ProfileName *string - - // READ-ONLY; Provisioning status - ProvisioningState *AfdProvisioningState - - // READ-ONLY; Values the customer needs to validate domain ownership - ValidationProperties *DomainValidationProperties -} - -// AFDDomainUpdateParameters - The domain JSON object required for domain creation or update. -type AFDDomainUpdateParameters struct { - // The JSON object that contains the properties of the domain to create. - Properties *AFDDomainUpdatePropertiesParameters -} - -// AFDDomainUpdatePropertiesParameters - The JSON object that contains the properties of the domain to create. -type AFDDomainUpdatePropertiesParameters struct { - // Resource reference to the Azure DNS zone - AzureDNSZone *ResourceReference - - // Resource reference to the Azure resource where custom domain ownership was prevalidated - PreValidatedCustomDomainResourceID *ResourceReference - - // The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own - // certificate. If not specified, enabling ssl uses AzureFrontDoor managed - // certificate by default. - TLSSettings *AFDDomainHTTPSParameters - - // READ-ONLY; The name of the profile which holds the domain. - ProfileName *string -} - -// AFDEndpoint - CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, -// content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format -// .azureedge.net. -type AFDEndpoint struct { - // REQUIRED; Resource location. - Location *string - - // The JSON object that contains the properties required to create an endpoint. - Properties *AFDEndpointProperties - - // Resource tags. - Tags map[string]*string - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// AFDEndpointListResult - Result of the request to list endpoints. It contains a list of endpoint objects and a URL link -// to get the next set of results. -type AFDEndpointListResult struct { - // URL to get the next set of endpoint objects if there is any. - NextLink *string - - // READ-ONLY; List of AzureFrontDoor endpoints within a profile - Value []*AFDEndpoint -} - -// AFDEndpointProperties - The JSON object that contains the properties required to create an endpoint. -type AFDEndpointProperties struct { - // Indicates the endpoint name reuse scope. The default value is TenantReuse. - AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope - - // Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' - EnabledState *EnabledState - - // READ-ONLY - DeploymentStatus *DeploymentStatus - - // READ-ONLY; The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net - HostName *string - - // READ-ONLY; The name of the profile which holds the endpoint. - ProfileName *string - - // READ-ONLY; Provisioning status - ProvisioningState *AfdProvisioningState -} - -// AFDEndpointPropertiesUpdateParameters - The JSON object containing endpoint update parameters. -type AFDEndpointPropertiesUpdateParameters struct { - // Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' - EnabledState *EnabledState - - // READ-ONLY; The name of the profile which holds the endpoint. - ProfileName *string -} - -// AFDEndpointUpdateParameters - Properties required to create or update an endpoint. -type AFDEndpointUpdateParameters struct { - // The JSON object containing endpoint update parameters. - Properties *AFDEndpointPropertiesUpdateParameters - - // Endpoint tags. - Tags map[string]*string -} - -// AFDEndpointsClientBeginCreateOptions contains the optional parameters for the AFDEndpointsClient.BeginCreate method. -type AFDEndpointsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDEndpointsClientBeginDeleteOptions contains the optional parameters for the AFDEndpointsClient.BeginDelete method. -type AFDEndpointsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDEndpointsClientBeginPurgeContentOptions contains the optional parameters for the AFDEndpointsClient.BeginPurgeContent -// method. -type AFDEndpointsClientBeginPurgeContentOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDEndpointsClientBeginUpdateOptions contains the optional parameters for the AFDEndpointsClient.BeginUpdate method. -type AFDEndpointsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDEndpointsClientGetOptions contains the optional parameters for the AFDEndpointsClient.Get method. -type AFDEndpointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AFDEndpointsClientListByProfileOptions contains the optional parameters for the AFDEndpointsClient.NewListByProfilePager -// method. -type AFDEndpointsClientListByProfileOptions struct { - // placeholder for future optional parameters -} - -// AFDEndpointsClientListResourceUsageOptions contains the optional parameters for the AFDEndpointsClient.NewListResourceUsagePager -// method. -type AFDEndpointsClientListResourceUsageOptions struct { - // placeholder for future optional parameters -} - -// AFDEndpointsClientValidateCustomDomainOptions contains the optional parameters for the AFDEndpointsClient.ValidateCustomDomain -// method. -type AFDEndpointsClientValidateCustomDomainOptions struct { - // placeholder for future optional parameters -} - -// AFDOrigin - CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint -// do not have the requested content cached, they attempt to fetch it from one or more of -// the configured origins. -type AFDOrigin struct { - // The JSON object that contains the properties of the origin. - Properties *AFDOriginProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// AFDOriginGroup - AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be -// served from CDN. -type AFDOriginGroup struct { - // The JSON object that contains the properties of the origin group. - Properties *AFDOriginGroupProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// AFDOriginGroupListResult - Result of the request to list origin groups. It contains a list of origin groups objects and -// a URL link to get the next set of results. -type AFDOriginGroupListResult struct { - // URL to get the next set of origin objects if there are any. - NextLink *string - - // READ-ONLY; List of CDN origin groups within an endpoint - Value []*AFDOriginGroup -} - -// AFDOriginGroupProperties - The JSON object that contains the properties of the origin group. -type AFDOriginGroupProperties struct { - // Health probe settings to the origin that is used to determine the health of the origin. - HealthProbeSettings *HealthProbeParameters - - // Load balancing settings for a backend pool - LoadBalancingSettings *LoadBalancingSettingsParameters - - // Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' - SessionAffinityState *EnabledState - - // Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint - // is added. Default is 10 mins. This property is currently not supported. - TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 - - // READ-ONLY - DeploymentStatus *DeploymentStatus - - // READ-ONLY; The name of the profile which holds the origin group. - ProfileName *string - - // READ-ONLY; Provisioning status - ProvisioningState *AfdProvisioningState -} - -// AFDOriginGroupUpdateParameters - AFDOrigin group properties needed for origin group creation or update. -type AFDOriginGroupUpdateParameters struct { - // The JSON object that contains the properties of the origin group. - Properties *AFDOriginGroupUpdatePropertiesParameters -} - -// AFDOriginGroupUpdatePropertiesParameters - The JSON object that contains the properties of the origin group. -type AFDOriginGroupUpdatePropertiesParameters struct { - // Health probe settings to the origin that is used to determine the health of the origin. - HealthProbeSettings *HealthProbeParameters - - // Load balancing settings for a backend pool - LoadBalancingSettings *LoadBalancingSettingsParameters - - // Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' - SessionAffinityState *EnabledState - - // Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint - // is added. Default is 10 mins. This property is currently not supported. - TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 - - // READ-ONLY; The name of the profile which holds the origin group. - ProfileName *string -} - -// AFDOriginGroupsClientBeginCreateOptions contains the optional parameters for the AFDOriginGroupsClient.BeginCreate method. -type AFDOriginGroupsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDOriginGroupsClientBeginDeleteOptions contains the optional parameters for the AFDOriginGroupsClient.BeginDelete method. -type AFDOriginGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDOriginGroupsClientBeginUpdateOptions contains the optional parameters for the AFDOriginGroupsClient.BeginUpdate method. -type AFDOriginGroupsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDOriginGroupsClientGetOptions contains the optional parameters for the AFDOriginGroupsClient.Get method. -type AFDOriginGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AFDOriginGroupsClientListByProfileOptions contains the optional parameters for the AFDOriginGroupsClient.NewListByProfilePager -// method. -type AFDOriginGroupsClientListByProfileOptions struct { - // placeholder for future optional parameters -} - -// AFDOriginGroupsClientListResourceUsageOptions contains the optional parameters for the AFDOriginGroupsClient.NewListResourceUsagePager -// method. -type AFDOriginGroupsClientListResourceUsageOptions struct { - // placeholder for future optional parameters -} - -// AFDOriginListResult - Result of the request to list origins. It contains a list of origin objects and a URL link to get -// the next set of results. -type AFDOriginListResult struct { - // URL to get the next set of origin objects if there are any. - NextLink *string - - // READ-ONLY; List of CDN origins within an endpoint - Value []*AFDOrigin -} - -// AFDOriginProperties - The JSON object that contains the properties of the origin. -type AFDOriginProperties struct { - // Resource reference to the Azure origin resource. - AzureOrigin *ResourceReference - - // Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled - // if there is a single enabled backend in single enabled backend pool. - EnabledState *EnabledState - - // Whether to enable certificate name check at origin level - EnforceCertificateNameCheck *bool - - // The value of the HTTP port. Must be between 1 and 65535. - HTTPPort *int32 - - // The value of the HTTPS port. Must be between 1 and 65535. - HTTPSPort *int32 - - // The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across - // all origins in an endpoint. - HostName *string - - // The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this - // value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services - // require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint - OriginHostHeader *string - - // Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any - // lower priority origin is healthy.Must be between 1 and 5 - Priority *int32 - - // The properties of the private link resource for private origin. - SharedPrivateLinkResource *SharedPrivateLinkResourceProperties - - // Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 - Weight *int32 - - // READ-ONLY - DeploymentStatus *DeploymentStatus - - // READ-ONLY; The name of the origin group which contains this origin. - OriginGroupName *string - - // READ-ONLY; Provisioning status - ProvisioningState *AfdProvisioningState -} - -// AFDOriginUpdateParameters - AFDOrigin properties needed for origin update. -type AFDOriginUpdateParameters struct { - // The JSON object that contains the properties of the origin. - Properties *AFDOriginUpdatePropertiesParameters -} - -// AFDOriginUpdatePropertiesParameters - The JSON object that contains the properties of the origin. -type AFDOriginUpdatePropertiesParameters struct { - // Resource reference to the Azure origin resource. - AzureOrigin *ResourceReference - - // Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled - // if there is a single enabled backend in single enabled backend pool. - EnabledState *EnabledState - - // Whether to enable certificate name check at origin level - EnforceCertificateNameCheck *bool - - // The value of the HTTP port. Must be between 1 and 65535. - HTTPPort *int32 - - // The value of the HTTPS port. Must be between 1 and 65535. - HTTPSPort *int32 - - // The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across - // all origins in an endpoint. - HostName *string - - // The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this - // value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services - // require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint - OriginHostHeader *string - - // Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any - // lower priority origin is healthy.Must be between 1 and 5 - Priority *int32 - - // The properties of the private link resource for private origin. - SharedPrivateLinkResource *SharedPrivateLinkResourceProperties - - // Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 - Weight *int32 - - // READ-ONLY; The name of the origin group which contains this origin. - OriginGroupName *string -} - -// AFDOriginsClientBeginCreateOptions contains the optional parameters for the AFDOriginsClient.BeginCreate method. -type AFDOriginsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDOriginsClientBeginDeleteOptions contains the optional parameters for the AFDOriginsClient.BeginDelete method. -type AFDOriginsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDOriginsClientBeginUpdateOptions contains the optional parameters for the AFDOriginsClient.BeginUpdate method. -type AFDOriginsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AFDOriginsClientGetOptions contains the optional parameters for the AFDOriginsClient.Get method. -type AFDOriginsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AFDOriginsClientListByOriginGroupOptions contains the optional parameters for the AFDOriginsClient.NewListByOriginGroupPager -// method. -type AFDOriginsClientListByOriginGroupOptions struct { - // placeholder for future optional parameters -} - -// AFDProfilesClientCheckHostNameAvailabilityOptions contains the optional parameters for the AFDProfilesClient.CheckHostNameAvailability -// method. -type AFDProfilesClientCheckHostNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// AFDProfilesClientListResourceUsageOptions contains the optional parameters for the AFDProfilesClient.NewListResourceUsagePager -// method. -type AFDProfilesClientListResourceUsageOptions struct { - // placeholder for future optional parameters -} - -// AFDStateProperties - The tracking states for afd resources. -type AFDStateProperties struct { - // READ-ONLY - DeploymentStatus *DeploymentStatus - - // READ-ONLY; Provisioning status - ProvisioningState *AfdProvisioningState -} - -// ActivatedResourceReference - Reference to another resource along with its state. -type ActivatedResourceReference struct { - // Resource ID. - ID *string - - // READ-ONLY; Whether the resource is active or inactive - IsActive *bool -} - -// AfdErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. -// (This also follows the OData error response format.). -type AfdErrorResponse struct { - // The error object. - Error *ErrorDetail -} - -// AfdPurgeParameters - Parameters required for content purge. -type AfdPurgeParameters struct { - // REQUIRED; The path to the content to be purged. Can describe a file path or a wild card directory. - ContentPaths []*string - - // List of domains. - Domains []*string -} - -// AfdRouteCacheConfiguration - Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration -// object. -type AfdRouteCacheConfiguration struct { - // compression settings. - CompressionSettings *CompressionSettings - - // query parameters to include or exclude (comma separated). - QueryParameters *string - - // Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore - // specific query strings, cache every request with a unique URL, or cache specific - // query strings. - QueryStringCachingBehavior *AfdQueryStringCachingBehavior -} - -// AzureFirstPartyManagedCertificate - Azure FirstParty Managed Certificate provided by other first party resource providers -// to enable HTTPS. -type AzureFirstPartyManagedCertificate struct { - // The type of the secret resource. - Type *SecretType - - // READ-ONLY; Certificate expiration date. - ExpirationDate *string - - // READ-ONLY; Subject name in the certificate. - Subject *string -} - -// AzureFirstPartyManagedCertificateParameters - Azure FirstParty Managed Certificate provided by other first party resource -// providers to enable HTTPS. -type AzureFirstPartyManagedCertificateParameters struct { - // REQUIRED; The type of the secret resource. - Type *SecretType -} - -// GetSecretParameters implements the SecretParametersClassification interface for type AzureFirstPartyManagedCertificateParameters. -func (a *AzureFirstPartyManagedCertificateParameters) GetSecretParameters() *SecretParameters { - return &SecretParameters{ - Type: a.Type, - } -} - -// CacheConfiguration - Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration -// object. -type CacheConfiguration struct { - // Caching behavior for the requests - CacheBehavior *RuleCacheBehavior - - // The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss - CacheDuration *string - - // Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user - // requests for a compressed version. Content won't be compressed on - // AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. - IsCompressionEnabled *RuleIsCompressionEnabled - - // query parameters to include or exclude (comma separated). - QueryParameters *string - - // Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore - // specific query strings, cache every request with a unique URL, or cache specific - // query strings. - QueryStringCachingBehavior *RuleQueryStringCachingBehavior -} - -// CacheExpirationActionParameters - Defines the parameters for the cache expiration action. -type CacheExpirationActionParameters struct { - // REQUIRED; Caching behavior for the requests - CacheBehavior *CacheBehavior - - // REQUIRED; The level at which the content needs to be cached. - CacheType *CacheType - - // REQUIRED - TypeName *CacheExpirationActionParametersTypeName - - // The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss - CacheDuration *string -} - -// CacheKeyQueryStringActionParameters - Defines the parameters for the cache-key query string action. -type CacheKeyQueryStringActionParameters struct { - // REQUIRED; Caching behavior for the requests - QueryStringBehavior *QueryStringBehavior - - // REQUIRED - TypeName *CacheKeyQueryStringActionParametersTypeName - - // query parameters to include or exclude (comma separated). - QueryParameters *string -} - -// Certificate used for https -type Certificate struct { - // The type of the secret resource. - Type *SecretType - - // READ-ONLY; Certificate expiration date. - ExpirationDate *string - - // READ-ONLY; Subject name in the certificate. - Subject *string -} - -// CertificateSourceParameters - Defines the parameters for using CDN managed certificate for securing custom domain. -type CertificateSourceParameters struct { - // REQUIRED; Type of certificate used - CertificateType *CertificateType - - // REQUIRED - TypeName *CdnCertificateSourceParametersTypeName -} - -// CheckEndpointNameAvailabilityInput - Input of CheckNameAvailability API. -type CheckEndpointNameAvailabilityInput struct { - // REQUIRED; The resource name to validate. - Name *string - - // REQUIRED; The type of the resource whose name is to be validated. - Type *ResourceType - - // Indicates the endpoint name reuse scope. The default value is TenantReuse. - AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope -} - -// CheckEndpointNameAvailabilityOutput - Output of check name availability API. -type CheckEndpointNameAvailabilityOutput struct { - // READ-ONLY; Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, - // otherwise it returns empty string - AvailableHostname *string - - // READ-ONLY; The detailed error message describing why the name is not available. - Message *string - - // READ-ONLY; Indicates whether the name is available. - NameAvailable *bool - - // READ-ONLY; The reason why the name is not available. - Reason *string -} - -// CheckHostNameAvailabilityInput - Input of CheckHostNameAvailability API. -type CheckHostNameAvailabilityInput struct { - // REQUIRED; The host name to validate. - HostName *string -} - -// CheckNameAvailabilityInput - Input of CheckNameAvailability API. -type CheckNameAvailabilityInput struct { - // REQUIRED; The resource name to validate. - Name *string - - // REQUIRED; The type of the resource whose name is to be validated. - Type *ResourceType -} - -// CheckNameAvailabilityOutput - Output of check name availability API. -type CheckNameAvailabilityOutput struct { - // READ-ONLY; The detailed error message describing why the name is not available. - Message *string - - // READ-ONLY; Indicates whether the name is available. - NameAvailable *bool - - // READ-ONLY; The reason why the name is not available. - Reason *string -} - -// CidrIPAddress - CIDR Ip address -type CidrIPAddress struct { - // Ip address itself. - BaseIPAddress *string - - // The length of the prefix of the ip address. - PrefixLength *int32 -} - -// ClientPortMatchConditionParameters - Defines the parameters for ClientPort match conditions -type ClientPortMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *ClientPortOperator - - // REQUIRED - TypeName *ClientPortMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -type Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems struct { - DateTime *time.Time - Value *float32 -} - -type Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems struct { - DateTime *time.Time - Value *float32 -} - -type ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems struct { - Metric *string - Percentage *float64 - Value *int64 -} - -// CompressionSettings - settings for compression. -type CompressionSettings struct { - // List of content types on which compression applies. The value should be a valid MIME type. - ContentTypesToCompress []*string - - // Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, - // content will be served as compressed if user requests for a compressed version. - // Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. - IsCompressionEnabled *bool -} - -// ContinentsResponse - Continents Response -type ContinentsResponse struct { - Continents []*ContinentsResponseContinentsItem - CountryOrRegions []*ContinentsResponseCountryOrRegionsItem -} - -type ContinentsResponseContinentsItem struct { - ID *string -} - -type ContinentsResponseCountryOrRegionsItem struct { - ContinentID *string - ID *string -} - -// CookiesMatchConditionParameters - Defines the parameters for Cookies match conditions -type CookiesMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *CookiesOperator - - // REQUIRED - TypeName *CookiesMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // Name of Cookies to be matched - Selector *string - - // List of transforms - Transforms []*Transform -} - -// CustomDomain - Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, -// e.g. www.contoso.com. -type CustomDomain struct { - // The JSON object that contains the properties of the custom domain to create. - Properties *CustomDomainProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// CustomDomainHTTPSParametersClassification provides polymorphic access to related types. -// Call the interface's GetCustomDomainHTTPSParameters() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *CustomDomainHTTPSParameters, *ManagedHTTPSParameters, *UserManagedHTTPSParameters -type CustomDomainHTTPSParametersClassification interface { - // GetCustomDomainHTTPSParameters returns the CustomDomainHTTPSParameters content of the underlying type. - GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters -} - -// CustomDomainHTTPSParameters - The JSON object that contains the properties to secure a custom domain. -type CustomDomainHTTPSParameters struct { - // REQUIRED; Defines the source of the SSL certificate. - CertificateSource *CertificateSource - - // REQUIRED; Defines the TLS extension protocol that is used for secure delivery. - ProtocolType *ProtocolType - - // TLS protocol version that will be used for Https - MinimumTLSVersion *MinimumTLSVersion -} - -// GetCustomDomainHTTPSParameters implements the CustomDomainHTTPSParametersClassification interface for type CustomDomainHTTPSParameters. -func (c *CustomDomainHTTPSParameters) GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters { - return c -} - -// CustomDomainListResult - Result of the request to list custom domains. It contains a list of custom domain objects and -// a URL link to get the next set of results. -type CustomDomainListResult struct { - // URL to get the next set of custom domain objects if there are any. - NextLink *string - - // READ-ONLY; List of CDN CustomDomains within an endpoint. - Value []*CustomDomain -} - -// CustomDomainParameters - The customDomain JSON object required for custom domain creation or update. -type CustomDomainParameters struct { - // The JSON object that contains the properties of the custom domain to create. - Properties *CustomDomainPropertiesParameters -} - -// CustomDomainProperties - The JSON object that contains the properties of the custom domain to create. -type CustomDomainProperties struct { - // REQUIRED; The host name of the custom domain. Must be a domain name. - HostName *string - - // Certificate parameters for securing custom HTTPS - CustomHTTPSParameters CustomDomainHTTPSParametersClassification - - // Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP - // license number of a custom domain is required to deliver content in China. - ValidationData *string - - // READ-ONLY; Provisioning status of the custom domain. - CustomHTTPSProvisioningState *CustomHTTPSProvisioningState - - // READ-ONLY; Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. - CustomHTTPSProvisioningSubstate *CustomHTTPSProvisioningSubstate - - // READ-ONLY; Provisioning status of Custom Https of the custom domain. - ProvisioningState *CustomHTTPSProvisioningState - - // READ-ONLY; Resource status of the custom domain. - ResourceState *CustomDomainResourceState -} - -// CustomDomainPropertiesParameters - The JSON object that contains the properties of the custom domain to create. -type CustomDomainPropertiesParameters struct { - // REQUIRED; The host name of the custom domain. Must be a domain name. - HostName *string -} - -// CustomDomainsClientBeginCreateOptions contains the optional parameters for the CustomDomainsClient.BeginCreate method. -type CustomDomainsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method. -type CustomDomainsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomDomainsClientDisableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.DisableCustomHTTPS -// method. -type CustomDomainsClientDisableCustomHTTPSOptions struct { - // placeholder for future optional parameters -} - -// CustomDomainsClientEnableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.EnableCustomHTTPS -// method. -type CustomDomainsClientEnableCustomHTTPSOptions struct { - // The configuration specifying how to enable HTTPS for the custom domain - using CDN managed certificate or user's own certificate. - // If not specified, enabling ssl uses CDN managed certificate by - // default. - CustomDomainHTTPSParameters CustomDomainHTTPSParametersClassification -} - -// CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. -type CustomDomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// CustomDomainsClientListByEndpointOptions contains the optional parameters for the CustomDomainsClient.NewListByEndpointPager -// method. -type CustomDomainsClientListByEndpointOptions struct { - // placeholder for future optional parameters -} - -// CustomRule - Defines the common attributes for a custom rule that can be included in a waf policy -type CustomRule struct { - // REQUIRED; Describes what action to be applied when rule matches - Action *ActionType - - // REQUIRED; List of match conditions. - MatchConditions []*MatchCondition - - // REQUIRED; Defines the name of the custom rule - Name *string - - // REQUIRED; Defines in what order this rule be evaluated in the overall list of custom rules - Priority *int32 - - // Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. - EnabledState *CustomRuleEnabledState -} - -// CustomRuleList - Defines contents of custom rules -type CustomRuleList struct { - // List of rules - Rules []*CustomRule -} - -// CustomerCertificate - Customer Certificate used for https -type CustomerCertificate struct { - // Resource reference to the Azure Key Vault certificate. Expected to be in format of - // /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ - SecretSource *ResourceReference - - // Certificate version. - SecretVersion *string - - // The list of SANs. - SubjectAlternativeNames []*string - - // The type of the secret resource. - Type *SecretType - - // Whether to use the latest version for the certificate - UseLatestVersion *bool - - // READ-ONLY; Certificate issuing authority. - CertificateAuthority *string - - // READ-ONLY; Certificate expiration date. - ExpirationDate *string - - // READ-ONLY; Subject name in the certificate. - Subject *string - - // READ-ONLY; Certificate thumbprint. - Thumbprint *string -} - -// CustomerCertificateParameters - Customer Certificate used for https -type CustomerCertificateParameters struct { - // REQUIRED; Resource reference to the Azure Key Vault certificate. Expected to be in format of - // /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ - SecretSource *ResourceReference - - // REQUIRED; The type of the secret resource. - Type *SecretType - - // Version of the secret to be used - SecretVersion *string - - // The list of SANs. - SubjectAlternativeNames []*string - - // Whether to use the latest version for the certificate - UseLatestVersion *bool - - // READ-ONLY; Certificate issuing authority. - CertificateAuthority *string - - // READ-ONLY; Certificate expiration date. - ExpirationDate *string - - // READ-ONLY; Subject name in the certificate. - Subject *string - - // READ-ONLY; Certificate thumbprint. - Thumbprint *string -} - -// GetSecretParameters implements the SecretParametersClassification interface for type CustomerCertificateParameters. -func (c *CustomerCertificateParameters) GetSecretParameters() *SecretParameters { - return &SecretParameters{ - Type: c.Type, - } -} - -// DeepCreatedOrigin - The main origin of CDN content which is added when creating a CDN endpoint. -type DeepCreatedOrigin struct { - // REQUIRED; Origin name which must be unique within the endpoint. - Name *string - - // Properties of the origin created on the CDN endpoint. - Properties *DeepCreatedOriginProperties -} - -// DeepCreatedOriginGroup - The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent -// to the origins within the origin group based on origin health. -type DeepCreatedOriginGroup struct { - // REQUIRED; Origin group name which must be unique within the endpoint. - Name *string - - // Properties of the origin group created on the CDN endpoint. - Properties *DeepCreatedOriginGroupProperties -} - -// DeepCreatedOriginGroupProperties - Properties of the origin group created on the CDN endpoint. -type DeepCreatedOriginGroupProperties struct { - // REQUIRED; The source of the content being delivered via CDN within given origin group. - Origins []*ResourceReference - - // Health probe settings to the origin that is used to determine the health of the origin. - HealthProbeSettings *HealthProbeParameters - - // The JSON object that contains the properties to determine origin health using real requests/responses.This property is - // currently not supported. - ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters - - // Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint - // is added. Default is 10 mins. This property is currently not supported. - TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 -} - -// DeepCreatedOriginProperties - Properties of the origin created on the CDN endpoint. -type DeepCreatedOriginProperties struct { - // REQUIRED; The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across - // all origins in an endpoint. - HostName *string - - // Origin is enabled for load balancing or not. By default, origin is always enabled. - Enabled *bool - - // The value of the HTTP port. Must be between 1 and 65535. - HTTPPort *int32 - - // The value of the HTTPS port. Must be between 1 and 65535. - HTTPSPort *int32 - - // The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this - // value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services - // require this host header value to match the origin hostname by default. - OriginHostHeader *string - - // Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any - // lower priority origin is healthy.Must be between 1 and 5. - Priority *int32 - - // The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' - PrivateLinkAlias *string - - // A custom message to be included in the approval request to connect to the Private Link. - PrivateLinkApprovalMessage *string - - // The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated - PrivateLinkLocation *string - - // The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' - PrivateLinkResourceID *string - - // Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 - Weight *int32 - - // READ-ONLY; The approval status for the connection to the Private Link - PrivateEndpointStatus *PrivateEndpointStatus -} - -// DeliveryRule - A rule that specifies a set of actions and conditions -type DeliveryRule struct { - // REQUIRED; A list of actions that are executed when all the conditions of a rule are satisfied. - Actions []DeliveryRuleActionAutoGeneratedClassification - - // REQUIRED; The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser - // order will be applied before a rule with a greater order. Rule with order 0 is a special - // rule. It does not require any condition and actions listed in it will always be applied. - Order *int32 - - // A list of conditions that must be matched for the actions to be executed - Conditions []DeliveryRuleConditionClassification - - // Name of the rule - Name *string -} - -// DeliveryRuleActionAutoGeneratedClassification provides polymorphic access to related types. -// Call the interface's GetDeliveryRuleActionAutoGenerated() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *DeliveryRuleActionAutoGenerated, *DeliveryRuleCacheExpirationAction, *DeliveryRuleCacheKeyQueryStringAction, *DeliveryRuleRequestHeaderAction, -// - *DeliveryRuleResponseHeaderAction, *DeliveryRuleRouteConfigurationOverrideAction, *OriginGroupOverrideAction, *URLRedirectAction, -// - *URLRewriteAction, *URLSigningAction -type DeliveryRuleActionAutoGeneratedClassification interface { - // GetDeliveryRuleActionAutoGenerated returns the DeliveryRuleActionAutoGenerated content of the underlying type. - GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated -} - -// DeliveryRuleActionAutoGenerated - An action for the delivery rule. -type DeliveryRuleActionAutoGenerated struct { - // REQUIRED; The name of the action for the delivery rule. - Name *DeliveryRuleAction -} - -// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleActionAutoGenerated. -func (d *DeliveryRuleActionAutoGenerated) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { - return d -} - -// DeliveryRuleCacheExpirationAction - Defines the cache expiration action for the delivery rule. -type DeliveryRuleCacheExpirationAction struct { - // REQUIRED; The name of the action for the delivery rule. - Name *DeliveryRuleAction - - // REQUIRED; Defines the parameters for the action. - Parameters *CacheExpirationActionParameters -} - -// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleCacheExpirationAction. -func (d *DeliveryRuleCacheExpirationAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { - return &DeliveryRuleActionAutoGenerated{ - Name: d.Name, - } -} - -// DeliveryRuleCacheKeyQueryStringAction - Defines the cache-key query string action for the delivery rule. -type DeliveryRuleCacheKeyQueryStringAction struct { - // REQUIRED; The name of the action for the delivery rule. - Name *DeliveryRuleAction - - // REQUIRED; Defines the parameters for the action. - Parameters *CacheKeyQueryStringActionParameters -} - -// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleCacheKeyQueryStringAction. -func (d *DeliveryRuleCacheKeyQueryStringAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { - return &DeliveryRuleActionAutoGenerated{ - Name: d.Name, - } -} - -// DeliveryRuleClientPortCondition - Defines the ClientPort condition for the delivery rule. -type DeliveryRuleClientPortCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *ClientPortMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleClientPortCondition. -func (d *DeliveryRuleClientPortCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleConditionClassification provides polymorphic access to related types. -// Call the interface's GetDeliveryRuleCondition() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *DeliveryRuleClientPortCondition, *DeliveryRuleCondition, *DeliveryRuleCookiesCondition, *DeliveryRuleHTTPVersionCondition, -// - *DeliveryRuleHostNameCondition, *DeliveryRuleIsDeviceCondition, *DeliveryRulePostArgsCondition, *DeliveryRuleQueryStringCondition, -// - *DeliveryRuleRemoteAddressCondition, *DeliveryRuleRequestBodyCondition, *DeliveryRuleRequestHeaderCondition, *DeliveryRuleRequestMethodCondition, -// - *DeliveryRuleRequestSchemeCondition, *DeliveryRuleRequestURICondition, *DeliveryRuleSSLProtocolCondition, *DeliveryRuleServerPortCondition, -// - *DeliveryRuleSocketAddrCondition, *DeliveryRuleURLFileExtensionCondition, *DeliveryRuleURLFileNameCondition, *DeliveryRuleURLPathCondition -type DeliveryRuleConditionClassification interface { - // GetDeliveryRuleCondition returns the DeliveryRuleCondition content of the underlying type. - GetDeliveryRuleCondition() *DeliveryRuleCondition -} - -// DeliveryRuleCondition - A condition for the delivery rule. -type DeliveryRuleCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleCondition. -func (d *DeliveryRuleCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { return d } - -// DeliveryRuleCookiesCondition - Defines the Cookies condition for the delivery rule. -type DeliveryRuleCookiesCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *CookiesMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleCookiesCondition. -func (d *DeliveryRuleCookiesCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleHTTPVersionCondition - Defines the HttpVersion condition for the delivery rule. -type DeliveryRuleHTTPVersionCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *HTTPVersionMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleHTTPVersionCondition. -func (d *DeliveryRuleHTTPVersionCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleHostNameCondition - Defines the HostName condition for the delivery rule. -type DeliveryRuleHostNameCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *HostNameMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleHostNameCondition. -func (d *DeliveryRuleHostNameCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleIsDeviceCondition - Defines the IsDevice condition for the delivery rule. -type DeliveryRuleIsDeviceCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *IsDeviceMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleIsDeviceCondition. -func (d *DeliveryRuleIsDeviceCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRulePostArgsCondition - Defines the PostArgs condition for the delivery rule. -type DeliveryRulePostArgsCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *PostArgsMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRulePostArgsCondition. -func (d *DeliveryRulePostArgsCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleQueryStringCondition - Defines the QueryString condition for the delivery rule. -type DeliveryRuleQueryStringCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *QueryStringMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleQueryStringCondition. -func (d *DeliveryRuleQueryStringCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleRemoteAddressCondition - Defines the RemoteAddress condition for the delivery rule. -type DeliveryRuleRemoteAddressCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *RemoteAddressMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRemoteAddressCondition. -func (d *DeliveryRuleRemoteAddressCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleRequestBodyCondition - Defines the RequestBody condition for the delivery rule. -type DeliveryRuleRequestBodyCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *RequestBodyMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestBodyCondition. -func (d *DeliveryRuleRequestBodyCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleRequestHeaderAction - Defines the request header action for the delivery rule. -type DeliveryRuleRequestHeaderAction struct { - // REQUIRED; The name of the action for the delivery rule. - Name *DeliveryRuleAction - - // REQUIRED; Defines the parameters for the action. - Parameters *HeaderActionParameters -} - -// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleRequestHeaderAction. -func (d *DeliveryRuleRequestHeaderAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { - return &DeliveryRuleActionAutoGenerated{ - Name: d.Name, - } -} - -// DeliveryRuleRequestHeaderCondition - Defines the RequestHeader condition for the delivery rule. -type DeliveryRuleRequestHeaderCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *RequestHeaderMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestHeaderCondition. -func (d *DeliveryRuleRequestHeaderCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleRequestMethodCondition - Defines the RequestMethod condition for the delivery rule. -type DeliveryRuleRequestMethodCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *RequestMethodMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestMethodCondition. -func (d *DeliveryRuleRequestMethodCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleRequestSchemeCondition - Defines the RequestScheme condition for the delivery rule. -type DeliveryRuleRequestSchemeCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *RequestSchemeMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestSchemeCondition. -func (d *DeliveryRuleRequestSchemeCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleRequestURICondition - Defines the RequestUri condition for the delivery rule. -type DeliveryRuleRequestURICondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *RequestURIMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestURICondition. -func (d *DeliveryRuleRequestURICondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleResponseHeaderAction - Defines the response header action for the delivery rule. -type DeliveryRuleResponseHeaderAction struct { - // REQUIRED; The name of the action for the delivery rule. - Name *DeliveryRuleAction - - // REQUIRED; Defines the parameters for the action. - Parameters *HeaderActionParameters -} - -// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleResponseHeaderAction. -func (d *DeliveryRuleResponseHeaderAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { - return &DeliveryRuleActionAutoGenerated{ - Name: d.Name, - } -} - -// DeliveryRuleRouteConfigurationOverrideAction - Defines the route configuration override action for the delivery rule. Only -// applicable to Frontdoor Standard/Premium Profiles. -type DeliveryRuleRouteConfigurationOverrideAction struct { - // REQUIRED; The name of the action for the delivery rule. - Name *DeliveryRuleAction - - // REQUIRED; Defines the parameters for the action. - Parameters *RouteConfigurationOverrideActionParameters -} - -// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleRouteConfigurationOverrideAction. -func (d *DeliveryRuleRouteConfigurationOverrideAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { - return &DeliveryRuleActionAutoGenerated{ - Name: d.Name, - } -} - -// DeliveryRuleSSLProtocolCondition - Defines the SslProtocol condition for the delivery rule. -type DeliveryRuleSSLProtocolCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *SSLProtocolMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleSSLProtocolCondition. -func (d *DeliveryRuleSSLProtocolCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleServerPortCondition - Defines the ServerPort condition for the delivery rule. -type DeliveryRuleServerPortCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *ServerPortMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleServerPortCondition. -func (d *DeliveryRuleServerPortCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleSocketAddrCondition - Defines the SocketAddress condition for the delivery rule. -type DeliveryRuleSocketAddrCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *SocketAddrMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleSocketAddrCondition. -func (d *DeliveryRuleSocketAddrCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleURLFileExtensionCondition - Defines the UrlFileExtension condition for the delivery rule. -type DeliveryRuleURLFileExtensionCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *URLFileExtensionMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleURLFileExtensionCondition. -func (d *DeliveryRuleURLFileExtensionCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleURLFileNameCondition - Defines the UrlFileName condition for the delivery rule. -type DeliveryRuleURLFileNameCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *URLFileNameMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleURLFileNameCondition. -func (d *DeliveryRuleURLFileNameCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DeliveryRuleURLPathCondition - Defines the UrlPath condition for the delivery rule. -type DeliveryRuleURLPathCondition struct { - // REQUIRED; The name of the condition for the delivery rule. - Name *MatchVariable - - // REQUIRED; Defines the parameters for the condition. - Parameters *URLPathMatchConditionParameters -} - -// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleURLPathCondition. -func (d *DeliveryRuleURLPathCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { - return &DeliveryRuleCondition{ - Name: d.Name, - } -} - -// DimensionProperties - Type of operation: get, read, delete, etc. -type DimensionProperties struct { - // Display name of dimension. - DisplayName *string - - // Internal name of dimension. - InternalName *string - - // Name of dimension. - Name *string -} - -// DomainValidationProperties - The JSON object that contains the properties to validate a domain. -type DomainValidationProperties struct { - // READ-ONLY; The date time that the token expires - ExpirationDate *string - - // READ-ONLY; Challenge used for DNS TXT record or file based validation - ValidationToken *string -} - -// EdgeNode - Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. -type EdgeNode struct { - // The JSON object that contains the properties required to create an edgenode. - Properties *EdgeNodeProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// EdgeNodeProperties - The JSON object that contains the properties required to create an edgenode. -type EdgeNodeProperties struct { - // REQUIRED; List of ip address groups. - IPAddressGroups []*IPAddressGroup -} - -// EdgeNodesClientListOptions contains the optional parameters for the EdgeNodesClient.NewListPager method. -type EdgeNodesClientListOptions struct { - // placeholder for future optional parameters -} - -// EdgenodeResult - Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to -// get the next set of results. -type EdgenodeResult struct { - // URL to get the next set of edgenode list results if there are any. - NextLink *string - - // READ-ONLY; Edge node of CDN service. - Value []*EdgeNode -} - -// Endpoint - CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, -// content caching and delivery behavior. The CDN endpoint uses the URL format -// .azureedge.net. -type Endpoint struct { - // REQUIRED; Resource location. - Location *string - - // The JSON object that contains the properties required to create an endpoint. - Properties *EndpointProperties - - // Resource tags. - Tags map[string]*string - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// EndpointListResult - Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to -// get the next set of results. -type EndpointListResult struct { - // URL to get the next set of endpoint objects if there is any. - NextLink *string - - // READ-ONLY; List of CDN endpoints within a profile - Value []*Endpoint -} - -// EndpointProperties - The JSON object that contains the properties required to create an endpoint. -type EndpointProperties struct { - // REQUIRED; The source of the content being delivered via CDN. - Origins []*DeepCreatedOrigin - - // List of content types on which compression applies. The value should be a valid MIME type. - ContentTypesToCompress []*string - - // A reference to the origin group. - DefaultOriginGroup *ResourceReference - - // A policy that specifies the delivery rules to be used for an endpoint. - DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy - - // List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified - // path or content, e.g. block APAC for path /pictures/ - GeoFilters []*GeoFilter - - // Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will - // be served as compressed if user requests for a compressed version. Content - // won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. - IsCompressionEnabled *bool - - // Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) - // must be allowed. - IsHTTPAllowed *bool - - // Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) - // must be allowed. - IsHTTPSAllowed *bool - - // Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this - // information, CDN can apply scenario driven optimization. - OptimizationType *OptimizationType - - // The origin groups comprising of origins that are used for load balancing the traffic based on availability. - OriginGroups []*DeepCreatedOriginGroup - - // The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses - // single origin and can be overridden by the same property specified at origin.If - // you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and - // Cloud Services require this host header value to match the origin hostname by - // default. - OriginHostHeader *string - - // A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - OriginPath *string - - // Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal - // routes for the CDN. This is relative to the origin path. This property is only - // relevant when using a single origin. - ProbePath *string - - // Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching - // to prevent requests that contain query strings from being cached, or cache - // every request with a unique URL. - QueryStringCachingBehavior *QueryStringCachingBehavior - - // List of keys used to validate the signed URL hashes. - URLSigningKeys []*URLSigningKey - - // Defines the Web Application Firewall policy for the endpoint (if applicable) - WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - - // READ-ONLY; The custom domains under the endpoint. - CustomDomains []*CustomDomain - - // READ-ONLY; The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net - HostName *string - - // READ-ONLY; Provisioning status of the endpoint. - ProvisioningState *EndpointProvisioningState - - // READ-ONLY; Resource status of the endpoint. - ResourceState *EndpointResourceState -} - -// EndpointPropertiesUpdateParameters - The JSON object containing endpoint update parameters. -type EndpointPropertiesUpdateParameters struct { - // List of content types on which compression applies. The value should be a valid MIME type. - ContentTypesToCompress []*string - - // A reference to the origin group. - DefaultOriginGroup *ResourceReference - - // A policy that specifies the delivery rules to be used for an endpoint. - DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy - - // List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified - // path or content, e.g. block APAC for path /pictures/ - GeoFilters []*GeoFilter - - // Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will - // be served as compressed if user requests for a compressed version. Content - // won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. - IsCompressionEnabled *bool - - // Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) - // must be allowed. - IsHTTPAllowed *bool - - // Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) - // must be allowed. - IsHTTPSAllowed *bool - - // Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this - // information, CDN can apply scenario driven optimization. - OptimizationType *OptimizationType - - // The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses - // single origin and can be overridden by the same property specified at origin.If - // you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and - // Cloud Services require this host header value to match the origin hostname by - // default. - OriginHostHeader *string - - // A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - OriginPath *string - - // Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal - // routes for the CDN. This is relative to the origin path. This property is only - // relevant when using a single origin. - ProbePath *string - - // Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching - // to prevent requests that contain query strings from being cached, or cache - // every request with a unique URL. - QueryStringCachingBehavior *QueryStringCachingBehavior - - // List of keys used to validate the signed URL hashes. - URLSigningKeys []*URLSigningKey - - // Defines the Web Application Firewall policy for the endpoint (if applicable) - WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink -} - -// EndpointPropertiesUpdateParametersDeliveryPolicy - A policy that specifies the delivery rules to be used for an endpoint. -type EndpointPropertiesUpdateParametersDeliveryPolicy struct { - // REQUIRED; A list of the delivery rules. - Rules []*DeliveryRule - - // User-friendly description of the policy. - Description *string -} - -// EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for the -// endpoint (if applicable) -type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink struct { - // Resource ID. - ID *string -} - -// EndpointUpdateParameters - Properties required to create or update an endpoint. -type EndpointUpdateParameters struct { - // The JSON object containing endpoint update parameters. - Properties *EndpointPropertiesUpdateParameters - - // Endpoint tags. - Tags map[string]*string -} - -// EndpointsClientBeginCreateOptions contains the optional parameters for the EndpointsClient.BeginCreate method. -type EndpointsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method. -type EndpointsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EndpointsClientBeginLoadContentOptions contains the optional parameters for the EndpointsClient.BeginLoadContent method. -type EndpointsClientBeginLoadContentOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EndpointsClientBeginPurgeContentOptions contains the optional parameters for the EndpointsClient.BeginPurgeContent method. -type EndpointsClientBeginPurgeContentOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EndpointsClientBeginStartOptions contains the optional parameters for the EndpointsClient.BeginStart method. -type EndpointsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EndpointsClientBeginStopOptions contains the optional parameters for the EndpointsClient.BeginStop method. -type EndpointsClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EndpointsClientBeginUpdateOptions contains the optional parameters for the EndpointsClient.BeginUpdate method. -type EndpointsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method. -type EndpointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// EndpointsClientListByProfileOptions contains the optional parameters for the EndpointsClient.NewListByProfilePager method. -type EndpointsClientListByProfileOptions struct { - // placeholder for future optional parameters -} - -// EndpointsClientListResourceUsageOptions contains the optional parameters for the EndpointsClient.NewListResourceUsagePager -// method. -type EndpointsClientListResourceUsageOptions struct { - // placeholder for future optional parameters -} - -// EndpointsClientValidateCustomDomainOptions contains the optional parameters for the EndpointsClient.ValidateCustomDomain -// method. -type EndpointsClientValidateCustomDomainOptions struct { - // placeholder for future optional parameters -} - -// ErrorAdditionalInfo - The resource management error additional info. -type ErrorAdditionalInfo struct { - // READ-ONLY; The additional info. - Info any - - // READ-ONLY; The additional info type. - Type *string -} - -// ErrorDetail - The error detail. -type ErrorDetail struct { - // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo - - // READ-ONLY; The error code. - Code *string - - // READ-ONLY; The error details. - Details []*ErrorDetail - - // READ-ONLY; The error message. - Message *string - - // READ-ONLY; The error target. - Target *string -} - -// ErrorResponse - Error response indicates Azure Front Door Standard or Azure Front Door Premium or CDN service is not able -// to process the incoming request. The reason is provided in the error message. -type ErrorResponse struct { - // The error object. - Error *ErrorDetail -} - -// GeoFilter - Rules defining user's geo access within a CDN endpoint. -type GeoFilter struct { - // REQUIRED; Action of the geo filter, i.e. allow or block access. - Action *GeoFilterActions - - // REQUIRED; Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. - CountryCodes []*string - - // REQUIRED; Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) - RelativePath *string -} - -// HTTPErrorRangeParameters - The JSON object that represents the range for http status codes -type HTTPErrorRangeParameters struct { - // The inclusive start of the http status code range. - Begin *int32 - - // The inclusive end of the http status code range. - End *int32 -} - -// HTTPVersionMatchConditionParameters - Defines the parameters for HttpVersion match conditions -type HTTPVersionMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *HTTPVersionOperator - - // REQUIRED - TypeName *HTTPVersionMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// HeaderActionParameters - Defines the parameters for the request header action. -type HeaderActionParameters struct { - // REQUIRED; Action to perform - HeaderAction *HeaderAction - - // REQUIRED; Name of the header to modify - HeaderName *string - - // REQUIRED - TypeName *HeaderActionParametersTypeName - - // Value for the specified action - Value *string -} - -// HealthProbeParameters - The JSON object that contains the properties to send health probes to origin. -type HealthProbeParameters struct { - // The number of seconds between health probes.Default is 240sec. - ProbeIntervalInSeconds *int32 - - // The path relative to the origin that is used to determine the health of the origin. - ProbePath *string - - // Protocol to use for health probe. - ProbeProtocol *ProbeProtocol - - // The type of health probe request that is made. - ProbeRequestType *HealthProbeRequestType -} - -// HostNameMatchConditionParameters - Defines the parameters for HostName match conditions -type HostNameMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *HostNameOperator - - // REQUIRED - TypeName *HostNameMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// IPAddressGroup - CDN Ip address group -type IPAddressGroup struct { - // The delivery region of the ip address group - DeliveryRegion *string - - // The list of ip v4 addresses. - IPv4Addresses []*CidrIPAddress - - // The list of ip v6 addresses. - IPv6Addresses []*CidrIPAddress -} - -// IsDeviceMatchConditionParameters - Defines the parameters for IsDevice match conditions -type IsDeviceMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *IsDeviceOperator - - // REQUIRED - TypeName *IsDeviceMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*IsDeviceMatchConditionParametersMatchValuesItem - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// KeyVaultCertificateSourceParameters - Describes the parameters for using a user's KeyVault certificate for securing custom -// domain. -type KeyVaultCertificateSourceParameters struct { - // REQUIRED; Describes the action that shall be taken when the certificate is removed from Key Vault. - DeleteRule *DeleteRule - - // REQUIRED; Resource group of the user's Key Vault containing the SSL certificate - ResourceGroupName *string - - // REQUIRED; The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. - SecretName *string - - // REQUIRED; Subscription Id of the user's Key Vault containing the SSL certificate - SubscriptionID *string - - // REQUIRED - TypeName *KeyVaultCertificateSourceParametersTypeName - - // REQUIRED; Describes the action that shall be taken when the certificate is updated in Key Vault. - UpdateRule *UpdateRule - - // REQUIRED; The name of the user's Key Vault containing the SSL certificate - VaultName *string - - // The version(GUID) of Key Vault Secret in Key Vault. - SecretVersion *string -} - -// KeyVaultSigningKeyParameters - Describes the parameters for using a user's KeyVault for URL Signing Key. -type KeyVaultSigningKeyParameters struct { - // REQUIRED; Resource group of the user's Key Vault containing the secret - ResourceGroupName *string - - // REQUIRED; The name of secret in Key Vault. - SecretName *string - - // REQUIRED; The version(GUID) of secret in Key Vault. - SecretVersion *string - - // REQUIRED; Subscription Id of the user's Key Vault containing the secret - SubscriptionID *string - - // REQUIRED - TypeName *KeyVaultSigningKeyParametersTypeName - - // REQUIRED; The name of the user's Key Vault containing the secret - VaultName *string -} - -// LinkedEndpoint - Defines the ARM Resource ID for the linked endpoints -type LinkedEndpoint struct { - // ARM Resource ID string. - ID *string -} - -// LoadBalancingSettingsParameters - Round-Robin load balancing settings for a backend pool -type LoadBalancingSettingsParameters struct { - // The additional latency in milliseconds for probes to fall into the lowest latency bucket - AdditionalLatencyInMilliseconds *int32 - - // The number of samples to consider for load balancing decisions - SampleSize *int32 - - // The number of samples within the sample period that must succeed - SuccessfulSamplesRequired *int32 -} - -// LoadParameters - Parameters required for content load. -type LoadParameters struct { - // REQUIRED; The path to the content to be loaded. Path should be a relative file URL of the origin. - ContentPaths []*string -} - -// LogAnalyticsClientGetLogAnalyticsLocationsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsLocations -// method. -type LogAnalyticsClientGetLogAnalyticsLocationsOptions struct { - // placeholder for future optional parameters -} - -// LogAnalyticsClientGetLogAnalyticsMetricsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsMetrics -// method. -type LogAnalyticsClientGetLogAnalyticsMetricsOptions struct { - Continents []string - CountryOrRegions []string - GroupBy []LogMetricsGroupBy -} - -// LogAnalyticsClientGetLogAnalyticsRankingsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsRankings -// method. -type LogAnalyticsClientGetLogAnalyticsRankingsOptions struct { - CustomDomains []string -} - -// LogAnalyticsClientGetLogAnalyticsResourcesOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsResources -// method. -type LogAnalyticsClientGetLogAnalyticsResourcesOptions struct { - // placeholder for future optional parameters -} - -// LogAnalyticsClientGetWafLogAnalyticsMetricsOptions contains the optional parameters for the LogAnalyticsClient.GetWafLogAnalyticsMetrics -// method. -type LogAnalyticsClientGetWafLogAnalyticsMetricsOptions struct { - Actions []WafAction - GroupBy []WafRankingGroupBy - RuleTypes []WafRuleType -} - -// LogAnalyticsClientGetWafLogAnalyticsRankingsOptions contains the optional parameters for the LogAnalyticsClient.GetWafLogAnalyticsRankings -// method. -type LogAnalyticsClientGetWafLogAnalyticsRankingsOptions struct { - Actions []WafAction - RuleTypes []WafRuleType -} - -// LogSpecification - Log specification of operation. -type LogSpecification struct { - // Blob duration of specification. - BlobDuration *string - - // Display name of log specification. - DisplayName *string - - // Pattern to filter based on name - LogFilterPattern *string - - // Name of log specification. - Name *string -} - -// ManagedCertificate - Managed Certificate used for https -type ManagedCertificate struct { - // The type of the secret resource. - Type *SecretType - - // READ-ONLY; Certificate expiration date. - ExpirationDate *string - - // READ-ONLY; Subject name in the certificate. - Subject *string -} - -// ManagedCertificateParameters - Managed Certificate used for https -type ManagedCertificateParameters struct { - // REQUIRED; The type of the secret resource. - Type *SecretType - - // READ-ONLY; Certificate expiration date. - ExpirationDate *string - - // READ-ONLY; Subject name in the certificate. - Subject *string -} - -// GetSecretParameters implements the SecretParametersClassification interface for type ManagedCertificateParameters. -func (m *ManagedCertificateParameters) GetSecretParameters() *SecretParameters { - return &SecretParameters{ - Type: m.Type, - } -} - -// ManagedHTTPSParameters - Defines the certificate source parameters using CDN managed certificate for enabling SSL. -type ManagedHTTPSParameters struct { - // REQUIRED; Defines the source of the SSL certificate. - CertificateSource *CertificateSource - - // REQUIRED; Defines the certificate source parameters using CDN managed certificate for enabling SSL. - CertificateSourceParameters *CertificateSourceParameters - - // REQUIRED; Defines the TLS extension protocol that is used for secure delivery. - ProtocolType *ProtocolType - - // TLS protocol version that will be used for Https - MinimumTLSVersion *MinimumTLSVersion -} - -// GetCustomDomainHTTPSParameters implements the CustomDomainHTTPSParametersClassification interface for type ManagedHTTPSParameters. -func (m *ManagedHTTPSParameters) GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters { - return &CustomDomainHTTPSParameters{ - CertificateSource: m.CertificateSource, - ProtocolType: m.ProtocolType, - MinimumTLSVersion: m.MinimumTLSVersion, - } -} - -// ManagedRuleDefinition - Describes a managed rule definition. -type ManagedRuleDefinition struct { - // READ-ONLY; Describes the functionality of the managed rule. - Description *string - - // READ-ONLY; Identifier for the managed rule. - RuleID *string -} - -// ManagedRuleGroupDefinition - Describes a managed rule group. -type ManagedRuleGroupDefinition struct { - // READ-ONLY; Description of the managed rule group. - Description *string - - // READ-ONLY; Name of the managed rule group. - RuleGroupName *string - - // READ-ONLY; List of rules within the managed rule group. - Rules []*ManagedRuleDefinition -} - -// ManagedRuleGroupOverride - Defines a managed rule group override setting. -type ManagedRuleGroupOverride struct { - // REQUIRED; Describes the managed rule group within the rule set to override - RuleGroupName *string - - // List of rules that will be disabled. If none specified, all rules in the group will be disabled. - Rules []*ManagedRuleOverride -} - -// ManagedRuleOverride - Defines a managed rule group override setting. -type ManagedRuleOverride struct { - // REQUIRED; Identifier for the managed rule. - RuleID *string - - // Describes the override action to be applied when rule matches. - Action *ActionType - - // Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. - EnabledState *ManagedRuleEnabledState -} - -// ManagedRuleSet - Defines a managed rule set. -type ManagedRuleSet struct { - // REQUIRED; Defines the rule set type to use. - RuleSetType *string - - // REQUIRED; Defines the version of the rule set to use. - RuleSetVersion *string - - // Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests. - AnomalyScore *int32 - - // Defines the rule overrides to apply to the rule set. - RuleGroupOverrides []*ManagedRuleGroupOverride -} - -// ManagedRuleSetDefinition - Describes a managed rule set definition. -type ManagedRuleSetDefinition struct { - // Describes managed rule set definition properties. - Properties *ManagedRuleSetDefinitionProperties - - // The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. - SKU *SKU - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// ManagedRuleSetDefinitionList - List of managed rule set definitions available for use in a policy. -type ManagedRuleSetDefinitionList struct { - // URL to retrieve next set of managed rule set definitions. - NextLink *string - - // READ-ONLY; List of managed rule set definitions. - Value []*ManagedRuleSetDefinition -} - -// ManagedRuleSetDefinitionProperties - Properties for a managed rule set definition. -type ManagedRuleSetDefinitionProperties struct { - // READ-ONLY; Provisioning state of the managed rule set. - ProvisioningState *string - - // READ-ONLY; Rule groups of the managed rule set. - RuleGroups []*ManagedRuleGroupDefinition - - // READ-ONLY; Type of the managed rule set. - RuleSetType *string - - // READ-ONLY; Version of the managed rule set type. - RuleSetVersion *string -} - -// ManagedRuleSetList - Defines the list of managed rule sets for the policy. -type ManagedRuleSetList struct { - // List of rule sets. - ManagedRuleSets []*ManagedRuleSet -} - -// ManagedRuleSetsClientListOptions contains the optional parameters for the ManagedRuleSetsClient.NewListPager method. -type ManagedRuleSetsClientListOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientCheckEndpointNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckEndpointNameAvailability -// method. -type ManagementClientCheckEndpointNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientCheckNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckNameAvailability -// method. -type ManagementClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientCheckNameAvailabilityWithSubscriptionOptions contains the optional parameters for the ManagementClient.CheckNameAvailabilityWithSubscription -// method. -type ManagementClientCheckNameAvailabilityWithSubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientValidateProbeOptions contains the optional parameters for the ManagementClient.ValidateProbe method. -type ManagementClientValidateProbeOptions struct { - // placeholder for future optional parameters -} - -// MatchCondition - Define match conditions -type MatchCondition struct { - // REQUIRED; List of possible match values. - MatchValue []*string - - // REQUIRED; Match variable to compare against. - MatchVariable *WafMatchVariable - - // REQUIRED; Describes operator to be matched - Operator *Operator - - // Describes if the result of this condition should be negated. - NegateCondition *bool - - // Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. - Selector *string - - // List of transforms. - Transforms []*TransformType -} - -// MetricAvailability - Retention policy of a resource metric. -type MetricAvailability struct { - BlobDuration *string - TimeGrain *string -} - -// MetricSpecification - Metric specification of operation. -type MetricSpecification struct { - // The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'. - AggregationType *string - - // Retention policies of a resource metric. - Availabilities []*MetricAvailability - - // The dimensions of metric - Dimensions []*DimensionProperties - - // Display description of metric specification. - DisplayDescription *string - - // Display name of metric specification. - DisplayName *string - - // Property to specify whether to fill gap with zero. - FillGapWithZero *bool - - // Property to specify metric is internal or not. - IsInternal *bool - - // Pattern to filter based on name - MetricFilterPattern *string - - // Name of metric specification. - Name *string - - // The supported time grain types for the metrics. - SupportedTimeGrainTypes []*string - - // The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. - Unit *string -} - -// MetricsResponse - Metrics Response -type MetricsResponse struct { - DateTimeBegin *time.Time - DateTimeEnd *time.Time - Granularity *MetricsResponseGranularity - Series []*MetricsResponseSeriesItem -} - -type MetricsResponseSeriesItem struct { - Data []*Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems - Groups []*MetricsResponseSeriesPropertiesItemsItem - Metric *string - Unit *MetricsResponseSeriesItemUnit -} - -type MetricsResponseSeriesPropertiesItemsItem struct { - Name *string - Value *string -} - -// Operation - CDN REST API operation -type Operation struct { - // The object that represents the operation. - Display *OperationDisplay - - // Indicates whether the operation is a data action - IsDataAction *bool - - // Properties of operation, include metric specifications. - OperationProperties *OperationProperties - - // READ-ONLY; Operation name: {provider}/{resource}/{operation} - Name *string - - // READ-ONLY; The origin of operations. - Origin *string -} - -// OperationDisplay - The object that represents the operation. -type OperationDisplay struct { - // READ-ONLY; Description of operation. - Description *string - - // READ-ONLY; Operation type: Read, write, delete, etc. - Operation *string - - // READ-ONLY; Service provider: Microsoft.Cdn - Provider *string - - // READ-ONLY; Resource on which the operation is performed: Profile, endpoint, etc. - Resource *string -} - -// OperationProperties - Properties of operation, include metric specifications. -type OperationProperties struct { - // One property of operation, include metric specifications. - ServiceSpecification *ServiceSpecification -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// OperationsListResult - Result of the request to list CDN operations. It contains a list of operations and a URL link to -// get the next set of results. -type OperationsListResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string - - // List of CDN operations supported by the CDN resource provider. - Value []*Operation -} - -// Origin - CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint -// do not have the requested content cached, they attempt to fetch it from one or more of -// the configured origins. -type Origin struct { - // The JSON object that contains the properties of the origin. - Properties *OriginProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// OriginGroup - Origin group comprising of origins is used for load balancing to origins when the content cannot be served -// from CDN. -type OriginGroup struct { - // The JSON object that contains the properties of the origin group. - Properties *OriginGroupProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// OriginGroupListResult - Result of the request to list origin groups. It contains a list of origin groups objects and a -// URL link to get the next set of results. -type OriginGroupListResult struct { - // URL to get the next set of origin objects if there are any. - NextLink *string - - // READ-ONLY; List of CDN origin groups within an endpoint - Value []*OriginGroup -} - -// OriginGroupOverride - Defines the parameters for the origin group override configuration. -type OriginGroupOverride struct { - // Protocol this rule will use when forwarding traffic to backends. - ForwardingProtocol *ForwardingProtocol - - // defines the OriginGroup that would override the DefaultOriginGroup on route. - OriginGroup *ResourceReference -} - -// OriginGroupOverrideAction - Defines the origin group override action for the delivery rule. -type OriginGroupOverrideAction struct { - // REQUIRED; The name of the action for the delivery rule. - Name *DeliveryRuleAction - - // REQUIRED; Defines the parameters for the action. - Parameters *OriginGroupOverrideActionParameters -} - -// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type OriginGroupOverrideAction. -func (o *OriginGroupOverrideAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { - return &DeliveryRuleActionAutoGenerated{ - Name: o.Name, - } -} - -// OriginGroupOverrideActionParameters - Defines the parameters for the origin group override action. -type OriginGroupOverrideActionParameters struct { - // REQUIRED; defines the OriginGroup that would override the DefaultOriginGroup. - OriginGroup *ResourceReference - - // REQUIRED - TypeName *OriginGroupOverrideActionParametersTypeName -} - -// OriginGroupProperties - The JSON object that contains the properties of the origin group. -type OriginGroupProperties struct { - // Health probe settings to the origin that is used to determine the health of the origin. - HealthProbeSettings *HealthProbeParameters - - // The source of the content being delivered via CDN within given origin group. - Origins []*ResourceReference - - // The JSON object that contains the properties to determine origin health using real requests/responses. This property is - // currently not supported. - ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters - - // Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint - // is added. Default is 10 mins. This property is currently not supported. - TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 - - // READ-ONLY; Provisioning status of the origin group. - ProvisioningState *OriginGroupProvisioningState - - // READ-ONLY; Resource status of the origin group. - ResourceState *OriginGroupResourceState -} - -// OriginGroupUpdateParameters - Origin group properties needed for origin group creation or update. -type OriginGroupUpdateParameters struct { - // The JSON object that contains the properties of the origin group. - Properties *OriginGroupUpdatePropertiesParameters -} - -// OriginGroupUpdatePropertiesParameters - The JSON object that contains the properties of the origin group. -type OriginGroupUpdatePropertiesParameters struct { - // Health probe settings to the origin that is used to determine the health of the origin. - HealthProbeSettings *HealthProbeParameters - - // The source of the content being delivered via CDN within given origin group. - Origins []*ResourceReference - - // The JSON object that contains the properties to determine origin health using real requests/responses. This property is - // currently not supported. - ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters - - // Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint - // is added. Default is 10 mins. This property is currently not supported. - TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 -} - -// OriginGroupsClientBeginCreateOptions contains the optional parameters for the OriginGroupsClient.BeginCreate method. -type OriginGroupsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OriginGroupsClientBeginDeleteOptions contains the optional parameters for the OriginGroupsClient.BeginDelete method. -type OriginGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OriginGroupsClientBeginUpdateOptions contains the optional parameters for the OriginGroupsClient.BeginUpdate method. -type OriginGroupsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OriginGroupsClientGetOptions contains the optional parameters for the OriginGroupsClient.Get method. -type OriginGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// OriginGroupsClientListByEndpointOptions contains the optional parameters for the OriginGroupsClient.NewListByEndpointPager -// method. -type OriginGroupsClientListByEndpointOptions struct { - // placeholder for future optional parameters -} - -// OriginListResult - Result of the request to list origins. It contains a list of origin objects and a URL link to get the -// next set of results. -type OriginListResult struct { - // URL to get the next set of origin objects if there are any. - NextLink *string - - // READ-ONLY; List of CDN origins within an endpoint - Value []*Origin -} - -// OriginProperties - The JSON object that contains the properties of the origin. -type OriginProperties struct { - // Origin is enabled for load balancing or not - Enabled *bool - - // The value of the HTTP port. Must be between 1 and 65535. - HTTPPort *int32 - - // The value of the HTTPS port. Must be between 1 and 65535. - HTTPSPort *int32 - - // The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across - // all origins in an endpoint. - HostName *string - - // The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this - // value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services - // require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint - OriginHostHeader *string - - // Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any - // lower priority origin is healthy.Must be between 1 and 5 - Priority *int32 - - // The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' - PrivateLinkAlias *string - - // A custom message to be included in the approval request to connect to the Private Link. - PrivateLinkApprovalMessage *string - - // The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated - PrivateLinkLocation *string - - // The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' - PrivateLinkResourceID *string - - // Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 - Weight *int32 - - // READ-ONLY; The approval status for the connection to the Private Link - PrivateEndpointStatus *PrivateEndpointStatus - - // READ-ONLY; Provisioning status of the origin. - ProvisioningState *OriginProvisioningState - - // READ-ONLY; Resource status of the origin. - ResourceState *OriginResourceState -} - -// OriginUpdateParameters - Origin properties needed for origin update. -type OriginUpdateParameters struct { - // The JSON object that contains the properties of the origin. - Properties *OriginUpdatePropertiesParameters -} - -// OriginUpdatePropertiesParameters - The JSON object that contains the properties of the origin. -type OriginUpdatePropertiesParameters struct { - // Origin is enabled for load balancing or not - Enabled *bool - - // The value of the HTTP port. Must be between 1 and 65535. - HTTPPort *int32 - - // The value of the HTTPS port. Must be between 1 and 65535. - HTTPSPort *int32 - - // The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across - // all origins in an endpoint. - HostName *string - - // The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this - // value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services - // require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint - OriginHostHeader *string - - // Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any - // lower priority origin is healthy.Must be between 1 and 5 - Priority *int32 - - // The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' - PrivateLinkAlias *string - - // A custom message to be included in the approval request to connect to the Private Link. - PrivateLinkApprovalMessage *string - - // The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated - PrivateLinkLocation *string - - // The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' - PrivateLinkResourceID *string - - // Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 - Weight *int32 -} - -// OriginsClientBeginCreateOptions contains the optional parameters for the OriginsClient.BeginCreate method. -type OriginsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OriginsClientBeginDeleteOptions contains the optional parameters for the OriginsClient.BeginDelete method. -type OriginsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OriginsClientBeginUpdateOptions contains the optional parameters for the OriginsClient.BeginUpdate method. -type OriginsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OriginsClientGetOptions contains the optional parameters for the OriginsClient.Get method. -type OriginsClientGetOptions struct { - // placeholder for future optional parameters -} - -// OriginsClientListByEndpointOptions contains the optional parameters for the OriginsClient.NewListByEndpointPager method. -type OriginsClientListByEndpointOptions struct { - // placeholder for future optional parameters -} - -// PoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.BeginCreateOrUpdate method. -type PoliciesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PoliciesClientBeginUpdateOptions contains the optional parameters for the PoliciesClient.BeginUpdate method. -type PoliciesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PoliciesClientDeleteOptions contains the optional parameters for the PoliciesClient.Delete method. -type PoliciesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method. -type PoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method. -type PoliciesClientListOptions struct { - // placeholder for future optional parameters -} - -// PolicySettings - Defines contents of a web application firewall global configuration -type PolicySettings struct { - // If the action type is block, customer can override the response body. The body must be specified in base64 encoding. - DefaultCustomBlockResponseBody *string - - // If the action type is block, this field defines the default customer overridable http response status code. - DefaultCustomBlockResponseStatusCode *PolicySettingsDefaultCustomBlockResponseStatusCode - - // If action type is redirect, this field represents the default redirect URL for the client. - DefaultRedirectURL *string - - // describes if the policy is in enabled state or disabled state - EnabledState *PolicyEnabledState - - // Describes if it is in detection mode or prevention mode at policy level. - Mode *PolicyMode -} - -// PostArgsMatchConditionParameters - Defines the parameters for PostArgs match conditions -type PostArgsMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *PostArgsOperator - - // REQUIRED - TypeName *PostArgsMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // Name of PostArg to be matched - Selector *string - - // List of transforms - Transforms []*Transform -} - -// Profile - A profile is a logical grouping of endpoints that share the same settings. -type Profile struct { - // REQUIRED; Resource location. - Location *string - - // REQUIRED; The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the - // profile. - SKU *SKU - - // The JSON object that contains the properties required to create a profile. - Properties *ProfileProperties - - // Resource tags. - Tags map[string]*string - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. - Kind *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// ProfileListResult - Result of the request to list profiles. It contains a list of profile objects and a URL link to get -// the next set of results. -type ProfileListResult struct { - // URL to get the next set of profile objects if there are any. - NextLink *string - - // READ-ONLY; List of CDN profiles within a resource group. - Value []*Profile -} - -// ProfileProperties - The JSON object that contains the properties required to create a profile. -type ProfileProperties struct { - // Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. - OriginResponseTimeoutSeconds *int32 - - // READ-ONLY; The Id of the frontdoor. - FrontDoorID *string - - // READ-ONLY; Provisioning status of the profile. - ProvisioningState *ProfileProvisioningState - - // READ-ONLY; Resource status of the profile. - ResourceState *ProfileResourceState -} - -// ProfilePropertiesUpdateParameters - The JSON object containing profile update parameters. -type ProfilePropertiesUpdateParameters struct { - // Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. - OriginResponseTimeoutSeconds *int32 -} - -// ProfileUpdateParameters - Properties required to update a profile. -type ProfileUpdateParameters struct { - // The JSON object containing profile update parameters. - Properties *ProfilePropertiesUpdateParameters - - // Profile tags - Tags map[string]*string -} - -// ProfilesClientBeginCreateOptions contains the optional parameters for the ProfilesClient.BeginCreate method. -type ProfilesClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. -type ProfilesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ProfilesClientBeginUpdateOptions contains the optional parameters for the ProfilesClient.BeginUpdate method. -type ProfilesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ProfilesClientGenerateSsoURIOptions contains the optional parameters for the ProfilesClient.GenerateSsoURI method. -type ProfilesClientGenerateSsoURIOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. -type ProfilesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientListByResourceGroupOptions contains the optional parameters for the ProfilesClient.NewListByResourceGroupPager -// method. -type ProfilesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method. -type ProfilesClientListOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientListResourceUsageOptions contains the optional parameters for the ProfilesClient.NewListResourceUsagePager -// method. -type ProfilesClientListResourceUsageOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientListSupportedOptimizationTypesOptions contains the optional parameters for the ProfilesClient.ListSupportedOptimizationTypes -// method. -type ProfilesClientListSupportedOptimizationTypesOptions struct { - // placeholder for future optional parameters -} - -// ProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location -// and tags -type ProxyResource struct { - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// PurgeParameters - Parameters required for content purge. -type PurgeParameters struct { - // REQUIRED; The path to the content to be purged. Can describe a file path or a wild card directory. - ContentPaths []*string -} - -// QueryStringMatchConditionParameters - Defines the parameters for QueryString match conditions -type QueryStringMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *QueryStringOperator - - // REQUIRED - TypeName *QueryStringMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// RankingsResponse - Rankings Response -type RankingsResponse struct { - DateTimeBegin *time.Time - DateTimeEnd *time.Time - Tables []*RankingsResponseTablesItem -} - -type RankingsResponseTablesItem struct { - Data []*RankingsResponseTablesPropertiesItemsItem - Ranking *string -} - -type RankingsResponseTablesPropertiesItemsItem struct { - Metrics []*RankingsResponseTablesPropertiesItemsMetricsItem - Name *string -} - -type RankingsResponseTablesPropertiesItemsMetricsItem struct { - Metric *string - Percentage *float32 - Value *int64 -} - -// RateLimitRule - Defines a rate limiting rule that can be included in a waf policy -type RateLimitRule struct { - // REQUIRED; Describes what action to be applied when rule matches - Action *ActionType - - // REQUIRED; List of match conditions. - MatchConditions []*MatchCondition - - // REQUIRED; Defines the name of the custom rule - Name *string - - // REQUIRED; Defines in what order this rule be evaluated in the overall list of custom rules - Priority *int32 - - // REQUIRED; Defines rate limit duration. Default is 1 minute. - RateLimitDurationInMinutes *int32 - - // REQUIRED; Defines rate limit threshold. - RateLimitThreshold *int32 - - // Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. - EnabledState *CustomRuleEnabledState -} - -// RateLimitRuleList - Defines contents of rate limit rules -type RateLimitRuleList struct { - // List of rules - Rules []*RateLimitRule -} - -// RemoteAddressMatchConditionParameters - Defines the parameters for RemoteAddress match conditions -type RemoteAddressMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *RemoteAddressOperator - - // REQUIRED - TypeName *RemoteAddressMatchConditionParametersTypeName - - // Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the - // variable with the given operator this match condition is considered a match. - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// RequestBodyMatchConditionParameters - Defines the parameters for RequestBody match conditions -type RequestBodyMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *RequestBodyOperator - - // REQUIRED - TypeName *RequestBodyMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// RequestHeaderMatchConditionParameters - Defines the parameters for RequestHeader match conditions -type RequestHeaderMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *RequestHeaderOperator - - // REQUIRED - TypeName *RequestHeaderMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // Name of Header to be matched - Selector *string - - // List of transforms - Transforms []*Transform -} - -// RequestMethodMatchConditionParameters - Defines the parameters for RequestMethod match conditions -type RequestMethodMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *RequestMethodOperator - - // REQUIRED - TypeName *RequestMethodMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*RequestMethodMatchConditionParametersMatchValuesItem - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// RequestSchemeMatchConditionParameters - Defines the parameters for RequestScheme match conditions -type RequestSchemeMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *RequestSchemeMatchConditionParametersOperator - - // REQUIRED - TypeName *RequestSchemeMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*RequestSchemeMatchConditionParametersMatchValuesItem - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// RequestURIMatchConditionParameters - Defines the parameters for RequestUri match conditions -type RequestURIMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *RequestURIOperator - - // REQUIRED - TypeName *RequestURIMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// Resource - The core properties of ARM resources -type Resource struct { - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// ResourceReference - Reference to another resource. -type ResourceReference struct { - // Resource ID. - ID *string -} - -// ResourceUsage - Output of check resource usage API. -type ResourceUsage struct { - // READ-ONLY; Actual value of usage on the specified resource type. - CurrentValue *int32 - - // READ-ONLY; Quota of the specified resource type. - Limit *int32 - - // READ-ONLY; Resource type for which the usage is provided. - ResourceType *string - - // READ-ONLY; Unit of the usage. e.g. count. - Unit *ResourceUsageUnit -} - -// ResourceUsageClientListOptions contains the optional parameters for the ResourceUsageClient.NewListPager method. -type ResourceUsageClientListOptions struct { - // placeholder for future optional parameters -} - -// ResourceUsageListResult - Output of check resource usage API. -type ResourceUsageListResult struct { - // URL to get the next set of custom domain objects if there are any. - NextLink *string - - // READ-ONLY; List of resource usages. - Value []*ResourceUsage -} - -// ResourcesResponse - Resources Response -type ResourcesResponse struct { - CustomDomains []*ResourcesResponseCustomDomainsItem - Endpoints []*ResourcesResponseEndpointsItem -} - -type ResourcesResponseCustomDomainsItem struct { - EndpointID *string - History *bool - ID *string - Name *string -} - -type ResourcesResponseEndpointsItem struct { - CustomDomains []*ResourcesResponseEndpointsPropertiesItemsItem - History *bool - ID *string - Name *string -} - -type ResourcesResponseEndpointsPropertiesItemsItem struct { - EndpointID *string - History *bool - ID *string - Name *string -} - -// ResponseBasedOriginErrorDetectionParameters - The JSON object that contains the properties to determine origin health using -// real requests/responses. -type ResponseBasedOriginErrorDetectionParameters struct { - // The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. - HTTPErrorRanges []*HTTPErrorRangeParameters - - // Type of response errors for real user requests for which origin will be deemed unhealthy - ResponseBasedDetectedErrorTypes *ResponseBasedDetectedErrorTypes - - // The percentage of failed requests in the sample where failover should trigger. - ResponseBasedFailoverThresholdPercentage *int32 -} - -// Route - Friendly Routes name mapping to the any Routes or secret related information. -type Route struct { - // The JSON object that contains the properties of the Routes to create. - Properties *RouteProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// RouteConfigurationOverrideActionParameters - Defines the parameters for the route configuration override action. -type RouteConfigurationOverrideActionParameters struct { - // REQUIRED - TypeName *RouteConfigurationOverrideActionParametersTypeName - - // The caching configuration associated with this rule. To disable caching, do not provide a cacheConfiguration object. - CacheConfiguration *CacheConfiguration - - // A reference to the origin group override configuration. Leave empty to use the default origin group on route. - OriginGroupOverride *OriginGroupOverride -} - -// RouteListResult - Result of the request to list routes. It contains a list of route objects and a URL link to get the next -// set of results. -type RouteListResult struct { - // URL to get the next set of route objects if there are any. - NextLink *string - - // READ-ONLY; List of AzureFrontDoor routes within a profile. - Value []*Route -} - -// RouteProperties - The JSON object that contains the properties of the Routes to create. -type RouteProperties struct { - // The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. - CacheConfiguration *AfdRouteCacheConfiguration - - // Domains referenced by this endpoint. - CustomDomains []*ActivatedResourceReference - - // Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' - EnabledState *EnabledState - - // Protocol this rule will use when forwarding traffic to backends. - ForwardingProtocol *ForwardingProtocol - - // Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it - // will be the first rule that gets executed. - HTTPSRedirect *HTTPSRedirect - - // whether this route will be linked to the default endpoint domain. - LinkToDefaultDomain *LinkToDefaultDomain - - // A reference to the origin group. - OriginGroup *ResourceReference - - // A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - OriginPath *string - - // The route patterns of the rule. - PatternsToMatch []*string - - // rule sets referenced by this endpoint. - RuleSets []*ResourceReference - - // List of supported protocols for this route. - SupportedProtocols []*AFDEndpointProtocols - - // READ-ONLY - DeploymentStatus *DeploymentStatus - - // READ-ONLY; The name of the endpoint which holds the route. - EndpointName *string - - // READ-ONLY; Provisioning status - ProvisioningState *AfdProvisioningState -} - -// RouteUpdateParameters - The domain JSON object required for domain creation or update. -type RouteUpdateParameters struct { - // The JSON object that contains the properties of the domain to create. - Properties *RouteUpdatePropertiesParameters -} - -// RouteUpdatePropertiesParameters - The JSON object that contains the properties of the domain to create. -type RouteUpdatePropertiesParameters struct { - // The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. - CacheConfiguration *AfdRouteCacheConfiguration - - // Domains referenced by this endpoint. - CustomDomains []*ActivatedResourceReference - - // Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' - EnabledState *EnabledState - - // Protocol this rule will use when forwarding traffic to backends. - ForwardingProtocol *ForwardingProtocol - - // Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it - // will be the first rule that gets executed. - HTTPSRedirect *HTTPSRedirect - - // whether this route will be linked to the default endpoint domain. - LinkToDefaultDomain *LinkToDefaultDomain - - // A reference to the origin group. - OriginGroup *ResourceReference - - // A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - OriginPath *string - - // The route patterns of the rule. - PatternsToMatch []*string - - // rule sets referenced by this endpoint. - RuleSets []*ResourceReference - - // List of supported protocols for this route. - SupportedProtocols []*AFDEndpointProtocols - - // READ-ONLY; The name of the endpoint which holds the route. - EndpointName *string -} - -// RoutesClientBeginCreateOptions contains the optional parameters for the RoutesClient.BeginCreate method. -type RoutesClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. -type RoutesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutesClientBeginUpdateOptions contains the optional parameters for the RoutesClient.BeginUpdate method. -type RoutesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. -type RoutesClientGetOptions struct { - // placeholder for future optional parameters -} - -// RoutesClientListByEndpointOptions contains the optional parameters for the RoutesClient.NewListByEndpointPager method. -type RoutesClientListByEndpointOptions struct { - // placeholder for future optional parameters -} - -// Rule - Friendly Rules name mapping to the any Rules or secret related information. -type Rule struct { - // The JSON object that contains the properties of the Rules to create. - Properties *RuleProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// RuleListResult - Result of the request to list rules. It contains a list of rule objects and a URL link to get the next -// set of results. -type RuleListResult struct { - // URL to get the next set of rule objects if there are any. - NextLink *string - - // READ-ONLY; List of AzureFrontDoor rules within a rule set. - Value []*Rule -} - -// RuleProperties - The JSON object that contains the properties of the Rules to create. -type RuleProperties struct { - // A list of actions that are executed when all the conditions of a rule are satisfied. - Actions []DeliveryRuleActionAutoGeneratedClassification - - // A list of conditions that must be matched for the actions to be executed - Conditions []DeliveryRuleConditionClassification - - // If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults - // to Continue. - MatchProcessingBehavior *MatchProcessingBehavior - - // The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will - // be applied before a rule with a greater order. Rule with order 0 is a special - // rule. It does not require any condition and actions listed in it will always be applied. - Order *int32 - - // READ-ONLY - DeploymentStatus *DeploymentStatus - - // READ-ONLY; Provisioning status - ProvisioningState *AfdProvisioningState - - // READ-ONLY; The name of the rule set containing the rule. - RuleSetName *string -} - -// RuleSet - Friendly RuleSet name mapping to the any RuleSet or secret related information. -type RuleSet struct { - // The JSON object that contains the properties of the Rule Set to create. - Properties *RuleSetProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// RuleSetListResult - Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get -// the next set of results. -type RuleSetListResult struct { - // URL to get the next set of rule set objects if there are any. - NextLink *string - - // READ-ONLY; List of AzureFrontDoor rule sets within a profile. - Value []*RuleSet -} - -// RuleSetProperties - The JSON object that contains the properties of the Rule Set to create. -type RuleSetProperties struct { - // READ-ONLY - DeploymentStatus *DeploymentStatus - - // READ-ONLY; The name of the profile which holds the rule set. - ProfileName *string - - // READ-ONLY; Provisioning status - ProvisioningState *AfdProvisioningState -} - -// RuleSetsClientBeginDeleteOptions contains the optional parameters for the RuleSetsClient.BeginDelete method. -type RuleSetsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RuleSetsClientCreateOptions contains the optional parameters for the RuleSetsClient.Create method. -type RuleSetsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// RuleSetsClientGetOptions contains the optional parameters for the RuleSetsClient.Get method. -type RuleSetsClientGetOptions struct { - // placeholder for future optional parameters -} - -// RuleSetsClientListByProfileOptions contains the optional parameters for the RuleSetsClient.NewListByProfilePager method. -type RuleSetsClientListByProfileOptions struct { - // placeholder for future optional parameters -} - -// RuleSetsClientListResourceUsageOptions contains the optional parameters for the RuleSetsClient.NewListResourceUsagePager -// method. -type RuleSetsClientListResourceUsageOptions struct { - // placeholder for future optional parameters -} - -// RuleUpdateParameters - The domain JSON object required for domain creation or update. -type RuleUpdateParameters struct { - // The JSON object that contains the properties of the rule to update. - Properties *RuleUpdatePropertiesParameters -} - -// RuleUpdatePropertiesParameters - The JSON object that contains the properties of the rule to update. -type RuleUpdatePropertiesParameters struct { - // A list of actions that are executed when all the conditions of a rule are satisfied. - Actions []DeliveryRuleActionAutoGeneratedClassification - - // A list of conditions that must be matched for the actions to be executed - Conditions []DeliveryRuleConditionClassification - - // If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults - // to Continue. - MatchProcessingBehavior *MatchProcessingBehavior - - // The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will - // be applied before a rule with a greater order. Rule with order 0 is a special - // rule. It does not require any condition and actions listed in it will always be applied. - Order *int32 - - // READ-ONLY; The name of the rule set containing the rule. - RuleSetName *string -} - -// RulesClientBeginCreateOptions contains the optional parameters for the RulesClient.BeginCreate method. -type RulesClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RulesClientBeginDeleteOptions contains the optional parameters for the RulesClient.BeginDelete method. -type RulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RulesClientBeginUpdateOptions contains the optional parameters for the RulesClient.BeginUpdate method. -type RulesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RulesClientGetOptions contains the optional parameters for the RulesClient.Get method. -type RulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// RulesClientListByRuleSetOptions contains the optional parameters for the RulesClient.NewListByRuleSetPager method. -type RulesClientListByRuleSetOptions struct { - // placeholder for future optional parameters -} - -// SKU - StandardVerizon = The SKU name for a Standard Verizon CDN profile. PremiumVerizon = The SKU name for a Premium Verizon -// CDN profile. CustomVerizon = The SKU name for a Custom Verizon CDN profile. -// StandardAkamai = The SKU name for an Akamai CDN profile. StandardChinaCdn = The SKU name for a China CDN profile for VOD, -// Web and download scenarios using GB based billing model. StandardMicrosoft = -// The SKU name for a Standard Microsoft CDN profile. StandardAzureFrontDoor = The SKU name for an Azure Front Door Standard -// profile. PremiumAzureFrontDoor = The SKU name for an Azure Front Door Premium -// profile. Standard955BandWidthChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using -// 95-5 peak bandwidth billing model. StandardAvgBandWidthChinaCdn = The SKU name -// for a China CDN profile for VOD, Web and download scenarios using monthly average peak bandwidth billing model. StandardPlusChinaCdn -// = The SKU name for a China CDN profile for live-streaming using GB -// based billing model. StandardPlus955BandWidthChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 -// peak bandwidth billing model. StandardPlusAvgBandWidth_ChinaCdn = The SKU name -// for a China CDN live-streaming profile using monthly average peak bandwidth billing model. -type SKU struct { - // Name of the pricing tier. - Name *SKUName -} - -// SSLProtocolMatchConditionParameters - Defines the parameters for SslProtocol match conditions -type SSLProtocolMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *SSLProtocolOperator - - // REQUIRED - TypeName *SSLProtocolMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*SSLProtocol - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// Secret - Friendly Secret name mapping to the any Secret or secret related information. -type Secret struct { - // The JSON object that contains the properties of the Secret to create. - Properties *SecretProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// SecretListResult - Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the -// next set of results. -type SecretListResult struct { - // URL to get the next set of Secret objects if there are any. - NextLink *string - - // READ-ONLY; List of AzureFrontDoor secrets within a profile. - Value []*Secret -} - -// SecretParametersClassification provides polymorphic access to related types. -// Call the interface's GetSecretParameters() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFirstPartyManagedCertificateParameters, *CustomerCertificateParameters, *ManagedCertificateParameters, *SecretParameters, -// - *URLSigningKeyParameters -type SecretParametersClassification interface { - // GetSecretParameters returns the SecretParameters content of the underlying type. - GetSecretParameters() *SecretParameters -} - -// SecretParameters - The json object containing secret parameters -type SecretParameters struct { - // REQUIRED; The type of the secret resource. - Type *SecretType -} - -// GetSecretParameters implements the SecretParametersClassification interface for type SecretParameters. -func (s *SecretParameters) GetSecretParameters() *SecretParameters { return s } - -// SecretProperties - The JSON object that contains the properties of the Secret to create. -type SecretProperties struct { - // object which contains secret parameters - Parameters SecretParametersClassification - - // READ-ONLY - DeploymentStatus *DeploymentStatus - - // READ-ONLY; The name of the profile which holds the secret. - ProfileName *string - - // READ-ONLY; Provisioning status - ProvisioningState *AfdProvisioningState -} - -// SecretsClientBeginCreateOptions contains the optional parameters for the SecretsClient.BeginCreate method. -type SecretsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecretsClientBeginDeleteOptions contains the optional parameters for the SecretsClient.BeginDelete method. -type SecretsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. -type SecretsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecretsClientListByProfileOptions contains the optional parameters for the SecretsClient.NewListByProfilePager method. -type SecretsClientListByProfileOptions struct { - // placeholder for future optional parameters -} - -// SecurityPoliciesClientBeginCreateOptions contains the optional parameters for the SecurityPoliciesClient.BeginCreate method. -type SecurityPoliciesClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityPoliciesClientBeginDeleteOptions contains the optional parameters for the SecurityPoliciesClient.BeginDelete method. -type SecurityPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityPoliciesClientBeginPatchOptions contains the optional parameters for the SecurityPoliciesClient.BeginPatch method. -type SecurityPoliciesClientBeginPatchOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityPoliciesClientGetOptions contains the optional parameters for the SecurityPoliciesClient.Get method. -type SecurityPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecurityPoliciesClientListByProfileOptions contains the optional parameters for the SecurityPoliciesClient.NewListByProfilePager -// method. -type SecurityPoliciesClientListByProfileOptions struct { - // placeholder for future optional parameters -} - -// SecurityPolicy association for AzureFrontDoor profile -type SecurityPolicy struct { - // The json object that contains properties required to create a security policy - Properties *SecurityPolicyProperties - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// SecurityPolicyListResult - Result of the request to list security policies. It contains a list of security policy objects -// and a URL link to get the next set of results. -type SecurityPolicyListResult struct { - // URL to get the next set of security policy objects if there is any. - NextLink *string - - // READ-ONLY; List of Security policies within a profile - Value []*SecurityPolicy -} - -// SecurityPolicyProperties - The json object that contains properties required to create a security policy -type SecurityPolicyProperties struct { - // object which contains security policy parameters - Parameters SecurityPolicyPropertiesParametersClassification - - // READ-ONLY - DeploymentStatus *DeploymentStatus - - // READ-ONLY; The name of the profile which holds the security policy. - ProfileName *string - - // READ-ONLY; Provisioning status - ProvisioningState *AfdProvisioningState -} - -// SecurityPolicyPropertiesParametersClassification provides polymorphic access to related types. -// Call the interface's GetSecurityPolicyPropertiesParameters() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *SecurityPolicyPropertiesParameters, *SecurityPolicyWebApplicationFirewallParameters -type SecurityPolicyPropertiesParametersClassification interface { - // GetSecurityPolicyPropertiesParameters returns the SecurityPolicyPropertiesParameters content of the underlying type. - GetSecurityPolicyPropertiesParameters() *SecurityPolicyPropertiesParameters -} - -// SecurityPolicyPropertiesParameters - The json object containing security policy parameters -type SecurityPolicyPropertiesParameters struct { - // REQUIRED; The type of the Security policy to create. - Type *SecurityPolicyType -} - -// GetSecurityPolicyPropertiesParameters implements the SecurityPolicyPropertiesParametersClassification interface for type -// SecurityPolicyPropertiesParameters. -func (s *SecurityPolicyPropertiesParameters) GetSecurityPolicyPropertiesParameters() *SecurityPolicyPropertiesParameters { - return s -} - -// SecurityPolicyUpdateParameters - The JSON object containing security policy update parameters. -type SecurityPolicyUpdateParameters struct { - // The json object that contains properties required to update a security policy - Properties *SecurityPolicyUpdateProperties -} - -// SecurityPolicyUpdateProperties - The json object that contains properties required to update a security policy -type SecurityPolicyUpdateProperties struct { - // object which contains security policy parameters - Parameters SecurityPolicyPropertiesParametersClassification -} - -// SecurityPolicyWebApplicationFirewallAssociation - settings for security policy patterns to match -type SecurityPolicyWebApplicationFirewallAssociation struct { - // List of domains. - Domains []*ActivatedResourceReference - - // List of paths - PatternsToMatch []*string -} - -// SecurityPolicyWebApplicationFirewallParameters - The json object containing security policy waf parameters -type SecurityPolicyWebApplicationFirewallParameters struct { - // REQUIRED; The type of the Security policy to create. - Type *SecurityPolicyType - - // Waf associations - Associations []*SecurityPolicyWebApplicationFirewallAssociation - - // Resource ID. - WafPolicy *ResourceReference -} - -// GetSecurityPolicyPropertiesParameters implements the SecurityPolicyPropertiesParametersClassification interface for type -// SecurityPolicyWebApplicationFirewallParameters. -func (s *SecurityPolicyWebApplicationFirewallParameters) GetSecurityPolicyPropertiesParameters() *SecurityPolicyPropertiesParameters { - return &SecurityPolicyPropertiesParameters{ - Type: s.Type, - } -} - -// ServerPortMatchConditionParameters - Defines the parameters for ServerPort match conditions -type ServerPortMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *ServerPortOperator - - // REQUIRED - TypeName *ServerPortMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// ServiceSpecification - One property of operation, include log specifications. -type ServiceSpecification struct { - // Log specifications of operation. - LogSpecifications []*LogSpecification - - // Metric specifications of operation. - MetricSpecifications []*MetricSpecification -} - -// SharedPrivateLinkResourceProperties - Describes the properties of an existing Shared Private Link Resource to use when -// connecting to a private origin. -type SharedPrivateLinkResourceProperties struct { - // The group id from the provider of resource the shared private link resource is for. - GroupID *string - - // The resource id of the resource the shared private link resource is for. - PrivateLink *ResourceReference - - // The location of the shared private link resource - PrivateLinkLocation *string - - // The request message for requesting approval of the shared private link resource. - RequestMessage *string - - // Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. - Status *SharedPrivateLinkResourceStatus -} - -// SocketAddrMatchConditionParameters - Defines the parameters for SocketAddress match conditions -type SocketAddrMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *SocketAddrOperator - - // REQUIRED - TypeName *SocketAddrMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// SsoURI - The URI required to login to the supplemental portal from the Azure portal. -type SsoURI struct { - // READ-ONLY; The URI used to login to the supplemental portal. - SsoURIValue *string -} - -// SupportedOptimizationTypesListResult - The result of the GetSupportedOptimizationTypes API -type SupportedOptimizationTypesListResult struct { - // READ-ONLY; Supported optimization types for a profile. - SupportedOptimizationTypes []*OptimizationType -} - -// SystemData - Read only system data -type SystemData struct { - // The timestamp of resource creation (UTC) - CreatedAt *time.Time - - // An identifier for the identity that created the resource - CreatedBy *string - - // The type of identity that created the resource - CreatedByType *IdentityType - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time - - // An identifier for the identity that last modified the resource - LastModifiedBy *string - - // The type of identity that last modified the resource - LastModifiedByType *IdentityType -} - -// TrackedResource - The resource model definition for a ARM tracked top level resource. -type TrackedResource struct { - // REQUIRED; Resource location. - Location *string - - // Resource tags. - Tags map[string]*string - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// URLFileExtensionMatchConditionParameters - Defines the parameters for UrlFileExtension match conditions -type URLFileExtensionMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *URLFileExtensionOperator - - // REQUIRED - TypeName *URLFileExtensionMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// URLFileNameMatchConditionParameters - Defines the parameters for UrlFilename match conditions -type URLFileNameMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *URLFileNameOperator - - // REQUIRED - TypeName *URLFileNameMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// URLPathMatchConditionParameters - Defines the parameters for UrlPath match conditions -type URLPathMatchConditionParameters struct { - // REQUIRED; Describes operator to be matched - Operator *URLPathOperator - - // REQUIRED - TypeName *URLPathMatchConditionParametersTypeName - - // The match value for the condition of the delivery rule - MatchValues []*string - - // Describes if this is negate condition or not - NegateCondition *bool - - // List of transforms - Transforms []*Transform -} - -// URLRedirectAction - Defines the url redirect action for the delivery rule. -type URLRedirectAction struct { - // REQUIRED; The name of the action for the delivery rule. - Name *DeliveryRuleAction - - // REQUIRED; Defines the parameters for the action. - Parameters *URLRedirectActionParameters -} - -// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type URLRedirectAction. -func (u *URLRedirectAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { - return &DeliveryRuleActionAutoGenerated{ - Name: u.Name, - } -} - -// URLRedirectActionParameters - Defines the parameters for the url redirect action. -type URLRedirectActionParameters struct { - // REQUIRED; The redirect type the rule will use when redirecting traffic. - RedirectType *RedirectType - - // REQUIRED - TypeName *URLRedirectActionParametersTypeName - - // Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. - CustomFragment *string - - // Host to redirect. Leave empty to use the incoming host as the destination host. - CustomHostname *string - - // The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination - // path. - CustomPath *string - - // The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; - // leave empty to preserve the incoming query string. Query string must be in = - // format. ? and & will be added automatically so do not include them. - CustomQueryString *string - - // Protocol to use for the redirect. The default value is MatchRequest - DestinationProtocol *DestinationProtocol -} - -// URLRewriteAction - Defines the url rewrite action for the delivery rule. -type URLRewriteAction struct { - // REQUIRED; The name of the action for the delivery rule. - Name *DeliveryRuleAction - - // REQUIRED; Defines the parameters for the action. - Parameters *URLRewriteActionParameters -} - -// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type URLRewriteAction. -func (u *URLRewriteAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { - return &DeliveryRuleActionAutoGenerated{ - Name: u.Name, - } -} - -// URLRewriteActionParameters - Defines the parameters for the url rewrite action. -type URLRewriteActionParameters struct { - // REQUIRED; Define the relative URL to which the above requests will be rewritten by. - Destination *string - - // REQUIRED; define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all - // strings are matched. - SourcePattern *string - - // REQUIRED - TypeName *URLRewriteActionParametersTypeName - - // Whether to preserve unmatched path. Default value is true. - PreserveUnmatchedPath *bool -} - -// URLSigningAction - Defines the url signing action for the delivery rule. -type URLSigningAction struct { - // REQUIRED; The name of the action for the delivery rule. - Name *DeliveryRuleAction - - // REQUIRED; Defines the parameters for the action. - Parameters *URLSigningActionParameters -} - -// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type URLSigningAction. -func (u *URLSigningAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { - return &DeliveryRuleActionAutoGenerated{ - Name: u.Name, - } -} - -// URLSigningActionParameters - Defines the parameters for the Url Signing action. -type URLSigningActionParameters struct { - // REQUIRED - TypeName *URLSigningActionParametersTypeName - - // Algorithm to use for URL signing - Algorithm *Algorithm - - // Defines which query string parameters in the url to be considered for expires, key id etc. - ParameterNameOverride []*URLSigningParamIdentifier -} - -// URLSigningKey - Url signing key -type URLSigningKey struct { - // REQUIRED; Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form - // the hash. - KeyID *string - - // REQUIRED; Defines the parameters for using customer key vault for Url Signing Key. - KeySourceParameters *KeyVaultSigningKeyParameters -} - -// URLSigningKeyParameters - Url signing key parameters -type URLSigningKeyParameters struct { - // REQUIRED; Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form - // the hash. - KeyID *string - - // REQUIRED; Resource reference to the Azure Key Vault secret. Expected to be in format of - // /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ - SecretSource *ResourceReference - - // REQUIRED; The type of the secret resource. - Type *SecretType - - // Version of the secret to be used - SecretVersion *string -} - -// GetSecretParameters implements the SecretParametersClassification interface for type URLSigningKeyParameters. -func (u *URLSigningKeyParameters) GetSecretParameters() *SecretParameters { - return &SecretParameters{ - Type: u.Type, - } -} - -// URLSigningParamIdentifier - Defines how to identify a parameter for a specific purpose e.g. expires -type URLSigningParamIdentifier struct { - // REQUIRED; Indicates the purpose of the parameter - ParamIndicator *ParamIndicator - - // REQUIRED; Parameter name - ParamName *string -} - -// Usage - Describes resource usage. -type Usage struct { - // REQUIRED; The current value of the usage. - CurrentValue *int64 - - // REQUIRED; The limit of usage. - Limit *int64 - - // REQUIRED; The name of the type of usage. - Name *UsageName - - // REQUIRED; An enum describing the unit of measurement. - Unit *UsageUnit - - // READ-ONLY; Resource identifier. - ID *string -} - -// UsageName - The usage names. -type UsageName struct { - // A localized string describing the resource name. - LocalizedValue *string - - // A string describing the resource name. - Value *string -} - -// UsagesListResult - The list usages operation response. -type UsagesListResult struct { - // URL to get the next set of results. - NextLink *string - - // The list of resource usages. - Value []*Usage -} - -// UserManagedHTTPSParameters - Defines the certificate source parameters using user's keyvault certificate for enabling SSL. -type UserManagedHTTPSParameters struct { - // REQUIRED; Defines the source of the SSL certificate. - CertificateSource *CertificateSource - - // REQUIRED; Defines the certificate source parameters using user's keyvault certificate for enabling SSL. - CertificateSourceParameters *KeyVaultCertificateSourceParameters - - // REQUIRED; Defines the TLS extension protocol that is used for secure delivery. - ProtocolType *ProtocolType - - // TLS protocol version that will be used for Https - MinimumTLSVersion *MinimumTLSVersion -} - -// GetCustomDomainHTTPSParameters implements the CustomDomainHTTPSParametersClassification interface for type UserManagedHTTPSParameters. -func (u *UserManagedHTTPSParameters) GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters { - return &CustomDomainHTTPSParameters{ - CertificateSource: u.CertificateSource, - ProtocolType: u.ProtocolType, - MinimumTLSVersion: u.MinimumTLSVersion, - } -} - -// ValidateClientSecretOptions contains the optional parameters for the ValidateClient.Secret method. -type ValidateClientSecretOptions struct { - // placeholder for future optional parameters -} - -// ValidateCustomDomainInput - Input of the custom domain to be validated for DNS mapping. -type ValidateCustomDomainInput struct { - // REQUIRED; The host name of the custom domain. Must be a domain name. - HostName *string -} - -// ValidateCustomDomainOutput - Output of custom domain validation. -type ValidateCustomDomainOutput struct { - // READ-ONLY; Indicates whether the custom domain is valid or not. - CustomDomainValidated *bool - - // READ-ONLY; Error message describing why the custom domain is not valid. - Message *string - - // READ-ONLY; The reason why the custom domain is not valid. - Reason *string -} - -// ValidateProbeInput - Input of the validate probe API. -type ValidateProbeInput struct { - // REQUIRED; The probe URL to validate. - ProbeURL *string -} - -// ValidateProbeOutput - Output of the validate probe API. -type ValidateProbeOutput struct { - // READ-ONLY; Specifies the error code when the probe url is not accepted. - ErrorCode *string - - // READ-ONLY; Indicates whether the probe URL is accepted or not. - IsValid *bool - - // READ-ONLY; The detailed error message describing why the probe URL is not accepted. - Message *string -} - -// ValidateSecretInput - Input of the secret to be validated. -type ValidateSecretInput struct { - // REQUIRED; Resource reference to the Azure Key Vault secret. Expected to be in format of - // /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ - SecretSource *ResourceReference - - // REQUIRED; The secret type. - SecretType *SecretType - - // Secret version, if customer is using a specific version. - SecretVersion *string -} - -// ValidateSecretOutput - Output of the validated secret. -type ValidateSecretOutput struct { - // Detailed error message - Message *string - - // The validation status. - Status *Status -} - -// ValidationToken - The validation token. -type ValidationToken struct { - // READ-ONLY - Token *string -} - -// WafMetricsResponse - Waf Metrics Response -type WafMetricsResponse struct { - DateTimeBegin *time.Time - DateTimeEnd *time.Time - Granularity *WafMetricsResponseGranularity - Series []*WafMetricsResponseSeriesItem -} - -type WafMetricsResponseSeriesItem struct { - Data []*Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems - Groups []*WafMetricsResponseSeriesPropertiesItemsItem - Metric *string - Unit *WafMetricsResponseSeriesItemUnit -} - -type WafMetricsResponseSeriesPropertiesItemsItem struct { - Name *string - Value *string -} - -// WafRankingsResponse - Waf Rankings Response -type WafRankingsResponse struct { - Data []*WafRankingsResponseDataItem - DateTimeBegin *time.Time - DateTimeEnd *time.Time - Groups []*string -} - -type WafRankingsResponseDataItem struct { - GroupValues []*string - Metrics []*ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems -} - -// WebApplicationFirewallPolicy - Defines web application firewall policy for Azure CDN. -type WebApplicationFirewallPolicy struct { - // REQUIRED; Resource location. - Location *string - - // REQUIRED; The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. - SKU *SKU - - // Gets a unique read-only string that changes whenever the resource is updated. - Etag *string - - // Properties of the web application firewall policy. - Properties *WebApplicationFirewallPolicyProperties - - // Resource tags. - Tags map[string]*string - - // READ-ONLY; Resource ID. - ID *string - - // READ-ONLY; Resource name. - Name *string - - // READ-ONLY; Read only system data - SystemData *SystemData - - // READ-ONLY; Resource type. - Type *string -} - -// WebApplicationFirewallPolicyList - Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of -// WebApplicationFirewallPolicy objects and a URL link to get the next set of results. -type WebApplicationFirewallPolicyList struct { - // URL to get the next set of WebApplicationFirewallPolicy objects if there are any. - NextLink *string - - // READ-ONLY; List of Azure CDN WebApplicationFirewallPolicies within a resource group. - Value []*WebApplicationFirewallPolicy -} - -// WebApplicationFirewallPolicyPatchParameters - Properties required to update a CdnWebApplicationFirewallPolicy. -type WebApplicationFirewallPolicyPatchParameters struct { - // CdnWebApplicationFirewallPolicy tags - Tags map[string]*string -} - -// WebApplicationFirewallPolicyProperties - Defines CDN web application firewall policy properties. -type WebApplicationFirewallPolicyProperties struct { - // Describes custom rules inside the policy. - CustomRules *CustomRuleList - - // Describes managed rules inside the policy. - ManagedRules *ManagedRuleSetList - - // Describes policySettings for policy - PolicySettings *PolicySettings - - // Describes rate limit rules inside the policy. - RateLimitRules *RateLimitRuleList - - // READ-ONLY; Describes Azure CDN endpoints associated with this Web Application Firewall policy. - EndpointLinks []*LinkedEndpoint - - // READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy. - ProvisioningState *ProvisioningState - - // READ-ONLY; Resource status of the policy. - ResourceState *PolicyResourceState -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/models_serde.go deleted file mode 100644 index d7e5cd48..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/models_serde.go +++ /dev/null @@ -1,9431 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type AFDDomain. -func (a AFDDomain) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomain. -func (a *AFDDomain) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDDomainHTTPSParameters. -func (a AFDDomainHTTPSParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "certificateType", a.CertificateType) - populate(objectMap, "minimumTlsVersion", a.MinimumTLSVersion) - populate(objectMap, "secret", a.Secret) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainHTTPSParameters. -func (a *AFDDomainHTTPSParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificateType": - err = unpopulate(val, "CertificateType", &a.CertificateType) - delete(rawMsg, key) - case "minimumTlsVersion": - err = unpopulate(val, "MinimumTLSVersion", &a.MinimumTLSVersion) - delete(rawMsg, key) - case "secret": - err = unpopulate(val, "Secret", &a.Secret) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDDomainListResult. -func (a AFDDomainListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainListResult. -func (a *AFDDomainListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDDomainProperties. -func (a AFDDomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "azureDnsZone", a.AzureDNSZone) - populate(objectMap, "deploymentStatus", a.DeploymentStatus) - populate(objectMap, "domainValidationState", a.DomainValidationState) - populate(objectMap, "hostName", a.HostName) - populate(objectMap, "preValidatedCustomDomainResourceId", a.PreValidatedCustomDomainResourceID) - populate(objectMap, "profileName", a.ProfileName) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "tlsSettings", a.TLSSettings) - populate(objectMap, "validationProperties", a.ValidationProperties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainProperties. -func (a *AFDDomainProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureDnsZone": - err = unpopulate(val, "AzureDNSZone", &a.AzureDNSZone) - delete(rawMsg, key) - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &a.DeploymentStatus) - delete(rawMsg, key) - case "domainValidationState": - err = unpopulate(val, "DomainValidationState", &a.DomainValidationState) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &a.HostName) - delete(rawMsg, key) - case "preValidatedCustomDomainResourceId": - err = unpopulate(val, "PreValidatedCustomDomainResourceID", &a.PreValidatedCustomDomainResourceID) - delete(rawMsg, key) - case "profileName": - err = unpopulate(val, "ProfileName", &a.ProfileName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "tlsSettings": - err = unpopulate(val, "TLSSettings", &a.TLSSettings) - delete(rawMsg, key) - case "validationProperties": - err = unpopulate(val, "ValidationProperties", &a.ValidationProperties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDDomainUpdateParameters. -func (a AFDDomainUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainUpdateParameters. -func (a *AFDDomainUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDDomainUpdatePropertiesParameters. -func (a AFDDomainUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "azureDnsZone", a.AzureDNSZone) - populate(objectMap, "preValidatedCustomDomainResourceId", a.PreValidatedCustomDomainResourceID) - populate(objectMap, "profileName", a.ProfileName) - populate(objectMap, "tlsSettings", a.TLSSettings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainUpdatePropertiesParameters. -func (a *AFDDomainUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureDnsZone": - err = unpopulate(val, "AzureDNSZone", &a.AzureDNSZone) - delete(rawMsg, key) - case "preValidatedCustomDomainResourceId": - err = unpopulate(val, "PreValidatedCustomDomainResourceID", &a.PreValidatedCustomDomainResourceID) - delete(rawMsg, key) - case "profileName": - err = unpopulate(val, "ProfileName", &a.ProfileName) - delete(rawMsg, key) - case "tlsSettings": - err = unpopulate(val, "TLSSettings", &a.TLSSettings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDEndpoint. -func (a AFDEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpoint. -func (a *AFDEndpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDEndpointListResult. -func (a AFDEndpointListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointListResult. -func (a *AFDEndpointListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDEndpointProperties. -func (a AFDEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "autoGeneratedDomainNameLabelScope", a.AutoGeneratedDomainNameLabelScope) - populate(objectMap, "deploymentStatus", a.DeploymentStatus) - populate(objectMap, "enabledState", a.EnabledState) - populate(objectMap, "hostName", a.HostName) - populate(objectMap, "profileName", a.ProfileName) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointProperties. -func (a *AFDEndpointProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "autoGeneratedDomainNameLabelScope": - err = unpopulate(val, "AutoGeneratedDomainNameLabelScope", &a.AutoGeneratedDomainNameLabelScope) - delete(rawMsg, key) - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &a.DeploymentStatus) - delete(rawMsg, key) - case "enabledState": - err = unpopulate(val, "EnabledState", &a.EnabledState) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &a.HostName) - delete(rawMsg, key) - case "profileName": - err = unpopulate(val, "ProfileName", &a.ProfileName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDEndpointPropertiesUpdateParameters. -func (a AFDEndpointPropertiesUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabledState", a.EnabledState) - populate(objectMap, "profileName", a.ProfileName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointPropertiesUpdateParameters. -func (a *AFDEndpointPropertiesUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabledState": - err = unpopulate(val, "EnabledState", &a.EnabledState) - delete(rawMsg, key) - case "profileName": - err = unpopulate(val, "ProfileName", &a.ProfileName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDEndpointUpdateParameters. -func (a AFDEndpointUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointUpdateParameters. -func (a *AFDEndpointUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDOrigin. -func (a AFDOrigin) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOrigin. -func (a *AFDOrigin) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDOriginGroup. -func (a AFDOriginGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroup. -func (a *AFDOriginGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupListResult. -func (a AFDOriginGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupListResult. -func (a *AFDOriginGroupListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupProperties. -func (a AFDOriginGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "deploymentStatus", a.DeploymentStatus) - populate(objectMap, "healthProbeSettings", a.HealthProbeSettings) - populate(objectMap, "loadBalancingSettings", a.LoadBalancingSettings) - populate(objectMap, "profileName", a.ProfileName) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "sessionAffinityState", a.SessionAffinityState) - populate(objectMap, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", a.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupProperties. -func (a *AFDOriginGroupProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &a.DeploymentStatus) - delete(rawMsg, key) - case "healthProbeSettings": - err = unpopulate(val, "HealthProbeSettings", &a.HealthProbeSettings) - delete(rawMsg, key) - case "loadBalancingSettings": - err = unpopulate(val, "LoadBalancingSettings", &a.LoadBalancingSettings) - delete(rawMsg, key) - case "profileName": - err = unpopulate(val, "ProfileName", &a.ProfileName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "sessionAffinityState": - err = unpopulate(val, "SessionAffinityState", &a.SessionAffinityState) - delete(rawMsg, key) - case "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": - err = unpopulate(val, "TrafficRestorationTimeToHealedOrNewEndpointsInMinutes", &a.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupUpdateParameters. -func (a AFDOriginGroupUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupUpdateParameters. -func (a *AFDOriginGroupUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupUpdatePropertiesParameters. -func (a AFDOriginGroupUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "healthProbeSettings", a.HealthProbeSettings) - populate(objectMap, "loadBalancingSettings", a.LoadBalancingSettings) - populate(objectMap, "profileName", a.ProfileName) - populate(objectMap, "sessionAffinityState", a.SessionAffinityState) - populate(objectMap, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", a.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupUpdatePropertiesParameters. -func (a *AFDOriginGroupUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "healthProbeSettings": - err = unpopulate(val, "HealthProbeSettings", &a.HealthProbeSettings) - delete(rawMsg, key) - case "loadBalancingSettings": - err = unpopulate(val, "LoadBalancingSettings", &a.LoadBalancingSettings) - delete(rawMsg, key) - case "profileName": - err = unpopulate(val, "ProfileName", &a.ProfileName) - delete(rawMsg, key) - case "sessionAffinityState": - err = unpopulate(val, "SessionAffinityState", &a.SessionAffinityState) - delete(rawMsg, key) - case "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": - err = unpopulate(val, "TrafficRestorationTimeToHealedOrNewEndpointsInMinutes", &a.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDOriginListResult. -func (a AFDOriginListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginListResult. -func (a *AFDOriginListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDOriginProperties. -func (a AFDOriginProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "azureOrigin", a.AzureOrigin) - populate(objectMap, "deploymentStatus", a.DeploymentStatus) - populate(objectMap, "enabledState", a.EnabledState) - populate(objectMap, "enforceCertificateNameCheck", a.EnforceCertificateNameCheck) - populate(objectMap, "httpPort", a.HTTPPort) - populate(objectMap, "httpsPort", a.HTTPSPort) - populate(objectMap, "hostName", a.HostName) - populate(objectMap, "originGroupName", a.OriginGroupName) - populate(objectMap, "originHostHeader", a.OriginHostHeader) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "sharedPrivateLinkResource", a.SharedPrivateLinkResource) - populate(objectMap, "weight", a.Weight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginProperties. -func (a *AFDOriginProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureOrigin": - err = unpopulate(val, "AzureOrigin", &a.AzureOrigin) - delete(rawMsg, key) - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &a.DeploymentStatus) - delete(rawMsg, key) - case "enabledState": - err = unpopulate(val, "EnabledState", &a.EnabledState) - delete(rawMsg, key) - case "enforceCertificateNameCheck": - err = unpopulate(val, "EnforceCertificateNameCheck", &a.EnforceCertificateNameCheck) - delete(rawMsg, key) - case "httpPort": - err = unpopulate(val, "HTTPPort", &a.HTTPPort) - delete(rawMsg, key) - case "httpsPort": - err = unpopulate(val, "HTTPSPort", &a.HTTPSPort) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &a.HostName) - delete(rawMsg, key) - case "originGroupName": - err = unpopulate(val, "OriginGroupName", &a.OriginGroupName) - delete(rawMsg, key) - case "originHostHeader": - err = unpopulate(val, "OriginHostHeader", &a.OriginHostHeader) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &a.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "sharedPrivateLinkResource": - err = unpopulate(val, "SharedPrivateLinkResource", &a.SharedPrivateLinkResource) - delete(rawMsg, key) - case "weight": - err = unpopulate(val, "Weight", &a.Weight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDOriginUpdateParameters. -func (a AFDOriginUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginUpdateParameters. -func (a *AFDOriginUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDOriginUpdatePropertiesParameters. -func (a AFDOriginUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "azureOrigin", a.AzureOrigin) - populate(objectMap, "enabledState", a.EnabledState) - populate(objectMap, "enforceCertificateNameCheck", a.EnforceCertificateNameCheck) - populate(objectMap, "httpPort", a.HTTPPort) - populate(objectMap, "httpsPort", a.HTTPSPort) - populate(objectMap, "hostName", a.HostName) - populate(objectMap, "originGroupName", a.OriginGroupName) - populate(objectMap, "originHostHeader", a.OriginHostHeader) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "sharedPrivateLinkResource", a.SharedPrivateLinkResource) - populate(objectMap, "weight", a.Weight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginUpdatePropertiesParameters. -func (a *AFDOriginUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureOrigin": - err = unpopulate(val, "AzureOrigin", &a.AzureOrigin) - delete(rawMsg, key) - case "enabledState": - err = unpopulate(val, "EnabledState", &a.EnabledState) - delete(rawMsg, key) - case "enforceCertificateNameCheck": - err = unpopulate(val, "EnforceCertificateNameCheck", &a.EnforceCertificateNameCheck) - delete(rawMsg, key) - case "httpPort": - err = unpopulate(val, "HTTPPort", &a.HTTPPort) - delete(rawMsg, key) - case "httpsPort": - err = unpopulate(val, "HTTPSPort", &a.HTTPSPort) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &a.HostName) - delete(rawMsg, key) - case "originGroupName": - err = unpopulate(val, "OriginGroupName", &a.OriginGroupName) - delete(rawMsg, key) - case "originHostHeader": - err = unpopulate(val, "OriginHostHeader", &a.OriginHostHeader) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &a.Priority) - delete(rawMsg, key) - case "sharedPrivateLinkResource": - err = unpopulate(val, "SharedPrivateLinkResource", &a.SharedPrivateLinkResource) - delete(rawMsg, key) - case "weight": - err = unpopulate(val, "Weight", &a.Weight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AFDStateProperties. -func (a AFDStateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "deploymentStatus", a.DeploymentStatus) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AFDStateProperties. -func (a *AFDStateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &a.DeploymentStatus) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ActivatedResourceReference. -func (a ActivatedResourceReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "isActive", a.IsActive) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ActivatedResourceReference. -func (a *ActivatedResourceReference) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "isActive": - err = unpopulate(val, "IsActive", &a.IsActive) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AfdErrorResponse. -func (a AfdErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", a.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AfdErrorResponse. -func (a *AfdErrorResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &a.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AfdPurgeParameters. -func (a AfdPurgeParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "contentPaths", a.ContentPaths) - populate(objectMap, "domains", a.Domains) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AfdPurgeParameters. -func (a *AfdPurgeParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "contentPaths": - err = unpopulate(val, "ContentPaths", &a.ContentPaths) - delete(rawMsg, key) - case "domains": - err = unpopulate(val, "Domains", &a.Domains) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AfdRouteCacheConfiguration. -func (a AfdRouteCacheConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "compressionSettings", a.CompressionSettings) - populate(objectMap, "queryParameters", a.QueryParameters) - populate(objectMap, "queryStringCachingBehavior", a.QueryStringCachingBehavior) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AfdRouteCacheConfiguration. -func (a *AfdRouteCacheConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "compressionSettings": - err = unpopulate(val, "CompressionSettings", &a.CompressionSettings) - delete(rawMsg, key) - case "queryParameters": - err = unpopulate(val, "QueryParameters", &a.QueryParameters) - delete(rawMsg, key) - case "queryStringCachingBehavior": - err = unpopulate(val, "QueryStringCachingBehavior", &a.QueryStringCachingBehavior) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirstPartyManagedCertificate. -func (a AzureFirstPartyManagedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "expirationDate", a.ExpirationDate) - populate(objectMap, "subject", a.Subject) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirstPartyManagedCertificate. -func (a *AzureFirstPartyManagedCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &a.ExpirationDate) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &a.Subject) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirstPartyManagedCertificateParameters. -func (a AzureFirstPartyManagedCertificateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["type"] = SecretTypeAzureFirstPartyManagedCertificate - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirstPartyManagedCertificateParameters. -func (a *AzureFirstPartyManagedCertificateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheConfiguration. -func (c CacheConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cacheBehavior", c.CacheBehavior) - populate(objectMap, "cacheDuration", c.CacheDuration) - populate(objectMap, "isCompressionEnabled", c.IsCompressionEnabled) - populate(objectMap, "queryParameters", c.QueryParameters) - populate(objectMap, "queryStringCachingBehavior", c.QueryStringCachingBehavior) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheConfiguration. -func (c *CacheConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cacheBehavior": - err = unpopulate(val, "CacheBehavior", &c.CacheBehavior) - delete(rawMsg, key) - case "cacheDuration": - err = unpopulate(val, "CacheDuration", &c.CacheDuration) - delete(rawMsg, key) - case "isCompressionEnabled": - err = unpopulate(val, "IsCompressionEnabled", &c.IsCompressionEnabled) - delete(rawMsg, key) - case "queryParameters": - err = unpopulate(val, "QueryParameters", &c.QueryParameters) - delete(rawMsg, key) - case "queryStringCachingBehavior": - err = unpopulate(val, "QueryStringCachingBehavior", &c.QueryStringCachingBehavior) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheExpirationActionParameters. -func (c CacheExpirationActionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cacheBehavior", c.CacheBehavior) - populate(objectMap, "cacheDuration", c.CacheDuration) - populate(objectMap, "cacheType", c.CacheType) - populate(objectMap, "typeName", c.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheExpirationActionParameters. -func (c *CacheExpirationActionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cacheBehavior": - err = unpopulate(val, "CacheBehavior", &c.CacheBehavior) - delete(rawMsg, key) - case "cacheDuration": - err = unpopulate(val, "CacheDuration", &c.CacheDuration) - delete(rawMsg, key) - case "cacheType": - err = unpopulate(val, "CacheType", &c.CacheType) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &c.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CacheKeyQueryStringActionParameters. -func (c CacheKeyQueryStringActionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "queryParameters", c.QueryParameters) - populate(objectMap, "queryStringBehavior", c.QueryStringBehavior) - populate(objectMap, "typeName", c.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheKeyQueryStringActionParameters. -func (c *CacheKeyQueryStringActionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "queryParameters": - err = unpopulate(val, "QueryParameters", &c.QueryParameters) - delete(rawMsg, key) - case "queryStringBehavior": - err = unpopulate(val, "QueryStringBehavior", &c.QueryStringBehavior) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &c.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Certificate. -func (c Certificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "expirationDate", c.ExpirationDate) - populate(objectMap, "subject", c.Subject) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Certificate. -func (c *Certificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &c.Subject) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateSourceParameters. -func (c CertificateSourceParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "certificateType", c.CertificateType) - populate(objectMap, "typeName", c.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateSourceParameters. -func (c *CertificateSourceParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificateType": - err = unpopulate(val, "CertificateType", &c.CertificateType) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &c.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CheckEndpointNameAvailabilityInput. -func (c CheckEndpointNameAvailabilityInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "autoGeneratedDomainNameLabelScope", c.AutoGeneratedDomainNameLabelScope) - populate(objectMap, "name", c.Name) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckEndpointNameAvailabilityInput. -func (c *CheckEndpointNameAvailabilityInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "autoGeneratedDomainNameLabelScope": - err = unpopulate(val, "AutoGeneratedDomainNameLabelScope", &c.AutoGeneratedDomainNameLabelScope) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CheckEndpointNameAvailabilityOutput. -func (c CheckEndpointNameAvailabilityOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "availableHostname", c.AvailableHostname) - populate(objectMap, "message", c.Message) - populate(objectMap, "nameAvailable", c.NameAvailable) - populate(objectMap, "reason", c.Reason) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckEndpointNameAvailabilityOutput. -func (c *CheckEndpointNameAvailabilityOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "availableHostname": - err = unpopulate(val, "AvailableHostname", &c.AvailableHostname) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "nameAvailable": - err = unpopulate(val, "NameAvailable", &c.NameAvailable) - delete(rawMsg, key) - case "reason": - err = unpopulate(val, "Reason", &c.Reason) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CheckHostNameAvailabilityInput. -func (c CheckHostNameAvailabilityInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "hostName", c.HostName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckHostNameAvailabilityInput. -func (c *CheckHostNameAvailabilityInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "hostName": - err = unpopulate(val, "HostName", &c.HostName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityInput. -func (c CheckNameAvailabilityInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityInput. -func (c *CheckNameAvailabilityInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityOutput. -func (c CheckNameAvailabilityOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "message", c.Message) - populate(objectMap, "nameAvailable", c.NameAvailable) - populate(objectMap, "reason", c.Reason) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityOutput. -func (c *CheckNameAvailabilityOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "nameAvailable": - err = unpopulate(val, "NameAvailable", &c.NameAvailable) - delete(rawMsg, key) - case "reason": - err = unpopulate(val, "Reason", &c.Reason) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CidrIPAddress. -func (c CidrIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "baseIpAddress", c.BaseIPAddress) - populate(objectMap, "prefixLength", c.PrefixLength) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CidrIPAddress. -func (c *CidrIPAddress) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "baseIpAddress": - err = unpopulate(val, "BaseIPAddress", &c.BaseIPAddress) - delete(rawMsg, key) - case "prefixLength": - err = unpopulate(val, "PrefixLength", &c.PrefixLength) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClientPortMatchConditionParameters. -func (c ClientPortMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", c.MatchValues) - populate(objectMap, "negateCondition", c.NegateCondition) - populate(objectMap, "operator", c.Operator) - populate(objectMap, "transforms", c.Transforms) - populate(objectMap, "typeName", c.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientPortMatchConditionParameters. -func (c *ClientPortMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &c.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &c.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &c.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &c.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &c.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems. -func (c Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "dateTime", c.DateTime) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems. -func (c *Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dateTime": - err = unpopulateTimeRFC3339(val, "DateTime", &c.DateTime) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems. -func (c Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "dateTime", c.DateTime) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems. -func (c *Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dateTime": - err = unpopulateTimeRFC3339(val, "DateTime", &c.DateTime) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems. -func (c ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "metric", c.Metric) - populate(objectMap, "percentage", c.Percentage) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems. -func (c *ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "metric": - err = unpopulate(val, "Metric", &c.Metric) - delete(rawMsg, key) - case "percentage": - err = unpopulate(val, "Percentage", &c.Percentage) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CompressionSettings. -func (c CompressionSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "contentTypesToCompress", c.ContentTypesToCompress) - populate(objectMap, "isCompressionEnabled", c.IsCompressionEnabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CompressionSettings. -func (c *CompressionSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "contentTypesToCompress": - err = unpopulate(val, "ContentTypesToCompress", &c.ContentTypesToCompress) - delete(rawMsg, key) - case "isCompressionEnabled": - err = unpopulate(val, "IsCompressionEnabled", &c.IsCompressionEnabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContinentsResponse. -func (c ContinentsResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "continents", c.Continents) - populate(objectMap, "countryOrRegions", c.CountryOrRegions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContinentsResponse. -func (c *ContinentsResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "continents": - err = unpopulate(val, "Continents", &c.Continents) - delete(rawMsg, key) - case "countryOrRegions": - err = unpopulate(val, "CountryOrRegions", &c.CountryOrRegions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContinentsResponseContinentsItem. -func (c ContinentsResponseContinentsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContinentsResponseContinentsItem. -func (c *ContinentsResponseContinentsItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContinentsResponseCountryOrRegionsItem. -func (c ContinentsResponseCountryOrRegionsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "continentId", c.ContinentID) - populate(objectMap, "id", c.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContinentsResponseCountryOrRegionsItem. -func (c *ContinentsResponseCountryOrRegionsItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "continentId": - err = unpopulate(val, "ContinentID", &c.ContinentID) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CookiesMatchConditionParameters. -func (c CookiesMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", c.MatchValues) - populate(objectMap, "negateCondition", c.NegateCondition) - populate(objectMap, "operator", c.Operator) - populate(objectMap, "selector", c.Selector) - populate(objectMap, "transforms", c.Transforms) - populate(objectMap, "typeName", c.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CookiesMatchConditionParameters. -func (c *CookiesMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &c.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &c.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &c.Operator) - delete(rawMsg, key) - case "selector": - err = unpopulate(val, "Selector", &c.Selector) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &c.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &c.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomDomain. -func (c CustomDomain) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomain. -func (c *CustomDomain) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomDomainHTTPSParameters. -func (c CustomDomainHTTPSParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["certificateSource"] = c.CertificateSource - populate(objectMap, "minimumTlsVersion", c.MinimumTLSVersion) - populate(objectMap, "protocolType", c.ProtocolType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainHTTPSParameters. -func (c *CustomDomainHTTPSParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificateSource": - err = unpopulate(val, "CertificateSource", &c.CertificateSource) - delete(rawMsg, key) - case "minimumTlsVersion": - err = unpopulate(val, "MinimumTLSVersion", &c.MinimumTLSVersion) - delete(rawMsg, key) - case "protocolType": - err = unpopulate(val, "ProtocolType", &c.ProtocolType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomDomainListResult. -func (c CustomDomainListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainListResult. -func (c *CustomDomainListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomDomainParameters. -func (c CustomDomainParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainParameters. -func (c *CustomDomainParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomDomainProperties. -func (c CustomDomainProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "customHttpsParameters", c.CustomHTTPSParameters) - populate(objectMap, "customHttpsProvisioningState", c.CustomHTTPSProvisioningState) - populate(objectMap, "customHttpsProvisioningSubstate", c.CustomHTTPSProvisioningSubstate) - populate(objectMap, "hostName", c.HostName) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "resourceState", c.ResourceState) - populate(objectMap, "validationData", c.ValidationData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainProperties. -func (c *CustomDomainProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customHttpsParameters": - c.CustomHTTPSParameters, err = unmarshalCustomDomainHTTPSParametersClassification(val) - delete(rawMsg, key) - case "customHttpsProvisioningState": - err = unpopulate(val, "CustomHTTPSProvisioningState", &c.CustomHTTPSProvisioningState) - delete(rawMsg, key) - case "customHttpsProvisioningSubstate": - err = unpopulate(val, "CustomHTTPSProvisioningSubstate", &c.CustomHTTPSProvisioningSubstate) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &c.HostName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "resourceState": - err = unpopulate(val, "ResourceState", &c.ResourceState) - delete(rawMsg, key) - case "validationData": - err = unpopulate(val, "ValidationData", &c.ValidationData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomDomainPropertiesParameters. -func (c CustomDomainPropertiesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "hostName", c.HostName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainPropertiesParameters. -func (c *CustomDomainPropertiesParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "hostName": - err = unpopulate(val, "HostName", &c.HostName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomRule. -func (c CustomRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "action", c.Action) - populate(objectMap, "enabledState", c.EnabledState) - populate(objectMap, "matchConditions", c.MatchConditions) - populate(objectMap, "name", c.Name) - populate(objectMap, "priority", c.Priority) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRule. -func (c *CustomRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &c.Action) - delete(rawMsg, key) - case "enabledState": - err = unpopulate(val, "EnabledState", &c.EnabledState) - delete(rawMsg, key) - case "matchConditions": - err = unpopulate(val, "MatchConditions", &c.MatchConditions) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &c.Priority) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomRuleList. -func (c CustomRuleList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "rules", c.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRuleList. -func (c *CustomRuleList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "rules": - err = unpopulate(val, "Rules", &c.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomerCertificate. -func (c CustomerCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "certificateAuthority", c.CertificateAuthority) - populate(objectMap, "expirationDate", c.ExpirationDate) - populate(objectMap, "secretSource", c.SecretSource) - populate(objectMap, "secretVersion", c.SecretVersion) - populate(objectMap, "subject", c.Subject) - populate(objectMap, "subjectAlternativeNames", c.SubjectAlternativeNames) - populate(objectMap, "thumbprint", c.Thumbprint) - populate(objectMap, "type", c.Type) - populate(objectMap, "useLatestVersion", c.UseLatestVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomerCertificate. -func (c *CustomerCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificateAuthority": - err = unpopulate(val, "CertificateAuthority", &c.CertificateAuthority) - delete(rawMsg, key) - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) - delete(rawMsg, key) - case "secretSource": - err = unpopulate(val, "SecretSource", &c.SecretSource) - delete(rawMsg, key) - case "secretVersion": - err = unpopulate(val, "SecretVersion", &c.SecretVersion) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &c.Subject) - delete(rawMsg, key) - case "subjectAlternativeNames": - err = unpopulate(val, "SubjectAlternativeNames", &c.SubjectAlternativeNames) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - case "useLatestVersion": - err = unpopulate(val, "UseLatestVersion", &c.UseLatestVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomerCertificateParameters. -func (c CustomerCertificateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "certificateAuthority", c.CertificateAuthority) - populate(objectMap, "expirationDate", c.ExpirationDate) - populate(objectMap, "secretSource", c.SecretSource) - populate(objectMap, "secretVersion", c.SecretVersion) - populate(objectMap, "subject", c.Subject) - populate(objectMap, "subjectAlternativeNames", c.SubjectAlternativeNames) - populate(objectMap, "thumbprint", c.Thumbprint) - objectMap["type"] = SecretTypeCustomerCertificate - populate(objectMap, "useLatestVersion", c.UseLatestVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomerCertificateParameters. -func (c *CustomerCertificateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificateAuthority": - err = unpopulate(val, "CertificateAuthority", &c.CertificateAuthority) - delete(rawMsg, key) - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) - delete(rawMsg, key) - case "secretSource": - err = unpopulate(val, "SecretSource", &c.SecretSource) - delete(rawMsg, key) - case "secretVersion": - err = unpopulate(val, "SecretVersion", &c.SecretVersion) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &c.Subject) - delete(rawMsg, key) - case "subjectAlternativeNames": - err = unpopulate(val, "SubjectAlternativeNames", &c.SubjectAlternativeNames) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - case "useLatestVersion": - err = unpopulate(val, "UseLatestVersion", &c.UseLatestVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeepCreatedOrigin. -func (d DeepCreatedOrigin) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOrigin. -func (d *DeepCreatedOrigin) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeepCreatedOriginGroup. -func (d DeepCreatedOriginGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOriginGroup. -func (d *DeepCreatedOriginGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeepCreatedOriginGroupProperties. -func (d DeepCreatedOriginGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "healthProbeSettings", d.HealthProbeSettings) - populate(objectMap, "origins", d.Origins) - populate(objectMap, "responseBasedOriginErrorDetectionSettings", d.ResponseBasedOriginErrorDetectionSettings) - populate(objectMap, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", d.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOriginGroupProperties. -func (d *DeepCreatedOriginGroupProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "healthProbeSettings": - err = unpopulate(val, "HealthProbeSettings", &d.HealthProbeSettings) - delete(rawMsg, key) - case "origins": - err = unpopulate(val, "Origins", &d.Origins) - delete(rawMsg, key) - case "responseBasedOriginErrorDetectionSettings": - err = unpopulate(val, "ResponseBasedOriginErrorDetectionSettings", &d.ResponseBasedOriginErrorDetectionSettings) - delete(rawMsg, key) - case "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": - err = unpopulate(val, "TrafficRestorationTimeToHealedOrNewEndpointsInMinutes", &d.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeepCreatedOriginProperties. -func (d DeepCreatedOriginProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", d.Enabled) - populate(objectMap, "httpPort", d.HTTPPort) - populate(objectMap, "httpsPort", d.HTTPSPort) - populate(objectMap, "hostName", d.HostName) - populate(objectMap, "originHostHeader", d.OriginHostHeader) - populate(objectMap, "priority", d.Priority) - populate(objectMap, "privateEndpointStatus", d.PrivateEndpointStatus) - populate(objectMap, "privateLinkAlias", d.PrivateLinkAlias) - populate(objectMap, "privateLinkApprovalMessage", d.PrivateLinkApprovalMessage) - populate(objectMap, "privateLinkLocation", d.PrivateLinkLocation) - populate(objectMap, "privateLinkResourceId", d.PrivateLinkResourceID) - populate(objectMap, "weight", d.Weight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOriginProperties. -func (d *DeepCreatedOriginProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &d.Enabled) - delete(rawMsg, key) - case "httpPort": - err = unpopulate(val, "HTTPPort", &d.HTTPPort) - delete(rawMsg, key) - case "httpsPort": - err = unpopulate(val, "HTTPSPort", &d.HTTPSPort) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &d.HostName) - delete(rawMsg, key) - case "originHostHeader": - err = unpopulate(val, "OriginHostHeader", &d.OriginHostHeader) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &d.Priority) - delete(rawMsg, key) - case "privateEndpointStatus": - err = unpopulate(val, "PrivateEndpointStatus", &d.PrivateEndpointStatus) - delete(rawMsg, key) - case "privateLinkAlias": - err = unpopulate(val, "PrivateLinkAlias", &d.PrivateLinkAlias) - delete(rawMsg, key) - case "privateLinkApprovalMessage": - err = unpopulate(val, "PrivateLinkApprovalMessage", &d.PrivateLinkApprovalMessage) - delete(rawMsg, key) - case "privateLinkLocation": - err = unpopulate(val, "PrivateLinkLocation", &d.PrivateLinkLocation) - delete(rawMsg, key) - case "privateLinkResourceId": - err = unpopulate(val, "PrivateLinkResourceID", &d.PrivateLinkResourceID) - delete(rawMsg, key) - case "weight": - err = unpopulate(val, "Weight", &d.Weight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRule. -func (d DeliveryRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "actions", d.Actions) - populate(objectMap, "conditions", d.Conditions) - populate(objectMap, "name", d.Name) - populate(objectMap, "order", d.Order) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRule. -func (d *DeliveryRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actions": - d.Actions, err = unmarshalDeliveryRuleActionAutoGeneratedClassificationArray(val) - delete(rawMsg, key) - case "conditions": - d.Conditions, err = unmarshalDeliveryRuleConditionClassificationArray(val) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "order": - err = unpopulate(val, "Order", &d.Order) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleActionAutoGenerated. -func (d DeliveryRuleActionAutoGenerated) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = d.Name - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleActionAutoGenerated. -func (d *DeliveryRuleActionAutoGenerated) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCacheExpirationAction. -func (d DeliveryRuleCacheExpirationAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = DeliveryRuleActionCacheExpiration - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCacheExpirationAction. -func (d *DeliveryRuleCacheExpirationAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCacheKeyQueryStringAction. -func (d DeliveryRuleCacheKeyQueryStringAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = DeliveryRuleActionCacheKeyQueryString - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCacheKeyQueryStringAction. -func (d *DeliveryRuleCacheKeyQueryStringAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleClientPortCondition. -func (d DeliveryRuleClientPortCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableClientPort - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleClientPortCondition. -func (d *DeliveryRuleClientPortCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCondition. -func (d DeliveryRuleCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = d.Name - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCondition. -func (d *DeliveryRuleCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCookiesCondition. -func (d DeliveryRuleCookiesCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableCookies - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCookiesCondition. -func (d *DeliveryRuleCookiesCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleHTTPVersionCondition. -func (d DeliveryRuleHTTPVersionCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableHTTPVersion - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleHTTPVersionCondition. -func (d *DeliveryRuleHTTPVersionCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleHostNameCondition. -func (d DeliveryRuleHostNameCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableHostName - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleHostNameCondition. -func (d *DeliveryRuleHostNameCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleIsDeviceCondition. -func (d DeliveryRuleIsDeviceCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableIsDevice - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleIsDeviceCondition. -func (d *DeliveryRuleIsDeviceCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRulePostArgsCondition. -func (d DeliveryRulePostArgsCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariablePostArgs - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRulePostArgsCondition. -func (d *DeliveryRulePostArgsCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleQueryStringCondition. -func (d DeliveryRuleQueryStringCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableQueryString - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleQueryStringCondition. -func (d *DeliveryRuleQueryStringCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRemoteAddressCondition. -func (d DeliveryRuleRemoteAddressCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableRemoteAddress - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRemoteAddressCondition. -func (d *DeliveryRuleRemoteAddressCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestBodyCondition. -func (d DeliveryRuleRequestBodyCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableRequestBody - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestBodyCondition. -func (d *DeliveryRuleRequestBodyCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestHeaderAction. -func (d DeliveryRuleRequestHeaderAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = DeliveryRuleActionModifyRequestHeader - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestHeaderAction. -func (d *DeliveryRuleRequestHeaderAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestHeaderCondition. -func (d DeliveryRuleRequestHeaderCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableRequestHeader - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestHeaderCondition. -func (d *DeliveryRuleRequestHeaderCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestMethodCondition. -func (d DeliveryRuleRequestMethodCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableRequestMethod - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestMethodCondition. -func (d *DeliveryRuleRequestMethodCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestSchemeCondition. -func (d DeliveryRuleRequestSchemeCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableRequestScheme - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestSchemeCondition. -func (d *DeliveryRuleRequestSchemeCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestURICondition. -func (d DeliveryRuleRequestURICondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableRequestURI - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestURICondition. -func (d *DeliveryRuleRequestURICondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleResponseHeaderAction. -func (d DeliveryRuleResponseHeaderAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = DeliveryRuleActionModifyResponseHeader - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleResponseHeaderAction. -func (d *DeliveryRuleResponseHeaderAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRouteConfigurationOverrideAction. -func (d DeliveryRuleRouteConfigurationOverrideAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = DeliveryRuleActionRouteConfigurationOverride - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRouteConfigurationOverrideAction. -func (d *DeliveryRuleRouteConfigurationOverrideAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleSSLProtocolCondition. -func (d DeliveryRuleSSLProtocolCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableSSLProtocol - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleSSLProtocolCondition. -func (d *DeliveryRuleSSLProtocolCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleServerPortCondition. -func (d DeliveryRuleServerPortCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableServerPort - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleServerPortCondition. -func (d *DeliveryRuleServerPortCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleSocketAddrCondition. -func (d DeliveryRuleSocketAddrCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableSocketAddr - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleSocketAddrCondition. -func (d *DeliveryRuleSocketAddrCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleURLFileExtensionCondition. -func (d DeliveryRuleURLFileExtensionCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableURLFileExtension - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleURLFileExtensionCondition. -func (d *DeliveryRuleURLFileExtensionCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleURLFileNameCondition. -func (d DeliveryRuleURLFileNameCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableURLFileName - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleURLFileNameCondition. -func (d *DeliveryRuleURLFileNameCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleURLPathCondition. -func (d DeliveryRuleURLPathCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = MatchVariableURLPath - populate(objectMap, "parameters", d.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleURLPathCondition. -func (d *DeliveryRuleURLPathCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &d.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DimensionProperties. -func (d DimensionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "displayName", d.DisplayName) - populate(objectMap, "internalName", d.InternalName) - populate(objectMap, "name", d.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DimensionProperties. -func (d *DimensionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "displayName": - err = unpopulate(val, "DisplayName", &d.DisplayName) - delete(rawMsg, key) - case "internalName": - err = unpopulate(val, "InternalName", &d.InternalName) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DomainValidationProperties. -func (d DomainValidationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "expirationDate", d.ExpirationDate) - populate(objectMap, "validationToken", d.ValidationToken) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DomainValidationProperties. -func (d *DomainValidationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &d.ExpirationDate) - delete(rawMsg, key) - case "validationToken": - err = unpopulate(val, "ValidationToken", &d.ValidationToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EdgeNode. -func (e EdgeNode) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "systemData", e.SystemData) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EdgeNode. -func (e *EdgeNode) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EdgeNodeProperties. -func (e EdgeNodeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "ipAddressGroups", e.IPAddressGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EdgeNodeProperties. -func (e *EdgeNodeProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ipAddressGroups": - err = unpopulate(val, "IPAddressGroups", &e.IPAddressGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EdgenodeResult. -func (e EdgenodeResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EdgenodeResult. -func (e *EdgenodeResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Endpoint. -func (e Endpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "systemData", e.SystemData) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Endpoint. -func (e *Endpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &e.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointListResult. -func (e EndpointListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointListResult. -func (e *EndpointListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointProperties. -func (e EndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "contentTypesToCompress", e.ContentTypesToCompress) - populate(objectMap, "customDomains", e.CustomDomains) - populate(objectMap, "defaultOriginGroup", e.DefaultOriginGroup) - populate(objectMap, "deliveryPolicy", e.DeliveryPolicy) - populate(objectMap, "geoFilters", e.GeoFilters) - populate(objectMap, "hostName", e.HostName) - populate(objectMap, "isCompressionEnabled", e.IsCompressionEnabled) - populate(objectMap, "isHttpAllowed", e.IsHTTPAllowed) - populate(objectMap, "isHttpsAllowed", e.IsHTTPSAllowed) - populate(objectMap, "optimizationType", e.OptimizationType) - populate(objectMap, "originGroups", e.OriginGroups) - populate(objectMap, "originHostHeader", e.OriginHostHeader) - populate(objectMap, "originPath", e.OriginPath) - populate(objectMap, "origins", e.Origins) - populate(objectMap, "probePath", e.ProbePath) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "queryStringCachingBehavior", e.QueryStringCachingBehavior) - populate(objectMap, "resourceState", e.ResourceState) - populate(objectMap, "urlSigningKeys", e.URLSigningKeys) - populate(objectMap, "webApplicationFirewallPolicyLink", e.WebApplicationFirewallPolicyLink) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointProperties. -func (e *EndpointProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "contentTypesToCompress": - err = unpopulate(val, "ContentTypesToCompress", &e.ContentTypesToCompress) - delete(rawMsg, key) - case "customDomains": - err = unpopulate(val, "CustomDomains", &e.CustomDomains) - delete(rawMsg, key) - case "defaultOriginGroup": - err = unpopulate(val, "DefaultOriginGroup", &e.DefaultOriginGroup) - delete(rawMsg, key) - case "deliveryPolicy": - err = unpopulate(val, "DeliveryPolicy", &e.DeliveryPolicy) - delete(rawMsg, key) - case "geoFilters": - err = unpopulate(val, "GeoFilters", &e.GeoFilters) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &e.HostName) - delete(rawMsg, key) - case "isCompressionEnabled": - err = unpopulate(val, "IsCompressionEnabled", &e.IsCompressionEnabled) - delete(rawMsg, key) - case "isHttpAllowed": - err = unpopulate(val, "IsHTTPAllowed", &e.IsHTTPAllowed) - delete(rawMsg, key) - case "isHttpsAllowed": - err = unpopulate(val, "IsHTTPSAllowed", &e.IsHTTPSAllowed) - delete(rawMsg, key) - case "optimizationType": - err = unpopulate(val, "OptimizationType", &e.OptimizationType) - delete(rawMsg, key) - case "originGroups": - err = unpopulate(val, "OriginGroups", &e.OriginGroups) - delete(rawMsg, key) - case "originHostHeader": - err = unpopulate(val, "OriginHostHeader", &e.OriginHostHeader) - delete(rawMsg, key) - case "originPath": - err = unpopulate(val, "OriginPath", &e.OriginPath) - delete(rawMsg, key) - case "origins": - err = unpopulate(val, "Origins", &e.Origins) - delete(rawMsg, key) - case "probePath": - err = unpopulate(val, "ProbePath", &e.ProbePath) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "queryStringCachingBehavior": - err = unpopulate(val, "QueryStringCachingBehavior", &e.QueryStringCachingBehavior) - delete(rawMsg, key) - case "resourceState": - err = unpopulate(val, "ResourceState", &e.ResourceState) - delete(rawMsg, key) - case "urlSigningKeys": - err = unpopulate(val, "URLSigningKeys", &e.URLSigningKeys) - delete(rawMsg, key) - case "webApplicationFirewallPolicyLink": - err = unpopulate(val, "WebApplicationFirewallPolicyLink", &e.WebApplicationFirewallPolicyLink) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesUpdateParameters. -func (e EndpointPropertiesUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "contentTypesToCompress", e.ContentTypesToCompress) - populate(objectMap, "defaultOriginGroup", e.DefaultOriginGroup) - populate(objectMap, "deliveryPolicy", e.DeliveryPolicy) - populate(objectMap, "geoFilters", e.GeoFilters) - populate(objectMap, "isCompressionEnabled", e.IsCompressionEnabled) - populate(objectMap, "isHttpAllowed", e.IsHTTPAllowed) - populate(objectMap, "isHttpsAllowed", e.IsHTTPSAllowed) - populate(objectMap, "optimizationType", e.OptimizationType) - populate(objectMap, "originHostHeader", e.OriginHostHeader) - populate(objectMap, "originPath", e.OriginPath) - populate(objectMap, "probePath", e.ProbePath) - populate(objectMap, "queryStringCachingBehavior", e.QueryStringCachingBehavior) - populate(objectMap, "urlSigningKeys", e.URLSigningKeys) - populate(objectMap, "webApplicationFirewallPolicyLink", e.WebApplicationFirewallPolicyLink) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointPropertiesUpdateParameters. -func (e *EndpointPropertiesUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "contentTypesToCompress": - err = unpopulate(val, "ContentTypesToCompress", &e.ContentTypesToCompress) - delete(rawMsg, key) - case "defaultOriginGroup": - err = unpopulate(val, "DefaultOriginGroup", &e.DefaultOriginGroup) - delete(rawMsg, key) - case "deliveryPolicy": - err = unpopulate(val, "DeliveryPolicy", &e.DeliveryPolicy) - delete(rawMsg, key) - case "geoFilters": - err = unpopulate(val, "GeoFilters", &e.GeoFilters) - delete(rawMsg, key) - case "isCompressionEnabled": - err = unpopulate(val, "IsCompressionEnabled", &e.IsCompressionEnabled) - delete(rawMsg, key) - case "isHttpAllowed": - err = unpopulate(val, "IsHTTPAllowed", &e.IsHTTPAllowed) - delete(rawMsg, key) - case "isHttpsAllowed": - err = unpopulate(val, "IsHTTPSAllowed", &e.IsHTTPSAllowed) - delete(rawMsg, key) - case "optimizationType": - err = unpopulate(val, "OptimizationType", &e.OptimizationType) - delete(rawMsg, key) - case "originHostHeader": - err = unpopulate(val, "OriginHostHeader", &e.OriginHostHeader) - delete(rawMsg, key) - case "originPath": - err = unpopulate(val, "OriginPath", &e.OriginPath) - delete(rawMsg, key) - case "probePath": - err = unpopulate(val, "ProbePath", &e.ProbePath) - delete(rawMsg, key) - case "queryStringCachingBehavior": - err = unpopulate(val, "QueryStringCachingBehavior", &e.QueryStringCachingBehavior) - delete(rawMsg, key) - case "urlSigningKeys": - err = unpopulate(val, "URLSigningKeys", &e.URLSigningKeys) - delete(rawMsg, key) - case "webApplicationFirewallPolicyLink": - err = unpopulate(val, "WebApplicationFirewallPolicyLink", &e.WebApplicationFirewallPolicyLink) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesUpdateParametersDeliveryPolicy. -func (e EndpointPropertiesUpdateParametersDeliveryPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", e.Description) - populate(objectMap, "rules", e.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointPropertiesUpdateParametersDeliveryPolicy. -func (e *EndpointPropertiesUpdateParametersDeliveryPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &e.Description) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &e.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink. -func (e EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", e.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink. -func (e *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointUpdateParameters. -func (e EndpointUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointUpdateParameters. -func (e *EndpointUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &e.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. -func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateAny(objectMap, "info", e.Info) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. -func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "info": - err = unpopulate(val, "Info", &e.Info) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. -func (e ErrorDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "additionalInfo", e.AdditionalInfo) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. -func (e *ErrorDetail) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) - delete(rawMsg, key) - case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &e.Details) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &e.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. -func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", e.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. -func (e *ErrorResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &e.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GeoFilter. -func (g GeoFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "action", g.Action) - populate(objectMap, "countryCodes", g.CountryCodes) - populate(objectMap, "relativePath", g.RelativePath) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GeoFilter. -func (g *GeoFilter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &g.Action) - delete(rawMsg, key) - case "countryCodes": - err = unpopulate(val, "CountryCodes", &g.CountryCodes) - delete(rawMsg, key) - case "relativePath": - err = unpopulate(val, "RelativePath", &g.RelativePath) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HTTPErrorRangeParameters. -func (h HTTPErrorRangeParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "begin", h.Begin) - populate(objectMap, "end", h.End) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPErrorRangeParameters. -func (h *HTTPErrorRangeParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "begin": - err = unpopulate(val, "Begin", &h.Begin) - delete(rawMsg, key) - case "end": - err = unpopulate(val, "End", &h.End) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HTTPVersionMatchConditionParameters. -func (h HTTPVersionMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", h.MatchValues) - populate(objectMap, "negateCondition", h.NegateCondition) - populate(objectMap, "operator", h.Operator) - populate(objectMap, "transforms", h.Transforms) - populate(objectMap, "typeName", h.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPVersionMatchConditionParameters. -func (h *HTTPVersionMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &h.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &h.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &h.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &h.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &h.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HeaderActionParameters. -func (h HeaderActionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "headerAction", h.HeaderAction) - populate(objectMap, "headerName", h.HeaderName) - populate(objectMap, "typeName", h.TypeName) - populate(objectMap, "value", h.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HeaderActionParameters. -func (h *HeaderActionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "headerAction": - err = unpopulate(val, "HeaderAction", &h.HeaderAction) - delete(rawMsg, key) - case "headerName": - err = unpopulate(val, "HeaderName", &h.HeaderName) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &h.TypeName) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &h.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HealthProbeParameters. -func (h HealthProbeParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "probeIntervalInSeconds", h.ProbeIntervalInSeconds) - populate(objectMap, "probePath", h.ProbePath) - populate(objectMap, "probeProtocol", h.ProbeProtocol) - populate(objectMap, "probeRequestType", h.ProbeRequestType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HealthProbeParameters. -func (h *HealthProbeParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "probeIntervalInSeconds": - err = unpopulate(val, "ProbeIntervalInSeconds", &h.ProbeIntervalInSeconds) - delete(rawMsg, key) - case "probePath": - err = unpopulate(val, "ProbePath", &h.ProbePath) - delete(rawMsg, key) - case "probeProtocol": - err = unpopulate(val, "ProbeProtocol", &h.ProbeProtocol) - delete(rawMsg, key) - case "probeRequestType": - err = unpopulate(val, "ProbeRequestType", &h.ProbeRequestType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HostNameMatchConditionParameters. -func (h HostNameMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", h.MatchValues) - populate(objectMap, "negateCondition", h.NegateCondition) - populate(objectMap, "operator", h.Operator) - populate(objectMap, "transforms", h.Transforms) - populate(objectMap, "typeName", h.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HostNameMatchConditionParameters. -func (h *HostNameMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &h.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &h.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &h.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &h.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &h.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPAddressGroup. -func (i IPAddressGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "deliveryRegion", i.DeliveryRegion) - populate(objectMap, "ipv4Addresses", i.IPv4Addresses) - populate(objectMap, "ipv6Addresses", i.IPv6Addresses) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressGroup. -func (i *IPAddressGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deliveryRegion": - err = unpopulate(val, "DeliveryRegion", &i.DeliveryRegion) - delete(rawMsg, key) - case "ipv4Addresses": - err = unpopulate(val, "IPv4Addresses", &i.IPv4Addresses) - delete(rawMsg, key) - case "ipv6Addresses": - err = unpopulate(val, "IPv6Addresses", &i.IPv6Addresses) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IsDeviceMatchConditionParameters. -func (i IsDeviceMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", i.MatchValues) - populate(objectMap, "negateCondition", i.NegateCondition) - populate(objectMap, "operator", i.Operator) - populate(objectMap, "transforms", i.Transforms) - populate(objectMap, "typeName", i.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IsDeviceMatchConditionParameters. -func (i *IsDeviceMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &i.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &i.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &i.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &i.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &i.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateSourceParameters. -func (k KeyVaultCertificateSourceParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "deleteRule", k.DeleteRule) - populate(objectMap, "resourceGroupName", k.ResourceGroupName) - populate(objectMap, "secretName", k.SecretName) - populate(objectMap, "secretVersion", k.SecretVersion) - populate(objectMap, "subscriptionId", k.SubscriptionID) - populate(objectMap, "typeName", k.TypeName) - populate(objectMap, "updateRule", k.UpdateRule) - populate(objectMap, "vaultName", k.VaultName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateSourceParameters. -func (k *KeyVaultCertificateSourceParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deleteRule": - err = unpopulate(val, "DeleteRule", &k.DeleteRule) - delete(rawMsg, key) - case "resourceGroupName": - err = unpopulate(val, "ResourceGroupName", &k.ResourceGroupName) - delete(rawMsg, key) - case "secretName": - err = unpopulate(val, "SecretName", &k.SecretName) - delete(rawMsg, key) - case "secretVersion": - err = unpopulate(val, "SecretVersion", &k.SecretVersion) - delete(rawMsg, key) - case "subscriptionId": - err = unpopulate(val, "SubscriptionID", &k.SubscriptionID) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &k.TypeName) - delete(rawMsg, key) - case "updateRule": - err = unpopulate(val, "UpdateRule", &k.UpdateRule) - delete(rawMsg, key) - case "vaultName": - err = unpopulate(val, "VaultName", &k.VaultName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KeyVaultSigningKeyParameters. -func (k KeyVaultSigningKeyParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "resourceGroupName", k.ResourceGroupName) - populate(objectMap, "secretName", k.SecretName) - populate(objectMap, "secretVersion", k.SecretVersion) - populate(objectMap, "subscriptionId", k.SubscriptionID) - populate(objectMap, "typeName", k.TypeName) - populate(objectMap, "vaultName", k.VaultName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultSigningKeyParameters. -func (k *KeyVaultSigningKeyParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "resourceGroupName": - err = unpopulate(val, "ResourceGroupName", &k.ResourceGroupName) - delete(rawMsg, key) - case "secretName": - err = unpopulate(val, "SecretName", &k.SecretName) - delete(rawMsg, key) - case "secretVersion": - err = unpopulate(val, "SecretVersion", &k.SecretVersion) - delete(rawMsg, key) - case "subscriptionId": - err = unpopulate(val, "SubscriptionID", &k.SubscriptionID) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &k.TypeName) - delete(rawMsg, key) - case "vaultName": - err = unpopulate(val, "VaultName", &k.VaultName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LinkedEndpoint. -func (l LinkedEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", l.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedEndpoint. -func (l *LinkedEndpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &l.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancingSettingsParameters. -func (l LoadBalancingSettingsParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "additionalLatencyInMilliseconds", l.AdditionalLatencyInMilliseconds) - populate(objectMap, "sampleSize", l.SampleSize) - populate(objectMap, "successfulSamplesRequired", l.SuccessfulSamplesRequired) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingSettingsParameters. -func (l *LoadBalancingSettingsParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "additionalLatencyInMilliseconds": - err = unpopulate(val, "AdditionalLatencyInMilliseconds", &l.AdditionalLatencyInMilliseconds) - delete(rawMsg, key) - case "sampleSize": - err = unpopulate(val, "SampleSize", &l.SampleSize) - delete(rawMsg, key) - case "successfulSamplesRequired": - err = unpopulate(val, "SuccessfulSamplesRequired", &l.SuccessfulSamplesRequired) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadParameters. -func (l LoadParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "contentPaths", l.ContentPaths) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadParameters. -func (l *LoadParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "contentPaths": - err = unpopulate(val, "ContentPaths", &l.ContentPaths) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LogSpecification. -func (l LogSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "blobDuration", l.BlobDuration) - populate(objectMap, "displayName", l.DisplayName) - populate(objectMap, "logFilterPattern", l.LogFilterPattern) - populate(objectMap, "name", l.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. -func (l *LogSpecification) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blobDuration": - err = unpopulate(val, "BlobDuration", &l.BlobDuration) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &l.DisplayName) - delete(rawMsg, key) - case "logFilterPattern": - err = unpopulate(val, "LogFilterPattern", &l.LogFilterPattern) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedCertificate. -func (m ManagedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "expirationDate", m.ExpirationDate) - populate(objectMap, "subject", m.Subject) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCertificate. -func (m *ManagedCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &m.ExpirationDate) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &m.Subject) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedCertificateParameters. -func (m ManagedCertificateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "expirationDate", m.ExpirationDate) - populate(objectMap, "subject", m.Subject) - objectMap["type"] = SecretTypeManagedCertificate - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCertificateParameters. -func (m *ManagedCertificateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expirationDate": - err = unpopulate(val, "ExpirationDate", &m.ExpirationDate) - delete(rawMsg, key) - case "subject": - err = unpopulate(val, "Subject", &m.Subject) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedHTTPSParameters. -func (m ManagedHTTPSParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["certificateSource"] = CertificateSourceCdn - populate(objectMap, "certificateSourceParameters", m.CertificateSourceParameters) - populate(objectMap, "minimumTlsVersion", m.MinimumTLSVersion) - populate(objectMap, "protocolType", m.ProtocolType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHTTPSParameters. -func (m *ManagedHTTPSParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificateSource": - err = unpopulate(val, "CertificateSource", &m.CertificateSource) - delete(rawMsg, key) - case "certificateSourceParameters": - err = unpopulate(val, "CertificateSourceParameters", &m.CertificateSourceParameters) - delete(rawMsg, key) - case "minimumTlsVersion": - err = unpopulate(val, "MinimumTLSVersion", &m.MinimumTLSVersion) - delete(rawMsg, key) - case "protocolType": - err = unpopulate(val, "ProtocolType", &m.ProtocolType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleDefinition. -func (m ManagedRuleDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", m.Description) - populate(objectMap, "ruleId", m.RuleID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleDefinition. -func (m *ManagedRuleDefinition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "ruleId": - err = unpopulate(val, "RuleID", &m.RuleID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupDefinition. -func (m ManagedRuleGroupDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", m.Description) - populate(objectMap, "ruleGroupName", m.RuleGroupName) - populate(objectMap, "rules", m.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleGroupDefinition. -func (m *ManagedRuleGroupDefinition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "ruleGroupName": - err = unpopulate(val, "RuleGroupName", &m.RuleGroupName) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &m.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupOverride. -func (m ManagedRuleGroupOverride) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "ruleGroupName", m.RuleGroupName) - populate(objectMap, "rules", m.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleGroupOverride. -func (m *ManagedRuleGroupOverride) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ruleGroupName": - err = unpopulate(val, "RuleGroupName", &m.RuleGroupName) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &m.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleOverride. -func (m ManagedRuleOverride) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "action", m.Action) - populate(objectMap, "enabledState", m.EnabledState) - populate(objectMap, "ruleId", m.RuleID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleOverride. -func (m *ManagedRuleOverride) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &m.Action) - delete(rawMsg, key) - case "enabledState": - err = unpopulate(val, "EnabledState", &m.EnabledState) - delete(rawMsg, key) - case "ruleId": - err = unpopulate(val, "RuleID", &m.RuleID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSet. -func (m ManagedRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "anomalyScore", m.AnomalyScore) - populate(objectMap, "ruleGroupOverrides", m.RuleGroupOverrides) - populate(objectMap, "ruleSetType", m.RuleSetType) - populate(objectMap, "ruleSetVersion", m.RuleSetVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSet. -func (m *ManagedRuleSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "anomalyScore": - err = unpopulate(val, "AnomalyScore", &m.AnomalyScore) - delete(rawMsg, key) - case "ruleGroupOverrides": - err = unpopulate(val, "RuleGroupOverrides", &m.RuleGroupOverrides) - delete(rawMsg, key) - case "ruleSetType": - err = unpopulate(val, "RuleSetType", &m.RuleSetType) - delete(rawMsg, key) - case "ruleSetVersion": - err = unpopulate(val, "RuleSetVersion", &m.RuleSetVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinition. -func (m ManagedRuleSetDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinition. -func (m *ManagedRuleSetDefinition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &m.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinitionList. -func (m ManagedRuleSetDefinitionList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinitionList. -func (m *ManagedRuleSetDefinitionList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinitionProperties. -func (m ManagedRuleSetDefinitionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "ruleGroups", m.RuleGroups) - populate(objectMap, "ruleSetType", m.RuleSetType) - populate(objectMap, "ruleSetVersion", m.RuleSetVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinitionProperties. -func (m *ManagedRuleSetDefinitionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "ruleGroups": - err = unpopulate(val, "RuleGroups", &m.RuleGroups) - delete(rawMsg, key) - case "ruleSetType": - err = unpopulate(val, "RuleSetType", &m.RuleSetType) - delete(rawMsg, key) - case "ruleSetVersion": - err = unpopulate(val, "RuleSetVersion", &m.RuleSetVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetList. -func (m ManagedRuleSetList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "managedRuleSets", m.ManagedRuleSets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetList. -func (m *ManagedRuleSetList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "managedRuleSets": - err = unpopulate(val, "ManagedRuleSets", &m.ManagedRuleSets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MatchCondition. -func (m MatchCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValue", m.MatchValue) - populate(objectMap, "matchVariable", m.MatchVariable) - populate(objectMap, "negateCondition", m.NegateCondition) - populate(objectMap, "operator", m.Operator) - populate(objectMap, "selector", m.Selector) - populate(objectMap, "transforms", m.Transforms) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MatchCondition. -func (m *MatchCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValue": - err = unpopulate(val, "MatchValue", &m.MatchValue) - delete(rawMsg, key) - case "matchVariable": - err = unpopulate(val, "MatchVariable", &m.MatchVariable) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &m.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &m.Operator) - delete(rawMsg, key) - case "selector": - err = unpopulate(val, "Selector", &m.Selector) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &m.Transforms) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricAvailability. -func (m MetricAvailability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "blobDuration", m.BlobDuration) - populate(objectMap, "timeGrain", m.TimeGrain) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAvailability. -func (m *MetricAvailability) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blobDuration": - err = unpopulate(val, "BlobDuration", &m.BlobDuration) - delete(rawMsg, key) - case "timeGrain": - err = unpopulate(val, "TimeGrain", &m.TimeGrain) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. -func (m MetricSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "aggregationType", m.AggregationType) - populate(objectMap, "availabilities", m.Availabilities) - populate(objectMap, "dimensions", m.Dimensions) - populate(objectMap, "displayDescription", m.DisplayDescription) - populate(objectMap, "displayName", m.DisplayName) - populate(objectMap, "fillGapWithZero", m.FillGapWithZero) - populate(objectMap, "isInternal", m.IsInternal) - populate(objectMap, "metricFilterPattern", m.MetricFilterPattern) - populate(objectMap, "name", m.Name) - populate(objectMap, "supportedTimeGrainTypes", m.SupportedTimeGrainTypes) - populate(objectMap, "unit", m.Unit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. -func (m *MetricSpecification) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aggregationType": - err = unpopulate(val, "AggregationType", &m.AggregationType) - delete(rawMsg, key) - case "availabilities": - err = unpopulate(val, "Availabilities", &m.Availabilities) - delete(rawMsg, key) - case "dimensions": - err = unpopulate(val, "Dimensions", &m.Dimensions) - delete(rawMsg, key) - case "displayDescription": - err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &m.DisplayName) - delete(rawMsg, key) - case "fillGapWithZero": - err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) - delete(rawMsg, key) - case "isInternal": - err = unpopulate(val, "IsInternal", &m.IsInternal) - delete(rawMsg, key) - case "metricFilterPattern": - err = unpopulate(val, "MetricFilterPattern", &m.MetricFilterPattern) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "supportedTimeGrainTypes": - err = unpopulate(val, "SupportedTimeGrainTypes", &m.SupportedTimeGrainTypes) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &m.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricsResponse. -func (m MetricsResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "dateTimeBegin", m.DateTimeBegin) - populateTimeRFC3339(objectMap, "dateTimeEnd", m.DateTimeEnd) - populate(objectMap, "granularity", m.Granularity) - populate(objectMap, "series", m.Series) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricsResponse. -func (m *MetricsResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dateTimeBegin": - err = unpopulateTimeRFC3339(val, "DateTimeBegin", &m.DateTimeBegin) - delete(rawMsg, key) - case "dateTimeEnd": - err = unpopulateTimeRFC3339(val, "DateTimeEnd", &m.DateTimeEnd) - delete(rawMsg, key) - case "granularity": - err = unpopulate(val, "Granularity", &m.Granularity) - delete(rawMsg, key) - case "series": - err = unpopulate(val, "Series", &m.Series) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricsResponseSeriesItem. -func (m MetricsResponseSeriesItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "data", m.Data) - populate(objectMap, "groups", m.Groups) - populate(objectMap, "metric", m.Metric) - populate(objectMap, "unit", m.Unit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricsResponseSeriesItem. -func (m *MetricsResponseSeriesItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "data": - err = unpopulate(val, "Data", &m.Data) - delete(rawMsg, key) - case "groups": - err = unpopulate(val, "Groups", &m.Groups) - delete(rawMsg, key) - case "metric": - err = unpopulate(val, "Metric", &m.Metric) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &m.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricsResponseSeriesPropertiesItemsItem. -func (m MetricsResponseSeriesPropertiesItemsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", m.Name) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricsResponseSeriesPropertiesItemsItem. -func (m *MetricsResponseSeriesPropertiesItemsItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "display", o.Display) - populate(objectMap, "isDataAction", o.IsDataAction) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.OperationProperties) - populate(objectMap, "origin", o.Origin) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. -func (o *Operation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "display": - err = unpopulate(val, "Display", &o.Display) - delete(rawMsg, key) - case "isDataAction": - err = unpopulate(val, "IsDataAction", &o.IsDataAction) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "OperationProperties", &o.OperationProperties) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &o.Origin) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. -func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", o.Description) - populate(objectMap, "operation", o.Operation) - populate(objectMap, "provider", o.Provider) - populate(objectMap, "resource", o.Resource) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. -func (o *OperationDisplay) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &o.Operation) - delete(rawMsg, key) - case "provider": - err = unpopulate(val, "Provider", &o.Provider) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &o.Resource) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationProperties. -func (o OperationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "serviceSpecification", o.ServiceSpecification) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. -func (o *OperationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "serviceSpecification": - err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationsListResult. -func (o OperationsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsListResult. -func (o *OperationsListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Origin. -func (o Origin) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", o.ID) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "systemData", o.SystemData) - populate(objectMap, "type", o.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Origin. -func (o *Origin) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &o.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &o.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginGroup. -func (o OriginGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", o.ID) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "systemData", o.SystemData) - populate(objectMap, "type", o.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroup. -func (o *OriginGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &o.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &o.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginGroupListResult. -func (o OriginGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupListResult. -func (o *OriginGroupListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginGroupOverride. -func (o OriginGroupOverride) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "forwardingProtocol", o.ForwardingProtocol) - populate(objectMap, "originGroup", o.OriginGroup) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupOverride. -func (o *OriginGroupOverride) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "forwardingProtocol": - err = unpopulate(val, "ForwardingProtocol", &o.ForwardingProtocol) - delete(rawMsg, key) - case "originGroup": - err = unpopulate(val, "OriginGroup", &o.OriginGroup) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginGroupOverrideAction. -func (o OriginGroupOverrideAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = DeliveryRuleActionOriginGroupOverride - populate(objectMap, "parameters", o.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupOverrideAction. -func (o *OriginGroupOverrideAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &o.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginGroupOverrideActionParameters. -func (o OriginGroupOverrideActionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "originGroup", o.OriginGroup) - populate(objectMap, "typeName", o.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupOverrideActionParameters. -func (o *OriginGroupOverrideActionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "originGroup": - err = unpopulate(val, "OriginGroup", &o.OriginGroup) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &o.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginGroupProperties. -func (o OriginGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "healthProbeSettings", o.HealthProbeSettings) - populate(objectMap, "origins", o.Origins) - populate(objectMap, "provisioningState", o.ProvisioningState) - populate(objectMap, "resourceState", o.ResourceState) - populate(objectMap, "responseBasedOriginErrorDetectionSettings", o.ResponseBasedOriginErrorDetectionSettings) - populate(objectMap, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", o.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupProperties. -func (o *OriginGroupProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "healthProbeSettings": - err = unpopulate(val, "HealthProbeSettings", &o.HealthProbeSettings) - delete(rawMsg, key) - case "origins": - err = unpopulate(val, "Origins", &o.Origins) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) - delete(rawMsg, key) - case "resourceState": - err = unpopulate(val, "ResourceState", &o.ResourceState) - delete(rawMsg, key) - case "responseBasedOriginErrorDetectionSettings": - err = unpopulate(val, "ResponseBasedOriginErrorDetectionSettings", &o.ResponseBasedOriginErrorDetectionSettings) - delete(rawMsg, key) - case "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": - err = unpopulate(val, "TrafficRestorationTimeToHealedOrNewEndpointsInMinutes", &o.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginGroupUpdateParameters. -func (o OriginGroupUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", o.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupUpdateParameters. -func (o *OriginGroupUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginGroupUpdatePropertiesParameters. -func (o OriginGroupUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "healthProbeSettings", o.HealthProbeSettings) - populate(objectMap, "origins", o.Origins) - populate(objectMap, "responseBasedOriginErrorDetectionSettings", o.ResponseBasedOriginErrorDetectionSettings) - populate(objectMap, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", o.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupUpdatePropertiesParameters. -func (o *OriginGroupUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "healthProbeSettings": - err = unpopulate(val, "HealthProbeSettings", &o.HealthProbeSettings) - delete(rawMsg, key) - case "origins": - err = unpopulate(val, "Origins", &o.Origins) - delete(rawMsg, key) - case "responseBasedOriginErrorDetectionSettings": - err = unpopulate(val, "ResponseBasedOriginErrorDetectionSettings", &o.ResponseBasedOriginErrorDetectionSettings) - delete(rawMsg, key) - case "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": - err = unpopulate(val, "TrafficRestorationTimeToHealedOrNewEndpointsInMinutes", &o.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginListResult. -func (o OriginListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginListResult. -func (o *OriginListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginProperties. -func (o OriginProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", o.Enabled) - populate(objectMap, "httpPort", o.HTTPPort) - populate(objectMap, "httpsPort", o.HTTPSPort) - populate(objectMap, "hostName", o.HostName) - populate(objectMap, "originHostHeader", o.OriginHostHeader) - populate(objectMap, "priority", o.Priority) - populate(objectMap, "privateEndpointStatus", o.PrivateEndpointStatus) - populate(objectMap, "privateLinkAlias", o.PrivateLinkAlias) - populate(objectMap, "privateLinkApprovalMessage", o.PrivateLinkApprovalMessage) - populate(objectMap, "privateLinkLocation", o.PrivateLinkLocation) - populate(objectMap, "privateLinkResourceId", o.PrivateLinkResourceID) - populate(objectMap, "provisioningState", o.ProvisioningState) - populate(objectMap, "resourceState", o.ResourceState) - populate(objectMap, "weight", o.Weight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginProperties. -func (o *OriginProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &o.Enabled) - delete(rawMsg, key) - case "httpPort": - err = unpopulate(val, "HTTPPort", &o.HTTPPort) - delete(rawMsg, key) - case "httpsPort": - err = unpopulate(val, "HTTPSPort", &o.HTTPSPort) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &o.HostName) - delete(rawMsg, key) - case "originHostHeader": - err = unpopulate(val, "OriginHostHeader", &o.OriginHostHeader) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &o.Priority) - delete(rawMsg, key) - case "privateEndpointStatus": - err = unpopulate(val, "PrivateEndpointStatus", &o.PrivateEndpointStatus) - delete(rawMsg, key) - case "privateLinkAlias": - err = unpopulate(val, "PrivateLinkAlias", &o.PrivateLinkAlias) - delete(rawMsg, key) - case "privateLinkApprovalMessage": - err = unpopulate(val, "PrivateLinkApprovalMessage", &o.PrivateLinkApprovalMessage) - delete(rawMsg, key) - case "privateLinkLocation": - err = unpopulate(val, "PrivateLinkLocation", &o.PrivateLinkLocation) - delete(rawMsg, key) - case "privateLinkResourceId": - err = unpopulate(val, "PrivateLinkResourceID", &o.PrivateLinkResourceID) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) - delete(rawMsg, key) - case "resourceState": - err = unpopulate(val, "ResourceState", &o.ResourceState) - delete(rawMsg, key) - case "weight": - err = unpopulate(val, "Weight", &o.Weight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginUpdateParameters. -func (o OriginUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", o.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginUpdateParameters. -func (o *OriginUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OriginUpdatePropertiesParameters. -func (o OriginUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", o.Enabled) - populate(objectMap, "httpPort", o.HTTPPort) - populate(objectMap, "httpsPort", o.HTTPSPort) - populate(objectMap, "hostName", o.HostName) - populate(objectMap, "originHostHeader", o.OriginHostHeader) - populate(objectMap, "priority", o.Priority) - populate(objectMap, "privateLinkAlias", o.PrivateLinkAlias) - populate(objectMap, "privateLinkApprovalMessage", o.PrivateLinkApprovalMessage) - populate(objectMap, "privateLinkLocation", o.PrivateLinkLocation) - populate(objectMap, "privateLinkResourceId", o.PrivateLinkResourceID) - populate(objectMap, "weight", o.Weight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OriginUpdatePropertiesParameters. -func (o *OriginUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &o.Enabled) - delete(rawMsg, key) - case "httpPort": - err = unpopulate(val, "HTTPPort", &o.HTTPPort) - delete(rawMsg, key) - case "httpsPort": - err = unpopulate(val, "HTTPSPort", &o.HTTPSPort) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &o.HostName) - delete(rawMsg, key) - case "originHostHeader": - err = unpopulate(val, "OriginHostHeader", &o.OriginHostHeader) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &o.Priority) - delete(rawMsg, key) - case "privateLinkAlias": - err = unpopulate(val, "PrivateLinkAlias", &o.PrivateLinkAlias) - delete(rawMsg, key) - case "privateLinkApprovalMessage": - err = unpopulate(val, "PrivateLinkApprovalMessage", &o.PrivateLinkApprovalMessage) - delete(rawMsg, key) - case "privateLinkLocation": - err = unpopulate(val, "PrivateLinkLocation", &o.PrivateLinkLocation) - delete(rawMsg, key) - case "privateLinkResourceId": - err = unpopulate(val, "PrivateLinkResourceID", &o.PrivateLinkResourceID) - delete(rawMsg, key) - case "weight": - err = unpopulate(val, "Weight", &o.Weight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicySettings. -func (p PolicySettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "defaultCustomBlockResponseBody", p.DefaultCustomBlockResponseBody) - populate(objectMap, "defaultCustomBlockResponseStatusCode", p.DefaultCustomBlockResponseStatusCode) - populate(objectMap, "defaultRedirectUrl", p.DefaultRedirectURL) - populate(objectMap, "enabledState", p.EnabledState) - populate(objectMap, "mode", p.Mode) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicySettings. -func (p *PolicySettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "defaultCustomBlockResponseBody": - err = unpopulate(val, "DefaultCustomBlockResponseBody", &p.DefaultCustomBlockResponseBody) - delete(rawMsg, key) - case "defaultCustomBlockResponseStatusCode": - err = unpopulate(val, "DefaultCustomBlockResponseStatusCode", &p.DefaultCustomBlockResponseStatusCode) - delete(rawMsg, key) - case "defaultRedirectUrl": - err = unpopulate(val, "DefaultRedirectURL", &p.DefaultRedirectURL) - delete(rawMsg, key) - case "enabledState": - err = unpopulate(val, "EnabledState", &p.EnabledState) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &p.Mode) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PostArgsMatchConditionParameters. -func (p PostArgsMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", p.MatchValues) - populate(objectMap, "negateCondition", p.NegateCondition) - populate(objectMap, "operator", p.Operator) - populate(objectMap, "selector", p.Selector) - populate(objectMap, "transforms", p.Transforms) - populate(objectMap, "typeName", p.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PostArgsMatchConditionParameters. -func (p *PostArgsMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &p.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &p.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &p.Operator) - delete(rawMsg, key) - case "selector": - err = unpopulate(val, "Selector", &p.Selector) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &p.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &p.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Profile. -func (p Profile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "kind", p.Kind) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Profile. -func (p *Profile) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &p.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &p.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProfileListResult. -func (p ProfileListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileListResult. -func (p *ProfileListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProfileProperties. -func (p ProfileProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "frontDoorId", p.FrontDoorID) - populate(objectMap, "originResponseTimeoutSeconds", p.OriginResponseTimeoutSeconds) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "resourceState", p.ResourceState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileProperties. -func (p *ProfileProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "frontDoorId": - err = unpopulate(val, "FrontDoorID", &p.FrontDoorID) - delete(rawMsg, key) - case "originResponseTimeoutSeconds": - err = unpopulate(val, "OriginResponseTimeoutSeconds", &p.OriginResponseTimeoutSeconds) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "resourceState": - err = unpopulate(val, "ResourceState", &p.ResourceState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProfilePropertiesUpdateParameters. -func (p ProfilePropertiesUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "originResponseTimeoutSeconds", p.OriginResponseTimeoutSeconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProfilePropertiesUpdateParameters. -func (p *ProfilePropertiesUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "originResponseTimeoutSeconds": - err = unpopulate(val, "OriginResponseTimeoutSeconds", &p.OriginResponseTimeoutSeconds) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProfileUpdateParameters. -func (p ProfileUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileUpdateParameters. -func (p *ProfileUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProxyResource. -func (p ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource. -func (p *ProxyResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PurgeParameters. -func (p PurgeParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "contentPaths", p.ContentPaths) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PurgeParameters. -func (p *PurgeParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "contentPaths": - err = unpopulate(val, "ContentPaths", &p.ContentPaths) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QueryStringMatchConditionParameters. -func (q QueryStringMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", q.MatchValues) - populate(objectMap, "negateCondition", q.NegateCondition) - populate(objectMap, "operator", q.Operator) - populate(objectMap, "transforms", q.Transforms) - populate(objectMap, "typeName", q.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QueryStringMatchConditionParameters. -func (q *QueryStringMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &q.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &q.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &q.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &q.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &q.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RankingsResponse. -func (r RankingsResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "dateTimeBegin", r.DateTimeBegin) - populateTimeRFC3339(objectMap, "dateTimeEnd", r.DateTimeEnd) - populate(objectMap, "tables", r.Tables) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponse. -func (r *RankingsResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dateTimeBegin": - err = unpopulateTimeRFC3339(val, "DateTimeBegin", &r.DateTimeBegin) - delete(rawMsg, key) - case "dateTimeEnd": - err = unpopulateTimeRFC3339(val, "DateTimeEnd", &r.DateTimeEnd) - delete(rawMsg, key) - case "tables": - err = unpopulate(val, "Tables", &r.Tables) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RankingsResponseTablesItem. -func (r RankingsResponseTablesItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "data", r.Data) - populate(objectMap, "ranking", r.Ranking) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponseTablesItem. -func (r *RankingsResponseTablesItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "data": - err = unpopulate(val, "Data", &r.Data) - delete(rawMsg, key) - case "ranking": - err = unpopulate(val, "Ranking", &r.Ranking) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RankingsResponseTablesPropertiesItemsItem. -func (r RankingsResponseTablesPropertiesItemsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "metrics", r.Metrics) - populate(objectMap, "name", r.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponseTablesPropertiesItemsItem. -func (r *RankingsResponseTablesPropertiesItemsItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "metrics": - err = unpopulate(val, "Metrics", &r.Metrics) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RankingsResponseTablesPropertiesItemsMetricsItem. -func (r RankingsResponseTablesPropertiesItemsMetricsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "metric", r.Metric) - populate(objectMap, "percentage", r.Percentage) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponseTablesPropertiesItemsMetricsItem. -func (r *RankingsResponseTablesPropertiesItemsMetricsItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "metric": - err = unpopulate(val, "Metric", &r.Metric) - delete(rawMsg, key) - case "percentage": - err = unpopulate(val, "Percentage", &r.Percentage) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RateLimitRule. -func (r RateLimitRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "action", r.Action) - populate(objectMap, "enabledState", r.EnabledState) - populate(objectMap, "matchConditions", r.MatchConditions) - populate(objectMap, "name", r.Name) - populate(objectMap, "priority", r.Priority) - populate(objectMap, "rateLimitDurationInMinutes", r.RateLimitDurationInMinutes) - populate(objectMap, "rateLimitThreshold", r.RateLimitThreshold) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RateLimitRule. -func (r *RateLimitRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &r.Action) - delete(rawMsg, key) - case "enabledState": - err = unpopulate(val, "EnabledState", &r.EnabledState) - delete(rawMsg, key) - case "matchConditions": - err = unpopulate(val, "MatchConditions", &r.MatchConditions) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &r.Priority) - delete(rawMsg, key) - case "rateLimitDurationInMinutes": - err = unpopulate(val, "RateLimitDurationInMinutes", &r.RateLimitDurationInMinutes) - delete(rawMsg, key) - case "rateLimitThreshold": - err = unpopulate(val, "RateLimitThreshold", &r.RateLimitThreshold) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RateLimitRuleList. -func (r RateLimitRuleList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "rules", r.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RateLimitRuleList. -func (r *RateLimitRuleList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "rules": - err = unpopulate(val, "Rules", &r.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RemoteAddressMatchConditionParameters. -func (r RemoteAddressMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", r.MatchValues) - populate(objectMap, "negateCondition", r.NegateCondition) - populate(objectMap, "operator", r.Operator) - populate(objectMap, "transforms", r.Transforms) - populate(objectMap, "typeName", r.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RemoteAddressMatchConditionParameters. -func (r *RemoteAddressMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &r.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &r.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &r.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &r.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &r.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RequestBodyMatchConditionParameters. -func (r RequestBodyMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", r.MatchValues) - populate(objectMap, "negateCondition", r.NegateCondition) - populate(objectMap, "operator", r.Operator) - populate(objectMap, "transforms", r.Transforms) - populate(objectMap, "typeName", r.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RequestBodyMatchConditionParameters. -func (r *RequestBodyMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &r.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &r.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &r.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &r.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &r.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RequestHeaderMatchConditionParameters. -func (r RequestHeaderMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", r.MatchValues) - populate(objectMap, "negateCondition", r.NegateCondition) - populate(objectMap, "operator", r.Operator) - populate(objectMap, "selector", r.Selector) - populate(objectMap, "transforms", r.Transforms) - populate(objectMap, "typeName", r.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RequestHeaderMatchConditionParameters. -func (r *RequestHeaderMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &r.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &r.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &r.Operator) - delete(rawMsg, key) - case "selector": - err = unpopulate(val, "Selector", &r.Selector) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &r.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &r.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RequestMethodMatchConditionParameters. -func (r RequestMethodMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", r.MatchValues) - populate(objectMap, "negateCondition", r.NegateCondition) - populate(objectMap, "operator", r.Operator) - populate(objectMap, "transforms", r.Transforms) - populate(objectMap, "typeName", r.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RequestMethodMatchConditionParameters. -func (r *RequestMethodMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &r.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &r.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &r.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &r.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &r.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RequestSchemeMatchConditionParameters. -func (r RequestSchemeMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", r.MatchValues) - populate(objectMap, "negateCondition", r.NegateCondition) - populate(objectMap, "operator", r.Operator) - populate(objectMap, "transforms", r.Transforms) - populate(objectMap, "typeName", r.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RequestSchemeMatchConditionParameters. -func (r *RequestSchemeMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &r.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &r.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &r.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &r.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &r.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RequestURIMatchConditionParameters. -func (r RequestURIMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", r.MatchValues) - populate(objectMap, "negateCondition", r.NegateCondition) - populate(objectMap, "operator", r.Operator) - populate(objectMap, "transforms", r.Transforms) - populate(objectMap, "typeName", r.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RequestURIMatchConditionParameters. -func (r *RequestURIMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &r.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &r.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &r.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &r.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &r.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. -func (r *Resource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceReference. -func (r ResourceReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceReference. -func (r *ResourceReference) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceUsage. -func (r ResourceUsage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "currentValue", r.CurrentValue) - populate(objectMap, "limit", r.Limit) - populate(objectMap, "resourceType", r.ResourceType) - populate(objectMap, "unit", r.Unit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsage. -func (r *ResourceUsage) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentValue": - err = unpopulate(val, "CurrentValue", &r.CurrentValue) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &r.Limit) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &r.ResourceType) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &r.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceUsageListResult. -func (r ResourceUsageListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsageListResult. -func (r *ResourceUsageListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourcesResponse. -func (r ResourcesResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "customDomains", r.CustomDomains) - populate(objectMap, "endpoints", r.Endpoints) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponse. -func (r *ResourcesResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customDomains": - err = unpopulate(val, "CustomDomains", &r.CustomDomains) - delete(rawMsg, key) - case "endpoints": - err = unpopulate(val, "Endpoints", &r.Endpoints) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourcesResponseCustomDomainsItem. -func (r ResourcesResponseCustomDomainsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "endpointId", r.EndpointID) - populate(objectMap, "history", r.History) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponseCustomDomainsItem. -func (r *ResourcesResponseCustomDomainsItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endpointId": - err = unpopulate(val, "EndpointID", &r.EndpointID) - delete(rawMsg, key) - case "history": - err = unpopulate(val, "History", &r.History) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourcesResponseEndpointsItem. -func (r ResourcesResponseEndpointsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "customDomains", r.CustomDomains) - populate(objectMap, "history", r.History) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponseEndpointsItem. -func (r *ResourcesResponseEndpointsItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customDomains": - err = unpopulate(val, "CustomDomains", &r.CustomDomains) - delete(rawMsg, key) - case "history": - err = unpopulate(val, "History", &r.History) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourcesResponseEndpointsPropertiesItemsItem. -func (r ResourcesResponseEndpointsPropertiesItemsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "endpointId", r.EndpointID) - populate(objectMap, "history", r.History) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponseEndpointsPropertiesItemsItem. -func (r *ResourcesResponseEndpointsPropertiesItemsItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endpointId": - err = unpopulate(val, "EndpointID", &r.EndpointID) - delete(rawMsg, key) - case "history": - err = unpopulate(val, "History", &r.History) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResponseBasedOriginErrorDetectionParameters. -func (r ResponseBasedOriginErrorDetectionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "httpErrorRanges", r.HTTPErrorRanges) - populate(objectMap, "responseBasedDetectedErrorTypes", r.ResponseBasedDetectedErrorTypes) - populate(objectMap, "responseBasedFailoverThresholdPercentage", r.ResponseBasedFailoverThresholdPercentage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResponseBasedOriginErrorDetectionParameters. -func (r *ResponseBasedOriginErrorDetectionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "httpErrorRanges": - err = unpopulate(val, "HTTPErrorRanges", &r.HTTPErrorRanges) - delete(rawMsg, key) - case "responseBasedDetectedErrorTypes": - err = unpopulate(val, "ResponseBasedDetectedErrorTypes", &r.ResponseBasedDetectedErrorTypes) - delete(rawMsg, key) - case "responseBasedFailoverThresholdPercentage": - err = unpopulate(val, "ResponseBasedFailoverThresholdPercentage", &r.ResponseBasedFailoverThresholdPercentage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Route. -func (r Route) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Route. -func (r *Route) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteConfigurationOverrideActionParameters. -func (r RouteConfigurationOverrideActionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cacheConfiguration", r.CacheConfiguration) - populate(objectMap, "originGroupOverride", r.OriginGroupOverride) - populate(objectMap, "typeName", r.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteConfigurationOverrideActionParameters. -func (r *RouteConfigurationOverrideActionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cacheConfiguration": - err = unpopulate(val, "CacheConfiguration", &r.CacheConfiguration) - delete(rawMsg, key) - case "originGroupOverride": - err = unpopulate(val, "OriginGroupOverride", &r.OriginGroupOverride) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &r.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteListResult. -func (r RouteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteListResult. -func (r *RouteListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteProperties. -func (r RouteProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cacheConfiguration", r.CacheConfiguration) - populate(objectMap, "customDomains", r.CustomDomains) - populate(objectMap, "deploymentStatus", r.DeploymentStatus) - populate(objectMap, "enabledState", r.EnabledState) - populate(objectMap, "endpointName", r.EndpointName) - populate(objectMap, "forwardingProtocol", r.ForwardingProtocol) - populate(objectMap, "httpsRedirect", r.HTTPSRedirect) - populate(objectMap, "linkToDefaultDomain", r.LinkToDefaultDomain) - populate(objectMap, "originGroup", r.OriginGroup) - populate(objectMap, "originPath", r.OriginPath) - populate(objectMap, "patternsToMatch", r.PatternsToMatch) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "ruleSets", r.RuleSets) - populate(objectMap, "supportedProtocols", r.SupportedProtocols) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteProperties. -func (r *RouteProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cacheConfiguration": - err = unpopulate(val, "CacheConfiguration", &r.CacheConfiguration) - delete(rawMsg, key) - case "customDomains": - err = unpopulate(val, "CustomDomains", &r.CustomDomains) - delete(rawMsg, key) - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &r.DeploymentStatus) - delete(rawMsg, key) - case "enabledState": - err = unpopulate(val, "EnabledState", &r.EnabledState) - delete(rawMsg, key) - case "endpointName": - err = unpopulate(val, "EndpointName", &r.EndpointName) - delete(rawMsg, key) - case "forwardingProtocol": - err = unpopulate(val, "ForwardingProtocol", &r.ForwardingProtocol) - delete(rawMsg, key) - case "httpsRedirect": - err = unpopulate(val, "HTTPSRedirect", &r.HTTPSRedirect) - delete(rawMsg, key) - case "linkToDefaultDomain": - err = unpopulate(val, "LinkToDefaultDomain", &r.LinkToDefaultDomain) - delete(rawMsg, key) - case "originGroup": - err = unpopulate(val, "OriginGroup", &r.OriginGroup) - delete(rawMsg, key) - case "originPath": - err = unpopulate(val, "OriginPath", &r.OriginPath) - delete(rawMsg, key) - case "patternsToMatch": - err = unpopulate(val, "PatternsToMatch", &r.PatternsToMatch) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "ruleSets": - err = unpopulate(val, "RuleSets", &r.RuleSets) - delete(rawMsg, key) - case "supportedProtocols": - err = unpopulate(val, "SupportedProtocols", &r.SupportedProtocols) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteUpdateParameters. -func (r RouteUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteUpdateParameters. -func (r *RouteUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteUpdatePropertiesParameters. -func (r RouteUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cacheConfiguration", r.CacheConfiguration) - populate(objectMap, "customDomains", r.CustomDomains) - populate(objectMap, "enabledState", r.EnabledState) - populate(objectMap, "endpointName", r.EndpointName) - populate(objectMap, "forwardingProtocol", r.ForwardingProtocol) - populate(objectMap, "httpsRedirect", r.HTTPSRedirect) - populate(objectMap, "linkToDefaultDomain", r.LinkToDefaultDomain) - populate(objectMap, "originGroup", r.OriginGroup) - populate(objectMap, "originPath", r.OriginPath) - populate(objectMap, "patternsToMatch", r.PatternsToMatch) - populate(objectMap, "ruleSets", r.RuleSets) - populate(objectMap, "supportedProtocols", r.SupportedProtocols) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteUpdatePropertiesParameters. -func (r *RouteUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cacheConfiguration": - err = unpopulate(val, "CacheConfiguration", &r.CacheConfiguration) - delete(rawMsg, key) - case "customDomains": - err = unpopulate(val, "CustomDomains", &r.CustomDomains) - delete(rawMsg, key) - case "enabledState": - err = unpopulate(val, "EnabledState", &r.EnabledState) - delete(rawMsg, key) - case "endpointName": - err = unpopulate(val, "EndpointName", &r.EndpointName) - delete(rawMsg, key) - case "forwardingProtocol": - err = unpopulate(val, "ForwardingProtocol", &r.ForwardingProtocol) - delete(rawMsg, key) - case "httpsRedirect": - err = unpopulate(val, "HTTPSRedirect", &r.HTTPSRedirect) - delete(rawMsg, key) - case "linkToDefaultDomain": - err = unpopulate(val, "LinkToDefaultDomain", &r.LinkToDefaultDomain) - delete(rawMsg, key) - case "originGroup": - err = unpopulate(val, "OriginGroup", &r.OriginGroup) - delete(rawMsg, key) - case "originPath": - err = unpopulate(val, "OriginPath", &r.OriginPath) - delete(rawMsg, key) - case "patternsToMatch": - err = unpopulate(val, "PatternsToMatch", &r.PatternsToMatch) - delete(rawMsg, key) - case "ruleSets": - err = unpopulate(val, "RuleSets", &r.RuleSets) - delete(rawMsg, key) - case "supportedProtocols": - err = unpopulate(val, "SupportedProtocols", &r.SupportedProtocols) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Rule. -func (r Rule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Rule. -func (r *Rule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleListResult. -func (r RuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleListResult. -func (r *RuleListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleProperties. -func (r RuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "actions", r.Actions) - populate(objectMap, "conditions", r.Conditions) - populate(objectMap, "deploymentStatus", r.DeploymentStatus) - populate(objectMap, "matchProcessingBehavior", r.MatchProcessingBehavior) - populate(objectMap, "order", r.Order) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "ruleSetName", r.RuleSetName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleProperties. -func (r *RuleProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actions": - r.Actions, err = unmarshalDeliveryRuleActionAutoGeneratedClassificationArray(val) - delete(rawMsg, key) - case "conditions": - r.Conditions, err = unmarshalDeliveryRuleConditionClassificationArray(val) - delete(rawMsg, key) - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &r.DeploymentStatus) - delete(rawMsg, key) - case "matchProcessingBehavior": - err = unpopulate(val, "MatchProcessingBehavior", &r.MatchProcessingBehavior) - delete(rawMsg, key) - case "order": - err = unpopulate(val, "Order", &r.Order) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "ruleSetName": - err = unpopulate(val, "RuleSetName", &r.RuleSetName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleSet. -func (r RuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleSet. -func (r *RuleSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &r.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleSetListResult. -func (r RuleSetListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleSetListResult. -func (r *RuleSetListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleSetProperties. -func (r RuleSetProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "deploymentStatus", r.DeploymentStatus) - populate(objectMap, "profileName", r.ProfileName) - populate(objectMap, "provisioningState", r.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleSetProperties. -func (r *RuleSetProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &r.DeploymentStatus) - delete(rawMsg, key) - case "profileName": - err = unpopulate(val, "ProfileName", &r.ProfileName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleUpdateParameters. -func (r RuleUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleUpdateParameters. -func (r *RuleUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleUpdatePropertiesParameters. -func (r RuleUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "actions", r.Actions) - populate(objectMap, "conditions", r.Conditions) - populate(objectMap, "matchProcessingBehavior", r.MatchProcessingBehavior) - populate(objectMap, "order", r.Order) - populate(objectMap, "ruleSetName", r.RuleSetName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleUpdatePropertiesParameters. -func (r *RuleUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actions": - r.Actions, err = unmarshalDeliveryRuleActionAutoGeneratedClassificationArray(val) - delete(rawMsg, key) - case "conditions": - r.Conditions, err = unmarshalDeliveryRuleConditionClassificationArray(val) - delete(rawMsg, key) - case "matchProcessingBehavior": - err = unpopulate(val, "MatchProcessingBehavior", &r.MatchProcessingBehavior) - delete(rawMsg, key) - case "order": - err = unpopulate(val, "Order", &r.Order) - delete(rawMsg, key) - case "ruleSetName": - err = unpopulate(val, "RuleSetName", &r.RuleSetName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKU. -func (s SKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", s.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. -func (s *SKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SSLProtocolMatchConditionParameters. -func (s SSLProtocolMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", s.MatchValues) - populate(objectMap, "negateCondition", s.NegateCondition) - populate(objectMap, "operator", s.Operator) - populate(objectMap, "transforms", s.Transforms) - populate(objectMap, "typeName", s.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SSLProtocolMatchConditionParameters. -func (s *SSLProtocolMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &s.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &s.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &s.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &s.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &s.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Secret. -func (s Secret) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Secret. -func (s *Secret) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecretListResult. -func (s SecretListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecretListResult. -func (s *SecretListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecretParameters. -func (s SecretParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["type"] = s.Type - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecretParameters. -func (s *SecretParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecretProperties. -func (s SecretProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "deploymentStatus", s.DeploymentStatus) - populate(objectMap, "parameters", s.Parameters) - populate(objectMap, "profileName", s.ProfileName) - populate(objectMap, "provisioningState", s.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecretProperties. -func (s *SecretProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &s.DeploymentStatus) - delete(rawMsg, key) - case "parameters": - s.Parameters, err = unmarshalSecretParametersClassification(val) - delete(rawMsg, key) - case "profileName": - err = unpopulate(val, "ProfileName", &s.ProfileName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPolicy. -func (s SecurityPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicy. -func (s *SecurityPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyListResult. -func (s SecurityPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyListResult. -func (s *SecurityPolicyListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyProperties. -func (s SecurityPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "deploymentStatus", s.DeploymentStatus) - populate(objectMap, "parameters", s.Parameters) - populate(objectMap, "profileName", s.ProfileName) - populate(objectMap, "provisioningState", s.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyProperties. -func (s *SecurityPolicyProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &s.DeploymentStatus) - delete(rawMsg, key) - case "parameters": - s.Parameters, err = unmarshalSecurityPolicyPropertiesParametersClassification(val) - delete(rawMsg, key) - case "profileName": - err = unpopulate(val, "ProfileName", &s.ProfileName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyPropertiesParameters. -func (s SecurityPolicyPropertiesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["type"] = s.Type - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyPropertiesParameters. -func (s *SecurityPolicyPropertiesParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyUpdateParameters. -func (s SecurityPolicyUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", s.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyUpdateParameters. -func (s *SecurityPolicyUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyUpdateProperties. -func (s SecurityPolicyUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "parameters", s.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyUpdateProperties. -func (s *SecurityPolicyUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "parameters": - s.Parameters, err = unmarshalSecurityPolicyPropertiesParametersClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyWebApplicationFirewallAssociation. -func (s SecurityPolicyWebApplicationFirewallAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "domains", s.Domains) - populate(objectMap, "patternsToMatch", s.PatternsToMatch) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyWebApplicationFirewallAssociation. -func (s *SecurityPolicyWebApplicationFirewallAssociation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "domains": - err = unpopulate(val, "Domains", &s.Domains) - delete(rawMsg, key) - case "patternsToMatch": - err = unpopulate(val, "PatternsToMatch", &s.PatternsToMatch) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyWebApplicationFirewallParameters. -func (s SecurityPolicyWebApplicationFirewallParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "associations", s.Associations) - objectMap["type"] = SecurityPolicyTypeWebApplicationFirewall - populate(objectMap, "wafPolicy", s.WafPolicy) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyWebApplicationFirewallParameters. -func (s *SecurityPolicyWebApplicationFirewallParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "associations": - err = unpopulate(val, "Associations", &s.Associations) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "wafPolicy": - err = unpopulate(val, "WafPolicy", &s.WafPolicy) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServerPortMatchConditionParameters. -func (s ServerPortMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", s.MatchValues) - populate(objectMap, "negateCondition", s.NegateCondition) - populate(objectMap, "operator", s.Operator) - populate(objectMap, "transforms", s.Transforms) - populate(objectMap, "typeName", s.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServerPortMatchConditionParameters. -func (s *ServerPortMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &s.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &s.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &s.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &s.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &s.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. -func (s ServiceSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "logSpecifications", s.LogSpecifications) - populate(objectMap, "metricSpecifications", s.MetricSpecifications) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. -func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "logSpecifications": - err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) - delete(rawMsg, key) - case "metricSpecifications": - err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResourceProperties. -func (s SharedPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "groupId", s.GroupID) - populate(objectMap, "privateLink", s.PrivateLink) - populate(objectMap, "privateLinkLocation", s.PrivateLinkLocation) - populate(objectMap, "requestMessage", s.RequestMessage) - populate(objectMap, "status", s.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceProperties. -func (s *SharedPrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupId": - err = unpopulate(val, "GroupID", &s.GroupID) - delete(rawMsg, key) - case "privateLink": - err = unpopulate(val, "PrivateLink", &s.PrivateLink) - delete(rawMsg, key) - case "privateLinkLocation": - err = unpopulate(val, "PrivateLinkLocation", &s.PrivateLinkLocation) - delete(rawMsg, key) - case "requestMessage": - err = unpopulate(val, "RequestMessage", &s.RequestMessage) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SocketAddrMatchConditionParameters. -func (s SocketAddrMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", s.MatchValues) - populate(objectMap, "negateCondition", s.NegateCondition) - populate(objectMap, "operator", s.Operator) - populate(objectMap, "transforms", s.Transforms) - populate(objectMap, "typeName", s.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SocketAddrMatchConditionParameters. -func (s *SocketAddrMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &s.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &s.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &s.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &s.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &s.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SsoURI. -func (s SsoURI) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "ssoUriValue", s.SsoURIValue) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SsoURI. -func (s *SsoURI) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ssoUriValue": - err = unpopulate(val, "SsoURIValue", &s.SsoURIValue) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SupportedOptimizationTypesListResult. -func (s SupportedOptimizationTypesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "supportedOptimizationTypes", s.SupportedOptimizationTypes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOptimizationTypesListResult. -func (s *SupportedOptimizationTypesListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "supportedOptimizationTypes": - err = unpopulate(val, "SupportedOptimizationTypes", &s.SupportedOptimizationTypes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TrackedResource. -func (t TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", t.ID) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - populate(objectMap, "systemData", t.SystemData) - populate(objectMap, "tags", t.Tags) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource. -func (t *TrackedResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &t.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &t.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &t.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLFileExtensionMatchConditionParameters. -func (u URLFileExtensionMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", u.MatchValues) - populate(objectMap, "negateCondition", u.NegateCondition) - populate(objectMap, "operator", u.Operator) - populate(objectMap, "transforms", u.Transforms) - populate(objectMap, "typeName", u.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLFileExtensionMatchConditionParameters. -func (u *URLFileExtensionMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &u.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &u.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &u.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &u.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &u.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLFileNameMatchConditionParameters. -func (u URLFileNameMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", u.MatchValues) - populate(objectMap, "negateCondition", u.NegateCondition) - populate(objectMap, "operator", u.Operator) - populate(objectMap, "transforms", u.Transforms) - populate(objectMap, "typeName", u.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLFileNameMatchConditionParameters. -func (u *URLFileNameMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &u.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &u.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &u.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &u.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &u.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLPathMatchConditionParameters. -func (u URLPathMatchConditionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "matchValues", u.MatchValues) - populate(objectMap, "negateCondition", u.NegateCondition) - populate(objectMap, "operator", u.Operator) - populate(objectMap, "transforms", u.Transforms) - populate(objectMap, "typeName", u.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLPathMatchConditionParameters. -func (u *URLPathMatchConditionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &u.MatchValues) - delete(rawMsg, key) - case "negateCondition": - err = unpopulate(val, "NegateCondition", &u.NegateCondition) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &u.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &u.Transforms) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &u.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLRedirectAction. -func (u URLRedirectAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = DeliveryRuleActionURLRedirect - populate(objectMap, "parameters", u.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLRedirectAction. -func (u *URLRedirectAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &u.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &u.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLRedirectActionParameters. -func (u URLRedirectActionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "customFragment", u.CustomFragment) - populate(objectMap, "customHostname", u.CustomHostname) - populate(objectMap, "customPath", u.CustomPath) - populate(objectMap, "customQueryString", u.CustomQueryString) - populate(objectMap, "destinationProtocol", u.DestinationProtocol) - populate(objectMap, "redirectType", u.RedirectType) - populate(objectMap, "typeName", u.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLRedirectActionParameters. -func (u *URLRedirectActionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customFragment": - err = unpopulate(val, "CustomFragment", &u.CustomFragment) - delete(rawMsg, key) - case "customHostname": - err = unpopulate(val, "CustomHostname", &u.CustomHostname) - delete(rawMsg, key) - case "customPath": - err = unpopulate(val, "CustomPath", &u.CustomPath) - delete(rawMsg, key) - case "customQueryString": - err = unpopulate(val, "CustomQueryString", &u.CustomQueryString) - delete(rawMsg, key) - case "destinationProtocol": - err = unpopulate(val, "DestinationProtocol", &u.DestinationProtocol) - delete(rawMsg, key) - case "redirectType": - err = unpopulate(val, "RedirectType", &u.RedirectType) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &u.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLRewriteAction. -func (u URLRewriteAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = DeliveryRuleActionURLRewrite - populate(objectMap, "parameters", u.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLRewriteAction. -func (u *URLRewriteAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &u.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &u.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLRewriteActionParameters. -func (u URLRewriteActionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "destination", u.Destination) - populate(objectMap, "preserveUnmatchedPath", u.PreserveUnmatchedPath) - populate(objectMap, "sourcePattern", u.SourcePattern) - populate(objectMap, "typeName", u.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLRewriteActionParameters. -func (u *URLRewriteActionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destination": - err = unpopulate(val, "Destination", &u.Destination) - delete(rawMsg, key) - case "preserveUnmatchedPath": - err = unpopulate(val, "PreserveUnmatchedPath", &u.PreserveUnmatchedPath) - delete(rawMsg, key) - case "sourcePattern": - err = unpopulate(val, "SourcePattern", &u.SourcePattern) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &u.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLSigningAction. -func (u URLSigningAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["name"] = DeliveryRuleActionURLSigning - populate(objectMap, "parameters", u.Parameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningAction. -func (u *URLSigningAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &u.Name) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &u.Parameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLSigningActionParameters. -func (u URLSigningActionParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "algorithm", u.Algorithm) - populate(objectMap, "parameterNameOverride", u.ParameterNameOverride) - populate(objectMap, "typeName", u.TypeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningActionParameters. -func (u *URLSigningActionParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "algorithm": - err = unpopulate(val, "Algorithm", &u.Algorithm) - delete(rawMsg, key) - case "parameterNameOverride": - err = unpopulate(val, "ParameterNameOverride", &u.ParameterNameOverride) - delete(rawMsg, key) - case "typeName": - err = unpopulate(val, "TypeName", &u.TypeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLSigningKey. -func (u URLSigningKey) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "keyId", u.KeyID) - populate(objectMap, "keySourceParameters", u.KeySourceParameters) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningKey. -func (u *URLSigningKey) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "keyId": - err = unpopulate(val, "KeyID", &u.KeyID) - delete(rawMsg, key) - case "keySourceParameters": - err = unpopulate(val, "KeySourceParameters", &u.KeySourceParameters) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLSigningKeyParameters. -func (u URLSigningKeyParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "keyId", u.KeyID) - populate(objectMap, "secretSource", u.SecretSource) - populate(objectMap, "secretVersion", u.SecretVersion) - objectMap["type"] = SecretTypeURLSigningKey - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningKeyParameters. -func (u *URLSigningKeyParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "keyId": - err = unpopulate(val, "KeyID", &u.KeyID) - delete(rawMsg, key) - case "secretSource": - err = unpopulate(val, "SecretSource", &u.SecretSource) - delete(rawMsg, key) - case "secretVersion": - err = unpopulate(val, "SecretVersion", &u.SecretVersion) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &u.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URLSigningParamIdentifier. -func (u URLSigningParamIdentifier) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "paramIndicator", u.ParamIndicator) - populate(objectMap, "paramName", u.ParamName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningParamIdentifier. -func (u *URLSigningParamIdentifier) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "paramIndicator": - err = unpopulate(val, "ParamIndicator", &u.ParamIndicator) - delete(rawMsg, key) - case "paramName": - err = unpopulate(val, "ParamName", &u.ParamName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Usage. -func (u Usage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "currentValue", u.CurrentValue) - populate(objectMap, "id", u.ID) - populate(objectMap, "limit", u.Limit) - populate(objectMap, "name", u.Name) - populate(objectMap, "unit", u.Unit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Usage. -func (u *Usage) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentValue": - err = unpopulate(val, "CurrentValue", &u.CurrentValue) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &u.ID) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &u.Limit) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &u.Name) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &u.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UsageName. -func (u UsageName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "localizedValue", u.LocalizedValue) - populate(objectMap, "value", u.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UsageName. -func (u *UsageName) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "localizedValue": - err = unpopulate(val, "LocalizedValue", &u.LocalizedValue) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &u.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UsagesListResult. -func (u UsagesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", u.NextLink) - populate(objectMap, "value", u.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UsagesListResult. -func (u *UsagesListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &u.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &u.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserManagedHTTPSParameters. -func (u UserManagedHTTPSParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - objectMap["certificateSource"] = CertificateSourceAzureKeyVault - populate(objectMap, "certificateSourceParameters", u.CertificateSourceParameters) - populate(objectMap, "minimumTlsVersion", u.MinimumTLSVersion) - populate(objectMap, "protocolType", u.ProtocolType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserManagedHTTPSParameters. -func (u *UserManagedHTTPSParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificateSource": - err = unpopulate(val, "CertificateSource", &u.CertificateSource) - delete(rawMsg, key) - case "certificateSourceParameters": - err = unpopulate(val, "CertificateSourceParameters", &u.CertificateSourceParameters) - delete(rawMsg, key) - case "minimumTlsVersion": - err = unpopulate(val, "MinimumTLSVersion", &u.MinimumTLSVersion) - delete(rawMsg, key) - case "protocolType": - err = unpopulate(val, "ProtocolType", &u.ProtocolType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ValidateCustomDomainInput. -func (v ValidateCustomDomainInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "hostName", v.HostName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateCustomDomainInput. -func (v *ValidateCustomDomainInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "hostName": - err = unpopulate(val, "HostName", &v.HostName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ValidateCustomDomainOutput. -func (v ValidateCustomDomainOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "customDomainValidated", v.CustomDomainValidated) - populate(objectMap, "message", v.Message) - populate(objectMap, "reason", v.Reason) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateCustomDomainOutput. -func (v *ValidateCustomDomainOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customDomainValidated": - err = unpopulate(val, "CustomDomainValidated", &v.CustomDomainValidated) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &v.Message) - delete(rawMsg, key) - case "reason": - err = unpopulate(val, "Reason", &v.Reason) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ValidateProbeInput. -func (v ValidateProbeInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "probeURL", v.ProbeURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateProbeInput. -func (v *ValidateProbeInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "probeURL": - err = unpopulate(val, "ProbeURL", &v.ProbeURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ValidateProbeOutput. -func (v ValidateProbeOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "errorCode", v.ErrorCode) - populate(objectMap, "isValid", v.IsValid) - populate(objectMap, "message", v.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateProbeOutput. -func (v *ValidateProbeOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "errorCode": - err = unpopulate(val, "ErrorCode", &v.ErrorCode) - delete(rawMsg, key) - case "isValid": - err = unpopulate(val, "IsValid", &v.IsValid) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &v.Message) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ValidateSecretInput. -func (v ValidateSecretInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "secretSource", v.SecretSource) - populate(objectMap, "secretType", v.SecretType) - populate(objectMap, "secretVersion", v.SecretVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateSecretInput. -func (v *ValidateSecretInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "secretSource": - err = unpopulate(val, "SecretSource", &v.SecretSource) - delete(rawMsg, key) - case "secretType": - err = unpopulate(val, "SecretType", &v.SecretType) - delete(rawMsg, key) - case "secretVersion": - err = unpopulate(val, "SecretVersion", &v.SecretVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ValidateSecretOutput. -func (v ValidateSecretOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "message", v.Message) - populate(objectMap, "status", v.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateSecretOutput. -func (v *ValidateSecretOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "message": - err = unpopulate(val, "Message", &v.Message) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &v.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ValidationToken. -func (v ValidationToken) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "token", v.Token) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ValidationToken. -func (v *ValidationToken) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "token": - err = unpopulate(val, "Token", &v.Token) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WafMetricsResponse. -func (w WafMetricsResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "dateTimeBegin", w.DateTimeBegin) - populateTimeRFC3339(objectMap, "dateTimeEnd", w.DateTimeEnd) - populate(objectMap, "granularity", w.Granularity) - populate(objectMap, "series", w.Series) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WafMetricsResponse. -func (w *WafMetricsResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dateTimeBegin": - err = unpopulateTimeRFC3339(val, "DateTimeBegin", &w.DateTimeBegin) - delete(rawMsg, key) - case "dateTimeEnd": - err = unpopulateTimeRFC3339(val, "DateTimeEnd", &w.DateTimeEnd) - delete(rawMsg, key) - case "granularity": - err = unpopulate(val, "Granularity", &w.Granularity) - delete(rawMsg, key) - case "series": - err = unpopulate(val, "Series", &w.Series) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WafMetricsResponseSeriesItem. -func (w WafMetricsResponseSeriesItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "data", w.Data) - populate(objectMap, "groups", w.Groups) - populate(objectMap, "metric", w.Metric) - populate(objectMap, "unit", w.Unit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WafMetricsResponseSeriesItem. -func (w *WafMetricsResponseSeriesItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "data": - err = unpopulate(val, "Data", &w.Data) - delete(rawMsg, key) - case "groups": - err = unpopulate(val, "Groups", &w.Groups) - delete(rawMsg, key) - case "metric": - err = unpopulate(val, "Metric", &w.Metric) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &w.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WafMetricsResponseSeriesPropertiesItemsItem. -func (w WafMetricsResponseSeriesPropertiesItemsItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", w.Name) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WafMetricsResponseSeriesPropertiesItemsItem. -func (w *WafMetricsResponseSeriesPropertiesItemsItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &w.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WafRankingsResponse. -func (w WafRankingsResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "data", w.Data) - populateTimeRFC3339(objectMap, "dateTimeBegin", w.DateTimeBegin) - populateTimeRFC3339(objectMap, "dateTimeEnd", w.DateTimeEnd) - populate(objectMap, "groups", w.Groups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WafRankingsResponse. -func (w *WafRankingsResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "data": - err = unpopulate(val, "Data", &w.Data) - delete(rawMsg, key) - case "dateTimeBegin": - err = unpopulateTimeRFC3339(val, "DateTimeBegin", &w.DateTimeBegin) - delete(rawMsg, key) - case "dateTimeEnd": - err = unpopulateTimeRFC3339(val, "DateTimeEnd", &w.DateTimeEnd) - delete(rawMsg, key) - case "groups": - err = unpopulate(val, "Groups", &w.Groups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WafRankingsResponseDataItem. -func (w WafRankingsResponseDataItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "groupValues", w.GroupValues) - populate(objectMap, "metrics", w.Metrics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WafRankingsResponseDataItem. -func (w *WafRankingsResponseDataItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupValues": - err = unpopulate(val, "GroupValues", &w.GroupValues) - delete(rawMsg, key) - case "metrics": - err = unpopulate(val, "Metrics", &w.Metrics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicy. -func (w WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "etag", w.Etag) - populate(objectMap, "id", w.ID) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "sku", w.SKU) - populate(objectMap, "systemData", w.SystemData) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicy. -func (w *WebApplicationFirewallPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &w.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &w.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &w.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &w.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &w.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &w.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &w.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyList. -func (w WebApplicationFirewallPolicyList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", w.NextLink) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyList. -func (w *WebApplicationFirewallPolicyList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &w.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &w.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyPatchParameters. -func (w WebApplicationFirewallPolicyPatchParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "tags", w.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyPatchParameters. -func (w *WebApplicationFirewallPolicyPatchParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "tags": - err = unpopulate(val, "Tags", &w.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyProperties. -func (w WebApplicationFirewallPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "customRules", w.CustomRules) - populate(objectMap, "endpointLinks", w.EndpointLinks) - populate(objectMap, "managedRules", w.ManagedRules) - populate(objectMap, "policySettings", w.PolicySettings) - populate(objectMap, "provisioningState", w.ProvisioningState) - populate(objectMap, "rateLimitRules", w.RateLimitRules) - populate(objectMap, "resourceState", w.ResourceState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyProperties. -func (w *WebApplicationFirewallPolicyProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customRules": - err = unpopulate(val, "CustomRules", &w.CustomRules) - delete(rawMsg, key) - case "endpointLinks": - err = unpopulate(val, "EndpointLinks", &w.EndpointLinks) - delete(rawMsg, key) - case "managedRules": - err = unpopulate(val, "ManagedRules", &w.ManagedRules) - delete(rawMsg, key) - case "policySettings": - err = unpopulate(val, "PolicySettings", &w.PolicySettings) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) - delete(rawMsg, key) - case "rateLimitRules": - err = unpopulate(val, "RateLimitRules", &w.RateLimitRules) - delete(rawMsg, key) - case "resourceState": - err = unpopulate(val, "ResourceState", &w.ResourceState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -func populate(m map[string]any, k string, v any) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func populateAny(m map[string]any, k string, v any) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v any) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/operations_client.go deleted file mode 100644 index d89f71bd..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/operations_client.go +++ /dev/null @@ -1,94 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - internal *arm.Client -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - internal: cl, - } - return client, nil -} - -// NewListPager - Lists all of the available CDN REST API operations. -// -// Generated from API version 2021-06-01 -// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Cdn/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationsListResult); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/polymorphic_helpers.go deleted file mode 100644 index 98c7c45c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/polymorphic_helpers.go +++ /dev/null @@ -1,200 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import "encoding/json" - -func unmarshalCustomDomainHTTPSParametersClassification(rawMsg json.RawMessage) (CustomDomainHTTPSParametersClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b CustomDomainHTTPSParametersClassification - switch m["certificateSource"] { - case string(CertificateSourceAzureKeyVault): - b = &UserManagedHTTPSParameters{} - case string(CertificateSourceCdn): - b = &ManagedHTTPSParameters{} - default: - b = &CustomDomainHTTPSParameters{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalDeliveryRuleActionAutoGeneratedClassification(rawMsg json.RawMessage) (DeliveryRuleActionAutoGeneratedClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b DeliveryRuleActionAutoGeneratedClassification - switch m["name"] { - case string(DeliveryRuleActionCacheExpiration): - b = &DeliveryRuleCacheExpirationAction{} - case string(DeliveryRuleActionCacheKeyQueryString): - b = &DeliveryRuleCacheKeyQueryStringAction{} - case string(DeliveryRuleActionModifyRequestHeader): - b = &DeliveryRuleRequestHeaderAction{} - case string(DeliveryRuleActionModifyResponseHeader): - b = &DeliveryRuleResponseHeaderAction{} - case string(DeliveryRuleActionOriginGroupOverride): - b = &OriginGroupOverrideAction{} - case string(DeliveryRuleActionRouteConfigurationOverride): - b = &DeliveryRuleRouteConfigurationOverrideAction{} - case string(DeliveryRuleActionURLRedirect): - b = &URLRedirectAction{} - case string(DeliveryRuleActionURLRewrite): - b = &URLRewriteAction{} - case string(DeliveryRuleActionURLSigning): - b = &URLSigningAction{} - default: - b = &DeliveryRuleActionAutoGenerated{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalDeliveryRuleActionAutoGeneratedClassificationArray(rawMsg json.RawMessage) ([]DeliveryRuleActionAutoGeneratedClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]DeliveryRuleActionAutoGeneratedClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalDeliveryRuleActionAutoGeneratedClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalDeliveryRuleConditionClassification(rawMsg json.RawMessage) (DeliveryRuleConditionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b DeliveryRuleConditionClassification - switch m["name"] { - case string(MatchVariableClientPort): - b = &DeliveryRuleClientPortCondition{} - case string(MatchVariableCookies): - b = &DeliveryRuleCookiesCondition{} - case string(MatchVariableHostName): - b = &DeliveryRuleHostNameCondition{} - case string(MatchVariableHTTPVersion): - b = &DeliveryRuleHTTPVersionCondition{} - case string(MatchVariableIsDevice): - b = &DeliveryRuleIsDeviceCondition{} - case string(MatchVariablePostArgs): - b = &DeliveryRulePostArgsCondition{} - case string(MatchVariableQueryString): - b = &DeliveryRuleQueryStringCondition{} - case string(MatchVariableRemoteAddress): - b = &DeliveryRuleRemoteAddressCondition{} - case string(MatchVariableRequestBody): - b = &DeliveryRuleRequestBodyCondition{} - case string(MatchVariableRequestHeader): - b = &DeliveryRuleRequestHeaderCondition{} - case string(MatchVariableRequestMethod): - b = &DeliveryRuleRequestMethodCondition{} - case string(MatchVariableRequestScheme): - b = &DeliveryRuleRequestSchemeCondition{} - case string(MatchVariableRequestURI): - b = &DeliveryRuleRequestURICondition{} - case string(MatchVariableServerPort): - b = &DeliveryRuleServerPortCondition{} - case string(MatchVariableSocketAddr): - b = &DeliveryRuleSocketAddrCondition{} - case string(MatchVariableSSLProtocol): - b = &DeliveryRuleSSLProtocolCondition{} - case string(MatchVariableURLFileExtension): - b = &DeliveryRuleURLFileExtensionCondition{} - case string(MatchVariableURLFileName): - b = &DeliveryRuleURLFileNameCondition{} - case string(MatchVariableURLPath): - b = &DeliveryRuleURLPathCondition{} - default: - b = &DeliveryRuleCondition{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalDeliveryRuleConditionClassificationArray(rawMsg json.RawMessage) ([]DeliveryRuleConditionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]DeliveryRuleConditionClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalDeliveryRuleConditionClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalSecretParametersClassification(rawMsg json.RawMessage) (SecretParametersClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b SecretParametersClassification - switch m["type"] { - case string(SecretTypeAzureFirstPartyManagedCertificate): - b = &AzureFirstPartyManagedCertificateParameters{} - case string(SecretTypeCustomerCertificate): - b = &CustomerCertificateParameters{} - case string(SecretTypeManagedCertificate): - b = &ManagedCertificateParameters{} - case string(SecretTypeURLSigningKey): - b = &URLSigningKeyParameters{} - default: - b = &SecretParameters{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalSecurityPolicyPropertiesParametersClassification(rawMsg json.RawMessage) (SecurityPolicyPropertiesParametersClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b SecurityPolicyPropertiesParametersClassification - switch m["type"] { - case string(SecurityPolicyTypeWebApplicationFirewall): - b = &SecurityPolicyWebApplicationFirewallParameters{} - default: - b = &SecurityPolicyPropertiesParameters{} - } - return b, json.Unmarshal(rawMsg, b) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/profiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/profiles_client.go deleted file mode 100644 index 9e550702..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/profiles_client.go +++ /dev/null @@ -1,626 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProfilesClient contains the methods for the Profiles group. -// Don't use this type directly, use NewProfilesClient() instead. -type ProfilesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewProfilesClient creates a new instance of ProfilesClient with the specified values. -// - subscriptionID - Azure Subscription ID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProfilesClient, error) { - cl, err := arm.NewClient(moduleName+".ProfilesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ProfilesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreate - Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under -// the specified subscription and resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the -// resource group. -// - profile - Profile properties needed to create a new profile. -// - options - ProfilesClientBeginCreateOptions contains the optional parameters for the ProfilesClient.BeginCreate method. -func (client *ProfilesClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, profile Profile, options *ProfilesClientBeginCreateOptions) (*runtime.Poller[ProfilesClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, profileName, profile, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ProfilesClientCreateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ProfilesClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Create - Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the -// specified subscription and resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *ProfilesClient) create(ctx context.Context, resourceGroupName string, profileName string, profile Profile, options *ProfilesClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, profile, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ProfilesClient) createCreateRequest(ctx context.Context, resourceGroupName string, profileName string, profile Profile, options *ProfilesClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, profile) -} - -// BeginDelete - Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified -// parameters. Deleting a profile will result in the deletion of all of the sub-resources -// including endpoints, origins and custom domains. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the -// resource group. -// - options - ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. -func (client *ProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientBeginDeleteOptions) (*runtime.Poller[ProfilesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, profileName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ProfilesClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ProfilesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified parameters. -// Deleting a profile will result in the deletion of all of the sub-resources -// including endpoints, origins and custom domains. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *ProfilesClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ProfilesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GenerateSsoURI - Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used -// to configure advanced feature capabilities that are not yet available in the Azure portal, such -// as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium -// profile. The SSO URI changes approximately every 10 minutes. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the CDN profile which is unique within the resource group. -// - options - ProfilesClientGenerateSsoURIOptions contains the optional parameters for the ProfilesClient.GenerateSsoURI method. -func (client *ProfilesClient) GenerateSsoURI(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGenerateSsoURIOptions) (ProfilesClientGenerateSsoURIResponse, error) { - req, err := client.generateSsoURICreateRequest(ctx, resourceGroupName, profileName, options) - if err != nil { - return ProfilesClientGenerateSsoURIResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProfilesClientGenerateSsoURIResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientGenerateSsoURIResponse{}, runtime.NewResponseError(resp) - } - return client.generateSsoURIHandleResponse(resp) -} - -// generateSsoURICreateRequest creates the GenerateSsoURI request. -func (client *ProfilesClient) generateSsoURICreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGenerateSsoURIOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// generateSsoURIHandleResponse handles the GenerateSsoURI response. -func (client *ProfilesClient) generateSsoURIHandleResponse(resp *http.Response) (ProfilesClientGenerateSsoURIResponse, error) { - result := ProfilesClientGenerateSsoURIResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SsoURI); err != nil { - return ProfilesClientGenerateSsoURIResponse{}, err - } - return result, nil -} - -// Get - Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under -// the specified subscription and resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the -// resource group. -// - options - ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. -func (client *ProfilesClient) Get(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGetOptions) (ProfilesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, options) - if err != nil { - return ProfilesClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProfilesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProfilesClient) getCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProfilesClient) getHandleResponse(resp *http.Response) (ProfilesClientGetResponse, error) { - result := ProfilesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { - return ProfilesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription. -// -// Generated from API version 2021-06-01 -// - options - ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method. -func (client *ProfilesClient) NewListPager(options *ProfilesClientListOptions) *runtime.Pager[ProfilesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ProfilesClientListResponse]{ - More: func(page ProfilesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProfilesClientListResponse) (ProfilesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProfilesClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProfilesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ProfilesClient) listCreateRequest(ctx context.Context, options *ProfilesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ProfilesClient) listHandleResponse(resp *http.Response) (ProfilesClientListResponse, error) { - result := ProfilesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProfileListResult); err != nil { - return ProfilesClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within -// a resource group. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - options - ProfilesClientListByResourceGroupOptions contains the optional parameters for the ProfilesClient.NewListByResourceGroupPager -// method. -func (client *ProfilesClient) NewListByResourceGroupPager(resourceGroupName string, options *ProfilesClientListByResourceGroupOptions) *runtime.Pager[ProfilesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ProfilesClientListByResourceGroupResponse]{ - More: func(page ProfilesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProfilesClientListByResourceGroupResponse) (ProfilesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProfilesClientListByResourceGroupResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProfilesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ProfilesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ProfilesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ProfilesClient) listByResourceGroupHandleResponse(resp *http.Response) (ProfilesClientListByResourceGroupResponse, error) { - result := ProfilesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProfileListResult); err != nil { - return ProfilesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListResourceUsagePager - Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or -// Azure Front Door Premium or CDN profile. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the -// resource group. -// - options - ProfilesClientListResourceUsageOptions contains the optional parameters for the ProfilesClient.NewListResourceUsagePager -// method. -func (client *ProfilesClient) NewListResourceUsagePager(resourceGroupName string, profileName string, options *ProfilesClientListResourceUsageOptions) *runtime.Pager[ProfilesClientListResourceUsageResponse] { - return runtime.NewPager(runtime.PagingHandler[ProfilesClientListResourceUsageResponse]{ - More: func(page ProfilesClientListResourceUsageResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProfilesClientListResourceUsageResponse) (ProfilesClientListResourceUsageResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProfilesClientListResourceUsageResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProfilesClientListResourceUsageResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientListResourceUsageResponse{}, runtime.NewResponseError(resp) - } - return client.listResourceUsageHandleResponse(resp) - }, - }) -} - -// listResourceUsageCreateRequest creates the ListResourceUsage request. -func (client *ProfilesClient) listResourceUsageCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientListResourceUsageOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listResourceUsageHandleResponse handles the ListResourceUsage response. -func (client *ProfilesClient) listResourceUsageHandleResponse(resp *http.Response) (ProfilesClientListResourceUsageResponse, error) { - result := ProfilesClientListResourceUsageResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceUsageListResult); err != nil { - return ProfilesClientListResourceUsageResponse{}, err - } - return result, nil -} - -// ListSupportedOptimizationTypes - Gets the supported optimization types for the current profile. A user can create an endpoint -// with an optimization type from the listed values. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the -// resource group. -// - options - ProfilesClientListSupportedOptimizationTypesOptions contains the optional parameters for the ProfilesClient.ListSupportedOptimizationTypes -// method. -func (client *ProfilesClient) ListSupportedOptimizationTypes(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientListSupportedOptimizationTypesOptions) (ProfilesClientListSupportedOptimizationTypesResponse, error) { - req, err := client.listSupportedOptimizationTypesCreateRequest(ctx, resourceGroupName, profileName, options) - if err != nil { - return ProfilesClientListSupportedOptimizationTypesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProfilesClientListSupportedOptimizationTypesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientListSupportedOptimizationTypesResponse{}, runtime.NewResponseError(resp) - } - return client.listSupportedOptimizationTypesHandleResponse(resp) -} - -// listSupportedOptimizationTypesCreateRequest creates the ListSupportedOptimizationTypes request. -func (client *ProfilesClient) listSupportedOptimizationTypesCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientListSupportedOptimizationTypesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSupportedOptimizationTypesHandleResponse handles the ListSupportedOptimizationTypes response. -func (client *ProfilesClient) listSupportedOptimizationTypesHandleResponse(resp *http.Response) (ProfilesClientListSupportedOptimizationTypesResponse, error) { - result := ProfilesClientListSupportedOptimizationTypesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SupportedOptimizationTypesListResult); err != nil { - return ProfilesClientListSupportedOptimizationTypesResponse{}, err - } - return result, nil -} - -// BeginUpdate - Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified -// profile name under the specified subscription and resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the -// resource group. -// - profileUpdateParameters - Profile properties needed to update an existing profile. -// - options - ProfilesClientBeginUpdateOptions contains the optional parameters for the ProfilesClient.BeginUpdate method. -func (client *ProfilesClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, options *ProfilesClientBeginUpdateOptions) (*runtime.Poller[ProfilesClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, profileName, profileUpdateParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ProfilesClientUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ProfilesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Update - Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile -// name under the specified subscription and resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *ProfilesClient) update(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, options *ProfilesClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, profileUpdateParameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ProfilesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, options *ProfilesClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, profileUpdateParameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/response_types.go deleted file mode 100644 index bfeacbe7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/response_types.go +++ /dev/null @@ -1,545 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -// AFDCustomDomainsClientCreateResponse contains the response from method AFDCustomDomainsClient.BeginCreate. -type AFDCustomDomainsClientCreateResponse struct { - AFDDomain -} - -// AFDCustomDomainsClientDeleteResponse contains the response from method AFDCustomDomainsClient.BeginDelete. -type AFDCustomDomainsClientDeleteResponse struct { - // placeholder for future response values -} - -// AFDCustomDomainsClientGetResponse contains the response from method AFDCustomDomainsClient.Get. -type AFDCustomDomainsClientGetResponse struct { - AFDDomain -} - -// AFDCustomDomainsClientListByProfileResponse contains the response from method AFDCustomDomainsClient.NewListByProfilePager. -type AFDCustomDomainsClientListByProfileResponse struct { - AFDDomainListResult -} - -// AFDCustomDomainsClientRefreshValidationTokenResponse contains the response from method AFDCustomDomainsClient.BeginRefreshValidationToken. -type AFDCustomDomainsClientRefreshValidationTokenResponse struct { - // placeholder for future response values -} - -// AFDCustomDomainsClientUpdateResponse contains the response from method AFDCustomDomainsClient.BeginUpdate. -type AFDCustomDomainsClientUpdateResponse struct { - AFDDomain -} - -// AFDEndpointsClientCreateResponse contains the response from method AFDEndpointsClient.BeginCreate. -type AFDEndpointsClientCreateResponse struct { - AFDEndpoint -} - -// AFDEndpointsClientDeleteResponse contains the response from method AFDEndpointsClient.BeginDelete. -type AFDEndpointsClientDeleteResponse struct { - // placeholder for future response values -} - -// AFDEndpointsClientGetResponse contains the response from method AFDEndpointsClient.Get. -type AFDEndpointsClientGetResponse struct { - AFDEndpoint -} - -// AFDEndpointsClientListByProfileResponse contains the response from method AFDEndpointsClient.NewListByProfilePager. -type AFDEndpointsClientListByProfileResponse struct { - AFDEndpointListResult -} - -// AFDEndpointsClientListResourceUsageResponse contains the response from method AFDEndpointsClient.NewListResourceUsagePager. -type AFDEndpointsClientListResourceUsageResponse struct { - UsagesListResult -} - -// AFDEndpointsClientPurgeContentResponse contains the response from method AFDEndpointsClient.BeginPurgeContent. -type AFDEndpointsClientPurgeContentResponse struct { - // placeholder for future response values -} - -// AFDEndpointsClientUpdateResponse contains the response from method AFDEndpointsClient.BeginUpdate. -type AFDEndpointsClientUpdateResponse struct { - AFDEndpoint -} - -// AFDEndpointsClientValidateCustomDomainResponse contains the response from method AFDEndpointsClient.ValidateCustomDomain. -type AFDEndpointsClientValidateCustomDomainResponse struct { - ValidateCustomDomainOutput -} - -// AFDOriginGroupsClientCreateResponse contains the response from method AFDOriginGroupsClient.BeginCreate. -type AFDOriginGroupsClientCreateResponse struct { - AFDOriginGroup -} - -// AFDOriginGroupsClientDeleteResponse contains the response from method AFDOriginGroupsClient.BeginDelete. -type AFDOriginGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// AFDOriginGroupsClientGetResponse contains the response from method AFDOriginGroupsClient.Get. -type AFDOriginGroupsClientGetResponse struct { - AFDOriginGroup -} - -// AFDOriginGroupsClientListByProfileResponse contains the response from method AFDOriginGroupsClient.NewListByProfilePager. -type AFDOriginGroupsClientListByProfileResponse struct { - AFDOriginGroupListResult -} - -// AFDOriginGroupsClientListResourceUsageResponse contains the response from method AFDOriginGroupsClient.NewListResourceUsagePager. -type AFDOriginGroupsClientListResourceUsageResponse struct { - UsagesListResult -} - -// AFDOriginGroupsClientUpdateResponse contains the response from method AFDOriginGroupsClient.BeginUpdate. -type AFDOriginGroupsClientUpdateResponse struct { - AFDOriginGroup -} - -// AFDOriginsClientCreateResponse contains the response from method AFDOriginsClient.BeginCreate. -type AFDOriginsClientCreateResponse struct { - AFDOrigin -} - -// AFDOriginsClientDeleteResponse contains the response from method AFDOriginsClient.BeginDelete. -type AFDOriginsClientDeleteResponse struct { - // placeholder for future response values -} - -// AFDOriginsClientGetResponse contains the response from method AFDOriginsClient.Get. -type AFDOriginsClientGetResponse struct { - AFDOrigin -} - -// AFDOriginsClientListByOriginGroupResponse contains the response from method AFDOriginsClient.NewListByOriginGroupPager. -type AFDOriginsClientListByOriginGroupResponse struct { - AFDOriginListResult -} - -// AFDOriginsClientUpdateResponse contains the response from method AFDOriginsClient.BeginUpdate. -type AFDOriginsClientUpdateResponse struct { - AFDOrigin -} - -// AFDProfilesClientCheckHostNameAvailabilityResponse contains the response from method AFDProfilesClient.CheckHostNameAvailability. -type AFDProfilesClientCheckHostNameAvailabilityResponse struct { - CheckNameAvailabilityOutput -} - -// AFDProfilesClientListResourceUsageResponse contains the response from method AFDProfilesClient.NewListResourceUsagePager. -type AFDProfilesClientListResourceUsageResponse struct { - UsagesListResult -} - -// CustomDomainsClientCreateResponse contains the response from method CustomDomainsClient.BeginCreate. -type CustomDomainsClientCreateResponse struct { - CustomDomain -} - -// CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.BeginDelete. -type CustomDomainsClientDeleteResponse struct { - CustomDomain -} - -// CustomDomainsClientDisableCustomHTTPSResponse contains the response from method CustomDomainsClient.DisableCustomHTTPS. -type CustomDomainsClientDisableCustomHTTPSResponse struct { - CustomDomain -} - -// CustomDomainsClientEnableCustomHTTPSResponse contains the response from method CustomDomainsClient.EnableCustomHTTPS. -type CustomDomainsClientEnableCustomHTTPSResponse struct { - CustomDomain -} - -// CustomDomainsClientGetResponse contains the response from method CustomDomainsClient.Get. -type CustomDomainsClientGetResponse struct { - CustomDomain -} - -// CustomDomainsClientListByEndpointResponse contains the response from method CustomDomainsClient.NewListByEndpointPager. -type CustomDomainsClientListByEndpointResponse struct { - CustomDomainListResult -} - -// EdgeNodesClientListResponse contains the response from method EdgeNodesClient.NewListPager. -type EdgeNodesClientListResponse struct { - EdgenodeResult -} - -// EndpointsClientCreateResponse contains the response from method EndpointsClient.BeginCreate. -type EndpointsClientCreateResponse struct { - Endpoint -} - -// EndpointsClientDeleteResponse contains the response from method EndpointsClient.BeginDelete. -type EndpointsClientDeleteResponse struct { - // placeholder for future response values -} - -// EndpointsClientGetResponse contains the response from method EndpointsClient.Get. -type EndpointsClientGetResponse struct { - Endpoint -} - -// EndpointsClientListByProfileResponse contains the response from method EndpointsClient.NewListByProfilePager. -type EndpointsClientListByProfileResponse struct { - EndpointListResult -} - -// EndpointsClientListResourceUsageResponse contains the response from method EndpointsClient.NewListResourceUsagePager. -type EndpointsClientListResourceUsageResponse struct { - ResourceUsageListResult -} - -// EndpointsClientLoadContentResponse contains the response from method EndpointsClient.BeginLoadContent. -type EndpointsClientLoadContentResponse struct { - // placeholder for future response values -} - -// EndpointsClientPurgeContentResponse contains the response from method EndpointsClient.BeginPurgeContent. -type EndpointsClientPurgeContentResponse struct { - // placeholder for future response values -} - -// EndpointsClientStartResponse contains the response from method EndpointsClient.BeginStart. -type EndpointsClientStartResponse struct { - Endpoint -} - -// EndpointsClientStopResponse contains the response from method EndpointsClient.BeginStop. -type EndpointsClientStopResponse struct { - Endpoint -} - -// EndpointsClientUpdateResponse contains the response from method EndpointsClient.BeginUpdate. -type EndpointsClientUpdateResponse struct { - Endpoint -} - -// EndpointsClientValidateCustomDomainResponse contains the response from method EndpointsClient.ValidateCustomDomain. -type EndpointsClientValidateCustomDomainResponse struct { - ValidateCustomDomainOutput -} - -// LogAnalyticsClientGetLogAnalyticsLocationsResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsLocations. -type LogAnalyticsClientGetLogAnalyticsLocationsResponse struct { - ContinentsResponse -} - -// LogAnalyticsClientGetLogAnalyticsMetricsResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsMetrics. -type LogAnalyticsClientGetLogAnalyticsMetricsResponse struct { - MetricsResponse -} - -// LogAnalyticsClientGetLogAnalyticsRankingsResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsRankings. -type LogAnalyticsClientGetLogAnalyticsRankingsResponse struct { - RankingsResponse -} - -// LogAnalyticsClientGetLogAnalyticsResourcesResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsResources. -type LogAnalyticsClientGetLogAnalyticsResourcesResponse struct { - ResourcesResponse -} - -// LogAnalyticsClientGetWafLogAnalyticsMetricsResponse contains the response from method LogAnalyticsClient.GetWafLogAnalyticsMetrics. -type LogAnalyticsClientGetWafLogAnalyticsMetricsResponse struct { - WafMetricsResponse -} - -// LogAnalyticsClientGetWafLogAnalyticsRankingsResponse contains the response from method LogAnalyticsClient.GetWafLogAnalyticsRankings. -type LogAnalyticsClientGetWafLogAnalyticsRankingsResponse struct { - WafRankingsResponse -} - -// ManagedRuleSetsClientListResponse contains the response from method ManagedRuleSetsClient.NewListPager. -type ManagedRuleSetsClientListResponse struct { - ManagedRuleSetDefinitionList -} - -// ManagementClientCheckEndpointNameAvailabilityResponse contains the response from method ManagementClient.CheckEndpointNameAvailability. -type ManagementClientCheckEndpointNameAvailabilityResponse struct { - CheckEndpointNameAvailabilityOutput -} - -// ManagementClientCheckNameAvailabilityResponse contains the response from method ManagementClient.CheckNameAvailability. -type ManagementClientCheckNameAvailabilityResponse struct { - CheckNameAvailabilityOutput -} - -// ManagementClientCheckNameAvailabilityWithSubscriptionResponse contains the response from method ManagementClient.CheckNameAvailabilityWithSubscription. -type ManagementClientCheckNameAvailabilityWithSubscriptionResponse struct { - CheckNameAvailabilityOutput -} - -// ManagementClientValidateProbeResponse contains the response from method ManagementClient.ValidateProbe. -type ManagementClientValidateProbeResponse struct { - ValidateProbeOutput -} - -// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. -type OperationsClientListResponse struct { - OperationsListResult -} - -// OriginGroupsClientCreateResponse contains the response from method OriginGroupsClient.BeginCreate. -type OriginGroupsClientCreateResponse struct { - OriginGroup -} - -// OriginGroupsClientDeleteResponse contains the response from method OriginGroupsClient.BeginDelete. -type OriginGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// OriginGroupsClientGetResponse contains the response from method OriginGroupsClient.Get. -type OriginGroupsClientGetResponse struct { - OriginGroup -} - -// OriginGroupsClientListByEndpointResponse contains the response from method OriginGroupsClient.NewListByEndpointPager. -type OriginGroupsClientListByEndpointResponse struct { - OriginGroupListResult -} - -// OriginGroupsClientUpdateResponse contains the response from method OriginGroupsClient.BeginUpdate. -type OriginGroupsClientUpdateResponse struct { - OriginGroup -} - -// OriginsClientCreateResponse contains the response from method OriginsClient.BeginCreate. -type OriginsClientCreateResponse struct { - Origin -} - -// OriginsClientDeleteResponse contains the response from method OriginsClient.BeginDelete. -type OriginsClientDeleteResponse struct { - // placeholder for future response values -} - -// OriginsClientGetResponse contains the response from method OriginsClient.Get. -type OriginsClientGetResponse struct { - Origin -} - -// OriginsClientListByEndpointResponse contains the response from method OriginsClient.NewListByEndpointPager. -type OriginsClientListByEndpointResponse struct { - OriginListResult -} - -// OriginsClientUpdateResponse contains the response from method OriginsClient.BeginUpdate. -type OriginsClientUpdateResponse struct { - Origin -} - -// PoliciesClientCreateOrUpdateResponse contains the response from method PoliciesClient.BeginCreateOrUpdate. -type PoliciesClientCreateOrUpdateResponse struct { - WebApplicationFirewallPolicy -} - -// PoliciesClientDeleteResponse contains the response from method PoliciesClient.Delete. -type PoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// PoliciesClientGetResponse contains the response from method PoliciesClient.Get. -type PoliciesClientGetResponse struct { - WebApplicationFirewallPolicy -} - -// PoliciesClientListResponse contains the response from method PoliciesClient.NewListPager. -type PoliciesClientListResponse struct { - WebApplicationFirewallPolicyList -} - -// PoliciesClientUpdateResponse contains the response from method PoliciesClient.BeginUpdate. -type PoliciesClientUpdateResponse struct { - WebApplicationFirewallPolicy -} - -// ProfilesClientCreateResponse contains the response from method ProfilesClient.BeginCreate. -type ProfilesClientCreateResponse struct { - Profile -} - -// ProfilesClientDeleteResponse contains the response from method ProfilesClient.BeginDelete. -type ProfilesClientDeleteResponse struct { - // placeholder for future response values -} - -// ProfilesClientGenerateSsoURIResponse contains the response from method ProfilesClient.GenerateSsoURI. -type ProfilesClientGenerateSsoURIResponse struct { - SsoURI -} - -// ProfilesClientGetResponse contains the response from method ProfilesClient.Get. -type ProfilesClientGetResponse struct { - Profile -} - -// ProfilesClientListByResourceGroupResponse contains the response from method ProfilesClient.NewListByResourceGroupPager. -type ProfilesClientListByResourceGroupResponse struct { - ProfileListResult -} - -// ProfilesClientListResourceUsageResponse contains the response from method ProfilesClient.NewListResourceUsagePager. -type ProfilesClientListResourceUsageResponse struct { - ResourceUsageListResult -} - -// ProfilesClientListResponse contains the response from method ProfilesClient.NewListPager. -type ProfilesClientListResponse struct { - ProfileListResult -} - -// ProfilesClientListSupportedOptimizationTypesResponse contains the response from method ProfilesClient.ListSupportedOptimizationTypes. -type ProfilesClientListSupportedOptimizationTypesResponse struct { - SupportedOptimizationTypesListResult -} - -// ProfilesClientUpdateResponse contains the response from method ProfilesClient.BeginUpdate. -type ProfilesClientUpdateResponse struct { - Profile -} - -// ResourceUsageClientListResponse contains the response from method ResourceUsageClient.NewListPager. -type ResourceUsageClientListResponse struct { - ResourceUsageListResult -} - -// RoutesClientCreateResponse contains the response from method RoutesClient.BeginCreate. -type RoutesClientCreateResponse struct { - Route -} - -// RoutesClientDeleteResponse contains the response from method RoutesClient.BeginDelete. -type RoutesClientDeleteResponse struct { - // placeholder for future response values -} - -// RoutesClientGetResponse contains the response from method RoutesClient.Get. -type RoutesClientGetResponse struct { - Route -} - -// RoutesClientListByEndpointResponse contains the response from method RoutesClient.NewListByEndpointPager. -type RoutesClientListByEndpointResponse struct { - RouteListResult -} - -// RoutesClientUpdateResponse contains the response from method RoutesClient.BeginUpdate. -type RoutesClientUpdateResponse struct { - Route -} - -// RuleSetsClientCreateResponse contains the response from method RuleSetsClient.Create. -type RuleSetsClientCreateResponse struct { - RuleSet -} - -// RuleSetsClientDeleteResponse contains the response from method RuleSetsClient.BeginDelete. -type RuleSetsClientDeleteResponse struct { - // placeholder for future response values -} - -// RuleSetsClientGetResponse contains the response from method RuleSetsClient.Get. -type RuleSetsClientGetResponse struct { - RuleSet -} - -// RuleSetsClientListByProfileResponse contains the response from method RuleSetsClient.NewListByProfilePager. -type RuleSetsClientListByProfileResponse struct { - RuleSetListResult -} - -// RuleSetsClientListResourceUsageResponse contains the response from method RuleSetsClient.NewListResourceUsagePager. -type RuleSetsClientListResourceUsageResponse struct { - UsagesListResult -} - -// RulesClientCreateResponse contains the response from method RulesClient.BeginCreate. -type RulesClientCreateResponse struct { - Rule -} - -// RulesClientDeleteResponse contains the response from method RulesClient.BeginDelete. -type RulesClientDeleteResponse struct { - // placeholder for future response values -} - -// RulesClientGetResponse contains the response from method RulesClient.Get. -type RulesClientGetResponse struct { - Rule -} - -// RulesClientListByRuleSetResponse contains the response from method RulesClient.NewListByRuleSetPager. -type RulesClientListByRuleSetResponse struct { - RuleListResult -} - -// RulesClientUpdateResponse contains the response from method RulesClient.BeginUpdate. -type RulesClientUpdateResponse struct { - Rule -} - -// SecretsClientCreateResponse contains the response from method SecretsClient.BeginCreate. -type SecretsClientCreateResponse struct { - Secret -} - -// SecretsClientDeleteResponse contains the response from method SecretsClient.BeginDelete. -type SecretsClientDeleteResponse struct { - // placeholder for future response values -} - -// SecretsClientGetResponse contains the response from method SecretsClient.Get. -type SecretsClientGetResponse struct { - Secret -} - -// SecretsClientListByProfileResponse contains the response from method SecretsClient.NewListByProfilePager. -type SecretsClientListByProfileResponse struct { - SecretListResult -} - -// SecurityPoliciesClientCreateResponse contains the response from method SecurityPoliciesClient.BeginCreate. -type SecurityPoliciesClientCreateResponse struct { - SecurityPolicy -} - -// SecurityPoliciesClientDeleteResponse contains the response from method SecurityPoliciesClient.BeginDelete. -type SecurityPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// SecurityPoliciesClientGetResponse contains the response from method SecurityPoliciesClient.Get. -type SecurityPoliciesClientGetResponse struct { - SecurityPolicy -} - -// SecurityPoliciesClientListByProfileResponse contains the response from method SecurityPoliciesClient.NewListByProfilePager. -type SecurityPoliciesClientListByProfileResponse struct { - SecurityPolicyListResult -} - -// SecurityPoliciesClientPatchResponse contains the response from method SecurityPoliciesClient.BeginPatch. -type SecurityPoliciesClientPatchResponse struct { - SecurityPolicy -} - -// ValidateClientSecretResponse contains the response from method ValidateClient.Secret. -type ValidateClientSecretResponse struct { - ValidateSecretOutput -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/routes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/routes_client.go deleted file mode 100644 index 90e9d622..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/routes_client.go +++ /dev/null @@ -1,429 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RoutesClient contains the methods for the Routes group. -// Don't use this type directly, use NewRoutesClient() instead. -type RoutesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewRoutesClient creates a new instance of RoutesClient with the specified values. -// - subscriptionID - Azure Subscription ID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutesClient, error) { - cl, err := arm.NewClient(moduleName+".RoutesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &RoutesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreate - Creates a new route with the specified route name under the specified subscription, resource group, profile, -// and AzureFrontDoor endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource -// group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - routeName - Name of the routing rule. -// - route - Route properties -// - options - RoutesClientBeginCreateOptions contains the optional parameters for the RoutesClient.BeginCreate method. -func (client *RoutesClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, route Route, options *RoutesClientBeginCreateOptions) (*runtime.Poller[RoutesClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, profileName, endpointName, routeName, route, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutesClientCreateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[RoutesClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Create - Creates a new route with the specified route name under the specified subscription, resource group, profile, and -// AzureFrontDoor endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *RoutesClient) create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, route Route, options *RoutesClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, endpointName, routeName, route, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *RoutesClient) createCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, route Route, options *RoutesClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, route) -} - -// BeginDelete - Deletes an existing route with the specified route name under the specified subscription, resource group, -// profile, and AzureFrontDoor endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource -// group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - routeName - Name of the routing rule. -// - options - RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. -func (client *RoutesClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientBeginDeleteOptions) (*runtime.Poller[RoutesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, profileName, endpointName, routeName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[RoutesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Deletes an existing route with the specified route name under the specified subscription, resource group, profile, -// and AzureFrontDoor endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *RoutesClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, endpointName, routeName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *RoutesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets an existing route with the specified route name under the specified subscription, resource group, profile, and -// AzureFrontDoor endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource -// group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - routeName - Name of the routing rule. -// - options - RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. -func (client *RoutesClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientGetOptions) (RoutesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, endpointName, routeName, options) - if err != nil { - return RoutesClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RoutesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RoutesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *RoutesClient) getCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *RoutesClient) getHandleResponse(resp *http.Response) (RoutesClientGetResponse, error) { - result := RoutesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Route); err != nil { - return RoutesClientGetResponse{}, err - } - return result, nil -} - -// NewListByEndpointPager - Lists all of the existing origins within a profile. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource -// group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - options - RoutesClientListByEndpointOptions contains the optional parameters for the RoutesClient.NewListByEndpointPager -// method. -func (client *RoutesClient) NewListByEndpointPager(resourceGroupName string, profileName string, endpointName string, options *RoutesClientListByEndpointOptions) *runtime.Pager[RoutesClientListByEndpointResponse] { - return runtime.NewPager(runtime.PagingHandler[RoutesClientListByEndpointResponse]{ - More: func(page RoutesClientListByEndpointResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RoutesClientListByEndpointResponse) (RoutesClientListByEndpointResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByEndpointCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RoutesClientListByEndpointResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RoutesClientListByEndpointResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RoutesClientListByEndpointResponse{}, runtime.NewResponseError(resp) - } - return client.listByEndpointHandleResponse(resp) - }, - }) -} - -// listByEndpointCreateRequest creates the ListByEndpoint request. -func (client *RoutesClient) listByEndpointCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *RoutesClientListByEndpointOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByEndpointHandleResponse handles the ListByEndpoint response. -func (client *RoutesClient) listByEndpointHandleResponse(resp *http.Response) (RoutesClientListByEndpointResponse, error) { - result := RoutesClientListByEndpointResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteListResult); err != nil { - return RoutesClientListByEndpointResponse{}, err - } - return result, nil -} - -// BeginUpdate - Updates an existing route with the specified route name under the specified subscription, resource group, -// profile, and AzureFrontDoor endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource -// group. -// - endpointName - Name of the endpoint under the profile which is unique globally. -// - routeName - Name of the routing rule. -// - routeUpdateProperties - Route update properties -// - options - RoutesClientBeginUpdateOptions contains the optional parameters for the RoutesClient.BeginUpdate method. -func (client *RoutesClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, routeUpdateProperties RouteUpdateParameters, options *RoutesClientBeginUpdateOptions) (*runtime.Poller[RoutesClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, profileName, endpointName, routeName, routeUpdateProperties, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutesClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[RoutesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Update - Updates an existing route with the specified route name under the specified subscription, resource group, profile, -// and AzureFrontDoor endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -func (client *RoutesClient) update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, routeUpdateProperties RouteUpdateParameters, options *RoutesClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, endpointName, routeName, routeUpdateProperties, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *RoutesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, routeUpdateProperties RouteUpdateParameters, options *RoutesClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if profileName == "" { - return nil, errors.New("parameter profileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, routeUpdateProperties) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/time_rfc3339.go deleted file mode 100644 index fc6025ca..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/time_rfc3339.go +++ /dev/null @@ -1,87 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/CHANGELOG.md new file mode 100644 index 00000000..afc785f5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/CHANGELOG.md @@ -0,0 +1,94 @@ +# Release History + +## 2.2.0 (2024-04-26) +### Features Added + +- New enum type `ProfileScrubbingState` with values `ProfileScrubbingStateDisabled`, `ProfileScrubbingStateEnabled` +- New enum type `ScrubbingRuleEntryMatchOperator` with values `ScrubbingRuleEntryMatchOperatorEqualsAny` +- New enum type `ScrubbingRuleEntryMatchVariable` with values `ScrubbingRuleEntryMatchVariableQueryStringArgNames`, `ScrubbingRuleEntryMatchVariableRequestIPAddress`, `ScrubbingRuleEntryMatchVariableRequestURI` +- New enum type `ScrubbingRuleEntryState` with values `ScrubbingRuleEntryStateDisabled`, `ScrubbingRuleEntryStateEnabled` +- New struct `ProfileLogScrubbing` +- New struct `ProfileScrubbingRules` +- New field `LogScrubbing` in struct `ProfileProperties` +- New field `LogScrubbing` in struct `ProfilePropertiesUpdateParameters` + + +## 2.1.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.0.0 (2023-10-27) +### Breaking Changes + +- Type of `EndpointProperties.CustomDomains` has been changed from `[]*CustomDomain` to `[]*DeepCreatedCustomDomain` +- Type of `MetricsResponse.Granularity` has been changed from `*MetricsResponseGranularity` to `*MetricsGranularity` +- Type of `MetricsResponseSeriesItem.Unit` has been changed from `*MetricsResponseSeriesItemUnit` to `*MetricsSeriesUnit` +- Type of `WafMetricsResponse.Granularity` has been changed from `*WafMetricsResponseGranularity` to `*WafMetricsGranularity` +- Type of `WafMetricsResponseSeriesItem.Unit` has been changed from `*WafMetricsResponseSeriesItemUnit` to `*WafMetricsSeriesUnit` +- Enum `MetricsResponseGranularity` has been removed +- Enum `MetricsResponseSeriesItemUnit` has been removed +- Enum `WafMetricsResponseGranularity` has been removed +- Enum `WafMetricsResponseSeriesItemUnit` has been removed +- Function `*ClientFactory.NewValidateClient` has been removed +- Function `NewValidateClient` has been removed +- Function `*ValidateClient.Secret` has been removed +- Operation `*CustomDomainsClient.DisableCustomHTTPS` has been changed to LRO, use `*CustomDomainsClient.BeginDisableCustomHTTPS` instead. +- Operation `*CustomDomainsClient.EnableCustomHTTPS` has been changed to LRO, use `*CustomDomainsClient.BeginEnableCustomHTTPS` instead. + +### Features Added + +- New value `ProfileResourceStateAbortingMigration`, `ProfileResourceStateCommittingMigration`, `ProfileResourceStateMigrated`, `ProfileResourceStateMigrating`, `ProfileResourceStatePendingMigrationCommit` added to enum type `ProfileResourceState` +- New enum type `CanMigrateDefaultSKU` with values `CanMigrateDefaultSKUPremiumAzureFrontDoor`, `CanMigrateDefaultSKUStandardAzureFrontDoor` +- New enum type `ManagedServiceIdentityType` with values `ManagedServiceIdentityTypeNone`, `ManagedServiceIdentityTypeSystemAssigned`, `ManagedServiceIdentityTypeSystemAssignedUserAssigned`, `ManagedServiceIdentityTypeUserAssigned` +- New enum type `MetricsGranularity` with values `MetricsGranularityP1D`, `MetricsGranularityPT1H`, `MetricsGranularityPT5M` +- New enum type `MetricsSeriesUnit` with values `MetricsSeriesUnitBitsPerSecond`, `MetricsSeriesUnitBytes`, `MetricsSeriesUnitCount`, `MetricsSeriesUnitMilliSeconds` +- New enum type `WafMetricsGranularity` with values `WafMetricsGranularityP1D`, `WafMetricsGranularityPT1H`, `WafMetricsGranularityPT5M` +- New enum type `WafMetricsSeriesUnit` with values `WafMetricsSeriesUnitCount` +- New function `*AFDProfilesClient.CheckEndpointNameAvailability(context.Context, string, string, CheckEndpointNameAvailabilityInput, *AFDProfilesClientCheckEndpointNameAvailabilityOptions) (AFDProfilesClientCheckEndpointNameAvailabilityResponse, error)` +- New function `*AFDProfilesClient.BeginUpgrade(context.Context, string, string, ProfileUpgradeParameters, *AFDProfilesClientBeginUpgradeOptions) (*runtime.Poller[AFDProfilesClientUpgradeResponse], error)` +- New function `*AFDProfilesClient.ValidateSecret(context.Context, string, string, ValidateSecretInput, *AFDProfilesClientValidateSecretOptions) (AFDProfilesClientValidateSecretResponse, error)` +- New function `*ProfilesClient.BeginCanMigrate(context.Context, string, CanMigrateParameters, *ProfilesClientBeginCanMigrateOptions) (*runtime.Poller[ProfilesClientCanMigrateResponse], error)` +- New function `*ProfilesClient.BeginMigrate(context.Context, string, MigrationParameters, *ProfilesClientBeginMigrateOptions) (*runtime.Poller[ProfilesClientMigrateResponse], error)` +- New function `*ProfilesClient.BeginMigrationCommit(context.Context, string, string, *ProfilesClientBeginMigrationCommitOptions) (*runtime.Poller[ProfilesClientMigrationCommitResponse], error)` +- New struct `CanMigrateParameters` +- New struct `CanMigrateProperties` +- New struct `CanMigrateResult` +- New struct `DeepCreatedCustomDomain` +- New struct `DeepCreatedCustomDomainProperties` +- New struct `ManagedServiceIdentity` +- New struct `MigrateResult` +- New struct `MigrateResultProperties` +- New struct `MigrationErrorType` +- New struct `MigrationParameters` +- New struct `MigrationWebApplicationFirewallMapping` +- New struct `ProfileChangeSKUWafMapping` +- New struct `ProfileUpgradeParameters` +- New struct `UserAssignedIdentity` +- New field `ExtendedProperties` in struct `AFDDomainProperties` +- New field `CertificateAuthority`, `ExpirationDate`, `SecretSource`, `Subject`, `SubjectAlternativeNames`, `Thumbprint` in struct `AzureFirstPartyManagedCertificateParameters` +- New field `Identity` in struct `Profile` +- New field `ExtendedProperties` in struct `ProfileProperties` +- New field `Identity` in struct `ProfileUpdateParameters` +- New field `ExtendedProperties` in struct `WebApplicationFirewallPolicyProperties` + + +## 1.1.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + +## 1.1.0 (2023-03-27) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + + +## 1.0.0 (2022-05-17) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/README.md new file mode 100644 index 00000000..786e392e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/README.md @@ -0,0 +1,92 @@ +# Azure Content Delivery Network Module for Go + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2) + +The `armcdn` module provides operations for working with Azure Content Delivery Network. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/cdn/armcdn) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Content Delivery Network module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Content Delivery Network. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Content Delivery Network module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armcdn.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armcdn.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewAFDCustomDomainsClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Content Delivery Network` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdcustomdomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdcustomdomains_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdcustomdomains_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdcustomdomains_client.go index 60eac4aa..02b48c33 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdcustomdomains_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdcustomdomains_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type AFDCustomDomainsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAFDCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDCustomDomainsClient, error) { - cl, err := arm.NewClient(moduleName+".AFDCustomDomainsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewAFDCustomDomainsClient(subscriptionID string, credential azcore.TokenCre // BeginCreate - Creates a new domain within the specified profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -61,31 +60,41 @@ func (client *AFDCustomDomainsClient) BeginCreate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDCustomDomainsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDCustomDomainsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDCustomDomainsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDCustomDomainsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Create - Creates a new domain within the specified profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDCustomDomainsClient) create(ctx context.Context, resourceGroupName string, profileName string, customDomainName string, customDomain AFDDomain, options *AFDCustomDomainsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "AFDCustomDomainsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, customDomainName, customDomain, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -112,17 +121,20 @@ func (client *AFDCustomDomainsClient) createCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customDomain) + if err := runtime.MarshalAsJSON(req, customDomain); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, // resource group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -135,11 +147,15 @@ func (client *AFDCustomDomainsClient) BeginDelete(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDCustomDomainsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDCustomDomainsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDCustomDomainsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDCustomDomainsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -147,20 +163,26 @@ func (client *AFDCustomDomainsClient) BeginDelete(ctx context.Context, resourceG // group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDCustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, customDomainName string, options *AFDCustomDomainsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AFDCustomDomainsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, customDomainName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -187,7 +209,7 @@ func (client *AFDCustomDomainsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,25 +219,32 @@ func (client *AFDCustomDomainsClient) deleteCreateRequest(ctx context.Context, r // group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. // - customDomainName - Name of the domain under the profile which is unique globally. // - options - AFDCustomDomainsClientGetOptions contains the optional parameters for the AFDCustomDomainsClient.Get method. func (client *AFDCustomDomainsClient) Get(ctx context.Context, resourceGroupName string, profileName string, customDomainName string, options *AFDCustomDomainsClientGetOptions) (AFDCustomDomainsClientGetResponse, error) { + var err error + const operationName = "AFDCustomDomainsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, customDomainName, options) if err != nil { return AFDCustomDomainsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AFDCustomDomainsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDCustomDomainsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AFDCustomDomainsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -242,7 +271,7 @@ func (client *AFDCustomDomainsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,10 +288,10 @@ func (client *AFDCustomDomainsClient) getHandleResponse(resp *http.Response) (AF // NewListByProfilePager - Lists existing AzureFrontDoor domains. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. -// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN profile which is unique -// within the resource group. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource +// group. // - options - AFDCustomDomainsClientListByProfileOptions contains the optional parameters for the AFDCustomDomainsClient.NewListByProfilePager // method. func (client *AFDCustomDomainsClient) NewListByProfilePager(resourceGroupName string, profileName string, options *AFDCustomDomainsClientListByProfileOptions) *runtime.Pager[AFDCustomDomainsClientListByProfileResponse] { @@ -271,25 +300,20 @@ func (client *AFDCustomDomainsClient) NewListByProfilePager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AFDCustomDomainsClientListByProfileResponse) (AFDCustomDomainsClientListByProfileResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AFDCustomDomainsClient.NewListByProfilePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) + }, nil) if err != nil { return AFDCustomDomainsClientListByProfileResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AFDCustomDomainsClientListByProfileResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDCustomDomainsClientListByProfileResponse{}, runtime.NewResponseError(resp) - } return client.listByProfileHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -313,7 +337,7 @@ func (client *AFDCustomDomainsClient) listByProfileCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -331,7 +355,7 @@ func (client *AFDCustomDomainsClient) listByProfileHandleResponse(resp *http.Res // BeginRefreshValidationToken - Updates the domain validation token. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -344,31 +368,41 @@ func (client *AFDCustomDomainsClient) BeginRefreshValidationToken(ctx context.Co if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDCustomDomainsClientRefreshValidationTokenResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDCustomDomainsClientRefreshValidationTokenResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDCustomDomainsClientRefreshValidationTokenResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDCustomDomainsClientRefreshValidationTokenResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RefreshValidationToken - Updates the domain validation token. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDCustomDomainsClient) refreshValidationToken(ctx context.Context, resourceGroupName string, profileName string, customDomainName string, options *AFDCustomDomainsClientBeginRefreshValidationTokenOptions) (*http.Response, error) { + var err error + const operationName = "AFDCustomDomainsClient.BeginRefreshValidationToken" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.refreshValidationTokenCreateRequest(ctx, resourceGroupName, profileName, customDomainName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // refreshValidationTokenCreateRequest creates the RefreshValidationToken request. @@ -395,7 +429,7 @@ func (client *AFDCustomDomainsClient) refreshValidationTokenCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -404,7 +438,7 @@ func (client *AFDCustomDomainsClient) refreshValidationTokenCreateRequest(ctx co // BeginUpdate - Updates an existing domain within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -418,31 +452,41 @@ func (client *AFDCustomDomainsClient) BeginUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDCustomDomainsClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDCustomDomainsClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDCustomDomainsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDCustomDomainsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates an existing domain within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDCustomDomainsClient) update(ctx context.Context, resourceGroupName string, profileName string, customDomainName string, customDomainUpdateProperties AFDDomainUpdateParameters, options *AFDCustomDomainsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AFDCustomDomainsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, customDomainName, customDomainUpdateProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -469,8 +513,11 @@ func (client *AFDCustomDomainsClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customDomainUpdateProperties) + if err := runtime.MarshalAsJSON(req, customDomainUpdateProperties); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdendpoints_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdendpoints_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdendpoints_client.go index 687ed50b..f2e2f3db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdendpoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdendpoints_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type AFDEndpointsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAFDEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDEndpointsClient, error) { - cl, err := arm.NewClient(moduleName+".AFDEndpointsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +47,7 @@ func NewAFDEndpointsClient(subscriptionID string, credential azcore.TokenCredent // resource group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -62,11 +61,15 @@ func (client *AFDEndpointsClient) BeginCreate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDEndpointsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDEndpointsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDEndpointsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDEndpointsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -74,20 +77,26 @@ func (client *AFDEndpointsClient) BeginCreate(ctx context.Context, resourceGroup // group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDEndpointsClient) create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpoint AFDEndpoint, options *AFDEndpointsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "AFDEndpointsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, endpointName, endpoint, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -114,17 +123,20 @@ func (client *AFDEndpointsClient) createCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, endpoint) + if err := runtime.MarshalAsJSON(req, endpoint); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, // resource group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -137,11 +149,15 @@ func (client *AFDEndpointsClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDEndpointsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDEndpointsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDEndpointsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDEndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -149,20 +165,26 @@ func (client *AFDEndpointsClient) BeginDelete(ctx context.Context, resourceGroup // resource group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *AFDEndpointsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AFDEndpointsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -189,7 +211,7 @@ func (client *AFDEndpointsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -199,25 +221,32 @@ func (client *AFDEndpointsClient) deleteCreateRequest(ctx context.Context, resou // group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. // - endpointName - Name of the endpoint under the profile which is unique globally. // - options - AFDEndpointsClientGetOptions contains the optional parameters for the AFDEndpointsClient.Get method. func (client *AFDEndpointsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *AFDEndpointsClientGetOptions) (AFDEndpointsClientGetResponse, error) { + var err error + const operationName = "AFDEndpointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) if err != nil { return AFDEndpointsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AFDEndpointsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDEndpointsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AFDEndpointsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -244,7 +273,7 @@ func (client *AFDEndpointsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -261,7 +290,7 @@ func (client *AFDEndpointsClient) getHandleResponse(resp *http.Response) (AFDEnd // NewListByProfilePager - Lists existing AzureFrontDoor endpoints. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -273,25 +302,20 @@ func (client *AFDEndpointsClient) NewListByProfilePager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AFDEndpointsClientListByProfileResponse) (AFDEndpointsClientListByProfileResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AFDEndpointsClient.NewListByProfilePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) + }, nil) if err != nil { return AFDEndpointsClientListByProfileResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AFDEndpointsClientListByProfileResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDEndpointsClientListByProfileResponse{}, runtime.NewResponseError(resp) - } return client.listByProfileHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -315,7 +339,7 @@ func (client *AFDEndpointsClient) listByProfileCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -330,10 +354,9 @@ func (client *AFDEndpointsClient) listByProfileHandleResponse(resp *http.Respons return result, nil } -// NewListResourceUsagePager - Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN -// profile. +// NewListResourceUsagePager - Checks the quota and actual usage of endpoints under the given Azure Front Door profile. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -346,25 +369,20 @@ func (client *AFDEndpointsClient) NewListResourceUsagePager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AFDEndpointsClientListResourceUsageResponse) (AFDEndpointsClientListResourceUsageResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AFDEndpointsClientListResourceUsageResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AFDEndpointsClient.NewListResourceUsagePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) + }, nil) if err != nil { return AFDEndpointsClientListResourceUsageResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDEndpointsClientListResourceUsageResponse{}, runtime.NewResponseError(resp) - } return client.listResourceUsageHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -392,7 +410,7 @@ func (client *AFDEndpointsClient) listResourceUsageCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -410,7 +428,7 @@ func (client *AFDEndpointsClient) listResourceUsageHandleResponse(resp *http.Res // BeginPurgeContent - Removes a content from AzureFrontDoor. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -426,31 +444,41 @@ func (client *AFDEndpointsClient) BeginPurgeContent(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDEndpointsClientPurgeContentResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDEndpointsClientPurgeContentResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDEndpointsClientPurgeContentResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDEndpointsClientPurgeContentResponse]{ + Tracer: client.internal.Tracer(), + }) } } // PurgeContent - Removes a content from AzureFrontDoor. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDEndpointsClient) purgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contents AfdPurgeParameters, options *AFDEndpointsClientBeginPurgeContentOptions) (*http.Response, error) { + var err error + const operationName = "AFDEndpointsClient.BeginPurgeContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.purgeContentCreateRequest(ctx, resourceGroupName, profileName, endpointName, contents, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // purgeContentCreateRequest creates the PurgeContent request. @@ -477,10 +505,13 @@ func (client *AFDEndpointsClient) purgeContentCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, contents) + if err := runtime.MarshalAsJSON(req, contents); err != nil { + return nil, err + } + return req, nil } // BeginUpdate - Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, @@ -489,7 +520,7 @@ func (client *AFDEndpointsClient) purgeContentCreateRequest(ctx context.Context, // domains, use the Update Custom Domain operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -503,11 +534,15 @@ func (client *AFDEndpointsClient) BeginUpdate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDEndpointsClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDEndpointsClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDEndpointsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDEndpointsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -517,20 +552,26 @@ func (client *AFDEndpointsClient) BeginUpdate(ctx context.Context, resourceGroup // domains, use the Update Custom Domain operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDEndpointsClient) update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties AFDEndpointUpdateParameters, options *AFDEndpointsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AFDEndpointsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, endpointName, endpointUpdateProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -557,17 +598,20 @@ func (client *AFDEndpointsClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, endpointUpdateProperties) + if err := runtime.MarshalAsJSON(req, endpointUpdateProperties); err != nil { + return nil, err + } + return req, nil } -// ValidateCustomDomain - Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api -// isn't work for apex domain. +// ValidateCustomDomain - Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in +// DNS. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -576,18 +620,25 @@ func (client *AFDEndpointsClient) updateCreateRequest(ctx context.Context, resou // - options - AFDEndpointsClientValidateCustomDomainOptions contains the optional parameters for the AFDEndpointsClient.ValidateCustomDomain // method. func (client *AFDEndpointsClient) ValidateCustomDomain(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput, options *AFDEndpointsClientValidateCustomDomainOptions) (AFDEndpointsClientValidateCustomDomainResponse, error) { + var err error + const operationName = "AFDEndpointsClient.ValidateCustomDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateCustomDomainCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainProperties, options) if err != nil { return AFDEndpointsClientValidateCustomDomainResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AFDEndpointsClientValidateCustomDomainResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDEndpointsClientValidateCustomDomainResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AFDEndpointsClientValidateCustomDomainResponse{}, err } - return client.validateCustomDomainHandleResponse(resp) + resp, err := client.validateCustomDomainHandleResponse(httpResp) + return resp, err } // validateCustomDomainCreateRequest creates the ValidateCustomDomain request. @@ -614,10 +665,13 @@ func (client *AFDEndpointsClient) validateCustomDomainCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customDomainProperties) + if err := runtime.MarshalAsJSON(req, customDomainProperties); err != nil { + return nil, err + } + return req, nil } // validateCustomDomainHandleResponse handles the ValidateCustomDomain response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdorigingroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdorigingroups_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdorigingroups_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdorigingroups_client.go index 8361bb91..a965cd61 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdorigingroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdorigingroups_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type AFDOriginGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAFDOriginGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDOriginGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".AFDOriginGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewAFDOriginGroupsClient(subscriptionID string, credential azcore.TokenCred // BeginCreate - Creates a new origin group within the specified profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -61,31 +60,41 @@ func (client *AFDOriginGroupsClient) BeginCreate(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginGroupsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginGroupsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDOriginGroupsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDOriginGroupsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Create - Creates a new origin group within the specified profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDOriginGroupsClient) create(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originGroup AFDOriginGroup, options *AFDOriginGroupsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "AFDOriginGroupsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, originGroupName, originGroup, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -112,16 +121,19 @@ func (client *AFDOriginGroupsClient) createCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, originGroup) + if err := runtime.MarshalAsJSON(req, originGroup); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing origin group within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -134,31 +146,41 @@ func (client *AFDOriginGroupsClient) BeginDelete(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginGroupsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginGroupsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDOriginGroupsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDOriginGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes an existing origin group within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDOriginGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, options *AFDOriginGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AFDOriginGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, originGroupName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -185,7 +207,7 @@ func (client *AFDOriginGroupsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,25 +216,32 @@ func (client *AFDOriginGroupsClient) deleteCreateRequest(ctx context.Context, re // Get - Gets an existing origin group within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. // - originGroupName - Name of the origin group which is unique within the endpoint. // - options - AFDOriginGroupsClientGetOptions contains the optional parameters for the AFDOriginGroupsClient.Get method. func (client *AFDOriginGroupsClient) Get(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, options *AFDOriginGroupsClientGetOptions) (AFDOriginGroupsClientGetResponse, error) { + var err error + const operationName = "AFDOriginGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, originGroupName, options) if err != nil { return AFDOriginGroupsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AFDOriginGroupsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDOriginGroupsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AFDOriginGroupsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -239,7 +268,7 @@ func (client *AFDOriginGroupsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -256,7 +285,7 @@ func (client *AFDOriginGroupsClient) getHandleResponse(resp *http.Response) (AFD // NewListByProfilePager - Lists all of the existing origin groups within a profile. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -268,25 +297,20 @@ func (client *AFDOriginGroupsClient) NewListByProfilePager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AFDOriginGroupsClientListByProfileResponse) (AFDOriginGroupsClientListByProfileResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AFDOriginGroupsClientListByProfileResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AFDOriginGroupsClient.NewListByProfilePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) + }, nil) if err != nil { return AFDOriginGroupsClientListByProfileResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDOriginGroupsClientListByProfileResponse{}, runtime.NewResponseError(resp) - } return client.listByProfileHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -310,7 +334,7 @@ func (client *AFDOriginGroupsClient) listByProfileCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -325,10 +349,9 @@ func (client *AFDOriginGroupsClient) listByProfileHandleResponse(resp *http.Resp return result, nil } -// NewListResourceUsagePager - Checks the quota and actual usage of the given AzureFrontDoor origin group under the given -// CDN profile. +// NewListResourceUsagePager - Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -341,25 +364,20 @@ func (client *AFDOriginGroupsClient) NewListResourceUsagePager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AFDOriginGroupsClientListResourceUsageResponse) (AFDOriginGroupsClientListResourceUsageResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, originGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AFDOriginGroupsClient.NewListResourceUsagePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, originGroupName, options) + }, nil) if err != nil { return AFDOriginGroupsClientListResourceUsageResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AFDOriginGroupsClientListResourceUsageResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDOriginGroupsClientListResourceUsageResponse{}, runtime.NewResponseError(resp) - } return client.listResourceUsageHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -387,7 +405,7 @@ func (client *AFDOriginGroupsClient) listResourceUsageCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -405,7 +423,7 @@ func (client *AFDOriginGroupsClient) listResourceUsageHandleResponse(resp *http. // BeginUpdate - Updates an existing origin group within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -419,31 +437,41 @@ func (client *AFDOriginGroupsClient) BeginUpdate(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginGroupsClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginGroupsClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDOriginGroupsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDOriginGroupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates an existing origin group within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDOriginGroupsClient) update(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originGroupUpdateProperties AFDOriginGroupUpdateParameters, options *AFDOriginGroupsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AFDOriginGroupsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, originGroupName, originGroupUpdateProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -470,8 +498,11 @@ func (client *AFDOriginGroupsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, originGroupUpdateProperties) + if err := runtime.MarshalAsJSON(req, originGroupUpdateProperties); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdorigins_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdorigins_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdorigins_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdorigins_client.go index 3203dc2f..53257efe 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/afdorigins_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdorigins_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type AFDOriginsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAFDOriginsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDOriginsClient, error) { - cl, err := arm.NewClient(moduleName+".AFDOriginsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewAFDOriginsClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreate - Creates a new origin within the specified origin group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -61,31 +60,41 @@ func (client *AFDOriginsClient) BeginCreate(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDOriginsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDOriginsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Create - Creates a new origin within the specified origin group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDOriginsClient) create(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originName string, origin AFDOrigin, options *AFDOriginsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "AFDOriginsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, originGroupName, originName, origin, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -116,16 +125,19 @@ func (client *AFDOriginsClient) createCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, origin) + if err := runtime.MarshalAsJSON(req, origin); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing origin within an origin group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -138,31 +150,41 @@ func (client *AFDOriginsClient) BeginDelete(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDOriginsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDOriginsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes an existing origin within an origin group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDOriginsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originName string, options *AFDOriginsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AFDOriginsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, originGroupName, originName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -193,7 +215,7 @@ func (client *AFDOriginsClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -202,7 +224,7 @@ func (client *AFDOriginsClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets an existing origin within an origin group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -210,18 +232,25 @@ func (client *AFDOriginsClient) deleteCreateRequest(ctx context.Context, resourc // - originName - Name of the origin which is unique within the profile. // - options - AFDOriginsClientGetOptions contains the optional parameters for the AFDOriginsClient.Get method. func (client *AFDOriginsClient) Get(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originName string, options *AFDOriginsClientGetOptions) (AFDOriginsClientGetResponse, error) { + var err error + const operationName = "AFDOriginsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, originGroupName, originName, options) if err != nil { return AFDOriginsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AFDOriginsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDOriginsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AFDOriginsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -252,7 +281,7 @@ func (client *AFDOriginsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,7 +298,7 @@ func (client *AFDOriginsClient) getHandleResponse(resp *http.Response) (AFDOrigi // NewListByOriginGroupPager - Lists all of the existing origins within an origin group. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -282,25 +311,20 @@ func (client *AFDOriginsClient) NewListByOriginGroupPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AFDOriginsClientListByOriginGroupResponse) (AFDOriginsClientListByOriginGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByOriginGroupCreateRequest(ctx, resourceGroupName, profileName, originGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AFDOriginsClient.NewListByOriginGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByOriginGroupCreateRequest(ctx, resourceGroupName, profileName, originGroupName, options) + }, nil) if err != nil { return AFDOriginsClientListByOriginGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AFDOriginsClientListByOriginGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AFDOriginsClientListByOriginGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByOriginGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -328,7 +352,7 @@ func (client *AFDOriginsClient) listByOriginGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,7 +370,7 @@ func (client *AFDOriginsClient) listByOriginGroupHandleResponse(resp *http.Respo // BeginUpdate - Updates an existing origin within an origin group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -360,31 +384,41 @@ func (client *AFDOriginsClient) BeginUpdate(ctx context.Context, resourceGroupNa if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginsClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDOriginsClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AFDOriginsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDOriginsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates an existing origin within an origin group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *AFDOriginsClient) update(ctx context.Context, resourceGroupName string, profileName string, originGroupName string, originName string, originUpdateProperties AFDOriginUpdateParameters, options *AFDOriginsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AFDOriginsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, originGroupName, originName, originUpdateProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -415,8 +449,11 @@ func (client *AFDOriginsClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, originUpdateProperties) + if err := runtime.MarshalAsJSON(req, originUpdateProperties); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdprofiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdprofiles_client.go new file mode 100644 index 00000000..1ea30575 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/afdprofiles_client.go @@ -0,0 +1,401 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AFDProfilesClient contains the methods for the AFDProfiles group. +// Don't use this type directly, use NewAFDProfilesClient() instead. +type AFDProfilesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAFDProfilesClient creates a new instance of AFDProfilesClient with the specified values. +// - subscriptionID - Azure Subscription ID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAFDProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AFDProfilesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AFDProfilesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckEndpointNameAvailability - Check the availability of an afdx endpoint name, and return the globally unique endpoint +// host name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. +// - checkEndpointNameAvailabilityInput - Input to check. +// - options - AFDProfilesClientCheckEndpointNameAvailabilityOptions contains the optional parameters for the AFDProfilesClient.CheckEndpointNameAvailability +// method. +func (client *AFDProfilesClient) CheckEndpointNameAvailability(ctx context.Context, resourceGroupName string, profileName string, checkEndpointNameAvailabilityInput CheckEndpointNameAvailabilityInput, options *AFDProfilesClientCheckEndpointNameAvailabilityOptions) (AFDProfilesClientCheckEndpointNameAvailabilityResponse, error) { + var err error + const operationName = "AFDProfilesClient.CheckEndpointNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkEndpointNameAvailabilityCreateRequest(ctx, resourceGroupName, profileName, checkEndpointNameAvailabilityInput, options) + if err != nil { + return AFDProfilesClientCheckEndpointNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AFDProfilesClientCheckEndpointNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AFDProfilesClientCheckEndpointNameAvailabilityResponse{}, err + } + resp, err := client.checkEndpointNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkEndpointNameAvailabilityCreateRequest creates the CheckEndpointNameAvailability request. +func (client *AFDProfilesClient) checkEndpointNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, profileName string, checkEndpointNameAvailabilityInput CheckEndpointNameAvailabilityInput, options *AFDProfilesClientCheckEndpointNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkEndpointNameAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, checkEndpointNameAvailabilityInput); err != nil { + return nil, err + } + return req, nil +} + +// checkEndpointNameAvailabilityHandleResponse handles the CheckEndpointNameAvailability response. +func (client *AFDProfilesClient) checkEndpointNameAvailabilityHandleResponse(resp *http.Response) (AFDProfilesClientCheckEndpointNameAvailabilityResponse, error) { + result := AFDProfilesClientCheckEndpointNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckEndpointNameAvailabilityOutput); err != nil { + return AFDProfilesClientCheckEndpointNameAvailabilityResponse{}, err + } + return result, nil +} + +// CheckHostNameAvailability - Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint +// in DNS. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource +// group. +// - checkHostNameAvailabilityInput - Custom domain to be validated. +// - options - AFDProfilesClientCheckHostNameAvailabilityOptions contains the optional parameters for the AFDProfilesClient.CheckHostNameAvailability +// method. +func (client *AFDProfilesClient) CheckHostNameAvailability(ctx context.Context, resourceGroupName string, profileName string, checkHostNameAvailabilityInput CheckHostNameAvailabilityInput, options *AFDProfilesClientCheckHostNameAvailabilityOptions) (AFDProfilesClientCheckHostNameAvailabilityResponse, error) { + var err error + const operationName = "AFDProfilesClient.CheckHostNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkHostNameAvailabilityCreateRequest(ctx, resourceGroupName, profileName, checkHostNameAvailabilityInput, options) + if err != nil { + return AFDProfilesClientCheckHostNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AFDProfilesClientCheckHostNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AFDProfilesClientCheckHostNameAvailabilityResponse{}, err + } + resp, err := client.checkHostNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkHostNameAvailabilityCreateRequest creates the CheckHostNameAvailability request. +func (client *AFDProfilesClient) checkHostNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, profileName string, checkHostNameAvailabilityInput CheckHostNameAvailabilityInput, options *AFDProfilesClientCheckHostNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, checkHostNameAvailabilityInput); err != nil { + return nil, err + } + return req, nil +} + +// checkHostNameAvailabilityHandleResponse handles the CheckHostNameAvailability response. +func (client *AFDProfilesClient) checkHostNameAvailabilityHandleResponse(resp *http.Response) (AFDProfilesClientCheckHostNameAvailabilityResponse, error) { + result := AFDProfilesClientCheckHostNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityOutput); err != nil { + return AFDProfilesClientCheckHostNameAvailabilityResponse{}, err + } + return result, nil +} + +// NewListResourceUsagePager - Checks the quota and actual usage of endpoints under the given Azure Front Door profile. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource +// group. +// - options - AFDProfilesClientListResourceUsageOptions contains the optional parameters for the AFDProfilesClient.NewListResourceUsagePager +// method. +func (client *AFDProfilesClient) NewListResourceUsagePager(resourceGroupName string, profileName string, options *AFDProfilesClientListResourceUsageOptions) *runtime.Pager[AFDProfilesClientListResourceUsageResponse] { + return runtime.NewPager(runtime.PagingHandler[AFDProfilesClientListResourceUsageResponse]{ + More: func(page AFDProfilesClientListResourceUsageResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AFDProfilesClientListResourceUsageResponse) (AFDProfilesClientListResourceUsageResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AFDProfilesClient.NewListResourceUsagePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, options) + }, nil) + if err != nil { + return AFDProfilesClientListResourceUsageResponse{}, err + } + return client.listResourceUsageHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listResourceUsageCreateRequest creates the ListResourceUsage request. +func (client *AFDProfilesClient) listResourceUsageCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *AFDProfilesClientListResourceUsageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listResourceUsageHandleResponse handles the ListResourceUsage response. +func (client *AFDProfilesClient) listResourceUsageHandleResponse(resp *http.Response) (AFDProfilesClientListResourceUsageResponse, error) { + result := AFDProfilesClientListResourceUsageResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UsagesListResult); err != nil { + return AFDProfilesClientListResourceUsageResponse{}, err + } + return result, nil +} + +// BeginUpgrade - Upgrade a profile from StandardAzureFrontDoor to PremiumAzureFrontDoor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. +// - profileUpgradeParameters - Profile upgrade input parameter. +// - options - AFDProfilesClientBeginUpgradeOptions contains the optional parameters for the AFDProfilesClient.BeginUpgrade +// method. +func (client *AFDProfilesClient) BeginUpgrade(ctx context.Context, resourceGroupName string, profileName string, profileUpgradeParameters ProfileUpgradeParameters, options *AFDProfilesClientBeginUpgradeOptions) (*runtime.Poller[AFDProfilesClientUpgradeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.upgrade(ctx, resourceGroupName, profileName, profileUpgradeParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AFDProfilesClientUpgradeResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AFDProfilesClientUpgradeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Upgrade - Upgrade a profile from StandardAzureFrontDoor to PremiumAzureFrontDoor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *AFDProfilesClient) upgrade(ctx context.Context, resourceGroupName string, profileName string, profileUpgradeParameters ProfileUpgradeParameters, options *AFDProfilesClientBeginUpgradeOptions) (*http.Response, error) { + var err error + const operationName = "AFDProfilesClient.BeginUpgrade" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.upgradeCreateRequest(ctx, resourceGroupName, profileName, profileUpgradeParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// upgradeCreateRequest creates the Upgrade request. +func (client *AFDProfilesClient) upgradeCreateRequest(ctx context.Context, resourceGroupName string, profileName string, profileUpgradeParameters ProfileUpgradeParameters, options *AFDProfilesClientBeginUpgradeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/upgrade" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, profileUpgradeParameters); err != nil { + return nil, err + } + return req, nil +} + +// ValidateSecret - Validate a Secret in the profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. +// - validateSecretInput - The Secret source. +// - options - AFDProfilesClientValidateSecretOptions contains the optional parameters for the AFDProfilesClient.ValidateSecret +// method. +func (client *AFDProfilesClient) ValidateSecret(ctx context.Context, resourceGroupName string, profileName string, validateSecretInput ValidateSecretInput, options *AFDProfilesClientValidateSecretOptions) (AFDProfilesClientValidateSecretResponse, error) { + var err error + const operationName = "AFDProfilesClient.ValidateSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateSecretCreateRequest(ctx, resourceGroupName, profileName, validateSecretInput, options) + if err != nil { + return AFDProfilesClientValidateSecretResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AFDProfilesClientValidateSecretResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AFDProfilesClientValidateSecretResponse{}, err + } + resp, err := client.validateSecretHandleResponse(httpResp) + return resp, err +} + +// validateSecretCreateRequest creates the ValidateSecret request. +func (client *AFDProfilesClient) validateSecretCreateRequest(ctx context.Context, resourceGroupName string, profileName string, validateSecretInput ValidateSecretInput, options *AFDProfilesClientValidateSecretOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/validateSecret" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, validateSecretInput); err != nil { + return nil, err + } + return req, nil +} + +// validateSecretHandleResponse handles the ValidateSecret response. +func (client *AFDProfilesClient) validateSecretHandleResponse(resp *http.Response) (AFDProfilesClientValidateSecretResponse, error) { + result := AFDProfilesClientValidateSecretResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ValidateSecretOutput); err != nil { + return AFDProfilesClientValidateSecretResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/assets.json new file mode 100644 index 00000000..2a0eb6f8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/cdn/armcdn", + "Tag": "go/resourcemanager/cdn/armcdn_886242a335" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/autorest.md new file mode 100644 index 00000000..925bd17e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/autorest.md @@ -0,0 +1,15 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/cdn/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 2.2.0 +modelerfour: + lenient-model-deduplication: true +tag: package-2024-02 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/build.go new file mode 100644 index 00000000..0a5c153f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -removeUnreferencedTypes resourcemanager/cdn/armcdn + +package armcdn diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/ci.yml new file mode 100644 index 00000000..29cbff2e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/ci.yml @@ -0,0 +1,28 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/cdn/armcdn/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/cdn/armcdn/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/cdn/armcdn' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/client_factory.go new file mode 100644 index 00000000..92c97e31 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/client_factory.go @@ -0,0 +1,211 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - Azure Subscription ID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewAFDCustomDomainsClient creates a new instance of AFDCustomDomainsClient. +func (c *ClientFactory) NewAFDCustomDomainsClient() *AFDCustomDomainsClient { + return &AFDCustomDomainsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAFDEndpointsClient creates a new instance of AFDEndpointsClient. +func (c *ClientFactory) NewAFDEndpointsClient() *AFDEndpointsClient { + return &AFDEndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAFDOriginGroupsClient creates a new instance of AFDOriginGroupsClient. +func (c *ClientFactory) NewAFDOriginGroupsClient() *AFDOriginGroupsClient { + return &AFDOriginGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAFDOriginsClient creates a new instance of AFDOriginsClient. +func (c *ClientFactory) NewAFDOriginsClient() *AFDOriginsClient { + return &AFDOriginsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAFDProfilesClient creates a new instance of AFDProfilesClient. +func (c *ClientFactory) NewAFDProfilesClient() *AFDProfilesClient { + return &AFDProfilesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCustomDomainsClient creates a new instance of CustomDomainsClient. +func (c *ClientFactory) NewCustomDomainsClient() *CustomDomainsClient { + return &CustomDomainsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewEdgeNodesClient creates a new instance of EdgeNodesClient. +func (c *ClientFactory) NewEdgeNodesClient() *EdgeNodesClient { + return &EdgeNodesClient{ + internal: c.internal, + } +} + +// NewEndpointsClient creates a new instance of EndpointsClient. +func (c *ClientFactory) NewEndpointsClient() *EndpointsClient { + return &EndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLogAnalyticsClient creates a new instance of LogAnalyticsClient. +func (c *ClientFactory) NewLogAnalyticsClient() *LogAnalyticsClient { + return &LogAnalyticsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagedRuleSetsClient creates a new instance of ManagedRuleSetsClient. +func (c *ClientFactory) NewManagedRuleSetsClient() *ManagedRuleSetsClient { + return &ManagedRuleSetsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagementClient creates a new instance of ManagementClient. +func (c *ClientFactory) NewManagementClient() *ManagementClient { + return &ManagementClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewOriginGroupsClient creates a new instance of OriginGroupsClient. +func (c *ClientFactory) NewOriginGroupsClient() *OriginGroupsClient { + return &OriginGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOriginsClient creates a new instance of OriginsClient. +func (c *ClientFactory) NewOriginsClient() *OriginsClient { + return &OriginsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPoliciesClient creates a new instance of PoliciesClient. +func (c *ClientFactory) NewPoliciesClient() *PoliciesClient { + return &PoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProfilesClient creates a new instance of ProfilesClient. +func (c *ClientFactory) NewProfilesClient() *ProfilesClient { + return &ProfilesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewResourceUsageClient creates a new instance of ResourceUsageClient. +func (c *ClientFactory) NewResourceUsageClient() *ResourceUsageClient { + return &ResourceUsageClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRoutesClient creates a new instance of RoutesClient. +func (c *ClientFactory) NewRoutesClient() *RoutesClient { + return &RoutesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRuleSetsClient creates a new instance of RuleSetsClient. +func (c *ClientFactory) NewRuleSetsClient() *RuleSetsClient { + return &RuleSetsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRulesClient creates a new instance of RulesClient. +func (c *ClientFactory) NewRulesClient() *RulesClient { + return &RulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSecretsClient creates a new instance of SecretsClient. +func (c *ClientFactory) NewSecretsClient() *SecretsClient { + return &SecretsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSecurityPoliciesClient creates a new instance of SecurityPoliciesClient. +func (c *ClientFactory) NewSecurityPoliciesClient() *SecurityPoliciesClient { + return &SecurityPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/constants.go new file mode 100644 index 00000000..9373b83d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/constants.go @@ -0,0 +1,2797 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn" + moduleVersion = "v2.2.0" +) + +// AFDEndpointProtocols - Supported protocols for the customer's endpoint. +type AFDEndpointProtocols string + +const ( + AFDEndpointProtocolsHTTP AFDEndpointProtocols = "Http" + AFDEndpointProtocolsHTTPS AFDEndpointProtocols = "Https" +) + +// PossibleAFDEndpointProtocolsValues returns the possible values for the AFDEndpointProtocols const type. +func PossibleAFDEndpointProtocolsValues() []AFDEndpointProtocols { + return []AFDEndpointProtocols{ + AFDEndpointProtocolsHTTP, + AFDEndpointProtocolsHTTPS, + } +} + +// ActionType - Defines the action to take on rule match. +type ActionType string + +const ( + ActionTypeAllow ActionType = "Allow" + ActionTypeBlock ActionType = "Block" + ActionTypeLog ActionType = "Log" + ActionTypeRedirect ActionType = "Redirect" +) + +// PossibleActionTypeValues returns the possible values for the ActionType const type. +func PossibleActionTypeValues() []ActionType { + return []ActionType{ + ActionTypeAllow, + ActionTypeBlock, + ActionTypeLog, + ActionTypeRedirect, + } +} + +// AfdCertificateType - Defines the source of the SSL certificate. +type AfdCertificateType string + +const ( + AfdCertificateTypeAzureFirstPartyManagedCertificate AfdCertificateType = "AzureFirstPartyManagedCertificate" + AfdCertificateTypeCustomerCertificate AfdCertificateType = "CustomerCertificate" + AfdCertificateTypeManagedCertificate AfdCertificateType = "ManagedCertificate" +) + +// PossibleAfdCertificateTypeValues returns the possible values for the AfdCertificateType const type. +func PossibleAfdCertificateTypeValues() []AfdCertificateType { + return []AfdCertificateType{ + AfdCertificateTypeAzureFirstPartyManagedCertificate, + AfdCertificateTypeCustomerCertificate, + AfdCertificateTypeManagedCertificate, + } +} + +// AfdMinimumTLSVersion - TLS protocol version that will be used for Https +type AfdMinimumTLSVersion string + +const ( + AfdMinimumTLSVersionTLS10 AfdMinimumTLSVersion = "TLS10" + AfdMinimumTLSVersionTLS12 AfdMinimumTLSVersion = "TLS12" +) + +// PossibleAfdMinimumTLSVersionValues returns the possible values for the AfdMinimumTLSVersion const type. +func PossibleAfdMinimumTLSVersionValues() []AfdMinimumTLSVersion { + return []AfdMinimumTLSVersion{ + AfdMinimumTLSVersionTLS10, + AfdMinimumTLSVersionTLS12, + } +} + +// AfdProvisioningState - Provisioning status +type AfdProvisioningState string + +const ( + AfdProvisioningStateCreating AfdProvisioningState = "Creating" + AfdProvisioningStateDeleting AfdProvisioningState = "Deleting" + AfdProvisioningStateFailed AfdProvisioningState = "Failed" + AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded" + AfdProvisioningStateUpdating AfdProvisioningState = "Updating" +) + +// PossibleAfdProvisioningStateValues returns the possible values for the AfdProvisioningState const type. +func PossibleAfdProvisioningStateValues() []AfdProvisioningState { + return []AfdProvisioningState{ + AfdProvisioningStateCreating, + AfdProvisioningStateDeleting, + AfdProvisioningStateFailed, + AfdProvisioningStateSucceeded, + AfdProvisioningStateUpdating, + } +} + +// AfdQueryStringCachingBehavior - Defines how Frontdoor caches requests that include query strings. You can ignore any query +// strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific +// query strings. +type AfdQueryStringCachingBehavior string + +const ( + AfdQueryStringCachingBehaviorIgnoreQueryString AfdQueryStringCachingBehavior = "IgnoreQueryString" + AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings AfdQueryStringCachingBehavior = "IgnoreSpecifiedQueryStrings" + AfdQueryStringCachingBehaviorIncludeSpecifiedQueryStrings AfdQueryStringCachingBehavior = "IncludeSpecifiedQueryStrings" + AfdQueryStringCachingBehaviorUseQueryString AfdQueryStringCachingBehavior = "UseQueryString" +) + +// PossibleAfdQueryStringCachingBehaviorValues returns the possible values for the AfdQueryStringCachingBehavior const type. +func PossibleAfdQueryStringCachingBehaviorValues() []AfdQueryStringCachingBehavior { + return []AfdQueryStringCachingBehavior{ + AfdQueryStringCachingBehaviorIgnoreQueryString, + AfdQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings, + AfdQueryStringCachingBehaviorIncludeSpecifiedQueryStrings, + AfdQueryStringCachingBehaviorUseQueryString, + } +} + +// Algorithm - Algorithm to use for URL signing +type Algorithm string + +const ( + AlgorithmSHA256 Algorithm = "SHA256" +) + +// PossibleAlgorithmValues returns the possible values for the Algorithm const type. +func PossibleAlgorithmValues() []Algorithm { + return []Algorithm{ + AlgorithmSHA256, + } +} + +// AutoGeneratedDomainNameLabelScope - Indicates the endpoint name reuse scope. The default value is TenantReuse. +type AutoGeneratedDomainNameLabelScope string + +const ( + AutoGeneratedDomainNameLabelScopeNoReuse AutoGeneratedDomainNameLabelScope = "NoReuse" + AutoGeneratedDomainNameLabelScopeResourceGroupReuse AutoGeneratedDomainNameLabelScope = "ResourceGroupReuse" + AutoGeneratedDomainNameLabelScopeSubscriptionReuse AutoGeneratedDomainNameLabelScope = "SubscriptionReuse" + AutoGeneratedDomainNameLabelScopeTenantReuse AutoGeneratedDomainNameLabelScope = "TenantReuse" +) + +// PossibleAutoGeneratedDomainNameLabelScopeValues returns the possible values for the AutoGeneratedDomainNameLabelScope const type. +func PossibleAutoGeneratedDomainNameLabelScopeValues() []AutoGeneratedDomainNameLabelScope { + return []AutoGeneratedDomainNameLabelScope{ + AutoGeneratedDomainNameLabelScopeNoReuse, + AutoGeneratedDomainNameLabelScopeResourceGroupReuse, + AutoGeneratedDomainNameLabelScopeSubscriptionReuse, + AutoGeneratedDomainNameLabelScopeTenantReuse, + } +} + +// CacheBehavior - Caching behavior for the requests +type CacheBehavior string + +const ( + CacheBehaviorBypassCache CacheBehavior = "BypassCache" + CacheBehaviorOverride CacheBehavior = "Override" + CacheBehaviorSetIfMissing CacheBehavior = "SetIfMissing" +) + +// PossibleCacheBehaviorValues returns the possible values for the CacheBehavior const type. +func PossibleCacheBehaviorValues() []CacheBehavior { + return []CacheBehavior{ + CacheBehaviorBypassCache, + CacheBehaviorOverride, + CacheBehaviorSetIfMissing, + } +} + +type CacheExpirationActionParametersTypeName string + +const ( + CacheExpirationActionParametersTypeNameDeliveryRuleCacheExpirationActionParameters CacheExpirationActionParametersTypeName = "DeliveryRuleCacheExpirationActionParameters" +) + +// PossibleCacheExpirationActionParametersTypeNameValues returns the possible values for the CacheExpirationActionParametersTypeName const type. +func PossibleCacheExpirationActionParametersTypeNameValues() []CacheExpirationActionParametersTypeName { + return []CacheExpirationActionParametersTypeName{ + CacheExpirationActionParametersTypeNameDeliveryRuleCacheExpirationActionParameters, + } +} + +type CacheKeyQueryStringActionParametersTypeName string + +const ( + CacheKeyQueryStringActionParametersTypeNameDeliveryRuleCacheKeyQueryStringBehaviorActionParameters CacheKeyQueryStringActionParametersTypeName = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" +) + +// PossibleCacheKeyQueryStringActionParametersTypeNameValues returns the possible values for the CacheKeyQueryStringActionParametersTypeName const type. +func PossibleCacheKeyQueryStringActionParametersTypeNameValues() []CacheKeyQueryStringActionParametersTypeName { + return []CacheKeyQueryStringActionParametersTypeName{ + CacheKeyQueryStringActionParametersTypeNameDeliveryRuleCacheKeyQueryStringBehaviorActionParameters, + } +} + +// CacheType - The level at which the content needs to be cached. +type CacheType string + +const ( + CacheTypeAll CacheType = "All" +) + +// PossibleCacheTypeValues returns the possible values for the CacheType const type. +func PossibleCacheTypeValues() []CacheType { + return []CacheType{ + CacheTypeAll, + } +} + +// CanMigrateDefaultSKU - Recommended sku for the migration +type CanMigrateDefaultSKU string + +const ( + CanMigrateDefaultSKUPremiumAzureFrontDoor CanMigrateDefaultSKU = "Premium_AzureFrontDoor" + CanMigrateDefaultSKUStandardAzureFrontDoor CanMigrateDefaultSKU = "Standard_AzureFrontDoor" +) + +// PossibleCanMigrateDefaultSKUValues returns the possible values for the CanMigrateDefaultSKU const type. +func PossibleCanMigrateDefaultSKUValues() []CanMigrateDefaultSKU { + return []CanMigrateDefaultSKU{ + CanMigrateDefaultSKUPremiumAzureFrontDoor, + CanMigrateDefaultSKUStandardAzureFrontDoor, + } +} + +type CdnCertificateSourceParametersTypeName string + +const ( + CdnCertificateSourceParametersTypeNameCdnCertificateSourceParameters CdnCertificateSourceParametersTypeName = "CdnCertificateSourceParameters" +) + +// PossibleCdnCertificateSourceParametersTypeNameValues returns the possible values for the CdnCertificateSourceParametersTypeName const type. +func PossibleCdnCertificateSourceParametersTypeNameValues() []CdnCertificateSourceParametersTypeName { + return []CdnCertificateSourceParametersTypeName{ + CdnCertificateSourceParametersTypeNameCdnCertificateSourceParameters, + } +} + +// CertificateSource - Defines the source of the SSL certificate. +type CertificateSource string + +const ( + CertificateSourceAzureKeyVault CertificateSource = "AzureKeyVault" + CertificateSourceCdn CertificateSource = "Cdn" +) + +// PossibleCertificateSourceValues returns the possible values for the CertificateSource const type. +func PossibleCertificateSourceValues() []CertificateSource { + return []CertificateSource{ + CertificateSourceAzureKeyVault, + CertificateSourceCdn, + } +} + +// CertificateType - Type of certificate used +type CertificateType string + +const ( + CertificateTypeDedicated CertificateType = "Dedicated" + CertificateTypeShared CertificateType = "Shared" +) + +// PossibleCertificateTypeValues returns the possible values for the CertificateType const type. +func PossibleCertificateTypeValues() []CertificateType { + return []CertificateType{ + CertificateTypeDedicated, + CertificateTypeShared, + } +} + +type ClientPortMatchConditionParametersTypeName string + +const ( + ClientPortMatchConditionParametersTypeNameDeliveryRuleClientPortConditionParameters ClientPortMatchConditionParametersTypeName = "DeliveryRuleClientPortConditionParameters" +) + +// PossibleClientPortMatchConditionParametersTypeNameValues returns the possible values for the ClientPortMatchConditionParametersTypeName const type. +func PossibleClientPortMatchConditionParametersTypeNameValues() []ClientPortMatchConditionParametersTypeName { + return []ClientPortMatchConditionParametersTypeName{ + ClientPortMatchConditionParametersTypeNameDeliveryRuleClientPortConditionParameters, + } +} + +// ClientPortOperator - Describes operator to be matched +type ClientPortOperator string + +const ( + ClientPortOperatorAny ClientPortOperator = "Any" + ClientPortOperatorBeginsWith ClientPortOperator = "BeginsWith" + ClientPortOperatorContains ClientPortOperator = "Contains" + ClientPortOperatorEndsWith ClientPortOperator = "EndsWith" + ClientPortOperatorEqual ClientPortOperator = "Equal" + ClientPortOperatorGreaterThan ClientPortOperator = "GreaterThan" + ClientPortOperatorGreaterThanOrEqual ClientPortOperator = "GreaterThanOrEqual" + ClientPortOperatorLessThan ClientPortOperator = "LessThan" + ClientPortOperatorLessThanOrEqual ClientPortOperator = "LessThanOrEqual" + ClientPortOperatorRegEx ClientPortOperator = "RegEx" +) + +// PossibleClientPortOperatorValues returns the possible values for the ClientPortOperator const type. +func PossibleClientPortOperatorValues() []ClientPortOperator { + return []ClientPortOperator{ + ClientPortOperatorAny, + ClientPortOperatorBeginsWith, + ClientPortOperatorContains, + ClientPortOperatorEndsWith, + ClientPortOperatorEqual, + ClientPortOperatorGreaterThan, + ClientPortOperatorGreaterThanOrEqual, + ClientPortOperatorLessThan, + ClientPortOperatorLessThanOrEqual, + ClientPortOperatorRegEx, + } +} + +type CookiesMatchConditionParametersTypeName string + +const ( + CookiesMatchConditionParametersTypeNameDeliveryRuleCookiesConditionParameters CookiesMatchConditionParametersTypeName = "DeliveryRuleCookiesConditionParameters" +) + +// PossibleCookiesMatchConditionParametersTypeNameValues returns the possible values for the CookiesMatchConditionParametersTypeName const type. +func PossibleCookiesMatchConditionParametersTypeNameValues() []CookiesMatchConditionParametersTypeName { + return []CookiesMatchConditionParametersTypeName{ + CookiesMatchConditionParametersTypeNameDeliveryRuleCookiesConditionParameters, + } +} + +// CookiesOperator - Describes operator to be matched +type CookiesOperator string + +const ( + CookiesOperatorAny CookiesOperator = "Any" + CookiesOperatorBeginsWith CookiesOperator = "BeginsWith" + CookiesOperatorContains CookiesOperator = "Contains" + CookiesOperatorEndsWith CookiesOperator = "EndsWith" + CookiesOperatorEqual CookiesOperator = "Equal" + CookiesOperatorGreaterThan CookiesOperator = "GreaterThan" + CookiesOperatorGreaterThanOrEqual CookiesOperator = "GreaterThanOrEqual" + CookiesOperatorLessThan CookiesOperator = "LessThan" + CookiesOperatorLessThanOrEqual CookiesOperator = "LessThanOrEqual" + CookiesOperatorRegEx CookiesOperator = "RegEx" +) + +// PossibleCookiesOperatorValues returns the possible values for the CookiesOperator const type. +func PossibleCookiesOperatorValues() []CookiesOperator { + return []CookiesOperator{ + CookiesOperatorAny, + CookiesOperatorBeginsWith, + CookiesOperatorContains, + CookiesOperatorEndsWith, + CookiesOperatorEqual, + CookiesOperatorGreaterThan, + CookiesOperatorGreaterThanOrEqual, + CookiesOperatorLessThan, + CookiesOperatorLessThanOrEqual, + CookiesOperatorRegEx, + } +} + +// CustomDomainResourceState - Resource status of the custom domain. +type CustomDomainResourceState string + +const ( + CustomDomainResourceStateActive CustomDomainResourceState = "Active" + CustomDomainResourceStateCreating CustomDomainResourceState = "Creating" + CustomDomainResourceStateDeleting CustomDomainResourceState = "Deleting" +) + +// PossibleCustomDomainResourceStateValues returns the possible values for the CustomDomainResourceState const type. +func PossibleCustomDomainResourceStateValues() []CustomDomainResourceState { + return []CustomDomainResourceState{ + CustomDomainResourceStateActive, + CustomDomainResourceStateCreating, + CustomDomainResourceStateDeleting, + } +} + +// CustomHTTPSProvisioningState - Provisioning status of the custom domain. +type CustomHTTPSProvisioningState string + +const ( + CustomHTTPSProvisioningStateDisabled CustomHTTPSProvisioningState = "Disabled" + CustomHTTPSProvisioningStateDisabling CustomHTTPSProvisioningState = "Disabling" + CustomHTTPSProvisioningStateEnabled CustomHTTPSProvisioningState = "Enabled" + CustomHTTPSProvisioningStateEnabling CustomHTTPSProvisioningState = "Enabling" + CustomHTTPSProvisioningStateFailed CustomHTTPSProvisioningState = "Failed" +) + +// PossibleCustomHTTPSProvisioningStateValues returns the possible values for the CustomHTTPSProvisioningState const type. +func PossibleCustomHTTPSProvisioningStateValues() []CustomHTTPSProvisioningState { + return []CustomHTTPSProvisioningState{ + CustomHTTPSProvisioningStateDisabled, + CustomHTTPSProvisioningStateDisabling, + CustomHTTPSProvisioningStateEnabled, + CustomHTTPSProvisioningStateEnabling, + CustomHTTPSProvisioningStateFailed, + } +} + +// CustomHTTPSProvisioningSubstate - Provisioning substate shows the progress of custom HTTPS enabling/disabling process step +// by step. +type CustomHTTPSProvisioningSubstate string + +const ( + CustomHTTPSProvisioningSubstateCertificateDeleted CustomHTTPSProvisioningSubstate = "CertificateDeleted" + CustomHTTPSProvisioningSubstateCertificateDeployed CustomHTTPSProvisioningSubstate = "CertificateDeployed" + CustomHTTPSProvisioningSubstateDeletingCertificate CustomHTTPSProvisioningSubstate = "DeletingCertificate" + CustomHTTPSProvisioningSubstateDeployingCertificate CustomHTTPSProvisioningSubstate = "DeployingCertificate" + CustomHTTPSProvisioningSubstateDomainControlValidationRequestApproved CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestApproved" + CustomHTTPSProvisioningSubstateDomainControlValidationRequestRejected CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestRejected" + CustomHTTPSProvisioningSubstateDomainControlValidationRequestTimedOut CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestTimedOut" + CustomHTTPSProvisioningSubstateIssuingCertificate CustomHTTPSProvisioningSubstate = "IssuingCertificate" + CustomHTTPSProvisioningSubstatePendingDomainControlValidationREquestApproval CustomHTTPSProvisioningSubstate = "PendingDomainControlValidationREquestApproval" + CustomHTTPSProvisioningSubstateSubmittingDomainControlValidationRequest CustomHTTPSProvisioningSubstate = "SubmittingDomainControlValidationRequest" +) + +// PossibleCustomHTTPSProvisioningSubstateValues returns the possible values for the CustomHTTPSProvisioningSubstate const type. +func PossibleCustomHTTPSProvisioningSubstateValues() []CustomHTTPSProvisioningSubstate { + return []CustomHTTPSProvisioningSubstate{ + CustomHTTPSProvisioningSubstateCertificateDeleted, + CustomHTTPSProvisioningSubstateCertificateDeployed, + CustomHTTPSProvisioningSubstateDeletingCertificate, + CustomHTTPSProvisioningSubstateDeployingCertificate, + CustomHTTPSProvisioningSubstateDomainControlValidationRequestApproved, + CustomHTTPSProvisioningSubstateDomainControlValidationRequestRejected, + CustomHTTPSProvisioningSubstateDomainControlValidationRequestTimedOut, + CustomHTTPSProvisioningSubstateIssuingCertificate, + CustomHTTPSProvisioningSubstatePendingDomainControlValidationREquestApproval, + CustomHTTPSProvisioningSubstateSubmittingDomainControlValidationRequest, + } +} + +// CustomRuleEnabledState - Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. +type CustomRuleEnabledState string + +const ( + CustomRuleEnabledStateDisabled CustomRuleEnabledState = "Disabled" + CustomRuleEnabledStateEnabled CustomRuleEnabledState = "Enabled" +) + +// PossibleCustomRuleEnabledStateValues returns the possible values for the CustomRuleEnabledState const type. +func PossibleCustomRuleEnabledStateValues() []CustomRuleEnabledState { + return []CustomRuleEnabledState{ + CustomRuleEnabledStateDisabled, + CustomRuleEnabledStateEnabled, + } +} + +// DeleteRule - Describes the action that shall be taken when the certificate is removed from Key Vault. +type DeleteRule string + +const ( + DeleteRuleNoAction DeleteRule = "NoAction" +) + +// PossibleDeleteRuleValues returns the possible values for the DeleteRule const type. +func PossibleDeleteRuleValues() []DeleteRule { + return []DeleteRule{ + DeleteRuleNoAction, + } +} + +// DeliveryRuleAction - The name of the action for the delivery rule. +type DeliveryRuleAction string + +const ( + DeliveryRuleActionCacheExpiration DeliveryRuleAction = "CacheExpiration" + DeliveryRuleActionCacheKeyQueryString DeliveryRuleAction = "CacheKeyQueryString" + DeliveryRuleActionModifyRequestHeader DeliveryRuleAction = "ModifyRequestHeader" + DeliveryRuleActionModifyResponseHeader DeliveryRuleAction = "ModifyResponseHeader" + DeliveryRuleActionOriginGroupOverride DeliveryRuleAction = "OriginGroupOverride" + DeliveryRuleActionRouteConfigurationOverride DeliveryRuleAction = "RouteConfigurationOverride" + DeliveryRuleActionURLRedirect DeliveryRuleAction = "UrlRedirect" + DeliveryRuleActionURLRewrite DeliveryRuleAction = "UrlRewrite" + DeliveryRuleActionURLSigning DeliveryRuleAction = "UrlSigning" +) + +// PossibleDeliveryRuleActionValues returns the possible values for the DeliveryRuleAction const type. +func PossibleDeliveryRuleActionValues() []DeliveryRuleAction { + return []DeliveryRuleAction{ + DeliveryRuleActionCacheExpiration, + DeliveryRuleActionCacheKeyQueryString, + DeliveryRuleActionModifyRequestHeader, + DeliveryRuleActionModifyResponseHeader, + DeliveryRuleActionOriginGroupOverride, + DeliveryRuleActionRouteConfigurationOverride, + DeliveryRuleActionURLRedirect, + DeliveryRuleActionURLRewrite, + DeliveryRuleActionURLSigning, + } +} + +type DeploymentStatus string + +const ( + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusInProgress DeploymentStatus = "InProgress" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" + DeploymentStatusSucceeded DeploymentStatus = "Succeeded" +) + +// PossibleDeploymentStatusValues returns the possible values for the DeploymentStatus const type. +func PossibleDeploymentStatusValues() []DeploymentStatus { + return []DeploymentStatus{ + DeploymentStatusFailed, + DeploymentStatusInProgress, + DeploymentStatusNotStarted, + DeploymentStatusSucceeded, + } +} + +// DestinationProtocol - Protocol to use for the redirect. The default value is MatchRequest +type DestinationProtocol string + +const ( + DestinationProtocolHTTP DestinationProtocol = "Http" + DestinationProtocolHTTPS DestinationProtocol = "Https" + DestinationProtocolMatchRequest DestinationProtocol = "MatchRequest" +) + +// PossibleDestinationProtocolValues returns the possible values for the DestinationProtocol const type. +func PossibleDestinationProtocolValues() []DestinationProtocol { + return []DestinationProtocol{ + DestinationProtocolHTTP, + DestinationProtocolHTTPS, + DestinationProtocolMatchRequest, + } +} + +// DomainValidationState - Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. +// DCV stands for DomainControlValidation. +type DomainValidationState string + +const ( + DomainValidationStateApproved DomainValidationState = "Approved" + DomainValidationStateInternalError DomainValidationState = "InternalError" + DomainValidationStatePending DomainValidationState = "Pending" + DomainValidationStatePendingRevalidation DomainValidationState = "PendingRevalidation" + DomainValidationStateRefreshingValidationToken DomainValidationState = "RefreshingValidationToken" + DomainValidationStateRejected DomainValidationState = "Rejected" + DomainValidationStateSubmitting DomainValidationState = "Submitting" + DomainValidationStateTimedOut DomainValidationState = "TimedOut" + DomainValidationStateUnknown DomainValidationState = "Unknown" +) + +// PossibleDomainValidationStateValues returns the possible values for the DomainValidationState const type. +func PossibleDomainValidationStateValues() []DomainValidationState { + return []DomainValidationState{ + DomainValidationStateApproved, + DomainValidationStateInternalError, + DomainValidationStatePending, + DomainValidationStatePendingRevalidation, + DomainValidationStateRefreshingValidationToken, + DomainValidationStateRejected, + DomainValidationStateSubmitting, + DomainValidationStateTimedOut, + DomainValidationStateUnknown, + } +} + +// EnabledState - Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' +type EnabledState string + +const ( + EnabledStateDisabled EnabledState = "Disabled" + EnabledStateEnabled EnabledState = "Enabled" +) + +// PossibleEnabledStateValues returns the possible values for the EnabledState const type. +func PossibleEnabledStateValues() []EnabledState { + return []EnabledState{ + EnabledStateDisabled, + EnabledStateEnabled, + } +} + +// EndpointProvisioningState - Provisioning status of the endpoint. +type EndpointProvisioningState string + +const ( + EndpointProvisioningStateCreating EndpointProvisioningState = "Creating" + EndpointProvisioningStateDeleting EndpointProvisioningState = "Deleting" + EndpointProvisioningStateFailed EndpointProvisioningState = "Failed" + EndpointProvisioningStateSucceeded EndpointProvisioningState = "Succeeded" + EndpointProvisioningStateUpdating EndpointProvisioningState = "Updating" +) + +// PossibleEndpointProvisioningStateValues returns the possible values for the EndpointProvisioningState const type. +func PossibleEndpointProvisioningStateValues() []EndpointProvisioningState { + return []EndpointProvisioningState{ + EndpointProvisioningStateCreating, + EndpointProvisioningStateDeleting, + EndpointProvisioningStateFailed, + EndpointProvisioningStateSucceeded, + EndpointProvisioningStateUpdating, + } +} + +// EndpointResourceState - Resource status of the endpoint. +type EndpointResourceState string + +const ( + EndpointResourceStateCreating EndpointResourceState = "Creating" + EndpointResourceStateDeleting EndpointResourceState = "Deleting" + EndpointResourceStateRunning EndpointResourceState = "Running" + EndpointResourceStateStarting EndpointResourceState = "Starting" + EndpointResourceStateStopped EndpointResourceState = "Stopped" + EndpointResourceStateStopping EndpointResourceState = "Stopping" +) + +// PossibleEndpointResourceStateValues returns the possible values for the EndpointResourceState const type. +func PossibleEndpointResourceStateValues() []EndpointResourceState { + return []EndpointResourceState{ + EndpointResourceStateCreating, + EndpointResourceStateDeleting, + EndpointResourceStateRunning, + EndpointResourceStateStarting, + EndpointResourceStateStopped, + EndpointResourceStateStopping, + } +} + +// ForwardingProtocol - Protocol this rule will use when forwarding traffic to backends. +type ForwardingProtocol string + +const ( + ForwardingProtocolHTTPOnly ForwardingProtocol = "HttpOnly" + ForwardingProtocolHTTPSOnly ForwardingProtocol = "HttpsOnly" + ForwardingProtocolMatchRequest ForwardingProtocol = "MatchRequest" +) + +// PossibleForwardingProtocolValues returns the possible values for the ForwardingProtocol const type. +func PossibleForwardingProtocolValues() []ForwardingProtocol { + return []ForwardingProtocol{ + ForwardingProtocolHTTPOnly, + ForwardingProtocolHTTPSOnly, + ForwardingProtocolMatchRequest, + } +} + +// GeoFilterActions - Action of the geo filter, i.e. allow or block access. +type GeoFilterActions string + +const ( + GeoFilterActionsAllow GeoFilterActions = "Allow" + GeoFilterActionsBlock GeoFilterActions = "Block" +) + +// PossibleGeoFilterActionsValues returns the possible values for the GeoFilterActions const type. +func PossibleGeoFilterActionsValues() []GeoFilterActions { + return []GeoFilterActions{ + GeoFilterActionsAllow, + GeoFilterActionsBlock, + } +} + +// HTTPSRedirect - Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up +// this rule and it will be the first rule that gets executed. +type HTTPSRedirect string + +const ( + HTTPSRedirectDisabled HTTPSRedirect = "Disabled" + HTTPSRedirectEnabled HTTPSRedirect = "Enabled" +) + +// PossibleHTTPSRedirectValues returns the possible values for the HTTPSRedirect const type. +func PossibleHTTPSRedirectValues() []HTTPSRedirect { + return []HTTPSRedirect{ + HTTPSRedirectDisabled, + HTTPSRedirectEnabled, + } +} + +type HTTPVersionMatchConditionParametersTypeName string + +const ( + HTTPVersionMatchConditionParametersTypeNameDeliveryRuleHTTPVersionConditionParameters HTTPVersionMatchConditionParametersTypeName = "DeliveryRuleHttpVersionConditionParameters" +) + +// PossibleHTTPVersionMatchConditionParametersTypeNameValues returns the possible values for the HTTPVersionMatchConditionParametersTypeName const type. +func PossibleHTTPVersionMatchConditionParametersTypeNameValues() []HTTPVersionMatchConditionParametersTypeName { + return []HTTPVersionMatchConditionParametersTypeName{ + HTTPVersionMatchConditionParametersTypeNameDeliveryRuleHTTPVersionConditionParameters, + } +} + +// HTTPVersionOperator - Describes operator to be matched +type HTTPVersionOperator string + +const ( + HTTPVersionOperatorEqual HTTPVersionOperator = "Equal" +) + +// PossibleHTTPVersionOperatorValues returns the possible values for the HTTPVersionOperator const type. +func PossibleHTTPVersionOperatorValues() []HTTPVersionOperator { + return []HTTPVersionOperator{ + HTTPVersionOperatorEqual, + } +} + +// HeaderAction - Action to perform +type HeaderAction string + +const ( + HeaderActionAppend HeaderAction = "Append" + HeaderActionDelete HeaderAction = "Delete" + HeaderActionOverwrite HeaderAction = "Overwrite" +) + +// PossibleHeaderActionValues returns the possible values for the HeaderAction const type. +func PossibleHeaderActionValues() []HeaderAction { + return []HeaderAction{ + HeaderActionAppend, + HeaderActionDelete, + HeaderActionOverwrite, + } +} + +type HeaderActionParametersTypeName string + +const ( + HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters HeaderActionParametersTypeName = "DeliveryRuleHeaderActionParameters" +) + +// PossibleHeaderActionParametersTypeNameValues returns the possible values for the HeaderActionParametersTypeName const type. +func PossibleHeaderActionParametersTypeNameValues() []HeaderActionParametersTypeName { + return []HeaderActionParametersTypeName{ + HeaderActionParametersTypeNameDeliveryRuleHeaderActionParameters, + } +} + +// HealthProbeRequestType - The type of health probe request that is made. +type HealthProbeRequestType string + +const ( + HealthProbeRequestTypeGET HealthProbeRequestType = "GET" + HealthProbeRequestTypeHEAD HealthProbeRequestType = "HEAD" + HealthProbeRequestTypeNotSet HealthProbeRequestType = "NotSet" +) + +// PossibleHealthProbeRequestTypeValues returns the possible values for the HealthProbeRequestType const type. +func PossibleHealthProbeRequestTypeValues() []HealthProbeRequestType { + return []HealthProbeRequestType{ + HealthProbeRequestTypeGET, + HealthProbeRequestTypeHEAD, + HealthProbeRequestTypeNotSet, + } +} + +type HostNameMatchConditionParametersTypeName string + +const ( + HostNameMatchConditionParametersTypeNameDeliveryRuleHostNameConditionParameters HostNameMatchConditionParametersTypeName = "DeliveryRuleHostNameConditionParameters" +) + +// PossibleHostNameMatchConditionParametersTypeNameValues returns the possible values for the HostNameMatchConditionParametersTypeName const type. +func PossibleHostNameMatchConditionParametersTypeNameValues() []HostNameMatchConditionParametersTypeName { + return []HostNameMatchConditionParametersTypeName{ + HostNameMatchConditionParametersTypeNameDeliveryRuleHostNameConditionParameters, + } +} + +// HostNameOperator - Describes operator to be matched +type HostNameOperator string + +const ( + HostNameOperatorAny HostNameOperator = "Any" + HostNameOperatorBeginsWith HostNameOperator = "BeginsWith" + HostNameOperatorContains HostNameOperator = "Contains" + HostNameOperatorEndsWith HostNameOperator = "EndsWith" + HostNameOperatorEqual HostNameOperator = "Equal" + HostNameOperatorGreaterThan HostNameOperator = "GreaterThan" + HostNameOperatorGreaterThanOrEqual HostNameOperator = "GreaterThanOrEqual" + HostNameOperatorLessThan HostNameOperator = "LessThan" + HostNameOperatorLessThanOrEqual HostNameOperator = "LessThanOrEqual" + HostNameOperatorRegEx HostNameOperator = "RegEx" +) + +// PossibleHostNameOperatorValues returns the possible values for the HostNameOperator const type. +func PossibleHostNameOperatorValues() []HostNameOperator { + return []HostNameOperator{ + HostNameOperatorAny, + HostNameOperatorBeginsWith, + HostNameOperatorContains, + HostNameOperatorEndsWith, + HostNameOperatorEqual, + HostNameOperatorGreaterThan, + HostNameOperatorGreaterThanOrEqual, + HostNameOperatorLessThan, + HostNameOperatorLessThanOrEqual, + HostNameOperatorRegEx, + } +} + +// IdentityType - The type of identity that creates/modifies resources +type IdentityType string + +const ( + IdentityTypeApplication IdentityType = "application" + IdentityTypeKey IdentityType = "key" + IdentityTypeManagedIdentity IdentityType = "managedIdentity" + IdentityTypeUser IdentityType = "user" +) + +// PossibleIdentityTypeValues returns the possible values for the IdentityType const type. +func PossibleIdentityTypeValues() []IdentityType { + return []IdentityType{ + IdentityTypeApplication, + IdentityTypeKey, + IdentityTypeManagedIdentity, + IdentityTypeUser, + } +} + +type IsDeviceMatchConditionParametersMatchValuesItem string + +const ( + IsDeviceMatchConditionParametersMatchValuesItemDesktop IsDeviceMatchConditionParametersMatchValuesItem = "Desktop" + IsDeviceMatchConditionParametersMatchValuesItemMobile IsDeviceMatchConditionParametersMatchValuesItem = "Mobile" +) + +// PossibleIsDeviceMatchConditionParametersMatchValuesItemValues returns the possible values for the IsDeviceMatchConditionParametersMatchValuesItem const type. +func PossibleIsDeviceMatchConditionParametersMatchValuesItemValues() []IsDeviceMatchConditionParametersMatchValuesItem { + return []IsDeviceMatchConditionParametersMatchValuesItem{ + IsDeviceMatchConditionParametersMatchValuesItemDesktop, + IsDeviceMatchConditionParametersMatchValuesItemMobile, + } +} + +type IsDeviceMatchConditionParametersTypeName string + +const ( + IsDeviceMatchConditionParametersTypeNameDeliveryRuleIsDeviceConditionParameters IsDeviceMatchConditionParametersTypeName = "DeliveryRuleIsDeviceConditionParameters" +) + +// PossibleIsDeviceMatchConditionParametersTypeNameValues returns the possible values for the IsDeviceMatchConditionParametersTypeName const type. +func PossibleIsDeviceMatchConditionParametersTypeNameValues() []IsDeviceMatchConditionParametersTypeName { + return []IsDeviceMatchConditionParametersTypeName{ + IsDeviceMatchConditionParametersTypeNameDeliveryRuleIsDeviceConditionParameters, + } +} + +// IsDeviceOperator - Describes operator to be matched +type IsDeviceOperator string + +const ( + IsDeviceOperatorEqual IsDeviceOperator = "Equal" +) + +// PossibleIsDeviceOperatorValues returns the possible values for the IsDeviceOperator const type. +func PossibleIsDeviceOperatorValues() []IsDeviceOperator { + return []IsDeviceOperator{ + IsDeviceOperatorEqual, + } +} + +type KeyVaultCertificateSourceParametersTypeName string + +const ( + KeyVaultCertificateSourceParametersTypeNameKeyVaultCertificateSourceParameters KeyVaultCertificateSourceParametersTypeName = "KeyVaultCertificateSourceParameters" +) + +// PossibleKeyVaultCertificateSourceParametersTypeNameValues returns the possible values for the KeyVaultCertificateSourceParametersTypeName const type. +func PossibleKeyVaultCertificateSourceParametersTypeNameValues() []KeyVaultCertificateSourceParametersTypeName { + return []KeyVaultCertificateSourceParametersTypeName{ + KeyVaultCertificateSourceParametersTypeNameKeyVaultCertificateSourceParameters, + } +} + +type KeyVaultSigningKeyParametersTypeName string + +const ( + KeyVaultSigningKeyParametersTypeNameKeyVaultSigningKeyParameters KeyVaultSigningKeyParametersTypeName = "KeyVaultSigningKeyParameters" +) + +// PossibleKeyVaultSigningKeyParametersTypeNameValues returns the possible values for the KeyVaultSigningKeyParametersTypeName const type. +func PossibleKeyVaultSigningKeyParametersTypeNameValues() []KeyVaultSigningKeyParametersTypeName { + return []KeyVaultSigningKeyParametersTypeName{ + KeyVaultSigningKeyParametersTypeNameKeyVaultSigningKeyParameters, + } +} + +// LinkToDefaultDomain - whether this route will be linked to the default endpoint domain. +type LinkToDefaultDomain string + +const ( + LinkToDefaultDomainDisabled LinkToDefaultDomain = "Disabled" + LinkToDefaultDomainEnabled LinkToDefaultDomain = "Enabled" +) + +// PossibleLinkToDefaultDomainValues returns the possible values for the LinkToDefaultDomain const type. +func PossibleLinkToDefaultDomainValues() []LinkToDefaultDomain { + return []LinkToDefaultDomain{ + LinkToDefaultDomainDisabled, + LinkToDefaultDomainEnabled, + } +} + +type LogMetric string + +const ( + LogMetricClientRequestBandwidth LogMetric = "clientRequestBandwidth" + LogMetricClientRequestCount LogMetric = "clientRequestCount" + LogMetricClientRequestTraffic LogMetric = "clientRequestTraffic" + LogMetricOriginRequestBandwidth LogMetric = "originRequestBandwidth" + LogMetricOriginRequestTraffic LogMetric = "originRequestTraffic" + LogMetricTotalLatency LogMetric = "totalLatency" +) + +// PossibleLogMetricValues returns the possible values for the LogMetric const type. +func PossibleLogMetricValues() []LogMetric { + return []LogMetric{ + LogMetricClientRequestBandwidth, + LogMetricClientRequestCount, + LogMetricClientRequestTraffic, + LogMetricOriginRequestBandwidth, + LogMetricOriginRequestTraffic, + LogMetricTotalLatency, + } +} + +type LogMetricsGranularity string + +const ( + LogMetricsGranularityP1D LogMetricsGranularity = "P1D" + LogMetricsGranularityPT1H LogMetricsGranularity = "PT1H" + LogMetricsGranularityPT5M LogMetricsGranularity = "PT5M" +) + +// PossibleLogMetricsGranularityValues returns the possible values for the LogMetricsGranularity const type. +func PossibleLogMetricsGranularityValues() []LogMetricsGranularity { + return []LogMetricsGranularity{ + LogMetricsGranularityP1D, + LogMetricsGranularityPT1H, + LogMetricsGranularityPT5M, + } +} + +type LogMetricsGroupBy string + +const ( + LogMetricsGroupByCacheStatus LogMetricsGroupBy = "cacheStatus" + LogMetricsGroupByCountryOrRegion LogMetricsGroupBy = "countryOrRegion" + LogMetricsGroupByCustomDomain LogMetricsGroupBy = "customDomain" + LogMetricsGroupByHTTPStatusCode LogMetricsGroupBy = "httpStatusCode" + LogMetricsGroupByProtocol LogMetricsGroupBy = "protocol" +) + +// PossibleLogMetricsGroupByValues returns the possible values for the LogMetricsGroupBy const type. +func PossibleLogMetricsGroupByValues() []LogMetricsGroupBy { + return []LogMetricsGroupBy{ + LogMetricsGroupByCacheStatus, + LogMetricsGroupByCountryOrRegion, + LogMetricsGroupByCustomDomain, + LogMetricsGroupByHTTPStatusCode, + LogMetricsGroupByProtocol, + } +} + +type LogRanking string + +const ( + LogRankingBrowser LogRanking = "browser" + LogRankingCountryOrRegion LogRanking = "countryOrRegion" + LogRankingReferrer LogRanking = "referrer" + LogRankingURL LogRanking = "url" + LogRankingUserAgent LogRanking = "userAgent" +) + +// PossibleLogRankingValues returns the possible values for the LogRanking const type. +func PossibleLogRankingValues() []LogRanking { + return []LogRanking{ + LogRankingBrowser, + LogRankingCountryOrRegion, + LogRankingReferrer, + LogRankingURL, + LogRankingUserAgent, + } +} + +type LogRankingMetric string + +const ( + LogRankingMetricClientRequestCount LogRankingMetric = "clientRequestCount" + LogRankingMetricClientRequestTraffic LogRankingMetric = "clientRequestTraffic" + LogRankingMetricErrorCount LogRankingMetric = "errorCount" + LogRankingMetricHitCount LogRankingMetric = "hitCount" + LogRankingMetricMissCount LogRankingMetric = "missCount" + LogRankingMetricUserErrorCount LogRankingMetric = "userErrorCount" +) + +// PossibleLogRankingMetricValues returns the possible values for the LogRankingMetric const type. +func PossibleLogRankingMetricValues() []LogRankingMetric { + return []LogRankingMetric{ + LogRankingMetricClientRequestCount, + LogRankingMetricClientRequestTraffic, + LogRankingMetricErrorCount, + LogRankingMetricHitCount, + LogRankingMetricMissCount, + LogRankingMetricUserErrorCount, + } +} + +// ManagedRuleEnabledState - Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. +type ManagedRuleEnabledState string + +const ( + ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" + ManagedRuleEnabledStateEnabled ManagedRuleEnabledState = "Enabled" +) + +// PossibleManagedRuleEnabledStateValues returns the possible values for the ManagedRuleEnabledState const type. +func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { + return []ManagedRuleEnabledState{ + ManagedRuleEnabledStateDisabled, + ManagedRuleEnabledStateEnabled, + } +} + +// ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +type ManagedServiceIdentityType string + +const ( + ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" + ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" + ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned" + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{ + ManagedServiceIdentityTypeNone, + ManagedServiceIdentityTypeSystemAssigned, + ManagedServiceIdentityTypeSystemAssignedUserAssigned, + ManagedServiceIdentityTypeUserAssigned, + } +} + +// MatchProcessingBehavior - If this rule is a match should the rules engine continue running the remaining rules or stop. +// If not present, defaults to Continue. +type MatchProcessingBehavior string + +const ( + MatchProcessingBehaviorContinue MatchProcessingBehavior = "Continue" + MatchProcessingBehaviorStop MatchProcessingBehavior = "Stop" +) + +// PossibleMatchProcessingBehaviorValues returns the possible values for the MatchProcessingBehavior const type. +func PossibleMatchProcessingBehaviorValues() []MatchProcessingBehavior { + return []MatchProcessingBehavior{ + MatchProcessingBehaviorContinue, + MatchProcessingBehaviorStop, + } +} + +// MatchVariable - The name of the condition for the delivery rule. +type MatchVariable string + +const ( + MatchVariableClientPort MatchVariable = "ClientPort" + MatchVariableCookies MatchVariable = "Cookies" + MatchVariableHTTPVersion MatchVariable = "HttpVersion" + MatchVariableHostName MatchVariable = "HostName" + MatchVariableIsDevice MatchVariable = "IsDevice" + MatchVariablePostArgs MatchVariable = "PostArgs" + MatchVariableQueryString MatchVariable = "QueryString" + MatchVariableRemoteAddress MatchVariable = "RemoteAddress" + MatchVariableRequestBody MatchVariable = "RequestBody" + MatchVariableRequestHeader MatchVariable = "RequestHeader" + MatchVariableRequestMethod MatchVariable = "RequestMethod" + MatchVariableRequestScheme MatchVariable = "RequestScheme" + MatchVariableRequestURI MatchVariable = "RequestUri" + MatchVariableSSLProtocol MatchVariable = "SslProtocol" + MatchVariableServerPort MatchVariable = "ServerPort" + MatchVariableSocketAddr MatchVariable = "SocketAddr" + MatchVariableURLFileExtension MatchVariable = "UrlFileExtension" + MatchVariableURLFileName MatchVariable = "UrlFileName" + MatchVariableURLPath MatchVariable = "UrlPath" +) + +// PossibleMatchVariableValues returns the possible values for the MatchVariable const type. +func PossibleMatchVariableValues() []MatchVariable { + return []MatchVariable{ + MatchVariableClientPort, + MatchVariableCookies, + MatchVariableHTTPVersion, + MatchVariableHostName, + MatchVariableIsDevice, + MatchVariablePostArgs, + MatchVariableQueryString, + MatchVariableRemoteAddress, + MatchVariableRequestBody, + MatchVariableRequestHeader, + MatchVariableRequestMethod, + MatchVariableRequestScheme, + MatchVariableRequestURI, + MatchVariableSSLProtocol, + MatchVariableServerPort, + MatchVariableSocketAddr, + MatchVariableURLFileExtension, + MatchVariableURLFileName, + MatchVariableURLPath, + } +} + +type MetricsGranularity string + +const ( + MetricsGranularityP1D MetricsGranularity = "P1D" + MetricsGranularityPT1H MetricsGranularity = "PT1H" + MetricsGranularityPT5M MetricsGranularity = "PT5M" +) + +// PossibleMetricsGranularityValues returns the possible values for the MetricsGranularity const type. +func PossibleMetricsGranularityValues() []MetricsGranularity { + return []MetricsGranularity{ + MetricsGranularityP1D, + MetricsGranularityPT1H, + MetricsGranularityPT5M, + } +} + +type MetricsSeriesUnit string + +const ( + MetricsSeriesUnitBitsPerSecond MetricsSeriesUnit = "bitsPerSecond" + MetricsSeriesUnitBytes MetricsSeriesUnit = "bytes" + MetricsSeriesUnitCount MetricsSeriesUnit = "count" + MetricsSeriesUnitMilliSeconds MetricsSeriesUnit = "milliSeconds" +) + +// PossibleMetricsSeriesUnitValues returns the possible values for the MetricsSeriesUnit const type. +func PossibleMetricsSeriesUnitValues() []MetricsSeriesUnit { + return []MetricsSeriesUnit{ + MetricsSeriesUnitBitsPerSecond, + MetricsSeriesUnitBytes, + MetricsSeriesUnitCount, + MetricsSeriesUnitMilliSeconds, + } +} + +// MinimumTLSVersion - TLS protocol version that will be used for Https +type MinimumTLSVersion string + +const ( + MinimumTLSVersionNone MinimumTLSVersion = "None" + MinimumTLSVersionTLS10 MinimumTLSVersion = "TLS10" + MinimumTLSVersionTLS12 MinimumTLSVersion = "TLS12" +) + +// PossibleMinimumTLSVersionValues returns the possible values for the MinimumTLSVersion const type. +func PossibleMinimumTLSVersionValues() []MinimumTLSVersion { + return []MinimumTLSVersion{ + MinimumTLSVersionNone, + MinimumTLSVersionTLS10, + MinimumTLSVersionTLS12, + } +} + +// Operator - Describes operator to be matched +type Operator string + +const ( + OperatorAny Operator = "Any" + OperatorBeginsWith Operator = "BeginsWith" + OperatorContains Operator = "Contains" + OperatorEndsWith Operator = "EndsWith" + OperatorEqual Operator = "Equal" + OperatorGeoMatch Operator = "GeoMatch" + OperatorGreaterThan Operator = "GreaterThan" + OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual" + OperatorIPMatch Operator = "IPMatch" + OperatorLessThan Operator = "LessThan" + OperatorLessThanOrEqual Operator = "LessThanOrEqual" + OperatorRegEx Operator = "RegEx" +) + +// PossibleOperatorValues returns the possible values for the Operator const type. +func PossibleOperatorValues() []Operator { + return []Operator{ + OperatorAny, + OperatorBeginsWith, + OperatorContains, + OperatorEndsWith, + OperatorEqual, + OperatorGeoMatch, + OperatorGreaterThan, + OperatorGreaterThanOrEqual, + OperatorIPMatch, + OperatorLessThan, + OperatorLessThanOrEqual, + OperatorRegEx, + } +} + +// OptimizationType - Specifies what scenario the customer wants this CDN endpoint to optimize, e.g. Download, Media services. +// With this information we can apply scenario driven optimization. +type OptimizationType string + +const ( + OptimizationTypeDynamicSiteAcceleration OptimizationType = "DynamicSiteAcceleration" + OptimizationTypeGeneralMediaStreaming OptimizationType = "GeneralMediaStreaming" + OptimizationTypeGeneralWebDelivery OptimizationType = "GeneralWebDelivery" + OptimizationTypeLargeFileDownload OptimizationType = "LargeFileDownload" + OptimizationTypeVideoOnDemandMediaStreaming OptimizationType = "VideoOnDemandMediaStreaming" +) + +// PossibleOptimizationTypeValues returns the possible values for the OptimizationType const type. +func PossibleOptimizationTypeValues() []OptimizationType { + return []OptimizationType{ + OptimizationTypeDynamicSiteAcceleration, + OptimizationTypeGeneralMediaStreaming, + OptimizationTypeGeneralWebDelivery, + OptimizationTypeLargeFileDownload, + OptimizationTypeVideoOnDemandMediaStreaming, + } +} + +type OriginGroupOverrideActionParametersTypeName string + +const ( + OriginGroupOverrideActionParametersTypeNameDeliveryRuleOriginGroupOverrideActionParameters OriginGroupOverrideActionParametersTypeName = "DeliveryRuleOriginGroupOverrideActionParameters" +) + +// PossibleOriginGroupOverrideActionParametersTypeNameValues returns the possible values for the OriginGroupOverrideActionParametersTypeName const type. +func PossibleOriginGroupOverrideActionParametersTypeNameValues() []OriginGroupOverrideActionParametersTypeName { + return []OriginGroupOverrideActionParametersTypeName{ + OriginGroupOverrideActionParametersTypeNameDeliveryRuleOriginGroupOverrideActionParameters, + } +} + +// OriginGroupProvisioningState - Provisioning status of the origin group. +type OriginGroupProvisioningState string + +const ( + OriginGroupProvisioningStateCreating OriginGroupProvisioningState = "Creating" + OriginGroupProvisioningStateDeleting OriginGroupProvisioningState = "Deleting" + OriginGroupProvisioningStateFailed OriginGroupProvisioningState = "Failed" + OriginGroupProvisioningStateSucceeded OriginGroupProvisioningState = "Succeeded" + OriginGroupProvisioningStateUpdating OriginGroupProvisioningState = "Updating" +) + +// PossibleOriginGroupProvisioningStateValues returns the possible values for the OriginGroupProvisioningState const type. +func PossibleOriginGroupProvisioningStateValues() []OriginGroupProvisioningState { + return []OriginGroupProvisioningState{ + OriginGroupProvisioningStateCreating, + OriginGroupProvisioningStateDeleting, + OriginGroupProvisioningStateFailed, + OriginGroupProvisioningStateSucceeded, + OriginGroupProvisioningStateUpdating, + } +} + +// OriginGroupResourceState - Resource status of the origin group. +type OriginGroupResourceState string + +const ( + OriginGroupResourceStateActive OriginGroupResourceState = "Active" + OriginGroupResourceStateCreating OriginGroupResourceState = "Creating" + OriginGroupResourceStateDeleting OriginGroupResourceState = "Deleting" +) + +// PossibleOriginGroupResourceStateValues returns the possible values for the OriginGroupResourceState const type. +func PossibleOriginGroupResourceStateValues() []OriginGroupResourceState { + return []OriginGroupResourceState{ + OriginGroupResourceStateActive, + OriginGroupResourceStateCreating, + OriginGroupResourceStateDeleting, + } +} + +// OriginProvisioningState - Provisioning status of the origin. +type OriginProvisioningState string + +const ( + OriginProvisioningStateCreating OriginProvisioningState = "Creating" + OriginProvisioningStateDeleting OriginProvisioningState = "Deleting" + OriginProvisioningStateFailed OriginProvisioningState = "Failed" + OriginProvisioningStateSucceeded OriginProvisioningState = "Succeeded" + OriginProvisioningStateUpdating OriginProvisioningState = "Updating" +) + +// PossibleOriginProvisioningStateValues returns the possible values for the OriginProvisioningState const type. +func PossibleOriginProvisioningStateValues() []OriginProvisioningState { + return []OriginProvisioningState{ + OriginProvisioningStateCreating, + OriginProvisioningStateDeleting, + OriginProvisioningStateFailed, + OriginProvisioningStateSucceeded, + OriginProvisioningStateUpdating, + } +} + +// OriginResourceState - Resource status of the origin. +type OriginResourceState string + +const ( + OriginResourceStateActive OriginResourceState = "Active" + OriginResourceStateCreating OriginResourceState = "Creating" + OriginResourceStateDeleting OriginResourceState = "Deleting" +) + +// PossibleOriginResourceStateValues returns the possible values for the OriginResourceState const type. +func PossibleOriginResourceStateValues() []OriginResourceState { + return []OriginResourceState{ + OriginResourceStateActive, + OriginResourceStateCreating, + OriginResourceStateDeleting, + } +} + +// ParamIndicator - Indicates the purpose of the parameter +type ParamIndicator string + +const ( + ParamIndicatorExpires ParamIndicator = "Expires" + ParamIndicatorKeyID ParamIndicator = "KeyId" + ParamIndicatorSignature ParamIndicator = "Signature" +) + +// PossibleParamIndicatorValues returns the possible values for the ParamIndicator const type. +func PossibleParamIndicatorValues() []ParamIndicator { + return []ParamIndicator{ + ParamIndicatorExpires, + ParamIndicatorKeyID, + ParamIndicatorSignature, + } +} + +// PolicyEnabledState - describes if the policy is in enabled state or disabled state +type PolicyEnabledState string + +const ( + PolicyEnabledStateDisabled PolicyEnabledState = "Disabled" + PolicyEnabledStateEnabled PolicyEnabledState = "Enabled" +) + +// PossiblePolicyEnabledStateValues returns the possible values for the PolicyEnabledState const type. +func PossiblePolicyEnabledStateValues() []PolicyEnabledState { + return []PolicyEnabledState{ + PolicyEnabledStateDisabled, + PolicyEnabledStateEnabled, + } +} + +// PolicyMode - Describes if it is in detection mode or prevention mode at policy level. +type PolicyMode string + +const ( + PolicyModeDetection PolicyMode = "Detection" + PolicyModePrevention PolicyMode = "Prevention" +) + +// PossiblePolicyModeValues returns the possible values for the PolicyMode const type. +func PossiblePolicyModeValues() []PolicyMode { + return []PolicyMode{ + PolicyModeDetection, + PolicyModePrevention, + } +} + +// PolicyResourceState - Resource status of the policy. +type PolicyResourceState string + +const ( + PolicyResourceStateCreating PolicyResourceState = "Creating" + PolicyResourceStateDeleting PolicyResourceState = "Deleting" + PolicyResourceStateDisabled PolicyResourceState = "Disabled" + PolicyResourceStateDisabling PolicyResourceState = "Disabling" + PolicyResourceStateEnabled PolicyResourceState = "Enabled" + PolicyResourceStateEnabling PolicyResourceState = "Enabling" +) + +// PossiblePolicyResourceStateValues returns the possible values for the PolicyResourceState const type. +func PossiblePolicyResourceStateValues() []PolicyResourceState { + return []PolicyResourceState{ + PolicyResourceStateCreating, + PolicyResourceStateDeleting, + PolicyResourceStateDisabled, + PolicyResourceStateDisabling, + PolicyResourceStateEnabled, + PolicyResourceStateEnabling, + } +} + +// PolicySettingsDefaultCustomBlockResponseStatusCode - If the action type is block, this field defines the default customer +// overridable http response status code. +type PolicySettingsDefaultCustomBlockResponseStatusCode int32 + +const ( + PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredFive PolicySettingsDefaultCustomBlockResponseStatusCode = 405 + PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredSix PolicySettingsDefaultCustomBlockResponseStatusCode = 406 + PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredThree PolicySettingsDefaultCustomBlockResponseStatusCode = 403 + PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredTwentyNine PolicySettingsDefaultCustomBlockResponseStatusCode = 429 + PolicySettingsDefaultCustomBlockResponseStatusCodeTwoHundred PolicySettingsDefaultCustomBlockResponseStatusCode = 200 +) + +// PossiblePolicySettingsDefaultCustomBlockResponseStatusCodeValues returns the possible values for the PolicySettingsDefaultCustomBlockResponseStatusCode const type. +func PossiblePolicySettingsDefaultCustomBlockResponseStatusCodeValues() []PolicySettingsDefaultCustomBlockResponseStatusCode { + return []PolicySettingsDefaultCustomBlockResponseStatusCode{ + PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredFive, + PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredSix, + PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredThree, + PolicySettingsDefaultCustomBlockResponseStatusCodeFourHundredTwentyNine, + PolicySettingsDefaultCustomBlockResponseStatusCodeTwoHundred, + } +} + +type PostArgsMatchConditionParametersTypeName string + +const ( + PostArgsMatchConditionParametersTypeNameDeliveryRulePostArgsConditionParameters PostArgsMatchConditionParametersTypeName = "DeliveryRulePostArgsConditionParameters" +) + +// PossiblePostArgsMatchConditionParametersTypeNameValues returns the possible values for the PostArgsMatchConditionParametersTypeName const type. +func PossiblePostArgsMatchConditionParametersTypeNameValues() []PostArgsMatchConditionParametersTypeName { + return []PostArgsMatchConditionParametersTypeName{ + PostArgsMatchConditionParametersTypeNameDeliveryRulePostArgsConditionParameters, + } +} + +// PostArgsOperator - Describes operator to be matched +type PostArgsOperator string + +const ( + PostArgsOperatorAny PostArgsOperator = "Any" + PostArgsOperatorBeginsWith PostArgsOperator = "BeginsWith" + PostArgsOperatorContains PostArgsOperator = "Contains" + PostArgsOperatorEndsWith PostArgsOperator = "EndsWith" + PostArgsOperatorEqual PostArgsOperator = "Equal" + PostArgsOperatorGreaterThan PostArgsOperator = "GreaterThan" + PostArgsOperatorGreaterThanOrEqual PostArgsOperator = "GreaterThanOrEqual" + PostArgsOperatorLessThan PostArgsOperator = "LessThan" + PostArgsOperatorLessThanOrEqual PostArgsOperator = "LessThanOrEqual" + PostArgsOperatorRegEx PostArgsOperator = "RegEx" +) + +// PossiblePostArgsOperatorValues returns the possible values for the PostArgsOperator const type. +func PossiblePostArgsOperatorValues() []PostArgsOperator { + return []PostArgsOperator{ + PostArgsOperatorAny, + PostArgsOperatorBeginsWith, + PostArgsOperatorContains, + PostArgsOperatorEndsWith, + PostArgsOperatorEqual, + PostArgsOperatorGreaterThan, + PostArgsOperatorGreaterThanOrEqual, + PostArgsOperatorLessThan, + PostArgsOperatorLessThanOrEqual, + PostArgsOperatorRegEx, + } +} + +// PrivateEndpointStatus - The approval status for the connection to the Private Link +type PrivateEndpointStatus string + +const ( + PrivateEndpointStatusApproved PrivateEndpointStatus = "Approved" + PrivateEndpointStatusDisconnected PrivateEndpointStatus = "Disconnected" + PrivateEndpointStatusPending PrivateEndpointStatus = "Pending" + PrivateEndpointStatusRejected PrivateEndpointStatus = "Rejected" + PrivateEndpointStatusTimeout PrivateEndpointStatus = "Timeout" +) + +// PossiblePrivateEndpointStatusValues returns the possible values for the PrivateEndpointStatus const type. +func PossiblePrivateEndpointStatusValues() []PrivateEndpointStatus { + return []PrivateEndpointStatus{ + PrivateEndpointStatusApproved, + PrivateEndpointStatusDisconnected, + PrivateEndpointStatusPending, + PrivateEndpointStatusRejected, + PrivateEndpointStatusTimeout, + } +} + +// ProbeProtocol - Protocol to use for health probe. +type ProbeProtocol string + +const ( + ProbeProtocolHTTP ProbeProtocol = "Http" + ProbeProtocolHTTPS ProbeProtocol = "Https" + ProbeProtocolNotSet ProbeProtocol = "NotSet" +) + +// PossibleProbeProtocolValues returns the possible values for the ProbeProtocol const type. +func PossibleProbeProtocolValues() []ProbeProtocol { + return []ProbeProtocol{ + ProbeProtocolHTTP, + ProbeProtocolHTTPS, + ProbeProtocolNotSet, + } +} + +// ProfileProvisioningState - Provisioning status of the profile. +type ProfileProvisioningState string + +const ( + ProfileProvisioningStateCreating ProfileProvisioningState = "Creating" + ProfileProvisioningStateDeleting ProfileProvisioningState = "Deleting" + ProfileProvisioningStateFailed ProfileProvisioningState = "Failed" + ProfileProvisioningStateSucceeded ProfileProvisioningState = "Succeeded" + ProfileProvisioningStateUpdating ProfileProvisioningState = "Updating" +) + +// PossibleProfileProvisioningStateValues returns the possible values for the ProfileProvisioningState const type. +func PossibleProfileProvisioningStateValues() []ProfileProvisioningState { + return []ProfileProvisioningState{ + ProfileProvisioningStateCreating, + ProfileProvisioningStateDeleting, + ProfileProvisioningStateFailed, + ProfileProvisioningStateSucceeded, + ProfileProvisioningStateUpdating, + } +} + +// ProfileResourceState - Resource status of the profile. +type ProfileResourceState string + +const ( + ProfileResourceStateAbortingMigration ProfileResourceState = "AbortingMigration" + ProfileResourceStateActive ProfileResourceState = "Active" + ProfileResourceStateCommittingMigration ProfileResourceState = "CommittingMigration" + ProfileResourceStateCreating ProfileResourceState = "Creating" + ProfileResourceStateDeleting ProfileResourceState = "Deleting" + ProfileResourceStateDisabled ProfileResourceState = "Disabled" + ProfileResourceStateMigrated ProfileResourceState = "Migrated" + ProfileResourceStateMigrating ProfileResourceState = "Migrating" + ProfileResourceStatePendingMigrationCommit ProfileResourceState = "PendingMigrationCommit" +) + +// PossibleProfileResourceStateValues returns the possible values for the ProfileResourceState const type. +func PossibleProfileResourceStateValues() []ProfileResourceState { + return []ProfileResourceState{ + ProfileResourceStateAbortingMigration, + ProfileResourceStateActive, + ProfileResourceStateCommittingMigration, + ProfileResourceStateCreating, + ProfileResourceStateDeleting, + ProfileResourceStateDisabled, + ProfileResourceStateMigrated, + ProfileResourceStateMigrating, + ProfileResourceStatePendingMigrationCommit, + } +} + +// ProfileScrubbingState - State of the log scrubbing config. Default value is Enabled. +type ProfileScrubbingState string + +const ( + ProfileScrubbingStateDisabled ProfileScrubbingState = "Disabled" + ProfileScrubbingStateEnabled ProfileScrubbingState = "Enabled" +) + +// PossibleProfileScrubbingStateValues returns the possible values for the ProfileScrubbingState const type. +func PossibleProfileScrubbingStateValues() []ProfileScrubbingState { + return []ProfileScrubbingState{ + ProfileScrubbingStateDisabled, + ProfileScrubbingStateEnabled, + } +} + +// ProtocolType - Defines the TLS extension protocol that is used for secure delivery. +type ProtocolType string + +const ( + ProtocolTypeIPBased ProtocolType = "IPBased" + ProtocolTypeServerNameIndication ProtocolType = "ServerNameIndication" +) + +// PossibleProtocolTypeValues returns the possible values for the ProtocolType const type. +func PossibleProtocolTypeValues() []ProtocolType { + return []ProtocolType{ + ProtocolTypeIPBased, + ProtocolTypeServerNameIndication, + } +} + +// ProvisioningState - Provisioning state of the WebApplicationFirewallPolicy. +type ProvisioningState string + +const ( + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateCreating, + ProvisioningStateFailed, + ProvisioningStateSucceeded, + } +} + +// QueryStringBehavior - Caching behavior for the requests +type QueryStringBehavior string + +const ( + QueryStringBehaviorExclude QueryStringBehavior = "Exclude" + QueryStringBehaviorExcludeAll QueryStringBehavior = "ExcludeAll" + QueryStringBehaviorInclude QueryStringBehavior = "Include" + QueryStringBehaviorIncludeAll QueryStringBehavior = "IncludeAll" +) + +// PossibleQueryStringBehaviorValues returns the possible values for the QueryStringBehavior const type. +func PossibleQueryStringBehaviorValues() []QueryStringBehavior { + return []QueryStringBehavior{ + QueryStringBehaviorExclude, + QueryStringBehaviorExcludeAll, + QueryStringBehaviorInclude, + QueryStringBehaviorIncludeAll, + } +} + +// QueryStringCachingBehavior - Defines how CDN caches requests that include query strings. You can ignore any query strings +// when caching, bypass caching to prevent requests that contain query strings from being cached, or cache +// every request with a unique URL. +type QueryStringCachingBehavior string + +const ( + QueryStringCachingBehaviorBypassCaching QueryStringCachingBehavior = "BypassCaching" + QueryStringCachingBehaviorIgnoreQueryString QueryStringCachingBehavior = "IgnoreQueryString" + QueryStringCachingBehaviorNotSet QueryStringCachingBehavior = "NotSet" + QueryStringCachingBehaviorUseQueryString QueryStringCachingBehavior = "UseQueryString" +) + +// PossibleQueryStringCachingBehaviorValues returns the possible values for the QueryStringCachingBehavior const type. +func PossibleQueryStringCachingBehaviorValues() []QueryStringCachingBehavior { + return []QueryStringCachingBehavior{ + QueryStringCachingBehaviorBypassCaching, + QueryStringCachingBehaviorIgnoreQueryString, + QueryStringCachingBehaviorNotSet, + QueryStringCachingBehaviorUseQueryString, + } +} + +type QueryStringMatchConditionParametersTypeName string + +const ( + QueryStringMatchConditionParametersTypeNameDeliveryRuleQueryStringConditionParameters QueryStringMatchConditionParametersTypeName = "DeliveryRuleQueryStringConditionParameters" +) + +// PossibleQueryStringMatchConditionParametersTypeNameValues returns the possible values for the QueryStringMatchConditionParametersTypeName const type. +func PossibleQueryStringMatchConditionParametersTypeNameValues() []QueryStringMatchConditionParametersTypeName { + return []QueryStringMatchConditionParametersTypeName{ + QueryStringMatchConditionParametersTypeNameDeliveryRuleQueryStringConditionParameters, + } +} + +// QueryStringOperator - Describes operator to be matched +type QueryStringOperator string + +const ( + QueryStringOperatorAny QueryStringOperator = "Any" + QueryStringOperatorBeginsWith QueryStringOperator = "BeginsWith" + QueryStringOperatorContains QueryStringOperator = "Contains" + QueryStringOperatorEndsWith QueryStringOperator = "EndsWith" + QueryStringOperatorEqual QueryStringOperator = "Equal" + QueryStringOperatorGreaterThan QueryStringOperator = "GreaterThan" + QueryStringOperatorGreaterThanOrEqual QueryStringOperator = "GreaterThanOrEqual" + QueryStringOperatorLessThan QueryStringOperator = "LessThan" + QueryStringOperatorLessThanOrEqual QueryStringOperator = "LessThanOrEqual" + QueryStringOperatorRegEx QueryStringOperator = "RegEx" +) + +// PossibleQueryStringOperatorValues returns the possible values for the QueryStringOperator const type. +func PossibleQueryStringOperatorValues() []QueryStringOperator { + return []QueryStringOperator{ + QueryStringOperatorAny, + QueryStringOperatorBeginsWith, + QueryStringOperatorContains, + QueryStringOperatorEndsWith, + QueryStringOperatorEqual, + QueryStringOperatorGreaterThan, + QueryStringOperatorGreaterThanOrEqual, + QueryStringOperatorLessThan, + QueryStringOperatorLessThanOrEqual, + QueryStringOperatorRegEx, + } +} + +// RedirectType - The redirect type the rule will use when redirecting traffic. +type RedirectType string + +const ( + RedirectTypeFound RedirectType = "Found" + RedirectTypeMoved RedirectType = "Moved" + RedirectTypePermanentRedirect RedirectType = "PermanentRedirect" + RedirectTypeTemporaryRedirect RedirectType = "TemporaryRedirect" +) + +// PossibleRedirectTypeValues returns the possible values for the RedirectType const type. +func PossibleRedirectTypeValues() []RedirectType { + return []RedirectType{ + RedirectTypeFound, + RedirectTypeMoved, + RedirectTypePermanentRedirect, + RedirectTypeTemporaryRedirect, + } +} + +type RemoteAddressMatchConditionParametersTypeName string + +const ( + RemoteAddressMatchConditionParametersTypeNameDeliveryRuleRemoteAddressConditionParameters RemoteAddressMatchConditionParametersTypeName = "DeliveryRuleRemoteAddressConditionParameters" +) + +// PossibleRemoteAddressMatchConditionParametersTypeNameValues returns the possible values for the RemoteAddressMatchConditionParametersTypeName const type. +func PossibleRemoteAddressMatchConditionParametersTypeNameValues() []RemoteAddressMatchConditionParametersTypeName { + return []RemoteAddressMatchConditionParametersTypeName{ + RemoteAddressMatchConditionParametersTypeNameDeliveryRuleRemoteAddressConditionParameters, + } +} + +// RemoteAddressOperator - Describes operator to be matched +type RemoteAddressOperator string + +const ( + RemoteAddressOperatorAny RemoteAddressOperator = "Any" + RemoteAddressOperatorGeoMatch RemoteAddressOperator = "GeoMatch" + RemoteAddressOperatorIPMatch RemoteAddressOperator = "IPMatch" +) + +// PossibleRemoteAddressOperatorValues returns the possible values for the RemoteAddressOperator const type. +func PossibleRemoteAddressOperatorValues() []RemoteAddressOperator { + return []RemoteAddressOperator{ + RemoteAddressOperatorAny, + RemoteAddressOperatorGeoMatch, + RemoteAddressOperatorIPMatch, + } +} + +type RequestBodyMatchConditionParametersTypeName string + +const ( + RequestBodyMatchConditionParametersTypeNameDeliveryRuleRequestBodyConditionParameters RequestBodyMatchConditionParametersTypeName = "DeliveryRuleRequestBodyConditionParameters" +) + +// PossibleRequestBodyMatchConditionParametersTypeNameValues returns the possible values for the RequestBodyMatchConditionParametersTypeName const type. +func PossibleRequestBodyMatchConditionParametersTypeNameValues() []RequestBodyMatchConditionParametersTypeName { + return []RequestBodyMatchConditionParametersTypeName{ + RequestBodyMatchConditionParametersTypeNameDeliveryRuleRequestBodyConditionParameters, + } +} + +// RequestBodyOperator - Describes operator to be matched +type RequestBodyOperator string + +const ( + RequestBodyOperatorAny RequestBodyOperator = "Any" + RequestBodyOperatorBeginsWith RequestBodyOperator = "BeginsWith" + RequestBodyOperatorContains RequestBodyOperator = "Contains" + RequestBodyOperatorEndsWith RequestBodyOperator = "EndsWith" + RequestBodyOperatorEqual RequestBodyOperator = "Equal" + RequestBodyOperatorGreaterThan RequestBodyOperator = "GreaterThan" + RequestBodyOperatorGreaterThanOrEqual RequestBodyOperator = "GreaterThanOrEqual" + RequestBodyOperatorLessThan RequestBodyOperator = "LessThan" + RequestBodyOperatorLessThanOrEqual RequestBodyOperator = "LessThanOrEqual" + RequestBodyOperatorRegEx RequestBodyOperator = "RegEx" +) + +// PossibleRequestBodyOperatorValues returns the possible values for the RequestBodyOperator const type. +func PossibleRequestBodyOperatorValues() []RequestBodyOperator { + return []RequestBodyOperator{ + RequestBodyOperatorAny, + RequestBodyOperatorBeginsWith, + RequestBodyOperatorContains, + RequestBodyOperatorEndsWith, + RequestBodyOperatorEqual, + RequestBodyOperatorGreaterThan, + RequestBodyOperatorGreaterThanOrEqual, + RequestBodyOperatorLessThan, + RequestBodyOperatorLessThanOrEqual, + RequestBodyOperatorRegEx, + } +} + +type RequestHeaderMatchConditionParametersTypeName string + +const ( + RequestHeaderMatchConditionParametersTypeNameDeliveryRuleRequestHeaderConditionParameters RequestHeaderMatchConditionParametersTypeName = "DeliveryRuleRequestHeaderConditionParameters" +) + +// PossibleRequestHeaderMatchConditionParametersTypeNameValues returns the possible values for the RequestHeaderMatchConditionParametersTypeName const type. +func PossibleRequestHeaderMatchConditionParametersTypeNameValues() []RequestHeaderMatchConditionParametersTypeName { + return []RequestHeaderMatchConditionParametersTypeName{ + RequestHeaderMatchConditionParametersTypeNameDeliveryRuleRequestHeaderConditionParameters, + } +} + +// RequestHeaderOperator - Describes operator to be matched +type RequestHeaderOperator string + +const ( + RequestHeaderOperatorAny RequestHeaderOperator = "Any" + RequestHeaderOperatorBeginsWith RequestHeaderOperator = "BeginsWith" + RequestHeaderOperatorContains RequestHeaderOperator = "Contains" + RequestHeaderOperatorEndsWith RequestHeaderOperator = "EndsWith" + RequestHeaderOperatorEqual RequestHeaderOperator = "Equal" + RequestHeaderOperatorGreaterThan RequestHeaderOperator = "GreaterThan" + RequestHeaderOperatorGreaterThanOrEqual RequestHeaderOperator = "GreaterThanOrEqual" + RequestHeaderOperatorLessThan RequestHeaderOperator = "LessThan" + RequestHeaderOperatorLessThanOrEqual RequestHeaderOperator = "LessThanOrEqual" + RequestHeaderOperatorRegEx RequestHeaderOperator = "RegEx" +) + +// PossibleRequestHeaderOperatorValues returns the possible values for the RequestHeaderOperator const type. +func PossibleRequestHeaderOperatorValues() []RequestHeaderOperator { + return []RequestHeaderOperator{ + RequestHeaderOperatorAny, + RequestHeaderOperatorBeginsWith, + RequestHeaderOperatorContains, + RequestHeaderOperatorEndsWith, + RequestHeaderOperatorEqual, + RequestHeaderOperatorGreaterThan, + RequestHeaderOperatorGreaterThanOrEqual, + RequestHeaderOperatorLessThan, + RequestHeaderOperatorLessThanOrEqual, + RequestHeaderOperatorRegEx, + } +} + +type RequestMethodMatchConditionParametersMatchValuesItem string + +const ( + RequestMethodMatchConditionParametersMatchValuesItemDELETE RequestMethodMatchConditionParametersMatchValuesItem = "DELETE" + RequestMethodMatchConditionParametersMatchValuesItemGET RequestMethodMatchConditionParametersMatchValuesItem = "GET" + RequestMethodMatchConditionParametersMatchValuesItemHEAD RequestMethodMatchConditionParametersMatchValuesItem = "HEAD" + RequestMethodMatchConditionParametersMatchValuesItemOPTIONS RequestMethodMatchConditionParametersMatchValuesItem = "OPTIONS" + RequestMethodMatchConditionParametersMatchValuesItemPOST RequestMethodMatchConditionParametersMatchValuesItem = "POST" + RequestMethodMatchConditionParametersMatchValuesItemPUT RequestMethodMatchConditionParametersMatchValuesItem = "PUT" + RequestMethodMatchConditionParametersMatchValuesItemTRACE RequestMethodMatchConditionParametersMatchValuesItem = "TRACE" +) + +// PossibleRequestMethodMatchConditionParametersMatchValuesItemValues returns the possible values for the RequestMethodMatchConditionParametersMatchValuesItem const type. +func PossibleRequestMethodMatchConditionParametersMatchValuesItemValues() []RequestMethodMatchConditionParametersMatchValuesItem { + return []RequestMethodMatchConditionParametersMatchValuesItem{ + RequestMethodMatchConditionParametersMatchValuesItemDELETE, + RequestMethodMatchConditionParametersMatchValuesItemGET, + RequestMethodMatchConditionParametersMatchValuesItemHEAD, + RequestMethodMatchConditionParametersMatchValuesItemOPTIONS, + RequestMethodMatchConditionParametersMatchValuesItemPOST, + RequestMethodMatchConditionParametersMatchValuesItemPUT, + RequestMethodMatchConditionParametersMatchValuesItemTRACE, + } +} + +type RequestMethodMatchConditionParametersTypeName string + +const ( + RequestMethodMatchConditionParametersTypeNameDeliveryRuleRequestMethodConditionParameters RequestMethodMatchConditionParametersTypeName = "DeliveryRuleRequestMethodConditionParameters" +) + +// PossibleRequestMethodMatchConditionParametersTypeNameValues returns the possible values for the RequestMethodMatchConditionParametersTypeName const type. +func PossibleRequestMethodMatchConditionParametersTypeNameValues() []RequestMethodMatchConditionParametersTypeName { + return []RequestMethodMatchConditionParametersTypeName{ + RequestMethodMatchConditionParametersTypeNameDeliveryRuleRequestMethodConditionParameters, + } +} + +// RequestMethodOperator - Describes operator to be matched +type RequestMethodOperator string + +const ( + RequestMethodOperatorEqual RequestMethodOperator = "Equal" +) + +// PossibleRequestMethodOperatorValues returns the possible values for the RequestMethodOperator const type. +func PossibleRequestMethodOperatorValues() []RequestMethodOperator { + return []RequestMethodOperator{ + RequestMethodOperatorEqual, + } +} + +type RequestSchemeMatchConditionParametersMatchValuesItem string + +const ( + RequestSchemeMatchConditionParametersMatchValuesItemHTTP RequestSchemeMatchConditionParametersMatchValuesItem = "HTTP" + RequestSchemeMatchConditionParametersMatchValuesItemHTTPS RequestSchemeMatchConditionParametersMatchValuesItem = "HTTPS" +) + +// PossibleRequestSchemeMatchConditionParametersMatchValuesItemValues returns the possible values for the RequestSchemeMatchConditionParametersMatchValuesItem const type. +func PossibleRequestSchemeMatchConditionParametersMatchValuesItemValues() []RequestSchemeMatchConditionParametersMatchValuesItem { + return []RequestSchemeMatchConditionParametersMatchValuesItem{ + RequestSchemeMatchConditionParametersMatchValuesItemHTTP, + RequestSchemeMatchConditionParametersMatchValuesItemHTTPS, + } +} + +// RequestSchemeMatchConditionParametersOperator - Describes operator to be matched +type RequestSchemeMatchConditionParametersOperator string + +const ( + RequestSchemeMatchConditionParametersOperatorEqual RequestSchemeMatchConditionParametersOperator = "Equal" +) + +// PossibleRequestSchemeMatchConditionParametersOperatorValues returns the possible values for the RequestSchemeMatchConditionParametersOperator const type. +func PossibleRequestSchemeMatchConditionParametersOperatorValues() []RequestSchemeMatchConditionParametersOperator { + return []RequestSchemeMatchConditionParametersOperator{ + RequestSchemeMatchConditionParametersOperatorEqual, + } +} + +type RequestSchemeMatchConditionParametersTypeName string + +const ( + RequestSchemeMatchConditionParametersTypeNameDeliveryRuleRequestSchemeConditionParameters RequestSchemeMatchConditionParametersTypeName = "DeliveryRuleRequestSchemeConditionParameters" +) + +// PossibleRequestSchemeMatchConditionParametersTypeNameValues returns the possible values for the RequestSchemeMatchConditionParametersTypeName const type. +func PossibleRequestSchemeMatchConditionParametersTypeNameValues() []RequestSchemeMatchConditionParametersTypeName { + return []RequestSchemeMatchConditionParametersTypeName{ + RequestSchemeMatchConditionParametersTypeNameDeliveryRuleRequestSchemeConditionParameters, + } +} + +type RequestURIMatchConditionParametersTypeName string + +const ( + RequestURIMatchConditionParametersTypeNameDeliveryRuleRequestURIConditionParameters RequestURIMatchConditionParametersTypeName = "DeliveryRuleRequestUriConditionParameters" +) + +// PossibleRequestURIMatchConditionParametersTypeNameValues returns the possible values for the RequestURIMatchConditionParametersTypeName const type. +func PossibleRequestURIMatchConditionParametersTypeNameValues() []RequestURIMatchConditionParametersTypeName { + return []RequestURIMatchConditionParametersTypeName{ + RequestURIMatchConditionParametersTypeNameDeliveryRuleRequestURIConditionParameters, + } +} + +// RequestURIOperator - Describes operator to be matched +type RequestURIOperator string + +const ( + RequestURIOperatorAny RequestURIOperator = "Any" + RequestURIOperatorBeginsWith RequestURIOperator = "BeginsWith" + RequestURIOperatorContains RequestURIOperator = "Contains" + RequestURIOperatorEndsWith RequestURIOperator = "EndsWith" + RequestURIOperatorEqual RequestURIOperator = "Equal" + RequestURIOperatorGreaterThan RequestURIOperator = "GreaterThan" + RequestURIOperatorGreaterThanOrEqual RequestURIOperator = "GreaterThanOrEqual" + RequestURIOperatorLessThan RequestURIOperator = "LessThan" + RequestURIOperatorLessThanOrEqual RequestURIOperator = "LessThanOrEqual" + RequestURIOperatorRegEx RequestURIOperator = "RegEx" +) + +// PossibleRequestURIOperatorValues returns the possible values for the RequestURIOperator const type. +func PossibleRequestURIOperatorValues() []RequestURIOperator { + return []RequestURIOperator{ + RequestURIOperatorAny, + RequestURIOperatorBeginsWith, + RequestURIOperatorContains, + RequestURIOperatorEndsWith, + RequestURIOperatorEqual, + RequestURIOperatorGreaterThan, + RequestURIOperatorGreaterThanOrEqual, + RequestURIOperatorLessThan, + RequestURIOperatorLessThanOrEqual, + RequestURIOperatorRegEx, + } +} + +// ResourceType - Type of CDN resource used in CheckNameAvailability. +type ResourceType string + +const ( + ResourceTypeMicrosoftCdnProfilesAfdEndpoints ResourceType = "Microsoft.Cdn/Profiles/AfdEndpoints" + ResourceTypeMicrosoftCdnProfilesEndpoints ResourceType = "Microsoft.Cdn/Profiles/Endpoints" +) + +// PossibleResourceTypeValues returns the possible values for the ResourceType const type. +func PossibleResourceTypeValues() []ResourceType { + return []ResourceType{ + ResourceTypeMicrosoftCdnProfilesAfdEndpoints, + ResourceTypeMicrosoftCdnProfilesEndpoints, + } +} + +// ResourceUsageUnit - Unit of the usage. e.g. count. +type ResourceUsageUnit string + +const ( + ResourceUsageUnitCount ResourceUsageUnit = "count" +) + +// PossibleResourceUsageUnitValues returns the possible values for the ResourceUsageUnit const type. +func PossibleResourceUsageUnitValues() []ResourceUsageUnit { + return []ResourceUsageUnit{ + ResourceUsageUnitCount, + } +} + +// ResponseBasedDetectedErrorTypes - Type of response errors for real user requests for which origin will be deemed unhealthy +type ResponseBasedDetectedErrorTypes string + +const ( + ResponseBasedDetectedErrorTypesNone ResponseBasedDetectedErrorTypes = "None" + ResponseBasedDetectedErrorTypesTCPAndHTTPErrors ResponseBasedDetectedErrorTypes = "TcpAndHttpErrors" + ResponseBasedDetectedErrorTypesTCPErrorsOnly ResponseBasedDetectedErrorTypes = "TcpErrorsOnly" +) + +// PossibleResponseBasedDetectedErrorTypesValues returns the possible values for the ResponseBasedDetectedErrorTypes const type. +func PossibleResponseBasedDetectedErrorTypesValues() []ResponseBasedDetectedErrorTypes { + return []ResponseBasedDetectedErrorTypes{ + ResponseBasedDetectedErrorTypesNone, + ResponseBasedDetectedErrorTypesTCPAndHTTPErrors, + ResponseBasedDetectedErrorTypesTCPErrorsOnly, + } +} + +type RouteConfigurationOverrideActionParametersTypeName string + +const ( + RouteConfigurationOverrideActionParametersTypeNameDeliveryRuleRouteConfigurationOverrideActionParameters RouteConfigurationOverrideActionParametersTypeName = "DeliveryRuleRouteConfigurationOverrideActionParameters" +) + +// PossibleRouteConfigurationOverrideActionParametersTypeNameValues returns the possible values for the RouteConfigurationOverrideActionParametersTypeName const type. +func PossibleRouteConfigurationOverrideActionParametersTypeNameValues() []RouteConfigurationOverrideActionParametersTypeName { + return []RouteConfigurationOverrideActionParametersTypeName{ + RouteConfigurationOverrideActionParametersTypeNameDeliveryRuleRouteConfigurationOverrideActionParameters, + } +} + +// RuleCacheBehavior - Caching behavior for the requests +type RuleCacheBehavior string + +const ( + RuleCacheBehaviorHonorOrigin RuleCacheBehavior = "HonorOrigin" + RuleCacheBehaviorOverrideAlways RuleCacheBehavior = "OverrideAlways" + RuleCacheBehaviorOverrideIfOriginMissing RuleCacheBehavior = "OverrideIfOriginMissing" +) + +// PossibleRuleCacheBehaviorValues returns the possible values for the RuleCacheBehavior const type. +func PossibleRuleCacheBehaviorValues() []RuleCacheBehavior { + return []RuleCacheBehavior{ + RuleCacheBehaviorHonorOrigin, + RuleCacheBehaviorOverrideAlways, + RuleCacheBehaviorOverrideIfOriginMissing, + } +} + +// RuleIsCompressionEnabled - Indicates whether content compression is enabled. If compression is enabled, content will be +// served as compressed if user requests for a compressed version. Content won't be compressed on +// AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. +type RuleIsCompressionEnabled string + +const ( + RuleIsCompressionEnabledDisabled RuleIsCompressionEnabled = "Disabled" + RuleIsCompressionEnabledEnabled RuleIsCompressionEnabled = "Enabled" +) + +// PossibleRuleIsCompressionEnabledValues returns the possible values for the RuleIsCompressionEnabled const type. +func PossibleRuleIsCompressionEnabledValues() []RuleIsCompressionEnabled { + return []RuleIsCompressionEnabled{ + RuleIsCompressionEnabledDisabled, + RuleIsCompressionEnabledEnabled, + } +} + +// RuleQueryStringCachingBehavior - Defines how Frontdoor caches requests that include query strings. You can ignore any query +// strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific +// query strings. +type RuleQueryStringCachingBehavior string + +const ( + RuleQueryStringCachingBehaviorIgnoreQueryString RuleQueryStringCachingBehavior = "IgnoreQueryString" + RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings RuleQueryStringCachingBehavior = "IgnoreSpecifiedQueryStrings" + RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings RuleQueryStringCachingBehavior = "IncludeSpecifiedQueryStrings" + RuleQueryStringCachingBehaviorUseQueryString RuleQueryStringCachingBehavior = "UseQueryString" +) + +// PossibleRuleQueryStringCachingBehaviorValues returns the possible values for the RuleQueryStringCachingBehavior const type. +func PossibleRuleQueryStringCachingBehaviorValues() []RuleQueryStringCachingBehavior { + return []RuleQueryStringCachingBehavior{ + RuleQueryStringCachingBehaviorIgnoreQueryString, + RuleQueryStringCachingBehaviorIgnoreSpecifiedQueryStrings, + RuleQueryStringCachingBehaviorIncludeSpecifiedQueryStrings, + RuleQueryStringCachingBehaviorUseQueryString, + } +} + +// SKUName - Name of the pricing tier. +type SKUName string + +const ( + SKUNameCustomVerizon SKUName = "Custom_Verizon" + SKUNamePremiumAzureFrontDoor SKUName = "Premium_AzureFrontDoor" + SKUNamePremiumVerizon SKUName = "Premium_Verizon" + SKUNameStandard955BandWidthChinaCdn SKUName = "Standard_955BandWidth_ChinaCdn" + SKUNameStandardAkamai SKUName = "Standard_Akamai" + SKUNameStandardAvgBandWidthChinaCdn SKUName = "Standard_AvgBandWidth_ChinaCdn" + SKUNameStandardAzureFrontDoor SKUName = "Standard_AzureFrontDoor" + SKUNameStandardChinaCdn SKUName = "Standard_ChinaCdn" + SKUNameStandardMicrosoft SKUName = "Standard_Microsoft" + SKUNameStandardPlus955BandWidthChinaCdn SKUName = "StandardPlus_955BandWidth_ChinaCdn" + SKUNameStandardPlusAvgBandWidthChinaCdn SKUName = "StandardPlus_AvgBandWidth_ChinaCdn" + SKUNameStandardPlusChinaCdn SKUName = "StandardPlus_ChinaCdn" + SKUNameStandardVerizon SKUName = "Standard_Verizon" +) + +// PossibleSKUNameValues returns the possible values for the SKUName const type. +func PossibleSKUNameValues() []SKUName { + return []SKUName{ + SKUNameCustomVerizon, + SKUNamePremiumAzureFrontDoor, + SKUNamePremiumVerizon, + SKUNameStandard955BandWidthChinaCdn, + SKUNameStandardAkamai, + SKUNameStandardAvgBandWidthChinaCdn, + SKUNameStandardAzureFrontDoor, + SKUNameStandardChinaCdn, + SKUNameStandardMicrosoft, + SKUNameStandardPlus955BandWidthChinaCdn, + SKUNameStandardPlusAvgBandWidthChinaCdn, + SKUNameStandardPlusChinaCdn, + SKUNameStandardVerizon, + } +} + +// SSLProtocol - The protocol of an established TLS connection. +type SSLProtocol string + +const ( + SSLProtocolTLSv1 SSLProtocol = "TLSv1" + SSLProtocolTLSv11 SSLProtocol = "TLSv1.1" + SSLProtocolTLSv12 SSLProtocol = "TLSv1.2" +) + +// PossibleSSLProtocolValues returns the possible values for the SSLProtocol const type. +func PossibleSSLProtocolValues() []SSLProtocol { + return []SSLProtocol{ + SSLProtocolTLSv1, + SSLProtocolTLSv11, + SSLProtocolTLSv12, + } +} + +type SSLProtocolMatchConditionParametersTypeName string + +const ( + SSLProtocolMatchConditionParametersTypeNameDeliveryRuleSSLProtocolConditionParameters SSLProtocolMatchConditionParametersTypeName = "DeliveryRuleSslProtocolConditionParameters" +) + +// PossibleSSLProtocolMatchConditionParametersTypeNameValues returns the possible values for the SSLProtocolMatchConditionParametersTypeName const type. +func PossibleSSLProtocolMatchConditionParametersTypeNameValues() []SSLProtocolMatchConditionParametersTypeName { + return []SSLProtocolMatchConditionParametersTypeName{ + SSLProtocolMatchConditionParametersTypeNameDeliveryRuleSSLProtocolConditionParameters, + } +} + +// SSLProtocolOperator - Describes operator to be matched +type SSLProtocolOperator string + +const ( + SSLProtocolOperatorEqual SSLProtocolOperator = "Equal" +) + +// PossibleSSLProtocolOperatorValues returns the possible values for the SSLProtocolOperator const type. +func PossibleSSLProtocolOperatorValues() []SSLProtocolOperator { + return []SSLProtocolOperator{ + SSLProtocolOperatorEqual, + } +} + +// ScrubbingRuleEntryMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements +// in the collection this rule applies to. +type ScrubbingRuleEntryMatchOperator string + +const ( + ScrubbingRuleEntryMatchOperatorEqualsAny ScrubbingRuleEntryMatchOperator = "EqualsAny" +) + +// PossibleScrubbingRuleEntryMatchOperatorValues returns the possible values for the ScrubbingRuleEntryMatchOperator const type. +func PossibleScrubbingRuleEntryMatchOperatorValues() []ScrubbingRuleEntryMatchOperator { + return []ScrubbingRuleEntryMatchOperator{ + ScrubbingRuleEntryMatchOperatorEqualsAny, + } +} + +// ScrubbingRuleEntryMatchVariable - The variable to be scrubbed from the logs. +type ScrubbingRuleEntryMatchVariable string + +const ( + ScrubbingRuleEntryMatchVariableQueryStringArgNames ScrubbingRuleEntryMatchVariable = "QueryStringArgNames" + ScrubbingRuleEntryMatchVariableRequestIPAddress ScrubbingRuleEntryMatchVariable = "RequestIPAddress" + ScrubbingRuleEntryMatchVariableRequestURI ScrubbingRuleEntryMatchVariable = "RequestUri" +) + +// PossibleScrubbingRuleEntryMatchVariableValues returns the possible values for the ScrubbingRuleEntryMatchVariable const type. +func PossibleScrubbingRuleEntryMatchVariableValues() []ScrubbingRuleEntryMatchVariable { + return []ScrubbingRuleEntryMatchVariable{ + ScrubbingRuleEntryMatchVariableQueryStringArgNames, + ScrubbingRuleEntryMatchVariableRequestIPAddress, + ScrubbingRuleEntryMatchVariableRequestURI, + } +} + +// ScrubbingRuleEntryState - Defines the state of a log scrubbing rule. Default value is enabled. +type ScrubbingRuleEntryState string + +const ( + ScrubbingRuleEntryStateDisabled ScrubbingRuleEntryState = "Disabled" + ScrubbingRuleEntryStateEnabled ScrubbingRuleEntryState = "Enabled" +) + +// PossibleScrubbingRuleEntryStateValues returns the possible values for the ScrubbingRuleEntryState const type. +func PossibleScrubbingRuleEntryStateValues() []ScrubbingRuleEntryState { + return []ScrubbingRuleEntryState{ + ScrubbingRuleEntryStateDisabled, + ScrubbingRuleEntryStateEnabled, + } +} + +// SecretType - The type of the secret resource. +type SecretType string + +const ( + SecretTypeAzureFirstPartyManagedCertificate SecretType = "AzureFirstPartyManagedCertificate" + SecretTypeCustomerCertificate SecretType = "CustomerCertificate" + SecretTypeManagedCertificate SecretType = "ManagedCertificate" + SecretTypeURLSigningKey SecretType = "UrlSigningKey" +) + +// PossibleSecretTypeValues returns the possible values for the SecretType const type. +func PossibleSecretTypeValues() []SecretType { + return []SecretType{ + SecretTypeAzureFirstPartyManagedCertificate, + SecretTypeCustomerCertificate, + SecretTypeManagedCertificate, + SecretTypeURLSigningKey, + } +} + +// SecurityPolicyType - The type of the Security policy to create. +type SecurityPolicyType string + +const ( + SecurityPolicyTypeWebApplicationFirewall SecurityPolicyType = "WebApplicationFirewall" +) + +// PossibleSecurityPolicyTypeValues returns the possible values for the SecurityPolicyType const type. +func PossibleSecurityPolicyTypeValues() []SecurityPolicyType { + return []SecurityPolicyType{ + SecurityPolicyTypeWebApplicationFirewall, + } +} + +type ServerPortMatchConditionParametersTypeName string + +const ( + ServerPortMatchConditionParametersTypeNameDeliveryRuleServerPortConditionParameters ServerPortMatchConditionParametersTypeName = "DeliveryRuleServerPortConditionParameters" +) + +// PossibleServerPortMatchConditionParametersTypeNameValues returns the possible values for the ServerPortMatchConditionParametersTypeName const type. +func PossibleServerPortMatchConditionParametersTypeNameValues() []ServerPortMatchConditionParametersTypeName { + return []ServerPortMatchConditionParametersTypeName{ + ServerPortMatchConditionParametersTypeNameDeliveryRuleServerPortConditionParameters, + } +} + +// ServerPortOperator - Describes operator to be matched +type ServerPortOperator string + +const ( + ServerPortOperatorAny ServerPortOperator = "Any" + ServerPortOperatorBeginsWith ServerPortOperator = "BeginsWith" + ServerPortOperatorContains ServerPortOperator = "Contains" + ServerPortOperatorEndsWith ServerPortOperator = "EndsWith" + ServerPortOperatorEqual ServerPortOperator = "Equal" + ServerPortOperatorGreaterThan ServerPortOperator = "GreaterThan" + ServerPortOperatorGreaterThanOrEqual ServerPortOperator = "GreaterThanOrEqual" + ServerPortOperatorLessThan ServerPortOperator = "LessThan" + ServerPortOperatorLessThanOrEqual ServerPortOperator = "LessThanOrEqual" + ServerPortOperatorRegEx ServerPortOperator = "RegEx" +) + +// PossibleServerPortOperatorValues returns the possible values for the ServerPortOperator const type. +func PossibleServerPortOperatorValues() []ServerPortOperator { + return []ServerPortOperator{ + ServerPortOperatorAny, + ServerPortOperatorBeginsWith, + ServerPortOperatorContains, + ServerPortOperatorEndsWith, + ServerPortOperatorEqual, + ServerPortOperatorGreaterThan, + ServerPortOperatorGreaterThanOrEqual, + ServerPortOperatorLessThan, + ServerPortOperatorLessThanOrEqual, + ServerPortOperatorRegEx, + } +} + +// SharedPrivateLinkResourceStatus - Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, +// or Timeout. +type SharedPrivateLinkResourceStatus string + +const ( + SharedPrivateLinkResourceStatusApproved SharedPrivateLinkResourceStatus = "Approved" + SharedPrivateLinkResourceStatusDisconnected SharedPrivateLinkResourceStatus = "Disconnected" + SharedPrivateLinkResourceStatusPending SharedPrivateLinkResourceStatus = "Pending" + SharedPrivateLinkResourceStatusRejected SharedPrivateLinkResourceStatus = "Rejected" + SharedPrivateLinkResourceStatusTimeout SharedPrivateLinkResourceStatus = "Timeout" +) + +// PossibleSharedPrivateLinkResourceStatusValues returns the possible values for the SharedPrivateLinkResourceStatus const type. +func PossibleSharedPrivateLinkResourceStatusValues() []SharedPrivateLinkResourceStatus { + return []SharedPrivateLinkResourceStatus{ + SharedPrivateLinkResourceStatusApproved, + SharedPrivateLinkResourceStatusDisconnected, + SharedPrivateLinkResourceStatusPending, + SharedPrivateLinkResourceStatusRejected, + SharedPrivateLinkResourceStatusTimeout, + } +} + +type SocketAddrMatchConditionParametersTypeName string + +const ( + SocketAddrMatchConditionParametersTypeNameDeliveryRuleSocketAddrConditionParameters SocketAddrMatchConditionParametersTypeName = "DeliveryRuleSocketAddrConditionParameters" +) + +// PossibleSocketAddrMatchConditionParametersTypeNameValues returns the possible values for the SocketAddrMatchConditionParametersTypeName const type. +func PossibleSocketAddrMatchConditionParametersTypeNameValues() []SocketAddrMatchConditionParametersTypeName { + return []SocketAddrMatchConditionParametersTypeName{ + SocketAddrMatchConditionParametersTypeNameDeliveryRuleSocketAddrConditionParameters, + } +} + +// SocketAddrOperator - Describes operator to be matched +type SocketAddrOperator string + +const ( + SocketAddrOperatorAny SocketAddrOperator = "Any" + SocketAddrOperatorIPMatch SocketAddrOperator = "IPMatch" +) + +// PossibleSocketAddrOperatorValues returns the possible values for the SocketAddrOperator const type. +func PossibleSocketAddrOperatorValues() []SocketAddrOperator { + return []SocketAddrOperator{ + SocketAddrOperatorAny, + SocketAddrOperatorIPMatch, + } +} + +// Status - The validation status. +type Status string + +const ( + StatusAccessDenied Status = "AccessDenied" + StatusCertificateExpired Status = "CertificateExpired" + StatusInvalid Status = "Invalid" + StatusValid Status = "Valid" +) + +// PossibleStatusValues returns the possible values for the Status const type. +func PossibleStatusValues() []Status { + return []Status{ + StatusAccessDenied, + StatusCertificateExpired, + StatusInvalid, + StatusValid, + } +} + +// Transform - Describes what transforms are applied before matching +type Transform string + +const ( + TransformLowercase Transform = "Lowercase" + TransformRemoveNulls Transform = "RemoveNulls" + TransformTrim Transform = "Trim" + TransformURLDecode Transform = "UrlDecode" + TransformURLEncode Transform = "UrlEncode" + TransformUppercase Transform = "Uppercase" +) + +// PossibleTransformValues returns the possible values for the Transform const type. +func PossibleTransformValues() []Transform { + return []Transform{ + TransformLowercase, + TransformRemoveNulls, + TransformTrim, + TransformURLDecode, + TransformURLEncode, + TransformUppercase, + } +} + +// TransformType - Describes what transforms were applied before matching. +type TransformType string + +const ( + TransformTypeLowercase TransformType = "Lowercase" + TransformTypeRemoveNulls TransformType = "RemoveNulls" + TransformTypeTrim TransformType = "Trim" + TransformTypeURLDecode TransformType = "UrlDecode" + TransformTypeURLEncode TransformType = "UrlEncode" + TransformTypeUppercase TransformType = "Uppercase" +) + +// PossibleTransformTypeValues returns the possible values for the TransformType const type. +func PossibleTransformTypeValues() []TransformType { + return []TransformType{ + TransformTypeLowercase, + TransformTypeRemoveNulls, + TransformTypeTrim, + TransformTypeURLDecode, + TransformTypeURLEncode, + TransformTypeUppercase, + } +} + +type URLFileExtensionMatchConditionParametersTypeName string + +const ( + URLFileExtensionMatchConditionParametersTypeNameDeliveryRuleURLFileExtensionMatchConditionParameters URLFileExtensionMatchConditionParametersTypeName = "DeliveryRuleUrlFileExtensionMatchConditionParameters" +) + +// PossibleURLFileExtensionMatchConditionParametersTypeNameValues returns the possible values for the URLFileExtensionMatchConditionParametersTypeName const type. +func PossibleURLFileExtensionMatchConditionParametersTypeNameValues() []URLFileExtensionMatchConditionParametersTypeName { + return []URLFileExtensionMatchConditionParametersTypeName{ + URLFileExtensionMatchConditionParametersTypeNameDeliveryRuleURLFileExtensionMatchConditionParameters, + } +} + +// URLFileExtensionOperator - Describes operator to be matched +type URLFileExtensionOperator string + +const ( + URLFileExtensionOperatorAny URLFileExtensionOperator = "Any" + URLFileExtensionOperatorBeginsWith URLFileExtensionOperator = "BeginsWith" + URLFileExtensionOperatorContains URLFileExtensionOperator = "Contains" + URLFileExtensionOperatorEndsWith URLFileExtensionOperator = "EndsWith" + URLFileExtensionOperatorEqual URLFileExtensionOperator = "Equal" + URLFileExtensionOperatorGreaterThan URLFileExtensionOperator = "GreaterThan" + URLFileExtensionOperatorGreaterThanOrEqual URLFileExtensionOperator = "GreaterThanOrEqual" + URLFileExtensionOperatorLessThan URLFileExtensionOperator = "LessThan" + URLFileExtensionOperatorLessThanOrEqual URLFileExtensionOperator = "LessThanOrEqual" + URLFileExtensionOperatorRegEx URLFileExtensionOperator = "RegEx" +) + +// PossibleURLFileExtensionOperatorValues returns the possible values for the URLFileExtensionOperator const type. +func PossibleURLFileExtensionOperatorValues() []URLFileExtensionOperator { + return []URLFileExtensionOperator{ + URLFileExtensionOperatorAny, + URLFileExtensionOperatorBeginsWith, + URLFileExtensionOperatorContains, + URLFileExtensionOperatorEndsWith, + URLFileExtensionOperatorEqual, + URLFileExtensionOperatorGreaterThan, + URLFileExtensionOperatorGreaterThanOrEqual, + URLFileExtensionOperatorLessThan, + URLFileExtensionOperatorLessThanOrEqual, + URLFileExtensionOperatorRegEx, + } +} + +type URLFileNameMatchConditionParametersTypeName string + +const ( + URLFileNameMatchConditionParametersTypeNameDeliveryRuleURLFilenameConditionParameters URLFileNameMatchConditionParametersTypeName = "DeliveryRuleUrlFilenameConditionParameters" +) + +// PossibleURLFileNameMatchConditionParametersTypeNameValues returns the possible values for the URLFileNameMatchConditionParametersTypeName const type. +func PossibleURLFileNameMatchConditionParametersTypeNameValues() []URLFileNameMatchConditionParametersTypeName { + return []URLFileNameMatchConditionParametersTypeName{ + URLFileNameMatchConditionParametersTypeNameDeliveryRuleURLFilenameConditionParameters, + } +} + +// URLFileNameOperator - Describes operator to be matched +type URLFileNameOperator string + +const ( + URLFileNameOperatorAny URLFileNameOperator = "Any" + URLFileNameOperatorBeginsWith URLFileNameOperator = "BeginsWith" + URLFileNameOperatorContains URLFileNameOperator = "Contains" + URLFileNameOperatorEndsWith URLFileNameOperator = "EndsWith" + URLFileNameOperatorEqual URLFileNameOperator = "Equal" + URLFileNameOperatorGreaterThan URLFileNameOperator = "GreaterThan" + URLFileNameOperatorGreaterThanOrEqual URLFileNameOperator = "GreaterThanOrEqual" + URLFileNameOperatorLessThan URLFileNameOperator = "LessThan" + URLFileNameOperatorLessThanOrEqual URLFileNameOperator = "LessThanOrEqual" + URLFileNameOperatorRegEx URLFileNameOperator = "RegEx" +) + +// PossibleURLFileNameOperatorValues returns the possible values for the URLFileNameOperator const type. +func PossibleURLFileNameOperatorValues() []URLFileNameOperator { + return []URLFileNameOperator{ + URLFileNameOperatorAny, + URLFileNameOperatorBeginsWith, + URLFileNameOperatorContains, + URLFileNameOperatorEndsWith, + URLFileNameOperatorEqual, + URLFileNameOperatorGreaterThan, + URLFileNameOperatorGreaterThanOrEqual, + URLFileNameOperatorLessThan, + URLFileNameOperatorLessThanOrEqual, + URLFileNameOperatorRegEx, + } +} + +type URLPathMatchConditionParametersTypeName string + +const ( + URLPathMatchConditionParametersTypeNameDeliveryRuleURLPathMatchConditionParameters URLPathMatchConditionParametersTypeName = "DeliveryRuleUrlPathMatchConditionParameters" +) + +// PossibleURLPathMatchConditionParametersTypeNameValues returns the possible values for the URLPathMatchConditionParametersTypeName const type. +func PossibleURLPathMatchConditionParametersTypeNameValues() []URLPathMatchConditionParametersTypeName { + return []URLPathMatchConditionParametersTypeName{ + URLPathMatchConditionParametersTypeNameDeliveryRuleURLPathMatchConditionParameters, + } +} + +// URLPathOperator - Describes operator to be matched +type URLPathOperator string + +const ( + URLPathOperatorAny URLPathOperator = "Any" + URLPathOperatorBeginsWith URLPathOperator = "BeginsWith" + URLPathOperatorContains URLPathOperator = "Contains" + URLPathOperatorEndsWith URLPathOperator = "EndsWith" + URLPathOperatorEqual URLPathOperator = "Equal" + URLPathOperatorGreaterThan URLPathOperator = "GreaterThan" + URLPathOperatorGreaterThanOrEqual URLPathOperator = "GreaterThanOrEqual" + URLPathOperatorLessThan URLPathOperator = "LessThan" + URLPathOperatorLessThanOrEqual URLPathOperator = "LessThanOrEqual" + URLPathOperatorRegEx URLPathOperator = "RegEx" + URLPathOperatorWildcard URLPathOperator = "Wildcard" +) + +// PossibleURLPathOperatorValues returns the possible values for the URLPathOperator const type. +func PossibleURLPathOperatorValues() []URLPathOperator { + return []URLPathOperator{ + URLPathOperatorAny, + URLPathOperatorBeginsWith, + URLPathOperatorContains, + URLPathOperatorEndsWith, + URLPathOperatorEqual, + URLPathOperatorGreaterThan, + URLPathOperatorGreaterThanOrEqual, + URLPathOperatorLessThan, + URLPathOperatorLessThanOrEqual, + URLPathOperatorRegEx, + URLPathOperatorWildcard, + } +} + +type URLRedirectActionParametersTypeName string + +const ( + URLRedirectActionParametersTypeNameDeliveryRuleURLRedirectActionParameters URLRedirectActionParametersTypeName = "DeliveryRuleUrlRedirectActionParameters" +) + +// PossibleURLRedirectActionParametersTypeNameValues returns the possible values for the URLRedirectActionParametersTypeName const type. +func PossibleURLRedirectActionParametersTypeNameValues() []URLRedirectActionParametersTypeName { + return []URLRedirectActionParametersTypeName{ + URLRedirectActionParametersTypeNameDeliveryRuleURLRedirectActionParameters, + } +} + +type URLRewriteActionParametersTypeName string + +const ( + URLRewriteActionParametersTypeNameDeliveryRuleURLRewriteActionParameters URLRewriteActionParametersTypeName = "DeliveryRuleUrlRewriteActionParameters" +) + +// PossibleURLRewriteActionParametersTypeNameValues returns the possible values for the URLRewriteActionParametersTypeName const type. +func PossibleURLRewriteActionParametersTypeNameValues() []URLRewriteActionParametersTypeName { + return []URLRewriteActionParametersTypeName{ + URLRewriteActionParametersTypeNameDeliveryRuleURLRewriteActionParameters, + } +} + +type URLSigningActionParametersTypeName string + +const ( + URLSigningActionParametersTypeNameDeliveryRuleURLSigningActionParameters URLSigningActionParametersTypeName = "DeliveryRuleUrlSigningActionParameters" +) + +// PossibleURLSigningActionParametersTypeNameValues returns the possible values for the URLSigningActionParametersTypeName const type. +func PossibleURLSigningActionParametersTypeNameValues() []URLSigningActionParametersTypeName { + return []URLSigningActionParametersTypeName{ + URLSigningActionParametersTypeNameDeliveryRuleURLSigningActionParameters, + } +} + +// UpdateRule - Describes the action that shall be taken when the certificate is updated in Key Vault. +type UpdateRule string + +const ( + UpdateRuleNoAction UpdateRule = "NoAction" +) + +// PossibleUpdateRuleValues returns the possible values for the UpdateRule const type. +func PossibleUpdateRuleValues() []UpdateRule { + return []UpdateRule{ + UpdateRuleNoAction, + } +} + +// UsageUnit - An enum describing the unit of measurement. +type UsageUnit string + +const ( + UsageUnitCount UsageUnit = "Count" +) + +// PossibleUsageUnitValues returns the possible values for the UsageUnit const type. +func PossibleUsageUnitValues() []UsageUnit { + return []UsageUnit{ + UsageUnitCount, + } +} + +type WafAction string + +const ( + WafActionAllow WafAction = "allow" + WafActionBlock WafAction = "block" + WafActionLog WafAction = "log" + WafActionRedirect WafAction = "redirect" +) + +// PossibleWafActionValues returns the possible values for the WafAction const type. +func PossibleWafActionValues() []WafAction { + return []WafAction{ + WafActionAllow, + WafActionBlock, + WafActionLog, + WafActionRedirect, + } +} + +type WafGranularity string + +const ( + WafGranularityP1D WafGranularity = "P1D" + WafGranularityPT1H WafGranularity = "PT1H" + WafGranularityPT5M WafGranularity = "PT5M" +) + +// PossibleWafGranularityValues returns the possible values for the WafGranularity const type. +func PossibleWafGranularityValues() []WafGranularity { + return []WafGranularity{ + WafGranularityP1D, + WafGranularityPT1H, + WafGranularityPT5M, + } +} + +// WafMatchVariable - Match variable to compare against. +type WafMatchVariable string + +const ( + WafMatchVariableCookies WafMatchVariable = "Cookies" + WafMatchVariablePostArgs WafMatchVariable = "PostArgs" + WafMatchVariableQueryString WafMatchVariable = "QueryString" + WafMatchVariableRemoteAddr WafMatchVariable = "RemoteAddr" + WafMatchVariableRequestBody WafMatchVariable = "RequestBody" + WafMatchVariableRequestHeader WafMatchVariable = "RequestHeader" + WafMatchVariableRequestMethod WafMatchVariable = "RequestMethod" + WafMatchVariableRequestURI WafMatchVariable = "RequestUri" + WafMatchVariableSocketAddr WafMatchVariable = "SocketAddr" +) + +// PossibleWafMatchVariableValues returns the possible values for the WafMatchVariable const type. +func PossibleWafMatchVariableValues() []WafMatchVariable { + return []WafMatchVariable{ + WafMatchVariableCookies, + WafMatchVariablePostArgs, + WafMatchVariableQueryString, + WafMatchVariableRemoteAddr, + WafMatchVariableRequestBody, + WafMatchVariableRequestHeader, + WafMatchVariableRequestMethod, + WafMatchVariableRequestURI, + WafMatchVariableSocketAddr, + } +} + +type WafMetric string + +const ( + WafMetricClientRequestCount WafMetric = "clientRequestCount" +) + +// PossibleWafMetricValues returns the possible values for the WafMetric const type. +func PossibleWafMetricValues() []WafMetric { + return []WafMetric{ + WafMetricClientRequestCount, + } +} + +type WafMetricsGranularity string + +const ( + WafMetricsGranularityP1D WafMetricsGranularity = "P1D" + WafMetricsGranularityPT1H WafMetricsGranularity = "PT1H" + WafMetricsGranularityPT5M WafMetricsGranularity = "PT5M" +) + +// PossibleWafMetricsGranularityValues returns the possible values for the WafMetricsGranularity const type. +func PossibleWafMetricsGranularityValues() []WafMetricsGranularity { + return []WafMetricsGranularity{ + WafMetricsGranularityP1D, + WafMetricsGranularityPT1H, + WafMetricsGranularityPT5M, + } +} + +type WafMetricsSeriesUnit string + +const ( + WafMetricsSeriesUnitCount WafMetricsSeriesUnit = "count" +) + +// PossibleWafMetricsSeriesUnitValues returns the possible values for the WafMetricsSeriesUnit const type. +func PossibleWafMetricsSeriesUnitValues() []WafMetricsSeriesUnit { + return []WafMetricsSeriesUnit{ + WafMetricsSeriesUnitCount, + } +} + +type WafRankingGroupBy string + +const ( + WafRankingGroupByCustomDomain WafRankingGroupBy = "customDomain" + WafRankingGroupByHTTPStatusCode WafRankingGroupBy = "httpStatusCode" +) + +// PossibleWafRankingGroupByValues returns the possible values for the WafRankingGroupBy const type. +func PossibleWafRankingGroupByValues() []WafRankingGroupBy { + return []WafRankingGroupBy{ + WafRankingGroupByCustomDomain, + WafRankingGroupByHTTPStatusCode, + } +} + +type WafRankingType string + +const ( + WafRankingTypeAction WafRankingType = "action" + WafRankingTypeClientIP WafRankingType = "clientIp" + WafRankingTypeCountryOrRegion WafRankingType = "countryOrRegion" + WafRankingTypeRuleGroup WafRankingType = "ruleGroup" + WafRankingTypeRuleID WafRankingType = "ruleId" + WafRankingTypeRuleType WafRankingType = "ruleType" + WafRankingTypeURL WafRankingType = "url" + WafRankingTypeUserAgent WafRankingType = "userAgent" +) + +// PossibleWafRankingTypeValues returns the possible values for the WafRankingType const type. +func PossibleWafRankingTypeValues() []WafRankingType { + return []WafRankingType{ + WafRankingTypeAction, + WafRankingTypeClientIP, + WafRankingTypeCountryOrRegion, + WafRankingTypeRuleGroup, + WafRankingTypeRuleID, + WafRankingTypeRuleType, + WafRankingTypeURL, + WafRankingTypeUserAgent, + } +} + +type WafRuleType string + +const ( + WafRuleTypeBot WafRuleType = "bot" + WafRuleTypeCustom WafRuleType = "custom" + WafRuleTypeManaged WafRuleType = "managed" +) + +// PossibleWafRuleTypeValues returns the possible values for the WafRuleType const type. +func PossibleWafRuleTypeValues() []WafRuleType { + return []WafRuleType{ + WafRuleTypeBot, + WafRuleTypeCustom, + WafRuleTypeManaged, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/customdomains_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/customdomains_client.go new file mode 100644 index 00000000..61813352 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/customdomains_client.go @@ -0,0 +1,542 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// CustomDomainsClient contains the methods for the CustomDomains group. +// Don't use this type directly, use NewCustomDomainsClient() instead. +type CustomDomainsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCustomDomainsClient creates a new instance of CustomDomainsClient with the specified values. +// - subscriptionID - Azure Subscription ID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCustomDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomDomainsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CustomDomainsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Creates a new custom domain within an endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - customDomainName - Name of the custom domain within an endpoint. +// - customDomainProperties - Properties required to create a new custom domain. +// - options - CustomDomainsClientBeginCreateOptions contains the optional parameters for the CustomDomainsClient.BeginCreate +// method. +func (client *CustomDomainsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, options *CustomDomainsClientBeginCreateOptions) (*runtime.Poller[CustomDomainsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, profileName, endpointName, customDomainName, customDomainProperties, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomDomainsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Creates a new custom domain within an endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *CustomDomainsClient) create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, options *CustomDomainsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "CustomDomainsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainName, customDomainProperties, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *CustomDomainsClient) createCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, options *CustomDomainsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if customDomainName == "" { + return nil, errors.New("parameter customDomainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customDomainName}", url.PathEscape(customDomainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, customDomainProperties); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an existing custom domain within an endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - customDomainName - Name of the custom domain within an endpoint. +// - options - CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete +// method. +func (client *CustomDomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginDeleteOptions) (*runtime.Poller[CustomDomainsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomDomainsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an existing custom domain within an endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *CustomDomainsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "CustomDomainsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *CustomDomainsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if customDomainName == "" { + return nil, errors.New("parameter customDomainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customDomainName}", url.PathEscape(customDomainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDisableCustomHTTPS - Disable https delivery of the custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - customDomainName - Name of the custom domain within an endpoint. +// - options - CustomDomainsClientBeginDisableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.BeginDisableCustomHTTPS +// method. +func (client *CustomDomainsClient) BeginDisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginDisableCustomHTTPSOptions) (*runtime.Poller[CustomDomainsClientDisableCustomHTTPSResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.disableCustomHTTPS(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientDisableCustomHTTPSResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomDomainsClientDisableCustomHTTPSResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DisableCustomHTTPS - Disable https delivery of the custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *CustomDomainsClient) disableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginDisableCustomHTTPSOptions) (*http.Response, error) { + var err error + const operationName = "CustomDomainsClient.BeginDisableCustomHTTPS" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disableCustomHTTPSCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// disableCustomHTTPSCreateRequest creates the DisableCustomHTTPS request. +func (client *CustomDomainsClient) disableCustomHTTPSCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginDisableCustomHTTPSOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if customDomainName == "" { + return nil, errors.New("parameter customDomainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customDomainName}", url.PathEscape(customDomainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginEnableCustomHTTPS - Enable https delivery of the custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - customDomainName - Name of the custom domain within an endpoint. +// - options - CustomDomainsClientBeginEnableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.BeginEnableCustomHTTPS +// method. +func (client *CustomDomainsClient) BeginEnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginEnableCustomHTTPSOptions) (*runtime.Poller[CustomDomainsClientEnableCustomHTTPSResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.enableCustomHTTPS(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomDomainsClientEnableCustomHTTPSResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomDomainsClientEnableCustomHTTPSResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// EnableCustomHTTPS - Enable https delivery of the custom domain. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *CustomDomainsClient) enableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginEnableCustomHTTPSOptions) (*http.Response, error) { + var err error + const operationName = "CustomDomainsClient.BeginEnableCustomHTTPS" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.enableCustomHTTPSCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// enableCustomHTTPSCreateRequest creates the EnableCustomHTTPS request. +func (client *CustomDomainsClient) enableCustomHTTPSCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientBeginEnableCustomHTTPSOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if customDomainName == "" { + return nil, errors.New("parameter customDomainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customDomainName}", url.PathEscape(customDomainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.CustomDomainHTTPSParameters != nil { + if err := runtime.MarshalAsJSON(req, options.CustomDomainHTTPSParameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// Get - Gets an existing custom domain within an endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - customDomainName - Name of the custom domain within an endpoint. +// - options - CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. +func (client *CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientGetOptions) (CustomDomainsClientGetResponse, error) { + var err error + const operationName = "CustomDomainsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainName, options) + if err != nil { + return CustomDomainsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CustomDomainsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CustomDomainsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *CustomDomainsClient) getCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, options *CustomDomainsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if customDomainName == "" { + return nil, errors.New("parameter customDomainName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customDomainName}", url.PathEscape(customDomainName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *CustomDomainsClient) getHandleResponse(resp *http.Response) (CustomDomainsClientGetResponse, error) { + result := CustomDomainsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomain); err != nil { + return CustomDomainsClientGetResponse{}, err + } + return result, nil +} + +// NewListByEndpointPager - Lists all of the existing custom domains within an endpoint. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - options - CustomDomainsClientListByEndpointOptions contains the optional parameters for the CustomDomainsClient.NewListByEndpointPager +// method. +func (client *CustomDomainsClient) NewListByEndpointPager(resourceGroupName string, profileName string, endpointName string, options *CustomDomainsClientListByEndpointOptions) *runtime.Pager[CustomDomainsClientListByEndpointResponse] { + return runtime.NewPager(runtime.PagingHandler[CustomDomainsClientListByEndpointResponse]{ + More: func(page CustomDomainsClientListByEndpointResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CustomDomainsClientListByEndpointResponse) (CustomDomainsClientListByEndpointResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CustomDomainsClient.NewListByEndpointPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByEndpointCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) + }, nil) + if err != nil { + return CustomDomainsClientListByEndpointResponse{}, err + } + return client.listByEndpointHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByEndpointCreateRequest creates the ListByEndpoint request. +func (client *CustomDomainsClient) listByEndpointCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *CustomDomainsClientListByEndpointOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByEndpointHandleResponse handles the ListByEndpoint response. +func (client *CustomDomainsClient) listByEndpointHandleResponse(resp *http.Response) (CustomDomainsClientListByEndpointResponse, error) { + result := CustomDomainsClientListByEndpointResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomDomainListResult); err != nil { + return CustomDomainsClientListByEndpointResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/edgenodes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/edgenodes_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/edgenodes_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/edgenodes_client.go index f5b13936..bc0f7e6d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/edgenodes_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/edgenodes_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -28,7 +27,7 @@ type EdgeNodesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEdgeNodesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*EdgeNodesClient, error) { - cl, err := arm.NewClient(moduleName+".EdgeNodesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -40,7 +39,7 @@ func NewEdgeNodesClient(credential azcore.TokenCredential, options *arm.ClientOp // NewListPager - Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - options - EdgeNodesClientListOptions contains the optional parameters for the EdgeNodesClient.NewListPager method. func (client *EdgeNodesClient) NewListPager(options *EdgeNodesClientListOptions) *runtime.Pager[EdgeNodesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[EdgeNodesClientListResponse]{ @@ -48,25 +47,20 @@ func (client *EdgeNodesClient) NewListPager(options *EdgeNodesClientListOptions) return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EdgeNodesClientListResponse) (EdgeNodesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EdgeNodesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return EdgeNodesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EdgeNodesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EdgeNodesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -78,7 +72,7 @@ func (client *EdgeNodesClient) listCreateRequest(ctx context.Context, options *E return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/endpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/endpoints_client.go new file mode 100644 index 00000000..a7b227fc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/endpoints_client.go @@ -0,0 +1,914 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// EndpointsClient contains the methods for the Endpoints group. +// Don't use this type directly, use NewEndpointsClient() instead. +type EndpointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewEndpointsClient creates a new instance of EndpointsClient with the specified values. +// - subscriptionID - Azure Subscription ID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &EndpointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group +// and profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - endpoint - Endpoint properties +// - options - EndpointsClientBeginCreateOptions contains the optional parameters for the EndpointsClient.BeginCreate method. +func (client *EndpointsClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, options *EndpointsClientBeginCreateOptions) (*runtime.Poller[EndpointsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, profileName, endpointName, endpoint, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and +// profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *EndpointsClient) create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, options *EndpointsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "EndpointsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, endpointName, endpoint, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *EndpointsClient) createCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, options *EndpointsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, endpoint); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource +// group and profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - options - EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method. +func (client *EndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*runtime.Poller[EndpointsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, profileName, endpointName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group +// and profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *EndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "EndpointsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *EndpointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and +// profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - options - EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method. +func (client *EndpointsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientGetOptions) (EndpointsClientGetResponse, error) { + var err error + const operationName = "EndpointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) + if err != nil { + return EndpointsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EndpointsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EndpointsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *EndpointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *EndpointsClient) getHandleResponse(resp *http.Response) (EndpointsClientGetResponse, error) { + result := EndpointsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Endpoint); err != nil { + return EndpointsClientGetResponse{}, err + } + return result, nil +} + +// NewListByProfilePager - Lists existing CDN endpoints. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - options - EndpointsClientListByProfileOptions contains the optional parameters for the EndpointsClient.NewListByProfilePager +// method. +func (client *EndpointsClient) NewListByProfilePager(resourceGroupName string, profileName string, options *EndpointsClientListByProfileOptions) *runtime.Pager[EndpointsClientListByProfileResponse] { + return runtime.NewPager(runtime.PagingHandler[EndpointsClientListByProfileResponse]{ + More: func(page EndpointsClientListByProfileResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EndpointsClientListByProfileResponse) (EndpointsClientListByProfileResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EndpointsClient.NewListByProfilePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) + }, nil) + if err != nil { + return EndpointsClientListByProfileResponse{}, err + } + return client.listByProfileHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByProfileCreateRequest creates the ListByProfile request. +func (client *EndpointsClient) listByProfileCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *EndpointsClientListByProfileOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByProfileHandleResponse handles the ListByProfile response. +func (client *EndpointsClient) listByProfileHandleResponse(resp *http.Response) (EndpointsClientListByProfileResponse, error) { + result := EndpointsClientListByProfileResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EndpointListResult); err != nil { + return EndpointsClientListByProfileResponse{}, err + } + return result, nil +} + +// NewListResourceUsagePager - Checks the quota and usage of geo filters and custom domains under the given endpoint. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - options - EndpointsClientListResourceUsageOptions contains the optional parameters for the EndpointsClient.NewListResourceUsagePager +// method. +func (client *EndpointsClient) NewListResourceUsagePager(resourceGroupName string, profileName string, endpointName string, options *EndpointsClientListResourceUsageOptions) *runtime.Pager[EndpointsClientListResourceUsageResponse] { + return runtime.NewPager(runtime.PagingHandler[EndpointsClientListResourceUsageResponse]{ + More: func(page EndpointsClientListResourceUsageResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EndpointsClientListResourceUsageResponse) (EndpointsClientListResourceUsageResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EndpointsClient.NewListResourceUsagePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) + }, nil) + if err != nil { + return EndpointsClientListResourceUsageResponse{}, err + } + return client.listResourceUsageHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listResourceUsageCreateRequest creates the ListResourceUsage request. +func (client *EndpointsClient) listResourceUsageCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientListResourceUsageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listResourceUsageHandleResponse handles the ListResourceUsage response. +func (client *EndpointsClient) listResourceUsageHandleResponse(resp *http.Response) (EndpointsClientListResourceUsageResponse, error) { + result := EndpointsClientListResourceUsageResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceUsageListResult); err != nil { + return EndpointsClientListResourceUsageResponse{}, err + } + return result, nil +} + +// BeginLoadContent - Pre-loads a content to CDN. Available for Verizon Profiles. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - contentFilePaths - The path to the content to be loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads +// a single file +// - options - EndpointsClientBeginLoadContentOptions contains the optional parameters for the EndpointsClient.BeginLoadContent +// method. +func (client *EndpointsClient) BeginLoadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, options *EndpointsClientBeginLoadContentOptions) (*runtime.Poller[EndpointsClientLoadContentResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.loadContent(ctx, resourceGroupName, profileName, endpointName, contentFilePaths, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientLoadContentResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointsClientLoadContentResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// LoadContent - Pre-loads a content to CDN. Available for Verizon Profiles. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *EndpointsClient) loadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, options *EndpointsClientBeginLoadContentOptions) (*http.Response, error) { + var err error + const operationName = "EndpointsClient.BeginLoadContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.loadContentCreateRequest(ctx, resourceGroupName, profileName, endpointName, contentFilePaths, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// loadContentCreateRequest creates the LoadContent request. +func (client *EndpointsClient) loadContentCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, options *EndpointsClientBeginLoadContentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, contentFilePaths); err != nil { + return nil, err + } + return req, nil +} + +// BeginPurgeContent - Removes a content from CDN. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - contentFilePaths - The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' which removes +// a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and +// files in the directory. +// - options - EndpointsClientBeginPurgeContentOptions contains the optional parameters for the EndpointsClient.BeginPurgeContent +// method. +func (client *EndpointsClient) BeginPurgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters, options *EndpointsClientBeginPurgeContentOptions) (*runtime.Poller[EndpointsClientPurgeContentResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.purgeContent(ctx, resourceGroupName, profileName, endpointName, contentFilePaths, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientPurgeContentResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointsClientPurgeContentResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PurgeContent - Removes a content from CDN. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *EndpointsClient) purgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters, options *EndpointsClientBeginPurgeContentOptions) (*http.Response, error) { + var err error + const operationName = "EndpointsClient.BeginPurgeContent" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.purgeContentCreateRequest(ctx, resourceGroupName, profileName, endpointName, contentFilePaths, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// purgeContentCreateRequest creates the PurgeContent request. +func (client *EndpointsClient) purgeContentCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters, options *EndpointsClientBeginPurgeContentOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, contentFilePaths); err != nil { + return nil, err + } + return req, nil +} + +// BeginStart - Starts an existing CDN endpoint that is on a stopped state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - options - EndpointsClientBeginStartOptions contains the optional parameters for the EndpointsClient.BeginStart method. +func (client *EndpointsClient) BeginStart(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStartOptions) (*runtime.Poller[EndpointsClientStartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.start(ctx, resourceGroupName, profileName, endpointName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Start - Starts an existing CDN endpoint that is on a stopped state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *EndpointsClient) start(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "EndpointsClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startCreateRequest creates the Start request. +func (client *EndpointsClient) startCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStop - Stops an existing running CDN endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - options - EndpointsClientBeginStopOptions contains the optional parameters for the EndpointsClient.BeginStop method. +func (client *EndpointsClient) BeginStop(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStopOptions) (*runtime.Poller[EndpointsClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, profileName, endpointName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Stop - Stops an existing running CDN endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *EndpointsClient) stop(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "EndpointsClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopCreateRequest creates the Stop request. +func (client *EndpointsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *EndpointsClientBeginStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdate - Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource +// group and profile. Only tags can be updated after creating an endpoint. To update origins, +// use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, +// use the Update Custom Domain operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - endpointUpdateProperties - Endpoint update properties +// - options - EndpointsClientBeginUpdateOptions contains the optional parameters for the EndpointsClient.BeginUpdate method. +func (client *EndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, options *EndpointsClientBeginUpdateOptions) (*runtime.Poller[EndpointsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, profileName, endpointName, endpointUpdateProperties, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group +// and profile. Only tags can be updated after creating an endpoint. To update origins, +// use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, +// use the Update Custom Domain operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *EndpointsClient) update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, options *EndpointsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "EndpointsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, endpointName, endpointUpdateProperties, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *EndpointsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, options *EndpointsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, endpointUpdateProperties); err != nil { + return nil, err + } + return req, nil +} + +// ValidateCustomDomain - Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - customDomainProperties - Custom domain to be validated. +// - options - EndpointsClientValidateCustomDomainOptions contains the optional parameters for the EndpointsClient.ValidateCustomDomain +// method. +func (client *EndpointsClient) ValidateCustomDomain(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput, options *EndpointsClientValidateCustomDomainOptions) (EndpointsClientValidateCustomDomainResponse, error) { + var err error + const operationName = "EndpointsClient.ValidateCustomDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCustomDomainCreateRequest(ctx, resourceGroupName, profileName, endpointName, customDomainProperties, options) + if err != nil { + return EndpointsClientValidateCustomDomainResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EndpointsClientValidateCustomDomainResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EndpointsClientValidateCustomDomainResponse{}, err + } + resp, err := client.validateCustomDomainHandleResponse(httpResp) + return resp, err +} + +// validateCustomDomainCreateRequest creates the ValidateCustomDomain request. +func (client *EndpointsClient) validateCustomDomainCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput, options *EndpointsClientValidateCustomDomainOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, customDomainProperties); err != nil { + return nil, err + } + return req, nil +} + +// validateCustomDomainHandleResponse handles the ValidateCustomDomain response. +func (client *EndpointsClient) validateCustomDomainHandleResponse(resp *http.Response) (EndpointsClientValidateCustomDomainResponse, error) { + result := EndpointsClientValidateCustomDomainResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ValidateCustomDomainOutput); err != nil { + return EndpointsClientValidateCustomDomainResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/interfaces.go new file mode 100644 index 00000000..1c88786c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/interfaces.go @@ -0,0 +1,61 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +// CustomDomainHTTPSParametersClassification provides polymorphic access to related types. +// Call the interface's GetCustomDomainHTTPSParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CustomDomainHTTPSParameters, *ManagedHTTPSParameters, *UserManagedHTTPSParameters +type CustomDomainHTTPSParametersClassification interface { + // GetCustomDomainHTTPSParameters returns the CustomDomainHTTPSParameters content of the underlying type. + GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters +} + +// DeliveryRuleActionAutoGeneratedClassification provides polymorphic access to related types. +// Call the interface's GetDeliveryRuleActionAutoGenerated() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *DeliveryRuleActionAutoGenerated, *DeliveryRuleCacheExpirationAction, *DeliveryRuleCacheKeyQueryStringAction, *DeliveryRuleRequestHeaderAction, +// - *DeliveryRuleResponseHeaderAction, *DeliveryRuleRouteConfigurationOverrideAction, *OriginGroupOverrideAction, *URLRedirectAction, +// - *URLRewriteAction, *URLSigningAction +type DeliveryRuleActionAutoGeneratedClassification interface { + // GetDeliveryRuleActionAutoGenerated returns the DeliveryRuleActionAutoGenerated content of the underlying type. + GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated +} + +// DeliveryRuleConditionClassification provides polymorphic access to related types. +// Call the interface's GetDeliveryRuleCondition() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *DeliveryRuleClientPortCondition, *DeliveryRuleCondition, *DeliveryRuleCookiesCondition, *DeliveryRuleHTTPVersionCondition, +// - *DeliveryRuleHostNameCondition, *DeliveryRuleIsDeviceCondition, *DeliveryRulePostArgsCondition, *DeliveryRuleQueryStringCondition, +// - *DeliveryRuleRemoteAddressCondition, *DeliveryRuleRequestBodyCondition, *DeliveryRuleRequestHeaderCondition, *DeliveryRuleRequestMethodCondition, +// - *DeliveryRuleRequestSchemeCondition, *DeliveryRuleRequestURICondition, *DeliveryRuleSSLProtocolCondition, *DeliveryRuleServerPortCondition, +// - *DeliveryRuleSocketAddrCondition, *DeliveryRuleURLFileExtensionCondition, *DeliveryRuleURLFileNameCondition, *DeliveryRuleURLPathCondition +type DeliveryRuleConditionClassification interface { + // GetDeliveryRuleCondition returns the DeliveryRuleCondition content of the underlying type. + GetDeliveryRuleCondition() *DeliveryRuleCondition +} + +// SecretParametersClassification provides polymorphic access to related types. +// Call the interface's GetSecretParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFirstPartyManagedCertificateParameters, *CustomerCertificateParameters, *ManagedCertificateParameters, *SecretParameters, +// - *URLSigningKeyParameters +type SecretParametersClassification interface { + // GetSecretParameters returns the SecretParameters content of the underlying type. + GetSecretParameters() *SecretParameters +} + +// SecurityPolicyPropertiesParametersClassification provides polymorphic access to related types. +// Call the interface's GetSecurityPolicyPropertiesParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *SecurityPolicyPropertiesParameters, *SecurityPolicyWebApplicationFirewallParameters +type SecurityPolicyPropertiesParametersClassification interface { + // GetSecurityPolicyPropertiesParameters returns the SecurityPolicyPropertiesParameters content of the underlying type. + GetSecurityPolicyPropertiesParameters() *SecurityPolicyPropertiesParameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/loganalytics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/loganalytics_client.go similarity index 85% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/loganalytics_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/loganalytics_client.go index 9de58dcb..844152ff 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/loganalytics_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/loganalytics_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -35,7 +34,7 @@ type LogAnalyticsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewLogAnalyticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LogAnalyticsClient, error) { - cl, err := arm.NewClient(moduleName+".LogAnalyticsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +48,32 @@ func NewLogAnalyticsClient(subscriptionID string, credential azcore.TokenCredent // GetLogAnalyticsLocations - Get all available location names for AFD log analytics report. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. which is unique within the resource group. // - options - LogAnalyticsClientGetLogAnalyticsLocationsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsLocations // method. func (client *LogAnalyticsClient) GetLogAnalyticsLocations(ctx context.Context, resourceGroupName string, profileName string, options *LogAnalyticsClientGetLogAnalyticsLocationsOptions) (LogAnalyticsClientGetLogAnalyticsLocationsResponse, error) { + var err error + const operationName = "LogAnalyticsClient.GetLogAnalyticsLocations" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getLogAnalyticsLocationsCreateRequest(ctx, resourceGroupName, profileName, options) if err != nil { return LogAnalyticsClientGetLogAnalyticsLocationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LogAnalyticsClientGetLogAnalyticsLocationsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogAnalyticsClientGetLogAnalyticsLocationsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LogAnalyticsClientGetLogAnalyticsLocationsResponse{}, err } - return client.getLogAnalyticsLocationsHandleResponse(resp) + resp, err := client.getLogAnalyticsLocationsHandleResponse(httpResp) + return resp, err } // getLogAnalyticsLocationsCreateRequest creates the GetLogAnalyticsLocations request. @@ -90,7 +96,7 @@ func (client *LogAnalyticsClient) getLogAnalyticsLocationsCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -108,25 +114,32 @@ func (client *LogAnalyticsClient) getLogAnalyticsLocationsHandleResponse(resp *h // GetLogAnalyticsMetrics - Get log report for AFD profile // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. which is unique within the resource group. // - options - LogAnalyticsClientGetLogAnalyticsMetricsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsMetrics // method. func (client *LogAnalyticsClient) GetLogAnalyticsMetrics(ctx context.Context, resourceGroupName string, profileName string, metrics []LogMetric, dateTimeBegin time.Time, dateTimeEnd time.Time, granularity LogMetricsGranularity, customDomains []string, protocols []string, options *LogAnalyticsClientGetLogAnalyticsMetricsOptions) (LogAnalyticsClientGetLogAnalyticsMetricsResponse, error) { + var err error + const operationName = "LogAnalyticsClient.GetLogAnalyticsMetrics" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getLogAnalyticsMetricsCreateRequest(ctx, resourceGroupName, profileName, metrics, dateTimeBegin, dateTimeEnd, granularity, customDomains, protocols, options) if err != nil { return LogAnalyticsClientGetLogAnalyticsMetricsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LogAnalyticsClientGetLogAnalyticsMetricsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogAnalyticsClientGetLogAnalyticsMetricsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LogAnalyticsClientGetLogAnalyticsMetricsResponse{}, err } - return client.getLogAnalyticsMetricsHandleResponse(resp) + resp, err := client.getLogAnalyticsMetricsHandleResponse(httpResp) + return resp, err } // getLogAnalyticsMetricsCreateRequest creates the GetLogAnalyticsMetrics request. @@ -149,18 +162,7 @@ func (client *LogAnalyticsClient) getLogAnalyticsMetricsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - for _, qv := range metrics { - reqQP.Add("metrics", string(qv)) - } - reqQP.Set("dateTimeBegin", dateTimeBegin.Format(time.RFC3339Nano)) - reqQP.Set("dateTimeEnd", dateTimeEnd.Format(time.RFC3339Nano)) - reqQP.Set("granularity", string(granularity)) - if options != nil && options.GroupBy != nil { - for _, qv := range options.GroupBy { - reqQP.Add("groupBy", string(qv)) - } - } + reqQP.Set("api-version", "2024-02-01") if options != nil && options.Continents != nil { for _, qv := range options.Continents { reqQP.Add("continents", qv) @@ -174,6 +176,17 @@ func (client *LogAnalyticsClient) getLogAnalyticsMetricsCreateRequest(ctx contex for _, qv := range customDomains { reqQP.Add("customDomains", qv) } + reqQP.Set("dateTimeBegin", dateTimeBegin.Format(time.RFC3339Nano)) + reqQP.Set("dateTimeEnd", dateTimeEnd.Format(time.RFC3339Nano)) + reqQP.Set("granularity", string(granularity)) + if options != nil && options.GroupBy != nil { + for _, qv := range options.GroupBy { + reqQP.Add("groupBy", string(qv)) + } + } + for _, qv := range metrics { + reqQP.Add("metrics", string(qv)) + } for _, qv := range protocols { reqQP.Add("protocols", qv) } @@ -194,25 +207,32 @@ func (client *LogAnalyticsClient) getLogAnalyticsMetricsHandleResponse(resp *htt // GetLogAnalyticsRankings - Get log analytics ranking report for AFD profile // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. which is unique within the resource group. // - options - LogAnalyticsClientGetLogAnalyticsRankingsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsRankings // method. func (client *LogAnalyticsClient) GetLogAnalyticsRankings(ctx context.Context, resourceGroupName string, profileName string, rankings []LogRanking, metrics []LogRankingMetric, maxRanking int32, dateTimeBegin time.Time, dateTimeEnd time.Time, options *LogAnalyticsClientGetLogAnalyticsRankingsOptions) (LogAnalyticsClientGetLogAnalyticsRankingsResponse, error) { + var err error + const operationName = "LogAnalyticsClient.GetLogAnalyticsRankings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getLogAnalyticsRankingsCreateRequest(ctx, resourceGroupName, profileName, rankings, metrics, maxRanking, dateTimeBegin, dateTimeEnd, options) if err != nil { return LogAnalyticsClientGetLogAnalyticsRankingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LogAnalyticsClientGetLogAnalyticsRankingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogAnalyticsClientGetLogAnalyticsRankingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LogAnalyticsClientGetLogAnalyticsRankingsResponse{}, err } - return client.getLogAnalyticsRankingsHandleResponse(resp) + resp, err := client.getLogAnalyticsRankingsHandleResponse(httpResp) + return resp, err } // getLogAnalyticsRankingsCreateRequest creates the GetLogAnalyticsRankings request. @@ -235,21 +255,21 @@ func (client *LogAnalyticsClient) getLogAnalyticsRankingsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - for _, qv := range rankings { - reqQP.Add("rankings", string(qv)) - } - for _, qv := range metrics { - reqQP.Add("metrics", string(qv)) - } - reqQP.Set("maxRanking", strconv.FormatInt(int64(maxRanking), 10)) - reqQP.Set("dateTimeBegin", dateTimeBegin.Format(time.RFC3339Nano)) - reqQP.Set("dateTimeEnd", dateTimeEnd.Format(time.RFC3339Nano)) + reqQP.Set("api-version", "2024-02-01") if options != nil && options.CustomDomains != nil { for _, qv := range options.CustomDomains { reqQP.Add("customDomains", qv) } } + reqQP.Set("dateTimeBegin", dateTimeBegin.Format(time.RFC3339Nano)) + reqQP.Set("dateTimeEnd", dateTimeEnd.Format(time.RFC3339Nano)) + reqQP.Set("maxRanking", strconv.FormatInt(int64(maxRanking), 10)) + for _, qv := range metrics { + reqQP.Add("metrics", string(qv)) + } + for _, qv := range rankings { + reqQP.Add("rankings", string(qv)) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,25 +287,32 @@ func (client *LogAnalyticsClient) getLogAnalyticsRankingsHandleResponse(resp *ht // GetLogAnalyticsResources - Get all endpoints and custom domains available for AFD log report // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. which is unique within the resource group. // - options - LogAnalyticsClientGetLogAnalyticsResourcesOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsResources // method. func (client *LogAnalyticsClient) GetLogAnalyticsResources(ctx context.Context, resourceGroupName string, profileName string, options *LogAnalyticsClientGetLogAnalyticsResourcesOptions) (LogAnalyticsClientGetLogAnalyticsResourcesResponse, error) { + var err error + const operationName = "LogAnalyticsClient.GetLogAnalyticsResources" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getLogAnalyticsResourcesCreateRequest(ctx, resourceGroupName, profileName, options) if err != nil { return LogAnalyticsClientGetLogAnalyticsResourcesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LogAnalyticsClientGetLogAnalyticsResourcesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogAnalyticsClientGetLogAnalyticsResourcesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LogAnalyticsClientGetLogAnalyticsResourcesResponse{}, err } - return client.getLogAnalyticsResourcesHandleResponse(resp) + resp, err := client.getLogAnalyticsResourcesHandleResponse(httpResp) + return resp, err } // getLogAnalyticsResourcesCreateRequest creates the GetLogAnalyticsResources request. @@ -308,7 +335,7 @@ func (client *LogAnalyticsClient) getLogAnalyticsResourcesCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -326,25 +353,32 @@ func (client *LogAnalyticsClient) getLogAnalyticsResourcesHandleResponse(resp *h // GetWafLogAnalyticsMetrics - Get Waf related log analytics report for AFD profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. which is unique within the resource group. // - options - LogAnalyticsClientGetWafLogAnalyticsMetricsOptions contains the optional parameters for the LogAnalyticsClient.GetWafLogAnalyticsMetrics // method. func (client *LogAnalyticsClient) GetWafLogAnalyticsMetrics(ctx context.Context, resourceGroupName string, profileName string, metrics []WafMetric, dateTimeBegin time.Time, dateTimeEnd time.Time, granularity WafGranularity, options *LogAnalyticsClientGetWafLogAnalyticsMetricsOptions) (LogAnalyticsClientGetWafLogAnalyticsMetricsResponse, error) { + var err error + const operationName = "LogAnalyticsClient.GetWafLogAnalyticsMetrics" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getWafLogAnalyticsMetricsCreateRequest(ctx, resourceGroupName, profileName, metrics, dateTimeBegin, dateTimeEnd, granularity, options) if err != nil { return LogAnalyticsClientGetWafLogAnalyticsMetricsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LogAnalyticsClientGetWafLogAnalyticsMetricsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogAnalyticsClientGetWafLogAnalyticsMetricsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LogAnalyticsClientGetWafLogAnalyticsMetricsResponse{}, err } - return client.getWafLogAnalyticsMetricsHandleResponse(resp) + resp, err := client.getWafLogAnalyticsMetricsHandleResponse(httpResp) + return resp, err } // getWafLogAnalyticsMetricsCreateRequest creates the GetWafLogAnalyticsMetrics request. @@ -367,23 +401,23 @@ func (client *LogAnalyticsClient) getWafLogAnalyticsMetricsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - for _, qv := range metrics { - reqQP.Add("metrics", string(qv)) - } - reqQP.Set("dateTimeBegin", dateTimeBegin.Format(time.RFC3339Nano)) - reqQP.Set("dateTimeEnd", dateTimeEnd.Format(time.RFC3339Nano)) - reqQP.Set("granularity", string(granularity)) if options != nil && options.Actions != nil { for _, qv := range options.Actions { reqQP.Add("actions", string(qv)) } } + reqQP.Set("api-version", "2024-02-01") + reqQP.Set("dateTimeBegin", dateTimeBegin.Format(time.RFC3339Nano)) + reqQP.Set("dateTimeEnd", dateTimeEnd.Format(time.RFC3339Nano)) + reqQP.Set("granularity", string(granularity)) if options != nil && options.GroupBy != nil { for _, qv := range options.GroupBy { reqQP.Add("groupBy", string(qv)) } } + for _, qv := range metrics { + reqQP.Add("metrics", string(qv)) + } if options != nil && options.RuleTypes != nil { for _, qv := range options.RuleTypes { reqQP.Add("ruleTypes", string(qv)) @@ -406,25 +440,32 @@ func (client *LogAnalyticsClient) getWafLogAnalyticsMetricsHandleResponse(resp * // GetWafLogAnalyticsRankings - Get WAF log analytics charts for AFD profile // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. which is unique within the resource group. // - options - LogAnalyticsClientGetWafLogAnalyticsRankingsOptions contains the optional parameters for the LogAnalyticsClient.GetWafLogAnalyticsRankings // method. func (client *LogAnalyticsClient) GetWafLogAnalyticsRankings(ctx context.Context, resourceGroupName string, profileName string, metrics []WafMetric, dateTimeBegin time.Time, dateTimeEnd time.Time, maxRanking int32, rankings []WafRankingType, options *LogAnalyticsClientGetWafLogAnalyticsRankingsOptions) (LogAnalyticsClientGetWafLogAnalyticsRankingsResponse, error) { + var err error + const operationName = "LogAnalyticsClient.GetWafLogAnalyticsRankings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getWafLogAnalyticsRankingsCreateRequest(ctx, resourceGroupName, profileName, metrics, dateTimeBegin, dateTimeEnd, maxRanking, rankings, options) if err != nil { return LogAnalyticsClientGetWafLogAnalyticsRankingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return LogAnalyticsClientGetWafLogAnalyticsRankingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogAnalyticsClientGetWafLogAnalyticsRankingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LogAnalyticsClientGetWafLogAnalyticsRankingsResponse{}, err } - return client.getWafLogAnalyticsRankingsHandleResponse(resp) + resp, err := client.getWafLogAnalyticsRankingsHandleResponse(httpResp) + return resp, err } // getWafLogAnalyticsRankingsCreateRequest creates the GetWafLogAnalyticsRankings request. @@ -447,21 +488,21 @@ func (client *LogAnalyticsClient) getWafLogAnalyticsRankingsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - for _, qv := range metrics { - reqQP.Add("metrics", string(qv)) + if options != nil && options.Actions != nil { + for _, qv := range options.Actions { + reqQP.Add("actions", string(qv)) + } } + reqQP.Set("api-version", "2024-02-01") reqQP.Set("dateTimeBegin", dateTimeBegin.Format(time.RFC3339Nano)) reqQP.Set("dateTimeEnd", dateTimeEnd.Format(time.RFC3339Nano)) reqQP.Set("maxRanking", strconv.FormatInt(int64(maxRanking), 10)) + for _, qv := range metrics { + reqQP.Add("metrics", string(qv)) + } for _, qv := range rankings { reqQP.Add("rankings", string(qv)) } - if options != nil && options.Actions != nil { - for _, qv := range options.Actions { - reqQP.Add("actions", string(qv)) - } - } if options != nil && options.RuleTypes != nil { for _, qv := range options.RuleTypes { reqQP.Add("ruleTypes", string(qv)) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/managedrulesets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/managedrulesets_client.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/managedrulesets_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/managedrulesets_client.go index f51fe032..2b7abb1d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/managedrulesets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/managedrulesets_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type ManagedRuleSetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagedRuleSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedRuleSetsClient, error) { - cl, err := arm.NewClient(moduleName+".ManagedRuleSetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -46,7 +45,7 @@ func NewManagedRuleSetsClient(subscriptionID string, credential azcore.TokenCred // NewListPager - Lists all available managed rule sets. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - options - ManagedRuleSetsClientListOptions contains the optional parameters for the ManagedRuleSetsClient.NewListPager // method. func (client *ManagedRuleSetsClient) NewListPager(options *ManagedRuleSetsClientListOptions) *runtime.Pager[ManagedRuleSetsClientListResponse] { @@ -55,25 +54,20 @@ func (client *ManagedRuleSetsClient) NewListPager(options *ManagedRuleSetsClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ManagedRuleSetsClientListResponse) (ManagedRuleSetsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedRuleSetsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ManagedRuleSetsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedRuleSetsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedRuleSetsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -89,7 +83,7 @@ func (client *ManagedRuleSetsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/management_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/management_client.go new file mode 100644 index 00000000..147db9ea --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/management_client.go @@ -0,0 +1,286 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagementClient contains the methods for the CdnManagementClient group. +// Don't use this type directly, use NewManagementClient() instead. +type ManagementClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagementClient creates a new instance of ManagementClient with the specified values. +// - subscriptionID - Azure Subscription ID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagementClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckEndpointNameAvailability - Check the availability of a resource name. This is needed for resources where name is globally +// unique, such as a afdx endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - checkEndpointNameAvailabilityInput - Input to check. +// - options - ManagementClientCheckEndpointNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckEndpointNameAvailability +// method. +func (client *ManagementClient) CheckEndpointNameAvailability(ctx context.Context, resourceGroupName string, checkEndpointNameAvailabilityInput CheckEndpointNameAvailabilityInput, options *ManagementClientCheckEndpointNameAvailabilityOptions) (ManagementClientCheckEndpointNameAvailabilityResponse, error) { + var err error + const operationName = "ManagementClient.CheckEndpointNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkEndpointNameAvailabilityCreateRequest(ctx, resourceGroupName, checkEndpointNameAvailabilityInput, options) + if err != nil { + return ManagementClientCheckEndpointNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientCheckEndpointNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientCheckEndpointNameAvailabilityResponse{}, err + } + resp, err := client.checkEndpointNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkEndpointNameAvailabilityCreateRequest creates the CheckEndpointNameAvailability request. +func (client *ManagementClient) checkEndpointNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, checkEndpointNameAvailabilityInput CheckEndpointNameAvailabilityInput, options *ManagementClientCheckEndpointNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, checkEndpointNameAvailabilityInput); err != nil { + return nil, err + } + return req, nil +} + +// checkEndpointNameAvailabilityHandleResponse handles the CheckEndpointNameAvailability response. +func (client *ManagementClient) checkEndpointNameAvailabilityHandleResponse(resp *http.Response) (ManagementClientCheckEndpointNameAvailabilityResponse, error) { + result := ManagementClientCheckEndpointNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckEndpointNameAvailabilityOutput); err != nil { + return ManagementClientCheckEndpointNameAvailabilityResponse{}, err + } + return result, nil +} + +// CheckNameAvailability - Check the availability of a resource name. This is needed for resources where name is globally +// unique, such as a CDN endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - checkNameAvailabilityInput - Input to check. +// - options - ManagementClientCheckNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckNameAvailability +// method. +func (client *ManagementClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput, options *ManagementClientCheckNameAvailabilityOptions) (ManagementClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ManagementClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkNameAvailabilityCreateRequest(ctx, checkNameAvailabilityInput, options) + if err != nil { + return ManagementClientCheckNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientCheckNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientCheckNameAvailabilityResponse{}, err + } + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. +func (client *ManagementClient) checkNameAvailabilityCreateRequest(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput, options *ManagementClientCheckNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Cdn/checkNameAvailability" + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, checkNameAvailabilityInput); err != nil { + return nil, err + } + return req, nil +} + +// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. +func (client *ManagementClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ManagementClientCheckNameAvailabilityResponse, error) { + result := ManagementClientCheckNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityOutput); err != nil { + return ManagementClientCheckNameAvailabilityResponse{}, err + } + return result, nil +} + +// CheckNameAvailabilityWithSubscription - Check the availability of a resource name. This is needed for resources where name +// is globally unique, such as a CDN endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - checkNameAvailabilityInput - Input to check. +// - options - ManagementClientCheckNameAvailabilityWithSubscriptionOptions contains the optional parameters for the ManagementClient.CheckNameAvailabilityWithSubscription +// method. +func (client *ManagementClient) CheckNameAvailabilityWithSubscription(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput, options *ManagementClientCheckNameAvailabilityWithSubscriptionOptions) (ManagementClientCheckNameAvailabilityWithSubscriptionResponse, error) { + var err error + const operationName = "ManagementClient.CheckNameAvailabilityWithSubscription" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkNameAvailabilityWithSubscriptionCreateRequest(ctx, checkNameAvailabilityInput, options) + if err != nil { + return ManagementClientCheckNameAvailabilityWithSubscriptionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientCheckNameAvailabilityWithSubscriptionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientCheckNameAvailabilityWithSubscriptionResponse{}, err + } + resp, err := client.checkNameAvailabilityWithSubscriptionHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityWithSubscriptionCreateRequest creates the CheckNameAvailabilityWithSubscription request. +func (client *ManagementClient) checkNameAvailabilityWithSubscriptionCreateRequest(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput, options *ManagementClientCheckNameAvailabilityWithSubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, checkNameAvailabilityInput); err != nil { + return nil, err + } + return req, nil +} + +// checkNameAvailabilityWithSubscriptionHandleResponse handles the CheckNameAvailabilityWithSubscription response. +func (client *ManagementClient) checkNameAvailabilityWithSubscriptionHandleResponse(resp *http.Response) (ManagementClientCheckNameAvailabilityWithSubscriptionResponse, error) { + result := ManagementClientCheckNameAvailabilityWithSubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityOutput); err != nil { + return ManagementClientCheckNameAvailabilityWithSubscriptionResponse{}, err + } + return result, nil +} + +// ValidateProbe - Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file +// hosted on the origin server to help accelerate the delivery of dynamic content via the CDN +// endpoint. This path is relative to the origin path specified in the endpoint configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - validateProbeInput - Input to check. +// - options - ManagementClientValidateProbeOptions contains the optional parameters for the ManagementClient.ValidateProbe +// method. +func (client *ManagementClient) ValidateProbe(ctx context.Context, validateProbeInput ValidateProbeInput, options *ManagementClientValidateProbeOptions) (ManagementClientValidateProbeResponse, error) { + var err error + const operationName = "ManagementClient.ValidateProbe" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateProbeCreateRequest(ctx, validateProbeInput, options) + if err != nil { + return ManagementClientValidateProbeResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientValidateProbeResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientValidateProbeResponse{}, err + } + resp, err := client.validateProbeHandleResponse(httpResp) + return resp, err +} + +// validateProbeCreateRequest creates the ValidateProbe request. +func (client *ManagementClient) validateProbeCreateRequest(ctx context.Context, validateProbeInput ValidateProbeInput, options *ManagementClientValidateProbeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, validateProbeInput); err != nil { + return nil, err + } + return req, nil +} + +// validateProbeHandleResponse handles the ValidateProbe response. +func (client *ManagementClient) validateProbeHandleResponse(resp *http.Response) (ManagementClientValidateProbeResponse, error) { + result := ManagementClientValidateProbeResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ValidateProbeOutput); err != nil { + return ManagementClientValidateProbeResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/models.go new file mode 100644 index 00000000..6bf84b2b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/models.go @@ -0,0 +1,3795 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import "time" + +// AFDDomain - Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. +// www.contoso.com. +type AFDDomain struct { + // The JSON object that contains the properties of the domain to create. + Properties *AFDDomainProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// AFDDomainHTTPSParameters - The JSON object that contains the properties to secure a domain. +type AFDDomainHTTPSParameters struct { + // REQUIRED; Defines the source of the SSL certificate. + CertificateType *AfdCertificateType + + // TLS protocol version that will be used for Https + MinimumTLSVersion *AfdMinimumTLSVersion + + // Resource reference to the secret. ie. subs/rg/profile/secret + Secret *ResourceReference +} + +// AFDDomainListResult - Result of the request to list domains. It contains a list of domain objects and a URL link to get +// the next set of results. +type AFDDomainListResult struct { + // URL to get the next set of domain objects if there are any. + NextLink *string + + // READ-ONLY; List of AzureFrontDoor domains within a profile. + Value []*AFDDomain +} + +// AFDDomainProperties - The JSON object that contains the properties of the domain to create. +type AFDDomainProperties struct { + // REQUIRED; The host name of the domain. Must be a domain name. + HostName *string + + // Resource reference to the Azure DNS zone + AzureDNSZone *ResourceReference + + // Key-Value pair representing migration properties for domains. + ExtendedProperties map[string]*string + + // Resource reference to the Azure resource where custom domain ownership was prevalidated + PreValidatedCustomDomainResourceID *ResourceReference + + // The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + // certificate. If not specified, enabling ssl uses AzureFrontDoor managed + // certificate by default. + TLSSettings *AFDDomainHTTPSParameters + + // READ-ONLY + DeploymentStatus *DeploymentStatus + + // READ-ONLY; Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands + // for DomainControlValidation. + DomainValidationState *DomainValidationState + + // READ-ONLY; The name of the profile which holds the domain. + ProfileName *string + + // READ-ONLY; Provisioning status + ProvisioningState *AfdProvisioningState + + // READ-ONLY; Values the customer needs to validate domain ownership + ValidationProperties *DomainValidationProperties +} + +// AFDDomainUpdateParameters - The domain JSON object required for domain creation or update. +type AFDDomainUpdateParameters struct { + // The JSON object that contains the properties of the domain to create. + Properties *AFDDomainUpdatePropertiesParameters +} + +// AFDDomainUpdatePropertiesParameters - The JSON object that contains the properties of the domain to create. +type AFDDomainUpdatePropertiesParameters struct { + // Resource reference to the Azure DNS zone + AzureDNSZone *ResourceReference + + // Resource reference to the Azure resource where custom domain ownership was prevalidated + PreValidatedCustomDomainResourceID *ResourceReference + + // The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + // certificate. If not specified, enabling ssl uses AzureFrontDoor managed + // certificate by default. + TLSSettings *AFDDomainHTTPSParameters + + // READ-ONLY; The name of the profile which holds the domain. + ProfileName *string +} + +// AFDEndpoint - Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information +// such as origin, protocol, content caching and delivery behavior. The AzureFrontDoor +// endpoint uses the URL format .azureedge.net. +type AFDEndpoint struct { + // REQUIRED; Resource location. + Location *string + + // The JSON object that contains the properties required to create an endpoint. + Properties *AFDEndpointProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// AFDEndpointListResult - Result of the request to list endpoints. It contains a list of endpoint objects and a URL link +// to get the next set of results. +type AFDEndpointListResult struct { + // URL to get the next set of endpoint objects if there is any. + NextLink *string + + // READ-ONLY; List of AzureFrontDoor endpoints within a profile + Value []*AFDEndpoint +} + +// AFDEndpointProperties - The JSON object that contains the properties required to create an endpoint. +type AFDEndpointProperties struct { + // Indicates the endpoint name reuse scope. The default value is TenantReuse. + AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope + + // Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + EnabledState *EnabledState + + // READ-ONLY + DeploymentStatus *DeploymentStatus + + // READ-ONLY; The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + HostName *string + + // READ-ONLY; The name of the profile which holds the endpoint. + ProfileName *string + + // READ-ONLY; Provisioning status + ProvisioningState *AfdProvisioningState +} + +// AFDEndpointPropertiesUpdateParameters - The JSON object containing endpoint update parameters. +type AFDEndpointPropertiesUpdateParameters struct { + // Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + EnabledState *EnabledState + + // READ-ONLY; The name of the profile which holds the endpoint. + ProfileName *string +} + +// AFDEndpointUpdateParameters - Properties required to create or update an endpoint. +type AFDEndpointUpdateParameters struct { + // The JSON object containing endpoint update parameters. + Properties *AFDEndpointPropertiesUpdateParameters + + // Endpoint tags. + Tags map[string]*string +} + +// AFDOrigin - Azure Front Door origin is the source of the content being delivered via Azure Front Door. When the edge nodes +// represented by an endpoint do not have the requested content cached, they attempt to +// fetch it from one or more of the configured origins. +type AFDOrigin struct { + // The JSON object that contains the properties of the origin. + Properties *AFDOriginProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// AFDOriginGroup - AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be +// served from Azure Front Door. +type AFDOriginGroup struct { + // The JSON object that contains the properties of the origin group. + Properties *AFDOriginGroupProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// AFDOriginGroupListResult - Result of the request to list origin groups. It contains a list of origin groups objects and +// a URL link to get the next set of results. +type AFDOriginGroupListResult struct { + // URL to get the next set of origin objects if there are any. + NextLink *string + + // READ-ONLY; List of Azure Front Door origin groups within an Azure Front Door endpoint + Value []*AFDOriginGroup +} + +// AFDOriginGroupProperties - The JSON object that contains the properties of the origin group. +type AFDOriginGroupProperties struct { + // Health probe settings to the origin that is used to determine the health of the origin. + HealthProbeSettings *HealthProbeParameters + + // Load balancing settings for a backend pool + LoadBalancingSettings *LoadBalancingSettingsParameters + + // Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + SessionAffinityState *EnabledState + + // Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + // is added. Default is 10 mins. This property is currently not supported. + TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 + + // READ-ONLY + DeploymentStatus *DeploymentStatus + + // READ-ONLY; The name of the profile which holds the origin group. + ProfileName *string + + // READ-ONLY; Provisioning status + ProvisioningState *AfdProvisioningState +} + +// AFDOriginGroupUpdateParameters - AFDOrigin group properties needed for origin group creation or update. +type AFDOriginGroupUpdateParameters struct { + // The JSON object that contains the properties of the origin group. + Properties *AFDOriginGroupUpdatePropertiesParameters +} + +// AFDOriginGroupUpdatePropertiesParameters - The JSON object that contains the properties of the origin group. +type AFDOriginGroupUpdatePropertiesParameters struct { + // Health probe settings to the origin that is used to determine the health of the origin. + HealthProbeSettings *HealthProbeParameters + + // Load balancing settings for a backend pool + LoadBalancingSettings *LoadBalancingSettingsParameters + + // Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + SessionAffinityState *EnabledState + + // Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + // is added. Default is 10 mins. This property is currently not supported. + TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 + + // READ-ONLY; The name of the profile which holds the origin group. + ProfileName *string +} + +// AFDOriginListResult - Result of the request to list origins. It contains a list of origin objects and a URL link to get +// the next set of results. +type AFDOriginListResult struct { + // URL to get the next set of origin objects if there are any. + NextLink *string + + // READ-ONLY; List of Azure Front Door origins within an Azure Front Door endpoint + Value []*AFDOrigin +} + +// AFDOriginProperties - The JSON object that contains the properties of the origin. +type AFDOriginProperties struct { + // Resource reference to the Azure origin resource. + AzureOrigin *ResourceReference + + // Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + // if there is a single enabled backend in single enabled backend pool. + EnabledState *EnabledState + + // Whether to enable certificate name check at origin level + EnforceCertificateNameCheck *bool + + // The value of the HTTP port. Must be between 1 and 65535. + HTTPPort *int32 + + // The value of the HTTPS port. Must be between 1 and 65535. + HTTPSPort *int32 + + // The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + // all origins in an endpoint. + HostName *string + + // The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + // value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud + // Services require this host header value to match the origin hostname by default. This overrides the host header defined + // at Endpoint + OriginHostHeader *string + + // Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any + // lower priority origin is healthy.Must be between 1 and 5 + Priority *int32 + + // The properties of the private link resource for private origin. + SharedPrivateLinkResource *SharedPrivateLinkResourceProperties + + // Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + Weight *int32 + + // READ-ONLY + DeploymentStatus *DeploymentStatus + + // READ-ONLY; The name of the origin group which contains this origin. + OriginGroupName *string + + // READ-ONLY; Provisioning status + ProvisioningState *AfdProvisioningState +} + +// AFDOriginUpdateParameters - AFDOrigin properties needed for origin update. +type AFDOriginUpdateParameters struct { + // The JSON object that contains the properties of the origin. + Properties *AFDOriginUpdatePropertiesParameters +} + +// AFDOriginUpdatePropertiesParameters - The JSON object that contains the properties of the origin. +type AFDOriginUpdatePropertiesParameters struct { + // Resource reference to the Azure origin resource. + AzureOrigin *ResourceReference + + // Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + // if there is a single enabled backend in single enabled backend pool. + EnabledState *EnabledState + + // Whether to enable certificate name check at origin level + EnforceCertificateNameCheck *bool + + // The value of the HTTP port. Must be between 1 and 65535. + HTTPPort *int32 + + // The value of the HTTPS port. Must be between 1 and 65535. + HTTPSPort *int32 + + // The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + // all origins in an endpoint. + HostName *string + + // The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + // value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud + // Services require this host header value to match the origin hostname by default. This overrides the host header defined + // at Endpoint + OriginHostHeader *string + + // Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any + // lower priority origin is healthy.Must be between 1 and 5 + Priority *int32 + + // The properties of the private link resource for private origin. + SharedPrivateLinkResource *SharedPrivateLinkResourceProperties + + // Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + Weight *int32 + + // READ-ONLY; The name of the origin group which contains this origin. + OriginGroupName *string +} + +// ActivatedResourceReference - Reference to another resource along with its state. +type ActivatedResourceReference struct { + // Resource ID. + ID *string + + // READ-ONLY; Whether the resource is active or inactive + IsActive *bool +} + +// AfdPurgeParameters - Parameters required for content purge. +type AfdPurgeParameters struct { + // REQUIRED; The path to the content to be purged. Can describe a file path or a wild card directory. + ContentPaths []*string + + // List of domains. + Domains []*string +} + +// AfdRouteCacheConfiguration - Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration +// object. +type AfdRouteCacheConfiguration struct { + // compression settings. + CompressionSettings *CompressionSettings + + // query parameters to include or exclude (comma separated). + QueryParameters *string + + // Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + // specific query strings, cache every request with a unique URL, or cache specific + // query strings. + QueryStringCachingBehavior *AfdQueryStringCachingBehavior +} + +// AzureFirstPartyManagedCertificateParameters - Azure FirstParty Managed Certificate provided by other first party resource +// providers to enable HTTPS. +type AzureFirstPartyManagedCertificateParameters struct { + // REQUIRED; The type of the secret resource. + Type *SecretType + + // The list of SANs. + SubjectAlternativeNames []*string + + // READ-ONLY; Certificate issuing authority. + CertificateAuthority *string + + // READ-ONLY; Certificate expiration date. + ExpirationDate *string + + // READ-ONLY; Resource reference to the Azure Key Vault certificate. Expected to be in format of + // /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + SecretSource *ResourceReference + + // READ-ONLY; Subject name in the certificate. + Subject *string + + // READ-ONLY; Certificate thumbprint. + Thumbprint *string +} + +// GetSecretParameters implements the SecretParametersClassification interface for type AzureFirstPartyManagedCertificateParameters. +func (a *AzureFirstPartyManagedCertificateParameters) GetSecretParameters() *SecretParameters { + return &SecretParameters{ + Type: a.Type, + } +} + +// CacheConfiguration - Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration +// object. +type CacheConfiguration struct { + // Caching behavior for the requests + CacheBehavior *RuleCacheBehavior + + // The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + CacheDuration *string + + // Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + // requests for a compressed version. Content won't be compressed on + // AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + IsCompressionEnabled *RuleIsCompressionEnabled + + // query parameters to include or exclude (comma separated). + QueryParameters *string + + // Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + // specific query strings, cache every request with a unique URL, or cache specific + // query strings. + QueryStringCachingBehavior *RuleQueryStringCachingBehavior +} + +// CacheExpirationActionParameters - Defines the parameters for the cache expiration action. +type CacheExpirationActionParameters struct { + // REQUIRED; Caching behavior for the requests + CacheBehavior *CacheBehavior + + // REQUIRED; The level at which the content needs to be cached. + CacheType *CacheType + + // REQUIRED + TypeName *CacheExpirationActionParametersTypeName + + // The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + CacheDuration *string +} + +// CacheKeyQueryStringActionParameters - Defines the parameters for the cache-key query string action. +type CacheKeyQueryStringActionParameters struct { + // REQUIRED; Caching behavior for the requests + QueryStringBehavior *QueryStringBehavior + + // REQUIRED + TypeName *CacheKeyQueryStringActionParametersTypeName + + // query parameters to include or exclude (comma separated). + QueryParameters *string +} + +// CanMigrateParameters - Request body for CanMigrate operation. +type CanMigrateParameters struct { + // REQUIRED; Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + ClassicResourceReference *ResourceReference +} + +type CanMigrateProperties struct { + Errors []*MigrationErrorType + + // READ-ONLY; Flag that says if the profile can be migrated + CanMigrate *bool + + // READ-ONLY; Recommended sku for the migration + DefaultSKU *CanMigrateDefaultSKU +} + +// CanMigrateResult - Result for canMigrate operation. +type CanMigrateResult struct { + Properties *CanMigrateProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource type. + Type *string +} + +// CertificateSourceParameters - Defines the parameters for using CDN managed certificate for securing custom domain. +type CertificateSourceParameters struct { + // REQUIRED; Type of certificate used + CertificateType *CertificateType + + // REQUIRED + TypeName *CdnCertificateSourceParametersTypeName +} + +// CheckEndpointNameAvailabilityInput - Input of CheckNameAvailability API. +type CheckEndpointNameAvailabilityInput struct { + // REQUIRED; The resource name to validate. + Name *string + + // REQUIRED; The type of the resource whose name is to be validated. + Type *ResourceType + + // Indicates the endpoint name reuse scope. The default value is TenantReuse. + AutoGeneratedDomainNameLabelScope *AutoGeneratedDomainNameLabelScope +} + +// CheckEndpointNameAvailabilityOutput - Output of check name availability API. +type CheckEndpointNameAvailabilityOutput struct { + // READ-ONLY; Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, + // otherwise it returns empty string + AvailableHostname *string + + // READ-ONLY; The detailed error message describing why the name is not available. + Message *string + + // READ-ONLY; Indicates whether the name is available. + NameAvailable *bool + + // READ-ONLY; The reason why the name is not available. + Reason *string +} + +// CheckHostNameAvailabilityInput - Input of CheckHostNameAvailability API. +type CheckHostNameAvailabilityInput struct { + // REQUIRED; The host name to validate. + HostName *string +} + +// CheckNameAvailabilityInput - Input of CheckNameAvailability API. +type CheckNameAvailabilityInput struct { + // REQUIRED; The resource name to validate. + Name *string + + // REQUIRED; The type of the resource whose name is to be validated. + Type *ResourceType +} + +// CheckNameAvailabilityOutput - Output of check name availability API. +type CheckNameAvailabilityOutput struct { + // READ-ONLY; The detailed error message describing why the name is not available. + Message *string + + // READ-ONLY; Indicates whether the name is available. + NameAvailable *bool + + // READ-ONLY; The reason why the name is not available. + Reason *string +} + +// CidrIPAddress - CIDR Ip address +type CidrIPAddress struct { + // Ip address itself. + BaseIPAddress *string + + // The length of the prefix of the ip address. + PrefixLength *int32 +} + +// ClientPortMatchConditionParameters - Defines the parameters for ClientPort match conditions +type ClientPortMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *ClientPortOperator + + // REQUIRED + TypeName *ClientPortMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +type Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems struct { + DateTime *time.Time + Value *float32 +} + +type Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems struct { + DateTime *time.Time + Value *float32 +} + +type ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems struct { + Metric *string + Percentage *float64 + Value *int64 +} + +// CompressionSettings - settings for compression. +type CompressionSettings struct { + // List of content types on which compression applies. The value should be a valid MIME type. + ContentTypesToCompress []*string + + // Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + // content will be served as compressed if user requests for a compressed version. + // Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + IsCompressionEnabled *bool +} + +// ContinentsResponse - Continents Response +type ContinentsResponse struct { + Continents []*ContinentsResponseContinentsItem + CountryOrRegions []*ContinentsResponseCountryOrRegionsItem +} + +type ContinentsResponseContinentsItem struct { + ID *string +} + +type ContinentsResponseCountryOrRegionsItem struct { + ContinentID *string + ID *string +} + +// CookiesMatchConditionParameters - Defines the parameters for Cookies match conditions +type CookiesMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *CookiesOperator + + // REQUIRED + TypeName *CookiesMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // Name of Cookies to be matched + Selector *string + + // List of transforms + Transforms []*Transform +} + +// CustomDomain - Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, +// e.g. www.contoso.com. +type CustomDomain struct { + // The JSON object that contains the properties of the custom domain to create. + Properties *CustomDomainProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// CustomDomainHTTPSParameters - The JSON object that contains the properties to secure a custom domain. +type CustomDomainHTTPSParameters struct { + // REQUIRED; Defines the source of the SSL certificate. + CertificateSource *CertificateSource + + // REQUIRED; Defines the TLS extension protocol that is used for secure delivery. + ProtocolType *ProtocolType + + // TLS protocol version that will be used for Https + MinimumTLSVersion *MinimumTLSVersion +} + +// GetCustomDomainHTTPSParameters implements the CustomDomainHTTPSParametersClassification interface for type CustomDomainHTTPSParameters. +func (c *CustomDomainHTTPSParameters) GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters { + return c +} + +// CustomDomainListResult - Result of the request to list custom domains. It contains a list of custom domain objects and +// a URL link to get the next set of results. +type CustomDomainListResult struct { + // URL to get the next set of custom domain objects if there are any. + NextLink *string + + // READ-ONLY; List of CDN CustomDomains within an endpoint. + Value []*CustomDomain +} + +// CustomDomainParameters - The customDomain JSON object required for custom domain creation or update. +type CustomDomainParameters struct { + // The JSON object that contains the properties of the custom domain to create. + Properties *CustomDomainPropertiesParameters +} + +// CustomDomainProperties - The JSON object that contains the properties of the custom domain to create. +type CustomDomainProperties struct { + // REQUIRED; The host name of the custom domain. Must be a domain name. + HostName *string + + // Certificate parameters for securing custom HTTPS + CustomHTTPSParameters CustomDomainHTTPSParametersClassification + + // Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP + // license number of a custom domain is required to deliver content in China. + ValidationData *string + + // READ-ONLY; Provisioning status of the custom domain. + CustomHTTPSProvisioningState *CustomHTTPSProvisioningState + + // READ-ONLY; Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + CustomHTTPSProvisioningSubstate *CustomHTTPSProvisioningSubstate + + // READ-ONLY; Provisioning status of Custom Https of the custom domain. + ProvisioningState *CustomHTTPSProvisioningState + + // READ-ONLY; Resource status of the custom domain. + ResourceState *CustomDomainResourceState +} + +// CustomDomainPropertiesParameters - The JSON object that contains the properties of the custom domain to create. +type CustomDomainPropertiesParameters struct { + // REQUIRED; The host name of the custom domain. Must be a domain name. + HostName *string +} + +// CustomRule - Defines the common attributes for a custom rule that can be included in a waf policy +type CustomRule struct { + // REQUIRED; Describes what action to be applied when rule matches + Action *ActionType + + // REQUIRED; List of match conditions. + MatchConditions []*MatchCondition + + // REQUIRED; Defines the name of the custom rule + Name *string + + // REQUIRED; Defines in what order this rule be evaluated in the overall list of custom rules + Priority *int32 + + // Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. + EnabledState *CustomRuleEnabledState +} + +// CustomRuleList - Defines contents of custom rules +type CustomRuleList struct { + // List of rules + Rules []*CustomRule +} + +// CustomerCertificateParameters - Customer Certificate used for https +type CustomerCertificateParameters struct { + // REQUIRED; Resource reference to the Azure Key Vault certificate. Expected to be in format of + // /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + SecretSource *ResourceReference + + // REQUIRED; The type of the secret resource. + Type *SecretType + + // Version of the secret to be used + SecretVersion *string + + // The list of SANs. + SubjectAlternativeNames []*string + + // Whether to use the latest version for the certificate + UseLatestVersion *bool + + // READ-ONLY; Certificate issuing authority. + CertificateAuthority *string + + // READ-ONLY; Certificate expiration date. + ExpirationDate *string + + // READ-ONLY; Subject name in the certificate. + Subject *string + + // READ-ONLY; Certificate thumbprint. + Thumbprint *string +} + +// GetSecretParameters implements the SecretParametersClassification interface for type CustomerCertificateParameters. +func (c *CustomerCertificateParameters) GetSecretParameters() *SecretParameters { + return &SecretParameters{ + Type: c.Type, + } +} + +// DeepCreatedCustomDomain - Custom domains created on the CDN endpoint. +type DeepCreatedCustomDomain struct { + // REQUIRED; Custom domain name. + Name *string + + // Properties of the custom domain created on the CDN endpoint. + Properties *DeepCreatedCustomDomainProperties +} + +// DeepCreatedCustomDomainProperties - Properties of the custom domain created on the CDN endpoint. +type DeepCreatedCustomDomainProperties struct { + // REQUIRED; The host name of the custom domain. Must be a domain name. + HostName *string + + // Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP + // license number of a custom domain is required to deliver content in China. + ValidationData *string +} + +// DeepCreatedOrigin - The main origin of CDN content which is added when creating a CDN endpoint. +type DeepCreatedOrigin struct { + // REQUIRED; Origin name which must be unique within the endpoint. + Name *string + + // Properties of the origin created on the CDN endpoint. + Properties *DeepCreatedOriginProperties +} + +// DeepCreatedOriginGroup - The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent +// to the origins within the origin group based on origin health. +type DeepCreatedOriginGroup struct { + // REQUIRED; Origin group name which must be unique within the endpoint. + Name *string + + // Properties of the origin group created on the CDN endpoint. + Properties *DeepCreatedOriginGroupProperties +} + +// DeepCreatedOriginGroupProperties - Properties of the origin group created on the CDN endpoint. +type DeepCreatedOriginGroupProperties struct { + // REQUIRED; The source of the content being delivered via CDN within given origin group. + Origins []*ResourceReference + + // Health probe settings to the origin that is used to determine the health of the origin. + HealthProbeSettings *HealthProbeParameters + + // The JSON object that contains the properties to determine origin health using real requests/responses.This property is + // currently not supported. + ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters + + // Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + // is added. Default is 10 mins. This property is currently not supported. + TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 +} + +// DeepCreatedOriginProperties - Properties of the origin created on the CDN endpoint. +type DeepCreatedOriginProperties struct { + // REQUIRED; The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across + // all origins in an endpoint. + HostName *string + + // Origin is enabled for load balancing or not. By default, origin is always enabled. + Enabled *bool + + // The value of the HTTP port. Must be between 1 and 65535. + HTTPPort *int32 + + // The value of the HTTPS port. Must be between 1 and 65535. + HTTPSPort *int32 + + // The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + // value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services + // require this host header value to match the origin hostname by default. + OriginHostHeader *string + + // Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any + // lower priority origin is healthy.Must be between 1 and 5. + Priority *int32 + + // The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + PrivateLinkAlias *string + + // A custom message to be included in the approval request to connect to the Private Link. + PrivateLinkApprovalMessage *string + + // The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + PrivateLinkLocation *string + + // The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + PrivateLinkResourceID *string + + // Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + Weight *int32 + + // READ-ONLY; The approval status for the connection to the Private Link + PrivateEndpointStatus *PrivateEndpointStatus +} + +// DeliveryRule - A rule that specifies a set of actions and conditions +type DeliveryRule struct { + // REQUIRED; A list of actions that are executed when all the conditions of a rule are satisfied. + Actions []DeliveryRuleActionAutoGeneratedClassification + + // REQUIRED; The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser + // order will be applied before a rule with a greater order. Rule with order 0 is a special + // rule. It does not require any condition and actions listed in it will always be applied. + Order *int32 + + // A list of conditions that must be matched for the actions to be executed + Conditions []DeliveryRuleConditionClassification + + // Name of the rule + Name *string +} + +// DeliveryRuleActionAutoGenerated - An action for the delivery rule. +type DeliveryRuleActionAutoGenerated struct { + // REQUIRED; The name of the action for the delivery rule. + Name *DeliveryRuleAction +} + +// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleActionAutoGenerated. +func (d *DeliveryRuleActionAutoGenerated) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { + return d +} + +// DeliveryRuleCacheExpirationAction - Defines the cache expiration action for the delivery rule. +type DeliveryRuleCacheExpirationAction struct { + // REQUIRED; The name of the action for the delivery rule. + Name *DeliveryRuleAction + + // REQUIRED; Defines the parameters for the action. + Parameters *CacheExpirationActionParameters +} + +// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleCacheExpirationAction. +func (d *DeliveryRuleCacheExpirationAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { + return &DeliveryRuleActionAutoGenerated{ + Name: d.Name, + } +} + +// DeliveryRuleCacheKeyQueryStringAction - Defines the cache-key query string action for the delivery rule. +type DeliveryRuleCacheKeyQueryStringAction struct { + // REQUIRED; The name of the action for the delivery rule. + Name *DeliveryRuleAction + + // REQUIRED; Defines the parameters for the action. + Parameters *CacheKeyQueryStringActionParameters +} + +// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleCacheKeyQueryStringAction. +func (d *DeliveryRuleCacheKeyQueryStringAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { + return &DeliveryRuleActionAutoGenerated{ + Name: d.Name, + } +} + +// DeliveryRuleClientPortCondition - Defines the ClientPort condition for the delivery rule. +type DeliveryRuleClientPortCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *ClientPortMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleClientPortCondition. +func (d *DeliveryRuleClientPortCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleCondition - A condition for the delivery rule. +type DeliveryRuleCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleCondition. +func (d *DeliveryRuleCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { return d } + +// DeliveryRuleCookiesCondition - Defines the Cookies condition for the delivery rule. +type DeliveryRuleCookiesCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *CookiesMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleCookiesCondition. +func (d *DeliveryRuleCookiesCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleHTTPVersionCondition - Defines the HttpVersion condition for the delivery rule. +type DeliveryRuleHTTPVersionCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *HTTPVersionMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleHTTPVersionCondition. +func (d *DeliveryRuleHTTPVersionCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleHostNameCondition - Defines the HostName condition for the delivery rule. +type DeliveryRuleHostNameCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *HostNameMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleHostNameCondition. +func (d *DeliveryRuleHostNameCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleIsDeviceCondition - Defines the IsDevice condition for the delivery rule. +type DeliveryRuleIsDeviceCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *IsDeviceMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleIsDeviceCondition. +func (d *DeliveryRuleIsDeviceCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRulePostArgsCondition - Defines the PostArgs condition for the delivery rule. +type DeliveryRulePostArgsCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *PostArgsMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRulePostArgsCondition. +func (d *DeliveryRulePostArgsCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleQueryStringCondition - Defines the QueryString condition for the delivery rule. +type DeliveryRuleQueryStringCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *QueryStringMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleQueryStringCondition. +func (d *DeliveryRuleQueryStringCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleRemoteAddressCondition - Defines the RemoteAddress condition for the delivery rule. +type DeliveryRuleRemoteAddressCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *RemoteAddressMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRemoteAddressCondition. +func (d *DeliveryRuleRemoteAddressCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleRequestBodyCondition - Defines the RequestBody condition for the delivery rule. +type DeliveryRuleRequestBodyCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *RequestBodyMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestBodyCondition. +func (d *DeliveryRuleRequestBodyCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleRequestHeaderAction - Defines the request header action for the delivery rule. +type DeliveryRuleRequestHeaderAction struct { + // REQUIRED; The name of the action for the delivery rule. + Name *DeliveryRuleAction + + // REQUIRED; Defines the parameters for the action. + Parameters *HeaderActionParameters +} + +// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleRequestHeaderAction. +func (d *DeliveryRuleRequestHeaderAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { + return &DeliveryRuleActionAutoGenerated{ + Name: d.Name, + } +} + +// DeliveryRuleRequestHeaderCondition - Defines the RequestHeader condition for the delivery rule. +type DeliveryRuleRequestHeaderCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *RequestHeaderMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestHeaderCondition. +func (d *DeliveryRuleRequestHeaderCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleRequestMethodCondition - Defines the RequestMethod condition for the delivery rule. +type DeliveryRuleRequestMethodCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *RequestMethodMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestMethodCondition. +func (d *DeliveryRuleRequestMethodCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleRequestSchemeCondition - Defines the RequestScheme condition for the delivery rule. +type DeliveryRuleRequestSchemeCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *RequestSchemeMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestSchemeCondition. +func (d *DeliveryRuleRequestSchemeCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleRequestURICondition - Defines the RequestUri condition for the delivery rule. +type DeliveryRuleRequestURICondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *RequestURIMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleRequestURICondition. +func (d *DeliveryRuleRequestURICondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleResponseHeaderAction - Defines the response header action for the delivery rule. +type DeliveryRuleResponseHeaderAction struct { + // REQUIRED; The name of the action for the delivery rule. + Name *DeliveryRuleAction + + // REQUIRED; Defines the parameters for the action. + Parameters *HeaderActionParameters +} + +// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleResponseHeaderAction. +func (d *DeliveryRuleResponseHeaderAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { + return &DeliveryRuleActionAutoGenerated{ + Name: d.Name, + } +} + +// DeliveryRuleRouteConfigurationOverrideAction - Defines the route configuration override action for the delivery rule. Only +// applicable to Frontdoor Standard/Premium Profiles. +type DeliveryRuleRouteConfigurationOverrideAction struct { + // REQUIRED; The name of the action for the delivery rule. + Name *DeliveryRuleAction + + // REQUIRED; Defines the parameters for the action. + Parameters *RouteConfigurationOverrideActionParameters +} + +// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type DeliveryRuleRouteConfigurationOverrideAction. +func (d *DeliveryRuleRouteConfigurationOverrideAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { + return &DeliveryRuleActionAutoGenerated{ + Name: d.Name, + } +} + +// DeliveryRuleSSLProtocolCondition - Defines the SslProtocol condition for the delivery rule. +type DeliveryRuleSSLProtocolCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *SSLProtocolMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleSSLProtocolCondition. +func (d *DeliveryRuleSSLProtocolCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleServerPortCondition - Defines the ServerPort condition for the delivery rule. +type DeliveryRuleServerPortCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *ServerPortMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleServerPortCondition. +func (d *DeliveryRuleServerPortCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleSocketAddrCondition - Defines the SocketAddress condition for the delivery rule. +type DeliveryRuleSocketAddrCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *SocketAddrMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleSocketAddrCondition. +func (d *DeliveryRuleSocketAddrCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleURLFileExtensionCondition - Defines the UrlFileExtension condition for the delivery rule. +type DeliveryRuleURLFileExtensionCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *URLFileExtensionMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleURLFileExtensionCondition. +func (d *DeliveryRuleURLFileExtensionCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleURLFileNameCondition - Defines the UrlFileName condition for the delivery rule. +type DeliveryRuleURLFileNameCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *URLFileNameMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleURLFileNameCondition. +func (d *DeliveryRuleURLFileNameCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DeliveryRuleURLPathCondition - Defines the UrlPath condition for the delivery rule. +type DeliveryRuleURLPathCondition struct { + // REQUIRED; The name of the condition for the delivery rule. + Name *MatchVariable + + // REQUIRED; Defines the parameters for the condition. + Parameters *URLPathMatchConditionParameters +} + +// GetDeliveryRuleCondition implements the DeliveryRuleConditionClassification interface for type DeliveryRuleURLPathCondition. +func (d *DeliveryRuleURLPathCondition) GetDeliveryRuleCondition() *DeliveryRuleCondition { + return &DeliveryRuleCondition{ + Name: d.Name, + } +} + +// DimensionProperties - Type of operation: get, read, delete, etc. +type DimensionProperties struct { + // Display name of dimension. + DisplayName *string + + // Internal name of dimension. + InternalName *string + + // Name of dimension. + Name *string +} + +// DomainValidationProperties - The JSON object that contains the properties to validate a domain. +type DomainValidationProperties struct { + // READ-ONLY; The date time that the token expires + ExpirationDate *string + + // READ-ONLY; Challenge used for DNS TXT record or file based validation + ValidationToken *string +} + +// EdgeNode - Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. +type EdgeNode struct { + // The JSON object that contains the properties required to create an edgenode. + Properties *EdgeNodeProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// EdgeNodeProperties - The JSON object that contains the properties required to create an edgenode. +type EdgeNodeProperties struct { + // REQUIRED; List of ip address groups. + IPAddressGroups []*IPAddressGroup +} + +// EdgenodeResult - Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to +// get the next set of results. +type EdgenodeResult struct { + // URL to get the next set of edgenode list results if there are any. + NextLink *string + + // READ-ONLY; Edge node of CDN service. + Value []*EdgeNode +} + +// Endpoint - CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, +// content caching and delivery behavior. The CDN endpoint uses the URL format +// .azureedge.net. +type Endpoint struct { + // REQUIRED; Resource location. + Location *string + + // The JSON object that contains the properties required to create an endpoint. + Properties *EndpointProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// EndpointListResult - Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to +// get the next set of results. +type EndpointListResult struct { + // URL to get the next set of endpoint objects if there is any. + NextLink *string + + // READ-ONLY; List of CDN endpoints within a profile + Value []*Endpoint +} + +// EndpointProperties - The JSON object that contains the properties required to create an endpoint. +type EndpointProperties struct { + // REQUIRED; The source of the content being delivered via CDN. + Origins []*DeepCreatedOrigin + + // List of content types on which compression applies. The value should be a valid MIME type. + ContentTypesToCompress []*string + + // A reference to the origin group. + DefaultOriginGroup *ResourceReference + + // A policy that specifies the delivery rules to be used for an endpoint. + DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy + + // List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + // path or content, e.g. block APAC for path /pictures/ + GeoFilters []*GeoFilter + + // Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + // be served as compressed if user requests for a compressed version. Content + // won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + IsCompressionEnabled *bool + + // Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + // must be allowed. + IsHTTPAllowed *bool + + // Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + // must be allowed. + IsHTTPSAllowed *bool + + // Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + // information, CDN can apply scenario driven optimization. + OptimizationType *OptimizationType + + // The origin groups comprising of origins that are used for load balancing the traffic based on availability. + OriginGroups []*DeepCreatedOriginGroup + + // The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + // single origin and can be overridden by the same property specified at origin.If + // you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and + // Cloud Services require this host header value to match the origin hostname by + // default. + OriginHostHeader *string + + // A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + OriginPath *string + + // Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + // routes for the CDN. This is relative to the origin path. This property is only + // relevant when using a single origin. + ProbePath *string + + // Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + // to prevent requests that contain query strings from being cached, or cache + // every request with a unique URL. + QueryStringCachingBehavior *QueryStringCachingBehavior + + // List of keys used to validate the signed URL hashes. + URLSigningKeys []*URLSigningKey + + // Defines the Web Application Firewall policy for the endpoint (if applicable) + WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink + + // READ-ONLY; The custom domains under the endpoint. + CustomDomains []*DeepCreatedCustomDomain + + // READ-ONLY; The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + HostName *string + + // READ-ONLY; Provisioning status of the endpoint. + ProvisioningState *EndpointProvisioningState + + // READ-ONLY; Resource status of the endpoint. + ResourceState *EndpointResourceState +} + +// EndpointPropertiesUpdateParameters - The JSON object containing endpoint update parameters. +type EndpointPropertiesUpdateParameters struct { + // List of content types on which compression applies. The value should be a valid MIME type. + ContentTypesToCompress []*string + + // A reference to the origin group. + DefaultOriginGroup *ResourceReference + + // A policy that specifies the delivery rules to be used for an endpoint. + DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy + + // List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + // path or content, e.g. block APAC for path /pictures/ + GeoFilters []*GeoFilter + + // Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + // be served as compressed if user requests for a compressed version. Content + // won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + IsCompressionEnabled *bool + + // Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + // must be allowed. + IsHTTPAllowed *bool + + // Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + // must be allowed. + IsHTTPSAllowed *bool + + // Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + // information, CDN can apply scenario driven optimization. + OptimizationType *OptimizationType + + // The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + // single origin and can be overridden by the same property specified at origin.If + // you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and + // Cloud Services require this host header value to match the origin hostname by + // default. + OriginHostHeader *string + + // A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + OriginPath *string + + // Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + // routes for the CDN. This is relative to the origin path. This property is only + // relevant when using a single origin. + ProbePath *string + + // Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + // to prevent requests that contain query strings from being cached, or cache + // every request with a unique URL. + QueryStringCachingBehavior *QueryStringCachingBehavior + + // List of keys used to validate the signed URL hashes. + URLSigningKeys []*URLSigningKey + + // Defines the Web Application Firewall policy for the endpoint (if applicable) + WebApplicationFirewallPolicyLink *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink +} + +// EndpointPropertiesUpdateParametersDeliveryPolicy - A policy that specifies the delivery rules to be used for an endpoint. +type EndpointPropertiesUpdateParametersDeliveryPolicy struct { + // REQUIRED; A list of the delivery rules. + Rules []*DeliveryRule + + // User-friendly description of the policy. + Description *string +} + +// EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink - Defines the Web Application Firewall policy for the +// endpoint (if applicable) +type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink struct { + // Resource ID. + ID *string +} + +// EndpointUpdateParameters - Properties required to create or update an endpoint. +type EndpointUpdateParameters struct { + // The JSON object containing endpoint update parameters. + Properties *EndpointPropertiesUpdateParameters + + // Endpoint tags. + Tags map[string]*string +} + +// GeoFilter - Rules defining user's geo access within a CDN endpoint. +type GeoFilter struct { + // REQUIRED; Action of the geo filter, i.e. allow or block access. + Action *GeoFilterActions + + // REQUIRED; Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + CountryCodes []*string + + // REQUIRED; Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + RelativePath *string +} + +// HTTPErrorRangeParameters - The JSON object that represents the range for http status codes +type HTTPErrorRangeParameters struct { + // The inclusive start of the http status code range. + Begin *int32 + + // The inclusive end of the http status code range. + End *int32 +} + +// HTTPVersionMatchConditionParameters - Defines the parameters for HttpVersion match conditions +type HTTPVersionMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *HTTPVersionOperator + + // REQUIRED + TypeName *HTTPVersionMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// HeaderActionParameters - Defines the parameters for the request header action. +type HeaderActionParameters struct { + // REQUIRED; Action to perform + HeaderAction *HeaderAction + + // REQUIRED; Name of the header to modify + HeaderName *string + + // REQUIRED + TypeName *HeaderActionParametersTypeName + + // Value for the specified action + Value *string +} + +// HealthProbeParameters - The JSON object that contains the properties to send health probes to origin. +type HealthProbeParameters struct { + // The number of seconds between health probes.Default is 240sec. + ProbeIntervalInSeconds *int32 + + // The path relative to the origin that is used to determine the health of the origin. + ProbePath *string + + // Protocol to use for health probe. + ProbeProtocol *ProbeProtocol + + // The type of health probe request that is made. + ProbeRequestType *HealthProbeRequestType +} + +// HostNameMatchConditionParameters - Defines the parameters for HostName match conditions +type HostNameMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *HostNameOperator + + // REQUIRED + TypeName *HostNameMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// IPAddressGroup - CDN Ip address group +type IPAddressGroup struct { + // The delivery region of the ip address group + DeliveryRegion *string + + // The list of ip v4 addresses. + IPv4Addresses []*CidrIPAddress + + // The list of ip v6 addresses. + IPv6Addresses []*CidrIPAddress +} + +// IsDeviceMatchConditionParameters - Defines the parameters for IsDevice match conditions +type IsDeviceMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *IsDeviceOperator + + // REQUIRED + TypeName *IsDeviceMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*IsDeviceMatchConditionParametersMatchValuesItem + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// KeyVaultCertificateSourceParameters - Describes the parameters for using a user's KeyVault certificate for securing custom +// domain. +type KeyVaultCertificateSourceParameters struct { + // REQUIRED; Describes the action that shall be taken when the certificate is removed from Key Vault. + DeleteRule *DeleteRule + + // REQUIRED; Resource group of the user's Key Vault containing the SSL certificate + ResourceGroupName *string + + // REQUIRED; The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + SecretName *string + + // REQUIRED; Subscription Id of the user's Key Vault containing the SSL certificate + SubscriptionID *string + + // REQUIRED + TypeName *KeyVaultCertificateSourceParametersTypeName + + // REQUIRED; Describes the action that shall be taken when the certificate is updated in Key Vault. + UpdateRule *UpdateRule + + // REQUIRED; The name of the user's Key Vault containing the SSL certificate + VaultName *string + + // The version(GUID) of Key Vault Secret in Key Vault. + SecretVersion *string +} + +// KeyVaultSigningKeyParameters - Describes the parameters for using a user's KeyVault for URL Signing Key. +type KeyVaultSigningKeyParameters struct { + // REQUIRED; Resource group of the user's Key Vault containing the secret + ResourceGroupName *string + + // REQUIRED; The name of secret in Key Vault. + SecretName *string + + // REQUIRED; The version(GUID) of secret in Key Vault. + SecretVersion *string + + // REQUIRED; Subscription Id of the user's Key Vault containing the secret + SubscriptionID *string + + // REQUIRED + TypeName *KeyVaultSigningKeyParametersTypeName + + // REQUIRED; The name of the user's Key Vault containing the secret + VaultName *string +} + +// LinkedEndpoint - Defines the ARM Resource ID for the linked endpoints +type LinkedEndpoint struct { + // ARM Resource ID string. + ID *string +} + +// LoadBalancingSettingsParameters - Round-Robin load balancing settings for a backend pool +type LoadBalancingSettingsParameters struct { + // The additional latency in milliseconds for probes to fall into the lowest latency bucket + AdditionalLatencyInMilliseconds *int32 + + // The number of samples to consider for load balancing decisions + SampleSize *int32 + + // The number of samples within the sample period that must succeed + SuccessfulSamplesRequired *int32 +} + +// LoadParameters - Parameters required for content load. +type LoadParameters struct { + // REQUIRED; The path to the content to be loaded. Path should be a relative file URL of the origin. + ContentPaths []*string +} + +// LogSpecification - Log specification of operation. +type LogSpecification struct { + // Blob duration of specification. + BlobDuration *string + + // Display name of log specification. + DisplayName *string + + // Pattern to filter based on name + LogFilterPattern *string + + // Name of log specification. + Name *string +} + +// ManagedCertificateParameters - Managed Certificate used for https +type ManagedCertificateParameters struct { + // REQUIRED; The type of the secret resource. + Type *SecretType + + // READ-ONLY; Certificate expiration date. + ExpirationDate *string + + // READ-ONLY; Subject name in the certificate. + Subject *string +} + +// GetSecretParameters implements the SecretParametersClassification interface for type ManagedCertificateParameters. +func (m *ManagedCertificateParameters) GetSecretParameters() *SecretParameters { + return &SecretParameters{ + Type: m.Type, + } +} + +// ManagedHTTPSParameters - Defines the certificate source parameters using CDN managed certificate for enabling SSL. +type ManagedHTTPSParameters struct { + // REQUIRED; Defines the source of the SSL certificate. + CertificateSource *CertificateSource + + // REQUIRED; Defines the certificate source parameters using CDN managed certificate for enabling SSL. + CertificateSourceParameters *CertificateSourceParameters + + // REQUIRED; Defines the TLS extension protocol that is used for secure delivery. + ProtocolType *ProtocolType + + // TLS protocol version that will be used for Https + MinimumTLSVersion *MinimumTLSVersion +} + +// GetCustomDomainHTTPSParameters implements the CustomDomainHTTPSParametersClassification interface for type ManagedHTTPSParameters. +func (m *ManagedHTTPSParameters) GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters { + return &CustomDomainHTTPSParameters{ + CertificateSource: m.CertificateSource, + MinimumTLSVersion: m.MinimumTLSVersion, + ProtocolType: m.ProtocolType, + } +} + +// ManagedRuleDefinition - Describes a managed rule definition. +type ManagedRuleDefinition struct { + // READ-ONLY; Describes the functionality of the managed rule. + Description *string + + // READ-ONLY; Identifier for the managed rule. + RuleID *string +} + +// ManagedRuleGroupDefinition - Describes a managed rule group. +type ManagedRuleGroupDefinition struct { + // READ-ONLY; Description of the managed rule group. + Description *string + + // READ-ONLY; Name of the managed rule group. + RuleGroupName *string + + // READ-ONLY; List of rules within the managed rule group. + Rules []*ManagedRuleDefinition +} + +// ManagedRuleGroupOverride - Defines a managed rule group override setting. +type ManagedRuleGroupOverride struct { + // REQUIRED; Describes the managed rule group within the rule set to override + RuleGroupName *string + + // List of rules that will be enabled. If none specified, all rules in the group will be disabled. + Rules []*ManagedRuleOverride +} + +// ManagedRuleOverride - Defines a managed rule group override setting. +type ManagedRuleOverride struct { + // REQUIRED; Identifier for the managed rule. + RuleID *string + + // Describes the override action to be applied when rule matches. + Action *ActionType + + // Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. + EnabledState *ManagedRuleEnabledState +} + +// ManagedRuleSet - Defines a managed rule set. +type ManagedRuleSet struct { + // REQUIRED; Defines the rule set type to use. + RuleSetType *string + + // REQUIRED; Defines the version of the rule set to use. + RuleSetVersion *string + + // Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests. + AnomalyScore *int32 + + // Defines the rule overrides to apply to the rule set. + RuleGroupOverrides []*ManagedRuleGroupOverride +} + +// ManagedRuleSetDefinition - Describes a managed rule set definition. +type ManagedRuleSetDefinition struct { + // Describes managed rule set definition properties. + Properties *ManagedRuleSetDefinitionProperties + + // The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + SKU *SKU + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ManagedRuleSetDefinitionList - List of managed rule set definitions available for use in a policy. +type ManagedRuleSetDefinitionList struct { + // URL to retrieve next set of managed rule set definitions. + NextLink *string + + // READ-ONLY; List of managed rule set definitions. + Value []*ManagedRuleSetDefinition +} + +// ManagedRuleSetDefinitionProperties - Properties for a managed rule set definition. +type ManagedRuleSetDefinitionProperties struct { + // READ-ONLY; Provisioning state of the managed rule set. + ProvisioningState *string + + // READ-ONLY; Rule groups of the managed rule set. + RuleGroups []*ManagedRuleGroupDefinition + + // READ-ONLY; Type of the managed rule set. + RuleSetType *string + + // READ-ONLY; Version of the managed rule set type. + RuleSetVersion *string +} + +// ManagedRuleSetList - Defines the list of managed rule sets for the policy. +type ManagedRuleSetList struct { + // List of rule sets. + ManagedRuleSets []*ManagedRuleSet +} + +// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) +type ManagedServiceIdentity struct { + // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + Type *ManagedServiceIdentityType + + // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + // resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + // The dictionary values can be empty objects ({}) in + // requests. + UserAssignedIdentities map[string]*UserAssignedIdentity + + // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned + // identity. + PrincipalID *string + + // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string +} + +// MatchCondition - Define match conditions +type MatchCondition struct { + // REQUIRED; List of possible match values. + MatchValue []*string + + // REQUIRED; Match variable to compare against. + MatchVariable *WafMatchVariable + + // REQUIRED; Describes operator to be matched + Operator *Operator + + // Describes if the result of this condition should be negated. + NegateCondition *bool + + // Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. + Selector *string + + // List of transforms. + Transforms []*TransformType +} + +// MetricAvailability - Retention policy of a resource metric. +type MetricAvailability struct { + BlobDuration *string + TimeGrain *string +} + +// MetricSpecification - Metric specification of operation. +type MetricSpecification struct { + // The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'. + AggregationType *string + + // Retention policies of a resource metric. + Availabilities []*MetricAvailability + + // The dimensions of metric + Dimensions []*DimensionProperties + + // Display description of metric specification. + DisplayDescription *string + + // Display name of metric specification. + DisplayName *string + + // Property to specify whether to fill gap with zero. + FillGapWithZero *bool + + // Property to specify metric is internal or not. + IsInternal *bool + + // Pattern to filter based on name + MetricFilterPattern *string + + // Name of metric specification. + Name *string + + // The supported time grain types for the metrics. + SupportedTimeGrainTypes []*string + + // The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. + Unit *string +} + +// MetricsResponse - Metrics Response +type MetricsResponse struct { + DateTimeBegin *time.Time + DateTimeEnd *time.Time + Granularity *MetricsGranularity + Series []*MetricsResponseSeriesItem +} + +type MetricsResponseSeriesItem struct { + Data []*Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems + Groups []*MetricsResponseSeriesPropertiesItemsItem + Metric *string + Unit *MetricsSeriesUnit +} + +type MetricsResponseSeriesPropertiesItemsItem struct { + Name *string + Value *string +} + +// MigrateResult - Result for migrate operation. +type MigrateResult struct { + Properties *MigrateResultProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource type. + Type *string +} + +type MigrateResultProperties struct { + // READ-ONLY; Arm resource id of the migrated profile + MigratedProfileResourceID *ResourceReference +} + +// MigrationErrorType - Error response indicates CDN service is not able to process the incoming request. The reason is provided +// in the error message. +type MigrationErrorType struct { + // READ-ONLY; Error code. + Code *string + + // READ-ONLY; Error message indicating why the operation failed. + ErrorMessage *string + + // READ-ONLY; Describes what needs to be done to fix the problem + NextSteps *string + + // READ-ONLY; Resource which has the problem. + ResourceName *string +} + +// MigrationParameters - Request body for Migrate operation. +type MigrationParameters struct { + // REQUIRED; Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + ClassicResourceReference *ResourceReference + + // REQUIRED; Name of the new profile that need to be created. + ProfileName *string + + // REQUIRED; Sku for the migration + SKU *SKU + + // Waf mapping for the migrated profile + MigrationWebApplicationFirewallMappings []*MigrationWebApplicationFirewallMapping +} + +// MigrationWebApplicationFirewallMapping - Web Application Firewall Mapping +type MigrationWebApplicationFirewallMapping struct { + // Migration From Waf policy + MigratedFrom *ResourceReference + + // Migration to Waf policy + MigratedTo *ResourceReference +} + +// Operation - CDN REST API operation +type Operation struct { + // The object that represents the operation. + Display *OperationDisplay + + // Indicates whether the operation is a data action + IsDataAction *bool + + // Properties of operation, include metric specifications. + OperationProperties *OperationProperties + + // READ-ONLY; Operation name: {provider}/{resource}/{operation} + Name *string + + // READ-ONLY; The origin of operations. + Origin *string +} + +// OperationDisplay - The object that represents the operation. +type OperationDisplay struct { + // READ-ONLY; Description of operation. + Description *string + + // READ-ONLY; Operation type: Read, write, delete, etc. + Operation *string + + // READ-ONLY; Service provider: Microsoft.Cdn + Provider *string + + // READ-ONLY; Resource on which the operation is performed: Profile, endpoint, etc. + Resource *string +} + +// OperationProperties - Properties of operation, include metric specifications. +type OperationProperties struct { + // One property of operation, include metric specifications. + ServiceSpecification *ServiceSpecification +} + +// OperationsListResult - Result of the request to list CDN operations. It contains a list of operations and a URL link to +// get the next set of results. +type OperationsListResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of CDN operations supported by the CDN resource provider. + Value []*Operation +} + +// Origin - CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint +// do not have the requested content cached, they attempt to fetch it from one or more of +// the configured origins. +type Origin struct { + // The JSON object that contains the properties of the origin. + Properties *OriginProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// OriginGroup - Origin group comprising of origins is used for load balancing to origins when the content cannot be served +// from CDN. +type OriginGroup struct { + // The JSON object that contains the properties of the origin group. + Properties *OriginGroupProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// OriginGroupListResult - Result of the request to list origin groups. It contains a list of origin groups objects and a +// URL link to get the next set of results. +type OriginGroupListResult struct { + // URL to get the next set of origin objects if there are any. + NextLink *string + + // READ-ONLY; List of CDN origin groups within an endpoint + Value []*OriginGroup +} + +// OriginGroupOverride - Defines the parameters for the origin group override configuration. +type OriginGroupOverride struct { + // Protocol this rule will use when forwarding traffic to backends. + ForwardingProtocol *ForwardingProtocol + + // defines the OriginGroup that would override the DefaultOriginGroup on route. + OriginGroup *ResourceReference +} + +// OriginGroupOverrideAction - Defines the origin group override action for the delivery rule. +type OriginGroupOverrideAction struct { + // REQUIRED; The name of the action for the delivery rule. + Name *DeliveryRuleAction + + // REQUIRED; Defines the parameters for the action. + Parameters *OriginGroupOverrideActionParameters +} + +// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type OriginGroupOverrideAction. +func (o *OriginGroupOverrideAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { + return &DeliveryRuleActionAutoGenerated{ + Name: o.Name, + } +} + +// OriginGroupOverrideActionParameters - Defines the parameters for the origin group override action. +type OriginGroupOverrideActionParameters struct { + // REQUIRED; defines the OriginGroup that would override the DefaultOriginGroup. + OriginGroup *ResourceReference + + // REQUIRED + TypeName *OriginGroupOverrideActionParametersTypeName +} + +// OriginGroupProperties - The JSON object that contains the properties of the origin group. +type OriginGroupProperties struct { + // Health probe settings to the origin that is used to determine the health of the origin. + HealthProbeSettings *HealthProbeParameters + + // The source of the content being delivered via CDN within given origin group. + Origins []*ResourceReference + + // The JSON object that contains the properties to determine origin health using real requests/responses. This property is + // currently not supported. + ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters + + // Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + // is added. Default is 10 mins. This property is currently not supported. + TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 + + // READ-ONLY; Provisioning status of the origin group. + ProvisioningState *OriginGroupProvisioningState + + // READ-ONLY; Resource status of the origin group. + ResourceState *OriginGroupResourceState +} + +// OriginGroupUpdateParameters - Origin group properties needed for origin group creation or update. +type OriginGroupUpdateParameters struct { + // The JSON object that contains the properties of the origin group. + Properties *OriginGroupUpdatePropertiesParameters +} + +// OriginGroupUpdatePropertiesParameters - The JSON object that contains the properties of the origin group. +type OriginGroupUpdatePropertiesParameters struct { + // Health probe settings to the origin that is used to determine the health of the origin. + HealthProbeSettings *HealthProbeParameters + + // The source of the content being delivered via CDN within given origin group. + Origins []*ResourceReference + + // The JSON object that contains the properties to determine origin health using real requests/responses. This property is + // currently not supported. + ResponseBasedOriginErrorDetectionSettings *ResponseBasedOriginErrorDetectionParameters + + // Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + // is added. Default is 10 mins. This property is currently not supported. + TrafficRestorationTimeToHealedOrNewEndpointsInMinutes *int32 +} + +// OriginListResult - Result of the request to list origins. It contains a list of origin objects and a URL link to get the +// next set of results. +type OriginListResult struct { + // URL to get the next set of origin objects if there are any. + NextLink *string + + // READ-ONLY; List of CDN origins within an endpoint + Value []*Origin +} + +// OriginProperties - The JSON object that contains the properties of the origin. +type OriginProperties struct { + // Origin is enabled for load balancing or not + Enabled *bool + + // The value of the HTTP port. Must be between 1 and 65535. + HTTPPort *int32 + + // The value of the HTTPS port. Must be between 1 and 65535. + HTTPSPort *int32 + + // The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + // all origins in an endpoint. + HostName *string + + // The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + // value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services + // require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + OriginHostHeader *string + + // Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any + // lower priority origin is healthy.Must be between 1 and 5 + Priority *int32 + + // The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + PrivateLinkAlias *string + + // A custom message to be included in the approval request to connect to the Private Link. + PrivateLinkApprovalMessage *string + + // The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + PrivateLinkLocation *string + + // The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + PrivateLinkResourceID *string + + // Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + Weight *int32 + + // READ-ONLY; The approval status for the connection to the Private Link + PrivateEndpointStatus *PrivateEndpointStatus + + // READ-ONLY; Provisioning status of the origin. + ProvisioningState *OriginProvisioningState + + // READ-ONLY; Resource status of the origin. + ResourceState *OriginResourceState +} + +// OriginUpdateParameters - Origin properties needed for origin update. +type OriginUpdateParameters struct { + // The JSON object that contains the properties of the origin. + Properties *OriginUpdatePropertiesParameters +} + +// OriginUpdatePropertiesParameters - The JSON object that contains the properties of the origin. +type OriginUpdatePropertiesParameters struct { + // Origin is enabled for load balancing or not + Enabled *bool + + // The value of the HTTP port. Must be between 1 and 65535. + HTTPPort *int32 + + // The value of the HTTPS port. Must be between 1 and 65535. + HTTPSPort *int32 + + // The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + // all origins in an endpoint. + HostName *string + + // The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + // value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services + // require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + OriginHostHeader *string + + // Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any + // lower priority origin is healthy.Must be between 1 and 5 + Priority *int32 + + // The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + PrivateLinkAlias *string + + // A custom message to be included in the approval request to connect to the Private Link. + PrivateLinkApprovalMessage *string + + // The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + PrivateLinkLocation *string + + // The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + PrivateLinkResourceID *string + + // Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + Weight *int32 +} + +// PolicySettings - Defines contents of a web application firewall global configuration +type PolicySettings struct { + // If the action type is block, customer can override the response body. The body must be specified in base64 encoding. + DefaultCustomBlockResponseBody *string + + // If the action type is block, this field defines the default customer overridable http response status code. + DefaultCustomBlockResponseStatusCode *PolicySettingsDefaultCustomBlockResponseStatusCode + + // If action type is redirect, this field represents the default redirect URL for the client. + DefaultRedirectURL *string + + // describes if the policy is in enabled state or disabled state + EnabledState *PolicyEnabledState + + // Describes if it is in detection mode or prevention mode at policy level. + Mode *PolicyMode +} + +// PostArgsMatchConditionParameters - Defines the parameters for PostArgs match conditions +type PostArgsMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *PostArgsOperator + + // REQUIRED + TypeName *PostArgsMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // Name of PostArg to be matched + Selector *string + + // List of transforms + Transforms []*Transform +} + +// Profile - A profile is a logical grouping of endpoints that share the same settings. +type Profile struct { + // REQUIRED; Resource location. + Location *string + + // REQUIRED; The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the + // profile. + SKU *SKU + + // Managed service identity (system assigned and/or user assigned identities). + Identity *ManagedServiceIdentity + + // The JSON object that contains the properties required to create a profile. + Properties *ProfileProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. + Kind *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ProfileChangeSKUWafMapping - Parameters required for profile upgrade. +type ProfileChangeSKUWafMapping struct { + // REQUIRED; The new waf resource for the security policy to use. + ChangeToWafPolicy *ResourceReference + + // REQUIRED; The security policy name. + SecurityPolicyName *string +} + +// ProfileListResult - Result of the request to list profiles. It contains a list of profile objects and a URL link to get +// the next set of results. +type ProfileListResult struct { + // URL to get the next set of profile objects if there are any. + NextLink *string + + // READ-ONLY; List of CDN profiles within a resource group. + Value []*Profile +} + +// ProfileLogScrubbing - Defines rules that scrub sensitive fields in the Azure Front Door profile logs. +type ProfileLogScrubbing struct { + // List of log scrubbing rules applied to the Azure Front Door profile logs. + ScrubbingRules []*ProfileScrubbingRules + + // State of the log scrubbing config. Default value is Enabled. + State *ProfileScrubbingState +} + +// ProfileProperties - The JSON object that contains the properties required to create a profile. +type ProfileProperties struct { + // Defines rules that scrub sensitive fields in the Azure Front Door profile logs. + LogScrubbing *ProfileLogScrubbing + + // Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + OriginResponseTimeoutSeconds *int32 + + // READ-ONLY; Key-Value pair representing additional properties for profiles. + ExtendedProperties map[string]*string + + // READ-ONLY; The Id of the frontdoor. + FrontDoorID *string + + // READ-ONLY; Provisioning status of the profile. + ProvisioningState *ProfileProvisioningState + + // READ-ONLY; Resource status of the profile. + ResourceState *ProfileResourceState +} + +// ProfilePropertiesUpdateParameters - The JSON object containing profile update parameters. +type ProfilePropertiesUpdateParameters struct { + // Defines rules to scrub sensitive fields in logs + LogScrubbing *ProfileLogScrubbing + + // Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + OriginResponseTimeoutSeconds *int32 +} + +// ProfileScrubbingRules - Defines the contents of the log scrubbing rules. +type ProfileScrubbingRules struct { + // REQUIRED; The variable to be scrubbed from the logs. + MatchVariable *ScrubbingRuleEntryMatchVariable + + // REQUIRED; When matchVariable is a collection, operate on the selector to specify which elements in the collection this + // rule applies to. + SelectorMatchOperator *ScrubbingRuleEntryMatchOperator + + // When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to. + Selector *string + + // Defines the state of a log scrubbing rule. Default value is enabled. + State *ScrubbingRuleEntryState +} + +// ProfileUpdateParameters - Properties required to update a profile. +type ProfileUpdateParameters struct { + // Managed service identity (system assigned and/or user assigned identities). + Identity *ManagedServiceIdentity + + // The JSON object containing profile update parameters. + Properties *ProfilePropertiesUpdateParameters + + // Profile tags + Tags map[string]*string +} + +// ProfileUpgradeParameters - Parameters required for profile upgrade. +type ProfileUpgradeParameters struct { + // REQUIRED; Web Application Firewall (WAF) and security policy mapping for the profile upgrade + WafMappingList []*ProfileChangeSKUWafMapping +} + +// PurgeParameters - Parameters required for content purge. +type PurgeParameters struct { + // REQUIRED; The path to the content to be purged. Can describe a file path or a wild card directory. + ContentPaths []*string +} + +// QueryStringMatchConditionParameters - Defines the parameters for QueryString match conditions +type QueryStringMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *QueryStringOperator + + // REQUIRED + TypeName *QueryStringMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// RankingsResponse - Rankings Response +type RankingsResponse struct { + DateTimeBegin *time.Time + DateTimeEnd *time.Time + Tables []*RankingsResponseTablesItem +} + +type RankingsResponseTablesItem struct { + Data []*RankingsResponseTablesPropertiesItemsItem + Ranking *string +} + +type RankingsResponseTablesPropertiesItemsItem struct { + Metrics []*RankingsResponseTablesPropertiesItemsMetricsItem + Name *string +} + +type RankingsResponseTablesPropertiesItemsMetricsItem struct { + Metric *string + Percentage *float32 + Value *int64 +} + +// RateLimitRule - Defines a rate limiting rule that can be included in a waf policy +type RateLimitRule struct { + // REQUIRED; Describes what action to be applied when rule matches + Action *ActionType + + // REQUIRED; List of match conditions. + MatchConditions []*MatchCondition + + // REQUIRED; Defines the name of the custom rule + Name *string + + // REQUIRED; Defines in what order this rule be evaluated in the overall list of custom rules + Priority *int32 + + // REQUIRED; Defines rate limit duration. Default is 1 minute. + RateLimitDurationInMinutes *int32 + + // REQUIRED; Defines rate limit threshold. + RateLimitThreshold *int32 + + // Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. + EnabledState *CustomRuleEnabledState +} + +// RateLimitRuleList - Defines contents of rate limit rules +type RateLimitRuleList struct { + // List of rules + Rules []*RateLimitRule +} + +// RemoteAddressMatchConditionParameters - Defines the parameters for RemoteAddress match conditions +type RemoteAddressMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *RemoteAddressOperator + + // REQUIRED + TypeName *RemoteAddressMatchConditionParametersTypeName + + // Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the + // variable with the given operator this match condition is considered a match. + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// RequestBodyMatchConditionParameters - Defines the parameters for RequestBody match conditions +type RequestBodyMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *RequestBodyOperator + + // REQUIRED + TypeName *RequestBodyMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// RequestHeaderMatchConditionParameters - Defines the parameters for RequestHeader match conditions +type RequestHeaderMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *RequestHeaderOperator + + // REQUIRED + TypeName *RequestHeaderMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // Name of Header to be matched + Selector *string + + // List of transforms + Transforms []*Transform +} + +// RequestMethodMatchConditionParameters - Defines the parameters for RequestMethod match conditions +type RequestMethodMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *RequestMethodOperator + + // REQUIRED + TypeName *RequestMethodMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*RequestMethodMatchConditionParametersMatchValuesItem + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// RequestSchemeMatchConditionParameters - Defines the parameters for RequestScheme match conditions +type RequestSchemeMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *RequestSchemeMatchConditionParametersOperator + + // REQUIRED + TypeName *RequestSchemeMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*RequestSchemeMatchConditionParametersMatchValuesItem + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// RequestURIMatchConditionParameters - Defines the parameters for RequestUri match conditions +type RequestURIMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *RequestURIOperator + + // REQUIRED + TypeName *RequestURIMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// ResourceReference - Reference to another resource. +type ResourceReference struct { + // Resource ID. + ID *string +} + +// ResourceUsage - Output of check resource usage API. +type ResourceUsage struct { + // READ-ONLY; Actual value of usage on the specified resource type. + CurrentValue *int32 + + // READ-ONLY; Quota of the specified resource type. + Limit *int32 + + // READ-ONLY; Resource type for which the usage is provided. + ResourceType *string + + // READ-ONLY; Unit of the usage. e.g. count. + Unit *ResourceUsageUnit +} + +// ResourceUsageListResult - Output of check resource usage API. +type ResourceUsageListResult struct { + // URL to get the next set of custom domain objects if there are any. + NextLink *string + + // READ-ONLY; List of resource usages. + Value []*ResourceUsage +} + +// ResourcesResponse - Resources Response +type ResourcesResponse struct { + CustomDomains []*ResourcesResponseCustomDomainsItem + Endpoints []*ResourcesResponseEndpointsItem +} + +type ResourcesResponseCustomDomainsItem struct { + EndpointID *string + History *bool + ID *string + Name *string +} + +type ResourcesResponseEndpointsItem struct { + CustomDomains []*ResourcesResponseEndpointsPropertiesItemsItem + History *bool + ID *string + Name *string +} + +type ResourcesResponseEndpointsPropertiesItemsItem struct { + EndpointID *string + History *bool + ID *string + Name *string +} + +// ResponseBasedOriginErrorDetectionParameters - The JSON object that contains the properties to determine origin health using +// real requests/responses. +type ResponseBasedOriginErrorDetectionParameters struct { + // The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + HTTPErrorRanges []*HTTPErrorRangeParameters + + // Type of response errors for real user requests for which origin will be deemed unhealthy + ResponseBasedDetectedErrorTypes *ResponseBasedDetectedErrorTypes + + // The percentage of failed requests in the sample where failover should trigger. + ResponseBasedFailoverThresholdPercentage *int32 +} + +// Route - Friendly Routes name mapping to the any Routes or secret related information. +type Route struct { + // The JSON object that contains the properties of the Routes to create. + Properties *RouteProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// RouteConfigurationOverrideActionParameters - Defines the parameters for the route configuration override action. +type RouteConfigurationOverrideActionParameters struct { + // REQUIRED + TypeName *RouteConfigurationOverrideActionParametersTypeName + + // The caching configuration associated with this rule. To disable caching, do not provide a cacheConfiguration object. + CacheConfiguration *CacheConfiguration + + // A reference to the origin group override configuration. Leave empty to use the default origin group on route. + OriginGroupOverride *OriginGroupOverride +} + +// RouteListResult - Result of the request to list routes. It contains a list of route objects and a URL link to get the next +// set of results. +type RouteListResult struct { + // URL to get the next set of route objects if there are any. + NextLink *string + + // READ-ONLY; List of AzureFrontDoor routes within a profile. + Value []*Route +} + +// RouteProperties - The JSON object that contains the properties of the Routes to create. +type RouteProperties struct { + // The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + CacheConfiguration *AfdRouteCacheConfiguration + + // Domains referenced by this endpoint. + CustomDomains []*ActivatedResourceReference + + // Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + EnabledState *EnabledState + + // Protocol this rule will use when forwarding traffic to backends. + ForwardingProtocol *ForwardingProtocol + + // Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it + // will be the first rule that gets executed. + HTTPSRedirect *HTTPSRedirect + + // whether this route will be linked to the default endpoint domain. + LinkToDefaultDomain *LinkToDefaultDomain + + // A reference to the origin group. + OriginGroup *ResourceReference + + // A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + OriginPath *string + + // The route patterns of the rule. + PatternsToMatch []*string + + // rule sets referenced by this endpoint. + RuleSets []*ResourceReference + + // List of supported protocols for this route. + SupportedProtocols []*AFDEndpointProtocols + + // READ-ONLY + DeploymentStatus *DeploymentStatus + + // READ-ONLY; The name of the endpoint which holds the route. + EndpointName *string + + // READ-ONLY; Provisioning status + ProvisioningState *AfdProvisioningState +} + +// RouteUpdateParameters - The domain JSON object required for domain creation or update. +type RouteUpdateParameters struct { + // The JSON object that contains the properties of the domain to create. + Properties *RouteUpdatePropertiesParameters +} + +// RouteUpdatePropertiesParameters - The JSON object that contains the properties of the domain to create. +type RouteUpdatePropertiesParameters struct { + // The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + CacheConfiguration *AfdRouteCacheConfiguration + + // Domains referenced by this endpoint. + CustomDomains []*ActivatedResourceReference + + // Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + EnabledState *EnabledState + + // Protocol this rule will use when forwarding traffic to backends. + ForwardingProtocol *ForwardingProtocol + + // Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it + // will be the first rule that gets executed. + HTTPSRedirect *HTTPSRedirect + + // whether this route will be linked to the default endpoint domain. + LinkToDefaultDomain *LinkToDefaultDomain + + // A reference to the origin group. + OriginGroup *ResourceReference + + // A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + OriginPath *string + + // The route patterns of the rule. + PatternsToMatch []*string + + // rule sets referenced by this endpoint. + RuleSets []*ResourceReference + + // List of supported protocols for this route. + SupportedProtocols []*AFDEndpointProtocols + + // READ-ONLY; The name of the endpoint which holds the route. + EndpointName *string +} + +// Rule - Friendly Rules name mapping to the any Rules or secret related information. +type Rule struct { + // The JSON object that contains the properties of the Rules to create. + Properties *RuleProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// RuleListResult - Result of the request to list rules. It contains a list of rule objects and a URL link to get the next +// set of results. +type RuleListResult struct { + // URL to get the next set of rule objects if there are any. + NextLink *string + + // READ-ONLY; List of AzureFrontDoor rules within a rule set. + Value []*Rule +} + +// RuleProperties - The JSON object that contains the properties of the Rules to create. +type RuleProperties struct { + // A list of actions that are executed when all the conditions of a rule are satisfied. + Actions []DeliveryRuleActionAutoGeneratedClassification + + // A list of conditions that must be matched for the actions to be executed + Conditions []DeliveryRuleConditionClassification + + // If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + // to Continue. + MatchProcessingBehavior *MatchProcessingBehavior + + // The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + // be applied before a rule with a greater order. Rule with order 0 is a special + // rule. It does not require any condition and actions listed in it will always be applied. + Order *int32 + + // READ-ONLY + DeploymentStatus *DeploymentStatus + + // READ-ONLY; Provisioning status + ProvisioningState *AfdProvisioningState + + // READ-ONLY; The name of the rule set containing the rule. + RuleSetName *string +} + +// RuleSet - Friendly RuleSet name mapping to the any RuleSet or secret related information. +type RuleSet struct { + // The JSON object that contains the properties of the Rule Set to create. + Properties *RuleSetProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// RuleSetListResult - Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get +// the next set of results. +type RuleSetListResult struct { + // URL to get the next set of rule set objects if there are any. + NextLink *string + + // READ-ONLY; List of AzureFrontDoor rule sets within a profile. + Value []*RuleSet +} + +// RuleSetProperties - The JSON object that contains the properties of the Rule Set to create. +type RuleSetProperties struct { + // READ-ONLY + DeploymentStatus *DeploymentStatus + + // READ-ONLY; The name of the profile which holds the rule set. + ProfileName *string + + // READ-ONLY; Provisioning status + ProvisioningState *AfdProvisioningState +} + +// RuleUpdateParameters - The domain JSON object required for domain creation or update. +type RuleUpdateParameters struct { + // The JSON object that contains the properties of the rule to update. + Properties *RuleUpdatePropertiesParameters +} + +// RuleUpdatePropertiesParameters - The JSON object that contains the properties of the rule to update. +type RuleUpdatePropertiesParameters struct { + // A list of actions that are executed when all the conditions of a rule are satisfied. + Actions []DeliveryRuleActionAutoGeneratedClassification + + // A list of conditions that must be matched for the actions to be executed + Conditions []DeliveryRuleConditionClassification + + // If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + // to Continue. + MatchProcessingBehavior *MatchProcessingBehavior + + // The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + // be applied before a rule with a greater order. Rule with order 0 is a special + // rule. It does not require any condition and actions listed in it will always be applied. + Order *int32 + + // READ-ONLY; The name of the rule set containing the rule. + RuleSetName *string +} + +// SKU - StandardVerizon = The SKU name for a Standard Verizon CDN profile. PremiumVerizon = The SKU name for a Premium Verizon +// CDN profile. CustomVerizon = The SKU name for a Custom Verizon CDN profile. +// StandardAkamai = The SKU name for an Akamai CDN profile. StandardChinaCdn = The SKU name for a China CDN profile for VOD, +// Web and download scenarios using GB based billing model. StandardMicrosoft = +// The SKU name for a Standard Microsoft CDN profile. StandardAzureFrontDoor = The SKU name for an Azure Front Door Standard +// profile. PremiumAzureFrontDoor = The SKU name for an Azure Front Door Premium +// profile. Standard955BandWidthChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using +// 95-5 peak bandwidth billing model. StandardAvgBandWidthChinaCdn = The SKU name +// for a China CDN profile for VOD, Web and download scenarios using monthly average peak bandwidth billing model. StandardPlusChinaCdn +// = The SKU name for a China CDN profile for live-streaming using GB +// based billing model. StandardPlus955BandWidthChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 +// peak bandwidth billing model. StandardPlusAvgBandWidth_ChinaCdn = The SKU name +// for a China CDN live-streaming profile using monthly average peak bandwidth billing model. +type SKU struct { + // Name of the pricing tier. + Name *SKUName +} + +// SSLProtocolMatchConditionParameters - Defines the parameters for SslProtocol match conditions +type SSLProtocolMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *SSLProtocolOperator + + // REQUIRED + TypeName *SSLProtocolMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*SSLProtocol + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// Secret - Friendly Secret name mapping to the any Secret or secret related information. +type Secret struct { + // The JSON object that contains the properties of the Secret to create. + Properties *SecretProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// SecretListResult - Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the +// next set of results. +type SecretListResult struct { + // URL to get the next set of Secret objects if there are any. + NextLink *string + + // READ-ONLY; List of AzureFrontDoor secrets within a profile. + Value []*Secret +} + +// SecretParameters - The json object containing secret parameters +type SecretParameters struct { + // REQUIRED; The type of the secret resource. + Type *SecretType +} + +// GetSecretParameters implements the SecretParametersClassification interface for type SecretParameters. +func (s *SecretParameters) GetSecretParameters() *SecretParameters { return s } + +// SecretProperties - The JSON object that contains the properties of the Secret to create. +type SecretProperties struct { + // object which contains secret parameters + Parameters SecretParametersClassification + + // READ-ONLY + DeploymentStatus *DeploymentStatus + + // READ-ONLY; The name of the profile which holds the secret. + ProfileName *string + + // READ-ONLY; Provisioning status + ProvisioningState *AfdProvisioningState +} + +// SecurityPolicy association for AzureFrontDoor profile +type SecurityPolicy struct { + // The json object that contains properties required to create a security policy + Properties *SecurityPolicyProperties + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// SecurityPolicyListResult - Result of the request to list security policies. It contains a list of security policy objects +// and a URL link to get the next set of results. +type SecurityPolicyListResult struct { + // URL to get the next set of security policy objects if there is any. + NextLink *string + + // READ-ONLY; List of Security policies within a profile + Value []*SecurityPolicy +} + +// SecurityPolicyProperties - The json object that contains properties required to create a security policy +type SecurityPolicyProperties struct { + // object which contains security policy parameters + Parameters SecurityPolicyPropertiesParametersClassification + + // READ-ONLY + DeploymentStatus *DeploymentStatus + + // READ-ONLY; The name of the profile which holds the security policy. + ProfileName *string + + // READ-ONLY; Provisioning status + ProvisioningState *AfdProvisioningState +} + +// SecurityPolicyPropertiesParameters - The json object containing security policy parameters +type SecurityPolicyPropertiesParameters struct { + // REQUIRED; The type of the Security policy to create. + Type *SecurityPolicyType +} + +// GetSecurityPolicyPropertiesParameters implements the SecurityPolicyPropertiesParametersClassification interface for type +// SecurityPolicyPropertiesParameters. +func (s *SecurityPolicyPropertiesParameters) GetSecurityPolicyPropertiesParameters() *SecurityPolicyPropertiesParameters { + return s +} + +// SecurityPolicyUpdateParameters - The JSON object containing security policy update parameters. +type SecurityPolicyUpdateParameters struct { + // The json object that contains properties required to update a security policy + Properties *SecurityPolicyUpdateProperties +} + +// SecurityPolicyUpdateProperties - The json object that contains properties required to update a security policy +type SecurityPolicyUpdateProperties struct { + // object which contains security policy parameters + Parameters SecurityPolicyPropertiesParametersClassification +} + +// SecurityPolicyWebApplicationFirewallAssociation - settings for security policy patterns to match +type SecurityPolicyWebApplicationFirewallAssociation struct { + // List of domains. + Domains []*ActivatedResourceReference + + // List of paths + PatternsToMatch []*string +} + +// SecurityPolicyWebApplicationFirewallParameters - The json object containing security policy waf parameters +type SecurityPolicyWebApplicationFirewallParameters struct { + // REQUIRED; The type of the Security policy to create. + Type *SecurityPolicyType + + // Waf associations + Associations []*SecurityPolicyWebApplicationFirewallAssociation + + // Resource ID. + WafPolicy *ResourceReference +} + +// GetSecurityPolicyPropertiesParameters implements the SecurityPolicyPropertiesParametersClassification interface for type +// SecurityPolicyWebApplicationFirewallParameters. +func (s *SecurityPolicyWebApplicationFirewallParameters) GetSecurityPolicyPropertiesParameters() *SecurityPolicyPropertiesParameters { + return &SecurityPolicyPropertiesParameters{ + Type: s.Type, + } +} + +// ServerPortMatchConditionParameters - Defines the parameters for ServerPort match conditions +type ServerPortMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *ServerPortOperator + + // REQUIRED + TypeName *ServerPortMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// ServiceSpecification - One property of operation, include log specifications. +type ServiceSpecification struct { + // Log specifications of operation. + LogSpecifications []*LogSpecification + + // Metric specifications of operation. + MetricSpecifications []*MetricSpecification +} + +// SharedPrivateLinkResourceProperties - Describes the properties of an existing Shared Private Link Resource to use when +// connecting to a private origin. +type SharedPrivateLinkResourceProperties struct { + // The group id from the provider of resource the shared private link resource is for. + GroupID *string + + // The resource id of the resource the shared private link resource is for. + PrivateLink *ResourceReference + + // The location of the shared private link resource + PrivateLinkLocation *string + + // The request message for requesting approval of the shared private link resource. + RequestMessage *string + + // Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + Status *SharedPrivateLinkResourceStatus +} + +// SocketAddrMatchConditionParameters - Defines the parameters for SocketAddress match conditions +type SocketAddrMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *SocketAddrOperator + + // REQUIRED + TypeName *SocketAddrMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// SsoURI - The URI required to login to the supplemental portal from the Azure portal. +type SsoURI struct { + // READ-ONLY; The URI used to login to the supplemental portal. + SsoURIValue *string +} + +// SupportedOptimizationTypesListResult - The result of the GetSupportedOptimizationTypes API +type SupportedOptimizationTypesListResult struct { + // READ-ONLY; Supported optimization types for a profile. + SupportedOptimizationTypes []*OptimizationType +} + +// SystemData - Read only system data +type SystemData struct { + // The timestamp of resource creation (UTC) + CreatedAt *time.Time + + // An identifier for the identity that created the resource + CreatedBy *string + + // The type of identity that created the resource + CreatedByType *IdentityType + + // The timestamp of resource last modification (UTC) + LastModifiedAt *time.Time + + // An identifier for the identity that last modified the resource + LastModifiedBy *string + + // The type of identity that last modified the resource + LastModifiedByType *IdentityType +} + +// URLFileExtensionMatchConditionParameters - Defines the parameters for UrlFileExtension match conditions +type URLFileExtensionMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *URLFileExtensionOperator + + // REQUIRED + TypeName *URLFileExtensionMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// URLFileNameMatchConditionParameters - Defines the parameters for UrlFilename match conditions +type URLFileNameMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *URLFileNameOperator + + // REQUIRED + TypeName *URLFileNameMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// URLPathMatchConditionParameters - Defines the parameters for UrlPath match conditions +type URLPathMatchConditionParameters struct { + // REQUIRED; Describes operator to be matched + Operator *URLPathOperator + + // REQUIRED + TypeName *URLPathMatchConditionParametersTypeName + + // The match value for the condition of the delivery rule + MatchValues []*string + + // Describes if this is negate condition or not + NegateCondition *bool + + // List of transforms + Transforms []*Transform +} + +// URLRedirectAction - Defines the url redirect action for the delivery rule. +type URLRedirectAction struct { + // REQUIRED; The name of the action for the delivery rule. + Name *DeliveryRuleAction + + // REQUIRED; Defines the parameters for the action. + Parameters *URLRedirectActionParameters +} + +// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type URLRedirectAction. +func (u *URLRedirectAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { + return &DeliveryRuleActionAutoGenerated{ + Name: u.Name, + } +} + +// URLRedirectActionParameters - Defines the parameters for the url redirect action. +type URLRedirectActionParameters struct { + // REQUIRED; The redirect type the rule will use when redirecting traffic. + RedirectType *RedirectType + + // REQUIRED + TypeName *URLRedirectActionParametersTypeName + + // Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + CustomFragment *string + + // Host to redirect. Leave empty to use the incoming host as the destination host. + CustomHostname *string + + // The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination + // path. + CustomPath *string + + // The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; + // leave empty to preserve the incoming query string. Query string must be in = + // format. ? and & will be added automatically so do not include them. + CustomQueryString *string + + // Protocol to use for the redirect. The default value is MatchRequest + DestinationProtocol *DestinationProtocol +} + +// URLRewriteAction - Defines the url rewrite action for the delivery rule. +type URLRewriteAction struct { + // REQUIRED; The name of the action for the delivery rule. + Name *DeliveryRuleAction + + // REQUIRED; Defines the parameters for the action. + Parameters *URLRewriteActionParameters +} + +// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type URLRewriteAction. +func (u *URLRewriteAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { + return &DeliveryRuleActionAutoGenerated{ + Name: u.Name, + } +} + +// URLRewriteActionParameters - Defines the parameters for the url rewrite action. +type URLRewriteActionParameters struct { + // REQUIRED; Define the relative URL to which the above requests will be rewritten by. + Destination *string + + // REQUIRED; define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all + // strings are matched. + SourcePattern *string + + // REQUIRED + TypeName *URLRewriteActionParametersTypeName + + // Whether to preserve unmatched path. Default value is true. + PreserveUnmatchedPath *bool +} + +// URLSigningAction - Defines the url signing action for the delivery rule. +type URLSigningAction struct { + // REQUIRED; The name of the action for the delivery rule. + Name *DeliveryRuleAction + + // REQUIRED; Defines the parameters for the action. + Parameters *URLSigningActionParameters +} + +// GetDeliveryRuleActionAutoGenerated implements the DeliveryRuleActionAutoGeneratedClassification interface for type URLSigningAction. +func (u *URLSigningAction) GetDeliveryRuleActionAutoGenerated() *DeliveryRuleActionAutoGenerated { + return &DeliveryRuleActionAutoGenerated{ + Name: u.Name, + } +} + +// URLSigningActionParameters - Defines the parameters for the Url Signing action. +type URLSigningActionParameters struct { + // REQUIRED + TypeName *URLSigningActionParametersTypeName + + // Algorithm to use for URL signing + Algorithm *Algorithm + + // Defines which query string parameters in the url to be considered for expires, key id etc. + ParameterNameOverride []*URLSigningParamIdentifier +} + +// URLSigningKey - Url signing key +type URLSigningKey struct { + // REQUIRED; Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form + // the hash. + KeyID *string + + // REQUIRED; Defines the parameters for using customer key vault for Url Signing Key. + KeySourceParameters *KeyVaultSigningKeyParameters +} + +// URLSigningKeyParameters - Url signing key parameters +type URLSigningKeyParameters struct { + // REQUIRED; Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form + // the hash. + KeyID *string + + // REQUIRED; Resource reference to the Azure Key Vault secret. Expected to be in format of + // /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + SecretSource *ResourceReference + + // REQUIRED; The type of the secret resource. + Type *SecretType + + // Version of the secret to be used + SecretVersion *string +} + +// GetSecretParameters implements the SecretParametersClassification interface for type URLSigningKeyParameters. +func (u *URLSigningKeyParameters) GetSecretParameters() *SecretParameters { + return &SecretParameters{ + Type: u.Type, + } +} + +// URLSigningParamIdentifier - Defines how to identify a parameter for a specific purpose e.g. expires +type URLSigningParamIdentifier struct { + // REQUIRED; Indicates the purpose of the parameter + ParamIndicator *ParamIndicator + + // REQUIRED; Parameter name + ParamName *string +} + +// Usage - Describes resource usage. +type Usage struct { + // REQUIRED; The current value of the usage. + CurrentValue *int64 + + // REQUIRED; The limit of usage. + Limit *int64 + + // REQUIRED; The name of the type of usage. + Name *UsageName + + // REQUIRED; An enum describing the unit of measurement. + Unit *UsageUnit + + // READ-ONLY; Resource identifier. + ID *string +} + +// UsageName - The usage names. +type UsageName struct { + // A localized string describing the resource name. + LocalizedValue *string + + // A string describing the resource name. + Value *string +} + +// UsagesListResult - The list usages operation response. +type UsagesListResult struct { + // URL to get the next set of results. + NextLink *string + + // The list of resource usages. + Value []*Usage +} + +// UserAssignedIdentity - User assigned identity properties +type UserAssignedIdentity struct { + // READ-ONLY; The client ID of the assigned identity. + ClientID *string + + // READ-ONLY; The principal ID of the assigned identity. + PrincipalID *string +} + +// UserManagedHTTPSParameters - Defines the certificate source parameters using user's keyvault certificate for enabling SSL. +type UserManagedHTTPSParameters struct { + // REQUIRED; Defines the source of the SSL certificate. + CertificateSource *CertificateSource + + // REQUIRED; Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + CertificateSourceParameters *KeyVaultCertificateSourceParameters + + // REQUIRED; Defines the TLS extension protocol that is used for secure delivery. + ProtocolType *ProtocolType + + // TLS protocol version that will be used for Https + MinimumTLSVersion *MinimumTLSVersion +} + +// GetCustomDomainHTTPSParameters implements the CustomDomainHTTPSParametersClassification interface for type UserManagedHTTPSParameters. +func (u *UserManagedHTTPSParameters) GetCustomDomainHTTPSParameters() *CustomDomainHTTPSParameters { + return &CustomDomainHTTPSParameters{ + CertificateSource: u.CertificateSource, + MinimumTLSVersion: u.MinimumTLSVersion, + ProtocolType: u.ProtocolType, + } +} + +// ValidateCustomDomainInput - Input of the custom domain to be validated for DNS mapping. +type ValidateCustomDomainInput struct { + // REQUIRED; The host name of the custom domain. Must be a domain name. + HostName *string +} + +// ValidateCustomDomainOutput - Output of custom domain validation. +type ValidateCustomDomainOutput struct { + // READ-ONLY; Indicates whether the custom domain is valid or not. + CustomDomainValidated *bool + + // READ-ONLY; Error message describing why the custom domain is not valid. + Message *string + + // READ-ONLY; The reason why the custom domain is not valid. + Reason *string +} + +// ValidateProbeInput - Input of the validate probe API. +type ValidateProbeInput struct { + // REQUIRED; The probe URL to validate. + ProbeURL *string +} + +// ValidateProbeOutput - Output of the validate probe API. +type ValidateProbeOutput struct { + // READ-ONLY; Specifies the error code when the probe url is not accepted. + ErrorCode *string + + // READ-ONLY; Indicates whether the probe URL is accepted or not. + IsValid *bool + + // READ-ONLY; The detailed error message describing why the probe URL is not accepted. + Message *string +} + +// ValidateSecretInput - Input of the secret to be validated. +type ValidateSecretInput struct { + // REQUIRED; Resource reference to the Azure Key Vault secret. Expected to be in format of + // /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + SecretSource *ResourceReference + + // REQUIRED; The secret type. + SecretType *SecretType + + // Secret version, if customer is using a specific version. + SecretVersion *string +} + +// ValidateSecretOutput - Output of the validated secret. +type ValidateSecretOutput struct { + // Detailed error message + Message *string + + // The validation status. + Status *Status +} + +// WafMetricsResponse - Waf Metrics Response +type WafMetricsResponse struct { + DateTimeBegin *time.Time + DateTimeEnd *time.Time + Granularity *WafMetricsGranularity + Series []*WafMetricsResponseSeriesItem +} + +type WafMetricsResponseSeriesItem struct { + Data []*Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems + Groups []*WafMetricsResponseSeriesPropertiesItemsItem + Metric *string + Unit *WafMetricsSeriesUnit +} + +type WafMetricsResponseSeriesPropertiesItemsItem struct { + Name *string + Value *string +} + +// WafRankingsResponse - Waf Rankings Response +type WafRankingsResponse struct { + Data []*WafRankingsResponseDataItem + DateTimeBegin *time.Time + DateTimeEnd *time.Time + Groups []*string +} + +type WafRankingsResponseDataItem struct { + GroupValues []*string + Metrics []*ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems +} + +// WebApplicationFirewallPolicy - Defines web application firewall policy for Azure CDN. +type WebApplicationFirewallPolicy struct { + // REQUIRED; Resource location. + Location *string + + // REQUIRED; The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + SKU *SKU + + // Gets a unique read-only string that changes whenever the resource is updated. + Etag *string + + // Properties of the web application firewall policy. + Properties *WebApplicationFirewallPolicyProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Read only system data + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// WebApplicationFirewallPolicyList - Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of +// WebApplicationFirewallPolicy objects and a URL link to get the next set of results. +type WebApplicationFirewallPolicyList struct { + // URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + NextLink *string + + // READ-ONLY; List of Azure CDN WebApplicationFirewallPolicies within a resource group. + Value []*WebApplicationFirewallPolicy +} + +// WebApplicationFirewallPolicyPatchParameters - Properties required to update a CdnWebApplicationFirewallPolicy. +type WebApplicationFirewallPolicyPatchParameters struct { + // CdnWebApplicationFirewallPolicy tags + Tags map[string]*string +} + +// WebApplicationFirewallPolicyProperties - Defines CDN web application firewall policy properties. +type WebApplicationFirewallPolicyProperties struct { + // Describes custom rules inside the policy. + CustomRules *CustomRuleList + + // Key-Value pair representing additional properties for Web Application Firewall policy. + ExtendedProperties map[string]*string + + // Describes managed rules inside the policy. + ManagedRules *ManagedRuleSetList + + // Describes policySettings for policy + PolicySettings *PolicySettings + + // Describes rate limit rules inside the policy. + RateLimitRules *RateLimitRuleList + + // READ-ONLY; Describes Azure CDN endpoints associated with this Web Application Firewall policy. + EndpointLinks []*LinkedEndpoint + + // READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy. + ProvisioningState *ProvisioningState + + // READ-ONLY; Resource status of the policy. + ResourceState *PolicyResourceState +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/models_serde.go new file mode 100644 index 00000000..8bd43667 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/models_serde.go @@ -0,0 +1,9525 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AFDDomain. +func (a AFDDomain) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomain. +func (a *AFDDomain) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDDomainHTTPSParameters. +func (a AFDDomainHTTPSParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateType", a.CertificateType) + populate(objectMap, "minimumTlsVersion", a.MinimumTLSVersion) + populate(objectMap, "secret", a.Secret) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainHTTPSParameters. +func (a *AFDDomainHTTPSParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateType": + err = unpopulate(val, "CertificateType", &a.CertificateType) + delete(rawMsg, key) + case "minimumTlsVersion": + err = unpopulate(val, "MinimumTLSVersion", &a.MinimumTLSVersion) + delete(rawMsg, key) + case "secret": + err = unpopulate(val, "Secret", &a.Secret) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDDomainListResult. +func (a AFDDomainListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainListResult. +func (a *AFDDomainListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDDomainProperties. +func (a AFDDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureDnsZone", a.AzureDNSZone) + populate(objectMap, "deploymentStatus", a.DeploymentStatus) + populate(objectMap, "domainValidationState", a.DomainValidationState) + populate(objectMap, "extendedProperties", a.ExtendedProperties) + populate(objectMap, "hostName", a.HostName) + populate(objectMap, "preValidatedCustomDomainResourceId", a.PreValidatedCustomDomainResourceID) + populate(objectMap, "profileName", a.ProfileName) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "tlsSettings", a.TLSSettings) + populate(objectMap, "validationProperties", a.ValidationProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainProperties. +func (a *AFDDomainProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureDnsZone": + err = unpopulate(val, "AzureDNSZone", &a.AzureDNSZone) + delete(rawMsg, key) + case "deploymentStatus": + err = unpopulate(val, "DeploymentStatus", &a.DeploymentStatus) + delete(rawMsg, key) + case "domainValidationState": + err = unpopulate(val, "DomainValidationState", &a.DomainValidationState) + delete(rawMsg, key) + case "extendedProperties": + err = unpopulate(val, "ExtendedProperties", &a.ExtendedProperties) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &a.HostName) + delete(rawMsg, key) + case "preValidatedCustomDomainResourceId": + err = unpopulate(val, "PreValidatedCustomDomainResourceID", &a.PreValidatedCustomDomainResourceID) + delete(rawMsg, key) + case "profileName": + err = unpopulate(val, "ProfileName", &a.ProfileName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "tlsSettings": + err = unpopulate(val, "TLSSettings", &a.TLSSettings) + delete(rawMsg, key) + case "validationProperties": + err = unpopulate(val, "ValidationProperties", &a.ValidationProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDDomainUpdateParameters. +func (a AFDDomainUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainUpdateParameters. +func (a *AFDDomainUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDDomainUpdatePropertiesParameters. +func (a AFDDomainUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureDnsZone", a.AzureDNSZone) + populate(objectMap, "preValidatedCustomDomainResourceId", a.PreValidatedCustomDomainResourceID) + populate(objectMap, "profileName", a.ProfileName) + populate(objectMap, "tlsSettings", a.TLSSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDDomainUpdatePropertiesParameters. +func (a *AFDDomainUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureDnsZone": + err = unpopulate(val, "AzureDNSZone", &a.AzureDNSZone) + delete(rawMsg, key) + case "preValidatedCustomDomainResourceId": + err = unpopulate(val, "PreValidatedCustomDomainResourceID", &a.PreValidatedCustomDomainResourceID) + delete(rawMsg, key) + case "profileName": + err = unpopulate(val, "ProfileName", &a.ProfileName) + delete(rawMsg, key) + case "tlsSettings": + err = unpopulate(val, "TLSSettings", &a.TLSSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDEndpoint. +func (a AFDEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpoint. +func (a *AFDEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDEndpointListResult. +func (a AFDEndpointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointListResult. +func (a *AFDEndpointListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDEndpointProperties. +func (a AFDEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoGeneratedDomainNameLabelScope", a.AutoGeneratedDomainNameLabelScope) + populate(objectMap, "deploymentStatus", a.DeploymentStatus) + populate(objectMap, "enabledState", a.EnabledState) + populate(objectMap, "hostName", a.HostName) + populate(objectMap, "profileName", a.ProfileName) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointProperties. +func (a *AFDEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoGeneratedDomainNameLabelScope": + err = unpopulate(val, "AutoGeneratedDomainNameLabelScope", &a.AutoGeneratedDomainNameLabelScope) + delete(rawMsg, key) + case "deploymentStatus": + err = unpopulate(val, "DeploymentStatus", &a.DeploymentStatus) + delete(rawMsg, key) + case "enabledState": + err = unpopulate(val, "EnabledState", &a.EnabledState) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &a.HostName) + delete(rawMsg, key) + case "profileName": + err = unpopulate(val, "ProfileName", &a.ProfileName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDEndpointPropertiesUpdateParameters. +func (a AFDEndpointPropertiesUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabledState", a.EnabledState) + populate(objectMap, "profileName", a.ProfileName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointPropertiesUpdateParameters. +func (a *AFDEndpointPropertiesUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabledState": + err = unpopulate(val, "EnabledState", &a.EnabledState) + delete(rawMsg, key) + case "profileName": + err = unpopulate(val, "ProfileName", &a.ProfileName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDEndpointUpdateParameters. +func (a AFDEndpointUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDEndpointUpdateParameters. +func (a *AFDEndpointUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDOrigin. +func (a AFDOrigin) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOrigin. +func (a *AFDOrigin) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDOriginGroup. +func (a AFDOriginGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroup. +func (a *AFDOriginGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupListResult. +func (a AFDOriginGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupListResult. +func (a *AFDOriginGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupProperties. +func (a AFDOriginGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deploymentStatus", a.DeploymentStatus) + populate(objectMap, "healthProbeSettings", a.HealthProbeSettings) + populate(objectMap, "loadBalancingSettings", a.LoadBalancingSettings) + populate(objectMap, "profileName", a.ProfileName) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "sessionAffinityState", a.SessionAffinityState) + populate(objectMap, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", a.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupProperties. +func (a *AFDOriginGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deploymentStatus": + err = unpopulate(val, "DeploymentStatus", &a.DeploymentStatus) + delete(rawMsg, key) + case "healthProbeSettings": + err = unpopulate(val, "HealthProbeSettings", &a.HealthProbeSettings) + delete(rawMsg, key) + case "loadBalancingSettings": + err = unpopulate(val, "LoadBalancingSettings", &a.LoadBalancingSettings) + delete(rawMsg, key) + case "profileName": + err = unpopulate(val, "ProfileName", &a.ProfileName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "sessionAffinityState": + err = unpopulate(val, "SessionAffinityState", &a.SessionAffinityState) + delete(rawMsg, key) + case "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": + err = unpopulate(val, "TrafficRestorationTimeToHealedOrNewEndpointsInMinutes", &a.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupUpdateParameters. +func (a AFDOriginGroupUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupUpdateParameters. +func (a *AFDOriginGroupUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDOriginGroupUpdatePropertiesParameters. +func (a AFDOriginGroupUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "healthProbeSettings", a.HealthProbeSettings) + populate(objectMap, "loadBalancingSettings", a.LoadBalancingSettings) + populate(objectMap, "profileName", a.ProfileName) + populate(objectMap, "sessionAffinityState", a.SessionAffinityState) + populate(objectMap, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", a.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginGroupUpdatePropertiesParameters. +func (a *AFDOriginGroupUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "healthProbeSettings": + err = unpopulate(val, "HealthProbeSettings", &a.HealthProbeSettings) + delete(rawMsg, key) + case "loadBalancingSettings": + err = unpopulate(val, "LoadBalancingSettings", &a.LoadBalancingSettings) + delete(rawMsg, key) + case "profileName": + err = unpopulate(val, "ProfileName", &a.ProfileName) + delete(rawMsg, key) + case "sessionAffinityState": + err = unpopulate(val, "SessionAffinityState", &a.SessionAffinityState) + delete(rawMsg, key) + case "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": + err = unpopulate(val, "TrafficRestorationTimeToHealedOrNewEndpointsInMinutes", &a.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDOriginListResult. +func (a AFDOriginListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginListResult. +func (a *AFDOriginListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDOriginProperties. +func (a AFDOriginProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureOrigin", a.AzureOrigin) + populate(objectMap, "deploymentStatus", a.DeploymentStatus) + populate(objectMap, "enabledState", a.EnabledState) + populate(objectMap, "enforceCertificateNameCheck", a.EnforceCertificateNameCheck) + populate(objectMap, "httpPort", a.HTTPPort) + populate(objectMap, "httpsPort", a.HTTPSPort) + populate(objectMap, "hostName", a.HostName) + populate(objectMap, "originGroupName", a.OriginGroupName) + populate(objectMap, "originHostHeader", a.OriginHostHeader) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "sharedPrivateLinkResource", a.SharedPrivateLinkResource) + populate(objectMap, "weight", a.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginProperties. +func (a *AFDOriginProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureOrigin": + err = unpopulate(val, "AzureOrigin", &a.AzureOrigin) + delete(rawMsg, key) + case "deploymentStatus": + err = unpopulate(val, "DeploymentStatus", &a.DeploymentStatus) + delete(rawMsg, key) + case "enabledState": + err = unpopulate(val, "EnabledState", &a.EnabledState) + delete(rawMsg, key) + case "enforceCertificateNameCheck": + err = unpopulate(val, "EnforceCertificateNameCheck", &a.EnforceCertificateNameCheck) + delete(rawMsg, key) + case "httpPort": + err = unpopulate(val, "HTTPPort", &a.HTTPPort) + delete(rawMsg, key) + case "httpsPort": + err = unpopulate(val, "HTTPSPort", &a.HTTPSPort) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &a.HostName) + delete(rawMsg, key) + case "originGroupName": + err = unpopulate(val, "OriginGroupName", &a.OriginGroupName) + delete(rawMsg, key) + case "originHostHeader": + err = unpopulate(val, "OriginHostHeader", &a.OriginHostHeader) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &a.Priority) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "sharedPrivateLinkResource": + err = unpopulate(val, "SharedPrivateLinkResource", &a.SharedPrivateLinkResource) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &a.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDOriginUpdateParameters. +func (a AFDOriginUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginUpdateParameters. +func (a *AFDOriginUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AFDOriginUpdatePropertiesParameters. +func (a AFDOriginUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureOrigin", a.AzureOrigin) + populate(objectMap, "enabledState", a.EnabledState) + populate(objectMap, "enforceCertificateNameCheck", a.EnforceCertificateNameCheck) + populate(objectMap, "httpPort", a.HTTPPort) + populate(objectMap, "httpsPort", a.HTTPSPort) + populate(objectMap, "hostName", a.HostName) + populate(objectMap, "originGroupName", a.OriginGroupName) + populate(objectMap, "originHostHeader", a.OriginHostHeader) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "sharedPrivateLinkResource", a.SharedPrivateLinkResource) + populate(objectMap, "weight", a.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AFDOriginUpdatePropertiesParameters. +func (a *AFDOriginUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureOrigin": + err = unpopulate(val, "AzureOrigin", &a.AzureOrigin) + delete(rawMsg, key) + case "enabledState": + err = unpopulate(val, "EnabledState", &a.EnabledState) + delete(rawMsg, key) + case "enforceCertificateNameCheck": + err = unpopulate(val, "EnforceCertificateNameCheck", &a.EnforceCertificateNameCheck) + delete(rawMsg, key) + case "httpPort": + err = unpopulate(val, "HTTPPort", &a.HTTPPort) + delete(rawMsg, key) + case "httpsPort": + err = unpopulate(val, "HTTPSPort", &a.HTTPSPort) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &a.HostName) + delete(rawMsg, key) + case "originGroupName": + err = unpopulate(val, "OriginGroupName", &a.OriginGroupName) + delete(rawMsg, key) + case "originHostHeader": + err = unpopulate(val, "OriginHostHeader", &a.OriginHostHeader) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &a.Priority) + delete(rawMsg, key) + case "sharedPrivateLinkResource": + err = unpopulate(val, "SharedPrivateLinkResource", &a.SharedPrivateLinkResource) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &a.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ActivatedResourceReference. +func (a ActivatedResourceReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "isActive", a.IsActive) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActivatedResourceReference. +func (a *ActivatedResourceReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "isActive": + err = unpopulate(val, "IsActive", &a.IsActive) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AfdPurgeParameters. +func (a AfdPurgeParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentPaths", a.ContentPaths) + populate(objectMap, "domains", a.Domains) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AfdPurgeParameters. +func (a *AfdPurgeParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentPaths": + err = unpopulate(val, "ContentPaths", &a.ContentPaths) + delete(rawMsg, key) + case "domains": + err = unpopulate(val, "Domains", &a.Domains) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AfdRouteCacheConfiguration. +func (a AfdRouteCacheConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "compressionSettings", a.CompressionSettings) + populate(objectMap, "queryParameters", a.QueryParameters) + populate(objectMap, "queryStringCachingBehavior", a.QueryStringCachingBehavior) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AfdRouteCacheConfiguration. +func (a *AfdRouteCacheConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "compressionSettings": + err = unpopulate(val, "CompressionSettings", &a.CompressionSettings) + delete(rawMsg, key) + case "queryParameters": + err = unpopulate(val, "QueryParameters", &a.QueryParameters) + delete(rawMsg, key) + case "queryStringCachingBehavior": + err = unpopulate(val, "QueryStringCachingBehavior", &a.QueryStringCachingBehavior) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirstPartyManagedCertificateParameters. +func (a AzureFirstPartyManagedCertificateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateAuthority", a.CertificateAuthority) + populate(objectMap, "expirationDate", a.ExpirationDate) + populate(objectMap, "secretSource", a.SecretSource) + populate(objectMap, "subject", a.Subject) + populate(objectMap, "subjectAlternativeNames", a.SubjectAlternativeNames) + populate(objectMap, "thumbprint", a.Thumbprint) + objectMap["type"] = SecretTypeAzureFirstPartyManagedCertificate + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirstPartyManagedCertificateParameters. +func (a *AzureFirstPartyManagedCertificateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateAuthority": + err = unpopulate(val, "CertificateAuthority", &a.CertificateAuthority) + delete(rawMsg, key) + case "expirationDate": + err = unpopulate(val, "ExpirationDate", &a.ExpirationDate) + delete(rawMsg, key) + case "secretSource": + err = unpopulate(val, "SecretSource", &a.SecretSource) + delete(rawMsg, key) + case "subject": + err = unpopulate(val, "Subject", &a.Subject) + delete(rawMsg, key) + case "subjectAlternativeNames": + err = unpopulate(val, "SubjectAlternativeNames", &a.SubjectAlternativeNames) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &a.Thumbprint) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheConfiguration. +func (c CacheConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cacheBehavior", c.CacheBehavior) + populate(objectMap, "cacheDuration", c.CacheDuration) + populate(objectMap, "isCompressionEnabled", c.IsCompressionEnabled) + populate(objectMap, "queryParameters", c.QueryParameters) + populate(objectMap, "queryStringCachingBehavior", c.QueryStringCachingBehavior) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheConfiguration. +func (c *CacheConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cacheBehavior": + err = unpopulate(val, "CacheBehavior", &c.CacheBehavior) + delete(rawMsg, key) + case "cacheDuration": + err = unpopulate(val, "CacheDuration", &c.CacheDuration) + delete(rawMsg, key) + case "isCompressionEnabled": + err = unpopulate(val, "IsCompressionEnabled", &c.IsCompressionEnabled) + delete(rawMsg, key) + case "queryParameters": + err = unpopulate(val, "QueryParameters", &c.QueryParameters) + delete(rawMsg, key) + case "queryStringCachingBehavior": + err = unpopulate(val, "QueryStringCachingBehavior", &c.QueryStringCachingBehavior) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheExpirationActionParameters. +func (c CacheExpirationActionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cacheBehavior", c.CacheBehavior) + populate(objectMap, "cacheDuration", c.CacheDuration) + populate(objectMap, "cacheType", c.CacheType) + populate(objectMap, "typeName", c.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheExpirationActionParameters. +func (c *CacheExpirationActionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cacheBehavior": + err = unpopulate(val, "CacheBehavior", &c.CacheBehavior) + delete(rawMsg, key) + case "cacheDuration": + err = unpopulate(val, "CacheDuration", &c.CacheDuration) + delete(rawMsg, key) + case "cacheType": + err = unpopulate(val, "CacheType", &c.CacheType) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &c.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheKeyQueryStringActionParameters. +func (c CacheKeyQueryStringActionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "queryParameters", c.QueryParameters) + populate(objectMap, "queryStringBehavior", c.QueryStringBehavior) + populate(objectMap, "typeName", c.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheKeyQueryStringActionParameters. +func (c *CacheKeyQueryStringActionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "queryParameters": + err = unpopulate(val, "QueryParameters", &c.QueryParameters) + delete(rawMsg, key) + case "queryStringBehavior": + err = unpopulate(val, "QueryStringBehavior", &c.QueryStringBehavior) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &c.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CanMigrateParameters. +func (c CanMigrateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "classicResourceReference", c.ClassicResourceReference) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CanMigrateParameters. +func (c *CanMigrateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "classicResourceReference": + err = unpopulate(val, "ClassicResourceReference", &c.ClassicResourceReference) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CanMigrateProperties. +func (c CanMigrateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "canMigrate", c.CanMigrate) + populate(objectMap, "defaultSku", c.DefaultSKU) + populate(objectMap, "errors", c.Errors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CanMigrateProperties. +func (c *CanMigrateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "canMigrate": + err = unpopulate(val, "CanMigrate", &c.CanMigrate) + delete(rawMsg, key) + case "defaultSku": + err = unpopulate(val, "DefaultSKU", &c.DefaultSKU) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &c.Errors) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CanMigrateResult. +func (c CanMigrateResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CanMigrateResult. +func (c *CanMigrateResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateSourceParameters. +func (c CertificateSourceParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateType", c.CertificateType) + populate(objectMap, "typeName", c.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateSourceParameters. +func (c *CertificateSourceParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateType": + err = unpopulate(val, "CertificateType", &c.CertificateType) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &c.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckEndpointNameAvailabilityInput. +func (c CheckEndpointNameAvailabilityInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoGeneratedDomainNameLabelScope", c.AutoGeneratedDomainNameLabelScope) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckEndpointNameAvailabilityInput. +func (c *CheckEndpointNameAvailabilityInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoGeneratedDomainNameLabelScope": + err = unpopulate(val, "AutoGeneratedDomainNameLabelScope", &c.AutoGeneratedDomainNameLabelScope) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckEndpointNameAvailabilityOutput. +func (c CheckEndpointNameAvailabilityOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableHostname", c.AvailableHostname) + populate(objectMap, "message", c.Message) + populate(objectMap, "nameAvailable", c.NameAvailable) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckEndpointNameAvailabilityOutput. +func (c *CheckEndpointNameAvailabilityOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableHostname": + err = unpopulate(val, "AvailableHostname", &c.AvailableHostname) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &c.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckHostNameAvailabilityInput. +func (c CheckHostNameAvailabilityInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostName", c.HostName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckHostNameAvailabilityInput. +func (c *CheckHostNameAvailabilityInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostName": + err = unpopulate(val, "HostName", &c.HostName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityInput. +func (c CheckNameAvailabilityInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityInput. +func (c *CheckNameAvailabilityInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityOutput. +func (c CheckNameAvailabilityOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", c.Message) + populate(objectMap, "nameAvailable", c.NameAvailable) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityOutput. +func (c *CheckNameAvailabilityOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &c.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CidrIPAddress. +func (c CidrIPAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "baseIpAddress", c.BaseIPAddress) + populate(objectMap, "prefixLength", c.PrefixLength) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CidrIPAddress. +func (c *CidrIPAddress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "baseIpAddress": + err = unpopulate(val, "BaseIPAddress", &c.BaseIPAddress) + delete(rawMsg, key) + case "prefixLength": + err = unpopulate(val, "PrefixLength", &c.PrefixLength) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientPortMatchConditionParameters. +func (c ClientPortMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", c.MatchValues) + populate(objectMap, "negateCondition", c.NegateCondition) + populate(objectMap, "operator", c.Operator) + populate(objectMap, "transforms", c.Transforms) + populate(objectMap, "typeName", c.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientPortMatchConditionParameters. +func (c *ClientPortMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &c.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &c.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &c.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &c.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &c.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems. +func (c Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "dateTime", c.DateTime) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems. +func (c *Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dateTime": + err = unpopulateDateTimeRFC3339(val, "DateTime", &c.DateTime) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems. +func (c Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "dateTime", c.DateTime) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems. +func (c *Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dateTime": + err = unpopulateDateTimeRFC3339(val, "DateTime", &c.DateTime) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems. +func (c ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "metric", c.Metric) + populate(objectMap, "percentage", c.Percentage) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems. +func (c *ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "metric": + err = unpopulate(val, "Metric", &c.Metric) + delete(rawMsg, key) + case "percentage": + err = unpopulate(val, "Percentage", &c.Percentage) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CompressionSettings. +func (c CompressionSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentTypesToCompress", c.ContentTypesToCompress) + populate(objectMap, "isCompressionEnabled", c.IsCompressionEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CompressionSettings. +func (c *CompressionSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentTypesToCompress": + err = unpopulate(val, "ContentTypesToCompress", &c.ContentTypesToCompress) + delete(rawMsg, key) + case "isCompressionEnabled": + err = unpopulate(val, "IsCompressionEnabled", &c.IsCompressionEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContinentsResponse. +func (c ContinentsResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "continents", c.Continents) + populate(objectMap, "countryOrRegions", c.CountryOrRegions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinentsResponse. +func (c *ContinentsResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "continents": + err = unpopulate(val, "Continents", &c.Continents) + delete(rawMsg, key) + case "countryOrRegions": + err = unpopulate(val, "CountryOrRegions", &c.CountryOrRegions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContinentsResponseContinentsItem. +func (c ContinentsResponseContinentsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinentsResponseContinentsItem. +func (c *ContinentsResponseContinentsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContinentsResponseCountryOrRegionsItem. +func (c ContinentsResponseCountryOrRegionsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "continentId", c.ContinentID) + populate(objectMap, "id", c.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContinentsResponseCountryOrRegionsItem. +func (c *ContinentsResponseCountryOrRegionsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "continentId": + err = unpopulate(val, "ContinentID", &c.ContinentID) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CookiesMatchConditionParameters. +func (c CookiesMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", c.MatchValues) + populate(objectMap, "negateCondition", c.NegateCondition) + populate(objectMap, "operator", c.Operator) + populate(objectMap, "selector", c.Selector) + populate(objectMap, "transforms", c.Transforms) + populate(objectMap, "typeName", c.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CookiesMatchConditionParameters. +func (c *CookiesMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &c.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &c.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &c.Operator) + delete(rawMsg, key) + case "selector": + err = unpopulate(val, "Selector", &c.Selector) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &c.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &c.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomain. +func (c CustomDomain) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomain. +func (c *CustomDomain) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomainHTTPSParameters. +func (c CustomDomainHTTPSParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["certificateSource"] = c.CertificateSource + populate(objectMap, "minimumTlsVersion", c.MinimumTLSVersion) + populate(objectMap, "protocolType", c.ProtocolType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainHTTPSParameters. +func (c *CustomDomainHTTPSParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateSource": + err = unpopulate(val, "CertificateSource", &c.CertificateSource) + delete(rawMsg, key) + case "minimumTlsVersion": + err = unpopulate(val, "MinimumTLSVersion", &c.MinimumTLSVersion) + delete(rawMsg, key) + case "protocolType": + err = unpopulate(val, "ProtocolType", &c.ProtocolType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomainListResult. +func (c CustomDomainListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainListResult. +func (c *CustomDomainListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomainParameters. +func (c CustomDomainParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainParameters. +func (c *CustomDomainParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomainProperties. +func (c CustomDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customHttpsParameters", c.CustomHTTPSParameters) + populate(objectMap, "customHttpsProvisioningState", c.CustomHTTPSProvisioningState) + populate(objectMap, "customHttpsProvisioningSubstate", c.CustomHTTPSProvisioningSubstate) + populate(objectMap, "hostName", c.HostName) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "resourceState", c.ResourceState) + populate(objectMap, "validationData", c.ValidationData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainProperties. +func (c *CustomDomainProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customHttpsParameters": + c.CustomHTTPSParameters, err = unmarshalCustomDomainHTTPSParametersClassification(val) + delete(rawMsg, key) + case "customHttpsProvisioningState": + err = unpopulate(val, "CustomHTTPSProvisioningState", &c.CustomHTTPSProvisioningState) + delete(rawMsg, key) + case "customHttpsProvisioningSubstate": + err = unpopulate(val, "CustomHTTPSProvisioningSubstate", &c.CustomHTTPSProvisioningSubstate) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &c.HostName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "resourceState": + err = unpopulate(val, "ResourceState", &c.ResourceState) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &c.ValidationData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDomainPropertiesParameters. +func (c CustomDomainPropertiesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostName", c.HostName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDomainPropertiesParameters. +func (c *CustomDomainPropertiesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostName": + err = unpopulate(val, "HostName", &c.HostName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomRule. +func (c CustomRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", c.Action) + populate(objectMap, "enabledState", c.EnabledState) + populate(objectMap, "matchConditions", c.MatchConditions) + populate(objectMap, "name", c.Name) + populate(objectMap, "priority", c.Priority) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRule. +func (c *CustomRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &c.Action) + delete(rawMsg, key) + case "enabledState": + err = unpopulate(val, "EnabledState", &c.EnabledState) + delete(rawMsg, key) + case "matchConditions": + err = unpopulate(val, "MatchConditions", &c.MatchConditions) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &c.Priority) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomRuleList. +func (c CustomRuleList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rules", c.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomRuleList. +func (c *CustomRuleList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rules": + err = unpopulate(val, "Rules", &c.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomerCertificateParameters. +func (c CustomerCertificateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateAuthority", c.CertificateAuthority) + populate(objectMap, "expirationDate", c.ExpirationDate) + populate(objectMap, "secretSource", c.SecretSource) + populate(objectMap, "secretVersion", c.SecretVersion) + populate(objectMap, "subject", c.Subject) + populate(objectMap, "subjectAlternativeNames", c.SubjectAlternativeNames) + populate(objectMap, "thumbprint", c.Thumbprint) + objectMap["type"] = SecretTypeCustomerCertificate + populate(objectMap, "useLatestVersion", c.UseLatestVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomerCertificateParameters. +func (c *CustomerCertificateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateAuthority": + err = unpopulate(val, "CertificateAuthority", &c.CertificateAuthority) + delete(rawMsg, key) + case "expirationDate": + err = unpopulate(val, "ExpirationDate", &c.ExpirationDate) + delete(rawMsg, key) + case "secretSource": + err = unpopulate(val, "SecretSource", &c.SecretSource) + delete(rawMsg, key) + case "secretVersion": + err = unpopulate(val, "SecretVersion", &c.SecretVersion) + delete(rawMsg, key) + case "subject": + err = unpopulate(val, "Subject", &c.Subject) + delete(rawMsg, key) + case "subjectAlternativeNames": + err = unpopulate(val, "SubjectAlternativeNames", &c.SubjectAlternativeNames) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "useLatestVersion": + err = unpopulate(val, "UseLatestVersion", &c.UseLatestVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeepCreatedCustomDomain. +func (d DeepCreatedCustomDomain) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedCustomDomain. +func (d *DeepCreatedCustomDomain) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeepCreatedCustomDomainProperties. +func (d DeepCreatedCustomDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostName", d.HostName) + populate(objectMap, "validationData", d.ValidationData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedCustomDomainProperties. +func (d *DeepCreatedCustomDomainProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostName": + err = unpopulate(val, "HostName", &d.HostName) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &d.ValidationData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeepCreatedOrigin. +func (d DeepCreatedOrigin) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOrigin. +func (d *DeepCreatedOrigin) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeepCreatedOriginGroup. +func (d DeepCreatedOriginGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOriginGroup. +func (d *DeepCreatedOriginGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeepCreatedOriginGroupProperties. +func (d DeepCreatedOriginGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "healthProbeSettings", d.HealthProbeSettings) + populate(objectMap, "origins", d.Origins) + populate(objectMap, "responseBasedOriginErrorDetectionSettings", d.ResponseBasedOriginErrorDetectionSettings) + populate(objectMap, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", d.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOriginGroupProperties. +func (d *DeepCreatedOriginGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "healthProbeSettings": + err = unpopulate(val, "HealthProbeSettings", &d.HealthProbeSettings) + delete(rawMsg, key) + case "origins": + err = unpopulate(val, "Origins", &d.Origins) + delete(rawMsg, key) + case "responseBasedOriginErrorDetectionSettings": + err = unpopulate(val, "ResponseBasedOriginErrorDetectionSettings", &d.ResponseBasedOriginErrorDetectionSettings) + delete(rawMsg, key) + case "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": + err = unpopulate(val, "TrafficRestorationTimeToHealedOrNewEndpointsInMinutes", &d.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeepCreatedOriginProperties. +func (d DeepCreatedOriginProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", d.Enabled) + populate(objectMap, "httpPort", d.HTTPPort) + populate(objectMap, "httpsPort", d.HTTPSPort) + populate(objectMap, "hostName", d.HostName) + populate(objectMap, "originHostHeader", d.OriginHostHeader) + populate(objectMap, "priority", d.Priority) + populate(objectMap, "privateEndpointStatus", d.PrivateEndpointStatus) + populate(objectMap, "privateLinkAlias", d.PrivateLinkAlias) + populate(objectMap, "privateLinkApprovalMessage", d.PrivateLinkApprovalMessage) + populate(objectMap, "privateLinkLocation", d.PrivateLinkLocation) + populate(objectMap, "privateLinkResourceId", d.PrivateLinkResourceID) + populate(objectMap, "weight", d.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeepCreatedOriginProperties. +func (d *DeepCreatedOriginProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &d.Enabled) + delete(rawMsg, key) + case "httpPort": + err = unpopulate(val, "HTTPPort", &d.HTTPPort) + delete(rawMsg, key) + case "httpsPort": + err = unpopulate(val, "HTTPSPort", &d.HTTPSPort) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &d.HostName) + delete(rawMsg, key) + case "originHostHeader": + err = unpopulate(val, "OriginHostHeader", &d.OriginHostHeader) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &d.Priority) + delete(rawMsg, key) + case "privateEndpointStatus": + err = unpopulate(val, "PrivateEndpointStatus", &d.PrivateEndpointStatus) + delete(rawMsg, key) + case "privateLinkAlias": + err = unpopulate(val, "PrivateLinkAlias", &d.PrivateLinkAlias) + delete(rawMsg, key) + case "privateLinkApprovalMessage": + err = unpopulate(val, "PrivateLinkApprovalMessage", &d.PrivateLinkApprovalMessage) + delete(rawMsg, key) + case "privateLinkLocation": + err = unpopulate(val, "PrivateLinkLocation", &d.PrivateLinkLocation) + delete(rawMsg, key) + case "privateLinkResourceId": + err = unpopulate(val, "PrivateLinkResourceID", &d.PrivateLinkResourceID) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &d.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRule. +func (d DeliveryRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actions", d.Actions) + populate(objectMap, "conditions", d.Conditions) + populate(objectMap, "name", d.Name) + populate(objectMap, "order", d.Order) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRule. +func (d *DeliveryRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actions": + d.Actions, err = unmarshalDeliveryRuleActionAutoGeneratedClassificationArray(val) + delete(rawMsg, key) + case "conditions": + d.Conditions, err = unmarshalDeliveryRuleConditionClassificationArray(val) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "order": + err = unpopulate(val, "Order", &d.Order) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleActionAutoGenerated. +func (d DeliveryRuleActionAutoGenerated) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = d.Name + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleActionAutoGenerated. +func (d *DeliveryRuleActionAutoGenerated) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCacheExpirationAction. +func (d DeliveryRuleCacheExpirationAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = DeliveryRuleActionCacheExpiration + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCacheExpirationAction. +func (d *DeliveryRuleCacheExpirationAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCacheKeyQueryStringAction. +func (d DeliveryRuleCacheKeyQueryStringAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = DeliveryRuleActionCacheKeyQueryString + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCacheKeyQueryStringAction. +func (d *DeliveryRuleCacheKeyQueryStringAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleClientPortCondition. +func (d DeliveryRuleClientPortCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableClientPort + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleClientPortCondition. +func (d *DeliveryRuleClientPortCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCondition. +func (d DeliveryRuleCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = d.Name + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCondition. +func (d *DeliveryRuleCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleCookiesCondition. +func (d DeliveryRuleCookiesCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableCookies + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleCookiesCondition. +func (d *DeliveryRuleCookiesCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleHTTPVersionCondition. +func (d DeliveryRuleHTTPVersionCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableHTTPVersion + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleHTTPVersionCondition. +func (d *DeliveryRuleHTTPVersionCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleHostNameCondition. +func (d DeliveryRuleHostNameCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableHostName + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleHostNameCondition. +func (d *DeliveryRuleHostNameCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleIsDeviceCondition. +func (d DeliveryRuleIsDeviceCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableIsDevice + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleIsDeviceCondition. +func (d *DeliveryRuleIsDeviceCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRulePostArgsCondition. +func (d DeliveryRulePostArgsCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariablePostArgs + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRulePostArgsCondition. +func (d *DeliveryRulePostArgsCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleQueryStringCondition. +func (d DeliveryRuleQueryStringCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableQueryString + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleQueryStringCondition. +func (d *DeliveryRuleQueryStringCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRemoteAddressCondition. +func (d DeliveryRuleRemoteAddressCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableRemoteAddress + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRemoteAddressCondition. +func (d *DeliveryRuleRemoteAddressCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestBodyCondition. +func (d DeliveryRuleRequestBodyCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableRequestBody + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestBodyCondition. +func (d *DeliveryRuleRequestBodyCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestHeaderAction. +func (d DeliveryRuleRequestHeaderAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = DeliveryRuleActionModifyRequestHeader + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestHeaderAction. +func (d *DeliveryRuleRequestHeaderAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestHeaderCondition. +func (d DeliveryRuleRequestHeaderCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableRequestHeader + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestHeaderCondition. +func (d *DeliveryRuleRequestHeaderCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestMethodCondition. +func (d DeliveryRuleRequestMethodCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableRequestMethod + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestMethodCondition. +func (d *DeliveryRuleRequestMethodCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestSchemeCondition. +func (d DeliveryRuleRequestSchemeCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableRequestScheme + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestSchemeCondition. +func (d *DeliveryRuleRequestSchemeCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRequestURICondition. +func (d DeliveryRuleRequestURICondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableRequestURI + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRequestURICondition. +func (d *DeliveryRuleRequestURICondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleResponseHeaderAction. +func (d DeliveryRuleResponseHeaderAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = DeliveryRuleActionModifyResponseHeader + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleResponseHeaderAction. +func (d *DeliveryRuleResponseHeaderAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleRouteConfigurationOverrideAction. +func (d DeliveryRuleRouteConfigurationOverrideAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = DeliveryRuleActionRouteConfigurationOverride + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleRouteConfigurationOverrideAction. +func (d *DeliveryRuleRouteConfigurationOverrideAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleSSLProtocolCondition. +func (d DeliveryRuleSSLProtocolCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableSSLProtocol + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleSSLProtocolCondition. +func (d *DeliveryRuleSSLProtocolCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleServerPortCondition. +func (d DeliveryRuleServerPortCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableServerPort + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleServerPortCondition. +func (d *DeliveryRuleServerPortCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleSocketAddrCondition. +func (d DeliveryRuleSocketAddrCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableSocketAddr + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleSocketAddrCondition. +func (d *DeliveryRuleSocketAddrCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleURLFileExtensionCondition. +func (d DeliveryRuleURLFileExtensionCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableURLFileExtension + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleURLFileExtensionCondition. +func (d *DeliveryRuleURLFileExtensionCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleURLFileNameCondition. +func (d DeliveryRuleURLFileNameCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableURLFileName + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleURLFileNameCondition. +func (d *DeliveryRuleURLFileNameCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeliveryRuleURLPathCondition. +func (d DeliveryRuleURLPathCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = MatchVariableURLPath + populate(objectMap, "parameters", d.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeliveryRuleURLPathCondition. +func (d *DeliveryRuleURLPathCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DimensionProperties. +func (d DimensionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "internalName", d.InternalName) + populate(objectMap, "name", d.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DimensionProperties. +func (d *DimensionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "internalName": + err = unpopulate(val, "InternalName", &d.InternalName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DomainValidationProperties. +func (d DomainValidationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expirationDate", d.ExpirationDate) + populate(objectMap, "validationToken", d.ValidationToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DomainValidationProperties. +func (d *DomainValidationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expirationDate": + err = unpopulate(val, "ExpirationDate", &d.ExpirationDate) + delete(rawMsg, key) + case "validationToken": + err = unpopulate(val, "ValidationToken", &d.ValidationToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EdgeNode. +func (e EdgeNode) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "systemData", e.SystemData) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EdgeNode. +func (e *EdgeNode) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &e.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EdgeNodeProperties. +func (e EdgeNodeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddressGroups", e.IPAddressGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EdgeNodeProperties. +func (e *EdgeNodeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddressGroups": + err = unpopulate(val, "IPAddressGroups", &e.IPAddressGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EdgenodeResult. +func (e EdgenodeResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EdgenodeResult. +func (e *EdgenodeResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Endpoint. +func (e Endpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "systemData", e.SystemData) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Endpoint. +func (e *Endpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &e.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointListResult. +func (e EndpointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointListResult. +func (e *EndpointListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointProperties. +func (e EndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentTypesToCompress", e.ContentTypesToCompress) + populate(objectMap, "customDomains", e.CustomDomains) + populate(objectMap, "defaultOriginGroup", e.DefaultOriginGroup) + populate(objectMap, "deliveryPolicy", e.DeliveryPolicy) + populate(objectMap, "geoFilters", e.GeoFilters) + populate(objectMap, "hostName", e.HostName) + populate(objectMap, "isCompressionEnabled", e.IsCompressionEnabled) + populate(objectMap, "isHttpAllowed", e.IsHTTPAllowed) + populate(objectMap, "isHttpsAllowed", e.IsHTTPSAllowed) + populate(objectMap, "optimizationType", e.OptimizationType) + populate(objectMap, "originGroups", e.OriginGroups) + populate(objectMap, "originHostHeader", e.OriginHostHeader) + populate(objectMap, "originPath", e.OriginPath) + populate(objectMap, "origins", e.Origins) + populate(objectMap, "probePath", e.ProbePath) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "queryStringCachingBehavior", e.QueryStringCachingBehavior) + populate(objectMap, "resourceState", e.ResourceState) + populate(objectMap, "urlSigningKeys", e.URLSigningKeys) + populate(objectMap, "webApplicationFirewallPolicyLink", e.WebApplicationFirewallPolicyLink) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointProperties. +func (e *EndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentTypesToCompress": + err = unpopulate(val, "ContentTypesToCompress", &e.ContentTypesToCompress) + delete(rawMsg, key) + case "customDomains": + err = unpopulate(val, "CustomDomains", &e.CustomDomains) + delete(rawMsg, key) + case "defaultOriginGroup": + err = unpopulate(val, "DefaultOriginGroup", &e.DefaultOriginGroup) + delete(rawMsg, key) + case "deliveryPolicy": + err = unpopulate(val, "DeliveryPolicy", &e.DeliveryPolicy) + delete(rawMsg, key) + case "geoFilters": + err = unpopulate(val, "GeoFilters", &e.GeoFilters) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &e.HostName) + delete(rawMsg, key) + case "isCompressionEnabled": + err = unpopulate(val, "IsCompressionEnabled", &e.IsCompressionEnabled) + delete(rawMsg, key) + case "isHttpAllowed": + err = unpopulate(val, "IsHTTPAllowed", &e.IsHTTPAllowed) + delete(rawMsg, key) + case "isHttpsAllowed": + err = unpopulate(val, "IsHTTPSAllowed", &e.IsHTTPSAllowed) + delete(rawMsg, key) + case "optimizationType": + err = unpopulate(val, "OptimizationType", &e.OptimizationType) + delete(rawMsg, key) + case "originGroups": + err = unpopulate(val, "OriginGroups", &e.OriginGroups) + delete(rawMsg, key) + case "originHostHeader": + err = unpopulate(val, "OriginHostHeader", &e.OriginHostHeader) + delete(rawMsg, key) + case "originPath": + err = unpopulate(val, "OriginPath", &e.OriginPath) + delete(rawMsg, key) + case "origins": + err = unpopulate(val, "Origins", &e.Origins) + delete(rawMsg, key) + case "probePath": + err = unpopulate(val, "ProbePath", &e.ProbePath) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "queryStringCachingBehavior": + err = unpopulate(val, "QueryStringCachingBehavior", &e.QueryStringCachingBehavior) + delete(rawMsg, key) + case "resourceState": + err = unpopulate(val, "ResourceState", &e.ResourceState) + delete(rawMsg, key) + case "urlSigningKeys": + err = unpopulate(val, "URLSigningKeys", &e.URLSigningKeys) + delete(rawMsg, key) + case "webApplicationFirewallPolicyLink": + err = unpopulate(val, "WebApplicationFirewallPolicyLink", &e.WebApplicationFirewallPolicyLink) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesUpdateParameters. +func (e EndpointPropertiesUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentTypesToCompress", e.ContentTypesToCompress) + populate(objectMap, "defaultOriginGroup", e.DefaultOriginGroup) + populate(objectMap, "deliveryPolicy", e.DeliveryPolicy) + populate(objectMap, "geoFilters", e.GeoFilters) + populate(objectMap, "isCompressionEnabled", e.IsCompressionEnabled) + populate(objectMap, "isHttpAllowed", e.IsHTTPAllowed) + populate(objectMap, "isHttpsAllowed", e.IsHTTPSAllowed) + populate(objectMap, "optimizationType", e.OptimizationType) + populate(objectMap, "originHostHeader", e.OriginHostHeader) + populate(objectMap, "originPath", e.OriginPath) + populate(objectMap, "probePath", e.ProbePath) + populate(objectMap, "queryStringCachingBehavior", e.QueryStringCachingBehavior) + populate(objectMap, "urlSigningKeys", e.URLSigningKeys) + populate(objectMap, "webApplicationFirewallPolicyLink", e.WebApplicationFirewallPolicyLink) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointPropertiesUpdateParameters. +func (e *EndpointPropertiesUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentTypesToCompress": + err = unpopulate(val, "ContentTypesToCompress", &e.ContentTypesToCompress) + delete(rawMsg, key) + case "defaultOriginGroup": + err = unpopulate(val, "DefaultOriginGroup", &e.DefaultOriginGroup) + delete(rawMsg, key) + case "deliveryPolicy": + err = unpopulate(val, "DeliveryPolicy", &e.DeliveryPolicy) + delete(rawMsg, key) + case "geoFilters": + err = unpopulate(val, "GeoFilters", &e.GeoFilters) + delete(rawMsg, key) + case "isCompressionEnabled": + err = unpopulate(val, "IsCompressionEnabled", &e.IsCompressionEnabled) + delete(rawMsg, key) + case "isHttpAllowed": + err = unpopulate(val, "IsHTTPAllowed", &e.IsHTTPAllowed) + delete(rawMsg, key) + case "isHttpsAllowed": + err = unpopulate(val, "IsHTTPSAllowed", &e.IsHTTPSAllowed) + delete(rawMsg, key) + case "optimizationType": + err = unpopulate(val, "OptimizationType", &e.OptimizationType) + delete(rawMsg, key) + case "originHostHeader": + err = unpopulate(val, "OriginHostHeader", &e.OriginHostHeader) + delete(rawMsg, key) + case "originPath": + err = unpopulate(val, "OriginPath", &e.OriginPath) + delete(rawMsg, key) + case "probePath": + err = unpopulate(val, "ProbePath", &e.ProbePath) + delete(rawMsg, key) + case "queryStringCachingBehavior": + err = unpopulate(val, "QueryStringCachingBehavior", &e.QueryStringCachingBehavior) + delete(rawMsg, key) + case "urlSigningKeys": + err = unpopulate(val, "URLSigningKeys", &e.URLSigningKeys) + delete(rawMsg, key) + case "webApplicationFirewallPolicyLink": + err = unpopulate(val, "WebApplicationFirewallPolicyLink", &e.WebApplicationFirewallPolicyLink) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesUpdateParametersDeliveryPolicy. +func (e EndpointPropertiesUpdateParametersDeliveryPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", e.Description) + populate(objectMap, "rules", e.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointPropertiesUpdateParametersDeliveryPolicy. +func (e *EndpointPropertiesUpdateParametersDeliveryPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &e.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink. +func (e EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink. +func (e *EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointUpdateParameters. +func (e EndpointUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointUpdateParameters. +func (e *EndpointUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GeoFilter. +func (g GeoFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", g.Action) + populate(objectMap, "countryCodes", g.CountryCodes) + populate(objectMap, "relativePath", g.RelativePath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GeoFilter. +func (g *GeoFilter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &g.Action) + delete(rawMsg, key) + case "countryCodes": + err = unpopulate(val, "CountryCodes", &g.CountryCodes) + delete(rawMsg, key) + case "relativePath": + err = unpopulate(val, "RelativePath", &g.RelativePath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPErrorRangeParameters. +func (h HTTPErrorRangeParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "begin", h.Begin) + populate(objectMap, "end", h.End) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPErrorRangeParameters. +func (h *HTTPErrorRangeParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "begin": + err = unpopulate(val, "Begin", &h.Begin) + delete(rawMsg, key) + case "end": + err = unpopulate(val, "End", &h.End) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPVersionMatchConditionParameters. +func (h HTTPVersionMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", h.MatchValues) + populate(objectMap, "negateCondition", h.NegateCondition) + populate(objectMap, "operator", h.Operator) + populate(objectMap, "transforms", h.Transforms) + populate(objectMap, "typeName", h.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPVersionMatchConditionParameters. +func (h *HTTPVersionMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &h.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &h.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &h.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &h.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &h.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HeaderActionParameters. +func (h HeaderActionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "headerAction", h.HeaderAction) + populate(objectMap, "headerName", h.HeaderName) + populate(objectMap, "typeName", h.TypeName) + populate(objectMap, "value", h.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HeaderActionParameters. +func (h *HeaderActionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "headerAction": + err = unpopulate(val, "HeaderAction", &h.HeaderAction) + delete(rawMsg, key) + case "headerName": + err = unpopulate(val, "HeaderName", &h.HeaderName) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &h.TypeName) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &h.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HealthProbeParameters. +func (h HealthProbeParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "probeIntervalInSeconds", h.ProbeIntervalInSeconds) + populate(objectMap, "probePath", h.ProbePath) + populate(objectMap, "probeProtocol", h.ProbeProtocol) + populate(objectMap, "probeRequestType", h.ProbeRequestType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HealthProbeParameters. +func (h *HealthProbeParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "probeIntervalInSeconds": + err = unpopulate(val, "ProbeIntervalInSeconds", &h.ProbeIntervalInSeconds) + delete(rawMsg, key) + case "probePath": + err = unpopulate(val, "ProbePath", &h.ProbePath) + delete(rawMsg, key) + case "probeProtocol": + err = unpopulate(val, "ProbeProtocol", &h.ProbeProtocol) + delete(rawMsg, key) + case "probeRequestType": + err = unpopulate(val, "ProbeRequestType", &h.ProbeRequestType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostNameMatchConditionParameters. +func (h HostNameMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", h.MatchValues) + populate(objectMap, "negateCondition", h.NegateCondition) + populate(objectMap, "operator", h.Operator) + populate(objectMap, "transforms", h.Transforms) + populate(objectMap, "typeName", h.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostNameMatchConditionParameters. +func (h *HostNameMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &h.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &h.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &h.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &h.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &h.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPAddressGroup. +func (i IPAddressGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deliveryRegion", i.DeliveryRegion) + populate(objectMap, "ipv4Addresses", i.IPv4Addresses) + populate(objectMap, "ipv6Addresses", i.IPv6Addresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressGroup. +func (i *IPAddressGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deliveryRegion": + err = unpopulate(val, "DeliveryRegion", &i.DeliveryRegion) + delete(rawMsg, key) + case "ipv4Addresses": + err = unpopulate(val, "IPv4Addresses", &i.IPv4Addresses) + delete(rawMsg, key) + case "ipv6Addresses": + err = unpopulate(val, "IPv6Addresses", &i.IPv6Addresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IsDeviceMatchConditionParameters. +func (i IsDeviceMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", i.MatchValues) + populate(objectMap, "negateCondition", i.NegateCondition) + populate(objectMap, "operator", i.Operator) + populate(objectMap, "transforms", i.Transforms) + populate(objectMap, "typeName", i.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IsDeviceMatchConditionParameters. +func (i *IsDeviceMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &i.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &i.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &i.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &i.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &i.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultCertificateSourceParameters. +func (k KeyVaultCertificateSourceParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deleteRule", k.DeleteRule) + populate(objectMap, "resourceGroupName", k.ResourceGroupName) + populate(objectMap, "secretName", k.SecretName) + populate(objectMap, "secretVersion", k.SecretVersion) + populate(objectMap, "subscriptionId", k.SubscriptionID) + populate(objectMap, "typeName", k.TypeName) + populate(objectMap, "updateRule", k.UpdateRule) + populate(objectMap, "vaultName", k.VaultName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultCertificateSourceParameters. +func (k *KeyVaultCertificateSourceParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deleteRule": + err = unpopulate(val, "DeleteRule", &k.DeleteRule) + delete(rawMsg, key) + case "resourceGroupName": + err = unpopulate(val, "ResourceGroupName", &k.ResourceGroupName) + delete(rawMsg, key) + case "secretName": + err = unpopulate(val, "SecretName", &k.SecretName) + delete(rawMsg, key) + case "secretVersion": + err = unpopulate(val, "SecretVersion", &k.SecretVersion) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &k.SubscriptionID) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &k.TypeName) + delete(rawMsg, key) + case "updateRule": + err = unpopulate(val, "UpdateRule", &k.UpdateRule) + delete(rawMsg, key) + case "vaultName": + err = unpopulate(val, "VaultName", &k.VaultName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultSigningKeyParameters. +func (k KeyVaultSigningKeyParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceGroupName", k.ResourceGroupName) + populate(objectMap, "secretName", k.SecretName) + populate(objectMap, "secretVersion", k.SecretVersion) + populate(objectMap, "subscriptionId", k.SubscriptionID) + populate(objectMap, "typeName", k.TypeName) + populate(objectMap, "vaultName", k.VaultName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultSigningKeyParameters. +func (k *KeyVaultSigningKeyParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceGroupName": + err = unpopulate(val, "ResourceGroupName", &k.ResourceGroupName) + delete(rawMsg, key) + case "secretName": + err = unpopulate(val, "SecretName", &k.SecretName) + delete(rawMsg, key) + case "secretVersion": + err = unpopulate(val, "SecretVersion", &k.SecretVersion) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &k.SubscriptionID) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &k.TypeName) + delete(rawMsg, key) + case "vaultName": + err = unpopulate(val, "VaultName", &k.VaultName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LinkedEndpoint. +func (l LinkedEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", l.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LinkedEndpoint. +func (l *LinkedEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancingSettingsParameters. +func (l LoadBalancingSettingsParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalLatencyInMilliseconds", l.AdditionalLatencyInMilliseconds) + populate(objectMap, "sampleSize", l.SampleSize) + populate(objectMap, "successfulSamplesRequired", l.SuccessfulSamplesRequired) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingSettingsParameters. +func (l *LoadBalancingSettingsParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalLatencyInMilliseconds": + err = unpopulate(val, "AdditionalLatencyInMilliseconds", &l.AdditionalLatencyInMilliseconds) + delete(rawMsg, key) + case "sampleSize": + err = unpopulate(val, "SampleSize", &l.SampleSize) + delete(rawMsg, key) + case "successfulSamplesRequired": + err = unpopulate(val, "SuccessfulSamplesRequired", &l.SuccessfulSamplesRequired) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadParameters. +func (l LoadParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentPaths", l.ContentPaths) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadParameters. +func (l *LoadParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentPaths": + err = unpopulate(val, "ContentPaths", &l.ContentPaths) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", l.BlobDuration) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "logFilterPattern", l.LogFilterPattern) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &l.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "logFilterPattern": + err = unpopulate(val, "LogFilterPattern", &l.LogFilterPattern) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedCertificateParameters. +func (m ManagedCertificateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expirationDate", m.ExpirationDate) + populate(objectMap, "subject", m.Subject) + objectMap["type"] = SecretTypeManagedCertificate + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCertificateParameters. +func (m *ManagedCertificateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expirationDate": + err = unpopulate(val, "ExpirationDate", &m.ExpirationDate) + delete(rawMsg, key) + case "subject": + err = unpopulate(val, "Subject", &m.Subject) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedHTTPSParameters. +func (m ManagedHTTPSParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["certificateSource"] = CertificateSourceCdn + populate(objectMap, "certificateSourceParameters", m.CertificateSourceParameters) + populate(objectMap, "minimumTlsVersion", m.MinimumTLSVersion) + populate(objectMap, "protocolType", m.ProtocolType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHTTPSParameters. +func (m *ManagedHTTPSParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateSource": + err = unpopulate(val, "CertificateSource", &m.CertificateSource) + delete(rawMsg, key) + case "certificateSourceParameters": + err = unpopulate(val, "CertificateSourceParameters", &m.CertificateSourceParameters) + delete(rawMsg, key) + case "minimumTlsVersion": + err = unpopulate(val, "MinimumTLSVersion", &m.MinimumTLSVersion) + delete(rawMsg, key) + case "protocolType": + err = unpopulate(val, "ProtocolType", &m.ProtocolType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleDefinition. +func (m ManagedRuleDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + populate(objectMap, "ruleId", m.RuleID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleDefinition. +func (m *ManagedRuleDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "ruleId": + err = unpopulate(val, "RuleID", &m.RuleID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupDefinition. +func (m ManagedRuleGroupDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + populate(objectMap, "ruleGroupName", m.RuleGroupName) + populate(objectMap, "rules", m.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleGroupDefinition. +func (m *ManagedRuleGroupDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "ruleGroupName": + err = unpopulate(val, "RuleGroupName", &m.RuleGroupName) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &m.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupOverride. +func (m ManagedRuleGroupOverride) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ruleGroupName", m.RuleGroupName) + populate(objectMap, "rules", m.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleGroupOverride. +func (m *ManagedRuleGroupOverride) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ruleGroupName": + err = unpopulate(val, "RuleGroupName", &m.RuleGroupName) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &m.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleOverride. +func (m ManagedRuleOverride) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", m.Action) + populate(objectMap, "enabledState", m.EnabledState) + populate(objectMap, "ruleId", m.RuleID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleOverride. +func (m *ManagedRuleOverride) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &m.Action) + delete(rawMsg, key) + case "enabledState": + err = unpopulate(val, "EnabledState", &m.EnabledState) + delete(rawMsg, key) + case "ruleId": + err = unpopulate(val, "RuleID", &m.RuleID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSet. +func (m ManagedRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "anomalyScore", m.AnomalyScore) + populate(objectMap, "ruleGroupOverrides", m.RuleGroupOverrides) + populate(objectMap, "ruleSetType", m.RuleSetType) + populate(objectMap, "ruleSetVersion", m.RuleSetVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSet. +func (m *ManagedRuleSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "anomalyScore": + err = unpopulate(val, "AnomalyScore", &m.AnomalyScore) + delete(rawMsg, key) + case "ruleGroupOverrides": + err = unpopulate(val, "RuleGroupOverrides", &m.RuleGroupOverrides) + delete(rawMsg, key) + case "ruleSetType": + err = unpopulate(val, "RuleSetType", &m.RuleSetType) + delete(rawMsg, key) + case "ruleSetVersion": + err = unpopulate(val, "RuleSetVersion", &m.RuleSetVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinition. +func (m ManagedRuleSetDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinition. +func (m *ManagedRuleSetDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinitionList. +func (m ManagedRuleSetDefinitionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinitionList. +func (m *ManagedRuleSetDefinitionList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetDefinitionProperties. +func (m ManagedRuleSetDefinitionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "ruleGroups", m.RuleGroups) + populate(objectMap, "ruleSetType", m.RuleSetType) + populate(objectMap, "ruleSetVersion", m.RuleSetVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetDefinitionProperties. +func (m *ManagedRuleSetDefinitionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "ruleGroups": + err = unpopulate(val, "RuleGroups", &m.RuleGroups) + delete(rawMsg, key) + case "ruleSetType": + err = unpopulate(val, "RuleSetType", &m.RuleSetType) + delete(rawMsg, key) + case "ruleSetVersion": + err = unpopulate(val, "RuleSetVersion", &m.RuleSetVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSetList. +func (m ManagedRuleSetList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "managedRuleSets", m.ManagedRuleSets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSetList. +func (m *ManagedRuleSetList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "managedRuleSets": + err = unpopulate(val, "ManagedRuleSets", &m.ManagedRuleSets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MatchCondition. +func (m MatchCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValue", m.MatchValue) + populate(objectMap, "matchVariable", m.MatchVariable) + populate(objectMap, "negateCondition", m.NegateCondition) + populate(objectMap, "operator", m.Operator) + populate(objectMap, "selector", m.Selector) + populate(objectMap, "transforms", m.Transforms) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MatchCondition. +func (m *MatchCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValue": + err = unpopulate(val, "MatchValue", &m.MatchValue) + delete(rawMsg, key) + case "matchVariable": + err = unpopulate(val, "MatchVariable", &m.MatchVariable) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &m.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &m.Operator) + delete(rawMsg, key) + case "selector": + err = unpopulate(val, "Selector", &m.Selector) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &m.Transforms) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricAvailability. +func (m MetricAvailability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", m.BlobDuration) + populate(objectMap, "timeGrain", m.TimeGrain) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAvailability. +func (m *MetricAvailability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &m.BlobDuration) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &m.TimeGrain) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "availabilities", m.Availabilities) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "isInternal", m.IsInternal) + populate(objectMap, "metricFilterPattern", m.MetricFilterPattern) + populate(objectMap, "name", m.Name) + populate(objectMap, "supportedTimeGrainTypes", m.SupportedTimeGrainTypes) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "availabilities": + err = unpopulate(val, "Availabilities", &m.Availabilities) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "fillGapWithZero": + err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) + delete(rawMsg, key) + case "isInternal": + err = unpopulate(val, "IsInternal", &m.IsInternal) + delete(rawMsg, key) + case "metricFilterPattern": + err = unpopulate(val, "MetricFilterPattern", &m.MetricFilterPattern) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "supportedTimeGrainTypes": + err = unpopulate(val, "SupportedTimeGrainTypes", &m.SupportedTimeGrainTypes) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricsResponse. +func (m MetricsResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "dateTimeBegin", m.DateTimeBegin) + populateDateTimeRFC3339(objectMap, "dateTimeEnd", m.DateTimeEnd) + populate(objectMap, "granularity", m.Granularity) + populate(objectMap, "series", m.Series) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricsResponse. +func (m *MetricsResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dateTimeBegin": + err = unpopulateDateTimeRFC3339(val, "DateTimeBegin", &m.DateTimeBegin) + delete(rawMsg, key) + case "dateTimeEnd": + err = unpopulateDateTimeRFC3339(val, "DateTimeEnd", &m.DateTimeEnd) + delete(rawMsg, key) + case "granularity": + err = unpopulate(val, "Granularity", &m.Granularity) + delete(rawMsg, key) + case "series": + err = unpopulate(val, "Series", &m.Series) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricsResponseSeriesItem. +func (m MetricsResponseSeriesItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", m.Data) + populate(objectMap, "groups", m.Groups) + populate(objectMap, "metric", m.Metric) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricsResponseSeriesItem. +func (m *MetricsResponseSeriesItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &m.Data) + delete(rawMsg, key) + case "groups": + err = unpopulate(val, "Groups", &m.Groups) + delete(rawMsg, key) + case "metric": + err = unpopulate(val, "Metric", &m.Metric) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricsResponseSeriesPropertiesItemsItem. +func (m MetricsResponseSeriesPropertiesItemsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", m.Name) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricsResponseSeriesPropertiesItemsItem. +func (m *MetricsResponseSeriesPropertiesItemsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateResult. +func (m MigrateResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateResult. +func (m *MigrateResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateResultProperties. +func (m MigrateResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "migratedProfileResourceId", m.MigratedProfileResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateResultProperties. +func (m *MigrateResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "migratedProfileResourceId": + err = unpopulate(val, "MigratedProfileResourceID", &m.MigratedProfileResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationErrorType. +func (m MigrationErrorType) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", m.Code) + populate(objectMap, "errorMessage", m.ErrorMessage) + populate(objectMap, "nextSteps", m.NextSteps) + populate(objectMap, "resourceName", m.ResourceName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationErrorType. +func (m *MigrationErrorType) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &m.Code) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &m.ErrorMessage) + delete(rawMsg, key) + case "nextSteps": + err = unpopulate(val, "NextSteps", &m.NextSteps) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &m.ResourceName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationParameters. +func (m MigrationParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "classicResourceReference", m.ClassicResourceReference) + populate(objectMap, "migrationWebApplicationFirewallMappings", m.MigrationWebApplicationFirewallMappings) + populate(objectMap, "profileName", m.ProfileName) + populate(objectMap, "sku", m.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationParameters. +func (m *MigrationParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "classicResourceReference": + err = unpopulate(val, "ClassicResourceReference", &m.ClassicResourceReference) + delete(rawMsg, key) + case "migrationWebApplicationFirewallMappings": + err = unpopulate(val, "MigrationWebApplicationFirewallMappings", &m.MigrationWebApplicationFirewallMappings) + delete(rawMsg, key) + case "profileName": + err = unpopulate(val, "ProfileName", &m.ProfileName) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationWebApplicationFirewallMapping. +func (m MigrationWebApplicationFirewallMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "migratedFrom", m.MigratedFrom) + populate(objectMap, "migratedTo", m.MigratedTo) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationWebApplicationFirewallMapping. +func (m *MigrationWebApplicationFirewallMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "migratedFrom": + err = unpopulate(val, "MigratedFrom", &m.MigratedFrom) + delete(rawMsg, key) + case "migratedTo": + err = unpopulate(val, "MigratedTo", &m.MigratedTo) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "isDataAction", o.IsDataAction) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.OperationProperties) + populate(objectMap, "origin", o.Origin) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &o.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "OperationProperties", &o.OperationProperties) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationProperties. +func (o OperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. +func (o *OperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationsListResult. +func (o OperationsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsListResult. +func (o *OperationsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Origin. +func (o Origin) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "systemData", o.SystemData) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Origin. +func (o *Origin) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &o.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginGroup. +func (o OriginGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "systemData", o.SystemData) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroup. +func (o *OriginGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &o.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginGroupListResult. +func (o OriginGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupListResult. +func (o *OriginGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginGroupOverride. +func (o OriginGroupOverride) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "forwardingProtocol", o.ForwardingProtocol) + populate(objectMap, "originGroup", o.OriginGroup) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupOverride. +func (o *OriginGroupOverride) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "forwardingProtocol": + err = unpopulate(val, "ForwardingProtocol", &o.ForwardingProtocol) + delete(rawMsg, key) + case "originGroup": + err = unpopulate(val, "OriginGroup", &o.OriginGroup) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginGroupOverrideAction. +func (o OriginGroupOverrideAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = DeliveryRuleActionOriginGroupOverride + populate(objectMap, "parameters", o.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupOverrideAction. +func (o *OriginGroupOverrideAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &o.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginGroupOverrideActionParameters. +func (o OriginGroupOverrideActionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "originGroup", o.OriginGroup) + populate(objectMap, "typeName", o.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupOverrideActionParameters. +func (o *OriginGroupOverrideActionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "originGroup": + err = unpopulate(val, "OriginGroup", &o.OriginGroup) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &o.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginGroupProperties. +func (o OriginGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "healthProbeSettings", o.HealthProbeSettings) + populate(objectMap, "origins", o.Origins) + populate(objectMap, "provisioningState", o.ProvisioningState) + populate(objectMap, "resourceState", o.ResourceState) + populate(objectMap, "responseBasedOriginErrorDetectionSettings", o.ResponseBasedOriginErrorDetectionSettings) + populate(objectMap, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", o.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupProperties. +func (o *OriginGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "healthProbeSettings": + err = unpopulate(val, "HealthProbeSettings", &o.HealthProbeSettings) + delete(rawMsg, key) + case "origins": + err = unpopulate(val, "Origins", &o.Origins) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) + delete(rawMsg, key) + case "resourceState": + err = unpopulate(val, "ResourceState", &o.ResourceState) + delete(rawMsg, key) + case "responseBasedOriginErrorDetectionSettings": + err = unpopulate(val, "ResponseBasedOriginErrorDetectionSettings", &o.ResponseBasedOriginErrorDetectionSettings) + delete(rawMsg, key) + case "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": + err = unpopulate(val, "TrafficRestorationTimeToHealedOrNewEndpointsInMinutes", &o.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginGroupUpdateParameters. +func (o OriginGroupUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupUpdateParameters. +func (o *OriginGroupUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginGroupUpdatePropertiesParameters. +func (o OriginGroupUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "healthProbeSettings", o.HealthProbeSettings) + populate(objectMap, "origins", o.Origins) + populate(objectMap, "responseBasedOriginErrorDetectionSettings", o.ResponseBasedOriginErrorDetectionSettings) + populate(objectMap, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes", o.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginGroupUpdatePropertiesParameters. +func (o *OriginGroupUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "healthProbeSettings": + err = unpopulate(val, "HealthProbeSettings", &o.HealthProbeSettings) + delete(rawMsg, key) + case "origins": + err = unpopulate(val, "Origins", &o.Origins) + delete(rawMsg, key) + case "responseBasedOriginErrorDetectionSettings": + err = unpopulate(val, "ResponseBasedOriginErrorDetectionSettings", &o.ResponseBasedOriginErrorDetectionSettings) + delete(rawMsg, key) + case "trafficRestorationTimeToHealedOrNewEndpointsInMinutes": + err = unpopulate(val, "TrafficRestorationTimeToHealedOrNewEndpointsInMinutes", &o.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginListResult. +func (o OriginListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginListResult. +func (o *OriginListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginProperties. +func (o OriginProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", o.Enabled) + populate(objectMap, "httpPort", o.HTTPPort) + populate(objectMap, "httpsPort", o.HTTPSPort) + populate(objectMap, "hostName", o.HostName) + populate(objectMap, "originHostHeader", o.OriginHostHeader) + populate(objectMap, "priority", o.Priority) + populate(objectMap, "privateEndpointStatus", o.PrivateEndpointStatus) + populate(objectMap, "privateLinkAlias", o.PrivateLinkAlias) + populate(objectMap, "privateLinkApprovalMessage", o.PrivateLinkApprovalMessage) + populate(objectMap, "privateLinkLocation", o.PrivateLinkLocation) + populate(objectMap, "privateLinkResourceId", o.PrivateLinkResourceID) + populate(objectMap, "provisioningState", o.ProvisioningState) + populate(objectMap, "resourceState", o.ResourceState) + populate(objectMap, "weight", o.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginProperties. +func (o *OriginProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &o.Enabled) + delete(rawMsg, key) + case "httpPort": + err = unpopulate(val, "HTTPPort", &o.HTTPPort) + delete(rawMsg, key) + case "httpsPort": + err = unpopulate(val, "HTTPSPort", &o.HTTPSPort) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &o.HostName) + delete(rawMsg, key) + case "originHostHeader": + err = unpopulate(val, "OriginHostHeader", &o.OriginHostHeader) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &o.Priority) + delete(rawMsg, key) + case "privateEndpointStatus": + err = unpopulate(val, "PrivateEndpointStatus", &o.PrivateEndpointStatus) + delete(rawMsg, key) + case "privateLinkAlias": + err = unpopulate(val, "PrivateLinkAlias", &o.PrivateLinkAlias) + delete(rawMsg, key) + case "privateLinkApprovalMessage": + err = unpopulate(val, "PrivateLinkApprovalMessage", &o.PrivateLinkApprovalMessage) + delete(rawMsg, key) + case "privateLinkLocation": + err = unpopulate(val, "PrivateLinkLocation", &o.PrivateLinkLocation) + delete(rawMsg, key) + case "privateLinkResourceId": + err = unpopulate(val, "PrivateLinkResourceID", &o.PrivateLinkResourceID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) + delete(rawMsg, key) + case "resourceState": + err = unpopulate(val, "ResourceState", &o.ResourceState) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &o.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginUpdateParameters. +func (o OriginUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginUpdateParameters. +func (o *OriginUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OriginUpdatePropertiesParameters. +func (o OriginUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", o.Enabled) + populate(objectMap, "httpPort", o.HTTPPort) + populate(objectMap, "httpsPort", o.HTTPSPort) + populate(objectMap, "hostName", o.HostName) + populate(objectMap, "originHostHeader", o.OriginHostHeader) + populate(objectMap, "priority", o.Priority) + populate(objectMap, "privateLinkAlias", o.PrivateLinkAlias) + populate(objectMap, "privateLinkApprovalMessage", o.PrivateLinkApprovalMessage) + populate(objectMap, "privateLinkLocation", o.PrivateLinkLocation) + populate(objectMap, "privateLinkResourceId", o.PrivateLinkResourceID) + populate(objectMap, "weight", o.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OriginUpdatePropertiesParameters. +func (o *OriginUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &o.Enabled) + delete(rawMsg, key) + case "httpPort": + err = unpopulate(val, "HTTPPort", &o.HTTPPort) + delete(rawMsg, key) + case "httpsPort": + err = unpopulate(val, "HTTPSPort", &o.HTTPSPort) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &o.HostName) + delete(rawMsg, key) + case "originHostHeader": + err = unpopulate(val, "OriginHostHeader", &o.OriginHostHeader) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &o.Priority) + delete(rawMsg, key) + case "privateLinkAlias": + err = unpopulate(val, "PrivateLinkAlias", &o.PrivateLinkAlias) + delete(rawMsg, key) + case "privateLinkApprovalMessage": + err = unpopulate(val, "PrivateLinkApprovalMessage", &o.PrivateLinkApprovalMessage) + delete(rawMsg, key) + case "privateLinkLocation": + err = unpopulate(val, "PrivateLinkLocation", &o.PrivateLinkLocation) + delete(rawMsg, key) + case "privateLinkResourceId": + err = unpopulate(val, "PrivateLinkResourceID", &o.PrivateLinkResourceID) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &o.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicySettings. +func (p PolicySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultCustomBlockResponseBody", p.DefaultCustomBlockResponseBody) + populate(objectMap, "defaultCustomBlockResponseStatusCode", p.DefaultCustomBlockResponseStatusCode) + populate(objectMap, "defaultRedirectUrl", p.DefaultRedirectURL) + populate(objectMap, "enabledState", p.EnabledState) + populate(objectMap, "mode", p.Mode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicySettings. +func (p *PolicySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultCustomBlockResponseBody": + err = unpopulate(val, "DefaultCustomBlockResponseBody", &p.DefaultCustomBlockResponseBody) + delete(rawMsg, key) + case "defaultCustomBlockResponseStatusCode": + err = unpopulate(val, "DefaultCustomBlockResponseStatusCode", &p.DefaultCustomBlockResponseStatusCode) + delete(rawMsg, key) + case "defaultRedirectUrl": + err = unpopulate(val, "DefaultRedirectURL", &p.DefaultRedirectURL) + delete(rawMsg, key) + case "enabledState": + err = unpopulate(val, "EnabledState", &p.EnabledState) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &p.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PostArgsMatchConditionParameters. +func (p PostArgsMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", p.MatchValues) + populate(objectMap, "negateCondition", p.NegateCondition) + populate(objectMap, "operator", p.Operator) + populate(objectMap, "selector", p.Selector) + populate(objectMap, "transforms", p.Transforms) + populate(objectMap, "typeName", p.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PostArgsMatchConditionParameters. +func (p *PostArgsMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &p.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &p.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &p.Operator) + delete(rawMsg, key) + case "selector": + err = unpopulate(val, "Selector", &p.Selector) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &p.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &p.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Profile. +func (p Profile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Profile. +func (p *Profile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &p.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProfileChangeSKUWafMapping. +func (p ProfileChangeSKUWafMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "changeToWafPolicy", p.ChangeToWafPolicy) + populate(objectMap, "securityPolicyName", p.SecurityPolicyName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileChangeSKUWafMapping. +func (p *ProfileChangeSKUWafMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "changeToWafPolicy": + err = unpopulate(val, "ChangeToWafPolicy", &p.ChangeToWafPolicy) + delete(rawMsg, key) + case "securityPolicyName": + err = unpopulate(val, "SecurityPolicyName", &p.SecurityPolicyName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProfileListResult. +func (p ProfileListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileListResult. +func (p *ProfileListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProfileLogScrubbing. +func (p ProfileLogScrubbing) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "scrubbingRules", p.ScrubbingRules) + populate(objectMap, "state", p.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileLogScrubbing. +func (p *ProfileLogScrubbing) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scrubbingRules": + err = unpopulate(val, "ScrubbingRules", &p.ScrubbingRules) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProfileProperties. +func (p ProfileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedProperties", p.ExtendedProperties) + populate(objectMap, "frontDoorId", p.FrontDoorID) + populate(objectMap, "logScrubbing", p.LogScrubbing) + populate(objectMap, "originResponseTimeoutSeconds", p.OriginResponseTimeoutSeconds) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "resourceState", p.ResourceState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileProperties. +func (p *ProfileProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedProperties": + err = unpopulate(val, "ExtendedProperties", &p.ExtendedProperties) + delete(rawMsg, key) + case "frontDoorId": + err = unpopulate(val, "FrontDoorID", &p.FrontDoorID) + delete(rawMsg, key) + case "logScrubbing": + err = unpopulate(val, "LogScrubbing", &p.LogScrubbing) + delete(rawMsg, key) + case "originResponseTimeoutSeconds": + err = unpopulate(val, "OriginResponseTimeoutSeconds", &p.OriginResponseTimeoutSeconds) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "resourceState": + err = unpopulate(val, "ResourceState", &p.ResourceState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProfilePropertiesUpdateParameters. +func (p ProfilePropertiesUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logScrubbing", p.LogScrubbing) + populate(objectMap, "originResponseTimeoutSeconds", p.OriginResponseTimeoutSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProfilePropertiesUpdateParameters. +func (p *ProfilePropertiesUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logScrubbing": + err = unpopulate(val, "LogScrubbing", &p.LogScrubbing) + delete(rawMsg, key) + case "originResponseTimeoutSeconds": + err = unpopulate(val, "OriginResponseTimeoutSeconds", &p.OriginResponseTimeoutSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProfileScrubbingRules. +func (p ProfileScrubbingRules) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchVariable", p.MatchVariable) + populate(objectMap, "selector", p.Selector) + populate(objectMap, "selectorMatchOperator", p.SelectorMatchOperator) + populate(objectMap, "state", p.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileScrubbingRules. +func (p *ProfileScrubbingRules) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchVariable": + err = unpopulate(val, "MatchVariable", &p.MatchVariable) + delete(rawMsg, key) + case "selector": + err = unpopulate(val, "Selector", &p.Selector) + delete(rawMsg, key) + case "selectorMatchOperator": + err = unpopulate(val, "SelectorMatchOperator", &p.SelectorMatchOperator) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProfileUpdateParameters. +func (p ProfileUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileUpdateParameters. +func (p *ProfileUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &p.Identity) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProfileUpgradeParameters. +func (p ProfileUpgradeParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "wafMappingList", p.WafMappingList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileUpgradeParameters. +func (p *ProfileUpgradeParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "wafMappingList": + err = unpopulate(val, "WafMappingList", &p.WafMappingList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PurgeParameters. +func (p PurgeParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentPaths", p.ContentPaths) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PurgeParameters. +func (p *PurgeParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contentPaths": + err = unpopulate(val, "ContentPaths", &p.ContentPaths) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryStringMatchConditionParameters. +func (q QueryStringMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", q.MatchValues) + populate(objectMap, "negateCondition", q.NegateCondition) + populate(objectMap, "operator", q.Operator) + populate(objectMap, "transforms", q.Transforms) + populate(objectMap, "typeName", q.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryStringMatchConditionParameters. +func (q *QueryStringMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &q.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &q.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &q.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &q.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &q.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RankingsResponse. +func (r RankingsResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "dateTimeBegin", r.DateTimeBegin) + populateDateTimeRFC3339(objectMap, "dateTimeEnd", r.DateTimeEnd) + populate(objectMap, "tables", r.Tables) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponse. +func (r *RankingsResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dateTimeBegin": + err = unpopulateDateTimeRFC3339(val, "DateTimeBegin", &r.DateTimeBegin) + delete(rawMsg, key) + case "dateTimeEnd": + err = unpopulateDateTimeRFC3339(val, "DateTimeEnd", &r.DateTimeEnd) + delete(rawMsg, key) + case "tables": + err = unpopulate(val, "Tables", &r.Tables) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RankingsResponseTablesItem. +func (r RankingsResponseTablesItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", r.Data) + populate(objectMap, "ranking", r.Ranking) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponseTablesItem. +func (r *RankingsResponseTablesItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &r.Data) + delete(rawMsg, key) + case "ranking": + err = unpopulate(val, "Ranking", &r.Ranking) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RankingsResponseTablesPropertiesItemsItem. +func (r RankingsResponseTablesPropertiesItemsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "metrics", r.Metrics) + populate(objectMap, "name", r.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponseTablesPropertiesItemsItem. +func (r *RankingsResponseTablesPropertiesItemsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "metrics": + err = unpopulate(val, "Metrics", &r.Metrics) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RankingsResponseTablesPropertiesItemsMetricsItem. +func (r RankingsResponseTablesPropertiesItemsMetricsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "metric", r.Metric) + populate(objectMap, "percentage", r.Percentage) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RankingsResponseTablesPropertiesItemsMetricsItem. +func (r *RankingsResponseTablesPropertiesItemsMetricsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "metric": + err = unpopulate(val, "Metric", &r.Metric) + delete(rawMsg, key) + case "percentage": + err = unpopulate(val, "Percentage", &r.Percentage) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RateLimitRule. +func (r RateLimitRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", r.Action) + populate(objectMap, "enabledState", r.EnabledState) + populate(objectMap, "matchConditions", r.MatchConditions) + populate(objectMap, "name", r.Name) + populate(objectMap, "priority", r.Priority) + populate(objectMap, "rateLimitDurationInMinutes", r.RateLimitDurationInMinutes) + populate(objectMap, "rateLimitThreshold", r.RateLimitThreshold) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RateLimitRule. +func (r *RateLimitRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &r.Action) + delete(rawMsg, key) + case "enabledState": + err = unpopulate(val, "EnabledState", &r.EnabledState) + delete(rawMsg, key) + case "matchConditions": + err = unpopulate(val, "MatchConditions", &r.MatchConditions) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &r.Priority) + delete(rawMsg, key) + case "rateLimitDurationInMinutes": + err = unpopulate(val, "RateLimitDurationInMinutes", &r.RateLimitDurationInMinutes) + delete(rawMsg, key) + case "rateLimitThreshold": + err = unpopulate(val, "RateLimitThreshold", &r.RateLimitThreshold) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RateLimitRuleList. +func (r RateLimitRuleList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rules", r.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RateLimitRuleList. +func (r *RateLimitRuleList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rules": + err = unpopulate(val, "Rules", &r.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemoteAddressMatchConditionParameters. +func (r RemoteAddressMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", r.MatchValues) + populate(objectMap, "negateCondition", r.NegateCondition) + populate(objectMap, "operator", r.Operator) + populate(objectMap, "transforms", r.Transforms) + populate(objectMap, "typeName", r.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemoteAddressMatchConditionParameters. +func (r *RemoteAddressMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &r.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &r.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &r.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &r.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &r.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestBodyMatchConditionParameters. +func (r RequestBodyMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", r.MatchValues) + populate(objectMap, "negateCondition", r.NegateCondition) + populate(objectMap, "operator", r.Operator) + populate(objectMap, "transforms", r.Transforms) + populate(objectMap, "typeName", r.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestBodyMatchConditionParameters. +func (r *RequestBodyMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &r.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &r.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &r.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &r.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &r.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestHeaderMatchConditionParameters. +func (r RequestHeaderMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", r.MatchValues) + populate(objectMap, "negateCondition", r.NegateCondition) + populate(objectMap, "operator", r.Operator) + populate(objectMap, "selector", r.Selector) + populate(objectMap, "transforms", r.Transforms) + populate(objectMap, "typeName", r.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestHeaderMatchConditionParameters. +func (r *RequestHeaderMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &r.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &r.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &r.Operator) + delete(rawMsg, key) + case "selector": + err = unpopulate(val, "Selector", &r.Selector) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &r.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &r.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestMethodMatchConditionParameters. +func (r RequestMethodMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", r.MatchValues) + populate(objectMap, "negateCondition", r.NegateCondition) + populate(objectMap, "operator", r.Operator) + populate(objectMap, "transforms", r.Transforms) + populate(objectMap, "typeName", r.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestMethodMatchConditionParameters. +func (r *RequestMethodMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &r.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &r.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &r.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &r.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &r.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestSchemeMatchConditionParameters. +func (r RequestSchemeMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", r.MatchValues) + populate(objectMap, "negateCondition", r.NegateCondition) + populate(objectMap, "operator", r.Operator) + populate(objectMap, "transforms", r.Transforms) + populate(objectMap, "typeName", r.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestSchemeMatchConditionParameters. +func (r *RequestSchemeMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &r.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &r.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &r.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &r.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &r.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequestURIMatchConditionParameters. +func (r RequestURIMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", r.MatchValues) + populate(objectMap, "negateCondition", r.NegateCondition) + populate(objectMap, "operator", r.Operator) + populate(objectMap, "transforms", r.Transforms) + populate(objectMap, "typeName", r.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequestURIMatchConditionParameters. +func (r *RequestURIMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &r.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &r.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &r.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &r.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &r.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceReference. +func (r ResourceReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceReference. +func (r *ResourceReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceUsage. +func (r ResourceUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", r.CurrentValue) + populate(objectMap, "limit", r.Limit) + populate(objectMap, "resourceType", r.ResourceType) + populate(objectMap, "unit", r.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsage. +func (r *ResourceUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &r.CurrentValue) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &r.Limit) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &r.ResourceType) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &r.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceUsageListResult. +func (r ResourceUsageListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsageListResult. +func (r *ResourceUsageListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourcesResponse. +func (r ResourcesResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customDomains", r.CustomDomains) + populate(objectMap, "endpoints", r.Endpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponse. +func (r *ResourcesResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customDomains": + err = unpopulate(val, "CustomDomains", &r.CustomDomains) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &r.Endpoints) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourcesResponseCustomDomainsItem. +func (r ResourcesResponseCustomDomainsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endpointId", r.EndpointID) + populate(objectMap, "history", r.History) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponseCustomDomainsItem. +func (r *ResourcesResponseCustomDomainsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endpointId": + err = unpopulate(val, "EndpointID", &r.EndpointID) + delete(rawMsg, key) + case "history": + err = unpopulate(val, "History", &r.History) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourcesResponseEndpointsItem. +func (r ResourcesResponseEndpointsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customDomains", r.CustomDomains) + populate(objectMap, "history", r.History) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponseEndpointsItem. +func (r *ResourcesResponseEndpointsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customDomains": + err = unpopulate(val, "CustomDomains", &r.CustomDomains) + delete(rawMsg, key) + case "history": + err = unpopulate(val, "History", &r.History) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourcesResponseEndpointsPropertiesItemsItem. +func (r ResourcesResponseEndpointsPropertiesItemsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endpointId", r.EndpointID) + populate(objectMap, "history", r.History) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourcesResponseEndpointsPropertiesItemsItem. +func (r *ResourcesResponseEndpointsPropertiesItemsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endpointId": + err = unpopulate(val, "EndpointID", &r.EndpointID) + delete(rawMsg, key) + case "history": + err = unpopulate(val, "History", &r.History) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResponseBasedOriginErrorDetectionParameters. +func (r ResponseBasedOriginErrorDetectionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "httpErrorRanges", r.HTTPErrorRanges) + populate(objectMap, "responseBasedDetectedErrorTypes", r.ResponseBasedDetectedErrorTypes) + populate(objectMap, "responseBasedFailoverThresholdPercentage", r.ResponseBasedFailoverThresholdPercentage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResponseBasedOriginErrorDetectionParameters. +func (r *ResponseBasedOriginErrorDetectionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "httpErrorRanges": + err = unpopulate(val, "HTTPErrorRanges", &r.HTTPErrorRanges) + delete(rawMsg, key) + case "responseBasedDetectedErrorTypes": + err = unpopulate(val, "ResponseBasedDetectedErrorTypes", &r.ResponseBasedDetectedErrorTypes) + delete(rawMsg, key) + case "responseBasedFailoverThresholdPercentage": + err = unpopulate(val, "ResponseBasedFailoverThresholdPercentage", &r.ResponseBasedFailoverThresholdPercentage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Route. +func (r Route) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Route. +func (r *Route) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteConfigurationOverrideActionParameters. +func (r RouteConfigurationOverrideActionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cacheConfiguration", r.CacheConfiguration) + populate(objectMap, "originGroupOverride", r.OriginGroupOverride) + populate(objectMap, "typeName", r.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteConfigurationOverrideActionParameters. +func (r *RouteConfigurationOverrideActionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cacheConfiguration": + err = unpopulate(val, "CacheConfiguration", &r.CacheConfiguration) + delete(rawMsg, key) + case "originGroupOverride": + err = unpopulate(val, "OriginGroupOverride", &r.OriginGroupOverride) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &r.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteListResult. +func (r RouteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteListResult. +func (r *RouteListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteProperties. +func (r RouteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cacheConfiguration", r.CacheConfiguration) + populate(objectMap, "customDomains", r.CustomDomains) + populate(objectMap, "deploymentStatus", r.DeploymentStatus) + populate(objectMap, "enabledState", r.EnabledState) + populate(objectMap, "endpointName", r.EndpointName) + populate(objectMap, "forwardingProtocol", r.ForwardingProtocol) + populate(objectMap, "httpsRedirect", r.HTTPSRedirect) + populate(objectMap, "linkToDefaultDomain", r.LinkToDefaultDomain) + populate(objectMap, "originGroup", r.OriginGroup) + populate(objectMap, "originPath", r.OriginPath) + populate(objectMap, "patternsToMatch", r.PatternsToMatch) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "ruleSets", r.RuleSets) + populate(objectMap, "supportedProtocols", r.SupportedProtocols) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteProperties. +func (r *RouteProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cacheConfiguration": + err = unpopulate(val, "CacheConfiguration", &r.CacheConfiguration) + delete(rawMsg, key) + case "customDomains": + err = unpopulate(val, "CustomDomains", &r.CustomDomains) + delete(rawMsg, key) + case "deploymentStatus": + err = unpopulate(val, "DeploymentStatus", &r.DeploymentStatus) + delete(rawMsg, key) + case "enabledState": + err = unpopulate(val, "EnabledState", &r.EnabledState) + delete(rawMsg, key) + case "endpointName": + err = unpopulate(val, "EndpointName", &r.EndpointName) + delete(rawMsg, key) + case "forwardingProtocol": + err = unpopulate(val, "ForwardingProtocol", &r.ForwardingProtocol) + delete(rawMsg, key) + case "httpsRedirect": + err = unpopulate(val, "HTTPSRedirect", &r.HTTPSRedirect) + delete(rawMsg, key) + case "linkToDefaultDomain": + err = unpopulate(val, "LinkToDefaultDomain", &r.LinkToDefaultDomain) + delete(rawMsg, key) + case "originGroup": + err = unpopulate(val, "OriginGroup", &r.OriginGroup) + delete(rawMsg, key) + case "originPath": + err = unpopulate(val, "OriginPath", &r.OriginPath) + delete(rawMsg, key) + case "patternsToMatch": + err = unpopulate(val, "PatternsToMatch", &r.PatternsToMatch) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "ruleSets": + err = unpopulate(val, "RuleSets", &r.RuleSets) + delete(rawMsg, key) + case "supportedProtocols": + err = unpopulate(val, "SupportedProtocols", &r.SupportedProtocols) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteUpdateParameters. +func (r RouteUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteUpdateParameters. +func (r *RouteUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteUpdatePropertiesParameters. +func (r RouteUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cacheConfiguration", r.CacheConfiguration) + populate(objectMap, "customDomains", r.CustomDomains) + populate(objectMap, "enabledState", r.EnabledState) + populate(objectMap, "endpointName", r.EndpointName) + populate(objectMap, "forwardingProtocol", r.ForwardingProtocol) + populate(objectMap, "httpsRedirect", r.HTTPSRedirect) + populate(objectMap, "linkToDefaultDomain", r.LinkToDefaultDomain) + populate(objectMap, "originGroup", r.OriginGroup) + populate(objectMap, "originPath", r.OriginPath) + populate(objectMap, "patternsToMatch", r.PatternsToMatch) + populate(objectMap, "ruleSets", r.RuleSets) + populate(objectMap, "supportedProtocols", r.SupportedProtocols) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteUpdatePropertiesParameters. +func (r *RouteUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cacheConfiguration": + err = unpopulate(val, "CacheConfiguration", &r.CacheConfiguration) + delete(rawMsg, key) + case "customDomains": + err = unpopulate(val, "CustomDomains", &r.CustomDomains) + delete(rawMsg, key) + case "enabledState": + err = unpopulate(val, "EnabledState", &r.EnabledState) + delete(rawMsg, key) + case "endpointName": + err = unpopulate(val, "EndpointName", &r.EndpointName) + delete(rawMsg, key) + case "forwardingProtocol": + err = unpopulate(val, "ForwardingProtocol", &r.ForwardingProtocol) + delete(rawMsg, key) + case "httpsRedirect": + err = unpopulate(val, "HTTPSRedirect", &r.HTTPSRedirect) + delete(rawMsg, key) + case "linkToDefaultDomain": + err = unpopulate(val, "LinkToDefaultDomain", &r.LinkToDefaultDomain) + delete(rawMsg, key) + case "originGroup": + err = unpopulate(val, "OriginGroup", &r.OriginGroup) + delete(rawMsg, key) + case "originPath": + err = unpopulate(val, "OriginPath", &r.OriginPath) + delete(rawMsg, key) + case "patternsToMatch": + err = unpopulate(val, "PatternsToMatch", &r.PatternsToMatch) + delete(rawMsg, key) + case "ruleSets": + err = unpopulate(val, "RuleSets", &r.RuleSets) + delete(rawMsg, key) + case "supportedProtocols": + err = unpopulate(val, "SupportedProtocols", &r.SupportedProtocols) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Rule. +func (r Rule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Rule. +func (r *Rule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RuleListResult. +func (r RuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RuleListResult. +func (r *RuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RuleProperties. +func (r RuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actions", r.Actions) + populate(objectMap, "conditions", r.Conditions) + populate(objectMap, "deploymentStatus", r.DeploymentStatus) + populate(objectMap, "matchProcessingBehavior", r.MatchProcessingBehavior) + populate(objectMap, "order", r.Order) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "ruleSetName", r.RuleSetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RuleProperties. +func (r *RuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actions": + r.Actions, err = unmarshalDeliveryRuleActionAutoGeneratedClassificationArray(val) + delete(rawMsg, key) + case "conditions": + r.Conditions, err = unmarshalDeliveryRuleConditionClassificationArray(val) + delete(rawMsg, key) + case "deploymentStatus": + err = unpopulate(val, "DeploymentStatus", &r.DeploymentStatus) + delete(rawMsg, key) + case "matchProcessingBehavior": + err = unpopulate(val, "MatchProcessingBehavior", &r.MatchProcessingBehavior) + delete(rawMsg, key) + case "order": + err = unpopulate(val, "Order", &r.Order) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "ruleSetName": + err = unpopulate(val, "RuleSetName", &r.RuleSetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RuleSet. +func (r RuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RuleSet. +func (r *RuleSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RuleSetListResult. +func (r RuleSetListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RuleSetListResult. +func (r *RuleSetListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RuleSetProperties. +func (r RuleSetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deploymentStatus", r.DeploymentStatus) + populate(objectMap, "profileName", r.ProfileName) + populate(objectMap, "provisioningState", r.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RuleSetProperties. +func (r *RuleSetProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deploymentStatus": + err = unpopulate(val, "DeploymentStatus", &r.DeploymentStatus) + delete(rawMsg, key) + case "profileName": + err = unpopulate(val, "ProfileName", &r.ProfileName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RuleUpdateParameters. +func (r RuleUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RuleUpdateParameters. +func (r *RuleUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RuleUpdatePropertiesParameters. +func (r RuleUpdatePropertiesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actions", r.Actions) + populate(objectMap, "conditions", r.Conditions) + populate(objectMap, "matchProcessingBehavior", r.MatchProcessingBehavior) + populate(objectMap, "order", r.Order) + populate(objectMap, "ruleSetName", r.RuleSetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RuleUpdatePropertiesParameters. +func (r *RuleUpdatePropertiesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actions": + r.Actions, err = unmarshalDeliveryRuleActionAutoGeneratedClassificationArray(val) + delete(rawMsg, key) + case "conditions": + r.Conditions, err = unmarshalDeliveryRuleConditionClassificationArray(val) + delete(rawMsg, key) + case "matchProcessingBehavior": + err = unpopulate(val, "MatchProcessingBehavior", &r.MatchProcessingBehavior) + delete(rawMsg, key) + case "order": + err = unpopulate(val, "Order", &r.Order) + delete(rawMsg, key) + case "ruleSetName": + err = unpopulate(val, "RuleSetName", &r.RuleSetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKU. +func (s SKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. +func (s *SKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SSLProtocolMatchConditionParameters. +func (s SSLProtocolMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", s.MatchValues) + populate(objectMap, "negateCondition", s.NegateCondition) + populate(objectMap, "operator", s.Operator) + populate(objectMap, "transforms", s.Transforms) + populate(objectMap, "typeName", s.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SSLProtocolMatchConditionParameters. +func (s *SSLProtocolMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &s.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &s.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &s.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &s.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &s.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Secret. +func (s Secret) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Secret. +func (s *Secret) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretListResult. +func (s SecretListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretListResult. +func (s *SecretListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretParameters. +func (s SecretParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = s.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretParameters. +func (s *SecretParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretProperties. +func (s SecretProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deploymentStatus", s.DeploymentStatus) + populate(objectMap, "parameters", s.Parameters) + populate(objectMap, "profileName", s.ProfileName) + populate(objectMap, "provisioningState", s.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretProperties. +func (s *SecretProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deploymentStatus": + err = unpopulate(val, "DeploymentStatus", &s.DeploymentStatus) + delete(rawMsg, key) + case "parameters": + s.Parameters, err = unmarshalSecretParametersClassification(val) + delete(rawMsg, key) + case "profileName": + err = unpopulate(val, "ProfileName", &s.ProfileName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPolicy. +func (s SecurityPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicy. +func (s *SecurityPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyListResult. +func (s SecurityPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyListResult. +func (s *SecurityPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyProperties. +func (s SecurityPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deploymentStatus", s.DeploymentStatus) + populate(objectMap, "parameters", s.Parameters) + populate(objectMap, "profileName", s.ProfileName) + populate(objectMap, "provisioningState", s.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyProperties. +func (s *SecurityPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deploymentStatus": + err = unpopulate(val, "DeploymentStatus", &s.DeploymentStatus) + delete(rawMsg, key) + case "parameters": + s.Parameters, err = unmarshalSecurityPolicyPropertiesParametersClassification(val) + delete(rawMsg, key) + case "profileName": + err = unpopulate(val, "ProfileName", &s.ProfileName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyPropertiesParameters. +func (s SecurityPolicyPropertiesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = s.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyPropertiesParameters. +func (s *SecurityPolicyPropertiesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyUpdateParameters. +func (s SecurityPolicyUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyUpdateParameters. +func (s *SecurityPolicyUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyUpdateProperties. +func (s SecurityPolicyUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "parameters", s.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyUpdateProperties. +func (s *SecurityPolicyUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "parameters": + s.Parameters, err = unmarshalSecurityPolicyPropertiesParametersClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyWebApplicationFirewallAssociation. +func (s SecurityPolicyWebApplicationFirewallAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "domains", s.Domains) + populate(objectMap, "patternsToMatch", s.PatternsToMatch) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyWebApplicationFirewallAssociation. +func (s *SecurityPolicyWebApplicationFirewallAssociation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domains": + err = unpopulate(val, "Domains", &s.Domains) + delete(rawMsg, key) + case "patternsToMatch": + err = unpopulate(val, "PatternsToMatch", &s.PatternsToMatch) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPolicyWebApplicationFirewallParameters. +func (s SecurityPolicyWebApplicationFirewallParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "associations", s.Associations) + objectMap["type"] = SecurityPolicyTypeWebApplicationFirewall + populate(objectMap, "wafPolicy", s.WafPolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPolicyWebApplicationFirewallParameters. +func (s *SecurityPolicyWebApplicationFirewallParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "associations": + err = unpopulate(val, "Associations", &s.Associations) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "wafPolicy": + err = unpopulate(val, "WafPolicy", &s.WafPolicy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServerPortMatchConditionParameters. +func (s ServerPortMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", s.MatchValues) + populate(objectMap, "negateCondition", s.NegateCondition) + populate(objectMap, "operator", s.Operator) + populate(objectMap, "transforms", s.Transforms) + populate(objectMap, "typeName", s.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServerPortMatchConditionParameters. +func (s *ServerPortMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &s.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &s.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &s.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &s.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &s.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", s.LogSpecifications) + populate(objectMap, "metricSpecifications", s.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResourceProperties. +func (s SharedPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", s.GroupID) + populate(objectMap, "privateLink", s.PrivateLink) + populate(objectMap, "privateLinkLocation", s.PrivateLinkLocation) + populate(objectMap, "requestMessage", s.RequestMessage) + populate(objectMap, "status", s.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceProperties. +func (s *SharedPrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &s.GroupID) + delete(rawMsg, key) + case "privateLink": + err = unpopulate(val, "PrivateLink", &s.PrivateLink) + delete(rawMsg, key) + case "privateLinkLocation": + err = unpopulate(val, "PrivateLinkLocation", &s.PrivateLinkLocation) + delete(rawMsg, key) + case "requestMessage": + err = unpopulate(val, "RequestMessage", &s.RequestMessage) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SocketAddrMatchConditionParameters. +func (s SocketAddrMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", s.MatchValues) + populate(objectMap, "negateCondition", s.NegateCondition) + populate(objectMap, "operator", s.Operator) + populate(objectMap, "transforms", s.Transforms) + populate(objectMap, "typeName", s.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SocketAddrMatchConditionParameters. +func (s *SocketAddrMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &s.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &s.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &s.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &s.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &s.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SsoURI. +func (s SsoURI) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ssoUriValue", s.SsoURIValue) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SsoURI. +func (s *SsoURI) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ssoUriValue": + err = unpopulate(val, "SsoURIValue", &s.SsoURIValue) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedOptimizationTypesListResult. +func (s SupportedOptimizationTypesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "supportedOptimizationTypes", s.SupportedOptimizationTypes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOptimizationTypesListResult. +func (s *SupportedOptimizationTypesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "supportedOptimizationTypes": + err = unpopulate(val, "SupportedOptimizationTypes", &s.SupportedOptimizationTypes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLFileExtensionMatchConditionParameters. +func (u URLFileExtensionMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", u.MatchValues) + populate(objectMap, "negateCondition", u.NegateCondition) + populate(objectMap, "operator", u.Operator) + populate(objectMap, "transforms", u.Transforms) + populate(objectMap, "typeName", u.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLFileExtensionMatchConditionParameters. +func (u *URLFileExtensionMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &u.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &u.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &u.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &u.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &u.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLFileNameMatchConditionParameters. +func (u URLFileNameMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", u.MatchValues) + populate(objectMap, "negateCondition", u.NegateCondition) + populate(objectMap, "operator", u.Operator) + populate(objectMap, "transforms", u.Transforms) + populate(objectMap, "typeName", u.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLFileNameMatchConditionParameters. +func (u *URLFileNameMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &u.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &u.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &u.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &u.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &u.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLPathMatchConditionParameters. +func (u URLPathMatchConditionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", u.MatchValues) + populate(objectMap, "negateCondition", u.NegateCondition) + populate(objectMap, "operator", u.Operator) + populate(objectMap, "transforms", u.Transforms) + populate(objectMap, "typeName", u.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLPathMatchConditionParameters. +func (u *URLPathMatchConditionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &u.MatchValues) + delete(rawMsg, key) + case "negateCondition": + err = unpopulate(val, "NegateCondition", &u.NegateCondition) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &u.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &u.Transforms) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &u.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLRedirectAction. +func (u URLRedirectAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = DeliveryRuleActionURLRedirect + populate(objectMap, "parameters", u.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLRedirectAction. +func (u *URLRedirectAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &u.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLRedirectActionParameters. +func (u URLRedirectActionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customFragment", u.CustomFragment) + populate(objectMap, "customHostname", u.CustomHostname) + populate(objectMap, "customPath", u.CustomPath) + populate(objectMap, "customQueryString", u.CustomQueryString) + populate(objectMap, "destinationProtocol", u.DestinationProtocol) + populate(objectMap, "redirectType", u.RedirectType) + populate(objectMap, "typeName", u.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLRedirectActionParameters. +func (u *URLRedirectActionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customFragment": + err = unpopulate(val, "CustomFragment", &u.CustomFragment) + delete(rawMsg, key) + case "customHostname": + err = unpopulate(val, "CustomHostname", &u.CustomHostname) + delete(rawMsg, key) + case "customPath": + err = unpopulate(val, "CustomPath", &u.CustomPath) + delete(rawMsg, key) + case "customQueryString": + err = unpopulate(val, "CustomQueryString", &u.CustomQueryString) + delete(rawMsg, key) + case "destinationProtocol": + err = unpopulate(val, "DestinationProtocol", &u.DestinationProtocol) + delete(rawMsg, key) + case "redirectType": + err = unpopulate(val, "RedirectType", &u.RedirectType) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &u.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLRewriteAction. +func (u URLRewriteAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = DeliveryRuleActionURLRewrite + populate(objectMap, "parameters", u.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLRewriteAction. +func (u *URLRewriteAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &u.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLRewriteActionParameters. +func (u URLRewriteActionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destination", u.Destination) + populate(objectMap, "preserveUnmatchedPath", u.PreserveUnmatchedPath) + populate(objectMap, "sourcePattern", u.SourcePattern) + populate(objectMap, "typeName", u.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLRewriteActionParameters. +func (u *URLRewriteActionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destination": + err = unpopulate(val, "Destination", &u.Destination) + delete(rawMsg, key) + case "preserveUnmatchedPath": + err = unpopulate(val, "PreserveUnmatchedPath", &u.PreserveUnmatchedPath) + delete(rawMsg, key) + case "sourcePattern": + err = unpopulate(val, "SourcePattern", &u.SourcePattern) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &u.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLSigningAction. +func (u URLSigningAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["name"] = DeliveryRuleActionURLSigning + populate(objectMap, "parameters", u.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningAction. +func (u *URLSigningAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &u.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLSigningActionParameters. +func (u URLSigningActionParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "algorithm", u.Algorithm) + populate(objectMap, "parameterNameOverride", u.ParameterNameOverride) + populate(objectMap, "typeName", u.TypeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningActionParameters. +func (u *URLSigningActionParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "algorithm": + err = unpopulate(val, "Algorithm", &u.Algorithm) + delete(rawMsg, key) + case "parameterNameOverride": + err = unpopulate(val, "ParameterNameOverride", &u.ParameterNameOverride) + delete(rawMsg, key) + case "typeName": + err = unpopulate(val, "TypeName", &u.TypeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLSigningKey. +func (u URLSigningKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyId", u.KeyID) + populate(objectMap, "keySourceParameters", u.KeySourceParameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningKey. +func (u *URLSigningKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyId": + err = unpopulate(val, "KeyID", &u.KeyID) + delete(rawMsg, key) + case "keySourceParameters": + err = unpopulate(val, "KeySourceParameters", &u.KeySourceParameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLSigningKeyParameters. +func (u URLSigningKeyParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyId", u.KeyID) + populate(objectMap, "secretSource", u.SecretSource) + populate(objectMap, "secretVersion", u.SecretVersion) + objectMap["type"] = SecretTypeURLSigningKey + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningKeyParameters. +func (u *URLSigningKeyParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyId": + err = unpopulate(val, "KeyID", &u.KeyID) + delete(rawMsg, key) + case "secretSource": + err = unpopulate(val, "SecretSource", &u.SecretSource) + delete(rawMsg, key) + case "secretVersion": + err = unpopulate(val, "SecretVersion", &u.SecretVersion) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URLSigningParamIdentifier. +func (u URLSigningParamIdentifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "paramIndicator", u.ParamIndicator) + populate(objectMap, "paramName", u.ParamName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URLSigningParamIdentifier. +func (u *URLSigningParamIdentifier) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "paramIndicator": + err = unpopulate(val, "ParamIndicator", &u.ParamIndicator) + delete(rawMsg, key) + case "paramName": + err = unpopulate(val, "ParamName", &u.ParamName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Usage. +func (u Usage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", u.CurrentValue) + populate(objectMap, "id", u.ID) + populate(objectMap, "limit", u.Limit) + populate(objectMap, "name", u.Name) + populate(objectMap, "unit", u.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Usage. +func (u *Usage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &u.CurrentValue) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &u.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &u.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageName. +func (u UsageName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", u.LocalizedValue) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageName. +func (u *UsageName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &u.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsagesListResult. +func (u UsagesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsagesListResult. +func (u *UsagesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. +func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserManagedHTTPSParameters. +func (u UserManagedHTTPSParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["certificateSource"] = CertificateSourceAzureKeyVault + populate(objectMap, "certificateSourceParameters", u.CertificateSourceParameters) + populate(objectMap, "minimumTlsVersion", u.MinimumTLSVersion) + populate(objectMap, "protocolType", u.ProtocolType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserManagedHTTPSParameters. +func (u *UserManagedHTTPSParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateSource": + err = unpopulate(val, "CertificateSource", &u.CertificateSource) + delete(rawMsg, key) + case "certificateSourceParameters": + err = unpopulate(val, "CertificateSourceParameters", &u.CertificateSourceParameters) + delete(rawMsg, key) + case "minimumTlsVersion": + err = unpopulate(val, "MinimumTLSVersion", &u.MinimumTLSVersion) + delete(rawMsg, key) + case "protocolType": + err = unpopulate(val, "ProtocolType", &u.ProtocolType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateCustomDomainInput. +func (v ValidateCustomDomainInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostName", v.HostName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateCustomDomainInput. +func (v *ValidateCustomDomainInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostName": + err = unpopulate(val, "HostName", &v.HostName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateCustomDomainOutput. +func (v ValidateCustomDomainOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customDomainValidated", v.CustomDomainValidated) + populate(objectMap, "message", v.Message) + populate(objectMap, "reason", v.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateCustomDomainOutput. +func (v *ValidateCustomDomainOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customDomainValidated": + err = unpopulate(val, "CustomDomainValidated", &v.CustomDomainValidated) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &v.Message) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &v.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateProbeInput. +func (v ValidateProbeInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "probeURL", v.ProbeURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateProbeInput. +func (v *ValidateProbeInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "probeURL": + err = unpopulate(val, "ProbeURL", &v.ProbeURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateProbeOutput. +func (v ValidateProbeOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", v.ErrorCode) + populate(objectMap, "isValid", v.IsValid) + populate(objectMap, "message", v.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateProbeOutput. +func (v *ValidateProbeOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &v.ErrorCode) + delete(rawMsg, key) + case "isValid": + err = unpopulate(val, "IsValid", &v.IsValid) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &v.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateSecretInput. +func (v ValidateSecretInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "secretSource", v.SecretSource) + populate(objectMap, "secretType", v.SecretType) + populate(objectMap, "secretVersion", v.SecretVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateSecretInput. +func (v *ValidateSecretInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "secretSource": + err = unpopulate(val, "SecretSource", &v.SecretSource) + delete(rawMsg, key) + case "secretType": + err = unpopulate(val, "SecretType", &v.SecretType) + delete(rawMsg, key) + case "secretVersion": + err = unpopulate(val, "SecretVersion", &v.SecretVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateSecretOutput. +func (v ValidateSecretOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", v.Message) + populate(objectMap, "status", v.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateSecretOutput. +func (v *ValidateSecretOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &v.Message) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &v.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WafMetricsResponse. +func (w WafMetricsResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "dateTimeBegin", w.DateTimeBegin) + populateDateTimeRFC3339(objectMap, "dateTimeEnd", w.DateTimeEnd) + populate(objectMap, "granularity", w.Granularity) + populate(objectMap, "series", w.Series) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WafMetricsResponse. +func (w *WafMetricsResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dateTimeBegin": + err = unpopulateDateTimeRFC3339(val, "DateTimeBegin", &w.DateTimeBegin) + delete(rawMsg, key) + case "dateTimeEnd": + err = unpopulateDateTimeRFC3339(val, "DateTimeEnd", &w.DateTimeEnd) + delete(rawMsg, key) + case "granularity": + err = unpopulate(val, "Granularity", &w.Granularity) + delete(rawMsg, key) + case "series": + err = unpopulate(val, "Series", &w.Series) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WafMetricsResponseSeriesItem. +func (w WafMetricsResponseSeriesItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", w.Data) + populate(objectMap, "groups", w.Groups) + populate(objectMap, "metric", w.Metric) + populate(objectMap, "unit", w.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WafMetricsResponseSeriesItem. +func (w *WafMetricsResponseSeriesItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &w.Data) + delete(rawMsg, key) + case "groups": + err = unpopulate(val, "Groups", &w.Groups) + delete(rawMsg, key) + case "metric": + err = unpopulate(val, "Metric", &w.Metric) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &w.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WafMetricsResponseSeriesPropertiesItemsItem. +func (w WafMetricsResponseSeriesPropertiesItemsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", w.Name) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WafMetricsResponseSeriesPropertiesItemsItem. +func (w *WafMetricsResponseSeriesPropertiesItemsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WafRankingsResponse. +func (w WafRankingsResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", w.Data) + populateDateTimeRFC3339(objectMap, "dateTimeBegin", w.DateTimeBegin) + populateDateTimeRFC3339(objectMap, "dateTimeEnd", w.DateTimeEnd) + populate(objectMap, "groups", w.Groups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WafRankingsResponse. +func (w *WafRankingsResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &w.Data) + delete(rawMsg, key) + case "dateTimeBegin": + err = unpopulateDateTimeRFC3339(val, "DateTimeBegin", &w.DateTimeBegin) + delete(rawMsg, key) + case "dateTimeEnd": + err = unpopulateDateTimeRFC3339(val, "DateTimeEnd", &w.DateTimeEnd) + delete(rawMsg, key) + case "groups": + err = unpopulate(val, "Groups", &w.Groups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WafRankingsResponseDataItem. +func (w WafRankingsResponseDataItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupValues", w.GroupValues) + populate(objectMap, "metrics", w.Metrics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WafRankingsResponseDataItem. +func (w *WafRankingsResponseDataItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupValues": + err = unpopulate(val, "GroupValues", &w.GroupValues) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &w.Metrics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicy. +func (w WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", w.Etag) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "sku", w.SKU) + populate(objectMap, "systemData", w.SystemData) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicy. +func (w *WebApplicationFirewallPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &w.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &w.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &w.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyList. +func (w WebApplicationFirewallPolicyList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyList. +func (w *WebApplicationFirewallPolicyList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyPatchParameters. +func (w WebApplicationFirewallPolicyPatchParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tags", w.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyPatchParameters. +func (w *WebApplicationFirewallPolicyPatchParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyProperties. +func (w WebApplicationFirewallPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customRules", w.CustomRules) + populate(objectMap, "endpointLinks", w.EndpointLinks) + populate(objectMap, "extendedProperties", w.ExtendedProperties) + populate(objectMap, "managedRules", w.ManagedRules) + populate(objectMap, "policySettings", w.PolicySettings) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "rateLimitRules", w.RateLimitRules) + populate(objectMap, "resourceState", w.ResourceState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyProperties. +func (w *WebApplicationFirewallPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customRules": + err = unpopulate(val, "CustomRules", &w.CustomRules) + delete(rawMsg, key) + case "endpointLinks": + err = unpopulate(val, "EndpointLinks", &w.EndpointLinks) + delete(rawMsg, key) + case "extendedProperties": + err = unpopulate(val, "ExtendedProperties", &w.ExtendedProperties) + delete(rawMsg, key) + case "managedRules": + err = unpopulate(val, "ManagedRules", &w.ManagedRules) + delete(rawMsg, key) + case "policySettings": + err = unpopulate(val, "PolicySettings", &w.PolicySettings) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "rateLimitRules": + err = unpopulate(val, "RateLimitRules", &w.RateLimitRules) + delete(rawMsg, key) + case "resourceState": + err = unpopulate(val, "ResourceState", &w.ResourceState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/operations_client.go new file mode 100644 index 00000000..37de6b41 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/operations_client.go @@ -0,0 +1,88 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Lists all of the available CDN REST API operations. +// +// Generated from API version 2024-02-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Cdn/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationsListResult); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/options.go new file mode 100644 index 00000000..44aa1e60 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/options.go @@ -0,0 +1,664 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +// AFDCustomDomainsClientBeginCreateOptions contains the optional parameters for the AFDCustomDomainsClient.BeginCreate method. +type AFDCustomDomainsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDCustomDomainsClientBeginDeleteOptions contains the optional parameters for the AFDCustomDomainsClient.BeginDelete method. +type AFDCustomDomainsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDCustomDomainsClientBeginRefreshValidationTokenOptions contains the optional parameters for the AFDCustomDomainsClient.BeginRefreshValidationToken +// method. +type AFDCustomDomainsClientBeginRefreshValidationTokenOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDCustomDomainsClientBeginUpdateOptions contains the optional parameters for the AFDCustomDomainsClient.BeginUpdate method. +type AFDCustomDomainsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDCustomDomainsClientGetOptions contains the optional parameters for the AFDCustomDomainsClient.Get method. +type AFDCustomDomainsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AFDCustomDomainsClientListByProfileOptions contains the optional parameters for the AFDCustomDomainsClient.NewListByProfilePager +// method. +type AFDCustomDomainsClientListByProfileOptions struct { + // placeholder for future optional parameters +} + +// AFDEndpointsClientBeginCreateOptions contains the optional parameters for the AFDEndpointsClient.BeginCreate method. +type AFDEndpointsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDEndpointsClientBeginDeleteOptions contains the optional parameters for the AFDEndpointsClient.BeginDelete method. +type AFDEndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDEndpointsClientBeginPurgeContentOptions contains the optional parameters for the AFDEndpointsClient.BeginPurgeContent +// method. +type AFDEndpointsClientBeginPurgeContentOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDEndpointsClientBeginUpdateOptions contains the optional parameters for the AFDEndpointsClient.BeginUpdate method. +type AFDEndpointsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDEndpointsClientGetOptions contains the optional parameters for the AFDEndpointsClient.Get method. +type AFDEndpointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AFDEndpointsClientListByProfileOptions contains the optional parameters for the AFDEndpointsClient.NewListByProfilePager +// method. +type AFDEndpointsClientListByProfileOptions struct { + // placeholder for future optional parameters +} + +// AFDEndpointsClientListResourceUsageOptions contains the optional parameters for the AFDEndpointsClient.NewListResourceUsagePager +// method. +type AFDEndpointsClientListResourceUsageOptions struct { + // placeholder for future optional parameters +} + +// AFDEndpointsClientValidateCustomDomainOptions contains the optional parameters for the AFDEndpointsClient.ValidateCustomDomain +// method. +type AFDEndpointsClientValidateCustomDomainOptions struct { + // placeholder for future optional parameters +} + +// AFDOriginGroupsClientBeginCreateOptions contains the optional parameters for the AFDOriginGroupsClient.BeginCreate method. +type AFDOriginGroupsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDOriginGroupsClientBeginDeleteOptions contains the optional parameters for the AFDOriginGroupsClient.BeginDelete method. +type AFDOriginGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDOriginGroupsClientBeginUpdateOptions contains the optional parameters for the AFDOriginGroupsClient.BeginUpdate method. +type AFDOriginGroupsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDOriginGroupsClientGetOptions contains the optional parameters for the AFDOriginGroupsClient.Get method. +type AFDOriginGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AFDOriginGroupsClientListByProfileOptions contains the optional parameters for the AFDOriginGroupsClient.NewListByProfilePager +// method. +type AFDOriginGroupsClientListByProfileOptions struct { + // placeholder for future optional parameters +} + +// AFDOriginGroupsClientListResourceUsageOptions contains the optional parameters for the AFDOriginGroupsClient.NewListResourceUsagePager +// method. +type AFDOriginGroupsClientListResourceUsageOptions struct { + // placeholder for future optional parameters +} + +// AFDOriginsClientBeginCreateOptions contains the optional parameters for the AFDOriginsClient.BeginCreate method. +type AFDOriginsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDOriginsClientBeginDeleteOptions contains the optional parameters for the AFDOriginsClient.BeginDelete method. +type AFDOriginsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDOriginsClientBeginUpdateOptions contains the optional parameters for the AFDOriginsClient.BeginUpdate method. +type AFDOriginsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDOriginsClientGetOptions contains the optional parameters for the AFDOriginsClient.Get method. +type AFDOriginsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AFDOriginsClientListByOriginGroupOptions contains the optional parameters for the AFDOriginsClient.NewListByOriginGroupPager +// method. +type AFDOriginsClientListByOriginGroupOptions struct { + // placeholder for future optional parameters +} + +// AFDProfilesClientBeginUpgradeOptions contains the optional parameters for the AFDProfilesClient.BeginUpgrade method. +type AFDProfilesClientBeginUpgradeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AFDProfilesClientCheckEndpointNameAvailabilityOptions contains the optional parameters for the AFDProfilesClient.CheckEndpointNameAvailability +// method. +type AFDProfilesClientCheckEndpointNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// AFDProfilesClientCheckHostNameAvailabilityOptions contains the optional parameters for the AFDProfilesClient.CheckHostNameAvailability +// method. +type AFDProfilesClientCheckHostNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// AFDProfilesClientListResourceUsageOptions contains the optional parameters for the AFDProfilesClient.NewListResourceUsagePager +// method. +type AFDProfilesClientListResourceUsageOptions struct { + // placeholder for future optional parameters +} + +// AFDProfilesClientValidateSecretOptions contains the optional parameters for the AFDProfilesClient.ValidateSecret method. +type AFDProfilesClientValidateSecretOptions struct { + // placeholder for future optional parameters +} + +// CustomDomainsClientBeginCreateOptions contains the optional parameters for the CustomDomainsClient.BeginCreate method. +type CustomDomainsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomDomainsClientBeginDeleteOptions contains the optional parameters for the CustomDomainsClient.BeginDelete method. +type CustomDomainsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomDomainsClientBeginDisableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.BeginDisableCustomHTTPS +// method. +type CustomDomainsClientBeginDisableCustomHTTPSOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomDomainsClientBeginEnableCustomHTTPSOptions contains the optional parameters for the CustomDomainsClient.BeginEnableCustomHTTPS +// method. +type CustomDomainsClientBeginEnableCustomHTTPSOptions struct { + // The configuration specifying how to enable HTTPS for the custom domain - using CDN managed certificate or user's own certificate. + // If not specified, enabling ssl uses CDN managed certificate by + // default. + CustomDomainHTTPSParameters CustomDomainHTTPSParametersClassification + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomDomainsClientGetOptions contains the optional parameters for the CustomDomainsClient.Get method. +type CustomDomainsClientGetOptions struct { + // placeholder for future optional parameters +} + +// CustomDomainsClientListByEndpointOptions contains the optional parameters for the CustomDomainsClient.NewListByEndpointPager +// method. +type CustomDomainsClientListByEndpointOptions struct { + // placeholder for future optional parameters +} + +// EdgeNodesClientListOptions contains the optional parameters for the EdgeNodesClient.NewListPager method. +type EdgeNodesClientListOptions struct { + // placeholder for future optional parameters +} + +// EndpointsClientBeginCreateOptions contains the optional parameters for the EndpointsClient.BeginCreate method. +type EndpointsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method. +type EndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EndpointsClientBeginLoadContentOptions contains the optional parameters for the EndpointsClient.BeginLoadContent method. +type EndpointsClientBeginLoadContentOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EndpointsClientBeginPurgeContentOptions contains the optional parameters for the EndpointsClient.BeginPurgeContent method. +type EndpointsClientBeginPurgeContentOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EndpointsClientBeginStartOptions contains the optional parameters for the EndpointsClient.BeginStart method. +type EndpointsClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EndpointsClientBeginStopOptions contains the optional parameters for the EndpointsClient.BeginStop method. +type EndpointsClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EndpointsClientBeginUpdateOptions contains the optional parameters for the EndpointsClient.BeginUpdate method. +type EndpointsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method. +type EndpointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// EndpointsClientListByProfileOptions contains the optional parameters for the EndpointsClient.NewListByProfilePager method. +type EndpointsClientListByProfileOptions struct { + // placeholder for future optional parameters +} + +// EndpointsClientListResourceUsageOptions contains the optional parameters for the EndpointsClient.NewListResourceUsagePager +// method. +type EndpointsClientListResourceUsageOptions struct { + // placeholder for future optional parameters +} + +// EndpointsClientValidateCustomDomainOptions contains the optional parameters for the EndpointsClient.ValidateCustomDomain +// method. +type EndpointsClientValidateCustomDomainOptions struct { + // placeholder for future optional parameters +} + +// LogAnalyticsClientGetLogAnalyticsLocationsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsLocations +// method. +type LogAnalyticsClientGetLogAnalyticsLocationsOptions struct { + // placeholder for future optional parameters +} + +// LogAnalyticsClientGetLogAnalyticsMetricsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsMetrics +// method. +type LogAnalyticsClientGetLogAnalyticsMetricsOptions struct { + Continents []string + CountryOrRegions []string + GroupBy []LogMetricsGroupBy +} + +// LogAnalyticsClientGetLogAnalyticsRankingsOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsRankings +// method. +type LogAnalyticsClientGetLogAnalyticsRankingsOptions struct { + CustomDomains []string +} + +// LogAnalyticsClientGetLogAnalyticsResourcesOptions contains the optional parameters for the LogAnalyticsClient.GetLogAnalyticsResources +// method. +type LogAnalyticsClientGetLogAnalyticsResourcesOptions struct { + // placeholder for future optional parameters +} + +// LogAnalyticsClientGetWafLogAnalyticsMetricsOptions contains the optional parameters for the LogAnalyticsClient.GetWafLogAnalyticsMetrics +// method. +type LogAnalyticsClientGetWafLogAnalyticsMetricsOptions struct { + Actions []WafAction + GroupBy []WafRankingGroupBy + RuleTypes []WafRuleType +} + +// LogAnalyticsClientGetWafLogAnalyticsRankingsOptions contains the optional parameters for the LogAnalyticsClient.GetWafLogAnalyticsRankings +// method. +type LogAnalyticsClientGetWafLogAnalyticsRankingsOptions struct { + Actions []WafAction + RuleTypes []WafRuleType +} + +// ManagedRuleSetsClientListOptions contains the optional parameters for the ManagedRuleSetsClient.NewListPager method. +type ManagedRuleSetsClientListOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientCheckEndpointNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckEndpointNameAvailability +// method. +type ManagementClientCheckEndpointNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientCheckNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckNameAvailability +// method. +type ManagementClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientCheckNameAvailabilityWithSubscriptionOptions contains the optional parameters for the ManagementClient.CheckNameAvailabilityWithSubscription +// method. +type ManagementClientCheckNameAvailabilityWithSubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientValidateProbeOptions contains the optional parameters for the ManagementClient.ValidateProbe method. +type ManagementClientValidateProbeOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// OriginGroupsClientBeginCreateOptions contains the optional parameters for the OriginGroupsClient.BeginCreate method. +type OriginGroupsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OriginGroupsClientBeginDeleteOptions contains the optional parameters for the OriginGroupsClient.BeginDelete method. +type OriginGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OriginGroupsClientBeginUpdateOptions contains the optional parameters for the OriginGroupsClient.BeginUpdate method. +type OriginGroupsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OriginGroupsClientGetOptions contains the optional parameters for the OriginGroupsClient.Get method. +type OriginGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// OriginGroupsClientListByEndpointOptions contains the optional parameters for the OriginGroupsClient.NewListByEndpointPager +// method. +type OriginGroupsClientListByEndpointOptions struct { + // placeholder for future optional parameters +} + +// OriginsClientBeginCreateOptions contains the optional parameters for the OriginsClient.BeginCreate method. +type OriginsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OriginsClientBeginDeleteOptions contains the optional parameters for the OriginsClient.BeginDelete method. +type OriginsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OriginsClientBeginUpdateOptions contains the optional parameters for the OriginsClient.BeginUpdate method. +type OriginsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OriginsClientGetOptions contains the optional parameters for the OriginsClient.Get method. +type OriginsClientGetOptions struct { + // placeholder for future optional parameters +} + +// OriginsClientListByEndpointOptions contains the optional parameters for the OriginsClient.NewListByEndpointPager method. +type OriginsClientListByEndpointOptions struct { + // placeholder for future optional parameters +} + +// PoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.BeginCreateOrUpdate method. +type PoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PoliciesClientBeginUpdateOptions contains the optional parameters for the PoliciesClient.BeginUpdate method. +type PoliciesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PoliciesClientDeleteOptions contains the optional parameters for the PoliciesClient.Delete method. +type PoliciesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method. +type PoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method. +type PoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientBeginCanMigrateOptions contains the optional parameters for the ProfilesClient.BeginCanMigrate method. +type ProfilesClientBeginCanMigrateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProfilesClientBeginCreateOptions contains the optional parameters for the ProfilesClient.BeginCreate method. +type ProfilesClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. +type ProfilesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProfilesClientBeginMigrateOptions contains the optional parameters for the ProfilesClient.BeginMigrate method. +type ProfilesClientBeginMigrateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProfilesClientBeginMigrationCommitOptions contains the optional parameters for the ProfilesClient.BeginMigrationCommit +// method. +type ProfilesClientBeginMigrationCommitOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProfilesClientBeginUpdateOptions contains the optional parameters for the ProfilesClient.BeginUpdate method. +type ProfilesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProfilesClientGenerateSsoURIOptions contains the optional parameters for the ProfilesClient.GenerateSsoURI method. +type ProfilesClientGenerateSsoURIOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. +type ProfilesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientListByResourceGroupOptions contains the optional parameters for the ProfilesClient.NewListByResourceGroupPager +// method. +type ProfilesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method. +type ProfilesClientListOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientListResourceUsageOptions contains the optional parameters for the ProfilesClient.NewListResourceUsagePager +// method. +type ProfilesClientListResourceUsageOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientListSupportedOptimizationTypesOptions contains the optional parameters for the ProfilesClient.ListSupportedOptimizationTypes +// method. +type ProfilesClientListSupportedOptimizationTypesOptions struct { + // placeholder for future optional parameters +} + +// ResourceUsageClientListOptions contains the optional parameters for the ResourceUsageClient.NewListPager method. +type ResourceUsageClientListOptions struct { + // placeholder for future optional parameters +} + +// RoutesClientBeginCreateOptions contains the optional parameters for the RoutesClient.BeginCreate method. +type RoutesClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. +type RoutesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutesClientBeginUpdateOptions contains the optional parameters for the RoutesClient.BeginUpdate method. +type RoutesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. +type RoutesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RoutesClientListByEndpointOptions contains the optional parameters for the RoutesClient.NewListByEndpointPager method. +type RoutesClientListByEndpointOptions struct { + // placeholder for future optional parameters +} + +// RuleSetsClientBeginDeleteOptions contains the optional parameters for the RuleSetsClient.BeginDelete method. +type RuleSetsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RuleSetsClientCreateOptions contains the optional parameters for the RuleSetsClient.Create method. +type RuleSetsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// RuleSetsClientGetOptions contains the optional parameters for the RuleSetsClient.Get method. +type RuleSetsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RuleSetsClientListByProfileOptions contains the optional parameters for the RuleSetsClient.NewListByProfilePager method. +type RuleSetsClientListByProfileOptions struct { + // placeholder for future optional parameters +} + +// RuleSetsClientListResourceUsageOptions contains the optional parameters for the RuleSetsClient.NewListResourceUsagePager +// method. +type RuleSetsClientListResourceUsageOptions struct { + // placeholder for future optional parameters +} + +// RulesClientBeginCreateOptions contains the optional parameters for the RulesClient.BeginCreate method. +type RulesClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RulesClientBeginDeleteOptions contains the optional parameters for the RulesClient.BeginDelete method. +type RulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RulesClientBeginUpdateOptions contains the optional parameters for the RulesClient.BeginUpdate method. +type RulesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RulesClientGetOptions contains the optional parameters for the RulesClient.Get method. +type RulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RulesClientListByRuleSetOptions contains the optional parameters for the RulesClient.NewListByRuleSetPager method. +type RulesClientListByRuleSetOptions struct { + // placeholder for future optional parameters +} + +// SecretsClientBeginCreateOptions contains the optional parameters for the SecretsClient.BeginCreate method. +type SecretsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecretsClientBeginDeleteOptions contains the optional parameters for the SecretsClient.BeginDelete method. +type SecretsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. +type SecretsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecretsClientListByProfileOptions contains the optional parameters for the SecretsClient.NewListByProfilePager method. +type SecretsClientListByProfileOptions struct { + // placeholder for future optional parameters +} + +// SecurityPoliciesClientBeginCreateOptions contains the optional parameters for the SecurityPoliciesClient.BeginCreate method. +type SecurityPoliciesClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityPoliciesClientBeginDeleteOptions contains the optional parameters for the SecurityPoliciesClient.BeginDelete method. +type SecurityPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityPoliciesClientBeginPatchOptions contains the optional parameters for the SecurityPoliciesClient.BeginPatch method. +type SecurityPoliciesClientBeginPatchOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityPoliciesClientGetOptions contains the optional parameters for the SecurityPoliciesClient.Get method. +type SecurityPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityPoliciesClientListByProfileOptions contains the optional parameters for the SecurityPoliciesClient.NewListByProfilePager +// method. +type SecurityPoliciesClientListByProfileOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/origingroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/origingroups_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/origingroups_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/origingroups_client.go index 7834b5df..c8943e2c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/origingroups_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/origingroups_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type OriginGroupsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOriginGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OriginGroupsClient, error) { - cl, err := arm.NewClient(moduleName+".OriginGroupsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewOriginGroupsClient(subscriptionID string, credential azcore.TokenCredent // BeginCreate - Creates a new origin group within the specified endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the CDN profile which is unique within the resource group. // - endpointName - Name of the endpoint under the profile which is unique globally. @@ -61,29 +60,40 @@ func (client *OriginGroupsClient) BeginCreate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[OriginGroupsClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OriginGroupsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OriginGroupsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OriginGroupsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Create - Creates a new origin group within the specified endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *OriginGroupsClient) create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originGroupName string, originGroup OriginGroup, options *OriginGroupsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "OriginGroupsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, endpointName, originGroupName, originGroup, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -114,16 +124,19 @@ func (client *OriginGroupsClient) createCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, originGroup) + if err := runtime.MarshalAsJSON(req, originGroup); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing origin group within an endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the CDN profile which is unique within the resource group. // - endpointName - Name of the endpoint under the profile which is unique globally. @@ -136,29 +149,40 @@ func (client *OriginGroupsClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[OriginGroupsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OriginGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OriginGroupsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OriginGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes an existing origin group within an endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *OriginGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originGroupName string, options *OriginGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "OriginGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, endpointName, originGroupName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -189,7 +213,7 @@ func (client *OriginGroupsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,25 +222,32 @@ func (client *OriginGroupsClient) deleteCreateRequest(ctx context.Context, resou // Get - Gets an existing origin group within an endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the CDN profile which is unique within the resource group. // - endpointName - Name of the endpoint under the profile which is unique globally. // - originGroupName - Name of the origin group which is unique within the endpoint. // - options - OriginGroupsClientGetOptions contains the optional parameters for the OriginGroupsClient.Get method. func (client *OriginGroupsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originGroupName string, options *OriginGroupsClientGetOptions) (OriginGroupsClientGetResponse, error) { + var err error + const operationName = "OriginGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, endpointName, originGroupName, options) if err != nil { return OriginGroupsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OriginGroupsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OriginGroupsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OriginGroupsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -247,7 +278,7 @@ func (client *OriginGroupsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +295,7 @@ func (client *OriginGroupsClient) getHandleResponse(resp *http.Response) (Origin // NewListByEndpointPager - Lists all of the existing origin groups within an endpoint. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the CDN profile which is unique within the resource group. // - endpointName - Name of the endpoint under the profile which is unique globally. @@ -276,25 +307,20 @@ func (client *OriginGroupsClient) NewListByEndpointPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OriginGroupsClientListByEndpointResponse) (OriginGroupsClientListByEndpointResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByEndpointCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OriginGroupsClientListByEndpointResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OriginGroupsClient.NewListByEndpointPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByEndpointCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) + }, nil) if err != nil { return OriginGroupsClientListByEndpointResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OriginGroupsClientListByEndpointResponse{}, runtime.NewResponseError(resp) - } return client.listByEndpointHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -322,7 +348,7 @@ func (client *OriginGroupsClient) listByEndpointCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -340,7 +366,7 @@ func (client *OriginGroupsClient) listByEndpointHandleResponse(resp *http.Respon // BeginUpdate - Updates an existing origin group within an endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the CDN profile which is unique within the resource group. // - endpointName - Name of the endpoint under the profile which is unique globally. @@ -354,29 +380,40 @@ func (client *OriginGroupsClient) BeginUpdate(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[OriginGroupsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OriginGroupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OriginGroupsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OriginGroupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates an existing origin group within an endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *OriginGroupsClient) update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originGroupName string, originGroupUpdateProperties OriginGroupUpdateParameters, options *OriginGroupsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "OriginGroupsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, endpointName, originGroupName, originGroupUpdateProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -407,8 +444,11 @@ func (client *OriginGroupsClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, originGroupUpdateProperties) + if err := runtime.MarshalAsJSON(req, originGroupUpdateProperties); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/origins_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/origins_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/origins_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/origins_client.go index cbcfe4cd..028f0936 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/origins_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/origins_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type OriginsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewOriginsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OriginsClient, error) { - cl, err := arm.NewClient(moduleName+".OriginsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewOriginsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreate - Creates a new origin within the specified endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the CDN profile which is unique within the resource group. // - endpointName - Name of the endpoint under the profile which is unique globally. @@ -60,29 +59,40 @@ func (client *OriginsClient) BeginCreate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[OriginsClientCreateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OriginsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OriginsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OriginsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Create - Creates a new origin within the specified endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *OriginsClient) create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, origin Origin, options *OriginsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "OriginsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, endpointName, originName, origin, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -113,16 +123,19 @@ func (client *OriginsClient) createCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, origin) + if err := runtime.MarshalAsJSON(req, origin); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing origin within an endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the CDN profile which is unique within the resource group. // - endpointName - Name of the endpoint under the profile which is unique globally. @@ -134,29 +147,40 @@ func (client *OriginsClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[OriginsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OriginsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OriginsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OriginsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes an existing origin within an endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *OriginsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, options *OriginsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "OriginsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, endpointName, originName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -187,7 +211,7 @@ func (client *OriginsClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -196,25 +220,32 @@ func (client *OriginsClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets an existing origin within an endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the CDN profile which is unique within the resource group. // - endpointName - Name of the endpoint under the profile which is unique globally. // - originName - Name of the origin which is unique within the endpoint. // - options - OriginsClientGetOptions contains the optional parameters for the OriginsClient.Get method. func (client *OriginsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, options *OriginsClientGetOptions) (OriginsClientGetResponse, error) { + var err error + const operationName = "OriginsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, endpointName, originName, options) if err != nil { return OriginsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return OriginsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OriginsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OriginsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -245,7 +276,7 @@ func (client *OriginsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,7 +293,7 @@ func (client *OriginsClient) getHandleResponse(resp *http.Response) (OriginsClie // NewListByEndpointPager - Lists all of the existing origins within an endpoint. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the CDN profile which is unique within the resource group. // - endpointName - Name of the endpoint under the profile which is unique globally. @@ -274,25 +305,20 @@ func (client *OriginsClient) NewListByEndpointPager(resourceGroupName string, pr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *OriginsClientListByEndpointResponse) (OriginsClientListByEndpointResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByEndpointCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OriginsClientListByEndpointResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OriginsClient.NewListByEndpointPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByEndpointCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) + }, nil) if err != nil { return OriginsClientListByEndpointResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OriginsClientListByEndpointResponse{}, runtime.NewResponseError(resp) - } return client.listByEndpointHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -320,7 +346,7 @@ func (client *OriginsClient) listByEndpointCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -338,7 +364,7 @@ func (client *OriginsClient) listByEndpointHandleResponse(resp *http.Response) ( // BeginUpdate - Updates an existing origin within an endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the CDN profile which is unique within the resource group. // - endpointName - Name of the endpoint under the profile which is unique globally. @@ -351,29 +377,40 @@ func (client *OriginsClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[OriginsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[OriginsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[OriginsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[OriginsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates an existing origin within an endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *OriginsClient) update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties OriginUpdateParameters, options *OriginsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "OriginsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, endpointName, originName, originUpdateProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -404,8 +441,11 @@ func (client *OriginsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, originUpdateProperties) + if err := runtime.MarshalAsJSON(req, originUpdateProperties); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/policies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/policies_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/policies_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/policies_client.go index 7b100a78..b45759b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/policies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/policies_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type PoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".PoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewPoliciesClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Create or update policy with specified rule set name within a resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - policyName - The name of the CdnWebApplicationFirewallPolicy. // - cdnWebApplicationFirewallPolicy - Policy to be created. @@ -59,29 +58,40 @@ func (client *PoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[PoliciesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create or update policy with specified rule set name within a resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *PoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, policyName string, cdnWebApplicationFirewallPolicy WebApplicationFirewallPolicy, options *PoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, policyName, cdnWebApplicationFirewallPolicy, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -104,30 +114,39 @@ func (client *PoliciesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, cdnWebApplicationFirewallPolicy) + if err := runtime.MarshalAsJSON(req, cdnWebApplicationFirewallPolicy); err != nil { + return nil, err + } + return req, nil } // Delete - Deletes Policy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - policyName - The name of the CdnWebApplicationFirewallPolicy. // - options - PoliciesClientDeleteOptions contains the optional parameters for the PoliciesClient.Delete method. func (client *PoliciesClient) Delete(ctx context.Context, resourceGroupName string, policyName string, options *PoliciesClientDeleteOptions) (PoliciesClientDeleteResponse, error) { + var err error + const operationName = "PoliciesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, policyName, options) if err != nil { return PoliciesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PoliciesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PoliciesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PoliciesClientDeleteResponse{}, err } return PoliciesClientDeleteResponse{}, nil } @@ -152,7 +171,7 @@ func (client *PoliciesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -161,23 +180,30 @@ func (client *PoliciesClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Retrieve protection policy with specified name within a resource group. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - policyName - The name of the CdnWebApplicationFirewallPolicy. // - options - PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method. func (client *PoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string, options *PoliciesClientGetOptions) (PoliciesClientGetResponse, error) { + var err error + const operationName = "PoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, policyName, options) if err != nil { return PoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -200,7 +226,7 @@ func (client *PoliciesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,7 +243,7 @@ func (client *PoliciesClient) getHandleResponse(resp *http.Response) (PoliciesCl // NewListPager - Lists all of the protection policies within a resource group. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - options - PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method. func (client *PoliciesClient) NewListPager(resourceGroupName string, options *PoliciesClientListOptions) *runtime.Pager[PoliciesClientListResponse] { @@ -226,25 +252,20 @@ func (client *PoliciesClient) NewListPager(resourceGroupName string, options *Po return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PoliciesClientListResponse) (PoliciesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PoliciesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PoliciesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return PoliciesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PoliciesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -264,7 +285,7 @@ func (client *PoliciesClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +304,7 @@ func (client *PoliciesClient) listHandleResponse(resp *http.Response) (PoliciesC // and resource group // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - policyName - The name of the CdnWebApplicationFirewallPolicy. // - cdnWebApplicationFirewallPolicyPatchParameters - CdnWebApplicationFirewallPolicy parameters to be patched. @@ -294,9 +315,14 @@ func (client *PoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[PoliciesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PoliciesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -304,20 +330,26 @@ func (client *PoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName // and resource group // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *PoliciesClient) update(ctx context.Context, resourceGroupName string, policyName string, cdnWebApplicationFirewallPolicyPatchParameters WebApplicationFirewallPolicyPatchParameters, options *PoliciesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PoliciesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, policyName, cdnWebApplicationFirewallPolicyPatchParameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -340,8 +372,11 @@ func (client *PoliciesClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, cdnWebApplicationFirewallPolicyPatchParameters) + if err := runtime.MarshalAsJSON(req, cdnWebApplicationFirewallPolicyPatchParameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/polymorphic_helpers.go new file mode 100644 index 00000000..112fa9a7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/polymorphic_helpers.go @@ -0,0 +1,214 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import "encoding/json" + +func unmarshalCustomDomainHTTPSParametersClassification(rawMsg json.RawMessage) (CustomDomainHTTPSParametersClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b CustomDomainHTTPSParametersClassification + switch m["certificateSource"] { + case string(CertificateSourceAzureKeyVault): + b = &UserManagedHTTPSParameters{} + case string(CertificateSourceCdn): + b = &ManagedHTTPSParameters{} + default: + b = &CustomDomainHTTPSParameters{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDeliveryRuleActionAutoGeneratedClassification(rawMsg json.RawMessage) (DeliveryRuleActionAutoGeneratedClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DeliveryRuleActionAutoGeneratedClassification + switch m["name"] { + case string(DeliveryRuleActionCacheExpiration): + b = &DeliveryRuleCacheExpirationAction{} + case string(DeliveryRuleActionCacheKeyQueryString): + b = &DeliveryRuleCacheKeyQueryStringAction{} + case string(DeliveryRuleActionModifyRequestHeader): + b = &DeliveryRuleRequestHeaderAction{} + case string(DeliveryRuleActionModifyResponseHeader): + b = &DeliveryRuleResponseHeaderAction{} + case string(DeliveryRuleActionOriginGroupOverride): + b = &OriginGroupOverrideAction{} + case string(DeliveryRuleActionRouteConfigurationOverride): + b = &DeliveryRuleRouteConfigurationOverrideAction{} + case string(DeliveryRuleActionURLRedirect): + b = &URLRedirectAction{} + case string(DeliveryRuleActionURLRewrite): + b = &URLRewriteAction{} + case string(DeliveryRuleActionURLSigning): + b = &URLSigningAction{} + default: + b = &DeliveryRuleActionAutoGenerated{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDeliveryRuleActionAutoGeneratedClassificationArray(rawMsg json.RawMessage) ([]DeliveryRuleActionAutoGeneratedClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]DeliveryRuleActionAutoGeneratedClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalDeliveryRuleActionAutoGeneratedClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalDeliveryRuleConditionClassification(rawMsg json.RawMessage) (DeliveryRuleConditionClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DeliveryRuleConditionClassification + switch m["name"] { + case string(MatchVariableClientPort): + b = &DeliveryRuleClientPortCondition{} + case string(MatchVariableCookies): + b = &DeliveryRuleCookiesCondition{} + case string(MatchVariableHostName): + b = &DeliveryRuleHostNameCondition{} + case string(MatchVariableHTTPVersion): + b = &DeliveryRuleHTTPVersionCondition{} + case string(MatchVariableIsDevice): + b = &DeliveryRuleIsDeviceCondition{} + case string(MatchVariablePostArgs): + b = &DeliveryRulePostArgsCondition{} + case string(MatchVariableQueryString): + b = &DeliveryRuleQueryStringCondition{} + case string(MatchVariableRemoteAddress): + b = &DeliveryRuleRemoteAddressCondition{} + case string(MatchVariableRequestBody): + b = &DeliveryRuleRequestBodyCondition{} + case string(MatchVariableRequestHeader): + b = &DeliveryRuleRequestHeaderCondition{} + case string(MatchVariableRequestMethod): + b = &DeliveryRuleRequestMethodCondition{} + case string(MatchVariableRequestScheme): + b = &DeliveryRuleRequestSchemeCondition{} + case string(MatchVariableRequestURI): + b = &DeliveryRuleRequestURICondition{} + case string(MatchVariableServerPort): + b = &DeliveryRuleServerPortCondition{} + case string(MatchVariableSocketAddr): + b = &DeliveryRuleSocketAddrCondition{} + case string(MatchVariableSSLProtocol): + b = &DeliveryRuleSSLProtocolCondition{} + case string(MatchVariableURLFileExtension): + b = &DeliveryRuleURLFileExtensionCondition{} + case string(MatchVariableURLFileName): + b = &DeliveryRuleURLFileNameCondition{} + case string(MatchVariableURLPath): + b = &DeliveryRuleURLPathCondition{} + default: + b = &DeliveryRuleCondition{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDeliveryRuleConditionClassificationArray(rawMsg json.RawMessage) ([]DeliveryRuleConditionClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]DeliveryRuleConditionClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalDeliveryRuleConditionClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalSecretParametersClassification(rawMsg json.RawMessage) (SecretParametersClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SecretParametersClassification + switch m["type"] { + case string(SecretTypeAzureFirstPartyManagedCertificate): + b = &AzureFirstPartyManagedCertificateParameters{} + case string(SecretTypeCustomerCertificate): + b = &CustomerCertificateParameters{} + case string(SecretTypeManagedCertificate): + b = &ManagedCertificateParameters{} + case string(SecretTypeURLSigningKey): + b = &URLSigningKeyParameters{} + default: + b = &SecretParameters{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalSecurityPolicyPropertiesParametersClassification(rawMsg json.RawMessage) (SecurityPolicyPropertiesParametersClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SecurityPolicyPropertiesParametersClassification + switch m["type"] { + case string(SecurityPolicyTypeWebApplicationFirewall): + b = &SecurityPolicyWebApplicationFirewallParameters{} + default: + b = &SecurityPolicyPropertiesParameters{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/profiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/profiles_client.go new file mode 100644 index 00000000..d6bd6a7f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/profiles_client.go @@ -0,0 +1,899 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProfilesClient contains the methods for the Profiles group. +// Don't use this type directly, use NewProfilesClient() instead. +type ProfilesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProfilesClient creates a new instance of ProfilesClient with the specified values. +// - subscriptionID - Azure Subscription ID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProfilesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProfilesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCanMigrate - Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - canMigrateParameters - Properties needed to check if cdn profile or classic frontdoor can be migrated. +// - options - ProfilesClientBeginCanMigrateOptions contains the optional parameters for the ProfilesClient.BeginCanMigrate +// method. +func (client *ProfilesClient) BeginCanMigrate(ctx context.Context, resourceGroupName string, canMigrateParameters CanMigrateParameters, options *ProfilesClientBeginCanMigrateOptions) (*runtime.Poller[ProfilesClientCanMigrateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.canMigrate(ctx, resourceGroupName, canMigrateParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProfilesClientCanMigrateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProfilesClientCanMigrateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CanMigrate - Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *ProfilesClient) canMigrate(ctx context.Context, resourceGroupName string, canMigrateParameters CanMigrateParameters, options *ProfilesClientBeginCanMigrateOptions) (*http.Response, error) { + var err error + const operationName = "ProfilesClient.BeginCanMigrate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.canMigrateCreateRequest(ctx, resourceGroupName, canMigrateParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// canMigrateCreateRequest creates the CanMigrate request. +func (client *ProfilesClient) canMigrateCreateRequest(ctx context.Context, resourceGroupName string, canMigrateParameters CanMigrateParameters, options *ProfilesClientBeginCanMigrateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, canMigrateParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreate - Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under +// the specified subscription and resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the +// resource group. +// - profile - Profile properties needed to create a new profile. +// - options - ProfilesClientBeginCreateOptions contains the optional parameters for the ProfilesClient.BeginCreate method. +func (client *ProfilesClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, profile Profile, options *ProfilesClientBeginCreateOptions) (*runtime.Poller[ProfilesClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, profileName, profile, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProfilesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProfilesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the +// specified subscription and resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *ProfilesClient) create(ctx context.Context, resourceGroupName string, profileName string, profile Profile, options *ProfilesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ProfilesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, profile, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ProfilesClient) createCreateRequest(ctx context.Context, resourceGroupName string, profileName string, profile Profile, options *ProfilesClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, profile); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified +// parameters. Deleting a profile will result in the deletion of all of the sub-resources +// including endpoints, origins and custom domains. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the +// resource group. +// - options - ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. +func (client *ProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientBeginDeleteOptions) (*runtime.Poller[ProfilesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, profileName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProfilesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProfilesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified parameters. +// Deleting a profile will result in the deletion of all of the sub-resources +// including endpoints, origins and custom domains. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *ProfilesClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ProfilesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ProfilesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GenerateSsoURI - Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used +// to configure advanced feature capabilities that are not yet available in the Azure portal, such +// as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium +// profile. The SSO URI changes approximately every 10 minutes. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - options - ProfilesClientGenerateSsoURIOptions contains the optional parameters for the ProfilesClient.GenerateSsoURI method. +func (client *ProfilesClient) GenerateSsoURI(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGenerateSsoURIOptions) (ProfilesClientGenerateSsoURIResponse, error) { + var err error + const operationName = "ProfilesClient.GenerateSsoURI" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateSsoURICreateRequest(ctx, resourceGroupName, profileName, options) + if err != nil { + return ProfilesClientGenerateSsoURIResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProfilesClientGenerateSsoURIResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProfilesClientGenerateSsoURIResponse{}, err + } + resp, err := client.generateSsoURIHandleResponse(httpResp) + return resp, err +} + +// generateSsoURICreateRequest creates the GenerateSsoURI request. +func (client *ProfilesClient) generateSsoURICreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGenerateSsoURIOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// generateSsoURIHandleResponse handles the GenerateSsoURI response. +func (client *ProfilesClient) generateSsoURIHandleResponse(resp *http.Response) (ProfilesClientGenerateSsoURIResponse, error) { + result := ProfilesClientGenerateSsoURIResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SsoURI); err != nil { + return ProfilesClientGenerateSsoURIResponse{}, err + } + return result, nil +} + +// Get - Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under +// the specified subscription and resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the +// resource group. +// - options - ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. +func (client *ProfilesClient) Get(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGetOptions) (ProfilesClientGetResponse, error) { + var err error + const operationName = "ProfilesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, options) + if err != nil { + return ProfilesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProfilesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProfilesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProfilesClient) getCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProfilesClient) getHandleResponse(resp *http.Response) (ProfilesClientGetResponse, error) { + result := ProfilesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { + return ProfilesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription. +// +// Generated from API version 2024-02-01 +// - options - ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method. +func (client *ProfilesClient) NewListPager(options *ProfilesClientListOptions) *runtime.Pager[ProfilesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ProfilesClientListResponse]{ + More: func(page ProfilesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProfilesClientListResponse) (ProfilesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProfilesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return ProfilesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ProfilesClient) listCreateRequest(ctx context.Context, options *ProfilesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ProfilesClient) listHandleResponse(resp *http.Response) (ProfilesClientListResponse, error) { + result := ProfilesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProfileListResult); err != nil { + return ProfilesClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within +// a resource group. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - options - ProfilesClientListByResourceGroupOptions contains the optional parameters for the ProfilesClient.NewListByResourceGroupPager +// method. +func (client *ProfilesClient) NewListByResourceGroupPager(resourceGroupName string, options *ProfilesClientListByResourceGroupOptions) *runtime.Pager[ProfilesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ProfilesClientListByResourceGroupResponse]{ + More: func(page ProfilesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProfilesClientListByResourceGroupResponse) (ProfilesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProfilesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ProfilesClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ProfilesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ProfilesClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ProfilesClient) listByResourceGroupHandleResponse(resp *http.Response) (ProfilesClientListByResourceGroupResponse, error) { + result := ProfilesClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProfileListResult); err != nil { + return ProfilesClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListResourceUsagePager - Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or +// Azure Front Door Premium or CDN profile. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the +// resource group. +// - options - ProfilesClientListResourceUsageOptions contains the optional parameters for the ProfilesClient.NewListResourceUsagePager +// method. +func (client *ProfilesClient) NewListResourceUsagePager(resourceGroupName string, profileName string, options *ProfilesClientListResourceUsageOptions) *runtime.Pager[ProfilesClientListResourceUsageResponse] { + return runtime.NewPager(runtime.PagingHandler[ProfilesClientListResourceUsageResponse]{ + More: func(page ProfilesClientListResourceUsageResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProfilesClientListResourceUsageResponse) (ProfilesClientListResourceUsageResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProfilesClient.NewListResourceUsagePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, options) + }, nil) + if err != nil { + return ProfilesClientListResourceUsageResponse{}, err + } + return client.listResourceUsageHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listResourceUsageCreateRequest creates the ListResourceUsage request. +func (client *ProfilesClient) listResourceUsageCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientListResourceUsageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listResourceUsageHandleResponse handles the ListResourceUsage response. +func (client *ProfilesClient) listResourceUsageHandleResponse(resp *http.Response) (ProfilesClientListResourceUsageResponse, error) { + result := ProfilesClientListResourceUsageResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceUsageListResult); err != nil { + return ProfilesClientListResourceUsageResponse{}, err + } + return result, nil +} + +// ListSupportedOptimizationTypes - Gets the supported optimization types for the current profile. A user can create an endpoint +// with an optimization type from the listed values. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the +// resource group. +// - options - ProfilesClientListSupportedOptimizationTypesOptions contains the optional parameters for the ProfilesClient.ListSupportedOptimizationTypes +// method. +func (client *ProfilesClient) ListSupportedOptimizationTypes(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientListSupportedOptimizationTypesOptions) (ProfilesClientListSupportedOptimizationTypesResponse, error) { + var err error + const operationName = "ProfilesClient.ListSupportedOptimizationTypes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listSupportedOptimizationTypesCreateRequest(ctx, resourceGroupName, profileName, options) + if err != nil { + return ProfilesClientListSupportedOptimizationTypesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProfilesClientListSupportedOptimizationTypesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProfilesClientListSupportedOptimizationTypesResponse{}, err + } + resp, err := client.listSupportedOptimizationTypesHandleResponse(httpResp) + return resp, err +} + +// listSupportedOptimizationTypesCreateRequest creates the ListSupportedOptimizationTypes request. +func (client *ProfilesClient) listSupportedOptimizationTypesCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientListSupportedOptimizationTypesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSupportedOptimizationTypesHandleResponse handles the ListSupportedOptimizationTypes response. +func (client *ProfilesClient) listSupportedOptimizationTypesHandleResponse(resp *http.Response) (ProfilesClientListSupportedOptimizationTypesResponse, error) { + result := ProfilesClientListSupportedOptimizationTypesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SupportedOptimizationTypesListResult); err != nil { + return ProfilesClientListSupportedOptimizationTypesResponse{}, err + } + return result, nil +} + +// BeginMigrate - Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after +// this. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - migrationParameters - Properties needed to migrate the profile. +// - options - ProfilesClientBeginMigrateOptions contains the optional parameters for the ProfilesClient.BeginMigrate method. +func (client *ProfilesClient) BeginMigrate(ctx context.Context, resourceGroupName string, migrationParameters MigrationParameters, options *ProfilesClientBeginMigrateOptions) (*runtime.Poller[ProfilesClientMigrateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrate(ctx, resourceGroupName, migrationParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProfilesClientMigrateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProfilesClientMigrateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Migrate - Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *ProfilesClient) migrate(ctx context.Context, resourceGroupName string, migrationParameters MigrationParameters, options *ProfilesClientBeginMigrateOptions) (*http.Response, error) { + var err error + const operationName = "ProfilesClient.BeginMigrate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateCreateRequest(ctx, resourceGroupName, migrationParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrateCreateRequest creates the Migrate request. +func (client *ProfilesClient) migrateCreateRequest(ctx context.Context, resourceGroupName string, migrationParameters MigrationParameters, options *ProfilesClientBeginMigrateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, migrationParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginMigrationCommit - Commit the migrated Azure Frontdoor(Standard/Premium) profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the CDN profile which is unique within the resource group. +// - options - ProfilesClientBeginMigrationCommitOptions contains the optional parameters for the ProfilesClient.BeginMigrationCommit +// method. +func (client *ProfilesClient) BeginMigrationCommit(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientBeginMigrationCommitOptions) (*runtime.Poller[ProfilesClientMigrationCommitResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrationCommit(ctx, resourceGroupName, profileName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProfilesClientMigrationCommitResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProfilesClientMigrationCommitResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// MigrationCommit - Commit the migrated Azure Frontdoor(Standard/Premium) profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *ProfilesClient) migrationCommit(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientBeginMigrationCommitOptions) (*http.Response, error) { + var err error + const operationName = "ProfilesClient.BeginMigrationCommit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrationCommitCreateRequest(ctx, resourceGroupName, profileName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrationCommitCreateRequest creates the MigrationCommit request. +func (client *ProfilesClient) migrationCommitCreateRequest(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientBeginMigrationCommitOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationCommit" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdate - Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified +// profile name under the specified subscription and resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the +// resource group. +// - profileUpdateParameters - Profile properties needed to update an existing profile. +// - options - ProfilesClientBeginUpdateOptions contains the optional parameters for the ProfilesClient.BeginUpdate method. +func (client *ProfilesClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, options *ProfilesClientBeginUpdateOptions) (*runtime.Poller[ProfilesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, profileName, profileUpdateParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProfilesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProfilesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile +// name under the specified subscription and resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *ProfilesClient) update(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, options *ProfilesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ProfilesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, profileUpdateParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ProfilesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, options *ProfilesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, profileUpdateParameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/resourceusage_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/resourceusage_client.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/resourceusage_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/resourceusage_client.go index 0d1e9855..f47342b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/resourceusage_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/resourceusage_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type ResourceUsageClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewResourceUsageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceUsageClient, error) { - cl, err := arm.NewClient(moduleName+".ResourceUsageClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -46,7 +45,7 @@ func NewResourceUsageClient(subscriptionID string, credential azcore.TokenCreden // NewListPager - Check the quota and actual usage of the CDN profiles under the given subscription. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - options - ResourceUsageClientListOptions contains the optional parameters for the ResourceUsageClient.NewListPager method. func (client *ResourceUsageClient) NewListPager(options *ResourceUsageClientListOptions) *runtime.Pager[ResourceUsageClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ResourceUsageClientListResponse]{ @@ -54,25 +53,20 @@ func (client *ResourceUsageClient) NewListPager(options *ResourceUsageClientList return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceUsageClientListResponse) (ResourceUsageClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceUsageClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ResourceUsageClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceUsageClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceUsageClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -88,7 +82,7 @@ func (client *ResourceUsageClient) listCreateRequest(ctx context.Context, option return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/responses.go new file mode 100644 index 00000000..cafb7e10 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/responses.go @@ -0,0 +1,685 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +// AFDCustomDomainsClientCreateResponse contains the response from method AFDCustomDomainsClient.BeginCreate. +type AFDCustomDomainsClientCreateResponse struct { + // Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + AFDDomain +} + +// AFDCustomDomainsClientDeleteResponse contains the response from method AFDCustomDomainsClient.BeginDelete. +type AFDCustomDomainsClientDeleteResponse struct { + // placeholder for future response values +} + +// AFDCustomDomainsClientGetResponse contains the response from method AFDCustomDomainsClient.Get. +type AFDCustomDomainsClientGetResponse struct { + // Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + AFDDomain +} + +// AFDCustomDomainsClientListByProfileResponse contains the response from method AFDCustomDomainsClient.NewListByProfilePager. +type AFDCustomDomainsClientListByProfileResponse struct { + // Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of results. + AFDDomainListResult +} + +// AFDCustomDomainsClientRefreshValidationTokenResponse contains the response from method AFDCustomDomainsClient.BeginRefreshValidationToken. +type AFDCustomDomainsClientRefreshValidationTokenResponse struct { + // placeholder for future response values +} + +// AFDCustomDomainsClientUpdateResponse contains the response from method AFDCustomDomainsClient.BeginUpdate. +type AFDCustomDomainsClientUpdateResponse struct { + // Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + AFDDomain +} + +// AFDEndpointsClientCreateResponse contains the response from method AFDEndpointsClient.BeginCreate. +type AFDEndpointsClientCreateResponse struct { + // Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as + // origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. + AFDEndpoint +} + +// AFDEndpointsClientDeleteResponse contains the response from method AFDEndpointsClient.BeginDelete. +type AFDEndpointsClientDeleteResponse struct { + // placeholder for future response values +} + +// AFDEndpointsClientGetResponse contains the response from method AFDEndpointsClient.Get. +type AFDEndpointsClientGetResponse struct { + // Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as + // origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. + AFDEndpoint +} + +// AFDEndpointsClientListByProfileResponse contains the response from method AFDEndpointsClient.NewListByProfilePager. +type AFDEndpointsClientListByProfileResponse struct { + // Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of results. + AFDEndpointListResult +} + +// AFDEndpointsClientListResourceUsageResponse contains the response from method AFDEndpointsClient.NewListResourceUsagePager. +type AFDEndpointsClientListResourceUsageResponse struct { + // The list usages operation response. + UsagesListResult +} + +// AFDEndpointsClientPurgeContentResponse contains the response from method AFDEndpointsClient.BeginPurgeContent. +type AFDEndpointsClientPurgeContentResponse struct { + // placeholder for future response values +} + +// AFDEndpointsClientUpdateResponse contains the response from method AFDEndpointsClient.BeginUpdate. +type AFDEndpointsClientUpdateResponse struct { + // Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as + // origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. + AFDEndpoint +} + +// AFDEndpointsClientValidateCustomDomainResponse contains the response from method AFDEndpointsClient.ValidateCustomDomain. +type AFDEndpointsClientValidateCustomDomainResponse struct { + // Output of custom domain validation. + ValidateCustomDomainOutput +} + +// AFDOriginGroupsClientCreateResponse contains the response from method AFDOriginGroupsClient.BeginCreate. +type AFDOriginGroupsClientCreateResponse struct { + // AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from Azure + // Front Door. + AFDOriginGroup +} + +// AFDOriginGroupsClientDeleteResponse contains the response from method AFDOriginGroupsClient.BeginDelete. +type AFDOriginGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// AFDOriginGroupsClientGetResponse contains the response from method AFDOriginGroupsClient.Get. +type AFDOriginGroupsClientGetResponse struct { + // AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from Azure + // Front Door. + AFDOriginGroup +} + +// AFDOriginGroupsClientListByProfileResponse contains the response from method AFDOriginGroupsClient.NewListByProfilePager. +type AFDOriginGroupsClientListByProfileResponse struct { + // Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + // set of results. + AFDOriginGroupListResult +} + +// AFDOriginGroupsClientListResourceUsageResponse contains the response from method AFDOriginGroupsClient.NewListResourceUsagePager. +type AFDOriginGroupsClientListResourceUsageResponse struct { + // The list usages operation response. + UsagesListResult +} + +// AFDOriginGroupsClientUpdateResponse contains the response from method AFDOriginGroupsClient.BeginUpdate. +type AFDOriginGroupsClientUpdateResponse struct { + // AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from Azure + // Front Door. + AFDOriginGroup +} + +// AFDOriginsClientCreateResponse contains the response from method AFDOriginsClient.BeginCreate. +type AFDOriginsClientCreateResponse struct { + // Azure Front Door origin is the source of the content being delivered via Azure Front Door. When the edge nodes represented + // by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins. + AFDOrigin +} + +// AFDOriginsClientDeleteResponse contains the response from method AFDOriginsClient.BeginDelete. +type AFDOriginsClientDeleteResponse struct { + // placeholder for future response values +} + +// AFDOriginsClientGetResponse contains the response from method AFDOriginsClient.Get. +type AFDOriginsClientGetResponse struct { + // Azure Front Door origin is the source of the content being delivered via Azure Front Door. When the edge nodes represented + // by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins. + AFDOrigin +} + +// AFDOriginsClientListByOriginGroupResponse contains the response from method AFDOriginsClient.NewListByOriginGroupPager. +type AFDOriginsClientListByOriginGroupResponse struct { + // Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + AFDOriginListResult +} + +// AFDOriginsClientUpdateResponse contains the response from method AFDOriginsClient.BeginUpdate. +type AFDOriginsClientUpdateResponse struct { + // Azure Front Door origin is the source of the content being delivered via Azure Front Door. When the edge nodes represented + // by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins. + AFDOrigin +} + +// AFDProfilesClientCheckEndpointNameAvailabilityResponse contains the response from method AFDProfilesClient.CheckEndpointNameAvailability. +type AFDProfilesClientCheckEndpointNameAvailabilityResponse struct { + // Output of check name availability API. + CheckEndpointNameAvailabilityOutput +} + +// AFDProfilesClientCheckHostNameAvailabilityResponse contains the response from method AFDProfilesClient.CheckHostNameAvailability. +type AFDProfilesClientCheckHostNameAvailabilityResponse struct { + // Output of check name availability API. + CheckNameAvailabilityOutput +} + +// AFDProfilesClientListResourceUsageResponse contains the response from method AFDProfilesClient.NewListResourceUsagePager. +type AFDProfilesClientListResourceUsageResponse struct { + // The list usages operation response. + UsagesListResult +} + +// AFDProfilesClientUpgradeResponse contains the response from method AFDProfilesClient.BeginUpgrade. +type AFDProfilesClientUpgradeResponse struct { + // A profile is a logical grouping of endpoints that share the same settings. + Profile +} + +// AFDProfilesClientValidateSecretResponse contains the response from method AFDProfilesClient.ValidateSecret. +type AFDProfilesClientValidateSecretResponse struct { + // Output of the validated secret. + ValidateSecretOutput +} + +// CustomDomainsClientCreateResponse contains the response from method CustomDomainsClient.BeginCreate. +type CustomDomainsClientCreateResponse struct { + // Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + CustomDomain +} + +// CustomDomainsClientDeleteResponse contains the response from method CustomDomainsClient.BeginDelete. +type CustomDomainsClientDeleteResponse struct { + // Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + CustomDomain +} + +// CustomDomainsClientDisableCustomHTTPSResponse contains the response from method CustomDomainsClient.BeginDisableCustomHTTPS. +type CustomDomainsClientDisableCustomHTTPSResponse struct { + // Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + CustomDomain +} + +// CustomDomainsClientEnableCustomHTTPSResponse contains the response from method CustomDomainsClient.BeginEnableCustomHTTPS. +type CustomDomainsClientEnableCustomHTTPSResponse struct { + // Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + CustomDomain +} + +// CustomDomainsClientGetResponse contains the response from method CustomDomainsClient.Get. +type CustomDomainsClientGetResponse struct { + // Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + CustomDomain +} + +// CustomDomainsClientListByEndpointResponse contains the response from method CustomDomainsClient.NewListByEndpointPager. +type CustomDomainsClientListByEndpointResponse struct { + // Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the next + // set of results. + CustomDomainListResult +} + +// EdgeNodesClientListResponse contains the response from method EdgeNodesClient.NewListPager. +type EdgeNodesClientListResponse struct { + // Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next set + // of results. + EdgenodeResult +} + +// EndpointsClientCreateResponse contains the response from method EndpointsClient.BeginCreate. +type EndpointsClientCreateResponse struct { + // CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + // caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + Endpoint +} + +// EndpointsClientDeleteResponse contains the response from method EndpointsClient.BeginDelete. +type EndpointsClientDeleteResponse struct { + // placeholder for future response values +} + +// EndpointsClientGetResponse contains the response from method EndpointsClient.Get. +type EndpointsClientGetResponse struct { + // CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + // caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + Endpoint +} + +// EndpointsClientListByProfileResponse contains the response from method EndpointsClient.NewListByProfilePager. +type EndpointsClientListByProfileResponse struct { + // Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of results. + EndpointListResult +} + +// EndpointsClientListResourceUsageResponse contains the response from method EndpointsClient.NewListResourceUsagePager. +type EndpointsClientListResourceUsageResponse struct { + // Output of check resource usage API. + ResourceUsageListResult +} + +// EndpointsClientLoadContentResponse contains the response from method EndpointsClient.BeginLoadContent. +type EndpointsClientLoadContentResponse struct { + // placeholder for future response values +} + +// EndpointsClientPurgeContentResponse contains the response from method EndpointsClient.BeginPurgeContent. +type EndpointsClientPurgeContentResponse struct { + // placeholder for future response values +} + +// EndpointsClientStartResponse contains the response from method EndpointsClient.BeginStart. +type EndpointsClientStartResponse struct { + // CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + // caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + Endpoint +} + +// EndpointsClientStopResponse contains the response from method EndpointsClient.BeginStop. +type EndpointsClientStopResponse struct { + // CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + // caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + Endpoint +} + +// EndpointsClientUpdateResponse contains the response from method EndpointsClient.BeginUpdate. +type EndpointsClientUpdateResponse struct { + // CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + // caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + Endpoint +} + +// EndpointsClientValidateCustomDomainResponse contains the response from method EndpointsClient.ValidateCustomDomain. +type EndpointsClientValidateCustomDomainResponse struct { + // Output of custom domain validation. + ValidateCustomDomainOutput +} + +// LogAnalyticsClientGetLogAnalyticsLocationsResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsLocations. +type LogAnalyticsClientGetLogAnalyticsLocationsResponse struct { + // Continents Response + ContinentsResponse +} + +// LogAnalyticsClientGetLogAnalyticsMetricsResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsMetrics. +type LogAnalyticsClientGetLogAnalyticsMetricsResponse struct { + // Metrics Response + MetricsResponse +} + +// LogAnalyticsClientGetLogAnalyticsRankingsResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsRankings. +type LogAnalyticsClientGetLogAnalyticsRankingsResponse struct { + // Rankings Response + RankingsResponse +} + +// LogAnalyticsClientGetLogAnalyticsResourcesResponse contains the response from method LogAnalyticsClient.GetLogAnalyticsResources. +type LogAnalyticsClientGetLogAnalyticsResourcesResponse struct { + // Resources Response + ResourcesResponse +} + +// LogAnalyticsClientGetWafLogAnalyticsMetricsResponse contains the response from method LogAnalyticsClient.GetWafLogAnalyticsMetrics. +type LogAnalyticsClientGetWafLogAnalyticsMetricsResponse struct { + // Waf Metrics Response + WafMetricsResponse +} + +// LogAnalyticsClientGetWafLogAnalyticsRankingsResponse contains the response from method LogAnalyticsClient.GetWafLogAnalyticsRankings. +type LogAnalyticsClientGetWafLogAnalyticsRankingsResponse struct { + // Waf Rankings Response + WafRankingsResponse +} + +// ManagedRuleSetsClientListResponse contains the response from method ManagedRuleSetsClient.NewListPager. +type ManagedRuleSetsClientListResponse struct { + // List of managed rule set definitions available for use in a policy. + ManagedRuleSetDefinitionList +} + +// ManagementClientCheckEndpointNameAvailabilityResponse contains the response from method ManagementClient.CheckEndpointNameAvailability. +type ManagementClientCheckEndpointNameAvailabilityResponse struct { + // Output of check name availability API. + CheckEndpointNameAvailabilityOutput +} + +// ManagementClientCheckNameAvailabilityResponse contains the response from method ManagementClient.CheckNameAvailability. +type ManagementClientCheckNameAvailabilityResponse struct { + // Output of check name availability API. + CheckNameAvailabilityOutput +} + +// ManagementClientCheckNameAvailabilityWithSubscriptionResponse contains the response from method ManagementClient.CheckNameAvailabilityWithSubscription. +type ManagementClientCheckNameAvailabilityWithSubscriptionResponse struct { + // Output of check name availability API. + CheckNameAvailabilityOutput +} + +// ManagementClientValidateProbeResponse contains the response from method ManagementClient.ValidateProbe. +type ManagementClientValidateProbeResponse struct { + // Output of the validate probe API. + ValidateProbeOutput +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results. + OperationsListResult +} + +// OriginGroupsClientCreateResponse contains the response from method OriginGroupsClient.BeginCreate. +type OriginGroupsClientCreateResponse struct { + // Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + OriginGroup +} + +// OriginGroupsClientDeleteResponse contains the response from method OriginGroupsClient.BeginDelete. +type OriginGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// OriginGroupsClientGetResponse contains the response from method OriginGroupsClient.Get. +type OriginGroupsClientGetResponse struct { + // Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + OriginGroup +} + +// OriginGroupsClientListByEndpointResponse contains the response from method OriginGroupsClient.NewListByEndpointPager. +type OriginGroupsClientListByEndpointResponse struct { + // Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + // set of results. + OriginGroupListResult +} + +// OriginGroupsClientUpdateResponse contains the response from method OriginGroupsClient.BeginUpdate. +type OriginGroupsClientUpdateResponse struct { + // Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + OriginGroup +} + +// OriginsClientCreateResponse contains the response from method OriginsClient.BeginCreate. +type OriginsClientCreateResponse struct { + // CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + // have the requested content cached, they attempt to fetch it from one or more of the configured origins. + Origin +} + +// OriginsClientDeleteResponse contains the response from method OriginsClient.BeginDelete. +type OriginsClientDeleteResponse struct { + // placeholder for future response values +} + +// OriginsClientGetResponse contains the response from method OriginsClient.Get. +type OriginsClientGetResponse struct { + // CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + // have the requested content cached, they attempt to fetch it from one or more of the configured origins. + Origin +} + +// OriginsClientListByEndpointResponse contains the response from method OriginsClient.NewListByEndpointPager. +type OriginsClientListByEndpointResponse struct { + // Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + OriginListResult +} + +// OriginsClientUpdateResponse contains the response from method OriginsClient.BeginUpdate. +type OriginsClientUpdateResponse struct { + // CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + // have the requested content cached, they attempt to fetch it from one or more of the configured origins. + Origin +} + +// PoliciesClientCreateOrUpdateResponse contains the response from method PoliciesClient.BeginCreateOrUpdate. +type PoliciesClientCreateOrUpdateResponse struct { + // Defines web application firewall policy for Azure CDN. + WebApplicationFirewallPolicy +} + +// PoliciesClientDeleteResponse contains the response from method PoliciesClient.Delete. +type PoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// PoliciesClientGetResponse contains the response from method PoliciesClient.Get. +type PoliciesClientGetResponse struct { + // Defines web application firewall policy for Azure CDN. + WebApplicationFirewallPolicy +} + +// PoliciesClientListResponse contains the response from method PoliciesClient.NewListPager. +type PoliciesClientListResponse struct { + // Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of WebApplicationFirewallPolicy objects + // and a URL link to get the next set of results. + WebApplicationFirewallPolicyList +} + +// PoliciesClientUpdateResponse contains the response from method PoliciesClient.BeginUpdate. +type PoliciesClientUpdateResponse struct { + // Defines web application firewall policy for Azure CDN. + WebApplicationFirewallPolicy +} + +// ProfilesClientCanMigrateResponse contains the response from method ProfilesClient.BeginCanMigrate. +type ProfilesClientCanMigrateResponse struct { + // Result for canMigrate operation. + CanMigrateResult +} + +// ProfilesClientCreateResponse contains the response from method ProfilesClient.BeginCreate. +type ProfilesClientCreateResponse struct { + // A profile is a logical grouping of endpoints that share the same settings. + Profile +} + +// ProfilesClientDeleteResponse contains the response from method ProfilesClient.BeginDelete. +type ProfilesClientDeleteResponse struct { + // placeholder for future response values +} + +// ProfilesClientGenerateSsoURIResponse contains the response from method ProfilesClient.GenerateSsoURI. +type ProfilesClientGenerateSsoURIResponse struct { + // The URI required to login to the supplemental portal from the Azure portal. + SsoURI +} + +// ProfilesClientGetResponse contains the response from method ProfilesClient.Get. +type ProfilesClientGetResponse struct { + // A profile is a logical grouping of endpoints that share the same settings. + Profile +} + +// ProfilesClientListByResourceGroupResponse contains the response from method ProfilesClient.NewListByResourceGroupPager. +type ProfilesClientListByResourceGroupResponse struct { + // Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results. + ProfileListResult +} + +// ProfilesClientListResourceUsageResponse contains the response from method ProfilesClient.NewListResourceUsagePager. +type ProfilesClientListResourceUsageResponse struct { + // Output of check resource usage API. + ResourceUsageListResult +} + +// ProfilesClientListResponse contains the response from method ProfilesClient.NewListPager. +type ProfilesClientListResponse struct { + // Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results. + ProfileListResult +} + +// ProfilesClientListSupportedOptimizationTypesResponse contains the response from method ProfilesClient.ListSupportedOptimizationTypes. +type ProfilesClientListSupportedOptimizationTypesResponse struct { + // The result of the GetSupportedOptimizationTypes API + SupportedOptimizationTypesListResult +} + +// ProfilesClientMigrateResponse contains the response from method ProfilesClient.BeginMigrate. +type ProfilesClientMigrateResponse struct { + // Result for migrate operation. + MigrateResult +} + +// ProfilesClientMigrationCommitResponse contains the response from method ProfilesClient.BeginMigrationCommit. +type ProfilesClientMigrationCommitResponse struct { + // placeholder for future response values +} + +// ProfilesClientUpdateResponse contains the response from method ProfilesClient.BeginUpdate. +type ProfilesClientUpdateResponse struct { + // A profile is a logical grouping of endpoints that share the same settings. + Profile +} + +// ResourceUsageClientListResponse contains the response from method ResourceUsageClient.NewListPager. +type ResourceUsageClientListResponse struct { + // Output of check resource usage API. + ResourceUsageListResult +} + +// RoutesClientCreateResponse contains the response from method RoutesClient.BeginCreate. +type RoutesClientCreateResponse struct { + // Friendly Routes name mapping to the any Routes or secret related information. + Route +} + +// RoutesClientDeleteResponse contains the response from method RoutesClient.BeginDelete. +type RoutesClientDeleteResponse struct { + // placeholder for future response values +} + +// RoutesClientGetResponse contains the response from method RoutesClient.Get. +type RoutesClientGetResponse struct { + // Friendly Routes name mapping to the any Routes or secret related information. + Route +} + +// RoutesClientListByEndpointResponse contains the response from method RoutesClient.NewListByEndpointPager. +type RoutesClientListByEndpointResponse struct { + // Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of results. + RouteListResult +} + +// RoutesClientUpdateResponse contains the response from method RoutesClient.BeginUpdate. +type RoutesClientUpdateResponse struct { + // Friendly Routes name mapping to the any Routes or secret related information. + Route +} + +// RuleSetsClientCreateResponse contains the response from method RuleSetsClient.Create. +type RuleSetsClientCreateResponse struct { + // Friendly RuleSet name mapping to the any RuleSet or secret related information. + RuleSet +} + +// RuleSetsClientDeleteResponse contains the response from method RuleSetsClient.BeginDelete. +type RuleSetsClientDeleteResponse struct { + // placeholder for future response values +} + +// RuleSetsClientGetResponse contains the response from method RuleSetsClient.Get. +type RuleSetsClientGetResponse struct { + // Friendly RuleSet name mapping to the any RuleSet or secret related information. + RuleSet +} + +// RuleSetsClientListByProfileResponse contains the response from method RuleSetsClient.NewListByProfilePager. +type RuleSetsClientListByProfileResponse struct { + // Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of results. + RuleSetListResult +} + +// RuleSetsClientListResourceUsageResponse contains the response from method RuleSetsClient.NewListResourceUsagePager. +type RuleSetsClientListResourceUsageResponse struct { + // The list usages operation response. + UsagesListResult +} + +// RulesClientCreateResponse contains the response from method RulesClient.BeginCreate. +type RulesClientCreateResponse struct { + // Friendly Rules name mapping to the any Rules or secret related information. + Rule +} + +// RulesClientDeleteResponse contains the response from method RulesClient.BeginDelete. +type RulesClientDeleteResponse struct { + // placeholder for future response values +} + +// RulesClientGetResponse contains the response from method RulesClient.Get. +type RulesClientGetResponse struct { + // Friendly Rules name mapping to the any Rules or secret related information. + Rule +} + +// RulesClientListByRuleSetResponse contains the response from method RulesClient.NewListByRuleSetPager. +type RulesClientListByRuleSetResponse struct { + // Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of results. + RuleListResult +} + +// RulesClientUpdateResponse contains the response from method RulesClient.BeginUpdate. +type RulesClientUpdateResponse struct { + // Friendly Rules name mapping to the any Rules or secret related information. + Rule +} + +// SecretsClientCreateResponse contains the response from method SecretsClient.BeginCreate. +type SecretsClientCreateResponse struct { + // Friendly Secret name mapping to the any Secret or secret related information. + Secret +} + +// SecretsClientDeleteResponse contains the response from method SecretsClient.BeginDelete. +type SecretsClientDeleteResponse struct { + // placeholder for future response values +} + +// SecretsClientGetResponse contains the response from method SecretsClient.Get. +type SecretsClientGetResponse struct { + // Friendly Secret name mapping to the any Secret or secret related information. + Secret +} + +// SecretsClientListByProfileResponse contains the response from method SecretsClient.NewListByProfilePager. +type SecretsClientListByProfileResponse struct { + // Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of results. + SecretListResult +} + +// SecurityPoliciesClientCreateResponse contains the response from method SecurityPoliciesClient.BeginCreate. +type SecurityPoliciesClientCreateResponse struct { + // SecurityPolicy association for AzureFrontDoor profile + SecurityPolicy +} + +// SecurityPoliciesClientDeleteResponse contains the response from method SecurityPoliciesClient.BeginDelete. +type SecurityPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// SecurityPoliciesClientGetResponse contains the response from method SecurityPoliciesClient.Get. +type SecurityPoliciesClientGetResponse struct { + // SecurityPolicy association for AzureFrontDoor profile + SecurityPolicy +} + +// SecurityPoliciesClientListByProfileResponse contains the response from method SecurityPoliciesClient.NewListByProfilePager. +type SecurityPoliciesClientListByProfileResponse struct { + // Result of the request to list security policies. It contains a list of security policy objects and a URL link to get the + // next set of results. + SecurityPolicyListResult +} + +// SecurityPoliciesClientPatchResponse contains the response from method SecurityPoliciesClient.BeginPatch. +type SecurityPoliciesClientPatchResponse struct { + // SecurityPolicy association for AzureFrontDoor profile + SecurityPolicy +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/routes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/routes_client.go new file mode 100644 index 00000000..40c76825 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/routes_client.go @@ -0,0 +1,466 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RoutesClient contains the methods for the Routes group. +// Don't use this type directly, use NewRoutesClient() instead. +type RoutesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRoutesClient creates a new instance of RoutesClient with the specified values. +// - subscriptionID - Azure Subscription ID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RoutesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Creates a new route with the specified route name under the specified subscription, resource group, profile, +// and AzureFrontDoor endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource +// group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - routeName - Name of the routing rule. +// - route - Route properties +// - options - RoutesClientBeginCreateOptions contains the optional parameters for the RoutesClient.BeginCreate method. +func (client *RoutesClient) BeginCreate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, route Route, options *RoutesClientBeginCreateOptions) (*runtime.Poller[RoutesClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, profileName, endpointName, routeName, route, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutesClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Creates a new route with the specified route name under the specified subscription, resource group, profile, and +// AzureFrontDoor endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *RoutesClient) create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, route Route, options *RoutesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "RoutesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, endpointName, routeName, route, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *RoutesClient) createCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, route Route, options *RoutesClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, route); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes an existing route with the specified route name under the specified subscription, resource group, +// profile, and AzureFrontDoor endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource +// group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - routeName - Name of the routing rule. +// - options - RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. +func (client *RoutesClient) BeginDelete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientBeginDeleteOptions) (*runtime.Poller[RoutesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, profileName, endpointName, routeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an existing route with the specified route name under the specified subscription, resource group, profile, +// and AzureFrontDoor endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *RoutesClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RoutesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, endpointName, routeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RoutesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets an existing route with the specified route name under the specified subscription, resource group, profile, and +// AzureFrontDoor endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource +// group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - routeName - Name of the routing rule. +// - options - RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. +func (client *RoutesClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientGetOptions) (RoutesClientGetResponse, error) { + var err error + const operationName = "RoutesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, endpointName, routeName, options) + if err != nil { + return RoutesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RoutesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RoutesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RoutesClient) getCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, options *RoutesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RoutesClient) getHandleResponse(resp *http.Response) (RoutesClientGetResponse, error) { + result := RoutesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Route); err != nil { + return RoutesClientGetResponse{}, err + } + return result, nil +} + +// NewListByEndpointPager - Lists all of the existing origins within a profile. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource +// group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - options - RoutesClientListByEndpointOptions contains the optional parameters for the RoutesClient.NewListByEndpointPager +// method. +func (client *RoutesClient) NewListByEndpointPager(resourceGroupName string, profileName string, endpointName string, options *RoutesClientListByEndpointOptions) *runtime.Pager[RoutesClientListByEndpointResponse] { + return runtime.NewPager(runtime.PagingHandler[RoutesClientListByEndpointResponse]{ + More: func(page RoutesClientListByEndpointResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RoutesClientListByEndpointResponse) (RoutesClientListByEndpointResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RoutesClient.NewListByEndpointPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByEndpointCreateRequest(ctx, resourceGroupName, profileName, endpointName, options) + }, nil) + if err != nil { + return RoutesClientListByEndpointResponse{}, err + } + return client.listByEndpointHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByEndpointCreateRequest creates the ListByEndpoint request. +func (client *RoutesClient) listByEndpointCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, options *RoutesClientListByEndpointOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByEndpointHandleResponse handles the ListByEndpoint response. +func (client *RoutesClient) listByEndpointHandleResponse(resp *http.Response) (RoutesClientListByEndpointResponse, error) { + result := RoutesClientListByEndpointResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteListResult); err != nil { + return RoutesClientListByEndpointResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates an existing route with the specified route name under the specified subscription, resource group, +// profile, and AzureFrontDoor endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +// - resourceGroupName - Name of the Resource group within the Azure subscription. +// - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource +// group. +// - endpointName - Name of the endpoint under the profile which is unique globally. +// - routeName - Name of the routing rule. +// - routeUpdateProperties - Route update properties +// - options - RoutesClientBeginUpdateOptions contains the optional parameters for the RoutesClient.BeginUpdate method. +func (client *RoutesClient) BeginUpdate(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, routeUpdateProperties RouteUpdateParameters, options *RoutesClientBeginUpdateOptions) (*runtime.Poller[RoutesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, profileName, endpointName, routeName, routeUpdateProperties, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates an existing route with the specified route name under the specified subscription, resource group, profile, +// and AzureFrontDoor endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-02-01 +func (client *RoutesClient) update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, routeUpdateProperties RouteUpdateParameters, options *RoutesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RoutesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, endpointName, routeName, routeUpdateProperties, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *RoutesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, profileName string, endpointName string, routeName string, routeUpdateProperties RouteUpdateParameters, options *RoutesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if profileName == "" { + return nil, errors.New("parameter profileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{profileName}", url.PathEscape(profileName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, routeUpdateProperties); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/rules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/rules_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/rules_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/rules_client.go index 0b802ba1..85d0e4f6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/rules_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/rules_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type RulesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RulesClient, error) { - cl, err := arm.NewClient(moduleName+".RulesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewRulesClient(subscriptionID string, credential azcore.TokenCredential, op // BeginCreate - Creates a new delivery rule within the specified rule set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -61,31 +60,41 @@ func (client *RulesClient) BeginCreate(ctx context.Context, resourceGroupName st if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RulesClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RulesClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[RulesClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RulesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Create - Creates a new delivery rule within the specified rule set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *RulesClient) create(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, ruleName string, rule Rule, options *RulesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "RulesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, ruleName, rule, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -116,16 +125,19 @@ func (client *RulesClient) createCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, rule) + if err := runtime.MarshalAsJSON(req, rule); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing delivery rule within a rule set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -138,31 +150,41 @@ func (client *RulesClient) BeginDelete(ctx context.Context, resourceGroupName st if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RulesClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RulesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[RulesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes an existing delivery rule within a rule set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *RulesClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, ruleName string, options *RulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, ruleName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -193,7 +215,7 @@ func (client *RulesClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -202,7 +224,7 @@ func (client *RulesClient) deleteCreateRequest(ctx context.Context, resourceGrou // Get - Gets an existing delivery rule within a rule set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -210,18 +232,25 @@ func (client *RulesClient) deleteCreateRequest(ctx context.Context, resourceGrou // - ruleName - Name of the delivery rule which is unique within the endpoint. // - options - RulesClientGetOptions contains the optional parameters for the RulesClient.Get method. func (client *RulesClient) Get(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, ruleName string, options *RulesClientGetOptions) (RulesClientGetResponse, error) { + var err error + const operationName = "RulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, ruleName, options) if err != nil { return RulesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RulesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RulesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RulesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -252,7 +281,7 @@ func (client *RulesClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,7 +298,7 @@ func (client *RulesClient) getHandleResponse(resp *http.Response) (RulesClientGe // NewListByRuleSetPager - Lists all of the existing delivery rules within a rule set. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -281,25 +310,20 @@ func (client *RulesClient) NewListByRuleSetPager(resourceGroupName string, profi return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RulesClientListByRuleSetResponse) (RulesClientListByRuleSetResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByRuleSetCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RulesClient.NewListByRuleSetPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByRuleSetCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, options) + }, nil) if err != nil { return RulesClientListByRuleSetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RulesClientListByRuleSetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RulesClientListByRuleSetResponse{}, runtime.NewResponseError(resp) - } return client.listByRuleSetHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -327,7 +351,7 @@ func (client *RulesClient) listByRuleSetCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -345,7 +369,7 @@ func (client *RulesClient) listByRuleSetHandleResponse(resp *http.Response) (Rul // BeginUpdate - Updates an existing delivery rule within a rule set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -359,31 +383,41 @@ func (client *RulesClient) BeginUpdate(ctx context.Context, resourceGroupName st if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RulesClientUpdateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RulesClientUpdateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[RulesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RulesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates an existing delivery rule within a rule set. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *RulesClient) update(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, ruleName string, ruleUpdateProperties RuleUpdateParameters, options *RulesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RulesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, ruleName, ruleUpdateProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -414,8 +448,11 @@ func (client *RulesClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, ruleUpdateProperties) + if err := runtime.MarshalAsJSON(req, ruleUpdateProperties); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/rulesets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/rulesets_client.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/rulesets_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/rulesets_client.go index 331d6d73..cf83cf63 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/rulesets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/rulesets_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type RuleSetsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRuleSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RuleSetsClient, error) { - cl, err := arm.NewClient(moduleName+".RuleSetsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,25 +46,32 @@ func NewRuleSetsClient(subscriptionID string, credential azcore.TokenCredential, // Create - Creates a new rule set within the specified profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. // - ruleSetName - Name of the rule set under the profile which is unique globally // - options - RuleSetsClientCreateOptions contains the optional parameters for the RuleSetsClient.Create method. func (client *RuleSetsClient) Create(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, options *RuleSetsClientCreateOptions) (RuleSetsClientCreateResponse, error) { + var err error + const operationName = "RuleSetsClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, options) if err != nil { return RuleSetsClientCreateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RuleSetsClientCreateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return RuleSetsClientCreateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return RuleSetsClientCreateResponse{}, err } - return client.createHandleResponse(resp) + resp, err := client.createHandleResponse(httpResp) + return resp, err } // createCreateRequest creates the Create request. @@ -92,7 +98,7 @@ func (client *RuleSetsClient) createCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -111,7 +117,7 @@ func (client *RuleSetsClient) createHandleResponse(resp *http.Response) (RuleSet // resource group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -123,11 +129,15 @@ func (client *RuleSetsClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RuleSetsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RuleSetsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[RuleSetsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RuleSetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -135,20 +145,26 @@ func (client *RuleSetsClient) BeginDelete(ctx context.Context, resourceGroupName // resource group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *RuleSetsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, options *RuleSetsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RuleSetsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -175,7 +191,7 @@ func (client *RuleSetsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -185,25 +201,32 @@ func (client *RuleSetsClient) deleteCreateRequest(ctx context.Context, resourceG // group and profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. // - ruleSetName - Name of the rule set under the profile which is unique globally. // - options - RuleSetsClientGetOptions contains the optional parameters for the RuleSetsClient.Get method. func (client *RuleSetsClient) Get(ctx context.Context, resourceGroupName string, profileName string, ruleSetName string, options *RuleSetsClientGetOptions) (RuleSetsClientGetResponse, error) { + var err error + const operationName = "RuleSetsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, options) if err != nil { return RuleSetsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RuleSetsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RuleSetsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RuleSetsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -230,7 +253,7 @@ func (client *RuleSetsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +270,7 @@ func (client *RuleSetsClient) getHandleResponse(resp *http.Response) (RuleSetsCl // NewListByProfilePager - Lists existing AzureFrontDoor rule sets within a profile. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -259,25 +282,20 @@ func (client *RuleSetsClient) NewListByProfilePager(resourceGroupName string, pr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RuleSetsClientListByProfileResponse) (RuleSetsClientListByProfileResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RuleSetsClientListByProfileResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RuleSetsClient.NewListByProfilePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) + }, nil) if err != nil { return RuleSetsClientListByProfileResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RuleSetsClientListByProfileResponse{}, runtime.NewResponseError(resp) - } return client.listByProfileHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -301,7 +319,7 @@ func (client *RuleSetsClient) listByProfileCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -316,10 +334,9 @@ func (client *RuleSetsClient) listByProfileHandleResponse(resp *http.Response) ( return result, nil } -// NewListResourceUsagePager - Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN -// profile. +// NewListResourceUsagePager - Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -332,25 +349,20 @@ func (client *RuleSetsClient) NewListResourceUsagePager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RuleSetsClientListResourceUsageResponse) (RuleSetsClientListResourceUsageResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RuleSetsClientListResourceUsageResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RuleSetsClient.NewListResourceUsagePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listResourceUsageCreateRequest(ctx, resourceGroupName, profileName, ruleSetName, options) + }, nil) if err != nil { return RuleSetsClientListResourceUsageResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RuleSetsClientListResourceUsageResponse{}, runtime.NewResponseError(resp) - } return client.listResourceUsageHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -378,7 +390,7 @@ func (client *RuleSetsClient) listResourceUsageCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/secrets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/secrets_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/secrets_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/secrets_client.go index b501741e..723ba495 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/secrets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/secrets_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type SecretsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecretsClient, error) { - cl, err := arm.NewClient(moduleName+".SecretsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreate - Creates a new Secret within the specified profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -60,31 +59,41 @@ func (client *SecretsClient) BeginCreate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretsClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretsClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SecretsClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecretsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Create - Creates a new Secret within the specified profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *SecretsClient) create(ctx context.Context, resourceGroupName string, profileName string, secretName string, secret Secret, options *SecretsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "SecretsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, secretName, secret, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -111,16 +120,19 @@ func (client *SecretsClient) createCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, secret) + if err := runtime.MarshalAsJSON(req, secret); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing Secret within profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -132,31 +144,41 @@ func (client *SecretsClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecretsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SecretsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecretsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes an existing Secret within profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *SecretsClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, secretName string, options *SecretsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SecretsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, secretName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -183,7 +205,7 @@ func (client *SecretsClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -192,25 +214,32 @@ func (client *SecretsClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets an existing Secret within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. // - secretName - Name of the Secret under the profile. // - options - SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. func (client *SecretsClient) Get(ctx context.Context, resourceGroupName string, profileName string, secretName string, options *SecretsClientGetOptions) (SecretsClientGetResponse, error) { + var err error + const operationName = "SecretsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, secretName, options) if err != nil { return SecretsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecretsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecretsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -237,7 +266,7 @@ func (client *SecretsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +283,7 @@ func (client *SecretsClient) getHandleResponse(resp *http.Response) (SecretsClie // NewListByProfilePager - Lists existing AzureFrontDoor secrets. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -266,25 +295,20 @@ func (client *SecretsClient) NewListByProfilePager(resourceGroupName string, pro return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SecretsClientListByProfileResponse) (SecretsClientListByProfileResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecretsClientListByProfileResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecretsClient.NewListByProfilePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) + }, nil) if err != nil { return SecretsClientListByProfileResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecretsClientListByProfileResponse{}, runtime.NewResponseError(resp) - } return client.listByProfileHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -308,7 +332,7 @@ func (client *SecretsClient) listByProfileCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/securitypolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/securitypolicies_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/securitypolicies_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/securitypolicies_client.go index ee29ac5a..389511ae 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/securitypolicies_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/securitypolicies_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armcdn @@ -33,7 +32,7 @@ type SecurityPoliciesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewSecurityPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityPoliciesClient, error) { - cl, err := arm.NewClient(moduleName+".SecurityPoliciesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewSecurityPoliciesClient(subscriptionID string, credential azcore.TokenCre // BeginCreate - Creates a new security policy within the specified profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -61,31 +60,41 @@ func (client *SecurityPoliciesClient) BeginCreate(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityPoliciesClientCreateResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityPoliciesClientCreateResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SecurityPoliciesClientCreateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityPoliciesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Create - Creates a new security policy within the specified profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *SecurityPoliciesClient) create(ctx context.Context, resourceGroupName string, profileName string, securityPolicyName string, securityPolicy SecurityPolicy, options *SecurityPoliciesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "SecurityPoliciesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createCreateRequest(ctx, resourceGroupName, profileName, securityPolicyName, securityPolicy, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createCreateRequest creates the Create request. @@ -112,16 +121,19 @@ func (client *SecurityPoliciesClient) createCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, securityPolicy) + if err := runtime.MarshalAsJSON(req, securityPolicy); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes an existing security policy within profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -134,31 +146,41 @@ func (client *SecurityPoliciesClient) BeginDelete(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityPoliciesClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityPoliciesClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SecurityPoliciesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes an existing security policy within profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *SecurityPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, profileName string, securityPolicyName string, options *SecurityPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SecurityPoliciesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, profileName, securityPolicyName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -185,7 +207,7 @@ func (client *SecurityPoliciesClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,25 +216,32 @@ func (client *SecurityPoliciesClient) deleteCreateRequest(ctx context.Context, r // Get - Gets an existing security policy within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. // - securityPolicyName - Name of the security policy under the profile. // - options - SecurityPoliciesClientGetOptions contains the optional parameters for the SecurityPoliciesClient.Get method. func (client *SecurityPoliciesClient) Get(ctx context.Context, resourceGroupName string, profileName string, securityPolicyName string, options *SecurityPoliciesClientGetOptions) (SecurityPoliciesClientGetResponse, error) { + var err error + const operationName = "SecurityPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, profileName, securityPolicyName, options) if err != nil { return SecurityPoliciesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecurityPoliciesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityPoliciesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityPoliciesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -239,7 +268,7 @@ func (client *SecurityPoliciesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -256,7 +285,7 @@ func (client *SecurityPoliciesClient) getHandleResponse(resp *http.Response) (Se // NewListByProfilePager - Lists security policies associated with the profile // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -268,25 +297,20 @@ func (client *SecurityPoliciesClient) NewListByProfilePager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *SecurityPoliciesClientListByProfileResponse) (SecurityPoliciesClientListByProfileResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityPoliciesClient.NewListByProfilePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProfileCreateRequest(ctx, resourceGroupName, profileName, options) + }, nil) if err != nil { return SecurityPoliciesClientListByProfileResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SecurityPoliciesClientListByProfileResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityPoliciesClientListByProfileResponse{}, runtime.NewResponseError(resp) - } return client.listByProfileHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -310,7 +334,7 @@ func (client *SecurityPoliciesClient) listByProfileCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -328,7 +352,7 @@ func (client *SecurityPoliciesClient) listByProfileHandleResponse(resp *http.Res // BeginPatch - Updates an existing security policy within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 // - resourceGroupName - Name of the Resource group within the Azure subscription. // - profileName - Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource // group. @@ -342,31 +366,41 @@ func (client *SecurityPoliciesClient) BeginPatch(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityPoliciesClientPatchResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityPoliciesClientPatchResponse]{ FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[SecurityPoliciesClientPatchResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityPoliciesClientPatchResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Patch - Updates an existing security policy within a profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2021-06-01 +// Generated from API version 2024-02-01 func (client *SecurityPoliciesClient) patch(ctx context.Context, resourceGroupName string, profileName string, securityPolicyName string, securityPolicyUpdateProperties SecurityPolicyUpdateParameters, options *SecurityPoliciesClientBeginPatchOptions) (*http.Response, error) { + var err error + const operationName = "SecurityPoliciesClient.BeginPatch" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.patchCreateRequest(ctx, resourceGroupName, profileName, securityPolicyName, securityPolicyUpdateProperties, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // patchCreateRequest creates the Patch request. @@ -393,8 +427,11 @@ func (client *SecurityPoliciesClient) patchCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") + reqQP.Set("api-version", "2024-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, securityPolicyUpdateProperties) + if err := runtime.MarshalAsJSON(req, securityPolicyUpdateProperties); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/time_rfc3339.go new file mode 100644 index 00000000..7219a71a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2/time_rfc3339.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcdn + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/validate_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/validate_client.go deleted file mode 100644 index 24a9b252..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/validate_client.go +++ /dev/null @@ -1,93 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcdn - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ValidateClient contains the methods for the Validate group. -// Don't use this type directly, use NewValidateClient() instead. -type ValidateClient struct { - internal *arm.Client - subscriptionID string -} - -// NewValidateClient creates a new instance of ValidateClient with the specified values. -// - subscriptionID - Azure Subscription ID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewValidateClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ValidateClient, error) { - cl, err := arm.NewClient(moduleName+".ValidateClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ValidateClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// Secret - Validate a Secret in the profile. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2021-06-01 -// - validateSecretInput - The Secret source. -// - options - ValidateClientSecretOptions contains the optional parameters for the ValidateClient.Secret method. -func (client *ValidateClient) Secret(ctx context.Context, validateSecretInput ValidateSecretInput, options *ValidateClientSecretOptions) (ValidateClientSecretResponse, error) { - req, err := client.secretCreateRequest(ctx, validateSecretInput, options) - if err != nil { - return ValidateClientSecretResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ValidateClientSecretResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ValidateClientSecretResponse{}, runtime.NewResponseError(resp) - } - return client.secretHandleResponse(resp) -} - -// secretCreateRequest creates the Secret request. -func (client *ValidateClient) secretCreateRequest(ctx context.Context, validateSecretInput ValidateSecretInput, options *ValidateClientSecretOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateSecret" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validateSecretInput) -} - -// secretHandleResponse handles the Secret response. -func (client *ValidateClient) secretHandleResponse(resp *http.Response) (ValidateClientSecretResponse, error) { - result := ValidateClientSecretResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ValidateSecretOutput); err != nil { - return ValidateClientSecretResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/CHANGELOG.md deleted file mode 100644 index cdb99b30..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/CHANGELOG.md +++ /dev/null @@ -1,1427 +0,0 @@ -# Release History - -## 1.0.0 (2022-05-18) -### Breaking Changes - -- Function `*BackupInstancesClient.BeginValidateForBackup` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientValidateForBackupResponse], error)` to `(*runtime.Poller[BackupInstancesClientValidateForBackupResponse], error)` -- Function `*BackupInstancesClient.BeginAdhocBackup` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientAdhocBackupResponse], error)` to `(*runtime.Poller[BackupInstancesClientAdhocBackupResponse], error)` -- Function `*BackupVaultsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[BackupVaultsClientUpdateResponse], error)` to `(*runtime.Poller[BackupVaultsClientUpdateResponse], error)` -- Function `*BackupInstancesClient.BeginResumeBackups` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientResumeBackupsResponse], error)` to `(*runtime.Poller[BackupInstancesClientResumeBackupsResponse], error)` -- Function `*BackupInstancesClient.BeginTriggerRehydrate` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientTriggerRehydrateResponse], error)` to `(*runtime.Poller[BackupInstancesClientTriggerRehydrateResponse], error)` -- Function `*BackupInstancesClient.BeginSuspendBackups` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientSuspendBackupsResponse], error)` to `(*runtime.Poller[BackupInstancesClientSuspendBackupsResponse], error)` -- Function `*BackupInstancesClient.BeginValidateForRestore` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientValidateForRestoreResponse], error)` to `(*runtime.Poller[BackupInstancesClientValidateForRestoreResponse], error)` -- Function `*BackupInstancesClient.BeginResumeProtection` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientResumeProtectionResponse], error)` to `(*runtime.Poller[BackupInstancesClientResumeProtectionResponse], error)` -- Function `*BackupInstancesClient.BeginTriggerRestore` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientTriggerRestoreResponse], error)` to `(*runtime.Poller[BackupInstancesClientTriggerRestoreResponse], error)` -- Function `*BackupInstancesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[BackupInstancesClientCreateOrUpdateResponse], error)` -- Function `*ExportJobsClient.BeginTrigger` return value(s) have been changed from `(*armruntime.Poller[ExportJobsClientTriggerResponse], error)` to `(*runtime.Poller[ExportJobsClientTriggerResponse], error)` -- Function `*BackupVaultsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[BackupVaultsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[BackupVaultsClientCreateOrUpdateResponse], error)` -- Function `*BackupInstancesClient.BeginSyncBackupInstance` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientSyncBackupInstanceResponse], error)` to `(*runtime.Poller[BackupInstancesClientSyncBackupInstanceResponse], error)` -- Function `*BackupInstancesClient.BeginStopProtection` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientStopProtectionResponse], error)` to `(*runtime.Poller[BackupInstancesClientStopProtectionResponse], error)` -- Function `*BackupInstancesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[BackupInstancesClientDeleteResponse], error)` to `(*runtime.Poller[BackupInstancesClientDeleteResponse], error)` -- Function `FeatureValidationResponse.MarshalJSON` has been removed -- Function `BackupVaultResourceList.MarshalJSON` has been removed -- Function `AzureBackupFindRestorableTimeRangesRequestResource.MarshalJSON` has been removed -- Function `DppBaseResourceList.MarshalJSON` has been removed -- Function `OperationJobExtendedInfo.MarshalJSON` has been removed -- Function `ClientDiscoveryForServiceSpecification.MarshalJSON` has been removed -- Function `Error.MarshalJSON` has been removed -- Function `DppWorkerRequest.MarshalJSON` has been removed -- Function `ResourceGuardResourceList.MarshalJSON` has been removed -- Function `AzureBackupRecoveryPointResourceList.MarshalJSON` has been removed -- Function `SupportedFeature.MarshalJSON` has been removed -- Function `AzureBackupJobResourceList.MarshalJSON` has been removed -- Function `OperationResource.MarshalJSON` has been removed -- Function `BaseBackupPolicyResourceList.MarshalJSON` has been removed -- Function `ClientDiscoveryResponse.MarshalJSON` has been removed -- Function `BackupInstanceResourceList.MarshalJSON` has been removed - -### Features Added - -- New function `*KubernetesPVRestoreCriteria.UnmarshalJSON([]byte) error` -- New function `*KubernetesStorageClassRestoreCriteria.GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria` -- New function `*KubernetesPVRestoreCriteria.GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria` -- New function `*KubernetesStorageClassRestoreCriteria.UnmarshalJSON([]byte) error` -- New function `KubernetesStorageClassRestoreCriteria.MarshalJSON() ([]byte, error)` -- New function `KubernetesPVRestoreCriteria.MarshalJSON() ([]byte, error)` -- New struct `KubernetesPVRestoreCriteria` -- New struct `KubernetesStorageClassRestoreCriteria` - - -## 0.4.0 (2022-04-15) -### Breaking Changes - -- Function `*RecoveryPointsClient.List` has been removed -- Function `*ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects` has been removed -- Function `*ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects` has been removed -- Function `*OperationsClient.List` has been removed -- Function `*BackupPoliciesClient.List` has been removed -- Function `*BackupInstancesClient.List` has been removed -- Function `*ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects` has been removed -- Function `*BackupVaultsClient.GetInSubscription` has been removed -- Function `*ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects` has been removed -- Function `*JobsClient.List` has been removed -- Function `*ResourceGuardsClient.GetResourcesInResourceGroup` has been removed -- Function `*ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects` has been removed -- Function `*BackupVaultsClient.GetInResourceGroup` has been removed -- Function `*ResourceGuardsClient.GetBackupSecurityPINRequestsObjects` has been removed -- Function `*ResourceGuardsClient.GetResourcesInSubscription` has been removed - -### Features Added - -- New function `*ResourceGuardsClient.NewGetDeleteProtectedItemRequestsObjectsPager(string, string, *ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse]` -- New function `*JobsClient.NewListPager(string, string, *JobsClientListOptions) *runtime.Pager[JobsClientListResponse]` -- New function `*ResourceGuardsClient.NewGetUpdateProtectionPolicyRequestsObjectsPager(string, string, *ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse]` -- New function `*RecoveryPointsClient.NewListPager(string, string, string, *RecoveryPointsClientListOptions) *runtime.Pager[RecoveryPointsClientListResponse]` -- New function `*BackupVaultsClient.NewGetInResourceGroupPager(string, *BackupVaultsClientGetInResourceGroupOptions) *runtime.Pager[BackupVaultsClientGetInResourceGroupResponse]` -- New function `*ResourceGuardsClient.NewGetDeleteResourceGuardProxyRequestsObjectsPager(string, string, *ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse]` -- New function `*ResourceGuardsClient.NewGetUpdateProtectedItemRequestsObjectsPager(string, string, *ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse]` -- New function `*ResourceGuardsClient.NewGetResourcesInSubscriptionPager(*ResourceGuardsClientGetResourcesInSubscriptionOptions) *runtime.Pager[ResourceGuardsClientGetResourcesInSubscriptionResponse]` -- New function `*BackupPoliciesClient.NewListPager(string, string, *BackupPoliciesClientListOptions) *runtime.Pager[BackupPoliciesClientListResponse]` -- New function `*OperationsClient.NewListPager(*OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]` -- New function `*BackupInstancesClient.NewListPager(string, string, *BackupInstancesClientListOptions) *runtime.Pager[BackupInstancesClientListResponse]` -- New function `*ResourceGuardsClient.NewGetBackupSecurityPINRequestsObjectsPager(string, string, *ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse]` -- New function `*ResourceGuardsClient.NewGetDisableSoftDeleteRequestsObjectsPager(string, string, *ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse]` -- New function `*ResourceGuardsClient.NewGetResourcesInResourceGroupPager(string, *ResourceGuardsClientGetResourcesInResourceGroupOptions) *runtime.Pager[ResourceGuardsClientGetResourcesInResourceGroupResponse]` -- New function `*BackupVaultsClient.NewGetInSubscriptionPager(*BackupVaultsClientGetInSubscriptionOptions) *runtime.Pager[BackupVaultsClientGetInSubscriptionResponse]` - - -## 0.3.0 (2022-04-11) -### Breaking Changes - -- Function `NewOperationsClient` return value(s) have been changed from `(*OperationsClient)` to `(*OperationsClient, error)` -- Function `NewBackupPoliciesClient` return value(s) have been changed from `(*BackupPoliciesClient)` to `(*BackupPoliciesClient, error)` -- Function `*BackupInstancesClient.BeginDelete` return value(s) have been changed from `(BackupInstancesClientDeletePollerResponse, error)` to `(*armruntime.Poller[BackupInstancesClientDeleteResponse], error)` -- Function `NewRecoveryPointsClient` return value(s) have been changed from `(*RecoveryPointsClient)` to `(*RecoveryPointsClient, error)` -- Function `NewExportJobsOperationResultClient` return value(s) have been changed from `(*ExportJobsOperationResultClient)` to `(*ExportJobsOperationResultClient, error)` -- Function `*ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects` return value(s) have been changed from `(*ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsPager)` to `(*runtime.Pager[ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse])` -- Function `NewBackupVaultOperationResultsClient` return value(s) have been changed from `(*BackupVaultOperationResultsClient)` to `(*BackupVaultOperationResultsClient, error)` -- Function `*BackupInstancesClient.BeginValidateForRestore` return value(s) have been changed from `(BackupInstancesClientValidateForRestorePollerResponse, error)` to `(*armruntime.Poller[BackupInstancesClientValidateForRestoreResponse], error)` -- Function `NewRestorableTimeRangesClient` return value(s) have been changed from `(*RestorableTimeRangesClient)` to `(*RestorableTimeRangesClient, error)` -- Function `*BackupInstancesClient.BeginTriggerRehydrate` return value(s) have been changed from `(BackupInstancesClientTriggerRehydratePollerResponse, error)` to `(*armruntime.Poller[BackupInstancesClientTriggerRehydrateResponse], error)` -- Function `*BackupInstancesClient.BeginTriggerRestore` return value(s) have been changed from `(BackupInstancesClientTriggerRestorePollerResponse, error)` to `(*armruntime.Poller[BackupInstancesClientTriggerRestoreResponse], error)` -- Function `*ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects` return value(s) have been changed from `(*ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsPager)` to `(*runtime.Pager[ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse])` -- Function `*ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects` return value(s) have been changed from `(*ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsPager)` to `(*runtime.Pager[ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse])` -- Function `*BackupPoliciesClient.List` return value(s) have been changed from `(*BackupPoliciesClientListPager)` to `(*runtime.Pager[BackupPoliciesClientListResponse])` -- Function `NewExportJobsClient` return value(s) have been changed from `(*ExportJobsClient)` to `(*ExportJobsClient, error)` -- Function `*BackupVaultsClient.BeginCreateOrUpdate` return value(s) have been changed from `(BackupVaultsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[BackupVaultsClientCreateOrUpdateResponse], error)` -- Function `NewOperationResultClient` return value(s) have been changed from `(*OperationResultClient)` to `(*OperationResultClient, error)` -- Function `*BackupInstancesClient.List` return value(s) have been changed from `(*BackupInstancesClientListPager)` to `(*runtime.Pager[BackupInstancesClientListResponse])` -- Function `*BackupVaultsClient.GetInSubscription` return value(s) have been changed from `(*BackupVaultsClientGetInSubscriptionPager)` to `(*runtime.Pager[BackupVaultsClientGetInSubscriptionResponse])` -- Function `*ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects` return value(s) have been changed from `(*ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsPager)` to `(*runtime.Pager[ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse])` -- Function `*ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects` return value(s) have been changed from `(*ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsPager)` to `(*runtime.Pager[ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse])` -- Function `*ExportJobsClient.BeginTrigger` return value(s) have been changed from `(ExportJobsClientTriggerPollerResponse, error)` to `(*armruntime.Poller[ExportJobsClientTriggerResponse], error)` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsClientListPager)` to `(*runtime.Pager[OperationsClientListResponse])` -- Function `NewBackupInstancesClient` return value(s) have been changed from `(*BackupInstancesClient)` to `(*BackupInstancesClient, error)` -- Function `*BackupVaultsClient.GetInResourceGroup` return value(s) have been changed from `(*BackupVaultsClientGetInResourceGroupPager)` to `(*runtime.Pager[BackupVaultsClientGetInResourceGroupResponse])` -- Function `*ResourceGuardsClient.GetBackupSecurityPINRequestsObjects` return value(s) have been changed from `(*ResourceGuardsClientGetBackupSecurityPINRequestsObjectsPager)` to `(*runtime.Pager[ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse])` -- Function `*BackupInstancesClient.BeginCreateOrUpdate` return value(s) have been changed from `(BackupInstancesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[BackupInstancesClientCreateOrUpdateResponse], error)` -- Function `NewJobsClient` return value(s) have been changed from `(*JobsClient)` to `(*JobsClient, error)` -- Function `NewResourceGuardsClient` return value(s) have been changed from `(*ResourceGuardsClient)` to `(*ResourceGuardsClient, error)` -- Function `*BackupVaultsClient.BeginUpdate` return value(s) have been changed from `(BackupVaultsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[BackupVaultsClientUpdateResponse], error)` -- Function `NewOperationStatusClient` return value(s) have been changed from `(*OperationStatusClient)` to `(*OperationStatusClient, error)` -- Function `*BackupInstancesClient.BeginValidateForBackup` return value(s) have been changed from `(BackupInstancesClientValidateForBackupPollerResponse, error)` to `(*armruntime.Poller[BackupInstancesClientValidateForBackupResponse], error)` -- Function `*BackupInstancesClient.BeginAdhocBackup` return value(s) have been changed from `(BackupInstancesClientAdhocBackupPollerResponse, error)` to `(*armruntime.Poller[BackupInstancesClientAdhocBackupResponse], error)` -- Function `*ResourceGuardsClient.GetResourcesInSubscription` return value(s) have been changed from `(*ResourceGuardsClientGetResourcesInSubscriptionPager)` to `(*runtime.Pager[ResourceGuardsClientGetResourcesInSubscriptionResponse])` -- Function `NewBackupVaultsClient` return value(s) have been changed from `(*BackupVaultsClient)` to `(*BackupVaultsClient, error)` -- Function `*JobsClient.List` return value(s) have been changed from `(*JobsClientListPager)` to `(*runtime.Pager[JobsClientListResponse])` -- Function `NewClient` return value(s) have been changed from `(*Client)` to `(*Client, error)` -- Function `*RecoveryPointsClient.List` return value(s) have been changed from `(*RecoveryPointsClientListPager)` to `(*runtime.Pager[RecoveryPointsClientListResponse])` -- Function `*ResourceGuardsClient.GetResourcesInResourceGroup` return value(s) have been changed from `(*ResourceGuardsClientGetResourcesInResourceGroupPager)` to `(*runtime.Pager[ResourceGuardsClientGetResourcesInResourceGroupResponse])` -- Type of `ErrorAdditionalInfo.Info` has been changed from `map[string]interface{}` to `interface{}` -- Function `AbsoluteMarker.ToPtr` has been removed -- Function `*BackupInstancesClientAdhocBackupPollerResponse.Resume` has been removed -- Function `RehydrationPriority.ToPtr` has been removed -- Function `*BackupInstancesClientValidateForRestorePoller.FinalResponse` has been removed -- Function `*ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsPager.NextPage` has been removed -- Function `*BackupVaultsClientUpdatePoller.Done` has been removed -- Function `BackupInstancesClientTriggerRehydratePollerResponse.PollUntilDone` has been removed -- Function `*BackupInstancesClientTriggerRehydratePoller.Done` has been removed -- Function `RecoveryOption.ToPtr` has been removed -- Function `*ResourceGuardsClientGetResourcesInSubscriptionPager.NextPage` has been removed -- Function `*BackupInstancesClientListPager.Err` has been removed -- Function `*BackupInstancesClientAdhocBackupPoller.Done` has been removed -- Function `*RecoveryPointsClientListPager.PageResponse` has been removed -- Function `*BackupInstancesClientDeletePoller.Done` has been removed -- Function `*BackupInstancesClientDeletePoller.Poll` has been removed -- Function `*BackupVaultsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `SecretStoreType.ToPtr` has been removed -- Function `Status.ToPtr` has been removed -- Function `*BackupInstancesClientValidateForBackupPoller.Done` has been removed -- Function `*RecoveryPointsClientListPager.NextPage` has been removed -- Function `*BackupInstancesClientAdhocBackupPoller.ResumeToken` has been removed -- Function `*BackupVaultsClientUpdatePoller.Poll` has been removed -- Function `*ExportJobsClientTriggerPoller.ResumeToken` has been removed -- Function `*OperationsClientListPager.NextPage` has been removed -- Function `*BackupInstancesClientTriggerRestorePollerResponse.Resume` has been removed -- Function `*BackupVaultsClientCreateOrUpdatePoller.Done` has been removed -- Function `*BackupInstancesClientValidateForBackupPoller.ResumeToken` has been removed -- Function `FeatureType.ToPtr` has been removed -- Function `*ResourceGuardsClientGetBackupSecurityPINRequestsObjectsPager.Err` has been removed -- Function `*ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsPager.PageResponse` has been removed -- Function `*ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsPager.NextPage` has been removed -- Function `RestoreTargetLocationType.ToPtr` has been removed -- Function `*BackupInstancesClientTriggerRestorePoller.ResumeToken` has been removed -- Function `*BackupVaultsClientGetInSubscriptionPager.Err` has been removed -- Function `*ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsPager.Err` has been removed -- Function `*BackupInstancesClientCreateOrUpdatePoller.Done` has been removed -- Function `*ClientCheckFeatureSupportResult.UnmarshalJSON` has been removed -- Function `DayOfWeek.ToPtr` has been removed -- Function `*BackupInstancesClientListPager.NextPage` has been removed -- Function `*ResourceGuardsClientGetBackupSecurityPINRequestsObjectsPager.PageResponse` has been removed -- Function `*ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsPager.PageResponse` has been removed -- Function `*BackupInstancesClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `BackupInstancesClientValidateForRestorePollerResponse.PollUntilDone` has been removed -- Function `*ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsPager.Err` has been removed -- Function `*ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsPager.NextPage` has been removed -- Function `FeatureSupportStatus.ToPtr` has been removed -- Function `RehydrationStatus.ToPtr` has been removed -- Function `*ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsPager.NextPage` has been removed -- Function `*BackupInstancesClientValidateForBackupPoller.Poll` has been removed -- Function `BackupVaultsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsPager.Err` has been removed -- Function `*BackupVaultsClientGetInSubscriptionPager.NextPage` has been removed -- Function `*ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsPager.PageResponse` has been removed -- Function `*BackupInstancesClientCreateOrUpdatePoller.Poll` has been removed -- Function `*ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsPager.NextPage` has been removed -- Function `*BackupVaultsClientGetInSubscriptionPager.PageResponse` has been removed -- Function `*RecoveryPointsClientListPager.Err` has been removed -- Function `DataStoreTypes.ToPtr` has been removed -- Function `*ExportJobsClientTriggerPollerResponse.Resume` has been removed -- Function `StorageSettingStoreTypes.ToPtr` has been removed -- Function `*JobsClientListPager.Err` has been removed -- Function `*BackupVaultsClientGetInResourceGroupPager.Err` has been removed -- Function `*BackupInstancesClientDeletePoller.FinalResponse` has been removed -- Function `BackupInstancesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*BackupInstancesClientTriggerRehydratePoller.Poll` has been removed -- Function `*BackupInstancesClientDeletePollerResponse.Resume` has been removed -- Function `*OperationsClientListPager.Err` has been removed -- Function `SourceDataStoreType.ToPtr` has been removed -- Function `*BackupVaultsClientUpdatePoller.ResumeToken` has been removed -- Function `*BackupInstancesClientValidateForBackupPollerResponse.Resume` has been removed -- Function `*BackupInstancesClientTriggerRestorePoller.Poll` has been removed -- Function `*BackupInstancesClientAdhocBackupPoller.Poll` has been removed -- Function `*BackupVaultsClientUpdatePoller.FinalResponse` has been removed -- Function `*BackupInstancesClientValidateForRestorePoller.Poll` has been removed -- Function `*ResourceGuardsClientGetResourcesInSubscriptionPager.Err` has been removed -- Function `*BackupVaultsClientGetInResourceGroupPager.PageResponse` has been removed -- Function `ResourceMoveState.ToPtr` has been removed -- Function `StorageSettingTypes.ToPtr` has been removed -- Function `*ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsPager.Err` has been removed -- Function `*BackupInstancesClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ResourceGuardsClientGetBackupSecurityPINRequestsObjectsPager.NextPage` has been removed -- Function `*BackupInstancesClientValidateForRestorePoller.ResumeToken` has been removed -- Function `*BackupVaultsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `ExportJobsClientTriggerPollerResponse.PollUntilDone` has been removed -- Function `BackupInstancesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*BackupVaultsClientGetInResourceGroupPager.NextPage` has been removed -- Function `*ResourceGuardsClientGetResourcesInResourceGroupPager.PageResponse` has been removed -- Function `*ResourceGuardsClientGetResourcesInSubscriptionPager.PageResponse` has been removed -- Function `*ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsPager.PageResponse` has been removed -- Function `*BackupVaultsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*ExportJobsClientTriggerPoller.Done` has been removed -- Function `*BackupInstancesClientTriggerRehydratePoller.ResumeToken` has been removed -- Function `*BackupInstancesClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsPager.PageResponse` has been removed -- Function `WeekNumber.ToPtr` has been removed -- Function `*BackupInstancesClientValidateForBackupPoller.FinalResponse` has been removed -- Function `ProvisioningState.ToPtr` has been removed -- Function `*BackupInstancesClientTriggerRestorePoller.Done` has been removed -- Function `*ResourceGuardsClientGetResourcesInResourceGroupPager.Err` has been removed -- Function `*BackupPoliciesClientListPager.NextPage` has been removed -- Function `*BackupInstancesClientTriggerRestorePoller.FinalResponse` has been removed -- Function `*BackupInstancesClientTriggerRehydratePoller.FinalResponse` has been removed -- Function `*BackupInstancesClientTriggerRehydratePollerResponse.Resume` has been removed -- Function `*OperationsClientListPager.PageResponse` has been removed -- Function `BackupVaultsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `CreatedByType.ToPtr` has been removed -- Function `BackupInstancesClientValidateForBackupPollerResponse.PollUntilDone` has been removed -- Function `*BackupVaultsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `BackupInstancesClientAdhocBackupPollerResponse.PollUntilDone` has been removed -- Function `RestoreSourceDataStoreType.ToPtr` has been removed -- Function `Month.ToPtr` has been removed -- Function `*ResourceGuardsClientGetResourcesInResourceGroupPager.NextPage` has been removed -- Function `*ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsPager.Err` has been removed -- Function `*JobsClientListPager.NextPage` has been removed -- Function `*BackupInstancesClientAdhocBackupPoller.FinalResponse` has been removed -- Function `*BackupVaultsClientUpdatePollerResponse.Resume` has been removed -- Function `*BackupInstancesClientListPager.PageResponse` has been removed -- Function `*BackupPoliciesClientListPager.Err` has been removed -- Function `*ExportJobsClientTriggerPoller.Poll` has been removed -- Function `*BackupInstancesClientValidateForRestorePollerResponse.Resume` has been removed -- Function `*ExportJobsClientTriggerPoller.FinalResponse` has been removed -- Function `*BackupPoliciesClientListPager.PageResponse` has been removed -- Function `*BackupInstancesClientValidateForRestorePoller.Done` has been removed -- Function `BackupInstancesClientTriggerRestorePollerResponse.PollUntilDone` has been removed -- Function `*JobsClientListPager.PageResponse` has been removed -- Function `*BackupInstancesClientDeletePoller.ResumeToken` has been removed -- Function `CurrentProtectionState.ToPtr` has been removed -- Struct `BackupInstancesClientAdhocBackupPoller` has been removed -- Struct `BackupInstancesClientAdhocBackupPollerResponse` has been removed -- Struct `BackupInstancesClientAdhocBackupResult` has been removed -- Struct `BackupInstancesClientCreateOrUpdatePoller` has been removed -- Struct `BackupInstancesClientCreateOrUpdatePollerResponse` has been removed -- Struct `BackupInstancesClientCreateOrUpdateResult` has been removed -- Struct `BackupInstancesClientDeletePoller` has been removed -- Struct `BackupInstancesClientDeletePollerResponse` has been removed -- Struct `BackupInstancesClientGetResult` has been removed -- Struct `BackupInstancesClientListPager` has been removed -- Struct `BackupInstancesClientListResult` has been removed -- Struct `BackupInstancesClientTriggerRehydratePoller` has been removed -- Struct `BackupInstancesClientTriggerRehydratePollerResponse` has been removed -- Struct `BackupInstancesClientTriggerRestorePoller` has been removed -- Struct `BackupInstancesClientTriggerRestorePollerResponse` has been removed -- Struct `BackupInstancesClientTriggerRestoreResult` has been removed -- Struct `BackupInstancesClientValidateForBackupPoller` has been removed -- Struct `BackupInstancesClientValidateForBackupPollerResponse` has been removed -- Struct `BackupInstancesClientValidateForBackupResult` has been removed -- Struct `BackupInstancesClientValidateForRestorePoller` has been removed -- Struct `BackupInstancesClientValidateForRestorePollerResponse` has been removed -- Struct `BackupInstancesClientValidateForRestoreResult` has been removed -- Struct `BackupPoliciesClientCreateOrUpdateResult` has been removed -- Struct `BackupPoliciesClientGetResult` has been removed -- Struct `BackupPoliciesClientListPager` has been removed -- Struct `BackupPoliciesClientListResult` has been removed -- Struct `BackupVaultOperationResultsClientGetResult` has been removed -- Struct `BackupVaultsClientCheckNameAvailabilityResult` has been removed -- Struct `BackupVaultsClientCreateOrUpdatePoller` has been removed -- Struct `BackupVaultsClientCreateOrUpdatePollerResponse` has been removed -- Struct `BackupVaultsClientCreateOrUpdateResult` has been removed -- Struct `BackupVaultsClientGetInResourceGroupPager` has been removed -- Struct `BackupVaultsClientGetInResourceGroupResult` has been removed -- Struct `BackupVaultsClientGetInSubscriptionPager` has been removed -- Struct `BackupVaultsClientGetInSubscriptionResult` has been removed -- Struct `BackupVaultsClientGetResult` has been removed -- Struct `BackupVaultsClientUpdatePoller` has been removed -- Struct `BackupVaultsClientUpdatePollerResponse` has been removed -- Struct `BackupVaultsClientUpdateResult` has been removed -- Struct `ClientCheckFeatureSupportResult` has been removed -- Struct `ExportJobsClientTriggerPoller` has been removed -- Struct `ExportJobsClientTriggerPollerResponse` has been removed -- Struct `ExportJobsOperationResultClientGetResult` has been removed -- Struct `JobsClientGetResult` has been removed -- Struct `JobsClientListPager` has been removed -- Struct `JobsClientListResult` has been removed -- Struct `OperationResultClientGetResult` has been removed -- Struct `OperationStatusClientGetResult` has been removed -- Struct `OperationsClientListPager` has been removed -- Struct `OperationsClientListResult` has been removed -- Struct `RecoveryPointsClientGetResult` has been removed -- Struct `RecoveryPointsClientListPager` has been removed -- Struct `RecoveryPointsClientListResult` has been removed -- Struct `ResourceGuardsClientGetBackupSecurityPINRequestsObjectsPager` has been removed -- Struct `ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResult` has been removed -- Struct `ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResult` has been removed -- Struct `ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResult` has been removed -- Struct `ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResult` has been removed -- Struct `ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResult` has been removed -- Struct `ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResult` has been removed -- Struct `ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResult` has been removed -- Struct `ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsPager` has been removed -- Struct `ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResult` has been removed -- Struct `ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsPager` has been removed -- Struct `ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResult` has been removed -- Struct `ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsPager` has been removed -- Struct `ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResult` has been removed -- Struct `ResourceGuardsClientGetResourcesInResourceGroupPager` has been removed -- Struct `ResourceGuardsClientGetResourcesInResourceGroupResult` has been removed -- Struct `ResourceGuardsClientGetResourcesInSubscriptionPager` has been removed -- Struct `ResourceGuardsClientGetResourcesInSubscriptionResult` has been removed -- Struct `ResourceGuardsClientGetResult` has been removed -- Struct `ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsPager` has been removed -- Struct `ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResult` has been removed -- Struct `ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsPager` has been removed -- Struct `ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResult` has been removed -- Struct `ResourceGuardsClientPatchResult` has been removed -- Struct `ResourceGuardsClientPutResult` has been removed -- Struct `RestorableTimeRangesClientFindResult` has been removed -- Field `BackupPoliciesClientGetResult` of struct `BackupPoliciesClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupPoliciesClientGetResponse` has been removed -- Field `ResourceGuardsClientGetResourcesInResourceGroupResult` of struct `ResourceGuardsClientGetResourcesInResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetResourcesInResourceGroupResponse` has been removed -- Field `BackupVaultsClientGetInSubscriptionResult` of struct `BackupVaultsClientGetInSubscriptionResponse` has been removed -- Field `RawResponse` of struct `BackupVaultsClientGetInSubscriptionResponse` has been removed -- Field `JobsClientListResult` of struct `JobsClientListResponse` has been removed -- Field `RawResponse` of struct `JobsClientListResponse` has been removed -- Field `ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResult` of struct `ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse` has been removed -- Field `BackupInstancesClientValidateForRestoreResult` of struct `BackupInstancesClientValidateForRestoreResponse` has been removed -- Field `RawResponse` of struct `BackupInstancesClientValidateForRestoreResponse` has been removed -- Field `ResourceGuardsClientGetResourcesInSubscriptionResult` of struct `ResourceGuardsClientGetResourcesInSubscriptionResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetResourcesInSubscriptionResponse` has been removed -- Field `ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResult` of struct `ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse` has been removed -- Field `BackupPoliciesClientListResult` of struct `BackupPoliciesClientListResponse` has been removed -- Field `RawResponse` of struct `BackupPoliciesClientListResponse` has been removed -- Field `OperationStatusClientGetResult` of struct `OperationStatusClientGetResponse` has been removed -- Field `RawResponse` of struct `OperationStatusClientGetResponse` has been removed -- Field `ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResult` of struct `ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse` has been removed -- Field `ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResult` of struct `ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse` has been removed -- Field `ResourceGuardsClientGetResult` of struct `ResourceGuardsClientGetResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetResponse` has been removed -- Field `ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResult` of struct `ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse` has been removed -- Field `RawResponse` of struct `BackupPoliciesClientDeleteResponse` has been removed -- Field `BackupVaultsClientGetInResourceGroupResult` of struct `BackupVaultsClientGetInResourceGroupResponse` has been removed -- Field `RawResponse` of struct `BackupVaultsClientGetInResourceGroupResponse` has been removed -- Field `BackupInstancesClientTriggerRestoreResult` of struct `BackupInstancesClientTriggerRestoreResponse` has been removed -- Field `RawResponse` of struct `BackupInstancesClientTriggerRestoreResponse` has been removed -- Field `BackupInstancesClientValidateForBackupResult` of struct `BackupInstancesClientValidateForBackupResponse` has been removed -- Field `RawResponse` of struct `BackupInstancesClientValidateForBackupResponse` has been removed -- Field `OperationResultClientGetResult` of struct `OperationResultClientGetResponse` has been removed -- Field `RawResponse` of struct `OperationResultClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupInstancesClientTriggerRehydrateResponse` has been removed -- Field `RawResponse` of struct `BackupVaultsClientDeleteResponse` has been removed -- Field `BackupInstancesClientCreateOrUpdateResult` of struct `BackupInstancesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `BackupInstancesClientCreateOrUpdateResponse` has been removed -- Field `ResourceGuardsClientPutResult` of struct `ResourceGuardsClientPutResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientPutResponse` has been removed -- Field `ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResult` of struct `ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse` has been removed -- Field `BackupVaultsClientCheckNameAvailabilityResult` of struct `BackupVaultsClientCheckNameAvailabilityResponse` has been removed -- Field `RawResponse` of struct `BackupVaultsClientCheckNameAvailabilityResponse` has been removed -- Field `ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResult` of struct `ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse` has been removed -- Field `RawResponse` of struct `BackupInstancesClientDeleteResponse` has been removed -- Field `ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResult` of struct `ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse` has been removed -- Field `JobsClientGetResult` of struct `JobsClientGetResponse` has been removed -- Field `RawResponse` of struct `JobsClientGetResponse` has been removed -- Field `BackupInstancesClientGetResult` of struct `BackupInstancesClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupInstancesClientGetResponse` has been removed -- Field `ResourceGuardsClientPatchResult` of struct `ResourceGuardsClientPatchResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientPatchResponse` has been removed -- Field `ClientCheckFeatureSupportResult` of struct `ClientCheckFeatureSupportResponse` has been removed -- Field `RawResponse` of struct `ClientCheckFeatureSupportResponse` has been removed -- Field `RawResponse` of struct `ExportJobsClientTriggerResponse` has been removed -- Field `BackupInstancesClientListResult` of struct `BackupInstancesClientListResponse` has been removed -- Field `RawResponse` of struct `BackupInstancesClientListResponse` has been removed -- Field `RestorableTimeRangesClientFindResult` of struct `RestorableTimeRangesClientFindResponse` has been removed -- Field `RawResponse` of struct `RestorableTimeRangesClientFindResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientDeleteResponse` has been removed -- Field `BackupVaultOperationResultsClientGetResult` of struct `BackupVaultOperationResultsClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupVaultOperationResultsClientGetResponse` has been removed -- Field `BackupVaultsClientUpdateResult` of struct `BackupVaultsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `BackupVaultsClientUpdateResponse` has been removed -- Field `BackupPoliciesClientCreateOrUpdateResult` of struct `BackupPoliciesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `BackupPoliciesClientCreateOrUpdateResponse` has been removed -- Field `OperationsClientListResult` of struct `OperationsClientListResponse` has been removed -- Field `RawResponse` of struct `OperationsClientListResponse` has been removed -- Field `ExportJobsOperationResultClientGetResult` of struct `ExportJobsOperationResultClientGetResponse` has been removed -- Field `RawResponse` of struct `ExportJobsOperationResultClientGetResponse` has been removed -- Field `ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResult` of struct `ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse` has been removed -- Field `BackupInstancesClientAdhocBackupResult` of struct `BackupInstancesClientAdhocBackupResponse` has been removed -- Field `RawResponse` of struct `BackupInstancesClientAdhocBackupResponse` has been removed -- Field `BackupVaultsClientGetResult` of struct `BackupVaultsClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupVaultsClientGetResponse` has been removed -- Field `BackupVaultsClientCreateOrUpdateResult` of struct `BackupVaultsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `BackupVaultsClientCreateOrUpdateResponse` has been removed -- Field `ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResult` of struct `ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse` has been removed -- Field `ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResult` of struct `ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse` has been removed -- Field `ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResult` of struct `ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse` has been removed -- Field `RecoveryPointsClientGetResult` of struct `RecoveryPointsClientGetResponse` has been removed -- Field `RawResponse` of struct `RecoveryPointsClientGetResponse` has been removed -- Field `RecoveryPointsClientListResult` of struct `RecoveryPointsClientListResponse` has been removed -- Field `RawResponse` of struct `RecoveryPointsClientListResponse` has been removed - -### Features Added - -- New const `SyncTypeForceResync` -- New const `AlertsStateEnabled` -- New const `ValidationTypeDeepValidation` -- New const `AlertsStateDisabled` -- New const `SyncTypeDefault` -- New const `ValidationTypeShallowValidation` -- New function `*BackupInstancesClient.BeginSuspendBackups(context.Context, string, string, string, *BackupInstancesClientBeginSuspendBackupsOptions) (*armruntime.Poller[BackupInstancesClientSuspendBackupsResponse], error)` -- New function `*BackupInstancesClient.BeginSyncBackupInstance(context.Context, string, string, string, SyncBackupInstanceRequest, *BackupInstancesClientBeginSyncBackupInstanceOptions) (*armruntime.Poller[BackupInstancesClientSyncBackupInstanceResponse], error)` -- New function `NewOperationStatusBackupVaultContextClient(string, azcore.TokenCredential, *arm.ClientOptions) (*OperationStatusBackupVaultContextClient, error)` -- New function `PossibleSyncTypeValues() []SyncType` -- New function `*BackupInstancesClient.BeginStopProtection(context.Context, string, string, string, *BackupInstancesClientBeginStopProtectionOptions) (*armruntime.Poller[BackupInstancesClientStopProtectionResponse], error)` -- New function `*BackupInstancesClient.BeginResumeBackups(context.Context, string, string, string, *BackupInstancesClientBeginResumeBackupsOptions) (*armruntime.Poller[BackupInstancesClientResumeBackupsResponse], error)` -- New function `*OperationStatusResourceGroupContextClient.Get(context.Context, string, string, *OperationStatusResourceGroupContextClientGetOptions) (OperationStatusResourceGroupContextClientGetResponse, error)` -- New function `PossibleValidationTypeValues() []ValidationType` -- New function `*BackupInstancesClient.GetBackupInstanceOperationResult(context.Context, string, string, string, string, *BackupInstancesClientGetBackupInstanceOperationResultOptions) (BackupInstancesClientGetBackupInstanceOperationResultResponse, error)` -- New function `*BackupInstancesClient.BeginResumeProtection(context.Context, string, string, string, *BackupInstancesClientBeginResumeProtectionOptions) (*armruntime.Poller[BackupInstancesClientResumeProtectionResponse], error)` -- New function `NewOperationStatusResourceGroupContextClient(string, azcore.TokenCredential, *arm.ClientOptions) (*OperationStatusResourceGroupContextClient, error)` -- New function `*OperationStatusBackupVaultContextClient.Get(context.Context, string, string, string, *OperationStatusBackupVaultContextClientGetOptions) (OperationStatusBackupVaultContextClientGetResponse, error)` -- New function `*ClientCheckFeatureSupportResponse.UnmarshalJSON([]byte) error` -- New function `PossibleAlertsStateValues() []AlertsState` -- New struct `AzureMonitorAlertSettings` -- New struct `BackupInstancesClientBeginResumeBackupsOptions` -- New struct `BackupInstancesClientBeginResumeProtectionOptions` -- New struct `BackupInstancesClientBeginStopProtectionOptions` -- New struct `BackupInstancesClientBeginSuspendBackupsOptions` -- New struct `BackupInstancesClientBeginSyncBackupInstanceOptions` -- New struct `BackupInstancesClientGetBackupInstanceOperationResultOptions` -- New struct `BackupInstancesClientGetBackupInstanceOperationResultResponse` -- New struct `BackupInstancesClientResumeBackupsResponse` -- New struct `BackupInstancesClientResumeProtectionResponse` -- New struct `BackupInstancesClientStopProtectionResponse` -- New struct `BackupInstancesClientSuspendBackupsResponse` -- New struct `BackupInstancesClientSyncBackupInstanceResponse` -- New struct `MonitoringSettings` -- New struct `OperationStatusBackupVaultContextClient` -- New struct `OperationStatusBackupVaultContextClientGetOptions` -- New struct `OperationStatusBackupVaultContextClientGetResponse` -- New struct `OperationStatusResourceGroupContextClient` -- New struct `OperationStatusResourceGroupContextClientGetOptions` -- New struct `OperationStatusResourceGroupContextClientGetResponse` -- New struct `PatchBackupVaultInput` -- New struct `SyncBackupInstanceRequest` -- New anonymous field `ResourceGuardResource` in struct `ResourceGuardsClientPutResponse` -- New field `ResumeToken` in struct `BackupVaultsClientBeginUpdateOptions` -- New field `ResumeToken` in struct `BackupInstancesClientBeginTriggerRehydrateOptions` -- New field `ResumeToken` in struct `BackupInstancesClientBeginTriggerRestoreOptions` -- New anonymous field `AzureBackupJobResourceList` in struct `JobsClientListResponse` -- New anonymous field `FeatureValidationResponseBaseClassification` in struct `ClientCheckFeatureSupportResponse` -- New field `ResumeToken` in struct `BackupInstancesClientBeginValidateForRestoreOptions` -- New anonymous field `ResourceGuardResourceList` in struct `ResourceGuardsClientGetResourcesInSubscriptionResponse` -- New anonymous field `DppBaseResource` in struct `ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse` -- New field `ResumeToken` in struct `BackupInstancesClientBeginValidateForBackupOptions` -- New anonymous field `OperationJobExtendedInfo` in struct `BackupInstancesClientAdhocBackupResponse` -- New anonymous field `DppBaseResource` in struct `ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse` -- New anonymous field `AzureBackupFindRestorableTimeRangesResponseResource` in struct `RestorableTimeRangesClientFindResponse` -- New field `SourceResourceID` in struct `AzureBackupRecoveryPointBasedRestoreRequest` -- New anonymous field `DppBaseResourceList` in struct `ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse` -- New anonymous field `BaseBackupPolicyResource` in struct `BackupPoliciesClientGetResponse` -- New anonymous field `BackupVaultResource` in struct `BackupVaultsClientGetResponse` -- New anonymous field `ResourceGuardResource` in struct `ResourceGuardsClientPatchResponse` -- New anonymous field `AzureBackupRecoveryPointResource` in struct `RecoveryPointsClientGetResponse` -- New anonymous field `OperationJobExtendedInfo` in struct `OperationResultClientGetResponse` -- New field `AzureAsyncOperation` in struct `OperationResultClientGetResponse` -- New field `Location` in struct `OperationResultClientGetResponse` -- New field `RetryAfter` in struct `OperationResultClientGetResponse` -- New field `ValidationType` in struct `BackupInstance` -- New field `ResumeToken` in struct `BackupInstancesClientBeginCreateOrUpdateOptions` -- New anonymous field `BaseBackupPolicyResource` in struct `BackupPoliciesClientCreateOrUpdateResponse` -- New anonymous field `OperationJobExtendedInfo` in struct `BackupInstancesClientValidateForRestoreResponse` -- New anonymous field `DppBaseResourceList` in struct `ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse` -- New field `MonitoringSettings` in struct `BackupVault` -- New anonymous field `DppBaseResource` in struct `ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse` -- New field `ResumeToken` in struct `ExportJobsClientBeginTriggerOptions` -- New anonymous field `DppBaseResourceList` in struct `ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse` -- New anonymous field `BackupInstanceResourceList` in struct `BackupInstancesClientListResponse` -- New field `ResumeToken` in struct `BackupVaultsClientBeginCreateOrUpdateOptions` -- New anonymous field `DppBaseResource` in struct `ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse` -- New anonymous field `DppBaseResource` in struct `ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse` -- New field `Properties` in struct `PatchResourceRequestInput` -- New anonymous field `BackupVaultResourceList` in struct `BackupVaultsClientGetInSubscriptionResponse` -- New anonymous field `ExportJobsResult` in struct `ExportJobsOperationResultClientGetResponse` -- New anonymous field `DppBaseResourceList` in struct `ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse` -- New anonymous field `BackupVaultResource` in struct `BackupVaultsClientCreateOrUpdateResponse` -- New field `SourceResourceID` in struct `AzureBackupRestoreRequest` -- New anonymous field `BackupVaultResourceList` in struct `BackupVaultsClientGetInResourceGroupResponse` -- New anonymous field `OperationJobExtendedInfo` in struct `BackupInstancesClientTriggerRestoreResponse` -- New anonymous field `BaseBackupPolicyResourceList` in struct `BackupPoliciesClientListResponse` -- New anonymous field `DppBaseResourceList` in struct `ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse` -- New anonymous field `BackupInstanceResource` in struct `BackupInstancesClientGetResponse` -- New anonymous field `ResourceGuardResourceList` in struct `ResourceGuardsClientGetResourcesInResourceGroupResponse` -- New anonymous field `AzureBackupRecoveryPointResourceList` in struct `RecoveryPointsClientListResponse` -- New field `SourceResourceID` in struct `AzureBackupRecoveryTimeBasedRestoreRequest` -- New anonymous field `CheckNameAvailabilityResult` in struct `BackupVaultsClientCheckNameAvailabilityResponse` -- New anonymous field `ClientDiscoveryResponse` in struct `OperationsClientListResponse` -- New anonymous field `OperationJobExtendedInfo` in struct `BackupInstancesClientValidateForBackupResponse` -- New anonymous field `ResourceGuardResource` in struct `ResourceGuardsClientGetResponse` -- New anonymous field `BackupVaultResource` in struct `BackupVaultOperationResultsClientGetResponse` -- New field `RetryAfter` in struct `BackupVaultOperationResultsClientGetResponse` -- New field `AzureAsyncOperation` in struct `BackupVaultOperationResultsClientGetResponse` -- New field `Location` in struct `BackupVaultOperationResultsClientGetResponse` -- New field `ResumeToken` in struct `BackupInstancesClientBeginAdhocBackupOptions` -- New anonymous field `AzureBackupJobResource` in struct `JobsClientGetResponse` -- New field `ResumeToken` in struct `BackupInstancesClientBeginDeleteOptions` -- New anonymous field `OperationResource` in struct `OperationStatusClientGetResponse` -- New field `Value` in struct `SecretStoreResource` -- New anonymous field `BackupVaultResource` in struct `BackupVaultsClientUpdateResponse` -- New field `SourceResourceID` in struct `AzureBackupRestoreWithRehydrationRequest` -- New anonymous field `BackupInstanceResource` in struct `BackupInstancesClientCreateOrUpdateResponse` -- New anonymous field `DppBaseResource` in struct `ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse` -- New anonymous field `DppBaseResourceList` in struct `ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse` - - -## 0.2.1 (2022-02-22) - -### Other Changes - -- Remove the go_mod_tidy_hack.go file. - -## 0.2.0 (2022-01-13) -### Breaking Changes - -- Function `*BackupVaultsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *BackupVaultsDeleteOptions)` to `(context.Context, string, string, *BackupVaultsClientDeleteOptions)` -- Function `*BackupVaultsClient.Delete` return value(s) have been changed from `(BackupVaultsDeleteResponse, error)` to `(BackupVaultsClientDeleteResponse, error)` -- Function `*BackupVaultOperationResultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *BackupVaultOperationResultsGetOptions)` to `(context.Context, string, string, string, *BackupVaultOperationResultsClientGetOptions)` -- Function `*BackupVaultOperationResultsClient.Get` return value(s) have been changed from `(BackupVaultOperationResultsGetResponse, error)` to `(BackupVaultOperationResultsClientGetResponse, error)` -- Function `*BackupInstancesClient.BeginTriggerRestore` parameter(s) have been changed from `(context.Context, string, string, string, AzureBackupRestoreRequestClassification, *BackupInstancesBeginTriggerRestoreOptions)` to `(context.Context, string, string, string, AzureBackupRestoreRequestClassification, *BackupInstancesClientBeginTriggerRestoreOptions)` -- Function `*BackupInstancesClient.BeginTriggerRestore` return value(s) have been changed from `(BackupInstancesTriggerRestorePollerResponse, error)` to `(BackupInstancesClientTriggerRestorePollerResponse, error)` -- Function `*ResourceGuardsClient.Patch` parameter(s) have been changed from `(context.Context, string, string, PatchResourceRequestInput, *ResourceGuardsPatchOptions)` to `(context.Context, string, string, PatchResourceRequestInput, *ResourceGuardsClientPatchOptions)` -- Function `*ResourceGuardsClient.Patch` return value(s) have been changed from `(ResourceGuardsPatchResponse, error)` to `(ResourceGuardsClientPatchResponse, error)` -- Function `*BackupPoliciesClient.List` parameter(s) have been changed from `(string, string, *BackupPoliciesListOptions)` to `(string, string, *BackupPoliciesClientListOptions)` -- Function `*BackupPoliciesClient.List` return value(s) have been changed from `(*BackupPoliciesListPager)` to `(*BackupPoliciesClientListPager)` -- Function `*ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects` parameter(s) have been changed from `(string, string, *ResourceGuardsGetDisableSoftDeleteRequestsObjectsOptions)` to `(string, string, *ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions)` -- Function `*ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects` return value(s) have been changed from `(*ResourceGuardsGetDisableSoftDeleteRequestsObjectsPager)` to `(*ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsPager)` -- Function `*ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectOptions)` to `(context.Context, string, string, string, *ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions)` -- Function `*ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject` return value(s) have been changed from `(ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectResponse, error)` to `(ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse, error)` -- Function `*ExportJobsOperationResultClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ExportJobsOperationResultGetOptions)` to `(context.Context, string, string, string, *ExportJobsOperationResultClientGetOptions)` -- Function `*ExportJobsOperationResultClient.Get` return value(s) have been changed from `(ExportJobsOperationResultGetResponse, error)` to `(ExportJobsOperationResultClientGetResponse, error)` -- Function `*BackupPoliciesClient.Delete` parameter(s) have been changed from `(context.Context, string, string, string, *BackupPoliciesDeleteOptions)` to `(context.Context, string, string, string, *BackupPoliciesClientDeleteOptions)` -- Function `*BackupPoliciesClient.Delete` return value(s) have been changed from `(BackupPoliciesDeleteResponse, error)` to `(BackupPoliciesClientDeleteResponse, error)` -- Function `*ResourceGuardsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ResourceGuardsGetOptions)` to `(context.Context, string, string, *ResourceGuardsClientGetOptions)` -- Function `*ResourceGuardsClient.Get` return value(s) have been changed from `(ResourceGuardsGetResponse, error)` to `(ResourceGuardsClientGetResponse, error)` -- Function `*RecoveryPointsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *RecoveryPointsGetOptions)` to `(context.Context, string, string, string, string, *RecoveryPointsClientGetOptions)` -- Function `*RecoveryPointsClient.Get` return value(s) have been changed from `(RecoveryPointsGetResponse, error)` to `(RecoveryPointsClientGetResponse, error)` -- Function `*BackupVaultsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, PatchResourceRequestInput, *BackupVaultsBeginUpdateOptions)` to `(context.Context, string, string, PatchResourceRequestInput, *BackupVaultsClientBeginUpdateOptions)` -- Function `*BackupVaultsClient.BeginUpdate` return value(s) have been changed from `(BackupVaultsUpdatePollerResponse, error)` to `(BackupVaultsClientUpdatePollerResponse, error)` -- Function `*ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceGuardsGetDefaultBackupSecurityPINRequestsObjectOptions)` to `(context.Context, string, string, string, *ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions)` -- Function `*ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject` return value(s) have been changed from `(ResourceGuardsGetDefaultBackupSecurityPINRequestsObjectResponse, error)` to `(ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse, error)` -- Function `*BackupInstancesClient.List` parameter(s) have been changed from `(string, string, *BackupInstancesListOptions)` to `(string, string, *BackupInstancesClientListOptions)` -- Function `*BackupInstancesClient.List` return value(s) have been changed from `(*BackupInstancesListPager)` to `(*BackupInstancesClientListPager)` -- Function `*ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects` parameter(s) have been changed from `(string, string, *ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsOptions)` to `(string, string, *ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions)` -- Function `*ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects` return value(s) have been changed from `(*ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsPager)` to `(*ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsPager)` -- Function `*BackupInstancesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *BackupInstancesBeginDeleteOptions)` to `(context.Context, string, string, string, *BackupInstancesClientBeginDeleteOptions)` -- Function `*BackupInstancesClient.BeginDelete` return value(s) have been changed from `(BackupInstancesDeletePollerResponse, error)` to `(BackupInstancesClientDeletePollerResponse, error)` -- Function `*ResourceGuardsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *ResourceGuardsDeleteOptions)` to `(context.Context, string, string, *ResourceGuardsClientDeleteOptions)` -- Function `*ResourceGuardsClient.Delete` return value(s) have been changed from `(ResourceGuardsDeleteResponse, error)` to `(ResourceGuardsClientDeleteResponse, error)` -- Function `*BackupInstancesClient.BeginValidateForRestore` parameter(s) have been changed from `(context.Context, string, string, string, ValidateRestoreRequestObject, *BackupInstancesBeginValidateForRestoreOptions)` to `(context.Context, string, string, string, ValidateRestoreRequestObject, *BackupInstancesClientBeginValidateForRestoreOptions)` -- Function `*BackupInstancesClient.BeginValidateForRestore` return value(s) have been changed from `(BackupInstancesValidateForRestorePollerResponse, error)` to `(BackupInstancesClientValidateForRestorePollerResponse, error)` -- Function `*BackupPoliciesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *BackupPoliciesGetOptions)` to `(context.Context, string, string, string, *BackupPoliciesClientGetOptions)` -- Function `*BackupPoliciesClient.Get` return value(s) have been changed from `(BackupPoliciesGetResponse, error)` to `(BackupPoliciesClientGetResponse, error)` -- Function `*ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectOptions)` to `(context.Context, string, string, string, *ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions)` -- Function `*ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject` return value(s) have been changed from `(ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectResponse, error)` to `(ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse, error)` -- Function `*JobsClient.List` parameter(s) have been changed from `(string, string, *JobsListOptions)` to `(string, string, *JobsClientListOptions)` -- Function `*JobsClient.List` return value(s) have been changed from `(*JobsListPager)` to `(*JobsClientListPager)` -- Function `*ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects` parameter(s) have been changed from `(string, string, *ResourceGuardsGetUpdateProtectedItemRequestsObjectsOptions)` to `(string, string, *ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions)` -- Function `*ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects` return value(s) have been changed from `(*ResourceGuardsGetUpdateProtectedItemRequestsObjectsPager)` to `(*ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsPager)` -- Function `*BackupVaultsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, BackupVaultResource, *BackupVaultsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, BackupVaultResource, *BackupVaultsClientBeginCreateOrUpdateOptions)` -- Function `*BackupVaultsClient.BeginCreateOrUpdate` return value(s) have been changed from `(BackupVaultsCreateOrUpdatePollerResponse, error)` to `(BackupVaultsClientCreateOrUpdatePollerResponse, error)` -- Function `*BackupVaultsClient.GetInResourceGroup` parameter(s) have been changed from `(string, *BackupVaultsGetInResourceGroupOptions)` to `(string, *BackupVaultsClientGetInResourceGroupOptions)` -- Function `*BackupVaultsClient.GetInResourceGroup` return value(s) have been changed from `(*BackupVaultsGetInResourceGroupPager)` to `(*BackupVaultsClientGetInResourceGroupPager)` -- Function `*BackupVaultsClient.GetInSubscription` parameter(s) have been changed from `(*BackupVaultsGetInSubscriptionOptions)` to `(*BackupVaultsClientGetInSubscriptionOptions)` -- Function `*BackupVaultsClient.GetInSubscription` return value(s) have been changed from `(*BackupVaultsGetInSubscriptionPager)` to `(*BackupVaultsClientGetInSubscriptionPager)` -- Function `*BackupInstancesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, BackupInstanceResource, *BackupInstancesBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, BackupInstanceResource, *BackupInstancesClientBeginCreateOrUpdateOptions)` -- Function `*BackupInstancesClient.BeginCreateOrUpdate` return value(s) have been changed from `(BackupInstancesCreateOrUpdatePollerResponse, error)` to `(BackupInstancesClientCreateOrUpdatePollerResponse, error)` -- Function `*ResourceGuardsClient.GetResourcesInSubscription` parameter(s) have been changed from `(*ResourceGuardsGetResourcesInSubscriptionOptions)` to `(*ResourceGuardsClientGetResourcesInSubscriptionOptions)` -- Function `*ResourceGuardsClient.GetResourcesInSubscription` return value(s) have been changed from `(*ResourceGuardsGetResourcesInSubscriptionPager)` to `(*ResourceGuardsClientGetResourcesInSubscriptionPager)` -- Function `*ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectOptions)` to `(context.Context, string, string, string, *ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions)` -- Function `*ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject` return value(s) have been changed from `(ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectResponse, error)` to `(ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse, error)` -- Function `*JobsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *JobsGetOptions)` to `(context.Context, string, string, string, *JobsClientGetOptions)` -- Function `*JobsClient.Get` return value(s) have been changed from `(JobsGetResponse, error)` to `(JobsClientGetResponse, error)` -- Function `*RecoveryPointsClient.List` parameter(s) have been changed from `(string, string, string, *RecoveryPointsListOptions)` to `(string, string, string, *RecoveryPointsClientListOptions)` -- Function `*RecoveryPointsClient.List` return value(s) have been changed from `(*RecoveryPointsListPager)` to `(*RecoveryPointsClientListPager)` -- Function `*BackupVaultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *BackupVaultsGetOptions)` to `(context.Context, string, string, *BackupVaultsClientGetOptions)` -- Function `*BackupVaultsClient.Get` return value(s) have been changed from `(BackupVaultsGetResponse, error)` to `(BackupVaultsClientGetResponse, error)` -- Function `*ExportJobsClient.BeginTrigger` parameter(s) have been changed from `(context.Context, string, string, *ExportJobsBeginTriggerOptions)` to `(context.Context, string, string, *ExportJobsClientBeginTriggerOptions)` -- Function `*ExportJobsClient.BeginTrigger` return value(s) have been changed from `(ExportJobsTriggerPollerResponse, error)` to `(ExportJobsClientTriggerPollerResponse, error)` -- Function `*ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectOptions)` to `(context.Context, string, string, string, *ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions)` -- Function `*ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject` return value(s) have been changed from `(ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectResponse, error)` to `(ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse, error)` -- Function `*BackupPoliciesClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, BaseBackupPolicyResource, *BackupPoliciesCreateOrUpdateOptions)` to `(context.Context, string, string, string, BaseBackupPolicyResource, *BackupPoliciesClientCreateOrUpdateOptions)` -- Function `*BackupPoliciesClient.CreateOrUpdate` return value(s) have been changed from `(BackupPoliciesCreateOrUpdateResponse, error)` to `(BackupPoliciesClientCreateOrUpdateResponse, error)` -- Function `*BackupInstancesClient.BeginValidateForBackup` parameter(s) have been changed from `(context.Context, string, string, ValidateForBackupRequest, *BackupInstancesBeginValidateForBackupOptions)` to `(context.Context, string, string, ValidateForBackupRequest, *BackupInstancesClientBeginValidateForBackupOptions)` -- Function `*BackupInstancesClient.BeginValidateForBackup` return value(s) have been changed from `(BackupInstancesValidateForBackupPollerResponse, error)` to `(BackupInstancesClientValidateForBackupPollerResponse, error)` -- Function `*OperationStatusClient.Get` parameter(s) have been changed from `(context.Context, string, string, *OperationStatusGetOptions)` to `(context.Context, string, string, *OperationStatusClientGetOptions)` -- Function `*OperationStatusClient.Get` return value(s) have been changed from `(OperationStatusGetResponse, error)` to `(OperationStatusClientGetResponse, error)` -- Function `*ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects` parameter(s) have been changed from `(string, string, *ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsOptions)` to `(string, string, *ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions)` -- Function `*ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects` return value(s) have been changed from `(*ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsPager)` to `(*ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsPager)` -- Function `*RestorableTimeRangesClient.Find` parameter(s) have been changed from `(context.Context, string, string, string, AzureBackupFindRestorableTimeRangesRequest, *RestorableTimeRangesFindOptions)` to `(context.Context, string, string, string, AzureBackupFindRestorableTimeRangesRequest, *RestorableTimeRangesClientFindOptions)` -- Function `*RestorableTimeRangesClient.Find` return value(s) have been changed from `(RestorableTimeRangesFindResponse, error)` to `(RestorableTimeRangesClientFindResponse, error)` -- Function `*BackupInstancesClient.BeginTriggerRehydrate` parameter(s) have been changed from `(context.Context, string, string, string, AzureBackupRehydrationRequest, *BackupInstancesBeginTriggerRehydrateOptions)` to `(context.Context, string, string, string, AzureBackupRehydrationRequest, *BackupInstancesClientBeginTriggerRehydrateOptions)` -- Function `*BackupInstancesClient.BeginTriggerRehydrate` return value(s) have been changed from `(BackupInstancesTriggerRehydratePollerResponse, error)` to `(BackupInstancesClientTriggerRehydratePollerResponse, error)` -- Function `*BackupInstancesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *BackupInstancesGetOptions)` to `(context.Context, string, string, string, *BackupInstancesClientGetOptions)` -- Function `*BackupInstancesClient.Get` return value(s) have been changed from `(BackupInstancesGetResponse, error)` to `(BackupInstancesClientGetResponse, error)` -- Function `*ResourceGuardsClient.Put` parameter(s) have been changed from `(context.Context, string, string, ResourceGuardResource, *ResourceGuardsPutOptions)` to `(context.Context, string, string, ResourceGuardResource, *ResourceGuardsClientPutOptions)` -- Function `*ResourceGuardsClient.Put` return value(s) have been changed from `(ResourceGuardsPutResponse, error)` to `(ResourceGuardsClientPutResponse, error)` -- Function `*ResourceGuardsClient.GetResourcesInResourceGroup` parameter(s) have been changed from `(string, *ResourceGuardsGetResourcesInResourceGroupOptions)` to `(string, *ResourceGuardsClientGetResourcesInResourceGroupOptions)` -- Function `*ResourceGuardsClient.GetResourcesInResourceGroup` return value(s) have been changed from `(*ResourceGuardsGetResourcesInResourceGroupPager)` to `(*ResourceGuardsClientGetResourcesInResourceGroupPager)` -- Function `*OperationResultClient.Get` parameter(s) have been changed from `(context.Context, string, string, *OperationResultGetOptions)` to `(context.Context, string, string, *OperationResultClientGetOptions)` -- Function `*OperationResultClient.Get` return value(s) have been changed from `(OperationResultGetResponse, error)` to `(OperationResultClientGetResponse, error)` -- Function `*ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects` parameter(s) have been changed from `(string, string, *ResourceGuardsGetDeleteProtectedItemRequestsObjectsOptions)` to `(string, string, *ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions)` -- Function `*ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects` return value(s) have been changed from `(*ResourceGuardsGetDeleteProtectedItemRequestsObjectsPager)` to `(*ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsPager)` -- Function `*BackupInstancesClient.BeginAdhocBackup` parameter(s) have been changed from `(context.Context, string, string, string, TriggerBackupRequest, *BackupInstancesBeginAdhocBackupOptions)` to `(context.Context, string, string, string, TriggerBackupRequest, *BackupInstancesClientBeginAdhocBackupOptions)` -- Function `*BackupInstancesClient.BeginAdhocBackup` return value(s) have been changed from `(BackupInstancesAdhocBackupPollerResponse, error)` to `(BackupInstancesClientAdhocBackupPollerResponse, error)` -- Function `*ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectOptions)` to `(context.Context, string, string, string, *ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions)` -- Function `*ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject` return value(s) have been changed from `(ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectResponse, error)` to `(ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse, error)` -- Function `*ResourceGuardsClient.GetBackupSecurityPINRequestsObjects` parameter(s) have been changed from `(string, string, *ResourceGuardsGetBackupSecurityPINRequestsObjectsOptions)` to `(string, string, *ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions)` -- Function `*ResourceGuardsClient.GetBackupSecurityPINRequestsObjects` return value(s) have been changed from `(*ResourceGuardsGetBackupSecurityPINRequestsObjectsPager)` to `(*ResourceGuardsClientGetBackupSecurityPINRequestsObjectsPager)` -- Function `*BackupVaultsClient.CheckNameAvailability` parameter(s) have been changed from `(context.Context, string, string, CheckNameAvailabilityRequest, *BackupVaultsCheckNameAvailabilityOptions)` to `(context.Context, string, string, CheckNameAvailabilityRequest, *BackupVaultsClientCheckNameAvailabilityOptions)` -- Function `*BackupVaultsClient.CheckNameAvailability` return value(s) have been changed from `(BackupVaultsCheckNameAvailabilityResponse, error)` to `(BackupVaultsClientCheckNameAvailabilityResponse, error)` -- Function `AzureBackupJobResource.MarshalJSON` has been removed -- Function `*ExportJobsTriggerPoller.Done` has been removed -- Function `*BackupInstanceResource.UnmarshalJSON` has been removed -- Function `*ResourceGuardsGetDeleteProtectedItemRequestsObjectsPager.NextPage` has been removed -- Function `*JobsListPager.NextPage` has been removed -- Function `*BackupInstancesTriggerRehydratePoller.ResumeToken` has been removed -- Function `*BackupVaultsUpdatePoller.ResumeToken` has been removed -- Function `*BackupInstancesCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*BackupVaultsGetInSubscriptionPager.NextPage` has been removed -- Function `*AzureBackupRecoveryPoint.UnmarshalJSON` has been removed -- Function `*DataProtectionOperationsListPager.PageResponse` has been removed -- Function `*BackupVaultsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*DataProtectionClient.CheckFeatureSupport` has been removed -- Function `*ResourceGuardsGetBackupSecurityPINRequestsObjectsPager.Err` has been removed -- Function `*JobsListPager.Err` has been removed -- Function `*BackupPoliciesListPager.PageResponse` has been removed -- Function `*BackupInstancesTriggerRestorePoller.FinalResponse` has been removed -- Function `*AuthCredentials.UnmarshalJSON` has been removed -- Function `*BackupVaultsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*RecoveryPointsListPager.NextPage` has been removed -- Function `*BackupPoliciesListPager.Err` has been removed -- Function `*BackupInstancesTriggerRehydratePollerResponse.Resume` has been removed -- Function `*BackupInstancesAdhocBackupPollerResponse.Resume` has been removed -- Function `*BackupInstancesTriggerRehydratePoller.FinalResponse` has been removed -- Function `*BackupVaultsGetInResourceGroupPager.Err` has been removed -- Function `*BackupInstancesAdhocBackupPoller.FinalResponse` has been removed -- Function `*FeatureValidationResponseBase.UnmarshalJSON` has been removed -- Function `BackupInstancesTriggerRestorePollerResponse.PollUntilDone` has been removed -- Function `*DeleteOption.UnmarshalJSON` has been removed -- Function `*JobsListPager.PageResponse` has been removed -- Function `*BackupPoliciesListPager.NextPage` has been removed -- Function `*DataProtectionOperationsClient.List` has been removed -- Function `*BackupInstancesAdhocBackupPoller.Done` has been removed -- Function `BackupInstancesValidateForRestorePollerResponse.PollUntilDone` has been removed -- Function `*BackupVaultsGetInResourceGroupPager.PageResponse` has been removed -- Function `*ResourceGuardsGetUpdateProtectedItemRequestsObjectsPager.Err` has been removed -- Function `*ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsPager.NextPage` has been removed -- Function `*BackupInstancesAdhocBackupPoller.Poll` has been removed -- Function `DppResource.MarshalJSON` has been removed -- Function `*ExportJobsTriggerPollerResponse.Resume` has been removed -- Function `*BackupInstancesCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*BackupInstancesDeletePoller.Poll` has been removed -- Function `*BackupInstancesCreateOrUpdatePoller.Done` has been removed -- Function `*DataProtectionOperationsListPager.Err` has been removed -- Function `*DataProtectionCheckFeatureSupportResult.UnmarshalJSON` has been removed -- Function `ExportJobsTriggerPollerResponse.PollUntilDone` has been removed -- Function `*BackupInstancesValidateForRestorePollerResponse.Resume` has been removed -- Function `*ResourceGuardsGetResourcesInSubscriptionPager.Err` has been removed -- Function `*ResourceGuardsGetDeleteProtectedItemRequestsObjectsPager.PageResponse` has been removed -- Function `*BackupInstancesListPager.Err` has been removed -- Function `*BackupInstancesCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*BackupInstancesTriggerRehydratePoller.Poll` has been removed -- Function `*BackupInstancesDeletePollerResponse.Resume` has been removed -- Function `*ExportJobsTriggerPoller.Poll` has been removed -- Function `*ItemLevelRestoreCriteria.UnmarshalJSON` has been removed -- Function `*ResourceGuardsGetResourcesInResourceGroupPager.Err` has been removed -- Function `*OperationExtendedInfo.UnmarshalJSON` has been removed -- Function `*BackupVaultsUpdatePollerResponse.Resume` has been removed -- Function `*ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsPager.Err` has been removed -- Function `*BackupInstancesValidateForBackupPoller.ResumeToken` has been removed -- Function `*BackupInstancesValidateForRestorePoller.FinalResponse` has been removed -- Function `*RestoreTargetInfoBase.UnmarshalJSON` has been removed -- Function `*RecoveryPointsListPager.PageResponse` has been removed -- Function `*BackupCriteria.UnmarshalJSON` has been removed -- Function `*BackupVaultsCreateOrUpdatePoller.Done` has been removed -- Function `*BackupInstancesValidateForBackupPoller.Poll` has been removed -- Function `*BackupVaultsUpdatePoller.Done` has been removed -- Function `*ResourceGuardsGetDisableSoftDeleteRequestsObjectsPager.NextPage` has been removed -- Function `*BackupInstancesTriggerRehydratePoller.Done` has been removed -- Function `*BackupInstancesListPager.NextPage` has been removed -- Function `*AzureBackupFindRestorableTimeRangesResponseResource.UnmarshalJSON` has been removed -- Function `AzureBackupFindRestorableTimeRangesResponseResource.MarshalJSON` has been removed -- Function `*BackupInstancesValidateForBackupPoller.FinalResponse` has been removed -- Function `NewDataProtectionOperationsClient` has been removed -- Function `BackupInstanceResource.MarshalJSON` has been removed -- Function `BackupVaultsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*BackupInstancesValidateForRestorePoller.Done` has been removed -- Function `*ExportJobsTriggerPoller.FinalResponse` has been removed -- Function `BackupInstancesTriggerRehydratePollerResponse.PollUntilDone` has been removed -- Function `*BackupInstancesTriggerRestorePoller.ResumeToken` has been removed -- Function `BackupInstancesCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*BackupInstancesListPager.PageResponse` has been removed -- Function `*ResourceGuardsGetUpdateProtectedItemRequestsObjectsPager.NextPage` has been removed -- Function `*DataProtectionOperationsListPager.NextPage` has been removed -- Function `BackupVaultsUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsPager.PageResponse` has been removed -- Function `*BackupInstancesValidateForRestorePoller.ResumeToken` has been removed -- Function `DppResourceList.MarshalJSON` has been removed -- Function `*ResourceGuardsGetUpdateProtectedItemRequestsObjectsPager.PageResponse` has been removed -- Function `BackupInstancesAdhocBackupPollerResponse.PollUntilDone` has been removed -- Function `*BackupInstancesValidateForBackupPoller.Done` has been removed -- Function `*BackupVaultsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*BaseBackupPolicy.UnmarshalJSON` has been removed -- Function `*ResourceGuardsGetDisableSoftDeleteRequestsObjectsPager.PageResponse` has been removed -- Function `*ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsPager.NextPage` has been removed -- Function `BackupInstancesDeletePollerResponse.PollUntilDone` has been removed -- Function `*BackupInstancesTriggerRestorePoller.Done` has been removed -- Function `*BackupInstancesTriggerRestorePollerResponse.Resume` has been removed -- Function `*ResourceGuardsGetBackupSecurityPINRequestsObjectsPager.PageResponse` has been removed -- Function `*DataStoreParameters.UnmarshalJSON` has been removed -- Function `DppTrackedResourceList.MarshalJSON` has been removed -- Function `*FeatureValidationRequestBase.UnmarshalJSON` has been removed -- Function `*ResourceGuardsGetDisableSoftDeleteRequestsObjectsPager.Err` has been removed -- Function `*ResourceGuardsGetResourcesInResourceGroupPager.NextPage` has been removed -- Function `*BackupInstancesCreateOrUpdatePoller.Poll` has been removed -- Function `*BackupParameters.UnmarshalJSON` has been removed -- Function `*AzureBackupJobResource.UnmarshalJSON` has been removed -- Function `*BackupInstancesDeletePoller.ResumeToken` has been removed -- Function `NewDataProtectionClient` has been removed -- Function `*DppResource.UnmarshalJSON` has been removed -- Function `*BackupVaultsUpdatePoller.Poll` has been removed -- Function `*BackupVaultsGetInSubscriptionPager.Err` has been removed -- Function `*ResourceGuardsGetBackupSecurityPINRequestsObjectsPager.NextPage` has been removed -- Function `*ResourceGuardsGetResourcesInSubscriptionPager.NextPage` has been removed -- Function `*BackupVaultsUpdatePoller.FinalResponse` has been removed -- Function `*BackupInstancesValidateForRestorePoller.Poll` has been removed -- Function `*BackupVaultsGetInResourceGroupPager.NextPage` has been removed -- Function `*BackupInstancesTriggerRestorePoller.Poll` has been removed -- Function `*ResourceGuardsGetResourcesInSubscriptionPager.PageResponse` has been removed -- Function `BackupInstancesValidateForBackupPollerResponse.PollUntilDone` has been removed -- Function `CloudError.Error` has been removed -- Function `*ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsPager.PageResponse` has been removed -- Function `*TriggerContext.UnmarshalJSON` has been removed -- Function `*BackupInstancesValidateForBackupPollerResponse.Resume` has been removed -- Function `*BackupInstancesAdhocBackupPoller.ResumeToken` has been removed -- Function `*BackupInstancesDeletePoller.Done` has been removed -- Function `*RecoveryPointsListPager.Err` has been removed -- Function `*BackupVaultsGetInSubscriptionPager.PageResponse` has been removed -- Function `*BasePolicyRule.UnmarshalJSON` has been removed -- Function `*ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsPager.Err` has been removed -- Function `*CopyOption.UnmarshalJSON` has been removed -- Function `*BackupInstancesDeletePoller.FinalResponse` has been removed -- Function `*BackupVaultsCreateOrUpdatePoller.Poll` has been removed -- Function `*ResourceGuardsGetDeleteProtectedItemRequestsObjectsPager.Err` has been removed -- Function `*ResourceGuardsGetResourcesInResourceGroupPager.PageResponse` has been removed -- Function `*ExportJobsTriggerPoller.ResumeToken` has been removed -- Struct `BackupInstancesAdhocBackupPoller` has been removed -- Struct `BackupInstancesAdhocBackupPollerResponse` has been removed -- Struct `BackupInstancesAdhocBackupResponse` has been removed -- Struct `BackupInstancesAdhocBackupResult` has been removed -- Struct `BackupInstancesBeginAdhocBackupOptions` has been removed -- Struct `BackupInstancesBeginCreateOrUpdateOptions` has been removed -- Struct `BackupInstancesBeginDeleteOptions` has been removed -- Struct `BackupInstancesBeginTriggerRehydrateOptions` has been removed -- Struct `BackupInstancesBeginTriggerRestoreOptions` has been removed -- Struct `BackupInstancesBeginValidateForBackupOptions` has been removed -- Struct `BackupInstancesBeginValidateForRestoreOptions` has been removed -- Struct `BackupInstancesCreateOrUpdatePoller` has been removed -- Struct `BackupInstancesCreateOrUpdatePollerResponse` has been removed -- Struct `BackupInstancesCreateOrUpdateResponse` has been removed -- Struct `BackupInstancesCreateOrUpdateResult` has been removed -- Struct `BackupInstancesDeletePoller` has been removed -- Struct `BackupInstancesDeletePollerResponse` has been removed -- Struct `BackupInstancesDeleteResponse` has been removed -- Struct `BackupInstancesGetOptions` has been removed -- Struct `BackupInstancesGetResponse` has been removed -- Struct `BackupInstancesGetResult` has been removed -- Struct `BackupInstancesListOptions` has been removed -- Struct `BackupInstancesListPager` has been removed -- Struct `BackupInstancesListResponse` has been removed -- Struct `BackupInstancesListResult` has been removed -- Struct `BackupInstancesTriggerRehydratePoller` has been removed -- Struct `BackupInstancesTriggerRehydratePollerResponse` has been removed -- Struct `BackupInstancesTriggerRehydrateResponse` has been removed -- Struct `BackupInstancesTriggerRestorePoller` has been removed -- Struct `BackupInstancesTriggerRestorePollerResponse` has been removed -- Struct `BackupInstancesTriggerRestoreResponse` has been removed -- Struct `BackupInstancesTriggerRestoreResult` has been removed -- Struct `BackupInstancesValidateForBackupPoller` has been removed -- Struct `BackupInstancesValidateForBackupPollerResponse` has been removed -- Struct `BackupInstancesValidateForBackupResponse` has been removed -- Struct `BackupInstancesValidateForBackupResult` has been removed -- Struct `BackupInstancesValidateForRestorePoller` has been removed -- Struct `BackupInstancesValidateForRestorePollerResponse` has been removed -- Struct `BackupInstancesValidateForRestoreResponse` has been removed -- Struct `BackupInstancesValidateForRestoreResult` has been removed -- Struct `BackupPoliciesCreateOrUpdateOptions` has been removed -- Struct `BackupPoliciesCreateOrUpdateResponse` has been removed -- Struct `BackupPoliciesCreateOrUpdateResult` has been removed -- Struct `BackupPoliciesDeleteOptions` has been removed -- Struct `BackupPoliciesDeleteResponse` has been removed -- Struct `BackupPoliciesGetOptions` has been removed -- Struct `BackupPoliciesGetResponse` has been removed -- Struct `BackupPoliciesGetResult` has been removed -- Struct `BackupPoliciesListOptions` has been removed -- Struct `BackupPoliciesListPager` has been removed -- Struct `BackupPoliciesListResponse` has been removed -- Struct `BackupPoliciesListResult` has been removed -- Struct `BackupVaultOperationResultsGetOptions` has been removed -- Struct `BackupVaultOperationResultsGetResponse` has been removed -- Struct `BackupVaultOperationResultsGetResult` has been removed -- Struct `BackupVaultsBeginCreateOrUpdateOptions` has been removed -- Struct `BackupVaultsBeginUpdateOptions` has been removed -- Struct `BackupVaultsCheckNameAvailabilityOptions` has been removed -- Struct `BackupVaultsCheckNameAvailabilityResponse` has been removed -- Struct `BackupVaultsCheckNameAvailabilityResult` has been removed -- Struct `BackupVaultsCreateOrUpdatePoller` has been removed -- Struct `BackupVaultsCreateOrUpdatePollerResponse` has been removed -- Struct `BackupVaultsCreateOrUpdateResponse` has been removed -- Struct `BackupVaultsCreateOrUpdateResult` has been removed -- Struct `BackupVaultsDeleteOptions` has been removed -- Struct `BackupVaultsDeleteResponse` has been removed -- Struct `BackupVaultsGetInResourceGroupOptions` has been removed -- Struct `BackupVaultsGetInResourceGroupPager` has been removed -- Struct `BackupVaultsGetInResourceGroupResponse` has been removed -- Struct `BackupVaultsGetInResourceGroupResult` has been removed -- Struct `BackupVaultsGetInSubscriptionOptions` has been removed -- Struct `BackupVaultsGetInSubscriptionPager` has been removed -- Struct `BackupVaultsGetInSubscriptionResponse` has been removed -- Struct `BackupVaultsGetInSubscriptionResult` has been removed -- Struct `BackupVaultsGetOptions` has been removed -- Struct `BackupVaultsGetResponse` has been removed -- Struct `BackupVaultsGetResult` has been removed -- Struct `BackupVaultsUpdatePoller` has been removed -- Struct `BackupVaultsUpdatePollerResponse` has been removed -- Struct `BackupVaultsUpdateResponse` has been removed -- Struct `BackupVaultsUpdateResult` has been removed -- Struct `DataProtectionCheckFeatureSupportOptions` has been removed -- Struct `DataProtectionCheckFeatureSupportResponse` has been removed -- Struct `DataProtectionCheckFeatureSupportResult` has been removed -- Struct `DataProtectionClient` has been removed -- Struct `DataProtectionOperationsClient` has been removed -- Struct `DataProtectionOperationsListOptions` has been removed -- Struct `DataProtectionOperationsListPager` has been removed -- Struct `DataProtectionOperationsListResponse` has been removed -- Struct `DataProtectionOperationsListResult` has been removed -- Struct `ExportJobsBeginTriggerOptions` has been removed -- Struct `ExportJobsOperationResultGetOptions` has been removed -- Struct `ExportJobsOperationResultGetResponse` has been removed -- Struct `ExportJobsOperationResultGetResult` has been removed -- Struct `ExportJobsTriggerPoller` has been removed -- Struct `ExportJobsTriggerPollerResponse` has been removed -- Struct `ExportJobsTriggerResponse` has been removed -- Struct `JobsGetOptions` has been removed -- Struct `JobsGetResponse` has been removed -- Struct `JobsGetResult` has been removed -- Struct `JobsListOptions` has been removed -- Struct `JobsListPager` has been removed -- Struct `JobsListResponse` has been removed -- Struct `JobsListResult` has been removed -- Struct `OperationResultGetOptions` has been removed -- Struct `OperationResultGetResponse` has been removed -- Struct `OperationResultGetResult` has been removed -- Struct `OperationStatusGetOptions` has been removed -- Struct `OperationStatusGetResponse` has been removed -- Struct `OperationStatusGetResult` has been removed -- Struct `RecoveryPointsGetOptions` has been removed -- Struct `RecoveryPointsGetResponse` has been removed -- Struct `RecoveryPointsGetResult` has been removed -- Struct `RecoveryPointsListOptions` has been removed -- Struct `RecoveryPointsListPager` has been removed -- Struct `RecoveryPointsListResponse` has been removed -- Struct `RecoveryPointsListResult` has been removed -- Struct `ResourceGuardsDeleteOptions` has been removed -- Struct `ResourceGuardsDeleteResponse` has been removed -- Struct `ResourceGuardsGetBackupSecurityPINRequestsObjectsOptions` has been removed -- Struct `ResourceGuardsGetBackupSecurityPINRequestsObjectsPager` has been removed -- Struct `ResourceGuardsGetBackupSecurityPINRequestsObjectsResponse` has been removed -- Struct `ResourceGuardsGetBackupSecurityPINRequestsObjectsResult` has been removed -- Struct `ResourceGuardsGetDefaultBackupSecurityPINRequestsObjectOptions` has been removed -- Struct `ResourceGuardsGetDefaultBackupSecurityPINRequestsObjectResponse` has been removed -- Struct `ResourceGuardsGetDefaultBackupSecurityPINRequestsObjectResult` has been removed -- Struct `ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectOptions` has been removed -- Struct `ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectResponse` has been removed -- Struct `ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectResult` has been removed -- Struct `ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectOptions` has been removed -- Struct `ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectResponse` has been removed -- Struct `ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectResult` has been removed -- Struct `ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectOptions` has been removed -- Struct `ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectResponse` has been removed -- Struct `ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectResult` has been removed -- Struct `ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectOptions` has been removed -- Struct `ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectResponse` has been removed -- Struct `ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectResult` has been removed -- Struct `ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectOptions` has been removed -- Struct `ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectResponse` has been removed -- Struct `ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectResult` has been removed -- Struct `ResourceGuardsGetDeleteProtectedItemRequestsObjectsOptions` has been removed -- Struct `ResourceGuardsGetDeleteProtectedItemRequestsObjectsPager` has been removed -- Struct `ResourceGuardsGetDeleteProtectedItemRequestsObjectsResponse` has been removed -- Struct `ResourceGuardsGetDeleteProtectedItemRequestsObjectsResult` has been removed -- Struct `ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsOptions` has been removed -- Struct `ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsPager` has been removed -- Struct `ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsResponse` has been removed -- Struct `ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsResult` has been removed -- Struct `ResourceGuardsGetDisableSoftDeleteRequestsObjectsOptions` has been removed -- Struct `ResourceGuardsGetDisableSoftDeleteRequestsObjectsPager` has been removed -- Struct `ResourceGuardsGetDisableSoftDeleteRequestsObjectsResponse` has been removed -- Struct `ResourceGuardsGetDisableSoftDeleteRequestsObjectsResult` has been removed -- Struct `ResourceGuardsGetOptions` has been removed -- Struct `ResourceGuardsGetResourcesInResourceGroupOptions` has been removed -- Struct `ResourceGuardsGetResourcesInResourceGroupPager` has been removed -- Struct `ResourceGuardsGetResourcesInResourceGroupResponse` has been removed -- Struct `ResourceGuardsGetResourcesInResourceGroupResult` has been removed -- Struct `ResourceGuardsGetResourcesInSubscriptionOptions` has been removed -- Struct `ResourceGuardsGetResourcesInSubscriptionPager` has been removed -- Struct `ResourceGuardsGetResourcesInSubscriptionResponse` has been removed -- Struct `ResourceGuardsGetResourcesInSubscriptionResult` has been removed -- Struct `ResourceGuardsGetResponse` has been removed -- Struct `ResourceGuardsGetResult` has been removed -- Struct `ResourceGuardsGetUpdateProtectedItemRequestsObjectsOptions` has been removed -- Struct `ResourceGuardsGetUpdateProtectedItemRequestsObjectsPager` has been removed -- Struct `ResourceGuardsGetUpdateProtectedItemRequestsObjectsResponse` has been removed -- Struct `ResourceGuardsGetUpdateProtectedItemRequestsObjectsResult` has been removed -- Struct `ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsOptions` has been removed -- Struct `ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsPager` has been removed -- Struct `ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsResponse` has been removed -- Struct `ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsResult` has been removed -- Struct `ResourceGuardsPatchOptions` has been removed -- Struct `ResourceGuardsPatchResponse` has been removed -- Struct `ResourceGuardsPatchResult` has been removed -- Struct `ResourceGuardsPutOptions` has been removed -- Struct `ResourceGuardsPutResponse` has been removed -- Struct `ResourceGuardsPutResult` has been removed -- Struct `RestorableTimeRangesFindOptions` has been removed -- Struct `RestorableTimeRangesFindResponse` has been removed -- Struct `RestorableTimeRangesFindResult` has been removed -- Field `CopyOption` of struct `CustomCopyOption` has been removed -- Field `DppResourceList` of struct `AzureBackupRecoveryPointResourceList` has been removed -- Field `ItemLevelRestoreCriteria` of struct `RangeBasedItemLevelRestoreCriteria` has been removed -- Field `RestoreTargetInfoBase` of struct `RestoreTargetInfo` has been removed -- Field `FeatureValidationResponseBase` of struct `FeatureValidationResponse` has been removed -- Field `DppResourceList` of struct `BaseBackupPolicyResourceList` has been removed -- Field `BaseBackupPolicy` of struct `BackupPolicy` has been removed -- Field `AuthCredentials` of struct `SecretStoreBasedAuthCredentials` has been removed -- Field `DppTrackedResource` of struct `ResourceGuardResource` has been removed -- Field `DppTrackedResourceList` of struct `ResourceGuardResourceList` has been removed -- Field `DppTrackedResource` of struct `BackupVaultResource` has been removed -- Field `FeatureValidationRequestBase` of struct `FeatureValidationRequest` has been removed -- Field `AzureBackupRestoreRequest` of struct `AzureBackupRecoveryPointBasedRestoreRequest` has been removed -- Field `AzureBackupRestoreRequest` of struct `AzureBackupRecoveryTimeBasedRestoreRequest` has been removed -- Field `DppResourceList` of struct `BackupVaultResourceList` has been removed -- Field `OperationExtendedInfo` of struct `OperationJobExtendedInfo` has been removed -- Field `BasePolicyRule` of struct `AzureRetentionRule` has been removed -- Field `DppWorkerRequest` of struct `AzureBackupFindRestorableTimeRangesRequestResource` has been removed -- Field `DppResource` of struct `AzureBackupJobResource` has been removed -- Field `TriggerContext` of struct `ScheduleBasedTriggerContext` has been removed -- Field `BackupCriteria` of struct `ScheduleBasedBackupCriteria` has been removed -- Field `DppResource` of struct `AzureBackupFindRestorableTimeRangesResponseResource` has been removed -- Field `DppResource` of struct `BackupInstanceResource` has been removed -- Field `BackupParameters` of struct `AzureBackupParams` has been removed -- Field `BasePolicyRule` of struct `AzureBackupRule` has been removed -- Field `RestoreTargetInfoBase` of struct `ItemLevelRestoreTargetInfo` has been removed -- Field `DppResourceList` of struct `BackupInstanceResourceList` has been removed -- Field `DppResourceList` of struct `AzureBackupJobResourceList` has been removed -- Field `DataStoreParameters` of struct `AzureOperationalStoreParameters` has been removed -- Field `InnerError` of struct `CloudError` has been removed -- Field `TriggerContext` of struct `AdhocBasedTriggerContext` has been removed -- Field `DppResource` of struct `BaseBackupPolicyResource` has been removed -- Field `AzureBackupRecoveryPoint` of struct `AzureBackupDiscreteRecoveryPoint` has been removed -- Field `CopyOption` of struct `ImmediateCopyOption` has been removed -- Field `DeleteOption` of struct `AbsoluteDeleteOption` has been removed -- Field `CopyOption` of struct `CopyOnExpiryOption` has been removed -- Field `DppResource` of struct `AzureBackupRecoveryPointResource` has been removed -- Field `AzureBackupRecoveryPointBasedRestoreRequest` of struct `AzureBackupRestoreWithRehydrationRequest` has been removed -- Field `RestoreTargetInfoBase` of struct `RestoreFilesTargetInfo` has been removed - -### Features Added - -- New function `*ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsPager.Err() error` -- New function `*BackupInstancesClientValidateForBackupPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ResourceGuardsClientGetResourcesInSubscriptionPager.PageResponse() ResourceGuardsClientGetResourcesInSubscriptionResponse` -- New function `*ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsPager.NextPage(context.Context) bool` -- New function `*BackupInstancesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*AzureBackupRestoreWithRehydrationRequest.GetAzureBackupRecoveryPointBasedRestoreRequest() *AzureBackupRecoveryPointBasedRestoreRequest` -- New function `*BackupInstancesClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*BackupVaultsClientUpdatePollerResponse.Resume(context.Context, *BackupVaultsClient, string) error` -- New function `*BackupVaultsClientCreateOrUpdatePollerResponse.Resume(context.Context, *BackupVaultsClient, string) error` -- New function `*AzureBackupRule.GetBasePolicyRule() *BasePolicyRule` -- New function `*BackupInstancesClientTriggerRehydratePollerResponse.Resume(context.Context, *BackupInstancesClient, string) error` -- New function `*OperationJobExtendedInfo.GetOperationExtendedInfo() *OperationExtendedInfo` -- New function `*ExportJobsClientTriggerPoller.Poll(context.Context) (*http.Response, error)` -- New function `*BackupInstancesClientListPager.PageResponse() BackupInstancesClientListResponse` -- New function `*ResourceGuardsClientGetResourcesInResourceGroupPager.Err() error` -- New function `*BackupInstancesClientDeletePoller.Done() bool` -- New function `BaseBackupPolicy.MarshalJSON() ([]byte, error)` -- New function `*ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsPager.Err() error` -- New function `*ResourceGuardsClientGetBackupSecurityPINRequestsObjectsPager.PageResponse() ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse` -- New function `*BackupInstancesClientAdhocBackupPollerResponse.Resume(context.Context, *BackupInstancesClient, string) error` -- New function `*BackupPoliciesClientListPager.Err() error` -- New function `*ImmediateCopyOption.UnmarshalJSON([]byte) error` -- New function `*BackupInstancesClientValidateForBackupPoller.ResumeToken() (string, error)` -- New function `*BackupInstancesClientValidateForBackupPollerResponse.Resume(context.Context, *BackupInstancesClient, string) error` -- New function `BackupInstancesClientValidateForBackupPollerResponse.PollUntilDone(context.Context, time.Duration) (BackupInstancesClientValidateForBackupResponse, error)` -- New function `*ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsPager.PageResponse() ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse` -- New function `*AzureBackupRecoveryTimeBasedRestoreRequest.GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest` -- New function `*ResourceGuardsClientGetResourcesInResourceGroupPager.NextPage(context.Context) bool` -- New function `*BackupVaultsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ExportJobsClientTriggerPoller.FinalResponse(context.Context) (ExportJobsClientTriggerResponse, error)` -- New function `*OperationsClient.List(*OperationsClientListOptions) *OperationsClientListPager` -- New function `*ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsPager.PageResponse() ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse` -- New function `*JobsClientListPager.PageResponse() JobsClientListResponse` -- New function `*ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsPager.PageResponse() ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse` -- New function `*OperationsClientListPager.PageResponse() OperationsClientListResponse` -- New function `*BackupInstancesClientListPager.Err() error` -- New function `*ExportJobsClientTriggerPoller.Done() bool` -- New function `*ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsPager.NextPage(context.Context) bool` -- New function `*ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsPager.NextPage(context.Context) bool` -- New function `*ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsPager.Err() error` -- New function `BackupInstancesClientAdhocBackupPollerResponse.PollUntilDone(context.Context, time.Duration) (BackupInstancesClientAdhocBackupResponse, error)` -- New function `BackupInstancesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupInstancesClientDeleteResponse, error)` -- New function `*BackupInstancesClientCreateOrUpdatePoller.Done() bool` -- New function `BackupInstancesClientValidateForRestorePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupInstancesClientValidateForRestoreResponse, error)` -- New function `*ScheduleBasedTriggerContext.GetTriggerContext() *TriggerContext` -- New function `*BackupInstancesClientValidateForBackupPoller.Done() bool` -- New function `*JobsClientListPager.Err() error` -- New function `*FeatureValidationRequest.GetFeatureValidationRequestBase() *FeatureValidationRequestBase` -- New function `*BackupInstancesClientAdhocBackupPoller.FinalResponse(context.Context) (BackupInstancesClientAdhocBackupResponse, error)` -- New function `*BackupInstancesClientTriggerRehydratePoller.Poll(context.Context) (*http.Response, error)` -- New function `BackupInstancesClientTriggerRestorePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupInstancesClientTriggerRestoreResponse, error)` -- New function `*ResourceGuardsClientGetResourcesInSubscriptionPager.Err() error` -- New function `*FeatureValidationResponse.GetFeatureValidationResponseBase() *FeatureValidationResponseBase` -- New function `*ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsPager.PageResponse() ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse` -- New function `ExportJobsClientTriggerPollerResponse.PollUntilDone(context.Context, time.Duration) (ExportJobsClientTriggerResponse, error)` -- New function `*BackupInstancesClientListPager.NextPage(context.Context) bool` -- New function `*BackupInstancesClientValidateForRestorePoller.FinalResponse(context.Context) (BackupInstancesClientValidateForRestoreResponse, error)` -- New function `*ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsPager.PageResponse() ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse` -- New function `*BackupPolicy.GetBaseBackupPolicy() *BaseBackupPolicy` -- New function `NewOperationsClient(azcore.TokenCredential, *arm.ClientOptions) *OperationsClient` -- New function `*ResourceGuardsClientGetResourcesInResourceGroupPager.PageResponse() ResourceGuardsClientGetResourcesInResourceGroupResponse` -- New function `*SecretStoreBasedAuthCredentials.GetAuthCredentials() *AuthCredentials` -- New function `*BackupVaultsClientGetInResourceGroupPager.PageResponse() BackupVaultsClientGetInResourceGroupResponse` -- New function `*BackupVaultsClientUpdatePoller.ResumeToken() (string, error)` -- New function `*BackupInstancesClientDeletePoller.ResumeToken() (string, error)` -- New function `*RecoveryPointsClientListPager.NextPage(context.Context) bool` -- New function `*BackupInstancesClientDeletePollerResponse.Resume(context.Context, *BackupInstancesClient, string) error` -- New function `*BackupVaultsClientCreateOrUpdatePoller.FinalResponse(context.Context) (BackupVaultsClientCreateOrUpdateResponse, error)` -- New function `*ScheduleBasedBackupCriteria.GetBackupCriteria() *BackupCriteria` -- New function `*BackupInstancesClientTriggerRehydratePoller.ResumeToken() (string, error)` -- New function `*AbsoluteDeleteOption.UnmarshalJSON([]byte) error` -- New function `*AzureBackupDiscreteRecoveryPoint.GetAzureBackupRecoveryPoint() *AzureBackupRecoveryPoint` -- New function `*ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsPager.NextPage(context.Context) bool` -- New function `*BackupInstancesClientTriggerRestorePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ResourceGuardsClientGetBackupSecurityPINRequestsObjectsPager.NextPage(context.Context) bool` -- New function `*BackupInstancesClientTriggerRehydratePoller.FinalResponse(context.Context) (BackupInstancesClientTriggerRehydrateResponse, error)` -- New function `*ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsPager.Err() error` -- New function `NewClient(string, azcore.TokenCredential, *arm.ClientOptions) *Client` -- New function `*BackupVaultsClientGetInResourceGroupPager.NextPage(context.Context) bool` -- New function `*AbsoluteDeleteOption.GetDeleteOption() *DeleteOption` -- New function `*BackupVaultsClientGetInSubscriptionPager.Err() error` -- New function `*BackupPoliciesClientListPager.NextPage(context.Context) bool` -- New function `*AzureBackupRecoveryPointBasedRestoreRequest.GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest` -- New function `*BackupVaultsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*JobsClientListPager.NextPage(context.Context) bool` -- New function `AzureBackupRestoreRequest.MarshalJSON() ([]byte, error)` -- New function `BackupVaultsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupVaultsClientUpdateResponse, error)` -- New function `*AzureRetentionRule.GetBasePolicyRule() *BasePolicyRule` -- New function `*BackupInstancesClientTriggerRestorePollerResponse.Resume(context.Context, *BackupInstancesClient, string) error` -- New function `*RecoveryPointsClientListPager.Err() error` -- New function `*BackupVaultsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*BackupInstancesClientAdhocBackupPoller.Poll(context.Context) (*http.Response, error)` -- New function `*BackupInstancesClientTriggerRestorePoller.ResumeToken() (string, error)` -- New function `*BackupInstancesClientTriggerRestorePoller.Done() bool` -- New function `*BackupInstancesClientTriggerRestorePoller.FinalResponse(context.Context) (BackupInstancesClientTriggerRestoreResponse, error)` -- New function `*ResourceGuardsClientGetBackupSecurityPINRequestsObjectsPager.Err() error` -- New function `*RangeBasedItemLevelRestoreCriteria.GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria` -- New function `BackupInstancesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupInstancesClientCreateOrUpdateResponse, error)` -- New function `*BackupInstancesClientDeletePoller.FinalResponse(context.Context) (BackupInstancesClientDeleteResponse, error)` -- New function `*CustomCopyOption.GetCopyOption() *CopyOption` -- New function `*ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsPager.Err() error` -- New function `*ExportJobsClientTriggerPoller.ResumeToken() (string, error)` -- New function `*RestoreFilesTargetInfo.GetRestoreTargetInfoBase() *RestoreTargetInfoBase` -- New function `*OperationsClientListPager.Err() error` -- New function `*BackupInstancesClientValidateForRestorePoller.Done() bool` -- New function `*AdhocBasedTriggerContext.GetTriggerContext() *TriggerContext` -- New function `*BackupInstancesClientAdhocBackupPoller.Done() bool` -- New function `*BackupVaultsClientUpdatePoller.Done() bool` -- New function `*ExportJobsClientTriggerPollerResponse.Resume(context.Context, *ExportJobsClient, string) error` -- New function `*ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsPager.NextPage(context.Context) bool` -- New function `*BackupInstancesClientCreateOrUpdatePollerResponse.Resume(context.Context, *BackupInstancesClient, string) error` -- New function `*ResourceGuardsClientGetResourcesInSubscriptionPager.NextPage(context.Context) bool` -- New function `*RestoreTargetInfo.GetRestoreTargetInfoBase() *RestoreTargetInfoBase` -- New function `*BackupInstancesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*Client.CheckFeatureSupport(context.Context, string, FeatureValidationRequestBaseClassification, *ClientCheckFeatureSupportOptions) (ClientCheckFeatureSupportResponse, error)` -- New function `*AzureBackupParams.GetBackupParameters() *BackupParameters` -- New function `*AzureBackupRestoreWithRehydrationRequest.GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest` -- New function `*BackupInstancesClientAdhocBackupPoller.ResumeToken() (string, error)` -- New function `BackupVaultsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupVaultsClientCreateOrUpdateResponse, error)` -- New function `*BackupVaultsClientGetInResourceGroupPager.Err() error` -- New function `*CopyOnExpiryOption.UnmarshalJSON([]byte) error` -- New function `*ItemLevelRestoreTargetInfo.GetRestoreTargetInfoBase() *RestoreTargetInfoBase` -- New function `*ImmediateCopyOption.GetCopyOption() *CopyOption` -- New function `*BackupPoliciesClientListPager.PageResponse() BackupPoliciesClientListResponse` -- New function `*OperationsClientListPager.NextPage(context.Context) bool` -- New function `*BackupInstancesClientValidateForRestorePoller.Poll(context.Context) (*http.Response, error)` -- New function `*BackupVaultsClientCreateOrUpdatePoller.Done() bool` -- New function `*BackupInstancesClientValidateForBackupPoller.FinalResponse(context.Context) (BackupInstancesClientValidateForBackupResponse, error)` -- New function `*RecoveryPointsClientListPager.PageResponse() RecoveryPointsClientListResponse` -- New function `*ClientCheckFeatureSupportResult.UnmarshalJSON([]byte) error` -- New function `*BackupVaultsClientUpdatePoller.FinalResponse(context.Context) (BackupVaultsClientUpdateResponse, error)` -- New function `*BackupInstancesClientValidateForRestorePollerResponse.Resume(context.Context, *BackupInstancesClient, string) error` -- New function `*BackupInstancesClientValidateForRestorePoller.ResumeToken() (string, error)` -- New function `*BackupVaultsClientGetInSubscriptionPager.NextPage(context.Context) bool` -- New function `*BackupInstancesClientTriggerRehydratePoller.Done() bool` -- New function `*BackupVaultsClientGetInSubscriptionPager.PageResponse() BackupVaultsClientGetInSubscriptionResponse` -- New function `*BackupInstancesClientCreateOrUpdatePoller.FinalResponse(context.Context) (BackupInstancesClientCreateOrUpdateResponse, error)` -- New function `*CopyOnExpiryOption.GetCopyOption() *CopyOption` -- New function `BackupInstancesClientTriggerRehydratePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupInstancesClientTriggerRehydrateResponse, error)` -- New function `*AzureOperationalStoreParameters.GetDataStoreParameters() *DataStoreParameters` -- New struct `BackupInstancesClientAdhocBackupPoller` -- New struct `BackupInstancesClientAdhocBackupPollerResponse` -- New struct `BackupInstancesClientAdhocBackupResponse` -- New struct `BackupInstancesClientAdhocBackupResult` -- New struct `BackupInstancesClientBeginAdhocBackupOptions` -- New struct `BackupInstancesClientBeginCreateOrUpdateOptions` -- New struct `BackupInstancesClientBeginDeleteOptions` -- New struct `BackupInstancesClientBeginTriggerRehydrateOptions` -- New struct `BackupInstancesClientBeginTriggerRestoreOptions` -- New struct `BackupInstancesClientBeginValidateForBackupOptions` -- New struct `BackupInstancesClientBeginValidateForRestoreOptions` -- New struct `BackupInstancesClientCreateOrUpdatePoller` -- New struct `BackupInstancesClientCreateOrUpdatePollerResponse` -- New struct `BackupInstancesClientCreateOrUpdateResponse` -- New struct `BackupInstancesClientCreateOrUpdateResult` -- New struct `BackupInstancesClientDeletePoller` -- New struct `BackupInstancesClientDeletePollerResponse` -- New struct `BackupInstancesClientDeleteResponse` -- New struct `BackupInstancesClientGetOptions` -- New struct `BackupInstancesClientGetResponse` -- New struct `BackupInstancesClientGetResult` -- New struct `BackupInstancesClientListOptions` -- New struct `BackupInstancesClientListPager` -- New struct `BackupInstancesClientListResponse` -- New struct `BackupInstancesClientListResult` -- New struct `BackupInstancesClientTriggerRehydratePoller` -- New struct `BackupInstancesClientTriggerRehydratePollerResponse` -- New struct `BackupInstancesClientTriggerRehydrateResponse` -- New struct `BackupInstancesClientTriggerRestorePoller` -- New struct `BackupInstancesClientTriggerRestorePollerResponse` -- New struct `BackupInstancesClientTriggerRestoreResponse` -- New struct `BackupInstancesClientTriggerRestoreResult` -- New struct `BackupInstancesClientValidateForBackupPoller` -- New struct `BackupInstancesClientValidateForBackupPollerResponse` -- New struct `BackupInstancesClientValidateForBackupResponse` -- New struct `BackupInstancesClientValidateForBackupResult` -- New struct `BackupInstancesClientValidateForRestorePoller` -- New struct `BackupInstancesClientValidateForRestorePollerResponse` -- New struct `BackupInstancesClientValidateForRestoreResponse` -- New struct `BackupInstancesClientValidateForRestoreResult` -- New struct `BackupPoliciesClientCreateOrUpdateOptions` -- New struct `BackupPoliciesClientCreateOrUpdateResponse` -- New struct `BackupPoliciesClientCreateOrUpdateResult` -- New struct `BackupPoliciesClientDeleteOptions` -- New struct `BackupPoliciesClientDeleteResponse` -- New struct `BackupPoliciesClientGetOptions` -- New struct `BackupPoliciesClientGetResponse` -- New struct `BackupPoliciesClientGetResult` -- New struct `BackupPoliciesClientListOptions` -- New struct `BackupPoliciesClientListPager` -- New struct `BackupPoliciesClientListResponse` -- New struct `BackupPoliciesClientListResult` -- New struct `BackupVaultOperationResultsClientGetOptions` -- New struct `BackupVaultOperationResultsClientGetResponse` -- New struct `BackupVaultOperationResultsClientGetResult` -- New struct `BackupVaultsClientBeginCreateOrUpdateOptions` -- New struct `BackupVaultsClientBeginUpdateOptions` -- New struct `BackupVaultsClientCheckNameAvailabilityOptions` -- New struct `BackupVaultsClientCheckNameAvailabilityResponse` -- New struct `BackupVaultsClientCheckNameAvailabilityResult` -- New struct `BackupVaultsClientCreateOrUpdatePoller` -- New struct `BackupVaultsClientCreateOrUpdatePollerResponse` -- New struct `BackupVaultsClientCreateOrUpdateResponse` -- New struct `BackupVaultsClientCreateOrUpdateResult` -- New struct `BackupVaultsClientDeleteOptions` -- New struct `BackupVaultsClientDeleteResponse` -- New struct `BackupVaultsClientGetInResourceGroupOptions` -- New struct `BackupVaultsClientGetInResourceGroupPager` -- New struct `BackupVaultsClientGetInResourceGroupResponse` -- New struct `BackupVaultsClientGetInResourceGroupResult` -- New struct `BackupVaultsClientGetInSubscriptionOptions` -- New struct `BackupVaultsClientGetInSubscriptionPager` -- New struct `BackupVaultsClientGetInSubscriptionResponse` -- New struct `BackupVaultsClientGetInSubscriptionResult` -- New struct `BackupVaultsClientGetOptions` -- New struct `BackupVaultsClientGetResponse` -- New struct `BackupVaultsClientGetResult` -- New struct `BackupVaultsClientUpdatePoller` -- New struct `BackupVaultsClientUpdatePollerResponse` -- New struct `BackupVaultsClientUpdateResponse` -- New struct `BackupVaultsClientUpdateResult` -- New struct `Client` -- New struct `ClientCheckFeatureSupportOptions` -- New struct `ClientCheckFeatureSupportResponse` -- New struct `ClientCheckFeatureSupportResult` -- New struct `ExportJobsClientBeginTriggerOptions` -- New struct `ExportJobsClientTriggerPoller` -- New struct `ExportJobsClientTriggerPollerResponse` -- New struct `ExportJobsClientTriggerResponse` -- New struct `ExportJobsOperationResultClientGetOptions` -- New struct `ExportJobsOperationResultClientGetResponse` -- New struct `ExportJobsOperationResultClientGetResult` -- New struct `JobsClientGetOptions` -- New struct `JobsClientGetResponse` -- New struct `JobsClientGetResult` -- New struct `JobsClientListOptions` -- New struct `JobsClientListPager` -- New struct `JobsClientListResponse` -- New struct `JobsClientListResult` -- New struct `OperationResultClientGetOptions` -- New struct `OperationResultClientGetResponse` -- New struct `OperationResultClientGetResult` -- New struct `OperationStatusClientGetOptions` -- New struct `OperationStatusClientGetResponse` -- New struct `OperationStatusClientGetResult` -- New struct `OperationsClient` -- New struct `OperationsClientListOptions` -- New struct `OperationsClientListPager` -- New struct `OperationsClientListResponse` -- New struct `OperationsClientListResult` -- New struct `RecoveryPointsClientGetOptions` -- New struct `RecoveryPointsClientGetResponse` -- New struct `RecoveryPointsClientGetResult` -- New struct `RecoveryPointsClientListOptions` -- New struct `RecoveryPointsClientListPager` -- New struct `RecoveryPointsClientListResponse` -- New struct `RecoveryPointsClientListResult` -- New struct `ResourceGuardsClientDeleteOptions` -- New struct `ResourceGuardsClientDeleteResponse` -- New struct `ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions` -- New struct `ResourceGuardsClientGetBackupSecurityPINRequestsObjectsPager` -- New struct `ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse` -- New struct `ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResult` -- New struct `ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions` -- New struct `ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse` -- New struct `ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResult` -- New struct `ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions` -- New struct `ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse` -- New struct `ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResult` -- New struct `ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions` -- New struct `ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse` -- New struct `ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResult` -- New struct `ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions` -- New struct `ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse` -- New struct `ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResult` -- New struct `ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions` -- New struct `ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse` -- New struct `ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResult` -- New struct `ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions` -- New struct `ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse` -- New struct `ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResult` -- New struct `ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions` -- New struct `ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsPager` -- New struct `ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse` -- New struct `ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResult` -- New struct `ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions` -- New struct `ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsPager` -- New struct `ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse` -- New struct `ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResult` -- New struct `ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions` -- New struct `ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsPager` -- New struct `ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse` -- New struct `ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResult` -- New struct `ResourceGuardsClientGetOptions` -- New struct `ResourceGuardsClientGetResourcesInResourceGroupOptions` -- New struct `ResourceGuardsClientGetResourcesInResourceGroupPager` -- New struct `ResourceGuardsClientGetResourcesInResourceGroupResponse` -- New struct `ResourceGuardsClientGetResourcesInResourceGroupResult` -- New struct `ResourceGuardsClientGetResourcesInSubscriptionOptions` -- New struct `ResourceGuardsClientGetResourcesInSubscriptionPager` -- New struct `ResourceGuardsClientGetResourcesInSubscriptionResponse` -- New struct `ResourceGuardsClientGetResourcesInSubscriptionResult` -- New struct `ResourceGuardsClientGetResponse` -- New struct `ResourceGuardsClientGetResult` -- New struct `ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions` -- New struct `ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsPager` -- New struct `ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse` -- New struct `ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResult` -- New struct `ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions` -- New struct `ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsPager` -- New struct `ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse` -- New struct `ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResult` -- New struct `ResourceGuardsClientPatchOptions` -- New struct `ResourceGuardsClientPatchResponse` -- New struct `ResourceGuardsClientPatchResult` -- New struct `ResourceGuardsClientPutOptions` -- New struct `ResourceGuardsClientPutResponse` -- New struct `ResourceGuardsClientPutResult` -- New struct `RestorableTimeRangesClientFindOptions` -- New struct `RestorableTimeRangesClientFindResponse` -- New struct `RestorableTimeRangesClientFindResult` -- New field `RestoreTargetInfo` in struct `AzureBackupRecoveryPointBasedRestoreRequest` -- New field `SourceDataStoreType` in struct `AzureBackupRecoveryPointBasedRestoreRequest` -- New field `ObjectType` in struct `AzureBackupRecoveryPointBasedRestoreRequest` -- New field `DatasourceTypes` in struct `BackupPolicy` -- New field `ObjectType` in struct `BackupPolicy` -- New field `ID` in struct `AzureBackupRecoveryPointResource` -- New field `Name` in struct `AzureBackupRecoveryPointResource` -- New field `SystemData` in struct `AzureBackupRecoveryPointResource` -- New field `Type` in struct `AzureBackupRecoveryPointResource` -- New field `ObjectType` in struct `RangeBasedItemLevelRestoreCriteria` -- New field `RestoreLocation` in struct `RestoreTargetInfo` -- New field `ObjectType` in struct `RestoreTargetInfo` -- New field `RecoveryOption` in struct `RestoreTargetInfo` -- New field `SourceDataStoreType` in struct `AzureBackupRecoveryTimeBasedRestoreRequest` -- New field `ObjectType` in struct `AzureBackupRecoveryTimeBasedRestoreRequest` -- New field `RestoreTargetInfo` in struct `AzureBackupRecoveryTimeBasedRestoreRequest` -- New field `Type` in struct `AzureBackupFindRestorableTimeRangesResponseResource` -- New field `ID` in struct `AzureBackupFindRestorableTimeRangesResponseResource` -- New field `Name` in struct `AzureBackupFindRestorableTimeRangesResponseResource` -- New field `SystemData` in struct `AzureBackupFindRestorableTimeRangesResponseResource` -- New field `ObjectType` in struct `FeatureValidationRequest` -- New field `NextLink` in struct `AzureBackupJobResourceList` -- New field `NextLink` in struct `BackupInstanceResourceList` -- New field `ObjectType` in struct `ItemLevelRestoreTargetInfo` -- New field `RecoveryOption` in struct `ItemLevelRestoreTargetInfo` -- New field `RestoreLocation` in struct `ItemLevelRestoreTargetInfo` -- New field `ObjectType` in struct `AzureBackupParams` -- New field `NextLink` in struct `AzureBackupRecoveryPointResourceList` -- New field `ObjectType` in struct `AzureOperationalStoreParameters` -- New field `DataStoreType` in struct `AzureOperationalStoreParameters` -- New field `ObjectType` in struct `AzureBackupDiscreteRecoveryPoint` -- New field `NextLink` in struct `BackupVaultResourceList` -- New field `Duration` in struct `AbsoluteDeleteOption` -- New field `ObjectType` in struct `AbsoluteDeleteOption` -- New field `ObjectType` in struct `OperationJobExtendedInfo` -- New field `ObjectType` in struct `SecretStoreBasedAuthCredentials` -- New field `ObjectType` in struct `ImmediateCopyOption` -- New field `ObjectType` in struct `RestoreFilesTargetInfo` -- New field `RecoveryOption` in struct `RestoreFilesTargetInfo` -- New field `RestoreLocation` in struct `RestoreFilesTargetInfo` -- New field `NextLink` in struct `ResourceGuardResourceList` -- New field `ObjectType` in struct `ScheduleBasedBackupCriteria` -- New field `RestoreTargetInfo` in struct `AzureBackupRestoreWithRehydrationRequest` -- New field `SourceDataStoreType` in struct `AzureBackupRestoreWithRehydrationRequest` -- New field `ObjectType` in struct `AzureBackupRestoreWithRehydrationRequest` -- New field `RecoveryPointID` in struct `AzureBackupRestoreWithRehydrationRequest` -- New field `Error` in struct `CloudError` -- New field `URI` in struct `AzureBackupFindRestorableTimeRangesRequestResource` -- New field `CultureInfo` in struct `AzureBackupFindRestorableTimeRangesRequestResource` -- New field `HTTPMethod` in struct `AzureBackupFindRestorableTimeRangesRequestResource` -- New field `Headers` in struct `AzureBackupFindRestorableTimeRangesRequestResource` -- New field `Parameters` in struct `AzureBackupFindRestorableTimeRangesRequestResource` -- New field `SubscriptionID` in struct `AzureBackupFindRestorableTimeRangesRequestResource` -- New field `SupportedGroupVersions` in struct `AzureBackupFindRestorableTimeRangesRequestResource` -- New field `Type` in struct `BackupInstanceResource` -- New field `ID` in struct `BackupInstanceResource` -- New field `Name` in struct `BackupInstanceResource` -- New field `SystemData` in struct `BackupInstanceResource` -- New field `SystemData` in struct `BackupVaultResource` -- New field `ETag` in struct `BackupVaultResource` -- New field `Location` in struct `BackupVaultResource` -- New field `ID` in struct `BackupVaultResource` -- New field `Name` in struct `BackupVaultResource` -- New field `Type` in struct `BackupVaultResource` -- New field `Identity` in struct `BackupVaultResource` -- New field `Tags` in struct `BackupVaultResource` -- New field `Type` in struct `BaseBackupPolicyResource` -- New field `ID` in struct `BaseBackupPolicyResource` -- New field `Name` in struct `BaseBackupPolicyResource` -- New field `SystemData` in struct `BaseBackupPolicyResource` -- New field `ObjectType` in struct `CustomCopyOption` -- New field `SystemData` in struct `AzureBackupJobResource` -- New field `Type` in struct `AzureBackupJobResource` -- New field `ID` in struct `AzureBackupJobResource` -- New field `Name` in struct `AzureBackupJobResource` -- New field `ObjectType` in struct `FeatureValidationResponse` -- New field `ObjectType` in struct `AdhocBasedTriggerContext` -- New field `ObjectType` in struct `ScheduleBasedTriggerContext` -- New field `Tags` in struct `ResourceGuardResource` -- New field `Name` in struct `ResourceGuardResource` -- New field `ETag` in struct `ResourceGuardResource` -- New field `Identity` in struct `ResourceGuardResource` -- New field `ID` in struct `ResourceGuardResource` -- New field `SystemData` in struct `ResourceGuardResource` -- New field `Type` in struct `ResourceGuardResource` -- New field `Location` in struct `ResourceGuardResource` -- New field `ObjectType` in struct `CopyOnExpiryOption` -- New field `NextLink` in struct `BaseBackupPolicyResourceList` -- New field `Name` in struct `AzureRetentionRule` -- New field `ObjectType` in struct `AzureRetentionRule` -- New field `ObjectType` in struct `AzureBackupRule` -- New field `Name` in struct `AzureBackupRule` - - -## 0.1.0 (2021-12-07) - -- Initial preview release. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/README.md deleted file mode 100644 index 6a0a2db3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Azure Backup Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection) - -The `armdataprotection` module provides operations for working with Azure Backup. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/dataprotection/armdataprotection) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Backup module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Backup. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure Backup modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armdataprotection.NewClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armdataprotection.NewClient(, cred, &options) -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Backup` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/autorest.md deleted file mode 100644 index a9605a87..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/autorest.md +++ /dev/null @@ -1,12 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/dataprotection/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/dataprotection/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/build.go deleted file mode 100644 index 5cfdb6d9..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/dataprotection/armdataprotection - -package armdataprotection diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/ci.yml deleted file mode 100644 index a0513f4a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/dataprotection/armdataprotection/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/dataprotection/armdataprotection/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/dataprotection/armdataprotection' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/CHANGELOG.md new file mode 100644 index 00000000..61967038 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/CHANGELOG.md @@ -0,0 +1,202 @@ +# Release History + +## 3.1.0 (2024-07-26) +### Features Added + +- New enum type `BCDRSecurityLevel` with values `BCDRSecurityLevelExcellent`, `BCDRSecurityLevelFair`, `BCDRSecurityLevelGood`, `BCDRSecurityLevelNotSupported`, `BCDRSecurityLevelPoor` +- New enum type `EncryptionState` with values `EncryptionStateDisabled`, `EncryptionStateEnabled`, `EncryptionStateInconsistent` +- New enum type `IdentityType` with values `IdentityTypeSystemAssigned`, `IdentityTypeUserAssigned` +- New enum type `InfrastructureEncryptionState` with values `InfrastructureEncryptionStateDisabled`, `InfrastructureEncryptionStateEnabled` +- New function `NewBackupInstancesExtensionRoutingClient(azcore.TokenCredential, *arm.ClientOptions) (*BackupInstancesExtensionRoutingClient, error)` +- New function `*BackupInstancesExtensionRoutingClient.NewListPager(string, *BackupInstancesExtensionRoutingClientListOptions) *runtime.Pager[BackupInstancesExtensionRoutingClientListResponse]` +- New function `*ClientFactory.NewBackupInstancesExtensionRoutingClient() *BackupInstancesExtensionRoutingClient` +- New struct `CmkKekIdentity` +- New struct `CmkKeyVaultProperties` +- New struct `EncryptionSettings` +- New struct `StopProtectionRequest` +- New struct `SuspendBackupRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureBackupRecoveryPointBasedRestoreRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureBackupRecoveryTimeBasedRestoreRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureBackupRestoreRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureBackupRestoreWithRehydrationRequest` +- New field `ResourceGuardOperationRequests` in struct `BackupInstance` +- New field `XMSAuthorizationAuxiliary` in struct `BackupInstancesClientBeginCreateOrUpdateOptions` +- New field `XMSAuthorizationAuxiliary` in struct `BackupInstancesClientBeginDeleteOptions` +- New field `Parameters`, `XMSAuthorizationAuxiliary` in struct `BackupInstancesClientBeginStopProtectionOptions` +- New field `Parameters`, `XMSAuthorizationAuxiliary` in struct `BackupInstancesClientBeginSuspendBackupsOptions` +- New field `XMSAuthorizationAuxiliary` in struct `BackupInstancesClientBeginTriggerRestoreOptions` +- New field `BcdrSecurityLevel`, `ResourceGuardOperationRequests` in struct `BackupVault` +- New field `XMSAuthorizationAuxiliary` in struct `BackupVaultsClientBeginCreateOrUpdateOptions` +- New field `XMSAuthorizationAuxiliary` in struct `BackupVaultsClientBeginUpdateOptions` +- New field `ResourceGuardOperationRequests` in struct `DeletedBackupInstance` +- New field `XMSAuthorizationAuxiliary` in struct `DppResourceGuardProxyClientUnlockDeleteOptions` +- New field `ResourceModifierReference` in struct `KubernetesClusterRestoreCriteria` +- New field `ResourceModifierReference` in struct `KubernetesClusterVaultTierRestoreCriteria` +- New field `ResourceGuardOperationRequests` in struct `PatchBackupVaultInput` +- New field `EncryptionSettings` in struct `SecuritySettings` + + +## 3.0.0 (2023-12-22) +### Breaking Changes + +- Type of `BaseResourceProperties.ObjectType` has been changed from `*string` to `*ResourcePropertiesObjectType` + +### Features Added + +- New enum type `RecoveryPointCompletionState` with values `RecoveryPointCompletionStateCompleted`, `RecoveryPointCompletionStatePartial` +- New enum type `ResourcePropertiesObjectType` with values `ResourcePropertiesObjectTypeDefaultResourceProperties` +- New function `*BackupInstancesClient.BeginTriggerCrossRegionRestore(context.Context, string, string, CrossRegionRestoreRequestObject, *BackupInstancesClientBeginTriggerCrossRegionRestoreOptions) (*runtime.Poller[BackupInstancesClientTriggerCrossRegionRestoreResponse], error)` +- New function `*BackupInstancesClient.BeginValidateCrossRegionRestore(context.Context, string, string, ValidateCrossRegionRestoreRequestObject, *BackupInstancesClientBeginValidateCrossRegionRestoreOptions) (*runtime.Poller[BackupInstancesClientValidateCrossRegionRestoreResponse], error)` +- New function `*ClientFactory.NewFetchCrossRegionRestoreJobClient() *FetchCrossRegionRestoreJobClient` +- New function `*ClientFactory.NewFetchCrossRegionRestoreJobsClient() *FetchCrossRegionRestoreJobsClient` +- New function `*ClientFactory.NewFetchSecondaryRecoveryPointsClient() *FetchSecondaryRecoveryPointsClient` +- New function `*DefaultResourceProperties.GetBaseResourceProperties() *BaseResourceProperties` +- New function `NewFetchCrossRegionRestoreJobClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FetchCrossRegionRestoreJobClient, error)` +- New function `*FetchCrossRegionRestoreJobClient.Get(context.Context, string, string, CrossRegionRestoreJobRequest, *FetchCrossRegionRestoreJobClientGetOptions) (FetchCrossRegionRestoreJobClientGetResponse, error)` +- New function `NewFetchCrossRegionRestoreJobsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FetchCrossRegionRestoreJobsClient, error)` +- New function `*FetchCrossRegionRestoreJobsClient.NewListPager(string, string, CrossRegionRestoreJobsRequest, *FetchCrossRegionRestoreJobsClientListOptions) *runtime.Pager[FetchCrossRegionRestoreJobsClientListResponse]` +- New function `NewFetchSecondaryRecoveryPointsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FetchSecondaryRecoveryPointsClient, error)` +- New function `*FetchSecondaryRecoveryPointsClient.NewListPager(string, string, FetchSecondaryRPsRequestParameters, *FetchSecondaryRecoveryPointsClientListOptions) *runtime.Pager[FetchSecondaryRecoveryPointsClientListResponse]` +- New function `*KubernetesClusterVaultTierRestoreCriteria.GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria` +- New struct `CrossRegionRestoreDetails` +- New struct `CrossRegionRestoreJobRequest` +- New struct `CrossRegionRestoreJobsRequest` +- New struct `CrossRegionRestoreRequestObject` +- New struct `DefaultResourceProperties` +- New struct `ErrorDetail` +- New struct `ErrorResponse` +- New struct `FetchSecondaryRPsRequestParameters` +- New struct `KubernetesClusterVaultTierRestoreCriteria` +- New struct `UserFacingWarningDetail` +- New struct `ValidateCrossRegionRestoreRequestObject` +- New field `RecoveryPointState` in struct `AzureBackupDiscreteRecoveryPoint` +- New field `ReplicatedRegions` in struct `BackupVault` +- New field `WarningDetails` in struct `JobExtendedInfo` + + +## 2.4.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.3.0 (2023-07-28) +### Features Added + +- New enum type `CrossRegionRestoreState` with values `CrossRegionRestoreStateDisabled`, `CrossRegionRestoreStateEnabled` +- New enum type `SecureScoreLevel` with values `SecureScoreLevelAdequate`, `SecureScoreLevelMaximum`, `SecureScoreLevelMinimum`, `SecureScoreLevelNone`, `SecureScoreLevelNotSupported` +- New function `*BaseResourceProperties.GetBaseResourceProperties() *BaseResourceProperties` +- New struct `CrossRegionRestoreSettings` +- New struct `IdentityDetails` +- New struct `NamespacedNameResource` +- New struct `UserAssignedIdentity` +- New field `RehydrationPriority` in struct `AzureBackupJob` +- New field `IdentityDetails` in struct `AzureBackupRecoveryPointBasedRestoreRequest` +- New field `IdentityDetails` in struct `AzureBackupRecoveryTimeBasedRestoreRequest` +- New field `IdentityDetails` in struct `AzureBackupRestoreRequest` +- New field `IdentityDetails` in struct `AzureBackupRestoreWithRehydrationRequest` +- New field `IdentityDetails` in struct `BackupInstance` +- New field `SecureScore` in struct `BackupVault` +- New field `ResourceProperties` in struct `Datasource` +- New field `ResourceProperties` in struct `DatasourceSet` +- New field `IdentityDetails` in struct `DeletedBackupInstance` +- New field `UserAssignedIdentities` in struct `DppIdentityDetails` +- New field `CrossRegionRestoreSettings` in struct `FeatureSettings` +- New field `BackupHookReferences` in struct `KubernetesClusterBackupDatasourceParameters` +- New field `RestoreHookReferences` in struct `KubernetesClusterRestoreCriteria` + + +## 2.2.0 (2023-06-23) +### Features Added + +- New function `*ClientFactory.NewDppResourceGuardProxyClient() *DppResourceGuardProxyClient` +- New function `NewDppResourceGuardProxyClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DppResourceGuardProxyClient, error)` +- New function `*DppResourceGuardProxyClient.CreateOrUpdate(context.Context, string, string, string, ResourceGuardProxyBaseResource, *DppResourceGuardProxyClientCreateOrUpdateOptions) (DppResourceGuardProxyClientCreateOrUpdateResponse, error)` +- New function `*DppResourceGuardProxyClient.Delete(context.Context, string, string, string, *DppResourceGuardProxyClientDeleteOptions) (DppResourceGuardProxyClientDeleteResponse, error)` +- New function `*DppResourceGuardProxyClient.Get(context.Context, string, string, string, *DppResourceGuardProxyClientGetOptions) (DppResourceGuardProxyClientGetResponse, error)` +- New function `*DppResourceGuardProxyClient.NewListPager(string, string, *DppResourceGuardProxyClientListOptions) *runtime.Pager[DppResourceGuardProxyClientListResponse]` +- New function `*DppResourceGuardProxyClient.UnlockDelete(context.Context, string, string, string, UnlockDeleteRequest, *DppResourceGuardProxyClientUnlockDeleteOptions) (DppResourceGuardProxyClientUnlockDeleteResponse, error)` +- New struct `ResourceGuardOperationDetail` +- New struct `ResourceGuardProxyBase` +- New struct `ResourceGuardProxyBaseResource` +- New struct `ResourceGuardProxyBaseResourceList` +- New struct `UnlockDeleteRequest` +- New struct `UnlockDeleteResponse` + + +## 2.1.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + + +## 2.1.0 (2023-03-28) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + + +## 2.0.0 (2023-02-24) +### Breaking Changes + +- Function `*ResourceGuardsClient.Patch` parameter(s) have been changed from `(context.Context, string, string, PatchResourceRequestInput, *ResourceGuardsClientPatchOptions)` to `(context.Context, string, string, PatchResourceGuardInput, *ResourceGuardsClientPatchOptions)` +- Const `StorageSettingStoreTypesSnapshotStore` from type alias `StorageSettingStoreTypes` has been removed +- Operation `*BackupVaultsClient.Delete` has been changed to LRO, use `*BackupVaultsClient.BeginDelete` instead. +- Field `Identity` of struct `ResourceGuardResource` has been removed + +### Features Added + +- New value `SourceDataStoreTypeOperationalStore` added to type alias `SourceDataStoreType` +- New value `StorageSettingStoreTypesOperationalStore` added to type alias `StorageSettingStoreTypes` +- New value `StorageSettingTypesZoneRedundant` added to type alias `StorageSettingTypes` +- New type alias `CrossSubscriptionRestoreState` with values `CrossSubscriptionRestoreStateDisabled`, `CrossSubscriptionRestoreStateEnabled`, `CrossSubscriptionRestoreStatePermanentlyDisabled` +- New type alias `ExistingResourcePolicy` with values `ExistingResourcePolicyPatch`, `ExistingResourcePolicySkip` +- New type alias `ImmutabilityState` with values `ImmutabilityStateDisabled`, `ImmutabilityStateLocked`, `ImmutabilityStateUnlocked` +- New type alias `PersistentVolumeRestoreMode` with values `PersistentVolumeRestoreModeRestoreWithVolumeData`, `PersistentVolumeRestoreModeRestoreWithoutVolumeData` +- New type alias `SoftDeleteState` with values `SoftDeleteStateAlwaysOn`, `SoftDeleteStateOff`, `SoftDeleteStateOn` +- New function `*BackupDatasourceParameters.GetBackupDatasourceParameters() *BackupDatasourceParameters` +- New function `*BlobBackupDatasourceParameters.GetBackupDatasourceParameters() *BackupDatasourceParameters` +- New function `NewDeletedBackupInstancesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DeletedBackupInstancesClient, error)` +- New function `*DeletedBackupInstancesClient.Get(context.Context, string, string, string, *DeletedBackupInstancesClientGetOptions) (DeletedBackupInstancesClientGetResponse, error)` +- New function `*DeletedBackupInstancesClient.NewListPager(string, string, *DeletedBackupInstancesClientListOptions) *runtime.Pager[DeletedBackupInstancesClientListResponse]` +- New function `*DeletedBackupInstancesClient.BeginUndelete(context.Context, string, string, string, *DeletedBackupInstancesClientBeginUndeleteOptions) (*runtime.Poller[DeletedBackupInstancesClientUndeleteResponse], error)` +- New function `*ItemPathBasedRestoreCriteria.GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria` +- New function `*KubernetesClusterBackupDatasourceParameters.GetBackupDatasourceParameters() *BackupDatasourceParameters` +- New function `*KubernetesClusterRestoreCriteria.GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria` +- New struct `BlobBackupDatasourceParameters` +- New struct `CrossSubscriptionRestoreSettings` +- New struct `DeletedBackupInstance` +- New struct `DeletedBackupInstanceResource` +- New struct `DeletedBackupInstanceResourceList` +- New struct `DeletedBackupInstancesClient` +- New struct `DeletedBackupInstancesClientListResponse` +- New struct `DeletedBackupInstancesClientUndeleteResponse` +- New struct `DeletionInfo` +- New struct `DppBaseTrackedResource` +- New struct `DppProxyResource` +- New struct `FeatureSettings` +- New struct `ImmutabilitySettings` +- New struct `ItemPathBasedRestoreCriteria` +- New struct `KubernetesClusterBackupDatasourceParameters` +- New struct `KubernetesClusterRestoreCriteria` +- New struct `PatchResourceGuardInput` +- New struct `SecuritySettings` +- New struct `SoftDeleteSettings` +- New field `ExpiryTime` in struct `AzureBackupDiscreteRecoveryPoint` +- New field `Tags` in struct `BackupInstanceResource` +- New field `FeatureSettings` in struct `BackupVault` +- New field `IsVaultProtectedByResourceGuard` in struct `BackupVault` +- New field `SecuritySettings` in struct `BackupVault` +- New field `FeatureSettings` in struct `PatchBackupVaultInput` +- New field `SecuritySettings` in struct `PatchBackupVaultInput` +- New field `BackupDatasourceParametersList` in struct `PolicyParameters` +- New field `TargetResourceArmID` in struct `TargetDetails` + + +## 1.0.0 (2022-05-18) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/README.md new file mode 100644 index 00000000..b96f6bf8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/README.md @@ -0,0 +1,92 @@ +# Azure Backup Module for Go + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3) + +The `armdataprotection` module provides operations for working with Azure Backup. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/dataprotection/armdataprotection) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Backup module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Backup. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Backup module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armdataprotection.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armdataprotection.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewBackupInstancesClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Backup` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/autorest.md new file mode 100644 index 00000000..ebf2a952 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/81a4ee5a83ae38620c0e1404793caffe005d26e4/specification/dataprotection/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/81a4ee5a83ae38620c0e1404793caffe005d26e4/specification/dataprotection/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 3.1.0 +tag: package-2024-04 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupinstances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupinstances_client.go new file mode 100644 index 00000000..aa941ee8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupinstances_client.go @@ -0,0 +1,1444 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupInstancesClient contains the methods for the BackupInstances group. +// Don't use this type directly, use NewBackupInstancesClient() instead. +type BackupInstancesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupInstancesClient creates a new instance of BackupInstancesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupInstancesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupInstancesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginAdhocBackup - Trigger adhoc backup +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - parameters - Request body for operation +// - options - BackupInstancesClientBeginAdhocBackupOptions contains the optional parameters for the BackupInstancesClient.BeginAdhocBackup +// method. +func (client *BackupInstancesClient) BeginAdhocBackup(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters TriggerBackupRequest, options *BackupInstancesClientBeginAdhocBackupOptions) (*runtime.Poller[BackupInstancesClientAdhocBackupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.adhocBackup(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientAdhocBackupResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientAdhocBackupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// AdhocBackup - Trigger adhoc backup +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) adhocBackup(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters TriggerBackupRequest, options *BackupInstancesClientBeginAdhocBackupOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginAdhocBackup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.adhocBackupCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// adhocBackupCreateRequest creates the AdhocBackup request. +func (client *BackupInstancesClient) adhocBackupCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters TriggerBackupRequest, options *BackupInstancesClientBeginAdhocBackupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdate - Create or update a backup instance in a backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - parameters - Request body for operation +// - options - BackupInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupInstancesClient.BeginCreateOrUpdate +// method. +func (client *BackupInstancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters BackupInstanceResource, options *BackupInstancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[BackupInstancesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a backup instance in a backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) createOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters BackupInstanceResource, options *BackupInstancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BackupInstancesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters BackupInstanceResource, options *BackupInstancesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete a backup instance in a backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - options - BackupInstancesClientBeginDeleteOptions contains the optional parameters for the BackupInstancesClient.BeginDelete +// method. +func (client *BackupInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginDeleteOptions) (*runtime.Poller[BackupInstancesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete a backup instance in a backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) deleteOperation(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BackupInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + return req, nil +} + +// Get - Gets a backup instance with name in a backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - options - BackupInstancesClientGetOptions contains the optional parameters for the BackupInstancesClient.Get method. +func (client *BackupInstancesClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientGetOptions) (BackupInstancesClientGetResponse, error) { + var err error + const operationName = "BackupInstancesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return BackupInstancesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupInstancesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupInstancesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupInstancesClient) getHandleResponse(resp *http.Response) (BackupInstancesClientGetResponse, error) { + result := BackupInstancesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupInstanceResource); err != nil { + return BackupInstancesClientGetResponse{}, err + } + return result, nil +} + +// GetBackupInstanceOperationResult - Get result of backup instance creation operation +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - options - BackupInstancesClientGetBackupInstanceOperationResultOptions contains the optional parameters for the BackupInstancesClient.GetBackupInstanceOperationResult +// method. +func (client *BackupInstancesClient) GetBackupInstanceOperationResult(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, operationID string, options *BackupInstancesClientGetBackupInstanceOperationResultOptions) (BackupInstancesClientGetBackupInstanceOperationResultResponse, error) { + var err error + const operationName = "BackupInstancesClient.GetBackupInstanceOperationResult" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBackupInstanceOperationResultCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, operationID, options) + if err != nil { + return BackupInstancesClientGetBackupInstanceOperationResultResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupInstancesClientGetBackupInstanceOperationResultResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return BackupInstancesClientGetBackupInstanceOperationResultResponse{}, err + } + resp, err := client.getBackupInstanceOperationResultHandleResponse(httpResp) + return resp, err +} + +// getBackupInstanceOperationResultCreateRequest creates the GetBackupInstanceOperationResult request. +func (client *BackupInstancesClient) getBackupInstanceOperationResultCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, operationID string, options *BackupInstancesClientGetBackupInstanceOperationResultOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/operationResults/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBackupInstanceOperationResultHandleResponse handles the GetBackupInstanceOperationResult response. +func (client *BackupInstancesClient) getBackupInstanceOperationResultHandleResponse(resp *http.Response) (BackupInstancesClientGetBackupInstanceOperationResultResponse, error) { + result := BackupInstancesClientGetBackupInstanceOperationResultResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupInstanceResource); err != nil { + return BackupInstancesClientGetBackupInstanceOperationResultResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a backup instances belonging to a backup vault +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - BackupInstancesClientListOptions contains the optional parameters for the BackupInstancesClient.NewListPager +// method. +func (client *BackupInstancesClient) NewListPager(resourceGroupName string, vaultName string, options *BackupInstancesClientListOptions) *runtime.Pager[BackupInstancesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupInstancesClientListResponse]{ + More: func(page BackupInstancesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupInstancesClientListResponse) (BackupInstancesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupInstancesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, vaultName, options) + }, nil) + if err != nil { + return BackupInstancesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupInstancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *BackupInstancesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupInstancesClient) listHandleResponse(resp *http.Response) (BackupInstancesClientListResponse, error) { + result := BackupInstancesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupInstanceResourceList); err != nil { + return BackupInstancesClientListResponse{}, err + } + return result, nil +} + +// BeginResumeBackups - This operation will resume backups for backup instance +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - options - BackupInstancesClientBeginResumeBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginResumeBackups +// method. +func (client *BackupInstancesClient) BeginResumeBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeBackupsOptions) (*runtime.Poller[BackupInstancesClientResumeBackupsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resumeBackups(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientResumeBackupsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientResumeBackupsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResumeBackups - This operation will resume backups for backup instance +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) resumeBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeBackupsOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginResumeBackups" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resumeBackupsCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resumeBackupsCreateRequest creates the ResumeBackups request. +func (client *BackupInstancesClient) resumeBackupsCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeBackupsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeBackups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginResumeProtection - This operation will resume protection for a stopped backup instance +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - options - BackupInstancesClientBeginResumeProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginResumeProtection +// method. +func (client *BackupInstancesClient) BeginResumeProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeProtectionOptions) (*runtime.Poller[BackupInstancesClientResumeProtectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resumeProtection(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientResumeProtectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientResumeProtectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResumeProtection - This operation will resume protection for a stopped backup instance +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) resumeProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeProtectionOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginResumeProtection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resumeProtectionCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resumeProtectionCreateRequest creates the ResumeProtection request. +func (client *BackupInstancesClient) resumeProtectionCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeProtectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeProtection" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStopProtection - This operation will stop protection of a backup instance and data will be held forever +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - options - BackupInstancesClientBeginStopProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginStopProtection +// method. +func (client *BackupInstancesClient) BeginStopProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginStopProtectionOptions) (*runtime.Poller[BackupInstancesClientStopProtectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopProtection(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientStopProtectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientStopProtectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StopProtection - This operation will stop protection of a backup instance and data will be held forever +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) stopProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginStopProtectionOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginStopProtection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopProtectionCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopProtectionCreateRequest creates the StopProtection request. +func (client *BackupInstancesClient) stopProtectionCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginStopProtectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/stopProtection" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginSuspendBackups - This operation will stop backup for a backup instance and retains the backup data as per the policy +// (except latest Recovery point, which will be retained forever) +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - options - BackupInstancesClientBeginSuspendBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginSuspendBackups +// method. +func (client *BackupInstancesClient) BeginSuspendBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginSuspendBackupsOptions) (*runtime.Poller[BackupInstancesClientSuspendBackupsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.suspendBackups(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientSuspendBackupsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientSuspendBackupsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SuspendBackups - This operation will stop backup for a backup instance and retains the backup data as per the policy (except +// latest Recovery point, which will be retained forever) +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) suspendBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginSuspendBackupsOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginSuspendBackups" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.suspendBackupsCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// suspendBackupsCreateRequest creates the SuspendBackups request. +func (client *BackupInstancesClient) suspendBackupsCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginSuspendBackupsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/suspendBackups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginSyncBackupInstance - Sync backup instance again in case of failure This action will retry last failed operation and +// will bring backup instance to valid state +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - parameters - Request body for operation +// - options - BackupInstancesClientBeginSyncBackupInstanceOptions contains the optional parameters for the BackupInstancesClient.BeginSyncBackupInstance +// method. +func (client *BackupInstancesClient) BeginSyncBackupInstance(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters SyncBackupInstanceRequest, options *BackupInstancesClientBeginSyncBackupInstanceOptions) (*runtime.Poller[BackupInstancesClientSyncBackupInstanceResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.syncBackupInstance(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientSyncBackupInstanceResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientSyncBackupInstanceResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SyncBackupInstance - Sync backup instance again in case of failure This action will retry last failed operation and will +// bring backup instance to valid state +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) syncBackupInstance(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters SyncBackupInstanceRequest, options *BackupInstancesClientBeginSyncBackupInstanceOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginSyncBackupInstance" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.syncBackupInstanceCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// syncBackupInstanceCreateRequest creates the SyncBackupInstance request. +func (client *BackupInstancesClient) syncBackupInstanceCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters SyncBackupInstanceRequest, options *BackupInstancesClientBeginSyncBackupInstanceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/sync" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginTriggerCrossRegionRestore - Triggers Cross Region Restore for BackupInstance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - location - The name of the Azure region. +// - parameters - Request body for trigger CRR operation +// - options - BackupInstancesClientBeginTriggerCrossRegionRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerCrossRegionRestore +// method. +func (client *BackupInstancesClient) BeginTriggerCrossRegionRestore(ctx context.Context, resourceGroupName string, location string, parameters CrossRegionRestoreRequestObject, options *BackupInstancesClientBeginTriggerCrossRegionRestoreOptions) (*runtime.Poller[BackupInstancesClientTriggerCrossRegionRestoreResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.triggerCrossRegionRestore(ctx, resourceGroupName, location, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientTriggerCrossRegionRestoreResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientTriggerCrossRegionRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TriggerCrossRegionRestore - Triggers Cross Region Restore for BackupInstance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) triggerCrossRegionRestore(ctx context.Context, resourceGroupName string, location string, parameters CrossRegionRestoreRequestObject, options *BackupInstancesClientBeginTriggerCrossRegionRestoreOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginTriggerCrossRegionRestore" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.triggerCrossRegionRestoreCreateRequest(ctx, resourceGroupName, location, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// triggerCrossRegionRestoreCreateRequest creates the TriggerCrossRegionRestore request. +func (client *BackupInstancesClient) triggerCrossRegionRestoreCreateRequest(ctx context.Context, resourceGroupName string, location string, parameters CrossRegionRestoreRequestObject, options *BackupInstancesClientBeginTriggerCrossRegionRestoreOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/crossRegionRestore" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginTriggerRehydrate - rehydrate recovery point for restore for a BackupInstance +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - parameters - Request body for operation +// - options - BackupInstancesClientBeginTriggerRehydrateOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRehydrate +// method. +func (client *BackupInstancesClient) BeginTriggerRehydrate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRehydrationRequest, options *BackupInstancesClientBeginTriggerRehydrateOptions) (*runtime.Poller[BackupInstancesClientTriggerRehydrateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.triggerRehydrate(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientTriggerRehydrateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientTriggerRehydrateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TriggerRehydrate - rehydrate recovery point for restore for a BackupInstance +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) triggerRehydrate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRehydrationRequest, options *BackupInstancesClientBeginTriggerRehydrateOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginTriggerRehydrate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.triggerRehydrateCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// triggerRehydrateCreateRequest creates the TriggerRehydrate request. +func (client *BackupInstancesClient) triggerRehydrateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRehydrationRequest, options *BackupInstancesClientBeginTriggerRehydrateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginTriggerRestore - Triggers restore for a BackupInstance +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - parameters - Request body for operation +// - options - BackupInstancesClientBeginTriggerRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRestore +// method. +func (client *BackupInstancesClient) BeginTriggerRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRestoreRequestClassification, options *BackupInstancesClientBeginTriggerRestoreOptions) (*runtime.Poller[BackupInstancesClientTriggerRestoreResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.triggerRestore(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientTriggerRestoreResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientTriggerRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TriggerRestore - Triggers restore for a BackupInstance +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) triggerRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRestoreRequestClassification, options *BackupInstancesClientBeginTriggerRestoreOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginTriggerRestore" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.triggerRestoreCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// triggerRestoreCreateRequest creates the TriggerRestore request. +func (client *BackupInstancesClient) triggerRestoreCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRestoreRequestClassification, options *BackupInstancesClientBeginTriggerRestoreOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginValidateCrossRegionRestore - Validates whether Cross Region Restore can be triggered for DataSource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - location - The name of the Azure region. +// - parameters - Request body for operation +// - options - BackupInstancesClientBeginValidateCrossRegionRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginValidateCrossRegionRestore +// method. +func (client *BackupInstancesClient) BeginValidateCrossRegionRestore(ctx context.Context, resourceGroupName string, location string, parameters ValidateCrossRegionRestoreRequestObject, options *BackupInstancesClientBeginValidateCrossRegionRestoreOptions) (*runtime.Poller[BackupInstancesClientValidateCrossRegionRestoreResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validateCrossRegionRestore(ctx, resourceGroupName, location, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientValidateCrossRegionRestoreResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientValidateCrossRegionRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ValidateCrossRegionRestore - Validates whether Cross Region Restore can be triggered for DataSource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) validateCrossRegionRestore(ctx context.Context, resourceGroupName string, location string, parameters ValidateCrossRegionRestoreRequestObject, options *BackupInstancesClientBeginValidateCrossRegionRestoreOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginValidateCrossRegionRestore" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCrossRegionRestoreCreateRequest(ctx, resourceGroupName, location, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateCrossRegionRestoreCreateRequest creates the ValidateCrossRegionRestore request. +func (client *BackupInstancesClient) validateCrossRegionRestoreCreateRequest(ctx context.Context, resourceGroupName string, location string, parameters ValidateCrossRegionRestoreRequestObject, options *BackupInstancesClientBeginValidateCrossRegionRestoreOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/validateCrossRegionRestore" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginValidateForBackup - Validate whether adhoc backup will be successful or not +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - parameters - Request body for operation +// - options - BackupInstancesClientBeginValidateForBackupOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForBackup +// method. +func (client *BackupInstancesClient) BeginValidateForBackup(ctx context.Context, resourceGroupName string, vaultName string, parameters ValidateForBackupRequest, options *BackupInstancesClientBeginValidateForBackupOptions) (*runtime.Poller[BackupInstancesClientValidateForBackupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validateForBackup(ctx, resourceGroupName, vaultName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientValidateForBackupResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientValidateForBackupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ValidateForBackup - Validate whether adhoc backup will be successful or not +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) validateForBackup(ctx context.Context, resourceGroupName string, vaultName string, parameters ValidateForBackupRequest, options *BackupInstancesClientBeginValidateForBackupOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginValidateForBackup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateForBackupCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateForBackupCreateRequest creates the ValidateForBackup request. +func (client *BackupInstancesClient) validateForBackupCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters ValidateForBackupRequest, options *BackupInstancesClientBeginValidateForBackupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginValidateForRestore - Validates if Restore can be triggered for a DataSource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - parameters - Request body for operation +// - options - BackupInstancesClientBeginValidateForRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForRestore +// method. +func (client *BackupInstancesClient) BeginValidateForRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters ValidateRestoreRequestObject, options *BackupInstancesClientBeginValidateForRestoreOptions) (*runtime.Poller[BackupInstancesClientValidateForRestoreResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.validateForRestore(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupInstancesClientValidateForRestoreResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupInstancesClientValidateForRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ValidateForRestore - Validates if Restore can be triggered for a DataSource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupInstancesClient) validateForRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters ValidateRestoreRequestObject, options *BackupInstancesClientBeginValidateForRestoreOptions) (*http.Response, error) { + var err error + const operationName = "BackupInstancesClient.BeginValidateForRestore" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateForRestoreCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// validateForRestoreCreateRequest creates the ValidateForRestore request. +func (client *BackupInstancesClient) validateForRestoreCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters ValidateRestoreRequestObject, options *BackupInstancesClientBeginValidateForRestoreOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupinstancesextensionrouting_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupinstancesextensionrouting_client.go new file mode 100644 index 00000000..207cf6ff --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupinstancesextensionrouting_client.go @@ -0,0 +1,92 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "strings" +) + +// BackupInstancesExtensionRoutingClient contains the methods for the BackupInstancesExtensionRouting group. +// Don't use this type directly, use NewBackupInstancesExtensionRoutingClient() instead. +type BackupInstancesExtensionRoutingClient struct { + internal *arm.Client +} + +// NewBackupInstancesExtensionRoutingClient creates a new instance of BackupInstancesExtensionRoutingClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupInstancesExtensionRoutingClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupInstancesExtensionRoutingClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupInstancesExtensionRoutingClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Gets a list of backup instances associated with a tracked resource +// +// Generated from API version 2024-04-01 +// - resourceID - ARM path of the resource to be protected using Microsoft.DataProtection +// - options - BackupInstancesExtensionRoutingClientListOptions contains the optional parameters for the BackupInstancesExtensionRoutingClient.NewListPager +// method. +func (client *BackupInstancesExtensionRoutingClient) NewListPager(resourceID string, options *BackupInstancesExtensionRoutingClientListOptions) *runtime.Pager[BackupInstancesExtensionRoutingClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupInstancesExtensionRoutingClientListResponse]{ + More: func(page BackupInstancesExtensionRoutingClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupInstancesExtensionRoutingClientListResponse) (BackupInstancesExtensionRoutingClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupInstancesExtensionRoutingClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceID, options) + }, nil) + if err != nil { + return BackupInstancesExtensionRoutingClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupInstancesExtensionRoutingClient) listCreateRequest(ctx context.Context, resourceID string, options *BackupInstancesExtensionRoutingClientListOptions) (*policy.Request, error) { + urlPath := "/{resourceId}/providers/Microsoft.DataProtection/backupInstances" + urlPath = strings.ReplaceAll(urlPath, "{resourceId}", resourceID) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupInstancesExtensionRoutingClient) listHandleResponse(resp *http.Response) (BackupInstancesExtensionRoutingClientListResponse, error) { + result := BackupInstancesExtensionRoutingClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupInstanceResourceList); err != nil { + return BackupInstancesExtensionRoutingClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backuppolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backuppolicies_client.go new file mode 100644 index 00000000..1c82a327 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backuppolicies_client.go @@ -0,0 +1,308 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupPoliciesClient contains the methods for the BackupPolicies group. +// Don't use this type directly, use NewBackupPoliciesClient() instead. +type BackupPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupPoliciesClient creates a new instance of BackupPoliciesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or Updates a backup policy belonging to a backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupPolicyName - Name of the policy +// - parameters - Request body for operation +// - options - BackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BackupPoliciesClient.CreateOrUpdate +// method. +func (client *BackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, parameters BaseBackupPolicyResource, options *BackupPoliciesClientCreateOrUpdateOptions) (BackupPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "BackupPoliciesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, backupPolicyName, parameters, options) + if err != nil { + return BackupPoliciesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupPoliciesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupPoliciesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BackupPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, parameters BaseBackupPolicyResource, options *BackupPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupPolicyName == "" { + return nil, errors.New("parameter backupPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *BackupPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (BackupPoliciesClientCreateOrUpdateResponse, error) { + result := BackupPoliciesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BaseBackupPolicyResource); err != nil { + return BackupPoliciesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes a backup policy belonging to a backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - BackupPoliciesClientDeleteOptions contains the optional parameters for the BackupPoliciesClient.Delete method. +func (client *BackupPoliciesClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, options *BackupPoliciesClientDeleteOptions) (BackupPoliciesClientDeleteResponse, error) { + var err error + const operationName = "BackupPoliciesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, backupPolicyName, options) + if err != nil { + return BackupPoliciesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupPoliciesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BackupPoliciesClientDeleteResponse{}, err + } + return BackupPoliciesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BackupPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, options *BackupPoliciesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupPolicyName == "" { + return nil, errors.New("parameter backupPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a backup policy belonging to a backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method. +func (client *BackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, options *BackupPoliciesClientGetOptions) (BackupPoliciesClientGetResponse, error) { + var err error + const operationName = "BackupPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, backupPolicyName, options) + if err != nil { + return BackupPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, options *BackupPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupPolicyName == "" { + return nil, errors.New("parameter backupPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupPoliciesClient) getHandleResponse(resp *http.Response) (BackupPoliciesClientGetResponse, error) { + result := BackupPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BaseBackupPolicyResource); err != nil { + return BackupPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Returns list of backup policies belonging to a backup vault +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.NewListPager method. +func (client *BackupPoliciesClient) NewListPager(resourceGroupName string, vaultName string, options *BackupPoliciesClientListOptions) *runtime.Pager[BackupPoliciesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupPoliciesClientListResponse]{ + More: func(page BackupPoliciesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupPoliciesClientListResponse) (BackupPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupPoliciesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, vaultName, options) + }, nil) + if err != nil { + return BackupPoliciesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *BackupPoliciesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupPoliciesClient) listHandleResponse(resp *http.Response) (BackupPoliciesClientListResponse, error) { + result := BackupPoliciesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BaseBackupPolicyResourceList); err != nil { + return BackupPoliciesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupvaultoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupvaultoperationresults_client.go new file mode 100644 index 00000000..216a8f8c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupvaultoperationresults_client.go @@ -0,0 +1,128 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// BackupVaultOperationResultsClient contains the methods for the BackupVaultOperationResults group. +// Don't use this type directly, use NewBackupVaultOperationResultsClient() instead. +type BackupVaultOperationResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupVaultOperationResultsClient creates a new instance of BackupVaultOperationResultsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupVaultOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupVaultOperationResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupVaultOperationResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - BackupVaultOperationResultsClientGetOptions contains the optional parameters for the BackupVaultOperationResultsClient.Get +// method. +func (client *BackupVaultOperationResultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *BackupVaultOperationResultsClientGetOptions) (BackupVaultOperationResultsClientGetResponse, error) { + var err error + const operationName = "BackupVaultOperationResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, operationID, options) + if err != nil { + return BackupVaultOperationResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupVaultOperationResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return BackupVaultOperationResultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupVaultOperationResultsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *BackupVaultOperationResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupVaultOperationResultsClient) getHandleResponse(resp *http.Response) (BackupVaultOperationResultsClientGetResponse, error) { + result := BackupVaultOperationResultsClientGetResponse{} + if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { + result.AzureAsyncOperation = &val + } + if val := resp.Header.Get("Location"); val != "" { + result.Location = &val + } + if val := resp.Header.Get("Retry-After"); val != "" { + retryAfter32, err := strconv.ParseInt(val, 10, 32) + retryAfter := int32(retryAfter32) + if err != nil { + return BackupVaultOperationResultsClientGetResponse{}, err + } + result.RetryAfter = &retryAfter + } + if err := runtime.UnmarshalAsJSON(resp, &result.BackupVaultResource); err != nil { + return BackupVaultOperationResultsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupvaults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupvaults_client.go new file mode 100644 index 00000000..9484c888 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/backupvaults_client.go @@ -0,0 +1,534 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupVaultsClient contains the methods for the BackupVaults group. +// Don't use this type directly, use NewBackupVaultsClient() instead. +type BackupVaultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupVaultsClient creates a new instance of BackupVaultsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupVaultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupVaultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupVaultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckNameAvailability - API to check for resource name availability +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - location - The location in which uniqueness will be verified. +// - parameters - Check name availability request +// - options - BackupVaultsClientCheckNameAvailabilityOptions contains the optional parameters for the BackupVaultsClient.CheckNameAvailability +// method. +func (client *BackupVaultsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, location string, parameters CheckNameAvailabilityRequest, options *BackupVaultsClientCheckNameAvailabilityOptions) (BackupVaultsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "BackupVaultsClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, location, parameters, options) + if err != nil { + return BackupVaultsClientCheckNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupVaultsClientCheckNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupVaultsClientCheckNameAvailabilityResponse{}, err + } + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. +func (client *BackupVaultsClient) checkNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, location string, parameters CheckNameAvailabilityRequest, options *BackupVaultsClientCheckNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. +func (client *BackupVaultsClient) checkNameAvailabilityHandleResponse(resp *http.Response) (BackupVaultsClientCheckNameAvailabilityResponse, error) { + result := BackupVaultsClientCheckNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityResult); err != nil { + return BackupVaultsClientCheckNameAvailabilityResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Creates or updates a BackupVault resource belonging to a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - parameters - Request body for operation +// - options - BackupVaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginCreateOrUpdate +// method. +func (client *BackupVaultsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters BackupVaultResource, options *BackupVaultsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BackupVaultsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, vaultName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupVaultsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupVaultsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a BackupVault resource belonging to a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupVaultsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters BackupVaultResource, options *BackupVaultsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BackupVaultsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BackupVaultsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters BackupVaultResource, options *BackupVaultsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a BackupVault resource from the resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - BackupVaultsClientBeginDeleteOptions contains the optional parameters for the BackupVaultsClient.BeginDelete +// method. +func (client *BackupVaultsClient) BeginDelete(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientBeginDeleteOptions) (*runtime.Poller[BackupVaultsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, vaultName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupVaultsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupVaultsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a BackupVault resource from the resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupVaultsClient) deleteOperation(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BackupVaultsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BackupVaultsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns a resource belonging to a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - BackupVaultsClientGetOptions contains the optional parameters for the BackupVaultsClient.Get method. +func (client *BackupVaultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientGetOptions) (BackupVaultsClientGetResponse, error) { + var err error + const operationName = "BackupVaultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, options) + if err != nil { + return BackupVaultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupVaultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupVaultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupVaultsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupVaultsClient) getHandleResponse(resp *http.Response) (BackupVaultsClientGetResponse, error) { + result := BackupVaultsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupVaultResource); err != nil { + return BackupVaultsClientGetResponse{}, err + } + return result, nil +} + +// NewGetInResourceGroupPager - Returns resource collection belonging to a resource group. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - BackupVaultsClientGetInResourceGroupOptions contains the optional parameters for the BackupVaultsClient.NewGetInResourceGroupPager +// method. +func (client *BackupVaultsClient) NewGetInResourceGroupPager(resourceGroupName string, options *BackupVaultsClientGetInResourceGroupOptions) *runtime.Pager[BackupVaultsClientGetInResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupVaultsClientGetInResourceGroupResponse]{ + More: func(page BackupVaultsClientGetInResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupVaultsClientGetInResourceGroupResponse) (BackupVaultsClientGetInResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupVaultsClient.NewGetInResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getInResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return BackupVaultsClientGetInResourceGroupResponse{}, err + } + return client.getInResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getInResourceGroupCreateRequest creates the GetInResourceGroup request. +func (client *BackupVaultsClient) getInResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *BackupVaultsClientGetInResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInResourceGroupHandleResponse handles the GetInResourceGroup response. +func (client *BackupVaultsClient) getInResourceGroupHandleResponse(resp *http.Response) (BackupVaultsClientGetInResourceGroupResponse, error) { + result := BackupVaultsClientGetInResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupVaultResourceList); err != nil { + return BackupVaultsClientGetInResourceGroupResponse{}, err + } + return result, nil +} + +// NewGetInSubscriptionPager - Returns resource collection belonging to a subscription. +// +// Generated from API version 2024-04-01 +// - options - BackupVaultsClientGetInSubscriptionOptions contains the optional parameters for the BackupVaultsClient.NewGetInSubscriptionPager +// method. +func (client *BackupVaultsClient) NewGetInSubscriptionPager(options *BackupVaultsClientGetInSubscriptionOptions) *runtime.Pager[BackupVaultsClientGetInSubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupVaultsClientGetInSubscriptionResponse]{ + More: func(page BackupVaultsClientGetInSubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupVaultsClientGetInSubscriptionResponse) (BackupVaultsClientGetInSubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupVaultsClient.NewGetInSubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getInSubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return BackupVaultsClientGetInSubscriptionResponse{}, err + } + return client.getInSubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getInSubscriptionCreateRequest creates the GetInSubscription request. +func (client *BackupVaultsClient) getInSubscriptionCreateRequest(ctx context.Context, options *BackupVaultsClientGetInSubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getInSubscriptionHandleResponse handles the GetInSubscription response. +func (client *BackupVaultsClient) getInSubscriptionHandleResponse(resp *http.Response) (BackupVaultsClientGetInSubscriptionResponse, error) { + result := BackupVaultsClientGetInSubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupVaultResourceList); err != nil { + return BackupVaultsClientGetInSubscriptionResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - parameters - Request body for operation +// - options - BackupVaultsClientBeginUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginUpdate +// method. +func (client *BackupVaultsClient) BeginUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters PatchResourceRequestInput, options *BackupVaultsClientBeginUpdateOptions) (*runtime.Poller[BackupVaultsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, vaultName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupVaultsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupVaultsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *BackupVaultsClient) update(ctx context.Context, resourceGroupName string, vaultName string, parameters PatchResourceRequestInput, options *BackupVaultsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BackupVaultsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *BackupVaultsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters PatchResourceRequestInput, options *BackupVaultsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/build.go new file mode 100644 index 00000000..7a6191b3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/dataprotection/armdataprotection + +package armdataprotection diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/ci.yml new file mode 100644 index 00000000..1fcf11a2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/ci.yml @@ -0,0 +1,28 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/dataprotection/armdataprotection/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/dataprotection/armdataprotection/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/dataprotection/armdataprotection' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/client.go new file mode 100644 index 00000000..ac5556a3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/client.go @@ -0,0 +1,106 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// Client contains the methods for the DataProtection group. +// Don't use this type directly, use NewClient() instead. +type Client struct { + internal *arm.Client + subscriptionID string +} + +// NewClient creates a new instance of Client with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &Client{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckFeatureSupport - Validates if a feature is supported +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - parameters - Feature support request object +// - options - ClientCheckFeatureSupportOptions contains the optional parameters for the Client.CheckFeatureSupport method. +func (client *Client) CheckFeatureSupport(ctx context.Context, location string, parameters FeatureValidationRequestBaseClassification, options *ClientCheckFeatureSupportOptions) (ClientCheckFeatureSupportResponse, error) { + var err error + const operationName = "Client.CheckFeatureSupport" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkFeatureSupportCreateRequest(ctx, location, parameters, options) + if err != nil { + return ClientCheckFeatureSupportResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientCheckFeatureSupportResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientCheckFeatureSupportResponse{}, err + } + resp, err := client.checkFeatureSupportHandleResponse(httpResp) + return resp, err +} + +// checkFeatureSupportCreateRequest creates the CheckFeatureSupport request. +func (client *Client) checkFeatureSupportCreateRequest(ctx context.Context, location string, parameters FeatureValidationRequestBaseClassification, options *ClientCheckFeatureSupportOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// checkFeatureSupportHandleResponse handles the CheckFeatureSupport response. +func (client *Client) checkFeatureSupportHandleResponse(resp *http.Response) (ClientCheckFeatureSupportResponse, error) { + result := ClientCheckFeatureSupportResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { + return ClientCheckFeatureSupportResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/client_factory.go new file mode 100644 index 00000000..d1409ba6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/client_factory.go @@ -0,0 +1,211 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewBackupInstancesClient creates a new instance of BackupInstancesClient. +func (c *ClientFactory) NewBackupInstancesClient() *BackupInstancesClient { + return &BackupInstancesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupInstancesExtensionRoutingClient creates a new instance of BackupInstancesExtensionRoutingClient. +func (c *ClientFactory) NewBackupInstancesExtensionRoutingClient() *BackupInstancesExtensionRoutingClient { + return &BackupInstancesExtensionRoutingClient{ + internal: c.internal, + } +} + +// NewBackupPoliciesClient creates a new instance of BackupPoliciesClient. +func (c *ClientFactory) NewBackupPoliciesClient() *BackupPoliciesClient { + return &BackupPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupVaultOperationResultsClient creates a new instance of BackupVaultOperationResultsClient. +func (c *ClientFactory) NewBackupVaultOperationResultsClient() *BackupVaultOperationResultsClient { + return &BackupVaultOperationResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupVaultsClient creates a new instance of BackupVaultsClient. +func (c *ClientFactory) NewBackupVaultsClient() *BackupVaultsClient { + return &BackupVaultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewClient creates a new instance of Client. +func (c *ClientFactory) NewClient() *Client { + return &Client{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDeletedBackupInstancesClient creates a new instance of DeletedBackupInstancesClient. +func (c *ClientFactory) NewDeletedBackupInstancesClient() *DeletedBackupInstancesClient { + return &DeletedBackupInstancesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDppResourceGuardProxyClient creates a new instance of DppResourceGuardProxyClient. +func (c *ClientFactory) NewDppResourceGuardProxyClient() *DppResourceGuardProxyClient { + return &DppResourceGuardProxyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExportJobsClient creates a new instance of ExportJobsClient. +func (c *ClientFactory) NewExportJobsClient() *ExportJobsClient { + return &ExportJobsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExportJobsOperationResultClient creates a new instance of ExportJobsOperationResultClient. +func (c *ClientFactory) NewExportJobsOperationResultClient() *ExportJobsOperationResultClient { + return &ExportJobsOperationResultClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFetchCrossRegionRestoreJobClient creates a new instance of FetchCrossRegionRestoreJobClient. +func (c *ClientFactory) NewFetchCrossRegionRestoreJobClient() *FetchCrossRegionRestoreJobClient { + return &FetchCrossRegionRestoreJobClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFetchCrossRegionRestoreJobsClient creates a new instance of FetchCrossRegionRestoreJobsClient. +func (c *ClientFactory) NewFetchCrossRegionRestoreJobsClient() *FetchCrossRegionRestoreJobsClient { + return &FetchCrossRegionRestoreJobsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFetchSecondaryRecoveryPointsClient creates a new instance of FetchSecondaryRecoveryPointsClient. +func (c *ClientFactory) NewFetchSecondaryRecoveryPointsClient() *FetchSecondaryRecoveryPointsClient { + return &FetchSecondaryRecoveryPointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewJobsClient creates a new instance of JobsClient. +func (c *ClientFactory) NewJobsClient() *JobsClient { + return &JobsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationResultClient creates a new instance of OperationResultClient. +func (c *ClientFactory) NewOperationResultClient() *OperationResultClient { + return &OperationResultClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationStatusBackupVaultContextClient creates a new instance of OperationStatusBackupVaultContextClient. +func (c *ClientFactory) NewOperationStatusBackupVaultContextClient() *OperationStatusBackupVaultContextClient { + return &OperationStatusBackupVaultContextClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationStatusClient creates a new instance of OperationStatusClient. +func (c *ClientFactory) NewOperationStatusClient() *OperationStatusClient { + return &OperationStatusClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationStatusResourceGroupContextClient creates a new instance of OperationStatusResourceGroupContextClient. +func (c *ClientFactory) NewOperationStatusResourceGroupContextClient() *OperationStatusResourceGroupContextClient { + return &OperationStatusResourceGroupContextClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewRecoveryPointsClient creates a new instance of RecoveryPointsClient. +func (c *ClientFactory) NewRecoveryPointsClient() *RecoveryPointsClient { + return &RecoveryPointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewResourceGuardsClient creates a new instance of ResourceGuardsClient. +func (c *ClientFactory) NewResourceGuardsClient() *ResourceGuardsClient { + return &ResourceGuardsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRestorableTimeRangesClient creates a new instance of RestorableTimeRangesClient. +func (c *ClientFactory) NewRestorableTimeRangesClient() *RestorableTimeRangesClient { + return &RestorableTimeRangesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/constants.go new file mode 100644 index 00000000..58740a73 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/constants.go @@ -0,0 +1,755 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" + moduleVersion = "v3.1.0" +) + +type AbsoluteMarker string + +const ( + AbsoluteMarkerAllBackup AbsoluteMarker = "AllBackup" + AbsoluteMarkerFirstOfDay AbsoluteMarker = "FirstOfDay" + AbsoluteMarkerFirstOfMonth AbsoluteMarker = "FirstOfMonth" + AbsoluteMarkerFirstOfWeek AbsoluteMarker = "FirstOfWeek" + AbsoluteMarkerFirstOfYear AbsoluteMarker = "FirstOfYear" +) + +// PossibleAbsoluteMarkerValues returns the possible values for the AbsoluteMarker const type. +func PossibleAbsoluteMarkerValues() []AbsoluteMarker { + return []AbsoluteMarker{ + AbsoluteMarkerAllBackup, + AbsoluteMarkerFirstOfDay, + AbsoluteMarkerFirstOfMonth, + AbsoluteMarkerFirstOfWeek, + AbsoluteMarkerFirstOfYear, + } +} + +type AlertsState string + +const ( + AlertsStateDisabled AlertsState = "Disabled" + AlertsStateEnabled AlertsState = "Enabled" +) + +// PossibleAlertsStateValues returns the possible values for the AlertsState const type. +func PossibleAlertsStateValues() []AlertsState { + return []AlertsState{ + AlertsStateDisabled, + AlertsStateEnabled, + } +} + +// BCDRSecurityLevel - Security Level of Backup Vault +type BCDRSecurityLevel string + +const ( + BCDRSecurityLevelExcellent BCDRSecurityLevel = "Excellent" + BCDRSecurityLevelFair BCDRSecurityLevel = "Fair" + BCDRSecurityLevelGood BCDRSecurityLevel = "Good" + BCDRSecurityLevelNotSupported BCDRSecurityLevel = "NotSupported" + BCDRSecurityLevelPoor BCDRSecurityLevel = "Poor" +) + +// PossibleBCDRSecurityLevelValues returns the possible values for the BCDRSecurityLevel const type. +func PossibleBCDRSecurityLevelValues() []BCDRSecurityLevel { + return []BCDRSecurityLevel{ + BCDRSecurityLevelExcellent, + BCDRSecurityLevelFair, + BCDRSecurityLevelGood, + BCDRSecurityLevelNotSupported, + BCDRSecurityLevelPoor, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// CrossRegionRestoreState - CrossRegionRestore state +type CrossRegionRestoreState string + +const ( + CrossRegionRestoreStateDisabled CrossRegionRestoreState = "Disabled" + CrossRegionRestoreStateEnabled CrossRegionRestoreState = "Enabled" +) + +// PossibleCrossRegionRestoreStateValues returns the possible values for the CrossRegionRestoreState const type. +func PossibleCrossRegionRestoreStateValues() []CrossRegionRestoreState { + return []CrossRegionRestoreState{ + CrossRegionRestoreStateDisabled, + CrossRegionRestoreStateEnabled, + } +} + +// CrossSubscriptionRestoreState - CrossSubscriptionRestore state +type CrossSubscriptionRestoreState string + +const ( + CrossSubscriptionRestoreStateDisabled CrossSubscriptionRestoreState = "Disabled" + CrossSubscriptionRestoreStateEnabled CrossSubscriptionRestoreState = "Enabled" + CrossSubscriptionRestoreStatePermanentlyDisabled CrossSubscriptionRestoreState = "PermanentlyDisabled" +) + +// PossibleCrossSubscriptionRestoreStateValues returns the possible values for the CrossSubscriptionRestoreState const type. +func PossibleCrossSubscriptionRestoreStateValues() []CrossSubscriptionRestoreState { + return []CrossSubscriptionRestoreState{ + CrossSubscriptionRestoreStateDisabled, + CrossSubscriptionRestoreStateEnabled, + CrossSubscriptionRestoreStatePermanentlyDisabled, + } +} + +// CurrentProtectionState - Specifies the current protection state of the resource +type CurrentProtectionState string + +const ( + CurrentProtectionStateBackupSchedulesSuspended CurrentProtectionState = "BackupSchedulesSuspended" + CurrentProtectionStateConfiguringProtection CurrentProtectionState = "ConfiguringProtection" + CurrentProtectionStateConfiguringProtectionFailed CurrentProtectionState = "ConfiguringProtectionFailed" + CurrentProtectionStateInvalid CurrentProtectionState = "Invalid" + CurrentProtectionStateNotProtected CurrentProtectionState = "NotProtected" + CurrentProtectionStateProtectionConfigured CurrentProtectionState = "ProtectionConfigured" + CurrentProtectionStateProtectionError CurrentProtectionState = "ProtectionError" + CurrentProtectionStateProtectionStopped CurrentProtectionState = "ProtectionStopped" + CurrentProtectionStateRetentionSchedulesSuspended CurrentProtectionState = "RetentionSchedulesSuspended" + CurrentProtectionStateSoftDeleted CurrentProtectionState = "SoftDeleted" + CurrentProtectionStateSoftDeleting CurrentProtectionState = "SoftDeleting" + CurrentProtectionStateUpdatingProtection CurrentProtectionState = "UpdatingProtection" +) + +// PossibleCurrentProtectionStateValues returns the possible values for the CurrentProtectionState const type. +func PossibleCurrentProtectionStateValues() []CurrentProtectionState { + return []CurrentProtectionState{ + CurrentProtectionStateBackupSchedulesSuspended, + CurrentProtectionStateConfiguringProtection, + CurrentProtectionStateConfiguringProtectionFailed, + CurrentProtectionStateInvalid, + CurrentProtectionStateNotProtected, + CurrentProtectionStateProtectionConfigured, + CurrentProtectionStateProtectionError, + CurrentProtectionStateProtectionStopped, + CurrentProtectionStateRetentionSchedulesSuspended, + CurrentProtectionStateSoftDeleted, + CurrentProtectionStateSoftDeleting, + CurrentProtectionStateUpdatingProtection, + } +} + +// DataStoreTypes - type of datastore; Operational/Vault/Archive +type DataStoreTypes string + +const ( + DataStoreTypesArchiveStore DataStoreTypes = "ArchiveStore" + DataStoreTypesOperationalStore DataStoreTypes = "OperationalStore" + DataStoreTypesVaultStore DataStoreTypes = "VaultStore" +) + +// PossibleDataStoreTypesValues returns the possible values for the DataStoreTypes const type. +func PossibleDataStoreTypesValues() []DataStoreTypes { + return []DataStoreTypes{ + DataStoreTypesArchiveStore, + DataStoreTypesOperationalStore, + DataStoreTypesVaultStore, + } +} + +type DayOfWeek string + +const ( + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{ + DayOfWeekFriday, + DayOfWeekMonday, + DayOfWeekSaturday, + DayOfWeekSunday, + DayOfWeekThursday, + DayOfWeekTuesday, + DayOfWeekWednesday, + } +} + +// EncryptionState - Encryption state of the Backup Vault. +type EncryptionState string + +const ( + // EncryptionStateDisabled - CMK encryption is disabled on the Backup Vault. User can not set this state once Encryption State + // is 'Enabled'. + EncryptionStateDisabled EncryptionState = "Disabled" + // EncryptionStateEnabled - CMK encryption is enabled on the Backup Vault + EncryptionStateEnabled EncryptionState = "Enabled" + // EncryptionStateInconsistent - CMK encryption is in inconsistent state on the Backup Vault. This state indicates that user + // needs to retry the encryption settings operation immediately to correct the state. + EncryptionStateInconsistent EncryptionState = "Inconsistent" +) + +// PossibleEncryptionStateValues returns the possible values for the EncryptionState const type. +func PossibleEncryptionStateValues() []EncryptionState { + return []EncryptionState{ + EncryptionStateDisabled, + EncryptionStateEnabled, + EncryptionStateInconsistent, + } +} + +// ExistingResourcePolicy - Gets or sets the Conflict Policy property. This property sets policy during conflict of resources +// during restore. +type ExistingResourcePolicy string + +const ( + ExistingResourcePolicyPatch ExistingResourcePolicy = "Patch" + ExistingResourcePolicySkip ExistingResourcePolicy = "Skip" +) + +// PossibleExistingResourcePolicyValues returns the possible values for the ExistingResourcePolicy const type. +func PossibleExistingResourcePolicyValues() []ExistingResourcePolicy { + return []ExistingResourcePolicy{ + ExistingResourcePolicyPatch, + ExistingResourcePolicySkip, + } +} + +// FeatureSupportStatus - feature support status +type FeatureSupportStatus string + +const ( + FeatureSupportStatusAlphaPreview FeatureSupportStatus = "AlphaPreview" + FeatureSupportStatusGenerallyAvailable FeatureSupportStatus = "GenerallyAvailable" + FeatureSupportStatusInvalid FeatureSupportStatus = "Invalid" + FeatureSupportStatusNotSupported FeatureSupportStatus = "NotSupported" + FeatureSupportStatusPrivatePreview FeatureSupportStatus = "PrivatePreview" + FeatureSupportStatusPublicPreview FeatureSupportStatus = "PublicPreview" +) + +// PossibleFeatureSupportStatusValues returns the possible values for the FeatureSupportStatus const type. +func PossibleFeatureSupportStatusValues() []FeatureSupportStatus { + return []FeatureSupportStatus{ + FeatureSupportStatusAlphaPreview, + FeatureSupportStatusGenerallyAvailable, + FeatureSupportStatusInvalid, + FeatureSupportStatusNotSupported, + FeatureSupportStatusPrivatePreview, + FeatureSupportStatusPublicPreview, + } +} + +// FeatureType - backup support feature type. +type FeatureType string + +const ( + FeatureTypeDataSourceType FeatureType = "DataSourceType" + FeatureTypeInvalid FeatureType = "Invalid" +) + +// PossibleFeatureTypeValues returns the possible values for the FeatureType const type. +func PossibleFeatureTypeValues() []FeatureType { + return []FeatureType{ + FeatureTypeDataSourceType, + FeatureTypeInvalid, + } +} + +// IdentityType - The identity type. 'SystemAssigned' and 'UserAssigned' are mutually exclusive. 'SystemAssigned' will use +// implicitly created managed identity. +type IdentityType string + +const ( + IdentityTypeSystemAssigned IdentityType = "SystemAssigned" + IdentityTypeUserAssigned IdentityType = "UserAssigned" +) + +// PossibleIdentityTypeValues returns the possible values for the IdentityType const type. +func PossibleIdentityTypeValues() []IdentityType { + return []IdentityType{ + IdentityTypeSystemAssigned, + IdentityTypeUserAssigned, + } +} + +// ImmutabilityState - Immutability state +type ImmutabilityState string + +const ( + ImmutabilityStateDisabled ImmutabilityState = "Disabled" + ImmutabilityStateLocked ImmutabilityState = "Locked" + ImmutabilityStateUnlocked ImmutabilityState = "Unlocked" +) + +// PossibleImmutabilityStateValues returns the possible values for the ImmutabilityState const type. +func PossibleImmutabilityStateValues() []ImmutabilityState { + return []ImmutabilityState{ + ImmutabilityStateDisabled, + ImmutabilityStateLocked, + ImmutabilityStateUnlocked, + } +} + +// InfrastructureEncryptionState - Enabling/Disabling the Double Encryption state +type InfrastructureEncryptionState string + +const ( + InfrastructureEncryptionStateDisabled InfrastructureEncryptionState = "Disabled" + InfrastructureEncryptionStateEnabled InfrastructureEncryptionState = "Enabled" +) + +// PossibleInfrastructureEncryptionStateValues returns the possible values for the InfrastructureEncryptionState const type. +func PossibleInfrastructureEncryptionStateValues() []InfrastructureEncryptionState { + return []InfrastructureEncryptionState{ + InfrastructureEncryptionStateDisabled, + InfrastructureEncryptionStateEnabled, + } +} + +type Month string + +const ( + MonthApril Month = "April" + MonthAugust Month = "August" + MonthDecember Month = "December" + MonthFebruary Month = "February" + MonthJanuary Month = "January" + MonthJuly Month = "July" + MonthJune Month = "June" + MonthMarch Month = "March" + MonthMay Month = "May" + MonthNovember Month = "November" + MonthOctober Month = "October" + MonthSeptember Month = "September" +) + +// PossibleMonthValues returns the possible values for the Month const type. +func PossibleMonthValues() []Month { + return []Month{ + MonthApril, + MonthAugust, + MonthDecember, + MonthFebruary, + MonthJanuary, + MonthJuly, + MonthJune, + MonthMarch, + MonthMay, + MonthNovember, + MonthOctober, + MonthSeptember, + } +} + +// PersistentVolumeRestoreMode - Gets or sets the PV (Persistent Volume) Restore Mode property. This property sets whether +// volumes needs to be restored. +type PersistentVolumeRestoreMode string + +const ( + PersistentVolumeRestoreModeRestoreWithVolumeData PersistentVolumeRestoreMode = "RestoreWithVolumeData" + PersistentVolumeRestoreModeRestoreWithoutVolumeData PersistentVolumeRestoreMode = "RestoreWithoutVolumeData" +) + +// PossiblePersistentVolumeRestoreModeValues returns the possible values for the PersistentVolumeRestoreMode const type. +func PossiblePersistentVolumeRestoreModeValues() []PersistentVolumeRestoreMode { + return []PersistentVolumeRestoreMode{ + PersistentVolumeRestoreModeRestoreWithVolumeData, + PersistentVolumeRestoreModeRestoreWithoutVolumeData, + } +} + +// ProvisioningState - Provisioning state of the BackupVault resource +type ProvisioningState string + +const ( + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateProvisioning ProvisioningState = "Provisioning" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUnknown ProvisioningState = "Unknown" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateFailed, + ProvisioningStateProvisioning, + ProvisioningStateSucceeded, + ProvisioningStateUnknown, + ProvisioningStateUpdating, + } +} + +// RecoveryOption - Recovery Option +type RecoveryOption string + +const ( + RecoveryOptionFailIfExists RecoveryOption = "FailIfExists" +) + +// PossibleRecoveryOptionValues returns the possible values for the RecoveryOption const type. +func PossibleRecoveryOptionValues() []RecoveryOption { + return []RecoveryOption{ + RecoveryOptionFailIfExists, + } +} + +// RecoveryPointCompletionState - Specifies recovery point completeness. Partial (i.e., only some of the intended items were +// backed up), or Completed (i.e., ALL intended items were backed up). +type RecoveryPointCompletionState string + +const ( + RecoveryPointCompletionStateCompleted RecoveryPointCompletionState = "Completed" + RecoveryPointCompletionStatePartial RecoveryPointCompletionState = "Partial" +) + +// PossibleRecoveryPointCompletionStateValues returns the possible values for the RecoveryPointCompletionState const type. +func PossibleRecoveryPointCompletionStateValues() []RecoveryPointCompletionState { + return []RecoveryPointCompletionState{ + RecoveryPointCompletionStateCompleted, + RecoveryPointCompletionStatePartial, + } +} + +// RehydrationPriority - Priority to be used for rehydration. Values High or Standard +type RehydrationPriority string + +const ( + RehydrationPriorityHigh RehydrationPriority = "High" + RehydrationPriorityInvalid RehydrationPriority = "Invalid" + RehydrationPriorityStandard RehydrationPriority = "Standard" +) + +// PossibleRehydrationPriorityValues returns the possible values for the RehydrationPriority const type. +func PossibleRehydrationPriorityValues() []RehydrationPriority { + return []RehydrationPriority{ + RehydrationPriorityHigh, + RehydrationPriorityInvalid, + RehydrationPriorityStandard, + } +} + +type RehydrationStatus string + +const ( + RehydrationStatusCOMPLETED RehydrationStatus = "COMPLETED" + RehydrationStatusCREATEINPROGRESS RehydrationStatus = "CREATE_IN_PROGRESS" + RehydrationStatusDELETED RehydrationStatus = "DELETED" + RehydrationStatusDELETEINPROGRESS RehydrationStatus = "DELETE_IN_PROGRESS" + RehydrationStatusFAILED RehydrationStatus = "FAILED" +) + +// PossibleRehydrationStatusValues returns the possible values for the RehydrationStatus const type. +func PossibleRehydrationStatusValues() []RehydrationStatus { + return []RehydrationStatus{ + RehydrationStatusCOMPLETED, + RehydrationStatusCREATEINPROGRESS, + RehydrationStatusDELETED, + RehydrationStatusDELETEINPROGRESS, + RehydrationStatusFAILED, + } +} + +// ResourceMoveState - Resource move state for backup vault +type ResourceMoveState string + +const ( + ResourceMoveStateCommitFailed ResourceMoveState = "CommitFailed" + ResourceMoveStateCommitTimedout ResourceMoveState = "CommitTimedout" + ResourceMoveStateCriticalFailure ResourceMoveState = "CriticalFailure" + ResourceMoveStateFailed ResourceMoveState = "Failed" + ResourceMoveStateInProgress ResourceMoveState = "InProgress" + ResourceMoveStateMoveSucceeded ResourceMoveState = "MoveSucceeded" + ResourceMoveStatePartialSuccess ResourceMoveState = "PartialSuccess" + ResourceMoveStatePrepareFailed ResourceMoveState = "PrepareFailed" + ResourceMoveStatePrepareTimedout ResourceMoveState = "PrepareTimedout" + ResourceMoveStateUnknown ResourceMoveState = "Unknown" +) + +// PossibleResourceMoveStateValues returns the possible values for the ResourceMoveState const type. +func PossibleResourceMoveStateValues() []ResourceMoveState { + return []ResourceMoveState{ + ResourceMoveStateCommitFailed, + ResourceMoveStateCommitTimedout, + ResourceMoveStateCriticalFailure, + ResourceMoveStateFailed, + ResourceMoveStateInProgress, + ResourceMoveStateMoveSucceeded, + ResourceMoveStatePartialSuccess, + ResourceMoveStatePrepareFailed, + ResourceMoveStatePrepareTimedout, + ResourceMoveStateUnknown, + } +} + +// ResourcePropertiesObjectType - Type of the specific object - used for deserializing +type ResourcePropertiesObjectType string + +const ( + ResourcePropertiesObjectTypeDefaultResourceProperties ResourcePropertiesObjectType = "DefaultResourceProperties" +) + +// PossibleResourcePropertiesObjectTypeValues returns the possible values for the ResourcePropertiesObjectType const type. +func PossibleResourcePropertiesObjectTypeValues() []ResourcePropertiesObjectType { + return []ResourcePropertiesObjectType{ + ResourcePropertiesObjectTypeDefaultResourceProperties, + } +} + +// RestoreSourceDataStoreType - Gets or sets the type of the source data store. +type RestoreSourceDataStoreType string + +const ( + RestoreSourceDataStoreTypeArchiveStore RestoreSourceDataStoreType = "ArchiveStore" + RestoreSourceDataStoreTypeOperationalStore RestoreSourceDataStoreType = "OperationalStore" + RestoreSourceDataStoreTypeVaultStore RestoreSourceDataStoreType = "VaultStore" +) + +// PossibleRestoreSourceDataStoreTypeValues returns the possible values for the RestoreSourceDataStoreType const type. +func PossibleRestoreSourceDataStoreTypeValues() []RestoreSourceDataStoreType { + return []RestoreSourceDataStoreType{ + RestoreSourceDataStoreTypeArchiveStore, + RestoreSourceDataStoreTypeOperationalStore, + RestoreSourceDataStoreTypeVaultStore, + } +} + +// RestoreTargetLocationType - Denotes the target location where the data will be restored, string value for the enum {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType} +type RestoreTargetLocationType string + +const ( + RestoreTargetLocationTypeAzureBlobs RestoreTargetLocationType = "AzureBlobs" + RestoreTargetLocationTypeAzureFiles RestoreTargetLocationType = "AzureFiles" + RestoreTargetLocationTypeInvalid RestoreTargetLocationType = "Invalid" +) + +// PossibleRestoreTargetLocationTypeValues returns the possible values for the RestoreTargetLocationType const type. +func PossibleRestoreTargetLocationTypeValues() []RestoreTargetLocationType { + return []RestoreTargetLocationType{ + RestoreTargetLocationTypeAzureBlobs, + RestoreTargetLocationTypeAzureFiles, + RestoreTargetLocationTypeInvalid, + } +} + +// SecretStoreType - Gets or sets the type of secret store +type SecretStoreType string + +const ( + SecretStoreTypeAzureKeyVault SecretStoreType = "AzureKeyVault" + SecretStoreTypeInvalid SecretStoreType = "Invalid" +) + +// PossibleSecretStoreTypeValues returns the possible values for the SecretStoreType const type. +func PossibleSecretStoreTypeValues() []SecretStoreType { + return []SecretStoreType{ + SecretStoreTypeAzureKeyVault, + SecretStoreTypeInvalid, + } +} + +// SecureScoreLevel - Secure Score of Backup Vault +type SecureScoreLevel string + +const ( + SecureScoreLevelAdequate SecureScoreLevel = "Adequate" + SecureScoreLevelMaximum SecureScoreLevel = "Maximum" + SecureScoreLevelMinimum SecureScoreLevel = "Minimum" + SecureScoreLevelNone SecureScoreLevel = "None" + SecureScoreLevelNotSupported SecureScoreLevel = "NotSupported" +) + +// PossibleSecureScoreLevelValues returns the possible values for the SecureScoreLevel const type. +func PossibleSecureScoreLevelValues() []SecureScoreLevel { + return []SecureScoreLevel{ + SecureScoreLevelAdequate, + SecureScoreLevelMaximum, + SecureScoreLevelMinimum, + SecureScoreLevelNone, + SecureScoreLevelNotSupported, + } +} + +// SoftDeleteState - State of soft delete +type SoftDeleteState string + +const ( + // SoftDeleteStateAlwaysOn - Soft Delete is permanently enabled for the BackupVault and the setting cannot be changed + SoftDeleteStateAlwaysOn SoftDeleteState = "AlwaysOn" + // SoftDeleteStateOff - Soft Delete is turned off for the BackupVault + SoftDeleteStateOff SoftDeleteState = "Off" + // SoftDeleteStateOn - Soft Delete is enabled for the BackupVault but can be turned off + SoftDeleteStateOn SoftDeleteState = "On" +) + +// PossibleSoftDeleteStateValues returns the possible values for the SoftDeleteState const type. +func PossibleSoftDeleteStateValues() []SoftDeleteState { + return []SoftDeleteState{ + SoftDeleteStateAlwaysOn, + SoftDeleteStateOff, + SoftDeleteStateOn, + } +} + +// SourceDataStoreType - Gets or sets the type of the source data store. +type SourceDataStoreType string + +const ( + SourceDataStoreTypeArchiveStore SourceDataStoreType = "ArchiveStore" + SourceDataStoreTypeOperationalStore SourceDataStoreType = "OperationalStore" + SourceDataStoreTypeSnapshotStore SourceDataStoreType = "SnapshotStore" + SourceDataStoreTypeVaultStore SourceDataStoreType = "VaultStore" +) + +// PossibleSourceDataStoreTypeValues returns the possible values for the SourceDataStoreType const type. +func PossibleSourceDataStoreTypeValues() []SourceDataStoreType { + return []SourceDataStoreType{ + SourceDataStoreTypeArchiveStore, + SourceDataStoreTypeOperationalStore, + SourceDataStoreTypeSnapshotStore, + SourceDataStoreTypeVaultStore, + } +} + +// Status - Specifies the protection status of the resource +type Status string + +const ( + StatusConfiguringProtection Status = "ConfiguringProtection" + StatusConfiguringProtectionFailed Status = "ConfiguringProtectionFailed" + StatusProtectionConfigured Status = "ProtectionConfigured" + StatusProtectionStopped Status = "ProtectionStopped" + StatusSoftDeleted Status = "SoftDeleted" + StatusSoftDeleting Status = "SoftDeleting" +) + +// PossibleStatusValues returns the possible values for the Status const type. +func PossibleStatusValues() []Status { + return []Status{ + StatusConfiguringProtection, + StatusConfiguringProtectionFailed, + StatusProtectionConfigured, + StatusProtectionStopped, + StatusSoftDeleted, + StatusSoftDeleting, + } +} + +// StorageSettingStoreTypes - Gets or sets the type of the datastore. +type StorageSettingStoreTypes string + +const ( + StorageSettingStoreTypesArchiveStore StorageSettingStoreTypes = "ArchiveStore" + StorageSettingStoreTypesOperationalStore StorageSettingStoreTypes = "OperationalStore" + StorageSettingStoreTypesVaultStore StorageSettingStoreTypes = "VaultStore" +) + +// PossibleStorageSettingStoreTypesValues returns the possible values for the StorageSettingStoreTypes const type. +func PossibleStorageSettingStoreTypesValues() []StorageSettingStoreTypes { + return []StorageSettingStoreTypes{ + StorageSettingStoreTypesArchiveStore, + StorageSettingStoreTypesOperationalStore, + StorageSettingStoreTypesVaultStore, + } +} + +// StorageSettingTypes - Gets or sets the type. +type StorageSettingTypes string + +const ( + StorageSettingTypesGeoRedundant StorageSettingTypes = "GeoRedundant" + StorageSettingTypesLocallyRedundant StorageSettingTypes = "LocallyRedundant" + StorageSettingTypesZoneRedundant StorageSettingTypes = "ZoneRedundant" +) + +// PossibleStorageSettingTypesValues returns the possible values for the StorageSettingTypes const type. +func PossibleStorageSettingTypesValues() []StorageSettingTypes { + return []StorageSettingTypes{ + StorageSettingTypesGeoRedundant, + StorageSettingTypesLocallyRedundant, + StorageSettingTypesZoneRedundant, + } +} + +// SyncType - Field indicating sync type e.g. to sync only in case of failure or in all cases +type SyncType string + +const ( + SyncTypeDefault SyncType = "Default" + SyncTypeForceResync SyncType = "ForceResync" +) + +// PossibleSyncTypeValues returns the possible values for the SyncType const type. +func PossibleSyncTypeValues() []SyncType { + return []SyncType{ + SyncTypeDefault, + SyncTypeForceResync, + } +} + +// ValidationType - Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API +// will run again. +type ValidationType string + +const ( + ValidationTypeDeepValidation ValidationType = "DeepValidation" + ValidationTypeShallowValidation ValidationType = "ShallowValidation" +) + +// PossibleValidationTypeValues returns the possible values for the ValidationType const type. +func PossibleValidationTypeValues() []ValidationType { + return []ValidationType{ + ValidationTypeDeepValidation, + ValidationTypeShallowValidation, + } +} + +type WeekNumber string + +const ( + WeekNumberFirst WeekNumber = "First" + WeekNumberFourth WeekNumber = "Fourth" + WeekNumberLast WeekNumber = "Last" + WeekNumberSecond WeekNumber = "Second" + WeekNumberThird WeekNumber = "Third" +) + +// PossibleWeekNumberValues returns the possible values for the WeekNumber const type. +func PossibleWeekNumberValues() []WeekNumber { + return []WeekNumber{ + WeekNumberFirst, + WeekNumberFourth, + WeekNumberLast, + WeekNumberSecond, + WeekNumberThird, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/deletedbackupinstances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/deletedbackupinstances_client.go new file mode 100644 index 00000000..b22aff1b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/deletedbackupinstances_client.go @@ -0,0 +1,260 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DeletedBackupInstancesClient contains the methods for the DeletedBackupInstances group. +// Don't use this type directly, use NewDeletedBackupInstancesClient() instead. +type DeletedBackupInstancesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDeletedBackupInstancesClient creates a new instance of DeletedBackupInstancesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDeletedBackupInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedBackupInstancesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DeletedBackupInstancesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a deleted backup instance with name in a backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the deleted backup instance +// - options - DeletedBackupInstancesClientGetOptions contains the optional parameters for the DeletedBackupInstancesClient.Get +// method. +func (client *DeletedBackupInstancesClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *DeletedBackupInstancesClientGetOptions) (DeletedBackupInstancesClientGetResponse, error) { + var err error + const operationName = "DeletedBackupInstancesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return DeletedBackupInstancesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DeletedBackupInstancesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DeletedBackupInstancesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DeletedBackupInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *DeletedBackupInstancesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DeletedBackupInstancesClient) getHandleResponse(resp *http.Response) (DeletedBackupInstancesClientGetResponse, error) { + result := DeletedBackupInstancesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeletedBackupInstanceResource); err != nil { + return DeletedBackupInstancesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets deleted backup instances belonging to a backup vault +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - DeletedBackupInstancesClientListOptions contains the optional parameters for the DeletedBackupInstancesClient.NewListPager +// method. +func (client *DeletedBackupInstancesClient) NewListPager(resourceGroupName string, vaultName string, options *DeletedBackupInstancesClientListOptions) *runtime.Pager[DeletedBackupInstancesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DeletedBackupInstancesClientListResponse]{ + More: func(page DeletedBackupInstancesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DeletedBackupInstancesClientListResponse) (DeletedBackupInstancesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedBackupInstancesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, vaultName, options) + }, nil) + if err != nil { + return DeletedBackupInstancesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DeletedBackupInstancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *DeletedBackupInstancesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DeletedBackupInstancesClient) listHandleResponse(resp *http.Response) (DeletedBackupInstancesClientListResponse, error) { + result := DeletedBackupInstancesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeletedBackupInstanceResourceList); err != nil { + return DeletedBackupInstancesClientListResponse{}, err + } + return result, nil +} + +// BeginUndelete - +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the deleted backup instance +// - options - DeletedBackupInstancesClientBeginUndeleteOptions contains the optional parameters for the DeletedBackupInstancesClient.BeginUndelete +// method. +func (client *DeletedBackupInstancesClient) BeginUndelete(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *DeletedBackupInstancesClientBeginUndeleteOptions) (*runtime.Poller[DeletedBackupInstancesClientUndeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.undelete(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DeletedBackupInstancesClientUndeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DeletedBackupInstancesClientUndeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Undelete - +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *DeletedBackupInstancesClient) undelete(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *DeletedBackupInstancesClientBeginUndeleteOptions) (*http.Response, error) { + var err error + const operationName = "DeletedBackupInstancesClient.BeginUndelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.undeleteCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// undeleteCreateRequest creates the Undelete request. +func (client *DeletedBackupInstancesClient) undeleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *DeletedBackupInstancesClientBeginUndeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}/undelete" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/dppresourceguardproxy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/dppresourceguardproxy_client.go new file mode 100644 index 00000000..ef2eaa53 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/dppresourceguardproxy_client.go @@ -0,0 +1,390 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DppResourceGuardProxyClient contains the methods for the DppResourceGuardProxy group. +// Don't use this type directly, use NewDppResourceGuardProxyClient() instead. +type DppResourceGuardProxyClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDppResourceGuardProxyClient creates a new instance of DppResourceGuardProxyClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDppResourceGuardProxyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DppResourceGuardProxyClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DppResourceGuardProxyClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or Updates a ResourceGuardProxy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - resourceGuardProxyName - name of the resource guard proxy +// - parameters - Request body for operation +// - options - DppResourceGuardProxyClientCreateOrUpdateOptions contains the optional parameters for the DppResourceGuardProxyClient.CreateOrUpdate +// method. +func (client *DppResourceGuardProxyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, resourceGuardProxyName string, parameters ResourceGuardProxyBaseResource, options *DppResourceGuardProxyClientCreateOrUpdateOptions) (DppResourceGuardProxyClientCreateOrUpdateResponse, error) { + var err error + const operationName = "DppResourceGuardProxyClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, resourceGuardProxyName, parameters, options) + if err != nil { + return DppResourceGuardProxyClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DppResourceGuardProxyClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DppResourceGuardProxyClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DppResourceGuardProxyClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, resourceGuardProxyName string, parameters ResourceGuardProxyBaseResource, options *DppResourceGuardProxyClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGuardProxyName == "" { + return nil, errors.New("parameter resourceGuardProxyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *DppResourceGuardProxyClient) createOrUpdateHandleResponse(resp *http.Response) (DppResourceGuardProxyClientCreateOrUpdateResponse, error) { + result := DppResourceGuardProxyClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardProxyBaseResource); err != nil { + return DppResourceGuardProxyClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes the ResourceGuardProxy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - resourceGuardProxyName - name of the resource guard proxy +// - options - DppResourceGuardProxyClientDeleteOptions contains the optional parameters for the DppResourceGuardProxyClient.Delete +// method. +func (client *DppResourceGuardProxyClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, resourceGuardProxyName string, options *DppResourceGuardProxyClientDeleteOptions) (DppResourceGuardProxyClientDeleteResponse, error) { + var err error + const operationName = "DppResourceGuardProxyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, resourceGuardProxyName, options) + if err != nil { + return DppResourceGuardProxyClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DppResourceGuardProxyClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DppResourceGuardProxyClientDeleteResponse{}, err + } + return DppResourceGuardProxyClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DppResourceGuardProxyClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, resourceGuardProxyName string, options *DppResourceGuardProxyClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGuardProxyName == "" { + return nil, errors.New("parameter resourceGuardProxyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - resourceGuardProxyName - name of the resource guard proxy +// - options - DppResourceGuardProxyClientGetOptions contains the optional parameters for the DppResourceGuardProxyClient.Get +// method. +func (client *DppResourceGuardProxyClient) Get(ctx context.Context, resourceGroupName string, vaultName string, resourceGuardProxyName string, options *DppResourceGuardProxyClientGetOptions) (DppResourceGuardProxyClientGetResponse, error) { + var err error + const operationName = "DppResourceGuardProxyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, resourceGuardProxyName, options) + if err != nil { + return DppResourceGuardProxyClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DppResourceGuardProxyClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DppResourceGuardProxyClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DppResourceGuardProxyClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, resourceGuardProxyName string, options *DppResourceGuardProxyClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGuardProxyName == "" { + return nil, errors.New("parameter resourceGuardProxyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DppResourceGuardProxyClient) getHandleResponse(resp *http.Response) (DppResourceGuardProxyClientGetResponse, error) { + result := DppResourceGuardProxyClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardProxyBaseResource); err != nil { + return DppResourceGuardProxyClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Returns the list of ResourceGuardProxies associated with the vault +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - DppResourceGuardProxyClientListOptions contains the optional parameters for the DppResourceGuardProxyClient.NewListPager +// method. +func (client *DppResourceGuardProxyClient) NewListPager(resourceGroupName string, vaultName string, options *DppResourceGuardProxyClientListOptions) *runtime.Pager[DppResourceGuardProxyClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DppResourceGuardProxyClientListResponse]{ + More: func(page DppResourceGuardProxyClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DppResourceGuardProxyClientListResponse) (DppResourceGuardProxyClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DppResourceGuardProxyClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, vaultName, options) + }, nil) + if err != nil { + return DppResourceGuardProxyClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DppResourceGuardProxyClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *DppResourceGuardProxyClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DppResourceGuardProxyClient) listHandleResponse(resp *http.Response) (DppResourceGuardProxyClientListResponse, error) { + result := DppResourceGuardProxyClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardProxyBaseResourceList); err != nil { + return DppResourceGuardProxyClientListResponse{}, err + } + return result, nil +} + +// UnlockDelete - UnlockDelete call for ResourceGuardProxy, executed before one can delete it +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - resourceGuardProxyName - name of the resource guard proxy +// - parameters - Request body for operation +// - options - DppResourceGuardProxyClientUnlockDeleteOptions contains the optional parameters for the DppResourceGuardProxyClient.UnlockDelete +// method. +func (client *DppResourceGuardProxyClient) UnlockDelete(ctx context.Context, resourceGroupName string, vaultName string, resourceGuardProxyName string, parameters UnlockDeleteRequest, options *DppResourceGuardProxyClientUnlockDeleteOptions) (DppResourceGuardProxyClientUnlockDeleteResponse, error) { + var err error + const operationName = "DppResourceGuardProxyClient.UnlockDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.unlockDeleteCreateRequest(ctx, resourceGroupName, vaultName, resourceGuardProxyName, parameters, options) + if err != nil { + return DppResourceGuardProxyClientUnlockDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DppResourceGuardProxyClientUnlockDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DppResourceGuardProxyClientUnlockDeleteResponse{}, err + } + resp, err := client.unlockDeleteHandleResponse(httpResp) + return resp, err +} + +// unlockDeleteCreateRequest creates the UnlockDelete request. +func (client *DppResourceGuardProxyClient) unlockDeleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, resourceGuardProxyName string, parameters UnlockDeleteRequest, options *DppResourceGuardProxyClientUnlockDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGuardProxyName == "" { + return nil, errors.New("parameter resourceGuardProxyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// unlockDeleteHandleResponse handles the UnlockDelete response. +func (client *DppResourceGuardProxyClient) unlockDeleteHandleResponse(resp *http.Response) (DppResourceGuardProxyClientUnlockDeleteResponse, error) { + result := DppResourceGuardProxyClientUnlockDeleteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UnlockDeleteResponse); err != nil { + return DppResourceGuardProxyClientUnlockDeleteResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/exportjobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/exportjobs_client.go new file mode 100644 index 00000000..66ab8f10 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/exportjobs_client.go @@ -0,0 +1,120 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExportJobsClient contains the methods for the ExportJobs group. +// Don't use this type directly, use NewExportJobsClient() instead. +type ExportJobsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExportJobsClient creates a new instance of ExportJobsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExportJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportJobsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExportJobsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginTrigger - Triggers export of jobs and returns an OperationID to track. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - ExportJobsClientBeginTriggerOptions contains the optional parameters for the ExportJobsClient.BeginTrigger method. +func (client *ExportJobsClient) BeginTrigger(ctx context.Context, resourceGroupName string, vaultName string, options *ExportJobsClientBeginTriggerOptions) (*runtime.Poller[ExportJobsClientTriggerResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.trigger(ctx, resourceGroupName, vaultName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExportJobsClientTriggerResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExportJobsClientTriggerResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Trigger - Triggers export of jobs and returns an OperationID to track. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +func (client *ExportJobsClient) trigger(ctx context.Context, resourceGroupName string, vaultName string, options *ExportJobsClientBeginTriggerOptions) (*http.Response, error) { + var err error + const operationName = "ExportJobsClient.BeginTrigger" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.triggerCreateRequest(ctx, resourceGroupName, vaultName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// triggerCreateRequest creates the Trigger request. +func (client *ExportJobsClient) triggerCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *ExportJobsClientBeginTriggerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/exportjobsoperationresult_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/exportjobsoperationresult_client.go new file mode 100644 index 00000000..96b7a20b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/exportjobsoperationresult_client.go @@ -0,0 +1,116 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExportJobsOperationResultClient contains the methods for the ExportJobsOperationResult group. +// Don't use this type directly, use NewExportJobsOperationResultClient() instead. +type ExportJobsOperationResultClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExportJobsOperationResultClient creates a new instance of ExportJobsOperationResultClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExportJobsOperationResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportJobsOperationResultClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExportJobsOperationResultClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also +// contains URL of a Blob and a SAS key to access the same. The blob contains exported +// jobs in JSON serialized format. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - operationID - OperationID which represents the export job. +// - options - ExportJobsOperationResultClientGetOptions contains the optional parameters for the ExportJobsOperationResultClient.Get +// method. +func (client *ExportJobsOperationResultClient) Get(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *ExportJobsOperationResultClientGetOptions) (ExportJobsOperationResultClientGetResponse, error) { + var err error + const operationName = "ExportJobsOperationResultClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, operationID, options) + if err != nil { + return ExportJobsOperationResultClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExportJobsOperationResultClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ExportJobsOperationResultClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExportJobsOperationResultClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *ExportJobsOperationResultClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/operations/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExportJobsOperationResultClient) getHandleResponse(resp *http.Response) (ExportJobsOperationResultClientGetResponse, error) { + result := ExportJobsOperationResultClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExportJobsResult); err != nil { + return ExportJobsOperationResultClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/fetchcrossregionrestorejob_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/fetchcrossregionrestorejob_client.go new file mode 100644 index 00000000..b6b7df6d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/fetchcrossregionrestorejob_client.go @@ -0,0 +1,113 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FetchCrossRegionRestoreJobClient contains the methods for the FetchCrossRegionRestoreJob group. +// Don't use this type directly, use NewFetchCrossRegionRestoreJobClient() instead. +type FetchCrossRegionRestoreJobClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFetchCrossRegionRestoreJobClient creates a new instance of FetchCrossRegionRestoreJobClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFetchCrossRegionRestoreJobClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FetchCrossRegionRestoreJobClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FetchCrossRegionRestoreJobClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches the Cross Region Restore Job +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - location - The name of the Azure region. +// - parameters - Request body for operation +// - options - FetchCrossRegionRestoreJobClientGetOptions contains the optional parameters for the FetchCrossRegionRestoreJobClient.Get +// method. +func (client *FetchCrossRegionRestoreJobClient) Get(ctx context.Context, resourceGroupName string, location string, parameters CrossRegionRestoreJobRequest, options *FetchCrossRegionRestoreJobClientGetOptions) (FetchCrossRegionRestoreJobClientGetResponse, error) { + var err error + const operationName = "FetchCrossRegionRestoreJobClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, location, parameters, options) + if err != nil { + return FetchCrossRegionRestoreJobClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FetchCrossRegionRestoreJobClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FetchCrossRegionRestoreJobClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FetchCrossRegionRestoreJobClient) getCreateRequest(ctx context.Context, resourceGroupName string, location string, parameters CrossRegionRestoreJobRequest, options *FetchCrossRegionRestoreJobClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/fetchCrossRegionRestoreJob" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FetchCrossRegionRestoreJobClient) getHandleResponse(resp *http.Response) (FetchCrossRegionRestoreJobClientGetResponse, error) { + result := FetchCrossRegionRestoreJobClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupJobResource); err != nil { + return FetchCrossRegionRestoreJobClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/fetchcrossregionrestorejobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/fetchcrossregionrestorejobs_client.go new file mode 100644 index 00000000..8abd9303 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/fetchcrossregionrestorejobs_client.go @@ -0,0 +1,116 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FetchCrossRegionRestoreJobsClient contains the methods for the FetchCrossRegionRestoreJobs group. +// Don't use this type directly, use NewFetchCrossRegionRestoreJobsClient() instead. +type FetchCrossRegionRestoreJobsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFetchCrossRegionRestoreJobsClient creates a new instance of FetchCrossRegionRestoreJobsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFetchCrossRegionRestoreJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FetchCrossRegionRestoreJobsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FetchCrossRegionRestoreJobsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Fetches list of Cross Region Restore job belonging to the vault +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - location - The name of the Azure region. +// - parameters - Request body for operation +// - options - FetchCrossRegionRestoreJobsClientListOptions contains the optional parameters for the FetchCrossRegionRestoreJobsClient.NewListPager +// method. +func (client *FetchCrossRegionRestoreJobsClient) NewListPager(resourceGroupName string, location string, parameters CrossRegionRestoreJobsRequest, options *FetchCrossRegionRestoreJobsClientListOptions) *runtime.Pager[FetchCrossRegionRestoreJobsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FetchCrossRegionRestoreJobsClientListResponse]{ + More: func(page FetchCrossRegionRestoreJobsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FetchCrossRegionRestoreJobsClientListResponse) (FetchCrossRegionRestoreJobsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FetchCrossRegionRestoreJobsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, location, parameters, options) + }, nil) + if err != nil { + return FetchCrossRegionRestoreJobsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *FetchCrossRegionRestoreJobsClient) listCreateRequest(ctx context.Context, resourceGroupName string, location string, parameters CrossRegionRestoreJobsRequest, options *FetchCrossRegionRestoreJobsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/fetchCrossRegionRestoreJobs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FetchCrossRegionRestoreJobsClient) listHandleResponse(resp *http.Response) (FetchCrossRegionRestoreJobsClientListResponse, error) { + result := FetchCrossRegionRestoreJobsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupJobResourceList); err != nil { + return FetchCrossRegionRestoreJobsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/fetchsecondaryrecoverypoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/fetchsecondaryrecoverypoints_client.go new file mode 100644 index 00000000..54e92a0c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/fetchsecondaryrecoverypoints_client.go @@ -0,0 +1,120 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FetchSecondaryRecoveryPointsClient contains the methods for the FetchSecondaryRecoveryPoints group. +// Don't use this type directly, use NewFetchSecondaryRecoveryPointsClient() instead. +type FetchSecondaryRecoveryPointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFetchSecondaryRecoveryPointsClient creates a new instance of FetchSecondaryRecoveryPointsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFetchSecondaryRecoveryPointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FetchSecondaryRecoveryPointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FetchSecondaryRecoveryPointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region +// Restore. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - location - The name of the Azure region. +// - parameters - Request body for operation +// - options - FetchSecondaryRecoveryPointsClientListOptions contains the optional parameters for the FetchSecondaryRecoveryPointsClient.NewListPager +// method. +func (client *FetchSecondaryRecoveryPointsClient) NewListPager(resourceGroupName string, location string, parameters FetchSecondaryRPsRequestParameters, options *FetchSecondaryRecoveryPointsClientListOptions) *runtime.Pager[FetchSecondaryRecoveryPointsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FetchSecondaryRecoveryPointsClientListResponse]{ + More: func(page FetchSecondaryRecoveryPointsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FetchSecondaryRecoveryPointsClientListResponse) (FetchSecondaryRecoveryPointsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FetchSecondaryRecoveryPointsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, location, parameters, options) + }, nil) + if err != nil { + return FetchSecondaryRecoveryPointsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *FetchSecondaryRecoveryPointsClient) listCreateRequest(ctx context.Context, resourceGroupName string, location string, parameters FetchSecondaryRPsRequestParameters, options *FetchSecondaryRecoveryPointsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/fetchSecondaryRecoveryPoints" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FetchSecondaryRecoveryPointsClient) listHandleResponse(resp *http.Response) (FetchSecondaryRecoveryPointsClientListResponse, error) { + result := FetchSecondaryRecoveryPointsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupRecoveryPointResourceList); err != nil { + return FetchSecondaryRecoveryPointsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/interfaces.go new file mode 100644 index 00000000..9156f010 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/interfaces.go @@ -0,0 +1,183 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +// AuthCredentialsClassification provides polymorphic access to related types. +// Call the interface's GetAuthCredentials() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AuthCredentials, *SecretStoreBasedAuthCredentials +type AuthCredentialsClassification interface { + // GetAuthCredentials returns the AuthCredentials content of the underlying type. + GetAuthCredentials() *AuthCredentials +} + +// AzureBackupRecoveryPointBasedRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureBackupRecoveryPointBasedRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupRecoveryPointBasedRestoreRequest, *AzureBackupRestoreWithRehydrationRequest +type AzureBackupRecoveryPointBasedRestoreRequestClassification interface { + AzureBackupRestoreRequestClassification + // GetAzureBackupRecoveryPointBasedRestoreRequest returns the AzureBackupRecoveryPointBasedRestoreRequest content of the underlying type. + GetAzureBackupRecoveryPointBasedRestoreRequest() *AzureBackupRecoveryPointBasedRestoreRequest +} + +// AzureBackupRecoveryPointClassification provides polymorphic access to related types. +// Call the interface's GetAzureBackupRecoveryPoint() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupDiscreteRecoveryPoint, *AzureBackupRecoveryPoint +type AzureBackupRecoveryPointClassification interface { + // GetAzureBackupRecoveryPoint returns the AzureBackupRecoveryPoint content of the underlying type. + GetAzureBackupRecoveryPoint() *AzureBackupRecoveryPoint +} + +// AzureBackupRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureBackupRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupRecoveryPointBasedRestoreRequest, *AzureBackupRecoveryTimeBasedRestoreRequest, *AzureBackupRestoreRequest, +// - *AzureBackupRestoreWithRehydrationRequest +type AzureBackupRestoreRequestClassification interface { + // GetAzureBackupRestoreRequest returns the AzureBackupRestoreRequest content of the underlying type. + GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest +} + +// BackupCriteriaClassification provides polymorphic access to related types. +// Call the interface's GetBackupCriteria() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BackupCriteria, *ScheduleBasedBackupCriteria +type BackupCriteriaClassification interface { + // GetBackupCriteria returns the BackupCriteria content of the underlying type. + GetBackupCriteria() *BackupCriteria +} + +// BackupDatasourceParametersClassification provides polymorphic access to related types. +// Call the interface's GetBackupDatasourceParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BackupDatasourceParameters, *BlobBackupDatasourceParameters, *KubernetesClusterBackupDatasourceParameters +type BackupDatasourceParametersClassification interface { + // GetBackupDatasourceParameters returns the BackupDatasourceParameters content of the underlying type. + GetBackupDatasourceParameters() *BackupDatasourceParameters +} + +// BackupParametersClassification provides polymorphic access to related types. +// Call the interface's GetBackupParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupParams, *BackupParameters +type BackupParametersClassification interface { + // GetBackupParameters returns the BackupParameters content of the underlying type. + GetBackupParameters() *BackupParameters +} + +// BaseBackupPolicyClassification provides polymorphic access to related types. +// Call the interface's GetBaseBackupPolicy() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BackupPolicy, *BaseBackupPolicy +type BaseBackupPolicyClassification interface { + // GetBaseBackupPolicy returns the BaseBackupPolicy content of the underlying type. + GetBaseBackupPolicy() *BaseBackupPolicy +} + +// BasePolicyRuleClassification provides polymorphic access to related types. +// Call the interface's GetBasePolicyRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupRule, *AzureRetentionRule, *BasePolicyRule +type BasePolicyRuleClassification interface { + // GetBasePolicyRule returns the BasePolicyRule content of the underlying type. + GetBasePolicyRule() *BasePolicyRule +} + +// BaseResourcePropertiesClassification provides polymorphic access to related types. +// Call the interface's GetBaseResourceProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BaseResourceProperties, *DefaultResourceProperties +type BaseResourcePropertiesClassification interface { + // GetBaseResourceProperties returns the BaseResourceProperties content of the underlying type. + GetBaseResourceProperties() *BaseResourceProperties +} + +// CopyOptionClassification provides polymorphic access to related types. +// Call the interface's GetCopyOption() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CopyOnExpiryOption, *CopyOption, *CustomCopyOption, *ImmediateCopyOption +type CopyOptionClassification interface { + // GetCopyOption returns the CopyOption content of the underlying type. + GetCopyOption() *CopyOption +} + +// DataStoreParametersClassification provides polymorphic access to related types. +// Call the interface's GetDataStoreParameters() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureOperationalStoreParameters, *DataStoreParameters +type DataStoreParametersClassification interface { + // GetDataStoreParameters returns the DataStoreParameters content of the underlying type. + GetDataStoreParameters() *DataStoreParameters +} + +// DeleteOptionClassification provides polymorphic access to related types. +// Call the interface's GetDeleteOption() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AbsoluteDeleteOption, *DeleteOption +type DeleteOptionClassification interface { + // GetDeleteOption returns the DeleteOption content of the underlying type. + GetDeleteOption() *DeleteOption +} + +// FeatureValidationRequestBaseClassification provides polymorphic access to related types. +// Call the interface's GetFeatureValidationRequestBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *FeatureValidationRequest, *FeatureValidationRequestBase +type FeatureValidationRequestBaseClassification interface { + // GetFeatureValidationRequestBase returns the FeatureValidationRequestBase content of the underlying type. + GetFeatureValidationRequestBase() *FeatureValidationRequestBase +} + +// FeatureValidationResponseBaseClassification provides polymorphic access to related types. +// Call the interface's GetFeatureValidationResponseBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *FeatureValidationResponse, *FeatureValidationResponseBase +type FeatureValidationResponseBaseClassification interface { + // GetFeatureValidationResponseBase returns the FeatureValidationResponseBase content of the underlying type. + GetFeatureValidationResponseBase() *FeatureValidationResponseBase +} + +// ItemLevelRestoreCriteriaClassification provides polymorphic access to related types. +// Call the interface's GetItemLevelRestoreCriteria() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ItemLevelRestoreCriteria, *ItemPathBasedRestoreCriteria, *KubernetesClusterRestoreCriteria, *KubernetesClusterVaultTierRestoreCriteria, +// - *KubernetesPVRestoreCriteria, *KubernetesStorageClassRestoreCriteria, *RangeBasedItemLevelRestoreCriteria +type ItemLevelRestoreCriteriaClassification interface { + // GetItemLevelRestoreCriteria returns the ItemLevelRestoreCriteria content of the underlying type. + GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria +} + +// OperationExtendedInfoClassification provides polymorphic access to related types. +// Call the interface's GetOperationExtendedInfo() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *OperationExtendedInfo, *OperationJobExtendedInfo +type OperationExtendedInfoClassification interface { + // GetOperationExtendedInfo returns the OperationExtendedInfo content of the underlying type. + GetOperationExtendedInfo() *OperationExtendedInfo +} + +// RestoreTargetInfoBaseClassification provides polymorphic access to related types. +// Call the interface's GetRestoreTargetInfoBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ItemLevelRestoreTargetInfo, *RestoreFilesTargetInfo, *RestoreTargetInfo, *RestoreTargetInfoBase +type RestoreTargetInfoBaseClassification interface { + // GetRestoreTargetInfoBase returns the RestoreTargetInfoBase content of the underlying type. + GetRestoreTargetInfoBase() *RestoreTargetInfoBase +} + +// TriggerContextClassification provides polymorphic access to related types. +// Call the interface's GetTriggerContext() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AdhocBasedTriggerContext, *ScheduleBasedTriggerContext, *TriggerContext +type TriggerContextClassification interface { + // GetTriggerContext returns the TriggerContext content of the underlying type. + GetTriggerContext() *TriggerContext +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/jobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/jobs_client.go new file mode 100644 index 00000000..0cd08d2e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/jobs_client.go @@ -0,0 +1,177 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// JobsClient contains the methods for the Jobs group. +// Don't use this type directly, use NewJobsClient() instead. +type JobsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobsClient creates a new instance of JobsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a job with id in a backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - jobID - The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. +func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, jobID string, options *JobsClientGetOptions) (JobsClientGetResponse, error) { + var err error + const operationName = "JobsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, jobID, options) + if err != nil { + return JobsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, jobID string, options *JobsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if jobID == "" { + return nil, errors.New("parameter jobID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobId}", url.PathEscape(jobID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetResponse, error) { + result := JobsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupJobResource); err != nil { + return JobsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Returns list of jobs belonging to a backup vault +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - JobsClientListOptions contains the optional parameters for the JobsClient.NewListPager method. +func (client *JobsClient) NewListPager(resourceGroupName string, vaultName string, options *JobsClientListOptions) *runtime.Pager[JobsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[JobsClientListResponse]{ + More: func(page JobsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *JobsClientListResponse) (JobsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, vaultName, options) + }, nil) + if err != nil { + return JobsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *JobsClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *JobsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *JobsClient) listHandleResponse(resp *http.Response) (JobsClientListResponse, error) { + result := JobsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupJobResourceList); err != nil { + return JobsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/models.go new file mode 100644 index 00000000..29a75753 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/models.go @@ -0,0 +1,2574 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import "time" + +// AbsoluteDeleteOption - Delete option with duration +type AbsoluteDeleteOption struct { + // REQUIRED; Duration of deletion after given timespan + Duration *string + + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetDeleteOption implements the DeleteOptionClassification interface for type AbsoluteDeleteOption. +func (a *AbsoluteDeleteOption) GetDeleteOption() *DeleteOption { + return &DeleteOption{ + Duration: a.Duration, + ObjectType: a.ObjectType, + } +} + +// AdHocBackupRuleOptions - Adhoc backup rules +type AdHocBackupRuleOptions struct { + // REQUIRED + RuleName *string + + // REQUIRED; Adhoc backup trigger option + TriggerOption *AdhocBackupTriggerOption +} + +// AdhocBackupTriggerOption - Adhoc backup trigger option +type AdhocBackupTriggerOption struct { + RetentionTagOverride *string +} + +// AdhocBasedTaggingCriteria - Adhoc backup tagging criteria +type AdhocBasedTaggingCriteria struct { + // Retention tag information + TagInfo *RetentionTag +} + +// AdhocBasedTriggerContext - Adhoc trigger context +type AdhocBasedTriggerContext struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // REQUIRED; Tagging Criteria containing retention tag for adhoc backup. + TaggingCriteria *AdhocBasedTaggingCriteria +} + +// GetTriggerContext implements the TriggerContextClassification interface for type AdhocBasedTriggerContext. +func (a *AdhocBasedTriggerContext) GetTriggerContext() *TriggerContext { + return &TriggerContext{ + ObjectType: a.ObjectType, + } +} + +// AuthCredentials - Base class for different types of authentication credentials. +type AuthCredentials struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetAuthCredentials implements the AuthCredentialsClassification interface for type AuthCredentials. +func (a *AuthCredentials) GetAuthCredentials() *AuthCredentials { return a } + +// AzureBackupDiscreteRecoveryPoint - Azure backup discrete RecoveryPoint +type AzureBackupDiscreteRecoveryPoint struct { + // REQUIRED + ObjectType *string + + // REQUIRED + RecoveryPointTime *time.Time + FriendlyName *string + PolicyName *string + PolicyVersion *string + RecoveryPointDataStoresDetails []*RecoveryPointDataStoreDetails + RecoveryPointID *string + + // Specifies recovery point completeness. Partial (i.e., only some of the intended items were backed up), or Completed (i.e., + // ALL intended items were backed up). + RecoveryPointState *RecoveryPointCompletionState + RecoveryPointType *string + RetentionTagName *string + RetentionTagVersion *string + + // READ-ONLY + ExpiryTime *time.Time +} + +// GetAzureBackupRecoveryPoint implements the AzureBackupRecoveryPointClassification interface for type AzureBackupDiscreteRecoveryPoint. +func (a *AzureBackupDiscreteRecoveryPoint) GetAzureBackupRecoveryPoint() *AzureBackupRecoveryPoint { + return &AzureBackupRecoveryPoint{ + ObjectType: a.ObjectType, + } +} + +// AzureBackupFindRestorableTimeRangesRequest - List Restore Ranges Request +type AzureBackupFindRestorableTimeRangesRequest struct { + // REQUIRED; Gets or sets the type of the source data store. + SourceDataStoreType *RestoreSourceDataStoreType + + // End time for the List Restore Ranges request. ISO 8601 format. + EndTime *string + + // Start time for the List Restore Ranges request. ISO 8601 format. + StartTime *string +} + +// AzureBackupFindRestorableTimeRangesRequestResource - List Restore Ranges Request +type AzureBackupFindRestorableTimeRangesRequestResource struct { + // AzureBackupFindRestorableTimeRangesRequestResource content + Content *AzureBackupFindRestorableTimeRangesRequest + CultureInfo *string + HTTPMethod *string + + // Dictionary of + Headers map[string][]*string + + // Dictionary of + Parameters map[string]*string + SubscriptionID *string + SupportedGroupVersions []*string + URI *string +} + +// AzureBackupFindRestorableTimeRangesResponse - List Restore Ranges Response +type AzureBackupFindRestorableTimeRangesResponse struct { + ObjectType *string + + // Returns the Restore Ranges available on the Backup Instance. + RestorableTimeRanges []*RestorableTimeRange +} + +// AzureBackupFindRestorableTimeRangesResponseResource - List Restore Ranges Response +type AzureBackupFindRestorableTimeRangesResponseResource struct { + // AzureBackupFindRestorableTimeRangesResponseResource properties + Properties *AzureBackupFindRestorableTimeRangesResponse + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// AzureBackupJob - AzureBackup Job Class +type AzureBackupJob struct { + // REQUIRED; Job Activity Id + ActivityID *string + + // REQUIRED; Name of the Backup Instance + BackupInstanceFriendlyName *string + + // REQUIRED; ARM ID of the DataSource + DataSourceID *string + + // REQUIRED; Location of the DataSource + DataSourceLocation *string + + // REQUIRED; User Friendly Name of the DataSource + DataSourceName *string + + // REQUIRED; Type of DataSource + DataSourceType *string + + // REQUIRED; Indicated that whether the job is adhoc(true) or scheduled(false) + IsUserTriggered *bool + + // REQUIRED; It indicates the type of Job i.e. Backup:full/log/diff ;Restore:ALR/OLR; Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure + Operation *string + + // REQUIRED; It indicates the type of Job i.e. Backup/Restore/Tiering/Management + OperationCategory *string + + // REQUIRED; Indicated whether progress is enabled for the job + ProgressEnabled *bool + + // REQUIRED; Resource Group Name of the Datasource + SourceResourceGroup *string + + // REQUIRED; SubscriptionId corresponding to the DataSource + SourceSubscriptionID *string + + // REQUIRED; StartTime of the job(in UTC) + StartTime *time.Time + + // REQUIRED; Status of the job like InProgress/Success/Failed/Cancelled/SuccessWithWarning + Status *string + + // REQUIRED; Subscription Id of the corresponding backup vault + SubscriptionID *string + + // REQUIRED; List of supported actions + SupportedActions []*string + + // REQUIRED; Name of the vault + VaultName *string + + // Data Source Set Name of the DataSource + DataSourceSetName *string + DestinationDataStoreName *string + + // Total run time of the job. ISO 8601 format. + Duration *string + Etag *string + SourceDataStoreName *string + + // READ-ONLY; ARM ID of the Backup Instance + BackupInstanceID *string + + // READ-ONLY; EndTime of the job(in UTC) + EndTime *time.Time + + // READ-ONLY; A List, detailing the errors related to the job + ErrorDetails []*UserFacingError + + // READ-ONLY; Extended Information about the job + ExtendedInfo *JobExtendedInfo + + // READ-ONLY; ARM ID of the policy + PolicyID *string + + // READ-ONLY; Name of the policy + PolicyName *string + + // READ-ONLY; Url which contains job's progress + ProgressURL *string + + // READ-ONLY; Priority to be used for rehydration + RehydrationPriority *string + + // READ-ONLY; It indicates the sub type of operation i.e. in case of Restore it can be ALR/OLR + RestoreType *string +} + +// AzureBackupJobResource - AzureBackup Job Resource Class +type AzureBackupJobResource struct { + // AzureBackupJobResource properties + Properties *AzureBackupJob + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// AzureBackupJobResourceList - List of AzureBackup Job resources +type AzureBackupJobResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string + + // List of resources. + Value []*AzureBackupJobResource +} + +// AzureBackupParams - Azure backup parameters +type AzureBackupParams struct { + // REQUIRED; BackupType ; Full/Incremental etc + BackupType *string + + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetBackupParameters implements the BackupParametersClassification interface for type AzureBackupParams. +func (a *AzureBackupParams) GetBackupParameters() *BackupParameters { + return &BackupParameters{ + ObjectType: a.ObjectType, + } +} + +// AzureBackupRecoveryPoint - Azure backup recoveryPoint +type AzureBackupRecoveryPoint struct { + // REQUIRED + ObjectType *string +} + +// GetAzureBackupRecoveryPoint implements the AzureBackupRecoveryPointClassification interface for type AzureBackupRecoveryPoint. +func (a *AzureBackupRecoveryPoint) GetAzureBackupRecoveryPoint() *AzureBackupRecoveryPoint { return a } + +// AzureBackupRecoveryPointBasedRestoreRequest - Azure backup recoveryPoint based restore request +type AzureBackupRecoveryPointBasedRestoreRequest struct { + // REQUIRED + ObjectType *string + + // REQUIRED + RecoveryPointID *string + + // REQUIRED; Gets or sets the restore target information. + RestoreTargetInfo RestoreTargetInfoBaseClassification + + // REQUIRED; Gets or sets the type of the source data store. + SourceDataStoreType *SourceDataStoreType + + // Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. + IdentityDetails *IdentityDetails + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Fully qualified Azure Resource Manager ID of the datasource which is being recovered. + SourceResourceID *string +} + +// GetAzureBackupRecoveryPointBasedRestoreRequest implements the AzureBackupRecoveryPointBasedRestoreRequestClassification +// interface for type AzureBackupRecoveryPointBasedRestoreRequest. +func (a *AzureBackupRecoveryPointBasedRestoreRequest) GetAzureBackupRecoveryPointBasedRestoreRequest() *AzureBackupRecoveryPointBasedRestoreRequest { + return a +} + +// GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRecoveryPointBasedRestoreRequest. +func (a *AzureBackupRecoveryPointBasedRestoreRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest { + return &AzureBackupRestoreRequest{ + IdentityDetails: a.IdentityDetails, + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + RestoreTargetInfo: a.RestoreTargetInfo, + SourceDataStoreType: a.SourceDataStoreType, + SourceResourceID: a.SourceResourceID, + } +} + +// AzureBackupRecoveryPointResource - Azure backup recoveryPoint resource +type AzureBackupRecoveryPointResource struct { + // AzureBackupRecoveryPointResource properties + Properties AzureBackupRecoveryPointClassification + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// AzureBackupRecoveryPointResourceList - Azure backup recoveryPoint resource list +type AzureBackupRecoveryPointResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string + + // List of resources. + Value []*AzureBackupRecoveryPointResource +} + +// AzureBackupRecoveryTimeBasedRestoreRequest - AzureBackup RecoveryPointTime Based Restore Request +type AzureBackupRecoveryTimeBasedRestoreRequest struct { + // REQUIRED + ObjectType *string + + // REQUIRED; The recovery time in ISO 8601 format example - 2020-08-14T17:30:00.0000000Z. + RecoveryPointTime *string + + // REQUIRED; Gets or sets the restore target information. + RestoreTargetInfo RestoreTargetInfoBaseClassification + + // REQUIRED; Gets or sets the type of the source data store. + SourceDataStoreType *SourceDataStoreType + + // Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. + IdentityDetails *IdentityDetails + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Fully qualified Azure Resource Manager ID of the datasource which is being recovered. + SourceResourceID *string +} + +// GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRecoveryTimeBasedRestoreRequest. +func (a *AzureBackupRecoveryTimeBasedRestoreRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest { + return &AzureBackupRestoreRequest{ + IdentityDetails: a.IdentityDetails, + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + RestoreTargetInfo: a.RestoreTargetInfo, + SourceDataStoreType: a.SourceDataStoreType, + SourceResourceID: a.SourceResourceID, + } +} + +// AzureBackupRehydrationRequest - Azure Backup Rehydrate Request +type AzureBackupRehydrationRequest struct { + // REQUIRED; Id of the recovery point to be recovered + RecoveryPointID *string + + // REQUIRED; Retention duration in ISO 8601 format i.e P10D . + RehydrationRetentionDuration *string + + // Priority to be used for rehydration. Values High or Standard + RehydrationPriority *RehydrationPriority +} + +// AzureBackupRestoreRequest - Azure backup restore request +type AzureBackupRestoreRequest struct { + // REQUIRED + ObjectType *string + + // REQUIRED; Gets or sets the restore target information. + RestoreTargetInfo RestoreTargetInfoBaseClassification + + // REQUIRED; Gets or sets the type of the source data store. + SourceDataStoreType *SourceDataStoreType + + // Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. + IdentityDetails *IdentityDetails + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Fully qualified Azure Resource Manager ID of the datasource which is being recovered. + SourceResourceID *string +} + +// GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRestoreRequest. +func (a *AzureBackupRestoreRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest { + return a +} + +// AzureBackupRestoreWithRehydrationRequest - AzureBackup Restore with Rehydration Request +type AzureBackupRestoreWithRehydrationRequest struct { + // REQUIRED + ObjectType *string + + // REQUIRED + RecoveryPointID *string + + // REQUIRED; Priority to be used for rehydration. Values High or Standard + RehydrationPriority *RehydrationPriority + + // REQUIRED; Retention duration in ISO 8601 format i.e P10D . + RehydrationRetentionDuration *string + + // REQUIRED; Gets or sets the restore target information. + RestoreTargetInfo RestoreTargetInfoBaseClassification + + // REQUIRED; Gets or sets the type of the source data store. + SourceDataStoreType *SourceDataStoreType + + // Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. + IdentityDetails *IdentityDetails + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Fully qualified Azure Resource Manager ID of the datasource which is being recovered. + SourceResourceID *string +} + +// GetAzureBackupRecoveryPointBasedRestoreRequest implements the AzureBackupRecoveryPointBasedRestoreRequestClassification +// interface for type AzureBackupRestoreWithRehydrationRequest. +func (a *AzureBackupRestoreWithRehydrationRequest) GetAzureBackupRecoveryPointBasedRestoreRequest() *AzureBackupRecoveryPointBasedRestoreRequest { + return &AzureBackupRecoveryPointBasedRestoreRequest{ + IdentityDetails: a.IdentityDetails, + ObjectType: a.ObjectType, + RecoveryPointID: a.RecoveryPointID, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + RestoreTargetInfo: a.RestoreTargetInfo, + SourceDataStoreType: a.SourceDataStoreType, + SourceResourceID: a.SourceResourceID, + } +} + +// GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRestoreWithRehydrationRequest. +func (a *AzureBackupRestoreWithRehydrationRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest { + return &AzureBackupRestoreRequest{ + IdentityDetails: a.IdentityDetails, + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + RestoreTargetInfo: a.RestoreTargetInfo, + SourceDataStoreType: a.SourceDataStoreType, + SourceResourceID: a.SourceResourceID, + } +} + +// AzureBackupRule - Azure backup rule +type AzureBackupRule struct { + // REQUIRED; DataStoreInfo base + DataStore *DataStoreInfoBase + + // REQUIRED + Name *string + + // REQUIRED + ObjectType *string + + // REQUIRED; Trigger context + Trigger TriggerContextClassification + + // BackupParameters base + BackupParameters BackupParametersClassification +} + +// GetBasePolicyRule implements the BasePolicyRuleClassification interface for type AzureBackupRule. +func (a *AzureBackupRule) GetBasePolicyRule() *BasePolicyRule { + return &BasePolicyRule{ + Name: a.Name, + ObjectType: a.ObjectType, + } +} + +// AzureMonitorAlertSettings - Settings for Azure Monitor based alerts +type AzureMonitorAlertSettings struct { + AlertsForAllJobFailures *AlertsState +} + +// AzureOperationalStoreParameters - Parameters for Operational-Tier DataStore +type AzureOperationalStoreParameters struct { + // REQUIRED; type of datastore; Operational/Vault/Archive + DataStoreType *DataStoreTypes + + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // Gets or sets the Snapshot Resource Group Uri. + ResourceGroupID *string +} + +// GetDataStoreParameters implements the DataStoreParametersClassification interface for type AzureOperationalStoreParameters. +func (a *AzureOperationalStoreParameters) GetDataStoreParameters() *DataStoreParameters { + return &DataStoreParameters{ + DataStoreType: a.DataStoreType, + ObjectType: a.ObjectType, + } +} + +// AzureRetentionRule - Azure retention rule +type AzureRetentionRule struct { + // REQUIRED + Lifecycles []*SourceLifeCycle + + // REQUIRED + Name *string + + // REQUIRED + ObjectType *string + IsDefault *bool +} + +// GetBasePolicyRule implements the BasePolicyRuleClassification interface for type AzureRetentionRule. +func (a *AzureRetentionRule) GetBasePolicyRule() *BasePolicyRule { + return &BasePolicyRule{ + Name: a.Name, + ObjectType: a.ObjectType, + } +} + +// BackupCriteria base class +type BackupCriteria struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetBackupCriteria implements the BackupCriteriaClassification interface for type BackupCriteria. +func (b *BackupCriteria) GetBackupCriteria() *BackupCriteria { return b } + +// BackupDatasourceParameters - Parameters for Backup Datasource +type BackupDatasourceParameters struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetBackupDatasourceParameters implements the BackupDatasourceParametersClassification interface for type BackupDatasourceParameters. +func (b *BackupDatasourceParameters) GetBackupDatasourceParameters() *BackupDatasourceParameters { + return b +} + +// BackupInstance - Backup Instance +type BackupInstance struct { + // REQUIRED; Gets or sets the data source information. + DataSourceInfo *Datasource + + // REQUIRED + ObjectType *string + + // REQUIRED; Gets or sets the policy information. + PolicyInfo *PolicyInfo + + // Gets or sets the data source set information. + DataSourceSetInfo *DatasourceSet + + // Credentials to use to authenticate with data source provider. + DatasourceAuthCredentials AuthCredentialsClassification + + // Gets or sets the Backup Instance friendly name. + FriendlyName *string + + // Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. + IdentityDetails *IdentityDetails + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again. + ValidationType *ValidationType + + // READ-ONLY; Specifies the current protection state of the resource + CurrentProtectionState *CurrentProtectionState + + // READ-ONLY; Specifies the protection error of the resource + ProtectionErrorDetails *UserFacingError + + // READ-ONLY; Specifies the protection status of the resource + ProtectionStatus *ProtectionStatusDetails + + // READ-ONLY; Specifies the provisioning state of the resource i.e. provisioning/updating/Succeeded/Failed + ProvisioningState *string +} + +// BackupInstanceResource - BackupInstance Resource +type BackupInstanceResource struct { + // BackupInstanceResource properties + Properties *BackupInstance + + // Proxy Resource tags. + Tags map[string]*string + + // READ-ONLY; Proxy Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Proxy Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Proxy Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// BackupInstanceResourceList - BackupInstance Resource list response +type BackupInstanceResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string + + // List of resources. + Value []*BackupInstanceResource +} + +// BackupParameters base +type BackupParameters struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetBackupParameters implements the BackupParametersClassification interface for type BackupParameters. +func (b *BackupParameters) GetBackupParameters() *BackupParameters { return b } + +// BackupPolicy - Rule based backup policy +type BackupPolicy struct { + // REQUIRED; Type of datasource for the backup management + DatasourceTypes []*string + + // REQUIRED + ObjectType *string + + // REQUIRED; Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc + PolicyRules []BasePolicyRuleClassification +} + +// GetBaseBackupPolicy implements the BaseBackupPolicyClassification interface for type BackupPolicy. +func (b *BackupPolicy) GetBaseBackupPolicy() *BaseBackupPolicy { + return &BaseBackupPolicy{ + DatasourceTypes: b.DatasourceTypes, + ObjectType: b.ObjectType, + } +} + +// BackupSchedule - Schedule for backup +type BackupSchedule struct { + // REQUIRED; ISO 8601 repeating time interval format + RepeatingTimeIntervals []*string + + // Time zone for a schedule. Example: Pacific Standard Time + TimeZone *string +} + +// BackupVault - Backup Vault +type BackupVault struct { + // REQUIRED; Storage Settings + StorageSettings []*StorageSetting + + // Feature Settings + FeatureSettings *FeatureSettings + + // Monitoring Settings + MonitoringSettings *MonitoringSettings + + // List of replicated regions for Backup Vault + ReplicatedRegions []*string + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Security Settings + SecuritySettings *SecuritySettings + + // READ-ONLY; Security Level of Backup Vault + BcdrSecurityLevel *BCDRSecurityLevel + + // READ-ONLY; Is vault protected by resource guard + IsVaultProtectedByResourceGuard *bool + + // READ-ONLY; Provisioning state of the BackupVault resource + ProvisioningState *ProvisioningState + + // READ-ONLY; Resource move details for backup vault + ResourceMoveDetails *ResourceMoveDetails + + // READ-ONLY; Resource move state for backup vault + ResourceMoveState *ResourceMoveState + + // READ-ONLY; Secure Score of Backup Vault + SecureScore *SecureScoreLevel +} + +// BackupVaultResource - Backup Vault Resource +type BackupVaultResource struct { + // REQUIRED; BackupVaultResource properties + Properties *BackupVault + + // Optional ETag. + ETag *string + + // Input Managed Identity Details + Identity *DppIdentityDetails + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// BackupVaultResourceList - List of BackupVault resources +type BackupVaultResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string + + // List of resources. + Value []*BackupVaultResource +} + +// BaseBackupPolicy - BackupPolicy base +type BaseBackupPolicy struct { + // REQUIRED; Type of datasource for the backup management + DatasourceTypes []*string + + // REQUIRED + ObjectType *string +} + +// GetBaseBackupPolicy implements the BaseBackupPolicyClassification interface for type BaseBackupPolicy. +func (b *BaseBackupPolicy) GetBaseBackupPolicy() *BaseBackupPolicy { return b } + +// BaseBackupPolicyResource - BaseBackupPolicy resource +type BaseBackupPolicyResource struct { + // BaseBackupPolicyResource properties + Properties BaseBackupPolicyClassification + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// BaseBackupPolicyResourceList - List of BaseBackupPolicy resources +type BaseBackupPolicyResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string + + // List of resources. + Value []*BaseBackupPolicyResource +} + +// BasePolicyRule - BasePolicy Rule +type BasePolicyRule struct { + // REQUIRED + Name *string + + // REQUIRED + ObjectType *string +} + +// GetBasePolicyRule implements the BasePolicyRuleClassification interface for type BasePolicyRule. +func (b *BasePolicyRule) GetBasePolicyRule() *BasePolicyRule { return b } + +// BaseResourceProperties - Properties which are specific to datasource/datasourceSets +type BaseResourceProperties struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *ResourcePropertiesObjectType +} + +// GetBaseResourceProperties implements the BaseResourcePropertiesClassification interface for type BaseResourceProperties. +func (b *BaseResourceProperties) GetBaseResourceProperties() *BaseResourceProperties { return b } + +// BlobBackupDatasourceParameters - Parameters to be used during configuration of backup of blobs +type BlobBackupDatasourceParameters struct { + // REQUIRED; List of containers to be backed up during configuration of backup of blobs + ContainersList []*string + + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetBackupDatasourceParameters implements the BackupDatasourceParametersClassification interface for type BlobBackupDatasourceParameters. +func (b *BlobBackupDatasourceParameters) GetBackupDatasourceParameters() *BackupDatasourceParameters { + return &BackupDatasourceParameters{ + ObjectType: b.ObjectType, + } +} + +// CheckNameAvailabilityRequest - CheckNameAvailability Request +type CheckNameAvailabilityRequest struct { + // Resource name for which availability needs to be checked + Name *string + + // Describes the Resource type: Microsoft.DataProtection/BackupVaults + Type *string +} + +// CheckNameAvailabilityResult - CheckNameAvailability Result +type CheckNameAvailabilityResult struct { + // Gets or sets the message. + Message *string + + // Gets or sets a value indicating whether [name available]. + NameAvailable *bool + + // Gets or sets the reason. + Reason *string +} + +// ClientDiscoveryDisplay - Localized display information of an operation. +type ClientDiscoveryDisplay struct { + // Description of the operation having details of what operation is about. + Description *string + + // Operations Name itself. + Operation *string + + // Name of the provider for display purposes + Provider *string + + // ResourceType for which this Operation can be performed. + Resource *string +} + +// ClientDiscoveryForLogSpecification - Class to represent shoebox log specification in json client discovery. +type ClientDiscoveryForLogSpecification struct { + // blob duration of shoebox log specification + BlobDuration *string + + // Localized display name + DisplayName *string + + // Name for shoebox log specification. + Name *string +} + +// ClientDiscoveryForProperties - Class to represent shoebox properties in json client discovery. +type ClientDiscoveryForProperties struct { + // Operation properties. + ServiceSpecification *ClientDiscoveryForServiceSpecification +} + +// ClientDiscoveryForServiceSpecification - Class to represent shoebox service specification in json client discovery. +type ClientDiscoveryForServiceSpecification struct { + // List of log specifications of this operation. + LogSpecifications []*ClientDiscoveryForLogSpecification +} + +// ClientDiscoveryResponse - Operations List response which contains list of available APIs. +type ClientDiscoveryResponse struct { + // Link to the next chunk of Response. + NextLink *string + + // List of available operations. + Value []*ClientDiscoveryValueForSingleAPI +} + +// ClientDiscoveryValueForSingleAPI - Available operation details. +type ClientDiscoveryValueForSingleAPI struct { + // Contains the localized display information for this particular operation + Display *ClientDiscoveryDisplay + + // Indicates whether the operation is a data action + IsDataAction *bool + + // Name of the Operation. + Name *string + + // The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX + Origin *string + + // Properties for the given operation. + Properties *ClientDiscoveryForProperties +} + +// CmkKekIdentity - The details of the managed identity used for CMK +type CmkKekIdentity struct { + // The managed identity to be used which has access permissions to the Key Vault. Provide a value here in case identity types: + // 'UserAssigned' only. + IdentityID *string + + // The identity type. 'SystemAssigned' and 'UserAssigned' are mutually exclusive. 'SystemAssigned' will use implicitly created + // managed identity. + IdentityType *IdentityType +} + +// CmkKeyVaultProperties - The properties of the Key Vault which hosts CMK +type CmkKeyVaultProperties struct { + // The key uri of the Customer Managed Key + KeyURI *string +} + +// CopyOnExpiryOption - Copy on Expiry Option +type CopyOnExpiryOption struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetCopyOption implements the CopyOptionClassification interface for type CopyOnExpiryOption. +func (c *CopyOnExpiryOption) GetCopyOption() *CopyOption { + return &CopyOption{ + ObjectType: c.ObjectType, + } +} + +// CopyOption - Options to copy +type CopyOption struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetCopyOption implements the CopyOptionClassification interface for type CopyOption. +func (c *CopyOption) GetCopyOption() *CopyOption { return c } + +// CrossRegionRestoreDetails - Cross Region Restore details +type CrossRegionRestoreDetails struct { + // REQUIRED + SourceBackupInstanceID *string + + // REQUIRED + SourceRegion *string +} + +// CrossRegionRestoreJobRequest - Details of CRR Job to be fetched +type CrossRegionRestoreJobRequest struct { + // REQUIRED + JobID *string + + // REQUIRED + SourceBackupVaultID *string + + // REQUIRED + SourceRegion *string +} + +// CrossRegionRestoreJobsRequest - Details of Backup Vault for which CRR Jobs are to be fetched +type CrossRegionRestoreJobsRequest struct { + // REQUIRED + SourceBackupVaultID *string + + // REQUIRED + SourceRegion *string +} + +// CrossRegionRestoreRequestObject - Cross Region Restore Request Object +type CrossRegionRestoreRequestObject struct { + // REQUIRED; Cross region restore details. + CrossRegionRestoreDetails *CrossRegionRestoreDetails + + // REQUIRED; Gets or sets the restore request object. + RestoreRequestObject AzureBackupRestoreRequestClassification +} + +type CrossRegionRestoreSettings struct { + // CrossRegionRestore state + State *CrossRegionRestoreState +} + +// CrossSubscriptionRestoreSettings - CrossSubscriptionRestore Settings +type CrossSubscriptionRestoreSettings struct { + // CrossSubscriptionRestore state + State *CrossSubscriptionRestoreState +} + +// CustomCopyOption - Duration based custom options to copy +type CustomCopyOption struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // Data copied after given timespan + Duration *string +} + +// GetCopyOption implements the CopyOptionClassification interface for type CustomCopyOption. +func (c *CustomCopyOption) GetCopyOption() *CopyOption { + return &CopyOption{ + ObjectType: c.ObjectType, + } +} + +// DataStoreInfoBase - DataStoreInfo base +type DataStoreInfoBase struct { + // REQUIRED; type of datastore; Operational/Vault/Archive + DataStoreType *DataStoreTypes + + // REQUIRED; Type of Datasource object, used to initialize the right inherited type + ObjectType *string +} + +// DataStoreParameters - Parameters for DataStore +type DataStoreParameters struct { + // REQUIRED; type of datastore; Operational/Vault/Archive + DataStoreType *DataStoreTypes + + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetDataStoreParameters implements the DataStoreParametersClassification interface for type DataStoreParameters. +func (d *DataStoreParameters) GetDataStoreParameters() *DataStoreParameters { return d } + +// Datasource to be backed up +type Datasource struct { + // REQUIRED; Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID + // created by backup service via Fabric/Vault. + ResourceID *string + + // DatasourceType of the resource. + DatasourceType *string + + // Type of Datasource object, used to initialize the right inherited type + ObjectType *string + + // Location of datasource. + ResourceLocation *string + + // Unique identifier of the resource in the context of parent. + ResourceName *string + + // Properties specific to data source + ResourceProperties BaseResourcePropertiesClassification + + // Resource Type of Datasource. + ResourceType *string + + // Uri of the resource. + ResourceURI *string +} + +// DatasourceSet details of datasource to be backed up +type DatasourceSet struct { + // REQUIRED; Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID + // created by backup service via Fabric/Vault. + ResourceID *string + + // DatasourceType of the resource. + DatasourceType *string + + // Type of Datasource object, used to initialize the right inherited type + ObjectType *string + + // Location of datasource. + ResourceLocation *string + + // Unique identifier of the resource in the context of parent. + ResourceName *string + + // Properties specific to data source set + ResourceProperties BaseResourcePropertiesClassification + + // Resource Type of Datasource. + ResourceType *string + + // Uri of the resource. + ResourceURI *string +} + +// Day of the week +type Day struct { + // Date of the month + Date *int32 + + // Whether Date is last date of month + IsLast *bool +} + +// DefaultResourceProperties - Default source properties +type DefaultResourceProperties struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *ResourcePropertiesObjectType +} + +// GetBaseResourceProperties implements the BaseResourcePropertiesClassification interface for type DefaultResourceProperties. +func (d *DefaultResourceProperties) GetBaseResourceProperties() *BaseResourceProperties { + return &BaseResourceProperties{ + ObjectType: d.ObjectType, + } +} + +// DeleteOption - Delete Option +type DeleteOption struct { + // REQUIRED; Duration of deletion after given timespan + Duration *string + + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetDeleteOption implements the DeleteOptionClassification interface for type DeleteOption. +func (d *DeleteOption) GetDeleteOption() *DeleteOption { return d } + +// DeletedBackupInstance - Deleted Backup Instance +type DeletedBackupInstance struct { + // REQUIRED; Gets or sets the data source information. + DataSourceInfo *Datasource + + // REQUIRED + ObjectType *string + + // REQUIRED; Gets or sets the policy information. + PolicyInfo *PolicyInfo + + // Gets or sets the data source set information. + DataSourceSetInfo *DatasourceSet + + // Credentials to use to authenticate with data source provider. + DatasourceAuthCredentials AuthCredentialsClassification + + // Gets or sets the Backup Instance friendly name. + FriendlyName *string + + // Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. + IdentityDetails *IdentityDetails + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again. + ValidationType *ValidationType + + // READ-ONLY; Specifies the current protection state of the resource + CurrentProtectionState *CurrentProtectionState + + // READ-ONLY; Deletion info of Backup Instance + DeletionInfo *DeletionInfo + + // READ-ONLY; Specifies the protection error of the resource + ProtectionErrorDetails *UserFacingError + + // READ-ONLY; Specifies the protection status of the resource + ProtectionStatus *ProtectionStatusDetails + + // READ-ONLY; Specifies the provisioning state of the resource i.e. provisioning/updating/Succeeded/Failed + ProvisioningState *string +} + +// DeletedBackupInstanceResource - Deleted Backup Instance +type DeletedBackupInstanceResource struct { + // DeletedBackupInstanceResource properties + Properties *DeletedBackupInstance + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// DeletedBackupInstanceResourceList - List of DeletedBackupInstance resources +type DeletedBackupInstanceResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string + + // List of resources. + Value []*DeletedBackupInstanceResource +} + +// DeletionInfo - Deletion Info +type DeletionInfo struct { + // READ-ONLY; Specifies billing end date + BillingEndDate *string + + // READ-ONLY; Delete activity ID for troubleshooting purpose + DeleteActivityID *string + + // READ-ONLY; Specifies time of deletion + DeletionTime *string + + // READ-ONLY; Specifies purge time + ScheduledPurgeTime *string +} + +// DppBaseResource - Base resource under Microsoft.DataProtection provider namespace +type DppBaseResource struct { + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// DppBaseResourceList - Base for all lists of V2 resources. +type DppBaseResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string + + // List of Dpp resources. + Value []*DppBaseResource +} + +type DppBaseTrackedResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// DppIdentityDetails - Identity details +type DppIdentityDetails struct { + // The identityType which can be either SystemAssigned, UserAssigned, 'SystemAssigned,UserAssigned' or None + Type *string + + // Gets or sets the user assigned identities. + UserAssignedIdentities map[string]*UserAssignedIdentity + + // READ-ONLY; The object ID of the service principal object for the managed identity that is used to grant role-based access + // to an Azure resource. + PrincipalID *string + + // READ-ONLY; A Globally Unique Identifier (GUID) that represents the Azure AD tenant where the resource is now a member. + TenantID *string +} + +type DppProxyResource struct { + // Proxy Resource tags. + Tags map[string]*string + + // READ-ONLY; Proxy Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Proxy Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Proxy Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// DppResource - Resource class +type DppResource struct { + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// DppResourceList - ListResource +type DppResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string +} + +type DppTrackedResource struct { + // Optional ETag. + ETag *string + + // Input Managed Identity Details + Identity *DppIdentityDetails + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +type DppTrackedResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string +} + +type DppWorkerRequest struct { + CultureInfo *string + HTTPMethod *string + + // Dictionary of + Headers map[string][]*string + + // Dictionary of + Parameters map[string]*string + SubscriptionID *string + SupportedGroupVersions []*string + URI *string +} + +// EncryptionSettings - Customer Managed Key details of the resource. +type EncryptionSettings struct { + // Enabling/Disabling the Double Encryption state + InfrastructureEncryption *InfrastructureEncryptionState + + // The details of the managed identity used for CMK + KekIdentity *CmkKekIdentity + + // The properties of the Key Vault which hosts CMK + KeyVaultProperties *CmkKeyVaultProperties + + // Encryption state of the Backup Vault. + State *EncryptionState +} + +// Error - The resource management error response. +type Error struct { + // READ-ONLY; The error additional info. + AdditionalInfo []*ErrorAdditionalInfo + + // READ-ONLY; The error code. + Code *string + + // READ-ONLY; The error details. + Details []*Error + + // READ-ONLY; The error message. + Message *string + + // READ-ONLY; The error target. + Target *string +} + +// ErrorAdditionalInfo - The resource management error additional info. +type ErrorAdditionalInfo struct { + // READ-ONLY; The additional info. + Info any + + // READ-ONLY; The additional info type. + Type *string +} + +// ErrorDetail - The error detail. +type ErrorDetail struct { + // READ-ONLY; The error additional info. + AdditionalInfo []*ErrorAdditionalInfo + + // READ-ONLY; The error code. + Code *string + + // READ-ONLY; The error details. + Details []*ErrorDetail + + // READ-ONLY; The error message. + Message *string + + // READ-ONLY; The error target. + Target *string +} + +// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. +// (This also follows the OData error response format.). +type ErrorResponse struct { + // The error object. + Error *ErrorDetail +} + +// ExportJobsResult - The result for export jobs containing blob details. +type ExportJobsResult struct { + // READ-ONLY; SAS key to access the blob. + BlobSasKey *string + + // READ-ONLY; URL of the blob into which the serialized string of list of jobs is exported. + BlobURL *string + + // READ-ONLY; SAS key to access the ExcelFile blob. + ExcelFileBlobSasKey *string + + // READ-ONLY; URL of the blob into which the ExcelFile is uploaded. + ExcelFileBlobURL *string +} + +// FeatureSettings - Class containing feature settings of vault +type FeatureSettings struct { + CrossRegionRestoreSettings *CrossRegionRestoreSettings + + // CrossSubscriptionRestore Settings + CrossSubscriptionRestoreSettings *CrossSubscriptionRestoreSettings +} + +// FeatureValidationRequest - Base class for feature object +type FeatureValidationRequest struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // backup support feature name. + FeatureName *string + + // backup support feature type. + FeatureType *FeatureType +} + +// GetFeatureValidationRequestBase implements the FeatureValidationRequestBaseClassification interface for type FeatureValidationRequest. +func (f *FeatureValidationRequest) GetFeatureValidationRequestBase() *FeatureValidationRequestBase { + return &FeatureValidationRequestBase{ + ObjectType: f.ObjectType, + } +} + +// FeatureValidationRequestBase - Base class for Backup Feature support +type FeatureValidationRequestBase struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetFeatureValidationRequestBase implements the FeatureValidationRequestBaseClassification interface for type FeatureValidationRequestBase. +func (f *FeatureValidationRequestBase) GetFeatureValidationRequestBase() *FeatureValidationRequestBase { + return f +} + +// FeatureValidationResponse - Feature Validation Response +type FeatureValidationResponse struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // backup support feature type. + FeatureType *FeatureType + + // Response features + Features []*SupportedFeature +} + +// GetFeatureValidationResponseBase implements the FeatureValidationResponseBaseClassification interface for type FeatureValidationResponse. +func (f *FeatureValidationResponse) GetFeatureValidationResponseBase() *FeatureValidationResponseBase { + return &FeatureValidationResponseBase{ + ObjectType: f.ObjectType, + } +} + +// FeatureValidationResponseBase - Base class for Backup Feature support +type FeatureValidationResponseBase struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetFeatureValidationResponseBase implements the FeatureValidationResponseBaseClassification interface for type FeatureValidationResponseBase. +func (f *FeatureValidationResponseBase) GetFeatureValidationResponseBase() *FeatureValidationResponseBase { + return f +} + +// FetchSecondaryRPsRequestParameters - Information about BI whose secondary RecoveryPoints are requested Source region and +// BI ARM path +type FetchSecondaryRPsRequestParameters struct { + // ARM Path of BackupInstance + SourceBackupInstanceID *string + + // Source region in which BackupInstance is located + SourceRegion *string +} + +type IdentityDetails struct { + // Specifies if the BI is protected by System Identity. + UseSystemAssignedIdentity *bool + + // ARM URL for User Assigned Identity. + UserAssignedIdentityArmURL *string +} + +// ImmediateCopyOption - Immediate copy Option +type ImmediateCopyOption struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetCopyOption implements the CopyOptionClassification interface for type ImmediateCopyOption. +func (i *ImmediateCopyOption) GetCopyOption() *CopyOption { + return &CopyOption{ + ObjectType: i.ObjectType, + } +} + +// ImmutabilitySettings - Immutability Settings at vault level +type ImmutabilitySettings struct { + // Immutability state + State *ImmutabilityState +} + +// InnerError - Inner Error +type InnerError struct { + // Any Key value pairs that can be provided to the client for additional verbose information. + AdditionalInfo map[string]*string + + // Unique code for this error + Code *string + + // Child Inner Error, to allow Nesting. + EmbeddedInnerError *InnerError +} + +// ItemLevelRestoreCriteria - Class to contain criteria for item level restore +type ItemLevelRestoreCriteria struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type ItemLevelRestoreCriteria. +func (i *ItemLevelRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { return i } + +// ItemLevelRestoreTargetInfo - Restore target info for Item level restore operation +type ItemLevelRestoreTargetInfo struct { + // REQUIRED; Information of target DS + DatasourceInfo *Datasource + + // REQUIRED; Type of Datasource object, used to initialize the right inherited type + ObjectType *string + + // REQUIRED; Recovery Option + RecoveryOption *RecoveryOption + + // REQUIRED; Restore Criteria + RestoreCriteria []ItemLevelRestoreCriteriaClassification + + // Credentials to use to authenticate with data source provider. + DatasourceAuthCredentials AuthCredentialsClassification + + // Information of target DS Set + DatasourceSetInfo *DatasourceSet + + // Target Restore region + RestoreLocation *string +} + +// GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type ItemLevelRestoreTargetInfo. +func (i *ItemLevelRestoreTargetInfo) GetRestoreTargetInfoBase() *RestoreTargetInfoBase { + return &RestoreTargetInfoBase{ + ObjectType: i.ObjectType, + RecoveryOption: i.RecoveryOption, + RestoreLocation: i.RestoreLocation, + } +} + +// ItemPathBasedRestoreCriteria - Prefix criteria to be used to during restore +type ItemPathBasedRestoreCriteria struct { + // REQUIRED; Flag to specify if the path is relative to backup item or full path + IsPathRelativeToBackupItem *bool + + // REQUIRED; The path of the item to be restored. It could be the full path of the item or the path relative to the backup + // item + ItemPath *string + + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // The list of prefix strings to be used as filter criteria during restore. These are relative to the item path specified. + SubItemPathPrefix []*string +} + +// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type ItemPathBasedRestoreCriteria. +func (i *ItemPathBasedRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { + return &ItemLevelRestoreCriteria{ + ObjectType: i.ObjectType, + } +} + +// JobExtendedInfo - Extended Information about the job +type JobExtendedInfo struct { + // Job's Additional Details + AdditionalDetails map[string]*string + + // READ-ONLY; State of the Backup Instance + BackupInstanceState *string + + // READ-ONLY; Number of bytes transferred + DataTransferredInBytes *float64 + + // READ-ONLY; Destination where restore is done + RecoveryDestination *string + + // READ-ONLY; Details of the Source Recovery Point + SourceRecoverPoint *RestoreJobRecoveryPointDetails + + // READ-ONLY; List of Sub Tasks of the job + SubTasks []*JobSubTask + + // READ-ONLY; Details of the Target Recovery Point + TargetRecoverPoint *RestoreJobRecoveryPointDetails + + // READ-ONLY; A List, detailing the warnings related to the job + WarningDetails []*UserFacingWarningDetail +} + +// JobSubTask - Details of Job's Sub Task +type JobSubTask struct { + // REQUIRED; Task Id of the Sub Task + TaskID *int32 + + // REQUIRED; Name of the Sub Task + TaskName *string + + // REQUIRED; Status of the Sub Task + TaskStatus *string + + // Additional details of Sub Tasks + AdditionalDetails map[string]*string + + // READ-ONLY; Progress of the Sub Task + TaskProgress *string +} + +// KubernetesClusterBackupDatasourceParameters - Parameters for Kubernetes Cluster Backup Datasource +type KubernetesClusterBackupDatasourceParameters struct { + // REQUIRED; Gets or sets the include cluster resources property. This property if enabled will include cluster scope resources + // during backup. + IncludeClusterScopeResources *bool + + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // REQUIRED; Gets or sets the volume snapshot property. This property if enabled will take volume snapshots during backup. + SnapshotVolumes *bool + + // Gets or sets the backup hook references. This property sets the hook reference to be executed during backup. + BackupHookReferences []*NamespacedNameResource + + // Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during backup. + ExcludedNamespaces []*string + + // Gets or sets the exclude resource types property. This property sets the resource types to be excluded during backup. + ExcludedResourceTypes []*string + + // Gets or sets the include namespaces property. This property sets the namespaces to be included during backup. + IncludedNamespaces []*string + + // Gets or sets the include resource types property. This property sets the resource types to be included during backup. + IncludedResourceTypes []*string + + // Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be included during + // backup. + LabelSelectors []*string +} + +// GetBackupDatasourceParameters implements the BackupDatasourceParametersClassification interface for type KubernetesClusterBackupDatasourceParameters. +func (k *KubernetesClusterBackupDatasourceParameters) GetBackupDatasourceParameters() *BackupDatasourceParameters { + return &BackupDatasourceParameters{ + ObjectType: k.ObjectType, + } +} + +// KubernetesClusterRestoreCriteria - kubernetes Cluster Backup target info for restore operation +type KubernetesClusterRestoreCriteria struct { + // REQUIRED; Gets or sets the include cluster resources property. This property if enabled will include cluster scope resources + // during restore. + IncludeClusterScopeResources *bool + + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // Gets or sets the Conflict Policy property. This property sets policy during conflict of resources during restore. + ConflictPolicy *ExistingResourcePolicy + + // Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore. + ExcludedNamespaces []*string + + // Gets or sets the exclude resource types property. This property sets the resource types to be excluded during restore. + ExcludedResourceTypes []*string + + // Gets or sets the include namespaces property. This property sets the namespaces to be included during restore. + IncludedNamespaces []*string + + // Gets or sets the include resource types property. This property sets the resource types to be included during restore. + IncludedResourceTypes []*string + + // Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be included during + // restore. + LabelSelectors []*string + + // Gets or sets the Namespace Mappings property. This property sets if namespace needs to be change during restore. + NamespaceMappings map[string]*string + + // Gets or sets the PV (Persistent Volume) Restore Mode property. This property sets whether volumes needs to be restored. + PersistentVolumeRestoreMode *PersistentVolumeRestoreMode + + // Gets or sets the resource modifier reference. This property sets the reference for resource modifier during restore. + ResourceModifierReference *NamespacedNameResource + + // Gets or sets the restore hook references. This property sets the hook reference to be executed during restore. + RestoreHookReferences []*NamespacedNameResource +} + +// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type KubernetesClusterRestoreCriteria. +func (k *KubernetesClusterRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { + return &ItemLevelRestoreCriteria{ + ObjectType: k.ObjectType, + } +} + +// KubernetesClusterVaultTierRestoreCriteria - kubernetes Cluster Backup target info for restore operation from vault +type KubernetesClusterVaultTierRestoreCriteria struct { + // REQUIRED; Gets or sets the include cluster resources property. This property if enabled will include cluster scope resources + // during restore from vault. + IncludeClusterScopeResources *bool + + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // Gets or sets the Conflict Policy property. This property sets policy during conflict of resources during restore from vault. + ConflictPolicy *ExistingResourcePolicy + + // Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore from vault. + ExcludedNamespaces []*string + + // Gets or sets the exclude resource types property. This property sets the resource types to be excluded during restore from + // vault. + ExcludedResourceTypes []*string + + // Gets or sets the include namespaces property. This property sets the namespaces to be included during restore from vault. + IncludedNamespaces []*string + + // Gets or sets the include resource types property. This property sets the resource types to be included during restore from + // vault. + IncludedResourceTypes []*string + + // Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be included during + // restore from vault. + LabelSelectors []*string + + // Gets or sets the Namespace Mappings property. This property sets if namespace needs to be change during restore from vault. + NamespaceMappings map[string]*string + + // Gets or sets the PV (Persistent Volume) Restore Mode property. This property sets whether volumes needs to be restored + // from vault. + PersistentVolumeRestoreMode *PersistentVolumeRestoreMode + + // Gets or sets the resource modifier reference. This property sets the reference for resource modifier during restore. + ResourceModifierReference *NamespacedNameResource + + // Gets or sets the restore hook references. This property sets the hook reference to be executed during restore from vault. + RestoreHookReferences []*NamespacedNameResource + + // Gets or sets the staging RG Id for creating staging disks and snapshots during restore from vault. + StagingResourceGroupID *string + + // Gets or sets the staging Storage Account Id for creating backup extension object store data during restore from vault. + StagingStorageAccountID *string +} + +// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type KubernetesClusterVaultTierRestoreCriteria. +func (k *KubernetesClusterVaultTierRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { + return &ItemLevelRestoreCriteria{ + ObjectType: k.ObjectType, + } +} + +// KubernetesPVRestoreCriteria - Item Level kubernetes persistent volume target info for restore operation +type KubernetesPVRestoreCriteria struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // Selected persistent volume claim name + Name *string + + // Selected storage class name for restore operation + StorageClassName *string +} + +// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type KubernetesPVRestoreCriteria. +func (k *KubernetesPVRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { + return &ItemLevelRestoreCriteria{ + ObjectType: k.ObjectType, + } +} + +// KubernetesStorageClassRestoreCriteria - Item Level kubernetes storage class target info for restore operation +type KubernetesStorageClassRestoreCriteria struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // Provisioner of the storage class + Provisioner *string + + // Selected storage class name + SelectedStorageClassName *string +} + +// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type KubernetesStorageClassRestoreCriteria. +func (k *KubernetesStorageClassRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { + return &ItemLevelRestoreCriteria{ + ObjectType: k.ObjectType, + } +} + +// MonitoringSettings - Monitoring Settings +type MonitoringSettings struct { + // Settings for Azure Monitor based alerts + AzureMonitorAlertSettings *AzureMonitorAlertSettings +} + +// NamespacedNameResource - Class to refer resources which contains namespace and name +type NamespacedNameResource struct { + // Name of the resource + Name *string + + // Namespace in which the resource exists + Namespace *string +} + +// OperationExtendedInfo - Operation Extended Info +type OperationExtendedInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string +} + +// GetOperationExtendedInfo implements the OperationExtendedInfoClassification interface for type OperationExtendedInfo. +func (o *OperationExtendedInfo) GetOperationExtendedInfo() *OperationExtendedInfo { return o } + +// OperationJobExtendedInfo - Operation Job Extended Info +type OperationJobExtendedInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Name or Arm Id of the job created for this operation. + JobID *string +} + +// GetOperationExtendedInfo implements the OperationExtendedInfoClassification interface for type OperationJobExtendedInfo. +func (o *OperationJobExtendedInfo) GetOperationExtendedInfo() *OperationExtendedInfo { + return &OperationExtendedInfo{ + ObjectType: o.ObjectType, + } +} + +// OperationResource - Operation Resource +type OperationResource struct { + // End time of the operation + EndTime *time.Time + + // Required if status == failed or status == canceled. This is the OData v4 error format, used by the RPC and will go into + // the v2.2 Azure REST API guidelines. The full set of optional properties (e.g. + // inner errors / details) can be found in the "Error Response" section. + Error *Error + + // It should match what is used to GET the operation result + ID *string + + // It must match the last segment of the "id" field, and will typically be a GUID / system generated value + Name *string + + // End time of the operation + Properties OperationExtendedInfoClassification + + // Start time of the operation + StartTime *time.Time + Status *string +} + +// PatchBackupVaultInput - Backup Vault Contract for Patch Backup Vault API. +type PatchBackupVaultInput struct { + // Feature Settings + FeatureSettings *FeatureSettings + + // Monitoring Settings + MonitoringSettings *MonitoringSettings + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Security Settings + SecuritySettings *SecuritySettings +} + +// PatchResourceGuardInput - Patch Request content for Microsoft.DataProtection Resource Guard resources +type PatchResourceGuardInput struct { + // Resource Guard tags. + Tags map[string]*string +} + +// PatchResourceRequestInput - Patch Request content for Microsoft.DataProtection resources +type PatchResourceRequestInput struct { + // Input Managed Identity Details + Identity *DppIdentityDetails + + // Resource properties. + Properties *PatchBackupVaultInput + + // Resource tags. + Tags map[string]*string +} + +// PolicyInfo - Policy Info in backupInstance +type PolicyInfo struct { + // REQUIRED + PolicyID *string + + // Policy parameters for the backup instance + PolicyParameters *PolicyParameters + + // READ-ONLY + PolicyVersion *string +} + +// PolicyParameters - Parameters in Policy +type PolicyParameters struct { + // Gets or sets the Backup Data Source Parameters + BackupDatasourceParametersList []BackupDatasourceParametersClassification + + // Gets or sets the DataStore Parameters + DataStoreParametersList []DataStoreParametersClassification +} + +// ProtectionStatusDetails - Protection status details +type ProtectionStatusDetails struct { + // Specifies the protection status error of the resource + ErrorDetails *UserFacingError + + // Specifies the protection status of the resource + Status *Status +} + +// RangeBasedItemLevelRestoreCriteria - Item Level target info for restore operation +type RangeBasedItemLevelRestoreCriteria struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // maximum value for range prefix match + MaxMatchingValue *string + + // minimum value for range prefix match + MinMatchingValue *string +} + +// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type RangeBasedItemLevelRestoreCriteria. +func (r *RangeBasedItemLevelRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { + return &ItemLevelRestoreCriteria{ + ObjectType: r.ObjectType, + } +} + +// RecoveryPointDataStoreDetails - RecoveryPoint datastore details +type RecoveryPointDataStoreDetails struct { + CreationTime *time.Time + ExpiryTime *time.Time + ID *string + MetaData *string + State *string + Type *string + Visible *bool + + // READ-ONLY + RehydrationExpiryTime *time.Time + + // READ-ONLY + RehydrationStatus *RehydrationStatus +} + +type RecoveryPointsFilters struct { + EndDate *string + ExtendedInfo *bool + IsVisible *bool + RestorePointDataStoreID *string + RestorePointState *string + StartDate *string +} + +type ResourceGuard struct { + // List of critical operations which are not protected by this resourceGuard + VaultCriticalOperationExclusionList []*string + + // READ-ONLY; This flag indicates whether auto approval is allowed or not. + AllowAutoApprovals *bool + + // READ-ONLY; Description about the pre-req steps to perform all the critical operations. + Description *string + + // READ-ONLY; Provisioning state of the BackupVault resource + ProvisioningState *ProvisioningState + + // READ-ONLY; {readonly} List of operation details those are protected by the ResourceGuard resource + ResourceGuardOperations []*ResourceGuardOperation +} + +// ResourceGuardOperation - This class contains all the details about a critical operation. +type ResourceGuardOperation struct { + // READ-ONLY; Type of resource request. + RequestResourceType *string + + // READ-ONLY; Name of the critical operation. + VaultCriticalOperation *string +} + +// ResourceGuardOperationDetail - VaultCritical Operation protected by a resource guard +type ResourceGuardOperationDetail struct { + DefaultResourceRequest *string + VaultCriticalOperation *string +} + +// ResourceGuardProxyBase object, used in ResourceGuardProxyBaseResource +type ResourceGuardProxyBase struct { + Description *string + LastUpdatedTime *string + ResourceGuardOperationDetails []*ResourceGuardOperationDetail + ResourceGuardResourceID *string +} + +// ResourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs +type ResourceGuardProxyBaseResource struct { + // ResourceGuardProxyBaseResource properties + Properties *ResourceGuardProxyBase + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// ResourceGuardProxyBaseResourceList - List of ResourceGuardProxyBase resources +type ResourceGuardProxyBaseResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string + + // List of resources. + Value []*ResourceGuardProxyBaseResource +} + +type ResourceGuardResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // ResourceGuardResource properties + Properties *ResourceGuard + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// ResourceGuardResourceList - List of ResourceGuard resources +type ResourceGuardResourceList struct { + // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string + + // List of resources. + Value []*ResourceGuardResource +} + +// ResourceMoveDetails will be returned in response to GetResource call from ARM +type ResourceMoveDetails struct { + // Completion time in UTC of latest ResourceMove operation attempted. ISO 8601 format. + CompletionTimeUTC *string + + // CorrelationId of latest ResourceMove operation attempted + OperationID *string + + // ARM resource path of source resource + SourceResourcePath *string + + // Start time in UTC of latest ResourceMove operation attempted. ISO 8601 format. + StartTimeUTC *string + + // ARM resource path of target resource used in latest ResourceMove operation + TargetResourcePath *string +} + +type RestorableTimeRange struct { + // REQUIRED; End time for the available restore range + EndTime *string + + // REQUIRED; Start time for the available restore range + StartTime *string + ObjectType *string +} + +// RestoreFilesTargetInfo - Class encapsulating restore as files target parameters +type RestoreFilesTargetInfo struct { + // REQUIRED; Type of Datasource object, used to initialize the right inherited type + ObjectType *string + + // REQUIRED; Recovery Option + RecoveryOption *RecoveryOption + + // REQUIRED; Destination of RestoreAsFiles operation, when destination is not a datasource + TargetDetails *TargetDetails + + // Target Restore region + RestoreLocation *string +} + +// GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type RestoreFilesTargetInfo. +func (r *RestoreFilesTargetInfo) GetRestoreTargetInfoBase() *RestoreTargetInfoBase { + return &RestoreTargetInfoBase{ + ObjectType: r.ObjectType, + RecoveryOption: r.RecoveryOption, + RestoreLocation: r.RestoreLocation, + } +} + +type RestoreJobRecoveryPointDetails struct { + RecoveryPointID *string + RecoveryPointTime *time.Time +} + +// RestoreTargetInfo - Class encapsulating restore target parameters +type RestoreTargetInfo struct { + // REQUIRED; Information of target DS + DatasourceInfo *Datasource + + // REQUIRED; Type of Datasource object, used to initialize the right inherited type + ObjectType *string + + // REQUIRED; Recovery Option + RecoveryOption *RecoveryOption + + // Credentials to use to authenticate with data source provider. + DatasourceAuthCredentials AuthCredentialsClassification + + // Information of target DS Set + DatasourceSetInfo *DatasourceSet + + // Target Restore region + RestoreLocation *string +} + +// GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type RestoreTargetInfo. +func (r *RestoreTargetInfo) GetRestoreTargetInfoBase() *RestoreTargetInfoBase { + return &RestoreTargetInfoBase{ + ObjectType: r.ObjectType, + RecoveryOption: r.RecoveryOption, + RestoreLocation: r.RestoreLocation, + } +} + +// RestoreTargetInfoBase - Base class common to RestoreTargetInfo and RestoreFilesTargetInfo +type RestoreTargetInfoBase struct { + // REQUIRED; Type of Datasource object, used to initialize the right inherited type + ObjectType *string + + // REQUIRED; Recovery Option + RecoveryOption *RecoveryOption + + // Target Restore region + RestoreLocation *string +} + +// GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type RestoreTargetInfoBase. +func (r *RestoreTargetInfoBase) GetRestoreTargetInfoBase() *RestoreTargetInfoBase { return r } + +// RetentionTag - Retention tag +type RetentionTag struct { + // REQUIRED; Retention Tag Name to relate it to retention rule. + TagName *string + + // READ-ONLY; Retention Tag version. + ETag *string + + // READ-ONLY; Retention Tag version. + ID *string +} + +// ScheduleBasedBackupCriteria - Schedule based backup criteria +type ScheduleBasedBackupCriteria struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" and should be part of AbsoluteMarker + // enum + AbsoluteCriteria []*AbsoluteMarker + + // This is day of the month from 1 to 28 other wise last of month + DaysOfMonth []*Day + + // It should be Sunday/Monday/T…./Saturday + DaysOfTheWeek []*DayOfWeek + + // It should be January/February/……/December + MonthsOfYear []*Month + + // List of schedule times for backup + ScheduleTimes []*time.Time + + // It should be First/Second/Third/Fourth/Last + WeeksOfTheMonth []*WeekNumber +} + +// GetBackupCriteria implements the BackupCriteriaClassification interface for type ScheduleBasedBackupCriteria. +func (s *ScheduleBasedBackupCriteria) GetBackupCriteria() *BackupCriteria { + return &BackupCriteria{ + ObjectType: s.ObjectType, + } +} + +// ScheduleBasedTriggerContext - Schedule based trigger context +type ScheduleBasedTriggerContext struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // REQUIRED; Schedule for this backup + Schedule *BackupSchedule + + // REQUIRED; List of tags that can be applicable for given schedule. + TaggingCriteria []*TaggingCriteria +} + +// GetTriggerContext implements the TriggerContextClassification interface for type ScheduleBasedTriggerContext. +func (s *ScheduleBasedTriggerContext) GetTriggerContext() *TriggerContext { + return &TriggerContext{ + ObjectType: s.ObjectType, + } +} + +// SecretStoreBasedAuthCredentials - Secret store based authentication credentials. +type SecretStoreBasedAuthCredentials struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string + + // Secret store resource + SecretStoreResource *SecretStoreResource +} + +// GetAuthCredentials implements the AuthCredentialsClassification interface for type SecretStoreBasedAuthCredentials. +func (s *SecretStoreBasedAuthCredentials) GetAuthCredentials() *AuthCredentials { + return &AuthCredentials{ + ObjectType: s.ObjectType, + } +} + +// SecretStoreResource - Class representing a secret store resource. +type SecretStoreResource struct { + // REQUIRED; Gets or sets the type of secret store + SecretStoreType *SecretStoreType + + // Uri to get to the resource + URI *string + + // Gets or sets value stored in secret store resource + Value *string +} + +// SecuritySettings - Class containing security settings of vault +type SecuritySettings struct { + // Customer Managed Key details of the resource. + EncryptionSettings *EncryptionSettings + + // Immutability Settings at vault level + ImmutabilitySettings *ImmutabilitySettings + + // Soft delete related settings + SoftDeleteSettings *SoftDeleteSettings +} + +// SoftDeleteSettings - Soft delete related settings +type SoftDeleteSettings struct { + // Soft delete retention duration + RetentionDurationInDays *float64 + + // State of soft delete + State *SoftDeleteState +} + +// SourceLifeCycle - Source LifeCycle +type SourceLifeCycle struct { + // REQUIRED; Delete Option + DeleteAfter DeleteOptionClassification + + // REQUIRED; DataStoreInfo base + SourceDataStore *DataStoreInfoBase + TargetDataStoreCopySettings []*TargetCopySetting +} + +// StopProtectionRequest - Request body of Stop protection when MUA is Enabled +type StopProtectionRequest struct { + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string +} + +// StorageSetting - Storage setting +type StorageSetting struct { + // Gets or sets the type of the datastore. + DatastoreType *StorageSettingStoreTypes + + // Gets or sets the type. + Type *StorageSettingTypes +} + +// SupportedFeature - Elements class for feature request +type SupportedFeature struct { + // support feature type. + ExposureControlledFeatures []*string + + // support feature type. + FeatureName *string + + // feature support status + SupportStatus *FeatureSupportStatus +} + +// SuspendBackupRequest - Request body of Suspend backup when MUA is Enabled +type SuspendBackupRequest struct { + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string +} + +// SyncBackupInstanceRequest - Sync BackupInstance Request +type SyncBackupInstanceRequest struct { + // Field indicating sync type e.g. to sync only in case of failure or in all cases + SyncType *SyncType +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource last modification (UTC) + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *CreatedByType +} + +// TaggingCriteria - Tagging criteria +type TaggingCriteria struct { + // REQUIRED; Specifies if tag is default. + IsDefault *bool + + // REQUIRED; Retention tag information + TagInfo *RetentionTag + + // REQUIRED; Retention Tag priority. + TaggingPriority *int64 + + // Criteria which decides whether the tag can be applied to a triggered backup. + Criteria []BackupCriteriaClassification +} + +// TargetCopySetting - Target copy settings +type TargetCopySetting struct { + // REQUIRED; It can be CustomCopyOption or ImmediateCopyOption. + CopyAfter CopyOptionClassification + + // REQUIRED; Info of target datastore + DataStore *DataStoreInfoBase +} + +// TargetDetails - Class encapsulating target details, used where the destination is not a datasource +type TargetDetails struct { + // REQUIRED; Restore operation may create multiple files inside location pointed by Url Below will be the common prefix for + // all of them + FilePrefix *string + + // REQUIRED; Denotes the target location where the data will be restored, string value for the enum {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType} + RestoreTargetLocationType *RestoreTargetLocationType + + // REQUIRED; Url denoting the restore destination. It can point to container / file share etc + URL *string + + // Full ARM Id denoting the restore destination. It is the ARM Id pointing to container / file share This is optional if the + // target subscription can be identified with the URL field. If not then this is + // needed if CrossSubscriptionRestore field of BackupVault is in any of the disabled states + TargetResourceArmID *string +} + +// TriggerBackupRequest - Trigger backup request +type TriggerBackupRequest struct { + // REQUIRED; Name for the Rule of the Policy which needs to be applied for this backup + BackupRuleOptions *AdHocBackupRuleOptions +} + +// TriggerContext - Trigger context +type TriggerContext struct { + // REQUIRED; Type of the specific object - used for deserializing + ObjectType *string +} + +// GetTriggerContext implements the TriggerContextClassification interface for type TriggerContext. +func (t *TriggerContext) GetTriggerContext() *TriggerContext { return t } + +// UnlockDeleteRequest - Request body of unlock delete API. +type UnlockDeleteRequest struct { + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + ResourceToBeDeleted *string +} + +// UnlockDeleteResponse - Response of Unlock Delete API. +type UnlockDeleteResponse struct { + // This is the time when unlock delete privileges will get expired. + UnlockDeleteExpiryTime *string +} + +// UserAssignedIdentity - User assigned identity properties +type UserAssignedIdentity struct { + // READ-ONLY; The client ID of the assigned identity. + ClientID *string + + // READ-ONLY; The principal ID of the assigned identity. + PrincipalID *string +} + +// UserFacingError - Error object used by layers that have access to localized content, and propagate that to user +type UserFacingError struct { + // Unique code for this error + Code *string + + // Additional related Errors + Details []*UserFacingError + + // Inner Error + InnerError *InnerError + + // Whether the operation will be retryable or not + IsRetryable *bool + + // Whether the operation is due to a user error or service error + IsUserError *bool + Message *string + + // Any key value pairs that can be injected inside error object + Properties map[string]*string + + // RecommendedAction � localized. + RecommendedAction []*string + + // Target of the error. + Target *string +} + +// UserFacingWarningDetail - Warning object used by layers that have access to localized content, and propagate that to user +type UserFacingWarningDetail struct { + // REQUIRED; Error details for the warning. + Warning *UserFacingError + + // Name of resource for which warning is raised. + ResourceName *string +} + +// ValidateCrossRegionRestoreRequestObject - Cross Region Restore Request Object +type ValidateCrossRegionRestoreRequestObject struct { + // REQUIRED; Cross region restore details. + CrossRegionRestoreDetails *CrossRegionRestoreDetails + + // REQUIRED; Gets or sets the restore request object. + RestoreRequestObject AzureBackupRestoreRequestClassification +} + +// ValidateForBackupRequest - Validate for backup request +type ValidateForBackupRequest struct { + // REQUIRED; Backup Instance + BackupInstance *BackupInstance +} + +// ValidateRestoreRequestObject - Validate restore request object +type ValidateRestoreRequestObject struct { + // REQUIRED; Gets or sets the restore request object. + RestoreRequestObject AzureBackupRestoreRequestClassification +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/models_serde.go new file mode 100644 index 00000000..b39581a6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/models_serde.go @@ -0,0 +1,6274 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "time" +) + +// MarshalJSON implements the json.Marshaller interface for type AbsoluteDeleteOption. +func (a AbsoluteDeleteOption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "duration", a.Duration) + objectMap["objectType"] = "AbsoluteDeleteOption" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AbsoluteDeleteOption. +func (a *AbsoluteDeleteOption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "duration": + err = unpopulate(val, "Duration", &a.Duration) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdHocBackupRuleOptions. +func (a AdHocBackupRuleOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ruleName", a.RuleName) + populate(objectMap, "triggerOption", a.TriggerOption) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdHocBackupRuleOptions. +func (a *AdHocBackupRuleOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ruleName": + err = unpopulate(val, "RuleName", &a.RuleName) + delete(rawMsg, key) + case "triggerOption": + err = unpopulate(val, "TriggerOption", &a.TriggerOption) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdhocBackupTriggerOption. +func (a AdhocBackupTriggerOption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "retentionTagOverride", a.RetentionTagOverride) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdhocBackupTriggerOption. +func (a *AdhocBackupTriggerOption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "retentionTagOverride": + err = unpopulate(val, "RetentionTagOverride", &a.RetentionTagOverride) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdhocBasedTaggingCriteria. +func (a AdhocBasedTaggingCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tagInfo", a.TagInfo) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdhocBasedTaggingCriteria. +func (a *AdhocBasedTaggingCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tagInfo": + err = unpopulate(val, "TagInfo", &a.TagInfo) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdhocBasedTriggerContext. +func (a AdhocBasedTriggerContext) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AdhocBasedTriggerContext" + populate(objectMap, "taggingCriteria", a.TaggingCriteria) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdhocBasedTriggerContext. +func (a *AdhocBasedTriggerContext) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "taggingCriteria": + err = unpopulate(val, "TaggingCriteria", &a.TaggingCriteria) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthCredentials. +func (a AuthCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = a.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthCredentials. +func (a *AuthCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupDiscreteRecoveryPoint. +func (a AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expiryTime", a.ExpiryTime) + populate(objectMap, "friendlyName", a.FriendlyName) + objectMap["objectType"] = "AzureBackupDiscreteRecoveryPoint" + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "policyVersion", a.PolicyVersion) + populate(objectMap, "recoveryPointDataStoresDetails", a.RecoveryPointDataStoresDetails) + populate(objectMap, "recoveryPointId", a.RecoveryPointID) + populate(objectMap, "recoveryPointState", a.RecoveryPointState) + populateDateTimeRFC3339(objectMap, "recoveryPointTime", a.RecoveryPointTime) + populate(objectMap, "recoveryPointType", a.RecoveryPointType) + populate(objectMap, "retentionTagName", a.RetentionTagName) + populate(objectMap, "retentionTagVersion", a.RetentionTagVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupDiscreteRecoveryPoint. +func (a *AzureBackupDiscreteRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &a.ExpiryTime) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "policyVersion": + err = unpopulate(val, "PolicyVersion", &a.PolicyVersion) + delete(rawMsg, key) + case "recoveryPointDataStoresDetails": + err = unpopulate(val, "RecoveryPointDataStoresDetails", &a.RecoveryPointDataStoresDetails) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) + delete(rawMsg, key) + case "recoveryPointState": + err = unpopulate(val, "RecoveryPointState", &a.RecoveryPointState) + delete(rawMsg, key) + case "recoveryPointTime": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTime", &a.RecoveryPointTime) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &a.RecoveryPointType) + delete(rawMsg, key) + case "retentionTagName": + err = unpopulate(val, "RetentionTagName", &a.RetentionTagName) + delete(rawMsg, key) + case "retentionTagVersion": + err = unpopulate(val, "RetentionTagVersion", &a.RetentionTagVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupFindRestorableTimeRangesRequest. +func (a AzureBackupFindRestorableTimeRangesRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endTime", a.EndTime) + populate(objectMap, "sourceDataStoreType", a.SourceDataStoreType) + populate(objectMap, "startTime", a.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupFindRestorableTimeRangesRequest. +func (a *AzureBackupFindRestorableTimeRangesRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulate(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "sourceDataStoreType": + err = unpopulate(val, "SourceDataStoreType", &a.SourceDataStoreType) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupFindRestorableTimeRangesRequestResource. +func (a AzureBackupFindRestorableTimeRangesRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "content", a.Content) + populate(objectMap, "cultureInfo", a.CultureInfo) + populate(objectMap, "httpMethod", a.HTTPMethod) + populate(objectMap, "headers", a.Headers) + populate(objectMap, "parameters", a.Parameters) + populate(objectMap, "subscriptionId", a.SubscriptionID) + populate(objectMap, "supportedGroupVersions", a.SupportedGroupVersions) + populate(objectMap, "uri", a.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupFindRestorableTimeRangesRequestResource. +func (a *AzureBackupFindRestorableTimeRangesRequestResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "content": + err = unpopulate(val, "Content", &a.Content) + delete(rawMsg, key) + case "cultureInfo": + err = unpopulate(val, "CultureInfo", &a.CultureInfo) + delete(rawMsg, key) + case "httpMethod": + err = unpopulate(val, "HTTPMethod", &a.HTTPMethod) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &a.Headers) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &a.Parameters) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) + case "supportedGroupVersions": + err = unpopulate(val, "SupportedGroupVersions", &a.SupportedGroupVersions) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &a.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupFindRestorableTimeRangesResponse. +func (a AzureBackupFindRestorableTimeRangesResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "objectType", a.ObjectType) + populate(objectMap, "restorableTimeRanges", a.RestorableTimeRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupFindRestorableTimeRangesResponse. +func (a *AzureBackupFindRestorableTimeRangesResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "restorableTimeRanges": + err = unpopulate(val, "RestorableTimeRanges", &a.RestorableTimeRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupFindRestorableTimeRangesResponseResource. +func (a AzureBackupFindRestorableTimeRangesResponseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupFindRestorableTimeRangesResponseResource. +func (a *AzureBackupFindRestorableTimeRangesResponseResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupJob. +func (a AzureBackupJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activityID", a.ActivityID) + populate(objectMap, "backupInstanceFriendlyName", a.BackupInstanceFriendlyName) + populate(objectMap, "backupInstanceId", a.BackupInstanceID) + populate(objectMap, "dataSourceId", a.DataSourceID) + populate(objectMap, "dataSourceLocation", a.DataSourceLocation) + populate(objectMap, "dataSourceName", a.DataSourceName) + populate(objectMap, "dataSourceSetName", a.DataSourceSetName) + populate(objectMap, "dataSourceType", a.DataSourceType) + populate(objectMap, "destinationDataStoreName", a.DestinationDataStoreName) + populate(objectMap, "duration", a.Duration) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "errorDetails", a.ErrorDetails) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "isUserTriggered", a.IsUserTriggered) + populate(objectMap, "operation", a.Operation) + populate(objectMap, "operationCategory", a.OperationCategory) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "progressEnabled", a.ProgressEnabled) + populate(objectMap, "progressUrl", a.ProgressURL) + populate(objectMap, "rehydrationPriority", a.RehydrationPriority) + populate(objectMap, "restoreType", a.RestoreType) + populate(objectMap, "sourceDataStoreName", a.SourceDataStoreName) + populate(objectMap, "sourceResourceGroup", a.SourceResourceGroup) + populate(objectMap, "sourceSubscriptionID", a.SourceSubscriptionID) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) + populate(objectMap, "status", a.Status) + populate(objectMap, "subscriptionId", a.SubscriptionID) + populate(objectMap, "supportedActions", a.SupportedActions) + populate(objectMap, "vaultName", a.VaultName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupJob. +func (a *AzureBackupJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activityID": + err = unpopulate(val, "ActivityID", &a.ActivityID) + delete(rawMsg, key) + case "backupInstanceFriendlyName": + err = unpopulate(val, "BackupInstanceFriendlyName", &a.BackupInstanceFriendlyName) + delete(rawMsg, key) + case "backupInstanceId": + err = unpopulate(val, "BackupInstanceID", &a.BackupInstanceID) + delete(rawMsg, key) + case "dataSourceId": + err = unpopulate(val, "DataSourceID", &a.DataSourceID) + delete(rawMsg, key) + case "dataSourceLocation": + err = unpopulate(val, "DataSourceLocation", &a.DataSourceLocation) + delete(rawMsg, key) + case "dataSourceName": + err = unpopulate(val, "DataSourceName", &a.DataSourceName) + delete(rawMsg, key) + case "dataSourceSetName": + err = unpopulate(val, "DataSourceSetName", &a.DataSourceSetName) + delete(rawMsg, key) + case "dataSourceType": + err = unpopulate(val, "DataSourceType", &a.DataSourceType) + delete(rawMsg, key) + case "destinationDataStoreName": + err = unpopulate(val, "DestinationDataStoreName", &a.DestinationDataStoreName) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &a.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) + delete(rawMsg, key) + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "isUserTriggered": + err = unpopulate(val, "IsUserTriggered", &a.IsUserTriggered) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &a.Operation) + delete(rawMsg, key) + case "operationCategory": + err = unpopulate(val, "OperationCategory", &a.OperationCategory) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "progressEnabled": + err = unpopulate(val, "ProgressEnabled", &a.ProgressEnabled) + delete(rawMsg, key) + case "progressUrl": + err = unpopulate(val, "ProgressURL", &a.ProgressURL) + delete(rawMsg, key) + case "rehydrationPriority": + err = unpopulate(val, "RehydrationPriority", &a.RehydrationPriority) + delete(rawMsg, key) + case "restoreType": + err = unpopulate(val, "RestoreType", &a.RestoreType) + delete(rawMsg, key) + case "sourceDataStoreName": + err = unpopulate(val, "SourceDataStoreName", &a.SourceDataStoreName) + delete(rawMsg, key) + case "sourceResourceGroup": + err = unpopulate(val, "SourceResourceGroup", &a.SourceResourceGroup) + delete(rawMsg, key) + case "sourceSubscriptionID": + err = unpopulate(val, "SourceSubscriptionID", &a.SourceSubscriptionID) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) + case "supportedActions": + err = unpopulate(val, "SupportedActions", &a.SupportedActions) + delete(rawMsg, key) + case "vaultName": + err = unpopulate(val, "VaultName", &a.VaultName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupJobResource. +func (a AzureBackupJobResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupJobResource. +func (a *AzureBackupJobResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupJobResourceList. +func (a AzureBackupJobResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupJobResourceList. +func (a *AzureBackupJobResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupParams. +func (a AzureBackupParams) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupType", a.BackupType) + objectMap["objectType"] = "AzureBackupParams" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupParams. +func (a *AzureBackupParams) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupType": + err = unpopulate(val, "BackupType", &a.BackupType) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryPoint. +func (a AzureBackupRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = a.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryPoint. +func (a *AzureBackupRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryPointBasedRestoreRequest. +func (a AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identityDetails", a.IdentityDetails) + objectMap["objectType"] = "AzureBackupRecoveryPointBasedRestoreRequest" + populate(objectMap, "recoveryPointId", a.RecoveryPointID) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "restoreTargetInfo", a.RestoreTargetInfo) + populate(objectMap, "sourceDataStoreType", a.SourceDataStoreType) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryPointBasedRestoreRequest. +func (a *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityDetails": + err = unpopulate(val, "IdentityDetails", &a.IdentityDetails) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "restoreTargetInfo": + a.RestoreTargetInfo, err = unmarshalRestoreTargetInfoBaseClassification(val) + delete(rawMsg, key) + case "sourceDataStoreType": + err = unpopulate(val, "SourceDataStoreType", &a.SourceDataStoreType) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryPointResource. +func (a AzureBackupRecoveryPointResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryPointResource. +func (a *AzureBackupRecoveryPointResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + a.Properties, err = unmarshalAzureBackupRecoveryPointClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryPointResourceList. +func (a AzureBackupRecoveryPointResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryPointResourceList. +func (a *AzureBackupRecoveryPointResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryTimeBasedRestoreRequest. +func (a AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identityDetails", a.IdentityDetails) + objectMap["objectType"] = "AzureBackupRecoveryTimeBasedRestoreRequest" + populate(objectMap, "recoveryPointTime", a.RecoveryPointTime) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "restoreTargetInfo", a.RestoreTargetInfo) + populate(objectMap, "sourceDataStoreType", a.SourceDataStoreType) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryTimeBasedRestoreRequest. +func (a *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityDetails": + err = unpopulate(val, "IdentityDetails", &a.IdentityDetails) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointTime": + err = unpopulate(val, "RecoveryPointTime", &a.RecoveryPointTime) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "restoreTargetInfo": + a.RestoreTargetInfo, err = unmarshalRestoreTargetInfoBaseClassification(val) + delete(rawMsg, key) + case "sourceDataStoreType": + err = unpopulate(val, "SourceDataStoreType", &a.SourceDataStoreType) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupRehydrationRequest. +func (a AzureBackupRehydrationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recoveryPointId", a.RecoveryPointID) + populate(objectMap, "rehydrationPriority", a.RehydrationPriority) + populate(objectMap, "rehydrationRetentionDuration", a.RehydrationRetentionDuration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRehydrationRequest. +func (a *AzureBackupRehydrationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) + delete(rawMsg, key) + case "rehydrationPriority": + err = unpopulate(val, "RehydrationPriority", &a.RehydrationPriority) + delete(rawMsg, key) + case "rehydrationRetentionDuration": + err = unpopulate(val, "RehydrationRetentionDuration", &a.RehydrationRetentionDuration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupRestoreRequest. +func (a AzureBackupRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identityDetails", a.IdentityDetails) + objectMap["objectType"] = a.ObjectType + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "restoreTargetInfo", a.RestoreTargetInfo) + populate(objectMap, "sourceDataStoreType", a.SourceDataStoreType) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRestoreRequest. +func (a *AzureBackupRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityDetails": + err = unpopulate(val, "IdentityDetails", &a.IdentityDetails) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "restoreTargetInfo": + a.RestoreTargetInfo, err = unmarshalRestoreTargetInfoBaseClassification(val) + delete(rawMsg, key) + case "sourceDataStoreType": + err = unpopulate(val, "SourceDataStoreType", &a.SourceDataStoreType) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupRestoreWithRehydrationRequest. +func (a AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identityDetails", a.IdentityDetails) + objectMap["objectType"] = "AzureBackupRestoreWithRehydrationRequest" + populate(objectMap, "recoveryPointId", a.RecoveryPointID) + populate(objectMap, "rehydrationPriority", a.RehydrationPriority) + populate(objectMap, "rehydrationRetentionDuration", a.RehydrationRetentionDuration) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "restoreTargetInfo", a.RestoreTargetInfo) + populate(objectMap, "sourceDataStoreType", a.SourceDataStoreType) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRestoreWithRehydrationRequest. +func (a *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityDetails": + err = unpopulate(val, "IdentityDetails", &a.IdentityDetails) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) + delete(rawMsg, key) + case "rehydrationPriority": + err = unpopulate(val, "RehydrationPriority", &a.RehydrationPriority) + delete(rawMsg, key) + case "rehydrationRetentionDuration": + err = unpopulate(val, "RehydrationRetentionDuration", &a.RehydrationRetentionDuration) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "restoreTargetInfo": + a.RestoreTargetInfo, err = unmarshalRestoreTargetInfoBaseClassification(val) + delete(rawMsg, key) + case "sourceDataStoreType": + err = unpopulate(val, "SourceDataStoreType", &a.SourceDataStoreType) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupRule. +func (a AzureBackupRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupParameters", a.BackupParameters) + populate(objectMap, "dataStore", a.DataStore) + populate(objectMap, "name", a.Name) + objectMap["objectType"] = "AzureBackupRule" + populate(objectMap, "trigger", a.Trigger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRule. +func (a *AzureBackupRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupParameters": + a.BackupParameters, err = unmarshalBackupParametersClassification(val) + delete(rawMsg, key) + case "dataStore": + err = unpopulate(val, "DataStore", &a.DataStore) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "trigger": + a.Trigger, err = unmarshalTriggerContextClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureMonitorAlertSettings. +func (a AzureMonitorAlertSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alertsForAllJobFailures", a.AlertsForAllJobFailures) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureMonitorAlertSettings. +func (a *AzureMonitorAlertSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alertsForAllJobFailures": + err = unpopulate(val, "AlertsForAllJobFailures", &a.AlertsForAllJobFailures) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureOperationalStoreParameters. +func (a AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataStoreType", a.DataStoreType) + objectMap["objectType"] = "AzureOperationalStoreParameters" + populate(objectMap, "resourceGroupId", a.ResourceGroupID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureOperationalStoreParameters. +func (a *AzureOperationalStoreParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataStoreType": + err = unpopulate(val, "DataStoreType", &a.DataStoreType) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "resourceGroupId": + err = unpopulate(val, "ResourceGroupID", &a.ResourceGroupID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureRetentionRule. +func (a AzureRetentionRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isDefault", a.IsDefault) + populate(objectMap, "lifecycles", a.Lifecycles) + populate(objectMap, "name", a.Name) + objectMap["objectType"] = "AzureRetentionRule" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureRetentionRule. +func (a *AzureRetentionRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isDefault": + err = unpopulate(val, "IsDefault", &a.IsDefault) + delete(rawMsg, key) + case "lifecycles": + err = unpopulate(val, "Lifecycles", &a.Lifecycles) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupCriteria. +func (b BackupCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = b.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupCriteria. +func (b *BackupCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &b.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupDatasourceParameters. +func (b BackupDatasourceParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = b.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupDatasourceParameters. +func (b *BackupDatasourceParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &b.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupInstance. +func (b BackupInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentProtectionState", b.CurrentProtectionState) + populate(objectMap, "dataSourceInfo", b.DataSourceInfo) + populate(objectMap, "dataSourceSetInfo", b.DataSourceSetInfo) + populate(objectMap, "datasourceAuthCredentials", b.DatasourceAuthCredentials) + populate(objectMap, "friendlyName", b.FriendlyName) + populate(objectMap, "identityDetails", b.IdentityDetails) + populate(objectMap, "objectType", b.ObjectType) + populate(objectMap, "policyInfo", b.PolicyInfo) + populate(objectMap, "protectionErrorDetails", b.ProtectionErrorDetails) + populate(objectMap, "protectionStatus", b.ProtectionStatus) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "resourceGuardOperationRequests", b.ResourceGuardOperationRequests) + populate(objectMap, "validationType", b.ValidationType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupInstance. +func (b *BackupInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentProtectionState": + err = unpopulate(val, "CurrentProtectionState", &b.CurrentProtectionState) + delete(rawMsg, key) + case "dataSourceInfo": + err = unpopulate(val, "DataSourceInfo", &b.DataSourceInfo) + delete(rawMsg, key) + case "dataSourceSetInfo": + err = unpopulate(val, "DataSourceSetInfo", &b.DataSourceSetInfo) + delete(rawMsg, key) + case "datasourceAuthCredentials": + b.DatasourceAuthCredentials, err = unmarshalAuthCredentialsClassification(val) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &b.FriendlyName) + delete(rawMsg, key) + case "identityDetails": + err = unpopulate(val, "IdentityDetails", &b.IdentityDetails) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &b.ObjectType) + delete(rawMsg, key) + case "policyInfo": + err = unpopulate(val, "PolicyInfo", &b.PolicyInfo) + delete(rawMsg, key) + case "protectionErrorDetails": + err = unpopulate(val, "ProtectionErrorDetails", &b.ProtectionErrorDetails) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &b.ProtectionStatus) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &b.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "validationType": + err = unpopulate(val, "ValidationType", &b.ValidationType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupInstanceResource. +func (b BackupInstanceResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupInstanceResource. +func (b *BackupInstanceResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupInstanceResourceList. +func (b BackupInstanceResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupInstanceResourceList. +func (b *BackupInstanceResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupParameters. +func (b BackupParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = b.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupParameters. +func (b *BackupParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &b.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupPolicy. +func (b BackupPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datasourceTypes", b.DatasourceTypes) + objectMap["objectType"] = "BackupPolicy" + populate(objectMap, "policyRules", b.PolicyRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupPolicy. +func (b *BackupPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datasourceTypes": + err = unpopulate(val, "DatasourceTypes", &b.DatasourceTypes) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &b.ObjectType) + delete(rawMsg, key) + case "policyRules": + b.PolicyRules, err = unmarshalBasePolicyRuleClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupSchedule. +func (b BackupSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "repeatingTimeIntervals", b.RepeatingTimeIntervals) + populate(objectMap, "timeZone", b.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupSchedule. +func (b *BackupSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "repeatingTimeIntervals": + err = unpopulate(val, "RepeatingTimeIntervals", &b.RepeatingTimeIntervals) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &b.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupVault. +func (b BackupVault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bcdrSecurityLevel", b.BcdrSecurityLevel) + populate(objectMap, "featureSettings", b.FeatureSettings) + populate(objectMap, "isVaultProtectedByResourceGuard", b.IsVaultProtectedByResourceGuard) + populate(objectMap, "monitoringSettings", b.MonitoringSettings) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "replicatedRegions", b.ReplicatedRegions) + populate(objectMap, "resourceGuardOperationRequests", b.ResourceGuardOperationRequests) + populate(objectMap, "resourceMoveDetails", b.ResourceMoveDetails) + populate(objectMap, "resourceMoveState", b.ResourceMoveState) + populate(objectMap, "secureScore", b.SecureScore) + populate(objectMap, "securitySettings", b.SecuritySettings) + populate(objectMap, "storageSettings", b.StorageSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupVault. +func (b *BackupVault) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bcdrSecurityLevel": + err = unpopulate(val, "BcdrSecurityLevel", &b.BcdrSecurityLevel) + delete(rawMsg, key) + case "featureSettings": + err = unpopulate(val, "FeatureSettings", &b.FeatureSettings) + delete(rawMsg, key) + case "isVaultProtectedByResourceGuard": + err = unpopulate(val, "IsVaultProtectedByResourceGuard", &b.IsVaultProtectedByResourceGuard) + delete(rawMsg, key) + case "monitoringSettings": + err = unpopulate(val, "MonitoringSettings", &b.MonitoringSettings) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "replicatedRegions": + err = unpopulate(val, "ReplicatedRegions", &b.ReplicatedRegions) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &b.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "resourceMoveDetails": + err = unpopulate(val, "ResourceMoveDetails", &b.ResourceMoveDetails) + delete(rawMsg, key) + case "resourceMoveState": + err = unpopulate(val, "ResourceMoveState", &b.ResourceMoveState) + delete(rawMsg, key) + case "secureScore": + err = unpopulate(val, "SecureScore", &b.SecureScore) + delete(rawMsg, key) + case "securitySettings": + err = unpopulate(val, "SecuritySettings", &b.SecuritySettings) + delete(rawMsg, key) + case "storageSettings": + err = unpopulate(val, "StorageSettings", &b.StorageSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupVaultResource. +func (b BackupVaultResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", b.ETag) + populate(objectMap, "id", b.ID) + populate(objectMap, "identity", b.Identity) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupVaultResource. +func (b *BackupVaultResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &b.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &b.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupVaultResourceList. +func (b BackupVaultResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupVaultResourceList. +func (b *BackupVaultResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BaseBackupPolicy. +func (b BaseBackupPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datasourceTypes", b.DatasourceTypes) + objectMap["objectType"] = b.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BaseBackupPolicy. +func (b *BaseBackupPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datasourceTypes": + err = unpopulate(val, "DatasourceTypes", &b.DatasourceTypes) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &b.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BaseBackupPolicyResource. +func (b BaseBackupPolicyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BaseBackupPolicyResource. +func (b *BaseBackupPolicyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + b.Properties, err = unmarshalBaseBackupPolicyClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BaseBackupPolicyResourceList. +func (b BaseBackupPolicyResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BaseBackupPolicyResourceList. +func (b *BaseBackupPolicyResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BasePolicyRule. +func (b BasePolicyRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", b.Name) + objectMap["objectType"] = b.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BasePolicyRule. +func (b *BasePolicyRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &b.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BaseResourceProperties. +func (b BaseResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = b.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BaseResourceProperties. +func (b *BaseResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &b.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BlobBackupDatasourceParameters. +func (b BlobBackupDatasourceParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containersList", b.ContainersList) + objectMap["objectType"] = "BlobBackupDatasourceParameters" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BlobBackupDatasourceParameters. +func (b *BlobBackupDatasourceParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containersList": + err = unpopulate(val, "ContainersList", &b.ContainersList) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &b.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest. +func (c CheckNameAvailabilityRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest. +func (c *CheckNameAvailabilityRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult. +func (c CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", c.Message) + populate(objectMap, "nameAvailable", c.NameAvailable) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult. +func (c *CheckNameAvailabilityResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &c.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryDisplay. +func (c ClientDiscoveryDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", c.Description) + populate(objectMap, "operation", c.Operation) + populate(objectMap, "provider", c.Provider) + populate(objectMap, "resource", c.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryDisplay. +func (c *ClientDiscoveryDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &c.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &c.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &c.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryForLogSpecification. +func (c ClientDiscoveryForLogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", c.BlobDuration) + populate(objectMap, "displayName", c.DisplayName) + populate(objectMap, "name", c.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryForLogSpecification. +func (c *ClientDiscoveryForLogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &c.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &c.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryForProperties. +func (c ClientDiscoveryForProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", c.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryForProperties. +func (c *ClientDiscoveryForProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &c.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryForServiceSpecification. +func (c ClientDiscoveryForServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", c.LogSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryForServiceSpecification. +func (c *ClientDiscoveryForServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &c.LogSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryResponse. +func (c ClientDiscoveryResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryResponse. +func (c *ClientDiscoveryResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryValueForSingleAPI. +func (c ClientDiscoveryValueForSingleAPI) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", c.Display) + populate(objectMap, "isDataAction", c.IsDataAction) + populate(objectMap, "name", c.Name) + populate(objectMap, "origin", c.Origin) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryValueForSingleAPI. +func (c *ClientDiscoveryValueForSingleAPI) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &c.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &c.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &c.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CmkKekIdentity. +func (c CmkKekIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identityId", c.IdentityID) + populate(objectMap, "identityType", c.IdentityType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CmkKekIdentity. +func (c *CmkKekIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityId": + err = unpopulate(val, "IdentityID", &c.IdentityID) + delete(rawMsg, key) + case "identityType": + err = unpopulate(val, "IdentityType", &c.IdentityType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CmkKeyVaultProperties. +func (c CmkKeyVaultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyUri", c.KeyURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CmkKeyVaultProperties. +func (c *CmkKeyVaultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyUri": + err = unpopulate(val, "KeyURI", &c.KeyURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CopyOnExpiryOption. +func (c CopyOnExpiryOption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "CopyOnExpiryOption" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CopyOnExpiryOption. +func (c *CopyOnExpiryOption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &c.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CopyOption. +func (c CopyOption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = c.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CopyOption. +func (c *CopyOption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &c.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CrossRegionRestoreDetails. +func (c CrossRegionRestoreDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sourceBackupInstanceId", c.SourceBackupInstanceID) + populate(objectMap, "sourceRegion", c.SourceRegion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CrossRegionRestoreDetails. +func (c *CrossRegionRestoreDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sourceBackupInstanceId": + err = unpopulate(val, "SourceBackupInstanceID", &c.SourceBackupInstanceID) + delete(rawMsg, key) + case "sourceRegion": + err = unpopulate(val, "SourceRegion", &c.SourceRegion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CrossRegionRestoreJobRequest. +func (c CrossRegionRestoreJobRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobId", c.JobID) + populate(objectMap, "sourceBackupVaultId", c.SourceBackupVaultID) + populate(objectMap, "sourceRegion", c.SourceRegion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CrossRegionRestoreJobRequest. +func (c *CrossRegionRestoreJobRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobId": + err = unpopulate(val, "JobID", &c.JobID) + delete(rawMsg, key) + case "sourceBackupVaultId": + err = unpopulate(val, "SourceBackupVaultID", &c.SourceBackupVaultID) + delete(rawMsg, key) + case "sourceRegion": + err = unpopulate(val, "SourceRegion", &c.SourceRegion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CrossRegionRestoreJobsRequest. +func (c CrossRegionRestoreJobsRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sourceBackupVaultId", c.SourceBackupVaultID) + populate(objectMap, "sourceRegion", c.SourceRegion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CrossRegionRestoreJobsRequest. +func (c *CrossRegionRestoreJobsRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sourceBackupVaultId": + err = unpopulate(val, "SourceBackupVaultID", &c.SourceBackupVaultID) + delete(rawMsg, key) + case "sourceRegion": + err = unpopulate(val, "SourceRegion", &c.SourceRegion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CrossRegionRestoreRequestObject. +func (c CrossRegionRestoreRequestObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "crossRegionRestoreDetails", c.CrossRegionRestoreDetails) + populate(objectMap, "restoreRequestObject", c.RestoreRequestObject) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CrossRegionRestoreRequestObject. +func (c *CrossRegionRestoreRequestObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "crossRegionRestoreDetails": + err = unpopulate(val, "CrossRegionRestoreDetails", &c.CrossRegionRestoreDetails) + delete(rawMsg, key) + case "restoreRequestObject": + c.RestoreRequestObject, err = unmarshalAzureBackupRestoreRequestClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CrossRegionRestoreSettings. +func (c CrossRegionRestoreSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", c.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CrossRegionRestoreSettings. +func (c *CrossRegionRestoreSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &c.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CrossSubscriptionRestoreSettings. +func (c CrossSubscriptionRestoreSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", c.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CrossSubscriptionRestoreSettings. +func (c *CrossSubscriptionRestoreSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &c.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomCopyOption. +func (c CustomCopyOption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "duration", c.Duration) + objectMap["objectType"] = "CustomCopyOption" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomCopyOption. +func (c *CustomCopyOption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "duration": + err = unpopulate(val, "Duration", &c.Duration) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &c.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataStoreInfoBase. +func (d DataStoreInfoBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataStoreType", d.DataStoreType) + populate(objectMap, "objectType", d.ObjectType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataStoreInfoBase. +func (d *DataStoreInfoBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataStoreType": + err = unpopulate(val, "DataStoreType", &d.DataStoreType) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &d.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataStoreParameters. +func (d DataStoreParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataStoreType", d.DataStoreType) + objectMap["objectType"] = d.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataStoreParameters. +func (d *DataStoreParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataStoreType": + err = unpopulate(val, "DataStoreType", &d.DataStoreType) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &d.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Datasource. +func (d Datasource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datasourceType", d.DatasourceType) + populate(objectMap, "objectType", d.ObjectType) + populate(objectMap, "resourceID", d.ResourceID) + populate(objectMap, "resourceLocation", d.ResourceLocation) + populate(objectMap, "resourceName", d.ResourceName) + populate(objectMap, "resourceProperties", d.ResourceProperties) + populate(objectMap, "resourceType", d.ResourceType) + populate(objectMap, "resourceUri", d.ResourceURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Datasource. +func (d *Datasource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datasourceType": + err = unpopulate(val, "DatasourceType", &d.DatasourceType) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &d.ObjectType) + delete(rawMsg, key) + case "resourceID": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + case "resourceLocation": + err = unpopulate(val, "ResourceLocation", &d.ResourceLocation) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &d.ResourceName) + delete(rawMsg, key) + case "resourceProperties": + d.ResourceProperties, err = unmarshalBaseResourcePropertiesClassification(val) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &d.ResourceType) + delete(rawMsg, key) + case "resourceUri": + err = unpopulate(val, "ResourceURI", &d.ResourceURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatasourceSet. +func (d DatasourceSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datasourceType", d.DatasourceType) + populate(objectMap, "objectType", d.ObjectType) + populate(objectMap, "resourceID", d.ResourceID) + populate(objectMap, "resourceLocation", d.ResourceLocation) + populate(objectMap, "resourceName", d.ResourceName) + populate(objectMap, "resourceProperties", d.ResourceProperties) + populate(objectMap, "resourceType", d.ResourceType) + populate(objectMap, "resourceUri", d.ResourceURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatasourceSet. +func (d *DatasourceSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datasourceType": + err = unpopulate(val, "DatasourceType", &d.DatasourceType) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &d.ObjectType) + delete(rawMsg, key) + case "resourceID": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + case "resourceLocation": + err = unpopulate(val, "ResourceLocation", &d.ResourceLocation) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &d.ResourceName) + delete(rawMsg, key) + case "resourceProperties": + d.ResourceProperties, err = unmarshalBaseResourcePropertiesClassification(val) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &d.ResourceType) + delete(rawMsg, key) + case "resourceUri": + err = unpopulate(val, "ResourceURI", &d.ResourceURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Day. +func (d Day) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "date", d.Date) + populate(objectMap, "isLast", d.IsLast) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Day. +func (d *Day) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "date": + err = unpopulate(val, "Date", &d.Date) + delete(rawMsg, key) + case "isLast": + err = unpopulate(val, "IsLast", &d.IsLast) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultResourceProperties. +func (d DefaultResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = ResourcePropertiesObjectTypeDefaultResourceProperties + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultResourceProperties. +func (d *DefaultResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &d.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeleteOption. +func (d DeleteOption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "duration", d.Duration) + objectMap["objectType"] = d.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeleteOption. +func (d *DeleteOption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "duration": + err = unpopulate(val, "Duration", &d.Duration) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &d.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedBackupInstance. +func (d DeletedBackupInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentProtectionState", d.CurrentProtectionState) + populate(objectMap, "dataSourceInfo", d.DataSourceInfo) + populate(objectMap, "dataSourceSetInfo", d.DataSourceSetInfo) + populate(objectMap, "datasourceAuthCredentials", d.DatasourceAuthCredentials) + populate(objectMap, "deletionInfo", d.DeletionInfo) + populate(objectMap, "friendlyName", d.FriendlyName) + populate(objectMap, "identityDetails", d.IdentityDetails) + populate(objectMap, "objectType", d.ObjectType) + populate(objectMap, "policyInfo", d.PolicyInfo) + populate(objectMap, "protectionErrorDetails", d.ProtectionErrorDetails) + populate(objectMap, "protectionStatus", d.ProtectionStatus) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "resourceGuardOperationRequests", d.ResourceGuardOperationRequests) + populate(objectMap, "validationType", d.ValidationType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedBackupInstance. +func (d *DeletedBackupInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentProtectionState": + err = unpopulate(val, "CurrentProtectionState", &d.CurrentProtectionState) + delete(rawMsg, key) + case "dataSourceInfo": + err = unpopulate(val, "DataSourceInfo", &d.DataSourceInfo) + delete(rawMsg, key) + case "dataSourceSetInfo": + err = unpopulate(val, "DataSourceSetInfo", &d.DataSourceSetInfo) + delete(rawMsg, key) + case "datasourceAuthCredentials": + d.DatasourceAuthCredentials, err = unmarshalAuthCredentialsClassification(val) + delete(rawMsg, key) + case "deletionInfo": + err = unpopulate(val, "DeletionInfo", &d.DeletionInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &d.FriendlyName) + delete(rawMsg, key) + case "identityDetails": + err = unpopulate(val, "IdentityDetails", &d.IdentityDetails) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &d.ObjectType) + delete(rawMsg, key) + case "policyInfo": + err = unpopulate(val, "PolicyInfo", &d.PolicyInfo) + delete(rawMsg, key) + case "protectionErrorDetails": + err = unpopulate(val, "ProtectionErrorDetails", &d.ProtectionErrorDetails) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &d.ProtectionStatus) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &d.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "validationType": + err = unpopulate(val, "ValidationType", &d.ValidationType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedBackupInstanceResource. +func (d DeletedBackupInstanceResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedBackupInstanceResource. +func (d *DeletedBackupInstanceResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletedBackupInstanceResourceList. +func (d DeletedBackupInstanceResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedBackupInstanceResourceList. +func (d *DeletedBackupInstanceResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeletionInfo. +func (d DeletionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "billingEndDate", d.BillingEndDate) + populate(objectMap, "deleteActivityID", d.DeleteActivityID) + populate(objectMap, "deletionTime", d.DeletionTime) + populate(objectMap, "scheduledPurgeTime", d.ScheduledPurgeTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletionInfo. +func (d *DeletionInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "billingEndDate": + err = unpopulate(val, "BillingEndDate", &d.BillingEndDate) + delete(rawMsg, key) + case "deleteActivityID": + err = unpopulate(val, "DeleteActivityID", &d.DeleteActivityID) + delete(rawMsg, key) + case "deletionTime": + err = unpopulate(val, "DeletionTime", &d.DeletionTime) + delete(rawMsg, key) + case "scheduledPurgeTime": + err = unpopulate(val, "ScheduledPurgeTime", &d.ScheduledPurgeTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DppBaseResource. +func (d DppBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DppBaseResource. +func (d *DppBaseResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DppBaseResourceList. +func (d DppBaseResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DppBaseResourceList. +func (d *DppBaseResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DppBaseTrackedResource. +func (d DppBaseTrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", d.ETag) + populate(objectMap, "id", d.ID) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DppBaseTrackedResource. +func (d *DppBaseTrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &d.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DppIdentityDetails. +func (d DppIdentityDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", d.PrincipalID) + populate(objectMap, "tenantId", d.TenantID) + populate(objectMap, "type", d.Type) + populate(objectMap, "userAssignedIdentities", d.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DppIdentityDetails. +func (d *DppIdentityDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &d.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &d.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &d.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DppProxyResource. +func (d DppProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DppProxyResource. +func (d *DppProxyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DppResource. +func (d DppResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DppResource. +func (d *DppResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DppResourceList. +func (d DppResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DppResourceList. +func (d *DppResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DppTrackedResource. +func (d DppTrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", d.ETag) + populate(objectMap, "id", d.ID) + populate(objectMap, "identity", d.Identity) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DppTrackedResource. +func (d *DppTrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &d.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &d.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DppTrackedResourceList. +func (d DppTrackedResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DppTrackedResourceList. +func (d *DppTrackedResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DppWorkerRequest. +func (d DppWorkerRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cultureInfo", d.CultureInfo) + populate(objectMap, "httpMethod", d.HTTPMethod) + populate(objectMap, "headers", d.Headers) + populate(objectMap, "parameters", d.Parameters) + populate(objectMap, "subscriptionId", d.SubscriptionID) + populate(objectMap, "supportedGroupVersions", d.SupportedGroupVersions) + populate(objectMap, "uri", d.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DppWorkerRequest. +func (d *DppWorkerRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cultureInfo": + err = unpopulate(val, "CultureInfo", &d.CultureInfo) + delete(rawMsg, key) + case "httpMethod": + err = unpopulate(val, "HTTPMethod", &d.HTTPMethod) + delete(rawMsg, key) + case "headers": + err = unpopulate(val, "Headers", &d.Headers) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &d.Parameters) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &d.SubscriptionID) + delete(rawMsg, key) + case "supportedGroupVersions": + err = unpopulate(val, "SupportedGroupVersions", &d.SupportedGroupVersions) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &d.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionSettings. +func (e EncryptionSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "infrastructureEncryption", e.InfrastructureEncryption) + populate(objectMap, "kekIdentity", e.KekIdentity) + populate(objectMap, "keyVaultProperties", e.KeyVaultProperties) + populate(objectMap, "state", e.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionSettings. +func (e *EncryptionSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "infrastructureEncryption": + err = unpopulate(val, "InfrastructureEncryption", &e.InfrastructureEncryption) + delete(rawMsg, key) + case "kekIdentity": + err = unpopulate(val, "KekIdentity", &e.KekIdentity) + delete(rawMsg, key) + case "keyVaultProperties": + err = unpopulate(val, "KeyVaultProperties", &e.KeyVaultProperties) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Error. +func (e Error) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", e.AdditionalInfo) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Error. +func (e *Error) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. +func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "info", e.Info) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. +func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "info": + err = unpopulate(val, "Info", &e.Info) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. +func (e ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", e.AdditionalInfo) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. +func (e *ErrorDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. +func (e *ErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExportJobsResult. +func (e ExportJobsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobSasKey", e.BlobSasKey) + populate(objectMap, "blobUrl", e.BlobURL) + populate(objectMap, "excelFileBlobSasKey", e.ExcelFileBlobSasKey) + populate(objectMap, "excelFileBlobUrl", e.ExcelFileBlobURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExportJobsResult. +func (e *ExportJobsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobSasKey": + err = unpopulate(val, "BlobSasKey", &e.BlobSasKey) + delete(rawMsg, key) + case "blobUrl": + err = unpopulate(val, "BlobURL", &e.BlobURL) + delete(rawMsg, key) + case "excelFileBlobSasKey": + err = unpopulate(val, "ExcelFileBlobSasKey", &e.ExcelFileBlobSasKey) + delete(rawMsg, key) + case "excelFileBlobUrl": + err = unpopulate(val, "ExcelFileBlobURL", &e.ExcelFileBlobURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeatureSettings. +func (f FeatureSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "crossRegionRestoreSettings", f.CrossRegionRestoreSettings) + populate(objectMap, "crossSubscriptionRestoreSettings", f.CrossSubscriptionRestoreSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureSettings. +func (f *FeatureSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "crossRegionRestoreSettings": + err = unpopulate(val, "CrossRegionRestoreSettings", &f.CrossRegionRestoreSettings) + delete(rawMsg, key) + case "crossSubscriptionRestoreSettings": + err = unpopulate(val, "CrossSubscriptionRestoreSettings", &f.CrossSubscriptionRestoreSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeatureValidationRequest. +func (f FeatureValidationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "featureName", f.FeatureName) + populate(objectMap, "featureType", f.FeatureType) + objectMap["objectType"] = "FeatureValidationRequest" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureValidationRequest. +func (f *FeatureValidationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featureName": + err = unpopulate(val, "FeatureName", &f.FeatureName) + delete(rawMsg, key) + case "featureType": + err = unpopulate(val, "FeatureType", &f.FeatureType) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &f.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeatureValidationRequestBase. +func (f FeatureValidationRequestBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = f.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureValidationRequestBase. +func (f *FeatureValidationRequestBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &f.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeatureValidationResponse. +func (f FeatureValidationResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "featureType", f.FeatureType) + populate(objectMap, "features", f.Features) + objectMap["objectType"] = "FeatureValidationResponse" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureValidationResponse. +func (f *FeatureValidationResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featureType": + err = unpopulate(val, "FeatureType", &f.FeatureType) + delete(rawMsg, key) + case "features": + err = unpopulate(val, "Features", &f.Features) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &f.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeatureValidationResponseBase. +func (f FeatureValidationResponseBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = f.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureValidationResponseBase. +func (f *FeatureValidationResponseBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &f.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FetchSecondaryRPsRequestParameters. +func (f FetchSecondaryRPsRequestParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sourceBackupInstanceId", f.SourceBackupInstanceID) + populate(objectMap, "sourceRegion", f.SourceRegion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FetchSecondaryRPsRequestParameters. +func (f *FetchSecondaryRPsRequestParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sourceBackupInstanceId": + err = unpopulate(val, "SourceBackupInstanceID", &f.SourceBackupInstanceID) + delete(rawMsg, key) + case "sourceRegion": + err = unpopulate(val, "SourceRegion", &f.SourceRegion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityDetails. +func (i IdentityDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "useSystemAssignedIdentity", i.UseSystemAssignedIdentity) + populate(objectMap, "userAssignedIdentityArmUrl", i.UserAssignedIdentityArmURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityDetails. +func (i *IdentityDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "useSystemAssignedIdentity": + err = unpopulate(val, "UseSystemAssignedIdentity", &i.UseSystemAssignedIdentity) + delete(rawMsg, key) + case "userAssignedIdentityArmUrl": + err = unpopulate(val, "UserAssignedIdentityArmURL", &i.UserAssignedIdentityArmURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImmediateCopyOption. +func (i ImmediateCopyOption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "ImmediateCopyOption" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImmediateCopyOption. +func (i *ImmediateCopyOption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImmutabilitySettings. +func (i ImmutabilitySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", i.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImmutabilitySettings. +func (i *ImmutabilitySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &i.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InnerError. +func (i InnerError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", i.AdditionalInfo) + populate(objectMap, "code", i.Code) + populate(objectMap, "embeddedInnerError", i.EmbeddedInnerError) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InnerError. +func (i *InnerError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &i.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &i.Code) + delete(rawMsg, key) + case "embeddedInnerError": + err = unpopulate(val, "EmbeddedInnerError", &i.EmbeddedInnerError) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ItemLevelRestoreCriteria. +func (i ItemLevelRestoreCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = i.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ItemLevelRestoreCriteria. +func (i *ItemLevelRestoreCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ItemLevelRestoreTargetInfo. +func (i ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datasourceAuthCredentials", i.DatasourceAuthCredentials) + populate(objectMap, "datasourceInfo", i.DatasourceInfo) + populate(objectMap, "datasourceSetInfo", i.DatasourceSetInfo) + objectMap["objectType"] = "ItemLevelRestoreTargetInfo" + populate(objectMap, "recoveryOption", i.RecoveryOption) + populate(objectMap, "restoreCriteria", i.RestoreCriteria) + populate(objectMap, "restoreLocation", i.RestoreLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ItemLevelRestoreTargetInfo. +func (i *ItemLevelRestoreTargetInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datasourceAuthCredentials": + i.DatasourceAuthCredentials, err = unmarshalAuthCredentialsClassification(val) + delete(rawMsg, key) + case "datasourceInfo": + err = unpopulate(val, "DatasourceInfo", &i.DatasourceInfo) + delete(rawMsg, key) + case "datasourceSetInfo": + err = unpopulate(val, "DatasourceSetInfo", &i.DatasourceSetInfo) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + case "recoveryOption": + err = unpopulate(val, "RecoveryOption", &i.RecoveryOption) + delete(rawMsg, key) + case "restoreCriteria": + i.RestoreCriteria, err = unmarshalItemLevelRestoreCriteriaClassificationArray(val) + delete(rawMsg, key) + case "restoreLocation": + err = unpopulate(val, "RestoreLocation", &i.RestoreLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ItemPathBasedRestoreCriteria. +func (i ItemPathBasedRestoreCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isPathRelativeToBackupItem", i.IsPathRelativeToBackupItem) + populate(objectMap, "itemPath", i.ItemPath) + objectMap["objectType"] = "ItemPathBasedRestoreCriteria" + populate(objectMap, "subItemPathPrefix", i.SubItemPathPrefix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ItemPathBasedRestoreCriteria. +func (i *ItemPathBasedRestoreCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isPathRelativeToBackupItem": + err = unpopulate(val, "IsPathRelativeToBackupItem", &i.IsPathRelativeToBackupItem) + delete(rawMsg, key) + case "itemPath": + err = unpopulate(val, "ItemPath", &i.ItemPath) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + case "subItemPathPrefix": + err = unpopulate(val, "SubItemPathPrefix", &i.SubItemPathPrefix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobExtendedInfo. +func (j JobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalDetails", j.AdditionalDetails) + populate(objectMap, "backupInstanceState", j.BackupInstanceState) + populate(objectMap, "dataTransferredInBytes", j.DataTransferredInBytes) + populate(objectMap, "recoveryDestination", j.RecoveryDestination) + populate(objectMap, "sourceRecoverPoint", j.SourceRecoverPoint) + populate(objectMap, "subTasks", j.SubTasks) + populate(objectMap, "targetRecoverPoint", j.TargetRecoverPoint) + populate(objectMap, "warningDetails", j.WarningDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobExtendedInfo. +func (j *JobExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalDetails": + err = unpopulate(val, "AdditionalDetails", &j.AdditionalDetails) + delete(rawMsg, key) + case "backupInstanceState": + err = unpopulate(val, "BackupInstanceState", &j.BackupInstanceState) + delete(rawMsg, key) + case "dataTransferredInBytes": + err = unpopulate(val, "DataTransferredInBytes", &j.DataTransferredInBytes) + delete(rawMsg, key) + case "recoveryDestination": + err = unpopulate(val, "RecoveryDestination", &j.RecoveryDestination) + delete(rawMsg, key) + case "sourceRecoverPoint": + err = unpopulate(val, "SourceRecoverPoint", &j.SourceRecoverPoint) + delete(rawMsg, key) + case "subTasks": + err = unpopulate(val, "SubTasks", &j.SubTasks) + delete(rawMsg, key) + case "targetRecoverPoint": + err = unpopulate(val, "TargetRecoverPoint", &j.TargetRecoverPoint) + delete(rawMsg, key) + case "warningDetails": + err = unpopulate(val, "WarningDetails", &j.WarningDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobSubTask. +func (j JobSubTask) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalDetails", j.AdditionalDetails) + populate(objectMap, "taskId", j.TaskID) + populate(objectMap, "taskName", j.TaskName) + populate(objectMap, "taskProgress", j.TaskProgress) + populate(objectMap, "taskStatus", j.TaskStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobSubTask. +func (j *JobSubTask) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalDetails": + err = unpopulate(val, "AdditionalDetails", &j.AdditionalDetails) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &j.TaskID) + delete(rawMsg, key) + case "taskName": + err = unpopulate(val, "TaskName", &j.TaskName) + delete(rawMsg, key) + case "taskProgress": + err = unpopulate(val, "TaskProgress", &j.TaskProgress) + delete(rawMsg, key) + case "taskStatus": + err = unpopulate(val, "TaskStatus", &j.TaskStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterBackupDatasourceParameters. +func (k KubernetesClusterBackupDatasourceParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupHookReferences", k.BackupHookReferences) + populate(objectMap, "excludedNamespaces", k.ExcludedNamespaces) + populate(objectMap, "excludedResourceTypes", k.ExcludedResourceTypes) + populate(objectMap, "includeClusterScopeResources", k.IncludeClusterScopeResources) + populate(objectMap, "includedNamespaces", k.IncludedNamespaces) + populate(objectMap, "includedResourceTypes", k.IncludedResourceTypes) + populate(objectMap, "labelSelectors", k.LabelSelectors) + objectMap["objectType"] = "KubernetesClusterBackupDatasourceParameters" + populate(objectMap, "snapshotVolumes", k.SnapshotVolumes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterBackupDatasourceParameters. +func (k *KubernetesClusterBackupDatasourceParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupHookReferences": + err = unpopulate(val, "BackupHookReferences", &k.BackupHookReferences) + delete(rawMsg, key) + case "excludedNamespaces": + err = unpopulate(val, "ExcludedNamespaces", &k.ExcludedNamespaces) + delete(rawMsg, key) + case "excludedResourceTypes": + err = unpopulate(val, "ExcludedResourceTypes", &k.ExcludedResourceTypes) + delete(rawMsg, key) + case "includeClusterScopeResources": + err = unpopulate(val, "IncludeClusterScopeResources", &k.IncludeClusterScopeResources) + delete(rawMsg, key) + case "includedNamespaces": + err = unpopulate(val, "IncludedNamespaces", &k.IncludedNamespaces) + delete(rawMsg, key) + case "includedResourceTypes": + err = unpopulate(val, "IncludedResourceTypes", &k.IncludedResourceTypes) + delete(rawMsg, key) + case "labelSelectors": + err = unpopulate(val, "LabelSelectors", &k.LabelSelectors) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &k.ObjectType) + delete(rawMsg, key) + case "snapshotVolumes": + err = unpopulate(val, "SnapshotVolumes", &k.SnapshotVolumes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterRestoreCriteria. +func (k KubernetesClusterRestoreCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "conflictPolicy", k.ConflictPolicy) + populate(objectMap, "excludedNamespaces", k.ExcludedNamespaces) + populate(objectMap, "excludedResourceTypes", k.ExcludedResourceTypes) + populate(objectMap, "includeClusterScopeResources", k.IncludeClusterScopeResources) + populate(objectMap, "includedNamespaces", k.IncludedNamespaces) + populate(objectMap, "includedResourceTypes", k.IncludedResourceTypes) + populate(objectMap, "labelSelectors", k.LabelSelectors) + populate(objectMap, "namespaceMappings", k.NamespaceMappings) + objectMap["objectType"] = "KubernetesClusterRestoreCriteria" + populate(objectMap, "persistentVolumeRestoreMode", k.PersistentVolumeRestoreMode) + populate(objectMap, "resourceModifierReference", k.ResourceModifierReference) + populate(objectMap, "restoreHookReferences", k.RestoreHookReferences) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterRestoreCriteria. +func (k *KubernetesClusterRestoreCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "conflictPolicy": + err = unpopulate(val, "ConflictPolicy", &k.ConflictPolicy) + delete(rawMsg, key) + case "excludedNamespaces": + err = unpopulate(val, "ExcludedNamespaces", &k.ExcludedNamespaces) + delete(rawMsg, key) + case "excludedResourceTypes": + err = unpopulate(val, "ExcludedResourceTypes", &k.ExcludedResourceTypes) + delete(rawMsg, key) + case "includeClusterScopeResources": + err = unpopulate(val, "IncludeClusterScopeResources", &k.IncludeClusterScopeResources) + delete(rawMsg, key) + case "includedNamespaces": + err = unpopulate(val, "IncludedNamespaces", &k.IncludedNamespaces) + delete(rawMsg, key) + case "includedResourceTypes": + err = unpopulate(val, "IncludedResourceTypes", &k.IncludedResourceTypes) + delete(rawMsg, key) + case "labelSelectors": + err = unpopulate(val, "LabelSelectors", &k.LabelSelectors) + delete(rawMsg, key) + case "namespaceMappings": + err = unpopulate(val, "NamespaceMappings", &k.NamespaceMappings) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &k.ObjectType) + delete(rawMsg, key) + case "persistentVolumeRestoreMode": + err = unpopulate(val, "PersistentVolumeRestoreMode", &k.PersistentVolumeRestoreMode) + delete(rawMsg, key) + case "resourceModifierReference": + err = unpopulate(val, "ResourceModifierReference", &k.ResourceModifierReference) + delete(rawMsg, key) + case "restoreHookReferences": + err = unpopulate(val, "RestoreHookReferences", &k.RestoreHookReferences) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesClusterVaultTierRestoreCriteria. +func (k KubernetesClusterVaultTierRestoreCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "conflictPolicy", k.ConflictPolicy) + populate(objectMap, "excludedNamespaces", k.ExcludedNamespaces) + populate(objectMap, "excludedResourceTypes", k.ExcludedResourceTypes) + populate(objectMap, "includeClusterScopeResources", k.IncludeClusterScopeResources) + populate(objectMap, "includedNamespaces", k.IncludedNamespaces) + populate(objectMap, "includedResourceTypes", k.IncludedResourceTypes) + populate(objectMap, "labelSelectors", k.LabelSelectors) + populate(objectMap, "namespaceMappings", k.NamespaceMappings) + objectMap["objectType"] = "KubernetesClusterVaultTierRestoreCriteria" + populate(objectMap, "persistentVolumeRestoreMode", k.PersistentVolumeRestoreMode) + populate(objectMap, "resourceModifierReference", k.ResourceModifierReference) + populate(objectMap, "restoreHookReferences", k.RestoreHookReferences) + populate(objectMap, "stagingResourceGroupId", k.StagingResourceGroupID) + populate(objectMap, "stagingStorageAccountId", k.StagingStorageAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesClusterVaultTierRestoreCriteria. +func (k *KubernetesClusterVaultTierRestoreCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "conflictPolicy": + err = unpopulate(val, "ConflictPolicy", &k.ConflictPolicy) + delete(rawMsg, key) + case "excludedNamespaces": + err = unpopulate(val, "ExcludedNamespaces", &k.ExcludedNamespaces) + delete(rawMsg, key) + case "excludedResourceTypes": + err = unpopulate(val, "ExcludedResourceTypes", &k.ExcludedResourceTypes) + delete(rawMsg, key) + case "includeClusterScopeResources": + err = unpopulate(val, "IncludeClusterScopeResources", &k.IncludeClusterScopeResources) + delete(rawMsg, key) + case "includedNamespaces": + err = unpopulate(val, "IncludedNamespaces", &k.IncludedNamespaces) + delete(rawMsg, key) + case "includedResourceTypes": + err = unpopulate(val, "IncludedResourceTypes", &k.IncludedResourceTypes) + delete(rawMsg, key) + case "labelSelectors": + err = unpopulate(val, "LabelSelectors", &k.LabelSelectors) + delete(rawMsg, key) + case "namespaceMappings": + err = unpopulate(val, "NamespaceMappings", &k.NamespaceMappings) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &k.ObjectType) + delete(rawMsg, key) + case "persistentVolumeRestoreMode": + err = unpopulate(val, "PersistentVolumeRestoreMode", &k.PersistentVolumeRestoreMode) + delete(rawMsg, key) + case "resourceModifierReference": + err = unpopulate(val, "ResourceModifierReference", &k.ResourceModifierReference) + delete(rawMsg, key) + case "restoreHookReferences": + err = unpopulate(val, "RestoreHookReferences", &k.RestoreHookReferences) + delete(rawMsg, key) + case "stagingResourceGroupId": + err = unpopulate(val, "StagingResourceGroupID", &k.StagingResourceGroupID) + delete(rawMsg, key) + case "stagingStorageAccountId": + err = unpopulate(val, "StagingStorageAccountID", &k.StagingStorageAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesPVRestoreCriteria. +func (k KubernetesPVRestoreCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", k.Name) + objectMap["objectType"] = "KubernetesPVRestoreCriteria" + populate(objectMap, "storageClassName", k.StorageClassName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesPVRestoreCriteria. +func (k *KubernetesPVRestoreCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &k.ObjectType) + delete(rawMsg, key) + case "storageClassName": + err = unpopulate(val, "StorageClassName", &k.StorageClassName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesStorageClassRestoreCriteria. +func (k KubernetesStorageClassRestoreCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "KubernetesStorageClassRestoreCriteria" + populate(objectMap, "provisioner", k.Provisioner) + populate(objectMap, "selectedStorageClassName", k.SelectedStorageClassName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesStorageClassRestoreCriteria. +func (k *KubernetesStorageClassRestoreCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &k.ObjectType) + delete(rawMsg, key) + case "provisioner": + err = unpopulate(val, "Provisioner", &k.Provisioner) + delete(rawMsg, key) + case "selectedStorageClassName": + err = unpopulate(val, "SelectedStorageClassName", &k.SelectedStorageClassName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonitoringSettings. +func (m MonitoringSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureMonitorAlertSettings", m.AzureMonitorAlertSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringSettings. +func (m *MonitoringSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureMonitorAlertSettings": + err = unpopulate(val, "AzureMonitorAlertSettings", &m.AzureMonitorAlertSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamespacedNameResource. +func (n NamespacedNameResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", n.Name) + populate(objectMap, "namespace", n.Namespace) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamespacedNameResource. +func (n *NamespacedNameResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "namespace": + err = unpopulate(val, "Namespace", &n.Namespace) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationExtendedInfo. +func (o OperationExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = o.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationExtendedInfo. +func (o *OperationExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &o.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationJobExtendedInfo. +func (o OperationJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobId", o.JobID) + objectMap["objectType"] = "OperationJobExtendedInfo" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationJobExtendedInfo. +func (o *OperationJobExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobId": + err = unpopulate(val, "JobID", &o.JobID) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &o.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResource. +func (o OperationResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) + populate(objectMap, "error", o.Error) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) + populate(objectMap, "status", o.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResource. +func (o *OperationResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &o.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + o.Properties, err = unmarshalOperationExtendedInfoClassification(val) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PatchBackupVaultInput. +func (p PatchBackupVaultInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "featureSettings", p.FeatureSettings) + populate(objectMap, "monitoringSettings", p.MonitoringSettings) + populate(objectMap, "resourceGuardOperationRequests", p.ResourceGuardOperationRequests) + populate(objectMap, "securitySettings", p.SecuritySettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PatchBackupVaultInput. +func (p *PatchBackupVaultInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featureSettings": + err = unpopulate(val, "FeatureSettings", &p.FeatureSettings) + delete(rawMsg, key) + case "monitoringSettings": + err = unpopulate(val, "MonitoringSettings", &p.MonitoringSettings) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &p.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "securitySettings": + err = unpopulate(val, "SecuritySettings", &p.SecuritySettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PatchResourceGuardInput. +func (p PatchResourceGuardInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PatchResourceGuardInput. +func (p *PatchResourceGuardInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PatchResourceRequestInput. +func (p PatchResourceRequestInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PatchResourceRequestInput. +func (p *PatchResourceRequestInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &p.Identity) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyInfo. +func (p PolicyInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "policyId", p.PolicyID) + populate(objectMap, "policyParameters", p.PolicyParameters) + populate(objectMap, "policyVersion", p.PolicyVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyInfo. +func (p *PolicyInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "policyId": + err = unpopulate(val, "PolicyID", &p.PolicyID) + delete(rawMsg, key) + case "policyParameters": + err = unpopulate(val, "PolicyParameters", &p.PolicyParameters) + delete(rawMsg, key) + case "policyVersion": + err = unpopulate(val, "PolicyVersion", &p.PolicyVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyParameters. +func (p PolicyParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupDatasourceParametersList", p.BackupDatasourceParametersList) + populate(objectMap, "dataStoreParametersList", p.DataStoreParametersList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyParameters. +func (p *PolicyParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupDatasourceParametersList": + p.BackupDatasourceParametersList, err = unmarshalBackupDatasourceParametersClassificationArray(val) + delete(rawMsg, key) + case "dataStoreParametersList": + p.DataStoreParametersList, err = unmarshalDataStoreParametersClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionStatusDetails. +func (p ProtectionStatusDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorDetails", p.ErrorDetails) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionStatusDetails. +func (p *ProtectionStatusDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &p.ErrorDetails) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RangeBasedItemLevelRestoreCriteria. +func (r RangeBasedItemLevelRestoreCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxMatchingValue", r.MaxMatchingValue) + populate(objectMap, "minMatchingValue", r.MinMatchingValue) + objectMap["objectType"] = "RangeBasedItemLevelRestoreCriteria" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RangeBasedItemLevelRestoreCriteria. +func (r *RangeBasedItemLevelRestoreCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxMatchingValue": + err = unpopulate(val, "MaxMatchingValue", &r.MaxMatchingValue) + delete(rawMsg, key) + case "minMatchingValue": + err = unpopulate(val, "MinMatchingValue", &r.MinMatchingValue) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &r.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointDataStoreDetails. +func (r RecoveryPointDataStoreDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "creationTime", r.CreationTime) + populateDateTimeRFC3339(objectMap, "expiryTime", r.ExpiryTime) + populate(objectMap, "id", r.ID) + populate(objectMap, "metaData", r.MetaData) + populateDateTimeRFC3339(objectMap, "rehydrationExpiryTime", r.RehydrationExpiryTime) + populate(objectMap, "rehydrationStatus", r.RehydrationStatus) + populate(objectMap, "state", r.State) + populate(objectMap, "type", r.Type) + populate(objectMap, "visible", r.Visible) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointDataStoreDetails. +func (r *RecoveryPointDataStoreDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationTime": + err = unpopulateDateTimeRFC3339(val, "CreationTime", &r.CreationTime) + delete(rawMsg, key) + case "expiryTime": + err = unpopulateDateTimeRFC3339(val, "ExpiryTime", &r.ExpiryTime) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "metaData": + err = unpopulate(val, "MetaData", &r.MetaData) + delete(rawMsg, key) + case "rehydrationExpiryTime": + err = unpopulateDateTimeRFC3339(val, "RehydrationExpiryTime", &r.RehydrationExpiryTime) + delete(rawMsg, key) + case "rehydrationStatus": + err = unpopulate(val, "RehydrationStatus", &r.RehydrationStatus) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &r.State) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + case "visible": + err = unpopulate(val, "Visible", &r.Visible) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointsFilters. +func (r RecoveryPointsFilters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endDate", r.EndDate) + populate(objectMap, "extendedInfo", r.ExtendedInfo) + populate(objectMap, "isVisible", r.IsVisible) + populate(objectMap, "restorePointDataStoreId", r.RestorePointDataStoreID) + populate(objectMap, "restorePointState", r.RestorePointState) + populate(objectMap, "startDate", r.StartDate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointsFilters. +func (r *RecoveryPointsFilters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endDate": + err = unpopulate(val, "EndDate", &r.EndDate) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &r.ExtendedInfo) + delete(rawMsg, key) + case "isVisible": + err = unpopulate(val, "IsVisible", &r.IsVisible) + delete(rawMsg, key) + case "restorePointDataStoreId": + err = unpopulate(val, "RestorePointDataStoreID", &r.RestorePointDataStoreID) + delete(rawMsg, key) + case "restorePointState": + err = unpopulate(val, "RestorePointState", &r.RestorePointState) + delete(rawMsg, key) + case "startDate": + err = unpopulate(val, "StartDate", &r.StartDate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuard. +func (r ResourceGuard) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowAutoApprovals", r.AllowAutoApprovals) + populate(objectMap, "description", r.Description) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "resourceGuardOperations", r.ResourceGuardOperations) + populate(objectMap, "vaultCriticalOperationExclusionList", r.VaultCriticalOperationExclusionList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuard. +func (r *ResourceGuard) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowAutoApprovals": + err = unpopulate(val, "AllowAutoApprovals", &r.AllowAutoApprovals) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "resourceGuardOperations": + err = unpopulate(val, "ResourceGuardOperations", &r.ResourceGuardOperations) + delete(rawMsg, key) + case "vaultCriticalOperationExclusionList": + err = unpopulate(val, "VaultCriticalOperationExclusionList", &r.VaultCriticalOperationExclusionList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardOperation. +func (r ResourceGuardOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "requestResourceType", r.RequestResourceType) + populate(objectMap, "vaultCriticalOperation", r.VaultCriticalOperation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardOperation. +func (r *ResourceGuardOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "requestResourceType": + err = unpopulate(val, "RequestResourceType", &r.RequestResourceType) + delete(rawMsg, key) + case "vaultCriticalOperation": + err = unpopulate(val, "VaultCriticalOperation", &r.VaultCriticalOperation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardOperationDetail. +func (r ResourceGuardOperationDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultResourceRequest", r.DefaultResourceRequest) + populate(objectMap, "vaultCriticalOperation", r.VaultCriticalOperation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardOperationDetail. +func (r *ResourceGuardOperationDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultResourceRequest": + err = unpopulate(val, "DefaultResourceRequest", &r.DefaultResourceRequest) + delete(rawMsg, key) + case "vaultCriticalOperation": + err = unpopulate(val, "VaultCriticalOperation", &r.VaultCriticalOperation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardProxyBase. +func (r ResourceGuardProxyBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "lastUpdatedTime", r.LastUpdatedTime) + populate(objectMap, "resourceGuardOperationDetails", r.ResourceGuardOperationDetails) + populate(objectMap, "resourceGuardResourceId", r.ResourceGuardResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardProxyBase. +func (r *ResourceGuardProxyBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "lastUpdatedTime": + err = unpopulate(val, "LastUpdatedTime", &r.LastUpdatedTime) + delete(rawMsg, key) + case "resourceGuardOperationDetails": + err = unpopulate(val, "ResourceGuardOperationDetails", &r.ResourceGuardOperationDetails) + delete(rawMsg, key) + case "resourceGuardResourceId": + err = unpopulate(val, "ResourceGuardResourceID", &r.ResourceGuardResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardProxyBaseResource. +func (r ResourceGuardProxyBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardProxyBaseResource. +func (r *ResourceGuardProxyBaseResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardProxyBaseResourceList. +func (r ResourceGuardProxyBaseResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardProxyBaseResourceList. +func (r *ResourceGuardProxyBaseResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardResource. +func (r ResourceGuardResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", r.ETag) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardResource. +func (r *ResourceGuardResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &r.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardResourceList. +func (r ResourceGuardResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardResourceList. +func (r *ResourceGuardResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceMoveDetails. +func (r ResourceMoveDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "completionTimeUtc", r.CompletionTimeUTC) + populate(objectMap, "operationId", r.OperationID) + populate(objectMap, "sourceResourcePath", r.SourceResourcePath) + populate(objectMap, "startTimeUtc", r.StartTimeUTC) + populate(objectMap, "targetResourcePath", r.TargetResourcePath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMoveDetails. +func (r *ResourceMoveDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "completionTimeUtc": + err = unpopulate(val, "CompletionTimeUTC", &r.CompletionTimeUTC) + delete(rawMsg, key) + case "operationId": + err = unpopulate(val, "OperationID", &r.OperationID) + delete(rawMsg, key) + case "sourceResourcePath": + err = unpopulate(val, "SourceResourcePath", &r.SourceResourcePath) + delete(rawMsg, key) + case "startTimeUtc": + err = unpopulate(val, "StartTimeUTC", &r.StartTimeUTC) + delete(rawMsg, key) + case "targetResourcePath": + err = unpopulate(val, "TargetResourcePath", &r.TargetResourcePath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestorableTimeRange. +func (r RestorableTimeRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endTime", r.EndTime) + populate(objectMap, "objectType", r.ObjectType) + populate(objectMap, "startTime", r.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestorableTimeRange. +func (r *RestorableTimeRange) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulate(val, "EndTime", &r.EndTime) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &r.ObjectType) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestoreFilesTargetInfo. +func (r RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "RestoreFilesTargetInfo" + populate(objectMap, "recoveryOption", r.RecoveryOption) + populate(objectMap, "restoreLocation", r.RestoreLocation) + populate(objectMap, "targetDetails", r.TargetDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreFilesTargetInfo. +func (r *RestoreFilesTargetInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &r.ObjectType) + delete(rawMsg, key) + case "recoveryOption": + err = unpopulate(val, "RecoveryOption", &r.RecoveryOption) + delete(rawMsg, key) + case "restoreLocation": + err = unpopulate(val, "RestoreLocation", &r.RestoreLocation) + delete(rawMsg, key) + case "targetDetails": + err = unpopulate(val, "TargetDetails", &r.TargetDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestoreJobRecoveryPointDetails. +func (r RestoreJobRecoveryPointDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recoveryPointID", r.RecoveryPointID) + populateDateTimeRFC3339(objectMap, "recoveryPointTime", r.RecoveryPointTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreJobRecoveryPointDetails. +func (r *RestoreJobRecoveryPointDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recoveryPointID": + err = unpopulate(val, "RecoveryPointID", &r.RecoveryPointID) + delete(rawMsg, key) + case "recoveryPointTime": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTime", &r.RecoveryPointTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestoreTargetInfo. +func (r RestoreTargetInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datasourceAuthCredentials", r.DatasourceAuthCredentials) + populate(objectMap, "datasourceInfo", r.DatasourceInfo) + populate(objectMap, "datasourceSetInfo", r.DatasourceSetInfo) + objectMap["objectType"] = "RestoreTargetInfo" + populate(objectMap, "recoveryOption", r.RecoveryOption) + populate(objectMap, "restoreLocation", r.RestoreLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreTargetInfo. +func (r *RestoreTargetInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datasourceAuthCredentials": + r.DatasourceAuthCredentials, err = unmarshalAuthCredentialsClassification(val) + delete(rawMsg, key) + case "datasourceInfo": + err = unpopulate(val, "DatasourceInfo", &r.DatasourceInfo) + delete(rawMsg, key) + case "datasourceSetInfo": + err = unpopulate(val, "DatasourceSetInfo", &r.DatasourceSetInfo) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &r.ObjectType) + delete(rawMsg, key) + case "recoveryOption": + err = unpopulate(val, "RecoveryOption", &r.RecoveryOption) + delete(rawMsg, key) + case "restoreLocation": + err = unpopulate(val, "RestoreLocation", &r.RestoreLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestoreTargetInfoBase. +func (r RestoreTargetInfoBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = r.ObjectType + populate(objectMap, "recoveryOption", r.RecoveryOption) + populate(objectMap, "restoreLocation", r.RestoreLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreTargetInfoBase. +func (r *RestoreTargetInfoBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &r.ObjectType) + delete(rawMsg, key) + case "recoveryOption": + err = unpopulate(val, "RecoveryOption", &r.RecoveryOption) + delete(rawMsg, key) + case "restoreLocation": + err = unpopulate(val, "RestoreLocation", &r.RestoreLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RetentionTag. +func (r RetentionTag) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", r.ETag) + populate(objectMap, "id", r.ID) + populate(objectMap, "tagName", r.TagName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RetentionTag. +func (r *RetentionTag) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &r.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "tagName": + err = unpopulate(val, "TagName", &r.TagName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScheduleBasedBackupCriteria. +func (s ScheduleBasedBackupCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "absoluteCriteria", s.AbsoluteCriteria) + populate(objectMap, "daysOfMonth", s.DaysOfMonth) + populate(objectMap, "daysOfTheWeek", s.DaysOfTheWeek) + populate(objectMap, "monthsOfYear", s.MonthsOfYear) + objectMap["objectType"] = "ScheduleBasedBackupCriteria" + aux := make([]*dateTimeRFC3339, len(s.ScheduleTimes), len(s.ScheduleTimes)) + for i := 0; i < len(s.ScheduleTimes); i++ { + aux[i] = (*dateTimeRFC3339)(s.ScheduleTimes[i]) + } + populate(objectMap, "scheduleTimes", aux) + populate(objectMap, "weeksOfTheMonth", s.WeeksOfTheMonth) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleBasedBackupCriteria. +func (s *ScheduleBasedBackupCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "absoluteCriteria": + err = unpopulate(val, "AbsoluteCriteria", &s.AbsoluteCriteria) + delete(rawMsg, key) + case "daysOfMonth": + err = unpopulate(val, "DaysOfMonth", &s.DaysOfMonth) + delete(rawMsg, key) + case "daysOfTheWeek": + err = unpopulate(val, "DaysOfTheWeek", &s.DaysOfTheWeek) + delete(rawMsg, key) + case "monthsOfYear": + err = unpopulate(val, "MonthsOfYear", &s.MonthsOfYear) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &s.ObjectType) + delete(rawMsg, key) + case "scheduleTimes": + var aux []*dateTimeRFC3339 + err = unpopulate(val, "ScheduleTimes", &aux) + for _, au := range aux { + s.ScheduleTimes = append(s.ScheduleTimes, (*time.Time)(au)) + } + delete(rawMsg, key) + case "weeksOfTheMonth": + err = unpopulate(val, "WeeksOfTheMonth", &s.WeeksOfTheMonth) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScheduleBasedTriggerContext. +func (s ScheduleBasedTriggerContext) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "ScheduleBasedTriggerContext" + populate(objectMap, "schedule", s.Schedule) + populate(objectMap, "taggingCriteria", s.TaggingCriteria) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleBasedTriggerContext. +func (s *ScheduleBasedTriggerContext) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &s.ObjectType) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &s.Schedule) + delete(rawMsg, key) + case "taggingCriteria": + err = unpopulate(val, "TaggingCriteria", &s.TaggingCriteria) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretStoreBasedAuthCredentials. +func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "SecretStoreBasedAuthCredentials" + populate(objectMap, "secretStoreResource", s.SecretStoreResource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretStoreBasedAuthCredentials. +func (s *SecretStoreBasedAuthCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &s.ObjectType) + delete(rawMsg, key) + case "secretStoreResource": + err = unpopulate(val, "SecretStoreResource", &s.SecretStoreResource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecretStoreResource. +func (s SecretStoreResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "secretStoreType", s.SecretStoreType) + populate(objectMap, "uri", s.URI) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretStoreResource. +func (s *SecretStoreResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "secretStoreType": + err = unpopulate(val, "SecretStoreType", &s.SecretStoreType) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &s.URI) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecuritySettings. +func (s SecuritySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "encryptionSettings", s.EncryptionSettings) + populate(objectMap, "immutabilitySettings", s.ImmutabilitySettings) + populate(objectMap, "softDeleteSettings", s.SoftDeleteSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecuritySettings. +func (s *SecuritySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "encryptionSettings": + err = unpopulate(val, "EncryptionSettings", &s.EncryptionSettings) + delete(rawMsg, key) + case "immutabilitySettings": + err = unpopulate(val, "ImmutabilitySettings", &s.ImmutabilitySettings) + delete(rawMsg, key) + case "softDeleteSettings": + err = unpopulate(val, "SoftDeleteSettings", &s.SoftDeleteSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SoftDeleteSettings. +func (s SoftDeleteSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "retentionDurationInDays", s.RetentionDurationInDays) + populate(objectMap, "state", s.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SoftDeleteSettings. +func (s *SoftDeleteSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "retentionDurationInDays": + err = unpopulate(val, "RetentionDurationInDays", &s.RetentionDurationInDays) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SourceLifeCycle. +func (s SourceLifeCycle) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deleteAfter", s.DeleteAfter) + populate(objectMap, "sourceDataStore", s.SourceDataStore) + populate(objectMap, "targetDataStoreCopySettings", s.TargetDataStoreCopySettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SourceLifeCycle. +func (s *SourceLifeCycle) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deleteAfter": + s.DeleteAfter, err = unmarshalDeleteOptionClassification(val) + delete(rawMsg, key) + case "sourceDataStore": + err = unpopulate(val, "SourceDataStore", &s.SourceDataStore) + delete(rawMsg, key) + case "targetDataStoreCopySettings": + err = unpopulate(val, "TargetDataStoreCopySettings", &s.TargetDataStoreCopySettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StopProtectionRequest. +func (s StopProtectionRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceGuardOperationRequests", s.ResourceGuardOperationRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StopProtectionRequest. +func (s *StopProtectionRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &s.ResourceGuardOperationRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageSetting. +func (s StorageSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datastoreType", s.DatastoreType) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageSetting. +func (s *StorageSetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datastoreType": + err = unpopulate(val, "DatastoreType", &s.DatastoreType) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedFeature. +func (s SupportedFeature) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exposureControlledFeatures", s.ExposureControlledFeatures) + populate(objectMap, "featureName", s.FeatureName) + populate(objectMap, "supportStatus", s.SupportStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedFeature. +func (s *SupportedFeature) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exposureControlledFeatures": + err = unpopulate(val, "ExposureControlledFeatures", &s.ExposureControlledFeatures) + delete(rawMsg, key) + case "featureName": + err = unpopulate(val, "FeatureName", &s.FeatureName) + delete(rawMsg, key) + case "supportStatus": + err = unpopulate(val, "SupportStatus", &s.SupportStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SuspendBackupRequest. +func (s SuspendBackupRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceGuardOperationRequests", s.ResourceGuardOperationRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SuspendBackupRequest. +func (s *SuspendBackupRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &s.ResourceGuardOperationRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SyncBackupInstanceRequest. +func (s SyncBackupInstanceRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "syncType", s.SyncType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SyncBackupInstanceRequest. +func (s *SyncBackupInstanceRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "syncType": + err = unpopulate(val, "SyncType", &s.SyncType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TaggingCriteria. +func (t TaggingCriteria) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "criteria", t.Criteria) + populate(objectMap, "isDefault", t.IsDefault) + populate(objectMap, "tagInfo", t.TagInfo) + populate(objectMap, "taggingPriority", t.TaggingPriority) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TaggingCriteria. +func (t *TaggingCriteria) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "criteria": + t.Criteria, err = unmarshalBackupCriteriaClassificationArray(val) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &t.IsDefault) + delete(rawMsg, key) + case "tagInfo": + err = unpopulate(val, "TagInfo", &t.TagInfo) + delete(rawMsg, key) + case "taggingPriority": + err = unpopulate(val, "TaggingPriority", &t.TaggingPriority) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetCopySetting. +func (t TargetCopySetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "copyAfter", t.CopyAfter) + populate(objectMap, "dataStore", t.DataStore) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetCopySetting. +func (t *TargetCopySetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "copyAfter": + t.CopyAfter, err = unmarshalCopyOptionClassification(val) + delete(rawMsg, key) + case "dataStore": + err = unpopulate(val, "DataStore", &t.DataStore) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetDetails. +func (t TargetDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filePrefix", t.FilePrefix) + populate(objectMap, "restoreTargetLocationType", t.RestoreTargetLocationType) + populate(objectMap, "targetResourceArmId", t.TargetResourceArmID) + populate(objectMap, "url", t.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetDetails. +func (t *TargetDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filePrefix": + err = unpopulate(val, "FilePrefix", &t.FilePrefix) + delete(rawMsg, key) + case "restoreTargetLocationType": + err = unpopulate(val, "RestoreTargetLocationType", &t.RestoreTargetLocationType) + delete(rawMsg, key) + case "targetResourceArmId": + err = unpopulate(val, "TargetResourceArmID", &t.TargetResourceArmID) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &t.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggerBackupRequest. +func (t TriggerBackupRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupRuleOptions", t.BackupRuleOptions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggerBackupRequest. +func (t *TriggerBackupRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupRuleOptions": + err = unpopulate(val, "BackupRuleOptions", &t.BackupRuleOptions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggerContext. +func (t TriggerContext) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = t.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggerContext. +func (t *TriggerContext) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &t.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnlockDeleteRequest. +func (u UnlockDeleteRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceGuardOperationRequests", u.ResourceGuardOperationRequests) + populate(objectMap, "resourceToBeDeleted", u.ResourceToBeDeleted) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnlockDeleteRequest. +func (u *UnlockDeleteRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &u.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "resourceToBeDeleted": + err = unpopulate(val, "ResourceToBeDeleted", &u.ResourceToBeDeleted) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnlockDeleteResponse. +func (u UnlockDeleteResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "unlockDeleteExpiryTime", u.UnlockDeleteExpiryTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnlockDeleteResponse. +func (u *UnlockDeleteResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "unlockDeleteExpiryTime": + err = unpopulate(val, "UnlockDeleteExpiryTime", &u.UnlockDeleteExpiryTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. +func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserFacingError. +func (u UserFacingError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", u.Code) + populate(objectMap, "details", u.Details) + populate(objectMap, "innerError", u.InnerError) + populate(objectMap, "isRetryable", u.IsRetryable) + populate(objectMap, "isUserError", u.IsUserError) + populate(objectMap, "message", u.Message) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "recommendedAction", u.RecommendedAction) + populate(objectMap, "target", u.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserFacingError. +func (u *UserFacingError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &u.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &u.Details) + delete(rawMsg, key) + case "innerError": + err = unpopulate(val, "InnerError", &u.InnerError) + delete(rawMsg, key) + case "isRetryable": + err = unpopulate(val, "IsRetryable", &u.IsRetryable) + delete(rawMsg, key) + case "isUserError": + err = unpopulate(val, "IsUserError", &u.IsUserError) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &u.Message) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &u.RecommendedAction) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &u.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserFacingWarningDetail. +func (u UserFacingWarningDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceName", u.ResourceName) + populate(objectMap, "warning", u.Warning) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserFacingWarningDetail. +func (u *UserFacingWarningDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceName": + err = unpopulate(val, "ResourceName", &u.ResourceName) + delete(rawMsg, key) + case "warning": + err = unpopulate(val, "Warning", &u.Warning) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateCrossRegionRestoreRequestObject. +func (v ValidateCrossRegionRestoreRequestObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "crossRegionRestoreDetails", v.CrossRegionRestoreDetails) + populate(objectMap, "restoreRequestObject", v.RestoreRequestObject) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateCrossRegionRestoreRequestObject. +func (v *ValidateCrossRegionRestoreRequestObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "crossRegionRestoreDetails": + err = unpopulate(val, "CrossRegionRestoreDetails", &v.CrossRegionRestoreDetails) + delete(rawMsg, key) + case "restoreRequestObject": + v.RestoreRequestObject, err = unmarshalAzureBackupRestoreRequestClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateForBackupRequest. +func (v ValidateForBackupRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupInstance", v.BackupInstance) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateForBackupRequest. +func (v *ValidateForBackupRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupInstance": + err = unpopulate(val, "BackupInstance", &v.BackupInstance) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateRestoreRequestObject. +func (v ValidateRestoreRequestObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "restoreRequestObject", v.RestoreRequestObject) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateRestoreRequestObject. +func (v *ValidateRestoreRequestObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "restoreRequestObject": + v.RestoreRequestObject, err = unmarshalAzureBackupRestoreRequestClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationresult_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationresult_client.go new file mode 100644 index 00000000..3ae1f864 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationresult_client.go @@ -0,0 +1,121 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// OperationResultClient contains the methods for the OperationResult group. +// Don't use this type directly, use NewOperationResultClient() instead. +type OperationResultClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationResultClient creates a new instance of OperationResultClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationResultClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationResultClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the operation result for a resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - options - OperationResultClientGetOptions contains the optional parameters for the OperationResultClient.Get method. +func (client *OperationResultClient) Get(ctx context.Context, operationID string, location string, options *OperationResultClientGetOptions) (OperationResultClientGetResponse, error) { + var err error + const operationName = "OperationResultClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, operationID, location, options) + if err != nil { + return OperationResultClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return OperationResultClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return OperationResultClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *OperationResultClient) getCreateRequest(ctx context.Context, operationID string, location string, options *OperationResultClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *OperationResultClient) getHandleResponse(resp *http.Response) (OperationResultClientGetResponse, error) { + result := OperationResultClientGetResponse{} + if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { + result.AzureAsyncOperation = &val + } + if val := resp.Header.Get("Location"); val != "" { + result.Location = &val + } + if val := resp.Header.Get("Retry-After"); val != "" { + retryAfter32, err := strconv.ParseInt(val, 10, 32) + retryAfter := int32(retryAfter32) + if err != nil { + return OperationResultClientGetResponse{}, err + } + result.RetryAfter = &retryAfter + } + if err := runtime.UnmarshalAsJSON(resp, &result.OperationJobExtendedInfo); err != nil { + return OperationResultClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operations_client.go new file mode 100644 index 00000000..04ec7496 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operations_client.go @@ -0,0 +1,88 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the DataProtectionOperations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Returns the list of available operations. +// +// Generated from API version 2024-04-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.DataProtection/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ClientDiscoveryResponse); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationstatus_client.go new file mode 100644 index 00000000..7863d786 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationstatus_client.go @@ -0,0 +1,106 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// OperationStatusClient contains the methods for the OperationStatus group. +// Don't use this type directly, use NewOperationStatusClient() instead. +type OperationStatusClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationStatusClient creates a new instance of OperationStatusClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationStatusClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the operation status for a resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - options - OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method. +func (client *OperationStatusClient) Get(ctx context.Context, location string, operationID string, options *OperationStatusClientGetOptions) (OperationStatusClientGetResponse, error) { + var err error + const operationName = "OperationStatusClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, operationID, options) + if err != nil { + return OperationStatusClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return OperationStatusClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OperationStatusClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *OperationStatusClient) getCreateRequest(ctx context.Context, location string, operationID string, options *OperationStatusClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *OperationStatusClient) getHandleResponse(resp *http.Response) (OperationStatusClientGetResponse, error) { + result := OperationStatusClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationResource); err != nil { + return OperationStatusClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationstatusbackupvaultcontext_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationstatusbackupvaultcontext_client.go new file mode 100644 index 00000000..f49ede9f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationstatusbackupvaultcontext_client.go @@ -0,0 +1,113 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// OperationStatusBackupVaultContextClient contains the methods for the OperationStatusBackupVaultContext group. +// Don't use this type directly, use NewOperationStatusBackupVaultContextClient() instead. +type OperationStatusBackupVaultContextClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationStatusBackupVaultContextClient creates a new instance of OperationStatusBackupVaultContextClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationStatusBackupVaultContextClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusBackupVaultContextClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationStatusBackupVaultContextClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the operation status for an operation over a BackupVault's context. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - options - OperationStatusBackupVaultContextClientGetOptions contains the optional parameters for the OperationStatusBackupVaultContextClient.Get +// method. +func (client *OperationStatusBackupVaultContextClient) Get(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *OperationStatusBackupVaultContextClientGetOptions) (OperationStatusBackupVaultContextClientGetResponse, error) { + var err error + const operationName = "OperationStatusBackupVaultContextClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, operationID, options) + if err != nil { + return OperationStatusBackupVaultContextClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return OperationStatusBackupVaultContextClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OperationStatusBackupVaultContextClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *OperationStatusBackupVaultContextClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *OperationStatusBackupVaultContextClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationStatus/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *OperationStatusBackupVaultContextClient) getHandleResponse(resp *http.Response) (OperationStatusBackupVaultContextClientGetResponse, error) { + result := OperationStatusBackupVaultContextClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationResource); err != nil { + return OperationStatusBackupVaultContextClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationstatusresourcegroupcontext_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationstatusresourcegroupcontext_client.go new file mode 100644 index 00000000..0a0a4af2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/operationstatusresourcegroupcontext_client.go @@ -0,0 +1,108 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// OperationStatusResourceGroupContextClient contains the methods for the OperationStatusResourceGroupContext group. +// Don't use this type directly, use NewOperationStatusResourceGroupContextClient() instead. +type OperationStatusResourceGroupContextClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationStatusResourceGroupContextClient creates a new instance of OperationStatusResourceGroupContextClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationStatusResourceGroupContextClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusResourceGroupContextClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationStatusResourceGroupContextClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the operation status for an operation over a ResourceGroup's context. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - OperationStatusResourceGroupContextClientGetOptions contains the optional parameters for the OperationStatusResourceGroupContextClient.Get +// method. +func (client *OperationStatusResourceGroupContextClient) Get(ctx context.Context, resourceGroupName string, operationID string, options *OperationStatusResourceGroupContextClientGetOptions) (OperationStatusResourceGroupContextClientGetResponse, error) { + var err error + const operationName = "OperationStatusResourceGroupContextClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, operationID, options) + if err != nil { + return OperationStatusResourceGroupContextClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return OperationStatusResourceGroupContextClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OperationStatusResourceGroupContextClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *OperationStatusResourceGroupContextClient) getCreateRequest(ctx context.Context, resourceGroupName string, operationID string, options *OperationStatusResourceGroupContextClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/operationStatus/{operationId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *OperationStatusResourceGroupContextClient) getHandleResponse(resp *http.Response) (OperationStatusResourceGroupContextClientGetResponse, error) { + result := OperationStatusResourceGroupContextClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationResource); err != nil { + return OperationStatusResourceGroupContextClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/options.go new file mode 100644 index 00000000..0869f45c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/options.go @@ -0,0 +1,456 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +// BackupInstancesClientBeginAdhocBackupOptions contains the optional parameters for the BackupInstancesClient.BeginAdhocBackup +// method. +type BackupInstancesClientBeginAdhocBackupOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupInstancesClient.BeginCreateOrUpdate +// method. +type BackupInstancesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + XMSAuthorizationAuxiliary *string +} + +// BackupInstancesClientBeginDeleteOptions contains the optional parameters for the BackupInstancesClient.BeginDelete method. +type BackupInstancesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + XMSAuthorizationAuxiliary *string +} + +// BackupInstancesClientBeginResumeBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginResumeBackups +// method. +type BackupInstancesClientBeginResumeBackupsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupInstancesClientBeginResumeProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginResumeProtection +// method. +type BackupInstancesClientBeginResumeProtectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupInstancesClientBeginStopProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginStopProtection +// method. +type BackupInstancesClientBeginStopProtectionOptions struct { + // Request body for operation + Parameters *StopProtectionRequest + + // Resumes the LRO from the provided token. + ResumeToken string + XMSAuthorizationAuxiliary *string +} + +// BackupInstancesClientBeginSuspendBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginSuspendBackups +// method. +type BackupInstancesClientBeginSuspendBackupsOptions struct { + // Request body for operation + Parameters *SuspendBackupRequest + + // Resumes the LRO from the provided token. + ResumeToken string + XMSAuthorizationAuxiliary *string +} + +// BackupInstancesClientBeginSyncBackupInstanceOptions contains the optional parameters for the BackupInstancesClient.BeginSyncBackupInstance +// method. +type BackupInstancesClientBeginSyncBackupInstanceOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupInstancesClientBeginTriggerCrossRegionRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerCrossRegionRestore +// method. +type BackupInstancesClientBeginTriggerCrossRegionRestoreOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupInstancesClientBeginTriggerRehydrateOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRehydrate +// method. +type BackupInstancesClientBeginTriggerRehydrateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupInstancesClientBeginTriggerRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRestore +// method. +type BackupInstancesClientBeginTriggerRestoreOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + XMSAuthorizationAuxiliary *string +} + +// BackupInstancesClientBeginValidateCrossRegionRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginValidateCrossRegionRestore +// method. +type BackupInstancesClientBeginValidateCrossRegionRestoreOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupInstancesClientBeginValidateForBackupOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForBackup +// method. +type BackupInstancesClientBeginValidateForBackupOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupInstancesClientBeginValidateForRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForRestore +// method. +type BackupInstancesClientBeginValidateForRestoreOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupInstancesClientGetBackupInstanceOperationResultOptions contains the optional parameters for the BackupInstancesClient.GetBackupInstanceOperationResult +// method. +type BackupInstancesClientGetBackupInstanceOperationResultOptions struct { + // placeholder for future optional parameters +} + +// BackupInstancesClientGetOptions contains the optional parameters for the BackupInstancesClient.Get method. +type BackupInstancesClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupInstancesClientListOptions contains the optional parameters for the BackupInstancesClient.NewListPager method. +type BackupInstancesClientListOptions struct { + // placeholder for future optional parameters +} + +// BackupInstancesExtensionRoutingClientListOptions contains the optional parameters for the BackupInstancesExtensionRoutingClient.NewListPager +// method. +type BackupInstancesExtensionRoutingClientListOptions struct { + // placeholder for future optional parameters +} + +// BackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BackupPoliciesClient.CreateOrUpdate +// method. +type BackupPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// BackupPoliciesClientDeleteOptions contains the optional parameters for the BackupPoliciesClient.Delete method. +type BackupPoliciesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method. +type BackupPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.NewListPager method. +type BackupPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// BackupVaultOperationResultsClientGetOptions contains the optional parameters for the BackupVaultOperationResultsClient.Get +// method. +type BackupVaultOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupVaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginCreateOrUpdate +// method. +type BackupVaultsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + XMSAuthorizationAuxiliary *string +} + +// BackupVaultsClientBeginDeleteOptions contains the optional parameters for the BackupVaultsClient.BeginDelete method. +type BackupVaultsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BackupVaultsClientBeginUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginUpdate method. +type BackupVaultsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + XMSAuthorizationAuxiliary *string +} + +// BackupVaultsClientCheckNameAvailabilityOptions contains the optional parameters for the BackupVaultsClient.CheckNameAvailability +// method. +type BackupVaultsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// BackupVaultsClientGetInResourceGroupOptions contains the optional parameters for the BackupVaultsClient.NewGetInResourceGroupPager +// method. +type BackupVaultsClientGetInResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// BackupVaultsClientGetInSubscriptionOptions contains the optional parameters for the BackupVaultsClient.NewGetInSubscriptionPager +// method. +type BackupVaultsClientGetInSubscriptionOptions struct { + // placeholder for future optional parameters +} + +// BackupVaultsClientGetOptions contains the optional parameters for the BackupVaultsClient.Get method. +type BackupVaultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClientCheckFeatureSupportOptions contains the optional parameters for the Client.CheckFeatureSupport method. +type ClientCheckFeatureSupportOptions struct { + // placeholder for future optional parameters +} + +// DeletedBackupInstancesClientBeginUndeleteOptions contains the optional parameters for the DeletedBackupInstancesClient.BeginUndelete +// method. +type DeletedBackupInstancesClientBeginUndeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeletedBackupInstancesClientGetOptions contains the optional parameters for the DeletedBackupInstancesClient.Get method. +type DeletedBackupInstancesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DeletedBackupInstancesClientListOptions contains the optional parameters for the DeletedBackupInstancesClient.NewListPager +// method. +type DeletedBackupInstancesClientListOptions struct { + // placeholder for future optional parameters +} + +// DppResourceGuardProxyClientCreateOrUpdateOptions contains the optional parameters for the DppResourceGuardProxyClient.CreateOrUpdate +// method. +type DppResourceGuardProxyClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// DppResourceGuardProxyClientDeleteOptions contains the optional parameters for the DppResourceGuardProxyClient.Delete method. +type DppResourceGuardProxyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// DppResourceGuardProxyClientGetOptions contains the optional parameters for the DppResourceGuardProxyClient.Get method. +type DppResourceGuardProxyClientGetOptions struct { + // placeholder for future optional parameters +} + +// DppResourceGuardProxyClientListOptions contains the optional parameters for the DppResourceGuardProxyClient.NewListPager +// method. +type DppResourceGuardProxyClientListOptions struct { + // placeholder for future optional parameters +} + +// DppResourceGuardProxyClientUnlockDeleteOptions contains the optional parameters for the DppResourceGuardProxyClient.UnlockDelete +// method. +type DppResourceGuardProxyClientUnlockDeleteOptions struct { + XMSAuthorizationAuxiliary *string +} + +// ExportJobsClientBeginTriggerOptions contains the optional parameters for the ExportJobsClient.BeginTrigger method. +type ExportJobsClientBeginTriggerOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExportJobsOperationResultClientGetOptions contains the optional parameters for the ExportJobsOperationResultClient.Get +// method. +type ExportJobsOperationResultClientGetOptions struct { + // placeholder for future optional parameters +} + +// FetchCrossRegionRestoreJobClientGetOptions contains the optional parameters for the FetchCrossRegionRestoreJobClient.Get +// method. +type FetchCrossRegionRestoreJobClientGetOptions struct { + // placeholder for future optional parameters +} + +// FetchCrossRegionRestoreJobsClientListOptions contains the optional parameters for the FetchCrossRegionRestoreJobsClient.NewListPager +// method. +type FetchCrossRegionRestoreJobsClientListOptions struct { + // OData filter options. + Filter *string +} + +// FetchSecondaryRecoveryPointsClientListOptions contains the optional parameters for the FetchSecondaryRecoveryPointsClient.NewListPager +// method. +type FetchSecondaryRecoveryPointsClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. +type JobsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobsClientListOptions contains the optional parameters for the JobsClient.NewListPager method. +type JobsClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationResultClientGetOptions contains the optional parameters for the OperationResultClient.Get method. +type OperationResultClientGetOptions struct { + // placeholder for future optional parameters +} + +// OperationStatusBackupVaultContextClientGetOptions contains the optional parameters for the OperationStatusBackupVaultContextClient.Get +// method. +type OperationStatusBackupVaultContextClientGetOptions struct { + // placeholder for future optional parameters +} + +// OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method. +type OperationStatusClientGetOptions struct { + // placeholder for future optional parameters +} + +// OperationStatusResourceGroupContextClientGetOptions contains the optional parameters for the OperationStatusResourceGroupContextClient.Get +// method. +type OperationStatusResourceGroupContextClientGetOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. +type RecoveryPointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.NewListPager method. +type RecoveryPointsClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// ResourceGuardsClientDeleteOptions contains the optional parameters for the ResourceGuardsClient.Delete method. +type ResourceGuardsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.NewGetBackupSecurityPINRequestsObjectsPager +// method. +type ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject +// method. +type ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject +// method. +type ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject +// method. +type ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject +// method. +type ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject +// method. +type ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject +// method. +type ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.NewGetDeleteProtectedItemRequestsObjectsPager +// method. +type ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.NewGetDeleteResourceGuardProxyRequestsObjectsPager +// method. +type ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.NewGetDisableSoftDeleteRequestsObjectsPager +// method. +type ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetOptions contains the optional parameters for the ResourceGuardsClient.Get method. +type ResourceGuardsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetResourcesInResourceGroupOptions contains the optional parameters for the ResourceGuardsClient.NewGetResourcesInResourceGroupPager +// method. +type ResourceGuardsClientGetResourcesInResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetResourcesInSubscriptionOptions contains the optional parameters for the ResourceGuardsClient.NewGetResourcesInSubscriptionPager +// method. +type ResourceGuardsClientGetResourcesInSubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.NewGetUpdateProtectedItemRequestsObjectsPager +// method. +type ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.NewGetUpdateProtectionPolicyRequestsObjectsPager +// method. +type ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientPatchOptions contains the optional parameters for the ResourceGuardsClient.Patch method. +type ResourceGuardsClientPatchOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardsClientPutOptions contains the optional parameters for the ResourceGuardsClient.Put method. +type ResourceGuardsClientPutOptions struct { + // placeholder for future optional parameters +} + +// RestorableTimeRangesClientFindOptions contains the optional parameters for the RestorableTimeRangesClient.Find method. +type RestorableTimeRangesClientFindOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/polymorphic_helpers.go new file mode 100644 index 00000000..30f915a8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/polymorphic_helpers.go @@ -0,0 +1,491 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import "encoding/json" + +func unmarshalAuthCredentialsClassification(rawMsg json.RawMessage) (AuthCredentialsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b AuthCredentialsClassification + switch m["objectType"] { + case "SecretStoreBasedAuthCredentials": + b = &SecretStoreBasedAuthCredentials{} + default: + b = &AuthCredentials{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalAzureBackupRecoveryPointClassification(rawMsg json.RawMessage) (AzureBackupRecoveryPointClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b AzureBackupRecoveryPointClassification + switch m["objectType"] { + case "AzureBackupDiscreteRecoveryPoint": + b = &AzureBackupDiscreteRecoveryPoint{} + default: + b = &AzureBackupRecoveryPoint{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalAzureBackupRestoreRequestClassification(rawMsg json.RawMessage) (AzureBackupRestoreRequestClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b AzureBackupRestoreRequestClassification + switch m["objectType"] { + case "AzureBackupRecoveryPointBasedRestoreRequest": + b = &AzureBackupRecoveryPointBasedRestoreRequest{} + case "AzureBackupRecoveryTimeBasedRestoreRequest": + b = &AzureBackupRecoveryTimeBasedRestoreRequest{} + case "AzureBackupRestoreWithRehydrationRequest": + b = &AzureBackupRestoreWithRehydrationRequest{} + default: + b = &AzureBackupRestoreRequest{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalBackupCriteriaClassification(rawMsg json.RawMessage) (BackupCriteriaClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BackupCriteriaClassification + switch m["objectType"] { + case "ScheduleBasedBackupCriteria": + b = &ScheduleBasedBackupCriteria{} + default: + b = &BackupCriteria{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalBackupCriteriaClassificationArray(rawMsg json.RawMessage) ([]BackupCriteriaClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]BackupCriteriaClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalBackupCriteriaClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalBackupDatasourceParametersClassification(rawMsg json.RawMessage) (BackupDatasourceParametersClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BackupDatasourceParametersClassification + switch m["objectType"] { + case "BlobBackupDatasourceParameters": + b = &BlobBackupDatasourceParameters{} + case "KubernetesClusterBackupDatasourceParameters": + b = &KubernetesClusterBackupDatasourceParameters{} + default: + b = &BackupDatasourceParameters{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalBackupDatasourceParametersClassificationArray(rawMsg json.RawMessage) ([]BackupDatasourceParametersClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]BackupDatasourceParametersClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalBackupDatasourceParametersClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalBackupParametersClassification(rawMsg json.RawMessage) (BackupParametersClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BackupParametersClassification + switch m["objectType"] { + case "AzureBackupParams": + b = &AzureBackupParams{} + default: + b = &BackupParameters{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalBaseBackupPolicyClassification(rawMsg json.RawMessage) (BaseBackupPolicyClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BaseBackupPolicyClassification + switch m["objectType"] { + case "BackupPolicy": + b = &BackupPolicy{} + default: + b = &BaseBackupPolicy{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalBasePolicyRuleClassification(rawMsg json.RawMessage) (BasePolicyRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BasePolicyRuleClassification + switch m["objectType"] { + case "AzureBackupRule": + b = &AzureBackupRule{} + case "AzureRetentionRule": + b = &AzureRetentionRule{} + default: + b = &BasePolicyRule{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalBasePolicyRuleClassificationArray(rawMsg json.RawMessage) ([]BasePolicyRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]BasePolicyRuleClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalBasePolicyRuleClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalBaseResourcePropertiesClassification(rawMsg json.RawMessage) (BaseResourcePropertiesClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BaseResourcePropertiesClassification + switch m["objectType"] { + case string(ResourcePropertiesObjectTypeDefaultResourceProperties): + b = &DefaultResourceProperties{} + default: + b = &BaseResourceProperties{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalCopyOptionClassification(rawMsg json.RawMessage) (CopyOptionClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b CopyOptionClassification + switch m["objectType"] { + case "CopyOnExpiryOption": + b = &CopyOnExpiryOption{} + case "CustomCopyOption": + b = &CustomCopyOption{} + case "ImmediateCopyOption": + b = &ImmediateCopyOption{} + default: + b = &CopyOption{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDataStoreParametersClassification(rawMsg json.RawMessage) (DataStoreParametersClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DataStoreParametersClassification + switch m["objectType"] { + case "AzureOperationalStoreParameters": + b = &AzureOperationalStoreParameters{} + default: + b = &DataStoreParameters{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDataStoreParametersClassificationArray(rawMsg json.RawMessage) ([]DataStoreParametersClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]DataStoreParametersClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalDataStoreParametersClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalDeleteOptionClassification(rawMsg json.RawMessage) (DeleteOptionClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DeleteOptionClassification + switch m["objectType"] { + case "AbsoluteDeleteOption": + b = &AbsoluteDeleteOption{} + default: + b = &DeleteOption{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalFeatureValidationResponseBaseClassification(rawMsg json.RawMessage) (FeatureValidationResponseBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b FeatureValidationResponseBaseClassification + switch m["objectType"] { + case "FeatureValidationResponse": + b = &FeatureValidationResponse{} + default: + b = &FeatureValidationResponseBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalItemLevelRestoreCriteriaClassification(rawMsg json.RawMessage) (ItemLevelRestoreCriteriaClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ItemLevelRestoreCriteriaClassification + switch m["objectType"] { + case "ItemPathBasedRestoreCriteria": + b = &ItemPathBasedRestoreCriteria{} + case "KubernetesClusterRestoreCriteria": + b = &KubernetesClusterRestoreCriteria{} + case "KubernetesClusterVaultTierRestoreCriteria": + b = &KubernetesClusterVaultTierRestoreCriteria{} + case "KubernetesPVRestoreCriteria": + b = &KubernetesPVRestoreCriteria{} + case "KubernetesStorageClassRestoreCriteria": + b = &KubernetesStorageClassRestoreCriteria{} + case "RangeBasedItemLevelRestoreCriteria": + b = &RangeBasedItemLevelRestoreCriteria{} + default: + b = &ItemLevelRestoreCriteria{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalItemLevelRestoreCriteriaClassificationArray(rawMsg json.RawMessage) ([]ItemLevelRestoreCriteriaClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]ItemLevelRestoreCriteriaClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalItemLevelRestoreCriteriaClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalOperationExtendedInfoClassification(rawMsg json.RawMessage) (OperationExtendedInfoClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b OperationExtendedInfoClassification + switch m["objectType"] { + case "OperationJobExtendedInfo": + b = &OperationJobExtendedInfo{} + default: + b = &OperationExtendedInfo{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRestoreTargetInfoBaseClassification(rawMsg json.RawMessage) (RestoreTargetInfoBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RestoreTargetInfoBaseClassification + switch m["objectType"] { + case "ItemLevelRestoreTargetInfo": + b = &ItemLevelRestoreTargetInfo{} + case "RestoreFilesTargetInfo": + b = &RestoreFilesTargetInfo{} + case "RestoreTargetInfo": + b = &RestoreTargetInfo{} + default: + b = &RestoreTargetInfoBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalTriggerContextClassification(rawMsg json.RawMessage) (TriggerContextClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b TriggerContextClassification + switch m["objectType"] { + case "AdhocBasedTriggerContext": + b = &AdhocBasedTriggerContext{} + case "ScheduleBasedTriggerContext": + b = &ScheduleBasedTriggerContext{} + default: + b = &TriggerContext{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/recoverypoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/recoverypoints_client.go new file mode 100644 index 00000000..6cf90236 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/recoverypoints_client.go @@ -0,0 +1,192 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RecoveryPointsClient contains the methods for the RecoveryPoints group. +// Don't use this type directly, use NewRecoveryPointsClient() instead. +type RecoveryPointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRecoveryPointsClient creates a new instance of RecoveryPointsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRecoveryPointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoveryPointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RecoveryPointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a Recovery Point using recoveryPointId for a Datasource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - options - RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. +func (client *RecoveryPointsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (RecoveryPointsClientGetResponse, error) { + var err error + const operationName = "RecoveryPointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, recoveryPointID, options) + if err != nil { + return RecoveryPointsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecoveryPointsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecoveryPointsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RecoveryPointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + if recoveryPointID == "" { + return nil, errors.New("parameter recoveryPointID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RecoveryPointsClient) getHandleResponse(resp *http.Response) (RecoveryPointsClientGetResponse, error) { + result := RecoveryPointsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupRecoveryPointResource); err != nil { + return RecoveryPointsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Returns a list of Recovery Points for a DataSource in a vault. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - options - RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.NewListPager method. +func (client *RecoveryPointsClient) NewListPager(resourceGroupName string, vaultName string, backupInstanceName string, options *RecoveryPointsClientListOptions) *runtime.Pager[RecoveryPointsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RecoveryPointsClientListResponse]{ + More: func(page RecoveryPointsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RecoveryPointsClientListResponse) (RecoveryPointsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecoveryPointsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) + }, nil) + if err != nil { + return RecoveryPointsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RecoveryPointsClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *RecoveryPointsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RecoveryPointsClient) listHandleResponse(resp *http.Response) (RecoveryPointsClientListResponse, error) { + result := RecoveryPointsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupRecoveryPointResourceList); err != nil { + return RecoveryPointsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/resourceguards_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/resourceguards_client.go new file mode 100644 index 00000000..94507be6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/resourceguards_client.go @@ -0,0 +1,1217 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ResourceGuardsClient contains the methods for the ResourceGuards group. +// Don't use this type directly, use NewResourceGuardsClient() instead. +type ResourceGuardsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewResourceGuardsClient creates a new instance of ResourceGuardsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewResourceGuardsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceGuardsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ResourceGuardsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Delete - Deletes a ResourceGuard resource from the resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceGuardsName - The name of ResourceGuard +// - options - ResourceGuardsClientDeleteOptions contains the optional parameters for the ResourceGuardsClient.Delete method. +func (client *ResourceGuardsClient) Delete(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientDeleteOptions) (ResourceGuardsClientDeleteResponse, error) { + var err error + const operationName = "ResourceGuardsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) + if err != nil { + return ResourceGuardsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardsClientDeleteResponse{}, err + } + return ResourceGuardsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ResourceGuardsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns a ResourceGuard belonging to a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceGuardsName - The name of ResourceGuard +// - options - ResourceGuardsClientGetOptions contains the optional parameters for the ResourceGuardsClient.Get method. +func (client *ResourceGuardsClient) Get(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetOptions) (ResourceGuardsClientGetResponse, error) { + var err error + const operationName = "ResourceGuardsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) + if err != nil { + return ResourceGuardsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ResourceGuardsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ResourceGuardsClient) getHandleResponse(resp *http.Response) (ResourceGuardsClientGetResponse, error) { + result := ResourceGuardsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardResource); err != nil { + return ResourceGuardsClientGetResponse{}, err + } + return result, nil +} + +// NewGetBackupSecurityPINRequestsObjectsPager - Returns collection of operation request objects for a critical operation +// protected by the given ResourceGuard resource. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.NewGetBackupSecurityPINRequestsObjectsPager +// method. +func (client *ResourceGuardsClient) NewGetBackupSecurityPINRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse]{ + More: func(page ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse) (ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGuardsClient.NewGetBackupSecurityPINRequestsObjectsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getBackupSecurityPINRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) + }, nil) + if err != nil { + return ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse{}, err + } + return client.getBackupSecurityPINRequestsObjectsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getBackupSecurityPINRequestsObjectsCreateRequest creates the GetBackupSecurityPINRequestsObjects request. +func (client *ResourceGuardsClient) getBackupSecurityPINRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getBackupSecurityPINRequestsObjectsHandleResponse handles the GetBackupSecurityPINRequestsObjects response. +func (client *ResourceGuardsClient) getBackupSecurityPINRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse, error) { + result := ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { + return ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse{}, err + } + return result, nil +} + +// GetDefaultBackupSecurityPINRequestsObject - Returns collection of operation request objects for a critical operation protected +// by the given ResourceGuard resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions contains the optional parameters for the +// ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject method. +func (client *ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions) (ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse, error) { + var err error + const operationName = "ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDefaultBackupSecurityPINRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) + if err != nil { + return ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse{}, err + } + resp, err := client.getDefaultBackupSecurityPINRequestsObjectHandleResponse(httpResp) + return resp, err +} + +// getDefaultBackupSecurityPINRequestsObjectCreateRequest creates the GetDefaultBackupSecurityPINRequestsObject request. +func (client *ResourceGuardsClient) getDefaultBackupSecurityPINRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests/{requestName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + if requestName == "" { + return nil, errors.New("parameter requestName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDefaultBackupSecurityPINRequestsObjectHandleResponse handles the GetDefaultBackupSecurityPINRequestsObject response. +func (client *ResourceGuardsClient) getDefaultBackupSecurityPINRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse, error) { + result := ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { + return ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse{}, err + } + return result, nil +} + +// GetDefaultDeleteProtectedItemRequestsObject - Returns collection of operation request objects for a critical operation +// protected by the given ResourceGuard resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions contains the optional parameters for the +// ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject method. +func (client *ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions) (ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse, error) { + var err error + const operationName = "ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDefaultDeleteProtectedItemRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) + if err != nil { + return ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse{}, err + } + resp, err := client.getDefaultDeleteProtectedItemRequestsObjectHandleResponse(httpResp) + return resp, err +} + +// getDefaultDeleteProtectedItemRequestsObjectCreateRequest creates the GetDefaultDeleteProtectedItemRequestsObject request. +func (client *ResourceGuardsClient) getDefaultDeleteProtectedItemRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests/{requestName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + if requestName == "" { + return nil, errors.New("parameter requestName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDefaultDeleteProtectedItemRequestsObjectHandleResponse handles the GetDefaultDeleteProtectedItemRequestsObject response. +func (client *ResourceGuardsClient) getDefaultDeleteProtectedItemRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse, error) { + result := ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { + return ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse{}, err + } + return result, nil +} + +// GetDefaultDeleteResourceGuardProxyRequestsObject - Returns collection of operation request objects for a critical operation +// protected by the given ResourceGuard resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions contains the optional parameters +// for the ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject method. +func (client *ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions) (ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse, error) { + var err error + const operationName = "ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDefaultDeleteResourceGuardProxyRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) + if err != nil { + return ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse{}, err + } + resp, err := client.getDefaultDeleteResourceGuardProxyRequestsObjectHandleResponse(httpResp) + return resp, err +} + +// getDefaultDeleteResourceGuardProxyRequestsObjectCreateRequest creates the GetDefaultDeleteResourceGuardProxyRequestsObject request. +func (client *ResourceGuardsClient) getDefaultDeleteResourceGuardProxyRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests/{requestName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + if requestName == "" { + return nil, errors.New("parameter requestName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDefaultDeleteResourceGuardProxyRequestsObjectHandleResponse handles the GetDefaultDeleteResourceGuardProxyRequestsObject response. +func (client *ResourceGuardsClient) getDefaultDeleteResourceGuardProxyRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse, error) { + result := ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { + return ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse{}, err + } + return result, nil +} + +// GetDefaultDisableSoftDeleteRequestsObject - Returns collection of operation request objects for a critical operation protected +// by the given ResourceGuard resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions contains the optional parameters for the +// ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject method. +func (client *ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions) (ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse, error) { + var err error + const operationName = "ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDefaultDisableSoftDeleteRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) + if err != nil { + return ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse{}, err + } + resp, err := client.getDefaultDisableSoftDeleteRequestsObjectHandleResponse(httpResp) + return resp, err +} + +// getDefaultDisableSoftDeleteRequestsObjectCreateRequest creates the GetDefaultDisableSoftDeleteRequestsObject request. +func (client *ResourceGuardsClient) getDefaultDisableSoftDeleteRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests/{requestName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + if requestName == "" { + return nil, errors.New("parameter requestName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDefaultDisableSoftDeleteRequestsObjectHandleResponse handles the GetDefaultDisableSoftDeleteRequestsObject response. +func (client *ResourceGuardsClient) getDefaultDisableSoftDeleteRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse, error) { + result := ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { + return ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse{}, err + } + return result, nil +} + +// GetDefaultUpdateProtectedItemRequestsObject - Returns collection of operation request objects for a critical operation +// protected by the given ResourceGuard resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions contains the optional parameters for the +// ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject method. +func (client *ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions) (ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse, error) { + var err error + const operationName = "ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDefaultUpdateProtectedItemRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) + if err != nil { + return ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse{}, err + } + resp, err := client.getDefaultUpdateProtectedItemRequestsObjectHandleResponse(httpResp) + return resp, err +} + +// getDefaultUpdateProtectedItemRequestsObjectCreateRequest creates the GetDefaultUpdateProtectedItemRequestsObject request. +func (client *ResourceGuardsClient) getDefaultUpdateProtectedItemRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests/{requestName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + if requestName == "" { + return nil, errors.New("parameter requestName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDefaultUpdateProtectedItemRequestsObjectHandleResponse handles the GetDefaultUpdateProtectedItemRequestsObject response. +func (client *ResourceGuardsClient) getDefaultUpdateProtectedItemRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse, error) { + result := ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { + return ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse{}, err + } + return result, nil +} + +// GetDefaultUpdateProtectionPolicyRequestsObject - Returns collection of operation request objects for a critical operation +// protected by the given ResourceGuard resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions contains the optional parameters for +// the ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject method. +func (client *ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions) (ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse, error) { + var err error + const operationName = "ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDefaultUpdateProtectionPolicyRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) + if err != nil { + return ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse{}, err + } + resp, err := client.getDefaultUpdateProtectionPolicyRequestsObjectHandleResponse(httpResp) + return resp, err +} + +// getDefaultUpdateProtectionPolicyRequestsObjectCreateRequest creates the GetDefaultUpdateProtectionPolicyRequestsObject request. +func (client *ResourceGuardsClient) getDefaultUpdateProtectionPolicyRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests/{requestName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + if requestName == "" { + return nil, errors.New("parameter requestName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDefaultUpdateProtectionPolicyRequestsObjectHandleResponse handles the GetDefaultUpdateProtectionPolicyRequestsObject response. +func (client *ResourceGuardsClient) getDefaultUpdateProtectionPolicyRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse, error) { + result := ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { + return ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse{}, err + } + return result, nil +} + +// NewGetDeleteProtectedItemRequestsObjectsPager - Returns collection of operation request objects for a critical operation +// protected by the given ResourceGuard resource. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.NewGetDeleteProtectedItemRequestsObjectsPager +// method. +func (client *ResourceGuardsClient) NewGetDeleteProtectedItemRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse]{ + More: func(page ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse) (ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGuardsClient.NewGetDeleteProtectedItemRequestsObjectsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getDeleteProtectedItemRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) + }, nil) + if err != nil { + return ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse{}, err + } + return client.getDeleteProtectedItemRequestsObjectsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getDeleteProtectedItemRequestsObjectsCreateRequest creates the GetDeleteProtectedItemRequestsObjects request. +func (client *ResourceGuardsClient) getDeleteProtectedItemRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDeleteProtectedItemRequestsObjectsHandleResponse handles the GetDeleteProtectedItemRequestsObjects response. +func (client *ResourceGuardsClient) getDeleteProtectedItemRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse, error) { + result := ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { + return ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse{}, err + } + return result, nil +} + +// NewGetDeleteResourceGuardProxyRequestsObjectsPager - Returns collection of operation request objects for a critical operation +// protected by the given ResourceGuard resource. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions contains the optional parameters for the +// ResourceGuardsClient.NewGetDeleteResourceGuardProxyRequestsObjectsPager method. +func (client *ResourceGuardsClient) NewGetDeleteResourceGuardProxyRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse]{ + More: func(page ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse) (ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGuardsClient.NewGetDeleteResourceGuardProxyRequestsObjectsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getDeleteResourceGuardProxyRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) + }, nil) + if err != nil { + return ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse{}, err + } + return client.getDeleteResourceGuardProxyRequestsObjectsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getDeleteResourceGuardProxyRequestsObjectsCreateRequest creates the GetDeleteResourceGuardProxyRequestsObjects request. +func (client *ResourceGuardsClient) getDeleteResourceGuardProxyRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDeleteResourceGuardProxyRequestsObjectsHandleResponse handles the GetDeleteResourceGuardProxyRequestsObjects response. +func (client *ResourceGuardsClient) getDeleteResourceGuardProxyRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse, error) { + result := ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { + return ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse{}, err + } + return result, nil +} + +// NewGetDisableSoftDeleteRequestsObjectsPager - Returns collection of operation request objects for a critical operation +// protected by the given ResourceGuard resource. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.NewGetDisableSoftDeleteRequestsObjectsPager +// method. +func (client *ResourceGuardsClient) NewGetDisableSoftDeleteRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse]{ + More: func(page ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse) (ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGuardsClient.NewGetDisableSoftDeleteRequestsObjectsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getDisableSoftDeleteRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) + }, nil) + if err != nil { + return ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse{}, err + } + return client.getDisableSoftDeleteRequestsObjectsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getDisableSoftDeleteRequestsObjectsCreateRequest creates the GetDisableSoftDeleteRequestsObjects request. +func (client *ResourceGuardsClient) getDisableSoftDeleteRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDisableSoftDeleteRequestsObjectsHandleResponse handles the GetDisableSoftDeleteRequestsObjects response. +func (client *ResourceGuardsClient) getDisableSoftDeleteRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse, error) { + result := ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { + return ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse{}, err + } + return result, nil +} + +// NewGetResourcesInResourceGroupPager - Returns ResourceGuards collection belonging to a ResourceGroup. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetResourcesInResourceGroupOptions contains the optional parameters for the ResourceGuardsClient.NewGetResourcesInResourceGroupPager +// method. +func (client *ResourceGuardsClient) NewGetResourcesInResourceGroupPager(resourceGroupName string, options *ResourceGuardsClientGetResourcesInResourceGroupOptions) *runtime.Pager[ResourceGuardsClientGetResourcesInResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetResourcesInResourceGroupResponse]{ + More: func(page ResourceGuardsClientGetResourcesInResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetResourcesInResourceGroupResponse) (ResourceGuardsClientGetResourcesInResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGuardsClient.NewGetResourcesInResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getResourcesInResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ResourceGuardsClientGetResourcesInResourceGroupResponse{}, err + } + return client.getResourcesInResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getResourcesInResourceGroupCreateRequest creates the GetResourcesInResourceGroup request. +func (client *ResourceGuardsClient) getResourcesInResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ResourceGuardsClientGetResourcesInResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getResourcesInResourceGroupHandleResponse handles the GetResourcesInResourceGroup response. +func (client *ResourceGuardsClient) getResourcesInResourceGroupHandleResponse(resp *http.Response) (ResourceGuardsClientGetResourcesInResourceGroupResponse, error) { + result := ResourceGuardsClientGetResourcesInResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardResourceList); err != nil { + return ResourceGuardsClientGetResourcesInResourceGroupResponse{}, err + } + return result, nil +} + +// NewGetResourcesInSubscriptionPager - Returns ResourceGuards collection belonging to a subscription. +// +// Generated from API version 2024-04-01 +// - options - ResourceGuardsClientGetResourcesInSubscriptionOptions contains the optional parameters for the ResourceGuardsClient.NewGetResourcesInSubscriptionPager +// method. +func (client *ResourceGuardsClient) NewGetResourcesInSubscriptionPager(options *ResourceGuardsClientGetResourcesInSubscriptionOptions) *runtime.Pager[ResourceGuardsClientGetResourcesInSubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetResourcesInSubscriptionResponse]{ + More: func(page ResourceGuardsClientGetResourcesInSubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetResourcesInSubscriptionResponse) (ResourceGuardsClientGetResourcesInSubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGuardsClient.NewGetResourcesInSubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getResourcesInSubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return ResourceGuardsClientGetResourcesInSubscriptionResponse{}, err + } + return client.getResourcesInSubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getResourcesInSubscriptionCreateRequest creates the GetResourcesInSubscription request. +func (client *ResourceGuardsClient) getResourcesInSubscriptionCreateRequest(ctx context.Context, options *ResourceGuardsClientGetResourcesInSubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/resourceGuards" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getResourcesInSubscriptionHandleResponse handles the GetResourcesInSubscription response. +func (client *ResourceGuardsClient) getResourcesInSubscriptionHandleResponse(resp *http.Response) (ResourceGuardsClientGetResourcesInSubscriptionResponse, error) { + result := ResourceGuardsClientGetResourcesInSubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardResourceList); err != nil { + return ResourceGuardsClientGetResourcesInSubscriptionResponse{}, err + } + return result, nil +} + +// NewGetUpdateProtectedItemRequestsObjectsPager - Returns collection of operation request objects for a critical operation +// protected by the given ResourceGuard resource. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.NewGetUpdateProtectedItemRequestsObjectsPager +// method. +func (client *ResourceGuardsClient) NewGetUpdateProtectedItemRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse]{ + More: func(page ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse) (ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGuardsClient.NewGetUpdateProtectedItemRequestsObjectsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getUpdateProtectedItemRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) + }, nil) + if err != nil { + return ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse{}, err + } + return client.getUpdateProtectedItemRequestsObjectsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getUpdateProtectedItemRequestsObjectsCreateRequest creates the GetUpdateProtectedItemRequestsObjects request. +func (client *ResourceGuardsClient) getUpdateProtectedItemRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getUpdateProtectedItemRequestsObjectsHandleResponse handles the GetUpdateProtectedItemRequestsObjects response. +func (client *ResourceGuardsClient) getUpdateProtectedItemRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse, error) { + result := ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { + return ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse{}, err + } + return result, nil +} + +// NewGetUpdateProtectionPolicyRequestsObjectsPager - Returns collection of operation request objects for a critical operation +// protected by the given ResourceGuard resource. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions contains the optional parameters for the +// ResourceGuardsClient.NewGetUpdateProtectionPolicyRequestsObjectsPager method. +func (client *ResourceGuardsClient) NewGetUpdateProtectionPolicyRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse]{ + More: func(page ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse) (ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGuardsClient.NewGetUpdateProtectionPolicyRequestsObjectsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getUpdateProtectionPolicyRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) + }, nil) + if err != nil { + return ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse{}, err + } + return client.getUpdateProtectionPolicyRequestsObjectsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getUpdateProtectionPolicyRequestsObjectsCreateRequest creates the GetUpdateProtectionPolicyRequestsObjects request. +func (client *ResourceGuardsClient) getUpdateProtectionPolicyRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getUpdateProtectionPolicyRequestsObjectsHandleResponse handles the GetUpdateProtectionPolicyRequestsObjects response. +func (client *ResourceGuardsClient) getUpdateProtectionPolicyRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse, error) { + result := ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { + return ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse{}, err + } + return result, nil +} + +// Patch - Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceGuardsName - The name of ResourceGuard +// - parameters - Request body for operation +// - options - ResourceGuardsClientPatchOptions contains the optional parameters for the ResourceGuardsClient.Patch method. +func (client *ResourceGuardsClient) Patch(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters PatchResourceGuardInput, options *ResourceGuardsClientPatchOptions) (ResourceGuardsClientPatchResponse, error) { + var err error + const operationName = "ResourceGuardsClient.Patch" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.patchCreateRequest(ctx, resourceGroupName, resourceGuardsName, parameters, options) + if err != nil { + return ResourceGuardsClientPatchResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardsClientPatchResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardsClientPatchResponse{}, err + } + resp, err := client.patchHandleResponse(httpResp) + return resp, err +} + +// patchCreateRequest creates the Patch request. +func (client *ResourceGuardsClient) patchCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters PatchResourceGuardInput, options *ResourceGuardsClientPatchOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// patchHandleResponse handles the Patch response. +func (client *ResourceGuardsClient) patchHandleResponse(resp *http.Response) (ResourceGuardsClientPatchResponse, error) { + result := ResourceGuardsClientPatchResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardResource); err != nil { + return ResourceGuardsClientPatchResponse{}, err + } + return result, nil +} + +// Put - Creates or updates a ResourceGuard resource belonging to a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceGuardsName - The name of ResourceGuard +// - parameters - Request body for operation +// - options - ResourceGuardsClientPutOptions contains the optional parameters for the ResourceGuardsClient.Put method. +func (client *ResourceGuardsClient) Put(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters ResourceGuardResource, options *ResourceGuardsClientPutOptions) (ResourceGuardsClientPutResponse, error) { + var err error + const operationName = "ResourceGuardsClient.Put" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.putCreateRequest(ctx, resourceGroupName, resourceGuardsName, parameters, options) + if err != nil { + return ResourceGuardsClientPutResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardsClientPutResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardsClientPutResponse{}, err + } + resp, err := client.putHandleResponse(httpResp) + return resp, err +} + +// putCreateRequest creates the Put request. +func (client *ResourceGuardsClient) putCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters ResourceGuardResource, options *ResourceGuardsClientPutOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardsName == "" { + return nil, errors.New("parameter resourceGuardsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// putHandleResponse handles the Put response. +func (client *ResourceGuardsClient) putHandleResponse(resp *http.Response) (ResourceGuardsClientPutResponse, error) { + result := ResourceGuardsClientPutResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardResource); err != nil { + return ResourceGuardsClientPutResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/responses.go new file mode 100644 index 00000000..f9538c3c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/responses.go @@ -0,0 +1,453 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +// BackupInstancesClientAdhocBackupResponse contains the response from method BackupInstancesClient.BeginAdhocBackup. +type BackupInstancesClientAdhocBackupResponse struct { + // Operation Job Extended Info + OperationJobExtendedInfo +} + +// BackupInstancesClientCreateOrUpdateResponse contains the response from method BackupInstancesClient.BeginCreateOrUpdate. +type BackupInstancesClientCreateOrUpdateResponse struct { + // BackupInstance Resource + BackupInstanceResource +} + +// BackupInstancesClientDeleteResponse contains the response from method BackupInstancesClient.BeginDelete. +type BackupInstancesClientDeleteResponse struct { + // placeholder for future response values +} + +// BackupInstancesClientGetBackupInstanceOperationResultResponse contains the response from method BackupInstancesClient.GetBackupInstanceOperationResult. +type BackupInstancesClientGetBackupInstanceOperationResultResponse struct { + // BackupInstance Resource + BackupInstanceResource +} + +// BackupInstancesClientGetResponse contains the response from method BackupInstancesClient.Get. +type BackupInstancesClientGetResponse struct { + // BackupInstance Resource + BackupInstanceResource +} + +// BackupInstancesClientListResponse contains the response from method BackupInstancesClient.NewListPager. +type BackupInstancesClientListResponse struct { + // BackupInstance Resource list response + BackupInstanceResourceList +} + +// BackupInstancesClientResumeBackupsResponse contains the response from method BackupInstancesClient.BeginResumeBackups. +type BackupInstancesClientResumeBackupsResponse struct { + // placeholder for future response values +} + +// BackupInstancesClientResumeProtectionResponse contains the response from method BackupInstancesClient.BeginResumeProtection. +type BackupInstancesClientResumeProtectionResponse struct { + // placeholder for future response values +} + +// BackupInstancesClientStopProtectionResponse contains the response from method BackupInstancesClient.BeginStopProtection. +type BackupInstancesClientStopProtectionResponse struct { + // placeholder for future response values +} + +// BackupInstancesClientSuspendBackupsResponse contains the response from method BackupInstancesClient.BeginSuspendBackups. +type BackupInstancesClientSuspendBackupsResponse struct { + // placeholder for future response values +} + +// BackupInstancesClientSyncBackupInstanceResponse contains the response from method BackupInstancesClient.BeginSyncBackupInstance. +type BackupInstancesClientSyncBackupInstanceResponse struct { + // placeholder for future response values +} + +// BackupInstancesClientTriggerCrossRegionRestoreResponse contains the response from method BackupInstancesClient.BeginTriggerCrossRegionRestore. +type BackupInstancesClientTriggerCrossRegionRestoreResponse struct { + // Operation Job Extended Info + OperationJobExtendedInfo +} + +// BackupInstancesClientTriggerRehydrateResponse contains the response from method BackupInstancesClient.BeginTriggerRehydrate. +type BackupInstancesClientTriggerRehydrateResponse struct { + // placeholder for future response values +} + +// BackupInstancesClientTriggerRestoreResponse contains the response from method BackupInstancesClient.BeginTriggerRestore. +type BackupInstancesClientTriggerRestoreResponse struct { + // Operation Job Extended Info + OperationJobExtendedInfo +} + +// BackupInstancesClientValidateCrossRegionRestoreResponse contains the response from method BackupInstancesClient.BeginValidateCrossRegionRestore. +type BackupInstancesClientValidateCrossRegionRestoreResponse struct { + // Operation Job Extended Info + OperationJobExtendedInfo +} + +// BackupInstancesClientValidateForBackupResponse contains the response from method BackupInstancesClient.BeginValidateForBackup. +type BackupInstancesClientValidateForBackupResponse struct { + // Operation Job Extended Info + OperationJobExtendedInfo +} + +// BackupInstancesClientValidateForRestoreResponse contains the response from method BackupInstancesClient.BeginValidateForRestore. +type BackupInstancesClientValidateForRestoreResponse struct { + // Operation Job Extended Info + OperationJobExtendedInfo +} + +// BackupInstancesExtensionRoutingClientListResponse contains the response from method BackupInstancesExtensionRoutingClient.NewListPager. +type BackupInstancesExtensionRoutingClientListResponse struct { + // BackupInstance Resource list response + BackupInstanceResourceList +} + +// BackupPoliciesClientCreateOrUpdateResponse contains the response from method BackupPoliciesClient.CreateOrUpdate. +type BackupPoliciesClientCreateOrUpdateResponse struct { + // BaseBackupPolicy resource + BaseBackupPolicyResource +} + +// BackupPoliciesClientDeleteResponse contains the response from method BackupPoliciesClient.Delete. +type BackupPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// BackupPoliciesClientGetResponse contains the response from method BackupPoliciesClient.Get. +type BackupPoliciesClientGetResponse struct { + // BaseBackupPolicy resource + BaseBackupPolicyResource +} + +// BackupPoliciesClientListResponse contains the response from method BackupPoliciesClient.NewListPager. +type BackupPoliciesClientListResponse struct { + // List of BaseBackupPolicy resources + BaseBackupPolicyResourceList +} + +// BackupVaultOperationResultsClientGetResponse contains the response from method BackupVaultOperationResultsClient.Get. +type BackupVaultOperationResultsClientGetResponse struct { + // Backup Vault Resource + BackupVaultResource + + // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. + AzureAsyncOperation *string + + // Location contains the information returned from the Location header response. + Location *string + + // RetryAfter contains the information returned from the Retry-After header response. + RetryAfter *int32 +} + +// BackupVaultsClientCheckNameAvailabilityResponse contains the response from method BackupVaultsClient.CheckNameAvailability. +type BackupVaultsClientCheckNameAvailabilityResponse struct { + // CheckNameAvailability Result + CheckNameAvailabilityResult +} + +// BackupVaultsClientCreateOrUpdateResponse contains the response from method BackupVaultsClient.BeginCreateOrUpdate. +type BackupVaultsClientCreateOrUpdateResponse struct { + // Backup Vault Resource + BackupVaultResource +} + +// BackupVaultsClientDeleteResponse contains the response from method BackupVaultsClient.BeginDelete. +type BackupVaultsClientDeleteResponse struct { + // placeholder for future response values +} + +// BackupVaultsClientGetInResourceGroupResponse contains the response from method BackupVaultsClient.NewGetInResourceGroupPager. +type BackupVaultsClientGetInResourceGroupResponse struct { + // List of BackupVault resources + BackupVaultResourceList +} + +// BackupVaultsClientGetInSubscriptionResponse contains the response from method BackupVaultsClient.NewGetInSubscriptionPager. +type BackupVaultsClientGetInSubscriptionResponse struct { + // List of BackupVault resources + BackupVaultResourceList +} + +// BackupVaultsClientGetResponse contains the response from method BackupVaultsClient.Get. +type BackupVaultsClientGetResponse struct { + // Backup Vault Resource + BackupVaultResource +} + +// BackupVaultsClientUpdateResponse contains the response from method BackupVaultsClient.BeginUpdate. +type BackupVaultsClientUpdateResponse struct { + // Backup Vault Resource + BackupVaultResource +} + +// ClientCheckFeatureSupportResponse contains the response from method Client.CheckFeatureSupport. +type ClientCheckFeatureSupportResponse struct { + // Base class for Backup Feature support + FeatureValidationResponseBaseClassification +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientCheckFeatureSupportResponse. +func (c *ClientCheckFeatureSupportResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalFeatureValidationResponseBaseClassification(data) + if err != nil { + return err + } + c.FeatureValidationResponseBaseClassification = res + return nil +} + +// DeletedBackupInstancesClientGetResponse contains the response from method DeletedBackupInstancesClient.Get. +type DeletedBackupInstancesClientGetResponse struct { + // Deleted Backup Instance + DeletedBackupInstanceResource +} + +// DeletedBackupInstancesClientListResponse contains the response from method DeletedBackupInstancesClient.NewListPager. +type DeletedBackupInstancesClientListResponse struct { + // List of DeletedBackupInstance resources + DeletedBackupInstanceResourceList +} + +// DeletedBackupInstancesClientUndeleteResponse contains the response from method DeletedBackupInstancesClient.BeginUndelete. +type DeletedBackupInstancesClientUndeleteResponse struct { + // placeholder for future response values +} + +// DppResourceGuardProxyClientCreateOrUpdateResponse contains the response from method DppResourceGuardProxyClient.CreateOrUpdate. +type DppResourceGuardProxyClientCreateOrUpdateResponse struct { + // ResourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + ResourceGuardProxyBaseResource +} + +// DppResourceGuardProxyClientDeleteResponse contains the response from method DppResourceGuardProxyClient.Delete. +type DppResourceGuardProxyClientDeleteResponse struct { + // placeholder for future response values +} + +// DppResourceGuardProxyClientGetResponse contains the response from method DppResourceGuardProxyClient.Get. +type DppResourceGuardProxyClientGetResponse struct { + // ResourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + ResourceGuardProxyBaseResource +} + +// DppResourceGuardProxyClientListResponse contains the response from method DppResourceGuardProxyClient.NewListPager. +type DppResourceGuardProxyClientListResponse struct { + // List of ResourceGuardProxyBase resources + ResourceGuardProxyBaseResourceList +} + +// DppResourceGuardProxyClientUnlockDeleteResponse contains the response from method DppResourceGuardProxyClient.UnlockDelete. +type DppResourceGuardProxyClientUnlockDeleteResponse struct { + // Response of Unlock Delete API. + UnlockDeleteResponse +} + +// ExportJobsClientTriggerResponse contains the response from method ExportJobsClient.BeginTrigger. +type ExportJobsClientTriggerResponse struct { + // placeholder for future response values +} + +// ExportJobsOperationResultClientGetResponse contains the response from method ExportJobsOperationResultClient.Get. +type ExportJobsOperationResultClientGetResponse struct { + // The result for export jobs containing blob details. + ExportJobsResult +} + +// FetchCrossRegionRestoreJobClientGetResponse contains the response from method FetchCrossRegionRestoreJobClient.Get. +type FetchCrossRegionRestoreJobClientGetResponse struct { + // AzureBackup Job Resource Class + AzureBackupJobResource +} + +// FetchCrossRegionRestoreJobsClientListResponse contains the response from method FetchCrossRegionRestoreJobsClient.NewListPager. +type FetchCrossRegionRestoreJobsClientListResponse struct { + // List of AzureBackup Job resources + AzureBackupJobResourceList +} + +// FetchSecondaryRecoveryPointsClientListResponse contains the response from method FetchSecondaryRecoveryPointsClient.NewListPager. +type FetchSecondaryRecoveryPointsClientListResponse struct { + // Azure backup recoveryPoint resource list + AzureBackupRecoveryPointResourceList +} + +// JobsClientGetResponse contains the response from method JobsClient.Get. +type JobsClientGetResponse struct { + // AzureBackup Job Resource Class + AzureBackupJobResource +} + +// JobsClientListResponse contains the response from method JobsClient.NewListPager. +type JobsClientListResponse struct { + // List of AzureBackup Job resources + AzureBackupJobResourceList +} + +// OperationResultClientGetResponse contains the response from method OperationResultClient.Get. +type OperationResultClientGetResponse struct { + // Operation Job Extended Info + OperationJobExtendedInfo + + // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. + AzureAsyncOperation *string + + // Location contains the information returned from the Location header response. + Location *string + + // RetryAfter contains the information returned from the Retry-After header response. + RetryAfter *int32 +} + +// OperationStatusBackupVaultContextClientGetResponse contains the response from method OperationStatusBackupVaultContextClient.Get. +type OperationStatusBackupVaultContextClientGetResponse struct { + // Operation Resource + OperationResource +} + +// OperationStatusClientGetResponse contains the response from method OperationStatusClient.Get. +type OperationStatusClientGetResponse struct { + // Operation Resource + OperationResource +} + +// OperationStatusResourceGroupContextClientGetResponse contains the response from method OperationStatusResourceGroupContextClient.Get. +type OperationStatusResourceGroupContextClientGetResponse struct { + // Operation Resource + OperationResource +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Operations List response which contains list of available APIs. + ClientDiscoveryResponse +} + +// RecoveryPointsClientGetResponse contains the response from method RecoveryPointsClient.Get. +type RecoveryPointsClientGetResponse struct { + // Azure backup recoveryPoint resource + AzureBackupRecoveryPointResource +} + +// RecoveryPointsClientListResponse contains the response from method RecoveryPointsClient.NewListPager. +type RecoveryPointsClientListResponse struct { + // Azure backup recoveryPoint resource list + AzureBackupRecoveryPointResourceList +} + +// ResourceGuardsClientDeleteResponse contains the response from method ResourceGuardsClient.Delete. +type ResourceGuardsClientDeleteResponse struct { + // placeholder for future response values +} + +// ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse contains the response from method ResourceGuardsClient.NewGetBackupSecurityPINRequestsObjectsPager. +type ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse struct { + // Base for all lists of V2 resources. + DppBaseResourceList +} + +// ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject. +type ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse struct { + // Base resource under Microsoft.DataProtection provider namespace + DppBaseResource +} + +// ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject. +type ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse struct { + // Base resource under Microsoft.DataProtection provider namespace + DppBaseResource +} + +// ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject. +type ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse struct { + // Base resource under Microsoft.DataProtection provider namespace + DppBaseResource +} + +// ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject. +type ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse struct { + // Base resource under Microsoft.DataProtection provider namespace + DppBaseResource +} + +// ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject. +type ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse struct { + // Base resource under Microsoft.DataProtection provider namespace + DppBaseResource +} + +// ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject. +type ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse struct { + // Base resource under Microsoft.DataProtection provider namespace + DppBaseResource +} + +// ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse contains the response from method ResourceGuardsClient.NewGetDeleteProtectedItemRequestsObjectsPager. +type ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse struct { + // Base for all lists of V2 resources. + DppBaseResourceList +} + +// ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse contains the response from method ResourceGuardsClient.NewGetDeleteResourceGuardProxyRequestsObjectsPager. +type ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse struct { + // Base for all lists of V2 resources. + DppBaseResourceList +} + +// ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse contains the response from method ResourceGuardsClient.NewGetDisableSoftDeleteRequestsObjectsPager. +type ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse struct { + // Base for all lists of V2 resources. + DppBaseResourceList +} + +// ResourceGuardsClientGetResourcesInResourceGroupResponse contains the response from method ResourceGuardsClient.NewGetResourcesInResourceGroupPager. +type ResourceGuardsClientGetResourcesInResourceGroupResponse struct { + // List of ResourceGuard resources + ResourceGuardResourceList +} + +// ResourceGuardsClientGetResourcesInSubscriptionResponse contains the response from method ResourceGuardsClient.NewGetResourcesInSubscriptionPager. +type ResourceGuardsClientGetResourcesInSubscriptionResponse struct { + // List of ResourceGuard resources + ResourceGuardResourceList +} + +// ResourceGuardsClientGetResponse contains the response from method ResourceGuardsClient.Get. +type ResourceGuardsClientGetResponse struct { + ResourceGuardResource +} + +// ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse contains the response from method ResourceGuardsClient.NewGetUpdateProtectedItemRequestsObjectsPager. +type ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse struct { + // Base for all lists of V2 resources. + DppBaseResourceList +} + +// ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse contains the response from method ResourceGuardsClient.NewGetUpdateProtectionPolicyRequestsObjectsPager. +type ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse struct { + // Base for all lists of V2 resources. + DppBaseResourceList +} + +// ResourceGuardsClientPatchResponse contains the response from method ResourceGuardsClient.Patch. +type ResourceGuardsClientPatchResponse struct { + ResourceGuardResource +} + +// ResourceGuardsClientPutResponse contains the response from method ResourceGuardsClient.Put. +type ResourceGuardsClientPutResponse struct { + ResourceGuardResource +} + +// RestorableTimeRangesClientFindResponse contains the response from method RestorableTimeRangesClient.Find. +type RestorableTimeRangesClientFindResponse struct { + // List Restore Ranges Response + AzureBackupFindRestorableTimeRangesResponseResource +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/restorabletimeranges_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/restorabletimeranges_client.go new file mode 100644 index 00000000..0c113b5b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/restorabletimeranges_client.go @@ -0,0 +1,118 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RestorableTimeRangesClient contains the methods for the RestorableTimeRanges group. +// Don't use this type directly, use NewRestorableTimeRangesClient() instead. +type RestorableTimeRangesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRestorableTimeRangesClient creates a new instance of RestorableTimeRangesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRestorableTimeRangesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableTimeRangesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RestorableTimeRangesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Find - +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - vaultName - The name of the backup vault. +// - backupInstanceName - The name of the backup instance. +// - parameters - Request body for operation +// - options - RestorableTimeRangesClientFindOptions contains the optional parameters for the RestorableTimeRangesClient.Find +// method. +func (client *RestorableTimeRangesClient) Find(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupFindRestorableTimeRangesRequest, options *RestorableTimeRangesClientFindOptions) (RestorableTimeRangesClientFindResponse, error) { + var err error + const operationName = "RestorableTimeRangesClient.Find" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.findCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) + if err != nil { + return RestorableTimeRangesClientFindResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RestorableTimeRangesClientFindResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RestorableTimeRangesClientFindResponse{}, err + } + resp, err := client.findHandleResponse(httpResp) + return resp, err +} + +// findCreateRequest creates the Find request. +func (client *RestorableTimeRangesClient) findCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupFindRestorableTimeRangesRequest, options *RestorableTimeRangesClientFindOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if backupInstanceName == "" { + return nil, errors.New("parameter backupInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// findHandleResponse handles the Find response. +func (client *RestorableTimeRangesClient) findHandleResponse(resp *http.Response) (RestorableTimeRangesClientFindResponse, error) { + result := RestorableTimeRangesClientFindResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupFindRestorableTimeRangesResponseResource); err != nil { + return RestorableTimeRangesClientFindResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/time_rfc3339.go new file mode 100644 index 00000000..275d50fc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3/time_rfc3339.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdataprotection + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupinstances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupinstances_client.go deleted file mode 100644 index 85f2dfcf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupinstances_client.go +++ /dev/null @@ -1,1064 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupInstancesClient contains the methods for the BackupInstances group. -// Don't use this type directly, use NewBackupInstancesClient() instead. -type BackupInstancesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupInstancesClient creates a new instance of BackupInstancesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupInstancesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupInstancesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginAdhocBackup - Trigger adhoc backup -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// backupInstanceName - The name of the backup instance -// parameters - Request body for operation -// options - BackupInstancesClientBeginAdhocBackupOptions contains the optional parameters for the BackupInstancesClient.BeginAdhocBackup -// method. -func (client *BackupInstancesClient) BeginAdhocBackup(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters TriggerBackupRequest, options *BackupInstancesClientBeginAdhocBackupOptions) (*runtime.Poller[BackupInstancesClientAdhocBackupResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.adhocBackup(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientAdhocBackupResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientAdhocBackupResponse](options.ResumeToken, client.pl, nil) - } -} - -// AdhocBackup - Trigger adhoc backup -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) adhocBackup(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters TriggerBackupRequest, options *BackupInstancesClientBeginAdhocBackupOptions) (*http.Response, error) { - req, err := client.adhocBackupCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// adhocBackupCreateRequest creates the AdhocBackup request. -func (client *BackupInstancesClient) adhocBackupCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters TriggerBackupRequest, options *BackupInstancesClientBeginAdhocBackupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginCreateOrUpdate - Create or update a backup instance in a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// backupInstanceName - The name of the backup instance -// parameters - Request body for operation -// options - BackupInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupInstancesClient.BeginCreateOrUpdate -// method. -func (client *BackupInstancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters BackupInstanceResource, options *BackupInstancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[BackupInstancesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update a backup instance in a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) createOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters BackupInstanceResource, options *BackupInstancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *BackupInstancesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters BackupInstanceResource, options *BackupInstancesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Delete a backup instance in a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// backupInstanceName - The name of the backup instance -// options - BackupInstancesClientBeginDeleteOptions contains the optional parameters for the BackupInstancesClient.BeginDelete -// method. -func (client *BackupInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginDeleteOptions) (*runtime.Poller[BackupInstancesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete a backup instance in a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) deleteOperation(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *BackupInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a backup instance with name in a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// backupInstanceName - The name of the backup instance -// options - BackupInstancesClientGetOptions contains the optional parameters for the BackupInstancesClient.Get method. -func (client *BackupInstancesClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientGetOptions) (BackupInstancesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return BackupInstancesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupInstancesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupInstancesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupInstancesClient) getHandleResponse(resp *http.Response) (BackupInstancesClientGetResponse, error) { - result := BackupInstancesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupInstanceResource); err != nil { - return BackupInstancesClientGetResponse{}, err - } - return result, nil -} - -// GetBackupInstanceOperationResult - Get result of backup instance creation operation -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupInstancesClientGetBackupInstanceOperationResultOptions contains the optional parameters for the BackupInstancesClient.GetBackupInstanceOperationResult -// method. -func (client *BackupInstancesClient) GetBackupInstanceOperationResult(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, operationID string, options *BackupInstancesClientGetBackupInstanceOperationResultOptions) (BackupInstancesClientGetBackupInstanceOperationResultResponse, error) { - req, err := client.getBackupInstanceOperationResultCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, operationID, options) - if err != nil { - return BackupInstancesClientGetBackupInstanceOperationResultResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupInstancesClientGetBackupInstanceOperationResultResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return BackupInstancesClientGetBackupInstanceOperationResultResponse{}, runtime.NewResponseError(resp) - } - return client.getBackupInstanceOperationResultHandleResponse(resp) -} - -// getBackupInstanceOperationResultCreateRequest creates the GetBackupInstanceOperationResult request. -func (client *BackupInstancesClient) getBackupInstanceOperationResultCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, operationID string, options *BackupInstancesClientGetBackupInstanceOperationResultOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/operationResults/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBackupInstanceOperationResultHandleResponse handles the GetBackupInstanceOperationResult response. -func (client *BackupInstancesClient) getBackupInstanceOperationResultHandleResponse(resp *http.Response) (BackupInstancesClientGetBackupInstanceOperationResultResponse, error) { - result := BackupInstancesClientGetBackupInstanceOperationResultResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupInstanceResource); err != nil { - return BackupInstancesClientGetBackupInstanceOperationResultResponse{}, err - } - return result, nil -} - -// NewListPager - Gets a backup instances belonging to a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupInstancesClientListOptions contains the optional parameters for the BackupInstancesClient.List method. -func (client *BackupInstancesClient) NewListPager(resourceGroupName string, vaultName string, options *BackupInstancesClientListOptions) *runtime.Pager[BackupInstancesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupInstancesClientListResponse]{ - More: func(page BackupInstancesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupInstancesClientListResponse) (BackupInstancesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, vaultName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupInstancesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupInstancesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupInstancesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupInstancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *BackupInstancesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupInstancesClient) listHandleResponse(resp *http.Response) (BackupInstancesClientListResponse, error) { - result := BackupInstancesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupInstanceResourceList); err != nil { - return BackupInstancesClientListResponse{}, err - } - return result, nil -} - -// BeginResumeBackups - This operation will resume backups for backup instance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupInstancesClientBeginResumeBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginResumeBackups -// method. -func (client *BackupInstancesClient) BeginResumeBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeBackupsOptions) (*runtime.Poller[BackupInstancesClientResumeBackupsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resumeBackups(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientResumeBackupsResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientResumeBackupsResponse](options.ResumeToken, client.pl, nil) - } -} - -// ResumeBackups - This operation will resume backups for backup instance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) resumeBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeBackupsOptions) (*http.Response, error) { - req, err := client.resumeBackupsCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resumeBackupsCreateRequest creates the ResumeBackups request. -func (client *BackupInstancesClient) resumeBackupsCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeBackupsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeBackups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginResumeProtection - This operation will resume protection for a stopped backup instance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupInstancesClientBeginResumeProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginResumeProtection -// method. -func (client *BackupInstancesClient) BeginResumeProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeProtectionOptions) (*runtime.Poller[BackupInstancesClientResumeProtectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resumeProtection(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientResumeProtectionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientResumeProtectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// ResumeProtection - This operation will resume protection for a stopped backup instance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) resumeProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeProtectionOptions) (*http.Response, error) { - req, err := client.resumeProtectionCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resumeProtectionCreateRequest creates the ResumeProtection request. -func (client *BackupInstancesClient) resumeProtectionCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginResumeProtectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeProtection" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStopProtection - This operation will stop protection of a backup instance and data will be held forever -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupInstancesClientBeginStopProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginStopProtection -// method. -func (client *BackupInstancesClient) BeginStopProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginStopProtectionOptions) (*runtime.Poller[BackupInstancesClientStopProtectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stopProtection(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientStopProtectionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientStopProtectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// StopProtection - This operation will stop protection of a backup instance and data will be held forever -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) stopProtection(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginStopProtectionOptions) (*http.Response, error) { - req, err := client.stopProtectionCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopProtectionCreateRequest creates the StopProtection request. -func (client *BackupInstancesClient) stopProtectionCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginStopProtectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/stopProtection" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginSuspendBackups - This operation will stop backups for backup instance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupInstancesClientBeginSuspendBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginSuspendBackups -// method. -func (client *BackupInstancesClient) BeginSuspendBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginSuspendBackupsOptions) (*runtime.Poller[BackupInstancesClientSuspendBackupsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.suspendBackups(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientSuspendBackupsResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientSuspendBackupsResponse](options.ResumeToken, client.pl, nil) - } -} - -// SuspendBackups - This operation will stop backups for backup instance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) suspendBackups(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginSuspendBackupsOptions) (*http.Response, error) { - req, err := client.suspendBackupsCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// suspendBackupsCreateRequest creates the SuspendBackups request. -func (client *BackupInstancesClient) suspendBackupsCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *BackupInstancesClientBeginSuspendBackupsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/suspendBackups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginSyncBackupInstance - Sync backup instance again in case of failure This action will retry last failed operation and -// will bring backup instance to valid state -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// parameters - Request body for operation -// options - BackupInstancesClientBeginSyncBackupInstanceOptions contains the optional parameters for the BackupInstancesClient.BeginSyncBackupInstance -// method. -func (client *BackupInstancesClient) BeginSyncBackupInstance(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters SyncBackupInstanceRequest, options *BackupInstancesClientBeginSyncBackupInstanceOptions) (*runtime.Poller[BackupInstancesClientSyncBackupInstanceResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.syncBackupInstance(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientSyncBackupInstanceResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientSyncBackupInstanceResponse](options.ResumeToken, client.pl, nil) - } -} - -// SyncBackupInstance - Sync backup instance again in case of failure This action will retry last failed operation and will -// bring backup instance to valid state -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) syncBackupInstance(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters SyncBackupInstanceRequest, options *BackupInstancesClientBeginSyncBackupInstanceOptions) (*http.Response, error) { - req, err := client.syncBackupInstanceCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// syncBackupInstanceCreateRequest creates the SyncBackupInstance request. -func (client *BackupInstancesClient) syncBackupInstanceCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters SyncBackupInstanceRequest, options *BackupInstancesClientBeginSyncBackupInstanceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/sync" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginTriggerRehydrate - rehydrate recovery point for restore for a BackupInstance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// parameters - Request body for operation -// options - BackupInstancesClientBeginTriggerRehydrateOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRehydrate -// method. -func (client *BackupInstancesClient) BeginTriggerRehydrate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRehydrationRequest, options *BackupInstancesClientBeginTriggerRehydrateOptions) (*runtime.Poller[BackupInstancesClientTriggerRehydrateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.triggerRehydrate(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientTriggerRehydrateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientTriggerRehydrateResponse](options.ResumeToken, client.pl, nil) - } -} - -// TriggerRehydrate - rehydrate recovery point for restore for a BackupInstance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) triggerRehydrate(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRehydrationRequest, options *BackupInstancesClientBeginTriggerRehydrateOptions) (*http.Response, error) { - req, err := client.triggerRehydrateCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// triggerRehydrateCreateRequest creates the TriggerRehydrate request. -func (client *BackupInstancesClient) triggerRehydrateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRehydrationRequest, options *BackupInstancesClientBeginTriggerRehydrateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginTriggerRestore - Triggers restore for a BackupInstance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// backupInstanceName - The name of the backup instance -// parameters - Request body for operation -// options - BackupInstancesClientBeginTriggerRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRestore -// method. -func (client *BackupInstancesClient) BeginTriggerRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRestoreRequestClassification, options *BackupInstancesClientBeginTriggerRestoreOptions) (*runtime.Poller[BackupInstancesClientTriggerRestoreResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.triggerRestore(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientTriggerRestoreResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientTriggerRestoreResponse](options.ResumeToken, client.pl, nil) - } -} - -// TriggerRestore - Triggers restore for a BackupInstance -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) triggerRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRestoreRequestClassification, options *BackupInstancesClientBeginTriggerRestoreOptions) (*http.Response, error) { - req, err := client.triggerRestoreCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// triggerRestoreCreateRequest creates the TriggerRestore request. -func (client *BackupInstancesClient) triggerRestoreCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupRestoreRequestClassification, options *BackupInstancesClientBeginTriggerRestoreOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginValidateForBackup - Validate whether adhoc backup will be successful or not -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// parameters - Request body for operation -// options - BackupInstancesClientBeginValidateForBackupOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForBackup -// method. -func (client *BackupInstancesClient) BeginValidateForBackup(ctx context.Context, resourceGroupName string, vaultName string, parameters ValidateForBackupRequest, options *BackupInstancesClientBeginValidateForBackupOptions) (*runtime.Poller[BackupInstancesClientValidateForBackupResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.validateForBackup(ctx, resourceGroupName, vaultName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientValidateForBackupResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientValidateForBackupResponse](options.ResumeToken, client.pl, nil) - } -} - -// ValidateForBackup - Validate whether adhoc backup will be successful or not -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) validateForBackup(ctx context.Context, resourceGroupName string, vaultName string, parameters ValidateForBackupRequest, options *BackupInstancesClientBeginValidateForBackupOptions) (*http.Response, error) { - req, err := client.validateForBackupCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// validateForBackupCreateRequest creates the ValidateForBackup request. -func (client *BackupInstancesClient) validateForBackupCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters ValidateForBackupRequest, options *BackupInstancesClientBeginValidateForBackupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginValidateForRestore - Validates if Restore can be triggered for a DataSource -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// backupInstanceName - The name of the backup instance -// parameters - Request body for operation -// options - BackupInstancesClientBeginValidateForRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForRestore -// method. -func (client *BackupInstancesClient) BeginValidateForRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters ValidateRestoreRequestObject, options *BackupInstancesClientBeginValidateForRestoreOptions) (*runtime.Poller[BackupInstancesClientValidateForRestoreResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.validateForRestore(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupInstancesClientValidateForRestoreResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupInstancesClientValidateForRestoreResponse](options.ResumeToken, client.pl, nil) - } -} - -// ValidateForRestore - Validates if Restore can be triggered for a DataSource -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupInstancesClient) validateForRestore(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters ValidateRestoreRequestObject, options *BackupInstancesClientBeginValidateForRestoreOptions) (*http.Response, error) { - req, err := client.validateForRestoreCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// validateForRestoreCreateRequest creates the ValidateForRestore request. -func (client *BackupInstancesClient) validateForRestoreCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters ValidateRestoreRequestObject, options *BackupInstancesClientBeginValidateForRestoreOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backuppolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backuppolicies_client.go deleted file mode 100644 index 025bd98f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backuppolicies_client.go +++ /dev/null @@ -1,298 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupPoliciesClient contains the methods for the BackupPolicies group. -// Don't use this type directly, use NewBackupPoliciesClient() instead. -type BackupPoliciesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupPoliciesClient creates a new instance of BackupPoliciesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupPoliciesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupPoliciesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or Updates a backup policy belonging to a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// backupPolicyName - Name of the policy -// parameters - Request body for operation -// options - BackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BackupPoliciesClient.CreateOrUpdate -// method. -func (client *BackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, parameters BaseBackupPolicyResource, options *BackupPoliciesClientCreateOrUpdateOptions) (BackupPoliciesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, backupPolicyName, parameters, options) - if err != nil { - return BackupPoliciesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupPoliciesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *BackupPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, parameters BaseBackupPolicyResource, options *BackupPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupPolicyName == "" { - return nil, errors.New("parameter backupPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *BackupPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (BackupPoliciesClientCreateOrUpdateResponse, error) { - result := BackupPoliciesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BaseBackupPolicyResource); err != nil { - return BackupPoliciesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes a backup policy belonging to a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupPoliciesClientDeleteOptions contains the optional parameters for the BackupPoliciesClient.Delete method. -func (client *BackupPoliciesClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, options *BackupPoliciesClientDeleteOptions) (BackupPoliciesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, backupPolicyName, options) - if err != nil { - return BackupPoliciesClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupPoliciesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return BackupPoliciesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return BackupPoliciesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *BackupPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, options *BackupPoliciesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupPolicyName == "" { - return nil, errors.New("parameter backupPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a backup policy belonging to a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method. -func (client *BackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, options *BackupPoliciesClientGetOptions) (BackupPoliciesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, backupPolicyName, options) - if err != nil { - return BackupPoliciesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupPoliciesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupPoliciesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupPolicyName string, options *BackupPoliciesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupPolicyName == "" { - return nil, errors.New("parameter backupPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupPoliciesClient) getHandleResponse(resp *http.Response) (BackupPoliciesClientGetResponse, error) { - result := BackupPoliciesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BaseBackupPolicyResource); err != nil { - return BackupPoliciesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Returns list of backup policies belonging to a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.List method. -func (client *BackupPoliciesClient) NewListPager(resourceGroupName string, vaultName string, options *BackupPoliciesClientListOptions) *runtime.Pager[BackupPoliciesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupPoliciesClientListResponse]{ - More: func(page BackupPoliciesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupPoliciesClientListResponse) (BackupPoliciesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, vaultName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupPoliciesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupPoliciesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *BackupPoliciesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupPoliciesClient) listHandleResponse(resp *http.Response) (BackupPoliciesClientListResponse, error) { - result := BackupPoliciesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BaseBackupPolicyResourceList); err != nil { - return BackupPoliciesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaultoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaultoperationresults_client.go deleted file mode 100644 index 72065f20..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaultoperationresults_client.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// BackupVaultOperationResultsClient contains the methods for the BackupVaultOperationResults group. -// Don't use this type directly, use NewBackupVaultOperationResultsClient() instead. -type BackupVaultOperationResultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupVaultOperationResultsClient creates a new instance of BackupVaultOperationResultsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupVaultOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupVaultOperationResultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupVaultOperationResultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupVaultOperationResultsClientGetOptions contains the optional parameters for the BackupVaultOperationResultsClient.Get -// method. -func (client *BackupVaultOperationResultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *BackupVaultOperationResultsClientGetOptions) (BackupVaultOperationResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, operationID, options) - if err != nil { - return BackupVaultOperationResultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupVaultOperationResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return BackupVaultOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupVaultOperationResultsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *BackupVaultOperationResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupVaultOperationResultsClient) getHandleResponse(resp *http.Response) (BackupVaultOperationResultsClientGetResponse, error) { - result := BackupVaultOperationResultsClientGetResponse{} - if val := resp.Header.Get("Location"); val != "" { - result.Location = &val - } - if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { - result.AzureAsyncOperation = &val - } - if val := resp.Header.Get("Retry-After"); val != "" { - retryAfter32, err := strconv.ParseInt(val, 10, 32) - retryAfter := int32(retryAfter32) - if err != nil { - return BackupVaultOperationResultsClientGetResponse{}, err - } - result.RetryAfter = &retryAfter - } - if err := runtime.UnmarshalAsJSON(resp, &result.BackupVaultResource); err != nil { - return BackupVaultOperationResultsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaults_client.go deleted file mode 100644 index ff021022..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_backupvaults_client.go +++ /dev/null @@ -1,469 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupVaultsClient contains the methods for the BackupVaults group. -// Don't use this type directly, use NewBackupVaultsClient() instead. -type BackupVaultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupVaultsClient creates a new instance of BackupVaultsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupVaultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupVaultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupVaultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CheckNameAvailability - API to check for resource name availability -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// location - The location in which uniqueness will be verified. -// parameters - Check name availability request -// options - BackupVaultsClientCheckNameAvailabilityOptions contains the optional parameters for the BackupVaultsClient.CheckNameAvailability -// method. -func (client *BackupVaultsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, location string, parameters CheckNameAvailabilityRequest, options *BackupVaultsClientCheckNameAvailabilityOptions) (BackupVaultsClientCheckNameAvailabilityResponse, error) { - req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, location, parameters, options) - if err != nil { - return BackupVaultsClientCheckNameAvailabilityResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupVaultsClientCheckNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupVaultsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkNameAvailabilityHandleResponse(resp) -} - -// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *BackupVaultsClient) checkNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, location string, parameters CheckNameAvailabilityRequest, options *BackupVaultsClientCheckNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. -func (client *BackupVaultsClient) checkNameAvailabilityHandleResponse(resp *http.Response) (BackupVaultsClientCheckNameAvailabilityResponse, error) { - result := BackupVaultsClientCheckNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameAvailabilityResult); err != nil { - return BackupVaultsClientCheckNameAvailabilityResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdate - Creates or updates a BackupVault resource belonging to a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// parameters - Request body for operation -// options - BackupVaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginCreateOrUpdate -// method. -func (client *BackupVaultsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters BackupVaultResource, options *BackupVaultsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BackupVaultsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, vaultName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupVaultsClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupVaultsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a BackupVault resource belonging to a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupVaultsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters BackupVaultResource, options *BackupVaultsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *BackupVaultsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters BackupVaultResource, options *BackupVaultsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// Delete - Deletes a BackupVault resource from the resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupVaultsClientDeleteOptions contains the optional parameters for the BackupVaultsClient.Delete method. -func (client *BackupVaultsClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientDeleteOptions) (BackupVaultsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, options) - if err != nil { - return BackupVaultsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupVaultsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return BackupVaultsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return BackupVaultsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *BackupVaultsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Returns a resource belonging to a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - BackupVaultsClientGetOptions contains the optional parameters for the BackupVaultsClient.Get method. -func (client *BackupVaultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientGetOptions) (BackupVaultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, options) - if err != nil { - return BackupVaultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupVaultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupVaultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupVaultsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *BackupVaultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupVaultsClient) getHandleResponse(resp *http.Response) (BackupVaultsClientGetResponse, error) { - result := BackupVaultsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupVaultResource); err != nil { - return BackupVaultsClientGetResponse{}, err - } - return result, nil -} - -// NewGetInResourceGroupPager - Returns resource collection belonging to a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - BackupVaultsClientGetInResourceGroupOptions contains the optional parameters for the BackupVaultsClient.GetInResourceGroup -// method. -func (client *BackupVaultsClient) NewGetInResourceGroupPager(resourceGroupName string, options *BackupVaultsClientGetInResourceGroupOptions) *runtime.Pager[BackupVaultsClientGetInResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupVaultsClientGetInResourceGroupResponse]{ - More: func(page BackupVaultsClientGetInResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupVaultsClientGetInResourceGroupResponse) (BackupVaultsClientGetInResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getInResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupVaultsClientGetInResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupVaultsClientGetInResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupVaultsClientGetInResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.getInResourceGroupHandleResponse(resp) - }, - }) -} - -// getInResourceGroupCreateRequest creates the GetInResourceGroup request. -func (client *BackupVaultsClient) getInResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *BackupVaultsClientGetInResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInResourceGroupHandleResponse handles the GetInResourceGroup response. -func (client *BackupVaultsClient) getInResourceGroupHandleResponse(resp *http.Response) (BackupVaultsClientGetInResourceGroupResponse, error) { - result := BackupVaultsClientGetInResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupVaultResourceList); err != nil { - return BackupVaultsClientGetInResourceGroupResponse{}, err - } - return result, nil -} - -// NewGetInSubscriptionPager - Returns resource collection belonging to a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// options - BackupVaultsClientGetInSubscriptionOptions contains the optional parameters for the BackupVaultsClient.GetInSubscription -// method. -func (client *BackupVaultsClient) NewGetInSubscriptionPager(options *BackupVaultsClientGetInSubscriptionOptions) *runtime.Pager[BackupVaultsClientGetInSubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupVaultsClientGetInSubscriptionResponse]{ - More: func(page BackupVaultsClientGetInSubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupVaultsClientGetInSubscriptionResponse) (BackupVaultsClientGetInSubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getInSubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupVaultsClientGetInSubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupVaultsClientGetInSubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupVaultsClientGetInSubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.getInSubscriptionHandleResponse(resp) - }, - }) -} - -// getInSubscriptionCreateRequest creates the GetInSubscription request. -func (client *BackupVaultsClient) getInSubscriptionCreateRequest(ctx context.Context, options *BackupVaultsClientGetInSubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getInSubscriptionHandleResponse handles the GetInSubscription response. -func (client *BackupVaultsClient) getInSubscriptionHandleResponse(resp *http.Response) (BackupVaultsClientGetInSubscriptionResponse, error) { - result := BackupVaultsClientGetInSubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupVaultResourceList); err != nil { - return BackupVaultsClientGetInSubscriptionResponse{}, err - } - return result, nil -} - -// BeginUpdate - Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// parameters - Request body for operation -// options - BackupVaultsClientBeginUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginUpdate -// method. -func (client *BackupVaultsClient) BeginUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters PatchResourceRequestInput, options *BackupVaultsClientBeginUpdateOptions) (*runtime.Poller[BackupVaultsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, vaultName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[BackupVaultsClientUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[BackupVaultsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *BackupVaultsClient) update(ctx context.Context, resourceGroupName string, vaultName string, parameters PatchResourceRequestInput, options *BackupVaultsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *BackupVaultsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters PatchResourceRequestInput, options *BackupVaultsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_client.go deleted file mode 100644 index ba789f40..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_client.go +++ /dev/null @@ -1,106 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// Client contains the methods for the DataProtection group. -// Don't use this type directly, use NewClient() instead. -type Client struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewClient creates a new instance of Client with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &Client{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CheckFeatureSupport - Validates if a feature is supported -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// parameters - Feature support request object -// options - ClientCheckFeatureSupportOptions contains the optional parameters for the Client.CheckFeatureSupport method. -func (client *Client) CheckFeatureSupport(ctx context.Context, location string, parameters FeatureValidationRequestBaseClassification, options *ClientCheckFeatureSupportOptions) (ClientCheckFeatureSupportResponse, error) { - req, err := client.checkFeatureSupportCreateRequest(ctx, location, parameters, options) - if err != nil { - return ClientCheckFeatureSupportResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ClientCheckFeatureSupportResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientCheckFeatureSupportResponse{}, runtime.NewResponseError(resp) - } - return client.checkFeatureSupportHandleResponse(resp) -} - -// checkFeatureSupportCreateRequest creates the CheckFeatureSupport request. -func (client *Client) checkFeatureSupportCreateRequest(ctx context.Context, location string, parameters FeatureValidationRequestBaseClassification, options *ClientCheckFeatureSupportOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// checkFeatureSupportHandleResponse handles the CheckFeatureSupport response. -func (client *Client) checkFeatureSupportHandleResponse(resp *http.Response) (ClientCheckFeatureSupportResponse, error) { - result := ClientCheckFeatureSupportResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { - return ClientCheckFeatureSupportResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_constants.go deleted file mode 100644 index 3c3ac7bf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_constants.go +++ /dev/null @@ -1,513 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -const ( - moduleName = "armdataprotection" - moduleVersion = "v1.0.0" -) - -type AbsoluteMarker string - -const ( - AbsoluteMarkerAllBackup AbsoluteMarker = "AllBackup" - AbsoluteMarkerFirstOfDay AbsoluteMarker = "FirstOfDay" - AbsoluteMarkerFirstOfMonth AbsoluteMarker = "FirstOfMonth" - AbsoluteMarkerFirstOfWeek AbsoluteMarker = "FirstOfWeek" - AbsoluteMarkerFirstOfYear AbsoluteMarker = "FirstOfYear" -) - -// PossibleAbsoluteMarkerValues returns the possible values for the AbsoluteMarker const type. -func PossibleAbsoluteMarkerValues() []AbsoluteMarker { - return []AbsoluteMarker{ - AbsoluteMarkerAllBackup, - AbsoluteMarkerFirstOfDay, - AbsoluteMarkerFirstOfMonth, - AbsoluteMarkerFirstOfWeek, - AbsoluteMarkerFirstOfYear, - } -} - -type AlertsState string - -const ( - AlertsStateDisabled AlertsState = "Disabled" - AlertsStateEnabled AlertsState = "Enabled" -) - -// PossibleAlertsStateValues returns the possible values for the AlertsState const type. -func PossibleAlertsStateValues() []AlertsState { - return []AlertsState{ - AlertsStateDisabled, - AlertsStateEnabled, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// CurrentProtectionState - Specifies the current protection state of the resource -type CurrentProtectionState string - -const ( - CurrentProtectionStateBackupSchedulesSuspended CurrentProtectionState = "BackupSchedulesSuspended" - CurrentProtectionStateConfiguringProtection CurrentProtectionState = "ConfiguringProtection" - CurrentProtectionStateConfiguringProtectionFailed CurrentProtectionState = "ConfiguringProtectionFailed" - CurrentProtectionStateInvalid CurrentProtectionState = "Invalid" - CurrentProtectionStateNotProtected CurrentProtectionState = "NotProtected" - CurrentProtectionStateProtectionConfigured CurrentProtectionState = "ProtectionConfigured" - CurrentProtectionStateProtectionError CurrentProtectionState = "ProtectionError" - CurrentProtectionStateProtectionStopped CurrentProtectionState = "ProtectionStopped" - CurrentProtectionStateRetentionSchedulesSuspended CurrentProtectionState = "RetentionSchedulesSuspended" - CurrentProtectionStateSoftDeleted CurrentProtectionState = "SoftDeleted" - CurrentProtectionStateSoftDeleting CurrentProtectionState = "SoftDeleting" - CurrentProtectionStateUpdatingProtection CurrentProtectionState = "UpdatingProtection" -) - -// PossibleCurrentProtectionStateValues returns the possible values for the CurrentProtectionState const type. -func PossibleCurrentProtectionStateValues() []CurrentProtectionState { - return []CurrentProtectionState{ - CurrentProtectionStateBackupSchedulesSuspended, - CurrentProtectionStateConfiguringProtection, - CurrentProtectionStateConfiguringProtectionFailed, - CurrentProtectionStateInvalid, - CurrentProtectionStateNotProtected, - CurrentProtectionStateProtectionConfigured, - CurrentProtectionStateProtectionError, - CurrentProtectionStateProtectionStopped, - CurrentProtectionStateRetentionSchedulesSuspended, - CurrentProtectionStateSoftDeleted, - CurrentProtectionStateSoftDeleting, - CurrentProtectionStateUpdatingProtection, - } -} - -// DataStoreTypes - type of datastore; Operational/Vault/Archive -type DataStoreTypes string - -const ( - DataStoreTypesArchiveStore DataStoreTypes = "ArchiveStore" - DataStoreTypesOperationalStore DataStoreTypes = "OperationalStore" - DataStoreTypesVaultStore DataStoreTypes = "VaultStore" -) - -// PossibleDataStoreTypesValues returns the possible values for the DataStoreTypes const type. -func PossibleDataStoreTypesValues() []DataStoreTypes { - return []DataStoreTypes{ - DataStoreTypesArchiveStore, - DataStoreTypesOperationalStore, - DataStoreTypesVaultStore, - } -} - -type DayOfWeek string - -const ( - DayOfWeekFriday DayOfWeek = "Friday" - DayOfWeekMonday DayOfWeek = "Monday" - DayOfWeekSaturday DayOfWeek = "Saturday" - DayOfWeekSunday DayOfWeek = "Sunday" - DayOfWeekThursday DayOfWeek = "Thursday" - DayOfWeekTuesday DayOfWeek = "Tuesday" - DayOfWeekWednesday DayOfWeek = "Wednesday" -) - -// PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. -func PossibleDayOfWeekValues() []DayOfWeek { - return []DayOfWeek{ - DayOfWeekFriday, - DayOfWeekMonday, - DayOfWeekSaturday, - DayOfWeekSunday, - DayOfWeekThursday, - DayOfWeekTuesday, - DayOfWeekWednesday, - } -} - -// FeatureSupportStatus - feature support status -type FeatureSupportStatus string - -const ( - FeatureSupportStatusAlphaPreview FeatureSupportStatus = "AlphaPreview" - FeatureSupportStatusGenerallyAvailable FeatureSupportStatus = "GenerallyAvailable" - FeatureSupportStatusInvalid FeatureSupportStatus = "Invalid" - FeatureSupportStatusNotSupported FeatureSupportStatus = "NotSupported" - FeatureSupportStatusPrivatePreview FeatureSupportStatus = "PrivatePreview" - FeatureSupportStatusPublicPreview FeatureSupportStatus = "PublicPreview" -) - -// PossibleFeatureSupportStatusValues returns the possible values for the FeatureSupportStatus const type. -func PossibleFeatureSupportStatusValues() []FeatureSupportStatus { - return []FeatureSupportStatus{ - FeatureSupportStatusAlphaPreview, - FeatureSupportStatusGenerallyAvailable, - FeatureSupportStatusInvalid, - FeatureSupportStatusNotSupported, - FeatureSupportStatusPrivatePreview, - FeatureSupportStatusPublicPreview, - } -} - -// FeatureType - backup support feature type. -type FeatureType string - -const ( - FeatureTypeDataSourceType FeatureType = "DataSourceType" - FeatureTypeInvalid FeatureType = "Invalid" -) - -// PossibleFeatureTypeValues returns the possible values for the FeatureType const type. -func PossibleFeatureTypeValues() []FeatureType { - return []FeatureType{ - FeatureTypeDataSourceType, - FeatureTypeInvalid, - } -} - -type Month string - -const ( - MonthApril Month = "April" - MonthAugust Month = "August" - MonthDecember Month = "December" - MonthFebruary Month = "February" - MonthJanuary Month = "January" - MonthJuly Month = "July" - MonthJune Month = "June" - MonthMarch Month = "March" - MonthMay Month = "May" - MonthNovember Month = "November" - MonthOctober Month = "October" - MonthSeptember Month = "September" -) - -// PossibleMonthValues returns the possible values for the Month const type. -func PossibleMonthValues() []Month { - return []Month{ - MonthApril, - MonthAugust, - MonthDecember, - MonthFebruary, - MonthJanuary, - MonthJuly, - MonthJune, - MonthMarch, - MonthMay, - MonthNovember, - MonthOctober, - MonthSeptember, - } -} - -// ProvisioningState - Provisioning state of the BackupVault resource -type ProvisioningState string - -const ( - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateProvisioning ProvisioningState = "Provisioning" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUnknown ProvisioningState = "Unknown" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateFailed, - ProvisioningStateProvisioning, - ProvisioningStateSucceeded, - ProvisioningStateUnknown, - ProvisioningStateUpdating, - } -} - -// RecoveryOption - Recovery Option -type RecoveryOption string - -const ( - RecoveryOptionFailIfExists RecoveryOption = "FailIfExists" -) - -// PossibleRecoveryOptionValues returns the possible values for the RecoveryOption const type. -func PossibleRecoveryOptionValues() []RecoveryOption { - return []RecoveryOption{ - RecoveryOptionFailIfExists, - } -} - -// RehydrationPriority - Priority to be used for rehydration. Values High or Standard -type RehydrationPriority string - -const ( - RehydrationPriorityHigh RehydrationPriority = "High" - RehydrationPriorityInvalid RehydrationPriority = "Invalid" - RehydrationPriorityStandard RehydrationPriority = "Standard" -) - -// PossibleRehydrationPriorityValues returns the possible values for the RehydrationPriority const type. -func PossibleRehydrationPriorityValues() []RehydrationPriority { - return []RehydrationPriority{ - RehydrationPriorityHigh, - RehydrationPriorityInvalid, - RehydrationPriorityStandard, - } -} - -type RehydrationStatus string - -const ( - RehydrationStatusCOMPLETED RehydrationStatus = "COMPLETED" - RehydrationStatusCREATEINPROGRESS RehydrationStatus = "CREATE_IN_PROGRESS" - RehydrationStatusDELETED RehydrationStatus = "DELETED" - RehydrationStatusDELETEINPROGRESS RehydrationStatus = "DELETE_IN_PROGRESS" - RehydrationStatusFAILED RehydrationStatus = "FAILED" -) - -// PossibleRehydrationStatusValues returns the possible values for the RehydrationStatus const type. -func PossibleRehydrationStatusValues() []RehydrationStatus { - return []RehydrationStatus{ - RehydrationStatusCOMPLETED, - RehydrationStatusCREATEINPROGRESS, - RehydrationStatusDELETED, - RehydrationStatusDELETEINPROGRESS, - RehydrationStatusFAILED, - } -} - -// ResourceMoveState - Resource move state for backup vault -type ResourceMoveState string - -const ( - ResourceMoveStateCommitFailed ResourceMoveState = "CommitFailed" - ResourceMoveStateCommitTimedout ResourceMoveState = "CommitTimedout" - ResourceMoveStateCriticalFailure ResourceMoveState = "CriticalFailure" - ResourceMoveStateFailed ResourceMoveState = "Failed" - ResourceMoveStateInProgress ResourceMoveState = "InProgress" - ResourceMoveStateMoveSucceeded ResourceMoveState = "MoveSucceeded" - ResourceMoveStatePartialSuccess ResourceMoveState = "PartialSuccess" - ResourceMoveStatePrepareFailed ResourceMoveState = "PrepareFailed" - ResourceMoveStatePrepareTimedout ResourceMoveState = "PrepareTimedout" - ResourceMoveStateUnknown ResourceMoveState = "Unknown" -) - -// PossibleResourceMoveStateValues returns the possible values for the ResourceMoveState const type. -func PossibleResourceMoveStateValues() []ResourceMoveState { - return []ResourceMoveState{ - ResourceMoveStateCommitFailed, - ResourceMoveStateCommitTimedout, - ResourceMoveStateCriticalFailure, - ResourceMoveStateFailed, - ResourceMoveStateInProgress, - ResourceMoveStateMoveSucceeded, - ResourceMoveStatePartialSuccess, - ResourceMoveStatePrepareFailed, - ResourceMoveStatePrepareTimedout, - ResourceMoveStateUnknown, - } -} - -// RestoreSourceDataStoreType - Gets or sets the type of the source data store. -type RestoreSourceDataStoreType string - -const ( - RestoreSourceDataStoreTypeArchiveStore RestoreSourceDataStoreType = "ArchiveStore" - RestoreSourceDataStoreTypeOperationalStore RestoreSourceDataStoreType = "OperationalStore" - RestoreSourceDataStoreTypeVaultStore RestoreSourceDataStoreType = "VaultStore" -) - -// PossibleRestoreSourceDataStoreTypeValues returns the possible values for the RestoreSourceDataStoreType const type. -func PossibleRestoreSourceDataStoreTypeValues() []RestoreSourceDataStoreType { - return []RestoreSourceDataStoreType{ - RestoreSourceDataStoreTypeArchiveStore, - RestoreSourceDataStoreTypeOperationalStore, - RestoreSourceDataStoreTypeVaultStore, - } -} - -// RestoreTargetLocationType - Denotes the target location where the data will be restored, string value for the enum {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType} -type RestoreTargetLocationType string - -const ( - RestoreTargetLocationTypeAzureBlobs RestoreTargetLocationType = "AzureBlobs" - RestoreTargetLocationTypeAzureFiles RestoreTargetLocationType = "AzureFiles" - RestoreTargetLocationTypeInvalid RestoreTargetLocationType = "Invalid" -) - -// PossibleRestoreTargetLocationTypeValues returns the possible values for the RestoreTargetLocationType const type. -func PossibleRestoreTargetLocationTypeValues() []RestoreTargetLocationType { - return []RestoreTargetLocationType{ - RestoreTargetLocationTypeAzureBlobs, - RestoreTargetLocationTypeAzureFiles, - RestoreTargetLocationTypeInvalid, - } -} - -// SecretStoreType - Gets or sets the type of secret store -type SecretStoreType string - -const ( - SecretStoreTypeAzureKeyVault SecretStoreType = "AzureKeyVault" - SecretStoreTypeInvalid SecretStoreType = "Invalid" -) - -// PossibleSecretStoreTypeValues returns the possible values for the SecretStoreType const type. -func PossibleSecretStoreTypeValues() []SecretStoreType { - return []SecretStoreType{ - SecretStoreTypeAzureKeyVault, - SecretStoreTypeInvalid, - } -} - -// SourceDataStoreType - Gets or sets the type of the source data store. -type SourceDataStoreType string - -const ( - SourceDataStoreTypeArchiveStore SourceDataStoreType = "ArchiveStore" - SourceDataStoreTypeSnapshotStore SourceDataStoreType = "SnapshotStore" - SourceDataStoreTypeVaultStore SourceDataStoreType = "VaultStore" -) - -// PossibleSourceDataStoreTypeValues returns the possible values for the SourceDataStoreType const type. -func PossibleSourceDataStoreTypeValues() []SourceDataStoreType { - return []SourceDataStoreType{ - SourceDataStoreTypeArchiveStore, - SourceDataStoreTypeSnapshotStore, - SourceDataStoreTypeVaultStore, - } -} - -// Status - Specifies the protection status of the resource -type Status string - -const ( - StatusConfiguringProtection Status = "ConfiguringProtection" - StatusConfiguringProtectionFailed Status = "ConfiguringProtectionFailed" - StatusProtectionConfigured Status = "ProtectionConfigured" - StatusProtectionStopped Status = "ProtectionStopped" - StatusSoftDeleted Status = "SoftDeleted" - StatusSoftDeleting Status = "SoftDeleting" -) - -// PossibleStatusValues returns the possible values for the Status const type. -func PossibleStatusValues() []Status { - return []Status{ - StatusConfiguringProtection, - StatusConfiguringProtectionFailed, - StatusProtectionConfigured, - StatusProtectionStopped, - StatusSoftDeleted, - StatusSoftDeleting, - } -} - -// StorageSettingStoreTypes - Gets or sets the type of the datastore. -type StorageSettingStoreTypes string - -const ( - StorageSettingStoreTypesArchiveStore StorageSettingStoreTypes = "ArchiveStore" - StorageSettingStoreTypesSnapshotStore StorageSettingStoreTypes = "SnapshotStore" - StorageSettingStoreTypesVaultStore StorageSettingStoreTypes = "VaultStore" -) - -// PossibleStorageSettingStoreTypesValues returns the possible values for the StorageSettingStoreTypes const type. -func PossibleStorageSettingStoreTypesValues() []StorageSettingStoreTypes { - return []StorageSettingStoreTypes{ - StorageSettingStoreTypesArchiveStore, - StorageSettingStoreTypesSnapshotStore, - StorageSettingStoreTypesVaultStore, - } -} - -// StorageSettingTypes - Gets or sets the type. -type StorageSettingTypes string - -const ( - StorageSettingTypesGeoRedundant StorageSettingTypes = "GeoRedundant" - StorageSettingTypesLocallyRedundant StorageSettingTypes = "LocallyRedundant" -) - -// PossibleStorageSettingTypesValues returns the possible values for the StorageSettingTypes const type. -func PossibleStorageSettingTypesValues() []StorageSettingTypes { - return []StorageSettingTypes{ - StorageSettingTypesGeoRedundant, - StorageSettingTypesLocallyRedundant, - } -} - -// SyncType - Field indicating sync type e.g. to sync only in case of failure or in all cases -type SyncType string - -const ( - SyncTypeDefault SyncType = "Default" - SyncTypeForceResync SyncType = "ForceResync" -) - -// PossibleSyncTypeValues returns the possible values for the SyncType const type. -func PossibleSyncTypeValues() []SyncType { - return []SyncType{ - SyncTypeDefault, - SyncTypeForceResync, - } -} - -// ValidationType - Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API -// will run again. -type ValidationType string - -const ( - ValidationTypeDeepValidation ValidationType = "DeepValidation" - ValidationTypeShallowValidation ValidationType = "ShallowValidation" -) - -// PossibleValidationTypeValues returns the possible values for the ValidationType const type. -func PossibleValidationTypeValues() []ValidationType { - return []ValidationType{ - ValidationTypeDeepValidation, - ValidationTypeShallowValidation, - } -} - -type WeekNumber string - -const ( - WeekNumberFirst WeekNumber = "First" - WeekNumberFourth WeekNumber = "Fourth" - WeekNumberLast WeekNumber = "Last" - WeekNumberSecond WeekNumber = "Second" - WeekNumberThird WeekNumber = "Third" -) - -// PossibleWeekNumberValues returns the possible values for the WeekNumber const type. -func PossibleWeekNumberValues() []WeekNumber { - return []WeekNumber{ - WeekNumberFirst, - WeekNumberFourth, - WeekNumberLast, - WeekNumberSecond, - WeekNumberThird, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobs_client.go deleted file mode 100644 index bc8fbaf6..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobs_client.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExportJobsClient contains the methods for the ExportJobs group. -// Don't use this type directly, use NewExportJobsClient() instead. -type ExportJobsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExportJobsClient creates a new instance of ExportJobsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExportJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportJobsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExportJobsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginTrigger - Triggers export of jobs and returns an OperationID to track. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - ExportJobsClientBeginTriggerOptions contains the optional parameters for the ExportJobsClient.BeginTrigger method. -func (client *ExportJobsClient) BeginTrigger(ctx context.Context, resourceGroupName string, vaultName string, options *ExportJobsClientBeginTriggerOptions) (*runtime.Poller[ExportJobsClientTriggerResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.trigger(ctx, resourceGroupName, vaultName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExportJobsClientTriggerResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExportJobsClientTriggerResponse](options.ResumeToken, client.pl, nil) - } -} - -// Trigger - Triggers export of jobs and returns an OperationID to track. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -func (client *ExportJobsClient) trigger(ctx context.Context, resourceGroupName string, vaultName string, options *ExportJobsClientBeginTriggerOptions) (*http.Response, error) { - req, err := client.triggerCreateRequest(ctx, resourceGroupName, vaultName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// triggerCreateRequest creates the Trigger request. -func (client *ExportJobsClient) triggerCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *ExportJobsClientBeginTriggerOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobsoperationresult_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobsoperationresult_client.go deleted file mode 100644 index 4ee9411b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_exportjobsoperationresult_client.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExportJobsOperationResultClient contains the methods for the ExportJobsOperationResult group. -// Don't use this type directly, use NewExportJobsOperationResultClient() instead. -type ExportJobsOperationResultClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExportJobsOperationResultClient creates a new instance of ExportJobsOperationResultClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExportJobsOperationResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportJobsOperationResultClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExportJobsOperationResultClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also -// contains URL of a Blob and a SAS key to access the same. The blob contains exported -// jobs in JSON serialized format. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// operationID - OperationID which represents the export job. -// options - ExportJobsOperationResultClientGetOptions contains the optional parameters for the ExportJobsOperationResultClient.Get -// method. -func (client *ExportJobsOperationResultClient) Get(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *ExportJobsOperationResultClientGetOptions) (ExportJobsOperationResultClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, operationID, options) - if err != nil { - return ExportJobsOperationResultClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExportJobsOperationResultClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ExportJobsOperationResultClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExportJobsOperationResultClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *ExportJobsOperationResultClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/operations/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExportJobsOperationResultClient) getHandleResponse(resp *http.Response) (ExportJobsOperationResultClientGetResponse, error) { - result := ExportJobsOperationResultClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExportJobsResult); err != nil { - return ExportJobsOperationResultClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_jobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_jobs_client.go deleted file mode 100644 index c76171ab..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_jobs_client.go +++ /dev/null @@ -1,185 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// JobsClient contains the methods for the Jobs group. -// Don't use this type directly, use NewJobsClient() instead. -type JobsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewJobsClient creates a new instance of JobsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &JobsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets a job with id in a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// jobID - The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). -// options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. -func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, jobID string, options *JobsClientGetOptions) (JobsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, jobID, options) - if err != nil { - return JobsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return JobsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, jobID string, options *JobsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if jobID == "" { - return nil, errors.New("parameter jobID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobId}", url.PathEscape(jobID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetResponse, error) { - result := JobsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupJobResource); err != nil { - return JobsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Returns list of jobs belonging to a backup vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - JobsClientListOptions contains the optional parameters for the JobsClient.List method. -func (client *JobsClient) NewListPager(resourceGroupName string, vaultName string, options *JobsClientListOptions) *runtime.Pager[JobsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[JobsClientListResponse]{ - More: func(page JobsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *JobsClientListResponse) (JobsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, vaultName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return JobsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return JobsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *JobsClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *JobsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *JobsClient) listHandleResponse(resp *http.Response) (JobsClientListResponse, error) { - result := JobsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupJobResourceList); err != nil { - return JobsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models.go deleted file mode 100644 index 9584d172..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models.go +++ /dev/null @@ -1,2369 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import "time" - -// AbsoluteDeleteOption - Delete option with duration -type AbsoluteDeleteOption struct { - // REQUIRED; Duration of deletion after given timespan - Duration *string `json:"duration,omitempty"` - - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetDeleteOption implements the DeleteOptionClassification interface for type AbsoluteDeleteOption. -func (a *AbsoluteDeleteOption) GetDeleteOption() *DeleteOption { - return &DeleteOption{ - Duration: a.Duration, - ObjectType: a.ObjectType, - } -} - -// AdHocBackupRuleOptions - Adhoc backup rules -type AdHocBackupRuleOptions struct { - // REQUIRED - RuleName *string `json:"ruleName,omitempty"` - - // REQUIRED; Adhoc backup trigger option - TriggerOption *AdhocBackupTriggerOption `json:"triggerOption,omitempty"` -} - -// AdhocBackupTriggerOption - Adhoc backup trigger option -type AdhocBackupTriggerOption struct { - RetentionTagOverride *string `json:"retentionTagOverride,omitempty"` -} - -// AdhocBasedTaggingCriteria - Adhoc backup tagging criteria -type AdhocBasedTaggingCriteria struct { - // Retention tag information - TagInfo *RetentionTag `json:"tagInfo,omitempty"` -} - -// AdhocBasedTriggerContext - Adhoc trigger context -type AdhocBasedTriggerContext struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; Tagging Criteria containing retention tag for adhoc backup. - TaggingCriteria *AdhocBasedTaggingCriteria `json:"taggingCriteria,omitempty"` -} - -// GetTriggerContext implements the TriggerContextClassification interface for type AdhocBasedTriggerContext. -func (a *AdhocBasedTriggerContext) GetTriggerContext() *TriggerContext { - return &TriggerContext{ - ObjectType: a.ObjectType, - } -} - -// AuthCredentialsClassification provides polymorphic access to related types. -// Call the interface's GetAuthCredentials() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AuthCredentials, *SecretStoreBasedAuthCredentials -type AuthCredentialsClassification interface { - // GetAuthCredentials returns the AuthCredentials content of the underlying type. - GetAuthCredentials() *AuthCredentials -} - -// AuthCredentials - Base class for different types of authentication credentials. -type AuthCredentials struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetAuthCredentials implements the AuthCredentialsClassification interface for type AuthCredentials. -func (a *AuthCredentials) GetAuthCredentials() *AuthCredentials { return a } - -// AzureBackupDiscreteRecoveryPoint - Azure backup discrete RecoveryPoint -type AzureBackupDiscreteRecoveryPoint struct { - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED - RecoveryPointTime *time.Time `json:"recoveryPointTime,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - PolicyName *string `json:"policyName,omitempty"` - PolicyVersion *string `json:"policyVersion,omitempty"` - RecoveryPointDataStoresDetails []*RecoveryPointDataStoreDetails `json:"recoveryPointDataStoresDetails,omitempty"` - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - RecoveryPointType *string `json:"recoveryPointType,omitempty"` - RetentionTagName *string `json:"retentionTagName,omitempty"` - RetentionTagVersion *string `json:"retentionTagVersion,omitempty"` -} - -// GetAzureBackupRecoveryPoint implements the AzureBackupRecoveryPointClassification interface for type AzureBackupDiscreteRecoveryPoint. -func (a *AzureBackupDiscreteRecoveryPoint) GetAzureBackupRecoveryPoint() *AzureBackupRecoveryPoint { - return &AzureBackupRecoveryPoint{ - ObjectType: a.ObjectType, - } -} - -// AzureBackupFindRestorableTimeRangesRequest - List Restore Ranges Request -type AzureBackupFindRestorableTimeRangesRequest struct { - // REQUIRED; Gets or sets the type of the source data store. - SourceDataStoreType *RestoreSourceDataStoreType `json:"sourceDataStoreType,omitempty"` - - // End time for the List Restore Ranges request. ISO 8601 format. - EndTime *string `json:"endTime,omitempty"` - - // Start time for the List Restore Ranges request. ISO 8601 format. - StartTime *string `json:"startTime,omitempty"` -} - -// AzureBackupFindRestorableTimeRangesRequestResource - List Restore Ranges Request -type AzureBackupFindRestorableTimeRangesRequestResource struct { - // AzureBackupFindRestorableTimeRangesRequestResource content - Content *AzureBackupFindRestorableTimeRangesRequest `json:"content,omitempty"` - CultureInfo *string `json:"cultureInfo,omitempty"` - HTTPMethod *string `json:"httpMethod,omitempty"` - - // Dictionary of - Headers map[string][]*string `json:"headers,omitempty"` - - // Dictionary of - Parameters map[string]*string `json:"parameters,omitempty"` - SubscriptionID *string `json:"subscriptionId,omitempty"` - SupportedGroupVersions []*string `json:"supportedGroupVersions,omitempty"` - URI *string `json:"uri,omitempty"` -} - -// AzureBackupFindRestorableTimeRangesResponse - List Restore Ranges Response -type AzureBackupFindRestorableTimeRangesResponse struct { - ObjectType *string `json:"objectType,omitempty"` - - // Returns the Restore Ranges available on the Backup Instance. - RestorableTimeRanges []*RestorableTimeRange `json:"restorableTimeRanges,omitempty"` -} - -// AzureBackupFindRestorableTimeRangesResponseResource - List Restore Ranges Response -type AzureBackupFindRestorableTimeRangesResponseResource struct { - // AzureBackupFindRestorableTimeRangesResponseResource properties - Properties *AzureBackupFindRestorableTimeRangesResponse `json:"properties,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AzureBackupJob - AzureBackup Job Class -type AzureBackupJob struct { - // REQUIRED; Job Activity Id - ActivityID *string `json:"activityID,omitempty"` - - // REQUIRED; Name of the Backup Instance - BackupInstanceFriendlyName *string `json:"backupInstanceFriendlyName,omitempty"` - - // REQUIRED; ARM ID of the DataSource - DataSourceID *string `json:"dataSourceId,omitempty"` - - // REQUIRED; Location of the DataSource - DataSourceLocation *string `json:"dataSourceLocation,omitempty"` - - // REQUIRED; User Friendly Name of the DataSource - DataSourceName *string `json:"dataSourceName,omitempty"` - - // REQUIRED; Type of DataSource - DataSourceType *string `json:"dataSourceType,omitempty"` - - // REQUIRED; Indicated that whether the job is adhoc(true) or scheduled(false) - IsUserTriggered *bool `json:"isUserTriggered,omitempty"` - - // REQUIRED; It indicates the type of Job i.e. Backup:full/log/diff ;Restore:ALR/OLR; Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure - Operation *string `json:"operation,omitempty"` - - // REQUIRED; It indicates the type of Job i.e. Backup/Restore/Tiering/Management - OperationCategory *string `json:"operationCategory,omitempty"` - - // REQUIRED; Indicated whether progress is enabled for the job - ProgressEnabled *bool `json:"progressEnabled,omitempty"` - - // REQUIRED; Resource Group Name of the Datasource - SourceResourceGroup *string `json:"sourceResourceGroup,omitempty"` - - // REQUIRED; SubscriptionId corresponding to the DataSource - SourceSubscriptionID *string `json:"sourceSubscriptionID,omitempty"` - - // REQUIRED; StartTime of the job(in UTC) - StartTime *time.Time `json:"startTime,omitempty"` - - // REQUIRED; Status of the job like InProgress/Success/Failed/Cancelled/SuccessWithWarning - Status *string `json:"status,omitempty"` - - // REQUIRED; Subscription Id of the corresponding backup vault - SubscriptionID *string `json:"subscriptionId,omitempty"` - - // REQUIRED; List of supported actions - SupportedActions []*string `json:"supportedActions,omitempty"` - - // REQUIRED; Name of the vault - VaultName *string `json:"vaultName,omitempty"` - - // Data Source Set Name of the DataSource - DataSourceSetName *string `json:"dataSourceSetName,omitempty"` - DestinationDataStoreName *string `json:"destinationDataStoreName,omitempty"` - - // Total run time of the job. ISO 8601 format. - Duration *string `json:"duration,omitempty"` - Etag *string `json:"etag,omitempty"` - SourceDataStoreName *string `json:"sourceDataStoreName,omitempty"` - - // READ-ONLY; ARM ID of the Backup Instance - BackupInstanceID *string `json:"backupInstanceId,omitempty" azure:"ro"` - - // READ-ONLY; EndTime of the job(in UTC) - EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` - - // READ-ONLY; A List, detailing the errors related to the job - ErrorDetails []*UserFacingError `json:"errorDetails,omitempty" azure:"ro"` - - // READ-ONLY; Extended Information about the job - ExtendedInfo *JobExtendedInfo `json:"extendedInfo,omitempty" azure:"ro"` - - // READ-ONLY; ARM ID of the policy - PolicyID *string `json:"policyId,omitempty" azure:"ro"` - - // READ-ONLY; Name of the policy - PolicyName *string `json:"policyName,omitempty" azure:"ro"` - - // READ-ONLY; Url which contains job's progress - ProgressURL *string `json:"progressUrl,omitempty" azure:"ro"` - - // READ-ONLY; It indicates the sub type of operation i.e. in case of Restore it can be ALR/OLR - RestoreType *string `json:"restoreType,omitempty" azure:"ro"` -} - -// AzureBackupJobResource - AzureBackup Job Resource Class -type AzureBackupJobResource struct { - // AzureBackupJobResource properties - Properties *AzureBackupJob `json:"properties,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AzureBackupJobResourceList - List of AzureBackup Job resources -type AzureBackupJobResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*AzureBackupJobResource `json:"value,omitempty"` -} - -// AzureBackupParams - Azure backup parameters -type AzureBackupParams struct { - // REQUIRED; BackupType ; Full/Incremental etc - BackupType *string `json:"backupType,omitempty"` - - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetBackupParameters implements the BackupParametersClassification interface for type AzureBackupParams. -func (a *AzureBackupParams) GetBackupParameters() *BackupParameters { - return &BackupParameters{ - ObjectType: a.ObjectType, - } -} - -// AzureBackupRecoveryPointClassification provides polymorphic access to related types. -// Call the interface's GetAzureBackupRecoveryPoint() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupDiscreteRecoveryPoint, *AzureBackupRecoveryPoint -type AzureBackupRecoveryPointClassification interface { - // GetAzureBackupRecoveryPoint returns the AzureBackupRecoveryPoint content of the underlying type. - GetAzureBackupRecoveryPoint() *AzureBackupRecoveryPoint -} - -// AzureBackupRecoveryPoint - Azure backup recoveryPoint -type AzureBackupRecoveryPoint struct { - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` -} - -// GetAzureBackupRecoveryPoint implements the AzureBackupRecoveryPointClassification interface for type AzureBackupRecoveryPoint. -func (a *AzureBackupRecoveryPoint) GetAzureBackupRecoveryPoint() *AzureBackupRecoveryPoint { return a } - -// AzureBackupRecoveryPointBasedRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureBackupRecoveryPointBasedRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupRecoveryPointBasedRestoreRequest, *AzureBackupRestoreWithRehydrationRequest -type AzureBackupRecoveryPointBasedRestoreRequestClassification interface { - AzureBackupRestoreRequestClassification - // GetAzureBackupRecoveryPointBasedRestoreRequest returns the AzureBackupRecoveryPointBasedRestoreRequest content of the underlying type. - GetAzureBackupRecoveryPointBasedRestoreRequest() *AzureBackupRecoveryPointBasedRestoreRequest -} - -// AzureBackupRecoveryPointBasedRestoreRequest - Azure backup recoveryPoint based restore request -type AzureBackupRecoveryPointBasedRestoreRequest struct { - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // REQUIRED; Gets or sets the restore target information. - RestoreTargetInfo RestoreTargetInfoBaseClassification `json:"restoreTargetInfo,omitempty"` - - // REQUIRED; Gets or sets the type of the source data store. - SourceDataStoreType *SourceDataStoreType `json:"sourceDataStoreType,omitempty"` - - // Fully qualified Azure Resource Manager ID of the datasource which is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` -} - -// GetAzureBackupRecoveryPointBasedRestoreRequest implements the AzureBackupRecoveryPointBasedRestoreRequestClassification -// interface for type AzureBackupRecoveryPointBasedRestoreRequest. -func (a *AzureBackupRecoveryPointBasedRestoreRequest) GetAzureBackupRecoveryPointBasedRestoreRequest() *AzureBackupRecoveryPointBasedRestoreRequest { - return a -} - -// GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRecoveryPointBasedRestoreRequest. -func (a *AzureBackupRecoveryPointBasedRestoreRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest { - return &AzureBackupRestoreRequest{ - ObjectType: a.ObjectType, - RestoreTargetInfo: a.RestoreTargetInfo, - SourceDataStoreType: a.SourceDataStoreType, - SourceResourceID: a.SourceResourceID, - } -} - -// AzureBackupRecoveryPointResource - Azure backup recoveryPoint resource -type AzureBackupRecoveryPointResource struct { - // AzureBackupRecoveryPointResource properties - Properties AzureBackupRecoveryPointClassification `json:"properties,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AzureBackupRecoveryPointResourceList - Azure backup recoveryPoint resource list -type AzureBackupRecoveryPointResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*AzureBackupRecoveryPointResource `json:"value,omitempty"` -} - -// AzureBackupRecoveryTimeBasedRestoreRequest - AzureBackup RecoveryPointTime Based Restore Request -type AzureBackupRecoveryTimeBasedRestoreRequest struct { - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; The recovery time in ISO 8601 format example - 2020-08-14T17:30:00.0000000Z. - RecoveryPointTime *string `json:"recoveryPointTime,omitempty"` - - // REQUIRED; Gets or sets the restore target information. - RestoreTargetInfo RestoreTargetInfoBaseClassification `json:"restoreTargetInfo,omitempty"` - - // REQUIRED; Gets or sets the type of the source data store. - SourceDataStoreType *SourceDataStoreType `json:"sourceDataStoreType,omitempty"` - - // Fully qualified Azure Resource Manager ID of the datasource which is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` -} - -// GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRecoveryTimeBasedRestoreRequest. -func (a *AzureBackupRecoveryTimeBasedRestoreRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest { - return &AzureBackupRestoreRequest{ - ObjectType: a.ObjectType, - RestoreTargetInfo: a.RestoreTargetInfo, - SourceDataStoreType: a.SourceDataStoreType, - SourceResourceID: a.SourceResourceID, - } -} - -// AzureBackupRehydrationRequest - Azure Backup Rehydrate Request -type AzureBackupRehydrationRequest struct { - // REQUIRED; Id of the recovery point to be recovered - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // REQUIRED; Retention duration in ISO 8601 format i.e P10D . - RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"` - - // Priority to be used for rehydration. Values High or Standard - RehydrationPriority *RehydrationPriority `json:"rehydrationPriority,omitempty"` -} - -// AzureBackupRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureBackupRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupRecoveryPointBasedRestoreRequest, *AzureBackupRecoveryTimeBasedRestoreRequest, *AzureBackupRestoreRequest, -// - *AzureBackupRestoreWithRehydrationRequest -type AzureBackupRestoreRequestClassification interface { - // GetAzureBackupRestoreRequest returns the AzureBackupRestoreRequest content of the underlying type. - GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest -} - -// AzureBackupRestoreRequest - Azure backup restore request -type AzureBackupRestoreRequest struct { - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; Gets or sets the restore target information. - RestoreTargetInfo RestoreTargetInfoBaseClassification `json:"restoreTargetInfo,omitempty"` - - // REQUIRED; Gets or sets the type of the source data store. - SourceDataStoreType *SourceDataStoreType `json:"sourceDataStoreType,omitempty"` - - // Fully qualified Azure Resource Manager ID of the datasource which is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` -} - -// GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRestoreRequest. -func (a *AzureBackupRestoreRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest { - return a -} - -// AzureBackupRestoreWithRehydrationRequest - AzureBackup Restore with Rehydration Request -type AzureBackupRestoreWithRehydrationRequest struct { - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // REQUIRED; Priority to be used for rehydration. Values High or Standard - RehydrationPriority *RehydrationPriority `json:"rehydrationPriority,omitempty"` - - // REQUIRED; Retention duration in ISO 8601 format i.e P10D . - RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"` - - // REQUIRED; Gets or sets the restore target information. - RestoreTargetInfo RestoreTargetInfoBaseClassification `json:"restoreTargetInfo,omitempty"` - - // REQUIRED; Gets or sets the type of the source data store. - SourceDataStoreType *SourceDataStoreType `json:"sourceDataStoreType,omitempty"` - - // Fully qualified Azure Resource Manager ID of the datasource which is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` -} - -// GetAzureBackupRecoveryPointBasedRestoreRequest implements the AzureBackupRecoveryPointBasedRestoreRequestClassification -// interface for type AzureBackupRestoreWithRehydrationRequest. -func (a *AzureBackupRestoreWithRehydrationRequest) GetAzureBackupRecoveryPointBasedRestoreRequest() *AzureBackupRecoveryPointBasedRestoreRequest { - return &AzureBackupRecoveryPointBasedRestoreRequest{ - RecoveryPointID: a.RecoveryPointID, - ObjectType: a.ObjectType, - RestoreTargetInfo: a.RestoreTargetInfo, - SourceDataStoreType: a.SourceDataStoreType, - SourceResourceID: a.SourceResourceID, - } -} - -// GetAzureBackupRestoreRequest implements the AzureBackupRestoreRequestClassification interface for type AzureBackupRestoreWithRehydrationRequest. -func (a *AzureBackupRestoreWithRehydrationRequest) GetAzureBackupRestoreRequest() *AzureBackupRestoreRequest { - return &AzureBackupRestoreRequest{ - ObjectType: a.ObjectType, - RestoreTargetInfo: a.RestoreTargetInfo, - SourceDataStoreType: a.SourceDataStoreType, - SourceResourceID: a.SourceResourceID, - } -} - -// AzureBackupRule - Azure backup rule -type AzureBackupRule struct { - // REQUIRED; DataStoreInfo base - DataStore *DataStoreInfoBase `json:"dataStore,omitempty"` - - // REQUIRED - Name *string `json:"name,omitempty"` - - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; Trigger context - Trigger TriggerContextClassification `json:"trigger,omitempty"` - - // BackupParameters base - BackupParameters BackupParametersClassification `json:"backupParameters,omitempty"` -} - -// GetBasePolicyRule implements the BasePolicyRuleClassification interface for type AzureBackupRule. -func (a *AzureBackupRule) GetBasePolicyRule() *BasePolicyRule { - return &BasePolicyRule{ - Name: a.Name, - ObjectType: a.ObjectType, - } -} - -// AzureMonitorAlertSettings - Settings for Azure Monitor based alerts -type AzureMonitorAlertSettings struct { - AlertsForAllJobFailures *AlertsState `json:"alertsForAllJobFailures,omitempty"` -} - -// AzureOperationalStoreParameters - Parameters for Operational-Tier DataStore -type AzureOperationalStoreParameters struct { - // REQUIRED; type of datastore; Operational/Vault/Archive - DataStoreType *DataStoreTypes `json:"dataStoreType,omitempty"` - - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // Gets or sets the Snapshot Resource Group Uri. - ResourceGroupID *string `json:"resourceGroupId,omitempty"` -} - -// GetDataStoreParameters implements the DataStoreParametersClassification interface for type AzureOperationalStoreParameters. -func (a *AzureOperationalStoreParameters) GetDataStoreParameters() *DataStoreParameters { - return &DataStoreParameters{ - ObjectType: a.ObjectType, - DataStoreType: a.DataStoreType, - } -} - -// AzureRetentionRule - Azure retention rule -type AzureRetentionRule struct { - // REQUIRED - Lifecycles []*SourceLifeCycle `json:"lifecycles,omitempty"` - - // REQUIRED - Name *string `json:"name,omitempty"` - - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` - IsDefault *bool `json:"isDefault,omitempty"` -} - -// GetBasePolicyRule implements the BasePolicyRuleClassification interface for type AzureRetentionRule. -func (a *AzureRetentionRule) GetBasePolicyRule() *BasePolicyRule { - return &BasePolicyRule{ - Name: a.Name, - ObjectType: a.ObjectType, - } -} - -// BackupCriteriaClassification provides polymorphic access to related types. -// Call the interface's GetBackupCriteria() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *BackupCriteria, *ScheduleBasedBackupCriteria -type BackupCriteriaClassification interface { - // GetBackupCriteria returns the BackupCriteria content of the underlying type. - GetBackupCriteria() *BackupCriteria -} - -// BackupCriteria base class -type BackupCriteria struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetBackupCriteria implements the BackupCriteriaClassification interface for type BackupCriteria. -func (b *BackupCriteria) GetBackupCriteria() *BackupCriteria { return b } - -// BackupInstance - Backup Instance -type BackupInstance struct { - // REQUIRED; Gets or sets the data source information. - DataSourceInfo *Datasource `json:"dataSourceInfo,omitempty"` - - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; Gets or sets the policy information. - PolicyInfo *PolicyInfo `json:"policyInfo,omitempty"` - - // Gets or sets the data source set information. - DataSourceSetInfo *DatasourceSet `json:"dataSourceSetInfo,omitempty"` - - // Credentials to use to authenticate with data source provider. - DatasourceAuthCredentials AuthCredentialsClassification `json:"datasourceAuthCredentials,omitempty"` - - // Gets or sets the Backup Instance friendly name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again. - ValidationType *ValidationType `json:"validationType,omitempty"` - - // READ-ONLY; Specifies the current protection state of the resource - CurrentProtectionState *CurrentProtectionState `json:"currentProtectionState,omitempty" azure:"ro"` - - // READ-ONLY; Specifies the protection error of the resource - ProtectionErrorDetails *UserFacingError `json:"protectionErrorDetails,omitempty" azure:"ro"` - - // READ-ONLY; Specifies the protection status of the resource - ProtectionStatus *ProtectionStatusDetails `json:"protectionStatus,omitempty" azure:"ro"` - - // READ-ONLY; Specifies the provisioning state of the resource i.e. provisioning/updating/Succeeded/Failed - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// BackupInstanceResource - BackupInstance Resource -type BackupInstanceResource struct { - // BackupInstanceResource properties - Properties *BackupInstance `json:"properties,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupInstanceResourceList - BackupInstance Resource list response -type BackupInstanceResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*BackupInstanceResource `json:"value,omitempty"` -} - -// BackupInstancesClientBeginAdhocBackupOptions contains the optional parameters for the BackupInstancesClient.BeginAdhocBackup -// method. -type BackupInstancesClientBeginAdhocBackupOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupInstancesClient.BeginCreateOrUpdate -// method. -type BackupInstancesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginDeleteOptions contains the optional parameters for the BackupInstancesClient.BeginDelete method. -type BackupInstancesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginResumeBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginResumeBackups -// method. -type BackupInstancesClientBeginResumeBackupsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginResumeProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginResumeProtection -// method. -type BackupInstancesClientBeginResumeProtectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginStopProtectionOptions contains the optional parameters for the BackupInstancesClient.BeginStopProtection -// method. -type BackupInstancesClientBeginStopProtectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginSuspendBackupsOptions contains the optional parameters for the BackupInstancesClient.BeginSuspendBackups -// method. -type BackupInstancesClientBeginSuspendBackupsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginSyncBackupInstanceOptions contains the optional parameters for the BackupInstancesClient.BeginSyncBackupInstance -// method. -type BackupInstancesClientBeginSyncBackupInstanceOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginTriggerRehydrateOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRehydrate -// method. -type BackupInstancesClientBeginTriggerRehydrateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginTriggerRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginTriggerRestore -// method. -type BackupInstancesClientBeginTriggerRestoreOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginValidateForBackupOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForBackup -// method. -type BackupInstancesClientBeginValidateForBackupOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientBeginValidateForRestoreOptions contains the optional parameters for the BackupInstancesClient.BeginValidateForRestore -// method. -type BackupInstancesClientBeginValidateForRestoreOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupInstancesClientGetBackupInstanceOperationResultOptions contains the optional parameters for the BackupInstancesClient.GetBackupInstanceOperationResult -// method. -type BackupInstancesClientGetBackupInstanceOperationResultOptions struct { - // placeholder for future optional parameters -} - -// BackupInstancesClientGetOptions contains the optional parameters for the BackupInstancesClient.Get method. -type BackupInstancesClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupInstancesClientListOptions contains the optional parameters for the BackupInstancesClient.List method. -type BackupInstancesClientListOptions struct { - // placeholder for future optional parameters -} - -// BackupParametersClassification provides polymorphic access to related types. -// Call the interface's GetBackupParameters() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupParams, *BackupParameters -type BackupParametersClassification interface { - // GetBackupParameters returns the BackupParameters content of the underlying type. - GetBackupParameters() *BackupParameters -} - -// BackupParameters base -type BackupParameters struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetBackupParameters implements the BackupParametersClassification interface for type BackupParameters. -func (b *BackupParameters) GetBackupParameters() *BackupParameters { return b } - -// BackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BackupPoliciesClient.CreateOrUpdate -// method. -type BackupPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// BackupPoliciesClientDeleteOptions contains the optional parameters for the BackupPoliciesClient.Delete method. -type BackupPoliciesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method. -type BackupPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.List method. -type BackupPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - -// BackupPolicy - Rule based backup policy -type BackupPolicy struct { - // REQUIRED; Type of datasource for the backup management - DatasourceTypes []*string `json:"datasourceTypes,omitempty"` - - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc - PolicyRules []BasePolicyRuleClassification `json:"policyRules,omitempty"` -} - -// GetBaseBackupPolicy implements the BaseBackupPolicyClassification interface for type BackupPolicy. -func (b *BackupPolicy) GetBaseBackupPolicy() *BaseBackupPolicy { - return &BaseBackupPolicy{ - DatasourceTypes: b.DatasourceTypes, - ObjectType: b.ObjectType, - } -} - -// BackupSchedule - Schedule for backup -type BackupSchedule struct { - // REQUIRED; ISO 8601 repeating time interval format - RepeatingTimeIntervals []*string `json:"repeatingTimeIntervals,omitempty"` - - // Time zone for a schedule. Example: Pacific Standard Time - TimeZone *string `json:"timeZone,omitempty"` -} - -// BackupVault - Backup Vault -type BackupVault struct { - // REQUIRED; Storage Settings - StorageSettings []*StorageSetting `json:"storageSettings,omitempty"` - - // Monitoring Settings - MonitoringSettings *MonitoringSettings `json:"monitoringSettings,omitempty"` - - // READ-ONLY; Provisioning state of the BackupVault resource - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Resource move details for backup vault - ResourceMoveDetails *ResourceMoveDetails `json:"resourceMoveDetails,omitempty" azure:"ro"` - - // READ-ONLY; Resource move state for backup vault - ResourceMoveState *ResourceMoveState `json:"resourceMoveState,omitempty" azure:"ro"` -} - -// BackupVaultOperationResultsClientGetOptions contains the optional parameters for the BackupVaultOperationResultsClient.Get -// method. -type BackupVaultOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupVaultResource - Backup Vault Resource -type BackupVaultResource struct { - // REQUIRED; BackupVaultResource properties - Properties *BackupVault `json:"properties,omitempty"` - - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Input Managed Identity Details - Identity *DppIdentityDetails `json:"identity,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupVaultResourceList - List of BackupVault resources -type BackupVaultResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*BackupVaultResource `json:"value,omitempty"` -} - -// BackupVaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginCreateOrUpdate -// method. -type BackupVaultsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupVaultsClientBeginUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginUpdate method. -type BackupVaultsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupVaultsClientCheckNameAvailabilityOptions contains the optional parameters for the BackupVaultsClient.CheckNameAvailability -// method. -type BackupVaultsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// BackupVaultsClientDeleteOptions contains the optional parameters for the BackupVaultsClient.Delete method. -type BackupVaultsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BackupVaultsClientGetInResourceGroupOptions contains the optional parameters for the BackupVaultsClient.GetInResourceGroup -// method. -type BackupVaultsClientGetInResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// BackupVaultsClientGetInSubscriptionOptions contains the optional parameters for the BackupVaultsClient.GetInSubscription -// method. -type BackupVaultsClientGetInSubscriptionOptions struct { - // placeholder for future optional parameters -} - -// BackupVaultsClientGetOptions contains the optional parameters for the BackupVaultsClient.Get method. -type BackupVaultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BaseBackupPolicyClassification provides polymorphic access to related types. -// Call the interface's GetBaseBackupPolicy() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *BackupPolicy, *BaseBackupPolicy -type BaseBackupPolicyClassification interface { - // GetBaseBackupPolicy returns the BaseBackupPolicy content of the underlying type. - GetBaseBackupPolicy() *BaseBackupPolicy -} - -// BaseBackupPolicy - BackupPolicy base -type BaseBackupPolicy struct { - // REQUIRED; Type of datasource for the backup management - DatasourceTypes []*string `json:"datasourceTypes,omitempty"` - - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` -} - -// GetBaseBackupPolicy implements the BaseBackupPolicyClassification interface for type BaseBackupPolicy. -func (b *BaseBackupPolicy) GetBaseBackupPolicy() *BaseBackupPolicy { return b } - -// BaseBackupPolicyResource - BaseBackupPolicy resource -type BaseBackupPolicyResource struct { - // BaseBackupPolicyResource properties - Properties BaseBackupPolicyClassification `json:"properties,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BaseBackupPolicyResourceList - List of BaseBackupPolicy resources -type BaseBackupPolicyResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*BaseBackupPolicyResource `json:"value,omitempty"` -} - -// BasePolicyRuleClassification provides polymorphic access to related types. -// Call the interface's GetBasePolicyRule() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupRule, *AzureRetentionRule, *BasePolicyRule -type BasePolicyRuleClassification interface { - // GetBasePolicyRule returns the BasePolicyRule content of the underlying type. - GetBasePolicyRule() *BasePolicyRule -} - -// BasePolicyRule - BasePolicy Rule -type BasePolicyRule struct { - // REQUIRED - Name *string `json:"name,omitempty"` - - // REQUIRED - ObjectType *string `json:"objectType,omitempty"` -} - -// GetBasePolicyRule implements the BasePolicyRuleClassification interface for type BasePolicyRule. -func (b *BasePolicyRule) GetBasePolicyRule() *BasePolicyRule { return b } - -// CheckNameAvailabilityRequest - CheckNameAvailability Request -type CheckNameAvailabilityRequest struct { - // Resource name for which availability needs to be checked - Name *string `json:"name,omitempty"` - - // Describes the Resource type: Microsoft.DataProtection/BackupVaults - Type *string `json:"type,omitempty"` -} - -// CheckNameAvailabilityResult - CheckNameAvailability Result -type CheckNameAvailabilityResult struct { - // Gets or sets the message. - Message *string `json:"message,omitempty"` - - // Gets or sets a value indicating whether [name available]. - NameAvailable *bool `json:"nameAvailable,omitempty"` - - // Gets or sets the reason. - Reason *string `json:"reason,omitempty"` -} - -// ClientCheckFeatureSupportOptions contains the optional parameters for the Client.CheckFeatureSupport method. -type ClientCheckFeatureSupportOptions struct { - // placeholder for future optional parameters -} - -// ClientDiscoveryDisplay - Localized display information of an operation. -type ClientDiscoveryDisplay struct { - // Description of the operation having details of what operation is about. - Description *string `json:"description,omitempty"` - - // Operations Name itself. - Operation *string `json:"operation,omitempty"` - - // Name of the provider for display purposes - Provider *string `json:"provider,omitempty"` - - // ResourceType for which this Operation can be performed. - Resource *string `json:"resource,omitempty"` -} - -// ClientDiscoveryForLogSpecification - Class to represent shoebox log specification in json client discovery. -type ClientDiscoveryForLogSpecification struct { - // blob duration of shoebox log specification - BlobDuration *string `json:"blobDuration,omitempty"` - - // Localized display name - DisplayName *string `json:"displayName,omitempty"` - - // Name for shoebox log specification. - Name *string `json:"name,omitempty"` -} - -// ClientDiscoveryForProperties - Class to represent shoebox properties in json client discovery. -type ClientDiscoveryForProperties struct { - // Operation properties. - ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// ClientDiscoveryForServiceSpecification - Class to represent shoebox service specification in json client discovery. -type ClientDiscoveryForServiceSpecification struct { - // List of log specifications of this operation. - LogSpecifications []*ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` -} - -// ClientDiscoveryResponse - Operations List response which contains list of available APIs. -type ClientDiscoveryResponse struct { - // Link to the next chunk of Response. - NextLink *string `json:"nextLink,omitempty"` - - // List of available operations. - Value []*ClientDiscoveryValueForSingleAPI `json:"value,omitempty"` -} - -// ClientDiscoveryValueForSingleAPI - Available operation details. -type ClientDiscoveryValueForSingleAPI struct { - // Contains the localized display information for this particular operation - Display *ClientDiscoveryDisplay `json:"display,omitempty"` - - // Indicates whether the operation is a data action - IsDataAction *bool `json:"isDataAction,omitempty"` - - // Name of the Operation. - Name *string `json:"name,omitempty"` - - // The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX - Origin *string `json:"origin,omitempty"` - - // Properties for the given operation. - Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` -} - -// CloudError - An error response from Azure Backup. -type CloudError struct { - // The resource management error response. - Error *Error `json:"error,omitempty"` -} - -// CopyOnExpiryOption - Copy on Expiry Option -type CopyOnExpiryOption struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetCopyOption implements the CopyOptionClassification interface for type CopyOnExpiryOption. -func (c *CopyOnExpiryOption) GetCopyOption() *CopyOption { - return &CopyOption{ - ObjectType: c.ObjectType, - } -} - -// CopyOptionClassification provides polymorphic access to related types. -// Call the interface's GetCopyOption() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *CopyOnExpiryOption, *CopyOption, *CustomCopyOption, *ImmediateCopyOption -type CopyOptionClassification interface { - // GetCopyOption returns the CopyOption content of the underlying type. - GetCopyOption() *CopyOption -} - -// CopyOption - Options to copy -type CopyOption struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetCopyOption implements the CopyOptionClassification interface for type CopyOption. -func (c *CopyOption) GetCopyOption() *CopyOption { return c } - -// CustomCopyOption - Duration based custom options to copy -type CustomCopyOption struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // Data copied after given timespan - Duration *string `json:"duration,omitempty"` -} - -// GetCopyOption implements the CopyOptionClassification interface for type CustomCopyOption. -func (c *CustomCopyOption) GetCopyOption() *CopyOption { - return &CopyOption{ - ObjectType: c.ObjectType, - } -} - -// DataStoreInfoBase - DataStoreInfo base -type DataStoreInfoBase struct { - // REQUIRED; type of datastore; Operational/Vault/Archive - DataStoreType *DataStoreTypes `json:"dataStoreType,omitempty"` - - // REQUIRED; Type of Datasource object, used to initialize the right inherited type - ObjectType *string `json:"objectType,omitempty"` -} - -// DataStoreParametersClassification provides polymorphic access to related types. -// Call the interface's GetDataStoreParameters() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureOperationalStoreParameters, *DataStoreParameters -type DataStoreParametersClassification interface { - // GetDataStoreParameters returns the DataStoreParameters content of the underlying type. - GetDataStoreParameters() *DataStoreParameters -} - -// DataStoreParameters - Parameters for DataStore -type DataStoreParameters struct { - // REQUIRED; type of datastore; Operational/Vault/Archive - DataStoreType *DataStoreTypes `json:"dataStoreType,omitempty"` - - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetDataStoreParameters implements the DataStoreParametersClassification interface for type DataStoreParameters. -func (d *DataStoreParameters) GetDataStoreParameters() *DataStoreParameters { return d } - -// Datasource to be backed up -type Datasource struct { - // REQUIRED; Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID - // created by backup service via Fabric/Vault. - ResourceID *string `json:"resourceID,omitempty"` - - // DatasourceType of the resource. - DatasourceType *string `json:"datasourceType,omitempty"` - - // Type of Datasource object, used to initialize the right inherited type - ObjectType *string `json:"objectType,omitempty"` - - // Location of datasource. - ResourceLocation *string `json:"resourceLocation,omitempty"` - - // Unique identifier of the resource in the context of parent. - ResourceName *string `json:"resourceName,omitempty"` - - // Resource Type of Datasource. - ResourceType *string `json:"resourceType,omitempty"` - - // Uri of the resource. - ResourceURI *string `json:"resourceUri,omitempty"` -} - -// DatasourceSet details of datasource to be backed up -type DatasourceSet struct { - // REQUIRED; Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID - // created by backup service via Fabric/Vault. - ResourceID *string `json:"resourceID,omitempty"` - - // DatasourceType of the resource. - DatasourceType *string `json:"datasourceType,omitempty"` - - // Type of Datasource object, used to initialize the right inherited type - ObjectType *string `json:"objectType,omitempty"` - - // Location of datasource. - ResourceLocation *string `json:"resourceLocation,omitempty"` - - // Unique identifier of the resource in the context of parent. - ResourceName *string `json:"resourceName,omitempty"` - - // Resource Type of Datasource. - ResourceType *string `json:"resourceType,omitempty"` - - // Uri of the resource. - ResourceURI *string `json:"resourceUri,omitempty"` -} - -// Day of the week -type Day struct { - // Date of the month - Date *int32 `json:"date,omitempty"` - - // Whether Date is last date of month - IsLast *bool `json:"isLast,omitempty"` -} - -// DeleteOptionClassification provides polymorphic access to related types. -// Call the interface's GetDeleteOption() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AbsoluteDeleteOption, *DeleteOption -type DeleteOptionClassification interface { - // GetDeleteOption returns the DeleteOption content of the underlying type. - GetDeleteOption() *DeleteOption -} - -// DeleteOption - Delete Option -type DeleteOption struct { - // REQUIRED; Duration of deletion after given timespan - Duration *string `json:"duration,omitempty"` - - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetDeleteOption implements the DeleteOptionClassification interface for type DeleteOption. -func (d *DeleteOption) GetDeleteOption() *DeleteOption { return d } - -// DppBaseResource - Base resource under Microsoft.DataProtection provider namespace -type DppBaseResource struct { - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DppBaseResourceList - Base for all lists of V2 resources. -type DppBaseResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of Dpp resources. - Value []*DppBaseResource `json:"value,omitempty"` -} - -// DppIdentityDetails - Identity details -type DppIdentityDetails struct { - // The identityType which can be either SystemAssigned or None - Type *string `json:"type,omitempty"` - - // READ-ONLY; The object ID of the service principal object for the managed identity that is used to grant role-based access - // to an Azure resource. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` - - // READ-ONLY; A Globally Unique Identifier (GUID) that represents the Azure AD tenant where the resource is now a member. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// DppResource - Resource class -type DppResource struct { - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DppResourceList - ListResource -type DppResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -type DppTrackedResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Input Managed Identity Details - Identity *DppIdentityDetails `json:"identity,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -type DppTrackedResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -type DppWorkerRequest struct { - CultureInfo *string `json:"cultureInfo,omitempty"` - HTTPMethod *string `json:"httpMethod,omitempty"` - - // Dictionary of - Headers map[string][]*string `json:"headers,omitempty"` - - // Dictionary of - Parameters map[string]*string `json:"parameters,omitempty"` - SubscriptionID *string `json:"subscriptionId,omitempty"` - SupportedGroupVersions []*string `json:"supportedGroupVersions,omitempty"` - URI *string `json:"uri,omitempty"` -} - -// Error - The resource management error response. -type Error struct { - // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` - - // READ-ONLY; The error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; The error details. - Details []*Error `json:"details,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; The error target. - Target *string `json:"target,omitempty" azure:"ro"` -} - -// ErrorAdditionalInfo - The resource management error additional info. -type ErrorAdditionalInfo struct { - // READ-ONLY; The additional info. - Info interface{} `json:"info,omitempty" azure:"ro"` - - // READ-ONLY; The additional info type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExportJobsClientBeginTriggerOptions contains the optional parameters for the ExportJobsClient.BeginTrigger method. -type ExportJobsClientBeginTriggerOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExportJobsOperationResultClientGetOptions contains the optional parameters for the ExportJobsOperationResultClient.Get -// method. -type ExportJobsOperationResultClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExportJobsResult - The result for export jobs containing blob details. -type ExportJobsResult struct { - // READ-ONLY; SAS key to access the blob. - BlobSasKey *string `json:"blobSasKey,omitempty" azure:"ro"` - - // READ-ONLY; URL of the blob into which the serialized string of list of jobs is exported. - BlobURL *string `json:"blobUrl,omitempty" azure:"ro"` - - // READ-ONLY; SAS key to access the ExcelFile blob. - ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty" azure:"ro"` - - // READ-ONLY; URL of the blob into which the ExcelFile is uploaded. - ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty" azure:"ro"` -} - -// FeatureValidationRequest - Base class for feature object -type FeatureValidationRequest struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // backup support feature name. - FeatureName *string `json:"featureName,omitempty"` - - // backup support feature type. - FeatureType *FeatureType `json:"featureType,omitempty"` -} - -// GetFeatureValidationRequestBase implements the FeatureValidationRequestBaseClassification interface for type FeatureValidationRequest. -func (f *FeatureValidationRequest) GetFeatureValidationRequestBase() *FeatureValidationRequestBase { - return &FeatureValidationRequestBase{ - ObjectType: f.ObjectType, - } -} - -// FeatureValidationRequestBaseClassification provides polymorphic access to related types. -// Call the interface's GetFeatureValidationRequestBase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *FeatureValidationRequest, *FeatureValidationRequestBase -type FeatureValidationRequestBaseClassification interface { - // GetFeatureValidationRequestBase returns the FeatureValidationRequestBase content of the underlying type. - GetFeatureValidationRequestBase() *FeatureValidationRequestBase -} - -// FeatureValidationRequestBase - Base class for Backup Feature support -type FeatureValidationRequestBase struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetFeatureValidationRequestBase implements the FeatureValidationRequestBaseClassification interface for type FeatureValidationRequestBase. -func (f *FeatureValidationRequestBase) GetFeatureValidationRequestBase() *FeatureValidationRequestBase { - return f -} - -// FeatureValidationResponse - Feature Validation Response -type FeatureValidationResponse struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // backup support feature type. - FeatureType *FeatureType `json:"featureType,omitempty"` - - // Response features - Features []*SupportedFeature `json:"features,omitempty"` -} - -// GetFeatureValidationResponseBase implements the FeatureValidationResponseBaseClassification interface for type FeatureValidationResponse. -func (f *FeatureValidationResponse) GetFeatureValidationResponseBase() *FeatureValidationResponseBase { - return &FeatureValidationResponseBase{ - ObjectType: f.ObjectType, - } -} - -// FeatureValidationResponseBaseClassification provides polymorphic access to related types. -// Call the interface's GetFeatureValidationResponseBase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *FeatureValidationResponse, *FeatureValidationResponseBase -type FeatureValidationResponseBaseClassification interface { - // GetFeatureValidationResponseBase returns the FeatureValidationResponseBase content of the underlying type. - GetFeatureValidationResponseBase() *FeatureValidationResponseBase -} - -// FeatureValidationResponseBase - Base class for Backup Feature support -type FeatureValidationResponseBase struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetFeatureValidationResponseBase implements the FeatureValidationResponseBaseClassification interface for type FeatureValidationResponseBase. -func (f *FeatureValidationResponseBase) GetFeatureValidationResponseBase() *FeatureValidationResponseBase { - return f -} - -// ImmediateCopyOption - Immediate copy Option -type ImmediateCopyOption struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetCopyOption implements the CopyOptionClassification interface for type ImmediateCopyOption. -func (i *ImmediateCopyOption) GetCopyOption() *CopyOption { - return &CopyOption{ - ObjectType: i.ObjectType, - } -} - -// InnerError - Inner Error -type InnerError struct { - // Any Key value pairs that can be provided to the client for additional verbose information. - AdditionalInfo map[string]*string `json:"additionalInfo,omitempty"` - - // Unique code for this error - Code *string `json:"code,omitempty"` - - // Child Inner Error, to allow Nesting. - EmbeddedInnerError *InnerError `json:"embeddedInnerError,omitempty"` -} - -// ItemLevelRestoreCriteriaClassification provides polymorphic access to related types. -// Call the interface's GetItemLevelRestoreCriteria() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ItemLevelRestoreCriteria, *KubernetesPVRestoreCriteria, *KubernetesStorageClassRestoreCriteria, *RangeBasedItemLevelRestoreCriteria -type ItemLevelRestoreCriteriaClassification interface { - // GetItemLevelRestoreCriteria returns the ItemLevelRestoreCriteria content of the underlying type. - GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria -} - -// ItemLevelRestoreCriteria - Class to contain criteria for item level restore -type ItemLevelRestoreCriteria struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type ItemLevelRestoreCriteria. -func (i *ItemLevelRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { return i } - -// ItemLevelRestoreTargetInfo - Restore target info for Item level restore operation -type ItemLevelRestoreTargetInfo struct { - // REQUIRED; Information of target DS - DatasourceInfo *Datasource `json:"datasourceInfo,omitempty"` - - // REQUIRED; Type of Datasource object, used to initialize the right inherited type - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; Recovery Option - RecoveryOption *RecoveryOption `json:"recoveryOption,omitempty"` - - // REQUIRED; Restore Criteria - RestoreCriteria []ItemLevelRestoreCriteriaClassification `json:"restoreCriteria,omitempty"` - - // Credentials to use to authenticate with data source provider. - DatasourceAuthCredentials AuthCredentialsClassification `json:"datasourceAuthCredentials,omitempty"` - - // Information of target DS Set - DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"` - - // Target Restore region - RestoreLocation *string `json:"restoreLocation,omitempty"` -} - -// GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type ItemLevelRestoreTargetInfo. -func (i *ItemLevelRestoreTargetInfo) GetRestoreTargetInfoBase() *RestoreTargetInfoBase { - return &RestoreTargetInfoBase{ - ObjectType: i.ObjectType, - RecoveryOption: i.RecoveryOption, - RestoreLocation: i.RestoreLocation, - } -} - -// JobExtendedInfo - Extended Information about the job -type JobExtendedInfo struct { - // Job's Additional Details - AdditionalDetails map[string]*string `json:"additionalDetails,omitempty"` - - // READ-ONLY; State of the Backup Instance - BackupInstanceState *string `json:"backupInstanceState,omitempty" azure:"ro"` - - // READ-ONLY; Number of bytes transferred - DataTransferredInBytes *float64 `json:"dataTransferredInBytes,omitempty" azure:"ro"` - - // READ-ONLY; Destination where restore is done - RecoveryDestination *string `json:"recoveryDestination,omitempty" azure:"ro"` - - // READ-ONLY; Details of the Source Recovery Point - SourceRecoverPoint *RestoreJobRecoveryPointDetails `json:"sourceRecoverPoint,omitempty" azure:"ro"` - - // READ-ONLY; List of Sub Tasks of the job - SubTasks []*JobSubTask `json:"subTasks,omitempty" azure:"ro"` - - // READ-ONLY; Details of the Target Recovery Point - TargetRecoverPoint *RestoreJobRecoveryPointDetails `json:"targetRecoverPoint,omitempty" azure:"ro"` -} - -// JobSubTask - Details of Job's Sub Task -type JobSubTask struct { - // REQUIRED; Task Id of the Sub Task - TaskID *int32 `json:"taskId,omitempty"` - - // REQUIRED; Name of the Sub Task - TaskName *string `json:"taskName,omitempty"` - - // REQUIRED; Status of the Sub Task - TaskStatus *string `json:"taskStatus,omitempty"` - - // Additional details of Sub Tasks - AdditionalDetails map[string]*string `json:"additionalDetails,omitempty"` - - // READ-ONLY; Progress of the Sub Task - TaskProgress *string `json:"taskProgress,omitempty" azure:"ro"` -} - -// JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. -type JobsClientGetOptions struct { - // placeholder for future optional parameters -} - -// JobsClientListOptions contains the optional parameters for the JobsClient.List method. -type JobsClientListOptions struct { - // placeholder for future optional parameters -} - -// KubernetesPVRestoreCriteria - Item Level kubernetes persistent volume target info for restore operation -type KubernetesPVRestoreCriteria struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // Selected persistent volume claim name - Name *string `json:"name,omitempty"` - - // Selected storage class name for restore operation - StorageClassName *string `json:"storageClassName,omitempty"` -} - -// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type KubernetesPVRestoreCriteria. -func (k *KubernetesPVRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { - return &ItemLevelRestoreCriteria{ - ObjectType: k.ObjectType, - } -} - -// KubernetesStorageClassRestoreCriteria - Item Level kubernetes storage class target info for restore operation -type KubernetesStorageClassRestoreCriteria struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // Provisioner of the storage class - Provisioner *string `json:"provisioner,omitempty"` - - // Selected storage class name - SelectedStorageClassName *string `json:"selectedStorageClassName,omitempty"` -} - -// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type KubernetesStorageClassRestoreCriteria. -func (k *KubernetesStorageClassRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { - return &ItemLevelRestoreCriteria{ - ObjectType: k.ObjectType, - } -} - -// MonitoringSettings - Monitoring Settings -type MonitoringSettings struct { - // Settings for Azure Monitor based alerts - AzureMonitorAlertSettings *AzureMonitorAlertSettings `json:"azureMonitorAlertSettings,omitempty"` -} - -// OperationExtendedInfoClassification provides polymorphic access to related types. -// Call the interface's GetOperationExtendedInfo() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *OperationExtendedInfo, *OperationJobExtendedInfo -type OperationExtendedInfoClassification interface { - // GetOperationExtendedInfo returns the OperationExtendedInfo content of the underlying type. - GetOperationExtendedInfo() *OperationExtendedInfo -} - -// OperationExtendedInfo - Operation Extended Info -type OperationExtendedInfo struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` -} - -// GetOperationExtendedInfo implements the OperationExtendedInfoClassification interface for type OperationExtendedInfo. -func (o *OperationExtendedInfo) GetOperationExtendedInfo() *OperationExtendedInfo { return o } - -// OperationJobExtendedInfo - Operation Job Extended Info -type OperationJobExtendedInfo struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Arm Id of the job created for this operation. - JobID *string `json:"jobId,omitempty"` -} - -// GetOperationExtendedInfo implements the OperationExtendedInfoClassification interface for type OperationJobExtendedInfo. -func (o *OperationJobExtendedInfo) GetOperationExtendedInfo() *OperationExtendedInfo { - return &OperationExtendedInfo{ - ObjectType: o.ObjectType, - } -} - -// OperationResource - Operation Resource -type OperationResource struct { - // End time of the operation - EndTime *time.Time `json:"endTime,omitempty"` - - // Required if status == failed or status == canceled. This is the OData v4 error format, used by the RPC and will go into - // the v2.2 Azure REST API guidelines. The full set of optional properties (e.g. - // inner errors / details) can be found in the "Error Response" section. - Error *Error `json:"error,omitempty"` - - // It should match what is used to GET the operation result - ID *string `json:"id,omitempty"` - - // It must match the last segment of the "id" field, and will typically be a GUID / system generated value - Name *string `json:"name,omitempty"` - - // End time of the operation - Properties OperationExtendedInfoClassification `json:"properties,omitempty"` - - // Start time of the operation - StartTime *time.Time `json:"startTime,omitempty"` - Status *string `json:"status,omitempty"` -} - -// OperationResultClientGetOptions contains the optional parameters for the OperationResultClient.Get method. -type OperationResultClientGetOptions struct { - // placeholder for future optional parameters -} - -// OperationStatusBackupVaultContextClientGetOptions contains the optional parameters for the OperationStatusBackupVaultContextClient.Get -// method. -type OperationStatusBackupVaultContextClientGetOptions struct { - // placeholder for future optional parameters -} - -// OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method. -type OperationStatusClientGetOptions struct { - // placeholder for future optional parameters -} - -// OperationStatusResourceGroupContextClientGetOptions contains the optional parameters for the OperationStatusResourceGroupContextClient.Get -// method. -type OperationStatusResourceGroupContextClientGetOptions struct { - // placeholder for future optional parameters -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// PatchBackupVaultInput - Backup Vault Contract for Patch Backup Vault API. -type PatchBackupVaultInput struct { - // Monitoring Settings - MonitoringSettings *MonitoringSettings `json:"monitoringSettings,omitempty"` -} - -// PatchResourceRequestInput - Patch Request content for Microsoft.DataProtection resources -type PatchResourceRequestInput struct { - // Input Managed Identity Details - Identity *DppIdentityDetails `json:"identity,omitempty"` - - // Resource properties. - Properties *PatchBackupVaultInput `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` -} - -// PolicyInfo - Policy Info in backupInstance -type PolicyInfo struct { - // REQUIRED - PolicyID *string `json:"policyId,omitempty"` - - // Policy parameters for the backup instance - PolicyParameters *PolicyParameters `json:"policyParameters,omitempty"` - - // READ-ONLY - PolicyVersion *string `json:"policyVersion,omitempty" azure:"ro"` -} - -// PolicyParameters - Parameters in Policy -type PolicyParameters struct { - // Gets or sets the DataStore Parameters - DataStoreParametersList []DataStoreParametersClassification `json:"dataStoreParametersList,omitempty"` -} - -// ProtectionStatusDetails - Protection status details -type ProtectionStatusDetails struct { - // Specifies the protection status error of the resource - ErrorDetails *UserFacingError `json:"errorDetails,omitempty"` - - // Specifies the protection status of the resource - Status *Status `json:"status,omitempty"` -} - -// RangeBasedItemLevelRestoreCriteria - Item Level target info for restore operation -type RangeBasedItemLevelRestoreCriteria struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // maximum value for range prefix match - MaxMatchingValue *string `json:"maxMatchingValue,omitempty"` - - // minimum value for range prefix match - MinMatchingValue *string `json:"minMatchingValue,omitempty"` -} - -// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type RangeBasedItemLevelRestoreCriteria. -func (r *RangeBasedItemLevelRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { - return &ItemLevelRestoreCriteria{ - ObjectType: r.ObjectType, - } -} - -// RecoveryPointDataStoreDetails - RecoveryPoint datastore details -type RecoveryPointDataStoreDetails struct { - CreationTime *time.Time `json:"creationTime,omitempty"` - ExpiryTime *time.Time `json:"expiryTime,omitempty"` - ID *string `json:"id,omitempty"` - MetaData *string `json:"metaData,omitempty"` - State *string `json:"state,omitempty"` - Type *string `json:"type,omitempty"` - Visible *bool `json:"visible,omitempty"` - - // READ-ONLY - RehydrationExpiryTime *time.Time `json:"rehydrationExpiryTime,omitempty" azure:"ro"` - - // READ-ONLY - RehydrationStatus *RehydrationStatus `json:"rehydrationStatus,omitempty" azure:"ro"` -} - -// RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. -type RecoveryPointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.List method. -type RecoveryPointsClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -type RecoveryPointsFilters struct { - EndDate *string `json:"endDate,omitempty"` - ExtendedInfo *bool `json:"extendedInfo,omitempty"` - IsVisible *bool `json:"isVisible,omitempty"` - RestorePointDataStoreID *string `json:"restorePointDataStoreId,omitempty"` - RestorePointState *string `json:"restorePointState,omitempty"` - StartDate *string `json:"startDate,omitempty"` -} - -type ResourceGuard struct { - // List of critical operations which are not protected by this resourceGuard - VaultCriticalOperationExclusionList []*string `json:"vaultCriticalOperationExclusionList,omitempty"` - - // READ-ONLY; This flag indicates whether auto approval is allowed or not. - AllowAutoApprovals *bool `json:"allowAutoApprovals,omitempty" azure:"ro"` - - // READ-ONLY; Description about the pre-req steps to perform all the critical operations. - Description *string `json:"description,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the BackupVault resource - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; {readonly} List of operation details those are protected by the ResourceGuard resource - ResourceGuardOperations []*ResourceGuardOperation `json:"resourceGuardOperations,omitempty" azure:"ro"` -} - -// ResourceGuardOperation - This class contains all the details about a critical operation. -type ResourceGuardOperation struct { - // READ-ONLY; Type of resource request. - RequestResourceType *string `json:"requestResourceType,omitempty" azure:"ro"` - - // READ-ONLY; Name of the critical operation. - VaultCriticalOperation *string `json:"vaultCriticalOperation,omitempty" azure:"ro"` -} - -type ResourceGuardResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Input Managed Identity Details - Identity *DppIdentityDetails `json:"identity,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // ResourceGuardResource properties - Properties *ResourceGuard `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceGuardResourceList - List of ResourceGuard resources -type ResourceGuardResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*ResourceGuardResource `json:"value,omitempty"` -} - -// ResourceGuardsClientDeleteOptions contains the optional parameters for the ResourceGuardsClient.Delete method. -type ResourceGuardsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetBackupSecurityPINRequestsObjects -// method. -type ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject -// method. -type ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject -// method. -type ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject -// method. -type ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject -// method. -type ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject -// method. -type ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions contains the optional parameters for the ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject -// method. -type ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects -// method. -type ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects -// method. -type ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects -// method. -type ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetOptions contains the optional parameters for the ResourceGuardsClient.Get method. -type ResourceGuardsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetResourcesInResourceGroupOptions contains the optional parameters for the ResourceGuardsClient.GetResourcesInResourceGroup -// method. -type ResourceGuardsClientGetResourcesInResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetResourcesInSubscriptionOptions contains the optional parameters for the ResourceGuardsClient.GetResourcesInSubscription -// method. -type ResourceGuardsClientGetResourcesInSubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects -// method. -type ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects -// method. -type ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientPatchOptions contains the optional parameters for the ResourceGuardsClient.Patch method. -type ResourceGuardsClientPatchOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardsClientPutOptions contains the optional parameters for the ResourceGuardsClient.Put method. -type ResourceGuardsClientPutOptions struct { - // placeholder for future optional parameters -} - -// ResourceMoveDetails will be returned in response to GetResource call from ARM -type ResourceMoveDetails struct { - // Completion time in UTC of latest ResourceMove operation attempted. ISO 8601 format. - CompletionTimeUTC *string `json:"completionTimeUtc,omitempty"` - - // CorrelationId of latest ResourceMove operation attempted - OperationID *string `json:"operationId,omitempty"` - - // ARM resource path of source resource - SourceResourcePath *string `json:"sourceResourcePath,omitempty"` - - // Start time in UTC of latest ResourceMove operation attempted. ISO 8601 format. - StartTimeUTC *string `json:"startTimeUtc,omitempty"` - - // ARM resource path of target resource used in latest ResourceMove operation - TargetResourcePath *string `json:"targetResourcePath,omitempty"` -} - -type RestorableTimeRange struct { - // REQUIRED; End time for the available restore range - EndTime *string `json:"endTime,omitempty"` - - // REQUIRED; Start time for the available restore range - StartTime *string `json:"startTime,omitempty"` - ObjectType *string `json:"objectType,omitempty"` -} - -// RestorableTimeRangesClientFindOptions contains the optional parameters for the RestorableTimeRangesClient.Find method. -type RestorableTimeRangesClientFindOptions struct { - // placeholder for future optional parameters -} - -// RestoreFilesTargetInfo - Class encapsulating restore as files target parameters -type RestoreFilesTargetInfo struct { - // REQUIRED; Type of Datasource object, used to initialize the right inherited type - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; Recovery Option - RecoveryOption *RecoveryOption `json:"recoveryOption,omitempty"` - - // REQUIRED; Destination of RestoreAsFiles operation, when destination is not a datasource - TargetDetails *TargetDetails `json:"targetDetails,omitempty"` - - // Target Restore region - RestoreLocation *string `json:"restoreLocation,omitempty"` -} - -// GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type RestoreFilesTargetInfo. -func (r *RestoreFilesTargetInfo) GetRestoreTargetInfoBase() *RestoreTargetInfoBase { - return &RestoreTargetInfoBase{ - ObjectType: r.ObjectType, - RecoveryOption: r.RecoveryOption, - RestoreLocation: r.RestoreLocation, - } -} - -type RestoreJobRecoveryPointDetails struct { - RecoveryPointID *string `json:"recoveryPointID,omitempty"` - RecoveryPointTime *time.Time `json:"recoveryPointTime,omitempty"` -} - -// RestoreTargetInfo - Class encapsulating restore target parameters -type RestoreTargetInfo struct { - // REQUIRED; Information of target DS - DatasourceInfo *Datasource `json:"datasourceInfo,omitempty"` - - // REQUIRED; Type of Datasource object, used to initialize the right inherited type - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; Recovery Option - RecoveryOption *RecoveryOption `json:"recoveryOption,omitempty"` - - // Credentials to use to authenticate with data source provider. - DatasourceAuthCredentials AuthCredentialsClassification `json:"datasourceAuthCredentials,omitempty"` - - // Information of target DS Set - DatasourceSetInfo *DatasourceSet `json:"datasourceSetInfo,omitempty"` - - // Target Restore region - RestoreLocation *string `json:"restoreLocation,omitempty"` -} - -// GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type RestoreTargetInfo. -func (r *RestoreTargetInfo) GetRestoreTargetInfoBase() *RestoreTargetInfoBase { - return &RestoreTargetInfoBase{ - ObjectType: r.ObjectType, - RecoveryOption: r.RecoveryOption, - RestoreLocation: r.RestoreLocation, - } -} - -// RestoreTargetInfoBaseClassification provides polymorphic access to related types. -// Call the interface's GetRestoreTargetInfoBase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ItemLevelRestoreTargetInfo, *RestoreFilesTargetInfo, *RestoreTargetInfo, *RestoreTargetInfoBase -type RestoreTargetInfoBaseClassification interface { - // GetRestoreTargetInfoBase returns the RestoreTargetInfoBase content of the underlying type. - GetRestoreTargetInfoBase() *RestoreTargetInfoBase -} - -// RestoreTargetInfoBase - Base class common to RestoreTargetInfo and RestoreFilesTargetInfo -type RestoreTargetInfoBase struct { - // REQUIRED; Type of Datasource object, used to initialize the right inherited type - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; Recovery Option - RecoveryOption *RecoveryOption `json:"recoveryOption,omitempty"` - - // Target Restore region - RestoreLocation *string `json:"restoreLocation,omitempty"` -} - -// GetRestoreTargetInfoBase implements the RestoreTargetInfoBaseClassification interface for type RestoreTargetInfoBase. -func (r *RestoreTargetInfoBase) GetRestoreTargetInfoBase() *RestoreTargetInfoBase { return r } - -// RetentionTag - Retention tag -type RetentionTag struct { - // REQUIRED; Retention Tag Name to relate it to retention rule. - TagName *string `json:"tagName,omitempty"` - - // READ-ONLY; Retention Tag version. - ETag *string `json:"eTag,omitempty" azure:"ro"` - - // READ-ONLY; Retention Tag version. - ID *string `json:"id,omitempty" azure:"ro"` -} - -// ScheduleBasedBackupCriteria - Schedule based backup criteria -type ScheduleBasedBackupCriteria struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" and should be part of AbsoluteMarker - // enum - AbsoluteCriteria []*AbsoluteMarker `json:"absoluteCriteria,omitempty"` - - // This is day of the month from 1 to 28 other wise last of month - DaysOfMonth []*Day `json:"daysOfMonth,omitempty"` - - // It should be Sunday/Monday/T…./Saturday - DaysOfTheWeek []*DayOfWeek `json:"daysOfTheWeek,omitempty"` - - // It should be January/February/……/December - MonthsOfYear []*Month `json:"monthsOfYear,omitempty"` - - // List of schedule times for backup - ScheduleTimes []*time.Time `json:"scheduleTimes,omitempty"` - - // It should be First/Second/Third/Fourth/Last - WeeksOfTheMonth []*WeekNumber `json:"weeksOfTheMonth,omitempty"` -} - -// GetBackupCriteria implements the BackupCriteriaClassification interface for type ScheduleBasedBackupCriteria. -func (s *ScheduleBasedBackupCriteria) GetBackupCriteria() *BackupCriteria { - return &BackupCriteria{ - ObjectType: s.ObjectType, - } -} - -// ScheduleBasedTriggerContext - Schedule based trigger context -type ScheduleBasedTriggerContext struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // REQUIRED; Schedule for this backup - Schedule *BackupSchedule `json:"schedule,omitempty"` - - // REQUIRED; List of tags that can be applicable for given schedule. - TaggingCriteria []*TaggingCriteria `json:"taggingCriteria,omitempty"` -} - -// GetTriggerContext implements the TriggerContextClassification interface for type ScheduleBasedTriggerContext. -func (s *ScheduleBasedTriggerContext) GetTriggerContext() *TriggerContext { - return &TriggerContext{ - ObjectType: s.ObjectType, - } -} - -// SecretStoreBasedAuthCredentials - Secret store based authentication credentials. -type SecretStoreBasedAuthCredentials struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` - - // Secret store resource - SecretStoreResource *SecretStoreResource `json:"secretStoreResource,omitempty"` -} - -// GetAuthCredentials implements the AuthCredentialsClassification interface for type SecretStoreBasedAuthCredentials. -func (s *SecretStoreBasedAuthCredentials) GetAuthCredentials() *AuthCredentials { - return &AuthCredentials{ - ObjectType: s.ObjectType, - } -} - -// SecretStoreResource - Class representing a secret store resource. -type SecretStoreResource struct { - // REQUIRED; Gets or sets the type of secret store - SecretStoreType *SecretStoreType `json:"secretStoreType,omitempty"` - - // Uri to get to the resource - URI *string `json:"uri,omitempty"` - - // Gets or sets value stored in secret store resource - Value *string `json:"value,omitempty"` -} - -// SourceLifeCycle - Source LifeCycle -type SourceLifeCycle struct { - // REQUIRED; Delete Option - DeleteAfter DeleteOptionClassification `json:"deleteAfter,omitempty"` - - // REQUIRED; DataStoreInfo base - SourceDataStore *DataStoreInfoBase `json:"sourceDataStore,omitempty"` - TargetDataStoreCopySettings []*TargetCopySetting `json:"targetDataStoreCopySettings,omitempty"` -} - -// StorageSetting - Storage setting -type StorageSetting struct { - // Gets or sets the type of the datastore. - DatastoreType *StorageSettingStoreTypes `json:"datastoreType,omitempty"` - - // Gets or sets the type. - Type *StorageSettingTypes `json:"type,omitempty"` -} - -// SupportedFeature - Elements class for feature request -type SupportedFeature struct { - // support feature type. - ExposureControlledFeatures []*string `json:"exposureControlledFeatures,omitempty"` - - // support feature type. - FeatureName *string `json:"featureName,omitempty"` - - // feature support status - SupportStatus *FeatureSupportStatus `json:"supportStatus,omitempty"` -} - -// SyncBackupInstanceRequest - Sync BackupInstance Request -type SyncBackupInstanceRequest struct { - // Field indicating sync type e.g. to sync only in case of failure or in all cases - SyncType *SyncType `json:"syncType,omitempty"` -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -// TaggingCriteria - Tagging criteria -type TaggingCriteria struct { - // REQUIRED; Specifies if tag is default. - IsDefault *bool `json:"isDefault,omitempty"` - - // REQUIRED; Retention tag information - TagInfo *RetentionTag `json:"tagInfo,omitempty"` - - // REQUIRED; Retention Tag priority. - TaggingPriority *int64 `json:"taggingPriority,omitempty"` - - // Criteria which decides whether the tag can be applied to a triggered backup. - Criteria []BackupCriteriaClassification `json:"criteria,omitempty"` -} - -// TargetCopySetting - Target copy settings -type TargetCopySetting struct { - // REQUIRED; It can be CustomCopyOption or ImmediateCopyOption. - CopyAfter CopyOptionClassification `json:"copyAfter,omitempty"` - - // REQUIRED; Info of target datastore - DataStore *DataStoreInfoBase `json:"dataStore,omitempty"` -} - -// TargetDetails - Class encapsulating target details, used where the destination is not a datasource -type TargetDetails struct { - // REQUIRED; Restore operation may create multiple files inside location pointed by Url Below will be the common prefix for - // all of them - FilePrefix *string `json:"filePrefix,omitempty"` - - // REQUIRED; Denotes the target location where the data will be restored, string value for the enum {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType} - RestoreTargetLocationType *RestoreTargetLocationType `json:"restoreTargetLocationType,omitempty"` - - // REQUIRED; Url denoting the restore destination. It can point to container / file share etc - URL *string `json:"url,omitempty"` -} - -// TriggerBackupRequest - Trigger backup request -type TriggerBackupRequest struct { - // REQUIRED; Name for the Rule of the Policy which needs to be applied for this backup - BackupRuleOptions *AdHocBackupRuleOptions `json:"backupRuleOptions,omitempty"` -} - -// TriggerContextClassification provides polymorphic access to related types. -// Call the interface's GetTriggerContext() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AdhocBasedTriggerContext, *ScheduleBasedTriggerContext, *TriggerContext -type TriggerContextClassification interface { - // GetTriggerContext returns the TriggerContext content of the underlying type. - GetTriggerContext() *TriggerContext -} - -// TriggerContext - Trigger context -type TriggerContext struct { - // REQUIRED; Type of the specific object - used for deserializing - ObjectType *string `json:"objectType,omitempty"` -} - -// GetTriggerContext implements the TriggerContextClassification interface for type TriggerContext. -func (t *TriggerContext) GetTriggerContext() *TriggerContext { return t } - -// UserFacingError - Error object used by layers that have access to localized content, and propagate that to user -type UserFacingError struct { - // Unique code for this error - Code *string `json:"code,omitempty"` - - // Additional related Errors - Details []*UserFacingError `json:"details,omitempty"` - - // Inner Error - InnerError *InnerError `json:"innerError,omitempty"` - - // Whether the operation will be retryable or not - IsRetryable *bool `json:"isRetryable,omitempty"` - - // Whether the operation is due to a user error or service error - IsUserError *bool `json:"isUserError,omitempty"` - Message *string `json:"message,omitempty"` - - // Any key value pairs that can be injected inside error object - Properties map[string]*string `json:"properties,omitempty"` - - // RecommendedAction � localized. - RecommendedAction []*string `json:"recommendedAction,omitempty"` - - // Target of the error. - Target *string `json:"target,omitempty"` -} - -// ValidateForBackupRequest - Validate for backup request -type ValidateForBackupRequest struct { - // REQUIRED; Backup Instance - BackupInstance *BackupInstance `json:"backupInstance,omitempty"` -} - -// ValidateRestoreRequestObject - Validate restore request object -type ValidateRestoreRequestObject struct { - // REQUIRED; Gets or sets the restore request object. - RestoreRequestObject AzureBackupRestoreRequestClassification `json:"restoreRequestObject,omitempty"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models_serde.go deleted file mode 100644 index e2fa7112..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_models_serde.go +++ /dev/null @@ -1,1834 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "time" -) - -// MarshalJSON implements the json.Marshaller interface for type AbsoluteDeleteOption. -func (a AbsoluteDeleteOption) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "duration", a.Duration) - objectMap["objectType"] = "AbsoluteDeleteOption" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AbsoluteDeleteOption. -func (a *AbsoluteDeleteOption) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "duration": - err = unpopulate(val, "Duration", &a.Duration) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AdhocBasedTriggerContext. -func (a AdhocBasedTriggerContext) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AdhocBasedTriggerContext" - populate(objectMap, "taggingCriteria", a.TaggingCriteria) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdhocBasedTriggerContext. -func (a *AdhocBasedTriggerContext) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "taggingCriteria": - err = unpopulate(val, "TaggingCriteria", &a.TaggingCriteria) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupDiscreteRecoveryPoint. -func (a AzureBackupDiscreteRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "friendlyName", a.FriendlyName) - objectMap["objectType"] = "AzureBackupDiscreteRecoveryPoint" - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "policyVersion", a.PolicyVersion) - populate(objectMap, "recoveryPointDataStoresDetails", a.RecoveryPointDataStoresDetails) - populate(objectMap, "recoveryPointId", a.RecoveryPointID) - populateTimeRFC3339(objectMap, "recoveryPointTime", a.RecoveryPointTime) - populate(objectMap, "recoveryPointType", a.RecoveryPointType) - populate(objectMap, "retentionTagName", a.RetentionTagName) - populate(objectMap, "retentionTagVersion", a.RetentionTagVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupDiscreteRecoveryPoint. -func (a *AzureBackupDiscreteRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "policyVersion": - err = unpopulate(val, "PolicyVersion", &a.PolicyVersion) - delete(rawMsg, key) - case "recoveryPointDataStoresDetails": - err = unpopulate(val, "RecoveryPointDataStoresDetails", &a.RecoveryPointDataStoresDetails) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) - delete(rawMsg, key) - case "recoveryPointTime": - err = unpopulateTimeRFC3339(val, "RecoveryPointTime", &a.RecoveryPointTime) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &a.RecoveryPointType) - delete(rawMsg, key) - case "retentionTagName": - err = unpopulate(val, "RetentionTagName", &a.RetentionTagName) - delete(rawMsg, key) - case "retentionTagVersion": - err = unpopulate(val, "RetentionTagVersion", &a.RetentionTagVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupFindRestorableTimeRangesResponse. -func (a AzureBackupFindRestorableTimeRangesResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "objectType", a.ObjectType) - populate(objectMap, "restorableTimeRanges", a.RestorableTimeRanges) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupJob. -func (a AzureBackupJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activityID", a.ActivityID) - populate(objectMap, "backupInstanceFriendlyName", a.BackupInstanceFriendlyName) - populate(objectMap, "backupInstanceId", a.BackupInstanceID) - populate(objectMap, "dataSourceId", a.DataSourceID) - populate(objectMap, "dataSourceLocation", a.DataSourceLocation) - populate(objectMap, "dataSourceName", a.DataSourceName) - populate(objectMap, "dataSourceSetName", a.DataSourceSetName) - populate(objectMap, "dataSourceType", a.DataSourceType) - populate(objectMap, "destinationDataStoreName", a.DestinationDataStoreName) - populate(objectMap, "duration", a.Duration) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "errorDetails", a.ErrorDetails) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "isUserTriggered", a.IsUserTriggered) - populate(objectMap, "operation", a.Operation) - populate(objectMap, "operationCategory", a.OperationCategory) - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "progressEnabled", a.ProgressEnabled) - populate(objectMap, "progressUrl", a.ProgressURL) - populate(objectMap, "restoreType", a.RestoreType) - populate(objectMap, "sourceDataStoreName", a.SourceDataStoreName) - populate(objectMap, "sourceResourceGroup", a.SourceResourceGroup) - populate(objectMap, "sourceSubscriptionID", a.SourceSubscriptionID) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - populate(objectMap, "status", a.Status) - populate(objectMap, "subscriptionId", a.SubscriptionID) - populate(objectMap, "supportedActions", a.SupportedActions) - populate(objectMap, "vaultName", a.VaultName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupJob. -func (a *AzureBackupJob) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activityID": - err = unpopulate(val, "ActivityID", &a.ActivityID) - delete(rawMsg, key) - case "backupInstanceFriendlyName": - err = unpopulate(val, "BackupInstanceFriendlyName", &a.BackupInstanceFriendlyName) - delete(rawMsg, key) - case "backupInstanceId": - err = unpopulate(val, "BackupInstanceID", &a.BackupInstanceID) - delete(rawMsg, key) - case "dataSourceId": - err = unpopulate(val, "DataSourceID", &a.DataSourceID) - delete(rawMsg, key) - case "dataSourceLocation": - err = unpopulate(val, "DataSourceLocation", &a.DataSourceLocation) - delete(rawMsg, key) - case "dataSourceName": - err = unpopulate(val, "DataSourceName", &a.DataSourceName) - delete(rawMsg, key) - case "dataSourceSetName": - err = unpopulate(val, "DataSourceSetName", &a.DataSourceSetName) - delete(rawMsg, key) - case "dataSourceType": - err = unpopulate(val, "DataSourceType", &a.DataSourceType) - delete(rawMsg, key) - case "destinationDataStoreName": - err = unpopulate(val, "DestinationDataStoreName", &a.DestinationDataStoreName) - delete(rawMsg, key) - case "duration": - err = unpopulate(val, "Duration", &a.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) - delete(rawMsg, key) - case "errorDetails": - err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) - delete(rawMsg, key) - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "isUserTriggered": - err = unpopulate(val, "IsUserTriggered", &a.IsUserTriggered) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &a.Operation) - delete(rawMsg, key) - case "operationCategory": - err = unpopulate(val, "OperationCategory", &a.OperationCategory) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "progressEnabled": - err = unpopulate(val, "ProgressEnabled", &a.ProgressEnabled) - delete(rawMsg, key) - case "progressUrl": - err = unpopulate(val, "ProgressURL", &a.ProgressURL) - delete(rawMsg, key) - case "restoreType": - err = unpopulate(val, "RestoreType", &a.RestoreType) - delete(rawMsg, key) - case "sourceDataStoreName": - err = unpopulate(val, "SourceDataStoreName", &a.SourceDataStoreName) - delete(rawMsg, key) - case "sourceResourceGroup": - err = unpopulate(val, "SourceResourceGroup", &a.SourceResourceGroup) - delete(rawMsg, key) - case "sourceSubscriptionID": - err = unpopulate(val, "SourceSubscriptionID", &a.SourceSubscriptionID) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) - delete(rawMsg, key) - case "subscriptionId": - err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) - delete(rawMsg, key) - case "supportedActions": - err = unpopulate(val, "SupportedActions", &a.SupportedActions) - delete(rawMsg, key) - case "vaultName": - err = unpopulate(val, "VaultName", &a.VaultName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupParams. -func (a AzureBackupParams) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupType", a.BackupType) - objectMap["objectType"] = "AzureBackupParams" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupParams. -func (a *AzureBackupParams) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupType": - err = unpopulate(val, "BackupType", &a.BackupType) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryPointBasedRestoreRequest. -func (a AzureBackupRecoveryPointBasedRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureBackupRecoveryPointBasedRestoreRequest" - populate(objectMap, "recoveryPointId", a.RecoveryPointID) - populate(objectMap, "restoreTargetInfo", a.RestoreTargetInfo) - populate(objectMap, "sourceDataStoreType", a.SourceDataStoreType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryPointBasedRestoreRequest. -func (a *AzureBackupRecoveryPointBasedRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) - delete(rawMsg, key) - case "restoreTargetInfo": - a.RestoreTargetInfo, err = unmarshalRestoreTargetInfoBaseClassification(val) - delete(rawMsg, key) - case "sourceDataStoreType": - err = unpopulate(val, "SourceDataStoreType", &a.SourceDataStoreType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryPointResource. -func (a AzureBackupRecoveryPointResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryPointResource. -func (a *AzureBackupRecoveryPointResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - a.Properties, err = unmarshalAzureBackupRecoveryPointClassification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupRecoveryTimeBasedRestoreRequest. -func (a AzureBackupRecoveryTimeBasedRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureBackupRecoveryTimeBasedRestoreRequest" - populate(objectMap, "recoveryPointTime", a.RecoveryPointTime) - populate(objectMap, "restoreTargetInfo", a.RestoreTargetInfo) - populate(objectMap, "sourceDataStoreType", a.SourceDataStoreType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRecoveryTimeBasedRestoreRequest. -func (a *AzureBackupRecoveryTimeBasedRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointTime": - err = unpopulate(val, "RecoveryPointTime", &a.RecoveryPointTime) - delete(rawMsg, key) - case "restoreTargetInfo": - a.RestoreTargetInfo, err = unmarshalRestoreTargetInfoBaseClassification(val) - delete(rawMsg, key) - case "sourceDataStoreType": - err = unpopulate(val, "SourceDataStoreType", &a.SourceDataStoreType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupRestoreRequest. -func (a AzureBackupRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = a.ObjectType - populate(objectMap, "restoreTargetInfo", a.RestoreTargetInfo) - populate(objectMap, "sourceDataStoreType", a.SourceDataStoreType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRestoreRequest. -func (a *AzureBackupRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "restoreTargetInfo": - a.RestoreTargetInfo, err = unmarshalRestoreTargetInfoBaseClassification(val) - delete(rawMsg, key) - case "sourceDataStoreType": - err = unpopulate(val, "SourceDataStoreType", &a.SourceDataStoreType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupRestoreWithRehydrationRequest. -func (a AzureBackupRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureBackupRestoreWithRehydrationRequest" - populate(objectMap, "recoveryPointId", a.RecoveryPointID) - populate(objectMap, "rehydrationPriority", a.RehydrationPriority) - populate(objectMap, "rehydrationRetentionDuration", a.RehydrationRetentionDuration) - populate(objectMap, "restoreTargetInfo", a.RestoreTargetInfo) - populate(objectMap, "sourceDataStoreType", a.SourceDataStoreType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRestoreWithRehydrationRequest. -func (a *AzureBackupRestoreWithRehydrationRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) - delete(rawMsg, key) - case "rehydrationPriority": - err = unpopulate(val, "RehydrationPriority", &a.RehydrationPriority) - delete(rawMsg, key) - case "rehydrationRetentionDuration": - err = unpopulate(val, "RehydrationRetentionDuration", &a.RehydrationRetentionDuration) - delete(rawMsg, key) - case "restoreTargetInfo": - a.RestoreTargetInfo, err = unmarshalRestoreTargetInfoBaseClassification(val) - delete(rawMsg, key) - case "sourceDataStoreType": - err = unpopulate(val, "SourceDataStoreType", &a.SourceDataStoreType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupRule. -func (a AzureBackupRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupParameters", a.BackupParameters) - populate(objectMap, "dataStore", a.DataStore) - populate(objectMap, "name", a.Name) - objectMap["objectType"] = "AzureBackupRule" - populate(objectMap, "trigger", a.Trigger) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupRule. -func (a *AzureBackupRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupParameters": - a.BackupParameters, err = unmarshalBackupParametersClassification(val) - delete(rawMsg, key) - case "dataStore": - err = unpopulate(val, "DataStore", &a.DataStore) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "trigger": - a.Trigger, err = unmarshalTriggerContextClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureOperationalStoreParameters. -func (a AzureOperationalStoreParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataStoreType", a.DataStoreType) - objectMap["objectType"] = "AzureOperationalStoreParameters" - populate(objectMap, "resourceGroupId", a.ResourceGroupID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureOperationalStoreParameters. -func (a *AzureOperationalStoreParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataStoreType": - err = unpopulate(val, "DataStoreType", &a.DataStoreType) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "resourceGroupId": - err = unpopulate(val, "ResourceGroupID", &a.ResourceGroupID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureRetentionRule. -func (a AzureRetentionRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isDefault", a.IsDefault) - populate(objectMap, "lifecycles", a.Lifecycles) - populate(objectMap, "name", a.Name) - objectMap["objectType"] = "AzureRetentionRule" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureRetentionRule. -func (a *AzureRetentionRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isDefault": - err = unpopulate(val, "IsDefault", &a.IsDefault) - delete(rawMsg, key) - case "lifecycles": - err = unpopulate(val, "Lifecycles", &a.Lifecycles) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackupInstance. -func (b BackupInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "currentProtectionState", b.CurrentProtectionState) - populate(objectMap, "dataSourceInfo", b.DataSourceInfo) - populate(objectMap, "dataSourceSetInfo", b.DataSourceSetInfo) - populate(objectMap, "datasourceAuthCredentials", b.DatasourceAuthCredentials) - populate(objectMap, "friendlyName", b.FriendlyName) - populate(objectMap, "objectType", b.ObjectType) - populate(objectMap, "policyInfo", b.PolicyInfo) - populate(objectMap, "protectionErrorDetails", b.ProtectionErrorDetails) - populate(objectMap, "protectionStatus", b.ProtectionStatus) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "validationType", b.ValidationType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupInstance. -func (b *BackupInstance) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentProtectionState": - err = unpopulate(val, "CurrentProtectionState", &b.CurrentProtectionState) - delete(rawMsg, key) - case "dataSourceInfo": - err = unpopulate(val, "DataSourceInfo", &b.DataSourceInfo) - delete(rawMsg, key) - case "dataSourceSetInfo": - err = unpopulate(val, "DataSourceSetInfo", &b.DataSourceSetInfo) - delete(rawMsg, key) - case "datasourceAuthCredentials": - b.DatasourceAuthCredentials, err = unmarshalAuthCredentialsClassification(val) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &b.FriendlyName) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &b.ObjectType) - delete(rawMsg, key) - case "policyInfo": - err = unpopulate(val, "PolicyInfo", &b.PolicyInfo) - delete(rawMsg, key) - case "protectionErrorDetails": - err = unpopulate(val, "ProtectionErrorDetails", &b.ProtectionErrorDetails) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &b.ProtectionStatus) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - case "validationType": - err = unpopulate(val, "ValidationType", &b.ValidationType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackupPolicy. -func (b BackupPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "datasourceTypes", b.DatasourceTypes) - objectMap["objectType"] = "BackupPolicy" - populate(objectMap, "policyRules", b.PolicyRules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupPolicy. -func (b *BackupPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "datasourceTypes": - err = unpopulate(val, "DatasourceTypes", &b.DatasourceTypes) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &b.ObjectType) - delete(rawMsg, key) - case "policyRules": - b.PolicyRules, err = unmarshalBasePolicyRuleClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackupSchedule. -func (b BackupSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "repeatingTimeIntervals", b.RepeatingTimeIntervals) - populate(objectMap, "timeZone", b.TimeZone) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupVault. -func (b BackupVault) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "monitoringSettings", b.MonitoringSettings) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "resourceMoveDetails", b.ResourceMoveDetails) - populate(objectMap, "resourceMoveState", b.ResourceMoveState) - populate(objectMap, "storageSettings", b.StorageSettings) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupVaultResource. -func (b BackupVaultResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", b.ETag) - populate(objectMap, "id", b.ID) - populate(objectMap, "identity", b.Identity) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BaseBackupPolicy. -func (b BaseBackupPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "datasourceTypes", b.DatasourceTypes) - objectMap["objectType"] = b.ObjectType - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BaseBackupPolicyResource. -func (b BaseBackupPolicyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BaseBackupPolicyResource. -func (b *BaseBackupPolicyResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - b.Properties, err = unmarshalBaseBackupPolicyClassification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CopyOnExpiryOption. -func (c CopyOnExpiryOption) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "CopyOnExpiryOption" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CopyOnExpiryOption. -func (c *CopyOnExpiryOption) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &c.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomCopyOption. -func (c CustomCopyOption) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "duration", c.Duration) - objectMap["objectType"] = "CustomCopyOption" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomCopyOption. -func (c *CustomCopyOption) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "duration": - err = unpopulate(val, "Duration", &c.Duration) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &c.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DppTrackedResource. -func (d DppTrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", d.ETag) - populate(objectMap, "id", d.ID) - populate(objectMap, "identity", d.Identity) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FeatureValidationRequest. -func (f FeatureValidationRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "featureName", f.FeatureName) - populate(objectMap, "featureType", f.FeatureType) - objectMap["objectType"] = "FeatureValidationRequest" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureValidationRequest. -func (f *FeatureValidationRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "featureName": - err = unpopulate(val, "FeatureName", &f.FeatureName) - delete(rawMsg, key) - case "featureType": - err = unpopulate(val, "FeatureType", &f.FeatureType) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &f.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureValidationResponse. -func (f *FeatureValidationResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "featureType": - err = unpopulate(val, "FeatureType", &f.FeatureType) - delete(rawMsg, key) - case "features": - err = unpopulate(val, "Features", &f.Features) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &f.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ImmediateCopyOption. -func (i ImmediateCopyOption) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "ImmediateCopyOption" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ImmediateCopyOption. -func (i *ImmediateCopyOption) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &i.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InnerError. -func (i InnerError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "additionalInfo", i.AdditionalInfo) - populate(objectMap, "code", i.Code) - populate(objectMap, "embeddedInnerError", i.EmbeddedInnerError) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ItemLevelRestoreTargetInfo. -func (i ItemLevelRestoreTargetInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "datasourceAuthCredentials", i.DatasourceAuthCredentials) - populate(objectMap, "datasourceInfo", i.DatasourceInfo) - populate(objectMap, "datasourceSetInfo", i.DatasourceSetInfo) - objectMap["objectType"] = "ItemLevelRestoreTargetInfo" - populate(objectMap, "recoveryOption", i.RecoveryOption) - populate(objectMap, "restoreCriteria", i.RestoreCriteria) - populate(objectMap, "restoreLocation", i.RestoreLocation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ItemLevelRestoreTargetInfo. -func (i *ItemLevelRestoreTargetInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "datasourceAuthCredentials": - i.DatasourceAuthCredentials, err = unmarshalAuthCredentialsClassification(val) - delete(rawMsg, key) - case "datasourceInfo": - err = unpopulate(val, "DatasourceInfo", &i.DatasourceInfo) - delete(rawMsg, key) - case "datasourceSetInfo": - err = unpopulate(val, "DatasourceSetInfo", &i.DatasourceSetInfo) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &i.ObjectType) - delete(rawMsg, key) - case "recoveryOption": - err = unpopulate(val, "RecoveryOption", &i.RecoveryOption) - delete(rawMsg, key) - case "restoreCriteria": - i.RestoreCriteria, err = unmarshalItemLevelRestoreCriteriaClassificationArray(val) - delete(rawMsg, key) - case "restoreLocation": - err = unpopulate(val, "RestoreLocation", &i.RestoreLocation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobExtendedInfo. -func (j JobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "additionalDetails", j.AdditionalDetails) - populate(objectMap, "backupInstanceState", j.BackupInstanceState) - populate(objectMap, "dataTransferredInBytes", j.DataTransferredInBytes) - populate(objectMap, "recoveryDestination", j.RecoveryDestination) - populate(objectMap, "sourceRecoverPoint", j.SourceRecoverPoint) - populate(objectMap, "subTasks", j.SubTasks) - populate(objectMap, "targetRecoverPoint", j.TargetRecoverPoint) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type JobSubTask. -func (j JobSubTask) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "additionalDetails", j.AdditionalDetails) - populate(objectMap, "taskId", j.TaskID) - populate(objectMap, "taskName", j.TaskName) - populate(objectMap, "taskProgress", j.TaskProgress) - populate(objectMap, "taskStatus", j.TaskStatus) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type KubernetesPVRestoreCriteria. -func (k KubernetesPVRestoreCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", k.Name) - objectMap["objectType"] = "KubernetesPVRestoreCriteria" - populate(objectMap, "storageClassName", k.StorageClassName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesPVRestoreCriteria. -func (k *KubernetesPVRestoreCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &k.Name) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &k.ObjectType) - delete(rawMsg, key) - case "storageClassName": - err = unpopulate(val, "StorageClassName", &k.StorageClassName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KubernetesStorageClassRestoreCriteria. -func (k KubernetesStorageClassRestoreCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "KubernetesStorageClassRestoreCriteria" - populate(objectMap, "provisioner", k.Provisioner) - populate(objectMap, "selectedStorageClassName", k.SelectedStorageClassName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesStorageClassRestoreCriteria. -func (k *KubernetesStorageClassRestoreCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &k.ObjectType) - delete(rawMsg, key) - case "provisioner": - err = unpopulate(val, "Provisioner", &k.Provisioner) - delete(rawMsg, key) - case "selectedStorageClassName": - err = unpopulate(val, "SelectedStorageClassName", &k.SelectedStorageClassName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationJobExtendedInfo. -func (o *OperationJobExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobId": - err = unpopulate(val, "JobID", &o.JobID) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &o.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResource. -func (o *OperationResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &o.Error) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - o.Properties, err = unmarshalOperationExtendedInfoClassification(val) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &o.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PatchResourceRequestInput. -func (p PatchResourceRequestInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "identity", p.Identity) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyParameters. -func (p PolicyParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataStoreParametersList", p.DataStoreParametersList) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyParameters. -func (p *PolicyParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataStoreParametersList": - p.DataStoreParametersList, err = unmarshalDataStoreParametersClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RangeBasedItemLevelRestoreCriteria. -func (r RangeBasedItemLevelRestoreCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "maxMatchingValue", r.MaxMatchingValue) - populate(objectMap, "minMatchingValue", r.MinMatchingValue) - objectMap["objectType"] = "RangeBasedItemLevelRestoreCriteria" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RangeBasedItemLevelRestoreCriteria. -func (r *RangeBasedItemLevelRestoreCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "maxMatchingValue": - err = unpopulate(val, "MaxMatchingValue", &r.MaxMatchingValue) - delete(rawMsg, key) - case "minMatchingValue": - err = unpopulate(val, "MinMatchingValue", &r.MinMatchingValue) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &r.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPointDataStoreDetails. -func (r RecoveryPointDataStoreDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "creationTime", r.CreationTime) - populateTimeRFC3339(objectMap, "expiryTime", r.ExpiryTime) - populate(objectMap, "id", r.ID) - populate(objectMap, "metaData", r.MetaData) - populateTimeRFC3339(objectMap, "rehydrationExpiryTime", r.RehydrationExpiryTime) - populate(objectMap, "rehydrationStatus", r.RehydrationStatus) - populate(objectMap, "state", r.State) - populate(objectMap, "type", r.Type) - populate(objectMap, "visible", r.Visible) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointDataStoreDetails. -func (r *RecoveryPointDataStoreDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &r.CreationTime) - delete(rawMsg, key) - case "expiryTime": - err = unpopulateTimeRFC3339(val, "ExpiryTime", &r.ExpiryTime) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "metaData": - err = unpopulate(val, "MetaData", &r.MetaData) - delete(rawMsg, key) - case "rehydrationExpiryTime": - err = unpopulateTimeRFC3339(val, "RehydrationExpiryTime", &r.RehydrationExpiryTime) - delete(rawMsg, key) - case "rehydrationStatus": - err = unpopulate(val, "RehydrationStatus", &r.RehydrationStatus) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &r.State) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - case "visible": - err = unpopulate(val, "Visible", &r.Visible) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceGuard. -func (r ResourceGuard) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowAutoApprovals", r.AllowAutoApprovals) - populate(objectMap, "description", r.Description) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "resourceGuardOperations", r.ResourceGuardOperations) - populate(objectMap, "vaultCriticalOperationExclusionList", r.VaultCriticalOperationExclusionList) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceGuardResource. -func (r ResourceGuardResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", r.ETag) - populate(objectMap, "id", r.ID) - populate(objectMap, "identity", r.Identity) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "systemData", r.SystemData) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RestoreFilesTargetInfo. -func (r RestoreFilesTargetInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "RestoreFilesTargetInfo" - populate(objectMap, "recoveryOption", r.RecoveryOption) - populate(objectMap, "restoreLocation", r.RestoreLocation) - populate(objectMap, "targetDetails", r.TargetDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreFilesTargetInfo. -func (r *RestoreFilesTargetInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &r.ObjectType) - delete(rawMsg, key) - case "recoveryOption": - err = unpopulate(val, "RecoveryOption", &r.RecoveryOption) - delete(rawMsg, key) - case "restoreLocation": - err = unpopulate(val, "RestoreLocation", &r.RestoreLocation) - delete(rawMsg, key) - case "targetDetails": - err = unpopulate(val, "TargetDetails", &r.TargetDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RestoreJobRecoveryPointDetails. -func (r RestoreJobRecoveryPointDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "recoveryPointID", r.RecoveryPointID) - populateTimeRFC3339(objectMap, "recoveryPointTime", r.RecoveryPointTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreJobRecoveryPointDetails. -func (r *RestoreJobRecoveryPointDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "recoveryPointID": - err = unpopulate(val, "RecoveryPointID", &r.RecoveryPointID) - delete(rawMsg, key) - case "recoveryPointTime": - err = unpopulateTimeRFC3339(val, "RecoveryPointTime", &r.RecoveryPointTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RestoreTargetInfo. -func (r RestoreTargetInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "datasourceAuthCredentials", r.DatasourceAuthCredentials) - populate(objectMap, "datasourceInfo", r.DatasourceInfo) - populate(objectMap, "datasourceSetInfo", r.DatasourceSetInfo) - objectMap["objectType"] = "RestoreTargetInfo" - populate(objectMap, "recoveryOption", r.RecoveryOption) - populate(objectMap, "restoreLocation", r.RestoreLocation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreTargetInfo. -func (r *RestoreTargetInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "datasourceAuthCredentials": - r.DatasourceAuthCredentials, err = unmarshalAuthCredentialsClassification(val) - delete(rawMsg, key) - case "datasourceInfo": - err = unpopulate(val, "DatasourceInfo", &r.DatasourceInfo) - delete(rawMsg, key) - case "datasourceSetInfo": - err = unpopulate(val, "DatasourceSetInfo", &r.DatasourceSetInfo) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &r.ObjectType) - delete(rawMsg, key) - case "recoveryOption": - err = unpopulate(val, "RecoveryOption", &r.RecoveryOption) - delete(rawMsg, key) - case "restoreLocation": - err = unpopulate(val, "RestoreLocation", &r.RestoreLocation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ScheduleBasedBackupCriteria. -func (s ScheduleBasedBackupCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "absoluteCriteria", s.AbsoluteCriteria) - populate(objectMap, "daysOfMonth", s.DaysOfMonth) - populate(objectMap, "daysOfTheWeek", s.DaysOfTheWeek) - populate(objectMap, "monthsOfYear", s.MonthsOfYear) - objectMap["objectType"] = "ScheduleBasedBackupCriteria" - aux := make([]*timeRFC3339, len(s.ScheduleTimes), len(s.ScheduleTimes)) - for i := 0; i < len(s.ScheduleTimes); i++ { - aux[i] = (*timeRFC3339)(s.ScheduleTimes[i]) - } - populate(objectMap, "scheduleTimes", aux) - populate(objectMap, "weeksOfTheMonth", s.WeeksOfTheMonth) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleBasedBackupCriteria. -func (s *ScheduleBasedBackupCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "absoluteCriteria": - err = unpopulate(val, "AbsoluteCriteria", &s.AbsoluteCriteria) - delete(rawMsg, key) - case "daysOfMonth": - err = unpopulate(val, "DaysOfMonth", &s.DaysOfMonth) - delete(rawMsg, key) - case "daysOfTheWeek": - err = unpopulate(val, "DaysOfTheWeek", &s.DaysOfTheWeek) - delete(rawMsg, key) - case "monthsOfYear": - err = unpopulate(val, "MonthsOfYear", &s.MonthsOfYear) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &s.ObjectType) - delete(rawMsg, key) - case "scheduleTimes": - var aux []*timeRFC3339 - err = unpopulate(val, "ScheduleTimes", &aux) - for _, au := range aux { - s.ScheduleTimes = append(s.ScheduleTimes, (*time.Time)(au)) - } - delete(rawMsg, key) - case "weeksOfTheMonth": - err = unpopulate(val, "WeeksOfTheMonth", &s.WeeksOfTheMonth) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ScheduleBasedTriggerContext. -func (s ScheduleBasedTriggerContext) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "ScheduleBasedTriggerContext" - populate(objectMap, "schedule", s.Schedule) - populate(objectMap, "taggingCriteria", s.TaggingCriteria) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleBasedTriggerContext. -func (s *ScheduleBasedTriggerContext) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &s.ObjectType) - delete(rawMsg, key) - case "schedule": - err = unpopulate(val, "Schedule", &s.Schedule) - delete(rawMsg, key) - case "taggingCriteria": - err = unpopulate(val, "TaggingCriteria", &s.TaggingCriteria) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecretStoreBasedAuthCredentials. -func (s SecretStoreBasedAuthCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "SecretStoreBasedAuthCredentials" - populate(objectMap, "secretStoreResource", s.SecretStoreResource) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecretStoreBasedAuthCredentials. -func (s *SecretStoreBasedAuthCredentials) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &s.ObjectType) - delete(rawMsg, key) - case "secretStoreResource": - err = unpopulate(val, "SecretStoreResource", &s.SecretStoreResource) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SourceLifeCycle. -func (s SourceLifeCycle) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "deleteAfter", s.DeleteAfter) - populate(objectMap, "sourceDataStore", s.SourceDataStore) - populate(objectMap, "targetDataStoreCopySettings", s.TargetDataStoreCopySettings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SourceLifeCycle. -func (s *SourceLifeCycle) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deleteAfter": - s.DeleteAfter, err = unmarshalDeleteOptionClassification(val) - delete(rawMsg, key) - case "sourceDataStore": - err = unpopulate(val, "SourceDataStore", &s.SourceDataStore) - delete(rawMsg, key) - case "targetDataStoreCopySettings": - err = unpopulate(val, "TargetDataStoreCopySettings", &s.TargetDataStoreCopySettings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TaggingCriteria. -func (t TaggingCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "criteria", t.Criteria) - populate(objectMap, "isDefault", t.IsDefault) - populate(objectMap, "tagInfo", t.TagInfo) - populate(objectMap, "taggingPriority", t.TaggingPriority) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TaggingCriteria. -func (t *TaggingCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "criteria": - t.Criteria, err = unmarshalBackupCriteriaClassificationArray(val) - delete(rawMsg, key) - case "isDefault": - err = unpopulate(val, "IsDefault", &t.IsDefault) - delete(rawMsg, key) - case "tagInfo": - err = unpopulate(val, "TagInfo", &t.TagInfo) - delete(rawMsg, key) - case "taggingPriority": - err = unpopulate(val, "TaggingPriority", &t.TaggingPriority) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TargetCopySetting. -func (t TargetCopySetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "copyAfter", t.CopyAfter) - populate(objectMap, "dataStore", t.DataStore) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TargetCopySetting. -func (t *TargetCopySetting) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "copyAfter": - t.CopyAfter, err = unmarshalCopyOptionClassification(val) - delete(rawMsg, key) - case "dataStore": - err = unpopulate(val, "DataStore", &t.DataStore) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserFacingError. -func (u UserFacingError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", u.Code) - populate(objectMap, "details", u.Details) - populate(objectMap, "innerError", u.InnerError) - populate(objectMap, "isRetryable", u.IsRetryable) - populate(objectMap, "isUserError", u.IsUserError) - populate(objectMap, "message", u.Message) - populate(objectMap, "properties", u.Properties) - populate(objectMap, "recommendedAction", u.RecommendedAction) - populate(objectMap, "target", u.Target) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ValidateRestoreRequestObject. -func (v ValidateRestoreRequestObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "restoreRequestObject", v.RestoreRequestObject) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateRestoreRequestObject. -func (v *ValidateRestoreRequestObject) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "restoreRequestObject": - v.RestoreRequestObject, err = unmarshalAzureBackupRestoreRequestClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationresult_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationresult_client.go deleted file mode 100644 index ae4b2f78..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationresult_client.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// OperationResultClient contains the methods for the OperationResult group. -// Don't use this type directly, use NewOperationResultClient() instead. -type OperationResultClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewOperationResultClient creates a new instance of OperationResultClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationResultClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationResultClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the operation result for a resource -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// options - OperationResultClientGetOptions contains the optional parameters for the OperationResultClient.Get method. -func (client *OperationResultClient) Get(ctx context.Context, operationID string, location string, options *OperationResultClientGetOptions) (OperationResultClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, operationID, location, options) - if err != nil { - return OperationResultClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationResultClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return OperationResultClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *OperationResultClient) getCreateRequest(ctx context.Context, operationID string, location string, options *OperationResultClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *OperationResultClient) getHandleResponse(resp *http.Response) (OperationResultClientGetResponse, error) { - result := OperationResultClientGetResponse{} - if val := resp.Header.Get("Location"); val != "" { - result.Location = &val - } - if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { - result.AzureAsyncOperation = &val - } - if val := resp.Header.Get("Retry-After"); val != "" { - retryAfter32, err := strconv.ParseInt(val, 10, 32) - retryAfter := int32(retryAfter32) - if err != nil { - return OperationResultClientGetResponse{}, err - } - result.RetryAfter = &retryAfter - } - if err := runtime.UnmarshalAsJSON(resp, &result.OperationJobExtendedInfo); err != nil { - return OperationResultClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operations_client.go deleted file mode 100644 index 081476f8..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operations_client.go +++ /dev/null @@ -1,104 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the DataProtectionOperations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - host string - pl runtime.Pipeline -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Returns the list of available operations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.DataProtection/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ClientDiscoveryResponse); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatus_client.go deleted file mode 100644 index 322b0ea0..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatus_client.go +++ /dev/null @@ -1,109 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// OperationStatusClient contains the methods for the OperationStatus group. -// Don't use this type directly, use NewOperationStatusClient() instead. -type OperationStatusClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewOperationStatusClient creates a new instance of OperationStatusClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationStatusClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the operation status for a resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// options - OperationStatusClientGetOptions contains the optional parameters for the OperationStatusClient.Get method. -func (client *OperationStatusClient) Get(ctx context.Context, location string, operationID string, options *OperationStatusClientGetOptions) (OperationStatusClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, location, operationID, options) - if err != nil { - return OperationStatusClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationStatusClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationStatusClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *OperationStatusClient) getCreateRequest(ctx context.Context, location string, operationID string, options *OperationStatusClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *OperationStatusClient) getHandleResponse(resp *http.Response) (OperationStatusClientGetResponse, error) { - result := OperationStatusClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationResource); err != nil { - return OperationStatusClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusbackupvaultcontext_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusbackupvaultcontext_client.go deleted file mode 100644 index ce13d838..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusbackupvaultcontext_client.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// OperationStatusBackupVaultContextClient contains the methods for the OperationStatusBackupVaultContext group. -// Don't use this type directly, use NewOperationStatusBackupVaultContextClient() instead. -type OperationStatusBackupVaultContextClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewOperationStatusBackupVaultContextClient creates a new instance of OperationStatusBackupVaultContextClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationStatusBackupVaultContextClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusBackupVaultContextClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationStatusBackupVaultContextClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the operation status for an operation over a BackupVault's context. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// options - OperationStatusBackupVaultContextClientGetOptions contains the optional parameters for the OperationStatusBackupVaultContextClient.Get -// method. -func (client *OperationStatusBackupVaultContextClient) Get(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *OperationStatusBackupVaultContextClientGetOptions) (OperationStatusBackupVaultContextClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, operationID, options) - if err != nil { - return OperationStatusBackupVaultContextClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationStatusBackupVaultContextClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationStatusBackupVaultContextClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *OperationStatusBackupVaultContextClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *OperationStatusBackupVaultContextClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationStatus/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *OperationStatusBackupVaultContextClient) getHandleResponse(resp *http.Response) (OperationStatusBackupVaultContextClientGetResponse, error) { - result := OperationStatusBackupVaultContextClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationResource); err != nil { - return OperationStatusBackupVaultContextClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusresourcegroupcontext_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusresourcegroupcontext_client.go deleted file mode 100644 index c8392587..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_operationstatusresourcegroupcontext_client.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// OperationStatusResourceGroupContextClient contains the methods for the OperationStatusResourceGroupContext group. -// Don't use this type directly, use NewOperationStatusResourceGroupContextClient() instead. -type OperationStatusResourceGroupContextClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewOperationStatusResourceGroupContextClient creates a new instance of OperationStatusResourceGroupContextClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationStatusResourceGroupContextClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusResourceGroupContextClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationStatusResourceGroupContextClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the operation status for an operation over a ResourceGroup's context. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - OperationStatusResourceGroupContextClientGetOptions contains the optional parameters for the OperationStatusResourceGroupContextClient.Get -// method. -func (client *OperationStatusResourceGroupContextClient) Get(ctx context.Context, resourceGroupName string, operationID string, options *OperationStatusResourceGroupContextClientGetOptions) (OperationStatusResourceGroupContextClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, operationID, options) - if err != nil { - return OperationStatusResourceGroupContextClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationStatusResourceGroupContextClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationStatusResourceGroupContextClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *OperationStatusResourceGroupContextClient) getCreateRequest(ctx context.Context, resourceGroupName string, operationID string, options *OperationStatusResourceGroupContextClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/operationStatus/{operationId}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *OperationStatusResourceGroupContextClient) getHandleResponse(resp *http.Response) (OperationStatusResourceGroupContextClientGetResponse, error) { - result := OperationStatusResourceGroupContextClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationResource); err != nil { - return OperationStatusResourceGroupContextClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_polymorphic_helpers.go deleted file mode 100644 index d1bce980..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_polymorphic_helpers.go +++ /dev/null @@ -1,377 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import "encoding/json" - -func unmarshalAuthCredentialsClassification(rawMsg json.RawMessage) (AuthCredentialsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b AuthCredentialsClassification - switch m["objectType"] { - case "SecretStoreBasedAuthCredentials": - b = &SecretStoreBasedAuthCredentials{} - default: - b = &AuthCredentials{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalAzureBackupRecoveryPointClassification(rawMsg json.RawMessage) (AzureBackupRecoveryPointClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b AzureBackupRecoveryPointClassification - switch m["objectType"] { - case "AzureBackupDiscreteRecoveryPoint": - b = &AzureBackupDiscreteRecoveryPoint{} - default: - b = &AzureBackupRecoveryPoint{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalAzureBackupRestoreRequestClassification(rawMsg json.RawMessage) (AzureBackupRestoreRequestClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b AzureBackupRestoreRequestClassification - switch m["objectType"] { - case "AzureBackupRecoveryPointBasedRestoreRequest": - b = &AzureBackupRecoveryPointBasedRestoreRequest{} - case "AzureBackupRecoveryTimeBasedRestoreRequest": - b = &AzureBackupRecoveryTimeBasedRestoreRequest{} - case "AzureBackupRestoreWithRehydrationRequest": - b = &AzureBackupRestoreWithRehydrationRequest{} - default: - b = &AzureBackupRestoreRequest{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalBackupCriteriaClassification(rawMsg json.RawMessage) (BackupCriteriaClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b BackupCriteriaClassification - switch m["objectType"] { - case "ScheduleBasedBackupCriteria": - b = &ScheduleBasedBackupCriteria{} - default: - b = &BackupCriteria{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalBackupCriteriaClassificationArray(rawMsg json.RawMessage) ([]BackupCriteriaClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]BackupCriteriaClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalBackupCriteriaClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalBackupParametersClassification(rawMsg json.RawMessage) (BackupParametersClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b BackupParametersClassification - switch m["objectType"] { - case "AzureBackupParams": - b = &AzureBackupParams{} - default: - b = &BackupParameters{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalBaseBackupPolicyClassification(rawMsg json.RawMessage) (BaseBackupPolicyClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b BaseBackupPolicyClassification - switch m["objectType"] { - case "BackupPolicy": - b = &BackupPolicy{} - default: - b = &BaseBackupPolicy{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalBasePolicyRuleClassification(rawMsg json.RawMessage) (BasePolicyRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b BasePolicyRuleClassification - switch m["objectType"] { - case "AzureBackupRule": - b = &AzureBackupRule{} - case "AzureRetentionRule": - b = &AzureRetentionRule{} - default: - b = &BasePolicyRule{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalBasePolicyRuleClassificationArray(rawMsg json.RawMessage) ([]BasePolicyRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]BasePolicyRuleClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalBasePolicyRuleClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalCopyOptionClassification(rawMsg json.RawMessage) (CopyOptionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b CopyOptionClassification - switch m["objectType"] { - case "CopyOnExpiryOption": - b = &CopyOnExpiryOption{} - case "CustomCopyOption": - b = &CustomCopyOption{} - case "ImmediateCopyOption": - b = &ImmediateCopyOption{} - default: - b = &CopyOption{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalDataStoreParametersClassification(rawMsg json.RawMessage) (DataStoreParametersClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b DataStoreParametersClassification - switch m["objectType"] { - case "AzureOperationalStoreParameters": - b = &AzureOperationalStoreParameters{} - default: - b = &DataStoreParameters{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalDataStoreParametersClassificationArray(rawMsg json.RawMessage) ([]DataStoreParametersClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]DataStoreParametersClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalDataStoreParametersClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalDeleteOptionClassification(rawMsg json.RawMessage) (DeleteOptionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b DeleteOptionClassification - switch m["objectType"] { - case "AbsoluteDeleteOption": - b = &AbsoluteDeleteOption{} - default: - b = &DeleteOption{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalFeatureValidationResponseBaseClassification(rawMsg json.RawMessage) (FeatureValidationResponseBaseClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b FeatureValidationResponseBaseClassification - switch m["objectType"] { - case "FeatureValidationResponse": - b = &FeatureValidationResponse{} - default: - b = &FeatureValidationResponseBase{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalItemLevelRestoreCriteriaClassification(rawMsg json.RawMessage) (ItemLevelRestoreCriteriaClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ItemLevelRestoreCriteriaClassification - switch m["objectType"] { - case "KubernetesPVRestoreCriteria": - b = &KubernetesPVRestoreCriteria{} - case "KubernetesStorageClassRestoreCriteria": - b = &KubernetesStorageClassRestoreCriteria{} - case "RangeBasedItemLevelRestoreCriteria": - b = &RangeBasedItemLevelRestoreCriteria{} - default: - b = &ItemLevelRestoreCriteria{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalItemLevelRestoreCriteriaClassificationArray(rawMsg json.RawMessage) ([]ItemLevelRestoreCriteriaClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]ItemLevelRestoreCriteriaClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalItemLevelRestoreCriteriaClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalOperationExtendedInfoClassification(rawMsg json.RawMessage) (OperationExtendedInfoClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b OperationExtendedInfoClassification - switch m["objectType"] { - case "OperationJobExtendedInfo": - b = &OperationJobExtendedInfo{} - default: - b = &OperationExtendedInfo{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRestoreTargetInfoBaseClassification(rawMsg json.RawMessage) (RestoreTargetInfoBaseClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RestoreTargetInfoBaseClassification - switch m["objectType"] { - case "ItemLevelRestoreTargetInfo": - b = &ItemLevelRestoreTargetInfo{} - case "RestoreFilesTargetInfo": - b = &RestoreFilesTargetInfo{} - case "RestoreTargetInfo": - b = &RestoreTargetInfo{} - default: - b = &RestoreTargetInfoBase{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalTriggerContextClassification(rawMsg json.RawMessage) (TriggerContextClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b TriggerContextClassification - switch m["objectType"] { - case "AdhocBasedTriggerContext": - b = &AdhocBasedTriggerContext{} - case "ScheduleBasedTriggerContext": - b = &ScheduleBasedTriggerContext{} - default: - b = &TriggerContext{} - } - return b, json.Unmarshal(rawMsg, b) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_recoverypoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_recoverypoints_client.go deleted file mode 100644 index 1752537c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_recoverypoints_client.go +++ /dev/null @@ -1,200 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RecoveryPointsClient contains the methods for the RecoveryPoints group. -// Don't use this type directly, use NewRecoveryPointsClient() instead. -type RecoveryPointsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRecoveryPointsClient creates a new instance of RecoveryPointsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRecoveryPointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoveryPointsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RecoveryPointsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets a Recovery Point using recoveryPointId for a Datasource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// backupInstanceName - The name of the backup instance -// options - RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. -func (client *RecoveryPointsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (RecoveryPointsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, recoveryPointID, options) - if err != nil { - return RecoveryPointsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecoveryPointsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecoveryPointsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *RecoveryPointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - if recoveryPointID == "" { - return nil, errors.New("parameter recoveryPointID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *RecoveryPointsClient) getHandleResponse(resp *http.Response) (RecoveryPointsClientGetResponse, error) { - result := RecoveryPointsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupRecoveryPointResource); err != nil { - return RecoveryPointsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Returns a list of Recovery Points for a DataSource in a vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// backupInstanceName - The name of the backup instance -// options - RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.List method. -func (client *RecoveryPointsClient) NewListPager(resourceGroupName string, vaultName string, backupInstanceName string, options *RecoveryPointsClientListOptions) *runtime.Pager[RecoveryPointsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[RecoveryPointsClientListResponse]{ - More: func(page RecoveryPointsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RecoveryPointsClientListResponse) (RecoveryPointsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RecoveryPointsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecoveryPointsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecoveryPointsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *RecoveryPointsClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *RecoveryPointsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *RecoveryPointsClient) listHandleResponse(resp *http.Response) (RecoveryPointsClientListResponse, error) { - result := RecoveryPointsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupRecoveryPointResourceList); err != nil { - return RecoveryPointsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_resourceguards_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_resourceguards_client.go deleted file mode 100644 index 27276fa5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_resourceguards_client.go +++ /dev/null @@ -1,1183 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ResourceGuardsClient contains the methods for the ResourceGuards group. -// Don't use this type directly, use NewResourceGuardsClient() instead. -type ResourceGuardsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewResourceGuardsClient creates a new instance of ResourceGuardsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewResourceGuardsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceGuardsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ResourceGuardsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Delete - Deletes a ResourceGuard resource from the resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// resourceGuardsName - The name of ResourceGuard -// options - ResourceGuardsClientDeleteOptions contains the optional parameters for the ResourceGuardsClient.Delete method. -func (client *ResourceGuardsClient) Delete(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientDeleteOptions) (ResourceGuardsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) - if err != nil { - return ResourceGuardsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ResourceGuardsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ResourceGuardsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ResourceGuardsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Returns a ResourceGuard belonging to a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// resourceGuardsName - The name of ResourceGuard -// options - ResourceGuardsClientGetOptions contains the optional parameters for the ResourceGuardsClient.Get method. -func (client *ResourceGuardsClient) Get(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetOptions) (ResourceGuardsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) - if err != nil { - return ResourceGuardsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ResourceGuardsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ResourceGuardsClient) getHandleResponse(resp *http.Response) (ResourceGuardsClientGetResponse, error) { - result := ResourceGuardsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardResource); err != nil { - return ResourceGuardsClientGetResponse{}, err - } - return result, nil -} - -// NewGetBackupSecurityPINRequestsObjectsPager - Returns collection of operation request objects for a critical operation -// protected by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetBackupSecurityPINRequestsObjects -// method. -func (client *ResourceGuardsClient) NewGetBackupSecurityPINRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse]{ - More: func(page ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse) (ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getBackupSecurityPINRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse{}, runtime.NewResponseError(resp) - } - return client.getBackupSecurityPINRequestsObjectsHandleResponse(resp) - }, - }) -} - -// getBackupSecurityPINRequestsObjectsCreateRequest creates the GetBackupSecurityPINRequestsObjects request. -func (client *ResourceGuardsClient) getBackupSecurityPINRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetBackupSecurityPINRequestsObjectsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getBackupSecurityPINRequestsObjectsHandleResponse handles the GetBackupSecurityPINRequestsObjects response. -func (client *ResourceGuardsClient) getBackupSecurityPINRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse, error) { - result := ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { - return ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse{}, err - } - return result, nil -} - -// GetDefaultBackupSecurityPINRequestsObject - Returns collection of operation request objects for a critical operation protected -// by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions contains the optional parameters for the -// ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject method. -func (client *ResourceGuardsClient) GetDefaultBackupSecurityPINRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions) (ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse, error) { - req, err := client.getDefaultBackupSecurityPINRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) - if err != nil { - return ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse{}, runtime.NewResponseError(resp) - } - return client.getDefaultBackupSecurityPINRequestsObjectHandleResponse(resp) -} - -// getDefaultBackupSecurityPINRequestsObjectCreateRequest creates the GetDefaultBackupSecurityPINRequestsObject request. -func (client *ResourceGuardsClient) getDefaultBackupSecurityPINRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests/{requestName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - if requestName == "" { - return nil, errors.New("parameter requestName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDefaultBackupSecurityPINRequestsObjectHandleResponse handles the GetDefaultBackupSecurityPINRequestsObject response. -func (client *ResourceGuardsClient) getDefaultBackupSecurityPINRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse, error) { - result := ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { - return ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse{}, err - } - return result, nil -} - -// GetDefaultDeleteProtectedItemRequestsObject - Returns collection of operation request objects for a critical operation -// protected by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions contains the optional parameters for the -// ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject method. -func (client *ResourceGuardsClient) GetDefaultDeleteProtectedItemRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions) (ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse, error) { - req, err := client.getDefaultDeleteProtectedItemRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) - if err != nil { - return ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse{}, runtime.NewResponseError(resp) - } - return client.getDefaultDeleteProtectedItemRequestsObjectHandleResponse(resp) -} - -// getDefaultDeleteProtectedItemRequestsObjectCreateRequest creates the GetDefaultDeleteProtectedItemRequestsObject request. -func (client *ResourceGuardsClient) getDefaultDeleteProtectedItemRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests/{requestName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - if requestName == "" { - return nil, errors.New("parameter requestName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDefaultDeleteProtectedItemRequestsObjectHandleResponse handles the GetDefaultDeleteProtectedItemRequestsObject response. -func (client *ResourceGuardsClient) getDefaultDeleteProtectedItemRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse, error) { - result := ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { - return ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse{}, err - } - return result, nil -} - -// GetDefaultDeleteResourceGuardProxyRequestsObject - Returns collection of operation request objects for a critical operation -// protected by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions contains the optional parameters -// for the ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject method. -func (client *ResourceGuardsClient) GetDefaultDeleteResourceGuardProxyRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions) (ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse, error) { - req, err := client.getDefaultDeleteResourceGuardProxyRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) - if err != nil { - return ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse{}, runtime.NewResponseError(resp) - } - return client.getDefaultDeleteResourceGuardProxyRequestsObjectHandleResponse(resp) -} - -// getDefaultDeleteResourceGuardProxyRequestsObjectCreateRequest creates the GetDefaultDeleteResourceGuardProxyRequestsObject request. -func (client *ResourceGuardsClient) getDefaultDeleteResourceGuardProxyRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests/{requestName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - if requestName == "" { - return nil, errors.New("parameter requestName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDefaultDeleteResourceGuardProxyRequestsObjectHandleResponse handles the GetDefaultDeleteResourceGuardProxyRequestsObject response. -func (client *ResourceGuardsClient) getDefaultDeleteResourceGuardProxyRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse, error) { - result := ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { - return ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse{}, err - } - return result, nil -} - -// GetDefaultDisableSoftDeleteRequestsObject - Returns collection of operation request objects for a critical operation protected -// by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions contains the optional parameters for the -// ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject method. -func (client *ResourceGuardsClient) GetDefaultDisableSoftDeleteRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions) (ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse, error) { - req, err := client.getDefaultDisableSoftDeleteRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) - if err != nil { - return ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse{}, runtime.NewResponseError(resp) - } - return client.getDefaultDisableSoftDeleteRequestsObjectHandleResponse(resp) -} - -// getDefaultDisableSoftDeleteRequestsObjectCreateRequest creates the GetDefaultDisableSoftDeleteRequestsObject request. -func (client *ResourceGuardsClient) getDefaultDisableSoftDeleteRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests/{requestName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - if requestName == "" { - return nil, errors.New("parameter requestName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDefaultDisableSoftDeleteRequestsObjectHandleResponse handles the GetDefaultDisableSoftDeleteRequestsObject response. -func (client *ResourceGuardsClient) getDefaultDisableSoftDeleteRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse, error) { - result := ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { - return ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse{}, err - } - return result, nil -} - -// GetDefaultUpdateProtectedItemRequestsObject - Returns collection of operation request objects for a critical operation -// protected by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions contains the optional parameters for the -// ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject method. -func (client *ResourceGuardsClient) GetDefaultUpdateProtectedItemRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions) (ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse, error) { - req, err := client.getDefaultUpdateProtectedItemRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) - if err != nil { - return ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse{}, runtime.NewResponseError(resp) - } - return client.getDefaultUpdateProtectedItemRequestsObjectHandleResponse(resp) -} - -// getDefaultUpdateProtectedItemRequestsObjectCreateRequest creates the GetDefaultUpdateProtectedItemRequestsObject request. -func (client *ResourceGuardsClient) getDefaultUpdateProtectedItemRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests/{requestName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - if requestName == "" { - return nil, errors.New("parameter requestName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDefaultUpdateProtectedItemRequestsObjectHandleResponse handles the GetDefaultUpdateProtectedItemRequestsObject response. -func (client *ResourceGuardsClient) getDefaultUpdateProtectedItemRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse, error) { - result := ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { - return ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse{}, err - } - return result, nil -} - -// GetDefaultUpdateProtectionPolicyRequestsObject - Returns collection of operation request objects for a critical operation -// protected by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions contains the optional parameters for -// the ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject method. -func (client *ResourceGuardsClient) GetDefaultUpdateProtectionPolicyRequestsObject(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions) (ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse, error) { - req, err := client.getDefaultUpdateProtectionPolicyRequestsObjectCreateRequest(ctx, resourceGroupName, resourceGuardsName, requestName, options) - if err != nil { - return ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse{}, runtime.NewResponseError(resp) - } - return client.getDefaultUpdateProtectionPolicyRequestsObjectHandleResponse(resp) -} - -// getDefaultUpdateProtectionPolicyRequestsObjectCreateRequest creates the GetDefaultUpdateProtectionPolicyRequestsObject request. -func (client *ResourceGuardsClient) getDefaultUpdateProtectionPolicyRequestsObjectCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, requestName string, options *ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests/{requestName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - if requestName == "" { - return nil, errors.New("parameter requestName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{requestName}", url.PathEscape(requestName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDefaultUpdateProtectionPolicyRequestsObjectHandleResponse handles the GetDefaultUpdateProtectionPolicyRequestsObject response. -func (client *ResourceGuardsClient) getDefaultUpdateProtectionPolicyRequestsObjectHandleResponse(resp *http.Response) (ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse, error) { - result := ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResource); err != nil { - return ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse{}, err - } - return result, nil -} - -// NewGetDeleteProtectedItemRequestsObjectsPager - Returns collection of operation request objects for a critical operation -// protected by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects -// method. -func (client *ResourceGuardsClient) NewGetDeleteProtectedItemRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse]{ - More: func(page ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse) (ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getDeleteProtectedItemRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse{}, runtime.NewResponseError(resp) - } - return client.getDeleteProtectedItemRequestsObjectsHandleResponse(resp) - }, - }) -} - -// getDeleteProtectedItemRequestsObjectsCreateRequest creates the GetDeleteProtectedItemRequestsObjects request. -func (client *ResourceGuardsClient) getDeleteProtectedItemRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDeleteProtectedItemRequestsObjectsHandleResponse handles the GetDeleteProtectedItemRequestsObjects response. -func (client *ResourceGuardsClient) getDeleteProtectedItemRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse, error) { - result := ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { - return ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse{}, err - } - return result, nil -} - -// NewGetDeleteResourceGuardProxyRequestsObjectsPager - Returns collection of operation request objects for a critical operation -// protected by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions contains the optional parameters for the -// ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects method. -func (client *ResourceGuardsClient) NewGetDeleteResourceGuardProxyRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse]{ - More: func(page ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse) (ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getDeleteResourceGuardProxyRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse{}, runtime.NewResponseError(resp) - } - return client.getDeleteResourceGuardProxyRequestsObjectsHandleResponse(resp) - }, - }) -} - -// getDeleteResourceGuardProxyRequestsObjectsCreateRequest creates the GetDeleteResourceGuardProxyRequestsObjects request. -func (client *ResourceGuardsClient) getDeleteResourceGuardProxyRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDeleteResourceGuardProxyRequestsObjectsHandleResponse handles the GetDeleteResourceGuardProxyRequestsObjects response. -func (client *ResourceGuardsClient) getDeleteResourceGuardProxyRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse, error) { - result := ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { - return ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse{}, err - } - return result, nil -} - -// NewGetDisableSoftDeleteRequestsObjectsPager - Returns collection of operation request objects for a critical operation -// protected by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects -// method. -func (client *ResourceGuardsClient) NewGetDisableSoftDeleteRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse]{ - More: func(page ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse) (ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getDisableSoftDeleteRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse{}, runtime.NewResponseError(resp) - } - return client.getDisableSoftDeleteRequestsObjectsHandleResponse(resp) - }, - }) -} - -// getDisableSoftDeleteRequestsObjectsCreateRequest creates the GetDisableSoftDeleteRequestsObjects request. -func (client *ResourceGuardsClient) getDisableSoftDeleteRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getDisableSoftDeleteRequestsObjectsHandleResponse handles the GetDisableSoftDeleteRequestsObjects response. -func (client *ResourceGuardsClient) getDisableSoftDeleteRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse, error) { - result := ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { - return ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse{}, err - } - return result, nil -} - -// NewGetResourcesInResourceGroupPager - Returns ResourceGuards collection belonging to a ResourceGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetResourcesInResourceGroupOptions contains the optional parameters for the ResourceGuardsClient.GetResourcesInResourceGroup -// method. -func (client *ResourceGuardsClient) NewGetResourcesInResourceGroupPager(resourceGroupName string, options *ResourceGuardsClientGetResourcesInResourceGroupOptions) *runtime.Pager[ResourceGuardsClientGetResourcesInResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetResourcesInResourceGroupResponse]{ - More: func(page ResourceGuardsClientGetResourcesInResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetResourcesInResourceGroupResponse) (ResourceGuardsClientGetResourcesInResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getResourcesInResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceGuardsClientGetResourcesInResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetResourcesInResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetResourcesInResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.getResourcesInResourceGroupHandleResponse(resp) - }, - }) -} - -// getResourcesInResourceGroupCreateRequest creates the GetResourcesInResourceGroup request. -func (client *ResourceGuardsClient) getResourcesInResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ResourceGuardsClientGetResourcesInResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getResourcesInResourceGroupHandleResponse handles the GetResourcesInResourceGroup response. -func (client *ResourceGuardsClient) getResourcesInResourceGroupHandleResponse(resp *http.Response) (ResourceGuardsClientGetResourcesInResourceGroupResponse, error) { - result := ResourceGuardsClientGetResourcesInResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardResourceList); err != nil { - return ResourceGuardsClientGetResourcesInResourceGroupResponse{}, err - } - return result, nil -} - -// NewGetResourcesInSubscriptionPager - Returns ResourceGuards collection belonging to a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// options - ResourceGuardsClientGetResourcesInSubscriptionOptions contains the optional parameters for the ResourceGuardsClient.GetResourcesInSubscription -// method. -func (client *ResourceGuardsClient) NewGetResourcesInSubscriptionPager(options *ResourceGuardsClientGetResourcesInSubscriptionOptions) *runtime.Pager[ResourceGuardsClientGetResourcesInSubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetResourcesInSubscriptionResponse]{ - More: func(page ResourceGuardsClientGetResourcesInSubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetResourcesInSubscriptionResponse) (ResourceGuardsClientGetResourcesInSubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getResourcesInSubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceGuardsClientGetResourcesInSubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetResourcesInSubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetResourcesInSubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.getResourcesInSubscriptionHandleResponse(resp) - }, - }) -} - -// getResourcesInSubscriptionCreateRequest creates the GetResourcesInSubscription request. -func (client *ResourceGuardsClient) getResourcesInSubscriptionCreateRequest(ctx context.Context, options *ResourceGuardsClientGetResourcesInSubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/resourceGuards" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getResourcesInSubscriptionHandleResponse handles the GetResourcesInSubscription response. -func (client *ResourceGuardsClient) getResourcesInSubscriptionHandleResponse(resp *http.Response) (ResourceGuardsClientGetResourcesInSubscriptionResponse, error) { - result := ResourceGuardsClientGetResourcesInSubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardResourceList); err != nil { - return ResourceGuardsClientGetResourcesInSubscriptionResponse{}, err - } - return result, nil -} - -// NewGetUpdateProtectedItemRequestsObjectsPager - Returns collection of operation request objects for a critical operation -// protected by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions contains the optional parameters for the ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects -// method. -func (client *ResourceGuardsClient) NewGetUpdateProtectedItemRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse]{ - More: func(page ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse) (ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getUpdateProtectedItemRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse{}, runtime.NewResponseError(resp) - } - return client.getUpdateProtectedItemRequestsObjectsHandleResponse(resp) - }, - }) -} - -// getUpdateProtectedItemRequestsObjectsCreateRequest creates the GetUpdateProtectedItemRequestsObjects request. -func (client *ResourceGuardsClient) getUpdateProtectedItemRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getUpdateProtectedItemRequestsObjectsHandleResponse handles the GetUpdateProtectedItemRequestsObjects response. -func (client *ResourceGuardsClient) getUpdateProtectedItemRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse, error) { - result := ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { - return ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse{}, err - } - return result, nil -} - -// NewGetUpdateProtectionPolicyRequestsObjectsPager - Returns collection of operation request objects for a critical operation -// protected by the given ResourceGuard resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// options - ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions contains the optional parameters for the -// ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects method. -func (client *ResourceGuardsClient) NewGetUpdateProtectionPolicyRequestsObjectsPager(resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions) *runtime.Pager[ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse]{ - More: func(page ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse) (ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getUpdateProtectionPolicyRequestsObjectsCreateRequest(ctx, resourceGroupName, resourceGuardsName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse{}, runtime.NewResponseError(resp) - } - return client.getUpdateProtectionPolicyRequestsObjectsHandleResponse(resp) - }, - }) -} - -// getUpdateProtectionPolicyRequestsObjectsCreateRequest creates the GetUpdateProtectionPolicyRequestsObjects request. -func (client *ResourceGuardsClient) getUpdateProtectionPolicyRequestsObjectsCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, options *ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getUpdateProtectionPolicyRequestsObjectsHandleResponse handles the GetUpdateProtectionPolicyRequestsObjects response. -func (client *ResourceGuardsClient) getUpdateProtectionPolicyRequestsObjectsHandleResponse(resp *http.Response) (ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse, error) { - result := ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DppBaseResourceList); err != nil { - return ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse{}, err - } - return result, nil -} - -// Patch - Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// resourceGuardsName - The name of ResourceGuard -// parameters - Request body for operation -// options - ResourceGuardsClientPatchOptions contains the optional parameters for the ResourceGuardsClient.Patch method. -func (client *ResourceGuardsClient) Patch(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters PatchResourceRequestInput, options *ResourceGuardsClientPatchOptions) (ResourceGuardsClientPatchResponse, error) { - req, err := client.patchCreateRequest(ctx, resourceGroupName, resourceGuardsName, parameters, options) - if err != nil { - return ResourceGuardsClientPatchResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientPatchResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientPatchResponse{}, runtime.NewResponseError(resp) - } - return client.patchHandleResponse(resp) -} - -// patchCreateRequest creates the Patch request. -func (client *ResourceGuardsClient) patchCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters PatchResourceRequestInput, options *ResourceGuardsClientPatchOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// patchHandleResponse handles the Patch response. -func (client *ResourceGuardsClient) patchHandleResponse(resp *http.Response) (ResourceGuardsClientPatchResponse, error) { - result := ResourceGuardsClientPatchResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardResource); err != nil { - return ResourceGuardsClientPatchResponse{}, err - } - return result, nil -} - -// Put - Creates or updates a ResourceGuard resource belonging to a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// resourceGuardsName - The name of ResourceGuard -// parameters - Request body for operation -// options - ResourceGuardsClientPutOptions contains the optional parameters for the ResourceGuardsClient.Put method. -func (client *ResourceGuardsClient) Put(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters ResourceGuardResource, options *ResourceGuardsClientPutOptions) (ResourceGuardsClientPutResponse, error) { - req, err := client.putCreateRequest(ctx, resourceGroupName, resourceGuardsName, parameters, options) - if err != nil { - return ResourceGuardsClientPutResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardsClientPutResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardsClientPutResponse{}, runtime.NewResponseError(resp) - } - return client.putHandleResponse(resp) -} - -// putCreateRequest creates the Put request. -func (client *ResourceGuardsClient) putCreateRequest(ctx context.Context, resourceGroupName string, resourceGuardsName string, parameters ResourceGuardResource, options *ResourceGuardsClientPutOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardsName == "" { - return nil, errors.New("parameter resourceGuardsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardsName}", url.PathEscape(resourceGuardsName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// putHandleResponse handles the Put response. -func (client *ResourceGuardsClient) putHandleResponse(resp *http.Response) (ResourceGuardsClientPutResponse, error) { - result := ResourceGuardsClientPutResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardResource); err != nil { - return ResourceGuardsClientPutResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_response_types.go deleted file mode 100644 index 0f419420..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_response_types.go +++ /dev/null @@ -1,325 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -// BackupInstancesClientAdhocBackupResponse contains the response from method BackupInstancesClient.AdhocBackup. -type BackupInstancesClientAdhocBackupResponse struct { - OperationJobExtendedInfo -} - -// BackupInstancesClientCreateOrUpdateResponse contains the response from method BackupInstancesClient.CreateOrUpdate. -type BackupInstancesClientCreateOrUpdateResponse struct { - BackupInstanceResource -} - -// BackupInstancesClientDeleteResponse contains the response from method BackupInstancesClient.Delete. -type BackupInstancesClientDeleteResponse struct { - // placeholder for future response values -} - -// BackupInstancesClientGetBackupInstanceOperationResultResponse contains the response from method BackupInstancesClient.GetBackupInstanceOperationResult. -type BackupInstancesClientGetBackupInstanceOperationResultResponse struct { - BackupInstanceResource -} - -// BackupInstancesClientGetResponse contains the response from method BackupInstancesClient.Get. -type BackupInstancesClientGetResponse struct { - BackupInstanceResource -} - -// BackupInstancesClientListResponse contains the response from method BackupInstancesClient.List. -type BackupInstancesClientListResponse struct { - BackupInstanceResourceList -} - -// BackupInstancesClientResumeBackupsResponse contains the response from method BackupInstancesClient.ResumeBackups. -type BackupInstancesClientResumeBackupsResponse struct { - // placeholder for future response values -} - -// BackupInstancesClientResumeProtectionResponse contains the response from method BackupInstancesClient.ResumeProtection. -type BackupInstancesClientResumeProtectionResponse struct { - // placeholder for future response values -} - -// BackupInstancesClientStopProtectionResponse contains the response from method BackupInstancesClient.StopProtection. -type BackupInstancesClientStopProtectionResponse struct { - // placeholder for future response values -} - -// BackupInstancesClientSuspendBackupsResponse contains the response from method BackupInstancesClient.SuspendBackups. -type BackupInstancesClientSuspendBackupsResponse struct { - // placeholder for future response values -} - -// BackupInstancesClientSyncBackupInstanceResponse contains the response from method BackupInstancesClient.SyncBackupInstance. -type BackupInstancesClientSyncBackupInstanceResponse struct { - // placeholder for future response values -} - -// BackupInstancesClientTriggerRehydrateResponse contains the response from method BackupInstancesClient.TriggerRehydrate. -type BackupInstancesClientTriggerRehydrateResponse struct { - // placeholder for future response values -} - -// BackupInstancesClientTriggerRestoreResponse contains the response from method BackupInstancesClient.TriggerRestore. -type BackupInstancesClientTriggerRestoreResponse struct { - OperationJobExtendedInfo -} - -// BackupInstancesClientValidateForBackupResponse contains the response from method BackupInstancesClient.ValidateForBackup. -type BackupInstancesClientValidateForBackupResponse struct { - OperationJobExtendedInfo -} - -// BackupInstancesClientValidateForRestoreResponse contains the response from method BackupInstancesClient.ValidateForRestore. -type BackupInstancesClientValidateForRestoreResponse struct { - OperationJobExtendedInfo -} - -// BackupPoliciesClientCreateOrUpdateResponse contains the response from method BackupPoliciesClient.CreateOrUpdate. -type BackupPoliciesClientCreateOrUpdateResponse struct { - BaseBackupPolicyResource -} - -// BackupPoliciesClientDeleteResponse contains the response from method BackupPoliciesClient.Delete. -type BackupPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// BackupPoliciesClientGetResponse contains the response from method BackupPoliciesClient.Get. -type BackupPoliciesClientGetResponse struct { - BaseBackupPolicyResource -} - -// BackupPoliciesClientListResponse contains the response from method BackupPoliciesClient.List. -type BackupPoliciesClientListResponse struct { - BaseBackupPolicyResourceList -} - -// BackupVaultOperationResultsClientGetResponse contains the response from method BackupVaultOperationResultsClient.Get. -type BackupVaultOperationResultsClientGetResponse struct { - BackupVaultResource - // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. - AzureAsyncOperation *string - - // Location contains the information returned from the Location header response. - Location *string - - // RetryAfter contains the information returned from the Retry-After header response. - RetryAfter *int32 -} - -// BackupVaultsClientCheckNameAvailabilityResponse contains the response from method BackupVaultsClient.CheckNameAvailability. -type BackupVaultsClientCheckNameAvailabilityResponse struct { - CheckNameAvailabilityResult -} - -// BackupVaultsClientCreateOrUpdateResponse contains the response from method BackupVaultsClient.CreateOrUpdate. -type BackupVaultsClientCreateOrUpdateResponse struct { - BackupVaultResource -} - -// BackupVaultsClientDeleteResponse contains the response from method BackupVaultsClient.Delete. -type BackupVaultsClientDeleteResponse struct { - // placeholder for future response values -} - -// BackupVaultsClientGetInResourceGroupResponse contains the response from method BackupVaultsClient.GetInResourceGroup. -type BackupVaultsClientGetInResourceGroupResponse struct { - BackupVaultResourceList -} - -// BackupVaultsClientGetInSubscriptionResponse contains the response from method BackupVaultsClient.GetInSubscription. -type BackupVaultsClientGetInSubscriptionResponse struct { - BackupVaultResourceList -} - -// BackupVaultsClientGetResponse contains the response from method BackupVaultsClient.Get. -type BackupVaultsClientGetResponse struct { - BackupVaultResource -} - -// BackupVaultsClientUpdateResponse contains the response from method BackupVaultsClient.Update. -type BackupVaultsClientUpdateResponse struct { - BackupVaultResource -} - -// ClientCheckFeatureSupportResponse contains the response from method Client.CheckFeatureSupport. -type ClientCheckFeatureSupportResponse struct { - FeatureValidationResponseBaseClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientCheckFeatureSupportResponse. -func (c *ClientCheckFeatureSupportResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalFeatureValidationResponseBaseClassification(data) - if err != nil { - return err - } - c.FeatureValidationResponseBaseClassification = res - return nil -} - -// ExportJobsClientTriggerResponse contains the response from method ExportJobsClient.Trigger. -type ExportJobsClientTriggerResponse struct { - // placeholder for future response values -} - -// ExportJobsOperationResultClientGetResponse contains the response from method ExportJobsOperationResultClient.Get. -type ExportJobsOperationResultClientGetResponse struct { - ExportJobsResult -} - -// JobsClientGetResponse contains the response from method JobsClient.Get. -type JobsClientGetResponse struct { - AzureBackupJobResource -} - -// JobsClientListResponse contains the response from method JobsClient.List. -type JobsClientListResponse struct { - AzureBackupJobResourceList -} - -// OperationResultClientGetResponse contains the response from method OperationResultClient.Get. -type OperationResultClientGetResponse struct { - OperationJobExtendedInfo - // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. - AzureAsyncOperation *string - - // Location contains the information returned from the Location header response. - Location *string - - // RetryAfter contains the information returned from the Retry-After header response. - RetryAfter *int32 -} - -// OperationStatusBackupVaultContextClientGetResponse contains the response from method OperationStatusBackupVaultContextClient.Get. -type OperationStatusBackupVaultContextClientGetResponse struct { - OperationResource -} - -// OperationStatusClientGetResponse contains the response from method OperationStatusClient.Get. -type OperationStatusClientGetResponse struct { - OperationResource -} - -// OperationStatusResourceGroupContextClientGetResponse contains the response from method OperationStatusResourceGroupContextClient.Get. -type OperationStatusResourceGroupContextClientGetResponse struct { - OperationResource -} - -// OperationsClientListResponse contains the response from method OperationsClient.List. -type OperationsClientListResponse struct { - ClientDiscoveryResponse -} - -// RecoveryPointsClientGetResponse contains the response from method RecoveryPointsClient.Get. -type RecoveryPointsClientGetResponse struct { - AzureBackupRecoveryPointResource -} - -// RecoveryPointsClientListResponse contains the response from method RecoveryPointsClient.List. -type RecoveryPointsClientListResponse struct { - AzureBackupRecoveryPointResourceList -} - -// ResourceGuardsClientDeleteResponse contains the response from method ResourceGuardsClient.Delete. -type ResourceGuardsClientDeleteResponse struct { - // placeholder for future response values -} - -// ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetBackupSecurityPINRequestsObjects. -type ResourceGuardsClientGetBackupSecurityPINRequestsObjectsResponse struct { - DppBaseResourceList -} - -// ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultBackupSecurityPINRequestsObject. -type ResourceGuardsClientGetDefaultBackupSecurityPINRequestsObjectResponse struct { - DppBaseResource -} - -// ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultDeleteProtectedItemRequestsObject. -type ResourceGuardsClientGetDefaultDeleteProtectedItemRequestsObjectResponse struct { - DppBaseResource -} - -// ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultDeleteResourceGuardProxyRequestsObject. -type ResourceGuardsClientGetDefaultDeleteResourceGuardProxyRequestsObjectResponse struct { - DppBaseResource -} - -// ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultDisableSoftDeleteRequestsObject. -type ResourceGuardsClientGetDefaultDisableSoftDeleteRequestsObjectResponse struct { - DppBaseResource -} - -// ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultUpdateProtectedItemRequestsObject. -type ResourceGuardsClientGetDefaultUpdateProtectedItemRequestsObjectResponse struct { - DppBaseResource -} - -// ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse contains the response from method ResourceGuardsClient.GetDefaultUpdateProtectionPolicyRequestsObject. -type ResourceGuardsClientGetDefaultUpdateProtectionPolicyRequestsObjectResponse struct { - DppBaseResource -} - -// ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetDeleteProtectedItemRequestsObjects. -type ResourceGuardsClientGetDeleteProtectedItemRequestsObjectsResponse struct { - DppBaseResourceList -} - -// ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetDeleteResourceGuardProxyRequestsObjects. -type ResourceGuardsClientGetDeleteResourceGuardProxyRequestsObjectsResponse struct { - DppBaseResourceList -} - -// ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetDisableSoftDeleteRequestsObjects. -type ResourceGuardsClientGetDisableSoftDeleteRequestsObjectsResponse struct { - DppBaseResourceList -} - -// ResourceGuardsClientGetResourcesInResourceGroupResponse contains the response from method ResourceGuardsClient.GetResourcesInResourceGroup. -type ResourceGuardsClientGetResourcesInResourceGroupResponse struct { - ResourceGuardResourceList -} - -// ResourceGuardsClientGetResourcesInSubscriptionResponse contains the response from method ResourceGuardsClient.GetResourcesInSubscription. -type ResourceGuardsClientGetResourcesInSubscriptionResponse struct { - ResourceGuardResourceList -} - -// ResourceGuardsClientGetResponse contains the response from method ResourceGuardsClient.Get. -type ResourceGuardsClientGetResponse struct { - ResourceGuardResource -} - -// ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetUpdateProtectedItemRequestsObjects. -type ResourceGuardsClientGetUpdateProtectedItemRequestsObjectsResponse struct { - DppBaseResourceList -} - -// ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse contains the response from method ResourceGuardsClient.GetUpdateProtectionPolicyRequestsObjects. -type ResourceGuardsClientGetUpdateProtectionPolicyRequestsObjectsResponse struct { - DppBaseResourceList -} - -// ResourceGuardsClientPatchResponse contains the response from method ResourceGuardsClient.Patch. -type ResourceGuardsClientPatchResponse struct { - ResourceGuardResource -} - -// ResourceGuardsClientPutResponse contains the response from method ResourceGuardsClient.Put. -type ResourceGuardsClientPutResponse struct { - ResourceGuardResource -} - -// RestorableTimeRangesClientFindResponse contains the response from method RestorableTimeRangesClient.Find. -type RestorableTimeRangesClientFindResponse struct { - AzureBackupFindRestorableTimeRangesResponseResource -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_restorabletimeranges_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_restorabletimeranges_client.go deleted file mode 100644 index 571aff92..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_restorabletimeranges_client.go +++ /dev/null @@ -1,118 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RestorableTimeRangesClient contains the methods for the RestorableTimeRanges group. -// Don't use this type directly, use NewRestorableTimeRangesClient() instead. -type RestorableTimeRangesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRestorableTimeRangesClient creates a new instance of RestorableTimeRangesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRestorableTimeRangesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableTimeRangesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RestorableTimeRangesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Find - -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-04-01 -// resourceGroupName - The name of the resource group where the backup vault is present. -// vaultName - The name of the backup vault. -// backupInstanceName - The name of the backup instance -// parameters - Request body for operation -// options - RestorableTimeRangesClientFindOptions contains the optional parameters for the RestorableTimeRangesClient.Find -// method. -func (client *RestorableTimeRangesClient) Find(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupFindRestorableTimeRangesRequest, options *RestorableTimeRangesClientFindOptions) (RestorableTimeRangesClientFindResponse, error) { - req, err := client.findCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, parameters, options) - if err != nil { - return RestorableTimeRangesClientFindResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RestorableTimeRangesClientFindResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RestorableTimeRangesClientFindResponse{}, runtime.NewResponseError(resp) - } - return client.findHandleResponse(resp) -} - -// findCreateRequest creates the Find request. -func (client *RestorableTimeRangesClient) findCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, parameters AzureBackupFindRestorableTimeRangesRequest, options *RestorableTimeRangesClientFindOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if backupInstanceName == "" { - return nil, errors.New("parameter backupInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// findHandleResponse handles the Find response. -func (client *RestorableTimeRangesClient) findHandleResponse(resp *http.Response) (RestorableTimeRangesClientFindResponse, error) { - result := RestorableTimeRangesClientFindResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupFindRestorableTimeRangesResponseResource); err != nil { - return RestorableTimeRangesClientFindResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_time_rfc3339.go deleted file mode 100644 index bb950e77..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/zz_generated_time_rfc3339.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdataprotection - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/CHANGELOG.md deleted file mode 100644 index 773b7867..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/CHANGELOG.md +++ /dev/null @@ -1,1397 +0,0 @@ -# Release History - -## 1.0.0 (2022-05-18) -### Breaking Changes - -- Type of `ScalingPlanProperties.HostPoolType` has been changed from `*ScalingHostPoolType` to `*HostPoolType` -- Type of `ScalingSchedule.RampUpStartTime` has been changed from `*Time` to `*time.Time` -- Type of `ScalingSchedule.OffPeakStartTime` has been changed from `*Time` to `*time.Time` -- Type of `ScalingSchedule.PeakStartTime` has been changed from `*Time` to `*time.Time` -- Type of `ScalingSchedule.RampDownStartTime` has been changed from `*Time` to `*time.Time` -- Const `PrivateEndpointConnectionProvisioningStateSucceeded` has been removed -- Const `PrivateEndpointConnectionProvisioningStateFailed` has been removed -- Const `HostpoolPublicNetworkAccessEnabled` has been removed -- Const `PublicNetworkAccessEnabled` has been removed -- Const `DayOfWeekSaturday` has been removed -- Const `PrivateEndpointConnectionProvisioningStateDeleting` has been removed -- Const `DayOfWeekTuesday` has been removed -- Const `CreatedByTypeKey` has been removed -- Const `DayOfWeekMonday` has been removed -- Const `HostpoolPublicNetworkAccessEnabledForClientsOnly` has been removed -- Const `DayOfWeekWednesday` has been removed -- Const `CreatedByTypeManagedIdentity` has been removed -- Const `PrivateEndpointServiceConnectionStatusRejected` has been removed -- Const `PrivateEndpointServiceConnectionStatusPending` has been removed -- Const `DayOfWeekThursday` has been removed -- Const `CreatedByTypeUser` has been removed -- Const `DayOfWeekFriday` has been removed -- Const `HostpoolPublicNetworkAccessEnabledForSessionHostsOnly` has been removed -- Const `CreatedByTypeApplication` has been removed -- Const `PrivateEndpointServiceConnectionStatusApproved` has been removed -- Const `ScalingHostPoolTypePooled` has been removed -- Const `PublicNetworkAccessDisabled` has been removed -- Const `SessionHostComponentUpdateTypeDefault` has been removed -- Const `DayOfWeekSunday` has been removed -- Const `SessionHostComponentUpdateTypeScheduled` has been removed -- Const `PrivateEndpointConnectionProvisioningStateCreating` has been removed -- Const `HostpoolPublicNetworkAccessDisabled` has been removed -- Function `UserSessionList.MarshalJSON` has been removed -- Function `*PrivateEndpointConnectionsClient.UpdateByHostPool` has been removed -- Function `PossibleScalingHostPoolTypeValues` has been removed -- Function `PrivateLinkResourceListResult.MarshalJSON` has been removed -- Function `SessionHostList.MarshalJSON` has been removed -- Function `*OperationsClient.NewListPager` has been removed -- Function `PossibleCreatedByTypeValues` has been removed -- Function `PossiblePublicNetworkAccessValues` has been removed -- Function `PossiblePrivateEndpointServiceConnectionStatusValues` has been removed -- Function `*PrivateLinkResourcesClient.NewListByHostPoolPager` has been removed -- Function `PossibleHostpoolPublicNetworkAccessValues` has been removed -- Function `*PrivateEndpointConnectionsClient.GetByWorkspace` has been removed -- Function `*SystemData.UnmarshalJSON` has been removed -- Function `*PrivateEndpointConnectionsClient.UpdateByWorkspace` has been removed -- Function `AgentUpdateProperties.MarshalJSON` has been removed -- Function `PrivateEndpointConnectionListResultWithSystemData.MarshalJSON` has been removed -- Function `*PrivateEndpointConnectionsClient.GetByHostPool` has been removed -- Function `DesktopList.MarshalJSON` has been removed -- Function `WorkspaceList.MarshalJSON` has been removed -- Function `NewPrivateLinkResourcesClient` has been removed -- Function `PossibleDayOfWeekValues` has been removed -- Function `HostPoolList.MarshalJSON` has been removed -- Function `ApplicationGroupList.MarshalJSON` has been removed -- Function `*PrivateEndpointConnectionsClient.DeleteByHostPool` has been removed -- Function `MSIXPackageList.MarshalJSON` has been removed -- Function `*PrivateEndpointConnectionsClient.NewListByHostPoolPager` has been removed -- Function `ScalingPlanList.MarshalJSON` has been removed -- Function `ResourceProviderOperationList.MarshalJSON` has been removed -- Function `StartMenuItemList.MarshalJSON` has been removed -- Function `PossibleSessionHostComponentUpdateTypeValues` has been removed -- Function `*PrivateEndpointConnectionsClient.DeleteByWorkspace` has been removed -- Function `AgentUpdatePatchProperties.MarshalJSON` has been removed -- Function `ServiceSpecification.MarshalJSON` has been removed -- Function `SystemData.MarshalJSON` has been removed -- Function `*PrivateEndpointConnectionsClient.NewListByWorkspacePager` has been removed -- Function `*DesktopsClient.NewListPager` has been removed -- Function `ExpandMsixImageList.MarshalJSON` has been removed -- Function `ApplicationList.MarshalJSON` has been removed -- Function `*PrivateLinkResourcesClient.NewListByWorkspacePager` has been removed -- Function `NewPrivateEndpointConnectionsClient` has been removed -- Function `PrivateLinkResourceProperties.MarshalJSON` has been removed -- Function `PossiblePrivateEndpointConnectionProvisioningStateValues` has been removed -- Struct `AgentUpdatePatchProperties` has been removed -- Struct `AgentUpdateProperties` has been removed -- Struct `MaintenanceWindowPatchProperties` has been removed -- Struct `MaintenanceWindowProperties` has been removed -- Struct `PrivateEndpoint` has been removed -- Struct `PrivateEndpointConnection` has been removed -- Struct `PrivateEndpointConnectionListResultWithSystemData` has been removed -- Struct `PrivateEndpointConnectionProperties` has been removed -- Struct `PrivateEndpointConnectionWithSystemData` has been removed -- Struct `PrivateEndpointConnectionsClient` has been removed -- Struct `PrivateEndpointConnectionsClientDeleteByHostPoolOptions` has been removed -- Struct `PrivateEndpointConnectionsClientDeleteByHostPoolResponse` has been removed -- Struct `PrivateEndpointConnectionsClientDeleteByWorkspaceOptions` has been removed -- Struct `PrivateEndpointConnectionsClientDeleteByWorkspaceResponse` has been removed -- Struct `PrivateEndpointConnectionsClientGetByHostPoolOptions` has been removed -- Struct `PrivateEndpointConnectionsClientGetByHostPoolResponse` has been removed -- Struct `PrivateEndpointConnectionsClientGetByWorkspaceOptions` has been removed -- Struct `PrivateEndpointConnectionsClientGetByWorkspaceResponse` has been removed -- Struct `PrivateEndpointConnectionsClientListByHostPoolOptions` has been removed -- Struct `PrivateEndpointConnectionsClientListByHostPoolResponse` has been removed -- Struct `PrivateEndpointConnectionsClientListByWorkspaceOptions` has been removed -- Struct `PrivateEndpointConnectionsClientListByWorkspaceResponse` has been removed -- Struct `PrivateEndpointConnectionsClientUpdateByHostPoolOptions` has been removed -- Struct `PrivateEndpointConnectionsClientUpdateByHostPoolResponse` has been removed -- Struct `PrivateEndpointConnectionsClientUpdateByWorkspaceOptions` has been removed -- Struct `PrivateEndpointConnectionsClientUpdateByWorkspaceResponse` has been removed -- Struct `PrivateLinkResource` has been removed -- Struct `PrivateLinkResourceListResult` has been removed -- Struct `PrivateLinkResourceProperties` has been removed -- Struct `PrivateLinkResourcesClient` has been removed -- Struct `PrivateLinkResourcesClientListByHostPoolOptions` has been removed -- Struct `PrivateLinkResourcesClientListByHostPoolResponse` has been removed -- Struct `PrivateLinkResourcesClientListByWorkspaceOptions` has been removed -- Struct `PrivateLinkResourcesClientListByWorkspaceResponse` has been removed -- Struct `PrivateLinkServiceConnectionState` has been removed -- Struct `SystemData` has been removed -- Struct `Time` has been removed -- Field `SystemData` of struct `SessionHost` has been removed -- Field `PrivateEndpointConnections` of struct `WorkspaceProperties` has been removed -- Field `PublicNetworkAccess` of struct `WorkspaceProperties` has been removed -- Field `SystemData` of struct `UserSession` has been removed -- Field `FriendlyName` of struct `SessionHostPatchProperties` has been removed -- Field `NextLink` of struct `ResourceProviderOperationList` has been removed -- Field `SystemData` of struct `Desktop` has been removed -- Field `SystemData` of struct `Workspace` has been removed -- Field `AgentUpdate` of struct `HostPoolPatchProperties` has been removed -- Field `PublicNetworkAccess` of struct `HostPoolPatchProperties` has been removed -- Field `SystemData` of struct `ApplicationGroup` has been removed -- Field `FriendlyName` of struct `SessionHostProperties` has been removed -- Field `SystemData` of struct `HostPool` has been removed -- Field `PublicNetworkAccess` of struct `WorkspacePatchProperties` has been removed -- Field `SystemData` of struct `MSIXPackage` has been removed -- Field `AgentUpdate` of struct `HostPoolProperties` has been removed -- Field `PublicNetworkAccess` of struct `HostPoolProperties` has been removed -- Field `PrivateEndpointConnections` of struct `HostPoolProperties` has been removed -- Field `SystemData` of struct `Application` has been removed -- Field `SystemData` of struct `ScalingPlan` has been removed -- Field `Force` of struct `SessionHostsClientUpdateOptions` has been removed - -### Features Added - -- New function `*ScalingSchedule.UnmarshalJSON([]byte) error` -- New function `*DesktopsClient.List(context.Context, string, string, *DesktopsClientListOptions) (DesktopsClientListResponse, error)` -- New function `*OperationsClient.List(context.Context, *OperationsClientListOptions) (OperationsClientListResponse, error)` -- New field `HostPoolType` in struct `ScalingPlanPatchProperties` - - -## 0.4.0 (2022-04-15) -### Breaking Changes - -- Function `*PrivateEndpointConnectionsClient.ListByWorkspace` has been removed -- Function `*MsixImagesClient.Expand` has been removed -- Function `*DesktopsClient.List` has been removed -- Function `*SessionHostsClient.List` has been removed -- Function `*PrivateLinkResourcesClient.ListByHostPool` has been removed -- Function `*OperationsClient.List` has been removed -- Function `*ApplicationsClient.List` has been removed -- Function `*PrivateEndpointConnectionsClient.ListByHostPool` has been removed -- Function `*HostPoolsClient.List` has been removed -- Function `*PrivateLinkResourcesClient.ListByWorkspace` has been removed -- Function `*StartMenuItemsClient.List` has been removed -- Function `*ScalingPlansClient.ListBySubscription` has been removed -- Function `*ApplicationGroupsClient.ListBySubscription` has been removed -- Function `*WorkspacesClient.ListBySubscription` has been removed -- Function `*ApplicationGroupsClient.ListByResourceGroup` has been removed -- Function `*HostPoolsClient.ListByResourceGroup` has been removed -- Function `*UserSessionsClient.ListByHostPool` has been removed -- Function `*ScalingPlansClient.ListByHostPool` has been removed -- Function `*UserSessionsClient.List` has been removed -- Function `*WorkspacesClient.ListByResourceGroup` has been removed -- Function `*ScalingPlansClient.ListByResourceGroup` has been removed -- Function `*MSIXPackagesClient.List` has been removed - -### Features Added - -- New function `*MSIXPackagesClient.NewListPager(string, string, *MSIXPackagesClientListOptions) *runtime.Pager[MSIXPackagesClientListResponse]` -- New function `*WorkspacesClient.NewListBySubscriptionPager(*WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse]` -- New function `*SessionHostsClient.NewListPager(string, string, *SessionHostsClientListOptions) *runtime.Pager[SessionHostsClientListResponse]` -- New function `*PrivateEndpointConnectionsClient.NewListByWorkspacePager(string, string, *PrivateEndpointConnectionsClientListByWorkspaceOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByWorkspaceResponse]` -- New function `*WorkspacesClient.NewListByResourceGroupPager(string, *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse]` -- New function `*PrivateLinkResourcesClient.NewListByWorkspacePager(string, string, *PrivateLinkResourcesClientListByWorkspaceOptions) *runtime.Pager[PrivateLinkResourcesClientListByWorkspaceResponse]` -- New function `*ScalingPlansClient.NewListByHostPoolPager(string, string, *ScalingPlansClientListByHostPoolOptions) *runtime.Pager[ScalingPlansClientListByHostPoolResponse]` -- New function `*UserSessionsClient.NewListByHostPoolPager(string, string, *UserSessionsClientListByHostPoolOptions) *runtime.Pager[UserSessionsClientListByHostPoolResponse]` -- New function `*ApplicationGroupsClient.NewListBySubscriptionPager(*ApplicationGroupsClientListBySubscriptionOptions) *runtime.Pager[ApplicationGroupsClientListBySubscriptionResponse]` -- New function `*ScalingPlansClient.NewListBySubscriptionPager(*ScalingPlansClientListBySubscriptionOptions) *runtime.Pager[ScalingPlansClientListBySubscriptionResponse]` -- New function `*ApplicationsClient.NewListPager(string, string, *ApplicationsClientListOptions) *runtime.Pager[ApplicationsClientListResponse]` -- New function `*HostPoolsClient.NewListByResourceGroupPager(string, *HostPoolsClientListByResourceGroupOptions) *runtime.Pager[HostPoolsClientListByResourceGroupResponse]` -- New function `*DesktopsClient.NewListPager(string, string, *DesktopsClientListOptions) *runtime.Pager[DesktopsClientListResponse]` -- New function `*HostPoolsClient.NewListPager(*HostPoolsClientListOptions) *runtime.Pager[HostPoolsClientListResponse]` -- New function `*UserSessionsClient.NewListPager(string, string, string, *UserSessionsClientListOptions) *runtime.Pager[UserSessionsClientListResponse]` -- New function `*ApplicationGroupsClient.NewListByResourceGroupPager(string, *ApplicationGroupsClientListByResourceGroupOptions) *runtime.Pager[ApplicationGroupsClientListByResourceGroupResponse]` -- New function `*PrivateEndpointConnectionsClient.NewListByHostPoolPager(string, string, *PrivateEndpointConnectionsClientListByHostPoolOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByHostPoolResponse]` -- New function `*PrivateLinkResourcesClient.NewListByHostPoolPager(string, string, *PrivateLinkResourcesClientListByHostPoolOptions) *runtime.Pager[PrivateLinkResourcesClientListByHostPoolResponse]` -- New function `*StartMenuItemsClient.NewListPager(string, string, *StartMenuItemsClientListOptions) *runtime.Pager[StartMenuItemsClientListResponse]` -- New function `*ScalingPlansClient.NewListByResourceGroupPager(string, *ScalingPlansClientListByResourceGroupOptions) *runtime.Pager[ScalingPlansClientListByResourceGroupResponse]` -- New function `*OperationsClient.NewListPager(*OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]` -- New function `*MsixImagesClient.NewExpandPager(string, string, MSIXImageURI, *MsixImagesClientExpandOptions) *runtime.Pager[MsixImagesClientExpandResponse]` - - -## 0.3.0 (2022-04-11) -### Breaking Changes - -- Function `NewStartMenuItemsClient` return value(s) have been changed from `(*StartMenuItemsClient)` to `(*StartMenuItemsClient, error)` -- Function `NewPrivateEndpointConnectionsClient` return value(s) have been changed from `(*PrivateEndpointConnectionsClient)` to `(*PrivateEndpointConnectionsClient, error)` -- Function `*PrivateLinkResourcesClient.ListByHostPool` return value(s) have been changed from `(*PrivateLinkResourcesClientListByHostPoolPager)` to `(*runtime.Pager[PrivateLinkResourcesClientListByHostPoolResponse])` -- Function `*HostPoolsClient.List` return value(s) have been changed from `(*HostPoolsClientListPager)` to `(*runtime.Pager[HostPoolsClientListResponse])` -- Function `NewPrivateLinkResourcesClient` return value(s) have been changed from `(*PrivateLinkResourcesClient)` to `(*PrivateLinkResourcesClient, error)` -- Function `NewMsixImagesClient` return value(s) have been changed from `(*MsixImagesClient)` to `(*MsixImagesClient, error)` -- Function `*ApplicationGroupsClient.ListByResourceGroup` return value(s) have been changed from `(*ApplicationGroupsClientListByResourceGroupPager)` to `(*runtime.Pager[ApplicationGroupsClientListByResourceGroupResponse])` -- Function `NewDesktopsClient` return value(s) have been changed from `(*DesktopsClient)` to `(*DesktopsClient, error)` -- Function `*UserSessionsClient.List` return value(s) have been changed from `(*UserSessionsClientListPager)` to `(*runtime.Pager[UserSessionsClientListResponse])` -- Function `NewSessionHostsClient` return value(s) have been changed from `(*SessionHostsClient)` to `(*SessionHostsClient, error)` -- Function `*ScalingPlansClient.ListByResourceGroup` return value(s) have been changed from `(*ScalingPlansClientListByResourceGroupPager)` to `(*runtime.Pager[ScalingPlansClientListByResourceGroupResponse])` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsClientListPager)` to `(*runtime.Pager[OperationsClientListResponse])` -- Function `*MSIXPackagesClient.List` return value(s) have been changed from `(*MSIXPackagesClientListPager)` to `(*runtime.Pager[MSIXPackagesClientListResponse])` -- Function `NewUserSessionsClient` return value(s) have been changed from `(*UserSessionsClient)` to `(*UserSessionsClient, error)` -- Function `*StartMenuItemsClient.List` return value(s) have been changed from `(*StartMenuItemsClientListPager)` to `(*runtime.Pager[StartMenuItemsClientListResponse])` -- Function `*HostPoolsClient.ListByResourceGroup` return value(s) have been changed from `(*HostPoolsClientListByResourceGroupPager)` to `(*runtime.Pager[HostPoolsClientListByResourceGroupResponse])` -- Function `*MsixImagesClient.Expand` return value(s) have been changed from `(*MsixImagesClientExpandPager)` to `(*runtime.Pager[MsixImagesClientExpandResponse])` -- Function `NewHostPoolsClient` return value(s) have been changed from `(*HostPoolsClient)` to `(*HostPoolsClient, error)` -- Function `*ApplicationsClient.List` return value(s) have been changed from `(*ApplicationsClientListPager)` to `(*runtime.Pager[ApplicationsClientListResponse])` -- Function `*UserSessionsClient.ListByHostPool` return value(s) have been changed from `(*UserSessionsClientListByHostPoolPager)` to `(*runtime.Pager[UserSessionsClientListByHostPoolResponse])` -- Function `*PrivateEndpointConnectionsClient.ListByWorkspace` return value(s) have been changed from `(*PrivateEndpointConnectionsClientListByWorkspacePager)` to `(*runtime.Pager[PrivateEndpointConnectionsClientListByWorkspaceResponse])` -- Function `*WorkspacesClient.ListBySubscription` return value(s) have been changed from `(*WorkspacesClientListBySubscriptionPager)` to `(*runtime.Pager[WorkspacesClientListBySubscriptionResponse])` -- Function `NewApplicationGroupsClient` return value(s) have been changed from `(*ApplicationGroupsClient)` to `(*ApplicationGroupsClient, error)` -- Function `NewMSIXPackagesClient` return value(s) have been changed from `(*MSIXPackagesClient)` to `(*MSIXPackagesClient, error)` -- Function `*PrivateLinkResourcesClient.ListByWorkspace` return value(s) have been changed from `(*PrivateLinkResourcesClientListByWorkspacePager)` to `(*runtime.Pager[PrivateLinkResourcesClientListByWorkspaceResponse])` -- Function `*SessionHostsClient.List` return value(s) have been changed from `(*SessionHostsClientListPager)` to `(*runtime.Pager[SessionHostsClientListResponse])` -- Function `NewWorkspacesClient` return value(s) have been changed from `(*WorkspacesClient)` to `(*WorkspacesClient, error)` -- Function `*DesktopsClient.List` return value(s) have been changed from `(*DesktopsClientListPager)` to `(*runtime.Pager[DesktopsClientListResponse])` -- Function `NewApplicationsClient` return value(s) have been changed from `(*ApplicationsClient)` to `(*ApplicationsClient, error)` -- Function `*ApplicationGroupsClient.ListBySubscription` return value(s) have been changed from `(*ApplicationGroupsClientListBySubscriptionPager)` to `(*runtime.Pager[ApplicationGroupsClientListBySubscriptionResponse])` -- Function `NewScalingPlansClient` return value(s) have been changed from `(*ScalingPlansClient)` to `(*ScalingPlansClient, error)` -- Function `*ScalingPlansClient.ListBySubscription` return value(s) have been changed from `(*ScalingPlansClientListBySubscriptionPager)` to `(*runtime.Pager[ScalingPlansClientListBySubscriptionResponse])` -- Function `*PrivateEndpointConnectionsClient.ListByHostPool` return value(s) have been changed from `(*PrivateEndpointConnectionsClientListByHostPoolPager)` to `(*runtime.Pager[PrivateEndpointConnectionsClientListByHostPoolResponse])` -- Function `NewOperationsClient` return value(s) have been changed from `(*OperationsClient)` to `(*OperationsClient, error)` -- Function `*WorkspacesClient.ListByResourceGroup` return value(s) have been changed from `(*WorkspacesClientListByResourceGroupPager)` to `(*runtime.Pager[WorkspacesClientListByResourceGroupResponse])` -- Function `*ScalingPlansClient.ListByHostPool` return value(s) have been changed from `(*ScalingPlansClientListByHostPoolPager)` to `(*runtime.Pager[ScalingPlansClientListByHostPoolResponse])` -- Type of `HostPoolPatchProperties.PublicNetworkAccess` has been changed from `*PublicNetworkAccess` to `*HostpoolPublicNetworkAccess` -- Type of `HostPoolProperties.PublicNetworkAccess` has been changed from `*PublicNetworkAccess` to `*HostpoolPublicNetworkAccess` -- Function `*DesktopsClientListPager.Err` has been removed -- Function `*MsixImagesClientExpandPager.PageResponse` has been removed -- Function `*MsixImagesClientExpandPager.NextPage` has been removed -- Function `*OperationsClientListPager.PageResponse` has been removed -- Function `*WorkspacesClientListBySubscriptionPager.NextPage` has been removed -- Function `*HostPoolsClientListPager.NextPage` has been removed -- Function `*UserSessionsClientListPager.Err` has been removed -- Function `HealthCheckName.ToPtr` has been removed -- Function `*PrivateLinkResourcesClientListByHostPoolPager.PageResponse` has been removed -- Function `*UserSessionsClientListPager.NextPage` has been removed -- Function `*PrivateLinkResourcesClientListByWorkspacePager.PageResponse` has been removed -- Function `*WorkspacesClientListByResourceGroupPager.PageResponse` has been removed -- Function `*UserSessionsClientListByHostPoolPager.NextPage` has been removed -- Function `CreatedByType.ToPtr` has been removed -- Function `ScalingScheduleDaysOfWeekItem.ToPtr` has been removed -- Function `*ScalingPlansClientListByResourceGroupPager.PageResponse` has been removed -- Function `*UserSessionsClientListByHostPoolPager.Err` has been removed -- Function `ApplicationType.ToPtr` has been removed -- Function `*OperationsClientListPager.NextPage` has been removed -- Function `ScalingHostPoolType.ToPtr` has been removed -- Function `*WorkspacesClientListBySubscriptionPager.PageResponse` has been removed -- Function `*ApplicationGroupsClientListByResourceGroupPager.PageResponse` has been removed -- Function `PersonalDesktopAssignmentType.ToPtr` has been removed -- Function `HostPoolType.ToPtr` has been removed -- Function `*HostPoolsClientListByResourceGroupPager.NextPage` has been removed -- Function `*OperationsClientListPager.Err` has been removed -- Function `*ApplicationGroupsClientListBySubscriptionPager.Err` has been removed -- Function `*StartMenuItemsClientListPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionsClientListByHostPoolPager.Err` has been removed -- Function `*PrivateLinkResourcesClientListByHostPoolPager.NextPage` has been removed -- Function `Status.ToPtr` has been removed -- Function `*ScalingPlansClientListByHostPoolPager.NextPage` has been removed -- Function `*WorkspacesClientListByResourceGroupPager.Err` has been removed -- Function `*SessionHostsClientListPager.PageResponse` has been removed -- Function `*DesktopsClientListPager.NextPage` has been removed -- Function `*ScalingPlansClientListByHostPoolPager.Err` has been removed -- Function `*MSIXPackagesClientListPager.PageResponse` has been removed -- Function `ApplicationGroupType.ToPtr` has been removed -- Function `PrivateEndpointConnectionProvisioningState.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientListByHostPoolPager.NextPage` has been removed -- Function `*DesktopsClientListPager.PageResponse` has been removed -- Function `SKUTier.ToPtr` has been removed -- Function `PrivateEndpointServiceConnectionStatus.ToPtr` has been removed -- Function `*MSIXPackagesClientListPager.Err` has been removed -- Function `*StartMenuItemsClientListPager.NextPage` has been removed -- Function `*PrivateLinkResourcesClientListByWorkspacePager.Err` has been removed -- Function `SessionHostLoadBalancingAlgorithm.ToPtr` has been removed -- Function `UpdateState.ToPtr` has been removed -- Function `PreferredAppGroupType.ToPtr` has been removed -- Function `*ScalingPlansClientListByResourceGroupPager.NextPage` has been removed -- Function `*ApplicationGroupsClientListByResourceGroupPager.NextPage` has been removed -- Function `*ApplicationsClientListPager.NextPage` has been removed -- Function `*HostPoolsClientListByResourceGroupPager.PageResponse` has been removed -- Function `CommandLineSetting.ToPtr` has been removed -- Function `*ApplicationGroupsClientListBySubscriptionPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsClientListByWorkspacePager.NextPage` has been removed -- Function `*WorkspacesClientListBySubscriptionPager.Err` has been removed -- Function `SessionState.ToPtr` has been removed -- Function `LoadBalancerType.ToPtr` has been removed -- Function `*HostPoolsClientListByResourceGroupPager.Err` has been removed -- Function `*ScalingPlansClientListBySubscriptionPager.PageResponse` has been removed -- Function `*ScalingPlansClientListBySubscriptionPager.NextPage` has been removed -- Function `*ScalingPlansClientListByResourceGroupPager.Err` has been removed -- Function `*SessionHostsClientListPager.NextPage` has been removed -- Function `*MSIXPackagesClientListPager.NextPage` has been removed -- Function `SSOSecretType.ToPtr` has been removed -- Function `*PrivateLinkResourcesClientListByWorkspacePager.NextPage` has been removed -- Function `*MsixImagesClientExpandPager.Err` has been removed -- Function `Operation.ToPtr` has been removed -- Function `HealthCheckResult.ToPtr` has been removed -- Function `*HostPoolsClientListPager.PageResponse` has been removed -- Function `RemoteApplicationType.ToPtr` has been removed -- Function `*WorkspacesClientListByResourceGroupPager.NextPage` has been removed -- Function `*UserSessionsClientListPager.PageResponse` has been removed -- Function `*ApplicationGroupsClientListByResourceGroupPager.Err` has been removed -- Function `*HostPoolsClientListPager.Err` has been removed -- Function `RegistrationTokenOperation.ToPtr` has been removed -- Function `*UserSessionsClientListByHostPoolPager.PageResponse` has been removed -- Function `*PrivateLinkResourcesClientListByHostPoolPager.Err` has been removed -- Function `*PrivateEndpointConnectionsClientListByWorkspacePager.PageResponse` has been removed -- Function `PublicNetworkAccess.ToPtr` has been removed -- Function `*ApplicationsClientListPager.Err` has been removed -- Function `*PrivateEndpointConnectionsClientListByWorkspacePager.Err` has been removed -- Function `*SessionHostsClientListPager.Err` has been removed -- Function `*ScalingPlansClientListByHostPoolPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionsClientListByHostPoolPager.PageResponse` has been removed -- Function `*ApplicationsClientListPager.PageResponse` has been removed -- Function `*StartMenuItemsClientListPager.Err` has been removed -- Function `StopHostsWhen.ToPtr` has been removed -- Function `*ApplicationGroupsClientListBySubscriptionPager.PageResponse` has been removed -- Function `*ScalingPlansClientListBySubscriptionPager.Err` has been removed -- Struct `ApplicationGroupsClientCreateOrUpdateResult` has been removed -- Struct `ApplicationGroupsClientGetResult` has been removed -- Struct `ApplicationGroupsClientListByResourceGroupPager` has been removed -- Struct `ApplicationGroupsClientListByResourceGroupResult` has been removed -- Struct `ApplicationGroupsClientListBySubscriptionPager` has been removed -- Struct `ApplicationGroupsClientListBySubscriptionResult` has been removed -- Struct `ApplicationGroupsClientUpdateResult` has been removed -- Struct `ApplicationsClientCreateOrUpdateResult` has been removed -- Struct `ApplicationsClientGetResult` has been removed -- Struct `ApplicationsClientListPager` has been removed -- Struct `ApplicationsClientListResult` has been removed -- Struct `ApplicationsClientUpdateResult` has been removed -- Struct `DesktopsClientGetResult` has been removed -- Struct `DesktopsClientListPager` has been removed -- Struct `DesktopsClientListResult` has been removed -- Struct `DesktopsClientUpdateResult` has been removed -- Struct `HostPoolsClientCreateOrUpdateResult` has been removed -- Struct `HostPoolsClientGetResult` has been removed -- Struct `HostPoolsClientListByResourceGroupPager` has been removed -- Struct `HostPoolsClientListByResourceGroupResult` has been removed -- Struct `HostPoolsClientListPager` has been removed -- Struct `HostPoolsClientListResult` has been removed -- Struct `HostPoolsClientRetrieveRegistrationTokenResult` has been removed -- Struct `HostPoolsClientUpdateResult` has been removed -- Struct `MSIXPackagesClientCreateOrUpdateResult` has been removed -- Struct `MSIXPackagesClientGetResult` has been removed -- Struct `MSIXPackagesClientListPager` has been removed -- Struct `MSIXPackagesClientListResult` has been removed -- Struct `MSIXPackagesClientUpdateResult` has been removed -- Struct `MsixImagesClientExpandPager` has been removed -- Struct `MsixImagesClientExpandResult` has been removed -- Struct `OperationsClientListPager` has been removed -- Struct `OperationsClientListResult` has been removed -- Struct `PrivateEndpointConnectionsClientGetByHostPoolResult` has been removed -- Struct `PrivateEndpointConnectionsClientGetByWorkspaceResult` has been removed -- Struct `PrivateEndpointConnectionsClientListByHostPoolPager` has been removed -- Struct `PrivateEndpointConnectionsClientListByHostPoolResult` has been removed -- Struct `PrivateEndpointConnectionsClientListByWorkspacePager` has been removed -- Struct `PrivateEndpointConnectionsClientListByWorkspaceResult` has been removed -- Struct `PrivateEndpointConnectionsClientUpdateByHostPoolResult` has been removed -- Struct `PrivateEndpointConnectionsClientUpdateByWorkspaceResult` has been removed -- Struct `PrivateLinkResourcesClientListByHostPoolPager` has been removed -- Struct `PrivateLinkResourcesClientListByHostPoolResult` has been removed -- Struct `PrivateLinkResourcesClientListByWorkspacePager` has been removed -- Struct `PrivateLinkResourcesClientListByWorkspaceResult` has been removed -- Struct `ScalingPlansClientCreateResult` has been removed -- Struct `ScalingPlansClientGetResult` has been removed -- Struct `ScalingPlansClientListByHostPoolPager` has been removed -- Struct `ScalingPlansClientListByHostPoolResult` has been removed -- Struct `ScalingPlansClientListByResourceGroupPager` has been removed -- Struct `ScalingPlansClientListByResourceGroupResult` has been removed -- Struct `ScalingPlansClientListBySubscriptionPager` has been removed -- Struct `ScalingPlansClientListBySubscriptionResult` has been removed -- Struct `ScalingPlansClientUpdateResult` has been removed -- Struct `SessionHostsClientGetResult` has been removed -- Struct `SessionHostsClientListPager` has been removed -- Struct `SessionHostsClientListResult` has been removed -- Struct `SessionHostsClientUpdateResult` has been removed -- Struct `StartMenuItemsClientListPager` has been removed -- Struct `StartMenuItemsClientListResult` has been removed -- Struct `UserSessionsClientGetResult` has been removed -- Struct `UserSessionsClientListByHostPoolPager` has been removed -- Struct `UserSessionsClientListByHostPoolResult` has been removed -- Struct `UserSessionsClientListPager` has been removed -- Struct `UserSessionsClientListResult` has been removed -- Struct `WorkspacesClientCreateOrUpdateResult` has been removed -- Struct `WorkspacesClientGetResult` has been removed -- Struct `WorkspacesClientListByResourceGroupPager` has been removed -- Struct `WorkspacesClientListByResourceGroupResult` has been removed -- Struct `WorkspacesClientListBySubscriptionPager` has been removed -- Struct `WorkspacesClientListBySubscriptionResult` has been removed -- Struct `WorkspacesClientUpdateResult` has been removed -- Field `PrivateEndpointConnectionsClientListByWorkspaceResult` of struct `PrivateEndpointConnectionsClientListByWorkspaceResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientListByWorkspaceResponse` has been removed -- Field `MSIXPackagesClientListResult` of struct `MSIXPackagesClientListResponse` has been removed -- Field `RawResponse` of struct `MSIXPackagesClientListResponse` has been removed -- Field `SessionHostsClientListResult` of struct `SessionHostsClientListResponse` has been removed -- Field `RawResponse` of struct `SessionHostsClientListResponse` has been removed -- Field `RawResponse` of struct `UserSessionsClientDeleteResponse` has been removed -- Field `PrivateEndpointConnectionsClientGetByHostPoolResult` of struct `PrivateEndpointConnectionsClientGetByHostPoolResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientGetByHostPoolResponse` has been removed -- Field `UserSessionsClientListResult` of struct `UserSessionsClientListResponse` has been removed -- Field `RawResponse` of struct `UserSessionsClientListResponse` has been removed -- Field `WorkspacesClientUpdateResult` of struct `WorkspacesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `WorkspacesClientUpdateResponse` has been removed -- Field `DesktopsClientUpdateResult` of struct `DesktopsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `DesktopsClientUpdateResponse` has been removed -- Field `HostPoolsClientRetrieveRegistrationTokenResult` of struct `HostPoolsClientRetrieveRegistrationTokenResponse` has been removed -- Field `RawResponse` of struct `HostPoolsClientRetrieveRegistrationTokenResponse` has been removed -- Field `WorkspacesClientListByResourceGroupResult` of struct `WorkspacesClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `WorkspacesClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `HostPoolsClientDeleteResponse` has been removed -- Field `MsixImagesClientExpandResult` of struct `MsixImagesClientExpandResponse` has been removed -- Field `RawResponse` of struct `MsixImagesClientExpandResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientDeleteByWorkspaceResponse` has been removed -- Field `HostPoolsClientListResult` of struct `HostPoolsClientListResponse` has been removed -- Field `RawResponse` of struct `HostPoolsClientListResponse` has been removed -- Field `ApplicationGroupsClientListBySubscriptionResult` of struct `ApplicationGroupsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `ApplicationGroupsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientDeleteByHostPoolResponse` has been removed -- Field `PrivateEndpointConnectionsClientUpdateByHostPoolResult` of struct `PrivateEndpointConnectionsClientUpdateByHostPoolResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientUpdateByHostPoolResponse` has been removed -- Field `StartMenuItemsClientListResult` of struct `StartMenuItemsClientListResponse` has been removed -- Field `RawResponse` of struct `StartMenuItemsClientListResponse` has been removed -- Field `OperationsClientListResult` of struct `OperationsClientListResponse` has been removed -- Field `RawResponse` of struct `OperationsClientListResponse` has been removed -- Field `ApplicationsClientListResult` of struct `ApplicationsClientListResponse` has been removed -- Field `RawResponse` of struct `ApplicationsClientListResponse` has been removed -- Field `PrivateEndpointConnectionsClientListByHostPoolResult` of struct `PrivateEndpointConnectionsClientListByHostPoolResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientListByHostPoolResponse` has been removed -- Field `PrivateLinkResourcesClientListByWorkspaceResult` of struct `PrivateLinkResourcesClientListByWorkspaceResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkResourcesClientListByWorkspaceResponse` has been removed -- Field `RawResponse` of struct `MSIXPackagesClientDeleteResponse` has been removed -- Field `ApplicationGroupsClientGetResult` of struct `ApplicationGroupsClientGetResponse` has been removed -- Field `RawResponse` of struct `ApplicationGroupsClientGetResponse` has been removed -- Field `HostPoolsClientListByResourceGroupResult` of struct `HostPoolsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `HostPoolsClientListByResourceGroupResponse` has been removed -- Field `SessionHostsClientUpdateResult` of struct `SessionHostsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `SessionHostsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `WorkspacesClientDeleteResponse` has been removed -- Field `ApplicationGroupsClientListByResourceGroupResult` of struct `ApplicationGroupsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ApplicationGroupsClientListByResourceGroupResponse` has been removed -- Field `ApplicationsClientGetResult` of struct `ApplicationsClientGetResponse` has been removed -- Field `RawResponse` of struct `ApplicationsClientGetResponse` has been removed -- Field `ScalingPlansClientListBySubscriptionResult` of struct `ScalingPlansClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `ScalingPlansClientListBySubscriptionResponse` has been removed -- Field `SessionHostsClientGetResult` of struct `SessionHostsClientGetResponse` has been removed -- Field `RawResponse` of struct `SessionHostsClientGetResponse` has been removed -- Field `WorkspacesClientCreateOrUpdateResult` of struct `WorkspacesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `WorkspacesClientCreateOrUpdateResponse` has been removed -- Field `DesktopsClientGetResult` of struct `DesktopsClientGetResponse` has been removed -- Field `RawResponse` of struct `DesktopsClientGetResponse` has been removed -- Field `MSIXPackagesClientCreateOrUpdateResult` of struct `MSIXPackagesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `MSIXPackagesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `UserSessionsClientSendMessageResponse` has been removed -- Field `ApplicationGroupsClientCreateOrUpdateResult` of struct `ApplicationGroupsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ApplicationGroupsClientCreateOrUpdateResponse` has been removed -- Field `ScalingPlansClientUpdateResult` of struct `ScalingPlansClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ScalingPlansClientUpdateResponse` has been removed -- Field `ScalingPlansClientGetResult` of struct `ScalingPlansClientGetResponse` has been removed -- Field `RawResponse` of struct `ScalingPlansClientGetResponse` has been removed -- Field `PrivateEndpointConnectionsClientGetByWorkspaceResult` of struct `PrivateEndpointConnectionsClientGetByWorkspaceResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientGetByWorkspaceResponse` has been removed -- Field `RawResponse` of struct `ApplicationGroupsClientDeleteResponse` has been removed -- Field `ApplicationsClientUpdateResult` of struct `ApplicationsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ApplicationsClientUpdateResponse` has been removed -- Field `ApplicationsClientCreateOrUpdateResult` of struct `ApplicationsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ApplicationsClientCreateOrUpdateResponse` has been removed -- Field `UserSessionsClientListByHostPoolResult` of struct `UserSessionsClientListByHostPoolResponse` has been removed -- Field `RawResponse` of struct `UserSessionsClientListByHostPoolResponse` has been removed -- Field `HostPoolsClientGetResult` of struct `HostPoolsClientGetResponse` has been removed -- Field `RawResponse` of struct `HostPoolsClientGetResponse` has been removed -- Field `HostPoolsClientCreateOrUpdateResult` of struct `HostPoolsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `HostPoolsClientCreateOrUpdateResponse` has been removed -- Field `ScalingPlansClientListByResourceGroupResult` of struct `ScalingPlansClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ScalingPlansClientListByResourceGroupResponse` has been removed -- Field `HostPoolsClientUpdateResult` of struct `HostPoolsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `HostPoolsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ApplicationsClientDeleteResponse` has been removed -- Field `WorkspacesClientListBySubscriptionResult` of struct `WorkspacesClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `WorkspacesClientListBySubscriptionResponse` has been removed -- Field `MSIXPackagesClientGetResult` of struct `MSIXPackagesClientGetResponse` has been removed -- Field `RawResponse` of struct `MSIXPackagesClientGetResponse` has been removed -- Field `ScalingPlansClientListByHostPoolResult` of struct `ScalingPlansClientListByHostPoolResponse` has been removed -- Field `RawResponse` of struct `ScalingPlansClientListByHostPoolResponse` has been removed -- Field `PrivateLinkResourcesClientListByHostPoolResult` of struct `PrivateLinkResourcesClientListByHostPoolResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkResourcesClientListByHostPoolResponse` has been removed -- Field `UserSessionsClientGetResult` of struct `UserSessionsClientGetResponse` has been removed -- Field `RawResponse` of struct `UserSessionsClientGetResponse` has been removed -- Field `RawResponse` of struct `UserSessionsClientDisconnectResponse` has been removed -- Field `RawResponse` of struct `ScalingPlansClientDeleteResponse` has been removed -- Field `DesktopsClientListResult` of struct `DesktopsClientListResponse` has been removed -- Field `RawResponse` of struct `DesktopsClientListResponse` has been removed -- Field `RawResponse` of struct `SessionHostsClientDeleteResponse` has been removed -- Field `ScalingPlansClientCreateResult` of struct `ScalingPlansClientCreateResponse` has been removed -- Field `RawResponse` of struct `ScalingPlansClientCreateResponse` has been removed -- Field `PrivateEndpointConnectionsClientUpdateByWorkspaceResult` of struct `PrivateEndpointConnectionsClientUpdateByWorkspaceResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientUpdateByWorkspaceResponse` has been removed -- Field `WorkspacesClientGetResult` of struct `WorkspacesClientGetResponse` has been removed -- Field `RawResponse` of struct `WorkspacesClientGetResponse` has been removed -- Field `MSIXPackagesClientUpdateResult` of struct `MSIXPackagesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `MSIXPackagesClientUpdateResponse` has been removed -- Field `ApplicationGroupsClientUpdateResult` of struct `ApplicationGroupsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ApplicationGroupsClientUpdateResponse` has been removed - -### Features Added - -- New const `HostpoolPublicNetworkAccessEnabledForClientsOnly` -- New const `DayOfWeekWednesday` -- New const `DayOfWeekFriday` -- New const `SessionHostComponentUpdateTypeScheduled` -- New const `HostpoolPublicNetworkAccessEnabled` -- New const `DayOfWeekMonday` -- New const `SessionHostComponentUpdateTypeDefault` -- New const `DayOfWeekTuesday` -- New const `DayOfWeekThursday` -- New const `DayOfWeekSaturday` -- New const `DayOfWeekSunday` -- New const `HostpoolPublicNetworkAccessEnabledForSessionHostsOnly` -- New const `HostpoolPublicNetworkAccessDisabled` -- New function `PossibleHostpoolPublicNetworkAccessValues() []HostpoolPublicNetworkAccess` -- New function `AgentUpdatePatchProperties.MarshalJSON() ([]byte, error)` -- New function `PossibleDayOfWeekValues() []DayOfWeek` -- New function `PossibleSessionHostComponentUpdateTypeValues() []SessionHostComponentUpdateType` -- New function `AgentUpdateProperties.MarshalJSON() ([]byte, error)` -- New struct `AgentUpdatePatchProperties` -- New struct `AgentUpdateProperties` -- New struct `MaintenanceWindowPatchProperties` -- New struct `MaintenanceWindowProperties` -- New anonymous field `ScalingPlan` in struct `ScalingPlansClientGetResponse` -- New anonymous field `RegistrationInfo` in struct `HostPoolsClientRetrieveRegistrationTokenResponse` -- New field `FriendlyName` in struct `SessionHostProperties` -- New anonymous field `PrivateEndpointConnectionWithSystemData` in struct `PrivateEndpointConnectionsClientUpdateByHostPoolResponse` -- New anonymous field `ApplicationGroup` in struct `ApplicationGroupsClientGetResponse` -- New anonymous field `StartMenuItemList` in struct `StartMenuItemsClientListResponse` -- New anonymous field `Workspace` in struct `WorkspacesClientCreateOrUpdateResponse` -- New anonymous field `WorkspaceList` in struct `WorkspacesClientListByResourceGroupResponse` -- New field `PrivateEndpointConnections` in struct `HostPoolProperties` -- New field `AgentUpdate` in struct `HostPoolProperties` -- New anonymous field `ResourceProviderOperationList` in struct `OperationsClientListResponse` -- New anonymous field `MSIXPackage` in struct `MSIXPackagesClientUpdateResponse` -- New anonymous field `ApplicationGroup` in struct `ApplicationGroupsClientCreateOrUpdateResponse` -- New anonymous field `UserSession` in struct `UserSessionsClientGetResponse` -- New anonymous field `ApplicationGroupList` in struct `ApplicationGroupsClientListBySubscriptionResponse` -- New anonymous field `Desktop` in struct `DesktopsClientUpdateResponse` -- New anonymous field `PrivateEndpointConnectionWithSystemData` in struct `PrivateEndpointConnectionsClientGetByWorkspaceResponse` -- New field `PrivateEndpointConnections` in struct `WorkspaceProperties` -- New anonymous field `PrivateLinkResourceListResult` in struct `PrivateLinkResourcesClientListByWorkspaceResponse` -- New anonymous field `ScalingPlanList` in struct `ScalingPlansClientListBySubscriptionResponse` -- New anonymous field `PrivateEndpointConnectionListResultWithSystemData` in struct `PrivateEndpointConnectionsClientListByHostPoolResponse` -- New anonymous field `MSIXPackageList` in struct `MSIXPackagesClientListResponse` -- New anonymous field `HostPool` in struct `HostPoolsClientGetResponse` -- New field `FriendlyName` in struct `SessionHostPatchProperties` -- New anonymous field `HostPoolList` in struct `HostPoolsClientListResponse` -- New anonymous field `SessionHost` in struct `SessionHostsClientUpdateResponse` -- New anonymous field `Application` in struct `ApplicationsClientGetResponse` -- New anonymous field `MSIXPackage` in struct `MSIXPackagesClientGetResponse` -- New anonymous field `PrivateLinkResourceListResult` in struct `PrivateLinkResourcesClientListByHostPoolResponse` -- New anonymous field `ScalingPlan` in struct `ScalingPlansClientUpdateResponse` -- New anonymous field `ScalingPlan` in struct `ScalingPlansClientCreateResponse` -- New anonymous field `Desktop` in struct `DesktopsClientGetResponse` -- New anonymous field `UserSessionList` in struct `UserSessionsClientListByHostPoolResponse` -- New anonymous field `HostPool` in struct `HostPoolsClientUpdateResponse` -- New anonymous field `DesktopList` in struct `DesktopsClientListResponse` -- New anonymous field `Application` in struct `ApplicationsClientUpdateResponse` -- New anonymous field `HostPoolList` in struct `HostPoolsClientListByResourceGroupResponse` -- New anonymous field `ScalingPlanList` in struct `ScalingPlansClientListByResourceGroupResponse` -- New anonymous field `Workspace` in struct `WorkspacesClientGetResponse` -- New anonymous field `ScalingPlanList` in struct `ScalingPlansClientListByHostPoolResponse` -- New anonymous field `PrivateEndpointConnectionListResultWithSystemData` in struct `PrivateEndpointConnectionsClientListByWorkspaceResponse` -- New anonymous field `ApplicationGroup` in struct `ApplicationGroupsClientUpdateResponse` -- New anonymous field `Workspace` in struct `WorkspacesClientUpdateResponse` -- New anonymous field `SessionHost` in struct `SessionHostsClientGetResponse` -- New anonymous field `ExpandMsixImageList` in struct `MsixImagesClientExpandResponse` -- New anonymous field `HostPool` in struct `HostPoolsClientCreateOrUpdateResponse` -- New anonymous field `WorkspaceList` in struct `WorkspacesClientListBySubscriptionResponse` -- New anonymous field `PrivateEndpointConnectionWithSystemData` in struct `PrivateEndpointConnectionsClientGetByHostPoolResponse` -- New anonymous field `SessionHostList` in struct `SessionHostsClientListResponse` -- New field `AgentUpdate` in struct `HostPoolPatchProperties` -- New anonymous field `MSIXPackage` in struct `MSIXPackagesClientCreateOrUpdateResponse` -- New anonymous field `ApplicationGroupList` in struct `ApplicationGroupsClientListByResourceGroupResponse` -- New anonymous field `ApplicationList` in struct `ApplicationsClientListResponse` -- New anonymous field `Application` in struct `ApplicationsClientCreateOrUpdateResponse` -- New anonymous field `PrivateEndpointConnectionWithSystemData` in struct `PrivateEndpointConnectionsClientUpdateByWorkspaceResponse` -- New anonymous field `UserSessionList` in struct `UserSessionsClientListResponse` - - -## 0.2.1 (2022-02-22) - -### Other Changes - -- Remove the go_mod_tidy_hack.go file. - -## 0.2.0 (2022-01-13) -### Breaking Changes - -- Function `*PrivateEndpointConnectionsClient.DeleteByHostPool` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionsDeleteByHostPoolOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionsClientDeleteByHostPoolOptions)` -- Function `*PrivateEndpointConnectionsClient.DeleteByHostPool` return value(s) have been changed from `(PrivateEndpointConnectionsDeleteByHostPoolResponse, error)` to `(PrivateEndpointConnectionsClientDeleteByHostPoolResponse, error)` -- Function `*ScalingPlansClient.Update` parameter(s) have been changed from `(context.Context, string, string, *ScalingPlansUpdateOptions)` to `(context.Context, string, string, *ScalingPlansClientUpdateOptions)` -- Function `*ScalingPlansClient.Update` return value(s) have been changed from `(ScalingPlansUpdateResponse, error)` to `(ScalingPlansClientUpdateResponse, error)` -- Function `*PrivateEndpointConnectionsClient.UpdateByHostPool` parameter(s) have been changed from `(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsUpdateByHostPoolOptions)` to `(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsClientUpdateByHostPoolOptions)` -- Function `*PrivateEndpointConnectionsClient.UpdateByHostPool` return value(s) have been changed from `(PrivateEndpointConnectionsUpdateByHostPoolResponse, error)` to `(PrivateEndpointConnectionsClientUpdateByHostPoolResponse, error)` -- Function `*WorkspacesClient.ListBySubscription` parameter(s) have been changed from `(*WorkspacesListBySubscriptionOptions)` to `(*WorkspacesClientListBySubscriptionOptions)` -- Function `*WorkspacesClient.ListBySubscription` return value(s) have been changed from `(*WorkspacesListBySubscriptionPager)` to `(*WorkspacesClientListBySubscriptionPager)` -- Function `*PrivateLinkResourcesClient.ListByHostPool` parameter(s) have been changed from `(string, string, *PrivateLinkResourcesListByHostPoolOptions)` to `(string, string, *PrivateLinkResourcesClientListByHostPoolOptions)` -- Function `*PrivateLinkResourcesClient.ListByHostPool` return value(s) have been changed from `(*PrivateLinkResourcesListByHostPoolPager)` to `(*PrivateLinkResourcesClientListByHostPoolPager)` -- Function `*UserSessionsClient.Disconnect` parameter(s) have been changed from `(context.Context, string, string, string, string, *UserSessionsDisconnectOptions)` to `(context.Context, string, string, string, string, *UserSessionsClientDisconnectOptions)` -- Function `*UserSessionsClient.Disconnect` return value(s) have been changed from `(UserSessionsDisconnectResponse, error)` to `(UserSessionsClientDisconnectResponse, error)` -- Function `*MSIXPackagesClient.List` parameter(s) have been changed from `(string, string, *MSIXPackagesListOptions)` to `(string, string, *MSIXPackagesClientListOptions)` -- Function `*MSIXPackagesClient.List` return value(s) have been changed from `(*MSIXPackagesListPager)` to `(*MSIXPackagesClientListPager)` -- Function `*SessionHostsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, string, *SessionHostsDeleteOptions)` to `(context.Context, string, string, string, *SessionHostsClientDeleteOptions)` -- Function `*SessionHostsClient.Delete` return value(s) have been changed from `(SessionHostsDeleteResponse, error)` to `(SessionHostsClientDeleteResponse, error)` -- Function `*UserSessionsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *UserSessionsGetOptions)` to `(context.Context, string, string, string, string, *UserSessionsClientGetOptions)` -- Function `*UserSessionsClient.Get` return value(s) have been changed from `(UserSessionsGetResponse, error)` to `(UserSessionsClientGetResponse, error)` -- Function `*PrivateEndpointConnectionsClient.ListByHostPool` parameter(s) have been changed from `(string, string, *PrivateEndpointConnectionsListByHostPoolOptions)` to `(string, string, *PrivateEndpointConnectionsClientListByHostPoolOptions)` -- Function `*PrivateEndpointConnectionsClient.ListByHostPool` return value(s) have been changed from `(*PrivateEndpointConnectionsListByHostPoolPager)` to `(*PrivateEndpointConnectionsClientListByHostPoolPager)` -- Function `*ApplicationGroupsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ApplicationGroupsGetOptions)` to `(context.Context, string, string, *ApplicationGroupsClientGetOptions)` -- Function `*ApplicationGroupsClient.Get` return value(s) have been changed from `(ApplicationGroupsGetResponse, error)` to `(ApplicationGroupsClientGetResponse, error)` -- Function `*MSIXPackagesClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, MSIXPackage, *MSIXPackagesCreateOrUpdateOptions)` to `(context.Context, string, string, string, MSIXPackage, *MSIXPackagesClientCreateOrUpdateOptions)` -- Function `*MSIXPackagesClient.CreateOrUpdate` return value(s) have been changed from `(MSIXPackagesCreateOrUpdateResponse, error)` to `(MSIXPackagesClientCreateOrUpdateResponse, error)` -- Function `*HostPoolsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *HostPoolsDeleteOptions)` to `(context.Context, string, string, *HostPoolsClientDeleteOptions)` -- Function `*HostPoolsClient.Delete` return value(s) have been changed from `(HostPoolsDeleteResponse, error)` to `(HostPoolsClientDeleteResponse, error)` -- Function `*ScalingPlansClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ScalingPlansGetOptions)` to `(context.Context, string, string, *ScalingPlansClientGetOptions)` -- Function `*ScalingPlansClient.Get` return value(s) have been changed from `(ScalingPlansGetResponse, error)` to `(ScalingPlansClientGetResponse, error)` -- Function `*ApplicationGroupsClient.Update` parameter(s) have been changed from `(context.Context, string, string, *ApplicationGroupsUpdateOptions)` to `(context.Context, string, string, *ApplicationGroupsClientUpdateOptions)` -- Function `*ApplicationGroupsClient.Update` return value(s) have been changed from `(ApplicationGroupsUpdateResponse, error)` to `(ApplicationGroupsClientUpdateResponse, error)` -- Function `*PrivateEndpointConnectionsClient.ListByWorkspace` parameter(s) have been changed from `(string, string, *PrivateEndpointConnectionsListByWorkspaceOptions)` to `(string, string, *PrivateEndpointConnectionsClientListByWorkspaceOptions)` -- Function `*PrivateEndpointConnectionsClient.ListByWorkspace` return value(s) have been changed from `(*PrivateEndpointConnectionsListByWorkspacePager)` to `(*PrivateEndpointConnectionsClientListByWorkspacePager)` -- Function `*ApplicationGroupsClient.ListBySubscription` parameter(s) have been changed from `(*ApplicationGroupsListBySubscriptionOptions)` to `(*ApplicationGroupsClientListBySubscriptionOptions)` -- Function `*ApplicationGroupsClient.ListBySubscription` return value(s) have been changed from `(*ApplicationGroupsListBySubscriptionPager)` to `(*ApplicationGroupsClientListBySubscriptionPager)` -- Function `*WorkspacesClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *WorkspacesDeleteOptions)` to `(context.Context, string, string, *WorkspacesClientDeleteOptions)` -- Function `*WorkspacesClient.Delete` return value(s) have been changed from `(WorkspacesDeleteResponse, error)` to `(WorkspacesClientDeleteResponse, error)` -- Function `*SessionHostsClient.Update` parameter(s) have been changed from `(context.Context, string, string, string, *SessionHostsUpdateOptions)` to `(context.Context, string, string, string, *SessionHostsClientUpdateOptions)` -- Function `*SessionHostsClient.Update` return value(s) have been changed from `(SessionHostsUpdateResponse, error)` to `(SessionHostsClientUpdateResponse, error)` -- Function `*PrivateLinkResourcesClient.ListByWorkspace` parameter(s) have been changed from `(string, string, *PrivateLinkResourcesListByWorkspaceOptions)` to `(string, string, *PrivateLinkResourcesClientListByWorkspaceOptions)` -- Function `*PrivateLinkResourcesClient.ListByWorkspace` return value(s) have been changed from `(*PrivateLinkResourcesListByWorkspacePager)` to `(*PrivateLinkResourcesClientListByWorkspacePager)` -- Function `*WorkspacesClient.Get` parameter(s) have been changed from `(context.Context, string, string, *WorkspacesGetOptions)` to `(context.Context, string, string, *WorkspacesClientGetOptions)` -- Function `*WorkspacesClient.Get` return value(s) have been changed from `(WorkspacesGetResponse, error)` to `(WorkspacesClientGetResponse, error)` -- Function `*UserSessionsClient.ListByHostPool` parameter(s) have been changed from `(string, string, *UserSessionsListByHostPoolOptions)` to `(string, string, *UserSessionsClientListByHostPoolOptions)` -- Function `*UserSessionsClient.ListByHostPool` return value(s) have been changed from `(*UserSessionsListByHostPoolPager)` to `(*UserSessionsClientListByHostPoolPager)` -- Function `*PrivateEndpointConnectionsClient.GetByHostPool` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionsGetByHostPoolOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionsClientGetByHostPoolOptions)` -- Function `*PrivateEndpointConnectionsClient.GetByHostPool` return value(s) have been changed from `(PrivateEndpointConnectionsGetByHostPoolResponse, error)` to `(PrivateEndpointConnectionsClientGetByHostPoolResponse, error)` -- Function `*UserSessionsClient.List` parameter(s) have been changed from `(string, string, string, *UserSessionsListOptions)` to `(string, string, string, *UserSessionsClientListOptions)` -- Function `*UserSessionsClient.List` return value(s) have been changed from `(*UserSessionsListPager)` to `(*UserSessionsClientListPager)` -- Function `*HostPoolsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *HostPoolsGetOptions)` to `(context.Context, string, string, *HostPoolsClientGetOptions)` -- Function `*HostPoolsClient.Get` return value(s) have been changed from `(HostPoolsGetResponse, error)` to `(HostPoolsClientGetResponse, error)` -- Function `*HostPoolsClient.Update` parameter(s) have been changed from `(context.Context, string, string, *HostPoolsUpdateOptions)` to `(context.Context, string, string, *HostPoolsClientUpdateOptions)` -- Function `*HostPoolsClient.Update` return value(s) have been changed from `(HostPoolsUpdateResponse, error)` to `(HostPoolsClientUpdateResponse, error)` -- Function `*ApplicationsClient.List` parameter(s) have been changed from `(string, string, *ApplicationsListOptions)` to `(string, string, *ApplicationsClientListOptions)` -- Function `*ApplicationsClient.List` return value(s) have been changed from `(*ApplicationsListPager)` to `(*ApplicationsClientListPager)` -- Function `*HostPoolsClient.List` parameter(s) have been changed from `(*HostPoolsListOptions)` to `(*HostPoolsClientListOptions)` -- Function `*HostPoolsClient.List` return value(s) have been changed from `(*HostPoolsListPager)` to `(*HostPoolsClientListPager)` -- Function `*WorkspacesClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, Workspace, *WorkspacesCreateOrUpdateOptions)` to `(context.Context, string, string, Workspace, *WorkspacesClientCreateOrUpdateOptions)` -- Function `*WorkspacesClient.CreateOrUpdate` return value(s) have been changed from `(WorkspacesCreateOrUpdateResponse, error)` to `(WorkspacesClientCreateOrUpdateResponse, error)` -- Function `*ApplicationGroupsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *ApplicationGroupsDeleteOptions)` to `(context.Context, string, string, *ApplicationGroupsClientDeleteOptions)` -- Function `*ApplicationGroupsClient.Delete` return value(s) have been changed from `(ApplicationGroupsDeleteResponse, error)` to `(ApplicationGroupsClientDeleteResponse, error)` -- Function `*ApplicationGroupsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *ApplicationGroupsListByResourceGroupOptions)` to `(string, *ApplicationGroupsClientListByResourceGroupOptions)` -- Function `*ApplicationGroupsClient.ListByResourceGroup` return value(s) have been changed from `(*ApplicationGroupsListByResourceGroupPager)` to `(*ApplicationGroupsClientListByResourceGroupPager)` -- Function `*WorkspacesClient.Update` parameter(s) have been changed from `(context.Context, string, string, *WorkspacesUpdateOptions)` to `(context.Context, string, string, *WorkspacesClientUpdateOptions)` -- Function `*WorkspacesClient.Update` return value(s) have been changed from `(WorkspacesUpdateResponse, error)` to `(WorkspacesClientUpdateResponse, error)` -- Function `*MSIXPackagesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *MSIXPackagesGetOptions)` to `(context.Context, string, string, string, *MSIXPackagesClientGetOptions)` -- Function `*MSIXPackagesClient.Get` return value(s) have been changed from `(MSIXPackagesGetResponse, error)` to `(MSIXPackagesClientGetResponse, error)` -- Function `*DesktopsClient.List` parameter(s) have been changed from `(string, string, *DesktopsListOptions)` to `(string, string, *DesktopsClientListOptions)` -- Function `*DesktopsClient.List` return value(s) have been changed from `(*DesktopsListPager)` to `(*DesktopsClientListPager)` -- Function `*ApplicationsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ApplicationsGetOptions)` to `(context.Context, string, string, string, *ApplicationsClientGetOptions)` -- Function `*ApplicationsClient.Get` return value(s) have been changed from `(ApplicationsGetResponse, error)` to `(ApplicationsClientGetResponse, error)` -- Function `*HostPoolsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *HostPoolsListByResourceGroupOptions)` to `(string, *HostPoolsClientListByResourceGroupOptions)` -- Function `*HostPoolsClient.ListByResourceGroup` return value(s) have been changed from `(*HostPoolsListByResourceGroupPager)` to `(*HostPoolsClientListByResourceGroupPager)` -- Function `*UserSessionsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, string, string, *UserSessionsDeleteOptions)` to `(context.Context, string, string, string, string, *UserSessionsClientDeleteOptions)` -- Function `*UserSessionsClient.Delete` return value(s) have been changed from `(UserSessionsDeleteResponse, error)` to `(UserSessionsClientDeleteResponse, error)` -- Function `*MSIXPackagesClient.Delete` parameter(s) have been changed from `(context.Context, string, string, string, *MSIXPackagesDeleteOptions)` to `(context.Context, string, string, string, *MSIXPackagesClientDeleteOptions)` -- Function `*MSIXPackagesClient.Delete` return value(s) have been changed from `(MSIXPackagesDeleteResponse, error)` to `(MSIXPackagesClientDeleteResponse, error)` -- Function `*ScalingPlansClient.Create` parameter(s) have been changed from `(context.Context, string, string, ScalingPlan, *ScalingPlansCreateOptions)` to `(context.Context, string, string, ScalingPlan, *ScalingPlansClientCreateOptions)` -- Function `*ScalingPlansClient.Create` return value(s) have been changed from `(ScalingPlansCreateResponse, error)` to `(ScalingPlansClientCreateResponse, error)` -- Function `*SessionHostsClient.List` parameter(s) have been changed from `(string, string, *SessionHostsListOptions)` to `(string, string, *SessionHostsClientListOptions)` -- Function `*SessionHostsClient.List` return value(s) have been changed from `(*SessionHostsListPager)` to `(*SessionHostsClientListPager)` -- Function `*WorkspacesClient.ListByResourceGroup` parameter(s) have been changed from `(string, *WorkspacesListByResourceGroupOptions)` to `(string, *WorkspacesClientListByResourceGroupOptions)` -- Function `*WorkspacesClient.ListByResourceGroup` return value(s) have been changed from `(*WorkspacesListByResourceGroupPager)` to `(*WorkspacesClientListByResourceGroupPager)` -- Function `*ScalingPlansClient.ListBySubscription` parameter(s) have been changed from `(*ScalingPlansListBySubscriptionOptions)` to `(*ScalingPlansClientListBySubscriptionOptions)` -- Function `*ScalingPlansClient.ListBySubscription` return value(s) have been changed from `(*ScalingPlansListBySubscriptionPager)` to `(*ScalingPlansClientListBySubscriptionPager)` -- Function `*ApplicationsClient.Update` parameter(s) have been changed from `(context.Context, string, string, string, *ApplicationsUpdateOptions)` to `(context.Context, string, string, string, *ApplicationsClientUpdateOptions)` -- Function `*ApplicationsClient.Update` return value(s) have been changed from `(ApplicationsUpdateResponse, error)` to `(ApplicationsClientUpdateResponse, error)` -- Function `*ScalingPlansClient.ListByHostPool` parameter(s) have been changed from `(string, string, *ScalingPlansListByHostPoolOptions)` to `(string, string, *ScalingPlansClientListByHostPoolOptions)` -- Function `*ScalingPlansClient.ListByHostPool` return value(s) have been changed from `(*ScalingPlansListByHostPoolPager)` to `(*ScalingPlansClientListByHostPoolPager)` -- Function `*MsixImagesClient.Expand` parameter(s) have been changed from `(string, string, MSIXImageURI, *MsixImagesExpandOptions)` to `(string, string, MSIXImageURI, *MsixImagesClientExpandOptions)` -- Function `*MsixImagesClient.Expand` return value(s) have been changed from `(*MsixImagesExpandPager)` to `(*MsixImagesClientExpandPager)` -- Function `*HostPoolsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, HostPool, *HostPoolsCreateOrUpdateOptions)` to `(context.Context, string, string, HostPool, *HostPoolsClientCreateOrUpdateOptions)` -- Function `*HostPoolsClient.CreateOrUpdate` return value(s) have been changed from `(HostPoolsCreateOrUpdateResponse, error)` to `(HostPoolsClientCreateOrUpdateResponse, error)` -- Function `*ApplicationGroupsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, ApplicationGroup, *ApplicationGroupsCreateOrUpdateOptions)` to `(context.Context, string, string, ApplicationGroup, *ApplicationGroupsClientCreateOrUpdateOptions)` -- Function `*ApplicationGroupsClient.CreateOrUpdate` return value(s) have been changed from `(ApplicationGroupsCreateOrUpdateResponse, error)` to `(ApplicationGroupsClientCreateOrUpdateResponse, error)` -- Function `*ApplicationsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, Application, *ApplicationsCreateOrUpdateOptions)` to `(context.Context, string, string, string, Application, *ApplicationsClientCreateOrUpdateOptions)` -- Function `*ApplicationsClient.CreateOrUpdate` return value(s) have been changed from `(ApplicationsCreateOrUpdateResponse, error)` to `(ApplicationsClientCreateOrUpdateResponse, error)` -- Function `*PrivateEndpointConnectionsClient.GetByWorkspace` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionsGetByWorkspaceOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionsClientGetByWorkspaceOptions)` -- Function `*PrivateEndpointConnectionsClient.GetByWorkspace` return value(s) have been changed from `(PrivateEndpointConnectionsGetByWorkspaceResponse, error)` to `(PrivateEndpointConnectionsClientGetByWorkspaceResponse, error)` -- Function `*OperationsClient.List` parameter(s) have been changed from `(*OperationsListOptions)` to `(*OperationsClientListOptions)` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsListPager)` to `(*OperationsClientListPager)` -- Function `*HostPoolsClient.RetrieveRegistrationToken` parameter(s) have been changed from `(context.Context, string, string, *HostPoolsRetrieveRegistrationTokenOptions)` to `(context.Context, string, string, *HostPoolsClientRetrieveRegistrationTokenOptions)` -- Function `*HostPoolsClient.RetrieveRegistrationToken` return value(s) have been changed from `(HostPoolsRetrieveRegistrationTokenResponse, error)` to `(HostPoolsClientRetrieveRegistrationTokenResponse, error)` -- Function `*StartMenuItemsClient.List` parameter(s) have been changed from `(string, string, *StartMenuItemsListOptions)` to `(string, string, *StartMenuItemsClientListOptions)` -- Function `*StartMenuItemsClient.List` return value(s) have been changed from `(*StartMenuItemsListPager)` to `(*StartMenuItemsClientListPager)` -- Function `*ApplicationsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, string, *ApplicationsDeleteOptions)` to `(context.Context, string, string, string, *ApplicationsClientDeleteOptions)` -- Function `*ApplicationsClient.Delete` return value(s) have been changed from `(ApplicationsDeleteResponse, error)` to `(ApplicationsClientDeleteResponse, error)` -- Function `*PrivateEndpointConnectionsClient.UpdateByWorkspace` parameter(s) have been changed from `(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsUpdateByWorkspaceOptions)` to `(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsClientUpdateByWorkspaceOptions)` -- Function `*PrivateEndpointConnectionsClient.UpdateByWorkspace` return value(s) have been changed from `(PrivateEndpointConnectionsUpdateByWorkspaceResponse, error)` to `(PrivateEndpointConnectionsClientUpdateByWorkspaceResponse, error)` -- Function `*PrivateEndpointConnectionsClient.DeleteByWorkspace` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionsDeleteByWorkspaceOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionsClientDeleteByWorkspaceOptions)` -- Function `*PrivateEndpointConnectionsClient.DeleteByWorkspace` return value(s) have been changed from `(PrivateEndpointConnectionsDeleteByWorkspaceResponse, error)` to `(PrivateEndpointConnectionsClientDeleteByWorkspaceResponse, error)` -- Function `*DesktopsClient.Update` parameter(s) have been changed from `(context.Context, string, string, string, *DesktopsUpdateOptions)` to `(context.Context, string, string, string, *DesktopsClientUpdateOptions)` -- Function `*DesktopsClient.Update` return value(s) have been changed from `(DesktopsUpdateResponse, error)` to `(DesktopsClientUpdateResponse, error)` -- Function `*ScalingPlansClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *ScalingPlansDeleteOptions)` to `(context.Context, string, string, *ScalingPlansClientDeleteOptions)` -- Function `*ScalingPlansClient.Delete` return value(s) have been changed from `(ScalingPlansDeleteResponse, error)` to `(ScalingPlansClientDeleteResponse, error)` -- Function `*UserSessionsClient.SendMessage` parameter(s) have been changed from `(context.Context, string, string, string, string, *UserSessionsSendMessageOptions)` to `(context.Context, string, string, string, string, *UserSessionsClientSendMessageOptions)` -- Function `*UserSessionsClient.SendMessage` return value(s) have been changed from `(UserSessionsSendMessageResponse, error)` to `(UserSessionsClientSendMessageResponse, error)` -- Function `*SessionHostsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *SessionHostsGetOptions)` to `(context.Context, string, string, string, *SessionHostsClientGetOptions)` -- Function `*SessionHostsClient.Get` return value(s) have been changed from `(SessionHostsGetResponse, error)` to `(SessionHostsClientGetResponse, error)` -- Function `*DesktopsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *DesktopsGetOptions)` to `(context.Context, string, string, string, *DesktopsClientGetOptions)` -- Function `*DesktopsClient.Get` return value(s) have been changed from `(DesktopsGetResponse, error)` to `(DesktopsClientGetResponse, error)` -- Function `*MSIXPackagesClient.Update` parameter(s) have been changed from `(context.Context, string, string, string, *MSIXPackagesUpdateOptions)` to `(context.Context, string, string, string, *MSIXPackagesClientUpdateOptions)` -- Function `*MSIXPackagesClient.Update` return value(s) have been changed from `(MSIXPackagesUpdateResponse, error)` to `(MSIXPackagesClientUpdateResponse, error)` -- Function `*ScalingPlansClient.ListByResourceGroup` parameter(s) have been changed from `(string, *ScalingPlansListByResourceGroupOptions)` to `(string, *ScalingPlansClientListByResourceGroupOptions)` -- Function `*ScalingPlansClient.ListByResourceGroup` return value(s) have been changed from `(*ScalingPlansListByResourceGroupPager)` to `(*ScalingPlansClientListByResourceGroupPager)` -- Function `*HostPoolsListByResourceGroupPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsListByHostPoolPager.NextPage` has been removed -- Function `*ApplicationsListPager.PageResponse` has been removed -- Function `*ApplicationGroupsListBySubscriptionPager.PageResponse` has been removed -- Function `*MSIXPackagesListPager.PageResponse` has been removed -- Function `*ScalingPlansListByHostPoolPager.PageResponse` has been removed -- Function `*WorkspacesListByResourceGroupPager.NextPage` has been removed -- Function `*HostPoolsListByResourceGroupPager.Err` has been removed -- Function `*ScalingPlansListByResourceGroupPager.PageResponse` has been removed -- Function `StartMenuItem.MarshalJSON` has been removed -- Function `*StartMenuItemsListPager.Err` has been removed -- Function `CloudError.Error` has been removed -- Function `*WorkspacesListBySubscriptionPager.PageResponse` has been removed -- Function `ExpandMsixImage.MarshalJSON` has been removed -- Function `MSIXPackage.MarshalJSON` has been removed -- Function `*PrivateEndpointConnectionsListByWorkspacePager.Err` has been removed -- Function `*SessionHostsListPager.Err` has been removed -- Function `*PrivateLinkResourcesListByWorkspacePager.NextPage` has been removed -- Function `*SessionHostsListPager.PageResponse` has been removed -- Function `*DesktopsListPager.PageResponse` has been removed -- Function `*PrivateLinkResourcesListByWorkspacePager.PageResponse` has been removed -- Function `*WorkspacesListBySubscriptionPager.NextPage` has been removed -- Function `*ApplicationGroupsListBySubscriptionPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsListByWorkspacePager.PageResponse` has been removed -- Function `*PrivateLinkResourcesListByHostPoolPager.NextPage` has been removed -- Function `PrivateEndpointConnection.MarshalJSON` has been removed -- Function `*ScalingPlansListByResourceGroupPager.NextPage` has been removed -- Function `*ApplicationsListPager.Err` has been removed -- Function `*UserSessionsListByHostPoolPager.PageResponse` has been removed -- Function `*UserSessionsListByHostPoolPager.NextPage` has been removed -- Function `*ScalingPlansListBySubscriptionPager.Err` has been removed -- Function `Resource.MarshalJSON` has been removed -- Function `*PrivateLinkResourcesListByHostPoolPager.Err` has been removed -- Function `*WorkspacesListByResourceGroupPager.PageResponse` has been removed -- Function `*OperationsListPager.NextPage` has been removed -- Function `*ScalingPlansListByHostPoolPager.Err` has been removed -- Function `*MsixImagesExpandPager.Err` has been removed -- Function `Desktop.MarshalJSON` has been removed -- Function `*ApplicationGroupsListByResourceGroupPager.NextPage` has been removed -- Function `*MsixImagesExpandPager.NextPage` has been removed -- Function `*HostPoolsListPager.PageResponse` has been removed -- Function `PrivateLinkResource.MarshalJSON` has been removed -- Function `Application.MarshalJSON` has been removed -- Function `PrivateEndpointConnectionWithSystemData.MarshalJSON` has been removed -- Function `*HostPoolsListPager.Err` has been removed -- Function `*ScalingPlansListBySubscriptionPager.PageResponse` has been removed -- Function `UserSession.MarshalJSON` has been removed -- Function `*ApplicationGroupsListByResourceGroupPager.Err` has been removed -- Function `*StartMenuItemsListPager.PageResponse` has been removed -- Function `*DesktopsListPager.Err` has been removed -- Function `*MSIXPackagesListPager.NextPage` has been removed -- Function `*OperationsListPager.PageResponse` has been removed -- Function `*ApplicationGroupsListBySubscriptionPager.Err` has been removed -- Function `*PrivateEndpointConnectionsListByHostPoolPager.PageResponse` has been removed -- Function `*HostPoolsListByResourceGroupPager.PageResponse` has been removed -- Function `*MSIXPackagesListPager.Err` has been removed -- Function `*PrivateLinkResourcesListByWorkspacePager.Err` has been removed -- Function `*SessionHostsListPager.NextPage` has been removed -- Function `SessionHost.MarshalJSON` has been removed -- Function `*HostPoolsListPager.NextPage` has been removed -- Function `*ApplicationGroupsListByResourceGroupPager.PageResponse` has been removed -- Function `*UserSessionsListPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsListByHostPoolPager.Err` has been removed -- Function `*UserSessionsListByHostPoolPager.Err` has been removed -- Function `*ApplicationsListPager.NextPage` has been removed -- Function `*StartMenuItemsListPager.NextPage` has been removed -- Function `*MsixImagesExpandPager.PageResponse` has been removed -- Function `*WorkspacesListBySubscriptionPager.Err` has been removed -- Function `*UserSessionsListPager.PageResponse` has been removed -- Function `*ScalingPlansListByHostPoolPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsListByWorkspacePager.NextPage` has been removed -- Function `*PrivateLinkResourcesListByHostPoolPager.PageResponse` has been removed -- Function `*OperationsListPager.Err` has been removed -- Function `*ScalingPlansListBySubscriptionPager.NextPage` has been removed -- Function `*DesktopsListPager.NextPage` has been removed -- Function `*ScalingPlansListByResourceGroupPager.Err` has been removed -- Function `*WorkspacesListByResourceGroupPager.Err` has been removed -- Function `*UserSessionsListPager.Err` has been removed -- Struct `ApplicationGroupsCreateOrUpdateOptions` has been removed -- Struct `ApplicationGroupsCreateOrUpdateResponse` has been removed -- Struct `ApplicationGroupsCreateOrUpdateResult` has been removed -- Struct `ApplicationGroupsDeleteOptions` has been removed -- Struct `ApplicationGroupsDeleteResponse` has been removed -- Struct `ApplicationGroupsGetOptions` has been removed -- Struct `ApplicationGroupsGetResponse` has been removed -- Struct `ApplicationGroupsGetResult` has been removed -- Struct `ApplicationGroupsListByResourceGroupOptions` has been removed -- Struct `ApplicationGroupsListByResourceGroupPager` has been removed -- Struct `ApplicationGroupsListByResourceGroupResponse` has been removed -- Struct `ApplicationGroupsListByResourceGroupResult` has been removed -- Struct `ApplicationGroupsListBySubscriptionOptions` has been removed -- Struct `ApplicationGroupsListBySubscriptionPager` has been removed -- Struct `ApplicationGroupsListBySubscriptionResponse` has been removed -- Struct `ApplicationGroupsListBySubscriptionResult` has been removed -- Struct `ApplicationGroupsUpdateOptions` has been removed -- Struct `ApplicationGroupsUpdateResponse` has been removed -- Struct `ApplicationGroupsUpdateResult` has been removed -- Struct `ApplicationsCreateOrUpdateOptions` has been removed -- Struct `ApplicationsCreateOrUpdateResponse` has been removed -- Struct `ApplicationsCreateOrUpdateResult` has been removed -- Struct `ApplicationsDeleteOptions` has been removed -- Struct `ApplicationsDeleteResponse` has been removed -- Struct `ApplicationsGetOptions` has been removed -- Struct `ApplicationsGetResponse` has been removed -- Struct `ApplicationsGetResult` has been removed -- Struct `ApplicationsListOptions` has been removed -- Struct `ApplicationsListPager` has been removed -- Struct `ApplicationsListResponse` has been removed -- Struct `ApplicationsListResult` has been removed -- Struct `ApplicationsUpdateOptions` has been removed -- Struct `ApplicationsUpdateResponse` has been removed -- Struct `ApplicationsUpdateResult` has been removed -- Struct `DesktopsGetOptions` has been removed -- Struct `DesktopsGetResponse` has been removed -- Struct `DesktopsGetResult` has been removed -- Struct `DesktopsListOptions` has been removed -- Struct `DesktopsListPager` has been removed -- Struct `DesktopsListResponse` has been removed -- Struct `DesktopsListResult` has been removed -- Struct `DesktopsUpdateOptions` has been removed -- Struct `DesktopsUpdateResponse` has been removed -- Struct `DesktopsUpdateResult` has been removed -- Struct `HostPoolsCreateOrUpdateOptions` has been removed -- Struct `HostPoolsCreateOrUpdateResponse` has been removed -- Struct `HostPoolsCreateOrUpdateResult` has been removed -- Struct `HostPoolsDeleteOptions` has been removed -- Struct `HostPoolsDeleteResponse` has been removed -- Struct `HostPoolsGetOptions` has been removed -- Struct `HostPoolsGetResponse` has been removed -- Struct `HostPoolsGetResult` has been removed -- Struct `HostPoolsListByResourceGroupOptions` has been removed -- Struct `HostPoolsListByResourceGroupPager` has been removed -- Struct `HostPoolsListByResourceGroupResponse` has been removed -- Struct `HostPoolsListByResourceGroupResult` has been removed -- Struct `HostPoolsListOptions` has been removed -- Struct `HostPoolsListPager` has been removed -- Struct `HostPoolsListResponse` has been removed -- Struct `HostPoolsListResult` has been removed -- Struct `HostPoolsRetrieveRegistrationTokenOptions` has been removed -- Struct `HostPoolsRetrieveRegistrationTokenResponse` has been removed -- Struct `HostPoolsRetrieveRegistrationTokenResult` has been removed -- Struct `HostPoolsUpdateOptions` has been removed -- Struct `HostPoolsUpdateResponse` has been removed -- Struct `HostPoolsUpdateResult` has been removed -- Struct `MSIXPackagesCreateOrUpdateOptions` has been removed -- Struct `MSIXPackagesCreateOrUpdateResponse` has been removed -- Struct `MSIXPackagesCreateOrUpdateResult` has been removed -- Struct `MSIXPackagesDeleteOptions` has been removed -- Struct `MSIXPackagesDeleteResponse` has been removed -- Struct `MSIXPackagesGetOptions` has been removed -- Struct `MSIXPackagesGetResponse` has been removed -- Struct `MSIXPackagesGetResult` has been removed -- Struct `MSIXPackagesListOptions` has been removed -- Struct `MSIXPackagesListPager` has been removed -- Struct `MSIXPackagesListResponse` has been removed -- Struct `MSIXPackagesListResult` has been removed -- Struct `MSIXPackagesUpdateOptions` has been removed -- Struct `MSIXPackagesUpdateResponse` has been removed -- Struct `MSIXPackagesUpdateResult` has been removed -- Struct `MsixImagesExpandOptions` has been removed -- Struct `MsixImagesExpandPager` has been removed -- Struct `MsixImagesExpandResponse` has been removed -- Struct `MsixImagesExpandResult` has been removed -- Struct `OperationsListOptions` has been removed -- Struct `OperationsListPager` has been removed -- Struct `OperationsListResponse` has been removed -- Struct `OperationsListResult` has been removed -- Struct `PrivateEndpointConnectionsDeleteByHostPoolOptions` has been removed -- Struct `PrivateEndpointConnectionsDeleteByHostPoolResponse` has been removed -- Struct `PrivateEndpointConnectionsDeleteByWorkspaceOptions` has been removed -- Struct `PrivateEndpointConnectionsDeleteByWorkspaceResponse` has been removed -- Struct `PrivateEndpointConnectionsGetByHostPoolOptions` has been removed -- Struct `PrivateEndpointConnectionsGetByHostPoolResponse` has been removed -- Struct `PrivateEndpointConnectionsGetByHostPoolResult` has been removed -- Struct `PrivateEndpointConnectionsGetByWorkspaceOptions` has been removed -- Struct `PrivateEndpointConnectionsGetByWorkspaceResponse` has been removed -- Struct `PrivateEndpointConnectionsGetByWorkspaceResult` has been removed -- Struct `PrivateEndpointConnectionsListByHostPoolOptions` has been removed -- Struct `PrivateEndpointConnectionsListByHostPoolPager` has been removed -- Struct `PrivateEndpointConnectionsListByHostPoolResponse` has been removed -- Struct `PrivateEndpointConnectionsListByHostPoolResult` has been removed -- Struct `PrivateEndpointConnectionsListByWorkspaceOptions` has been removed -- Struct `PrivateEndpointConnectionsListByWorkspacePager` has been removed -- Struct `PrivateEndpointConnectionsListByWorkspaceResponse` has been removed -- Struct `PrivateEndpointConnectionsListByWorkspaceResult` has been removed -- Struct `PrivateEndpointConnectionsUpdateByHostPoolOptions` has been removed -- Struct `PrivateEndpointConnectionsUpdateByHostPoolResponse` has been removed -- Struct `PrivateEndpointConnectionsUpdateByHostPoolResult` has been removed -- Struct `PrivateEndpointConnectionsUpdateByWorkspaceOptions` has been removed -- Struct `PrivateEndpointConnectionsUpdateByWorkspaceResponse` has been removed -- Struct `PrivateEndpointConnectionsUpdateByWorkspaceResult` has been removed -- Struct `PrivateLinkResourcesListByHostPoolOptions` has been removed -- Struct `PrivateLinkResourcesListByHostPoolPager` has been removed -- Struct `PrivateLinkResourcesListByHostPoolResponse` has been removed -- Struct `PrivateLinkResourcesListByHostPoolResult` has been removed -- Struct `PrivateLinkResourcesListByWorkspaceOptions` has been removed -- Struct `PrivateLinkResourcesListByWorkspacePager` has been removed -- Struct `PrivateLinkResourcesListByWorkspaceResponse` has been removed -- Struct `PrivateLinkResourcesListByWorkspaceResult` has been removed -- Struct `ScalingPlansCreateOptions` has been removed -- Struct `ScalingPlansCreateResponse` has been removed -- Struct `ScalingPlansCreateResult` has been removed -- Struct `ScalingPlansDeleteOptions` has been removed -- Struct `ScalingPlansDeleteResponse` has been removed -- Struct `ScalingPlansGetOptions` has been removed -- Struct `ScalingPlansGetResponse` has been removed -- Struct `ScalingPlansGetResult` has been removed -- Struct `ScalingPlansListByHostPoolOptions` has been removed -- Struct `ScalingPlansListByHostPoolPager` has been removed -- Struct `ScalingPlansListByHostPoolResponse` has been removed -- Struct `ScalingPlansListByHostPoolResult` has been removed -- Struct `ScalingPlansListByResourceGroupOptions` has been removed -- Struct `ScalingPlansListByResourceGroupPager` has been removed -- Struct `ScalingPlansListByResourceGroupResponse` has been removed -- Struct `ScalingPlansListByResourceGroupResult` has been removed -- Struct `ScalingPlansListBySubscriptionOptions` has been removed -- Struct `ScalingPlansListBySubscriptionPager` has been removed -- Struct `ScalingPlansListBySubscriptionResponse` has been removed -- Struct `ScalingPlansListBySubscriptionResult` has been removed -- Struct `ScalingPlansUpdateOptions` has been removed -- Struct `ScalingPlansUpdateResponse` has been removed -- Struct `ScalingPlansUpdateResult` has been removed -- Struct `SessionHostsDeleteOptions` has been removed -- Struct `SessionHostsDeleteResponse` has been removed -- Struct `SessionHostsGetOptions` has been removed -- Struct `SessionHostsGetResponse` has been removed -- Struct `SessionHostsGetResult` has been removed -- Struct `SessionHostsListOptions` has been removed -- Struct `SessionHostsListPager` has been removed -- Struct `SessionHostsListResponse` has been removed -- Struct `SessionHostsListResult` has been removed -- Struct `SessionHostsUpdateOptions` has been removed -- Struct `SessionHostsUpdateResponse` has been removed -- Struct `SessionHostsUpdateResult` has been removed -- Struct `StartMenuItemsListOptions` has been removed -- Struct `StartMenuItemsListPager` has been removed -- Struct `StartMenuItemsListResponse` has been removed -- Struct `StartMenuItemsListResult` has been removed -- Struct `UserSessionsDeleteOptions` has been removed -- Struct `UserSessionsDeleteResponse` has been removed -- Struct `UserSessionsDisconnectOptions` has been removed -- Struct `UserSessionsDisconnectResponse` has been removed -- Struct `UserSessionsGetOptions` has been removed -- Struct `UserSessionsGetResponse` has been removed -- Struct `UserSessionsGetResult` has been removed -- Struct `UserSessionsListByHostPoolOptions` has been removed -- Struct `UserSessionsListByHostPoolPager` has been removed -- Struct `UserSessionsListByHostPoolResponse` has been removed -- Struct `UserSessionsListByHostPoolResult` has been removed -- Struct `UserSessionsListOptions` has been removed -- Struct `UserSessionsListPager` has been removed -- Struct `UserSessionsListResponse` has been removed -- Struct `UserSessionsListResult` has been removed -- Struct `UserSessionsSendMessageOptions` has been removed -- Struct `UserSessionsSendMessageResponse` has been removed -- Struct `WorkspacesCreateOrUpdateOptions` has been removed -- Struct `WorkspacesCreateOrUpdateResponse` has been removed -- Struct `WorkspacesCreateOrUpdateResult` has been removed -- Struct `WorkspacesDeleteOptions` has been removed -- Struct `WorkspacesDeleteResponse` has been removed -- Struct `WorkspacesGetOptions` has been removed -- Struct `WorkspacesGetResponse` has been removed -- Struct `WorkspacesGetResult` has been removed -- Struct `WorkspacesListByResourceGroupOptions` has been removed -- Struct `WorkspacesListByResourceGroupPager` has been removed -- Struct `WorkspacesListByResourceGroupResponse` has been removed -- Struct `WorkspacesListByResourceGroupResult` has been removed -- Struct `WorkspacesListBySubscriptionOptions` has been removed -- Struct `WorkspacesListBySubscriptionPager` has been removed -- Struct `WorkspacesListBySubscriptionResponse` has been removed -- Struct `WorkspacesListBySubscriptionResult` has been removed -- Struct `WorkspacesUpdateOptions` has been removed -- Struct `WorkspacesUpdateResponse` has been removed -- Struct `WorkspacesUpdateResult` has been removed -- Field `Resource` of struct `PrivateLinkResource` has been removed -- Field `Resource` of struct `ApplicationGroupPatch` has been removed -- Field `Plan` of struct `ResourceModelWithAllowedPropertySetPlan` has been removed -- Field `InnerError` of struct `CloudError` has been removed -- Field `ResourceModelWithAllowedPropertySet` of struct `Workspace` has been removed -- Field `Resource` of struct `Desktop` has been removed -- Field `Resource` of struct `HostPoolPatch` has been removed -- Field `Resource` of struct `StartMenuItem` has been removed -- Field `Resource` of struct `MSIXPackagePatch` has been removed -- Field `SKU` of struct `ResourceModelWithAllowedPropertySetSKU` has been removed -- Field `ResourceModelWithAllowedPropertySet` of struct `ApplicationGroup` has been removed -- Field `Resource` of struct `ExpandMsixImage` has been removed -- Field `Resource` of struct `UserSession` has been removed -- Field `PrivateEndpointConnection` of struct `PrivateEndpointConnectionWithSystemData` has been removed -- Field `ResourceModelWithAllowedPropertySet` of struct `ScalingPlan` has been removed -- Field `ResourceModelWithAllowedPropertySet` of struct `HostPool` has been removed -- Field `Resource` of struct `PrivateEndpointConnection` has been removed -- Field `Resource` of struct `Application` has been removed -- Field `Identity` of struct `ResourceModelWithAllowedPropertySetIdentity` has been removed -- Field `Resource` of struct `MSIXPackage` has been removed -- Field `Resource` of struct `SessionHostPatch` has been removed -- Field `Resource` of struct `SessionHost` has been removed - -### Features Added - -- New function `*OperationsClientListPager.PageResponse() OperationsClientListResponse` -- New function `*ApplicationGroupsClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*PrivateLinkResourcesClientListByWorkspacePager.Err() error` -- New function `*ScalingPlansClientListBySubscriptionPager.PageResponse() ScalingPlansClientListBySubscriptionResponse` -- New function `*ApplicationGroupsClientListBySubscriptionPager.Err() error` -- New function `*DesktopsClientListPager.PageResponse() DesktopsClientListResponse` -- New function `*PrivateLinkResourcesClientListByWorkspacePager.PageResponse() PrivateLinkResourcesClientListByWorkspaceResponse` -- New function `*ApplicationGroupsClientListBySubscriptionPager.PageResponse() ApplicationGroupsClientListBySubscriptionResponse` -- New function `*WorkspacesClientListBySubscriptionPager.PageResponse() WorkspacesClientListBySubscriptionResponse` -- New function `*HostPoolsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*WorkspacesClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*SessionHostsClientListPager.Err() error` -- New function `*PrivateEndpointConnectionsClientListByWorkspacePager.Err() error` -- New function `*UserSessionsClientListByHostPoolPager.Err() error` -- New function `*MsixImagesClientExpandPager.NextPage(context.Context) bool` -- New function `*UserSessionsClientListByHostPoolPager.PageResponse() UserSessionsClientListByHostPoolResponse` -- New function `*ScalingPlansClientListBySubscriptionPager.Err() error` -- New function `*HostPoolsClientListByResourceGroupPager.PageResponse() HostPoolsClientListByResourceGroupResponse` -- New function `*ApplicationsClientListPager.NextPage(context.Context) bool` -- New function `*PrivateEndpointConnectionsClientListByWorkspacePager.NextPage(context.Context) bool` -- New function `*HostPoolsClientListPager.PageResponse() HostPoolsClientListResponse` -- New function `*ScalingPlansClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*StartMenuItemsClientListPager.NextPage(context.Context) bool` -- New function `*ApplicationGroupsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*HostPoolsClientListPager.Err() error` -- New function `*SessionHostsClientListPager.NextPage(context.Context) bool` -- New function `*WorkspacesClientListByResourceGroupPager.Err() error` -- New function `*HostPoolsClientListPager.NextPage(context.Context) bool` -- New function `*MSIXPackagesClientListPager.PageResponse() MSIXPackagesClientListResponse` -- New function `*ApplicationGroupsClientListByResourceGroupPager.Err() error` -- New function `*StartMenuItemsClientListPager.PageResponse() StartMenuItemsClientListResponse` -- New function `*WorkspacesClientListByResourceGroupPager.PageResponse() WorkspacesClientListByResourceGroupResponse` -- New function `*DesktopsClientListPager.NextPage(context.Context) bool` -- New function `*ScalingPlansClientListByHostPoolPager.NextPage(context.Context) bool` -- New function `*ScalingPlansClientListByResourceGroupPager.Err() error` -- New function `*MsixImagesClientExpandPager.PageResponse() MsixImagesClientExpandResponse` -- New function `*PrivateLinkResourcesClientListByHostPoolPager.NextPage(context.Context) bool` -- New function `*MSIXPackagesClientListPager.Err() error` -- New function `*SessionHostsClientListPager.PageResponse() SessionHostsClientListResponse` -- New function `*WorkspacesClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*MsixImagesClientExpandPager.Err() error` -- New function `*ApplicationsClientListPager.Err() error` -- New function `*PrivateEndpointConnectionsClientListByHostPoolPager.NextPage(context.Context) bool` -- New function `*ScalingPlansClientListByHostPoolPager.Err() error` -- New function `*UserSessionsClientListPager.NextPage(context.Context) bool` -- New function `*PrivateEndpointConnectionsClientListByWorkspacePager.PageResponse() PrivateEndpointConnectionsClientListByWorkspaceResponse` -- New function `*ScalingPlansClientListByHostPoolPager.PageResponse() ScalingPlansClientListByHostPoolResponse` -- New function `*ApplicationGroupsClientListByResourceGroupPager.PageResponse() ApplicationGroupsClientListByResourceGroupResponse` -- New function `*PrivateEndpointConnectionsClientListByHostPoolPager.Err() error` -- New function `*MSIXPackagesClientListPager.NextPage(context.Context) bool` -- New function `*UserSessionsClientListPager.Err() error` -- New function `*OperationsClientListPager.Err() error` -- New function `*WorkspacesClientListBySubscriptionPager.Err() error` -- New function `*ScalingPlansClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*PrivateLinkResourcesClientListByHostPoolPager.PageResponse() PrivateLinkResourcesClientListByHostPoolResponse` -- New function `*PrivateLinkResourcesClientListByWorkspacePager.NextPage(context.Context) bool` -- New function `*OperationsClientListPager.NextPage(context.Context) bool` -- New function `*HostPoolsClientListByResourceGroupPager.Err() error` -- New function `*UserSessionsClientListPager.PageResponse() UserSessionsClientListResponse` -- New function `*StartMenuItemsClientListPager.Err() error` -- New function `*ApplicationsClientListPager.PageResponse() ApplicationsClientListResponse` -- New function `*DesktopsClientListPager.Err() error` -- New function `*PrivateLinkResourcesClientListByHostPoolPager.Err() error` -- New function `*PrivateEndpointConnectionsClientListByHostPoolPager.PageResponse() PrivateEndpointConnectionsClientListByHostPoolResponse` -- New function `*ScalingPlansClientListByResourceGroupPager.PageResponse() ScalingPlansClientListByResourceGroupResponse` -- New function `*UserSessionsClientListByHostPoolPager.NextPage(context.Context) bool` -- New struct `ApplicationGroupsClientCreateOrUpdateOptions` -- New struct `ApplicationGroupsClientCreateOrUpdateResponse` -- New struct `ApplicationGroupsClientCreateOrUpdateResult` -- New struct `ApplicationGroupsClientDeleteOptions` -- New struct `ApplicationGroupsClientDeleteResponse` -- New struct `ApplicationGroupsClientGetOptions` -- New struct `ApplicationGroupsClientGetResponse` -- New struct `ApplicationGroupsClientGetResult` -- New struct `ApplicationGroupsClientListByResourceGroupOptions` -- New struct `ApplicationGroupsClientListByResourceGroupPager` -- New struct `ApplicationGroupsClientListByResourceGroupResponse` -- New struct `ApplicationGroupsClientListByResourceGroupResult` -- New struct `ApplicationGroupsClientListBySubscriptionOptions` -- New struct `ApplicationGroupsClientListBySubscriptionPager` -- New struct `ApplicationGroupsClientListBySubscriptionResponse` -- New struct `ApplicationGroupsClientListBySubscriptionResult` -- New struct `ApplicationGroupsClientUpdateOptions` -- New struct `ApplicationGroupsClientUpdateResponse` -- New struct `ApplicationGroupsClientUpdateResult` -- New struct `ApplicationsClientCreateOrUpdateOptions` -- New struct `ApplicationsClientCreateOrUpdateResponse` -- New struct `ApplicationsClientCreateOrUpdateResult` -- New struct `ApplicationsClientDeleteOptions` -- New struct `ApplicationsClientDeleteResponse` -- New struct `ApplicationsClientGetOptions` -- New struct `ApplicationsClientGetResponse` -- New struct `ApplicationsClientGetResult` -- New struct `ApplicationsClientListOptions` -- New struct `ApplicationsClientListPager` -- New struct `ApplicationsClientListResponse` -- New struct `ApplicationsClientListResult` -- New struct `ApplicationsClientUpdateOptions` -- New struct `ApplicationsClientUpdateResponse` -- New struct `ApplicationsClientUpdateResult` -- New struct `DesktopsClientGetOptions` -- New struct `DesktopsClientGetResponse` -- New struct `DesktopsClientGetResult` -- New struct `DesktopsClientListOptions` -- New struct `DesktopsClientListPager` -- New struct `DesktopsClientListResponse` -- New struct `DesktopsClientListResult` -- New struct `DesktopsClientUpdateOptions` -- New struct `DesktopsClientUpdateResponse` -- New struct `DesktopsClientUpdateResult` -- New struct `HostPoolsClientCreateOrUpdateOptions` -- New struct `HostPoolsClientCreateOrUpdateResponse` -- New struct `HostPoolsClientCreateOrUpdateResult` -- New struct `HostPoolsClientDeleteOptions` -- New struct `HostPoolsClientDeleteResponse` -- New struct `HostPoolsClientGetOptions` -- New struct `HostPoolsClientGetResponse` -- New struct `HostPoolsClientGetResult` -- New struct `HostPoolsClientListByResourceGroupOptions` -- New struct `HostPoolsClientListByResourceGroupPager` -- New struct `HostPoolsClientListByResourceGroupResponse` -- New struct `HostPoolsClientListByResourceGroupResult` -- New struct `HostPoolsClientListOptions` -- New struct `HostPoolsClientListPager` -- New struct `HostPoolsClientListResponse` -- New struct `HostPoolsClientListResult` -- New struct `HostPoolsClientRetrieveRegistrationTokenOptions` -- New struct `HostPoolsClientRetrieveRegistrationTokenResponse` -- New struct `HostPoolsClientRetrieveRegistrationTokenResult` -- New struct `HostPoolsClientUpdateOptions` -- New struct `HostPoolsClientUpdateResponse` -- New struct `HostPoolsClientUpdateResult` -- New struct `MSIXPackagesClientCreateOrUpdateOptions` -- New struct `MSIXPackagesClientCreateOrUpdateResponse` -- New struct `MSIXPackagesClientCreateOrUpdateResult` -- New struct `MSIXPackagesClientDeleteOptions` -- New struct `MSIXPackagesClientDeleteResponse` -- New struct `MSIXPackagesClientGetOptions` -- New struct `MSIXPackagesClientGetResponse` -- New struct `MSIXPackagesClientGetResult` -- New struct `MSIXPackagesClientListOptions` -- New struct `MSIXPackagesClientListPager` -- New struct `MSIXPackagesClientListResponse` -- New struct `MSIXPackagesClientListResult` -- New struct `MSIXPackagesClientUpdateOptions` -- New struct `MSIXPackagesClientUpdateResponse` -- New struct `MSIXPackagesClientUpdateResult` -- New struct `MsixImagesClientExpandOptions` -- New struct `MsixImagesClientExpandPager` -- New struct `MsixImagesClientExpandResponse` -- New struct `MsixImagesClientExpandResult` -- New struct `OperationsClientListOptions` -- New struct `OperationsClientListPager` -- New struct `OperationsClientListResponse` -- New struct `OperationsClientListResult` -- New struct `PrivateEndpointConnectionsClientDeleteByHostPoolOptions` -- New struct `PrivateEndpointConnectionsClientDeleteByHostPoolResponse` -- New struct `PrivateEndpointConnectionsClientDeleteByWorkspaceOptions` -- New struct `PrivateEndpointConnectionsClientDeleteByWorkspaceResponse` -- New struct `PrivateEndpointConnectionsClientGetByHostPoolOptions` -- New struct `PrivateEndpointConnectionsClientGetByHostPoolResponse` -- New struct `PrivateEndpointConnectionsClientGetByHostPoolResult` -- New struct `PrivateEndpointConnectionsClientGetByWorkspaceOptions` -- New struct `PrivateEndpointConnectionsClientGetByWorkspaceResponse` -- New struct `PrivateEndpointConnectionsClientGetByWorkspaceResult` -- New struct `PrivateEndpointConnectionsClientListByHostPoolOptions` -- New struct `PrivateEndpointConnectionsClientListByHostPoolPager` -- New struct `PrivateEndpointConnectionsClientListByHostPoolResponse` -- New struct `PrivateEndpointConnectionsClientListByHostPoolResult` -- New struct `PrivateEndpointConnectionsClientListByWorkspaceOptions` -- New struct `PrivateEndpointConnectionsClientListByWorkspacePager` -- New struct `PrivateEndpointConnectionsClientListByWorkspaceResponse` -- New struct `PrivateEndpointConnectionsClientListByWorkspaceResult` -- New struct `PrivateEndpointConnectionsClientUpdateByHostPoolOptions` -- New struct `PrivateEndpointConnectionsClientUpdateByHostPoolResponse` -- New struct `PrivateEndpointConnectionsClientUpdateByHostPoolResult` -- New struct `PrivateEndpointConnectionsClientUpdateByWorkspaceOptions` -- New struct `PrivateEndpointConnectionsClientUpdateByWorkspaceResponse` -- New struct `PrivateEndpointConnectionsClientUpdateByWorkspaceResult` -- New struct `PrivateLinkResourcesClientListByHostPoolOptions` -- New struct `PrivateLinkResourcesClientListByHostPoolPager` -- New struct `PrivateLinkResourcesClientListByHostPoolResponse` -- New struct `PrivateLinkResourcesClientListByHostPoolResult` -- New struct `PrivateLinkResourcesClientListByWorkspaceOptions` -- New struct `PrivateLinkResourcesClientListByWorkspacePager` -- New struct `PrivateLinkResourcesClientListByWorkspaceResponse` -- New struct `PrivateLinkResourcesClientListByWorkspaceResult` -- New struct `ScalingPlansClientCreateOptions` -- New struct `ScalingPlansClientCreateResponse` -- New struct `ScalingPlansClientCreateResult` -- New struct `ScalingPlansClientDeleteOptions` -- New struct `ScalingPlansClientDeleteResponse` -- New struct `ScalingPlansClientGetOptions` -- New struct `ScalingPlansClientGetResponse` -- New struct `ScalingPlansClientGetResult` -- New struct `ScalingPlansClientListByHostPoolOptions` -- New struct `ScalingPlansClientListByHostPoolPager` -- New struct `ScalingPlansClientListByHostPoolResponse` -- New struct `ScalingPlansClientListByHostPoolResult` -- New struct `ScalingPlansClientListByResourceGroupOptions` -- New struct `ScalingPlansClientListByResourceGroupPager` -- New struct `ScalingPlansClientListByResourceGroupResponse` -- New struct `ScalingPlansClientListByResourceGroupResult` -- New struct `ScalingPlansClientListBySubscriptionOptions` -- New struct `ScalingPlansClientListBySubscriptionPager` -- New struct `ScalingPlansClientListBySubscriptionResponse` -- New struct `ScalingPlansClientListBySubscriptionResult` -- New struct `ScalingPlansClientUpdateOptions` -- New struct `ScalingPlansClientUpdateResponse` -- New struct `ScalingPlansClientUpdateResult` -- New struct `SessionHostsClientDeleteOptions` -- New struct `SessionHostsClientDeleteResponse` -- New struct `SessionHostsClientGetOptions` -- New struct `SessionHostsClientGetResponse` -- New struct `SessionHostsClientGetResult` -- New struct `SessionHostsClientListOptions` -- New struct `SessionHostsClientListPager` -- New struct `SessionHostsClientListResponse` -- New struct `SessionHostsClientListResult` -- New struct `SessionHostsClientUpdateOptions` -- New struct `SessionHostsClientUpdateResponse` -- New struct `SessionHostsClientUpdateResult` -- New struct `StartMenuItemsClientListOptions` -- New struct `StartMenuItemsClientListPager` -- New struct `StartMenuItemsClientListResponse` -- New struct `StartMenuItemsClientListResult` -- New struct `UserSessionsClientDeleteOptions` -- New struct `UserSessionsClientDeleteResponse` -- New struct `UserSessionsClientDisconnectOptions` -- New struct `UserSessionsClientDisconnectResponse` -- New struct `UserSessionsClientGetOptions` -- New struct `UserSessionsClientGetResponse` -- New struct `UserSessionsClientGetResult` -- New struct `UserSessionsClientListByHostPoolOptions` -- New struct `UserSessionsClientListByHostPoolPager` -- New struct `UserSessionsClientListByHostPoolResponse` -- New struct `UserSessionsClientListByHostPoolResult` -- New struct `UserSessionsClientListOptions` -- New struct `UserSessionsClientListPager` -- New struct `UserSessionsClientListResponse` -- New struct `UserSessionsClientListResult` -- New struct `UserSessionsClientSendMessageOptions` -- New struct `UserSessionsClientSendMessageResponse` -- New struct `WorkspacesClientCreateOrUpdateOptions` -- New struct `WorkspacesClientCreateOrUpdateResponse` -- New struct `WorkspacesClientCreateOrUpdateResult` -- New struct `WorkspacesClientDeleteOptions` -- New struct `WorkspacesClientDeleteResponse` -- New struct `WorkspacesClientGetOptions` -- New struct `WorkspacesClientGetResponse` -- New struct `WorkspacesClientGetResult` -- New struct `WorkspacesClientListByResourceGroupOptions` -- New struct `WorkspacesClientListByResourceGroupPager` -- New struct `WorkspacesClientListByResourceGroupResponse` -- New struct `WorkspacesClientListByResourceGroupResult` -- New struct `WorkspacesClientListBySubscriptionOptions` -- New struct `WorkspacesClientListBySubscriptionPager` -- New struct `WorkspacesClientListBySubscriptionResponse` -- New struct `WorkspacesClientListBySubscriptionResult` -- New struct `WorkspacesClientUpdateOptions` -- New struct `WorkspacesClientUpdateResponse` -- New struct `WorkspacesClientUpdateResult` -- New field `ID` in struct `UserSession` -- New field `Name` in struct `UserSession` -- New field `Type` in struct `UserSession` -- New field `ID` in struct `Workspace` -- New field `Kind` in struct `Workspace` -- New field `Tags` in struct `Workspace` -- New field `Identity` in struct `Workspace` -- New field `ManagedBy` in struct `Workspace` -- New field `Plan` in struct `Workspace` -- New field `Location` in struct `Workspace` -- New field `SKU` in struct `Workspace` -- New field `Name` in struct `Workspace` -- New field `Etag` in struct `Workspace` -- New field `Type` in struct `Workspace` -- New field `Type` in struct `StartMenuItem` -- New field `ID` in struct `StartMenuItem` -- New field `Name` in struct `StartMenuItem` -- New field `ID` in struct `Desktop` -- New field `Name` in struct `Desktop` -- New field `Type` in struct `Desktop` -- New field `Type` in struct `ResourceModelWithAllowedPropertySetIdentity` -- New field `PrincipalID` in struct `ResourceModelWithAllowedPropertySetIdentity` -- New field `TenantID` in struct `ResourceModelWithAllowedPropertySetIdentity` -- New field `ID` in struct `SessionHost` -- New field `Name` in struct `SessionHost` -- New field `Type` in struct `SessionHost` -- New field `Version` in struct `ResourceModelWithAllowedPropertySetPlan` -- New field `Name` in struct `ResourceModelWithAllowedPropertySetPlan` -- New field `Product` in struct `ResourceModelWithAllowedPropertySetPlan` -- New field `Publisher` in struct `ResourceModelWithAllowedPropertySetPlan` -- New field `PromotionCode` in struct `ResourceModelWithAllowedPropertySetPlan` -- New field `Name` in struct `Application` -- New field `Type` in struct `Application` -- New field `ID` in struct `Application` -- New field `ID` in struct `MSIXPackagePatch` -- New field `Name` in struct `MSIXPackagePatch` -- New field `Type` in struct `MSIXPackagePatch` -- New field `ID` in struct `PrivateEndpointConnection` -- New field `Name` in struct `PrivateEndpointConnection` -- New field `Type` in struct `PrivateEndpointConnection` -- New field `ID` in struct `ExpandMsixImage` -- New field `Name` in struct `ExpandMsixImage` -- New field `Type` in struct `ExpandMsixImage` -- New field `Capacity` in struct `ResourceModelWithAllowedPropertySetSKU` -- New field `Family` in struct `ResourceModelWithAllowedPropertySetSKU` -- New field `Size` in struct `ResourceModelWithAllowedPropertySetSKU` -- New field `Tier` in struct `ResourceModelWithAllowedPropertySetSKU` -- New field `Name` in struct `ResourceModelWithAllowedPropertySetSKU` -- New field `SKU` in struct `ApplicationGroup` -- New field `Tags` in struct `ApplicationGroup` -- New field `Etag` in struct `ApplicationGroup` -- New field `Type` in struct `ApplicationGroup` -- New field `Name` in struct `ApplicationGroup` -- New field `Location` in struct `ApplicationGroup` -- New field `Plan` in struct `ApplicationGroup` -- New field `Kind` in struct `ApplicationGroup` -- New field `ManagedBy` in struct `ApplicationGroup` -- New field `ID` in struct `ApplicationGroup` -- New field `Identity` in struct `ApplicationGroup` -- New field `ID` in struct `ScalingPlan` -- New field `SKU` in struct `ScalingPlan` -- New field `Etag` in struct `ScalingPlan` -- New field `Identity` in struct `ScalingPlan` -- New field `Kind` in struct `ScalingPlan` -- New field `Name` in struct `ScalingPlan` -- New field `Type` in struct `ScalingPlan` -- New field `Location` in struct `ScalingPlan` -- New field `ManagedBy` in struct `ScalingPlan` -- New field `Plan` in struct `ScalingPlan` -- New field `Tags` in struct `ScalingPlan` -- New field `ID` in struct `HostPoolPatch` -- New field `Name` in struct `HostPoolPatch` -- New field `Type` in struct `HostPoolPatch` -- New field `Properties` in struct `PrivateEndpointConnectionWithSystemData` -- New field `ID` in struct `PrivateEndpointConnectionWithSystemData` -- New field `Name` in struct `PrivateEndpointConnectionWithSystemData` -- New field `Type` in struct `PrivateEndpointConnectionWithSystemData` -- New field `Error` in struct `CloudError` -- New field `Name` in struct `HostPool` -- New field `Type` in struct `HostPool` -- New field `ManagedBy` in struct `HostPool` -- New field `Identity` in struct `HostPool` -- New field `SKU` in struct `HostPool` -- New field `Tags` in struct `HostPool` -- New field `Etag` in struct `HostPool` -- New field `ID` in struct `HostPool` -- New field `Kind` in struct `HostPool` -- New field `Location` in struct `HostPool` -- New field `Plan` in struct `HostPool` -- New field `ID` in struct `ApplicationGroupPatch` -- New field `Name` in struct `ApplicationGroupPatch` -- New field `Type` in struct `ApplicationGroupPatch` -- New field `Name` in struct `SessionHostPatch` -- New field `Type` in struct `SessionHostPatch` -- New field `ID` in struct `SessionHostPatch` -- New field `ID` in struct `PrivateLinkResource` -- New field `Name` in struct `PrivateLinkResource` -- New field `Type` in struct `PrivateLinkResource` -- New field `Type` in struct `MSIXPackage` -- New field `ID` in struct `MSIXPackage` -- New field `Name` in struct `MSIXPackage` - - -## 0.1.0 (2021-12-07) - -- Initial preview release. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/README.md deleted file mode 100644 index 2c552fcd..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Azure Virtual Desktop Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization) - -The `armdesktopvirtualization` module provides operations for working with Azure Virtual Desktop. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Virtual Desktop module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Virtual Desktop. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure Virtual Desktop modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armdesktopvirtualization.NewWorkspacesClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armdesktopvirtualization.NewWorkspacesClient(, cred, &options) -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Virtual Desktop` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/autorest.md deleted file mode 100644 index 5674bdcf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/autorest.md +++ /dev/null @@ -1,13 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -tag: package-2021-07 -require: -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/desktopvirtualization/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/desktopvirtualization/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/build.go deleted file mode 100644 index 937b16aa..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/desktopvirtualization/armdesktopvirtualization - -package armdesktopvirtualization diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/ci.yml deleted file mode 100644 index 867f8333..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/desktopvirtualization/armdesktopvirtualization' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/CHANGELOG.md new file mode 100644 index 00000000..ee25001a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/CHANGELOG.md @@ -0,0 +1,204 @@ +# Release History + +## 2.3.0 (2024-09-24) +### Features Added + +- New enum type `AppAttachPackageArchitectures` with values `AppAttachPackageArchitecturesALL`, `AppAttachPackageArchitecturesARM`, `AppAttachPackageArchitecturesARM64`, `AppAttachPackageArchitecturesNeutral`, `AppAttachPackageArchitecturesX64`, `AppAttachPackageArchitecturesX86`, `AppAttachPackageArchitecturesX86A64` +- New enum type `FailHealthCheckOnStagingFailure` with values `FailHealthCheckOnStagingFailureDoNotFail`, `FailHealthCheckOnStagingFailureNeedsAssistance`, `FailHealthCheckOnStagingFailureUnhealthy` +- New enum type `PackageTimestamped` with values `PackageTimestampedNotTimestamped`, `PackageTimestampedTimestamped` +- New enum type `ProvisioningState` with values `ProvisioningStateCanceled`, `ProvisioningStateFailed`, `ProvisioningStateProvisioning`, `ProvisioningStateSucceeded` +- New function `NewAppAttachPackageClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AppAttachPackageClient, error)` +- New function `*AppAttachPackageClient.CreateOrUpdate(context.Context, string, string, AppAttachPackage, *AppAttachPackageClientCreateOrUpdateOptions) (AppAttachPackageClientCreateOrUpdateResponse, error)` +- New function `*AppAttachPackageClient.Delete(context.Context, string, string, *AppAttachPackageClientDeleteOptions) (AppAttachPackageClientDeleteResponse, error)` +- New function `*AppAttachPackageClient.Get(context.Context, string, string, *AppAttachPackageClientGetOptions) (AppAttachPackageClientGetResponse, error)` +- New function `*AppAttachPackageClient.NewListByResourceGroupPager(string, *AppAttachPackageClientListByResourceGroupOptions) *runtime.Pager[AppAttachPackageClientListByResourceGroupResponse]` +- New function `*AppAttachPackageClient.NewListBySubscriptionPager(*AppAttachPackageClientListBySubscriptionOptions) *runtime.Pager[AppAttachPackageClientListBySubscriptionResponse]` +- New function `*AppAttachPackageClient.Update(context.Context, string, string, *AppAttachPackageClientUpdateOptions) (AppAttachPackageClientUpdateResponse, error)` +- New function `NewAppAttachPackageInfoClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AppAttachPackageInfoClient, error)` +- New function `*AppAttachPackageInfoClient.NewImportPager(string, string, ImportPackageInfoRequest, *AppAttachPackageInfoClientImportOptions) *runtime.Pager[AppAttachPackageInfoClientImportResponse]` +- New function `*ClientFactory.NewAppAttachPackageClient() *AppAttachPackageClient` +- New function `*ClientFactory.NewAppAttachPackageInfoClient() *AppAttachPackageInfoClient` +- New function `*HostPoolsClient.ListRegistrationTokens(context.Context, string, string, *HostPoolsClientListRegistrationTokensOptions) (HostPoolsClientListRegistrationTokensResponse, error)` +- New struct `AppAttachPackage` +- New struct `AppAttachPackageInfoProperties` +- New struct `AppAttachPackageList` +- New struct `AppAttachPackagePatch` +- New struct `AppAttachPackagePatchProperties` +- New struct `AppAttachPackageProperties` +- New struct `ImportPackageInfoRequest` +- New struct `RegistrationTokenList` +- New struct `RegistrationTokenMinimal` +- New field `SystemData` in struct `ApplicationGroupPatch` +- New field `SystemData` in struct `ExpandMsixImage` +- New field `CertificateExpiry`, `CertificateName` in struct `ExpandMsixImageProperties` +- New field `SystemData` in struct `HostPoolPatch` +- New field `AppAttachPackageReferences` in struct `HostPoolProperties` +- New field `SystemData` in struct `MSIXPackagePatch` +- New field `SystemData` in struct `PrivateEndpointConnection` +- New field `GroupIDs` in struct `PrivateEndpointConnectionProperties` +- New field `SystemData` in struct `PrivateLinkResource` +- New field `SystemData` in struct `ScalingPlanPooledSchedulePatch` +- New field `SystemData` in struct `SessionHostPatch` +- New field `SystemData` in struct `StartMenuItem` + + +## 2.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.1.0 (2023-10-27) +### Features Added + +- New enum type `HostpoolPublicNetworkAccess` with values `HostpoolPublicNetworkAccessDisabled`, `HostpoolPublicNetworkAccessEnabled`, `HostpoolPublicNetworkAccessEnabledForClientsOnly`, `HostpoolPublicNetworkAccessEnabledForSessionHostsOnly` +- New enum type `PrivateEndpointConnectionProvisioningState` with values `PrivateEndpointConnectionProvisioningStateCreating`, `PrivateEndpointConnectionProvisioningStateDeleting`, `PrivateEndpointConnectionProvisioningStateFailed`, `PrivateEndpointConnectionProvisioningStateSucceeded` +- New enum type `PrivateEndpointServiceConnectionStatus` with values `PrivateEndpointServiceConnectionStatusApproved`, `PrivateEndpointServiceConnectionStatusPending`, `PrivateEndpointServiceConnectionStatusRejected` +- New enum type `PublicNetworkAccess` with values `PublicNetworkAccessDisabled`, `PublicNetworkAccessEnabled` +- New enum type `SessionHandlingOperation` with values `SessionHandlingOperationDeallocate`, `SessionHandlingOperationHibernate`, `SessionHandlingOperationNone` +- New enum type `SetStartVMOnConnect` with values `SetStartVMOnConnectDisable`, `SetStartVMOnConnectEnable` +- New enum type `StartupBehavior` with values `StartupBehaviorAll`, `StartupBehaviorNone`, `StartupBehaviorWithAssignedUser` +- New function `*ClientFactory.NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient` +- New function `*ClientFactory.NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient` +- New function `*ClientFactory.NewScalingPlanPersonalSchedulesClient() *ScalingPlanPersonalSchedulesClient` +- New function `NewPrivateEndpointConnectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)` +- New function `*PrivateEndpointConnectionsClient.DeleteByHostPool(context.Context, string, string, string, *PrivateEndpointConnectionsClientDeleteByHostPoolOptions) (PrivateEndpointConnectionsClientDeleteByHostPoolResponse, error)` +- New function `*PrivateEndpointConnectionsClient.DeleteByWorkspace(context.Context, string, string, string, *PrivateEndpointConnectionsClientDeleteByWorkspaceOptions) (PrivateEndpointConnectionsClientDeleteByWorkspaceResponse, error)` +- New function `*PrivateEndpointConnectionsClient.GetByHostPool(context.Context, string, string, string, *PrivateEndpointConnectionsClientGetByHostPoolOptions) (PrivateEndpointConnectionsClientGetByHostPoolResponse, error)` +- New function `*PrivateEndpointConnectionsClient.GetByWorkspace(context.Context, string, string, string, *PrivateEndpointConnectionsClientGetByWorkspaceOptions) (PrivateEndpointConnectionsClientGetByWorkspaceResponse, error)` +- New function `*PrivateEndpointConnectionsClient.NewListByHostPoolPager(string, string, *PrivateEndpointConnectionsClientListByHostPoolOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByHostPoolResponse]` +- New function `*PrivateEndpointConnectionsClient.NewListByWorkspacePager(string, string, *PrivateEndpointConnectionsClientListByWorkspaceOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByWorkspaceResponse]` +- New function `*PrivateEndpointConnectionsClient.UpdateByHostPool(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsClientUpdateByHostPoolOptions) (PrivateEndpointConnectionsClientUpdateByHostPoolResponse, error)` +- New function `*PrivateEndpointConnectionsClient.UpdateByWorkspace(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsClientUpdateByWorkspaceOptions) (PrivateEndpointConnectionsClientUpdateByWorkspaceResponse, error)` +- New function `NewPrivateLinkResourcesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*PrivateLinkResourcesClient, error)` +- New function `*PrivateLinkResourcesClient.NewListByHostPoolPager(string, string, *PrivateLinkResourcesClientListByHostPoolOptions) *runtime.Pager[PrivateLinkResourcesClientListByHostPoolResponse]` +- New function `*PrivateLinkResourcesClient.NewListByWorkspacePager(string, string, *PrivateLinkResourcesClientListByWorkspaceOptions) *runtime.Pager[PrivateLinkResourcesClientListByWorkspaceResponse]` +- New function `NewScalingPlanPersonalSchedulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ScalingPlanPersonalSchedulesClient, error)` +- New function `*ScalingPlanPersonalSchedulesClient.Create(context.Context, string, string, string, ScalingPlanPersonalSchedule, *ScalingPlanPersonalSchedulesClientCreateOptions) (ScalingPlanPersonalSchedulesClientCreateResponse, error)` +- New function `*ScalingPlanPersonalSchedulesClient.Delete(context.Context, string, string, string, *ScalingPlanPersonalSchedulesClientDeleteOptions) (ScalingPlanPersonalSchedulesClientDeleteResponse, error)` +- New function `*ScalingPlanPersonalSchedulesClient.Get(context.Context, string, string, string, *ScalingPlanPersonalSchedulesClientGetOptions) (ScalingPlanPersonalSchedulesClientGetResponse, error)` +- New function `*ScalingPlanPersonalSchedulesClient.NewListPager(string, string, *ScalingPlanPersonalSchedulesClientListOptions) *runtime.Pager[ScalingPlanPersonalSchedulesClientListResponse]` +- New function `*ScalingPlanPersonalSchedulesClient.Update(context.Context, string, string, string, *ScalingPlanPersonalSchedulesClientUpdateOptions) (ScalingPlanPersonalSchedulesClientUpdateResponse, error)` +- New struct `PrivateEndpoint` +- New struct `PrivateEndpointConnection` +- New struct `PrivateEndpointConnectionListResultWithSystemData` +- New struct `PrivateEndpointConnectionProperties` +- New struct `PrivateEndpointConnectionWithSystemData` +- New struct `PrivateLinkResource` +- New struct `PrivateLinkResourceListResult` +- New struct `PrivateLinkResourceProperties` +- New struct `PrivateLinkServiceConnectionState` +- New struct `ScalingPlanPersonalSchedule` +- New struct `ScalingPlanPersonalScheduleList` +- New struct `ScalingPlanPersonalSchedulePatch` +- New struct `ScalingPlanPersonalScheduleProperties` +- New field `ShowInFeed` in struct `ApplicationGroupPatchProperties` +- New field `ShowInFeed` in struct `ApplicationGroupProperties` +- New field `PublicNetworkAccess` in struct `HostPoolPatchProperties` +- New field `PrivateEndpointConnections`, `PublicNetworkAccess` in struct `HostPoolProperties` +- New field `PublicNetworkAccess` in struct `WorkspacePatchProperties` +- New field `PrivateEndpointConnections`, `PublicNetworkAccess` in struct `WorkspaceProperties` + + +## 2.0.0 (2023-03-24) +### Breaking Changes + +- Type of `ScalingPlanProperties.HostPoolType` has been changed from `*HostPoolType` to `*ScalingHostPoolType` +- Type of `ScalingSchedule.OffPeakStartTime` has been changed from `*time.Time` to `*Time` +- Type of `ScalingSchedule.PeakStartTime` has been changed from `*time.Time` to `*Time` +- Type of `ScalingSchedule.RampDownStartTime` has been changed from `*time.Time` to `*Time` +- Type of `ScalingSchedule.RampUpStartTime` has been changed from `*time.Time` to `*Time` +- Type alias `Operation` has been removed +- Operation `*DesktopsClient.List` has supported pagination, use `*DesktopsClient.NewListPager` instead. +- Operation `*OperationsClient.List` has supported pagination, use `*OperationsClient.NewListPager` instead. +- Struct `MigrationRequestProperties` has been removed +- Field `MigrationRequest` of struct `ApplicationGroupProperties` has been removed +- Field `MigrationRequest` of struct `HostPoolProperties` has been removed +- Field `HostPoolType` of struct `ScalingPlanPatchProperties` has been removed + +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module +- New enum type `CreatedByType` with values `CreatedByTypeApplication`, `CreatedByTypeKey`, `CreatedByTypeManagedIdentity`, `CreatedByTypeUser` +- New enum type `DayOfWeek` with values `DayOfWeekFriday`, `DayOfWeekMonday`, `DayOfWeekSaturday`, `DayOfWeekSunday`, `DayOfWeekThursday`, `DayOfWeekTuesday`, `DayOfWeekWednesday` +- New enum type `ScalingHostPoolType` with values `ScalingHostPoolTypePooled` +- New enum type `SessionHostComponentUpdateType` with values `SessionHostComponentUpdateTypeDefault`, `SessionHostComponentUpdateTypeScheduled` +- New function `NewScalingPlanPooledSchedulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ScalingPlanPooledSchedulesClient, error)` +- New function `*ScalingPlanPooledSchedulesClient.Create(context.Context, string, string, string, ScalingPlanPooledSchedule, *ScalingPlanPooledSchedulesClientCreateOptions) (ScalingPlanPooledSchedulesClientCreateResponse, error)` +- New function `*ScalingPlanPooledSchedulesClient.Delete(context.Context, string, string, string, *ScalingPlanPooledSchedulesClientDeleteOptions) (ScalingPlanPooledSchedulesClientDeleteResponse, error)` +- New function `*ScalingPlanPooledSchedulesClient.Get(context.Context, string, string, string, *ScalingPlanPooledSchedulesClientGetOptions) (ScalingPlanPooledSchedulesClientGetResponse, error)` +- New function `*ScalingPlanPooledSchedulesClient.NewListPager(string, string, *ScalingPlanPooledSchedulesClientListOptions) *runtime.Pager[ScalingPlanPooledSchedulesClientListResponse]` +- New function `*ScalingPlanPooledSchedulesClient.Update(context.Context, string, string, string, *ScalingPlanPooledSchedulesClientUpdateOptions) (ScalingPlanPooledSchedulesClientUpdateResponse, error)` +- New struct `AgentUpdatePatchProperties` +- New struct `AgentUpdateProperties` +- New struct `MaintenanceWindowPatchProperties` +- New struct `MaintenanceWindowProperties` +- New struct `ScalingPlanPooledSchedule` +- New struct `ScalingPlanPooledScheduleList` +- New struct `ScalingPlanPooledSchedulePatch` +- New struct `ScalingPlanPooledScheduleProperties` +- New struct `SystemData` +- New struct `Time` +- New field `SystemData` in struct `Application` +- New field `SystemData` in struct `ApplicationGroup` +- New field `InitialSkip` in struct `ApplicationGroupsClientListByResourceGroupOptions` +- New field `IsDescending` in struct `ApplicationGroupsClientListByResourceGroupOptions` +- New field `PageSize` in struct `ApplicationGroupsClientListByResourceGroupOptions` +- New field `InitialSkip` in struct `ApplicationsClientListOptions` +- New field `IsDescending` in struct `ApplicationsClientListOptions` +- New field `PageSize` in struct `ApplicationsClientListOptions` +- New field `SystemData` in struct `Desktop` +- New field `SystemData` in struct `HostPool` +- New field `AgentUpdate` in struct `HostPoolPatchProperties` +- New field `AgentUpdate` in struct `HostPoolProperties` +- New field `InitialSkip` in struct `HostPoolsClientListByResourceGroupOptions` +- New field `IsDescending` in struct `HostPoolsClientListByResourceGroupOptions` +- New field `PageSize` in struct `HostPoolsClientListByResourceGroupOptions` +- New field `InitialSkip` in struct `HostPoolsClientListOptions` +- New field `IsDescending` in struct `HostPoolsClientListOptions` +- New field `PageSize` in struct `HostPoolsClientListOptions` +- New field `SystemData` in struct `MSIXPackage` +- New field `InitialSkip` in struct `MSIXPackagesClientListOptions` +- New field `IsDescending` in struct `MSIXPackagesClientListOptions` +- New field `PageSize` in struct `MSIXPackagesClientListOptions` +- New field `NextLink` in struct `ResourceProviderOperationList` +- New field `SystemData` in struct `ScalingPlan` +- New field `InitialSkip` in struct `ScalingPlansClientListByHostPoolOptions` +- New field `IsDescending` in struct `ScalingPlansClientListByHostPoolOptions` +- New field `PageSize` in struct `ScalingPlansClientListByHostPoolOptions` +- New field `InitialSkip` in struct `ScalingPlansClientListByResourceGroupOptions` +- New field `IsDescending` in struct `ScalingPlansClientListByResourceGroupOptions` +- New field `PageSize` in struct `ScalingPlansClientListByResourceGroupOptions` +- New field `InitialSkip` in struct `ScalingPlansClientListBySubscriptionOptions` +- New field `IsDescending` in struct `ScalingPlansClientListBySubscriptionOptions` +- New field `PageSize` in struct `ScalingPlansClientListBySubscriptionOptions` +- New field `SystemData` in struct `SessionHost` +- New field `FriendlyName` in struct `SessionHostPatchProperties` +- New field `FriendlyName` in struct `SessionHostProperties` +- New field `InitialSkip` in struct `SessionHostsClientListOptions` +- New field `IsDescending` in struct `SessionHostsClientListOptions` +- New field `PageSize` in struct `SessionHostsClientListOptions` +- New field `Force` in struct `SessionHostsClientUpdateOptions` +- New field `InitialSkip` in struct `StartMenuItemsClientListOptions` +- New field `IsDescending` in struct `StartMenuItemsClientListOptions` +- New field `PageSize` in struct `StartMenuItemsClientListOptions` +- New field `SystemData` in struct `UserSession` +- New field `InitialSkip` in struct `UserSessionsClientListByHostPoolOptions` +- New field `IsDescending` in struct `UserSessionsClientListByHostPoolOptions` +- New field `PageSize` in struct `UserSessionsClientListByHostPoolOptions` +- New field `InitialSkip` in struct `UserSessionsClientListOptions` +- New field `IsDescending` in struct `UserSessionsClientListOptions` +- New field `PageSize` in struct `UserSessionsClientListOptions` +- New field `SystemData` in struct `Workspace` +- New field `InitialSkip` in struct `WorkspacesClientListByResourceGroupOptions` +- New field `IsDescending` in struct `WorkspacesClientListByResourceGroupOptions` +- New field `PageSize` in struct `WorkspacesClientListByResourceGroupOptions` + + +## 1.0.0 (2022-05-18) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/README.md new file mode 100644 index 00000000..9dad2e6b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/README.md @@ -0,0 +1,92 @@ +# Azure Virtual Desktop Module for Go + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2) + +The `armdesktopvirtualization` module provides operations for working with Azure Virtual Desktop. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Virtual Desktop module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Virtual Desktop. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Virtual Desktop modules consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armdesktopvirtualization.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armdesktopvirtualization.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewAppAttachPackageClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Virtual Desktop` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/appattachpackage_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/appattachpackage_client.go new file mode 100644 index 00000000..29c76032 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/appattachpackage_client.go @@ -0,0 +1,422 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AppAttachPackageClient contains the methods for the AppAttachPackage group. +// Don't use this type directly, use NewAppAttachPackageClient() instead. +type AppAttachPackageClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAppAttachPackageClient creates a new instance of AppAttachPackageClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAppAttachPackageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AppAttachPackageClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AppAttachPackageClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or update an App Attach package. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - appAttachPackageName - The name of the App Attach package +// - appAttachPackage - Object containing App Attach Package definitions. +// - options - AppAttachPackageClientCreateOrUpdateOptions contains the optional parameters for the AppAttachPackageClient.CreateOrUpdate +// method. +func (client *AppAttachPackageClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, appAttachPackageName string, appAttachPackage AppAttachPackage, options *AppAttachPackageClientCreateOrUpdateOptions) (AppAttachPackageClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AppAttachPackageClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, appAttachPackageName, appAttachPackage, options) + if err != nil { + return AppAttachPackageClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AppAttachPackageClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AppAttachPackageClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AppAttachPackageClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, appAttachPackageName string, appAttachPackage AppAttachPackage, options *AppAttachPackageClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if appAttachPackageName == "" { + return nil, errors.New("parameter appAttachPackageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appAttachPackageName}", url.PathEscape(appAttachPackageName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, appAttachPackage); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *AppAttachPackageClient) createOrUpdateHandleResponse(resp *http.Response) (AppAttachPackageClientCreateOrUpdateResponse, error) { + result := AppAttachPackageClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppAttachPackage); err != nil { + return AppAttachPackageClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Remove an App Attach Package. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - appAttachPackageName - The name of the App Attach package +// - options - AppAttachPackageClientDeleteOptions contains the optional parameters for the AppAttachPackageClient.Delete method. +func (client *AppAttachPackageClient) Delete(ctx context.Context, resourceGroupName string, appAttachPackageName string, options *AppAttachPackageClientDeleteOptions) (AppAttachPackageClientDeleteResponse, error) { + var err error + const operationName = "AppAttachPackageClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, appAttachPackageName, options) + if err != nil { + return AppAttachPackageClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AppAttachPackageClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return AppAttachPackageClientDeleteResponse{}, err + } + return AppAttachPackageClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AppAttachPackageClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, appAttachPackageName string, options *AppAttachPackageClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if appAttachPackageName == "" { + return nil, errors.New("parameter appAttachPackageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appAttachPackageName}", url.PathEscape(appAttachPackageName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get an app attach package. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - appAttachPackageName - The name of the App Attach package +// - options - AppAttachPackageClientGetOptions contains the optional parameters for the AppAttachPackageClient.Get method. +func (client *AppAttachPackageClient) Get(ctx context.Context, resourceGroupName string, appAttachPackageName string, options *AppAttachPackageClientGetOptions) (AppAttachPackageClientGetResponse, error) { + var err error + const operationName = "AppAttachPackageClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, appAttachPackageName, options) + if err != nil { + return AppAttachPackageClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AppAttachPackageClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AppAttachPackageClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AppAttachPackageClient) getCreateRequest(ctx context.Context, resourceGroupName string, appAttachPackageName string, options *AppAttachPackageClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if appAttachPackageName == "" { + return nil, errors.New("parameter appAttachPackageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appAttachPackageName}", url.PathEscape(appAttachPackageName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AppAttachPackageClient) getHandleResponse(resp *http.Response) (AppAttachPackageClientGetResponse, error) { + result := AppAttachPackageClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppAttachPackage); err != nil { + return AppAttachPackageClientGetResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - List App Attach packages in resource group. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - AppAttachPackageClientListByResourceGroupOptions contains the optional parameters for the AppAttachPackageClient.NewListByResourceGroupPager +// method. +func (client *AppAttachPackageClient) NewListByResourceGroupPager(resourceGroupName string, options *AppAttachPackageClientListByResourceGroupOptions) *runtime.Pager[AppAttachPackageClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[AppAttachPackageClientListByResourceGroupResponse]{ + More: func(page AppAttachPackageClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AppAttachPackageClientListByResourceGroupResponse) (AppAttachPackageClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AppAttachPackageClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return AppAttachPackageClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *AppAttachPackageClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *AppAttachPackageClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *AppAttachPackageClient) listByResourceGroupHandleResponse(resp *http.Response) (AppAttachPackageClientListByResourceGroupResponse, error) { + result := AppAttachPackageClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppAttachPackageList); err != nil { + return AppAttachPackageClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - List App Attach packages in subscription. +// +// Generated from API version 2024-04-03 +// - options - AppAttachPackageClientListBySubscriptionOptions contains the optional parameters for the AppAttachPackageClient.NewListBySubscriptionPager +// method. +func (client *AppAttachPackageClient) NewListBySubscriptionPager(options *AppAttachPackageClientListBySubscriptionOptions) *runtime.Pager[AppAttachPackageClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[AppAttachPackageClientListBySubscriptionResponse]{ + More: func(page AppAttachPackageClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AppAttachPackageClientListBySubscriptionResponse) (AppAttachPackageClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AppAttachPackageClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return AppAttachPackageClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *AppAttachPackageClient) listBySubscriptionCreateRequest(ctx context.Context, options *AppAttachPackageClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/appAttachPackages" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *AppAttachPackageClient) listBySubscriptionHandleResponse(resp *http.Response) (AppAttachPackageClientListBySubscriptionResponse, error) { + result := AppAttachPackageClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppAttachPackageList); err != nil { + return AppAttachPackageClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// Update - Update an App Attach Package +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - appAttachPackageName - The name of the App Attach package +// - options - AppAttachPackageClientUpdateOptions contains the optional parameters for the AppAttachPackageClient.Update method. +func (client *AppAttachPackageClient) Update(ctx context.Context, resourceGroupName string, appAttachPackageName string, options *AppAttachPackageClientUpdateOptions) (AppAttachPackageClientUpdateResponse, error) { + var err error + const operationName = "AppAttachPackageClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, appAttachPackageName, options) + if err != nil { + return AppAttachPackageClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AppAttachPackageClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AppAttachPackageClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *AppAttachPackageClient) updateCreateRequest(ctx context.Context, resourceGroupName string, appAttachPackageName string, options *AppAttachPackageClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if appAttachPackageName == "" { + return nil, errors.New("parameter appAttachPackageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{appAttachPackageName}", url.PathEscape(appAttachPackageName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.AppAttachPackagePatch != nil { + if err := runtime.MarshalAsJSON(req, *options.AppAttachPackagePatch); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *AppAttachPackageClient) updateHandleResponse(resp *http.Response) (AppAttachPackageClientUpdateResponse, error) { + result := AppAttachPackageClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppAttachPackage); err != nil { + return AppAttachPackageClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/appattachpackageinfo_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/appattachpackageinfo_client.go new file mode 100644 index 00000000..b85f7177 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/appattachpackageinfo_client.go @@ -0,0 +1,113 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AppAttachPackageInfoClient contains the methods for the AppAttachPackageInfo group. +// Don't use this type directly, use NewAppAttachPackageInfoClient() instead. +type AppAttachPackageInfoClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAppAttachPackageInfoClient creates a new instance of AppAttachPackageInfoClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAppAttachPackageInfoClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AppAttachPackageInfoClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AppAttachPackageInfoClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewImportPager - Gets information from a package given the path to the package. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - importPackageInfoRequest - Object containing URI to package image and other optional properties +// - options - AppAttachPackageInfoClientImportOptions contains the optional parameters for the AppAttachPackageInfoClient.NewImportPager +// method. +func (client *AppAttachPackageInfoClient) NewImportPager(resourceGroupName string, hostPoolName string, importPackageInfoRequest ImportPackageInfoRequest, options *AppAttachPackageInfoClientImportOptions) *runtime.Pager[AppAttachPackageInfoClientImportResponse] { + return runtime.NewPager(runtime.PagingHandler[AppAttachPackageInfoClientImportResponse]{ + More: func(page AppAttachPackageInfoClientImportResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AppAttachPackageInfoClientImportResponse) (AppAttachPackageInfoClientImportResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AppAttachPackageInfoClient.NewImportPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.importCreateRequest(ctx, resourceGroupName, hostPoolName, importPackageInfoRequest, options) + }, nil) + if err != nil { + return AppAttachPackageInfoClientImportResponse{}, err + } + return client.importHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// importCreateRequest creates the Import request. +func (client *AppAttachPackageInfoClient) importCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, importPackageInfoRequest ImportPackageInfoRequest, options *AppAttachPackageInfoClientImportOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/importAppAttachPackageInfo" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, importPackageInfoRequest); err != nil { + return nil, err + } + return req, nil +} + +// importHandleResponse handles the Import response. +func (client *AppAttachPackageInfoClient) importHandleResponse(resp *http.Response) (AppAttachPackageInfoClientImportResponse, error) { + result := AppAttachPackageInfoClientImportResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AppAttachPackageList); err != nil { + return AppAttachPackageInfoClientImportResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/applicationgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/applicationgroups_client.go new file mode 100644 index 00000000..2fd802ca --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/applicationgroups_client.go @@ -0,0 +1,434 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ApplicationGroupsClient contains the methods for the ApplicationGroups group. +// Don't use this type directly, use NewApplicationGroupsClient() instead. +type ApplicationGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApplicationGroupsClient creates a new instance of ApplicationGroupsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApplicationGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApplicationGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or update an applicationGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - applicationGroup - Object containing ApplicationGroup definitions. +// - options - ApplicationGroupsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationGroupsClient.CreateOrUpdate +// method. +func (client *ApplicationGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationGroup ApplicationGroup, options *ApplicationGroupsClientCreateOrUpdateOptions) (ApplicationGroupsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ApplicationGroupsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationGroupName, applicationGroup, options) + if err != nil { + return ApplicationGroupsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGroupsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ApplicationGroupsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ApplicationGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationGroup ApplicationGroup, options *ApplicationGroupsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, applicationGroup); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ApplicationGroupsClient) createOrUpdateHandleResponse(resp *http.Response) (ApplicationGroupsClientCreateOrUpdateResponse, error) { + result := ApplicationGroupsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroup); err != nil { + return ApplicationGroupsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Remove an applicationGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - options - ApplicationGroupsClientDeleteOptions contains the optional parameters for the ApplicationGroupsClient.Delete +// method. +func (client *ApplicationGroupsClient) Delete(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientDeleteOptions) (ApplicationGroupsClientDeleteResponse, error) { + var err error + const operationName = "ApplicationGroupsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationGroupName, options) + if err != nil { + return ApplicationGroupsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGroupsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ApplicationGroupsClientDeleteResponse{}, err + } + return ApplicationGroupsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ApplicationGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get an application group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - options - ApplicationGroupsClientGetOptions contains the optional parameters for the ApplicationGroupsClient.Get method. +func (client *ApplicationGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientGetOptions) (ApplicationGroupsClientGetResponse, error) { + var err error + const operationName = "ApplicationGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGroupName, options) + if err != nil { + return ApplicationGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ApplicationGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ApplicationGroupsClient) getHandleResponse(resp *http.Response) (ApplicationGroupsClientGetResponse, error) { + result := ApplicationGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroup); err != nil { + return ApplicationGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - List applicationGroups. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ApplicationGroupsClientListByResourceGroupOptions contains the optional parameters for the ApplicationGroupsClient.NewListByResourceGroupPager +// method. +func (client *ApplicationGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *ApplicationGroupsClientListByResourceGroupOptions) *runtime.Pager[ApplicationGroupsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationGroupsClientListByResourceGroupResponse]{ + More: func(page ApplicationGroupsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationGroupsClientListByResourceGroupResponse) (ApplicationGroupsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGroupsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ApplicationGroupsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ApplicationGroupsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ApplicationGroupsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ApplicationGroupsClient) listByResourceGroupHandleResponse(resp *http.Response) (ApplicationGroupsClientListByResourceGroupResponse, error) { + result := ApplicationGroupsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroupList); err != nil { + return ApplicationGroupsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - List applicationGroups in subscription. +// +// Generated from API version 2024-04-03 +// - options - ApplicationGroupsClientListBySubscriptionOptions contains the optional parameters for the ApplicationGroupsClient.NewListBySubscriptionPager +// method. +func (client *ApplicationGroupsClient) NewListBySubscriptionPager(options *ApplicationGroupsClientListBySubscriptionOptions) *runtime.Pager[ApplicationGroupsClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationGroupsClientListBySubscriptionResponse]{ + More: func(page ApplicationGroupsClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationGroupsClientListBySubscriptionResponse) (ApplicationGroupsClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGroupsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return ApplicationGroupsClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *ApplicationGroupsClient) listBySubscriptionCreateRequest(ctx context.Context, options *ApplicationGroupsClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/applicationGroups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *ApplicationGroupsClient) listBySubscriptionHandleResponse(resp *http.Response) (ApplicationGroupsClientListBySubscriptionResponse, error) { + result := ApplicationGroupsClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroupList); err != nil { + return ApplicationGroupsClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// Update - Update an applicationGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - options - ApplicationGroupsClientUpdateOptions contains the optional parameters for the ApplicationGroupsClient.Update +// method. +func (client *ApplicationGroupsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientUpdateOptions) (ApplicationGroupsClientUpdateResponse, error) { + var err error + const operationName = "ApplicationGroupsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, applicationGroupName, options) + if err != nil { + return ApplicationGroupsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGroupsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGroupsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *ApplicationGroupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.ApplicationGroup != nil { + if err := runtime.MarshalAsJSON(req, *options.ApplicationGroup); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *ApplicationGroupsClient) updateHandleResponse(resp *http.Response) (ApplicationGroupsClientUpdateResponse, error) { + result := ApplicationGroupsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroup); err != nil { + return ApplicationGroupsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/applications_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/applications_client.go new file mode 100644 index 00000000..d6742799 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/applications_client.go @@ -0,0 +1,395 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ApplicationsClient contains the methods for the Applications group. +// Don't use this type directly, use NewApplicationsClient() instead. +type ApplicationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApplicationsClient creates a new instance of ApplicationsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApplicationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or update an application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - applicationName - The name of the application within the specified application group +// - application - Object containing Application definitions. +// - options - ApplicationsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.CreateOrUpdate +// method. +func (client *ApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, application Application, options *ApplicationsClientCreateOrUpdateOptions) (ApplicationsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ApplicationsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationGroupName, applicationName, application, options) + if err != nil { + return ApplicationsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ApplicationsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ApplicationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, application Application, options *ApplicationsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + if applicationName == "" { + return nil, errors.New("parameter applicationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationName}", url.PathEscape(applicationName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, application); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ApplicationsClient) createOrUpdateHandleResponse(resp *http.Response) (ApplicationsClientCreateOrUpdateResponse, error) { + result := ApplicationsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Application); err != nil { + return ApplicationsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Remove an application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - applicationName - The name of the application within the specified application group +// - options - ApplicationsClientDeleteOptions contains the optional parameters for the ApplicationsClient.Delete method. +func (client *ApplicationsClient) Delete(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientDeleteOptions) (ApplicationsClientDeleteResponse, error) { + var err error + const operationName = "ApplicationsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationGroupName, applicationName, options) + if err != nil { + return ApplicationsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ApplicationsClientDeleteResponse{}, err + } + return ApplicationsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ApplicationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + if applicationName == "" { + return nil, errors.New("parameter applicationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationName}", url.PathEscape(applicationName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get an application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - applicationName - The name of the application within the specified application group +// - options - ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method. +func (client *ApplicationsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientGetOptions) (ApplicationsClientGetResponse, error) { + var err error + const operationName = "ApplicationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGroupName, applicationName, options) + if err != nil { + return ApplicationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ApplicationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + if applicationName == "" { + return nil, errors.New("parameter applicationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationName}", url.PathEscape(applicationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ApplicationsClient) getHandleResponse(resp *http.Response) (ApplicationsClientGetResponse, error) { + result := ApplicationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Application); err != nil { + return ApplicationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List applications. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - options - ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.NewListPager method. +func (client *ApplicationsClient) NewListPager(resourceGroupName string, applicationGroupName string, options *ApplicationsClientListOptions) *runtime.Pager[ApplicationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationsClientListResponse]{ + More: func(page ApplicationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationsClientListResponse) (ApplicationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, applicationGroupName, options) + }, nil) + if err != nil { + return ApplicationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ApplicationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ApplicationsClient) listHandleResponse(resp *http.Response) (ApplicationsClientListResponse, error) { + result := ApplicationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationList); err != nil { + return ApplicationsClientListResponse{}, err + } + return result, nil +} + +// Update - Update an application. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - applicationName - The name of the application within the specified application group +// - options - ApplicationsClientUpdateOptions contains the optional parameters for the ApplicationsClient.Update method. +func (client *ApplicationsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientUpdateOptions) (ApplicationsClientUpdateResponse, error) { + var err error + const operationName = "ApplicationsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, applicationGroupName, applicationName, options) + if err != nil { + return ApplicationsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *ApplicationsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + if applicationName == "" { + return nil, errors.New("parameter applicationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationName}", url.PathEscape(applicationName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Application != nil { + if err := runtime.MarshalAsJSON(req, *options.Application); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *ApplicationsClient) updateHandleResponse(resp *http.Response) (ApplicationsClientUpdateResponse, error) { + result := ApplicationsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Application); err != nil { + return ApplicationsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/autorest.md new file mode 100644 index 00000000..3071ba7d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/desktopvirtualization/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 2.3.0 +tag: package-2024-04 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/build.go new file mode 100644 index 00000000..d878f085 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -removeUnreferencedTypes resourcemanager/desktopvirtualization/armdesktopvirtualization + +package armdesktopvirtualization diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/ci.yml new file mode 100644 index 00000000..9e742f68 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/ci.yml @@ -0,0 +1,28 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/desktopvirtualization/armdesktopvirtualization' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/client_factory.go new file mode 100644 index 00000000..93da21c3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/client_factory.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewAppAttachPackageClient creates a new instance of AppAttachPackageClient. +func (c *ClientFactory) NewAppAttachPackageClient() *AppAttachPackageClient { + return &AppAttachPackageClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAppAttachPackageInfoClient creates a new instance of AppAttachPackageInfoClient. +func (c *ClientFactory) NewAppAttachPackageInfoClient() *AppAttachPackageInfoClient { + return &AppAttachPackageInfoClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewApplicationGroupsClient creates a new instance of ApplicationGroupsClient. +func (c *ClientFactory) NewApplicationGroupsClient() *ApplicationGroupsClient { + return &ApplicationGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewApplicationsClient creates a new instance of ApplicationsClient. +func (c *ClientFactory) NewApplicationsClient() *ApplicationsClient { + return &ApplicationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDesktopsClient creates a new instance of DesktopsClient. +func (c *ClientFactory) NewDesktopsClient() *DesktopsClient { + return &DesktopsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewHostPoolsClient creates a new instance of HostPoolsClient. +func (c *ClientFactory) NewHostPoolsClient() *HostPoolsClient { + return &HostPoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewMSIXPackagesClient creates a new instance of MSIXPackagesClient. +func (c *ClientFactory) NewMSIXPackagesClient() *MSIXPackagesClient { + return &MSIXPackagesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewMsixImagesClient creates a new instance of MsixImagesClient. +func (c *ClientFactory) NewMsixImagesClient() *MsixImagesClient { + return &MsixImagesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + return &PrivateEndpointConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + return &PrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewScalingPlanPersonalSchedulesClient creates a new instance of ScalingPlanPersonalSchedulesClient. +func (c *ClientFactory) NewScalingPlanPersonalSchedulesClient() *ScalingPlanPersonalSchedulesClient { + return &ScalingPlanPersonalSchedulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewScalingPlanPooledSchedulesClient creates a new instance of ScalingPlanPooledSchedulesClient. +func (c *ClientFactory) NewScalingPlanPooledSchedulesClient() *ScalingPlanPooledSchedulesClient { + return &ScalingPlanPooledSchedulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewScalingPlansClient creates a new instance of ScalingPlansClient. +func (c *ClientFactory) NewScalingPlansClient() *ScalingPlansClient { + return &ScalingPlansClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSessionHostsClient creates a new instance of SessionHostsClient. +func (c *ClientFactory) NewSessionHostsClient() *SessionHostsClient { + return &SessionHostsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewStartMenuItemsClient creates a new instance of StartMenuItemsClient. +func (c *ClientFactory) NewStartMenuItemsClient() *StartMenuItemsClient { + return &StartMenuItemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewUserSessionsClient creates a new instance of UserSessionsClient. +func (c *ClientFactory) NewUserSessionsClient() *UserSessionsClient { + return &UserSessionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWorkspacesClient creates a new instance of WorkspacesClient. +func (c *ClientFactory) NewWorkspacesClient() *WorkspacesClient { + return &WorkspacesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/constants.go new file mode 100644 index 00000000..c1f2b3f0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/constants.go @@ -0,0 +1,758 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization" + moduleVersion = "v2.3.0" +) + +// AppAttachPackageArchitectures - Possible device architectures that an app attach package can be configured for +type AppAttachPackageArchitectures string + +const ( + AppAttachPackageArchitecturesALL AppAttachPackageArchitectures = "ALL" + AppAttachPackageArchitecturesARM AppAttachPackageArchitectures = "ARM" + AppAttachPackageArchitecturesARM64 AppAttachPackageArchitectures = "ARM64" + AppAttachPackageArchitecturesNeutral AppAttachPackageArchitectures = "Neutral" + AppAttachPackageArchitecturesX64 AppAttachPackageArchitectures = "x64" + AppAttachPackageArchitecturesX86 AppAttachPackageArchitectures = "x86" + AppAttachPackageArchitecturesX86A64 AppAttachPackageArchitectures = "x86a64" +) + +// PossibleAppAttachPackageArchitecturesValues returns the possible values for the AppAttachPackageArchitectures const type. +func PossibleAppAttachPackageArchitecturesValues() []AppAttachPackageArchitectures { + return []AppAttachPackageArchitectures{ + AppAttachPackageArchitecturesALL, + AppAttachPackageArchitecturesARM, + AppAttachPackageArchitecturesARM64, + AppAttachPackageArchitecturesNeutral, + AppAttachPackageArchitecturesX64, + AppAttachPackageArchitecturesX86, + AppAttachPackageArchitecturesX86A64, + } +} + +// ApplicationGroupType - Resource Type of ApplicationGroup. +type ApplicationGroupType string + +const ( + ApplicationGroupTypeDesktop ApplicationGroupType = "Desktop" + ApplicationGroupTypeRemoteApp ApplicationGroupType = "RemoteApp" +) + +// PossibleApplicationGroupTypeValues returns the possible values for the ApplicationGroupType const type. +func PossibleApplicationGroupTypeValues() []ApplicationGroupType { + return []ApplicationGroupType{ + ApplicationGroupTypeDesktop, + ApplicationGroupTypeRemoteApp, + } +} + +// ApplicationType - Application type of application. +type ApplicationType string + +const ( + ApplicationTypeDesktop ApplicationType = "Desktop" + ApplicationTypeRemoteApp ApplicationType = "RemoteApp" +) + +// PossibleApplicationTypeValues returns the possible values for the ApplicationType const type. +func PossibleApplicationTypeValues() []ApplicationType { + return []ApplicationType{ + ApplicationTypeDesktop, + ApplicationTypeRemoteApp, + } +} + +// CommandLineSetting - Specifies whether this published application can be launched with command line arguments provided +// by the client, command line arguments specified at publish time, or no command line arguments at all. +type CommandLineSetting string + +const ( + CommandLineSettingAllow CommandLineSetting = "Allow" + CommandLineSettingDoNotAllow CommandLineSetting = "DoNotAllow" + CommandLineSettingRequire CommandLineSetting = "Require" +) + +// PossibleCommandLineSettingValues returns the possible values for the CommandLineSetting const type. +func PossibleCommandLineSettingValues() []CommandLineSetting { + return []CommandLineSetting{ + CommandLineSettingAllow, + CommandLineSettingDoNotAllow, + CommandLineSettingRequire, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// DayOfWeek - Day of the week. +type DayOfWeek string + +const ( + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{ + DayOfWeekFriday, + DayOfWeekMonday, + DayOfWeekSaturday, + DayOfWeekSunday, + DayOfWeekThursday, + DayOfWeekTuesday, + DayOfWeekWednesday, + } +} + +// FailHealthCheckOnStagingFailure - Parameter indicating how the health check should behave if this package fails staging +type FailHealthCheckOnStagingFailure string + +const ( + FailHealthCheckOnStagingFailureDoNotFail FailHealthCheckOnStagingFailure = "DoNotFail" + FailHealthCheckOnStagingFailureNeedsAssistance FailHealthCheckOnStagingFailure = "NeedsAssistance" + FailHealthCheckOnStagingFailureUnhealthy FailHealthCheckOnStagingFailure = "Unhealthy" +) + +// PossibleFailHealthCheckOnStagingFailureValues returns the possible values for the FailHealthCheckOnStagingFailure const type. +func PossibleFailHealthCheckOnStagingFailureValues() []FailHealthCheckOnStagingFailure { + return []FailHealthCheckOnStagingFailure{ + FailHealthCheckOnStagingFailureDoNotFail, + FailHealthCheckOnStagingFailureNeedsAssistance, + FailHealthCheckOnStagingFailureUnhealthy, + } +} + +// HealthCheckName - Represents the name of the health check operation performed. +type HealthCheckName string + +const ( + // HealthCheckNameAppAttachHealthCheck - Verifies that the AppAttachService is healthy (there were no issues during package + // staging). The AppAttachService is used to enable the staging/registration (and eventual deregistration/destaging) of MSIX + // apps that have been set up by the tenant admin. This checks whether the component had any failures during package staging. + // Failures in staging will prevent some MSIX apps from working properly for the end user. If this check fails, it is non + // fatal and the machine still can service connections, main issue may be certain apps will not work for end-users. (Currently + // Enabled) + HealthCheckNameAppAttachHealthCheck HealthCheckName = "AppAttachHealthCheck" + // HealthCheckNameDomainJoinedCheck - Verifies the SessionHost is joined to a domain. If this check fails is classified as + // fatal as no connection can succeed if the SessionHost is not joined to the domain. (Currently Enabled) + HealthCheckNameDomainJoinedCheck HealthCheckName = "DomainJoinedCheck" + // HealthCheckNameDomainReachable - Verifies the domain the SessionHost is joined to is still reachable. If this check fails + // is classified as fatal as no connection can succeed if the domain the SessionHost is joined is not reachable at the time + // of connection. (Currently Disabled) + HealthCheckNameDomainReachable HealthCheckName = "DomainReachable" + // HealthCheckNameDomainTrustCheck - Verifies the SessionHost is not experiencing domain trust issues that will prevent authentication + // on SessionHost at connection time when session is created. If this check fails is classified as fatal as no connection + // can succeed if we cannot reach the domain for authentication on the SessionHost. (Currently Enabled) + HealthCheckNameDomainTrustCheck HealthCheckName = "DomainTrustCheck" + // HealthCheckNameFSLogixHealthCheck - Verifies the FSLogix service is up and running to make sure users' profiles are loaded + // in the session. If this check fails is classified as fatal as even if the connection can succeed, user experience is bad + // as the user profile cannot be loaded and user will get a temporary profile in the session. (Currently Disabled) + HealthCheckNameFSLogixHealthCheck HealthCheckName = "FSLogixHealthCheck" + // HealthCheckNameMetaDataServiceCheck - Verifies the metadata service is accessible and return compute properties. (Currently + // Enabled) + HealthCheckNameMetaDataServiceCheck HealthCheckName = "MetaDataServiceCheck" + // HealthCheckNameMonitoringAgentCheck - Verifies that the required Geneva agent is running. If this check fails, it is non + // fatal and the machine still can service connections, main issue may be that monitoring agent is missing or running (possibly) + // older version. (Currently Enabled) + HealthCheckNameMonitoringAgentCheck HealthCheckName = "MonitoringAgentCheck" + // HealthCheckNameSupportedEncryptionCheck - Verifies the value of SecurityLayer registration key. If the value is 0 (SecurityLayer.RDP) + // this check fails with Error code = NativeMethodErrorCode.E_FAIL and is fatal. If the value is 1 (SecurityLayer.Negotiate) + // this check fails with Error code = NativeMethodErrorCode.ERROR_SUCCESS and is non fatal. (Currently Disabled) + HealthCheckNameSupportedEncryptionCheck HealthCheckName = "SupportedEncryptionCheck" + // HealthCheckNameSxSStackListenerCheck - Verifies that the SxS stack is up and running so connections can succeed. If this + // check fails is classified as fatal as no connection can succeed if the SxS stack is not ready. (Currently Enabled) + HealthCheckNameSxSStackListenerCheck HealthCheckName = "SxSStackListenerCheck" + // HealthCheckNameUrlsAccessibleCheck - Verifies that the required WVD service and Geneva URLs are reachable from the SessionHost. + // These URLs are: RdTokenUri, RdBrokerURI, RdDiagnosticsUri and storage blob URLs for agent monitoring (geneva). If this + // check fails, it is non fatal and the machine still can service connections, main issue may be that monitoring agent is + // unable to store warm path data (logs, operations ...). (Currently Disabled) + HealthCheckNameUrlsAccessibleCheck HealthCheckName = "UrlsAccessibleCheck" + // HealthCheckNameWebRTCRedirectorCheck - Verifies whether the WebRTCRedirector component is healthy. The WebRTCRedirector + // component is used to optimize video and audio performance in Microsoft Teams. This checks whether the component is still + // running, and whether there is a higher version available. If this check fails, it is non fatal and the machine still can + // service connections, main issue may be the WebRTCRedirector component has to be restarted or updated. (Currently Disabled) + HealthCheckNameWebRTCRedirectorCheck HealthCheckName = "WebRTCRedirectorCheck" +) + +// PossibleHealthCheckNameValues returns the possible values for the HealthCheckName const type. +func PossibleHealthCheckNameValues() []HealthCheckName { + return []HealthCheckName{ + HealthCheckNameAppAttachHealthCheck, + HealthCheckNameDomainJoinedCheck, + HealthCheckNameDomainReachable, + HealthCheckNameDomainTrustCheck, + HealthCheckNameFSLogixHealthCheck, + HealthCheckNameMetaDataServiceCheck, + HealthCheckNameMonitoringAgentCheck, + HealthCheckNameSupportedEncryptionCheck, + HealthCheckNameSxSStackListenerCheck, + HealthCheckNameUrlsAccessibleCheck, + HealthCheckNameWebRTCRedirectorCheck, + } +} + +// HealthCheckResult - Represents the Health state of the health check we performed. +type HealthCheckResult string + +const ( + // HealthCheckResultHealthCheckFailed - Health check failed. + HealthCheckResultHealthCheckFailed HealthCheckResult = "HealthCheckFailed" + // HealthCheckResultHealthCheckSucceeded - Health check passed. + HealthCheckResultHealthCheckSucceeded HealthCheckResult = "HealthCheckSucceeded" + // HealthCheckResultSessionHostShutdown - We received a Shutdown notification. + HealthCheckResultSessionHostShutdown HealthCheckResult = "SessionHostShutdown" + // HealthCheckResultUnknown - Health check result is not currently known. + HealthCheckResultUnknown HealthCheckResult = "Unknown" +) + +// PossibleHealthCheckResultValues returns the possible values for the HealthCheckResult const type. +func PossibleHealthCheckResultValues() []HealthCheckResult { + return []HealthCheckResult{ + HealthCheckResultHealthCheckFailed, + HealthCheckResultHealthCheckSucceeded, + HealthCheckResultSessionHostShutdown, + HealthCheckResultUnknown, + } +} + +// HostPoolType - HostPool type for desktop. +type HostPoolType string + +const ( + // HostPoolTypeBYODesktop - Users assign their own machines, load balancing logic remains the same as Personal. PersonalDesktopAssignmentType + // must be Direct. + HostPoolTypeBYODesktop HostPoolType = "BYODesktop" + // HostPoolTypePersonal - Users will be assigned a SessionHost either by administrators (PersonalDesktopAssignmentType = Direct) + // or upon connecting to the pool (PersonalDesktopAssignmentType = Automatic). They will always be redirected to their assigned + // SessionHost. + HostPoolTypePersonal HostPoolType = "Personal" + // HostPoolTypePooled - Users get a new (random) SessionHost every time it connects to the HostPool. + HostPoolTypePooled HostPoolType = "Pooled" +) + +// PossibleHostPoolTypeValues returns the possible values for the HostPoolType const type. +func PossibleHostPoolTypeValues() []HostPoolType { + return []HostPoolType{ + HostPoolTypeBYODesktop, + HostPoolTypePersonal, + HostPoolTypePooled, + } +} + +// HostpoolPublicNetworkAccess - Enabled allows this resource to be accessed from both public and private networks, Disabled +// allows this resource to only be accessed via private endpoints +type HostpoolPublicNetworkAccess string + +const ( + HostpoolPublicNetworkAccessDisabled HostpoolPublicNetworkAccess = "Disabled" + HostpoolPublicNetworkAccessEnabled HostpoolPublicNetworkAccess = "Enabled" + HostpoolPublicNetworkAccessEnabledForClientsOnly HostpoolPublicNetworkAccess = "EnabledForClientsOnly" + HostpoolPublicNetworkAccessEnabledForSessionHostsOnly HostpoolPublicNetworkAccess = "EnabledForSessionHostsOnly" +) + +// PossibleHostpoolPublicNetworkAccessValues returns the possible values for the HostpoolPublicNetworkAccess const type. +func PossibleHostpoolPublicNetworkAccessValues() []HostpoolPublicNetworkAccess { + return []HostpoolPublicNetworkAccess{ + HostpoolPublicNetworkAccessDisabled, + HostpoolPublicNetworkAccessEnabled, + HostpoolPublicNetworkAccessEnabledForClientsOnly, + HostpoolPublicNetworkAccessEnabledForSessionHostsOnly, + } +} + +// LoadBalancerType - The type of the load balancer. +type LoadBalancerType string + +const ( + LoadBalancerTypeBreadthFirst LoadBalancerType = "BreadthFirst" + LoadBalancerTypeDepthFirst LoadBalancerType = "DepthFirst" + LoadBalancerTypePersistent LoadBalancerType = "Persistent" +) + +// PossibleLoadBalancerTypeValues returns the possible values for the LoadBalancerType const type. +func PossibleLoadBalancerTypeValues() []LoadBalancerType { + return []LoadBalancerType{ + LoadBalancerTypeBreadthFirst, + LoadBalancerTypeDepthFirst, + LoadBalancerTypePersistent, + } +} + +// PackageTimestamped - Is package timestamped so it can ignore the certificate expiry date +type PackageTimestamped string + +const ( + PackageTimestampedNotTimestamped PackageTimestamped = "NotTimestamped" + PackageTimestampedTimestamped PackageTimestamped = "Timestamped" +) + +// PossiblePackageTimestampedValues returns the possible values for the PackageTimestamped const type. +func PossiblePackageTimestampedValues() []PackageTimestamped { + return []PackageTimestamped{ + PackageTimestampedNotTimestamped, + PackageTimestampedTimestamped, + } +} + +// PersonalDesktopAssignmentType - PersonalDesktopAssignment type for HostPool. +type PersonalDesktopAssignmentType string + +const ( + PersonalDesktopAssignmentTypeAutomatic PersonalDesktopAssignmentType = "Automatic" + PersonalDesktopAssignmentTypeDirect PersonalDesktopAssignmentType = "Direct" +) + +// PossiblePersonalDesktopAssignmentTypeValues returns the possible values for the PersonalDesktopAssignmentType const type. +func PossiblePersonalDesktopAssignmentTypeValues() []PersonalDesktopAssignmentType { + return []PersonalDesktopAssignmentType{ + PersonalDesktopAssignmentTypeAutomatic, + PersonalDesktopAssignmentTypeDirect, + } +} + +// PreferredAppGroupType - The type of preferred application group type, default to Desktop Application Group +type PreferredAppGroupType string + +const ( + PreferredAppGroupTypeDesktop PreferredAppGroupType = "Desktop" + PreferredAppGroupTypeNone PreferredAppGroupType = "None" + PreferredAppGroupTypeRailApplications PreferredAppGroupType = "RailApplications" +) + +// PossiblePreferredAppGroupTypeValues returns the possible values for the PreferredAppGroupType const type. +func PossiblePreferredAppGroupTypeValues() []PreferredAppGroupType { + return []PreferredAppGroupType{ + PreferredAppGroupTypeDesktop, + PreferredAppGroupTypeNone, + PreferredAppGroupTypeRailApplications, + } +} + +// PrivateEndpointConnectionProvisioningState - The current provisioning state. +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +// PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type. +func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { + return []PrivateEndpointConnectionProvisioningState{ + PrivateEndpointConnectionProvisioningStateCreating, + PrivateEndpointConnectionProvisioningStateDeleting, + PrivateEndpointConnectionProvisioningStateFailed, + PrivateEndpointConnectionProvisioningStateSucceeded, + } +} + +// PrivateEndpointServiceConnectionStatus - The private endpoint connection status. +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +// PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type. +func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { + return []PrivateEndpointServiceConnectionStatus{ + PrivateEndpointServiceConnectionStatusApproved, + PrivateEndpointServiceConnectionStatusPending, + PrivateEndpointServiceConnectionStatusRejected, + } +} + +// ProvisioningState - The current provisioning state. +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateProvisioning ProvisioningState = "Provisioning" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateCanceled, + ProvisioningStateFailed, + ProvisioningStateProvisioning, + ProvisioningStateSucceeded, + } +} + +// PublicNetworkAccess - Enabled allows this resource to be accessed from both public and private networks, Disabled allows +// this resource to only be accessed via private endpoints +type PublicNetworkAccess string + +const ( + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" +) + +// PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. +func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { + return []PublicNetworkAccess{ + PublicNetworkAccessDisabled, + PublicNetworkAccessEnabled, + } +} + +// RegistrationTokenOperation - The type of resetting the token. +type RegistrationTokenOperation string + +const ( + RegistrationTokenOperationDelete RegistrationTokenOperation = "Delete" + RegistrationTokenOperationNone RegistrationTokenOperation = "None" + RegistrationTokenOperationUpdate RegistrationTokenOperation = "Update" +) + +// PossibleRegistrationTokenOperationValues returns the possible values for the RegistrationTokenOperation const type. +func PossibleRegistrationTokenOperationValues() []RegistrationTokenOperation { + return []RegistrationTokenOperation{ + RegistrationTokenOperationDelete, + RegistrationTokenOperationNone, + RegistrationTokenOperationUpdate, + } +} + +// RemoteApplicationType - Resource Type of Application. +type RemoteApplicationType string + +const ( + RemoteApplicationTypeInBuilt RemoteApplicationType = "InBuilt" + RemoteApplicationTypeMsixApplication RemoteApplicationType = "MsixApplication" +) + +// PossibleRemoteApplicationTypeValues returns the possible values for the RemoteApplicationType const type. +func PossibleRemoteApplicationTypeValues() []RemoteApplicationType { + return []RemoteApplicationType{ + RemoteApplicationTypeInBuilt, + RemoteApplicationTypeMsixApplication, + } +} + +// SKUTier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but +// is not required on a PUT. +type SKUTier string + +const ( + SKUTierBasic SKUTier = "Basic" + SKUTierFree SKUTier = "Free" + SKUTierPremium SKUTier = "Premium" + SKUTierStandard SKUTier = "Standard" +) + +// PossibleSKUTierValues returns the possible values for the SKUTier const type. +func PossibleSKUTierValues() []SKUTier { + return []SKUTier{ + SKUTierBasic, + SKUTierFree, + SKUTierPremium, + SKUTierStandard, + } +} + +// SSOSecretType - The type of single sign on Secret Type. +type SSOSecretType string + +const ( + SSOSecretTypeCertificate SSOSecretType = "Certificate" + SSOSecretTypeCertificateInKeyVault SSOSecretType = "CertificateInKeyVault" + SSOSecretTypeSharedKey SSOSecretType = "SharedKey" + SSOSecretTypeSharedKeyInKeyVault SSOSecretType = "SharedKeyInKeyVault" +) + +// PossibleSSOSecretTypeValues returns the possible values for the SSOSecretType const type. +func PossibleSSOSecretTypeValues() []SSOSecretType { + return []SSOSecretType{ + SSOSecretTypeCertificate, + SSOSecretTypeCertificateInKeyVault, + SSOSecretTypeSharedKey, + SSOSecretTypeSharedKeyInKeyVault, + } +} + +// ScalingHostPoolType - HostPool type for desktop. +type ScalingHostPoolType string + +const ( + // ScalingHostPoolTypePooled - Users get a new (random) SessionHost every time it connects to the HostPool. + ScalingHostPoolTypePooled ScalingHostPoolType = "Pooled" +) + +// PossibleScalingHostPoolTypeValues returns the possible values for the ScalingHostPoolType const type. +func PossibleScalingHostPoolTypeValues() []ScalingHostPoolType { + return []ScalingHostPoolType{ + ScalingHostPoolTypePooled, + } +} + +type ScalingScheduleDaysOfWeekItem string + +const ( + ScalingScheduleDaysOfWeekItemFriday ScalingScheduleDaysOfWeekItem = "Friday" + ScalingScheduleDaysOfWeekItemMonday ScalingScheduleDaysOfWeekItem = "Monday" + ScalingScheduleDaysOfWeekItemSaturday ScalingScheduleDaysOfWeekItem = "Saturday" + ScalingScheduleDaysOfWeekItemSunday ScalingScheduleDaysOfWeekItem = "Sunday" + ScalingScheduleDaysOfWeekItemThursday ScalingScheduleDaysOfWeekItem = "Thursday" + ScalingScheduleDaysOfWeekItemTuesday ScalingScheduleDaysOfWeekItem = "Tuesday" + ScalingScheduleDaysOfWeekItemWednesday ScalingScheduleDaysOfWeekItem = "Wednesday" +) + +// PossibleScalingScheduleDaysOfWeekItemValues returns the possible values for the ScalingScheduleDaysOfWeekItem const type. +func PossibleScalingScheduleDaysOfWeekItemValues() []ScalingScheduleDaysOfWeekItem { + return []ScalingScheduleDaysOfWeekItem{ + ScalingScheduleDaysOfWeekItemFriday, + ScalingScheduleDaysOfWeekItemMonday, + ScalingScheduleDaysOfWeekItemSaturday, + ScalingScheduleDaysOfWeekItemSunday, + ScalingScheduleDaysOfWeekItemThursday, + ScalingScheduleDaysOfWeekItemTuesday, + ScalingScheduleDaysOfWeekItemWednesday, + } +} + +// SessionHandlingOperation - Action to be taken after a user disconnect during the ramp up period. +type SessionHandlingOperation string + +const ( + SessionHandlingOperationDeallocate SessionHandlingOperation = "Deallocate" + SessionHandlingOperationHibernate SessionHandlingOperation = "Hibernate" + SessionHandlingOperationNone SessionHandlingOperation = "None" +) + +// PossibleSessionHandlingOperationValues returns the possible values for the SessionHandlingOperation const type. +func PossibleSessionHandlingOperationValues() []SessionHandlingOperation { + return []SessionHandlingOperation{ + SessionHandlingOperationDeallocate, + SessionHandlingOperationHibernate, + SessionHandlingOperationNone, + } +} + +// SessionHostComponentUpdateType - The type of maintenance for session host components. +type SessionHostComponentUpdateType string + +const ( + // SessionHostComponentUpdateTypeDefault - Agent and other agent side components are delivery schedule is controlled by WVD + // Infra. + SessionHostComponentUpdateTypeDefault SessionHostComponentUpdateType = "Default" + // SessionHostComponentUpdateTypeScheduled - TenantAdmin have opted in for Scheduled Component Update feature. + SessionHostComponentUpdateTypeScheduled SessionHostComponentUpdateType = "Scheduled" +) + +// PossibleSessionHostComponentUpdateTypeValues returns the possible values for the SessionHostComponentUpdateType const type. +func PossibleSessionHostComponentUpdateTypeValues() []SessionHostComponentUpdateType { + return []SessionHostComponentUpdateType{ + SessionHostComponentUpdateTypeDefault, + SessionHostComponentUpdateTypeScheduled, + } +} + +// SessionHostLoadBalancingAlgorithm - Load balancing algorithm for ramp up period. +type SessionHostLoadBalancingAlgorithm string + +const ( + SessionHostLoadBalancingAlgorithmBreadthFirst SessionHostLoadBalancingAlgorithm = "BreadthFirst" + SessionHostLoadBalancingAlgorithmDepthFirst SessionHostLoadBalancingAlgorithm = "DepthFirst" +) + +// PossibleSessionHostLoadBalancingAlgorithmValues returns the possible values for the SessionHostLoadBalancingAlgorithm const type. +func PossibleSessionHostLoadBalancingAlgorithmValues() []SessionHostLoadBalancingAlgorithm { + return []SessionHostLoadBalancingAlgorithm{ + SessionHostLoadBalancingAlgorithmBreadthFirst, + SessionHostLoadBalancingAlgorithmDepthFirst, + } +} + +// SessionState - State of user session. +type SessionState string + +const ( + SessionStateActive SessionState = "Active" + SessionStateDisconnected SessionState = "Disconnected" + SessionStateLogOff SessionState = "LogOff" + SessionStatePending SessionState = "Pending" + SessionStateUnknown SessionState = "Unknown" + SessionStateUserProfileDiskMounted SessionState = "UserProfileDiskMounted" +) + +// PossibleSessionStateValues returns the possible values for the SessionState const type. +func PossibleSessionStateValues() []SessionState { + return []SessionState{ + SessionStateActive, + SessionStateDisconnected, + SessionStateLogOff, + SessionStatePending, + SessionStateUnknown, + SessionStateUserProfileDiskMounted, + } +} + +// SetStartVMOnConnect - The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this +// is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning them on +// manually. +type SetStartVMOnConnect string + +const ( + SetStartVMOnConnectDisable SetStartVMOnConnect = "Disable" + SetStartVMOnConnectEnable SetStartVMOnConnect = "Enable" +) + +// PossibleSetStartVMOnConnectValues returns the possible values for the SetStartVMOnConnect const type. +func PossibleSetStartVMOnConnectValues() []SetStartVMOnConnect { + return []SetStartVMOnConnect{ + SetStartVMOnConnectDisable, + SetStartVMOnConnectEnable, + } +} + +// StartupBehavior - The desired startup behavior during the ramp up period for personal vms in the hostpool. +type StartupBehavior string + +const ( + // StartupBehaviorAll - All personal session hosts in the hostpool will be started during ramp up. + StartupBehaviorAll StartupBehavior = "All" + // StartupBehaviorNone - Session hosts will not be started by the service. This setting depends on Start VM on Connect to + // be enabled to start the session hosts. + StartupBehaviorNone StartupBehavior = "None" + // StartupBehaviorWithAssignedUser - Session hosts with an assigned user will be started during Ramp Up + StartupBehaviorWithAssignedUser StartupBehavior = "WithAssignedUser" +) + +// PossibleStartupBehaviorValues returns the possible values for the StartupBehavior const type. +func PossibleStartupBehaviorValues() []StartupBehavior { + return []StartupBehavior{ + StartupBehaviorAll, + StartupBehaviorNone, + StartupBehaviorWithAssignedUser, + } +} + +// Status - Status for a SessionHost. +type Status string + +const ( + // StatusAvailable - Session Host has passed all the health checks and is available to handle connections. + StatusAvailable Status = "Available" + // StatusDisconnected - The Session Host is unavailable because it is currently disconnected. + StatusDisconnected Status = "Disconnected" + // StatusDomainTrustRelationshipLost - SessionHost's domain trust relationship lost + StatusDomainTrustRelationshipLost Status = "DomainTrustRelationshipLost" + // StatusFSLogixNotHealthy - FSLogix is in an unhealthy state on the session host. + StatusFSLogixNotHealthy Status = "FSLogixNotHealthy" + // StatusNeedsAssistance - New status to inform admins that the health on their endpoint needs to be fixed. The connections + // might not fail, as these issues are not fatal. + StatusNeedsAssistance Status = "NeedsAssistance" + // StatusNoHeartbeat - The Session Host is not heart beating. + StatusNoHeartbeat Status = "NoHeartbeat" + // StatusNotJoinedToDomain - SessionHost is not joined to domain. + StatusNotJoinedToDomain Status = "NotJoinedToDomain" + // StatusShutdown - Session Host is shutdown - RD Agent reported session host to be stopped or deallocated. + StatusShutdown Status = "Shutdown" + // StatusSxSStackListenerNotReady - SxS stack installed on the SessionHost is not ready to receive connections. + StatusSxSStackListenerNotReady Status = "SxSStackListenerNotReady" + // StatusUnavailable - Session Host is either turned off or has failed critical health checks which is causing service not + // to be able to route connections to this session host. Note this replaces previous 'NoHeartBeat' status. + StatusUnavailable Status = "Unavailable" + // StatusUpgradeFailed - Session Host is unavailable because the critical component upgrade (agent, side-by-side stack, etc.) + // failed. + StatusUpgradeFailed Status = "UpgradeFailed" + // StatusUpgrading - Session Host is unavailable because currently an upgrade of RDAgent/side-by-side stack is in progress. + // Note: this state will be removed once the upgrade completes and the host is able to accept connections. + StatusUpgrading Status = "Upgrading" +) + +// PossibleStatusValues returns the possible values for the Status const type. +func PossibleStatusValues() []Status { + return []Status{ + StatusAvailable, + StatusDisconnected, + StatusDomainTrustRelationshipLost, + StatusFSLogixNotHealthy, + StatusNeedsAssistance, + StatusNoHeartbeat, + StatusNotJoinedToDomain, + StatusShutdown, + StatusSxSStackListenerNotReady, + StatusUnavailable, + StatusUpgradeFailed, + StatusUpgrading, + } +} + +// StopHostsWhen - Specifies when to stop hosts during ramp down period. +type StopHostsWhen string + +const ( + StopHostsWhenZeroActiveSessions StopHostsWhen = "ZeroActiveSessions" + StopHostsWhenZeroSessions StopHostsWhen = "ZeroSessions" +) + +// PossibleStopHostsWhenValues returns the possible values for the StopHostsWhen const type. +func PossibleStopHostsWhenValues() []StopHostsWhen { + return []StopHostsWhen{ + StopHostsWhenZeroActiveSessions, + StopHostsWhenZeroSessions, + } +} + +// UpdateState - Update state of a SessionHost. +type UpdateState string + +const ( + UpdateStateFailed UpdateState = "Failed" + UpdateStateInitial UpdateState = "Initial" + UpdateStatePending UpdateState = "Pending" + UpdateStateStarted UpdateState = "Started" + UpdateStateSucceeded UpdateState = "Succeeded" +) + +// PossibleUpdateStateValues returns the possible values for the UpdateState const type. +func PossibleUpdateStateValues() []UpdateState { + return []UpdateState{ + UpdateStateFailed, + UpdateStateInitial, + UpdateStatePending, + UpdateStateStarted, + UpdateStateSucceeded, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/desktops_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/desktops_client.go new file mode 100644 index 00000000..fc7bebab --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/desktops_client.go @@ -0,0 +1,262 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// DesktopsClient contains the methods for the Desktops group. +// Don't use this type directly, use NewDesktopsClient() instead. +type DesktopsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDesktopsClient creates a new instance of DesktopsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDesktopsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DesktopsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DesktopsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get a desktop. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - desktopName - The name of the desktop within the specified desktop group +// - options - DesktopsClientGetOptions contains the optional parameters for the DesktopsClient.Get method. +func (client *DesktopsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientGetOptions) (DesktopsClientGetResponse, error) { + var err error + const operationName = "DesktopsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGroupName, desktopName, options) + if err != nil { + return DesktopsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DesktopsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DesktopsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DesktopsClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + if desktopName == "" { + return nil, errors.New("parameter desktopName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{desktopName}", url.PathEscape(desktopName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DesktopsClient) getHandleResponse(resp *http.Response) (DesktopsClientGetResponse, error) { + result := DesktopsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Desktop); err != nil { + return DesktopsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List desktops. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - options - DesktopsClientListOptions contains the optional parameters for the DesktopsClient.NewListPager method. +func (client *DesktopsClient) NewListPager(resourceGroupName string, applicationGroupName string, options *DesktopsClientListOptions) *runtime.Pager[DesktopsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DesktopsClientListResponse]{ + More: func(page DesktopsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DesktopsClientListResponse) (DesktopsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DesktopsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, applicationGroupName, options) + }, nil) + if err != nil { + return DesktopsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DesktopsClient) listCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *DesktopsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DesktopsClient) listHandleResponse(resp *http.Response) (DesktopsClientListResponse, error) { + result := DesktopsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DesktopList); err != nil { + return DesktopsClientListResponse{}, err + } + return result, nil +} + +// Update - Update a desktop. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - desktopName - The name of the desktop within the specified desktop group +// - options - DesktopsClientUpdateOptions contains the optional parameters for the DesktopsClient.Update method. +func (client *DesktopsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientUpdateOptions) (DesktopsClientUpdateResponse, error) { + var err error + const operationName = "DesktopsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, applicationGroupName, desktopName, options) + if err != nil { + return DesktopsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DesktopsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DesktopsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *DesktopsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + if desktopName == "" { + return nil, errors.New("parameter desktopName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{desktopName}", url.PathEscape(desktopName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Desktop != nil { + if err := runtime.MarshalAsJSON(req, *options.Desktop); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *DesktopsClient) updateHandleResponse(resp *http.Response) (DesktopsClientUpdateResponse, error) { + result := DesktopsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Desktop); err != nil { + return DesktopsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/hostpools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/hostpools_client.go new file mode 100644 index 00000000..ad6a0cf7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/hostpools_client.go @@ -0,0 +1,567 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// HostPoolsClient contains the methods for the HostPools group. +// Don't use this type directly, use NewHostPoolsClient() instead. +type HostPoolsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewHostPoolsClient creates a new instance of HostPoolsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewHostPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HostPoolsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &HostPoolsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or update a host pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - hostPool - Object containing HostPool definitions. +// - options - HostPoolsClientCreateOrUpdateOptions contains the optional parameters for the HostPoolsClient.CreateOrUpdate +// method. +func (client *HostPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostPoolName string, hostPool HostPool, options *HostPoolsClientCreateOrUpdateOptions) (HostPoolsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "HostPoolsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, hostPoolName, hostPool, options) + if err != nil { + return HostPoolsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return HostPoolsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return HostPoolsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *HostPoolsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, hostPool HostPool, options *HostPoolsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, hostPool); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *HostPoolsClient) createOrUpdateHandleResponse(resp *http.Response) (HostPoolsClientCreateOrUpdateResponse, error) { + result := HostPoolsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostPool); err != nil { + return HostPoolsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Remove a host pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - HostPoolsClientDeleteOptions contains the optional parameters for the HostPoolsClient.Delete method. +func (client *HostPoolsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientDeleteOptions) (HostPoolsClientDeleteResponse, error) { + var err error + const operationName = "HostPoolsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, hostPoolName, options) + if err != nil { + return HostPoolsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return HostPoolsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return HostPoolsClientDeleteResponse{}, err + } + return HostPoolsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *HostPoolsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a host pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - HostPoolsClientGetOptions contains the optional parameters for the HostPoolsClient.Get method. +func (client *HostPoolsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientGetOptions) (HostPoolsClientGetResponse, error) { + var err error + const operationName = "HostPoolsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, hostPoolName, options) + if err != nil { + return HostPoolsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return HostPoolsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HostPoolsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *HostPoolsClient) getCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *HostPoolsClient) getHandleResponse(resp *http.Response) (HostPoolsClientGetResponse, error) { + result := HostPoolsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostPool); err != nil { + return HostPoolsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List hostPools in subscription. +// +// Generated from API version 2024-04-03 +// - options - HostPoolsClientListOptions contains the optional parameters for the HostPoolsClient.NewListPager method. +func (client *HostPoolsClient) NewListPager(options *HostPoolsClientListOptions) *runtime.Pager[HostPoolsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[HostPoolsClientListResponse]{ + More: func(page HostPoolsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *HostPoolsClientListResponse) (HostPoolsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "HostPoolsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return HostPoolsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *HostPoolsClient) listCreateRequest(ctx context.Context, options *HostPoolsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/hostPools" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *HostPoolsClient) listHandleResponse(resp *http.Response) (HostPoolsClientListResponse, error) { + result := HostPoolsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostPoolList); err != nil { + return HostPoolsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - List hostPools. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - HostPoolsClientListByResourceGroupOptions contains the optional parameters for the HostPoolsClient.NewListByResourceGroupPager +// method. +func (client *HostPoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *HostPoolsClientListByResourceGroupOptions) *runtime.Pager[HostPoolsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[HostPoolsClientListByResourceGroupResponse]{ + More: func(page HostPoolsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *HostPoolsClientListByResourceGroupResponse) (HostPoolsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "HostPoolsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return HostPoolsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *HostPoolsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *HostPoolsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *HostPoolsClient) listByResourceGroupHandleResponse(resp *http.Response) (HostPoolsClientListByResourceGroupResponse, error) { + result := HostPoolsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostPoolList); err != nil { + return HostPoolsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// ListRegistrationTokens - Operation to list the RegistrationTokens associated with the HostPool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - HostPoolsClientListRegistrationTokensOptions contains the optional parameters for the HostPoolsClient.ListRegistrationTokens +// method. +func (client *HostPoolsClient) ListRegistrationTokens(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientListRegistrationTokensOptions) (HostPoolsClientListRegistrationTokensResponse, error) { + var err error + const operationName = "HostPoolsClient.ListRegistrationTokens" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listRegistrationTokensCreateRequest(ctx, resourceGroupName, hostPoolName, options) + if err != nil { + return HostPoolsClientListRegistrationTokensResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return HostPoolsClientListRegistrationTokensResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HostPoolsClientListRegistrationTokensResponse{}, err + } + resp, err := client.listRegistrationTokensHandleResponse(httpResp) + return resp, err +} + +// listRegistrationTokensCreateRequest creates the ListRegistrationTokens request. +func (client *HostPoolsClient) listRegistrationTokensCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientListRegistrationTokensOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/listRegistrationTokens" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listRegistrationTokensHandleResponse handles the ListRegistrationTokens response. +func (client *HostPoolsClient) listRegistrationTokensHandleResponse(resp *http.Response) (HostPoolsClientListRegistrationTokensResponse, error) { + result := HostPoolsClientListRegistrationTokensResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegistrationTokenList); err != nil { + return HostPoolsClientListRegistrationTokensResponse{}, err + } + return result, nil +} + +// RetrieveRegistrationToken - Registration token of the host pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - HostPoolsClientRetrieveRegistrationTokenOptions contains the optional parameters for the HostPoolsClient.RetrieveRegistrationToken +// method. +func (client *HostPoolsClient) RetrieveRegistrationToken(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientRetrieveRegistrationTokenOptions) (HostPoolsClientRetrieveRegistrationTokenResponse, error) { + var err error + const operationName = "HostPoolsClient.RetrieveRegistrationToken" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.retrieveRegistrationTokenCreateRequest(ctx, resourceGroupName, hostPoolName, options) + if err != nil { + return HostPoolsClientRetrieveRegistrationTokenResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return HostPoolsClientRetrieveRegistrationTokenResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HostPoolsClientRetrieveRegistrationTokenResponse{}, err + } + resp, err := client.retrieveRegistrationTokenHandleResponse(httpResp) + return resp, err +} + +// retrieveRegistrationTokenCreateRequest creates the RetrieveRegistrationToken request. +func (client *HostPoolsClient) retrieveRegistrationTokenCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientRetrieveRegistrationTokenOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/retrieveRegistrationToken" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// retrieveRegistrationTokenHandleResponse handles the RetrieveRegistrationToken response. +func (client *HostPoolsClient) retrieveRegistrationTokenHandleResponse(resp *http.Response) (HostPoolsClientRetrieveRegistrationTokenResponse, error) { + result := HostPoolsClientRetrieveRegistrationTokenResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegistrationInfo); err != nil { + return HostPoolsClientRetrieveRegistrationTokenResponse{}, err + } + return result, nil +} + +// Update - Update a host pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - HostPoolsClientUpdateOptions contains the optional parameters for the HostPoolsClient.Update method. +func (client *HostPoolsClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientUpdateOptions) (HostPoolsClientUpdateResponse, error) { + var err error + const operationName = "HostPoolsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, hostPoolName, options) + if err != nil { + return HostPoolsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return HostPoolsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HostPoolsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *HostPoolsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.HostPool != nil { + if err := runtime.MarshalAsJSON(req, *options.HostPool); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *HostPoolsClient) updateHandleResponse(resp *http.Response) (HostPoolsClientUpdateResponse, error) { + result := HostPoolsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HostPool); err != nil { + return HostPoolsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/models.go new file mode 100644 index 00000000..00d84932 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/models.go @@ -0,0 +1,1950 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import "time" + +// AgentUpdatePatchProperties - The session host configuration for updating agent, monitoring agent, and stack component. +type AgentUpdatePatchProperties struct { + // Time zone for maintenance as defined in https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.findsystemtimezonebyid?view=net-5.0. + // Must be set if useLocalTime is true. + MaintenanceWindowTimeZone *string + + // List of maintenance windows. Maintenance windows are 2 hours long. + MaintenanceWindows []*MaintenanceWindowPatchProperties + + // The type of maintenance for session host components. + Type *SessionHostComponentUpdateType + + // Whether to use localTime of the virtual machine. + UseSessionHostLocalTime *bool +} + +// AgentUpdateProperties - The session host configuration for updating agent, monitoring agent, and stack component. +type AgentUpdateProperties struct { + // Time zone for maintenance as defined in https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.findsystemtimezonebyid?view=net-5.0. + // Must be set if useLocalTime is true. + MaintenanceWindowTimeZone *string + + // List of maintenance windows. Maintenance windows are 2 hours long. + MaintenanceWindows []*MaintenanceWindowProperties + + // The type of maintenance for session host components. + Type *SessionHostComponentUpdateType + + // Whether to use localTime of the virtual machine. + UseSessionHostLocalTime *bool +} + +// AppAttachPackage - Schema for App Attach Package properties. +type AppAttachPackage struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; Detailed properties for App Attach Package + Properties *AppAttachPackageProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AppAttachPackageInfoProperties - Schema for Import Package Information properties. +type AppAttachPackageInfoProperties struct { + // Date certificate expires, found in the appxmanifest.xml. + CertificateExpiry *time.Time + + // Certificate name found in the appxmanifest.xml. + CertificateName *string + + // User friendly Name to be displayed in the portal. + DisplayName *string + + // VHD/CIM image path on Network Share. + ImagePath *string + + // Make this version of the package the active one across the hostpool. + IsActive *bool + + // Is package timestamped so it can ignore the certificate expiry date + IsPackageTimestamped *PackageTimestamped + + // Specifies how to register Package in feed. + IsRegularRegistration *bool + + // Date Package was last updated, found in the appxmanifest.xml. + LastUpdated *time.Time + + // Alias of App Attach Package. Assigned at import time + PackageAlias *string + + // List of package applications. + PackageApplications []*MsixPackageApplications + + // List of package dependencies. + PackageDependencies []*MsixPackageDependencies + + // Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. + PackageFamilyName *string + + // Package Full Name from appxmanifest.xml. + PackageFullName *string + + // Package Name from appxmanifest.xml. + PackageName *string + + // Relative Path to the package inside the image. + PackageRelativePath *string + + // Package version found in the appxmanifest.xml. + Version *string +} + +// AppAttachPackageList - List of App Attach Package definitions. +type AppAttachPackageList struct { + // List of App Attach Package definitions. + Value []*AppAttachPackage + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// AppAttachPackagePatch - Schema for updatable App Attach Package properties. +type AppAttachPackagePatch struct { + // Detailed properties for App Attach Package + Properties *AppAttachPackagePatchProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AppAttachPackagePatchProperties - Schema for patchable fields on an App Attach Package. +type AppAttachPackagePatchProperties struct { + // Parameter indicating how the health check should behave if this package fails staging + FailHealthCheckOnStagingFailure *FailHealthCheckOnStagingFailure + + // List of Hostpool resource Ids. + HostPoolReferences []*string + + // Detailed properties for App Attach Package + Image *AppAttachPackageInfoProperties + + // URL path to certificate name located in keyVault + KeyVaultURL *string +} + +// AppAttachPackageProperties - Schema for App Attach Package properties. +type AppAttachPackageProperties struct { + // Parameter indicating how the health check should behave if this package fails staging + FailHealthCheckOnStagingFailure *FailHealthCheckOnStagingFailure + + // List of Hostpool resource Ids. + HostPoolReferences []*string + + // Detailed properties for App Attach Package + Image *AppAttachPackageInfoProperties + + // URL path to certificate name located in keyVault + KeyVaultURL *string + + // READ-ONLY; The provisioning state of the App Attach Package. + ProvisioningState *ProvisioningState +} + +// Application - Schema for Application properties. +type Application struct { + // REQUIRED; Detailed properties for Application + Properties *ApplicationProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ApplicationGroup - Represents a ApplicationGroup definition. +type ApplicationGroup struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; Detailed properties for ApplicationGroup + Properties *ApplicationGroupProperties + Identity *ResourceModelWithAllowedPropertySetIdentity + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are + // a kind of Microsoft.Web/sites type. If supported, the resource provider must + // validate and persist this value. + Kind *string + + // The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another + // Azure resource. If this is present, complete mode deployment will not + // delete the resource if it is removed from the template since it is managed by another resource. + ManagedBy *string + Plan *ResourceModelWithAllowedPropertySetPlan + SKU *ResourceModelWithAllowedPropertySetSKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header + // per the normal etag convention. Entity tags are used for comparing two or more entities + // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match + // (section 14.26), and If-Range (section 14.27) header fields. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ApplicationGroupList - List of ApplicationGroup definitions. +type ApplicationGroupList struct { + // List of ApplicationGroup definitions. + Value []*ApplicationGroup + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// ApplicationGroupPatch - ApplicationGroup properties that can be patched. +type ApplicationGroupPatch struct { + // ApplicationGroup properties that can be patched. + Properties *ApplicationGroupPatchProperties + + // tags to be updated + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ApplicationGroupPatchProperties - ApplicationGroup properties that can be patched. +type ApplicationGroupPatchProperties struct { + // Description of ApplicationGroup. + Description *string + + // Friendly name of ApplicationGroup. + FriendlyName *string + + // Boolean representing whether the applicationGroup is show in the feed. + ShowInFeed *bool +} + +// ApplicationGroupProperties - Schema for ApplicationGroup properties. +type ApplicationGroupProperties struct { + // REQUIRED; Resource Type of ApplicationGroup. + ApplicationGroupType *ApplicationGroupType + + // REQUIRED; HostPool arm path of ApplicationGroup. + HostPoolArmPath *string + + // Description of ApplicationGroup. + Description *string + + // Friendly name of ApplicationGroup. + FriendlyName *string + + // Boolean representing whether the applicationGroup is show in the feed. + ShowInFeed *bool + + // READ-ONLY; Is cloud pc resource. + CloudPcResource *bool + + // READ-ONLY; ObjectId of ApplicationGroup. (internal use) + ObjectID *string + + // READ-ONLY; Workspace arm path of ApplicationGroup. + WorkspaceArmPath *string +} + +// ApplicationList - List of Application definitions. +type ApplicationList struct { + // List of Application definitions. + Value []*Application + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// ApplicationPatch - Application properties that can be patched. +type ApplicationPatch struct { + // Detailed properties for Application + Properties *ApplicationPatchProperties + + // tags to be updated + Tags map[string]*string +} + +// ApplicationPatchProperties - Application properties that can be patched. +type ApplicationPatchProperties struct { + // Resource Type of Application. + ApplicationType *RemoteApplicationType + + // Command Line Arguments for Application. + CommandLineArguments *string + + // Specifies whether this published application can be launched with command line arguments provided by the client, command + // line arguments specified at publish time, or no command line arguments at all. + CommandLineSetting *CommandLineSetting + + // Description of Application. + Description *string + + // Specifies a path for the executable file for the application. + FilePath *string + + // Friendly name of Application. + FriendlyName *string + + // Index of the icon. + IconIndex *int32 + + // Path to icon. + IconPath *string + + // Specifies the package application Id for MSIX applications + MsixPackageApplicationID *string + + // Specifies the package family name for MSIX applications + MsixPackageFamilyName *string + + // Specifies whether to show the RemoteApp program in the RD Web Access server. + ShowInPortal *bool +} + +// ApplicationProperties - Schema for Application properties. +type ApplicationProperties struct { + // REQUIRED; Specifies whether this published application can be launched with command line arguments provided by the client, + // command line arguments specified at publish time, or no command line arguments at all. + CommandLineSetting *CommandLineSetting + + // Resource Type of Application. + ApplicationType *RemoteApplicationType + + // Command Line Arguments for Application. + CommandLineArguments *string + + // Description of Application. + Description *string + + // Specifies a path for the executable file for the application. + FilePath *string + + // Friendly name of Application. + FriendlyName *string + + // Index of the icon. + IconIndex *int32 + + // Path to icon. + IconPath *string + + // Specifies the package application Id for MSIX applications + MsixPackageApplicationID *string + + // Specifies the package family name for MSIX applications + MsixPackageFamilyName *string + + // Specifies whether to show the RemoteApp program in the RD Web Access server. + ShowInPortal *bool + + // READ-ONLY; the icon a 64 bit string as a byte array. + IconContent []byte + + // READ-ONLY; Hash of the icon. + IconHash *string + + // READ-ONLY; ObjectId of Application. (internal use) + ObjectID *string +} + +// Desktop - Schema for Desktop properties. +type Desktop struct { + // Detailed properties for Desktop + Properties *DesktopProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// DesktopList - List of Desktop definitions. +type DesktopList struct { + // List of Desktop definitions. + Value []*Desktop + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// DesktopPatch - Desktop properties that can be patched. +type DesktopPatch struct { + // Detailed properties for Desktop + Properties *DesktopPatchProperties + + // tags to be updated + Tags map[string]*string +} + +// DesktopPatchProperties - Desktop properties that can be patched. +type DesktopPatchProperties struct { + // Description of Desktop. + Description *string + + // Friendly name of Desktop. + FriendlyName *string +} + +// DesktopProperties - Schema for Desktop properties. +type DesktopProperties struct { + // Description of Desktop. + Description *string + + // Friendly name of Desktop. + FriendlyName *string + + // READ-ONLY; The icon a 64 bit string as a byte array. + IconContent []byte + + // READ-ONLY; Hash of the icon. + IconHash *string + + // READ-ONLY; ObjectId of Desktop. (internal use) + ObjectID *string +} + +// ExpandMsixImage - Represents the definition of contents retrieved after expanding the MSIX Image. +type ExpandMsixImage struct { + // Detailed properties for ExpandMsixImage + Properties *ExpandMsixImageProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ExpandMsixImageList - List of MSIX package properties retrieved from MSIX Image expansion. +type ExpandMsixImageList struct { + // List of MSIX package properties from give MSIX Image. + Value []*ExpandMsixImage + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// ExpandMsixImageProperties - Schema for Expand MSIX Image properties. +type ExpandMsixImageProperties struct { + // Date certificate expires, found in the appxmanifest.xml. + CertificateExpiry *time.Time + + // Certificate name found in the appxmanifest.xml. + CertificateName *string + + // User friendly Name to be displayed in the portal. + DisplayName *string + + // VHD/CIM image path on Network Share. + ImagePath *string + + // Make this version of the package the active one across the hostpool. + IsActive *bool + + // Specifies how to register Package in feed. + IsRegularRegistration *bool + + // Date Package was last updated, found in the appxmanifest.xml. + LastUpdated *time.Time + + // Alias of MSIX Package. + PackageAlias *string + + // List of package applications. + PackageApplications []*MsixPackageApplications + + // List of package dependencies. + PackageDependencies []*MsixPackageDependencies + + // Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. + PackageFamilyName *string + + // Package Full Name from appxmanifest.xml. + PackageFullName *string + + // Package Name from appxmanifest.xml. + PackageName *string + + // Relative Path to the package inside the image. + PackageRelativePath *string + + // Package version found in the appxmanifest.xml. + Version *string +} + +// HostPool - Represents a HostPool definition. +type HostPool struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; Detailed properties for HostPool + Properties *HostPoolProperties + Identity *ResourceModelWithAllowedPropertySetIdentity + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are + // a kind of Microsoft.Web/sites type. If supported, the resource provider must + // validate and persist this value. + Kind *string + + // The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another + // Azure resource. If this is present, complete mode deployment will not + // delete the resource if it is removed from the template since it is managed by another resource. + ManagedBy *string + Plan *ResourceModelWithAllowedPropertySetPlan + SKU *ResourceModelWithAllowedPropertySetSKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header + // per the normal etag convention. Entity tags are used for comparing two or more entities + // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match + // (section 14.26), and If-Range (section 14.27) header fields. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// HostPoolList - List of HostPool definitions. +type HostPoolList struct { + // List of HostPool definitions. + Value []*HostPool + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// HostPoolPatch - HostPool properties that can be patched. +type HostPoolPatch struct { + // HostPool properties that can be patched. + Properties *HostPoolPatchProperties + + // tags to be updated + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// HostPoolPatchProperties - Properties of HostPool. +type HostPoolPatchProperties struct { + // The session host configuration for updating agent, monitoring agent, and stack component. + AgentUpdate *AgentUpdatePatchProperties + + // Custom rdp property of HostPool. + CustomRdpProperty *string + + // Description of HostPool. + Description *string + + // Friendly name of HostPool. + FriendlyName *string + + // The type of the load balancer. + LoadBalancerType *LoadBalancerType + + // The max session limit of HostPool. + MaxSessionLimit *int32 + + // PersonalDesktopAssignment type for HostPool. + PersonalDesktopAssignmentType *PersonalDesktopAssignmentType + + // The type of preferred application group type, default to Desktop Application Group + PreferredAppGroupType *PreferredAppGroupType + + // Enabled to allow this resource to be access from the public network + PublicNetworkAccess *HostpoolPublicNetworkAccess + + // The registration info of HostPool. + RegistrationInfo *RegistrationInfoPatch + + // The ring number of HostPool. + Ring *int32 + + // ClientId for the registered Relying Party used to issue WVD SSO certificates. + SsoClientID *string + + // Path to Azure KeyVault storing the secret used for communication to ADFS. + SsoClientSecretKeyVaultPath *string + + // The type of single sign on Secret Type. + SsoSecretType *SSOSecretType + + // URL to customer ADFS server for signing WVD SSO certificates. + SsoadfsAuthority *string + + // The flag to turn on/off StartVMOnConnect feature. + StartVMOnConnect *bool + + // VM template for sessionhosts configuration within hostpool. + VMTemplate *string + + // Is validation environment. + ValidationEnvironment *bool +} + +// HostPoolProperties - Properties of HostPool. +type HostPoolProperties struct { + // REQUIRED; HostPool type for desktop. + HostPoolType *HostPoolType + + // REQUIRED; The type of the load balancer. + LoadBalancerType *LoadBalancerType + + // REQUIRED; The type of preferred application group type, default to Desktop Application Group + PreferredAppGroupType *PreferredAppGroupType + + // The session host configuration for updating agent, monitoring agent, and stack component. + AgentUpdate *AgentUpdateProperties + + // Custom rdp property of HostPool. + CustomRdpProperty *string + + // Description of HostPool. + Description *string + + // Friendly name of HostPool. + FriendlyName *string + + // The max session limit of HostPool. + MaxSessionLimit *int32 + + // PersonalDesktopAssignment type for HostPool. + PersonalDesktopAssignmentType *PersonalDesktopAssignmentType + + // Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only + // be accessed via private endpoints + PublicNetworkAccess *HostpoolPublicNetworkAccess + + // The registration info of HostPool. + RegistrationInfo *RegistrationInfo + + // The ring number of HostPool. + Ring *int32 + + // ClientId for the registered Relying Party used to issue WVD SSO certificates. + SsoClientID *string + + // Path to Azure KeyVault storing the secret used for communication to ADFS. + SsoClientSecretKeyVaultPath *string + + // The type of single sign on Secret Type. + SsoSecretType *SSOSecretType + + // URL to customer ADFS server for signing WVD SSO certificates. + SsoadfsAuthority *string + + // The flag to turn on/off StartVMOnConnect feature. + StartVMOnConnect *bool + + // VM template for sessionhosts configuration within hostpool. + VMTemplate *string + + // Is validation environment. + ValidationEnvironment *bool + + // READ-ONLY; List of App Attach Package links. + AppAttachPackageReferences []*string + + // READ-ONLY; List of applicationGroup links. + ApplicationGroupReferences []*string + + // READ-ONLY; Is cloud pc resource. + CloudPcResource *bool + + // READ-ONLY; ObjectId of HostPool. (internal use) + ObjectID *string + + // READ-ONLY; List of private endpoint connection associated with the specified resource + PrivateEndpointConnections []*PrivateEndpointConnection +} + +// ImportPackageInfoRequest - Information to import app attach package +type ImportPackageInfoRequest struct { + // Possible device architectures that an app attach package can be configured for + PackageArchitecture *AppAttachPackageArchitectures + + // URI to Image + Path *string +} + +// LogSpecification - Specifications of the Log for Azure Monitoring +type LogSpecification struct { + // Blob duration of the log + BlobDuration *string + + // Localized friendly display name of the log + DisplayName *string + + // Name of the log + Name *string +} + +// MSIXImageURI - Represents URI referring to MSIX Image +type MSIXImageURI struct { + // URI to Image + URI *string +} + +// MSIXPackage - Schema for MSIX Package properties. +type MSIXPackage struct { + // REQUIRED; Detailed properties for MSIX Package + Properties *MSIXPackageProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// MSIXPackageList - List of MSIX Package definitions. +type MSIXPackageList struct { + // List of MSIX Package definitions. + Value []*MSIXPackage + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// MSIXPackagePatch - MSIX Package properties that can be patched. +type MSIXPackagePatch struct { + // Detailed properties for MSIX Package + Properties *MSIXPackagePatchProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// MSIXPackagePatchProperties - MSIX Package properties that can be patched. +type MSIXPackagePatchProperties struct { + // Display name for MSIX Package. + DisplayName *string + + // Set a version of the package to be active across hostpool. + IsActive *bool + + // Set Registration mode. Regular or Delayed. + IsRegularRegistration *bool +} + +// MSIXPackageProperties - Schema for MSIX Package properties. +type MSIXPackageProperties struct { + // User friendly Name to be displayed in the portal. + DisplayName *string + + // VHD/CIM image path on Network Share. + ImagePath *string + + // Make this version of the package the active one across the hostpool. + IsActive *bool + + // Specifies how to register Package in feed. + IsRegularRegistration *bool + + // Date Package was last updated, found in the appxmanifest.xml. + LastUpdated *time.Time + + // List of package applications. + PackageApplications []*MsixPackageApplications + + // List of package dependencies. + PackageDependencies []*MsixPackageDependencies + + // Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. + PackageFamilyName *string + + // Package Name from appxmanifest.xml. + PackageName *string + + // Relative Path to the package inside the image. + PackageRelativePath *string + + // Package version found in the appxmanifest.xml. + Version *string +} + +// MaintenanceWindowPatchProperties - Maintenance window starting hour and day of week. +type MaintenanceWindowPatchProperties struct { + // Day of the week. + DayOfWeek *DayOfWeek + + // The update start hour of the day. (0 - 23) + Hour *int32 +} + +// MaintenanceWindowProperties - Maintenance window starting hour and day of week. +type MaintenanceWindowProperties struct { + // Day of the week. + DayOfWeek *DayOfWeek + + // The update start hour of the day. (0 - 23) + Hour *int32 +} + +// MsixPackageApplications - Schema for MSIX Package Application properties. +type MsixPackageApplications struct { + // Package Application Id, found in appxmanifest.xml. + AppID *string + + // Used to activate Package Application. Consists of Package Name and ApplicationID. Found in appxmanifest.xml. + AppUserModelID *string + + // Description of Package Application. + Description *string + + // User friendly name. + FriendlyName *string + + // User friendly name. + IconImageName *string + + // the icon a 64 bit string as a byte array. + RawIcon []byte + + // the icon a 64 bit string as a byte array. + RawPNG []byte +} + +// MsixPackageDependencies - Schema for MSIX Package Dependencies properties. +type MsixPackageDependencies struct { + // Name of package dependency. + DependencyName *string + + // Dependency version required. + MinVersion *string + + // Name of dependency publisher. + Publisher *string +} + +// OperationProperties - Properties of the operation +type OperationProperties struct { + // Service specification payload + ServiceSpecification *ServiceSpecification +} + +// PrivateEndpoint - The private endpoint resource. +type PrivateEndpoint struct { + // READ-ONLY; The ARM identifier for private endpoint. + ID *string +} + +// PrivateEndpointConnection - The private endpoint connection resource. +type PrivateEndpointConnection struct { + // Resource properties. + Properties *PrivateEndpointConnectionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PrivateEndpointConnectionListResultWithSystemData - List of private endpoint connection associated with the specified storage +// account +type PrivateEndpointConnectionListResultWithSystemData struct { + // Array of private endpoint connections + Value []*PrivateEndpointConnectionWithSystemData + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// PrivateEndpointConnectionProperties - Properties of the private endpoint connection. +type PrivateEndpointConnectionProperties struct { + // REQUIRED; A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState + + // The private endpoint resource. + PrivateEndpoint *PrivateEndpoint + + // READ-ONLY; The group ids for the private endpoint resource. + GroupIDs []*string + + // READ-ONLY; The provisioning state of the private endpoint connection resource. + ProvisioningState *PrivateEndpointConnectionProvisioningState +} + +// PrivateEndpointConnectionWithSystemData - The Private Endpoint Connection resource. +type PrivateEndpointConnectionWithSystemData struct { + // Resource properties. + Properties *PrivateEndpointConnectionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PrivateLinkResource - A private link resource +type PrivateLinkResource struct { + // Resource properties. + Properties *PrivateLinkResourceProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PrivateLinkResourceListResult - A list of private link resources +type PrivateLinkResourceListResult struct { + // Array of private link resources + Value []*PrivateLinkResource + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// PrivateLinkResourceProperties - Properties of a private link resource. +type PrivateLinkResourceProperties struct { + // The private link resource Private link DNS zone name. + RequiredZoneNames []*string + + // READ-ONLY; The private link resource group id. + GroupID *string + + // READ-ONLY; The private link resource required member names. + RequiredMembers []*string +} + +// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer +// and provider. +type PrivateLinkServiceConnectionState struct { + // A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *string + + // The reason for approval/rejection of the connection. + Description *string + + // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + Status *PrivateEndpointServiceConnectionStatus +} + +// RegistrationInfo - Represents a RegistrationInfo definition. +type RegistrationInfo struct { + // Expiration time of registration token. + ExpirationTime *time.Time + + // The type of resetting the token. + RegistrationTokenOperation *RegistrationTokenOperation + + // The registration token base64 encoded string. + Token *string +} + +// RegistrationInfoPatch - Represents a RegistrationInfo definition. +type RegistrationInfoPatch struct { + // Expiration time of registration token. + ExpirationTime *time.Time + + // The type of resetting the token. + RegistrationTokenOperation *RegistrationTokenOperation +} + +// RegistrationTokenList - List of RegistrationToken definitions. +type RegistrationTokenList struct { + // List of RegistrationToken definitions. + Value []*RegistrationTokenMinimal + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// RegistrationTokenMinimal - Represents a Minimal set of properties for RegistrationToken definition. +type RegistrationTokenMinimal struct { + // Expiration time of registration token. + ExpirationTime *time.Time + + // The registration token base64 encoded string. + Token *string +} + +type ResourceModelWithAllowedPropertySetIdentity struct { + // The identity type. + Type *string + + // READ-ONLY; The principal ID of resource identity. The value must be an UUID. + PrincipalID *string + + // READ-ONLY; The tenant ID of resource. The value must be an UUID. + TenantID *string +} + +type ResourceModelWithAllowedPropertySetPlan struct { + // REQUIRED; A user defined name of the 3rd Party Artifact that is being procured. + Name *string + + // REQUIRED; The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact + // at the time of Data Market onboarding. + Product *string + + // REQUIRED; The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + Publisher *string + + // A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + PromotionCode *string + + // The version of the desired product/artifact. + Version *string +} + +type ResourceModelWithAllowedPropertySetSKU struct { + // REQUIRED; The name of the SKU. E.g. P3. It is typically a letter+number code + Name *string + + // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + // resource this may be omitted. + Capacity *int32 + + // If the service has different generations of hardware, for the same SKU, then that can be captured here. + Family *string + + // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + Size *string + + // This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + // on a PUT. + Tier *SKUTier +} + +// ResourceProviderOperation - Supported operation of this resource provider. +type ResourceProviderOperation struct { + // Display metadata associated with the operation. + Display *ResourceProviderOperationDisplay + + // Is a data action. + IsDataAction *bool + + // Operation name, in format of {provider}/{resource}/{operation} + Name *string + + // Properties of the operation + Properties *OperationProperties +} + +// ResourceProviderOperationDisplay - Display metadata associated with the operation. +type ResourceProviderOperationDisplay struct { + // Description of this operation. + Description *string + + // Type of operation: get, read, delete, etc. + Operation *string + + // Resource provider: Microsoft Desktop Virtualization. + Provider *string + + // Resource on which the operation is performed. + Resource *string +} + +// ResourceProviderOperationList - Result of the request to list operations. +type ResourceProviderOperationList struct { + // List of operations supported by this resource provider. + Value []*ResourceProviderOperation + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// ScalingHostPoolReference - Scaling plan reference to hostpool. +type ScalingHostPoolReference struct { + // Arm path of referenced hostpool. + HostPoolArmPath *string + + // Is the scaling plan enabled for this hostpool. + ScalingPlanEnabled *bool +} + +// ScalingPlan - Represents a scaling plan definition. +type ScalingPlan struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; Detailed properties for scaling plan. + Properties *ScalingPlanProperties + Identity *ResourceModelWithAllowedPropertySetIdentity + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are + // a kind of Microsoft.Web/sites type. If supported, the resource provider must + // validate and persist this value. + Kind *string + + // The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another + // Azure resource. If this is present, complete mode deployment will not + // delete the resource if it is removed from the template since it is managed by another resource. + ManagedBy *string + Plan *ResourceModelWithAllowedPropertySetPlan + SKU *ResourceModelWithAllowedPropertySetSKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header + // per the normal etag convention. Entity tags are used for comparing two or more entities + // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match + // (section 14.26), and If-Range (section 14.27) header fields. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ScalingPlanList - List of scaling plan definitions. +type ScalingPlanList struct { + // List of scaling plan definitions. + Value []*ScalingPlan + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// ScalingPlanPatch - Scaling plan properties that can be patched. +type ScalingPlanPatch struct { + // Detailed properties for scaling plan + Properties *ScalingPlanPatchProperties + + // tags to be updated + Tags map[string]*string +} + +// ScalingPlanPatchProperties - Scaling plan properties. +type ScalingPlanPatchProperties struct { + // Description of scaling plan. + Description *string + + // Exclusion tag for scaling plan. + ExclusionTag *string + + // User friendly name of scaling plan. + FriendlyName *string + + // List of ScalingHostPoolReference definitions. + HostPoolReferences []*ScalingHostPoolReference + + // List of ScalingSchedule definitions. + Schedules []*ScalingSchedule + + // Timezone of the scaling plan. + TimeZone *string +} + +// ScalingPlanPersonalSchedule - Represents a ScalingPlanPersonalSchedule definition. +type ScalingPlanPersonalSchedule struct { + // REQUIRED; Detailed properties for ScalingPlanPersonalSchedule + Properties *ScalingPlanPersonalScheduleProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ScalingPlanPersonalScheduleList - List of ScalingPlanPersonalSchedule definitions. +type ScalingPlanPersonalScheduleList struct { + // List of ScalingPlanPersonalSchedule definitions. + Value []*ScalingPlanPersonalSchedule + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// ScalingPlanPersonalSchedulePatch - ScalingPlanPersonalSchedule properties that can be patched. +type ScalingPlanPersonalSchedulePatch struct { + // Detailed properties for ScalingPlanPersonalSchedule + Properties *ScalingPlanPersonalScheduleProperties +} + +// ScalingPlanPersonalScheduleProperties - A ScalingPlanPersonalSchedule. +type ScalingPlanPersonalScheduleProperties struct { + // Set of days of the week on which this schedule is active. + DaysOfWeek []*DayOfWeek + + // Action to be taken after a user disconnect during the off-peak period. + OffPeakActionOnDisconnect *SessionHandlingOperation + + // Action to be taken after a logoff during the off-peak period. + OffPeakActionOnLogoff *SessionHandlingOperation + + // The time in minutes to wait before performing the desired session handling action when a user disconnects during the off-peak + // period. + OffPeakMinutesToWaitOnDisconnect *int32 + + // The time in minutes to wait before performing the desired session handling action when a user logs off during the off-peak + // period. + OffPeakMinutesToWaitOnLogoff *int32 + + // Starting time for off-peak period. + OffPeakStartTime *Time + + // The desired configuration of Start VM On Connect for the hostpool during the off-peak phase. + OffPeakStartVMOnConnect *SetStartVMOnConnect + + // Action to be taken after a user disconnect during the peak period. + PeakActionOnDisconnect *SessionHandlingOperation + + // Action to be taken after a logoff during the peak period. + PeakActionOnLogoff *SessionHandlingOperation + + // The time in minutes to wait before performing the desired session handling action when a user disconnects during the peak + // period. + PeakMinutesToWaitOnDisconnect *int32 + + // The time in minutes to wait before performing the desired session handling action when a user logs off during the peak + // period. + PeakMinutesToWaitOnLogoff *int32 + + // Starting time for peak period. + PeakStartTime *Time + + // The desired configuration of Start VM On Connect for the hostpool during the peak phase. + PeakStartVMOnConnect *SetStartVMOnConnect + + // Action to be taken after a user disconnect during the ramp down period. + RampDownActionOnDisconnect *SessionHandlingOperation + + // Action to be taken after a logoff during the ramp down period. + RampDownActionOnLogoff *SessionHandlingOperation + + // The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp + // down period. + RampDownMinutesToWaitOnDisconnect *int32 + + // The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp + // down period. + RampDownMinutesToWaitOnLogoff *int32 + + // Starting time for ramp down period. + RampDownStartTime *Time + + // The desired configuration of Start VM On Connect for the hostpool during the ramp down phase. + RampDownStartVMOnConnect *SetStartVMOnConnect + + // Action to be taken after a user disconnect during the ramp up period. + RampUpActionOnDisconnect *SessionHandlingOperation + + // Action to be taken after a logoff during the ramp up period. + RampUpActionOnLogoff *SessionHandlingOperation + + // The desired startup behavior during the ramp up period for personal vms in the hostpool. + RampUpAutoStartHosts *StartupBehavior + + // The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp + // up period. + RampUpMinutesToWaitOnDisconnect *int32 + + // The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp + // up period. + RampUpMinutesToWaitOnLogoff *int32 + + // Starting time for ramp up period. + RampUpStartTime *Time + + // The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, session + // hosts must be turned on using rampUpAutoStartHosts or by turning them on + // manually. + RampUpStartVMOnConnect *SetStartVMOnConnect +} + +// ScalingPlanPooledSchedule - Represents a ScalingPlanPooledSchedule definition. +type ScalingPlanPooledSchedule struct { + // REQUIRED; Detailed properties for ScalingPlanPooledSchedule + Properties *ScalingPlanPooledScheduleProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ScalingPlanPooledScheduleList - List of ScalingPlanPooledSchedule definitions. +type ScalingPlanPooledScheduleList struct { + // List of ScalingPlanPooledSchedule definitions. + Value []*ScalingPlanPooledSchedule + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// ScalingPlanPooledSchedulePatch - ScalingPlanPooledSchedule properties that can be patched. +type ScalingPlanPooledSchedulePatch struct { + // Detailed properties for ScalingPlanPooledSchedule + Properties *ScalingPlanPooledScheduleProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ScalingPlanPooledScheduleProperties - A ScalingPlanPooledSchedule. +type ScalingPlanPooledScheduleProperties struct { + // Set of days of the week on which this schedule is active. + DaysOfWeek []*DayOfWeek + + // Load balancing algorithm for off-peak period. + OffPeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm + + // Starting time for off-peak period. + OffPeakStartTime *Time + + // Load balancing algorithm for peak period. + PeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm + + // Starting time for peak period. + PeakStartTime *Time + + // Capacity threshold for ramp down period. + RampDownCapacityThresholdPct *int32 + + // Should users be logged off forcefully from hosts. + RampDownForceLogoffUsers *bool + + // Load balancing algorithm for ramp down period. + RampDownLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm + + // Minimum host percentage for ramp down period. + RampDownMinimumHostsPct *int32 + + // Notification message for users during ramp down period. + RampDownNotificationMessage *string + + // Starting time for ramp down period. + RampDownStartTime *Time + + // Specifies when to stop hosts during ramp down period. + RampDownStopHostsWhen *StopHostsWhen + + // Number of minutes to wait to stop hosts during ramp down period. + RampDownWaitTimeMinutes *int32 + + // Capacity threshold for ramp up period. + RampUpCapacityThresholdPct *int32 + + // Load balancing algorithm for ramp up period. + RampUpLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm + + // Minimum host percentage for ramp up period. + RampUpMinimumHostsPct *int32 + + // Starting time for ramp up period. + RampUpStartTime *Time +} + +// ScalingPlanProperties - Scaling plan properties. +type ScalingPlanProperties struct { + // REQUIRED; Timezone of the scaling plan. + TimeZone *string + + // Description of scaling plan. + Description *string + + // Exclusion tag for scaling plan. + ExclusionTag *string + + // User friendly name of scaling plan. + FriendlyName *string + + // List of ScalingHostPoolReference definitions. + HostPoolReferences []*ScalingHostPoolReference + + // HostPool type for desktop. + HostPoolType *ScalingHostPoolType + + // List of ScalingPlanPooledSchedule definitions. + Schedules []*ScalingSchedule + + // READ-ONLY; ObjectId of scaling plan. (internal use) + ObjectID *string +} + +// ScalingSchedule - A ScalingPlanPooledSchedule. +type ScalingSchedule struct { + // Set of days of the week on which this schedule is active. + DaysOfWeek []*ScalingScheduleDaysOfWeekItem + + // Name of the ScalingPlanPooledSchedule. + Name *string + + // Load balancing algorithm for off-peak period. + OffPeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm + + // Starting time for off-peak period. + OffPeakStartTime *Time + + // Load balancing algorithm for peak period. + PeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm + + // Starting time for peak period. + PeakStartTime *Time + + // Capacity threshold for ramp down period. + RampDownCapacityThresholdPct *int32 + + // Should users be logged off forcefully from hosts. + RampDownForceLogoffUsers *bool + + // Load balancing algorithm for ramp down period. + RampDownLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm + + // Minimum host percentage for ramp down period. + RampDownMinimumHostsPct *int32 + + // Notification message for users during ramp down period. + RampDownNotificationMessage *string + + // Starting time for ramp down period. + RampDownStartTime *Time + + // Specifies when to stop hosts during ramp down period. + RampDownStopHostsWhen *StopHostsWhen + + // Number of minutes to wait to stop hosts during ramp down period. + RampDownWaitTimeMinutes *int32 + + // Capacity threshold for ramp up period. + RampUpCapacityThresholdPct *int32 + + // Load balancing algorithm for ramp up period. + RampUpLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm + + // Minimum host percentage for ramp up period. + RampUpMinimumHostsPct *int32 + + // Starting time for ramp up period. + RampUpStartTime *Time +} + +// SendMessage - Represents message sent to a UserSession. +type SendMessage struct { + // Body of message. + MessageBody *string + + // Title of message. + MessageTitle *string +} + +// ServiceSpecification - Service specification payload +type ServiceSpecification struct { + // Specifications of the Log for Azure Monitoring + LogSpecifications []*LogSpecification +} + +// SessionHost - Represents a SessionHost definition. +type SessionHost struct { + // Detailed properties for SessionHost + Properties *SessionHostProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SessionHostHealthCheckFailureDetails - Contains details on the failure. +type SessionHostHealthCheckFailureDetails struct { + // READ-ONLY; Error code corresponding for the failure. + ErrorCode *int32 + + // READ-ONLY; The timestamp of the last update. + LastHealthCheckDateTime *time.Time + + // READ-ONLY; Failure message: hints on what is wrong and how to recover. + Message *string +} + +// SessionHostHealthCheckReport - The report for session host information. +type SessionHostHealthCheckReport struct { + // READ-ONLY; Additional detailed information on the failure. + AdditionalFailureDetails *SessionHostHealthCheckFailureDetails + + // READ-ONLY; Represents the name of the health check operation performed. + HealthCheckName *HealthCheckName + + // READ-ONLY; Represents the Health state of the health check we performed. + HealthCheckResult *HealthCheckResult +} + +// SessionHostList - List of SessionHost definitions. +type SessionHostList struct { + // List of SessionHost definitions. + Value []*SessionHost + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// SessionHostPatch - SessionHost properties that can be patched. +type SessionHostPatch struct { + // Detailed properties for SessionHost + Properties *SessionHostPatchProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SessionHostPatchProperties - SessionHost properties that can be patched. +type SessionHostPatchProperties struct { + // Allow a new session. + AllowNewSession *bool + + // User assigned to SessionHost. + AssignedUser *string + + // Friendly name of SessionHost + FriendlyName *string +} + +// SessionHostProperties - Schema for SessionHost properties. +type SessionHostProperties struct { + // Version of agent on SessionHost. + AgentVersion *string + + // Allow a new session. + AllowNewSession *bool + + // User assigned to SessionHost. + AssignedUser *string + + // Friendly name of SessionHost + FriendlyName *string + + // Last heart beat from SessionHost. + LastHeartBeat *time.Time + + // The version of the OS on the session host. + OSVersion *string + + // Number of sessions on SessionHost. + Sessions *int32 + + // Status for a SessionHost. + Status *Status + + // The version of the side by side stack on the session host. + SxSStackVersion *string + + // The error message. + UpdateErrorMessage *string + + // Update state of a SessionHost. + UpdateState *UpdateState + + // READ-ONLY; The timestamp of the last update. + LastUpdateTime *time.Time + + // READ-ONLY; ObjectId of SessionHost. (internal use) + ObjectID *string + + // READ-ONLY; Resource Id of SessionHost's underlying virtual machine. + ResourceID *string + + // READ-ONLY; List of SessionHostHealthCheckReports + SessionHostHealthCheckResults []*SessionHostHealthCheckReport + + // READ-ONLY; The timestamp of the status. + StatusTimestamp *time.Time + + // READ-ONLY; Virtual Machine Id of SessionHost's underlying virtual machine. + VirtualMachineID *string +} + +// StartMenuItem - Represents a StartMenuItem definition. +type StartMenuItem struct { + // Detailed properties for StartMenuItem + Properties *StartMenuItemProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// StartMenuItemList - List of StartMenuItem definitions. +type StartMenuItemList struct { + // List of StartMenuItem definitions. + Value []*StartMenuItem + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// StartMenuItemProperties - Schema for StartMenuItem properties. +type StartMenuItemProperties struct { + // Alias of StartMenuItem. + AppAlias *string + + // Command line arguments for StartMenuItem. + CommandLineArguments *string + + // Path to the file of StartMenuItem. + FilePath *string + + // Index of the icon. + IconIndex *int32 + + // Path to the icon. + IconPath *string +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource last modification (UTC) + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *CreatedByType +} + +// Time - The time for a scaling action to occur. +type Time struct { + // REQUIRED; The hour. + Hour *int32 + + // REQUIRED; The minute. + Minute *int32 +} + +// UserSession - Represents a UserSession definition. +type UserSession struct { + // Detailed properties for UserSession + Properties *UserSessionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// UserSessionList - List of UserSession definitions. +type UserSessionList struct { + // List of UserSession definitions. + Value []*UserSession + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// UserSessionProperties - Schema for UserSession properties. +type UserSessionProperties struct { + // The active directory user name. + ActiveDirectoryUserName *string + + // Application type of application. + ApplicationType *ApplicationType + + // The timestamp of the user session create. + CreateTime *time.Time + + // State of user session. + SessionState *SessionState + + // The user principal name. + UserPrincipalName *string + + // READ-ONLY; ObjectId of user session. (internal use) + ObjectID *string +} + +// Workspace - Represents a Workspace definition. +type Workspace struct { + // REQUIRED; The geo-location where the resource lives + Location *string + Identity *ResourceModelWithAllowedPropertySetIdentity + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are + // a kind of Microsoft.Web/sites type. If supported, the resource provider must + // validate and persist this value. + Kind *string + + // The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another + // Azure resource. If this is present, complete mode deployment will not + // delete the resource if it is removed from the template since it is managed by another resource. + ManagedBy *string + Plan *ResourceModelWithAllowedPropertySetPlan + + // Detailed properties for Workspace + Properties *WorkspaceProperties + SKU *ResourceModelWithAllowedPropertySetSKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header + // per the normal etag convention. Entity tags are used for comparing two or more entities + // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match + // (section 14.26), and If-Range (section 14.27) header fields. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// WorkspaceList - List of Workspace definitions. +type WorkspaceList struct { + // List of Workspace definitions. + Value []*Workspace + + // READ-ONLY; Link to the next page of results. + NextLink *string +} + +// WorkspacePatch - Workspace properties that can be patched. +type WorkspacePatch struct { + // Detailed properties for Workspace + Properties *WorkspacePatchProperties + + // tags to be updated + Tags map[string]*string +} + +// WorkspacePatchProperties - Workspace properties that can be patched. +type WorkspacePatchProperties struct { + // List of applicationGroup links. + ApplicationGroupReferences []*string + + // Description of Workspace. + Description *string + + // Friendly name of Workspace. + FriendlyName *string + + // Enabled to allow this resource to be access from the public network + PublicNetworkAccess *PublicNetworkAccess +} + +// WorkspaceProperties - Schema for Workspace properties. +type WorkspaceProperties struct { + // List of applicationGroup resource Ids. + ApplicationGroupReferences []*string + + // Description of Workspace. + Description *string + + // Friendly name of Workspace. + FriendlyName *string + + // Enabled allows this resource to be accessed from both public and private networks, Disabled allows this resource to only + // be accessed via private endpoints + PublicNetworkAccess *PublicNetworkAccess + + // READ-ONLY; Is cloud pc resource. + CloudPcResource *bool + + // READ-ONLY; ObjectId of Workspace. (internal use) + ObjectID *string + + // READ-ONLY; List of private endpoint connection associated with the specified resource + PrivateEndpointConnections []*PrivateEndpointConnection +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/models_serde.go new file mode 100644 index 00000000..7ca758c5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/models_serde.go @@ -0,0 +1,4519 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AgentUpdatePatchProperties. +func (a AgentUpdatePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maintenanceWindowTimeZone", a.MaintenanceWindowTimeZone) + populate(objectMap, "maintenanceWindows", a.MaintenanceWindows) + populate(objectMap, "type", a.Type) + populate(objectMap, "useSessionHostLocalTime", a.UseSessionHostLocalTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpdatePatchProperties. +func (a *AgentUpdatePatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maintenanceWindowTimeZone": + err = unpopulate(val, "MaintenanceWindowTimeZone", &a.MaintenanceWindowTimeZone) + delete(rawMsg, key) + case "maintenanceWindows": + err = unpopulate(val, "MaintenanceWindows", &a.MaintenanceWindows) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "useSessionHostLocalTime": + err = unpopulate(val, "UseSessionHostLocalTime", &a.UseSessionHostLocalTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentUpdateProperties. +func (a AgentUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maintenanceWindowTimeZone", a.MaintenanceWindowTimeZone) + populate(objectMap, "maintenanceWindows", a.MaintenanceWindows) + populate(objectMap, "type", a.Type) + populate(objectMap, "useSessionHostLocalTime", a.UseSessionHostLocalTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpdateProperties. +func (a *AgentUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maintenanceWindowTimeZone": + err = unpopulate(val, "MaintenanceWindowTimeZone", &a.MaintenanceWindowTimeZone) + delete(rawMsg, key) + case "maintenanceWindows": + err = unpopulate(val, "MaintenanceWindows", &a.MaintenanceWindows) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "useSessionHostLocalTime": + err = unpopulate(val, "UseSessionHostLocalTime", &a.UseSessionHostLocalTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppAttachPackage. +func (a AppAttachPackage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackage. +func (a *AppAttachPackage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppAttachPackageInfoProperties. +func (a AppAttachPackageInfoProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "certificateExpiry", a.CertificateExpiry) + populate(objectMap, "certificateName", a.CertificateName) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "imagePath", a.ImagePath) + populate(objectMap, "isActive", a.IsActive) + populate(objectMap, "isPackageTimestamped", a.IsPackageTimestamped) + populate(objectMap, "isRegularRegistration", a.IsRegularRegistration) + populateDateTimeRFC3339(objectMap, "lastUpdated", a.LastUpdated) + populate(objectMap, "packageAlias", a.PackageAlias) + populate(objectMap, "packageApplications", a.PackageApplications) + populate(objectMap, "packageDependencies", a.PackageDependencies) + populate(objectMap, "packageFamilyName", a.PackageFamilyName) + populate(objectMap, "packageFullName", a.PackageFullName) + populate(objectMap, "packageName", a.PackageName) + populate(objectMap, "packageRelativePath", a.PackageRelativePath) + populate(objectMap, "version", a.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackageInfoProperties. +func (a *AppAttachPackageInfoProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateExpiry": + err = unpopulateDateTimeRFC3339(val, "CertificateExpiry", &a.CertificateExpiry) + delete(rawMsg, key) + case "certificateName": + err = unpopulate(val, "CertificateName", &a.CertificateName) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "imagePath": + err = unpopulate(val, "ImagePath", &a.ImagePath) + delete(rawMsg, key) + case "isActive": + err = unpopulate(val, "IsActive", &a.IsActive) + delete(rawMsg, key) + case "isPackageTimestamped": + err = unpopulate(val, "IsPackageTimestamped", &a.IsPackageTimestamped) + delete(rawMsg, key) + case "isRegularRegistration": + err = unpopulate(val, "IsRegularRegistration", &a.IsRegularRegistration) + delete(rawMsg, key) + case "lastUpdated": + err = unpopulateDateTimeRFC3339(val, "LastUpdated", &a.LastUpdated) + delete(rawMsg, key) + case "packageAlias": + err = unpopulate(val, "PackageAlias", &a.PackageAlias) + delete(rawMsg, key) + case "packageApplications": + err = unpopulate(val, "PackageApplications", &a.PackageApplications) + delete(rawMsg, key) + case "packageDependencies": + err = unpopulate(val, "PackageDependencies", &a.PackageDependencies) + delete(rawMsg, key) + case "packageFamilyName": + err = unpopulate(val, "PackageFamilyName", &a.PackageFamilyName) + delete(rawMsg, key) + case "packageFullName": + err = unpopulate(val, "PackageFullName", &a.PackageFullName) + delete(rawMsg, key) + case "packageName": + err = unpopulate(val, "PackageName", &a.PackageName) + delete(rawMsg, key) + case "packageRelativePath": + err = unpopulate(val, "PackageRelativePath", &a.PackageRelativePath) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &a.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppAttachPackageList. +func (a AppAttachPackageList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackageList. +func (a *AppAttachPackageList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppAttachPackagePatch. +func (a AppAttachPackagePatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackagePatch. +func (a *AppAttachPackagePatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppAttachPackagePatchProperties. +func (a AppAttachPackagePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failHealthCheckOnStagingFailure", a.FailHealthCheckOnStagingFailure) + populate(objectMap, "hostPoolReferences", a.HostPoolReferences) + populate(objectMap, "image", a.Image) + populate(objectMap, "keyVaultURL", a.KeyVaultURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackagePatchProperties. +func (a *AppAttachPackagePatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failHealthCheckOnStagingFailure": + err = unpopulate(val, "FailHealthCheckOnStagingFailure", &a.FailHealthCheckOnStagingFailure) + delete(rawMsg, key) + case "hostPoolReferences": + err = unpopulate(val, "HostPoolReferences", &a.HostPoolReferences) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &a.Image) + delete(rawMsg, key) + case "keyVaultURL": + err = unpopulate(val, "KeyVaultURL", &a.KeyVaultURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AppAttachPackageProperties. +func (a AppAttachPackageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failHealthCheckOnStagingFailure", a.FailHealthCheckOnStagingFailure) + populate(objectMap, "hostPoolReferences", a.HostPoolReferences) + populate(objectMap, "image", a.Image) + populate(objectMap, "keyVaultURL", a.KeyVaultURL) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AppAttachPackageProperties. +func (a *AppAttachPackageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failHealthCheckOnStagingFailure": + err = unpopulate(val, "FailHealthCheckOnStagingFailure", &a.FailHealthCheckOnStagingFailure) + delete(rawMsg, key) + case "hostPoolReferences": + err = unpopulate(val, "HostPoolReferences", &a.HostPoolReferences) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &a.Image) + delete(rawMsg, key) + case "keyVaultURL": + err = unpopulate(val, "KeyVaultURL", &a.KeyVaultURL) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Application. +func (a Application) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Application. +func (a *Application) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGroup. +func (a ApplicationGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "location", a.Location) + populate(objectMap, "managedBy", a.ManagedBy) + populate(objectMap, "name", a.Name) + populate(objectMap, "plan", a.Plan) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroup. +func (a *ApplicationGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "managedBy": + err = unpopulate(val, "ManagedBy", &a.ManagedBy) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "plan": + err = unpopulate(val, "Plan", &a.Plan) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGroupList. +func (a ApplicationGroupList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupList. +func (a *ApplicationGroupList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGroupPatch. +func (a ApplicationGroupPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupPatch. +func (a *ApplicationGroupPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGroupPatchProperties. +func (a ApplicationGroupPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "showInFeed", a.ShowInFeed) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupPatchProperties. +func (a *ApplicationGroupPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "showInFeed": + err = unpopulate(val, "ShowInFeed", &a.ShowInFeed) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGroupProperties. +func (a ApplicationGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationGroupType", a.ApplicationGroupType) + populate(objectMap, "cloudPcResource", a.CloudPcResource) + populate(objectMap, "description", a.Description) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "hostPoolArmPath", a.HostPoolArmPath) + populate(objectMap, "objectId", a.ObjectID) + populate(objectMap, "showInFeed", a.ShowInFeed) + populate(objectMap, "workspaceArmPath", a.WorkspaceArmPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupProperties. +func (a *ApplicationGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationGroupType": + err = unpopulate(val, "ApplicationGroupType", &a.ApplicationGroupType) + delete(rawMsg, key) + case "cloudPcResource": + err = unpopulate(val, "CloudPcResource", &a.CloudPcResource) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "hostPoolArmPath": + err = unpopulate(val, "HostPoolArmPath", &a.HostPoolArmPath) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &a.ObjectID) + delete(rawMsg, key) + case "showInFeed": + err = unpopulate(val, "ShowInFeed", &a.ShowInFeed) + delete(rawMsg, key) + case "workspaceArmPath": + err = unpopulate(val, "WorkspaceArmPath", &a.WorkspaceArmPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationList. +func (a ApplicationList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationList. +func (a *ApplicationList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationPatch. +func (a ApplicationPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationPatch. +func (a *ApplicationPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationPatchProperties. +func (a ApplicationPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationType", a.ApplicationType) + populate(objectMap, "commandLineArguments", a.CommandLineArguments) + populate(objectMap, "commandLineSetting", a.CommandLineSetting) + populate(objectMap, "description", a.Description) + populate(objectMap, "filePath", a.FilePath) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "iconIndex", a.IconIndex) + populate(objectMap, "iconPath", a.IconPath) + populate(objectMap, "msixPackageApplicationId", a.MsixPackageApplicationID) + populate(objectMap, "msixPackageFamilyName", a.MsixPackageFamilyName) + populate(objectMap, "showInPortal", a.ShowInPortal) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationPatchProperties. +func (a *ApplicationPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationType": + err = unpopulate(val, "ApplicationType", &a.ApplicationType) + delete(rawMsg, key) + case "commandLineArguments": + err = unpopulate(val, "CommandLineArguments", &a.CommandLineArguments) + delete(rawMsg, key) + case "commandLineSetting": + err = unpopulate(val, "CommandLineSetting", &a.CommandLineSetting) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "filePath": + err = unpopulate(val, "FilePath", &a.FilePath) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "iconIndex": + err = unpopulate(val, "IconIndex", &a.IconIndex) + delete(rawMsg, key) + case "iconPath": + err = unpopulate(val, "IconPath", &a.IconPath) + delete(rawMsg, key) + case "msixPackageApplicationId": + err = unpopulate(val, "MsixPackageApplicationID", &a.MsixPackageApplicationID) + delete(rawMsg, key) + case "msixPackageFamilyName": + err = unpopulate(val, "MsixPackageFamilyName", &a.MsixPackageFamilyName) + delete(rawMsg, key) + case "showInPortal": + err = unpopulate(val, "ShowInPortal", &a.ShowInPortal) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationProperties. +func (a ApplicationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationType", a.ApplicationType) + populate(objectMap, "commandLineArguments", a.CommandLineArguments) + populate(objectMap, "commandLineSetting", a.CommandLineSetting) + populate(objectMap, "description", a.Description) + populate(objectMap, "filePath", a.FilePath) + populate(objectMap, "friendlyName", a.FriendlyName) + populateByteArray(objectMap, "iconContent", a.IconContent, func() any { + return runtime.EncodeByteArray(a.IconContent, runtime.Base64StdFormat) + }) + populate(objectMap, "iconHash", a.IconHash) + populate(objectMap, "iconIndex", a.IconIndex) + populate(objectMap, "iconPath", a.IconPath) + populate(objectMap, "msixPackageApplicationId", a.MsixPackageApplicationID) + populate(objectMap, "msixPackageFamilyName", a.MsixPackageFamilyName) + populate(objectMap, "objectId", a.ObjectID) + populate(objectMap, "showInPortal", a.ShowInPortal) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationProperties. +func (a *ApplicationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationType": + err = unpopulate(val, "ApplicationType", &a.ApplicationType) + delete(rawMsg, key) + case "commandLineArguments": + err = unpopulate(val, "CommandLineArguments", &a.CommandLineArguments) + delete(rawMsg, key) + case "commandLineSetting": + err = unpopulate(val, "CommandLineSetting", &a.CommandLineSetting) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "filePath": + err = unpopulate(val, "FilePath", &a.FilePath) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "iconContent": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &a.IconContent, runtime.Base64StdFormat) + } + delete(rawMsg, key) + case "iconHash": + err = unpopulate(val, "IconHash", &a.IconHash) + delete(rawMsg, key) + case "iconIndex": + err = unpopulate(val, "IconIndex", &a.IconIndex) + delete(rawMsg, key) + case "iconPath": + err = unpopulate(val, "IconPath", &a.IconPath) + delete(rawMsg, key) + case "msixPackageApplicationId": + err = unpopulate(val, "MsixPackageApplicationID", &a.MsixPackageApplicationID) + delete(rawMsg, key) + case "msixPackageFamilyName": + err = unpopulate(val, "MsixPackageFamilyName", &a.MsixPackageFamilyName) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &a.ObjectID) + delete(rawMsg, key) + case "showInPortal": + err = unpopulate(val, "ShowInPortal", &a.ShowInPortal) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Desktop. +func (d Desktop) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Desktop. +func (d *Desktop) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DesktopList. +func (d DesktopList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DesktopList. +func (d *DesktopList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DesktopPatch. +func (d DesktopPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DesktopPatch. +func (d *DesktopPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DesktopPatchProperties. +func (d DesktopPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", d.Description) + populate(objectMap, "friendlyName", d.FriendlyName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DesktopPatchProperties. +func (d *DesktopPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &d.FriendlyName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DesktopProperties. +func (d DesktopProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", d.Description) + populate(objectMap, "friendlyName", d.FriendlyName) + populateByteArray(objectMap, "iconContent", d.IconContent, func() any { + return runtime.EncodeByteArray(d.IconContent, runtime.Base64StdFormat) + }) + populate(objectMap, "iconHash", d.IconHash) + populate(objectMap, "objectId", d.ObjectID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DesktopProperties. +func (d *DesktopProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &d.FriendlyName) + delete(rawMsg, key) + case "iconContent": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &d.IconContent, runtime.Base64StdFormat) + } + delete(rawMsg, key) + case "iconHash": + err = unpopulate(val, "IconHash", &d.IconHash) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &d.ObjectID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpandMsixImage. +func (e ExpandMsixImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "systemData", e.SystemData) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpandMsixImage. +func (e *ExpandMsixImage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &e.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpandMsixImageList. +func (e ExpandMsixImageList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpandMsixImageList. +func (e *ExpandMsixImageList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpandMsixImageProperties. +func (e ExpandMsixImageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "certificateExpiry", e.CertificateExpiry) + populate(objectMap, "certificateName", e.CertificateName) + populate(objectMap, "displayName", e.DisplayName) + populate(objectMap, "imagePath", e.ImagePath) + populate(objectMap, "isActive", e.IsActive) + populate(objectMap, "isRegularRegistration", e.IsRegularRegistration) + populateDateTimeRFC3339(objectMap, "lastUpdated", e.LastUpdated) + populate(objectMap, "packageAlias", e.PackageAlias) + populate(objectMap, "packageApplications", e.PackageApplications) + populate(objectMap, "packageDependencies", e.PackageDependencies) + populate(objectMap, "packageFamilyName", e.PackageFamilyName) + populate(objectMap, "packageFullName", e.PackageFullName) + populate(objectMap, "packageName", e.PackageName) + populate(objectMap, "packageRelativePath", e.PackageRelativePath) + populate(objectMap, "version", e.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpandMsixImageProperties. +func (e *ExpandMsixImageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateExpiry": + err = unpopulateDateTimeRFC3339(val, "CertificateExpiry", &e.CertificateExpiry) + delete(rawMsg, key) + case "certificateName": + err = unpopulate(val, "CertificateName", &e.CertificateName) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &e.DisplayName) + delete(rawMsg, key) + case "imagePath": + err = unpopulate(val, "ImagePath", &e.ImagePath) + delete(rawMsg, key) + case "isActive": + err = unpopulate(val, "IsActive", &e.IsActive) + delete(rawMsg, key) + case "isRegularRegistration": + err = unpopulate(val, "IsRegularRegistration", &e.IsRegularRegistration) + delete(rawMsg, key) + case "lastUpdated": + err = unpopulateDateTimeRFC3339(val, "LastUpdated", &e.LastUpdated) + delete(rawMsg, key) + case "packageAlias": + err = unpopulate(val, "PackageAlias", &e.PackageAlias) + delete(rawMsg, key) + case "packageApplications": + err = unpopulate(val, "PackageApplications", &e.PackageApplications) + delete(rawMsg, key) + case "packageDependencies": + err = unpopulate(val, "PackageDependencies", &e.PackageDependencies) + delete(rawMsg, key) + case "packageFamilyName": + err = unpopulate(val, "PackageFamilyName", &e.PackageFamilyName) + delete(rawMsg, key) + case "packageFullName": + err = unpopulate(val, "PackageFullName", &e.PackageFullName) + delete(rawMsg, key) + case "packageName": + err = unpopulate(val, "PackageName", &e.PackageName) + delete(rawMsg, key) + case "packageRelativePath": + err = unpopulate(val, "PackageRelativePath", &e.PackageRelativePath) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &e.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostPool. +func (h HostPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", h.Etag) + populate(objectMap, "id", h.ID) + populate(objectMap, "identity", h.Identity) + populate(objectMap, "kind", h.Kind) + populate(objectMap, "location", h.Location) + populate(objectMap, "managedBy", h.ManagedBy) + populate(objectMap, "name", h.Name) + populate(objectMap, "plan", h.Plan) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "sku", h.SKU) + populate(objectMap, "systemData", h.SystemData) + populate(objectMap, "tags", h.Tags) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostPool. +func (h *HostPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &h.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &h.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &h.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &h.Location) + delete(rawMsg, key) + case "managedBy": + err = unpopulate(val, "ManagedBy", &h.ManagedBy) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "plan": + err = unpopulate(val, "Plan", &h.Plan) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &h.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &h.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &h.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostPoolList. +func (h HostPoolList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", h.NextLink) + populate(objectMap, "value", h.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostPoolList. +func (h *HostPoolList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &h.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &h.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostPoolPatch. +func (h HostPoolPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", h.ID) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "systemData", h.SystemData) + populate(objectMap, "tags", h.Tags) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostPoolPatch. +func (h *HostPoolPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &h.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &h.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostPoolPatchProperties. +func (h HostPoolPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentUpdate", h.AgentUpdate) + populate(objectMap, "customRdpProperty", h.CustomRdpProperty) + populate(objectMap, "description", h.Description) + populate(objectMap, "friendlyName", h.FriendlyName) + populate(objectMap, "loadBalancerType", h.LoadBalancerType) + populate(objectMap, "maxSessionLimit", h.MaxSessionLimit) + populate(objectMap, "personalDesktopAssignmentType", h.PersonalDesktopAssignmentType) + populate(objectMap, "preferredAppGroupType", h.PreferredAppGroupType) + populate(objectMap, "publicNetworkAccess", h.PublicNetworkAccess) + populate(objectMap, "registrationInfo", h.RegistrationInfo) + populate(objectMap, "ring", h.Ring) + populate(objectMap, "ssoClientId", h.SsoClientID) + populate(objectMap, "ssoClientSecretKeyVaultPath", h.SsoClientSecretKeyVaultPath) + populate(objectMap, "ssoSecretType", h.SsoSecretType) + populate(objectMap, "ssoadfsAuthority", h.SsoadfsAuthority) + populate(objectMap, "startVMOnConnect", h.StartVMOnConnect) + populate(objectMap, "vmTemplate", h.VMTemplate) + populate(objectMap, "validationEnvironment", h.ValidationEnvironment) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostPoolPatchProperties. +func (h *HostPoolPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentUpdate": + err = unpopulate(val, "AgentUpdate", &h.AgentUpdate) + delete(rawMsg, key) + case "customRdpProperty": + err = unpopulate(val, "CustomRdpProperty", &h.CustomRdpProperty) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &h.Description) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &h.FriendlyName) + delete(rawMsg, key) + case "loadBalancerType": + err = unpopulate(val, "LoadBalancerType", &h.LoadBalancerType) + delete(rawMsg, key) + case "maxSessionLimit": + err = unpopulate(val, "MaxSessionLimit", &h.MaxSessionLimit) + delete(rawMsg, key) + case "personalDesktopAssignmentType": + err = unpopulate(val, "PersonalDesktopAssignmentType", &h.PersonalDesktopAssignmentType) + delete(rawMsg, key) + case "preferredAppGroupType": + err = unpopulate(val, "PreferredAppGroupType", &h.PreferredAppGroupType) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &h.PublicNetworkAccess) + delete(rawMsg, key) + case "registrationInfo": + err = unpopulate(val, "RegistrationInfo", &h.RegistrationInfo) + delete(rawMsg, key) + case "ring": + err = unpopulate(val, "Ring", &h.Ring) + delete(rawMsg, key) + case "ssoClientId": + err = unpopulate(val, "SsoClientID", &h.SsoClientID) + delete(rawMsg, key) + case "ssoClientSecretKeyVaultPath": + err = unpopulate(val, "SsoClientSecretKeyVaultPath", &h.SsoClientSecretKeyVaultPath) + delete(rawMsg, key) + case "ssoSecretType": + err = unpopulate(val, "SsoSecretType", &h.SsoSecretType) + delete(rawMsg, key) + case "ssoadfsAuthority": + err = unpopulate(val, "SsoadfsAuthority", &h.SsoadfsAuthority) + delete(rawMsg, key) + case "startVMOnConnect": + err = unpopulate(val, "StartVMOnConnect", &h.StartVMOnConnect) + delete(rawMsg, key) + case "vmTemplate": + err = unpopulate(val, "VMTemplate", &h.VMTemplate) + delete(rawMsg, key) + case "validationEnvironment": + err = unpopulate(val, "ValidationEnvironment", &h.ValidationEnvironment) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HostPoolProperties. +func (h HostPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentUpdate", h.AgentUpdate) + populate(objectMap, "appAttachPackageReferences", h.AppAttachPackageReferences) + populate(objectMap, "applicationGroupReferences", h.ApplicationGroupReferences) + populate(objectMap, "cloudPcResource", h.CloudPcResource) + populate(objectMap, "customRdpProperty", h.CustomRdpProperty) + populate(objectMap, "description", h.Description) + populate(objectMap, "friendlyName", h.FriendlyName) + populate(objectMap, "hostPoolType", h.HostPoolType) + populate(objectMap, "loadBalancerType", h.LoadBalancerType) + populate(objectMap, "maxSessionLimit", h.MaxSessionLimit) + populate(objectMap, "objectId", h.ObjectID) + populate(objectMap, "personalDesktopAssignmentType", h.PersonalDesktopAssignmentType) + populate(objectMap, "preferredAppGroupType", h.PreferredAppGroupType) + populate(objectMap, "privateEndpointConnections", h.PrivateEndpointConnections) + populate(objectMap, "publicNetworkAccess", h.PublicNetworkAccess) + populate(objectMap, "registrationInfo", h.RegistrationInfo) + populate(objectMap, "ring", h.Ring) + populate(objectMap, "ssoClientId", h.SsoClientID) + populate(objectMap, "ssoClientSecretKeyVaultPath", h.SsoClientSecretKeyVaultPath) + populate(objectMap, "ssoSecretType", h.SsoSecretType) + populate(objectMap, "ssoadfsAuthority", h.SsoadfsAuthority) + populate(objectMap, "startVMOnConnect", h.StartVMOnConnect) + populate(objectMap, "vmTemplate", h.VMTemplate) + populate(objectMap, "validationEnvironment", h.ValidationEnvironment) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HostPoolProperties. +func (h *HostPoolProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentUpdate": + err = unpopulate(val, "AgentUpdate", &h.AgentUpdate) + delete(rawMsg, key) + case "appAttachPackageReferences": + err = unpopulate(val, "AppAttachPackageReferences", &h.AppAttachPackageReferences) + delete(rawMsg, key) + case "applicationGroupReferences": + err = unpopulate(val, "ApplicationGroupReferences", &h.ApplicationGroupReferences) + delete(rawMsg, key) + case "cloudPcResource": + err = unpopulate(val, "CloudPcResource", &h.CloudPcResource) + delete(rawMsg, key) + case "customRdpProperty": + err = unpopulate(val, "CustomRdpProperty", &h.CustomRdpProperty) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &h.Description) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &h.FriendlyName) + delete(rawMsg, key) + case "hostPoolType": + err = unpopulate(val, "HostPoolType", &h.HostPoolType) + delete(rawMsg, key) + case "loadBalancerType": + err = unpopulate(val, "LoadBalancerType", &h.LoadBalancerType) + delete(rawMsg, key) + case "maxSessionLimit": + err = unpopulate(val, "MaxSessionLimit", &h.MaxSessionLimit) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &h.ObjectID) + delete(rawMsg, key) + case "personalDesktopAssignmentType": + err = unpopulate(val, "PersonalDesktopAssignmentType", &h.PersonalDesktopAssignmentType) + delete(rawMsg, key) + case "preferredAppGroupType": + err = unpopulate(val, "PreferredAppGroupType", &h.PreferredAppGroupType) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &h.PrivateEndpointConnections) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &h.PublicNetworkAccess) + delete(rawMsg, key) + case "registrationInfo": + err = unpopulate(val, "RegistrationInfo", &h.RegistrationInfo) + delete(rawMsg, key) + case "ring": + err = unpopulate(val, "Ring", &h.Ring) + delete(rawMsg, key) + case "ssoClientId": + err = unpopulate(val, "SsoClientID", &h.SsoClientID) + delete(rawMsg, key) + case "ssoClientSecretKeyVaultPath": + err = unpopulate(val, "SsoClientSecretKeyVaultPath", &h.SsoClientSecretKeyVaultPath) + delete(rawMsg, key) + case "ssoSecretType": + err = unpopulate(val, "SsoSecretType", &h.SsoSecretType) + delete(rawMsg, key) + case "ssoadfsAuthority": + err = unpopulate(val, "SsoadfsAuthority", &h.SsoadfsAuthority) + delete(rawMsg, key) + case "startVMOnConnect": + err = unpopulate(val, "StartVMOnConnect", &h.StartVMOnConnect) + delete(rawMsg, key) + case "vmTemplate": + err = unpopulate(val, "VMTemplate", &h.VMTemplate) + delete(rawMsg, key) + case "validationEnvironment": + err = unpopulate(val, "ValidationEnvironment", &h.ValidationEnvironment) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportPackageInfoRequest. +func (i ImportPackageInfoRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "packageArchitecture", i.PackageArchitecture) + populate(objectMap, "path", i.Path) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportPackageInfoRequest. +func (i *ImportPackageInfoRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "packageArchitecture": + err = unpopulate(val, "PackageArchitecture", &i.PackageArchitecture) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &i.Path) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", l.BlobDuration) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &l.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSIXImageURI. +func (m MSIXImageURI) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSIXImageURI. +func (m *MSIXImageURI) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSIXPackage. +func (m MSIXPackage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackage. +func (m *MSIXPackage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSIXPackageList. +func (m MSIXPackageList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackageList. +func (m *MSIXPackageList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSIXPackagePatch. +func (m MSIXPackagePatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackagePatch. +func (m *MSIXPackagePatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSIXPackagePatchProperties. +func (m MSIXPackagePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "isActive", m.IsActive) + populate(objectMap, "isRegularRegistration", m.IsRegularRegistration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackagePatchProperties. +func (m *MSIXPackagePatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "isActive": + err = unpopulate(val, "IsActive", &m.IsActive) + delete(rawMsg, key) + case "isRegularRegistration": + err = unpopulate(val, "IsRegularRegistration", &m.IsRegularRegistration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MSIXPackageProperties. +func (m MSIXPackageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "imagePath", m.ImagePath) + populate(objectMap, "isActive", m.IsActive) + populate(objectMap, "isRegularRegistration", m.IsRegularRegistration) + populateDateTimeRFC3339(objectMap, "lastUpdated", m.LastUpdated) + populate(objectMap, "packageApplications", m.PackageApplications) + populate(objectMap, "packageDependencies", m.PackageDependencies) + populate(objectMap, "packageFamilyName", m.PackageFamilyName) + populate(objectMap, "packageName", m.PackageName) + populate(objectMap, "packageRelativePath", m.PackageRelativePath) + populate(objectMap, "version", m.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackageProperties. +func (m *MSIXPackageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "imagePath": + err = unpopulate(val, "ImagePath", &m.ImagePath) + delete(rawMsg, key) + case "isActive": + err = unpopulate(val, "IsActive", &m.IsActive) + delete(rawMsg, key) + case "isRegularRegistration": + err = unpopulate(val, "IsRegularRegistration", &m.IsRegularRegistration) + delete(rawMsg, key) + case "lastUpdated": + err = unpopulateDateTimeRFC3339(val, "LastUpdated", &m.LastUpdated) + delete(rawMsg, key) + case "packageApplications": + err = unpopulate(val, "PackageApplications", &m.PackageApplications) + delete(rawMsg, key) + case "packageDependencies": + err = unpopulate(val, "PackageDependencies", &m.PackageDependencies) + delete(rawMsg, key) + case "packageFamilyName": + err = unpopulate(val, "PackageFamilyName", &m.PackageFamilyName) + delete(rawMsg, key) + case "packageName": + err = unpopulate(val, "PackageName", &m.PackageName) + delete(rawMsg, key) + case "packageRelativePath": + err = unpopulate(val, "PackageRelativePath", &m.PackageRelativePath) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &m.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowPatchProperties. +func (m MaintenanceWindowPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dayOfWeek", m.DayOfWeek) + populate(objectMap, "hour", m.Hour) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowPatchProperties. +func (m *MaintenanceWindowPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dayOfWeek": + err = unpopulate(val, "DayOfWeek", &m.DayOfWeek) + delete(rawMsg, key) + case "hour": + err = unpopulate(val, "Hour", &m.Hour) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowProperties. +func (m MaintenanceWindowProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dayOfWeek", m.DayOfWeek) + populate(objectMap, "hour", m.Hour) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowProperties. +func (m *MaintenanceWindowProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dayOfWeek": + err = unpopulate(val, "DayOfWeek", &m.DayOfWeek) + delete(rawMsg, key) + case "hour": + err = unpopulate(val, "Hour", &m.Hour) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MsixPackageApplications. +func (m MsixPackageApplications) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appId", m.AppID) + populate(objectMap, "appUserModelID", m.AppUserModelID) + populate(objectMap, "description", m.Description) + populate(objectMap, "friendlyName", m.FriendlyName) + populate(objectMap, "iconImageName", m.IconImageName) + populateByteArray(objectMap, "rawIcon", m.RawIcon, func() any { + return runtime.EncodeByteArray(m.RawIcon, runtime.Base64StdFormat) + }) + populateByteArray(objectMap, "rawPng", m.RawPNG, func() any { + return runtime.EncodeByteArray(m.RawPNG, runtime.Base64StdFormat) + }) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MsixPackageApplications. +func (m *MsixPackageApplications) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appId": + err = unpopulate(val, "AppID", &m.AppID) + delete(rawMsg, key) + case "appUserModelID": + err = unpopulate(val, "AppUserModelID", &m.AppUserModelID) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &m.FriendlyName) + delete(rawMsg, key) + case "iconImageName": + err = unpopulate(val, "IconImageName", &m.IconImageName) + delete(rawMsg, key) + case "rawIcon": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &m.RawIcon, runtime.Base64StdFormat) + } + delete(rawMsg, key) + case "rawPng": + if val != nil && string(val) != "null" { + err = runtime.DecodeByteArray(string(val), &m.RawPNG, runtime.Base64StdFormat) + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MsixPackageDependencies. +func (m MsixPackageDependencies) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dependencyName", m.DependencyName) + populate(objectMap, "minVersion", m.MinVersion) + populate(objectMap, "publisher", m.Publisher) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MsixPackageDependencies. +func (m *MsixPackageDependencies) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dependencyName": + err = unpopulate(val, "DependencyName", &m.DependencyName) + delete(rawMsg, key) + case "minVersion": + err = unpopulate(val, "MinVersion", &m.MinVersion) + delete(rawMsg, key) + case "publisher": + err = unpopulate(val, "Publisher", &m.Publisher) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationProperties. +func (o OperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. +func (o *OperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. +func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResultWithSystemData. +func (p PrivateEndpointConnectionListResultWithSystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResultWithSystemData. +func (p *PrivateEndpointConnectionListResultWithSystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupIds", p.GroupIDs) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupIds": + err = unpopulate(val, "GroupIDs", &p.GroupIDs) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionWithSystemData. +func (p PrivateEndpointConnectionWithSystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionWithSystemData. +func (p *PrivateEndpointConnectionWithSystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. +func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. +func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. +func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. +func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistrationInfo. +func (r RegistrationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expirationTime", r.ExpirationTime) + populate(objectMap, "registrationTokenOperation", r.RegistrationTokenOperation) + populate(objectMap, "token", r.Token) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationInfo. +func (r *RegistrationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expirationTime": + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &r.ExpirationTime) + delete(rawMsg, key) + case "registrationTokenOperation": + err = unpopulate(val, "RegistrationTokenOperation", &r.RegistrationTokenOperation) + delete(rawMsg, key) + case "token": + err = unpopulate(val, "Token", &r.Token) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistrationInfoPatch. +func (r RegistrationInfoPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expirationTime", r.ExpirationTime) + populate(objectMap, "registrationTokenOperation", r.RegistrationTokenOperation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationInfoPatch. +func (r *RegistrationInfoPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expirationTime": + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &r.ExpirationTime) + delete(rawMsg, key) + case "registrationTokenOperation": + err = unpopulate(val, "RegistrationTokenOperation", &r.RegistrationTokenOperation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistrationTokenList. +func (r RegistrationTokenList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationTokenList. +func (r *RegistrationTokenList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistrationTokenMinimal. +func (r RegistrationTokenMinimal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expirationTime", r.ExpirationTime) + populate(objectMap, "token", r.Token) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationTokenMinimal. +func (r *RegistrationTokenMinimal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expirationTime": + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &r.ExpirationTime) + delete(rawMsg, key) + case "token": + err = unpopulate(val, "Token", &r.Token) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceModelWithAllowedPropertySetIdentity. +func (r ResourceModelWithAllowedPropertySetIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", r.PrincipalID) + populate(objectMap, "tenantId", r.TenantID) + objectMap["type"] = "SystemAssigned" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceModelWithAllowedPropertySetIdentity. +func (r *ResourceModelWithAllowedPropertySetIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &r.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &r.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceModelWithAllowedPropertySetPlan. +func (r ResourceModelWithAllowedPropertySetPlan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", r.Name) + populate(objectMap, "product", r.Product) + populate(objectMap, "promotionCode", r.PromotionCode) + populate(objectMap, "publisher", r.Publisher) + populate(objectMap, "version", r.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceModelWithAllowedPropertySetPlan. +func (r *ResourceModelWithAllowedPropertySetPlan) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "product": + err = unpopulate(val, "Product", &r.Product) + delete(rawMsg, key) + case "promotionCode": + err = unpopulate(val, "PromotionCode", &r.PromotionCode) + delete(rawMsg, key) + case "publisher": + err = unpopulate(val, "Publisher", &r.Publisher) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &r.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceModelWithAllowedPropertySetSKU. +func (r ResourceModelWithAllowedPropertySetSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", r.Capacity) + populate(objectMap, "family", r.Family) + populate(objectMap, "name", r.Name) + populate(objectMap, "size", r.Size) + populate(objectMap, "tier", r.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceModelWithAllowedPropertySetSKU. +func (r *ResourceModelWithAllowedPropertySetSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &r.Capacity) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &r.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &r.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &r.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperation. +func (r ResourceProviderOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", r.Display) + populate(objectMap, "isDataAction", r.IsDataAction) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperation. +func (r *ResourceProviderOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &r.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &r.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationDisplay. +func (r ResourceProviderOperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "operation", r.Operation) + populate(objectMap, "provider", r.Provider) + populate(objectMap, "resource", r.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationDisplay. +func (r *ResourceProviderOperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &r.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &r.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &r.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceProviderOperationList. +func (r ResourceProviderOperationList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProviderOperationList. +func (r *ResourceProviderOperationList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingHostPoolReference. +func (s ScalingHostPoolReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostPoolArmPath", s.HostPoolArmPath) + populate(objectMap, "scalingPlanEnabled", s.ScalingPlanEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingHostPoolReference. +func (s *ScalingHostPoolReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostPoolArmPath": + err = unpopulate(val, "HostPoolArmPath", &s.HostPoolArmPath) + delete(rawMsg, key) + case "scalingPlanEnabled": + err = unpopulate(val, "ScalingPlanEnabled", &s.ScalingPlanEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlan. +func (s ScalingPlan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "managedBy", s.ManagedBy) + populate(objectMap, "name", s.Name) + populate(objectMap, "plan", s.Plan) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "sku", s.SKU) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlan. +func (s *ScalingPlan) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &s.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "managedBy": + err = unpopulate(val, "ManagedBy", &s.ManagedBy) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "plan": + err = unpopulate(val, "Plan", &s.Plan) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanList. +func (s ScalingPlanList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanList. +func (s *ScalingPlanList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPatch. +func (s ScalingPlanPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPatch. +func (s *ScalingPlanPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPatchProperties. +func (s ScalingPlanPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "exclusionTag", s.ExclusionTag) + populate(objectMap, "friendlyName", s.FriendlyName) + populate(objectMap, "hostPoolReferences", s.HostPoolReferences) + populate(objectMap, "schedules", s.Schedules) + populate(objectMap, "timeZone", s.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPatchProperties. +func (s *ScalingPlanPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "exclusionTag": + err = unpopulate(val, "ExclusionTag", &s.ExclusionTag) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &s.FriendlyName) + delete(rawMsg, key) + case "hostPoolReferences": + err = unpopulate(val, "HostPoolReferences", &s.HostPoolReferences) + delete(rawMsg, key) + case "schedules": + err = unpopulate(val, "Schedules", &s.Schedules) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &s.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPersonalSchedule. +func (s ScalingPlanPersonalSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPersonalSchedule. +func (s *ScalingPlanPersonalSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPersonalScheduleList. +func (s ScalingPlanPersonalScheduleList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPersonalScheduleList. +func (s *ScalingPlanPersonalScheduleList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPersonalSchedulePatch. +func (s ScalingPlanPersonalSchedulePatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPersonalSchedulePatch. +func (s *ScalingPlanPersonalSchedulePatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPersonalScheduleProperties. +func (s ScalingPlanPersonalScheduleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "daysOfWeek", s.DaysOfWeek) + populate(objectMap, "offPeakActionOnDisconnect", s.OffPeakActionOnDisconnect) + populate(objectMap, "offPeakActionOnLogoff", s.OffPeakActionOnLogoff) + populate(objectMap, "offPeakMinutesToWaitOnDisconnect", s.OffPeakMinutesToWaitOnDisconnect) + populate(objectMap, "offPeakMinutesToWaitOnLogoff", s.OffPeakMinutesToWaitOnLogoff) + populate(objectMap, "offPeakStartTime", s.OffPeakStartTime) + populate(objectMap, "offPeakStartVMOnConnect", s.OffPeakStartVMOnConnect) + populate(objectMap, "peakActionOnDisconnect", s.PeakActionOnDisconnect) + populate(objectMap, "peakActionOnLogoff", s.PeakActionOnLogoff) + populate(objectMap, "peakMinutesToWaitOnDisconnect", s.PeakMinutesToWaitOnDisconnect) + populate(objectMap, "peakMinutesToWaitOnLogoff", s.PeakMinutesToWaitOnLogoff) + populate(objectMap, "peakStartTime", s.PeakStartTime) + populate(objectMap, "peakStartVMOnConnect", s.PeakStartVMOnConnect) + populate(objectMap, "rampDownActionOnDisconnect", s.RampDownActionOnDisconnect) + populate(objectMap, "rampDownActionOnLogoff", s.RampDownActionOnLogoff) + populate(objectMap, "rampDownMinutesToWaitOnDisconnect", s.RampDownMinutesToWaitOnDisconnect) + populate(objectMap, "rampDownMinutesToWaitOnLogoff", s.RampDownMinutesToWaitOnLogoff) + populate(objectMap, "rampDownStartTime", s.RampDownStartTime) + populate(objectMap, "rampDownStartVMOnConnect", s.RampDownStartVMOnConnect) + populate(objectMap, "rampUpActionOnDisconnect", s.RampUpActionOnDisconnect) + populate(objectMap, "rampUpActionOnLogoff", s.RampUpActionOnLogoff) + populate(objectMap, "rampUpAutoStartHosts", s.RampUpAutoStartHosts) + populate(objectMap, "rampUpMinutesToWaitOnDisconnect", s.RampUpMinutesToWaitOnDisconnect) + populate(objectMap, "rampUpMinutesToWaitOnLogoff", s.RampUpMinutesToWaitOnLogoff) + populate(objectMap, "rampUpStartTime", s.RampUpStartTime) + populate(objectMap, "rampUpStartVMOnConnect", s.RampUpStartVMOnConnect) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPersonalScheduleProperties. +func (s *ScalingPlanPersonalScheduleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "daysOfWeek": + err = unpopulate(val, "DaysOfWeek", &s.DaysOfWeek) + delete(rawMsg, key) + case "offPeakActionOnDisconnect": + err = unpopulate(val, "OffPeakActionOnDisconnect", &s.OffPeakActionOnDisconnect) + delete(rawMsg, key) + case "offPeakActionOnLogoff": + err = unpopulate(val, "OffPeakActionOnLogoff", &s.OffPeakActionOnLogoff) + delete(rawMsg, key) + case "offPeakMinutesToWaitOnDisconnect": + err = unpopulate(val, "OffPeakMinutesToWaitOnDisconnect", &s.OffPeakMinutesToWaitOnDisconnect) + delete(rawMsg, key) + case "offPeakMinutesToWaitOnLogoff": + err = unpopulate(val, "OffPeakMinutesToWaitOnLogoff", &s.OffPeakMinutesToWaitOnLogoff) + delete(rawMsg, key) + case "offPeakStartTime": + err = unpopulate(val, "OffPeakStartTime", &s.OffPeakStartTime) + delete(rawMsg, key) + case "offPeakStartVMOnConnect": + err = unpopulate(val, "OffPeakStartVMOnConnect", &s.OffPeakStartVMOnConnect) + delete(rawMsg, key) + case "peakActionOnDisconnect": + err = unpopulate(val, "PeakActionOnDisconnect", &s.PeakActionOnDisconnect) + delete(rawMsg, key) + case "peakActionOnLogoff": + err = unpopulate(val, "PeakActionOnLogoff", &s.PeakActionOnLogoff) + delete(rawMsg, key) + case "peakMinutesToWaitOnDisconnect": + err = unpopulate(val, "PeakMinutesToWaitOnDisconnect", &s.PeakMinutesToWaitOnDisconnect) + delete(rawMsg, key) + case "peakMinutesToWaitOnLogoff": + err = unpopulate(val, "PeakMinutesToWaitOnLogoff", &s.PeakMinutesToWaitOnLogoff) + delete(rawMsg, key) + case "peakStartTime": + err = unpopulate(val, "PeakStartTime", &s.PeakStartTime) + delete(rawMsg, key) + case "peakStartVMOnConnect": + err = unpopulate(val, "PeakStartVMOnConnect", &s.PeakStartVMOnConnect) + delete(rawMsg, key) + case "rampDownActionOnDisconnect": + err = unpopulate(val, "RampDownActionOnDisconnect", &s.RampDownActionOnDisconnect) + delete(rawMsg, key) + case "rampDownActionOnLogoff": + err = unpopulate(val, "RampDownActionOnLogoff", &s.RampDownActionOnLogoff) + delete(rawMsg, key) + case "rampDownMinutesToWaitOnDisconnect": + err = unpopulate(val, "RampDownMinutesToWaitOnDisconnect", &s.RampDownMinutesToWaitOnDisconnect) + delete(rawMsg, key) + case "rampDownMinutesToWaitOnLogoff": + err = unpopulate(val, "RampDownMinutesToWaitOnLogoff", &s.RampDownMinutesToWaitOnLogoff) + delete(rawMsg, key) + case "rampDownStartTime": + err = unpopulate(val, "RampDownStartTime", &s.RampDownStartTime) + delete(rawMsg, key) + case "rampDownStartVMOnConnect": + err = unpopulate(val, "RampDownStartVMOnConnect", &s.RampDownStartVMOnConnect) + delete(rawMsg, key) + case "rampUpActionOnDisconnect": + err = unpopulate(val, "RampUpActionOnDisconnect", &s.RampUpActionOnDisconnect) + delete(rawMsg, key) + case "rampUpActionOnLogoff": + err = unpopulate(val, "RampUpActionOnLogoff", &s.RampUpActionOnLogoff) + delete(rawMsg, key) + case "rampUpAutoStartHosts": + err = unpopulate(val, "RampUpAutoStartHosts", &s.RampUpAutoStartHosts) + delete(rawMsg, key) + case "rampUpMinutesToWaitOnDisconnect": + err = unpopulate(val, "RampUpMinutesToWaitOnDisconnect", &s.RampUpMinutesToWaitOnDisconnect) + delete(rawMsg, key) + case "rampUpMinutesToWaitOnLogoff": + err = unpopulate(val, "RampUpMinutesToWaitOnLogoff", &s.RampUpMinutesToWaitOnLogoff) + delete(rawMsg, key) + case "rampUpStartTime": + err = unpopulate(val, "RampUpStartTime", &s.RampUpStartTime) + delete(rawMsg, key) + case "rampUpStartVMOnConnect": + err = unpopulate(val, "RampUpStartVMOnConnect", &s.RampUpStartVMOnConnect) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPooledSchedule. +func (s ScalingPlanPooledSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPooledSchedule. +func (s *ScalingPlanPooledSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPooledScheduleList. +func (s ScalingPlanPooledScheduleList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPooledScheduleList. +func (s *ScalingPlanPooledScheduleList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPooledSchedulePatch. +func (s ScalingPlanPooledSchedulePatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPooledSchedulePatch. +func (s *ScalingPlanPooledSchedulePatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPooledScheduleProperties. +func (s ScalingPlanPooledScheduleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "daysOfWeek", s.DaysOfWeek) + populate(objectMap, "offPeakLoadBalancingAlgorithm", s.OffPeakLoadBalancingAlgorithm) + populate(objectMap, "offPeakStartTime", s.OffPeakStartTime) + populate(objectMap, "peakLoadBalancingAlgorithm", s.PeakLoadBalancingAlgorithm) + populate(objectMap, "peakStartTime", s.PeakStartTime) + populate(objectMap, "rampDownCapacityThresholdPct", s.RampDownCapacityThresholdPct) + populate(objectMap, "rampDownForceLogoffUsers", s.RampDownForceLogoffUsers) + populate(objectMap, "rampDownLoadBalancingAlgorithm", s.RampDownLoadBalancingAlgorithm) + populate(objectMap, "rampDownMinimumHostsPct", s.RampDownMinimumHostsPct) + populate(objectMap, "rampDownNotificationMessage", s.RampDownNotificationMessage) + populate(objectMap, "rampDownStartTime", s.RampDownStartTime) + populate(objectMap, "rampDownStopHostsWhen", s.RampDownStopHostsWhen) + populate(objectMap, "rampDownWaitTimeMinutes", s.RampDownWaitTimeMinutes) + populate(objectMap, "rampUpCapacityThresholdPct", s.RampUpCapacityThresholdPct) + populate(objectMap, "rampUpLoadBalancingAlgorithm", s.RampUpLoadBalancingAlgorithm) + populate(objectMap, "rampUpMinimumHostsPct", s.RampUpMinimumHostsPct) + populate(objectMap, "rampUpStartTime", s.RampUpStartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanPooledScheduleProperties. +func (s *ScalingPlanPooledScheduleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "daysOfWeek": + err = unpopulate(val, "DaysOfWeek", &s.DaysOfWeek) + delete(rawMsg, key) + case "offPeakLoadBalancingAlgorithm": + err = unpopulate(val, "OffPeakLoadBalancingAlgorithm", &s.OffPeakLoadBalancingAlgorithm) + delete(rawMsg, key) + case "offPeakStartTime": + err = unpopulate(val, "OffPeakStartTime", &s.OffPeakStartTime) + delete(rawMsg, key) + case "peakLoadBalancingAlgorithm": + err = unpopulate(val, "PeakLoadBalancingAlgorithm", &s.PeakLoadBalancingAlgorithm) + delete(rawMsg, key) + case "peakStartTime": + err = unpopulate(val, "PeakStartTime", &s.PeakStartTime) + delete(rawMsg, key) + case "rampDownCapacityThresholdPct": + err = unpopulate(val, "RampDownCapacityThresholdPct", &s.RampDownCapacityThresholdPct) + delete(rawMsg, key) + case "rampDownForceLogoffUsers": + err = unpopulate(val, "RampDownForceLogoffUsers", &s.RampDownForceLogoffUsers) + delete(rawMsg, key) + case "rampDownLoadBalancingAlgorithm": + err = unpopulate(val, "RampDownLoadBalancingAlgorithm", &s.RampDownLoadBalancingAlgorithm) + delete(rawMsg, key) + case "rampDownMinimumHostsPct": + err = unpopulate(val, "RampDownMinimumHostsPct", &s.RampDownMinimumHostsPct) + delete(rawMsg, key) + case "rampDownNotificationMessage": + err = unpopulate(val, "RampDownNotificationMessage", &s.RampDownNotificationMessage) + delete(rawMsg, key) + case "rampDownStartTime": + err = unpopulate(val, "RampDownStartTime", &s.RampDownStartTime) + delete(rawMsg, key) + case "rampDownStopHostsWhen": + err = unpopulate(val, "RampDownStopHostsWhen", &s.RampDownStopHostsWhen) + delete(rawMsg, key) + case "rampDownWaitTimeMinutes": + err = unpopulate(val, "RampDownWaitTimeMinutes", &s.RampDownWaitTimeMinutes) + delete(rawMsg, key) + case "rampUpCapacityThresholdPct": + err = unpopulate(val, "RampUpCapacityThresholdPct", &s.RampUpCapacityThresholdPct) + delete(rawMsg, key) + case "rampUpLoadBalancingAlgorithm": + err = unpopulate(val, "RampUpLoadBalancingAlgorithm", &s.RampUpLoadBalancingAlgorithm) + delete(rawMsg, key) + case "rampUpMinimumHostsPct": + err = unpopulate(val, "RampUpMinimumHostsPct", &s.RampUpMinimumHostsPct) + delete(rawMsg, key) + case "rampUpStartTime": + err = unpopulate(val, "RampUpStartTime", &s.RampUpStartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingPlanProperties. +func (s ScalingPlanProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "exclusionTag", s.ExclusionTag) + populate(objectMap, "friendlyName", s.FriendlyName) + populate(objectMap, "hostPoolReferences", s.HostPoolReferences) + populate(objectMap, "hostPoolType", s.HostPoolType) + populate(objectMap, "objectId", s.ObjectID) + populate(objectMap, "schedules", s.Schedules) + populate(objectMap, "timeZone", s.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingPlanProperties. +func (s *ScalingPlanProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "exclusionTag": + err = unpopulate(val, "ExclusionTag", &s.ExclusionTag) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &s.FriendlyName) + delete(rawMsg, key) + case "hostPoolReferences": + err = unpopulate(val, "HostPoolReferences", &s.HostPoolReferences) + delete(rawMsg, key) + case "hostPoolType": + err = unpopulate(val, "HostPoolType", &s.HostPoolType) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &s.ObjectID) + delete(rawMsg, key) + case "schedules": + err = unpopulate(val, "Schedules", &s.Schedules) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &s.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScalingSchedule. +func (s ScalingSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "daysOfWeek", s.DaysOfWeek) + populate(objectMap, "name", s.Name) + populate(objectMap, "offPeakLoadBalancingAlgorithm", s.OffPeakLoadBalancingAlgorithm) + populate(objectMap, "offPeakStartTime", s.OffPeakStartTime) + populate(objectMap, "peakLoadBalancingAlgorithm", s.PeakLoadBalancingAlgorithm) + populate(objectMap, "peakStartTime", s.PeakStartTime) + populate(objectMap, "rampDownCapacityThresholdPct", s.RampDownCapacityThresholdPct) + populate(objectMap, "rampDownForceLogoffUsers", s.RampDownForceLogoffUsers) + populate(objectMap, "rampDownLoadBalancingAlgorithm", s.RampDownLoadBalancingAlgorithm) + populate(objectMap, "rampDownMinimumHostsPct", s.RampDownMinimumHostsPct) + populate(objectMap, "rampDownNotificationMessage", s.RampDownNotificationMessage) + populate(objectMap, "rampDownStartTime", s.RampDownStartTime) + populate(objectMap, "rampDownStopHostsWhen", s.RampDownStopHostsWhen) + populate(objectMap, "rampDownWaitTimeMinutes", s.RampDownWaitTimeMinutes) + populate(objectMap, "rampUpCapacityThresholdPct", s.RampUpCapacityThresholdPct) + populate(objectMap, "rampUpLoadBalancingAlgorithm", s.RampUpLoadBalancingAlgorithm) + populate(objectMap, "rampUpMinimumHostsPct", s.RampUpMinimumHostsPct) + populate(objectMap, "rampUpStartTime", s.RampUpStartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingSchedule. +func (s *ScalingSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "daysOfWeek": + err = unpopulate(val, "DaysOfWeek", &s.DaysOfWeek) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "offPeakLoadBalancingAlgorithm": + err = unpopulate(val, "OffPeakLoadBalancingAlgorithm", &s.OffPeakLoadBalancingAlgorithm) + delete(rawMsg, key) + case "offPeakStartTime": + err = unpopulate(val, "OffPeakStartTime", &s.OffPeakStartTime) + delete(rawMsg, key) + case "peakLoadBalancingAlgorithm": + err = unpopulate(val, "PeakLoadBalancingAlgorithm", &s.PeakLoadBalancingAlgorithm) + delete(rawMsg, key) + case "peakStartTime": + err = unpopulate(val, "PeakStartTime", &s.PeakStartTime) + delete(rawMsg, key) + case "rampDownCapacityThresholdPct": + err = unpopulate(val, "RampDownCapacityThresholdPct", &s.RampDownCapacityThresholdPct) + delete(rawMsg, key) + case "rampDownForceLogoffUsers": + err = unpopulate(val, "RampDownForceLogoffUsers", &s.RampDownForceLogoffUsers) + delete(rawMsg, key) + case "rampDownLoadBalancingAlgorithm": + err = unpopulate(val, "RampDownLoadBalancingAlgorithm", &s.RampDownLoadBalancingAlgorithm) + delete(rawMsg, key) + case "rampDownMinimumHostsPct": + err = unpopulate(val, "RampDownMinimumHostsPct", &s.RampDownMinimumHostsPct) + delete(rawMsg, key) + case "rampDownNotificationMessage": + err = unpopulate(val, "RampDownNotificationMessage", &s.RampDownNotificationMessage) + delete(rawMsg, key) + case "rampDownStartTime": + err = unpopulate(val, "RampDownStartTime", &s.RampDownStartTime) + delete(rawMsg, key) + case "rampDownStopHostsWhen": + err = unpopulate(val, "RampDownStopHostsWhen", &s.RampDownStopHostsWhen) + delete(rawMsg, key) + case "rampDownWaitTimeMinutes": + err = unpopulate(val, "RampDownWaitTimeMinutes", &s.RampDownWaitTimeMinutes) + delete(rawMsg, key) + case "rampUpCapacityThresholdPct": + err = unpopulate(val, "RampUpCapacityThresholdPct", &s.RampUpCapacityThresholdPct) + delete(rawMsg, key) + case "rampUpLoadBalancingAlgorithm": + err = unpopulate(val, "RampUpLoadBalancingAlgorithm", &s.RampUpLoadBalancingAlgorithm) + delete(rawMsg, key) + case "rampUpMinimumHostsPct": + err = unpopulate(val, "RampUpMinimumHostsPct", &s.RampUpMinimumHostsPct) + delete(rawMsg, key) + case "rampUpStartTime": + err = unpopulate(val, "RampUpStartTime", &s.RampUpStartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SendMessage. +func (s SendMessage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "messageBody", s.MessageBody) + populate(objectMap, "messageTitle", s.MessageTitle) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SendMessage. +func (s *SendMessage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "messageBody": + err = unpopulate(val, "MessageBody", &s.MessageBody) + delete(rawMsg, key) + case "messageTitle": + err = unpopulate(val, "MessageTitle", &s.MessageTitle) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", s.LogSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionHost. +func (s SessionHost) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionHost. +func (s *SessionHost) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionHostHealthCheckFailureDetails. +func (s SessionHostHealthCheckFailureDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", s.ErrorCode) + populateDateTimeRFC3339(objectMap, "lastHealthCheckDateTime", s.LastHealthCheckDateTime) + populate(objectMap, "message", s.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostHealthCheckFailureDetails. +func (s *SessionHostHealthCheckFailureDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &s.ErrorCode) + delete(rawMsg, key) + case "lastHealthCheckDateTime": + err = unpopulateDateTimeRFC3339(val, "LastHealthCheckDateTime", &s.LastHealthCheckDateTime) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &s.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionHostHealthCheckReport. +func (s SessionHostHealthCheckReport) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalFailureDetails", s.AdditionalFailureDetails) + populate(objectMap, "healthCheckName", s.HealthCheckName) + populate(objectMap, "healthCheckResult", s.HealthCheckResult) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostHealthCheckReport. +func (s *SessionHostHealthCheckReport) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalFailureDetails": + err = unpopulate(val, "AdditionalFailureDetails", &s.AdditionalFailureDetails) + delete(rawMsg, key) + case "healthCheckName": + err = unpopulate(val, "HealthCheckName", &s.HealthCheckName) + delete(rawMsg, key) + case "healthCheckResult": + err = unpopulate(val, "HealthCheckResult", &s.HealthCheckResult) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionHostList. +func (s SessionHostList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostList. +func (s *SessionHostList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionHostPatch. +func (s SessionHostPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostPatch. +func (s *SessionHostPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionHostPatchProperties. +func (s SessionHostPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowNewSession", s.AllowNewSession) + populate(objectMap, "assignedUser", s.AssignedUser) + populate(objectMap, "friendlyName", s.FriendlyName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostPatchProperties. +func (s *SessionHostPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowNewSession": + err = unpopulate(val, "AllowNewSession", &s.AllowNewSession) + delete(rawMsg, key) + case "assignedUser": + err = unpopulate(val, "AssignedUser", &s.AssignedUser) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &s.FriendlyName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionHostProperties. +func (s SessionHostProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentVersion", s.AgentVersion) + populate(objectMap, "allowNewSession", s.AllowNewSession) + populate(objectMap, "assignedUser", s.AssignedUser) + populate(objectMap, "friendlyName", s.FriendlyName) + populateDateTimeRFC3339(objectMap, "lastHeartBeat", s.LastHeartBeat) + populateDateTimeRFC3339(objectMap, "lastUpdateTime", s.LastUpdateTime) + populate(objectMap, "osVersion", s.OSVersion) + populate(objectMap, "objectId", s.ObjectID) + populate(objectMap, "resourceId", s.ResourceID) + populate(objectMap, "sessionHostHealthCheckResults", s.SessionHostHealthCheckResults) + populate(objectMap, "sessions", s.Sessions) + populate(objectMap, "status", s.Status) + populateDateTimeRFC3339(objectMap, "statusTimestamp", s.StatusTimestamp) + populate(objectMap, "sxSStackVersion", s.SxSStackVersion) + populate(objectMap, "updateErrorMessage", s.UpdateErrorMessage) + populate(objectMap, "updateState", s.UpdateState) + populate(objectMap, "virtualMachineId", s.VirtualMachineID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostProperties. +func (s *SessionHostProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentVersion": + err = unpopulate(val, "AgentVersion", &s.AgentVersion) + delete(rawMsg, key) + case "allowNewSession": + err = unpopulate(val, "AllowNewSession", &s.AllowNewSession) + delete(rawMsg, key) + case "assignedUser": + err = unpopulate(val, "AssignedUser", &s.AssignedUser) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &s.FriendlyName) + delete(rawMsg, key) + case "lastHeartBeat": + err = unpopulateDateTimeRFC3339(val, "LastHeartBeat", &s.LastHeartBeat) + delete(rawMsg, key) + case "lastUpdateTime": + err = unpopulateDateTimeRFC3339(val, "LastUpdateTime", &s.LastUpdateTime) + delete(rawMsg, key) + case "osVersion": + err = unpopulate(val, "OSVersion", &s.OSVersion) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &s.ObjectID) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &s.ResourceID) + delete(rawMsg, key) + case "sessionHostHealthCheckResults": + err = unpopulate(val, "SessionHostHealthCheckResults", &s.SessionHostHealthCheckResults) + delete(rawMsg, key) + case "sessions": + err = unpopulate(val, "Sessions", &s.Sessions) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "statusTimestamp": + err = unpopulateDateTimeRFC3339(val, "StatusTimestamp", &s.StatusTimestamp) + delete(rawMsg, key) + case "sxSStackVersion": + err = unpopulate(val, "SxSStackVersion", &s.SxSStackVersion) + delete(rawMsg, key) + case "updateErrorMessage": + err = unpopulate(val, "UpdateErrorMessage", &s.UpdateErrorMessage) + delete(rawMsg, key) + case "updateState": + err = unpopulate(val, "UpdateState", &s.UpdateState) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &s.VirtualMachineID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StartMenuItem. +func (s StartMenuItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StartMenuItem. +func (s *StartMenuItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StartMenuItemList. +func (s StartMenuItemList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StartMenuItemList. +func (s *StartMenuItemList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StartMenuItemProperties. +func (s StartMenuItemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appAlias", s.AppAlias) + populate(objectMap, "commandLineArguments", s.CommandLineArguments) + populate(objectMap, "filePath", s.FilePath) + populate(objectMap, "iconIndex", s.IconIndex) + populate(objectMap, "iconPath", s.IconPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StartMenuItemProperties. +func (s *StartMenuItemProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appAlias": + err = unpopulate(val, "AppAlias", &s.AppAlias) + delete(rawMsg, key) + case "commandLineArguments": + err = unpopulate(val, "CommandLineArguments", &s.CommandLineArguments) + delete(rawMsg, key) + case "filePath": + err = unpopulate(val, "FilePath", &s.FilePath) + delete(rawMsg, key) + case "iconIndex": + err = unpopulate(val, "IconIndex", &s.IconIndex) + delete(rawMsg, key) + case "iconPath": + err = unpopulate(val, "IconPath", &s.IconPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Time. +func (t Time) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hour", t.Hour) + populate(objectMap, "minute", t.Minute) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Time. +func (t *Time) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hour": + err = unpopulate(val, "Hour", &t.Hour) + delete(rawMsg, key) + case "minute": + err = unpopulate(val, "Minute", &t.Minute) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserSession. +func (u UserSession) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", u.ID) + populate(objectMap, "name", u.Name) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "systemData", u.SystemData) + populate(objectMap, "type", u.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserSession. +func (u *UserSession) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &u.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserSessionList. +func (u UserSessionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserSessionList. +func (u *UserSessionList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserSessionProperties. +func (u UserSessionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeDirectoryUserName", u.ActiveDirectoryUserName) + populate(objectMap, "applicationType", u.ApplicationType) + populateDateTimeRFC3339(objectMap, "createTime", u.CreateTime) + populate(objectMap, "objectId", u.ObjectID) + populate(objectMap, "sessionState", u.SessionState) + populate(objectMap, "userPrincipalName", u.UserPrincipalName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserSessionProperties. +func (u *UserSessionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeDirectoryUserName": + err = unpopulate(val, "ActiveDirectoryUserName", &u.ActiveDirectoryUserName) + delete(rawMsg, key) + case "applicationType": + err = unpopulate(val, "ApplicationType", &u.ApplicationType) + delete(rawMsg, key) + case "createTime": + err = unpopulateDateTimeRFC3339(val, "CreateTime", &u.CreateTime) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &u.ObjectID) + delete(rawMsg, key) + case "sessionState": + err = unpopulate(val, "SessionState", &u.SessionState) + delete(rawMsg, key) + case "userPrincipalName": + err = unpopulate(val, "UserPrincipalName", &u.UserPrincipalName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Workspace. +func (w Workspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", w.Etag) + populate(objectMap, "id", w.ID) + populate(objectMap, "identity", w.Identity) + populate(objectMap, "kind", w.Kind) + populate(objectMap, "location", w.Location) + populate(objectMap, "managedBy", w.ManagedBy) + populate(objectMap, "name", w.Name) + populate(objectMap, "plan", w.Plan) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "sku", w.SKU) + populate(objectMap, "systemData", w.SystemData) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Workspace. +func (w *Workspace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &w.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &w.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "managedBy": + err = unpopulate(val, "ManagedBy", &w.ManagedBy) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "plan": + err = unpopulate(val, "Plan", &w.Plan) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &w.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &w.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceList. +func (w WorkspaceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceList. +func (w *WorkspaceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspacePatch. +func (w WorkspacePatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacePatch. +func (w *WorkspacePatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspacePatchProperties. +func (w WorkspacePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationGroupReferences", w.ApplicationGroupReferences) + populate(objectMap, "description", w.Description) + populate(objectMap, "friendlyName", w.FriendlyName) + populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacePatchProperties. +func (w *WorkspacePatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationGroupReferences": + err = unpopulate(val, "ApplicationGroupReferences", &w.ApplicationGroupReferences) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &w.Description) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &w.FriendlyName) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &w.PublicNetworkAccess) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties. +func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationGroupReferences", w.ApplicationGroupReferences) + populate(objectMap, "cloudPcResource", w.CloudPcResource) + populate(objectMap, "description", w.Description) + populate(objectMap, "friendlyName", w.FriendlyName) + populate(objectMap, "objectId", w.ObjectID) + populate(objectMap, "privateEndpointConnections", w.PrivateEndpointConnections) + populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceProperties. +func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationGroupReferences": + err = unpopulate(val, "ApplicationGroupReferences", &w.ApplicationGroupReferences) + delete(rawMsg, key) + case "cloudPcResource": + err = unpopulate(val, "CloudPcResource", &w.CloudPcResource) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &w.Description) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &w.FriendlyName) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &w.ObjectID) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &w.PrivateEndpointConnections) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &w.PublicNetworkAccess) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateByteArray[T any](m map[string]any, k string, b []T, convert func() any) { + if azcore.IsNullValue(b) { + m[k] = nil + } else if len(b) == 0 { + return + } else { + m[k] = convert() + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/msiximages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/msiximages_client.go new file mode 100644 index 00000000..4f2da2cd --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/msiximages_client.go @@ -0,0 +1,112 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// MsixImagesClient contains the methods for the MsixImages group. +// Don't use this type directly, use NewMsixImagesClient() instead. +type MsixImagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewMsixImagesClient creates a new instance of MsixImagesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewMsixImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MsixImagesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &MsixImagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewExpandPager - Expands and Lists MSIX packages in an Image, given the Image Path. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - msixImageURI - Object containing URI to MSIX Image +// - options - MsixImagesClientExpandOptions contains the optional parameters for the MsixImagesClient.NewExpandPager method. +func (client *MsixImagesClient) NewExpandPager(resourceGroupName string, hostPoolName string, msixImageURI MSIXImageURI, options *MsixImagesClientExpandOptions) *runtime.Pager[MsixImagesClientExpandResponse] { + return runtime.NewPager(runtime.PagingHandler[MsixImagesClientExpandResponse]{ + More: func(page MsixImagesClientExpandResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *MsixImagesClientExpandResponse) (MsixImagesClientExpandResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MsixImagesClient.NewExpandPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.expandCreateRequest(ctx, resourceGroupName, hostPoolName, msixImageURI, options) + }, nil) + if err != nil { + return MsixImagesClientExpandResponse{}, err + } + return client.expandHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// expandCreateRequest creates the Expand request. +func (client *MsixImagesClient) expandCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, msixImageURI MSIXImageURI, options *MsixImagesClientExpandOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/expandMsixImage" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, msixImageURI); err != nil { + return nil, err + } + return req, nil +} + +// expandHandleResponse handles the Expand response. +func (client *MsixImagesClient) expandHandleResponse(resp *http.Response) (MsixImagesClientExpandResponse, error) { + result := MsixImagesClientExpandResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpandMsixImageList); err != nil { + return MsixImagesClientExpandResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/msixpackages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/msixpackages_client.go new file mode 100644 index 00000000..42b61800 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/msixpackages_client.go @@ -0,0 +1,395 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// MSIXPackagesClient contains the methods for the MSIXPackages group. +// Don't use this type directly, use NewMSIXPackagesClient() instead. +type MSIXPackagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewMSIXPackagesClient creates a new instance of MSIXPackagesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewMSIXPackagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MSIXPackagesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &MSIXPackagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or update a MSIX package. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool +// - msixPackage - Object containing MSIX Package definitions. +// - options - MSIXPackagesClientCreateOrUpdateOptions contains the optional parameters for the MSIXPackagesClient.CreateOrUpdate +// method. +func (client *MSIXPackagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, msixPackage MSIXPackage, options *MSIXPackagesClientCreateOrUpdateOptions) (MSIXPackagesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "MSIXPackagesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, options) + if err != nil { + return MSIXPackagesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MSIXPackagesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return MSIXPackagesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *MSIXPackagesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, msixPackage MSIXPackage, options *MSIXPackagesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if msixPackageFullName == "" { + return nil, errors.New("parameter msixPackageFullName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{msixPackageFullName}", url.PathEscape(msixPackageFullName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, msixPackage); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *MSIXPackagesClient) createOrUpdateHandleResponse(resp *http.Response) (MSIXPackagesClientCreateOrUpdateResponse, error) { + result := MSIXPackagesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSIXPackage); err != nil { + return MSIXPackagesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Remove an MSIX Package. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool +// - options - MSIXPackagesClientDeleteOptions contains the optional parameters for the MSIXPackagesClient.Delete method. +func (client *MSIXPackagesClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientDeleteOptions) (MSIXPackagesClientDeleteResponse, error) { + var err error + const operationName = "MSIXPackagesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, hostPoolName, msixPackageFullName, options) + if err != nil { + return MSIXPackagesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MSIXPackagesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return MSIXPackagesClientDeleteResponse{}, err + } + return MSIXPackagesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *MSIXPackagesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if msixPackageFullName == "" { + return nil, errors.New("parameter msixPackageFullName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{msixPackageFullName}", url.PathEscape(msixPackageFullName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a msixpackage. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool +// - options - MSIXPackagesClientGetOptions contains the optional parameters for the MSIXPackagesClient.Get method. +func (client *MSIXPackagesClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientGetOptions) (MSIXPackagesClientGetResponse, error) { + var err error + const operationName = "MSIXPackagesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, hostPoolName, msixPackageFullName, options) + if err != nil { + return MSIXPackagesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MSIXPackagesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MSIXPackagesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *MSIXPackagesClient) getCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if msixPackageFullName == "" { + return nil, errors.New("parameter msixPackageFullName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{msixPackageFullName}", url.PathEscape(msixPackageFullName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *MSIXPackagesClient) getHandleResponse(resp *http.Response) (MSIXPackagesClientGetResponse, error) { + result := MSIXPackagesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSIXPackage); err != nil { + return MSIXPackagesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List MSIX packages in hostpool. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - MSIXPackagesClientListOptions contains the optional parameters for the MSIXPackagesClient.NewListPager method. +func (client *MSIXPackagesClient) NewListPager(resourceGroupName string, hostPoolName string, options *MSIXPackagesClientListOptions) *runtime.Pager[MSIXPackagesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[MSIXPackagesClientListResponse]{ + More: func(page MSIXPackagesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *MSIXPackagesClientListResponse) (MSIXPackagesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MSIXPackagesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, hostPoolName, options) + }, nil) + if err != nil { + return MSIXPackagesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *MSIXPackagesClient) listCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *MSIXPackagesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *MSIXPackagesClient) listHandleResponse(resp *http.Response) (MSIXPackagesClientListResponse, error) { + result := MSIXPackagesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSIXPackageList); err != nil { + return MSIXPackagesClientListResponse{}, err + } + return result, nil +} + +// Update - Update an MSIX Package. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool +// - options - MSIXPackagesClientUpdateOptions contains the optional parameters for the MSIXPackagesClient.Update method. +func (client *MSIXPackagesClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientUpdateOptions) (MSIXPackagesClientUpdateResponse, error) { + var err error + const operationName = "MSIXPackagesClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, hostPoolName, msixPackageFullName, options) + if err != nil { + return MSIXPackagesClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MSIXPackagesClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MSIXPackagesClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *MSIXPackagesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if msixPackageFullName == "" { + return nil, errors.New("parameter msixPackageFullName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{msixPackageFullName}", url.PathEscape(msixPackageFullName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.MsixPackage != nil { + if err := runtime.MarshalAsJSON(req, *options.MsixPackage); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *MSIXPackagesClient) updateHandleResponse(resp *http.Response) (MSIXPackagesClientUpdateResponse, error) { + result := MSIXPackagesClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MSIXPackage); err != nil { + return MSIXPackagesClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/operations_client.go new file mode 100644 index 00000000..fb32651e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/operations_client.go @@ -0,0 +1,88 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - List all of the available operations the Desktop Virtualization resource provider supports. +// +// Generated from API version 2024-04-03 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.DesktopVirtualization/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceProviderOperationList); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/options.go new file mode 100644 index 00000000..6286b843 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/options.go @@ -0,0 +1,605 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +// AppAttachPackageClientCreateOrUpdateOptions contains the optional parameters for the AppAttachPackageClient.CreateOrUpdate +// method. +type AppAttachPackageClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AppAttachPackageClientDeleteOptions contains the optional parameters for the AppAttachPackageClient.Delete method. +type AppAttachPackageClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AppAttachPackageClientGetOptions contains the optional parameters for the AppAttachPackageClient.Get method. +type AppAttachPackageClientGetOptions struct { + // placeholder for future optional parameters +} + +// AppAttachPackageClientListByResourceGroupOptions contains the optional parameters for the AppAttachPackageClient.NewListByResourceGroupPager +// method. +type AppAttachPackageClientListByResourceGroupOptions struct { + // OData filter expression. Valid properties for filtering are package name and host pool. + Filter *string +} + +// AppAttachPackageClientListBySubscriptionOptions contains the optional parameters for the AppAttachPackageClient.NewListBySubscriptionPager +// method. +type AppAttachPackageClientListBySubscriptionOptions struct { + // OData filter expression. Valid properties for filtering are package name, host pool, and resource group. + Filter *string +} + +// AppAttachPackageClientUpdateOptions contains the optional parameters for the AppAttachPackageClient.Update method. +type AppAttachPackageClientUpdateOptions struct { + // Object containing App Attach Package definition. + AppAttachPackagePatch *AppAttachPackagePatch +} + +// AppAttachPackageInfoClientImportOptions contains the optional parameters for the AppAttachPackageInfoClient.NewImportPager +// method. +type AppAttachPackageInfoClientImportOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGroupsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationGroupsClient.CreateOrUpdate +// method. +type ApplicationGroupsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGroupsClientDeleteOptions contains the optional parameters for the ApplicationGroupsClient.Delete method. +type ApplicationGroupsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGroupsClientGetOptions contains the optional parameters for the ApplicationGroupsClient.Get method. +type ApplicationGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGroupsClientListByResourceGroupOptions contains the optional parameters for the ApplicationGroupsClient.NewListByResourceGroupPager +// method. +type ApplicationGroupsClientListByResourceGroupOptions struct { + // OData filter expression. Valid properties for filtering are applicationGroupType. + Filter *string + + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// ApplicationGroupsClientListBySubscriptionOptions contains the optional parameters for the ApplicationGroupsClient.NewListBySubscriptionPager +// method. +type ApplicationGroupsClientListBySubscriptionOptions struct { + // OData filter expression. Valid properties for filtering are applicationGroupType. + Filter *string +} + +// ApplicationGroupsClientUpdateOptions contains the optional parameters for the ApplicationGroupsClient.Update method. +type ApplicationGroupsClientUpdateOptions struct { + // Object containing ApplicationGroup definitions. + ApplicationGroup *ApplicationGroupPatch +} + +// ApplicationsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.CreateOrUpdate method. +type ApplicationsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ApplicationsClientDeleteOptions contains the optional parameters for the ApplicationsClient.Delete method. +type ApplicationsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method. +type ApplicationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.NewListPager method. +type ApplicationsClientListOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// ApplicationsClientUpdateOptions contains the optional parameters for the ApplicationsClient.Update method. +type ApplicationsClientUpdateOptions struct { + // Object containing Application definitions. + Application *ApplicationPatch +} + +// DesktopsClientGetOptions contains the optional parameters for the DesktopsClient.Get method. +type DesktopsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DesktopsClientListOptions contains the optional parameters for the DesktopsClient.NewListPager method. +type DesktopsClientListOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// DesktopsClientUpdateOptions contains the optional parameters for the DesktopsClient.Update method. +type DesktopsClientUpdateOptions struct { + // Object containing Desktop definitions. + Desktop *DesktopPatch +} + +// HostPoolsClientCreateOrUpdateOptions contains the optional parameters for the HostPoolsClient.CreateOrUpdate method. +type HostPoolsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// HostPoolsClientDeleteOptions contains the optional parameters for the HostPoolsClient.Delete method. +type HostPoolsClientDeleteOptions struct { + // Force flag to delete sessionHost. + Force *bool +} + +// HostPoolsClientGetOptions contains the optional parameters for the HostPoolsClient.Get method. +type HostPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// HostPoolsClientListByResourceGroupOptions contains the optional parameters for the HostPoolsClient.NewListByResourceGroupPager +// method. +type HostPoolsClientListByResourceGroupOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// HostPoolsClientListOptions contains the optional parameters for the HostPoolsClient.NewListPager method. +type HostPoolsClientListOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// HostPoolsClientListRegistrationTokensOptions contains the optional parameters for the HostPoolsClient.ListRegistrationTokens +// method. +type HostPoolsClientListRegistrationTokensOptions struct { + // placeholder for future optional parameters +} + +// HostPoolsClientRetrieveRegistrationTokenOptions contains the optional parameters for the HostPoolsClient.RetrieveRegistrationToken +// method. +type HostPoolsClientRetrieveRegistrationTokenOptions struct { + // placeholder for future optional parameters +} + +// HostPoolsClientUpdateOptions contains the optional parameters for the HostPoolsClient.Update method. +type HostPoolsClientUpdateOptions struct { + // Object containing HostPool definitions. + HostPool *HostPoolPatch +} + +// MSIXPackagesClientCreateOrUpdateOptions contains the optional parameters for the MSIXPackagesClient.CreateOrUpdate method. +type MSIXPackagesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// MSIXPackagesClientDeleteOptions contains the optional parameters for the MSIXPackagesClient.Delete method. +type MSIXPackagesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// MSIXPackagesClientGetOptions contains the optional parameters for the MSIXPackagesClient.Get method. +type MSIXPackagesClientGetOptions struct { + // placeholder for future optional parameters +} + +// MSIXPackagesClientListOptions contains the optional parameters for the MSIXPackagesClient.NewListPager method. +type MSIXPackagesClientListOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// MSIXPackagesClientUpdateOptions contains the optional parameters for the MSIXPackagesClient.Update method. +type MSIXPackagesClientUpdateOptions struct { + // Object containing MSIX Package definitions. + MsixPackage *MSIXPackagePatch +} + +// MsixImagesClientExpandOptions contains the optional parameters for the MsixImagesClient.NewExpandPager method. +type MsixImagesClientExpandOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientDeleteByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.DeleteByHostPool +// method. +type PrivateEndpointConnectionsClientDeleteByHostPoolOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientDeleteByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.DeleteByWorkspace +// method. +type PrivateEndpointConnectionsClientDeleteByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientGetByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.GetByHostPool +// method. +type PrivateEndpointConnectionsClientGetByHostPoolOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientGetByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.GetByWorkspace +// method. +type PrivateEndpointConnectionsClientGetByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByHostPoolPager +// method. +type PrivateEndpointConnectionsClientListByHostPoolOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// PrivateEndpointConnectionsClientListByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByWorkspacePager +// method. +type PrivateEndpointConnectionsClientListByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientUpdateByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.UpdateByHostPool +// method. +type PrivateEndpointConnectionsClientUpdateByHostPoolOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientUpdateByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.UpdateByWorkspace +// method. +type PrivateEndpointConnectionsClientUpdateByWorkspaceOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListByHostPoolOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByHostPoolPager +// method. +type PrivateLinkResourcesClientListByHostPoolOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// PrivateLinkResourcesClientListByWorkspaceOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByWorkspacePager +// method. +type PrivateLinkResourcesClientListByWorkspaceOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// ScalingPlanPersonalSchedulesClientCreateOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Create +// method. +type ScalingPlanPersonalSchedulesClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ScalingPlanPersonalSchedulesClientDeleteOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Delete +// method. +type ScalingPlanPersonalSchedulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ScalingPlanPersonalSchedulesClientGetOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Get +// method. +type ScalingPlanPersonalSchedulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ScalingPlanPersonalSchedulesClientListOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.NewListPager +// method. +type ScalingPlanPersonalSchedulesClientListOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// ScalingPlanPersonalSchedulesClientUpdateOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Update +// method. +type ScalingPlanPersonalSchedulesClientUpdateOptions struct { + // Object containing ScalingPlanPersonalSchedule definitions. + ScalingPlanSchedule *ScalingPlanPersonalSchedulePatch +} + +// ScalingPlanPooledSchedulesClientCreateOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Create +// method. +type ScalingPlanPooledSchedulesClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ScalingPlanPooledSchedulesClientDeleteOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Delete +// method. +type ScalingPlanPooledSchedulesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ScalingPlanPooledSchedulesClientGetOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Get +// method. +type ScalingPlanPooledSchedulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ScalingPlanPooledSchedulesClientListOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.NewListPager +// method. +type ScalingPlanPooledSchedulesClientListOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// ScalingPlanPooledSchedulesClientUpdateOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Update +// method. +type ScalingPlanPooledSchedulesClientUpdateOptions struct { + // Object containing ScalingPlanPooledSchedule definitions. + ScalingPlanSchedule *ScalingPlanPooledSchedulePatch +} + +// ScalingPlansClientCreateOptions contains the optional parameters for the ScalingPlansClient.Create method. +type ScalingPlansClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ScalingPlansClientDeleteOptions contains the optional parameters for the ScalingPlansClient.Delete method. +type ScalingPlansClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ScalingPlansClientGetOptions contains the optional parameters for the ScalingPlansClient.Get method. +type ScalingPlansClientGetOptions struct { + // placeholder for future optional parameters +} + +// ScalingPlansClientListByHostPoolOptions contains the optional parameters for the ScalingPlansClient.NewListByHostPoolPager +// method. +type ScalingPlansClientListByHostPoolOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// ScalingPlansClientListByResourceGroupOptions contains the optional parameters for the ScalingPlansClient.NewListByResourceGroupPager +// method. +type ScalingPlansClientListByResourceGroupOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// ScalingPlansClientListBySubscriptionOptions contains the optional parameters for the ScalingPlansClient.NewListBySubscriptionPager +// method. +type ScalingPlansClientListBySubscriptionOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// ScalingPlansClientUpdateOptions contains the optional parameters for the ScalingPlansClient.Update method. +type ScalingPlansClientUpdateOptions struct { + // Object containing scaling plan definitions. + ScalingPlan *ScalingPlanPatch +} + +// SessionHostsClientDeleteOptions contains the optional parameters for the SessionHostsClient.Delete method. +type SessionHostsClientDeleteOptions struct { + // Force flag to force sessionHost deletion even when userSession exists. + Force *bool +} + +// SessionHostsClientGetOptions contains the optional parameters for the SessionHostsClient.Get method. +type SessionHostsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SessionHostsClientListOptions contains the optional parameters for the SessionHostsClient.NewListPager method. +type SessionHostsClientListOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// SessionHostsClientUpdateOptions contains the optional parameters for the SessionHostsClient.Update method. +type SessionHostsClientUpdateOptions struct { + // Force flag to update assign, unassign or reassign personal desktop. + Force *bool + + // Object containing SessionHost definitions. + SessionHost *SessionHostPatch +} + +// StartMenuItemsClientListOptions contains the optional parameters for the StartMenuItemsClient.NewListPager method. +type StartMenuItemsClientListOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// UserSessionsClientDeleteOptions contains the optional parameters for the UserSessionsClient.Delete method. +type UserSessionsClientDeleteOptions struct { + // Force flag to login off userSession. + Force *bool +} + +// UserSessionsClientDisconnectOptions contains the optional parameters for the UserSessionsClient.Disconnect method. +type UserSessionsClientDisconnectOptions struct { + // placeholder for future optional parameters +} + +// UserSessionsClientGetOptions contains the optional parameters for the UserSessionsClient.Get method. +type UserSessionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// UserSessionsClientListByHostPoolOptions contains the optional parameters for the UserSessionsClient.NewListByHostPoolPager +// method. +type UserSessionsClientListByHostPoolOptions struct { + // OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. + Filter *string + + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// UserSessionsClientListOptions contains the optional parameters for the UserSessionsClient.NewListPager method. +type UserSessionsClientListOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// UserSessionsClientSendMessageOptions contains the optional parameters for the UserSessionsClient.SendMessage method. +type UserSessionsClientSendMessageOptions struct { + // Object containing message includes title and message body + SendMessage *SendMessage +} + +// WorkspacesClientCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.CreateOrUpdate method. +type WorkspacesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientDeleteOptions contains the optional parameters for the WorkspacesClient.Delete method. +type WorkspacesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. +type WorkspacesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager +// method. +type WorkspacesClientListByResourceGroupOptions struct { + // Initial number of items to skip. + InitialSkip *int32 + + // Indicates whether the collection is descending. + IsDescending *bool + + // Number of items per page. + PageSize *int32 +} + +// WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager +// method. +type WorkspacesClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method. +type WorkspacesClientUpdateOptions struct { + // Object containing Workspace definitions. + Workspace *WorkspacePatch +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/privateendpointconnections_client.go new file mode 100644 index 00000000..71e55c8e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/privateendpointconnections_client.go @@ -0,0 +1,592 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. +// Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead. +type PrivateEndpointConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateEndpointConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// DeleteByHostPool - Remove a connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource. +// - options - PrivateEndpointConnectionsClientDeleteByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.DeleteByHostPool +// method. +func (client *PrivateEndpointConnectionsClient) DeleteByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteByHostPoolOptions) (PrivateEndpointConnectionsClientDeleteByHostPoolResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.DeleteByHostPool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteByHostPoolCreateRequest(ctx, resourceGroupName, hostPoolName, privateEndpointConnectionName, options) + if err != nil { + return PrivateEndpointConnectionsClientDeleteByHostPoolResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionsClientDeleteByHostPoolResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientDeleteByHostPoolResponse{}, err + } + return PrivateEndpointConnectionsClientDeleteByHostPoolResponse{}, nil +} + +// deleteByHostPoolCreateRequest creates the DeleteByHostPool request. +func (client *PrivateEndpointConnectionsClient) deleteByHostPoolCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteByHostPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// DeleteByWorkspace - Remove a connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace +// - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource. +// - options - PrivateEndpointConnectionsClientDeleteByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.DeleteByWorkspace +// method. +func (client *PrivateEndpointConnectionsClient) DeleteByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteByWorkspaceOptions) (PrivateEndpointConnectionsClientDeleteByWorkspaceResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.DeleteByWorkspace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, options) + if err != nil { + return PrivateEndpointConnectionsClientDeleteByWorkspaceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionsClientDeleteByWorkspaceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientDeleteByWorkspaceResponse{}, err + } + return PrivateEndpointConnectionsClientDeleteByWorkspaceResponse{}, nil +} + +// deleteByWorkspaceCreateRequest creates the DeleteByWorkspace request. +func (client *PrivateEndpointConnectionsClient) deleteByWorkspaceCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteByWorkspaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetByHostPool - Get a private endpoint connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource. +// - options - PrivateEndpointConnectionsClientGetByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.GetByHostPool +// method. +func (client *PrivateEndpointConnectionsClient) GetByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetByHostPoolOptions) (PrivateEndpointConnectionsClientGetByHostPoolResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.GetByHostPool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getByHostPoolCreateRequest(ctx, resourceGroupName, hostPoolName, privateEndpointConnectionName, options) + if err != nil { + return PrivateEndpointConnectionsClientGetByHostPoolResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionsClientGetByHostPoolResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetByHostPoolResponse{}, err + } + resp, err := client.getByHostPoolHandleResponse(httpResp) + return resp, err +} + +// getByHostPoolCreateRequest creates the GetByHostPool request. +func (client *PrivateEndpointConnectionsClient) getByHostPoolCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetByHostPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getByHostPoolHandleResponse handles the GetByHostPool response. +func (client *PrivateEndpointConnectionsClient) getByHostPoolHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientGetByHostPoolResponse, error) { + result := PrivateEndpointConnectionsClientGetByHostPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionWithSystemData); err != nil { + return PrivateEndpointConnectionsClientGetByHostPoolResponse{}, err + } + return result, nil +} + +// GetByWorkspace - Get a private endpoint connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace +// - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource. +// - options - PrivateEndpointConnectionsClientGetByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.GetByWorkspace +// method. +func (client *PrivateEndpointConnectionsClient) GetByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetByWorkspaceOptions) (PrivateEndpointConnectionsClientGetByWorkspaceResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.GetByWorkspace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, options) + if err != nil { + return PrivateEndpointConnectionsClientGetByWorkspaceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionsClientGetByWorkspaceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetByWorkspaceResponse{}, err + } + resp, err := client.getByWorkspaceHandleResponse(httpResp) + return resp, err +} + +// getByWorkspaceCreateRequest creates the GetByWorkspace request. +func (client *PrivateEndpointConnectionsClient) getByWorkspaceCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetByWorkspaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getByWorkspaceHandleResponse handles the GetByWorkspace response. +func (client *PrivateEndpointConnectionsClient) getByWorkspaceHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientGetByWorkspaceResponse, error) { + result := PrivateEndpointConnectionsClientGetByWorkspaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionWithSystemData); err != nil { + return PrivateEndpointConnectionsClientGetByWorkspaceResponse{}, err + } + return result, nil +} + +// NewListByHostPoolPager - List private endpoint connections associated with hostpool. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - PrivateEndpointConnectionsClientListByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByHostPoolPager +// method. +func (client *PrivateEndpointConnectionsClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *PrivateEndpointConnectionsClientListByHostPoolOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByHostPoolResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListByHostPoolResponse]{ + More: func(page PrivateEndpointConnectionsClientListByHostPoolResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListByHostPoolResponse) (PrivateEndpointConnectionsClientListByHostPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.NewListByHostPoolPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByHostPoolCreateRequest(ctx, resourceGroupName, hostPoolName, options) + }, nil) + if err != nil { + return PrivateEndpointConnectionsClientListByHostPoolResponse{}, err + } + return client.listByHostPoolHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByHostPoolCreateRequest creates the ListByHostPool request. +func (client *PrivateEndpointConnectionsClient) listByHostPoolCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *PrivateEndpointConnectionsClientListByHostPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByHostPoolHandleResponse handles the ListByHostPool response. +func (client *PrivateEndpointConnectionsClient) listByHostPoolHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientListByHostPoolResponse, error) { + result := PrivateEndpointConnectionsClientListByHostPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResultWithSystemData); err != nil { + return PrivateEndpointConnectionsClientListByHostPoolResponse{}, err + } + return result, nil +} + +// NewListByWorkspacePager - List private endpoint connections. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace +// - options - PrivateEndpointConnectionsClientListByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByWorkspacePager +// method. +func (client *PrivateEndpointConnectionsClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *PrivateEndpointConnectionsClientListByWorkspaceOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByWorkspaceResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListByWorkspaceResponse]{ + More: func(page PrivateEndpointConnectionsClientListByWorkspaceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListByWorkspaceResponse) (PrivateEndpointConnectionsClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.NewListByWorkspacePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) + if err != nil { + return PrivateEndpointConnectionsClientListByWorkspaceResponse{}, err + } + return client.listByWorkspaceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByWorkspaceCreateRequest creates the ListByWorkspace request. +func (client *PrivateEndpointConnectionsClient) listByWorkspaceCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *PrivateEndpointConnectionsClientListByWorkspaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByWorkspaceHandleResponse handles the ListByWorkspace response. +func (client *PrivateEndpointConnectionsClient) listByWorkspaceHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientListByWorkspaceResponse, error) { + result := PrivateEndpointConnectionsClientListByWorkspaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResultWithSystemData); err != nil { + return PrivateEndpointConnectionsClientListByWorkspaceResponse{}, err + } + return result, nil +} + +// UpdateByHostPool - Approve or reject a private endpoint connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource. +// - connection - Object containing the updated connection. +// - options - PrivateEndpointConnectionsClientUpdateByHostPoolOptions contains the optional parameters for the PrivateEndpointConnectionsClient.UpdateByHostPool +// method. +func (client *PrivateEndpointConnectionsClient) UpdateByHostPool(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, connection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientUpdateByHostPoolOptions) (PrivateEndpointConnectionsClientUpdateByHostPoolResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.UpdateByHostPool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateByHostPoolCreateRequest(ctx, resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, options) + if err != nil { + return PrivateEndpointConnectionsClientUpdateByHostPoolResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionsClientUpdateByHostPoolResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientUpdateByHostPoolResponse{}, err + } + resp, err := client.updateByHostPoolHandleResponse(httpResp) + return resp, err +} + +// updateByHostPoolCreateRequest creates the UpdateByHostPool request. +func (client *PrivateEndpointConnectionsClient) updateByHostPoolCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, privateEndpointConnectionName string, connection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientUpdateByHostPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connection); err != nil { + return nil, err + } + return req, nil +} + +// updateByHostPoolHandleResponse handles the UpdateByHostPool response. +func (client *PrivateEndpointConnectionsClient) updateByHostPoolHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientUpdateByHostPoolResponse, error) { + result := PrivateEndpointConnectionsClientUpdateByHostPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionWithSystemData); err != nil { + return PrivateEndpointConnectionsClientUpdateByHostPoolResponse{}, err + } + return result, nil +} + +// UpdateByWorkspace - Approve or reject a private endpoint connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace +// - privateEndpointConnectionName - The name of the private endpoint connection associated with the Azure resource. +// - connection - Object containing the updated connection. +// - options - PrivateEndpointConnectionsClientUpdateByWorkspaceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.UpdateByWorkspace +// method. +func (client *PrivateEndpointConnectionsClient) UpdateByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, connection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientUpdateByWorkspaceOptions) (PrivateEndpointConnectionsClientUpdateByWorkspaceResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.UpdateByWorkspace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, connection, options) + if err != nil { + return PrivateEndpointConnectionsClientUpdateByWorkspaceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionsClientUpdateByWorkspaceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientUpdateByWorkspaceResponse{}, err + } + resp, err := client.updateByWorkspaceHandleResponse(httpResp) + return resp, err +} + +// updateByWorkspaceCreateRequest creates the UpdateByWorkspace request. +func (client *PrivateEndpointConnectionsClient) updateByWorkspaceCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, connection PrivateEndpointConnection, options *PrivateEndpointConnectionsClientUpdateByWorkspaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connection); err != nil { + return nil, err + } + return req, nil +} + +// updateByWorkspaceHandleResponse handles the UpdateByWorkspace response. +func (client *PrivateEndpointConnectionsClient) updateByWorkspaceHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientUpdateByWorkspaceResponse, error) { + result := PrivateEndpointConnectionsClientUpdateByWorkspaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionWithSystemData); err != nil { + return PrivateEndpointConnectionsClientUpdateByWorkspaceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/privatelinkresources_client.go new file mode 100644 index 00000000..b91d03f6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/privatelinkresources_client.go @@ -0,0 +1,193 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. +// Don't use this type directly, use NewPrivateLinkResourcesClient() instead. +type PrivateLinkResourcesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateLinkResourcesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByHostPoolPager - List the private link resources available for this hostpool. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - PrivateLinkResourcesClientListByHostPoolOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByHostPoolPager +// method. +func (client *PrivateLinkResourcesClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *PrivateLinkResourcesClientListByHostPoolOptions) *runtime.Pager[PrivateLinkResourcesClientListByHostPoolResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateLinkResourcesClientListByHostPoolResponse]{ + More: func(page PrivateLinkResourcesClientListByHostPoolResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateLinkResourcesClientListByHostPoolResponse) (PrivateLinkResourcesClientListByHostPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkResourcesClient.NewListByHostPoolPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByHostPoolCreateRequest(ctx, resourceGroupName, hostPoolName, options) + }, nil) + if err != nil { + return PrivateLinkResourcesClientListByHostPoolResponse{}, err + } + return client.listByHostPoolHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByHostPoolCreateRequest creates the ListByHostPool request. +func (client *PrivateLinkResourcesClient) listByHostPoolCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *PrivateLinkResourcesClientListByHostPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateLinkResources" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByHostPoolHandleResponse handles the ListByHostPool response. +func (client *PrivateLinkResourcesClient) listByHostPoolHandleResponse(resp *http.Response) (PrivateLinkResourcesClientListByHostPoolResponse, error) { + result := PrivateLinkResourcesClientListByHostPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourceListResult); err != nil { + return PrivateLinkResourcesClientListByHostPoolResponse{}, err + } + return result, nil +} + +// NewListByWorkspacePager - List the private link resources available for this workspace. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace +// - options - PrivateLinkResourcesClientListByWorkspaceOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByWorkspacePager +// method. +func (client *PrivateLinkResourcesClient) NewListByWorkspacePager(resourceGroupName string, workspaceName string, options *PrivateLinkResourcesClientListByWorkspaceOptions) *runtime.Pager[PrivateLinkResourcesClientListByWorkspaceResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateLinkResourcesClientListByWorkspaceResponse]{ + More: func(page PrivateLinkResourcesClientListByWorkspaceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateLinkResourcesClientListByWorkspaceResponse) (PrivateLinkResourcesClientListByWorkspaceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkResourcesClient.NewListByWorkspacePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByWorkspaceCreateRequest(ctx, resourceGroupName, workspaceName, options) + }, nil) + if err != nil { + return PrivateLinkResourcesClientListByWorkspaceResponse{}, err + } + return client.listByWorkspaceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByWorkspaceCreateRequest creates the ListByWorkspace request. +func (client *PrivateLinkResourcesClient) listByWorkspaceCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *PrivateLinkResourcesClientListByWorkspaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateLinkResources" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByWorkspaceHandleResponse handles the ListByWorkspace response. +func (client *PrivateLinkResourcesClient) listByWorkspaceHandleResponse(resp *http.Response) (PrivateLinkResourcesClientListByWorkspaceResponse, error) { + result := PrivateLinkResourcesClientListByWorkspaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourceListResult); err != nil { + return PrivateLinkResourcesClientListByWorkspaceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/responses.go new file mode 100644 index 00000000..5fa018a6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/responses.go @@ -0,0 +1,474 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +// AppAttachPackageClientCreateOrUpdateResponse contains the response from method AppAttachPackageClient.CreateOrUpdate. +type AppAttachPackageClientCreateOrUpdateResponse struct { + // Schema for App Attach Package properties. + AppAttachPackage +} + +// AppAttachPackageClientDeleteResponse contains the response from method AppAttachPackageClient.Delete. +type AppAttachPackageClientDeleteResponse struct { + // placeholder for future response values +} + +// AppAttachPackageClientGetResponse contains the response from method AppAttachPackageClient.Get. +type AppAttachPackageClientGetResponse struct { + // Schema for App Attach Package properties. + AppAttachPackage +} + +// AppAttachPackageClientListByResourceGroupResponse contains the response from method AppAttachPackageClient.NewListByResourceGroupPager. +type AppAttachPackageClientListByResourceGroupResponse struct { + // List of App Attach Package definitions. + AppAttachPackageList +} + +// AppAttachPackageClientListBySubscriptionResponse contains the response from method AppAttachPackageClient.NewListBySubscriptionPager. +type AppAttachPackageClientListBySubscriptionResponse struct { + // List of App Attach Package definitions. + AppAttachPackageList +} + +// AppAttachPackageClientUpdateResponse contains the response from method AppAttachPackageClient.Update. +type AppAttachPackageClientUpdateResponse struct { + // Schema for App Attach Package properties. + AppAttachPackage +} + +// AppAttachPackageInfoClientImportResponse contains the response from method AppAttachPackageInfoClient.NewImportPager. +type AppAttachPackageInfoClientImportResponse struct { + // List of App Attach Package definitions. + AppAttachPackageList +} + +// ApplicationGroupsClientCreateOrUpdateResponse contains the response from method ApplicationGroupsClient.CreateOrUpdate. +type ApplicationGroupsClientCreateOrUpdateResponse struct { + // Represents a ApplicationGroup definition. + ApplicationGroup +} + +// ApplicationGroupsClientDeleteResponse contains the response from method ApplicationGroupsClient.Delete. +type ApplicationGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// ApplicationGroupsClientGetResponse contains the response from method ApplicationGroupsClient.Get. +type ApplicationGroupsClientGetResponse struct { + // Represents a ApplicationGroup definition. + ApplicationGroup +} + +// ApplicationGroupsClientListByResourceGroupResponse contains the response from method ApplicationGroupsClient.NewListByResourceGroupPager. +type ApplicationGroupsClientListByResourceGroupResponse struct { + // List of ApplicationGroup definitions. + ApplicationGroupList +} + +// ApplicationGroupsClientListBySubscriptionResponse contains the response from method ApplicationGroupsClient.NewListBySubscriptionPager. +type ApplicationGroupsClientListBySubscriptionResponse struct { + // List of ApplicationGroup definitions. + ApplicationGroupList +} + +// ApplicationGroupsClientUpdateResponse contains the response from method ApplicationGroupsClient.Update. +type ApplicationGroupsClientUpdateResponse struct { + // Represents a ApplicationGroup definition. + ApplicationGroup +} + +// ApplicationsClientCreateOrUpdateResponse contains the response from method ApplicationsClient.CreateOrUpdate. +type ApplicationsClientCreateOrUpdateResponse struct { + // Schema for Application properties. + Application +} + +// ApplicationsClientDeleteResponse contains the response from method ApplicationsClient.Delete. +type ApplicationsClientDeleteResponse struct { + // placeholder for future response values +} + +// ApplicationsClientGetResponse contains the response from method ApplicationsClient.Get. +type ApplicationsClientGetResponse struct { + // Schema for Application properties. + Application +} + +// ApplicationsClientListResponse contains the response from method ApplicationsClient.NewListPager. +type ApplicationsClientListResponse struct { + // List of Application definitions. + ApplicationList +} + +// ApplicationsClientUpdateResponse contains the response from method ApplicationsClient.Update. +type ApplicationsClientUpdateResponse struct { + // Schema for Application properties. + Application +} + +// DesktopsClientGetResponse contains the response from method DesktopsClient.Get. +type DesktopsClientGetResponse struct { + // Schema for Desktop properties. + Desktop +} + +// DesktopsClientListResponse contains the response from method DesktopsClient.NewListPager. +type DesktopsClientListResponse struct { + // List of Desktop definitions. + DesktopList +} + +// DesktopsClientUpdateResponse contains the response from method DesktopsClient.Update. +type DesktopsClientUpdateResponse struct { + // Schema for Desktop properties. + Desktop +} + +// HostPoolsClientCreateOrUpdateResponse contains the response from method HostPoolsClient.CreateOrUpdate. +type HostPoolsClientCreateOrUpdateResponse struct { + // Represents a HostPool definition. + HostPool +} + +// HostPoolsClientDeleteResponse contains the response from method HostPoolsClient.Delete. +type HostPoolsClientDeleteResponse struct { + // placeholder for future response values +} + +// HostPoolsClientGetResponse contains the response from method HostPoolsClient.Get. +type HostPoolsClientGetResponse struct { + // Represents a HostPool definition. + HostPool +} + +// HostPoolsClientListByResourceGroupResponse contains the response from method HostPoolsClient.NewListByResourceGroupPager. +type HostPoolsClientListByResourceGroupResponse struct { + // List of HostPool definitions. + HostPoolList +} + +// HostPoolsClientListRegistrationTokensResponse contains the response from method HostPoolsClient.ListRegistrationTokens. +type HostPoolsClientListRegistrationTokensResponse struct { + // List of RegistrationToken definitions. + RegistrationTokenList +} + +// HostPoolsClientListResponse contains the response from method HostPoolsClient.NewListPager. +type HostPoolsClientListResponse struct { + // List of HostPool definitions. + HostPoolList +} + +// HostPoolsClientRetrieveRegistrationTokenResponse contains the response from method HostPoolsClient.RetrieveRegistrationToken. +type HostPoolsClientRetrieveRegistrationTokenResponse struct { + // Represents a RegistrationInfo definition. + RegistrationInfo +} + +// HostPoolsClientUpdateResponse contains the response from method HostPoolsClient.Update. +type HostPoolsClientUpdateResponse struct { + // Represents a HostPool definition. + HostPool +} + +// MSIXPackagesClientCreateOrUpdateResponse contains the response from method MSIXPackagesClient.CreateOrUpdate. +type MSIXPackagesClientCreateOrUpdateResponse struct { + // Schema for MSIX Package properties. + MSIXPackage +} + +// MSIXPackagesClientDeleteResponse contains the response from method MSIXPackagesClient.Delete. +type MSIXPackagesClientDeleteResponse struct { + // placeholder for future response values +} + +// MSIXPackagesClientGetResponse contains the response from method MSIXPackagesClient.Get. +type MSIXPackagesClientGetResponse struct { + // Schema for MSIX Package properties. + MSIXPackage +} + +// MSIXPackagesClientListResponse contains the response from method MSIXPackagesClient.NewListPager. +type MSIXPackagesClientListResponse struct { + // List of MSIX Package definitions. + MSIXPackageList +} + +// MSIXPackagesClientUpdateResponse contains the response from method MSIXPackagesClient.Update. +type MSIXPackagesClientUpdateResponse struct { + // Schema for MSIX Package properties. + MSIXPackage +} + +// MsixImagesClientExpandResponse contains the response from method MsixImagesClient.NewExpandPager. +type MsixImagesClientExpandResponse struct { + // List of MSIX package properties retrieved from MSIX Image expansion. + ExpandMsixImageList +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Result of the request to list operations. + ResourceProviderOperationList +} + +// PrivateEndpointConnectionsClientDeleteByHostPoolResponse contains the response from method PrivateEndpointConnectionsClient.DeleteByHostPool. +type PrivateEndpointConnectionsClientDeleteByHostPoolResponse struct { + // placeholder for future response values +} + +// PrivateEndpointConnectionsClientDeleteByWorkspaceResponse contains the response from method PrivateEndpointConnectionsClient.DeleteByWorkspace. +type PrivateEndpointConnectionsClientDeleteByWorkspaceResponse struct { + // placeholder for future response values +} + +// PrivateEndpointConnectionsClientGetByHostPoolResponse contains the response from method PrivateEndpointConnectionsClient.GetByHostPool. +type PrivateEndpointConnectionsClientGetByHostPoolResponse struct { + // The Private Endpoint Connection resource. + PrivateEndpointConnectionWithSystemData +} + +// PrivateEndpointConnectionsClientGetByWorkspaceResponse contains the response from method PrivateEndpointConnectionsClient.GetByWorkspace. +type PrivateEndpointConnectionsClientGetByWorkspaceResponse struct { + // The Private Endpoint Connection resource. + PrivateEndpointConnectionWithSystemData +} + +// PrivateEndpointConnectionsClientListByHostPoolResponse contains the response from method PrivateEndpointConnectionsClient.NewListByHostPoolPager. +type PrivateEndpointConnectionsClientListByHostPoolResponse struct { + // List of private endpoint connection associated with the specified storage account + PrivateEndpointConnectionListResultWithSystemData +} + +// PrivateEndpointConnectionsClientListByWorkspaceResponse contains the response from method PrivateEndpointConnectionsClient.NewListByWorkspacePager. +type PrivateEndpointConnectionsClientListByWorkspaceResponse struct { + // List of private endpoint connection associated with the specified storage account + PrivateEndpointConnectionListResultWithSystemData +} + +// PrivateEndpointConnectionsClientUpdateByHostPoolResponse contains the response from method PrivateEndpointConnectionsClient.UpdateByHostPool. +type PrivateEndpointConnectionsClientUpdateByHostPoolResponse struct { + // The Private Endpoint Connection resource. + PrivateEndpointConnectionWithSystemData +} + +// PrivateEndpointConnectionsClientUpdateByWorkspaceResponse contains the response from method PrivateEndpointConnectionsClient.UpdateByWorkspace. +type PrivateEndpointConnectionsClientUpdateByWorkspaceResponse struct { + // The Private Endpoint Connection resource. + PrivateEndpointConnectionWithSystemData +} + +// PrivateLinkResourcesClientListByHostPoolResponse contains the response from method PrivateLinkResourcesClient.NewListByHostPoolPager. +type PrivateLinkResourcesClientListByHostPoolResponse struct { + // A list of private link resources + PrivateLinkResourceListResult +} + +// PrivateLinkResourcesClientListByWorkspaceResponse contains the response from method PrivateLinkResourcesClient.NewListByWorkspacePager. +type PrivateLinkResourcesClientListByWorkspaceResponse struct { + // A list of private link resources + PrivateLinkResourceListResult +} + +// ScalingPlanPersonalSchedulesClientCreateResponse contains the response from method ScalingPlanPersonalSchedulesClient.Create. +type ScalingPlanPersonalSchedulesClientCreateResponse struct { + // Represents a ScalingPlanPersonalSchedule definition. + ScalingPlanPersonalSchedule +} + +// ScalingPlanPersonalSchedulesClientDeleteResponse contains the response from method ScalingPlanPersonalSchedulesClient.Delete. +type ScalingPlanPersonalSchedulesClientDeleteResponse struct { + // placeholder for future response values +} + +// ScalingPlanPersonalSchedulesClientGetResponse contains the response from method ScalingPlanPersonalSchedulesClient.Get. +type ScalingPlanPersonalSchedulesClientGetResponse struct { + // Represents a ScalingPlanPersonalSchedule definition. + ScalingPlanPersonalSchedule +} + +// ScalingPlanPersonalSchedulesClientListResponse contains the response from method ScalingPlanPersonalSchedulesClient.NewListPager. +type ScalingPlanPersonalSchedulesClientListResponse struct { + // List of ScalingPlanPersonalSchedule definitions. + ScalingPlanPersonalScheduleList +} + +// ScalingPlanPersonalSchedulesClientUpdateResponse contains the response from method ScalingPlanPersonalSchedulesClient.Update. +type ScalingPlanPersonalSchedulesClientUpdateResponse struct { + // Represents a ScalingPlanPersonalSchedule definition. + ScalingPlanPersonalSchedule +} + +// ScalingPlanPooledSchedulesClientCreateResponse contains the response from method ScalingPlanPooledSchedulesClient.Create. +type ScalingPlanPooledSchedulesClientCreateResponse struct { + // Represents a ScalingPlanPooledSchedule definition. + ScalingPlanPooledSchedule +} + +// ScalingPlanPooledSchedulesClientDeleteResponse contains the response from method ScalingPlanPooledSchedulesClient.Delete. +type ScalingPlanPooledSchedulesClientDeleteResponse struct { + // placeholder for future response values +} + +// ScalingPlanPooledSchedulesClientGetResponse contains the response from method ScalingPlanPooledSchedulesClient.Get. +type ScalingPlanPooledSchedulesClientGetResponse struct { + // Represents a ScalingPlanPooledSchedule definition. + ScalingPlanPooledSchedule +} + +// ScalingPlanPooledSchedulesClientListResponse contains the response from method ScalingPlanPooledSchedulesClient.NewListPager. +type ScalingPlanPooledSchedulesClientListResponse struct { + // List of ScalingPlanPooledSchedule definitions. + ScalingPlanPooledScheduleList +} + +// ScalingPlanPooledSchedulesClientUpdateResponse contains the response from method ScalingPlanPooledSchedulesClient.Update. +type ScalingPlanPooledSchedulesClientUpdateResponse struct { + // Represents a ScalingPlanPooledSchedule definition. + ScalingPlanPooledSchedule +} + +// ScalingPlansClientCreateResponse contains the response from method ScalingPlansClient.Create. +type ScalingPlansClientCreateResponse struct { + // Represents a scaling plan definition. + ScalingPlan +} + +// ScalingPlansClientDeleteResponse contains the response from method ScalingPlansClient.Delete. +type ScalingPlansClientDeleteResponse struct { + // placeholder for future response values +} + +// ScalingPlansClientGetResponse contains the response from method ScalingPlansClient.Get. +type ScalingPlansClientGetResponse struct { + // Represents a scaling plan definition. + ScalingPlan +} + +// ScalingPlansClientListByHostPoolResponse contains the response from method ScalingPlansClient.NewListByHostPoolPager. +type ScalingPlansClientListByHostPoolResponse struct { + // List of scaling plan definitions. + ScalingPlanList +} + +// ScalingPlansClientListByResourceGroupResponse contains the response from method ScalingPlansClient.NewListByResourceGroupPager. +type ScalingPlansClientListByResourceGroupResponse struct { + // List of scaling plan definitions. + ScalingPlanList +} + +// ScalingPlansClientListBySubscriptionResponse contains the response from method ScalingPlansClient.NewListBySubscriptionPager. +type ScalingPlansClientListBySubscriptionResponse struct { + // List of scaling plan definitions. + ScalingPlanList +} + +// ScalingPlansClientUpdateResponse contains the response from method ScalingPlansClient.Update. +type ScalingPlansClientUpdateResponse struct { + // Represents a scaling plan definition. + ScalingPlan +} + +// SessionHostsClientDeleteResponse contains the response from method SessionHostsClient.Delete. +type SessionHostsClientDeleteResponse struct { + // placeholder for future response values +} + +// SessionHostsClientGetResponse contains the response from method SessionHostsClient.Get. +type SessionHostsClientGetResponse struct { + // Represents a SessionHost definition. + SessionHost +} + +// SessionHostsClientListResponse contains the response from method SessionHostsClient.NewListPager. +type SessionHostsClientListResponse struct { + // List of SessionHost definitions. + SessionHostList +} + +// SessionHostsClientUpdateResponse contains the response from method SessionHostsClient.Update. +type SessionHostsClientUpdateResponse struct { + // Represents a SessionHost definition. + SessionHost +} + +// StartMenuItemsClientListResponse contains the response from method StartMenuItemsClient.NewListPager. +type StartMenuItemsClientListResponse struct { + // List of StartMenuItem definitions. + StartMenuItemList +} + +// UserSessionsClientDeleteResponse contains the response from method UserSessionsClient.Delete. +type UserSessionsClientDeleteResponse struct { + // placeholder for future response values +} + +// UserSessionsClientDisconnectResponse contains the response from method UserSessionsClient.Disconnect. +type UserSessionsClientDisconnectResponse struct { + // placeholder for future response values +} + +// UserSessionsClientGetResponse contains the response from method UserSessionsClient.Get. +type UserSessionsClientGetResponse struct { + // Represents a UserSession definition. + UserSession +} + +// UserSessionsClientListByHostPoolResponse contains the response from method UserSessionsClient.NewListByHostPoolPager. +type UserSessionsClientListByHostPoolResponse struct { + // List of UserSession definitions. + UserSessionList +} + +// UserSessionsClientListResponse contains the response from method UserSessionsClient.NewListPager. +type UserSessionsClientListResponse struct { + // List of UserSession definitions. + UserSessionList +} + +// UserSessionsClientSendMessageResponse contains the response from method UserSessionsClient.SendMessage. +type UserSessionsClientSendMessageResponse struct { + // placeholder for future response values +} + +// WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.CreateOrUpdate. +type WorkspacesClientCreateOrUpdateResponse struct { + // Represents a Workspace definition. + Workspace +} + +// WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.Delete. +type WorkspacesClientDeleteResponse struct { + // placeholder for future response values +} + +// WorkspacesClientGetResponse contains the response from method WorkspacesClient.Get. +type WorkspacesClientGetResponse struct { + // Represents a Workspace definition. + Workspace +} + +// WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.NewListByResourceGroupPager. +type WorkspacesClientListByResourceGroupResponse struct { + // List of Workspace definitions. + WorkspaceList +} + +// WorkspacesClientListBySubscriptionResponse contains the response from method WorkspacesClient.NewListBySubscriptionPager. +type WorkspacesClientListBySubscriptionResponse struct { + // List of Workspace definitions. + WorkspaceList +} + +// WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.Update. +type WorkspacesClientUpdateResponse struct { + // Represents a Workspace definition. + Workspace +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/scalingplanpersonalschedules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/scalingplanpersonalschedules_client.go new file mode 100644 index 00000000..e9dc0c10 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/scalingplanpersonalschedules_client.go @@ -0,0 +1,399 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ScalingPlanPersonalSchedulesClient contains the methods for the ScalingPlanPersonalSchedules group. +// Don't use this type directly, use NewScalingPlanPersonalSchedulesClient() instead. +type ScalingPlanPersonalSchedulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewScalingPlanPersonalSchedulesClient creates a new instance of ScalingPlanPersonalSchedulesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewScalingPlanPersonalSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScalingPlanPersonalSchedulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ScalingPlanPersonalSchedulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Create - Create or update a ScalingPlanPersonalSchedule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - scalingPlanScheduleName - The name of the ScalingPlanSchedule +// - scalingPlanSchedule - Object containing ScalingPlanPersonalSchedule definitions. +// - options - ScalingPlanPersonalSchedulesClientCreateOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Create +// method. +func (client *ScalingPlanPersonalSchedulesClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, scalingPlanSchedule ScalingPlanPersonalSchedule, options *ScalingPlanPersonalSchedulesClientCreateOptions) (ScalingPlanPersonalSchedulesClientCreateResponse, error) { + var err error + const operationName = "ScalingPlanPersonalSchedulesClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, options) + if err != nil { + return ScalingPlanPersonalSchedulesClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlanPersonalSchedulesClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ScalingPlanPersonalSchedulesClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *ScalingPlanPersonalSchedulesClient) createCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, scalingPlanSchedule ScalingPlanPersonalSchedule, options *ScalingPlanPersonalSchedulesClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + if scalingPlanScheduleName == "" { + return nil, errors.New("parameter scalingPlanScheduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanScheduleName}", url.PathEscape(scalingPlanScheduleName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, scalingPlanSchedule); err != nil { + return nil, err + } + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *ScalingPlanPersonalSchedulesClient) createHandleResponse(resp *http.Response) (ScalingPlanPersonalSchedulesClientCreateResponse, error) { + result := ScalingPlanPersonalSchedulesClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanPersonalSchedule); err != nil { + return ScalingPlanPersonalSchedulesClientCreateResponse{}, err + } + return result, nil +} + +// Delete - Remove a ScalingPlanPersonalSchedule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - scalingPlanScheduleName - The name of the ScalingPlanSchedule +// - options - ScalingPlanPersonalSchedulesClientDeleteOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Delete +// method. +func (client *ScalingPlanPersonalSchedulesClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPersonalSchedulesClientDeleteOptions) (ScalingPlanPersonalSchedulesClientDeleteResponse, error) { + var err error + const operationName = "ScalingPlanPersonalSchedulesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, scalingPlanName, scalingPlanScheduleName, options) + if err != nil { + return ScalingPlanPersonalSchedulesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlanPersonalSchedulesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ScalingPlanPersonalSchedulesClientDeleteResponse{}, err + } + return ScalingPlanPersonalSchedulesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ScalingPlanPersonalSchedulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPersonalSchedulesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + if scalingPlanScheduleName == "" { + return nil, errors.New("parameter scalingPlanScheduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanScheduleName}", url.PathEscape(scalingPlanScheduleName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a ScalingPlanPersonalSchedule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - scalingPlanScheduleName - The name of the ScalingPlanSchedule +// - options - ScalingPlanPersonalSchedulesClientGetOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Get +// method. +func (client *ScalingPlanPersonalSchedulesClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPersonalSchedulesClientGetOptions) (ScalingPlanPersonalSchedulesClientGetResponse, error) { + var err error + const operationName = "ScalingPlanPersonalSchedulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, scalingPlanName, scalingPlanScheduleName, options) + if err != nil { + return ScalingPlanPersonalSchedulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlanPersonalSchedulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScalingPlanPersonalSchedulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ScalingPlanPersonalSchedulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPersonalSchedulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + if scalingPlanScheduleName == "" { + return nil, errors.New("parameter scalingPlanScheduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanScheduleName}", url.PathEscape(scalingPlanScheduleName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ScalingPlanPersonalSchedulesClient) getHandleResponse(resp *http.Response) (ScalingPlanPersonalSchedulesClientGetResponse, error) { + result := ScalingPlanPersonalSchedulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanPersonalSchedule); err != nil { + return ScalingPlanPersonalSchedulesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List ScalingPlanPersonalSchedules. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - options - ScalingPlanPersonalSchedulesClientListOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.NewListPager +// method. +func (client *ScalingPlanPersonalSchedulesClient) NewListPager(resourceGroupName string, scalingPlanName string, options *ScalingPlanPersonalSchedulesClientListOptions) *runtime.Pager[ScalingPlanPersonalSchedulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ScalingPlanPersonalSchedulesClientListResponse]{ + More: func(page ScalingPlanPersonalSchedulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ScalingPlanPersonalSchedulesClientListResponse) (ScalingPlanPersonalSchedulesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScalingPlanPersonalSchedulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, scalingPlanName, options) + }, nil) + if err != nil { + return ScalingPlanPersonalSchedulesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ScalingPlanPersonalSchedulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlanPersonalSchedulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ScalingPlanPersonalSchedulesClient) listHandleResponse(resp *http.Response) (ScalingPlanPersonalSchedulesClientListResponse, error) { + result := ScalingPlanPersonalSchedulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanPersonalScheduleList); err != nil { + return ScalingPlanPersonalSchedulesClientListResponse{}, err + } + return result, nil +} + +// Update - Update a ScalingPlanPersonalSchedule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - scalingPlanScheduleName - The name of the ScalingPlanSchedule +// - options - ScalingPlanPersonalSchedulesClientUpdateOptions contains the optional parameters for the ScalingPlanPersonalSchedulesClient.Update +// method. +func (client *ScalingPlanPersonalSchedulesClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPersonalSchedulesClientUpdateOptions) (ScalingPlanPersonalSchedulesClientUpdateResponse, error) { + var err error + const operationName = "ScalingPlanPersonalSchedulesClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, scalingPlanName, scalingPlanScheduleName, options) + if err != nil { + return ScalingPlanPersonalSchedulesClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlanPersonalSchedulesClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScalingPlanPersonalSchedulesClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *ScalingPlanPersonalSchedulesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPersonalSchedulesClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + if scalingPlanScheduleName == "" { + return nil, errors.New("parameter scalingPlanScheduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanScheduleName}", url.PathEscape(scalingPlanScheduleName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.ScalingPlanSchedule != nil { + if err := runtime.MarshalAsJSON(req, *options.ScalingPlanSchedule); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *ScalingPlanPersonalSchedulesClient) updateHandleResponse(resp *http.Response) (ScalingPlanPersonalSchedulesClientUpdateResponse, error) { + result := ScalingPlanPersonalSchedulesClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanPersonalSchedule); err != nil { + return ScalingPlanPersonalSchedulesClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/scalingplanpooledschedules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/scalingplanpooledschedules_client.go new file mode 100644 index 00000000..e1cec540 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/scalingplanpooledschedules_client.go @@ -0,0 +1,399 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ScalingPlanPooledSchedulesClient contains the methods for the ScalingPlanPooledSchedules group. +// Don't use this type directly, use NewScalingPlanPooledSchedulesClient() instead. +type ScalingPlanPooledSchedulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewScalingPlanPooledSchedulesClient creates a new instance of ScalingPlanPooledSchedulesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewScalingPlanPooledSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScalingPlanPooledSchedulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ScalingPlanPooledSchedulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Create - Create or update a ScalingPlanPooledSchedule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - scalingPlanScheduleName - The name of the ScalingPlanSchedule +// - scalingPlanSchedule - Object containing ScalingPlanPooledSchedule definitions. +// - options - ScalingPlanPooledSchedulesClientCreateOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Create +// method. +func (client *ScalingPlanPooledSchedulesClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, scalingPlanSchedule ScalingPlanPooledSchedule, options *ScalingPlanPooledSchedulesClientCreateOptions) (ScalingPlanPooledSchedulesClientCreateResponse, error) { + var err error + const operationName = "ScalingPlanPooledSchedulesClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, options) + if err != nil { + return ScalingPlanPooledSchedulesClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlanPooledSchedulesClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ScalingPlanPooledSchedulesClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *ScalingPlanPooledSchedulesClient) createCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, scalingPlanSchedule ScalingPlanPooledSchedule, options *ScalingPlanPooledSchedulesClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/pooledSchedules/{scalingPlanScheduleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + if scalingPlanScheduleName == "" { + return nil, errors.New("parameter scalingPlanScheduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanScheduleName}", url.PathEscape(scalingPlanScheduleName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, scalingPlanSchedule); err != nil { + return nil, err + } + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *ScalingPlanPooledSchedulesClient) createHandleResponse(resp *http.Response) (ScalingPlanPooledSchedulesClientCreateResponse, error) { + result := ScalingPlanPooledSchedulesClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanPooledSchedule); err != nil { + return ScalingPlanPooledSchedulesClientCreateResponse{}, err + } + return result, nil +} + +// Delete - Remove a ScalingPlanPooledSchedule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - scalingPlanScheduleName - The name of the ScalingPlanSchedule +// - options - ScalingPlanPooledSchedulesClientDeleteOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Delete +// method. +func (client *ScalingPlanPooledSchedulesClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPooledSchedulesClientDeleteOptions) (ScalingPlanPooledSchedulesClientDeleteResponse, error) { + var err error + const operationName = "ScalingPlanPooledSchedulesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, scalingPlanName, scalingPlanScheduleName, options) + if err != nil { + return ScalingPlanPooledSchedulesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlanPooledSchedulesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ScalingPlanPooledSchedulesClientDeleteResponse{}, err + } + return ScalingPlanPooledSchedulesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ScalingPlanPooledSchedulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPooledSchedulesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/pooledSchedules/{scalingPlanScheduleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + if scalingPlanScheduleName == "" { + return nil, errors.New("parameter scalingPlanScheduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanScheduleName}", url.PathEscape(scalingPlanScheduleName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a ScalingPlanPooledSchedule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - scalingPlanScheduleName - The name of the ScalingPlanSchedule +// - options - ScalingPlanPooledSchedulesClientGetOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Get +// method. +func (client *ScalingPlanPooledSchedulesClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPooledSchedulesClientGetOptions) (ScalingPlanPooledSchedulesClientGetResponse, error) { + var err error + const operationName = "ScalingPlanPooledSchedulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, scalingPlanName, scalingPlanScheduleName, options) + if err != nil { + return ScalingPlanPooledSchedulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlanPooledSchedulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScalingPlanPooledSchedulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ScalingPlanPooledSchedulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPooledSchedulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/pooledSchedules/{scalingPlanScheduleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + if scalingPlanScheduleName == "" { + return nil, errors.New("parameter scalingPlanScheduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanScheduleName}", url.PathEscape(scalingPlanScheduleName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ScalingPlanPooledSchedulesClient) getHandleResponse(resp *http.Response) (ScalingPlanPooledSchedulesClientGetResponse, error) { + result := ScalingPlanPooledSchedulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanPooledSchedule); err != nil { + return ScalingPlanPooledSchedulesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List ScalingPlanPooledSchedules. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - options - ScalingPlanPooledSchedulesClientListOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.NewListPager +// method. +func (client *ScalingPlanPooledSchedulesClient) NewListPager(resourceGroupName string, scalingPlanName string, options *ScalingPlanPooledSchedulesClientListOptions) *runtime.Pager[ScalingPlanPooledSchedulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ScalingPlanPooledSchedulesClientListResponse]{ + More: func(page ScalingPlanPooledSchedulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ScalingPlanPooledSchedulesClientListResponse) (ScalingPlanPooledSchedulesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScalingPlanPooledSchedulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, scalingPlanName, options) + }, nil) + if err != nil { + return ScalingPlanPooledSchedulesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ScalingPlanPooledSchedulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlanPooledSchedulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/pooledSchedules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ScalingPlanPooledSchedulesClient) listHandleResponse(resp *http.Response) (ScalingPlanPooledSchedulesClientListResponse, error) { + result := ScalingPlanPooledSchedulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanPooledScheduleList); err != nil { + return ScalingPlanPooledSchedulesClientListResponse{}, err + } + return result, nil +} + +// Update - Update a ScalingPlanPooledSchedule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - scalingPlanScheduleName - The name of the ScalingPlanSchedule +// - options - ScalingPlanPooledSchedulesClientUpdateOptions contains the optional parameters for the ScalingPlanPooledSchedulesClient.Update +// method. +func (client *ScalingPlanPooledSchedulesClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPooledSchedulesClientUpdateOptions) (ScalingPlanPooledSchedulesClientUpdateResponse, error) { + var err error + const operationName = "ScalingPlanPooledSchedulesClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, scalingPlanName, scalingPlanScheduleName, options) + if err != nil { + return ScalingPlanPooledSchedulesClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlanPooledSchedulesClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScalingPlanPooledSchedulesClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *ScalingPlanPooledSchedulesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlanScheduleName string, options *ScalingPlanPooledSchedulesClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/pooledSchedules/{scalingPlanScheduleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + if scalingPlanScheduleName == "" { + return nil, errors.New("parameter scalingPlanScheduleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanScheduleName}", url.PathEscape(scalingPlanScheduleName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.ScalingPlanSchedule != nil { + if err := runtime.MarshalAsJSON(req, *options.ScalingPlanSchedule); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *ScalingPlanPooledSchedulesClient) updateHandleResponse(resp *http.Response) (ScalingPlanPooledSchedulesClientUpdateResponse, error) { + result := ScalingPlanPooledSchedulesClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanPooledSchedule); err != nil { + return ScalingPlanPooledSchedulesClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/scalingplans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/scalingplans_client.go new file mode 100644 index 00000000..4d09094b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/scalingplans_client.go @@ -0,0 +1,508 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ScalingPlansClient contains the methods for the ScalingPlans group. +// Don't use this type directly, use NewScalingPlansClient() instead. +type ScalingPlansClient struct { + internal *arm.Client + subscriptionID string +} + +// NewScalingPlansClient creates a new instance of ScalingPlansClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewScalingPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScalingPlansClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ScalingPlansClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Create - Create or update a scaling plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - scalingPlan - Object containing scaling plan definitions. +// - options - ScalingPlansClientCreateOptions contains the optional parameters for the ScalingPlansClient.Create method. +func (client *ScalingPlansClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlan ScalingPlan, options *ScalingPlansClientCreateOptions) (ScalingPlansClientCreateResponse, error) { + var err error + const operationName = "ScalingPlansClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, scalingPlanName, scalingPlan, options) + if err != nil { + return ScalingPlansClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlansClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ScalingPlansClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *ScalingPlansClient) createCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlan ScalingPlan, options *ScalingPlansClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, scalingPlan); err != nil { + return nil, err + } + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *ScalingPlansClient) createHandleResponse(resp *http.Response) (ScalingPlansClientCreateResponse, error) { + result := ScalingPlansClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlan); err != nil { + return ScalingPlansClientCreateResponse{}, err + } + return result, nil +} + +// Delete - Remove a scaling plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - options - ScalingPlansClientDeleteOptions contains the optional parameters for the ScalingPlansClient.Delete method. +func (client *ScalingPlansClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientDeleteOptions) (ScalingPlansClientDeleteResponse, error) { + var err error + const operationName = "ScalingPlansClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, scalingPlanName, options) + if err != nil { + return ScalingPlansClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlansClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ScalingPlansClientDeleteResponse{}, err + } + return ScalingPlansClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ScalingPlansClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a scaling plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - options - ScalingPlansClientGetOptions contains the optional parameters for the ScalingPlansClient.Get method. +func (client *ScalingPlansClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientGetOptions) (ScalingPlansClientGetResponse, error) { + var err error + const operationName = "ScalingPlansClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, scalingPlanName, options) + if err != nil { + return ScalingPlansClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlansClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScalingPlansClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ScalingPlansClient) getCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ScalingPlansClient) getHandleResponse(resp *http.Response) (ScalingPlansClientGetResponse, error) { + result := ScalingPlansClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlan); err != nil { + return ScalingPlansClientGetResponse{}, err + } + return result, nil +} + +// NewListByHostPoolPager - List scaling plan associated with hostpool. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - ScalingPlansClientListByHostPoolOptions contains the optional parameters for the ScalingPlansClient.NewListByHostPoolPager +// method. +func (client *ScalingPlansClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *ScalingPlansClientListByHostPoolOptions) *runtime.Pager[ScalingPlansClientListByHostPoolResponse] { + return runtime.NewPager(runtime.PagingHandler[ScalingPlansClientListByHostPoolResponse]{ + More: func(page ScalingPlansClientListByHostPoolResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ScalingPlansClientListByHostPoolResponse) (ScalingPlansClientListByHostPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScalingPlansClient.NewListByHostPoolPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByHostPoolCreateRequest(ctx, resourceGroupName, hostPoolName, options) + }, nil) + if err != nil { + return ScalingPlansClientListByHostPoolResponse{}, err + } + return client.listByHostPoolHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByHostPoolCreateRequest creates the ListByHostPool request. +func (client *ScalingPlansClient) listByHostPoolCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *ScalingPlansClientListByHostPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/scalingPlans" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByHostPoolHandleResponse handles the ListByHostPool response. +func (client *ScalingPlansClient) listByHostPoolHandleResponse(resp *http.Response) (ScalingPlansClientListByHostPoolResponse, error) { + result := ScalingPlansClientListByHostPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanList); err != nil { + return ScalingPlansClientListByHostPoolResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - List scaling plans. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ScalingPlansClientListByResourceGroupOptions contains the optional parameters for the ScalingPlansClient.NewListByResourceGroupPager +// method. +func (client *ScalingPlansClient) NewListByResourceGroupPager(resourceGroupName string, options *ScalingPlansClientListByResourceGroupOptions) *runtime.Pager[ScalingPlansClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ScalingPlansClientListByResourceGroupResponse]{ + More: func(page ScalingPlansClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ScalingPlansClientListByResourceGroupResponse) (ScalingPlansClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScalingPlansClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ScalingPlansClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ScalingPlansClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ScalingPlansClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ScalingPlansClient) listByResourceGroupHandleResponse(resp *http.Response) (ScalingPlansClientListByResourceGroupResponse, error) { + result := ScalingPlansClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanList); err != nil { + return ScalingPlansClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - List scaling plans in subscription. +// +// Generated from API version 2024-04-03 +// - options - ScalingPlansClientListBySubscriptionOptions contains the optional parameters for the ScalingPlansClient.NewListBySubscriptionPager +// method. +func (client *ScalingPlansClient) NewListBySubscriptionPager(options *ScalingPlansClientListBySubscriptionOptions) *runtime.Pager[ScalingPlansClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[ScalingPlansClientListBySubscriptionResponse]{ + More: func(page ScalingPlansClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ScalingPlansClientListBySubscriptionResponse) (ScalingPlansClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScalingPlansClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return ScalingPlansClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *ScalingPlansClient) listBySubscriptionCreateRequest(ctx context.Context, options *ScalingPlansClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/scalingPlans" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *ScalingPlansClient) listBySubscriptionHandleResponse(resp *http.Response) (ScalingPlansClientListBySubscriptionResponse, error) { + result := ScalingPlansClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanList); err != nil { + return ScalingPlansClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// Update - Update a scaling plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scalingPlanName - The name of the scaling plan. +// - options - ScalingPlansClientUpdateOptions contains the optional parameters for the ScalingPlansClient.Update method. +func (client *ScalingPlansClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientUpdateOptions) (ScalingPlansClientUpdateResponse, error) { + var err error + const operationName = "ScalingPlansClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, scalingPlanName, options) + if err != nil { + return ScalingPlansClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScalingPlansClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScalingPlansClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *ScalingPlansClient) updateCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scalingPlanName == "" { + return nil, errors.New("parameter scalingPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.ScalingPlan != nil { + if err := runtime.MarshalAsJSON(req, *options.ScalingPlan); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *ScalingPlansClient) updateHandleResponse(resp *http.Response) (ScalingPlansClientUpdateResponse, error) { + result := ScalingPlansClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlan); err != nil { + return ScalingPlansClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/sessionhosts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/sessionhosts_client.go new file mode 100644 index 00000000..5d8dc813 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/sessionhosts_client.go @@ -0,0 +1,327 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// SessionHostsClient contains the methods for the SessionHosts group. +// Don't use this type directly, use NewSessionHostsClient() instead. +type SessionHostsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSessionHostsClient creates a new instance of SessionHostsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSessionHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SessionHostsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SessionHostsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Delete - Remove a SessionHost. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - sessionHostName - The name of the session host within the specified host pool +// - options - SessionHostsClientDeleteOptions contains the optional parameters for the SessionHostsClient.Delete method. +func (client *SessionHostsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientDeleteOptions) (SessionHostsClientDeleteResponse, error) { + var err error + const operationName = "SessionHostsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, options) + if err != nil { + return SessionHostsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SessionHostsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SessionHostsClientDeleteResponse{}, err + } + return SessionHostsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SessionHostsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if sessionHostName == "" { + return nil, errors.New("parameter sessionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a session host. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - sessionHostName - The name of the session host within the specified host pool +// - options - SessionHostsClientGetOptions contains the optional parameters for the SessionHostsClient.Get method. +func (client *SessionHostsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientGetOptions) (SessionHostsClientGetResponse, error) { + var err error + const operationName = "SessionHostsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, options) + if err != nil { + return SessionHostsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SessionHostsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SessionHostsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SessionHostsClient) getCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if sessionHostName == "" { + return nil, errors.New("parameter sessionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SessionHostsClient) getHandleResponse(resp *http.Response) (SessionHostsClientGetResponse, error) { + result := SessionHostsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SessionHost); err != nil { + return SessionHostsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List sessionHosts. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - SessionHostsClientListOptions contains the optional parameters for the SessionHostsClient.NewListPager method. +func (client *SessionHostsClient) NewListPager(resourceGroupName string, hostPoolName string, options *SessionHostsClientListOptions) *runtime.Pager[SessionHostsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SessionHostsClientListResponse]{ + More: func(page SessionHostsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SessionHostsClientListResponse) (SessionHostsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SessionHostsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, hostPoolName, options) + }, nil) + if err != nil { + return SessionHostsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SessionHostsClient) listCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *SessionHostsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SessionHostsClient) listHandleResponse(resp *http.Response) (SessionHostsClientListResponse, error) { + result := SessionHostsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SessionHostList); err != nil { + return SessionHostsClientListResponse{}, err + } + return result, nil +} + +// Update - Update a session host. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - sessionHostName - The name of the session host within the specified host pool +// - options - SessionHostsClientUpdateOptions contains the optional parameters for the SessionHostsClient.Update method. +func (client *SessionHostsClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientUpdateOptions) (SessionHostsClientUpdateResponse, error) { + var err error + const operationName = "SessionHostsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, options) + if err != nil { + return SessionHostsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SessionHostsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SessionHostsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *SessionHostsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if sessionHostName == "" { + return nil, errors.New("parameter sessionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.SessionHost != nil { + if err := runtime.MarshalAsJSON(req, *options.SessionHost); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *SessionHostsClient) updateHandleResponse(resp *http.Response) (SessionHostsClientUpdateResponse, error) { + result := SessionHostsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SessionHost); err != nil { + return SessionHostsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/startmenuitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/startmenuitems_client.go new file mode 100644 index 00000000..25dafcf2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/startmenuitems_client.go @@ -0,0 +1,118 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// StartMenuItemsClient contains the methods for the StartMenuItems group. +// Don't use this type directly, use NewStartMenuItemsClient() instead. +type StartMenuItemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewStartMenuItemsClient creates a new instance of StartMenuItemsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewStartMenuItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StartMenuItemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &StartMenuItemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - List start menu items in the given application group. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - applicationGroupName - The name of the application group +// - options - StartMenuItemsClientListOptions contains the optional parameters for the StartMenuItemsClient.NewListPager method. +func (client *StartMenuItemsClient) NewListPager(resourceGroupName string, applicationGroupName string, options *StartMenuItemsClientListOptions) *runtime.Pager[StartMenuItemsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[StartMenuItemsClientListResponse]{ + More: func(page StartMenuItemsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StartMenuItemsClientListResponse) (StartMenuItemsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StartMenuItemsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, applicationGroupName, options) + }, nil) + if err != nil { + return StartMenuItemsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *StartMenuItemsClient) listCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *StartMenuItemsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/startMenuItems" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGroupName == "" { + return nil, errors.New("parameter applicationGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *StartMenuItemsClient) listHandleResponse(resp *http.Response) (StartMenuItemsClientListResponse, error) { + result := StartMenuItemsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StartMenuItemList); err != nil { + return StartMenuItemsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/time_rfc3339.go new file mode 100644 index 00000000..20977df2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/time_rfc3339.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/usersessions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/usersessions_client.go new file mode 100644 index 00000000..ea0966cf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/usersessions_client.go @@ -0,0 +1,476 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// UserSessionsClient contains the methods for the UserSessions group. +// Don't use this type directly, use NewUserSessionsClient() instead. +type UserSessionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewUserSessionsClient creates a new instance of UserSessionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewUserSessionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserSessionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &UserSessionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Delete - Remove a userSession. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - sessionHostName - The name of the session host within the specified host pool +// - userSessionID - The name of the user session within the specified session host +// - options - UserSessionsClientDeleteOptions contains the optional parameters for the UserSessionsClient.Delete method. +func (client *UserSessionsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDeleteOptions) (UserSessionsClientDeleteResponse, error) { + var err error + const operationName = "UserSessionsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, userSessionID, options) + if err != nil { + return UserSessionsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UserSessionsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return UserSessionsClientDeleteResponse{}, err + } + return UserSessionsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *UserSessionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if sessionHostName == "" { + return nil, errors.New("parameter sessionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) + if userSessionID == "" { + return nil, errors.New("parameter userSessionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userSessionId}", url.PathEscape(userSessionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Disconnect - Disconnect a userSession. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - sessionHostName - The name of the session host within the specified host pool +// - userSessionID - The name of the user session within the specified session host +// - options - UserSessionsClientDisconnectOptions contains the optional parameters for the UserSessionsClient.Disconnect method. +func (client *UserSessionsClient) Disconnect(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDisconnectOptions) (UserSessionsClientDisconnectResponse, error) { + var err error + const operationName = "UserSessionsClient.Disconnect" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disconnectCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, userSessionID, options) + if err != nil { + return UserSessionsClientDisconnectResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UserSessionsClientDisconnectResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UserSessionsClientDisconnectResponse{}, err + } + return UserSessionsClientDisconnectResponse{}, nil +} + +// disconnectCreateRequest creates the Disconnect request. +func (client *UserSessionsClient) disconnectCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDisconnectOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/disconnect" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if sessionHostName == "" { + return nil, errors.New("parameter sessionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) + if userSessionID == "" { + return nil, errors.New("parameter userSessionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userSessionId}", url.PathEscape(userSessionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a userSession. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - sessionHostName - The name of the session host within the specified host pool +// - userSessionID - The name of the user session within the specified session host +// - options - UserSessionsClientGetOptions contains the optional parameters for the UserSessionsClient.Get method. +func (client *UserSessionsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientGetOptions) (UserSessionsClientGetResponse, error) { + var err error + const operationName = "UserSessionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, userSessionID, options) + if err != nil { + return UserSessionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UserSessionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UserSessionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *UserSessionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if sessionHostName == "" { + return nil, errors.New("parameter sessionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) + if userSessionID == "" { + return nil, errors.New("parameter userSessionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userSessionId}", url.PathEscape(userSessionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *UserSessionsClient) getHandleResponse(resp *http.Response) (UserSessionsClientGetResponse, error) { + result := UserSessionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UserSession); err != nil { + return UserSessionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List userSessions. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - sessionHostName - The name of the session host within the specified host pool +// - options - UserSessionsClientListOptions contains the optional parameters for the UserSessionsClient.NewListPager method. +func (client *UserSessionsClient) NewListPager(resourceGroupName string, hostPoolName string, sessionHostName string, options *UserSessionsClientListOptions) *runtime.Pager[UserSessionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[UserSessionsClientListResponse]{ + More: func(page UserSessionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *UserSessionsClientListResponse) (UserSessionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UserSessionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, options) + }, nil) + if err != nil { + return UserSessionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *UserSessionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *UserSessionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if sessionHostName == "" { + return nil, errors.New("parameter sessionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *UserSessionsClient) listHandleResponse(resp *http.Response) (UserSessionsClientListResponse, error) { + result := UserSessionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UserSessionList); err != nil { + return UserSessionsClientListResponse{}, err + } + return result, nil +} + +// NewListByHostPoolPager - List userSessions. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - options - UserSessionsClientListByHostPoolOptions contains the optional parameters for the UserSessionsClient.NewListByHostPoolPager +// method. +func (client *UserSessionsClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *UserSessionsClientListByHostPoolOptions) *runtime.Pager[UserSessionsClientListByHostPoolResponse] { + return runtime.NewPager(runtime.PagingHandler[UserSessionsClientListByHostPoolResponse]{ + More: func(page UserSessionsClientListByHostPoolResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *UserSessionsClientListByHostPoolResponse) (UserSessionsClientListByHostPoolResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UserSessionsClient.NewListByHostPoolPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByHostPoolCreateRequest(ctx, resourceGroupName, hostPoolName, options) + }, nil) + if err != nil { + return UserSessionsClientListByHostPoolResponse{}, err + } + return client.listByHostPoolHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByHostPoolCreateRequest creates the ListByHostPool request. +func (client *UserSessionsClient) listByHostPoolCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *UserSessionsClientListByHostPoolOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/userSessions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByHostPoolHandleResponse handles the ListByHostPool response. +func (client *UserSessionsClient) listByHostPoolHandleResponse(resp *http.Response) (UserSessionsClientListByHostPoolResponse, error) { + result := UserSessionsClientListByHostPoolResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UserSessionList); err != nil { + return UserSessionsClientListByHostPoolResponse{}, err + } + return result, nil +} + +// SendMessage - Send a message to a user. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - hostPoolName - The name of the host pool within the specified resource group +// - sessionHostName - The name of the session host within the specified host pool +// - userSessionID - The name of the user session within the specified session host +// - options - UserSessionsClientSendMessageOptions contains the optional parameters for the UserSessionsClient.SendMessage +// method. +func (client *UserSessionsClient) SendMessage(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientSendMessageOptions) (UserSessionsClientSendMessageResponse, error) { + var err error + const operationName = "UserSessionsClient.SendMessage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.sendMessageCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, userSessionID, options) + if err != nil { + return UserSessionsClientSendMessageResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UserSessionsClientSendMessageResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return UserSessionsClientSendMessageResponse{}, err + } + return UserSessionsClientSendMessageResponse{}, nil +} + +// sendMessageCreateRequest creates the SendMessage request. +func (client *UserSessionsClient) sendMessageCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientSendMessageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/sendMessage" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hostPoolName == "" { + return nil, errors.New("parameter hostPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) + if sessionHostName == "" { + return nil, errors.New("parameter sessionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) + if userSessionID == "" { + return nil, errors.New("parameter userSessionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{userSessionId}", url.PathEscape(userSessionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.SendMessage != nil { + if err := runtime.MarshalAsJSON(req, *options.SendMessage); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/workspaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/workspaces_client.go new file mode 100644 index 00000000..b42ebc4c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2/workspaces_client.go @@ -0,0 +1,426 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdesktopvirtualization + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// WorkspacesClient contains the methods for the Workspaces group. +// Don't use this type directly, use NewWorkspacesClient() instead. +type WorkspacesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWorkspacesClient creates a new instance of WorkspacesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WorkspacesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or update a workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace +// - workspace - Object containing Workspace definitions. +// - options - WorkspacesClientCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.CreateOrUpdate +// method. +func (client *WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspace Workspace, options *WorkspacesClientCreateOrUpdateOptions) (WorkspacesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WorkspacesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, workspace, options) + if err != nil { + return WorkspacesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WorkspacesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, workspace Workspace, options *WorkspacesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, workspace); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WorkspacesClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspacesClientCreateOrUpdateResponse, error) { + result := WorkspacesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Workspace); err != nil { + return WorkspacesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Remove a workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace +// - options - WorkspacesClientDeleteOptions contains the optional parameters for the WorkspacesClient.Delete method. +func (client *WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientDeleteOptions) (WorkspacesClientDeleteResponse, error) { + var err error + const operationName = "WorkspacesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, options) + if err != nil { + return WorkspacesClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacesClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WorkspacesClientDeleteResponse{}, err + } + return WorkspacesClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace +// - options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. +func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error) { + var err error + const operationName = "WorkspacesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, options) + if err != nil { + return WorkspacesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (WorkspacesClientGetResponse, error) { + result := WorkspacesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Workspace); err != nil { + return WorkspacesClientGetResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - List workspaces. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager +// method. +func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListByResourceGroupResponse]{ + More: func(page WorkspacesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspacesClientListByResourceGroupResponse) (WorkspacesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspacesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return WorkspacesClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + if options != nil && options.InitialSkip != nil { + reqQP.Set("initialSkip", strconv.FormatInt(int64(*options.InitialSkip), 10)) + } + if options != nil && options.IsDescending != nil { + reqQP.Set("isDescending", strconv.FormatBool(*options.IsDescending)) + } + if options != nil && options.PageSize != nil { + reqQP.Set("pageSize", strconv.FormatInt(int64(*options.PageSize), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Response) (WorkspacesClientListByResourceGroupResponse, error) { + result := WorkspacesClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceList); err != nil { + return WorkspacesClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - List workspaces in subscription. +// +// Generated from API version 2024-04-03 +// - options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager +// method. +func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListBySubscriptionResponse]{ + More: func(page WorkspacesClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WorkspacesClientListBySubscriptionResponse) (WorkspacesClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkspacesClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return WorkspacesClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *WorkspacesClient) listBySubscriptionCreateRequest(ctx context.Context, options *WorkspacesClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/workspaces" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *WorkspacesClient) listBySubscriptionHandleResponse(resp *http.Response) (WorkspacesClientListBySubscriptionResponse, error) { + result := WorkspacesClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceList); err != nil { + return WorkspacesClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// Update - Update a workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-03 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the workspace +// - options - WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method. +func (client *WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientUpdateOptions) (WorkspacesClientUpdateResponse, error) { + var err error + const operationName = "WorkspacesClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, options) + if err != nil { + return WorkspacesClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WorkspacesClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkspacesClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-03") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Workspace != nil { + if err := runtime.MarshalAsJSON(req, *options.Workspace); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *WorkspacesClient) updateHandleResponse(resp *http.Response) (WorkspacesClientUpdateResponse, error) { + result := WorkspacesClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Workspace); err != nil { + return WorkspacesClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_applicationgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_applicationgroups_client.go deleted file mode 100644 index 107ede7f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_applicationgroups_client.go +++ /dev/null @@ -1,408 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ApplicationGroupsClient contains the methods for the ApplicationGroups group. -// Don't use this type directly, use NewApplicationGroupsClient() instead. -type ApplicationGroupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewApplicationGroupsClient creates a new instance of ApplicationGroupsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewApplicationGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGroupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ApplicationGroupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create or update an applicationGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// applicationGroup - Object containing ApplicationGroup definitions. -// options - ApplicationGroupsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationGroupsClient.CreateOrUpdate -// method. -func (client *ApplicationGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationGroup ApplicationGroup, options *ApplicationGroupsClientCreateOrUpdateOptions) (ApplicationGroupsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationGroupName, applicationGroup, options) - if err != nil { - return ApplicationGroupsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGroupsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ApplicationGroupsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ApplicationGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationGroup ApplicationGroup, options *ApplicationGroupsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, applicationGroup) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ApplicationGroupsClient) createOrUpdateHandleResponse(resp *http.Response) (ApplicationGroupsClientCreateOrUpdateResponse, error) { - result := ApplicationGroupsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroup); err != nil { - return ApplicationGroupsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Remove an applicationGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// options - ApplicationGroupsClientDeleteOptions contains the optional parameters for the ApplicationGroupsClient.Delete -// method. -func (client *ApplicationGroupsClient) Delete(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientDeleteOptions) (ApplicationGroupsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationGroupName, options) - if err != nil { - return ApplicationGroupsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGroupsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ApplicationGroupsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ApplicationGroupsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ApplicationGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get an application group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// options - ApplicationGroupsClientGetOptions contains the optional parameters for the ApplicationGroupsClient.Get method. -func (client *ApplicationGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientGetOptions) (ApplicationGroupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGroupName, options) - if err != nil { - return ApplicationGroupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGroupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGroupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ApplicationGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ApplicationGroupsClient) getHandleResponse(resp *http.Response) (ApplicationGroupsClientGetResponse, error) { - result := ApplicationGroupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroup); err != nil { - return ApplicationGroupsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List applicationGroups. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - ApplicationGroupsClientListByResourceGroupOptions contains the optional parameters for the ApplicationGroupsClient.ListByResourceGroup -// method. -func (client *ApplicationGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *ApplicationGroupsClientListByResourceGroupOptions) *runtime.Pager[ApplicationGroupsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationGroupsClientListByResourceGroupResponse]{ - More: func(page ApplicationGroupsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationGroupsClientListByResourceGroupResponse) (ApplicationGroupsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationGroupsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGroupsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGroupsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ApplicationGroupsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ApplicationGroupsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ApplicationGroupsClient) listByResourceGroupHandleResponse(resp *http.Response) (ApplicationGroupsClientListByResourceGroupResponse, error) { - result := ApplicationGroupsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroupList); err != nil { - return ApplicationGroupsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - List applicationGroups in subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// options - ApplicationGroupsClientListBySubscriptionOptions contains the optional parameters for the ApplicationGroupsClient.ListBySubscription -// method. -func (client *ApplicationGroupsClient) NewListBySubscriptionPager(options *ApplicationGroupsClientListBySubscriptionOptions) *runtime.Pager[ApplicationGroupsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationGroupsClientListBySubscriptionResponse]{ - More: func(page ApplicationGroupsClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationGroupsClientListBySubscriptionResponse) (ApplicationGroupsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationGroupsClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGroupsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGroupsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ApplicationGroupsClient) listBySubscriptionCreateRequest(ctx context.Context, options *ApplicationGroupsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/applicationGroups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *ApplicationGroupsClient) listBySubscriptionHandleResponse(resp *http.Response) (ApplicationGroupsClientListBySubscriptionResponse, error) { - result := ApplicationGroupsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroupList); err != nil { - return ApplicationGroupsClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Update an applicationGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// options - ApplicationGroupsClientUpdateOptions contains the optional parameters for the ApplicationGroupsClient.Update -// method. -func (client *ApplicationGroupsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientUpdateOptions) (ApplicationGroupsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, applicationGroupName, options) - if err != nil { - return ApplicationGroupsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGroupsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGroupsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *ApplicationGroupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationGroupsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.ApplicationGroup != nil { - return req, runtime.MarshalAsJSON(req, *options.ApplicationGroup) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *ApplicationGroupsClient) updateHandleResponse(resp *http.Response) (ApplicationGroupsClientUpdateResponse, error) { - result := ApplicationGroupsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGroup); err != nil { - return ApplicationGroupsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_applications_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_applications_client.go deleted file mode 100644 index 51f35fb3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_applications_client.go +++ /dev/null @@ -1,364 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ApplicationsClient contains the methods for the Applications group. -// Don't use this type directly, use NewApplicationsClient() instead. -type ApplicationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewApplicationsClient creates a new instance of ApplicationsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ApplicationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create or update an application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// applicationName - The name of the application within the specified application group -// application - Object containing Application definitions. -// options - ApplicationsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.CreateOrUpdate -// method. -func (client *ApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, application Application, options *ApplicationsClientCreateOrUpdateOptions) (ApplicationsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationGroupName, applicationName, application, options) - if err != nil { - return ApplicationsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ApplicationsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ApplicationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, application Application, options *ApplicationsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - if applicationName == "" { - return nil, errors.New("parameter applicationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationName}", url.PathEscape(applicationName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, application) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ApplicationsClient) createOrUpdateHandleResponse(resp *http.Response) (ApplicationsClientCreateOrUpdateResponse, error) { - result := ApplicationsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Application); err != nil { - return ApplicationsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Remove an application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// applicationName - The name of the application within the specified application group -// options - ApplicationsClientDeleteOptions contains the optional parameters for the ApplicationsClient.Delete method. -func (client *ApplicationsClient) Delete(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientDeleteOptions) (ApplicationsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationGroupName, applicationName, options) - if err != nil { - return ApplicationsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ApplicationsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ApplicationsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ApplicationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - if applicationName == "" { - return nil, errors.New("parameter applicationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationName}", url.PathEscape(applicationName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get an application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// applicationName - The name of the application within the specified application group -// options - ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method. -func (client *ApplicationsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientGetOptions) (ApplicationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGroupName, applicationName, options) - if err != nil { - return ApplicationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ApplicationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - if applicationName == "" { - return nil, errors.New("parameter applicationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationName}", url.PathEscape(applicationName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ApplicationsClient) getHandleResponse(resp *http.Response) (ApplicationsClientGetResponse, error) { - result := ApplicationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Application); err != nil { - return ApplicationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List applications. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// options - ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.List method. -func (client *ApplicationsClient) NewListPager(resourceGroupName string, applicationGroupName string, options *ApplicationsClientListOptions) *runtime.Pager[ApplicationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationsClientListResponse]{ - More: func(page ApplicationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationsClientListResponse) (ApplicationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, applicationGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ApplicationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *ApplicationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ApplicationsClient) listHandleResponse(resp *http.Response) (ApplicationsClientListResponse, error) { - result := ApplicationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationList); err != nil { - return ApplicationsClientListResponse{}, err - } - return result, nil -} - -// Update - Update an application. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// applicationName - The name of the application within the specified application group -// options - ApplicationsClientUpdateOptions contains the optional parameters for the ApplicationsClient.Update method. -func (client *ApplicationsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientUpdateOptions) (ApplicationsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, applicationGroupName, applicationName, options) - if err != nil { - return ApplicationsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *ApplicationsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, applicationName string, options *ApplicationsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - if applicationName == "" { - return nil, errors.New("parameter applicationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationName}", url.PathEscape(applicationName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Application != nil { - return req, runtime.MarshalAsJSON(req, *options.Application) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *ApplicationsClient) updateHandleResponse(resp *http.Response) (ApplicationsClientUpdateResponse, error) { - result := ApplicationsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Application); err != nil { - return ApplicationsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_constants.go deleted file mode 100644 index d9d4a7aa..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_constants.go +++ /dev/null @@ -1,489 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -const ( - moduleName = "armdesktopvirtualization" - moduleVersion = "v1.0.0" -) - -// ApplicationGroupType - Resource Type of ApplicationGroup. -type ApplicationGroupType string - -const ( - ApplicationGroupTypeDesktop ApplicationGroupType = "Desktop" - ApplicationGroupTypeRemoteApp ApplicationGroupType = "RemoteApp" -) - -// PossibleApplicationGroupTypeValues returns the possible values for the ApplicationGroupType const type. -func PossibleApplicationGroupTypeValues() []ApplicationGroupType { - return []ApplicationGroupType{ - ApplicationGroupTypeDesktop, - ApplicationGroupTypeRemoteApp, - } -} - -// ApplicationType - Application type of application. -type ApplicationType string - -const ( - ApplicationTypeDesktop ApplicationType = "Desktop" - ApplicationTypeRemoteApp ApplicationType = "RemoteApp" -) - -// PossibleApplicationTypeValues returns the possible values for the ApplicationType const type. -func PossibleApplicationTypeValues() []ApplicationType { - return []ApplicationType{ - ApplicationTypeDesktop, - ApplicationTypeRemoteApp, - } -} - -// CommandLineSetting - Specifies whether this published application can be launched with command line arguments provided -// by the client, command line arguments specified at publish time, or no command line arguments at all. -type CommandLineSetting string - -const ( - CommandLineSettingAllow CommandLineSetting = "Allow" - CommandLineSettingDoNotAllow CommandLineSetting = "DoNotAllow" - CommandLineSettingRequire CommandLineSetting = "Require" -) - -// PossibleCommandLineSettingValues returns the possible values for the CommandLineSetting const type. -func PossibleCommandLineSettingValues() []CommandLineSetting { - return []CommandLineSetting{ - CommandLineSettingAllow, - CommandLineSettingDoNotAllow, - CommandLineSettingRequire, - } -} - -// HealthCheckName - Represents the name of the health check operation performed. -type HealthCheckName string - -const ( - // HealthCheckNameAppAttachHealthCheck - Verifies that the AppAttachService is healthy (there were no issues during package - // staging). The AppAttachService is used to enable the staging/registration (and eventual deregistration/destaging) of MSIX - // apps that have been set up by the tenant admin. This checks whether the component had any failures during package staging. - // Failures in staging will prevent some MSIX apps from working properly for the end user. If this check fails, it is non - // fatal and the machine still can service connections, main issue may be certain apps will not work for end-users. - HealthCheckNameAppAttachHealthCheck HealthCheckName = "AppAttachHealthCheck" - // HealthCheckNameDomainJoinedCheck - Verifies the SessionHost is joined to a domain. If this check fails is classified as - // fatal as no connection can succeed if the SessionHost is not joined to the domain. - HealthCheckNameDomainJoinedCheck HealthCheckName = "DomainJoinedCheck" - // HealthCheckNameDomainReachable - Verifies the domain the SessionHost is joined to is still reachable. If this check fails - // is classified as fatal as no connection can succeed if the domain the SessionHost is joined is not reachable at the time - // of connection. - HealthCheckNameDomainReachable HealthCheckName = "DomainReachable" - // HealthCheckNameDomainTrustCheck - Verifies the SessionHost is not experiencing domain trust issues that will prevent authentication - // on SessionHost at connection time when session is created. If this check fails is classified as fatal as no connection - // can succeed if we cannot reach the domain for authentication on the SessionHost. - HealthCheckNameDomainTrustCheck HealthCheckName = "DomainTrustCheck" - // HealthCheckNameFSLogixHealthCheck - Verifies the FSLogix service is up and running to make sure users' profiles are loaded - // in the session. If this check fails is classified as fatal as even if the connection can succeed, user experience is bad - // as the user profile cannot be loaded and user will get a temporary profile in the session. - HealthCheckNameFSLogixHealthCheck HealthCheckName = "FSLogixHealthCheck" - // HealthCheckNameMetaDataServiceCheck - Verifies the metadata service is accessible and return compute properties. - HealthCheckNameMetaDataServiceCheck HealthCheckName = "MetaDataServiceCheck" - // HealthCheckNameMonitoringAgentCheck - Verifies that the required Geneva agent is running. If this check fails, it is non - // fatal and the machine still can service connections, main issue may be that monitoring agent is missing or running (possibly) - // older version. - HealthCheckNameMonitoringAgentCheck HealthCheckName = "MonitoringAgentCheck" - // HealthCheckNameSupportedEncryptionCheck - Verifies the value of SecurityLayer registration key. If the value is 0 (SecurityLayer.RDP) - // this check fails with Error code = NativeMethodErrorCode.E_FAIL and is fatal. If the value is 1 (SecurityLayer.Negotiate) - // this check fails with Error code = NativeMethodErrorCode.ERROR_SUCCESS and is non fatal. - HealthCheckNameSupportedEncryptionCheck HealthCheckName = "SupportedEncryptionCheck" - // HealthCheckNameSxSStackListenerCheck - Verifies that the SxS stack is up and running so connections can succeed. If this - // check fails is classified as fatal as no connection can succeed if the SxS stack is not ready. - HealthCheckNameSxSStackListenerCheck HealthCheckName = "SxSStackListenerCheck" - // HealthCheckNameUrlsAccessibleCheck - Verifies that the required WVD service and Geneva URLs are reachable from the SessionHost. - // These URLs are: RdTokenUri, RdBrokerURI, RdDiagnosticsUri and storage blob URLs for agent monitoring (geneva). If this - // check fails, it is non fatal and the machine still can service connections, main issue may be that monitoring agent is - // unable to store warm path data (logs, operations ...). - HealthCheckNameUrlsAccessibleCheck HealthCheckName = "UrlsAccessibleCheck" - // HealthCheckNameWebRTCRedirectorCheck - Verifies whether the WebRTCRedirector component is healthy. The WebRTCRedirector - // component is used to optimize video and audio performance in Microsoft Teams. This checks whether the component is still - // running, and whether there is a higher version available. If this check fails, it is non fatal and the machine still can - // service connections, main issue may be the WebRTCRedirector component has to be restarted or updated. - HealthCheckNameWebRTCRedirectorCheck HealthCheckName = "WebRTCRedirectorCheck" -) - -// PossibleHealthCheckNameValues returns the possible values for the HealthCheckName const type. -func PossibleHealthCheckNameValues() []HealthCheckName { - return []HealthCheckName{ - HealthCheckNameAppAttachHealthCheck, - HealthCheckNameDomainJoinedCheck, - HealthCheckNameDomainReachable, - HealthCheckNameDomainTrustCheck, - HealthCheckNameFSLogixHealthCheck, - HealthCheckNameMetaDataServiceCheck, - HealthCheckNameMonitoringAgentCheck, - HealthCheckNameSupportedEncryptionCheck, - HealthCheckNameSxSStackListenerCheck, - HealthCheckNameUrlsAccessibleCheck, - HealthCheckNameWebRTCRedirectorCheck, - } -} - -// HealthCheckResult - Represents the Health state of the health check we performed. -type HealthCheckResult string - -const ( - // HealthCheckResultHealthCheckFailed - Health check failed. - HealthCheckResultHealthCheckFailed HealthCheckResult = "HealthCheckFailed" - // HealthCheckResultHealthCheckSucceeded - Health check passed. - HealthCheckResultHealthCheckSucceeded HealthCheckResult = "HealthCheckSucceeded" - // HealthCheckResultSessionHostShutdown - We received a Shutdown notification. - HealthCheckResultSessionHostShutdown HealthCheckResult = "SessionHostShutdown" - // HealthCheckResultUnknown - Health check result is not currently known. - HealthCheckResultUnknown HealthCheckResult = "Unknown" -) - -// PossibleHealthCheckResultValues returns the possible values for the HealthCheckResult const type. -func PossibleHealthCheckResultValues() []HealthCheckResult { - return []HealthCheckResult{ - HealthCheckResultHealthCheckFailed, - HealthCheckResultHealthCheckSucceeded, - HealthCheckResultSessionHostShutdown, - HealthCheckResultUnknown, - } -} - -// HostPoolType - HostPool type for desktop. -type HostPoolType string - -const ( - // HostPoolTypeBYODesktop - Users assign their own machines, load balancing logic remains the same as Personal. PersonalDesktopAssignmentType - // must be Direct. - HostPoolTypeBYODesktop HostPoolType = "BYODesktop" - // HostPoolTypePersonal - Users will be assigned a SessionHost either by administrators (PersonalDesktopAssignmentType = Direct) - // or upon connecting to the pool (PersonalDesktopAssignmentType = Automatic). They will always be redirected to their assigned - // SessionHost. - HostPoolTypePersonal HostPoolType = "Personal" - // HostPoolTypePooled - Users get a new (random) SessionHost every time it connects to the HostPool. - HostPoolTypePooled HostPoolType = "Pooled" -) - -// PossibleHostPoolTypeValues returns the possible values for the HostPoolType const type. -func PossibleHostPoolTypeValues() []HostPoolType { - return []HostPoolType{ - HostPoolTypeBYODesktop, - HostPoolTypePersonal, - HostPoolTypePooled, - } -} - -// LoadBalancerType - The type of the load balancer. -type LoadBalancerType string - -const ( - LoadBalancerTypeBreadthFirst LoadBalancerType = "BreadthFirst" - LoadBalancerTypeDepthFirst LoadBalancerType = "DepthFirst" - LoadBalancerTypePersistent LoadBalancerType = "Persistent" -) - -// PossibleLoadBalancerTypeValues returns the possible values for the LoadBalancerType const type. -func PossibleLoadBalancerTypeValues() []LoadBalancerType { - return []LoadBalancerType{ - LoadBalancerTypeBreadthFirst, - LoadBalancerTypeDepthFirst, - LoadBalancerTypePersistent, - } -} - -// Operation - The type of operation for migration. -type Operation string - -const ( - // OperationComplete - Complete the migration. - OperationComplete Operation = "Complete" - // OperationHide - Hide the hostpool. - OperationHide Operation = "Hide" - // OperationRevoke - Revoke the migration. - OperationRevoke Operation = "Revoke" - // OperationStart - Start the migration. - OperationStart Operation = "Start" - // OperationUnhide - Unhide the hostpool. - OperationUnhide Operation = "Unhide" -) - -// PossibleOperationValues returns the possible values for the Operation const type. -func PossibleOperationValues() []Operation { - return []Operation{ - OperationComplete, - OperationHide, - OperationRevoke, - OperationStart, - OperationUnhide, - } -} - -// PersonalDesktopAssignmentType - PersonalDesktopAssignment type for HostPool. -type PersonalDesktopAssignmentType string - -const ( - PersonalDesktopAssignmentTypeAutomatic PersonalDesktopAssignmentType = "Automatic" - PersonalDesktopAssignmentTypeDirect PersonalDesktopAssignmentType = "Direct" -) - -// PossiblePersonalDesktopAssignmentTypeValues returns the possible values for the PersonalDesktopAssignmentType const type. -func PossiblePersonalDesktopAssignmentTypeValues() []PersonalDesktopAssignmentType { - return []PersonalDesktopAssignmentType{ - PersonalDesktopAssignmentTypeAutomatic, - PersonalDesktopAssignmentTypeDirect, - } -} - -// PreferredAppGroupType - The type of preferred application group type, default to Desktop Application Group -type PreferredAppGroupType string - -const ( - PreferredAppGroupTypeDesktop PreferredAppGroupType = "Desktop" - PreferredAppGroupTypeNone PreferredAppGroupType = "None" - PreferredAppGroupTypeRailApplications PreferredAppGroupType = "RailApplications" -) - -// PossiblePreferredAppGroupTypeValues returns the possible values for the PreferredAppGroupType const type. -func PossiblePreferredAppGroupTypeValues() []PreferredAppGroupType { - return []PreferredAppGroupType{ - PreferredAppGroupTypeDesktop, - PreferredAppGroupTypeNone, - PreferredAppGroupTypeRailApplications, - } -} - -// RegistrationTokenOperation - The type of resetting the token. -type RegistrationTokenOperation string - -const ( - RegistrationTokenOperationDelete RegistrationTokenOperation = "Delete" - RegistrationTokenOperationNone RegistrationTokenOperation = "None" - RegistrationTokenOperationUpdate RegistrationTokenOperation = "Update" -) - -// PossibleRegistrationTokenOperationValues returns the possible values for the RegistrationTokenOperation const type. -func PossibleRegistrationTokenOperationValues() []RegistrationTokenOperation { - return []RegistrationTokenOperation{ - RegistrationTokenOperationDelete, - RegistrationTokenOperationNone, - RegistrationTokenOperationUpdate, - } -} - -// RemoteApplicationType - Resource Type of Application. -type RemoteApplicationType string - -const ( - RemoteApplicationTypeInBuilt RemoteApplicationType = "InBuilt" - RemoteApplicationTypeMsixApplication RemoteApplicationType = "MsixApplication" -) - -// PossibleRemoteApplicationTypeValues returns the possible values for the RemoteApplicationType const type. -func PossibleRemoteApplicationTypeValues() []RemoteApplicationType { - return []RemoteApplicationType{ - RemoteApplicationTypeInBuilt, - RemoteApplicationTypeMsixApplication, - } -} - -// SKUTier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but -// is not required on a PUT. -type SKUTier string - -const ( - SKUTierFree SKUTier = "Free" - SKUTierBasic SKUTier = "Basic" - SKUTierStandard SKUTier = "Standard" - SKUTierPremium SKUTier = "Premium" -) - -// PossibleSKUTierValues returns the possible values for the SKUTier const type. -func PossibleSKUTierValues() []SKUTier { - return []SKUTier{ - SKUTierFree, - SKUTierBasic, - SKUTierStandard, - SKUTierPremium, - } -} - -// SSOSecretType - The type of single sign on Secret Type. -type SSOSecretType string - -const ( - SSOSecretTypeCertificate SSOSecretType = "Certificate" - SSOSecretTypeCertificateInKeyVault SSOSecretType = "CertificateInKeyVault" - SSOSecretTypeSharedKey SSOSecretType = "SharedKey" - SSOSecretTypeSharedKeyInKeyVault SSOSecretType = "SharedKeyInKeyVault" -) - -// PossibleSSOSecretTypeValues returns the possible values for the SSOSecretType const type. -func PossibleSSOSecretTypeValues() []SSOSecretType { - return []SSOSecretType{ - SSOSecretTypeCertificate, - SSOSecretTypeCertificateInKeyVault, - SSOSecretTypeSharedKey, - SSOSecretTypeSharedKeyInKeyVault, - } -} - -type ScalingScheduleDaysOfWeekItem string - -const ( - ScalingScheduleDaysOfWeekItemFriday ScalingScheduleDaysOfWeekItem = "Friday" - ScalingScheduleDaysOfWeekItemMonday ScalingScheduleDaysOfWeekItem = "Monday" - ScalingScheduleDaysOfWeekItemSaturday ScalingScheduleDaysOfWeekItem = "Saturday" - ScalingScheduleDaysOfWeekItemSunday ScalingScheduleDaysOfWeekItem = "Sunday" - ScalingScheduleDaysOfWeekItemThursday ScalingScheduleDaysOfWeekItem = "Thursday" - ScalingScheduleDaysOfWeekItemTuesday ScalingScheduleDaysOfWeekItem = "Tuesday" - ScalingScheduleDaysOfWeekItemWednesday ScalingScheduleDaysOfWeekItem = "Wednesday" -) - -// PossibleScalingScheduleDaysOfWeekItemValues returns the possible values for the ScalingScheduleDaysOfWeekItem const type. -func PossibleScalingScheduleDaysOfWeekItemValues() []ScalingScheduleDaysOfWeekItem { - return []ScalingScheduleDaysOfWeekItem{ - ScalingScheduleDaysOfWeekItemFriday, - ScalingScheduleDaysOfWeekItemMonday, - ScalingScheduleDaysOfWeekItemSaturday, - ScalingScheduleDaysOfWeekItemSunday, - ScalingScheduleDaysOfWeekItemThursday, - ScalingScheduleDaysOfWeekItemTuesday, - ScalingScheduleDaysOfWeekItemWednesday, - } -} - -// SessionHostLoadBalancingAlgorithm - Load balancing algorithm for ramp up period. -type SessionHostLoadBalancingAlgorithm string - -const ( - SessionHostLoadBalancingAlgorithmBreadthFirst SessionHostLoadBalancingAlgorithm = "BreadthFirst" - SessionHostLoadBalancingAlgorithmDepthFirst SessionHostLoadBalancingAlgorithm = "DepthFirst" -) - -// PossibleSessionHostLoadBalancingAlgorithmValues returns the possible values for the SessionHostLoadBalancingAlgorithm const type. -func PossibleSessionHostLoadBalancingAlgorithmValues() []SessionHostLoadBalancingAlgorithm { - return []SessionHostLoadBalancingAlgorithm{ - SessionHostLoadBalancingAlgorithmBreadthFirst, - SessionHostLoadBalancingAlgorithmDepthFirst, - } -} - -// SessionState - State of user session. -type SessionState string - -const ( - SessionStateActive SessionState = "Active" - SessionStateDisconnected SessionState = "Disconnected" - SessionStateLogOff SessionState = "LogOff" - SessionStatePending SessionState = "Pending" - SessionStateUnknown SessionState = "Unknown" - SessionStateUserProfileDiskMounted SessionState = "UserProfileDiskMounted" -) - -// PossibleSessionStateValues returns the possible values for the SessionState const type. -func PossibleSessionStateValues() []SessionState { - return []SessionState{ - SessionStateActive, - SessionStateDisconnected, - SessionStateLogOff, - SessionStatePending, - SessionStateUnknown, - SessionStateUserProfileDiskMounted, - } -} - -// Status - Status for a SessionHost. -type Status string - -const ( - // StatusAvailable - Session Host has passed all the health checks and is available to handle connections. - StatusAvailable Status = "Available" - // StatusDisconnected - The Session Host is unavailable because it is currently disconnected. - StatusDisconnected Status = "Disconnected" - // StatusDomainTrustRelationshipLost - SessionHost's domain trust relationship lost - StatusDomainTrustRelationshipLost Status = "DomainTrustRelationshipLost" - // StatusFSLogixNotHealthy - FSLogix is in an unhealthy state on the session host. - StatusFSLogixNotHealthy Status = "FSLogixNotHealthy" - // StatusNeedsAssistance - New status to inform admins that the health on their endpoint needs to be fixed. The connections - // might not fail, as these issues are not fatal. - StatusNeedsAssistance Status = "NeedsAssistance" - // StatusNoHeartbeat - The Session Host is not heart beating. - StatusNoHeartbeat Status = "NoHeartbeat" - // StatusNotJoinedToDomain - SessionHost is not joined to domain. - StatusNotJoinedToDomain Status = "NotJoinedToDomain" - // StatusShutdown - Session Host is shutdown - RD Agent reported session host to be stopped or deallocated. - StatusShutdown Status = "Shutdown" - // StatusSxSStackListenerNotReady - SxS stack installed on the SessionHost is not ready to receive connections. - StatusSxSStackListenerNotReady Status = "SxSStackListenerNotReady" - // StatusUnavailable - Session Host is either turned off or has failed critical health checks which is causing service not - // to be able to route connections to this session host. Note this replaces previous 'NoHeartBeat' status. - StatusUnavailable Status = "Unavailable" - // StatusUpgradeFailed - Session Host is unavailable because the critical component upgrade (agent, side-by-side stack, etc.) - // failed. - StatusUpgradeFailed Status = "UpgradeFailed" - // StatusUpgrading - Session Host is unavailable because currently an upgrade of RDAgent/side-by-side stack is in progress. - // Note: this state will be removed once the upgrade completes and the host is able to accept connections. - StatusUpgrading Status = "Upgrading" -) - -// PossibleStatusValues returns the possible values for the Status const type. -func PossibleStatusValues() []Status { - return []Status{ - StatusAvailable, - StatusDisconnected, - StatusDomainTrustRelationshipLost, - StatusFSLogixNotHealthy, - StatusNeedsAssistance, - StatusNoHeartbeat, - StatusNotJoinedToDomain, - StatusShutdown, - StatusSxSStackListenerNotReady, - StatusUnavailable, - StatusUpgradeFailed, - StatusUpgrading, - } -} - -// StopHostsWhen - Specifies when to stop hosts during ramp down period. -type StopHostsWhen string - -const ( - StopHostsWhenZeroActiveSessions StopHostsWhen = "ZeroActiveSessions" - StopHostsWhenZeroSessions StopHostsWhen = "ZeroSessions" -) - -// PossibleStopHostsWhenValues returns the possible values for the StopHostsWhen const type. -func PossibleStopHostsWhenValues() []StopHostsWhen { - return []StopHostsWhen{ - StopHostsWhenZeroActiveSessions, - StopHostsWhenZeroSessions, - } -} - -// UpdateState - Update state of a SessionHost. -type UpdateState string - -const ( - UpdateStateFailed UpdateState = "Failed" - UpdateStateInitial UpdateState = "Initial" - UpdateStatePending UpdateState = "Pending" - UpdateStateStarted UpdateState = "Started" - UpdateStateSucceeded UpdateState = "Succeeded" -) - -// PossibleUpdateStateValues returns the possible values for the UpdateState const type. -func PossibleUpdateStateValues() []UpdateState { - return []UpdateState{ - UpdateStateFailed, - UpdateStateInitial, - UpdateStatePending, - UpdateStateStarted, - UpdateStateSucceeded, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_desktops_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_desktops_client.go deleted file mode 100644 index 725e22fe..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_desktops_client.go +++ /dev/null @@ -1,236 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DesktopsClient contains the methods for the Desktops group. -// Don't use this type directly, use NewDesktopsClient() instead. -type DesktopsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDesktopsClient creates a new instance of DesktopsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDesktopsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DesktopsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DesktopsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get a desktop. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// desktopName - The name of the desktop within the specified desktop group -// options - DesktopsClientGetOptions contains the optional parameters for the DesktopsClient.Get method. -func (client *DesktopsClient) Get(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientGetOptions) (DesktopsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGroupName, desktopName, options) - if err != nil { - return DesktopsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DesktopsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DesktopsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DesktopsClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - if desktopName == "" { - return nil, errors.New("parameter desktopName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{desktopName}", url.PathEscape(desktopName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DesktopsClient) getHandleResponse(resp *http.Response) (DesktopsClientGetResponse, error) { - result := DesktopsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Desktop); err != nil { - return DesktopsClientGetResponse{}, err - } - return result, nil -} - -// List - List desktops. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// options - DesktopsClientListOptions contains the optional parameters for the DesktopsClient.List method. -func (client *DesktopsClient) List(ctx context.Context, resourceGroupName string, applicationGroupName string, options *DesktopsClientListOptions) (DesktopsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, applicationGroupName, options) - if err != nil { - return DesktopsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DesktopsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DesktopsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *DesktopsClient) listCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *DesktopsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DesktopsClient) listHandleResponse(resp *http.Response) (DesktopsClientListResponse, error) { - result := DesktopsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DesktopList); err != nil { - return DesktopsClientListResponse{}, err - } - return result, nil -} - -// Update - Update a desktop. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// desktopName - The name of the desktop within the specified desktop group -// options - DesktopsClientUpdateOptions contains the optional parameters for the DesktopsClient.Update method. -func (client *DesktopsClient) Update(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientUpdateOptions) (DesktopsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, applicationGroupName, desktopName, options) - if err != nil { - return DesktopsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DesktopsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DesktopsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *DesktopsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, desktopName string, options *DesktopsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - if desktopName == "" { - return nil, errors.New("parameter desktopName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{desktopName}", url.PathEscape(desktopName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Desktop != nil { - return req, runtime.MarshalAsJSON(req, *options.Desktop) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *DesktopsClient) updateHandleResponse(resp *http.Response) (DesktopsClientUpdateResponse, error) { - result := DesktopsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Desktop); err != nil { - return DesktopsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_hostpools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_hostpools_client.go deleted file mode 100644 index f224e7f7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_hostpools_client.go +++ /dev/null @@ -1,460 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// HostPoolsClient contains the methods for the HostPools group. -// Don't use this type directly, use NewHostPoolsClient() instead. -type HostPoolsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewHostPoolsClient creates a new instance of HostPoolsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewHostPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HostPoolsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &HostPoolsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create or update a host pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// hostPool - Object containing HostPool definitions. -// options - HostPoolsClientCreateOrUpdateOptions contains the optional parameters for the HostPoolsClient.CreateOrUpdate -// method. -func (client *HostPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostPoolName string, hostPool HostPool, options *HostPoolsClientCreateOrUpdateOptions) (HostPoolsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, hostPoolName, hostPool, options) - if err != nil { - return HostPoolsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HostPoolsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return HostPoolsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *HostPoolsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, hostPool HostPool, options *HostPoolsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hostPool) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *HostPoolsClient) createOrUpdateHandleResponse(resp *http.Response) (HostPoolsClientCreateOrUpdateResponse, error) { - result := HostPoolsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostPool); err != nil { - return HostPoolsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Remove a host pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// options - HostPoolsClientDeleteOptions contains the optional parameters for the HostPoolsClient.Delete method. -func (client *HostPoolsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientDeleteOptions) (HostPoolsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, hostPoolName, options) - if err != nil { - return HostPoolsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HostPoolsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return HostPoolsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return HostPoolsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *HostPoolsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - if options != nil && options.Force != nil { - reqQP.Set("force", strconv.FormatBool(*options.Force)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a host pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// options - HostPoolsClientGetOptions contains the optional parameters for the HostPoolsClient.Get method. -func (client *HostPoolsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientGetOptions) (HostPoolsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, hostPoolName, options) - if err != nil { - return HostPoolsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HostPoolsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HostPoolsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *HostPoolsClient) getCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *HostPoolsClient) getHandleResponse(resp *http.Response) (HostPoolsClientGetResponse, error) { - result := HostPoolsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostPool); err != nil { - return HostPoolsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List hostPools in subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// options - HostPoolsClientListOptions contains the optional parameters for the HostPoolsClient.List method. -func (client *HostPoolsClient) NewListPager(options *HostPoolsClientListOptions) *runtime.Pager[HostPoolsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[HostPoolsClientListResponse]{ - More: func(page HostPoolsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *HostPoolsClientListResponse) (HostPoolsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return HostPoolsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HostPoolsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HostPoolsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *HostPoolsClient) listCreateRequest(ctx context.Context, options *HostPoolsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/hostPools" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *HostPoolsClient) listHandleResponse(resp *http.Response) (HostPoolsClientListResponse, error) { - result := HostPoolsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostPoolList); err != nil { - return HostPoolsClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List hostPools. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - HostPoolsClientListByResourceGroupOptions contains the optional parameters for the HostPoolsClient.ListByResourceGroup -// method. -func (client *HostPoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *HostPoolsClientListByResourceGroupOptions) *runtime.Pager[HostPoolsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[HostPoolsClientListByResourceGroupResponse]{ - More: func(page HostPoolsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *HostPoolsClientListByResourceGroupResponse) (HostPoolsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return HostPoolsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HostPoolsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HostPoolsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *HostPoolsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *HostPoolsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *HostPoolsClient) listByResourceGroupHandleResponse(resp *http.Response) (HostPoolsClientListByResourceGroupResponse, error) { - result := HostPoolsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostPoolList); err != nil { - return HostPoolsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// RetrieveRegistrationToken - Registration token of the host pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// options - HostPoolsClientRetrieveRegistrationTokenOptions contains the optional parameters for the HostPoolsClient.RetrieveRegistrationToken -// method. -func (client *HostPoolsClient) RetrieveRegistrationToken(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientRetrieveRegistrationTokenOptions) (HostPoolsClientRetrieveRegistrationTokenResponse, error) { - req, err := client.retrieveRegistrationTokenCreateRequest(ctx, resourceGroupName, hostPoolName, options) - if err != nil { - return HostPoolsClientRetrieveRegistrationTokenResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HostPoolsClientRetrieveRegistrationTokenResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HostPoolsClientRetrieveRegistrationTokenResponse{}, runtime.NewResponseError(resp) - } - return client.retrieveRegistrationTokenHandleResponse(resp) -} - -// retrieveRegistrationTokenCreateRequest creates the RetrieveRegistrationToken request. -func (client *HostPoolsClient) retrieveRegistrationTokenCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientRetrieveRegistrationTokenOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/retrieveRegistrationToken" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// retrieveRegistrationTokenHandleResponse handles the RetrieveRegistrationToken response. -func (client *HostPoolsClient) retrieveRegistrationTokenHandleResponse(resp *http.Response) (HostPoolsClientRetrieveRegistrationTokenResponse, error) { - result := HostPoolsClientRetrieveRegistrationTokenResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RegistrationInfo); err != nil { - return HostPoolsClientRetrieveRegistrationTokenResponse{}, err - } - return result, nil -} - -// Update - Update a host pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// options - HostPoolsClientUpdateOptions contains the optional parameters for the HostPoolsClient.Update method. -func (client *HostPoolsClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientUpdateOptions) (HostPoolsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, hostPoolName, options) - if err != nil { - return HostPoolsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HostPoolsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HostPoolsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *HostPoolsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *HostPoolsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.HostPool != nil { - return req, runtime.MarshalAsJSON(req, *options.HostPool) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *HostPoolsClient) updateHandleResponse(resp *http.Response) (HostPoolsClientUpdateResponse, error) { - result := HostPoolsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HostPool); err != nil { - return HostPoolsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_models.go deleted file mode 100644 index 02749332..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_models.go +++ /dev/null @@ -1,1689 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import "time" - -// Application - Schema for Application properties. -type Application struct { - // REQUIRED; Detailed properties for Application - Properties *ApplicationProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGroup - Represents a ApplicationGroup definition. -type ApplicationGroup struct { - // REQUIRED; Detailed properties for ApplicationGroup - Properties *ApplicationGroupProperties `json:"properties,omitempty"` - Identity *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"` - - // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are - // a kind of Microsoft.Web/sites type. If supported, the resource provider must - // validate and persist this value. - Kind *string `json:"kind,omitempty"` - - // The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another - // Azure resource. If this is present, complete mode deployment will not - // delete the resource if it is removed from the template since it is managed by another resource. - ManagedBy *string `json:"managedBy,omitempty"` - Plan *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"` - SKU *ResourceModelWithAllowedPropertySetSKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header - // per the normal etag convention. Entity tags are used for comparing two or more entities - // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match - // (section 14.26), and If-Range (section 14.27) header fields. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGroupList - List of ApplicationGroup definitions. -type ApplicationGroupList struct { - // List of ApplicationGroup definitions. - Value []*ApplicationGroup `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ApplicationGroupPatch - ApplicationGroup properties that can be patched. -type ApplicationGroupPatch struct { - // ApplicationGroup properties that can be patched. - Properties *ApplicationGroupPatchProperties `json:"properties,omitempty"` - - // tags to be updated - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGroupPatchProperties - ApplicationGroup properties that can be patched. -type ApplicationGroupPatchProperties struct { - // Description of ApplicationGroup. - Description *string `json:"description,omitempty"` - - // Friendly name of ApplicationGroup. - FriendlyName *string `json:"friendlyName,omitempty"` -} - -// ApplicationGroupProperties - Schema for ApplicationGroup properties. -type ApplicationGroupProperties struct { - // REQUIRED; Resource Type of ApplicationGroup. - ApplicationGroupType *ApplicationGroupType `json:"applicationGroupType,omitempty"` - - // REQUIRED; HostPool arm path of ApplicationGroup. - HostPoolArmPath *string `json:"hostPoolArmPath,omitempty"` - - // Description of ApplicationGroup. - Description *string `json:"description,omitempty"` - - // Friendly name of ApplicationGroup. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The registration info of HostPool. - MigrationRequest *MigrationRequestProperties `json:"migrationRequest,omitempty"` - - // READ-ONLY; Is cloud pc resource. - CloudPcResource *bool `json:"cloudPcResource,omitempty" azure:"ro"` - - // READ-ONLY; ObjectId of ApplicationGroup. (internal use) - ObjectID *string `json:"objectId,omitempty" azure:"ro"` - - // READ-ONLY; Workspace arm path of ApplicationGroup. - WorkspaceArmPath *string `json:"workspaceArmPath,omitempty" azure:"ro"` -} - -// ApplicationGroupsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationGroupsClient.CreateOrUpdate -// method. -type ApplicationGroupsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGroupsClientDeleteOptions contains the optional parameters for the ApplicationGroupsClient.Delete method. -type ApplicationGroupsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGroupsClientGetOptions contains the optional parameters for the ApplicationGroupsClient.Get method. -type ApplicationGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGroupsClientListByResourceGroupOptions contains the optional parameters for the ApplicationGroupsClient.ListByResourceGroup -// method. -type ApplicationGroupsClientListByResourceGroupOptions struct { - // OData filter expression. Valid properties for filtering are applicationGroupType. - Filter *string -} - -// ApplicationGroupsClientListBySubscriptionOptions contains the optional parameters for the ApplicationGroupsClient.ListBySubscription -// method. -type ApplicationGroupsClientListBySubscriptionOptions struct { - // OData filter expression. Valid properties for filtering are applicationGroupType. - Filter *string -} - -// ApplicationGroupsClientUpdateOptions contains the optional parameters for the ApplicationGroupsClient.Update method. -type ApplicationGroupsClientUpdateOptions struct { - // Object containing ApplicationGroup definitions. - ApplicationGroup *ApplicationGroupPatch -} - -// ApplicationList - List of Application definitions. -type ApplicationList struct { - // List of Application definitions. - Value []*Application `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ApplicationPatch - Application properties that can be patched. -type ApplicationPatch struct { - // Detailed properties for Application - Properties *ApplicationPatchProperties `json:"properties,omitempty"` - - // tags to be updated - Tags map[string]*string `json:"tags,omitempty"` -} - -// ApplicationPatchProperties - Application properties that can be patched. -type ApplicationPatchProperties struct { - // Resource Type of Application. - ApplicationType *RemoteApplicationType `json:"applicationType,omitempty"` - - // Command Line Arguments for Application. - CommandLineArguments *string `json:"commandLineArguments,omitempty"` - - // Specifies whether this published application can be launched with command line arguments provided by the client, command - // line arguments specified at publish time, or no command line arguments at all. - CommandLineSetting *CommandLineSetting `json:"commandLineSetting,omitempty"` - - // Description of Application. - Description *string `json:"description,omitempty"` - - // Specifies a path for the executable file for the application. - FilePath *string `json:"filePath,omitempty"` - - // Friendly name of Application. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Index of the icon. - IconIndex *int32 `json:"iconIndex,omitempty"` - - // Path to icon. - IconPath *string `json:"iconPath,omitempty"` - - // Specifies the package application Id for MSIX applications - MsixPackageApplicationID *string `json:"msixPackageApplicationId,omitempty"` - - // Specifies the package family name for MSIX applications - MsixPackageFamilyName *string `json:"msixPackageFamilyName,omitempty"` - - // Specifies whether to show the RemoteApp program in the RD Web Access server. - ShowInPortal *bool `json:"showInPortal,omitempty"` -} - -// ApplicationProperties - Schema for Application properties. -type ApplicationProperties struct { - // REQUIRED; Specifies whether this published application can be launched with command line arguments provided by the client, - // command line arguments specified at publish time, or no command line arguments at all. - CommandLineSetting *CommandLineSetting `json:"commandLineSetting,omitempty"` - - // Resource Type of Application. - ApplicationType *RemoteApplicationType `json:"applicationType,omitempty"` - - // Command Line Arguments for Application. - CommandLineArguments *string `json:"commandLineArguments,omitempty"` - - // Description of Application. - Description *string `json:"description,omitempty"` - - // Specifies a path for the executable file for the application. - FilePath *string `json:"filePath,omitempty"` - - // Friendly name of Application. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Index of the icon. - IconIndex *int32 `json:"iconIndex,omitempty"` - - // Path to icon. - IconPath *string `json:"iconPath,omitempty"` - - // Specifies the package application Id for MSIX applications - MsixPackageApplicationID *string `json:"msixPackageApplicationId,omitempty"` - - // Specifies the package family name for MSIX applications - MsixPackageFamilyName *string `json:"msixPackageFamilyName,omitempty"` - - // Specifies whether to show the RemoteApp program in the RD Web Access server. - ShowInPortal *bool `json:"showInPortal,omitempty"` - - // READ-ONLY; the icon a 64 bit string as a byte array. - IconContent []byte `json:"iconContent,omitempty" azure:"ro"` - - // READ-ONLY; Hash of the icon. - IconHash *string `json:"iconHash,omitempty" azure:"ro"` - - // READ-ONLY; ObjectId of Application. (internal use) - ObjectID *string `json:"objectId,omitempty" azure:"ro"` -} - -// ApplicationsClientCreateOrUpdateOptions contains the optional parameters for the ApplicationsClient.CreateOrUpdate method. -type ApplicationsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ApplicationsClientDeleteOptions contains the optional parameters for the ApplicationsClient.Delete method. -type ApplicationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ApplicationsClientGetOptions contains the optional parameters for the ApplicationsClient.Get method. -type ApplicationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationsClientListOptions contains the optional parameters for the ApplicationsClient.List method. -type ApplicationsClientListOptions struct { - // placeholder for future optional parameters -} - -// ApplicationsClientUpdateOptions contains the optional parameters for the ApplicationsClient.Update method. -type ApplicationsClientUpdateOptions struct { - // Object containing Application definitions. - Application *ApplicationPatch -} - -type CloudError struct { - Error *CloudErrorProperties `json:"error,omitempty"` -} - -type CloudErrorProperties struct { - // Error code - Code *string `json:"code,omitempty"` - - // Error message indicating why the operation failed. - Message *string `json:"message,omitempty"` -} - -// Desktop - Schema for Desktop properties. -type Desktop struct { - // Detailed properties for Desktop - Properties *DesktopProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DesktopList - List of Desktop definitions. -type DesktopList struct { - // List of Desktop definitions. - Value []*Desktop `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DesktopPatch - Desktop properties that can be patched. -type DesktopPatch struct { - // Detailed properties for Desktop - Properties *DesktopPatchProperties `json:"properties,omitempty"` - - // tags to be updated - Tags map[string]*string `json:"tags,omitempty"` -} - -// DesktopPatchProperties - Desktop properties that can be patched. -type DesktopPatchProperties struct { - // Description of Desktop. - Description *string `json:"description,omitempty"` - - // Friendly name of Desktop. - FriendlyName *string `json:"friendlyName,omitempty"` -} - -// DesktopProperties - Schema for Desktop properties. -type DesktopProperties struct { - // Description of Desktop. - Description *string `json:"description,omitempty"` - - // Friendly name of Desktop. - FriendlyName *string `json:"friendlyName,omitempty"` - - // READ-ONLY; The icon a 64 bit string as a byte array. - IconContent []byte `json:"iconContent,omitempty" azure:"ro"` - - // READ-ONLY; Hash of the icon. - IconHash *string `json:"iconHash,omitempty" azure:"ro"` - - // READ-ONLY; ObjectId of Desktop. (internal use) - ObjectID *string `json:"objectId,omitempty" azure:"ro"` -} - -// DesktopsClientGetOptions contains the optional parameters for the DesktopsClient.Get method. -type DesktopsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DesktopsClientListOptions contains the optional parameters for the DesktopsClient.List method. -type DesktopsClientListOptions struct { - // placeholder for future optional parameters -} - -// DesktopsClientUpdateOptions contains the optional parameters for the DesktopsClient.Update method. -type DesktopsClientUpdateOptions struct { - // Object containing Desktop definitions. - Desktop *DesktopPatch -} - -// ExpandMsixImage - Represents the definition of contents retrieved after expanding the MSIX Image. -type ExpandMsixImage struct { - // Detailed properties for ExpandMsixImage - Properties *ExpandMsixImageProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpandMsixImageList - List of MSIX package properties retrieved from MSIX Image expansion. -type ExpandMsixImageList struct { - // List of MSIX package properties from give MSIX Image. - Value []*ExpandMsixImage `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ExpandMsixImageProperties - Schema for Expand MSIX Image properties. -type ExpandMsixImageProperties struct { - // User friendly Name to be displayed in the portal. - DisplayName *string `json:"displayName,omitempty"` - - // VHD/CIM image path on Network Share. - ImagePath *string `json:"imagePath,omitempty"` - - // Make this version of the package the active one across the hostpool. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies how to register Package in feed. - IsRegularRegistration *bool `json:"isRegularRegistration,omitempty"` - - // Date Package was last updated, found in the appxmanifest.xml. - LastUpdated *time.Time `json:"lastUpdated,omitempty"` - - // Alias of MSIX Package. - PackageAlias *string `json:"packageAlias,omitempty"` - - // List of package applications. - PackageApplications []*MsixPackageApplications `json:"packageApplications,omitempty"` - - // List of package dependencies. - PackageDependencies []*MsixPackageDependencies `json:"packageDependencies,omitempty"` - - // Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. - PackageFamilyName *string `json:"packageFamilyName,omitempty"` - - // Package Full Name from appxmanifest.xml. - PackageFullName *string `json:"packageFullName,omitempty"` - - // Package Name from appxmanifest.xml. - PackageName *string `json:"packageName,omitempty"` - - // Relative Path to the package inside the image. - PackageRelativePath *string `json:"packageRelativePath,omitempty"` - - // Package Version found in the appxmanifest.xml. - Version *string `json:"version,omitempty"` -} - -// HostPool - Represents a HostPool definition. -type HostPool struct { - // REQUIRED; Detailed properties for HostPool - Properties *HostPoolProperties `json:"properties,omitempty"` - Identity *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"` - - // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are - // a kind of Microsoft.Web/sites type. If supported, the resource provider must - // validate and persist this value. - Kind *string `json:"kind,omitempty"` - - // The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another - // Azure resource. If this is present, complete mode deployment will not - // delete the resource if it is removed from the template since it is managed by another resource. - ManagedBy *string `json:"managedBy,omitempty"` - Plan *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"` - SKU *ResourceModelWithAllowedPropertySetSKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header - // per the normal etag convention. Entity tags are used for comparing two or more entities - // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match - // (section 14.26), and If-Range (section 14.27) header fields. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// HostPoolList - List of HostPool definitions. -type HostPoolList struct { - // List of HostPool definitions. - Value []*HostPool `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// HostPoolPatch - HostPool properties that can be patched. -type HostPoolPatch struct { - // HostPool properties that can be patched. - Properties *HostPoolPatchProperties `json:"properties,omitempty"` - - // tags to be updated - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// HostPoolPatchProperties - Properties of HostPool. -type HostPoolPatchProperties struct { - // Custom rdp property of HostPool. - CustomRdpProperty *string `json:"customRdpProperty,omitempty"` - - // Description of HostPool. - Description *string `json:"description,omitempty"` - - // Friendly name of HostPool. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The type of the load balancer. - LoadBalancerType *LoadBalancerType `json:"loadBalancerType,omitempty"` - - // The max session limit of HostPool. - MaxSessionLimit *int32 `json:"maxSessionLimit,omitempty"` - - // PersonalDesktopAssignment type for HostPool. - PersonalDesktopAssignmentType *PersonalDesktopAssignmentType `json:"personalDesktopAssignmentType,omitempty"` - - // The type of preferred application group type, default to Desktop Application Group - PreferredAppGroupType *PreferredAppGroupType `json:"preferredAppGroupType,omitempty"` - - // The registration info of HostPool. - RegistrationInfo *RegistrationInfoPatch `json:"registrationInfo,omitempty"` - - // The ring number of HostPool. - Ring *int32 `json:"ring,omitempty"` - - // ClientId for the registered Relying Party used to issue WVD SSO certificates. - SsoClientID *string `json:"ssoClientId,omitempty"` - - // Path to Azure KeyVault storing the secret used for communication to ADFS. - SsoClientSecretKeyVaultPath *string `json:"ssoClientSecretKeyVaultPath,omitempty"` - - // The type of single sign on Secret Type. - SsoSecretType *SSOSecretType `json:"ssoSecretType,omitempty"` - - // URL to customer ADFS server for signing WVD SSO certificates. - SsoadfsAuthority *string `json:"ssoadfsAuthority,omitempty"` - - // The flag to turn on/off StartVMOnConnect feature. - StartVMOnConnect *bool `json:"startVMOnConnect,omitempty"` - - // VM template for sessionhosts configuration within hostpool. - VMTemplate *string `json:"vmTemplate,omitempty"` - - // Is validation environment. - ValidationEnvironment *bool `json:"validationEnvironment,omitempty"` -} - -// HostPoolProperties - Properties of HostPool. -type HostPoolProperties struct { - // REQUIRED; HostPool type for desktop. - HostPoolType *HostPoolType `json:"hostPoolType,omitempty"` - - // REQUIRED; The type of the load balancer. - LoadBalancerType *LoadBalancerType `json:"loadBalancerType,omitempty"` - - // REQUIRED; The type of preferred application group type, default to Desktop Application Group - PreferredAppGroupType *PreferredAppGroupType `json:"preferredAppGroupType,omitempty"` - - // Custom rdp property of HostPool. - CustomRdpProperty *string `json:"customRdpProperty,omitempty"` - - // Description of HostPool. - Description *string `json:"description,omitempty"` - - // Friendly name of HostPool. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The max session limit of HostPool. - MaxSessionLimit *int32 `json:"maxSessionLimit,omitempty"` - - // The registration info of HostPool. - MigrationRequest *MigrationRequestProperties `json:"migrationRequest,omitempty"` - - // PersonalDesktopAssignment type for HostPool. - PersonalDesktopAssignmentType *PersonalDesktopAssignmentType `json:"personalDesktopAssignmentType,omitempty"` - - // The registration info of HostPool. - RegistrationInfo *RegistrationInfo `json:"registrationInfo,omitempty"` - - // The ring number of HostPool. - Ring *int32 `json:"ring,omitempty"` - - // ClientId for the registered Relying Party used to issue WVD SSO certificates. - SsoClientID *string `json:"ssoClientId,omitempty"` - - // Path to Azure KeyVault storing the secret used for communication to ADFS. - SsoClientSecretKeyVaultPath *string `json:"ssoClientSecretKeyVaultPath,omitempty"` - - // The type of single sign on Secret Type. - SsoSecretType *SSOSecretType `json:"ssoSecretType,omitempty"` - - // URL to customer ADFS server for signing WVD SSO certificates. - SsoadfsAuthority *string `json:"ssoadfsAuthority,omitempty"` - - // The flag to turn on/off StartVMOnConnect feature. - StartVMOnConnect *bool `json:"startVMOnConnect,omitempty"` - - // VM template for sessionhosts configuration within hostpool. - VMTemplate *string `json:"vmTemplate,omitempty"` - - // Is validation environment. - ValidationEnvironment *bool `json:"validationEnvironment,omitempty"` - - // READ-ONLY; List of applicationGroup links. - ApplicationGroupReferences []*string `json:"applicationGroupReferences,omitempty" azure:"ro"` - - // READ-ONLY; Is cloud pc resource. - CloudPcResource *bool `json:"cloudPcResource,omitempty" azure:"ro"` - - // READ-ONLY; ObjectId of HostPool. (internal use) - ObjectID *string `json:"objectId,omitempty" azure:"ro"` -} - -// HostPoolsClientCreateOrUpdateOptions contains the optional parameters for the HostPoolsClient.CreateOrUpdate method. -type HostPoolsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// HostPoolsClientDeleteOptions contains the optional parameters for the HostPoolsClient.Delete method. -type HostPoolsClientDeleteOptions struct { - // Force flag to delete sessionHost. - Force *bool -} - -// HostPoolsClientGetOptions contains the optional parameters for the HostPoolsClient.Get method. -type HostPoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// HostPoolsClientListByResourceGroupOptions contains the optional parameters for the HostPoolsClient.ListByResourceGroup -// method. -type HostPoolsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// HostPoolsClientListOptions contains the optional parameters for the HostPoolsClient.List method. -type HostPoolsClientListOptions struct { - // placeholder for future optional parameters -} - -// HostPoolsClientRetrieveRegistrationTokenOptions contains the optional parameters for the HostPoolsClient.RetrieveRegistrationToken -// method. -type HostPoolsClientRetrieveRegistrationTokenOptions struct { - // placeholder for future optional parameters -} - -// HostPoolsClientUpdateOptions contains the optional parameters for the HostPoolsClient.Update method. -type HostPoolsClientUpdateOptions struct { - // Object containing HostPool definitions. - HostPool *HostPoolPatch -} - -// Identity for the resource. -type Identity struct { - // The identity type. - Type *string `json:"type,omitempty"` - - // READ-ONLY; The principal ID of resource identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` - - // READ-ONLY; The tenant ID of resource. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// LogSpecification - Specifications of the Log for Azure Monitoring -type LogSpecification struct { - // Blob duration of the log - BlobDuration *string `json:"blobDuration,omitempty"` - - // Localized friendly display name of the log - DisplayName *string `json:"displayName,omitempty"` - - // Name of the log - Name *string `json:"name,omitempty"` -} - -// MSIXImageURI - Represents URI referring to MSIX Image -type MSIXImageURI struct { - // URI to Image - URI *string `json:"uri,omitempty"` -} - -// MSIXPackage - Schema for MSIX Package properties. -type MSIXPackage struct { - // REQUIRED; Detailed properties for MSIX Package - Properties *MSIXPackageProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MSIXPackageList - List of MSIX Package definitions. -type MSIXPackageList struct { - // List of MSIX Package definitions. - Value []*MSIXPackage `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// MSIXPackagePatch - MSIX Package properties that can be patched. -type MSIXPackagePatch struct { - // Detailed properties for MSIX Package - Properties *MSIXPackagePatchProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MSIXPackagePatchProperties - MSIX Package properties that can be patched. -type MSIXPackagePatchProperties struct { - // Display name for MSIX Package. - DisplayName *string `json:"displayName,omitempty"` - - // Set a version of the package to be active across hostpool. - IsActive *bool `json:"isActive,omitempty"` - - // Set Registration mode. Regular or Delayed. - IsRegularRegistration *bool `json:"isRegularRegistration,omitempty"` -} - -// MSIXPackageProperties - Schema for MSIX Package properties. -type MSIXPackageProperties struct { - // User friendly Name to be displayed in the portal. - DisplayName *string `json:"displayName,omitempty"` - - // VHD/CIM image path on Network Share. - ImagePath *string `json:"imagePath,omitempty"` - - // Make this version of the package the active one across the hostpool. - IsActive *bool `json:"isActive,omitempty"` - - // Specifies how to register Package in feed. - IsRegularRegistration *bool `json:"isRegularRegistration,omitempty"` - - // Date Package was last updated, found in the appxmanifest.xml. - LastUpdated *time.Time `json:"lastUpdated,omitempty"` - - // List of package applications. - PackageApplications []*MsixPackageApplications `json:"packageApplications,omitempty"` - - // List of package dependencies. - PackageDependencies []*MsixPackageDependencies `json:"packageDependencies,omitempty"` - - // Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. - PackageFamilyName *string `json:"packageFamilyName,omitempty"` - - // Package Name from appxmanifest.xml. - PackageName *string `json:"packageName,omitempty"` - - // Relative Path to the package inside the image. - PackageRelativePath *string `json:"packageRelativePath,omitempty"` - - // Package Version found in the appxmanifest.xml. - Version *string `json:"version,omitempty"` -} - -// MSIXPackagesClientCreateOrUpdateOptions contains the optional parameters for the MSIXPackagesClient.CreateOrUpdate method. -type MSIXPackagesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// MSIXPackagesClientDeleteOptions contains the optional parameters for the MSIXPackagesClient.Delete method. -type MSIXPackagesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// MSIXPackagesClientGetOptions contains the optional parameters for the MSIXPackagesClient.Get method. -type MSIXPackagesClientGetOptions struct { - // placeholder for future optional parameters -} - -// MSIXPackagesClientListOptions contains the optional parameters for the MSIXPackagesClient.List method. -type MSIXPackagesClientListOptions struct { - // placeholder for future optional parameters -} - -// MSIXPackagesClientUpdateOptions contains the optional parameters for the MSIXPackagesClient.Update method. -type MSIXPackagesClientUpdateOptions struct { - // Object containing MSIX Package definitions. - MsixPackage *MSIXPackagePatch -} - -// MigrationRequestProperties - Properties for arm migration. -type MigrationRequestProperties struct { - // The path to the legacy object to migrate. - MigrationPath *string `json:"migrationPath,omitempty"` - - // The type of operation for migration. - Operation *Operation `json:"operation,omitempty"` -} - -// MsixImagesClientExpandOptions contains the optional parameters for the MsixImagesClient.Expand method. -type MsixImagesClientExpandOptions struct { - // placeholder for future optional parameters -} - -// MsixPackageApplications - Schema for MSIX Package Application properties. -type MsixPackageApplications struct { - // Package Application Id, found in appxmanifest.xml. - AppID *string `json:"appId,omitempty"` - - // Used to activate Package Application. Consists of Package Name and ApplicationID. Found in appxmanifest.xml. - AppUserModelID *string `json:"appUserModelID,omitempty"` - - // Description of Package Application. - Description *string `json:"description,omitempty"` - - // User friendly name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // User friendly name. - IconImageName *string `json:"iconImageName,omitempty"` - - // the icon a 64 bit string as a byte array. - RawIcon []byte `json:"rawIcon,omitempty"` - - // the icon a 64 bit string as a byte array. - RawPNG []byte `json:"rawPng,omitempty"` -} - -// MsixPackageDependencies - Schema for MSIX Package Dependencies properties. -type MsixPackageDependencies struct { - // Name of package dependency. - DependencyName *string `json:"dependencyName,omitempty"` - - // Dependency version required. - MinVersion *string `json:"minVersion,omitempty"` - - // Name of dependency publisher. - Publisher *string `json:"publisher,omitempty"` -} - -// OperationProperties - Properties of the operation -type OperationProperties struct { - // Service specification payload - ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// Plan for the resource. -type Plan struct { - // REQUIRED; A user defined name of the 3rd Party Artifact that is being procured. - Name *string `json:"name,omitempty"` - - // REQUIRED; The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact - // at the time of Data Market onboarding. - Product *string `json:"product,omitempty"` - - // REQUIRED; The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic - Publisher *string `json:"publisher,omitempty"` - - // A publisher provided promotion code as provisioned in Data Market for the said product/artifact. - PromotionCode *string `json:"promotionCode,omitempty"` - - // The version of the desired product/artifact. - Version *string `json:"version,omitempty"` -} - -// RegistrationInfo - Represents a RegistrationInfo definition. -type RegistrationInfo struct { - // Expiration time of registration token. - ExpirationTime *time.Time `json:"expirationTime,omitempty"` - - // The type of resetting the token. - RegistrationTokenOperation *RegistrationTokenOperation `json:"registrationTokenOperation,omitempty"` - - // The registration token base64 encoded string. - Token *string `json:"token,omitempty"` -} - -// RegistrationInfoPatch - Represents a RegistrationInfo definition. -type RegistrationInfoPatch struct { - // Expiration time of registration token. - ExpirationTime *time.Time `json:"expirationTime,omitempty"` - - // The type of resetting the token. - RegistrationTokenOperation *RegistrationTokenOperation `json:"registrationTokenOperation,omitempty"` -} - -// Resource - Common fields that are returned in the response for all Azure Resource Manager resources -type Resource struct { - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceModelWithAllowedPropertySet - The resource model definition containing the full set of allowed properties for a -// resource. Except properties bag, there cannot be a top level property outside of this set. -type ResourceModelWithAllowedPropertySet struct { - Identity *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"` - - // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are - // a kind of Microsoft.Web/sites type. If supported, the resource provider must - // validate and persist this value. - Kind *string `json:"kind,omitempty"` - - // The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another - // Azure resource. If this is present, complete mode deployment will not - // delete the resource if it is removed from the template since it is managed by another resource. - ManagedBy *string `json:"managedBy,omitempty"` - Plan *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"` - SKU *ResourceModelWithAllowedPropertySetSKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header - // per the normal etag convention. Entity tags are used for comparing two or more entities - // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match - // (section 14.26), and If-Range (section 14.27) header fields. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -type ResourceModelWithAllowedPropertySetIdentity struct { - // The identity type. - Type *string `json:"type,omitempty"` - - // READ-ONLY; The principal ID of resource identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` - - // READ-ONLY; The tenant ID of resource. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -type ResourceModelWithAllowedPropertySetPlan struct { - // REQUIRED; A user defined name of the 3rd Party Artifact that is being procured. - Name *string `json:"name,omitempty"` - - // REQUIRED; The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact - // at the time of Data Market onboarding. - Product *string `json:"product,omitempty"` - - // REQUIRED; The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic - Publisher *string `json:"publisher,omitempty"` - - // A publisher provided promotion code as provisioned in Data Market for the said product/artifact. - PromotionCode *string `json:"promotionCode,omitempty"` - - // The version of the desired product/artifact. - Version *string `json:"version,omitempty"` -} - -type ResourceModelWithAllowedPropertySetSKU struct { - // REQUIRED; The name of the SKU. Ex - P3. It is typically a letter+number code - Name *string `json:"name,omitempty"` - - // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - // resource this may be omitted. - Capacity *int32 `json:"capacity,omitempty"` - - // If the service has different generations of hardware, for the same SKU, then that can be captured here. - Family *string `json:"family,omitempty"` - - // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - Size *string `json:"size,omitempty"` - - // This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - // on a PUT. - Tier *SKUTier `json:"tier,omitempty"` -} - -// ResourceProviderOperation - Supported operation of this resource provider. -type ResourceProviderOperation struct { - // Display metadata associated with the operation. - Display *ResourceProviderOperationDisplay `json:"display,omitempty"` - - // Is a data action. - IsDataAction *bool `json:"isDataAction,omitempty"` - - // Operation name, in format of {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` - - // Properties of the operation - Properties *OperationProperties `json:"properties,omitempty"` -} - -// ResourceProviderOperationDisplay - Display metadata associated with the operation. -type ResourceProviderOperationDisplay struct { - // Description of this operation. - Description *string `json:"description,omitempty"` - - // Type of operation: get, read, delete, etc. - Operation *string `json:"operation,omitempty"` - - // Resource provider: Microsoft Desktop Virtualization. - Provider *string `json:"provider,omitempty"` - - // Resource on which the operation is performed. - Resource *string `json:"resource,omitempty"` -} - -// ResourceProviderOperationList - Result of the request to list operations. -type ResourceProviderOperationList struct { - // List of operations supported by this resource provider. - Value []*ResourceProviderOperation `json:"value,omitempty"` -} - -// SKU - The resource model definition representing SKU -type SKU struct { - // REQUIRED; The name of the SKU. Ex - P3. It is typically a letter+number code - Name *string `json:"name,omitempty"` - - // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - // resource this may be omitted. - Capacity *int32 `json:"capacity,omitempty"` - - // If the service has different generations of hardware, for the same SKU, then that can be captured here. - Family *string `json:"family,omitempty"` - - // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - Size *string `json:"size,omitempty"` - - // This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - // on a PUT. - Tier *SKUTier `json:"tier,omitempty"` -} - -// ScalingHostPoolReference - Scaling plan reference to hostpool. -type ScalingHostPoolReference struct { - // Arm path of referenced hostpool. - HostPoolArmPath *string `json:"hostPoolArmPath,omitempty"` - - // Is the scaling plan enabled for this hostpool. - ScalingPlanEnabled *bool `json:"scalingPlanEnabled,omitempty"` -} - -// ScalingPlan - Represents a scaling plan definition. -type ScalingPlan struct { - Identity *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"` - - // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are - // a kind of Microsoft.Web/sites type. If supported, the resource provider must - // validate and persist this value. - Kind *string `json:"kind,omitempty"` - - // The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another - // Azure resource. If this is present, complete mode deployment will not - // delete the resource if it is removed from the template since it is managed by another resource. - ManagedBy *string `json:"managedBy,omitempty"` - Plan *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"` - - // Detailed properties for scaling plan. - Properties *ScalingPlanProperties `json:"properties,omitempty"` - SKU *ResourceModelWithAllowedPropertySetSKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header - // per the normal etag convention. Entity tags are used for comparing two or more entities - // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match - // (section 14.26), and If-Range (section 14.27) header fields. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ScalingPlanList - List of scaling plan definitions. -type ScalingPlanList struct { - // List of scaling plan definitions. - Value []*ScalingPlan `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ScalingPlanPatch - Scaling plan properties that can be patched. -type ScalingPlanPatch struct { - // Detailed properties for scaling plan - Properties *ScalingPlanPatchProperties `json:"properties,omitempty"` - - // tags to be updated - Tags map[string]*string `json:"tags,omitempty"` -} - -// ScalingPlanPatchProperties - Scaling plan properties. -type ScalingPlanPatchProperties struct { - // Description of scaling plan. - Description *string `json:"description,omitempty"` - - // Exclusion tag for scaling plan. - ExclusionTag *string `json:"exclusionTag,omitempty"` - - // User friendly name of scaling plan. - FriendlyName *string `json:"friendlyName,omitempty"` - - // List of ScalingHostPoolReference definitions. - HostPoolReferences []*ScalingHostPoolReference `json:"hostPoolReferences,omitempty"` - - // HostPool type for desktop. - HostPoolType *HostPoolType `json:"hostPoolType,omitempty"` - - // List of ScalingSchedule definitions. - Schedules []*ScalingSchedule `json:"schedules,omitempty"` - - // Timezone of the scaling plan. - TimeZone *string `json:"timeZone,omitempty"` -} - -// ScalingPlanProperties - Scaling plan properties. -type ScalingPlanProperties struct { - // Description of scaling plan. - Description *string `json:"description,omitempty"` - - // Exclusion tag for scaling plan. - ExclusionTag *string `json:"exclusionTag,omitempty"` - - // User friendly name of scaling plan. - FriendlyName *string `json:"friendlyName,omitempty"` - - // List of ScalingHostPoolReference definitions. - HostPoolReferences []*ScalingHostPoolReference `json:"hostPoolReferences,omitempty"` - - // HostPool type for desktop. - HostPoolType *HostPoolType `json:"hostPoolType,omitempty"` - - // List of ScalingSchedule definitions. - Schedules []*ScalingSchedule `json:"schedules,omitempty"` - - // Timezone of the scaling plan. - TimeZone *string `json:"timeZone,omitempty"` - - // READ-ONLY; ObjectId of scaling plan. (internal use) - ObjectID *string `json:"objectId,omitempty" azure:"ro"` -} - -// ScalingPlansClientCreateOptions contains the optional parameters for the ScalingPlansClient.Create method. -type ScalingPlansClientCreateOptions struct { - // placeholder for future optional parameters -} - -// ScalingPlansClientDeleteOptions contains the optional parameters for the ScalingPlansClient.Delete method. -type ScalingPlansClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ScalingPlansClientGetOptions contains the optional parameters for the ScalingPlansClient.Get method. -type ScalingPlansClientGetOptions struct { - // placeholder for future optional parameters -} - -// ScalingPlansClientListByHostPoolOptions contains the optional parameters for the ScalingPlansClient.ListByHostPool method. -type ScalingPlansClientListByHostPoolOptions struct { - // placeholder for future optional parameters -} - -// ScalingPlansClientListByResourceGroupOptions contains the optional parameters for the ScalingPlansClient.ListByResourceGroup -// method. -type ScalingPlansClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ScalingPlansClientListBySubscriptionOptions contains the optional parameters for the ScalingPlansClient.ListBySubscription -// method. -type ScalingPlansClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ScalingPlansClientUpdateOptions contains the optional parameters for the ScalingPlansClient.Update method. -type ScalingPlansClientUpdateOptions struct { - // Object containing scaling plan definitions. - ScalingPlan *ScalingPlanPatch -} - -// ScalingSchedule - Scaling plan schedule. -type ScalingSchedule struct { - // Set of days of the week on which this schedule is active. - DaysOfWeek []*ScalingScheduleDaysOfWeekItem `json:"daysOfWeek,omitempty"` - - // Name of the scaling schedule. - Name *string `json:"name,omitempty"` - - // Load balancing algorithm for off-peak period. - OffPeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm `json:"offPeakLoadBalancingAlgorithm,omitempty"` - - // Starting time for off-peak period. - OffPeakStartTime *time.Time `json:"offPeakStartTime,omitempty"` - - // Load balancing algorithm for peak period. - PeakLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm `json:"peakLoadBalancingAlgorithm,omitempty"` - - // Starting time for peak period. - PeakStartTime *time.Time `json:"peakStartTime,omitempty"` - - // Capacity threshold for ramp down period. - RampDownCapacityThresholdPct *int32 `json:"rampDownCapacityThresholdPct,omitempty"` - - // Should users be logged off forcefully from hosts. - RampDownForceLogoffUsers *bool `json:"rampDownForceLogoffUsers,omitempty"` - - // Load balancing algorithm for ramp down period. - RampDownLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm `json:"rampDownLoadBalancingAlgorithm,omitempty"` - - // Minimum host percentage for ramp down period. - RampDownMinimumHostsPct *int32 `json:"rampDownMinimumHostsPct,omitempty"` - - // Notification message for users during ramp down period. - RampDownNotificationMessage *string `json:"rampDownNotificationMessage,omitempty"` - - // Starting time for ramp down period. - RampDownStartTime *time.Time `json:"rampDownStartTime,omitempty"` - - // Specifies when to stop hosts during ramp down period. - RampDownStopHostsWhen *StopHostsWhen `json:"rampDownStopHostsWhen,omitempty"` - - // Number of minutes to wait to stop hosts during ramp down period. - RampDownWaitTimeMinutes *int32 `json:"rampDownWaitTimeMinutes,omitempty"` - - // Capacity threshold for ramp up period. - RampUpCapacityThresholdPct *int32 `json:"rampUpCapacityThresholdPct,omitempty"` - - // Load balancing algorithm for ramp up period. - RampUpLoadBalancingAlgorithm *SessionHostLoadBalancingAlgorithm `json:"rampUpLoadBalancingAlgorithm,omitempty"` - - // Minimum host percentage for ramp up period. - RampUpMinimumHostsPct *int32 `json:"rampUpMinimumHostsPct,omitempty"` - - // Starting time for ramp up period. - RampUpStartTime *time.Time `json:"rampUpStartTime,omitempty"` -} - -// SendMessage - Represents message sent to a UserSession. -type SendMessage struct { - // Body of message. - MessageBody *string `json:"messageBody,omitempty"` - - // Title of message. - MessageTitle *string `json:"messageTitle,omitempty"` -} - -// ServiceSpecification - Service specification payload -type ServiceSpecification struct { - // Specifications of the Log for Azure Monitoring - LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"` -} - -// SessionHost - Represents a SessionHost definition. -type SessionHost struct { - // Detailed properties for SessionHost - Properties *SessionHostProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SessionHostHealthCheckFailureDetails - Contains details on the failure. -type SessionHostHealthCheckFailureDetails struct { - // READ-ONLY; Error code corresponding for the failure. - ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"` - - // READ-ONLY; The timestamp of the last update. - LastHealthCheckDateTime *time.Time `json:"lastHealthCheckDateTime,omitempty" azure:"ro"` - - // READ-ONLY; Failure message: hints on what is wrong and how to recover. - Message *string `json:"message,omitempty" azure:"ro"` -} - -// SessionHostHealthCheckReport - The report for session host information. -type SessionHostHealthCheckReport struct { - // READ-ONLY; Additional detailed information on the failure. - AdditionalFailureDetails *SessionHostHealthCheckFailureDetails `json:"additionalFailureDetails,omitempty" azure:"ro"` - - // READ-ONLY; Represents the name of the health check operation performed. - HealthCheckName *HealthCheckName `json:"healthCheckName,omitempty" azure:"ro"` - - // READ-ONLY; Represents the Health state of the health check we performed. - HealthCheckResult *HealthCheckResult `json:"healthCheckResult,omitempty" azure:"ro"` -} - -// SessionHostList - List of SessionHost definitions. -type SessionHostList struct { - // List of SessionHost definitions. - Value []*SessionHost `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// SessionHostPatch - SessionHost properties that can be patched. -type SessionHostPatch struct { - // Detailed properties for SessionHost - Properties *SessionHostPatchProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SessionHostPatchProperties - SessionHost properties that can be patched. -type SessionHostPatchProperties struct { - // Allow a new session. - AllowNewSession *bool `json:"allowNewSession,omitempty"` - - // User assigned to SessionHost. - AssignedUser *string `json:"assignedUser,omitempty"` -} - -// SessionHostProperties - Schema for SessionHost properties. -type SessionHostProperties struct { - // Version of agent on SessionHost. - AgentVersion *string `json:"agentVersion,omitempty"` - - // Allow a new session. - AllowNewSession *bool `json:"allowNewSession,omitempty"` - - // User assigned to SessionHost. - AssignedUser *string `json:"assignedUser,omitempty"` - - // Last heart beat from SessionHost. - LastHeartBeat *time.Time `json:"lastHeartBeat,omitempty"` - - // The version of the OS on the session host. - OSVersion *string `json:"osVersion,omitempty"` - - // Number of sessions on SessionHost. - Sessions *int32 `json:"sessions,omitempty"` - - // Status for a SessionHost. - Status *Status `json:"status,omitempty"` - - // The version of the side by side stack on the session host. - SxSStackVersion *string `json:"sxSStackVersion,omitempty"` - - // The error message. - UpdateErrorMessage *string `json:"updateErrorMessage,omitempty"` - - // Update state of a SessionHost. - UpdateState *UpdateState `json:"updateState,omitempty"` - - // READ-ONLY; The timestamp of the last update. - LastUpdateTime *time.Time `json:"lastUpdateTime,omitempty" azure:"ro"` - - // READ-ONLY; ObjectId of SessionHost. (internal use) - ObjectID *string `json:"objectId,omitempty" azure:"ro"` - - // READ-ONLY; Resource Id of SessionHost's underlying virtual machine. - ResourceID *string `json:"resourceId,omitempty" azure:"ro"` - - // READ-ONLY; List of SessionHostHealthCheckReports - SessionHostHealthCheckResults []*SessionHostHealthCheckReport `json:"sessionHostHealthCheckResults,omitempty" azure:"ro"` - - // READ-ONLY; The timestamp of the status. - StatusTimestamp *time.Time `json:"statusTimestamp,omitempty" azure:"ro"` - - // READ-ONLY; Virtual Machine Id of SessionHost's underlying virtual machine. - VirtualMachineID *string `json:"virtualMachineId,omitempty" azure:"ro"` -} - -// SessionHostsClientDeleteOptions contains the optional parameters for the SessionHostsClient.Delete method. -type SessionHostsClientDeleteOptions struct { - // Force flag to force sessionHost deletion even when userSession exists. - Force *bool -} - -// SessionHostsClientGetOptions contains the optional parameters for the SessionHostsClient.Get method. -type SessionHostsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SessionHostsClientListOptions contains the optional parameters for the SessionHostsClient.List method. -type SessionHostsClientListOptions struct { - // placeholder for future optional parameters -} - -// SessionHostsClientUpdateOptions contains the optional parameters for the SessionHostsClient.Update method. -type SessionHostsClientUpdateOptions struct { - // Object containing SessionHost definitions. - SessionHost *SessionHostPatch -} - -// StartMenuItem - Represents a StartMenuItem definition. -type StartMenuItem struct { - // Detailed properties for StartMenuItem - Properties *StartMenuItemProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StartMenuItemList - List of StartMenuItem definitions. -type StartMenuItemList struct { - // List of StartMenuItem definitions. - Value []*StartMenuItem `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// StartMenuItemProperties - Schema for StartMenuItem properties. -type StartMenuItemProperties struct { - // Alias of StartMenuItem. - AppAlias *string `json:"appAlias,omitempty"` - - // Command line arguments for StartMenuItem. - CommandLineArguments *string `json:"commandLineArguments,omitempty"` - - // Path to the file of StartMenuItem. - FilePath *string `json:"filePath,omitempty"` - - // Index of the icon. - IconIndex *int32 `json:"iconIndex,omitempty"` - - // Path to the icon. - IconPath *string `json:"iconPath,omitempty"` -} - -// StartMenuItemsClientListOptions contains the optional parameters for the StartMenuItemsClient.List method. -type StartMenuItemsClientListOptions struct { - // placeholder for future optional parameters -} - -// UserSession - Represents a UserSession definition. -type UserSession struct { - // Detailed properties for UserSession - Properties *UserSessionProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// UserSessionList - List of UserSession definitions. -type UserSessionList struct { - // List of UserSession definitions. - Value []*UserSession `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// UserSessionProperties - Schema for UserSession properties. -type UserSessionProperties struct { - // The active directory user name. - ActiveDirectoryUserName *string `json:"activeDirectoryUserName,omitempty"` - - // Application type of application. - ApplicationType *ApplicationType `json:"applicationType,omitempty"` - - // The timestamp of the user session create. - CreateTime *time.Time `json:"createTime,omitempty"` - - // State of user session. - SessionState *SessionState `json:"sessionState,omitempty"` - - // The user principal name. - UserPrincipalName *string `json:"userPrincipalName,omitempty"` - - // READ-ONLY; ObjectId of user session. (internal use) - ObjectID *string `json:"objectId,omitempty" azure:"ro"` -} - -// UserSessionsClientDeleteOptions contains the optional parameters for the UserSessionsClient.Delete method. -type UserSessionsClientDeleteOptions struct { - // Force flag to login off userSession. - Force *bool -} - -// UserSessionsClientDisconnectOptions contains the optional parameters for the UserSessionsClient.Disconnect method. -type UserSessionsClientDisconnectOptions struct { - // placeholder for future optional parameters -} - -// UserSessionsClientGetOptions contains the optional parameters for the UserSessionsClient.Get method. -type UserSessionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// UserSessionsClientListByHostPoolOptions contains the optional parameters for the UserSessionsClient.ListByHostPool method. -type UserSessionsClientListByHostPoolOptions struct { - // OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. - Filter *string -} - -// UserSessionsClientListOptions contains the optional parameters for the UserSessionsClient.List method. -type UserSessionsClientListOptions struct { - // placeholder for future optional parameters -} - -// UserSessionsClientSendMessageOptions contains the optional parameters for the UserSessionsClient.SendMessage method. -type UserSessionsClientSendMessageOptions struct { - // Object containing message includes title and message body - SendMessage *SendMessage -} - -// Workspace - Represents a Workspace definition. -type Workspace struct { - Identity *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"` - - // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are - // a kind of Microsoft.Web/sites type. If supported, the resource provider must - // validate and persist this value. - Kind *string `json:"kind,omitempty"` - - // The geo-location where the resource lives - Location *string `json:"location,omitempty"` - - // The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another - // Azure resource. If this is present, complete mode deployment will not - // delete the resource if it is removed from the template since it is managed by another resource. - ManagedBy *string `json:"managedBy,omitempty"` - Plan *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"` - - // Detailed properties for Workspace - Properties *WorkspaceProperties `json:"properties,omitempty"` - SKU *ResourceModelWithAllowedPropertySetSKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header - // per the normal etag convention. Entity tags are used for comparing two or more entities - // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match - // (section 14.26), and If-Range (section 14.27) header fields. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WorkspaceList - List of Workspace definitions. -type WorkspaceList struct { - // List of Workspace definitions. - Value []*Workspace `json:"value,omitempty"` - - // READ-ONLY; Link to the next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// WorkspacePatch - Workspace properties that can be patched. -type WorkspacePatch struct { - // Detailed properties for Workspace - Properties *WorkspacePatchProperties `json:"properties,omitempty"` - - // tags to be updated - Tags map[string]*string `json:"tags,omitempty"` -} - -// WorkspacePatchProperties - Workspace properties that can be patched. -type WorkspacePatchProperties struct { - // List of applicationGroup links. - ApplicationGroupReferences []*string `json:"applicationGroupReferences,omitempty"` - - // Description of Workspace. - Description *string `json:"description,omitempty"` - - // Friendly name of Workspace. - FriendlyName *string `json:"friendlyName,omitempty"` -} - -// WorkspaceProperties - Schema for Workspace properties. -type WorkspaceProperties struct { - // List of applicationGroup resource Ids. - ApplicationGroupReferences []*string `json:"applicationGroupReferences,omitempty"` - - // Description of Workspace. - Description *string `json:"description,omitempty"` - - // Friendly name of Workspace. - FriendlyName *string `json:"friendlyName,omitempty"` - - // READ-ONLY; Is cloud pc resource. - CloudPcResource *bool `json:"cloudPcResource,omitempty" azure:"ro"` - - // READ-ONLY; ObjectId of Workspace. (internal use) - ObjectID *string `json:"objectId,omitempty" azure:"ro"` -} - -// WorkspacesClientCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.CreateOrUpdate method. -type WorkspacesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientDeleteOptions contains the optional parameters for the WorkspacesClient.Delete method. -type WorkspacesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. -type WorkspacesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup -// method. -type WorkspacesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.ListBySubscription -// method. -type WorkspacesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method. -type WorkspacesClientUpdateOptions struct { - // Object containing Workspace definitions. - Workspace *WorkspacePatch -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_models_serde.go deleted file mode 100644 index 80ede902..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_models_serde.go +++ /dev/null @@ -1,929 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGroup. -func (a ApplicationGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) - populate(objectMap, "kind", a.Kind) - populate(objectMap, "location", a.Location) - populate(objectMap, "managedBy", a.ManagedBy) - populate(objectMap, "name", a.Name) - populate(objectMap, "plan", a.Plan) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "sku", a.SKU) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGroupPatch. -func (a ApplicationGroupPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationPatch. -func (a ApplicationPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationProperties. -func (a ApplicationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationType", a.ApplicationType) - populate(objectMap, "commandLineArguments", a.CommandLineArguments) - populate(objectMap, "commandLineSetting", a.CommandLineSetting) - populate(objectMap, "description", a.Description) - populate(objectMap, "filePath", a.FilePath) - populate(objectMap, "friendlyName", a.FriendlyName) - populateByteArray(objectMap, "iconContent", a.IconContent, runtime.Base64StdFormat) - populate(objectMap, "iconHash", a.IconHash) - populate(objectMap, "iconIndex", a.IconIndex) - populate(objectMap, "iconPath", a.IconPath) - populate(objectMap, "msixPackageApplicationId", a.MsixPackageApplicationID) - populate(objectMap, "msixPackageFamilyName", a.MsixPackageFamilyName) - populate(objectMap, "objectId", a.ObjectID) - populate(objectMap, "showInPortal", a.ShowInPortal) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationProperties. -func (a *ApplicationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "applicationType": - err = unpopulate(val, "ApplicationType", &a.ApplicationType) - delete(rawMsg, key) - case "commandLineArguments": - err = unpopulate(val, "CommandLineArguments", &a.CommandLineArguments) - delete(rawMsg, key) - case "commandLineSetting": - err = unpopulate(val, "CommandLineSetting", &a.CommandLineSetting) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "filePath": - err = unpopulate(val, "FilePath", &a.FilePath) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "iconContent": - err = runtime.DecodeByteArray(string(val), &a.IconContent, runtime.Base64StdFormat) - delete(rawMsg, key) - case "iconHash": - err = unpopulate(val, "IconHash", &a.IconHash) - delete(rawMsg, key) - case "iconIndex": - err = unpopulate(val, "IconIndex", &a.IconIndex) - delete(rawMsg, key) - case "iconPath": - err = unpopulate(val, "IconPath", &a.IconPath) - delete(rawMsg, key) - case "msixPackageApplicationId": - err = unpopulate(val, "MsixPackageApplicationID", &a.MsixPackageApplicationID) - delete(rawMsg, key) - case "msixPackageFamilyName": - err = unpopulate(val, "MsixPackageFamilyName", &a.MsixPackageFamilyName) - delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &a.ObjectID) - delete(rawMsg, key) - case "showInPortal": - err = unpopulate(val, "ShowInPortal", &a.ShowInPortal) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DesktopPatch. -func (d DesktopPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DesktopProperties. -func (d DesktopProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", d.Description) - populate(objectMap, "friendlyName", d.FriendlyName) - populateByteArray(objectMap, "iconContent", d.IconContent, runtime.Base64StdFormat) - populate(objectMap, "iconHash", d.IconHash) - populate(objectMap, "objectId", d.ObjectID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DesktopProperties. -func (d *DesktopProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &d.Description) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &d.FriendlyName) - delete(rawMsg, key) - case "iconContent": - err = runtime.DecodeByteArray(string(val), &d.IconContent, runtime.Base64StdFormat) - delete(rawMsg, key) - case "iconHash": - err = unpopulate(val, "IconHash", &d.IconHash) - delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &d.ObjectID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpandMsixImageProperties. -func (e ExpandMsixImageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayName", e.DisplayName) - populate(objectMap, "imagePath", e.ImagePath) - populate(objectMap, "isActive", e.IsActive) - populate(objectMap, "isRegularRegistration", e.IsRegularRegistration) - populateTimeRFC3339(objectMap, "lastUpdated", e.LastUpdated) - populate(objectMap, "packageAlias", e.PackageAlias) - populate(objectMap, "packageApplications", e.PackageApplications) - populate(objectMap, "packageDependencies", e.PackageDependencies) - populate(objectMap, "packageFamilyName", e.PackageFamilyName) - populate(objectMap, "packageFullName", e.PackageFullName) - populate(objectMap, "packageName", e.PackageName) - populate(objectMap, "packageRelativePath", e.PackageRelativePath) - populate(objectMap, "version", e.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpandMsixImageProperties. -func (e *ExpandMsixImageProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "displayName": - err = unpopulate(val, "DisplayName", &e.DisplayName) - delete(rawMsg, key) - case "imagePath": - err = unpopulate(val, "ImagePath", &e.ImagePath) - delete(rawMsg, key) - case "isActive": - err = unpopulate(val, "IsActive", &e.IsActive) - delete(rawMsg, key) - case "isRegularRegistration": - err = unpopulate(val, "IsRegularRegistration", &e.IsRegularRegistration) - delete(rawMsg, key) - case "lastUpdated": - err = unpopulateTimeRFC3339(val, "LastUpdated", &e.LastUpdated) - delete(rawMsg, key) - case "packageAlias": - err = unpopulate(val, "PackageAlias", &e.PackageAlias) - delete(rawMsg, key) - case "packageApplications": - err = unpopulate(val, "PackageApplications", &e.PackageApplications) - delete(rawMsg, key) - case "packageDependencies": - err = unpopulate(val, "PackageDependencies", &e.PackageDependencies) - delete(rawMsg, key) - case "packageFamilyName": - err = unpopulate(val, "PackageFamilyName", &e.PackageFamilyName) - delete(rawMsg, key) - case "packageFullName": - err = unpopulate(val, "PackageFullName", &e.PackageFullName) - delete(rawMsg, key) - case "packageName": - err = unpopulate(val, "PackageName", &e.PackageName) - delete(rawMsg, key) - case "packageRelativePath": - err = unpopulate(val, "PackageRelativePath", &e.PackageRelativePath) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &e.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HostPool. -func (h HostPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", h.Etag) - populate(objectMap, "id", h.ID) - populate(objectMap, "identity", h.Identity) - populate(objectMap, "kind", h.Kind) - populate(objectMap, "location", h.Location) - populate(objectMap, "managedBy", h.ManagedBy) - populate(objectMap, "name", h.Name) - populate(objectMap, "plan", h.Plan) - populate(objectMap, "properties", h.Properties) - populate(objectMap, "sku", h.SKU) - populate(objectMap, "tags", h.Tags) - populate(objectMap, "type", h.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type HostPoolPatch. -func (h HostPoolPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", h.ID) - populate(objectMap, "name", h.Name) - populate(objectMap, "properties", h.Properties) - populate(objectMap, "tags", h.Tags) - populate(objectMap, "type", h.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type HostPoolProperties. -func (h HostPoolProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationGroupReferences", h.ApplicationGroupReferences) - populate(objectMap, "cloudPcResource", h.CloudPcResource) - populate(objectMap, "customRdpProperty", h.CustomRdpProperty) - populate(objectMap, "description", h.Description) - populate(objectMap, "friendlyName", h.FriendlyName) - populate(objectMap, "hostPoolType", h.HostPoolType) - populate(objectMap, "loadBalancerType", h.LoadBalancerType) - populate(objectMap, "maxSessionLimit", h.MaxSessionLimit) - populate(objectMap, "migrationRequest", h.MigrationRequest) - populate(objectMap, "objectId", h.ObjectID) - populate(objectMap, "personalDesktopAssignmentType", h.PersonalDesktopAssignmentType) - populate(objectMap, "preferredAppGroupType", h.PreferredAppGroupType) - populate(objectMap, "registrationInfo", h.RegistrationInfo) - populate(objectMap, "ring", h.Ring) - populate(objectMap, "ssoClientId", h.SsoClientID) - populate(objectMap, "ssoClientSecretKeyVaultPath", h.SsoClientSecretKeyVaultPath) - populate(objectMap, "ssoSecretType", h.SsoSecretType) - populate(objectMap, "ssoadfsAuthority", h.SsoadfsAuthority) - populate(objectMap, "startVMOnConnect", h.StartVMOnConnect) - populate(objectMap, "vmTemplate", h.VMTemplate) - populate(objectMap, "validationEnvironment", h.ValidationEnvironment) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MSIXPackagePatch. -func (m MSIXPackagePatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MSIXPackageProperties. -func (m MSIXPackageProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayName", m.DisplayName) - populate(objectMap, "imagePath", m.ImagePath) - populate(objectMap, "isActive", m.IsActive) - populate(objectMap, "isRegularRegistration", m.IsRegularRegistration) - populateTimeRFC3339(objectMap, "lastUpdated", m.LastUpdated) - populate(objectMap, "packageApplications", m.PackageApplications) - populate(objectMap, "packageDependencies", m.PackageDependencies) - populate(objectMap, "packageFamilyName", m.PackageFamilyName) - populate(objectMap, "packageName", m.PackageName) - populate(objectMap, "packageRelativePath", m.PackageRelativePath) - populate(objectMap, "version", m.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MSIXPackageProperties. -func (m *MSIXPackageProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "displayName": - err = unpopulate(val, "DisplayName", &m.DisplayName) - delete(rawMsg, key) - case "imagePath": - err = unpopulate(val, "ImagePath", &m.ImagePath) - delete(rawMsg, key) - case "isActive": - err = unpopulate(val, "IsActive", &m.IsActive) - delete(rawMsg, key) - case "isRegularRegistration": - err = unpopulate(val, "IsRegularRegistration", &m.IsRegularRegistration) - delete(rawMsg, key) - case "lastUpdated": - err = unpopulateTimeRFC3339(val, "LastUpdated", &m.LastUpdated) - delete(rawMsg, key) - case "packageApplications": - err = unpopulate(val, "PackageApplications", &m.PackageApplications) - delete(rawMsg, key) - case "packageDependencies": - err = unpopulate(val, "PackageDependencies", &m.PackageDependencies) - delete(rawMsg, key) - case "packageFamilyName": - err = unpopulate(val, "PackageFamilyName", &m.PackageFamilyName) - delete(rawMsg, key) - case "packageName": - err = unpopulate(val, "PackageName", &m.PackageName) - delete(rawMsg, key) - case "packageRelativePath": - err = unpopulate(val, "PackageRelativePath", &m.PackageRelativePath) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &m.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MsixPackageApplications. -func (m MsixPackageApplications) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appId", m.AppID) - populate(objectMap, "appUserModelID", m.AppUserModelID) - populate(objectMap, "description", m.Description) - populate(objectMap, "friendlyName", m.FriendlyName) - populate(objectMap, "iconImageName", m.IconImageName) - populateByteArray(objectMap, "rawIcon", m.RawIcon, runtime.Base64StdFormat) - populateByteArray(objectMap, "rawPng", m.RawPNG, runtime.Base64StdFormat) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MsixPackageApplications. -func (m *MsixPackageApplications) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appId": - err = unpopulate(val, "AppID", &m.AppID) - delete(rawMsg, key) - case "appUserModelID": - err = unpopulate(val, "AppUserModelID", &m.AppUserModelID) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &m.FriendlyName) - delete(rawMsg, key) - case "iconImageName": - err = unpopulate(val, "IconImageName", &m.IconImageName) - delete(rawMsg, key) - case "rawIcon": - err = runtime.DecodeByteArray(string(val), &m.RawIcon, runtime.Base64StdFormat) - delete(rawMsg, key) - case "rawPng": - err = runtime.DecodeByteArray(string(val), &m.RawPNG, runtime.Base64StdFormat) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RegistrationInfo. -func (r RegistrationInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "expirationTime", r.ExpirationTime) - populate(objectMap, "registrationTokenOperation", r.RegistrationTokenOperation) - populate(objectMap, "token", r.Token) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationInfo. -func (r *RegistrationInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &r.ExpirationTime) - delete(rawMsg, key) - case "registrationTokenOperation": - err = unpopulate(val, "RegistrationTokenOperation", &r.RegistrationTokenOperation) - delete(rawMsg, key) - case "token": - err = unpopulate(val, "Token", &r.Token) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RegistrationInfoPatch. -func (r RegistrationInfoPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "expirationTime", r.ExpirationTime) - populate(objectMap, "registrationTokenOperation", r.RegistrationTokenOperation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationInfoPatch. -func (r *RegistrationInfoPatch) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &r.ExpirationTime) - delete(rawMsg, key) - case "registrationTokenOperation": - err = unpopulate(val, "RegistrationTokenOperation", &r.RegistrationTokenOperation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceModelWithAllowedPropertySet. -func (r ResourceModelWithAllowedPropertySet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", r.Etag) - populate(objectMap, "id", r.ID) - populate(objectMap, "identity", r.Identity) - populate(objectMap, "kind", r.Kind) - populate(objectMap, "location", r.Location) - populate(objectMap, "managedBy", r.ManagedBy) - populate(objectMap, "name", r.Name) - populate(objectMap, "plan", r.Plan) - populate(objectMap, "sku", r.SKU) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ScalingPlan. -func (s ScalingPlan) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "location", s.Location) - populate(objectMap, "managedBy", s.ManagedBy) - populate(objectMap, "name", s.Name) - populate(objectMap, "plan", s.Plan) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "sku", s.SKU) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPatch. -func (s ScalingPlanPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ScalingPlanPatchProperties. -func (s ScalingPlanPatchProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", s.Description) - populate(objectMap, "exclusionTag", s.ExclusionTag) - populate(objectMap, "friendlyName", s.FriendlyName) - populate(objectMap, "hostPoolReferences", s.HostPoolReferences) - populate(objectMap, "hostPoolType", s.HostPoolType) - populate(objectMap, "schedules", s.Schedules) - populate(objectMap, "timeZone", s.TimeZone) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ScalingPlanProperties. -func (s ScalingPlanProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", s.Description) - populate(objectMap, "exclusionTag", s.ExclusionTag) - populate(objectMap, "friendlyName", s.FriendlyName) - populate(objectMap, "hostPoolReferences", s.HostPoolReferences) - populate(objectMap, "hostPoolType", s.HostPoolType) - populate(objectMap, "objectId", s.ObjectID) - populate(objectMap, "schedules", s.Schedules) - populate(objectMap, "timeZone", s.TimeZone) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ScalingSchedule. -func (s ScalingSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "daysOfWeek", s.DaysOfWeek) - populate(objectMap, "name", s.Name) - populate(objectMap, "offPeakLoadBalancingAlgorithm", s.OffPeakLoadBalancingAlgorithm) - populateTimeRFC3339(objectMap, "offPeakStartTime", s.OffPeakStartTime) - populate(objectMap, "peakLoadBalancingAlgorithm", s.PeakLoadBalancingAlgorithm) - populateTimeRFC3339(objectMap, "peakStartTime", s.PeakStartTime) - populate(objectMap, "rampDownCapacityThresholdPct", s.RampDownCapacityThresholdPct) - populate(objectMap, "rampDownForceLogoffUsers", s.RampDownForceLogoffUsers) - populate(objectMap, "rampDownLoadBalancingAlgorithm", s.RampDownLoadBalancingAlgorithm) - populate(objectMap, "rampDownMinimumHostsPct", s.RampDownMinimumHostsPct) - populate(objectMap, "rampDownNotificationMessage", s.RampDownNotificationMessage) - populateTimeRFC3339(objectMap, "rampDownStartTime", s.RampDownStartTime) - populate(objectMap, "rampDownStopHostsWhen", s.RampDownStopHostsWhen) - populate(objectMap, "rampDownWaitTimeMinutes", s.RampDownWaitTimeMinutes) - populate(objectMap, "rampUpCapacityThresholdPct", s.RampUpCapacityThresholdPct) - populate(objectMap, "rampUpLoadBalancingAlgorithm", s.RampUpLoadBalancingAlgorithm) - populate(objectMap, "rampUpMinimumHostsPct", s.RampUpMinimumHostsPct) - populateTimeRFC3339(objectMap, "rampUpStartTime", s.RampUpStartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScalingSchedule. -func (s *ScalingSchedule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "daysOfWeek": - err = unpopulate(val, "DaysOfWeek", &s.DaysOfWeek) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "offPeakLoadBalancingAlgorithm": - err = unpopulate(val, "OffPeakLoadBalancingAlgorithm", &s.OffPeakLoadBalancingAlgorithm) - delete(rawMsg, key) - case "offPeakStartTime": - err = unpopulateTimeRFC3339(val, "OffPeakStartTime", &s.OffPeakStartTime) - delete(rawMsg, key) - case "peakLoadBalancingAlgorithm": - err = unpopulate(val, "PeakLoadBalancingAlgorithm", &s.PeakLoadBalancingAlgorithm) - delete(rawMsg, key) - case "peakStartTime": - err = unpopulateTimeRFC3339(val, "PeakStartTime", &s.PeakStartTime) - delete(rawMsg, key) - case "rampDownCapacityThresholdPct": - err = unpopulate(val, "RampDownCapacityThresholdPct", &s.RampDownCapacityThresholdPct) - delete(rawMsg, key) - case "rampDownForceLogoffUsers": - err = unpopulate(val, "RampDownForceLogoffUsers", &s.RampDownForceLogoffUsers) - delete(rawMsg, key) - case "rampDownLoadBalancingAlgorithm": - err = unpopulate(val, "RampDownLoadBalancingAlgorithm", &s.RampDownLoadBalancingAlgorithm) - delete(rawMsg, key) - case "rampDownMinimumHostsPct": - err = unpopulate(val, "RampDownMinimumHostsPct", &s.RampDownMinimumHostsPct) - delete(rawMsg, key) - case "rampDownNotificationMessage": - err = unpopulate(val, "RampDownNotificationMessage", &s.RampDownNotificationMessage) - delete(rawMsg, key) - case "rampDownStartTime": - err = unpopulateTimeRFC3339(val, "RampDownStartTime", &s.RampDownStartTime) - delete(rawMsg, key) - case "rampDownStopHostsWhen": - err = unpopulate(val, "RampDownStopHostsWhen", &s.RampDownStopHostsWhen) - delete(rawMsg, key) - case "rampDownWaitTimeMinutes": - err = unpopulate(val, "RampDownWaitTimeMinutes", &s.RampDownWaitTimeMinutes) - delete(rawMsg, key) - case "rampUpCapacityThresholdPct": - err = unpopulate(val, "RampUpCapacityThresholdPct", &s.RampUpCapacityThresholdPct) - delete(rawMsg, key) - case "rampUpLoadBalancingAlgorithm": - err = unpopulate(val, "RampUpLoadBalancingAlgorithm", &s.RampUpLoadBalancingAlgorithm) - delete(rawMsg, key) - case "rampUpMinimumHostsPct": - err = unpopulate(val, "RampUpMinimumHostsPct", &s.RampUpMinimumHostsPct) - delete(rawMsg, key) - case "rampUpStartTime": - err = unpopulateTimeRFC3339(val, "RampUpStartTime", &s.RampUpStartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SessionHostHealthCheckFailureDetails. -func (s SessionHostHealthCheckFailureDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorCode", s.ErrorCode) - populateTimeRFC3339(objectMap, "lastHealthCheckDateTime", s.LastHealthCheckDateTime) - populate(objectMap, "message", s.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostHealthCheckFailureDetails. -func (s *SessionHostHealthCheckFailureDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "errorCode": - err = unpopulate(val, "ErrorCode", &s.ErrorCode) - delete(rawMsg, key) - case "lastHealthCheckDateTime": - err = unpopulateTimeRFC3339(val, "LastHealthCheckDateTime", &s.LastHealthCheckDateTime) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &s.Message) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SessionHostPatch. -func (s SessionHostPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SessionHostProperties. -func (s SessionHostProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentVersion", s.AgentVersion) - populate(objectMap, "allowNewSession", s.AllowNewSession) - populate(objectMap, "assignedUser", s.AssignedUser) - populateTimeRFC3339(objectMap, "lastHeartBeat", s.LastHeartBeat) - populateTimeRFC3339(objectMap, "lastUpdateTime", s.LastUpdateTime) - populate(objectMap, "osVersion", s.OSVersion) - populate(objectMap, "objectId", s.ObjectID) - populate(objectMap, "resourceId", s.ResourceID) - populate(objectMap, "sessionHostHealthCheckResults", s.SessionHostHealthCheckResults) - populate(objectMap, "sessions", s.Sessions) - populate(objectMap, "status", s.Status) - populateTimeRFC3339(objectMap, "statusTimestamp", s.StatusTimestamp) - populate(objectMap, "sxSStackVersion", s.SxSStackVersion) - populate(objectMap, "updateErrorMessage", s.UpdateErrorMessage) - populate(objectMap, "updateState", s.UpdateState) - populate(objectMap, "virtualMachineId", s.VirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SessionHostProperties. -func (s *SessionHostProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentVersion": - err = unpopulate(val, "AgentVersion", &s.AgentVersion) - delete(rawMsg, key) - case "allowNewSession": - err = unpopulate(val, "AllowNewSession", &s.AllowNewSession) - delete(rawMsg, key) - case "assignedUser": - err = unpopulate(val, "AssignedUser", &s.AssignedUser) - delete(rawMsg, key) - case "lastHeartBeat": - err = unpopulateTimeRFC3339(val, "LastHeartBeat", &s.LastHeartBeat) - delete(rawMsg, key) - case "lastUpdateTime": - err = unpopulateTimeRFC3339(val, "LastUpdateTime", &s.LastUpdateTime) - delete(rawMsg, key) - case "osVersion": - err = unpopulate(val, "OSVersion", &s.OSVersion) - delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &s.ObjectID) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &s.ResourceID) - delete(rawMsg, key) - case "sessionHostHealthCheckResults": - err = unpopulate(val, "SessionHostHealthCheckResults", &s.SessionHostHealthCheckResults) - delete(rawMsg, key) - case "sessions": - err = unpopulate(val, "Sessions", &s.Sessions) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) - delete(rawMsg, key) - case "statusTimestamp": - err = unpopulateTimeRFC3339(val, "StatusTimestamp", &s.StatusTimestamp) - delete(rawMsg, key) - case "sxSStackVersion": - err = unpopulate(val, "SxSStackVersion", &s.SxSStackVersion) - delete(rawMsg, key) - case "updateErrorMessage": - err = unpopulate(val, "UpdateErrorMessage", &s.UpdateErrorMessage) - delete(rawMsg, key) - case "updateState": - err = unpopulate(val, "UpdateState", &s.UpdateState) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &s.VirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserSessionProperties. -func (u UserSessionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeDirectoryUserName", u.ActiveDirectoryUserName) - populate(objectMap, "applicationType", u.ApplicationType) - populateTimeRFC3339(objectMap, "createTime", u.CreateTime) - populate(objectMap, "objectId", u.ObjectID) - populate(objectMap, "sessionState", u.SessionState) - populate(objectMap, "userPrincipalName", u.UserPrincipalName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserSessionProperties. -func (u *UserSessionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activeDirectoryUserName": - err = unpopulate(val, "ActiveDirectoryUserName", &u.ActiveDirectoryUserName) - delete(rawMsg, key) - case "applicationType": - err = unpopulate(val, "ApplicationType", &u.ApplicationType) - delete(rawMsg, key) - case "createTime": - err = unpopulateTimeRFC3339(val, "CreateTime", &u.CreateTime) - delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &u.ObjectID) - delete(rawMsg, key) - case "sessionState": - err = unpopulate(val, "SessionState", &u.SessionState) - delete(rawMsg, key) - case "userPrincipalName": - err = unpopulate(val, "UserPrincipalName", &u.UserPrincipalName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Workspace. -func (w Workspace) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", w.Etag) - populate(objectMap, "id", w.ID) - populate(objectMap, "identity", w.Identity) - populate(objectMap, "kind", w.Kind) - populate(objectMap, "location", w.Location) - populate(objectMap, "managedBy", w.ManagedBy) - populate(objectMap, "name", w.Name) - populate(objectMap, "plan", w.Plan) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "sku", w.SKU) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkspacePatch. -func (w WorkspacePatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkspacePatchProperties. -func (w WorkspacePatchProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationGroupReferences", w.ApplicationGroupReferences) - populate(objectMap, "description", w.Description) - populate(objectMap, "friendlyName", w.FriendlyName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties. -func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationGroupReferences", w.ApplicationGroupReferences) - populate(objectMap, "cloudPcResource", w.CloudPcResource) - populate(objectMap, "description", w.Description) - populate(objectMap, "friendlyName", w.FriendlyName) - populate(objectMap, "objectId", w.ObjectID) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func populateByteArray(m map[string]interface{}, k string, b []byte, f runtime.Base64Encoding) { - if azcore.IsNullValue(b) { - m[k] = nil - } else if len(b) == 0 { - return - } else { - m[k] = runtime.EncodeByteArray(b, f) - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_msiximages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_msiximages_client.go deleted file mode 100644 index fa5c9f0d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_msiximages_client.go +++ /dev/null @@ -1,125 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// MsixImagesClient contains the methods for the MsixImages group. -// Don't use this type directly, use NewMsixImagesClient() instead. -type MsixImagesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewMsixImagesClient creates a new instance of MsixImagesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewMsixImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MsixImagesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &MsixImagesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewExpandPager - Expands and Lists MSIX packages in an Image, given the Image Path. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// msixImageURI - Object containing URI to MSIX Image -// options - MsixImagesClientExpandOptions contains the optional parameters for the MsixImagesClient.Expand method. -func (client *MsixImagesClient) NewExpandPager(resourceGroupName string, hostPoolName string, msixImageURI MSIXImageURI, options *MsixImagesClientExpandOptions) *runtime.Pager[MsixImagesClientExpandResponse] { - return runtime.NewPager(runtime.PagingHandler[MsixImagesClientExpandResponse]{ - More: func(page MsixImagesClientExpandResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *MsixImagesClientExpandResponse) (MsixImagesClientExpandResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.expandCreateRequest(ctx, resourceGroupName, hostPoolName, msixImageURI, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return MsixImagesClientExpandResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MsixImagesClientExpandResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MsixImagesClientExpandResponse{}, runtime.NewResponseError(resp) - } - return client.expandHandleResponse(resp) - }, - }) -} - -// expandCreateRequest creates the Expand request. -func (client *MsixImagesClient) expandCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, msixImageURI MSIXImageURI, options *MsixImagesClientExpandOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/expandMsixImage" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, msixImageURI) -} - -// expandHandleResponse handles the Expand response. -func (client *MsixImagesClient) expandHandleResponse(resp *http.Response) (MsixImagesClientExpandResponse, error) { - result := MsixImagesClientExpandResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpandMsixImageList); err != nil { - return MsixImagesClientExpandResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_msixpackages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_msixpackages_client.go deleted file mode 100644 index 877a5696..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_msixpackages_client.go +++ /dev/null @@ -1,364 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// MSIXPackagesClient contains the methods for the MSIXPackages group. -// Don't use this type directly, use NewMSIXPackagesClient() instead. -type MSIXPackagesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewMSIXPackagesClient creates a new instance of MSIXPackagesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewMSIXPackagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MSIXPackagesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &MSIXPackagesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create or update a MSIX package. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool -// msixPackage - Object containing MSIX Package definitions. -// options - MSIXPackagesClientCreateOrUpdateOptions contains the optional parameters for the MSIXPackagesClient.CreateOrUpdate -// method. -func (client *MSIXPackagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, msixPackage MSIXPackage, options *MSIXPackagesClientCreateOrUpdateOptions) (MSIXPackagesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, options) - if err != nil { - return MSIXPackagesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MSIXPackagesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return MSIXPackagesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *MSIXPackagesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, msixPackage MSIXPackage, options *MSIXPackagesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if msixPackageFullName == "" { - return nil, errors.New("parameter msixPackageFullName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{msixPackageFullName}", url.PathEscape(msixPackageFullName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, msixPackage) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *MSIXPackagesClient) createOrUpdateHandleResponse(resp *http.Response) (MSIXPackagesClientCreateOrUpdateResponse, error) { - result := MSIXPackagesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSIXPackage); err != nil { - return MSIXPackagesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Remove an MSIX Package. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool -// options - MSIXPackagesClientDeleteOptions contains the optional parameters for the MSIXPackagesClient.Delete method. -func (client *MSIXPackagesClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientDeleteOptions) (MSIXPackagesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, hostPoolName, msixPackageFullName, options) - if err != nil { - return MSIXPackagesClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MSIXPackagesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return MSIXPackagesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return MSIXPackagesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *MSIXPackagesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if msixPackageFullName == "" { - return nil, errors.New("parameter msixPackageFullName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{msixPackageFullName}", url.PathEscape(msixPackageFullName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a msixpackage. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool -// options - MSIXPackagesClientGetOptions contains the optional parameters for the MSIXPackagesClient.Get method. -func (client *MSIXPackagesClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientGetOptions) (MSIXPackagesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, hostPoolName, msixPackageFullName, options) - if err != nil { - return MSIXPackagesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MSIXPackagesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MSIXPackagesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *MSIXPackagesClient) getCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if msixPackageFullName == "" { - return nil, errors.New("parameter msixPackageFullName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{msixPackageFullName}", url.PathEscape(msixPackageFullName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *MSIXPackagesClient) getHandleResponse(resp *http.Response) (MSIXPackagesClientGetResponse, error) { - result := MSIXPackagesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSIXPackage); err != nil { - return MSIXPackagesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List MSIX packages in hostpool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// options - MSIXPackagesClientListOptions contains the optional parameters for the MSIXPackagesClient.List method. -func (client *MSIXPackagesClient) NewListPager(resourceGroupName string, hostPoolName string, options *MSIXPackagesClientListOptions) *runtime.Pager[MSIXPackagesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[MSIXPackagesClientListResponse]{ - More: func(page MSIXPackagesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *MSIXPackagesClientListResponse) (MSIXPackagesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, hostPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return MSIXPackagesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MSIXPackagesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MSIXPackagesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *MSIXPackagesClient) listCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *MSIXPackagesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *MSIXPackagesClient) listHandleResponse(resp *http.Response) (MSIXPackagesClientListResponse, error) { - result := MSIXPackagesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSIXPackageList); err != nil { - return MSIXPackagesClientListResponse{}, err - } - return result, nil -} - -// Update - Update an MSIX Package. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// msixPackageFullName - The version specific package full name of the MSIX package within specified hostpool -// options - MSIXPackagesClientUpdateOptions contains the optional parameters for the MSIXPackagesClient.Update method. -func (client *MSIXPackagesClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientUpdateOptions) (MSIXPackagesClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, hostPoolName, msixPackageFullName, options) - if err != nil { - return MSIXPackagesClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MSIXPackagesClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MSIXPackagesClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *MSIXPackagesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, msixPackageFullName string, options *MSIXPackagesClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if msixPackageFullName == "" { - return nil, errors.New("parameter msixPackageFullName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{msixPackageFullName}", url.PathEscape(msixPackageFullName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.MsixPackage != nil { - return req, runtime.MarshalAsJSON(req, *options.MsixPackage) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *MSIXPackagesClient) updateHandleResponse(resp *http.Response) (MSIXPackagesClientUpdateResponse, error) { - result := MSIXPackagesClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MSIXPackage); err != nil { - return MSIXPackagesClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_operations_client.go deleted file mode 100644 index dd0f3bbb..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_operations_client.go +++ /dev/null @@ -1,91 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - host string - pl runtime.Pipeline -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// List - List all of the available operations the Desktop Virtualization resource provider supports. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, options) - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.DesktopVirtualization/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceProviderOperationList); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_response_types.go deleted file mode 100644 index cb59d040..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_response_types.go +++ /dev/null @@ -1,269 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -// ApplicationGroupsClientCreateOrUpdateResponse contains the response from method ApplicationGroupsClient.CreateOrUpdate. -type ApplicationGroupsClientCreateOrUpdateResponse struct { - ApplicationGroup -} - -// ApplicationGroupsClientDeleteResponse contains the response from method ApplicationGroupsClient.Delete. -type ApplicationGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// ApplicationGroupsClientGetResponse contains the response from method ApplicationGroupsClient.Get. -type ApplicationGroupsClientGetResponse struct { - ApplicationGroup -} - -// ApplicationGroupsClientListByResourceGroupResponse contains the response from method ApplicationGroupsClient.ListByResourceGroup. -type ApplicationGroupsClientListByResourceGroupResponse struct { - ApplicationGroupList -} - -// ApplicationGroupsClientListBySubscriptionResponse contains the response from method ApplicationGroupsClient.ListBySubscription. -type ApplicationGroupsClientListBySubscriptionResponse struct { - ApplicationGroupList -} - -// ApplicationGroupsClientUpdateResponse contains the response from method ApplicationGroupsClient.Update. -type ApplicationGroupsClientUpdateResponse struct { - ApplicationGroup -} - -// ApplicationsClientCreateOrUpdateResponse contains the response from method ApplicationsClient.CreateOrUpdate. -type ApplicationsClientCreateOrUpdateResponse struct { - Application -} - -// ApplicationsClientDeleteResponse contains the response from method ApplicationsClient.Delete. -type ApplicationsClientDeleteResponse struct { - // placeholder for future response values -} - -// ApplicationsClientGetResponse contains the response from method ApplicationsClient.Get. -type ApplicationsClientGetResponse struct { - Application -} - -// ApplicationsClientListResponse contains the response from method ApplicationsClient.List. -type ApplicationsClientListResponse struct { - ApplicationList -} - -// ApplicationsClientUpdateResponse contains the response from method ApplicationsClient.Update. -type ApplicationsClientUpdateResponse struct { - Application -} - -// DesktopsClientGetResponse contains the response from method DesktopsClient.Get. -type DesktopsClientGetResponse struct { - Desktop -} - -// DesktopsClientListResponse contains the response from method DesktopsClient.List. -type DesktopsClientListResponse struct { - DesktopList -} - -// DesktopsClientUpdateResponse contains the response from method DesktopsClient.Update. -type DesktopsClientUpdateResponse struct { - Desktop -} - -// HostPoolsClientCreateOrUpdateResponse contains the response from method HostPoolsClient.CreateOrUpdate. -type HostPoolsClientCreateOrUpdateResponse struct { - HostPool -} - -// HostPoolsClientDeleteResponse contains the response from method HostPoolsClient.Delete. -type HostPoolsClientDeleteResponse struct { - // placeholder for future response values -} - -// HostPoolsClientGetResponse contains the response from method HostPoolsClient.Get. -type HostPoolsClientGetResponse struct { - HostPool -} - -// HostPoolsClientListByResourceGroupResponse contains the response from method HostPoolsClient.ListByResourceGroup. -type HostPoolsClientListByResourceGroupResponse struct { - HostPoolList -} - -// HostPoolsClientListResponse contains the response from method HostPoolsClient.List. -type HostPoolsClientListResponse struct { - HostPoolList -} - -// HostPoolsClientRetrieveRegistrationTokenResponse contains the response from method HostPoolsClient.RetrieveRegistrationToken. -type HostPoolsClientRetrieveRegistrationTokenResponse struct { - RegistrationInfo -} - -// HostPoolsClientUpdateResponse contains the response from method HostPoolsClient.Update. -type HostPoolsClientUpdateResponse struct { - HostPool -} - -// MSIXPackagesClientCreateOrUpdateResponse contains the response from method MSIXPackagesClient.CreateOrUpdate. -type MSIXPackagesClientCreateOrUpdateResponse struct { - MSIXPackage -} - -// MSIXPackagesClientDeleteResponse contains the response from method MSIXPackagesClient.Delete. -type MSIXPackagesClientDeleteResponse struct { - // placeholder for future response values -} - -// MSIXPackagesClientGetResponse contains the response from method MSIXPackagesClient.Get. -type MSIXPackagesClientGetResponse struct { - MSIXPackage -} - -// MSIXPackagesClientListResponse contains the response from method MSIXPackagesClient.List. -type MSIXPackagesClientListResponse struct { - MSIXPackageList -} - -// MSIXPackagesClientUpdateResponse contains the response from method MSIXPackagesClient.Update. -type MSIXPackagesClientUpdateResponse struct { - MSIXPackage -} - -// MsixImagesClientExpandResponse contains the response from method MsixImagesClient.Expand. -type MsixImagesClientExpandResponse struct { - ExpandMsixImageList -} - -// OperationsClientListResponse contains the response from method OperationsClient.List. -type OperationsClientListResponse struct { - ResourceProviderOperationList -} - -// ScalingPlansClientCreateResponse contains the response from method ScalingPlansClient.Create. -type ScalingPlansClientCreateResponse struct { - ScalingPlan -} - -// ScalingPlansClientDeleteResponse contains the response from method ScalingPlansClient.Delete. -type ScalingPlansClientDeleteResponse struct { - // placeholder for future response values -} - -// ScalingPlansClientGetResponse contains the response from method ScalingPlansClient.Get. -type ScalingPlansClientGetResponse struct { - ScalingPlan -} - -// ScalingPlansClientListByHostPoolResponse contains the response from method ScalingPlansClient.ListByHostPool. -type ScalingPlansClientListByHostPoolResponse struct { - ScalingPlanList -} - -// ScalingPlansClientListByResourceGroupResponse contains the response from method ScalingPlansClient.ListByResourceGroup. -type ScalingPlansClientListByResourceGroupResponse struct { - ScalingPlanList -} - -// ScalingPlansClientListBySubscriptionResponse contains the response from method ScalingPlansClient.ListBySubscription. -type ScalingPlansClientListBySubscriptionResponse struct { - ScalingPlanList -} - -// ScalingPlansClientUpdateResponse contains the response from method ScalingPlansClient.Update. -type ScalingPlansClientUpdateResponse struct { - ScalingPlan -} - -// SessionHostsClientDeleteResponse contains the response from method SessionHostsClient.Delete. -type SessionHostsClientDeleteResponse struct { - // placeholder for future response values -} - -// SessionHostsClientGetResponse contains the response from method SessionHostsClient.Get. -type SessionHostsClientGetResponse struct { - SessionHost -} - -// SessionHostsClientListResponse contains the response from method SessionHostsClient.List. -type SessionHostsClientListResponse struct { - SessionHostList -} - -// SessionHostsClientUpdateResponse contains the response from method SessionHostsClient.Update. -type SessionHostsClientUpdateResponse struct { - SessionHost -} - -// StartMenuItemsClientListResponse contains the response from method StartMenuItemsClient.List. -type StartMenuItemsClientListResponse struct { - StartMenuItemList -} - -// UserSessionsClientDeleteResponse contains the response from method UserSessionsClient.Delete. -type UserSessionsClientDeleteResponse struct { - // placeholder for future response values -} - -// UserSessionsClientDisconnectResponse contains the response from method UserSessionsClient.Disconnect. -type UserSessionsClientDisconnectResponse struct { - // placeholder for future response values -} - -// UserSessionsClientGetResponse contains the response from method UserSessionsClient.Get. -type UserSessionsClientGetResponse struct { - UserSession -} - -// UserSessionsClientListByHostPoolResponse contains the response from method UserSessionsClient.ListByHostPool. -type UserSessionsClientListByHostPoolResponse struct { - UserSessionList -} - -// UserSessionsClientListResponse contains the response from method UserSessionsClient.List. -type UserSessionsClientListResponse struct { - UserSessionList -} - -// UserSessionsClientSendMessageResponse contains the response from method UserSessionsClient.SendMessage. -type UserSessionsClientSendMessageResponse struct { - // placeholder for future response values -} - -// WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.CreateOrUpdate. -type WorkspacesClientCreateOrUpdateResponse struct { - Workspace -} - -// WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.Delete. -type WorkspacesClientDeleteResponse struct { - // placeholder for future response values -} - -// WorkspacesClientGetResponse contains the response from method WorkspacesClient.Get. -type WorkspacesClientGetResponse struct { - Workspace -} - -// WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.ListByResourceGroup. -type WorkspacesClientListByResourceGroupResponse struct { - WorkspaceList -} - -// WorkspacesClientListBySubscriptionResponse contains the response from method WorkspacesClient.ListBySubscription. -type WorkspacesClientListBySubscriptionResponse struct { - WorkspaceList -} - -// WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.Update. -type WorkspacesClientUpdateResponse struct { - Workspace -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_scalingplans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_scalingplans_client.go deleted file mode 100644 index f10508d4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_scalingplans_client.go +++ /dev/null @@ -1,469 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ScalingPlansClient contains the methods for the ScalingPlans group. -// Don't use this type directly, use NewScalingPlansClient() instead. -type ScalingPlansClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewScalingPlansClient creates a new instance of ScalingPlansClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewScalingPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScalingPlansClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ScalingPlansClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Create - Create or update a scaling plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scalingPlanName - The name of the scaling plan. -// scalingPlan - Object containing scaling plan definitions. -// options - ScalingPlansClientCreateOptions contains the optional parameters for the ScalingPlansClient.Create method. -func (client *ScalingPlansClient) Create(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlan ScalingPlan, options *ScalingPlansClientCreateOptions) (ScalingPlansClientCreateResponse, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, scalingPlanName, scalingPlan, options) - if err != nil { - return ScalingPlansClientCreateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScalingPlansClientCreateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ScalingPlansClientCreateResponse{}, runtime.NewResponseError(resp) - } - return client.createHandleResponse(resp) -} - -// createCreateRequest creates the Create request. -func (client *ScalingPlansClient) createCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, scalingPlan ScalingPlan, options *ScalingPlansClientCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scalingPlanName == "" { - return nil, errors.New("parameter scalingPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, scalingPlan) -} - -// createHandleResponse handles the Create response. -func (client *ScalingPlansClient) createHandleResponse(resp *http.Response) (ScalingPlansClientCreateResponse, error) { - result := ScalingPlansClientCreateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlan); err != nil { - return ScalingPlansClientCreateResponse{}, err - } - return result, nil -} - -// Delete - Remove a scaling plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scalingPlanName - The name of the scaling plan. -// options - ScalingPlansClientDeleteOptions contains the optional parameters for the ScalingPlansClient.Delete method. -func (client *ScalingPlansClient) Delete(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientDeleteOptions) (ScalingPlansClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, scalingPlanName, options) - if err != nil { - return ScalingPlansClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScalingPlansClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ScalingPlansClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ScalingPlansClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ScalingPlansClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scalingPlanName == "" { - return nil, errors.New("parameter scalingPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a scaling plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scalingPlanName - The name of the scaling plan. -// options - ScalingPlansClientGetOptions contains the optional parameters for the ScalingPlansClient.Get method. -func (client *ScalingPlansClient) Get(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientGetOptions) (ScalingPlansClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, scalingPlanName, options) - if err != nil { - return ScalingPlansClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScalingPlansClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScalingPlansClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ScalingPlansClient) getCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scalingPlanName == "" { - return nil, errors.New("parameter scalingPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ScalingPlansClient) getHandleResponse(resp *http.Response) (ScalingPlansClientGetResponse, error) { - result := ScalingPlansClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlan); err != nil { - return ScalingPlansClientGetResponse{}, err - } - return result, nil -} - -// NewListByHostPoolPager - List scaling plan associated with hostpool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// options - ScalingPlansClientListByHostPoolOptions contains the optional parameters for the ScalingPlansClient.ListByHostPool -// method. -func (client *ScalingPlansClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *ScalingPlansClientListByHostPoolOptions) *runtime.Pager[ScalingPlansClientListByHostPoolResponse] { - return runtime.NewPager(runtime.PagingHandler[ScalingPlansClientListByHostPoolResponse]{ - More: func(page ScalingPlansClientListByHostPoolResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ScalingPlansClientListByHostPoolResponse) (ScalingPlansClientListByHostPoolResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByHostPoolCreateRequest(ctx, resourceGroupName, hostPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ScalingPlansClientListByHostPoolResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScalingPlansClientListByHostPoolResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScalingPlansClientListByHostPoolResponse{}, runtime.NewResponseError(resp) - } - return client.listByHostPoolHandleResponse(resp) - }, - }) -} - -// listByHostPoolCreateRequest creates the ListByHostPool request. -func (client *ScalingPlansClient) listByHostPoolCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *ScalingPlansClientListByHostPoolOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/scalingPlans" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByHostPoolHandleResponse handles the ListByHostPool response. -func (client *ScalingPlansClient) listByHostPoolHandleResponse(resp *http.Response) (ScalingPlansClientListByHostPoolResponse, error) { - result := ScalingPlansClientListByHostPoolResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanList); err != nil { - return ScalingPlansClientListByHostPoolResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List scaling plans. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - ScalingPlansClientListByResourceGroupOptions contains the optional parameters for the ScalingPlansClient.ListByResourceGroup -// method. -func (client *ScalingPlansClient) NewListByResourceGroupPager(resourceGroupName string, options *ScalingPlansClientListByResourceGroupOptions) *runtime.Pager[ScalingPlansClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ScalingPlansClientListByResourceGroupResponse]{ - More: func(page ScalingPlansClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ScalingPlansClientListByResourceGroupResponse) (ScalingPlansClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ScalingPlansClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScalingPlansClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScalingPlansClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ScalingPlansClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ScalingPlansClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ScalingPlansClient) listByResourceGroupHandleResponse(resp *http.Response) (ScalingPlansClientListByResourceGroupResponse, error) { - result := ScalingPlansClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanList); err != nil { - return ScalingPlansClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - List scaling plans in subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// options - ScalingPlansClientListBySubscriptionOptions contains the optional parameters for the ScalingPlansClient.ListBySubscription -// method. -func (client *ScalingPlansClient) NewListBySubscriptionPager(options *ScalingPlansClientListBySubscriptionOptions) *runtime.Pager[ScalingPlansClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[ScalingPlansClientListBySubscriptionResponse]{ - More: func(page ScalingPlansClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ScalingPlansClientListBySubscriptionResponse) (ScalingPlansClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ScalingPlansClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScalingPlansClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScalingPlansClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ScalingPlansClient) listBySubscriptionCreateRequest(ctx context.Context, options *ScalingPlansClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/scalingPlans" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *ScalingPlansClient) listBySubscriptionHandleResponse(resp *http.Response) (ScalingPlansClientListBySubscriptionResponse, error) { - result := ScalingPlansClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlanList); err != nil { - return ScalingPlansClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Update a scaling plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scalingPlanName - The name of the scaling plan. -// options - ScalingPlansClientUpdateOptions contains the optional parameters for the ScalingPlansClient.Update method. -func (client *ScalingPlansClient) Update(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientUpdateOptions) (ScalingPlansClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, scalingPlanName, options) - if err != nil { - return ScalingPlansClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScalingPlansClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScalingPlansClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *ScalingPlansClient) updateCreateRequest(ctx context.Context, resourceGroupName string, scalingPlanName string, options *ScalingPlansClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scalingPlanName == "" { - return nil, errors.New("parameter scalingPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scalingPlanName}", url.PathEscape(scalingPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.ScalingPlan != nil { - return req, runtime.MarshalAsJSON(req, *options.ScalingPlan) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *ScalingPlansClient) updateHandleResponse(resp *http.Response) (ScalingPlansClientUpdateResponse, error) { - result := ScalingPlansClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScalingPlan); err != nil { - return ScalingPlansClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_sessionhosts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_sessionhosts_client.go deleted file mode 100644 index be86fcc3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_sessionhosts_client.go +++ /dev/null @@ -1,305 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// SessionHostsClient contains the methods for the SessionHosts group. -// Don't use this type directly, use NewSessionHostsClient() instead. -type SessionHostsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSessionHostsClient creates a new instance of SessionHostsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSessionHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SessionHostsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SessionHostsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Delete - Remove a SessionHost. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// sessionHostName - The name of the session host within the specified host pool -// options - SessionHostsClientDeleteOptions contains the optional parameters for the SessionHostsClient.Delete method. -func (client *SessionHostsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientDeleteOptions) (SessionHostsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, options) - if err != nil { - return SessionHostsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SessionHostsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SessionHostsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return SessionHostsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *SessionHostsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if sessionHostName == "" { - return nil, errors.New("parameter sessionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - if options != nil && options.Force != nil { - reqQP.Set("force", strconv.FormatBool(*options.Force)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a session host. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// sessionHostName - The name of the session host within the specified host pool -// options - SessionHostsClientGetOptions contains the optional parameters for the SessionHostsClient.Get method. -func (client *SessionHostsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientGetOptions) (SessionHostsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, options) - if err != nil { - return SessionHostsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SessionHostsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SessionHostsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SessionHostsClient) getCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if sessionHostName == "" { - return nil, errors.New("parameter sessionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SessionHostsClient) getHandleResponse(resp *http.Response) (SessionHostsClientGetResponse, error) { - result := SessionHostsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SessionHost); err != nil { - return SessionHostsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List sessionHosts. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// options - SessionHostsClientListOptions contains the optional parameters for the SessionHostsClient.List method. -func (client *SessionHostsClient) NewListPager(resourceGroupName string, hostPoolName string, options *SessionHostsClientListOptions) *runtime.Pager[SessionHostsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SessionHostsClientListResponse]{ - More: func(page SessionHostsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SessionHostsClientListResponse) (SessionHostsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, hostPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SessionHostsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SessionHostsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SessionHostsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SessionHostsClient) listCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *SessionHostsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SessionHostsClient) listHandleResponse(resp *http.Response) (SessionHostsClientListResponse, error) { - result := SessionHostsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SessionHostList); err != nil { - return SessionHostsClientListResponse{}, err - } - return result, nil -} - -// Update - Update a session host. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// sessionHostName - The name of the session host within the specified host pool -// options - SessionHostsClientUpdateOptions contains the optional parameters for the SessionHostsClient.Update method. -func (client *SessionHostsClient) Update(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientUpdateOptions) (SessionHostsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, options) - if err != nil { - return SessionHostsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SessionHostsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SessionHostsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *SessionHostsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *SessionHostsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if sessionHostName == "" { - return nil, errors.New("parameter sessionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.SessionHost != nil { - return req, runtime.MarshalAsJSON(req, *options.SessionHost) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *SessionHostsClient) updateHandleResponse(resp *http.Response) (SessionHostsClientUpdateResponse, error) { - result := SessionHostsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SessionHost); err != nil { - return SessionHostsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_startmenuitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_startmenuitems_client.go deleted file mode 100644 index 4991d11a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_startmenuitems_client.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// StartMenuItemsClient contains the methods for the StartMenuItems group. -// Don't use this type directly, use NewStartMenuItemsClient() instead. -type StartMenuItemsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewStartMenuItemsClient creates a new instance of StartMenuItemsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewStartMenuItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StartMenuItemsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &StartMenuItemsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - List start menu items in the given application group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// applicationGroupName - The name of the application group -// options - StartMenuItemsClientListOptions contains the optional parameters for the StartMenuItemsClient.List method. -func (client *StartMenuItemsClient) NewListPager(resourceGroupName string, applicationGroupName string, options *StartMenuItemsClientListOptions) *runtime.Pager[StartMenuItemsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[StartMenuItemsClientListResponse]{ - More: func(page StartMenuItemsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StartMenuItemsClientListResponse) (StartMenuItemsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, applicationGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StartMenuItemsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StartMenuItemsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StartMenuItemsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *StartMenuItemsClient) listCreateRequest(ctx context.Context, resourceGroupName string, applicationGroupName string, options *StartMenuItemsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/startMenuItems" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGroupName == "" { - return nil, errors.New("parameter applicationGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGroupName}", url.PathEscape(applicationGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *StartMenuItemsClient) listHandleResponse(resp *http.Response) (StartMenuItemsClientListResponse, error) { - result := StartMenuItemsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StartMenuItemList); err != nil { - return StartMenuItemsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_time_rfc3339.go deleted file mode 100644 index e9034579..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_time_rfc3339.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_usersessions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_usersessions_client.go deleted file mode 100644 index d14e2bd5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_usersessions_client.go +++ /dev/null @@ -1,447 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// UserSessionsClient contains the methods for the UserSessions group. -// Don't use this type directly, use NewUserSessionsClient() instead. -type UserSessionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewUserSessionsClient creates a new instance of UserSessionsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewUserSessionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserSessionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &UserSessionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Delete - Remove a userSession. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// sessionHostName - The name of the session host within the specified host pool -// userSessionID - The name of the user session within the specified session host -// options - UserSessionsClientDeleteOptions contains the optional parameters for the UserSessionsClient.Delete method. -func (client *UserSessionsClient) Delete(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDeleteOptions) (UserSessionsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, userSessionID, options) - if err != nil { - return UserSessionsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return UserSessionsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return UserSessionsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return UserSessionsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *UserSessionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if sessionHostName == "" { - return nil, errors.New("parameter sessionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) - if userSessionID == "" { - return nil, errors.New("parameter userSessionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userSessionId}", url.PathEscape(userSessionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - if options != nil && options.Force != nil { - reqQP.Set("force", strconv.FormatBool(*options.Force)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Disconnect - Disconnect a userSession. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// sessionHostName - The name of the session host within the specified host pool -// userSessionID - The name of the user session within the specified session host -// options - UserSessionsClientDisconnectOptions contains the optional parameters for the UserSessionsClient.Disconnect method. -func (client *UserSessionsClient) Disconnect(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDisconnectOptions) (UserSessionsClientDisconnectResponse, error) { - req, err := client.disconnectCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, userSessionID, options) - if err != nil { - return UserSessionsClientDisconnectResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return UserSessionsClientDisconnectResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserSessionsClientDisconnectResponse{}, runtime.NewResponseError(resp) - } - return UserSessionsClientDisconnectResponse{}, nil -} - -// disconnectCreateRequest creates the Disconnect request. -func (client *UserSessionsClient) disconnectCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientDisconnectOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/disconnect" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if sessionHostName == "" { - return nil, errors.New("parameter sessionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) - if userSessionID == "" { - return nil, errors.New("parameter userSessionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userSessionId}", url.PathEscape(userSessionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a userSession. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// sessionHostName - The name of the session host within the specified host pool -// userSessionID - The name of the user session within the specified session host -// options - UserSessionsClientGetOptions contains the optional parameters for the UserSessionsClient.Get method. -func (client *UserSessionsClient) Get(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientGetOptions) (UserSessionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, userSessionID, options) - if err != nil { - return UserSessionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return UserSessionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserSessionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *UserSessionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if sessionHostName == "" { - return nil, errors.New("parameter sessionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) - if userSessionID == "" { - return nil, errors.New("parameter userSessionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userSessionId}", url.PathEscape(userSessionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *UserSessionsClient) getHandleResponse(resp *http.Response) (UserSessionsClientGetResponse, error) { - result := UserSessionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UserSession); err != nil { - return UserSessionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List userSessions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// sessionHostName - The name of the session host within the specified host pool -// options - UserSessionsClientListOptions contains the optional parameters for the UserSessionsClient.List method. -func (client *UserSessionsClient) NewListPager(resourceGroupName string, hostPoolName string, sessionHostName string, options *UserSessionsClientListOptions) *runtime.Pager[UserSessionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[UserSessionsClientListResponse]{ - More: func(page UserSessionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *UserSessionsClientListResponse) (UserSessionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return UserSessionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return UserSessionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserSessionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *UserSessionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, options *UserSessionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if sessionHostName == "" { - return nil, errors.New("parameter sessionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *UserSessionsClient) listHandleResponse(resp *http.Response) (UserSessionsClientListResponse, error) { - result := UserSessionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UserSessionList); err != nil { - return UserSessionsClientListResponse{}, err - } - return result, nil -} - -// NewListByHostPoolPager - List userSessions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// options - UserSessionsClientListByHostPoolOptions contains the optional parameters for the UserSessionsClient.ListByHostPool -// method. -func (client *UserSessionsClient) NewListByHostPoolPager(resourceGroupName string, hostPoolName string, options *UserSessionsClientListByHostPoolOptions) *runtime.Pager[UserSessionsClientListByHostPoolResponse] { - return runtime.NewPager(runtime.PagingHandler[UserSessionsClientListByHostPoolResponse]{ - More: func(page UserSessionsClientListByHostPoolResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *UserSessionsClientListByHostPoolResponse) (UserSessionsClientListByHostPoolResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByHostPoolCreateRequest(ctx, resourceGroupName, hostPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return UserSessionsClientListByHostPoolResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return UserSessionsClientListByHostPoolResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserSessionsClientListByHostPoolResponse{}, runtime.NewResponseError(resp) - } - return client.listByHostPoolHandleResponse(resp) - }, - }) -} - -// listByHostPoolCreateRequest creates the ListByHostPool request. -func (client *UserSessionsClient) listByHostPoolCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, options *UserSessionsClientListByHostPoolOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/userSessions" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByHostPoolHandleResponse handles the ListByHostPool response. -func (client *UserSessionsClient) listByHostPoolHandleResponse(resp *http.Response) (UserSessionsClientListByHostPoolResponse, error) { - result := UserSessionsClientListByHostPoolResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UserSessionList); err != nil { - return UserSessionsClientListByHostPoolResponse{}, err - } - return result, nil -} - -// SendMessage - Send a message to a user. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// hostPoolName - The name of the host pool within the specified resource group -// sessionHostName - The name of the session host within the specified host pool -// userSessionID - The name of the user session within the specified session host -// options - UserSessionsClientSendMessageOptions contains the optional parameters for the UserSessionsClient.SendMessage -// method. -func (client *UserSessionsClient) SendMessage(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientSendMessageOptions) (UserSessionsClientSendMessageResponse, error) { - req, err := client.sendMessageCreateRequest(ctx, resourceGroupName, hostPoolName, sessionHostName, userSessionID, options) - if err != nil { - return UserSessionsClientSendMessageResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return UserSessionsClientSendMessageResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UserSessionsClientSendMessageResponse{}, runtime.NewResponseError(resp) - } - return UserSessionsClientSendMessageResponse{}, nil -} - -// sendMessageCreateRequest creates the SendMessage request. -func (client *UserSessionsClient) sendMessageCreateRequest(ctx context.Context, resourceGroupName string, hostPoolName string, sessionHostName string, userSessionID string, options *UserSessionsClientSendMessageOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/sendMessage" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hostPoolName == "" { - return nil, errors.New("parameter hostPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hostPoolName}", url.PathEscape(hostPoolName)) - if sessionHostName == "" { - return nil, errors.New("parameter sessionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{sessionHostName}", url.PathEscape(sessionHostName)) - if userSessionID == "" { - return nil, errors.New("parameter userSessionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{userSessionId}", url.PathEscape(userSessionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.SendMessage != nil { - return req, runtime.MarshalAsJSON(req, *options.SendMessage) - } - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_workspaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_workspaces_client.go deleted file mode 100644 index ea3455ef..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/zz_generated_workspaces_client.go +++ /dev/null @@ -1,400 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdesktopvirtualization - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// WorkspacesClient contains the methods for the Workspaces group. -// Don't use this type directly, use NewWorkspacesClient() instead. -type WorkspacesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewWorkspacesClient creates a new instance of WorkspacesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &WorkspacesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create or update a workspace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace -// workspace - Object containing Workspace definitions. -// options - WorkspacesClientCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.CreateOrUpdate -// method. -func (client *WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, workspace Workspace, options *WorkspacesClientCreateOrUpdateOptions) (WorkspacesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, workspace, options) - if err != nil { - return WorkspacesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WorkspacesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WorkspacesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, workspace Workspace, options *WorkspacesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if workspaceName == "" { - return nil, errors.New("parameter workspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workspace) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *WorkspacesClient) createOrUpdateHandleResponse(resp *http.Response) (WorkspacesClientCreateOrUpdateResponse, error) { - result := WorkspacesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Workspace); err != nil { - return WorkspacesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Remove a workspace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace -// options - WorkspacesClientDeleteOptions contains the optional parameters for the WorkspacesClient.Delete method. -func (client *WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientDeleteOptions) (WorkspacesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, options) - if err != nil { - return WorkspacesClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WorkspacesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WorkspacesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return WorkspacesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if workspaceName == "" { - return nil, errors.New("parameter workspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a workspace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace -// options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. -func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, options) - if err != nil { - return WorkspacesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WorkspacesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspacesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if workspaceName == "" { - return nil, errors.New("parameter workspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (WorkspacesClientGetResponse, error) { - result := WorkspacesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Workspace); err != nil { - return WorkspacesClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List workspaces. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup -// method. -func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListByResourceGroupResponse]{ - More: func(page WorkspacesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WorkspacesClientListByResourceGroupResponse) (WorkspacesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WorkspacesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WorkspacesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspacesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Response) (WorkspacesClientListByResourceGroupResponse, error) { - result := WorkspacesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceList); err != nil { - return WorkspacesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - List workspaces in subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.ListBySubscription -// method. -func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListBySubscriptionResponse]{ - More: func(page WorkspacesClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WorkspacesClientListBySubscriptionResponse) (WorkspacesClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WorkspacesClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WorkspacesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspacesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *WorkspacesClient) listBySubscriptionCreateRequest(ctx context.Context, options *WorkspacesClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/workspaces" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *WorkspacesClient) listBySubscriptionHandleResponse(resp *http.Response) (WorkspacesClientListBySubscriptionResponse, error) { - result := WorkspacesClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceList); err != nil { - return WorkspacesClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Update a workspace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-07-12 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - The name of the workspace -// options - WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method. -func (client *WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientUpdateOptions) (WorkspacesClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, options) - if err != nil { - return WorkspacesClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WorkspacesClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkspacesClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if workspaceName == "" { - return nil, errors.New("parameter workspaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-07-12") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Workspace != nil { - return req, runtime.MarshalAsJSON(req, *options.Workspace) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *WorkspacesClient) updateHandleResponse(resp *http.Response) (WorkspacesClientUpdateResponse, error) { - result := WorkspacesClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Workspace); err != nil { - return WorkspacesClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/CHANGELOG.md deleted file mode 100644 index 315745e4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/CHANGELOG.md +++ /dev/null @@ -1,86 +0,0 @@ -# Release History - -## 1.3.1 (2023-04-14) -### Bug Fixes - -- Fix serialization bug of empty value of `any` type. - - -## 1.3.0 (2023-03-31) -### Features Added - -- New struct `ClientFactory` which is a client factory used to create any client in this module - - -## 1.2.0 (2023-02-24) -### Features Added - -- New value `AzureSKUNameStandardL32AsV3`, `AzureSKUNameStandardL32SV3` added to type alias `AzureSKUName` -- New value `DataConnectionKindCosmosDb` added to type alias `DataConnectionKind` -- New value `ProvisioningStateCanceled` added to type alias `ProvisioningState` -- New type alias `LanguageExtensionImageName` with values `LanguageExtensionImageNamePython3108`, `LanguageExtensionImageNamePython365`, `LanguageExtensionImageNamePython3912`, `LanguageExtensionImageNamePython3912IncludeDeepLearning`, `LanguageExtensionImageNameR` -- New function `*CosmosDbDataConnection.GetDataConnection() *DataConnection` -- New function `NewSKUsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SKUsClient, error)` -- New function `*SKUsClient.NewListPager(string, *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]` -- New struct `CosmosDbDataConnection` -- New struct `CosmosDbDataConnectionProperties` -- New struct `ResourceSKUCapabilities` -- New struct `ResourceSKUZoneDetails` -- New struct `SKUsClient` -- New struct `SKUsClientListResponse` -- New field `LanguageExtensionImageName` in struct `LanguageExtension` -- New field `ZoneDetails` in struct `SKULocationInfoItem` -- New field `FunctionsToExclude` in struct `TableLevelSharingProperties` -- New field `FunctionsToInclude` in struct `TableLevelSharingProperties` - - -## 1.1.0 (2022-09-15) -### Features Added - -- New const `AzureSKUNameStandardEC8AsV51TBPS` -- New const `AzureSKUNameStandardEC8AdsV5` -- New const `AzureSKUNameStandardL8AsV3` -- New const `AzureSKUNameStandardL8SV3` -- New const `AzureSKUNameStandardE8DV5` -- New const `AzureSKUNameStandardE16DV4` -- New const `AzureSKUNameStandardL16AsV3` -- New const `AzureSKUNameStandardEC16AsV54TBPS` -- New const `AzureSKUNameStandardEC16AsV53TBPS` -- New const `AzureSKUNameStandardE8DV4` -- New const `DatabaseShareOriginDirect` -- New const `AzureSKUNameStandardE2DV4` -- New const `AzureSKUNameStandardE2DV5` -- New const `AzureSKUNameStandardL16SV3` -- New const `DatabaseShareOriginDataShare` -- New const `AzureSKUNameStandardE16DV5` -- New const `CallerRoleAdmin` -- New const `DatabaseShareOriginOther` -- New const `AzureSKUNameStandardEC8AsV52TBPS` -- New const `AzureSKUNameStandardE4DV4` -- New const `AzureSKUNameStandardEC16AdsV5` -- New const `CallerRoleNone` -- New const `AzureSKUNameStandardE4DV5` -- New type alias `CallerRole` -- New type alias `DatabaseShareOrigin` -- New function `PossibleDatabaseShareOriginValues() []DatabaseShareOrigin` -- New function `PossibleCallerRoleValues() []CallerRole` -- New field `CallerRole` in struct `DatabasesClientBeginCreateOrUpdateOptions` -- New field `DatabaseShareOrigin` in struct `FollowerDatabaseDefinition` -- New field `TableLevelSharingProperties` in struct `FollowerDatabaseDefinition` -- New field `DatabaseNameOverride` in struct `AttachedDatabaseConfigurationProperties` -- New field `DatabaseNamePrefix` in struct `AttachedDatabaseConfigurationProperties` -- New field `OriginalDatabaseName` in struct `ReadOnlyFollowingDatabaseProperties` -- New field `TableLevelSharingProperties` in struct `ReadOnlyFollowingDatabaseProperties` -- New field `DatabaseShareOrigin` in struct `ReadOnlyFollowingDatabaseProperties` -- New field `RetrievalStartDate` in struct `IotHubConnectionProperties` -- New field `RetrievalStartDate` in struct `EventHubConnectionProperties` -- New field `CallerRole` in struct `DatabasesClientBeginUpdateOptions` - - -## 1.0.0 (2022-05-17) - -The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. - -To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). - -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/README.md deleted file mode 100644 index 8a043a06..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Azure Kusto Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto) - -The `armkusto` module provides operations for working with Azure Kusto. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/kusto/armkusto) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Kusto module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Kusto. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Client Factory - -Azure Kusto module consists of one or more clients. We provide a client factory which could be used to create any client in this module. - -```go -clientFactory, err := armkusto.NewClientFactory(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -clientFactory, err := armkusto.NewClientFactory(, cred, &options) -``` - -## Clients - -A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. - -```go -client := clientFactory.NewDatabasesClient() -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Kusto` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/autorest.md deleted file mode 100644 index 65014577..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/autorest.md +++ /dev/null @@ -1,12 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/630ec444f8dd7c09b9cdd5fa99951f8a0d1ad41f/specification/azure-kusto/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.3.1 -``` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/ci.yml deleted file mode 100644 index a6102992..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/kusto/armkusto/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/kusto/armkusto/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/kusto/armkusto' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/client_factory.go deleted file mode 100644 index 8c6e17fc..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/client_factory.go +++ /dev/null @@ -1,110 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import ( - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" -) - -// ClientFactory is a client factory used to create any client in this module. -// Don't use this type directly, use NewClientFactory instead. -type ClientFactory struct { - subscriptionID string - credential azcore.TokenCredential - options *arm.ClientOptions -} - -// NewClientFactory creates a new instance of ClientFactory with the specified values. -// The parameter values will be propagated to any client created from this factory. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) - if err != nil { - return nil, err - } - return &ClientFactory{ - subscriptionID: subscriptionID, credential: credential, - options: options.Clone(), - }, nil -} - -func (c *ClientFactory) NewClustersClient() *ClustersClient { - subClient, _ := NewClustersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewClusterPrincipalAssignmentsClient() *ClusterPrincipalAssignmentsClient { - subClient, _ := NewClusterPrincipalAssignmentsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewSKUsClient() *SKUsClient { - subClient, _ := NewSKUsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewDatabasesClient() *DatabasesClient { - subClient, _ := NewDatabasesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAttachedDatabaseConfigurationsClient() *AttachedDatabaseConfigurationsClient { - subClient, _ := NewAttachedDatabaseConfigurationsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewManagedPrivateEndpointsClient() *ManagedPrivateEndpointsClient { - subClient, _ := NewManagedPrivateEndpointsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewDatabasePrincipalAssignmentsClient() *DatabasePrincipalAssignmentsClient { - subClient, _ := NewDatabasePrincipalAssignmentsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewScriptsClient() *ScriptsClient { - subClient, _ := NewScriptsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewDataConnectionsClient() *DataConnectionsClient { - subClient, _ := NewDataConnectionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOperationsResultsClient() *OperationsResultsClient { - subClient, _ := NewOperationsResultsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewOperationsResultsLocationClient() *OperationsResultsLocationClient { - subClient, _ := NewOperationsResultsLocationClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/clusters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/clusters_client.go deleted file mode 100644 index 0b393ebd..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/clusters_client.go +++ /dev/null @@ -1,1184 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ClustersClient contains the methods for the Clusters group. -// Don't use this type directly, use NewClustersClient() instead. -type ClustersClient struct { - internal *arm.Client - subscriptionID string -} - -// NewClustersClient creates a new instance of ClustersClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error) { - cl, err := arm.NewClient(moduleName+".ClustersClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ClustersClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginAddLanguageExtensions - Add a list of language extensions that can run within KQL queries. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - languageExtensionsToAdd - The language extensions to add. -// - options - ClustersClientBeginAddLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginAddLanguageExtensions -// method. -func (client *ClustersClient) BeginAddLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToAdd LanguageExtensionsList, options *ClustersClientBeginAddLanguageExtensionsOptions) (*runtime.Poller[ClustersClientAddLanguageExtensionsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.addLanguageExtensions(ctx, resourceGroupName, clusterName, languageExtensionsToAdd, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClustersClientAddLanguageExtensionsResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ClustersClientAddLanguageExtensionsResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// AddLanguageExtensions - Add a list of language extensions that can run within KQL queries. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *ClustersClient) addLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToAdd LanguageExtensionsList, options *ClustersClientBeginAddLanguageExtensionsOptions) (*http.Response, error) { - req, err := client.addLanguageExtensionsCreateRequest(ctx, resourceGroupName, clusterName, languageExtensionsToAdd, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// addLanguageExtensionsCreateRequest creates the AddLanguageExtensions request. -func (client *ClustersClient) addLanguageExtensionsCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToAdd LanguageExtensionsList, options *ClustersClientBeginAddLanguageExtensionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, languageExtensionsToAdd) -} - -// CheckNameAvailability - Checks that the cluster name is valid and is not already in use. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - location - Azure location (region) name. -// - clusterName - The name of the cluster. -// - options - ClustersClientCheckNameAvailabilityOptions contains the optional parameters for the ClustersClient.CheckNameAvailability -// method. -func (client *ClustersClient) CheckNameAvailability(ctx context.Context, location string, clusterName ClusterCheckNameRequest, options *ClustersClientCheckNameAvailabilityOptions) (ClustersClientCheckNameAvailabilityResponse, error) { - req, err := client.checkNameAvailabilityCreateRequest(ctx, location, clusterName, options) - if err != nil { - return ClustersClientCheckNameAvailabilityResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientCheckNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkNameAvailabilityHandleResponse(resp) -} - -// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *ClustersClient) checkNameAvailabilityCreateRequest(ctx context.Context, location string, clusterName ClusterCheckNameRequest, options *ClustersClientCheckNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, clusterName) -} - -// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. -func (client *ClustersClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ClustersClientCheckNameAvailabilityResponse, error) { - result := ClustersClientCheckNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameResult); err != nil { - return ClustersClientCheckNameAvailabilityResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdate - Create or update a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - parameters - The Kusto cluster parameters supplied to the CreateOrUpdate operation. -// - options - ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate -// method. -func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClustersClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, clusterName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClustersClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ClustersClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Create or update a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *ClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ClustersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - if options != nil && options.IfMatch != nil { - req.Raw().Header["If-Match"] = []string{*options.IfMatch} - } - if options != nil && options.IfNoneMatch != nil { - req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} - } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. -func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*runtime.Poller[ClustersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, clusterName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClustersClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ClustersClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Deletes a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *ClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ClustersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDetachFollowerDatabases - Detaches all followers of a database owned by this cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - followerDatabaseToRemove - The follower databases properties to remove. -// - options - ClustersClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the ClustersClient.BeginDetachFollowerDatabases -// method. -func (client *ClustersClient) BeginDetachFollowerDatabases(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *ClustersClientBeginDetachFollowerDatabasesOptions) (*runtime.Poller[ClustersClientDetachFollowerDatabasesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.detachFollowerDatabases(ctx, resourceGroupName, clusterName, followerDatabaseToRemove, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClustersClientDetachFollowerDatabasesResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ClustersClientDetachFollowerDatabasesResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// DetachFollowerDatabases - Detaches all followers of a database owned by this cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *ClustersClient) detachFollowerDatabases(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *ClustersClientBeginDetachFollowerDatabasesOptions) (*http.Response, error) { - req, err := client.detachFollowerDatabasesCreateRequest(ctx, resourceGroupName, clusterName, followerDatabaseToRemove, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// detachFollowerDatabasesCreateRequest creates the DetachFollowerDatabases request. -func (client *ClustersClient) detachFollowerDatabasesCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *ClustersClientBeginDetachFollowerDatabasesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, followerDatabaseToRemove) -} - -// BeginDiagnoseVirtualNetwork - Diagnoses network connectivity status for external resources on which the service is dependent -// on. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - ClustersClientBeginDiagnoseVirtualNetworkOptions contains the optional parameters for the ClustersClient.BeginDiagnoseVirtualNetwork -// method. -func (client *ClustersClient) BeginDiagnoseVirtualNetwork(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDiagnoseVirtualNetworkOptions) (*runtime.Poller[ClustersClientDiagnoseVirtualNetworkResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.diagnoseVirtualNetwork(ctx, resourceGroupName, clusterName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientDiagnoseVirtualNetworkResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ClustersClientDiagnoseVirtualNetworkResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// DiagnoseVirtualNetwork - Diagnoses network connectivity status for external resources on which the service is dependent -// on. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *ClustersClient) diagnoseVirtualNetwork(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDiagnoseVirtualNetworkOptions) (*http.Response, error) { - req, err := client.diagnoseVirtualNetworkCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// diagnoseVirtualNetworkCreateRequest creates the DiagnoseVirtualNetwork request. -func (client *ClustersClient) diagnoseVirtualNetworkCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDiagnoseVirtualNetworkOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/diagnoseVirtualNetwork" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. -func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return ClustersClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ClustersClient) getCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ClustersClient) getHandleResponse(resp *http.Response) (ClustersClientGetResponse, error) { - result := ClustersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Cluster); err != nil { - return ClustersClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all Kusto clusters within a subscription. -// -// Generated from API version 2022-12-29 -// - options - ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method. -func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) *runtime.Pager[ClustersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ClustersClientListResponse]{ - More: func(page ClustersClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ClustersClientListResponse) (ClustersClientListResponse, error) { - req, err := client.listCreateRequest(ctx, options) - if err != nil { - return ClustersClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ClustersClient) listCreateRequest(ctx context.Context, options *ClustersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ClustersClient) listHandleResponse(resp *http.Response) (ClustersClientListResponse, error) { - result := ClustersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ClusterListResult); err != nil { - return ClustersClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all Kusto clusters within a resource group. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager -// method. -func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ClustersClientListByResourceGroupResponse]{ - More: func(page ClustersClientListByResourceGroupResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ClustersClientListByResourceGroupResponse) (ClustersClientListByResourceGroupResponse, error) { - req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - if err != nil { - return ClustersClientListByResourceGroupResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ClustersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ClustersClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ClustersClient) listByResourceGroupHandleResponse(resp *http.Response) (ClustersClientListByResourceGroupResponse, error) { - result := ClustersClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ClusterListResult); err != nil { - return ClustersClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListFollowerDatabasesPager - Returns a list of databases that are owned by this cluster and were followed by another -// cluster. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - ClustersClientListFollowerDatabasesOptions contains the optional parameters for the ClustersClient.NewListFollowerDatabasesPager -// method. -func (client *ClustersClient) NewListFollowerDatabasesPager(resourceGroupName string, clusterName string, options *ClustersClientListFollowerDatabasesOptions) *runtime.Pager[ClustersClientListFollowerDatabasesResponse] { - return runtime.NewPager(runtime.PagingHandler[ClustersClientListFollowerDatabasesResponse]{ - More: func(page ClustersClientListFollowerDatabasesResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ClustersClientListFollowerDatabasesResponse) (ClustersClientListFollowerDatabasesResponse, error) { - req, err := client.listFollowerDatabasesCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return ClustersClientListFollowerDatabasesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListFollowerDatabasesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListFollowerDatabasesResponse{}, runtime.NewResponseError(resp) - } - return client.listFollowerDatabasesHandleResponse(resp) - }, - }) -} - -// listFollowerDatabasesCreateRequest creates the ListFollowerDatabases request. -func (client *ClustersClient) listFollowerDatabasesCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListFollowerDatabasesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listFollowerDatabasesHandleResponse handles the ListFollowerDatabases response. -func (client *ClustersClient) listFollowerDatabasesHandleResponse(resp *http.Response) (ClustersClientListFollowerDatabasesResponse, error) { - result := ClustersClientListFollowerDatabasesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FollowerDatabaseListResult); err != nil { - return ClustersClientListFollowerDatabasesResponse{}, err - } - return result, nil -} - -// NewListLanguageExtensionsPager - Returns a list of language extensions that can run within KQL queries. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - ClustersClientListLanguageExtensionsOptions contains the optional parameters for the ClustersClient.NewListLanguageExtensionsPager -// method. -func (client *ClustersClient) NewListLanguageExtensionsPager(resourceGroupName string, clusterName string, options *ClustersClientListLanguageExtensionsOptions) *runtime.Pager[ClustersClientListLanguageExtensionsResponse] { - return runtime.NewPager(runtime.PagingHandler[ClustersClientListLanguageExtensionsResponse]{ - More: func(page ClustersClientListLanguageExtensionsResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ClustersClientListLanguageExtensionsResponse) (ClustersClientListLanguageExtensionsResponse, error) { - req, err := client.listLanguageExtensionsCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return ClustersClientListLanguageExtensionsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListLanguageExtensionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListLanguageExtensionsResponse{}, runtime.NewResponseError(resp) - } - return client.listLanguageExtensionsHandleResponse(resp) - }, - }) -} - -// listLanguageExtensionsCreateRequest creates the ListLanguageExtensions request. -func (client *ClustersClient) listLanguageExtensionsCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListLanguageExtensionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listLanguageExtensions" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listLanguageExtensionsHandleResponse handles the ListLanguageExtensions response. -func (client *ClustersClient) listLanguageExtensionsHandleResponse(resp *http.Response) (ClustersClientListLanguageExtensionsResponse, error) { - result := ClustersClientListLanguageExtensionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LanguageExtensionsList); err != nil { - return ClustersClientListLanguageExtensionsResponse{}, err - } - return result, nil -} - -// NewListOutboundNetworkDependenciesEndpointsPager - Gets the network endpoints of all outbound dependencies of a Kusto cluster -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - ClustersClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the ClustersClient.NewListOutboundNetworkDependenciesEndpointsPager -// method. -func (client *ClustersClient) NewListOutboundNetworkDependenciesEndpointsPager(resourceGroupName string, clusterName string, options *ClustersClientListOutboundNetworkDependenciesEndpointsOptions) *runtime.Pager[ClustersClientListOutboundNetworkDependenciesEndpointsResponse] { - return runtime.NewPager(runtime.PagingHandler[ClustersClientListOutboundNetworkDependenciesEndpointsResponse]{ - More: func(page ClustersClientListOutboundNetworkDependenciesEndpointsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ClustersClientListOutboundNetworkDependenciesEndpointsResponse) (ClustersClientListOutboundNetworkDependenciesEndpointsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, clusterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ClustersClientListOutboundNetworkDependenciesEndpointsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListOutboundNetworkDependenciesEndpointsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListOutboundNetworkDependenciesEndpointsResponse{}, runtime.NewResponseError(resp) - } - return client.listOutboundNetworkDependenciesEndpointsHandleResponse(resp) - }, - }) -} - -// listOutboundNetworkDependenciesEndpointsCreateRequest creates the ListOutboundNetworkDependenciesEndpoints request. -func (client *ClustersClient) listOutboundNetworkDependenciesEndpointsCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListOutboundNetworkDependenciesEndpointsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/outboundNetworkDependenciesEndpoints" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listOutboundNetworkDependenciesEndpointsHandleResponse handles the ListOutboundNetworkDependenciesEndpoints response. -func (client *ClustersClient) listOutboundNetworkDependenciesEndpointsHandleResponse(resp *http.Response) (ClustersClientListOutboundNetworkDependenciesEndpointsResponse, error) { - result := ClustersClientListOutboundNetworkDependenciesEndpointsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OutboundNetworkDependenciesEndpointListResult); err != nil { - return ClustersClientListOutboundNetworkDependenciesEndpointsResponse{}, err - } - return result, nil -} - -// NewListSKUsPager - Lists eligible SKUs for Kusto resource provider. -// -// Generated from API version 2022-12-29 -// - options - ClustersClientListSKUsOptions contains the optional parameters for the ClustersClient.NewListSKUsPager method. -func (client *ClustersClient) NewListSKUsPager(options *ClustersClientListSKUsOptions) *runtime.Pager[ClustersClientListSKUsResponse] { - return runtime.NewPager(runtime.PagingHandler[ClustersClientListSKUsResponse]{ - More: func(page ClustersClientListSKUsResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ClustersClientListSKUsResponse) (ClustersClientListSKUsResponse, error) { - req, err := client.listSKUsCreateRequest(ctx, options) - if err != nil { - return ClustersClientListSKUsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListSKUsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListSKUsResponse{}, runtime.NewResponseError(resp) - } - return client.listSKUsHandleResponse(resp) - }, - }) -} - -// listSKUsCreateRequest creates the ListSKUs request. -func (client *ClustersClient) listSKUsCreateRequest(ctx context.Context, options *ClustersClientListSKUsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSKUsHandleResponse handles the ListSKUs response. -func (client *ClustersClient) listSKUsHandleResponse(resp *http.Response) (ClustersClientListSKUsResponse, error) { - result := ClustersClientListSKUsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SKUDescriptionList); err != nil { - return ClustersClientListSKUsResponse{}, err - } - return result, nil -} - -// NewListSKUsByResourcePager - Returns the SKUs available for the provided resource. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - ClustersClientListSKUsByResourceOptions contains the optional parameters for the ClustersClient.NewListSKUsByResourcePager -// method. -func (client *ClustersClient) NewListSKUsByResourcePager(resourceGroupName string, clusterName string, options *ClustersClientListSKUsByResourceOptions) *runtime.Pager[ClustersClientListSKUsByResourceResponse] { - return runtime.NewPager(runtime.PagingHandler[ClustersClientListSKUsByResourceResponse]{ - More: func(page ClustersClientListSKUsByResourceResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ClustersClientListSKUsByResourceResponse) (ClustersClientListSKUsByResourceResponse, error) { - req, err := client.listSKUsByResourceCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return ClustersClientListSKUsByResourceResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ClustersClientListSKUsByResourceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClustersClientListSKUsByResourceResponse{}, runtime.NewResponseError(resp) - } - return client.listSKUsByResourceHandleResponse(resp) - }, - }) -} - -// listSKUsByResourceCreateRequest creates the ListSKUsByResource request. -func (client *ClustersClient) listSKUsByResourceCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListSKUsByResourceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSKUsByResourceHandleResponse handles the ListSKUsByResource response. -func (client *ClustersClient) listSKUsByResourceHandleResponse(resp *http.Response) (ClustersClientListSKUsByResourceResponse, error) { - result := ClustersClientListSKUsByResourceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListResourceSKUsResult); err != nil { - return ClustersClientListSKUsByResourceResponse{}, err - } - return result, nil -} - -// BeginRemoveLanguageExtensions - Remove a list of language extensions that can run within KQL queries. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - languageExtensionsToRemove - The language extensions to remove. -// - options - ClustersClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginRemoveLanguageExtensions -// method. -func (client *ClustersClient) BeginRemoveLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToRemove LanguageExtensionsList, options *ClustersClientBeginRemoveLanguageExtensionsOptions) (*runtime.Poller[ClustersClientRemoveLanguageExtensionsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.removeLanguageExtensions(ctx, resourceGroupName, clusterName, languageExtensionsToRemove, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClustersClientRemoveLanguageExtensionsResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ClustersClientRemoveLanguageExtensionsResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// RemoveLanguageExtensions - Remove a list of language extensions that can run within KQL queries. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *ClustersClient) removeLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToRemove LanguageExtensionsList, options *ClustersClientBeginRemoveLanguageExtensionsOptions) (*http.Response, error) { - req, err := client.removeLanguageExtensionsCreateRequest(ctx, resourceGroupName, clusterName, languageExtensionsToRemove, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// removeLanguageExtensionsCreateRequest creates the RemoveLanguageExtensions request. -func (client *ClustersClient) removeLanguageExtensionsCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToRemove LanguageExtensionsList, options *ClustersClientBeginRemoveLanguageExtensionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, languageExtensionsToRemove) -} - -// BeginStart - Starts a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - ClustersClientBeginStartOptions contains the optional parameters for the ClustersClient.BeginStart method. -func (client *ClustersClient) BeginStart(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStartOptions) (*runtime.Poller[ClustersClientStartResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.start(ctx, resourceGroupName, clusterName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClustersClientStartResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ClustersClientStartResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Start - Starts a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *ClustersClient) start(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStartOptions) (*http.Response, error) { - req, err := client.startCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startCreateRequest creates the Start request. -func (client *ClustersClient) startCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStop - Stops a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - ClustersClientBeginStopOptions contains the optional parameters for the ClustersClient.BeginStop method. -func (client *ClustersClient) BeginStop(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStopOptions) (*runtime.Poller[ClustersClientStopResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stop(ctx, resourceGroupName, clusterName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClustersClientStopResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ClustersClientStopResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Stop - Stops a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *ClustersClient) stop(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStopOptions) (*http.Response, error) { - req, err := client.stopCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopCreateRequest creates the Stop request. -func (client *ClustersClient) stopCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginUpdate - Update a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - parameters - The Kusto cluster parameters supplied to the Update operation. -// - options - ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method. -func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdate, options *ClustersClientBeginUpdateOptions) (*runtime.Poller[ClustersClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, clusterName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClustersClientUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[ClustersClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Update - Update a Kusto cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *ClustersClient) update(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdate, options *ClustersClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ClustersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdate, options *ClustersClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - if options != nil && options.IfMatch != nil { - req.Raw().Header["If-Match"] = []string{*options.IfMatch} - } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/constants.go deleted file mode 100644 index 76c5a280..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/constants.go +++ /dev/null @@ -1,805 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -const ( - moduleName = "armkusto" - moduleVersion = "v1.3.1" -) - -// AzureSKUName - SKU name. -type AzureSKUName string - -const ( - AzureSKUNameDevNoSLAStandardD11V2 AzureSKUName = "Dev(No SLA)_Standard_D11_v2" - AzureSKUNameDevNoSLAStandardE2AV4 AzureSKUName = "Dev(No SLA)_Standard_E2a_v4" - AzureSKUNameStandardD11V2 AzureSKUName = "Standard_D11_v2" - AzureSKUNameStandardD12V2 AzureSKUName = "Standard_D12_v2" - AzureSKUNameStandardD13V2 AzureSKUName = "Standard_D13_v2" - AzureSKUNameStandardD14V2 AzureSKUName = "Standard_D14_v2" - AzureSKUNameStandardD16DV5 AzureSKUName = "Standard_D16d_v5" - AzureSKUNameStandardD32DV4 AzureSKUName = "Standard_D32d_v4" - AzureSKUNameStandardD32DV5 AzureSKUName = "Standard_D32d_v5" - AzureSKUNameStandardDS13V21TBPS AzureSKUName = "Standard_DS13_v2+1TB_PS" - AzureSKUNameStandardDS13V22TBPS AzureSKUName = "Standard_DS13_v2+2TB_PS" - AzureSKUNameStandardDS14V23TBPS AzureSKUName = "Standard_DS14_v2+3TB_PS" - AzureSKUNameStandardDS14V24TBPS AzureSKUName = "Standard_DS14_v2+4TB_PS" - AzureSKUNameStandardE16AV4 AzureSKUName = "Standard_E16a_v4" - AzureSKUNameStandardE16AdsV5 AzureSKUName = "Standard_E16ads_v5" - AzureSKUNameStandardE16AsV43TBPS AzureSKUName = "Standard_E16as_v4+3TB_PS" - AzureSKUNameStandardE16AsV44TBPS AzureSKUName = "Standard_E16as_v4+4TB_PS" - AzureSKUNameStandardE16AsV53TBPS AzureSKUName = "Standard_E16as_v5+3TB_PS" - AzureSKUNameStandardE16AsV54TBPS AzureSKUName = "Standard_E16as_v5+4TB_PS" - AzureSKUNameStandardE16DV4 AzureSKUName = "Standard_E16d_v4" - AzureSKUNameStandardE16DV5 AzureSKUName = "Standard_E16d_v5" - AzureSKUNameStandardE16SV43TBPS AzureSKUName = "Standard_E16s_v4+3TB_PS" - AzureSKUNameStandardE16SV44TBPS AzureSKUName = "Standard_E16s_v4+4TB_PS" - AzureSKUNameStandardE16SV53TBPS AzureSKUName = "Standard_E16s_v5+3TB_PS" - AzureSKUNameStandardE16SV54TBPS AzureSKUName = "Standard_E16s_v5+4TB_PS" - AzureSKUNameStandardE2AV4 AzureSKUName = "Standard_E2a_v4" - AzureSKUNameStandardE2AdsV5 AzureSKUName = "Standard_E2ads_v5" - AzureSKUNameStandardE2DV4 AzureSKUName = "Standard_E2d_v4" - AzureSKUNameStandardE2DV5 AzureSKUName = "Standard_E2d_v5" - AzureSKUNameStandardE4AV4 AzureSKUName = "Standard_E4a_v4" - AzureSKUNameStandardE4AdsV5 AzureSKUName = "Standard_E4ads_v5" - AzureSKUNameStandardE4DV4 AzureSKUName = "Standard_E4d_v4" - AzureSKUNameStandardE4DV5 AzureSKUName = "Standard_E4d_v5" - AzureSKUNameStandardE64IV3 AzureSKUName = "Standard_E64i_v3" - AzureSKUNameStandardE80IDsV4 AzureSKUName = "Standard_E80ids_v4" - AzureSKUNameStandardE8AV4 AzureSKUName = "Standard_E8a_v4" - AzureSKUNameStandardE8AdsV5 AzureSKUName = "Standard_E8ads_v5" - AzureSKUNameStandardE8AsV41TBPS AzureSKUName = "Standard_E8as_v4+1TB_PS" - AzureSKUNameStandardE8AsV42TBPS AzureSKUName = "Standard_E8as_v4+2TB_PS" - AzureSKUNameStandardE8AsV51TBPS AzureSKUName = "Standard_E8as_v5+1TB_PS" - AzureSKUNameStandardE8AsV52TBPS AzureSKUName = "Standard_E8as_v5+2TB_PS" - AzureSKUNameStandardE8DV4 AzureSKUName = "Standard_E8d_v4" - AzureSKUNameStandardE8DV5 AzureSKUName = "Standard_E8d_v5" - AzureSKUNameStandardE8SV41TBPS AzureSKUName = "Standard_E8s_v4+1TB_PS" - AzureSKUNameStandardE8SV42TBPS AzureSKUName = "Standard_E8s_v4+2TB_PS" - AzureSKUNameStandardE8SV51TBPS AzureSKUName = "Standard_E8s_v5+1TB_PS" - AzureSKUNameStandardE8SV52TBPS AzureSKUName = "Standard_E8s_v5+2TB_PS" - AzureSKUNameStandardEC16AdsV5 AzureSKUName = "Standard_EC16ads_v5" - AzureSKUNameStandardEC16AsV53TBPS AzureSKUName = "Standard_EC16as_v5+3TB_PS" - AzureSKUNameStandardEC16AsV54TBPS AzureSKUName = "Standard_EC16as_v5+4TB_PS" - AzureSKUNameStandardEC8AdsV5 AzureSKUName = "Standard_EC8ads_v5" - AzureSKUNameStandardEC8AsV51TBPS AzureSKUName = "Standard_EC8as_v5+1TB_PS" - AzureSKUNameStandardEC8AsV52TBPS AzureSKUName = "Standard_EC8as_v5+2TB_PS" - AzureSKUNameStandardL16AsV3 AzureSKUName = "Standard_L16as_v3" - AzureSKUNameStandardL16S AzureSKUName = "Standard_L16s" - AzureSKUNameStandardL16SV2 AzureSKUName = "Standard_L16s_v2" - AzureSKUNameStandardL16SV3 AzureSKUName = "Standard_L16s_v3" - AzureSKUNameStandardL32AsV3 AzureSKUName = "Standard_L32as_v3" - AzureSKUNameStandardL32SV3 AzureSKUName = "Standard_L32s_v3" - AzureSKUNameStandardL4S AzureSKUName = "Standard_L4s" - AzureSKUNameStandardL8AsV3 AzureSKUName = "Standard_L8as_v3" - AzureSKUNameStandardL8S AzureSKUName = "Standard_L8s" - AzureSKUNameStandardL8SV2 AzureSKUName = "Standard_L8s_v2" - AzureSKUNameStandardL8SV3 AzureSKUName = "Standard_L8s_v3" -) - -// PossibleAzureSKUNameValues returns the possible values for the AzureSKUName const type. -func PossibleAzureSKUNameValues() []AzureSKUName { - return []AzureSKUName{ - AzureSKUNameDevNoSLAStandardD11V2, - AzureSKUNameDevNoSLAStandardE2AV4, - AzureSKUNameStandardD11V2, - AzureSKUNameStandardD12V2, - AzureSKUNameStandardD13V2, - AzureSKUNameStandardD14V2, - AzureSKUNameStandardD16DV5, - AzureSKUNameStandardD32DV4, - AzureSKUNameStandardD32DV5, - AzureSKUNameStandardDS13V21TBPS, - AzureSKUNameStandardDS13V22TBPS, - AzureSKUNameStandardDS14V23TBPS, - AzureSKUNameStandardDS14V24TBPS, - AzureSKUNameStandardE16AV4, - AzureSKUNameStandardE16AdsV5, - AzureSKUNameStandardE16AsV43TBPS, - AzureSKUNameStandardE16AsV44TBPS, - AzureSKUNameStandardE16AsV53TBPS, - AzureSKUNameStandardE16AsV54TBPS, - AzureSKUNameStandardE16DV4, - AzureSKUNameStandardE16DV5, - AzureSKUNameStandardE16SV43TBPS, - AzureSKUNameStandardE16SV44TBPS, - AzureSKUNameStandardE16SV53TBPS, - AzureSKUNameStandardE16SV54TBPS, - AzureSKUNameStandardE2AV4, - AzureSKUNameStandardE2AdsV5, - AzureSKUNameStandardE2DV4, - AzureSKUNameStandardE2DV5, - AzureSKUNameStandardE4AV4, - AzureSKUNameStandardE4AdsV5, - AzureSKUNameStandardE4DV4, - AzureSKUNameStandardE4DV5, - AzureSKUNameStandardE64IV3, - AzureSKUNameStandardE80IDsV4, - AzureSKUNameStandardE8AV4, - AzureSKUNameStandardE8AdsV5, - AzureSKUNameStandardE8AsV41TBPS, - AzureSKUNameStandardE8AsV42TBPS, - AzureSKUNameStandardE8AsV51TBPS, - AzureSKUNameStandardE8AsV52TBPS, - AzureSKUNameStandardE8DV4, - AzureSKUNameStandardE8DV5, - AzureSKUNameStandardE8SV41TBPS, - AzureSKUNameStandardE8SV42TBPS, - AzureSKUNameStandardE8SV51TBPS, - AzureSKUNameStandardE8SV52TBPS, - AzureSKUNameStandardEC16AdsV5, - AzureSKUNameStandardEC16AsV53TBPS, - AzureSKUNameStandardEC16AsV54TBPS, - AzureSKUNameStandardEC8AdsV5, - AzureSKUNameStandardEC8AsV51TBPS, - AzureSKUNameStandardEC8AsV52TBPS, - AzureSKUNameStandardL16AsV3, - AzureSKUNameStandardL16S, - AzureSKUNameStandardL16SV2, - AzureSKUNameStandardL16SV3, - AzureSKUNameStandardL32AsV3, - AzureSKUNameStandardL32SV3, - AzureSKUNameStandardL4S, - AzureSKUNameStandardL8AsV3, - AzureSKUNameStandardL8S, - AzureSKUNameStandardL8SV2, - AzureSKUNameStandardL8SV3, - } -} - -// AzureSKUTier - SKU tier. -type AzureSKUTier string - -const ( - AzureSKUTierBasic AzureSKUTier = "Basic" - AzureSKUTierStandard AzureSKUTier = "Standard" -) - -// PossibleAzureSKUTierValues returns the possible values for the AzureSKUTier const type. -func PossibleAzureSKUTierValues() []AzureSKUTier { - return []AzureSKUTier{ - AzureSKUTierBasic, - AzureSKUTierStandard, - } -} - -// AzureScaleType - Scale type. -type AzureScaleType string - -const ( - AzureScaleTypeAutomatic AzureScaleType = "automatic" - AzureScaleTypeManual AzureScaleType = "manual" - AzureScaleTypeNone AzureScaleType = "none" -) - -// PossibleAzureScaleTypeValues returns the possible values for the AzureScaleType const type. -func PossibleAzureScaleTypeValues() []AzureScaleType { - return []AzureScaleType{ - AzureScaleTypeAutomatic, - AzureScaleTypeManual, - AzureScaleTypeNone, - } -} - -// BlobStorageEventType - The name of blob storage event type to process. -type BlobStorageEventType string - -const ( - BlobStorageEventTypeMicrosoftStorageBlobCreated BlobStorageEventType = "Microsoft.Storage.BlobCreated" - BlobStorageEventTypeMicrosoftStorageBlobRenamed BlobStorageEventType = "Microsoft.Storage.BlobRenamed" -) - -// PossibleBlobStorageEventTypeValues returns the possible values for the BlobStorageEventType const type. -func PossibleBlobStorageEventTypeValues() []BlobStorageEventType { - return []BlobStorageEventType{ - BlobStorageEventTypeMicrosoftStorageBlobCreated, - BlobStorageEventTypeMicrosoftStorageBlobRenamed, - } -} - -type CallerRole string - -const ( - CallerRoleAdmin CallerRole = "Admin" - CallerRoleNone CallerRole = "None" -) - -// PossibleCallerRoleValues returns the possible values for the CallerRole const type. -func PossibleCallerRoleValues() []CallerRole { - return []CallerRole{ - CallerRoleAdmin, - CallerRoleNone, - } -} - -// ClusterNetworkAccessFlag - Whether or not to restrict outbound network access. Value is optional but if passed in, must -// be 'Enabled' or 'Disabled' -type ClusterNetworkAccessFlag string - -const ( - ClusterNetworkAccessFlagDisabled ClusterNetworkAccessFlag = "Disabled" - ClusterNetworkAccessFlagEnabled ClusterNetworkAccessFlag = "Enabled" -) - -// PossibleClusterNetworkAccessFlagValues returns the possible values for the ClusterNetworkAccessFlag const type. -func PossibleClusterNetworkAccessFlagValues() []ClusterNetworkAccessFlag { - return []ClusterNetworkAccessFlag{ - ClusterNetworkAccessFlagDisabled, - ClusterNetworkAccessFlagEnabled, - } -} - -// ClusterPrincipalRole - Cluster principal role. -type ClusterPrincipalRole string - -const ( - ClusterPrincipalRoleAllDatabasesAdmin ClusterPrincipalRole = "AllDatabasesAdmin" - ClusterPrincipalRoleAllDatabasesViewer ClusterPrincipalRole = "AllDatabasesViewer" -) - -// PossibleClusterPrincipalRoleValues returns the possible values for the ClusterPrincipalRole const type. -func PossibleClusterPrincipalRoleValues() []ClusterPrincipalRole { - return []ClusterPrincipalRole{ - ClusterPrincipalRoleAllDatabasesAdmin, - ClusterPrincipalRoleAllDatabasesViewer, - } -} - -// Compression - The compression type -type Compression string - -const ( - CompressionGZip Compression = "GZip" - CompressionNone Compression = "None" -) - -// PossibleCompressionValues returns the possible values for the Compression const type. -func PossibleCompressionValues() []Compression { - return []Compression{ - CompressionGZip, - CompressionNone, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// DataConnectionKind - Kind of the endpoint for the data connection -type DataConnectionKind string - -const ( - DataConnectionKindCosmosDb DataConnectionKind = "CosmosDb" - DataConnectionKindEventGrid DataConnectionKind = "EventGrid" - DataConnectionKindEventHub DataConnectionKind = "EventHub" - DataConnectionKindIotHub DataConnectionKind = "IotHub" -) - -// PossibleDataConnectionKindValues returns the possible values for the DataConnectionKind const type. -func PossibleDataConnectionKindValues() []DataConnectionKind { - return []DataConnectionKind{ - DataConnectionKindCosmosDb, - DataConnectionKindEventGrid, - DataConnectionKindEventHub, - DataConnectionKindIotHub, - } -} - -// DatabasePrincipalRole - Database principal role. -type DatabasePrincipalRole string - -const ( - DatabasePrincipalRoleAdmin DatabasePrincipalRole = "Admin" - DatabasePrincipalRoleIngestor DatabasePrincipalRole = "Ingestor" - DatabasePrincipalRoleMonitor DatabasePrincipalRole = "Monitor" - DatabasePrincipalRoleUnrestrictedViewer DatabasePrincipalRole = "UnrestrictedViewer" - DatabasePrincipalRoleUser DatabasePrincipalRole = "User" - DatabasePrincipalRoleViewer DatabasePrincipalRole = "Viewer" -) - -// PossibleDatabasePrincipalRoleValues returns the possible values for the DatabasePrincipalRole const type. -func PossibleDatabasePrincipalRoleValues() []DatabasePrincipalRole { - return []DatabasePrincipalRole{ - DatabasePrincipalRoleAdmin, - DatabasePrincipalRoleIngestor, - DatabasePrincipalRoleMonitor, - DatabasePrincipalRoleUnrestrictedViewer, - DatabasePrincipalRoleUser, - DatabasePrincipalRoleViewer, - } -} - -// DatabasePrincipalType - Database principal type. -type DatabasePrincipalType string - -const ( - DatabasePrincipalTypeApp DatabasePrincipalType = "App" - DatabasePrincipalTypeGroup DatabasePrincipalType = "Group" - DatabasePrincipalTypeUser DatabasePrincipalType = "User" -) - -// PossibleDatabasePrincipalTypeValues returns the possible values for the DatabasePrincipalType const type. -func PossibleDatabasePrincipalTypeValues() []DatabasePrincipalType { - return []DatabasePrincipalType{ - DatabasePrincipalTypeApp, - DatabasePrincipalTypeGroup, - DatabasePrincipalTypeUser, - } -} - -// DatabaseRouting - Indication for database routing information from the data connection, by default only database routing -// information is allowed -type DatabaseRouting string - -const ( - DatabaseRoutingMulti DatabaseRouting = "Multi" - DatabaseRoutingSingle DatabaseRouting = "Single" -) - -// PossibleDatabaseRoutingValues returns the possible values for the DatabaseRouting const type. -func PossibleDatabaseRoutingValues() []DatabaseRouting { - return []DatabaseRouting{ - DatabaseRoutingMulti, - DatabaseRoutingSingle, - } -} - -// DatabaseShareOrigin - The origin of the following setup. -type DatabaseShareOrigin string - -const ( - DatabaseShareOriginDataShare DatabaseShareOrigin = "DataShare" - DatabaseShareOriginDirect DatabaseShareOrigin = "Direct" - DatabaseShareOriginOther DatabaseShareOrigin = "Other" -) - -// PossibleDatabaseShareOriginValues returns the possible values for the DatabaseShareOrigin const type. -func PossibleDatabaseShareOriginValues() []DatabaseShareOrigin { - return []DatabaseShareOrigin{ - DatabaseShareOriginDataShare, - DatabaseShareOriginDirect, - DatabaseShareOriginOther, - } -} - -// DefaultPrincipalsModificationKind - The default principals modification kind -type DefaultPrincipalsModificationKind string - -const ( - DefaultPrincipalsModificationKindNone DefaultPrincipalsModificationKind = "None" - DefaultPrincipalsModificationKindReplace DefaultPrincipalsModificationKind = "Replace" - DefaultPrincipalsModificationKindUnion DefaultPrincipalsModificationKind = "Union" -) - -// PossibleDefaultPrincipalsModificationKindValues returns the possible values for the DefaultPrincipalsModificationKind const type. -func PossibleDefaultPrincipalsModificationKindValues() []DefaultPrincipalsModificationKind { - return []DefaultPrincipalsModificationKind{ - DefaultPrincipalsModificationKindNone, - DefaultPrincipalsModificationKindReplace, - DefaultPrincipalsModificationKindUnion, - } -} - -// EngineType - The engine type -type EngineType string - -const ( - EngineTypeV2 EngineType = "V2" - EngineTypeV3 EngineType = "V3" -) - -// PossibleEngineTypeValues returns the possible values for the EngineType const type. -func PossibleEngineTypeValues() []EngineType { - return []EngineType{ - EngineTypeV2, - EngineTypeV3, - } -} - -// EventGridDataFormat - The data format of the message. Optionally the data format can be added to each message. -type EventGridDataFormat string - -const ( - EventGridDataFormatAPACHEAVRO EventGridDataFormat = "APACHEAVRO" - EventGridDataFormatAVRO EventGridDataFormat = "AVRO" - EventGridDataFormatCSV EventGridDataFormat = "CSV" - EventGridDataFormatJSON EventGridDataFormat = "JSON" - EventGridDataFormatMULTIJSON EventGridDataFormat = "MULTIJSON" - EventGridDataFormatORC EventGridDataFormat = "ORC" - EventGridDataFormatPARQUET EventGridDataFormat = "PARQUET" - EventGridDataFormatPSV EventGridDataFormat = "PSV" - EventGridDataFormatRAW EventGridDataFormat = "RAW" - EventGridDataFormatSCSV EventGridDataFormat = "SCSV" - EventGridDataFormatSINGLEJSON EventGridDataFormat = "SINGLEJSON" - EventGridDataFormatSOHSV EventGridDataFormat = "SOHSV" - EventGridDataFormatTSV EventGridDataFormat = "TSV" - EventGridDataFormatTSVE EventGridDataFormat = "TSVE" - EventGridDataFormatTXT EventGridDataFormat = "TXT" - EventGridDataFormatW3CLOGFILE EventGridDataFormat = "W3CLOGFILE" -) - -// PossibleEventGridDataFormatValues returns the possible values for the EventGridDataFormat const type. -func PossibleEventGridDataFormatValues() []EventGridDataFormat { - return []EventGridDataFormat{ - EventGridDataFormatAPACHEAVRO, - EventGridDataFormatAVRO, - EventGridDataFormatCSV, - EventGridDataFormatJSON, - EventGridDataFormatMULTIJSON, - EventGridDataFormatORC, - EventGridDataFormatPARQUET, - EventGridDataFormatPSV, - EventGridDataFormatRAW, - EventGridDataFormatSCSV, - EventGridDataFormatSINGLEJSON, - EventGridDataFormatSOHSV, - EventGridDataFormatTSV, - EventGridDataFormatTSVE, - EventGridDataFormatTXT, - EventGridDataFormatW3CLOGFILE, - } -} - -// EventHubDataFormat - The data format of the message. Optionally the data format can be added to each message. -type EventHubDataFormat string - -const ( - EventHubDataFormatAPACHEAVRO EventHubDataFormat = "APACHEAVRO" - EventHubDataFormatAVRO EventHubDataFormat = "AVRO" - EventHubDataFormatCSV EventHubDataFormat = "CSV" - EventHubDataFormatJSON EventHubDataFormat = "JSON" - EventHubDataFormatMULTIJSON EventHubDataFormat = "MULTIJSON" - EventHubDataFormatORC EventHubDataFormat = "ORC" - EventHubDataFormatPARQUET EventHubDataFormat = "PARQUET" - EventHubDataFormatPSV EventHubDataFormat = "PSV" - EventHubDataFormatRAW EventHubDataFormat = "RAW" - EventHubDataFormatSCSV EventHubDataFormat = "SCSV" - EventHubDataFormatSINGLEJSON EventHubDataFormat = "SINGLEJSON" - EventHubDataFormatSOHSV EventHubDataFormat = "SOHSV" - EventHubDataFormatTSV EventHubDataFormat = "TSV" - EventHubDataFormatTSVE EventHubDataFormat = "TSVE" - EventHubDataFormatTXT EventHubDataFormat = "TXT" - EventHubDataFormatW3CLOGFILE EventHubDataFormat = "W3CLOGFILE" -) - -// PossibleEventHubDataFormatValues returns the possible values for the EventHubDataFormat const type. -func PossibleEventHubDataFormatValues() []EventHubDataFormat { - return []EventHubDataFormat{ - EventHubDataFormatAPACHEAVRO, - EventHubDataFormatAVRO, - EventHubDataFormatCSV, - EventHubDataFormatJSON, - EventHubDataFormatMULTIJSON, - EventHubDataFormatORC, - EventHubDataFormatPARQUET, - EventHubDataFormatPSV, - EventHubDataFormatRAW, - EventHubDataFormatSCSV, - EventHubDataFormatSINGLEJSON, - EventHubDataFormatSOHSV, - EventHubDataFormatTSV, - EventHubDataFormatTSVE, - EventHubDataFormatTXT, - EventHubDataFormatW3CLOGFILE, - } -} - -// IdentityType - The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created -// identity and a set of user-assigned identities. The type 'None' will remove all -// identities. -type IdentityType string - -const ( - IdentityTypeNone IdentityType = "None" - IdentityTypeSystemAssigned IdentityType = "SystemAssigned" - IdentityTypeSystemAssignedUserAssigned IdentityType = "SystemAssigned, UserAssigned" - IdentityTypeUserAssigned IdentityType = "UserAssigned" -) - -// PossibleIdentityTypeValues returns the possible values for the IdentityType const type. -func PossibleIdentityTypeValues() []IdentityType { - return []IdentityType{ - IdentityTypeNone, - IdentityTypeSystemAssigned, - IdentityTypeSystemAssignedUserAssigned, - IdentityTypeUserAssigned, - } -} - -// IotHubDataFormat - The data format of the message. Optionally the data format can be added to each message. -type IotHubDataFormat string - -const ( - IotHubDataFormatAPACHEAVRO IotHubDataFormat = "APACHEAVRO" - IotHubDataFormatAVRO IotHubDataFormat = "AVRO" - IotHubDataFormatCSV IotHubDataFormat = "CSV" - IotHubDataFormatJSON IotHubDataFormat = "JSON" - IotHubDataFormatMULTIJSON IotHubDataFormat = "MULTIJSON" - IotHubDataFormatORC IotHubDataFormat = "ORC" - IotHubDataFormatPARQUET IotHubDataFormat = "PARQUET" - IotHubDataFormatPSV IotHubDataFormat = "PSV" - IotHubDataFormatRAW IotHubDataFormat = "RAW" - IotHubDataFormatSCSV IotHubDataFormat = "SCSV" - IotHubDataFormatSINGLEJSON IotHubDataFormat = "SINGLEJSON" - IotHubDataFormatSOHSV IotHubDataFormat = "SOHSV" - IotHubDataFormatTSV IotHubDataFormat = "TSV" - IotHubDataFormatTSVE IotHubDataFormat = "TSVE" - IotHubDataFormatTXT IotHubDataFormat = "TXT" - IotHubDataFormatW3CLOGFILE IotHubDataFormat = "W3CLOGFILE" -) - -// PossibleIotHubDataFormatValues returns the possible values for the IotHubDataFormat const type. -func PossibleIotHubDataFormatValues() []IotHubDataFormat { - return []IotHubDataFormat{ - IotHubDataFormatAPACHEAVRO, - IotHubDataFormatAVRO, - IotHubDataFormatCSV, - IotHubDataFormatJSON, - IotHubDataFormatMULTIJSON, - IotHubDataFormatORC, - IotHubDataFormatPARQUET, - IotHubDataFormatPSV, - IotHubDataFormatRAW, - IotHubDataFormatSCSV, - IotHubDataFormatSINGLEJSON, - IotHubDataFormatSOHSV, - IotHubDataFormatTSV, - IotHubDataFormatTSVE, - IotHubDataFormatTXT, - IotHubDataFormatW3CLOGFILE, - } -} - -// Kind - Kind of the database -type Kind string - -const ( - KindReadOnlyFollowing Kind = "ReadOnlyFollowing" - KindReadWrite Kind = "ReadWrite" -) - -// PossibleKindValues returns the possible values for the Kind const type. -func PossibleKindValues() []Kind { - return []Kind{ - KindReadOnlyFollowing, - KindReadWrite, - } -} - -// LanguageExtensionImageName - Language extension image name. -type LanguageExtensionImageName string - -const ( - LanguageExtensionImageNamePython3108 LanguageExtensionImageName = "Python3_10_8" - LanguageExtensionImageNamePython365 LanguageExtensionImageName = "Python3_6_5" - LanguageExtensionImageNamePython3912 LanguageExtensionImageName = "Python3_9_12" - LanguageExtensionImageNamePython3912IncludeDeepLearning LanguageExtensionImageName = "Python3_9_12IncludeDeepLearning" - LanguageExtensionImageNameR LanguageExtensionImageName = "R" -) - -// PossibleLanguageExtensionImageNameValues returns the possible values for the LanguageExtensionImageName const type. -func PossibleLanguageExtensionImageNameValues() []LanguageExtensionImageName { - return []LanguageExtensionImageName{ - LanguageExtensionImageNamePython3108, - LanguageExtensionImageNamePython365, - LanguageExtensionImageNamePython3912, - LanguageExtensionImageNamePython3912IncludeDeepLearning, - LanguageExtensionImageNameR, - } -} - -// LanguageExtensionName - Language extension that can run within KQL query. -type LanguageExtensionName string - -const ( - LanguageExtensionNamePYTHON LanguageExtensionName = "PYTHON" - LanguageExtensionNameR LanguageExtensionName = "R" -) - -// PossibleLanguageExtensionNameValues returns the possible values for the LanguageExtensionName const type. -func PossibleLanguageExtensionNameValues() []LanguageExtensionName { - return []LanguageExtensionName{ - LanguageExtensionNamePYTHON, - LanguageExtensionNameR, - } -} - -// PrincipalType - Principal type. -type PrincipalType string - -const ( - PrincipalTypeApp PrincipalType = "App" - PrincipalTypeGroup PrincipalType = "Group" - PrincipalTypeUser PrincipalType = "User" -) - -// PossiblePrincipalTypeValues returns the possible values for the PrincipalType const type. -func PossiblePrincipalTypeValues() []PrincipalType { - return []PrincipalType{ - PrincipalTypeApp, - PrincipalTypeGroup, - PrincipalTypeUser, - } -} - -// PrincipalsModificationKind - The principals modification kind of the database -type PrincipalsModificationKind string - -const ( - PrincipalsModificationKindNone PrincipalsModificationKind = "None" - PrincipalsModificationKindReplace PrincipalsModificationKind = "Replace" - PrincipalsModificationKindUnion PrincipalsModificationKind = "Union" -) - -// PossiblePrincipalsModificationKindValues returns the possible values for the PrincipalsModificationKind const type. -func PossiblePrincipalsModificationKindValues() []PrincipalsModificationKind { - return []PrincipalsModificationKind{ - PrincipalsModificationKindNone, - PrincipalsModificationKindReplace, - PrincipalsModificationKindUnion, - } -} - -// ProvisioningState - The provisioned state of the resource. -type ProvisioningState string - -const ( - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateMoving ProvisioningState = "Moving" - ProvisioningStateRunning ProvisioningState = "Running" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateCanceled, - ProvisioningStateCreating, - ProvisioningStateDeleting, - ProvisioningStateFailed, - ProvisioningStateMoving, - ProvisioningStateRunning, - ProvisioningStateSucceeded, - } -} - -// PublicIPType - Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6) -type PublicIPType string - -const ( - PublicIPTypeDualStack PublicIPType = "DualStack" - PublicIPTypeIPv4 PublicIPType = "IPv4" -) - -// PossiblePublicIPTypeValues returns the possible values for the PublicIPType const type. -func PossiblePublicIPTypeValues() []PublicIPType { - return []PublicIPType{ - PublicIPTypeDualStack, - PublicIPTypeIPv4, - } -} - -// PublicNetworkAccess - Public network access to the cluster is enabled by default. When disabled, only private endpoint -// connection to the cluster is allowed -type PublicNetworkAccess string - -const ( - PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" - PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" -) - -// PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. -func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { - return []PublicNetworkAccess{ - PublicNetworkAccessDisabled, - PublicNetworkAccessEnabled, - } -} - -// Reason - Message providing the reason why the given name is invalid. -type Reason string - -const ( - ReasonAlreadyExists Reason = "AlreadyExists" - ReasonInvalid Reason = "Invalid" -) - -// PossibleReasonValues returns the possible values for the Reason const type. -func PossibleReasonValues() []Reason { - return []Reason{ - ReasonAlreadyExists, - ReasonInvalid, - } -} - -// State - The state of the resource. -type State string - -const ( - StateCreating State = "Creating" - StateDeleted State = "Deleted" - StateDeleting State = "Deleting" - StateRunning State = "Running" - StateStarting State = "Starting" - StateStopped State = "Stopped" - StateStopping State = "Stopping" - StateUnavailable State = "Unavailable" - StateUpdating State = "Updating" -) - -// PossibleStateValues returns the possible values for the State const type. -func PossibleStateValues() []State { - return []State{ - StateCreating, - StateDeleted, - StateDeleting, - StateRunning, - StateStarting, - StateStopped, - StateStopping, - StateUnavailable, - StateUpdating, - } -} - -// Status - The status of operation. -type Status string - -const ( - StatusCanceled Status = "Canceled" - StatusFailed Status = "Failed" - StatusRunning Status = "Running" - StatusSucceeded Status = "Succeeded" -) - -// PossibleStatusValues returns the possible values for the Status const type. -func PossibleStatusValues() []Status { - return []Status{ - StatusCanceled, - StatusFailed, - StatusRunning, - StatusSucceeded, - } -} - -// Type - The type of resource, for instance Microsoft.Kusto/clusters/databases. -type Type string - -const ( - TypeMicrosoftKustoClustersDatabases Type = "Microsoft.Kusto/clusters/databases" - TypeMicrosoftKustoClustersAttachedDatabaseConfigurations Type = "Microsoft.Kusto/clusters/attachedDatabaseConfigurations" -) - -// PossibleTypeValues returns the possible values for the Type const type. -func PossibleTypeValues() []Type { - return []Type{ - TypeMicrosoftKustoClustersDatabases, - TypeMicrosoftKustoClustersAttachedDatabaseConfigurations, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/models.go deleted file mode 100644 index 24f04494..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/models.go +++ /dev/null @@ -1,1974 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import "time" - -// AcceptedAudiences - Represents an accepted audience trusted by the cluster. -type AcceptedAudiences struct { - // GUID or valid URL representing an accepted audience. - Value *string -} - -// AttachedDatabaseConfiguration - Class representing an attached database configuration. -type AttachedDatabaseConfiguration struct { - // Resource location. - Location *string - - // The properties of the attached database configuration. - Properties *AttachedDatabaseConfigurationProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// AttachedDatabaseConfigurationListResult - The list attached database configurations operation response. -type AttachedDatabaseConfigurationListResult struct { - // The list of attached database configurations. - Value []*AttachedDatabaseConfiguration -} - -// AttachedDatabaseConfigurationProperties - Class representing the an attached database configuration properties of kind -// specific. -type AttachedDatabaseConfigurationProperties struct { - // REQUIRED; The resource id of the cluster where the databases you would like to attach reside. - ClusterResourceID *string - - // REQUIRED; The name of the database which you would like to attach, use * if you want to follow all current and future databases. - DatabaseName *string - - // REQUIRED; The default principals modification kind - DefaultPrincipalsModificationKind *DefaultPrincipalsModificationKind - - // Overrides the original database name. Relevant only when attaching to a specific database. - DatabaseNameOverride *string - - // Adds a prefix to the attached databases name. When following an entire cluster, that prefix would be added to all of the - // databases original names from leader cluster. - DatabaseNamePrefix *string - - // Table level sharing specifications - TableLevelSharingProperties *TableLevelSharingProperties - - // READ-ONLY; The list of databases from the clusterResourceId which are currently attached to the cluster. - AttachedDatabaseNames []*string - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState -} - -// AttachedDatabaseConfigurationsCheckNameRequest - The result returned from a AttachedDatabaseConfigurations check name availability -// request. -type AttachedDatabaseConfigurationsCheckNameRequest struct { - // REQUIRED; Attached database resource name. - Name *string - - // CONSTANT; The type of resource, for instance Microsoft.Kusto/clusters/attachedDatabaseConfigurations. - // Field has constant value "Microsoft.Kusto/clusters/attachedDatabaseConfigurations", any specified value is ignored. - Type *string -} - -// AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.BeginCreateOrUpdate -// method. -type AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AttachedDatabaseConfigurationsClientBeginDeleteOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.BeginDelete -// method. -type AttachedDatabaseConfigurationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.CheckNameAvailability -// method. -type AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// AttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.Get -// method. -type AttachedDatabaseConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AttachedDatabaseConfigurationsClientListByClusterOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.NewListByClusterPager -// method. -type AttachedDatabaseConfigurationsClientListByClusterOptions struct { - // placeholder for future optional parameters -} - -// AzureCapacity - Azure capacity definition. -type AzureCapacity struct { - // REQUIRED; The default capacity that would be used. - Default *int32 - - // REQUIRED; Maximum allowed capacity. - Maximum *int32 - - // REQUIRED; Minimum allowed capacity. - Minimum *int32 - - // REQUIRED; Scale type. - ScaleType *AzureScaleType -} - -// AzureResourceSKU - Azure resource SKU definition. -type AzureResourceSKU struct { - // The number of instances of the cluster. - Capacity *AzureCapacity - - // Resource Namespace and Type. - ResourceType *string - - // The SKU details. - SKU *AzureSKU -} - -// AzureSKU - Azure SKU definition. -type AzureSKU struct { - // REQUIRED; SKU name. - Name *AzureSKUName - - // REQUIRED; SKU tier. - Tier *AzureSKUTier - - // The number of instances of the cluster. - Capacity *int32 -} - -// CheckNameRequest - The result returned from a database check name availability request. -type CheckNameRequest struct { - // REQUIRED; Resource name. - Name *string - - // REQUIRED; The type of resource, for instance Microsoft.Kusto/clusters/databases. - Type *Type -} - -// CheckNameResult - The result returned from a check name availability request. -type CheckNameResult struct { - // Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. - Message *string - - // The name that was checked. - Name *string - - // Specifies a Boolean value that indicates if the name is available. - NameAvailable *bool - - // Message providing the reason why the given name is invalid. - Reason *Reason -} - -// Cluster - Class representing a Kusto cluster. -type Cluster struct { - // REQUIRED; The geo-location where the resource lives - Location *string - - // REQUIRED; The SKU of the cluster. - SKU *AzureSKU - - // The identity of the cluster, if configured. - Identity *Identity - - // The cluster properties. - Properties *ClusterProperties - - // Resource tags. - Tags map[string]*string - - // The availability zones of the cluster. - Zones []*string - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// ClusterCheckNameRequest - The result returned from a cluster check name availability request. -type ClusterCheckNameRequest struct { - // REQUIRED; Cluster name. - Name *string - - // CONSTANT; The type of resource, Microsoft.Kusto/clusters. - // Field has constant value "Microsoft.Kusto/clusters", any specified value is ignored. - Type *string -} - -// ClusterListResult - The list Kusto clusters operation response. -type ClusterListResult struct { - // The list of Kusto clusters. - Value []*Cluster -} - -// ClusterPrincipalAssignment - Class representing a cluster principal assignment. -type ClusterPrincipalAssignment struct { - // The cluster principal. - Properties *ClusterPrincipalProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// ClusterPrincipalAssignmentCheckNameRequest - A principal assignment check name availability request. -type ClusterPrincipalAssignmentCheckNameRequest struct { - // REQUIRED; Principal Assignment resource name. - Name *string - - // CONSTANT; The type of resource, Microsoft.Kusto/clusters/principalAssignments. - // Field has constant value "Microsoft.Kusto/clusters/principalAssignments", any specified value is ignored. - Type *string -} - -// ClusterPrincipalAssignmentListResult - The list Kusto cluster principal assignments operation response. -type ClusterPrincipalAssignmentListResult struct { - // The list of Kusto cluster principal assignments. - Value []*ClusterPrincipalAssignment -} - -// ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.BeginCreateOrUpdate -// method. -type ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClusterPrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.BeginDelete -// method. -type ClusterPrincipalAssignmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.CheckNameAvailability -// method. -type ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ClusterPrincipalAssignmentsClientGetOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.Get -// method. -type ClusterPrincipalAssignmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClusterPrincipalAssignmentsClientListOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.NewListPager -// method. -type ClusterPrincipalAssignmentsClientListOptions struct { - // placeholder for future optional parameters -} - -// ClusterPrincipalProperties - A class representing cluster principal property. -type ClusterPrincipalProperties struct { - // REQUIRED; The principal ID assigned to the cluster principal. It can be a user email, application ID, or security group - // name. - PrincipalID *string - - // REQUIRED; Principal type. - PrincipalType *PrincipalType - - // REQUIRED; Cluster principal role. - Role *ClusterPrincipalRole - - // The tenant id of the principal - TenantID *string - - // READ-ONLY; The service principal object id in AAD (Azure active directory) - AADObjectID *string - - // READ-ONLY; The principal name - PrincipalName *string - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState - - // READ-ONLY; The tenant name of the principal - TenantName *string -} - -// ClusterProperties - Class representing the Kusto cluster properties. -type ClusterProperties struct { - // The cluster's accepted audiences. - AcceptedAudiences []*AcceptedAudiences - - // List of allowed FQDNs(Fully Qualified Domain Name) for egress from Cluster. - AllowedFqdnList []*string - - // The list of ips in the format of CIDR allowed to connect to the cluster. - AllowedIPRangeList []*string - - // A boolean value that indicates if the cluster could be automatically stopped (due to lack of data or no activity for many - // days). - EnableAutoStop *bool - - // A boolean value that indicates if the cluster's disks are encrypted. - EnableDiskEncryption *bool - - // A boolean value that indicates if double encryption is enabled. - EnableDoubleEncryption *bool - - // A boolean value that indicates if the purge operations are enabled. - EnablePurge *bool - - // A boolean value that indicates if the streaming ingest is enabled. - EnableStreamingIngest *bool - - // The engine type - EngineType *EngineType - - // KeyVault properties for the cluster encryption. - KeyVaultProperties *KeyVaultProperties - - // List of the cluster's language extensions. - LanguageExtensions *LanguageExtensionsList - - // Optimized auto scale definition. - OptimizedAutoscale *OptimizedAutoscale - - // Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6) - PublicIPType *PublicIPType - - // Public network access to the cluster is enabled by default. When disabled, only private endpoint connection to the cluster - // is allowed - PublicNetworkAccess *PublicNetworkAccess - - // Whether or not to restrict outbound network access. Value is optional but if passed in, must be 'Enabled' or 'Disabled' - RestrictOutboundNetworkAccess *ClusterNetworkAccessFlag - - // The cluster's external tenants. - TrustedExternalTenants []*TrustedExternalTenant - - // Virtual Cluster graduation properties - VirtualClusterGraduationProperties *string - - // Virtual network definition. - VirtualNetworkConfiguration *VirtualNetworkConfiguration - - // READ-ONLY; The cluster data ingestion URI. - DataIngestionURI *string - - // READ-ONLY; A list of private endpoint connections. - PrivateEndpointConnections []*PrivateEndpointConnection - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState - - // READ-ONLY; The state of the resource. - State *State - - // READ-ONLY; The reason for the cluster's current state. - StateReason *string - - // READ-ONLY; The cluster URI. - URI *string -} - -// ClusterUpdate - Class representing an update to a Kusto cluster. -type ClusterUpdate struct { - // The identity of the cluster, if configured. - Identity *Identity - - // Resource location. - Location *string - - // The cluster properties. - Properties *ClusterProperties - - // The SKU of the cluster. - SKU *AzureSKU - - // Resource tags. - Tags map[string]*string - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// ClustersClientBeginAddLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginAddLanguageExtensions -// method. -type ClustersClientBeginAddLanguageExtensionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method. -type ClustersClientBeginCreateOrUpdateOptions struct { - // The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the last-seen ETag value to prevent - // accidentally overwriting concurrent changes. - IfMatch *string - // Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster. Other values will result - // in a 412 Pre-condition Failed response. - IfNoneMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. -type ClustersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the ClustersClient.BeginDetachFollowerDatabases -// method. -type ClustersClientBeginDetachFollowerDatabasesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginDiagnoseVirtualNetworkOptions contains the optional parameters for the ClustersClient.BeginDiagnoseVirtualNetwork -// method. -type ClustersClientBeginDiagnoseVirtualNetworkOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginRemoveLanguageExtensions -// method. -type ClustersClientBeginRemoveLanguageExtensionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginStartOptions contains the optional parameters for the ClustersClient.BeginStart method. -type ClustersClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginStopOptions contains the optional parameters for the ClustersClient.BeginStop method. -type ClustersClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method. -type ClustersClientBeginUpdateOptions struct { - // The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the last-seen ETag value to prevent - // accidentally overwriting concurrent changes. - IfMatch *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClustersClientCheckNameAvailabilityOptions contains the optional parameters for the ClustersClient.CheckNameAvailability -// method. -type ClustersClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. -type ClustersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager -// method. -type ClustersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListFollowerDatabasesOptions contains the optional parameters for the ClustersClient.NewListFollowerDatabasesPager -// method. -type ClustersClientListFollowerDatabasesOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListLanguageExtensionsOptions contains the optional parameters for the ClustersClient.NewListLanguageExtensionsPager -// method. -type ClustersClientListLanguageExtensionsOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method. -type ClustersClientListOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the ClustersClient.NewListOutboundNetworkDependenciesEndpointsPager -// method. -type ClustersClientListOutboundNetworkDependenciesEndpointsOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListSKUsByResourceOptions contains the optional parameters for the ClustersClient.NewListSKUsByResourcePager -// method. -type ClustersClientListSKUsByResourceOptions struct { - // placeholder for future optional parameters -} - -// ClustersClientListSKUsOptions contains the optional parameters for the ClustersClient.NewListSKUsPager method. -type ClustersClientListSKUsOptions struct { - // placeholder for future optional parameters -} - -type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties struct { - // READ-ONLY; The client id of user assigned identity. - ClientID *string - - // READ-ONLY; The principal id of user assigned identity. - PrincipalID *string -} - -// CosmosDbDataConnection - Class representing a CosmosDb data connection. -type CosmosDbDataConnection struct { - // REQUIRED; Kind of the endpoint for the data connection - Kind *DataConnectionKind - - // Resource location. - Location *string - - // The properties of the CosmosDb data connection. - Properties *CosmosDbDataConnectionProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GetDataConnection implements the DataConnectionClassification interface for type CosmosDbDataConnection. -func (c *CosmosDbDataConnection) GetDataConnection() *DataConnection { - return &DataConnection{ - Location: c.Location, - Kind: c.Kind, - ID: c.ID, - Name: c.Name, - Type: c.Type, - } -} - -// CosmosDbDataConnectionProperties - Class representing the Kusto CosmosDb data connection properties. -type CosmosDbDataConnectionProperties struct { - // REQUIRED; The resource ID of the Cosmos DB account used to create the data connection. - CosmosDbAccountResourceID *string - - // REQUIRED; The name of an existing container in the Cosmos DB database. - CosmosDbContainer *string - - // REQUIRED; The name of an existing database in the Cosmos DB account. - CosmosDbDatabase *string - - // REQUIRED; The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos - // DB. - ManagedIdentityResourceID *string - - // REQUIRED; The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. - TableName *string - - // The name of an existing mapping rule to use when ingesting the retrieved data. - MappingRuleName *string - - // Optional. If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval - // start date. - RetrievalStartDate *time.Time - - // READ-ONLY; The object ID of the managed identity resource. - ManagedIdentityObjectID *string - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState -} - -// DataConnectionClassification provides polymorphic access to related types. -// Call the interface's GetDataConnection() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *CosmosDbDataConnection, *DataConnection, *EventGridDataConnection, *EventHubDataConnection, *IotHubDataConnection -type DataConnectionClassification interface { - // GetDataConnection returns the DataConnection content of the underlying type. - GetDataConnection() *DataConnection -} - -// DataConnection - Class representing an data connection. -type DataConnection struct { - // REQUIRED; Kind of the endpoint for the data connection - Kind *DataConnectionKind - - // Resource location. - Location *string - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GetDataConnection implements the DataConnectionClassification interface for type DataConnection. -func (d *DataConnection) GetDataConnection() *DataConnection { return d } - -// DataConnectionCheckNameRequest - A data connection check name availability request. -type DataConnectionCheckNameRequest struct { - // REQUIRED; Data Connection name. - Name *string - - // CONSTANT; The type of resource, Microsoft.Kusto/clusters/databases/dataConnections. - // Field has constant value "Microsoft.Kusto/clusters/databases/dataConnections", any specified value is ignored. - Type *string -} - -// DataConnectionListResult - The list Kusto data connections operation response. -type DataConnectionListResult struct { - // The list of Kusto data connections. - Value []DataConnectionClassification -} - -// DataConnectionValidation - Class representing an data connection validation. -type DataConnectionValidation struct { - // The name of the data connection. - DataConnectionName *string - - // The data connection properties to validate. - Properties DataConnectionClassification -} - -// DataConnectionValidationListResult - The list Kusto data connection validation result. -type DataConnectionValidationListResult struct { - // The list of Kusto data connection validation errors. - Value []*DataConnectionValidationResult -} - -// DataConnectionValidationResult - The result returned from a data connection validation request. -type DataConnectionValidationResult struct { - // A message which indicates a problem in data connection validation. - ErrorMessage *string -} - -// DataConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DataConnectionsClient.BeginCreateOrUpdate -// method. -type DataConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DataConnectionsClientBeginDataConnectionValidationOptions contains the optional parameters for the DataConnectionsClient.BeginDataConnectionValidation -// method. -type DataConnectionsClientBeginDataConnectionValidationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DataConnectionsClientBeginDeleteOptions contains the optional parameters for the DataConnectionsClient.BeginDelete method. -type DataConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DataConnectionsClientBeginUpdateOptions contains the optional parameters for the DataConnectionsClient.BeginUpdate method. -type DataConnectionsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DataConnectionsClientCheckNameAvailabilityOptions contains the optional parameters for the DataConnectionsClient.CheckNameAvailability -// method. -type DataConnectionsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// DataConnectionsClientGetOptions contains the optional parameters for the DataConnectionsClient.Get method. -type DataConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataConnectionsClientListByDatabaseOptions contains the optional parameters for the DataConnectionsClient.NewListByDatabasePager -// method. -type DataConnectionsClientListByDatabaseOptions struct { - // placeholder for future optional parameters -} - -// DatabaseClassification provides polymorphic access to related types. -// Call the interface's GetDatabase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *Database, *ReadOnlyFollowingDatabase, *ReadWriteDatabase -type DatabaseClassification interface { - // GetDatabase returns the Database content of the underlying type. - GetDatabase() *Database -} - -// Database - Class representing a Kusto database. -type Database struct { - // REQUIRED; Kind of the database - Kind *Kind - - // Resource location. - Location *string - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GetDatabase implements the DatabaseClassification interface for type Database. -func (d *Database) GetDatabase() *Database { return d } - -// DatabaseListResult - The list Kusto databases operation response. -type DatabaseListResult struct { - // The list of Kusto databases. - Value []DatabaseClassification -} - -// DatabasePrincipal - A class representing database principal entity. -type DatabasePrincipal struct { - // REQUIRED; Database principal name. - Name *string - - // REQUIRED; Database principal role. - Role *DatabasePrincipalRole - - // REQUIRED; Database principal type. - Type *DatabasePrincipalType - - // Application id - relevant only for application principal type. - AppID *string - - // Database principal email if exists. - Email *string - - // Database principal fully qualified name. - Fqn *string - - // READ-ONLY; The tenant name of the principal - TenantName *string -} - -// DatabasePrincipalAssignment - Class representing a database principal assignment. -type DatabasePrincipalAssignment struct { - // The database principal. - Properties *DatabasePrincipalProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// DatabasePrincipalAssignmentCheckNameRequest - A principal assignment check name availability request. -type DatabasePrincipalAssignmentCheckNameRequest struct { - // REQUIRED; Principal Assignment resource name. - Name *string - - // CONSTANT; The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments. - // Field has constant value "Microsoft.Kusto/clusters/databases/principalAssignments", any specified value is ignored. - Type *string -} - -// DatabasePrincipalAssignmentListResult - The list Kusto database principal assignments operation response. -type DatabasePrincipalAssignmentListResult struct { - // The list of Kusto database principal assignments. - Value []*DatabasePrincipalAssignment -} - -// DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.BeginCreateOrUpdate -// method. -type DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DatabasePrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.BeginDelete -// method. -type DatabasePrincipalAssignmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.CheckNameAvailability -// method. -type DatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// DatabasePrincipalAssignmentsClientGetOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.Get -// method. -type DatabasePrincipalAssignmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.NewListPager -// method. -type DatabasePrincipalAssignmentsClientListOptions struct { - // placeholder for future optional parameters -} - -// DatabasePrincipalListRequest - The list Kusto database principals operation request. -type DatabasePrincipalListRequest struct { - // The list of Kusto database principals. - Value []*DatabasePrincipal -} - -// DatabasePrincipalListResult - The list Kusto database principals operation response. -type DatabasePrincipalListResult struct { - // The list of Kusto database principals. - Value []*DatabasePrincipal -} - -// DatabasePrincipalProperties - A class representing database principal property. -type DatabasePrincipalProperties struct { - // REQUIRED; The principal ID assigned to the database principal. It can be a user email, application ID, or security group - // name. - PrincipalID *string - - // REQUIRED; Principal type. - PrincipalType *PrincipalType - - // REQUIRED; Database principal role. - Role *DatabasePrincipalRole - - // The tenant id of the principal - TenantID *string - - // READ-ONLY; The service principal object id in AAD (Azure active directory) - AADObjectID *string - - // READ-ONLY; The principal name - PrincipalName *string - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState - - // READ-ONLY; The tenant name of the principal - TenantName *string -} - -// DatabaseStatistics - A class that contains database statistics information. -type DatabaseStatistics struct { - // The database size - the total size of compressed data and index in bytes. - Size *float32 -} - -// DatabasesClientAddPrincipalsOptions contains the optional parameters for the DatabasesClient.AddPrincipals method. -type DatabasesClientAddPrincipalsOptions struct { - // placeholder for future optional parameters -} - -// DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate -// method. -type DatabasesClientBeginCreateOrUpdateOptions struct { - // By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude - // the caller from Admins list. - CallerRole *CallerRole - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method. -type DatabasesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DatabasesClientBeginUpdateOptions contains the optional parameters for the DatabasesClient.BeginUpdate method. -type DatabasesClientBeginUpdateOptions struct { - // By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude - // the caller from Admins list. - CallerRole *CallerRole - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DatabasesClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasesClient.CheckNameAvailability -// method. -type DatabasesClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method. -type DatabasesClientGetOptions struct { - // placeholder for future optional parameters -} - -// DatabasesClientListByClusterOptions contains the optional parameters for the DatabasesClient.NewListByClusterPager method. -type DatabasesClientListByClusterOptions struct { - // placeholder for future optional parameters -} - -// DatabasesClientListPrincipalsOptions contains the optional parameters for the DatabasesClient.NewListPrincipalsPager method. -type DatabasesClientListPrincipalsOptions struct { - // placeholder for future optional parameters -} - -// DatabasesClientRemovePrincipalsOptions contains the optional parameters for the DatabasesClient.RemovePrincipals method. -type DatabasesClientRemovePrincipalsOptions struct { - // placeholder for future optional parameters -} - -type DiagnoseVirtualNetworkResult struct { - // The list of network connectivity diagnostic finding - Findings []*string -} - -// EndpointDependency - A domain name that a service is reached at, including details of the current connection status. -type EndpointDependency struct { - // The domain name of the dependency. - DomainName *string - - // The ports used when connecting to DomainName. - EndpointDetails []*EndpointDetail -} - -// EndpointDetail - Current TCP connectivity information from the Kusto cluster to a single endpoint. -type EndpointDetail struct { - // The port an endpoint is connected to. - Port *int32 -} - -// EventGridConnectionProperties - Class representing the Kusto event grid connection properties. -type EventGridConnectionProperties struct { - // REQUIRED; The event hub consumer group. - ConsumerGroup *string - - // REQUIRED; The resource ID where the event grid is configured to send events. - EventHubResourceID *string - - // REQUIRED; The resource ID of the storage account where the data resides. - StorageAccountResourceID *string - - // The name of blob storage event type to process. - BlobStorageEventType *BlobStorageEventType - - // The data format of the message. Optionally the data format can be added to each message. - DataFormat *EventGridDataFormat - - // Indication for database routing information from the data connection, by default only database routing information is allowed - DatabaseRouting *DatabaseRouting - - // The resource ID of the event grid that is subscribed to the storage account events. - EventGridResourceID *string - - // A Boolean value that, if set to true, indicates that ingestion should ignore the first record of every file - IgnoreFirstRecord *bool - - // The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub and storage account. - ManagedIdentityResourceID *string - - // The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. - MappingRuleName *string - - // The table where the data should be ingested. Optionally the table information can be added to each message. - TableName *string - - // READ-ONLY; The object ID of managedIdentityResourceId - ManagedIdentityObjectID *string - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState -} - -// EventGridDataConnection - Class representing an Event Grid data connection. -type EventGridDataConnection struct { - // REQUIRED; Kind of the endpoint for the data connection - Kind *DataConnectionKind - - // Resource location. - Location *string - - // The properties of the Event Grid data connection. - Properties *EventGridConnectionProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GetDataConnection implements the DataConnectionClassification interface for type EventGridDataConnection. -func (e *EventGridDataConnection) GetDataConnection() *DataConnection { - return &DataConnection{ - Location: e.Location, - Kind: e.Kind, - ID: e.ID, - Name: e.Name, - Type: e.Type, - } -} - -// EventHubConnectionProperties - Class representing the Kusto event hub connection properties. -type EventHubConnectionProperties struct { - // REQUIRED; The event hub consumer group. - ConsumerGroup *string - - // REQUIRED; The resource ID of the event hub to be used to create a data connection. - EventHubResourceID *string - - // The event hub messages compression type - Compression *Compression - - // The data format of the message. Optionally the data format can be added to each message. - DataFormat *EventHubDataFormat - - // Indication for database routing information from the data connection, by default only database routing information is allowed - DatabaseRouting *DatabaseRouting - - // System properties of the event hub - EventSystemProperties []*string - - // The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. - ManagedIdentityResourceID *string - - // The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. - MappingRuleName *string - - // When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It can only - // retrieve events retained by the Event hub, based on its retention period. - RetrievalStartDate *time.Time - - // The table where the data should be ingested. Optionally the table information can be added to each message. - TableName *string - - // READ-ONLY; The object ID of the managedIdentityResourceId - ManagedIdentityObjectID *string - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState -} - -// EventHubDataConnection - Class representing an event hub data connection. -type EventHubDataConnection struct { - // REQUIRED; Kind of the endpoint for the data connection - Kind *DataConnectionKind - - // Resource location. - Location *string - - // The Event Hub data connection properties to validate. - Properties *EventHubConnectionProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GetDataConnection implements the DataConnectionClassification interface for type EventHubDataConnection. -func (e *EventHubDataConnection) GetDataConnection() *DataConnection { - return &DataConnection{ - Location: e.Location, - Kind: e.Kind, - ID: e.ID, - Name: e.Name, - Type: e.Type, - } -} - -// FollowerDatabaseDefinition - A class representing follower database request. -type FollowerDatabaseDefinition struct { - // REQUIRED; Resource name of the attached database configuration in the follower cluster. - AttachedDatabaseConfigurationName *string - - // REQUIRED; Resource id of the cluster that follows a database owned by this cluster. - ClusterResourceID *string - - // READ-ONLY; The database name owned by this cluster that was followed. * in case following all databases. - DatabaseName *string - - // READ-ONLY; The origin of the following setup. - DatabaseShareOrigin *DatabaseShareOrigin - - // READ-ONLY; Table level sharing specifications - TableLevelSharingProperties *TableLevelSharingProperties -} - -// FollowerDatabaseListResult - The list Kusto database principals operation response. -type FollowerDatabaseListResult struct { - // The list of follower database result. - Value []*FollowerDatabaseDefinition -} - -// Identity for the resource. -type Identity struct { - // REQUIRED; The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created - // identity and a set of user-assigned identities. The type 'None' will remove all - // identities. - Type *IdentityType - - // The list of user identities associated with the Kusto cluster. 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]*ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties - - // READ-ONLY; The principal ID of resource identity. - PrincipalID *string - - // READ-ONLY; The tenant ID of resource. - TenantID *string -} - -// IotHubConnectionProperties - Class representing the Kusto Iot hub connection properties. -type IotHubConnectionProperties struct { - // REQUIRED; The iot hub consumer group. - ConsumerGroup *string - - // REQUIRED; The resource ID of the Iot hub to be used to create a data connection. - IotHubResourceID *string - - // REQUIRED; The name of the share access policy - SharedAccessPolicyName *string - - // The data format of the message. Optionally the data format can be added to each message. - DataFormat *IotHubDataFormat - - // Indication for database routing information from the data connection, by default only database routing information is allowed - DatabaseRouting *DatabaseRouting - - // System properties of the iot hub - EventSystemProperties []*string - - // The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. - MappingRuleName *string - - // When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It can only - // retrieve events retained by the Event hub, based on its retention period. - RetrievalStartDate *time.Time - - // The table where the data should be ingested. Optionally the table information can be added to each message. - TableName *string - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState -} - -// IotHubDataConnection - Class representing an iot hub data connection. -type IotHubDataConnection struct { - // REQUIRED; Kind of the endpoint for the data connection - Kind *DataConnectionKind - - // Resource location. - Location *string - - // The Iot Hub data connection properties. - Properties *IotHubConnectionProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GetDataConnection implements the DataConnectionClassification interface for type IotHubDataConnection. -func (i *IotHubDataConnection) GetDataConnection() *DataConnection { - return &DataConnection{ - Location: i.Location, - Kind: i.Kind, - ID: i.ID, - Name: i.Name, - Type: i.Type, - } -} - -// KeyVaultProperties - Properties of the key vault. -type KeyVaultProperties struct { - // The name of the key vault key. - KeyName *string - - // The Uri of the key vault. - KeyVaultURI *string - - // The version of the key vault key. - KeyVersion *string - - // The user assigned identity (ARM resource id) that has access to the key. - UserIdentity *string -} - -// LanguageExtension - The language extension object. -type LanguageExtension struct { - // The language extension image name. - LanguageExtensionImageName *LanguageExtensionImageName - - // The language extension name. - LanguageExtensionName *LanguageExtensionName -} - -// LanguageExtensionsList - The list of language extension objects. -type LanguageExtensionsList struct { - // The list of language extensions. - Value []*LanguageExtension -} - -// ListResourceSKUsResult - List of available SKUs for a Kusto Cluster. -type ListResourceSKUsResult struct { - // The collection of available SKUs for an existing resource. - Value []*AzureResourceSKU -} - -// ManagedPrivateEndpoint - Class representing a managed private endpoint. -type ManagedPrivateEndpoint struct { - // A managed private endpoint. - Properties *ManagedPrivateEndpointProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// ManagedPrivateEndpointListResult - The list managed private endpoints operation response. -type ManagedPrivateEndpointListResult struct { - // The list of managed private endpoints. - Value []*ManagedPrivateEndpoint -} - -// ManagedPrivateEndpointProperties - A class representing the properties of a managed private endpoint object. -type ManagedPrivateEndpointProperties struct { - // REQUIRED; The groupId in which the managed private endpoint is created. - GroupID *string - - // REQUIRED; The ARM resource ID of the resource for which the managed private endpoint is created. - PrivateLinkResourceID *string - - // The region of the resource to which the managed private endpoint is created. - PrivateLinkResourceRegion *string - - // The user request message. - RequestMessage *string - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState -} - -// ManagedPrivateEndpointsCheckNameRequest - The result returned from a managedPrivateEndpoints check name availability request. -type ManagedPrivateEndpointsCheckNameRequest struct { - // REQUIRED; Managed private endpoint resource name. - Name *string - - // CONSTANT; The type of resource, for instance Microsoft.Kusto/clusters/managedPrivateEndpoints. - // Field has constant value "Microsoft.Kusto/clusters/managedPrivateEndpoints", any specified value is ignored. - Type *string -} - -// ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginCreateOrUpdate -// method. -type ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedPrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginDelete -// method. -type ManagedPrivateEndpointsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedPrivateEndpointsClientBeginUpdateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginUpdate -// method. -type ManagedPrivateEndpointsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedPrivateEndpointsClientCheckNameAvailabilityOptions contains the optional parameters for the ManagedPrivateEndpointsClient.CheckNameAvailability -// method. -type ManagedPrivateEndpointsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ManagedPrivateEndpointsClientGetOptions contains the optional parameters for the ManagedPrivateEndpointsClient.Get method. -type ManagedPrivateEndpointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagedPrivateEndpointsClientListOptions contains the optional parameters for the ManagedPrivateEndpointsClient.NewListPager -// method. -type ManagedPrivateEndpointsClientListOptions struct { - // placeholder for future optional parameters -} - -// Operation - A REST API operation -type Operation struct { - // The object that describes the operation. - Display *OperationDisplay - - // This is of the format {provider}/{resource}/{operation}. - Name *string - - // The intended executor of the operation. - Origin *string - - // Properties of the operation. - Properties any -} - -// OperationDisplay - The object that describes the operation. -type OperationDisplay struct { - // The friendly name of the operation. - Description *string - - // For example: read, write, delete. - Operation *string - - // Friendly name of the resource provider. - Provider *string - - // The resource type on which the operation is performed. - Resource *string -} - -// OperationListResult - Result of the request to list REST API operations. It contains a list of operations and a URL nextLink -// to get the next set of results. -type OperationListResult struct { - // The URL to get the next set of operation list results if there are any. - NextLink *string - - // The list of operations supported by the resource provider. - Value []*Operation -} - -// OperationResult - Operation Result Entity. -type OperationResult struct { - // The operation end time - EndTime *time.Time - - // Object that contains the error code and message if the operation failed. - Error *OperationResultErrorProperties - - // Percentage completed. - PercentComplete *float64 - - // Properties of the operation results - Properties *OperationResultProperties - - // The operation start time - StartTime *time.Time - - // READ-ONLY; ID of the resource. - ID *string - - // READ-ONLY; Name of the resource. - Name *string - - // READ-ONLY; status of the Operation result. - Status *Status -} - -// OperationResultErrorProperties - Operation result error properties -type OperationResultErrorProperties struct { - // The code of the error. - Code *string - - // The error message. - Message *string -} - -// OperationResultProperties - Operation result properties -type OperationResultProperties struct { - // The kind of the operation. - OperationKind *string - - // The state of the operation. - OperationState *string - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// OperationsResultsClientGetOptions contains the optional parameters for the OperationsResultsClient.Get method. -type OperationsResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// OperationsResultsLocationClientGetOptions contains the optional parameters for the OperationsResultsLocationClient.Get -// method. -type OperationsResultsLocationClientGetOptions struct { - // placeholder for future optional parameters -} - -// OptimizedAutoscale - A class that contains the optimized auto scale definition. -type OptimizedAutoscale struct { - // REQUIRED; A boolean value that indicate if the optimized autoscale feature is enabled or not. - IsEnabled *bool - - // REQUIRED; Maximum allowed instances count. - Maximum *int32 - - // REQUIRED; Minimum allowed instances count. - Minimum *int32 - - // REQUIRED; The version of the template defined, for instance 1. - Version *int32 -} - -// OutboundNetworkDependenciesEndpoint - Endpoints accessed for a common purpose that the Kusto Service Environment requires -// outbound network access to. -type OutboundNetworkDependenciesEndpoint struct { - // The outbound environment endpoint properties. - Properties *OutboundNetworkDependenciesEndpointProperties - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// OutboundNetworkDependenciesEndpointListResult - Collection of Outbound Environment Endpoints -type OutboundNetworkDependenciesEndpointListResult struct { - // REQUIRED; Collection of resources. - Value []*OutboundNetworkDependenciesEndpoint - - // READ-ONLY; Link to next page of resources. - NextLink *string -} - -// OutboundNetworkDependenciesEndpointProperties - Endpoints accessed for a common purpose that the Kusto Service Environment -// requires outbound network access to. -type OutboundNetworkDependenciesEndpointProperties struct { - // The type of service accessed by the Kusto Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active - // Directory. - Category *string - - // The endpoints that the Kusto Service Environment reaches the service at. - Endpoints []*EndpointDependency - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState -} - -// PrivateEndpointConnection - A private endpoint connection -type PrivateEndpointConnection struct { - // Resource properties. - Properties *PrivateEndpointConnectionProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// PrivateEndpointConnectionListResult - A list of private endpoint connections -type PrivateEndpointConnectionListResult struct { - // Array of private endpoint connections - Value []*PrivateEndpointConnection -} - -// PrivateEndpointConnectionProperties - Properties of a private endpoint connection. -type PrivateEndpointConnectionProperties struct { - // REQUIRED; Connection State of the Private Endpoint Connection. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty - - // READ-ONLY; Group id of the private endpoint. - GroupID *string - - // READ-ONLY; Private endpoint which the connection belongs to. - PrivateEndpoint *PrivateEndpointProperty - - // READ-ONLY; Provisioning state of the private endpoint. - ProvisioningState *string -} - -// PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate -// method. -type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. -type PrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager -// method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointProperty - Private endpoint which the connection belongs to. -type PrivateEndpointProperty struct { - // READ-ONLY; Resource id of the private endpoint. - ID *string -} - -// PrivateLinkResource - A private link resource -type PrivateLinkResource struct { - // Resource properties. - Properties *PrivateLinkResourceProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// PrivateLinkResourceListResult - A list of private link resources -type PrivateLinkResourceListResult struct { - // Array of private link resources - Value []*PrivateLinkResource -} - -// PrivateLinkResourceProperties - Properties of a private link resource. -type PrivateLinkResourceProperties struct { - // READ-ONLY; The private link resource group id. - GroupID *string - - // READ-ONLY; The private link resource required member names. - RequiredMembers []*string - - // READ-ONLY; The private link resource required zone names. - RequiredZoneNames []*string -} - -// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. -type PrivateLinkResourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager -// method. -type PrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServiceConnectionStateProperty - Connection State of the Private Endpoint Connection. -type PrivateLinkServiceConnectionStateProperty struct { - // The private link service connection description. - Description *string - - // The private link service connection status. - Status *string - - // READ-ONLY; Any action that is required beyond basic workflow (approve/ reject/ disconnect) - ActionsRequired *string -} - -// ReadOnlyFollowingDatabase - Class representing a read only following database. -type ReadOnlyFollowingDatabase struct { - // REQUIRED; Kind of the database - Kind *Kind - - // Resource location. - Location *string - - // The database properties. - Properties *ReadOnlyFollowingDatabaseProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GetDatabase implements the DatabaseClassification interface for type ReadOnlyFollowingDatabase. -func (r *ReadOnlyFollowingDatabase) GetDatabase() *Database { - return &Database{ - Location: r.Location, - Kind: r.Kind, - ID: r.ID, - Name: r.Name, - Type: r.Type, - } -} - -// ReadOnlyFollowingDatabaseProperties - Class representing the Kusto database properties. -type ReadOnlyFollowingDatabaseProperties struct { - // The time the data should be kept in cache for fast queries in TimeSpan. - HotCachePeriod *string - - // READ-ONLY; The name of the attached database configuration cluster - AttachedDatabaseConfigurationName *string - - // READ-ONLY; The origin of the following setup. - DatabaseShareOrigin *DatabaseShareOrigin - - // READ-ONLY; The name of the leader cluster - LeaderClusterResourceID *string - - // READ-ONLY; The original database name, before databaseNameOverride or databaseNamePrefix where applied. - OriginalDatabaseName *string - - // READ-ONLY; The principals modification kind of the database - PrincipalsModificationKind *PrincipalsModificationKind - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState - - // READ-ONLY; The time the data should be kept before it stops being accessible to queries in TimeSpan. - SoftDeletePeriod *string - - // READ-ONLY; The statistics of the database. - Statistics *DatabaseStatistics - - // READ-ONLY; Table level sharing specifications - TableLevelSharingProperties *TableLevelSharingProperties -} - -// ReadWriteDatabase - Class representing a read write database. -type ReadWriteDatabase struct { - // REQUIRED; Kind of the database - Kind *Kind - - // Resource location. - Location *string - - // The database properties. - Properties *ReadWriteDatabaseProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// GetDatabase implements the DatabaseClassification interface for type ReadWriteDatabase. -func (r *ReadWriteDatabase) GetDatabase() *Database { - return &Database{ - Location: r.Location, - Kind: r.Kind, - ID: r.ID, - Name: r.Name, - Type: r.Type, - } -} - -// ReadWriteDatabaseProperties - Class representing the Kusto database properties. -type ReadWriteDatabaseProperties struct { - // The time the data should be kept in cache for fast queries in TimeSpan. - HotCachePeriod *string - - // The time the data should be kept before it stops being accessible to queries in TimeSpan. - SoftDeletePeriod *string - - // READ-ONLY; Indicates whether the database is followed. - IsFollowed *bool - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState - - // READ-ONLY; The statistics of the database. - Statistics *DatabaseStatistics -} - -// ResourceSKUCapabilities - Describes The SKU capabilities object. -type ResourceSKUCapabilities struct { - // READ-ONLY; An invariant to describe the feature. - Name *string - - // READ-ONLY; An invariant if the feature is measured by quantity. - Value *string -} - -// ResourceSKUZoneDetails - Describes The zonal capabilities of a SKU. -type ResourceSKUZoneDetails struct { - // READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones. - Capabilities []*ResourceSKUCapabilities - - // READ-ONLY; The set of zones that the SKU is available in with the specified capabilities. - Name []*string -} - -// SKUDescription - The Kusto SKU description of given resource type -type SKUDescription struct { - // READ-ONLY; Locations and zones - LocationInfo []*SKULocationInfoItem - - // READ-ONLY; The set of locations that the SKU is available - Locations []*string - - // READ-ONLY; The name of the SKU - Name *string - - // READ-ONLY; The resource type - ResourceType *string - - // READ-ONLY; The restrictions because of which SKU cannot be used - Restrictions []any - - // READ-ONLY; The tier of the SKU - Tier *string -} - -// SKUDescriptionList - The list of the EngagementFabric SKU descriptions -type SKUDescriptionList struct { - // READ-ONLY; SKU descriptions - Value []*SKUDescription -} - -// SKULocationInfoItem - The locations and zones info for SKU. -type SKULocationInfoItem struct { - // REQUIRED; The available location of the SKU. - Location *string - - // Gets details of capabilities available to a SKU in specific zones. - ZoneDetails []*ResourceSKUZoneDetails - - // The available zone of the SKU. - Zones []*string -} - -// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. -type SKUsClientListOptions struct { - // placeholder for future optional parameters -} - -// Script - Class representing a database script. -type Script struct { - // The database script. - Properties *ScriptProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// ScriptCheckNameRequest - A script name availability request. -type ScriptCheckNameRequest struct { - // REQUIRED; Script name. - Name *string - - // CONSTANT; The type of resource, Microsoft.Kusto/clusters/databases/scripts. - // Field has constant value "Microsoft.Kusto/clusters/databases/scripts", any specified value is ignored. - Type *string -} - -// ScriptListResult - The list Kusto database script operation response. -type ScriptListResult struct { - // The list of Kusto scripts. - Value []*Script -} - -// ScriptProperties - A class representing database script property. -type ScriptProperties struct { - // Flag that indicates whether to continue if one of the command fails. - ContinueOnErrors *bool - - // A unique string. If changed the script will be applied again. - ForceUpdateTag *string - - // The script content. This property should be used when the script is provide inline and not through file in a SA. Must not - // be used together with scriptUrl and scriptUrlSasToken properties. - ScriptContent *string - - // The url to the KQL script blob file. Must not be used together with scriptContent property - ScriptURL *string - - // The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property. - ScriptURLSasToken *string - - // READ-ONLY; The provisioned state of the resource. - ProvisioningState *ProvisioningState -} - -// ScriptsClientBeginCreateOrUpdateOptions contains the optional parameters for the ScriptsClient.BeginCreateOrUpdate method. -type ScriptsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ScriptsClientBeginDeleteOptions contains the optional parameters for the ScriptsClient.BeginDelete method. -type ScriptsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ScriptsClientBeginUpdateOptions contains the optional parameters for the ScriptsClient.BeginUpdate method. -type ScriptsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ScriptsClientCheckNameAvailabilityOptions contains the optional parameters for the ScriptsClient.CheckNameAvailability -// method. -type ScriptsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ScriptsClientGetOptions contains the optional parameters for the ScriptsClient.Get method. -type ScriptsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ScriptsClientListByDatabaseOptions contains the optional parameters for the ScriptsClient.NewListByDatabasePager method. -type ScriptsClientListByDatabaseOptions struct { - // placeholder for future optional parameters -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time - - // The identity that created the resource. - CreatedBy *string - - // The type of identity that created the resource. - CreatedByType *CreatedByType - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time - - // The identity that last modified the resource. - LastModifiedBy *string - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType -} - -// TableLevelSharingProperties - Tables that will be included and excluded in the follower database -type TableLevelSharingProperties struct { - // List of external tables to exclude from the follower database - ExternalTablesToExclude []*string - - // List of external tables to include in the follower database - ExternalTablesToInclude []*string - - // List of functions to exclude from the follower database - FunctionsToExclude []*string - - // List of functions to include in the follower database - FunctionsToInclude []*string - - // List of materialized views to exclude from the follower database - MaterializedViewsToExclude []*string - - // List of materialized views to include in the follower database - MaterializedViewsToInclude []*string - - // List of tables to exclude from the follower database - TablesToExclude []*string - - // List of tables to include in the follower database - TablesToInclude []*string -} - -// TrustedExternalTenant - Represents a tenant ID that is trusted by the cluster. -type TrustedExternalTenant struct { - // GUID representing an external tenant. - Value *string -} - -// VirtualNetworkConfiguration - A class that contains virtual network definition. -type VirtualNetworkConfiguration struct { - // REQUIRED; Data management's service public IP address resource id. - DataManagementPublicIPID *string - - // REQUIRED; Engine service's public IP address resource id. - EnginePublicIPID *string - - // REQUIRED; The subnet resource id. - SubnetID *string -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/models_serde.go deleted file mode 100644 index a34f8dff..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/models_serde.go +++ /dev/null @@ -1,3686 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type AcceptedAudiences. -func (a AcceptedAudiences) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AcceptedAudiences. -func (a *AcceptedAudiences) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfiguration. -func (a AttachedDatabaseConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfiguration. -func (a *AttachedDatabaseConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationListResult. -func (a AttachedDatabaseConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfigurationListResult. -func (a *AttachedDatabaseConfigurationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationProperties. -func (a AttachedDatabaseConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "attachedDatabaseNames", a.AttachedDatabaseNames) - populate(objectMap, "clusterResourceId", a.ClusterResourceID) - populate(objectMap, "databaseName", a.DatabaseName) - populate(objectMap, "databaseNameOverride", a.DatabaseNameOverride) - populate(objectMap, "databaseNamePrefix", a.DatabaseNamePrefix) - populate(objectMap, "defaultPrincipalsModificationKind", a.DefaultPrincipalsModificationKind) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "tableLevelSharingProperties", a.TableLevelSharingProperties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfigurationProperties. -func (a *AttachedDatabaseConfigurationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "attachedDatabaseNames": - err = unpopulate(val, "AttachedDatabaseNames", &a.AttachedDatabaseNames) - delete(rawMsg, key) - case "clusterResourceId": - err = unpopulate(val, "ClusterResourceID", &a.ClusterResourceID) - delete(rawMsg, key) - case "databaseName": - err = unpopulate(val, "DatabaseName", &a.DatabaseName) - delete(rawMsg, key) - case "databaseNameOverride": - err = unpopulate(val, "DatabaseNameOverride", &a.DatabaseNameOverride) - delete(rawMsg, key) - case "databaseNamePrefix": - err = unpopulate(val, "DatabaseNamePrefix", &a.DatabaseNamePrefix) - delete(rawMsg, key) - case "defaultPrincipalsModificationKind": - err = unpopulate(val, "DefaultPrincipalsModificationKind", &a.DefaultPrincipalsModificationKind) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "tableLevelSharingProperties": - err = unpopulate(val, "TableLevelSharingProperties", &a.TableLevelSharingProperties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationsCheckNameRequest. -func (a AttachedDatabaseConfigurationsCheckNameRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", a.Name) - objectMap["type"] = "Microsoft.Kusto/clusters/attachedDatabaseConfigurations" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfigurationsCheckNameRequest. -func (a *AttachedDatabaseConfigurationsCheckNameRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureCapacity. -func (a AzureCapacity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "default", a.Default) - populate(objectMap, "maximum", a.Maximum) - populate(objectMap, "minimum", a.Minimum) - populate(objectMap, "scaleType", a.ScaleType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureCapacity. -func (a *AzureCapacity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "default": - err = unpopulate(val, "Default", &a.Default) - delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &a.Maximum) - delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &a.Minimum) - delete(rawMsg, key) - case "scaleType": - err = unpopulate(val, "ScaleType", &a.ScaleType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureResourceSKU. -func (a AzureResourceSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "capacity", a.Capacity) - populate(objectMap, "resourceType", a.ResourceType) - populate(objectMap, "sku", a.SKU) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceSKU. -func (a *AzureResourceSKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacity": - err = unpopulate(val, "Capacity", &a.Capacity) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &a.ResourceType) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &a.SKU) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureSKU. -func (a AzureSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "capacity", a.Capacity) - populate(objectMap, "name", a.Name) - populate(objectMap, "tier", a.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSKU. -func (a *AzureSKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacity": - err = unpopulate(val, "Capacity", &a.Capacity) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &a.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CheckNameRequest. -func (c CheckNameRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameRequest. -func (c *CheckNameRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CheckNameResult. -func (c CheckNameResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "message", c.Message) - populate(objectMap, "name", c.Name) - populate(objectMap, "nameAvailable", c.NameAvailable) - populate(objectMap, "reason", c.Reason) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameResult. -func (c *CheckNameResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "nameAvailable": - err = unpopulate(val, "NameAvailable", &c.NameAvailable) - delete(rawMsg, key) - case "reason": - err = unpopulate(val, "Reason", &c.Reason) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Cluster. -func (c Cluster) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "sku", c.SKU) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - populate(objectMap, "zones", c.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Cluster. -func (c *Cluster) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &c.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &c.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &c.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClusterCheckNameRequest. -func (c ClusterCheckNameRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - objectMap["type"] = "Microsoft.Kusto/clusters" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterCheckNameRequest. -func (c *ClusterCheckNameRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClusterListResult. -func (c ClusterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterListResult. -func (c *ClusterListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignment. -func (c ClusterPrincipalAssignment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignment. -func (c *ClusterPrincipalAssignment) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignmentCheckNameRequest. -func (c ClusterPrincipalAssignmentCheckNameRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", c.Name) - objectMap["type"] = "Microsoft.Kusto/clusters/principalAssignments" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignmentCheckNameRequest. -func (c *ClusterPrincipalAssignmentCheckNameRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignmentListResult. -func (c ClusterPrincipalAssignmentListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignmentListResult. -func (c *ClusterPrincipalAssignmentListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalProperties. -func (c ClusterPrincipalProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "aadObjectId", c.AADObjectID) - populate(objectMap, "principalId", c.PrincipalID) - populate(objectMap, "principalName", c.PrincipalName) - populate(objectMap, "principalType", c.PrincipalType) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "role", c.Role) - populate(objectMap, "tenantId", c.TenantID) - populate(objectMap, "tenantName", c.TenantName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalProperties. -func (c *ClusterPrincipalProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aadObjectId": - err = unpopulate(val, "AADObjectID", &c.AADObjectID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &c.PrincipalID) - delete(rawMsg, key) - case "principalName": - err = unpopulate(val, "PrincipalName", &c.PrincipalName) - delete(rawMsg, key) - case "principalType": - err = unpopulate(val, "PrincipalType", &c.PrincipalType) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "role": - err = unpopulate(val, "Role", &c.Role) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &c.TenantID) - delete(rawMsg, key) - case "tenantName": - err = unpopulate(val, "TenantName", &c.TenantName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClusterProperties. -func (c ClusterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "acceptedAudiences", c.AcceptedAudiences) - populate(objectMap, "allowedFqdnList", c.AllowedFqdnList) - populate(objectMap, "allowedIpRangeList", c.AllowedIPRangeList) - populate(objectMap, "dataIngestionUri", c.DataIngestionURI) - populate(objectMap, "enableAutoStop", c.EnableAutoStop) - populate(objectMap, "enableDiskEncryption", c.EnableDiskEncryption) - populate(objectMap, "enableDoubleEncryption", c.EnableDoubleEncryption) - populate(objectMap, "enablePurge", c.EnablePurge) - populate(objectMap, "enableStreamingIngest", c.EnableStreamingIngest) - populate(objectMap, "engineType", c.EngineType) - populate(objectMap, "keyVaultProperties", c.KeyVaultProperties) - populate(objectMap, "languageExtensions", c.LanguageExtensions) - populate(objectMap, "optimizedAutoscale", c.OptimizedAutoscale) - populate(objectMap, "privateEndpointConnections", c.PrivateEndpointConnections) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "publicIPType", c.PublicIPType) - populate(objectMap, "publicNetworkAccess", c.PublicNetworkAccess) - populate(objectMap, "restrictOutboundNetworkAccess", c.RestrictOutboundNetworkAccess) - populate(objectMap, "state", c.State) - populate(objectMap, "stateReason", c.StateReason) - populate(objectMap, "trustedExternalTenants", c.TrustedExternalTenants) - populate(objectMap, "uri", c.URI) - populate(objectMap, "virtualClusterGraduationProperties", c.VirtualClusterGraduationProperties) - populate(objectMap, "virtualNetworkConfiguration", c.VirtualNetworkConfiguration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProperties. -func (c *ClusterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "acceptedAudiences": - err = unpopulate(val, "AcceptedAudiences", &c.AcceptedAudiences) - delete(rawMsg, key) - case "allowedFqdnList": - err = unpopulate(val, "AllowedFqdnList", &c.AllowedFqdnList) - delete(rawMsg, key) - case "allowedIpRangeList": - err = unpopulate(val, "AllowedIPRangeList", &c.AllowedIPRangeList) - delete(rawMsg, key) - case "dataIngestionUri": - err = unpopulate(val, "DataIngestionURI", &c.DataIngestionURI) - delete(rawMsg, key) - case "enableAutoStop": - err = unpopulate(val, "EnableAutoStop", &c.EnableAutoStop) - delete(rawMsg, key) - case "enableDiskEncryption": - err = unpopulate(val, "EnableDiskEncryption", &c.EnableDiskEncryption) - delete(rawMsg, key) - case "enableDoubleEncryption": - err = unpopulate(val, "EnableDoubleEncryption", &c.EnableDoubleEncryption) - delete(rawMsg, key) - case "enablePurge": - err = unpopulate(val, "EnablePurge", &c.EnablePurge) - delete(rawMsg, key) - case "enableStreamingIngest": - err = unpopulate(val, "EnableStreamingIngest", &c.EnableStreamingIngest) - delete(rawMsg, key) - case "engineType": - err = unpopulate(val, "EngineType", &c.EngineType) - delete(rawMsg, key) - case "keyVaultProperties": - err = unpopulate(val, "KeyVaultProperties", &c.KeyVaultProperties) - delete(rawMsg, key) - case "languageExtensions": - err = unpopulate(val, "LanguageExtensions", &c.LanguageExtensions) - delete(rawMsg, key) - case "optimizedAutoscale": - err = unpopulate(val, "OptimizedAutoscale", &c.OptimizedAutoscale) - delete(rawMsg, key) - case "privateEndpointConnections": - err = unpopulate(val, "PrivateEndpointConnections", &c.PrivateEndpointConnections) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "publicIPType": - err = unpopulate(val, "PublicIPType", &c.PublicIPType) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &c.PublicNetworkAccess) - delete(rawMsg, key) - case "restrictOutboundNetworkAccess": - err = unpopulate(val, "RestrictOutboundNetworkAccess", &c.RestrictOutboundNetworkAccess) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &c.State) - delete(rawMsg, key) - case "stateReason": - err = unpopulate(val, "StateReason", &c.StateReason) - delete(rawMsg, key) - case "trustedExternalTenants": - err = unpopulate(val, "TrustedExternalTenants", &c.TrustedExternalTenants) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &c.URI) - delete(rawMsg, key) - case "virtualClusterGraduationProperties": - err = unpopulate(val, "VirtualClusterGraduationProperties", &c.VirtualClusterGraduationProperties) - delete(rawMsg, key) - case "virtualNetworkConfiguration": - err = unpopulate(val, "VirtualNetworkConfiguration", &c.VirtualNetworkConfiguration) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClusterUpdate. -func (c ClusterUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "sku", c.SKU) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpdate. -func (c *ClusterUpdate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &c.SKU) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. -func (c ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "clientId", c.ClientID) - populate(objectMap, "principalId", c.PrincipalID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. -func (c *ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &c.ClientID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &c.PrincipalID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CosmosDbDataConnection. -func (c CosmosDbDataConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", c.ID) - objectMap["kind"] = DataConnectionKindCosmosDb - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CosmosDbDataConnection. -func (c *CosmosDbDataConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &c.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CosmosDbDataConnectionProperties. -func (c CosmosDbDataConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cosmosDbAccountResourceId", c.CosmosDbAccountResourceID) - populate(objectMap, "cosmosDbContainer", c.CosmosDbContainer) - populate(objectMap, "cosmosDbDatabase", c.CosmosDbDatabase) - populate(objectMap, "managedIdentityObjectId", c.ManagedIdentityObjectID) - populate(objectMap, "managedIdentityResourceId", c.ManagedIdentityResourceID) - populate(objectMap, "mappingRuleName", c.MappingRuleName) - populate(objectMap, "provisioningState", c.ProvisioningState) - populateTimeRFC3339(objectMap, "retrievalStartDate", c.RetrievalStartDate) - populate(objectMap, "tableName", c.TableName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CosmosDbDataConnectionProperties. -func (c *CosmosDbDataConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cosmosDbAccountResourceId": - err = unpopulate(val, "CosmosDbAccountResourceID", &c.CosmosDbAccountResourceID) - delete(rawMsg, key) - case "cosmosDbContainer": - err = unpopulate(val, "CosmosDbContainer", &c.CosmosDbContainer) - delete(rawMsg, key) - case "cosmosDbDatabase": - err = unpopulate(val, "CosmosDbDatabase", &c.CosmosDbDatabase) - delete(rawMsg, key) - case "managedIdentityObjectId": - err = unpopulate(val, "ManagedIdentityObjectID", &c.ManagedIdentityObjectID) - delete(rawMsg, key) - case "managedIdentityResourceId": - err = unpopulate(val, "ManagedIdentityResourceID", &c.ManagedIdentityResourceID) - delete(rawMsg, key) - case "mappingRuleName": - err = unpopulate(val, "MappingRuleName", &c.MappingRuleName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "retrievalStartDate": - err = unpopulateTimeRFC3339(val, "RetrievalStartDate", &c.RetrievalStartDate) - delete(rawMsg, key) - case "tableName": - err = unpopulate(val, "TableName", &c.TableName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataConnection. -func (d DataConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - objectMap["kind"] = d.Kind - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnection. -func (d *DataConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &d.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataConnectionCheckNameRequest. -func (d DataConnectionCheckNameRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - objectMap["type"] = "Microsoft.Kusto/clusters/databases/dataConnections" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionCheckNameRequest. -func (d *DataConnectionCheckNameRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataConnectionListResult. -func (d DataConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionListResult. -func (d *DataConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - d.Value, err = unmarshalDataConnectionClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataConnectionValidation. -func (d DataConnectionValidation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "dataConnectionName", d.DataConnectionName) - populate(objectMap, "properties", d.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidation. -func (d *DataConnectionValidation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataConnectionName": - err = unpopulate(val, "DataConnectionName", &d.DataConnectionName) - delete(rawMsg, key) - case "properties": - d.Properties, err = unmarshalDataConnectionClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataConnectionValidationListResult. -func (d DataConnectionValidationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidationListResult. -func (d *DataConnectionValidationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataConnectionValidationResult. -func (d DataConnectionValidationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "errorMessage", d.ErrorMessage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidationResult. -func (d *DataConnectionValidationResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &d.ErrorMessage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Database. -func (d Database) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - objectMap["kind"] = d.Kind - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Database. -func (d *Database) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &d.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseListResult. -func (d DatabaseListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseListResult. -func (d *DatabaseListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - d.Value, err = unmarshalDatabaseClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipal. -func (d DatabasePrincipal) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "appId", d.AppID) - populate(objectMap, "email", d.Email) - populate(objectMap, "fqn", d.Fqn) - populate(objectMap, "name", d.Name) - populate(objectMap, "role", d.Role) - populate(objectMap, "tenantName", d.TenantName) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipal. -func (d *DatabasePrincipal) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appId": - err = unpopulate(val, "AppID", &d.AppID) - delete(rawMsg, key) - case "email": - err = unpopulate(val, "Email", &d.Email) - delete(rawMsg, key) - case "fqn": - err = unpopulate(val, "Fqn", &d.Fqn) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "role": - err = unpopulate(val, "Role", &d.Role) - delete(rawMsg, key) - case "tenantName": - err = unpopulate(val, "TenantName", &d.TenantName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignment. -func (d DatabasePrincipalAssignment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignment. -func (d *DatabasePrincipalAssignment) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignmentCheckNameRequest. -func (d DatabasePrincipalAssignmentCheckNameRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", d.Name) - objectMap["type"] = "Microsoft.Kusto/clusters/databases/principalAssignments" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignmentCheckNameRequest. -func (d *DatabasePrincipalAssignmentCheckNameRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignmentListResult. -func (d DatabasePrincipalAssignmentListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignmentListResult. -func (d *DatabasePrincipalAssignmentListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalListRequest. -func (d DatabasePrincipalListRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalListRequest. -func (d *DatabasePrincipalListRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalListResult. -func (d DatabasePrincipalListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalListResult. -func (d *DatabasePrincipalListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalProperties. -func (d DatabasePrincipalProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "aadObjectId", d.AADObjectID) - populate(objectMap, "principalId", d.PrincipalID) - populate(objectMap, "principalName", d.PrincipalName) - populate(objectMap, "principalType", d.PrincipalType) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "role", d.Role) - populate(objectMap, "tenantId", d.TenantID) - populate(objectMap, "tenantName", d.TenantName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalProperties. -func (d *DatabasePrincipalProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aadObjectId": - err = unpopulate(val, "AADObjectID", &d.AADObjectID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &d.PrincipalID) - delete(rawMsg, key) - case "principalName": - err = unpopulate(val, "PrincipalName", &d.PrincipalName) - delete(rawMsg, key) - case "principalType": - err = unpopulate(val, "PrincipalType", &d.PrincipalType) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "role": - err = unpopulate(val, "Role", &d.Role) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &d.TenantID) - delete(rawMsg, key) - case "tenantName": - err = unpopulate(val, "TenantName", &d.TenantName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatabaseStatistics. -func (d DatabaseStatistics) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "size", d.Size) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseStatistics. -func (d *DatabaseStatistics) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "size": - err = unpopulate(val, "Size", &d.Size) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnoseVirtualNetworkResult. -func (d DiagnoseVirtualNetworkResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "findings", d.Findings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnoseVirtualNetworkResult. -func (d *DiagnoseVirtualNetworkResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "findings": - err = unpopulate(val, "Findings", &d.Findings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointDependency. -func (e EndpointDependency) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "domainName", e.DomainName) - populate(objectMap, "endpointDetails", e.EndpointDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency. -func (e *EndpointDependency) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "domainName": - err = unpopulate(val, "DomainName", &e.DomainName) - delete(rawMsg, key) - case "endpointDetails": - err = unpopulate(val, "EndpointDetails", &e.EndpointDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointDetail. -func (e EndpointDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "port", e.Port) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail. -func (e *EndpointDetail) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "port": - err = unpopulate(val, "Port", &e.Port) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventGridConnectionProperties. -func (e EventGridConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "blobStorageEventType", e.BlobStorageEventType) - populate(objectMap, "consumerGroup", e.ConsumerGroup) - populate(objectMap, "dataFormat", e.DataFormat) - populate(objectMap, "databaseRouting", e.DatabaseRouting) - populate(objectMap, "eventGridResourceId", e.EventGridResourceID) - populate(objectMap, "eventHubResourceId", e.EventHubResourceID) - populate(objectMap, "ignoreFirstRecord", e.IgnoreFirstRecord) - populate(objectMap, "managedIdentityObjectId", e.ManagedIdentityObjectID) - populate(objectMap, "managedIdentityResourceId", e.ManagedIdentityResourceID) - populate(objectMap, "mappingRuleName", e.MappingRuleName) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "storageAccountResourceId", e.StorageAccountResourceID) - populate(objectMap, "tableName", e.TableName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridConnectionProperties. -func (e *EventGridConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blobStorageEventType": - err = unpopulate(val, "BlobStorageEventType", &e.BlobStorageEventType) - delete(rawMsg, key) - case "consumerGroup": - err = unpopulate(val, "ConsumerGroup", &e.ConsumerGroup) - delete(rawMsg, key) - case "dataFormat": - err = unpopulate(val, "DataFormat", &e.DataFormat) - delete(rawMsg, key) - case "databaseRouting": - err = unpopulate(val, "DatabaseRouting", &e.DatabaseRouting) - delete(rawMsg, key) - case "eventGridResourceId": - err = unpopulate(val, "EventGridResourceID", &e.EventGridResourceID) - delete(rawMsg, key) - case "eventHubResourceId": - err = unpopulate(val, "EventHubResourceID", &e.EventHubResourceID) - delete(rawMsg, key) - case "ignoreFirstRecord": - err = unpopulate(val, "IgnoreFirstRecord", &e.IgnoreFirstRecord) - delete(rawMsg, key) - case "managedIdentityObjectId": - err = unpopulate(val, "ManagedIdentityObjectID", &e.ManagedIdentityObjectID) - delete(rawMsg, key) - case "managedIdentityResourceId": - err = unpopulate(val, "ManagedIdentityResourceID", &e.ManagedIdentityResourceID) - delete(rawMsg, key) - case "mappingRuleName": - err = unpopulate(val, "MappingRuleName", &e.MappingRuleName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "storageAccountResourceId": - err = unpopulate(val, "StorageAccountResourceID", &e.StorageAccountResourceID) - delete(rawMsg, key) - case "tableName": - err = unpopulate(val, "TableName", &e.TableName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventGridDataConnection. -func (e EventGridDataConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", e.ID) - objectMap["kind"] = DataConnectionKindEventGrid - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridDataConnection. -func (e *EventGridDataConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &e.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventHubConnectionProperties. -func (e EventHubConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "compression", e.Compression) - populate(objectMap, "consumerGroup", e.ConsumerGroup) - populate(objectMap, "dataFormat", e.DataFormat) - populate(objectMap, "databaseRouting", e.DatabaseRouting) - populate(objectMap, "eventHubResourceId", e.EventHubResourceID) - populate(objectMap, "eventSystemProperties", e.EventSystemProperties) - populate(objectMap, "managedIdentityObjectId", e.ManagedIdentityObjectID) - populate(objectMap, "managedIdentityResourceId", e.ManagedIdentityResourceID) - populate(objectMap, "mappingRuleName", e.MappingRuleName) - populate(objectMap, "provisioningState", e.ProvisioningState) - populateTimeRFC3339(objectMap, "retrievalStartDate", e.RetrievalStartDate) - populate(objectMap, "tableName", e.TableName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventHubConnectionProperties. -func (e *EventHubConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "compression": - err = unpopulate(val, "Compression", &e.Compression) - delete(rawMsg, key) - case "consumerGroup": - err = unpopulate(val, "ConsumerGroup", &e.ConsumerGroup) - delete(rawMsg, key) - case "dataFormat": - err = unpopulate(val, "DataFormat", &e.DataFormat) - delete(rawMsg, key) - case "databaseRouting": - err = unpopulate(val, "DatabaseRouting", &e.DatabaseRouting) - delete(rawMsg, key) - case "eventHubResourceId": - err = unpopulate(val, "EventHubResourceID", &e.EventHubResourceID) - delete(rawMsg, key) - case "eventSystemProperties": - err = unpopulate(val, "EventSystemProperties", &e.EventSystemProperties) - delete(rawMsg, key) - case "managedIdentityObjectId": - err = unpopulate(val, "ManagedIdentityObjectID", &e.ManagedIdentityObjectID) - delete(rawMsg, key) - case "managedIdentityResourceId": - err = unpopulate(val, "ManagedIdentityResourceID", &e.ManagedIdentityResourceID) - delete(rawMsg, key) - case "mappingRuleName": - err = unpopulate(val, "MappingRuleName", &e.MappingRuleName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "retrievalStartDate": - err = unpopulateTimeRFC3339(val, "RetrievalStartDate", &e.RetrievalStartDate) - delete(rawMsg, key) - case "tableName": - err = unpopulate(val, "TableName", &e.TableName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventHubDataConnection. -func (e EventHubDataConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", e.ID) - objectMap["kind"] = DataConnectionKindEventHub - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventHubDataConnection. -func (e *EventHubDataConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &e.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FollowerDatabaseDefinition. -func (f FollowerDatabaseDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "attachedDatabaseConfigurationName", f.AttachedDatabaseConfigurationName) - populate(objectMap, "clusterResourceId", f.ClusterResourceID) - populate(objectMap, "databaseName", f.DatabaseName) - populate(objectMap, "databaseShareOrigin", f.DatabaseShareOrigin) - populate(objectMap, "tableLevelSharingProperties", f.TableLevelSharingProperties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FollowerDatabaseDefinition. -func (f *FollowerDatabaseDefinition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "attachedDatabaseConfigurationName": - err = unpopulate(val, "AttachedDatabaseConfigurationName", &f.AttachedDatabaseConfigurationName) - delete(rawMsg, key) - case "clusterResourceId": - err = unpopulate(val, "ClusterResourceID", &f.ClusterResourceID) - delete(rawMsg, key) - case "databaseName": - err = unpopulate(val, "DatabaseName", &f.DatabaseName) - delete(rawMsg, key) - case "databaseShareOrigin": - err = unpopulate(val, "DatabaseShareOrigin", &f.DatabaseShareOrigin) - delete(rawMsg, key) - case "tableLevelSharingProperties": - err = unpopulate(val, "TableLevelSharingProperties", &f.TableLevelSharingProperties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FollowerDatabaseListResult. -func (f FollowerDatabaseListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FollowerDatabaseListResult. -func (f *FollowerDatabaseListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &f.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Identity. -func (i Identity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "principalId", i.PrincipalID) - populate(objectMap, "tenantId", i.TenantID) - populate(objectMap, "type", i.Type) - populate(objectMap, "userAssignedIdentities", i.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Identity. -func (i *Identity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "principalId": - err = unpopulate(val, "PrincipalID", &i.PrincipalID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &i.TenantID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &i.UserAssignedIdentities) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IotHubConnectionProperties. -func (i IotHubConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "consumerGroup", i.ConsumerGroup) - populate(objectMap, "dataFormat", i.DataFormat) - populate(objectMap, "databaseRouting", i.DatabaseRouting) - populate(objectMap, "eventSystemProperties", i.EventSystemProperties) - populate(objectMap, "iotHubResourceId", i.IotHubResourceID) - populate(objectMap, "mappingRuleName", i.MappingRuleName) - populate(objectMap, "provisioningState", i.ProvisioningState) - populateTimeRFC3339(objectMap, "retrievalStartDate", i.RetrievalStartDate) - populate(objectMap, "sharedAccessPolicyName", i.SharedAccessPolicyName) - populate(objectMap, "tableName", i.TableName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IotHubConnectionProperties. -func (i *IotHubConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "consumerGroup": - err = unpopulate(val, "ConsumerGroup", &i.ConsumerGroup) - delete(rawMsg, key) - case "dataFormat": - err = unpopulate(val, "DataFormat", &i.DataFormat) - delete(rawMsg, key) - case "databaseRouting": - err = unpopulate(val, "DatabaseRouting", &i.DatabaseRouting) - delete(rawMsg, key) - case "eventSystemProperties": - err = unpopulate(val, "EventSystemProperties", &i.EventSystemProperties) - delete(rawMsg, key) - case "iotHubResourceId": - err = unpopulate(val, "IotHubResourceID", &i.IotHubResourceID) - delete(rawMsg, key) - case "mappingRuleName": - err = unpopulate(val, "MappingRuleName", &i.MappingRuleName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) - delete(rawMsg, key) - case "retrievalStartDate": - err = unpopulateTimeRFC3339(val, "RetrievalStartDate", &i.RetrievalStartDate) - delete(rawMsg, key) - case "sharedAccessPolicyName": - err = unpopulate(val, "SharedAccessPolicyName", &i.SharedAccessPolicyName) - delete(rawMsg, key) - case "tableName": - err = unpopulate(val, "TableName", &i.TableName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IotHubDataConnection. -func (i IotHubDataConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", i.ID) - objectMap["kind"] = DataConnectionKindIotHub - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IotHubDataConnection. -func (i *IotHubDataConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &i.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &i.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties. -func (k KeyVaultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "keyName", k.KeyName) - populate(objectMap, "keyVaultUri", k.KeyVaultURI) - populate(objectMap, "keyVersion", k.KeyVersion) - populate(objectMap, "userIdentity", k.UserIdentity) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties. -func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "keyName": - err = unpopulate(val, "KeyName", &k.KeyName) - delete(rawMsg, key) - case "keyVaultUri": - err = unpopulate(val, "KeyVaultURI", &k.KeyVaultURI) - delete(rawMsg, key) - case "keyVersion": - err = unpopulate(val, "KeyVersion", &k.KeyVersion) - delete(rawMsg, key) - case "userIdentity": - err = unpopulate(val, "UserIdentity", &k.UserIdentity) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LanguageExtension. -func (l LanguageExtension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "languageExtensionImageName", l.LanguageExtensionImageName) - populate(objectMap, "languageExtensionName", l.LanguageExtensionName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LanguageExtension. -func (l *LanguageExtension) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "languageExtensionImageName": - err = unpopulate(val, "LanguageExtensionImageName", &l.LanguageExtensionImageName) - delete(rawMsg, key) - case "languageExtensionName": - err = unpopulate(val, "LanguageExtensionName", &l.LanguageExtensionName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LanguageExtensionsList. -func (l LanguageExtensionsList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LanguageExtensionsList. -func (l *LanguageExtensionsList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListResourceSKUsResult. -func (l ListResourceSKUsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListResourceSKUsResult. -func (l *ListResourceSKUsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpoint. -func (m ManagedPrivateEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpoint. -func (m *ManagedPrivateEndpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointListResult. -func (m ManagedPrivateEndpointListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointListResult. -func (m *ManagedPrivateEndpointListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointProperties. -func (m ManagedPrivateEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "groupId", m.GroupID) - populate(objectMap, "privateLinkResourceId", m.PrivateLinkResourceID) - populate(objectMap, "privateLinkResourceRegion", m.PrivateLinkResourceRegion) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "requestMessage", m.RequestMessage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointProperties. -func (m *ManagedPrivateEndpointProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupId": - err = unpopulate(val, "GroupID", &m.GroupID) - delete(rawMsg, key) - case "privateLinkResourceId": - err = unpopulate(val, "PrivateLinkResourceID", &m.PrivateLinkResourceID) - delete(rawMsg, key) - case "privateLinkResourceRegion": - err = unpopulate(val, "PrivateLinkResourceRegion", &m.PrivateLinkResourceRegion) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "requestMessage": - err = unpopulate(val, "RequestMessage", &m.RequestMessage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointsCheckNameRequest. -func (m ManagedPrivateEndpointsCheckNameRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", m.Name) - objectMap["type"] = "Microsoft.Kusto/clusters/managedPrivateEndpoints" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointsCheckNameRequest. -func (m *ManagedPrivateEndpointsCheckNameRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "display", o.Display) - populate(objectMap, "name", o.Name) - populate(objectMap, "origin", o.Origin) - populateAny(objectMap, "properties", o.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. -func (o *Operation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "display": - err = unpopulate(val, "Display", &o.Display) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &o.Origin) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. -func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", o.Description) - populate(objectMap, "operation", o.Operation) - populate(objectMap, "provider", o.Provider) - populate(objectMap, "resource", o.Resource) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. -func (o *OperationDisplay) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &o.Operation) - delete(rawMsg, key) - case "provider": - err = unpopulate(val, "Provider", &o.Provider) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &o.Resource) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. -func (o *OperationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationResult. -func (o OperationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", o.EndTime) - populate(objectMap, "error", o.Error) - populate(objectMap, "id", o.ID) - populate(objectMap, "name", o.Name) - populate(objectMap, "percentComplete", o.PercentComplete) - populate(objectMap, "properties", o.Properties) - populateTimeRFC3339(objectMap, "startTime", o.StartTime) - populate(objectMap, "status", o.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResult. -func (o *OperationResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &o.Error) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "percentComplete": - err = unpopulate(val, "PercentComplete", &o.PercentComplete) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &o.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationResultErrorProperties. -func (o OperationResultErrorProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", o.Code) - populate(objectMap, "message", o.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultErrorProperties. -func (o *OperationResultErrorProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &o.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &o.Message) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationResultProperties. -func (o OperationResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "operationKind", o.OperationKind) - populate(objectMap, "operationState", o.OperationState) - populate(objectMap, "provisioningState", o.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultProperties. -func (o *OperationResultProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "operationKind": - err = unpopulate(val, "OperationKind", &o.OperationKind) - delete(rawMsg, key) - case "operationState": - err = unpopulate(val, "OperationState", &o.OperationState) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OptimizedAutoscale. -func (o OptimizedAutoscale) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "isEnabled", o.IsEnabled) - populate(objectMap, "maximum", o.Maximum) - populate(objectMap, "minimum", o.Minimum) - populate(objectMap, "version", o.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OptimizedAutoscale. -func (o *OptimizedAutoscale) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isEnabled": - err = unpopulate(val, "IsEnabled", &o.IsEnabled) - delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &o.Maximum) - delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &o.Minimum) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &o.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OutboundNetworkDependenciesEndpoint. -func (o OutboundNetworkDependenciesEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "etag", o.Etag) - populate(objectMap, "id", o.ID) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "type", o.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundNetworkDependenciesEndpoint. -func (o *OutboundNetworkDependenciesEndpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &o.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &o.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OutboundNetworkDependenciesEndpointListResult. -func (o OutboundNetworkDependenciesEndpointListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundNetworkDependenciesEndpointListResult. -func (o *OutboundNetworkDependenciesEndpointListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OutboundNetworkDependenciesEndpointProperties. -func (o OutboundNetworkDependenciesEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "category", o.Category) - populate(objectMap, "endpoints", o.Endpoints) - populate(objectMap, "provisioningState", o.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundNetworkDependenciesEndpointProperties. -func (o *OutboundNetworkDependenciesEndpointProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "category": - err = unpopulate(val, "Category", &o.Category) - delete(rawMsg, key) - case "endpoints": - err = unpopulate(val, "Endpoints", &o.Endpoints) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. -func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. -func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. -func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. -func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. -func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "privateEndpoint", p.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", p.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. -func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupId": - err = unpopulate(val, "GroupID", &p.GroupID) - delete(rawMsg, key) - case "privateEndpoint": - err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) - delete(rawMsg, key) - case "privateLinkServiceConnectionState": - err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperty. -func (p PrivateEndpointProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointProperty. -func (p *PrivateEndpointProperty) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. -func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. -func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. -func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. -func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. -func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "requiredMembers", p.RequiredMembers) - populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. -func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupId": - err = unpopulate(val, "GroupID", &p.GroupID) - delete(rawMsg, key) - case "requiredMembers": - err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) - delete(rawMsg, key) - case "requiredZoneNames": - err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionStateProperty. -func (p PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "actionsRequired", p.ActionsRequired) - populate(objectMap, "description", p.Description) - populate(objectMap, "status", p.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionStateProperty. -func (p *PrivateLinkServiceConnectionStateProperty) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionsRequired": - err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReadOnlyFollowingDatabase. -func (r ReadOnlyFollowingDatabase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - objectMap["kind"] = KindReadOnlyFollowing - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReadOnlyFollowingDatabase. -func (r *ReadOnlyFollowingDatabase) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &r.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReadOnlyFollowingDatabaseProperties. -func (r ReadOnlyFollowingDatabaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "attachedDatabaseConfigurationName", r.AttachedDatabaseConfigurationName) - populate(objectMap, "databaseShareOrigin", r.DatabaseShareOrigin) - populate(objectMap, "hotCachePeriod", r.HotCachePeriod) - populate(objectMap, "leaderClusterResourceId", r.LeaderClusterResourceID) - populate(objectMap, "originalDatabaseName", r.OriginalDatabaseName) - populate(objectMap, "principalsModificationKind", r.PrincipalsModificationKind) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "softDeletePeriod", r.SoftDeletePeriod) - populate(objectMap, "statistics", r.Statistics) - populate(objectMap, "tableLevelSharingProperties", r.TableLevelSharingProperties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReadOnlyFollowingDatabaseProperties. -func (r *ReadOnlyFollowingDatabaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "attachedDatabaseConfigurationName": - err = unpopulate(val, "AttachedDatabaseConfigurationName", &r.AttachedDatabaseConfigurationName) - delete(rawMsg, key) - case "databaseShareOrigin": - err = unpopulate(val, "DatabaseShareOrigin", &r.DatabaseShareOrigin) - delete(rawMsg, key) - case "hotCachePeriod": - err = unpopulate(val, "HotCachePeriod", &r.HotCachePeriod) - delete(rawMsg, key) - case "leaderClusterResourceId": - err = unpopulate(val, "LeaderClusterResourceID", &r.LeaderClusterResourceID) - delete(rawMsg, key) - case "originalDatabaseName": - err = unpopulate(val, "OriginalDatabaseName", &r.OriginalDatabaseName) - delete(rawMsg, key) - case "principalsModificationKind": - err = unpopulate(val, "PrincipalsModificationKind", &r.PrincipalsModificationKind) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "softDeletePeriod": - err = unpopulate(val, "SoftDeletePeriod", &r.SoftDeletePeriod) - delete(rawMsg, key) - case "statistics": - err = unpopulate(val, "Statistics", &r.Statistics) - delete(rawMsg, key) - case "tableLevelSharingProperties": - err = unpopulate(val, "TableLevelSharingProperties", &r.TableLevelSharingProperties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReadWriteDatabase. -func (r ReadWriteDatabase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", r.ID) - objectMap["kind"] = KindReadWrite - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReadWriteDatabase. -func (r *ReadWriteDatabase) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &r.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReadWriteDatabaseProperties. -func (r ReadWriteDatabaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "hotCachePeriod", r.HotCachePeriod) - populate(objectMap, "isFollowed", r.IsFollowed) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "softDeletePeriod", r.SoftDeletePeriod) - populate(objectMap, "statistics", r.Statistics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReadWriteDatabaseProperties. -func (r *ReadWriteDatabaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "hotCachePeriod": - err = unpopulate(val, "HotCachePeriod", &r.HotCachePeriod) - delete(rawMsg, key) - case "isFollowed": - err = unpopulate(val, "IsFollowed", &r.IsFollowed) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "softDeletePeriod": - err = unpopulate(val, "SoftDeletePeriod", &r.SoftDeletePeriod) - delete(rawMsg, key) - case "statistics": - err = unpopulate(val, "Statistics", &r.Statistics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities. -func (r ResourceSKUCapabilities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", r.Name) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapabilities. -func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceSKUZoneDetails. -func (r ResourceSKUZoneDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "capabilities", r.Capabilities) - populate(objectMap, "name", r.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUZoneDetails. -func (r *ResourceSKUZoneDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capabilities": - err = unpopulate(val, "Capabilities", &r.Capabilities) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKUDescription. -func (s SKUDescription) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "locationInfo", s.LocationInfo) - populate(objectMap, "locations", s.Locations) - populate(objectMap, "name", s.Name) - populate(objectMap, "resourceType", s.ResourceType) - populate(objectMap, "restrictions", s.Restrictions) - populate(objectMap, "tier", s.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescription. -func (s *SKUDescription) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "locationInfo": - err = unpopulate(val, "LocationInfo", &s.LocationInfo) - delete(rawMsg, key) - case "locations": - err = unpopulate(val, "Locations", &s.Locations) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &s.ResourceType) - delete(rawMsg, key) - case "restrictions": - err = unpopulate(val, "Restrictions", &s.Restrictions) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &s.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKUDescriptionList. -func (s SKUDescriptionList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescriptionList. -func (s *SKUDescriptionList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKULocationInfoItem. -func (s SKULocationInfoItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "location", s.Location) - populate(objectMap, "zoneDetails", s.ZoneDetails) - populate(objectMap, "zones", s.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKULocationInfoItem. -func (s *SKULocationInfoItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - case "zoneDetails": - err = unpopulate(val, "ZoneDetails", &s.ZoneDetails) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &s.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Script. -func (s Script) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Script. -func (s *Script) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ScriptCheckNameRequest. -func (s ScriptCheckNameRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", s.Name) - objectMap["type"] = "Microsoft.Kusto/clusters/databases/scripts" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptCheckNameRequest. -func (s *ScriptCheckNameRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ScriptListResult. -func (s ScriptListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptListResult. -func (s *ScriptListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ScriptProperties. -func (s ScriptProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "continueOnErrors", s.ContinueOnErrors) - populate(objectMap, "forceUpdateTag", s.ForceUpdateTag) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "scriptContent", s.ScriptContent) - populate(objectMap, "scriptUrl", s.ScriptURL) - populate(objectMap, "scriptUrlSasToken", s.ScriptURLSasToken) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptProperties. -func (s *ScriptProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "continueOnErrors": - err = unpopulate(val, "ContinueOnErrors", &s.ContinueOnErrors) - delete(rawMsg, key) - case "forceUpdateTag": - err = unpopulate(val, "ForceUpdateTag", &s.ForceUpdateTag) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "scriptContent": - err = unpopulate(val, "ScriptContent", &s.ScriptContent) - delete(rawMsg, key) - case "scriptUrl": - err = unpopulate(val, "ScriptURL", &s.ScriptURL) - delete(rawMsg, key) - case "scriptUrlSasToken": - err = unpopulate(val, "ScriptURLSasToken", &s.ScriptURLSasToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TableLevelSharingProperties. -func (t TableLevelSharingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "externalTablesToExclude", t.ExternalTablesToExclude) - populate(objectMap, "externalTablesToInclude", t.ExternalTablesToInclude) - populate(objectMap, "functionsToExclude", t.FunctionsToExclude) - populate(objectMap, "functionsToInclude", t.FunctionsToInclude) - populate(objectMap, "materializedViewsToExclude", t.MaterializedViewsToExclude) - populate(objectMap, "materializedViewsToInclude", t.MaterializedViewsToInclude) - populate(objectMap, "tablesToExclude", t.TablesToExclude) - populate(objectMap, "tablesToInclude", t.TablesToInclude) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TableLevelSharingProperties. -func (t *TableLevelSharingProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "externalTablesToExclude": - err = unpopulate(val, "ExternalTablesToExclude", &t.ExternalTablesToExclude) - delete(rawMsg, key) - case "externalTablesToInclude": - err = unpopulate(val, "ExternalTablesToInclude", &t.ExternalTablesToInclude) - delete(rawMsg, key) - case "functionsToExclude": - err = unpopulate(val, "FunctionsToExclude", &t.FunctionsToExclude) - delete(rawMsg, key) - case "functionsToInclude": - err = unpopulate(val, "FunctionsToInclude", &t.FunctionsToInclude) - delete(rawMsg, key) - case "materializedViewsToExclude": - err = unpopulate(val, "MaterializedViewsToExclude", &t.MaterializedViewsToExclude) - delete(rawMsg, key) - case "materializedViewsToInclude": - err = unpopulate(val, "MaterializedViewsToInclude", &t.MaterializedViewsToInclude) - delete(rawMsg, key) - case "tablesToExclude": - err = unpopulate(val, "TablesToExclude", &t.TablesToExclude) - delete(rawMsg, key) - case "tablesToInclude": - err = unpopulate(val, "TablesToInclude", &t.TablesToInclude) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TrustedExternalTenant. -func (t TrustedExternalTenant) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "value", t.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TrustedExternalTenant. -func (t *TrustedExternalTenant) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &t.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkConfiguration. -func (v VirtualNetworkConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "dataManagementPublicIpId", v.DataManagementPublicIPID) - populate(objectMap, "enginePublicIpId", v.EnginePublicIPID) - populate(objectMap, "subnetId", v.SubnetID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkConfiguration. -func (v *VirtualNetworkConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataManagementPublicIpId": - err = unpopulate(val, "DataManagementPublicIPID", &v.DataManagementPublicIPID) - delete(rawMsg, key) - case "enginePublicIpId": - err = unpopulate(val, "EnginePublicIPID", &v.EnginePublicIPID) - delete(rawMsg, key) - case "subnetId": - err = unpopulate(val, "SubnetID", &v.SubnetID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -func populate(m map[string]any, k string, v any) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func populateAny(m map[string]any, k string, v any) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v any) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/operations_client.go deleted file mode 100644 index dccd3175..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/operations_client.go +++ /dev/null @@ -1,94 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - internal *arm.Client -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - internal: cl, - } - return client, nil -} - -// NewListPager - Lists available operations for the Microsoft.Kusto provider. -// -// Generated from API version 2022-12-29 -// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Kusto/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/operationsresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/operationsresults_client.go deleted file mode 100644 index 66c4336b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/operationsresults_client.go +++ /dev/null @@ -1,103 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// OperationsResultsClient contains the methods for the OperationsResults group. -// Don't use this type directly, use NewOperationsResultsClient() instead. -type OperationsResultsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewOperationsResultsClient creates a new instance of OperationsResultsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewOperationsResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsResultsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsResultsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &OperationsResultsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// Get - Returns operation results. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - location - Azure location (region) name. -// - operationID - The Guid of the operation ID -// - options - OperationsResultsClientGetOptions contains the optional parameters for the OperationsResultsClient.Get method. -func (client *OperationsResultsClient) Get(ctx context.Context, location string, operationID string, options *OperationsResultsClientGetOptions) (OperationsResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, location, operationID, options) - if err != nil { - return OperationsResultsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *OperationsResultsClient) getCreateRequest(ctx context.Context, location string, operationID string, options *OperationsResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationResults/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *OperationsResultsClient) getHandleResponse(resp *http.Response) (OperationsResultsClientGetResponse, error) { - result := OperationsResultsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationResult); err != nil { - return OperationsResultsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client.go deleted file mode 100644 index 0e189c17..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/operationsresultslocation_client.go +++ /dev/null @@ -1,94 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// OperationsResultsLocationClient contains the methods for the OperationsResultsLocation group. -// Don't use this type directly, use NewOperationsResultsLocationClient() instead. -type OperationsResultsLocationClient struct { - internal *arm.Client - subscriptionID string -} - -// NewOperationsResultsLocationClient creates a new instance of OperationsResultsLocationClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewOperationsResultsLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsResultsLocationClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsResultsLocationClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &OperationsResultsLocationClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// Get - Returns operation results. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - location - Azure location (region) name. -// - operationID - The Guid of the operation ID -// - options - OperationsResultsLocationClientGetOptions contains the optional parameters for the OperationsResultsLocationClient.Get -// method. -func (client *OperationsResultsLocationClient) Get(ctx context.Context, location string, operationID string, options *OperationsResultsLocationClientGetOptions) (OperationsResultsLocationClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, location, operationID, options) - if err != nil { - return OperationsResultsLocationClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsResultsLocationClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return OperationsResultsLocationClientGetResponse{}, runtime.NewResponseError(resp) - } - return OperationsResultsLocationClientGetResponse{}, nil -} - -// getCreateRequest creates the Get request. -func (client *OperationsResultsLocationClient) getCreateRequest(ctx context.Context, location string, operationID string, options *OperationsResultsLocationClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationResults/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/polymorphic_helpers.go deleted file mode 100644 index feafa2f7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/polymorphic_helpers.go +++ /dev/null @@ -1,94 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import "encoding/json" - -func unmarshalDataConnectionClassification(rawMsg json.RawMessage) (DataConnectionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b DataConnectionClassification - switch m["kind"] { - case string(DataConnectionKindCosmosDb): - b = &CosmosDbDataConnection{} - case string(DataConnectionKindEventGrid): - b = &EventGridDataConnection{} - case string(DataConnectionKindEventHub): - b = &EventHubDataConnection{} - case string(DataConnectionKindIotHub): - b = &IotHubDataConnection{} - default: - b = &DataConnection{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalDataConnectionClassificationArray(rawMsg json.RawMessage) ([]DataConnectionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]DataConnectionClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalDataConnectionClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalDatabaseClassification(rawMsg json.RawMessage) (DatabaseClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b DatabaseClassification - switch m["kind"] { - case string(KindReadOnlyFollowing): - b = &ReadOnlyFollowingDatabase{} - case string(KindReadWrite): - b = &ReadWriteDatabase{} - default: - b = &Database{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalDatabaseClassificationArray(rawMsg json.RawMessage) ([]DatabaseClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]DatabaseClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalDatabaseClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client.go deleted file mode 100644 index 6ef92bd2..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/privateendpointconnections_client.go +++ /dev/null @@ -1,313 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. -// Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead. -type PrivateEndpointConnectionsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &PrivateEndpointConnectionsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - privateEndpointConnectionName - The name of the private endpoint connection. -// - options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate -// method. -func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateEndpointConnectionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// CreateOrUpdate - Approve or reject a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - privateEndpointConnectionName - The name of the private endpoint connection. -// - options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. -func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Deletes a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a private endpoint connection. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - privateEndpointConnectionName - The name of the private endpoint connection. -// - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, options) - if err != nil { - return PrivateEndpointConnectionsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateEndpointConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientGetResponse, error) { - result := PrivateEndpointConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { - return PrivateEndpointConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Returns the list of private endpoint connections. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager -// method. -func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, clusterName string, options *PrivateEndpointConnectionsClientListOptions) *runtime.Pager[PrivateEndpointConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListResponse]{ - More: func(page PrivateEndpointConnectionsClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListResponse) (PrivateEndpointConnectionsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return PrivateEndpointConnectionsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateEndpointConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *PrivateEndpointConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PrivateEndpointConnectionsClient) listHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientListResponse, error) { - result := PrivateEndpointConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResult); err != nil { - return PrivateEndpointConnectionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client.go deleted file mode 100644 index 4cf6159c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/privatelinkresources_client.go +++ /dev/null @@ -1,173 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. -// Don't use this type directly, use NewPrivateLinkResourcesClient() instead. -type PrivateLinkResourcesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { - cl, err := arm.NewClient(moduleName+".PrivateLinkResourcesClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &PrivateLinkResourcesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// Get - Gets a private link resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - privateLinkResourceName - The name of the private link resource. -// - options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get -// method. -func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, privateLinkResourceName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, privateLinkResourceName, options) - if err != nil { - return PrivateLinkResourcesClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateLinkResourcesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, privateLinkResourceName string, options *PrivateLinkResourcesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - if privateLinkResourceName == "" { - return nil, errors.New("parameter privateLinkResourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateLinkResourceName}", url.PathEscape(privateLinkResourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) (PrivateLinkResourcesClientGetResponse, error) { - result := PrivateLinkResourcesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResource); err != nil { - return PrivateLinkResourcesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Returns the list of private link resources. -// -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. -// - clusterName - The name of the Kusto cluster. -// - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager -// method. -func (client *PrivateLinkResourcesClient) NewListPager(resourceGroupName string, clusterName string, options *PrivateLinkResourcesClientListOptions) *runtime.Pager[PrivateLinkResourcesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateLinkResourcesClientListResponse]{ - More: func(page PrivateLinkResourcesClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *PrivateLinkResourcesClientListResponse) (PrivateLinkResourcesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return PrivateLinkResourcesClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PrivateLinkResourcesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *PrivateLinkResourcesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if clusterName == "" { - return nil, errors.New("parameter clusterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PrivateLinkResourcesClient) listHandleResponse(resp *http.Response) (PrivateLinkResourcesClientListResponse, error) { - result := PrivateLinkResourcesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourceListResult); err != nil { - return PrivateLinkResourcesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/response_types.go deleted file mode 100644 index 58c8fbd8..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/response_types.go +++ /dev/null @@ -1,425 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -// AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse contains the response from method AttachedDatabaseConfigurationsClient.CheckNameAvailability. -type AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse struct { - CheckNameResult -} - -// AttachedDatabaseConfigurationsClientCreateOrUpdateResponse contains the response from method AttachedDatabaseConfigurationsClient.BeginCreateOrUpdate. -type AttachedDatabaseConfigurationsClientCreateOrUpdateResponse struct { - AttachedDatabaseConfiguration -} - -// AttachedDatabaseConfigurationsClientDeleteResponse contains the response from method AttachedDatabaseConfigurationsClient.BeginDelete. -type AttachedDatabaseConfigurationsClientDeleteResponse struct { - // placeholder for future response values -} - -// AttachedDatabaseConfigurationsClientGetResponse contains the response from method AttachedDatabaseConfigurationsClient.Get. -type AttachedDatabaseConfigurationsClientGetResponse struct { - AttachedDatabaseConfiguration -} - -// AttachedDatabaseConfigurationsClientListByClusterResponse contains the response from method AttachedDatabaseConfigurationsClient.NewListByClusterPager. -type AttachedDatabaseConfigurationsClientListByClusterResponse struct { - AttachedDatabaseConfigurationListResult -} - -// ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse contains the response from method ClusterPrincipalAssignmentsClient.CheckNameAvailability. -type ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse struct { - CheckNameResult -} - -// ClusterPrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method ClusterPrincipalAssignmentsClient.BeginCreateOrUpdate. -type ClusterPrincipalAssignmentsClientCreateOrUpdateResponse struct { - ClusterPrincipalAssignment -} - -// ClusterPrincipalAssignmentsClientDeleteResponse contains the response from method ClusterPrincipalAssignmentsClient.BeginDelete. -type ClusterPrincipalAssignmentsClientDeleteResponse struct { - // placeholder for future response values -} - -// ClusterPrincipalAssignmentsClientGetResponse contains the response from method ClusterPrincipalAssignmentsClient.Get. -type ClusterPrincipalAssignmentsClientGetResponse struct { - ClusterPrincipalAssignment -} - -// ClusterPrincipalAssignmentsClientListResponse contains the response from method ClusterPrincipalAssignmentsClient.NewListPager. -type ClusterPrincipalAssignmentsClientListResponse struct { - ClusterPrincipalAssignmentListResult -} - -// ClustersClientAddLanguageExtensionsResponse contains the response from method ClustersClient.BeginAddLanguageExtensions. -type ClustersClientAddLanguageExtensionsResponse struct { - // placeholder for future response values -} - -// ClustersClientCheckNameAvailabilityResponse contains the response from method ClustersClient.CheckNameAvailability. -type ClustersClientCheckNameAvailabilityResponse struct { - CheckNameResult -} - -// ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.BeginCreateOrUpdate. -type ClustersClientCreateOrUpdateResponse struct { - Cluster -} - -// ClustersClientDeleteResponse contains the response from method ClustersClient.BeginDelete. -type ClustersClientDeleteResponse struct { - // placeholder for future response values -} - -// ClustersClientDetachFollowerDatabasesResponse contains the response from method ClustersClient.BeginDetachFollowerDatabases. -type ClustersClientDetachFollowerDatabasesResponse struct { - // placeholder for future response values -} - -// ClustersClientDiagnoseVirtualNetworkResponse contains the response from method ClustersClient.BeginDiagnoseVirtualNetwork. -type ClustersClientDiagnoseVirtualNetworkResponse struct { - DiagnoseVirtualNetworkResult -} - -// ClustersClientGetResponse contains the response from method ClustersClient.Get. -type ClustersClientGetResponse struct { - Cluster -} - -// ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager. -type ClustersClientListByResourceGroupResponse struct { - ClusterListResult -} - -// ClustersClientListFollowerDatabasesResponse contains the response from method ClustersClient.NewListFollowerDatabasesPager. -type ClustersClientListFollowerDatabasesResponse struct { - FollowerDatabaseListResult -} - -// ClustersClientListLanguageExtensionsResponse contains the response from method ClustersClient.NewListLanguageExtensionsPager. -type ClustersClientListLanguageExtensionsResponse struct { - LanguageExtensionsList -} - -// ClustersClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method ClustersClient.NewListOutboundNetworkDependenciesEndpointsPager. -type ClustersClientListOutboundNetworkDependenciesEndpointsResponse struct { - OutboundNetworkDependenciesEndpointListResult -} - -// ClustersClientListResponse contains the response from method ClustersClient.NewListPager. -type ClustersClientListResponse struct { - ClusterListResult -} - -// ClustersClientListSKUsByResourceResponse contains the response from method ClustersClient.NewListSKUsByResourcePager. -type ClustersClientListSKUsByResourceResponse struct { - ListResourceSKUsResult -} - -// ClustersClientListSKUsResponse contains the response from method ClustersClient.NewListSKUsPager. -type ClustersClientListSKUsResponse struct { - SKUDescriptionList -} - -// ClustersClientRemoveLanguageExtensionsResponse contains the response from method ClustersClient.BeginRemoveLanguageExtensions. -type ClustersClientRemoveLanguageExtensionsResponse struct { - // placeholder for future response values -} - -// ClustersClientStartResponse contains the response from method ClustersClient.BeginStart. -type ClustersClientStartResponse struct { - // placeholder for future response values -} - -// ClustersClientStopResponse contains the response from method ClustersClient.BeginStop. -type ClustersClientStopResponse struct { - // placeholder for future response values -} - -// ClustersClientUpdateResponse contains the response from method ClustersClient.BeginUpdate. -type ClustersClientUpdateResponse struct { - Cluster -} - -// DataConnectionsClientCheckNameAvailabilityResponse contains the response from method DataConnectionsClient.CheckNameAvailability. -type DataConnectionsClientCheckNameAvailabilityResponse struct { - CheckNameResult -} - -// DataConnectionsClientCreateOrUpdateResponse contains the response from method DataConnectionsClient.BeginCreateOrUpdate. -type DataConnectionsClientCreateOrUpdateResponse struct { - DataConnectionClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionsClientCreateOrUpdateResponse. -func (d *DataConnectionsClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalDataConnectionClassification(data) - if err != nil { - return err - } - d.DataConnectionClassification = res - return nil -} - -// DataConnectionsClientDataConnectionValidationResponse contains the response from method DataConnectionsClient.BeginDataConnectionValidation. -type DataConnectionsClientDataConnectionValidationResponse struct { - DataConnectionValidationListResult -} - -// DataConnectionsClientDeleteResponse contains the response from method DataConnectionsClient.BeginDelete. -type DataConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// DataConnectionsClientGetResponse contains the response from method DataConnectionsClient.Get. -type DataConnectionsClientGetResponse struct { - DataConnectionClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionsClientGetResponse. -func (d *DataConnectionsClientGetResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalDataConnectionClassification(data) - if err != nil { - return err - } - d.DataConnectionClassification = res - return nil -} - -// DataConnectionsClientListByDatabaseResponse contains the response from method DataConnectionsClient.NewListByDatabasePager. -type DataConnectionsClientListByDatabaseResponse struct { - DataConnectionListResult -} - -// DataConnectionsClientUpdateResponse contains the response from method DataConnectionsClient.BeginUpdate. -type DataConnectionsClientUpdateResponse struct { - DataConnectionClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionsClientUpdateResponse. -func (d *DataConnectionsClientUpdateResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalDataConnectionClassification(data) - if err != nil { - return err - } - d.DataConnectionClassification = res - return nil -} - -// DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse contains the response from method DatabasePrincipalAssignmentsClient.CheckNameAvailability. -type DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse struct { - CheckNameResult -} - -// DatabasePrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method DatabasePrincipalAssignmentsClient.BeginCreateOrUpdate. -type DatabasePrincipalAssignmentsClientCreateOrUpdateResponse struct { - DatabasePrincipalAssignment -} - -// DatabasePrincipalAssignmentsClientDeleteResponse contains the response from method DatabasePrincipalAssignmentsClient.BeginDelete. -type DatabasePrincipalAssignmentsClientDeleteResponse struct { - // placeholder for future response values -} - -// DatabasePrincipalAssignmentsClientGetResponse contains the response from method DatabasePrincipalAssignmentsClient.Get. -type DatabasePrincipalAssignmentsClientGetResponse struct { - DatabasePrincipalAssignment -} - -// DatabasePrincipalAssignmentsClientListResponse contains the response from method DatabasePrincipalAssignmentsClient.NewListPager. -type DatabasePrincipalAssignmentsClientListResponse struct { - DatabasePrincipalAssignmentListResult -} - -// DatabasesClientAddPrincipalsResponse contains the response from method DatabasesClient.AddPrincipals. -type DatabasesClientAddPrincipalsResponse struct { - DatabasePrincipalListResult -} - -// DatabasesClientCheckNameAvailabilityResponse contains the response from method DatabasesClient.CheckNameAvailability. -type DatabasesClientCheckNameAvailabilityResponse struct { - CheckNameResult -} - -// DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.BeginCreateOrUpdate. -type DatabasesClientCreateOrUpdateResponse struct { - DatabaseClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasesClientCreateOrUpdateResponse. -func (d *DatabasesClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalDatabaseClassification(data) - if err != nil { - return err - } - d.DatabaseClassification = res - return nil -} - -// DatabasesClientDeleteResponse contains the response from method DatabasesClient.BeginDelete. -type DatabasesClientDeleteResponse struct { - // placeholder for future response values -} - -// DatabasesClientGetResponse contains the response from method DatabasesClient.Get. -type DatabasesClientGetResponse struct { - DatabaseClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasesClientGetResponse. -func (d *DatabasesClientGetResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalDatabaseClassification(data) - if err != nil { - return err - } - d.DatabaseClassification = res - return nil -} - -// DatabasesClientListByClusterResponse contains the response from method DatabasesClient.NewListByClusterPager. -type DatabasesClientListByClusterResponse struct { - DatabaseListResult -} - -// DatabasesClientListPrincipalsResponse contains the response from method DatabasesClient.NewListPrincipalsPager. -type DatabasesClientListPrincipalsResponse struct { - DatabasePrincipalListResult -} - -// DatabasesClientRemovePrincipalsResponse contains the response from method DatabasesClient.RemovePrincipals. -type DatabasesClientRemovePrincipalsResponse struct { - DatabasePrincipalListResult -} - -// DatabasesClientUpdateResponse contains the response from method DatabasesClient.BeginUpdate. -type DatabasesClientUpdateResponse struct { - DatabaseClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasesClientUpdateResponse. -func (d *DatabasesClientUpdateResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalDatabaseClassification(data) - if err != nil { - return err - } - d.DatabaseClassification = res - return nil -} - -// ManagedPrivateEndpointsClientCheckNameAvailabilityResponse contains the response from method ManagedPrivateEndpointsClient.CheckNameAvailability. -type ManagedPrivateEndpointsClientCheckNameAvailabilityResponse struct { - CheckNameResult -} - -// ManagedPrivateEndpointsClientCreateOrUpdateResponse contains the response from method ManagedPrivateEndpointsClient.BeginCreateOrUpdate. -type ManagedPrivateEndpointsClientCreateOrUpdateResponse struct { - ManagedPrivateEndpoint -} - -// ManagedPrivateEndpointsClientDeleteResponse contains the response from method ManagedPrivateEndpointsClient.BeginDelete. -type ManagedPrivateEndpointsClientDeleteResponse struct { - // placeholder for future response values -} - -// ManagedPrivateEndpointsClientGetResponse contains the response from method ManagedPrivateEndpointsClient.Get. -type ManagedPrivateEndpointsClientGetResponse struct { - ManagedPrivateEndpoint -} - -// ManagedPrivateEndpointsClientListResponse contains the response from method ManagedPrivateEndpointsClient.NewListPager. -type ManagedPrivateEndpointsClientListResponse struct { - ManagedPrivateEndpointListResult -} - -// ManagedPrivateEndpointsClientUpdateResponse contains the response from method ManagedPrivateEndpointsClient.BeginUpdate. -type ManagedPrivateEndpointsClientUpdateResponse struct { - ManagedPrivateEndpoint -} - -// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. -type OperationsClientListResponse struct { - OperationListResult -} - -// OperationsResultsClientGetResponse contains the response from method OperationsResultsClient.Get. -type OperationsResultsClientGetResponse struct { - OperationResult -} - -// OperationsResultsLocationClientGetResponse contains the response from method OperationsResultsLocationClient.Get. -type OperationsResultsLocationClientGetResponse struct { - // placeholder for future response values -} - -// PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate. -type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { - PrivateEndpointConnection -} - -// PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. -type PrivateEndpointConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. -type PrivateEndpointConnectionsClientGetResponse struct { - PrivateEndpointConnection -} - -// PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager. -type PrivateEndpointConnectionsClientListResponse struct { - PrivateEndpointConnectionListResult -} - -// PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get. -type PrivateLinkResourcesClientGetResponse struct { - PrivateLinkResource -} - -// PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.NewListPager. -type PrivateLinkResourcesClientListResponse struct { - PrivateLinkResourceListResult -} - -// SKUsClientListResponse contains the response from method SKUsClient.NewListPager. -type SKUsClientListResponse struct { - SKUDescriptionList -} - -// ScriptsClientCheckNameAvailabilityResponse contains the response from method ScriptsClient.CheckNameAvailability. -type ScriptsClientCheckNameAvailabilityResponse struct { - CheckNameResult -} - -// ScriptsClientCreateOrUpdateResponse contains the response from method ScriptsClient.BeginCreateOrUpdate. -type ScriptsClientCreateOrUpdateResponse struct { - Script -} - -// ScriptsClientDeleteResponse contains the response from method ScriptsClient.BeginDelete. -type ScriptsClientDeleteResponse struct { - // placeholder for future response values -} - -// ScriptsClientGetResponse contains the response from method ScriptsClient.Get. -type ScriptsClientGetResponse struct { - Script -} - -// ScriptsClientListByDatabaseResponse contains the response from method ScriptsClient.NewListByDatabasePager. -type ScriptsClientListByDatabaseResponse struct { - ScriptListResult -} - -// ScriptsClientUpdateResponse contains the response from method ScriptsClient.BeginUpdate. -type ScriptsClientUpdateResponse struct { - Script -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/skus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/skus_client.go deleted file mode 100644 index ac8fd77f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/skus_client.go +++ /dev/null @@ -1,104 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SKUsClient contains the methods for the SKUs group. -// Don't use this type directly, use NewSKUsClient() instead. -type SKUsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewSKUsClient creates a new instance of SKUsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { - cl, err := arm.NewClient(moduleName+".SKUsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &SKUsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// NewListPager - Lists eligible region SKUs for Kusto resource provider by Azure region. -// -// Generated from API version 2022-12-29 -// - location - Azure location (region) name. -// - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. -func (client *SKUsClient) NewListPager(location string, options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ - More: func(page SKUsClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *SKUsClientListResponse) (SKUsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, location, options) - if err != nil { - return SKUsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return SKUsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SKUsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SKUsClient) listCreateRequest(ctx context.Context, location string, options *SKUsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/skus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SKUsClient) listHandleResponse(resp *http.Response) (SKUsClientListResponse, error) { - result := SKUsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SKUDescriptionList); err != nil { - return SKUsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/time_rfc3339.go deleted file mode 100644 index ad076a47..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/time_rfc3339.go +++ /dev/null @@ -1,87 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armkusto - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/CHANGELOG.md new file mode 100644 index 00000000..96db04f1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/CHANGELOG.md @@ -0,0 +1,167 @@ +# Release History + +## 2.3.0 (2025-01-24) +### Features Added + +- New value `ClusterPrincipalRoleAllDatabasesMonitor` added to enum type `ClusterPrincipalRole` +- New value `LanguageExtensionImageNamePython3117`, `LanguageExtensionImageNamePython3117DL` added to enum type `LanguageExtensionImageName` +- New enum type `CalloutType` with values `CalloutTypeAzureDigitalTwins`, `CalloutTypeAzureOpenai`, `CalloutTypeCosmosdb`, `CalloutTypeExternalData`, `CalloutTypeGenevametrics`, `CalloutTypeKusto`, `CalloutTypeMysql`, `CalloutTypePostgresql`, `CalloutTypeSQL`, `CalloutTypeSandboxArtifacts`, `CalloutTypeWebapi` +- New enum type `OutboundAccess` with values `OutboundAccessAllow`, `OutboundAccessDeny` +- New enum type `PrincipalPermissionsAction` with values `PrincipalPermissionsActionRemovePermissionOnScriptCompletion`, `PrincipalPermissionsActionRetainPermissionOnScriptCompletion` +- New enum type `ScriptLevel` with values `ScriptLevelCluster`, `ScriptLevelDatabase` +- New enum type `ZoneStatus` with values `ZoneStatusNonZonal`, `ZoneStatusZonal`, `ZoneStatusZonalInconsistency` +- New function `*ClustersClient.BeginAddCalloutPolicies(context.Context, string, string, CalloutPoliciesList, *ClustersClientBeginAddCalloutPoliciesOptions) (*runtime.Poller[ClustersClientAddCalloutPoliciesResponse], error)` +- New function `*ClustersClient.NewListCalloutPoliciesPager(string, string, *ClustersClientListCalloutPoliciesOptions) *runtime.Pager[ClustersClientListCalloutPoliciesResponse]` +- New function `*ClustersClient.NewListFollowerDatabasesGetPager(string, string, *ClustersClientListFollowerDatabasesGetOptions) *runtime.Pager[ClustersClientListFollowerDatabasesGetResponse]` +- New function `*ClustersClient.BeginRemoveCalloutPolicy(context.Context, string, string, CalloutPolicyToRemove, *ClustersClientBeginRemoveCalloutPolicyOptions) (*runtime.Poller[ClustersClientRemoveCalloutPolicyResponse], error)` +- New struct `CalloutPoliciesList` +- New struct `CalloutPolicy` +- New struct `CalloutPolicyToRemove` +- New struct `FollowerDatabaseDefinitionGet` +- New struct `FollowerDatabaseListResultGet` +- New struct `FollowerDatabaseProperties` +- New field `CalloutPolicies`, `ZoneStatus` in struct `ClusterProperties` +- New field `BaseImageName` in struct `SandboxCustomImageProperties` +- New field `PrincipalPermissionsAction`, `ScriptLevel` in struct `ScriptProperties` + + +## 2.2.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.1.0 (2023-10-27) +### Features Added + +- New value `LanguageExtensionImageNamePython3108DL`, `LanguageExtensionImageNamePythonCustomImage` added to enum type `LanguageExtensionImageName` +- New enum type `Language` with values `LanguagePython` +- New enum type `VnetState` with values `VnetStateDisabled`, `VnetStateEnabled` +- New function `*ClientFactory.NewSandboxCustomImagesClient() *SandboxCustomImagesClient` +- New function `NewSandboxCustomImagesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SandboxCustomImagesClient, error)` +- New function `*SandboxCustomImagesClient.CheckNameAvailability(context.Context, string, string, SandboxCustomImagesCheckNameRequest, *SandboxCustomImagesClientCheckNameAvailabilityOptions) (SandboxCustomImagesClientCheckNameAvailabilityResponse, error)` +- New function `*SandboxCustomImagesClient.BeginCreateOrUpdate(context.Context, string, string, string, SandboxCustomImage, *SandboxCustomImagesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SandboxCustomImagesClientCreateOrUpdateResponse], error)` +- New function `*SandboxCustomImagesClient.BeginDelete(context.Context, string, string, string, *SandboxCustomImagesClientBeginDeleteOptions) (*runtime.Poller[SandboxCustomImagesClientDeleteResponse], error)` +- New function `*SandboxCustomImagesClient.Get(context.Context, string, string, string, *SandboxCustomImagesClientGetOptions) (SandboxCustomImagesClientGetResponse, error)` +- New function `*SandboxCustomImagesClient.NewListByClusterPager(string, string, *SandboxCustomImagesClientListByClusterOptions) *runtime.Pager[SandboxCustomImagesClientListByClusterResponse]` +- New function `*SandboxCustomImagesClient.BeginUpdate(context.Context, string, string, string, SandboxCustomImage, *SandboxCustomImagesClientBeginUpdateOptions) (*runtime.Poller[SandboxCustomImagesClientUpdateResponse], error)` +- New struct `SandboxCustomImage` +- New struct `SandboxCustomImageProperties` +- New struct `SandboxCustomImagesCheckNameRequest` +- New struct `SandboxCustomImagesListResult` +- New field `Zones` in struct `ClusterUpdate` +- New field `IPAddress` in struct `EndpointDetail` +- New field `LanguageExtensionCustomImageName` in struct `LanguageExtension` +- New field `State` in struct `VirtualNetworkConfiguration` + + +## 2.0.0 (2023-07-28) +### Breaking Changes + +- `LanguageExtensionImageNamePython3912`, `LanguageExtensionImageNamePython3912IncludeDeepLearning` from enum `LanguageExtensionImageName` has been removed + +### Features Added + +- New value `StateMigrated` added to enum type `State` +- New enum type `MigrationClusterRole` with values `MigrationClusterRoleDestination`, `MigrationClusterRoleSource` +- New function `*ClientFactory.NewDatabaseClient() *DatabaseClient` +- New function `*ClustersClient.BeginMigrate(context.Context, string, string, ClusterMigrateRequest, *ClustersClientBeginMigrateOptions) (*runtime.Poller[ClustersClientMigrateResponse], error)` +- New function `NewDatabaseClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DatabaseClient, error)` +- New function `*DatabaseClient.InviteFollower(context.Context, string, string, string, DatabaseInviteFollowerRequest, *DatabaseClientInviteFollowerOptions) (DatabaseClientInviteFollowerResponse, error)` +- New struct `ClusterMigrateRequest` +- New struct `DatabaseInviteFollowerRequest` +- New struct `DatabaseInviteFollowerResult` +- New struct `MigrationClusterProperties` +- New struct `SuspensionDetails` +- New field `MigrationCluster` in struct `ClusterProperties` +- New field `NextLink` in struct `DatabaseListResult` +- New field `Skiptoken`, `Top` in struct `DatabasesClientListByClusterOptions` +- New field `AzureAsyncOperation` in struct `OperationsResultsLocationClientGetResponse` +- New field `SuspensionDetails` in struct `ReadOnlyFollowingDatabaseProperties` +- New field `KeyVaultProperties`, `SuspensionDetails` in struct `ReadWriteDatabaseProperties` + + +## 1.3.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + + +## 1.3.0 (2023-03-31) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + + +## 1.2.0 (2023-02-24) +### Features Added + +- New value `AzureSKUNameStandardL32AsV3`, `AzureSKUNameStandardL32SV3` added to type alias `AzureSKUName` +- New value `DataConnectionKindCosmosDb` added to type alias `DataConnectionKind` +- New value `ProvisioningStateCanceled` added to type alias `ProvisioningState` +- New type alias `LanguageExtensionImageName` with values `LanguageExtensionImageNamePython3108`, `LanguageExtensionImageNamePython365`, `LanguageExtensionImageNamePython3912`, `LanguageExtensionImageNamePython3912IncludeDeepLearning`, `LanguageExtensionImageNameR` +- New function `*CosmosDbDataConnection.GetDataConnection() *DataConnection` +- New function `NewSKUsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SKUsClient, error)` +- New function `*SKUsClient.NewListPager(string, *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]` +- New struct `CosmosDbDataConnection` +- New struct `CosmosDbDataConnectionProperties` +- New struct `ResourceSKUCapabilities` +- New struct `ResourceSKUZoneDetails` +- New struct `SKUsClient` +- New struct `SKUsClientListResponse` +- New field `LanguageExtensionImageName` in struct `LanguageExtension` +- New field `ZoneDetails` in struct `SKULocationInfoItem` +- New field `FunctionsToExclude` in struct `TableLevelSharingProperties` +- New field `FunctionsToInclude` in struct `TableLevelSharingProperties` + + +## 1.1.0 (2022-09-15) +### Features Added + +- New const `AzureSKUNameStandardEC8AsV51TBPS` +- New const `AzureSKUNameStandardEC8AdsV5` +- New const `AzureSKUNameStandardL8AsV3` +- New const `AzureSKUNameStandardL8SV3` +- New const `AzureSKUNameStandardE8DV5` +- New const `AzureSKUNameStandardE16DV4` +- New const `AzureSKUNameStandardL16AsV3` +- New const `AzureSKUNameStandardEC16AsV54TBPS` +- New const `AzureSKUNameStandardEC16AsV53TBPS` +- New const `AzureSKUNameStandardE8DV4` +- New const `DatabaseShareOriginDirect` +- New const `AzureSKUNameStandardE2DV4` +- New const `AzureSKUNameStandardE2DV5` +- New const `AzureSKUNameStandardL16SV3` +- New const `DatabaseShareOriginDataShare` +- New const `AzureSKUNameStandardE16DV5` +- New const `CallerRoleAdmin` +- New const `DatabaseShareOriginOther` +- New const `AzureSKUNameStandardEC8AsV52TBPS` +- New const `AzureSKUNameStandardE4DV4` +- New const `AzureSKUNameStandardEC16AdsV5` +- New const `CallerRoleNone` +- New const `AzureSKUNameStandardE4DV5` +- New type alias `CallerRole` +- New type alias `DatabaseShareOrigin` +- New function `PossibleDatabaseShareOriginValues() []DatabaseShareOrigin` +- New function `PossibleCallerRoleValues() []CallerRole` +- New field `CallerRole` in struct `DatabasesClientBeginCreateOrUpdateOptions` +- New field `DatabaseShareOrigin` in struct `FollowerDatabaseDefinition` +- New field `TableLevelSharingProperties` in struct `FollowerDatabaseDefinition` +- New field `DatabaseNameOverride` in struct `AttachedDatabaseConfigurationProperties` +- New field `DatabaseNamePrefix` in struct `AttachedDatabaseConfigurationProperties` +- New field `OriginalDatabaseName` in struct `ReadOnlyFollowingDatabaseProperties` +- New field `TableLevelSharingProperties` in struct `ReadOnlyFollowingDatabaseProperties` +- New field `DatabaseShareOrigin` in struct `ReadOnlyFollowingDatabaseProperties` +- New field `RetrievalStartDate` in struct `IotHubConnectionProperties` +- New field `RetrievalStartDate` in struct `EventHubConnectionProperties` +- New field `CallerRole` in struct `DatabasesClientBeginUpdateOptions` + + +## 1.0.0 (2022-05-17) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/README.md new file mode 100644 index 00000000..b1089936 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/README.md @@ -0,0 +1,90 @@ +# Azure Kusto Module for Go + +The `armkusto` module provides operations for working with Azure Kusto. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/kusto/armkusto) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Kusto module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Kusto. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Kusto module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armkusto.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armkusto.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewAttachedDatabaseConfigurationsClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Kusto` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/assets.json new file mode 100644 index 00000000..4330ff05 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/kusto/armkusto", + "Tag": "go/resourcemanager/kusto/armkusto_2c5e51980b" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/attacheddatabaseconfigurations_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/attacheddatabaseconfigurations_client.go index 09fecd2f..2e6ad6b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/attacheddatabaseconfigurations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/attacheddatabaseconfigurations_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkusto @@ -29,12 +28,11 @@ type AttachedDatabaseConfigurationsClient struct { } // NewAttachedDatabaseConfigurationsClient creates a new instance of AttachedDatabaseConfigurationsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAttachedDatabaseConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AttachedDatabaseConfigurationsClient, error) { - cl, err := arm.NewClient(moduleName+".AttachedDatabaseConfigurationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +46,32 @@ func NewAttachedDatabaseConfigurationsClient(subscriptionID string, credential a // CheckNameAvailability - Checks that the attached database configuration resource name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - resourceName - The name of the resource. // - options - AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.CheckNameAvailability // method. func (client *AttachedDatabaseConfigurationsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, resourceName AttachedDatabaseConfigurationsCheckNameRequest, options *AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions) (AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "AttachedDatabaseConfigurationsClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, clusterName, resourceName, options) if err != nil { return AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -89,10 +94,13 @@ func (client *AttachedDatabaseConfigurationsClient) checkNameAvailabilityCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resourceName) + if err := runtime.MarshalAsJSON(req, resourceName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -107,8 +115,8 @@ func (client *AttachedDatabaseConfigurationsClient) checkNameAvailabilityHandleR // BeginCreateOrUpdate - Creates or updates an attached database configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - attachedDatabaseConfigurationName - The name of the attached database configuration. // - parameters - The database parameters supplied to the CreateOrUpdate operation. @@ -120,29 +128,40 @@ func (client *AttachedDatabaseConfigurationsClient) BeginCreateOrUpdate(ctx cont if err != nil { return nil, err } - return runtime.NewPoller[AttachedDatabaseConfigurationsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AttachedDatabaseConfigurationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AttachedDatabaseConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AttachedDatabaseConfigurationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Creates or updates an attached database configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *AttachedDatabaseConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string, parameters AttachedDatabaseConfiguration, options *AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AttachedDatabaseConfigurationsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, attachedDatabaseConfigurationName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -169,17 +188,20 @@ func (client *AttachedDatabaseConfigurationsClient) createOrUpdateCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the attached database configuration with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - attachedDatabaseConfigurationName - The name of the attached database configuration. // - options - AttachedDatabaseConfigurationsClientBeginDeleteOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.BeginDelete @@ -190,29 +212,40 @@ func (client *AttachedDatabaseConfigurationsClient) BeginDelete(ctx context.Cont if err != nil { return nil, err } - return runtime.NewPoller[AttachedDatabaseConfigurationsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AttachedDatabaseConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AttachedDatabaseConfigurationsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AttachedDatabaseConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes the attached database configuration with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *AttachedDatabaseConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string, options *AttachedDatabaseConfigurationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AttachedDatabaseConfigurationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, attachedDatabaseConfigurationName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -239,7 +272,7 @@ func (client *AttachedDatabaseConfigurationsClient) deleteCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,25 +281,32 @@ func (client *AttachedDatabaseConfigurationsClient) deleteCreateRequest(ctx cont // Get - Returns an attached database configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - attachedDatabaseConfigurationName - The name of the attached database configuration. // - options - AttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.Get // method. func (client *AttachedDatabaseConfigurationsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, attachedDatabaseConfigurationName string, options *AttachedDatabaseConfigurationsClientGetOptions) (AttachedDatabaseConfigurationsClientGetResponse, error) { + var err error + const operationName = "AttachedDatabaseConfigurationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, attachedDatabaseConfigurationName, options) if err != nil { return AttachedDatabaseConfigurationsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AttachedDatabaseConfigurationsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AttachedDatabaseConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AttachedDatabaseConfigurationsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -293,7 +333,7 @@ func (client *AttachedDatabaseConfigurationsClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,8 +350,8 @@ func (client *AttachedDatabaseConfigurationsClient) getHandleResponse(resp *http // NewListByClusterPager - Returns the list of attached database configurations of the given Kusto cluster. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - AttachedDatabaseConfigurationsClientListByClusterOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.NewListByClusterPager // method. @@ -321,6 +361,7 @@ func (client *AttachedDatabaseConfigurationsClient) NewListByClusterPager(resour return false }, Fetcher: func(ctx context.Context, page *AttachedDatabaseConfigurationsClientListByClusterResponse) (AttachedDatabaseConfigurationsClientListByClusterResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AttachedDatabaseConfigurationsClient.NewListByClusterPager") req, err := client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return AttachedDatabaseConfigurationsClientListByClusterResponse{}, err @@ -334,6 +375,7 @@ func (client *AttachedDatabaseConfigurationsClient) NewListByClusterPager(resour } return client.listByClusterHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -357,7 +399,7 @@ func (client *AttachedDatabaseConfigurationsClient) listByClusterCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/autorest.md new file mode 100644 index 00000000..50c72062 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/b8adce17dc500f338f86f18af30aac61dcb71c5f/specification/azure-kusto/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/b8adce17dc500f338f86f18af30aac61dcb71c5f/specification/azure-kusto/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 2.3.0 +tag: package-2024-04 +``` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/build.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/build.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/build.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/ci.yml new file mode 100644 index 00000000..99e7214c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/ci.yml @@ -0,0 +1,29 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/kusto/armkusto/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/kusto/armkusto/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/kusto/armkusto' + UsePipelineProxy: false diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/client_factory.go new file mode 100644 index 00000000..436b91b8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/client_factory.go @@ -0,0 +1,164 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewAttachedDatabaseConfigurationsClient creates a new instance of AttachedDatabaseConfigurationsClient. +func (c *ClientFactory) NewAttachedDatabaseConfigurationsClient() *AttachedDatabaseConfigurationsClient { + return &AttachedDatabaseConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewClusterPrincipalAssignmentsClient creates a new instance of ClusterPrincipalAssignmentsClient. +func (c *ClientFactory) NewClusterPrincipalAssignmentsClient() *ClusterPrincipalAssignmentsClient { + return &ClusterPrincipalAssignmentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewClustersClient creates a new instance of ClustersClient. +func (c *ClientFactory) NewClustersClient() *ClustersClient { + return &ClustersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDataConnectionsClient creates a new instance of DataConnectionsClient. +func (c *ClientFactory) NewDataConnectionsClient() *DataConnectionsClient { + return &DataConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDatabaseClient creates a new instance of DatabaseClient. +func (c *ClientFactory) NewDatabaseClient() *DatabaseClient { + return &DatabaseClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDatabasePrincipalAssignmentsClient creates a new instance of DatabasePrincipalAssignmentsClient. +func (c *ClientFactory) NewDatabasePrincipalAssignmentsClient() *DatabasePrincipalAssignmentsClient { + return &DatabasePrincipalAssignmentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDatabasesClient creates a new instance of DatabasesClient. +func (c *ClientFactory) NewDatabasesClient() *DatabasesClient { + return &DatabasesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagedPrivateEndpointsClient creates a new instance of ManagedPrivateEndpointsClient. +func (c *ClientFactory) NewManagedPrivateEndpointsClient() *ManagedPrivateEndpointsClient { + return &ManagedPrivateEndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewOperationsResultsClient creates a new instance of OperationsResultsClient. +func (c *ClientFactory) NewOperationsResultsClient() *OperationsResultsClient { + return &OperationsResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsResultsLocationClient creates a new instance of OperationsResultsLocationClient. +func (c *ClientFactory) NewOperationsResultsLocationClient() *OperationsResultsLocationClient { + return &OperationsResultsLocationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient. +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + return &PrivateEndpointConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient. +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + return &PrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSKUsClient creates a new instance of SKUsClient. +func (c *ClientFactory) NewSKUsClient() *SKUsClient { + return &SKUsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSandboxCustomImagesClient creates a new instance of SandboxCustomImagesClient. +func (c *ClientFactory) NewSandboxCustomImagesClient() *SandboxCustomImagesClient { + return &SandboxCustomImagesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewScriptsClient creates a new instance of ScriptsClient. +func (c *ClientFactory) NewScriptsClient() *ScriptsClient { + return &ScriptsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/clusterprincipalassignments_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/clusterprincipalassignments_client.go index 1aa1de46..356d73d8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/clusterprincipalassignments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/clusterprincipalassignments_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkusto @@ -29,12 +28,11 @@ type ClusterPrincipalAssignmentsClient struct { } // NewClusterPrincipalAssignmentsClient creates a new instance of ClusterPrincipalAssignmentsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClusterPrincipalAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClusterPrincipalAssignmentsClient, error) { - cl, err := arm.NewClient(moduleName+".ClusterPrincipalAssignmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +46,32 @@ func NewClusterPrincipalAssignmentsClient(subscriptionID string, credential azco // CheckNameAvailability - Checks that the principal assignment name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - principalAssignmentName - The name of the principal assignment. // - options - ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.CheckNameAvailability // method. func (client *ClusterPrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName ClusterPrincipalAssignmentCheckNameRequest, options *ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions) (ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ClusterPrincipalAssignmentsClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, clusterName, principalAssignmentName, options) if err != nil { return ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -89,10 +94,13 @@ func (client *ClusterPrincipalAssignmentsClient) checkNameAvailabilityCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, principalAssignmentName) + if err := runtime.MarshalAsJSON(req, principalAssignmentName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -107,8 +115,8 @@ func (client *ClusterPrincipalAssignmentsClient) checkNameAvailabilityHandleResp // BeginCreateOrUpdate - Create a Kusto cluster principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. // - parameters - The Kusto cluster principalAssignment's parameters supplied for the operation. @@ -120,29 +128,40 @@ func (client *ClusterPrincipalAssignmentsClient) BeginCreateOrUpdate(ctx context if err != nil { return nil, err } - return runtime.NewPoller[ClusterPrincipalAssignmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClusterPrincipalAssignmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClusterPrincipalAssignmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClusterPrincipalAssignmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Create a Kusto cluster principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *ClusterPrincipalAssignmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string, parameters ClusterPrincipalAssignment, options *ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ClusterPrincipalAssignmentsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, principalAssignmentName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -169,17 +188,20 @@ func (client *ClusterPrincipalAssignmentsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a Kusto cluster principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. // - options - ClusterPrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.BeginDelete @@ -190,29 +212,40 @@ func (client *ClusterPrincipalAssignmentsClient) BeginDelete(ctx context.Context if err != nil { return nil, err } - return runtime.NewPoller[ClusterPrincipalAssignmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClusterPrincipalAssignmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ClusterPrincipalAssignmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClusterPrincipalAssignmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes a Kusto cluster principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *ClusterPrincipalAssignmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string, options *ClusterPrincipalAssignmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ClusterPrincipalAssignmentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, principalAssignmentName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -239,7 +272,7 @@ func (client *ClusterPrincipalAssignmentsClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,25 +281,32 @@ func (client *ClusterPrincipalAssignmentsClient) deleteCreateRequest(ctx context // Get - Gets a Kusto cluster principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. // - options - ClusterPrincipalAssignmentsClientGetOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.Get // method. func (client *ClusterPrincipalAssignmentsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, principalAssignmentName string, options *ClusterPrincipalAssignmentsClientGetOptions) (ClusterPrincipalAssignmentsClientGetResponse, error) { + var err error + const operationName = "ClusterPrincipalAssignmentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, principalAssignmentName, options) if err != nil { return ClusterPrincipalAssignmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ClusterPrincipalAssignmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClusterPrincipalAssignmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClusterPrincipalAssignmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -293,7 +333,7 @@ func (client *ClusterPrincipalAssignmentsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,8 +350,8 @@ func (client *ClusterPrincipalAssignmentsClient) getHandleResponse(resp *http.Re // NewListPager - Lists all Kusto cluster principalAssignments. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ClusterPrincipalAssignmentsClientListOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.NewListPager // method. @@ -321,6 +361,7 @@ func (client *ClusterPrincipalAssignmentsClient) NewListPager(resourceGroupName return false }, Fetcher: func(ctx context.Context, page *ClusterPrincipalAssignmentsClientListResponse) (ClusterPrincipalAssignmentsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClusterPrincipalAssignmentsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return ClusterPrincipalAssignmentsClientListResponse{}, err @@ -334,6 +375,7 @@ func (client *ClusterPrincipalAssignmentsClient) NewListPager(resourceGroupName } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -357,7 +399,7 @@ func (client *ClusterPrincipalAssignmentsClient) listCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/clusters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/clusters_client.go new file mode 100644 index 00000000..f0a03fec --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/clusters_client.go @@ -0,0 +1,1690 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ClustersClient contains the methods for the Clusters group. +// Don't use this type directly, use NewClustersClient() instead. +type ClustersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewClustersClient creates a new instance of ClustersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ClustersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginAddCalloutPolicies - Adds a list of callout policies for engine services. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - calloutPolicies - The callout policies to add. +// - options - ClustersClientBeginAddCalloutPoliciesOptions contains the optional parameters for the ClustersClient.BeginAddCalloutPolicies +// method. +func (client *ClustersClient) BeginAddCalloutPolicies(ctx context.Context, resourceGroupName string, clusterName string, calloutPolicies CalloutPoliciesList, options *ClustersClientBeginAddCalloutPoliciesOptions) (*runtime.Poller[ClustersClientAddCalloutPoliciesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.addCalloutPolicies(ctx, resourceGroupName, clusterName, calloutPolicies, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientAddCalloutPoliciesResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientAddCalloutPoliciesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// AddCalloutPolicies - Adds a list of callout policies for engine services. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) addCalloutPolicies(ctx context.Context, resourceGroupName string, clusterName string, calloutPolicies CalloutPoliciesList, options *ClustersClientBeginAddCalloutPoliciesOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginAddCalloutPolicies" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.addCalloutPoliciesCreateRequest(ctx, resourceGroupName, clusterName, calloutPolicies, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// addCalloutPoliciesCreateRequest creates the AddCalloutPolicies request. +func (client *ClustersClient) addCalloutPoliciesCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, calloutPolicies CalloutPoliciesList, options *ClustersClientBeginAddCalloutPoliciesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addCalloutPolicies" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, calloutPolicies); err != nil { + return nil, err + } + return req, nil +} + +// BeginAddLanguageExtensions - Add a list of language extensions that can run within KQL queries. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - languageExtensionsToAdd - The language extensions to add. +// - options - ClustersClientBeginAddLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginAddLanguageExtensions +// method. +func (client *ClustersClient) BeginAddLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToAdd LanguageExtensionsList, options *ClustersClientBeginAddLanguageExtensionsOptions) (*runtime.Poller[ClustersClientAddLanguageExtensionsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.addLanguageExtensions(ctx, resourceGroupName, clusterName, languageExtensionsToAdd, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientAddLanguageExtensionsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientAddLanguageExtensionsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// AddLanguageExtensions - Add a list of language extensions that can run within KQL queries. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) addLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToAdd LanguageExtensionsList, options *ClustersClientBeginAddLanguageExtensionsOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginAddLanguageExtensions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.addLanguageExtensionsCreateRequest(ctx, resourceGroupName, clusterName, languageExtensionsToAdd, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// addLanguageExtensionsCreateRequest creates the AddLanguageExtensions request. +func (client *ClustersClient) addLanguageExtensionsCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToAdd LanguageExtensionsList, options *ClustersClientBeginAddLanguageExtensionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, languageExtensionsToAdd); err != nil { + return nil, err + } + return req, nil +} + +// CheckNameAvailability - Checks that the cluster name is valid and is not already in use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - location - The name of Azure region. +// - clusterName - The name of the cluster. +// - options - ClustersClientCheckNameAvailabilityOptions contains the optional parameters for the ClustersClient.CheckNameAvailability +// method. +func (client *ClustersClient) CheckNameAvailability(ctx context.Context, location string, clusterName ClusterCheckNameRequest, options *ClustersClientCheckNameAvailabilityOptions) (ClustersClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ClustersClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkNameAvailabilityCreateRequest(ctx, location, clusterName, options) + if err != nil { + return ClustersClientCheckNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClustersClientCheckNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClustersClientCheckNameAvailabilityResponse{}, err + } + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. +func (client *ClustersClient) checkNameAvailabilityCreateRequest(ctx context.Context, location string, clusterName ClusterCheckNameRequest, options *ClustersClientCheckNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, clusterName); err != nil { + return nil, err + } + return req, nil +} + +// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. +func (client *ClustersClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ClustersClientCheckNameAvailabilityResponse, error) { + result := ClustersClientCheckNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameResult); err != nil { + return ClustersClientCheckNameAvailabilityResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Create or update a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - parameters - The Kusto cluster parameters supplied to the CreateOrUpdate operation. +// - options - ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate +// method. +func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClustersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, clusterName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ClustersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if options != nil && options.IfNoneMatch != nil { + req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. +func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*runtime.Poller[ClustersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ClustersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDetachFollowerDatabases - Detaches all followers of a database owned by this cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - followerDatabaseToRemove - The follower databases properties to remove. +// - options - ClustersClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the ClustersClient.BeginDetachFollowerDatabases +// method. +func (client *ClustersClient) BeginDetachFollowerDatabases(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *ClustersClientBeginDetachFollowerDatabasesOptions) (*runtime.Poller[ClustersClientDetachFollowerDatabasesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.detachFollowerDatabases(ctx, resourceGroupName, clusterName, followerDatabaseToRemove, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientDetachFollowerDatabasesResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientDetachFollowerDatabasesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DetachFollowerDatabases - Detaches all followers of a database owned by this cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) detachFollowerDatabases(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *ClustersClientBeginDetachFollowerDatabasesOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginDetachFollowerDatabases" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.detachFollowerDatabasesCreateRequest(ctx, resourceGroupName, clusterName, followerDatabaseToRemove, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// detachFollowerDatabasesCreateRequest creates the DetachFollowerDatabases request. +func (client *ClustersClient) detachFollowerDatabasesCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, followerDatabaseToRemove FollowerDatabaseDefinition, options *ClustersClientBeginDetachFollowerDatabasesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, followerDatabaseToRemove); err != nil { + return nil, err + } + return req, nil +} + +// BeginDiagnoseVirtualNetwork - Diagnoses network connectivity status for external resources on which the service is dependent +// on. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientBeginDiagnoseVirtualNetworkOptions contains the optional parameters for the ClustersClient.BeginDiagnoseVirtualNetwork +// method. +func (client *ClustersClient) BeginDiagnoseVirtualNetwork(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDiagnoseVirtualNetworkOptions) (*runtime.Poller[ClustersClientDiagnoseVirtualNetworkResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.diagnoseVirtualNetwork(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientDiagnoseVirtualNetworkResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientDiagnoseVirtualNetworkResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DiagnoseVirtualNetwork - Diagnoses network connectivity status for external resources on which the service is dependent +// on. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) diagnoseVirtualNetwork(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDiagnoseVirtualNetworkOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginDiagnoseVirtualNetwork" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.diagnoseVirtualNetworkCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// diagnoseVirtualNetworkCreateRequest creates the DiagnoseVirtualNetwork request. +func (client *ClustersClient) diagnoseVirtualNetworkCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDiagnoseVirtualNetworkOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/diagnoseVirtualNetwork" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. +func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error) { + var err error + const operationName = "ClustersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return ClustersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClustersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClustersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ClustersClient) getCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ClustersClient) getHandleResponse(resp *http.Response) (ClustersClientGetResponse, error) { + result := ClustersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Cluster); err != nil { + return ClustersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all Kusto clusters within a subscription. +// +// Generated from API version 2024-04-13 +// - options - ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method. +func (client *ClustersClient) NewListPager(options *ClustersClientListOptions) *runtime.Pager[ClustersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ClustersClientListResponse]{ + More: func(page ClustersClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ClustersClientListResponse) (ClustersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListPager") + req, err := client.listCreateRequest(ctx, options) + if err != nil { + return ClustersClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClustersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ClustersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ClustersClient) listCreateRequest(ctx context.Context, options *ClustersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ClustersClient) listHandleResponse(resp *http.Response) (ClustersClientListResponse, error) { + result := ClustersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ClusterListResult); err != nil { + return ClustersClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all Kusto clusters within a resource group. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager +// method. +func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ClustersClientListByResourceGroupResponse]{ + More: func(page ClustersClientListByResourceGroupResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ClustersClientListByResourceGroupResponse) (ClustersClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListByResourceGroupPager") + req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + if err != nil { + return ClustersClientListByResourceGroupResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClustersClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ClustersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ClustersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ClustersClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ClustersClient) listByResourceGroupHandleResponse(resp *http.Response) (ClustersClientListByResourceGroupResponse, error) { + result := ClustersClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ClusterListResult); err != nil { + return ClustersClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListCalloutPoliciesPager - Returns the allowed callout policies for the specified service. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientListCalloutPoliciesOptions contains the optional parameters for the ClustersClient.NewListCalloutPoliciesPager +// method. +func (client *ClustersClient) NewListCalloutPoliciesPager(resourceGroupName string, clusterName string, options *ClustersClientListCalloutPoliciesOptions) *runtime.Pager[ClustersClientListCalloutPoliciesResponse] { + return runtime.NewPager(runtime.PagingHandler[ClustersClientListCalloutPoliciesResponse]{ + More: func(page ClustersClientListCalloutPoliciesResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ClustersClientListCalloutPoliciesResponse) (ClustersClientListCalloutPoliciesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListCalloutPoliciesPager") + req, err := client.listCalloutPoliciesCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return ClustersClientListCalloutPoliciesResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClustersClientListCalloutPoliciesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ClustersClientListCalloutPoliciesResponse{}, runtime.NewResponseError(resp) + } + return client.listCalloutPoliciesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCalloutPoliciesCreateRequest creates the ListCalloutPolicies request. +func (client *ClustersClient) listCalloutPoliciesCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListCalloutPoliciesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listCalloutPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCalloutPoliciesHandleResponse handles the ListCalloutPolicies response. +func (client *ClustersClient) listCalloutPoliciesHandleResponse(resp *http.Response) (ClustersClientListCalloutPoliciesResponse, error) { + result := ClustersClientListCalloutPoliciesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CalloutPoliciesList); err != nil { + return ClustersClientListCalloutPoliciesResponse{}, err + } + return result, nil +} + +// NewListFollowerDatabasesPager - Returns a list of databases that are owned by this cluster and were followed by another +// cluster. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientListFollowerDatabasesOptions contains the optional parameters for the ClustersClient.NewListFollowerDatabasesPager +// method. +func (client *ClustersClient) NewListFollowerDatabasesPager(resourceGroupName string, clusterName string, options *ClustersClientListFollowerDatabasesOptions) *runtime.Pager[ClustersClientListFollowerDatabasesResponse] { + return runtime.NewPager(runtime.PagingHandler[ClustersClientListFollowerDatabasesResponse]{ + More: func(page ClustersClientListFollowerDatabasesResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ClustersClientListFollowerDatabasesResponse) (ClustersClientListFollowerDatabasesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListFollowerDatabasesPager") + req, err := client.listFollowerDatabasesCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return ClustersClientListFollowerDatabasesResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClustersClientListFollowerDatabasesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ClustersClientListFollowerDatabasesResponse{}, runtime.NewResponseError(resp) + } + return client.listFollowerDatabasesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listFollowerDatabasesCreateRequest creates the ListFollowerDatabases request. +func (client *ClustersClient) listFollowerDatabasesCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListFollowerDatabasesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listFollowerDatabasesHandleResponse handles the ListFollowerDatabases response. +func (client *ClustersClient) listFollowerDatabasesHandleResponse(resp *http.Response) (ClustersClientListFollowerDatabasesResponse, error) { + result := ClustersClientListFollowerDatabasesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FollowerDatabaseListResult); err != nil { + return ClustersClientListFollowerDatabasesResponse{}, err + } + return result, nil +} + +// NewListFollowerDatabasesGetPager - Returns a list of databases that are owned by this cluster and were followed by another +// cluster. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientListFollowerDatabasesGetOptions contains the optional parameters for the ClustersClient.NewListFollowerDatabasesGetPager +// method. +func (client *ClustersClient) NewListFollowerDatabasesGetPager(resourceGroupName string, clusterName string, options *ClustersClientListFollowerDatabasesGetOptions) *runtime.Pager[ClustersClientListFollowerDatabasesGetResponse] { + return runtime.NewPager(runtime.PagingHandler[ClustersClientListFollowerDatabasesGetResponse]{ + More: func(page ClustersClientListFollowerDatabasesGetResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ClustersClientListFollowerDatabasesGetResponse) (ClustersClientListFollowerDatabasesGetResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListFollowerDatabasesGetPager") + req, err := client.listFollowerDatabasesGetCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return ClustersClientListFollowerDatabasesGetResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClustersClientListFollowerDatabasesGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ClustersClientListFollowerDatabasesGetResponse{}, runtime.NewResponseError(resp) + } + return client.listFollowerDatabasesGetHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listFollowerDatabasesGetCreateRequest creates the ListFollowerDatabasesGet request. +func (client *ClustersClient) listFollowerDatabasesGetCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListFollowerDatabasesGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listFollowerDatabasesGetHandleResponse handles the ListFollowerDatabasesGet response. +func (client *ClustersClient) listFollowerDatabasesGetHandleResponse(resp *http.Response) (ClustersClientListFollowerDatabasesGetResponse, error) { + result := ClustersClientListFollowerDatabasesGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FollowerDatabaseListResultGet); err != nil { + return ClustersClientListFollowerDatabasesGetResponse{}, err + } + return result, nil +} + +// NewListLanguageExtensionsPager - Returns a list of language extensions that can run within KQL queries. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientListLanguageExtensionsOptions contains the optional parameters for the ClustersClient.NewListLanguageExtensionsPager +// method. +func (client *ClustersClient) NewListLanguageExtensionsPager(resourceGroupName string, clusterName string, options *ClustersClientListLanguageExtensionsOptions) *runtime.Pager[ClustersClientListLanguageExtensionsResponse] { + return runtime.NewPager(runtime.PagingHandler[ClustersClientListLanguageExtensionsResponse]{ + More: func(page ClustersClientListLanguageExtensionsResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ClustersClientListLanguageExtensionsResponse) (ClustersClientListLanguageExtensionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListLanguageExtensionsPager") + req, err := client.listLanguageExtensionsCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return ClustersClientListLanguageExtensionsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClustersClientListLanguageExtensionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ClustersClientListLanguageExtensionsResponse{}, runtime.NewResponseError(resp) + } + return client.listLanguageExtensionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listLanguageExtensionsCreateRequest creates the ListLanguageExtensions request. +func (client *ClustersClient) listLanguageExtensionsCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListLanguageExtensionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listLanguageExtensions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listLanguageExtensionsHandleResponse handles the ListLanguageExtensions response. +func (client *ClustersClient) listLanguageExtensionsHandleResponse(resp *http.Response) (ClustersClientListLanguageExtensionsResponse, error) { + result := ClustersClientListLanguageExtensionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LanguageExtensionsList); err != nil { + return ClustersClientListLanguageExtensionsResponse{}, err + } + return result, nil +} + +// NewListOutboundNetworkDependenciesEndpointsPager - Gets the network endpoints of all outbound dependencies of a Kusto cluster +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the ClustersClient.NewListOutboundNetworkDependenciesEndpointsPager +// method. +func (client *ClustersClient) NewListOutboundNetworkDependenciesEndpointsPager(resourceGroupName string, clusterName string, options *ClustersClientListOutboundNetworkDependenciesEndpointsOptions) *runtime.Pager[ClustersClientListOutboundNetworkDependenciesEndpointsResponse] { + return runtime.NewPager(runtime.PagingHandler[ClustersClientListOutboundNetworkDependenciesEndpointsResponse]{ + More: func(page ClustersClientListOutboundNetworkDependenciesEndpointsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ClustersClientListOutboundNetworkDependenciesEndpointsResponse) (ClustersClientListOutboundNetworkDependenciesEndpointsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListOutboundNetworkDependenciesEndpointsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, clusterName, options) + }, nil) + if err != nil { + return ClustersClientListOutboundNetworkDependenciesEndpointsResponse{}, err + } + return client.listOutboundNetworkDependenciesEndpointsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listOutboundNetworkDependenciesEndpointsCreateRequest creates the ListOutboundNetworkDependenciesEndpoints request. +func (client *ClustersClient) listOutboundNetworkDependenciesEndpointsCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListOutboundNetworkDependenciesEndpointsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/outboundNetworkDependenciesEndpoints" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listOutboundNetworkDependenciesEndpointsHandleResponse handles the ListOutboundNetworkDependenciesEndpoints response. +func (client *ClustersClient) listOutboundNetworkDependenciesEndpointsHandleResponse(resp *http.Response) (ClustersClientListOutboundNetworkDependenciesEndpointsResponse, error) { + result := ClustersClientListOutboundNetworkDependenciesEndpointsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OutboundNetworkDependenciesEndpointListResult); err != nil { + return ClustersClientListOutboundNetworkDependenciesEndpointsResponse{}, err + } + return result, nil +} + +// NewListSKUsPager - Lists eligible SKUs for Kusto resource provider. +// +// Generated from API version 2024-04-13 +// - options - ClustersClientListSKUsOptions contains the optional parameters for the ClustersClient.NewListSKUsPager method. +func (client *ClustersClient) NewListSKUsPager(options *ClustersClientListSKUsOptions) *runtime.Pager[ClustersClientListSKUsResponse] { + return runtime.NewPager(runtime.PagingHandler[ClustersClientListSKUsResponse]{ + More: func(page ClustersClientListSKUsResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ClustersClientListSKUsResponse) (ClustersClientListSKUsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListSKUsPager") + req, err := client.listSKUsCreateRequest(ctx, options) + if err != nil { + return ClustersClientListSKUsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClustersClientListSKUsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ClustersClientListSKUsResponse{}, runtime.NewResponseError(resp) + } + return client.listSKUsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSKUsCreateRequest creates the ListSKUs request. +func (client *ClustersClient) listSKUsCreateRequest(ctx context.Context, options *ClustersClientListSKUsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSKUsHandleResponse handles the ListSKUs response. +func (client *ClustersClient) listSKUsHandleResponse(resp *http.Response) (ClustersClientListSKUsResponse, error) { + result := ClustersClientListSKUsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SKUDescriptionList); err != nil { + return ClustersClientListSKUsResponse{}, err + } + return result, nil +} + +// NewListSKUsByResourcePager - Returns the SKUs available for the provided resource. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientListSKUsByResourceOptions contains the optional parameters for the ClustersClient.NewListSKUsByResourcePager +// method. +func (client *ClustersClient) NewListSKUsByResourcePager(resourceGroupName string, clusterName string, options *ClustersClientListSKUsByResourceOptions) *runtime.Pager[ClustersClientListSKUsByResourceResponse] { + return runtime.NewPager(runtime.PagingHandler[ClustersClientListSKUsByResourceResponse]{ + More: func(page ClustersClientListSKUsByResourceResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ClustersClientListSKUsByResourceResponse) (ClustersClientListSKUsByResourceResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClustersClient.NewListSKUsByResourcePager") + req, err := client.listSKUsByResourceCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return ClustersClientListSKUsByResourceResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClustersClientListSKUsByResourceResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ClustersClientListSKUsByResourceResponse{}, runtime.NewResponseError(resp) + } + return client.listSKUsByResourceHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listSKUsByResourceCreateRequest creates the ListSKUsByResource request. +func (client *ClustersClient) listSKUsByResourceCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListSKUsByResourceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listSKUsByResourceHandleResponse handles the ListSKUsByResource response. +func (client *ClustersClient) listSKUsByResourceHandleResponse(resp *http.Response) (ClustersClientListSKUsByResourceResponse, error) { + result := ClustersClientListSKUsByResourceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListResourceSKUsResult); err != nil { + return ClustersClientListSKUsByResourceResponse{}, err + } + return result, nil +} + +// BeginMigrate - Migrate data from a Kusto cluster to another cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - clusterMigrateRequest - The cluster migrate request parameters. +// - options - ClustersClientBeginMigrateOptions contains the optional parameters for the ClustersClient.BeginMigrate method. +func (client *ClustersClient) BeginMigrate(ctx context.Context, resourceGroupName string, clusterName string, clusterMigrateRequest ClusterMigrateRequest, options *ClustersClientBeginMigrateOptions) (*runtime.Poller[ClustersClientMigrateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrate(ctx, resourceGroupName, clusterName, clusterMigrateRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientMigrateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientMigrateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Migrate - Migrate data from a Kusto cluster to another cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) migrate(ctx context.Context, resourceGroupName string, clusterName string, clusterMigrateRequest ClusterMigrateRequest, options *ClustersClientBeginMigrateOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginMigrate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateCreateRequest(ctx, resourceGroupName, clusterName, clusterMigrateRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrateCreateRequest creates the Migrate request. +func (client *ClustersClient) migrateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, clusterMigrateRequest ClusterMigrateRequest, options *ClustersClientBeginMigrateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/migrate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, clusterMigrateRequest); err != nil { + return nil, err + } + return req, nil +} + +// BeginRemoveCalloutPolicy - Removes callout policy for engine services. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - calloutPolicy - The callout policies to remove. +// - options - ClustersClientBeginRemoveCalloutPolicyOptions contains the optional parameters for the ClustersClient.BeginRemoveCalloutPolicy +// method. +func (client *ClustersClient) BeginRemoveCalloutPolicy(ctx context.Context, resourceGroupName string, clusterName string, calloutPolicy CalloutPolicyToRemove, options *ClustersClientBeginRemoveCalloutPolicyOptions) (*runtime.Poller[ClustersClientRemoveCalloutPolicyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.removeCalloutPolicy(ctx, resourceGroupName, clusterName, calloutPolicy, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientRemoveCalloutPolicyResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientRemoveCalloutPolicyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RemoveCalloutPolicy - Removes callout policy for engine services. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) removeCalloutPolicy(ctx context.Context, resourceGroupName string, clusterName string, calloutPolicy CalloutPolicyToRemove, options *ClustersClientBeginRemoveCalloutPolicyOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginRemoveCalloutPolicy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.removeCalloutPolicyCreateRequest(ctx, resourceGroupName, clusterName, calloutPolicy, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// removeCalloutPolicyCreateRequest creates the RemoveCalloutPolicy request. +func (client *ClustersClient) removeCalloutPolicyCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, calloutPolicy CalloutPolicyToRemove, options *ClustersClientBeginRemoveCalloutPolicyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeCalloutPolicy" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, calloutPolicy); err != nil { + return nil, err + } + return req, nil +} + +// BeginRemoveLanguageExtensions - Remove a list of language extensions that can run within KQL queries. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - languageExtensionsToRemove - The language extensions to remove. +// - options - ClustersClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginRemoveLanguageExtensions +// method. +func (client *ClustersClient) BeginRemoveLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToRemove LanguageExtensionsList, options *ClustersClientBeginRemoveLanguageExtensionsOptions) (*runtime.Poller[ClustersClientRemoveLanguageExtensionsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.removeLanguageExtensions(ctx, resourceGroupName, clusterName, languageExtensionsToRemove, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientRemoveLanguageExtensionsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientRemoveLanguageExtensionsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RemoveLanguageExtensions - Remove a list of language extensions that can run within KQL queries. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) removeLanguageExtensions(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToRemove LanguageExtensionsList, options *ClustersClientBeginRemoveLanguageExtensionsOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginRemoveLanguageExtensions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.removeLanguageExtensionsCreateRequest(ctx, resourceGroupName, clusterName, languageExtensionsToRemove, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// removeLanguageExtensionsCreateRequest creates the RemoveLanguageExtensions request. +func (client *ClustersClient) removeLanguageExtensionsCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, languageExtensionsToRemove LanguageExtensionsList, options *ClustersClientBeginRemoveLanguageExtensionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, languageExtensionsToRemove); err != nil { + return nil, err + } + return req, nil +} + +// BeginStart - Starts a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientBeginStartOptions contains the optional parameters for the ClustersClient.BeginStart method. +func (client *ClustersClient) BeginStart(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStartOptions) (*runtime.Poller[ClustersClientStartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.start(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Start - Starts a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) start(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startCreateRequest creates the Start request. +func (client *ClustersClient) startCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStop - Stops a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - ClustersClientBeginStopOptions contains the optional parameters for the ClustersClient.BeginStop method. +func (client *ClustersClient) BeginStop(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStopOptions) (*runtime.Poller[ClustersClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Stop - Stops a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) stop(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopCreateRequest creates the Stop request. +func (client *ClustersClient) stopCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdate - Update a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - parameters - The Kusto cluster parameters supplied to the Update operation. +// - options - ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method. +func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdate, options *ClustersClientBeginUpdateOptions) (*runtime.Poller[ClustersClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, clusterName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClustersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClustersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Update a Kusto cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *ClustersClient) update(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdate, options *ClustersClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ClustersClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ClustersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterUpdate, options *ClustersClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/constants.go new file mode 100644 index 00000000..54d83019 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/constants.go @@ -0,0 +1,959 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" + moduleVersion = "v2.3.0" +) + +// AzureSKUName - SKU name. +type AzureSKUName string + +const ( + AzureSKUNameDevNoSLAStandardD11V2 AzureSKUName = "Dev(No SLA)_Standard_D11_v2" + AzureSKUNameDevNoSLAStandardE2AV4 AzureSKUName = "Dev(No SLA)_Standard_E2a_v4" + AzureSKUNameStandardD11V2 AzureSKUName = "Standard_D11_v2" + AzureSKUNameStandardD12V2 AzureSKUName = "Standard_D12_v2" + AzureSKUNameStandardD13V2 AzureSKUName = "Standard_D13_v2" + AzureSKUNameStandardD14V2 AzureSKUName = "Standard_D14_v2" + AzureSKUNameStandardD16DV5 AzureSKUName = "Standard_D16d_v5" + AzureSKUNameStandardD32DV4 AzureSKUName = "Standard_D32d_v4" + AzureSKUNameStandardD32DV5 AzureSKUName = "Standard_D32d_v5" + AzureSKUNameStandardDS13V21TBPS AzureSKUName = "Standard_DS13_v2+1TB_PS" + AzureSKUNameStandardDS13V22TBPS AzureSKUName = "Standard_DS13_v2+2TB_PS" + AzureSKUNameStandardDS14V23TBPS AzureSKUName = "Standard_DS14_v2+3TB_PS" + AzureSKUNameStandardDS14V24TBPS AzureSKUName = "Standard_DS14_v2+4TB_PS" + AzureSKUNameStandardE16AV4 AzureSKUName = "Standard_E16a_v4" + AzureSKUNameStandardE16AdsV5 AzureSKUName = "Standard_E16ads_v5" + AzureSKUNameStandardE16AsV43TBPS AzureSKUName = "Standard_E16as_v4+3TB_PS" + AzureSKUNameStandardE16AsV44TBPS AzureSKUName = "Standard_E16as_v4+4TB_PS" + AzureSKUNameStandardE16AsV53TBPS AzureSKUName = "Standard_E16as_v5+3TB_PS" + AzureSKUNameStandardE16AsV54TBPS AzureSKUName = "Standard_E16as_v5+4TB_PS" + AzureSKUNameStandardE16DV4 AzureSKUName = "Standard_E16d_v4" + AzureSKUNameStandardE16DV5 AzureSKUName = "Standard_E16d_v5" + AzureSKUNameStandardE16SV43TBPS AzureSKUName = "Standard_E16s_v4+3TB_PS" + AzureSKUNameStandardE16SV44TBPS AzureSKUName = "Standard_E16s_v4+4TB_PS" + AzureSKUNameStandardE16SV53TBPS AzureSKUName = "Standard_E16s_v5+3TB_PS" + AzureSKUNameStandardE16SV54TBPS AzureSKUName = "Standard_E16s_v5+4TB_PS" + AzureSKUNameStandardE2AV4 AzureSKUName = "Standard_E2a_v4" + AzureSKUNameStandardE2AdsV5 AzureSKUName = "Standard_E2ads_v5" + AzureSKUNameStandardE2DV4 AzureSKUName = "Standard_E2d_v4" + AzureSKUNameStandardE2DV5 AzureSKUName = "Standard_E2d_v5" + AzureSKUNameStandardE4AV4 AzureSKUName = "Standard_E4a_v4" + AzureSKUNameStandardE4AdsV5 AzureSKUName = "Standard_E4ads_v5" + AzureSKUNameStandardE4DV4 AzureSKUName = "Standard_E4d_v4" + AzureSKUNameStandardE4DV5 AzureSKUName = "Standard_E4d_v5" + AzureSKUNameStandardE64IV3 AzureSKUName = "Standard_E64i_v3" + AzureSKUNameStandardE80IDsV4 AzureSKUName = "Standard_E80ids_v4" + AzureSKUNameStandardE8AV4 AzureSKUName = "Standard_E8a_v4" + AzureSKUNameStandardE8AdsV5 AzureSKUName = "Standard_E8ads_v5" + AzureSKUNameStandardE8AsV41TBPS AzureSKUName = "Standard_E8as_v4+1TB_PS" + AzureSKUNameStandardE8AsV42TBPS AzureSKUName = "Standard_E8as_v4+2TB_PS" + AzureSKUNameStandardE8AsV51TBPS AzureSKUName = "Standard_E8as_v5+1TB_PS" + AzureSKUNameStandardE8AsV52TBPS AzureSKUName = "Standard_E8as_v5+2TB_PS" + AzureSKUNameStandardE8DV4 AzureSKUName = "Standard_E8d_v4" + AzureSKUNameStandardE8DV5 AzureSKUName = "Standard_E8d_v5" + AzureSKUNameStandardE8SV41TBPS AzureSKUName = "Standard_E8s_v4+1TB_PS" + AzureSKUNameStandardE8SV42TBPS AzureSKUName = "Standard_E8s_v4+2TB_PS" + AzureSKUNameStandardE8SV51TBPS AzureSKUName = "Standard_E8s_v5+1TB_PS" + AzureSKUNameStandardE8SV52TBPS AzureSKUName = "Standard_E8s_v5+2TB_PS" + AzureSKUNameStandardEC16AdsV5 AzureSKUName = "Standard_EC16ads_v5" + AzureSKUNameStandardEC16AsV53TBPS AzureSKUName = "Standard_EC16as_v5+3TB_PS" + AzureSKUNameStandardEC16AsV54TBPS AzureSKUName = "Standard_EC16as_v5+4TB_PS" + AzureSKUNameStandardEC8AdsV5 AzureSKUName = "Standard_EC8ads_v5" + AzureSKUNameStandardEC8AsV51TBPS AzureSKUName = "Standard_EC8as_v5+1TB_PS" + AzureSKUNameStandardEC8AsV52TBPS AzureSKUName = "Standard_EC8as_v5+2TB_PS" + AzureSKUNameStandardL16AsV3 AzureSKUName = "Standard_L16as_v3" + AzureSKUNameStandardL16S AzureSKUName = "Standard_L16s" + AzureSKUNameStandardL16SV2 AzureSKUName = "Standard_L16s_v2" + AzureSKUNameStandardL16SV3 AzureSKUName = "Standard_L16s_v3" + AzureSKUNameStandardL32AsV3 AzureSKUName = "Standard_L32as_v3" + AzureSKUNameStandardL32SV3 AzureSKUName = "Standard_L32s_v3" + AzureSKUNameStandardL4S AzureSKUName = "Standard_L4s" + AzureSKUNameStandardL8AsV3 AzureSKUName = "Standard_L8as_v3" + AzureSKUNameStandardL8S AzureSKUName = "Standard_L8s" + AzureSKUNameStandardL8SV2 AzureSKUName = "Standard_L8s_v2" + AzureSKUNameStandardL8SV3 AzureSKUName = "Standard_L8s_v3" +) + +// PossibleAzureSKUNameValues returns the possible values for the AzureSKUName const type. +func PossibleAzureSKUNameValues() []AzureSKUName { + return []AzureSKUName{ + AzureSKUNameDevNoSLAStandardD11V2, + AzureSKUNameDevNoSLAStandardE2AV4, + AzureSKUNameStandardD11V2, + AzureSKUNameStandardD12V2, + AzureSKUNameStandardD13V2, + AzureSKUNameStandardD14V2, + AzureSKUNameStandardD16DV5, + AzureSKUNameStandardD32DV4, + AzureSKUNameStandardD32DV5, + AzureSKUNameStandardDS13V21TBPS, + AzureSKUNameStandardDS13V22TBPS, + AzureSKUNameStandardDS14V23TBPS, + AzureSKUNameStandardDS14V24TBPS, + AzureSKUNameStandardE16AV4, + AzureSKUNameStandardE16AdsV5, + AzureSKUNameStandardE16AsV43TBPS, + AzureSKUNameStandardE16AsV44TBPS, + AzureSKUNameStandardE16AsV53TBPS, + AzureSKUNameStandardE16AsV54TBPS, + AzureSKUNameStandardE16DV4, + AzureSKUNameStandardE16DV5, + AzureSKUNameStandardE16SV43TBPS, + AzureSKUNameStandardE16SV44TBPS, + AzureSKUNameStandardE16SV53TBPS, + AzureSKUNameStandardE16SV54TBPS, + AzureSKUNameStandardE2AV4, + AzureSKUNameStandardE2AdsV5, + AzureSKUNameStandardE2DV4, + AzureSKUNameStandardE2DV5, + AzureSKUNameStandardE4AV4, + AzureSKUNameStandardE4AdsV5, + AzureSKUNameStandardE4DV4, + AzureSKUNameStandardE4DV5, + AzureSKUNameStandardE64IV3, + AzureSKUNameStandardE80IDsV4, + AzureSKUNameStandardE8AV4, + AzureSKUNameStandardE8AdsV5, + AzureSKUNameStandardE8AsV41TBPS, + AzureSKUNameStandardE8AsV42TBPS, + AzureSKUNameStandardE8AsV51TBPS, + AzureSKUNameStandardE8AsV52TBPS, + AzureSKUNameStandardE8DV4, + AzureSKUNameStandardE8DV5, + AzureSKUNameStandardE8SV41TBPS, + AzureSKUNameStandardE8SV42TBPS, + AzureSKUNameStandardE8SV51TBPS, + AzureSKUNameStandardE8SV52TBPS, + AzureSKUNameStandardEC16AdsV5, + AzureSKUNameStandardEC16AsV53TBPS, + AzureSKUNameStandardEC16AsV54TBPS, + AzureSKUNameStandardEC8AdsV5, + AzureSKUNameStandardEC8AsV51TBPS, + AzureSKUNameStandardEC8AsV52TBPS, + AzureSKUNameStandardL16AsV3, + AzureSKUNameStandardL16S, + AzureSKUNameStandardL16SV2, + AzureSKUNameStandardL16SV3, + AzureSKUNameStandardL32AsV3, + AzureSKUNameStandardL32SV3, + AzureSKUNameStandardL4S, + AzureSKUNameStandardL8AsV3, + AzureSKUNameStandardL8S, + AzureSKUNameStandardL8SV2, + AzureSKUNameStandardL8SV3, + } +} + +// AzureSKUTier - SKU tier. +type AzureSKUTier string + +const ( + AzureSKUTierBasic AzureSKUTier = "Basic" + AzureSKUTierStandard AzureSKUTier = "Standard" +) + +// PossibleAzureSKUTierValues returns the possible values for the AzureSKUTier const type. +func PossibleAzureSKUTierValues() []AzureSKUTier { + return []AzureSKUTier{ + AzureSKUTierBasic, + AzureSKUTierStandard, + } +} + +// AzureScaleType - Scale type. +type AzureScaleType string + +const ( + AzureScaleTypeAutomatic AzureScaleType = "automatic" + AzureScaleTypeManual AzureScaleType = "manual" + AzureScaleTypeNone AzureScaleType = "none" +) + +// PossibleAzureScaleTypeValues returns the possible values for the AzureScaleType const type. +func PossibleAzureScaleTypeValues() []AzureScaleType { + return []AzureScaleType{ + AzureScaleTypeAutomatic, + AzureScaleTypeManual, + AzureScaleTypeNone, + } +} + +// BlobStorageEventType - The name of blob storage event type to process. +type BlobStorageEventType string + +const ( + BlobStorageEventTypeMicrosoftStorageBlobCreated BlobStorageEventType = "Microsoft.Storage.BlobCreated" + BlobStorageEventTypeMicrosoftStorageBlobRenamed BlobStorageEventType = "Microsoft.Storage.BlobRenamed" +) + +// PossibleBlobStorageEventTypeValues returns the possible values for the BlobStorageEventType const type. +func PossibleBlobStorageEventTypeValues() []BlobStorageEventType { + return []BlobStorageEventType{ + BlobStorageEventTypeMicrosoftStorageBlobCreated, + BlobStorageEventTypeMicrosoftStorageBlobRenamed, + } +} + +type CallerRole string + +const ( + CallerRoleAdmin CallerRole = "Admin" + CallerRoleNone CallerRole = "None" +) + +// PossibleCallerRoleValues returns the possible values for the CallerRole const type. +func PossibleCallerRoleValues() []CallerRole { + return []CallerRole{ + CallerRoleAdmin, + CallerRoleNone, + } +} + +// CalloutType - Type of the callout service, specifying the kind of external resource or service being accessed. +type CalloutType string + +const ( + CalloutTypeAzureDigitalTwins CalloutType = "azure_digital_twins" + CalloutTypeAzureOpenai CalloutType = "azure_openai" + CalloutTypeCosmosdb CalloutType = "cosmosdb" + CalloutTypeExternalData CalloutType = "external_data" + CalloutTypeGenevametrics CalloutType = "genevametrics" + CalloutTypeKusto CalloutType = "kusto" + CalloutTypeMysql CalloutType = "mysql" + CalloutTypePostgresql CalloutType = "postgresql" + CalloutTypeSQL CalloutType = "sql" + CalloutTypeSandboxArtifacts CalloutType = "sandbox_artifacts" + CalloutTypeWebapi CalloutType = "webapi" +) + +// PossibleCalloutTypeValues returns the possible values for the CalloutType const type. +func PossibleCalloutTypeValues() []CalloutType { + return []CalloutType{ + CalloutTypeAzureDigitalTwins, + CalloutTypeAzureOpenai, + CalloutTypeCosmosdb, + CalloutTypeExternalData, + CalloutTypeGenevametrics, + CalloutTypeKusto, + CalloutTypeMysql, + CalloutTypePostgresql, + CalloutTypeSQL, + CalloutTypeSandboxArtifacts, + CalloutTypeWebapi, + } +} + +// ClusterNetworkAccessFlag - Whether or not to restrict outbound network access. Value is optional but if passed in, must +// be 'Enabled' or 'Disabled' +type ClusterNetworkAccessFlag string + +const ( + ClusterNetworkAccessFlagDisabled ClusterNetworkAccessFlag = "Disabled" + ClusterNetworkAccessFlagEnabled ClusterNetworkAccessFlag = "Enabled" +) + +// PossibleClusterNetworkAccessFlagValues returns the possible values for the ClusterNetworkAccessFlag const type. +func PossibleClusterNetworkAccessFlagValues() []ClusterNetworkAccessFlag { + return []ClusterNetworkAccessFlag{ + ClusterNetworkAccessFlagDisabled, + ClusterNetworkAccessFlagEnabled, + } +} + +// ClusterPrincipalRole - Cluster principal role. +type ClusterPrincipalRole string + +const ( + ClusterPrincipalRoleAllDatabasesAdmin ClusterPrincipalRole = "AllDatabasesAdmin" + ClusterPrincipalRoleAllDatabasesMonitor ClusterPrincipalRole = "AllDatabasesMonitor" + ClusterPrincipalRoleAllDatabasesViewer ClusterPrincipalRole = "AllDatabasesViewer" +) + +// PossibleClusterPrincipalRoleValues returns the possible values for the ClusterPrincipalRole const type. +func PossibleClusterPrincipalRoleValues() []ClusterPrincipalRole { + return []ClusterPrincipalRole{ + ClusterPrincipalRoleAllDatabasesAdmin, + ClusterPrincipalRoleAllDatabasesMonitor, + ClusterPrincipalRoleAllDatabasesViewer, + } +} + +// Compression - The compression type +type Compression string + +const ( + CompressionGZip Compression = "GZip" + CompressionNone Compression = "None" +) + +// PossibleCompressionValues returns the possible values for the Compression const type. +func PossibleCompressionValues() []Compression { + return []Compression{ + CompressionGZip, + CompressionNone, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// DataConnectionKind - Kind of the endpoint for the data connection +type DataConnectionKind string + +const ( + DataConnectionKindCosmosDb DataConnectionKind = "CosmosDb" + DataConnectionKindEventGrid DataConnectionKind = "EventGrid" + DataConnectionKindEventHub DataConnectionKind = "EventHub" + DataConnectionKindIotHub DataConnectionKind = "IotHub" +) + +// PossibleDataConnectionKindValues returns the possible values for the DataConnectionKind const type. +func PossibleDataConnectionKindValues() []DataConnectionKind { + return []DataConnectionKind{ + DataConnectionKindCosmosDb, + DataConnectionKindEventGrid, + DataConnectionKindEventHub, + DataConnectionKindIotHub, + } +} + +// DatabasePrincipalRole - Database principal role. +type DatabasePrincipalRole string + +const ( + DatabasePrincipalRoleAdmin DatabasePrincipalRole = "Admin" + DatabasePrincipalRoleIngestor DatabasePrincipalRole = "Ingestor" + DatabasePrincipalRoleMonitor DatabasePrincipalRole = "Monitor" + DatabasePrincipalRoleUnrestrictedViewer DatabasePrincipalRole = "UnrestrictedViewer" + DatabasePrincipalRoleUser DatabasePrincipalRole = "User" + DatabasePrincipalRoleViewer DatabasePrincipalRole = "Viewer" +) + +// PossibleDatabasePrincipalRoleValues returns the possible values for the DatabasePrincipalRole const type. +func PossibleDatabasePrincipalRoleValues() []DatabasePrincipalRole { + return []DatabasePrincipalRole{ + DatabasePrincipalRoleAdmin, + DatabasePrincipalRoleIngestor, + DatabasePrincipalRoleMonitor, + DatabasePrincipalRoleUnrestrictedViewer, + DatabasePrincipalRoleUser, + DatabasePrincipalRoleViewer, + } +} + +// DatabasePrincipalType - Database principal type. +type DatabasePrincipalType string + +const ( + DatabasePrincipalTypeApp DatabasePrincipalType = "App" + DatabasePrincipalTypeGroup DatabasePrincipalType = "Group" + DatabasePrincipalTypeUser DatabasePrincipalType = "User" +) + +// PossibleDatabasePrincipalTypeValues returns the possible values for the DatabasePrincipalType const type. +func PossibleDatabasePrincipalTypeValues() []DatabasePrincipalType { + return []DatabasePrincipalType{ + DatabasePrincipalTypeApp, + DatabasePrincipalTypeGroup, + DatabasePrincipalTypeUser, + } +} + +// DatabaseRouting - Indication for database routing information from the data connection, by default only database routing +// information is allowed +type DatabaseRouting string + +const ( + DatabaseRoutingMulti DatabaseRouting = "Multi" + DatabaseRoutingSingle DatabaseRouting = "Single" +) + +// PossibleDatabaseRoutingValues returns the possible values for the DatabaseRouting const type. +func PossibleDatabaseRoutingValues() []DatabaseRouting { + return []DatabaseRouting{ + DatabaseRoutingMulti, + DatabaseRoutingSingle, + } +} + +// DatabaseShareOrigin - The origin of the following setup. +type DatabaseShareOrigin string + +const ( + DatabaseShareOriginDataShare DatabaseShareOrigin = "DataShare" + DatabaseShareOriginDirect DatabaseShareOrigin = "Direct" + DatabaseShareOriginOther DatabaseShareOrigin = "Other" +) + +// PossibleDatabaseShareOriginValues returns the possible values for the DatabaseShareOrigin const type. +func PossibleDatabaseShareOriginValues() []DatabaseShareOrigin { + return []DatabaseShareOrigin{ + DatabaseShareOriginDataShare, + DatabaseShareOriginDirect, + DatabaseShareOriginOther, + } +} + +// DefaultPrincipalsModificationKind - The default principals modification kind +type DefaultPrincipalsModificationKind string + +const ( + DefaultPrincipalsModificationKindNone DefaultPrincipalsModificationKind = "None" + DefaultPrincipalsModificationKindReplace DefaultPrincipalsModificationKind = "Replace" + DefaultPrincipalsModificationKindUnion DefaultPrincipalsModificationKind = "Union" +) + +// PossibleDefaultPrincipalsModificationKindValues returns the possible values for the DefaultPrincipalsModificationKind const type. +func PossibleDefaultPrincipalsModificationKindValues() []DefaultPrincipalsModificationKind { + return []DefaultPrincipalsModificationKind{ + DefaultPrincipalsModificationKindNone, + DefaultPrincipalsModificationKindReplace, + DefaultPrincipalsModificationKindUnion, + } +} + +// EngineType - The engine type +type EngineType string + +const ( + EngineTypeV2 EngineType = "V2" + EngineTypeV3 EngineType = "V3" +) + +// PossibleEngineTypeValues returns the possible values for the EngineType const type. +func PossibleEngineTypeValues() []EngineType { + return []EngineType{ + EngineTypeV2, + EngineTypeV3, + } +} + +// EventGridDataFormat - The data format of the message. Optionally the data format can be added to each message. +type EventGridDataFormat string + +const ( + EventGridDataFormatAPACHEAVRO EventGridDataFormat = "APACHEAVRO" + EventGridDataFormatAVRO EventGridDataFormat = "AVRO" + EventGridDataFormatCSV EventGridDataFormat = "CSV" + EventGridDataFormatJSON EventGridDataFormat = "JSON" + EventGridDataFormatMULTIJSON EventGridDataFormat = "MULTIJSON" + EventGridDataFormatORC EventGridDataFormat = "ORC" + EventGridDataFormatPARQUET EventGridDataFormat = "PARQUET" + EventGridDataFormatPSV EventGridDataFormat = "PSV" + EventGridDataFormatRAW EventGridDataFormat = "RAW" + EventGridDataFormatSCSV EventGridDataFormat = "SCSV" + EventGridDataFormatSINGLEJSON EventGridDataFormat = "SINGLEJSON" + EventGridDataFormatSOHSV EventGridDataFormat = "SOHSV" + EventGridDataFormatTSV EventGridDataFormat = "TSV" + EventGridDataFormatTSVE EventGridDataFormat = "TSVE" + EventGridDataFormatTXT EventGridDataFormat = "TXT" + EventGridDataFormatW3CLOGFILE EventGridDataFormat = "W3CLOGFILE" +) + +// PossibleEventGridDataFormatValues returns the possible values for the EventGridDataFormat const type. +func PossibleEventGridDataFormatValues() []EventGridDataFormat { + return []EventGridDataFormat{ + EventGridDataFormatAPACHEAVRO, + EventGridDataFormatAVRO, + EventGridDataFormatCSV, + EventGridDataFormatJSON, + EventGridDataFormatMULTIJSON, + EventGridDataFormatORC, + EventGridDataFormatPARQUET, + EventGridDataFormatPSV, + EventGridDataFormatRAW, + EventGridDataFormatSCSV, + EventGridDataFormatSINGLEJSON, + EventGridDataFormatSOHSV, + EventGridDataFormatTSV, + EventGridDataFormatTSVE, + EventGridDataFormatTXT, + EventGridDataFormatW3CLOGFILE, + } +} + +// EventHubDataFormat - The data format of the message. Optionally the data format can be added to each message. +type EventHubDataFormat string + +const ( + EventHubDataFormatAPACHEAVRO EventHubDataFormat = "APACHEAVRO" + EventHubDataFormatAVRO EventHubDataFormat = "AVRO" + EventHubDataFormatCSV EventHubDataFormat = "CSV" + EventHubDataFormatJSON EventHubDataFormat = "JSON" + EventHubDataFormatMULTIJSON EventHubDataFormat = "MULTIJSON" + EventHubDataFormatORC EventHubDataFormat = "ORC" + EventHubDataFormatPARQUET EventHubDataFormat = "PARQUET" + EventHubDataFormatPSV EventHubDataFormat = "PSV" + EventHubDataFormatRAW EventHubDataFormat = "RAW" + EventHubDataFormatSCSV EventHubDataFormat = "SCSV" + EventHubDataFormatSINGLEJSON EventHubDataFormat = "SINGLEJSON" + EventHubDataFormatSOHSV EventHubDataFormat = "SOHSV" + EventHubDataFormatTSV EventHubDataFormat = "TSV" + EventHubDataFormatTSVE EventHubDataFormat = "TSVE" + EventHubDataFormatTXT EventHubDataFormat = "TXT" + EventHubDataFormatW3CLOGFILE EventHubDataFormat = "W3CLOGFILE" +) + +// PossibleEventHubDataFormatValues returns the possible values for the EventHubDataFormat const type. +func PossibleEventHubDataFormatValues() []EventHubDataFormat { + return []EventHubDataFormat{ + EventHubDataFormatAPACHEAVRO, + EventHubDataFormatAVRO, + EventHubDataFormatCSV, + EventHubDataFormatJSON, + EventHubDataFormatMULTIJSON, + EventHubDataFormatORC, + EventHubDataFormatPARQUET, + EventHubDataFormatPSV, + EventHubDataFormatRAW, + EventHubDataFormatSCSV, + EventHubDataFormatSINGLEJSON, + EventHubDataFormatSOHSV, + EventHubDataFormatTSV, + EventHubDataFormatTSVE, + EventHubDataFormatTXT, + EventHubDataFormatW3CLOGFILE, + } +} + +// IdentityType - The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created +// identity and a set of user-assigned identities. The type 'None' will remove all +// identities. +type IdentityType string + +const ( + IdentityTypeNone IdentityType = "None" + IdentityTypeSystemAssigned IdentityType = "SystemAssigned" + IdentityTypeSystemAssignedUserAssigned IdentityType = "SystemAssigned, UserAssigned" + IdentityTypeUserAssigned IdentityType = "UserAssigned" +) + +// PossibleIdentityTypeValues returns the possible values for the IdentityType const type. +func PossibleIdentityTypeValues() []IdentityType { + return []IdentityType{ + IdentityTypeNone, + IdentityTypeSystemAssigned, + IdentityTypeSystemAssignedUserAssigned, + IdentityTypeUserAssigned, + } +} + +// IotHubDataFormat - The data format of the message. Optionally the data format can be added to each message. +type IotHubDataFormat string + +const ( + IotHubDataFormatAPACHEAVRO IotHubDataFormat = "APACHEAVRO" + IotHubDataFormatAVRO IotHubDataFormat = "AVRO" + IotHubDataFormatCSV IotHubDataFormat = "CSV" + IotHubDataFormatJSON IotHubDataFormat = "JSON" + IotHubDataFormatMULTIJSON IotHubDataFormat = "MULTIJSON" + IotHubDataFormatORC IotHubDataFormat = "ORC" + IotHubDataFormatPARQUET IotHubDataFormat = "PARQUET" + IotHubDataFormatPSV IotHubDataFormat = "PSV" + IotHubDataFormatRAW IotHubDataFormat = "RAW" + IotHubDataFormatSCSV IotHubDataFormat = "SCSV" + IotHubDataFormatSINGLEJSON IotHubDataFormat = "SINGLEJSON" + IotHubDataFormatSOHSV IotHubDataFormat = "SOHSV" + IotHubDataFormatTSV IotHubDataFormat = "TSV" + IotHubDataFormatTSVE IotHubDataFormat = "TSVE" + IotHubDataFormatTXT IotHubDataFormat = "TXT" + IotHubDataFormatW3CLOGFILE IotHubDataFormat = "W3CLOGFILE" +) + +// PossibleIotHubDataFormatValues returns the possible values for the IotHubDataFormat const type. +func PossibleIotHubDataFormatValues() []IotHubDataFormat { + return []IotHubDataFormat{ + IotHubDataFormatAPACHEAVRO, + IotHubDataFormatAVRO, + IotHubDataFormatCSV, + IotHubDataFormatJSON, + IotHubDataFormatMULTIJSON, + IotHubDataFormatORC, + IotHubDataFormatPARQUET, + IotHubDataFormatPSV, + IotHubDataFormatRAW, + IotHubDataFormatSCSV, + IotHubDataFormatSINGLEJSON, + IotHubDataFormatSOHSV, + IotHubDataFormatTSV, + IotHubDataFormatTSVE, + IotHubDataFormatTXT, + IotHubDataFormatW3CLOGFILE, + } +} + +// Kind - Kind of the database +type Kind string + +const ( + KindReadOnlyFollowing Kind = "ReadOnlyFollowing" + KindReadWrite Kind = "ReadWrite" +) + +// PossibleKindValues returns the possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{ + KindReadOnlyFollowing, + KindReadWrite, + } +} + +// Language - The language name, for example Python. +type Language string + +const ( + LanguagePython Language = "Python" +) + +// PossibleLanguageValues returns the possible values for the Language const type. +func PossibleLanguageValues() []Language { + return []Language{ + LanguagePython, + } +} + +// LanguageExtensionImageName - Language extension image name. +type LanguageExtensionImageName string + +const ( + LanguageExtensionImageNamePython3108 LanguageExtensionImageName = "Python3_10_8" + LanguageExtensionImageNamePython3108DL LanguageExtensionImageName = "Python3_10_8_DL" + LanguageExtensionImageNamePython3117 LanguageExtensionImageName = "Python3_11_7" + LanguageExtensionImageNamePython3117DL LanguageExtensionImageName = "Python3_11_7_DL" + LanguageExtensionImageNamePython365 LanguageExtensionImageName = "Python3_6_5" + LanguageExtensionImageNamePythonCustomImage LanguageExtensionImageName = "PythonCustomImage" + LanguageExtensionImageNameR LanguageExtensionImageName = "R" +) + +// PossibleLanguageExtensionImageNameValues returns the possible values for the LanguageExtensionImageName const type. +func PossibleLanguageExtensionImageNameValues() []LanguageExtensionImageName { + return []LanguageExtensionImageName{ + LanguageExtensionImageNamePython3108, + LanguageExtensionImageNamePython3108DL, + LanguageExtensionImageNamePython3117, + LanguageExtensionImageNamePython3117DL, + LanguageExtensionImageNamePython365, + LanguageExtensionImageNamePythonCustomImage, + LanguageExtensionImageNameR, + } +} + +// LanguageExtensionName - Language extension that can run within KQL query. +type LanguageExtensionName string + +const ( + LanguageExtensionNamePYTHON LanguageExtensionName = "PYTHON" + LanguageExtensionNameR LanguageExtensionName = "R" +) + +// PossibleLanguageExtensionNameValues returns the possible values for the LanguageExtensionName const type. +func PossibleLanguageExtensionNameValues() []LanguageExtensionName { + return []LanguageExtensionName{ + LanguageExtensionNamePYTHON, + LanguageExtensionNameR, + } +} + +// MigrationClusterRole - The role of the cluster in the migration process. +type MigrationClusterRole string + +const ( + MigrationClusterRoleDestination MigrationClusterRole = "Destination" + MigrationClusterRoleSource MigrationClusterRole = "Source" +) + +// PossibleMigrationClusterRoleValues returns the possible values for the MigrationClusterRole const type. +func PossibleMigrationClusterRoleValues() []MigrationClusterRole { + return []MigrationClusterRole{ + MigrationClusterRoleDestination, + MigrationClusterRoleSource, + } +} + +// OutboundAccess - Indicates whether outbound access is permitted for the specified URI pattern. +type OutboundAccess string + +const ( + OutboundAccessAllow OutboundAccess = "Allow" + OutboundAccessDeny OutboundAccess = "Deny" +) + +// PossibleOutboundAccessValues returns the possible values for the OutboundAccess const type. +func PossibleOutboundAccessValues() []OutboundAccess { + return []OutboundAccess{ + OutboundAccessAllow, + OutboundAccessDeny, + } +} + +// PrincipalPermissionsAction - Indicates if the permissions for the script caller are kept following completion of the script. +type PrincipalPermissionsAction string + +const ( + PrincipalPermissionsActionRemovePermissionOnScriptCompletion PrincipalPermissionsAction = "RemovePermissionOnScriptCompletion" + PrincipalPermissionsActionRetainPermissionOnScriptCompletion PrincipalPermissionsAction = "RetainPermissionOnScriptCompletion" +) + +// PossiblePrincipalPermissionsActionValues returns the possible values for the PrincipalPermissionsAction const type. +func PossiblePrincipalPermissionsActionValues() []PrincipalPermissionsAction { + return []PrincipalPermissionsAction{ + PrincipalPermissionsActionRemovePermissionOnScriptCompletion, + PrincipalPermissionsActionRetainPermissionOnScriptCompletion, + } +} + +// PrincipalType - Principal type. +type PrincipalType string + +const ( + PrincipalTypeApp PrincipalType = "App" + PrincipalTypeGroup PrincipalType = "Group" + PrincipalTypeUser PrincipalType = "User" +) + +// PossiblePrincipalTypeValues returns the possible values for the PrincipalType const type. +func PossiblePrincipalTypeValues() []PrincipalType { + return []PrincipalType{ + PrincipalTypeApp, + PrincipalTypeGroup, + PrincipalTypeUser, + } +} + +// PrincipalsModificationKind - The principals modification kind of the database +type PrincipalsModificationKind string + +const ( + PrincipalsModificationKindNone PrincipalsModificationKind = "None" + PrincipalsModificationKindReplace PrincipalsModificationKind = "Replace" + PrincipalsModificationKindUnion PrincipalsModificationKind = "Union" +) + +// PossiblePrincipalsModificationKindValues returns the possible values for the PrincipalsModificationKind const type. +func PossiblePrincipalsModificationKindValues() []PrincipalsModificationKind { + return []PrincipalsModificationKind{ + PrincipalsModificationKindNone, + PrincipalsModificationKindReplace, + PrincipalsModificationKindUnion, + } +} + +// ProvisioningState - The provisioned state of the resource. +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateMoving ProvisioningState = "Moving" + ProvisioningStateRunning ProvisioningState = "Running" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateCanceled, + ProvisioningStateCreating, + ProvisioningStateDeleting, + ProvisioningStateFailed, + ProvisioningStateMoving, + ProvisioningStateRunning, + ProvisioningStateSucceeded, + } +} + +// PublicIPType - Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6) +type PublicIPType string + +const ( + PublicIPTypeDualStack PublicIPType = "DualStack" + PublicIPTypeIPv4 PublicIPType = "IPv4" +) + +// PossiblePublicIPTypeValues returns the possible values for the PublicIPType const type. +func PossiblePublicIPTypeValues() []PublicIPType { + return []PublicIPType{ + PublicIPTypeDualStack, + PublicIPTypeIPv4, + } +} + +// PublicNetworkAccess - Public network access to the cluster is enabled by default. When disabled, only private endpoint +// connection to the cluster is allowed +type PublicNetworkAccess string + +const ( + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" +) + +// PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. +func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { + return []PublicNetworkAccess{ + PublicNetworkAccessDisabled, + PublicNetworkAccessEnabled, + } +} + +// Reason - Message providing the reason why the given name is invalid. +type Reason string + +const ( + ReasonAlreadyExists Reason = "AlreadyExists" + ReasonInvalid Reason = "Invalid" +) + +// PossibleReasonValues returns the possible values for the Reason const type. +func PossibleReasonValues() []Reason { + return []Reason{ + ReasonAlreadyExists, + ReasonInvalid, + } +} + +// ScriptLevel - Differentiates between the type of script commands included - Database or Cluster. The default is Database. +type ScriptLevel string + +const ( + ScriptLevelCluster ScriptLevel = "Cluster" + ScriptLevelDatabase ScriptLevel = "Database" +) + +// PossibleScriptLevelValues returns the possible values for the ScriptLevel const type. +func PossibleScriptLevelValues() []ScriptLevel { + return []ScriptLevel{ + ScriptLevelCluster, + ScriptLevelDatabase, + } +} + +// State - The state of the resource. +type State string + +const ( + StateCreating State = "Creating" + StateDeleted State = "Deleted" + StateDeleting State = "Deleting" + StateMigrated State = "Migrated" + StateRunning State = "Running" + StateStarting State = "Starting" + StateStopped State = "Stopped" + StateStopping State = "Stopping" + StateUnavailable State = "Unavailable" + StateUpdating State = "Updating" +) + +// PossibleStateValues returns the possible values for the State const type. +func PossibleStateValues() []State { + return []State{ + StateCreating, + StateDeleted, + StateDeleting, + StateMigrated, + StateRunning, + StateStarting, + StateStopped, + StateStopping, + StateUnavailable, + StateUpdating, + } +} + +// Status - The status of operation. +type Status string + +const ( + StatusCanceled Status = "Canceled" + StatusFailed Status = "Failed" + StatusRunning Status = "Running" + StatusSucceeded Status = "Succeeded" +) + +// PossibleStatusValues returns the possible values for the Status const type. +func PossibleStatusValues() []Status { + return []Status{ + StatusCanceled, + StatusFailed, + StatusRunning, + StatusSucceeded, + } +} + +// Type - The type of resource, for instance Microsoft.Kusto/clusters/databases. +type Type string + +const ( + TypeMicrosoftKustoClustersAttachedDatabaseConfigurations Type = "Microsoft.Kusto/clusters/attachedDatabaseConfigurations" + TypeMicrosoftKustoClustersDatabases Type = "Microsoft.Kusto/clusters/databases" +) + +// PossibleTypeValues returns the possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{ + TypeMicrosoftKustoClustersAttachedDatabaseConfigurations, + TypeMicrosoftKustoClustersDatabases, + } +} + +// VnetState - When enabled, the cluster is deployed into the configured subnet, when disabled it will be removed from the +// subnet. +type VnetState string + +const ( + VnetStateDisabled VnetState = "Disabled" + VnetStateEnabled VnetState = "Enabled" +) + +// PossibleVnetStateValues returns the possible values for the VnetState const type. +func PossibleVnetStateValues() []VnetState { + return []VnetState{ + VnetStateDisabled, + VnetStateEnabled, + } +} + +// ZoneStatus - Indicates whether the cluster is zonal or non-zonal. +type ZoneStatus string + +const ( + ZoneStatusNonZonal ZoneStatus = "NonZonal" + ZoneStatusZonal ZoneStatus = "Zonal" + ZoneStatusZonalInconsistency ZoneStatus = "ZonalInconsistency" +) + +// PossibleZoneStatusValues returns the possible values for the ZoneStatus const type. +func PossibleZoneStatusValues() []ZoneStatus { + return []ZoneStatus{ + ZoneStatusNonZonal, + ZoneStatusZonal, + ZoneStatusZonalInconsistency, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/database_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/database_client.go new file mode 100644 index 00000000..5ea93c3a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/database_client.go @@ -0,0 +1,117 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DatabaseClient contains the methods for the Database group. +// Don't use this type directly, use NewDatabaseClient() instead. +type DatabaseClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDatabaseClient creates a new instance of DatabaseClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDatabaseClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DatabaseClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// InviteFollower - Generates an invitation token that allows attaching a follower database to this database. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - databaseName - The name of the database in the Kusto cluster. +// - parameters - The follower invitation request parameters. +// - options - DatabaseClientInviteFollowerOptions contains the optional parameters for the DatabaseClient.InviteFollower method. +func (client *DatabaseClient) InviteFollower(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DatabaseInviteFollowerRequest, options *DatabaseClientInviteFollowerOptions) (DatabaseClientInviteFollowerResponse, error) { + var err error + const operationName = "DatabaseClient.InviteFollower" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.inviteFollowerCreateRequest(ctx, resourceGroupName, clusterName, databaseName, parameters, options) + if err != nil { + return DatabaseClientInviteFollowerResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DatabaseClientInviteFollowerResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabaseClientInviteFollowerResponse{}, err + } + resp, err := client.inviteFollowerHandleResponse(httpResp) + return resp, err +} + +// inviteFollowerCreateRequest creates the InviteFollower request. +func (client *DatabaseClient) inviteFollowerCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DatabaseInviteFollowerRequest, options *DatabaseClientInviteFollowerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/inviteFollower" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if databaseName == "" { + return nil, errors.New("parameter databaseName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{databaseName}", url.PathEscape(databaseName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// inviteFollowerHandleResponse handles the InviteFollower response. +func (client *DatabaseClient) inviteFollowerHandleResponse(resp *http.Response) (DatabaseClientInviteFollowerResponse, error) { + result := DatabaseClientInviteFollowerResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DatabaseInviteFollowerResult); err != nil { + return DatabaseClientInviteFollowerResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/databaseprincipalassignments_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/databaseprincipalassignments_client.go index 0598f8ab..3432c453 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/databaseprincipalassignments_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/databaseprincipalassignments_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkusto @@ -29,12 +28,11 @@ type DatabasePrincipalAssignmentsClient struct { } // NewDatabasePrincipalAssignmentsClient creates a new instance of DatabasePrincipalAssignmentsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDatabasePrincipalAssignmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasePrincipalAssignmentsClient, error) { - cl, err := arm.NewClient(moduleName+".DatabasePrincipalAssignmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,26 +46,33 @@ func NewDatabasePrincipalAssignmentsClient(subscriptionID string, credential azc // CheckNameAvailability - Checks that the database principal assignment is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - principalAssignmentName - The name of the resource. // - options - DatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.CheckNameAvailability // method. func (client *DatabasePrincipalAssignmentsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName DatabasePrincipalAssignmentCheckNameRequest, options *DatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions) (DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "DatabasePrincipalAssignmentsClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, clusterName, databaseName, principalAssignmentName, options) if err != nil { return DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -94,10 +99,13 @@ func (client *DatabasePrincipalAssignmentsClient) checkNameAvailabilityCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, principalAssignmentName) + if err := runtime.MarshalAsJSON(req, principalAssignmentName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -112,8 +120,8 @@ func (client *DatabasePrincipalAssignmentsClient) checkNameAvailabilityHandleRes // BeginCreateOrUpdate - Creates a Kusto cluster database principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. @@ -126,29 +134,40 @@ func (client *DatabasePrincipalAssignmentsClient) BeginCreateOrUpdate(ctx contex if err != nil { return nil, err } - return runtime.NewPoller[DatabasePrincipalAssignmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasePrincipalAssignmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DatabasePrincipalAssignmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasePrincipalAssignmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Creates a Kusto cluster database principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *DatabasePrincipalAssignmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string, parameters DatabasePrincipalAssignment, options *DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DatabasePrincipalAssignmentsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -179,17 +198,20 @@ func (client *DatabasePrincipalAssignmentsClient) createOrUpdateCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a Kusto principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. @@ -201,29 +223,40 @@ func (client *DatabasePrincipalAssignmentsClient) BeginDelete(ctx context.Contex if err != nil { return nil, err } - return runtime.NewPoller[DatabasePrincipalAssignmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasePrincipalAssignmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DatabasePrincipalAssignmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasePrincipalAssignmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes a Kusto principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *DatabasePrincipalAssignmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string, options *DatabasePrincipalAssignmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DatabasePrincipalAssignmentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, databaseName, principalAssignmentName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -254,7 +287,7 @@ func (client *DatabasePrincipalAssignmentsClient) deleteCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -263,26 +296,33 @@ func (client *DatabasePrincipalAssignmentsClient) deleteCreateRequest(ctx contex // Get - Gets a Kusto cluster database principalAssignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - principalAssignmentName - The name of the Kusto principalAssignment. // - options - DatabasePrincipalAssignmentsClientGetOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.Get // method. func (client *DatabasePrincipalAssignmentsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, principalAssignmentName string, options *DatabasePrincipalAssignmentsClientGetOptions) (DatabasePrincipalAssignmentsClientGetResponse, error) { + var err error + const operationName = "DatabasePrincipalAssignmentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, databaseName, principalAssignmentName, options) if err != nil { return DatabasePrincipalAssignmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DatabasePrincipalAssignmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DatabasePrincipalAssignmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabasePrincipalAssignmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -313,7 +353,7 @@ func (client *DatabasePrincipalAssignmentsClient) getCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -330,8 +370,8 @@ func (client *DatabasePrincipalAssignmentsClient) getHandleResponse(resp *http.R // NewListPager - Lists all Kusto cluster database principalAssignments. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - DatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.NewListPager @@ -342,6 +382,7 @@ func (client *DatabasePrincipalAssignmentsClient) NewListPager(resourceGroupName return false }, Fetcher: func(ctx context.Context, page *DatabasePrincipalAssignmentsClientListResponse) (DatabasePrincipalAssignmentsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabasePrincipalAssignmentsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, clusterName, databaseName, options) if err != nil { return DatabasePrincipalAssignmentsClientListResponse{}, err @@ -355,6 +396,7 @@ func (client *DatabasePrincipalAssignmentsClient) NewListPager(resourceGroupName } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -382,7 +424,7 @@ func (client *DatabasePrincipalAssignmentsClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/databases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/databases_client.go similarity index 77% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/databases_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/databases_client.go index 8960d3e6..3f5d0708 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/databases_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/databases_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkusto @@ -18,6 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -29,12 +29,11 @@ type DatabasesClient struct { } // NewDatabasesClient creates a new instance of DatabasesClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasesClient, error) { - cl, err := arm.NewClient(moduleName+".DatabasesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,32 @@ func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential // AddPrincipals - Add Database principals permissions. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - databasePrincipalsToAdd - List of database principals to add. // - options - DatabasesClientAddPrincipalsOptions contains the optional parameters for the DatabasesClient.AddPrincipals method. func (client *DatabasesClient) AddPrincipals(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, databasePrincipalsToAdd DatabasePrincipalListRequest, options *DatabasesClientAddPrincipalsOptions) (DatabasesClientAddPrincipalsResponse, error) { + var err error + const operationName = "DatabasesClient.AddPrincipals" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.addPrincipalsCreateRequest(ctx, resourceGroupName, clusterName, databaseName, databasePrincipalsToAdd, options) if err != nil { return DatabasesClientAddPrincipalsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DatabasesClientAddPrincipalsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DatabasesClientAddPrincipalsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabasesClientAddPrincipalsResponse{}, err } - return client.addPrincipalsHandleResponse(resp) + resp, err := client.addPrincipalsHandleResponse(httpResp) + return resp, err } // addPrincipalsCreateRequest creates the AddPrincipals request. @@ -93,10 +99,13 @@ func (client *DatabasesClient) addPrincipalsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, databasePrincipalsToAdd) + if err := runtime.MarshalAsJSON(req, databasePrincipalsToAdd); err != nil { + return nil, err + } + return req, nil } // addPrincipalsHandleResponse handles the AddPrincipals response. @@ -111,25 +120,32 @@ func (client *DatabasesClient) addPrincipalsHandleResponse(resp *http.Response) // CheckNameAvailability - Checks that the databases resource name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - resourceName - The name of the resource. // - options - DatabasesClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasesClient.CheckNameAvailability // method. func (client *DatabasesClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, resourceName CheckNameRequest, options *DatabasesClientCheckNameAvailabilityOptions) (DatabasesClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "DatabasesClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, clusterName, resourceName, options) if err != nil { return DatabasesClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DatabasesClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DatabasesClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabasesClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -152,10 +168,13 @@ func (client *DatabasesClient) checkNameAvailabilityCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resourceName) + if err := runtime.MarshalAsJSON(req, resourceName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -170,8 +189,8 @@ func (client *DatabasesClient) checkNameAvailabilityHandleResponse(resp *http.Re // BeginCreateOrUpdate - Creates or updates a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - parameters - The database parameters supplied to the CreateOrUpdate operation. @@ -183,29 +202,40 @@ func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resource if err != nil { return nil, err } - return runtime.NewPoller[DatabasesClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DatabasesClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Creates or updates a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *DatabasesClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DatabaseClassification, options *DatabasesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -232,20 +262,23 @@ func (client *DatabasesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") if options != nil && options.CallerRole != nil { reqQP.Set("callerRole", string(*options.CallerRole)) } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the database with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method. @@ -255,29 +288,40 @@ func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - return runtime.NewPoller[DatabasesClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DatabasesClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes the database with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *DatabasesClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, databaseName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -304,7 +348,7 @@ func (client *DatabasesClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -313,24 +357,31 @@ func (client *DatabasesClient) deleteCreateRequest(ctx context.Context, resource // Get - Returns a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method. func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, options *DatabasesClientGetOptions) (DatabasesClientGetResponse, error) { + var err error + const operationName = "DatabasesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, databaseName, options) if err != nil { return DatabasesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DatabasesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DatabasesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabasesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -357,7 +408,7 @@ func (client *DatabasesClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -374,30 +425,31 @@ func (client *DatabasesClient) getHandleResponse(resp *http.Response) (Databases // NewListByClusterPager - Returns the list of databases of the given Kusto cluster. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - DatabasesClientListByClusterOptions contains the optional parameters for the DatabasesClient.NewListByClusterPager // method. func (client *DatabasesClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *DatabasesClientListByClusterOptions) *runtime.Pager[DatabasesClientListByClusterResponse] { return runtime.NewPager(runtime.PagingHandler[DatabasesClientListByClusterResponse]{ More: func(page DatabasesClientListByClusterResponse) bool { - return false + return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DatabasesClientListByClusterResponse) (DatabasesClientListByClusterResponse, error) { - req, err := client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) - if err != nil { - return DatabasesClientListByClusterResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabasesClient.NewListByClusterPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) + }, nil) if err != nil { return DatabasesClientListByClusterResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DatabasesClientListByClusterResponse{}, runtime.NewResponseError(resp) - } return client.listByClusterHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -421,7 +473,13 @@ func (client *DatabasesClient) listByClusterCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + if options != nil && options.Skiptoken != nil { + reqQP.Set("$skiptoken", *options.Skiptoken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -438,8 +496,8 @@ func (client *DatabasesClient) listByClusterHandleResponse(resp *http.Response) // NewListPrincipalsPager - Returns a list of database principals of the given Kusto cluster and database. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - DatabasesClientListPrincipalsOptions contains the optional parameters for the DatabasesClient.NewListPrincipalsPager @@ -450,6 +508,7 @@ func (client *DatabasesClient) NewListPrincipalsPager(resourceGroupName string, return false }, Fetcher: func(ctx context.Context, page *DatabasesClientListPrincipalsResponse) (DatabasesClientListPrincipalsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DatabasesClient.NewListPrincipalsPager") req, err := client.listPrincipalsCreateRequest(ctx, resourceGroupName, clusterName, databaseName, options) if err != nil { return DatabasesClientListPrincipalsResponse{}, err @@ -463,6 +522,7 @@ func (client *DatabasesClient) NewListPrincipalsPager(resourceGroupName string, } return client.listPrincipalsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -490,7 +550,7 @@ func (client *DatabasesClient) listPrincipalsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -508,26 +568,33 @@ func (client *DatabasesClient) listPrincipalsHandleResponse(resp *http.Response) // RemovePrincipals - Remove Database principals permissions. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - databasePrincipalsToRemove - List of database principals to remove. // - options - DatabasesClientRemovePrincipalsOptions contains the optional parameters for the DatabasesClient.RemovePrincipals // method. func (client *DatabasesClient) RemovePrincipals(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, databasePrincipalsToRemove DatabasePrincipalListRequest, options *DatabasesClientRemovePrincipalsOptions) (DatabasesClientRemovePrincipalsResponse, error) { + var err error + const operationName = "DatabasesClient.RemovePrincipals" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.removePrincipalsCreateRequest(ctx, resourceGroupName, clusterName, databaseName, databasePrincipalsToRemove, options) if err != nil { return DatabasesClientRemovePrincipalsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DatabasesClientRemovePrincipalsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DatabasesClientRemovePrincipalsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DatabasesClientRemovePrincipalsResponse{}, err } - return client.removePrincipalsHandleResponse(resp) + resp, err := client.removePrincipalsHandleResponse(httpResp) + return resp, err } // removePrincipalsCreateRequest creates the RemovePrincipals request. @@ -554,10 +621,13 @@ func (client *DatabasesClient) removePrincipalsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, databasePrincipalsToRemove) + if err := runtime.MarshalAsJSON(req, databasePrincipalsToRemove); err != nil { + return nil, err + } + return req, nil } // removePrincipalsHandleResponse handles the RemovePrincipals response. @@ -572,8 +642,8 @@ func (client *DatabasesClient) removePrincipalsHandleResponse(resp *http.Respons // BeginUpdate - Updates a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - parameters - The database parameters supplied to the Update operation. @@ -584,29 +654,40 @@ func (client *DatabasesClient) BeginUpdate(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - return runtime.NewPoller[DatabasesClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DatabasesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DatabasesClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DatabasesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates a database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *DatabasesClient) update(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DatabaseClassification, options *DatabasesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DatabasesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -633,11 +714,14 @@ func (client *DatabasesClient) updateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") if options != nil && options.CallerRole != nil { reqQP.Set("callerRole", string(*options.CallerRole)) } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/dataconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/dataconnections_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/dataconnections_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/dataconnections_client.go index ce331867..9e31f42e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/dataconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/dataconnections_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkusto @@ -29,12 +28,11 @@ type DataConnectionsClient struct { } // NewDataConnectionsClient creates a new instance of DataConnectionsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDataConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataConnectionsClient, error) { - cl, err := arm.NewClient(moduleName+".DataConnectionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,26 +46,33 @@ func NewDataConnectionsClient(subscriptionID string, credential azcore.TokenCred // CheckNameAvailability - Checks that the data connection name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - dataConnectionName - The name of the data connection. // - options - DataConnectionsClientCheckNameAvailabilityOptions contains the optional parameters for the DataConnectionsClient.CheckNameAvailability // method. func (client *DataConnectionsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName DataConnectionCheckNameRequest, options *DataConnectionsClientCheckNameAvailabilityOptions) (DataConnectionsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "DataConnectionsClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName, options) if err != nil { return DataConnectionsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataConnectionsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataConnectionsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataConnectionsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -94,10 +99,13 @@ func (client *DataConnectionsClient) checkNameAvailabilityCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, dataConnectionName) + if err := runtime.MarshalAsJSON(req, dataConnectionName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -112,8 +120,8 @@ func (client *DataConnectionsClient) checkNameAvailabilityHandleResponse(resp *h // BeginCreateOrUpdate - Creates or updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - dataConnectionName - The name of the data connection. @@ -126,29 +134,40 @@ func (client *DataConnectionsClient) BeginCreateOrUpdate(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[DataConnectionsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DataConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DataConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DataConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Creates or updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *DataConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *DataConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DataConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -179,17 +198,20 @@ func (client *DataConnectionsClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDataConnectionValidation - Checks that the data connection parameters are valid. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - parameters - The data connection parameters supplied to the CreateOrUpdate operation. @@ -201,31 +223,40 @@ func (client *DataConnectionsClient) BeginDataConnectionValidation(ctx context.C if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DataConnectionsClientDataConnectionValidationResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DataConnectionsClientDataConnectionValidationResponse]{ + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DataConnectionsClientDataConnectionValidationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DataConnectionsClientDataConnectionValidationResponse]{ + Tracer: client.internal.Tracer(), + }) } } // DataConnectionValidation - Checks that the data connection parameters are valid. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *DataConnectionsClient) dataConnectionValidation(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, parameters DataConnectionValidation, options *DataConnectionsClientBeginDataConnectionValidationOptions) (*http.Response, error) { + var err error + const operationName = "DataConnectionsClient.BeginDataConnectionValidation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.dataConnectionValidationCreateRequest(ctx, resourceGroupName, clusterName, databaseName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // dataConnectionValidationCreateRequest creates the DataConnectionValidation request. @@ -252,17 +283,20 @@ func (client *DataConnectionsClient) dataConnectionValidationCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the data connection with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - dataConnectionName - The name of the data connection. @@ -274,29 +308,40 @@ func (client *DataConnectionsClient) BeginDelete(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[DataConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DataConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DataConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DataConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes the data connection with the given name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *DataConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, options *DataConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DataConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -327,7 +372,7 @@ func (client *DataConnectionsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -336,25 +381,32 @@ func (client *DataConnectionsClient) deleteCreateRequest(ctx context.Context, re // Get - Returns a data connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - dataConnectionName - The name of the data connection. // - options - DataConnectionsClientGetOptions contains the optional parameters for the DataConnectionsClient.Get method. func (client *DataConnectionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, options *DataConnectionsClientGetOptions) (DataConnectionsClientGetResponse, error) { + var err error + const operationName = "DataConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName, options) if err != nil { return DataConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DataConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DataConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -385,7 +437,7 @@ func (client *DataConnectionsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -402,8 +454,8 @@ func (client *DataConnectionsClient) getHandleResponse(resp *http.Response) (Dat // NewListByDatabasePager - Returns the list of data connections of the given Kusto database. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - DataConnectionsClientListByDatabaseOptions contains the optional parameters for the DataConnectionsClient.NewListByDatabasePager @@ -414,6 +466,7 @@ func (client *DataConnectionsClient) NewListByDatabasePager(resourceGroupName st return false }, Fetcher: func(ctx context.Context, page *DataConnectionsClientListByDatabaseResponse) (DataConnectionsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DataConnectionsClient.NewListByDatabasePager") req, err := client.listByDatabaseCreateRequest(ctx, resourceGroupName, clusterName, databaseName, options) if err != nil { return DataConnectionsClientListByDatabaseResponse{}, err @@ -427,6 +480,7 @@ func (client *DataConnectionsClient) NewListByDatabasePager(resourceGroupName st } return client.listByDatabaseHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -454,7 +508,7 @@ func (client *DataConnectionsClient) listByDatabaseCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -472,8 +526,8 @@ func (client *DataConnectionsClient) listByDatabaseHandleResponse(resp *http.Res // BeginUpdate - Updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - dataConnectionName - The name of the data connection. @@ -486,29 +540,40 @@ func (client *DataConnectionsClient) BeginUpdate(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[DataConnectionsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DataConnectionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DataConnectionsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DataConnectionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates a data connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *DataConnectionsClient) update(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, dataConnectionName string, parameters DataConnectionClassification, options *DataConnectionsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DataConnectionsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, dataConnectionName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -539,8 +604,11 @@ func (client *DataConnectionsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/interfaces.go new file mode 100644 index 00000000..afc499ed --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/interfaces.go @@ -0,0 +1,27 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +// DataConnectionClassification provides polymorphic access to related types. +// Call the interface's GetDataConnection() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CosmosDbDataConnection, *DataConnection, *EventGridDataConnection, *EventHubDataConnection, *IotHubDataConnection +type DataConnectionClassification interface { + // GetDataConnection returns the DataConnection content of the underlying type. + GetDataConnection() *DataConnection +} + +// DatabaseClassification provides polymorphic access to related types. +// Call the interface's GetDatabase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *Database, *ReadOnlyFollowingDatabase, *ReadWriteDatabase +type DatabaseClassification interface { + // GetDatabase returns the Database content of the underlying type. + GetDatabase() *Database +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/managedprivateendpoints_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/managedprivateendpoints_client.go index 72beb413..74d573a3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/managedprivateendpoints_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/managedprivateendpoints_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkusto @@ -29,12 +28,11 @@ type ManagedPrivateEndpointsClient struct { } // NewManagedPrivateEndpointsClient creates a new instance of ManagedPrivateEndpointsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewManagedPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedPrivateEndpointsClient, error) { - cl, err := arm.NewClient(moduleName+".ManagedPrivateEndpointsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +46,32 @@ func NewManagedPrivateEndpointsClient(subscriptionID string, credential azcore.T // CheckNameAvailability - Checks that the managed private endpoints resource name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - resourceName - The name of the resource. // - options - ManagedPrivateEndpointsClientCheckNameAvailabilityOptions contains the optional parameters for the ManagedPrivateEndpointsClient.CheckNameAvailability // method. func (client *ManagedPrivateEndpointsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, resourceName ManagedPrivateEndpointsCheckNameRequest, options *ManagedPrivateEndpointsClientCheckNameAvailabilityOptions) (ManagedPrivateEndpointsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ManagedPrivateEndpointsClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, clusterName, resourceName, options) if err != nil { return ManagedPrivateEndpointsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedPrivateEndpointsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedPrivateEndpointsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedPrivateEndpointsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -89,10 +94,13 @@ func (client *ManagedPrivateEndpointsClient) checkNameAvailabilityCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resourceName) + if err := runtime.MarshalAsJSON(req, resourceName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -107,8 +115,8 @@ func (client *ManagedPrivateEndpointsClient) checkNameAvailabilityHandleResponse // BeginCreateOrUpdate - Creates a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - managedPrivateEndpointName - The name of the managed private endpoint. // - parameters - The managed private endpoint parameters. @@ -120,29 +128,40 @@ func (client *ManagedPrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Con if err != nil { return nil, err } - return runtime.NewPoller[ManagedPrivateEndpointsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedPrivateEndpointsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagedPrivateEndpointsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedPrivateEndpointsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Creates a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *ManagedPrivateEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, parameters ManagedPrivateEndpoint, options *ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedPrivateEndpointsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, managedPrivateEndpointName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -169,17 +188,20 @@ func (client *ManagedPrivateEndpointsClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - managedPrivateEndpointName - The name of the managed private endpoint. // - options - ManagedPrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginDelete @@ -190,29 +212,40 @@ func (client *ManagedPrivateEndpointsClient) BeginDelete(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[ManagedPrivateEndpointsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedPrivateEndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagedPrivateEndpointsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedPrivateEndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *ManagedPrivateEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, options *ManagedPrivateEndpointsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagedPrivateEndpointsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, managedPrivateEndpointName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -239,7 +272,7 @@ func (client *ManagedPrivateEndpointsClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,25 +281,32 @@ func (client *ManagedPrivateEndpointsClient) deleteCreateRequest(ctx context.Con // Get - Gets a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - managedPrivateEndpointName - The name of the managed private endpoint. // - options - ManagedPrivateEndpointsClientGetOptions contains the optional parameters for the ManagedPrivateEndpointsClient.Get // method. func (client *ManagedPrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, options *ManagedPrivateEndpointsClientGetOptions) (ManagedPrivateEndpointsClientGetResponse, error) { + var err error + const operationName = "ManagedPrivateEndpointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, managedPrivateEndpointName, options) if err != nil { return ManagedPrivateEndpointsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedPrivateEndpointsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedPrivateEndpointsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedPrivateEndpointsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -293,7 +333,7 @@ func (client *ManagedPrivateEndpointsClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,8 +350,8 @@ func (client *ManagedPrivateEndpointsClient) getHandleResponse(resp *http.Respon // NewListPager - Returns the list of managed private endpoints. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - options - ManagedPrivateEndpointsClientListOptions contains the optional parameters for the ManagedPrivateEndpointsClient.NewListPager // method. @@ -321,6 +361,7 @@ func (client *ManagedPrivateEndpointsClient) NewListPager(resourceGroupName stri return false }, Fetcher: func(ctx context.Context, page *ManagedPrivateEndpointsClientListResponse) (ManagedPrivateEndpointsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedPrivateEndpointsClient.NewListPager") req, err := client.listCreateRequest(ctx, resourceGroupName, clusterName, options) if err != nil { return ManagedPrivateEndpointsClientListResponse{}, err @@ -334,6 +375,7 @@ func (client *ManagedPrivateEndpointsClient) NewListPager(resourceGroupName stri } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -357,7 +399,7 @@ func (client *ManagedPrivateEndpointsClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -375,8 +417,8 @@ func (client *ManagedPrivateEndpointsClient) listHandleResponse(resp *http.Respo // BeginUpdate - Updates a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - managedPrivateEndpointName - The name of the managed private endpoint. // - parameters - The managed private endpoint parameters. @@ -388,29 +430,40 @@ func (client *ManagedPrivateEndpointsClient) BeginUpdate(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[ManagedPrivateEndpointsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedPrivateEndpointsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ManagedPrivateEndpointsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedPrivateEndpointsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates a managed private endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *ManagedPrivateEndpointsClient) update(ctx context.Context, resourceGroupName string, clusterName string, managedPrivateEndpointName string, parameters ManagedPrivateEndpoint, options *ManagedPrivateEndpointsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ManagedPrivateEndpointsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, managedPrivateEndpointName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -437,8 +490,11 @@ func (client *ManagedPrivateEndpointsClient) updateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/models.go new file mode 100644 index 00000000..f3836949 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/models.go @@ -0,0 +1,1713 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import "time" + +// AcceptedAudiences - Represents an accepted audience trusted by the cluster. +type AcceptedAudiences struct { + // GUID or valid URL representing an accepted audience. + Value *string +} + +// AttachedDatabaseConfiguration - Class representing an attached database configuration. +type AttachedDatabaseConfiguration struct { + // Resource location. + Location *string + + // The properties of the attached database configuration. + Properties *AttachedDatabaseConfigurationProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AttachedDatabaseConfigurationListResult - The list attached database configurations operation response. +type AttachedDatabaseConfigurationListResult struct { + // The list of attached database configurations. + Value []*AttachedDatabaseConfiguration +} + +// AttachedDatabaseConfigurationProperties - Class representing the an attached database configuration properties of kind +// specific. +type AttachedDatabaseConfigurationProperties struct { + // REQUIRED; The resource id of the cluster where the databases you would like to attach reside. + ClusterResourceID *string + + // REQUIRED; The name of the database which you would like to attach, use * if you want to follow all current and future databases. + DatabaseName *string + + // REQUIRED; The default principals modification kind + DefaultPrincipalsModificationKind *DefaultPrincipalsModificationKind + + // Overrides the original database name. Relevant only when attaching to a specific database. + DatabaseNameOverride *string + + // Adds a prefix to the attached databases name. When following an entire cluster, that prefix would be added to all of the + // databases original names from leader cluster. + DatabaseNamePrefix *string + + // Table level sharing specifications + TableLevelSharingProperties *TableLevelSharingProperties + + // READ-ONLY; The list of databases from the clusterResourceId which are currently attached to the cluster. + AttachedDatabaseNames []*string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState +} + +// AttachedDatabaseConfigurationsCheckNameRequest - The result returned from a AttachedDatabaseConfigurations check name availability +// request. +type AttachedDatabaseConfigurationsCheckNameRequest struct { + // REQUIRED; Attached database resource name. + Name *string + + // CONSTANT; The type of resource, for instance Microsoft.Kusto/clusters/attachedDatabaseConfigurations. + // Field has constant value "Microsoft.Kusto/clusters/attachedDatabaseConfigurations", any specified value is ignored. + Type *string +} + +// AzureCapacity - Azure capacity definition. +type AzureCapacity struct { + // REQUIRED; The default capacity that would be used. + Default *int32 + + // REQUIRED; Maximum allowed capacity. + Maximum *int32 + + // REQUIRED; Minimum allowed capacity. + Minimum *int32 + + // REQUIRED; Scale type. + ScaleType *AzureScaleType +} + +// AzureResourceSKU - Azure resource SKU definition. +type AzureResourceSKU struct { + // The number of instances of the cluster. + Capacity *AzureCapacity + + // Resource Namespace and Type. + ResourceType *string + + // The SKU details. + SKU *AzureSKU +} + +// AzureSKU - Azure SKU definition. +type AzureSKU struct { + // REQUIRED; SKU name. + Name *AzureSKUName + + // REQUIRED; SKU tier. + Tier *AzureSKUTier + + // The number of instances of the cluster. + Capacity *int32 +} + +// CalloutPoliciesList - A list of the service's callout policy objects. +type CalloutPoliciesList struct { + // The URL to get the next set of callout policies list results if there are any. + NextLink *string + + // A list of the service's callout policies. + Value []*CalloutPolicy +} + +// CalloutPolicy - Configuration for external callout policies, including URI patterns, access types, and service types. +type CalloutPolicy struct { + // Type of the callout service, specifying the kind of external resource or service being accessed. + CalloutType *CalloutType + + // Regular expression or FQDN pattern for the callout URI. + CalloutURIRegex *string + + // Indicates whether outbound access is permitted for the specified URI pattern. + OutboundAccess *OutboundAccess + + // READ-ONLY; Unique identifier for the callout configuration. + CalloutID *string +} + +// CalloutPolicyToRemove - Configuration for an external callout policy to remove. +type CalloutPolicyToRemove struct { + // Unique identifier for the callout configuration. + CalloutID *string +} + +// CheckNameRequest - The result returned from a database check name availability request. +type CheckNameRequest struct { + // REQUIRED; Resource name. + Name *string + + // REQUIRED; The type of resource, for instance Microsoft.Kusto/clusters/databases. + Type *Type +} + +// CheckNameResult - The result returned from a check name availability request. +type CheckNameResult struct { + // Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. + Message *string + + // The name that was checked. + Name *string + + // Specifies a Boolean value that indicates if the name is available. + NameAvailable *bool + + // Message providing the reason why the given name is invalid. + Reason *Reason +} + +// Cluster - Class representing a Kusto cluster. +type Cluster struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; The SKU of the cluster. + SKU *AzureSKU + + // The identity of the cluster, if configured. + Identity *Identity + + // The cluster properties. + Properties *ClusterProperties + + // Resource tags. + Tags map[string]*string + + // The availability zones of the cluster. + Zones []*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ClusterCheckNameRequest - The result returned from a cluster check name availability request. +type ClusterCheckNameRequest struct { + // REQUIRED; Cluster name. + Name *string + + // CONSTANT; The type of resource, Microsoft.Kusto/clusters. + // Field has constant value "Microsoft.Kusto/clusters", any specified value is ignored. + Type *string +} + +// ClusterListResult - The list Kusto clusters operation response. +type ClusterListResult struct { + // The list of Kusto clusters. + Value []*Cluster +} + +// ClusterMigrateRequest - A cluster migrate request. +type ClusterMigrateRequest struct { + // REQUIRED; Resource ID of the destination cluster or kusto pool. + ClusterResourceID *string +} + +// ClusterPrincipalAssignment - Class representing a cluster principal assignment. +type ClusterPrincipalAssignment struct { + // The cluster principal. + Properties *ClusterPrincipalProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ClusterPrincipalAssignmentCheckNameRequest - A principal assignment check name availability request. +type ClusterPrincipalAssignmentCheckNameRequest struct { + // REQUIRED; Principal Assignment resource name. + Name *string + + // CONSTANT; The type of resource, Microsoft.Kusto/clusters/principalAssignments. + // Field has constant value "Microsoft.Kusto/clusters/principalAssignments", any specified value is ignored. + Type *string +} + +// ClusterPrincipalAssignmentListResult - The list Kusto cluster principal assignments operation response. +type ClusterPrincipalAssignmentListResult struct { + // The list of Kusto cluster principal assignments. + Value []*ClusterPrincipalAssignment +} + +// ClusterPrincipalProperties - A class representing cluster principal property. +type ClusterPrincipalProperties struct { + // REQUIRED; The principal ID assigned to the cluster principal. It can be a user email, application ID, or security group + // name. + PrincipalID *string + + // REQUIRED; Principal type. + PrincipalType *PrincipalType + + // REQUIRED; Cluster principal role. + Role *ClusterPrincipalRole + + // The tenant id of the principal + TenantID *string + + // READ-ONLY; The service principal object id in AAD (Azure active directory) + AADObjectID *string + + // READ-ONLY; The principal name + PrincipalName *string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The tenant name of the principal + TenantName *string +} + +// ClusterProperties - Class representing the Kusto cluster properties. +type ClusterProperties struct { + // The cluster's accepted audiences. + AcceptedAudiences []*AcceptedAudiences + + // List of allowed FQDNs(Fully Qualified Domain Name) for egress from Cluster. + AllowedFqdnList []*string + + // The list of ips in the format of CIDR allowed to connect to the cluster. + AllowedIPRangeList []*string + + // List of callout policies for egress from Cluster. + CalloutPolicies []*CalloutPolicy + + // A boolean value that indicates if the cluster could be automatically stopped (due to lack of data or no activity for many + // days). + EnableAutoStop *bool + + // A boolean value that indicates if the cluster's disks are encrypted. + EnableDiskEncryption *bool + + // A boolean value that indicates if double encryption is enabled. + EnableDoubleEncryption *bool + + // A boolean value that indicates if the purge operations are enabled. + EnablePurge *bool + + // A boolean value that indicates if the streaming ingest is enabled. + EnableStreamingIngest *bool + + // The engine type + EngineType *EngineType + + // KeyVault properties for the cluster encryption. + KeyVaultProperties *KeyVaultProperties + + // List of the cluster's language extensions. + LanguageExtensions *LanguageExtensionsList + + // Optimized auto scale definition. + OptimizedAutoscale *OptimizedAutoscale + + // Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6) + PublicIPType *PublicIPType + + // Public network access to the cluster is enabled by default. When disabled, only private endpoint connection to the cluster + // is allowed + PublicNetworkAccess *PublicNetworkAccess + + // Whether or not to restrict outbound network access. Value is optional but if passed in, must be 'Enabled' or 'Disabled' + RestrictOutboundNetworkAccess *ClusterNetworkAccessFlag + + // The cluster's external tenants. + TrustedExternalTenants []*TrustedExternalTenant + + // Virtual Cluster graduation properties + VirtualClusterGraduationProperties *string + + // Virtual network definition. + VirtualNetworkConfiguration *VirtualNetworkConfiguration + + // READ-ONLY; The cluster data ingestion URI. + DataIngestionURI *string + + // READ-ONLY; Properties of the peer cluster involved in a migration to/from this cluster. + MigrationCluster *MigrationClusterProperties + + // READ-ONLY; A list of private endpoint connections. + PrivateEndpointConnections []*PrivateEndpointConnection + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The state of the resource. + State *State + + // READ-ONLY; The reason for the cluster's current state. + StateReason *string + + // READ-ONLY; The cluster URI. + URI *string + + // READ-ONLY; Indicates whether the cluster is zonal or non-zonal. + ZoneStatus *ZoneStatus +} + +// ClusterUpdate - Class representing an update to a Kusto cluster. +type ClusterUpdate struct { + // The identity of the cluster, if configured. + Identity *Identity + + // Resource location. + Location *string + + // The cluster properties. + Properties *ClusterProperties + + // The SKU of the cluster. + SKU *AzureSKU + + // Resource tags. + Tags map[string]*string + + // The availability zones of the cluster. + Zones []*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties struct { + // READ-ONLY; The client id of user assigned identity. + ClientID *string + + // READ-ONLY; The principal id of user assigned identity. + PrincipalID *string +} + +// CosmosDbDataConnection - Class representing a CosmosDb data connection. +type CosmosDbDataConnection struct { + // REQUIRED; Kind of the endpoint for the data connection + Kind *DataConnectionKind + + // Resource location. + Location *string + + // The properties of the CosmosDb data connection. + Properties *CosmosDbDataConnectionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GetDataConnection implements the DataConnectionClassification interface for type CosmosDbDataConnection. +func (c *CosmosDbDataConnection) GetDataConnection() *DataConnection { + return &DataConnection{ + ID: c.ID, + Kind: c.Kind, + Location: c.Location, + Name: c.Name, + Type: c.Type, + } +} + +// CosmosDbDataConnectionProperties - Class representing the Kusto CosmosDb data connection properties. +type CosmosDbDataConnectionProperties struct { + // REQUIRED; The resource ID of the Cosmos DB account used to create the data connection. + CosmosDbAccountResourceID *string + + // REQUIRED; The name of an existing container in the Cosmos DB database. + CosmosDbContainer *string + + // REQUIRED; The name of an existing database in the Cosmos DB account. + CosmosDbDatabase *string + + // REQUIRED; The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos + // DB. + ManagedIdentityResourceID *string + + // REQUIRED; The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. + TableName *string + + // The name of an existing mapping rule to use when ingesting the retrieved data. + MappingRuleName *string + + // Optional. If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval + // start date. + RetrievalStartDate *time.Time + + // READ-ONLY; The object ID of the managed identity resource. + ManagedIdentityObjectID *string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState +} + +// DataConnection - Class representing an data connection. +type DataConnection struct { + // REQUIRED; Kind of the endpoint for the data connection + Kind *DataConnectionKind + + // Resource location. + Location *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GetDataConnection implements the DataConnectionClassification interface for type DataConnection. +func (d *DataConnection) GetDataConnection() *DataConnection { return d } + +// DataConnectionCheckNameRequest - A data connection check name availability request. +type DataConnectionCheckNameRequest struct { + // REQUIRED; Data Connection name. + Name *string + + // CONSTANT; The type of resource, Microsoft.Kusto/clusters/databases/dataConnections. + // Field has constant value "Microsoft.Kusto/clusters/databases/dataConnections", any specified value is ignored. + Type *string +} + +// DataConnectionListResult - The list Kusto data connections operation response. +type DataConnectionListResult struct { + // The list of Kusto data connections. + Value []DataConnectionClassification +} + +// DataConnectionValidation - Class representing an data connection validation. +type DataConnectionValidation struct { + // The name of the data connection. + DataConnectionName *string + + // The data connection properties to validate. + Properties DataConnectionClassification +} + +// DataConnectionValidationListResult - The list Kusto data connection validation result. +type DataConnectionValidationListResult struct { + // The list of Kusto data connection validation errors. + Value []*DataConnectionValidationResult +} + +// DataConnectionValidationResult - The result returned from a data connection validation request. +type DataConnectionValidationResult struct { + // A message which indicates a problem in data connection validation. + ErrorMessage *string +} + +// Database - Class representing a Kusto database. +type Database struct { + // REQUIRED; Kind of the database + Kind *Kind + + // Resource location. + Location *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GetDatabase implements the DatabaseClassification interface for type Database. +func (d *Database) GetDatabase() *Database { return d } + +// DatabaseInviteFollowerRequest - The request to invite a follower to a database. +type DatabaseInviteFollowerRequest struct { + // REQUIRED; The email of the invited user for which the follower invitation is generated. + InviteeEmail *string + + // Table level sharing specifications + TableLevelSharingProperties *TableLevelSharingProperties +} + +// DatabaseInviteFollowerResult - The result returned from a follower invitation generation request. +type DatabaseInviteFollowerResult struct { + // The generated invitation token. + GeneratedInvitation *string +} + +// DatabaseListResult - The list Kusto databases operation response. +type DatabaseListResult struct { + // Link to the next page of results + NextLink *string + + // The list of Kusto databases. + Value []DatabaseClassification +} + +// DatabasePrincipal - A class representing database principal entity. +type DatabasePrincipal struct { + // REQUIRED; Database principal name. + Name *string + + // REQUIRED; Database principal role. + Role *DatabasePrincipalRole + + // REQUIRED; Database principal type. + Type *DatabasePrincipalType + + // Application id - relevant only for application principal type. + AppID *string + + // Database principal email if exists. + Email *string + + // Database principal fully qualified name. + Fqn *string + + // READ-ONLY; The tenant name of the principal + TenantName *string +} + +// DatabasePrincipalAssignment - Class representing a database principal assignment. +type DatabasePrincipalAssignment struct { + // The database principal. + Properties *DatabasePrincipalProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// DatabasePrincipalAssignmentCheckNameRequest - A principal assignment check name availability request. +type DatabasePrincipalAssignmentCheckNameRequest struct { + // REQUIRED; Principal Assignment resource name. + Name *string + + // CONSTANT; The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments. + // Field has constant value "Microsoft.Kusto/clusters/databases/principalAssignments", any specified value is ignored. + Type *string +} + +// DatabasePrincipalAssignmentListResult - The list Kusto database principal assignments operation response. +type DatabasePrincipalAssignmentListResult struct { + // The list of Kusto database principal assignments. + Value []*DatabasePrincipalAssignment +} + +// DatabasePrincipalListRequest - The list Kusto database principals operation request. +type DatabasePrincipalListRequest struct { + // The list of Kusto database principals. + Value []*DatabasePrincipal +} + +// DatabasePrincipalListResult - The list Kusto database principals operation response. +type DatabasePrincipalListResult struct { + // The list of Kusto database principals. + Value []*DatabasePrincipal +} + +// DatabasePrincipalProperties - A class representing database principal property. +type DatabasePrincipalProperties struct { + // REQUIRED; The principal ID assigned to the database principal. It can be a user email, application ID, or security group + // name. + PrincipalID *string + + // REQUIRED; Principal type. + PrincipalType *PrincipalType + + // REQUIRED; Database principal role. + Role *DatabasePrincipalRole + + // The tenant id of the principal + TenantID *string + + // READ-ONLY; The service principal object id in AAD (Azure active directory) + AADObjectID *string + + // READ-ONLY; The principal name + PrincipalName *string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The tenant name of the principal + TenantName *string +} + +// DatabaseStatistics - A class that contains database statistics information. +type DatabaseStatistics struct { + // The database size - the total size of compressed data and index in bytes. + Size *float32 +} + +type DiagnoseVirtualNetworkResult struct { + // The list of network connectivity diagnostic finding + Findings []*string +} + +// EndpointDependency - A domain name that a service is reached at, including details of the current connection status. +type EndpointDependency struct { + // The domain name of the dependency. + DomainName *string + + // The ports used when connecting to DomainName. + EndpointDetails []*EndpointDetail +} + +// EndpointDetail - Current TCP connectivity information from the Kusto cluster to a single endpoint. +type EndpointDetail struct { + // The ip address of the endpoint. + IPAddress *string + + // The port an endpoint is connected to. + Port *int32 +} + +// EventGridConnectionProperties - Class representing the Kusto event grid connection properties. +type EventGridConnectionProperties struct { + // REQUIRED; The event hub consumer group. + ConsumerGroup *string + + // REQUIRED; The resource ID where the event grid is configured to send events. + EventHubResourceID *string + + // REQUIRED; The resource ID of the storage account where the data resides. + StorageAccountResourceID *string + + // The name of blob storage event type to process. + BlobStorageEventType *BlobStorageEventType + + // The data format of the message. Optionally the data format can be added to each message. + DataFormat *EventGridDataFormat + + // Indication for database routing information from the data connection, by default only database routing information is allowed + DatabaseRouting *DatabaseRouting + + // The resource ID of the event grid that is subscribed to the storage account events. + EventGridResourceID *string + + // A Boolean value that, if set to true, indicates that ingestion should ignore the first record of every file + IgnoreFirstRecord *bool + + // The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub and storage account. + ManagedIdentityResourceID *string + + // The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + MappingRuleName *string + + // The table where the data should be ingested. Optionally the table information can be added to each message. + TableName *string + + // READ-ONLY; The object ID of managedIdentityResourceId + ManagedIdentityObjectID *string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState +} + +// EventGridDataConnection - Class representing an Event Grid data connection. +type EventGridDataConnection struct { + // REQUIRED; Kind of the endpoint for the data connection + Kind *DataConnectionKind + + // Resource location. + Location *string + + // The properties of the Event Grid data connection. + Properties *EventGridConnectionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GetDataConnection implements the DataConnectionClassification interface for type EventGridDataConnection. +func (e *EventGridDataConnection) GetDataConnection() *DataConnection { + return &DataConnection{ + ID: e.ID, + Kind: e.Kind, + Location: e.Location, + Name: e.Name, + Type: e.Type, + } +} + +// EventHubConnectionProperties - Class representing the Kusto event hub connection properties. +type EventHubConnectionProperties struct { + // REQUIRED; The event hub consumer group. + ConsumerGroup *string + + // REQUIRED; The resource ID of the event hub to be used to create a data connection. + EventHubResourceID *string + + // The event hub messages compression type + Compression *Compression + + // The data format of the message. Optionally the data format can be added to each message. + DataFormat *EventHubDataFormat + + // Indication for database routing information from the data connection, by default only database routing information is allowed + DatabaseRouting *DatabaseRouting + + // System properties of the event hub + EventSystemProperties []*string + + // The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. + ManagedIdentityResourceID *string + + // The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + MappingRuleName *string + + // When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It can only + // retrieve events retained by the Event hub, based on its retention period. + RetrievalStartDate *time.Time + + // The table where the data should be ingested. Optionally the table information can be added to each message. + TableName *string + + // READ-ONLY; The object ID of the managedIdentityResourceId + ManagedIdentityObjectID *string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState +} + +// EventHubDataConnection - Class representing an event hub data connection. +type EventHubDataConnection struct { + // REQUIRED; Kind of the endpoint for the data connection + Kind *DataConnectionKind + + // Resource location. + Location *string + + // The Event Hub data connection properties to validate. + Properties *EventHubConnectionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GetDataConnection implements the DataConnectionClassification interface for type EventHubDataConnection. +func (e *EventHubDataConnection) GetDataConnection() *DataConnection { + return &DataConnection{ + ID: e.ID, + Kind: e.Kind, + Location: e.Location, + Name: e.Name, + Type: e.Type, + } +} + +// FollowerDatabaseDefinition - A class representing follower database request. +type FollowerDatabaseDefinition struct { + // REQUIRED; Resource name of the attached database configuration in the follower cluster. + AttachedDatabaseConfigurationName *string + + // REQUIRED; Resource id of the cluster that follows a database owned by this cluster. + ClusterResourceID *string + + // READ-ONLY; The database name owned by this cluster that was followed. * in case following all databases. + DatabaseName *string + + // READ-ONLY; The origin of the following setup. + DatabaseShareOrigin *DatabaseShareOrigin + + // READ-ONLY; Table level sharing specifications + TableLevelSharingProperties *TableLevelSharingProperties +} + +// FollowerDatabaseDefinitionGet - A class representing follower database object. +type FollowerDatabaseDefinitionGet struct { + // Follower database definition. + Properties *FollowerDatabaseProperties +} + +// FollowerDatabaseListResult - The list Kusto database principals operation response. +type FollowerDatabaseListResult struct { + // The list of follower database result. + Value []*FollowerDatabaseDefinition +} + +// FollowerDatabaseListResultGet - The list Kusto database principals operation response. +type FollowerDatabaseListResultGet struct { + // The URL to get the next set of follower databases list results if there are any. + NextLink *string + + // The list of follower database result. + Value []*FollowerDatabaseDefinitionGet +} + +// FollowerDatabaseProperties - A class representing the properties of a follower database object. +type FollowerDatabaseProperties struct { + // REQUIRED; Resource name of the attached database configuration in the follower cluster. + AttachedDatabaseConfigurationName *string + + // REQUIRED; Resource id of the cluster that follows a database owned by this cluster. + ClusterResourceID *string + + // READ-ONLY; The database name owned by this cluster that was followed. * in case following all databases. + DatabaseName *string + + // READ-ONLY; The origin of the following setup. + DatabaseShareOrigin *DatabaseShareOrigin + + // READ-ONLY; Table level sharing specifications + TableLevelSharingProperties *TableLevelSharingProperties +} + +// Identity for the resource. +type Identity struct { + // REQUIRED; The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created + // identity and a set of user-assigned identities. The type 'None' will remove all + // identities. + Type *IdentityType + + // The list of user identities associated with the Kusto cluster. 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]*ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties + + // READ-ONLY; The principal ID of resource identity. + PrincipalID *string + + // READ-ONLY; The tenant ID of resource. + TenantID *string +} + +// IotHubConnectionProperties - Class representing the Kusto Iot hub connection properties. +type IotHubConnectionProperties struct { + // REQUIRED; The iot hub consumer group. + ConsumerGroup *string + + // REQUIRED; The resource ID of the Iot hub to be used to create a data connection. + IotHubResourceID *string + + // REQUIRED; The name of the share access policy + SharedAccessPolicyName *string + + // The data format of the message. Optionally the data format can be added to each message. + DataFormat *IotHubDataFormat + + // Indication for database routing information from the data connection, by default only database routing information is allowed + DatabaseRouting *DatabaseRouting + + // System properties of the iot hub + EventSystemProperties []*string + + // The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. + MappingRuleName *string + + // When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It can only + // retrieve events retained by the Event hub, based on its retention period. + RetrievalStartDate *time.Time + + // The table where the data should be ingested. Optionally the table information can be added to each message. + TableName *string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState +} + +// IotHubDataConnection - Class representing an iot hub data connection. +type IotHubDataConnection struct { + // REQUIRED; Kind of the endpoint for the data connection + Kind *DataConnectionKind + + // Resource location. + Location *string + + // The Iot Hub data connection properties. + Properties *IotHubConnectionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GetDataConnection implements the DataConnectionClassification interface for type IotHubDataConnection. +func (i *IotHubDataConnection) GetDataConnection() *DataConnection { + return &DataConnection{ + ID: i.ID, + Kind: i.Kind, + Location: i.Location, + Name: i.Name, + Type: i.Type, + } +} + +// KeyVaultProperties - Properties of the key vault. +type KeyVaultProperties struct { + // The name of the key vault key. + KeyName *string + + // The Uri of the key vault. + KeyVaultURI *string + + // The version of the key vault key. + KeyVersion *string + + // The user assigned identity (ARM resource id) that has access to the key. + UserIdentity *string +} + +// LanguageExtension - The language extension object. +type LanguageExtension struct { + // The language extension custom image name. + LanguageExtensionCustomImageName *string + + // The language extension image name. + LanguageExtensionImageName *LanguageExtensionImageName + + // The language extension name. + LanguageExtensionName *LanguageExtensionName +} + +// LanguageExtensionsList - The list of language extension objects. +type LanguageExtensionsList struct { + // The list of language extensions. + Value []*LanguageExtension +} + +// ListResourceSKUsResult - List of available SKUs for a Kusto Cluster. +type ListResourceSKUsResult struct { + // The collection of available SKUs for an existing resource. + Value []*AzureResourceSKU +} + +// ManagedPrivateEndpoint - Class representing a managed private endpoint. +type ManagedPrivateEndpoint struct { + // A managed private endpoint. + Properties *ManagedPrivateEndpointProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ManagedPrivateEndpointListResult - The list managed private endpoints operation response. +type ManagedPrivateEndpointListResult struct { + // The list of managed private endpoints. + Value []*ManagedPrivateEndpoint +} + +// ManagedPrivateEndpointProperties - A class representing the properties of a managed private endpoint object. +type ManagedPrivateEndpointProperties struct { + // REQUIRED; The groupId in which the managed private endpoint is created. + GroupID *string + + // REQUIRED; The ARM resource ID of the resource for which the managed private endpoint is created. + PrivateLinkResourceID *string + + // The region of the resource to which the managed private endpoint is created. + PrivateLinkResourceRegion *string + + // The user request message. + RequestMessage *string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState +} + +// ManagedPrivateEndpointsCheckNameRequest - The result returned from a managedPrivateEndpoints check name availability request. +type ManagedPrivateEndpointsCheckNameRequest struct { + // REQUIRED; Managed private endpoint resource name. + Name *string + + // CONSTANT; The type of resource, for instance Microsoft.Kusto/clusters/managedPrivateEndpoints. + // Field has constant value "Microsoft.Kusto/clusters/managedPrivateEndpoints", any specified value is ignored. + Type *string +} + +// MigrationClusterProperties - Represents a properties of a cluster that is part of a migration. +type MigrationClusterProperties struct { + // READ-ONLY; The public data ingestion URL of the cluster. + DataIngestionURI *string + + // READ-ONLY; The resource ID of the cluster. + ID *string + + // READ-ONLY; The role of the cluster in the migration process. + Role *MigrationClusterRole + + // READ-ONLY; The public URL of the cluster. + URI *string +} + +// Operation - A REST API operation +type Operation struct { + // The object that describes the operation. + Display *OperationDisplay + + // This is of the format {provider}/{resource}/{operation}. + Name *string + + // The intended executor of the operation. + Origin *string + + // Properties of the operation. + Properties any +} + +// OperationDisplay - The object that describes the operation. +type OperationDisplay struct { + // The friendly name of the operation. + Description *string + + // For example: read, write, delete. + Operation *string + + // Friendly name of the resource provider. + Provider *string + + // The resource type on which the operation is performed. + Resource *string +} + +// OperationListResult - Result of the request to list REST API operations. It contains a list of operations and a URL nextLink +// to get the next set of results. +type OperationListResult struct { + // The URL to get the next set of operation list results if there are any. + NextLink *string + + // The list of operations supported by the resource provider. + Value []*Operation +} + +// OperationResult - Operation Result Entity. +type OperationResult struct { + // The operation end time + EndTime *time.Time + + // Object that contains the error code and message if the operation failed. + Error *OperationResultErrorProperties + + // Percentage completed. + PercentComplete *float64 + + // Properties of the operation results + Properties *OperationResultProperties + + // The operation start time + StartTime *time.Time + + // READ-ONLY; ID of the resource. + ID *string + + // READ-ONLY; Name of the resource. + Name *string + + // READ-ONLY; status of the Operation result. + Status *Status +} + +// OperationResultErrorProperties - Operation result error properties +type OperationResultErrorProperties struct { + // The code of the error. + Code *string + + // The error message. + Message *string +} + +// OperationResultProperties - Operation result properties +type OperationResultProperties struct { + // The kind of the operation. + OperationKind *string + + // The state of the operation. + OperationState *string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState +} + +// OptimizedAutoscale - A class that contains the optimized auto scale definition. +type OptimizedAutoscale struct { + // REQUIRED; A boolean value that indicate if the optimized autoscale feature is enabled or not. + IsEnabled *bool + + // REQUIRED; Maximum allowed instances count. + Maximum *int32 + + // REQUIRED; Minimum allowed instances count. + Minimum *int32 + + // REQUIRED; The version of the template defined, for instance 1. + Version *int32 +} + +// OutboundNetworkDependenciesEndpoint - Endpoints accessed for a common purpose that the Kusto Service Environment requires +// outbound network access to. +type OutboundNetworkDependenciesEndpoint struct { + // The outbound environment endpoint properties. + Properties *OutboundNetworkDependenciesEndpointProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// OutboundNetworkDependenciesEndpointListResult - Collection of Outbound Environment Endpoints +type OutboundNetworkDependenciesEndpointListResult struct { + // REQUIRED; Collection of resources. + Value []*OutboundNetworkDependenciesEndpoint + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// OutboundNetworkDependenciesEndpointProperties - Endpoints accessed for a common purpose that the Kusto Service Environment +// requires outbound network access to. +type OutboundNetworkDependenciesEndpointProperties struct { + // The type of service accessed by the Kusto Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active + // Directory. + Category *string + + // The endpoints that the Kusto Service Environment reaches the service at. + Endpoints []*EndpointDependency + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState +} + +// PrivateEndpointConnection - A private endpoint connection +type PrivateEndpointConnection struct { + // Resource properties. + Properties *PrivateEndpointConnectionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PrivateEndpointConnectionListResult - A list of private endpoint connections +type PrivateEndpointConnectionListResult struct { + // Array of private endpoint connections + Value []*PrivateEndpointConnection +} + +// PrivateEndpointConnectionProperties - Properties of a private endpoint connection. +type PrivateEndpointConnectionProperties struct { + // REQUIRED; Connection State of the Private Endpoint Connection. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty + + // READ-ONLY; Group id of the private endpoint. + GroupID *string + + // READ-ONLY; Private endpoint which the connection belongs to. + PrivateEndpoint *PrivateEndpointProperty + + // READ-ONLY; Provisioning state of the private endpoint. + ProvisioningState *string +} + +// PrivateEndpointProperty - Private endpoint which the connection belongs to. +type PrivateEndpointProperty struct { + // READ-ONLY; Resource id of the private endpoint. + ID *string +} + +// PrivateLinkResource - A private link resource +type PrivateLinkResource struct { + // Resource properties. + Properties *PrivateLinkResourceProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// PrivateLinkResourceListResult - A list of private link resources +type PrivateLinkResourceListResult struct { + // Array of private link resources + Value []*PrivateLinkResource +} + +// PrivateLinkResourceProperties - Properties of a private link resource. +type PrivateLinkResourceProperties struct { + // READ-ONLY; The private link resource group id. + GroupID *string + + // READ-ONLY; The private link resource required member names. + RequiredMembers []*string + + // READ-ONLY; The private link resource required zone names. + RequiredZoneNames []*string +} + +// PrivateLinkServiceConnectionStateProperty - Connection State of the Private Endpoint Connection. +type PrivateLinkServiceConnectionStateProperty struct { + // The private link service connection description. + Description *string + + // The private link service connection status. + Status *string + + // READ-ONLY; Any action that is required beyond basic workflow (approve/ reject/ disconnect) + ActionsRequired *string +} + +// ReadOnlyFollowingDatabase - Class representing a read only following database. +type ReadOnlyFollowingDatabase struct { + // REQUIRED; Kind of the database + Kind *Kind + + // Resource location. + Location *string + + // The database properties. + Properties *ReadOnlyFollowingDatabaseProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GetDatabase implements the DatabaseClassification interface for type ReadOnlyFollowingDatabase. +func (r *ReadOnlyFollowingDatabase) GetDatabase() *Database { + return &Database{ + ID: r.ID, + Kind: r.Kind, + Location: r.Location, + Name: r.Name, + Type: r.Type, + } +} + +// ReadOnlyFollowingDatabaseProperties - Class representing the Kusto database properties. +type ReadOnlyFollowingDatabaseProperties struct { + // The time the data should be kept in cache for fast queries in TimeSpan. + HotCachePeriod *string + + // READ-ONLY; The name of the attached database configuration cluster + AttachedDatabaseConfigurationName *string + + // READ-ONLY; The origin of the following setup. + DatabaseShareOrigin *DatabaseShareOrigin + + // READ-ONLY; The name of the leader cluster + LeaderClusterResourceID *string + + // READ-ONLY; The original database name, before databaseNameOverride or databaseNamePrefix where applied. + OriginalDatabaseName *string + + // READ-ONLY; The principals modification kind of the database + PrincipalsModificationKind *PrincipalsModificationKind + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The time the data should be kept before it stops being accessible to queries in TimeSpan. + SoftDeletePeriod *string + + // READ-ONLY; The statistics of the database. + Statistics *DatabaseStatistics + + // READ-ONLY; The database suspension details. If the database is suspended, this object contains information related to the + // database's suspension state. + SuspensionDetails *SuspensionDetails + + // READ-ONLY; Table level sharing specifications + TableLevelSharingProperties *TableLevelSharingProperties +} + +// ReadWriteDatabase - Class representing a read write database. +type ReadWriteDatabase struct { + // REQUIRED; Kind of the database + Kind *Kind + + // Resource location. + Location *string + + // The database properties. + Properties *ReadWriteDatabaseProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// GetDatabase implements the DatabaseClassification interface for type ReadWriteDatabase. +func (r *ReadWriteDatabase) GetDatabase() *Database { + return &Database{ + ID: r.ID, + Kind: r.Kind, + Location: r.Location, + Name: r.Name, + Type: r.Type, + } +} + +// ReadWriteDatabaseProperties - Class representing the Kusto database properties. +type ReadWriteDatabaseProperties struct { + // The time the data should be kept in cache for fast queries in TimeSpan. + HotCachePeriod *string + + // KeyVault properties for the database encryption. + KeyVaultProperties *KeyVaultProperties + + // The time the data should be kept before it stops being accessible to queries in TimeSpan. + SoftDeletePeriod *string + + // READ-ONLY; Indicates whether the database is followed. + IsFollowed *bool + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The statistics of the database. + Statistics *DatabaseStatistics + + // READ-ONLY; The database suspension details. If the database is suspended, this object contains information related to the + // database's suspension state. + SuspensionDetails *SuspensionDetails +} + +// ResourceSKUCapabilities - Describes The SKU capabilities object. +type ResourceSKUCapabilities struct { + // READ-ONLY; An invariant to describe the feature. + Name *string + + // READ-ONLY; An invariant if the feature is measured by quantity. + Value *string +} + +// ResourceSKUZoneDetails - Describes The zonal capabilities of a SKU. +type ResourceSKUZoneDetails struct { + // READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones. + Capabilities []*ResourceSKUCapabilities + + // READ-ONLY; The set of zones that the SKU is available in with the specified capabilities. + Name []*string +} + +// SKUDescription - The Kusto SKU description of given resource type +type SKUDescription struct { + // READ-ONLY; Locations and zones + LocationInfo []*SKULocationInfoItem + + // READ-ONLY; The set of locations that the SKU is available + Locations []*string + + // READ-ONLY; The name of the SKU + Name *string + + // READ-ONLY; The resource type + ResourceType *string + + // READ-ONLY; The restrictions because of which SKU cannot be used + Restrictions []any + + // READ-ONLY; The tier of the SKU + Tier *string +} + +// SKUDescriptionList - The list of the EngagementFabric SKU descriptions +type SKUDescriptionList struct { + // READ-ONLY; SKU descriptions + Value []*SKUDescription +} + +// SKULocationInfoItem - The locations and zones info for SKU. +type SKULocationInfoItem struct { + // REQUIRED; The available location of the SKU. + Location *string + + // Gets details of capabilities available to a SKU in specific zones. + ZoneDetails []*ResourceSKUZoneDetails + + // The available zone of the SKU. + Zones []*string +} + +// SandboxCustomImage - Class representing a Kusto sandbox custom image. +type SandboxCustomImage struct { + // A sandbox custom image. + Properties *SandboxCustomImageProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SandboxCustomImageProperties - A class representing the properties of a sandbox custom image object. +type SandboxCustomImageProperties struct { + // REQUIRED; The language name, for example Python. + Language *Language + + // The base image name on which the custom image is built on top of. It can be one of the LanguageExtensionImageName (e.g.: + // 'Python3108', 'Python3108_DL') or the name of an existing custom image. Either + // this property or languageVersion should be specified. + BaseImageName *string + + // The version of the language. Either this property or baseImageName should be specified. + LanguageVersion *string + + // The requirements file content. + RequirementsFileContent *string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState +} + +// SandboxCustomImagesCheckNameRequest - The result returned from a sandboxCustomImage check name availability request. +type SandboxCustomImagesCheckNameRequest struct { + // REQUIRED; Sandbox custom image resource name. + Name *string + + // CONSTANT; The type of resource, for instance Microsoft.Kusto/clusters/sandboxCustomImages. + // Field has constant value "Microsoft.Kusto/clusters/sandboxCustomImages", any specified value is ignored. + Type *string +} + +// SandboxCustomImagesListResult - The list Kusto sandbox custom images operation response. +type SandboxCustomImagesListResult struct { + // Link to the next page of results + NextLink *string + + // The list of Kusto sandbox custom images. + Value []*SandboxCustomImage +} + +// Script - Class representing a database script. +type Script struct { + // The database script. + Properties *ScriptProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ScriptCheckNameRequest - A script name availability request. +type ScriptCheckNameRequest struct { + // REQUIRED; Script name. + Name *string + + // CONSTANT; The type of resource, Microsoft.Kusto/clusters/databases/scripts. + // Field has constant value "Microsoft.Kusto/clusters/databases/scripts", any specified value is ignored. + Type *string +} + +// ScriptListResult - The list Kusto database script operation response. +type ScriptListResult struct { + // The list of Kusto scripts. + Value []*Script +} + +// ScriptProperties - A class representing database script property. +type ScriptProperties struct { + // Flag that indicates whether to continue if one of the command fails. + ContinueOnErrors *bool + + // A unique string. If changed the script will be applied again. + ForceUpdateTag *string + + // Indicates if the permissions for the script caller are kept following completion of the script. + PrincipalPermissionsAction *PrincipalPermissionsAction + + // The script content. This property should be used when the script is provide inline and not through file in a SA. Must not + // be used together with scriptUrl and scriptUrlSasToken properties. + ScriptContent *string + + // Differentiates between the type of script commands included - Database or Cluster. The default is Database. + ScriptLevel *ScriptLevel + + // The url to the KQL script blob file. Must not be used together with scriptContent property + ScriptURL *string + + // The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property. + ScriptURLSasToken *string + + // READ-ONLY; The provisioned state of the resource. + ProvisioningState *ProvisioningState +} + +// SuspensionDetails - The database suspension details. If the database is suspended, this object contains information related +// to the database's suspension state. +type SuspensionDetails struct { + // The starting date and time of the suspension state. + SuspensionStartDate *time.Time +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource last modification (UTC) + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *CreatedByType +} + +// TableLevelSharingProperties - Tables that will be included and excluded in the follower database +type TableLevelSharingProperties struct { + // List of external tables to exclude from the follower database + ExternalTablesToExclude []*string + + // List of external tables to include in the follower database + ExternalTablesToInclude []*string + + // List of functions to exclude from the follower database + FunctionsToExclude []*string + + // List of functions to include in the follower database + FunctionsToInclude []*string + + // List of materialized views to exclude from the follower database + MaterializedViewsToExclude []*string + + // List of materialized views to include in the follower database + MaterializedViewsToInclude []*string + + // List of tables to exclude from the follower database + TablesToExclude []*string + + // List of tables to include in the follower database + TablesToInclude []*string +} + +// TrustedExternalTenant - Represents a tenant ID that is trusted by the cluster. +type TrustedExternalTenant struct { + // GUID representing an external tenant. + Value *string +} + +// VirtualNetworkConfiguration - A class that contains virtual network definition. +type VirtualNetworkConfiguration struct { + // REQUIRED; Data management's service public IP address resource id. + DataManagementPublicIPID *string + + // REQUIRED; Engine service's public IP address resource id. + EnginePublicIPID *string + + // REQUIRED; The subnet resource id. + SubnetID *string + + // When enabled, the cluster is deployed into the configured subnet, when disabled it will be removed from the subnet. + State *VnetState +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/models_serde.go new file mode 100644 index 00000000..c49a0a13 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/models_serde.go @@ -0,0 +1,4230 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AcceptedAudiences. +func (a AcceptedAudiences) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AcceptedAudiences. +func (a *AcceptedAudiences) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfiguration. +func (a AttachedDatabaseConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfiguration. +func (a *AttachedDatabaseConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationListResult. +func (a AttachedDatabaseConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfigurationListResult. +func (a *AttachedDatabaseConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationProperties. +func (a AttachedDatabaseConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attachedDatabaseNames", a.AttachedDatabaseNames) + populate(objectMap, "clusterResourceId", a.ClusterResourceID) + populate(objectMap, "databaseName", a.DatabaseName) + populate(objectMap, "databaseNameOverride", a.DatabaseNameOverride) + populate(objectMap, "databaseNamePrefix", a.DatabaseNamePrefix) + populate(objectMap, "defaultPrincipalsModificationKind", a.DefaultPrincipalsModificationKind) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "tableLevelSharingProperties", a.TableLevelSharingProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfigurationProperties. +func (a *AttachedDatabaseConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attachedDatabaseNames": + err = unpopulate(val, "AttachedDatabaseNames", &a.AttachedDatabaseNames) + delete(rawMsg, key) + case "clusterResourceId": + err = unpopulate(val, "ClusterResourceID", &a.ClusterResourceID) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &a.DatabaseName) + delete(rawMsg, key) + case "databaseNameOverride": + err = unpopulate(val, "DatabaseNameOverride", &a.DatabaseNameOverride) + delete(rawMsg, key) + case "databaseNamePrefix": + err = unpopulate(val, "DatabaseNamePrefix", &a.DatabaseNamePrefix) + delete(rawMsg, key) + case "defaultPrincipalsModificationKind": + err = unpopulate(val, "DefaultPrincipalsModificationKind", &a.DefaultPrincipalsModificationKind) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "tableLevelSharingProperties": + err = unpopulate(val, "TableLevelSharingProperties", &a.TableLevelSharingProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AttachedDatabaseConfigurationsCheckNameRequest. +func (a AttachedDatabaseConfigurationsCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", a.Name) + objectMap["type"] = "Microsoft.Kusto/clusters/attachedDatabaseConfigurations" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AttachedDatabaseConfigurationsCheckNameRequest. +func (a *AttachedDatabaseConfigurationsCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureCapacity. +func (a AzureCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "default", a.Default) + populate(objectMap, "maximum", a.Maximum) + populate(objectMap, "minimum", a.Minimum) + populate(objectMap, "scaleType", a.ScaleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureCapacity. +func (a *AzureCapacity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &a.Default) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &a.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &a.Minimum) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &a.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureResourceSKU. +func (a AzureResourceSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", a.Capacity) + populate(objectMap, "resourceType", a.ResourceType) + populate(objectMap, "sku", a.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceSKU. +func (a *AzureResourceSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &a.Capacity) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &a.ResourceType) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureSKU. +func (a AzureSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", a.Capacity) + populate(objectMap, "name", a.Name) + populate(objectMap, "tier", a.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSKU. +func (a *AzureSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &a.Capacity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &a.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CalloutPoliciesList. +func (c CalloutPoliciesList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CalloutPoliciesList. +func (c *CalloutPoliciesList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CalloutPolicy. +func (c CalloutPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "calloutId", c.CalloutID) + populate(objectMap, "calloutType", c.CalloutType) + populate(objectMap, "calloutUriRegex", c.CalloutURIRegex) + populate(objectMap, "outboundAccess", c.OutboundAccess) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CalloutPolicy. +func (c *CalloutPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "calloutId": + err = unpopulate(val, "CalloutID", &c.CalloutID) + delete(rawMsg, key) + case "calloutType": + err = unpopulate(val, "CalloutType", &c.CalloutType) + delete(rawMsg, key) + case "calloutUriRegex": + err = unpopulate(val, "CalloutURIRegex", &c.CalloutURIRegex) + delete(rawMsg, key) + case "outboundAccess": + err = unpopulate(val, "OutboundAccess", &c.OutboundAccess) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CalloutPolicyToRemove. +func (c CalloutPolicyToRemove) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "calloutId", c.CalloutID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CalloutPolicyToRemove. +func (c *CalloutPolicyToRemove) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "calloutId": + err = unpopulate(val, "CalloutID", &c.CalloutID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameRequest. +func (c CheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameRequest. +func (c *CheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckNameResult. +func (c CheckNameResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", c.Message) + populate(objectMap, "name", c.Name) + populate(objectMap, "nameAvailable", c.NameAvailable) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameResult. +func (c *CheckNameResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &c.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Cluster. +func (c Cluster) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "id", c.ID) + populate(objectMap, "identity", c.Identity) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "sku", c.SKU) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + populate(objectMap, "zones", c.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Cluster. +func (c *Cluster) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &c.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &c.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &c.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterCheckNameRequest. +func (c ClusterCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + objectMap["type"] = "Microsoft.Kusto/clusters" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterCheckNameRequest. +func (c *ClusterCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterListResult. +func (c ClusterListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterListResult. +func (c *ClusterListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterMigrateRequest. +func (c ClusterMigrateRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clusterResourceId", c.ClusterResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterMigrateRequest. +func (c *ClusterMigrateRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clusterResourceId": + err = unpopulate(val, "ClusterResourceID", &c.ClusterResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignment. +func (c ClusterPrincipalAssignment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignment. +func (c *ClusterPrincipalAssignment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignmentCheckNameRequest. +func (c ClusterPrincipalAssignmentCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + objectMap["type"] = "Microsoft.Kusto/clusters/principalAssignments" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignmentCheckNameRequest. +func (c *ClusterPrincipalAssignmentCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalAssignmentListResult. +func (c ClusterPrincipalAssignmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalAssignmentListResult. +func (c *ClusterPrincipalAssignmentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterPrincipalProperties. +func (c ClusterPrincipalProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadObjectId", c.AADObjectID) + populate(objectMap, "principalId", c.PrincipalID) + populate(objectMap, "principalName", c.PrincipalName) + populate(objectMap, "principalType", c.PrincipalType) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "role", c.Role) + populate(objectMap, "tenantId", c.TenantID) + populate(objectMap, "tenantName", c.TenantName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPrincipalProperties. +func (c *ClusterPrincipalProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadObjectId": + err = unpopulate(val, "AADObjectID", &c.AADObjectID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &c.PrincipalID) + delete(rawMsg, key) + case "principalName": + err = unpopulate(val, "PrincipalName", &c.PrincipalName) + delete(rawMsg, key) + case "principalType": + err = unpopulate(val, "PrincipalType", &c.PrincipalType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &c.Role) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &c.TenantID) + delete(rawMsg, key) + case "tenantName": + err = unpopulate(val, "TenantName", &c.TenantName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterProperties. +func (c ClusterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "acceptedAudiences", c.AcceptedAudiences) + populate(objectMap, "allowedFqdnList", c.AllowedFqdnList) + populate(objectMap, "allowedIpRangeList", c.AllowedIPRangeList) + populate(objectMap, "calloutPolicies", c.CalloutPolicies) + populate(objectMap, "dataIngestionUri", c.DataIngestionURI) + populate(objectMap, "enableAutoStop", c.EnableAutoStop) + populate(objectMap, "enableDiskEncryption", c.EnableDiskEncryption) + populate(objectMap, "enableDoubleEncryption", c.EnableDoubleEncryption) + populate(objectMap, "enablePurge", c.EnablePurge) + populate(objectMap, "enableStreamingIngest", c.EnableStreamingIngest) + populate(objectMap, "engineType", c.EngineType) + populate(objectMap, "keyVaultProperties", c.KeyVaultProperties) + populate(objectMap, "languageExtensions", c.LanguageExtensions) + populate(objectMap, "migrationCluster", c.MigrationCluster) + populate(objectMap, "optimizedAutoscale", c.OptimizedAutoscale) + populate(objectMap, "privateEndpointConnections", c.PrivateEndpointConnections) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "publicIPType", c.PublicIPType) + populate(objectMap, "publicNetworkAccess", c.PublicNetworkAccess) + populate(objectMap, "restrictOutboundNetworkAccess", c.RestrictOutboundNetworkAccess) + populate(objectMap, "state", c.State) + populate(objectMap, "stateReason", c.StateReason) + populate(objectMap, "trustedExternalTenants", c.TrustedExternalTenants) + populate(objectMap, "uri", c.URI) + populate(objectMap, "virtualClusterGraduationProperties", c.VirtualClusterGraduationProperties) + populate(objectMap, "virtualNetworkConfiguration", c.VirtualNetworkConfiguration) + populate(objectMap, "zoneStatus", c.ZoneStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProperties. +func (c *ClusterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acceptedAudiences": + err = unpopulate(val, "AcceptedAudiences", &c.AcceptedAudiences) + delete(rawMsg, key) + case "allowedFqdnList": + err = unpopulate(val, "AllowedFqdnList", &c.AllowedFqdnList) + delete(rawMsg, key) + case "allowedIpRangeList": + err = unpopulate(val, "AllowedIPRangeList", &c.AllowedIPRangeList) + delete(rawMsg, key) + case "calloutPolicies": + err = unpopulate(val, "CalloutPolicies", &c.CalloutPolicies) + delete(rawMsg, key) + case "dataIngestionUri": + err = unpopulate(val, "DataIngestionURI", &c.DataIngestionURI) + delete(rawMsg, key) + case "enableAutoStop": + err = unpopulate(val, "EnableAutoStop", &c.EnableAutoStop) + delete(rawMsg, key) + case "enableDiskEncryption": + err = unpopulate(val, "EnableDiskEncryption", &c.EnableDiskEncryption) + delete(rawMsg, key) + case "enableDoubleEncryption": + err = unpopulate(val, "EnableDoubleEncryption", &c.EnableDoubleEncryption) + delete(rawMsg, key) + case "enablePurge": + err = unpopulate(val, "EnablePurge", &c.EnablePurge) + delete(rawMsg, key) + case "enableStreamingIngest": + err = unpopulate(val, "EnableStreamingIngest", &c.EnableStreamingIngest) + delete(rawMsg, key) + case "engineType": + err = unpopulate(val, "EngineType", &c.EngineType) + delete(rawMsg, key) + case "keyVaultProperties": + err = unpopulate(val, "KeyVaultProperties", &c.KeyVaultProperties) + delete(rawMsg, key) + case "languageExtensions": + err = unpopulate(val, "LanguageExtensions", &c.LanguageExtensions) + delete(rawMsg, key) + case "migrationCluster": + err = unpopulate(val, "MigrationCluster", &c.MigrationCluster) + delete(rawMsg, key) + case "optimizedAutoscale": + err = unpopulate(val, "OptimizedAutoscale", &c.OptimizedAutoscale) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &c.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "publicIPType": + err = unpopulate(val, "PublicIPType", &c.PublicIPType) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &c.PublicNetworkAccess) + delete(rawMsg, key) + case "restrictOutboundNetworkAccess": + err = unpopulate(val, "RestrictOutboundNetworkAccess", &c.RestrictOutboundNetworkAccess) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &c.State) + delete(rawMsg, key) + case "stateReason": + err = unpopulate(val, "StateReason", &c.StateReason) + delete(rawMsg, key) + case "trustedExternalTenants": + err = unpopulate(val, "TrustedExternalTenants", &c.TrustedExternalTenants) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + case "virtualClusterGraduationProperties": + err = unpopulate(val, "VirtualClusterGraduationProperties", &c.VirtualClusterGraduationProperties) + delete(rawMsg, key) + case "virtualNetworkConfiguration": + err = unpopulate(val, "VirtualNetworkConfiguration", &c.VirtualNetworkConfiguration) + delete(rawMsg, key) + case "zoneStatus": + err = unpopulate(val, "ZoneStatus", &c.ZoneStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterUpdate. +func (c ClusterUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "identity", c.Identity) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "sku", c.SKU) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + populate(objectMap, "zones", c.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpdate. +func (c *ClusterUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &c.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &c.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. +func (c ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", c.ClientID) + populate(objectMap, "principalId", c.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. +func (c *ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &c.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &c.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CosmosDbDataConnection. +func (c CosmosDbDataConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + objectMap["kind"] = DataConnectionKindCosmosDb + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CosmosDbDataConnection. +func (c *CosmosDbDataConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &c.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CosmosDbDataConnectionProperties. +func (c CosmosDbDataConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cosmosDbAccountResourceId", c.CosmosDbAccountResourceID) + populate(objectMap, "cosmosDbContainer", c.CosmosDbContainer) + populate(objectMap, "cosmosDbDatabase", c.CosmosDbDatabase) + populate(objectMap, "managedIdentityObjectId", c.ManagedIdentityObjectID) + populate(objectMap, "managedIdentityResourceId", c.ManagedIdentityResourceID) + populate(objectMap, "mappingRuleName", c.MappingRuleName) + populate(objectMap, "provisioningState", c.ProvisioningState) + populateDateTimeRFC3339(objectMap, "retrievalStartDate", c.RetrievalStartDate) + populate(objectMap, "tableName", c.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CosmosDbDataConnectionProperties. +func (c *CosmosDbDataConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cosmosDbAccountResourceId": + err = unpopulate(val, "CosmosDbAccountResourceID", &c.CosmosDbAccountResourceID) + delete(rawMsg, key) + case "cosmosDbContainer": + err = unpopulate(val, "CosmosDbContainer", &c.CosmosDbContainer) + delete(rawMsg, key) + case "cosmosDbDatabase": + err = unpopulate(val, "CosmosDbDatabase", &c.CosmosDbDatabase) + delete(rawMsg, key) + case "managedIdentityObjectId": + err = unpopulate(val, "ManagedIdentityObjectID", &c.ManagedIdentityObjectID) + delete(rawMsg, key) + case "managedIdentityResourceId": + err = unpopulate(val, "ManagedIdentityResourceID", &c.ManagedIdentityResourceID) + delete(rawMsg, key) + case "mappingRuleName": + err = unpopulate(val, "MappingRuleName", &c.MappingRuleName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "retrievalStartDate": + err = unpopulateDateTimeRFC3339(val, "RetrievalStartDate", &c.RetrievalStartDate) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &c.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnection. +func (d DataConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + objectMap["kind"] = d.Kind + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnection. +func (d *DataConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionCheckNameRequest. +func (d DataConnectionCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", d.Name) + objectMap["type"] = "Microsoft.Kusto/clusters/databases/dataConnections" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionCheckNameRequest. +func (d *DataConnectionCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionListResult. +func (d DataConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionListResult. +func (d *DataConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + d.Value, err = unmarshalDataConnectionClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionValidation. +func (d DataConnectionValidation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataConnectionName", d.DataConnectionName) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidation. +func (d *DataConnectionValidation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataConnectionName": + err = unpopulate(val, "DataConnectionName", &d.DataConnectionName) + delete(rawMsg, key) + case "properties": + d.Properties, err = unmarshalDataConnectionClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionValidationListResult. +func (d DataConnectionValidationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidationListResult. +func (d *DataConnectionValidationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionValidationResult. +func (d DataConnectionValidationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorMessage", d.ErrorMessage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionValidationResult. +func (d *DataConnectionValidationResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &d.ErrorMessage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Database. +func (d Database) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + objectMap["kind"] = d.Kind + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Database. +func (d *Database) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseInviteFollowerRequest. +func (d DatabaseInviteFollowerRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inviteeEmail", d.InviteeEmail) + populate(objectMap, "tableLevelSharingProperties", d.TableLevelSharingProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseInviteFollowerRequest. +func (d *DatabaseInviteFollowerRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inviteeEmail": + err = unpopulate(val, "InviteeEmail", &d.InviteeEmail) + delete(rawMsg, key) + case "tableLevelSharingProperties": + err = unpopulate(val, "TableLevelSharingProperties", &d.TableLevelSharingProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseInviteFollowerResult. +func (d DatabaseInviteFollowerResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "generatedInvitation", d.GeneratedInvitation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseInviteFollowerResult. +func (d *DatabaseInviteFollowerResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "generatedInvitation": + err = unpopulate(val, "GeneratedInvitation", &d.GeneratedInvitation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseListResult. +func (d DatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseListResult. +func (d *DatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + d.Value, err = unmarshalDatabaseClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipal. +func (d DatabasePrincipal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appId", d.AppID) + populate(objectMap, "email", d.Email) + populate(objectMap, "fqn", d.Fqn) + populate(objectMap, "name", d.Name) + populate(objectMap, "role", d.Role) + populate(objectMap, "tenantName", d.TenantName) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipal. +func (d *DatabasePrincipal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appId": + err = unpopulate(val, "AppID", &d.AppID) + delete(rawMsg, key) + case "email": + err = unpopulate(val, "Email", &d.Email) + delete(rawMsg, key) + case "fqn": + err = unpopulate(val, "Fqn", &d.Fqn) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &d.Role) + delete(rawMsg, key) + case "tenantName": + err = unpopulate(val, "TenantName", &d.TenantName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignment. +func (d DatabasePrincipalAssignment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignment. +func (d *DatabasePrincipalAssignment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignmentCheckNameRequest. +func (d DatabasePrincipalAssignmentCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", d.Name) + objectMap["type"] = "Microsoft.Kusto/clusters/databases/principalAssignments" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignmentCheckNameRequest. +func (d *DatabasePrincipalAssignmentCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalAssignmentListResult. +func (d DatabasePrincipalAssignmentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalAssignmentListResult. +func (d *DatabasePrincipalAssignmentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalListRequest. +func (d DatabasePrincipalListRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalListRequest. +func (d *DatabasePrincipalListRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalListResult. +func (d DatabasePrincipalListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalListResult. +func (d *DatabasePrincipalListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasePrincipalProperties. +func (d DatabasePrincipalProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadObjectId", d.AADObjectID) + populate(objectMap, "principalId", d.PrincipalID) + populate(objectMap, "principalName", d.PrincipalName) + populate(objectMap, "principalType", d.PrincipalType) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "role", d.Role) + populate(objectMap, "tenantId", d.TenantID) + populate(objectMap, "tenantName", d.TenantName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasePrincipalProperties. +func (d *DatabasePrincipalProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadObjectId": + err = unpopulate(val, "AADObjectID", &d.AADObjectID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &d.PrincipalID) + delete(rawMsg, key) + case "principalName": + err = unpopulate(val, "PrincipalName", &d.PrincipalName) + delete(rawMsg, key) + case "principalType": + err = unpopulate(val, "PrincipalType", &d.PrincipalType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &d.Role) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &d.TenantID) + delete(rawMsg, key) + case "tenantName": + err = unpopulate(val, "TenantName", &d.TenantName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabaseStatistics. +func (d DatabaseStatistics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "size", d.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseStatistics. +func (d *DatabaseStatistics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "size": + err = unpopulate(val, "Size", &d.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnoseVirtualNetworkResult. +func (d DiagnoseVirtualNetworkResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "findings", d.Findings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnoseVirtualNetworkResult. +func (d *DiagnoseVirtualNetworkResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "findings": + err = unpopulate(val, "Findings", &d.Findings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointDependency. +func (e EndpointDependency) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "domainName", e.DomainName) + populate(objectMap, "endpointDetails", e.EndpointDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency. +func (e *EndpointDependency) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domainName": + err = unpopulate(val, "DomainName", &e.DomainName) + delete(rawMsg, key) + case "endpointDetails": + err = unpopulate(val, "EndpointDetails", &e.EndpointDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointDetail. +func (e EndpointDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddress", e.IPAddress) + populate(objectMap, "port", e.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail. +func (e *EndpointDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddress": + err = unpopulate(val, "IPAddress", &e.IPAddress) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &e.Port) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventGridConnectionProperties. +func (e EventGridConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobStorageEventType", e.BlobStorageEventType) + populate(objectMap, "consumerGroup", e.ConsumerGroup) + populate(objectMap, "dataFormat", e.DataFormat) + populate(objectMap, "databaseRouting", e.DatabaseRouting) + populate(objectMap, "eventGridResourceId", e.EventGridResourceID) + populate(objectMap, "eventHubResourceId", e.EventHubResourceID) + populate(objectMap, "ignoreFirstRecord", e.IgnoreFirstRecord) + populate(objectMap, "managedIdentityObjectId", e.ManagedIdentityObjectID) + populate(objectMap, "managedIdentityResourceId", e.ManagedIdentityResourceID) + populate(objectMap, "mappingRuleName", e.MappingRuleName) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "storageAccountResourceId", e.StorageAccountResourceID) + populate(objectMap, "tableName", e.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridConnectionProperties. +func (e *EventGridConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobStorageEventType": + err = unpopulate(val, "BlobStorageEventType", &e.BlobStorageEventType) + delete(rawMsg, key) + case "consumerGroup": + err = unpopulate(val, "ConsumerGroup", &e.ConsumerGroup) + delete(rawMsg, key) + case "dataFormat": + err = unpopulate(val, "DataFormat", &e.DataFormat) + delete(rawMsg, key) + case "databaseRouting": + err = unpopulate(val, "DatabaseRouting", &e.DatabaseRouting) + delete(rawMsg, key) + case "eventGridResourceId": + err = unpopulate(val, "EventGridResourceID", &e.EventGridResourceID) + delete(rawMsg, key) + case "eventHubResourceId": + err = unpopulate(val, "EventHubResourceID", &e.EventHubResourceID) + delete(rawMsg, key) + case "ignoreFirstRecord": + err = unpopulate(val, "IgnoreFirstRecord", &e.IgnoreFirstRecord) + delete(rawMsg, key) + case "managedIdentityObjectId": + err = unpopulate(val, "ManagedIdentityObjectID", &e.ManagedIdentityObjectID) + delete(rawMsg, key) + case "managedIdentityResourceId": + err = unpopulate(val, "ManagedIdentityResourceID", &e.ManagedIdentityResourceID) + delete(rawMsg, key) + case "mappingRuleName": + err = unpopulate(val, "MappingRuleName", &e.MappingRuleName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "storageAccountResourceId": + err = unpopulate(val, "StorageAccountResourceID", &e.StorageAccountResourceID) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &e.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventGridDataConnection. +func (e EventGridDataConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + objectMap["kind"] = DataConnectionKindEventGrid + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridDataConnection. +func (e *EventGridDataConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventHubConnectionProperties. +func (e EventHubConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "compression", e.Compression) + populate(objectMap, "consumerGroup", e.ConsumerGroup) + populate(objectMap, "dataFormat", e.DataFormat) + populate(objectMap, "databaseRouting", e.DatabaseRouting) + populate(objectMap, "eventHubResourceId", e.EventHubResourceID) + populate(objectMap, "eventSystemProperties", e.EventSystemProperties) + populate(objectMap, "managedIdentityObjectId", e.ManagedIdentityObjectID) + populate(objectMap, "managedIdentityResourceId", e.ManagedIdentityResourceID) + populate(objectMap, "mappingRuleName", e.MappingRuleName) + populate(objectMap, "provisioningState", e.ProvisioningState) + populateDateTimeRFC3339(objectMap, "retrievalStartDate", e.RetrievalStartDate) + populate(objectMap, "tableName", e.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventHubConnectionProperties. +func (e *EventHubConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "compression": + err = unpopulate(val, "Compression", &e.Compression) + delete(rawMsg, key) + case "consumerGroup": + err = unpopulate(val, "ConsumerGroup", &e.ConsumerGroup) + delete(rawMsg, key) + case "dataFormat": + err = unpopulate(val, "DataFormat", &e.DataFormat) + delete(rawMsg, key) + case "databaseRouting": + err = unpopulate(val, "DatabaseRouting", &e.DatabaseRouting) + delete(rawMsg, key) + case "eventHubResourceId": + err = unpopulate(val, "EventHubResourceID", &e.EventHubResourceID) + delete(rawMsg, key) + case "eventSystemProperties": + err = unpopulate(val, "EventSystemProperties", &e.EventSystemProperties) + delete(rawMsg, key) + case "managedIdentityObjectId": + err = unpopulate(val, "ManagedIdentityObjectID", &e.ManagedIdentityObjectID) + delete(rawMsg, key) + case "managedIdentityResourceId": + err = unpopulate(val, "ManagedIdentityResourceID", &e.ManagedIdentityResourceID) + delete(rawMsg, key) + case "mappingRuleName": + err = unpopulate(val, "MappingRuleName", &e.MappingRuleName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "retrievalStartDate": + err = unpopulateDateTimeRFC3339(val, "RetrievalStartDate", &e.RetrievalStartDate) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &e.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventHubDataConnection. +func (e EventHubDataConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + objectMap["kind"] = DataConnectionKindEventHub + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventHubDataConnection. +func (e *EventHubDataConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FollowerDatabaseDefinition. +func (f FollowerDatabaseDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attachedDatabaseConfigurationName", f.AttachedDatabaseConfigurationName) + populate(objectMap, "clusterResourceId", f.ClusterResourceID) + populate(objectMap, "databaseName", f.DatabaseName) + populate(objectMap, "databaseShareOrigin", f.DatabaseShareOrigin) + populate(objectMap, "tableLevelSharingProperties", f.TableLevelSharingProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FollowerDatabaseDefinition. +func (f *FollowerDatabaseDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attachedDatabaseConfigurationName": + err = unpopulate(val, "AttachedDatabaseConfigurationName", &f.AttachedDatabaseConfigurationName) + delete(rawMsg, key) + case "clusterResourceId": + err = unpopulate(val, "ClusterResourceID", &f.ClusterResourceID) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &f.DatabaseName) + delete(rawMsg, key) + case "databaseShareOrigin": + err = unpopulate(val, "DatabaseShareOrigin", &f.DatabaseShareOrigin) + delete(rawMsg, key) + case "tableLevelSharingProperties": + err = unpopulate(val, "TableLevelSharingProperties", &f.TableLevelSharingProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FollowerDatabaseDefinitionGet. +func (f FollowerDatabaseDefinitionGet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", f.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FollowerDatabaseDefinitionGet. +func (f *FollowerDatabaseDefinitionGet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FollowerDatabaseListResult. +func (f FollowerDatabaseListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FollowerDatabaseListResult. +func (f *FollowerDatabaseListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FollowerDatabaseListResultGet. +func (f FollowerDatabaseListResultGet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FollowerDatabaseListResultGet. +func (f *FollowerDatabaseListResultGet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FollowerDatabaseProperties. +func (f FollowerDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attachedDatabaseConfigurationName", f.AttachedDatabaseConfigurationName) + populate(objectMap, "clusterResourceId", f.ClusterResourceID) + populate(objectMap, "databaseName", f.DatabaseName) + populate(objectMap, "databaseShareOrigin", f.DatabaseShareOrigin) + populate(objectMap, "tableLevelSharingProperties", f.TableLevelSharingProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FollowerDatabaseProperties. +func (f *FollowerDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attachedDatabaseConfigurationName": + err = unpopulate(val, "AttachedDatabaseConfigurationName", &f.AttachedDatabaseConfigurationName) + delete(rawMsg, key) + case "clusterResourceId": + err = unpopulate(val, "ClusterResourceID", &f.ClusterResourceID) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &f.DatabaseName) + delete(rawMsg, key) + case "databaseShareOrigin": + err = unpopulate(val, "DatabaseShareOrigin", &f.DatabaseShareOrigin) + delete(rawMsg, key) + case "tableLevelSharingProperties": + err = unpopulate(val, "TableLevelSharingProperties", &f.TableLevelSharingProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Identity. +func (i Identity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", i.PrincipalID) + populate(objectMap, "tenantId", i.TenantID) + populate(objectMap, "type", i.Type) + populate(objectMap, "userAssignedIdentities", i.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Identity. +func (i *Identity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &i.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &i.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &i.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotHubConnectionProperties. +func (i IotHubConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "consumerGroup", i.ConsumerGroup) + populate(objectMap, "dataFormat", i.DataFormat) + populate(objectMap, "databaseRouting", i.DatabaseRouting) + populate(objectMap, "eventSystemProperties", i.EventSystemProperties) + populate(objectMap, "iotHubResourceId", i.IotHubResourceID) + populate(objectMap, "mappingRuleName", i.MappingRuleName) + populate(objectMap, "provisioningState", i.ProvisioningState) + populateDateTimeRFC3339(objectMap, "retrievalStartDate", i.RetrievalStartDate) + populate(objectMap, "sharedAccessPolicyName", i.SharedAccessPolicyName) + populate(objectMap, "tableName", i.TableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotHubConnectionProperties. +func (i *IotHubConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "consumerGroup": + err = unpopulate(val, "ConsumerGroup", &i.ConsumerGroup) + delete(rawMsg, key) + case "dataFormat": + err = unpopulate(val, "DataFormat", &i.DataFormat) + delete(rawMsg, key) + case "databaseRouting": + err = unpopulate(val, "DatabaseRouting", &i.DatabaseRouting) + delete(rawMsg, key) + case "eventSystemProperties": + err = unpopulate(val, "EventSystemProperties", &i.EventSystemProperties) + delete(rawMsg, key) + case "iotHubResourceId": + err = unpopulate(val, "IotHubResourceID", &i.IotHubResourceID) + delete(rawMsg, key) + case "mappingRuleName": + err = unpopulate(val, "MappingRuleName", &i.MappingRuleName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "retrievalStartDate": + err = unpopulateDateTimeRFC3339(val, "RetrievalStartDate", &i.RetrievalStartDate) + delete(rawMsg, key) + case "sharedAccessPolicyName": + err = unpopulate(val, "SharedAccessPolicyName", &i.SharedAccessPolicyName) + delete(rawMsg, key) + case "tableName": + err = unpopulate(val, "TableName", &i.TableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IotHubDataConnection. +func (i IotHubDataConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + objectMap["kind"] = DataConnectionKindIotHub + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IotHubDataConnection. +func (i *IotHubDataConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &i.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties. +func (k KeyVaultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyName", k.KeyName) + populate(objectMap, "keyVaultUri", k.KeyVaultURI) + populate(objectMap, "keyVersion", k.KeyVersion) + populate(objectMap, "userIdentity", k.UserIdentity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties. +func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyName": + err = unpopulate(val, "KeyName", &k.KeyName) + delete(rawMsg, key) + case "keyVaultUri": + err = unpopulate(val, "KeyVaultURI", &k.KeyVaultURI) + delete(rawMsg, key) + case "keyVersion": + err = unpopulate(val, "KeyVersion", &k.KeyVersion) + delete(rawMsg, key) + case "userIdentity": + err = unpopulate(val, "UserIdentity", &k.UserIdentity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LanguageExtension. +func (l LanguageExtension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "languageExtensionCustomImageName", l.LanguageExtensionCustomImageName) + populate(objectMap, "languageExtensionImageName", l.LanguageExtensionImageName) + populate(objectMap, "languageExtensionName", l.LanguageExtensionName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LanguageExtension. +func (l *LanguageExtension) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "languageExtensionCustomImageName": + err = unpopulate(val, "LanguageExtensionCustomImageName", &l.LanguageExtensionCustomImageName) + delete(rawMsg, key) + case "languageExtensionImageName": + err = unpopulate(val, "LanguageExtensionImageName", &l.LanguageExtensionImageName) + delete(rawMsg, key) + case "languageExtensionName": + err = unpopulate(val, "LanguageExtensionName", &l.LanguageExtensionName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LanguageExtensionsList. +func (l LanguageExtensionsList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LanguageExtensionsList. +func (l *LanguageExtensionsList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListResourceSKUsResult. +func (l ListResourceSKUsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListResourceSKUsResult. +func (l *ListResourceSKUsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpoint. +func (m ManagedPrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpoint. +func (m *ManagedPrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointListResult. +func (m ManagedPrivateEndpointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointListResult. +func (m *ManagedPrivateEndpointListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointProperties. +func (m ManagedPrivateEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", m.GroupID) + populate(objectMap, "privateLinkResourceId", m.PrivateLinkResourceID) + populate(objectMap, "privateLinkResourceRegion", m.PrivateLinkResourceRegion) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "requestMessage", m.RequestMessage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointProperties. +func (m *ManagedPrivateEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &m.GroupID) + delete(rawMsg, key) + case "privateLinkResourceId": + err = unpopulate(val, "PrivateLinkResourceID", &m.PrivateLinkResourceID) + delete(rawMsg, key) + case "privateLinkResourceRegion": + err = unpopulate(val, "PrivateLinkResourceRegion", &m.PrivateLinkResourceRegion) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "requestMessage": + err = unpopulate(val, "RequestMessage", &m.RequestMessage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedPrivateEndpointsCheckNameRequest. +func (m ManagedPrivateEndpointsCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", m.Name) + objectMap["type"] = "Microsoft.Kusto/clusters/managedPrivateEndpoints" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedPrivateEndpointsCheckNameRequest. +func (m *ManagedPrivateEndpointsCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationClusterProperties. +func (m MigrationClusterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataIngestionUri", m.DataIngestionURI) + populate(objectMap, "id", m.ID) + populate(objectMap, "role", m.Role) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationClusterProperties. +func (m *MigrationClusterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataIngestionUri": + err = unpopulate(val, "DataIngestionURI", &m.DataIngestionURI) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &m.Role) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + populateAny(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResult. +func (o OperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) + populate(objectMap, "error", o.Error) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "percentComplete", o.PercentComplete) + populate(objectMap, "properties", o.Properties) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) + populate(objectMap, "status", o.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResult. +func (o *OperationResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &o.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &o.PercentComplete) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultErrorProperties. +func (o OperationResultErrorProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", o.Code) + populate(objectMap, "message", o.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultErrorProperties. +func (o *OperationResultErrorProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &o.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &o.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultProperties. +func (o OperationResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "operationKind", o.OperationKind) + populate(objectMap, "operationState", o.OperationState) + populate(objectMap, "provisioningState", o.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultProperties. +func (o *OperationResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operationKind": + err = unpopulate(val, "OperationKind", &o.OperationKind) + delete(rawMsg, key) + case "operationState": + err = unpopulate(val, "OperationState", &o.OperationState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OptimizedAutoscale. +func (o OptimizedAutoscale) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isEnabled", o.IsEnabled) + populate(objectMap, "maximum", o.Maximum) + populate(objectMap, "minimum", o.Minimum) + populate(objectMap, "version", o.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OptimizedAutoscale. +func (o *OptimizedAutoscale) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isEnabled": + err = unpopulate(val, "IsEnabled", &o.IsEnabled) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &o.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &o.Minimum) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &o.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundNetworkDependenciesEndpoint. +func (o OutboundNetworkDependenciesEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", o.Etag) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundNetworkDependenciesEndpoint. +func (o *OutboundNetworkDependenciesEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &o.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundNetworkDependenciesEndpointListResult. +func (o OutboundNetworkDependenciesEndpointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundNetworkDependenciesEndpointListResult. +func (o *OutboundNetworkDependenciesEndpointListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundNetworkDependenciesEndpointProperties. +func (o OutboundNetworkDependenciesEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "category", o.Category) + populate(objectMap, "endpoints", o.Endpoints) + populate(objectMap, "provisioningState", o.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundNetworkDependenciesEndpointProperties. +func (o *OutboundNetworkDependenciesEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "category": + err = unpopulate(val, "Category", &o.Category) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &o.Endpoints) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. +func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. +func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperty. +func (p PrivateEndpointProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointProperty. +func (p *PrivateEndpointProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. +func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. +func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionStateProperty. +func (p PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionStateProperty. +func (p *PrivateLinkServiceConnectionStateProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReadOnlyFollowingDatabase. +func (r ReadOnlyFollowingDatabase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + objectMap["kind"] = KindReadOnlyFollowing + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReadOnlyFollowingDatabase. +func (r *ReadOnlyFollowingDatabase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReadOnlyFollowingDatabaseProperties. +func (r ReadOnlyFollowingDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attachedDatabaseConfigurationName", r.AttachedDatabaseConfigurationName) + populate(objectMap, "databaseShareOrigin", r.DatabaseShareOrigin) + populate(objectMap, "hotCachePeriod", r.HotCachePeriod) + populate(objectMap, "leaderClusterResourceId", r.LeaderClusterResourceID) + populate(objectMap, "originalDatabaseName", r.OriginalDatabaseName) + populate(objectMap, "principalsModificationKind", r.PrincipalsModificationKind) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "softDeletePeriod", r.SoftDeletePeriod) + populate(objectMap, "statistics", r.Statistics) + populate(objectMap, "suspensionDetails", r.SuspensionDetails) + populate(objectMap, "tableLevelSharingProperties", r.TableLevelSharingProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReadOnlyFollowingDatabaseProperties. +func (r *ReadOnlyFollowingDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attachedDatabaseConfigurationName": + err = unpopulate(val, "AttachedDatabaseConfigurationName", &r.AttachedDatabaseConfigurationName) + delete(rawMsg, key) + case "databaseShareOrigin": + err = unpopulate(val, "DatabaseShareOrigin", &r.DatabaseShareOrigin) + delete(rawMsg, key) + case "hotCachePeriod": + err = unpopulate(val, "HotCachePeriod", &r.HotCachePeriod) + delete(rawMsg, key) + case "leaderClusterResourceId": + err = unpopulate(val, "LeaderClusterResourceID", &r.LeaderClusterResourceID) + delete(rawMsg, key) + case "originalDatabaseName": + err = unpopulate(val, "OriginalDatabaseName", &r.OriginalDatabaseName) + delete(rawMsg, key) + case "principalsModificationKind": + err = unpopulate(val, "PrincipalsModificationKind", &r.PrincipalsModificationKind) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "softDeletePeriod": + err = unpopulate(val, "SoftDeletePeriod", &r.SoftDeletePeriod) + delete(rawMsg, key) + case "statistics": + err = unpopulate(val, "Statistics", &r.Statistics) + delete(rawMsg, key) + case "suspensionDetails": + err = unpopulate(val, "SuspensionDetails", &r.SuspensionDetails) + delete(rawMsg, key) + case "tableLevelSharingProperties": + err = unpopulate(val, "TableLevelSharingProperties", &r.TableLevelSharingProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReadWriteDatabase. +func (r ReadWriteDatabase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + objectMap["kind"] = KindReadWrite + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReadWriteDatabase. +func (r *ReadWriteDatabase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReadWriteDatabaseProperties. +func (r ReadWriteDatabaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hotCachePeriod", r.HotCachePeriod) + populate(objectMap, "isFollowed", r.IsFollowed) + populate(objectMap, "keyVaultProperties", r.KeyVaultProperties) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "softDeletePeriod", r.SoftDeletePeriod) + populate(objectMap, "statistics", r.Statistics) + populate(objectMap, "suspensionDetails", r.SuspensionDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReadWriteDatabaseProperties. +func (r *ReadWriteDatabaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hotCachePeriod": + err = unpopulate(val, "HotCachePeriod", &r.HotCachePeriod) + delete(rawMsg, key) + case "isFollowed": + err = unpopulate(val, "IsFollowed", &r.IsFollowed) + delete(rawMsg, key) + case "keyVaultProperties": + err = unpopulate(val, "KeyVaultProperties", &r.KeyVaultProperties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "softDeletePeriod": + err = unpopulate(val, "SoftDeletePeriod", &r.SoftDeletePeriod) + delete(rawMsg, key) + case "statistics": + err = unpopulate(val, "Statistics", &r.Statistics) + delete(rawMsg, key) + case "suspensionDetails": + err = unpopulate(val, "SuspensionDetails", &r.SuspensionDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities. +func (r ResourceSKUCapabilities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", r.Name) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapabilities. +func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKUZoneDetails. +func (r ResourceSKUZoneDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capabilities", r.Capabilities) + populate(objectMap, "name", r.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUZoneDetails. +func (r *ResourceSKUZoneDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capabilities": + err = unpopulate(val, "Capabilities", &r.Capabilities) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUDescription. +func (s SKUDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "locationInfo", s.LocationInfo) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "name", s.Name) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "restrictions", s.Restrictions) + populate(objectMap, "tier", s.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescription. +func (s *SKUDescription) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "locationInfo": + err = unpopulate(val, "LocationInfo", &s.LocationInfo) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &s.Locations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + case "restrictions": + err = unpopulate(val, "Restrictions", &s.Restrictions) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUDescriptionList. +func (s SKUDescriptionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUDescriptionList. +func (s *SKUDescriptionList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKULocationInfoItem. +func (s SKULocationInfoItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", s.Location) + populate(objectMap, "zoneDetails", s.ZoneDetails) + populate(objectMap, "zones", s.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKULocationInfoItem. +func (s *SKULocationInfoItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "zoneDetails": + err = unpopulate(val, "ZoneDetails", &s.ZoneDetails) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &s.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SandboxCustomImage. +func (s SandboxCustomImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SandboxCustomImage. +func (s *SandboxCustomImage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SandboxCustomImageProperties. +func (s SandboxCustomImageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "baseImageName", s.BaseImageName) + populate(objectMap, "language", s.Language) + populate(objectMap, "languageVersion", s.LanguageVersion) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "requirementsFileContent", s.RequirementsFileContent) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SandboxCustomImageProperties. +func (s *SandboxCustomImageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "baseImageName": + err = unpopulate(val, "BaseImageName", &s.BaseImageName) + delete(rawMsg, key) + case "language": + err = unpopulate(val, "Language", &s.Language) + delete(rawMsg, key) + case "languageVersion": + err = unpopulate(val, "LanguageVersion", &s.LanguageVersion) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "requirementsFileContent": + err = unpopulate(val, "RequirementsFileContent", &s.RequirementsFileContent) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SandboxCustomImagesCheckNameRequest. +func (s SandboxCustomImagesCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + objectMap["type"] = "Microsoft.Kusto/clusters/sandboxCustomImages" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SandboxCustomImagesCheckNameRequest. +func (s *SandboxCustomImagesCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SandboxCustomImagesListResult. +func (s SandboxCustomImagesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SandboxCustomImagesListResult. +func (s *SandboxCustomImagesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Script. +func (s Script) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Script. +func (s *Script) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScriptCheckNameRequest. +func (s ScriptCheckNameRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + objectMap["type"] = "Microsoft.Kusto/clusters/databases/scripts" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptCheckNameRequest. +func (s *ScriptCheckNameRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScriptListResult. +func (s ScriptListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptListResult. +func (s *ScriptListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScriptProperties. +func (s ScriptProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "continueOnErrors", s.ContinueOnErrors) + populate(objectMap, "forceUpdateTag", s.ForceUpdateTag) + populate(objectMap, "principalPermissionsAction", s.PrincipalPermissionsAction) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "scriptContent", s.ScriptContent) + populate(objectMap, "scriptLevel", s.ScriptLevel) + populate(objectMap, "scriptUrl", s.ScriptURL) + populate(objectMap, "scriptUrlSasToken", s.ScriptURLSasToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptProperties. +func (s *ScriptProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "continueOnErrors": + err = unpopulate(val, "ContinueOnErrors", &s.ContinueOnErrors) + delete(rawMsg, key) + case "forceUpdateTag": + err = unpopulate(val, "ForceUpdateTag", &s.ForceUpdateTag) + delete(rawMsg, key) + case "principalPermissionsAction": + err = unpopulate(val, "PrincipalPermissionsAction", &s.PrincipalPermissionsAction) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "scriptContent": + err = unpopulate(val, "ScriptContent", &s.ScriptContent) + delete(rawMsg, key) + case "scriptLevel": + err = unpopulate(val, "ScriptLevel", &s.ScriptLevel) + delete(rawMsg, key) + case "scriptUrl": + err = unpopulate(val, "ScriptURL", &s.ScriptURL) + delete(rawMsg, key) + case "scriptUrlSasToken": + err = unpopulate(val, "ScriptURLSasToken", &s.ScriptURLSasToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SuspensionDetails. +func (s SuspensionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "suspensionStartDate", s.SuspensionStartDate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SuspensionDetails. +func (s *SuspensionDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "suspensionStartDate": + err = unpopulateDateTimeRFC3339(val, "SuspensionStartDate", &s.SuspensionStartDate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableLevelSharingProperties. +func (t TableLevelSharingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "externalTablesToExclude", t.ExternalTablesToExclude) + populate(objectMap, "externalTablesToInclude", t.ExternalTablesToInclude) + populate(objectMap, "functionsToExclude", t.FunctionsToExclude) + populate(objectMap, "functionsToInclude", t.FunctionsToInclude) + populate(objectMap, "materializedViewsToExclude", t.MaterializedViewsToExclude) + populate(objectMap, "materializedViewsToInclude", t.MaterializedViewsToInclude) + populate(objectMap, "tablesToExclude", t.TablesToExclude) + populate(objectMap, "tablesToInclude", t.TablesToInclude) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableLevelSharingProperties. +func (t *TableLevelSharingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "externalTablesToExclude": + err = unpopulate(val, "ExternalTablesToExclude", &t.ExternalTablesToExclude) + delete(rawMsg, key) + case "externalTablesToInclude": + err = unpopulate(val, "ExternalTablesToInclude", &t.ExternalTablesToInclude) + delete(rawMsg, key) + case "functionsToExclude": + err = unpopulate(val, "FunctionsToExclude", &t.FunctionsToExclude) + delete(rawMsg, key) + case "functionsToInclude": + err = unpopulate(val, "FunctionsToInclude", &t.FunctionsToInclude) + delete(rawMsg, key) + case "materializedViewsToExclude": + err = unpopulate(val, "MaterializedViewsToExclude", &t.MaterializedViewsToExclude) + delete(rawMsg, key) + case "materializedViewsToInclude": + err = unpopulate(val, "MaterializedViewsToInclude", &t.MaterializedViewsToInclude) + delete(rawMsg, key) + case "tablesToExclude": + err = unpopulate(val, "TablesToExclude", &t.TablesToExclude) + delete(rawMsg, key) + case "tablesToInclude": + err = unpopulate(val, "TablesToInclude", &t.TablesToInclude) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrustedExternalTenant. +func (t TrustedExternalTenant) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrustedExternalTenant. +func (t *TrustedExternalTenant) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkConfiguration. +func (v VirtualNetworkConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataManagementPublicIpId", v.DataManagementPublicIPID) + populate(objectMap, "enginePublicIpId", v.EnginePublicIPID) + populate(objectMap, "state", v.State) + populate(objectMap, "subnetId", v.SubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkConfiguration. +func (v *VirtualNetworkConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataManagementPublicIpId": + err = unpopulate(val, "DataManagementPublicIPID", &v.DataManagementPublicIPID) + delete(rawMsg, key) + case "enginePublicIpId": + err = unpopulate(val, "EnginePublicIPID", &v.EnginePublicIPID) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &v.State) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &v.SubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/operations_client.go new file mode 100644 index 00000000..d17e15a5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/operations_client.go @@ -0,0 +1,88 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Lists available operations for the Microsoft.Kusto provider. +// +// Generated from API version 2024-04-13 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Kusto/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/operationsresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/operationsresults_client.go new file mode 100644 index 00000000..ecf74c66 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/operationsresults_client.go @@ -0,0 +1,108 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// OperationsResultsClient contains the methods for the OperationsResults group. +// Don't use this type directly, use NewOperationsResultsClient() instead. +type OperationsResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationsResultsClient creates a new instance of OperationsResultsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Returns operation results. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - location - The name of Azure region. +// - operationID - The ID of an ongoing async operation. +// - options - OperationsResultsClientGetOptions contains the optional parameters for the OperationsResultsClient.Get method. +func (client *OperationsResultsClient) Get(ctx context.Context, location string, operationID string, options *OperationsResultsClientGetOptions) (OperationsResultsClientGetResponse, error) { + var err error + const operationName = "OperationsResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, operationID, options) + if err != nil { + return OperationsResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return OperationsResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OperationsResultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *OperationsResultsClient) getCreateRequest(ctx context.Context, location string, operationID string, options *OperationsResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationResults/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *OperationsResultsClient) getHandleResponse(resp *http.Response) (OperationsResultsClientGetResponse, error) { + result := OperationsResultsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationResult); err != nil { + return OperationsResultsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/operationsresultslocation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/operationsresultslocation_client.go new file mode 100644 index 00000000..5b299ee9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/operationsresultslocation_client.go @@ -0,0 +1,108 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// OperationsResultsLocationClient contains the methods for the OperationsResultsLocation group. +// Don't use this type directly, use NewOperationsResultsLocationClient() instead. +type OperationsResultsLocationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationsResultsLocationClient creates a new instance of OperationsResultsLocationClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsResultsLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsResultsLocationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsResultsLocationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Returns operation results. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - location - The name of Azure region. +// - operationID - The ID of an ongoing async operation. +// - options - OperationsResultsLocationClientGetOptions contains the optional parameters for the OperationsResultsLocationClient.Get +// method. +func (client *OperationsResultsLocationClient) Get(ctx context.Context, location string, operationID string, options *OperationsResultsLocationClientGetOptions) (OperationsResultsLocationClientGetResponse, error) { + var err error + const operationName = "OperationsResultsLocationClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, operationID, options) + if err != nil { + return OperationsResultsLocationClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return OperationsResultsLocationClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return OperationsResultsLocationClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *OperationsResultsLocationClient) getCreateRequest(ctx context.Context, location string, operationID string, options *OperationsResultsLocationClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationResults/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *OperationsResultsLocationClient) getHandleResponse(resp *http.Response) (OperationsResultsLocationClientGetResponse, error) { + result := OperationsResultsLocationClientGetResponse{} + if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { + result.AzureAsyncOperation = &val + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/options.go new file mode 100644 index 00000000..3a4de0d7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/options.go @@ -0,0 +1,538 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +// AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.BeginCreateOrUpdate +// method. +type AttachedDatabaseConfigurationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AttachedDatabaseConfigurationsClientBeginDeleteOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.BeginDelete +// method. +type AttachedDatabaseConfigurationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.CheckNameAvailability +// method. +type AttachedDatabaseConfigurationsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// AttachedDatabaseConfigurationsClientGetOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.Get +// method. +type AttachedDatabaseConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AttachedDatabaseConfigurationsClientListByClusterOptions contains the optional parameters for the AttachedDatabaseConfigurationsClient.NewListByClusterPager +// method. +type AttachedDatabaseConfigurationsClientListByClusterOptions struct { + // placeholder for future optional parameters +} + +// ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.BeginCreateOrUpdate +// method. +type ClusterPrincipalAssignmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClusterPrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.BeginDelete +// method. +type ClusterPrincipalAssignmentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.CheckNameAvailability +// method. +type ClusterPrincipalAssignmentsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ClusterPrincipalAssignmentsClientGetOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.Get +// method. +type ClusterPrincipalAssignmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClusterPrincipalAssignmentsClientListOptions contains the optional parameters for the ClusterPrincipalAssignmentsClient.NewListPager +// method. +type ClusterPrincipalAssignmentsClientListOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientBeginAddCalloutPoliciesOptions contains the optional parameters for the ClustersClient.BeginAddCalloutPolicies +// method. +type ClustersClientBeginAddCalloutPoliciesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginAddLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginAddLanguageExtensions +// method. +type ClustersClientBeginAddLanguageExtensionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method. +type ClustersClientBeginCreateOrUpdateOptions struct { + // The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the last-seen ETag value to prevent + // accidentally overwriting concurrent changes. + IfMatch *string + + // Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster. Other values will result + // in a 412 Pre-condition Failed response. + IfNoneMatch *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method. +type ClustersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginDetachFollowerDatabasesOptions contains the optional parameters for the ClustersClient.BeginDetachFollowerDatabases +// method. +type ClustersClientBeginDetachFollowerDatabasesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginDiagnoseVirtualNetworkOptions contains the optional parameters for the ClustersClient.BeginDiagnoseVirtualNetwork +// method. +type ClustersClientBeginDiagnoseVirtualNetworkOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginMigrateOptions contains the optional parameters for the ClustersClient.BeginMigrate method. +type ClustersClientBeginMigrateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginRemoveCalloutPolicyOptions contains the optional parameters for the ClustersClient.BeginRemoveCalloutPolicy +// method. +type ClustersClientBeginRemoveCalloutPolicyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginRemoveLanguageExtensionsOptions contains the optional parameters for the ClustersClient.BeginRemoveLanguageExtensions +// method. +type ClustersClientBeginRemoveLanguageExtensionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginStartOptions contains the optional parameters for the ClustersClient.BeginStart method. +type ClustersClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginStopOptions contains the optional parameters for the ClustersClient.BeginStop method. +type ClustersClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method. +type ClustersClientBeginUpdateOptions struct { + // The ETag of the cluster. Omit this value to always overwrite the current cluster. Specify the last-seen ETag value to prevent + // accidentally overwriting concurrent changes. + IfMatch *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClustersClientCheckNameAvailabilityOptions contains the optional parameters for the ClustersClient.CheckNameAvailability +// method. +type ClustersClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method. +type ClustersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager +// method. +type ClustersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListCalloutPoliciesOptions contains the optional parameters for the ClustersClient.NewListCalloutPoliciesPager +// method. +type ClustersClientListCalloutPoliciesOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListFollowerDatabasesGetOptions contains the optional parameters for the ClustersClient.NewListFollowerDatabasesGetPager +// method. +type ClustersClientListFollowerDatabasesGetOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListFollowerDatabasesOptions contains the optional parameters for the ClustersClient.NewListFollowerDatabasesPager +// method. +type ClustersClientListFollowerDatabasesOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListLanguageExtensionsOptions contains the optional parameters for the ClustersClient.NewListLanguageExtensionsPager +// method. +type ClustersClientListLanguageExtensionsOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListOptions contains the optional parameters for the ClustersClient.NewListPager method. +type ClustersClientListOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the ClustersClient.NewListOutboundNetworkDependenciesEndpointsPager +// method. +type ClustersClientListOutboundNetworkDependenciesEndpointsOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListSKUsByResourceOptions contains the optional parameters for the ClustersClient.NewListSKUsByResourcePager +// method. +type ClustersClientListSKUsByResourceOptions struct { + // placeholder for future optional parameters +} + +// ClustersClientListSKUsOptions contains the optional parameters for the ClustersClient.NewListSKUsPager method. +type ClustersClientListSKUsOptions struct { + // placeholder for future optional parameters +} + +// DataConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DataConnectionsClient.BeginCreateOrUpdate +// method. +type DataConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DataConnectionsClientBeginDataConnectionValidationOptions contains the optional parameters for the DataConnectionsClient.BeginDataConnectionValidation +// method. +type DataConnectionsClientBeginDataConnectionValidationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DataConnectionsClientBeginDeleteOptions contains the optional parameters for the DataConnectionsClient.BeginDelete method. +type DataConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DataConnectionsClientBeginUpdateOptions contains the optional parameters for the DataConnectionsClient.BeginUpdate method. +type DataConnectionsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DataConnectionsClientCheckNameAvailabilityOptions contains the optional parameters for the DataConnectionsClient.CheckNameAvailability +// method. +type DataConnectionsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// DataConnectionsClientGetOptions contains the optional parameters for the DataConnectionsClient.Get method. +type DataConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DataConnectionsClientListByDatabaseOptions contains the optional parameters for the DataConnectionsClient.NewListByDatabasePager +// method. +type DataConnectionsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} + +// DatabaseClientInviteFollowerOptions contains the optional parameters for the DatabaseClient.InviteFollower method. +type DatabaseClientInviteFollowerOptions struct { + // placeholder for future optional parameters +} + +// DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.BeginCreateOrUpdate +// method. +type DatabasePrincipalAssignmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasePrincipalAssignmentsClientBeginDeleteOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.BeginDelete +// method. +type DatabasePrincipalAssignmentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.CheckNameAvailability +// method. +type DatabasePrincipalAssignmentsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// DatabasePrincipalAssignmentsClientGetOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.Get +// method. +type DatabasePrincipalAssignmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabasePrincipalAssignmentsClientListOptions contains the optional parameters for the DatabasePrincipalAssignmentsClient.NewListPager +// method. +type DatabasePrincipalAssignmentsClientListOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientAddPrincipalsOptions contains the optional parameters for the DatabasesClient.AddPrincipals method. +type DatabasesClientAddPrincipalsOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate +// method. +type DatabasesClientBeginCreateOrUpdateOptions struct { + // By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude + // the caller from Admins list. + CallerRole *CallerRole + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method. +type DatabasesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientBeginUpdateOptions contains the optional parameters for the DatabasesClient.BeginUpdate method. +type DatabasesClientBeginUpdateOptions struct { + // By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude + // the caller from Admins list. + CallerRole *CallerRole + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DatabasesClientCheckNameAvailabilityOptions contains the optional parameters for the DatabasesClient.CheckNameAvailability +// method. +type DatabasesClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method. +type DatabasesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientListByClusterOptions contains the optional parameters for the DatabasesClient.NewListByClusterPager method. +type DatabasesClientListByClusterOptions struct { + // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skiptoken parameter that + // specifies a starting point to use for subsequent calls. + Skiptoken *string + + // limit the number of results + Top *int32 +} + +// DatabasesClientListPrincipalsOptions contains the optional parameters for the DatabasesClient.NewListPrincipalsPager method. +type DatabasesClientListPrincipalsOptions struct { + // placeholder for future optional parameters +} + +// DatabasesClientRemovePrincipalsOptions contains the optional parameters for the DatabasesClient.RemovePrincipals method. +type DatabasesClientRemovePrincipalsOptions struct { + // placeholder for future optional parameters +} + +// ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginCreateOrUpdate +// method. +type ManagedPrivateEndpointsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedPrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginDelete +// method. +type ManagedPrivateEndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedPrivateEndpointsClientBeginUpdateOptions contains the optional parameters for the ManagedPrivateEndpointsClient.BeginUpdate +// method. +type ManagedPrivateEndpointsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedPrivateEndpointsClientCheckNameAvailabilityOptions contains the optional parameters for the ManagedPrivateEndpointsClient.CheckNameAvailability +// method. +type ManagedPrivateEndpointsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ManagedPrivateEndpointsClientGetOptions contains the optional parameters for the ManagedPrivateEndpointsClient.Get method. +type ManagedPrivateEndpointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedPrivateEndpointsClientListOptions contains the optional parameters for the ManagedPrivateEndpointsClient.NewListPager +// method. +type ManagedPrivateEndpointsClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsResultsClientGetOptions contains the optional parameters for the OperationsResultsClient.Get method. +type OperationsResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// OperationsResultsLocationClientGetOptions contains the optional parameters for the OperationsResultsLocationClient.Get +// method. +type OperationsResultsLocationClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate +// method. +type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. +type PrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. +type PrivateLinkResourcesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager +// method. +type PrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. +type SKUsClientListOptions struct { + // placeholder for future optional parameters +} + +// SandboxCustomImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the SandboxCustomImagesClient.BeginCreateOrUpdate +// method. +type SandboxCustomImagesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SandboxCustomImagesClientBeginDeleteOptions contains the optional parameters for the SandboxCustomImagesClient.BeginDelete +// method. +type SandboxCustomImagesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SandboxCustomImagesClientBeginUpdateOptions contains the optional parameters for the SandboxCustomImagesClient.BeginUpdate +// method. +type SandboxCustomImagesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SandboxCustomImagesClientCheckNameAvailabilityOptions contains the optional parameters for the SandboxCustomImagesClient.CheckNameAvailability +// method. +type SandboxCustomImagesClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// SandboxCustomImagesClientGetOptions contains the optional parameters for the SandboxCustomImagesClient.Get method. +type SandboxCustomImagesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SandboxCustomImagesClientListByClusterOptions contains the optional parameters for the SandboxCustomImagesClient.NewListByClusterPager +// method. +type SandboxCustomImagesClientListByClusterOptions struct { + // placeholder for future optional parameters +} + +// ScriptsClientBeginCreateOrUpdateOptions contains the optional parameters for the ScriptsClient.BeginCreateOrUpdate method. +type ScriptsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ScriptsClientBeginDeleteOptions contains the optional parameters for the ScriptsClient.BeginDelete method. +type ScriptsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ScriptsClientBeginUpdateOptions contains the optional parameters for the ScriptsClient.BeginUpdate method. +type ScriptsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ScriptsClientCheckNameAvailabilityOptions contains the optional parameters for the ScriptsClient.CheckNameAvailability +// method. +type ScriptsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ScriptsClientGetOptions contains the optional parameters for the ScriptsClient.Get method. +type ScriptsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ScriptsClientListByDatabaseOptions contains the optional parameters for the ScriptsClient.NewListByDatabasePager method. +type ScriptsClientListByDatabaseOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/polymorphic_helpers.go new file mode 100644 index 00000000..d4f89ea7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/polymorphic_helpers.go @@ -0,0 +1,99 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import "encoding/json" + +func unmarshalDataConnectionClassification(rawMsg json.RawMessage) (DataConnectionClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DataConnectionClassification + switch m["kind"] { + case string(DataConnectionKindCosmosDb): + b = &CosmosDbDataConnection{} + case string(DataConnectionKindEventGrid): + b = &EventGridDataConnection{} + case string(DataConnectionKindEventHub): + b = &EventHubDataConnection{} + case string(DataConnectionKindIotHub): + b = &IotHubDataConnection{} + default: + b = &DataConnection{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDataConnectionClassificationArray(rawMsg json.RawMessage) ([]DataConnectionClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]DataConnectionClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalDataConnectionClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalDatabaseClassification(rawMsg json.RawMessage) (DatabaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DatabaseClassification + switch m["kind"] { + case string(KindReadOnlyFollowing): + b = &ReadOnlyFollowingDatabase{} + case string(KindReadWrite): + b = &ReadWriteDatabase{} + default: + b = &Database{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDatabaseClassificationArray(rawMsg json.RawMessage) ([]DatabaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]DatabaseClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalDatabaseClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/privateendpointconnections_client.go new file mode 100644 index 00000000..3cf20383 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/privateendpointconnections_client.go @@ -0,0 +1,345 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. +// Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead. +type PrivateEndpointConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateEndpointConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate +// method. +func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Approve or reject a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. +func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a private endpoint connection with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a private endpoint connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, privateEndpointConnectionName, options) + if err != nil { + return PrivateEndpointConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientGetResponse, error) { + result := PrivateEndpointConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { + return PrivateEndpointConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Returns the list of private endpoint connections. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. +func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, clusterName string, options *PrivateEndpointConnectionsClientListOptions) *runtime.Pager[PrivateEndpointConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListResponse]{ + More: func(page PrivateEndpointConnectionsClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListResponse) (PrivateEndpointConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointConnectionsClient.NewListPager") + req, err := client.listCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return PrivateEndpointConnectionsClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateEndpointConnectionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *PrivateEndpointConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PrivateEndpointConnectionsClient) listHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientListResponse, error) { + result := PrivateEndpointConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResult); err != nil { + return PrivateEndpointConnectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/privatelinkresources_client.go new file mode 100644 index 00000000..772f6861 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/privatelinkresources_client.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. +// Don't use this type directly, use NewPrivateLinkResourcesClient() instead. +type PrivateLinkResourcesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateLinkResourcesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a private link resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - privateLinkResourceName - The name of the private link resource. +// - options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get +// method. +func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, privateLinkResourceName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error) { + var err error + const operationName = "PrivateLinkResourcesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, privateLinkResourceName, options) + if err != nil { + return PrivateLinkResourcesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateLinkResourcesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, privateLinkResourceName string, options *PrivateLinkResourcesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if privateLinkResourceName == "" { + return nil, errors.New("parameter privateLinkResourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateLinkResourceName}", url.PathEscape(privateLinkResourceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) (PrivateLinkResourcesClientGetResponse, error) { + result := PrivateLinkResourcesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResource); err != nil { + return PrivateLinkResourcesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Returns the list of private link resources. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager +// method. +func (client *PrivateLinkResourcesClient) NewListPager(resourceGroupName string, clusterName string, options *PrivateLinkResourcesClientListOptions) *runtime.Pager[PrivateLinkResourcesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateLinkResourcesClientListResponse]{ + More: func(page PrivateLinkResourcesClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *PrivateLinkResourcesClientListResponse) (PrivateLinkResourcesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkResourcesClient.NewListPager") + req, err := client.listCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return PrivateLinkResourcesClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateLinkResourcesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *PrivateLinkResourcesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PrivateLinkResourcesClient) listHandleResponse(resp *http.Response) (PrivateLinkResourcesClientListResponse, error) { + result := PrivateLinkResourcesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourceListResult); err != nil { + return PrivateLinkResourcesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/responses.go new file mode 100644 index 00000000..c9c13db9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/responses.go @@ -0,0 +1,571 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import "encoding/json" + +// AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse contains the response from method AttachedDatabaseConfigurationsClient.CheckNameAvailability. +type AttachedDatabaseConfigurationsClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. + CheckNameResult +} + +// AttachedDatabaseConfigurationsClientCreateOrUpdateResponse contains the response from method AttachedDatabaseConfigurationsClient.BeginCreateOrUpdate. +type AttachedDatabaseConfigurationsClientCreateOrUpdateResponse struct { + // Class representing an attached database configuration. + AttachedDatabaseConfiguration +} + +// AttachedDatabaseConfigurationsClientDeleteResponse contains the response from method AttachedDatabaseConfigurationsClient.BeginDelete. +type AttachedDatabaseConfigurationsClientDeleteResponse struct { + // placeholder for future response values +} + +// AttachedDatabaseConfigurationsClientGetResponse contains the response from method AttachedDatabaseConfigurationsClient.Get. +type AttachedDatabaseConfigurationsClientGetResponse struct { + // Class representing an attached database configuration. + AttachedDatabaseConfiguration +} + +// AttachedDatabaseConfigurationsClientListByClusterResponse contains the response from method AttachedDatabaseConfigurationsClient.NewListByClusterPager. +type AttachedDatabaseConfigurationsClientListByClusterResponse struct { + // The list attached database configurations operation response. + AttachedDatabaseConfigurationListResult +} + +// ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse contains the response from method ClusterPrincipalAssignmentsClient.CheckNameAvailability. +type ClusterPrincipalAssignmentsClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. + CheckNameResult +} + +// ClusterPrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method ClusterPrincipalAssignmentsClient.BeginCreateOrUpdate. +type ClusterPrincipalAssignmentsClientCreateOrUpdateResponse struct { + // Class representing a cluster principal assignment. + ClusterPrincipalAssignment +} + +// ClusterPrincipalAssignmentsClientDeleteResponse contains the response from method ClusterPrincipalAssignmentsClient.BeginDelete. +type ClusterPrincipalAssignmentsClientDeleteResponse struct { + // placeholder for future response values +} + +// ClusterPrincipalAssignmentsClientGetResponse contains the response from method ClusterPrincipalAssignmentsClient.Get. +type ClusterPrincipalAssignmentsClientGetResponse struct { + // Class representing a cluster principal assignment. + ClusterPrincipalAssignment +} + +// ClusterPrincipalAssignmentsClientListResponse contains the response from method ClusterPrincipalAssignmentsClient.NewListPager. +type ClusterPrincipalAssignmentsClientListResponse struct { + // The list Kusto cluster principal assignments operation response. + ClusterPrincipalAssignmentListResult +} + +// ClustersClientAddCalloutPoliciesResponse contains the response from method ClustersClient.BeginAddCalloutPolicies. +type ClustersClientAddCalloutPoliciesResponse struct { + // placeholder for future response values +} + +// ClustersClientAddLanguageExtensionsResponse contains the response from method ClustersClient.BeginAddLanguageExtensions. +type ClustersClientAddLanguageExtensionsResponse struct { + // placeholder for future response values +} + +// ClustersClientCheckNameAvailabilityResponse contains the response from method ClustersClient.CheckNameAvailability. +type ClustersClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. + CheckNameResult +} + +// ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.BeginCreateOrUpdate. +type ClustersClientCreateOrUpdateResponse struct { + // Class representing a Kusto cluster. + Cluster +} + +// ClustersClientDeleteResponse contains the response from method ClustersClient.BeginDelete. +type ClustersClientDeleteResponse struct { + // placeholder for future response values +} + +// ClustersClientDetachFollowerDatabasesResponse contains the response from method ClustersClient.BeginDetachFollowerDatabases. +type ClustersClientDetachFollowerDatabasesResponse struct { + // placeholder for future response values +} + +// ClustersClientDiagnoseVirtualNetworkResponse contains the response from method ClustersClient.BeginDiagnoseVirtualNetwork. +type ClustersClientDiagnoseVirtualNetworkResponse struct { + DiagnoseVirtualNetworkResult +} + +// ClustersClientGetResponse contains the response from method ClustersClient.Get. +type ClustersClientGetResponse struct { + // Class representing a Kusto cluster. + Cluster +} + +// ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager. +type ClustersClientListByResourceGroupResponse struct { + // The list Kusto clusters operation response. + ClusterListResult +} + +// ClustersClientListCalloutPoliciesResponse contains the response from method ClustersClient.NewListCalloutPoliciesPager. +type ClustersClientListCalloutPoliciesResponse struct { + // A list of the service's callout policy objects. + CalloutPoliciesList +} + +// ClustersClientListFollowerDatabasesGetResponse contains the response from method ClustersClient.NewListFollowerDatabasesGetPager. +type ClustersClientListFollowerDatabasesGetResponse struct { + // The list Kusto database principals operation response. + FollowerDatabaseListResultGet +} + +// ClustersClientListFollowerDatabasesResponse contains the response from method ClustersClient.NewListFollowerDatabasesPager. +type ClustersClientListFollowerDatabasesResponse struct { + // The list Kusto database principals operation response. + FollowerDatabaseListResult +} + +// ClustersClientListLanguageExtensionsResponse contains the response from method ClustersClient.NewListLanguageExtensionsPager. +type ClustersClientListLanguageExtensionsResponse struct { + // The list of language extension objects. + LanguageExtensionsList +} + +// ClustersClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method ClustersClient.NewListOutboundNetworkDependenciesEndpointsPager. +type ClustersClientListOutboundNetworkDependenciesEndpointsResponse struct { + // Collection of Outbound Environment Endpoints + OutboundNetworkDependenciesEndpointListResult +} + +// ClustersClientListResponse contains the response from method ClustersClient.NewListPager. +type ClustersClientListResponse struct { + // The list Kusto clusters operation response. + ClusterListResult +} + +// ClustersClientListSKUsByResourceResponse contains the response from method ClustersClient.NewListSKUsByResourcePager. +type ClustersClientListSKUsByResourceResponse struct { + // List of available SKUs for a Kusto Cluster. + ListResourceSKUsResult +} + +// ClustersClientListSKUsResponse contains the response from method ClustersClient.NewListSKUsPager. +type ClustersClientListSKUsResponse struct { + // The list of the EngagementFabric SKU descriptions + SKUDescriptionList +} + +// ClustersClientMigrateResponse contains the response from method ClustersClient.BeginMigrate. +type ClustersClientMigrateResponse struct { + // placeholder for future response values +} + +// ClustersClientRemoveCalloutPolicyResponse contains the response from method ClustersClient.BeginRemoveCalloutPolicy. +type ClustersClientRemoveCalloutPolicyResponse struct { + // placeholder for future response values +} + +// ClustersClientRemoveLanguageExtensionsResponse contains the response from method ClustersClient.BeginRemoveLanguageExtensions. +type ClustersClientRemoveLanguageExtensionsResponse struct { + // placeholder for future response values +} + +// ClustersClientStartResponse contains the response from method ClustersClient.BeginStart. +type ClustersClientStartResponse struct { + // placeholder for future response values +} + +// ClustersClientStopResponse contains the response from method ClustersClient.BeginStop. +type ClustersClientStopResponse struct { + // placeholder for future response values +} + +// ClustersClientUpdateResponse contains the response from method ClustersClient.BeginUpdate. +type ClustersClientUpdateResponse struct { + // Class representing a Kusto cluster. + Cluster +} + +// DataConnectionsClientCheckNameAvailabilityResponse contains the response from method DataConnectionsClient.CheckNameAvailability. +type DataConnectionsClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. + CheckNameResult +} + +// DataConnectionsClientCreateOrUpdateResponse contains the response from method DataConnectionsClient.BeginCreateOrUpdate. +type DataConnectionsClientCreateOrUpdateResponse struct { + // Class representing an data connection. + DataConnectionClassification +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionsClientCreateOrUpdateResponse. +func (d DataConnectionsClientCreateOrUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(d.DataConnectionClassification) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionsClientCreateOrUpdateResponse. +func (d *DataConnectionsClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalDataConnectionClassification(data) + if err != nil { + return err + } + d.DataConnectionClassification = res + return nil +} + +// DataConnectionsClientDataConnectionValidationResponse contains the response from method DataConnectionsClient.BeginDataConnectionValidation. +type DataConnectionsClientDataConnectionValidationResponse struct { + // The list Kusto data connection validation result. + DataConnectionValidationListResult +} + +// DataConnectionsClientDeleteResponse contains the response from method DataConnectionsClient.BeginDelete. +type DataConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// DataConnectionsClientGetResponse contains the response from method DataConnectionsClient.Get. +type DataConnectionsClientGetResponse struct { + // Class representing an data connection. + DataConnectionClassification +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionsClientGetResponse. +func (d *DataConnectionsClientGetResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalDataConnectionClassification(data) + if err != nil { + return err + } + d.DataConnectionClassification = res + return nil +} + +// DataConnectionsClientListByDatabaseResponse contains the response from method DataConnectionsClient.NewListByDatabasePager. +type DataConnectionsClientListByDatabaseResponse struct { + // The list Kusto data connections operation response. + DataConnectionListResult +} + +// DataConnectionsClientUpdateResponse contains the response from method DataConnectionsClient.BeginUpdate. +type DataConnectionsClientUpdateResponse struct { + // Class representing an data connection. + DataConnectionClassification +} + +// MarshalJSON implements the json.Marshaller interface for type DataConnectionsClientUpdateResponse. +func (d DataConnectionsClientUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(d.DataConnectionClassification) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataConnectionsClientUpdateResponse. +func (d *DataConnectionsClientUpdateResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalDataConnectionClassification(data) + if err != nil { + return err + } + d.DataConnectionClassification = res + return nil +} + +// DatabaseClientInviteFollowerResponse contains the response from method DatabaseClient.InviteFollower. +type DatabaseClientInviteFollowerResponse struct { + // The result returned from a follower invitation generation request. + DatabaseInviteFollowerResult +} + +// DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse contains the response from method DatabasePrincipalAssignmentsClient.CheckNameAvailability. +type DatabasePrincipalAssignmentsClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. + CheckNameResult +} + +// DatabasePrincipalAssignmentsClientCreateOrUpdateResponse contains the response from method DatabasePrincipalAssignmentsClient.BeginCreateOrUpdate. +type DatabasePrincipalAssignmentsClientCreateOrUpdateResponse struct { + // Class representing a database principal assignment. + DatabasePrincipalAssignment +} + +// DatabasePrincipalAssignmentsClientDeleteResponse contains the response from method DatabasePrincipalAssignmentsClient.BeginDelete. +type DatabasePrincipalAssignmentsClientDeleteResponse struct { + // placeholder for future response values +} + +// DatabasePrincipalAssignmentsClientGetResponse contains the response from method DatabasePrincipalAssignmentsClient.Get. +type DatabasePrincipalAssignmentsClientGetResponse struct { + // Class representing a database principal assignment. + DatabasePrincipalAssignment +} + +// DatabasePrincipalAssignmentsClientListResponse contains the response from method DatabasePrincipalAssignmentsClient.NewListPager. +type DatabasePrincipalAssignmentsClientListResponse struct { + // The list Kusto database principal assignments operation response. + DatabasePrincipalAssignmentListResult +} + +// DatabasesClientAddPrincipalsResponse contains the response from method DatabasesClient.AddPrincipals. +type DatabasesClientAddPrincipalsResponse struct { + // The list Kusto database principals operation response. + DatabasePrincipalListResult +} + +// DatabasesClientCheckNameAvailabilityResponse contains the response from method DatabasesClient.CheckNameAvailability. +type DatabasesClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. + CheckNameResult +} + +// DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.BeginCreateOrUpdate. +type DatabasesClientCreateOrUpdateResponse struct { + // Class representing a Kusto database. + DatabaseClassification +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasesClientCreateOrUpdateResponse. +func (d DatabasesClientCreateOrUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(d.DatabaseClassification) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasesClientCreateOrUpdateResponse. +func (d *DatabasesClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalDatabaseClassification(data) + if err != nil { + return err + } + d.DatabaseClassification = res + return nil +} + +// DatabasesClientDeleteResponse contains the response from method DatabasesClient.BeginDelete. +type DatabasesClientDeleteResponse struct { + // placeholder for future response values +} + +// DatabasesClientGetResponse contains the response from method DatabasesClient.Get. +type DatabasesClientGetResponse struct { + // Class representing a Kusto database. + DatabaseClassification +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasesClientGetResponse. +func (d *DatabasesClientGetResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalDatabaseClassification(data) + if err != nil { + return err + } + d.DatabaseClassification = res + return nil +} + +// DatabasesClientListByClusterResponse contains the response from method DatabasesClient.NewListByClusterPager. +type DatabasesClientListByClusterResponse struct { + // The list Kusto databases operation response. + DatabaseListResult +} + +// DatabasesClientListPrincipalsResponse contains the response from method DatabasesClient.NewListPrincipalsPager. +type DatabasesClientListPrincipalsResponse struct { + // The list Kusto database principals operation response. + DatabasePrincipalListResult +} + +// DatabasesClientRemovePrincipalsResponse contains the response from method DatabasesClient.RemovePrincipals. +type DatabasesClientRemovePrincipalsResponse struct { + // The list Kusto database principals operation response. + DatabasePrincipalListResult +} + +// DatabasesClientUpdateResponse contains the response from method DatabasesClient.BeginUpdate. +type DatabasesClientUpdateResponse struct { + // Class representing a Kusto database. + DatabaseClassification +} + +// MarshalJSON implements the json.Marshaller interface for type DatabasesClientUpdateResponse. +func (d DatabasesClientUpdateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(d.DatabaseClassification) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabasesClientUpdateResponse. +func (d *DatabasesClientUpdateResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalDatabaseClassification(data) + if err != nil { + return err + } + d.DatabaseClassification = res + return nil +} + +// ManagedPrivateEndpointsClientCheckNameAvailabilityResponse contains the response from method ManagedPrivateEndpointsClient.CheckNameAvailability. +type ManagedPrivateEndpointsClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. + CheckNameResult +} + +// ManagedPrivateEndpointsClientCreateOrUpdateResponse contains the response from method ManagedPrivateEndpointsClient.BeginCreateOrUpdate. +type ManagedPrivateEndpointsClientCreateOrUpdateResponse struct { + // Class representing a managed private endpoint. + ManagedPrivateEndpoint +} + +// ManagedPrivateEndpointsClientDeleteResponse contains the response from method ManagedPrivateEndpointsClient.BeginDelete. +type ManagedPrivateEndpointsClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedPrivateEndpointsClientGetResponse contains the response from method ManagedPrivateEndpointsClient.Get. +type ManagedPrivateEndpointsClientGetResponse struct { + // Class representing a managed private endpoint. + ManagedPrivateEndpoint +} + +// ManagedPrivateEndpointsClientListResponse contains the response from method ManagedPrivateEndpointsClient.NewListPager. +type ManagedPrivateEndpointsClientListResponse struct { + // The list managed private endpoints operation response. + ManagedPrivateEndpointListResult +} + +// ManagedPrivateEndpointsClientUpdateResponse contains the response from method ManagedPrivateEndpointsClient.BeginUpdate. +type ManagedPrivateEndpointsClientUpdateResponse struct { + // Class representing a managed private endpoint. + ManagedPrivateEndpoint +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next + // set of results. + OperationListResult +} + +// OperationsResultsClientGetResponse contains the response from method OperationsResultsClient.Get. +type OperationsResultsClientGetResponse struct { + // Operation Result Entity. + OperationResult +} + +// OperationsResultsLocationClientGetResponse contains the response from method OperationsResultsLocationClient.Get. +type OperationsResultsLocationClientGetResponse struct { + // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. + AzureAsyncOperation *string +} + +// PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate. +type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { + // A private endpoint connection + PrivateEndpointConnection +} + +// PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. +type PrivateEndpointConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. +type PrivateEndpointConnectionsClientGetResponse struct { + // A private endpoint connection + PrivateEndpointConnection +} + +// PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager. +type PrivateEndpointConnectionsClientListResponse struct { + // A list of private endpoint connections + PrivateEndpointConnectionListResult +} + +// PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get. +type PrivateLinkResourcesClientGetResponse struct { + // A private link resource + PrivateLinkResource +} + +// PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.NewListPager. +type PrivateLinkResourcesClientListResponse struct { + // A list of private link resources + PrivateLinkResourceListResult +} + +// SKUsClientListResponse contains the response from method SKUsClient.NewListPager. +type SKUsClientListResponse struct { + // The list of the EngagementFabric SKU descriptions + SKUDescriptionList +} + +// SandboxCustomImagesClientCheckNameAvailabilityResponse contains the response from method SandboxCustomImagesClient.CheckNameAvailability. +type SandboxCustomImagesClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. + CheckNameResult +} + +// SandboxCustomImagesClientCreateOrUpdateResponse contains the response from method SandboxCustomImagesClient.BeginCreateOrUpdate. +type SandboxCustomImagesClientCreateOrUpdateResponse struct { + // Class representing a Kusto sandbox custom image. + SandboxCustomImage +} + +// SandboxCustomImagesClientDeleteResponse contains the response from method SandboxCustomImagesClient.BeginDelete. +type SandboxCustomImagesClientDeleteResponse struct { + // placeholder for future response values +} + +// SandboxCustomImagesClientGetResponse contains the response from method SandboxCustomImagesClient.Get. +type SandboxCustomImagesClientGetResponse struct { + // Class representing a Kusto sandbox custom image. + SandboxCustomImage +} + +// SandboxCustomImagesClientListByClusterResponse contains the response from method SandboxCustomImagesClient.NewListByClusterPager. +type SandboxCustomImagesClientListByClusterResponse struct { + // The list Kusto sandbox custom images operation response. + SandboxCustomImagesListResult +} + +// SandboxCustomImagesClientUpdateResponse contains the response from method SandboxCustomImagesClient.BeginUpdate. +type SandboxCustomImagesClientUpdateResponse struct { + // Class representing a Kusto sandbox custom image. + SandboxCustomImage +} + +// ScriptsClientCheckNameAvailabilityResponse contains the response from method ScriptsClient.CheckNameAvailability. +type ScriptsClientCheckNameAvailabilityResponse struct { + // The result returned from a check name availability request. + CheckNameResult +} + +// ScriptsClientCreateOrUpdateResponse contains the response from method ScriptsClient.BeginCreateOrUpdate. +type ScriptsClientCreateOrUpdateResponse struct { + // Class representing a database script. + Script +} + +// ScriptsClientDeleteResponse contains the response from method ScriptsClient.BeginDelete. +type ScriptsClientDeleteResponse struct { + // placeholder for future response values +} + +// ScriptsClientGetResponse contains the response from method ScriptsClient.Get. +type ScriptsClientGetResponse struct { + // Class representing a database script. + Script +} + +// ScriptsClientListByDatabaseResponse contains the response from method ScriptsClient.NewListByDatabasePager. +type ScriptsClientListByDatabaseResponse struct { + // The list Kusto database script operation response. + ScriptListResult +} + +// ScriptsClientUpdateResponse contains the response from method ScriptsClient.BeginUpdate. +type ScriptsClientUpdateResponse struct { + // Class representing a database script. + Script +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/sandboxcustomimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/sandboxcustomimages_client.go new file mode 100644 index 00000000..fa20b367 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/sandboxcustomimages_client.go @@ -0,0 +1,499 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SandboxCustomImagesClient contains the methods for the SandboxCustomImages group. +// Don't use this type directly, use NewSandboxCustomImagesClient() instead. +type SandboxCustomImagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSandboxCustomImagesClient creates a new instance of SandboxCustomImagesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSandboxCustomImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SandboxCustomImagesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SandboxCustomImagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckNameAvailability - Checks that the sandbox custom image resource name is valid and is not already in use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - resourceName - The name of the resource. +// - options - SandboxCustomImagesClientCheckNameAvailabilityOptions contains the optional parameters for the SandboxCustomImagesClient.CheckNameAvailability +// method. +func (client *SandboxCustomImagesClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, resourceName SandboxCustomImagesCheckNameRequest, options *SandboxCustomImagesClientCheckNameAvailabilityOptions) (SandboxCustomImagesClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "SandboxCustomImagesClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, clusterName, resourceName, options) + if err != nil { + return SandboxCustomImagesClientCheckNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SandboxCustomImagesClientCheckNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SandboxCustomImagesClientCheckNameAvailabilityResponse{}, err + } + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. +func (client *SandboxCustomImagesClient) checkNameAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, resourceName SandboxCustomImagesCheckNameRequest, options *SandboxCustomImagesClientCheckNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImagesCheckNameAvailability" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, resourceName); err != nil { + return nil, err + } + return req, nil +} + +// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. +func (client *SandboxCustomImagesClient) checkNameAvailabilityHandleResponse(resp *http.Response) (SandboxCustomImagesClientCheckNameAvailabilityResponse, error) { + result := SandboxCustomImagesClientCheckNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckNameResult); err != nil { + return SandboxCustomImagesClientCheckNameAvailabilityResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Creates or updates a sandbox custom image. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - sandboxCustomImageName - The name of the sandbox custom image. +// - parameters - The sandbox custom image parameters. +// - options - SandboxCustomImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the SandboxCustomImagesClient.BeginCreateOrUpdate +// method. +func (client *SandboxCustomImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, parameters SandboxCustomImage, options *SandboxCustomImagesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SandboxCustomImagesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, clusterName, sandboxCustomImageName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SandboxCustomImagesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SandboxCustomImagesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a sandbox custom image. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *SandboxCustomImagesClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, parameters SandboxCustomImage, options *SandboxCustomImagesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SandboxCustomImagesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, sandboxCustomImageName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SandboxCustomImagesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, parameters SandboxCustomImage, options *SandboxCustomImagesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if sandboxCustomImageName == "" { + return nil, errors.New("parameter sandboxCustomImageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sandboxCustomImageName}", url.PathEscape(sandboxCustomImageName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a sandbox custom image. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - sandboxCustomImageName - The name of the sandbox custom image. +// - options - SandboxCustomImagesClientBeginDeleteOptions contains the optional parameters for the SandboxCustomImagesClient.BeginDelete +// method. +func (client *SandboxCustomImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, options *SandboxCustomImagesClientBeginDeleteOptions) (*runtime.Poller[SandboxCustomImagesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, clusterName, sandboxCustomImageName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SandboxCustomImagesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SandboxCustomImagesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a sandbox custom image. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *SandboxCustomImagesClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, options *SandboxCustomImagesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SandboxCustomImagesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, sandboxCustomImageName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SandboxCustomImagesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, options *SandboxCustomImagesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if sandboxCustomImageName == "" { + return nil, errors.New("parameter sandboxCustomImageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sandboxCustomImageName}", url.PathEscape(sandboxCustomImageName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns a sandbox custom image +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - sandboxCustomImageName - The name of the sandbox custom image. +// - options - SandboxCustomImagesClientGetOptions contains the optional parameters for the SandboxCustomImagesClient.Get method. +func (client *SandboxCustomImagesClient) Get(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, options *SandboxCustomImagesClientGetOptions) (SandboxCustomImagesClientGetResponse, error) { + var err error + const operationName = "SandboxCustomImagesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, sandboxCustomImageName, options) + if err != nil { + return SandboxCustomImagesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SandboxCustomImagesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SandboxCustomImagesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SandboxCustomImagesClient) getCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, options *SandboxCustomImagesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if sandboxCustomImageName == "" { + return nil, errors.New("parameter sandboxCustomImageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sandboxCustomImageName}", url.PathEscape(sandboxCustomImageName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SandboxCustomImagesClient) getHandleResponse(resp *http.Response) (SandboxCustomImagesClientGetResponse, error) { + result := SandboxCustomImagesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SandboxCustomImage); err != nil { + return SandboxCustomImagesClientGetResponse{}, err + } + return result, nil +} + +// NewListByClusterPager - Returns the list of the existing sandbox custom images of the given Kusto cluster. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - options - SandboxCustomImagesClientListByClusterOptions contains the optional parameters for the SandboxCustomImagesClient.NewListByClusterPager +// method. +func (client *SandboxCustomImagesClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *SandboxCustomImagesClientListByClusterOptions) *runtime.Pager[SandboxCustomImagesClientListByClusterResponse] { + return runtime.NewPager(runtime.PagingHandler[SandboxCustomImagesClientListByClusterResponse]{ + More: func(page SandboxCustomImagesClientListByClusterResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *SandboxCustomImagesClientListByClusterResponse) (SandboxCustomImagesClientListByClusterResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SandboxCustomImagesClient.NewListByClusterPager") + req, err := client.listByClusterCreateRequest(ctx, resourceGroupName, clusterName, options) + if err != nil { + return SandboxCustomImagesClientListByClusterResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SandboxCustomImagesClientListByClusterResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SandboxCustomImagesClientListByClusterResponse{}, runtime.NewResponseError(resp) + } + return client.listByClusterHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByClusterCreateRequest creates the ListByCluster request. +func (client *SandboxCustomImagesClient) listByClusterCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, options *SandboxCustomImagesClientListByClusterOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByClusterHandleResponse handles the ListByCluster response. +func (client *SandboxCustomImagesClient) listByClusterHandleResponse(resp *http.Response) (SandboxCustomImagesClientListByClusterResponse, error) { + result := SandboxCustomImagesClientListByClusterResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SandboxCustomImagesListResult); err != nil { + return SandboxCustomImagesClientListByClusterResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates a sandbox custom image. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - clusterName - The name of the Kusto cluster. +// - sandboxCustomImageName - The name of the sandbox custom image. +// - parameters - The sandbox custom image parameters. +// - options - SandboxCustomImagesClientBeginUpdateOptions contains the optional parameters for the SandboxCustomImagesClient.BeginUpdate +// method. +func (client *SandboxCustomImagesClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, parameters SandboxCustomImage, options *SandboxCustomImagesClientBeginUpdateOptions) (*runtime.Poller[SandboxCustomImagesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, clusterName, sandboxCustomImageName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SandboxCustomImagesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SandboxCustomImagesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates a sandbox custom image. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-04-13 +func (client *SandboxCustomImagesClient) update(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, parameters SandboxCustomImage, options *SandboxCustomImagesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SandboxCustomImagesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, sandboxCustomImageName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *SandboxCustomImagesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, clusterName string, sandboxCustomImageName string, parameters SandboxCustomImage, options *SandboxCustomImagesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if clusterName == "" { + return nil, errors.New("parameter clusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{clusterName}", url.PathEscape(clusterName)) + if sandboxCustomImageName == "" { + return nil, errors.New("parameter sandboxCustomImageName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{sandboxCustomImageName}", url.PathEscape(sandboxCustomImageName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/scripts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/scripts_client.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/scripts_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/scripts_client.go index 7d9e7e86..c6547047 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/scripts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/scripts_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkusto @@ -29,12 +28,11 @@ type ScriptsClient struct { } // NewScriptsClient creates a new instance of ScriptsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewScriptsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScriptsClient, error) { - cl, err := arm.NewClient(moduleName+".ScriptsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,26 +46,33 @@ func NewScriptsClient(subscriptionID string, credential azcore.TokenCredential, // CheckNameAvailability - Checks that the script name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - scriptName - The name of the script. // - options - ScriptsClientCheckNameAvailabilityOptions contains the optional parameters for the ScriptsClient.CheckNameAvailability // method. func (client *ScriptsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName ScriptCheckNameRequest, options *ScriptsClientCheckNameAvailabilityOptions) (ScriptsClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ScriptsClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkNameAvailabilityCreateRequest(ctx, resourceGroupName, clusterName, databaseName, scriptName, options) if err != nil { return ScriptsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScriptsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScriptsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScriptsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -94,10 +99,13 @@ func (client *ScriptsClient) checkNameAvailabilityCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, scriptName) + if err := runtime.MarshalAsJSON(req, scriptName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -112,8 +120,8 @@ func (client *ScriptsClient) checkNameAvailabilityHandleResponse(resp *http.Resp // BeginCreateOrUpdate - Creates a Kusto database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - scriptName - The name of the Kusto database script. @@ -126,29 +134,40 @@ func (client *ScriptsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[ScriptsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ScriptsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ScriptsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ScriptsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Creates a Kusto database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *ScriptsClient) createOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, parameters Script, options *ScriptsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ScriptsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, scriptName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -179,17 +198,20 @@ func (client *ScriptsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } -// BeginDelete - Deletes a Kusto principalAssignment. +// BeginDelete - Deletes a Kusto database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - scriptName - The name of the Kusto database script. @@ -200,29 +222,40 @@ func (client *ScriptsClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ScriptsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ScriptsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ScriptsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ScriptsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } -// Delete - Deletes a Kusto principalAssignment. +// Delete - Deletes a Kusto database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *ScriptsClient) deleteOperation(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, options *ScriptsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ScriptsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, clusterName, databaseName, scriptName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -253,7 +286,7 @@ func (client *ScriptsClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,25 +295,32 @@ func (client *ScriptsClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets a Kusto cluster database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - scriptName - The name of the Kusto database script. // - options - ScriptsClientGetOptions contains the optional parameters for the ScriptsClient.Get method. func (client *ScriptsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, options *ScriptsClientGetOptions) (ScriptsClientGetResponse, error) { + var err error + const operationName = "ScriptsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, clusterName, databaseName, scriptName, options) if err != nil { return ScriptsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ScriptsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScriptsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScriptsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -311,7 +351,7 @@ func (client *ScriptsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -328,8 +368,8 @@ func (client *ScriptsClient) getHandleResponse(resp *http.Response) (ScriptsClie // NewListByDatabasePager - Returns the list of database scripts for given database. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - options - ScriptsClientListByDatabaseOptions contains the optional parameters for the ScriptsClient.NewListByDatabasePager @@ -340,6 +380,7 @@ func (client *ScriptsClient) NewListByDatabasePager(resourceGroupName string, cl return false }, Fetcher: func(ctx context.Context, page *ScriptsClientListByDatabaseResponse) (ScriptsClientListByDatabaseResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScriptsClient.NewListByDatabasePager") req, err := client.listByDatabaseCreateRequest(ctx, resourceGroupName, clusterName, databaseName, options) if err != nil { return ScriptsClientListByDatabaseResponse{}, err @@ -353,6 +394,7 @@ func (client *ScriptsClient) NewListByDatabasePager(resourceGroupName string, cl } return client.listByDatabaseHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -380,7 +422,7 @@ func (client *ScriptsClient) listByDatabaseCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -398,8 +440,8 @@ func (client *ScriptsClient) listByDatabaseHandleResponse(resp *http.Response) ( // BeginUpdate - Updates a database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 -// - resourceGroupName - The name of the resource group containing the Kusto cluster. +// Generated from API version 2024-04-13 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - clusterName - The name of the Kusto cluster. // - databaseName - The name of the database in the Kusto cluster. // - scriptName - The name of the Kusto database script. @@ -411,29 +453,40 @@ func (client *ScriptsClient) BeginUpdate(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[ScriptsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ScriptsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ScriptsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ScriptsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Update - Updates a database script. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-12-29 +// Generated from API version 2024-04-13 func (client *ScriptsClient) update(ctx context.Context, resourceGroupName string, clusterName string, databaseName string, scriptName string, parameters Script, options *ScriptsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ScriptsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, clusterName, databaseName, scriptName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -464,8 +517,11 @@ func (client *ScriptsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-12-29") + reqQP.Set("api-version", "2024-04-13") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/skus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/skus_client.go new file mode 100644 index 00000000..73fad2a9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/skus_client.go @@ -0,0 +1,104 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SKUsClient contains the methods for the SKUs group. +// Don't use this type directly, use NewSKUsClient() instead. +type SKUsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSKUsClient creates a new instance of SKUsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SKUsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Lists eligible region SKUs for Kusto resource provider by Azure region. +// +// Generated from API version 2024-04-13 +// - location - The name of Azure region. +// - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. +func (client *SKUsClient) NewListPager(location string, options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ + More: func(page SKUsClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *SKUsClientListResponse) (SKUsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SKUsClient.NewListPager") + req, err := client.listCreateRequest(ctx, location, options) + if err != nil { + return SKUsClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SKUsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SKUsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SKUsClient) listCreateRequest(ctx context.Context, location string, options *SKUsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/skus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-04-13") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SKUsClient) listHandleResponse(resp *http.Response) (SKUsClientListResponse, error) { + result := SKUsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SKUDescriptionList); err != nil { + return SKUsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/time_rfc3339.go new file mode 100644 index 00000000..50873f63 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2/time_rfc3339.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkusto + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/CHANGELOG.md deleted file mode 100644 index 658e4004..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/CHANGELOG.md +++ /dev/null @@ -1,2088 +0,0 @@ -# Release History - -## 0.7.0 (2022-05-17) -### Breaking Changes - -- Function `*PrivateLinkScopedResourcesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[PrivateLinkScopedResourcesClientDeleteResponse], error)` to `(*runtime.Poller[PrivateLinkScopedResourcesClientDeleteResponse], error)` -- Function `*ActionGroupsClient.BeginPostTestNotifications` return value(s) have been changed from `(*armruntime.Poller[ActionGroupsClientPostTestNotificationsResponse], error)` to `(*runtime.Poller[ActionGroupsClientPostTestNotificationsResponse], error)` -- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` -- Function `*PrivateEndpointConnectionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)` -- Function `*PrivateLinkScopedResourcesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[PrivateLinkScopedResourcesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[PrivateLinkScopedResourcesClientCreateOrUpdateResponse], error)` -- Function `*PrivateLinkScopesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[PrivateLinkScopesClientDeleteResponse], error)` to `(*runtime.Poller[PrivateLinkScopesClientDeleteResponse], error)` -- Function `MetricValue.MarshalJSON` has been removed -- Function `EventDataCollection.MarshalJSON` has been removed -- Function `PrivateLinkResourceListResult.MarshalJSON` has been removed -- Function `Metric.MarshalJSON` has been removed -- Function `ErrorDetail.MarshalJSON` has been removed -- Function `MetricDefinitionCollection.MarshalJSON` has been removed -- Function `TimeSeriesElement.MarshalJSON` has been removed -- Function `TestNotificationDetailsResponse.MarshalJSON` has been removed -- Function `EventData.MarshalJSON` has been removed -- Function `DataCollectionEndpointResourceListResult.MarshalJSON` has been removed -- Function `DataCollectionRuleAssociationProxyOnlyResourceListResult.MarshalJSON` has been removed -- Function `AlertRuleList.MarshalJSON` has been removed -- Function `MetricNamespaceCollection.MarshalJSON` has been removed -- Function `MetricDefinition.MarshalJSON` has been removed -- Function `AlertRuleResourceCollection.MarshalJSON` has been removed -- Function `OperationListResult.MarshalJSON` has been removed -- Function `AzureMonitorPrivateLinkScopeListResult.MarshalJSON` has been removed -- Function `MetricBaselinesResponse.MarshalJSON` has been removed -- Function `AutoscaleSettingResourceCollection.MarshalJSON` has been removed -- Function `EventCategoryCollection.MarshalJSON` has been removed -- Function `LogProfileCollection.MarshalJSON` has been removed -- Function `MetricBaselinesProperties.MarshalJSON` has been removed -- Function `ActionGroupList.MarshalJSON` has been removed -- Function `DiagnosticSettingsCategoryResourceCollection.MarshalJSON` has been removed -- Function `MetricAlertResourceCollection.MarshalJSON` has been removed -- Function `TimeSeriesBaseline.MarshalJSON` has been removed -- Function `MetricAlertStatusCollection.MarshalJSON` has been removed -- Function `Response.MarshalJSON` has been removed -- Function `IncidentListResult.MarshalJSON` has been removed -- Function `Incident.MarshalJSON` has been removed -- Function `MetricAlertStatusProperties.MarshalJSON` has been removed -- Function `ErrorResponseCommon.MarshalJSON` has been removed -- Function `DataCollectionRuleResourceListResult.MarshalJSON` has been removed -- Function `SingleBaseline.MarshalJSON` has been removed -- Function `LogSearchRuleResourceCollection.MarshalJSON` has been removed -- Function `ScopedResourceListResult.MarshalJSON` has been removed -- Function `OperationStatus.MarshalJSON` has been removed -- Function `PrivateEndpointConnectionListResult.MarshalJSON` has been removed -- Function `DiagnosticSettingsResourceCollection.MarshalJSON` has been removed -- Struct `TestNotificationResponse` has been removed -- Field `TestNotificationResponse` of struct `ActionGroupsClientPostTestNotificationsResponse` has been removed - -### Features Added - -- New function `*ActionGroupsClient.GetTestNotificationsAtActionGroupResourceLevel(context.Context, string, string, string, *ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelOptions) (ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse, error)` -- New function `*ActionGroupsClient.BeginCreateNotificationsAtResourceGroupLevel(context.Context, string, NotificationRequestBody, *ActionGroupsClientBeginCreateNotificationsAtResourceGroupLevelOptions) (*runtime.Poller[ActionGroupsClientCreateNotificationsAtResourceGroupLevelResponse], error)` -- New function `*ActionGroupsClient.GetTestNotificationsAtResourceGroupLevel(context.Context, string, string, *ActionGroupsClientGetTestNotificationsAtResourceGroupLevelOptions) (ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse, error)` -- New function `*ActionGroupsClient.BeginCreateNotificationsAtActionGroupResourceLevel(context.Context, string, string, NotificationRequestBody, *ActionGroupsClientBeginCreateNotificationsAtActionGroupResourceLevelOptions) (*runtime.Poller[ActionGroupsClientCreateNotificationsAtActionGroupResourceLevelResponse], error)` -- New struct `ActionGroupsClientBeginCreateNotificationsAtActionGroupResourceLevelOptions` -- New struct `ActionGroupsClientBeginCreateNotificationsAtResourceGroupLevelOptions` -- New struct `ActionGroupsClientCreateNotificationsAtActionGroupResourceLevelResponse` -- New struct `ActionGroupsClientCreateNotificationsAtResourceGroupLevelResponse` -- New struct `ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelOptions` -- New struct `ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse` -- New struct `ActionGroupsClientGetTestNotificationsAtResourceGroupLevelOptions` -- New struct `ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse` - - -## 0.6.0 (2022-04-18) -### Breaking Changes - -- Function `*AlertRulesClient.ListByResourceGroup` has been removed -- Function `*EventCategoriesClient.List` has been removed -- Function `*ActivityLogAlertsClient.ListBySubscriptionID` has been removed -- Function `*AutoscaleSettingsClient.ListBySubscription` has been removed -- Function `*MetricDefinitionsClient.List` has been removed -- Function `*AlertRulesClient.ListBySubscription` has been removed -- Function `*LogProfilesClient.List` has been removed -- Function `*DataCollectionRuleAssociationsClient.ListByResource` has been removed -- Function `*MetricAlertsClient.ListBySubscription` has been removed -- Function `*AlertRuleIncidentsClient.ListByAlertRule` has been removed -- Function `*MetricAlertsClient.ListByResourceGroup` has been removed -- Function `*TenantActivityLogsClient.List` has been removed -- Function `*ActionGroupsClient.ListByResourceGroup` has been removed -- Function `*ActionGroupsClient.ListBySubscriptionID` has been removed -- Function `*ActivityLogsClient.List` has been removed -- Function `*DataCollectionRuleAssociationsClient.ListByDataCollectionEndpoint` has been removed -- Function `*ScheduledQueryRulesClient.ListByResourceGroup` has been removed -- Function `*ScheduledQueryRulesClient.ListBySubscription` has been removed -- Function `*PrivateLinkScopesClient.List` has been removed -- Function `*PrivateEndpointConnectionsClient.ListByPrivateLinkScope` has been removed -- Function `*MetricNamespacesClient.List` has been removed -- Function `*DataCollectionRulesClient.ListBySubscription` has been removed -- Function `*DataCollectionEndpointsClient.ListByResourceGroup` has been removed -- Function `*PrivateLinkResourcesClient.ListByPrivateLinkScope` has been removed -- Function `*DataCollectionRuleAssociationsClient.ListByRule` has been removed -- Function `*PrivateLinkScopedResourcesClient.ListByPrivateLinkScope` has been removed -- Function `*BaselinesClient.List` has been removed -- Function `*DataCollectionEndpointsClient.ListBySubscription` has been removed -- Function `*ActivityLogAlertsClient.ListByResourceGroup` has been removed -- Function `*PrivateLinkScopesClient.ListByResourceGroup` has been removed -- Function `*AutoscaleSettingsClient.ListByResourceGroup` has been removed -- Function `*DataCollectionRulesClient.ListByResourceGroup` has been removed - -### Features Added - -- New function `*LogProfilesClient.NewListPager(*LogProfilesClientListOptions) *runtime.Pager[LogProfilesClientListResponse]` -- New function `*DataCollectionRuleAssociationsClient.NewListByDataCollectionEndpointPager(string, string, *DataCollectionRuleAssociationsClientListByDataCollectionEndpointOptions) *runtime.Pager[DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse]` -- New function `*DataCollectionRulesClient.NewListByResourceGroupPager(string, *DataCollectionRulesClientListByResourceGroupOptions) *runtime.Pager[DataCollectionRulesClientListByResourceGroupResponse]` -- New function `*TenantActivityLogsClient.NewListPager(*TenantActivityLogsClientListOptions) *runtime.Pager[TenantActivityLogsClientListResponse]` -- New function `*ActionGroupsClient.NewListByResourceGroupPager(string, *ActionGroupsClientListByResourceGroupOptions) *runtime.Pager[ActionGroupsClientListByResourceGroupResponse]` -- New function `*ActivityLogAlertsClient.NewListByResourceGroupPager(string, *ActivityLogAlertsClientListByResourceGroupOptions) *runtime.Pager[ActivityLogAlertsClientListByResourceGroupResponse]` -- New function `*PrivateLinkScopesClient.NewListPager(*PrivateLinkScopesClientListOptions) *runtime.Pager[PrivateLinkScopesClientListResponse]` -- New function `*ScheduledQueryRulesClient.NewListBySubscriptionPager(*ScheduledQueryRulesClientListBySubscriptionOptions) *runtime.Pager[ScheduledQueryRulesClientListBySubscriptionResponse]` -- New function `*MetricDefinitionsClient.NewListPager(string, *MetricDefinitionsClientListOptions) *runtime.Pager[MetricDefinitionsClientListResponse]` -- New function `*ActivityLogsClient.NewListPager(string, *ActivityLogsClientListOptions) *runtime.Pager[ActivityLogsClientListResponse]` -- New function `*PrivateLinkResourcesClient.NewListByPrivateLinkScopePager(string, string, *PrivateLinkResourcesClientListByPrivateLinkScopeOptions) *runtime.Pager[PrivateLinkResourcesClientListByPrivateLinkScopeResponse]` -- New function `*MetricNamespacesClient.NewListPager(string, *MetricNamespacesClientListOptions) *runtime.Pager[MetricNamespacesClientListResponse]` -- New function `*PrivateLinkScopedResourcesClient.NewListByPrivateLinkScopePager(string, string, *PrivateLinkScopedResourcesClientListByPrivateLinkScopeOptions) *runtime.Pager[PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse]` -- New function `*PrivateEndpointConnectionsClient.NewListByPrivateLinkScopePager(string, string, *PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse]` -- New function `*ActivityLogAlertsClient.NewListBySubscriptionIDPager(*ActivityLogAlertsClientListBySubscriptionIDOptions) *runtime.Pager[ActivityLogAlertsClientListBySubscriptionIDResponse]` -- New function `*DataCollectionRuleAssociationsClient.NewListByRulePager(string, string, *DataCollectionRuleAssociationsClientListByRuleOptions) *runtime.Pager[DataCollectionRuleAssociationsClientListByRuleResponse]` -- New function `*PrivateLinkScopesClient.NewListByResourceGroupPager(string, *PrivateLinkScopesClientListByResourceGroupOptions) *runtime.Pager[PrivateLinkScopesClientListByResourceGroupResponse]` -- New function `*EventCategoriesClient.NewListPager(*EventCategoriesClientListOptions) *runtime.Pager[EventCategoriesClientListResponse]` -- New function `*MetricAlertsClient.NewListByResourceGroupPager(string, *MetricAlertsClientListByResourceGroupOptions) *runtime.Pager[MetricAlertsClientListByResourceGroupResponse]` -- New function `*DataCollectionEndpointsClient.NewListByResourceGroupPager(string, *DataCollectionEndpointsClientListByResourceGroupOptions) *runtime.Pager[DataCollectionEndpointsClientListByResourceGroupResponse]` -- New function `*ScheduledQueryRulesClient.NewListByResourceGroupPager(string, *ScheduledQueryRulesClientListByResourceGroupOptions) *runtime.Pager[ScheduledQueryRulesClientListByResourceGroupResponse]` -- New function `*ActionGroupsClient.NewListBySubscriptionIDPager(*ActionGroupsClientListBySubscriptionIDOptions) *runtime.Pager[ActionGroupsClientListBySubscriptionIDResponse]` -- New function `*DataCollectionRuleAssociationsClient.NewListByResourcePager(string, *DataCollectionRuleAssociationsClientListByResourceOptions) *runtime.Pager[DataCollectionRuleAssociationsClientListByResourceResponse]` -- New function `*DataCollectionEndpointsClient.NewListBySubscriptionPager(*DataCollectionEndpointsClientListBySubscriptionOptions) *runtime.Pager[DataCollectionEndpointsClientListBySubscriptionResponse]` -- New function `*DataCollectionRulesClient.NewListBySubscriptionPager(*DataCollectionRulesClientListBySubscriptionOptions) *runtime.Pager[DataCollectionRulesClientListBySubscriptionResponse]` -- New function `*BaselinesClient.NewListPager(string, *BaselinesClientListOptions) *runtime.Pager[BaselinesClientListResponse]` -- New function `*MetricAlertsClient.NewListBySubscriptionPager(*MetricAlertsClientListBySubscriptionOptions) *runtime.Pager[MetricAlertsClientListBySubscriptionResponse]` -- New function `*AutoscaleSettingsClient.NewListByResourceGroupPager(string, *AutoscaleSettingsClientListByResourceGroupOptions) *runtime.Pager[AutoscaleSettingsClientListByResourceGroupResponse]` -- New function `*AutoscaleSettingsClient.NewListBySubscriptionPager(*AutoscaleSettingsClientListBySubscriptionOptions) *runtime.Pager[AutoscaleSettingsClientListBySubscriptionResponse]` -- New function `*AlertRuleIncidentsClient.NewListByAlertRulePager(string, string, *AlertRuleIncidentsClientListByAlertRuleOptions) *runtime.Pager[AlertRuleIncidentsClientListByAlertRuleResponse]` -- New function `*AlertRulesClient.NewListByResourceGroupPager(string, *AlertRulesClientListByResourceGroupOptions) *runtime.Pager[AlertRulesClientListByResourceGroupResponse]` -- New function `*AlertRulesClient.NewListBySubscriptionPager(*AlertRulesClientListBySubscriptionOptions) *runtime.Pager[AlertRulesClientListBySubscriptionResponse]` - - -## 0.5.0 (2022-04-12) -### Breaking Changes - -- Function `*DataCollectionRuleAssociationsClient.ListByResource` return value(s) have been changed from `(*DataCollectionRuleAssociationsClientListByResourcePager)` to `(*runtime.Pager[DataCollectionRuleAssociationsClientListByResourceResponse])` -- Function `NewAlertRuleIncidentsClient` return value(s) have been changed from `(*AlertRuleIncidentsClient)` to `(*AlertRuleIncidentsClient, error)` -- Function `*ScheduledQueryRulesClient.ListByResourceGroup` parameter(s) have been changed from `(context.Context, string, *ScheduledQueryRulesClientListByResourceGroupOptions)` to `(string, *ScheduledQueryRulesClientListByResourceGroupOptions)` -- Function `*ScheduledQueryRulesClient.ListByResourceGroup` return value(s) have been changed from `(ScheduledQueryRulesClientListByResourceGroupResponse, error)` to `(*runtime.Pager[ScheduledQueryRulesClientListByResourceGroupResponse])` -- Function `*AlertRulesClient.ListByResourceGroup` parameter(s) have been changed from `(context.Context, string, *AlertRulesClientListByResourceGroupOptions)` to `(string, *AlertRulesClientListByResourceGroupOptions)` -- Function `*AlertRulesClient.ListByResourceGroup` return value(s) have been changed from `(AlertRulesClientListByResourceGroupResponse, error)` to `(*runtime.Pager[AlertRulesClientListByResourceGroupResponse])` -- Function `*AlertRulesClient.ListBySubscription` parameter(s) have been changed from `(context.Context, *AlertRulesClientListBySubscriptionOptions)` to `(*AlertRulesClientListBySubscriptionOptions)` -- Function `*AlertRulesClient.ListBySubscription` return value(s) have been changed from `(AlertRulesClientListBySubscriptionResponse, error)` to `(*runtime.Pager[AlertRulesClientListBySubscriptionResponse])` -- Function `NewDiagnosticSettingsClient` return value(s) have been changed from `(*DiagnosticSettingsClient)` to `(*DiagnosticSettingsClient, error)` -- Function `NewPrivateLinkScopedResourcesClient` return value(s) have been changed from `(*PrivateLinkScopedResourcesClient)` to `(*PrivateLinkScopedResourcesClient, error)` -- Function `*ActivityLogsClient.List` return value(s) have been changed from `(*ActivityLogsClientListPager)` to `(*runtime.Pager[ActivityLogsClientListResponse])` -- Function `*EventCategoriesClient.List` parameter(s) have been changed from `(context.Context, *EventCategoriesClientListOptions)` to `(*EventCategoriesClientListOptions)` -- Function `*EventCategoriesClient.List` return value(s) have been changed from `(EventCategoriesClientListResponse, error)` to `(*runtime.Pager[EventCategoriesClientListResponse])` -- Function `NewLogProfilesClient` return value(s) have been changed from `(*LogProfilesClient)` to `(*LogProfilesClient, error)` -- Function `NewScheduledQueryRulesClient` return value(s) have been changed from `(*ScheduledQueryRulesClient)` to `(*ScheduledQueryRulesClient, error)` -- Function `*AutoscaleSettingsClient.ListBySubscription` return value(s) have been changed from `(*AutoscaleSettingsClientListBySubscriptionPager)` to `(*runtime.Pager[AutoscaleSettingsClientListBySubscriptionResponse])` -- Function `NewMetricDefinitionsClient` return value(s) have been changed from `(*MetricDefinitionsClient)` to `(*MetricDefinitionsClient, error)` -- Function `*ScheduledQueryRulesClient.ListBySubscription` parameter(s) have been changed from `(context.Context, *ScheduledQueryRulesClientListBySubscriptionOptions)` to `(*ScheduledQueryRulesClientListBySubscriptionOptions)` -- Function `*ScheduledQueryRulesClient.ListBySubscription` return value(s) have been changed from `(ScheduledQueryRulesClientListBySubscriptionResponse, error)` to `(*runtime.Pager[ScheduledQueryRulesClientListBySubscriptionResponse])` -- Function `*ActionGroupsClient.ListBySubscriptionID` parameter(s) have been changed from `(context.Context, *ActionGroupsClientListBySubscriptionIDOptions)` to `(*ActionGroupsClientListBySubscriptionIDOptions)` -- Function `*ActionGroupsClient.ListBySubscriptionID` return value(s) have been changed from `(ActionGroupsClientListBySubscriptionIDResponse, error)` to `(*runtime.Pager[ActionGroupsClientListBySubscriptionIDResponse])` -- Function `*MetricAlertsClient.ListByResourceGroup` parameter(s) have been changed from `(context.Context, string, *MetricAlertsClientListByResourceGroupOptions)` to `(string, *MetricAlertsClientListByResourceGroupOptions)` -- Function `*MetricAlertsClient.ListByResourceGroup` return value(s) have been changed from `(MetricAlertsClientListByResourceGroupResponse, error)` to `(*runtime.Pager[MetricAlertsClientListByResourceGroupResponse])` -- Function `NewMetricAlertsClient` return value(s) have been changed from `(*MetricAlertsClient)` to `(*MetricAlertsClient, error)` -- Function `*PrivateLinkScopedResourcesClient.BeginCreateOrUpdate` return value(s) have been changed from `(PrivateLinkScopedResourcesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[PrivateLinkScopedResourcesClientCreateOrUpdateResponse], error)` -- Function `*DataCollectionRuleAssociationsClient.ListByRule` return value(s) have been changed from `(*DataCollectionRuleAssociationsClientListByRulePager)` to `(*runtime.Pager[DataCollectionRuleAssociationsClientListByRuleResponse])` -- Function `*ActionGroupsClient.ListByResourceGroup` parameter(s) have been changed from `(context.Context, string, *ActionGroupsClientListByResourceGroupOptions)` to `(string, *ActionGroupsClientListByResourceGroupOptions)` -- Function `*ActionGroupsClient.ListByResourceGroup` return value(s) have been changed from `(ActionGroupsClientListByResourceGroupResponse, error)` to `(*runtime.Pager[ActionGroupsClientListByResourceGroupResponse])` -- Function `*MetricDefinitionsClient.List` parameter(s) have been changed from `(context.Context, string, *MetricDefinitionsClientListOptions)` to `(string, *MetricDefinitionsClientListOptions)` -- Function `*MetricDefinitionsClient.List` return value(s) have been changed from `(MetricDefinitionsClientListResponse, error)` to `(*runtime.Pager[MetricDefinitionsClientListResponse])` -- Function `NewBaselinesClient` return value(s) have been changed from `(*BaselinesClient)` to `(*BaselinesClient, error)` -- Function `*DataCollectionRulesClient.ListByResourceGroup` return value(s) have been changed from `(*DataCollectionRulesClientListByResourceGroupPager)` to `(*runtime.Pager[DataCollectionRulesClientListByResourceGroupResponse])` -- Function `NewAlertRulesClient` return value(s) have been changed from `(*AlertRulesClient)` to `(*AlertRulesClient, error)` -- Function `*PrivateLinkScopesClient.BeginDelete` return value(s) have been changed from `(PrivateLinkScopesClientDeletePollerResponse, error)` to `(*armruntime.Poller[PrivateLinkScopesClientDeleteResponse], error)` -- Function `NewActivityLogsClient` return value(s) have been changed from `(*ActivityLogsClient)` to `(*ActivityLogsClient, error)` -- Function `NewPrivateLinkScopesClient` return value(s) have been changed from `(*PrivateLinkScopesClient)` to `(*PrivateLinkScopesClient, error)` -- Function `NewMetricNamespacesClient` return value(s) have been changed from `(*MetricNamespacesClient)` to `(*MetricNamespacesClient, error)` -- Function `NewDataCollectionEndpointsClient` return value(s) have been changed from `(*DataCollectionEndpointsClient)` to `(*DataCollectionEndpointsClient, error)` -- Function `NewEventCategoriesClient` return value(s) have been changed from `(*EventCategoriesClient)` to `(*EventCategoriesClient, error)` -- Function `*ActivityLogAlertsClient.ListByResourceGroup` return value(s) have been changed from `(*ActivityLogAlertsClientListByResourceGroupPager)` to `(*runtime.Pager[ActivityLogAlertsClientListByResourceGroupResponse])` -- Function `*PrivateLinkScopedResourcesClient.BeginDelete` return value(s) have been changed from `(PrivateLinkScopedResourcesClientDeletePollerResponse, error)` to `(*armruntime.Poller[PrivateLinkScopedResourcesClientDeleteResponse], error)` -- Function `*DataCollectionEndpointsClient.ListBySubscription` return value(s) have been changed from `(*DataCollectionEndpointsClientListBySubscriptionPager)` to `(*runtime.Pager[DataCollectionEndpointsClientListBySubscriptionResponse])` -- Function `NewVMInsightsClient` return value(s) have been changed from `(*VMInsightsClient)` to `(*VMInsightsClient, error)` -- Function `*MetricNamespacesClient.List` parameter(s) have been changed from `(context.Context, string, *MetricNamespacesClientListOptions)` to `(string, *MetricNamespacesClientListOptions)` -- Function `*MetricNamespacesClient.List` return value(s) have been changed from `(MetricNamespacesClientListResponse, error)` to `(*runtime.Pager[MetricNamespacesClientListResponse])` -- Function `*PrivateLinkScopesClient.ListByResourceGroup` return value(s) have been changed from `(*PrivateLinkScopesClientListByResourceGroupPager)` to `(*runtime.Pager[PrivateLinkScopesClientListByResourceGroupResponse])` -- Function `*TenantActivityLogsClient.List` return value(s) have been changed from `(*TenantActivityLogsClientListPager)` to `(*runtime.Pager[TenantActivityLogsClientListResponse])` -- Function `*ActionGroupsClient.BeginPostTestNotifications` return value(s) have been changed from `(ActionGroupsClientPostTestNotificationsPollerResponse, error)` to `(*armruntime.Poller[ActionGroupsClientPostTestNotificationsResponse], error)` -- Function `NewActionGroupsClient` return value(s) have been changed from `(*ActionGroupsClient)` to `(*ActionGroupsClient, error)` -- Function `*DataCollectionRulesClient.ListBySubscription` return value(s) have been changed from `(*DataCollectionRulesClientListBySubscriptionPager)` to `(*runtime.Pager[DataCollectionRulesClientListBySubscriptionResponse])` -- Function `*ActivityLogAlertsClient.ListBySubscriptionID` return value(s) have been changed from `(*ActivityLogAlertsClientListBySubscriptionIDPager)` to `(*runtime.Pager[ActivityLogAlertsClientListBySubscriptionIDResponse])` -- Function `*BaselinesClient.List` parameter(s) have been changed from `(context.Context, string, *BaselinesClientListOptions)` to `(string, *BaselinesClientListOptions)` -- Function `*BaselinesClient.List` return value(s) have been changed from `(BaselinesClientListResponse, error)` to `(*runtime.Pager[BaselinesClientListResponse])` -- Function `NewPrivateLinkResourcesClient` return value(s) have been changed from `(*PrivateLinkResourcesClient)` to `(*PrivateLinkResourcesClient, error)` -- Function `NewPrivateLinkScopeOperationStatusClient` return value(s) have been changed from `(*PrivateLinkScopeOperationStatusClient)` to `(*PrivateLinkScopeOperationStatusClient, error)` -- Function `*MetricAlertsClient.ListBySubscription` parameter(s) have been changed from `(context.Context, *MetricAlertsClientListBySubscriptionOptions)` to `(*MetricAlertsClientListBySubscriptionOptions)` -- Function `*MetricAlertsClient.ListBySubscription` return value(s) have been changed from `(MetricAlertsClientListBySubscriptionResponse, error)` to `(*runtime.Pager[MetricAlertsClientListBySubscriptionResponse])` -- Function `*LogProfilesClient.List` parameter(s) have been changed from `(context.Context, *LogProfilesClientListOptions)` to `(*LogProfilesClientListOptions)` -- Function `*LogProfilesClient.List` return value(s) have been changed from `(LogProfilesClientListResponse, error)` to `(*runtime.Pager[LogProfilesClientListResponse])` -- Function `*PrivateEndpointConnectionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)` -- Function `NewDataCollectionRulesClient` return value(s) have been changed from `(*DataCollectionRulesClient)` to `(*DataCollectionRulesClient, error)` -- Function `NewAutoscaleSettingsClient` return value(s) have been changed from `(*AutoscaleSettingsClient)` to `(*AutoscaleSettingsClient, error)` -- Function `*PrivateLinkScopesClient.List` return value(s) have been changed from `(*PrivateLinkScopesClientListPager)` to `(*runtime.Pager[PrivateLinkScopesClientListResponse])` -- Function `NewOperationsClient` return value(s) have been changed from `(*OperationsClient)` to `(*OperationsClient, error)` -- Function `*PrivateLinkScopedResourcesClient.ListByPrivateLinkScope` return value(s) have been changed from `(*PrivateLinkScopedResourcesClientListByPrivateLinkScopePager)` to `(*runtime.Pager[PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse])` -- Function `NewMetricAlertsStatusClient` return value(s) have been changed from `(*MetricAlertsStatusClient)` to `(*MetricAlertsStatusClient, error)` -- Function `NewPrivateEndpointConnectionsClient` return value(s) have been changed from `(*PrivateEndpointConnectionsClient)` to `(*PrivateEndpointConnectionsClient, error)` -- Function `*AlertRuleIncidentsClient.ListByAlertRule` parameter(s) have been changed from `(context.Context, string, string, *AlertRuleIncidentsClientListByAlertRuleOptions)` to `(string, string, *AlertRuleIncidentsClientListByAlertRuleOptions)` -- Function `*AlertRuleIncidentsClient.ListByAlertRule` return value(s) have been changed from `(AlertRuleIncidentsClientListByAlertRuleResponse, error)` to `(*runtime.Pager[AlertRuleIncidentsClientListByAlertRuleResponse])` -- Function `*PrivateEndpointConnectionsClient.ListByPrivateLinkScope` return value(s) have been changed from `(*PrivateEndpointConnectionsClientListByPrivateLinkScopePager)` to `(*runtime.Pager[PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse])` -- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(PrivateEndpointConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` -- Function `NewTenantActivityLogsClient` return value(s) have been changed from `(*TenantActivityLogsClient)` to `(*TenantActivityLogsClient, error)` -- Function `NewDiagnosticSettingsCategoryClient` return value(s) have been changed from `(*DiagnosticSettingsCategoryClient)` to `(*DiagnosticSettingsCategoryClient, error)` -- Function `NewDataCollectionRuleAssociationsClient` return value(s) have been changed from `(*DataCollectionRuleAssociationsClient)` to `(*DataCollectionRuleAssociationsClient, error)` -- Function `*AutoscaleSettingsClient.ListByResourceGroup` return value(s) have been changed from `(*AutoscaleSettingsClientListByResourceGroupPager)` to `(*runtime.Pager[AutoscaleSettingsClientListByResourceGroupResponse])` -- Function `NewMetricsClient` return value(s) have been changed from `(*MetricsClient)` to `(*MetricsClient, error)` -- Function `*PrivateLinkResourcesClient.ListByPrivateLinkScope` return value(s) have been changed from `(*PrivateLinkResourcesClientListByPrivateLinkScopePager)` to `(*runtime.Pager[PrivateLinkResourcesClientListByPrivateLinkScopeResponse])` -- Function `NewActivityLogAlertsClient` return value(s) have been changed from `(*ActivityLogAlertsClient)` to `(*ActivityLogAlertsClient, error)` -- Function `*DataCollectionEndpointsClient.ListByResourceGroup` return value(s) have been changed from `(*DataCollectionEndpointsClientListByResourceGroupPager)` to `(*runtime.Pager[DataCollectionEndpointsClientListByResourceGroupResponse])` -- Type of `MetricAlertMultipleResourceMultipleMetricCriteria.AdditionalProperties` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `ExtensionDataSource.ExtensionSettings` has been changed from `map[string]interface{}` to `interface{}` -- Type of `MultiMetricCriteria.AdditionalProperties` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `DynamicMetricCriteria.AdditionalProperties` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `MetricAlertSingleResourceMultipleMetricCriteria.AdditionalProperties` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `MetricCriteria.AdditionalProperties` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `ErrorAdditionalInfo.Info` has been changed from `map[string]interface{}` to `interface{}` -- Type of `MetricAlertCriteria.AdditionalProperties` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `WebtestLocationAvailabilityCriteria.AdditionalProperties` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Function `*DataCollectionEndpointsClientListBySubscriptionPager.PageResponse` has been removed -- Function `*PrivateLinkScopedResourcesClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `MetricStatisticType.ToPtr` has been removed -- Function `*DataCollectionRuleAssociationsClientListByResourcePager.Err` has been removed -- Function `*ActivityLogAlertsClientListBySubscriptionIDPager.PageResponse` has been removed -- Function `*ActionGroupsClientPostTestNotificationsPoller.Done` has been removed -- Function `KnownPublicNetworkAccessOptions.ToPtr` has been removed -- Function `*PrivateLinkScopedResourcesClientCreateOrUpdatePoller.Done` has been removed -- Function `*PrivateLinkScopedResourcesClientDeletePoller.Poll` has been removed -- Function `*TenantActivityLogsClientListPager.NextPage` has been removed -- Function `*DataCollectionRuleAssociationsClientListByResourcePager.PageResponse` has been removed -- Function `*PrivateLinkScopedResourcesClientListByPrivateLinkScopePager.Err` has been removed -- Function `*PrivateLinkScopedResourcesClientDeletePollerResponse.Resume` has been removed -- Function `*DataCollectionRulesClientListByResourceGroupPager.NextPage` has been removed -- Function `*DataCollectionRulesClientListByResourceGroupPager.PageResponse` has been removed -- Function `CreatedByType.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.Done` has been removed -- Function `MetricClass.ToPtr` has been removed -- Function `*PrivateLinkResourcesClientListByPrivateLinkScopePager.PageResponse` has been removed -- Function `*DataCollectionEndpointsClientListByResourceGroupPager.NextPage` has been removed -- Function `Enabled.ToPtr` has been removed -- Function `*PrivateLinkResourcesClientListByPrivateLinkScopePager.NextPage` has been removed -- Function `*PrivateLinkScopedResourcesClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `DataStatus.ToPtr` has been removed -- Function `OnboardingStatus.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `TimeAggregationOperator.ToPtr` has been removed -- Function `AggregationType.ToPtr` has been removed -- Function `KnownDataFlowStreams.ToPtr` has been removed -- Function `ProvisioningState.ToPtr` has been removed -- Function `*ActionGroupsClientPostTestNotificationsPoller.Poll` has been removed -- Function `*PrivateEndpointConnectionsClientCreateOrUpdatePoller.Done` has been removed -- Function `*ActivityLogsClientListPager.PageResponse` has been removed -- Function `*AutoscaleSettingsClientListBySubscriptionPager.PageResponse` has been removed -- Function `*DataCollectionRuleAssociationsClientListByResourcePager.NextPage` has been removed -- Function `PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*DataCollectionRulesClientListBySubscriptionPager.PageResponse` has been removed -- Function `*ActivityLogAlertsClientListBySubscriptionIDPager.Err` has been removed -- Function `*PrivateLinkScopedResourcesClientListByPrivateLinkScopePager.PageResponse` has been removed -- Function `*DataCollectionEndpointsClientListBySubscriptionPager.Err` has been removed -- Function `KnownDataCollectionRuleProvisioningState.ToPtr` has been removed -- Function `AlertSeverity.ToPtr` has been removed -- Function `QueryType.ToPtr` has been removed -- Function `*PrivateLinkScopesClientDeletePoller.Poll` has been removed -- Function `ScaleRuleMetricDimensionOperationType.ToPtr` has been removed -- Function `CriterionType.ToPtr` has been removed -- Function `PrivateLinkScopedResourcesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*PrivateLinkScopesClientDeletePoller.FinalResponse` has been removed -- Function `*DataCollectionEndpointsClientListBySubscriptionPager.NextPage` has been removed -- Function `TimeAggregationType.ToPtr` has been removed -- Function `*PrivateLinkScopesClientListPager.NextPage` has been removed -- Function `*PrivateLinkScopedResourcesClientDeletePoller.FinalResponse` has been removed -- Function `*ActivityLogsClientListPager.Err` has been removed -- Function `*PrivateLinkScopesClientListByResourceGroupPager.NextPage` has been removed -- Function `ScaleDirection.ToPtr` has been removed -- Function `*AutoscaleSettingsClientListBySubscriptionPager.Err` has been removed -- Function `*TenantActivityLogsClientListPager.Err` has been removed -- Function `*DataCollectionRulesClientListBySubscriptionPager.Err` has been removed -- Function `MetricUnit.ToPtr` has been removed -- Function `*DataCollectionRulesClientListBySubscriptionPager.NextPage` has been removed -- Function `*AutoscaleSettingsClientListByResourceGroupPager.NextPage` has been removed -- Function `Operator.ToPtr` has been removed -- Function `KnownSyslogDataSourceStreams.ToPtr` has been removed -- Function `ConditionOperator.ToPtr` has been removed -- Function `KnownDataCollectionRuleAssociationProvisioningState.ToPtr` has been removed -- Function `*ActivityLogAlertsClientListByResourceGroupPager.Err` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePollerResponse.Resume` has been removed -- Function `*ActionGroupsClientPostTestNotificationsPoller.ResumeToken` has been removed -- Function `*DataCollectionRuleAssociationsClientListByRulePager.PageResponse` has been removed -- Function `PrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `RecurrenceFrequency.ToPtr` has been removed -- Function `*AutoscaleSettingsClientListByResourceGroupPager.Err` has been removed -- Function `DynamicThresholdSensitivity.ToPtr` has been removed -- Function `PrivateLinkScopesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*PrivateEndpointConnectionsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*PrivateLinkScopedResourcesClientListByPrivateLinkScopePager.NextPage` has been removed -- Function `*PrivateLinkScopedResourcesClientDeletePoller.Done` has been removed -- Function `ActionGroupsClientPostTestNotificationsPollerResponse.PollUntilDone` has been removed -- Function `KnownPerfCounterDataSourceStreams.ToPtr` has been removed -- Function `KnownExtensionDataSourceStreams.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientListByPrivateLinkScopePager.Err` has been removed -- Function `Odatatype.ToPtr` has been removed -- Function `*PrivateLinkScopesClientListPager.PageResponse` has been removed -- Function `PrivateLinkScopedResourcesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*PrivateLinkScopesClientListByResourceGroupPager.PageResponse` has been removed -- Function `*AutoscaleSettingsClientListBySubscriptionPager.NextPage` has been removed -- Function `*PrivateLinkScopesClientDeletePollerResponse.Resume` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.Poll` has been removed -- Function `*DataCollectionRuleAssociationsClientListByRulePager.Err` has been removed -- Function `CategoryType.ToPtr` has been removed -- Function `*DataCollectionRuleAssociationsClientListByRulePager.NextPage` has been removed -- Function `*ActivityLogsClientListPager.NextPage` has been removed -- Function `ConditionalOperator.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `ScaleType.ToPtr` has been removed -- Function `KnownDataCollectionEndpointProvisioningState.ToPtr` has been removed -- Function `DynamicThresholdOperator.ToPtr` has been removed -- Function `*ActivityLogAlertsClientListByResourceGroupPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsClientListByPrivateLinkScopePager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.FinalResponse` has been removed -- Function `*ActionGroupsClientPostTestNotificationsPollerResponse.Resume` has been removed -- Function `*PrivateLinkScopedResourcesClientCreateOrUpdatePoller.Poll` has been removed -- Function `*DataCollectionRulesClientListByResourceGroupPager.Err` has been removed -- Function `*AutoscaleSettingsClientListByResourceGroupPager.PageResponse` has been removed -- Function `EventLevel.ToPtr` has been removed -- Function `*ActivityLogAlertsClientListByResourceGroupPager.PageResponse` has been removed -- Function `*DataCollectionEndpointsClientListByResourceGroupPager.PageResponse` has been removed -- Function `NamespaceClassification.ToPtr` has been removed -- Function `MetricTriggerType.ToPtr` has been removed -- Function `ReceiverStatus.ToPtr` has been removed -- Function `*PrivateLinkScopesClientListPager.Err` has been removed -- Function `*ActivityLogAlertsClientListBySubscriptionIDPager.NextPage` has been removed -- Function `*TenantActivityLogsClientListPager.PageResponse` has been removed -- Function `*PrivateLinkScopesClientDeletePoller.Done` has been removed -- Function `*PrivateLinkScopesClientDeletePoller.ResumeToken` has been removed -- Function `KnownWindowsEventLogDataSourceStreams.ToPtr` has been removed -- Function `*DataCollectionEndpointsClientListByResourceGroupPager.Err` has been removed -- Function `*PrivateLinkScopesClientListByResourceGroupPager.Err` has been removed -- Function `BaselineSensitivity.ToPtr` has been removed -- Function `*PrivateLinkScopedResourcesClientDeletePoller.ResumeToken` has been removed -- Function `KnownDataCollectionRuleResourceKind.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ActionGroupsClientPostTestNotificationsPoller.FinalResponse` has been removed -- Function `*PrivateEndpointConnectionsClientListByPrivateLinkScopePager.PageResponse` has been removed -- Function `*PrivateLinkResourcesClientListByPrivateLinkScopePager.Err` has been removed -- Function `KnownDataCollectionEndpointResourceKind.ToPtr` has been removed -- Function `KnownSyslogDataSourceFacilityNames.ToPtr` has been removed -- Function `*PrivateLinkScopedResourcesClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `KnownSyslogDataSourceLogLevels.ToPtr` has been removed -- Function `ResultType.ToPtr` has been removed -- Function `ComparisonOperationType.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.ResumeToken` has been removed -- Function `AggregationTypeEnum.ToPtr` has been removed -- Struct `ActionGroupsClientCreateOrUpdateResult` has been removed -- Struct `ActionGroupsClientGetResult` has been removed -- Struct `ActionGroupsClientGetTestNotificationsResult` has been removed -- Struct `ActionGroupsClientListByResourceGroupResult` has been removed -- Struct `ActionGroupsClientListBySubscriptionIDResult` has been removed -- Struct `ActionGroupsClientPostTestNotificationsPoller` has been removed -- Struct `ActionGroupsClientPostTestNotificationsPollerResponse` has been removed -- Struct `ActionGroupsClientPostTestNotificationsResult` has been removed -- Struct `ActionGroupsClientUpdateResult` has been removed -- Struct `ActivityLogAlertsClientCreateOrUpdateResult` has been removed -- Struct `ActivityLogAlertsClientGetResult` has been removed -- Struct `ActivityLogAlertsClientListByResourceGroupPager` has been removed -- Struct `ActivityLogAlertsClientListByResourceGroupResult` has been removed -- Struct `ActivityLogAlertsClientListBySubscriptionIDPager` has been removed -- Struct `ActivityLogAlertsClientListBySubscriptionIDResult` has been removed -- Struct `ActivityLogAlertsClientUpdateResult` has been removed -- Struct `ActivityLogsClientListPager` has been removed -- Struct `ActivityLogsClientListResult` has been removed -- Struct `AlertRuleIncidentsClientGetResult` has been removed -- Struct `AlertRuleIncidentsClientListByAlertRuleResult` has been removed -- Struct `AlertRulesClientCreateOrUpdateResult` has been removed -- Struct `AlertRulesClientGetResult` has been removed -- Struct `AlertRulesClientListByResourceGroupResult` has been removed -- Struct `AlertRulesClientListBySubscriptionResult` has been removed -- Struct `AlertRulesClientUpdateResult` has been removed -- Struct `AutoscaleSettingsClientCreateOrUpdateResult` has been removed -- Struct `AutoscaleSettingsClientGetResult` has been removed -- Struct `AutoscaleSettingsClientListByResourceGroupPager` has been removed -- Struct `AutoscaleSettingsClientListByResourceGroupResult` has been removed -- Struct `AutoscaleSettingsClientListBySubscriptionPager` has been removed -- Struct `AutoscaleSettingsClientListBySubscriptionResult` has been removed -- Struct `AutoscaleSettingsClientUpdateResult` has been removed -- Struct `BaselinesClientListResult` has been removed -- Struct `DataCollectionEndpointsClientCreateResult` has been removed -- Struct `DataCollectionEndpointsClientGetResult` has been removed -- Struct `DataCollectionEndpointsClientListByResourceGroupPager` has been removed -- Struct `DataCollectionEndpointsClientListByResourceGroupResult` has been removed -- Struct `DataCollectionEndpointsClientListBySubscriptionPager` has been removed -- Struct `DataCollectionEndpointsClientListBySubscriptionResult` has been removed -- Struct `DataCollectionEndpointsClientUpdateResult` has been removed -- Struct `DataCollectionRuleAssociationsClientCreateResult` has been removed -- Struct `DataCollectionRuleAssociationsClientGetResult` has been removed -- Struct `DataCollectionRuleAssociationsClientListByResourcePager` has been removed -- Struct `DataCollectionRuleAssociationsClientListByResourceResult` has been removed -- Struct `DataCollectionRuleAssociationsClientListByRulePager` has been removed -- Struct `DataCollectionRuleAssociationsClientListByRuleResult` has been removed -- Struct `DataCollectionRulesClientCreateResult` has been removed -- Struct `DataCollectionRulesClientGetResult` has been removed -- Struct `DataCollectionRulesClientListByResourceGroupPager` has been removed -- Struct `DataCollectionRulesClientListByResourceGroupResult` has been removed -- Struct `DataCollectionRulesClientListBySubscriptionPager` has been removed -- Struct `DataCollectionRulesClientListBySubscriptionResult` has been removed -- Struct `DataCollectionRulesClientUpdateResult` has been removed -- Struct `DiagnosticSettingsCategoryClientGetResult` has been removed -- Struct `DiagnosticSettingsCategoryClientListResult` has been removed -- Struct `DiagnosticSettingsClientCreateOrUpdateResult` has been removed -- Struct `DiagnosticSettingsClientGetResult` has been removed -- Struct `DiagnosticSettingsClientListResult` has been removed -- Struct `EventCategoriesClientListResult` has been removed -- Struct `LogProfilesClientCreateOrUpdateResult` has been removed -- Struct `LogProfilesClientGetResult` has been removed -- Struct `LogProfilesClientListResult` has been removed -- Struct `LogProfilesClientUpdateResult` has been removed -- Struct `MetricAlertsClientCreateOrUpdateResult` has been removed -- Struct `MetricAlertsClientGetResult` has been removed -- Struct `MetricAlertsClientListByResourceGroupResult` has been removed -- Struct `MetricAlertsClientListBySubscriptionResult` has been removed -- Struct `MetricAlertsClientUpdateResult` has been removed -- Struct `MetricAlertsStatusClientListByNameResult` has been removed -- Struct `MetricAlertsStatusClientListResult` has been removed -- Struct `MetricDefinitionsClientListResult` has been removed -- Struct `MetricNamespacesClientListResult` has been removed -- Struct `MetricsClientListResult` has been removed -- Struct `OperationsClientListResult` has been removed -- Struct `PrivateEndpointConnectionsClientCreateOrUpdatePoller` has been removed -- Struct `PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse` has been removed -- Struct `PrivateEndpointConnectionsClientCreateOrUpdateResult` has been removed -- Struct `PrivateEndpointConnectionsClientDeletePoller` has been removed -- Struct `PrivateEndpointConnectionsClientDeletePollerResponse` has been removed -- Struct `PrivateEndpointConnectionsClientGetResult` has been removed -- Struct `PrivateEndpointConnectionsClientListByPrivateLinkScopePager` has been removed -- Struct `PrivateEndpointConnectionsClientListByPrivateLinkScopeResult` has been removed -- Struct `PrivateLinkResourcesClientGetResult` has been removed -- Struct `PrivateLinkResourcesClientListByPrivateLinkScopePager` has been removed -- Struct `PrivateLinkResourcesClientListByPrivateLinkScopeResult` has been removed -- Struct `PrivateLinkScopeOperationStatusClientGetResult` has been removed -- Struct `PrivateLinkScopedResourcesClientCreateOrUpdatePoller` has been removed -- Struct `PrivateLinkScopedResourcesClientCreateOrUpdatePollerResponse` has been removed -- Struct `PrivateLinkScopedResourcesClientCreateOrUpdateResult` has been removed -- Struct `PrivateLinkScopedResourcesClientDeletePoller` has been removed -- Struct `PrivateLinkScopedResourcesClientDeletePollerResponse` has been removed -- Struct `PrivateLinkScopedResourcesClientGetResult` has been removed -- Struct `PrivateLinkScopedResourcesClientListByPrivateLinkScopePager` has been removed -- Struct `PrivateLinkScopedResourcesClientListByPrivateLinkScopeResult` has been removed -- Struct `PrivateLinkScopesClientCreateOrUpdateResult` has been removed -- Struct `PrivateLinkScopesClientDeletePoller` has been removed -- Struct `PrivateLinkScopesClientDeletePollerResponse` has been removed -- Struct `PrivateLinkScopesClientGetResult` has been removed -- Struct `PrivateLinkScopesClientListByResourceGroupPager` has been removed -- Struct `PrivateLinkScopesClientListByResourceGroupResult` has been removed -- Struct `PrivateLinkScopesClientListPager` has been removed -- Struct `PrivateLinkScopesClientListResult` has been removed -- Struct `PrivateLinkScopesClientUpdateTagsResult` has been removed -- Struct `ScheduledQueryRulesClientCreateOrUpdateResult` has been removed -- Struct `ScheduledQueryRulesClientGetResult` has been removed -- Struct `ScheduledQueryRulesClientListByResourceGroupResult` has been removed -- Struct `ScheduledQueryRulesClientListBySubscriptionResult` has been removed -- Struct `ScheduledQueryRulesClientUpdateResult` has been removed -- Struct `TenantActivityLogsClientListPager` has been removed -- Struct `TenantActivityLogsClientListResult` has been removed -- Struct `VMInsightsClientGetOnboardingStatusResult` has been removed -- Field `ActionGroupsClientGetResult` of struct `ActionGroupsClientGetResponse` has been removed -- Field `RawResponse` of struct `ActionGroupsClientGetResponse` has been removed -- Field `AutoscaleSettingsClientListBySubscriptionResult` of struct `AutoscaleSettingsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `AutoscaleSettingsClientListBySubscriptionResponse` has been removed -- Field `PrivateLinkScopesClientUpdateTagsResult` of struct `PrivateLinkScopesClientUpdateTagsResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopesClientUpdateTagsResponse` has been removed -- Field `RawResponse` of struct `LogProfilesClientDeleteResponse` has been removed -- Field `DataCollectionRulesClientListBySubscriptionResult` of struct `DataCollectionRulesClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRulesClientListBySubscriptionResponse` has been removed -- Field `MetricAlertsStatusClientListResult` of struct `MetricAlertsStatusClientListResponse` has been removed -- Field `RawResponse` of struct `MetricAlertsStatusClientListResponse` has been removed -- Field `DataCollectionRuleAssociationsClientListByResourceResult` of struct `DataCollectionRuleAssociationsClientListByResourceResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRuleAssociationsClientListByResourceResponse` has been removed -- Field `PrivateLinkResourcesClientListByPrivateLinkScopeResult` of struct `PrivateLinkResourcesClientListByPrivateLinkScopeResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkResourcesClientListByPrivateLinkScopeResponse` has been removed -- Field `ScheduledQueryRulesClientCreateOrUpdateResult` of struct `ScheduledQueryRulesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ScheduledQueryRulesClientCreateOrUpdateResponse` has been removed -- Field `ActionGroupsClientListByResourceGroupResult` of struct `ActionGroupsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ActionGroupsClientListByResourceGroupResponse` has been removed -- Field `OperationsClientListResult` of struct `OperationsClientListResponse` has been removed -- Field `RawResponse` of struct `OperationsClientListResponse` has been removed -- Field `MetricNamespacesClientListResult` of struct `MetricNamespacesClientListResponse` has been removed -- Field `RawResponse` of struct `MetricNamespacesClientListResponse` has been removed -- Field `AutoscaleSettingsClientListByResourceGroupResult` of struct `AutoscaleSettingsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `AutoscaleSettingsClientListByResourceGroupResponse` has been removed -- Field `PrivateLinkResourcesClientGetResult` of struct `PrivateLinkResourcesClientGetResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkResourcesClientGetResponse` has been removed -- Field `PrivateLinkScopesClientListByResourceGroupResult` of struct `PrivateLinkScopesClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopesClientListByResourceGroupResponse` has been removed -- Field `DiagnosticSettingsClientListResult` of struct `DiagnosticSettingsClientListResponse` has been removed -- Field `RawResponse` of struct `DiagnosticSettingsClientListResponse` has been removed -- Field `AutoscaleSettingsClientGetResult` of struct `AutoscaleSettingsClientGetResponse` has been removed -- Field `RawResponse` of struct `AutoscaleSettingsClientGetResponse` has been removed -- Field `PrivateLinkScopeOperationStatusClientGetResult` of struct `PrivateLinkScopeOperationStatusClientGetResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopeOperationStatusClientGetResponse` has been removed -- Field `MetricAlertsClientUpdateResult` of struct `MetricAlertsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `MetricAlertsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ActionGroupsClientEnableReceiverResponse` has been removed -- Field `RawResponse` of struct `ActionGroupsClientDeleteResponse` has been removed -- Field `PrivateLinkScopedResourcesClientCreateOrUpdateResult` of struct `PrivateLinkScopedResourcesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopedResourcesClientCreateOrUpdateResponse` has been removed -- Field `MetricAlertsClientGetResult` of struct `MetricAlertsClientGetResponse` has been removed -- Field `RawResponse` of struct `MetricAlertsClientGetResponse` has been removed -- Field `ActivityLogsClientListResult` of struct `ActivityLogsClientListResponse` has been removed -- Field `RawResponse` of struct `ActivityLogsClientListResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopesClientDeleteResponse` has been removed -- Field `DataCollectionRulesClientCreateResult` of struct `DataCollectionRulesClientCreateResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRulesClientCreateResponse` has been removed -- Field `LogProfilesClientCreateOrUpdateResult` of struct `LogProfilesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `LogProfilesClientCreateOrUpdateResponse` has been removed -- Field `ScheduledQueryRulesClientListBySubscriptionResult` of struct `ScheduledQueryRulesClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `ScheduledQueryRulesClientListBySubscriptionResponse` has been removed -- Field `DiagnosticSettingsClientGetResult` of struct `DiagnosticSettingsClientGetResponse` has been removed -- Field `RawResponse` of struct `DiagnosticSettingsClientGetResponse` has been removed -- Field `PrivateLinkScopesClientGetResult` of struct `PrivateLinkScopesClientGetResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopesClientGetResponse` has been removed -- Field `LogProfilesClientUpdateResult` of struct `LogProfilesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `LogProfilesClientUpdateResponse` has been removed -- Field `DataCollectionEndpointsClientListByResourceGroupResult` of struct `DataCollectionEndpointsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `DataCollectionEndpointsClientListByResourceGroupResponse` has been removed -- Field `AlertRuleIncidentsClientListByAlertRuleResult` of struct `AlertRuleIncidentsClientListByAlertRuleResponse` has been removed -- Field `RawResponse` of struct `AlertRuleIncidentsClientListByAlertRuleResponse` has been removed -- Field `AlertRulesClientUpdateResult` of struct `AlertRulesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `AlertRulesClientUpdateResponse` has been removed -- Field `AlertRuleIncidentsClientGetResult` of struct `AlertRuleIncidentsClientGetResponse` has been removed -- Field `RawResponse` of struct `AlertRuleIncidentsClientGetResponse` has been removed -- Field `DataCollectionEndpointsClientGetResult` of struct `DataCollectionEndpointsClientGetResponse` has been removed -- Field `RawResponse` of struct `DataCollectionEndpointsClientGetResponse` has been removed -- Field `PrivateLinkScopedResourcesClientListByPrivateLinkScopeResult` of struct `PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse` has been removed -- Field `RawResponse` of struct `AlertRulesClientDeleteResponse` has been removed -- Field `TenantActivityLogsClientListResult` of struct `TenantActivityLogsClientListResponse` has been removed -- Field `RawResponse` of struct `TenantActivityLogsClientListResponse` has been removed -- Field `ActivityLogAlertsClientListBySubscriptionIDResult` of struct `ActivityLogAlertsClientListBySubscriptionIDResponse` has been removed -- Field `RawResponse` of struct `ActivityLogAlertsClientListBySubscriptionIDResponse` has been removed -- Field `AlertRulesClientGetResult` of struct `AlertRulesClientGetResponse` has been removed -- Field `RawResponse` of struct `AlertRulesClientGetResponse` has been removed -- Field `MetricsClientListResult` of struct `MetricsClientListResponse` has been removed -- Field `RawResponse` of struct `MetricsClientListResponse` has been removed -- Field `DataCollectionRulesClientGetResult` of struct `DataCollectionRulesClientGetResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRulesClientGetResponse` has been removed -- Field `DataCollectionRuleAssociationsClientCreateResult` of struct `DataCollectionRuleAssociationsClientCreateResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRuleAssociationsClientCreateResponse` has been removed -- Field `ActivityLogAlertsClientListByResourceGroupResult` of struct `ActivityLogAlertsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ActivityLogAlertsClientListByResourceGroupResponse` has been removed -- Field `PrivateEndpointConnectionsClientListByPrivateLinkScopeResult` of struct `PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse` has been removed -- Field `LogProfilesClientGetResult` of struct `LogProfilesClientGetResponse` has been removed -- Field `RawResponse` of struct `LogProfilesClientGetResponse` has been removed -- Field `ActivityLogAlertsClientCreateOrUpdateResult` of struct `ActivityLogAlertsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ActivityLogAlertsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `ActivityLogAlertsClientDeleteResponse` has been removed -- Field `DiagnosticSettingsClientCreateOrUpdateResult` of struct `DiagnosticSettingsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `DiagnosticSettingsClientCreateOrUpdateResponse` has been removed -- Field `DiagnosticSettingsCategoryClientListResult` of struct `DiagnosticSettingsCategoryClientListResponse` has been removed -- Field `RawResponse` of struct `DiagnosticSettingsCategoryClientListResponse` has been removed -- Field `DataCollectionEndpointsClientCreateResult` of struct `DataCollectionEndpointsClientCreateResponse` has been removed -- Field `RawResponse` of struct `DataCollectionEndpointsClientCreateResponse` has been removed -- Field `RawResponse` of struct `AutoscaleSettingsClientDeleteResponse` has been removed -- Field `ActivityLogAlertsClientGetResult` of struct `ActivityLogAlertsClientGetResponse` has been removed -- Field `RawResponse` of struct `ActivityLogAlertsClientGetResponse` has been removed -- Field `PrivateLinkScopesClientListResult` of struct `PrivateLinkScopesClientListResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopesClientListResponse` has been removed -- Field `ActionGroupsClientUpdateResult` of struct `ActionGroupsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ActionGroupsClientUpdateResponse` has been removed -- Field `ScheduledQueryRulesClientListByResourceGroupResult` of struct `ScheduledQueryRulesClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ScheduledQueryRulesClientListByResourceGroupResponse` has been removed -- Field `DataCollectionRulesClientUpdateResult` of struct `DataCollectionRulesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRulesClientUpdateResponse` has been removed -- Field `PrivateLinkScopesClientCreateOrUpdateResult` of struct `PrivateLinkScopesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `DataCollectionEndpointsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `DiagnosticSettingsClientDeleteResponse` has been removed -- Field `MetricAlertsClientListBySubscriptionResult` of struct `MetricAlertsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `MetricAlertsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRuleAssociationsClientDeleteResponse` has been removed -- Field `MetricAlertsStatusClientListByNameResult` of struct `MetricAlertsStatusClientListByNameResponse` has been removed -- Field `RawResponse` of struct `MetricAlertsStatusClientListByNameResponse` has been removed -- Field `ActionGroupsClientPostTestNotificationsResult` of struct `ActionGroupsClientPostTestNotificationsResponse` has been removed -- Field `RawResponse` of struct `ActionGroupsClientPostTestNotificationsResponse` has been removed -- Field `ActionGroupsClientListBySubscriptionIDResult` of struct `ActionGroupsClientListBySubscriptionIDResponse` has been removed -- Field `RawResponse` of struct `ActionGroupsClientListBySubscriptionIDResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRulesClientDeleteResponse` has been removed -- Field `PrivateLinkScopedResourcesClientGetResult` of struct `PrivateLinkScopedResourcesClientGetResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopedResourcesClientGetResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkScopedResourcesClientDeleteResponse` has been removed -- Field `AlertRulesClientCreateOrUpdateResult` of struct `AlertRulesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `AlertRulesClientCreateOrUpdateResponse` has been removed -- Field `DataCollectionEndpointsClientUpdateResult` of struct `DataCollectionEndpointsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `DataCollectionEndpointsClientUpdateResponse` has been removed -- Field `DataCollectionEndpointsClientListBySubscriptionResult` of struct `DataCollectionEndpointsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `DataCollectionEndpointsClientListBySubscriptionResponse` has been removed -- Field `ActivityLogAlertsClientUpdateResult` of struct `ActivityLogAlertsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ActivityLogAlertsClientUpdateResponse` has been removed -- Field `MetricAlertsClientCreateOrUpdateResult` of struct `MetricAlertsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `MetricAlertsClientCreateOrUpdateResponse` has been removed -- Field `DataCollectionRulesClientListByResourceGroupResult` of struct `DataCollectionRulesClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRulesClientListByResourceGroupResponse` has been removed -- Field `DataCollectionRuleAssociationsClientGetResult` of struct `DataCollectionRuleAssociationsClientGetResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRuleAssociationsClientGetResponse` has been removed -- Field `LogProfilesClientListResult` of struct `LogProfilesClientListResponse` has been removed -- Field `RawResponse` of struct `LogProfilesClientListResponse` has been removed -- Field `AutoscaleSettingsClientUpdateResult` of struct `AutoscaleSettingsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `AutoscaleSettingsClientUpdateResponse` has been removed -- Field `AutoscaleSettingsClientCreateOrUpdateResult` of struct `AutoscaleSettingsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `AutoscaleSettingsClientCreateOrUpdateResponse` has been removed -- Field `DiagnosticSettingsCategoryClientGetResult` of struct `DiagnosticSettingsCategoryClientGetResponse` has been removed -- Field `RawResponse` of struct `DiagnosticSettingsCategoryClientGetResponse` has been removed -- Field `PrivateEndpointConnectionsClientGetResult` of struct `PrivateEndpointConnectionsClientGetResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientGetResponse` has been removed -- Field `VMInsightsClientGetOnboardingStatusResult` of struct `VMInsightsClientGetOnboardingStatusResponse` has been removed -- Field `RawResponse` of struct `VMInsightsClientGetOnboardingStatusResponse` has been removed -- Field `ActionGroupsClientGetTestNotificationsResult` of struct `ActionGroupsClientGetTestNotificationsResponse` has been removed -- Field `RawResponse` of struct `ActionGroupsClientGetTestNotificationsResponse` has been removed -- Field `AlertRulesClientListBySubscriptionResult` of struct `AlertRulesClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `AlertRulesClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `MetricAlertsClientDeleteResponse` has been removed -- Field `ScheduledQueryRulesClientUpdateResult` of struct `ScheduledQueryRulesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ScheduledQueryRulesClientUpdateResponse` has been removed -- Field `MetricAlertsClientListByResourceGroupResult` of struct `MetricAlertsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `MetricAlertsClientListByResourceGroupResponse` has been removed -- Field `ActionGroupsClientCreateOrUpdateResult` of struct `ActionGroupsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ActionGroupsClientCreateOrUpdateResponse` has been removed -- Field `ScheduledQueryRulesClientGetResult` of struct `ScheduledQueryRulesClientGetResponse` has been removed -- Field `RawResponse` of struct `ScheduledQueryRulesClientGetResponse` has been removed -- Field `AlertRulesClientListByResourceGroupResult` of struct `AlertRulesClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `AlertRulesClientListByResourceGroupResponse` has been removed -- Field `PrivateEndpointConnectionsClientCreateOrUpdateResult` of struct `PrivateEndpointConnectionsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ScheduledQueryRulesClientDeleteResponse` has been removed -- Field `DataCollectionRuleAssociationsClientListByRuleResult` of struct `DataCollectionRuleAssociationsClientListByRuleResponse` has been removed -- Field `RawResponse` of struct `DataCollectionRuleAssociationsClientListByRuleResponse` has been removed -- Field `BaselinesClientListResult` of struct `BaselinesClientListResponse` has been removed -- Field `RawResponse` of struct `BaselinesClientListResponse` has been removed -- Field `EventCategoriesClientListResult` of struct `EventCategoriesClientListResponse` has been removed -- Field `RawResponse` of struct `EventCategoriesClientListResponse` has been removed -- Field `MetricDefinitionsClientListResult` of struct `MetricDefinitionsClientListResponse` has been removed -- Field `RawResponse` of struct `MetricDefinitionsClientListResponse` has been removed - -### Features Added - -- New const `KnownLogFileTextSettingsRecordStartTimestampFormatYyMMddHHMmSs` -- New const `KnownColumnDefinitionTypeDatetime` -- New const `KnownLogFilesDataSourceFormatText` -- New const `KnownLogFileTextSettingsRecordStartTimestampFormatMDYYYYHHMMSSAMPM` -- New const `KnownColumnDefinitionTypeString` -- New const `KnownColumnDefinitionTypeReal` -- New const `KnownLogFileTextSettingsRecordStartTimestampFormatMMMDHhMmSs` -- New const `KnownColumnDefinitionTypeLong` -- New const `KnownColumnDefinitionTypeBoolean` -- New const `KnownLogFileTextSettingsRecordStartTimestampFormatDdMMyyHHMmSs` -- New const `KnownLogFileTextSettingsRecordStartTimestampFormatYyyyMMDdTHHMmSsK` -- New const `KnownColumnDefinitionTypeDynamic` -- New const `KnownLogFileTextSettingsRecordStartTimestampFormatDdMMMYyyyHHMmSsZzz` -- New const `KnownLogFileTextSettingsRecordStartTimestampFormatMonDDYYYYHHMMSS` -- New const `KnownColumnDefinitionTypeInt` -- New const `KnownLogFileTextSettingsRecordStartTimestampFormatISO8601` -- New const `KnownLogFileTextSettingsRecordStartTimestampFormatYYYYMMDDHHMMSS` -- New function `StreamDeclaration.MarshalJSON() ([]byte, error)` -- New function `LogFilesDataSource.MarshalJSON() ([]byte, error)` -- New function `IisLogsDataSource.MarshalJSON() ([]byte, error)` -- New function `PossibleKnownLogFileTextSettingsRecordStartTimestampFormatValues() []KnownLogFileTextSettingsRecordStartTimestampFormat` -- New function `PossibleKnownColumnDefinitionTypeValues() []KnownColumnDefinitionType` -- New function `PossibleKnownLogFilesDataSourceFormatValues() []KnownLogFilesDataSourceFormat` -- New function `*DataCollectionRuleAssociationsClient.ListByDataCollectionEndpoint(string, string, *DataCollectionRuleAssociationsClientListByDataCollectionEndpointOptions) *runtime.Pager[DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse]` -- New struct `ColumnDefinition` -- New struct `DataCollectionRuleAssociationMetadata` -- New struct `DataCollectionRuleAssociationsClientListByDataCollectionEndpointOptions` -- New struct `DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse` -- New struct `DataCollectionRuleMetadata` -- New struct `IisLogsDataSource` -- New struct `LogFileSettings` -- New struct `LogFileSettingsText` -- New struct `LogFileTextSettings` -- New struct `LogFilesDataSource` -- New struct `LogFilesDataSourceSettings` -- New struct `Metadata` -- New struct `StreamDeclaration` -- New anonymous field `DataCollectionRuleAssociationProxyOnlyResource` in struct `DataCollectionRuleAssociationsClientCreateResponse` -- New anonymous field `LogSearchRuleResourceCollection` in struct `ScheduledQueryRulesClientListByResourceGroupResponse` -- New anonymous field `MetricAlertResourceCollection` in struct `MetricAlertsClientListBySubscriptionResponse` -- New field `ResumeToken` in struct `PrivateLinkScopedResourcesClientBeginCreateOrUpdateOptions` -- New anonymous field `ScopedResource` in struct `PrivateLinkScopedResourcesClientCreateOrUpdateResponse` -- New anonymous field `DataCollectionRuleResource` in struct `DataCollectionRulesClientGetResponse` -- New anonymous field `DiagnosticSettingsResource` in struct `DiagnosticSettingsClientGetResponse` -- New anonymous field `DataCollectionEndpointResource` in struct `DataCollectionEndpointsClientUpdateResponse` -- New anonymous field `PrivateEndpointConnection` in struct `PrivateEndpointConnectionsClientGetResponse` -- New anonymous field `ActivityLogAlertResource` in struct `ActivityLogAlertsClientUpdateResponse` -- New anonymous field `LogSearchRuleResource` in struct `ScheduledQueryRulesClientGetResponse` -- New anonymous field `AutoscaleSettingResource` in struct `AutoscaleSettingsClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `ActionGroupsClientBeginPostTestNotificationsOptions` -- New anonymous field `MetricDefinitionCollection` in struct `MetricDefinitionsClientListResponse` -- New anonymous field `AlertRuleResourceCollection` in struct `AlertRulesClientListByResourceGroupResponse` -- New anonymous field `EventDataCollection` in struct `ActivityLogsClientListResponse` -- New anonymous field `VMInsightsOnboardingStatus` in struct `VMInsightsClientGetOnboardingStatusResponse` -- New anonymous field `ScopedResourceListResult` in struct `PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse` -- New anonymous field `AlertRuleList` in struct `ActivityLogAlertsClientListBySubscriptionIDResponse` -- New field `ResumeToken` in struct `PrivateLinkScopesClientBeginDeleteOptions` -- New anonymous field `PrivateEndpointConnectionListResult` in struct `PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse` -- New anonymous field `DiagnosticSettingsCategoryResource` in struct `DiagnosticSettingsCategoryClientGetResponse` -- New anonymous field `EventCategoryCollection` in struct `EventCategoriesClientListResponse` -- New anonymous field `DataCollectionRuleResource` in struct `DataCollectionRulesClientCreateResponse` -- New anonymous field `AutoscaleSettingResource` in struct `AutoscaleSettingsClientGetResponse` -- New field `DataCollectionEndpointID` in struct `DataCollectionRule` -- New field `StreamDeclarations` in struct `DataCollectionRule` -- New field `Metadata` in struct `DataCollectionRule` -- New anonymous field `Response` in struct `MetricsClientListResponse` -- New anonymous field `AzureMonitorPrivateLinkScope` in struct `PrivateLinkScopesClientGetResponse` -- New anonymous field `ActionGroupList` in struct `ActionGroupsClientListByResourceGroupResponse` -- New anonymous field `ActionGroupResource` in struct `ActionGroupsClientUpdateResponse` -- New field `IisLogs` in struct `DataSourcesSpec` -- New field `LogFiles` in struct `DataSourcesSpec` -- New anonymous field `LogSearchRuleResourceCollection` in struct `ScheduledQueryRulesClientListBySubscriptionResponse` -- New field `LogFiles` in struct `DataCollectionRuleDataSources` -- New field `IisLogs` in struct `DataCollectionRuleDataSources` -- New anonymous field `AlertRuleResource` in struct `AlertRulesClientUpdateResponse` -- New anonymous field `AlertRuleResource` in struct `AlertRulesClientCreateOrUpdateResponse` -- New anonymous field `TestNotificationDetailsResponse` in struct `ActionGroupsClientGetTestNotificationsResponse` -- New anonymous field `AlertRuleResourceCollection` in struct `AlertRulesClientListBySubscriptionResponse` -- New field `ResumeToken` in struct `PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions` -- New anonymous field `Incident` in struct `AlertRuleIncidentsClientGetResponse` -- New anonymous field `AutoscaleSettingResource` in struct `AutoscaleSettingsClientUpdateResponse` -- New anonymous field `AzureMonitorPrivateLinkScopeListResult` in struct `PrivateLinkScopesClientListByResourceGroupResponse` -- New anonymous field `LogProfileResource` in struct `LogProfilesClientGetResponse` -- New anonymous field `LogProfileResource` in struct `LogProfilesClientUpdateResponse` -- New anonymous field `OperationStatus` in struct `PrivateLinkScopeOperationStatusClientGetResponse` -- New anonymous field `TestNotificationResponse` in struct `ActionGroupsClientPostTestNotificationsResponse` -- New anonymous field `DataCollectionRuleAssociationProxyOnlyResource` in struct `DataCollectionRuleAssociationsClientGetResponse` -- New anonymous field `DataCollectionRuleAssociationProxyOnlyResourceListResult` in struct `DataCollectionRuleAssociationsClientListByResourceResponse` -- New anonymous field `DataCollectionEndpointResourceListResult` in struct `DataCollectionEndpointsClientListBySubscriptionResponse` -- New anonymous field `MetricAlertResource` in struct `MetricAlertsClientGetResponse` -- New anonymous field `AutoscaleSettingResourceCollection` in struct `AutoscaleSettingsClientListBySubscriptionResponse` -- New anonymous field `LogSearchRuleResource` in struct `ScheduledQueryRulesClientCreateOrUpdateResponse` -- New anonymous field `ActivityLogAlertResource` in struct `ActivityLogAlertsClientCreateOrUpdateResponse` -- New anonymous field `MetricAlertStatusCollection` in struct `MetricAlertsStatusClientListResponse` -- New anonymous field `ActionGroupList` in struct `ActionGroupsClientListBySubscriptionIDResponse` -- New anonymous field `AutoscaleSettingResourceCollection` in struct `AutoscaleSettingsClientListByResourceGroupResponse` -- New anonymous field `DataCollectionEndpointResourceListResult` in struct `DataCollectionEndpointsClientListByResourceGroupResponse` -- New anonymous field `EventDataCollection` in struct `TenantActivityLogsClientListResponse` -- New anonymous field `ScopedResource` in struct `PrivateLinkScopedResourcesClientGetResponse` -- New anonymous field `OperationListResult` in struct `OperationsClientListResponse` -- New anonymous field `IncidentListResult` in struct `AlertRuleIncidentsClientListByAlertRuleResponse` -- New anonymous field `MetricAlertStatusCollection` in struct `MetricAlertsStatusClientListByNameResponse` -- New anonymous field `DiagnosticSettingsResourceCollection` in struct `DiagnosticSettingsClientListResponse` -- New anonymous field `DataCollectionRuleResource` in struct `DataCollectionRulesClientUpdateResponse` -- New anonymous field `DataCollectionRuleResourceListResult` in struct `DataCollectionRulesClientListBySubscriptionResponse` -- New anonymous field `AlertRuleResource` in struct `AlertRulesClientGetResponse` -- New anonymous field `AlertRuleList` in struct `ActivityLogAlertsClientListByResourceGroupResponse` -- New anonymous field `ActionGroupResource` in struct `ActionGroupsClientGetResponse` -- New field `ResumeToken` in struct `PrivateEndpointConnectionsClientBeginDeleteOptions` -- New field `ResumeToken` in struct `PrivateLinkScopedResourcesClientBeginDeleteOptions` -- New anonymous field `DataCollectionEndpointResource` in struct `DataCollectionEndpointsClientGetResponse` -- New anonymous field `DiagnosticSettingsResource` in struct `DiagnosticSettingsClientCreateOrUpdateResponse` -- New anonymous field `ActionGroupResource` in struct `ActionGroupsClientCreateOrUpdateResponse` -- New anonymous field `DiagnosticSettingsCategoryResourceCollection` in struct `DiagnosticSettingsCategoryClientListResponse` -- New anonymous field `ActivityLogAlertResource` in struct `ActivityLogAlertsClientGetResponse` -- New anonymous field `LogProfileCollection` in struct `LogProfilesClientListResponse` -- New anonymous field `PrivateEndpointConnection` in struct `PrivateEndpointConnectionsClientCreateOrUpdateResponse` -- New anonymous field `MetricAlertResource` in struct `MetricAlertsClientCreateOrUpdateResponse` -- New anonymous field `MetricAlertResource` in struct `MetricAlertsClientUpdateResponse` -- New field `OutputStream` in struct `DataFlow` -- New field `TransformKql` in struct `DataFlow` -- New anonymous field `AzureMonitorPrivateLinkScope` in struct `PrivateLinkScopesClientCreateOrUpdateResponse` -- New anonymous field `AzureMonitorPrivateLinkScope` in struct `PrivateLinkScopesClientUpdateTagsResponse` -- New field `Metadata` in struct `DataCollectionRuleAssociationProxyOnlyResourceProperties` -- New anonymous field `DataCollectionEndpointResource` in struct `DataCollectionEndpointsClientCreateResponse` -- New anonymous field `MetricBaselinesResponse` in struct `BaselinesClientListResponse` -- New anonymous field `MetricAlertResourceCollection` in struct `MetricAlertsClientListByResourceGroupResponse` -- New anonymous field `LogProfileResource` in struct `LogProfilesClientCreateOrUpdateResponse` -- New anonymous field `PrivateLinkResourceListResult` in struct `PrivateLinkResourcesClientListByPrivateLinkScopeResponse` -- New field `DataCollectionEndpointID` in struct `DataCollectionRuleResourceProperties` -- New field `StreamDeclarations` in struct `DataCollectionRuleResourceProperties` -- New field `Metadata` in struct `DataCollectionRuleResourceProperties` -- New anonymous field `DataCollectionRuleResourceListResult` in struct `DataCollectionRulesClientListByResourceGroupResponse` -- New anonymous field `DataCollectionRuleAssociationProxyOnlyResourceListResult` in struct `DataCollectionRuleAssociationsClientListByRuleResponse` -- New anonymous field `AzureMonitorPrivateLinkScopeListResult` in struct `PrivateLinkScopesClientListResponse` -- New anonymous field `MetricNamespaceCollection` in struct `MetricNamespacesClientListResponse` -- New anonymous field `PrivateLinkResource` in struct `PrivateLinkResourcesClientGetResponse` -- New anonymous field `LogSearchRuleResource` in struct `ScheduledQueryRulesClientUpdateResponse` -- New field `Metadata` in struct `DataCollectionRuleAssociation` - - -## 0.4.1 (2022-02-22) - -### Other Changes - -- Remove the go_mod_tidy_hack.go file. - -## 0.4.0 (2022-01-13) -### Breaking Changes - -- Function `*ScheduledQueryRulesClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *ScheduledQueryRulesDeleteOptions)` to `(context.Context, string, string, *ScheduledQueryRulesClientDeleteOptions)` -- Function `*ScheduledQueryRulesClient.Delete` return value(s) have been changed from `(ScheduledQueryRulesDeleteResponse, error)` to `(ScheduledQueryRulesClientDeleteResponse, error)` -- Function `*ActionGroupsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, ActionGroupResource, *ActionGroupsCreateOrUpdateOptions)` to `(context.Context, string, string, ActionGroupResource, *ActionGroupsClientCreateOrUpdateOptions)` -- Function `*ActionGroupsClient.CreateOrUpdate` return value(s) have been changed from `(ActionGroupsCreateOrUpdateResponse, error)` to `(ActionGroupsClientCreateOrUpdateResponse, error)` -- Function `*EventCategoriesClient.List` parameter(s) have been changed from `(context.Context, *EventCategoriesListOptions)` to `(context.Context, *EventCategoriesClientListOptions)` -- Function `*EventCategoriesClient.List` return value(s) have been changed from `(EventCategoriesListResponse, error)` to `(EventCategoriesClientListResponse, error)` -- Function `*BaselinesClient.List` parameter(s) have been changed from `(context.Context, string, *BaselinesListOptions)` to `(context.Context, string, *BaselinesClientListOptions)` -- Function `*BaselinesClient.List` return value(s) have been changed from `(BaselinesListResponse, error)` to `(BaselinesClientListResponse, error)` -- Function `*DataCollectionRulesClient.ListByResourceGroup` parameter(s) have been changed from `(string, *DataCollectionRulesListByResourceGroupOptions)` to `(string, *DataCollectionRulesClientListByResourceGroupOptions)` -- Function `*DataCollectionRulesClient.ListByResourceGroup` return value(s) have been changed from `(*DataCollectionRulesListByResourceGroupPager)` to `(*DataCollectionRulesClientListByResourceGroupPager)` -- Function `*ActionGroupsClient.Update` parameter(s) have been changed from `(context.Context, string, string, ActionGroupPatchBody, *ActionGroupsUpdateOptions)` to `(context.Context, string, string, ActionGroupPatchBody, *ActionGroupsClientUpdateOptions)` -- Function `*ActionGroupsClient.Update` return value(s) have been changed from `(ActionGroupsUpdateResponse, error)` to `(ActionGroupsClientUpdateResponse, error)` -- Function `*AlertRulesClient.Get` parameter(s) have been changed from `(context.Context, string, string, *AlertRulesGetOptions)` to `(context.Context, string, string, *AlertRulesClientGetOptions)` -- Function `*AlertRulesClient.Get` return value(s) have been changed from `(AlertRulesGetResponse, error)` to `(AlertRulesClientGetResponse, error)` -- Function `*LogProfilesClient.Get` parameter(s) have been changed from `(context.Context, string, *LogProfilesGetOptions)` to `(context.Context, string, *LogProfilesClientGetOptions)` -- Function `*LogProfilesClient.Get` return value(s) have been changed from `(LogProfilesGetResponse, error)` to `(LogProfilesClientGetResponse, error)` -- Function `*MetricAlertsClient.Update` parameter(s) have been changed from `(context.Context, string, string, MetricAlertResourcePatch, *MetricAlertsUpdateOptions)` to `(context.Context, string, string, MetricAlertResourcePatch, *MetricAlertsClientUpdateOptions)` -- Function `*MetricAlertsClient.Update` return value(s) have been changed from `(MetricAlertsUpdateResponse, error)` to `(MetricAlertsClientUpdateResponse, error)` -- Function `*AutoscaleSettingsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *AutoscaleSettingsListByResourceGroupOptions)` to `(string, *AutoscaleSettingsClientListByResourceGroupOptions)` -- Function `*AutoscaleSettingsClient.ListByResourceGroup` return value(s) have been changed from `(*AutoscaleSettingsListByResourceGroupPager)` to `(*AutoscaleSettingsClientListByResourceGroupPager)` -- Function `*MetricAlertsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, MetricAlertResource, *MetricAlertsCreateOrUpdateOptions)` to `(context.Context, string, string, MetricAlertResource, *MetricAlertsClientCreateOrUpdateOptions)` -- Function `*MetricAlertsClient.CreateOrUpdate` return value(s) have been changed from `(MetricAlertsCreateOrUpdateResponse, error)` to `(MetricAlertsClientCreateOrUpdateResponse, error)` -- Function `*DataCollectionRulesClient.ListBySubscription` parameter(s) have been changed from `(*DataCollectionRulesListBySubscriptionOptions)` to `(*DataCollectionRulesClientListBySubscriptionOptions)` -- Function `*DataCollectionRulesClient.ListBySubscription` return value(s) have been changed from `(*DataCollectionRulesListBySubscriptionPager)` to `(*DataCollectionRulesClientListBySubscriptionPager)` -- Function `*ScheduledQueryRulesClient.ListByResourceGroup` parameter(s) have been changed from `(context.Context, string, *ScheduledQueryRulesListByResourceGroupOptions)` to `(context.Context, string, *ScheduledQueryRulesClientListByResourceGroupOptions)` -- Function `*ScheduledQueryRulesClient.ListByResourceGroup` return value(s) have been changed from `(ScheduledQueryRulesListByResourceGroupResponse, error)` to `(ScheduledQueryRulesClientListByResourceGroupResponse, error)` -- Function `*PrivateLinkScopedResourcesClient.ListByPrivateLinkScope` parameter(s) have been changed from `(string, string, *PrivateLinkScopedResourcesListByPrivateLinkScopeOptions)` to `(string, string, *PrivateLinkScopedResourcesClientListByPrivateLinkScopeOptions)` -- Function `*PrivateLinkScopedResourcesClient.ListByPrivateLinkScope` return value(s) have been changed from `(*PrivateLinkScopedResourcesListByPrivateLinkScopePager)` to `(*PrivateLinkScopedResourcesClientListByPrivateLinkScopePager)` -- Function `*PrivateLinkResourcesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateLinkResourcesGetOptions)` to `(context.Context, string, string, string, *PrivateLinkResourcesClientGetOptions)` -- Function `*PrivateLinkResourcesClient.Get` return value(s) have been changed from `(PrivateLinkResourcesGetResponse, error)` to `(PrivateLinkResourcesClientGetResponse, error)` -- Function `*AlertRuleIncidentsClient.ListByAlertRule` parameter(s) have been changed from `(context.Context, string, string, *AlertRuleIncidentsListByAlertRuleOptions)` to `(context.Context, string, string, *AlertRuleIncidentsClientListByAlertRuleOptions)` -- Function `*AlertRuleIncidentsClient.ListByAlertRule` return value(s) have been changed from `(AlertRuleIncidentsListByAlertRuleResponse, error)` to `(AlertRuleIncidentsClientListByAlertRuleResponse, error)` -- Function `*ActionGroupsClient.ListBySubscriptionID` parameter(s) have been changed from `(context.Context, *ActionGroupsListBySubscriptionIDOptions)` to `(context.Context, *ActionGroupsClientListBySubscriptionIDOptions)` -- Function `*ActionGroupsClient.ListBySubscriptionID` return value(s) have been changed from `(ActionGroupsListBySubscriptionIDResponse, error)` to `(ActionGroupsClientListBySubscriptionIDResponse, error)` -- Function `*PrivateLinkScopeOperationStatusClient.Get` parameter(s) have been changed from `(context.Context, string, string, *PrivateLinkScopeOperationStatusGetOptions)` to `(context.Context, string, string, *PrivateLinkScopeOperationStatusClientGetOptions)` -- Function `*PrivateLinkScopeOperationStatusClient.Get` return value(s) have been changed from `(PrivateLinkScopeOperationStatusGetResponse, error)` to `(PrivateLinkScopeOperationStatusClientGetResponse, error)` -- Function `*ScheduledQueryRulesClient.ListBySubscription` parameter(s) have been changed from `(context.Context, *ScheduledQueryRulesListBySubscriptionOptions)` to `(context.Context, *ScheduledQueryRulesClientListBySubscriptionOptions)` -- Function `*ScheduledQueryRulesClient.ListBySubscription` return value(s) have been changed from `(ScheduledQueryRulesListBySubscriptionResponse, error)` to `(ScheduledQueryRulesClientListBySubscriptionResponse, error)` -- Function `*DataCollectionEndpointsClient.ListBySubscription` parameter(s) have been changed from `(*DataCollectionEndpointsListBySubscriptionOptions)` to `(*DataCollectionEndpointsClientListBySubscriptionOptions)` -- Function `*DataCollectionEndpointsClient.ListBySubscription` return value(s) have been changed from `(*DataCollectionEndpointsListBySubscriptionPager)` to `(*DataCollectionEndpointsClientListBySubscriptionPager)` -- Function `*ActionGroupsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *ActionGroupsDeleteOptions)` to `(context.Context, string, string, *ActionGroupsClientDeleteOptions)` -- Function `*ActionGroupsClient.Delete` return value(s) have been changed from `(ActionGroupsDeleteResponse, error)` to `(ActionGroupsClientDeleteResponse, error)` -- Function `*AlertRulesClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *AlertRulesDeleteOptions)` to `(context.Context, string, string, *AlertRulesClientDeleteOptions)` -- Function `*AlertRulesClient.Delete` return value(s) have been changed from `(AlertRulesDeleteResponse, error)` to `(AlertRulesClientDeleteResponse, error)` -- Function `*DiagnosticSettingsClient.List` parameter(s) have been changed from `(context.Context, string, *DiagnosticSettingsListOptions)` to `(context.Context, string, *DiagnosticSettingsClientListOptions)` -- Function `*DiagnosticSettingsClient.List` return value(s) have been changed from `(DiagnosticSettingsListResponse, error)` to `(DiagnosticSettingsClientListResponse, error)` -- Function `*ScheduledQueryRulesClient.Update` parameter(s) have been changed from `(context.Context, string, string, LogSearchRuleResourcePatch, *ScheduledQueryRulesUpdateOptions)` to `(context.Context, string, string, LogSearchRuleResourcePatch, *ScheduledQueryRulesClientUpdateOptions)` -- Function `*ScheduledQueryRulesClient.Update` return value(s) have been changed from `(ScheduledQueryRulesUpdateResponse, error)` to `(ScheduledQueryRulesClientUpdateResponse, error)` -- Function `*VMInsightsClient.GetOnboardingStatus` parameter(s) have been changed from `(context.Context, string, *VMInsightsGetOnboardingStatusOptions)` to `(context.Context, string, *VMInsightsClientGetOnboardingStatusOptions)` -- Function `*VMInsightsClient.GetOnboardingStatus` return value(s) have been changed from `(VMInsightsGetOnboardingStatusResponse, error)` to `(VMInsightsClientGetOnboardingStatusResponse, error)` -- Function `*ScheduledQueryRulesClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, LogSearchRuleResource, *ScheduledQueryRulesCreateOrUpdateOptions)` to `(context.Context, string, string, LogSearchRuleResource, *ScheduledQueryRulesClientCreateOrUpdateOptions)` -- Function `*ScheduledQueryRulesClient.CreateOrUpdate` return value(s) have been changed from `(ScheduledQueryRulesCreateOrUpdateResponse, error)` to `(ScheduledQueryRulesClientCreateOrUpdateResponse, error)` -- Function `*AlertRuleIncidentsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *AlertRuleIncidentsGetOptions)` to `(context.Context, string, string, string, *AlertRuleIncidentsClientGetOptions)` -- Function `*AlertRuleIncidentsClient.Get` return value(s) have been changed from `(AlertRuleIncidentsGetResponse, error)` to `(AlertRuleIncidentsClientGetResponse, error)` -- Function `*PrivateEndpointConnectionsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions)` -- Function `*PrivateEndpointConnectionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(PrivateEndpointConnectionsCreateOrUpdatePollerResponse, error)` to `(PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse, error)` -- Function `*DataCollectionRuleAssociationsClient.ListByRule` parameter(s) have been changed from `(string, string, *DataCollectionRuleAssociationsListByRuleOptions)` to `(string, string, *DataCollectionRuleAssociationsClientListByRuleOptions)` -- Function `*DataCollectionRuleAssociationsClient.ListByRule` return value(s) have been changed from `(*DataCollectionRuleAssociationsListByRulePager)` to `(*DataCollectionRuleAssociationsClientListByRulePager)` -- Function `*MetricAlertsStatusClient.List` parameter(s) have been changed from `(context.Context, string, string, *MetricAlertsStatusListOptions)` to `(context.Context, string, string, *MetricAlertsStatusClientListOptions)` -- Function `*MetricAlertsStatusClient.List` return value(s) have been changed from `(MetricAlertsStatusListResponse, error)` to `(MetricAlertsStatusClientListResponse, error)` -- Function `*PrivateLinkScopesClient.List` parameter(s) have been changed from `(*PrivateLinkScopesListOptions)` to `(*PrivateLinkScopesClientListOptions)` -- Function `*PrivateLinkScopesClient.List` return value(s) have been changed from `(*PrivateLinkScopesListPager)` to `(*PrivateLinkScopesClientListPager)` -- Function `*PrivateLinkResourcesClient.ListByPrivateLinkScope` parameter(s) have been changed from `(string, string, *PrivateLinkResourcesListByPrivateLinkScopeOptions)` to `(string, string, *PrivateLinkResourcesClientListByPrivateLinkScopeOptions)` -- Function `*PrivateLinkResourcesClient.ListByPrivateLinkScope` return value(s) have been changed from `(*PrivateLinkResourcesListByPrivateLinkScopePager)` to `(*PrivateLinkResourcesClientListByPrivateLinkScopePager)` -- Function `*MetricAlertsStatusClient.ListByName` parameter(s) have been changed from `(context.Context, string, string, string, *MetricAlertsStatusListByNameOptions)` to `(context.Context, string, string, string, *MetricAlertsStatusClientListByNameOptions)` -- Function `*MetricAlertsStatusClient.ListByName` return value(s) have been changed from `(MetricAlertsStatusListByNameResponse, error)` to `(MetricAlertsStatusClientListByNameResponse, error)` -- Function `*DataCollectionEndpointsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionEndpointsDeleteOptions)` to `(context.Context, string, string, *DataCollectionEndpointsClientDeleteOptions)` -- Function `*DataCollectionEndpointsClient.Delete` return value(s) have been changed from `(DataCollectionEndpointsDeleteResponse, error)` to `(DataCollectionEndpointsClientDeleteResponse, error)` -- Function `*AlertRulesClient.Update` parameter(s) have been changed from `(context.Context, string, string, AlertRuleResourcePatch, *AlertRulesUpdateOptions)` to `(context.Context, string, string, AlertRuleResourcePatch, *AlertRulesClientUpdateOptions)` -- Function `*AlertRulesClient.Update` return value(s) have been changed from `(AlertRulesUpdateResponse, error)` to `(AlertRulesClientUpdateResponse, error)` -- Function `*DataCollectionRulesClient.Create` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionRulesCreateOptions)` to `(context.Context, string, string, *DataCollectionRulesClientCreateOptions)` -- Function `*DataCollectionRulesClient.Create` return value(s) have been changed from `(DataCollectionRulesCreateResponse, error)` to `(DataCollectionRulesClientCreateResponse, error)` -- Function `*AutoscaleSettingsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *AutoscaleSettingsGetOptions)` to `(context.Context, string, string, *AutoscaleSettingsClientGetOptions)` -- Function `*AutoscaleSettingsClient.Get` return value(s) have been changed from `(AutoscaleSettingsGetResponse, error)` to `(AutoscaleSettingsClientGetResponse, error)` -- Function `*TenantActivityLogsClient.List` parameter(s) have been changed from `(*TenantActivityLogsListOptions)` to `(*TenantActivityLogsClientListOptions)` -- Function `*TenantActivityLogsClient.List` return value(s) have been changed from `(*TenantActivityLogsListPager)` to `(*TenantActivityLogsClientListPager)` -- Function `*ScheduledQueryRulesClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ScheduledQueryRulesGetOptions)` to `(context.Context, string, string, *ScheduledQueryRulesClientGetOptions)` -- Function `*ScheduledQueryRulesClient.Get` return value(s) have been changed from `(ScheduledQueryRulesGetResponse, error)` to `(ScheduledQueryRulesClientGetResponse, error)` -- Function `*DataCollectionRuleAssociationsClient.ListByResource` parameter(s) have been changed from `(string, *DataCollectionRuleAssociationsListByResourceOptions)` to `(string, *DataCollectionRuleAssociationsClientListByResourceOptions)` -- Function `*DataCollectionRuleAssociationsClient.ListByResource` return value(s) have been changed from `(*DataCollectionRuleAssociationsListByResourcePager)` to `(*DataCollectionRuleAssociationsClientListByResourcePager)` -- Function `*DataCollectionRulesClient.Update` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionRulesUpdateOptions)` to `(context.Context, string, string, *DataCollectionRulesClientUpdateOptions)` -- Function `*DataCollectionRulesClient.Update` return value(s) have been changed from `(DataCollectionRulesUpdateResponse, error)` to `(DataCollectionRulesClientUpdateResponse, error)` -- Function `*DataCollectionRuleAssociationsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionRuleAssociationsDeleteOptions)` to `(context.Context, string, string, *DataCollectionRuleAssociationsClientDeleteOptions)` -- Function `*DataCollectionRuleAssociationsClient.Delete` return value(s) have been changed from `(DataCollectionRuleAssociationsDeleteResponse, error)` to `(DataCollectionRuleAssociationsClientDeleteResponse, error)` -- Function `*PrivateLinkScopesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *PrivateLinkScopesBeginDeleteOptions)` to `(context.Context, string, string, *PrivateLinkScopesClientBeginDeleteOptions)` -- Function `*PrivateLinkScopesClient.BeginDelete` return value(s) have been changed from `(PrivateLinkScopesDeletePollerResponse, error)` to `(PrivateLinkScopesClientDeletePollerResponse, error)` -- Function `*MetricAlertsClient.ListByResourceGroup` parameter(s) have been changed from `(context.Context, string, *MetricAlertsListByResourceGroupOptions)` to `(context.Context, string, *MetricAlertsClientListByResourceGroupOptions)` -- Function `*MetricAlertsClient.ListByResourceGroup` return value(s) have been changed from `(MetricAlertsListByResourceGroupResponse, error)` to `(MetricAlertsClientListByResourceGroupResponse, error)` -- Function `*ActionGroupsClient.EnableReceiver` parameter(s) have been changed from `(context.Context, string, string, EnableRequest, *ActionGroupsEnableReceiverOptions)` to `(context.Context, string, string, EnableRequest, *ActionGroupsClientEnableReceiverOptions)` -- Function `*ActionGroupsClient.EnableReceiver` return value(s) have been changed from `(ActionGroupsEnableReceiverResponse, error)` to `(ActionGroupsClientEnableReceiverResponse, error)` -- Function `*PrivateEndpointConnectionsClient.ListByPrivateLinkScope` parameter(s) have been changed from `(string, string, *PrivateEndpointConnectionsListByPrivateLinkScopeOptions)` to `(string, string, *PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions)` -- Function `*PrivateEndpointConnectionsClient.ListByPrivateLinkScope` return value(s) have been changed from `(*PrivateEndpointConnectionsListByPrivateLinkScopePager)` to `(*PrivateEndpointConnectionsClientListByPrivateLinkScopePager)` -- Function `*ActivityLogAlertsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, ActivityLogAlertResource, *ActivityLogAlertsCreateOrUpdateOptions)` to `(context.Context, string, string, ActivityLogAlertResource, *ActivityLogAlertsClientCreateOrUpdateOptions)` -- Function `*ActivityLogAlertsClient.CreateOrUpdate` return value(s) have been changed from `(ActivityLogAlertsCreateOrUpdateResponse, error)` to `(ActivityLogAlertsClientCreateOrUpdateResponse, error)` -- Function `*ActivityLogAlertsClient.ListBySubscriptionID` parameter(s) have been changed from `(context.Context, *ActivityLogAlertsListBySubscriptionIDOptions)` to `(*ActivityLogAlertsClientListBySubscriptionIDOptions)` -- Function `*ActivityLogAlertsClient.ListBySubscriptionID` return value(s) have been changed from `(ActivityLogAlertsListBySubscriptionIDResponse, error)` to `(*ActivityLogAlertsClientListBySubscriptionIDPager)` -- Function `*DataCollectionEndpointsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *DataCollectionEndpointsListByResourceGroupOptions)` to `(string, *DataCollectionEndpointsClientListByResourceGroupOptions)` -- Function `*DataCollectionEndpointsClient.ListByResourceGroup` return value(s) have been changed from `(*DataCollectionEndpointsListByResourceGroupPager)` to `(*DataCollectionEndpointsClientListByResourceGroupPager)` -- Function `*PrivateLinkScopesClient.Get` parameter(s) have been changed from `(context.Context, string, string, *PrivateLinkScopesGetOptions)` to `(context.Context, string, string, *PrivateLinkScopesClientGetOptions)` -- Function `*PrivateLinkScopesClient.Get` return value(s) have been changed from `(PrivateLinkScopesGetResponse, error)` to `(PrivateLinkScopesClientGetResponse, error)` -- Function `*ActionGroupsClient.BeginPostTestNotifications` parameter(s) have been changed from `(context.Context, NotificationRequestBody, *ActionGroupsBeginPostTestNotificationsOptions)` to `(context.Context, NotificationRequestBody, *ActionGroupsClientBeginPostTestNotificationsOptions)` -- Function `*ActionGroupsClient.BeginPostTestNotifications` return value(s) have been changed from `(ActionGroupsPostTestNotificationsPollerResponse, error)` to `(ActionGroupsClientPostTestNotificationsPollerResponse, error)` -- Function `*ActionGroupsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ActionGroupsGetOptions)` to `(context.Context, string, string, *ActionGroupsClientGetOptions)` -- Function `*ActionGroupsClient.Get` return value(s) have been changed from `(ActionGroupsGetResponse, error)` to `(ActionGroupsClientGetResponse, error)` -- Function `*AutoscaleSettingsClient.Update` parameter(s) have been changed from `(context.Context, string, string, AutoscaleSettingResourcePatch, *AutoscaleSettingsUpdateOptions)` to `(context.Context, string, string, AutoscaleSettingResourcePatch, *AutoscaleSettingsClientUpdateOptions)` -- Function `*AutoscaleSettingsClient.Update` return value(s) have been changed from `(AutoscaleSettingsUpdateResponse, error)` to `(AutoscaleSettingsClientUpdateResponse, error)` -- Function `*DataCollectionEndpointsClient.Update` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionEndpointsUpdateOptions)` to `(context.Context, string, string, *DataCollectionEndpointsClientUpdateOptions)` -- Function `*DataCollectionEndpointsClient.Update` return value(s) have been changed from `(DataCollectionEndpointsUpdateResponse, error)` to `(DataCollectionEndpointsClientUpdateResponse, error)` -- Function `*MetricDefinitionsClient.List` parameter(s) have been changed from `(context.Context, string, *MetricDefinitionsListOptions)` to `(context.Context, string, *MetricDefinitionsClientListOptions)` -- Function `*MetricDefinitionsClient.List` return value(s) have been changed from `(MetricDefinitionsListResponse, error)` to `(MetricDefinitionsClientListResponse, error)` -- Function `*DataCollectionRulesClient.Get` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionRulesGetOptions)` to `(context.Context, string, string, *DataCollectionRulesClientGetOptions)` -- Function `*DataCollectionRulesClient.Get` return value(s) have been changed from `(DataCollectionRulesGetResponse, error)` to `(DataCollectionRulesClientGetResponse, error)` -- Function `*MetricAlertsClient.ListBySubscription` parameter(s) have been changed from `(context.Context, *MetricAlertsListBySubscriptionOptions)` to `(context.Context, *MetricAlertsClientListBySubscriptionOptions)` -- Function `*MetricAlertsClient.ListBySubscription` return value(s) have been changed from `(MetricAlertsListBySubscriptionResponse, error)` to `(MetricAlertsClientListBySubscriptionResponse, error)` -- Function `*LogProfilesClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, LogProfileResource, *LogProfilesCreateOrUpdateOptions)` to `(context.Context, string, LogProfileResource, *LogProfilesClientCreateOrUpdateOptions)` -- Function `*LogProfilesClient.CreateOrUpdate` return value(s) have been changed from `(LogProfilesCreateOrUpdateResponse, error)` to `(LogProfilesClientCreateOrUpdateResponse, error)` -- Function `*PrivateLinkScopedResourcesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateLinkScopedResourcesBeginDeleteOptions)` to `(context.Context, string, string, string, *PrivateLinkScopedResourcesClientBeginDeleteOptions)` -- Function `*PrivateLinkScopedResourcesClient.BeginDelete` return value(s) have been changed from `(PrivateLinkScopedResourcesDeletePollerResponse, error)` to `(PrivateLinkScopedResourcesClientDeletePollerResponse, error)` -- Function `*AutoscaleSettingsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, AutoscaleSettingResource, *AutoscaleSettingsCreateOrUpdateOptions)` to `(context.Context, string, string, AutoscaleSettingResource, *AutoscaleSettingsClientCreateOrUpdateOptions)` -- Function `*AutoscaleSettingsClient.CreateOrUpdate` return value(s) have been changed from `(AutoscaleSettingsCreateOrUpdateResponse, error)` to `(AutoscaleSettingsClientCreateOrUpdateResponse, error)` -- Function `*MetricNamespacesClient.List` parameter(s) have been changed from `(context.Context, string, *MetricNamespacesListOptions)` to `(context.Context, string, *MetricNamespacesClientListOptions)` -- Function `*MetricNamespacesClient.List` return value(s) have been changed from `(MetricNamespacesListResponse, error)` to `(MetricNamespacesClientListResponse, error)` -- Function `*MetricsClient.List` parameter(s) have been changed from `(context.Context, string, *MetricsListOptions)` to `(context.Context, string, *MetricsClientListOptions)` -- Function `*MetricsClient.List` return value(s) have been changed from `(MetricsListResponse, error)` to `(MetricsClientListResponse, error)` -- Function `*DataCollectionRulesClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionRulesDeleteOptions)` to `(context.Context, string, string, *DataCollectionRulesClientDeleteOptions)` -- Function `*DataCollectionRulesClient.Delete` return value(s) have been changed from `(DataCollectionRulesDeleteResponse, error)` to `(DataCollectionRulesClientDeleteResponse, error)` -- Function `*DiagnosticSettingsCategoryClient.List` parameter(s) have been changed from `(context.Context, string, *DiagnosticSettingsCategoryListOptions)` to `(context.Context, string, *DiagnosticSettingsCategoryClientListOptions)` -- Function `*DiagnosticSettingsCategoryClient.List` return value(s) have been changed from `(DiagnosticSettingsCategoryListResponse, error)` to `(DiagnosticSettingsCategoryClientListResponse, error)` -- Function `*DiagnosticSettingsCategoryClient.Get` parameter(s) have been changed from `(context.Context, string, string, *DiagnosticSettingsCategoryGetOptions)` to `(context.Context, string, string, *DiagnosticSettingsCategoryClientGetOptions)` -- Function `*DiagnosticSettingsCategoryClient.Get` return value(s) have been changed from `(DiagnosticSettingsCategoryGetResponse, error)` to `(DiagnosticSettingsCategoryClientGetResponse, error)` -- Function `*DataCollectionRuleAssociationsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionRuleAssociationsGetOptions)` to `(context.Context, string, string, *DataCollectionRuleAssociationsClientGetOptions)` -- Function `*DataCollectionRuleAssociationsClient.Get` return value(s) have been changed from `(DataCollectionRuleAssociationsGetResponse, error)` to `(DataCollectionRuleAssociationsClientGetResponse, error)` -- Function `*LogProfilesClient.Update` parameter(s) have been changed from `(context.Context, string, LogProfileResourcePatch, *LogProfilesUpdateOptions)` to `(context.Context, string, LogProfileResourcePatch, *LogProfilesClientUpdateOptions)` -- Function `*LogProfilesClient.Update` return value(s) have been changed from `(LogProfilesUpdateResponse, error)` to `(LogProfilesClientUpdateResponse, error)` -- Function `*DiagnosticSettingsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, DiagnosticSettingsResource, *DiagnosticSettingsCreateOrUpdateOptions)` to `(context.Context, string, string, DiagnosticSettingsResource, *DiagnosticSettingsClientCreateOrUpdateOptions)` -- Function `*DiagnosticSettingsClient.CreateOrUpdate` return value(s) have been changed from `(DiagnosticSettingsCreateOrUpdateResponse, error)` to `(DiagnosticSettingsClientCreateOrUpdateResponse, error)` -- Function `*DiagnosticSettingsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *DiagnosticSettingsGetOptions)` to `(context.Context, string, string, *DiagnosticSettingsClientGetOptions)` -- Function `*DiagnosticSettingsClient.Get` return value(s) have been changed from `(DiagnosticSettingsGetResponse, error)` to `(DiagnosticSettingsClientGetResponse, error)` -- Function `*AutoscaleSettingsClient.ListBySubscription` parameter(s) have been changed from `(*AutoscaleSettingsListBySubscriptionOptions)` to `(*AutoscaleSettingsClientListBySubscriptionOptions)` -- Function `*AutoscaleSettingsClient.ListBySubscription` return value(s) have been changed from `(*AutoscaleSettingsListBySubscriptionPager)` to `(*AutoscaleSettingsClientListBySubscriptionPager)` -- Function `*AutoscaleSettingsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *AutoscaleSettingsDeleteOptions)` to `(context.Context, string, string, *AutoscaleSettingsClientDeleteOptions)` -- Function `*AutoscaleSettingsClient.Delete` return value(s) have been changed from `(AutoscaleSettingsDeleteResponse, error)` to `(AutoscaleSettingsClientDeleteResponse, error)` -- Function `*ActivityLogAlertsClient.ListByResourceGroup` parameter(s) have been changed from `(context.Context, string, *ActivityLogAlertsListByResourceGroupOptions)` to `(string, *ActivityLogAlertsClientListByResourceGroupOptions)` -- Function `*ActivityLogAlertsClient.ListByResourceGroup` return value(s) have been changed from `(ActivityLogAlertsListByResourceGroupResponse, error)` to `(*ActivityLogAlertsClientListByResourceGroupPager)` -- Function `*LogProfilesClient.Delete` parameter(s) have been changed from `(context.Context, string, *LogProfilesDeleteOptions)` to `(context.Context, string, *LogProfilesClientDeleteOptions)` -- Function `*LogProfilesClient.Delete` return value(s) have been changed from `(LogProfilesDeleteResponse, error)` to `(LogProfilesClientDeleteResponse, error)` -- Function `*DataCollectionEndpointsClient.Create` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionEndpointsCreateOptions)` to `(context.Context, string, string, *DataCollectionEndpointsClientCreateOptions)` -- Function `*DataCollectionEndpointsClient.Create` return value(s) have been changed from `(DataCollectionEndpointsCreateResponse, error)` to `(DataCollectionEndpointsClientCreateResponse, error)` -- Function `*AlertRulesClient.ListByResourceGroup` parameter(s) have been changed from `(context.Context, string, *AlertRulesListByResourceGroupOptions)` to `(context.Context, string, *AlertRulesClientListByResourceGroupOptions)` -- Function `*AlertRulesClient.ListByResourceGroup` return value(s) have been changed from `(AlertRulesListByResourceGroupResponse, error)` to `(AlertRulesClientListByResourceGroupResponse, error)` -- Function `*ActivityLogAlertsClient.Update` parameter(s) have been changed from `(context.Context, string, string, ActivityLogAlertPatchBody, *ActivityLogAlertsUpdateOptions)` to `(context.Context, string, string, AlertRulePatchObject, *ActivityLogAlertsClientUpdateOptions)` -- Function `*ActivityLogAlertsClient.Update` return value(s) have been changed from `(ActivityLogAlertsUpdateResponse, error)` to `(ActivityLogAlertsClientUpdateResponse, error)` -- Function `*ActivityLogsClient.List` parameter(s) have been changed from `(string, *ActivityLogsListOptions)` to `(string, *ActivityLogsClientListOptions)` -- Function `*ActivityLogsClient.List` return value(s) have been changed from `(*ActivityLogsListPager)` to `(*ActivityLogsClientListPager)` -- Function `*PrivateLinkScopesClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, AzureMonitorPrivateLinkScope, *PrivateLinkScopesCreateOrUpdateOptions)` to `(context.Context, string, string, AzureMonitorPrivateLinkScope, *PrivateLinkScopesClientCreateOrUpdateOptions)` -- Function `*PrivateLinkScopesClient.CreateOrUpdate` return value(s) have been changed from `(PrivateLinkScopesCreateOrUpdateResponse, error)` to `(PrivateLinkScopesClientCreateOrUpdateResponse, error)` -- Function `*MetricAlertsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *MetricAlertsDeleteOptions)` to `(context.Context, string, string, *MetricAlertsClientDeleteOptions)` -- Function `*MetricAlertsClient.Delete` return value(s) have been changed from `(MetricAlertsDeleteResponse, error)` to `(MetricAlertsClientDeleteResponse, error)` -- Function `*AlertRulesClient.ListBySubscription` parameter(s) have been changed from `(context.Context, *AlertRulesListBySubscriptionOptions)` to `(context.Context, *AlertRulesClientListBySubscriptionOptions)` -- Function `*AlertRulesClient.ListBySubscription` return value(s) have been changed from `(AlertRulesListBySubscriptionResponse, error)` to `(AlertRulesClientListBySubscriptionResponse, error)` -- Function `*DiagnosticSettingsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *DiagnosticSettingsDeleteOptions)` to `(context.Context, string, string, *DiagnosticSettingsClientDeleteOptions)` -- Function `*DiagnosticSettingsClient.Delete` return value(s) have been changed from `(DiagnosticSettingsDeleteResponse, error)` to `(DiagnosticSettingsClientDeleteResponse, error)` -- Function `*DataCollectionRuleAssociationsClient.Create` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionRuleAssociationsCreateOptions)` to `(context.Context, string, string, *DataCollectionRuleAssociationsClientCreateOptions)` -- Function `*DataCollectionRuleAssociationsClient.Create` return value(s) have been changed from `(DataCollectionRuleAssociationsCreateResponse, error)` to `(DataCollectionRuleAssociationsClientCreateResponse, error)` -- Function `*AlertRulesClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, AlertRuleResource, *AlertRulesCreateOrUpdateOptions)` to `(context.Context, string, string, AlertRuleResource, *AlertRulesClientCreateOrUpdateOptions)` -- Function `*AlertRulesClient.CreateOrUpdate` return value(s) have been changed from `(AlertRulesCreateOrUpdateResponse, error)` to `(AlertRulesClientCreateOrUpdateResponse, error)` -- Function `*ActivityLogAlertsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *ActivityLogAlertsDeleteOptions)` to `(context.Context, string, string, *ActivityLogAlertsClientDeleteOptions)` -- Function `*ActivityLogAlertsClient.Delete` return value(s) have been changed from `(ActivityLogAlertsDeleteResponse, error)` to `(ActivityLogAlertsClientDeleteResponse, error)` -- Function `*LogProfilesClient.List` parameter(s) have been changed from `(context.Context, *LogProfilesListOptions)` to `(context.Context, *LogProfilesClientListOptions)` -- Function `*LogProfilesClient.List` return value(s) have been changed from `(LogProfilesListResponse, error)` to `(LogProfilesClientListResponse, error)` -- Function `*ActivityLogAlertsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ActivityLogAlertsGetOptions)` to `(context.Context, string, string, *ActivityLogAlertsClientGetOptions)` -- Function `*ActivityLogAlertsClient.Get` return value(s) have been changed from `(ActivityLogAlertsGetResponse, error)` to `(ActivityLogAlertsClientGetResponse, error)` -- Function `*ActionGroupsClient.ListByResourceGroup` parameter(s) have been changed from `(context.Context, string, *ActionGroupsListByResourceGroupOptions)` to `(context.Context, string, *ActionGroupsClientListByResourceGroupOptions)` -- Function `*ActionGroupsClient.ListByResourceGroup` return value(s) have been changed from `(ActionGroupsListByResourceGroupResponse, error)` to `(ActionGroupsClientListByResourceGroupResponse, error)` -- Function `*DataCollectionEndpointsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *DataCollectionEndpointsGetOptions)` to `(context.Context, string, string, *DataCollectionEndpointsClientGetOptions)` -- Function `*DataCollectionEndpointsClient.Get` return value(s) have been changed from `(DataCollectionEndpointsGetResponse, error)` to `(DataCollectionEndpointsClientGetResponse, error)` -- Function `*PrivateLinkScopedResourcesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateLinkScopedResourcesGetOptions)` to `(context.Context, string, string, string, *PrivateLinkScopedResourcesClientGetOptions)` -- Function `*PrivateLinkScopedResourcesClient.Get` return value(s) have been changed from `(PrivateLinkScopedResourcesGetResponse, error)` to `(PrivateLinkScopedResourcesClientGetResponse, error)` -- Function `*PrivateEndpointConnectionsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionsGetOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionsClientGetOptions)` -- Function `*PrivateEndpointConnectionsClient.Get` return value(s) have been changed from `(PrivateEndpointConnectionsGetResponse, error)` to `(PrivateEndpointConnectionsClientGetResponse, error)` -- Function `*PrivateLinkScopesClient.UpdateTags` parameter(s) have been changed from `(context.Context, string, string, TagsResource, *PrivateLinkScopesUpdateTagsOptions)` to `(context.Context, string, string, TagsResource, *PrivateLinkScopesClientUpdateTagsOptions)` -- Function `*PrivateLinkScopesClient.UpdateTags` return value(s) have been changed from `(PrivateLinkScopesUpdateTagsResponse, error)` to `(PrivateLinkScopesClientUpdateTagsResponse, error)` -- Function `*PrivateEndpointConnectionsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionsBeginDeleteOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionsClientBeginDeleteOptions)` -- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(PrivateEndpointConnectionsDeletePollerResponse, error)` to `(PrivateEndpointConnectionsClientDeletePollerResponse, error)` -- Function `*PrivateLinkScopesClient.ListByResourceGroup` parameter(s) have been changed from `(string, *PrivateLinkScopesListByResourceGroupOptions)` to `(string, *PrivateLinkScopesClientListByResourceGroupOptions)` -- Function `*PrivateLinkScopesClient.ListByResourceGroup` return value(s) have been changed from `(*PrivateLinkScopesListByResourceGroupPager)` to `(*PrivateLinkScopesClientListByResourceGroupPager)` -- Function `*PrivateLinkScopedResourcesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, ScopedResource, *PrivateLinkScopedResourcesBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, ScopedResource, *PrivateLinkScopedResourcesClientBeginCreateOrUpdateOptions)` -- Function `*PrivateLinkScopedResourcesClient.BeginCreateOrUpdate` return value(s) have been changed from `(PrivateLinkScopedResourcesCreateOrUpdatePollerResponse, error)` to `(PrivateLinkScopedResourcesClientCreateOrUpdatePollerResponse, error)` -- Function `*ActionGroupsClient.GetTestNotifications` parameter(s) have been changed from `(context.Context, string, *ActionGroupsGetTestNotificationsOptions)` to `(context.Context, string, *ActionGroupsClientGetTestNotificationsOptions)` -- Function `*ActionGroupsClient.GetTestNotifications` return value(s) have been changed from `(ActionGroupsGetTestNotificationsResponse, error)` to `(ActionGroupsClientGetTestNotificationsResponse, error)` -- Function `*MetricAlertsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *MetricAlertsGetOptions)` to `(context.Context, string, string, *MetricAlertsClientGetOptions)` -- Function `*MetricAlertsClient.Get` return value(s) have been changed from `(MetricAlertsGetResponse, error)` to `(MetricAlertsClientGetResponse, error)` -- Function `*OperationsClient.List` parameter(s) have been changed from `(context.Context, *OperationsListOptions)` to `(context.Context, *OperationsClientListOptions)` -- Function `*OperationsClient.List` return value(s) have been changed from `(OperationsListResponse, error)` to `(OperationsClientListResponse, error)` -- Type of `ActivityLogAlertResource.Properties` has been changed from `*ActivityLogAlert` to `*AlertRuleProperties` -- Function `*PrivateEndpointConnectionsDeletePoller.Done` has been removed -- Function `*PrivateEndpointConnectionsListByPrivateLinkScopePager.NextPage` has been removed -- Function `*PrivateLinkScopedResourcesCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*PrivateLinkScopesListPager.NextPage` has been removed -- Function `*PrivateLinkScopesDeletePollerResponse.Resume` has been removed -- Function `*DataCollectionEndpointsListByResourceGroupPager.Err` has been removed -- Function `*PrivateLinkScopesListPager.Err` has been removed -- Function `*ActivityLogsListPager.PageResponse` has been removed -- Function `*ActionGroupsPostTestNotificationsPoller.ResumeToken` has been removed -- Function `ActivityLogAlertPatchBody.MarshalJSON` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.ResumeToken` has been removed -- Function `ActivityLogAlertActionGroup.MarshalJSON` has been removed -- Function `PrivateEndpointConnectionsDeletePollerResponse.PollUntilDone` has been removed -- Function `PrivateLinkScopedResourcesDeletePollerResponse.PollUntilDone` has been removed -- Function `ErrorResponse.Error` has been removed -- Function `*DataCollectionRuleAssociationsListByResourcePager.PageResponse` has been removed -- Function `*DataCollectionEndpointsListBySubscriptionPager.Err` has been removed -- Function `*PrivateLinkScopedResourcesCreateOrUpdatePoller.Done` has been removed -- Function `*AutoscaleSettingsListByResourceGroupPager.PageResponse` has been removed -- Function `*Action.UnmarshalJSON` has been removed -- Function `*PrivateLinkResourcesListByPrivateLinkScopePager.Err` has been removed -- Function `*DataCollectionRuleAssociationsListByRulePager.PageResponse` has been removed -- Function `*DataCollectionRuleAssociationsListByRulePager.Err` has been removed -- Function `*TenantActivityLogsListPager.NextPage` has been removed -- Function `ActionGroupsPostTestNotificationsPollerResponse.PollUntilDone` has been removed -- Function `ActivityLogAlertAllOfCondition.MarshalJSON` has been removed -- Function `*PrivateLinkScopesListByResourceGroupPager.PageResponse` has been removed -- Function `*PrivateLinkScopedResourcesDeletePoller.Poll` has been removed -- Function `PrivateLinkScopedResourcesCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*PrivateLinkScopedResourcesCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*PrivateLinkScopesListByResourceGroupPager.Err` has been removed -- Function `*PrivateLinkScopedResourcesDeletePollerResponse.Resume` has been removed -- Function `*DataCollectionRulesListByResourceGroupPager.NextPage` has been removed -- Function `*PrivateLinkScopedResourcesListByPrivateLinkScopePager.Err` has been removed -- Function `*PrivateEndpointConnectionsCreateOrUpdatePoller.Poll` has been removed -- Function `*DataCollectionEndpointsListByResourceGroupPager.NextPage` has been removed -- Function `ErrorResponseCommonV2.Error` has been removed -- Function `PrivateLinkScopesDeletePollerResponse.PollUntilDone` has been removed -- Function `*AutoscaleSettingsListBySubscriptionPager.Err` has been removed -- Function `*DataCollectionEndpointsListBySubscriptionPager.NextPage` has been removed -- Function `*PrivateLinkScopedResourcesListByPrivateLinkScopePager.PageResponse` has been removed -- Function `*DataCollectionRulesListByResourceGroupPager.Err` has been removed -- Function `*PrivateLinkResourcesListByPrivateLinkScopePager.NextPage` has been removed -- Function `*PrivateLinkScopedResourcesCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*ActionGroupsPostTestNotificationsPollerResponse.Resume` has been removed -- Function `PrivateEndpointConnectionsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*AutoscaleSettingsListBySubscriptionPager.NextPage` has been removed -- Function `*PrivateLinkScopesListPager.PageResponse` has been removed -- Function `ActivityLogAlertList.MarshalJSON` has been removed -- Function `*ActionGroupsPostTestNotificationsPoller.Poll` has been removed -- Function `ErrorContract.Error` has been removed -- Function `*ActivityLogsListPager.Err` has been removed -- Function `*DataCollectionRulesListBySubscriptionPager.Err` has been removed -- Function `*PrivateLinkScopedResourcesDeletePoller.Done` has been removed -- Function `ResponseWithError.Error` has been removed -- Function `*AutoscaleSettingsListByResourceGroupPager.NextPage` has been removed -- Function `*DataCollectionEndpointsListByResourceGroupPager.PageResponse` has been removed -- Function `*DataCollectionRulesListByResourceGroupPager.PageResponse` has been removed -- Function `ActivityLogAlert.MarshalJSON` has been removed -- Function `*DataCollectionRulesListBySubscriptionPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*PrivateLinkScopesDeletePoller.ResumeToken` has been removed -- Function `*TenantActivityLogsListPager.PageResponse` has been removed -- Function `*PrivateLinkScopedResourcesDeletePoller.FinalResponse` has been removed -- Function `*AutoscaleSettingsListByResourceGroupPager.Err` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.FinalResponse` has been removed -- Function `*PrivateLinkScopesDeletePoller.Poll` has been removed -- Function `*AutoscaleSettingsListBySubscriptionPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionsCreateOrUpdatePoller.Done` has been removed -- Function `*PrivateLinkResourcesListByPrivateLinkScopePager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionsListByPrivateLinkScopePager.Err` has been removed -- Function `ActivityLogAlertActionList.MarshalJSON` has been removed -- Function `*DataCollectionRuleAssociationsListByResourcePager.Err` has been removed -- Function `*RuleDataSource.UnmarshalJSON` has been removed -- Function `*PrivateEndpointConnectionsDeletePollerResponse.Resume` has been removed -- Function `*ActivityLogsListPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsListByPrivateLinkScopePager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.Poll` has been removed -- Function `*PrivateLinkScopedResourcesCreateOrUpdatePoller.Poll` has been removed -- Function `*DataCollectionEndpointsListBySubscriptionPager.PageResponse` has been removed -- Function `*PrivateLinkScopedResourcesDeletePoller.ResumeToken` has been removed -- Function `*PrivateLinkScopesDeletePoller.Done` has been removed -- Function `*DataCollectionRuleAssociationsListByResourcePager.NextPage` has been removed -- Function `*PrivateLinkScopedResourcesListByPrivateLinkScopePager.NextPage` has been removed -- Function `*ActionGroupsPostTestNotificationsPoller.Done` has been removed -- Function `*RuleAction.UnmarshalJSON` has been removed -- Function `*TenantActivityLogsListPager.Err` has been removed -- Function `*PrivateEndpointConnectionsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*DataCollectionRuleAssociationsListByRulePager.NextPage` has been removed -- Function `*PrivateLinkScopesDeletePoller.FinalResponse` has been removed -- Function `*ActionGroupsPostTestNotificationsPoller.FinalResponse` has been removed -- Function `*PrivateLinkScopesListByResourceGroupPager.NextPage` has been removed -- Function `*DataCollectionRulesListBySubscriptionPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsCreateOrUpdatePoller.FinalResponse` has been removed -- Struct `ActionGroupsBeginPostTestNotificationsOptions` has been removed -- Struct `ActionGroupsCreateOrUpdateOptions` has been removed -- Struct `ActionGroupsCreateOrUpdateResponse` has been removed -- Struct `ActionGroupsCreateOrUpdateResult` has been removed -- Struct `ActionGroupsDeleteOptions` has been removed -- Struct `ActionGroupsDeleteResponse` has been removed -- Struct `ActionGroupsEnableReceiverOptions` has been removed -- Struct `ActionGroupsEnableReceiverResponse` has been removed -- Struct `ActionGroupsGetOptions` has been removed -- Struct `ActionGroupsGetResponse` has been removed -- Struct `ActionGroupsGetResult` has been removed -- Struct `ActionGroupsGetTestNotificationsOptions` has been removed -- Struct `ActionGroupsGetTestNotificationsResponse` has been removed -- Struct `ActionGroupsGetTestNotificationsResult` has been removed -- Struct `ActionGroupsListByResourceGroupOptions` has been removed -- Struct `ActionGroupsListByResourceGroupResponse` has been removed -- Struct `ActionGroupsListByResourceGroupResult` has been removed -- Struct `ActionGroupsListBySubscriptionIDOptions` has been removed -- Struct `ActionGroupsListBySubscriptionIDResponse` has been removed -- Struct `ActionGroupsListBySubscriptionIDResult` has been removed -- Struct `ActionGroupsPostTestNotificationsPoller` has been removed -- Struct `ActionGroupsPostTestNotificationsPollerResponse` has been removed -- Struct `ActionGroupsPostTestNotificationsResponse` has been removed -- Struct `ActionGroupsPostTestNotificationsResult` has been removed -- Struct `ActionGroupsUpdateOptions` has been removed -- Struct `ActionGroupsUpdateResponse` has been removed -- Struct `ActionGroupsUpdateResult` has been removed -- Struct `ActivityLogAlert` has been removed -- Struct `ActivityLogAlertActionGroup` has been removed -- Struct `ActivityLogAlertActionList` has been removed -- Struct `ActivityLogAlertAllOfCondition` has been removed -- Struct `ActivityLogAlertLeafCondition` has been removed -- Struct `ActivityLogAlertList` has been removed -- Struct `ActivityLogAlertPatch` has been removed -- Struct `ActivityLogAlertPatchBody` has been removed -- Struct `ActivityLogAlertsCreateOrUpdateOptions` has been removed -- Struct `ActivityLogAlertsCreateOrUpdateResponse` has been removed -- Struct `ActivityLogAlertsCreateOrUpdateResult` has been removed -- Struct `ActivityLogAlertsDeleteOptions` has been removed -- Struct `ActivityLogAlertsDeleteResponse` has been removed -- Struct `ActivityLogAlertsGetOptions` has been removed -- Struct `ActivityLogAlertsGetResponse` has been removed -- Struct `ActivityLogAlertsGetResult` has been removed -- Struct `ActivityLogAlertsListByResourceGroupOptions` has been removed -- Struct `ActivityLogAlertsListByResourceGroupResponse` has been removed -- Struct `ActivityLogAlertsListByResourceGroupResult` has been removed -- Struct `ActivityLogAlertsListBySubscriptionIDOptions` has been removed -- Struct `ActivityLogAlertsListBySubscriptionIDResponse` has been removed -- Struct `ActivityLogAlertsListBySubscriptionIDResult` has been removed -- Struct `ActivityLogAlertsUpdateOptions` has been removed -- Struct `ActivityLogAlertsUpdateResponse` has been removed -- Struct `ActivityLogAlertsUpdateResult` has been removed -- Struct `ActivityLogsListOptions` has been removed -- Struct `ActivityLogsListPager` has been removed -- Struct `ActivityLogsListResponse` has been removed -- Struct `ActivityLogsListResult` has been removed -- Struct `AlertRuleIncidentsGetOptions` has been removed -- Struct `AlertRuleIncidentsGetResponse` has been removed -- Struct `AlertRuleIncidentsGetResult` has been removed -- Struct `AlertRuleIncidentsListByAlertRuleOptions` has been removed -- Struct `AlertRuleIncidentsListByAlertRuleResponse` has been removed -- Struct `AlertRuleIncidentsListByAlertRuleResult` has been removed -- Struct `AlertRulesCreateOrUpdateOptions` has been removed -- Struct `AlertRulesCreateOrUpdateResponse` has been removed -- Struct `AlertRulesCreateOrUpdateResult` has been removed -- Struct `AlertRulesDeleteOptions` has been removed -- Struct `AlertRulesDeleteResponse` has been removed -- Struct `AlertRulesGetOptions` has been removed -- Struct `AlertRulesGetResponse` has been removed -- Struct `AlertRulesGetResult` has been removed -- Struct `AlertRulesListByResourceGroupOptions` has been removed -- Struct `AlertRulesListByResourceGroupResponse` has been removed -- Struct `AlertRulesListByResourceGroupResult` has been removed -- Struct `AlertRulesListBySubscriptionOptions` has been removed -- Struct `AlertRulesListBySubscriptionResponse` has been removed -- Struct `AlertRulesListBySubscriptionResult` has been removed -- Struct `AlertRulesUpdateOptions` has been removed -- Struct `AlertRulesUpdateResponse` has been removed -- Struct `AlertRulesUpdateResult` has been removed -- Struct `AutoscaleSettingsCreateOrUpdateOptions` has been removed -- Struct `AutoscaleSettingsCreateOrUpdateResponse` has been removed -- Struct `AutoscaleSettingsCreateOrUpdateResult` has been removed -- Struct `AutoscaleSettingsDeleteOptions` has been removed -- Struct `AutoscaleSettingsDeleteResponse` has been removed -- Struct `AutoscaleSettingsGetOptions` has been removed -- Struct `AutoscaleSettingsGetResponse` has been removed -- Struct `AutoscaleSettingsGetResult` has been removed -- Struct `AutoscaleSettingsListByResourceGroupOptions` has been removed -- Struct `AutoscaleSettingsListByResourceGroupPager` has been removed -- Struct `AutoscaleSettingsListByResourceGroupResponse` has been removed -- Struct `AutoscaleSettingsListByResourceGroupResult` has been removed -- Struct `AutoscaleSettingsListBySubscriptionOptions` has been removed -- Struct `AutoscaleSettingsListBySubscriptionPager` has been removed -- Struct `AutoscaleSettingsListBySubscriptionResponse` has been removed -- Struct `AutoscaleSettingsListBySubscriptionResult` has been removed -- Struct `AutoscaleSettingsUpdateOptions` has been removed -- Struct `AutoscaleSettingsUpdateResponse` has been removed -- Struct `AutoscaleSettingsUpdateResult` has been removed -- Struct `BaselinesListOptions` has been removed -- Struct `BaselinesListResponse` has been removed -- Struct `BaselinesListResult` has been removed -- Struct `DataCollectionEndpointsCreateOptions` has been removed -- Struct `DataCollectionEndpointsCreateResponse` has been removed -- Struct `DataCollectionEndpointsCreateResult` has been removed -- Struct `DataCollectionEndpointsDeleteOptions` has been removed -- Struct `DataCollectionEndpointsDeleteResponse` has been removed -- Struct `DataCollectionEndpointsGetOptions` has been removed -- Struct `DataCollectionEndpointsGetResponse` has been removed -- Struct `DataCollectionEndpointsGetResult` has been removed -- Struct `DataCollectionEndpointsListByResourceGroupOptions` has been removed -- Struct `DataCollectionEndpointsListByResourceGroupPager` has been removed -- Struct `DataCollectionEndpointsListByResourceGroupResponse` has been removed -- Struct `DataCollectionEndpointsListByResourceGroupResult` has been removed -- Struct `DataCollectionEndpointsListBySubscriptionOptions` has been removed -- Struct `DataCollectionEndpointsListBySubscriptionPager` has been removed -- Struct `DataCollectionEndpointsListBySubscriptionResponse` has been removed -- Struct `DataCollectionEndpointsListBySubscriptionResult` has been removed -- Struct `DataCollectionEndpointsUpdateOptions` has been removed -- Struct `DataCollectionEndpointsUpdateResponse` has been removed -- Struct `DataCollectionEndpointsUpdateResult` has been removed -- Struct `DataCollectionRuleAssociationsCreateOptions` has been removed -- Struct `DataCollectionRuleAssociationsCreateResponse` has been removed -- Struct `DataCollectionRuleAssociationsCreateResult` has been removed -- Struct `DataCollectionRuleAssociationsDeleteOptions` has been removed -- Struct `DataCollectionRuleAssociationsDeleteResponse` has been removed -- Struct `DataCollectionRuleAssociationsGetOptions` has been removed -- Struct `DataCollectionRuleAssociationsGetResponse` has been removed -- Struct `DataCollectionRuleAssociationsGetResult` has been removed -- Struct `DataCollectionRuleAssociationsListByResourceOptions` has been removed -- Struct `DataCollectionRuleAssociationsListByResourcePager` has been removed -- Struct `DataCollectionRuleAssociationsListByResourceResponse` has been removed -- Struct `DataCollectionRuleAssociationsListByResourceResult` has been removed -- Struct `DataCollectionRuleAssociationsListByRuleOptions` has been removed -- Struct `DataCollectionRuleAssociationsListByRulePager` has been removed -- Struct `DataCollectionRuleAssociationsListByRuleResponse` has been removed -- Struct `DataCollectionRuleAssociationsListByRuleResult` has been removed -- Struct `DataCollectionRulesCreateOptions` has been removed -- Struct `DataCollectionRulesCreateResponse` has been removed -- Struct `DataCollectionRulesCreateResult` has been removed -- Struct `DataCollectionRulesDeleteOptions` has been removed -- Struct `DataCollectionRulesDeleteResponse` has been removed -- Struct `DataCollectionRulesGetOptions` has been removed -- Struct `DataCollectionRulesGetResponse` has been removed -- Struct `DataCollectionRulesGetResult` has been removed -- Struct `DataCollectionRulesListByResourceGroupOptions` has been removed -- Struct `DataCollectionRulesListByResourceGroupPager` has been removed -- Struct `DataCollectionRulesListByResourceGroupResponse` has been removed -- Struct `DataCollectionRulesListByResourceGroupResult` has been removed -- Struct `DataCollectionRulesListBySubscriptionOptions` has been removed -- Struct `DataCollectionRulesListBySubscriptionPager` has been removed -- Struct `DataCollectionRulesListBySubscriptionResponse` has been removed -- Struct `DataCollectionRulesListBySubscriptionResult` has been removed -- Struct `DataCollectionRulesUpdateOptions` has been removed -- Struct `DataCollectionRulesUpdateResponse` has been removed -- Struct `DataCollectionRulesUpdateResult` has been removed -- Struct `DiagnosticSettingsCategoryGetOptions` has been removed -- Struct `DiagnosticSettingsCategoryGetResponse` has been removed -- Struct `DiagnosticSettingsCategoryGetResult` has been removed -- Struct `DiagnosticSettingsCategoryListOptions` has been removed -- Struct `DiagnosticSettingsCategoryListResponse` has been removed -- Struct `DiagnosticSettingsCategoryListResult` has been removed -- Struct `DiagnosticSettingsCreateOrUpdateOptions` has been removed -- Struct `DiagnosticSettingsCreateOrUpdateResponse` has been removed -- Struct `DiagnosticSettingsCreateOrUpdateResult` has been removed -- Struct `DiagnosticSettingsDeleteOptions` has been removed -- Struct `DiagnosticSettingsDeleteResponse` has been removed -- Struct `DiagnosticSettingsGetOptions` has been removed -- Struct `DiagnosticSettingsGetResponse` has been removed -- Struct `DiagnosticSettingsGetResult` has been removed -- Struct `DiagnosticSettingsListOptions` has been removed -- Struct `DiagnosticSettingsListResponse` has been removed -- Struct `DiagnosticSettingsListResult` has been removed -- Struct `EventCategoriesListOptions` has been removed -- Struct `EventCategoriesListResponse` has been removed -- Struct `EventCategoriesListResult` has been removed -- Struct `LogProfilesCreateOrUpdateOptions` has been removed -- Struct `LogProfilesCreateOrUpdateResponse` has been removed -- Struct `LogProfilesCreateOrUpdateResult` has been removed -- Struct `LogProfilesDeleteOptions` has been removed -- Struct `LogProfilesDeleteResponse` has been removed -- Struct `LogProfilesGetOptions` has been removed -- Struct `LogProfilesGetResponse` has been removed -- Struct `LogProfilesGetResult` has been removed -- Struct `LogProfilesListOptions` has been removed -- Struct `LogProfilesListResponse` has been removed -- Struct `LogProfilesListResult` has been removed -- Struct `LogProfilesUpdateOptions` has been removed -- Struct `LogProfilesUpdateResponse` has been removed -- Struct `LogProfilesUpdateResult` has been removed -- Struct `MetricAlertsCreateOrUpdateOptions` has been removed -- Struct `MetricAlertsCreateOrUpdateResponse` has been removed -- Struct `MetricAlertsCreateOrUpdateResult` has been removed -- Struct `MetricAlertsDeleteOptions` has been removed -- Struct `MetricAlertsDeleteResponse` has been removed -- Struct `MetricAlertsGetOptions` has been removed -- Struct `MetricAlertsGetResponse` has been removed -- Struct `MetricAlertsGetResult` has been removed -- Struct `MetricAlertsListByResourceGroupOptions` has been removed -- Struct `MetricAlertsListByResourceGroupResponse` has been removed -- Struct `MetricAlertsListByResourceGroupResult` has been removed -- Struct `MetricAlertsListBySubscriptionOptions` has been removed -- Struct `MetricAlertsListBySubscriptionResponse` has been removed -- Struct `MetricAlertsListBySubscriptionResult` has been removed -- Struct `MetricAlertsStatusListByNameOptions` has been removed -- Struct `MetricAlertsStatusListByNameResponse` has been removed -- Struct `MetricAlertsStatusListByNameResult` has been removed -- Struct `MetricAlertsStatusListOptions` has been removed -- Struct `MetricAlertsStatusListResponse` has been removed -- Struct `MetricAlertsStatusListResult` has been removed -- Struct `MetricAlertsUpdateOptions` has been removed -- Struct `MetricAlertsUpdateResponse` has been removed -- Struct `MetricAlertsUpdateResult` has been removed -- Struct `MetricDefinitionsListOptions` has been removed -- Struct `MetricDefinitionsListResponse` has been removed -- Struct `MetricDefinitionsListResult` has been removed -- Struct `MetricNamespacesListOptions` has been removed -- Struct `MetricNamespacesListResponse` has been removed -- Struct `MetricNamespacesListResult` has been removed -- Struct `MetricsListOptions` has been removed -- Struct `MetricsListResponse` has been removed -- Struct `MetricsListResult` has been removed -- Struct `OperationsListOptions` has been removed -- Struct `OperationsListResponse` has been removed -- Struct `OperationsListResult` has been removed -- Struct `PrivateEndpointConnectionsBeginCreateOrUpdateOptions` has been removed -- Struct `PrivateEndpointConnectionsBeginDeleteOptions` has been removed -- Struct `PrivateEndpointConnectionsCreateOrUpdatePoller` has been removed -- Struct `PrivateEndpointConnectionsCreateOrUpdatePollerResponse` has been removed -- Struct `PrivateEndpointConnectionsCreateOrUpdateResponse` has been removed -- Struct `PrivateEndpointConnectionsCreateOrUpdateResult` has been removed -- Struct `PrivateEndpointConnectionsDeletePoller` has been removed -- Struct `PrivateEndpointConnectionsDeletePollerResponse` has been removed -- Struct `PrivateEndpointConnectionsDeleteResponse` has been removed -- Struct `PrivateEndpointConnectionsGetOptions` has been removed -- Struct `PrivateEndpointConnectionsGetResponse` has been removed -- Struct `PrivateEndpointConnectionsGetResult` has been removed -- Struct `PrivateEndpointConnectionsListByPrivateLinkScopeOptions` has been removed -- Struct `PrivateEndpointConnectionsListByPrivateLinkScopePager` has been removed -- Struct `PrivateEndpointConnectionsListByPrivateLinkScopeResponse` has been removed -- Struct `PrivateEndpointConnectionsListByPrivateLinkScopeResult` has been removed -- Struct `PrivateLinkResourcesGetOptions` has been removed -- Struct `PrivateLinkResourcesGetResponse` has been removed -- Struct `PrivateLinkResourcesGetResult` has been removed -- Struct `PrivateLinkResourcesListByPrivateLinkScopeOptions` has been removed -- Struct `PrivateLinkResourcesListByPrivateLinkScopePager` has been removed -- Struct `PrivateLinkResourcesListByPrivateLinkScopeResponse` has been removed -- Struct `PrivateLinkResourcesListByPrivateLinkScopeResult` has been removed -- Struct `PrivateLinkScopeOperationStatusGetOptions` has been removed -- Struct `PrivateLinkScopeOperationStatusGetResponse` has been removed -- Struct `PrivateLinkScopeOperationStatusGetResult` has been removed -- Struct `PrivateLinkScopedResourcesBeginCreateOrUpdateOptions` has been removed -- Struct `PrivateLinkScopedResourcesBeginDeleteOptions` has been removed -- Struct `PrivateLinkScopedResourcesCreateOrUpdatePoller` has been removed -- Struct `PrivateLinkScopedResourcesCreateOrUpdatePollerResponse` has been removed -- Struct `PrivateLinkScopedResourcesCreateOrUpdateResponse` has been removed -- Struct `PrivateLinkScopedResourcesCreateOrUpdateResult` has been removed -- Struct `PrivateLinkScopedResourcesDeletePoller` has been removed -- Struct `PrivateLinkScopedResourcesDeletePollerResponse` has been removed -- Struct `PrivateLinkScopedResourcesDeleteResponse` has been removed -- Struct `PrivateLinkScopedResourcesGetOptions` has been removed -- Struct `PrivateLinkScopedResourcesGetResponse` has been removed -- Struct `PrivateLinkScopedResourcesGetResult` has been removed -- Struct `PrivateLinkScopedResourcesListByPrivateLinkScopeOptions` has been removed -- Struct `PrivateLinkScopedResourcesListByPrivateLinkScopePager` has been removed -- Struct `PrivateLinkScopedResourcesListByPrivateLinkScopeResponse` has been removed -- Struct `PrivateLinkScopedResourcesListByPrivateLinkScopeResult` has been removed -- Struct `PrivateLinkScopesBeginDeleteOptions` has been removed -- Struct `PrivateLinkScopesCreateOrUpdateOptions` has been removed -- Struct `PrivateLinkScopesCreateOrUpdateResponse` has been removed -- Struct `PrivateLinkScopesCreateOrUpdateResult` has been removed -- Struct `PrivateLinkScopesDeletePoller` has been removed -- Struct `PrivateLinkScopesDeletePollerResponse` has been removed -- Struct `PrivateLinkScopesDeleteResponse` has been removed -- Struct `PrivateLinkScopesGetOptions` has been removed -- Struct `PrivateLinkScopesGetResponse` has been removed -- Struct `PrivateLinkScopesGetResult` has been removed -- Struct `PrivateLinkScopesListByResourceGroupOptions` has been removed -- Struct `PrivateLinkScopesListByResourceGroupPager` has been removed -- Struct `PrivateLinkScopesListByResourceGroupResponse` has been removed -- Struct `PrivateLinkScopesListByResourceGroupResult` has been removed -- Struct `PrivateLinkScopesListOptions` has been removed -- Struct `PrivateLinkScopesListPager` has been removed -- Struct `PrivateLinkScopesListResponse` has been removed -- Struct `PrivateLinkScopesListResult` has been removed -- Struct `PrivateLinkScopesUpdateTagsOptions` has been removed -- Struct `PrivateLinkScopesUpdateTagsResponse` has been removed -- Struct `PrivateLinkScopesUpdateTagsResult` has been removed -- Struct `ScheduledQueryRulesCreateOrUpdateOptions` has been removed -- Struct `ScheduledQueryRulesCreateOrUpdateResponse` has been removed -- Struct `ScheduledQueryRulesCreateOrUpdateResult` has been removed -- Struct `ScheduledQueryRulesDeleteOptions` has been removed -- Struct `ScheduledQueryRulesDeleteResponse` has been removed -- Struct `ScheduledQueryRulesGetOptions` has been removed -- Struct `ScheduledQueryRulesGetResponse` has been removed -- Struct `ScheduledQueryRulesGetResult` has been removed -- Struct `ScheduledQueryRulesListByResourceGroupOptions` has been removed -- Struct `ScheduledQueryRulesListByResourceGroupResponse` has been removed -- Struct `ScheduledQueryRulesListByResourceGroupResult` has been removed -- Struct `ScheduledQueryRulesListBySubscriptionOptions` has been removed -- Struct `ScheduledQueryRulesListBySubscriptionResponse` has been removed -- Struct `ScheduledQueryRulesListBySubscriptionResult` has been removed -- Struct `ScheduledQueryRulesUpdateOptions` has been removed -- Struct `ScheduledQueryRulesUpdateResponse` has been removed -- Struct `ScheduledQueryRulesUpdateResult` has been removed -- Struct `TenantActivityLogsListOptions` has been removed -- Struct `TenantActivityLogsListPager` has been removed -- Struct `TenantActivityLogsListResponse` has been removed -- Struct `TenantActivityLogsListResult` has been removed -- Struct `VMInsightsGetOnboardingStatusOptions` has been removed -- Struct `VMInsightsGetOnboardingStatusResponse` has been removed -- Struct `VMInsightsGetOnboardingStatusResult` has been removed -- Field `LogsIngestionEndpointSpec` of struct `DataCollectionEndpointLogsIngestion` has been removed -- Field `InnerError` of struct `ResponseWithError` has been removed -- Field `ProxyResource` of struct `ScopedResource` has been removed -- Field `Resource` of struct `AlertRuleResource` has been removed -- Field `ProxyResource` of struct `VMInsightsOnboardingStatus` has been removed -- Field `ErrorResponse` of struct `ErrorResponseCommon` has been removed -- Field `PrivateLinkScopesResource` of struct `AzureMonitorPrivateLinkScope` has been removed -- Field `MultiMetricCriteria` of struct `MetricCriteria` has been removed -- Field `ProxyOnlyResource` of struct `DiagnosticSettingsCategoryResource` has been removed -- Field `DataCollectionRuleAssociation` of struct `DataCollectionRuleAssociationProxyOnlyResourceProperties` has been removed -- Field `ProxyOnlyResource` of struct `DiagnosticSettingsResource` has been removed -- Field `InnerError` of struct `ErrorResponseCommonV2` has been removed -- Field `DataCollectionRule` of struct `DataCollectionRuleResourceProperties` has been removed -- Field `AzureResource` of struct `ActionGroupResource` has been removed -- Field `MetricAlertCriteria` of struct `WebtestLocationAvailabilityCriteria` has been removed -- Field `Action` of struct `AlertingAction` has been removed -- Field `RuleCondition` of struct `LocationThresholdRuleCondition` has been removed -- Field `SystemData` of struct `DataCollectionEndpointResourceSystemData` has been removed -- Field `Resource` of struct `AutoscaleSettingResource` has been removed -- Field `SystemData` of struct `DataCollectionRuleAssociationProxyOnlyResourceSystemData` has been removed -- Field `RuleCondition` of struct `ManagementEventRuleCondition` has been removed -- Field `MultiMetricCriteria` of struct `DynamicMetricCriteria` has been removed -- Field `RuleCondition` of struct `ThresholdRuleCondition` has been removed -- Field `ProxyResource` of struct `PrivateLinkResource` has been removed -- Field `DataSourcesSpec` of struct `DataCollectionRuleDataSources` has been removed -- Field `RuleAction` of struct `RuleWebhookAction` has been removed -- Field `MetricAlertCriteria` of struct `MetricAlertSingleResourceMultipleMetricCriteria` has been removed -- Field `TrackedEntityResource` of struct `LogSearchRuleResource` has been removed -- Field `AzureMonitorMetricsDestination` of struct `DestinationsSpecAzureMonitorMetrics` has been removed -- Field `RuleDataSource` of struct `RuleManagementEventDataSource` has been removed -- Field `Action` of struct `LogToMetricAction` has been removed -- Field `ProxyResource` of struct `PrivateEndpointConnection` has been removed -- Field `RuleAction` of struct `RuleEmailAction` has been removed -- Field `InnerError` of struct `ErrorContract` has been removed -- Field `SystemData` of struct `DataCollectionRuleResourceSystemData` has been removed -- Field `NetworkRuleSet` of struct `DataCollectionEndpointNetworkACLs` has been removed -- Field `Resource` of struct `MetricAlertResource` has been removed -- Field `ConfigurationAccessEndpointSpec` of struct `DataCollectionEndpointConfigurationAccess` has been removed -- Field `Resource` of struct `LogProfileResource` has been removed -- Field `DataCollectionEndpoint` of struct `DataCollectionEndpointResourceProperties` has been removed -- Field `RuleDataSource` of struct `RuleMetricDataSource` has been removed -- Field `Resource` of struct `ActivityLogAlertResource` has been removed -- Field `MetricAlertCriteria` of struct `MetricAlertMultipleResourceMultipleMetricCriteria` has been removed -- Field `DestinationsSpec` of struct `DataCollectionRuleDestinations` has been removed - -### Features Added - -- New function `*RuleMetricDataSource.GetRuleDataSource() *RuleDataSource` -- New function `MultiMetricCriteria.MarshalJSON() ([]byte, error)` -- New function `*PrivateEndpointConnectionsClientListByPrivateLinkScopePager.PageResponse() PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse` -- New function `*PrivateEndpointConnectionsClientListByPrivateLinkScopePager.Err() error` -- New function `*ActionGroupsClientPostTestNotificationsPollerResponse.Resume(context.Context, *ActionGroupsClient, string) error` -- New function `*DataCollectionEndpointsClientListByResourceGroupPager.PageResponse() DataCollectionEndpointsClientListByResourceGroupResponse` -- New function `*PrivateLinkScopesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*PrivateLinkScopedResourcesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ThresholdRuleCondition.GetRuleCondition() *RuleCondition` -- New function `*PrivateEndpointConnectionsClientDeletePoller.FinalResponse(context.Context) (PrivateEndpointConnectionsClientDeleteResponse, error)` -- New function `*RuleEmailAction.GetRuleAction() *RuleAction` -- New function `*ActivityLogsClientListPager.NextPage(context.Context) bool` -- New function `*MetricAlertSingleResourceMultipleMetricCriteria.GetMetricAlertCriteria() *MetricAlertCriteria` -- New function `*DataCollectionRulesClientListBySubscriptionPager.Err() error` -- New function `*ActivityLogsClientListPager.Err() error` -- New function `*PrivateLinkScopedResourcesClientCreateOrUpdatePollerResponse.Resume(context.Context, *PrivateLinkScopedResourcesClient, string) error` -- New function `*AutoscaleSettingsClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*ActivityLogAlertsClientListBySubscriptionIDPager.NextPage(context.Context) bool` -- New function `AlertRuleProperties.MarshalJSON() ([]byte, error)` -- New function `*PrivateLinkScopedResourcesClientCreateOrUpdatePoller.Done() bool` -- New function `*PrivateLinkScopesClientDeletePoller.ResumeToken() (string, error)` -- New function `*PrivateLinkResourcesClientListByPrivateLinkScopePager.PageResponse() PrivateLinkResourcesClientListByPrivateLinkScopeResponse` -- New function `*ActionGroupsClientPostTestNotificationsPoller.FinalResponse(context.Context) (ActionGroupsClientPostTestNotificationsResponse, error)` -- New function `*ActivityLogAlertsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `AlertRuleAnyOfOrLeafCondition.MarshalJSON() ([]byte, error)` -- New function `*DataCollectionRulesClientListByResourceGroupPager.PageResponse() DataCollectionRulesClientListByResourceGroupResponse` -- New function `*DataCollectionEndpointsClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*DataCollectionRuleAssociationProxyOnlyResourceSystemData.UnmarshalJSON([]byte) error` -- New function `*PrivateLinkScopesClientListPager.NextPage(context.Context) bool` -- New function `DataCollectionRuleAssociationProxyOnlyResourceSystemData.MarshalJSON() ([]byte, error)` -- New function `ActionGroupsClientPostTestNotificationsPollerResponse.PollUntilDone(context.Context, time.Duration) (ActionGroupsClientPostTestNotificationsResponse, error)` -- New function `*PrivateLinkResourcesClientListByPrivateLinkScopePager.NextPage(context.Context) bool` -- New function `*DataCollectionRulesClientListByResourceGroupPager.Err() error` -- New function `*PrivateLinkScopedResourcesClientListByPrivateLinkScopePager.PageResponse() PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse` -- New function `*PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse.Resume(context.Context, *PrivateEndpointConnectionsClient, string) error` -- New function `AlertRuleList.MarshalJSON() ([]byte, error)` -- New function `*DynamicMetricCriteria.GetMultiMetricCriteria() *MultiMetricCriteria` -- New function `*RuleWebhookAction.GetRuleAction() *RuleAction` -- New function `PrivateLinkScopesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (PrivateLinkScopesClientDeleteResponse, error)` -- New function `*AlertingAction.GetAction() *Action` -- New function `*PrivateLinkScopedResourcesClientDeletePoller.Done() bool` -- New function `*PrivateEndpointConnectionsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*TenantActivityLogsClientListPager.NextPage(context.Context) bool` -- New function `*PrivateEndpointConnectionsClientCreateOrUpdatePoller.Done() bool` -- New function `*TenantActivityLogsClientListPager.Err() error` -- New function `*AutoscaleSettingsClientListBySubscriptionPager.Err() error` -- New function `*PrivateLinkScopedResourcesClientDeletePollerResponse.Resume(context.Context, *PrivateLinkScopedResourcesClient, string) error` -- New function `*PrivateLinkResourcesClientListByPrivateLinkScopePager.Err() error` -- New function `*PrivateLinkScopesClientDeletePoller.Done() bool` -- New function `ErrorResponseCommon.MarshalJSON() ([]byte, error)` -- New function `*DataCollectionRulesClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `ActionList.MarshalJSON() ([]byte, error)` -- New function `*AutoscaleSettingsClientListByResourceGroupPager.Err() error` -- New function `PrivateLinkScopedResourcesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (PrivateLinkScopedResourcesClientCreateOrUpdateResponse, error)` -- New function `*PrivateLinkScopedResourcesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ActivityLogAlertsClientListBySubscriptionIDPager.Err() error` -- New function `DataCollectionRuleDataSources.MarshalJSON() ([]byte, error)` -- New function `PrivateLinkScopedResourcesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (PrivateLinkScopedResourcesClientDeleteResponse, error)` -- New function `*PrivateEndpointConnectionsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `DataCollectionRuleResourceProperties.MarshalJSON() ([]byte, error)` -- New function `*AutoscaleSettingsClientListByResourceGroupPager.PageResponse() AutoscaleSettingsClientListByResourceGroupResponse` -- New function `AlertRuleAllOfCondition.MarshalJSON() ([]byte, error)` -- New function `*DataCollectionRuleResourceSystemData.UnmarshalJSON([]byte) error` -- New function `*MetricCriteria.GetMultiMetricCriteria() *MultiMetricCriteria` -- New function `*PrivateEndpointConnectionsClientCreateOrUpdatePoller.FinalResponse(context.Context) (PrivateEndpointConnectionsClientCreateOrUpdateResponse, error)` -- New function `AzureResourceAutoGenerated.MarshalJSON() ([]byte, error)` -- New function `*ActivityLogAlertsClientListBySubscriptionIDPager.PageResponse() ActivityLogAlertsClientListBySubscriptionIDResponse` -- New function `*PrivateLinkScopedResourcesClientDeletePoller.FinalResponse(context.Context) (PrivateLinkScopedResourcesClientDeleteResponse, error)` -- New function `*PrivateEndpointConnectionsClientDeletePoller.Done() bool` -- New function `*DataCollectionRuleAssociationsClientListByResourcePager.Err() error` -- New function `*MetricAlertMultipleResourceMultipleMetricCriteria.GetMetricAlertCriteria() *MetricAlertCriteria` -- New function `*PrivateLinkScopesClientListPager.PageResponse() PrivateLinkScopesClientListResponse` -- New function `*DataCollectionEndpointsClientListBySubscriptionPager.Err() error` -- New function `*ActionGroupsClientPostTestNotificationsPoller.ResumeToken() (string, error)` -- New function `*DataCollectionRuleAssociationsClientListByRulePager.PageResponse() DataCollectionRuleAssociationsClientListByRuleResponse` -- New function `*AutoscaleSettingsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*DataCollectionEndpointResourceSystemData.UnmarshalJSON([]byte) error` -- New function `*PrivateEndpointConnectionsClientDeletePoller.ResumeToken() (string, error)` -- New function `*PrivateLinkScopesClientListPager.Err() error` -- New function `AlertRuleLeafCondition.MarshalJSON() ([]byte, error)` -- New function `*PrivateLinkScopesClientListByResourceGroupPager.PageResponse() PrivateLinkScopesClientListByResourceGroupResponse` -- New function `*PrivateEndpointConnectionsClientListByPrivateLinkScopePager.NextPage(context.Context) bool` -- New function `*LocationThresholdRuleCondition.GetRuleCondition() *RuleCondition` -- New function `*DataCollectionEndpointsClientListBySubscriptionPager.PageResponse() DataCollectionEndpointsClientListBySubscriptionResponse` -- New function `*ActivityLogAlertsClientListByResourceGroupPager.PageResponse() ActivityLogAlertsClientListByResourceGroupResponse` -- New function `*TenantActivityLogsClientListPager.PageResponse() TenantActivityLogsClientListResponse` -- New function `MetricAlertCriteria.MarshalJSON() ([]byte, error)` -- New function `*PrivateLinkScopesClientDeletePoller.FinalResponse(context.Context) (PrivateLinkScopesClientDeleteResponse, error)` -- New function `*ActivityLogsClientListPager.PageResponse() ActivityLogsClientListResponse` -- New function `*PrivateLinkScopesClientDeletePollerResponse.Resume(context.Context, *PrivateLinkScopesClient, string) error` -- New function `*ActionGroupsClientPostTestNotificationsPoller.Poll(context.Context) (*http.Response, error)` -- New function `*DataCollectionRuleAssociationsClientListByResourcePager.PageResponse() DataCollectionRuleAssociationsClientListByResourceResponse` -- New function `*PrivateLinkScopesClientListByResourceGroupPager.Err() error` -- New function `*ActionGroupsClientPostTestNotificationsPoller.Done() bool` -- New function `*RuleManagementEventDataSource.GetRuleDataSource() *RuleDataSource` -- New function `*WebtestLocationAvailabilityCriteria.GetMetricAlertCriteria() *MetricAlertCriteria` -- New function `RuleCondition.MarshalJSON() ([]byte, error)` -- New function `*AutoscaleSettingsClientListBySubscriptionPager.PageResponse() AutoscaleSettingsClientListBySubscriptionResponse` -- New function `ActionGroupAutoGenerated.MarshalJSON() ([]byte, error)` -- New function `DataCollectionRuleDestinations.MarshalJSON() ([]byte, error)` -- New function `*DataCollectionEndpointsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `DataCollectionEndpointResourceSystemData.MarshalJSON() ([]byte, error)` -- New function `*PrivateEndpointConnectionsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*PrivateEndpointConnectionsClientDeletePollerResponse.Resume(context.Context, *PrivateEndpointConnectionsClient, string) error` -- New function `AlertRulePatchObject.MarshalJSON() ([]byte, error)` -- New function `*DataCollectionRuleAssociationsClientListByRulePager.NextPage(context.Context) bool` -- New function `*ManagementEventRuleCondition.GetRuleCondition() *RuleCondition` -- New function `*PrivateLinkScopedResourcesClientCreateOrUpdatePoller.FinalResponse(context.Context) (PrivateLinkScopedResourcesClientCreateOrUpdateResponse, error)` -- New function `*DataCollectionRuleAssociationsClientListByRulePager.Err() error` -- New function `DataCollectionRuleResourceSystemData.MarshalJSON() ([]byte, error)` -- New function `*ActivityLogAlertsClientListByResourceGroupPager.Err() error` -- New function `*PrivateLinkScopedResourcesClientListByPrivateLinkScopePager.NextPage(context.Context) bool` -- New function `*LogToMetricAction.GetAction() *Action` -- New function `*DataCollectionRuleAssociationsClientListByResourcePager.NextPage(context.Context) bool` -- New function `*PrivateLinkScopedResourcesClientListByPrivateLinkScopePager.Err() error` -- New function `*PrivateLinkScopedResourcesClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*DataCollectionEndpointsClientListByResourceGroupPager.Err() error` -- New function `PrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (PrivateEndpointConnectionsClientDeleteResponse, error)` -- New function `*PrivateLinkScopesClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*DataCollectionRulesClientListBySubscriptionPager.PageResponse() DataCollectionRulesClientListBySubscriptionResponse` -- New function `PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (PrivateEndpointConnectionsClientCreateOrUpdateResponse, error)` -- New function `*DataCollectionRulesClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*PrivateLinkScopedResourcesClientDeletePoller.ResumeToken() (string, error)` -- New struct `ActionGroupAutoGenerated` -- New struct `ActionGroupsClientBeginPostTestNotificationsOptions` -- New struct `ActionGroupsClientCreateOrUpdateOptions` -- New struct `ActionGroupsClientCreateOrUpdateResponse` -- New struct `ActionGroupsClientCreateOrUpdateResult` -- New struct `ActionGroupsClientDeleteOptions` -- New struct `ActionGroupsClientDeleteResponse` -- New struct `ActionGroupsClientEnableReceiverOptions` -- New struct `ActionGroupsClientEnableReceiverResponse` -- New struct `ActionGroupsClientGetOptions` -- New struct `ActionGroupsClientGetResponse` -- New struct `ActionGroupsClientGetResult` -- New struct `ActionGroupsClientGetTestNotificationsOptions` -- New struct `ActionGroupsClientGetTestNotificationsResponse` -- New struct `ActionGroupsClientGetTestNotificationsResult` -- New struct `ActionGroupsClientListByResourceGroupOptions` -- New struct `ActionGroupsClientListByResourceGroupResponse` -- New struct `ActionGroupsClientListByResourceGroupResult` -- New struct `ActionGroupsClientListBySubscriptionIDOptions` -- New struct `ActionGroupsClientListBySubscriptionIDResponse` -- New struct `ActionGroupsClientListBySubscriptionIDResult` -- New struct `ActionGroupsClientPostTestNotificationsPoller` -- New struct `ActionGroupsClientPostTestNotificationsPollerResponse` -- New struct `ActionGroupsClientPostTestNotificationsResponse` -- New struct `ActionGroupsClientPostTestNotificationsResult` -- New struct `ActionGroupsClientUpdateOptions` -- New struct `ActionGroupsClientUpdateResponse` -- New struct `ActionGroupsClientUpdateResult` -- New struct `ActionList` -- New struct `ActivityLogAlertsClientCreateOrUpdateOptions` -- New struct `ActivityLogAlertsClientCreateOrUpdateResponse` -- New struct `ActivityLogAlertsClientCreateOrUpdateResult` -- New struct `ActivityLogAlertsClientDeleteOptions` -- New struct `ActivityLogAlertsClientDeleteResponse` -- New struct `ActivityLogAlertsClientGetOptions` -- New struct `ActivityLogAlertsClientGetResponse` -- New struct `ActivityLogAlertsClientGetResult` -- New struct `ActivityLogAlertsClientListByResourceGroupOptions` -- New struct `ActivityLogAlertsClientListByResourceGroupPager` -- New struct `ActivityLogAlertsClientListByResourceGroupResponse` -- New struct `ActivityLogAlertsClientListByResourceGroupResult` -- New struct `ActivityLogAlertsClientListBySubscriptionIDOptions` -- New struct `ActivityLogAlertsClientListBySubscriptionIDPager` -- New struct `ActivityLogAlertsClientListBySubscriptionIDResponse` -- New struct `ActivityLogAlertsClientListBySubscriptionIDResult` -- New struct `ActivityLogAlertsClientUpdateOptions` -- New struct `ActivityLogAlertsClientUpdateResponse` -- New struct `ActivityLogAlertsClientUpdateResult` -- New struct `ActivityLogsClientListOptions` -- New struct `ActivityLogsClientListPager` -- New struct `ActivityLogsClientListResponse` -- New struct `ActivityLogsClientListResult` -- New struct `AlertRuleAllOfCondition` -- New struct `AlertRuleAnyOfOrLeafCondition` -- New struct `AlertRuleIncidentsClientGetOptions` -- New struct `AlertRuleIncidentsClientGetResponse` -- New struct `AlertRuleIncidentsClientGetResult` -- New struct `AlertRuleIncidentsClientListByAlertRuleOptions` -- New struct `AlertRuleIncidentsClientListByAlertRuleResponse` -- New struct `AlertRuleIncidentsClientListByAlertRuleResult` -- New struct `AlertRuleLeafCondition` -- New struct `AlertRuleList` -- New struct `AlertRulePatchObject` -- New struct `AlertRulePatchProperties` -- New struct `AlertRuleProperties` -- New struct `AlertRulesClientCreateOrUpdateOptions` -- New struct `AlertRulesClientCreateOrUpdateResponse` -- New struct `AlertRulesClientCreateOrUpdateResult` -- New struct `AlertRulesClientDeleteOptions` -- New struct `AlertRulesClientDeleteResponse` -- New struct `AlertRulesClientGetOptions` -- New struct `AlertRulesClientGetResponse` -- New struct `AlertRulesClientGetResult` -- New struct `AlertRulesClientListByResourceGroupOptions` -- New struct `AlertRulesClientListByResourceGroupResponse` -- New struct `AlertRulesClientListByResourceGroupResult` -- New struct `AlertRulesClientListBySubscriptionOptions` -- New struct `AlertRulesClientListBySubscriptionResponse` -- New struct `AlertRulesClientListBySubscriptionResult` -- New struct `AlertRulesClientUpdateOptions` -- New struct `AlertRulesClientUpdateResponse` -- New struct `AlertRulesClientUpdateResult` -- New struct `AutoscaleSettingsClientCreateOrUpdateOptions` -- New struct `AutoscaleSettingsClientCreateOrUpdateResponse` -- New struct `AutoscaleSettingsClientCreateOrUpdateResult` -- New struct `AutoscaleSettingsClientDeleteOptions` -- New struct `AutoscaleSettingsClientDeleteResponse` -- New struct `AutoscaleSettingsClientGetOptions` -- New struct `AutoscaleSettingsClientGetResponse` -- New struct `AutoscaleSettingsClientGetResult` -- New struct `AutoscaleSettingsClientListByResourceGroupOptions` -- New struct `AutoscaleSettingsClientListByResourceGroupPager` -- New struct `AutoscaleSettingsClientListByResourceGroupResponse` -- New struct `AutoscaleSettingsClientListByResourceGroupResult` -- New struct `AutoscaleSettingsClientListBySubscriptionOptions` -- New struct `AutoscaleSettingsClientListBySubscriptionPager` -- New struct `AutoscaleSettingsClientListBySubscriptionResponse` -- New struct `AutoscaleSettingsClientListBySubscriptionResult` -- New struct `AutoscaleSettingsClientUpdateOptions` -- New struct `AutoscaleSettingsClientUpdateResponse` -- New struct `AutoscaleSettingsClientUpdateResult` -- New struct `AzureResourceAutoGenerated` -- New struct `BaselinesClientListOptions` -- New struct `BaselinesClientListResponse` -- New struct `BaselinesClientListResult` -- New struct `DataCollectionEndpointsClientCreateOptions` -- New struct `DataCollectionEndpointsClientCreateResponse` -- New struct `DataCollectionEndpointsClientCreateResult` -- New struct `DataCollectionEndpointsClientDeleteOptions` -- New struct `DataCollectionEndpointsClientDeleteResponse` -- New struct `DataCollectionEndpointsClientGetOptions` -- New struct `DataCollectionEndpointsClientGetResponse` -- New struct `DataCollectionEndpointsClientGetResult` -- New struct `DataCollectionEndpointsClientListByResourceGroupOptions` -- New struct `DataCollectionEndpointsClientListByResourceGroupPager` -- New struct `DataCollectionEndpointsClientListByResourceGroupResponse` -- New struct `DataCollectionEndpointsClientListByResourceGroupResult` -- New struct `DataCollectionEndpointsClientListBySubscriptionOptions` -- New struct `DataCollectionEndpointsClientListBySubscriptionPager` -- New struct `DataCollectionEndpointsClientListBySubscriptionResponse` -- New struct `DataCollectionEndpointsClientListBySubscriptionResult` -- New struct `DataCollectionEndpointsClientUpdateOptions` -- New struct `DataCollectionEndpointsClientUpdateResponse` -- New struct `DataCollectionEndpointsClientUpdateResult` -- New struct `DataCollectionRuleAssociationsClientCreateOptions` -- New struct `DataCollectionRuleAssociationsClientCreateResponse` -- New struct `DataCollectionRuleAssociationsClientCreateResult` -- New struct `DataCollectionRuleAssociationsClientDeleteOptions` -- New struct `DataCollectionRuleAssociationsClientDeleteResponse` -- New struct `DataCollectionRuleAssociationsClientGetOptions` -- New struct `DataCollectionRuleAssociationsClientGetResponse` -- New struct `DataCollectionRuleAssociationsClientGetResult` -- New struct `DataCollectionRuleAssociationsClientListByResourceOptions` -- New struct `DataCollectionRuleAssociationsClientListByResourcePager` -- New struct `DataCollectionRuleAssociationsClientListByResourceResponse` -- New struct `DataCollectionRuleAssociationsClientListByResourceResult` -- New struct `DataCollectionRuleAssociationsClientListByRuleOptions` -- New struct `DataCollectionRuleAssociationsClientListByRulePager` -- New struct `DataCollectionRuleAssociationsClientListByRuleResponse` -- New struct `DataCollectionRuleAssociationsClientListByRuleResult` -- New struct `DataCollectionRulesClientCreateOptions` -- New struct `DataCollectionRulesClientCreateResponse` -- New struct `DataCollectionRulesClientCreateResult` -- New struct `DataCollectionRulesClientDeleteOptions` -- New struct `DataCollectionRulesClientDeleteResponse` -- New struct `DataCollectionRulesClientGetOptions` -- New struct `DataCollectionRulesClientGetResponse` -- New struct `DataCollectionRulesClientGetResult` -- New struct `DataCollectionRulesClientListByResourceGroupOptions` -- New struct `DataCollectionRulesClientListByResourceGroupPager` -- New struct `DataCollectionRulesClientListByResourceGroupResponse` -- New struct `DataCollectionRulesClientListByResourceGroupResult` -- New struct `DataCollectionRulesClientListBySubscriptionOptions` -- New struct `DataCollectionRulesClientListBySubscriptionPager` -- New struct `DataCollectionRulesClientListBySubscriptionResponse` -- New struct `DataCollectionRulesClientListBySubscriptionResult` -- New struct `DataCollectionRulesClientUpdateOptions` -- New struct `DataCollectionRulesClientUpdateResponse` -- New struct `DataCollectionRulesClientUpdateResult` -- New struct `DiagnosticSettingsCategoryClientGetOptions` -- New struct `DiagnosticSettingsCategoryClientGetResponse` -- New struct `DiagnosticSettingsCategoryClientGetResult` -- New struct `DiagnosticSettingsCategoryClientListOptions` -- New struct `DiagnosticSettingsCategoryClientListResponse` -- New struct `DiagnosticSettingsCategoryClientListResult` -- New struct `DiagnosticSettingsClientCreateOrUpdateOptions` -- New struct `DiagnosticSettingsClientCreateOrUpdateResponse` -- New struct `DiagnosticSettingsClientCreateOrUpdateResult` -- New struct `DiagnosticSettingsClientDeleteOptions` -- New struct `DiagnosticSettingsClientDeleteResponse` -- New struct `DiagnosticSettingsClientGetOptions` -- New struct `DiagnosticSettingsClientGetResponse` -- New struct `DiagnosticSettingsClientGetResult` -- New struct `DiagnosticSettingsClientListOptions` -- New struct `DiagnosticSettingsClientListResponse` -- New struct `DiagnosticSettingsClientListResult` -- New struct `ErrorResponseAutoGenerated` -- New struct `EventCategoriesClientListOptions` -- New struct `EventCategoriesClientListResponse` -- New struct `EventCategoriesClientListResult` -- New struct `LogProfilesClientCreateOrUpdateOptions` -- New struct `LogProfilesClientCreateOrUpdateResponse` -- New struct `LogProfilesClientCreateOrUpdateResult` -- New struct `LogProfilesClientDeleteOptions` -- New struct `LogProfilesClientDeleteResponse` -- New struct `LogProfilesClientGetOptions` -- New struct `LogProfilesClientGetResponse` -- New struct `LogProfilesClientGetResult` -- New struct `LogProfilesClientListOptions` -- New struct `LogProfilesClientListResponse` -- New struct `LogProfilesClientListResult` -- New struct `LogProfilesClientUpdateOptions` -- New struct `LogProfilesClientUpdateResponse` -- New struct `LogProfilesClientUpdateResult` -- New struct `MetricAlertsClientCreateOrUpdateOptions` -- New struct `MetricAlertsClientCreateOrUpdateResponse` -- New struct `MetricAlertsClientCreateOrUpdateResult` -- New struct `MetricAlertsClientDeleteOptions` -- New struct `MetricAlertsClientDeleteResponse` -- New struct `MetricAlertsClientGetOptions` -- New struct `MetricAlertsClientGetResponse` -- New struct `MetricAlertsClientGetResult` -- New struct `MetricAlertsClientListByResourceGroupOptions` -- New struct `MetricAlertsClientListByResourceGroupResponse` -- New struct `MetricAlertsClientListByResourceGroupResult` -- New struct `MetricAlertsClientListBySubscriptionOptions` -- New struct `MetricAlertsClientListBySubscriptionResponse` -- New struct `MetricAlertsClientListBySubscriptionResult` -- New struct `MetricAlertsClientUpdateOptions` -- New struct `MetricAlertsClientUpdateResponse` -- New struct `MetricAlertsClientUpdateResult` -- New struct `MetricAlertsStatusClientListByNameOptions` -- New struct `MetricAlertsStatusClientListByNameResponse` -- New struct `MetricAlertsStatusClientListByNameResult` -- New struct `MetricAlertsStatusClientListOptions` -- New struct `MetricAlertsStatusClientListResponse` -- New struct `MetricAlertsStatusClientListResult` -- New struct `MetricDefinitionsClientListOptions` -- New struct `MetricDefinitionsClientListResponse` -- New struct `MetricDefinitionsClientListResult` -- New struct `MetricNamespacesClientListOptions` -- New struct `MetricNamespacesClientListResponse` -- New struct `MetricNamespacesClientListResult` -- New struct `MetricsClientListOptions` -- New struct `MetricsClientListResponse` -- New struct `MetricsClientListResult` -- New struct `OperationsClientListOptions` -- New struct `OperationsClientListResponse` -- New struct `OperationsClientListResult` -- New struct `PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions` -- New struct `PrivateEndpointConnectionsClientBeginDeleteOptions` -- New struct `PrivateEndpointConnectionsClientCreateOrUpdatePoller` -- New struct `PrivateEndpointConnectionsClientCreateOrUpdatePollerResponse` -- New struct `PrivateEndpointConnectionsClientCreateOrUpdateResponse` -- New struct `PrivateEndpointConnectionsClientCreateOrUpdateResult` -- New struct `PrivateEndpointConnectionsClientDeletePoller` -- New struct `PrivateEndpointConnectionsClientDeletePollerResponse` -- New struct `PrivateEndpointConnectionsClientDeleteResponse` -- New struct `PrivateEndpointConnectionsClientGetOptions` -- New struct `PrivateEndpointConnectionsClientGetResponse` -- New struct `PrivateEndpointConnectionsClientGetResult` -- New struct `PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions` -- New struct `PrivateEndpointConnectionsClientListByPrivateLinkScopePager` -- New struct `PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse` -- New struct `PrivateEndpointConnectionsClientListByPrivateLinkScopeResult` -- New struct `PrivateLinkResourcesClientGetOptions` -- New struct `PrivateLinkResourcesClientGetResponse` -- New struct `PrivateLinkResourcesClientGetResult` -- New struct `PrivateLinkResourcesClientListByPrivateLinkScopeOptions` -- New struct `PrivateLinkResourcesClientListByPrivateLinkScopePager` -- New struct `PrivateLinkResourcesClientListByPrivateLinkScopeResponse` -- New struct `PrivateLinkResourcesClientListByPrivateLinkScopeResult` -- New struct `PrivateLinkScopeOperationStatusClientGetOptions` -- New struct `PrivateLinkScopeOperationStatusClientGetResponse` -- New struct `PrivateLinkScopeOperationStatusClientGetResult` -- New struct `PrivateLinkScopedResourcesClientBeginCreateOrUpdateOptions` -- New struct `PrivateLinkScopedResourcesClientBeginDeleteOptions` -- New struct `PrivateLinkScopedResourcesClientCreateOrUpdatePoller` -- New struct `PrivateLinkScopedResourcesClientCreateOrUpdatePollerResponse` -- New struct `PrivateLinkScopedResourcesClientCreateOrUpdateResponse` -- New struct `PrivateLinkScopedResourcesClientCreateOrUpdateResult` -- New struct `PrivateLinkScopedResourcesClientDeletePoller` -- New struct `PrivateLinkScopedResourcesClientDeletePollerResponse` -- New struct `PrivateLinkScopedResourcesClientDeleteResponse` -- New struct `PrivateLinkScopedResourcesClientGetOptions` -- New struct `PrivateLinkScopedResourcesClientGetResponse` -- New struct `PrivateLinkScopedResourcesClientGetResult` -- New struct `PrivateLinkScopedResourcesClientListByPrivateLinkScopeOptions` -- New struct `PrivateLinkScopedResourcesClientListByPrivateLinkScopePager` -- New struct `PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse` -- New struct `PrivateLinkScopedResourcesClientListByPrivateLinkScopeResult` -- New struct `PrivateLinkScopesClientBeginDeleteOptions` -- New struct `PrivateLinkScopesClientCreateOrUpdateOptions` -- New struct `PrivateLinkScopesClientCreateOrUpdateResponse` -- New struct `PrivateLinkScopesClientCreateOrUpdateResult` -- New struct `PrivateLinkScopesClientDeletePoller` -- New struct `PrivateLinkScopesClientDeletePollerResponse` -- New struct `PrivateLinkScopesClientDeleteResponse` -- New struct `PrivateLinkScopesClientGetOptions` -- New struct `PrivateLinkScopesClientGetResponse` -- New struct `PrivateLinkScopesClientGetResult` -- New struct `PrivateLinkScopesClientListByResourceGroupOptions` -- New struct `PrivateLinkScopesClientListByResourceGroupPager` -- New struct `PrivateLinkScopesClientListByResourceGroupResponse` -- New struct `PrivateLinkScopesClientListByResourceGroupResult` -- New struct `PrivateLinkScopesClientListOptions` -- New struct `PrivateLinkScopesClientListPager` -- New struct `PrivateLinkScopesClientListResponse` -- New struct `PrivateLinkScopesClientListResult` -- New struct `PrivateLinkScopesClientUpdateTagsOptions` -- New struct `PrivateLinkScopesClientUpdateTagsResponse` -- New struct `PrivateLinkScopesClientUpdateTagsResult` -- New struct `ScheduledQueryRulesClientCreateOrUpdateOptions` -- New struct `ScheduledQueryRulesClientCreateOrUpdateResponse` -- New struct `ScheduledQueryRulesClientCreateOrUpdateResult` -- New struct `ScheduledQueryRulesClientDeleteOptions` -- New struct `ScheduledQueryRulesClientDeleteResponse` -- New struct `ScheduledQueryRulesClientGetOptions` -- New struct `ScheduledQueryRulesClientGetResponse` -- New struct `ScheduledQueryRulesClientGetResult` -- New struct `ScheduledQueryRulesClientListByResourceGroupOptions` -- New struct `ScheduledQueryRulesClientListByResourceGroupResponse` -- New struct `ScheduledQueryRulesClientListByResourceGroupResult` -- New struct `ScheduledQueryRulesClientListBySubscriptionOptions` -- New struct `ScheduledQueryRulesClientListBySubscriptionResponse` -- New struct `ScheduledQueryRulesClientListBySubscriptionResult` -- New struct `ScheduledQueryRulesClientUpdateOptions` -- New struct `ScheduledQueryRulesClientUpdateResponse` -- New struct `ScheduledQueryRulesClientUpdateResult` -- New struct `TenantActivityLogsClientListOptions` -- New struct `TenantActivityLogsClientListPager` -- New struct `TenantActivityLogsClientListResponse` -- New struct `TenantActivityLogsClientListResult` -- New struct `VMInsightsClientGetOnboardingStatusOptions` -- New struct `VMInsightsClientGetOnboardingStatusResponse` -- New struct `VMInsightsClientGetOnboardingStatusResult` -- New field `Type` in struct `VMInsightsOnboardingStatus` -- New field `ID` in struct `VMInsightsOnboardingStatus` -- New field `Name` in struct `VMInsightsOnboardingStatus` -- New field `ODataType` in struct `RuleEmailAction` -- New field `ID` in struct `PrivateEndpointConnection` -- New field `Name` in struct `PrivateEndpointConnection` -- New field `Type` in struct `PrivateEndpointConnection` -- New field `Error` in struct `ResponseWithError` -- New field `Code` in struct `ErrorResponseCommon` -- New field `Message` in struct `ErrorResponseCommon` -- New field `Error` in struct `ErrorResponseCommonV2` -- New field `AzureMonitorMetrics` in struct `DataCollectionRuleDestinations` -- New field `LogAnalytics` in struct `DataCollectionRuleDestinations` -- New field `ODataType` in struct `LocationThresholdRuleCondition` -- New field `DataSource` in struct `LocationThresholdRuleCondition` -- New field `Error` in struct `ErrorContract` -- New field `ID` in struct `ScopedResource` -- New field `Name` in struct `ScopedResource` -- New field `Type` in struct `ScopedResource` -- New field `CreatedAt` in struct `DataCollectionEndpointResourceSystemData` -- New field `CreatedBy` in struct `DataCollectionEndpointResourceSystemData` -- New field `CreatedByType` in struct `DataCollectionEndpointResourceSystemData` -- New field `LastModifiedAt` in struct `DataCollectionEndpointResourceSystemData` -- New field `LastModifiedBy` in struct `DataCollectionEndpointResourceSystemData` -- New field `LastModifiedByType` in struct `DataCollectionEndpointResourceSystemData` -- New field `Dimensions` in struct `DynamicMetricCriteria` -- New field `MetricNamespace` in struct `DynamicMetricCriteria` -- New field `SkipMetricValidation` in struct `DynamicMetricCriteria` -- New field `Name` in struct `DynamicMetricCriteria` -- New field `AdditionalProperties` in struct `DynamicMetricCriteria` -- New field `CriterionType` in struct `DynamicMetricCriteria` -- New field `MetricName` in struct `DynamicMetricCriteria` -- New field `TimeAggregation` in struct `DynamicMetricCriteria` -- New field `ODataType` in struct `AlertingAction` -- New field `DataSources` in struct `DataCollectionRuleResourceProperties` -- New field `Description` in struct `DataCollectionRuleResourceProperties` -- New field `Destinations` in struct `DataCollectionRuleResourceProperties` -- New field `ImmutableID` in struct `DataCollectionRuleResourceProperties` -- New field `ProvisioningState` in struct `DataCollectionRuleResourceProperties` -- New field `DataFlows` in struct `DataCollectionRuleResourceProperties` -- New field `Type` in struct `AutoscaleSettingResource` -- New field `Location` in struct `AutoscaleSettingResource` -- New field `Tags` in struct `AutoscaleSettingResource` -- New field `ID` in struct `AutoscaleSettingResource` -- New field `Name` in struct `AutoscaleSettingResource` -- New field `PublicNetworkAccess` in struct `DataCollectionEndpointNetworkACLs` -- New field `ID` in struct `LogSearchRuleResource` -- New field `Kind` in struct `LogSearchRuleResource` -- New field `Name` in struct `LogSearchRuleResource` -- New field `Type` in struct `LogSearchRuleResource` -- New field `Location` in struct `LogSearchRuleResource` -- New field `Tags` in struct `LogSearchRuleResource` -- New field `Etag` in struct `LogSearchRuleResource` -- New field `ODataType` in struct `RuleMetricDataSource` -- New field `LegacyResourceID` in struct `RuleMetricDataSource` -- New field `MetricNamespace` in struct `RuleMetricDataSource` -- New field `ResourceLocation` in struct `RuleMetricDataSource` -- New field `ResourceURI` in struct `RuleMetricDataSource` -- New field `Endpoint` in struct `DataCollectionEndpointLogsIngestion` -- New field `Extensions` in struct `DataCollectionRuleDataSources` -- New field `PerformanceCounters` in struct `DataCollectionRuleDataSources` -- New field `Syslog` in struct `DataCollectionRuleDataSources` -- New field `WindowsEventLogs` in struct `DataCollectionRuleDataSources` -- New field `DataCollectionEndpointID` in struct `DataCollectionRuleAssociationProxyOnlyResourceProperties` -- New field `DataCollectionRuleID` in struct `DataCollectionRuleAssociationProxyOnlyResourceProperties` -- New field `Description` in struct `DataCollectionRuleAssociationProxyOnlyResourceProperties` -- New field `ProvisioningState` in struct `DataCollectionRuleAssociationProxyOnlyResourceProperties` -- New field `Name` in struct `MetricAlertResource` -- New field `Type` in struct `MetricAlertResource` -- New field `Location` in struct `MetricAlertResource` -- New field `Tags` in struct `MetricAlertResource` -- New field `ID` in struct `MetricAlertResource` -- New field `ResourceLocation` in struct `RuleManagementEventDataSource` -- New field `MetricNamespace` in struct `RuleManagementEventDataSource` -- New field `ODataType` in struct `RuleManagementEventDataSource` -- New field `LegacyResourceID` in struct `RuleManagementEventDataSource` -- New field `ResourceURI` in struct `RuleManagementEventDataSource` -- New field `ODataType` in struct `MetricAlertSingleResourceMultipleMetricCriteria` -- New field `AdditionalProperties` in struct `MetricAlertSingleResourceMultipleMetricCriteria` -- New field `DataSource` in struct `ManagementEventRuleCondition` -- New field `ODataType` in struct `ManagementEventRuleCondition` -- New field `CreatedByType` in struct `DataCollectionRuleAssociationProxyOnlyResourceSystemData` -- New field `LastModifiedAt` in struct `DataCollectionRuleAssociationProxyOnlyResourceSystemData` -- New field `LastModifiedBy` in struct `DataCollectionRuleAssociationProxyOnlyResourceSystemData` -- New field `LastModifiedByType` in struct `DataCollectionRuleAssociationProxyOnlyResourceSystemData` -- New field `CreatedAt` in struct `DataCollectionRuleAssociationProxyOnlyResourceSystemData` -- New field `CreatedBy` in struct `DataCollectionRuleAssociationProxyOnlyResourceSystemData` -- New field `ODataType` in struct `ThresholdRuleCondition` -- New field `DataSource` in struct `ThresholdRuleCondition` -- New field `Tags` in struct `ActivityLogAlertResource` -- New field `ID` in struct `ActivityLogAlertResource` -- New field `Name` in struct `ActivityLogAlertResource` -- New field `Type` in struct `ActivityLogAlertResource` -- New field `Location` in struct `ActivityLogAlertResource` -- New field `CreatedByType` in struct `DataCollectionRuleResourceSystemData` -- New field `LastModifiedAt` in struct `DataCollectionRuleResourceSystemData` -- New field `LastModifiedBy` in struct `DataCollectionRuleResourceSystemData` -- New field `LastModifiedByType` in struct `DataCollectionRuleResourceSystemData` -- New field `CreatedAt` in struct `DataCollectionRuleResourceSystemData` -- New field `CreatedBy` in struct `DataCollectionRuleResourceSystemData` -- New field `ID` in struct `PrivateLinkResource` -- New field `Name` in struct `PrivateLinkResource` -- New field `Type` in struct `PrivateLinkResource` -- New field `Identity` in struct `ActionGroupResource` -- New field `Kind` in struct `ActionGroupResource` -- New field `Name` in struct `ActionGroupResource` -- New field `Type` in struct `ActionGroupResource` -- New field `Location` in struct `ActionGroupResource` -- New field `Tags` in struct `ActionGroupResource` -- New field `ID` in struct `ActionGroupResource` -- New field `Endpoint` in struct `DataCollectionEndpointConfigurationAccess` -- New field `ODataType` in struct `MetricAlertMultipleResourceMultipleMetricCriteria` -- New field `AdditionalProperties` in struct `MetricAlertMultipleResourceMultipleMetricCriteria` -- New field `Tags` in struct `LogProfileResource` -- New field `ID` in struct `LogProfileResource` -- New field `Name` in struct `LogProfileResource` -- New field `Type` in struct `LogProfileResource` -- New field `Location` in struct `LogProfileResource` -- New field `ODataType` in struct `WebtestLocationAvailabilityCriteria` -- New field `AdditionalProperties` in struct `WebtestLocationAvailabilityCriteria` -- New field `ODataType` in struct `LogToMetricAction` -- New field `TimeAggregation` in struct `MetricCriteria` -- New field `AdditionalProperties` in struct `MetricCriteria` -- New field `CriterionType` in struct `MetricCriteria` -- New field `Name` in struct `MetricCriteria` -- New field `SkipMetricValidation` in struct `MetricCriteria` -- New field `Dimensions` in struct `MetricCriteria` -- New field `MetricNamespace` in struct `MetricCriteria` -- New field `MetricName` in struct `MetricCriteria` -- New field `Description` in struct `DataCollectionEndpointResourceProperties` -- New field `ImmutableID` in struct `DataCollectionEndpointResourceProperties` -- New field `LogsIngestion` in struct `DataCollectionEndpointResourceProperties` -- New field `NetworkACLs` in struct `DataCollectionEndpointResourceProperties` -- New field `ProvisioningState` in struct `DataCollectionEndpointResourceProperties` -- New field `ConfigurationAccess` in struct `DataCollectionEndpointResourceProperties` -- New field `Name` in struct `DestinationsSpecAzureMonitorMetrics` -- New field `ODataType` in struct `RuleWebhookAction` -- New field `ID` in struct `AlertRuleResource` -- New field `Name` in struct `AlertRuleResource` -- New field `Type` in struct `AlertRuleResource` -- New field `Location` in struct `AlertRuleResource` -- New field `Tags` in struct `AlertRuleResource` -- New field `ID` in struct `DiagnosticSettingsResource` -- New field `Name` in struct `DiagnosticSettingsResource` -- New field `Type` in struct `DiagnosticSettingsResource` -- New field `Tags` in struct `AzureMonitorPrivateLinkScope` -- New field `ID` in struct `AzureMonitorPrivateLinkScope` -- New field `Name` in struct `AzureMonitorPrivateLinkScope` -- New field `Type` in struct `AzureMonitorPrivateLinkScope` -- New field `Location` in struct `AzureMonitorPrivateLinkScope` -- New field `Name` in struct `DiagnosticSettingsCategoryResource` -- New field `Type` in struct `DiagnosticSettingsCategoryResource` -- New field `ID` in struct `DiagnosticSettingsCategoryResource` - - -## 0.3.0 (2021-12-16) - -### Features Added - -- New function `*ActionGroupsPostTestNotificationsPoller.Done() bool` -- New function `*ActionGroupsClient.BeginPostTestNotifications(context.Context, NotificationRequestBody, *ActionGroupsBeginPostTestNotificationsOptions) (ActionGroupsPostTestNotificationsPollerResponse, error)` -- New function `ActionGroupsPostTestNotificationsPollerResponse.PollUntilDone(context.Context, time.Duration) (ActionGroupsPostTestNotificationsResponse, error)` -- New function `TestNotificationDetailsResponse.MarshalJSON() ([]byte, error)` -- New function `*ActionGroupsClient.GetTestNotifications(context.Context, string, *ActionGroupsGetTestNotificationsOptions) (ActionGroupsGetTestNotificationsResponse, error)` -- New function `*ActionGroupsPostTestNotificationsPoller.FinalResponse(context.Context) (ActionGroupsPostTestNotificationsResponse, error)` -- New function `*ActionGroupsPostTestNotificationsPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ActionGroupsPostTestNotificationsPoller.ResumeToken() (string, error)` -- New function `*ActionGroupsPostTestNotificationsPollerResponse.Resume(context.Context, *ActionGroupsClient, string) error` -- New function `NotificationRequestBody.MarshalJSON() ([]byte, error)` -- New struct `ActionDetail` -- New struct `ActionGroupsBeginPostTestNotificationsOptions` -- New struct `ActionGroupsGetTestNotificationsOptions` -- New struct `ActionGroupsGetTestNotificationsResponse` -- New struct `ActionGroupsGetTestNotificationsResult` -- New struct `ActionGroupsPostTestNotificationsPoller` -- New struct `ActionGroupsPostTestNotificationsPollerResponse` -- New struct `ActionGroupsPostTestNotificationsResponse` -- New struct `ActionGroupsPostTestNotificationsResult` -- New struct `Context` -- New struct `EventHubReceiver` -- New struct `NotificationRequestBody` -- New struct `TestNotificationDetailsResponse` -- New struct `TestNotificationResponse` -- New field `EventHubReceivers` in struct `ActionGroup` - -## 0.2.0 (2021-10-29) - -### Breaking Changes - -- `arm.Connection` has been removed in `github.com/Azure/azure-sdk-for-go/sdk/azcore/v0.20.0` -- The parameters of `NewXXXClient` has been changed from `(con *arm.Connection, subscriptionID string)` to `(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions)` - -## 0.1.0 (2021-10-08) -- To better align with the Azure SDK guidelines (https://azure.github.io/azure-sdk/general_introduction.html), we have decided to change the module path to "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor". Therefore, we are deprecating the old module path (which is "github.com/Azure/azure-sdk-for-go/sdk/monitor/armmonitor") to avoid confusion. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/README.md deleted file mode 100644 index b9444e3e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# Azure Monitor Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor) - -The `armmonitor` module provides operations for working with Azure Monitor. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/monitor/armmonitor) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Monitor module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Monitor. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure Monitor modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armmonitor.NewAlertRuleIncidentsClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armmonitor.NewAlertRuleIncidentsClient(, cred, &options) -``` - -## More sample code - -- [Action Group](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/monitor/action_group) -- [Activity Log Alert](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/monitor/activity_log_alert) -- [Log Profile](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/monitor/log_profile) - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Monitor` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/autorest.md deleted file mode 100644 index 887854ab..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/autorest.md +++ /dev/null @@ -1,12 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/monitor/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/monitor/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.7.0 -``` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/build.go deleted file mode 100644 index 7cd1d572..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/monitor/armmonitor - -package armmonitor diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/ci.yml deleted file mode 100644 index 7573607c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/monitor/armmonitor/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/monitor/armmonitor/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/monitor/armmonitor' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_actiongroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_actiongroups_client.go deleted file mode 100644 index 38d22253..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_actiongroups_client.go +++ /dev/null @@ -1,790 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ActionGroupsClient contains the methods for the ActionGroups group. -// Don't use this type directly, use NewActionGroupsClient() instead. -type ActionGroupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewActionGroupsClient creates a new instance of ActionGroupsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewActionGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ActionGroupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ActionGroupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateNotificationsAtActionGroupResourceLevel - Send test notifications to a set of provided receivers -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// actionGroupName - The name of the action group. -// notificationRequest - The notification request body which includes the contact details -// options - ActionGroupsClientBeginCreateNotificationsAtActionGroupResourceLevelOptions contains the optional parameters -// for the ActionGroupsClient.BeginCreateNotificationsAtActionGroupResourceLevel method. -func (client *ActionGroupsClient) BeginCreateNotificationsAtActionGroupResourceLevel(ctx context.Context, resourceGroupName string, actionGroupName string, notificationRequest NotificationRequestBody, options *ActionGroupsClientBeginCreateNotificationsAtActionGroupResourceLevelOptions) (*runtime.Poller[ActionGroupsClientCreateNotificationsAtActionGroupResourceLevelResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createNotificationsAtActionGroupResourceLevel(ctx, resourceGroupName, actionGroupName, notificationRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ActionGroupsClientCreateNotificationsAtActionGroupResourceLevelResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ActionGroupsClientCreateNotificationsAtActionGroupResourceLevelResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateNotificationsAtActionGroupResourceLevel - Send test notifications to a set of provided receivers -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -func (client *ActionGroupsClient) createNotificationsAtActionGroupResourceLevel(ctx context.Context, resourceGroupName string, actionGroupName string, notificationRequest NotificationRequestBody, options *ActionGroupsClientBeginCreateNotificationsAtActionGroupResourceLevelOptions) (*http.Response, error) { - req, err := client.createNotificationsAtActionGroupResourceLevelCreateRequest(ctx, resourceGroupName, actionGroupName, notificationRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createNotificationsAtActionGroupResourceLevelCreateRequest creates the CreateNotificationsAtActionGroupResourceLevel request. -func (client *ActionGroupsClient) createNotificationsAtActionGroupResourceLevelCreateRequest(ctx context.Context, resourceGroupName string, actionGroupName string, notificationRequest NotificationRequestBody, options *ActionGroupsClientBeginCreateNotificationsAtActionGroupResourceLevelOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/createNotifications" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if actionGroupName == "" { - return nil, errors.New("parameter actionGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{actionGroupName}", url.PathEscape(actionGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, notificationRequest) -} - -// BeginCreateNotificationsAtResourceGroupLevel - Send test notifications to a set of provided receivers -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// notificationRequest - The notification request body which includes the contact details -// options - ActionGroupsClientBeginCreateNotificationsAtResourceGroupLevelOptions contains the optional parameters for the -// ActionGroupsClient.BeginCreateNotificationsAtResourceGroupLevel method. -func (client *ActionGroupsClient) BeginCreateNotificationsAtResourceGroupLevel(ctx context.Context, resourceGroupName string, notificationRequest NotificationRequestBody, options *ActionGroupsClientBeginCreateNotificationsAtResourceGroupLevelOptions) (*runtime.Poller[ActionGroupsClientCreateNotificationsAtResourceGroupLevelResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createNotificationsAtResourceGroupLevel(ctx, resourceGroupName, notificationRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ActionGroupsClientCreateNotificationsAtResourceGroupLevelResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ActionGroupsClientCreateNotificationsAtResourceGroupLevelResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateNotificationsAtResourceGroupLevel - Send test notifications to a set of provided receivers -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -func (client *ActionGroupsClient) createNotificationsAtResourceGroupLevel(ctx context.Context, resourceGroupName string, notificationRequest NotificationRequestBody, options *ActionGroupsClientBeginCreateNotificationsAtResourceGroupLevelOptions) (*http.Response, error) { - req, err := client.createNotificationsAtResourceGroupLevelCreateRequest(ctx, resourceGroupName, notificationRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createNotificationsAtResourceGroupLevelCreateRequest creates the CreateNotificationsAtResourceGroupLevel request. -func (client *ActionGroupsClient) createNotificationsAtResourceGroupLevelCreateRequest(ctx context.Context, resourceGroupName string, notificationRequest NotificationRequestBody, options *ActionGroupsClientBeginCreateNotificationsAtResourceGroupLevelOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/createNotifications" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, notificationRequest) -} - -// CreateOrUpdate - Create a new action group or update an existing one. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// actionGroupName - The name of the action group. -// actionGroup - The action group to create or use for the update. -// options - ActionGroupsClientCreateOrUpdateOptions contains the optional parameters for the ActionGroupsClient.CreateOrUpdate -// method. -func (client *ActionGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, actionGroupName string, actionGroup ActionGroupResource, options *ActionGroupsClientCreateOrUpdateOptions) (ActionGroupsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, actionGroupName, actionGroup, options) - if err != nil { - return ActionGroupsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActionGroupsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ActionGroupsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ActionGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, actionGroupName string, actionGroup ActionGroupResource, options *ActionGroupsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if actionGroupName == "" { - return nil, errors.New("parameter actionGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{actionGroupName}", url.PathEscape(actionGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, actionGroup) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ActionGroupsClient) createOrUpdateHandleResponse(resp *http.Response) (ActionGroupsClientCreateOrUpdateResponse, error) { - result := ActionGroupsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ActionGroupResource); err != nil { - return ActionGroupsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete an action group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// actionGroupName - The name of the action group. -// options - ActionGroupsClientDeleteOptions contains the optional parameters for the ActionGroupsClient.Delete method. -func (client *ActionGroupsClient) Delete(ctx context.Context, resourceGroupName string, actionGroupName string, options *ActionGroupsClientDeleteOptions) (ActionGroupsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, actionGroupName, options) - if err != nil { - return ActionGroupsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActionGroupsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ActionGroupsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ActionGroupsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ActionGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, actionGroupName string, options *ActionGroupsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if actionGroupName == "" { - return nil, errors.New("parameter actionGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{actionGroupName}", url.PathEscape(actionGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// EnableReceiver - Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This -// operation is only supported for Email or SMS receivers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// actionGroupName - The name of the action group. -// enableRequest - The receiver to re-enable. -// options - ActionGroupsClientEnableReceiverOptions contains the optional parameters for the ActionGroupsClient.EnableReceiver -// method. -func (client *ActionGroupsClient) EnableReceiver(ctx context.Context, resourceGroupName string, actionGroupName string, enableRequest EnableRequest, options *ActionGroupsClientEnableReceiverOptions) (ActionGroupsClientEnableReceiverResponse, error) { - req, err := client.enableReceiverCreateRequest(ctx, resourceGroupName, actionGroupName, enableRequest, options) - if err != nil { - return ActionGroupsClientEnableReceiverResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActionGroupsClientEnableReceiverResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActionGroupsClientEnableReceiverResponse{}, runtime.NewResponseError(resp) - } - return ActionGroupsClientEnableReceiverResponse{}, nil -} - -// enableReceiverCreateRequest creates the EnableReceiver request. -func (client *ActionGroupsClient) enableReceiverCreateRequest(ctx context.Context, resourceGroupName string, actionGroupName string, enableRequest EnableRequest, options *ActionGroupsClientEnableReceiverOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if actionGroupName == "" { - return nil, errors.New("parameter actionGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{actionGroupName}", url.PathEscape(actionGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, enableRequest) -} - -// Get - Get an action group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// actionGroupName - The name of the action group. -// options - ActionGroupsClientGetOptions contains the optional parameters for the ActionGroupsClient.Get method. -func (client *ActionGroupsClient) Get(ctx context.Context, resourceGroupName string, actionGroupName string, options *ActionGroupsClientGetOptions) (ActionGroupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, actionGroupName, options) - if err != nil { - return ActionGroupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActionGroupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActionGroupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ActionGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, actionGroupName string, options *ActionGroupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if actionGroupName == "" { - return nil, errors.New("parameter actionGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{actionGroupName}", url.PathEscape(actionGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ActionGroupsClient) getHandleResponse(resp *http.Response) (ActionGroupsClientGetResponse, error) { - result := ActionGroupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ActionGroupResource); err != nil { - return ActionGroupsClientGetResponse{}, err - } - return result, nil -} - -// GetTestNotifications - Get the test notifications by the notification id -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// notificationID - The notification id -// options - ActionGroupsClientGetTestNotificationsOptions contains the optional parameters for the ActionGroupsClient.GetTestNotifications -// method. -func (client *ActionGroupsClient) GetTestNotifications(ctx context.Context, notificationID string, options *ActionGroupsClientGetTestNotificationsOptions) (ActionGroupsClientGetTestNotificationsResponse, error) { - req, err := client.getTestNotificationsCreateRequest(ctx, notificationID, options) - if err != nil { - return ActionGroupsClientGetTestNotificationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActionGroupsClientGetTestNotificationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActionGroupsClientGetTestNotificationsResponse{}, runtime.NewResponseError(resp) - } - return client.getTestNotificationsHandleResponse(resp) -} - -// getTestNotificationsCreateRequest creates the GetTestNotifications request. -func (client *ActionGroupsClient) getTestNotificationsCreateRequest(ctx context.Context, notificationID string, options *ActionGroupsClientGetTestNotificationsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/notificationStatus/{notificationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if notificationID == "" { - return nil, errors.New("parameter notificationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{notificationId}", url.PathEscape(notificationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getTestNotificationsHandleResponse handles the GetTestNotifications response. -func (client *ActionGroupsClient) getTestNotificationsHandleResponse(resp *http.Response) (ActionGroupsClientGetTestNotificationsResponse, error) { - result := ActionGroupsClientGetTestNotificationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TestNotificationDetailsResponse); err != nil { - return ActionGroupsClientGetTestNotificationsResponse{}, err - } - return result, nil -} - -// GetTestNotificationsAtActionGroupResourceLevel - Get the test notifications by the notification id -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// actionGroupName - The name of the action group. -// notificationID - The notification id -// options - ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelOptions contains the optional parameters for -// the ActionGroupsClient.GetTestNotificationsAtActionGroupResourceLevel method. -func (client *ActionGroupsClient) GetTestNotificationsAtActionGroupResourceLevel(ctx context.Context, resourceGroupName string, actionGroupName string, notificationID string, options *ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelOptions) (ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse, error) { - req, err := client.getTestNotificationsAtActionGroupResourceLevelCreateRequest(ctx, resourceGroupName, actionGroupName, notificationID, options) - if err != nil { - return ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse{}, runtime.NewResponseError(resp) - } - return client.getTestNotificationsAtActionGroupResourceLevelHandleResponse(resp) -} - -// getTestNotificationsAtActionGroupResourceLevelCreateRequest creates the GetTestNotificationsAtActionGroupResourceLevel request. -func (client *ActionGroupsClient) getTestNotificationsAtActionGroupResourceLevelCreateRequest(ctx context.Context, resourceGroupName string, actionGroupName string, notificationID string, options *ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/notificationStatus/{notificationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if actionGroupName == "" { - return nil, errors.New("parameter actionGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{actionGroupName}", url.PathEscape(actionGroupName)) - if notificationID == "" { - return nil, errors.New("parameter notificationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{notificationId}", url.PathEscape(notificationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getTestNotificationsAtActionGroupResourceLevelHandleResponse handles the GetTestNotificationsAtActionGroupResourceLevel response. -func (client *ActionGroupsClient) getTestNotificationsAtActionGroupResourceLevelHandleResponse(resp *http.Response) (ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse, error) { - result := ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TestNotificationDetailsResponse); err != nil { - return ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse{}, err - } - return result, nil -} - -// GetTestNotificationsAtResourceGroupLevel - Get the test notifications by the notification id -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// notificationID - The notification id -// options - ActionGroupsClientGetTestNotificationsAtResourceGroupLevelOptions contains the optional parameters for the ActionGroupsClient.GetTestNotificationsAtResourceGroupLevel -// method. -func (client *ActionGroupsClient) GetTestNotificationsAtResourceGroupLevel(ctx context.Context, resourceGroupName string, notificationID string, options *ActionGroupsClientGetTestNotificationsAtResourceGroupLevelOptions) (ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse, error) { - req, err := client.getTestNotificationsAtResourceGroupLevelCreateRequest(ctx, resourceGroupName, notificationID, options) - if err != nil { - return ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse{}, runtime.NewResponseError(resp) - } - return client.getTestNotificationsAtResourceGroupLevelHandleResponse(resp) -} - -// getTestNotificationsAtResourceGroupLevelCreateRequest creates the GetTestNotificationsAtResourceGroupLevel request. -func (client *ActionGroupsClient) getTestNotificationsAtResourceGroupLevelCreateRequest(ctx context.Context, resourceGroupName string, notificationID string, options *ActionGroupsClientGetTestNotificationsAtResourceGroupLevelOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/notificationStatus/{notificationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if notificationID == "" { - return nil, errors.New("parameter notificationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{notificationId}", url.PathEscape(notificationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getTestNotificationsAtResourceGroupLevelHandleResponse handles the GetTestNotificationsAtResourceGroupLevel response. -func (client *ActionGroupsClient) getTestNotificationsAtResourceGroupLevelHandleResponse(resp *http.Response) (ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse, error) { - result := ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TestNotificationDetailsResponse); err != nil { - return ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get a list of all action groups in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - ActionGroupsClientListByResourceGroupOptions contains the optional parameters for the ActionGroupsClient.ListByResourceGroup -// method. -func (client *ActionGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *ActionGroupsClientListByResourceGroupOptions) *runtime.Pager[ActionGroupsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ActionGroupsClientListByResourceGroupResponse]{ - More: func(page ActionGroupsClientListByResourceGroupResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ActionGroupsClientListByResourceGroupResponse) (ActionGroupsClientListByResourceGroupResponse, error) { - req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - if err != nil { - return ActionGroupsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActionGroupsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActionGroupsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ActionGroupsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ActionGroupsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ActionGroupsClient) listByResourceGroupHandleResponse(resp *http.Response) (ActionGroupsClientListByResourceGroupResponse, error) { - result := ActionGroupsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ActionGroupList); err != nil { - return ActionGroupsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionIDPager - Get a list of all action groups in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// options - ActionGroupsClientListBySubscriptionIDOptions contains the optional parameters for the ActionGroupsClient.ListBySubscriptionID -// method. -func (client *ActionGroupsClient) NewListBySubscriptionIDPager(options *ActionGroupsClientListBySubscriptionIDOptions) *runtime.Pager[ActionGroupsClientListBySubscriptionIDResponse] { - return runtime.NewPager(runtime.PagingHandler[ActionGroupsClientListBySubscriptionIDResponse]{ - More: func(page ActionGroupsClientListBySubscriptionIDResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ActionGroupsClientListBySubscriptionIDResponse) (ActionGroupsClientListBySubscriptionIDResponse, error) { - req, err := client.listBySubscriptionIDCreateRequest(ctx, options) - if err != nil { - return ActionGroupsClientListBySubscriptionIDResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActionGroupsClientListBySubscriptionIDResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActionGroupsClientListBySubscriptionIDResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionIDHandleResponse(resp) - }, - }) -} - -// listBySubscriptionIDCreateRequest creates the ListBySubscriptionID request. -func (client *ActionGroupsClient) listBySubscriptionIDCreateRequest(ctx context.Context, options *ActionGroupsClientListBySubscriptionIDOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionIDHandleResponse handles the ListBySubscriptionID response. -func (client *ActionGroupsClient) listBySubscriptionIDHandleResponse(resp *http.Response) (ActionGroupsClientListBySubscriptionIDResponse, error) { - result := ActionGroupsClientListBySubscriptionIDResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ActionGroupList); err != nil { - return ActionGroupsClientListBySubscriptionIDResponse{}, err - } - return result, nil -} - -// BeginPostTestNotifications - Send test notifications to a set of provided receivers -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// notificationRequest - The notification request body which includes the contact details -// options - ActionGroupsClientBeginPostTestNotificationsOptions contains the optional parameters for the ActionGroupsClient.BeginPostTestNotifications -// method. -func (client *ActionGroupsClient) BeginPostTestNotifications(ctx context.Context, notificationRequest NotificationRequestBody, options *ActionGroupsClientBeginPostTestNotificationsOptions) (*runtime.Poller[ActionGroupsClientPostTestNotificationsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.postTestNotifications(ctx, notificationRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ActionGroupsClientPostTestNotificationsResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ActionGroupsClientPostTestNotificationsResponse](options.ResumeToken, client.pl, nil) - } -} - -// PostTestNotifications - Send test notifications to a set of provided receivers -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -func (client *ActionGroupsClient) postTestNotifications(ctx context.Context, notificationRequest NotificationRequestBody, options *ActionGroupsClientBeginPostTestNotificationsOptions) (*http.Response, error) { - req, err := client.postTestNotificationsCreateRequest(ctx, notificationRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// postTestNotificationsCreateRequest creates the PostTestNotifications request. -func (client *ActionGroupsClient) postTestNotificationsCreateRequest(ctx context.Context, notificationRequest NotificationRequestBody, options *ActionGroupsClientBeginPostTestNotificationsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, notificationRequest) -} - -// Update - Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-06-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// actionGroupName - The name of the action group. -// actionGroupPatch - Parameters supplied to the operation. -// options - ActionGroupsClientUpdateOptions contains the optional parameters for the ActionGroupsClient.Update method. -func (client *ActionGroupsClient) Update(ctx context.Context, resourceGroupName string, actionGroupName string, actionGroupPatch ActionGroupPatchBody, options *ActionGroupsClientUpdateOptions) (ActionGroupsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, actionGroupName, actionGroupPatch, options) - if err != nil { - return ActionGroupsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActionGroupsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActionGroupsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *ActionGroupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, actionGroupName string, actionGroupPatch ActionGroupPatchBody, options *ActionGroupsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if actionGroupName == "" { - return nil, errors.New("parameter actionGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{actionGroupName}", url.PathEscape(actionGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-06-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, actionGroupPatch) -} - -// updateHandleResponse handles the Update response. -func (client *ActionGroupsClient) updateHandleResponse(resp *http.Response) (ActionGroupsClientUpdateResponse, error) { - result := ActionGroupsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ActionGroupResource); err != nil { - return ActionGroupsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_activitylogalerts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_activitylogalerts_client.go deleted file mode 100644 index 4cd54a91..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_activitylogalerts_client.go +++ /dev/null @@ -1,402 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ActivityLogAlertsClient contains the methods for the ActivityLogAlerts group. -// Don't use this type directly, use NewActivityLogAlertsClient() instead. -type ActivityLogAlertsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewActivityLogAlertsClient creates a new instance of ActivityLogAlertsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewActivityLogAlertsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ActivityLogAlertsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ActivityLogAlertsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create a new Activity Log Alert rule or update an existing one. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// activityLogAlertName - The name of the Activity Log Alert rule. -// activityLogAlertRule - The Activity Log Alert rule to create or use for the update. -// options - ActivityLogAlertsClientCreateOrUpdateOptions contains the optional parameters for the ActivityLogAlertsClient.CreateOrUpdate -// method. -func (client *ActivityLogAlertsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRule ActivityLogAlertResource, options *ActivityLogAlertsClientCreateOrUpdateOptions) (ActivityLogAlertsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, activityLogAlertName, activityLogAlertRule, options) - if err != nil { - return ActivityLogAlertsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActivityLogAlertsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ActivityLogAlertsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ActivityLogAlertsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRule ActivityLogAlertResource, options *ActivityLogAlertsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if activityLogAlertName == "" { - return nil, errors.New("parameter activityLogAlertName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{activityLogAlertName}", url.PathEscape(activityLogAlertName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, activityLogAlertRule) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ActivityLogAlertsClient) createOrUpdateHandleResponse(resp *http.Response) (ActivityLogAlertsClientCreateOrUpdateResponse, error) { - result := ActivityLogAlertsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ActivityLogAlertResource); err != nil { - return ActivityLogAlertsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete an Activity Log Alert rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// activityLogAlertName - The name of the Activity Log Alert rule. -// options - ActivityLogAlertsClientDeleteOptions contains the optional parameters for the ActivityLogAlertsClient.Delete -// method. -func (client *ActivityLogAlertsClient) Delete(ctx context.Context, resourceGroupName string, activityLogAlertName string, options *ActivityLogAlertsClientDeleteOptions) (ActivityLogAlertsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, activityLogAlertName, options) - if err != nil { - return ActivityLogAlertsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActivityLogAlertsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ActivityLogAlertsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ActivityLogAlertsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ActivityLogAlertsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, activityLogAlertName string, options *ActivityLogAlertsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if activityLogAlertName == "" { - return nil, errors.New("parameter activityLogAlertName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{activityLogAlertName}", url.PathEscape(activityLogAlertName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get an Activity Log Alert rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// activityLogAlertName - The name of the Activity Log Alert rule. -// options - ActivityLogAlertsClientGetOptions contains the optional parameters for the ActivityLogAlertsClient.Get method. -func (client *ActivityLogAlertsClient) Get(ctx context.Context, resourceGroupName string, activityLogAlertName string, options *ActivityLogAlertsClientGetOptions) (ActivityLogAlertsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, activityLogAlertName, options) - if err != nil { - return ActivityLogAlertsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActivityLogAlertsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActivityLogAlertsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ActivityLogAlertsClient) getCreateRequest(ctx context.Context, resourceGroupName string, activityLogAlertName string, options *ActivityLogAlertsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if activityLogAlertName == "" { - return nil, errors.New("parameter activityLogAlertName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{activityLogAlertName}", url.PathEscape(activityLogAlertName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ActivityLogAlertsClient) getHandleResponse(resp *http.Response) (ActivityLogAlertsClientGetResponse, error) { - result := ActivityLogAlertsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ActivityLogAlertResource); err != nil { - return ActivityLogAlertsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Get a list of all Activity Log Alert rules in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - ActivityLogAlertsClientListByResourceGroupOptions contains the optional parameters for the ActivityLogAlertsClient.ListByResourceGroup -// method. -func (client *ActivityLogAlertsClient) NewListByResourceGroupPager(resourceGroupName string, options *ActivityLogAlertsClientListByResourceGroupOptions) *runtime.Pager[ActivityLogAlertsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ActivityLogAlertsClientListByResourceGroupResponse]{ - More: func(page ActivityLogAlertsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ActivityLogAlertsClientListByResourceGroupResponse) (ActivityLogAlertsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ActivityLogAlertsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActivityLogAlertsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActivityLogAlertsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ActivityLogAlertsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ActivityLogAlertsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ActivityLogAlertsClient) listByResourceGroupHandleResponse(resp *http.Response) (ActivityLogAlertsClientListByResourceGroupResponse, error) { - result := ActivityLogAlertsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AlertRuleList); err != nil { - return ActivityLogAlertsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionIDPager - Get a list of all Activity Log Alert rules in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// options - ActivityLogAlertsClientListBySubscriptionIDOptions contains the optional parameters for the ActivityLogAlertsClient.ListBySubscriptionID -// method. -func (client *ActivityLogAlertsClient) NewListBySubscriptionIDPager(options *ActivityLogAlertsClientListBySubscriptionIDOptions) *runtime.Pager[ActivityLogAlertsClientListBySubscriptionIDResponse] { - return runtime.NewPager(runtime.PagingHandler[ActivityLogAlertsClientListBySubscriptionIDResponse]{ - More: func(page ActivityLogAlertsClientListBySubscriptionIDResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ActivityLogAlertsClientListBySubscriptionIDResponse) (ActivityLogAlertsClientListBySubscriptionIDResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionIDCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ActivityLogAlertsClientListBySubscriptionIDResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActivityLogAlertsClientListBySubscriptionIDResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActivityLogAlertsClientListBySubscriptionIDResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionIDHandleResponse(resp) - }, - }) -} - -// listBySubscriptionIDCreateRequest creates the ListBySubscriptionID request. -func (client *ActivityLogAlertsClient) listBySubscriptionIDCreateRequest(ctx context.Context, options *ActivityLogAlertsClientListBySubscriptionIDOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/activityLogAlerts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionIDHandleResponse handles the ListBySubscriptionID response. -func (client *ActivityLogAlertsClient) listBySubscriptionIDHandleResponse(resp *http.Response) (ActivityLogAlertsClientListBySubscriptionIDResponse, error) { - result := ActivityLogAlertsClientListBySubscriptionIDResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AlertRuleList); err != nil { - return ActivityLogAlertsClientListBySubscriptionIDResponse{}, err - } - return result, nil -} - -// Update - Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, -// and to enable or disable the Alert rule. To update other fields use CreateOrUpdate -// operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// activityLogAlertName - The name of the Activity Log Alert rule. -// activityLogAlertRulePatch - Parameters supplied to the operation. -// options - ActivityLogAlertsClientUpdateOptions contains the optional parameters for the ActivityLogAlertsClient.Update -// method. -func (client *ActivityLogAlertsClient) Update(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRulePatch AlertRulePatchObject, options *ActivityLogAlertsClientUpdateOptions) (ActivityLogAlertsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, activityLogAlertName, activityLogAlertRulePatch, options) - if err != nil { - return ActivityLogAlertsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActivityLogAlertsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActivityLogAlertsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *ActivityLogAlertsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRulePatch AlertRulePatchObject, options *ActivityLogAlertsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if activityLogAlertName == "" { - return nil, errors.New("parameter activityLogAlertName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{activityLogAlertName}", url.PathEscape(activityLogAlertName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, activityLogAlertRulePatch) -} - -// updateHandleResponse handles the Update response. -func (client *ActivityLogAlertsClient) updateHandleResponse(resp *http.Response) (ActivityLogAlertsClientUpdateResponse, error) { - result := ActivityLogAlertsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ActivityLogAlertResource); err != nil { - return ActivityLogAlertsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_activitylogs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_activitylogs_client.go deleted file mode 100644 index c36fd37a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_activitylogs_client.go +++ /dev/null @@ -1,132 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ActivityLogsClient contains the methods for the ActivityLogs group. -// Don't use this type directly, use NewActivityLogsClient() instead. -type ActivityLogsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewActivityLogsClient creates a new instance of ActivityLogsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewActivityLogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ActivityLogsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ActivityLogsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Provides the list of records from the activity logs. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2015-04-01 -// filter - Reduces the set of data collected. -// This argument is required and it also requires at least the start date/time. -// The $filter argument is very restricted and allows only the following patterns. -// - List events for a resource group: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' -// and resourceGroupName eq 'resourceGroupName'. -// - List events for resource: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' -// and resourceUri eq 'resourceURI'. -// - List events for a subscription in a time range: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp -// le '2014-07-20T04:36:37.6407898Z'. -// - List events for a resource provider: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' -// and resourceProvider eq 'resourceProviderName'. -// - List events for a correlation Id: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' -// and correlationId eq 'correlationID'. -// NOTE: No other syntax is allowed. -// options - ActivityLogsClientListOptions contains the optional parameters for the ActivityLogsClient.List method. -func (client *ActivityLogsClient) NewListPager(filter string, options *ActivityLogsClientListOptions) *runtime.Pager[ActivityLogsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ActivityLogsClientListResponse]{ - More: func(page ActivityLogsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ActivityLogsClientListResponse) (ActivityLogsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, filter, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ActivityLogsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ActivityLogsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ActivityLogsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ActivityLogsClient) listCreateRequest(ctx context.Context, filter string, options *ActivityLogsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/eventtypes/management/values" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2015-04-01") - reqQP.Set("$filter", filter) - if options != nil && options.Select != nil { - reqQP.Set("$select", *options.Select) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ActivityLogsClient) listHandleResponse(resp *http.Response) (ActivityLogsClientListResponse, error) { - result := ActivityLogsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EventDataCollection); err != nil { - return ActivityLogsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_alertruleincidents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_alertruleincidents_client.go deleted file mode 100644 index 12f912fa..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_alertruleincidents_client.go +++ /dev/null @@ -1,180 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AlertRuleIncidentsClient contains the methods for the AlertRuleIncidents group. -// Don't use this type directly, use NewAlertRuleIncidentsClient() instead. -type AlertRuleIncidentsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAlertRuleIncidentsClient creates a new instance of AlertRuleIncidentsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAlertRuleIncidentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertRuleIncidentsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AlertRuleIncidentsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets an incident associated to an alert rule -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// incidentName - The name of the incident to retrieve. -// options - AlertRuleIncidentsClientGetOptions contains the optional parameters for the AlertRuleIncidentsClient.Get method. -func (client *AlertRuleIncidentsClient) Get(ctx context.Context, resourceGroupName string, ruleName string, incidentName string, options *AlertRuleIncidentsClientGetOptions) (AlertRuleIncidentsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, ruleName, incidentName, options) - if err != nil { - return AlertRuleIncidentsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AlertRuleIncidentsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertRuleIncidentsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *AlertRuleIncidentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, incidentName string, options *AlertRuleIncidentsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents/{incidentName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if incidentName == "" { - return nil, errors.New("parameter incidentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{incidentName}", url.PathEscape(incidentName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AlertRuleIncidentsClient) getHandleResponse(resp *http.Response) (AlertRuleIncidentsClientGetResponse, error) { - result := AlertRuleIncidentsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Incident); err != nil { - return AlertRuleIncidentsClientGetResponse{}, err - } - return result, nil -} - -// NewListByAlertRulePager - Gets a list of incidents associated to an alert rule -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// options - AlertRuleIncidentsClientListByAlertRuleOptions contains the optional parameters for the AlertRuleIncidentsClient.ListByAlertRule -// method. -func (client *AlertRuleIncidentsClient) NewListByAlertRulePager(resourceGroupName string, ruleName string, options *AlertRuleIncidentsClientListByAlertRuleOptions) *runtime.Pager[AlertRuleIncidentsClientListByAlertRuleResponse] { - return runtime.NewPager(runtime.PagingHandler[AlertRuleIncidentsClientListByAlertRuleResponse]{ - More: func(page AlertRuleIncidentsClientListByAlertRuleResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *AlertRuleIncidentsClientListByAlertRuleResponse) (AlertRuleIncidentsClientListByAlertRuleResponse, error) { - req, err := client.listByAlertRuleCreateRequest(ctx, resourceGroupName, ruleName, options) - if err != nil { - return AlertRuleIncidentsClientListByAlertRuleResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AlertRuleIncidentsClientListByAlertRuleResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertRuleIncidentsClientListByAlertRuleResponse{}, runtime.NewResponseError(resp) - } - return client.listByAlertRuleHandleResponse(resp) - }, - }) -} - -// listByAlertRuleCreateRequest creates the ListByAlertRule request. -func (client *AlertRuleIncidentsClient) listByAlertRuleCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, options *AlertRuleIncidentsClientListByAlertRuleOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByAlertRuleHandleResponse handles the ListByAlertRule response. -func (client *AlertRuleIncidentsClient) listByAlertRuleHandleResponse(resp *http.Response) (AlertRuleIncidentsClientListByAlertRuleResponse, error) { - result := AlertRuleIncidentsClientListByAlertRuleResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IncidentListResult); err != nil { - return AlertRuleIncidentsClientListByAlertRuleResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_alertrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_alertrules_client.go deleted file mode 100644 index 97b1a5e8..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_alertrules_client.go +++ /dev/null @@ -1,386 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AlertRulesClient contains the methods for the AlertRules group. -// Don't use this type directly, use NewAlertRulesClient() instead. -type AlertRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAlertRulesClient creates a new instance of AlertRulesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAlertRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AlertRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AlertRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a classic metric alert rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// parameters - The parameters of the rule to create or update. -// options - AlertRulesClientCreateOrUpdateOptions contains the optional parameters for the AlertRulesClient.CreateOrUpdate -// method. -func (client *AlertRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertRuleResource, options *AlertRulesClientCreateOrUpdateOptions) (AlertRulesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ruleName, parameters, options) - if err != nil { - return AlertRulesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AlertRulesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AlertRulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *AlertRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertRuleResource, options *AlertRulesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *AlertRulesClient) createOrUpdateHandleResponse(resp *http.Response) (AlertRulesClientCreateOrUpdateResponse, error) { - result := AlertRulesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AlertRuleResource); err != nil { - return AlertRulesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes a classic metric alert rule -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// options - AlertRulesClientDeleteOptions contains the optional parameters for the AlertRulesClient.Delete method. -func (client *AlertRulesClient) Delete(ctx context.Context, resourceGroupName string, ruleName string, options *AlertRulesClientDeleteOptions) (AlertRulesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, ruleName, options) - if err != nil { - return AlertRulesClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AlertRulesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return AlertRulesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return AlertRulesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *AlertRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, options *AlertRulesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a classic metric alert rule -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// options - AlertRulesClientGetOptions contains the optional parameters for the AlertRulesClient.Get method. -func (client *AlertRulesClient) Get(ctx context.Context, resourceGroupName string, ruleName string, options *AlertRulesClientGetOptions) (AlertRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, ruleName, options) - if err != nil { - return AlertRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AlertRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *AlertRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, options *AlertRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AlertRulesClient) getHandleResponse(resp *http.Response) (AlertRulesClientGetResponse, error) { - result := AlertRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AlertRuleResource); err != nil { - return AlertRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List the classic metric alert rules within a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - AlertRulesClientListByResourceGroupOptions contains the optional parameters for the AlertRulesClient.ListByResourceGroup -// method. -func (client *AlertRulesClient) NewListByResourceGroupPager(resourceGroupName string, options *AlertRulesClientListByResourceGroupOptions) *runtime.Pager[AlertRulesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[AlertRulesClientListByResourceGroupResponse]{ - More: func(page AlertRulesClientListByResourceGroupResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *AlertRulesClientListByResourceGroupResponse) (AlertRulesClientListByResourceGroupResponse, error) { - req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - if err != nil { - return AlertRulesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AlertRulesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertRulesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *AlertRulesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *AlertRulesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *AlertRulesClient) listByResourceGroupHandleResponse(resp *http.Response) (AlertRulesClientListByResourceGroupResponse, error) { - result := AlertRulesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AlertRuleResourceCollection); err != nil { - return AlertRulesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - List the classic metric alert rules within a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// options - AlertRulesClientListBySubscriptionOptions contains the optional parameters for the AlertRulesClient.ListBySubscription -// method. -func (client *AlertRulesClient) NewListBySubscriptionPager(options *AlertRulesClientListBySubscriptionOptions) *runtime.Pager[AlertRulesClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[AlertRulesClientListBySubscriptionResponse]{ - More: func(page AlertRulesClientListBySubscriptionResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *AlertRulesClientListBySubscriptionResponse) (AlertRulesClientListBySubscriptionResponse, error) { - req, err := client.listBySubscriptionCreateRequest(ctx, options) - if err != nil { - return AlertRulesClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AlertRulesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AlertRulesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *AlertRulesClient) listBySubscriptionCreateRequest(ctx context.Context, options *AlertRulesClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *AlertRulesClient) listBySubscriptionHandleResponse(resp *http.Response) (AlertRulesClientListBySubscriptionResponse, error) { - result := AlertRulesClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AlertRuleResourceCollection); err != nil { - return AlertRulesClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// alertRulesResource - Parameters supplied to the operation. -// options - AlertRulesClientUpdateOptions contains the optional parameters for the AlertRulesClient.Update method. -func (client *AlertRulesClient) Update(ctx context.Context, resourceGroupName string, ruleName string, alertRulesResource AlertRuleResourcePatch, options *AlertRulesClientUpdateOptions) (AlertRulesClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, ruleName, alertRulesResource, options) - if err != nil { - return AlertRulesClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AlertRulesClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AlertRulesClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *AlertRulesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, alertRulesResource AlertRuleResourcePatch, options *AlertRulesClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, alertRulesResource) -} - -// updateHandleResponse handles the Update response. -func (client *AlertRulesClient) updateHandleResponse(resp *http.Response) (AlertRulesClientUpdateResponse, error) { - result := AlertRulesClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AlertRuleResource); err != nil { - return AlertRulesClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_autoscalesettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_autoscalesettings_client.go deleted file mode 100644 index 9d3125da..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_autoscalesettings_client.go +++ /dev/null @@ -1,400 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AutoscaleSettingsClient contains the methods for the AutoscaleSettings group. -// Don't use this type directly, use NewAutoscaleSettingsClient() instead. -type AutoscaleSettingsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAutoscaleSettingsClient creates a new instance of AutoscaleSettingsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAutoscaleSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AutoscaleSettingsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AutoscaleSettingsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates an autoscale setting. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2015-04-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// autoscaleSettingName - The autoscale setting name. -// parameters - Parameters supplied to the operation. -// options - AutoscaleSettingsClientCreateOrUpdateOptions contains the optional parameters for the AutoscaleSettingsClient.CreateOrUpdate -// method. -func (client *AutoscaleSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, autoscaleSettingName string, parameters AutoscaleSettingResource, options *AutoscaleSettingsClientCreateOrUpdateOptions) (AutoscaleSettingsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, autoscaleSettingName, parameters, options) - if err != nil { - return AutoscaleSettingsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AutoscaleSettingsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AutoscaleSettingsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *AutoscaleSettingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, autoscaleSettingName string, parameters AutoscaleSettingResource, options *AutoscaleSettingsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if autoscaleSettingName == "" { - return nil, errors.New("parameter autoscaleSettingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{autoscaleSettingName}", url.PathEscape(autoscaleSettingName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2015-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *AutoscaleSettingsClient) createOrUpdateHandleResponse(resp *http.Response) (AutoscaleSettingsClientCreateOrUpdateResponse, error) { - result := AutoscaleSettingsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AutoscaleSettingResource); err != nil { - return AutoscaleSettingsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes and autoscale setting -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2015-04-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// autoscaleSettingName - The autoscale setting name. -// options - AutoscaleSettingsClientDeleteOptions contains the optional parameters for the AutoscaleSettingsClient.Delete -// method. -func (client *AutoscaleSettingsClient) Delete(ctx context.Context, resourceGroupName string, autoscaleSettingName string, options *AutoscaleSettingsClientDeleteOptions) (AutoscaleSettingsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, autoscaleSettingName, options) - if err != nil { - return AutoscaleSettingsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AutoscaleSettingsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return AutoscaleSettingsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return AutoscaleSettingsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *AutoscaleSettingsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, autoscaleSettingName string, options *AutoscaleSettingsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if autoscaleSettingName == "" { - return nil, errors.New("parameter autoscaleSettingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{autoscaleSettingName}", url.PathEscape(autoscaleSettingName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2015-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets an autoscale setting -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2015-04-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// autoscaleSettingName - The autoscale setting name. -// options - AutoscaleSettingsClientGetOptions contains the optional parameters for the AutoscaleSettingsClient.Get method. -func (client *AutoscaleSettingsClient) Get(ctx context.Context, resourceGroupName string, autoscaleSettingName string, options *AutoscaleSettingsClientGetOptions) (AutoscaleSettingsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, autoscaleSettingName, options) - if err != nil { - return AutoscaleSettingsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AutoscaleSettingsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AutoscaleSettingsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *AutoscaleSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, autoscaleSettingName string, options *AutoscaleSettingsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if autoscaleSettingName == "" { - return nil, errors.New("parameter autoscaleSettingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{autoscaleSettingName}", url.PathEscape(autoscaleSettingName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2015-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AutoscaleSettingsClient) getHandleResponse(resp *http.Response) (AutoscaleSettingsClientGetResponse, error) { - result := AutoscaleSettingsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AutoscaleSettingResource); err != nil { - return AutoscaleSettingsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists the autoscale settings for a resource group -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2015-04-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - AutoscaleSettingsClientListByResourceGroupOptions contains the optional parameters for the AutoscaleSettingsClient.ListByResourceGroup -// method. -func (client *AutoscaleSettingsClient) NewListByResourceGroupPager(resourceGroupName string, options *AutoscaleSettingsClientListByResourceGroupOptions) *runtime.Pager[AutoscaleSettingsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[AutoscaleSettingsClientListByResourceGroupResponse]{ - More: func(page AutoscaleSettingsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AutoscaleSettingsClientListByResourceGroupResponse) (AutoscaleSettingsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AutoscaleSettingsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AutoscaleSettingsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AutoscaleSettingsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *AutoscaleSettingsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *AutoscaleSettingsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2015-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *AutoscaleSettingsClient) listByResourceGroupHandleResponse(resp *http.Response) (AutoscaleSettingsClientListByResourceGroupResponse, error) { - result := AutoscaleSettingsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AutoscaleSettingResourceCollection); err != nil { - return AutoscaleSettingsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Lists the autoscale settings for a subscription -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2015-04-01 -// options - AutoscaleSettingsClientListBySubscriptionOptions contains the optional parameters for the AutoscaleSettingsClient.ListBySubscription -// method. -func (client *AutoscaleSettingsClient) NewListBySubscriptionPager(options *AutoscaleSettingsClientListBySubscriptionOptions) *runtime.Pager[AutoscaleSettingsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[AutoscaleSettingsClientListBySubscriptionResponse]{ - More: func(page AutoscaleSettingsClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AutoscaleSettingsClientListBySubscriptionResponse) (AutoscaleSettingsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AutoscaleSettingsClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AutoscaleSettingsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AutoscaleSettingsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *AutoscaleSettingsClient) listBySubscriptionCreateRequest(ctx context.Context, options *AutoscaleSettingsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2015-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *AutoscaleSettingsClient) listBySubscriptionHandleResponse(resp *http.Response) (AutoscaleSettingsClientListBySubscriptionResponse, error) { - result := AutoscaleSettingsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AutoscaleSettingResourceCollection); err != nil { - return AutoscaleSettingsClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2015-04-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// autoscaleSettingName - The autoscale setting name. -// autoscaleSettingResource - Parameters supplied to the operation. -// options - AutoscaleSettingsClientUpdateOptions contains the optional parameters for the AutoscaleSettingsClient.Update -// method. -func (client *AutoscaleSettingsClient) Update(ctx context.Context, resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource AutoscaleSettingResourcePatch, options *AutoscaleSettingsClientUpdateOptions) (AutoscaleSettingsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, autoscaleSettingName, autoscaleSettingResource, options) - if err != nil { - return AutoscaleSettingsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AutoscaleSettingsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AutoscaleSettingsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *AutoscaleSettingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource AutoscaleSettingResourcePatch, options *AutoscaleSettingsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if autoscaleSettingName == "" { - return nil, errors.New("parameter autoscaleSettingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{autoscaleSettingName}", url.PathEscape(autoscaleSettingName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2015-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, autoscaleSettingResource) -} - -// updateHandleResponse handles the Update response. -func (client *AutoscaleSettingsClient) updateHandleResponse(resp *http.Response) (AutoscaleSettingsClientUpdateResponse, error) { - result := AutoscaleSettingsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AutoscaleSettingResource); err != nil { - return AutoscaleSettingsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_baselines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_baselines_client.go deleted file mode 100644 index 430b7f1c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_baselines_client.go +++ /dev/null @@ -1,125 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "strings" -) - -// BaselinesClient contains the methods for the Baselines group. -// Don't use this type directly, use NewBaselinesClient() instead. -type BaselinesClient struct { - host string - pl runtime.Pipeline -} - -// NewBaselinesClient creates a new instance of BaselinesClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBaselinesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*BaselinesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BaselinesClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists the metric baseline values for a resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-03-01 -// resourceURI - The identifier of the resource. -// options - BaselinesClientListOptions contains the optional parameters for the BaselinesClient.List method. -func (client *BaselinesClient) NewListPager(resourceURI string, options *BaselinesClientListOptions) *runtime.Pager[BaselinesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BaselinesClientListResponse]{ - More: func(page BaselinesClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *BaselinesClientListResponse) (BaselinesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceURI, options) - if err != nil { - return BaselinesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BaselinesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BaselinesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BaselinesClient) listCreateRequest(ctx context.Context, resourceURI string, options *BaselinesClientListOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/metricBaselines" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Metricnames != nil { - reqQP.Set("metricnames", *options.Metricnames) - } - if options != nil && options.Metricnamespace != nil { - reqQP.Set("metricnamespace", *options.Metricnamespace) - } - if options != nil && options.Timespan != nil { - reqQP.Set("timespan", *options.Timespan) - } - if options != nil && options.Interval != nil { - reqQP.Set("interval", *options.Interval) - } - if options != nil && options.Aggregation != nil { - reqQP.Set("aggregation", *options.Aggregation) - } - if options != nil && options.Sensitivities != nil { - reqQP.Set("sensitivities", *options.Sensitivities) - } - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.ResultType != nil { - reqQP.Set("resultType", string(*options.ResultType)) - } - reqQP.Set("api-version", "2019-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BaselinesClient) listHandleResponse(resp *http.Response) (BaselinesClientListResponse, error) { - result := BaselinesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MetricBaselinesResponse); err != nil { - return BaselinesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_constants.go deleted file mode 100644 index 47f71060..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_constants.go +++ /dev/null @@ -1,1038 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -const ( - moduleName = "armmonitor" - moduleVersion = "v0.7.0" -) - -// AggregationType - the aggregation type of the metric. -type AggregationType string - -const ( - AggregationTypeNone AggregationType = "None" - AggregationTypeAverage AggregationType = "Average" - AggregationTypeCount AggregationType = "Count" - AggregationTypeMinimum AggregationType = "Minimum" - AggregationTypeMaximum AggregationType = "Maximum" - AggregationTypeTotal AggregationType = "Total" -) - -// PossibleAggregationTypeValues returns the possible values for the AggregationType const type. -func PossibleAggregationTypeValues() []AggregationType { - return []AggregationType{ - AggregationTypeNone, - AggregationTypeAverage, - AggregationTypeCount, - AggregationTypeMinimum, - AggregationTypeMaximum, - AggregationTypeTotal, - } -} - -// AggregationTypeEnum - the criteria time aggregation types. -type AggregationTypeEnum string - -const ( - AggregationTypeEnumAverage AggregationTypeEnum = "Average" - AggregationTypeEnumCount AggregationTypeEnum = "Count" - AggregationTypeEnumMaximum AggregationTypeEnum = "Maximum" - AggregationTypeEnumMinimum AggregationTypeEnum = "Minimum" - AggregationTypeEnumTotal AggregationTypeEnum = "Total" -) - -// PossibleAggregationTypeEnumValues returns the possible values for the AggregationTypeEnum const type. -func PossibleAggregationTypeEnumValues() []AggregationTypeEnum { - return []AggregationTypeEnum{ - AggregationTypeEnumAverage, - AggregationTypeEnumCount, - AggregationTypeEnumMaximum, - AggregationTypeEnumMinimum, - AggregationTypeEnumTotal, - } -} - -// AlertSeverity - Severity Level of Alert -type AlertSeverity string - -const ( - AlertSeverityFour AlertSeverity = "4" - AlertSeverityOne AlertSeverity = "1" - AlertSeverityThree AlertSeverity = "3" - AlertSeverityTwo AlertSeverity = "2" - AlertSeverityZero AlertSeverity = "0" -) - -// PossibleAlertSeverityValues returns the possible values for the AlertSeverity const type. -func PossibleAlertSeverityValues() []AlertSeverity { - return []AlertSeverity{ - AlertSeverityFour, - AlertSeverityOne, - AlertSeverityThree, - AlertSeverityTwo, - AlertSeverityZero, - } -} - -// BaselineSensitivity - the sensitivity of the baseline. -type BaselineSensitivity string - -const ( - BaselineSensitivityHigh BaselineSensitivity = "High" - BaselineSensitivityLow BaselineSensitivity = "Low" - BaselineSensitivityMedium BaselineSensitivity = "Medium" -) - -// PossibleBaselineSensitivityValues returns the possible values for the BaselineSensitivity const type. -func PossibleBaselineSensitivityValues() []BaselineSensitivity { - return []BaselineSensitivity{ - BaselineSensitivityHigh, - BaselineSensitivityLow, - BaselineSensitivityMedium, - } -} - -// CategoryType - The type of the diagnostic settings category. -type CategoryType string - -const ( - CategoryTypeMetrics CategoryType = "Metrics" - CategoryTypeLogs CategoryType = "Logs" -) - -// PossibleCategoryTypeValues returns the possible values for the CategoryType const type. -func PossibleCategoryTypeValues() []CategoryType { - return []CategoryType{ - CategoryTypeMetrics, - CategoryTypeLogs, - } -} - -// ComparisonOperationType - the operator that is used to compare the metric data and the threshold. -type ComparisonOperationType string - -const ( - ComparisonOperationTypeEquals ComparisonOperationType = "Equals" - ComparisonOperationTypeNotEquals ComparisonOperationType = "NotEquals" - ComparisonOperationTypeGreaterThan ComparisonOperationType = "GreaterThan" - ComparisonOperationTypeGreaterThanOrEqual ComparisonOperationType = "GreaterThanOrEqual" - ComparisonOperationTypeLessThan ComparisonOperationType = "LessThan" - ComparisonOperationTypeLessThanOrEqual ComparisonOperationType = "LessThanOrEqual" -) - -// PossibleComparisonOperationTypeValues returns the possible values for the ComparisonOperationType const type. -func PossibleComparisonOperationTypeValues() []ComparisonOperationType { - return []ComparisonOperationType{ - ComparisonOperationTypeEquals, - ComparisonOperationTypeNotEquals, - ComparisonOperationTypeGreaterThan, - ComparisonOperationTypeGreaterThanOrEqual, - ComparisonOperationTypeLessThan, - ComparisonOperationTypeLessThanOrEqual, - } -} - -// ConditionOperator - Operators allowed in the rule condition. -type ConditionOperator string - -const ( - ConditionOperatorGreaterThan ConditionOperator = "GreaterThan" - ConditionOperatorGreaterThanOrEqual ConditionOperator = "GreaterThanOrEqual" - ConditionOperatorLessThan ConditionOperator = "LessThan" - ConditionOperatorLessThanOrEqual ConditionOperator = "LessThanOrEqual" -) - -// PossibleConditionOperatorValues returns the possible values for the ConditionOperator const type. -func PossibleConditionOperatorValues() []ConditionOperator { - return []ConditionOperator{ - ConditionOperatorGreaterThan, - ConditionOperatorGreaterThanOrEqual, - ConditionOperatorLessThan, - ConditionOperatorLessThanOrEqual, - } -} - -// ConditionalOperator - Result Condition Evaluation criteria. -type ConditionalOperator string - -const ( - ConditionalOperatorEqual ConditionalOperator = "Equal" - ConditionalOperatorGreaterThan ConditionalOperator = "GreaterThan" - ConditionalOperatorGreaterThanOrEqual ConditionalOperator = "GreaterThanOrEqual" - ConditionalOperatorLessThan ConditionalOperator = "LessThan" - ConditionalOperatorLessThanOrEqual ConditionalOperator = "LessThanOrEqual" -) - -// PossibleConditionalOperatorValues returns the possible values for the ConditionalOperator const type. -func PossibleConditionalOperatorValues() []ConditionalOperator { - return []ConditionalOperator{ - ConditionalOperatorEqual, - ConditionalOperatorGreaterThan, - ConditionalOperatorGreaterThanOrEqual, - ConditionalOperatorLessThan, - ConditionalOperatorLessThanOrEqual, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// CriterionType - Specifies the type of threshold criteria -type CriterionType string - -const ( - CriterionTypeDynamicThresholdCriterion CriterionType = "DynamicThresholdCriterion" - CriterionTypeStaticThresholdCriterion CriterionType = "StaticThresholdCriterion" -) - -// PossibleCriterionTypeValues returns the possible values for the CriterionType const type. -func PossibleCriterionTypeValues() []CriterionType { - return []CriterionType{ - CriterionTypeDynamicThresholdCriterion, - CriterionTypeStaticThresholdCriterion, - } -} - -// DataStatus - The status of VM Insights data from the resource. When reported as present the data array will contain information -// about the data containers to which data for the specified resource is being routed. -type DataStatus string - -const ( - DataStatusNotPresent DataStatus = "notPresent" - DataStatusPresent DataStatus = "present" -) - -// PossibleDataStatusValues returns the possible values for the DataStatus const type. -func PossibleDataStatusValues() []DataStatus { - return []DataStatus{ - DataStatusNotPresent, - DataStatusPresent, - } -} - -// DynamicThresholdOperator - The operator used to compare the metric value against the threshold. -type DynamicThresholdOperator string - -const ( - DynamicThresholdOperatorGreaterOrLessThan DynamicThresholdOperator = "GreaterOrLessThan" - DynamicThresholdOperatorGreaterThan DynamicThresholdOperator = "GreaterThan" - DynamicThresholdOperatorLessThan DynamicThresholdOperator = "LessThan" -) - -// PossibleDynamicThresholdOperatorValues returns the possible values for the DynamicThresholdOperator const type. -func PossibleDynamicThresholdOperatorValues() []DynamicThresholdOperator { - return []DynamicThresholdOperator{ - DynamicThresholdOperatorGreaterOrLessThan, - DynamicThresholdOperatorGreaterThan, - DynamicThresholdOperatorLessThan, - } -} - -// DynamicThresholdSensitivity - The extent of deviation required to trigger an alert. This will affect how tight the threshold -// is to the metric series pattern. -type DynamicThresholdSensitivity string - -const ( - DynamicThresholdSensitivityHigh DynamicThresholdSensitivity = "High" - DynamicThresholdSensitivityLow DynamicThresholdSensitivity = "Low" - DynamicThresholdSensitivityMedium DynamicThresholdSensitivity = "Medium" -) - -// PossibleDynamicThresholdSensitivityValues returns the possible values for the DynamicThresholdSensitivity const type. -func PossibleDynamicThresholdSensitivityValues() []DynamicThresholdSensitivity { - return []DynamicThresholdSensitivity{ - DynamicThresholdSensitivityHigh, - DynamicThresholdSensitivityLow, - DynamicThresholdSensitivityMedium, - } -} - -// Enabled - The flag which indicates whether the Log Search rule is enabled. Value should be true or false -type Enabled string - -const ( - EnabledFalse Enabled = "false" - EnabledTrue Enabled = "true" -) - -// PossibleEnabledValues returns the possible values for the Enabled const type. -func PossibleEnabledValues() []Enabled { - return []Enabled{ - EnabledFalse, - EnabledTrue, - } -} - -// EventLevel - the event level -type EventLevel string - -const ( - EventLevelCritical EventLevel = "Critical" - EventLevelError EventLevel = "Error" - EventLevelWarning EventLevel = "Warning" - EventLevelInformational EventLevel = "Informational" - EventLevelVerbose EventLevel = "Verbose" -) - -// PossibleEventLevelValues returns the possible values for the EventLevel const type. -func PossibleEventLevelValues() []EventLevel { - return []EventLevel{ - EventLevelCritical, - EventLevelError, - EventLevelWarning, - EventLevelInformational, - EventLevelVerbose, - } -} - -// KnownColumnDefinitionType - The type of the column data. -type KnownColumnDefinitionType string - -const ( - KnownColumnDefinitionTypeBoolean KnownColumnDefinitionType = "boolean" - KnownColumnDefinitionTypeDatetime KnownColumnDefinitionType = "datetime" - KnownColumnDefinitionTypeDynamic KnownColumnDefinitionType = "dynamic" - KnownColumnDefinitionTypeInt KnownColumnDefinitionType = "int" - KnownColumnDefinitionTypeLong KnownColumnDefinitionType = "long" - KnownColumnDefinitionTypeReal KnownColumnDefinitionType = "real" - KnownColumnDefinitionTypeString KnownColumnDefinitionType = "string" -) - -// PossibleKnownColumnDefinitionTypeValues returns the possible values for the KnownColumnDefinitionType const type. -func PossibleKnownColumnDefinitionTypeValues() []KnownColumnDefinitionType { - return []KnownColumnDefinitionType{ - KnownColumnDefinitionTypeBoolean, - KnownColumnDefinitionTypeDatetime, - KnownColumnDefinitionTypeDynamic, - KnownColumnDefinitionTypeInt, - KnownColumnDefinitionTypeLong, - KnownColumnDefinitionTypeReal, - KnownColumnDefinitionTypeString, - } -} - -// KnownDataCollectionEndpointProvisioningState - The resource provisioning state. This property is READ-ONLY. -type KnownDataCollectionEndpointProvisioningState string - -const ( - KnownDataCollectionEndpointProvisioningStateCreating KnownDataCollectionEndpointProvisioningState = "Creating" - KnownDataCollectionEndpointProvisioningStateDeleting KnownDataCollectionEndpointProvisioningState = "Deleting" - KnownDataCollectionEndpointProvisioningStateFailed KnownDataCollectionEndpointProvisioningState = "Failed" - KnownDataCollectionEndpointProvisioningStateSucceeded KnownDataCollectionEndpointProvisioningState = "Succeeded" - KnownDataCollectionEndpointProvisioningStateUpdating KnownDataCollectionEndpointProvisioningState = "Updating" -) - -// PossibleKnownDataCollectionEndpointProvisioningStateValues returns the possible values for the KnownDataCollectionEndpointProvisioningState const type. -func PossibleKnownDataCollectionEndpointProvisioningStateValues() []KnownDataCollectionEndpointProvisioningState { - return []KnownDataCollectionEndpointProvisioningState{ - KnownDataCollectionEndpointProvisioningStateCreating, - KnownDataCollectionEndpointProvisioningStateDeleting, - KnownDataCollectionEndpointProvisioningStateFailed, - KnownDataCollectionEndpointProvisioningStateSucceeded, - KnownDataCollectionEndpointProvisioningStateUpdating, - } -} - -// KnownDataCollectionEndpointResourceKind - The kind of the resource. -type KnownDataCollectionEndpointResourceKind string - -const ( - KnownDataCollectionEndpointResourceKindLinux KnownDataCollectionEndpointResourceKind = "Linux" - KnownDataCollectionEndpointResourceKindWindows KnownDataCollectionEndpointResourceKind = "Windows" -) - -// PossibleKnownDataCollectionEndpointResourceKindValues returns the possible values for the KnownDataCollectionEndpointResourceKind const type. -func PossibleKnownDataCollectionEndpointResourceKindValues() []KnownDataCollectionEndpointResourceKind { - return []KnownDataCollectionEndpointResourceKind{ - KnownDataCollectionEndpointResourceKindLinux, - KnownDataCollectionEndpointResourceKindWindows, - } -} - -// KnownDataCollectionRuleAssociationProvisioningState - The resource provisioning state. -type KnownDataCollectionRuleAssociationProvisioningState string - -const ( - KnownDataCollectionRuleAssociationProvisioningStateCreating KnownDataCollectionRuleAssociationProvisioningState = "Creating" - KnownDataCollectionRuleAssociationProvisioningStateDeleting KnownDataCollectionRuleAssociationProvisioningState = "Deleting" - KnownDataCollectionRuleAssociationProvisioningStateFailed KnownDataCollectionRuleAssociationProvisioningState = "Failed" - KnownDataCollectionRuleAssociationProvisioningStateSucceeded KnownDataCollectionRuleAssociationProvisioningState = "Succeeded" - KnownDataCollectionRuleAssociationProvisioningStateUpdating KnownDataCollectionRuleAssociationProvisioningState = "Updating" -) - -// PossibleKnownDataCollectionRuleAssociationProvisioningStateValues returns the possible values for the KnownDataCollectionRuleAssociationProvisioningState const type. -func PossibleKnownDataCollectionRuleAssociationProvisioningStateValues() []KnownDataCollectionRuleAssociationProvisioningState { - return []KnownDataCollectionRuleAssociationProvisioningState{ - KnownDataCollectionRuleAssociationProvisioningStateCreating, - KnownDataCollectionRuleAssociationProvisioningStateDeleting, - KnownDataCollectionRuleAssociationProvisioningStateFailed, - KnownDataCollectionRuleAssociationProvisioningStateSucceeded, - KnownDataCollectionRuleAssociationProvisioningStateUpdating, - } -} - -// KnownDataCollectionRuleProvisioningState - The resource provisioning state. -type KnownDataCollectionRuleProvisioningState string - -const ( - KnownDataCollectionRuleProvisioningStateCreating KnownDataCollectionRuleProvisioningState = "Creating" - KnownDataCollectionRuleProvisioningStateDeleting KnownDataCollectionRuleProvisioningState = "Deleting" - KnownDataCollectionRuleProvisioningStateFailed KnownDataCollectionRuleProvisioningState = "Failed" - KnownDataCollectionRuleProvisioningStateSucceeded KnownDataCollectionRuleProvisioningState = "Succeeded" - KnownDataCollectionRuleProvisioningStateUpdating KnownDataCollectionRuleProvisioningState = "Updating" -) - -// PossibleKnownDataCollectionRuleProvisioningStateValues returns the possible values for the KnownDataCollectionRuleProvisioningState const type. -func PossibleKnownDataCollectionRuleProvisioningStateValues() []KnownDataCollectionRuleProvisioningState { - return []KnownDataCollectionRuleProvisioningState{ - KnownDataCollectionRuleProvisioningStateCreating, - KnownDataCollectionRuleProvisioningStateDeleting, - KnownDataCollectionRuleProvisioningStateFailed, - KnownDataCollectionRuleProvisioningStateSucceeded, - KnownDataCollectionRuleProvisioningStateUpdating, - } -} - -// KnownDataCollectionRuleResourceKind - The kind of the resource. -type KnownDataCollectionRuleResourceKind string - -const ( - KnownDataCollectionRuleResourceKindLinux KnownDataCollectionRuleResourceKind = "Linux" - KnownDataCollectionRuleResourceKindWindows KnownDataCollectionRuleResourceKind = "Windows" -) - -// PossibleKnownDataCollectionRuleResourceKindValues returns the possible values for the KnownDataCollectionRuleResourceKind const type. -func PossibleKnownDataCollectionRuleResourceKindValues() []KnownDataCollectionRuleResourceKind { - return []KnownDataCollectionRuleResourceKind{ - KnownDataCollectionRuleResourceKindLinux, - KnownDataCollectionRuleResourceKindWindows, - } -} - -type KnownDataFlowStreams string - -const ( - KnownDataFlowStreamsMicrosoftEvent KnownDataFlowStreams = "Microsoft-Event" - KnownDataFlowStreamsMicrosoftInsightsMetrics KnownDataFlowStreams = "Microsoft-InsightsMetrics" - KnownDataFlowStreamsMicrosoftPerf KnownDataFlowStreams = "Microsoft-Perf" - KnownDataFlowStreamsMicrosoftSyslog KnownDataFlowStreams = "Microsoft-Syslog" - KnownDataFlowStreamsMicrosoftWindowsEvent KnownDataFlowStreams = "Microsoft-WindowsEvent" -) - -// PossibleKnownDataFlowStreamsValues returns the possible values for the KnownDataFlowStreams const type. -func PossibleKnownDataFlowStreamsValues() []KnownDataFlowStreams { - return []KnownDataFlowStreams{ - KnownDataFlowStreamsMicrosoftEvent, - KnownDataFlowStreamsMicrosoftInsightsMetrics, - KnownDataFlowStreamsMicrosoftPerf, - KnownDataFlowStreamsMicrosoftSyslog, - KnownDataFlowStreamsMicrosoftWindowsEvent, - } -} - -type KnownExtensionDataSourceStreams string - -const ( - KnownExtensionDataSourceStreamsMicrosoftEvent KnownExtensionDataSourceStreams = "Microsoft-Event" - KnownExtensionDataSourceStreamsMicrosoftInsightsMetrics KnownExtensionDataSourceStreams = "Microsoft-InsightsMetrics" - KnownExtensionDataSourceStreamsMicrosoftPerf KnownExtensionDataSourceStreams = "Microsoft-Perf" - KnownExtensionDataSourceStreamsMicrosoftSyslog KnownExtensionDataSourceStreams = "Microsoft-Syslog" - KnownExtensionDataSourceStreamsMicrosoftWindowsEvent KnownExtensionDataSourceStreams = "Microsoft-WindowsEvent" -) - -// PossibleKnownExtensionDataSourceStreamsValues returns the possible values for the KnownExtensionDataSourceStreams const type. -func PossibleKnownExtensionDataSourceStreamsValues() []KnownExtensionDataSourceStreams { - return []KnownExtensionDataSourceStreams{ - KnownExtensionDataSourceStreamsMicrosoftEvent, - KnownExtensionDataSourceStreamsMicrosoftInsightsMetrics, - KnownExtensionDataSourceStreamsMicrosoftPerf, - KnownExtensionDataSourceStreamsMicrosoftSyslog, - KnownExtensionDataSourceStreamsMicrosoftWindowsEvent, - } -} - -// KnownLogFileTextSettingsRecordStartTimestampFormat - One of the supported timestamp formats -type KnownLogFileTextSettingsRecordStartTimestampFormat string - -const ( - KnownLogFileTextSettingsRecordStartTimestampFormatDdMMMYyyyHHMmSsZzz KnownLogFileTextSettingsRecordStartTimestampFormat = "dd/MMM/yyyy:HH:mm:ss zzz" - KnownLogFileTextSettingsRecordStartTimestampFormatDdMMyyHHMmSs KnownLogFileTextSettingsRecordStartTimestampFormat = "ddMMyy HH:mm:ss" - KnownLogFileTextSettingsRecordStartTimestampFormatISO8601 KnownLogFileTextSettingsRecordStartTimestampFormat = "ISO 8601" - KnownLogFileTextSettingsRecordStartTimestampFormatMDYYYYHHMMSSAMPM KnownLogFileTextSettingsRecordStartTimestampFormat = "M/D/YYYY HH:MM:SS AM/PM" - KnownLogFileTextSettingsRecordStartTimestampFormatMMMDHhMmSs KnownLogFileTextSettingsRecordStartTimestampFormat = "MMM d hh:mm:ss" - KnownLogFileTextSettingsRecordStartTimestampFormatMonDDYYYYHHMMSS KnownLogFileTextSettingsRecordStartTimestampFormat = "Mon DD, YYYY HH:MM:SS" - KnownLogFileTextSettingsRecordStartTimestampFormatYYYYMMDDHHMMSS KnownLogFileTextSettingsRecordStartTimestampFormat = "YYYY-MM-DD HH:MM:SS" - KnownLogFileTextSettingsRecordStartTimestampFormatYyMMddHHMmSs KnownLogFileTextSettingsRecordStartTimestampFormat = "yyMMdd HH:mm:ss" - KnownLogFileTextSettingsRecordStartTimestampFormatYyyyMMDdTHHMmSsK KnownLogFileTextSettingsRecordStartTimestampFormat = "yyyy-MM-ddTHH:mm:ssK" -) - -// PossibleKnownLogFileTextSettingsRecordStartTimestampFormatValues returns the possible values for the KnownLogFileTextSettingsRecordStartTimestampFormat const type. -func PossibleKnownLogFileTextSettingsRecordStartTimestampFormatValues() []KnownLogFileTextSettingsRecordStartTimestampFormat { - return []KnownLogFileTextSettingsRecordStartTimestampFormat{ - KnownLogFileTextSettingsRecordStartTimestampFormatDdMMMYyyyHHMmSsZzz, - KnownLogFileTextSettingsRecordStartTimestampFormatDdMMyyHHMmSs, - KnownLogFileTextSettingsRecordStartTimestampFormatISO8601, - KnownLogFileTextSettingsRecordStartTimestampFormatMDYYYYHHMMSSAMPM, - KnownLogFileTextSettingsRecordStartTimestampFormatMMMDHhMmSs, - KnownLogFileTextSettingsRecordStartTimestampFormatMonDDYYYYHHMMSS, - KnownLogFileTextSettingsRecordStartTimestampFormatYYYYMMDDHHMMSS, - KnownLogFileTextSettingsRecordStartTimestampFormatYyMMddHHMmSs, - KnownLogFileTextSettingsRecordStartTimestampFormatYyyyMMDdTHHMmSsK, - } -} - -// KnownLogFilesDataSourceFormat - The data format of the log files -type KnownLogFilesDataSourceFormat string - -const ( - KnownLogFilesDataSourceFormatText KnownLogFilesDataSourceFormat = "text" -) - -// PossibleKnownLogFilesDataSourceFormatValues returns the possible values for the KnownLogFilesDataSourceFormat const type. -func PossibleKnownLogFilesDataSourceFormatValues() []KnownLogFilesDataSourceFormat { - return []KnownLogFilesDataSourceFormat{ - KnownLogFilesDataSourceFormatText, - } -} - -type KnownPerfCounterDataSourceStreams string - -const ( - KnownPerfCounterDataSourceStreamsMicrosoftInsightsMetrics KnownPerfCounterDataSourceStreams = "Microsoft-InsightsMetrics" - KnownPerfCounterDataSourceStreamsMicrosoftPerf KnownPerfCounterDataSourceStreams = "Microsoft-Perf" -) - -// PossibleKnownPerfCounterDataSourceStreamsValues returns the possible values for the KnownPerfCounterDataSourceStreams const type. -func PossibleKnownPerfCounterDataSourceStreamsValues() []KnownPerfCounterDataSourceStreams { - return []KnownPerfCounterDataSourceStreams{ - KnownPerfCounterDataSourceStreamsMicrosoftInsightsMetrics, - KnownPerfCounterDataSourceStreamsMicrosoftPerf, - } -} - -// KnownPublicNetworkAccessOptions - The configuration to set whether network access from public internet to the endpoints -// are allowed. -type KnownPublicNetworkAccessOptions string - -const ( - KnownPublicNetworkAccessOptionsDisabled KnownPublicNetworkAccessOptions = "Disabled" - KnownPublicNetworkAccessOptionsEnabled KnownPublicNetworkAccessOptions = "Enabled" -) - -// PossibleKnownPublicNetworkAccessOptionsValues returns the possible values for the KnownPublicNetworkAccessOptions const type. -func PossibleKnownPublicNetworkAccessOptionsValues() []KnownPublicNetworkAccessOptions { - return []KnownPublicNetworkAccessOptions{ - KnownPublicNetworkAccessOptionsDisabled, - KnownPublicNetworkAccessOptionsEnabled, - } -} - -type KnownSyslogDataSourceFacilityNames string - -const ( - KnownSyslogDataSourceFacilityNamesAsterisk KnownSyslogDataSourceFacilityNames = "*" - KnownSyslogDataSourceFacilityNamesAuth KnownSyslogDataSourceFacilityNames = "auth" - KnownSyslogDataSourceFacilityNamesAuthpriv KnownSyslogDataSourceFacilityNames = "authpriv" - KnownSyslogDataSourceFacilityNamesCron KnownSyslogDataSourceFacilityNames = "cron" - KnownSyslogDataSourceFacilityNamesDaemon KnownSyslogDataSourceFacilityNames = "daemon" - KnownSyslogDataSourceFacilityNamesKern KnownSyslogDataSourceFacilityNames = "kern" - KnownSyslogDataSourceFacilityNamesLocal0 KnownSyslogDataSourceFacilityNames = "local0" - KnownSyslogDataSourceFacilityNamesLocal1 KnownSyslogDataSourceFacilityNames = "local1" - KnownSyslogDataSourceFacilityNamesLocal2 KnownSyslogDataSourceFacilityNames = "local2" - KnownSyslogDataSourceFacilityNamesLocal3 KnownSyslogDataSourceFacilityNames = "local3" - KnownSyslogDataSourceFacilityNamesLocal4 KnownSyslogDataSourceFacilityNames = "local4" - KnownSyslogDataSourceFacilityNamesLocal5 KnownSyslogDataSourceFacilityNames = "local5" - KnownSyslogDataSourceFacilityNamesLocal6 KnownSyslogDataSourceFacilityNames = "local6" - KnownSyslogDataSourceFacilityNamesLocal7 KnownSyslogDataSourceFacilityNames = "local7" - KnownSyslogDataSourceFacilityNamesLpr KnownSyslogDataSourceFacilityNames = "lpr" - KnownSyslogDataSourceFacilityNamesMail KnownSyslogDataSourceFacilityNames = "mail" - KnownSyslogDataSourceFacilityNamesMark KnownSyslogDataSourceFacilityNames = "mark" - KnownSyslogDataSourceFacilityNamesNews KnownSyslogDataSourceFacilityNames = "news" - KnownSyslogDataSourceFacilityNamesSyslog KnownSyslogDataSourceFacilityNames = "syslog" - KnownSyslogDataSourceFacilityNamesUser KnownSyslogDataSourceFacilityNames = "user" - KnownSyslogDataSourceFacilityNamesUucp KnownSyslogDataSourceFacilityNames = "uucp" -) - -// PossibleKnownSyslogDataSourceFacilityNamesValues returns the possible values for the KnownSyslogDataSourceFacilityNames const type. -func PossibleKnownSyslogDataSourceFacilityNamesValues() []KnownSyslogDataSourceFacilityNames { - return []KnownSyslogDataSourceFacilityNames{ - KnownSyslogDataSourceFacilityNamesAsterisk, - KnownSyslogDataSourceFacilityNamesAuth, - KnownSyslogDataSourceFacilityNamesAuthpriv, - KnownSyslogDataSourceFacilityNamesCron, - KnownSyslogDataSourceFacilityNamesDaemon, - KnownSyslogDataSourceFacilityNamesKern, - KnownSyslogDataSourceFacilityNamesLocal0, - KnownSyslogDataSourceFacilityNamesLocal1, - KnownSyslogDataSourceFacilityNamesLocal2, - KnownSyslogDataSourceFacilityNamesLocal3, - KnownSyslogDataSourceFacilityNamesLocal4, - KnownSyslogDataSourceFacilityNamesLocal5, - KnownSyslogDataSourceFacilityNamesLocal6, - KnownSyslogDataSourceFacilityNamesLocal7, - KnownSyslogDataSourceFacilityNamesLpr, - KnownSyslogDataSourceFacilityNamesMail, - KnownSyslogDataSourceFacilityNamesMark, - KnownSyslogDataSourceFacilityNamesNews, - KnownSyslogDataSourceFacilityNamesSyslog, - KnownSyslogDataSourceFacilityNamesUser, - KnownSyslogDataSourceFacilityNamesUucp, - } -} - -type KnownSyslogDataSourceLogLevels string - -const ( - KnownSyslogDataSourceLogLevelsAlert KnownSyslogDataSourceLogLevels = "Alert" - KnownSyslogDataSourceLogLevelsAsterisk KnownSyslogDataSourceLogLevels = "*" - KnownSyslogDataSourceLogLevelsCritical KnownSyslogDataSourceLogLevels = "Critical" - KnownSyslogDataSourceLogLevelsDebug KnownSyslogDataSourceLogLevels = "Debug" - KnownSyslogDataSourceLogLevelsEmergency KnownSyslogDataSourceLogLevels = "Emergency" - KnownSyslogDataSourceLogLevelsError KnownSyslogDataSourceLogLevels = "Error" - KnownSyslogDataSourceLogLevelsInfo KnownSyslogDataSourceLogLevels = "Info" - KnownSyslogDataSourceLogLevelsNotice KnownSyslogDataSourceLogLevels = "Notice" - KnownSyslogDataSourceLogLevelsWarning KnownSyslogDataSourceLogLevels = "Warning" -) - -// PossibleKnownSyslogDataSourceLogLevelsValues returns the possible values for the KnownSyslogDataSourceLogLevels const type. -func PossibleKnownSyslogDataSourceLogLevelsValues() []KnownSyslogDataSourceLogLevels { - return []KnownSyslogDataSourceLogLevels{ - KnownSyslogDataSourceLogLevelsAlert, - KnownSyslogDataSourceLogLevelsAsterisk, - KnownSyslogDataSourceLogLevelsCritical, - KnownSyslogDataSourceLogLevelsDebug, - KnownSyslogDataSourceLogLevelsEmergency, - KnownSyslogDataSourceLogLevelsError, - KnownSyslogDataSourceLogLevelsInfo, - KnownSyslogDataSourceLogLevelsNotice, - KnownSyslogDataSourceLogLevelsWarning, - } -} - -type KnownSyslogDataSourceStreams string - -const ( - KnownSyslogDataSourceStreamsMicrosoftSyslog KnownSyslogDataSourceStreams = "Microsoft-Syslog" -) - -// PossibleKnownSyslogDataSourceStreamsValues returns the possible values for the KnownSyslogDataSourceStreams const type. -func PossibleKnownSyslogDataSourceStreamsValues() []KnownSyslogDataSourceStreams { - return []KnownSyslogDataSourceStreams{ - KnownSyslogDataSourceStreamsMicrosoftSyslog, - } -} - -type KnownWindowsEventLogDataSourceStreams string - -const ( - KnownWindowsEventLogDataSourceStreamsMicrosoftEvent KnownWindowsEventLogDataSourceStreams = "Microsoft-Event" - KnownWindowsEventLogDataSourceStreamsMicrosoftWindowsEvent KnownWindowsEventLogDataSourceStreams = "Microsoft-WindowsEvent" -) - -// PossibleKnownWindowsEventLogDataSourceStreamsValues returns the possible values for the KnownWindowsEventLogDataSourceStreams const type. -func PossibleKnownWindowsEventLogDataSourceStreamsValues() []KnownWindowsEventLogDataSourceStreams { - return []KnownWindowsEventLogDataSourceStreams{ - KnownWindowsEventLogDataSourceStreamsMicrosoftEvent, - KnownWindowsEventLogDataSourceStreamsMicrosoftWindowsEvent, - } -} - -// MetricClass - The class of the metric. -type MetricClass string - -const ( - MetricClassAvailability MetricClass = "Availability" - MetricClassErrors MetricClass = "Errors" - MetricClassLatency MetricClass = "Latency" - MetricClassSaturation MetricClass = "Saturation" - MetricClassTransactions MetricClass = "Transactions" -) - -// PossibleMetricClassValues returns the possible values for the MetricClass const type. -func PossibleMetricClassValues() []MetricClass { - return []MetricClass{ - MetricClassAvailability, - MetricClassErrors, - MetricClassLatency, - MetricClassSaturation, - MetricClassTransactions, - } -} - -// MetricStatisticType - the metric statistic type. How the metrics from multiple instances are combined. -type MetricStatisticType string - -const ( - MetricStatisticTypeAverage MetricStatisticType = "Average" - MetricStatisticTypeMin MetricStatisticType = "Min" - MetricStatisticTypeMax MetricStatisticType = "Max" - MetricStatisticTypeSum MetricStatisticType = "Sum" - MetricStatisticTypeCount MetricStatisticType = "Count" -) - -// PossibleMetricStatisticTypeValues returns the possible values for the MetricStatisticType const type. -func PossibleMetricStatisticTypeValues() []MetricStatisticType { - return []MetricStatisticType{ - MetricStatisticTypeAverage, - MetricStatisticTypeMin, - MetricStatisticTypeMax, - MetricStatisticTypeSum, - MetricStatisticTypeCount, - } -} - -// MetricTriggerType - Metric Trigger Evaluation Type -type MetricTriggerType string - -const ( - MetricTriggerTypeConsecutive MetricTriggerType = "Consecutive" - MetricTriggerTypeTotal MetricTriggerType = "Total" -) - -// PossibleMetricTriggerTypeValues returns the possible values for the MetricTriggerType const type. -func PossibleMetricTriggerTypeValues() []MetricTriggerType { - return []MetricTriggerType{ - MetricTriggerTypeConsecutive, - MetricTriggerTypeTotal, - } -} - -// MetricUnit - The unit of the metric. -type MetricUnit string - -const ( - MetricUnitBitsPerSecond MetricUnit = "BitsPerSecond" - MetricUnitByteSeconds MetricUnit = "ByteSeconds" - MetricUnitBytes MetricUnit = "Bytes" - MetricUnitBytesPerSecond MetricUnit = "BytesPerSecond" - MetricUnitCores MetricUnit = "Cores" - MetricUnitCount MetricUnit = "Count" - MetricUnitCountPerSecond MetricUnit = "CountPerSecond" - MetricUnitMilliCores MetricUnit = "MilliCores" - MetricUnitMilliSeconds MetricUnit = "MilliSeconds" - MetricUnitNanoCores MetricUnit = "NanoCores" - MetricUnitPercent MetricUnit = "Percent" - MetricUnitSeconds MetricUnit = "Seconds" - MetricUnitUnspecified MetricUnit = "Unspecified" -) - -// PossibleMetricUnitValues returns the possible values for the MetricUnit const type. -func PossibleMetricUnitValues() []MetricUnit { - return []MetricUnit{ - MetricUnitBitsPerSecond, - MetricUnitByteSeconds, - MetricUnitBytes, - MetricUnitBytesPerSecond, - MetricUnitCores, - MetricUnitCount, - MetricUnitCountPerSecond, - MetricUnitMilliCores, - MetricUnitMilliSeconds, - MetricUnitNanoCores, - MetricUnitPercent, - MetricUnitSeconds, - MetricUnitUnspecified, - } -} - -// NamespaceClassification - Kind of namespace -type NamespaceClassification string - -const ( - NamespaceClassificationCustom NamespaceClassification = "Custom" - NamespaceClassificationPlatform NamespaceClassification = "Platform" - NamespaceClassificationQos NamespaceClassification = "Qos" -) - -// PossibleNamespaceClassificationValues returns the possible values for the NamespaceClassification const type. -func PossibleNamespaceClassificationValues() []NamespaceClassification { - return []NamespaceClassification{ - NamespaceClassificationCustom, - NamespaceClassificationPlatform, - NamespaceClassificationQos, - } -} - -// Odatatype - specifies the type of the alert criteria. -type Odatatype string - -const ( - OdatatypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria Odatatype = "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - OdatatypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria Odatatype = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" - OdatatypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria Odatatype = "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" -) - -// PossibleOdatatypeValues returns the possible values for the Odatatype const type. -func PossibleOdatatypeValues() []Odatatype { - return []Odatatype{ - OdatatypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria, - OdatatypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria, - OdatatypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria, - } -} - -// OnboardingStatus - The onboarding status for the resource. Note that, a higher level scope, e.g., resource group or subscription, -// is considered onboarded if at least one resource under it is onboarded. -type OnboardingStatus string - -const ( - OnboardingStatusNotOnboarded OnboardingStatus = "notOnboarded" - OnboardingStatusOnboarded OnboardingStatus = "onboarded" - OnboardingStatusUnknown OnboardingStatus = "unknown" -) - -// PossibleOnboardingStatusValues returns the possible values for the OnboardingStatus const type. -func PossibleOnboardingStatusValues() []OnboardingStatus { - return []OnboardingStatus{ - OnboardingStatusNotOnboarded, - OnboardingStatusOnboarded, - OnboardingStatusUnknown, - } -} - -// Operator - the criteria operator. -type Operator string - -const ( - OperatorEquals Operator = "Equals" - OperatorGreaterThan Operator = "GreaterThan" - OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual" - OperatorInclude Operator = "Include" - OperatorLessThan Operator = "LessThan" - OperatorLessThanOrEqual Operator = "LessThanOrEqual" -) - -// PossibleOperatorValues returns the possible values for the Operator const type. -func PossibleOperatorValues() []Operator { - return []Operator{ - OperatorEquals, - OperatorGreaterThan, - OperatorGreaterThanOrEqual, - OperatorInclude, - OperatorLessThan, - OperatorLessThanOrEqual, - } -} - -// ProvisioningState - Provisioning state of the scheduled query rule -type ProvisioningState string - -const ( - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateDeploying ProvisioningState = "Deploying" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateCanceled, - ProvisioningStateDeploying, - ProvisioningStateFailed, - ProvisioningStateSucceeded, - } -} - -// QueryType - Set value to 'ResultAccount' -type QueryType string - -const ( - QueryTypeResultCount QueryType = "ResultCount" -) - -// PossibleQueryTypeValues returns the possible values for the QueryType const type. -func PossibleQueryTypeValues() []QueryType { - return []QueryType{ - QueryTypeResultCount, - } -} - -// ReceiverStatus - Indicates the status of the receiver. Receivers that are not Enabled will not receive any communications. -type ReceiverStatus string - -const ( - ReceiverStatusNotSpecified ReceiverStatus = "NotSpecified" - ReceiverStatusEnabled ReceiverStatus = "Enabled" - ReceiverStatusDisabled ReceiverStatus = "Disabled" -) - -// PossibleReceiverStatusValues returns the possible values for the ReceiverStatus const type. -func PossibleReceiverStatusValues() []ReceiverStatus { - return []ReceiverStatus{ - ReceiverStatusNotSpecified, - ReceiverStatusEnabled, - ReceiverStatusDisabled, - } -} - -// RecurrenceFrequency - the recurrence frequency. How often the schedule profile should take effect. This value must be Week, -// meaning each week will have the same set of profiles. For example, to set a daily schedule, set -// schedule to every day of the week. The frequency property specifies that the schedule is repeated weekly. -type RecurrenceFrequency string - -const ( - RecurrenceFrequencyNone RecurrenceFrequency = "None" - RecurrenceFrequencySecond RecurrenceFrequency = "Second" - RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" - RecurrenceFrequencyHour RecurrenceFrequency = "Hour" - RecurrenceFrequencyDay RecurrenceFrequency = "Day" - RecurrenceFrequencyWeek RecurrenceFrequency = "Week" - RecurrenceFrequencyMonth RecurrenceFrequency = "Month" - RecurrenceFrequencyYear RecurrenceFrequency = "Year" -) - -// PossibleRecurrenceFrequencyValues returns the possible values for the RecurrenceFrequency const type. -func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency { - return []RecurrenceFrequency{ - RecurrenceFrequencyNone, - RecurrenceFrequencySecond, - RecurrenceFrequencyMinute, - RecurrenceFrequencyHour, - RecurrenceFrequencyDay, - RecurrenceFrequencyWeek, - RecurrenceFrequencyMonth, - RecurrenceFrequencyYear, - } -} - -type ResultType string - -const ( - ResultTypeData ResultType = "Data" - ResultTypeMetadata ResultType = "Metadata" -) - -// PossibleResultTypeValues returns the possible values for the ResultType const type. -func PossibleResultTypeValues() []ResultType { - return []ResultType{ - ResultTypeData, - ResultTypeMetadata, - } -} - -// ScaleDirection - the scale direction. Whether the scaling action increases or decreases the number of instances. -type ScaleDirection string - -const ( - ScaleDirectionNone ScaleDirection = "None" - ScaleDirectionIncrease ScaleDirection = "Increase" - ScaleDirectionDecrease ScaleDirection = "Decrease" -) - -// PossibleScaleDirectionValues returns the possible values for the ScaleDirection const type. -func PossibleScaleDirectionValues() []ScaleDirection { - return []ScaleDirection{ - ScaleDirectionNone, - ScaleDirectionIncrease, - ScaleDirectionDecrease, - } -} - -// ScaleRuleMetricDimensionOperationType - the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being -// equal to any of the values. 'NotEquals' being not equal to all of the values -type ScaleRuleMetricDimensionOperationType string - -const ( - ScaleRuleMetricDimensionOperationTypeEquals ScaleRuleMetricDimensionOperationType = "Equals" - ScaleRuleMetricDimensionOperationTypeNotEquals ScaleRuleMetricDimensionOperationType = "NotEquals" -) - -// PossibleScaleRuleMetricDimensionOperationTypeValues returns the possible values for the ScaleRuleMetricDimensionOperationType const type. -func PossibleScaleRuleMetricDimensionOperationTypeValues() []ScaleRuleMetricDimensionOperationType { - return []ScaleRuleMetricDimensionOperationType{ - ScaleRuleMetricDimensionOperationTypeEquals, - ScaleRuleMetricDimensionOperationTypeNotEquals, - } -} - -// ScaleType - the type of action that should occur when the scale rule fires. -type ScaleType string - -const ( - ScaleTypeChangeCount ScaleType = "ChangeCount" - ScaleTypePercentChangeCount ScaleType = "PercentChangeCount" - ScaleTypeExactCount ScaleType = "ExactCount" - ScaleTypeServiceAllowedNextValue ScaleType = "ServiceAllowedNextValue" -) - -// PossibleScaleTypeValues returns the possible values for the ScaleType const type. -func PossibleScaleTypeValues() []ScaleType { - return []ScaleType{ - ScaleTypeChangeCount, - ScaleTypePercentChangeCount, - ScaleTypeExactCount, - ScaleTypeServiceAllowedNextValue, - } -} - -// TimeAggregationOperator - Aggregation operators allowed in a rule. -type TimeAggregationOperator string - -const ( - TimeAggregationOperatorAverage TimeAggregationOperator = "Average" - TimeAggregationOperatorMinimum TimeAggregationOperator = "Minimum" - TimeAggregationOperatorMaximum TimeAggregationOperator = "Maximum" - TimeAggregationOperatorTotal TimeAggregationOperator = "Total" - TimeAggregationOperatorLast TimeAggregationOperator = "Last" -) - -// PossibleTimeAggregationOperatorValues returns the possible values for the TimeAggregationOperator const type. -func PossibleTimeAggregationOperatorValues() []TimeAggregationOperator { - return []TimeAggregationOperator{ - TimeAggregationOperatorAverage, - TimeAggregationOperatorMinimum, - TimeAggregationOperatorMaximum, - TimeAggregationOperatorTotal, - TimeAggregationOperatorLast, - } -} - -// TimeAggregationType - time aggregation type. How the data that is collected should be combined over time. The default value -// is Average. -type TimeAggregationType string - -const ( - TimeAggregationTypeAverage TimeAggregationType = "Average" - TimeAggregationTypeMinimum TimeAggregationType = "Minimum" - TimeAggregationTypeMaximum TimeAggregationType = "Maximum" - TimeAggregationTypeTotal TimeAggregationType = "Total" - TimeAggregationTypeCount TimeAggregationType = "Count" - TimeAggregationTypeLast TimeAggregationType = "Last" -) - -// PossibleTimeAggregationTypeValues returns the possible values for the TimeAggregationType const type. -func PossibleTimeAggregationTypeValues() []TimeAggregationType { - return []TimeAggregationType{ - TimeAggregationTypeAverage, - TimeAggregationTypeMinimum, - TimeAggregationTypeMaximum, - TimeAggregationTypeTotal, - TimeAggregationTypeCount, - TimeAggregationTypeLast, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_datacollectionendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_datacollectionendpoints_client.go deleted file mode 100644 index 6bb3aa2d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_datacollectionendpoints_client.go +++ /dev/null @@ -1,405 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DataCollectionEndpointsClient contains the methods for the DataCollectionEndpoints group. -// Don't use this type directly, use NewDataCollectionEndpointsClient() instead. -type DataCollectionEndpointsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDataCollectionEndpointsClient creates a new instance of DataCollectionEndpointsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDataCollectionEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataCollectionEndpointsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DataCollectionEndpointsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Create - Creates or updates a data collection endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// dataCollectionEndpointName - The name of the data collection endpoint. The name is case insensitive. -// options - DataCollectionEndpointsClientCreateOptions contains the optional parameters for the DataCollectionEndpointsClient.Create -// method. -func (client *DataCollectionEndpointsClient) Create(ctx context.Context, resourceGroupName string, dataCollectionEndpointName string, options *DataCollectionEndpointsClientCreateOptions) (DataCollectionEndpointsClientCreateResponse, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, dataCollectionEndpointName, options) - if err != nil { - return DataCollectionEndpointsClientCreateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionEndpointsClientCreateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DataCollectionEndpointsClientCreateResponse{}, runtime.NewResponseError(resp) - } - return client.createHandleResponse(resp) -} - -// createCreateRequest creates the Create request. -func (client *DataCollectionEndpointsClient) createCreateRequest(ctx context.Context, resourceGroupName string, dataCollectionEndpointName string, options *DataCollectionEndpointsClientCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dataCollectionEndpointName == "" { - return nil, errors.New("parameter dataCollectionEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dataCollectionEndpointName}", url.PathEscape(dataCollectionEndpointName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Body != nil { - return req, runtime.MarshalAsJSON(req, *options.Body) - } - return req, nil -} - -// createHandleResponse handles the Create response. -func (client *DataCollectionEndpointsClient) createHandleResponse(resp *http.Response) (DataCollectionEndpointsClientCreateResponse, error) { - result := DataCollectionEndpointsClientCreateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionEndpointResource); err != nil { - return DataCollectionEndpointsClientCreateResponse{}, err - } - return result, nil -} - -// Delete - Deletes a data collection endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// dataCollectionEndpointName - The name of the data collection endpoint. The name is case insensitive. -// options - DataCollectionEndpointsClientDeleteOptions contains the optional parameters for the DataCollectionEndpointsClient.Delete -// method. -func (client *DataCollectionEndpointsClient) Delete(ctx context.Context, resourceGroupName string, dataCollectionEndpointName string, options *DataCollectionEndpointsClientDeleteOptions) (DataCollectionEndpointsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, dataCollectionEndpointName, options) - if err != nil { - return DataCollectionEndpointsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionEndpointsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DataCollectionEndpointsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return DataCollectionEndpointsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DataCollectionEndpointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, dataCollectionEndpointName string, options *DataCollectionEndpointsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dataCollectionEndpointName == "" { - return nil, errors.New("parameter dataCollectionEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dataCollectionEndpointName}", url.PathEscape(dataCollectionEndpointName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Returns the specified data collection endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// dataCollectionEndpointName - The name of the data collection endpoint. The name is case insensitive. -// options - DataCollectionEndpointsClientGetOptions contains the optional parameters for the DataCollectionEndpointsClient.Get -// method. -func (client *DataCollectionEndpointsClient) Get(ctx context.Context, resourceGroupName string, dataCollectionEndpointName string, options *DataCollectionEndpointsClientGetOptions) (DataCollectionEndpointsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, dataCollectionEndpointName, options) - if err != nil { - return DataCollectionEndpointsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionEndpointsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionEndpointsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DataCollectionEndpointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, dataCollectionEndpointName string, options *DataCollectionEndpointsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dataCollectionEndpointName == "" { - return nil, errors.New("parameter dataCollectionEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dataCollectionEndpointName}", url.PathEscape(dataCollectionEndpointName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DataCollectionEndpointsClient) getHandleResponse(resp *http.Response) (DataCollectionEndpointsClientGetResponse, error) { - result := DataCollectionEndpointsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionEndpointResource); err != nil { - return DataCollectionEndpointsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all data collection endpoints in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - DataCollectionEndpointsClientListByResourceGroupOptions contains the optional parameters for the DataCollectionEndpointsClient.ListByResourceGroup -// method. -func (client *DataCollectionEndpointsClient) NewListByResourceGroupPager(resourceGroupName string, options *DataCollectionEndpointsClientListByResourceGroupOptions) *runtime.Pager[DataCollectionEndpointsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[DataCollectionEndpointsClientListByResourceGroupResponse]{ - More: func(page DataCollectionEndpointsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DataCollectionEndpointsClientListByResourceGroupResponse) (DataCollectionEndpointsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DataCollectionEndpointsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionEndpointsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionEndpointsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *DataCollectionEndpointsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DataCollectionEndpointsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *DataCollectionEndpointsClient) listByResourceGroupHandleResponse(resp *http.Response) (DataCollectionEndpointsClientListByResourceGroupResponse, error) { - result := DataCollectionEndpointsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionEndpointResourceListResult); err != nil { - return DataCollectionEndpointsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Lists all data collection endpoints in the specified subscription -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// options - DataCollectionEndpointsClientListBySubscriptionOptions contains the optional parameters for the DataCollectionEndpointsClient.ListBySubscription -// method. -func (client *DataCollectionEndpointsClient) NewListBySubscriptionPager(options *DataCollectionEndpointsClientListBySubscriptionOptions) *runtime.Pager[DataCollectionEndpointsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[DataCollectionEndpointsClientListBySubscriptionResponse]{ - More: func(page DataCollectionEndpointsClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DataCollectionEndpointsClientListBySubscriptionResponse) (DataCollectionEndpointsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DataCollectionEndpointsClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionEndpointsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionEndpointsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *DataCollectionEndpointsClient) listBySubscriptionCreateRequest(ctx context.Context, options *DataCollectionEndpointsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionEndpoints" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *DataCollectionEndpointsClient) listBySubscriptionHandleResponse(resp *http.Response) (DataCollectionEndpointsClientListBySubscriptionResponse, error) { - result := DataCollectionEndpointsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionEndpointResourceListResult); err != nil { - return DataCollectionEndpointsClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Updates part of a data collection endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// dataCollectionEndpointName - The name of the data collection endpoint. The name is case insensitive. -// options - DataCollectionEndpointsClientUpdateOptions contains the optional parameters for the DataCollectionEndpointsClient.Update -// method. -func (client *DataCollectionEndpointsClient) Update(ctx context.Context, resourceGroupName string, dataCollectionEndpointName string, options *DataCollectionEndpointsClientUpdateOptions) (DataCollectionEndpointsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, dataCollectionEndpointName, options) - if err != nil { - return DataCollectionEndpointsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionEndpointsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionEndpointsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *DataCollectionEndpointsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, dataCollectionEndpointName string, options *DataCollectionEndpointsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dataCollectionEndpointName == "" { - return nil, errors.New("parameter dataCollectionEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dataCollectionEndpointName}", url.PathEscape(dataCollectionEndpointName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Body != nil { - return req, runtime.MarshalAsJSON(req, *options.Body) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *DataCollectionEndpointsClient) updateHandleResponse(resp *http.Response) (DataCollectionEndpointsClientUpdateResponse, error) { - result := DataCollectionEndpointsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionEndpointResource); err != nil { - return DataCollectionEndpointsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_datacollectionruleassociations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_datacollectionruleassociations_client.go deleted file mode 100644 index 6aabb193..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_datacollectionruleassociations_client.go +++ /dev/null @@ -1,397 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DataCollectionRuleAssociationsClient contains the methods for the DataCollectionRuleAssociations group. -// Don't use this type directly, use NewDataCollectionRuleAssociationsClient() instead. -type DataCollectionRuleAssociationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDataCollectionRuleAssociationsClient creates a new instance of DataCollectionRuleAssociationsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDataCollectionRuleAssociationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataCollectionRuleAssociationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DataCollectionRuleAssociationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Create - Creates or updates an association. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceURI - The identifier of the resource. -// associationName - The name of the association. The name is case insensitive. -// options - DataCollectionRuleAssociationsClientCreateOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.Create -// method. -func (client *DataCollectionRuleAssociationsClient) Create(ctx context.Context, resourceURI string, associationName string, options *DataCollectionRuleAssociationsClientCreateOptions) (DataCollectionRuleAssociationsClientCreateResponse, error) { - req, err := client.createCreateRequest(ctx, resourceURI, associationName, options) - if err != nil { - return DataCollectionRuleAssociationsClientCreateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRuleAssociationsClientCreateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DataCollectionRuleAssociationsClientCreateResponse{}, runtime.NewResponseError(resp) - } - return client.createHandleResponse(resp) -} - -// createCreateRequest creates the Create request. -func (client *DataCollectionRuleAssociationsClient) createCreateRequest(ctx context.Context, resourceURI string, associationName string, options *DataCollectionRuleAssociationsClientCreateOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - if associationName == "" { - return nil, errors.New("parameter associationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{associationName}", url.PathEscape(associationName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Body != nil { - return req, runtime.MarshalAsJSON(req, *options.Body) - } - return req, nil -} - -// createHandleResponse handles the Create response. -func (client *DataCollectionRuleAssociationsClient) createHandleResponse(resp *http.Response) (DataCollectionRuleAssociationsClientCreateResponse, error) { - result := DataCollectionRuleAssociationsClientCreateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionRuleAssociationProxyOnlyResource); err != nil { - return DataCollectionRuleAssociationsClientCreateResponse{}, err - } - return result, nil -} - -// Delete - Deletes an association. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceURI - The identifier of the resource. -// associationName - The name of the association. The name is case insensitive. -// options - DataCollectionRuleAssociationsClientDeleteOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.Delete -// method. -func (client *DataCollectionRuleAssociationsClient) Delete(ctx context.Context, resourceURI string, associationName string, options *DataCollectionRuleAssociationsClientDeleteOptions) (DataCollectionRuleAssociationsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceURI, associationName, options) - if err != nil { - return DataCollectionRuleAssociationsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRuleAssociationsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DataCollectionRuleAssociationsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return DataCollectionRuleAssociationsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DataCollectionRuleAssociationsClient) deleteCreateRequest(ctx context.Context, resourceURI string, associationName string, options *DataCollectionRuleAssociationsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - if associationName == "" { - return nil, errors.New("parameter associationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{associationName}", url.PathEscape(associationName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Returns the specified association. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceURI - The identifier of the resource. -// associationName - The name of the association. The name is case insensitive. -// options - DataCollectionRuleAssociationsClientGetOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.Get -// method. -func (client *DataCollectionRuleAssociationsClient) Get(ctx context.Context, resourceURI string, associationName string, options *DataCollectionRuleAssociationsClientGetOptions) (DataCollectionRuleAssociationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceURI, associationName, options) - if err != nil { - return DataCollectionRuleAssociationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRuleAssociationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionRuleAssociationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DataCollectionRuleAssociationsClient) getCreateRequest(ctx context.Context, resourceURI string, associationName string, options *DataCollectionRuleAssociationsClientGetOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - if associationName == "" { - return nil, errors.New("parameter associationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{associationName}", url.PathEscape(associationName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DataCollectionRuleAssociationsClient) getHandleResponse(resp *http.Response) (DataCollectionRuleAssociationsClientGetResponse, error) { - result := DataCollectionRuleAssociationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionRuleAssociationProxyOnlyResource); err != nil { - return DataCollectionRuleAssociationsClientGetResponse{}, err - } - return result, nil -} - -// NewListByDataCollectionEndpointPager - Lists associations for the specified data collection endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// dataCollectionEndpointName - The name of the data collection endpoint. The name is case insensitive. -// options - DataCollectionRuleAssociationsClientListByDataCollectionEndpointOptions contains the optional parameters for -// the DataCollectionRuleAssociationsClient.ListByDataCollectionEndpoint method. -func (client *DataCollectionRuleAssociationsClient) NewListByDataCollectionEndpointPager(resourceGroupName string, dataCollectionEndpointName string, options *DataCollectionRuleAssociationsClientListByDataCollectionEndpointOptions) *runtime.Pager[DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse] { - return runtime.NewPager(runtime.PagingHandler[DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse]{ - More: func(page DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse) (DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByDataCollectionEndpointCreateRequest(ctx, resourceGroupName, dataCollectionEndpointName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse{}, runtime.NewResponseError(resp) - } - return client.listByDataCollectionEndpointHandleResponse(resp) - }, - }) -} - -// listByDataCollectionEndpointCreateRequest creates the ListByDataCollectionEndpoint request. -func (client *DataCollectionRuleAssociationsClient) listByDataCollectionEndpointCreateRequest(ctx context.Context, resourceGroupName string, dataCollectionEndpointName string, options *DataCollectionRuleAssociationsClientListByDataCollectionEndpointOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}/associations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dataCollectionEndpointName == "" { - return nil, errors.New("parameter dataCollectionEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dataCollectionEndpointName}", url.PathEscape(dataCollectionEndpointName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByDataCollectionEndpointHandleResponse handles the ListByDataCollectionEndpoint response. -func (client *DataCollectionRuleAssociationsClient) listByDataCollectionEndpointHandleResponse(resp *http.Response) (DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse, error) { - result := DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionRuleAssociationProxyOnlyResourceListResult); err != nil { - return DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse{}, err - } - return result, nil -} - -// NewListByResourcePager - Lists associations for the specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceURI - The identifier of the resource. -// options - DataCollectionRuleAssociationsClientListByResourceOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.ListByResource -// method. -func (client *DataCollectionRuleAssociationsClient) NewListByResourcePager(resourceURI string, options *DataCollectionRuleAssociationsClientListByResourceOptions) *runtime.Pager[DataCollectionRuleAssociationsClientListByResourceResponse] { - return runtime.NewPager(runtime.PagingHandler[DataCollectionRuleAssociationsClientListByResourceResponse]{ - More: func(page DataCollectionRuleAssociationsClientListByResourceResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DataCollectionRuleAssociationsClientListByResourceResponse) (DataCollectionRuleAssociationsClientListByResourceResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceCreateRequest(ctx, resourceURI, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DataCollectionRuleAssociationsClientListByResourceResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRuleAssociationsClientListByResourceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionRuleAssociationsClientListByResourceResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceHandleResponse(resp) - }, - }) -} - -// listByResourceCreateRequest creates the ListByResource request. -func (client *DataCollectionRuleAssociationsClient) listByResourceCreateRequest(ctx context.Context, resourceURI string, options *DataCollectionRuleAssociationsClientListByResourceOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceHandleResponse handles the ListByResource response. -func (client *DataCollectionRuleAssociationsClient) listByResourceHandleResponse(resp *http.Response) (DataCollectionRuleAssociationsClientListByResourceResponse, error) { - result := DataCollectionRuleAssociationsClientListByResourceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionRuleAssociationProxyOnlyResourceListResult); err != nil { - return DataCollectionRuleAssociationsClientListByResourceResponse{}, err - } - return result, nil -} - -// NewListByRulePager - Lists associations for the specified data collection rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// dataCollectionRuleName - The name of the data collection rule. The name is case insensitive. -// options - DataCollectionRuleAssociationsClientListByRuleOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.ListByRule -// method. -func (client *DataCollectionRuleAssociationsClient) NewListByRulePager(resourceGroupName string, dataCollectionRuleName string, options *DataCollectionRuleAssociationsClientListByRuleOptions) *runtime.Pager[DataCollectionRuleAssociationsClientListByRuleResponse] { - return runtime.NewPager(runtime.PagingHandler[DataCollectionRuleAssociationsClientListByRuleResponse]{ - More: func(page DataCollectionRuleAssociationsClientListByRuleResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DataCollectionRuleAssociationsClientListByRuleResponse) (DataCollectionRuleAssociationsClientListByRuleResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByRuleCreateRequest(ctx, resourceGroupName, dataCollectionRuleName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DataCollectionRuleAssociationsClientListByRuleResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRuleAssociationsClientListByRuleResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionRuleAssociationsClientListByRuleResponse{}, runtime.NewResponseError(resp) - } - return client.listByRuleHandleResponse(resp) - }, - }) -} - -// listByRuleCreateRequest creates the ListByRule request. -func (client *DataCollectionRuleAssociationsClient) listByRuleCreateRequest(ctx context.Context, resourceGroupName string, dataCollectionRuleName string, options *DataCollectionRuleAssociationsClientListByRuleOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}/associations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dataCollectionRuleName == "" { - return nil, errors.New("parameter dataCollectionRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dataCollectionRuleName}", url.PathEscape(dataCollectionRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByRuleHandleResponse handles the ListByRule response. -func (client *DataCollectionRuleAssociationsClient) listByRuleHandleResponse(resp *http.Response) (DataCollectionRuleAssociationsClientListByRuleResponse, error) { - result := DataCollectionRuleAssociationsClientListByRuleResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionRuleAssociationProxyOnlyResourceListResult); err != nil { - return DataCollectionRuleAssociationsClientListByRuleResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_datacollectionrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_datacollectionrules_client.go deleted file mode 100644 index 67c1f4a3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_datacollectionrules_client.go +++ /dev/null @@ -1,404 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DataCollectionRulesClient contains the methods for the DataCollectionRules group. -// Don't use this type directly, use NewDataCollectionRulesClient() instead. -type DataCollectionRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDataCollectionRulesClient creates a new instance of DataCollectionRulesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDataCollectionRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataCollectionRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DataCollectionRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Create - Creates or updates a data collection rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// dataCollectionRuleName - The name of the data collection rule. The name is case insensitive. -// options - DataCollectionRulesClientCreateOptions contains the optional parameters for the DataCollectionRulesClient.Create -// method. -func (client *DataCollectionRulesClient) Create(ctx context.Context, resourceGroupName string, dataCollectionRuleName string, options *DataCollectionRulesClientCreateOptions) (DataCollectionRulesClientCreateResponse, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, dataCollectionRuleName, options) - if err != nil { - return DataCollectionRulesClientCreateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRulesClientCreateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return DataCollectionRulesClientCreateResponse{}, runtime.NewResponseError(resp) - } - return client.createHandleResponse(resp) -} - -// createCreateRequest creates the Create request. -func (client *DataCollectionRulesClient) createCreateRequest(ctx context.Context, resourceGroupName string, dataCollectionRuleName string, options *DataCollectionRulesClientCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dataCollectionRuleName == "" { - return nil, errors.New("parameter dataCollectionRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dataCollectionRuleName}", url.PathEscape(dataCollectionRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Body != nil { - return req, runtime.MarshalAsJSON(req, *options.Body) - } - return req, nil -} - -// createHandleResponse handles the Create response. -func (client *DataCollectionRulesClient) createHandleResponse(resp *http.Response) (DataCollectionRulesClientCreateResponse, error) { - result := DataCollectionRulesClientCreateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionRuleResource); err != nil { - return DataCollectionRulesClientCreateResponse{}, err - } - return result, nil -} - -// Delete - Deletes a data collection rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// dataCollectionRuleName - The name of the data collection rule. The name is case insensitive. -// options - DataCollectionRulesClientDeleteOptions contains the optional parameters for the DataCollectionRulesClient.Delete -// method. -func (client *DataCollectionRulesClient) Delete(ctx context.Context, resourceGroupName string, dataCollectionRuleName string, options *DataCollectionRulesClientDeleteOptions) (DataCollectionRulesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, dataCollectionRuleName, options) - if err != nil { - return DataCollectionRulesClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRulesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DataCollectionRulesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return DataCollectionRulesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DataCollectionRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, dataCollectionRuleName string, options *DataCollectionRulesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dataCollectionRuleName == "" { - return nil, errors.New("parameter dataCollectionRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dataCollectionRuleName}", url.PathEscape(dataCollectionRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Returns the specified data collection rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// dataCollectionRuleName - The name of the data collection rule. The name is case insensitive. -// options - DataCollectionRulesClientGetOptions contains the optional parameters for the DataCollectionRulesClient.Get method. -func (client *DataCollectionRulesClient) Get(ctx context.Context, resourceGroupName string, dataCollectionRuleName string, options *DataCollectionRulesClientGetOptions) (DataCollectionRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, dataCollectionRuleName, options) - if err != nil { - return DataCollectionRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DataCollectionRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, dataCollectionRuleName string, options *DataCollectionRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dataCollectionRuleName == "" { - return nil, errors.New("parameter dataCollectionRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dataCollectionRuleName}", url.PathEscape(dataCollectionRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DataCollectionRulesClient) getHandleResponse(resp *http.Response) (DataCollectionRulesClientGetResponse, error) { - result := DataCollectionRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionRuleResource); err != nil { - return DataCollectionRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all data collection rules in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - DataCollectionRulesClientListByResourceGroupOptions contains the optional parameters for the DataCollectionRulesClient.ListByResourceGroup -// method. -func (client *DataCollectionRulesClient) NewListByResourceGroupPager(resourceGroupName string, options *DataCollectionRulesClientListByResourceGroupOptions) *runtime.Pager[DataCollectionRulesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[DataCollectionRulesClientListByResourceGroupResponse]{ - More: func(page DataCollectionRulesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DataCollectionRulesClientListByResourceGroupResponse) (DataCollectionRulesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DataCollectionRulesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRulesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionRulesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *DataCollectionRulesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DataCollectionRulesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *DataCollectionRulesClient) listByResourceGroupHandleResponse(resp *http.Response) (DataCollectionRulesClientListByResourceGroupResponse, error) { - result := DataCollectionRulesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionRuleResourceListResult); err != nil { - return DataCollectionRulesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Lists all data collection rules in the specified subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// options - DataCollectionRulesClientListBySubscriptionOptions contains the optional parameters for the DataCollectionRulesClient.ListBySubscription -// method. -func (client *DataCollectionRulesClient) NewListBySubscriptionPager(options *DataCollectionRulesClientListBySubscriptionOptions) *runtime.Pager[DataCollectionRulesClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[DataCollectionRulesClientListBySubscriptionResponse]{ - More: func(page DataCollectionRulesClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DataCollectionRulesClientListBySubscriptionResponse) (DataCollectionRulesClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DataCollectionRulesClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRulesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionRulesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *DataCollectionRulesClient) listBySubscriptionCreateRequest(ctx context.Context, options *DataCollectionRulesClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionRules" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *DataCollectionRulesClient) listBySubscriptionHandleResponse(resp *http.Response) (DataCollectionRulesClientListBySubscriptionResponse, error) { - result := DataCollectionRulesClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionRuleResourceListResult); err != nil { - return DataCollectionRulesClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Updates part of a data collection rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-09-01-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// dataCollectionRuleName - The name of the data collection rule. The name is case insensitive. -// options - DataCollectionRulesClientUpdateOptions contains the optional parameters for the DataCollectionRulesClient.Update -// method. -func (client *DataCollectionRulesClient) Update(ctx context.Context, resourceGroupName string, dataCollectionRuleName string, options *DataCollectionRulesClientUpdateOptions) (DataCollectionRulesClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, dataCollectionRuleName, options) - if err != nil { - return DataCollectionRulesClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DataCollectionRulesClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DataCollectionRulesClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *DataCollectionRulesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, dataCollectionRuleName string, options *DataCollectionRulesClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dataCollectionRuleName == "" { - return nil, errors.New("parameter dataCollectionRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dataCollectionRuleName}", url.PathEscape(dataCollectionRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-09-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Body != nil { - return req, runtime.MarshalAsJSON(req, *options.Body) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *DataCollectionRulesClient) updateHandleResponse(resp *http.Response) (DataCollectionRulesClientUpdateResponse, error) { - result := DataCollectionRulesClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DataCollectionRuleResource); err != nil { - return DataCollectionRulesClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_diagnosticsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_diagnosticsettings_client.go deleted file mode 100644 index 63a3dfb0..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_diagnosticsettings_client.go +++ /dev/null @@ -1,237 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DiagnosticSettingsClient contains the methods for the DiagnosticSettings group. -// Don't use this type directly, use NewDiagnosticSettingsClient() instead. -type DiagnosticSettingsClient struct { - host string - pl runtime.Pipeline -} - -// NewDiagnosticSettingsClient creates a new instance of DiagnosticSettingsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDiagnosticSettingsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DiagnosticSettingsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DiagnosticSettingsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates diagnostic settings for the specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2017-05-01-preview -// resourceURI - The identifier of the resource. -// name - The name of the diagnostic setting. -// parameters - Parameters supplied to the operation. -// options - DiagnosticSettingsClientCreateOrUpdateOptions contains the optional parameters for the DiagnosticSettingsClient.CreateOrUpdate -// method. -func (client *DiagnosticSettingsClient) CreateOrUpdate(ctx context.Context, resourceURI string, name string, parameters DiagnosticSettingsResource, options *DiagnosticSettingsClientCreateOrUpdateOptions) (DiagnosticSettingsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceURI, name, parameters, options) - if err != nil { - return DiagnosticSettingsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticSettingsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticSettingsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DiagnosticSettingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceURI string, name string, parameters DiagnosticSettingsResource, options *DiagnosticSettingsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2017-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *DiagnosticSettingsClient) createOrUpdateHandleResponse(resp *http.Response) (DiagnosticSettingsClientCreateOrUpdateResponse, error) { - result := DiagnosticSettingsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticSettingsResource); err != nil { - return DiagnosticSettingsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes existing diagnostic settings for the specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2017-05-01-preview -// resourceURI - The identifier of the resource. -// name - The name of the diagnostic setting. -// options - DiagnosticSettingsClientDeleteOptions contains the optional parameters for the DiagnosticSettingsClient.Delete -// method. -func (client *DiagnosticSettingsClient) Delete(ctx context.Context, resourceURI string, name string, options *DiagnosticSettingsClientDeleteOptions) (DiagnosticSettingsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceURI, name, options) - if err != nil { - return DiagnosticSettingsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticSettingsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DiagnosticSettingsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return DiagnosticSettingsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DiagnosticSettingsClient) deleteCreateRequest(ctx context.Context, resourceURI string, name string, options *DiagnosticSettingsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2017-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the active diagnostic settings for the specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2017-05-01-preview -// resourceURI - The identifier of the resource. -// name - The name of the diagnostic setting. -// options - DiagnosticSettingsClientGetOptions contains the optional parameters for the DiagnosticSettingsClient.Get method. -func (client *DiagnosticSettingsClient) Get(ctx context.Context, resourceURI string, name string, options *DiagnosticSettingsClientGetOptions) (DiagnosticSettingsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceURI, name, options) - if err != nil { - return DiagnosticSettingsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticSettingsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticSettingsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DiagnosticSettingsClient) getCreateRequest(ctx context.Context, resourceURI string, name string, options *DiagnosticSettingsClientGetOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2017-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DiagnosticSettingsClient) getHandleResponse(resp *http.Response) (DiagnosticSettingsClientGetResponse, error) { - result := DiagnosticSettingsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticSettingsResource); err != nil { - return DiagnosticSettingsClientGetResponse{}, err - } - return result, nil -} - -// List - Gets the active diagnostic settings list for the specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2017-05-01-preview -// resourceURI - The identifier of the resource. -// options - DiagnosticSettingsClientListOptions contains the optional parameters for the DiagnosticSettingsClient.List method. -func (client *DiagnosticSettingsClient) List(ctx context.Context, resourceURI string, options *DiagnosticSettingsClientListOptions) (DiagnosticSettingsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceURI, options) - if err != nil { - return DiagnosticSettingsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticSettingsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticSettingsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *DiagnosticSettingsClient) listCreateRequest(ctx context.Context, resourceURI string, options *DiagnosticSettingsClientListOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2017-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DiagnosticSettingsClient) listHandleResponse(resp *http.Response) (DiagnosticSettingsClientListResponse, error) { - result := DiagnosticSettingsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticSettingsResourceCollection); err != nil { - return DiagnosticSettingsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_diagnosticsettingscategory_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_diagnosticsettingscategory_client.go deleted file mode 100644 index ae29a45e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_diagnosticsettingscategory_client.go +++ /dev/null @@ -1,147 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DiagnosticSettingsCategoryClient contains the methods for the DiagnosticSettingsCategory group. -// Don't use this type directly, use NewDiagnosticSettingsCategoryClient() instead. -type DiagnosticSettingsCategoryClient struct { - host string - pl runtime.Pipeline -} - -// NewDiagnosticSettingsCategoryClient creates a new instance of DiagnosticSettingsCategoryClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDiagnosticSettingsCategoryClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DiagnosticSettingsCategoryClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DiagnosticSettingsCategoryClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the diagnostic settings category for the specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2017-05-01-preview -// resourceURI - The identifier of the resource. -// name - The name of the diagnostic setting. -// options - DiagnosticSettingsCategoryClientGetOptions contains the optional parameters for the DiagnosticSettingsCategoryClient.Get -// method. -func (client *DiagnosticSettingsCategoryClient) Get(ctx context.Context, resourceURI string, name string, options *DiagnosticSettingsCategoryClientGetOptions) (DiagnosticSettingsCategoryClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceURI, name, options) - if err != nil { - return DiagnosticSettingsCategoryClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticSettingsCategoryClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticSettingsCategoryClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DiagnosticSettingsCategoryClient) getCreateRequest(ctx context.Context, resourceURI string, name string, options *DiagnosticSettingsCategoryClientGetOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories/{name}" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2017-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DiagnosticSettingsCategoryClient) getHandleResponse(resp *http.Response) (DiagnosticSettingsCategoryClientGetResponse, error) { - result := DiagnosticSettingsCategoryClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticSettingsCategoryResource); err != nil { - return DiagnosticSettingsCategoryClientGetResponse{}, err - } - return result, nil -} - -// List - Lists the diagnostic settings categories for the specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2017-05-01-preview -// resourceURI - The identifier of the resource. -// options - DiagnosticSettingsCategoryClientListOptions contains the optional parameters for the DiagnosticSettingsCategoryClient.List -// method. -func (client *DiagnosticSettingsCategoryClient) List(ctx context.Context, resourceURI string, options *DiagnosticSettingsCategoryClientListOptions) (DiagnosticSettingsCategoryClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceURI, options) - if err != nil { - return DiagnosticSettingsCategoryClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DiagnosticSettingsCategoryClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticSettingsCategoryClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *DiagnosticSettingsCategoryClient) listCreateRequest(ctx context.Context, resourceURI string, options *DiagnosticSettingsCategoryClientListOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2017-05-01-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DiagnosticSettingsCategoryClient) listHandleResponse(resp *http.Response) (DiagnosticSettingsCategoryClientListResponse, error) { - result := DiagnosticSettingsCategoryClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DiagnosticSettingsCategoryResourceCollection); err != nil { - return DiagnosticSettingsCategoryClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_eventcategories_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_eventcategories_client.go deleted file mode 100644 index 2a7819a7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_eventcategories_client.go +++ /dev/null @@ -1,99 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// EventCategoriesClient contains the methods for the EventCategories group. -// Don't use this type directly, use NewEventCategoriesClient() instead. -type EventCategoriesClient struct { - host string - pl runtime.Pipeline -} - -// NewEventCategoriesClient creates a new instance of EventCategoriesClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewEventCategoriesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*EventCategoriesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &EventCategoriesClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Get the list of available event categories supported in the Activity Logs Service. The current list includes -// the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2015-04-01 -// options - EventCategoriesClientListOptions contains the optional parameters for the EventCategoriesClient.List method. -func (client *EventCategoriesClient) NewListPager(options *EventCategoriesClientListOptions) *runtime.Pager[EventCategoriesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[EventCategoriesClientListResponse]{ - More: func(page EventCategoriesClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *EventCategoriesClientListResponse) (EventCategoriesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, options) - if err != nil { - return EventCategoriesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return EventCategoriesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EventCategoriesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *EventCategoriesClient) listCreateRequest(ctx context.Context, options *EventCategoriesClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Insights/eventcategories" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2015-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *EventCategoriesClient) listHandleResponse(resp *http.Response) (EventCategoriesClientListResponse, error) { - result := EventCategoriesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EventCategoryCollection); err != nil { - return EventCategoriesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_logprofiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_logprofiles_client.go deleted file mode 100644 index c3c3ccd7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_logprofiles_client.go +++ /dev/null @@ -1,305 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// LogProfilesClient contains the methods for the LogProfiles group. -// Don't use this type directly, use NewLogProfilesClient() instead. -type LogProfilesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewLogProfilesClient creates a new instance of LogProfilesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewLogProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LogProfilesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &LogProfilesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create or update a log profile in Azure Monitoring REST API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// logProfileName - The name of the log profile. -// parameters - Parameters supplied to the operation. -// options - LogProfilesClientCreateOrUpdateOptions contains the optional parameters for the LogProfilesClient.CreateOrUpdate -// method. -func (client *LogProfilesClient) CreateOrUpdate(ctx context.Context, logProfileName string, parameters LogProfileResource, options *LogProfilesClientCreateOrUpdateOptions) (LogProfilesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, logProfileName, parameters, options) - if err != nil { - return LogProfilesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LogProfilesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogProfilesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *LogProfilesClient) createOrUpdateCreateRequest(ctx context.Context, logProfileName string, parameters LogProfileResource, options *LogProfilesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}" - if logProfileName == "" { - return nil, errors.New("parameter logProfileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{logProfileName}", url.PathEscape(logProfileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *LogProfilesClient) createOrUpdateHandleResponse(resp *http.Response) (LogProfilesClientCreateOrUpdateResponse, error) { - result := LogProfilesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogProfileResource); err != nil { - return LogProfilesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes the log profile. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// logProfileName - The name of the log profile. -// options - LogProfilesClientDeleteOptions contains the optional parameters for the LogProfilesClient.Delete method. -func (client *LogProfilesClient) Delete(ctx context.Context, logProfileName string, options *LogProfilesClientDeleteOptions) (LogProfilesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, logProfileName, options) - if err != nil { - return LogProfilesClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LogProfilesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogProfilesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return LogProfilesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *LogProfilesClient) deleteCreateRequest(ctx context.Context, logProfileName string, options *LogProfilesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}" - if logProfileName == "" { - return nil, errors.New("parameter logProfileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{logProfileName}", url.PathEscape(logProfileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets the log profile. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// logProfileName - The name of the log profile. -// options - LogProfilesClientGetOptions contains the optional parameters for the LogProfilesClient.Get method. -func (client *LogProfilesClient) Get(ctx context.Context, logProfileName string, options *LogProfilesClientGetOptions) (LogProfilesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, logProfileName, options) - if err != nil { - return LogProfilesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LogProfilesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogProfilesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *LogProfilesClient) getCreateRequest(ctx context.Context, logProfileName string, options *LogProfilesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}" - if logProfileName == "" { - return nil, errors.New("parameter logProfileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{logProfileName}", url.PathEscape(logProfileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *LogProfilesClient) getHandleResponse(resp *http.Response) (LogProfilesClientGetResponse, error) { - result := LogProfilesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogProfileResource); err != nil { - return LogProfilesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List the log profiles. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// options - LogProfilesClientListOptions contains the optional parameters for the LogProfilesClient.List method. -func (client *LogProfilesClient) NewListPager(options *LogProfilesClientListOptions) *runtime.Pager[LogProfilesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[LogProfilesClientListResponse]{ - More: func(page LogProfilesClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *LogProfilesClientListResponse) (LogProfilesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, options) - if err != nil { - return LogProfilesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LogProfilesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogProfilesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *LogProfilesClient) listCreateRequest(ctx context.Context, options *LogProfilesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *LogProfilesClient) listHandleResponse(resp *http.Response) (LogProfilesClientListResponse, error) { - result := LogProfilesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogProfileCollection); err != nil { - return LogProfilesClientListResponse{}, err - } - return result, nil -} - -// Update - Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2016-03-01 -// logProfileName - The name of the log profile. -// logProfilesResource - Parameters supplied to the operation. -// options - LogProfilesClientUpdateOptions contains the optional parameters for the LogProfilesClient.Update method. -func (client *LogProfilesClient) Update(ctx context.Context, logProfileName string, logProfilesResource LogProfileResourcePatch, options *LogProfilesClientUpdateOptions) (LogProfilesClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, logProfileName, logProfilesResource, options) - if err != nil { - return LogProfilesClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LogProfilesClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LogProfilesClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *LogProfilesClient) updateCreateRequest(ctx context.Context, logProfileName string, logProfilesResource LogProfileResourcePatch, options *LogProfilesClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if logProfileName == "" { - return nil, errors.New("parameter logProfileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{logProfileName}", url.PathEscape(logProfileName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2016-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, logProfilesResource) -} - -// updateHandleResponse handles the Update response. -func (client *LogProfilesClient) updateHandleResponse(resp *http.Response) (LogProfilesClientUpdateResponse, error) { - result := LogProfilesClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogProfileResource); err != nil { - return LogProfilesClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricalerts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricalerts_client.go deleted file mode 100644 index c4fb4286..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricalerts_client.go +++ /dev/null @@ -1,386 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// MetricAlertsClient contains the methods for the MetricAlerts group. -// Don't use this type directly, use NewMetricAlertsClient() instead. -type MetricAlertsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewMetricAlertsClient creates a new instance of MetricAlertsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewMetricAlertsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MetricAlertsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &MetricAlertsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create or update an metric alert definition. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// parameters - The parameters of the rule to create or update. -// options - MetricAlertsClientCreateOrUpdateOptions contains the optional parameters for the MetricAlertsClient.CreateOrUpdate -// method. -func (client *MetricAlertsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ruleName string, parameters MetricAlertResource, options *MetricAlertsClientCreateOrUpdateOptions) (MetricAlertsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ruleName, parameters, options) - if err != nil { - return MetricAlertsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricAlertsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetricAlertsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *MetricAlertsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, parameters MetricAlertResource, options *MetricAlertsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *MetricAlertsClient) createOrUpdateHandleResponse(resp *http.Response) (MetricAlertsClientCreateOrUpdateResponse, error) { - result := MetricAlertsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MetricAlertResource); err != nil { - return MetricAlertsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete an alert rule definition. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// options - MetricAlertsClientDeleteOptions contains the optional parameters for the MetricAlertsClient.Delete method. -func (client *MetricAlertsClient) Delete(ctx context.Context, resourceGroupName string, ruleName string, options *MetricAlertsClientDeleteOptions) (MetricAlertsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, ruleName, options) - if err != nil { - return MetricAlertsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricAlertsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return MetricAlertsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return MetricAlertsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *MetricAlertsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, options *MetricAlertsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieve an alert rule definition. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// options - MetricAlertsClientGetOptions contains the optional parameters for the MetricAlertsClient.Get method. -func (client *MetricAlertsClient) Get(ctx context.Context, resourceGroupName string, ruleName string, options *MetricAlertsClientGetOptions) (MetricAlertsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, ruleName, options) - if err != nil { - return MetricAlertsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricAlertsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetricAlertsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *MetricAlertsClient) getCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, options *MetricAlertsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *MetricAlertsClient) getHandleResponse(resp *http.Response) (MetricAlertsClientGetResponse, error) { - result := MetricAlertsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MetricAlertResource); err != nil { - return MetricAlertsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Retrieve alert rule definitions in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - MetricAlertsClientListByResourceGroupOptions contains the optional parameters for the MetricAlertsClient.ListByResourceGroup -// method. -func (client *MetricAlertsClient) NewListByResourceGroupPager(resourceGroupName string, options *MetricAlertsClientListByResourceGroupOptions) *runtime.Pager[MetricAlertsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[MetricAlertsClientListByResourceGroupResponse]{ - More: func(page MetricAlertsClientListByResourceGroupResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *MetricAlertsClientListByResourceGroupResponse) (MetricAlertsClientListByResourceGroupResponse, error) { - req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - if err != nil { - return MetricAlertsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricAlertsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetricAlertsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *MetricAlertsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *MetricAlertsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *MetricAlertsClient) listByResourceGroupHandleResponse(resp *http.Response) (MetricAlertsClientListByResourceGroupResponse, error) { - result := MetricAlertsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MetricAlertResourceCollection); err != nil { - return MetricAlertsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Retrieve alert rule definitions in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-03-01 -// options - MetricAlertsClientListBySubscriptionOptions contains the optional parameters for the MetricAlertsClient.ListBySubscription -// method. -func (client *MetricAlertsClient) NewListBySubscriptionPager(options *MetricAlertsClientListBySubscriptionOptions) *runtime.Pager[MetricAlertsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[MetricAlertsClientListBySubscriptionResponse]{ - More: func(page MetricAlertsClientListBySubscriptionResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *MetricAlertsClientListBySubscriptionResponse) (MetricAlertsClientListBySubscriptionResponse, error) { - req, err := client.listBySubscriptionCreateRequest(ctx, options) - if err != nil { - return MetricAlertsClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricAlertsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetricAlertsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *MetricAlertsClient) listBySubscriptionCreateRequest(ctx context.Context, options *MetricAlertsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *MetricAlertsClient) listBySubscriptionHandleResponse(resp *http.Response) (MetricAlertsClientListBySubscriptionResponse, error) { - result := MetricAlertsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MetricAlertResourceCollection); err != nil { - return MetricAlertsClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Update an metric alert definition. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// parameters - The parameters of the rule to update. -// options - MetricAlertsClientUpdateOptions contains the optional parameters for the MetricAlertsClient.Update method. -func (client *MetricAlertsClient) Update(ctx context.Context, resourceGroupName string, ruleName string, parameters MetricAlertResourcePatch, options *MetricAlertsClientUpdateOptions) (MetricAlertsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, ruleName, parameters, options) - if err != nil { - return MetricAlertsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricAlertsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetricAlertsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *MetricAlertsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, parameters MetricAlertResourcePatch, options *MetricAlertsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateHandleResponse handles the Update response. -func (client *MetricAlertsClient) updateHandleResponse(resp *http.Response) (MetricAlertsClientUpdateResponse, error) { - result := MetricAlertsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MetricAlertResource); err != nil { - return MetricAlertsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricalertsstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricalertsstatus_client.go deleted file mode 100644 index a62eae62..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricalertsstatus_client.go +++ /dev/null @@ -1,173 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// MetricAlertsStatusClient contains the methods for the MetricAlertsStatus group. -// Don't use this type directly, use NewMetricAlertsStatusClient() instead. -type MetricAlertsStatusClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewMetricAlertsStatusClient creates a new instance of MetricAlertsStatusClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewMetricAlertsStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MetricAlertsStatusClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &MetricAlertsStatusClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// List - Retrieve an alert rule status. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// options - MetricAlertsStatusClientListOptions contains the optional parameters for the MetricAlertsStatusClient.List method. -func (client *MetricAlertsStatusClient) List(ctx context.Context, resourceGroupName string, ruleName string, options *MetricAlertsStatusClientListOptions) (MetricAlertsStatusClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, ruleName, options) - if err != nil { - return MetricAlertsStatusClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricAlertsStatusClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetricAlertsStatusClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *MetricAlertsStatusClient) listCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, options *MetricAlertsStatusClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *MetricAlertsStatusClient) listHandleResponse(resp *http.Response) (MetricAlertsStatusClientListResponse, error) { - result := MetricAlertsStatusClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MetricAlertStatusCollection); err != nil { - return MetricAlertsStatusClientListResponse{}, err - } - return result, nil -} - -// ListByName - Retrieve an alert rule status. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-03-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// statusName - The name of the status. -// options - MetricAlertsStatusClientListByNameOptions contains the optional parameters for the MetricAlertsStatusClient.ListByName -// method. -func (client *MetricAlertsStatusClient) ListByName(ctx context.Context, resourceGroupName string, ruleName string, statusName string, options *MetricAlertsStatusClientListByNameOptions) (MetricAlertsStatusClientListByNameResponse, error) { - req, err := client.listByNameCreateRequest(ctx, resourceGroupName, ruleName, statusName, options) - if err != nil { - return MetricAlertsStatusClientListByNameResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricAlertsStatusClientListByNameResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetricAlertsStatusClientListByNameResponse{}, runtime.NewResponseError(resp) - } - return client.listByNameHandleResponse(resp) -} - -// listByNameCreateRequest creates the ListByName request. -func (client *MetricAlertsStatusClient) listByNameCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, statusName string, options *MetricAlertsStatusClientListByNameOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status/{statusName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if statusName == "" { - return nil, errors.New("parameter statusName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{statusName}", url.PathEscape(statusName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByNameHandleResponse handles the ListByName response. -func (client *MetricAlertsStatusClient) listByNameHandleResponse(resp *http.Response) (MetricAlertsStatusClientListByNameResponse, error) { - result := MetricAlertsStatusClientListByNameResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MetricAlertStatusCollection); err != nil { - return MetricAlertsStatusClientListByNameResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricdefinitions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricdefinitions_client.go deleted file mode 100644 index eb0174dd..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricdefinitions_client.go +++ /dev/null @@ -1,104 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "strings" -) - -// MetricDefinitionsClient contains the methods for the MetricDefinitions group. -// Don't use this type directly, use NewMetricDefinitionsClient() instead. -type MetricDefinitionsClient struct { - host string - pl runtime.Pipeline -} - -// NewMetricDefinitionsClient creates a new instance of MetricDefinitionsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewMetricDefinitionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*MetricDefinitionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &MetricDefinitionsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists the metric definitions for the resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-01-01 -// resourceURI - The identifier of the resource. -// options - MetricDefinitionsClientListOptions contains the optional parameters for the MetricDefinitionsClient.List method. -func (client *MetricDefinitionsClient) NewListPager(resourceURI string, options *MetricDefinitionsClientListOptions) *runtime.Pager[MetricDefinitionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[MetricDefinitionsClientListResponse]{ - More: func(page MetricDefinitionsClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *MetricDefinitionsClientListResponse) (MetricDefinitionsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceURI, options) - if err != nil { - return MetricDefinitionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricDefinitionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetricDefinitionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *MetricDefinitionsClient) listCreateRequest(ctx context.Context, resourceURI string, options *MetricDefinitionsClientListOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/metricDefinitions" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-01-01") - if options != nil && options.Metricnamespace != nil { - reqQP.Set("metricnamespace", *options.Metricnamespace) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *MetricDefinitionsClient) listHandleResponse(resp *http.Response) (MetricDefinitionsClientListResponse, error) { - result := MetricDefinitionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MetricDefinitionCollection); err != nil { - return MetricDefinitionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricnamespaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricnamespaces_client.go deleted file mode 100644 index 2066e1d7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metricnamespaces_client.go +++ /dev/null @@ -1,104 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "strings" -) - -// MetricNamespacesClient contains the methods for the MetricNamespaces group. -// Don't use this type directly, use NewMetricNamespacesClient() instead. -type MetricNamespacesClient struct { - host string - pl runtime.Pipeline -} - -// NewMetricNamespacesClient creates a new instance of MetricNamespacesClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewMetricNamespacesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*MetricNamespacesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &MetricNamespacesClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists the metric namespaces for the resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2017-12-01-preview -// resourceURI - The identifier of the resource. -// options - MetricNamespacesClientListOptions contains the optional parameters for the MetricNamespacesClient.List method. -func (client *MetricNamespacesClient) NewListPager(resourceURI string, options *MetricNamespacesClientListOptions) *runtime.Pager[MetricNamespacesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[MetricNamespacesClientListResponse]{ - More: func(page MetricNamespacesClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *MetricNamespacesClientListResponse) (MetricNamespacesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceURI, options) - if err != nil { - return MetricNamespacesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricNamespacesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetricNamespacesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *MetricNamespacesClient) listCreateRequest(ctx context.Context, resourceURI string, options *MetricNamespacesClientListOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/microsoft.insights/metricNamespaces" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2017-12-01-preview") - if options != nil && options.StartTime != nil { - reqQP.Set("startTime", *options.StartTime) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *MetricNamespacesClient) listHandleResponse(resp *http.Response) (MetricNamespacesClientListResponse, error) { - result := MetricNamespacesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MetricNamespaceCollection); err != nil { - return MetricNamespacesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metrics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metrics_client.go deleted file mode 100644 index 5a33485c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_metrics_client.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "strconv" - "strings" -) - -// MetricsClient contains the methods for the Metrics group. -// Don't use this type directly, use NewMetricsClient() instead. -type MetricsClient struct { - host string - pl runtime.Pipeline -} - -// NewMetricsClient creates a new instance of MetricsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewMetricsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*MetricsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &MetricsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// List - Lists the metric values for a resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-01-01 -// resourceURI - The identifier of the resource. -// options - MetricsClientListOptions contains the optional parameters for the MetricsClient.List method. -func (client *MetricsClient) List(ctx context.Context, resourceURI string, options *MetricsClientListOptions) (MetricsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceURI, options) - if err != nil { - return MetricsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MetricsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MetricsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *MetricsClient) listCreateRequest(ctx context.Context, resourceURI string, options *MetricsClientListOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/metrics" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Timespan != nil { - reqQP.Set("timespan", *options.Timespan) - } - if options != nil && options.Interval != nil { - reqQP.Set("interval", *options.Interval) - } - if options != nil && options.Metricnames != nil { - reqQP.Set("metricnames", *options.Metricnames) - } - if options != nil && options.Aggregation != nil { - reqQP.Set("aggregation", *options.Aggregation) - } - if options != nil && options.Top != nil { - reqQP.Set("top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.Orderby != nil { - reqQP.Set("orderby", *options.Orderby) - } - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.ResultType != nil { - reqQP.Set("resultType", string(*options.ResultType)) - } - reqQP.Set("api-version", "2018-01-01") - if options != nil && options.Metricnamespace != nil { - reqQP.Set("metricnamespace", *options.Metricnamespace) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *MetricsClient) listHandleResponse(resp *http.Response) (MetricsClientListResponse, error) { - result := MetricsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Response); err != nil { - return MetricsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_models.go deleted file mode 100644 index b1917b20..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_models.go +++ /dev/null @@ -1,4234 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import "time" - -// ActionClassification provides polymorphic access to related types. -// Call the interface's GetAction() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *Action, *AlertingAction, *LogToMetricAction -type ActionClassification interface { - // GetAction returns the Action content of the underlying type. - GetAction() *Action -} - -// Action descriptor. -type Action struct { - // REQUIRED; Specifies the action. Supported values - AlertingAction, LogToMetricAction - ODataType *string `json:"odata.type,omitempty"` -} - -// GetAction implements the ActionClassification interface for type Action. -func (a *Action) GetAction() *Action { return a } - -// ActionDetail - The action detail -type ActionDetail struct { - // The detail of the friendly error message - Detail *string `json:"Detail,omitempty"` - - // The mechanism type - MechanismType *string `json:"MechanismType,omitempty"` - - // The name of the action - Name *string `json:"Name,omitempty"` - - // The send time - SendTime *string `json:"SendTime,omitempty"` - - // The status of the action - Status *string `json:"Status,omitempty"` - - // The substatus of the action - SubState *string `json:"SubState,omitempty"` -} - -// ActionGroup - An Azure action group. -type ActionGroup struct { - // REQUIRED; Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers - // will receive communications. - Enabled *bool `json:"enabled,omitempty"` - - // REQUIRED; The short name of the action group. This will be used in SMS messages. - GroupShortName *string `json:"groupShortName,omitempty"` - - // The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are - // supported. - ArmRoleReceivers []*ArmRoleReceiver `json:"armRoleReceivers,omitempty"` - - // The list of AutomationRunbook receivers that are part of this action group. - AutomationRunbookReceivers []*AutomationRunbookReceiver `json:"automationRunbookReceivers,omitempty"` - - // The list of AzureAppPush receivers that are part of this action group. - AzureAppPushReceivers []*AzureAppPushReceiver `json:"azureAppPushReceivers,omitempty"` - - // The list of azure function receivers that are part of this action group. - AzureFunctionReceivers []*AzureFunctionReceiver `json:"azureFunctionReceivers,omitempty"` - - // The list of email receivers that are part of this action group. - EmailReceivers []*EmailReceiver `json:"emailReceivers,omitempty"` - - // The list of event hub receivers that are part of this action group. - EventHubReceivers []*EventHubReceiver `json:"eventHubReceivers,omitempty"` - - // The list of ITSM receivers that are part of this action group. - ItsmReceivers []*ItsmReceiver `json:"itsmReceivers,omitempty"` - - // The list of logic app receivers that are part of this action group. - LogicAppReceivers []*LogicAppReceiver `json:"logicAppReceivers,omitempty"` - - // The list of SMS receivers that are part of this action group. - SmsReceivers []*SmsReceiver `json:"smsReceivers,omitempty"` - - // The list of voice receivers that are part of this action group. - VoiceReceivers []*VoiceReceiver `json:"voiceReceivers,omitempty"` - - // The list of webhook receivers that are part of this action group. - WebhookReceivers []*WebhookReceiver `json:"webhookReceivers,omitempty"` -} - -// ActionGroupAutoGenerated - A pointer to an Azure Action Group. -type ActionGroupAutoGenerated struct { - // REQUIRED; The resource ID of the Action Group. This cannot be null or empty. - ActionGroupID *string `json:"actionGroupId,omitempty"` - - // the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. - WebhookProperties map[string]*string `json:"webhookProperties,omitempty"` -} - -// ActionGroupList - A list of action groups. -type ActionGroupList struct { - // Provides the link to retrieve the next set of elements. - NextLink *string `json:"nextLink,omitempty"` - - // The list of action groups. - Value []*ActionGroupResource `json:"value,omitempty"` -} - -// ActionGroupPatch - An Azure action group for patch operations. -type ActionGroupPatch struct { - // Indicates whether this action group is enabled. If an action group is not enabled, then none of its actions will be activated. - Enabled *bool `json:"enabled,omitempty"` -} - -// ActionGroupPatchBody - An action group object for the body of patch operations. -type ActionGroupPatchBody struct { - // The action group settings for an update operation. - Properties *ActionGroupPatch `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - -// ActionGroupResource - An action group resource. -type ActionGroupResource struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // The action groups properties of the resource. - Properties *ActionGroup `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource identity - Identity *string `json:"identity,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource kind - Kind *string `json:"kind,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ActionGroupsClientBeginCreateNotificationsAtActionGroupResourceLevelOptions contains the optional parameters for the ActionGroupsClient.BeginCreateNotificationsAtActionGroupResourceLevel -// method. -type ActionGroupsClientBeginCreateNotificationsAtActionGroupResourceLevelOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ActionGroupsClientBeginCreateNotificationsAtResourceGroupLevelOptions contains the optional parameters for the ActionGroupsClient.BeginCreateNotificationsAtResourceGroupLevel -// method. -type ActionGroupsClientBeginCreateNotificationsAtResourceGroupLevelOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ActionGroupsClientBeginPostTestNotificationsOptions contains the optional parameters for the ActionGroupsClient.BeginPostTestNotifications -// method. -type ActionGroupsClientBeginPostTestNotificationsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ActionGroupsClientCreateOrUpdateOptions contains the optional parameters for the ActionGroupsClient.CreateOrUpdate method. -type ActionGroupsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ActionGroupsClientDeleteOptions contains the optional parameters for the ActionGroupsClient.Delete method. -type ActionGroupsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ActionGroupsClientEnableReceiverOptions contains the optional parameters for the ActionGroupsClient.EnableReceiver method. -type ActionGroupsClientEnableReceiverOptions struct { - // placeholder for future optional parameters -} - -// ActionGroupsClientGetOptions contains the optional parameters for the ActionGroupsClient.Get method. -type ActionGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelOptions contains the optional parameters for the ActionGroupsClient.GetTestNotificationsAtActionGroupResourceLevel -// method. -type ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelOptions struct { - // placeholder for future optional parameters -} - -// ActionGroupsClientGetTestNotificationsAtResourceGroupLevelOptions contains the optional parameters for the ActionGroupsClient.GetTestNotificationsAtResourceGroupLevel -// method. -type ActionGroupsClientGetTestNotificationsAtResourceGroupLevelOptions struct { - // placeholder for future optional parameters -} - -// ActionGroupsClientGetTestNotificationsOptions contains the optional parameters for the ActionGroupsClient.GetTestNotifications -// method. -type ActionGroupsClientGetTestNotificationsOptions struct { - // placeholder for future optional parameters -} - -// ActionGroupsClientListByResourceGroupOptions contains the optional parameters for the ActionGroupsClient.ListByResourceGroup -// method. -type ActionGroupsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ActionGroupsClientListBySubscriptionIDOptions contains the optional parameters for the ActionGroupsClient.ListBySubscriptionID -// method. -type ActionGroupsClientListBySubscriptionIDOptions struct { - // placeholder for future optional parameters -} - -// ActionGroupsClientUpdateOptions contains the optional parameters for the ActionGroupsClient.Update method. -type ActionGroupsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ActionList - A list of Activity Log Alert rule actions. -type ActionList struct { - // The list of the Action Groups. - ActionGroups []*ActionGroupAutoGenerated `json:"actionGroups,omitempty"` -} - -// ActivityLogAlertResource - An Activity Log Alert rule resource. -type ActivityLogAlertResource struct { - // The location of the resource. Since Azure Activity Log Alerts is a global service, the location of the rules should always - // be 'global'. - Location *string `json:"location,omitempty"` - - // The Activity Log Alert rule properties of the resource. - Properties *AlertRuleProperties `json:"properties,omitempty"` - - // The tags of the resource. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ActivityLogAlertsClientCreateOrUpdateOptions contains the optional parameters for the ActivityLogAlertsClient.CreateOrUpdate -// method. -type ActivityLogAlertsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ActivityLogAlertsClientDeleteOptions contains the optional parameters for the ActivityLogAlertsClient.Delete method. -type ActivityLogAlertsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ActivityLogAlertsClientGetOptions contains the optional parameters for the ActivityLogAlertsClient.Get method. -type ActivityLogAlertsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ActivityLogAlertsClientListByResourceGroupOptions contains the optional parameters for the ActivityLogAlertsClient.ListByResourceGroup -// method. -type ActivityLogAlertsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ActivityLogAlertsClientListBySubscriptionIDOptions contains the optional parameters for the ActivityLogAlertsClient.ListBySubscriptionID -// method. -type ActivityLogAlertsClientListBySubscriptionIDOptions struct { - // placeholder for future optional parameters -} - -// ActivityLogAlertsClientUpdateOptions contains the optional parameters for the ActivityLogAlertsClient.Update method. -type ActivityLogAlertsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ActivityLogsClientListOptions contains the optional parameters for the ActivityLogsClient.List method. -type ActivityLogsClientListOptions struct { - // Used to fetch events with only the given properties. - // The $select argument is a comma separated list of property names to be returned. Possible values are: authorization, claims, - // correlationId, description, eventDataId, eventName, eventTimestamp, - // httpRequest, level, operationId, operationName, properties, resourceGroupName, resourceProviderName, resourceId, status, - // submissionTimestamp, subStatus, subscriptionId - Select *string -} - -// AlertRule - An alert rule. -type AlertRule struct { - // REQUIRED; the condition that results in the alert rule being activated. - Condition RuleConditionClassification `json:"condition,omitempty"` - - // REQUIRED; the flag that indicates whether the alert rule is enabled. - IsEnabled *bool `json:"isEnabled,omitempty"` - - // REQUIRED; the name of the alert rule. - Name *string `json:"name,omitempty"` - - // action that is performed when the alert rule becomes active, and when an alert condition is resolved. - Action RuleActionClassification `json:"action,omitempty"` - - // the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - Actions []RuleActionClassification `json:"actions,omitempty"` - - // the description of the alert rule that will be included in the alert email. - Description *string `json:"description,omitempty"` - - // the provisioning state. - ProvisioningState *string `json:"provisioningState,omitempty"` - - // READ-ONLY; Last time the rule was updated in ISO8601 format. - LastUpdatedTime *time.Time `json:"lastUpdatedTime,omitempty" azure:"ro"` -} - -// AlertRuleAllOfCondition - An Activity Log Alert rule condition that is met when all its member conditions are met. -type AlertRuleAllOfCondition struct { - // REQUIRED; The list of Activity Log Alert rule conditions. - AllOf []*AlertRuleAnyOfOrLeafCondition `json:"allOf,omitempty"` -} - -// AlertRuleAnyOfOrLeafCondition - An Activity Log Alert rule condition that is met when all its member conditions are met. -// Each condition can be of one of the following types:Important: Each type has its unique subset of properties. -// Properties from different types CANNOT exist in one condition. -// * Leaf Condition - must contain 'field' and either 'equals' or 'containsAny'.Please note, 'anyOf' should not be set in -// a Leaf Condition. -// * AnyOf Condition - must contain only 'anyOf' (which is an array of Leaf Conditions).Please note, 'field', 'equals' and -// 'containsAny' should not be set in an AnyOf Condition. -type AlertRuleAnyOfOrLeafCondition struct { - // An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met. - AnyOf []*AlertRuleLeafCondition `json:"anyOf,omitempty"` - - // The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition - // is met. - ContainsAny []*string `json:"containsAny,omitempty"` - - // The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. - Equals *string `json:"equals,omitempty"` - - // The name of the Activity Log event's field that this condition will examine. The possible values for this field are (case-insensitive): - // 'resourceId', 'category', 'caller', 'level', 'operationName', - // 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'. - Field *string `json:"field,omitempty"` -} - -// AlertRuleIncidentsClientGetOptions contains the optional parameters for the AlertRuleIncidentsClient.Get method. -type AlertRuleIncidentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AlertRuleIncidentsClientListByAlertRuleOptions contains the optional parameters for the AlertRuleIncidentsClient.ListByAlertRule -// method. -type AlertRuleIncidentsClientListByAlertRuleOptions struct { - // placeholder for future optional parameters -} - -// AlertRuleLeafCondition - An Activity Log Alert rule condition that is met by comparing the field and value of an Activity -// Log event. This condition must contain 'field' and either 'equals' or 'containsAny'. -type AlertRuleLeafCondition struct { - // The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition - // is met. - ContainsAny []*string `json:"containsAny,omitempty"` - - // The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. - Equals *string `json:"equals,omitempty"` - - // The name of the Activity Log event's field that this condition will examine. The possible values for this field are (case-insensitive): - // 'resourceId', 'category', 'caller', 'level', 'operationName', - // 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'. - Field *string `json:"field,omitempty"` -} - -// AlertRuleList - A list of Activity Log Alert rules. -type AlertRuleList struct { - // Provides the link to retrieve the next set of elements. - NextLink *string `json:"nextLink,omitempty"` - - // The list of Activity Log Alert rules. - Value []*ActivityLogAlertResource `json:"value,omitempty"` -} - -// AlertRulePatchObject - An Activity Log Alert rule object for the body of patch operations. -type AlertRulePatchObject struct { - // The activity log alert settings for an update operation. - Properties *AlertRulePatchProperties `json:"properties,omitempty"` - - // The resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - -// AlertRulePatchProperties - An Activity Log Alert rule properties for patch operations. -type AlertRulePatchProperties struct { - // Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its - // actions will be activated. - Enabled *bool `json:"enabled,omitempty"` -} - -// AlertRuleProperties - An Azure Activity Log Alert rule. -type AlertRuleProperties struct { - // REQUIRED; The actions that will activate when the condition is met. - Actions *ActionList `json:"actions,omitempty"` - - // REQUIRED; The condition that will cause this alert to activate. - Condition *AlertRuleAllOfCondition `json:"condition,omitempty"` - - // REQUIRED; A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource - // IDs that fall under one of these prefixes. This list must include at least one - // item. - Scopes []*string `json:"scopes,omitempty"` - - // A description of this Activity Log Alert rule. - Description *string `json:"description,omitempty"` - - // Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its - // actions will be activated. - Enabled *bool `json:"enabled,omitempty"` -} - -// AlertRuleResource - The alert rule resource. -type AlertRuleResource struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; The alert rule properties of the resource. - Properties *AlertRule `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AlertRuleResourceCollection - Represents a collection of alert rule resources. -type AlertRuleResourceCollection struct { - // the values for the alert rule resources. - Value []*AlertRuleResource `json:"value,omitempty"` -} - -// AlertRuleResourcePatch - The alert rule object for patch operations. -type AlertRuleResourcePatch struct { - // The properties of an alert rule. - Properties *AlertRule `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - -// AlertRulesClientCreateOrUpdateOptions contains the optional parameters for the AlertRulesClient.CreateOrUpdate method. -type AlertRulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AlertRulesClientDeleteOptions contains the optional parameters for the AlertRulesClient.Delete method. -type AlertRulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AlertRulesClientGetOptions contains the optional parameters for the AlertRulesClient.Get method. -type AlertRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// AlertRulesClientListByResourceGroupOptions contains the optional parameters for the AlertRulesClient.ListByResourceGroup -// method. -type AlertRulesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AlertRulesClientListBySubscriptionOptions contains the optional parameters for the AlertRulesClient.ListBySubscription -// method. -type AlertRulesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// AlertRulesClientUpdateOptions contains the optional parameters for the AlertRulesClient.Update method. -type AlertRulesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// AlertingAction - Specify action need to be taken when rule type is Alert -type AlertingAction struct { - // REQUIRED; Specifies the action. Supported values - AlertingAction, LogToMetricAction - ODataType *string `json:"odata.type,omitempty"` - - // REQUIRED; Severity of the alert - Severity *AlertSeverity `json:"severity,omitempty"` - - // REQUIRED; The trigger condition that results in the alert rule being. - Trigger *TriggerCondition `json:"trigger,omitempty"` - - // Azure action group reference. - AznsAction *AzNsActionGroup `json:"aznsAction,omitempty"` - - // time (in minutes) for which Alerts should be throttled or suppressed. - ThrottlingInMin *int32 `json:"throttlingInMin,omitempty"` -} - -// GetAction implements the ActionClassification interface for type AlertingAction. -func (a *AlertingAction) GetAction() *Action { - return &Action{ - ODataType: a.ODataType, - } -} - -// ArmRoleReceiver - An arm role receiver. -type ArmRoleReceiver struct { - // REQUIRED; The name of the arm role receiver. Names must be unique across all receivers within an action group. - Name *string `json:"name,omitempty"` - - // REQUIRED; The arm role id. - RoleID *string `json:"roleId,omitempty"` - - // Indicates whether to use common alert schema. - UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"` -} - -// AutomationRunbookReceiver - The Azure Automation Runbook notification receiver. -type AutomationRunbookReceiver struct { - // REQUIRED; The Azure automation account Id which holds this runbook and authenticate to Azure resource. - AutomationAccountID *string `json:"automationAccountId,omitempty"` - - // REQUIRED; Indicates whether this instance is global runbook. - IsGlobalRunbook *bool `json:"isGlobalRunbook,omitempty"` - - // REQUIRED; The name for this runbook. - RunbookName *string `json:"runbookName,omitempty"` - - // REQUIRED; The resource id for webhook linked to this runbook. - WebhookResourceID *string `json:"webhookResourceId,omitempty"` - - // Indicates name of the webhook. - Name *string `json:"name,omitempty"` - - // The URI where webhooks should be sent. - ServiceURI *string `json:"serviceUri,omitempty"` - - // Indicates whether to use common alert schema. - UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"` -} - -// AutoscaleNotification - Autoscale notification. -type AutoscaleNotification struct { - // REQUIRED; the operation associated with the notification and its value must be "scale" - Operation *string `json:"operation,omitempty"` - - // the email notification. - Email *EmailNotification `json:"email,omitempty"` - - // the collection of webhook notifications. - Webhooks []*WebhookNotification `json:"webhooks,omitempty"` -} - -// AutoscaleProfile - Autoscale profile. -type AutoscaleProfile struct { - // REQUIRED; the number of instances that can be used during this profile. - Capacity *ScaleCapacity `json:"capacity,omitempty"` - - // REQUIRED; the name of the profile. - Name *string `json:"name,omitempty"` - - // REQUIRED; the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules - // can be specified. - Rules []*ScaleRule `json:"rules,omitempty"` - - // the specific date-time for the profile. This element is not used if the Recurrence element is used. - FixedDate *TimeWindow `json:"fixedDate,omitempty"` - - // the repeating times at which this profile begins. This element is not used if the FixedDate element is used. - Recurrence *Recurrence `json:"recurrence,omitempty"` -} - -// AutoscaleSetting - A setting that contains all of the configuration for the automatic scaling of a resource. -type AutoscaleSetting struct { - // REQUIRED; the collection of automatic scaling profiles that specify different scaling parameters for different time periods. - // A maximum of 20 profiles can be specified. - Profiles []*AutoscaleProfile `json:"profiles,omitempty"` - - // the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'true'. - Enabled *bool `json:"enabled,omitempty"` - - // the name of the autoscale setting. - Name *string `json:"name,omitempty"` - - // the collection of notifications. - Notifications []*AutoscaleNotification `json:"notifications,omitempty"` - - // the location of the resource that the autoscale setting should be added to. - TargetResourceLocation *string `json:"targetResourceLocation,omitempty"` - - // the resource identifier of the resource that the autoscale setting should be added to. - TargetResourceURI *string `json:"targetResourceUri,omitempty"` -} - -// AutoscaleSettingResource - The autoscale setting resource. -type AutoscaleSettingResource struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; The autoscale setting of the resource. - Properties *AutoscaleSetting `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AutoscaleSettingResourceCollection - Represents a collection of autoscale setting resources. -type AutoscaleSettingResourceCollection struct { - // REQUIRED; the values for the autoscale setting resources. - Value []*AutoscaleSettingResource `json:"value,omitempty"` - - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// AutoscaleSettingResourcePatch - The autoscale setting object for patch operations. -type AutoscaleSettingResourcePatch struct { - // The autoscale setting properties of the update operation. - Properties *AutoscaleSetting `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - -// AutoscaleSettingsClientCreateOrUpdateOptions contains the optional parameters for the AutoscaleSettingsClient.CreateOrUpdate -// method. -type AutoscaleSettingsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AutoscaleSettingsClientDeleteOptions contains the optional parameters for the AutoscaleSettingsClient.Delete method. -type AutoscaleSettingsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AutoscaleSettingsClientGetOptions contains the optional parameters for the AutoscaleSettingsClient.Get method. -type AutoscaleSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AutoscaleSettingsClientListByResourceGroupOptions contains the optional parameters for the AutoscaleSettingsClient.ListByResourceGroup -// method. -type AutoscaleSettingsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AutoscaleSettingsClientListBySubscriptionOptions contains the optional parameters for the AutoscaleSettingsClient.ListBySubscription -// method. -type AutoscaleSettingsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// AutoscaleSettingsClientUpdateOptions contains the optional parameters for the AutoscaleSettingsClient.Update method. -type AutoscaleSettingsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// AzNsActionGroup - Azure action group -type AzNsActionGroup struct { - // Azure Action Group reference. - ActionGroup []*string `json:"actionGroup,omitempty"` - - // Custom payload to be sent for all webhook URI in Azure action group - CustomWebhookPayload *string `json:"customWebhookPayload,omitempty"` - - // Custom subject override for all email ids in Azure action group - EmailSubject *string `json:"emailSubject,omitempty"` -} - -// AzureAppPushReceiver - The Azure mobile App push notification receiver. -type AzureAppPushReceiver struct { - // REQUIRED; The email address registered for the Azure mobile app. - EmailAddress *string `json:"emailAddress,omitempty"` - - // REQUIRED; The name of the Azure mobile app push receiver. Names must be unique across all receivers within an action group. - Name *string `json:"name,omitempty"` -} - -// AzureFunctionReceiver - An azure function receiver. -type AzureFunctionReceiver struct { - // REQUIRED; The azure resource id of the function app. - FunctionAppResourceID *string `json:"functionAppResourceId,omitempty"` - - // REQUIRED; The function name in the function app. - FunctionName *string `json:"functionName,omitempty"` - - // REQUIRED; The http trigger url where http request sent to. - HTTPTriggerURL *string `json:"httpTriggerUrl,omitempty"` - - // REQUIRED; The name of the azure function receiver. Names must be unique across all receivers within an action group. - Name *string `json:"name,omitempty"` - - // Indicates whether to use common alert schema. - UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"` -} - -// AzureMonitorMetricsDestination - Azure Monitor Metrics destination. -type AzureMonitorMetricsDestination struct { - // A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the - // data collection rule. - Name *string `json:"name,omitempty"` -} - -// AzureMonitorPrivateLinkScope - An Azure Monitor PrivateLinkScope definition. -type AzureMonitorPrivateLinkScope struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; Properties that define a Azure Monitor PrivateLinkScope resource. - Properties *AzureMonitorPrivateLinkScopeProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AzureMonitorPrivateLinkScopeListResult - Describes the list of Azure Monitor PrivateLinkScope resources. -type AzureMonitorPrivateLinkScopeListResult struct { - // REQUIRED; List of Azure Monitor PrivateLinkScope definitions. - Value []*AzureMonitorPrivateLinkScope `json:"value,omitempty"` - - // The URI to get the next set of Azure Monitor PrivateLinkScope definitions if too many PrivateLinkScopes where returned - // in the result set. - NextLink *string `json:"nextLink,omitempty"` -} - -// AzureMonitorPrivateLinkScopeProperties - Properties that define a Azure Monitor PrivateLinkScope resource. -type AzureMonitorPrivateLinkScopeProperties struct { - // READ-ONLY; List of private endpoint connections. - PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` - - // READ-ONLY; Current state of this PrivateLinkScope: whether or not is has been provisioned within the resource group it - // is defined. Users cannot change this value but are able to read from it. Values will include - // Provisioning ,Succeeded, Canceled and Failed. - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// AzureResource - An azure resource object -type AzureResource struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource identity - Identity *string `json:"identity,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource kind - Kind *string `json:"kind,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AzureResourceAutoGenerated - An Azure resource object. -type AzureResourceAutoGenerated struct { - // The location of the resource. Since Azure Activity Log Alerts is a global service, the location of the rules should always - // be 'global'. - Location *string `json:"location,omitempty"` - - // The tags of the resource. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The resource Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BaselineMetadata - Represents a baseline metadata value. -type BaselineMetadata struct { - // REQUIRED; Name of the baseline metadata. - Name *string `json:"name,omitempty"` - - // REQUIRED; Value of the baseline metadata. - Value *string `json:"value,omitempty"` -} - -// BaselinesClientListOptions contains the optional parameters for the BaselinesClient.List method. -type BaselinesClientListOptions struct { - // The list of aggregation types (comma separated) to retrieve. - Aggregation *string - // The $filter is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all - // time series of C where A = a1 and B = b1 or b2 $filter=A eq 'a1' and B eq 'b1' - // or B eq 'b2' and C eq '' - Invalid variant: $filter=A eq 'a1' and B eq 'b1' and C eq '' or B = 'b2' This is invalid because - // the logical or operator cannot separate two different metadata names. - - // Return all time series where A = a1, B = b1 and C = c1: $filter=A eq 'a1' and B eq 'b1' and C eq 'c1' - Return all time - // series where A = a1 $filter=A eq 'a1' and B eq '' and C eq ''. Special case: - // When dimension name or dimension value uses round brackets. Eg: When dimension name is dim (test) 1 Instead of using $filter= - // "dim (test) 1 eq '' " use $filter= "dim %2528test%2529 1 eq '' " When - // dimension name is dim (test) 3 and dimension value is dim3 (test) val Instead of using $filter= "dim (test) 3 eq 'dim3 - // (test) val' " use $filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' " - Filter *string - // The interval (i.e. timegrain) of the query. - Interval *string - // The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use - // %2 to indicate it. Eg: 'Metric,Name1' should be 'Metric%2Name1' - Metricnames *string - // Metric namespace to query metric definitions for. - Metricnamespace *string - // Allows retrieving only metadata of the baseline. On data request all information is retrieved. - ResultType *ResultType - // The list of sensitivities (comma separated) to retrieve. - Sensitivities *string - // The timespan of the query. It is a string with the following format 'startDateTimeISO/endDateTimeISO'. - Timespan *string -} - -// ColumnDefinition - Definition of custom data column. -type ColumnDefinition struct { - // The name of the column. - Name *string `json:"name,omitempty"` - - // The type of the column data. - Type *KnownColumnDefinitionType `json:"type,omitempty"` -} - -// ConfigurationAccessEndpointSpec - Definition of the endpoint used for accessing configuration. -type ConfigurationAccessEndpointSpec struct { - // READ-ONLY; The endpoint. This property is READ-ONLY. - Endpoint *string `json:"endpoint,omitempty" azure:"ro"` -} - -// Context - The context info -type Context struct { - // The context id type - ContextType *string `json:"ContextType,omitempty"` - - // The source of the notification request - NotificationSource *string `json:"NotificationSource,omitempty"` -} - -// Criteria - Specifies the criteria for converting log to metric. -type Criteria struct { - // REQUIRED; Name of the metric - MetricName *string `json:"metricName,omitempty"` - - // List of Dimensions for creating metric - Dimensions []*Dimension `json:"dimensions,omitempty"` -} - -// DataCollectionEndpoint - Definition of data collection endpoint. -type DataCollectionEndpoint struct { - // The endpoint used by clients to access their configuration. - ConfigurationAccess *DataCollectionEndpointConfigurationAccess `json:"configurationAccess,omitempty"` - - // Description of the data collection endpoint. - Description *string `json:"description,omitempty"` - - // The immutable ID of this data collection endpoint resource. This property is READ-ONLY. - ImmutableID *string `json:"immutableId,omitempty"` - - // The endpoint used by clients to ingest logs. - LogsIngestion *DataCollectionEndpointLogsIngestion `json:"logsIngestion,omitempty"` - - // Network access control rules for the endpoints. - NetworkACLs *DataCollectionEndpointNetworkACLs `json:"networkAcls,omitempty"` - - // READ-ONLY; The resource provisioning state. This property is READ-ONLY. - ProvisioningState *KnownDataCollectionEndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// DataCollectionEndpointConfigurationAccess - The endpoint used by clients to access their configuration. -type DataCollectionEndpointConfigurationAccess struct { - // READ-ONLY; The endpoint. This property is READ-ONLY. - Endpoint *string `json:"endpoint,omitempty" azure:"ro"` -} - -// DataCollectionEndpointLogsIngestion - The endpoint used by clients to ingest logs. -type DataCollectionEndpointLogsIngestion struct { - // READ-ONLY; The endpoint. This property is READ-ONLY. - Endpoint *string `json:"endpoint,omitempty" azure:"ro"` -} - -// DataCollectionEndpointNetworkACLs - Network access control rules for the endpoints. -type DataCollectionEndpointNetworkACLs struct { - // The configuration to set whether network access from public internet to the endpoints are allowed. - PublicNetworkAccess *KnownPublicNetworkAccessOptions `json:"publicNetworkAccess,omitempty"` -} - -// DataCollectionEndpointResource - Definition of ARM tracked top level resource. -type DataCollectionEndpointResource struct { - // REQUIRED; The geo-location where the resource lives. - Location *string `json:"location,omitempty"` - - // The kind of the resource. - Kind *KnownDataCollectionEndpointResourceKind `json:"kind,omitempty"` - - // Resource properties. - Properties *DataCollectionEndpointResourceProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource entity tag (ETag). - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Fully qualified ID of the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *DataCollectionEndpointResourceSystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DataCollectionEndpointResourceListResult - A pageable list of resources. -type DataCollectionEndpointResourceListResult struct { - // REQUIRED; A list of resources. - Value []*DataCollectionEndpointResource `json:"value,omitempty"` - - // The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// DataCollectionEndpointResourceProperties - Resource properties. -type DataCollectionEndpointResourceProperties struct { - // The endpoint used by clients to access their configuration. - ConfigurationAccess *DataCollectionEndpointConfigurationAccess `json:"configurationAccess,omitempty"` - - // Description of the data collection endpoint. - Description *string `json:"description,omitempty"` - - // The immutable ID of this data collection endpoint resource. This property is READ-ONLY. - ImmutableID *string `json:"immutableId,omitempty"` - - // The endpoint used by clients to ingest logs. - LogsIngestion *DataCollectionEndpointLogsIngestion `json:"logsIngestion,omitempty"` - - // Network access control rules for the endpoints. - NetworkACLs *DataCollectionEndpointNetworkACLs `json:"networkAcls,omitempty"` - - // READ-ONLY; The resource provisioning state. This property is READ-ONLY. - ProvisioningState *KnownDataCollectionEndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// DataCollectionEndpointResourceSystemData - Metadata pertaining to creation and last modification of the resource. -type DataCollectionEndpointResourceSystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -// DataCollectionEndpointsClientCreateOptions contains the optional parameters for the DataCollectionEndpointsClient.Create -// method. -type DataCollectionEndpointsClientCreateOptions struct { - // The payload - Body *DataCollectionEndpointResource -} - -// DataCollectionEndpointsClientDeleteOptions contains the optional parameters for the DataCollectionEndpointsClient.Delete -// method. -type DataCollectionEndpointsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionEndpointsClientGetOptions contains the optional parameters for the DataCollectionEndpointsClient.Get method. -type DataCollectionEndpointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionEndpointsClientListByResourceGroupOptions contains the optional parameters for the DataCollectionEndpointsClient.ListByResourceGroup -// method. -type DataCollectionEndpointsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionEndpointsClientListBySubscriptionOptions contains the optional parameters for the DataCollectionEndpointsClient.ListBySubscription -// method. -type DataCollectionEndpointsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionEndpointsClientUpdateOptions contains the optional parameters for the DataCollectionEndpointsClient.Update -// method. -type DataCollectionEndpointsClientUpdateOptions struct { - // The payload - Body *ResourceForUpdate -} - -// DataCollectionRule - Definition of what monitoring data to collect and where that data should be sent. -type DataCollectionRule struct { - // The resource ID of the data collection endpoint that this rule can be used with. - DataCollectionEndpointID *string `json:"dataCollectionEndpointId,omitempty"` - - // The specification of data flows. - DataFlows []*DataFlow `json:"dataFlows,omitempty"` - - // The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct - // calls to the provisioned endpoint. - DataSources *DataCollectionRuleDataSources `json:"dataSources,omitempty"` - - // Description of the data collection rule. - Description *string `json:"description,omitempty"` - - // The specification of destinations. - Destinations *DataCollectionRuleDestinations `json:"destinations,omitempty"` - - // Declaration of custom streams used in this rule. - StreamDeclarations map[string]*StreamDeclaration `json:"streamDeclarations,omitempty"` - - // READ-ONLY; The immutable ID of this data collection rule. This property is READ-ONLY. - ImmutableID *string `json:"immutableId,omitempty" azure:"ro"` - - // READ-ONLY; Metadata about the resource - Metadata *DataCollectionRuleMetadata `json:"metadata,omitempty" azure:"ro"` - - // READ-ONLY; The resource provisioning state. - ProvisioningState *KnownDataCollectionRuleProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// DataCollectionRuleAssociation - Definition of association of a data collection rule with a monitored Azure resource. -type DataCollectionRuleAssociation struct { - // The resource ID of the data collection endpoint that is to be associated. - DataCollectionEndpointID *string `json:"dataCollectionEndpointId,omitempty"` - - // The resource ID of the data collection rule that is to be associated. - DataCollectionRuleID *string `json:"dataCollectionRuleId,omitempty"` - - // Description of the association. - Description *string `json:"description,omitempty"` - - // READ-ONLY; Metadata about the resource - Metadata *DataCollectionRuleAssociationMetadata `json:"metadata,omitempty" azure:"ro"` - - // READ-ONLY; The resource provisioning state. - ProvisioningState *KnownDataCollectionRuleAssociationProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// DataCollectionRuleAssociationMetadata - Metadata about the resource -type DataCollectionRuleAssociationMetadata struct { - // READ-ONLY; Azure offering managing this resource on-behalf-of customer. - ProvisionedBy *string `json:"provisionedBy,omitempty" azure:"ro"` -} - -// DataCollectionRuleAssociationProxyOnlyResource - Definition of generic ARM proxy resource. -type DataCollectionRuleAssociationProxyOnlyResource struct { - // Resource properties. - Properties *DataCollectionRuleAssociationProxyOnlyResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource entity tag (ETag). - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Fully qualified ID of the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *DataCollectionRuleAssociationProxyOnlyResourceSystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DataCollectionRuleAssociationProxyOnlyResourceListResult - A pageable list of resources. -type DataCollectionRuleAssociationProxyOnlyResourceListResult struct { - // REQUIRED; A list of resources. - Value []*DataCollectionRuleAssociationProxyOnlyResource `json:"value,omitempty"` - - // The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// DataCollectionRuleAssociationProxyOnlyResourceProperties - Resource properties. -type DataCollectionRuleAssociationProxyOnlyResourceProperties struct { - // The resource ID of the data collection endpoint that is to be associated. - DataCollectionEndpointID *string `json:"dataCollectionEndpointId,omitempty"` - - // The resource ID of the data collection rule that is to be associated. - DataCollectionRuleID *string `json:"dataCollectionRuleId,omitempty"` - - // Description of the association. - Description *string `json:"description,omitempty"` - - // READ-ONLY; Metadata about the resource - Metadata *DataCollectionRuleAssociationMetadata `json:"metadata,omitempty" azure:"ro"` - - // READ-ONLY; The resource provisioning state. - ProvisioningState *KnownDataCollectionRuleAssociationProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// DataCollectionRuleAssociationProxyOnlyResourceSystemData - Metadata pertaining to creation and last modification of the -// resource. -type DataCollectionRuleAssociationProxyOnlyResourceSystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -// DataCollectionRuleAssociationsClientCreateOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.Create -// method. -type DataCollectionRuleAssociationsClientCreateOptions struct { - // The payload - Body *DataCollectionRuleAssociationProxyOnlyResource -} - -// DataCollectionRuleAssociationsClientDeleteOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.Delete -// method. -type DataCollectionRuleAssociationsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionRuleAssociationsClientGetOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.Get -// method. -type DataCollectionRuleAssociationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionRuleAssociationsClientListByDataCollectionEndpointOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.ListByDataCollectionEndpoint -// method. -type DataCollectionRuleAssociationsClientListByDataCollectionEndpointOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionRuleAssociationsClientListByResourceOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.ListByResource -// method. -type DataCollectionRuleAssociationsClientListByResourceOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionRuleAssociationsClientListByRuleOptions contains the optional parameters for the DataCollectionRuleAssociationsClient.ListByRule -// method. -type DataCollectionRuleAssociationsClientListByRuleOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionRuleDataSources - The specification of data sources. This property is optional and can be omitted if the -// rule is meant to be used via direct calls to the provisioned endpoint. -type DataCollectionRuleDataSources struct { - // The list of Azure VM extension data source configurations. - Extensions []*ExtensionDataSource `json:"extensions,omitempty"` - - // The list of IIS logs source configurations. - IisLogs []*IisLogsDataSource `json:"iisLogs,omitempty"` - - // The list of Log files source configurations. - LogFiles []*LogFilesDataSource `json:"logFiles,omitempty"` - - // The list of performance counter data source configurations. - PerformanceCounters []*PerfCounterDataSource `json:"performanceCounters,omitempty"` - - // The list of Syslog data source configurations. - Syslog []*SyslogDataSource `json:"syslog,omitempty"` - - // The list of Windows Event Log data source configurations. - WindowsEventLogs []*WindowsEventLogDataSource `json:"windowsEventLogs,omitempty"` -} - -// DataCollectionRuleDestinations - The specification of destinations. -type DataCollectionRuleDestinations struct { - // Azure Monitor Metrics destination. - AzureMonitorMetrics *DestinationsSpecAzureMonitorMetrics `json:"azureMonitorMetrics,omitempty"` - - // List of Log Analytics destinations. - LogAnalytics []*LogAnalyticsDestination `json:"logAnalytics,omitempty"` -} - -// DataCollectionRuleMetadata - Metadata about the resource -type DataCollectionRuleMetadata struct { - // READ-ONLY; Azure offering managing this resource on-behalf-of customer. - ProvisionedBy *string `json:"provisionedBy,omitempty" azure:"ro"` -} - -// DataCollectionRuleResource - Definition of ARM tracked top level resource. -type DataCollectionRuleResource struct { - // REQUIRED; The geo-location where the resource lives. - Location *string `json:"location,omitempty"` - - // The kind of the resource. - Kind *KnownDataCollectionRuleResourceKind `json:"kind,omitempty"` - - // Resource properties. - Properties *DataCollectionRuleResourceProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource entity tag (ETag). - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Fully qualified ID of the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. - SystemData *DataCollectionRuleResourceSystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DataCollectionRuleResourceListResult - A pageable list of resources. -type DataCollectionRuleResourceListResult struct { - // REQUIRED; A list of resources. - Value []*DataCollectionRuleResource `json:"value,omitempty"` - - // The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// DataCollectionRuleResourceProperties - Resource properties. -type DataCollectionRuleResourceProperties struct { - // The resource ID of the data collection endpoint that this rule can be used with. - DataCollectionEndpointID *string `json:"dataCollectionEndpointId,omitempty"` - - // The specification of data flows. - DataFlows []*DataFlow `json:"dataFlows,omitempty"` - - // The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct - // calls to the provisioned endpoint. - DataSources *DataCollectionRuleDataSources `json:"dataSources,omitempty"` - - // Description of the data collection rule. - Description *string `json:"description,omitempty"` - - // The specification of destinations. - Destinations *DataCollectionRuleDestinations `json:"destinations,omitempty"` - - // Declaration of custom streams used in this rule. - StreamDeclarations map[string]*StreamDeclaration `json:"streamDeclarations,omitempty"` - - // READ-ONLY; The immutable ID of this data collection rule. This property is READ-ONLY. - ImmutableID *string `json:"immutableId,omitempty" azure:"ro"` - - // READ-ONLY; Metadata about the resource - Metadata *DataCollectionRuleMetadata `json:"metadata,omitempty" azure:"ro"` - - // READ-ONLY; The resource provisioning state. - ProvisioningState *KnownDataCollectionRuleProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// DataCollectionRuleResourceSystemData - Metadata pertaining to creation and last modification of the resource. -type DataCollectionRuleResourceSystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -// DataCollectionRulesClientCreateOptions contains the optional parameters for the DataCollectionRulesClient.Create method. -type DataCollectionRulesClientCreateOptions struct { - // The payload - Body *DataCollectionRuleResource -} - -// DataCollectionRulesClientDeleteOptions contains the optional parameters for the DataCollectionRulesClient.Delete method. -type DataCollectionRulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionRulesClientGetOptions contains the optional parameters for the DataCollectionRulesClient.Get method. -type DataCollectionRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionRulesClientListByResourceGroupOptions contains the optional parameters for the DataCollectionRulesClient.ListByResourceGroup -// method. -type DataCollectionRulesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionRulesClientListBySubscriptionOptions contains the optional parameters for the DataCollectionRulesClient.ListBySubscription -// method. -type DataCollectionRulesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// DataCollectionRulesClientUpdateOptions contains the optional parameters for the DataCollectionRulesClient.Update method. -type DataCollectionRulesClientUpdateOptions struct { - // The payload - Body *ResourceForUpdate -} - -// DataContainer - Information about a container with data for a given resource. -type DataContainer struct { - // REQUIRED; Log Analytics workspace information. - Workspace *WorkspaceInfo `json:"workspace,omitempty"` -} - -// DataFlow - Definition of which streams are sent to which destinations. -type DataFlow struct { - // List of destinations for this data flow. - Destinations []*string `json:"destinations,omitempty"` - - // The output stream of the transform. Only required if the transform changes data to a different stream. - OutputStream *string `json:"outputStream,omitempty"` - - // List of streams for this data flow. - Streams []*KnownDataFlowStreams `json:"streams,omitempty"` - - // The KQL query to transform stream data. - TransformKql *string `json:"transformKql,omitempty"` -} - -// DataSourcesSpec - Specification of data sources that will be collected. -type DataSourcesSpec struct { - // The list of Azure VM extension data source configurations. - Extensions []*ExtensionDataSource `json:"extensions,omitempty"` - - // The list of IIS logs source configurations. - IisLogs []*IisLogsDataSource `json:"iisLogs,omitempty"` - - // The list of Log files source configurations. - LogFiles []*LogFilesDataSource `json:"logFiles,omitempty"` - - // The list of performance counter data source configurations. - PerformanceCounters []*PerfCounterDataSource `json:"performanceCounters,omitempty"` - - // The list of Syslog data source configurations. - Syslog []*SyslogDataSource `json:"syslog,omitempty"` - - // The list of Windows Event Log data source configurations. - WindowsEventLogs []*WindowsEventLogDataSource `json:"windowsEventLogs,omitempty"` -} - -// DestinationsSpec - Specification of destinations that can be used in data flows. -type DestinationsSpec struct { - // Azure Monitor Metrics destination. - AzureMonitorMetrics *DestinationsSpecAzureMonitorMetrics `json:"azureMonitorMetrics,omitempty"` - - // List of Log Analytics destinations. - LogAnalytics []*LogAnalyticsDestination `json:"logAnalytics,omitempty"` -} - -// DestinationsSpecAzureMonitorMetrics - Azure Monitor Metrics destination. -type DestinationsSpecAzureMonitorMetrics struct { - // A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the - // data collection rule. - Name *string `json:"name,omitempty"` -} - -// DiagnosticSettings - The diagnostic settings. -type DiagnosticSettings struct { - // The resource Id for the event hub authorization rule. - EventHubAuthorizationRuleID *string `json:"eventHubAuthorizationRuleId,omitempty"` - - // The name of the event hub. If none is specified, the default event hub will be selected. - EventHubName *string `json:"eventHubName,omitempty"` - - // A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, - // or use a destination type constructed as follows: _. Possible values are: - // Dedicated and null (null is default.) - LogAnalyticsDestinationType *string `json:"logAnalyticsDestinationType,omitempty"` - - // The list of logs settings. - Logs []*LogSettings `json:"logs,omitempty"` - - // The list of metric settings. - Metrics []*MetricSettings `json:"metrics,omitempty"` - - // The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility. - ServiceBusRuleID *string `json:"serviceBusRuleId,omitempty"` - - // The resource ID of the storage account to which you would like to send Diagnostic Logs. - StorageAccountID *string `json:"storageAccountId,omitempty"` - - // The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - // /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 - WorkspaceID *string `json:"workspaceId,omitempty"` -} - -// DiagnosticSettingsCategory - The diagnostic settings Category. -type DiagnosticSettingsCategory struct { - // The type of the diagnostic settings category. - CategoryType *CategoryType `json:"categoryType,omitempty"` -} - -// DiagnosticSettingsCategoryClientGetOptions contains the optional parameters for the DiagnosticSettingsCategoryClient.Get -// method. -type DiagnosticSettingsCategoryClientGetOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticSettingsCategoryClientListOptions contains the optional parameters for the DiagnosticSettingsCategoryClient.List -// method. -type DiagnosticSettingsCategoryClientListOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticSettingsCategoryResource - The diagnostic settings category resource. -type DiagnosticSettingsCategoryResource struct { - // The properties of a Diagnostic Settings Category. - Properties *DiagnosticSettingsCategory `json:"properties,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DiagnosticSettingsCategoryResourceCollection - Represents a collection of diagnostic setting category resources. -type DiagnosticSettingsCategoryResourceCollection struct { - // The collection of diagnostic settings category resources. - Value []*DiagnosticSettingsCategoryResource `json:"value,omitempty"` -} - -// DiagnosticSettingsClientCreateOrUpdateOptions contains the optional parameters for the DiagnosticSettingsClient.CreateOrUpdate -// method. -type DiagnosticSettingsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticSettingsClientDeleteOptions contains the optional parameters for the DiagnosticSettingsClient.Delete method. -type DiagnosticSettingsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticSettingsClientGetOptions contains the optional parameters for the DiagnosticSettingsClient.Get method. -type DiagnosticSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticSettingsClientListOptions contains the optional parameters for the DiagnosticSettingsClient.List method. -type DiagnosticSettingsClientListOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticSettingsResource - The diagnostic setting resource. -type DiagnosticSettingsResource struct { - // Properties of a Diagnostic Settings Resource. - Properties *DiagnosticSettings `json:"properties,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DiagnosticSettingsResourceCollection - Represents a collection of alert rule resources. -type DiagnosticSettingsResourceCollection struct { - // The collection of diagnostic settings resources;. - Value []*DiagnosticSettingsResource `json:"value,omitempty"` -} - -// Dimension - Specifies the criteria for converting log to metric. -type Dimension struct { - // REQUIRED; Name of the dimension - Name *string `json:"name,omitempty"` - - // REQUIRED; Operator for dimension values - Operator *Operator `json:"operator,omitempty"` - - // REQUIRED; List of dimension values - Values []*string `json:"values,omitempty"` -} - -// DynamicMetricCriteria - Criterion for dynamic threshold. -type DynamicMetricCriteria struct { - // REQUIRED; The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric - // series pattern. - AlertSensitivity *DynamicThresholdSensitivity `json:"alertSensitivity,omitempty"` - - // REQUIRED; Specifies the type of threshold criteria - CriterionType *CriterionType `json:"criterionType,omitempty"` - - // REQUIRED; The minimum number of violations required within the selected lookback time window required to raise an alert. - FailingPeriods *DynamicThresholdFailingPeriods `json:"failingPeriods,omitempty"` - - // REQUIRED; Name of the metric. - MetricName *string `json:"metricName,omitempty"` - - // REQUIRED; Name of the criteria. - Name *string `json:"name,omitempty"` - - // REQUIRED; The operator used to compare the metric value against the threshold. - Operator *DynamicThresholdOperator `json:"operator,omitempty"` - - // REQUIRED; the criteria time aggregation types. - TimeAggregation *AggregationTypeEnum `json:"timeAggregation,omitempty"` - - // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} - - // List of dimension conditions. - Dimensions []*MetricDimension `json:"dimensions,omitempty"` - - // Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds - // (in ISO8601 format) - IgnoreDataBefore *time.Time `json:"ignoreDataBefore,omitempty"` - - // Namespace of the metric. - MetricNamespace *string `json:"metricNamespace,omitempty"` - - // Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. - SkipMetricValidation *bool `json:"skipMetricValidation,omitempty"` -} - -// GetMultiMetricCriteria implements the MultiMetricCriteriaClassification interface for type DynamicMetricCriteria. -func (d *DynamicMetricCriteria) GetMultiMetricCriteria() *MultiMetricCriteria { - return &MultiMetricCriteria{ - CriterionType: d.CriterionType, - Name: d.Name, - MetricName: d.MetricName, - MetricNamespace: d.MetricNamespace, - TimeAggregation: d.TimeAggregation, - Dimensions: d.Dimensions, - SkipMetricValidation: d.SkipMetricValidation, - AdditionalProperties: d.AdditionalProperties, - } -} - -// DynamicThresholdFailingPeriods - The minimum number of violations required within the selected lookback time window required -// to raise an alert. -type DynamicThresholdFailingPeriods struct { - // REQUIRED; The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. - MinFailingPeriodsToAlert *float32 `json:"minFailingPeriodsToAlert,omitempty"` - - // REQUIRED; The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity - // (windowSize) and the selected number of aggregated points. - NumberOfEvaluationPeriods *float32 `json:"numberOfEvaluationPeriods,omitempty"` -} - -// EmailNotification - Email notification of an autoscale event. -type EmailNotification struct { - // the custom e-mails list. This value can be null or empty, in which case this attribute will be ignored. - CustomEmails []*string `json:"customEmails,omitempty"` - - // a value indicating whether to send email to subscription administrator. - SendToSubscriptionAdministrator *bool `json:"sendToSubscriptionAdministrator,omitempty"` - - // a value indicating whether to send email to subscription co-administrators. - SendToSubscriptionCoAdministrators *bool `json:"sendToSubscriptionCoAdministrators,omitempty"` -} - -// EmailReceiver - An email receiver. -type EmailReceiver struct { - // REQUIRED; The email address of this receiver. - EmailAddress *string `json:"emailAddress,omitempty"` - - // REQUIRED; The name of the email receiver. Names must be unique across all receivers within an action group. - Name *string `json:"name,omitempty"` - - // Indicates whether to use common alert schema. - UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"` - - // READ-ONLY; The receiver status of the e-mail. - Status *ReceiverStatus `json:"status,omitempty" azure:"ro"` -} - -// EnableRequest - Describes a receiver that should be resubscribed. -type EnableRequest struct { - // REQUIRED; The name of the receiver to resubscribe. - ReceiverName *string `json:"receiverName,omitempty"` -} - -// Error details. -type Error struct { - // REQUIRED; Error code identifying the specific error. - Code *string `json:"code,omitempty"` - - // Error message in the caller's locale. - Message *string `json:"message,omitempty"` -} - -// ErrorAdditionalInfo - The resource management error additional info. -type ErrorAdditionalInfo struct { - // READ-ONLY; The additional info. - Info interface{} `json:"info,omitempty" azure:"ro"` - - // READ-ONLY; The additional info type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ErrorContract - Describes the format of Error response. -type ErrorContract struct { - // The error details. - Error *ErrorResponse `json:"error,omitempty"` -} - -// ErrorDetail - The error detail. -type ErrorDetail struct { - // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` - - // READ-ONLY; The error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; The error details. - Details []*ErrorDetail `json:"details,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; The error target. - Target *string `json:"target,omitempty" azure:"ro"` -} - -// ErrorResponse - Describes the format of Error response. -type ErrorResponse struct { - // Error code - Code *string `json:"code,omitempty"` - - // Error message indicating why the operation failed. - Message *string `json:"message,omitempty"` -} - -// ErrorResponseAutoGenerated - The error response. -type ErrorResponseAutoGenerated struct { - // READ-ONLY; The error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; The error message indicating why the operation failed. - Message *string `json:"message,omitempty" azure:"ro"` -} - -// ErrorResponseCommon - The resource management error response. -type ErrorResponseCommon struct { - // Error code - Code *string `json:"code,omitempty"` - - // Error message indicating why the operation failed. - Message *string `json:"message,omitempty"` - - // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` - - // READ-ONLY; The error details. - Details []*ErrorResponseCommon `json:"details,omitempty" azure:"ro"` -} - -// ErrorResponseCommonV2 - Common error response for all Azure Resource Manager APIs to return error details for failed operations. -// (This also follows the OData error response format.). -type ErrorResponseCommonV2 struct { - // The error object. - Error *ErrorDetail `json:"error,omitempty"` -} - -// EventCategoriesClientListOptions contains the optional parameters for the EventCategoriesClient.List method. -type EventCategoriesClientListOptions struct { - // placeholder for future optional parameters -} - -// EventCategoryCollection - A collection of event categories. Currently possible values are: Administrative, Security, ServiceHealth, -// Alert, Recommendation, Policy. -type EventCategoryCollection struct { - // REQUIRED; the list that includes the Azure event categories. - Value []*LocalizableString `json:"value,omitempty"` -} - -// EventData - The Azure event log entries are of type EventData -type EventData struct { - // READ-ONLY; The sender authorization information. - Authorization *SenderAuthorization `json:"authorization,omitempty" azure:"ro"` - - // READ-ONLY; the email address of the user who has performed the operation, the UPN claim or SPN claim based on availability. - Caller *string `json:"caller,omitempty" azure:"ro"` - - // READ-ONLY; the event category. - Category *LocalizableString `json:"category,omitempty" azure:"ro"` - - // READ-ONLY; key value pairs to identify ARM permissions. - Claims map[string]*string `json:"claims,omitempty" azure:"ro"` - - // READ-ONLY; the correlation Id, usually a GUID in the string format. The correlation Id is shared among the events that - // belong to the same uber operation. - CorrelationID *string `json:"correlationId,omitempty" azure:"ro"` - - // READ-ONLY; the description of the event. - Description *string `json:"description,omitempty" azure:"ro"` - - // READ-ONLY; the event data Id. This is a unique identifier for an event. - EventDataID *string `json:"eventDataId,omitempty" azure:"ro"` - - // READ-ONLY; the event name. This value should not be confused with OperationName. For practical purposes, OperationName - // might be more appealing to end users. - EventName *LocalizableString `json:"eventName,omitempty" azure:"ro"` - - // READ-ONLY; the timestamp of when the event was generated by the Azure service processing the request corresponding the - // event. It in ISO 8601 format. - EventTimestamp *time.Time `json:"eventTimestamp,omitempty" azure:"ro"` - - // READ-ONLY; the HTTP request info. Usually includes the 'clientRequestId', 'clientIpAddress' (IP address of the user who - // initiated the event) and 'method' (HTTP method e.g. PUT). - HTTPRequest *HTTPRequestInfo `json:"httpRequest,omitempty" azure:"ro"` - - // READ-ONLY; the Id of this event as required by ARM for RBAC. It contains the EventDataID and a timestamp information. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; the event level - Level *EventLevel `json:"level,omitempty" azure:"ro"` - - // READ-ONLY; It is usually a GUID shared among the events corresponding to single operation. This value should not be confused - // with EventName. - OperationID *string `json:"operationId,omitempty" azure:"ro"` - - // READ-ONLY; the operation name. - OperationName *LocalizableString `json:"operationName,omitempty" azure:"ro"` - - // READ-ONLY; the set of pairs (usually a Dictionary) that includes details about the event. - Properties map[string]*string `json:"properties,omitempty" azure:"ro"` - - // READ-ONLY; the resource group name of the impacted resource. - ResourceGroupName *string `json:"resourceGroupName,omitempty" azure:"ro"` - - // READ-ONLY; the resource uri that uniquely identifies the resource that caused this event. - ResourceID *string `json:"resourceId,omitempty" azure:"ro"` - - // READ-ONLY; the resource provider name of the impacted resource. - ResourceProviderName *LocalizableString `json:"resourceProviderName,omitempty" azure:"ro"` - - // READ-ONLY; the resource type - ResourceType *LocalizableString `json:"resourceType,omitempty" azure:"ro"` - - // READ-ONLY; a string describing the status of the operation. Some typical values are: Started, In progress, Succeeded, Failed, - // Resolved. - Status *LocalizableString `json:"status,omitempty" azure:"ro"` - - // READ-ONLY; the event sub status. Most of the time, when included, this captures the HTTP status code of the REST call. - // Common values are: OK (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted - // (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP Status Code: 400), Not Found (HTTP Status - // Code: 404), Conflict (HTTP Status Code: 409), Internal Server Error (HTTP Status - // Code: 500), Service Unavailable (HTTP Status Code:503), Gateway Timeout (HTTP Status Code: 504) - SubStatus *LocalizableString `json:"subStatus,omitempty" azure:"ro"` - - // READ-ONLY; the timestamp of when the event became available for querying via this API. It is in ISO 8601 format. This value - // should not be confused eventTimestamp. As there might be a delay between the occurrence - // time of the event, and the time that the event is submitted to the Azure logging infrastructure. - SubmissionTimestamp *time.Time `json:"submissionTimestamp,omitempty" azure:"ro"` - - // READ-ONLY; the Azure subscription Id usually a GUID. - SubscriptionID *string `json:"subscriptionId,omitempty" azure:"ro"` - - // READ-ONLY; the Azure tenant Id - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// EventDataCollection - Represents collection of events. -type EventDataCollection struct { - // REQUIRED; this list that includes the Azure audit logs. - Value []*EventData `json:"value,omitempty"` - - // Provides the link to retrieve the next set of events. - NextLink *string `json:"nextLink,omitempty"` -} - -// EventHubReceiver - An Event hub receiver. -type EventHubReceiver struct { - // REQUIRED; The name of the specific Event Hub queue - EventHubName *string `json:"eventHubName,omitempty"` - - // REQUIRED; The Event Hub namespace - EventHubNameSpace *string `json:"eventHubNameSpace,omitempty"` - - // REQUIRED; The name of the Event hub receiver. Names must be unique across all receivers within an action group. - Name *string `json:"name,omitempty"` - - // REQUIRED; The Id for the subscription containing this event hub - SubscriptionID *string `json:"subscriptionId,omitempty"` - - // The tenant Id for the subscription containing this event hub - TenantID *string `json:"tenantId,omitempty"` - - // Indicates whether to use common alert schema. - UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"` -} - -// ExtensionDataSource - Definition of which data will be collected from a separate VM extension that integrates with the -// Azure Monitor Agent. Collected from either Windows and Linux machines, depending on which extension is -// defined. -type ExtensionDataSource struct { - // REQUIRED; The name of the VM extension. - ExtensionName *string `json:"extensionName,omitempty"` - - // The extension settings. The format is specific for particular extension. - ExtensionSettings interface{} `json:"extensionSettings,omitempty"` - - // The list of data sources this extension needs data from. - InputDataSources []*string `json:"inputDataSources,omitempty"` - - // A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the - // data collection rule. - Name *string `json:"name,omitempty"` - - // List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually - // what table in Log Analytics the data will be sent to. - Streams []*KnownExtensionDataSourceStreams `json:"streams,omitempty"` -} - -// HTTPRequestInfo - The Http request info. -type HTTPRequestInfo struct { - // the client Ip Address - ClientIPAddress *string `json:"clientIpAddress,omitempty"` - - // the client request id. - ClientRequestID *string `json:"clientRequestId,omitempty"` - - // the Http request method. - Method *string `json:"method,omitempty"` - - // the Uri. - URI *string `json:"uri,omitempty"` -} - -// IisLogsDataSource - Enables IIS logs to be collected by this data collection rule. -type IisLogsDataSource struct { - // REQUIRED; IIS streams - Streams []*string `json:"streams,omitempty"` - - // Absolute paths file location - LogDirectories []*string `json:"logDirectories,omitempty"` - - // A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the - // data collection rule. - Name *string `json:"name,omitempty"` -} - -// Incident - An alert incident indicates the activation status of an alert rule. -type Incident struct { - // READ-ONLY; The time at which the incident was activated in ISO8601 format. - ActivatedTime *time.Time `json:"activatedTime,omitempty" azure:"ro"` - - // READ-ONLY; A boolean to indicate whether the incident is active or resolved. - IsActive *bool `json:"isActive,omitempty" azure:"ro"` - - // READ-ONLY; Incident name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The time at which the incident was resolved in ISO8601 format. If null, it means the incident is still active. - ResolvedTime *time.Time `json:"resolvedTime,omitempty" azure:"ro"` - - // READ-ONLY; Rule name that is associated with the incident. - RuleName *string `json:"ruleName,omitempty" azure:"ro"` -} - -// IncidentListResult - The List incidents operation response. -type IncidentListResult struct { - // the incident collection. - Value []*Incident `json:"value,omitempty"` -} - -// ItsmReceiver - An Itsm receiver. -type ItsmReceiver struct { - // REQUIRED; Unique identification of ITSM connection among multiple defined in above workspace. - ConnectionID *string `json:"connectionId,omitempty"` - - // REQUIRED; The name of the Itsm receiver. Names must be unique across all receivers within an action group. - Name *string `json:"name,omitempty"` - - // REQUIRED; Region in which workspace resides. Supported values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope' - Region *string `json:"region,omitempty"` - - // REQUIRED; JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob - // as well. - TicketConfiguration *string `json:"ticketConfiguration,omitempty"` - - // REQUIRED; OMS LA instance identifier. - WorkspaceID *string `json:"workspaceId,omitempty"` -} - -// LocalizableString - The localizable string class. -type LocalizableString struct { - // REQUIRED; the invariant value. - Value *string `json:"value,omitempty"` - - // the locale specific value. - LocalizedValue *string `json:"localizedValue,omitempty"` -} - -// LocationThresholdRuleCondition - A rule condition based on a certain number of locations failing. -type LocationThresholdRuleCondition struct { - // REQUIRED; the number of locations that must fail to activate the alert. - FailedLocationCount *int32 `json:"failedLocationCount,omitempty"` - - // REQUIRED; specifies the type of condition. This can be one of three types: ManagementEventRuleCondition (occurrences of - // management events), LocationThresholdRuleCondition (based on the number of failures of a - // web test), and ThresholdRuleCondition (based on the threshold of a metric). - ODataType *string `json:"odata.type,omitempty"` - - // the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - DataSource RuleDataSourceClassification `json:"dataSource,omitempty"` - - // the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified - // then it must be between 5 minutes and 1 day. - WindowSize *string `json:"windowSize,omitempty"` -} - -// GetRuleCondition implements the RuleConditionClassification interface for type LocationThresholdRuleCondition. -func (l *LocationThresholdRuleCondition) GetRuleCondition() *RuleCondition { - return &RuleCondition{ - ODataType: l.ODataType, - DataSource: l.DataSource, - } -} - -// LogAnalyticsDestination - Log Analytics destination. -type LogAnalyticsDestination struct { - // A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the - // data collection rule. - Name *string `json:"name,omitempty"` - - // The resource ID of the Log Analytics workspace. - WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` - - // READ-ONLY; The Customer ID of the Log Analytics workspace. - WorkspaceID *string `json:"workspaceId,omitempty" azure:"ro"` -} - -// LogFileSettings - Settings for different log file formats -type LogFileSettings struct { - // Text settings - Text *LogFileSettingsText `json:"text,omitempty"` -} - -// LogFileSettingsText - Text settings -type LogFileSettingsText struct { - // REQUIRED; One of the supported timestamp formats - RecordStartTimestampFormat *KnownLogFileTextSettingsRecordStartTimestampFormat `json:"recordStartTimestampFormat,omitempty"` -} - -// LogFileTextSettings - Settings for text log files -type LogFileTextSettings struct { - // REQUIRED; One of the supported timestamp formats - RecordStartTimestampFormat *KnownLogFileTextSettingsRecordStartTimestampFormat `json:"recordStartTimestampFormat,omitempty"` -} - -// LogFilesDataSource - Definition of which custom log files will be collected by this data collection rule -type LogFilesDataSource struct { - // REQUIRED; File Patterns where the log files are located - FilePatterns []*string `json:"filePatterns,omitempty"` - - // REQUIRED; The data format of the log files - Format *KnownLogFilesDataSourceFormat `json:"format,omitempty"` - - // REQUIRED; List of streams that this data source will be sent to. A stream indicates what schema will be used for this data - // source - Streams []*string `json:"streams,omitempty"` - - // A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the - // data collection rule. - Name *string `json:"name,omitempty"` - - // The log files specific settings. - Settings *LogFilesDataSourceSettings `json:"settings,omitempty"` -} - -// LogFilesDataSourceSettings - The log files specific settings. -type LogFilesDataSourceSettings struct { - // Text settings - Text *LogFileSettingsText `json:"text,omitempty"` -} - -// LogMetricTrigger - A log metrics trigger descriptor. -type LogMetricTrigger struct { - // Evaluation of metric on a particular column - MetricColumn *string `json:"metricColumn,omitempty"` - - // Metric Trigger Type - 'Consecutive' or 'Total' - MetricTriggerType *MetricTriggerType `json:"metricTriggerType,omitempty"` - - // The threshold of the metric trigger. - Threshold *float64 `json:"threshold,omitempty"` - - // Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'. - ThresholdOperator *ConditionalOperator `json:"thresholdOperator,omitempty"` -} - -// LogProfileCollection - Represents a collection of log profiles. -type LogProfileCollection struct { - // REQUIRED; the values of the log profiles. - Value []*LogProfileResource `json:"value,omitempty"` -} - -// LogProfileProperties - The log profile properties. -type LogProfileProperties struct { - // REQUIRED; the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', - // 'Delete', and/or 'Action.' - Categories []*string `json:"categories,omitempty"` - - // REQUIRED; List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid - // ARM locations including the 'global' location. - Locations []*string `json:"locations,omitempty"` - - // REQUIRED; the retention policy for the events in the log. - RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` - - // The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the - // Activity Log. The rule ID is of the format: '{service bus resource - // ID}/authorizationrules/{key name}'. - ServiceBusRuleID *string `json:"serviceBusRuleId,omitempty"` - - // the resource id of the storage account to which you would like to send the Activity Log. - StorageAccountID *string `json:"storageAccountId,omitempty"` -} - -// LogProfileResource - The log profile resource. -type LogProfileResource struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; The log profile properties of the resource. - Properties *LogProfileProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// LogProfileResourcePatch - The log profile resource for patch operations. -type LogProfileResourcePatch struct { - // The log profile properties for an update operation. - Properties *LogProfileProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - -// LogProfilesClientCreateOrUpdateOptions contains the optional parameters for the LogProfilesClient.CreateOrUpdate method. -type LogProfilesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// LogProfilesClientDeleteOptions contains the optional parameters for the LogProfilesClient.Delete method. -type LogProfilesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// LogProfilesClientGetOptions contains the optional parameters for the LogProfilesClient.Get method. -type LogProfilesClientGetOptions struct { - // placeholder for future optional parameters -} - -// LogProfilesClientListOptions contains the optional parameters for the LogProfilesClient.List method. -type LogProfilesClientListOptions struct { - // placeholder for future optional parameters -} - -// LogProfilesClientUpdateOptions contains the optional parameters for the LogProfilesClient.Update method. -type LogProfilesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// LogSearchRule - Log Search Rule Definition -type LogSearchRule struct { - // REQUIRED; Action needs to be taken on rule execution. - Action ActionClassification `json:"action,omitempty"` - - // REQUIRED; Data Source against which rule will Query Data - Source *Source `json:"source,omitempty"` - - // The flag that indicates whether the alert should be automatically resolved or not. The default is false. - AutoMitigate *bool `json:"autoMitigate,omitempty"` - - // The description of the Log Search rule. - Description *string `json:"description,omitempty"` - - // The display name of the alert rule - DisplayName *string `json:"displayName,omitempty"` - - // The flag which indicates whether the Log Search rule is enabled. Value should be true or false - Enabled *Enabled `json:"enabled,omitempty"` - - // Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction - Schedule *Schedule `json:"schedule,omitempty"` - - // READ-ONLY; The api-version used when creating this alert rule - CreatedWithAPIVersion *string `json:"createdWithApiVersion,omitempty" azure:"ro"` - - // READ-ONLY; True if alert rule is legacy Log Analytic rule - IsLegacyLogAnalyticsRule *bool `json:"isLegacyLogAnalyticsRule,omitempty" azure:"ro"` - - // READ-ONLY; Last time the rule was updated in IS08601 format. - LastUpdatedTime *time.Time `json:"lastUpdatedTime,omitempty" azure:"ro"` - - // READ-ONLY; Provisioning state of the scheduled query rule - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// LogSearchRulePatch - Log Search Rule Definition for Patching -type LogSearchRulePatch struct { - // The flag which indicates whether the Log Search rule is enabled. Value should be true or false - Enabled *Enabled `json:"enabled,omitempty"` -} - -// LogSearchRuleResource - The Log Search Rule resource. -type LogSearchRuleResource struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; The rule properties of the resource. - Properties *LogSearchRule `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header - // per the normal etag convention. Entity tags are used for comparing two or more entities - // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match - // (section 14.26), and If-Range (section 14.27) header fields. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. - // ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must - // validate and persist this value. - Kind *string `json:"kind,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// LogSearchRuleResourceCollection - Represents a collection of Log Search rule resources. -type LogSearchRuleResourceCollection struct { - // The values for the Log Search Rule resources. - Value []*LogSearchRuleResource `json:"value,omitempty"` -} - -// LogSearchRuleResourcePatch - The log search rule resource for patch operations. -type LogSearchRuleResourcePatch struct { - // The log search rule properties of the resource. - Properties *LogSearchRulePatch `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - -// LogSettings - Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. -type LogSettings struct { - // REQUIRED; a value indicating whether this log is enabled. - Enabled *bool `json:"enabled,omitempty"` - - // Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log - // categories for a resource, first perform a GET diagnostic settings operation. - Category *string `json:"category,omitempty"` - - // the retention policy for this log. - RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` -} - -// LogToMetricAction - Specify action need to be taken when rule type is converting log to metric -type LogToMetricAction struct { - // REQUIRED; Criteria of Metric - Criteria []*Criteria `json:"criteria,omitempty"` - - // REQUIRED; Specifies the action. Supported values - AlertingAction, LogToMetricAction - ODataType *string `json:"odata.type,omitempty"` -} - -// GetAction implements the ActionClassification interface for type LogToMetricAction. -func (l *LogToMetricAction) GetAction() *Action { - return &Action{ - ODataType: l.ODataType, - } -} - -// LogicAppReceiver - A logic app receiver. -type LogicAppReceiver struct { - // REQUIRED; The callback url where http request sent to. - CallbackURL *string `json:"callbackUrl,omitempty"` - - // REQUIRED; The name of the logic app receiver. Names must be unique across all receivers within an action group. - Name *string `json:"name,omitempty"` - - // REQUIRED; The azure resource id of the logic app receiver. - ResourceID *string `json:"resourceId,omitempty"` - - // Indicates whether to use common alert schema. - UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"` -} - -// LogsIngestionEndpointSpec - Definition of the endpoint used for ingesting logs. -type LogsIngestionEndpointSpec struct { - // READ-ONLY; The endpoint. This property is READ-ONLY. - Endpoint *string `json:"endpoint,omitempty" azure:"ro"` -} - -// ManagementEventAggregationCondition - How the data that is collected should be combined over time. -type ManagementEventAggregationCondition struct { - // the condition operator. - Operator *ConditionOperator `json:"operator,omitempty"` - - // The threshold value that activates the alert. - Threshold *float64 `json:"threshold,omitempty"` - - // the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified - // then it must be between 5 minutes and 1 day. - WindowSize *string `json:"windowSize,omitempty"` -} - -// ManagementEventRuleCondition - A management event rule condition. -type ManagementEventRuleCondition struct { - // REQUIRED; specifies the type of condition. This can be one of three types: ManagementEventRuleCondition (occurrences of - // management events), LocationThresholdRuleCondition (based on the number of failures of a - // web test), and ThresholdRuleCondition (based on the threshold of a metric). - ODataType *string `json:"odata.type,omitempty"` - - // How the data that is collected should be combined over time and when the alert is activated. Note that for management event - // alerts aggregation is optional – if it is not provided then any event will - // cause the alert to activate. - Aggregation *ManagementEventAggregationCondition `json:"aggregation,omitempty"` - - // the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - DataSource RuleDataSourceClassification `json:"dataSource,omitempty"` -} - -// GetRuleCondition implements the RuleConditionClassification interface for type ManagementEventRuleCondition. -func (m *ManagementEventRuleCondition) GetRuleCondition() *RuleCondition { - return &RuleCondition{ - ODataType: m.ODataType, - DataSource: m.DataSource, - } -} - -// Metadata about the resource -type Metadata struct { - // READ-ONLY; Azure offering managing this resource on-behalf-of customer. - ProvisionedBy *string `json:"provisionedBy,omitempty" azure:"ro"` -} - -// MetadataValue - Represents a metric metadata value. -type MetadataValue struct { - // the name of the metadata. - Name *LocalizableString `json:"name,omitempty"` - - // the value of the metadata. - Value *string `json:"value,omitempty"` -} - -// Metric - The result data of a query. -type Metric struct { - // REQUIRED; the metric Id. - ID *string `json:"id,omitempty"` - - // REQUIRED; the name and the display name of the metric, i.e. it is localizable string. - Name *LocalizableString `json:"name,omitempty"` - - // REQUIRED; the time series returned when a data query is performed. - Timeseries []*TimeSeriesElement `json:"timeseries,omitempty"` - - // REQUIRED; the resource type of the metric resource. - Type *string `json:"type,omitempty"` - - // REQUIRED; The unit of the metric. - Unit *MetricUnit `json:"unit,omitempty"` - - // Detailed description of this metric. - DisplayDescription *string `json:"displayDescription,omitempty"` - - // 'Success' or the error details on query failures for this metric. - ErrorCode *string `json:"errorCode,omitempty"` - - // Error message encountered querying this specific metric. - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// MetricAlertAction - An alert action. -type MetricAlertAction struct { - // the id of the action group to use. - ActionGroupID *string `json:"actionGroupId,omitempty"` - - // This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook. - WebHookProperties map[string]*string `json:"webHookProperties,omitempty"` -} - -// MetricAlertCriteriaClassification provides polymorphic access to related types. -// Call the interface's GetMetricAlertCriteria() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *MetricAlertCriteria, *MetricAlertMultipleResourceMultipleMetricCriteria, *MetricAlertSingleResourceMultipleMetricCriteria, -// - *WebtestLocationAvailabilityCriteria -type MetricAlertCriteriaClassification interface { - // GetMetricAlertCriteria returns the MetricAlertCriteria content of the underlying type. - GetMetricAlertCriteria() *MetricAlertCriteria -} - -// MetricAlertCriteria - The rule criteria that defines the conditions of the alert rule. -type MetricAlertCriteria struct { - // REQUIRED; specifies the type of the alert criteria. - ODataType *Odatatype `json:"odata.type,omitempty"` - - // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} -} - -// GetMetricAlertCriteria implements the MetricAlertCriteriaClassification interface for type MetricAlertCriteria. -func (m *MetricAlertCriteria) GetMetricAlertCriteria() *MetricAlertCriteria { return m } - -// MetricAlertMultipleResourceMultipleMetricCriteria - Specifies the metric alert criteria for multiple resource that has -// multiple metric criteria. -type MetricAlertMultipleResourceMultipleMetricCriteria struct { - // REQUIRED; specifies the type of the alert criteria. - ODataType *Odatatype `json:"odata.type,omitempty"` - - // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} - - // the list of multiple metric criteria for this 'all of' operation. - AllOf []MultiMetricCriteriaClassification `json:"allOf,omitempty"` -} - -// GetMetricAlertCriteria implements the MetricAlertCriteriaClassification interface for type MetricAlertMultipleResourceMultipleMetricCriteria. -func (m *MetricAlertMultipleResourceMultipleMetricCriteria) GetMetricAlertCriteria() *MetricAlertCriteria { - return &MetricAlertCriteria{ - ODataType: m.ODataType, - AdditionalProperties: m.AdditionalProperties, - } -} - -// MetricAlertProperties - An alert rule. -type MetricAlertProperties struct { - // REQUIRED; defines the specific alert criteria information. - Criteria MetricAlertCriteriaClassification `json:"criteria,omitempty"` - - // REQUIRED; the flag that indicates whether the metric alert is enabled. - Enabled *bool `json:"enabled,omitempty"` - - // REQUIRED; how often the metric alert is evaluated represented in ISO 8601 duration format. - EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` - - // REQUIRED; the list of resource id's that this metric alert is scoped to. - Scopes []*string `json:"scopes,omitempty"` - - // REQUIRED; Alert severity {0, 1, 2, 3, 4} - Severity *int32 `json:"severity,omitempty"` - - // REQUIRED; the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. - WindowSize *string `json:"windowSize,omitempty"` - - // the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - Actions []*MetricAlertAction `json:"actions,omitempty"` - - // the flag that indicates whether the alert should be auto resolved or not. The default is true. - AutoMitigate *bool `json:"autoMitigate,omitempty"` - - // the description of the metric alert that will be included in the alert email. - Description *string `json:"description,omitempty"` - - // the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, - // resource group, or more than one resource. - TargetResourceRegion *string `json:"targetResourceRegion,omitempty"` - - // the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, - // resource group, or more than one resource. - TargetResourceType *string `json:"targetResourceType,omitempty"` - - // READ-ONLY; the value indicating whether this alert rule is migrated. - IsMigrated *bool `json:"isMigrated,omitempty" azure:"ro"` - - // READ-ONLY; Last time the rule was updated in ISO8601 format. - LastUpdatedTime *time.Time `json:"lastUpdatedTime,omitempty" azure:"ro"` -} - -// MetricAlertPropertiesPatch - An alert rule properties for patch. -type MetricAlertPropertiesPatch struct { - // the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - Actions []*MetricAlertAction `json:"actions,omitempty"` - - // the flag that indicates whether the alert should be auto resolved or not. The default is true. - AutoMitigate *bool `json:"autoMitigate,omitempty"` - - // defines the specific alert criteria information. - Criteria MetricAlertCriteriaClassification `json:"criteria,omitempty"` - - // the description of the metric alert that will be included in the alert email. - Description *string `json:"description,omitempty"` - - // the flag that indicates whether the metric alert is enabled. - Enabled *bool `json:"enabled,omitempty"` - - // how often the metric alert is evaluated represented in ISO 8601 duration format. - EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` - - // the list of resource id's that this metric alert is scoped to. - Scopes []*string `json:"scopes,omitempty"` - - // Alert severity {0, 1, 2, 3, 4} - Severity *int32 `json:"severity,omitempty"` - - // the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. - TargetResourceRegion *string `json:"targetResourceRegion,omitempty"` - - // the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. - TargetResourceType *string `json:"targetResourceType,omitempty"` - - // the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. - WindowSize *string `json:"windowSize,omitempty"` - - // READ-ONLY; the value indicating whether this alert rule is migrated. - IsMigrated *bool `json:"isMigrated,omitempty" azure:"ro"` - - // READ-ONLY; Last time the rule was updated in ISO8601 format. - LastUpdatedTime *time.Time `json:"lastUpdatedTime,omitempty" azure:"ro"` -} - -// MetricAlertResource - The metric alert resource. -type MetricAlertResource struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; The alert rule properties of the resource. - Properties *MetricAlertProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MetricAlertResourceCollection - Represents a collection of alert rule resources. -type MetricAlertResourceCollection struct { - // the values for the alert rule resources. - Value []*MetricAlertResource `json:"value,omitempty"` -} - -// MetricAlertResourcePatch - The metric alert resource for patch operations. -type MetricAlertResourcePatch struct { - // The alert rule properties of the resource. - Properties *MetricAlertPropertiesPatch `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - -// MetricAlertSingleResourceMultipleMetricCriteria - Specifies the metric alert criteria for a single resource that has multiple -// metric criteria. -type MetricAlertSingleResourceMultipleMetricCriteria struct { - // REQUIRED; specifies the type of the alert criteria. - ODataType *Odatatype `json:"odata.type,omitempty"` - - // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} - - // The list of metric criteria for this 'all of' operation. - AllOf []*MetricCriteria `json:"allOf,omitempty"` -} - -// GetMetricAlertCriteria implements the MetricAlertCriteriaClassification interface for type MetricAlertSingleResourceMultipleMetricCriteria. -func (m *MetricAlertSingleResourceMultipleMetricCriteria) GetMetricAlertCriteria() *MetricAlertCriteria { - return &MetricAlertCriteria{ - ODataType: m.ODataType, - AdditionalProperties: m.AdditionalProperties, - } -} - -// MetricAlertStatus - An alert status. -type MetricAlertStatus struct { - // The alert rule arm id. - ID *string `json:"id,omitempty"` - - // The status name. - Name *string `json:"name,omitempty"` - - // The alert status properties of the metric alert status. - Properties *MetricAlertStatusProperties `json:"properties,omitempty"` - - // The extended resource type name. - Type *string `json:"type,omitempty"` -} - -// MetricAlertStatusCollection - Represents a collection of alert rule resources. -type MetricAlertStatusCollection struct { - // the values for the alert rule resources. - Value []*MetricAlertStatus `json:"value,omitempty"` -} - -// MetricAlertStatusProperties - An alert status properties. -type MetricAlertStatusProperties struct { - // An object describing the type of the dimensions. - Dimensions map[string]*string `json:"dimensions,omitempty"` - - // status value - Status *string `json:"status,omitempty"` - - // UTC time when the status was checked. - Timestamp *time.Time `json:"timestamp,omitempty"` -} - -// MetricAlertsClientCreateOrUpdateOptions contains the optional parameters for the MetricAlertsClient.CreateOrUpdate method. -type MetricAlertsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// MetricAlertsClientDeleteOptions contains the optional parameters for the MetricAlertsClient.Delete method. -type MetricAlertsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// MetricAlertsClientGetOptions contains the optional parameters for the MetricAlertsClient.Get method. -type MetricAlertsClientGetOptions struct { - // placeholder for future optional parameters -} - -// MetricAlertsClientListByResourceGroupOptions contains the optional parameters for the MetricAlertsClient.ListByResourceGroup -// method. -type MetricAlertsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// MetricAlertsClientListBySubscriptionOptions contains the optional parameters for the MetricAlertsClient.ListBySubscription -// method. -type MetricAlertsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// MetricAlertsClientUpdateOptions contains the optional parameters for the MetricAlertsClient.Update method. -type MetricAlertsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// MetricAlertsStatusClientListByNameOptions contains the optional parameters for the MetricAlertsStatusClient.ListByName -// method. -type MetricAlertsStatusClientListByNameOptions struct { - // placeholder for future optional parameters -} - -// MetricAlertsStatusClientListOptions contains the optional parameters for the MetricAlertsStatusClient.List method. -type MetricAlertsStatusClientListOptions struct { - // placeholder for future optional parameters -} - -// MetricAvailability - Metric availability specifies the time grain (aggregation interval or frequency) and the retention -// period for that time grain. -type MetricAvailability struct { - // the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. - Retention *string `json:"retention,omitempty"` - - // the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. - TimeGrain *string `json:"timeGrain,omitempty"` -} - -// MetricBaselinesProperties - The response to a metric baselines query. -type MetricBaselinesProperties struct { - // REQUIRED; The baseline for each time series that was queried. - Baselines []*TimeSeriesBaseline `json:"baselines,omitempty"` - - // REQUIRED; The interval (window size) for which the metric data was returned in. This may be adjusted in the future and - // returned back from what was originally requested. This is not present if a metadata request - // was made. - Interval *string `json:"interval,omitempty"` - - // REQUIRED; The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by - // '/'. This may be adjusted in the future and returned back from what was originally - // requested. - Timespan *string `json:"timespan,omitempty"` - - // The namespace of the metrics been queried. - Namespace *string `json:"namespace,omitempty"` -} - -// MetricBaselinesResponse - A list of metric baselines. -type MetricBaselinesResponse struct { - // The list of metric baselines. - Value []*SingleMetricBaseline `json:"value,omitempty"` -} - -// MetricCriteria - Criterion to filter metrics. -type MetricCriteria struct { - // REQUIRED; Specifies the type of threshold criteria - CriterionType *CriterionType `json:"criterionType,omitempty"` - - // REQUIRED; Name of the metric. - MetricName *string `json:"metricName,omitempty"` - - // REQUIRED; Name of the criteria. - Name *string `json:"name,omitempty"` - - // REQUIRED; the criteria operator. - Operator *Operator `json:"operator,omitempty"` - - // REQUIRED; the criteria threshold value that activates the alert. - Threshold *float64 `json:"threshold,omitempty"` - - // REQUIRED; the criteria time aggregation types. - TimeAggregation *AggregationTypeEnum `json:"timeAggregation,omitempty"` - - // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} - - // List of dimension conditions. - Dimensions []*MetricDimension `json:"dimensions,omitempty"` - - // Namespace of the metric. - MetricNamespace *string `json:"metricNamespace,omitempty"` - - // Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. - SkipMetricValidation *bool `json:"skipMetricValidation,omitempty"` -} - -// GetMultiMetricCriteria implements the MultiMetricCriteriaClassification interface for type MetricCriteria. -func (m *MetricCriteria) GetMultiMetricCriteria() *MultiMetricCriteria { - return &MultiMetricCriteria{ - CriterionType: m.CriterionType, - Name: m.Name, - MetricName: m.MetricName, - MetricNamespace: m.MetricNamespace, - TimeAggregation: m.TimeAggregation, - Dimensions: m.Dimensions, - SkipMetricValidation: m.SkipMetricValidation, - AdditionalProperties: m.AdditionalProperties, - } -} - -// MetricDefinition - Metric definition class specifies the metadata for a metric. -type MetricDefinition struct { - // Custom category name for this metric. - Category *string `json:"category,omitempty"` - - // the name and the display name of the dimension, i.e. it is a localizable string. - Dimensions []*LocalizableString `json:"dimensions,omitempty"` - - // Detailed description of this metric. - DisplayDescription *string `json:"displayDescription,omitempty"` - - // the resource identifier of the metric definition. - ID *string `json:"id,omitempty"` - - // Flag to indicate whether the dimension is required. - IsDimensionRequired *bool `json:"isDimensionRequired,omitempty"` - - // the collection of what aggregation intervals are available to be queried. - MetricAvailabilities []*MetricAvailability `json:"metricAvailabilities,omitempty"` - - // The class of the metric. - MetricClass *MetricClass `json:"metricClass,omitempty"` - - // the name and the display name of the metric, i.e. it is a localizable string. - Name *LocalizableString `json:"name,omitempty"` - - // the namespace the metric belongs to. - Namespace *string `json:"namespace,omitempty"` - - // the primary aggregation type value defining how to use the values for display. - PrimaryAggregationType *AggregationType `json:"primaryAggregationType,omitempty"` - - // the resource identifier of the resource that emitted the metric. - ResourceID *string `json:"resourceId,omitempty"` - - // the collection of what aggregation types are supported. - SupportedAggregationTypes []*AggregationType `json:"supportedAggregationTypes,omitempty"` - - // The unit of the metric. - Unit *MetricUnit `json:"unit,omitempty"` -} - -// MetricDefinitionCollection - Represents collection of metric definitions. -type MetricDefinitionCollection struct { - // REQUIRED; the values for the metric definitions. - Value []*MetricDefinition `json:"value,omitempty"` -} - -// MetricDefinitionsClientListOptions contains the optional parameters for the MetricDefinitionsClient.List method. -type MetricDefinitionsClientListOptions struct { - // Metric namespace to query metric definitions for. - Metricnamespace *string -} - -// MetricDimension - Specifies a metric dimension. -type MetricDimension struct { - // REQUIRED; Name of the dimension. - Name *string `json:"name,omitempty"` - - // REQUIRED; the dimension operator. Only 'Include' and 'Exclude' are supported - Operator *string `json:"operator,omitempty"` - - // REQUIRED; list of dimension values. - Values []*string `json:"values,omitempty"` -} - -// MetricNamespace - Metric namespace class specifies the metadata for a metric namespace. -type MetricNamespace struct { - // Kind of namespace - Classification *NamespaceClassification `json:"classification,omitempty"` - - // The ID of the metric namespace. - ID *string `json:"id,omitempty"` - - // The escaped name of the namespace. - Name *string `json:"name,omitempty"` - - // Properties which include the fully qualified namespace name. - Properties *MetricNamespaceName `json:"properties,omitempty"` - - // The type of the namespace. - Type *string `json:"type,omitempty"` -} - -// MetricNamespaceCollection - Represents collection of metric namespaces. -type MetricNamespaceCollection struct { - // REQUIRED; The values for the metric namespaces. - Value []*MetricNamespace `json:"value,omitempty"` -} - -// MetricNamespaceName - The fully qualified metric namespace name. -type MetricNamespaceName struct { - // The metric namespace name. - MetricNamespaceName *string `json:"metricNamespaceName,omitempty"` -} - -// MetricNamespacesClientListOptions contains the optional parameters for the MetricNamespacesClient.List method. -type MetricNamespacesClientListOptions struct { - // The ISO 8601 conform Date start time from which to query for metric namespaces. - StartTime *string -} - -// MetricSettings - Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric. -type MetricSettings struct { - // REQUIRED; a value indicating whether this category is enabled. - Enabled *bool `json:"enabled,omitempty"` - - // Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric - // categories for a resource, first perform a GET diagnostic settings - // operation. - Category *string `json:"category,omitempty"` - - // the retention policy for this category. - RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` - - // the timegrain of the metric in ISO8601 format. - TimeGrain *string `json:"timeGrain,omitempty"` -} - -// MetricSingleDimension - The metric dimension name and value. -type MetricSingleDimension struct { - // REQUIRED; Name of the dimension. - Name *string `json:"name,omitempty"` - - // REQUIRED; Value of the dimension. - Value *string `json:"value,omitempty"` -} - -// MetricTrigger - The trigger that results in a scaling action. -type MetricTrigger struct { - // REQUIRED; the name of the metric that defines what the rule monitors. - MetricName *string `json:"metricName,omitempty"` - - // REQUIRED; the resource identifier of the resource the rule monitors. - MetricResourceURI *string `json:"metricResourceUri,omitempty"` - - // REQUIRED; the operator that is used to compare the metric data and the threshold. - Operator *ComparisonOperationType `json:"operator,omitempty"` - - // REQUIRED; the metric statistic type. How the metrics from multiple instances are combined. - Statistic *MetricStatisticType `json:"statistic,omitempty"` - - // REQUIRED; the threshold of the metric that triggers the scale action. - Threshold *float64 `json:"threshold,omitempty"` - - // REQUIRED; time aggregation type. How the data that is collected should be combined over time. The default value is Average. - TimeAggregation *TimeAggregationType `json:"timeAggregation,omitempty"` - - // REQUIRED; the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions - // for the metric. Must be between 12 hours and 1 minute. - TimeGrain *string `json:"timeGrain,omitempty"` - - // REQUIRED; the range of time in which instance data is collected. This value must be greater than the delay in metric collection, - // which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. - TimeWindow *string `json:"timeWindow,omitempty"` - - // List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. - Dimensions []*ScaleRuleMetricDimension `json:"dimensions,omitempty"` - - // a value indicating whether metric should divide per instance. - DividePerInstance *bool `json:"dividePerInstance,omitempty"` - - // the namespace of the metric that defines what the rule monitors. - MetricNamespace *string `json:"metricNamespace,omitempty"` - - // the location of the resource the rule monitors. - MetricResourceLocation *string `json:"metricResourceLocation,omitempty"` -} - -// MetricValue - Represents a metric value. -type MetricValue struct { - // REQUIRED; the timestamp for the metric value in ISO 8601 format. - TimeStamp *time.Time `json:"timeStamp,omitempty"` - - // the average value in the time range. - Average *float64 `json:"average,omitempty"` - - // the number of samples in the time range. Can be used to determine the number of values that contributed to the average - // value. - Count *float64 `json:"count,omitempty"` - - // the greatest value in the time range. - Maximum *float64 `json:"maximum,omitempty"` - - // the least value in the time range. - Minimum *float64 `json:"minimum,omitempty"` - - // the sum of all of the values in the time range. - Total *float64 `json:"total,omitempty"` -} - -// MetricsClientListOptions contains the optional parameters for the MetricsClient.List method. -type MetricsClientListOptions struct { - // The list of aggregation types (comma separated) to retrieve. - Aggregation *string - // The $filter is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all - // time series of C where A = a1 and B = b1 or b2 $filter=A eq 'a1' and B eq 'b1' - // or B eq 'b2' and C eq '' - Invalid variant: $filter=A eq 'a1' and B eq 'b1' and C eq '' or B = 'b2' This is invalid because - // the logical or operator cannot separate two different metadata names. - - // Return all time series where A = a1, B = b1 and C = c1: $filter=A eq 'a1' and B eq 'b1' and C eq 'c1' - Return all time - // series where A = a1 $filter=A eq 'a1' and B eq '' and C eq ''. Special case: - // When dimension name or dimension value uses round brackets. Eg: When dimension name is dim (test) 1 Instead of using $filter= - // "dim (test) 1 eq '' " use $filter= "dim %2528test%2529 1 eq '' " When - // dimension name is dim (test) 3 and dimension value is dim3 (test) val Instead of using $filter= "dim (test) 3 eq 'dim3 - // (test) val' " use $filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' " - Filter *string - // The interval (i.e. timegrain) of the query. - Interval *string - // The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use - // %2 to indicate it. Eg: 'Metric,Name1' should be 'Metric%2Name1' - Metricnames *string - // Metric namespace to query metric definitions for. - Metricnamespace *string - // The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum - // asc. - Orderby *string - // Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. - ResultType *ResultType - // The timespan of the query. It is a string with the following format 'startDateTimeISO/endDateTimeISO'. - Timespan *string - // The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10. - Top *int32 -} - -// MultiMetricCriteriaClassification provides polymorphic access to related types. -// Call the interface's GetMultiMetricCriteria() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *DynamicMetricCriteria, *MetricCriteria, *MultiMetricCriteria -type MultiMetricCriteriaClassification interface { - // GetMultiMetricCriteria returns the MultiMetricCriteria content of the underlying type. - GetMultiMetricCriteria() *MultiMetricCriteria -} - -// MultiMetricCriteria - The types of conditions for a multi resource alert. -type MultiMetricCriteria struct { - // REQUIRED; Specifies the type of threshold criteria - CriterionType *CriterionType `json:"criterionType,omitempty"` - - // REQUIRED; Name of the metric. - MetricName *string `json:"metricName,omitempty"` - - // REQUIRED; Name of the criteria. - Name *string `json:"name,omitempty"` - - // REQUIRED; the criteria time aggregation types. - TimeAggregation *AggregationTypeEnum `json:"timeAggregation,omitempty"` - - // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} - - // List of dimension conditions. - Dimensions []*MetricDimension `json:"dimensions,omitempty"` - - // Namespace of the metric. - MetricNamespace *string `json:"metricNamespace,omitempty"` - - // Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. - SkipMetricValidation *bool `json:"skipMetricValidation,omitempty"` -} - -// GetMultiMetricCriteria implements the MultiMetricCriteriaClassification interface for type MultiMetricCriteria. -func (m *MultiMetricCriteria) GetMultiMetricCriteria() *MultiMetricCriteria { return m } - -// NetworkRuleSet - Definition of the network rules. -type NetworkRuleSet struct { - // The configuration to set whether network access from public internet to the endpoints are allowed. - PublicNetworkAccess *KnownPublicNetworkAccessOptions `json:"publicNetworkAccess,omitempty"` -} - -// NotificationRequestBody - The request body which contain contact detail metadata -type NotificationRequestBody struct { - // REQUIRED; The name of the supported alert type. - AlertType *string `json:"alertType,omitempty"` - - // The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are - // supported. - ArmRoleReceivers []*ArmRoleReceiver `json:"armRoleReceivers,omitempty"` - - // The list of AutomationRunbook receivers that are part of this action group. - AutomationRunbookReceivers []*AutomationRunbookReceiver `json:"automationRunbookReceivers,omitempty"` - - // The list of AzureAppPush receivers that are part of this action group. - AzureAppPushReceivers []*AzureAppPushReceiver `json:"azureAppPushReceivers,omitempty"` - - // The list of azure function receivers that are part of this action group. - AzureFunctionReceivers []*AzureFunctionReceiver `json:"azureFunctionReceivers,omitempty"` - - // The list of email receivers that are part of this action group. - EmailReceivers []*EmailReceiver `json:"emailReceivers,omitempty"` - - // The list of event hub receivers that are part of this action group. - EventHubReceivers []*EventHubReceiver `json:"eventHubReceivers,omitempty"` - - // The list of ITSM receivers that are part of this action group. - ItsmReceivers []*ItsmReceiver `json:"itsmReceivers,omitempty"` - - // The list of logic app receivers that are part of this action group. - LogicAppReceivers []*LogicAppReceiver `json:"logicAppReceivers,omitempty"` - - // The list of SMS receivers that are part of this action group. - SmsReceivers []*SmsReceiver `json:"smsReceivers,omitempty"` - - // The list of voice receivers that are part of this action group. - VoiceReceivers []*VoiceReceiver `json:"voiceReceivers,omitempty"` - - // The list of webhook receivers that are part of this action group. - WebhookReceivers []*WebhookReceiver `json:"webhookReceivers,omitempty"` -} - -// Operation - Microsoft Insights API operation definition. -type Operation struct { - // Display metadata associated with the operation. - Display *OperationDisplay `json:"display,omitempty"` - - // Operation name: {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` -} - -// OperationDisplay - Display metadata associated with the operation. -type OperationDisplay struct { - // Operation type: Read, write, delete, etc. - Operation *string `json:"operation,omitempty"` - - // Service provider: Microsoft.Insights - Provider *string `json:"provider,omitempty"` - - // Resource on which the operation is performed: AlertRules, Autoscale, etc. - Resource *string `json:"resource,omitempty"` -} - -// OperationListResult - Result of the request to list Microsoft.Insights operations. It contains a list of operations and -// a URL link to get the next set of results. -type OperationListResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of operations supported by the Microsoft.Insights provider. - Value []*Operation `json:"value,omitempty"` -} - -// OperationStatus - The status of operation. -type OperationStatus struct { - // End time of the job in standard ISO8601 format. - EndTime *time.Time `json:"endTime,omitempty"` - - // The error detail of the operation if any. - Error *ErrorResponseCommon `json:"error,omitempty"` - - // The operation Id. - ID *string `json:"id,omitempty"` - - // The operation name. - Name *string `json:"name,omitempty"` - - // Start time of the job in standard ISO8601 format. - StartTime *time.Time `json:"startTime,omitempty"` - - // The status of the operation. - Status *string `json:"status,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// PerfCounterDataSource - Definition of which performance counters will be collected and how they will be collected by this -// data collection rule. Collected from both Windows and Linux machines where the counter is present. -type PerfCounterDataSource struct { - // A list of specifier names of the performance counters you want to collect. Use a wildcard (*) to collect a counter for - // all instances. To get a list of performance counters on Windows, run the command - // 'typeperf'. - CounterSpecifiers []*string `json:"counterSpecifiers,omitempty"` - - // A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the - // data collection rule. - Name *string `json:"name,omitempty"` - - // The number of seconds between consecutive counter measurements (samples). - SamplingFrequencyInSeconds *int32 `json:"samplingFrequencyInSeconds,omitempty"` - - // List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually - // what table in Log Analytics the data will be sent to. - Streams []*KnownPerfCounterDataSourceStreams `json:"streams,omitempty"` -} - -// PrivateEndpointConnection - A private endpoint connection -type PrivateEndpointConnection struct { - // Resource properties. - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateEndpointConnectionListResult - A list of private endpoint connections. -type PrivateEndpointConnectionListResult struct { - // READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` - - // READ-ONLY; Array of results. - Value []*PrivateEndpointConnection `json:"value,omitempty" azure:"ro"` -} - -// PrivateEndpointConnectionProperties - Properties of a private endpoint connection. -type PrivateEndpointConnectionProperties struct { - // Private endpoint which the connection belongs to. - PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` - - // Connection state of the private endpoint connection. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` - - // READ-ONLY; State of the private endpoint connection. - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate -// method. -type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. -type PrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByPrivateLinkScope -// method. -type PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointProperty - Private endpoint which the connection belongs to. -type PrivateEndpointProperty struct { - // Resource id of the private endpoint. - ID *string `json:"id,omitempty"` -} - -// PrivateLinkResource - A private link resource -type PrivateLinkResource struct { - // Resource properties. - Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateLinkResourceListResult - A list of private link resources -type PrivateLinkResourceListResult struct { - // READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` - - // READ-ONLY; Array of results. - Value []*PrivateLinkResource `json:"value,omitempty" azure:"ro"` -} - -// PrivateLinkResourceProperties - Properties of a private link resource. -type PrivateLinkResourceProperties struct { - // READ-ONLY; The private link resource group id. - GroupID *string `json:"groupId,omitempty" azure:"ro"` - - // READ-ONLY; The private link resource required member names. - RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` -} - -// PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method. -type PrivateLinkResourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkResourcesClientListByPrivateLinkScopeOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByPrivateLinkScope -// method. -type PrivateLinkResourcesClientListByPrivateLinkScopeOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkScopeOperationStatusClientGetOptions contains the optional parameters for the PrivateLinkScopeOperationStatusClient.Get -// method. -type PrivateLinkScopeOperationStatusClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkScopedResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkScopedResourcesClient.BeginCreateOrUpdate -// method. -type PrivateLinkScopedResourcesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateLinkScopedResourcesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkScopedResourcesClient.BeginDelete -// method. -type PrivateLinkScopedResourcesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateLinkScopedResourcesClientGetOptions contains the optional parameters for the PrivateLinkScopedResourcesClient.Get -// method. -type PrivateLinkScopedResourcesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkScopedResourcesClientListByPrivateLinkScopeOptions contains the optional parameters for the PrivateLinkScopedResourcesClient.ListByPrivateLinkScope -// method. -type PrivateLinkScopedResourcesClientListByPrivateLinkScopeOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkScopesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkScopesClient.BeginDelete -// method. -type PrivateLinkScopesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateLinkScopesClientCreateOrUpdateOptions contains the optional parameters for the PrivateLinkScopesClient.CreateOrUpdate -// method. -type PrivateLinkScopesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkScopesClientGetOptions contains the optional parameters for the PrivateLinkScopesClient.Get method. -type PrivateLinkScopesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkScopesClientListByResourceGroupOptions contains the optional parameters for the PrivateLinkScopesClient.ListByResourceGroup -// method. -type PrivateLinkScopesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkScopesClientListOptions contains the optional parameters for the PrivateLinkScopesClient.List method. -type PrivateLinkScopesClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkScopesClientUpdateTagsOptions contains the optional parameters for the PrivateLinkScopesClient.UpdateTags method. -type PrivateLinkScopesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkScopesResource - An azure resource object -type PrivateLinkScopesResource struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateLinkServiceConnectionStateProperty - State of the private endpoint connection. -type PrivateLinkServiceConnectionStateProperty struct { - // REQUIRED; The private link service connection description. - Description *string `json:"description,omitempty"` - - // REQUIRED; The private link service connection status. - Status *string `json:"status,omitempty"` - - // READ-ONLY; The actions required for private link service connection. - ActionsRequired *string `json:"actionsRequired,omitempty" azure:"ro"` -} - -// ProxyOnlyResource - A proxy only azure resource object -type ProxyOnlyResource struct { - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProxyResource - An azure resource object -type ProxyResource struct { - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// Recurrence - The repeating times at which this profile begins. This element is not used if the FixedDate element is used. -type Recurrence struct { - // REQUIRED; the recurrence frequency. How often the schedule profile should take effect. This value must be Week, meaning - // each week will have the same set of profiles. For example, to set a daily schedule, set - // schedule to every day of the week. The frequency property specifies that the schedule is repeated weekly. - Frequency *RecurrenceFrequency `json:"frequency,omitempty"` - - // REQUIRED; the scheduling constraints for when the profile begins. - Schedule *RecurrentSchedule `json:"schedule,omitempty"` -} - -// RecurrentSchedule - The scheduling constraints for when the profile begins. -type RecurrentSchedule struct { - // REQUIRED; the collection of days that the profile takes effect on. Possible values are Sunday through Saturday. - Days []*string `json:"days,omitempty"` - - // REQUIRED; A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM - // times are not supported). - Hours []*int32 `json:"hours,omitempty"` - - // REQUIRED; A collection of minutes at which the profile takes effect at. - Minutes []*int32 `json:"minutes,omitempty"` - - // REQUIRED; the timezone for the hours of the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, - // Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific - // Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard - // Time, Central Standard Time, Central Standard Time (Mexico), Canada Central - // Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay - // Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA - // Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina - // Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo - // Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, - // Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. - // Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa - // Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard - // Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard - // Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, - // Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian - // Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard - // Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard - // Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard - // Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard - // Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard - // Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard - // Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar - // Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central - // Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West - // Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central - // Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, - // UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time - TimeZone *string `json:"timeZone,omitempty"` -} - -// Resource - An azure resource object -type Resource struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceForUpdate - Definition of ARM tracked top level resource properties for update operation. -type ResourceForUpdate struct { - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` -} - -// Response - The response to a metrics query. -type Response struct { - // REQUIRED; The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by - // '/'. This may be adjusted in the future and returned back from what was originally - // requested. - Timespan *string `json:"timespan,omitempty"` - - // REQUIRED; the value of the collection. - Value []*Metric `json:"value,omitempty"` - - // The integer value representing the relative cost of the query. - Cost *int32 `json:"cost,omitempty"` - - // The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back - // from what was originally requested. This is not present if a metadata request - // was made. - Interval *string `json:"interval,omitempty"` - - // The namespace of the metrics being queried - Namespace *string `json:"namespace,omitempty"` - - // The region of the resource being queried for metrics. - Resourceregion *string `json:"resourceregion,omitempty"` -} - -// ResponseWithError - An error response from the API. -type ResponseWithError struct { - // REQUIRED; Error information. - Error *Error `json:"error,omitempty"` -} - -// RetentionPolicy - Specifies the retention policy for the log. -type RetentionPolicy struct { - // REQUIRED; the number of days for the retention in days. A value of 0 will retain the events indefinitely. - Days *int32 `json:"days,omitempty"` - - // REQUIRED; a value indicating whether the retention policy is enabled. - Enabled *bool `json:"enabled,omitempty"` -} - -// RuleActionClassification provides polymorphic access to related types. -// Call the interface's GetRuleAction() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *RuleAction, *RuleEmailAction, *RuleWebhookAction -type RuleActionClassification interface { - // GetRuleAction returns the RuleAction content of the underlying type. - GetRuleAction() *RuleAction -} - -// RuleAction - The action that is performed when the alert rule becomes active, and when an alert condition is resolved. -type RuleAction struct { - // REQUIRED; specifies the type of the action. There are two types of actions: RuleEmailAction and RuleWebhookAction. - ODataType *string `json:"odata.type,omitempty"` -} - -// GetRuleAction implements the RuleActionClassification interface for type RuleAction. -func (r *RuleAction) GetRuleAction() *RuleAction { return r } - -// RuleConditionClassification provides polymorphic access to related types. -// Call the interface's GetRuleCondition() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *LocationThresholdRuleCondition, *ManagementEventRuleCondition, *RuleCondition, *ThresholdRuleCondition -type RuleConditionClassification interface { - // GetRuleCondition returns the RuleCondition content of the underlying type. - GetRuleCondition() *RuleCondition -} - -// RuleCondition - The condition that results in the alert rule being activated. -type RuleCondition struct { - // REQUIRED; specifies the type of condition. This can be one of three types: ManagementEventRuleCondition (occurrences of - // management events), LocationThresholdRuleCondition (based on the number of failures of a - // web test), and ThresholdRuleCondition (based on the threshold of a metric). - ODataType *string `json:"odata.type,omitempty"` - - // the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - DataSource RuleDataSourceClassification `json:"dataSource,omitempty"` -} - -// GetRuleCondition implements the RuleConditionClassification interface for type RuleCondition. -func (r *RuleCondition) GetRuleCondition() *RuleCondition { return r } - -// RuleDataSourceClassification provides polymorphic access to related types. -// Call the interface's GetRuleDataSource() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *RuleDataSource, *RuleManagementEventDataSource, *RuleMetricDataSource -type RuleDataSourceClassification interface { - // GetRuleDataSource returns the RuleDataSource content of the underlying type. - GetRuleDataSource() *RuleDataSource -} - -// RuleDataSource - The resource from which the rule collects its data. -type RuleDataSource struct { - // REQUIRED; specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource - ODataType *string `json:"odata.type,omitempty"` - - // the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing - // rule. - LegacyResourceID *string `json:"legacyResourceId,omitempty"` - - // the namespace of the metric. - MetricNamespace *string `json:"metricNamespace,omitempty"` - - // the location of the resource. - ResourceLocation *string `json:"resourceLocation,omitempty"` - - // the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule. - ResourceURI *string `json:"resourceUri,omitempty"` -} - -// GetRuleDataSource implements the RuleDataSourceClassification interface for type RuleDataSource. -func (r *RuleDataSource) GetRuleDataSource() *RuleDataSource { return r } - -// RuleEmailAction - Specifies the action to send email when the rule condition is evaluated. The discriminator is always -// RuleEmailAction in this case. -type RuleEmailAction struct { - // REQUIRED; specifies the type of the action. There are two types of actions: RuleEmailAction and RuleWebhookAction. - ODataType *string `json:"odata.type,omitempty"` - - // the list of administrator's custom email addresses to notify of the activation of the alert. - CustomEmails []*string `json:"customEmails,omitempty"` - - // Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated. - SendToServiceOwners *bool `json:"sendToServiceOwners,omitempty"` -} - -// GetRuleAction implements the RuleActionClassification interface for type RuleEmailAction. -func (r *RuleEmailAction) GetRuleAction() *RuleAction { - return &RuleAction{ - ODataType: r.ODataType, - } -} - -// RuleManagementEventClaimsDataSource - The claims for a rule management event data source. -type RuleManagementEventClaimsDataSource struct { - // the email address. - EmailAddress *string `json:"emailAddress,omitempty"` -} - -// RuleManagementEventDataSource - A rule management event data source. The discriminator fields is always RuleManagementEventDataSource -// in this case. -type RuleManagementEventDataSource struct { - // REQUIRED; specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource - ODataType *string `json:"odata.type,omitempty"` - - // the claims. - Claims *RuleManagementEventClaimsDataSource `json:"claims,omitempty"` - - // the event name. - EventName *string `json:"eventName,omitempty"` - - // the event source. - EventSource *string `json:"eventSource,omitempty"` - - // the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing - // rule. - LegacyResourceID *string `json:"legacyResourceId,omitempty"` - - // the level. - Level *string `json:"level,omitempty"` - - // the namespace of the metric. - MetricNamespace *string `json:"metricNamespace,omitempty"` - - // The name of the operation that should be checked for. If no name is provided, any operation will match. - OperationName *string `json:"operationName,omitempty"` - - // the resource group name. - ResourceGroupName *string `json:"resourceGroupName,omitempty"` - - // the location of the resource. - ResourceLocation *string `json:"resourceLocation,omitempty"` - - // the resource provider name. - ResourceProviderName *string `json:"resourceProviderName,omitempty"` - - // the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule. - ResourceURI *string `json:"resourceUri,omitempty"` - - // The status of the operation that should be checked for. If no status is provided, any status will match. - Status *string `json:"status,omitempty"` - - // the substatus. - SubStatus *string `json:"subStatus,omitempty"` -} - -// GetRuleDataSource implements the RuleDataSourceClassification interface for type RuleManagementEventDataSource. -func (r *RuleManagementEventDataSource) GetRuleDataSource() *RuleDataSource { - return &RuleDataSource{ - ODataType: r.ODataType, - ResourceURI: r.ResourceURI, - LegacyResourceID: r.LegacyResourceID, - ResourceLocation: r.ResourceLocation, - MetricNamespace: r.MetricNamespace, - } -} - -// RuleMetricDataSource - A rule metric data source. The discriminator value is always RuleMetricDataSource in this case. -type RuleMetricDataSource struct { - // REQUIRED; specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource - ODataType *string `json:"odata.type,omitempty"` - - // the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing - // rule. - LegacyResourceID *string `json:"legacyResourceId,omitempty"` - - // the name of the metric that defines what the rule monitors. - MetricName *string `json:"metricName,omitempty"` - - // the namespace of the metric. - MetricNamespace *string `json:"metricNamespace,omitempty"` - - // the location of the resource. - ResourceLocation *string `json:"resourceLocation,omitempty"` - - // the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule. - ResourceURI *string `json:"resourceUri,omitempty"` -} - -// GetRuleDataSource implements the RuleDataSourceClassification interface for type RuleMetricDataSource. -func (r *RuleMetricDataSource) GetRuleDataSource() *RuleDataSource { - return &RuleDataSource{ - ODataType: r.ODataType, - ResourceURI: r.ResourceURI, - LegacyResourceID: r.LegacyResourceID, - ResourceLocation: r.ResourceLocation, - MetricNamespace: r.MetricNamespace, - } -} - -// RuleWebhookAction - Specifies the action to post to service when the rule condition is evaluated. The discriminator is -// always RuleWebhookAction in this case. -type RuleWebhookAction struct { - // REQUIRED; specifies the type of the action. There are two types of actions: RuleEmailAction and RuleWebhookAction. - ODataType *string `json:"odata.type,omitempty"` - - // the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. - Properties map[string]*string `json:"properties,omitempty"` - - // the service uri to Post the notification when the alert activates or resolves. - ServiceURI *string `json:"serviceUri,omitempty"` -} - -// GetRuleAction implements the RuleActionClassification interface for type RuleWebhookAction. -func (r *RuleWebhookAction) GetRuleAction() *RuleAction { - return &RuleAction{ - ODataType: r.ODataType, - } -} - -// ScaleAction - The parameters for the scaling action. -type ScaleAction struct { - // REQUIRED; the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week - // and 1 minute in ISO 8601 format. - Cooldown *string `json:"cooldown,omitempty"` - - // REQUIRED; the scale direction. Whether the scaling action increases or decreases the number of instances. - Direction *ScaleDirection `json:"direction,omitempty"` - - // REQUIRED; the type of action that should occur when the scale rule fires. - Type *ScaleType `json:"type,omitempty"` - - // the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is - // 1. - Value *string `json:"value,omitempty"` -} - -// ScaleCapacity - The number of instances that can be used during this profile. -type ScaleCapacity struct { - // REQUIRED; the number of instances that will be set if metrics are not available for evaluation. The default is only used - // if the current instance count is lower than the default. - Default *string `json:"default,omitempty"` - - // REQUIRED; the maximum number of instances for the resource. The actual maximum number of instances is limited by the cores - // that are available in the subscription. - Maximum *string `json:"maximum,omitempty"` - - // REQUIRED; the minimum number of instances for the resource. - Minimum *string `json:"minimum,omitempty"` -} - -// ScaleRule - A rule that provide the triggers and parameters for the scaling action. -type ScaleRule struct { - // REQUIRED; the trigger that results in a scaling action. - MetricTrigger *MetricTrigger `json:"metricTrigger,omitempty"` - - // REQUIRED; the parameters for the scaling action. - ScaleAction *ScaleAction `json:"scaleAction,omitempty"` -} - -// ScaleRuleMetricDimension - Specifies an auto scale rule metric dimension. -type ScaleRuleMetricDimension struct { - // REQUIRED; Name of the dimension. - DimensionName *string `json:"DimensionName,omitempty"` - - // REQUIRED; the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. - // 'NotEquals' being not equal to all of the values - Operator *ScaleRuleMetricDimensionOperationType `json:"Operator,omitempty"` - - // REQUIRED; list of dimension values. For example: ["App1","App2"]. - Values []*string `json:"Values,omitempty"` -} - -// Schedule - Defines how often to run the search and the time interval. -type Schedule struct { - // REQUIRED; frequency (in minutes) at which rule condition should be evaluated. - FrequencyInMinutes *int32 `json:"frequencyInMinutes,omitempty"` - - // REQUIRED; Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes). - TimeWindowInMinutes *int32 `json:"timeWindowInMinutes,omitempty"` -} - -// ScheduledQueryRulesClientCreateOrUpdateOptions contains the optional parameters for the ScheduledQueryRulesClient.CreateOrUpdate -// method. -type ScheduledQueryRulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ScheduledQueryRulesClientDeleteOptions contains the optional parameters for the ScheduledQueryRulesClient.Delete method. -type ScheduledQueryRulesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ScheduledQueryRulesClientGetOptions contains the optional parameters for the ScheduledQueryRulesClient.Get method. -type ScheduledQueryRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ScheduledQueryRulesClientListByResourceGroupOptions contains the optional parameters for the ScheduledQueryRulesClient.ListByResourceGroup -// method. -type ScheduledQueryRulesClientListByResourceGroupOptions struct { - // The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - Filter *string -} - -// ScheduledQueryRulesClientListBySubscriptionOptions contains the optional parameters for the ScheduledQueryRulesClient.ListBySubscription -// method. -type ScheduledQueryRulesClientListBySubscriptionOptions struct { - // The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx - Filter *string -} - -// ScheduledQueryRulesClientUpdateOptions contains the optional parameters for the ScheduledQueryRulesClient.Update method. -type ScheduledQueryRulesClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// ScopedResource - A private link scoped resource -type ScopedResource struct { - // Resource properties. - Properties *ScopedResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ScopedResourceListResult - A list of scoped resources in a private link scope. -type ScopedResourceListResult struct { - // READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` - - // READ-ONLY; Array of results. - Value []*ScopedResource `json:"value,omitempty" azure:"ro"` -} - -// ScopedResourceProperties - Properties of a private link scoped resource. -type ScopedResourceProperties struct { - // The resource id of the scoped Azure monitor resource. - LinkedResourceID *string `json:"linkedResourceId,omitempty"` - - // READ-ONLY; State of the private endpoint connection. - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// SenderAuthorization - the authorization used by the user who has performed the operation that led to this event. This captures -// the RBAC properties of the event. These usually include the 'action', 'role' and the 'scope' -type SenderAuthorization struct { - // the permissible actions. For instance: microsoft.support/supporttickets/write - Action *string `json:"action,omitempty"` - - // the role of the user. For instance: Subscription Admin - Role *string `json:"role,omitempty"` - - // the scope. - Scope *string `json:"scope,omitempty"` -} - -// SingleBaseline - The baseline values for a single sensitivity value. -type SingleBaseline struct { - // REQUIRED; The high thresholds of the baseline. - HighThresholds []*float64 `json:"highThresholds,omitempty"` - - // REQUIRED; The low thresholds of the baseline. - LowThresholds []*float64 `json:"lowThresholds,omitempty"` - - // REQUIRED; the sensitivity of the baseline. - Sensitivity *BaselineSensitivity `json:"sensitivity,omitempty"` -} - -// SingleMetricBaseline - The baseline results of a single metric. -type SingleMetricBaseline struct { - // REQUIRED; The metric baseline Id. - ID *string `json:"id,omitempty"` - - // REQUIRED; The name of the metric for which the baselines were retrieved. - Name *string `json:"name,omitempty"` - - // REQUIRED; The metric baseline properties of the metric. - Properties *MetricBaselinesProperties `json:"properties,omitempty"` - - // REQUIRED; The resource type of the metric baseline resource. - Type *string `json:"type,omitempty"` -} - -// SmsReceiver - An SMS receiver. -type SmsReceiver struct { - // REQUIRED; The country code of the SMS receiver. - CountryCode *string `json:"countryCode,omitempty"` - - // REQUIRED; The name of the SMS receiver. Names must be unique across all receivers within an action group. - Name *string `json:"name,omitempty"` - - // REQUIRED; The phone number of the SMS receiver. - PhoneNumber *string `json:"phoneNumber,omitempty"` - - // READ-ONLY; The status of the receiver. - Status *ReceiverStatus `json:"status,omitempty" azure:"ro"` -} - -// Source - Specifies the log search query. -type Source struct { - // REQUIRED; The resource uri over which log search query is to be run. - DataSourceID *string `json:"dataSourceId,omitempty"` - - // List of Resource referred into query - AuthorizedResources []*string `json:"authorizedResources,omitempty"` - - // Log search query. Required for action type - AlertingAction - Query *string `json:"query,omitempty"` - - // Set value to 'ResultCount' . - QueryType *QueryType `json:"queryType,omitempty"` -} - -// StreamDeclaration - Declaration of a custom stream. -type StreamDeclaration struct { - // List of columns used by data in this stream. - Columns []*ColumnDefinition `json:"columns,omitempty"` -} - -// SyslogDataSource - Definition of which syslog data will be collected and how it will be collected. Only collected from -// Linux machines. -type SyslogDataSource struct { - // The list of facility names. - FacilityNames []*KnownSyslogDataSourceFacilityNames `json:"facilityNames,omitempty"` - - // The log levels to collect. - LogLevels []*KnownSyslogDataSourceLogLevels `json:"logLevels,omitempty"` - - // A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the - // data collection rule. - Name *string `json:"name,omitempty"` - - // List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually - // what table in Log Analytics the data will be sent to. - Streams []*KnownSyslogDataSourceStreams `json:"streams,omitempty"` -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -// TagsResource - A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope -// instance. -type TagsResource struct { - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - -// TenantActivityLogsClientListOptions contains the optional parameters for the TenantActivityLogsClient.List method. -type TenantActivityLogsClientListOptions struct { - // Reduces the set of data collected. - // The $filter is very restricted and allows only the following patterns. - // - List events for a resource group: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, - // Operation' and resourceGroupName eq ''. - // - List events for resource: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' - // and resourceUri eq ''. - // - List events for a subscription: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation'. - // - List events for a resource provider: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, - // Operation' and resourceProvider eq ''. - // - List events for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and - // eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, - // Operation' and correlationId eq ''. - // NOTE: No other syntax is allowed. - Filter *string - // Used to fetch events with only the given properties. - // The $select argument is a comma separated list of property names to be returned. Possible values are: authorization, claims, - // correlationId, description, eventDataId, eventName, eventTimestamp, - // httpRequest, level, operationId, operationName, properties, resourceGroupName, resourceProviderName, resourceId, status, - // submissionTimestamp, subStatus, subscriptionId - Select *string -} - -// TestNotificationDetailsResponse - The details of the test notification results. -type TestNotificationDetailsResponse struct { - // REQUIRED; The overall state - State *string `json:"State,omitempty"` - - // The list of action detail - ActionDetails []*ActionDetail `json:"ActionDetails,omitempty"` - - // The completed time - CompletedTime *string `json:"CompletedTime,omitempty"` - - // The context info - Context *Context `json:"Context,omitempty"` - - // The created time - CreatedTime *string `json:"CreatedTime,omitempty"` -} - -// ThresholdRuleCondition - A rule condition based on a metric crossing a threshold. -type ThresholdRuleCondition struct { - // REQUIRED; specifies the type of condition. This can be one of three types: ManagementEventRuleCondition (occurrences of - // management events), LocationThresholdRuleCondition (based on the number of failures of a - // web test), and ThresholdRuleCondition (based on the threshold of a metric). - ODataType *string `json:"odata.type,omitempty"` - - // REQUIRED; the operator used to compare the data and the threshold. - Operator *ConditionOperator `json:"operator,omitempty"` - - // REQUIRED; the threshold value that activates the alert. - Threshold *float64 `json:"threshold,omitempty"` - - // the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - DataSource RuleDataSourceClassification `json:"dataSource,omitempty"` - - // the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType - // of the Metric. - TimeAggregation *TimeAggregationOperator `json:"timeAggregation,omitempty"` - - // the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified - // then it must be between 5 minutes and 1 day. - WindowSize *string `json:"windowSize,omitempty"` -} - -// GetRuleCondition implements the RuleConditionClassification interface for type ThresholdRuleCondition. -func (t *ThresholdRuleCondition) GetRuleCondition() *RuleCondition { - return &RuleCondition{ - ODataType: t.ODataType, - DataSource: t.DataSource, - } -} - -// TimeSeriesBaseline - The baseline values for a single time series. -type TimeSeriesBaseline struct { - // REQUIRED; The aggregation type of the metric. - Aggregation *string `json:"aggregation,omitempty"` - - // REQUIRED; The baseline values for each sensitivity. - Data []*SingleBaseline `json:"data,omitempty"` - - // REQUIRED; The list of timestamps of the baselines. - Timestamps []*time.Time `json:"timestamps,omitempty"` - - // The dimensions of this time series. - Dimensions []*MetricSingleDimension `json:"dimensions,omitempty"` - - // The baseline metadata values. - MetadataValues []*BaselineMetadata `json:"metadataValues,omitempty"` -} - -// TimeSeriesElement - A time series result type. The discriminator value is always TimeSeries in this case. -type TimeSeriesElement struct { - // An array of data points representing the metric values. This is only returned if a result type of data is specified. - Data []*MetricValue `json:"data,omitempty"` - - // the metadata values returned if $filter was specified in the call. - Metadatavalues []*MetadataValue `json:"metadatavalues,omitempty"` -} - -// TimeWindow - A specific date-time for the profile. -type TimeWindow struct { - // REQUIRED; the end time for the profile in ISO 8601 format. - End *time.Time `json:"end,omitempty"` - - // REQUIRED; the start time for the profile in ISO 8601 format. - Start *time.Time `json:"start,omitempty"` - - // the timezone of the start and end times for the profile. Some examples of valid time zones are: Dateline Standard Time, - // UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time - // (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central - // America Standard Time, Central Standard Time, Central Standard Time - // (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela - // Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central - // Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America - // Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland - // Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, - // Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, - // Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European - // Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan - // Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard - // Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, - // Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus - // Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard - // Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, - // Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, - // Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, - // Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard - // Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard - // Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard - // Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard - // Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern - // Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia - // Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New - // Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line - // Islands Standard Time - TimeZone *string `json:"timeZone,omitempty"` -} - -// TrackedEntityResource - An azure resource object -type TrackedEntityResource struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The etag field is not required. If it is provided in the response body, it must also be provided as a header - // per the normal etag convention. Entity tags are used for comparing two or more entities - // from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match - // (section 14.26), and If-Range (section 14.27) header fields. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. - // ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must - // validate and persist this value. - Kind *string `json:"kind,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// TriggerCondition - The condition that results in the Log Search rule. -type TriggerCondition struct { - // REQUIRED; Result or count threshold based on which rule should be triggered. - Threshold *float64 `json:"threshold,omitempty"` - - // REQUIRED; Evaluation operation for rule - 'GreaterThan' or 'LessThan. - ThresholdOperator *ConditionalOperator `json:"thresholdOperator,omitempty"` - - // Trigger condition for metric query rule - MetricTrigger *LogMetricTrigger `json:"metricTrigger,omitempty"` -} - -// VMInsightsClientGetOnboardingStatusOptions contains the optional parameters for the VMInsightsClient.GetOnboardingStatus -// method. -type VMInsightsClientGetOnboardingStatusOptions struct { - // placeholder for future optional parameters -} - -// VMInsightsOnboardingStatus - VM Insights onboarding status for a resource. -type VMInsightsOnboardingStatus struct { - // Resource properties. - Properties *VMInsightsOnboardingStatusProperties `json:"properties,omitempty"` - - // READ-ONLY; Azure resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Azure resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VMInsightsOnboardingStatusProperties - Resource properties. -type VMInsightsOnboardingStatusProperties struct { - // REQUIRED; The status of VM Insights data from the resource. When reported as present the data array will contain information - // about the data containers to which data for the specified resource is being routed. - DataStatus *DataStatus `json:"dataStatus,omitempty"` - - // REQUIRED; The onboarding status for the resource. Note that, a higher level scope, e.g., resource group or subscription, - // is considered onboarded if at least one resource under it is onboarded. - OnboardingStatus *OnboardingStatus `json:"onboardingStatus,omitempty"` - - // REQUIRED; Azure Resource Manager identifier of the resource whose onboarding status is being represented. - ResourceID *string `json:"resourceId,omitempty"` - - // Containers that currently store VM Insights data for the specified resource. - Data []*DataContainer `json:"data,omitempty"` -} - -// VoiceReceiver - A voice receiver. -type VoiceReceiver struct { - // REQUIRED; The country code of the voice receiver. - CountryCode *string `json:"countryCode,omitempty"` - - // REQUIRED; The name of the voice receiver. Names must be unique across all receivers within an action group. - Name *string `json:"name,omitempty"` - - // REQUIRED; The phone number of the voice receiver. - PhoneNumber *string `json:"phoneNumber,omitempty"` -} - -// WebhookNotification - Webhook notification of an autoscale event. -type WebhookNotification struct { - // a property bag of settings. This value can be empty. - Properties map[string]*string `json:"properties,omitempty"` - - // the service address to receive the notification. - ServiceURI *string `json:"serviceUri,omitempty"` -} - -// WebhookReceiver - A webhook receiver. -type WebhookReceiver struct { - // REQUIRED; The name of the webhook receiver. Names must be unique across all receivers within an action group. - Name *string `json:"name,omitempty"` - - // REQUIRED; The URI where webhooks should be sent. - ServiceURI *string `json:"serviceUri,omitempty"` - - // Indicates the identifier uri for aad auth. - IdentifierURI *string `json:"identifierUri,omitempty"` - - // Indicates the webhook app object Id for aad auth. - ObjectID *string `json:"objectId,omitempty"` - - // Indicates the tenant id for aad auth. - TenantID *string `json:"tenantId,omitempty"` - - // Indicates whether or not use AAD authentication. - UseAADAuth *bool `json:"useAadAuth,omitempty"` - - // Indicates whether to use common alert schema. - UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"` -} - -// WebtestLocationAvailabilityCriteria - Specifies the metric alert rule criteria for a web test resource. -type WebtestLocationAvailabilityCriteria struct { - // REQUIRED; The Application Insights resource Id. - ComponentID *string `json:"componentId,omitempty"` - - // REQUIRED; The number of failed locations. - FailedLocationCount *float32 `json:"failedLocationCount,omitempty"` - - // REQUIRED; specifies the type of the alert criteria. - ODataType *Odatatype `json:"odata.type,omitempty"` - - // REQUIRED; The Application Insights web test Id. - WebTestID *string `json:"webTestId,omitempty"` - - // OPTIONAL; Contains additional key/value pairs not defined in the schema. - AdditionalProperties map[string]interface{} -} - -// GetMetricAlertCriteria implements the MetricAlertCriteriaClassification interface for type WebtestLocationAvailabilityCriteria. -func (w *WebtestLocationAvailabilityCriteria) GetMetricAlertCriteria() *MetricAlertCriteria { - return &MetricAlertCriteria{ - ODataType: w.ODataType, - AdditionalProperties: w.AdditionalProperties, - } -} - -// WindowsEventLogDataSource - Definition of which Windows Event Log events will be collected and how they will be collected. -// Only collected from Windows machines. -type WindowsEventLogDataSource struct { - // A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the - // data collection rule. - Name *string `json:"name,omitempty"` - - // List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually - // what table in Log Analytics the data will be sent to. - Streams []*KnownWindowsEventLogDataSourceStreams `json:"streams,omitempty"` - - // A list of Windows Event Log queries in XPATH format. - XPathQueries []*string `json:"xPathQueries,omitempty"` -} - -// WorkspaceInfo - Information about a Log Analytics Workspace. -type WorkspaceInfo struct { - // REQUIRED; Azure Resource Manager identifier of the Log Analytics Workspace. - ID *string `json:"id,omitempty"` - - // REQUIRED; Location of the Log Analytics workspace. - Location *string `json:"location,omitempty"` - - // REQUIRED; Resource properties. - Properties *WorkspaceInfoProperties `json:"properties,omitempty"` -} - -// WorkspaceInfoProperties - Resource properties. -type WorkspaceInfoProperties struct { - // REQUIRED; Log Analytics workspace identifier. - CustomerID *string `json:"customerId,omitempty"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_models_serde.go deleted file mode 100644 index c728613a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_models_serde.go +++ /dev/null @@ -1,2265 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type ActionGroup. -func (a ActionGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "armRoleReceivers", a.ArmRoleReceivers) - populate(objectMap, "automationRunbookReceivers", a.AutomationRunbookReceivers) - populate(objectMap, "azureAppPushReceivers", a.AzureAppPushReceivers) - populate(objectMap, "azureFunctionReceivers", a.AzureFunctionReceivers) - populate(objectMap, "emailReceivers", a.EmailReceivers) - populate(objectMap, "enabled", a.Enabled) - populate(objectMap, "eventHubReceivers", a.EventHubReceivers) - populate(objectMap, "groupShortName", a.GroupShortName) - populate(objectMap, "itsmReceivers", a.ItsmReceivers) - populate(objectMap, "logicAppReceivers", a.LogicAppReceivers) - populate(objectMap, "smsReceivers", a.SmsReceivers) - populate(objectMap, "voiceReceivers", a.VoiceReceivers) - populate(objectMap, "webhookReceivers", a.WebhookReceivers) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ActionGroupAutoGenerated. -func (a ActionGroupAutoGenerated) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionGroupId", a.ActionGroupID) - populate(objectMap, "webhookProperties", a.WebhookProperties) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ActionGroupPatchBody. -func (a ActionGroupPatchBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ActionGroupResource. -func (a ActionGroupResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) - populate(objectMap, "kind", a.Kind) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ActionList. -func (a ActionList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionGroups", a.ActionGroups) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ActivityLogAlertResource. -func (a ActivityLogAlertResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AlertRule. -func (a AlertRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", a.Action) - populate(objectMap, "actions", a.Actions) - populate(objectMap, "condition", a.Condition) - populate(objectMap, "description", a.Description) - populate(objectMap, "isEnabled", a.IsEnabled) - populateTimeRFC3339(objectMap, "lastUpdatedTime", a.LastUpdatedTime) - populate(objectMap, "name", a.Name) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AlertRule. -func (a *AlertRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - a.Action, err = unmarshalRuleActionClassification(val) - delete(rawMsg, key) - case "actions": - a.Actions, err = unmarshalRuleActionClassificationArray(val) - delete(rawMsg, key) - case "condition": - a.Condition, err = unmarshalRuleConditionClassification(val) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "isEnabled": - err = unpopulate(val, "IsEnabled", &a.IsEnabled) - delete(rawMsg, key) - case "lastUpdatedTime": - err = unpopulateTimeRFC3339(val, "LastUpdatedTime", &a.LastUpdatedTime) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AlertRuleAllOfCondition. -func (a AlertRuleAllOfCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allOf", a.AllOf) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AlertRuleAnyOfOrLeafCondition. -func (a AlertRuleAnyOfOrLeafCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "anyOf", a.AnyOf) - populate(objectMap, "containsAny", a.ContainsAny) - populate(objectMap, "equals", a.Equals) - populate(objectMap, "field", a.Field) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AlertRuleLeafCondition. -func (a AlertRuleLeafCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containsAny", a.ContainsAny) - populate(objectMap, "equals", a.Equals) - populate(objectMap, "field", a.Field) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AlertRulePatchObject. -func (a AlertRulePatchObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AlertRuleProperties. -func (a AlertRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actions", a.Actions) - populate(objectMap, "condition", a.Condition) - populate(objectMap, "description", a.Description) - populate(objectMap, "enabled", a.Enabled) - populate(objectMap, "scopes", a.Scopes) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AlertRuleResource. -func (a AlertRuleResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AlertRuleResourcePatch. -func (a AlertRuleResourcePatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AlertingAction. -func (a AlertingAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aznsAction", a.AznsAction) - objectMap["odata.type"] = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction" - populate(objectMap, "severity", a.Severity) - populate(objectMap, "throttlingInMin", a.ThrottlingInMin) - populate(objectMap, "trigger", a.Trigger) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AlertingAction. -func (a *AlertingAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aznsAction": - err = unpopulate(val, "AznsAction", &a.AznsAction) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &a.ODataType) - delete(rawMsg, key) - case "severity": - err = unpopulate(val, "Severity", &a.Severity) - delete(rawMsg, key) - case "throttlingInMin": - err = unpopulate(val, "ThrottlingInMin", &a.ThrottlingInMin) - delete(rawMsg, key) - case "trigger": - err = unpopulate(val, "Trigger", &a.Trigger) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AutoscaleNotification. -func (a AutoscaleNotification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "email", a.Email) - populate(objectMap, "operation", a.Operation) - populate(objectMap, "webhooks", a.Webhooks) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AutoscaleProfile. -func (a AutoscaleProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capacity", a.Capacity) - populate(objectMap, "fixedDate", a.FixedDate) - populate(objectMap, "name", a.Name) - populate(objectMap, "recurrence", a.Recurrence) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AutoscaleSetting. -func (a AutoscaleSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enabled", a.Enabled) - populate(objectMap, "name", a.Name) - populate(objectMap, "notifications", a.Notifications) - populate(objectMap, "profiles", a.Profiles) - populate(objectMap, "targetResourceLocation", a.TargetResourceLocation) - populate(objectMap, "targetResourceUri", a.TargetResourceURI) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AutoscaleSettingResource. -func (a AutoscaleSettingResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AutoscaleSettingResourcePatch. -func (a AutoscaleSettingResourcePatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzNsActionGroup. -func (a AzNsActionGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionGroup", a.ActionGroup) - populate(objectMap, "customWebhookPayload", a.CustomWebhookPayload) - populate(objectMap, "emailSubject", a.EmailSubject) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureMonitorPrivateLinkScope. -func (a AzureMonitorPrivateLinkScope) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureMonitorPrivateLinkScopeProperties. -func (a AzureMonitorPrivateLinkScopeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateEndpointConnections", a.PrivateEndpointConnections) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureResource. -func (a AzureResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) - populate(objectMap, "kind", a.Kind) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureResourceAutoGenerated. -func (a AzureResourceAutoGenerated) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Criteria. -func (c Criteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dimensions", c.Dimensions) - populate(objectMap, "metricName", c.MetricName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataCollectionEndpointResource. -func (d DataCollectionEndpointResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataCollectionEndpointResourceSystemData. -func (d DataCollectionEndpointResourceSystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", d.CreatedAt) - populate(objectMap, "createdBy", d.CreatedBy) - populate(objectMap, "createdByType", d.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", d.LastModifiedAt) - populate(objectMap, "lastModifiedBy", d.LastModifiedBy) - populate(objectMap, "lastModifiedByType", d.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataCollectionEndpointResourceSystemData. -func (d *DataCollectionEndpointResourceSystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &d.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &d.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &d.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &d.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &d.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &d.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataCollectionRule. -func (d DataCollectionRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataCollectionEndpointId", d.DataCollectionEndpointID) - populate(objectMap, "dataFlows", d.DataFlows) - populate(objectMap, "dataSources", d.DataSources) - populate(objectMap, "description", d.Description) - populate(objectMap, "destinations", d.Destinations) - populate(objectMap, "immutableId", d.ImmutableID) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "streamDeclarations", d.StreamDeclarations) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataCollectionRuleAssociationProxyOnlyResourceSystemData. -func (d DataCollectionRuleAssociationProxyOnlyResourceSystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", d.CreatedAt) - populate(objectMap, "createdBy", d.CreatedBy) - populate(objectMap, "createdByType", d.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", d.LastModifiedAt) - populate(objectMap, "lastModifiedBy", d.LastModifiedBy) - populate(objectMap, "lastModifiedByType", d.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataCollectionRuleAssociationProxyOnlyResourceSystemData. -func (d *DataCollectionRuleAssociationProxyOnlyResourceSystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &d.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &d.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &d.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &d.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &d.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &d.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataCollectionRuleDataSources. -func (d DataCollectionRuleDataSources) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extensions", d.Extensions) - populate(objectMap, "iisLogs", d.IisLogs) - populate(objectMap, "logFiles", d.LogFiles) - populate(objectMap, "performanceCounters", d.PerformanceCounters) - populate(objectMap, "syslog", d.Syslog) - populate(objectMap, "windowsEventLogs", d.WindowsEventLogs) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataCollectionRuleDestinations. -func (d DataCollectionRuleDestinations) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureMonitorMetrics", d.AzureMonitorMetrics) - populate(objectMap, "logAnalytics", d.LogAnalytics) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataCollectionRuleResource. -func (d DataCollectionRuleResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - populate(objectMap, "kind", d.Kind) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataCollectionRuleResourceProperties. -func (d DataCollectionRuleResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataCollectionEndpointId", d.DataCollectionEndpointID) - populate(objectMap, "dataFlows", d.DataFlows) - populate(objectMap, "dataSources", d.DataSources) - populate(objectMap, "description", d.Description) - populate(objectMap, "destinations", d.Destinations) - populate(objectMap, "immutableId", d.ImmutableID) - populate(objectMap, "metadata", d.Metadata) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "streamDeclarations", d.StreamDeclarations) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataCollectionRuleResourceSystemData. -func (d DataCollectionRuleResourceSystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", d.CreatedAt) - populate(objectMap, "createdBy", d.CreatedBy) - populate(objectMap, "createdByType", d.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", d.LastModifiedAt) - populate(objectMap, "lastModifiedBy", d.LastModifiedBy) - populate(objectMap, "lastModifiedByType", d.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataCollectionRuleResourceSystemData. -func (d *DataCollectionRuleResourceSystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &d.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &d.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &d.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &d.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &d.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &d.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataFlow. -func (d DataFlow) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinations", d.Destinations) - populate(objectMap, "outputStream", d.OutputStream) - populate(objectMap, "streams", d.Streams) - populate(objectMap, "transformKql", d.TransformKql) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataSourcesSpec. -func (d DataSourcesSpec) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extensions", d.Extensions) - populate(objectMap, "iisLogs", d.IisLogs) - populate(objectMap, "logFiles", d.LogFiles) - populate(objectMap, "performanceCounters", d.PerformanceCounters) - populate(objectMap, "syslog", d.Syslog) - populate(objectMap, "windowsEventLogs", d.WindowsEventLogs) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DestinationsSpec. -func (d DestinationsSpec) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureMonitorMetrics", d.AzureMonitorMetrics) - populate(objectMap, "logAnalytics", d.LogAnalytics) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnosticSettings. -func (d DiagnosticSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eventHubAuthorizationRuleId", d.EventHubAuthorizationRuleID) - populate(objectMap, "eventHubName", d.EventHubName) - populate(objectMap, "logAnalyticsDestinationType", d.LogAnalyticsDestinationType) - populate(objectMap, "logs", d.Logs) - populate(objectMap, "metrics", d.Metrics) - populate(objectMap, "serviceBusRuleId", d.ServiceBusRuleID) - populate(objectMap, "storageAccountId", d.StorageAccountID) - populate(objectMap, "workspaceId", d.WorkspaceID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Dimension. -func (d Dimension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", d.Name) - populate(objectMap, "operator", d.Operator) - populate(objectMap, "values", d.Values) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DynamicMetricCriteria. -func (d DynamicMetricCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "alertSensitivity", d.AlertSensitivity) - objectMap["criterionType"] = CriterionTypeDynamicThresholdCriterion - populate(objectMap, "dimensions", d.Dimensions) - populate(objectMap, "failingPeriods", d.FailingPeriods) - populateTimeRFC3339(objectMap, "ignoreDataBefore", d.IgnoreDataBefore) - populate(objectMap, "metricName", d.MetricName) - populate(objectMap, "metricNamespace", d.MetricNamespace) - populate(objectMap, "name", d.Name) - populate(objectMap, "operator", d.Operator) - populate(objectMap, "skipMetricValidation", d.SkipMetricValidation) - populate(objectMap, "timeAggregation", d.TimeAggregation) - if d.AdditionalProperties != nil { - for key, val := range d.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DynamicMetricCriteria. -func (d *DynamicMetricCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "alertSensitivity": - err = unpopulate(val, "AlertSensitivity", &d.AlertSensitivity) - delete(rawMsg, key) - case "criterionType": - err = unpopulate(val, "CriterionType", &d.CriterionType) - delete(rawMsg, key) - case "dimensions": - err = unpopulate(val, "Dimensions", &d.Dimensions) - delete(rawMsg, key) - case "failingPeriods": - err = unpopulate(val, "FailingPeriods", &d.FailingPeriods) - delete(rawMsg, key) - case "ignoreDataBefore": - err = unpopulateTimeRFC3339(val, "IgnoreDataBefore", &d.IgnoreDataBefore) - delete(rawMsg, key) - case "metricName": - err = unpopulate(val, "MetricName", &d.MetricName) - delete(rawMsg, key) - case "metricNamespace": - err = unpopulate(val, "MetricNamespace", &d.MetricNamespace) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &d.Operator) - delete(rawMsg, key) - case "skipMetricValidation": - err = unpopulate(val, "SkipMetricValidation", &d.SkipMetricValidation) - delete(rawMsg, key) - case "timeAggregation": - err = unpopulate(val, "TimeAggregation", &d.TimeAggregation) - delete(rawMsg, key) - default: - if d.AdditionalProperties == nil { - d.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - d.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EmailNotification. -func (e EmailNotification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customEmails", e.CustomEmails) - populate(objectMap, "sendToSubscriptionAdministrator", e.SendToSubscriptionAdministrator) - populate(objectMap, "sendToSubscriptionCoAdministrators", e.SendToSubscriptionCoAdministrators) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventData. -func (e *EventData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorization": - err = unpopulate(val, "Authorization", &e.Authorization) - delete(rawMsg, key) - case "caller": - err = unpopulate(val, "Caller", &e.Caller) - delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &e.Category) - delete(rawMsg, key) - case "claims": - err = unpopulate(val, "Claims", &e.Claims) - delete(rawMsg, key) - case "correlationId": - err = unpopulate(val, "CorrelationID", &e.CorrelationID) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &e.Description) - delete(rawMsg, key) - case "eventDataId": - err = unpopulate(val, "EventDataID", &e.EventDataID) - delete(rawMsg, key) - case "eventName": - err = unpopulate(val, "EventName", &e.EventName) - delete(rawMsg, key) - case "eventTimestamp": - err = unpopulateTimeRFC3339(val, "EventTimestamp", &e.EventTimestamp) - delete(rawMsg, key) - case "httpRequest": - err = unpopulate(val, "HTTPRequest", &e.HTTPRequest) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "level": - err = unpopulate(val, "Level", &e.Level) - delete(rawMsg, key) - case "operationId": - err = unpopulate(val, "OperationID", &e.OperationID) - delete(rawMsg, key) - case "operationName": - err = unpopulate(val, "OperationName", &e.OperationName) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "resourceGroupName": - err = unpopulate(val, "ResourceGroupName", &e.ResourceGroupName) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &e.ResourceID) - delete(rawMsg, key) - case "resourceProviderName": - err = unpopulate(val, "ResourceProviderName", &e.ResourceProviderName) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &e.ResourceType) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &e.Status) - delete(rawMsg, key) - case "subStatus": - err = unpopulate(val, "SubStatus", &e.SubStatus) - delete(rawMsg, key) - case "submissionTimestamp": - err = unpopulateTimeRFC3339(val, "SubmissionTimestamp", &e.SubmissionTimestamp) - delete(rawMsg, key) - case "subscriptionId": - err = unpopulate(val, "SubscriptionID", &e.SubscriptionID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &e.TenantID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExtensionDataSource. -func (e ExtensionDataSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extensionName", e.ExtensionName) - populate(objectMap, "extensionSettings", &e.ExtensionSettings) - populate(objectMap, "inputDataSources", e.InputDataSources) - populate(objectMap, "name", e.Name) - populate(objectMap, "streams", e.Streams) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type IisLogsDataSource. -func (i IisLogsDataSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "logDirectories", i.LogDirectories) - populate(objectMap, "name", i.Name) - populate(objectMap, "streams", i.Streams) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Incident. -func (i *Incident) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activatedTime": - err = unpopulateTimeRFC3339(val, "ActivatedTime", &i.ActivatedTime) - delete(rawMsg, key) - case "isActive": - err = unpopulate(val, "IsActive", &i.IsActive) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "resolvedTime": - err = unpopulateTimeRFC3339(val, "ResolvedTime", &i.ResolvedTime) - delete(rawMsg, key) - case "ruleName": - err = unpopulate(val, "RuleName", &i.RuleName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LocationThresholdRuleCondition. -func (l LocationThresholdRuleCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataSource", l.DataSource) - populate(objectMap, "failedLocationCount", l.FailedLocationCount) - objectMap["odata.type"] = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition" - populate(objectMap, "windowSize", l.WindowSize) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LocationThresholdRuleCondition. -func (l *LocationThresholdRuleCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataSource": - l.DataSource, err = unmarshalRuleDataSourceClassification(val) - delete(rawMsg, key) - case "failedLocationCount": - err = unpopulate(val, "FailedLocationCount", &l.FailedLocationCount) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &l.ODataType) - delete(rawMsg, key) - case "windowSize": - err = unpopulate(val, "WindowSize", &l.WindowSize) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LogFilesDataSource. -func (l LogFilesDataSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filePatterns", l.FilePatterns) - populate(objectMap, "format", l.Format) - populate(objectMap, "name", l.Name) - populate(objectMap, "settings", l.Settings) - populate(objectMap, "streams", l.Streams) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LogProfileProperties. -func (l LogProfileProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "categories", l.Categories) - populate(objectMap, "locations", l.Locations) - populate(objectMap, "retentionPolicy", l.RetentionPolicy) - populate(objectMap, "serviceBusRuleId", l.ServiceBusRuleID) - populate(objectMap, "storageAccountId", l.StorageAccountID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LogProfileResource. -func (l LogProfileResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", l.ID) - populate(objectMap, "location", l.Location) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "tags", l.Tags) - populate(objectMap, "type", l.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LogProfileResourcePatch. -func (l LogProfileResourcePatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "tags", l.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LogSearchRule. -func (l LogSearchRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", l.Action) - populate(objectMap, "autoMitigate", l.AutoMitigate) - populate(objectMap, "createdWithApiVersion", l.CreatedWithAPIVersion) - populate(objectMap, "description", l.Description) - populate(objectMap, "displayName", l.DisplayName) - populate(objectMap, "enabled", l.Enabled) - populate(objectMap, "isLegacyLogAnalyticsRule", l.IsLegacyLogAnalyticsRule) - populateTimeRFC3339(objectMap, "lastUpdatedTime", l.LastUpdatedTime) - populate(objectMap, "provisioningState", l.ProvisioningState) - populate(objectMap, "schedule", l.Schedule) - populate(objectMap, "source", l.Source) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LogSearchRule. -func (l *LogSearchRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - l.Action, err = unmarshalActionClassification(val) - delete(rawMsg, key) - case "autoMitigate": - err = unpopulate(val, "AutoMitigate", &l.AutoMitigate) - delete(rawMsg, key) - case "createdWithApiVersion": - err = unpopulate(val, "CreatedWithAPIVersion", &l.CreatedWithAPIVersion) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &l.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &l.DisplayName) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &l.Enabled) - delete(rawMsg, key) - case "isLegacyLogAnalyticsRule": - err = unpopulate(val, "IsLegacyLogAnalyticsRule", &l.IsLegacyLogAnalyticsRule) - delete(rawMsg, key) - case "lastUpdatedTime": - err = unpopulateTimeRFC3339(val, "LastUpdatedTime", &l.LastUpdatedTime) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) - delete(rawMsg, key) - case "schedule": - err = unpopulate(val, "Schedule", &l.Schedule) - delete(rawMsg, key) - case "source": - err = unpopulate(val, "Source", &l.Source) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LogSearchRuleResource. -func (l LogSearchRuleResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", l.Etag) - populate(objectMap, "id", l.ID) - populate(objectMap, "kind", l.Kind) - populate(objectMap, "location", l.Location) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "tags", l.Tags) - populate(objectMap, "type", l.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LogSearchRuleResourcePatch. -func (l LogSearchRuleResourcePatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "tags", l.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LogToMetricAction. -func (l LogToMetricAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "criteria", l.Criteria) - objectMap["odata.type"] = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LogToMetricAction. -func (l *LogToMetricAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "criteria": - err = unpopulate(val, "Criteria", &l.Criteria) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &l.ODataType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagementEventRuleCondition. -func (m ManagementEventRuleCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aggregation", m.Aggregation) - populate(objectMap, "dataSource", m.DataSource) - objectMap["odata.type"] = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagementEventRuleCondition. -func (m *ManagementEventRuleCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aggregation": - err = unpopulate(val, "Aggregation", &m.Aggregation) - delete(rawMsg, key) - case "dataSource": - m.DataSource, err = unmarshalRuleDataSourceClassification(val) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &m.ODataType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricAlertAction. -func (m MetricAlertAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionGroupId", m.ActionGroupID) - populate(objectMap, "webHookProperties", m.WebHookProperties) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MetricAlertCriteria. -func (m MetricAlertCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["odata.type"] = m.ODataType - if m.AdditionalProperties != nil { - for key, val := range m.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAlertCriteria. -func (m *MetricAlertCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "odata.type": - err = unpopulate(val, "ODataType", &m.ODataType) - delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricAlertMultipleResourceMultipleMetricCriteria. -func (m MetricAlertMultipleResourceMultipleMetricCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allOf", m.AllOf) - objectMap["odata.type"] = OdatatypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria - if m.AdditionalProperties != nil { - for key, val := range m.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAlertMultipleResourceMultipleMetricCriteria. -func (m *MetricAlertMultipleResourceMultipleMetricCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allOf": - m.AllOf, err = unmarshalMultiMetricCriteriaClassificationArray(val) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &m.ODataType) - delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricAlertProperties. -func (m MetricAlertProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actions", m.Actions) - populate(objectMap, "autoMitigate", m.AutoMitigate) - populate(objectMap, "criteria", m.Criteria) - populate(objectMap, "description", m.Description) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "evaluationFrequency", m.EvaluationFrequency) - populate(objectMap, "isMigrated", m.IsMigrated) - populateTimeRFC3339(objectMap, "lastUpdatedTime", m.LastUpdatedTime) - populate(objectMap, "scopes", m.Scopes) - populate(objectMap, "severity", m.Severity) - populate(objectMap, "targetResourceRegion", m.TargetResourceRegion) - populate(objectMap, "targetResourceType", m.TargetResourceType) - populate(objectMap, "windowSize", m.WindowSize) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAlertProperties. -func (m *MetricAlertProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actions": - err = unpopulate(val, "Actions", &m.Actions) - delete(rawMsg, key) - case "autoMitigate": - err = unpopulate(val, "AutoMitigate", &m.AutoMitigate) - delete(rawMsg, key) - case "criteria": - m.Criteria, err = unmarshalMetricAlertCriteriaClassification(val) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "evaluationFrequency": - err = unpopulate(val, "EvaluationFrequency", &m.EvaluationFrequency) - delete(rawMsg, key) - case "isMigrated": - err = unpopulate(val, "IsMigrated", &m.IsMigrated) - delete(rawMsg, key) - case "lastUpdatedTime": - err = unpopulateTimeRFC3339(val, "LastUpdatedTime", &m.LastUpdatedTime) - delete(rawMsg, key) - case "scopes": - err = unpopulate(val, "Scopes", &m.Scopes) - delete(rawMsg, key) - case "severity": - err = unpopulate(val, "Severity", &m.Severity) - delete(rawMsg, key) - case "targetResourceRegion": - err = unpopulate(val, "TargetResourceRegion", &m.TargetResourceRegion) - delete(rawMsg, key) - case "targetResourceType": - err = unpopulate(val, "TargetResourceType", &m.TargetResourceType) - delete(rawMsg, key) - case "windowSize": - err = unpopulate(val, "WindowSize", &m.WindowSize) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricAlertPropertiesPatch. -func (m MetricAlertPropertiesPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actions", m.Actions) - populate(objectMap, "autoMitigate", m.AutoMitigate) - populate(objectMap, "criteria", m.Criteria) - populate(objectMap, "description", m.Description) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "evaluationFrequency", m.EvaluationFrequency) - populate(objectMap, "isMigrated", m.IsMigrated) - populateTimeRFC3339(objectMap, "lastUpdatedTime", m.LastUpdatedTime) - populate(objectMap, "scopes", m.Scopes) - populate(objectMap, "severity", m.Severity) - populate(objectMap, "targetResourceRegion", m.TargetResourceRegion) - populate(objectMap, "targetResourceType", m.TargetResourceType) - populate(objectMap, "windowSize", m.WindowSize) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAlertPropertiesPatch. -func (m *MetricAlertPropertiesPatch) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actions": - err = unpopulate(val, "Actions", &m.Actions) - delete(rawMsg, key) - case "autoMitigate": - err = unpopulate(val, "AutoMitigate", &m.AutoMitigate) - delete(rawMsg, key) - case "criteria": - m.Criteria, err = unmarshalMetricAlertCriteriaClassification(val) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "evaluationFrequency": - err = unpopulate(val, "EvaluationFrequency", &m.EvaluationFrequency) - delete(rawMsg, key) - case "isMigrated": - err = unpopulate(val, "IsMigrated", &m.IsMigrated) - delete(rawMsg, key) - case "lastUpdatedTime": - err = unpopulateTimeRFC3339(val, "LastUpdatedTime", &m.LastUpdatedTime) - delete(rawMsg, key) - case "scopes": - err = unpopulate(val, "Scopes", &m.Scopes) - delete(rawMsg, key) - case "severity": - err = unpopulate(val, "Severity", &m.Severity) - delete(rawMsg, key) - case "targetResourceRegion": - err = unpopulate(val, "TargetResourceRegion", &m.TargetResourceRegion) - delete(rawMsg, key) - case "targetResourceType": - err = unpopulate(val, "TargetResourceType", &m.TargetResourceType) - delete(rawMsg, key) - case "windowSize": - err = unpopulate(val, "WindowSize", &m.WindowSize) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricAlertResource. -func (m MetricAlertResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MetricAlertResourcePatch. -func (m MetricAlertResourcePatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "tags", m.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MetricAlertSingleResourceMultipleMetricCriteria. -func (m MetricAlertSingleResourceMultipleMetricCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allOf", m.AllOf) - objectMap["odata.type"] = OdatatypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria - if m.AdditionalProperties != nil { - for key, val := range m.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAlertSingleResourceMultipleMetricCriteria. -func (m *MetricAlertSingleResourceMultipleMetricCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allOf": - err = unpopulate(val, "AllOf", &m.AllOf) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &m.ODataType) - delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricAlertStatusProperties. -func (m *MetricAlertStatusProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dimensions": - err = unpopulate(val, "Dimensions", &m.Dimensions) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &m.Status) - delete(rawMsg, key) - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &m.Timestamp) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricCriteria. -func (m MetricCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["criterionType"] = CriterionTypeStaticThresholdCriterion - populate(objectMap, "dimensions", m.Dimensions) - populate(objectMap, "metricName", m.MetricName) - populate(objectMap, "metricNamespace", m.MetricNamespace) - populate(objectMap, "name", m.Name) - populate(objectMap, "operator", m.Operator) - populate(objectMap, "skipMetricValidation", m.SkipMetricValidation) - populate(objectMap, "threshold", m.Threshold) - populate(objectMap, "timeAggregation", m.TimeAggregation) - if m.AdditionalProperties != nil { - for key, val := range m.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricCriteria. -func (m *MetricCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "criterionType": - err = unpopulate(val, "CriterionType", &m.CriterionType) - delete(rawMsg, key) - case "dimensions": - err = unpopulate(val, "Dimensions", &m.Dimensions) - delete(rawMsg, key) - case "metricName": - err = unpopulate(val, "MetricName", &m.MetricName) - delete(rawMsg, key) - case "metricNamespace": - err = unpopulate(val, "MetricNamespace", &m.MetricNamespace) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &m.Operator) - delete(rawMsg, key) - case "skipMetricValidation": - err = unpopulate(val, "SkipMetricValidation", &m.SkipMetricValidation) - delete(rawMsg, key) - case "threshold": - err = unpopulate(val, "Threshold", &m.Threshold) - delete(rawMsg, key) - case "timeAggregation": - err = unpopulate(val, "TimeAggregation", &m.TimeAggregation) - delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricDimension. -func (m MetricDimension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", m.Name) - populate(objectMap, "operator", m.Operator) - populate(objectMap, "values", m.Values) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MetricTrigger. -func (m MetricTrigger) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dimensions", m.Dimensions) - populate(objectMap, "dividePerInstance", m.DividePerInstance) - populate(objectMap, "metricName", m.MetricName) - populate(objectMap, "metricNamespace", m.MetricNamespace) - populate(objectMap, "metricResourceLocation", m.MetricResourceLocation) - populate(objectMap, "metricResourceUri", m.MetricResourceURI) - populate(objectMap, "operator", m.Operator) - populate(objectMap, "statistic", m.Statistic) - populate(objectMap, "threshold", m.Threshold) - populate(objectMap, "timeAggregation", m.TimeAggregation) - populate(objectMap, "timeGrain", m.TimeGrain) - populate(objectMap, "timeWindow", m.TimeWindow) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricValue. -func (m *MetricValue) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "average": - err = unpopulate(val, "Average", &m.Average) - delete(rawMsg, key) - case "count": - err = unpopulate(val, "Count", &m.Count) - delete(rawMsg, key) - case "maximum": - err = unpopulate(val, "Maximum", &m.Maximum) - delete(rawMsg, key) - case "minimum": - err = unpopulate(val, "Minimum", &m.Minimum) - delete(rawMsg, key) - case "timeStamp": - err = unpopulateTimeRFC3339(val, "TimeStamp", &m.TimeStamp) - delete(rawMsg, key) - case "total": - err = unpopulate(val, "Total", &m.Total) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MultiMetricCriteria. -func (m MultiMetricCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["criterionType"] = m.CriterionType - populate(objectMap, "dimensions", m.Dimensions) - populate(objectMap, "metricName", m.MetricName) - populate(objectMap, "metricNamespace", m.MetricNamespace) - populate(objectMap, "name", m.Name) - populate(objectMap, "skipMetricValidation", m.SkipMetricValidation) - populate(objectMap, "timeAggregation", m.TimeAggregation) - if m.AdditionalProperties != nil { - for key, val := range m.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MultiMetricCriteria. -func (m *MultiMetricCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "criterionType": - err = unpopulate(val, "CriterionType", &m.CriterionType) - delete(rawMsg, key) - case "dimensions": - err = unpopulate(val, "Dimensions", &m.Dimensions) - delete(rawMsg, key) - case "metricName": - err = unpopulate(val, "MetricName", &m.MetricName) - delete(rawMsg, key) - case "metricNamespace": - err = unpopulate(val, "MetricNamespace", &m.MetricNamespace) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "skipMetricValidation": - err = unpopulate(val, "SkipMetricValidation", &m.SkipMetricValidation) - delete(rawMsg, key) - case "timeAggregation": - err = unpopulate(val, "TimeAggregation", &m.TimeAggregation) - delete(rawMsg, key) - default: - if m.AdditionalProperties == nil { - m.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - m.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NotificationRequestBody. -func (n NotificationRequestBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "alertType", n.AlertType) - populate(objectMap, "armRoleReceivers", n.ArmRoleReceivers) - populate(objectMap, "automationRunbookReceivers", n.AutomationRunbookReceivers) - populate(objectMap, "azureAppPushReceivers", n.AzureAppPushReceivers) - populate(objectMap, "azureFunctionReceivers", n.AzureFunctionReceivers) - populate(objectMap, "emailReceivers", n.EmailReceivers) - populate(objectMap, "eventHubReceivers", n.EventHubReceivers) - populate(objectMap, "itsmReceivers", n.ItsmReceivers) - populate(objectMap, "logicAppReceivers", n.LogicAppReceivers) - populate(objectMap, "smsReceivers", n.SmsReceivers) - populate(objectMap, "voiceReceivers", n.VoiceReceivers) - populate(objectMap, "webhookReceivers", n.WebhookReceivers) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatus. -func (o *OperationStatus) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &o.Error) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &o.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PerfCounterDataSource. -func (p PerfCounterDataSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "counterSpecifiers", p.CounterSpecifiers) - populate(objectMap, "name", p.Name) - populate(objectMap, "samplingFrequencyInSeconds", p.SamplingFrequencyInSeconds) - populate(objectMap, "streams", p.Streams) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. -func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "requiredMembers", p.RequiredMembers) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkScopesResource. -func (p PrivateLinkScopesResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RecurrentSchedule. -func (r RecurrentSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "days", r.Days) - populate(objectMap, "hours", r.Hours) - populate(objectMap, "minutes", r.Minutes) - populate(objectMap, "timeZone", r.TimeZone) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceForUpdate. -func (r ResourceForUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tags", r.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RuleCondition. -func (r RuleCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataSource", r.DataSource) - objectMap["odata.type"] = r.ODataType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleCondition. -func (r *RuleCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataSource": - r.DataSource, err = unmarshalRuleDataSourceClassification(val) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &r.ODataType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleEmailAction. -func (r RuleEmailAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customEmails", r.CustomEmails) - objectMap["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction" - populate(objectMap, "sendToServiceOwners", r.SendToServiceOwners) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleEmailAction. -func (r *RuleEmailAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customEmails": - err = unpopulate(val, "CustomEmails", &r.CustomEmails) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &r.ODataType) - delete(rawMsg, key) - case "sendToServiceOwners": - err = unpopulate(val, "SendToServiceOwners", &r.SendToServiceOwners) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleManagementEventDataSource. -func (r RuleManagementEventDataSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "claims", r.Claims) - populate(objectMap, "eventName", r.EventName) - populate(objectMap, "eventSource", r.EventSource) - populate(objectMap, "legacyResourceId", r.LegacyResourceID) - populate(objectMap, "level", r.Level) - populate(objectMap, "metricNamespace", r.MetricNamespace) - objectMap["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource" - populate(objectMap, "operationName", r.OperationName) - populate(objectMap, "resourceGroupName", r.ResourceGroupName) - populate(objectMap, "resourceLocation", r.ResourceLocation) - populate(objectMap, "resourceProviderName", r.ResourceProviderName) - populate(objectMap, "resourceUri", r.ResourceURI) - populate(objectMap, "status", r.Status) - populate(objectMap, "subStatus", r.SubStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleManagementEventDataSource. -func (r *RuleManagementEventDataSource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "claims": - err = unpopulate(val, "Claims", &r.Claims) - delete(rawMsg, key) - case "eventName": - err = unpopulate(val, "EventName", &r.EventName) - delete(rawMsg, key) - case "eventSource": - err = unpopulate(val, "EventSource", &r.EventSource) - delete(rawMsg, key) - case "legacyResourceId": - err = unpopulate(val, "LegacyResourceID", &r.LegacyResourceID) - delete(rawMsg, key) - case "level": - err = unpopulate(val, "Level", &r.Level) - delete(rawMsg, key) - case "metricNamespace": - err = unpopulate(val, "MetricNamespace", &r.MetricNamespace) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &r.ODataType) - delete(rawMsg, key) - case "operationName": - err = unpopulate(val, "OperationName", &r.OperationName) - delete(rawMsg, key) - case "resourceGroupName": - err = unpopulate(val, "ResourceGroupName", &r.ResourceGroupName) - delete(rawMsg, key) - case "resourceLocation": - err = unpopulate(val, "ResourceLocation", &r.ResourceLocation) - delete(rawMsg, key) - case "resourceProviderName": - err = unpopulate(val, "ResourceProviderName", &r.ResourceProviderName) - delete(rawMsg, key) - case "resourceUri": - err = unpopulate(val, "ResourceURI", &r.ResourceURI) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &r.Status) - delete(rawMsg, key) - case "subStatus": - err = unpopulate(val, "SubStatus", &r.SubStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleMetricDataSource. -func (r RuleMetricDataSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "legacyResourceId", r.LegacyResourceID) - populate(objectMap, "metricName", r.MetricName) - populate(objectMap, "metricNamespace", r.MetricNamespace) - objectMap["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource" - populate(objectMap, "resourceLocation", r.ResourceLocation) - populate(objectMap, "resourceUri", r.ResourceURI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleMetricDataSource. -func (r *RuleMetricDataSource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "legacyResourceId": - err = unpopulate(val, "LegacyResourceID", &r.LegacyResourceID) - delete(rawMsg, key) - case "metricName": - err = unpopulate(val, "MetricName", &r.MetricName) - delete(rawMsg, key) - case "metricNamespace": - err = unpopulate(val, "MetricNamespace", &r.MetricNamespace) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &r.ODataType) - delete(rawMsg, key) - case "resourceLocation": - err = unpopulate(val, "ResourceLocation", &r.ResourceLocation) - delete(rawMsg, key) - case "resourceUri": - err = unpopulate(val, "ResourceURI", &r.ResourceURI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RuleWebhookAction. -func (r RuleWebhookAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["odata.type"] = "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction" - populate(objectMap, "properties", r.Properties) - populate(objectMap, "serviceUri", r.ServiceURI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RuleWebhookAction. -func (r *RuleWebhookAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "odata.type": - err = unpopulate(val, "ODataType", &r.ODataType) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "serviceUri": - err = unpopulate(val, "ServiceURI", &r.ServiceURI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ScaleRuleMetricDimension. -func (s ScaleRuleMetricDimension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "DimensionName", s.DimensionName) - populate(objectMap, "Operator", s.Operator) - populate(objectMap, "Values", s.Values) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Source. -func (s Source) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorizedResources", s.AuthorizedResources) - populate(objectMap, "dataSourceId", s.DataSourceID) - populate(objectMap, "query", s.Query) - populate(objectMap, "queryType", s.QueryType) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StreamDeclaration. -func (s StreamDeclaration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "columns", s.Columns) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SyslogDataSource. -func (s SyslogDataSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "facilityNames", s.FacilityNames) - populate(objectMap, "logLevels", s.LogLevels) - populate(objectMap, "name", s.Name) - populate(objectMap, "streams", s.Streams) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagsResource. -func (t TagsResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tags", t.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ThresholdRuleCondition. -func (t ThresholdRuleCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataSource", t.DataSource) - objectMap["odata.type"] = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" - populate(objectMap, "operator", t.Operator) - populate(objectMap, "threshold", t.Threshold) - populate(objectMap, "timeAggregation", t.TimeAggregation) - populate(objectMap, "windowSize", t.WindowSize) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ThresholdRuleCondition. -func (t *ThresholdRuleCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataSource": - t.DataSource, err = unmarshalRuleDataSourceClassification(val) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &t.ODataType) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &t.Operator) - delete(rawMsg, key) - case "threshold": - err = unpopulate(val, "Threshold", &t.Threshold) - delete(rawMsg, key) - case "timeAggregation": - err = unpopulate(val, "TimeAggregation", &t.TimeAggregation) - delete(rawMsg, key) - case "windowSize": - err = unpopulate(val, "WindowSize", &t.WindowSize) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TimeWindow. -func (t TimeWindow) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "end", t.End) - populateTimeRFC3339(objectMap, "start", t.Start) - populate(objectMap, "timeZone", t.TimeZone) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TimeWindow. -func (t *TimeWindow) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "end": - err = unpopulateTimeRFC3339(val, "End", &t.End) - delete(rawMsg, key) - case "start": - err = unpopulateTimeRFC3339(val, "Start", &t.Start) - delete(rawMsg, key) - case "timeZone": - err = unpopulate(val, "TimeZone", &t.TimeZone) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TrackedEntityResource. -func (t TrackedEntityResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", t.Etag) - populate(objectMap, "id", t.ID) - populate(objectMap, "kind", t.Kind) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - populate(objectMap, "tags", t.Tags) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VMInsightsOnboardingStatusProperties. -func (v VMInsightsOnboardingStatusProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "data", v.Data) - populate(objectMap, "dataStatus", v.DataStatus) - populate(objectMap, "onboardingStatus", v.OnboardingStatus) - populate(objectMap, "resourceId", v.ResourceID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WebhookNotification. -func (w WebhookNotification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "serviceUri", w.ServiceURI) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WebtestLocationAvailabilityCriteria. -func (w WebtestLocationAvailabilityCriteria) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "componentId", w.ComponentID) - populate(objectMap, "failedLocationCount", w.FailedLocationCount) - objectMap["odata.type"] = OdatatypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria - populate(objectMap, "webTestId", w.WebTestID) - if w.AdditionalProperties != nil { - for key, val := range w.AdditionalProperties { - objectMap[key] = val - } - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebtestLocationAvailabilityCriteria. -func (w *WebtestLocationAvailabilityCriteria) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "componentId": - err = unpopulate(val, "ComponentID", &w.ComponentID) - delete(rawMsg, key) - case "failedLocationCount": - err = unpopulate(val, "FailedLocationCount", &w.FailedLocationCount) - delete(rawMsg, key) - case "odata.type": - err = unpopulate(val, "ODataType", &w.ODataType) - delete(rawMsg, key) - case "webTestId": - err = unpopulate(val, "WebTestID", &w.WebTestID) - delete(rawMsg, key) - default: - if w.AdditionalProperties == nil { - w.AdditionalProperties = map[string]interface{}{} - } - if val != nil { - var aux interface{} - err = json.Unmarshal(val, &aux) - w.AdditionalProperties[key] = aux - } - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WindowsEventLogDataSource. -func (w WindowsEventLogDataSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", w.Name) - populate(objectMap, "streams", w.Streams) - populate(objectMap, "xPathQueries", w.XPathQueries) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_operations_client.go deleted file mode 100644 index 3cb1182f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_operations_client.go +++ /dev/null @@ -1,91 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - host string - pl runtime.Pipeline -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// List - Lists all of the available operations from Microsoft.Insights provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2015-04-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, options) - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Insights/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2015-04-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_polymorphic_helpers.go deleted file mode 100644 index d03b7438..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_polymorphic_helpers.go +++ /dev/null @@ -1,173 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import "encoding/json" - -func unmarshalActionClassification(rawMsg json.RawMessage) (ActionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ActionClassification - switch m["odata.type"] { - case "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction": - b = &AlertingAction{} - case "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction": - b = &LogToMetricAction{} - default: - b = &Action{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalMetricAlertCriteriaClassification(rawMsg json.RawMessage) (MetricAlertCriteriaClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b MetricAlertCriteriaClassification - switch m["odata.type"] { - case string(OdatatypeMicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria): - b = &MetricAlertMultipleResourceMultipleMetricCriteria{} - case string(OdatatypeMicrosoftAzureMonitorSingleResourceMultipleMetricCriteria): - b = &MetricAlertSingleResourceMultipleMetricCriteria{} - case string(OdatatypeMicrosoftAzureMonitorWebtestLocationAvailabilityCriteria): - b = &WebtestLocationAvailabilityCriteria{} - default: - b = &MetricAlertCriteria{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalMultiMetricCriteriaClassification(rawMsg json.RawMessage) (MultiMetricCriteriaClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b MultiMetricCriteriaClassification - switch m["criterionType"] { - case string(CriterionTypeDynamicThresholdCriterion): - b = &DynamicMetricCriteria{} - case string(CriterionTypeStaticThresholdCriterion): - b = &MetricCriteria{} - default: - b = &MultiMetricCriteria{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalMultiMetricCriteriaClassificationArray(rawMsg json.RawMessage) ([]MultiMetricCriteriaClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]MultiMetricCriteriaClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalMultiMetricCriteriaClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalRuleActionClassification(rawMsg json.RawMessage) (RuleActionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RuleActionClassification - switch m["odata.type"] { - case "Microsoft.Azure.Management.Insights.Models.RuleEmailAction": - b = &RuleEmailAction{} - case "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction": - b = &RuleWebhookAction{} - default: - b = &RuleAction{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRuleActionClassificationArray(rawMsg json.RawMessage) ([]RuleActionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]RuleActionClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalRuleActionClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalRuleConditionClassification(rawMsg json.RawMessage) (RuleConditionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RuleConditionClassification - switch m["odata.type"] { - case "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition": - b = &LocationThresholdRuleCondition{} - case "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition": - b = &ManagementEventRuleCondition{} - case "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition": - b = &ThresholdRuleCondition{} - default: - b = &RuleCondition{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRuleDataSourceClassification(rawMsg json.RawMessage) (RuleDataSourceClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RuleDataSourceClassification - switch m["odata.type"] { - case "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource": - b = &RuleManagementEventDataSource{} - case "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource": - b = &RuleMetricDataSource{} - default: - b = &RuleDataSource{} - } - return b, json.Unmarshal(rawMsg, b) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privateendpointconnections_client.go deleted file mode 100644 index e438a12e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privateendpointconnections_client.go +++ /dev/null @@ -1,322 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. -// Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead. -type PrivateEndpointConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PrivateEndpointConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// privateEndpointConnectionName - The name of the private endpoint connection. -// options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate -// method. -func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, scopeName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, scopeName, privateEndpointConnectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateEndpointConnectionsClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Approve or reject a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -func (client *PrivateEndpointConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, scopeName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, scopeName, privateEndpointConnectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// privateEndpointConnectionName - The name of the private endpoint connection. -// options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. -func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, scopeName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, scopeName, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, scopeName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, scopeName, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets a private endpoint connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// privateEndpointConnectionName - The name of the private endpoint connection. -// options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, scopeName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, scopeName, privateEndpointConnectionName, options) - if err != nil { - return PrivateEndpointConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateEndpointConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientGetResponse, error) { - result := PrivateEndpointConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { - return PrivateEndpointConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListByPrivateLinkScopePager - Gets all private endpoint connections on a private link scope. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// options - PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByPrivateLinkScope -// method. -func (client *PrivateEndpointConnectionsClient) NewListByPrivateLinkScopePager(resourceGroupName string, scopeName string, options *PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse]{ - More: func(page PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse) (PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByPrivateLinkScopeCreateRequest(ctx, resourceGroupName, scopeName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse{}, runtime.NewResponseError(resp) - } - return client.listByPrivateLinkScopeHandleResponse(resp) - }, - }) -} - -// listByPrivateLinkScopeCreateRequest creates the ListByPrivateLinkScope request. -func (client *PrivateEndpointConnectionsClient) listByPrivateLinkScopeCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, options *PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateEndpointConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByPrivateLinkScopeHandleResponse handles the ListByPrivateLinkScope response. -func (client *PrivateEndpointConnectionsClient) listByPrivateLinkScopeHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse, error) { - result := PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResult); err != nil { - return PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkresources_client.go deleted file mode 100644 index 03e951a5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkresources_client.go +++ /dev/null @@ -1,187 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. -// Don't use this type directly, use NewPrivateLinkResourcesClient() instead. -type PrivateLinkResourcesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PrivateLinkResourcesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// groupName - The name of the private link resource. -// options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get -// method. -func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, scopeName string, groupName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, scopeName, groupName, options) - if err != nil { - return PrivateLinkResourcesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkResourcesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateLinkResourcesClient) getCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, groupName string, options *PrivateLinkResourcesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - if groupName == "" { - return nil, errors.New("parameter groupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{groupName}", url.PathEscape(groupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateLinkResourcesClient) getHandleResponse(resp *http.Response) (PrivateLinkResourcesClientGetResponse, error) { - result := PrivateLinkResourcesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResource); err != nil { - return PrivateLinkResourcesClientGetResponse{}, err - } - return result, nil -} - -// NewListByPrivateLinkScopePager - Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// options - PrivateLinkResourcesClientListByPrivateLinkScopeOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByPrivateLinkScope -// method. -func (client *PrivateLinkResourcesClient) NewListByPrivateLinkScopePager(resourceGroupName string, scopeName string, options *PrivateLinkResourcesClientListByPrivateLinkScopeOptions) *runtime.Pager[PrivateLinkResourcesClientListByPrivateLinkScopeResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateLinkResourcesClientListByPrivateLinkScopeResponse]{ - More: func(page PrivateLinkResourcesClientListByPrivateLinkScopeResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateLinkResourcesClientListByPrivateLinkScopeResponse) (PrivateLinkResourcesClientListByPrivateLinkScopeResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByPrivateLinkScopeCreateRequest(ctx, resourceGroupName, scopeName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkResourcesClientListByPrivateLinkScopeResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkResourcesClientListByPrivateLinkScopeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListByPrivateLinkScopeResponse{}, runtime.NewResponseError(resp) - } - return client.listByPrivateLinkScopeHandleResponse(resp) - }, - }) -} - -// listByPrivateLinkScopeCreateRequest creates the ListByPrivateLinkScope request. -func (client *PrivateLinkResourcesClient) listByPrivateLinkScopeCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, options *PrivateLinkResourcesClientListByPrivateLinkScopeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/privateLinkResources" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByPrivateLinkScopeHandleResponse handles the ListByPrivateLinkScope response. -func (client *PrivateLinkResourcesClient) listByPrivateLinkScopeHandleResponse(resp *http.Response) (PrivateLinkResourcesClientListByPrivateLinkScopeResponse, error) { - result := PrivateLinkResourcesClientListByPrivateLinkScopeResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourceListResult); err != nil { - return PrivateLinkResourcesClientListByPrivateLinkScopeResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkscopedresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkscopedresources_client.go deleted file mode 100644 index 7deae0e3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkscopedresources_client.go +++ /dev/null @@ -1,322 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateLinkScopedResourcesClient contains the methods for the PrivateLinkScopedResources group. -// Don't use this type directly, use NewPrivateLinkScopedResourcesClient() instead. -type PrivateLinkScopedResourcesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPrivateLinkScopedResourcesClient creates a new instance of PrivateLinkScopedResourcesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPrivateLinkScopedResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkScopedResourcesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PrivateLinkScopedResourcesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// name - The name of the scoped resource object. -// options - PrivateLinkScopedResourcesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkScopedResourcesClient.BeginCreateOrUpdate -// method. -func (client *PrivateLinkScopedResourcesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, scopeName string, name string, parameters ScopedResource, options *PrivateLinkScopedResourcesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateLinkScopedResourcesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, scopeName, name, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateLinkScopedResourcesClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateLinkScopedResourcesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Approve or reject a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -func (client *PrivateLinkScopedResourcesClient) createOrUpdate(ctx context.Context, resourceGroupName string, scopeName string, name string, parameters ScopedResource, options *PrivateLinkScopedResourcesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, scopeName, name, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PrivateLinkScopedResourcesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, name string, parameters ScopedResource, options *PrivateLinkScopedResourcesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources/{name}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// name - The name of the scoped resource object. -// options - PrivateLinkScopedResourcesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkScopedResourcesClient.BeginDelete -// method. -func (client *PrivateLinkScopedResourcesClient) BeginDelete(ctx context.Context, resourceGroupName string, scopeName string, name string, options *PrivateLinkScopedResourcesClientBeginDeleteOptions) (*runtime.Poller[PrivateLinkScopedResourcesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, scopeName, name, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateLinkScopedResourcesClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateLinkScopedResourcesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a private endpoint connection with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -func (client *PrivateLinkScopedResourcesClient) deleteOperation(ctx context.Context, resourceGroupName string, scopeName string, name string, options *PrivateLinkScopedResourcesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, scopeName, name, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PrivateLinkScopedResourcesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, name string, options *PrivateLinkScopedResourcesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources/{name}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets a scoped resource in a private link scope. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// name - The name of the scoped resource object. -// options - PrivateLinkScopedResourcesClientGetOptions contains the optional parameters for the PrivateLinkScopedResourcesClient.Get -// method. -func (client *PrivateLinkScopedResourcesClient) Get(ctx context.Context, resourceGroupName string, scopeName string, name string, options *PrivateLinkScopedResourcesClientGetOptions) (PrivateLinkScopedResourcesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, scopeName, name, options) - if err != nil { - return PrivateLinkScopedResourcesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkScopedResourcesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkScopedResourcesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateLinkScopedResourcesClient) getCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, name string, options *PrivateLinkScopedResourcesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources/{name}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateLinkScopedResourcesClient) getHandleResponse(resp *http.Response) (PrivateLinkScopedResourcesClientGetResponse, error) { - result := PrivateLinkScopedResourcesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScopedResource); err != nil { - return PrivateLinkScopedResourcesClientGetResponse{}, err - } - return result, nil -} - -// NewListByPrivateLinkScopePager - Gets all private endpoint connections on a private link scope. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// options - PrivateLinkScopedResourcesClientListByPrivateLinkScopeOptions contains the optional parameters for the PrivateLinkScopedResourcesClient.ListByPrivateLinkScope -// method. -func (client *PrivateLinkScopedResourcesClient) NewListByPrivateLinkScopePager(resourceGroupName string, scopeName string, options *PrivateLinkScopedResourcesClientListByPrivateLinkScopeOptions) *runtime.Pager[PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse]{ - More: func(page PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse) (PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByPrivateLinkScopeCreateRequest(ctx, resourceGroupName, scopeName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse{}, runtime.NewResponseError(resp) - } - return client.listByPrivateLinkScopeHandleResponse(resp) - }, - }) -} - -// listByPrivateLinkScopeCreateRequest creates the ListByPrivateLinkScope request. -func (client *PrivateLinkScopedResourcesClient) listByPrivateLinkScopeCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, options *PrivateLinkScopedResourcesClientListByPrivateLinkScopeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/privateLinkScopes/{scopeName}/scopedResources" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByPrivateLinkScopeHandleResponse handles the ListByPrivateLinkScope response. -func (client *PrivateLinkScopedResourcesClient) listByPrivateLinkScopeHandleResponse(resp *http.Response) (PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse, error) { - result := PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScopedResourceListResult); err != nil { - return PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkscopeoperationstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkscopeoperationstatus_client.go deleted file mode 100644 index 0ba2007d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkscopeoperationstatus_client.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateLinkScopeOperationStatusClient contains the methods for the PrivateLinkScopeOperationStatus group. -// Don't use this type directly, use NewPrivateLinkScopeOperationStatusClient() instead. -type PrivateLinkScopeOperationStatusClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPrivateLinkScopeOperationStatusClient creates a new instance of PrivateLinkScopeOperationStatusClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPrivateLinkScopeOperationStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkScopeOperationStatusClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PrivateLinkScopeOperationStatusClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get the status of an azure asynchronous operation associated with a private link scope operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// asyncOperationID - The operation Id. -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - PrivateLinkScopeOperationStatusClientGetOptions contains the optional parameters for the PrivateLinkScopeOperationStatusClient.Get -// method. -func (client *PrivateLinkScopeOperationStatusClient) Get(ctx context.Context, asyncOperationID string, resourceGroupName string, options *PrivateLinkScopeOperationStatusClientGetOptions) (PrivateLinkScopeOperationStatusClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, asyncOperationID, resourceGroupName, options) - if err != nil { - return PrivateLinkScopeOperationStatusClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkScopeOperationStatusClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkScopeOperationStatusClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateLinkScopeOperationStatusClient) getCreateRequest(ctx context.Context, asyncOperationID string, resourceGroupName string, options *PrivateLinkScopeOperationStatusClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopeOperationStatuses/{asyncOperationId}" - if asyncOperationID == "" { - return nil, errors.New("parameter asyncOperationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{asyncOperationId}", url.PathEscape(asyncOperationID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateLinkScopeOperationStatusClient) getHandleResponse(resp *http.Response) (PrivateLinkScopeOperationStatusClientGetResponse, error) { - result := PrivateLinkScopeOperationStatusClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { - return PrivateLinkScopeOperationStatusClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkscopes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkscopes_client.go deleted file mode 100644 index 5488f82b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_privatelinkscopes_client.go +++ /dev/null @@ -1,414 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateLinkScopesClient contains the methods for the PrivateLinkScopes group. -// Don't use this type directly, use NewPrivateLinkScopesClient() instead. -type PrivateLinkScopesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPrivateLinkScopesClient creates a new instance of PrivateLinkScopesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPrivateLinkScopesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkScopesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PrivateLinkScopesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for -// InstrumentationKey nor AppId in the Put operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// azureMonitorPrivateLinkScopePayload - Properties that need to be specified to create or update a Azure Monitor PrivateLinkScope. -// options - PrivateLinkScopesClientCreateOrUpdateOptions contains the optional parameters for the PrivateLinkScopesClient.CreateOrUpdate -// method. -func (client *PrivateLinkScopesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, scopeName string, azureMonitorPrivateLinkScopePayload AzureMonitorPrivateLinkScope, options *PrivateLinkScopesClientCreateOrUpdateOptions) (PrivateLinkScopesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, scopeName, azureMonitorPrivateLinkScopePayload, options) - if err != nil { - return PrivateLinkScopesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkScopesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return PrivateLinkScopesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PrivateLinkScopesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, azureMonitorPrivateLinkScopePayload AzureMonitorPrivateLinkScope, options *PrivateLinkScopesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, azureMonitorPrivateLinkScopePayload) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *PrivateLinkScopesClient) createOrUpdateHandleResponse(resp *http.Response) (PrivateLinkScopesClientCreateOrUpdateResponse, error) { - result := PrivateLinkScopesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureMonitorPrivateLinkScope); err != nil { - return PrivateLinkScopesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes a Azure Monitor PrivateLinkScope. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// options - PrivateLinkScopesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkScopesClient.BeginDelete -// method. -func (client *PrivateLinkScopesClient) BeginDelete(ctx context.Context, resourceGroupName string, scopeName string, options *PrivateLinkScopesClientBeginDeleteOptions) (*runtime.Poller[PrivateLinkScopesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, scopeName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateLinkScopesClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateLinkScopesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a Azure Monitor PrivateLinkScope. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -func (client *PrivateLinkScopesClient) deleteOperation(ctx context.Context, resourceGroupName string, scopeName string, options *PrivateLinkScopesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, scopeName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PrivateLinkScopesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, options *PrivateLinkScopesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Returns a Azure Monitor PrivateLinkScope. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// options - PrivateLinkScopesClientGetOptions contains the optional parameters for the PrivateLinkScopesClient.Get method. -func (client *PrivateLinkScopesClient) Get(ctx context.Context, resourceGroupName string, scopeName string, options *PrivateLinkScopesClientGetOptions) (PrivateLinkScopesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, scopeName, options) - if err != nil { - return PrivateLinkScopesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkScopesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkScopesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateLinkScopesClient) getCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, options *PrivateLinkScopesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateLinkScopesClient) getHandleResponse(resp *http.Response) (PrivateLinkScopesClientGetResponse, error) { - result := PrivateLinkScopesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureMonitorPrivateLinkScope); err != nil { - return PrivateLinkScopesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// options - PrivateLinkScopesClientListOptions contains the optional parameters for the PrivateLinkScopesClient.List method. -func (client *PrivateLinkScopesClient) NewListPager(options *PrivateLinkScopesClientListOptions) *runtime.Pager[PrivateLinkScopesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateLinkScopesClientListResponse]{ - More: func(page PrivateLinkScopesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateLinkScopesClientListResponse) (PrivateLinkScopesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkScopesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkScopesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkScopesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PrivateLinkScopesClient) listCreateRequest(ctx context.Context, options *PrivateLinkScopesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/microsoft.insights/privateLinkScopes" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PrivateLinkScopesClient) listHandleResponse(resp *http.Response) (PrivateLinkScopesClientListResponse, error) { - result := PrivateLinkScopesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureMonitorPrivateLinkScopeListResult); err != nil { - return PrivateLinkScopesClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Gets a list of Azure Monitor PrivateLinkScopes within a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - PrivateLinkScopesClientListByResourceGroupOptions contains the optional parameters for the PrivateLinkScopesClient.ListByResourceGroup -// method. -func (client *PrivateLinkScopesClient) NewListByResourceGroupPager(resourceGroupName string, options *PrivateLinkScopesClientListByResourceGroupOptions) *runtime.Pager[PrivateLinkScopesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateLinkScopesClientListByResourceGroupResponse]{ - More: func(page PrivateLinkScopesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateLinkScopesClientListByResourceGroupResponse) (PrivateLinkScopesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkScopesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkScopesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkScopesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *PrivateLinkScopesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *PrivateLinkScopesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *PrivateLinkScopesClient) listByResourceGroupHandleResponse(resp *http.Response) (PrivateLinkScopesClientListByResourceGroupResponse, error) { - result := PrivateLinkScopesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureMonitorPrivateLinkScopeListResult); err != nil { - return PrivateLinkScopesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2019-10-17-preview -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scopeName - The name of the Azure Monitor PrivateLinkScope resource. -// privateLinkScopeTags - Updated tag information to set into the PrivateLinkScope instance. -// options - PrivateLinkScopesClientUpdateTagsOptions contains the optional parameters for the PrivateLinkScopesClient.UpdateTags -// method. -func (client *PrivateLinkScopesClient) UpdateTags(ctx context.Context, resourceGroupName string, scopeName string, privateLinkScopeTags TagsResource, options *PrivateLinkScopesClientUpdateTagsOptions) (PrivateLinkScopesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, scopeName, privateLinkScopeTags, options) - if err != nil { - return PrivateLinkScopesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkScopesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkScopesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *PrivateLinkScopesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, scopeName string, privateLinkScopeTags TagsResource, options *PrivateLinkScopesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopes/{scopeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if scopeName == "" { - return nil, errors.New("parameter scopeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeName}", url.PathEscape(scopeName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2019-10-17-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateLinkScopeTags) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *PrivateLinkScopesClient) updateTagsHandleResponse(resp *http.Response) (PrivateLinkScopesClientUpdateTagsResponse, error) { - result := PrivateLinkScopesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureMonitorPrivateLinkScope); err != nil { - return PrivateLinkScopesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_response_types.go deleted file mode 100644 index 25e55ca8..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_response_types.go +++ /dev/null @@ -1,519 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -// ActionGroupsClientCreateNotificationsAtActionGroupResourceLevelResponse contains the response from method ActionGroupsClient.CreateNotificationsAtActionGroupResourceLevel. -type ActionGroupsClientCreateNotificationsAtActionGroupResourceLevelResponse struct { - // placeholder for future response values -} - -// ActionGroupsClientCreateNotificationsAtResourceGroupLevelResponse contains the response from method ActionGroupsClient.CreateNotificationsAtResourceGroupLevel. -type ActionGroupsClientCreateNotificationsAtResourceGroupLevelResponse struct { - // placeholder for future response values -} - -// ActionGroupsClientCreateOrUpdateResponse contains the response from method ActionGroupsClient.CreateOrUpdate. -type ActionGroupsClientCreateOrUpdateResponse struct { - ActionGroupResource -} - -// ActionGroupsClientDeleteResponse contains the response from method ActionGroupsClient.Delete. -type ActionGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// ActionGroupsClientEnableReceiverResponse contains the response from method ActionGroupsClient.EnableReceiver. -type ActionGroupsClientEnableReceiverResponse struct { - // placeholder for future response values -} - -// ActionGroupsClientGetResponse contains the response from method ActionGroupsClient.Get. -type ActionGroupsClientGetResponse struct { - ActionGroupResource -} - -// ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse contains the response from method ActionGroupsClient.GetTestNotificationsAtActionGroupResourceLevel. -type ActionGroupsClientGetTestNotificationsAtActionGroupResourceLevelResponse struct { - TestNotificationDetailsResponse -} - -// ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse contains the response from method ActionGroupsClient.GetTestNotificationsAtResourceGroupLevel. -type ActionGroupsClientGetTestNotificationsAtResourceGroupLevelResponse struct { - TestNotificationDetailsResponse -} - -// ActionGroupsClientGetTestNotificationsResponse contains the response from method ActionGroupsClient.GetTestNotifications. -type ActionGroupsClientGetTestNotificationsResponse struct { - TestNotificationDetailsResponse -} - -// ActionGroupsClientListByResourceGroupResponse contains the response from method ActionGroupsClient.ListByResourceGroup. -type ActionGroupsClientListByResourceGroupResponse struct { - ActionGroupList -} - -// ActionGroupsClientListBySubscriptionIDResponse contains the response from method ActionGroupsClient.ListBySubscriptionID. -type ActionGroupsClientListBySubscriptionIDResponse struct { - ActionGroupList -} - -// ActionGroupsClientPostTestNotificationsResponse contains the response from method ActionGroupsClient.PostTestNotifications. -type ActionGroupsClientPostTestNotificationsResponse struct { - // placeholder for future response values -} - -// ActionGroupsClientUpdateResponse contains the response from method ActionGroupsClient.Update. -type ActionGroupsClientUpdateResponse struct { - ActionGroupResource -} - -// ActivityLogAlertsClientCreateOrUpdateResponse contains the response from method ActivityLogAlertsClient.CreateOrUpdate. -type ActivityLogAlertsClientCreateOrUpdateResponse struct { - ActivityLogAlertResource -} - -// ActivityLogAlertsClientDeleteResponse contains the response from method ActivityLogAlertsClient.Delete. -type ActivityLogAlertsClientDeleteResponse struct { - // placeholder for future response values -} - -// ActivityLogAlertsClientGetResponse contains the response from method ActivityLogAlertsClient.Get. -type ActivityLogAlertsClientGetResponse struct { - ActivityLogAlertResource -} - -// ActivityLogAlertsClientListByResourceGroupResponse contains the response from method ActivityLogAlertsClient.ListByResourceGroup. -type ActivityLogAlertsClientListByResourceGroupResponse struct { - AlertRuleList -} - -// ActivityLogAlertsClientListBySubscriptionIDResponse contains the response from method ActivityLogAlertsClient.ListBySubscriptionID. -type ActivityLogAlertsClientListBySubscriptionIDResponse struct { - AlertRuleList -} - -// ActivityLogAlertsClientUpdateResponse contains the response from method ActivityLogAlertsClient.Update. -type ActivityLogAlertsClientUpdateResponse struct { - ActivityLogAlertResource -} - -// ActivityLogsClientListResponse contains the response from method ActivityLogsClient.List. -type ActivityLogsClientListResponse struct { - EventDataCollection -} - -// AlertRuleIncidentsClientGetResponse contains the response from method AlertRuleIncidentsClient.Get. -type AlertRuleIncidentsClientGetResponse struct { - Incident -} - -// AlertRuleIncidentsClientListByAlertRuleResponse contains the response from method AlertRuleIncidentsClient.ListByAlertRule. -type AlertRuleIncidentsClientListByAlertRuleResponse struct { - IncidentListResult -} - -// AlertRulesClientCreateOrUpdateResponse contains the response from method AlertRulesClient.CreateOrUpdate. -type AlertRulesClientCreateOrUpdateResponse struct { - AlertRuleResource -} - -// AlertRulesClientDeleteResponse contains the response from method AlertRulesClient.Delete. -type AlertRulesClientDeleteResponse struct { - // placeholder for future response values -} - -// AlertRulesClientGetResponse contains the response from method AlertRulesClient.Get. -type AlertRulesClientGetResponse struct { - AlertRuleResource -} - -// AlertRulesClientListByResourceGroupResponse contains the response from method AlertRulesClient.ListByResourceGroup. -type AlertRulesClientListByResourceGroupResponse struct { - AlertRuleResourceCollection -} - -// AlertRulesClientListBySubscriptionResponse contains the response from method AlertRulesClient.ListBySubscription. -type AlertRulesClientListBySubscriptionResponse struct { - AlertRuleResourceCollection -} - -// AlertRulesClientUpdateResponse contains the response from method AlertRulesClient.Update. -type AlertRulesClientUpdateResponse struct { - AlertRuleResource -} - -// AutoscaleSettingsClientCreateOrUpdateResponse contains the response from method AutoscaleSettingsClient.CreateOrUpdate. -type AutoscaleSettingsClientCreateOrUpdateResponse struct { - AutoscaleSettingResource -} - -// AutoscaleSettingsClientDeleteResponse contains the response from method AutoscaleSettingsClient.Delete. -type AutoscaleSettingsClientDeleteResponse struct { - // placeholder for future response values -} - -// AutoscaleSettingsClientGetResponse contains the response from method AutoscaleSettingsClient.Get. -type AutoscaleSettingsClientGetResponse struct { - AutoscaleSettingResource -} - -// AutoscaleSettingsClientListByResourceGroupResponse contains the response from method AutoscaleSettingsClient.ListByResourceGroup. -type AutoscaleSettingsClientListByResourceGroupResponse struct { - AutoscaleSettingResourceCollection -} - -// AutoscaleSettingsClientListBySubscriptionResponse contains the response from method AutoscaleSettingsClient.ListBySubscription. -type AutoscaleSettingsClientListBySubscriptionResponse struct { - AutoscaleSettingResourceCollection -} - -// AutoscaleSettingsClientUpdateResponse contains the response from method AutoscaleSettingsClient.Update. -type AutoscaleSettingsClientUpdateResponse struct { - AutoscaleSettingResource -} - -// BaselinesClientListResponse contains the response from method BaselinesClient.List. -type BaselinesClientListResponse struct { - MetricBaselinesResponse -} - -// DataCollectionEndpointsClientCreateResponse contains the response from method DataCollectionEndpointsClient.Create. -type DataCollectionEndpointsClientCreateResponse struct { - DataCollectionEndpointResource -} - -// DataCollectionEndpointsClientDeleteResponse contains the response from method DataCollectionEndpointsClient.Delete. -type DataCollectionEndpointsClientDeleteResponse struct { - // placeholder for future response values -} - -// DataCollectionEndpointsClientGetResponse contains the response from method DataCollectionEndpointsClient.Get. -type DataCollectionEndpointsClientGetResponse struct { - DataCollectionEndpointResource -} - -// DataCollectionEndpointsClientListByResourceGroupResponse contains the response from method DataCollectionEndpointsClient.ListByResourceGroup. -type DataCollectionEndpointsClientListByResourceGroupResponse struct { - DataCollectionEndpointResourceListResult -} - -// DataCollectionEndpointsClientListBySubscriptionResponse contains the response from method DataCollectionEndpointsClient.ListBySubscription. -type DataCollectionEndpointsClientListBySubscriptionResponse struct { - DataCollectionEndpointResourceListResult -} - -// DataCollectionEndpointsClientUpdateResponse contains the response from method DataCollectionEndpointsClient.Update. -type DataCollectionEndpointsClientUpdateResponse struct { - DataCollectionEndpointResource -} - -// DataCollectionRuleAssociationsClientCreateResponse contains the response from method DataCollectionRuleAssociationsClient.Create. -type DataCollectionRuleAssociationsClientCreateResponse struct { - DataCollectionRuleAssociationProxyOnlyResource -} - -// DataCollectionRuleAssociationsClientDeleteResponse contains the response from method DataCollectionRuleAssociationsClient.Delete. -type DataCollectionRuleAssociationsClientDeleteResponse struct { - // placeholder for future response values -} - -// DataCollectionRuleAssociationsClientGetResponse contains the response from method DataCollectionRuleAssociationsClient.Get. -type DataCollectionRuleAssociationsClientGetResponse struct { - DataCollectionRuleAssociationProxyOnlyResource -} - -// DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse contains the response from method DataCollectionRuleAssociationsClient.ListByDataCollectionEndpoint. -type DataCollectionRuleAssociationsClientListByDataCollectionEndpointResponse struct { - DataCollectionRuleAssociationProxyOnlyResourceListResult -} - -// DataCollectionRuleAssociationsClientListByResourceResponse contains the response from method DataCollectionRuleAssociationsClient.ListByResource. -type DataCollectionRuleAssociationsClientListByResourceResponse struct { - DataCollectionRuleAssociationProxyOnlyResourceListResult -} - -// DataCollectionRuleAssociationsClientListByRuleResponse contains the response from method DataCollectionRuleAssociationsClient.ListByRule. -type DataCollectionRuleAssociationsClientListByRuleResponse struct { - DataCollectionRuleAssociationProxyOnlyResourceListResult -} - -// DataCollectionRulesClientCreateResponse contains the response from method DataCollectionRulesClient.Create. -type DataCollectionRulesClientCreateResponse struct { - DataCollectionRuleResource -} - -// DataCollectionRulesClientDeleteResponse contains the response from method DataCollectionRulesClient.Delete. -type DataCollectionRulesClientDeleteResponse struct { - // placeholder for future response values -} - -// DataCollectionRulesClientGetResponse contains the response from method DataCollectionRulesClient.Get. -type DataCollectionRulesClientGetResponse struct { - DataCollectionRuleResource -} - -// DataCollectionRulesClientListByResourceGroupResponse contains the response from method DataCollectionRulesClient.ListByResourceGroup. -type DataCollectionRulesClientListByResourceGroupResponse struct { - DataCollectionRuleResourceListResult -} - -// DataCollectionRulesClientListBySubscriptionResponse contains the response from method DataCollectionRulesClient.ListBySubscription. -type DataCollectionRulesClientListBySubscriptionResponse struct { - DataCollectionRuleResourceListResult -} - -// DataCollectionRulesClientUpdateResponse contains the response from method DataCollectionRulesClient.Update. -type DataCollectionRulesClientUpdateResponse struct { - DataCollectionRuleResource -} - -// DiagnosticSettingsCategoryClientGetResponse contains the response from method DiagnosticSettingsCategoryClient.Get. -type DiagnosticSettingsCategoryClientGetResponse struct { - DiagnosticSettingsCategoryResource -} - -// DiagnosticSettingsCategoryClientListResponse contains the response from method DiagnosticSettingsCategoryClient.List. -type DiagnosticSettingsCategoryClientListResponse struct { - DiagnosticSettingsCategoryResourceCollection -} - -// DiagnosticSettingsClientCreateOrUpdateResponse contains the response from method DiagnosticSettingsClient.CreateOrUpdate. -type DiagnosticSettingsClientCreateOrUpdateResponse struct { - DiagnosticSettingsResource -} - -// DiagnosticSettingsClientDeleteResponse contains the response from method DiagnosticSettingsClient.Delete. -type DiagnosticSettingsClientDeleteResponse struct { - // placeholder for future response values -} - -// DiagnosticSettingsClientGetResponse contains the response from method DiagnosticSettingsClient.Get. -type DiagnosticSettingsClientGetResponse struct { - DiagnosticSettingsResource -} - -// DiagnosticSettingsClientListResponse contains the response from method DiagnosticSettingsClient.List. -type DiagnosticSettingsClientListResponse struct { - DiagnosticSettingsResourceCollection -} - -// EventCategoriesClientListResponse contains the response from method EventCategoriesClient.List. -type EventCategoriesClientListResponse struct { - EventCategoryCollection -} - -// LogProfilesClientCreateOrUpdateResponse contains the response from method LogProfilesClient.CreateOrUpdate. -type LogProfilesClientCreateOrUpdateResponse struct { - LogProfileResource -} - -// LogProfilesClientDeleteResponse contains the response from method LogProfilesClient.Delete. -type LogProfilesClientDeleteResponse struct { - // placeholder for future response values -} - -// LogProfilesClientGetResponse contains the response from method LogProfilesClient.Get. -type LogProfilesClientGetResponse struct { - LogProfileResource -} - -// LogProfilesClientListResponse contains the response from method LogProfilesClient.List. -type LogProfilesClientListResponse struct { - LogProfileCollection -} - -// LogProfilesClientUpdateResponse contains the response from method LogProfilesClient.Update. -type LogProfilesClientUpdateResponse struct { - LogProfileResource -} - -// MetricAlertsClientCreateOrUpdateResponse contains the response from method MetricAlertsClient.CreateOrUpdate. -type MetricAlertsClientCreateOrUpdateResponse struct { - MetricAlertResource -} - -// MetricAlertsClientDeleteResponse contains the response from method MetricAlertsClient.Delete. -type MetricAlertsClientDeleteResponse struct { - // placeholder for future response values -} - -// MetricAlertsClientGetResponse contains the response from method MetricAlertsClient.Get. -type MetricAlertsClientGetResponse struct { - MetricAlertResource -} - -// MetricAlertsClientListByResourceGroupResponse contains the response from method MetricAlertsClient.ListByResourceGroup. -type MetricAlertsClientListByResourceGroupResponse struct { - MetricAlertResourceCollection -} - -// MetricAlertsClientListBySubscriptionResponse contains the response from method MetricAlertsClient.ListBySubscription. -type MetricAlertsClientListBySubscriptionResponse struct { - MetricAlertResourceCollection -} - -// MetricAlertsClientUpdateResponse contains the response from method MetricAlertsClient.Update. -type MetricAlertsClientUpdateResponse struct { - MetricAlertResource -} - -// MetricAlertsStatusClientListByNameResponse contains the response from method MetricAlertsStatusClient.ListByName. -type MetricAlertsStatusClientListByNameResponse struct { - MetricAlertStatusCollection -} - -// MetricAlertsStatusClientListResponse contains the response from method MetricAlertsStatusClient.List. -type MetricAlertsStatusClientListResponse struct { - MetricAlertStatusCollection -} - -// MetricDefinitionsClientListResponse contains the response from method MetricDefinitionsClient.List. -type MetricDefinitionsClientListResponse struct { - MetricDefinitionCollection -} - -// MetricNamespacesClientListResponse contains the response from method MetricNamespacesClient.List. -type MetricNamespacesClientListResponse struct { - MetricNamespaceCollection -} - -// MetricsClientListResponse contains the response from method MetricsClient.List. -type MetricsClientListResponse struct { - Response -} - -// OperationsClientListResponse contains the response from method OperationsClient.List. -type OperationsClientListResponse struct { - OperationListResult -} - -// PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate. -type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { - PrivateEndpointConnection -} - -// PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete. -type PrivateEndpointConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. -type PrivateEndpointConnectionsClientGetResponse struct { - PrivateEndpointConnection -} - -// PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse contains the response from method PrivateEndpointConnectionsClient.ListByPrivateLinkScope. -type PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse struct { - PrivateEndpointConnectionListResult -} - -// PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get. -type PrivateLinkResourcesClientGetResponse struct { - PrivateLinkResource -} - -// PrivateLinkResourcesClientListByPrivateLinkScopeResponse contains the response from method PrivateLinkResourcesClient.ListByPrivateLinkScope. -type PrivateLinkResourcesClientListByPrivateLinkScopeResponse struct { - PrivateLinkResourceListResult -} - -// PrivateLinkScopeOperationStatusClientGetResponse contains the response from method PrivateLinkScopeOperationStatusClient.Get. -type PrivateLinkScopeOperationStatusClientGetResponse struct { - OperationStatus -} - -// PrivateLinkScopedResourcesClientCreateOrUpdateResponse contains the response from method PrivateLinkScopedResourcesClient.CreateOrUpdate. -type PrivateLinkScopedResourcesClientCreateOrUpdateResponse struct { - ScopedResource -} - -// PrivateLinkScopedResourcesClientDeleteResponse contains the response from method PrivateLinkScopedResourcesClient.Delete. -type PrivateLinkScopedResourcesClientDeleteResponse struct { - // placeholder for future response values -} - -// PrivateLinkScopedResourcesClientGetResponse contains the response from method PrivateLinkScopedResourcesClient.Get. -type PrivateLinkScopedResourcesClientGetResponse struct { - ScopedResource -} - -// PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse contains the response from method PrivateLinkScopedResourcesClient.ListByPrivateLinkScope. -type PrivateLinkScopedResourcesClientListByPrivateLinkScopeResponse struct { - ScopedResourceListResult -} - -// PrivateLinkScopesClientCreateOrUpdateResponse contains the response from method PrivateLinkScopesClient.CreateOrUpdate. -type PrivateLinkScopesClientCreateOrUpdateResponse struct { - AzureMonitorPrivateLinkScope -} - -// PrivateLinkScopesClientDeleteResponse contains the response from method PrivateLinkScopesClient.Delete. -type PrivateLinkScopesClientDeleteResponse struct { - // placeholder for future response values -} - -// PrivateLinkScopesClientGetResponse contains the response from method PrivateLinkScopesClient.Get. -type PrivateLinkScopesClientGetResponse struct { - AzureMonitorPrivateLinkScope -} - -// PrivateLinkScopesClientListByResourceGroupResponse contains the response from method PrivateLinkScopesClient.ListByResourceGroup. -type PrivateLinkScopesClientListByResourceGroupResponse struct { - AzureMonitorPrivateLinkScopeListResult -} - -// PrivateLinkScopesClientListResponse contains the response from method PrivateLinkScopesClient.List. -type PrivateLinkScopesClientListResponse struct { - AzureMonitorPrivateLinkScopeListResult -} - -// PrivateLinkScopesClientUpdateTagsResponse contains the response from method PrivateLinkScopesClient.UpdateTags. -type PrivateLinkScopesClientUpdateTagsResponse struct { - AzureMonitorPrivateLinkScope -} - -// ScheduledQueryRulesClientCreateOrUpdateResponse contains the response from method ScheduledQueryRulesClient.CreateOrUpdate. -type ScheduledQueryRulesClientCreateOrUpdateResponse struct { - LogSearchRuleResource -} - -// ScheduledQueryRulesClientDeleteResponse contains the response from method ScheduledQueryRulesClient.Delete. -type ScheduledQueryRulesClientDeleteResponse struct { - // placeholder for future response values -} - -// ScheduledQueryRulesClientGetResponse contains the response from method ScheduledQueryRulesClient.Get. -type ScheduledQueryRulesClientGetResponse struct { - LogSearchRuleResource -} - -// ScheduledQueryRulesClientListByResourceGroupResponse contains the response from method ScheduledQueryRulesClient.ListByResourceGroup. -type ScheduledQueryRulesClientListByResourceGroupResponse struct { - LogSearchRuleResourceCollection -} - -// ScheduledQueryRulesClientListBySubscriptionResponse contains the response from method ScheduledQueryRulesClient.ListBySubscription. -type ScheduledQueryRulesClientListBySubscriptionResponse struct { - LogSearchRuleResourceCollection -} - -// ScheduledQueryRulesClientUpdateResponse contains the response from method ScheduledQueryRulesClient.Update. -type ScheduledQueryRulesClientUpdateResponse struct { - LogSearchRuleResource -} - -// TenantActivityLogsClientListResponse contains the response from method TenantActivityLogsClient.List. -type TenantActivityLogsClientListResponse struct { - EventDataCollection -} - -// VMInsightsClientGetOnboardingStatusResponse contains the response from method VMInsightsClient.GetOnboardingStatus. -type VMInsightsClientGetOnboardingStatusResponse struct { - VMInsightsOnboardingStatus -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_scheduledqueryrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_scheduledqueryrules_client.go deleted file mode 100644 index 9deac65a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_scheduledqueryrules_client.go +++ /dev/null @@ -1,394 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ScheduledQueryRulesClient contains the methods for the ScheduledQueryRules group. -// Don't use this type directly, use NewScheduledQueryRulesClient() instead. -type ScheduledQueryRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewScheduledQueryRulesClient creates a new instance of ScheduledQueryRulesClient with the specified values. -// subscriptionID - The ID of the target subscription. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewScheduledQueryRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScheduledQueryRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ScheduledQueryRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates an log search rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-04-16 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// parameters - The parameters of the rule to create or update. -// options - ScheduledQueryRulesClientCreateOrUpdateOptions contains the optional parameters for the ScheduledQueryRulesClient.CreateOrUpdate -// method. -func (client *ScheduledQueryRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ruleName string, parameters LogSearchRuleResource, options *ScheduledQueryRulesClientCreateOrUpdateOptions) (ScheduledQueryRulesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ruleName, parameters, options) - if err != nil { - return ScheduledQueryRulesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScheduledQueryRulesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ScheduledQueryRulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ScheduledQueryRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, parameters LogSearchRuleResource, options *ScheduledQueryRulesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-04-16") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ScheduledQueryRulesClient) createOrUpdateHandleResponse(resp *http.Response) (ScheduledQueryRulesClientCreateOrUpdateResponse, error) { - result := ScheduledQueryRulesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogSearchRuleResource); err != nil { - return ScheduledQueryRulesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes a Log Search rule -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-04-16 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// options - ScheduledQueryRulesClientDeleteOptions contains the optional parameters for the ScheduledQueryRulesClient.Delete -// method. -func (client *ScheduledQueryRulesClient) Delete(ctx context.Context, resourceGroupName string, ruleName string, options *ScheduledQueryRulesClientDeleteOptions) (ScheduledQueryRulesClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, ruleName, options) - if err != nil { - return ScheduledQueryRulesClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScheduledQueryRulesClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ScheduledQueryRulesClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ScheduledQueryRulesClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ScheduledQueryRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, options *ScheduledQueryRulesClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-04-16") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets an Log Search rule -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-04-16 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// options - ScheduledQueryRulesClientGetOptions contains the optional parameters for the ScheduledQueryRulesClient.Get method. -func (client *ScheduledQueryRulesClient) Get(ctx context.Context, resourceGroupName string, ruleName string, options *ScheduledQueryRulesClientGetOptions) (ScheduledQueryRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, ruleName, options) - if err != nil { - return ScheduledQueryRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScheduledQueryRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledQueryRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ScheduledQueryRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, options *ScheduledQueryRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-04-16") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ScheduledQueryRulesClient) getHandleResponse(resp *http.Response) (ScheduledQueryRulesClientGetResponse, error) { - result := ScheduledQueryRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogSearchRuleResource); err != nil { - return ScheduledQueryRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List the Log Search rules within a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-04-16 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - ScheduledQueryRulesClientListByResourceGroupOptions contains the optional parameters for the ScheduledQueryRulesClient.ListByResourceGroup -// method. -func (client *ScheduledQueryRulesClient) NewListByResourceGroupPager(resourceGroupName string, options *ScheduledQueryRulesClientListByResourceGroupOptions) *runtime.Pager[ScheduledQueryRulesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ScheduledQueryRulesClientListByResourceGroupResponse]{ - More: func(page ScheduledQueryRulesClientListByResourceGroupResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ScheduledQueryRulesClientListByResourceGroupResponse) (ScheduledQueryRulesClientListByResourceGroupResponse, error) { - req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - if err != nil { - return ScheduledQueryRulesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScheduledQueryRulesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledQueryRulesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ScheduledQueryRulesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ScheduledQueryRulesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-04-16") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ScheduledQueryRulesClient) listByResourceGroupHandleResponse(resp *http.Response) (ScheduledQueryRulesClientListByResourceGroupResponse, error) { - result := ScheduledQueryRulesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogSearchRuleResourceCollection); err != nil { - return ScheduledQueryRulesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - List the Log Search rules within a subscription group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-04-16 -// options - ScheduledQueryRulesClientListBySubscriptionOptions contains the optional parameters for the ScheduledQueryRulesClient.ListBySubscription -// method. -func (client *ScheduledQueryRulesClient) NewListBySubscriptionPager(options *ScheduledQueryRulesClientListBySubscriptionOptions) *runtime.Pager[ScheduledQueryRulesClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[ScheduledQueryRulesClientListBySubscriptionResponse]{ - More: func(page ScheduledQueryRulesClientListBySubscriptionResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ScheduledQueryRulesClientListBySubscriptionResponse) (ScheduledQueryRulesClientListBySubscriptionResponse, error) { - req, err := client.listBySubscriptionCreateRequest(ctx, options) - if err != nil { - return ScheduledQueryRulesClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScheduledQueryRulesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledQueryRulesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ScheduledQueryRulesClient) listBySubscriptionCreateRequest(ctx context.Context, options *ScheduledQueryRulesClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/scheduledQueryRules" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-04-16") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *ScheduledQueryRulesClient) listBySubscriptionHandleResponse(resp *http.Response) (ScheduledQueryRulesClientListBySubscriptionResponse, error) { - result := ScheduledQueryRulesClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogSearchRuleResourceCollection); err != nil { - return ScheduledQueryRulesClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Update log search Rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-04-16 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// ruleName - The name of the rule. -// parameters - The parameters of the rule to update. -// options - ScheduledQueryRulesClientUpdateOptions contains the optional parameters for the ScheduledQueryRulesClient.Update -// method. -func (client *ScheduledQueryRulesClient) Update(ctx context.Context, resourceGroupName string, ruleName string, parameters LogSearchRuleResourcePatch, options *ScheduledQueryRulesClientUpdateOptions) (ScheduledQueryRulesClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, ruleName, parameters, options) - if err != nil { - return ScheduledQueryRulesClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScheduledQueryRulesClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScheduledQueryRulesClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *ScheduledQueryRulesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, ruleName string, parameters LogSearchRuleResourcePatch, options *ScheduledQueryRulesClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-04-16") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateHandleResponse handles the Update response. -func (client *ScheduledQueryRulesClient) updateHandleResponse(resp *http.Response) (ScheduledQueryRulesClientUpdateResponse, error) { - result := ScheduledQueryRulesClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogSearchRuleResource); err != nil { - return ScheduledQueryRulesClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_tenantactivitylogs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_tenantactivitylogs_client.go deleted file mode 100644 index 93da1d89..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_tenantactivitylogs_client.go +++ /dev/null @@ -1,113 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// TenantActivityLogsClient contains the methods for the TenantActivityLogs group. -// Don't use this type directly, use NewTenantActivityLogsClient() instead. -type TenantActivityLogsClient struct { - host string - pl runtime.Pipeline -} - -// NewTenantActivityLogsClient creates a new instance of TenantActivityLogsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewTenantActivityLogsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*TenantActivityLogsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &TenantActivityLogsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Gets the Activity Logs for the Tenant. Everything that is applicable to the API to get the Activity Logs -// for the subscription is applicable to this API (the parameters, $filter, etc.). One thing to -// point out here is that this API does not retrieve the logs at the individual subscription of the tenant but only surfaces -// the logs that were generated at the tenant level. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2015-04-01 -// options - TenantActivityLogsClientListOptions contains the optional parameters for the TenantActivityLogsClient.List method. -func (client *TenantActivityLogsClient) NewListPager(options *TenantActivityLogsClientListOptions) *runtime.Pager[TenantActivityLogsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[TenantActivityLogsClientListResponse]{ - More: func(page TenantActivityLogsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *TenantActivityLogsClientListResponse) (TenantActivityLogsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TenantActivityLogsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return TenantActivityLogsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TenantActivityLogsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *TenantActivityLogsClient) listCreateRequest(ctx context.Context, options *TenantActivityLogsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Insights/eventtypes/management/values" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2015-04-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.Select != nil { - reqQP.Set("$select", *options.Select) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *TenantActivityLogsClient) listHandleResponse(resp *http.Response) (TenantActivityLogsClientListResponse, error) { - result := TenantActivityLogsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EventDataCollection); err != nil { - return TenantActivityLogsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_time_rfc3339.go deleted file mode 100644 index f96c0a22..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_time_rfc3339.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_vminsights_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_vminsights_client.go deleted file mode 100644 index f9694cad..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/zz_generated_vminsights_client.go +++ /dev/null @@ -1,95 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmonitor - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "strings" -) - -// VMInsightsClient contains the methods for the VMInsights group. -// Don't use this type directly, use NewVMInsightsClient() instead. -type VMInsightsClient struct { - host string - pl runtime.Pipeline -} - -// NewVMInsightsClient creates a new instance of VMInsightsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVMInsightsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*VMInsightsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VMInsightsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// GetOnboardingStatus - Retrieves the VM Insights onboarding status for the specified resource or resource scope. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-11-27-preview -// resourceURI - The fully qualified Azure Resource manager identifier of the resource, or scope, whose status to retrieve. -// options - VMInsightsClientGetOnboardingStatusOptions contains the optional parameters for the VMInsightsClient.GetOnboardingStatus -// method. -func (client *VMInsightsClient) GetOnboardingStatus(ctx context.Context, resourceURI string, options *VMInsightsClientGetOnboardingStatusOptions) (VMInsightsClientGetOnboardingStatusResponse, error) { - req, err := client.getOnboardingStatusCreateRequest(ctx, resourceURI, options) - if err != nil { - return VMInsightsClientGetOnboardingStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VMInsightsClientGetOnboardingStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VMInsightsClientGetOnboardingStatusResponse{}, runtime.NewResponseError(resp) - } - return client.getOnboardingStatusHandleResponse(resp) -} - -// getOnboardingStatusCreateRequest creates the GetOnboardingStatus request. -func (client *VMInsightsClient) getOnboardingStatusCreateRequest(ctx context.Context, resourceURI string, options *VMInsightsClientGetOnboardingStatusOptions) (*policy.Request, error) { - urlPath := "/{resourceUri}/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default" - urlPath = strings.ReplaceAll(urlPath, "{resourceUri}", resourceURI) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-11-27-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getOnboardingStatusHandleResponse handles the GetOnboardingStatus response. -func (client *VMInsightsClient) getOnboardingStatusHandleResponse(resp *http.Response) (VMInsightsClientGetOnboardingStatusResponse, error) { - result := VMInsightsClientGetOnboardingStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VMInsightsOnboardingStatus); err != nil { - return VMInsightsClientGetOnboardingStatusResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md deleted file mode 100644 index bf64b84b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/CHANGELOG.md +++ /dev/null @@ -1,1739 +0,0 @@ -# Release History - -## 1.0.0 (2022-05-18) -### Breaking Changes - -- Function `*SnapshotsClient.BeginRestoreFiles` return value(s) have been changed from `(*armruntime.Poller[SnapshotsClientRestoreFilesResponse], error)` to `(*runtime.Poller[SnapshotsClientRestoreFilesResponse], error)` -- Function `*SubvolumesClient.BeginGetMetadata` return value(s) have been changed from `(*armruntime.Poller[SubvolumesClientGetMetadataResponse], error)` to `(*runtime.Poller[SubvolumesClientGetMetadataResponse], error)` -- Function `*PoolsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[PoolsClientDeleteResponse], error)` to `(*runtime.Poller[PoolsClientDeleteResponse], error)` -- Function `*VolumesClient.BeginPoolChange` return value(s) have been changed from `(*armruntime.Poller[VolumesClientPoolChangeResponse], error)` to `(*runtime.Poller[VolumesClientPoolChangeResponse], error)` -- Function `*SnapshotsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[SnapshotsClientDeleteResponse], error)` to `(*runtime.Poller[SnapshotsClientDeleteResponse], error)` -- Function `*VolumesClient.BeginAuthorizeReplication` return value(s) have been changed from `(*armruntime.Poller[VolumesClientAuthorizeReplicationResponse], error)` to `(*runtime.Poller[VolumesClientAuthorizeReplicationResponse], error)` -- Function `*VolumeGroupsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[VolumeGroupsClientDeleteResponse], error)` to `(*runtime.Poller[VolumeGroupsClientDeleteResponse], error)` -- Function `*VolumesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[VolumesClientDeleteResponse], error)` to `(*runtime.Poller[VolumesClientDeleteResponse], error)` -- Function `*SubvolumesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[SubvolumesClientDeleteResponse], error)` to `(*runtime.Poller[SubvolumesClientDeleteResponse], error)` -- Function `*VolumesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[VolumesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[VolumesClientCreateOrUpdateResponse], error)` -- Function `*AccountsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[AccountsClientDeleteResponse], error)` to `(*runtime.Poller[AccountsClientDeleteResponse], error)` -- Function `*BackupPoliciesClient.BeginCreate` return value(s) have been changed from `(*armruntime.Poller[BackupPoliciesClientCreateResponse], error)` to `(*runtime.Poller[BackupPoliciesClientCreateResponse], error)` -- Function `*SnapshotsClient.BeginCreate` return value(s) have been changed from `(*armruntime.Poller[SnapshotsClientCreateResponse], error)` to `(*runtime.Poller[SnapshotsClientCreateResponse], error)` -- Function `*BackupsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[BackupsClientUpdateResponse], error)` to `(*runtime.Poller[BackupsClientUpdateResponse], error)` -- Function `*VolumesClient.BeginBreakReplication` return value(s) have been changed from `(*armruntime.Poller[VolumesClientBreakReplicationResponse], error)` to `(*runtime.Poller[VolumesClientBreakReplicationResponse], error)` -- Function `*SubvolumesClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[SubvolumesClientUpdateResponse], error)` to `(*runtime.Poller[SubvolumesClientUpdateResponse], error)` -- Function `*BackupsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[BackupsClientDeleteResponse], error)` to `(*runtime.Poller[BackupsClientDeleteResponse], error)` -- Function `*VolumesClient.BeginReInitializeReplication` return value(s) have been changed from `(*armruntime.Poller[VolumesClientReInitializeReplicationResponse], error)` to `(*runtime.Poller[VolumesClientReInitializeReplicationResponse], error)` -- Function `*SnapshotPoliciesClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[SnapshotPoliciesClientUpdateResponse], error)` to `(*runtime.Poller[SnapshotPoliciesClientUpdateResponse], error)` -- Function `*BackupPoliciesClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[BackupPoliciesClientUpdateResponse], error)` to `(*runtime.Poller[BackupPoliciesClientUpdateResponse], error)` -- Function `*VolumesClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[VolumesClientUpdateResponse], error)` to `(*runtime.Poller[VolumesClientUpdateResponse], error)` -- Function `*PoolsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[PoolsClientUpdateResponse], error)` to `(*runtime.Poller[PoolsClientUpdateResponse], error)` -- Function `*BackupsClient.BeginCreate` return value(s) have been changed from `(*armruntime.Poller[BackupsClientCreateResponse], error)` to `(*runtime.Poller[BackupsClientCreateResponse], error)` -- Function `*BackupPoliciesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[BackupPoliciesClientDeleteResponse], error)` to `(*runtime.Poller[BackupPoliciesClientDeleteResponse], error)` -- Function `*PoolsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[PoolsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[PoolsClientCreateOrUpdateResponse], error)` -- Function `*AccountsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[AccountsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[AccountsClientCreateOrUpdateResponse], error)` -- Function `*VolumesClient.BeginResyncReplication` return value(s) have been changed from `(*armruntime.Poller[VolumesClientResyncReplicationResponse], error)` to `(*runtime.Poller[VolumesClientResyncReplicationResponse], error)` -- Function `*AccountsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[AccountsClientUpdateResponse], error)` to `(*runtime.Poller[AccountsClientUpdateResponse], error)` -- Function `*VolumesClient.BeginDeleteReplication` return value(s) have been changed from `(*armruntime.Poller[VolumesClientDeleteReplicationResponse], error)` to `(*runtime.Poller[VolumesClientDeleteReplicationResponse], error)` -- Function `*AccountBackupsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[AccountBackupsClientDeleteResponse], error)` to `(*runtime.Poller[AccountBackupsClientDeleteResponse], error)` -- Function `*SnapshotPoliciesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[SnapshotPoliciesClientDeleteResponse], error)` to `(*runtime.Poller[SnapshotPoliciesClientDeleteResponse], error)` -- Function `*SnapshotsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[SnapshotsClientUpdateResponse], error)` to `(*runtime.Poller[SnapshotsClientUpdateResponse], error)` -- Function `*VolumesClient.BeginRevert` return value(s) have been changed from `(*armruntime.Poller[VolumesClientRevertResponse], error)` to `(*runtime.Poller[VolumesClientRevertResponse], error)` -- Function `*VolumeGroupsClient.BeginCreate` return value(s) have been changed from `(*armruntime.Poller[VolumeGroupsClientCreateResponse], error)` to `(*runtime.Poller[VolumeGroupsClientCreateResponse], error)` -- Function `*SubvolumesClient.BeginCreate` return value(s) have been changed from `(*armruntime.Poller[SubvolumesClientCreateResponse], error)` to `(*runtime.Poller[SubvolumesClientCreateResponse], error)` -- Function `SnapshotsList.MarshalJSON` has been removed -- Function `BackupPolicyDetails.MarshalJSON` has been removed -- Function `AccountList.MarshalJSON` has been removed -- Function `SnapshotPoliciesList.MarshalJSON` has been removed -- Function `ServiceSpecification.MarshalJSON` has been removed -- Function `MetricSpecification.MarshalJSON` has been removed -- Function `SnapshotPolicyVolumeList.MarshalJSON` has been removed -- Function `BackupsList.MarshalJSON` has been removed -- Function `VolumeGroup.MarshalJSON` has been removed -- Function `BackupPoliciesList.MarshalJSON` has been removed -- Function `SubvolumesList.MarshalJSON` has been removed -- Function `SnapshotPolicyDetails.MarshalJSON` has been removed -- Function `CapacityPoolList.MarshalJSON` has been removed -- Function `OperationListResult.MarshalJSON` has been removed -- Function `VaultList.MarshalJSON` has been removed -- Function `VolumeGroupList.MarshalJSON` has been removed -- Function `SubscriptionQuotaItemList.MarshalJSON` has been removed -- Function `VolumeList.MarshalJSON` has been removed -- Function `MountTarget.MarshalJSON` has been removed -- Function `SubvolumeModelProperties.MarshalJSON` has been removed - - -## 0.4.0 (2022-04-18) -### Breaking Changes - -- Function `*SnapshotPoliciesClient.List` has been removed -- Function `*AccountBackupsClient.List` has been removed -- Function `*VolumeGroupsClient.ListByNetAppAccount` has been removed -- Function `*VolumesClient.List` has been removed -- Function `*AccountsClient.List` has been removed -- Function `*BackupsClient.List` has been removed -- Function `*ResourceQuotaLimitsClient.List` has been removed -- Function `*SnapshotsClient.List` has been removed -- Function `*AccountsClient.ListBySubscription` has been removed -- Function `*OperationsClient.List` has been removed -- Function `*PoolsClient.List` has been removed -- Function `*BackupPoliciesClient.List` has been removed -- Function `*SubvolumesClient.ListByVolume` has been removed -- Function `*VaultsClient.List` has been removed - -### Features Added - -- New function `*SnapshotPoliciesClient.NewListPager(string, string, *SnapshotPoliciesClientListOptions) *runtime.Pager[SnapshotPoliciesClientListResponse]` -- New function `*SnapshotsClient.NewListPager(string, string, string, string, *SnapshotsClientListOptions) *runtime.Pager[SnapshotsClientListResponse]` -- New function `*AccountsClient.NewListBySubscriptionPager(*AccountsClientListBySubscriptionOptions) *runtime.Pager[AccountsClientListBySubscriptionResponse]` -- New function `*VaultsClient.NewListPager(string, string, *VaultsClientListOptions) *runtime.Pager[VaultsClientListResponse]` -- New function `*VolumesClient.NewListPager(string, string, string, *VolumesClientListOptions) *runtime.Pager[VolumesClientListResponse]` -- New function `*BackupsClient.NewListPager(string, string, string, string, *BackupsClientListOptions) *runtime.Pager[BackupsClientListResponse]` -- New function `*SubvolumesClient.NewListByVolumePager(string, string, string, string, *SubvolumesClientListByVolumeOptions) *runtime.Pager[SubvolumesClientListByVolumeResponse]` -- New function `*ResourceQuotaLimitsClient.NewListPager(string, *ResourceQuotaLimitsClientListOptions) *runtime.Pager[ResourceQuotaLimitsClientListResponse]` -- New function `*AccountsClient.NewListPager(string, *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse]` -- New function `*PoolsClient.NewListPager(string, string, *PoolsClientListOptions) *runtime.Pager[PoolsClientListResponse]` -- New function `*OperationsClient.NewListPager(*OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]` -- New function `*VolumeGroupsClient.NewListByNetAppAccountPager(string, string, *VolumeGroupsClientListByNetAppAccountOptions) *runtime.Pager[VolumeGroupsClientListByNetAppAccountResponse]` -- New function `*BackupPoliciesClient.NewListPager(string, string, *BackupPoliciesClientListOptions) *runtime.Pager[BackupPoliciesClientListResponse]` -- New function `*AccountBackupsClient.NewListPager(string, string, *AccountBackupsClientListOptions) *runtime.Pager[AccountBackupsClientListResponse]` - - -## 0.3.0 (2022-04-12) -### Breaking Changes - -- Function `*VolumeGroupsClient.ListByNetAppAccount` parameter(s) have been changed from `(context.Context, string, string, *VolumeGroupsClientListByNetAppAccountOptions)` to `(string, string, *VolumeGroupsClientListByNetAppAccountOptions)` -- Function `*VolumeGroupsClient.ListByNetAppAccount` return value(s) have been changed from `(VolumeGroupsClientListByNetAppAccountResponse, error)` to `(*runtime.Pager[VolumeGroupsClientListByNetAppAccountResponse])` -- Function `*SnapshotPoliciesClient.List` parameter(s) have been changed from `(context.Context, string, string, *SnapshotPoliciesClientListOptions)` to `(string, string, *SnapshotPoliciesClientListOptions)` -- Function `*SnapshotPoliciesClient.List` return value(s) have been changed from `(SnapshotPoliciesClientListResponse, error)` to `(*runtime.Pager[SnapshotPoliciesClientListResponse])` -- Function `*VolumesClient.BeginCreateOrUpdate` return value(s) have been changed from `(VolumesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VolumesClientCreateOrUpdateResponse], error)` -- Function `*SnapshotsClient.List` parameter(s) have been changed from `(context.Context, string, string, string, string, *SnapshotsClientListOptions)` to `(string, string, string, string, *SnapshotsClientListOptions)` -- Function `*SnapshotsClient.List` return value(s) have been changed from `(SnapshotsClientListResponse, error)` to `(*runtime.Pager[SnapshotsClientListResponse])` -- Function `*SnapshotPoliciesClient.BeginDelete` return value(s) have been changed from `(SnapshotPoliciesClientDeletePollerResponse, error)` to `(*armruntime.Poller[SnapshotPoliciesClientDeleteResponse], error)` -- Function `*PoolsClient.BeginDelete` return value(s) have been changed from `(PoolsClientDeletePollerResponse, error)` to `(*armruntime.Poller[PoolsClientDeleteResponse], error)` -- Function `*AccountBackupsClient.List` parameter(s) have been changed from `(context.Context, string, string, *AccountBackupsClientListOptions)` to `(string, string, *AccountBackupsClientListOptions)` -- Function `*AccountBackupsClient.List` return value(s) have been changed from `(AccountBackupsClientListResponse, error)` to `(*runtime.Pager[AccountBackupsClientListResponse])` -- Function `*PoolsClient.BeginCreateOrUpdate` return value(s) have been changed from `(PoolsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[PoolsClientCreateOrUpdateResponse], error)` -- Function `*VolumesClient.BeginDelete` return value(s) have been changed from `(VolumesClientDeletePollerResponse, error)` to `(*armruntime.Poller[VolumesClientDeleteResponse], error)` -- Function `*OperationsClient.List` parameter(s) have been changed from `(context.Context, *OperationsClientListOptions)` to `(*OperationsClientListOptions)` -- Function `*OperationsClient.List` return value(s) have been changed from `(OperationsClientListResponse, error)` to `(*runtime.Pager[OperationsClientListResponse])` -- Function `NewBackupsClient` return value(s) have been changed from `(*BackupsClient)` to `(*BackupsClient, error)` -- Function `NewSnapshotsClient` return value(s) have been changed from `(*SnapshotsClient)` to `(*SnapshotsClient, error)` -- Function `*BackupsClient.BeginUpdate` return value(s) have been changed from `(BackupsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[BackupsClientUpdateResponse], error)` -- Function `*SnapshotsClient.BeginCreate` return value(s) have been changed from `(SnapshotsClientCreatePollerResponse, error)` to `(*armruntime.Poller[SnapshotsClientCreateResponse], error)` -- Function `*AccountsClient.BeginUpdate` return value(s) have been changed from `(AccountsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[AccountsClientUpdateResponse], error)` -- Function `*VolumesClient.BeginBreakReplication` return value(s) have been changed from `(VolumesClientBreakReplicationPollerResponse, error)` to `(*armruntime.Poller[VolumesClientBreakReplicationResponse], error)` -- Function `*SnapshotsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, string, map[string]interface{}, *SnapshotsClientBeginUpdateOptions)` to `(context.Context, string, string, string, string, string, interface{}, *SnapshotsClientBeginUpdateOptions)` -- Function `*SnapshotsClient.BeginUpdate` return value(s) have been changed from `(SnapshotsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[SnapshotsClientUpdateResponse], error)` -- Function `*AccountsClient.List` return value(s) have been changed from `(*AccountsClientListPager)` to `(*runtime.Pager[AccountsClientListResponse])` -- Function `*VolumesClient.BeginRevert` return value(s) have been changed from `(VolumesClientRevertPollerResponse, error)` to `(*armruntime.Poller[VolumesClientRevertResponse], error)` -- Function `*AccountsClient.BeginCreateOrUpdate` return value(s) have been changed from `(AccountsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[AccountsClientCreateOrUpdateResponse], error)` -- Function `*VolumesClient.BeginDeleteReplication` return value(s) have been changed from `(VolumesClientDeleteReplicationPollerResponse, error)` to `(*armruntime.Poller[VolumesClientDeleteReplicationResponse], error)` -- Function `*BackupPoliciesClient.BeginCreate` return value(s) have been changed from `(BackupPoliciesClientCreatePollerResponse, error)` to `(*armruntime.Poller[BackupPoliciesClientCreateResponse], error)` -- Function `*AccountBackupsClient.BeginDelete` return value(s) have been changed from `(AccountBackupsClientDeletePollerResponse, error)` to `(*armruntime.Poller[AccountBackupsClientDeleteResponse], error)` -- Function `NewOperationsClient` return value(s) have been changed from `(*OperationsClient)` to `(*OperationsClient, error)` -- Function `NewResourceClient` return value(s) have been changed from `(*ResourceClient)` to `(*ResourceClient, error)` -- Function `*VolumesClient.BeginReInitializeReplication` return value(s) have been changed from `(VolumesClientReInitializeReplicationPollerResponse, error)` to `(*armruntime.Poller[VolumesClientReInitializeReplicationResponse], error)` -- Function `NewSnapshotPoliciesClient` return value(s) have been changed from `(*SnapshotPoliciesClient)` to `(*SnapshotPoliciesClient, error)` -- Function `*PoolsClient.BeginUpdate` return value(s) have been changed from `(PoolsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[PoolsClientUpdateResponse], error)` -- Function `*VolumeGroupsClient.BeginDelete` return value(s) have been changed from `(VolumeGroupsClientDeletePollerResponse, error)` to `(*armruntime.Poller[VolumeGroupsClientDeleteResponse], error)` -- Function `*SnapshotsClient.BeginDelete` return value(s) have been changed from `(SnapshotsClientDeletePollerResponse, error)` to `(*armruntime.Poller[SnapshotsClientDeleteResponse], error)` -- Function `*VolumesClient.List` return value(s) have been changed from `(*VolumesClientListPager)` to `(*runtime.Pager[VolumesClientListResponse])` -- Function `*AccountsClient.BeginDelete` return value(s) have been changed from `(AccountsClientDeletePollerResponse, error)` to `(*armruntime.Poller[AccountsClientDeleteResponse], error)` -- Function `*BackupPoliciesClient.BeginUpdate` return value(s) have been changed from `(BackupPoliciesClientUpdatePollerResponse, error)` to `(*armruntime.Poller[BackupPoliciesClientUpdateResponse], error)` -- Function `*BackupPoliciesClient.BeginDelete` return value(s) have been changed from `(BackupPoliciesClientDeletePollerResponse, error)` to `(*armruntime.Poller[BackupPoliciesClientDeleteResponse], error)` -- Function `*VolumesClient.BeginAuthorizeReplication` return value(s) have been changed from `(VolumesClientAuthorizeReplicationPollerResponse, error)` to `(*armruntime.Poller[VolumesClientAuthorizeReplicationResponse], error)` -- Function `*BackupsClient.BeginDelete` return value(s) have been changed from `(BackupsClientDeletePollerResponse, error)` to `(*armruntime.Poller[BackupsClientDeleteResponse], error)` -- Function `*VolumesClient.BeginResyncReplication` return value(s) have been changed from `(VolumesClientResyncReplicationPollerResponse, error)` to `(*armruntime.Poller[VolumesClientResyncReplicationResponse], error)` -- Function `NewVolumesClient` return value(s) have been changed from `(*VolumesClient)` to `(*VolumesClient, error)` -- Function `NewVaultsClient` return value(s) have been changed from `(*VaultsClient)` to `(*VaultsClient, error)` -- Function `*VolumeGroupsClient.BeginCreate` return value(s) have been changed from `(VolumeGroupsClientCreatePollerResponse, error)` to `(*armruntime.Poller[VolumeGroupsClientCreateResponse], error)` -- Function `*BackupsClient.List` parameter(s) have been changed from `(context.Context, string, string, string, string, *BackupsClientListOptions)` to `(string, string, string, string, *BackupsClientListOptions)` -- Function `*BackupsClient.List` return value(s) have been changed from `(BackupsClientListResponse, error)` to `(*runtime.Pager[BackupsClientListResponse])` -- Function `*BackupPoliciesClient.List` parameter(s) have been changed from `(context.Context, string, string, *BackupPoliciesClientListOptions)` to `(string, string, *BackupPoliciesClientListOptions)` -- Function `*BackupPoliciesClient.List` return value(s) have been changed from `(BackupPoliciesClientListResponse, error)` to `(*runtime.Pager[BackupPoliciesClientListResponse])` -- Function `NewVolumeGroupsClient` return value(s) have been changed from `(*VolumeGroupsClient)` to `(*VolumeGroupsClient, error)` -- Function `*AccountsClient.ListBySubscription` return value(s) have been changed from `(*AccountsClientListBySubscriptionPager)` to `(*runtime.Pager[AccountsClientListBySubscriptionResponse])` -- Function `*VolumesClient.BeginUpdate` return value(s) have been changed from `(VolumesClientUpdatePollerResponse, error)` to `(*armruntime.Poller[VolumesClientUpdateResponse], error)` -- Function `NewAccountBackupsClient` return value(s) have been changed from `(*AccountBackupsClient)` to `(*AccountBackupsClient, error)` -- Function `NewAccountsClient` return value(s) have been changed from `(*AccountsClient)` to `(*AccountsClient, error)` -- Function `NewResourceQuotaLimitsClient` return value(s) have been changed from `(*ResourceQuotaLimitsClient)` to `(*ResourceQuotaLimitsClient, error)` -- Function `NewPoolsClient` return value(s) have been changed from `(*PoolsClient)` to `(*PoolsClient, error)` -- Function `*VolumesClient.BeginPoolChange` return value(s) have been changed from `(VolumesClientPoolChangePollerResponse, error)` to `(*armruntime.Poller[VolumesClientPoolChangeResponse], error)` -- Function `NewBackupPoliciesClient` return value(s) have been changed from `(*BackupPoliciesClient)` to `(*BackupPoliciesClient, error)` -- Function `*PoolsClient.List` return value(s) have been changed from `(*PoolsClientListPager)` to `(*runtime.Pager[PoolsClientListResponse])` -- Function `*BackupsClient.BeginCreate` return value(s) have been changed from `(BackupsClientCreatePollerResponse, error)` to `(*armruntime.Poller[BackupsClientCreateResponse], error)` -- Function `*ResourceQuotaLimitsClient.List` parameter(s) have been changed from `(context.Context, string, *ResourceQuotaLimitsClientListOptions)` to `(string, *ResourceQuotaLimitsClientListOptions)` -- Function `*ResourceQuotaLimitsClient.List` return value(s) have been changed from `(ResourceQuotaLimitsClientListResponse, error)` to `(*runtime.Pager[ResourceQuotaLimitsClientListResponse])` -- Function `*SnapshotPoliciesClient.BeginUpdate` return value(s) have been changed from `(SnapshotPoliciesClientUpdatePollerResponse, error)` to `(*armruntime.Poller[SnapshotPoliciesClientUpdateResponse], error)` -- Function `*VaultsClient.List` parameter(s) have been changed from `(context.Context, string, string, *VaultsClientListOptions)` to `(string, string, *VaultsClientListOptions)` -- Function `*VaultsClient.List` return value(s) have been changed from `(VaultsClientListResponse, error)` to `(*runtime.Pager[VaultsClientListResponse])` -- Function `*PoolsClientUpdatePoller.Done` has been removed -- Function `*BackupPoliciesClientUpdatePoller.Poll` has been removed -- Function `ActiveDirectoryStatus.ToPtr` has been removed -- Function `*BackupsClientCreatePoller.Done` has been removed -- Function `*SnapshotsClientUpdatePoller.Done` has been removed -- Function `*VolumesClientRevertPoller.Poll` has been removed -- Function `*VolumesClientReInitializeReplicationPoller.Poll` has been removed -- Function `*AccountsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*VolumesClientResyncReplicationPoller.Poll` has been removed -- Function `*VolumesClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*VolumesClientDeletePoller.ResumeToken` has been removed -- Function `*VolumesClientResyncReplicationPoller.ResumeToken` has been removed -- Function `*SnapshotPoliciesClientUpdatePoller.Done` has been removed -- Function `*AccountsClientCreateOrUpdatePoller.Poll` has been removed -- Function `CheckNameResourceTypes.ToPtr` has been removed -- Function `VolumesClientRevertPollerResponse.PollUntilDone` has been removed -- Function `*PoolsClientUpdatePoller.ResumeToken` has been removed -- Function `*SnapshotsClientDeletePoller.ResumeToken` has been removed -- Function `*SnapshotsClientDeletePollerResponse.Resume` has been removed -- Function `*VolumeGroupsClientCreatePoller.FinalResponse` has been removed -- Function `BackupPoliciesClientCreatePollerResponse.PollUntilDone` has been removed -- Function `*PoolsClientDeletePoller.FinalResponse` has been removed -- Function `*PoolsClientCreateOrUpdatePoller.Done` has been removed -- Function `*AccountsClientListPager.NextPage` has been removed -- Function `*BackupPoliciesClientCreatePoller.ResumeToken` has been removed -- Function `*BackupsClientCreatePoller.Poll` has been removed -- Function `*AccountBackupsClientDeletePoller.Poll` has been removed -- Function `*PoolsClientDeletePoller.Poll` has been removed -- Function `*SnapshotsClientCreatePoller.FinalResponse` has been removed -- Function `*AccountsClientDeletePoller.FinalResponse` has been removed -- Function `*AccountsClientCreateOrUpdatePoller.Done` has been removed -- Function `*BackupPoliciesClientUpdatePollerResponse.Resume` has been removed -- Function `*AccountsClientListPager.PageResponse` has been removed -- Function `*SnapshotPoliciesClientUpdatePoller.Poll` has been removed -- Function `*BackupPoliciesClientUpdatePoller.ResumeToken` has been removed -- Function `*PoolsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*AccountsClientUpdatePoller.Done` has been removed -- Function `*VolumesClientUpdatePoller.ResumeToken` has been removed -- Function `*SnapshotPoliciesClientDeletePoller.Poll` has been removed -- Function `BackupPoliciesClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*VolumeGroupsClientCreatePollerResponse.Resume` has been removed -- Function `*VolumesClientDeleteReplicationPoller.ResumeToken` has been removed -- Function `*VolumesClientRevertPoller.Done` has been removed -- Function `*VolumesClientPoolChangePoller.Done` has been removed -- Function `AccountsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `EndpointType.ToPtr` has been removed -- Function `*PoolsClientUpdatePoller.FinalResponse` has been removed -- Function `*BackupsClientCreatePoller.ResumeToken` has been removed -- Function `VolumesClientReInitializeReplicationPollerResponse.PollUntilDone` has been removed -- Function `*VolumeGroupsClientDeletePoller.Done` has been removed -- Function `*SnapshotsClientCreatePoller.Poll` has been removed -- Function `*PoolsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*AccountsClientListBySubscriptionPager.Err` has been removed -- Function `*VolumesClientCreateOrUpdatePoller.Poll` has been removed -- Function `*BackupsClientCreatePollerResponse.Resume` has been removed -- Function `*BackupPoliciesClientDeletePoller.Done` has been removed -- Function `VolumesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*AccountsClientUpdatePollerResponse.Resume` has been removed -- Function `AccountBackupsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*BackupsClientDeletePoller.ResumeToken` has been removed -- Function `ServiceLevel.ToPtr` has been removed -- Function `*BackupPoliciesClientDeletePollerResponse.Resume` has been removed -- Function `*SnapshotPoliciesClientUpdatePoller.FinalResponse` has been removed -- Function `*VolumesClientDeletePollerResponse.Resume` has been removed -- Function `SecurityStyle.ToPtr` has been removed -- Function `AccountsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*AccountBackupsClientDeletePoller.FinalResponse` has been removed -- Function `SnapshotPoliciesClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*AccountBackupsClientDeletePollerResponse.Resume` has been removed -- Function `PoolsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `VolumesClientAuthorizeReplicationPollerResponse.PollUntilDone` has been removed -- Function `CheckQuotaNameResourceTypes.ToPtr` has been removed -- Function `*VolumesClientDeleteReplicationPoller.Done` has been removed -- Function `*SnapshotsClientDeletePoller.FinalResponse` has been removed -- Function `*BackupPoliciesClientCreatePollerResponse.Resume` has been removed -- Function `SnapshotsClientCreatePollerResponse.PollUntilDone` has been removed -- Function `*VolumesClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*BackupPoliciesClientCreatePoller.FinalResponse` has been removed -- Function `BackupsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*VolumesClientBreakReplicationPoller.ResumeToken` has been removed -- Function `*BackupPoliciesClientCreatePoller.Done` has been removed -- Function `*VolumesClientPoolChangePoller.FinalResponse` has been removed -- Function `*VolumesClientReInitializeReplicationPoller.Done` has been removed -- Function `*PoolsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*BackupsClientUpdatePollerResponse.Resume` has been removed -- Function `*AccountBackupsClientDeletePoller.ResumeToken` has been removed -- Function `*SnapshotsClientDeletePoller.Poll` has been removed -- Function `*VolumesClientAuthorizeReplicationPoller.Poll` has been removed -- Function `*VolumesClientReInitializeReplicationPoller.ResumeToken` has been removed -- Function `*SnapshotsClientUpdatePollerResponse.Resume` has been removed -- Function `*BackupsClientDeletePoller.Poll` has been removed -- Function `InAvailabilityReasonType.ToPtr` has been removed -- Function `*AccountsClientDeletePollerResponse.Resume` has been removed -- Function `*VolumesClientUpdatePoller.Done` has been removed -- Function `NetworkFeatures.ToPtr` has been removed -- Function `*SnapshotsClientCreatePollerResponse.Resume` has been removed -- Function `*VolumesClientBreakReplicationPoller.Poll` has been removed -- Function `*AccountsClientUpdatePoller.Poll` has been removed -- Function `*VolumesClientBreakReplicationPollerResponse.Resume` has been removed -- Function `*VolumesClientCreateOrUpdatePoller.Done` has been removed -- Function `RelationshipStatus.ToPtr` has been removed -- Function `*AccountsClientDeletePoller.Done` has been removed -- Function `*VolumesClientRevertPoller.ResumeToken` has been removed -- Function `*VolumesClientDeleteReplicationPoller.FinalResponse` has been removed -- Function `*VolumesClientResyncReplicationPoller.FinalResponse` has been removed -- Function `MetricAggregationType.ToPtr` has been removed -- Function `*PoolsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `PoolsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*AccountsClientDeletePoller.ResumeToken` has been removed -- Function `*VolumesClientPoolChangePoller.Poll` has been removed -- Function `*PoolsClientDeletePollerResponse.Resume` has been removed -- Function `*BackupPoliciesClientDeletePoller.Poll` has been removed -- Function `BackupPoliciesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*VolumesClientPoolChangePollerResponse.Resume` has been removed -- Function `*BackupsClientUpdatePoller.Done` has been removed -- Function `*BackupsClientUpdatePoller.ResumeToken` has been removed -- Function `*VolumesClientResyncReplicationPoller.Done` has been removed -- Function `ChownMode.ToPtr` has been removed -- Function `*VolumesClientPoolChangePoller.ResumeToken` has been removed -- Function `*VolumesClientListPager.NextPage` has been removed -- Function `*BackupPoliciesClientCreatePoller.Poll` has been removed -- Function `*BackupPoliciesClientUpdatePoller.Done` has been removed -- Function `*PoolsClientListPager.NextPage` has been removed -- Function `BackupsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*VolumesClientDeletePoller.Poll` has been removed -- Function `*VolumeGroupsClientCreatePoller.Done` has been removed -- Function `*AccountsClientListBySubscriptionPager.NextPage` has been removed -- Function `VolumesClientBreakReplicationPollerResponse.PollUntilDone` has been removed -- Function `*VolumesClientBreakReplicationPoller.Done` has been removed -- Function `*AccountsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `EncryptionType.ToPtr` has been removed -- Function `*BackupsClientDeletePollerResponse.Resume` has been removed -- Function `*VolumesClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*PoolsClientListPager.PageResponse` has been removed -- Function `*PoolsClientUpdatePoller.Poll` has been removed -- Function `BackupsClientCreatePollerResponse.PollUntilDone` has been removed -- Function `*VolumesClientReInitializeReplicationPoller.FinalResponse` has been removed -- Function `*VolumesClientDeleteReplicationPollerResponse.Resume` has been removed -- Function `*SnapshotsClientUpdatePoller.Poll` has been removed -- Function `*AccountsClientListBySubscriptionPager.PageResponse` has been removed -- Function `*SnapshotPoliciesClientDeletePoller.Done` has been removed -- Function `*AccountBackupsClientDeletePoller.Done` has been removed -- Function `*VolumeGroupsClientDeletePoller.ResumeToken` has been removed -- Function `*BackupPoliciesClientDeletePoller.ResumeToken` has been removed -- Function `*BackupsClientDeletePoller.FinalResponse` has been removed -- Function `*VolumesClientDeleteReplicationPoller.Poll` has been removed -- Function `*AccountsClientDeletePoller.Poll` has been removed -- Function `*PoolsClientDeletePoller.ResumeToken` has been removed -- Function `SnapshotPoliciesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*AccountsClientListPager.Err` has been removed -- Function `*VolumesClientUpdatePollerResponse.Resume` has been removed -- Function `*VolumesClientAuthorizeReplicationPollerResponse.Resume` has been removed -- Function `*VolumesClientUpdatePoller.Poll` has been removed -- Function `*VolumesClientReInitializeReplicationPollerResponse.Resume` has been removed -- Function `*VolumesClientDeletePoller.Done` has been removed -- Function `*VolumesClientListPager.PageResponse` has been removed -- Function `*VolumesClientResyncReplicationPollerResponse.Resume` has been removed -- Function `ReplicationSchedule.ToPtr` has been removed -- Function `*VolumeGroupsClientCreatePoller.Poll` has been removed -- Function `AccountsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*VolumeGroupsClientDeletePollerResponse.Resume` has been removed -- Function `*VolumesClientUpdatePoller.FinalResponse` has been removed -- Function `VolumeStorageToNetworkProximity.ToPtr` has been removed -- Function `*VolumesClientAuthorizeReplicationPoller.ResumeToken` has been removed -- Function `*BackupPoliciesClientDeletePoller.FinalResponse` has been removed -- Function `*SnapshotPoliciesClientDeletePoller.ResumeToken` has been removed -- Function `*BackupsClientDeletePoller.Done` has been removed -- Function `VolumesClientDeleteReplicationPollerResponse.PollUntilDone` has been removed -- Function `PoolsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `VolumesClientPoolChangePollerResponse.PollUntilDone` has been removed -- Function `*SnapshotsClientDeletePoller.Done` has been removed -- Function `CreatedByType.ToPtr` has been removed -- Function `*BackupsClientUpdatePoller.Poll` has been removed -- Function `*SnapshotsClientUpdatePoller.ResumeToken` has been removed -- Function `*VolumeGroupsClientDeletePoller.FinalResponse` has been removed -- Function `SnapshotsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `BackupType.ToPtr` has been removed -- Function `*SnapshotsClientUpdatePoller.FinalResponse` has been removed -- Function `*VolumesClientDeletePoller.FinalResponse` has been removed -- Function `VolumesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*VolumesClientAuthorizeReplicationPoller.Done` has been removed -- Function `*PoolsClientUpdatePollerResponse.Resume` has been removed -- Function `VolumesClientResyncReplicationPollerResponse.PollUntilDone` has been removed -- Function `*VolumesClientRevertPollerResponse.Resume` has been removed -- Function `*SnapshotPoliciesClientDeletePollerResponse.Resume` has been removed -- Function `SnapshotsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `VolumeGroupsClientCreatePollerResponse.PollUntilDone` has been removed -- Function `*VolumeGroupsClientDeletePoller.Poll` has been removed -- Function `VolumesClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*SnapshotsClientCreatePoller.Done` has been removed -- Function `VolumeGroupsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*AccountsClientUpdatePoller.ResumeToken` has been removed -- Function `*BackupsClientCreatePoller.FinalResponse` has been removed -- Function `*PoolsClientListPager.Err` has been removed -- Function `*PoolsClientDeletePoller.Done` has been removed -- Function `AvsDataStore.ToPtr` has been removed -- Function `*SnapshotsClientCreatePoller.ResumeToken` has been removed -- Function `*SnapshotPoliciesClientDeletePoller.FinalResponse` has been removed -- Function `*BackupPoliciesClientUpdatePoller.FinalResponse` has been removed -- Function `*VolumesClientListPager.Err` has been removed -- Function `MirrorState.ToPtr` has been removed -- Function `QosType.ToPtr` has been removed -- Function `*AccountsClientUpdatePoller.FinalResponse` has been removed -- Function `*VolumeGroupsClientCreatePoller.ResumeToken` has been removed -- Function `*VolumesClientRevertPoller.FinalResponse` has been removed -- Function `*SnapshotPoliciesClientUpdatePollerResponse.Resume` has been removed -- Function `*AccountsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `ApplicationType.ToPtr` has been removed -- Function `*VolumesClientBreakReplicationPoller.FinalResponse` has been removed -- Function `*VolumesClientAuthorizeReplicationPoller.FinalResponse` has been removed -- Function `*BackupsClientUpdatePoller.FinalResponse` has been removed -- Function `*SnapshotPoliciesClientUpdatePoller.ResumeToken` has been removed -- Struct `AccountBackupsClientDeletePoller` has been removed -- Struct `AccountBackupsClientDeletePollerResponse` has been removed -- Struct `AccountBackupsClientGetResult` has been removed -- Struct `AccountBackupsClientListResult` has been removed -- Struct `AccountsClientCreateOrUpdatePoller` has been removed -- Struct `AccountsClientCreateOrUpdatePollerResponse` has been removed -- Struct `AccountsClientCreateOrUpdateResult` has been removed -- Struct `AccountsClientDeletePoller` has been removed -- Struct `AccountsClientDeletePollerResponse` has been removed -- Struct `AccountsClientGetResult` has been removed -- Struct `AccountsClientListBySubscriptionPager` has been removed -- Struct `AccountsClientListBySubscriptionResult` has been removed -- Struct `AccountsClientListPager` has been removed -- Struct `AccountsClientListResult` has been removed -- Struct `AccountsClientUpdatePoller` has been removed -- Struct `AccountsClientUpdatePollerResponse` has been removed -- Struct `AccountsClientUpdateResult` has been removed -- Struct `BackupPoliciesClientCreatePoller` has been removed -- Struct `BackupPoliciesClientCreatePollerResponse` has been removed -- Struct `BackupPoliciesClientCreateResult` has been removed -- Struct `BackupPoliciesClientDeletePoller` has been removed -- Struct `BackupPoliciesClientDeletePollerResponse` has been removed -- Struct `BackupPoliciesClientGetResult` has been removed -- Struct `BackupPoliciesClientListResult` has been removed -- Struct `BackupPoliciesClientUpdatePoller` has been removed -- Struct `BackupPoliciesClientUpdatePollerResponse` has been removed -- Struct `BackupPoliciesClientUpdateResult` has been removed -- Struct `BackupsClientCreatePoller` has been removed -- Struct `BackupsClientCreatePollerResponse` has been removed -- Struct `BackupsClientCreateResult` has been removed -- Struct `BackupsClientDeletePoller` has been removed -- Struct `BackupsClientDeletePollerResponse` has been removed -- Struct `BackupsClientGetResult` has been removed -- Struct `BackupsClientGetStatusResult` has been removed -- Struct `BackupsClientGetVolumeRestoreStatusResult` has been removed -- Struct `BackupsClientListResult` has been removed -- Struct `BackupsClientUpdatePoller` has been removed -- Struct `BackupsClientUpdatePollerResponse` has been removed -- Struct `BackupsClientUpdateResult` has been removed -- Struct `OperationsClientListResult` has been removed -- Struct `PoolsClientCreateOrUpdatePoller` has been removed -- Struct `PoolsClientCreateOrUpdatePollerResponse` has been removed -- Struct `PoolsClientCreateOrUpdateResult` has been removed -- Struct `PoolsClientDeletePoller` has been removed -- Struct `PoolsClientDeletePollerResponse` has been removed -- Struct `PoolsClientGetResult` has been removed -- Struct `PoolsClientListPager` has been removed -- Struct `PoolsClientListResult` has been removed -- Struct `PoolsClientUpdatePoller` has been removed -- Struct `PoolsClientUpdatePollerResponse` has been removed -- Struct `PoolsClientUpdateResult` has been removed -- Struct `ResourceClientCheckFilePathAvailabilityResult` has been removed -- Struct `ResourceClientCheckNameAvailabilityResult` has been removed -- Struct `ResourceClientCheckQuotaAvailabilityResult` has been removed -- Struct `ResourceQuotaLimitsClientGetResult` has been removed -- Struct `ResourceQuotaLimitsClientListResult` has been removed -- Struct `SnapshotPoliciesClientCreateResult` has been removed -- Struct `SnapshotPoliciesClientDeletePoller` has been removed -- Struct `SnapshotPoliciesClientDeletePollerResponse` has been removed -- Struct `SnapshotPoliciesClientGetResult` has been removed -- Struct `SnapshotPoliciesClientListResult` has been removed -- Struct `SnapshotPoliciesClientListVolumesResult` has been removed -- Struct `SnapshotPoliciesClientUpdatePoller` has been removed -- Struct `SnapshotPoliciesClientUpdatePollerResponse` has been removed -- Struct `SnapshotPoliciesClientUpdateResult` has been removed -- Struct `SnapshotsClientCreatePoller` has been removed -- Struct `SnapshotsClientCreatePollerResponse` has been removed -- Struct `SnapshotsClientCreateResult` has been removed -- Struct `SnapshotsClientDeletePoller` has been removed -- Struct `SnapshotsClientDeletePollerResponse` has been removed -- Struct `SnapshotsClientGetResult` has been removed -- Struct `SnapshotsClientListResult` has been removed -- Struct `SnapshotsClientUpdatePoller` has been removed -- Struct `SnapshotsClientUpdatePollerResponse` has been removed -- Struct `SnapshotsClientUpdateResult` has been removed -- Struct `VaultsClientListResult` has been removed -- Struct `VolumeGroupsClientCreatePoller` has been removed -- Struct `VolumeGroupsClientCreatePollerResponse` has been removed -- Struct `VolumeGroupsClientCreateResult` has been removed -- Struct `VolumeGroupsClientDeletePoller` has been removed -- Struct `VolumeGroupsClientDeletePollerResponse` has been removed -- Struct `VolumeGroupsClientGetResult` has been removed -- Struct `VolumeGroupsClientListByNetAppAccountResult` has been removed -- Struct `VolumesClientAuthorizeReplicationPoller` has been removed -- Struct `VolumesClientAuthorizeReplicationPollerResponse` has been removed -- Struct `VolumesClientBreakReplicationPoller` has been removed -- Struct `VolumesClientBreakReplicationPollerResponse` has been removed -- Struct `VolumesClientCreateOrUpdatePoller` has been removed -- Struct `VolumesClientCreateOrUpdatePollerResponse` has been removed -- Struct `VolumesClientCreateOrUpdateResult` has been removed -- Struct `VolumesClientDeletePoller` has been removed -- Struct `VolumesClientDeletePollerResponse` has been removed -- Struct `VolumesClientDeleteReplicationPoller` has been removed -- Struct `VolumesClientDeleteReplicationPollerResponse` has been removed -- Struct `VolumesClientGetResult` has been removed -- Struct `VolumesClientListPager` has been removed -- Struct `VolumesClientListResult` has been removed -- Struct `VolumesClientPoolChangePoller` has been removed -- Struct `VolumesClientPoolChangePollerResponse` has been removed -- Struct `VolumesClientReInitializeReplicationPoller` has been removed -- Struct `VolumesClientReInitializeReplicationPollerResponse` has been removed -- Struct `VolumesClientReplicationStatusResult` has been removed -- Struct `VolumesClientResyncReplicationPoller` has been removed -- Struct `VolumesClientResyncReplicationPollerResponse` has been removed -- Struct `VolumesClientRevertPoller` has been removed -- Struct `VolumesClientRevertPollerResponse` has been removed -- Struct `VolumesClientUpdatePoller` has been removed -- Struct `VolumesClientUpdatePollerResponse` has been removed -- Struct `VolumesClientUpdateResult` has been removed -- Field `BackupsClientGetStatusResult` of struct `BackupsClientGetStatusResponse` has been removed -- Field `RawResponse` of struct `BackupsClientGetStatusResponse` has been removed -- Field `VolumeGroupsClientGetResult` of struct `VolumeGroupsClientGetResponse` has been removed -- Field `RawResponse` of struct `VolumeGroupsClientGetResponse` has been removed -- Field `RawResponse` of struct `SnapshotPoliciesClientDeleteResponse` has been removed -- Field `AccountBackupsClientListResult` of struct `AccountBackupsClientListResponse` has been removed -- Field `RawResponse` of struct `AccountBackupsClientListResponse` has been removed -- Field `RawResponse` of struct `VolumeGroupsClientDeleteResponse` has been removed -- Field `ResourceClientCheckNameAvailabilityResult` of struct `ResourceClientCheckNameAvailabilityResponse` has been removed -- Field `RawResponse` of struct `ResourceClientCheckNameAvailabilityResponse` has been removed -- Field `RawResponse` of struct `VolumesClientPoolChangeResponse` has been removed -- Field `PoolsClientListResult` of struct `PoolsClientListResponse` has been removed -- Field `RawResponse` of struct `PoolsClientListResponse` has been removed -- Field `ResourceClientCheckQuotaAvailabilityResult` of struct `ResourceClientCheckQuotaAvailabilityResponse` has been removed -- Field `RawResponse` of struct `ResourceClientCheckQuotaAvailabilityResponse` has been removed -- Field `RawResponse` of struct `PoolsClientDeleteResponse` has been removed -- Field `AccountsClientCreateOrUpdateResult` of struct `AccountsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `AccountsClientCreateOrUpdateResponse` has been removed -- Field `BackupPoliciesClientUpdateResult` of struct `BackupPoliciesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `BackupPoliciesClientUpdateResponse` has been removed -- Field `AccountBackupsClientGetResult` of struct `AccountBackupsClientGetResponse` has been removed -- Field `RawResponse` of struct `AccountBackupsClientGetResponse` has been removed -- Field `AccountsClientUpdateResult` of struct `AccountsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `AccountsClientUpdateResponse` has been removed -- Field `SnapshotsClientGetResult` of struct `SnapshotsClientGetResponse` has been removed -- Field `RawResponse` of struct `SnapshotsClientGetResponse` has been removed -- Field `VolumesClientCreateOrUpdateResult` of struct `VolumesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `VolumesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `VolumesClientDeleteResponse` has been removed -- Field `BackupsClientGetVolumeRestoreStatusResult` of struct `BackupsClientGetVolumeRestoreStatusResponse` has been removed -- Field `RawResponse` of struct `BackupsClientGetVolumeRestoreStatusResponse` has been removed -- Field `SnapshotsClientListResult` of struct `SnapshotsClientListResponse` has been removed -- Field `RawResponse` of struct `SnapshotsClientListResponse` has been removed -- Field `BackupsClientUpdateResult` of struct `BackupsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `BackupsClientUpdateResponse` has been removed -- Field `SnapshotPoliciesClientListResult` of struct `SnapshotPoliciesClientListResponse` has been removed -- Field `RawResponse` of struct `SnapshotPoliciesClientListResponse` has been removed -- Field `RawResponse` of struct `VolumesClientResyncReplicationResponse` has been removed -- Field `VolumesClientListResult` of struct `VolumesClientListResponse` has been removed -- Field `RawResponse` of struct `VolumesClientListResponse` has been removed -- Field `RawResponse` of struct `BackupPoliciesClientDeleteResponse` has been removed -- Field `SnapshotsClientUpdateResult` of struct `SnapshotsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `SnapshotsClientUpdateResponse` has been removed -- Field `VolumeGroupsClientCreateResult` of struct `VolumeGroupsClientCreateResponse` has been removed -- Field `RawResponse` of struct `VolumeGroupsClientCreateResponse` has been removed -- Field `AccountsClientListResult` of struct `AccountsClientListResponse` has been removed -- Field `RawResponse` of struct `AccountsClientListResponse` has been removed -- Field `SnapshotPoliciesClientCreateResult` of struct `SnapshotPoliciesClientCreateResponse` has been removed -- Field `RawResponse` of struct `SnapshotPoliciesClientCreateResponse` has been removed -- Field `ResourceQuotaLimitsClientGetResult` of struct `ResourceQuotaLimitsClientGetResponse` has been removed -- Field `RawResponse` of struct `ResourceQuotaLimitsClientGetResponse` has been removed -- Field `BackupPoliciesClientGetResult` of struct `BackupPoliciesClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupPoliciesClientGetResponse` has been removed -- Field `BackupsClientGetResult` of struct `BackupsClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupsClientGetResponse` has been removed -- Field `OperationsClientListResult` of struct `OperationsClientListResponse` has been removed -- Field `RawResponse` of struct `OperationsClientListResponse` has been removed -- Field `AccountsClientGetResult` of struct `AccountsClientGetResponse` has been removed -- Field `RawResponse` of struct `AccountsClientGetResponse` has been removed -- Field `BackupPoliciesClientCreateResult` of struct `BackupPoliciesClientCreateResponse` has been removed -- Field `RawResponse` of struct `BackupPoliciesClientCreateResponse` has been removed -- Field `RawResponse` of struct `AccountBackupsClientDeleteResponse` has been removed -- Field `VaultsClientListResult` of struct `VaultsClientListResponse` has been removed -- Field `RawResponse` of struct `VaultsClientListResponse` has been removed -- Field `RawResponse` of struct `VolumesClientAuthorizeReplicationResponse` has been removed -- Field `SnapshotPoliciesClientGetResult` of struct `SnapshotPoliciesClientGetResponse` has been removed -- Field `RawResponse` of struct `SnapshotPoliciesClientGetResponse` has been removed -- Field `VolumesClientGetResult` of struct `VolumesClientGetResponse` has been removed -- Field `RawResponse` of struct `VolumesClientGetResponse` has been removed -- Field `RawResponse` of struct `VolumesClientBreakReplicationResponse` has been removed -- Field `VolumesClientReplicationStatusResult` of struct `VolumesClientReplicationStatusResponse` has been removed -- Field `RawResponse` of struct `VolumesClientReplicationStatusResponse` has been removed -- Field `SnapshotsClientCreateResult` of struct `SnapshotsClientCreateResponse` has been removed -- Field `RawResponse` of struct `SnapshotsClientCreateResponse` has been removed -- Field `SnapshotPoliciesClientUpdateResult` of struct `SnapshotPoliciesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `SnapshotPoliciesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `AccountsClientDeleteResponse` has been removed -- Field `PoolsClientCreateOrUpdateResult` of struct `PoolsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `PoolsClientCreateOrUpdateResponse` has been removed -- Field `VolumeGroupsClientListByNetAppAccountResult` of struct `VolumeGroupsClientListByNetAppAccountResponse` has been removed -- Field `RawResponse` of struct `VolumeGroupsClientListByNetAppAccountResponse` has been removed -- Field `RawResponse` of struct `VolumesClientReInitializeReplicationResponse` has been removed -- Field `RawResponse` of struct `VolumesClientRevertResponse` has been removed -- Field `BackupsClientListResult` of struct `BackupsClientListResponse` has been removed -- Field `RawResponse` of struct `BackupsClientListResponse` has been removed -- Field `VolumesClientUpdateResult` of struct `VolumesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `VolumesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `BackupsClientDeleteResponse` has been removed -- Field `AccountsClientListBySubscriptionResult` of struct `AccountsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `AccountsClientListBySubscriptionResponse` has been removed -- Field `PoolsClientUpdateResult` of struct `PoolsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `PoolsClientUpdateResponse` has been removed -- Field `SnapshotPoliciesClientListVolumesResult` of struct `SnapshotPoliciesClientListVolumesResponse` has been removed -- Field `RawResponse` of struct `SnapshotPoliciesClientListVolumesResponse` has been removed -- Field `RawResponse` of struct `SnapshotsClientDeleteResponse` has been removed -- Field `BackupPoliciesClientListResult` of struct `BackupPoliciesClientListResponse` has been removed -- Field `RawResponse` of struct `BackupPoliciesClientListResponse` has been removed -- Field `BackupsClientCreateResult` of struct `BackupsClientCreateResponse` has been removed -- Field `RawResponse` of struct `BackupsClientCreateResponse` has been removed -- Field `ResourceClientCheckFilePathAvailabilityResult` of struct `ResourceClientCheckFilePathAvailabilityResponse` has been removed -- Field `RawResponse` of struct `ResourceClientCheckFilePathAvailabilityResponse` has been removed -- Field `ResourceQuotaLimitsClientListResult` of struct `ResourceQuotaLimitsClientListResponse` has been removed -- Field `RawResponse` of struct `ResourceQuotaLimitsClientListResponse` has been removed -- Field `PoolsClientGetResult` of struct `PoolsClientGetResponse` has been removed -- Field `RawResponse` of struct `PoolsClientGetResponse` has been removed -- Field `RawResponse` of struct `VolumesClientDeleteReplicationResponse` has been removed - -### Features Added - -- New const `EnableSubvolumesDisabled` -- New const `EnableSubvolumesEnabled` -- New function `*SnapshotsClient.BeginRestoreFiles(context.Context, string, string, string, string, string, SnapshotRestoreFiles, *SnapshotsClientBeginRestoreFilesOptions) (*armruntime.Poller[SnapshotsClientRestoreFilesResponse], error)` -- New function `NewSubvolumesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SubvolumesClient, error)` -- New function `*SubvolumesClient.BeginGetMetadata(context.Context, string, string, string, string, string, *SubvolumesClientBeginGetMetadataOptions) (*armruntime.Poller[SubvolumesClientGetMetadataResponse], error)` -- New function `*SubvolumesClient.BeginCreate(context.Context, string, string, string, string, string, SubvolumeInfo, *SubvolumesClientBeginCreateOptions) (*armruntime.Poller[SubvolumesClientCreateResponse], error)` -- New function `*SubvolumesClient.ListByVolume(string, string, string, string, *SubvolumesClientListByVolumeOptions) *runtime.Pager[SubvolumesClientListByVolumeResponse]` -- New function `*SubvolumesClient.BeginUpdate(context.Context, string, string, string, string, string, SubvolumePatchRequest, *SubvolumesClientBeginUpdateOptions) (*armruntime.Poller[SubvolumesClientUpdateResponse], error)` -- New function `SnapshotRestoreFiles.MarshalJSON() ([]byte, error)` -- New function `SubvolumePatchRequest.MarshalJSON() ([]byte, error)` -- New function `*SubvolumesClient.BeginDelete(context.Context, string, string, string, string, string, *SubvolumesClientBeginDeleteOptions) (*armruntime.Poller[SubvolumesClientDeleteResponse], error)` -- New function `*SubvolumesClient.Get(context.Context, string, string, string, string, string, *SubvolumesClientGetOptions) (SubvolumesClientGetResponse, error)` -- New function `SubvolumeModelProperties.MarshalJSON() ([]byte, error)` -- New function `*SubvolumeModelProperties.UnmarshalJSON([]byte) error` -- New function `SubvolumesList.MarshalJSON() ([]byte, error)` -- New function `PossibleEnableSubvolumesValues() []EnableSubvolumes` -- New struct `LdapSearchScopeOpt` -- New struct `SnapshotRestoreFiles` -- New struct `SnapshotsClientBeginRestoreFilesOptions` -- New struct `SnapshotsClientRestoreFilesResponse` -- New struct `SubvolumeInfo` -- New struct `SubvolumeModel` -- New struct `SubvolumeModelProperties` -- New struct `SubvolumePatchParams` -- New struct `SubvolumePatchRequest` -- New struct `SubvolumeProperties` -- New struct `SubvolumesClient` -- New struct `SubvolumesClientBeginCreateOptions` -- New struct `SubvolumesClientBeginDeleteOptions` -- New struct `SubvolumesClientBeginGetMetadataOptions` -- New struct `SubvolumesClientBeginUpdateOptions` -- New struct `SubvolumesClientCreateResponse` -- New struct `SubvolumesClientDeleteResponse` -- New struct `SubvolumesClientGetMetadataResponse` -- New struct `SubvolumesClientGetOptions` -- New struct `SubvolumesClientGetResponse` -- New struct `SubvolumesClientListByVolumeOptions` -- New struct `SubvolumesClientListByVolumeResponse` -- New struct `SubvolumesClientUpdateResponse` -- New struct `SubvolumesList` -- New anonymous field `SubscriptionQuotaItemList` in struct `ResourceQuotaLimitsClientListResponse` -- New field `LdapSearchScope` in struct `ActiveDirectory` -- New anonymous field `BackupPoliciesList` in struct `BackupPoliciesClientListResponse` -- New anonymous field `Account` in struct `AccountsClientUpdateResponse` -- New field `ResumeToken` in struct `VolumesClientBeginAuthorizeReplicationOptions` -- New anonymous field `SubscriptionQuotaItem` in struct `ResourceQuotaLimitsClientGetResponse` -- New field `ResumeToken` in struct `BackupPoliciesClientBeginUpdateOptions` -- New field `ResumeToken` in struct `AccountsClientBeginCreateOrUpdateOptions` -- New field `ResumeToken` in struct `BackupsClientBeginDeleteOptions` -- New field `SystemData` in struct `CapacityPool` -- New field `ResumeToken` in struct `VolumesClientBeginResyncReplicationOptions` -- New anonymous field `Snapshot` in struct `SnapshotsClientCreateResponse` -- New anonymous field `BackupsList` in struct `AccountBackupsClientListResponse` -- New anonymous field `Volume` in struct `VolumesClientCreateOrUpdateResponse` -- New anonymous field `Backup` in struct `AccountBackupsClientGetResponse` -- New field `ResumeToken` in struct `BackupsClientBeginCreateOptions` -- New field `ResumeToken` in struct `VolumesClientBeginReInitializeReplicationOptions` -- New anonymous field `Volume` in struct `VolumesClientUpdateResponse` -- New field `ResumeToken` in struct `VolumesClientBeginPoolChangeOptions` -- New anonymous field `CheckAvailabilityResponse` in struct `ResourceClientCheckQuotaAvailabilityResponse` -- New anonymous field `CapacityPoolList` in struct `PoolsClientListResponse` -- New field `ResumeToken` in struct `PoolsClientBeginDeleteOptions` -- New anonymous field `VaultList` in struct `VaultsClientListResponse` -- New field `ResumeToken` in struct `AccountsClientBeginDeleteOptions` -- New field `ResumeToken` in struct `SnapshotsClientBeginCreateOptions` -- New anonymous field `SnapshotPolicyVolumeList` in struct `SnapshotPoliciesClientListVolumesResponse` -- New anonymous field `CapacityPool` in struct `PoolsClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `SnapshotPoliciesClientBeginDeleteOptions` -- New anonymous field `Volume` in struct `VolumesClientGetResponse` -- New field `SystemData` in struct `Volume` -- New anonymous field `Backup` in struct `BackupsClientCreateResponse` -- New anonymous field `ReplicationStatus` in struct `VolumesClientReplicationStatusResponse` -- New field `ResumeToken` in struct `BackupPoliciesClientBeginDeleteOptions` -- New anonymous field `AccountList` in struct `AccountsClientListResponse` -- New anonymous field `BackupStatus` in struct `BackupsClientGetStatusResponse` -- New field `ForceDelete` in struct `VolumesClientBeginDeleteOptions` -- New field `ResumeToken` in struct `VolumesClientBeginDeleteOptions` -- New anonymous field `RestoreStatus` in struct `BackupsClientGetVolumeRestoreStatusResponse` -- New anonymous field `SnapshotsList` in struct `SnapshotsClientListResponse` -- New field `ResumeToken` in struct `VolumeGroupsClientBeginCreateOptions` -- New field `ResumeToken` in struct `SnapshotPoliciesClientBeginUpdateOptions` -- New anonymous field `SnapshotPolicy` in struct `SnapshotPoliciesClientCreateResponse` -- New field `ResumeToken` in struct `VolumesClientBeginRevertOptions` -- New anonymous field `VolumeGroupDetails` in struct `VolumeGroupsClientGetResponse` -- New field `SystemData` in struct `SnapshotPolicy` -- New field `ResumeToken` in struct `AccountBackupsClientBeginDeleteOptions` -- New anonymous field `VolumeList` in struct `VolumesClientListResponse` -- New anonymous field `Backup` in struct `BackupsClientUpdateResponse` -- New field `MaximumNumberOfFiles` in struct `VolumeProperties` -- New field `EnableSubvolumes` in struct `VolumeProperties` -- New field `ResumeToken` in struct `BackupPoliciesClientBeginCreateOptions` -- New anonymous field `CheckAvailabilityResponse` in struct `ResourceClientCheckNameAvailabilityResponse` -- New anonymous field `VolumeGroupDetails` in struct `VolumeGroupsClientCreateResponse` -- New anonymous field `CapacityPool` in struct `PoolsClientGetResponse` -- New field `ResumeToken` in struct `PoolsClientBeginCreateOrUpdateOptions` -- New anonymous field `Backup` in struct `BackupsClientGetResponse` -- New anonymous field `BackupPolicy` in struct `BackupPoliciesClientUpdateResponse` -- New field `ResumeToken` in struct `BackupsClientBeginUpdateOptions` -- New field `ResumeToken` in struct `SnapshotsClientBeginDeleteOptions` -- New field `ResumeToken` in struct `SnapshotsClientBeginUpdateOptions` -- New anonymous field `BackupPolicy` in struct `BackupPoliciesClientGetResponse` -- New field `ResumeToken` in struct `VolumesClientBeginDeleteReplicationOptions` -- New field `UnixPermissions` in struct `VolumePatchProperties` -- New field `ResumeToken` in struct `AccountsClientBeginUpdateOptions` -- New anonymous field `SnapshotPoliciesList` in struct `SnapshotPoliciesClientListResponse` -- New anonymous field `BackupsList` in struct `BackupsClientListResponse` -- New field `SystemData` in struct `BackupPolicy` -- New anonymous field `CapacityPool` in struct `PoolsClientUpdateResponse` -- New anonymous field `Snapshot` in struct `SnapshotsClientUpdateResponse` -- New anonymous field `BackupPolicy` in struct `BackupPoliciesClientCreateResponse` -- New anonymous field `CheckAvailabilityResponse` in struct `ResourceClientCheckFilePathAvailabilityResponse` -- New field `ResumeToken` in struct `VolumesClientBeginUpdateOptions` -- New anonymous field `SnapshotPolicy` in struct `SnapshotPoliciesClientGetResponse` -- New anonymous field `Account` in struct `AccountsClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `VolumeGroupsClientBeginDeleteOptions` -- New field `ResumeToken` in struct `PoolsClientBeginUpdateOptions` -- New field `ResumeToken` in struct `VolumesClientBeginBreakReplicationOptions` -- New anonymous field `VolumeGroupList` in struct `VolumeGroupsClientListByNetAppAccountResponse` -- New anonymous field `Account` in struct `AccountsClientGetResponse` -- New anonymous field `Snapshot` in struct `SnapshotsClientGetResponse` -- New anonymous field `AccountList` in struct `AccountsClientListBySubscriptionResponse` -- New anonymous field `SnapshotPolicy` in struct `SnapshotPoliciesClientUpdateResponse` -- New anonymous field `OperationListResult` in struct `OperationsClientListResponse` -- New field `ResumeToken` in struct `VolumesClientBeginCreateOrUpdateOptions` - - -## 0.2.1 (2022-02-22) - -### Other Changes - -- Remove the go_mod_tidy_hack.go file. - -## 0.2.0 (2022-01-13) -### Breaking Changes - -- Function `*BackupsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *BackupsGetOptions)` to `(context.Context, string, string, string, string, string, *BackupsClientGetOptions)` -- Function `*BackupsClient.Get` return value(s) have been changed from `(BackupsGetResponse, error)` to `(BackupsClientGetResponse, error)` -- Function `*BackupsClient.GetStatus` parameter(s) have been changed from `(context.Context, string, string, string, string, *BackupsGetStatusOptions)` to `(context.Context, string, string, string, string, *BackupsClientGetStatusOptions)` -- Function `*BackupsClient.GetStatus` return value(s) have been changed from `(BackupsGetStatusResponse, error)` to `(BackupsClientGetStatusResponse, error)` -- Function `*SnapshotPoliciesClient.ListVolumes` parameter(s) have been changed from `(context.Context, string, string, string, *SnapshotPoliciesListVolumesOptions)` to `(context.Context, string, string, string, *SnapshotPoliciesClientListVolumesOptions)` -- Function `*SnapshotPoliciesClient.ListVolumes` return value(s) have been changed from `(SnapshotPoliciesListVolumesResponse, error)` to `(SnapshotPoliciesClientListVolumesResponse, error)` -- Function `*VolumeGroupsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *VolumeGroupsBeginDeleteOptions)` to `(context.Context, string, string, string, *VolumeGroupsClientBeginDeleteOptions)` -- Function `*VolumeGroupsClient.BeginDelete` return value(s) have been changed from `(VolumeGroupsDeletePollerResponse, error)` to `(VolumeGroupsClientDeletePollerResponse, error)` -- Function `*VolumesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, string, *VolumesBeginDeleteOptions)` to `(context.Context, string, string, string, string, *VolumesClientBeginDeleteOptions)` -- Function `*VolumesClient.BeginDelete` return value(s) have been changed from `(VolumesDeletePollerResponse, error)` to `(VolumesClientDeletePollerResponse, error)` -- Function `*AccountsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, NetAppAccount, *AccountsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, Account, *AccountsClientBeginCreateOrUpdateOptions)` -- Function `*AccountsClient.BeginCreateOrUpdate` return value(s) have been changed from `(AccountsCreateOrUpdatePollerResponse, error)` to `(AccountsClientCreateOrUpdatePollerResponse, error)` -- Function `*VolumeGroupsClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, string, VolumeGroupDetails, *VolumeGroupsBeginCreateOptions)` to `(context.Context, string, string, string, VolumeGroupDetails, *VolumeGroupsClientBeginCreateOptions)` -- Function `*VolumeGroupsClient.BeginCreate` return value(s) have been changed from `(VolumeGroupsCreatePollerResponse, error)` to `(VolumeGroupsClientCreatePollerResponse, error)` -- Function `*VolumeGroupsClient.ListByNetAppAccount` parameter(s) have been changed from `(context.Context, string, string, *VolumeGroupsListByNetAppAccountOptions)` to `(context.Context, string, string, *VolumeGroupsClientListByNetAppAccountOptions)` -- Function `*VolumeGroupsClient.ListByNetAppAccount` return value(s) have been changed from `(VolumeGroupsListByNetAppAccountResponse, error)` to `(VolumeGroupsClientListByNetAppAccountResponse, error)` -- Function `*VolumesClient.BeginPoolChange` parameter(s) have been changed from `(context.Context, string, string, string, string, PoolChangeRequest, *VolumesBeginPoolChangeOptions)` to `(context.Context, string, string, string, string, PoolChangeRequest, *VolumesClientBeginPoolChangeOptions)` -- Function `*VolumesClient.BeginPoolChange` return value(s) have been changed from `(VolumesPoolChangePollerResponse, error)` to `(VolumesClientPoolChangePollerResponse, error)` -- Function `*SnapshotPoliciesClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, SnapshotPolicyPatch, *SnapshotPoliciesBeginUpdateOptions)` to `(context.Context, string, string, string, SnapshotPolicyPatch, *SnapshotPoliciesClientBeginUpdateOptions)` -- Function `*SnapshotPoliciesClient.BeginUpdate` return value(s) have been changed from `(SnapshotPoliciesUpdatePollerResponse, error)` to `(SnapshotPoliciesClientUpdatePollerResponse, error)` -- Function `*VolumesClient.List` parameter(s) have been changed from `(string, string, string, *VolumesListOptions)` to `(string, string, string, *VolumesClientListOptions)` -- Function `*VolumesClient.List` return value(s) have been changed from `(*VolumesListPager)` to `(*VolumesClientListPager)` -- Function `*SnapshotsClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, string, string, string, Snapshot, *SnapshotsBeginCreateOptions)` to `(context.Context, string, string, string, string, string, Snapshot, *SnapshotsClientBeginCreateOptions)` -- Function `*SnapshotsClient.BeginCreate` return value(s) have been changed from `(SnapshotsCreatePollerResponse, error)` to `(SnapshotsClientCreatePollerResponse, error)` -- Function `*BackupPoliciesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *BackupPoliciesBeginDeleteOptions)` to `(context.Context, string, string, string, *BackupPoliciesClientBeginDeleteOptions)` -- Function `*BackupPoliciesClient.BeginDelete` return value(s) have been changed from `(BackupPoliciesDeletePollerResponse, error)` to `(BackupPoliciesClientDeletePollerResponse, error)` -- Function `*BackupsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *BackupsBeginDeleteOptions)` to `(context.Context, string, string, string, string, string, *BackupsClientBeginDeleteOptions)` -- Function `*BackupsClient.BeginDelete` return value(s) have been changed from `(BackupsDeletePollerResponse, error)` to `(BackupsClientDeletePollerResponse, error)` -- Function `*SnapshotPoliciesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *SnapshotPoliciesGetOptions)` to `(context.Context, string, string, string, *SnapshotPoliciesClientGetOptions)` -- Function `*SnapshotPoliciesClient.Get` return value(s) have been changed from `(SnapshotPoliciesGetResponse, error)` to `(SnapshotPoliciesClientGetResponse, error)` -- Function `*VolumesClient.ReplicationStatus` parameter(s) have been changed from `(context.Context, string, string, string, string, *VolumesReplicationStatusOptions)` to `(context.Context, string, string, string, string, *VolumesClientReplicationStatusOptions)` -- Function `*VolumesClient.ReplicationStatus` return value(s) have been changed from `(VolumesReplicationStatusResponse, error)` to `(VolumesClientReplicationStatusResponse, error)` -- Function `*SnapshotsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, string, map[string]interface{}, *SnapshotsBeginUpdateOptions)` to `(context.Context, string, string, string, string, string, map[string]interface{}, *SnapshotsClientBeginUpdateOptions)` -- Function `*SnapshotsClient.BeginUpdate` return value(s) have been changed from `(SnapshotsUpdatePollerResponse, error)` to `(SnapshotsClientUpdatePollerResponse, error)` -- Function `*AccountBackupsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *AccountBackupsBeginDeleteOptions)` to `(context.Context, string, string, string, *AccountBackupsClientBeginDeleteOptions)` -- Function `*AccountBackupsClient.BeginDelete` return value(s) have been changed from `(AccountBackupsDeletePollerResponse, error)` to `(AccountBackupsClientDeletePollerResponse, error)` -- Function `*SnapshotsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *SnapshotsBeginDeleteOptions)` to `(context.Context, string, string, string, string, string, *SnapshotsClientBeginDeleteOptions)` -- Function `*SnapshotsClient.BeginDelete` return value(s) have been changed from `(SnapshotsDeletePollerResponse, error)` to `(SnapshotsClientDeletePollerResponse, error)` -- Function `*SnapshotsClient.List` parameter(s) have been changed from `(context.Context, string, string, string, string, *SnapshotsListOptions)` to `(context.Context, string, string, string, string, *SnapshotsClientListOptions)` -- Function `*SnapshotsClient.List` return value(s) have been changed from `(SnapshotsListResponse, error)` to `(SnapshotsClientListResponse, error)` -- Function `*BackupPoliciesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *BackupPoliciesGetOptions)` to `(context.Context, string, string, string, *BackupPoliciesClientGetOptions)` -- Function `*BackupPoliciesClient.Get` return value(s) have been changed from `(BackupPoliciesGetResponse, error)` to `(BackupPoliciesClientGetResponse, error)` -- Function `*SnapshotsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *SnapshotsGetOptions)` to `(context.Context, string, string, string, string, string, *SnapshotsClientGetOptions)` -- Function `*SnapshotsClient.Get` return value(s) have been changed from `(SnapshotsGetResponse, error)` to `(SnapshotsClientGetResponse, error)` -- Function `*VolumesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *VolumesGetOptions)` to `(context.Context, string, string, string, string, *VolumesClientGetOptions)` -- Function `*VolumesClient.Get` return value(s) have been changed from `(VolumesGetResponse, error)` to `(VolumesClientGetResponse, error)` -- Function `*BackupsClient.List` parameter(s) have been changed from `(context.Context, string, string, string, string, *BackupsListOptions)` to `(context.Context, string, string, string, string, *BackupsClientListOptions)` -- Function `*BackupsClient.List` return value(s) have been changed from `(BackupsListResponse, error)` to `(BackupsClientListResponse, error)` -- Function `*VolumesClient.BeginAuthorizeReplication` parameter(s) have been changed from `(context.Context, string, string, string, string, AuthorizeRequest, *VolumesBeginAuthorizeReplicationOptions)` to `(context.Context, string, string, string, string, AuthorizeRequest, *VolumesClientBeginAuthorizeReplicationOptions)` -- Function `*VolumesClient.BeginAuthorizeReplication` return value(s) have been changed from `(VolumesAuthorizeReplicationPollerResponse, error)` to `(VolumesClientAuthorizeReplicationPollerResponse, error)` -- Function `*VaultsClient.List` parameter(s) have been changed from `(context.Context, string, string, *VaultsListOptions)` to `(context.Context, string, string, *VaultsClientListOptions)` -- Function `*VaultsClient.List` return value(s) have been changed from `(VaultsListResponse, error)` to `(VaultsClientListResponse, error)` -- Function `*VolumeGroupsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *VolumeGroupsGetOptions)` to `(context.Context, string, string, string, *VolumeGroupsClientGetOptions)` -- Function `*VolumeGroupsClient.Get` return value(s) have been changed from `(VolumeGroupsGetResponse, error)` to `(VolumeGroupsClientGetResponse, error)` -- Function `*BackupPoliciesClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, string, BackupPolicy, *BackupPoliciesBeginCreateOptions)` to `(context.Context, string, string, string, BackupPolicy, *BackupPoliciesClientBeginCreateOptions)` -- Function `*BackupPoliciesClient.BeginCreate` return value(s) have been changed from `(BackupPoliciesCreatePollerResponse, error)` to `(BackupPoliciesClientCreatePollerResponse, error)` -- Function `*AccountBackupsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *AccountBackupsGetOptions)` to `(context.Context, string, string, string, *AccountBackupsClientGetOptions)` -- Function `*AccountBackupsClient.Get` return value(s) have been changed from `(AccountBackupsGetResponse, error)` to `(AccountBackupsClientGetResponse, error)` -- Function `*PoolsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *PoolsGetOptions)` to `(context.Context, string, string, string, *PoolsClientGetOptions)` -- Function `*PoolsClient.Get` return value(s) have been changed from `(PoolsGetResponse, error)` to `(PoolsClientGetResponse, error)` -- Function `*SnapshotPoliciesClient.Create` parameter(s) have been changed from `(context.Context, string, string, string, SnapshotPolicy, *SnapshotPoliciesCreateOptions)` to `(context.Context, string, string, string, SnapshotPolicy, *SnapshotPoliciesClientCreateOptions)` -- Function `*SnapshotPoliciesClient.Create` return value(s) have been changed from `(SnapshotPoliciesCreateResponse, error)` to `(SnapshotPoliciesClientCreateResponse, error)` -- Function `*PoolsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, CapacityPoolPatch, *PoolsBeginUpdateOptions)` to `(context.Context, string, string, string, CapacityPoolPatch, *PoolsClientBeginUpdateOptions)` -- Function `*PoolsClient.BeginUpdate` return value(s) have been changed from `(PoolsUpdatePollerResponse, error)` to `(PoolsClientUpdatePollerResponse, error)` -- Function `*VolumesClient.BeginDeleteReplication` parameter(s) have been changed from `(context.Context, string, string, string, string, *VolumesBeginDeleteReplicationOptions)` to `(context.Context, string, string, string, string, *VolumesClientBeginDeleteReplicationOptions)` -- Function `*VolumesClient.BeginDeleteReplication` return value(s) have been changed from `(VolumesDeleteReplicationPollerResponse, error)` to `(VolumesClientDeleteReplicationPollerResponse, error)` -- Function `*VolumesClient.BeginRevert` parameter(s) have been changed from `(context.Context, string, string, string, string, VolumeRevert, *VolumesBeginRevertOptions)` to `(context.Context, string, string, string, string, VolumeRevert, *VolumesClientBeginRevertOptions)` -- Function `*VolumesClient.BeginRevert` return value(s) have been changed from `(VolumesRevertPollerResponse, error)` to `(VolumesClientRevertPollerResponse, error)` -- Function `*VolumesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, Volume, *VolumesBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, Volume, *VolumesClientBeginCreateOrUpdateOptions)` -- Function `*VolumesClient.BeginCreateOrUpdate` return value(s) have been changed from `(VolumesCreateOrUpdatePollerResponse, error)` to `(VolumesClientCreateOrUpdatePollerResponse, error)` -- Function `*VolumesClient.BeginBreakReplication` parameter(s) have been changed from `(context.Context, string, string, string, string, *VolumesBeginBreakReplicationOptions)` to `(context.Context, string, string, string, string, *VolumesClientBeginBreakReplicationOptions)` -- Function `*VolumesClient.BeginBreakReplication` return value(s) have been changed from `(VolumesBreakReplicationPollerResponse, error)` to `(VolumesClientBreakReplicationPollerResponse, error)` -- Function `*BackupPoliciesClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, BackupPolicyPatch, *BackupPoliciesBeginUpdateOptions)` to `(context.Context, string, string, string, BackupPolicyPatch, *BackupPoliciesClientBeginUpdateOptions)` -- Function `*BackupPoliciesClient.BeginUpdate` return value(s) have been changed from `(BackupPoliciesUpdatePollerResponse, error)` to `(BackupPoliciesClientUpdatePollerResponse, error)` -- Function `*AccountsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *AccountsGetOptions)` to `(context.Context, string, string, *AccountsClientGetOptions)` -- Function `*AccountsClient.Get` return value(s) have been changed from `(AccountsGetResponse, error)` to `(AccountsClientGetResponse, error)` -- Function `*BackupPoliciesClient.List` parameter(s) have been changed from `(context.Context, string, string, *BackupPoliciesListOptions)` to `(context.Context, string, string, *BackupPoliciesClientListOptions)` -- Function `*BackupPoliciesClient.List` return value(s) have been changed from `(BackupPoliciesListResponse, error)` to `(BackupPoliciesClientListResponse, error)` -- Function `*VolumesClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, VolumePatch, *VolumesBeginUpdateOptions)` to `(context.Context, string, string, string, string, VolumePatch, *VolumesClientBeginUpdateOptions)` -- Function `*VolumesClient.BeginUpdate` return value(s) have been changed from `(VolumesUpdatePollerResponse, error)` to `(VolumesClientUpdatePollerResponse, error)` -- Function `*BackupsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *BackupsBeginUpdateOptions)` to `(context.Context, string, string, string, string, string, *BackupsClientBeginUpdateOptions)` -- Function `*BackupsClient.BeginUpdate` return value(s) have been changed from `(BackupsUpdatePollerResponse, error)` to `(BackupsClientUpdatePollerResponse, error)` -- Function `*VolumesClient.BeginResyncReplication` parameter(s) have been changed from `(context.Context, string, string, string, string, *VolumesBeginResyncReplicationOptions)` to `(context.Context, string, string, string, string, *VolumesClientBeginResyncReplicationOptions)` -- Function `*VolumesClient.BeginResyncReplication` return value(s) have been changed from `(VolumesResyncReplicationPollerResponse, error)` to `(VolumesClientResyncReplicationPollerResponse, error)` -- Function `*BackupsClient.GetVolumeRestoreStatus` parameter(s) have been changed from `(context.Context, string, string, string, string, *BackupsGetVolumeRestoreStatusOptions)` to `(context.Context, string, string, string, string, *BackupsClientGetVolumeRestoreStatusOptions)` -- Function `*BackupsClient.GetVolumeRestoreStatus` return value(s) have been changed from `(BackupsGetVolumeRestoreStatusResponse, error)` to `(BackupsClientGetVolumeRestoreStatusResponse, error)` -- Function `*PoolsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, CapacityPool, *PoolsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, CapacityPool, *PoolsClientBeginCreateOrUpdateOptions)` -- Function `*PoolsClient.BeginCreateOrUpdate` return value(s) have been changed from `(PoolsCreateOrUpdatePollerResponse, error)` to `(PoolsClientCreateOrUpdatePollerResponse, error)` -- Function `*AccountsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, NetAppAccountPatch, *AccountsBeginUpdateOptions)` to `(context.Context, string, string, AccountPatch, *AccountsClientBeginUpdateOptions)` -- Function `*AccountsClient.BeginUpdate` return value(s) have been changed from `(AccountsUpdatePollerResponse, error)` to `(AccountsClientUpdatePollerResponse, error)` -- Function `*AccountsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *AccountsBeginDeleteOptions)` to `(context.Context, string, string, *AccountsClientBeginDeleteOptions)` -- Function `*AccountsClient.BeginDelete` return value(s) have been changed from `(AccountsDeletePollerResponse, error)` to `(AccountsClientDeletePollerResponse, error)` -- Function `*OperationsClient.List` parameter(s) have been changed from `(context.Context, *OperationsListOptions)` to `(context.Context, *OperationsClientListOptions)` -- Function `*OperationsClient.List` return value(s) have been changed from `(OperationsListResponse, error)` to `(OperationsClientListResponse, error)` -- Function `*AccountsClient.ListBySubscription` parameter(s) have been changed from `(*AccountsListBySubscriptionOptions)` to `(*AccountsClientListBySubscriptionOptions)` -- Function `*AccountsClient.ListBySubscription` return value(s) have been changed from `(*AccountsListBySubscriptionPager)` to `(*AccountsClientListBySubscriptionPager)` -- Function `*SnapshotPoliciesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *SnapshotPoliciesBeginDeleteOptions)` to `(context.Context, string, string, string, *SnapshotPoliciesClientBeginDeleteOptions)` -- Function `*SnapshotPoliciesClient.BeginDelete` return value(s) have been changed from `(SnapshotPoliciesDeletePollerResponse, error)` to `(SnapshotPoliciesClientDeletePollerResponse, error)` -- Function `*AccountsClient.List` parameter(s) have been changed from `(string, *AccountsListOptions)` to `(string, *AccountsClientListOptions)` -- Function `*AccountsClient.List` return value(s) have been changed from `(*AccountsListPager)` to `(*AccountsClientListPager)` -- Function `*SnapshotPoliciesClient.List` parameter(s) have been changed from `(context.Context, string, string, *SnapshotPoliciesListOptions)` to `(context.Context, string, string, *SnapshotPoliciesClientListOptions)` -- Function `*SnapshotPoliciesClient.List` return value(s) have been changed from `(SnapshotPoliciesListResponse, error)` to `(SnapshotPoliciesClientListResponse, error)` -- Function `*PoolsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *PoolsBeginDeleteOptions)` to `(context.Context, string, string, string, *PoolsClientBeginDeleteOptions)` -- Function `*PoolsClient.BeginDelete` return value(s) have been changed from `(PoolsDeletePollerResponse, error)` to `(PoolsClientDeletePollerResponse, error)` -- Function `*VolumesClient.BeginReInitializeReplication` parameter(s) have been changed from `(context.Context, string, string, string, string, *VolumesBeginReInitializeReplicationOptions)` to `(context.Context, string, string, string, string, *VolumesClientBeginReInitializeReplicationOptions)` -- Function `*VolumesClient.BeginReInitializeReplication` return value(s) have been changed from `(VolumesReInitializeReplicationPollerResponse, error)` to `(VolumesClientReInitializeReplicationPollerResponse, error)` -- Function `*BackupsClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, string, string, string, Backup, *BackupsBeginCreateOptions)` to `(context.Context, string, string, string, string, string, Backup, *BackupsClientBeginCreateOptions)` -- Function `*BackupsClient.BeginCreate` return value(s) have been changed from `(BackupsCreatePollerResponse, error)` to `(BackupsClientCreatePollerResponse, error)` -- Function `*AccountBackupsClient.List` parameter(s) have been changed from `(context.Context, string, string, *AccountBackupsListOptions)` to `(context.Context, string, string, *AccountBackupsClientListOptions)` -- Function `*AccountBackupsClient.List` return value(s) have been changed from `(AccountBackupsListResponse, error)` to `(AccountBackupsClientListResponse, error)` -- Function `*PoolsClient.List` parameter(s) have been changed from `(string, string, *PoolsListOptions)` to `(string, string, *PoolsClientListOptions)` -- Function `*PoolsClient.List` return value(s) have been changed from `(*PoolsListPager)` to `(*PoolsClientListPager)` -- Function `*BackupPoliciesCreatePoller.Done` has been removed -- Function `BackupsUpdatePollerResponse.PollUntilDone` has been removed -- Function `BackupPoliciesUpdatePollerResponse.PollUntilDone` has been removed -- Function `*AccountsDeletePoller.Poll` has been removed -- Function `*VolumesResyncReplicationPoller.Poll` has been removed -- Function `NetAppAccountList.MarshalJSON` has been removed -- Function `VolumesReInitializeReplicationPollerResponse.PollUntilDone` has been removed -- Function `CloudError.Error` has been removed -- Function `*AccountsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*VolumesPoolChangePoller.ResumeToken` has been removed -- Function `*VolumesBreakReplicationPoller.Poll` has been removed -- Function `*BackupPoliciesDeletePoller.Poll` has been removed -- Function `*VolumesDeletePoller.Done` has been removed -- Function `*NetAppResourceClient.CheckQuotaAvailability` has been removed -- Function `*VolumeGroupsCreatePoller.Poll` has been removed -- Function `*VolumesRevertPoller.Poll` has been removed -- Function `*VolumesResyncReplicationPoller.FinalResponse` has been removed -- Function `AccountBackupsDeletePollerResponse.PollUntilDone` has been removed -- Function `*AccountBackupsDeletePollerResponse.Resume` has been removed -- Function `PoolsDeletePollerResponse.PollUntilDone` has been removed -- Function `*SnapshotsUpdatePollerResponse.Resume` has been removed -- Function `*VolumesPoolChangePoller.Poll` has been removed -- Function `*VolumesResyncReplicationPoller.ResumeToken` has been removed -- Function `*SnapshotsCreatePoller.ResumeToken` has been removed -- Function `*VolumesBreakReplicationPoller.FinalResponse` has been removed -- Function `*VolumesDeleteReplicationPoller.Poll` has been removed -- Function `*VolumesBreakReplicationPoller.Done` has been removed -- Function `VolumesRevertPollerResponse.PollUntilDone` has been removed -- Function `BackupsDeletePollerResponse.PollUntilDone` has been removed -- Function `*BackupsUpdatePoller.Poll` has been removed -- Function `*VolumesReInitializeReplicationPoller.FinalResponse` has been removed -- Function `*AccountsDeletePollerResponse.Resume` has been removed -- Function `*BackupsCreatePoller.ResumeToken` has been removed -- Function `SnapshotsDeletePollerResponse.PollUntilDone` has been removed -- Function `*VolumesReInitializeReplicationPoller.Done` has been removed -- Function `*SnapshotPoliciesDeletePoller.ResumeToken` has been removed -- Function `*VolumesUpdatePoller.ResumeToken` has been removed -- Function `*SnapshotsCreatePollerResponse.Resume` has been removed -- Function `*SnapshotPoliciesDeletePoller.FinalResponse` has been removed -- Function `SnapshotsUpdatePollerResponse.PollUntilDone` has been removed -- Function `*PoolsUpdatePoller.FinalResponse` has been removed -- Function `NewNetAppResourceClient` has been removed -- Function `*AccountsDeletePoller.FinalResponse` has been removed -- Function `*VolumeGroupsDeletePoller.Done` has been removed -- Function `*BackupPoliciesUpdatePoller.ResumeToken` has been removed -- Function `SnapshotsCreatePollerResponse.PollUntilDone` has been removed -- Function `*BackupPoliciesCreatePoller.FinalResponse` has been removed -- Function `*SnapshotPoliciesUpdatePollerResponse.Resume` has been removed -- Function `SnapshotPoliciesDeletePollerResponse.PollUntilDone` has been removed -- Function `*BackupPoliciesCreatePollerResponse.Resume` has been removed -- Function `*VolumesPoolChangePoller.FinalResponse` has been removed -- Function `*BackupsUpdatePoller.ResumeToken` has been removed -- Function `*VolumesRevertPoller.Done` has been removed -- Function `*SnapshotsDeletePoller.Poll` has been removed -- Function `*PoolsDeletePoller.FinalResponse` has been removed -- Function `*AccountBackupsDeletePoller.Done` has been removed -- Function `*VolumesAuthorizeReplicationPoller.ResumeToken` has been removed -- Function `*VolumeGroupsCreatePoller.Done` has been removed -- Function `*PoolsCreateOrUpdatePoller.Done` has been removed -- Function `*SnapshotsCreatePoller.FinalResponse` has been removed -- Function `*BackupPoliciesCreatePoller.ResumeToken` has been removed -- Function `*VolumesResyncReplicationPoller.Done` has been removed -- Function `*BackupsCreatePoller.Poll` has been removed -- Function `*VolumesResyncReplicationPollerResponse.Resume` has been removed -- Function `NetAppAccount.MarshalJSON` has been removed -- Function `*AccountsCreateOrUpdatePoller.Done` has been removed -- Function `*VolumesBreakReplicationPollerResponse.Resume` has been removed -- Function `*VolumesAuthorizeReplicationPoller.Poll` has been removed -- Function `*VolumesUpdatePollerResponse.Resume` has been removed -- Function `*PoolsDeletePoller.ResumeToken` has been removed -- Function `*VolumesUpdatePoller.Poll` has been removed -- Function `*SnapshotsCreatePoller.Done` has been removed -- Function `*AccountsDeletePoller.Done` has been removed -- Function `*VolumeGroupsCreatePoller.FinalResponse` has been removed -- Function `*AccountsCreateOrUpdatePoller.Poll` has been removed -- Function `*VolumesPoolChangePollerResponse.Resume` has been removed -- Function `*PoolsDeletePollerResponse.Resume` has been removed -- Function `*BackupsDeletePoller.FinalResponse` has been removed -- Function `*PoolsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `VolumesAuthorizeReplicationPollerResponse.PollUntilDone` has been removed -- Function `*VolumesDeleteReplicationPoller.FinalResponse` has been removed -- Function `*SnapshotsCreatePoller.Poll` has been removed -- Function `*SnapshotPoliciesDeletePollerResponse.Resume` has been removed -- Function `*VolumesAuthorizeReplicationPollerResponse.Resume` has been removed -- Function `*VolumesPoolChangePoller.Done` has been removed -- Function `*VolumeGroupsDeletePoller.FinalResponse` has been removed -- Function `*VolumesCreateOrUpdatePoller.Done` has been removed -- Function `*PoolsUpdatePoller.Poll` has been removed -- Function `*BackupsCreatePoller.FinalResponse` has been removed -- Function `*BackupPoliciesUpdatePoller.FinalResponse` has been removed -- Function `*BackupsUpdatePollerResponse.Resume` has been removed -- Function `*PoolsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `VolumesResyncReplicationPollerResponse.PollUntilDone` has been removed -- Function `*NetAppResourceQuotaLimitsClient.Get` has been removed -- Function `*SnapshotsUpdatePoller.Poll` has been removed -- Function `*VolumesCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*PoolsDeletePoller.Done` has been removed -- Function `*VolumesListPager.PageResponse` has been removed -- Function `*NetAppResourceClient.CheckFilePathAvailability` has been removed -- Function `*AccountsUpdatePoller.Done` has been removed -- Function `AccountsUpdatePollerResponse.PollUntilDone` has been removed -- Function `*VolumesDeletePoller.ResumeToken` has been removed -- Function `*AccountsDeletePoller.ResumeToken` has been removed -- Function `*BackupsCreatePoller.Done` has been removed -- Function `*PoolsListPager.NextPage` has been removed -- Function `*VolumesAuthorizeReplicationPoller.FinalResponse` has been removed -- Function `*BackupPoliciesUpdatePoller.Poll` has been removed -- Function `VolumesUpdatePollerResponse.PollUntilDone` has been removed -- Function `*PoolsListPager.PageResponse` has been removed -- Function `*VolumesListPager.NextPage` has been removed -- Function `*SnapshotsDeletePoller.Done` has been removed -- Function `*AccountsUpdatePollerResponse.Resume` has been removed -- Function `*BackupPoliciesUpdatePoller.Done` has been removed -- Function `*BackupPoliciesCreatePoller.Poll` has been removed -- Function `*AccountsListBySubscriptionPager.NextPage` has been removed -- Function `VolumesBreakReplicationPollerResponse.PollUntilDone` has been removed -- Function `*VolumeGroupsCreatePollerResponse.Resume` has been removed -- Function `BackupPoliciesCreatePollerResponse.PollUntilDone` has been removed -- Function `*AccountsListPager.PageResponse` has been removed -- Function `*VolumesAuthorizeReplicationPoller.Done` has been removed -- Function `*AccountBackupsDeletePoller.Poll` has been removed -- Function `*VolumesDeletePoller.FinalResponse` has been removed -- Function `*BackupsDeletePoller.Done` has been removed -- Function `*SnapshotsDeletePollerResponse.Resume` has been removed -- Function `*VolumesDeleteReplicationPoller.ResumeToken` has been removed -- Function `*VolumesRevertPollerResponse.Resume` has been removed -- Function `*SnapshotsDeletePoller.ResumeToken` has been removed -- Function `*AccountsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*BackupsUpdatePoller.Done` has been removed -- Function `*AccountsUpdatePoller.ResumeToken` has been removed -- Function `*AccountBackupsDeletePoller.ResumeToken` has been removed -- Function `*PoolsUpdatePoller.Done` has been removed -- Function `PoolsUpdatePollerResponse.PollUntilDone` has been removed -- Function `*SnapshotsDeletePoller.FinalResponse` has been removed -- Function `VolumeGroupsCreatePollerResponse.PollUntilDone` has been removed -- Function `*AccountsListBySubscriptionPager.Err` has been removed -- Function `*BackupPoliciesUpdatePollerResponse.Resume` has been removed -- Function `*SnapshotPoliciesUpdatePoller.FinalResponse` has been removed -- Function `*SnapshotPoliciesDeletePoller.Poll` has been removed -- Function `*VolumeGroupsDeletePoller.Poll` has been removed -- Function `*SnapshotsUpdatePoller.ResumeToken` has been removed -- Function `VolumesCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*VolumesReInitializeReplicationPoller.ResumeToken` has been removed -- Function `*SnapshotPoliciesUpdatePoller.Poll` has been removed -- Function `*BackupPoliciesDeletePoller.FinalResponse` has been removed -- Function `*VolumesListPager.Err` has been removed -- Function `*PoolsCreateOrUpdatePoller.Poll` has been removed -- Function `*AccountsListBySubscriptionPager.PageResponse` has been removed -- Function `VolumesDeletePollerResponse.PollUntilDone` has been removed -- Function `*VolumeGroupsDeletePoller.ResumeToken` has been removed -- Function `*VolumesDeletePoller.Poll` has been removed -- Function `*SnapshotPoliciesDeletePoller.Done` has been removed -- Function `VolumesDeleteReplicationPollerResponse.PollUntilDone` has been removed -- Function `*BackupPoliciesDeletePoller.Done` has been removed -- Function `*BackupsCreatePollerResponse.Resume` has been removed -- Function `PoolsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*VolumesUpdatePoller.Done` has been removed -- Function `*VolumesDeletePollerResponse.Resume` has been removed -- Function `*AccountsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*VolumeGroupsDeletePollerResponse.Resume` has been removed -- Function `*VolumesCreateOrUpdatePoller.FinalResponse` has been removed -- Function `VolumeGroupsDeletePollerResponse.PollUntilDone` has been removed -- Function `*VolumesCreateOrUpdatePoller.Poll` has been removed -- Function `*VolumesDeleteReplicationPoller.Done` has been removed -- Function `*AccountsListPager.NextPage` has been removed -- Function `*BackupPoliciesDeletePoller.ResumeToken` has been removed -- Function `*PoolsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*NetAppResourceQuotaLimitsClient.List` has been removed -- Function `*AccountsUpdatePoller.FinalResponse` has been removed -- Function `*AccountBackupsDeletePoller.FinalResponse` has been removed -- Function `*PoolsUpdatePollerResponse.Resume` has been removed -- Function `*PoolsUpdatePoller.ResumeToken` has been removed -- Function `*BackupsDeletePoller.Poll` has been removed -- Function `NewNetAppResourceQuotaLimitsClient` has been removed -- Function `*BackupPoliciesDeletePollerResponse.Resume` has been removed -- Function `BackupsCreatePollerResponse.PollUntilDone` has been removed -- Function `*VolumesBreakReplicationPoller.ResumeToken` has been removed -- Function `*VolumesRevertPoller.FinalResponse` has been removed -- Function `*VolumesReInitializeReplicationPollerResponse.Resume` has been removed -- Function `*PoolsDeletePoller.Poll` has been removed -- Function `*VolumesUpdatePoller.FinalResponse` has been removed -- Function `AccountsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*BackupsUpdatePoller.FinalResponse` has been removed -- Function `VolumesPoolChangePollerResponse.PollUntilDone` has been removed -- Function `*SnapshotsUpdatePoller.FinalResponse` has been removed -- Function `*VolumesReInitializeReplicationPoller.Poll` has been removed -- Function `*SnapshotPoliciesUpdatePoller.Done` has been removed -- Function `*PoolsListPager.Err` has been removed -- Function `BackupPoliciesDeletePollerResponse.PollUntilDone` has been removed -- Function `*VolumesCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*VolumesDeleteReplicationPollerResponse.Resume` has been removed -- Function `*VolumeGroupsCreatePoller.ResumeToken` has been removed -- Function `*NetAppResourceClient.CheckNameAvailability` has been removed -- Function `*AccountsListPager.Err` has been removed -- Function `*SnapshotPoliciesUpdatePoller.ResumeToken` has been removed -- Function `*VolumesRevertPoller.ResumeToken` has been removed -- Function `*AccountsUpdatePoller.Poll` has been removed -- Function `NetAppAccountPatch.MarshalJSON` has been removed -- Function `SnapshotPoliciesUpdatePollerResponse.PollUntilDone` has been removed -- Function `*SnapshotsUpdatePoller.Done` has been removed -- Function `*BackupsDeletePoller.ResumeToken` has been removed -- Function `*BackupsDeletePollerResponse.Resume` has been removed -- Function `AccountsDeletePollerResponse.PollUntilDone` has been removed -- Struct `AccountBackupsBeginDeleteOptions` has been removed -- Struct `AccountBackupsDeletePoller` has been removed -- Struct `AccountBackupsDeletePollerResponse` has been removed -- Struct `AccountBackupsDeleteResponse` has been removed -- Struct `AccountBackupsGetOptions` has been removed -- Struct `AccountBackupsGetResponse` has been removed -- Struct `AccountBackupsGetResult` has been removed -- Struct `AccountBackupsListOptions` has been removed -- Struct `AccountBackupsListResponse` has been removed -- Struct `AccountBackupsListResult` has been removed -- Struct `AccountsBeginCreateOrUpdateOptions` has been removed -- Struct `AccountsBeginDeleteOptions` has been removed -- Struct `AccountsBeginUpdateOptions` has been removed -- Struct `AccountsCreateOrUpdatePoller` has been removed -- Struct `AccountsCreateOrUpdatePollerResponse` has been removed -- Struct `AccountsCreateOrUpdateResponse` has been removed -- Struct `AccountsCreateOrUpdateResult` has been removed -- Struct `AccountsDeletePoller` has been removed -- Struct `AccountsDeletePollerResponse` has been removed -- Struct `AccountsDeleteResponse` has been removed -- Struct `AccountsGetOptions` has been removed -- Struct `AccountsGetResponse` has been removed -- Struct `AccountsGetResult` has been removed -- Struct `AccountsListBySubscriptionOptions` has been removed -- Struct `AccountsListBySubscriptionPager` has been removed -- Struct `AccountsListBySubscriptionResponse` has been removed -- Struct `AccountsListBySubscriptionResult` has been removed -- Struct `AccountsListOptions` has been removed -- Struct `AccountsListPager` has been removed -- Struct `AccountsListResponse` has been removed -- Struct `AccountsListResult` has been removed -- Struct `AccountsUpdatePoller` has been removed -- Struct `AccountsUpdatePollerResponse` has been removed -- Struct `AccountsUpdateResponse` has been removed -- Struct `AccountsUpdateResult` has been removed -- Struct `BackupPoliciesBeginCreateOptions` has been removed -- Struct `BackupPoliciesBeginDeleteOptions` has been removed -- Struct `BackupPoliciesBeginUpdateOptions` has been removed -- Struct `BackupPoliciesCreatePoller` has been removed -- Struct `BackupPoliciesCreatePollerResponse` has been removed -- Struct `BackupPoliciesCreateResponse` has been removed -- Struct `BackupPoliciesCreateResult` has been removed -- Struct `BackupPoliciesDeletePoller` has been removed -- Struct `BackupPoliciesDeletePollerResponse` has been removed -- Struct `BackupPoliciesDeleteResponse` has been removed -- Struct `BackupPoliciesGetOptions` has been removed -- Struct `BackupPoliciesGetResponse` has been removed -- Struct `BackupPoliciesGetResult` has been removed -- Struct `BackupPoliciesListOptions` has been removed -- Struct `BackupPoliciesListResponse` has been removed -- Struct `BackupPoliciesListResult` has been removed -- Struct `BackupPoliciesUpdatePoller` has been removed -- Struct `BackupPoliciesUpdatePollerResponse` has been removed -- Struct `BackupPoliciesUpdateResponse` has been removed -- Struct `BackupPoliciesUpdateResult` has been removed -- Struct `BackupsBeginCreateOptions` has been removed -- Struct `BackupsBeginDeleteOptions` has been removed -- Struct `BackupsBeginUpdateOptions` has been removed -- Struct `BackupsCreatePoller` has been removed -- Struct `BackupsCreatePollerResponse` has been removed -- Struct `BackupsCreateResponse` has been removed -- Struct `BackupsCreateResult` has been removed -- Struct `BackupsDeletePoller` has been removed -- Struct `BackupsDeletePollerResponse` has been removed -- Struct `BackupsDeleteResponse` has been removed -- Struct `BackupsGetOptions` has been removed -- Struct `BackupsGetResponse` has been removed -- Struct `BackupsGetResult` has been removed -- Struct `BackupsGetStatusOptions` has been removed -- Struct `BackupsGetStatusResponse` has been removed -- Struct `BackupsGetStatusResult` has been removed -- Struct `BackupsGetVolumeRestoreStatusOptions` has been removed -- Struct `BackupsGetVolumeRestoreStatusResponse` has been removed -- Struct `BackupsGetVolumeRestoreStatusResult` has been removed -- Struct `BackupsListOptions` has been removed -- Struct `BackupsListResponse` has been removed -- Struct `BackupsListResult` has been removed -- Struct `BackupsUpdatePoller` has been removed -- Struct `BackupsUpdatePollerResponse` has been removed -- Struct `BackupsUpdateResponse` has been removed -- Struct `BackupsUpdateResult` has been removed -- Struct `NetAppAccount` has been removed -- Struct `NetAppAccountList` has been removed -- Struct `NetAppAccountPatch` has been removed -- Struct `NetAppResourceCheckFilePathAvailabilityOptions` has been removed -- Struct `NetAppResourceCheckFilePathAvailabilityResponse` has been removed -- Struct `NetAppResourceCheckFilePathAvailabilityResult` has been removed -- Struct `NetAppResourceCheckNameAvailabilityOptions` has been removed -- Struct `NetAppResourceCheckNameAvailabilityResponse` has been removed -- Struct `NetAppResourceCheckNameAvailabilityResult` has been removed -- Struct `NetAppResourceCheckQuotaAvailabilityOptions` has been removed -- Struct `NetAppResourceCheckQuotaAvailabilityResponse` has been removed -- Struct `NetAppResourceCheckQuotaAvailabilityResult` has been removed -- Struct `NetAppResourceClient` has been removed -- Struct `NetAppResourceQuotaLimitsClient` has been removed -- Struct `NetAppResourceQuotaLimitsGetOptions` has been removed -- Struct `NetAppResourceQuotaLimitsGetResponse` has been removed -- Struct `NetAppResourceQuotaLimitsGetResult` has been removed -- Struct `NetAppResourceQuotaLimitsListOptions` has been removed -- Struct `NetAppResourceQuotaLimitsListResponse` has been removed -- Struct `NetAppResourceQuotaLimitsListResult` has been removed -- Struct `OperationsListOptions` has been removed -- Struct `OperationsListResponse` has been removed -- Struct `OperationsListResult` has been removed -- Struct `PoolsBeginCreateOrUpdateOptions` has been removed -- Struct `PoolsBeginDeleteOptions` has been removed -- Struct `PoolsBeginUpdateOptions` has been removed -- Struct `PoolsCreateOrUpdatePoller` has been removed -- Struct `PoolsCreateOrUpdatePollerResponse` has been removed -- Struct `PoolsCreateOrUpdateResponse` has been removed -- Struct `PoolsCreateOrUpdateResult` has been removed -- Struct `PoolsDeletePoller` has been removed -- Struct `PoolsDeletePollerResponse` has been removed -- Struct `PoolsDeleteResponse` has been removed -- Struct `PoolsGetOptions` has been removed -- Struct `PoolsGetResponse` has been removed -- Struct `PoolsGetResult` has been removed -- Struct `PoolsListOptions` has been removed -- Struct `PoolsListPager` has been removed -- Struct `PoolsListResponse` has been removed -- Struct `PoolsListResult` has been removed -- Struct `PoolsUpdatePoller` has been removed -- Struct `PoolsUpdatePollerResponse` has been removed -- Struct `PoolsUpdateResponse` has been removed -- Struct `PoolsUpdateResult` has been removed -- Struct `SnapshotPoliciesBeginDeleteOptions` has been removed -- Struct `SnapshotPoliciesBeginUpdateOptions` has been removed -- Struct `SnapshotPoliciesCreateOptions` has been removed -- Struct `SnapshotPoliciesCreateResponse` has been removed -- Struct `SnapshotPoliciesCreateResult` has been removed -- Struct `SnapshotPoliciesDeletePoller` has been removed -- Struct `SnapshotPoliciesDeletePollerResponse` has been removed -- Struct `SnapshotPoliciesDeleteResponse` has been removed -- Struct `SnapshotPoliciesGetOptions` has been removed -- Struct `SnapshotPoliciesGetResponse` has been removed -- Struct `SnapshotPoliciesGetResult` has been removed -- Struct `SnapshotPoliciesListOptions` has been removed -- Struct `SnapshotPoliciesListResponse` has been removed -- Struct `SnapshotPoliciesListResult` has been removed -- Struct `SnapshotPoliciesListVolumesOptions` has been removed -- Struct `SnapshotPoliciesListVolumesResponse` has been removed -- Struct `SnapshotPoliciesListVolumesResult` has been removed -- Struct `SnapshotPoliciesUpdatePoller` has been removed -- Struct `SnapshotPoliciesUpdatePollerResponse` has been removed -- Struct `SnapshotPoliciesUpdateResponse` has been removed -- Struct `SnapshotPoliciesUpdateResult` has been removed -- Struct `SnapshotsBeginCreateOptions` has been removed -- Struct `SnapshotsBeginDeleteOptions` has been removed -- Struct `SnapshotsBeginUpdateOptions` has been removed -- Struct `SnapshotsCreatePoller` has been removed -- Struct `SnapshotsCreatePollerResponse` has been removed -- Struct `SnapshotsCreateResponse` has been removed -- Struct `SnapshotsCreateResult` has been removed -- Struct `SnapshotsDeletePoller` has been removed -- Struct `SnapshotsDeletePollerResponse` has been removed -- Struct `SnapshotsDeleteResponse` has been removed -- Struct `SnapshotsGetOptions` has been removed -- Struct `SnapshotsGetResponse` has been removed -- Struct `SnapshotsGetResult` has been removed -- Struct `SnapshotsListOptions` has been removed -- Struct `SnapshotsListResponse` has been removed -- Struct `SnapshotsListResult` has been removed -- Struct `SnapshotsUpdatePoller` has been removed -- Struct `SnapshotsUpdatePollerResponse` has been removed -- Struct `SnapshotsUpdateResponse` has been removed -- Struct `SnapshotsUpdateResult` has been removed -- Struct `VaultsListOptions` has been removed -- Struct `VaultsListResponse` has been removed -- Struct `VaultsListResult` has been removed -- Struct `VolumeGroupsBeginCreateOptions` has been removed -- Struct `VolumeGroupsBeginDeleteOptions` has been removed -- Struct `VolumeGroupsCreatePoller` has been removed -- Struct `VolumeGroupsCreatePollerResponse` has been removed -- Struct `VolumeGroupsCreateResponse` has been removed -- Struct `VolumeGroupsCreateResult` has been removed -- Struct `VolumeGroupsDeletePoller` has been removed -- Struct `VolumeGroupsDeletePollerResponse` has been removed -- Struct `VolumeGroupsDeleteResponse` has been removed -- Struct `VolumeGroupsGetOptions` has been removed -- Struct `VolumeGroupsGetResponse` has been removed -- Struct `VolumeGroupsGetResult` has been removed -- Struct `VolumeGroupsListByNetAppAccountOptions` has been removed -- Struct `VolumeGroupsListByNetAppAccountResponse` has been removed -- Struct `VolumeGroupsListByNetAppAccountResult` has been removed -- Struct `VolumesAuthorizeReplicationPoller` has been removed -- Struct `VolumesAuthorizeReplicationPollerResponse` has been removed -- Struct `VolumesAuthorizeReplicationResponse` has been removed -- Struct `VolumesBeginAuthorizeReplicationOptions` has been removed -- Struct `VolumesBeginBreakReplicationOptions` has been removed -- Struct `VolumesBeginCreateOrUpdateOptions` has been removed -- Struct `VolumesBeginDeleteOptions` has been removed -- Struct `VolumesBeginDeleteReplicationOptions` has been removed -- Struct `VolumesBeginPoolChangeOptions` has been removed -- Struct `VolumesBeginReInitializeReplicationOptions` has been removed -- Struct `VolumesBeginResyncReplicationOptions` has been removed -- Struct `VolumesBeginRevertOptions` has been removed -- Struct `VolumesBeginUpdateOptions` has been removed -- Struct `VolumesBreakReplicationPoller` has been removed -- Struct `VolumesBreakReplicationPollerResponse` has been removed -- Struct `VolumesBreakReplicationResponse` has been removed -- Struct `VolumesCreateOrUpdatePoller` has been removed -- Struct `VolumesCreateOrUpdatePollerResponse` has been removed -- Struct `VolumesCreateOrUpdateResponse` has been removed -- Struct `VolumesCreateOrUpdateResult` has been removed -- Struct `VolumesDeletePoller` has been removed -- Struct `VolumesDeletePollerResponse` has been removed -- Struct `VolumesDeleteReplicationPoller` has been removed -- Struct `VolumesDeleteReplicationPollerResponse` has been removed -- Struct `VolumesDeleteReplicationResponse` has been removed -- Struct `VolumesDeleteResponse` has been removed -- Struct `VolumesGetOptions` has been removed -- Struct `VolumesGetResponse` has been removed -- Struct `VolumesGetResult` has been removed -- Struct `VolumesListOptions` has been removed -- Struct `VolumesListPager` has been removed -- Struct `VolumesListResponse` has been removed -- Struct `VolumesListResult` has been removed -- Struct `VolumesPoolChangePoller` has been removed -- Struct `VolumesPoolChangePollerResponse` has been removed -- Struct `VolumesPoolChangeResponse` has been removed -- Struct `VolumesReInitializeReplicationPoller` has been removed -- Struct `VolumesReInitializeReplicationPollerResponse` has been removed -- Struct `VolumesReInitializeReplicationResponse` has been removed -- Struct `VolumesReplicationStatusOptions` has been removed -- Struct `VolumesReplicationStatusResponse` has been removed -- Struct `VolumesReplicationStatusResult` has been removed -- Struct `VolumesResyncReplicationPoller` has been removed -- Struct `VolumesResyncReplicationPollerResponse` has been removed -- Struct `VolumesResyncReplicationResponse` has been removed -- Struct `VolumesRevertPoller` has been removed -- Struct `VolumesRevertPollerResponse` has been removed -- Struct `VolumesRevertResponse` has been removed -- Struct `VolumesUpdatePoller` has been removed -- Struct `VolumesUpdatePollerResponse` has been removed -- Struct `VolumesUpdateResponse` has been removed -- Struct `VolumesUpdateResult` has been removed -- Field `InnerError` of struct `CloudError` has been removed -- Field `Resource` of struct `ProxyResource` has been removed -- Field `ProxyResource` of struct `SubscriptionQuotaItem` has been removed - -### Features Added - -- New function `*PoolsClientDeletePollerResponse.Resume(context.Context, *PoolsClient, string) error` -- New function `*VolumesClientReInitializeReplicationPoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientUpdatePoller.FinalResponse(context.Context) (VolumesClientUpdateResponse, error)` -- New function `*BackupPoliciesClientUpdatePoller.FinalResponse(context.Context) (BackupPoliciesClientUpdateResponse, error)` -- New function `*BackupsClientUpdatePoller.ResumeToken() (string, error)` -- New function `AccountPatch.MarshalJSON() ([]byte, error)` -- New function `*BackupPoliciesClientCreatePollerResponse.Resume(context.Context, *BackupPoliciesClient, string) error` -- New function `*AccountsClientDeletePollerResponse.Resume(context.Context, *AccountsClient, string) error` -- New function `*BackupsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*SnapshotsClientCreatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*SnapshotsClientCreatePoller.Done() bool` -- New function `*VolumeGroupsClientCreatePoller.ResumeToken() (string, error)` -- New function `*PoolsClientListPager.PageResponse() PoolsClientListResponse` -- New function `*PoolsClientCreateOrUpdatePoller.Done() bool` -- New function `*SnapshotPoliciesClientDeletePollerResponse.Resume(context.Context, *SnapshotPoliciesClient, string) error` -- New function `*PoolsClientListPager.NextPage(context.Context) bool` -- New function `*VolumeGroupsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*BackupPoliciesClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*BackupsClientDeletePollerResponse.Resume(context.Context, *BackupsClient, string) error` -- New function `BackupPoliciesClientCreatePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupPoliciesClientCreateResponse, error)` -- New function `*AccountsClientUpdatePoller.ResumeToken() (string, error)` -- New function `*VolumesClientBreakReplicationPoller.Done() bool` -- New function `*AccountsClientCreateOrUpdatePoller.FinalResponse(context.Context) (AccountsClientCreateOrUpdateResponse, error)` -- New function `*AccountsClientUpdatePoller.Done() bool` -- New function `*AccountBackupsClientDeletePollerResponse.Resume(context.Context, *AccountBackupsClient, string) error` -- New function `*BackupsClientDeletePoller.Done() bool` -- New function `VolumesClientResyncReplicationPollerResponse.PollUntilDone(context.Context, time.Duration) (VolumesClientResyncReplicationResponse, error)` -- New function `*BackupPoliciesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientPoolChangePollerResponse.Resume(context.Context, *VolumesClient, string) error` -- New function `*BackupsClientUpdatePoller.Done() bool` -- New function `*VolumeGroupsClientDeletePoller.FinalResponse(context.Context) (VolumeGroupsClientDeleteResponse, error)` -- New function `*PoolsClientDeletePoller.Done() bool` -- New function `*VolumesClientResyncReplicationPoller.Done() bool` -- New function `*SnapshotsClientUpdatePollerResponse.Resume(context.Context, *SnapshotsClient, string) error` -- New function `*AccountBackupsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*AccountsClientDeletePoller.FinalResponse(context.Context) (AccountsClientDeleteResponse, error)` -- New function `*VolumesClientPoolChangePoller.FinalResponse(context.Context) (VolumesClientPoolChangeResponse, error)` -- New function `*PoolsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `VolumesClientBreakReplicationPollerResponse.PollUntilDone(context.Context, time.Duration) (VolumesClientBreakReplicationResponse, error)` -- New function `SnapshotsClientCreatePollerResponse.PollUntilDone(context.Context, time.Duration) (SnapshotsClientCreateResponse, error)` -- New function `*SnapshotsClientCreatePoller.ResumeToken() (string, error)` -- New function `*BackupPoliciesClientUpdatePoller.ResumeToken() (string, error)` -- New function `*BackupPoliciesClientCreatePoller.Done() bool` -- New function `*PoolsClientCreateOrUpdatePollerResponse.Resume(context.Context, *PoolsClient, string) error` -- New function `*VolumesClientCreateOrUpdatePoller.Done() bool` -- New function `PoolsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (PoolsClientUpdateResponse, error)` -- New function `*VolumesClientUpdatePollerResponse.Resume(context.Context, *VolumesClient, string) error` -- New function `VolumesClientRevertPollerResponse.PollUntilDone(context.Context, time.Duration) (VolumesClientRevertResponse, error)` -- New function `*BackupPoliciesClientUpdatePoller.Done() bool` -- New function `NewResourceQuotaLimitsClient(string, azcore.TokenCredential, *arm.ClientOptions) *ResourceQuotaLimitsClient` -- New function `*AccountsClientListBySubscriptionPager.PageResponse() AccountsClientListBySubscriptionResponse` -- New function `VolumeGroupsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (VolumeGroupsClientDeleteResponse, error)` -- New function `*VolumesClientBreakReplicationPoller.ResumeToken() (string, error)` -- New function `*BackupsClientUpdatePollerResponse.Resume(context.Context, *BackupsClient, string) error` -- New function `*VolumesClientPoolChangePoller.ResumeToken() (string, error)` -- New function `*VolumeGroupsClientDeletePoller.Done() bool` -- New function `*VolumesClientPoolChangePoller.Done() bool` -- New function `*VolumesClientBreakReplicationPollerResponse.Resume(context.Context, *VolumesClient, string) error` -- New function `*SnapshotsClientUpdatePoller.Done() bool` -- New function `*AccountsClientDeletePoller.Done() bool` -- New function `VolumesClientDeleteReplicationPollerResponse.PollUntilDone(context.Context, time.Duration) (VolumesClientDeleteReplicationResponse, error)` -- New function `*PoolsClientListPager.Err() error` -- New function `*AccountsClientListPager.PageResponse() AccountsClientListResponse` -- New function `BackupsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupsClientDeleteResponse, error)` -- New function `*AccountsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `AccountsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (AccountsClientUpdateResponse, error)` -- New function `*SnapshotsClientDeletePoller.ResumeToken() (string, error)` -- New function `*AccountsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*BackupsClientDeletePoller.FinalResponse(context.Context) (BackupsClientDeleteResponse, error)` -- New function `*VolumesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientListPager.NextPage(context.Context) bool` -- New function `*SnapshotsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*AccountBackupsClientDeletePoller.ResumeToken() (string, error)` -- New function `*VolumeGroupsClientCreatePoller.Done() bool` -- New function `*VolumesClientRevertPoller.FinalResponse(context.Context) (VolumesClientRevertResponse, error)` -- New function `*SnapshotsClientUpdatePoller.ResumeToken() (string, error)` -- New function `VolumesClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (VolumesClientUpdateResponse, error)` -- New function `*SnapshotsClientUpdatePoller.FinalResponse(context.Context) (SnapshotsClientUpdateResponse, error)` -- New function `*PoolsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientDeletePollerResponse.Resume(context.Context, *VolumesClient, string) error` -- New function `*VolumesClientListPager.PageResponse() VolumesClientListResponse` -- New function `*AccountsClientListBySubscriptionPager.Err() error` -- New function `*VolumesClientRevertPollerResponse.Resume(context.Context, *VolumesClient, string) error` -- New function `*SnapshotPoliciesClientDeletePoller.Done() bool` -- New function `*PoolsClientDeletePoller.FinalResponse(context.Context) (PoolsClientDeleteResponse, error)` -- New function `*VolumesClientDeleteReplicationPollerResponse.Resume(context.Context, *VolumesClient, string) error` -- New function `VolumesClientAuthorizeReplicationPollerResponse.PollUntilDone(context.Context, time.Duration) (VolumesClientAuthorizeReplicationResponse, error)` -- New function `*BackupsClientCreatePollerResponse.Resume(context.Context, *BackupsClient, string) error` -- New function `*BackupPoliciesClientDeletePoller.FinalResponse(context.Context) (BackupPoliciesClientDeleteResponse, error)` -- New function `*VolumesClientListPager.Err() error` -- New function `*SnapshotsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientDeleteReplicationPoller.Poll(context.Context) (*http.Response, error)` -- New function `*BackupPoliciesClientCreatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientDeletePoller.FinalResponse(context.Context) (VolumesClientDeleteResponse, error)` -- New function `*SnapshotsClientDeletePoller.Done() bool` -- New function `*VolumesClientResyncReplicationPollerResponse.Resume(context.Context, *VolumesClient, string) error` -- New function `*SnapshotsClientDeletePoller.FinalResponse(context.Context) (SnapshotsClientDeleteResponse, error)` -- New function `*AccountBackupsClientDeletePoller.Done() bool` -- New function `SnapshotPoliciesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (SnapshotPoliciesClientDeleteResponse, error)` -- New function `*BackupPoliciesClientDeletePoller.Done() bool` -- New function `*SnapshotPoliciesClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*AccountsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientReInitializeReplicationPoller.ResumeToken() (string, error)` -- New function `*AccountBackupsClientDeletePoller.FinalResponse(context.Context) (AccountBackupsClientDeleteResponse, error)` -- New function `*PoolsClientUpdatePoller.Done() bool` -- New function `*VolumesClientResyncReplicationPoller.ResumeToken() (string, error)` -- New function `*VolumeGroupsClientDeletePoller.ResumeToken() (string, error)` -- New function `NewResourceClient(string, azcore.TokenCredential, *arm.ClientOptions) *ResourceClient` -- New function `*PoolsClientUpdatePoller.FinalResponse(context.Context) (PoolsClientUpdateResponse, error)` -- New function `*BackupsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*AccountsClientListPager.Err() error` -- New function `*VolumesClientRevertPoller.ResumeToken() (string, error)` -- New function `*BackupPoliciesClientCreatePoller.FinalResponse(context.Context) (BackupPoliciesClientCreateResponse, error)` -- New function `VolumesClientReInitializeReplicationPollerResponse.PollUntilDone(context.Context, time.Duration) (VolumesClientReInitializeReplicationResponse, error)` -- New function `*VolumesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientResyncReplicationPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ResourceQuotaLimitsClient.Get(context.Context, string, string, *ResourceQuotaLimitsClientGetOptions) (ResourceQuotaLimitsClientGetResponse, error)` -- New function `*SnapshotPoliciesClientDeletePoller.FinalResponse(context.Context) (SnapshotPoliciesClientDeleteResponse, error)` -- New function `*BackupsClientDeletePoller.ResumeToken() (string, error)` -- New function `*SnapshotsClientDeletePollerResponse.Resume(context.Context, *SnapshotsClient, string) error` -- New function `BackupsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupsClientUpdateResponse, error)` -- New function `*VolumeGroupsClientCreatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*SnapshotPoliciesClientUpdatePoller.FinalResponse(context.Context) (SnapshotPoliciesClientUpdateResponse, error)` -- New function `*VolumesClientAuthorizeReplicationPoller.Done() bool` -- New function `*BackupsClientUpdatePoller.FinalResponse(context.Context) (BackupsClientUpdateResponse, error)` -- New function `*VolumeGroupsClientCreatePollerResponse.Resume(context.Context, *VolumeGroupsClient, string) error` -- New function `*AccountsClientCreateOrUpdatePollerResponse.Resume(context.Context, *AccountsClient, string) error` -- New function `VolumesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (VolumesClientCreateOrUpdateResponse, error)` -- New function `*AccountsClientUpdatePollerResponse.Resume(context.Context, *AccountsClient, string) error` -- New function `*VolumesClientDeleteReplicationPoller.FinalResponse(context.Context) (VolumesClientDeleteReplicationResponse, error)` -- New function `BackupsClientCreatePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupsClientCreateResponse, error)` -- New function `*BackupsClientCreatePoller.Poll(context.Context) (*http.Response, error)` -- New function `VolumesClientPoolChangePollerResponse.PollUntilDone(context.Context, time.Duration) (VolumesClientPoolChangeResponse, error)` -- New function `*BackupsClientCreatePoller.Done() bool` -- New function `*VolumesClientAuthorizeReplicationPoller.FinalResponse(context.Context) (VolumesClientAuthorizeReplicationResponse, error)` -- New function `*VolumesClientResyncReplicationPoller.FinalResponse(context.Context) (VolumesClientResyncReplicationResponse, error)` -- New function `*VolumesClientBreakReplicationPoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientUpdatePoller.ResumeToken() (string, error)` -- New function `*VolumesClientAuthorizeReplicationPoller.ResumeToken() (string, error)` -- New function `*AccountsClientDeletePoller.ResumeToken() (string, error)` -- New function `AccountsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (AccountsClientDeleteResponse, error)` -- New function `*VolumesClientDeleteReplicationPoller.ResumeToken() (string, error)` -- New function `*BackupPoliciesClientUpdatePollerResponse.Resume(context.Context, *BackupPoliciesClient, string) error` -- New function `*PoolsClientUpdatePollerResponse.Resume(context.Context, *PoolsClient, string) error` -- New function `AccountList.MarshalJSON() ([]byte, error)` -- New function `*VolumesClientUpdatePoller.Done() bool` -- New function `*VolumesClientCreateOrUpdatePollerResponse.Resume(context.Context, *VolumesClient, string) error` -- New function `*VolumesClientReInitializeReplicationPoller.FinalResponse(context.Context) (VolumesClientReInitializeReplicationResponse, error)` -- New function `*SnapshotPoliciesClientUpdatePollerResponse.Resume(context.Context, *SnapshotPoliciesClient, string) error` -- New function `*VolumesClientCreateOrUpdatePoller.FinalResponse(context.Context) (VolumesClientCreateOrUpdateResponse, error)` -- New function `*PoolsClientUpdatePoller.ResumeToken() (string, error)` -- New function `BackupPoliciesClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupPoliciesClientUpdateResponse, error)` -- New function `*VolumesClientDeleteReplicationPoller.Done() bool` -- New function `SnapshotsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (SnapshotsClientUpdateResponse, error)` -- New function `*BackupsClientCreatePoller.FinalResponse(context.Context) (BackupsClientCreateResponse, error)` -- New function `*PoolsClientCreateOrUpdatePoller.FinalResponse(context.Context) (PoolsClientCreateOrUpdateResponse, error)` -- New function `AccountBackupsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (AccountBackupsClientDeleteResponse, error)` -- New function `PoolsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (PoolsClientCreateOrUpdateResponse, error)` -- New function `*VolumesClientReInitializeReplicationPollerResponse.Resume(context.Context, *VolumesClient, string) error` -- New function `*BackupPoliciesClientDeletePoller.ResumeToken() (string, error)` -- New function `*SnapshotsClientCreatePollerResponse.Resume(context.Context, *SnapshotsClient, string) error` -- New function `*SnapshotPoliciesClientUpdatePoller.Done() bool` -- New function `*ResourceQuotaLimitsClient.List(context.Context, string, *ResourceQuotaLimitsClientListOptions) (ResourceQuotaLimitsClientListResponse, error)` -- New function `*SnapshotsClientCreatePoller.FinalResponse(context.Context) (SnapshotsClientCreateResponse, error)` -- New function `*BackupPoliciesClientCreatePoller.ResumeToken() (string, error)` -- New function `*AccountsClientCreateOrUpdatePoller.Done() bool` -- New function `*VolumesClientAuthorizeReplicationPoller.Poll(context.Context) (*http.Response, error)` -- New function `AccountsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (AccountsClientCreateOrUpdateResponse, error)` -- New function `*VolumeGroupsClientDeletePollerResponse.Resume(context.Context, *VolumeGroupsClient, string) error` -- New function `PoolsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (PoolsClientDeleteResponse, error)` -- New function `SnapshotPoliciesClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (SnapshotPoliciesClientUpdateResponse, error)` -- New function `*VolumesClientBreakReplicationPoller.FinalResponse(context.Context) (VolumesClientBreakReplicationResponse, error)` -- New function `*VolumeGroupsClientCreatePoller.FinalResponse(context.Context) (VolumeGroupsClientCreateResponse, error)` -- New function `*ResourceClient.CheckQuotaAvailability(context.Context, string, QuotaAvailabilityRequest, *ResourceClientCheckQuotaAvailabilityOptions) (ResourceClientCheckQuotaAvailabilityResponse, error)` -- New function `*PoolsClientDeletePoller.ResumeToken() (string, error)` -- New function `*BackupsClientCreatePoller.ResumeToken() (string, error)` -- New function `*BackupPoliciesClientDeletePollerResponse.Resume(context.Context, *BackupPoliciesClient, string) error` -- New function `*VolumesClientRevertPoller.Poll(context.Context) (*http.Response, error)` -- New function `*SnapshotPoliciesClientUpdatePoller.ResumeToken() (string, error)` -- New function `*VolumesClientDeletePoller.Done() bool` -- New function `*ResourceClient.CheckNameAvailability(context.Context, string, ResourceNameAvailabilityRequest, *ResourceClientCheckNameAvailabilityOptions) (ResourceClientCheckNameAvailabilityResponse, error)` -- New function `SnapshotsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (SnapshotsClientDeleteResponse, error)` -- New function `VolumesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (VolumesClientDeleteResponse, error)` -- New function `Account.MarshalJSON() ([]byte, error)` -- New function `*AccountsClientUpdatePoller.FinalResponse(context.Context) (AccountsClientUpdateResponse, error)` -- New function `*AccountsClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*VolumesClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*VolumesClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientReInitializeReplicationPoller.Done() bool` -- New function `*SnapshotPoliciesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientPoolChangePoller.Poll(context.Context) (*http.Response, error)` -- New function `VolumeGroupsClientCreatePollerResponse.PollUntilDone(context.Context, time.Duration) (VolumeGroupsClientCreateResponse, error)` -- New function `*ResourceClient.CheckFilePathAvailability(context.Context, string, FilePathAvailabilityRequest, *ResourceClientCheckFilePathAvailabilityOptions) (ResourceClientCheckFilePathAvailabilityResponse, error)` -- New function `*VolumesClientDeletePoller.ResumeToken() (string, error)` -- New function `*VolumesClientRevertPoller.Done() bool` -- New function `*SnapshotPoliciesClientDeletePoller.ResumeToken() (string, error)` -- New function `BackupPoliciesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (BackupPoliciesClientDeleteResponse, error)` -- New function `*AccountsClientListPager.NextPage(context.Context) bool` -- New function `*AccountsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*PoolsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*PoolsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*VolumesClientAuthorizeReplicationPollerResponse.Resume(context.Context, *VolumesClient, string) error` -- New struct `Account` -- New struct `AccountBackupsClientBeginDeleteOptions` -- New struct `AccountBackupsClientDeletePoller` -- New struct `AccountBackupsClientDeletePollerResponse` -- New struct `AccountBackupsClientDeleteResponse` -- New struct `AccountBackupsClientGetOptions` -- New struct `AccountBackupsClientGetResponse` -- New struct `AccountBackupsClientGetResult` -- New struct `AccountBackupsClientListOptions` -- New struct `AccountBackupsClientListResponse` -- New struct `AccountBackupsClientListResult` -- New struct `AccountList` -- New struct `AccountPatch` -- New struct `AccountsClientBeginCreateOrUpdateOptions` -- New struct `AccountsClientBeginDeleteOptions` -- New struct `AccountsClientBeginUpdateOptions` -- New struct `AccountsClientCreateOrUpdatePoller` -- New struct `AccountsClientCreateOrUpdatePollerResponse` -- New struct `AccountsClientCreateOrUpdateResponse` -- New struct `AccountsClientCreateOrUpdateResult` -- New struct `AccountsClientDeletePoller` -- New struct `AccountsClientDeletePollerResponse` -- New struct `AccountsClientDeleteResponse` -- New struct `AccountsClientGetOptions` -- New struct `AccountsClientGetResponse` -- New struct `AccountsClientGetResult` -- New struct `AccountsClientListBySubscriptionOptions` -- New struct `AccountsClientListBySubscriptionPager` -- New struct `AccountsClientListBySubscriptionResponse` -- New struct `AccountsClientListBySubscriptionResult` -- New struct `AccountsClientListOptions` -- New struct `AccountsClientListPager` -- New struct `AccountsClientListResponse` -- New struct `AccountsClientListResult` -- New struct `AccountsClientUpdatePoller` -- New struct `AccountsClientUpdatePollerResponse` -- New struct `AccountsClientUpdateResponse` -- New struct `AccountsClientUpdateResult` -- New struct `BackupPoliciesClientBeginCreateOptions` -- New struct `BackupPoliciesClientBeginDeleteOptions` -- New struct `BackupPoliciesClientBeginUpdateOptions` -- New struct `BackupPoliciesClientCreatePoller` -- New struct `BackupPoliciesClientCreatePollerResponse` -- New struct `BackupPoliciesClientCreateResponse` -- New struct `BackupPoliciesClientCreateResult` -- New struct `BackupPoliciesClientDeletePoller` -- New struct `BackupPoliciesClientDeletePollerResponse` -- New struct `BackupPoliciesClientDeleteResponse` -- New struct `BackupPoliciesClientGetOptions` -- New struct `BackupPoliciesClientGetResponse` -- New struct `BackupPoliciesClientGetResult` -- New struct `BackupPoliciesClientListOptions` -- New struct `BackupPoliciesClientListResponse` -- New struct `BackupPoliciesClientListResult` -- New struct `BackupPoliciesClientUpdatePoller` -- New struct `BackupPoliciesClientUpdatePollerResponse` -- New struct `BackupPoliciesClientUpdateResponse` -- New struct `BackupPoliciesClientUpdateResult` -- New struct `BackupsClientBeginCreateOptions` -- New struct `BackupsClientBeginDeleteOptions` -- New struct `BackupsClientBeginUpdateOptions` -- New struct `BackupsClientCreatePoller` -- New struct `BackupsClientCreatePollerResponse` -- New struct `BackupsClientCreateResponse` -- New struct `BackupsClientCreateResult` -- New struct `BackupsClientDeletePoller` -- New struct `BackupsClientDeletePollerResponse` -- New struct `BackupsClientDeleteResponse` -- New struct `BackupsClientGetOptions` -- New struct `BackupsClientGetResponse` -- New struct `BackupsClientGetResult` -- New struct `BackupsClientGetStatusOptions` -- New struct `BackupsClientGetStatusResponse` -- New struct `BackupsClientGetStatusResult` -- New struct `BackupsClientGetVolumeRestoreStatusOptions` -- New struct `BackupsClientGetVolumeRestoreStatusResponse` -- New struct `BackupsClientGetVolumeRestoreStatusResult` -- New struct `BackupsClientListOptions` -- New struct `BackupsClientListResponse` -- New struct `BackupsClientListResult` -- New struct `BackupsClientUpdatePoller` -- New struct `BackupsClientUpdatePollerResponse` -- New struct `BackupsClientUpdateResponse` -- New struct `BackupsClientUpdateResult` -- New struct `OperationsClientListOptions` -- New struct `OperationsClientListResponse` -- New struct `OperationsClientListResult` -- New struct `PoolsClientBeginCreateOrUpdateOptions` -- New struct `PoolsClientBeginDeleteOptions` -- New struct `PoolsClientBeginUpdateOptions` -- New struct `PoolsClientCreateOrUpdatePoller` -- New struct `PoolsClientCreateOrUpdatePollerResponse` -- New struct `PoolsClientCreateOrUpdateResponse` -- New struct `PoolsClientCreateOrUpdateResult` -- New struct `PoolsClientDeletePoller` -- New struct `PoolsClientDeletePollerResponse` -- New struct `PoolsClientDeleteResponse` -- New struct `PoolsClientGetOptions` -- New struct `PoolsClientGetResponse` -- New struct `PoolsClientGetResult` -- New struct `PoolsClientListOptions` -- New struct `PoolsClientListPager` -- New struct `PoolsClientListResponse` -- New struct `PoolsClientListResult` -- New struct `PoolsClientUpdatePoller` -- New struct `PoolsClientUpdatePollerResponse` -- New struct `PoolsClientUpdateResponse` -- New struct `PoolsClientUpdateResult` -- New struct `ResourceClient` -- New struct `ResourceClientCheckFilePathAvailabilityOptions` -- New struct `ResourceClientCheckFilePathAvailabilityResponse` -- New struct `ResourceClientCheckFilePathAvailabilityResult` -- New struct `ResourceClientCheckNameAvailabilityOptions` -- New struct `ResourceClientCheckNameAvailabilityResponse` -- New struct `ResourceClientCheckNameAvailabilityResult` -- New struct `ResourceClientCheckQuotaAvailabilityOptions` -- New struct `ResourceClientCheckQuotaAvailabilityResponse` -- New struct `ResourceClientCheckQuotaAvailabilityResult` -- New struct `ResourceQuotaLimitsClient` -- New struct `ResourceQuotaLimitsClientGetOptions` -- New struct `ResourceQuotaLimitsClientGetResponse` -- New struct `ResourceQuotaLimitsClientGetResult` -- New struct `ResourceQuotaLimitsClientListOptions` -- New struct `ResourceQuotaLimitsClientListResponse` -- New struct `ResourceQuotaLimitsClientListResult` -- New struct `SnapshotPoliciesClientBeginDeleteOptions` -- New struct `SnapshotPoliciesClientBeginUpdateOptions` -- New struct `SnapshotPoliciesClientCreateOptions` -- New struct `SnapshotPoliciesClientCreateResponse` -- New struct `SnapshotPoliciesClientCreateResult` -- New struct `SnapshotPoliciesClientDeletePoller` -- New struct `SnapshotPoliciesClientDeletePollerResponse` -- New struct `SnapshotPoliciesClientDeleteResponse` -- New struct `SnapshotPoliciesClientGetOptions` -- New struct `SnapshotPoliciesClientGetResponse` -- New struct `SnapshotPoliciesClientGetResult` -- New struct `SnapshotPoliciesClientListOptions` -- New struct `SnapshotPoliciesClientListResponse` -- New struct `SnapshotPoliciesClientListResult` -- New struct `SnapshotPoliciesClientListVolumesOptions` -- New struct `SnapshotPoliciesClientListVolumesResponse` -- New struct `SnapshotPoliciesClientListVolumesResult` -- New struct `SnapshotPoliciesClientUpdatePoller` -- New struct `SnapshotPoliciesClientUpdatePollerResponse` -- New struct `SnapshotPoliciesClientUpdateResponse` -- New struct `SnapshotPoliciesClientUpdateResult` -- New struct `SnapshotsClientBeginCreateOptions` -- New struct `SnapshotsClientBeginDeleteOptions` -- New struct `SnapshotsClientBeginUpdateOptions` -- New struct `SnapshotsClientCreatePoller` -- New struct `SnapshotsClientCreatePollerResponse` -- New struct `SnapshotsClientCreateResponse` -- New struct `SnapshotsClientCreateResult` -- New struct `SnapshotsClientDeletePoller` -- New struct `SnapshotsClientDeletePollerResponse` -- New struct `SnapshotsClientDeleteResponse` -- New struct `SnapshotsClientGetOptions` -- New struct `SnapshotsClientGetResponse` -- New struct `SnapshotsClientGetResult` -- New struct `SnapshotsClientListOptions` -- New struct `SnapshotsClientListResponse` -- New struct `SnapshotsClientListResult` -- New struct `SnapshotsClientUpdatePoller` -- New struct `SnapshotsClientUpdatePollerResponse` -- New struct `SnapshotsClientUpdateResponse` -- New struct `SnapshotsClientUpdateResult` -- New struct `VaultsClientListOptions` -- New struct `VaultsClientListResponse` -- New struct `VaultsClientListResult` -- New struct `VolumeGroupsClientBeginCreateOptions` -- New struct `VolumeGroupsClientBeginDeleteOptions` -- New struct `VolumeGroupsClientCreatePoller` -- New struct `VolumeGroupsClientCreatePollerResponse` -- New struct `VolumeGroupsClientCreateResponse` -- New struct `VolumeGroupsClientCreateResult` -- New struct `VolumeGroupsClientDeletePoller` -- New struct `VolumeGroupsClientDeletePollerResponse` -- New struct `VolumeGroupsClientDeleteResponse` -- New struct `VolumeGroupsClientGetOptions` -- New struct `VolumeGroupsClientGetResponse` -- New struct `VolumeGroupsClientGetResult` -- New struct `VolumeGroupsClientListByNetAppAccountOptions` -- New struct `VolumeGroupsClientListByNetAppAccountResponse` -- New struct `VolumeGroupsClientListByNetAppAccountResult` -- New struct `VolumesClientAuthorizeReplicationPoller` -- New struct `VolumesClientAuthorizeReplicationPollerResponse` -- New struct `VolumesClientAuthorizeReplicationResponse` -- New struct `VolumesClientBeginAuthorizeReplicationOptions` -- New struct `VolumesClientBeginBreakReplicationOptions` -- New struct `VolumesClientBeginCreateOrUpdateOptions` -- New struct `VolumesClientBeginDeleteOptions` -- New struct `VolumesClientBeginDeleteReplicationOptions` -- New struct `VolumesClientBeginPoolChangeOptions` -- New struct `VolumesClientBeginReInitializeReplicationOptions` -- New struct `VolumesClientBeginResyncReplicationOptions` -- New struct `VolumesClientBeginRevertOptions` -- New struct `VolumesClientBeginUpdateOptions` -- New struct `VolumesClientBreakReplicationPoller` -- New struct `VolumesClientBreakReplicationPollerResponse` -- New struct `VolumesClientBreakReplicationResponse` -- New struct `VolumesClientCreateOrUpdatePoller` -- New struct `VolumesClientCreateOrUpdatePollerResponse` -- New struct `VolumesClientCreateOrUpdateResponse` -- New struct `VolumesClientCreateOrUpdateResult` -- New struct `VolumesClientDeletePoller` -- New struct `VolumesClientDeletePollerResponse` -- New struct `VolumesClientDeleteReplicationPoller` -- New struct `VolumesClientDeleteReplicationPollerResponse` -- New struct `VolumesClientDeleteReplicationResponse` -- New struct `VolumesClientDeleteResponse` -- New struct `VolumesClientGetOptions` -- New struct `VolumesClientGetResponse` -- New struct `VolumesClientGetResult` -- New struct `VolumesClientListOptions` -- New struct `VolumesClientListPager` -- New struct `VolumesClientListResponse` -- New struct `VolumesClientListResult` -- New struct `VolumesClientPoolChangePoller` -- New struct `VolumesClientPoolChangePollerResponse` -- New struct `VolumesClientPoolChangeResponse` -- New struct `VolumesClientReInitializeReplicationPoller` -- New struct `VolumesClientReInitializeReplicationPollerResponse` -- New struct `VolumesClientReInitializeReplicationResponse` -- New struct `VolumesClientReplicationStatusOptions` -- New struct `VolumesClientReplicationStatusResponse` -- New struct `VolumesClientReplicationStatusResult` -- New struct `VolumesClientResyncReplicationPoller` -- New struct `VolumesClientResyncReplicationPollerResponse` -- New struct `VolumesClientResyncReplicationResponse` -- New struct `VolumesClientRevertPoller` -- New struct `VolumesClientRevertPollerResponse` -- New struct `VolumesClientRevertResponse` -- New struct `VolumesClientUpdatePoller` -- New struct `VolumesClientUpdatePollerResponse` -- New struct `VolumesClientUpdateResponse` -- New struct `VolumesClientUpdateResult` -- New field `ID` in struct `ProxyResource` -- New field `Name` in struct `ProxyResource` -- New field `Type` in struct `ProxyResource` -- New field `ID` in struct `SubscriptionQuotaItem` -- New field `Name` in struct `SubscriptionQuotaItem` -- New field `Type` in struct `SubscriptionQuotaItem` -- New field `Error` in struct `CloudError` - - -## 0.1.0 (2021-12-16) - -- Init release. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/README.md deleted file mode 100644 index 393979bc..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Azure NetApp Files Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp) - -The `armnetapp` module provides operations for working with Azure NetApp Files. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/netapp/armnetapp) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure NetApp Files module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure NetApp Files. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure NetApp Files modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armnetapp.NewBackupsClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armnetapp.NewBackupsClient(, cred, &options) -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `NetApp Files` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/autorest.md deleted file mode 100644 index c8cba7d2..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/autorest.md +++ /dev/null @@ -1,13 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/netapp/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/netapp/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 - -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/build.go deleted file mode 100644 index d44aaf02..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/netapp/armnetapp - -package armnetapp diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/ci.yml deleted file mode 100644 index d89f8053..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/netapp/armnetapp/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/netapp/armnetapp/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/netapp/armnetapp' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/CHANGELOG.md new file mode 100644 index 00000000..9f23da43 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/CHANGELOG.md @@ -0,0 +1,478 @@ +# Release History + +## 7.5.0 (2025-04-25) +### Features Added + +- New enum type `MultiAdStatus` with values `MultiAdStatusDisabled`, `MultiAdStatusEnabled` +- New enum type `ReplicationType` with values `ReplicationTypeCrossRegionReplication`, `ReplicationTypeCrossZoneReplication` +- New function `*ClientFactory.NewResourceUsagesClient() *ResourceUsagesClient` +- New function `NewResourceUsagesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ResourceUsagesClient, error)` +- New function `*ResourceUsagesClient.Get(context.Context, string, string, *ResourceUsagesClientGetOptions) (ResourceUsagesClientGetResponse, error)` +- New function `*ResourceUsagesClient.NewListPager(string, *ResourceUsagesClientListOptions) *runtime.Pager[ResourceUsagesClientListResponse]` +- New struct `DestinationReplication` +- New struct `UsageName` +- New struct `UsageProperties` +- New struct `UsageResult` +- New struct `UsagesListResult` +- New field `MultiAdStatus`, `NfsV4IDDomain` in struct `AccountProperties` +- New field `CompletionDate`, `IsLargeVolume`, `SnapshotCreationDate` in struct `BackupProperties` +- New field `FederatedClientID` in struct `EncryptionIdentity` +- New field `NextLink` in struct `OperationListResult` +- New field `DestinationReplications` in struct `ReplicationObject` + + +## 7.4.0 (2025-02-12) +### Features Added + +- New enum type `CoolAccessTieringPolicy` with values `CoolAccessTieringPolicyAuto`, `CoolAccessTieringPolicySnapshotOnly` +- New function `*AccountsClient.BeginChangeKeyVault(context.Context, string, string, *AccountsClientBeginChangeKeyVaultOptions) (*runtime.Poller[AccountsClientChangeKeyVaultResponse], error)` +- New function `*AccountsClient.BeginGetChangeKeyVaultInformation(context.Context, string, string, *AccountsClientBeginGetChangeKeyVaultInformationOptions) (*runtime.Poller[AccountsClientGetChangeKeyVaultInformationResponse], error)` +- New function `*AccountsClient.BeginTransitionToCmk(context.Context, string, string, *AccountsClientBeginTransitionToCmkOptions) (*runtime.Poller[AccountsClientTransitionToCmkResponse], error)` +- New struct `ChangeKeyVault` +- New struct `EncryptionTransitionRequest` +- New struct `GetKeyVaultStatusResponse` +- New struct `GetKeyVaultStatusResponseProperties` +- New struct `KeyVaultPrivateEndpoint` +- New field `CoolAccessTieringPolicy` in struct `VolumePatchProperties` +- New field `CoolAccessTieringPolicy` in struct `VolumeProperties` + + +## 7.4.0-beta.1 (2024-11-18) +### Features Added + +- New value `ServiceLevelFlexible` added to enum type `ServiceLevel` +- New enum type `AcceptGrowCapacityPoolForShortTermCloneSplit` with values `AcceptGrowCapacityPoolForShortTermCloneSplitAccepted`, `AcceptGrowCapacityPoolForShortTermCloneSplitDeclined` +- New enum type `ReplicationType` with values `ReplicationTypeCrossRegionReplication`, `ReplicationTypeCrossZoneReplication` +- New enum type `VolumeLanguage` with values `VolumeLanguageAr`, `VolumeLanguageArUTF8`, `VolumeLanguageC`, `VolumeLanguageCUTF8`, `VolumeLanguageCs`, `VolumeLanguageCsUTF8`, `VolumeLanguageDa`, `VolumeLanguageDaUTF8`, `VolumeLanguageDe`, `VolumeLanguageDeUTF8`, `VolumeLanguageEn`, `VolumeLanguageEnUTF8`, `VolumeLanguageEnUs`, `VolumeLanguageEnUsUTF8`, `VolumeLanguageEs`, `VolumeLanguageEsUTF8`, `VolumeLanguageFi`, `VolumeLanguageFiUTF8`, `VolumeLanguageFr`, `VolumeLanguageFrUTF8`, `VolumeLanguageHe`, `VolumeLanguageHeUTF8`, `VolumeLanguageHr`, `VolumeLanguageHrUTF8`, `VolumeLanguageHu`, `VolumeLanguageHuUTF8`, `VolumeLanguageIt`, `VolumeLanguageItUTF8`, `VolumeLanguageJa`, `VolumeLanguageJaJp932`, `VolumeLanguageJaJp932UTF8`, `VolumeLanguageJaJpPck`, `VolumeLanguageJaJpPckUTF8`, `VolumeLanguageJaJpPckV2`, `VolumeLanguageJaJpPckV2UTF8`, `VolumeLanguageJaUTF8`, `VolumeLanguageJaV1`, `VolumeLanguageJaV1UTF8`, `VolumeLanguageKo`, `VolumeLanguageKoUTF8`, `VolumeLanguageNl`, `VolumeLanguageNlUTF8`, `VolumeLanguageNo`, `VolumeLanguageNoUTF8`, `VolumeLanguagePl`, `VolumeLanguagePlUTF8`, `VolumeLanguagePt`, `VolumeLanguagePtUTF8`, `VolumeLanguageRo`, `VolumeLanguageRoUTF8`, `VolumeLanguageRu`, `VolumeLanguageRuUTF8`, `VolumeLanguageSk`, `VolumeLanguageSkUTF8`, `VolumeLanguageSl`, `VolumeLanguageSlUTF8`, `VolumeLanguageSv`, `VolumeLanguageSvUTF8`, `VolumeLanguageTr`, `VolumeLanguageTrUTF8`, `VolumeLanguageUTF8Mb4`, `VolumeLanguageZh`, `VolumeLanguageZhGbk`, `VolumeLanguageZhGbkUTF8`, `VolumeLanguageZhTw`, `VolumeLanguageZhTwBig5`, `VolumeLanguageZhTwBig5UTF8`, `VolumeLanguageZhTwUTF8`, `VolumeLanguageZhUTF8` +- New function `*AccountsClient.BeginChangeKeyVault(context.Context, string, string, *AccountsClientBeginChangeKeyVaultOptions) (*runtime.Poller[AccountsClientChangeKeyVaultResponse], error)` +- New function `*AccountsClient.BeginGetChangeKeyVaultInformation(context.Context, string, string, *AccountsClientBeginGetChangeKeyVaultInformationOptions) (*runtime.Poller[AccountsClientGetChangeKeyVaultInformationResponse], error)` +- New function `*AccountsClient.BeginTransitionToCmk(context.Context, string, string, *AccountsClientBeginTransitionToCmkOptions) (*runtime.Poller[AccountsClientTransitionToCmkResponse], error)` +- New function `*VolumesClient.BeginListQuotaReport(context.Context, string, string, string, string, *VolumesClientBeginListQuotaReportOptions) (*runtime.Poller[VolumesClientListQuotaReportResponse], error)` +- New function `*VolumesClient.BeginSplitCloneFromParent(context.Context, string, string, string, string, *VolumesClientBeginSplitCloneFromParentOptions) (*runtime.Poller[VolumesClientSplitCloneFromParentResponse], error)` +- New struct `ChangeKeyVault` +- New struct `DestinationReplication` +- New struct `EncryptionTransitionRequest` +- New struct `KeyVaultPrivateEndpoint` +- New struct `ListQuotaReportResponse` +- New struct `QuotaReport` +- New field `IsMultiAdEnabled`, `NfsV4IDDomain` in struct `AccountProperties` +- New field `IsLargeVolume` in struct `BackupProperties` +- New field `FederatedClientID` in struct `EncryptionIdentity` +- New field `CustomThroughputMibps` in struct `PoolPatchProperties` +- New field `CustomThroughputMibps` in struct `PoolProperties` +- New field `DestinationReplications` in struct `ReplicationObject` +- New field `AcceptGrowCapacityPoolForShortTermCloneSplit`, `InheritedSizeInBytes`, `Language` in struct `VolumeProperties` + + +## 7.3.0 (2024-10-23) +### Features Added + +- New function `*VolumesClient.BeginAuthorizeExternalReplication(context.Context, string, string, string, string, *VolumesClientBeginAuthorizeExternalReplicationOptions) (*runtime.Poller[VolumesClientAuthorizeExternalReplicationResponse], error)` +- New function `*VolumesClient.BeginFinalizeExternalReplication(context.Context, string, string, string, string, *VolumesClientBeginFinalizeExternalReplicationOptions) (*runtime.Poller[VolumesClientFinalizeExternalReplicationResponse], error)` +- New function `*VolumesClient.BeginPeerExternalCluster(context.Context, string, string, string, string, PeerClusterForVolumeMigrationRequest, *VolumesClientBeginPeerExternalClusterOptions) (*runtime.Poller[VolumesClientPeerExternalClusterResponse], error)` +- New function `*VolumesClient.BeginPerformReplicationTransfer(context.Context, string, string, string, string, *VolumesClientBeginPerformReplicationTransferOptions) (*runtime.Poller[VolumesClientPerformReplicationTransferResponse], error)` +- New struct `ClusterPeerCommandResponse` +- New struct `PeerClusterForVolumeMigrationRequest` +- New struct `RemotePath` +- New struct `SvmPeerCommandResponse` +- New field `AvailabilityZone` in struct `FilePathAvailabilityRequest` +- New field `RemotePath` in struct `ReplicationObject` +- New field `EffectiveNetworkFeatures` in struct `VolumeProperties` + + +## 7.2.0 (2024-08-23) +### Features Added + +- New field `ReplicationID` in struct `Replication` + + +## 7.1.0 (2024-07-26) +### Features Added + +- New field `ProtocolTypes` in struct `VolumePatchProperties` + + +## 7.0.0 (2024-05-24) +### Breaking Changes + +- Function `*BackupsClient.GetVolumeRestoreStatus` has been removed + +### Features Added + +- New enum type `BackupType` with values `BackupTypeManual`, `BackupTypeScheduled` +- New function `NewBackupVaultsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BackupVaultsClient, error)` +- New function `*BackupVaultsClient.BeginCreateOrUpdate(context.Context, string, string, string, BackupVault, *BackupVaultsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BackupVaultsClientCreateOrUpdateResponse], error)` +- New function `*BackupVaultsClient.BeginDelete(context.Context, string, string, string, *BackupVaultsClientBeginDeleteOptions) (*runtime.Poller[BackupVaultsClientDeleteResponse], error)` +- New function `*BackupVaultsClient.Get(context.Context, string, string, string, *BackupVaultsClientGetOptions) (BackupVaultsClientGetResponse, error)` +- New function `*BackupVaultsClient.NewListByNetAppAccountPager(string, string, *BackupVaultsClientListByNetAppAccountOptions) *runtime.Pager[BackupVaultsClientListByNetAppAccountResponse]` +- New function `*BackupVaultsClient.BeginUpdate(context.Context, string, string, string, BackupVaultPatch, *BackupVaultsClientBeginUpdateOptions) (*runtime.Poller[BackupVaultsClientUpdateResponse], error)` +- New function `*BackupsClient.BeginCreate(context.Context, string, string, string, string, Backup, *BackupsClientBeginCreateOptions) (*runtime.Poller[BackupsClientCreateResponse], error)` +- New function `*BackupsClient.BeginDelete(context.Context, string, string, string, string, *BackupsClientBeginDeleteOptions) (*runtime.Poller[BackupsClientDeleteResponse], error)` +- New function `*BackupsClient.Get(context.Context, string, string, string, string, *BackupsClientGetOptions) (BackupsClientGetResponse, error)` +- New function `*BackupsClient.GetLatestStatus(context.Context, string, string, string, string, *BackupsClientGetLatestStatusOptions) (BackupsClientGetLatestStatusResponse, error)` +- New function `*BackupsClient.GetVolumeLatestRestoreStatus(context.Context, string, string, string, string, *BackupsClientGetVolumeLatestRestoreStatusOptions) (BackupsClientGetVolumeLatestRestoreStatusResponse, error)` +- New function `*BackupsClient.NewListByVaultPager(string, string, string, *BackupsClientListByVaultOptions) *runtime.Pager[BackupsClientListByVaultResponse]` +- New function `*BackupsClient.BeginUpdate(context.Context, string, string, string, string, BackupPatch, *BackupsClientBeginUpdateOptions) (*runtime.Poller[BackupsClientUpdateResponse], error)` +- New function `NewBackupsUnderAccountClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BackupsUnderAccountClient, error)` +- New function `*BackupsUnderAccountClient.BeginMigrateBackups(context.Context, string, string, BackupsMigrationRequest, *BackupsUnderAccountClientBeginMigrateBackupsOptions) (*runtime.Poller[BackupsUnderAccountClientMigrateBackupsResponse], error)` +- New function `NewBackupsUnderBackupVaultClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BackupsUnderBackupVaultClient, error)` +- New function `*BackupsUnderBackupVaultClient.BeginRestoreFiles(context.Context, string, string, string, string, BackupRestoreFiles, *BackupsUnderBackupVaultClientBeginRestoreFilesOptions) (*runtime.Poller[BackupsUnderBackupVaultClientRestoreFilesResponse], error)` +- New function `NewBackupsUnderVolumeClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BackupsUnderVolumeClient, error)` +- New function `*BackupsUnderVolumeClient.BeginMigrateBackups(context.Context, string, string, string, string, BackupsMigrationRequest, *BackupsUnderVolumeClientBeginMigrateBackupsOptions) (*runtime.Poller[BackupsUnderVolumeClientMigrateBackupsResponse], error)` +- New function `*ClientFactory.NewBackupVaultsClient() *BackupVaultsClient` +- New function `*ClientFactory.NewBackupsUnderAccountClient() *BackupsUnderAccountClient` +- New function `*ClientFactory.NewBackupsUnderBackupVaultClient() *BackupsUnderBackupVaultClient` +- New function `*ClientFactory.NewBackupsUnderVolumeClient() *BackupsUnderVolumeClient` +- New function `*ClientFactory.NewResourceRegionInfosClient() *ResourceRegionInfosClient` +- New function `NewResourceRegionInfosClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ResourceRegionInfosClient, error)` +- New function `*ResourceRegionInfosClient.Get(context.Context, string, *ResourceRegionInfosClientGetOptions) (ResourceRegionInfosClientGetResponse, error)` +- New function `*ResourceRegionInfosClient.NewListPager(string, *ResourceRegionInfosClientListOptions) *runtime.Pager[ResourceRegionInfosClientListResponse]` +- New struct `Backup` +- New struct `BackupPatch` +- New struct `BackupPatchProperties` +- New struct `BackupProperties` +- New struct `BackupRestoreFiles` +- New struct `BackupStatus` +- New struct `BackupVault` +- New struct `BackupVaultPatch` +- New struct `BackupVaultProperties` +- New struct `BackupVaultsList` +- New struct `BackupsList` +- New struct `BackupsMigrationRequest` +- New struct `RegionInfoResource` +- New struct `RegionInfosList` +- New struct `VolumeBackupProperties` +- New field `VolumeResourceID` in struct `VolumeBackups` +- New field `Backup` in struct `VolumePatchPropertiesDataProtection` +- New field `Backup` in struct `VolumePropertiesDataProtection` + + +## 6.0.0 (2024-03-22) +### Breaking Changes + +- Field `DeploymentSpecID` of struct `VolumeGroupMetaData` has been removed + +### Features Added + +- New value `RelationshipStatusFailed`, `RelationshipStatusUnknown` added to enum type `RelationshipStatus` + + +## 6.0.0-beta.1 (2023-12-22) +### Breaking Changes + +- Field `DeploymentSpecID` of struct `VolumeGroupMetaData` has been removed + +### Features Added + +- New enum type `BackupType` with values `BackupTypeManual`, `BackupTypeScheduled` +- New function `NewAccountBackupsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AccountBackupsClient, error)` +- New function `*AccountBackupsClient.BeginDelete(context.Context, string, string, string, *AccountBackupsClientBeginDeleteOptions) (*runtime.Poller[AccountBackupsClientDeleteResponse], error)` +- New function `*AccountBackupsClient.Get(context.Context, string, string, string, *AccountBackupsClientGetOptions) (AccountBackupsClientGetResponse, error)` +- New function `*AccountBackupsClient.NewListByNetAppAccountPager(string, string, *AccountBackupsClientListByNetAppAccountOptions) *runtime.Pager[AccountBackupsClientListByNetAppAccountResponse]` +- New function `*AccountsClient.BeginMigrateEncryptionKey(context.Context, string, string, *AccountsClientBeginMigrateEncryptionKeyOptions) (*runtime.Poller[AccountsClientMigrateEncryptionKeyResponse], error)` +- New function `NewBackupVaultsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BackupVaultsClient, error)` +- New function `*BackupVaultsClient.BeginCreateOrUpdate(context.Context, string, string, string, BackupVault, *BackupVaultsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BackupVaultsClientCreateOrUpdateResponse], error)` +- New function `*BackupVaultsClient.BeginDelete(context.Context, string, string, string, *BackupVaultsClientBeginDeleteOptions) (*runtime.Poller[BackupVaultsClientDeleteResponse], error)` +- New function `*BackupVaultsClient.Get(context.Context, string, string, string, *BackupVaultsClientGetOptions) (BackupVaultsClientGetResponse, error)` +- New function `*BackupVaultsClient.NewListByNetAppAccountPager(string, string, *BackupVaultsClientListByNetAppAccountOptions) *runtime.Pager[BackupVaultsClientListByNetAppAccountResponse]` +- New function `*BackupVaultsClient.BeginUpdate(context.Context, string, string, string, BackupVaultPatch, *BackupVaultsClientBeginUpdateOptions) (*runtime.Poller[BackupVaultsClientUpdateResponse], error)` +- New function `*BackupsClient.BeginCreate(context.Context, string, string, string, string, Backup, *BackupsClientBeginCreateOptions) (*runtime.Poller[BackupsClientCreateResponse], error)` +- New function `*BackupsClient.BeginDelete(context.Context, string, string, string, string, *BackupsClientBeginDeleteOptions) (*runtime.Poller[BackupsClientDeleteResponse], error)` +- New function `*BackupsClient.Get(context.Context, string, string, string, string, *BackupsClientGetOptions) (BackupsClientGetResponse, error)` +- New function `*BackupsClient.GetLatestStatus(context.Context, string, string, string, string, *BackupsClientGetLatestStatusOptions) (BackupsClientGetLatestStatusResponse, error)` +- New function `*BackupsClient.NewListByVaultPager(string, string, string, *BackupsClientListByVaultOptions) *runtime.Pager[BackupsClientListByVaultResponse]` +- New function `*BackupsClient.BeginUpdate(context.Context, string, string, string, string, BackupPatch, *BackupsClientBeginUpdateOptions) (*runtime.Poller[BackupsClientUpdateResponse], error)` +- New function `NewBackupsUnderAccountClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BackupsUnderAccountClient, error)` +- New function `*BackupsUnderAccountClient.BeginMigrateBackups(context.Context, string, string, BackupsMigrationRequest, *BackupsUnderAccountClientBeginMigrateBackupsOptions) (*runtime.Poller[BackupsUnderAccountClientMigrateBackupsResponse], error)` +- New function `NewBackupsUnderBackupVaultClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BackupsUnderBackupVaultClient, error)` +- New function `*BackupsUnderBackupVaultClient.BeginRestoreFiles(context.Context, string, string, string, string, BackupRestoreFiles, *BackupsUnderBackupVaultClientBeginRestoreFilesOptions) (*runtime.Poller[BackupsUnderBackupVaultClientRestoreFilesResponse], error)` +- New function `NewBackupsUnderVolumeClient(string, azcore.TokenCredential, *arm.ClientOptions) (*BackupsUnderVolumeClient, error)` +- New function `*BackupsUnderVolumeClient.BeginMigrateBackups(context.Context, string, string, string, string, BackupsMigrationRequest, *BackupsUnderVolumeClientBeginMigrateBackupsOptions) (*runtime.Poller[BackupsUnderVolumeClientMigrateBackupsResponse], error)` +- New function `*ClientFactory.NewAccountBackupsClient() *AccountBackupsClient` +- New function `*ClientFactory.NewBackupVaultsClient() *BackupVaultsClient` +- New function `*ClientFactory.NewBackupsUnderAccountClient() *BackupsUnderAccountClient` +- New function `*ClientFactory.NewBackupsUnderBackupVaultClient() *BackupsUnderBackupVaultClient` +- New function `*ClientFactory.NewBackupsUnderVolumeClient() *BackupsUnderVolumeClient` +- New function `*ClientFactory.NewResourceRegionInfosClient() *ResourceRegionInfosClient` +- New function `NewResourceRegionInfosClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ResourceRegionInfosClient, error)` +- New function `*ResourceRegionInfosClient.Get(context.Context, string, *ResourceRegionInfosClientGetOptions) (ResourceRegionInfosClientGetResponse, error)` +- New function `*ResourceRegionInfosClient.NewListPager(string, *ResourceRegionInfosClientListOptions) *runtime.Pager[ResourceRegionInfosClientListResponse]` +- New function `*VolumesClient.BeginSplitCloneFromParent(context.Context, string, string, string, string, *VolumesClientBeginSplitCloneFromParentOptions) (*runtime.Poller[VolumesClientSplitCloneFromParentResponse], error)` +- New struct `Backup` +- New struct `BackupPatch` +- New struct `BackupPatchProperties` +- New struct `BackupProperties` +- New struct `BackupRestoreFiles` +- New struct `BackupStatus` +- New struct `BackupVault` +- New struct `BackupVaultPatch` +- New struct `BackupVaultProperties` +- New struct `BackupVaultsList` +- New struct `BackupsList` +- New struct `BackupsMigrationRequest` +- New struct `EncryptionMigrationRequest` +- New struct `RegionInfoResource` +- New struct `RegionInfosList` +- New struct `RemotePath` +- New struct `VolumeBackupProperties` +- New field `IsMultiAdEnabled`, `NfsV4IDDomain` in struct `AccountProperties` +- New field `RemotePath` in struct `ReplicationObject` +- New field `Backup` in struct `VolumePatchPropertiesDataProtection` +- New field `InheritedSizeInBytes` in struct `VolumeProperties` +- New field `Backup` in struct `VolumePropertiesDataProtection` + + +## 5.1.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 5.0.0 (2023-10-27) +### Breaking Changes + +- Enum `BackupType` has been removed +- Function `NewAccountBackupsClient` has been removed +- Function `*AccountBackupsClient.BeginDelete` has been removed +- Function `*AccountBackupsClient.Get` has been removed +- Function `*AccountBackupsClient.NewListPager` has been removed +- Function `*BackupsClient.BeginCreate` has been removed +- Function `*BackupsClient.BeginDelete` has been removed +- Function `*BackupsClient.Get` has been removed +- Function `*BackupsClient.GetStatus` has been removed +- Function `*BackupsClient.NewListPager` has been removed +- Function `*BackupsClient.BeginRestoreFiles` has been removed +- Function `*BackupsClient.BeginUpdate` has been removed +- Function `*ClientFactory.NewAccountBackupsClient` has been removed +- Struct `Backup` has been removed +- Struct `BackupPatch` has been removed +- Struct `BackupProperties` has been removed +- Struct `BackupRestoreFiles` has been removed +- Struct `BackupStatus` has been removed +- Struct `BackupsList` has been removed +- Struct `VolumeBackupProperties` has been removed +- Field `Backup` of struct `VolumePatchPropertiesDataProtection` has been removed +- Field `Backup` of struct `VolumePropertiesDataProtection` has been removed + +### Features Added + +- New value `ApplicationTypeORACLE` added to enum type `ApplicationType` +- New value `NetworkFeaturesBasicStandard`, `NetworkFeaturesStandardBasic` added to enum type `NetworkFeatures` +- New enum type `CoolAccessRetrievalPolicy` with values `CoolAccessRetrievalPolicyDefault`, `CoolAccessRetrievalPolicyNever`, `CoolAccessRetrievalPolicyOnRead` +- New enum type `NetworkSiblingSetProvisioningState` with values `NetworkSiblingSetProvisioningStateCanceled`, `NetworkSiblingSetProvisioningStateFailed`, `NetworkSiblingSetProvisioningStateSucceeded`, `NetworkSiblingSetProvisioningStateUpdating` +- New function `*ResourceClient.QueryNetworkSiblingSet(context.Context, string, QueryNetworkSiblingSetRequest, *ResourceClientQueryNetworkSiblingSetOptions) (ResourceClientQueryNetworkSiblingSetResponse, error)` +- New function `*ResourceClient.BeginUpdateNetworkSiblingSet(context.Context, string, UpdateNetworkSiblingSetRequest, *ResourceClientBeginUpdateNetworkSiblingSetOptions) (*runtime.Poller[ResourceClientUpdateNetworkSiblingSetResponse], error)` +- New function `*VolumesClient.BeginPopulateAvailabilityZone(context.Context, string, string, string, string, *VolumesClientBeginPopulateAvailabilityZoneOptions) (*runtime.Poller[VolumesClientPopulateAvailabilityZoneResponse], error)` +- New struct `NetworkSiblingSet` +- New struct `NicInfo` +- New struct `QueryNetworkSiblingSetRequest` +- New struct `UpdateNetworkSiblingSetRequest` +- New field `Zones` in struct `VolumeGroupVolumeProperties` +- New field `CoolAccessRetrievalPolicy`, `SmbAccessBasedEnumeration`, `SmbNonBrowsable` in struct `VolumePatchProperties` +- New field `CoolAccessRetrievalPolicy` in struct `VolumeProperties` + + +## 4.1.0 (2023-07-28) +### Features Added + +- New value `RegionStorageToNetworkProximityAcrossT2`, `RegionStorageToNetworkProximityT1AndAcrossT2`, `RegionStorageToNetworkProximityT1AndT2AndAcrossT2`, `RegionStorageToNetworkProximityT2AndAcrossT2` added to enum type `RegionStorageToNetworkProximity` +- New value `VolumeStorageToNetworkProximityAcrossT2` added to enum type `VolumeStorageToNetworkProximity` +- New function `*VolumesClient.BeginListGetGroupIDListForLdapUser(context.Context, string, string, string, string, GetGroupIDListForLDAPUserRequest, *VolumesClientBeginListGetGroupIDListForLdapUserOptions) (*runtime.Poller[VolumesClientListGetGroupIDListForLdapUserResponse], error)` +- New struct `GetGroupIDListForLDAPUserRequest` +- New struct `GetGroupIDListForLDAPUserResponse` +- New field `Identity` in struct `AccountPatch` +- New field `SnapshotDirectoryVisible` in struct `VolumePatchProperties` +- New field `ActualThroughputMibps`, `OriginatingResourceID` in struct `VolumeProperties` + + +## 4.0.0 (2023-03-24) +### Breaking Changes + +- Type of `Account.Identity` has been changed from `*Identity` to `*ManagedServiceIdentity` +- Type alias `IdentityType` has been removed +- Function `NewVaultsClient` has been removed +- Function `*VaultsClient.NewListPager` has been removed +- Struct `Identity` has been removed +- Struct `Vault` has been removed +- Struct `VaultList` has been removed +- Struct `VaultProperties` has been removed +- Struct `VaultsClient` has been removed +- Field `VaultID` of struct `VolumeBackupProperties` has been removed + +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module +- New enum type `FileAccessLogs` with values `FileAccessLogsDisabled`, `FileAccessLogsEnabled` +- New enum type `ManagedServiceIdentityType` with values `ManagedServiceIdentityTypeNone`, `ManagedServiceIdentityTypeSystemAssigned`, `ManagedServiceIdentityTypeSystemAssignedUserAssigned`, `ManagedServiceIdentityTypeUserAssigned` +- New function `*BackupsClient.BeginRestoreFiles(context.Context, string, string, string, string, string, BackupRestoreFiles, *BackupsClientBeginRestoreFilesOptions) (*runtime.Poller[BackupsClientRestoreFilesResponse], error)` +- New function `*VolumesClient.BeginBreakFileLocks(context.Context, string, string, string, string, *VolumesClientBeginBreakFileLocksOptions) (*runtime.Poller[VolumesClientBreakFileLocksResponse], error)` +- New struct `BackupRestoreFiles` +- New struct `BreakFileLocksRequest` +- New struct `ManagedServiceIdentity` +- New struct `VolumeRelocationProperties` +- New field `PreferredServersForLdapClient` in struct `ActiveDirectory` +- New field `SystemData` in struct `Backup` +- New field `SystemData` in struct `Snapshot` +- New field `DataStoreResourceID` in struct `VolumeProperties` +- New field `FileAccessLogs` in struct `VolumeProperties` +- New field `IsLargeVolume` in struct `VolumeProperties` +- New field `ProvisionedAvailabilityZone` in struct `VolumeProperties` +- New field `VolumeRelocation` in struct `VolumePropertiesDataProtection` +- New field `Tags` in struct `VolumeQuotaRulePatch` + + +## 3.0.0 (2022-09-16) +### Breaking Changes + +- Type of `AccountEncryption.KeySource` has been changed from `*string` to `*KeySource` +- Field `Location` of struct `Vault` has been removed + +### Features Added + +- New const `KeyVaultStatusCreated` +- New const `IdentityTypeNone` +- New const `IdentityTypeUserAssigned` +- New const `IdentityTypeSystemAssigned` +- New const `RegionStorageToNetworkProximityDefault` +- New const `KeyVaultStatusUpdating` +- New const `KeyVaultStatusError` +- New const `RegionStorageToNetworkProximityT1AndT2` +- New const `KeySourceMicrosoftKeyVault` +- New const `SmbNonBrowsableDisabled` +- New const `SmbNonBrowsableEnabled` +- New const `RegionStorageToNetworkProximityT1` +- New const `SmbAccessBasedEnumerationDisabled` +- New const `SmbAccessBasedEnumerationEnabled` +- New const `KeySourceMicrosoftNetApp` +- New const `RegionStorageToNetworkProximityT2` +- New const `KeyVaultStatusDeleted` +- New const `KeyVaultStatusInUse` +- New const `IdentityTypeSystemAssignedUserAssigned` +- New type alias `SmbAccessBasedEnumeration` +- New type alias `SmbNonBrowsable` +- New type alias `KeySource` +- New type alias `KeyVaultStatus` +- New type alias `IdentityType` +- New type alias `RegionStorageToNetworkProximity` +- New function `PossibleIdentityTypeValues() []IdentityType` +- New function `PossibleKeySourceValues() []KeySource` +- New function `*ResourceClient.QueryRegionInfo(context.Context, string, *ResourceClientQueryRegionInfoOptions) (ResourceClientQueryRegionInfoResponse, error)` +- New function `PossibleSmbAccessBasedEnumerationValues() []SmbAccessBasedEnumeration` +- New function `PossibleSmbNonBrowsableValues() []SmbNonBrowsable` +- New function `*AccountsClient.BeginRenewCredentials(context.Context, string, string, *AccountsClientBeginRenewCredentialsOptions) (*runtime.Poller[AccountsClientRenewCredentialsResponse], error)` +- New function `PossibleRegionStorageToNetworkProximityValues() []RegionStorageToNetworkProximity` +- New function `PossibleKeyVaultStatusValues() []KeyVaultStatus` +- New struct `AccountsClientBeginRenewCredentialsOptions` +- New struct `AccountsClientRenewCredentialsResponse` +- New struct `EncryptionIdentity` +- New struct `Identity` +- New struct `KeyVaultProperties` +- New struct `RegionInfo` +- New struct `RegionInfoAvailabilityZoneMappingsItem` +- New struct `RelocateVolumeRequest` +- New struct `ResourceClientQueryRegionInfoOptions` +- New struct `ResourceClientQueryRegionInfoResponse` +- New struct `UserAssignedIdentity` +- New field `Body` in struct `VolumesClientBeginRelocateOptions` +- New field `SmbAccessBasedEnumeration` in struct `VolumeProperties` +- New field `SmbNonBrowsable` in struct `VolumeProperties` +- New field `DeleteBaseSnapshot` in struct `VolumeProperties` +- New field `Identity` in struct `Account` +- New field `Identity` in struct `AccountEncryption` +- New field `KeyVaultProperties` in struct `AccountEncryption` +- New field `DisableShowmount` in struct `AccountProperties` + + +## 2.1.0 (2022-07-21) +### Features Added + +- New const `EncryptionKeySourceMicrosoftKeyVault` +- New function `*VolumesClient.BeginReestablishReplication(context.Context, string, string, string, string, ReestablishReplicationRequest, *VolumesClientBeginReestablishReplicationOptions) (*runtime.Poller[VolumesClientReestablishReplicationResponse], error)` +- New struct `ReestablishReplicationRequest` +- New struct `VolumesClientBeginReestablishReplicationOptions` +- New struct `VolumesClientReestablishReplicationResponse` +- New field `CoolnessPeriod` in struct `VolumePatchProperties` +- New field `CoolAccess` in struct `VolumePatchProperties` +- New field `KeyVaultPrivateEndpointResourceID` in struct `VolumeProperties` +- New field `CoolAccess` in struct `PoolPatchProperties` + + +## 2.0.0 (2022-06-22) +### Breaking Changes + +- Function `*BackupsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *BackupsClientBeginUpdateOptions)` to `(context.Context, string, string, string, string, string, BackupPatch, *BackupsClientBeginUpdateOptions)` +- Type of `VolumeProperties.EncryptionKeySource` has been changed from `*string` to `*EncryptionKeySource` +- Field `Body` of struct `BackupsClientBeginUpdateOptions` has been removed +- Field `Tags` of struct `VolumeGroupDetails` has been removed +- Field `Tags` of struct `VolumeGroup` has been removed + +### Features Added + +- New const `ProvisioningStateDeleting` +- New const `TypeIndividualGroupQuota` +- New const `TypeDefaultUserQuota` +- New const `TypeIndividualUserQuota` +- New const `ProvisioningStateSucceeded` +- New const `ProvisioningStateAccepted` +- New const `ProvisioningStateCreating` +- New const `ProvisioningStateMoving` +- New const `ProvisioningStatePatching` +- New const `ProvisioningStateFailed` +- New const `EncryptionKeySourceMicrosoftNetApp` +- New const `TypeDefaultGroupQuota` +- New function `*VolumesClient.BeginRelocate(context.Context, string, string, string, string, *VolumesClientBeginRelocateOptions) (*runtime.Poller[VolumesClientRelocateResponse], error)` +- New function `*VolumeQuotaRulesClient.BeginDelete(context.Context, string, string, string, string, string, *VolumeQuotaRulesClientBeginDeleteOptions) (*runtime.Poller[VolumeQuotaRulesClientDeleteResponse], error)` +- New function `*VolumeQuotaRulesClient.Get(context.Context, string, string, string, string, string, *VolumeQuotaRulesClientGetOptions) (VolumeQuotaRulesClientGetResponse, error)` +- New function `*VolumesClient.NewListReplicationsPager(string, string, string, string, *VolumesClientListReplicationsOptions) *runtime.Pager[VolumesClientListReplicationsResponse]` +- New function `PossibleTypeValues() []Type` +- New function `*VolumesClient.BeginResetCifsPassword(context.Context, string, string, string, string, *VolumesClientBeginResetCifsPasswordOptions) (*runtime.Poller[VolumesClientResetCifsPasswordResponse], error)` +- New function `*VolumeQuotaRulesClient.BeginCreate(context.Context, string, string, string, string, string, VolumeQuotaRule, *VolumeQuotaRulesClientBeginCreateOptions) (*runtime.Poller[VolumeQuotaRulesClientCreateResponse], error)` +- New function `*VolumesClient.BeginFinalizeRelocation(context.Context, string, string, string, string, *VolumesClientBeginFinalizeRelocationOptions) (*runtime.Poller[VolumesClientFinalizeRelocationResponse], error)` +- New function `*VolumeQuotaRulesClient.NewListByVolumePager(string, string, string, string, *VolumeQuotaRulesClientListByVolumeOptions) *runtime.Pager[VolumeQuotaRulesClientListByVolumeResponse]` +- New function `PossibleProvisioningStateValues() []ProvisioningState` +- New function `*VolumesClient.BeginRevertRelocation(context.Context, string, string, string, string, *VolumesClientBeginRevertRelocationOptions) (*runtime.Poller[VolumesClientRevertRelocationResponse], error)` +- New function `*VolumeQuotaRulesClient.BeginUpdate(context.Context, string, string, string, string, string, VolumeQuotaRulePatch, *VolumeQuotaRulesClientBeginUpdateOptions) (*runtime.Poller[VolumeQuotaRulesClientUpdateResponse], error)` +- New function `PossibleEncryptionKeySourceValues() []EncryptionKeySource` +- New function `NewVolumeQuotaRulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VolumeQuotaRulesClient, error)` +- New struct `ListReplications` +- New struct `Replication` +- New struct `TrackedResource` +- New struct `VolumeQuotaRule` +- New struct `VolumeQuotaRulePatch` +- New struct `VolumeQuotaRulesClient` +- New struct `VolumeQuotaRulesClientBeginCreateOptions` +- New struct `VolumeQuotaRulesClientBeginDeleteOptions` +- New struct `VolumeQuotaRulesClientBeginUpdateOptions` +- New struct `VolumeQuotaRulesClientCreateResponse` +- New struct `VolumeQuotaRulesClientDeleteResponse` +- New struct `VolumeQuotaRulesClientGetOptions` +- New struct `VolumeQuotaRulesClientGetResponse` +- New struct `VolumeQuotaRulesClientListByVolumeOptions` +- New struct `VolumeQuotaRulesClientListByVolumeResponse` +- New struct `VolumeQuotaRulesClientUpdateResponse` +- New struct `VolumeQuotaRulesList` +- New struct `VolumeQuotaRulesProperties` +- New struct `VolumeRelocationProperties` +- New struct `VolumesClientBeginFinalizeRelocationOptions` +- New struct `VolumesClientBeginRelocateOptions` +- New struct `VolumesClientBeginResetCifsPasswordOptions` +- New struct `VolumesClientBeginRevertRelocationOptions` +- New struct `VolumesClientFinalizeRelocationResponse` +- New struct `VolumesClientListReplicationsOptions` +- New struct `VolumesClientListReplicationsResponse` +- New struct `VolumesClientRelocateResponse` +- New struct `VolumesClientResetCifsPasswordResponse` +- New struct `VolumesClientRevertRelocationResponse` +- New field `SystemData` in struct `ProxyResource` +- New field `Zones` in struct `Volume` +- New field `SystemData` in struct `Resource` +- New field `Encrypted` in struct `VolumeProperties` + + +## 1.0.0 (2022-05-18) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/README.md new file mode 100644 index 00000000..1525acdd --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/README.md @@ -0,0 +1,99 @@ +# Azure NetApp Files Module for Go + +The `armnetapp` module provides operations for working with Azure NetApp Files. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/netapp/armnetapp) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- [Supported](https://aka.ms/azsdk/go/supported-versions) version of Go (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure NetApp Files module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure NetApp Files. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure NetApp Files module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armnetapp.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armnetapp.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewAccountsClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Major Version Upgrade + +Go uses [semantic import versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) to ensure a good backward compatibility for modules. For Azure Go management SDK, we usually upgrade module version according to cooresponding service's API version. Regarding it could be a complicated experience for major version upgrade, we will try our best to keep the SDK API stable and release new version in backward compatible way. However, if any unavoidable breaking changes and a new major version releases for SDK modules, you could use these commands under your module folder to upgrade: + +```sh +go install github.com/icholy/gomajor@latest +gomajor get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute@latest +``` + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `NetApp Files` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/accounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/accounts_client.go new file mode 100644 index 00000000..fb71ae9c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/accounts_client.go @@ -0,0 +1,790 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AccountsClient contains the methods for the Accounts group. +// Don't use this type directly, use NewAccountsClient() instead. +type AccountsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAccountsClient creates a new instance of AccountsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AccountsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginChangeKeyVault - Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports +// HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - AccountsClientBeginChangeKeyVaultOptions contains the optional parameters for the AccountsClient.BeginChangeKeyVault +// method. +func (client *AccountsClient) BeginChangeKeyVault(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginChangeKeyVaultOptions) (*runtime.Poller[AccountsClientChangeKeyVaultResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.changeKeyVault(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientChangeKeyVaultResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientChangeKeyVaultResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ChangeKeyVault - Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports HSM +// to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *AccountsClient) changeKeyVault(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginChangeKeyVaultOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginChangeKeyVault" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.changeKeyVaultCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// changeKeyVaultCreateRequest creates the ChangeKeyVault request. +func (client *AccountsClient) changeKeyVaultCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginChangeKeyVaultOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/changeKeyVault" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginCreateOrUpdate - Create or update the specified NetApp account within the resource group +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - body - NetApp Account object supplied in the body of the operation. +// - options - AccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the AccountsClient.BeginCreateOrUpdate +// method. +func (client *AccountsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, body Account, options *AccountsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AccountsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, accountName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update the specified NetApp account within the resource group +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *AccountsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, body Account, options *AccountsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AccountsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, body Account, _ *AccountsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the specified NetApp account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method. +func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginDeleteOptions) (*runtime.Poller[AccountsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the specified NetApp account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *AccountsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *AccountsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the NetApp account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method. +func (client *AccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientGetOptions) (AccountsClientGetResponse, error) { + var err error + const operationName = "AccountsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return AccountsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AccountsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AccountsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AccountsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *AccountsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AccountsClient) getHandleResponse(resp *http.Response) (AccountsClientGetResponse, error) { + result := AccountsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Account); err != nil { + return AccountsClientGetResponse{}, err + } + return result, nil +} + +// BeginGetChangeKeyVaultInformation - Contains data from encryption.keyVaultProperties as well as information about which +// private endpoint is used by each encryption sibling set. Response from this endpoint can be modified and used as +// request body for POST request. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - AccountsClientBeginGetChangeKeyVaultInformationOptions contains the optional parameters for the AccountsClient.BeginGetChangeKeyVaultInformation +// method. +func (client *AccountsClient) BeginGetChangeKeyVaultInformation(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginGetChangeKeyVaultInformationOptions) (*runtime.Poller[AccountsClientGetChangeKeyVaultInformationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getChangeKeyVaultInformation(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientGetChangeKeyVaultInformationResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientGetChangeKeyVaultInformationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetChangeKeyVaultInformation - Contains data from encryption.keyVaultProperties as well as information about which private +// endpoint is used by each encryption sibling set. Response from this endpoint can be modified and used as +// request body for POST request. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *AccountsClient) getChangeKeyVaultInformation(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginGetChangeKeyVaultInformationOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginGetChangeKeyVaultInformation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getChangeKeyVaultInformationCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getChangeKeyVaultInformationCreateRequest creates the GetChangeKeyVaultInformation request. +func (client *AccountsClient) getChangeKeyVaultInformationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *AccountsClientBeginGetChangeKeyVaultInformationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/getKeyVaultStatus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListPager - List and describe all NetApp accounts in the resource group. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method. +func (client *AccountsClient) NewListPager(resourceGroupName string, options *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AccountsClientListResponse]{ + More: func(page AccountsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AccountsClientListResponse) (AccountsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AccountsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return AccountsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AccountsClient) listCreateRequest(ctx context.Context, resourceGroupName string, _ *AccountsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AccountsClient) listHandleResponse(resp *http.Response) (AccountsClientListResponse, error) { + result := AccountsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AccountList); err != nil { + return AccountsClientListResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - List and describe all NetApp accounts in the subscription. +// +// Generated from API version 2025-01-01 +// - options - AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.NewListBySubscriptionPager +// method. +func (client *AccountsClient) NewListBySubscriptionPager(options *AccountsClientListBySubscriptionOptions) *runtime.Pager[AccountsClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[AccountsClientListBySubscriptionResponse]{ + More: func(page AccountsClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AccountsClientListBySubscriptionResponse) (AccountsClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AccountsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return AccountsClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *AccountsClient) listBySubscriptionCreateRequest(ctx context.Context, _ *AccountsClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *AccountsClient) listBySubscriptionHandleResponse(resp *http.Response) (AccountsClientListBySubscriptionResponse, error) { + result := AccountsClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AccountList); err != nil { + return AccountsClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// BeginRenewCredentials - Renew identity credentials that are used to authenticate to key vault, for customer-managed key +// encryption. If encryption.identity.principalId does not match identity.principalId, running this +// operation will fix it. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - AccountsClientBeginRenewCredentialsOptions contains the optional parameters for the AccountsClient.BeginRenewCredentials +// method. +func (client *AccountsClient) BeginRenewCredentials(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginRenewCredentialsOptions) (*runtime.Poller[AccountsClientRenewCredentialsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.renewCredentials(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientRenewCredentialsResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientRenewCredentialsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RenewCredentials - Renew identity credentials that are used to authenticate to key vault, for customer-managed key encryption. +// If encryption.identity.principalId does not match identity.principalId, running this +// operation will fix it. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *AccountsClient) renewCredentials(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginRenewCredentialsOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginRenewCredentials" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.renewCredentialsCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// renewCredentialsCreateRequest creates the RenewCredentials request. +func (client *AccountsClient) renewCredentialsCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *AccountsClientBeginRenewCredentialsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/renewCredentials" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginTransitionToCmk - Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key or +// Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with volumes from +// another account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - AccountsClientBeginTransitionToCmkOptions contains the optional parameters for the AccountsClient.BeginTransitionToCmk +// method. +func (client *AccountsClient) BeginTransitionToCmk(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginTransitionToCmkOptions) (*runtime.Poller[AccountsClientTransitionToCmkResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.transitionToCmk(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientTransitionToCmkResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientTransitionToCmkResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TransitionToCmk - Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure +// Key Vault). Operation fails if targeted volumes share encryption sibling set with volumes from +// another account. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *AccountsClient) transitionToCmk(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginTransitionToCmkOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginTransitionToCmk" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.transitionToCmkCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// transitionToCmkCreateRequest creates the TransitionToCmk request. +func (client *AccountsClient) transitionToCmkCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginTransitionToCmkOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/transitiontocmk" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginUpdate - Patch the specified NetApp account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - body - NetApp Account object supplied in the body of the operation. +// - options - AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method. +func (client *AccountsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, body AccountPatch, options *AccountsClientBeginUpdateOptions) (*runtime.Poller[AccountsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AccountsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AccountsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch the specified NetApp account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *AccountsClient) update(ctx context.Context, resourceGroupName string, accountName string, body AccountPatch, options *AccountsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AccountsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, body AccountPatch, _ *AccountsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/autorest.md new file mode 100644 index 00000000..d58cb78b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/27046dbff974e3901970aa53b29cec6d8ec1342a/specification/netapp/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/27046dbff974e3901970aa53b29cec6d8ec1342a/specification/netapp/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 7.5.0 +tag: package-2025-01-01 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backuppolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backuppolicies_client.go new file mode 100644 index 00000000..f8a20227 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backuppolicies_client.go @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupPoliciesClient contains the methods for the BackupPolicies group. +// Don't use this type directly, use NewBackupPoliciesClient() instead. +type BackupPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupPoliciesClient creates a new instance of BackupPoliciesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Create a backup policy for Netapp Account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupPolicyName - Backup policy Name which uniquely identify backup policy. +// - body - Backup policy object supplied in the body of the operation. +// - options - BackupPoliciesClientBeginCreateOptions contains the optional parameters for the BackupPoliciesClient.BeginCreate +// method. +func (client *BackupPoliciesClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy, options *BackupPoliciesClientBeginCreateOptions) (*runtime.Poller[BackupPoliciesClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, accountName, backupPolicyName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupPoliciesClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupPoliciesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Create a backup policy for Netapp Account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupPoliciesClient) create(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy, options *BackupPoliciesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "BackupPoliciesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, backupPolicyName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *BackupPoliciesClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy, _ *BackupPoliciesClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupPolicyName == "" { + return nil, errors.New("parameter backupPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete backup policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupPolicyName - Backup policy Name which uniquely identify backup policy. +// - options - BackupPoliciesClientBeginDeleteOptions contains the optional parameters for the BackupPoliciesClient.BeginDelete +// method. +func (client *BackupPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, options *BackupPoliciesClientBeginDeleteOptions) (*runtime.Poller[BackupPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, backupPolicyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupPoliciesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete backup policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, options *BackupPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BackupPoliciesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, backupPolicyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BackupPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, _ *BackupPoliciesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupPolicyName == "" { + return nil, errors.New("parameter backupPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a particular backup Policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupPolicyName - Backup policy Name which uniquely identify backup policy. +// - options - BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method. +func (client *BackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, options *BackupPoliciesClientGetOptions) (BackupPoliciesClientGetResponse, error) { + var err error + const operationName = "BackupPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, backupPolicyName, options) + if err != nil { + return BackupPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, _ *BackupPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupPolicyName == "" { + return nil, errors.New("parameter backupPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupPoliciesClient) getHandleResponse(resp *http.Response) (BackupPoliciesClientGetResponse, error) { + result := BackupPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupPolicy); err != nil { + return BackupPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List backup policies for Netapp Account +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.NewListPager method. +func (client *BackupPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *BackupPoliciesClientListOptions) *runtime.Pager[BackupPoliciesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupPoliciesClientListResponse]{ + More: func(page BackupPoliciesClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *BackupPoliciesClientListResponse) (BackupPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupPoliciesClient.NewListPager") + req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return BackupPoliciesClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupPoliciesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return BackupPoliciesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *BackupPoliciesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupPoliciesClient) listHandleResponse(resp *http.Response) (BackupPoliciesClientListResponse, error) { + result := BackupPoliciesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupPoliciesList); err != nil { + return BackupPoliciesClientListResponse{}, err + } + return result, nil +} + +// BeginUpdate - Patch a backup policy for Netapp Account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupPolicyName - Backup policy Name which uniquely identify backup policy. +// - body - Backup policy object supplied in the body of the operation. +// - options - BackupPoliciesClientBeginUpdateOptions contains the optional parameters for the BackupPoliciesClient.BeginUpdate +// method. +func (client *BackupPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch, options *BackupPoliciesClientBeginUpdateOptions) (*runtime.Poller[BackupPoliciesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, backupPolicyName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupPoliciesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupPoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch a backup policy for Netapp Account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupPoliciesClient) update(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch, options *BackupPoliciesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BackupPoliciesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, backupPolicyName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *BackupPoliciesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch, _ *BackupPoliciesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupPolicyName == "" { + return nil, errors.New("parameter backupPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backups_client.go new file mode 100644 index 00000000..9850c9a6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backups_client.go @@ -0,0 +1,602 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupsClient contains the methods for the Backups group. +// Don't use this type directly, use NewBackupsClient() instead. +type BackupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupsClient creates a new instance of BackupsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Create a backup under the Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupVaultName - The name of the Backup Vault +// - backupName - The name of the backup +// - body - Backup object supplied in the body of the operation. +// - options - BackupsClientBeginCreateOptions contains the optional parameters for the BackupsClient.BeginCreate method. +func (client *BackupsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body Backup, options *BackupsClientBeginCreateOptions) (*runtime.Poller[BackupsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, accountName, backupVaultName, backupName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupsClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Create a backup under the Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupsClient) create(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body Backup, options *BackupsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "BackupsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, backupVaultName, backupName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *BackupsClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body Backup, _ *BackupsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupVaultName == "" { + return nil, errors.New("parameter backupVaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupVaultName}", url.PathEscape(backupVaultName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete a Backup under the Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupVaultName - The name of the Backup Vault +// - backupName - The name of the backup +// - options - BackupsClientBeginDeleteOptions contains the optional parameters for the BackupsClient.BeginDelete method. +func (client *BackupsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, options *BackupsClientBeginDeleteOptions) (*runtime.Poller[BackupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, backupVaultName, backupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete a Backup under the Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, options *BackupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BackupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, backupVaultName, backupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BackupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, _ *BackupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupVaultName == "" { + return nil, errors.New("parameter backupVaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupVaultName}", url.PathEscape(backupVaultName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the specified Backup under Backup Vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupVaultName - The name of the Backup Vault +// - backupName - The name of the backup +// - options - BackupsClientGetOptions contains the optional parameters for the BackupsClient.Get method. +func (client *BackupsClient) Get(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, options *BackupsClientGetOptions) (BackupsClientGetResponse, error) { + var err error + const operationName = "BackupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, backupVaultName, backupName, options) + if err != nil { + return BackupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, _ *BackupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupVaultName == "" { + return nil, errors.New("parameter backupVaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupVaultName}", url.PathEscape(backupVaultName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupsClient) getHandleResponse(resp *http.Response) (BackupsClientGetResponse, error) { + result := BackupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Backup); err != nil { + return BackupsClientGetResponse{}, err + } + return result, nil +} + +// GetLatestStatus - Get the latest status of the backup for a volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - BackupsClientGetLatestStatusOptions contains the optional parameters for the BackupsClient.GetLatestStatus method. +func (client *BackupsClient) GetLatestStatus(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *BackupsClientGetLatestStatusOptions) (BackupsClientGetLatestStatusResponse, error) { + var err error + const operationName = "BackupsClient.GetLatestStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getLatestStatusCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return BackupsClientGetLatestStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupsClientGetLatestStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupsClientGetLatestStatusResponse{}, err + } + resp, err := client.getLatestStatusHandleResponse(httpResp) + return resp, err +} + +// getLatestStatusCreateRequest creates the GetLatestStatus request. +func (client *BackupsClient) getLatestStatusCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *BackupsClientGetLatestStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/latestBackupStatus/current" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLatestStatusHandleResponse handles the GetLatestStatus response. +func (client *BackupsClient) getLatestStatusHandleResponse(resp *http.Response) (BackupsClientGetLatestStatusResponse, error) { + result := BackupsClientGetLatestStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupStatus); err != nil { + return BackupsClientGetLatestStatusResponse{}, err + } + return result, nil +} + +// GetVolumeLatestRestoreStatus - Get the latest status of the restore for a volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - BackupsClientGetVolumeLatestRestoreStatusOptions contains the optional parameters for the BackupsClient.GetVolumeLatestRestoreStatus +// method. +func (client *BackupsClient) GetVolumeLatestRestoreStatus(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *BackupsClientGetVolumeLatestRestoreStatusOptions) (BackupsClientGetVolumeLatestRestoreStatusResponse, error) { + var err error + const operationName = "BackupsClient.GetVolumeLatestRestoreStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVolumeLatestRestoreStatusCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return BackupsClientGetVolumeLatestRestoreStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupsClientGetVolumeLatestRestoreStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupsClientGetVolumeLatestRestoreStatusResponse{}, err + } + resp, err := client.getVolumeLatestRestoreStatusHandleResponse(httpResp) + return resp, err +} + +// getVolumeLatestRestoreStatusCreateRequest creates the GetVolumeLatestRestoreStatus request. +func (client *BackupsClient) getVolumeLatestRestoreStatusCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *BackupsClientGetVolumeLatestRestoreStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/latestRestoreStatus/current" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVolumeLatestRestoreStatusHandleResponse handles the GetVolumeLatestRestoreStatus response. +func (client *BackupsClient) getVolumeLatestRestoreStatusHandleResponse(resp *http.Response) (BackupsClientGetVolumeLatestRestoreStatusResponse, error) { + result := BackupsClientGetVolumeLatestRestoreStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RestoreStatus); err != nil { + return BackupsClientGetVolumeLatestRestoreStatusResponse{}, err + } + return result, nil +} + +// NewListByVaultPager - List all backups Under a Backup Vault +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupVaultName - The name of the Backup Vault +// - options - BackupsClientListByVaultOptions contains the optional parameters for the BackupsClient.NewListByVaultPager method. +func (client *BackupsClient) NewListByVaultPager(resourceGroupName string, accountName string, backupVaultName string, options *BackupsClientListByVaultOptions) *runtime.Pager[BackupsClientListByVaultResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupsClientListByVaultResponse]{ + More: func(page BackupsClientListByVaultResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupsClientListByVaultResponse) (BackupsClientListByVaultResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupsClient.NewListByVaultPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVaultCreateRequest(ctx, resourceGroupName, accountName, backupVaultName, options) + }, nil) + if err != nil { + return BackupsClientListByVaultResponse{}, err + } + return client.listByVaultHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByVaultCreateRequest creates the ListByVault request. +func (client *BackupsClient) listByVaultCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, options *BackupsClientListByVaultOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupVaultName == "" { + return nil, errors.New("parameter backupVaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupVaultName}", url.PathEscape(backupVaultName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByVaultHandleResponse handles the ListByVault response. +func (client *BackupsClient) listByVaultHandleResponse(resp *http.Response) (BackupsClientListByVaultResponse, error) { + result := BackupsClientListByVaultResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupsList); err != nil { + return BackupsClientListByVaultResponse{}, err + } + return result, nil +} + +// BeginUpdate - Patch a Backup under the Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupVaultName - The name of the Backup Vault +// - backupName - The name of the backup +// - body - Backup object supplied in the body of the operation. +// - options - BackupsClientBeginUpdateOptions contains the optional parameters for the BackupsClient.BeginUpdate method. +func (client *BackupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body BackupPatch, options *BackupsClientBeginUpdateOptions) (*runtime.Poller[BackupsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, backupVaultName, backupName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch a Backup under the Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupsClient) update(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body BackupPatch, options *BackupsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BackupsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, backupVaultName, backupName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *BackupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body BackupPatch, _ *BackupsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupVaultName == "" { + return nil, errors.New("parameter backupVaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupVaultName}", url.PathEscape(backupVaultName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupsunderaccount_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupsunderaccount_client.go new file mode 100644 index 00000000..34031e05 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupsunderaccount_client.go @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupsUnderAccountClient contains the methods for the BackupsUnderAccount group. +// Don't use this type directly, use NewBackupsUnderAccountClient() instead. +type BackupsUnderAccountClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupsUnderAccountClient creates a new instance of BackupsUnderAccountClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupsUnderAccountClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupsUnderAccountClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupsUnderAccountClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginMigrateBackups - Migrate the backups under a NetApp account to backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - body - Migrate backups under an account payload supplied in the body of the operation. +// - options - BackupsUnderAccountClientBeginMigrateBackupsOptions contains the optional parameters for the BackupsUnderAccountClient.BeginMigrateBackups +// method. +func (client *BackupsUnderAccountClient) BeginMigrateBackups(ctx context.Context, resourceGroupName string, accountName string, body BackupsMigrationRequest, options *BackupsUnderAccountClientBeginMigrateBackupsOptions) (*runtime.Poller[BackupsUnderAccountClientMigrateBackupsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrateBackups(ctx, resourceGroupName, accountName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupsUnderAccountClientMigrateBackupsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupsUnderAccountClientMigrateBackupsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// MigrateBackups - Migrate the backups under a NetApp account to backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupsUnderAccountClient) migrateBackups(ctx context.Context, resourceGroupName string, accountName string, body BackupsMigrationRequest, options *BackupsUnderAccountClientBeginMigrateBackupsOptions) (*http.Response, error) { + var err error + const operationName = "BackupsUnderAccountClient.BeginMigrateBackups" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateBackupsCreateRequest(ctx, resourceGroupName, accountName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrateBackupsCreateRequest creates the MigrateBackups request. +func (client *BackupsUnderAccountClient) migrateBackupsCreateRequest(ctx context.Context, resourceGroupName string, accountName string, body BackupsMigrationRequest, _ *BackupsUnderAccountClientBeginMigrateBackupsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/migrateBackups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupsunderbackupvault_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupsunderbackupvault_client.go new file mode 100644 index 00000000..c339baeb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupsunderbackupvault_client.go @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupsUnderBackupVaultClient contains the methods for the BackupsUnderBackupVault group. +// Don't use this type directly, use NewBackupsUnderBackupVaultClient() instead. +type BackupsUnderBackupVaultClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupsUnderBackupVaultClient creates a new instance of BackupsUnderBackupVaultClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupsUnderBackupVaultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupsUnderBackupVaultClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupsUnderBackupVaultClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginRestoreFiles - Restore the specified files from the specified backup to the active filesystem +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupVaultName - The name of the Backup Vault +// - backupName - The name of the backup +// - body - Restore payload supplied in the body of the operation. +// - options - BackupsUnderBackupVaultClientBeginRestoreFilesOptions contains the optional parameters for the BackupsUnderBackupVaultClient.BeginRestoreFiles +// method. +func (client *BackupsUnderBackupVaultClient) BeginRestoreFiles(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body BackupRestoreFiles, options *BackupsUnderBackupVaultClientBeginRestoreFilesOptions) (*runtime.Poller[BackupsUnderBackupVaultClientRestoreFilesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restoreFiles(ctx, resourceGroupName, accountName, backupVaultName, backupName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupsUnderBackupVaultClientRestoreFilesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupsUnderBackupVaultClientRestoreFilesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RestoreFiles - Restore the specified files from the specified backup to the active filesystem +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupsUnderBackupVaultClient) restoreFiles(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body BackupRestoreFiles, options *BackupsUnderBackupVaultClientBeginRestoreFilesOptions) (*http.Response, error) { + var err error + const operationName = "BackupsUnderBackupVaultClient.BeginRestoreFiles" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreFilesCreateRequest(ctx, resourceGroupName, accountName, backupVaultName, backupName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreFilesCreateRequest creates the RestoreFiles request. +func (client *BackupsUnderBackupVaultClient) restoreFilesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, backupName string, body BackupRestoreFiles, _ *BackupsUnderBackupVaultClientBeginRestoreFilesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}/restoreFiles" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupVaultName == "" { + return nil, errors.New("parameter backupVaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupVaultName}", url.PathEscape(backupVaultName)) + if backupName == "" { + return nil, errors.New("parameter backupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupsundervolume_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupsundervolume_client.go new file mode 100644 index 00000000..5cfc06bf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupsundervolume_client.go @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupsUnderVolumeClient contains the methods for the BackupsUnderVolume group. +// Don't use this type directly, use NewBackupsUnderVolumeClient() instead. +type BackupsUnderVolumeClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupsUnderVolumeClient creates a new instance of BackupsUnderVolumeClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupsUnderVolumeClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupsUnderVolumeClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupsUnderVolumeClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginMigrateBackups - Migrate the backups under volume to backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - body - Migrate backups under volume payload supplied in the body of the operation. +// - options - BackupsUnderVolumeClientBeginMigrateBackupsOptions contains the optional parameters for the BackupsUnderVolumeClient.BeginMigrateBackups +// method. +func (client *BackupsUnderVolumeClient) BeginMigrateBackups(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body BackupsMigrationRequest, options *BackupsUnderVolumeClientBeginMigrateBackupsOptions) (*runtime.Poller[BackupsUnderVolumeClientMigrateBackupsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrateBackups(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupsUnderVolumeClientMigrateBackupsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupsUnderVolumeClientMigrateBackupsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// MigrateBackups - Migrate the backups under volume to backup vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupsUnderVolumeClient) migrateBackups(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body BackupsMigrationRequest, options *BackupsUnderVolumeClientBeginMigrateBackupsOptions) (*http.Response, error) { + var err error + const operationName = "BackupsUnderVolumeClient.BeginMigrateBackups" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateBackupsCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrateBackupsCreateRequest creates the MigrateBackups request. +func (client *BackupsUnderVolumeClient) migrateBackupsCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body BackupsMigrationRequest, _ *BackupsUnderVolumeClientBeginMigrateBackupsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/migrateBackups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupvaults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupvaults_client.go new file mode 100644 index 00000000..95912143 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/backupvaults_client.go @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupVaultsClient contains the methods for the BackupVaults group. +// Don't use this type directly, use NewBackupVaultsClient() instead. +type BackupVaultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupVaultsClient creates a new instance of BackupVaultsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupVaultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupVaultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupVaultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update the specified Backup Vault in the NetApp account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupVaultName - The name of the Backup Vault +// - body - BackupVault object supplied in the body of the operation. +// - options - BackupVaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginCreateOrUpdate +// method. +func (client *BackupVaultsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, body BackupVault, options *BackupVaultsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BackupVaultsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, accountName, backupVaultName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupVaultsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupVaultsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update the specified Backup Vault in the NetApp account +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupVaultsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, body BackupVault, options *BackupVaultsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BackupVaultsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, backupVaultName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BackupVaultsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, body BackupVault, _ *BackupVaultsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupVaultName == "" { + return nil, errors.New("parameter backupVaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupVaultName}", url.PathEscape(backupVaultName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the specified Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupVaultName - The name of the Backup Vault +// - options - BackupVaultsClientBeginDeleteOptions contains the optional parameters for the BackupVaultsClient.BeginDelete +// method. +func (client *BackupVaultsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, options *BackupVaultsClientBeginDeleteOptions) (*runtime.Poller[BackupVaultsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, backupVaultName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupVaultsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupVaultsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the specified Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupVaultsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, options *BackupVaultsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BackupVaultsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, backupVaultName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BackupVaultsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, _ *BackupVaultsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupVaultName == "" { + return nil, errors.New("parameter backupVaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupVaultName}", url.PathEscape(backupVaultName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupVaultName - The name of the Backup Vault +// - options - BackupVaultsClientGetOptions contains the optional parameters for the BackupVaultsClient.Get method. +func (client *BackupVaultsClient) Get(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, options *BackupVaultsClientGetOptions) (BackupVaultsClientGetResponse, error) { + var err error + const operationName = "BackupVaultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, backupVaultName, options) + if err != nil { + return BackupVaultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupVaultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupVaultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupVaultsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, _ *BackupVaultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupVaultName == "" { + return nil, errors.New("parameter backupVaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupVaultName}", url.PathEscape(backupVaultName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupVaultsClient) getHandleResponse(resp *http.Response) (BackupVaultsClientGetResponse, error) { + result := BackupVaultsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupVault); err != nil { + return BackupVaultsClientGetResponse{}, err + } + return result, nil +} + +// NewListByNetAppAccountPager - List and describe all Backup Vaults in the NetApp account. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - BackupVaultsClientListByNetAppAccountOptions contains the optional parameters for the BackupVaultsClient.NewListByNetAppAccountPager +// method. +func (client *BackupVaultsClient) NewListByNetAppAccountPager(resourceGroupName string, accountName string, options *BackupVaultsClientListByNetAppAccountOptions) *runtime.Pager[BackupVaultsClientListByNetAppAccountResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupVaultsClientListByNetAppAccountResponse]{ + More: func(page BackupVaultsClientListByNetAppAccountResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupVaultsClientListByNetAppAccountResponse) (BackupVaultsClientListByNetAppAccountResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupVaultsClient.NewListByNetAppAccountPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByNetAppAccountCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return BackupVaultsClientListByNetAppAccountResponse{}, err + } + return client.listByNetAppAccountHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByNetAppAccountCreateRequest creates the ListByNetAppAccount request. +func (client *BackupVaultsClient) listByNetAppAccountCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *BackupVaultsClientListByNetAppAccountOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByNetAppAccountHandleResponse handles the ListByNetAppAccount response. +func (client *BackupVaultsClient) listByNetAppAccountHandleResponse(resp *http.Response) (BackupVaultsClientListByNetAppAccountResponse, error) { + result := BackupVaultsClientListByNetAppAccountResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupVaultsList); err != nil { + return BackupVaultsClientListByNetAppAccountResponse{}, err + } + return result, nil +} + +// BeginUpdate - Patch the specified NetApp Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - backupVaultName - The name of the Backup Vault +// - body - Backup Vault object supplied in the body of the operation. +// - options - BackupVaultsClientBeginUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginUpdate +// method. +func (client *BackupVaultsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, body BackupVaultPatch, options *BackupVaultsClientBeginUpdateOptions) (*runtime.Poller[BackupVaultsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, backupVaultName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BackupVaultsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BackupVaultsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch the specified NetApp Backup Vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *BackupVaultsClient) update(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, body BackupVaultPatch, options *BackupVaultsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BackupVaultsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, backupVaultName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *BackupVaultsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupVaultName string, body BackupVaultPatch, _ *BackupVaultsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if backupVaultName == "" { + return nil, errors.New("parameter backupVaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupVaultName}", url.PathEscape(backupVaultName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/build.go new file mode 100644 index 00000000..4cbb57a5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -alwaysSetBodyParamRequired -removeUnreferencedTypes resourcemanager/netapp/armnetapp + +package armnetapp diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/ci.yml new file mode 100644 index 00000000..208774d2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/ci.yml @@ -0,0 +1,27 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/netapp/armnetapp/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/netapp/armnetapp/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + ServiceDirectory: 'resourcemanager/netapp/armnetapp' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/client_factory.go new file mode 100644 index 00000000..71ec8d83 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/client_factory.go @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewAccountsClient creates a new instance of AccountsClient. +func (c *ClientFactory) NewAccountsClient() *AccountsClient { + return &AccountsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupPoliciesClient creates a new instance of BackupPoliciesClient. +func (c *ClientFactory) NewBackupPoliciesClient() *BackupPoliciesClient { + return &BackupPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupVaultsClient creates a new instance of BackupVaultsClient. +func (c *ClientFactory) NewBackupVaultsClient() *BackupVaultsClient { + return &BackupVaultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupsClient creates a new instance of BackupsClient. +func (c *ClientFactory) NewBackupsClient() *BackupsClient { + return &BackupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupsUnderAccountClient creates a new instance of BackupsUnderAccountClient. +func (c *ClientFactory) NewBackupsUnderAccountClient() *BackupsUnderAccountClient { + return &BackupsUnderAccountClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupsUnderBackupVaultClient creates a new instance of BackupsUnderBackupVaultClient. +func (c *ClientFactory) NewBackupsUnderBackupVaultClient() *BackupsUnderBackupVaultClient { + return &BackupsUnderBackupVaultClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupsUnderVolumeClient creates a new instance of BackupsUnderVolumeClient. +func (c *ClientFactory) NewBackupsUnderVolumeClient() *BackupsUnderVolumeClient { + return &BackupsUnderVolumeClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewPoolsClient creates a new instance of PoolsClient. +func (c *ClientFactory) NewPoolsClient() *PoolsClient { + return &PoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewResourceClient creates a new instance of ResourceClient. +func (c *ClientFactory) NewResourceClient() *ResourceClient { + return &ResourceClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewResourceQuotaLimitsClient creates a new instance of ResourceQuotaLimitsClient. +func (c *ClientFactory) NewResourceQuotaLimitsClient() *ResourceQuotaLimitsClient { + return &ResourceQuotaLimitsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewResourceRegionInfosClient creates a new instance of ResourceRegionInfosClient. +func (c *ClientFactory) NewResourceRegionInfosClient() *ResourceRegionInfosClient { + return &ResourceRegionInfosClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewResourceUsagesClient creates a new instance of ResourceUsagesClient. +func (c *ClientFactory) NewResourceUsagesClient() *ResourceUsagesClient { + return &ResourceUsagesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSnapshotPoliciesClient creates a new instance of SnapshotPoliciesClient. +func (c *ClientFactory) NewSnapshotPoliciesClient() *SnapshotPoliciesClient { + return &SnapshotPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSnapshotsClient creates a new instance of SnapshotsClient. +func (c *ClientFactory) NewSnapshotsClient() *SnapshotsClient { + return &SnapshotsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSubvolumesClient creates a new instance of SubvolumesClient. +func (c *ClientFactory) NewSubvolumesClient() *SubvolumesClient { + return &SubvolumesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVolumeGroupsClient creates a new instance of VolumeGroupsClient. +func (c *ClientFactory) NewVolumeGroupsClient() *VolumeGroupsClient { + return &VolumeGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVolumeQuotaRulesClient creates a new instance of VolumeQuotaRulesClient. +func (c *ClientFactory) NewVolumeQuotaRulesClient() *VolumeQuotaRulesClient { + return &VolumeQuotaRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVolumesClient creates a new instance of VolumesClient. +func (c *ClientFactory) NewVolumesClient() *VolumesClient { + return &VolumesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/constants.go new file mode 100644 index 00000000..79f01db1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/constants.go @@ -0,0 +1,737 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp" + moduleVersion = "v7.5.0" +) + +// ActiveDirectoryStatus - Status of the Active Directory +type ActiveDirectoryStatus string + +const ( + // ActiveDirectoryStatusCreated - Active Directory created but not in use + ActiveDirectoryStatusCreated ActiveDirectoryStatus = "Created" + // ActiveDirectoryStatusDeleted - Active Directory Deleted + ActiveDirectoryStatusDeleted ActiveDirectoryStatus = "Deleted" + // ActiveDirectoryStatusError - Error with the Active Directory + ActiveDirectoryStatusError ActiveDirectoryStatus = "Error" + // ActiveDirectoryStatusInUse - Active Directory in use by SMB Volume + ActiveDirectoryStatusInUse ActiveDirectoryStatus = "InUse" + // ActiveDirectoryStatusUpdating - Active Directory Updating + ActiveDirectoryStatusUpdating ActiveDirectoryStatus = "Updating" +) + +// PossibleActiveDirectoryStatusValues returns the possible values for the ActiveDirectoryStatus const type. +func PossibleActiveDirectoryStatusValues() []ActiveDirectoryStatus { + return []ActiveDirectoryStatus{ + ActiveDirectoryStatusCreated, + ActiveDirectoryStatusDeleted, + ActiveDirectoryStatusError, + ActiveDirectoryStatusInUse, + ActiveDirectoryStatusUpdating, + } +} + +// ApplicationType - Application Type +type ApplicationType string + +const ( + ApplicationTypeORACLE ApplicationType = "ORACLE" + ApplicationTypeSAPHANA ApplicationType = "SAP-HANA" +) + +// PossibleApplicationTypeValues returns the possible values for the ApplicationType const type. +func PossibleApplicationTypeValues() []ApplicationType { + return []ApplicationType{ + ApplicationTypeORACLE, + ApplicationTypeSAPHANA, + } +} + +// AvsDataStore - Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose +type AvsDataStore string + +const ( + // AvsDataStoreDisabled - avsDataStore is disabled + AvsDataStoreDisabled AvsDataStore = "Disabled" + // AvsDataStoreEnabled - avsDataStore is enabled + AvsDataStoreEnabled AvsDataStore = "Enabled" +) + +// PossibleAvsDataStoreValues returns the possible values for the AvsDataStore const type. +func PossibleAvsDataStoreValues() []AvsDataStore { + return []AvsDataStore{ + AvsDataStoreDisabled, + AvsDataStoreEnabled, + } +} + +// BackupType - Type of backup Manual or Scheduled +type BackupType string + +const ( + // BackupTypeManual - Manual backup + BackupTypeManual BackupType = "Manual" + // BackupTypeScheduled - Scheduled backup + BackupTypeScheduled BackupType = "Scheduled" +) + +// PossibleBackupTypeValues returns the possible values for the BackupType const type. +func PossibleBackupTypeValues() []BackupType { + return []BackupType{ + BackupTypeManual, + BackupTypeScheduled, + } +} + +// CheckNameResourceTypes - Resource type used for verification. +type CheckNameResourceTypes string + +const ( + CheckNameResourceTypesMicrosoftNetAppNetAppAccounts CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts" + CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPools CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools" + CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumes CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" + CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" +) + +// PossibleCheckNameResourceTypesValues returns the possible values for the CheckNameResourceTypes const type. +func PossibleCheckNameResourceTypesValues() []CheckNameResourceTypes { + return []CheckNameResourceTypes{ + CheckNameResourceTypesMicrosoftNetAppNetAppAccounts, + CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPools, + CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumes, + CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots, + } +} + +// CheckQuotaNameResourceTypes - Resource type used for verification. +type CheckQuotaNameResourceTypes string + +const ( + CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccounts CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts" + CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPools CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools" + CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumes CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" + CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" +) + +// PossibleCheckQuotaNameResourceTypesValues returns the possible values for the CheckQuotaNameResourceTypes const type. +func PossibleCheckQuotaNameResourceTypesValues() []CheckQuotaNameResourceTypes { + return []CheckQuotaNameResourceTypes{ + CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccounts, + CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPools, + CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumes, + CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots, + } +} + +// ChownMode - This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can +// change the ownership of the file. unrestricted - Non-root users can change ownership of +// files that they own. +type ChownMode string + +const ( + ChownModeRestricted ChownMode = "Restricted" + ChownModeUnrestricted ChownMode = "Unrestricted" +) + +// PossibleChownModeValues returns the possible values for the ChownMode const type. +func PossibleChownModeValues() []ChownMode { + return []ChownMode{ + ChownModeRestricted, + ChownModeUnrestricted, + } +} + +// CoolAccessRetrievalPolicy - coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard +// storage based on the read pattern for cool access enabled volumes. The possible values for this field +// are: Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. OnRead +// - All client-driven data read is pulled from cool tier to standard storage on +// both sequential and random reads. Never - No client-driven data is pulled from cool tier to standard storage. +type CoolAccessRetrievalPolicy string + +const ( + CoolAccessRetrievalPolicyDefault CoolAccessRetrievalPolicy = "Default" + CoolAccessRetrievalPolicyNever CoolAccessRetrievalPolicy = "Never" + CoolAccessRetrievalPolicyOnRead CoolAccessRetrievalPolicy = "OnRead" +) + +// PossibleCoolAccessRetrievalPolicyValues returns the possible values for the CoolAccessRetrievalPolicy const type. +func PossibleCoolAccessRetrievalPolicyValues() []CoolAccessRetrievalPolicy { + return []CoolAccessRetrievalPolicy{ + CoolAccessRetrievalPolicyDefault, + CoolAccessRetrievalPolicyNever, + CoolAccessRetrievalPolicyOnRead, + } +} + +// CoolAccessTieringPolicy - coolAccessTieringPolicy determines which cold data blocks are moved to cool tier. The possible +// values for this field are: Auto - Moves cold user data blocks in both the Snapshot copies and the active +// file system to the cool tier tier. This policy is the default. SnapshotOnly - Moves user data blocks of the Volume Snapshot +// copies that are not associated with the active file system to the cool tier. +type CoolAccessTieringPolicy string + +const ( + CoolAccessTieringPolicyAuto CoolAccessTieringPolicy = "Auto" + CoolAccessTieringPolicySnapshotOnly CoolAccessTieringPolicy = "SnapshotOnly" +) + +// PossibleCoolAccessTieringPolicyValues returns the possible values for the CoolAccessTieringPolicy const type. +func PossibleCoolAccessTieringPolicyValues() []CoolAccessTieringPolicy { + return []CoolAccessTieringPolicy{ + CoolAccessTieringPolicyAuto, + CoolAccessTieringPolicySnapshotOnly, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// EnableSubvolumes - Flag indicating whether subvolume operations are enabled on the volume +type EnableSubvolumes string + +const ( + // EnableSubvolumesDisabled - subvolumes are not enabled + EnableSubvolumesDisabled EnableSubvolumes = "Disabled" + // EnableSubvolumesEnabled - subvolumes are enabled + EnableSubvolumesEnabled EnableSubvolumes = "Enabled" +) + +// PossibleEnableSubvolumesValues returns the possible values for the EnableSubvolumes const type. +func PossibleEnableSubvolumesValues() []EnableSubvolumes { + return []EnableSubvolumes{ + EnableSubvolumesDisabled, + EnableSubvolumesEnabled, + } +} + +// EncryptionKeySource - Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource +// = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, +// Microsoft.KeyVault' +type EncryptionKeySource string + +const ( + // EncryptionKeySourceMicrosoftKeyVault - Customer-managed key encryption + EncryptionKeySourceMicrosoftKeyVault EncryptionKeySource = "Microsoft.KeyVault" + // EncryptionKeySourceMicrosoftNetApp - Microsoft-managed key encryption + EncryptionKeySourceMicrosoftNetApp EncryptionKeySource = "Microsoft.NetApp" +) + +// PossibleEncryptionKeySourceValues returns the possible values for the EncryptionKeySource const type. +func PossibleEncryptionKeySourceValues() []EncryptionKeySource { + return []EncryptionKeySource{ + EncryptionKeySourceMicrosoftKeyVault, + EncryptionKeySourceMicrosoftNetApp, + } +} + +// EncryptionType - Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes +// in it. This value can only be set when creating new pool. +type EncryptionType string + +const ( + // EncryptionTypeDouble - EncryptionType Double, volumes will use double encryption at rest + EncryptionTypeDouble EncryptionType = "Double" + // EncryptionTypeSingle - EncryptionType Single, volumes will use single encryption at rest + EncryptionTypeSingle EncryptionType = "Single" +) + +// PossibleEncryptionTypeValues returns the possible values for the EncryptionType const type. +func PossibleEncryptionTypeValues() []EncryptionType { + return []EncryptionType{ + EncryptionTypeDouble, + EncryptionTypeSingle, + } +} + +// EndpointType - Indicates whether the local volume is the source or destination for the Volume Replication +type EndpointType string + +const ( + EndpointTypeDst EndpointType = "dst" + EndpointTypeSrc EndpointType = "src" +) + +// PossibleEndpointTypeValues returns the possible values for the EndpointType const type. +func PossibleEndpointTypeValues() []EndpointType { + return []EndpointType{ + EndpointTypeDst, + EndpointTypeSrc, + } +} + +// FileAccessLogs - Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings +// present on the volume. +type FileAccessLogs string + +const ( + // FileAccessLogsDisabled - fileAccessLogs are not enabled + FileAccessLogsDisabled FileAccessLogs = "Disabled" + // FileAccessLogsEnabled - fileAccessLogs are enabled + FileAccessLogsEnabled FileAccessLogs = "Enabled" +) + +// PossibleFileAccessLogsValues returns the possible values for the FileAccessLogs const type. +func PossibleFileAccessLogsValues() []FileAccessLogs { + return []FileAccessLogs{ + FileAccessLogsDisabled, + FileAccessLogsEnabled, + } +} + +// InAvailabilityReasonType - Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists +// indicates that the name is already in use and is therefore unavailable. +type InAvailabilityReasonType string + +const ( + InAvailabilityReasonTypeAlreadyExists InAvailabilityReasonType = "AlreadyExists" + InAvailabilityReasonTypeInvalid InAvailabilityReasonType = "Invalid" +) + +// PossibleInAvailabilityReasonTypeValues returns the possible values for the InAvailabilityReasonType const type. +func PossibleInAvailabilityReasonTypeValues() []InAvailabilityReasonType { + return []InAvailabilityReasonType{ + InAvailabilityReasonTypeAlreadyExists, + InAvailabilityReasonTypeInvalid, + } +} + +// KeySource - The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault +type KeySource string + +const ( + // KeySourceMicrosoftKeyVault - Customer-managed key encryption + KeySourceMicrosoftKeyVault KeySource = "Microsoft.KeyVault" + // KeySourceMicrosoftNetApp - Microsoft-managed key encryption + KeySourceMicrosoftNetApp KeySource = "Microsoft.NetApp" +) + +// PossibleKeySourceValues returns the possible values for the KeySource const type. +func PossibleKeySourceValues() []KeySource { + return []KeySource{ + KeySourceMicrosoftKeyVault, + KeySourceMicrosoftNetApp, + } +} + +// KeyVaultStatus - Status of the KeyVault connection. +type KeyVaultStatus string + +const ( + // KeyVaultStatusCreated - KeyVault connection created but not in use + KeyVaultStatusCreated KeyVaultStatus = "Created" + // KeyVaultStatusDeleted - KeyVault connection Deleted + KeyVaultStatusDeleted KeyVaultStatus = "Deleted" + // KeyVaultStatusError - Error with the KeyVault connection + KeyVaultStatusError KeyVaultStatus = "Error" + // KeyVaultStatusInUse - KeyVault connection in use by SMB Volume + KeyVaultStatusInUse KeyVaultStatus = "InUse" + // KeyVaultStatusUpdating - KeyVault connection Updating + KeyVaultStatusUpdating KeyVaultStatus = "Updating" +) + +// PossibleKeyVaultStatusValues returns the possible values for the KeyVaultStatus const type. +func PossibleKeyVaultStatusValues() []KeyVaultStatus { + return []KeyVaultStatus{ + KeyVaultStatusCreated, + KeyVaultStatusDeleted, + KeyVaultStatusError, + KeyVaultStatusInUse, + KeyVaultStatusUpdating, + } +} + +// ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +type ManagedServiceIdentityType string + +const ( + ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" + ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" + ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{ + ManagedServiceIdentityTypeNone, + ManagedServiceIdentityTypeSystemAssigned, + ManagedServiceIdentityTypeSystemAssignedUserAssigned, + ManagedServiceIdentityTypeUserAssigned, + } +} + +type MetricAggregationType string + +const ( + MetricAggregationTypeAverage MetricAggregationType = "Average" +) + +// PossibleMetricAggregationTypeValues returns the possible values for the MetricAggregationType const type. +func PossibleMetricAggregationTypeValues() []MetricAggregationType { + return []MetricAggregationType{ + MetricAggregationTypeAverage, + } +} + +// MirrorState - The status of the replication +type MirrorState string + +const ( + MirrorStateBroken MirrorState = "Broken" + MirrorStateMirrored MirrorState = "Mirrored" + MirrorStateUninitialized MirrorState = "Uninitialized" +) + +// PossibleMirrorStateValues returns the possible values for the MirrorState const type. +func PossibleMirrorStateValues() []MirrorState { + return []MirrorState{ + MirrorStateBroken, + MirrorStateMirrored, + MirrorStateUninitialized, + } +} + +// MultiAdStatus - MultiAD Status for the account +type MultiAdStatus string + +const ( + // MultiAdStatusDisabled - Account is MultiAD disabled, Means its a SharedAD or SingleAD account. + MultiAdStatusDisabled MultiAdStatus = "Disabled" + // MultiAdStatusEnabled - Account is MultiAD enabled + MultiAdStatusEnabled MultiAdStatus = "Enabled" +) + +// PossibleMultiAdStatusValues returns the possible values for the MultiAdStatus const type. +func PossibleMultiAdStatusValues() []MultiAdStatus { + return []MultiAdStatus{ + MultiAdStatusDisabled, + MultiAdStatusEnabled, + } +} + +// NetworkFeatures - Network features available to the volume, or current state of update. +type NetworkFeatures string + +const ( + // NetworkFeaturesBasic - Basic network features. + NetworkFeaturesBasic NetworkFeatures = "Basic" + // NetworkFeaturesBasicStandard - Updating from Basic to Standard network features. + NetworkFeaturesBasicStandard NetworkFeatures = "Basic_Standard" + // NetworkFeaturesStandard - Standard network features. + NetworkFeaturesStandard NetworkFeatures = "Standard" + // NetworkFeaturesStandardBasic - Updating from Standard to Basic network features. + NetworkFeaturesStandardBasic NetworkFeatures = "Standard_Basic" +) + +// PossibleNetworkFeaturesValues returns the possible values for the NetworkFeatures const type. +func PossibleNetworkFeaturesValues() []NetworkFeatures { + return []NetworkFeatures{ + NetworkFeaturesBasic, + NetworkFeaturesBasicStandard, + NetworkFeaturesStandard, + NetworkFeaturesStandardBasic, + } +} + +// NetworkSiblingSetProvisioningState - Gets the status of the NetworkSiblingSet at the time the operation was called. +type NetworkSiblingSetProvisioningState string + +const ( + NetworkSiblingSetProvisioningStateCanceled NetworkSiblingSetProvisioningState = "Canceled" + NetworkSiblingSetProvisioningStateFailed NetworkSiblingSetProvisioningState = "Failed" + NetworkSiblingSetProvisioningStateSucceeded NetworkSiblingSetProvisioningState = "Succeeded" + NetworkSiblingSetProvisioningStateUpdating NetworkSiblingSetProvisioningState = "Updating" +) + +// PossibleNetworkSiblingSetProvisioningStateValues returns the possible values for the NetworkSiblingSetProvisioningState const type. +func PossibleNetworkSiblingSetProvisioningStateValues() []NetworkSiblingSetProvisioningState { + return []NetworkSiblingSetProvisioningState{ + NetworkSiblingSetProvisioningStateCanceled, + NetworkSiblingSetProvisioningStateFailed, + NetworkSiblingSetProvisioningStateSucceeded, + NetworkSiblingSetProvisioningStateUpdating, + } +} + +// ProvisioningState - Gets the status of the VolumeQuotaRule at the time the operation was called. +type ProvisioningState string + +const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateMoving ProvisioningState = "Moving" + ProvisioningStatePatching ProvisioningState = "Patching" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateAccepted, + ProvisioningStateCreating, + ProvisioningStateDeleting, + ProvisioningStateFailed, + ProvisioningStateMoving, + ProvisioningStatePatching, + ProvisioningStateSucceeded, + } +} + +// QosType - The qos type of the pool +type QosType string + +const ( + // QosTypeAuto - qos type Auto + QosTypeAuto QosType = "Auto" + // QosTypeManual - qos type Manual + QosTypeManual QosType = "Manual" +) + +// PossibleQosTypeValues returns the possible values for the QosType const type. +func PossibleQosTypeValues() []QosType { + return []QosType{ + QosTypeAuto, + QosTypeManual, + } +} + +// RegionStorageToNetworkProximity - Provides storage to network proximity information in the region. +type RegionStorageToNetworkProximity string + +const ( + // RegionStorageToNetworkProximityAcrossT2 - Standard AcrossT2 network connectivity. + RegionStorageToNetworkProximityAcrossT2 RegionStorageToNetworkProximity = "AcrossT2" + // RegionStorageToNetworkProximityDefault - Basic network connectivity. + RegionStorageToNetworkProximityDefault RegionStorageToNetworkProximity = "Default" + // RegionStorageToNetworkProximityT1 - Standard T1 network connectivity. + RegionStorageToNetworkProximityT1 RegionStorageToNetworkProximity = "T1" + // RegionStorageToNetworkProximityT1AndAcrossT2 - Standard T1 and AcrossT2 network connectivity. + RegionStorageToNetworkProximityT1AndAcrossT2 RegionStorageToNetworkProximity = "T1AndAcrossT2" + // RegionStorageToNetworkProximityT1AndT2 - Standard T1 and T2 network connectivity. + RegionStorageToNetworkProximityT1AndT2 RegionStorageToNetworkProximity = "T1AndT2" + // RegionStorageToNetworkProximityT1AndT2AndAcrossT2 - Standard T1, T2 and AcrossT2 network connectivity. + RegionStorageToNetworkProximityT1AndT2AndAcrossT2 RegionStorageToNetworkProximity = "T1AndT2AndAcrossT2" + // RegionStorageToNetworkProximityT2 - Standard T2 network connectivity. + RegionStorageToNetworkProximityT2 RegionStorageToNetworkProximity = "T2" + // RegionStorageToNetworkProximityT2AndAcrossT2 - Standard T2 and AcrossT2 network connectivity. + RegionStorageToNetworkProximityT2AndAcrossT2 RegionStorageToNetworkProximity = "T2AndAcrossT2" +) + +// PossibleRegionStorageToNetworkProximityValues returns the possible values for the RegionStorageToNetworkProximity const type. +func PossibleRegionStorageToNetworkProximityValues() []RegionStorageToNetworkProximity { + return []RegionStorageToNetworkProximity{ + RegionStorageToNetworkProximityAcrossT2, + RegionStorageToNetworkProximityDefault, + RegionStorageToNetworkProximityT1, + RegionStorageToNetworkProximityT1AndAcrossT2, + RegionStorageToNetworkProximityT1AndT2, + RegionStorageToNetworkProximityT1AndT2AndAcrossT2, + RegionStorageToNetworkProximityT2, + RegionStorageToNetworkProximityT2AndAcrossT2, + } +} + +// RelationshipStatus - Status of the mirror relationship +type RelationshipStatus string + +const ( + RelationshipStatusFailed RelationshipStatus = "Failed" + RelationshipStatusIdle RelationshipStatus = "Idle" + RelationshipStatusTransferring RelationshipStatus = "Transferring" + RelationshipStatusUnknown RelationshipStatus = "Unknown" +) + +// PossibleRelationshipStatusValues returns the possible values for the RelationshipStatus const type. +func PossibleRelationshipStatusValues() []RelationshipStatus { + return []RelationshipStatus{ + RelationshipStatusFailed, + RelationshipStatusIdle, + RelationshipStatusTransferring, + RelationshipStatusUnknown, + } +} + +// ReplicationSchedule - Schedule +type ReplicationSchedule string + +const ( + ReplicationSchedule10Minutely ReplicationSchedule = "_10minutely" + ReplicationScheduleDaily ReplicationSchedule = "daily" + ReplicationScheduleHourly ReplicationSchedule = "hourly" +) + +// PossibleReplicationScheduleValues returns the possible values for the ReplicationSchedule const type. +func PossibleReplicationScheduleValues() []ReplicationSchedule { + return []ReplicationSchedule{ + ReplicationSchedule10Minutely, + ReplicationScheduleDaily, + ReplicationScheduleHourly, + } +} + +// ReplicationType - Indicates whether the replication is cross zone or cross region. +type ReplicationType string + +const ( + // ReplicationTypeCrossRegionReplication - Cross region replication + ReplicationTypeCrossRegionReplication ReplicationType = "CrossRegionReplication" + // ReplicationTypeCrossZoneReplication - Cross zone replication + ReplicationTypeCrossZoneReplication ReplicationType = "CrossZoneReplication" +) + +// PossibleReplicationTypeValues returns the possible values for the ReplicationType const type. +func PossibleReplicationTypeValues() []ReplicationType { + return []ReplicationType{ + ReplicationTypeCrossRegionReplication, + ReplicationTypeCrossZoneReplication, + } +} + +// SecurityStyle - The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol +type SecurityStyle string + +const ( + SecurityStyleNtfs SecurityStyle = "ntfs" + SecurityStyleUnix SecurityStyle = "unix" +) + +// PossibleSecurityStyleValues returns the possible values for the SecurityStyle const type. +func PossibleSecurityStyleValues() []SecurityStyle { + return []SecurityStyle{ + SecurityStyleNtfs, + SecurityStyleUnix, + } +} + +// ServiceLevel - The service level of the file system +type ServiceLevel string + +const ( + // ServiceLevelPremium - Premium service level + ServiceLevelPremium ServiceLevel = "Premium" + // ServiceLevelStandard - Standard service level + ServiceLevelStandard ServiceLevel = "Standard" + // ServiceLevelStandardZRS - Zone redundant storage service level. This will be deprecated soon. + ServiceLevelStandardZRS ServiceLevel = "StandardZRS" + // ServiceLevelUltra - Ultra service level + ServiceLevelUltra ServiceLevel = "Ultra" +) + +// PossibleServiceLevelValues returns the possible values for the ServiceLevel const type. +func PossibleServiceLevelValues() []ServiceLevel { + return []ServiceLevel{ + ServiceLevelPremium, + ServiceLevelStandard, + ServiceLevelStandardZRS, + ServiceLevelUltra, + } +} + +// SmbAccessBasedEnumeration - Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol +// volume +type SmbAccessBasedEnumeration string + +const ( + // SmbAccessBasedEnumerationDisabled - smbAccessBasedEnumeration share setting is disabled + SmbAccessBasedEnumerationDisabled SmbAccessBasedEnumeration = "Disabled" + // SmbAccessBasedEnumerationEnabled - smbAccessBasedEnumeration share setting is enabled + SmbAccessBasedEnumerationEnabled SmbAccessBasedEnumeration = "Enabled" +) + +// PossibleSmbAccessBasedEnumerationValues returns the possible values for the SmbAccessBasedEnumeration const type. +func PossibleSmbAccessBasedEnumerationValues() []SmbAccessBasedEnumeration { + return []SmbAccessBasedEnumeration{ + SmbAccessBasedEnumerationDisabled, + SmbAccessBasedEnumerationEnabled, + } +} + +// SmbNonBrowsable - Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume +type SmbNonBrowsable string + +const ( + // SmbNonBrowsableDisabled - smbNonBrowsable share setting is disabled + SmbNonBrowsableDisabled SmbNonBrowsable = "Disabled" + // SmbNonBrowsableEnabled - smbNonBrowsable share setting is enabled + SmbNonBrowsableEnabled SmbNonBrowsable = "Enabled" +) + +// PossibleSmbNonBrowsableValues returns the possible values for the SmbNonBrowsable const type. +func PossibleSmbNonBrowsableValues() []SmbNonBrowsable { + return []SmbNonBrowsable{ + SmbNonBrowsableDisabled, + SmbNonBrowsableEnabled, + } +} + +// Type - Type of quota +type Type string + +const ( + // TypeDefaultGroupQuota - Default group quota + TypeDefaultGroupQuota Type = "DefaultGroupQuota" + // TypeDefaultUserQuota - Default user quota + TypeDefaultUserQuota Type = "DefaultUserQuota" + // TypeIndividualGroupQuota - Individual group quota + TypeIndividualGroupQuota Type = "IndividualGroupQuota" + // TypeIndividualUserQuota - Individual user quota + TypeIndividualUserQuota Type = "IndividualUserQuota" +) + +// PossibleTypeValues returns the possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{ + TypeDefaultGroupQuota, + TypeDefaultUserQuota, + TypeIndividualGroupQuota, + TypeIndividualUserQuota, + } +} + +// VolumeStorageToNetworkProximity - Provides storage to network proximity information for the volume. +type VolumeStorageToNetworkProximity string + +const ( + // VolumeStorageToNetworkProximityAcrossT2 - Standard AcrossT2 storage to network connectivity. + VolumeStorageToNetworkProximityAcrossT2 VolumeStorageToNetworkProximity = "AcrossT2" + // VolumeStorageToNetworkProximityDefault - Basic storage to network connectivity. + VolumeStorageToNetworkProximityDefault VolumeStorageToNetworkProximity = "Default" + // VolumeStorageToNetworkProximityT1 - Standard T1 storage to network connectivity. + VolumeStorageToNetworkProximityT1 VolumeStorageToNetworkProximity = "T1" + // VolumeStorageToNetworkProximityT2 - Standard T2 storage to network connectivity. + VolumeStorageToNetworkProximityT2 VolumeStorageToNetworkProximity = "T2" +) + +// PossibleVolumeStorageToNetworkProximityValues returns the possible values for the VolumeStorageToNetworkProximity const type. +func PossibleVolumeStorageToNetworkProximityValues() []VolumeStorageToNetworkProximity { + return []VolumeStorageToNetworkProximity{ + VolumeStorageToNetworkProximityAcrossT2, + VolumeStorageToNetworkProximityDefault, + VolumeStorageToNetworkProximityT1, + VolumeStorageToNetworkProximityT2, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/models.go new file mode 100644 index 00000000..4666dd48 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/models.go @@ -0,0 +1,2169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import "time" + +// Account - NetApp account resource +type Account struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // The identity used for the resource. + Identity *ManagedServiceIdentity + + // NetApp Account properties + Properties *AccountProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AccountEncryption - Encryption settings +type AccountEncryption struct { + // Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + Identity *EncryptionIdentity + + // The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault + KeySource *KeySource + + // Properties provided by KeVault. Applicable if keySource is 'Microsoft.KeyVault'. + KeyVaultProperties *KeyVaultProperties +} + +// AccountList - List of NetApp account resources +type AccountList struct { + // URL to get the next set of results. + NextLink *string + + // Multiple NetApp accounts + Value []*Account +} + +// AccountPatch - NetApp account patch resource +type AccountPatch struct { + // The identity used for the resource. + Identity *ManagedServiceIdentity + + // Resource location + Location *string + + // NetApp Account properties + Properties *AccountProperties + + // Resource tags + Tags map[string]*string + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource name + Name *string + + // READ-ONLY; Resource type + Type *string +} + +// AccountProperties - NetApp account properties +type AccountProperties struct { + // Active Directories + ActiveDirectories []*ActiveDirectory + + // Encryption settings + Encryption *AccountEncryption + + // Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and + // only affect non ldap NFSv4 volumes. + NfsV4IDDomain *string + + // READ-ONLY; Shows the status of disableShowmount for all volumes under the subscription, null equals false + DisableShowmount *bool + + // READ-ONLY; MultiAD Status for the account + MultiAdStatus *MultiAdStatus + + // READ-ONLY; Azure lifecycle management + ProvisioningState *string +} + +// ActiveDirectory - Active Directory +type ActiveDirectory struct { + // Id of the Active Directory + ActiveDirectoryID *string + + // Name of the active directory machine. This optional parameter is used only while creating kerberos volume + AdName *string + + // Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier + Administrators []*string + + // If enabled, AES encryption will be enabled for SMB communication. + AesEncryption *bool + + // If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. + AllowLocalNfsUsersWithLdap *bool + + // Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier + BackupOperators []*string + + // Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain + DNS *string + + // Name of the Active Directory domain + Domain *string + + // If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. + EncryptDCConnections *bool + + // kdc server IP address for the active directory machine. This optional parameter is used only while creating kerberos volume. + KdcIP *string + + // Specifies whether or not the LDAP traffic needs to be secured via TLS. + LdapOverTLS *bool + + // LDAP Search scope options + LdapSearchScope *LdapSearchScopeOpt + + // Specifies whether or not the LDAP traffic needs to be signed. + LdapSigning *bool + + // The Organizational Unit (OU) within the Windows Active Directory + OrganizationalUnit *string + + // Plain text password of Active Directory domain administrator, value is masked in the response + Password *string + + // Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 addresses + // can be passed. + PreferredServersForLdapClient *string + + // Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares + // for SQL). A list of unique usernames without domain specifier + SecurityOperators []*string + + // When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's + // self-signed root CA certificate, this optional parameter is used only for + // dual protocol with LDAP user-mapping volumes. + ServerRootCACertificate *string + + // The Active Directory site the service will limit Domain Controller discovery to + Site *string + + // NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes + SmbServerName *string + + // A domain user account with permission to create machine accounts + Username *string + + // READ-ONLY; Status of the Active Directory + Status *ActiveDirectoryStatus + + // READ-ONLY; Any details in regards to the Status of the Active Directory + StatusDetails *string +} + +// AuthorizeRequest - Authorize request +type AuthorizeRequest struct { + // Resource id of the remote volume + RemoteVolumeResourceID *string +} + +// Backup under a Backup Vault +type Backup struct { + // REQUIRED; Backup Properties + Properties *BackupProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// BackupPatch - Backup patch +type BackupPatch struct { + // Backup Patch Properties + Properties *BackupPatchProperties +} + +// BackupPatchProperties - Backup patch properties +type BackupPatchProperties struct { + // Label for backup + Label *string +} + +// BackupPoliciesList - List of Backup Policies +type BackupPoliciesList struct { + // A list of backup policies + Value []*BackupPolicy +} + +// BackupPolicy - Backup policy information +type BackupPolicy struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; Backup policy Properties + Properties *BackupPolicyProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// BackupPolicyPatch - Backup policy Details for create and update +type BackupPolicyPatch struct { + // Resource location + Location *string + + // Backup policy Properties + Properties *BackupPolicyProperties + + // Resource tags + Tags map[string]*string + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource name + Name *string + + // READ-ONLY; Resource type + Type *string +} + +// BackupPolicyProperties - Backup policy properties +type BackupPolicyProperties struct { + // Daily backups count to keep + DailyBackupsToKeep *int32 + + // The property to decide policy is enabled or not + Enabled *bool + + // Monthly backups count to keep + MonthlyBackupsToKeep *int32 + + // Weekly backups count to keep + WeeklyBackupsToKeep *int32 + + // READ-ONLY; Backup Policy GUID ID + BackupPolicyID *string + + // READ-ONLY; Azure lifecycle management + ProvisioningState *string + + // READ-ONLY; A list of volumes assigned to this policy + VolumeBackups []*VolumeBackups + + // READ-ONLY; Volumes using current backup policy + VolumesAssigned *int32 +} + +// BackupProperties - Backup properties +type BackupProperties struct { + // REQUIRED; ResourceId used to identify the Volume + VolumeResourceID *string + + // Label for backup + Label *string + + // The name of the snapshot + SnapshotName *string + + // Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups + UseExistingSnapshot *bool + + // READ-ONLY; UUID v4 used to identify the Backup + BackupID *string + + // READ-ONLY; ResourceId used to identify the backup policy + BackupPolicyResourceID *string + + // READ-ONLY; Type of backup Manual or Scheduled + BackupType *BackupType + + // READ-ONLY; The completion date of the backup + CompletionDate *time.Time + + // READ-ONLY; The creation date of the backup + CreationDate *time.Time + + // READ-ONLY; Failure reason + FailureReason *string + + // READ-ONLY; Specifies if the backup is for a large volume. + IsLargeVolume *bool + + // READ-ONLY; Azure lifecycle management + ProvisioningState *string + + // READ-ONLY; Size of backup in bytes + Size *int64 + + // READ-ONLY; The snapshot creation date of the backup + SnapshotCreationDate *time.Time +} + +// BackupRestoreFiles - Restore payload for Single File Backup Restore +type BackupRestoreFiles struct { + // REQUIRED; Resource Id of the destination volume on which the files need to be restored + DestinationVolumeID *string + + // REQUIRED; List of files to be restored + FileList []*string + + // Destination folder where the files will be restored. The path name should start with a forward slash. If it is omitted + // from request then restore is done at the root folder of the destination volume by + // default + RestoreFilePath *string +} + +// BackupStatus - Backup status +type BackupStatus struct { + // READ-ONLY; Displays error message if the backup is in an error state + ErrorMessage *string + + // READ-ONLY; Backup health status + Healthy *bool + + // READ-ONLY; Displays the last transfer size + LastTransferSize *int64 + + // READ-ONLY; Displays the last transfer type + LastTransferType *string + + // READ-ONLY; The status of the backup + MirrorState *MirrorState + + // READ-ONLY; Status of the backup mirror relationship + RelationshipStatus *RelationshipStatus + + // READ-ONLY; Displays the total bytes transferred + TotalTransferBytes *int64 + + // READ-ONLY; Displays the total number of bytes transferred for the ongoing operation + TransferProgressBytes *int64 + + // READ-ONLY; Reason for the unhealthy backup relationship + UnhealthyReason *string +} + +// BackupVault - Backup Vault information +type BackupVault struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Backup Vault Properties + Properties *BackupVaultProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// BackupVaultPatch - Backup Vault information +type BackupVaultPatch struct { + // Resource tags + Tags map[string]*string +} + +// BackupVaultProperties - Backup Vault properties +type BackupVaultProperties struct { + // READ-ONLY; Azure lifecycle management + ProvisioningState *string +} + +// BackupVaultsList - List of Backup Vaults +type BackupVaultsList struct { + // URL to get the next set of results. + NextLink *string + + // A list of Backup Vaults + Value []*BackupVault +} + +// BackupsList - List of Backups +type BackupsList struct { + // URL to get the next set of results. + NextLink *string + + // A list of Backups + Value []*Backup +} + +// BackupsMigrationRequest - Migrate Backups Request +type BackupsMigrationRequest struct { + // REQUIRED; The ResourceId of the Backup Vault + BackupVaultID *string +} + +// BreakFileLocksRequest - Break file locks request +type BreakFileLocksRequest struct { + // To clear file locks on a volume for a particular client + ClientIP *string + + // Break File locks could be a disruptive operation for application as locks on the volume will be broken, if want to process, + // set to true. + ConfirmRunningDisruptiveOperation *bool +} + +// BreakReplicationRequest - Break replication request +type BreakReplicationRequest struct { + // If replication is in status transferring and you want to force break the replication, set to true + ForceBreakReplication *bool +} + +// CapacityPool - Capacity pool resource +type CapacityPool struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; Capacity pool properties + Properties *PoolProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// CapacityPoolList - List of capacity pool resources +type CapacityPoolList struct { + // URL to get the next set of results. + NextLink *string + + // List of Capacity pools + Value []*CapacityPool +} + +// CapacityPoolPatch - Capacity pool patch resource +type CapacityPoolPatch struct { + // Resource location + Location *string + + // Capacity pool properties + Properties *PoolPatchProperties + + // Resource tags + Tags map[string]*string + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource name + Name *string + + // READ-ONLY; Resource type + Type *string +} + +// ChangeKeyVault - Change key vault request +type ChangeKeyVault struct { + // REQUIRED; The name of the key that should be used for encryption. + KeyName *string + + // REQUIRED; Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with customer-managed + // keys needs its own key vault private endpoint. + KeyVaultPrivateEndpoints []*KeyVaultPrivateEndpoint + + // REQUIRED; The URI of the key vault/managed HSM that should be used for encryption. + KeyVaultURI *string + + // Azure resource ID of the key vault/managed HSM that should be used for encryption. + KeyVaultResourceID *string +} + +// CheckAvailabilityResponse - Information regarding availability of a resource. +type CheckAvailabilityResponse struct { + // true indicates name is valid and available. false indicates the name is invalid, unavailable, or both. + IsAvailable *bool + + // If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements + // so that the user can select a valid name. If reason == AlreadyExists, + // explain that resource name is already in use, and direct them to select a different name. + Message *string + + // Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that + // the name is already in use and is therefore unavailable. + Reason *InAvailabilityReasonType +} + +// ClusterPeerCommandResponse - Information about cluster peering process +type ClusterPeerCommandResponse struct { + // A command that needs to be run on the external ONTAP to accept cluster peering. Will only be present if clusterPeeringStatus + // is pending + PeerAcceptCommand *string +} + +// DailySchedule - Daily Schedule properties +type DailySchedule struct { + // Indicates which hour in UTC timezone a snapshot should be taken + Hour *int32 + + // Indicates which minute snapshot should be taken + Minute *int32 + + // Daily snapshot count to keep + SnapshotsToKeep *int32 + + // Resource size in bytes, current storage usage for the volume in bytes + UsedBytes *int64 +} + +// DestinationReplication - Destination replication properties +type DestinationReplication struct { + // The remote region for the destination volume. + Region *string + + // Indicates whether the replication is cross zone or cross region. + ReplicationType *ReplicationType + + // The resource ID of the remote volume + ResourceID *string + + // The remote zone for the destination volume. + Zone *string +} + +// Dimension of blobs, possibly be blob type or access tier. +type Dimension struct { + // Display name of dimension. + DisplayName *string + + // Display name of dimension. + Name *string +} + +// EncryptionIdentity - Identity used to authenticate with key vault. +type EncryptionIdentity struct { + // ClientId of the multi-tenant AAD Application. Used to access cross-tenant keyvaults. + FederatedClientID *string + + // The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type + // has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + UserAssignedIdentity *string + + // READ-ONLY; The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + PrincipalID *string +} + +// EncryptionTransitionRequest - Encryption transition request +type EncryptionTransitionRequest struct { + // REQUIRED; Identifier of the private endpoint to reach the Azure Key Vault + PrivateEndpointID *string + + // REQUIRED; Identifier for the virtual network + VirtualNetworkID *string +} + +// ExportPolicyRule - Volume Export Policy Rule +type ExportPolicyRule struct { + // Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names + AllowedClients *string + + // This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the + // ownership of the file. unrestricted - Non-root users can change ownership of + // files that they own. + ChownMode *ChownMode + + // Allows CIFS protocol + Cifs *bool + + // Has root access to volume + HasRootAccess *bool + + // Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later + Kerberos5IReadOnly *bool + + // Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later + Kerberos5IReadWrite *bool + + // Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later + Kerberos5PReadOnly *bool + + // Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later + Kerberos5PReadWrite *bool + + // Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later + Kerberos5ReadOnly *bool + + // Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later + Kerberos5ReadWrite *bool + + // Allows NFSv3 protocol. Enable only for NFSv3 type volumes + Nfsv3 *bool + + // Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes + Nfsv41 *bool + + // Order index + RuleIndex *int32 + + // Read only access + UnixReadOnly *bool + + // Read and write access + UnixReadWrite *bool +} + +// FilePathAvailabilityRequest - File path availability request content - availability is based on the name and the subnetId. +type FilePathAvailabilityRequest struct { + // REQUIRED; File path to verify. + Name *string + + // REQUIRED; The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + SubnetID *string + + // The Azure Resource logical availability zone which is used within zone mapping lookup for the subscription and region. + // The lookup will retrieve the physical zone where volume is placed. + AvailabilityZone *string +} + +// GetGroupIDListForLDAPUserRequest - Get group Id list for LDAP User request +type GetGroupIDListForLDAPUserRequest struct { + // REQUIRED; username is required to fetch the group to which user is part of + Username *string +} + +// GetGroupIDListForLDAPUserResponse - Group Id list for Ldap user +type GetGroupIDListForLDAPUserResponse struct { + // Group Id list + GroupIDsForLdapUser []*string +} + +// GetKeyVaultStatusResponse - Result of getKeyVaultStatus with information about how volumes under NetApp account are encrypted. +type GetKeyVaultStatusResponse struct { + // Represents the properties of the getKeyVaultStatus. + Properties *GetKeyVaultStatusResponseProperties +} + +// GetKeyVaultStatusResponseProperties - Properties which represents Change key vault status. +type GetKeyVaultStatusResponseProperties struct { + // The name of the key that should be used for encryption. + KeyName *string + + // Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with customer-managed + // keys needs its own key vault private endpoint. + KeyVaultPrivateEndpoints []*KeyVaultPrivateEndpoint + + // Azure resource ID of the key vault/managed HSM that should be used for encryption. + KeyVaultResourceID *string + + // The URI of the key vault/managed HSM that should be used for encryption. + KeyVaultURI *string +} + +// HourlySchedule - Hourly Schedule properties +type HourlySchedule struct { + // Indicates which minute snapshot should be taken + Minute *int32 + + // Hourly snapshot count to keep + SnapshotsToKeep *int32 + + // Resource size in bytes, current storage usage for the volume in bytes + UsedBytes *int64 +} + +// KeyVaultPrivateEndpoint - Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted +// with customer-managed keys needs its own key vault private endpoint. +type KeyVaultPrivateEndpoint struct { + // Identifier of the private endpoint to reach the Azure Key Vault + PrivateEndpointID *string + + // Identifier for the virtual network id + VirtualNetworkID *string +} + +// KeyVaultProperties - Properties of key vault. +type KeyVaultProperties struct { + // REQUIRED; The name of KeyVault key. + KeyName *string + + // REQUIRED; The Uri of KeyVault. + KeyVaultURI *string + + // The resource ID of KeyVault. + KeyVaultResourceID *string + + // READ-ONLY; UUID v4 used to identify the Azure Key Vault configuration + KeyVaultID *string + + // READ-ONLY; Status of the KeyVault connection. + Status *KeyVaultStatus +} + +// LdapSearchScopeOpt - LDAP search scope +type LdapSearchScopeOpt struct { + // This specifies the group DN, which overrides the base DN for group lookups. + GroupDN *string + + // This specifies the custom LDAP search filter to be used when looking up group membership from LDAP server. + GroupMembershipFilter *string + + // This specifies the user DN, which overrides the base DN for user lookups. + UserDN *string +} + +// ListReplications - List Replications +type ListReplications struct { + // A list of replications + Value []*Replication +} + +// LogSpecification - Log Definition of a single resource metric. +type LogSpecification struct { + // Display name of log specification. + DisplayName *string + + // Name of log specification. + Name *string +} + +// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) +type ManagedServiceIdentity struct { + // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + Type *ManagedServiceIdentityType + + // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + // resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + // The dictionary values can be empty objects ({}) in + // requests. + UserAssignedIdentities map[string]*UserAssignedIdentity + + // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned + // identity. + PrincipalID *string + + // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string +} + +// MetricSpecification - Metric specification of operation. +type MetricSpecification struct { + // Aggregation type could be Average. + AggregationType *string + + // The category this metric specification belong to, could be Capacity. + Category *string + + // Dimensions of blobs, including blob type and access tier. + Dimensions []*Dimension + + // Display description of metric specification. + DisplayDescription *string + + // Display name of metric specification. + DisplayName *string + + // Whether or not the service is using regional MDM accounts. + EnableRegionalMdmAccount *bool + + // The property to decide fill gap with zero or not. + FillGapWithZero *bool + + // The internal metric name. + InternalMetricName *string + + // Whether the metric is internal. + IsInternal *bool + + // Name of metric specification. + Name *string + + // Account Resource Id. + ResourceIDDimensionNameOverride *string + + // The source MDM account. + SourceMdmAccount *string + + // The source MDM namespace. + SourceMdmNamespace *string + + // Support metric aggregation type. + SupportedAggregationTypes []*MetricAggregationType + + // The supported time grain types for the metrics. + SupportedTimeGrainTypes []*string + + // Unit could be Bytes or Count. + Unit *string +} + +// MonthlySchedule - Monthly Schedule properties +type MonthlySchedule struct { + // Indicates which days of the month snapshot should be taken. A comma delimited string. + DaysOfMonth *string + + // Indicates which hour in UTC timezone a snapshot should be taken + Hour *int32 + + // Indicates which minute snapshot should be taken + Minute *int32 + + // Monthly snapshot count to keep + SnapshotsToKeep *int32 + + // Resource size in bytes, current storage usage for the volume in bytes + UsedBytes *int64 +} + +// MountTargetProperties - Mount target properties +type MountTargetProperties struct { + // REQUIRED; UUID v4 used to identify the MountTarget + FileSystemID *string + + // The SMB server's Fully Qualified Domain Name, FQDN + SmbServerFqdn *string + + // READ-ONLY; The mount target's IPv4 address + IPAddress *string + + // READ-ONLY; UUID v4 used to identify the MountTarget + MountTargetID *string +} + +// NetworkSiblingSet - Describes the contents of a network sibling set. +type NetworkSiblingSet struct { + // Network features available to the volume, or current state of update. + NetworkFeatures *NetworkFeatures + + // Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + NetworkSiblingSetID *string + + // Network sibling set state Id identifying the current state of the sibling set. + NetworkSiblingSetStateID *string + + // List of NIC information + NicInfoList []*NicInfo + + // The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + // /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + SubnetID *string + + // READ-ONLY; Gets the status of the NetworkSiblingSet at the time the operation was called. + ProvisioningState *NetworkSiblingSetProvisioningState +} + +// NicInfo - NIC information and list of volumes for which the NIC has the primary mount ip address. +type NicInfo struct { + // Volume resource Ids + VolumeResourceIDs []*string + + // READ-ONLY; ipAddress + IPAddress *string +} + +// Operation - Microsoft.NetApp REST API operation definition. +type Operation struct { + // Display metadata associated with the operation. + Display *OperationDisplay + + // Operation name: {provider}/{resource}/{operation} + Name *string + + // The origin of operations. + Origin *string + + // Properties of operation, include metric specifications. + Properties *OperationProperties +} + +// OperationDisplay - Display metadata associated with the operation. +type OperationDisplay struct { + // Operation description. + Description *string + + // Type of operation: get, read, delete, etc. + Operation *string + + // Service provider: Microsoft NetApp. + Provider *string + + // Resource on which the operation is performed etc. + Resource *string +} + +// OperationListResult - Result of the request to list Cloud Volume operations. It contains a list of operations and a URL +// link to get the next set of results. +type OperationListResult struct { + // List of Storage operations supported by the Storage resource provider. + Value []*Operation + + // READ-ONLY; URL to get the next set of operation list results (if there are any). + NextLink *string +} + +// OperationProperties - Properties of operation, include metric specifications. +type OperationProperties struct { + // One property of operation, include metric specifications. + ServiceSpecification *ServiceSpecification +} + +// PeerClusterForVolumeMigrationRequest - Source Cluster properties for a cluster peer request +type PeerClusterForVolumeMigrationRequest struct { + // REQUIRED; A list of IC-LIF IPs that can be used to connect to the On-prem cluster + PeerIPAddresses []*string +} + +// PlacementKeyValuePairs - Application specific parameters for the placement of volumes in the volume group +type PlacementKeyValuePairs struct { + // REQUIRED; Key for an application specific parameter for the placement of volumes in the volume group + Key *string + + // REQUIRED; Value for an application specific parameter for the placement of volumes in the volume group + Value *string +} + +// PoolChangeRequest - Pool change request +type PoolChangeRequest struct { + // REQUIRED; Resource id of the pool to move volume to + NewPoolResourceID *string +} + +// PoolPatchProperties - Patchable pool properties +type PoolPatchProperties struct { + // If enabled (true) the pool can contain cool Access enabled volumes. + CoolAccess *bool + + // The qos type of the pool + QosType *QosType + + // Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + Size *int64 +} + +// PoolProperties - Pool properties +type PoolProperties struct { + // REQUIRED; The service level of the file system + ServiceLevel *ServiceLevel + + // REQUIRED; Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of 1099511627776). + Size *int64 + + // If enabled (true) the pool can contain cool Access enabled volumes. + CoolAccess *bool + + // Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value + // can only be set when creating new pool. + EncryptionType *EncryptionType + + // The qos type of the pool + QosType *QosType + + // READ-ONLY; UUID v4 used to identify the Pool + PoolID *string + + // READ-ONLY; Azure lifecycle management + ProvisioningState *string + + // READ-ONLY; Total throughput of pool in MiB/s + TotalThroughputMibps *float32 + + // READ-ONLY; Utilized throughput of pool in MiB/s + UtilizedThroughputMibps *float32 +} + +// QueryNetworkSiblingSetRequest - Network sibling set query. +type QueryNetworkSiblingSetRequest struct { + // REQUIRED; Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + NetworkSiblingSetID *string + + // REQUIRED; The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + // /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + SubnetID *string +} + +// QuotaAvailabilityRequest - Quota availability request content. +type QuotaAvailabilityRequest struct { + // REQUIRED; Name of the resource to verify. + Name *string + + // REQUIRED; Resource group name. + ResourceGroup *string + + // REQUIRED; Resource type used for verification. + Type *CheckQuotaNameResourceTypes +} + +// ReestablishReplicationRequest - Re-establish request object supplied in the body of the operation. +type ReestablishReplicationRequest struct { + // Resource id of the source volume for the replication + SourceVolumeID *string +} + +// RegionInfo - Provides region specific information. +type RegionInfo struct { + // Provides logical availability zone mappings for the subscription for a region. + AvailabilityZoneMappings []*RegionInfoAvailabilityZoneMappingsItem + + // Provides storage to network proximity information in the region. + StorageToNetworkProximity *RegionStorageToNetworkProximity +} + +type RegionInfoAvailabilityZoneMappingsItem struct { + // Logical availability zone. + AvailabilityZone *string + + // Available availability zone + IsAvailable *bool +} + +// RegionInfoResource - Information regarding regionInfo Item. +type RegionInfoResource struct { + // regionInfo properties + Properties *RegionInfo + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// RegionInfosList - List of regionInfo resources +type RegionInfosList struct { + // URL to get the next set of results. + NextLink *string + + // A list of regionInfo resources + Value []*RegionInfoResource +} + +// RelocateVolumeRequest - Relocate volume request +type RelocateVolumeRequest struct { + // New creation token for the volume that controls the mount point name + CreationToken *string +} + +// RemotePath - The full path to a volume that is to be migrated into ANF. Required for Migration volumes +type RemotePath struct { + // REQUIRED; The Path to a ONTAP Host + ExternalHostName *string + + // REQUIRED; The name of a server on the ONTAP Host + ServerName *string + + // REQUIRED; The name of a volume on the server + VolumeName *string +} + +// Replication properties +type Replication struct { + // REQUIRED; The resource ID of the remote volume. + RemoteVolumeResourceID *string + + // Indicates whether the local volume is the source or destination for the Volume Replication + EndpointType *EndpointType + + // The remote region for the other end of the Volume Replication. + RemoteVolumeRegion *string + + // Schedule + ReplicationSchedule *ReplicationSchedule + + // READ-ONLY; UUID v4 used to identify the replication. + ReplicationID *string +} + +// ReplicationObject - Replication properties +type ReplicationObject struct { + // Indicates whether the local volume is the source or destination for the Volume Replication + EndpointType *EndpointType + + // The full path to a volume that is to be migrated into ANF. Required for Migration volumes + RemotePath *RemotePath + + // The remote region for the other end of the Volume Replication. + RemoteVolumeRegion *string + + // The resource ID of the remote volume. Required for cross region and cross zone replication + RemoteVolumeResourceID *string + + // Schedule + ReplicationSchedule *ReplicationSchedule + + // READ-ONLY; A list of destination replications + DestinationReplications []*DestinationReplication + + // READ-ONLY; Id + ReplicationID *string +} + +// ReplicationStatus - Replication status +type ReplicationStatus struct { + // Displays error message if the replication is in an error state + ErrorMessage *string + + // Replication health check + Healthy *bool + + // The status of the replication + MirrorState *MirrorState + + // Status of the mirror relationship + RelationshipStatus *RelationshipStatus + + // The progress of the replication + TotalProgress *string +} + +// ResourceNameAvailabilityRequest - Resource name availability request content. +type ResourceNameAvailabilityRequest struct { + // REQUIRED; Resource name to verify. + Name *string + + // REQUIRED; Resource group name. + ResourceGroup *string + + // REQUIRED; Resource type used for verification. + Type *CheckNameResourceTypes +} + +// RestoreStatus - Restore status +type RestoreStatus struct { + // READ-ONLY; Displays error message if the restore is in an error state + ErrorMessage *string + + // READ-ONLY; Restore health status + Healthy *bool + + // READ-ONLY; The status of the restore + MirrorState *MirrorState + + // READ-ONLY; Status of the restore SnapMirror relationship + RelationshipStatus *RelationshipStatus + + // READ-ONLY; Displays the total bytes transferred + TotalTransferBytes *int64 + + // READ-ONLY; Reason for the unhealthy restore relationship + UnhealthyReason *string +} + +// ServiceSpecification - One property of operation, include metric specifications. +type ServiceSpecification struct { + // Log specification of operation. + LogSpecifications []*LogSpecification + + // Metric specifications of operation. + MetricSpecifications []*MetricSpecification +} + +// Snapshot of a Volume +type Snapshot struct { + // REQUIRED; Resource location + Location *string + + // Snapshot Properties + Properties *SnapshotProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SnapshotPoliciesList - List of Snapshot Policies +type SnapshotPoliciesList struct { + // A list of snapshot policies + Value []*SnapshotPolicy +} + +// SnapshotPolicy - Snapshot policy information +type SnapshotPolicy struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; Snapshot policy Properties + Properties *SnapshotPolicyProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SnapshotPolicyPatch - Snapshot policy Details for create and update +type SnapshotPolicyPatch struct { + // Resource location + Location *string + + // Snapshot Policy properties + Properties *SnapshotPolicyProperties + + // Resource tags + Tags map[string]*string + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource name + Name *string + + // READ-ONLY; Resource type + Type *string +} + +// SnapshotPolicyProperties - Snapshot policy properties +type SnapshotPolicyProperties struct { + // Schedule for daily snapshots + DailySchedule *DailySchedule + + // The property to decide policy is enabled or not + Enabled *bool + + // Schedule for hourly snapshots + HourlySchedule *HourlySchedule + + // Schedule for monthly snapshots + MonthlySchedule *MonthlySchedule + + // Schedule for weekly snapshots + WeeklySchedule *WeeklySchedule + + // READ-ONLY; Azure lifecycle management + ProvisioningState *string +} + +// SnapshotPolicyVolumeList - Volumes associated with snapshot policy +type SnapshotPolicyVolumeList struct { + // List of volumes + Value []*Volume +} + +// SnapshotProperties - Snapshot properties +type SnapshotProperties struct { + // READ-ONLY; The creation date of the snapshot + Created *time.Time + + // READ-ONLY; Azure lifecycle management + ProvisioningState *string + + // READ-ONLY; UUID v4 used to identify the Snapshot + SnapshotID *string +} + +// SnapshotRestoreFiles - Restore payload for Single File Snapshot Restore +type SnapshotRestoreFiles struct { + // REQUIRED; List of files to be restored + FilePaths []*string + + // Destination folder where the files will be restored + DestinationPath *string +} + +// SnapshotsList - List of Snapshots +type SnapshotsList struct { + // A list of Snapshots + Value []*Snapshot +} + +// SubscriptionQuotaItem - Information regarding Subscription Quota Item. +type SubscriptionQuotaItem struct { + // SubscriptionQuotaItem properties + Properties *SubscriptionQuotaItemProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SubscriptionQuotaItemList - List of Subscription Quota Items +type SubscriptionQuotaItemList struct { + // A list of SubscriptionQuotaItems + Value []*SubscriptionQuotaItem +} + +// SubscriptionQuotaItemProperties - SubscriptionQuotaItem Properties +type SubscriptionQuotaItemProperties struct { + // READ-ONLY; The current quota value. + Current *int32 + + // READ-ONLY; The default quota value. + Default *int32 +} + +// SubvolumeInfo - Subvolume Information properties +type SubvolumeInfo struct { + // Subvolume Properties + Properties *SubvolumeProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SubvolumeModel - Result of the post subvolume and action is to get metadata of the subvolume. +type SubvolumeModel struct { + // It represents the minimal properties of the subvolume. + Properties *SubvolumeModelProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource name + Name *string + + // READ-ONLY; Resource type + Type *string +} + +// SubvolumeModelProperties - Properties which represents actual subvolume model which is stored as a file in the system. +type SubvolumeModelProperties struct { + // Most recent access time and date + AccessedTimeStamp *time.Time + + // Bytes used + BytesUsed *int64 + + // Most recent change time and date + ChangedTimeStamp *time.Time + + // Creation time and date + CreationTimeStamp *time.Time + + // Most recent modification time and date + ModifiedTimeStamp *time.Time + + // Path to the parent subvolume + ParentPath *string + + // Path to the subvolume + Path *string + + // Permissions of the subvolume + Permissions *string + + // Azure lifecycle management + ProvisioningState *string + + // Size of subvolume + Size *int64 +} + +// SubvolumePatchParams - Parameters with which a subvolume can be updated +type SubvolumePatchParams struct { + // path to the subvolume + Path *string + + // Truncate subvolume to the provided size in bytes + Size *int64 +} + +// SubvolumePatchRequest - Subvolume Patch Request properties +type SubvolumePatchRequest struct { + // Subvolume Properties + Properties *SubvolumePatchParams +} + +// SubvolumeProperties - This represents path associated with the subvolume +type SubvolumeProperties struct { + // parent path to the subvolume + ParentPath *string + + // Path to the subvolume + Path *string + + // Truncate subvolume to the provided size in bytes + Size *int64 + + // READ-ONLY; Azure lifecycle management + ProvisioningState *string +} + +// SubvolumesList - List of Subvolumes +type SubvolumesList struct { + // URL to get the next set of results. + NextLink *string + + // A list of Subvolumes + Value []*SubvolumeInfo +} + +// SvmPeerCommandResponse - Information about svm peering process +type SvmPeerCommandResponse struct { + // A command that needs to be run on the external ONTAP to accept svm peering. Will only be present if svmPeeringStatus is + // pending + SvmPeeringCommand *string +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource last modification (UTC) + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *CreatedByType +} + +// UpdateNetworkSiblingSetRequest - Network sibling set update. +type UpdateNetworkSiblingSetRequest struct { + // REQUIRED; Network features available to the volume. + NetworkFeatures *NetworkFeatures + + // REQUIRED; Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + NetworkSiblingSetID *string + + // REQUIRED; Network sibling set state Id identifying the current state of the sibling set. + NetworkSiblingSetStateID *string + + // REQUIRED; The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + // /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + SubnetID *string +} + +// UsageName - The name of the usage. +type UsageName struct { + // The localized name of the usage. + LocalizedValue *string + + // The name of the usage. + Value *string +} + +// UsageProperties - Usage properties +type UsageProperties struct { + // READ-ONLY; The current usage value for the subscription. + CurrentValue *int32 + + // READ-ONLY; The limit of the usage. + Limit *int32 + + // READ-ONLY; The unit of the usage. + Unit *string +} + +// UsageResult - Usages entity model +type UsageResult struct { + // Usage properties + Properties *UsageProperties + + // READ-ONLY; The id of the usage. + ID *string + + // READ-ONLY; The name of the usage. + Name *UsageName +} + +// UsagesListResult - Usages result +type UsagesListResult struct { + // URL to get the next set of results. + NextLink *string + + // A list of usages + Value []*UsageResult +} + +// UserAssignedIdentity - User assigned identity properties +type UserAssignedIdentity struct { + // READ-ONLY; The client ID of the assigned identity. + ClientID *string + + // READ-ONLY; The principal ID of the assigned identity. + PrincipalID *string +} + +// Volume resource +type Volume struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; Volume properties + Properties *VolumeProperties + + // Resource tags. + Tags map[string]*string + + // Availability Zone + Zones []*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// VolumeBackupProperties - Volume Backup Properties +type VolumeBackupProperties struct { + // Backup Policy Resource ID + BackupPolicyID *string + + // Backup Vault Resource ID + BackupVaultID *string + + // Policy Enforced + PolicyEnforced *bool +} + +// VolumeBackups - Volume details using the backup policy +type VolumeBackups struct { + // Total count of backups for volume + BackupsCount *int32 + + // Policy enabled + PolicyEnabled *bool + + // Volume name + VolumeName *string + + // ResourceId used to identify the Volume + VolumeResourceID *string +} + +// VolumeGroup - Volume group resource +type VolumeGroup struct { + // Resource location + Location *string + + // Volume group properties + Properties *VolumeGroupListProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource name + Name *string + + // READ-ONLY; Resource type + Type *string +} + +// VolumeGroupDetails - Volume group resource for create +type VolumeGroupDetails struct { + // Resource location + Location *string + + // Volume group properties + Properties *VolumeGroupProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource name + Name *string + + // READ-ONLY; Resource type + Type *string +} + +// VolumeGroupList - List of volume group resources +type VolumeGroupList struct { + // List of volume Groups + Value []*VolumeGroup +} + +// VolumeGroupListProperties - Volume group properties +type VolumeGroupListProperties struct { + // Volume group details + GroupMetaData *VolumeGroupMetaData + + // READ-ONLY; Azure lifecycle management + ProvisioningState *string +} + +// VolumeGroupMetaData - Volume group properties +type VolumeGroupMetaData struct { + // Application specific identifier + ApplicationIdentifier *string + + // Application Type + ApplicationType *ApplicationType + + // Application specific placement rules for the volume group + GlobalPlacementRules []*PlacementKeyValuePairs + + // Group Description + GroupDescription *string + + // READ-ONLY; Number of volumes in volume group + VolumesCount *int64 +} + +// VolumeGroupProperties - Volume group properties +type VolumeGroupProperties struct { + // Volume group details + GroupMetaData *VolumeGroupMetaData + + // List of volumes from group + Volumes []*VolumeGroupVolumeProperties + + // READ-ONLY; Azure lifecycle management + ProvisioningState *string +} + +// VolumeGroupVolumeProperties - Volume resource +type VolumeGroupVolumeProperties struct { + // REQUIRED; Volume properties + Properties *VolumeProperties + + // Resource name + Name *string + + // Resource tags + Tags map[string]*string + + // Availability Zone + Zones []*string + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource type + Type *string +} + +// VolumeList - List of volume resources +type VolumeList struct { + // URL to get the next set of results. + NextLink *string + + // List of volumes + Value []*Volume +} + +// VolumePatch - Volume patch resource +type VolumePatch struct { + // Resource location + Location *string + + // Patchable volume properties + Properties *VolumePatchProperties + + // Resource tags + Tags map[string]*string + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource name + Name *string + + // READ-ONLY; Resource type + Type *string +} + +// VolumePatchProperties - Patchable volume properties +type VolumePatchProperties struct { + // Specifies whether Cool Access(tiering) is enabled for the volume. + CoolAccess *bool + + // coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read + // pattern for cool access enabled volumes. The possible values for this field + // are: Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. OnRead + // - All client-driven data read is pulled from cool tier to standard storage on + // both sequential and random reads. Never - No client-driven data is pulled from cool tier to standard storage. + CoolAccessRetrievalPolicy *CoolAccessRetrievalPolicy + + // coolAccessTieringPolicy determines which cold data blocks are moved to cool tier. The possible values for this field are: + // Auto - Moves cold user data blocks in both the Snapshot copies and the active + // file system to the cool tier tier. This policy is the default. SnapshotOnly - Moves user data blocks of the Volume Snapshot + // copies that are not associated with the active file system to the cool tier. + CoolAccessTieringPolicy *CoolAccessTieringPolicy + + // Specifies the number of days after which data that is not accessed by clients will be tiered. + CoolnessPeriod *int32 + + // DataProtection type volumes include an object containing details of the replication + DataProtection *VolumePatchPropertiesDataProtection + + // Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + DefaultGroupQuotaInKiBs *int64 + + // Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + DefaultUserQuotaInKiBs *int64 + + // Set of export policy rules + ExportPolicy *VolumePatchPropertiesExportPolicy + + // Specifies if default quota is enabled for the volume. + IsDefaultQuotaEnabled *bool + + // Set of protocol types, default NFSv3, CIFS for SMB protocol + ProtocolTypes []*string + + // The service level of the file system + ServiceLevel *ServiceLevel + + // Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + SmbAccessBasedEnumeration *SmbAccessBasedEnumeration + + // Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + SmbNonBrowsable *SmbNonBrowsable + + // If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's + // snapshots. + SnapshotDirectoryVisible *bool + + // Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType + // volume + ThroughputMibps *float32 + + // UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID + // (2) and sticky (1) attributes. Second digit selects permission for the owner of + // the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth + // for other users not in the group. 0755 - gives read/write/execute permissions to + // owner and read/execute to group and other users. + UnixPermissions *string + + // Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, + // valid values are in the range 50GiB to 100TiB. For large volumes, valid + // values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in + // bytes as multiples of 1 GiB. + UsageThreshold *int64 +} + +// VolumePatchPropertiesDataProtection - DataProtection type volumes include an object containing details of the replication +type VolumePatchPropertiesDataProtection struct { + // Backup Properties + Backup *VolumeBackupProperties + + // Snapshot properties. + Snapshot *VolumeSnapshotProperties +} + +// VolumePatchPropertiesExportPolicy - Set of export policy rules +type VolumePatchPropertiesExportPolicy struct { + // Export policy rule + Rules []*ExportPolicyRule +} + +// VolumeProperties - Volume properties +type VolumeProperties struct { + // REQUIRED; A unique file path for the volume. Used when creating mount targets + CreationToken *string + + // REQUIRED; The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + SubnetID *string + + // REQUIRED; Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular + // volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid + // values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in + // bytes as multiples of 1 GiB. + UsageThreshold *int64 + + // Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose + AvsDataStore *AvsDataStore + + // Resource identifier used to identify the Backup. + BackupID *string + + // Pool Resource Id used in case of creating a volume through volume group + CapacityPoolResourceID *string + + // Specifies whether Cool Access(tiering) is enabled for the volume. + CoolAccess *bool + + // coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read + // pattern for cool access enabled volumes. The possible values for this field + // are: Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. OnRead + // - All client-driven data read is pulled from cool tier to standard storage on + // both sequential and random reads. Never - No client-driven data is pulled from cool tier to standard storage. + CoolAccessRetrievalPolicy *CoolAccessRetrievalPolicy + + // coolAccessTieringPolicy determines which cold data blocks are moved to cool tier. The possible values for this field are: + // Auto - Moves cold user data blocks in both the Snapshot copies and the active + // file system to the cool tier tier. This policy is the default. SnapshotOnly - Moves user data blocks of the Volume Snapshot + // copies that are not associated with the active file system to the cool tier. + CoolAccessTieringPolicy *CoolAccessTieringPolicy + + // Specifies the number of days after which data that is not accessed by clients will be tiered. + CoolnessPeriod *int32 + + // DataProtection type volumes include an object containing details of the replication + DataProtection *VolumePropertiesDataProtection + + // Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + DefaultGroupQuotaInKiBs *int64 + + // Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + DefaultUserQuotaInKiBs *int64 + + // If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation + // has finished. Defaults to false + DeleteBaseSnapshot *bool + + // Flag indicating whether subvolume operations are enabled on the volume + EnableSubvolumes *EnableSubvolumes + + // Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. + // Possible values (case-insensitive) are: 'Microsoft.NetApp, + // Microsoft.KeyVault' + EncryptionKeySource *EncryptionKeySource + + // Set of export policy rules + ExportPolicy *VolumePropertiesExportPolicy + + // Specifies if default quota is enabled for the volume. + IsDefaultQuotaEnabled *bool + + // Specifies whether volume is a Large Volume or Regular Volume. + IsLargeVolume *bool + + // Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later + KerberosEnabled *bool + + // The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource + // = 'Microsoft.KeyVault'. + KeyVaultPrivateEndpointResourceID *string + + // Specifies whether LDAP is enabled or not for a given NFS volume. + LdapEnabled *bool + + // The original value of the network features type available to the volume at the time it was created. + NetworkFeatures *NetworkFeatures + + // Application specific placement rules for the particular volume + PlacementRules []*PlacementKeyValuePairs + + // Set of protocol types, default NFSv3, CIFS for SMB protocol + ProtocolTypes []*string + + // Proximity placement group associated with the volume + ProximityPlacementGroup *string + + // The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol + SecurityStyle *SecurityStyle + + // The service level of the file system + ServiceLevel *ServiceLevel + + // Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + SmbAccessBasedEnumeration *SmbAccessBasedEnumeration + + // Enables continuously available share property for smb volume. Only applicable for SMB volume + SmbContinuouslyAvailable *bool + + // Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version + // 2020-08-01 or later + SmbEncryption *bool + + // Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + SmbNonBrowsable *SmbNonBrowsable + + // If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's + // snapshots (defaults to true). + SnapshotDirectoryVisible *bool + + // Resource identifier used to identify the Snapshot. + SnapshotID *string + + // Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType + // volume + ThroughputMibps *float32 + + // UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID + // (2) and sticky (1) attributes. Second digit selects permission for the owner of + // the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth + // for other users not in the group. 0755 - gives read/write/execute permissions to + // owner and read/execute to group and other users. + UnixPermissions *string + + // Volume spec name is the application specific designation or identifier for the particular volume in a volume group for + // e.g. data, log + VolumeSpecName *string + + // What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection + VolumeType *string + + // READ-ONLY; Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel + ActualThroughputMibps *float32 + + // READ-ONLY; Unique Baremetal Tenant Identifier. + BaremetalTenantID *string + + // READ-ONLY; When a volume is being restored from another volume's snapshot, will show the percentage completion of this + // cloning process. When this value is empty/null there is no cloning process currently + // happening on this volume. This value will update every 5 minutes during cloning. + CloneProgress *int32 + + // READ-ONLY; Data store resource unique identifier + DataStoreResourceID []*string + + // READ-ONLY; The effective value of the network features type available to the volume, or current effective state of update. + EffectiveNetworkFeatures *NetworkFeatures + + // READ-ONLY; Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + Encrypted *bool + + // READ-ONLY; Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present + // on the volume. + FileAccessLogs *FileAccessLogs + + // READ-ONLY; Unique FileSystem Identifier. + FileSystemID *string + + // READ-ONLY; Restoring + IsRestoring *bool + + // READ-ONLY; Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed + // if volume quota is more than 4TiB. + MaximumNumberOfFiles *int64 + + // READ-ONLY; List of mount targets + MountTargets []*MountTargetProperties + + // READ-ONLY; Network Sibling Set ID for the the group of volumes sharing networking resources. + NetworkSiblingSetID *string + + // READ-ONLY; Id of the snapshot or backup that the volume is restored from. + OriginatingResourceID *string + + // READ-ONLY; The availability zone where the volume is provisioned. This refers to the logical availability zone where the + // volume resides. + ProvisionedAvailabilityZone *string + + // READ-ONLY; Azure lifecycle management + ProvisioningState *string + + // READ-ONLY; Provides storage to network proximity information for the volume. + StorageToNetworkProximity *VolumeStorageToNetworkProximity + + // READ-ONLY; T2 network information + T2Network *string + + // READ-ONLY; Volume Group Name + VolumeGroupName *string +} + +// VolumePropertiesDataProtection - DataProtection type volumes include an object containing details of the replication +type VolumePropertiesDataProtection struct { + // Backup Properties + Backup *VolumeBackupProperties + + // Replication properties + Replication *ReplicationObject + + // Snapshot properties. + Snapshot *VolumeSnapshotProperties + + // VolumeRelocation properties + VolumeRelocation *VolumeRelocationProperties +} + +// VolumePropertiesExportPolicy - Set of export policy rules +type VolumePropertiesExportPolicy struct { + // Export policy rule + Rules []*ExportPolicyRule +} + +// VolumeQuotaRule - Quota Rule of a Volume +type VolumeQuotaRule struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Volume Quota Rule Properties + Properties *VolumeQuotaRulesProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// VolumeQuotaRulePatch - Patchable Quota Rule of a Volume +type VolumeQuotaRulePatch struct { + // Volume Quota Rule Properties + Properties *VolumeQuotaRulesProperties + + // Resource tags + Tags map[string]*string +} + +// VolumeQuotaRulesList - List of Volume Quota Rules +type VolumeQuotaRulesList struct { + // A list of Volume Quota Rules + Value []*VolumeQuotaRule +} + +// VolumeQuotaRulesProperties - Volume Quota Rule properties +type VolumeQuotaRulesProperties struct { + // Size of quota + QuotaSizeInKiBs *int64 + + // UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command + // for the user or group and SID can be found by running + QuotaTarget *string + + // Type of quota + QuotaType *Type + + // READ-ONLY; Gets the status of the VolumeQuotaRule at the time the operation was called. + ProvisioningState *ProvisioningState +} + +// VolumeRelocationProperties - Volume relocation properties +type VolumeRelocationProperties struct { + // Has relocation been requested for this volume + RelocationRequested *bool + + // READ-ONLY; Has relocation finished and is ready to be cleaned up + ReadyToBeFinalized *bool +} + +// VolumeRevert - revert a volume to the snapshot +type VolumeRevert struct { + // Resource id of the snapshot + SnapshotID *string +} + +// VolumeSnapshotProperties - Volume Snapshot Properties +type VolumeSnapshotProperties struct { + // Snapshot Policy ResourceId + SnapshotPolicyID *string +} + +// WeeklySchedule - Weekly Schedule properties, make a snapshot every week at a specific day or days +type WeeklySchedule struct { + // Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english + Day *string + + // Indicates which hour in UTC timezone a snapshot should be taken + Hour *int32 + + // Indicates which minute snapshot should be taken + Minute *int32 + + // Weekly snapshot count to keep + SnapshotsToKeep *int32 + + // Resource size in bytes, current storage usage for the volume in bytes + UsedBytes *int64 +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/models_serde.go new file mode 100644 index 00000000..714f93d2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/models_serde.go @@ -0,0 +1,5306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type Account. +func (a Account) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Account. +func (a *Account) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccountEncryption. +func (a AccountEncryption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "keySource", a.KeySource) + populate(objectMap, "keyVaultProperties", a.KeyVaultProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountEncryption. +func (a *AccountEncryption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "keySource": + err = unpopulate(val, "KeySource", &a.KeySource) + delete(rawMsg, key) + case "keyVaultProperties": + err = unpopulate(val, "KeyVaultProperties", &a.KeyVaultProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccountList. +func (a AccountList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountList. +func (a *AccountList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccountPatch. +func (a AccountPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountPatch. +func (a *AccountPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccountProperties. +func (a AccountProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeDirectories", a.ActiveDirectories) + populate(objectMap, "disableShowmount", a.DisableShowmount) + populate(objectMap, "encryption", a.Encryption) + populate(objectMap, "multiAdStatus", a.MultiAdStatus) + populate(objectMap, "nfsV4IDDomain", a.NfsV4IDDomain) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountProperties. +func (a *AccountProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeDirectories": + err = unpopulate(val, "ActiveDirectories", &a.ActiveDirectories) + delete(rawMsg, key) + case "disableShowmount": + err = unpopulate(val, "DisableShowmount", &a.DisableShowmount) + delete(rawMsg, key) + case "encryption": + err = unpopulate(val, "Encryption", &a.Encryption) + delete(rawMsg, key) + case "multiAdStatus": + err = unpopulate(val, "MultiAdStatus", &a.MultiAdStatus) + delete(rawMsg, key) + case "nfsV4IDDomain": + err = unpopulate(val, "NfsV4IDDomain", &a.NfsV4IDDomain) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ActiveDirectory. +func (a ActiveDirectory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeDirectoryId", a.ActiveDirectoryID) + populate(objectMap, "adName", a.AdName) + populate(objectMap, "administrators", a.Administrators) + populate(objectMap, "aesEncryption", a.AesEncryption) + populate(objectMap, "allowLocalNfsUsersWithLdap", a.AllowLocalNfsUsersWithLdap) + populate(objectMap, "backupOperators", a.BackupOperators) + populate(objectMap, "dns", a.DNS) + populate(objectMap, "domain", a.Domain) + populate(objectMap, "encryptDCConnections", a.EncryptDCConnections) + populate(objectMap, "kdcIP", a.KdcIP) + populate(objectMap, "ldapOverTLS", a.LdapOverTLS) + populate(objectMap, "ldapSearchScope", a.LdapSearchScope) + populate(objectMap, "ldapSigning", a.LdapSigning) + populate(objectMap, "organizationalUnit", a.OrganizationalUnit) + populate(objectMap, "password", a.Password) + populate(objectMap, "preferredServersForLdapClient", a.PreferredServersForLdapClient) + populate(objectMap, "securityOperators", a.SecurityOperators) + populate(objectMap, "serverRootCACertificate", a.ServerRootCACertificate) + populate(objectMap, "site", a.Site) + populate(objectMap, "smbServerName", a.SmbServerName) + populate(objectMap, "status", a.Status) + populate(objectMap, "statusDetails", a.StatusDetails) + populate(objectMap, "username", a.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectory. +func (a *ActiveDirectory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeDirectoryId": + err = unpopulate(val, "ActiveDirectoryID", &a.ActiveDirectoryID) + delete(rawMsg, key) + case "adName": + err = unpopulate(val, "AdName", &a.AdName) + delete(rawMsg, key) + case "administrators": + err = unpopulate(val, "Administrators", &a.Administrators) + delete(rawMsg, key) + case "aesEncryption": + err = unpopulate(val, "AesEncryption", &a.AesEncryption) + delete(rawMsg, key) + case "allowLocalNfsUsersWithLdap": + err = unpopulate(val, "AllowLocalNfsUsersWithLdap", &a.AllowLocalNfsUsersWithLdap) + delete(rawMsg, key) + case "backupOperators": + err = unpopulate(val, "BackupOperators", &a.BackupOperators) + delete(rawMsg, key) + case "dns": + err = unpopulate(val, "DNS", &a.DNS) + delete(rawMsg, key) + case "domain": + err = unpopulate(val, "Domain", &a.Domain) + delete(rawMsg, key) + case "encryptDCConnections": + err = unpopulate(val, "EncryptDCConnections", &a.EncryptDCConnections) + delete(rawMsg, key) + case "kdcIP": + err = unpopulate(val, "KdcIP", &a.KdcIP) + delete(rawMsg, key) + case "ldapOverTLS": + err = unpopulate(val, "LdapOverTLS", &a.LdapOverTLS) + delete(rawMsg, key) + case "ldapSearchScope": + err = unpopulate(val, "LdapSearchScope", &a.LdapSearchScope) + delete(rawMsg, key) + case "ldapSigning": + err = unpopulate(val, "LdapSigning", &a.LdapSigning) + delete(rawMsg, key) + case "organizationalUnit": + err = unpopulate(val, "OrganizationalUnit", &a.OrganizationalUnit) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &a.Password) + delete(rawMsg, key) + case "preferredServersForLdapClient": + err = unpopulate(val, "PreferredServersForLdapClient", &a.PreferredServersForLdapClient) + delete(rawMsg, key) + case "securityOperators": + err = unpopulate(val, "SecurityOperators", &a.SecurityOperators) + delete(rawMsg, key) + case "serverRootCACertificate": + err = unpopulate(val, "ServerRootCACertificate", &a.ServerRootCACertificate) + delete(rawMsg, key) + case "site": + err = unpopulate(val, "Site", &a.Site) + delete(rawMsg, key) + case "smbServerName": + err = unpopulate(val, "SmbServerName", &a.SmbServerName) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "statusDetails": + err = unpopulate(val, "StatusDetails", &a.StatusDetails) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &a.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizeRequest. +func (a AuthorizeRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "remoteVolumeResourceId", a.RemoteVolumeResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizeRequest. +func (a *AuthorizeRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "remoteVolumeResourceId": + err = unpopulate(val, "RemoteVolumeResourceID", &a.RemoteVolumeResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Backup. +func (b Backup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Backup. +func (b *Backup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupPatch. +func (b BackupPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", b.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupPatch. +func (b *BackupPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupPatchProperties. +func (b BackupPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "label", b.Label) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupPatchProperties. +func (b *BackupPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "label": + err = unpopulate(val, "Label", &b.Label) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupPoliciesList. +func (b BackupPoliciesList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupPoliciesList. +func (b *BackupPoliciesList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupPolicy. +func (b BackupPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", b.Etag) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupPolicy. +func (b *BackupPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &b.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupPolicyPatch. +func (b BackupPolicyPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupPolicyPatch. +func (b *BackupPolicyPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupPolicyProperties. +func (b BackupPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupPolicyId", b.BackupPolicyID) + populate(objectMap, "dailyBackupsToKeep", b.DailyBackupsToKeep) + populate(objectMap, "enabled", b.Enabled) + populate(objectMap, "monthlyBackupsToKeep", b.MonthlyBackupsToKeep) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "volumeBackups", b.VolumeBackups) + populate(objectMap, "volumesAssigned", b.VolumesAssigned) + populate(objectMap, "weeklyBackupsToKeep", b.WeeklyBackupsToKeep) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupPolicyProperties. +func (b *BackupPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupPolicyId": + err = unpopulate(val, "BackupPolicyID", &b.BackupPolicyID) + delete(rawMsg, key) + case "dailyBackupsToKeep": + err = unpopulate(val, "DailyBackupsToKeep", &b.DailyBackupsToKeep) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &b.Enabled) + delete(rawMsg, key) + case "monthlyBackupsToKeep": + err = unpopulate(val, "MonthlyBackupsToKeep", &b.MonthlyBackupsToKeep) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "volumeBackups": + err = unpopulate(val, "VolumeBackups", &b.VolumeBackups) + delete(rawMsg, key) + case "volumesAssigned": + err = unpopulate(val, "VolumesAssigned", &b.VolumesAssigned) + delete(rawMsg, key) + case "weeklyBackupsToKeep": + err = unpopulate(val, "WeeklyBackupsToKeep", &b.WeeklyBackupsToKeep) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupProperties. +func (b BackupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupId", b.BackupID) + populate(objectMap, "backupPolicyResourceId", b.BackupPolicyResourceID) + populate(objectMap, "backupType", b.BackupType) + populateDateTimeRFC3339(objectMap, "completionDate", b.CompletionDate) + populateDateTimeRFC3339(objectMap, "creationDate", b.CreationDate) + populate(objectMap, "failureReason", b.FailureReason) + populate(objectMap, "isLargeVolume", b.IsLargeVolume) + populate(objectMap, "label", b.Label) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "size", b.Size) + populateDateTimeRFC3339(objectMap, "snapshotCreationDate", b.SnapshotCreationDate) + populate(objectMap, "snapshotName", b.SnapshotName) + populate(objectMap, "useExistingSnapshot", b.UseExistingSnapshot) + populate(objectMap, "volumeResourceId", b.VolumeResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupProperties. +func (b *BackupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupId": + err = unpopulate(val, "BackupID", &b.BackupID) + delete(rawMsg, key) + case "backupPolicyResourceId": + err = unpopulate(val, "BackupPolicyResourceID", &b.BackupPolicyResourceID) + delete(rawMsg, key) + case "backupType": + err = unpopulate(val, "BackupType", &b.BackupType) + delete(rawMsg, key) + case "completionDate": + err = unpopulateDateTimeRFC3339(val, "CompletionDate", &b.CompletionDate) + delete(rawMsg, key) + case "creationDate": + err = unpopulateDateTimeRFC3339(val, "CreationDate", &b.CreationDate) + delete(rawMsg, key) + case "failureReason": + err = unpopulate(val, "FailureReason", &b.FailureReason) + delete(rawMsg, key) + case "isLargeVolume": + err = unpopulate(val, "IsLargeVolume", &b.IsLargeVolume) + delete(rawMsg, key) + case "label": + err = unpopulate(val, "Label", &b.Label) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &b.Size) + delete(rawMsg, key) + case "snapshotCreationDate": + err = unpopulateDateTimeRFC3339(val, "SnapshotCreationDate", &b.SnapshotCreationDate) + delete(rawMsg, key) + case "snapshotName": + err = unpopulate(val, "SnapshotName", &b.SnapshotName) + delete(rawMsg, key) + case "useExistingSnapshot": + err = unpopulate(val, "UseExistingSnapshot", &b.UseExistingSnapshot) + delete(rawMsg, key) + case "volumeResourceId": + err = unpopulate(val, "VolumeResourceID", &b.VolumeResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupRestoreFiles. +func (b BackupRestoreFiles) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationVolumeId", b.DestinationVolumeID) + populate(objectMap, "fileList", b.FileList) + populate(objectMap, "restoreFilePath", b.RestoreFilePath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupRestoreFiles. +func (b *BackupRestoreFiles) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationVolumeId": + err = unpopulate(val, "DestinationVolumeID", &b.DestinationVolumeID) + delete(rawMsg, key) + case "fileList": + err = unpopulate(val, "FileList", &b.FileList) + delete(rawMsg, key) + case "restoreFilePath": + err = unpopulate(val, "RestoreFilePath", &b.RestoreFilePath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupStatus. +func (b BackupStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorMessage", b.ErrorMessage) + populate(objectMap, "healthy", b.Healthy) + populate(objectMap, "lastTransferSize", b.LastTransferSize) + populate(objectMap, "lastTransferType", b.LastTransferType) + populate(objectMap, "mirrorState", b.MirrorState) + populate(objectMap, "relationshipStatus", b.RelationshipStatus) + populate(objectMap, "totalTransferBytes", b.TotalTransferBytes) + populate(objectMap, "transferProgressBytes", b.TransferProgressBytes) + populate(objectMap, "unhealthyReason", b.UnhealthyReason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupStatus. +func (b *BackupStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &b.ErrorMessage) + delete(rawMsg, key) + case "healthy": + err = unpopulate(val, "Healthy", &b.Healthy) + delete(rawMsg, key) + case "lastTransferSize": + err = unpopulate(val, "LastTransferSize", &b.LastTransferSize) + delete(rawMsg, key) + case "lastTransferType": + err = unpopulate(val, "LastTransferType", &b.LastTransferType) + delete(rawMsg, key) + case "mirrorState": + err = unpopulate(val, "MirrorState", &b.MirrorState) + delete(rawMsg, key) + case "relationshipStatus": + err = unpopulate(val, "RelationshipStatus", &b.RelationshipStatus) + delete(rawMsg, key) + case "totalTransferBytes": + err = unpopulate(val, "TotalTransferBytes", &b.TotalTransferBytes) + delete(rawMsg, key) + case "transferProgressBytes": + err = unpopulate(val, "TransferProgressBytes", &b.TransferProgressBytes) + delete(rawMsg, key) + case "unhealthyReason": + err = unpopulate(val, "UnhealthyReason", &b.UnhealthyReason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupVault. +func (b BackupVault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupVault. +func (b *BackupVault) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupVaultPatch. +func (b BackupVaultPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tags", b.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupVaultPatch. +func (b *BackupVaultPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupVaultProperties. +func (b BackupVaultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", b.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupVaultProperties. +func (b *BackupVaultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupVaultsList. +func (b BackupVaultsList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupVaultsList. +func (b *BackupVaultsList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupsList. +func (b BackupsList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupsList. +func (b *BackupsList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupsMigrationRequest. +func (b BackupsMigrationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupVaultId", b.BackupVaultID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupsMigrationRequest. +func (b *BackupsMigrationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupVaultId": + err = unpopulate(val, "BackupVaultID", &b.BackupVaultID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BreakFileLocksRequest. +func (b BreakFileLocksRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientIp", b.ClientIP) + populate(objectMap, "confirmRunningDisruptiveOperation", b.ConfirmRunningDisruptiveOperation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BreakFileLocksRequest. +func (b *BreakFileLocksRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientIp": + err = unpopulate(val, "ClientIP", &b.ClientIP) + delete(rawMsg, key) + case "confirmRunningDisruptiveOperation": + err = unpopulate(val, "ConfirmRunningDisruptiveOperation", &b.ConfirmRunningDisruptiveOperation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BreakReplicationRequest. +func (b BreakReplicationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "forceBreakReplication", b.ForceBreakReplication) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BreakReplicationRequest. +func (b *BreakReplicationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "forceBreakReplication": + err = unpopulate(val, "ForceBreakReplication", &b.ForceBreakReplication) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CapacityPool. +func (c CapacityPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "id", c.ID) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityPool. +func (c *CapacityPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &c.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CapacityPoolList. +func (c CapacityPoolList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityPoolList. +func (c *CapacityPoolList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CapacityPoolPatch. +func (c CapacityPoolPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityPoolPatch. +func (c *CapacityPoolPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ChangeKeyVault. +func (c ChangeKeyVault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyName", c.KeyName) + populate(objectMap, "keyVaultPrivateEndpoints", c.KeyVaultPrivateEndpoints) + populate(objectMap, "keyVaultResourceId", c.KeyVaultResourceID) + populate(objectMap, "keyVaultUri", c.KeyVaultURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ChangeKeyVault. +func (c *ChangeKeyVault) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyName": + err = unpopulate(val, "KeyName", &c.KeyName) + delete(rawMsg, key) + case "keyVaultPrivateEndpoints": + err = unpopulate(val, "KeyVaultPrivateEndpoints", &c.KeyVaultPrivateEndpoints) + delete(rawMsg, key) + case "keyVaultResourceId": + err = unpopulate(val, "KeyVaultResourceID", &c.KeyVaultResourceID) + delete(rawMsg, key) + case "keyVaultUri": + err = unpopulate(val, "KeyVaultURI", &c.KeyVaultURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckAvailabilityResponse. +func (c CheckAvailabilityResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isAvailable", c.IsAvailable) + populate(objectMap, "message", c.Message) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckAvailabilityResponse. +func (c *CheckAvailabilityResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isAvailable": + err = unpopulate(val, "IsAvailable", &c.IsAvailable) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterPeerCommandResponse. +func (c ClusterPeerCommandResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "peerAcceptCommand", c.PeerAcceptCommand) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPeerCommandResponse. +func (c *ClusterPeerCommandResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "peerAcceptCommand": + err = unpopulate(val, "PeerAcceptCommand", &c.PeerAcceptCommand) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DailySchedule. +func (d DailySchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hour", d.Hour) + populate(objectMap, "minute", d.Minute) + populate(objectMap, "snapshotsToKeep", d.SnapshotsToKeep) + populate(objectMap, "usedBytes", d.UsedBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DailySchedule. +func (d *DailySchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hour": + err = unpopulate(val, "Hour", &d.Hour) + delete(rawMsg, key) + case "minute": + err = unpopulate(val, "Minute", &d.Minute) + delete(rawMsg, key) + case "snapshotsToKeep": + err = unpopulate(val, "SnapshotsToKeep", &d.SnapshotsToKeep) + delete(rawMsg, key) + case "usedBytes": + err = unpopulate(val, "UsedBytes", &d.UsedBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DestinationReplication. +func (d DestinationReplication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "region", d.Region) + populate(objectMap, "replicationType", d.ReplicationType) + populate(objectMap, "resourceId", d.ResourceID) + populate(objectMap, "zone", d.Zone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DestinationReplication. +func (d *DestinationReplication) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "region": + err = unpopulate(val, "Region", &d.Region) + delete(rawMsg, key) + case "replicationType": + err = unpopulate(val, "ReplicationType", &d.ReplicationType) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + case "zone": + err = unpopulate(val, "Zone", &d.Zone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Dimension. +func (d Dimension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "name", d.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Dimension. +func (d *Dimension) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionIdentity. +func (e EncryptionIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "federatedClientId", e.FederatedClientID) + populate(objectMap, "principalId", e.PrincipalID) + populate(objectMap, "userAssignedIdentity", e.UserAssignedIdentity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionIdentity. +func (e *EncryptionIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "federatedClientId": + err = unpopulate(val, "FederatedClientID", &e.FederatedClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &e.PrincipalID) + delete(rawMsg, key) + case "userAssignedIdentity": + err = unpopulate(val, "UserAssignedIdentity", &e.UserAssignedIdentity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionTransitionRequest. +func (e EncryptionTransitionRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpointId", e.PrivateEndpointID) + populate(objectMap, "virtualNetworkId", e.VirtualNetworkID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionTransitionRequest. +func (e *EncryptionTransitionRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpointId": + err = unpopulate(val, "PrivateEndpointID", &e.PrivateEndpointID) + delete(rawMsg, key) + case "virtualNetworkId": + err = unpopulate(val, "VirtualNetworkID", &e.VirtualNetworkID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExportPolicyRule. +func (e ExportPolicyRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedClients", e.AllowedClients) + populate(objectMap, "chownMode", e.ChownMode) + populate(objectMap, "cifs", e.Cifs) + populate(objectMap, "hasRootAccess", e.HasRootAccess) + populate(objectMap, "kerberos5iReadOnly", e.Kerberos5IReadOnly) + populate(objectMap, "kerberos5iReadWrite", e.Kerberos5IReadWrite) + populate(objectMap, "kerberos5pReadOnly", e.Kerberos5PReadOnly) + populate(objectMap, "kerberos5pReadWrite", e.Kerberos5PReadWrite) + populate(objectMap, "kerberos5ReadOnly", e.Kerberos5ReadOnly) + populate(objectMap, "kerberos5ReadWrite", e.Kerberos5ReadWrite) + populate(objectMap, "nfsv3", e.Nfsv3) + populate(objectMap, "nfsv41", e.Nfsv41) + populate(objectMap, "ruleIndex", e.RuleIndex) + populate(objectMap, "unixReadOnly", e.UnixReadOnly) + populate(objectMap, "unixReadWrite", e.UnixReadWrite) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExportPolicyRule. +func (e *ExportPolicyRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedClients": + err = unpopulate(val, "AllowedClients", &e.AllowedClients) + delete(rawMsg, key) + case "chownMode": + err = unpopulate(val, "ChownMode", &e.ChownMode) + delete(rawMsg, key) + case "cifs": + err = unpopulate(val, "Cifs", &e.Cifs) + delete(rawMsg, key) + case "hasRootAccess": + err = unpopulate(val, "HasRootAccess", &e.HasRootAccess) + delete(rawMsg, key) + case "kerberos5iReadOnly": + err = unpopulate(val, "Kerberos5IReadOnly", &e.Kerberos5IReadOnly) + delete(rawMsg, key) + case "kerberos5iReadWrite": + err = unpopulate(val, "Kerberos5IReadWrite", &e.Kerberos5IReadWrite) + delete(rawMsg, key) + case "kerberos5pReadOnly": + err = unpopulate(val, "Kerberos5PReadOnly", &e.Kerberos5PReadOnly) + delete(rawMsg, key) + case "kerberos5pReadWrite": + err = unpopulate(val, "Kerberos5PReadWrite", &e.Kerberos5PReadWrite) + delete(rawMsg, key) + case "kerberos5ReadOnly": + err = unpopulate(val, "Kerberos5ReadOnly", &e.Kerberos5ReadOnly) + delete(rawMsg, key) + case "kerberos5ReadWrite": + err = unpopulate(val, "Kerberos5ReadWrite", &e.Kerberos5ReadWrite) + delete(rawMsg, key) + case "nfsv3": + err = unpopulate(val, "Nfsv3", &e.Nfsv3) + delete(rawMsg, key) + case "nfsv41": + err = unpopulate(val, "Nfsv41", &e.Nfsv41) + delete(rawMsg, key) + case "ruleIndex": + err = unpopulate(val, "RuleIndex", &e.RuleIndex) + delete(rawMsg, key) + case "unixReadOnly": + err = unpopulate(val, "UnixReadOnly", &e.UnixReadOnly) + delete(rawMsg, key) + case "unixReadWrite": + err = unpopulate(val, "UnixReadWrite", &e.UnixReadWrite) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FilePathAvailabilityRequest. +func (f FilePathAvailabilityRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availabilityZone", f.AvailabilityZone) + populate(objectMap, "name", f.Name) + populate(objectMap, "subnetId", f.SubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FilePathAvailabilityRequest. +func (f *FilePathAvailabilityRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availabilityZone": + err = unpopulate(val, "AvailabilityZone", &f.AvailabilityZone) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &f.SubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetGroupIDListForLDAPUserRequest. +func (g GetGroupIDListForLDAPUserRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "username", g.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetGroupIDListForLDAPUserRequest. +func (g *GetGroupIDListForLDAPUserRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "username": + err = unpopulate(val, "Username", &g.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetGroupIDListForLDAPUserResponse. +func (g GetGroupIDListForLDAPUserResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupIdsForLdapUser", g.GroupIDsForLdapUser) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetGroupIDListForLDAPUserResponse. +func (g *GetGroupIDListForLDAPUserResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupIdsForLdapUser": + err = unpopulate(val, "GroupIDsForLdapUser", &g.GroupIDsForLdapUser) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetKeyVaultStatusResponse. +func (g GetKeyVaultStatusResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", g.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetKeyVaultStatusResponse. +func (g *GetKeyVaultStatusResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetKeyVaultStatusResponseProperties. +func (g GetKeyVaultStatusResponseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyName", g.KeyName) + populate(objectMap, "keyVaultPrivateEndpoints", g.KeyVaultPrivateEndpoints) + populate(objectMap, "keyVaultResourceId", g.KeyVaultResourceID) + populate(objectMap, "keyVaultUri", g.KeyVaultURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetKeyVaultStatusResponseProperties. +func (g *GetKeyVaultStatusResponseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyName": + err = unpopulate(val, "KeyName", &g.KeyName) + delete(rawMsg, key) + case "keyVaultPrivateEndpoints": + err = unpopulate(val, "KeyVaultPrivateEndpoints", &g.KeyVaultPrivateEndpoints) + delete(rawMsg, key) + case "keyVaultResourceId": + err = unpopulate(val, "KeyVaultResourceID", &g.KeyVaultResourceID) + delete(rawMsg, key) + case "keyVaultUri": + err = unpopulate(val, "KeyVaultURI", &g.KeyVaultURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HourlySchedule. +func (h HourlySchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "minute", h.Minute) + populate(objectMap, "snapshotsToKeep", h.SnapshotsToKeep) + populate(objectMap, "usedBytes", h.UsedBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HourlySchedule. +func (h *HourlySchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "minute": + err = unpopulate(val, "Minute", &h.Minute) + delete(rawMsg, key) + case "snapshotsToKeep": + err = unpopulate(val, "SnapshotsToKeep", &h.SnapshotsToKeep) + delete(rawMsg, key) + case "usedBytes": + err = unpopulate(val, "UsedBytes", &h.UsedBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultPrivateEndpoint. +func (k KeyVaultPrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpointId", k.PrivateEndpointID) + populate(objectMap, "virtualNetworkId", k.VirtualNetworkID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultPrivateEndpoint. +func (k *KeyVaultPrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpointId": + err = unpopulate(val, "PrivateEndpointID", &k.PrivateEndpointID) + delete(rawMsg, key) + case "virtualNetworkId": + err = unpopulate(val, "VirtualNetworkID", &k.VirtualNetworkID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties. +func (k KeyVaultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyName", k.KeyName) + populate(objectMap, "keyVaultId", k.KeyVaultID) + populate(objectMap, "keyVaultResourceId", k.KeyVaultResourceID) + populate(objectMap, "keyVaultUri", k.KeyVaultURI) + populate(objectMap, "status", k.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties. +func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyName": + err = unpopulate(val, "KeyName", &k.KeyName) + delete(rawMsg, key) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &k.KeyVaultID) + delete(rawMsg, key) + case "keyVaultResourceId": + err = unpopulate(val, "KeyVaultResourceID", &k.KeyVaultResourceID) + delete(rawMsg, key) + case "keyVaultUri": + err = unpopulate(val, "KeyVaultURI", &k.KeyVaultURI) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &k.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LdapSearchScopeOpt. +func (l LdapSearchScopeOpt) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupDN", l.GroupDN) + populate(objectMap, "groupMembershipFilter", l.GroupMembershipFilter) + populate(objectMap, "userDN", l.UserDN) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LdapSearchScopeOpt. +func (l *LdapSearchScopeOpt) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupDN": + err = unpopulate(val, "GroupDN", &l.GroupDN) + delete(rawMsg, key) + case "groupMembershipFilter": + err = unpopulate(val, "GroupMembershipFilter", &l.GroupMembershipFilter) + delete(rawMsg, key) + case "userDN": + err = unpopulate(val, "UserDN", &l.UserDN) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListReplications. +func (l ListReplications) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListReplications. +func (l *ListReplications) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "category", m.Category) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "enableRegionalMdmAccount", m.EnableRegionalMdmAccount) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "internalMetricName", m.InternalMetricName) + populate(objectMap, "isInternal", m.IsInternal) + populate(objectMap, "name", m.Name) + populate(objectMap, "resourceIdDimensionNameOverride", m.ResourceIDDimensionNameOverride) + populate(objectMap, "sourceMdmAccount", m.SourceMdmAccount) + populate(objectMap, "sourceMdmNamespace", m.SourceMdmNamespace) + populate(objectMap, "supportedAggregationTypes", m.SupportedAggregationTypes) + populate(objectMap, "supportedTimeGrainTypes", m.SupportedTimeGrainTypes) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &m.Category) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "enableRegionalMdmAccount": + err = unpopulate(val, "EnableRegionalMdmAccount", &m.EnableRegionalMdmAccount) + delete(rawMsg, key) + case "fillGapWithZero": + err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) + delete(rawMsg, key) + case "internalMetricName": + err = unpopulate(val, "InternalMetricName", &m.InternalMetricName) + delete(rawMsg, key) + case "isInternal": + err = unpopulate(val, "IsInternal", &m.IsInternal) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "resourceIdDimensionNameOverride": + err = unpopulate(val, "ResourceIDDimensionNameOverride", &m.ResourceIDDimensionNameOverride) + delete(rawMsg, key) + case "sourceMdmAccount": + err = unpopulate(val, "SourceMdmAccount", &m.SourceMdmAccount) + delete(rawMsg, key) + case "sourceMdmNamespace": + err = unpopulate(val, "SourceMdmNamespace", &m.SourceMdmNamespace) + delete(rawMsg, key) + case "supportedAggregationTypes": + err = unpopulate(val, "SupportedAggregationTypes", &m.SupportedAggregationTypes) + delete(rawMsg, key) + case "supportedTimeGrainTypes": + err = unpopulate(val, "SupportedTimeGrainTypes", &m.SupportedTimeGrainTypes) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonthlySchedule. +func (m MonthlySchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "daysOfMonth", m.DaysOfMonth) + populate(objectMap, "hour", m.Hour) + populate(objectMap, "minute", m.Minute) + populate(objectMap, "snapshotsToKeep", m.SnapshotsToKeep) + populate(objectMap, "usedBytes", m.UsedBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonthlySchedule. +func (m *MonthlySchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "daysOfMonth": + err = unpopulate(val, "DaysOfMonth", &m.DaysOfMonth) + delete(rawMsg, key) + case "hour": + err = unpopulate(val, "Hour", &m.Hour) + delete(rawMsg, key) + case "minute": + err = unpopulate(val, "Minute", &m.Minute) + delete(rawMsg, key) + case "snapshotsToKeep": + err = unpopulate(val, "SnapshotsToKeep", &m.SnapshotsToKeep) + delete(rawMsg, key) + case "usedBytes": + err = unpopulate(val, "UsedBytes", &m.UsedBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MountTargetProperties. +func (m MountTargetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fileSystemId", m.FileSystemID) + populate(objectMap, "ipAddress", m.IPAddress) + populate(objectMap, "mountTargetId", m.MountTargetID) + populate(objectMap, "smbServerFqdn", m.SmbServerFqdn) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MountTargetProperties. +func (m *MountTargetProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fileSystemId": + err = unpopulate(val, "FileSystemID", &m.FileSystemID) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &m.IPAddress) + delete(rawMsg, key) + case "mountTargetId": + err = unpopulate(val, "MountTargetID", &m.MountTargetID) + delete(rawMsg, key) + case "smbServerFqdn": + err = unpopulate(val, "SmbServerFqdn", &m.SmbServerFqdn) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkSiblingSet. +func (n NetworkSiblingSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkFeatures", n.NetworkFeatures) + populate(objectMap, "networkSiblingSetId", n.NetworkSiblingSetID) + populate(objectMap, "networkSiblingSetStateId", n.NetworkSiblingSetStateID) + populate(objectMap, "nicInfoList", n.NicInfoList) + populate(objectMap, "provisioningState", n.ProvisioningState) + populate(objectMap, "subnetId", n.SubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkSiblingSet. +func (n *NetworkSiblingSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkFeatures": + err = unpopulate(val, "NetworkFeatures", &n.NetworkFeatures) + delete(rawMsg, key) + case "networkSiblingSetId": + err = unpopulate(val, "NetworkSiblingSetID", &n.NetworkSiblingSetID) + delete(rawMsg, key) + case "networkSiblingSetStateId": + err = unpopulate(val, "NetworkSiblingSetStateID", &n.NetworkSiblingSetStateID) + delete(rawMsg, key) + case "nicInfoList": + err = unpopulate(val, "NicInfoList", &n.NicInfoList) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &n.SubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NicInfo. +func (n NicInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddress", n.IPAddress) + populate(objectMap, "volumeResourceIds", n.VolumeResourceIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NicInfo. +func (n *NicInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddress": + err = unpopulate(val, "IPAddress", &n.IPAddress) + delete(rawMsg, key) + case "volumeResourceIds": + err = unpopulate(val, "VolumeResourceIDs", &n.VolumeResourceIDs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + populate(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationProperties. +func (o OperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. +func (o *OperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PeerClusterForVolumeMigrationRequest. +func (p PeerClusterForVolumeMigrationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "peerIpAddresses", p.PeerIPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PeerClusterForVolumeMigrationRequest. +func (p *PeerClusterForVolumeMigrationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "peerIpAddresses": + err = unpopulate(val, "PeerIPAddresses", &p.PeerIPAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlacementKeyValuePairs. +func (p PlacementKeyValuePairs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "key", p.Key) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlacementKeyValuePairs. +func (p *PlacementKeyValuePairs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &p.Key) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PoolChangeRequest. +func (p PoolChangeRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "newPoolResourceId", p.NewPoolResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PoolChangeRequest. +func (p *PoolChangeRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "newPoolResourceId": + err = unpopulate(val, "NewPoolResourceID", &p.NewPoolResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PoolPatchProperties. +func (p PoolPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "coolAccess", p.CoolAccess) + populate(objectMap, "qosType", p.QosType) + populate(objectMap, "size", p.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PoolPatchProperties. +func (p *PoolPatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "coolAccess": + err = unpopulate(val, "CoolAccess", &p.CoolAccess) + delete(rawMsg, key) + case "qosType": + err = unpopulate(val, "QosType", &p.QosType) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &p.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PoolProperties. +func (p PoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "coolAccess", p.CoolAccess) + populate(objectMap, "encryptionType", p.EncryptionType) + populate(objectMap, "poolId", p.PoolID) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "qosType", p.QosType) + populate(objectMap, "serviceLevel", p.ServiceLevel) + populate(objectMap, "size", p.Size) + populate(objectMap, "totalThroughputMibps", p.TotalThroughputMibps) + populate(objectMap, "utilizedThroughputMibps", p.UtilizedThroughputMibps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PoolProperties. +func (p *PoolProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "coolAccess": + err = unpopulate(val, "CoolAccess", &p.CoolAccess) + delete(rawMsg, key) + case "encryptionType": + err = unpopulate(val, "EncryptionType", &p.EncryptionType) + delete(rawMsg, key) + case "poolId": + err = unpopulate(val, "PoolID", &p.PoolID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "qosType": + err = unpopulate(val, "QosType", &p.QosType) + delete(rawMsg, key) + case "serviceLevel": + err = unpopulate(val, "ServiceLevel", &p.ServiceLevel) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &p.Size) + delete(rawMsg, key) + case "totalThroughputMibps": + err = unpopulate(val, "TotalThroughputMibps", &p.TotalThroughputMibps) + delete(rawMsg, key) + case "utilizedThroughputMibps": + err = unpopulate(val, "UtilizedThroughputMibps", &p.UtilizedThroughputMibps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryNetworkSiblingSetRequest. +func (q QueryNetworkSiblingSetRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkSiblingSetId", q.NetworkSiblingSetID) + populate(objectMap, "subnetId", q.SubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryNetworkSiblingSetRequest. +func (q *QueryNetworkSiblingSetRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkSiblingSetId": + err = unpopulate(val, "NetworkSiblingSetID", &q.NetworkSiblingSetID) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &q.SubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaAvailabilityRequest. +func (q QuotaAvailabilityRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", q.Name) + populate(objectMap, "resourceGroup", q.ResourceGroup) + populate(objectMap, "type", q.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaAvailabilityRequest. +func (q *QuotaAvailabilityRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &q.Name) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &q.ResourceGroup) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &q.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReestablishReplicationRequest. +func (r ReestablishReplicationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sourceVolumeId", r.SourceVolumeID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReestablishReplicationRequest. +func (r *ReestablishReplicationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sourceVolumeId": + err = unpopulate(val, "SourceVolumeID", &r.SourceVolumeID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegionInfo. +func (r RegionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availabilityZoneMappings", r.AvailabilityZoneMappings) + populate(objectMap, "storageToNetworkProximity", r.StorageToNetworkProximity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegionInfo. +func (r *RegionInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availabilityZoneMappings": + err = unpopulate(val, "AvailabilityZoneMappings", &r.AvailabilityZoneMappings) + delete(rawMsg, key) + case "storageToNetworkProximity": + err = unpopulate(val, "StorageToNetworkProximity", &r.StorageToNetworkProximity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegionInfoAvailabilityZoneMappingsItem. +func (r RegionInfoAvailabilityZoneMappingsItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availabilityZone", r.AvailabilityZone) + populate(objectMap, "isAvailable", r.IsAvailable) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegionInfoAvailabilityZoneMappingsItem. +func (r *RegionInfoAvailabilityZoneMappingsItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availabilityZone": + err = unpopulate(val, "AvailabilityZone", &r.AvailabilityZone) + delete(rawMsg, key) + case "isAvailable": + err = unpopulate(val, "IsAvailable", &r.IsAvailable) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegionInfoResource. +func (r RegionInfoResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegionInfoResource. +func (r *RegionInfoResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegionInfosList. +func (r RegionInfosList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegionInfosList. +func (r *RegionInfosList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RelocateVolumeRequest. +func (r RelocateVolumeRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "creationToken", r.CreationToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RelocateVolumeRequest. +func (r *RelocateVolumeRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationToken": + err = unpopulate(val, "CreationToken", &r.CreationToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemotePath. +func (r RemotePath) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "externalHostName", r.ExternalHostName) + populate(objectMap, "serverName", r.ServerName) + populate(objectMap, "volumeName", r.VolumeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemotePath. +func (r *RemotePath) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "externalHostName": + err = unpopulate(val, "ExternalHostName", &r.ExternalHostName) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &r.ServerName) + delete(rawMsg, key) + case "volumeName": + err = unpopulate(val, "VolumeName", &r.VolumeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Replication. +func (r Replication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endpointType", r.EndpointType) + populate(objectMap, "remoteVolumeRegion", r.RemoteVolumeRegion) + populate(objectMap, "remoteVolumeResourceId", r.RemoteVolumeResourceID) + populate(objectMap, "replicationId", r.ReplicationID) + populate(objectMap, "replicationSchedule", r.ReplicationSchedule) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Replication. +func (r *Replication) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endpointType": + err = unpopulate(val, "EndpointType", &r.EndpointType) + delete(rawMsg, key) + case "remoteVolumeRegion": + err = unpopulate(val, "RemoteVolumeRegion", &r.RemoteVolumeRegion) + delete(rawMsg, key) + case "remoteVolumeResourceId": + err = unpopulate(val, "RemoteVolumeResourceID", &r.RemoteVolumeResourceID) + delete(rawMsg, key) + case "replicationId": + err = unpopulate(val, "ReplicationID", &r.ReplicationID) + delete(rawMsg, key) + case "replicationSchedule": + err = unpopulate(val, "ReplicationSchedule", &r.ReplicationSchedule) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationObject. +func (r ReplicationObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationReplications", r.DestinationReplications) + populate(objectMap, "endpointType", r.EndpointType) + populate(objectMap, "remotePath", r.RemotePath) + populate(objectMap, "remoteVolumeRegion", r.RemoteVolumeRegion) + populate(objectMap, "remoteVolumeResourceId", r.RemoteVolumeResourceID) + populate(objectMap, "replicationId", r.ReplicationID) + populate(objectMap, "replicationSchedule", r.ReplicationSchedule) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationObject. +func (r *ReplicationObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationReplications": + err = unpopulate(val, "DestinationReplications", &r.DestinationReplications) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &r.EndpointType) + delete(rawMsg, key) + case "remotePath": + err = unpopulate(val, "RemotePath", &r.RemotePath) + delete(rawMsg, key) + case "remoteVolumeRegion": + err = unpopulate(val, "RemoteVolumeRegion", &r.RemoteVolumeRegion) + delete(rawMsg, key) + case "remoteVolumeResourceId": + err = unpopulate(val, "RemoteVolumeResourceID", &r.RemoteVolumeResourceID) + delete(rawMsg, key) + case "replicationId": + err = unpopulate(val, "ReplicationID", &r.ReplicationID) + delete(rawMsg, key) + case "replicationSchedule": + err = unpopulate(val, "ReplicationSchedule", &r.ReplicationSchedule) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationStatus. +func (r ReplicationStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorMessage", r.ErrorMessage) + populate(objectMap, "healthy", r.Healthy) + populate(objectMap, "mirrorState", r.MirrorState) + populate(objectMap, "relationshipStatus", r.RelationshipStatus) + populate(objectMap, "totalProgress", r.TotalProgress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationStatus. +func (r *ReplicationStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &r.ErrorMessage) + delete(rawMsg, key) + case "healthy": + err = unpopulate(val, "Healthy", &r.Healthy) + delete(rawMsg, key) + case "mirrorState": + err = unpopulate(val, "MirrorState", &r.MirrorState) + delete(rawMsg, key) + case "relationshipStatus": + err = unpopulate(val, "RelationshipStatus", &r.RelationshipStatus) + delete(rawMsg, key) + case "totalProgress": + err = unpopulate(val, "TotalProgress", &r.TotalProgress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceNameAvailabilityRequest. +func (r ResourceNameAvailabilityRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", r.Name) + populate(objectMap, "resourceGroup", r.ResourceGroup) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNameAvailabilityRequest. +func (r *ResourceNameAvailabilityRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &r.ResourceGroup) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestoreStatus. +func (r RestoreStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorMessage", r.ErrorMessage) + populate(objectMap, "healthy", r.Healthy) + populate(objectMap, "mirrorState", r.MirrorState) + populate(objectMap, "relationshipStatus", r.RelationshipStatus) + populate(objectMap, "totalTransferBytes", r.TotalTransferBytes) + populate(objectMap, "unhealthyReason", r.UnhealthyReason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreStatus. +func (r *RestoreStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &r.ErrorMessage) + delete(rawMsg, key) + case "healthy": + err = unpopulate(val, "Healthy", &r.Healthy) + delete(rawMsg, key) + case "mirrorState": + err = unpopulate(val, "MirrorState", &r.MirrorState) + delete(rawMsg, key) + case "relationshipStatus": + err = unpopulate(val, "RelationshipStatus", &r.RelationshipStatus) + delete(rawMsg, key) + case "totalTransferBytes": + err = unpopulate(val, "TotalTransferBytes", &r.TotalTransferBytes) + delete(rawMsg, key) + case "unhealthyReason": + err = unpopulate(val, "UnhealthyReason", &r.UnhealthyReason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", s.LogSpecifications) + populate(objectMap, "metricSpecifications", s.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Snapshot. +func (s Snapshot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Snapshot. +func (s *Snapshot) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotPoliciesList. +func (s SnapshotPoliciesList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotPoliciesList. +func (s *SnapshotPoliciesList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotPolicy. +func (s SnapshotPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotPolicy. +func (s *SnapshotPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotPolicyPatch. +func (s SnapshotPolicyPatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotPolicyPatch. +func (s *SnapshotPolicyPatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotPolicyProperties. +func (s SnapshotPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dailySchedule", s.DailySchedule) + populate(objectMap, "enabled", s.Enabled) + populate(objectMap, "hourlySchedule", s.HourlySchedule) + populate(objectMap, "monthlySchedule", s.MonthlySchedule) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "weeklySchedule", s.WeeklySchedule) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotPolicyProperties. +func (s *SnapshotPolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dailySchedule": + err = unpopulate(val, "DailySchedule", &s.DailySchedule) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "hourlySchedule": + err = unpopulate(val, "HourlySchedule", &s.HourlySchedule) + delete(rawMsg, key) + case "monthlySchedule": + err = unpopulate(val, "MonthlySchedule", &s.MonthlySchedule) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "weeklySchedule": + err = unpopulate(val, "WeeklySchedule", &s.WeeklySchedule) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotPolicyVolumeList. +func (s SnapshotPolicyVolumeList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotPolicyVolumeList. +func (s *SnapshotPolicyVolumeList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotProperties. +func (s SnapshotProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "created", s.Created) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "snapshotId", s.SnapshotID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotProperties. +func (s *SnapshotProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "created": + err = unpopulateDateTimeRFC3339(val, "Created", &s.Created) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "snapshotId": + err = unpopulate(val, "SnapshotID", &s.SnapshotID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotRestoreFiles. +func (s SnapshotRestoreFiles) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationPath", s.DestinationPath) + populate(objectMap, "filePaths", s.FilePaths) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotRestoreFiles. +func (s *SnapshotRestoreFiles) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationPath": + err = unpopulate(val, "DestinationPath", &s.DestinationPath) + delete(rawMsg, key) + case "filePaths": + err = unpopulate(val, "FilePaths", &s.FilePaths) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotsList. +func (s SnapshotsList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotsList. +func (s *SnapshotsList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaItem. +func (s SubscriptionQuotaItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaItem. +func (s *SubscriptionQuotaItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaItemList. +func (s SubscriptionQuotaItemList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaItemList. +func (s *SubscriptionQuotaItemList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaItemProperties. +func (s SubscriptionQuotaItemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "current", s.Current) + populate(objectMap, "default", s.Default) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaItemProperties. +func (s *SubscriptionQuotaItemProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "current": + err = unpopulate(val, "Current", &s.Current) + delete(rawMsg, key) + case "default": + err = unpopulate(val, "Default", &s.Default) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubvolumeInfo. +func (s SubvolumeInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubvolumeInfo. +func (s *SubvolumeInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubvolumeModel. +func (s SubvolumeModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubvolumeModel. +func (s *SubvolumeModel) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubvolumeModelProperties. +func (s SubvolumeModelProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "accessedTimeStamp", s.AccessedTimeStamp) + populate(objectMap, "bytesUsed", s.BytesUsed) + populateDateTimeRFC3339(objectMap, "changedTimeStamp", s.ChangedTimeStamp) + populateDateTimeRFC3339(objectMap, "creationTimeStamp", s.CreationTimeStamp) + populateDateTimeRFC3339(objectMap, "modifiedTimeStamp", s.ModifiedTimeStamp) + populate(objectMap, "parentPath", s.ParentPath) + populate(objectMap, "path", s.Path) + populate(objectMap, "permissions", s.Permissions) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "size", s.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubvolumeModelProperties. +func (s *SubvolumeModelProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessedTimeStamp": + err = unpopulateDateTimeRFC3339(val, "AccessedTimeStamp", &s.AccessedTimeStamp) + delete(rawMsg, key) + case "bytesUsed": + err = unpopulate(val, "BytesUsed", &s.BytesUsed) + delete(rawMsg, key) + case "changedTimeStamp": + err = unpopulateDateTimeRFC3339(val, "ChangedTimeStamp", &s.ChangedTimeStamp) + delete(rawMsg, key) + case "creationTimeStamp": + err = unpopulateDateTimeRFC3339(val, "CreationTimeStamp", &s.CreationTimeStamp) + delete(rawMsg, key) + case "modifiedTimeStamp": + err = unpopulateDateTimeRFC3339(val, "ModifiedTimeStamp", &s.ModifiedTimeStamp) + delete(rawMsg, key) + case "parentPath": + err = unpopulate(val, "ParentPath", &s.ParentPath) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "permissions": + err = unpopulate(val, "Permissions", &s.Permissions) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &s.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubvolumePatchParams. +func (s SubvolumePatchParams) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "path", s.Path) + populate(objectMap, "size", s.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubvolumePatchParams. +func (s *SubvolumePatchParams) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &s.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubvolumePatchRequest. +func (s SubvolumePatchRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubvolumePatchRequest. +func (s *SubvolumePatchRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubvolumeProperties. +func (s SubvolumeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "parentPath", s.ParentPath) + populate(objectMap, "path", s.Path) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "size", s.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubvolumeProperties. +func (s *SubvolumeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "parentPath": + err = unpopulate(val, "ParentPath", &s.ParentPath) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &s.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubvolumesList. +func (s SubvolumesList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubvolumesList. +func (s *SubvolumesList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SvmPeerCommandResponse. +func (s SvmPeerCommandResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "svmPeeringCommand", s.SvmPeeringCommand) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SvmPeerCommandResponse. +func (s *SvmPeerCommandResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "svmPeeringCommand": + err = unpopulate(val, "SvmPeeringCommand", &s.SvmPeeringCommand) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateNetworkSiblingSetRequest. +func (u UpdateNetworkSiblingSetRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkFeatures", u.NetworkFeatures) + populate(objectMap, "networkSiblingSetId", u.NetworkSiblingSetID) + populate(objectMap, "networkSiblingSetStateId", u.NetworkSiblingSetStateID) + populate(objectMap, "subnetId", u.SubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateNetworkSiblingSetRequest. +func (u *UpdateNetworkSiblingSetRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkFeatures": + err = unpopulate(val, "NetworkFeatures", &u.NetworkFeatures) + delete(rawMsg, key) + case "networkSiblingSetId": + err = unpopulate(val, "NetworkSiblingSetID", &u.NetworkSiblingSetID) + delete(rawMsg, key) + case "networkSiblingSetStateId": + err = unpopulate(val, "NetworkSiblingSetStateID", &u.NetworkSiblingSetStateID) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &u.SubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageName. +func (u UsageName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", u.LocalizedValue) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageName. +func (u *UsageName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &u.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageProperties. +func (u UsageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", u.CurrentValue) + populate(objectMap, "limit", u.Limit) + populate(objectMap, "unit", u.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageProperties. +func (u *UsageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &u.CurrentValue) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &u.Limit) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &u.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageResult. +func (u UsageResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", u.ID) + populate(objectMap, "name", u.Name) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageResult. +func (u *UsageResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsagesListResult. +func (u UsagesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsagesListResult. +func (u *UsagesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. +func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Volume. +func (v Volume) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "systemData", v.SystemData) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + populate(objectMap, "zones", v.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Volume. +func (v *Volume) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &v.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &v.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeBackupProperties. +func (v VolumeBackupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupPolicyId", v.BackupPolicyID) + populate(objectMap, "backupVaultId", v.BackupVaultID) + populate(objectMap, "policyEnforced", v.PolicyEnforced) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeBackupProperties. +func (v *VolumeBackupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupPolicyId": + err = unpopulate(val, "BackupPolicyID", &v.BackupPolicyID) + delete(rawMsg, key) + case "backupVaultId": + err = unpopulate(val, "BackupVaultID", &v.BackupVaultID) + delete(rawMsg, key) + case "policyEnforced": + err = unpopulate(val, "PolicyEnforced", &v.PolicyEnforced) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeBackups. +func (v VolumeBackups) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupsCount", v.BackupsCount) + populate(objectMap, "policyEnabled", v.PolicyEnabled) + populate(objectMap, "volumeName", v.VolumeName) + populate(objectMap, "volumeResourceId", v.VolumeResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeBackups. +func (v *VolumeBackups) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupsCount": + err = unpopulate(val, "BackupsCount", &v.BackupsCount) + delete(rawMsg, key) + case "policyEnabled": + err = unpopulate(val, "PolicyEnabled", &v.PolicyEnabled) + delete(rawMsg, key) + case "volumeName": + err = unpopulate(val, "VolumeName", &v.VolumeName) + delete(rawMsg, key) + case "volumeResourceId": + err = unpopulate(val, "VolumeResourceID", &v.VolumeResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeGroup. +func (v VolumeGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroup. +func (v *VolumeGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeGroupDetails. +func (v VolumeGroupDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroupDetails. +func (v *VolumeGroupDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeGroupList. +func (v VolumeGroupList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroupList. +func (v *VolumeGroupList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeGroupListProperties. +func (v VolumeGroupListProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupMetaData", v.GroupMetaData) + populate(objectMap, "provisioningState", v.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroupListProperties. +func (v *VolumeGroupListProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupMetaData": + err = unpopulate(val, "GroupMetaData", &v.GroupMetaData) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeGroupMetaData. +func (v VolumeGroupMetaData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationIdentifier", v.ApplicationIdentifier) + populate(objectMap, "applicationType", v.ApplicationType) + populate(objectMap, "globalPlacementRules", v.GlobalPlacementRules) + populate(objectMap, "groupDescription", v.GroupDescription) + populate(objectMap, "volumesCount", v.VolumesCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroupMetaData. +func (v *VolumeGroupMetaData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationIdentifier": + err = unpopulate(val, "ApplicationIdentifier", &v.ApplicationIdentifier) + delete(rawMsg, key) + case "applicationType": + err = unpopulate(val, "ApplicationType", &v.ApplicationType) + delete(rawMsg, key) + case "globalPlacementRules": + err = unpopulate(val, "GlobalPlacementRules", &v.GlobalPlacementRules) + delete(rawMsg, key) + case "groupDescription": + err = unpopulate(val, "GroupDescription", &v.GroupDescription) + delete(rawMsg, key) + case "volumesCount": + err = unpopulate(val, "VolumesCount", &v.VolumesCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeGroupProperties. +func (v VolumeGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupMetaData", v.GroupMetaData) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "volumes", v.Volumes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroupProperties. +func (v *VolumeGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupMetaData": + err = unpopulate(val, "GroupMetaData", &v.GroupMetaData) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "volumes": + err = unpopulate(val, "Volumes", &v.Volumes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeGroupVolumeProperties. +func (v VolumeGroupVolumeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + populate(objectMap, "zones", v.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeGroupVolumeProperties. +func (v *VolumeGroupVolumeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &v.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeList. +func (v VolumeList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeList. +func (v *VolumeList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumePatch. +func (v VolumePatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumePatch. +func (v *VolumePatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumePatchProperties. +func (v VolumePatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "coolAccess", v.CoolAccess) + populate(objectMap, "coolAccessRetrievalPolicy", v.CoolAccessRetrievalPolicy) + populate(objectMap, "coolAccessTieringPolicy", v.CoolAccessTieringPolicy) + populate(objectMap, "coolnessPeriod", v.CoolnessPeriod) + populate(objectMap, "dataProtection", v.DataProtection) + populate(objectMap, "defaultGroupQuotaInKiBs", v.DefaultGroupQuotaInKiBs) + populate(objectMap, "defaultUserQuotaInKiBs", v.DefaultUserQuotaInKiBs) + populate(objectMap, "exportPolicy", v.ExportPolicy) + populate(objectMap, "isDefaultQuotaEnabled", v.IsDefaultQuotaEnabled) + populate(objectMap, "protocolTypes", v.ProtocolTypes) + populate(objectMap, "serviceLevel", v.ServiceLevel) + populate(objectMap, "smbAccessBasedEnumeration", v.SmbAccessBasedEnumeration) + populate(objectMap, "smbNonBrowsable", v.SmbNonBrowsable) + populate(objectMap, "snapshotDirectoryVisible", v.SnapshotDirectoryVisible) + populate(objectMap, "throughputMibps", v.ThroughputMibps) + populate(objectMap, "unixPermissions", v.UnixPermissions) + populate(objectMap, "usageThreshold", v.UsageThreshold) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumePatchProperties. +func (v *VolumePatchProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "coolAccess": + err = unpopulate(val, "CoolAccess", &v.CoolAccess) + delete(rawMsg, key) + case "coolAccessRetrievalPolicy": + err = unpopulate(val, "CoolAccessRetrievalPolicy", &v.CoolAccessRetrievalPolicy) + delete(rawMsg, key) + case "coolAccessTieringPolicy": + err = unpopulate(val, "CoolAccessTieringPolicy", &v.CoolAccessTieringPolicy) + delete(rawMsg, key) + case "coolnessPeriod": + err = unpopulate(val, "CoolnessPeriod", &v.CoolnessPeriod) + delete(rawMsg, key) + case "dataProtection": + err = unpopulate(val, "DataProtection", &v.DataProtection) + delete(rawMsg, key) + case "defaultGroupQuotaInKiBs": + err = unpopulate(val, "DefaultGroupQuotaInKiBs", &v.DefaultGroupQuotaInKiBs) + delete(rawMsg, key) + case "defaultUserQuotaInKiBs": + err = unpopulate(val, "DefaultUserQuotaInKiBs", &v.DefaultUserQuotaInKiBs) + delete(rawMsg, key) + case "exportPolicy": + err = unpopulate(val, "ExportPolicy", &v.ExportPolicy) + delete(rawMsg, key) + case "isDefaultQuotaEnabled": + err = unpopulate(val, "IsDefaultQuotaEnabled", &v.IsDefaultQuotaEnabled) + delete(rawMsg, key) + case "protocolTypes": + err = unpopulate(val, "ProtocolTypes", &v.ProtocolTypes) + delete(rawMsg, key) + case "serviceLevel": + err = unpopulate(val, "ServiceLevel", &v.ServiceLevel) + delete(rawMsg, key) + case "smbAccessBasedEnumeration": + err = unpopulate(val, "SmbAccessBasedEnumeration", &v.SmbAccessBasedEnumeration) + delete(rawMsg, key) + case "smbNonBrowsable": + err = unpopulate(val, "SmbNonBrowsable", &v.SmbNonBrowsable) + delete(rawMsg, key) + case "snapshotDirectoryVisible": + err = unpopulate(val, "SnapshotDirectoryVisible", &v.SnapshotDirectoryVisible) + delete(rawMsg, key) + case "throughputMibps": + err = unpopulate(val, "ThroughputMibps", &v.ThroughputMibps) + delete(rawMsg, key) + case "unixPermissions": + err = unpopulate(val, "UnixPermissions", &v.UnixPermissions) + delete(rawMsg, key) + case "usageThreshold": + err = unpopulate(val, "UsageThreshold", &v.UsageThreshold) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumePatchPropertiesDataProtection. +func (v VolumePatchPropertiesDataProtection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backup", v.Backup) + populate(objectMap, "snapshot", v.Snapshot) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumePatchPropertiesDataProtection. +func (v *VolumePatchPropertiesDataProtection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backup": + err = unpopulate(val, "Backup", &v.Backup) + delete(rawMsg, key) + case "snapshot": + err = unpopulate(val, "Snapshot", &v.Snapshot) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumePatchPropertiesExportPolicy. +func (v VolumePatchPropertiesExportPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rules", v.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumePatchPropertiesExportPolicy. +func (v *VolumePatchPropertiesExportPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rules": + err = unpopulate(val, "Rules", &v.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeProperties. +func (v VolumeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actualThroughputMibps", v.ActualThroughputMibps) + populate(objectMap, "avsDataStore", v.AvsDataStore) + populate(objectMap, "backupId", v.BackupID) + populate(objectMap, "baremetalTenantId", v.BaremetalTenantID) + populate(objectMap, "capacityPoolResourceId", v.CapacityPoolResourceID) + populate(objectMap, "cloneProgress", v.CloneProgress) + populate(objectMap, "coolAccess", v.CoolAccess) + populate(objectMap, "coolAccessRetrievalPolicy", v.CoolAccessRetrievalPolicy) + populate(objectMap, "coolAccessTieringPolicy", v.CoolAccessTieringPolicy) + populate(objectMap, "coolnessPeriod", v.CoolnessPeriod) + populate(objectMap, "creationToken", v.CreationToken) + populate(objectMap, "dataProtection", v.DataProtection) + populate(objectMap, "dataStoreResourceId", v.DataStoreResourceID) + populate(objectMap, "defaultGroupQuotaInKiBs", v.DefaultGroupQuotaInKiBs) + populate(objectMap, "defaultUserQuotaInKiBs", v.DefaultUserQuotaInKiBs) + populate(objectMap, "deleteBaseSnapshot", v.DeleteBaseSnapshot) + populate(objectMap, "effectiveNetworkFeatures", v.EffectiveNetworkFeatures) + populate(objectMap, "enableSubvolumes", v.EnableSubvolumes) + populate(objectMap, "encrypted", v.Encrypted) + populate(objectMap, "encryptionKeySource", v.EncryptionKeySource) + populate(objectMap, "exportPolicy", v.ExportPolicy) + populate(objectMap, "fileAccessLogs", v.FileAccessLogs) + populate(objectMap, "fileSystemId", v.FileSystemID) + populate(objectMap, "isDefaultQuotaEnabled", v.IsDefaultQuotaEnabled) + populate(objectMap, "isLargeVolume", v.IsLargeVolume) + populate(objectMap, "isRestoring", v.IsRestoring) + populate(objectMap, "kerberosEnabled", v.KerberosEnabled) + populate(objectMap, "keyVaultPrivateEndpointResourceId", v.KeyVaultPrivateEndpointResourceID) + populate(objectMap, "ldapEnabled", v.LdapEnabled) + populate(objectMap, "maximumNumberOfFiles", v.MaximumNumberOfFiles) + populate(objectMap, "mountTargets", v.MountTargets) + populate(objectMap, "networkFeatures", v.NetworkFeatures) + populate(objectMap, "networkSiblingSetId", v.NetworkSiblingSetID) + populate(objectMap, "originatingResourceId", v.OriginatingResourceID) + populate(objectMap, "placementRules", v.PlacementRules) + populate(objectMap, "protocolTypes", v.ProtocolTypes) + populate(objectMap, "provisionedAvailabilityZone", v.ProvisionedAvailabilityZone) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "proximityPlacementGroup", v.ProximityPlacementGroup) + populate(objectMap, "securityStyle", v.SecurityStyle) + populate(objectMap, "serviceLevel", v.ServiceLevel) + populate(objectMap, "smbAccessBasedEnumeration", v.SmbAccessBasedEnumeration) + populate(objectMap, "smbContinuouslyAvailable", v.SmbContinuouslyAvailable) + populate(objectMap, "smbEncryption", v.SmbEncryption) + populate(objectMap, "smbNonBrowsable", v.SmbNonBrowsable) + populate(objectMap, "snapshotDirectoryVisible", v.SnapshotDirectoryVisible) + populate(objectMap, "snapshotId", v.SnapshotID) + populate(objectMap, "storageToNetworkProximity", v.StorageToNetworkProximity) + populate(objectMap, "subnetId", v.SubnetID) + populate(objectMap, "t2Network", v.T2Network) + populate(objectMap, "throughputMibps", v.ThroughputMibps) + populate(objectMap, "unixPermissions", v.UnixPermissions) + populate(objectMap, "usageThreshold", v.UsageThreshold) + populate(objectMap, "volumeGroupName", v.VolumeGroupName) + populate(objectMap, "volumeSpecName", v.VolumeSpecName) + populate(objectMap, "volumeType", v.VolumeType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeProperties. +func (v *VolumeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actualThroughputMibps": + err = unpopulate(val, "ActualThroughputMibps", &v.ActualThroughputMibps) + delete(rawMsg, key) + case "avsDataStore": + err = unpopulate(val, "AvsDataStore", &v.AvsDataStore) + delete(rawMsg, key) + case "backupId": + err = unpopulate(val, "BackupID", &v.BackupID) + delete(rawMsg, key) + case "baremetalTenantId": + err = unpopulate(val, "BaremetalTenantID", &v.BaremetalTenantID) + delete(rawMsg, key) + case "capacityPoolResourceId": + err = unpopulate(val, "CapacityPoolResourceID", &v.CapacityPoolResourceID) + delete(rawMsg, key) + case "cloneProgress": + err = unpopulate(val, "CloneProgress", &v.CloneProgress) + delete(rawMsg, key) + case "coolAccess": + err = unpopulate(val, "CoolAccess", &v.CoolAccess) + delete(rawMsg, key) + case "coolAccessRetrievalPolicy": + err = unpopulate(val, "CoolAccessRetrievalPolicy", &v.CoolAccessRetrievalPolicy) + delete(rawMsg, key) + case "coolAccessTieringPolicy": + err = unpopulate(val, "CoolAccessTieringPolicy", &v.CoolAccessTieringPolicy) + delete(rawMsg, key) + case "coolnessPeriod": + err = unpopulate(val, "CoolnessPeriod", &v.CoolnessPeriod) + delete(rawMsg, key) + case "creationToken": + err = unpopulate(val, "CreationToken", &v.CreationToken) + delete(rawMsg, key) + case "dataProtection": + err = unpopulate(val, "DataProtection", &v.DataProtection) + delete(rawMsg, key) + case "dataStoreResourceId": + err = unpopulate(val, "DataStoreResourceID", &v.DataStoreResourceID) + delete(rawMsg, key) + case "defaultGroupQuotaInKiBs": + err = unpopulate(val, "DefaultGroupQuotaInKiBs", &v.DefaultGroupQuotaInKiBs) + delete(rawMsg, key) + case "defaultUserQuotaInKiBs": + err = unpopulate(val, "DefaultUserQuotaInKiBs", &v.DefaultUserQuotaInKiBs) + delete(rawMsg, key) + case "deleteBaseSnapshot": + err = unpopulate(val, "DeleteBaseSnapshot", &v.DeleteBaseSnapshot) + delete(rawMsg, key) + case "effectiveNetworkFeatures": + err = unpopulate(val, "EffectiveNetworkFeatures", &v.EffectiveNetworkFeatures) + delete(rawMsg, key) + case "enableSubvolumes": + err = unpopulate(val, "EnableSubvolumes", &v.EnableSubvolumes) + delete(rawMsg, key) + case "encrypted": + err = unpopulate(val, "Encrypted", &v.Encrypted) + delete(rawMsg, key) + case "encryptionKeySource": + err = unpopulate(val, "EncryptionKeySource", &v.EncryptionKeySource) + delete(rawMsg, key) + case "exportPolicy": + err = unpopulate(val, "ExportPolicy", &v.ExportPolicy) + delete(rawMsg, key) + case "fileAccessLogs": + err = unpopulate(val, "FileAccessLogs", &v.FileAccessLogs) + delete(rawMsg, key) + case "fileSystemId": + err = unpopulate(val, "FileSystemID", &v.FileSystemID) + delete(rawMsg, key) + case "isDefaultQuotaEnabled": + err = unpopulate(val, "IsDefaultQuotaEnabled", &v.IsDefaultQuotaEnabled) + delete(rawMsg, key) + case "isLargeVolume": + err = unpopulate(val, "IsLargeVolume", &v.IsLargeVolume) + delete(rawMsg, key) + case "isRestoring": + err = unpopulate(val, "IsRestoring", &v.IsRestoring) + delete(rawMsg, key) + case "kerberosEnabled": + err = unpopulate(val, "KerberosEnabled", &v.KerberosEnabled) + delete(rawMsg, key) + case "keyVaultPrivateEndpointResourceId": + err = unpopulate(val, "KeyVaultPrivateEndpointResourceID", &v.KeyVaultPrivateEndpointResourceID) + delete(rawMsg, key) + case "ldapEnabled": + err = unpopulate(val, "LdapEnabled", &v.LdapEnabled) + delete(rawMsg, key) + case "maximumNumberOfFiles": + err = unpopulate(val, "MaximumNumberOfFiles", &v.MaximumNumberOfFiles) + delete(rawMsg, key) + case "mountTargets": + err = unpopulate(val, "MountTargets", &v.MountTargets) + delete(rawMsg, key) + case "networkFeatures": + err = unpopulate(val, "NetworkFeatures", &v.NetworkFeatures) + delete(rawMsg, key) + case "networkSiblingSetId": + err = unpopulate(val, "NetworkSiblingSetID", &v.NetworkSiblingSetID) + delete(rawMsg, key) + case "originatingResourceId": + err = unpopulate(val, "OriginatingResourceID", &v.OriginatingResourceID) + delete(rawMsg, key) + case "placementRules": + err = unpopulate(val, "PlacementRules", &v.PlacementRules) + delete(rawMsg, key) + case "protocolTypes": + err = unpopulate(val, "ProtocolTypes", &v.ProtocolTypes) + delete(rawMsg, key) + case "provisionedAvailabilityZone": + err = unpopulate(val, "ProvisionedAvailabilityZone", &v.ProvisionedAvailabilityZone) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "proximityPlacementGroup": + err = unpopulate(val, "ProximityPlacementGroup", &v.ProximityPlacementGroup) + delete(rawMsg, key) + case "securityStyle": + err = unpopulate(val, "SecurityStyle", &v.SecurityStyle) + delete(rawMsg, key) + case "serviceLevel": + err = unpopulate(val, "ServiceLevel", &v.ServiceLevel) + delete(rawMsg, key) + case "smbAccessBasedEnumeration": + err = unpopulate(val, "SmbAccessBasedEnumeration", &v.SmbAccessBasedEnumeration) + delete(rawMsg, key) + case "smbContinuouslyAvailable": + err = unpopulate(val, "SmbContinuouslyAvailable", &v.SmbContinuouslyAvailable) + delete(rawMsg, key) + case "smbEncryption": + err = unpopulate(val, "SmbEncryption", &v.SmbEncryption) + delete(rawMsg, key) + case "smbNonBrowsable": + err = unpopulate(val, "SmbNonBrowsable", &v.SmbNonBrowsable) + delete(rawMsg, key) + case "snapshotDirectoryVisible": + err = unpopulate(val, "SnapshotDirectoryVisible", &v.SnapshotDirectoryVisible) + delete(rawMsg, key) + case "snapshotId": + err = unpopulate(val, "SnapshotID", &v.SnapshotID) + delete(rawMsg, key) + case "storageToNetworkProximity": + err = unpopulate(val, "StorageToNetworkProximity", &v.StorageToNetworkProximity) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &v.SubnetID) + delete(rawMsg, key) + case "t2Network": + err = unpopulate(val, "T2Network", &v.T2Network) + delete(rawMsg, key) + case "throughputMibps": + err = unpopulate(val, "ThroughputMibps", &v.ThroughputMibps) + delete(rawMsg, key) + case "unixPermissions": + err = unpopulate(val, "UnixPermissions", &v.UnixPermissions) + delete(rawMsg, key) + case "usageThreshold": + err = unpopulate(val, "UsageThreshold", &v.UsageThreshold) + delete(rawMsg, key) + case "volumeGroupName": + err = unpopulate(val, "VolumeGroupName", &v.VolumeGroupName) + delete(rawMsg, key) + case "volumeSpecName": + err = unpopulate(val, "VolumeSpecName", &v.VolumeSpecName) + delete(rawMsg, key) + case "volumeType": + err = unpopulate(val, "VolumeType", &v.VolumeType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumePropertiesDataProtection. +func (v VolumePropertiesDataProtection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backup", v.Backup) + populate(objectMap, "replication", v.Replication) + populate(objectMap, "snapshot", v.Snapshot) + populate(objectMap, "volumeRelocation", v.VolumeRelocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumePropertiesDataProtection. +func (v *VolumePropertiesDataProtection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backup": + err = unpopulate(val, "Backup", &v.Backup) + delete(rawMsg, key) + case "replication": + err = unpopulate(val, "Replication", &v.Replication) + delete(rawMsg, key) + case "snapshot": + err = unpopulate(val, "Snapshot", &v.Snapshot) + delete(rawMsg, key) + case "volumeRelocation": + err = unpopulate(val, "VolumeRelocation", &v.VolumeRelocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumePropertiesExportPolicy. +func (v VolumePropertiesExportPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rules", v.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumePropertiesExportPolicy. +func (v *VolumePropertiesExportPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rules": + err = unpopulate(val, "Rules", &v.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeQuotaRule. +func (v VolumeQuotaRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "systemData", v.SystemData) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeQuotaRule. +func (v *VolumeQuotaRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &v.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeQuotaRulePatch. +func (v VolumeQuotaRulePatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeQuotaRulePatch. +func (v *VolumeQuotaRulePatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeQuotaRulesList. +func (v VolumeQuotaRulesList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeQuotaRulesList. +func (v *VolumeQuotaRulesList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeQuotaRulesProperties. +func (v VolumeQuotaRulesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "quotaSizeInKiBs", v.QuotaSizeInKiBs) + populate(objectMap, "quotaTarget", v.QuotaTarget) + populate(objectMap, "quotaType", v.QuotaType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeQuotaRulesProperties. +func (v *VolumeQuotaRulesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "quotaSizeInKiBs": + err = unpopulate(val, "QuotaSizeInKiBs", &v.QuotaSizeInKiBs) + delete(rawMsg, key) + case "quotaTarget": + err = unpopulate(val, "QuotaTarget", &v.QuotaTarget) + delete(rawMsg, key) + case "quotaType": + err = unpopulate(val, "QuotaType", &v.QuotaType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeRelocationProperties. +func (v VolumeRelocationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "readyToBeFinalized", v.ReadyToBeFinalized) + populate(objectMap, "relocationRequested", v.RelocationRequested) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeRelocationProperties. +func (v *VolumeRelocationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "readyToBeFinalized": + err = unpopulate(val, "ReadyToBeFinalized", &v.ReadyToBeFinalized) + delete(rawMsg, key) + case "relocationRequested": + err = unpopulate(val, "RelocationRequested", &v.RelocationRequested) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeRevert. +func (v VolumeRevert) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "snapshotId", v.SnapshotID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeRevert. +func (v *VolumeRevert) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "snapshotId": + err = unpopulate(val, "SnapshotID", &v.SnapshotID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeSnapshotProperties. +func (v VolumeSnapshotProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "snapshotPolicyId", v.SnapshotPolicyID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeSnapshotProperties. +func (v *VolumeSnapshotProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "snapshotPolicyId": + err = unpopulate(val, "SnapshotPolicyID", &v.SnapshotPolicyID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WeeklySchedule. +func (w WeeklySchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "day", w.Day) + populate(objectMap, "hour", w.Hour) + populate(objectMap, "minute", w.Minute) + populate(objectMap, "snapshotsToKeep", w.SnapshotsToKeep) + populate(objectMap, "usedBytes", w.UsedBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WeeklySchedule. +func (w *WeeklySchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "day": + err = unpopulate(val, "Day", &w.Day) + delete(rawMsg, key) + case "hour": + err = unpopulate(val, "Hour", &w.Hour) + delete(rawMsg, key) + case "minute": + err = unpopulate(val, "Minute", &w.Minute) + delete(rawMsg, key) + case "snapshotsToKeep": + err = unpopulate(val, "SnapshotsToKeep", &w.SnapshotsToKeep) + delete(rawMsg, key) + case "usedBytes": + err = unpopulate(val, "UsedBytes", &w.UsedBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/operations_client.go new file mode 100644 index 00000000..bdbcb9bf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/operations_client.go @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Lists all of the available Microsoft.NetApp Rest API operations +// +// Generated from API version 2025-01-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.NetApp/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/options.go new file mode 100644 index 00000000..d58c5071 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/options.go @@ -0,0 +1,622 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +// AccountsClientBeginChangeKeyVaultOptions contains the optional parameters for the AccountsClient.BeginChangeKeyVault method. +type AccountsClientBeginChangeKeyVaultOptions struct { + // The required parameters to perform encryption migration. + Body *ChangeKeyVault + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the AccountsClient.BeginCreateOrUpdate method. +type AccountsClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method. +type AccountsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginGetChangeKeyVaultInformationOptions contains the optional parameters for the AccountsClient.BeginGetChangeKeyVaultInformation +// method. +type AccountsClientBeginGetChangeKeyVaultInformationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginRenewCredentialsOptions contains the optional parameters for the AccountsClient.BeginRenewCredentials +// method. +type AccountsClientBeginRenewCredentialsOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginTransitionToCmkOptions contains the optional parameters for the AccountsClient.BeginTransitionToCmk +// method. +type AccountsClientBeginTransitionToCmkOptions struct { + // The required parameters to perform encryption transition. + Body *EncryptionTransitionRequest + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method. +type AccountsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method. +type AccountsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.NewListBySubscriptionPager +// method. +type AccountsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method. +type AccountsClientListOptions struct { + // placeholder for future optional parameters +} + +// BackupPoliciesClientBeginCreateOptions contains the optional parameters for the BackupPoliciesClient.BeginCreate method. +type BackupPoliciesClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupPoliciesClientBeginDeleteOptions contains the optional parameters for the BackupPoliciesClient.BeginDelete method. +type BackupPoliciesClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupPoliciesClientBeginUpdateOptions contains the optional parameters for the BackupPoliciesClient.BeginUpdate method. +type BackupPoliciesClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method. +type BackupPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.NewListPager method. +type BackupPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// BackupVaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginCreateOrUpdate +// method. +type BackupVaultsClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupVaultsClientBeginDeleteOptions contains the optional parameters for the BackupVaultsClient.BeginDelete method. +type BackupVaultsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupVaultsClientBeginUpdateOptions contains the optional parameters for the BackupVaultsClient.BeginUpdate method. +type BackupVaultsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupVaultsClientGetOptions contains the optional parameters for the BackupVaultsClient.Get method. +type BackupVaultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupVaultsClientListByNetAppAccountOptions contains the optional parameters for the BackupVaultsClient.NewListByNetAppAccountPager +// method. +type BackupVaultsClientListByNetAppAccountOptions struct { + // placeholder for future optional parameters +} + +// BackupsClientBeginCreateOptions contains the optional parameters for the BackupsClient.BeginCreate method. +type BackupsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupsClientBeginDeleteOptions contains the optional parameters for the BackupsClient.BeginDelete method. +type BackupsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupsClientBeginUpdateOptions contains the optional parameters for the BackupsClient.BeginUpdate method. +type BackupsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupsClientGetLatestStatusOptions contains the optional parameters for the BackupsClient.GetLatestStatus method. +type BackupsClientGetLatestStatusOptions struct { + // placeholder for future optional parameters +} + +// BackupsClientGetOptions contains the optional parameters for the BackupsClient.Get method. +type BackupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupsClientGetVolumeLatestRestoreStatusOptions contains the optional parameters for the BackupsClient.GetVolumeLatestRestoreStatus +// method. +type BackupsClientGetVolumeLatestRestoreStatusOptions struct { + // placeholder for future optional parameters +} + +// BackupsClientListByVaultOptions contains the optional parameters for the BackupsClient.NewListByVaultPager method. +type BackupsClientListByVaultOptions struct { + // An option to specify the VolumeResourceId. If present, then only returns the backups under the specified volume + Filter *string +} + +// BackupsUnderAccountClientBeginMigrateBackupsOptions contains the optional parameters for the BackupsUnderAccountClient.BeginMigrateBackups +// method. +type BackupsUnderAccountClientBeginMigrateBackupsOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupsUnderBackupVaultClientBeginRestoreFilesOptions contains the optional parameters for the BackupsUnderBackupVaultClient.BeginRestoreFiles +// method. +type BackupsUnderBackupVaultClientBeginRestoreFilesOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// BackupsUnderVolumeClientBeginMigrateBackupsOptions contains the optional parameters for the BackupsUnderVolumeClient.BeginMigrateBackups +// method. +type BackupsUnderVolumeClientBeginMigrateBackupsOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the PoolsClient.BeginCreateOrUpdate method. +type PoolsClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PoolsClientBeginDeleteOptions contains the optional parameters for the PoolsClient.BeginDelete method. +type PoolsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PoolsClientBeginUpdateOptions contains the optional parameters for the PoolsClient.BeginUpdate method. +type PoolsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PoolsClientGetOptions contains the optional parameters for the PoolsClient.Get method. +type PoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PoolsClientListOptions contains the optional parameters for the PoolsClient.NewListPager method. +type PoolsClientListOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientBeginUpdateNetworkSiblingSetOptions contains the optional parameters for the ResourceClient.BeginUpdateNetworkSiblingSet +// method. +type ResourceClientBeginUpdateNetworkSiblingSetOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ResourceClientCheckFilePathAvailabilityOptions contains the optional parameters for the ResourceClient.CheckFilePathAvailability +// method. +type ResourceClientCheckFilePathAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability +// method. +type ResourceClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientCheckQuotaAvailabilityOptions contains the optional parameters for the ResourceClient.CheckQuotaAvailability +// method. +type ResourceClientCheckQuotaAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientQueryNetworkSiblingSetOptions contains the optional parameters for the ResourceClient.QueryNetworkSiblingSet +// method. +type ResourceClientQueryNetworkSiblingSetOptions struct { + // placeholder for future optional parameters +} + +// ResourceClientQueryRegionInfoOptions contains the optional parameters for the ResourceClient.QueryRegionInfo method. +type ResourceClientQueryRegionInfoOptions struct { + // placeholder for future optional parameters +} + +// ResourceQuotaLimitsClientGetOptions contains the optional parameters for the ResourceQuotaLimitsClient.Get method. +type ResourceQuotaLimitsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceQuotaLimitsClientListOptions contains the optional parameters for the ResourceQuotaLimitsClient.NewListPager method. +type ResourceQuotaLimitsClientListOptions struct { + // placeholder for future optional parameters +} + +// ResourceRegionInfosClientGetOptions contains the optional parameters for the ResourceRegionInfosClient.Get method. +type ResourceRegionInfosClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceRegionInfosClientListOptions contains the optional parameters for the ResourceRegionInfosClient.NewListPager method. +type ResourceRegionInfosClientListOptions struct { + // placeholder for future optional parameters +} + +// ResourceUsagesClientGetOptions contains the optional parameters for the ResourceUsagesClient.Get method. +type ResourceUsagesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceUsagesClientListOptions contains the optional parameters for the ResourceUsagesClient.NewListPager method. +type ResourceUsagesClientListOptions struct { + // placeholder for future optional parameters +} + +// SnapshotPoliciesClientBeginDeleteOptions contains the optional parameters for the SnapshotPoliciesClient.BeginDelete method. +type SnapshotPoliciesClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// SnapshotPoliciesClientBeginUpdateOptions contains the optional parameters for the SnapshotPoliciesClient.BeginUpdate method. +type SnapshotPoliciesClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// SnapshotPoliciesClientCreateOptions contains the optional parameters for the SnapshotPoliciesClient.Create method. +type SnapshotPoliciesClientCreateOptions struct { + // placeholder for future optional parameters +} + +// SnapshotPoliciesClientGetOptions contains the optional parameters for the SnapshotPoliciesClient.Get method. +type SnapshotPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SnapshotPoliciesClientListOptions contains the optional parameters for the SnapshotPoliciesClient.NewListPager method. +type SnapshotPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// SnapshotPoliciesClientListVolumesOptions contains the optional parameters for the SnapshotPoliciesClient.ListVolumes method. +type SnapshotPoliciesClientListVolumesOptions struct { + // placeholder for future optional parameters +} + +// SnapshotsClientBeginCreateOptions contains the optional parameters for the SnapshotsClient.BeginCreate method. +type SnapshotsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// SnapshotsClientBeginDeleteOptions contains the optional parameters for the SnapshotsClient.BeginDelete method. +type SnapshotsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// SnapshotsClientBeginRestoreFilesOptions contains the optional parameters for the SnapshotsClient.BeginRestoreFiles method. +type SnapshotsClientBeginRestoreFilesOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// SnapshotsClientBeginUpdateOptions contains the optional parameters for the SnapshotsClient.BeginUpdate method. +type SnapshotsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// SnapshotsClientGetOptions contains the optional parameters for the SnapshotsClient.Get method. +type SnapshotsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.NewListPager method. +type SnapshotsClientListOptions struct { + // placeholder for future optional parameters +} + +// SubvolumesClientBeginCreateOptions contains the optional parameters for the SubvolumesClient.BeginCreate method. +type SubvolumesClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// SubvolumesClientBeginDeleteOptions contains the optional parameters for the SubvolumesClient.BeginDelete method. +type SubvolumesClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// SubvolumesClientBeginGetMetadataOptions contains the optional parameters for the SubvolumesClient.BeginGetMetadata method. +type SubvolumesClientBeginGetMetadataOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// SubvolumesClientBeginUpdateOptions contains the optional parameters for the SubvolumesClient.BeginUpdate method. +type SubvolumesClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// SubvolumesClientGetOptions contains the optional parameters for the SubvolumesClient.Get method. +type SubvolumesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SubvolumesClientListByVolumeOptions contains the optional parameters for the SubvolumesClient.NewListByVolumePager method. +type SubvolumesClientListByVolumeOptions struct { + // placeholder for future optional parameters +} + +// VolumeGroupsClientBeginCreateOptions contains the optional parameters for the VolumeGroupsClient.BeginCreate method. +type VolumeGroupsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumeGroupsClientBeginDeleteOptions contains the optional parameters for the VolumeGroupsClient.BeginDelete method. +type VolumeGroupsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumeGroupsClientGetOptions contains the optional parameters for the VolumeGroupsClient.Get method. +type VolumeGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VolumeGroupsClientListByNetAppAccountOptions contains the optional parameters for the VolumeGroupsClient.NewListByNetAppAccountPager +// method. +type VolumeGroupsClientListByNetAppAccountOptions struct { + // placeholder for future optional parameters +} + +// VolumeQuotaRulesClientBeginCreateOptions contains the optional parameters for the VolumeQuotaRulesClient.BeginCreate method. +type VolumeQuotaRulesClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumeQuotaRulesClientBeginDeleteOptions contains the optional parameters for the VolumeQuotaRulesClient.BeginDelete method. +type VolumeQuotaRulesClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumeQuotaRulesClientBeginUpdateOptions contains the optional parameters for the VolumeQuotaRulesClient.BeginUpdate method. +type VolumeQuotaRulesClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumeQuotaRulesClientGetOptions contains the optional parameters for the VolumeQuotaRulesClient.Get method. +type VolumeQuotaRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// VolumeQuotaRulesClientListByVolumeOptions contains the optional parameters for the VolumeQuotaRulesClient.NewListByVolumePager +// method. +type VolumeQuotaRulesClientListByVolumeOptions struct { + // placeholder for future optional parameters +} + +// VolumesClientBeginAuthorizeExternalReplicationOptions contains the optional parameters for the VolumesClient.BeginAuthorizeExternalReplication +// method. +type VolumesClientBeginAuthorizeExternalReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginAuthorizeReplicationOptions contains the optional parameters for the VolumesClient.BeginAuthorizeReplication +// method. +type VolumesClientBeginAuthorizeReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginBreakFileLocksOptions contains the optional parameters for the VolumesClient.BeginBreakFileLocks method. +type VolumesClientBeginBreakFileLocksOptions struct { + // Optional body to provide the ability to clear file locks with selected options + Body *BreakFileLocksRequest + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginBreakReplicationOptions contains the optional parameters for the VolumesClient.BeginBreakReplication +// method. +type VolumesClientBeginBreakReplicationOptions struct { + // Optional body to force break the replication. + Body *BreakReplicationRequest + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginCreateOrUpdateOptions contains the optional parameters for the VolumesClient.BeginCreateOrUpdate method. +type VolumesClientBeginCreateOrUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginDeleteOptions contains the optional parameters for the VolumesClient.BeginDelete method. +type VolumesClientBeginDeleteOptions struct { + // An option to force delete the volume. Will cleanup resources connected to the particular volume + ForceDelete *bool + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginDeleteReplicationOptions contains the optional parameters for the VolumesClient.BeginDeleteReplication +// method. +type VolumesClientBeginDeleteReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginFinalizeExternalReplicationOptions contains the optional parameters for the VolumesClient.BeginFinalizeExternalReplication +// method. +type VolumesClientBeginFinalizeExternalReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginFinalizeRelocationOptions contains the optional parameters for the VolumesClient.BeginFinalizeRelocation +// method. +type VolumesClientBeginFinalizeRelocationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginListGetGroupIDListForLdapUserOptions contains the optional parameters for the VolumesClient.BeginListGetGroupIDListForLdapUser +// method. +type VolumesClientBeginListGetGroupIDListForLdapUserOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginPeerExternalClusterOptions contains the optional parameters for the VolumesClient.BeginPeerExternalCluster +// method. +type VolumesClientBeginPeerExternalClusterOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginPerformReplicationTransferOptions contains the optional parameters for the VolumesClient.BeginPerformReplicationTransfer +// method. +type VolumesClientBeginPerformReplicationTransferOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginPoolChangeOptions contains the optional parameters for the VolumesClient.BeginPoolChange method. +type VolumesClientBeginPoolChangeOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginPopulateAvailabilityZoneOptions contains the optional parameters for the VolumesClient.BeginPopulateAvailabilityZone +// method. +type VolumesClientBeginPopulateAvailabilityZoneOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginReInitializeReplicationOptions contains the optional parameters for the VolumesClient.BeginReInitializeReplication +// method. +type VolumesClientBeginReInitializeReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginReestablishReplicationOptions contains the optional parameters for the VolumesClient.BeginReestablishReplication +// method. +type VolumesClientBeginReestablishReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginRelocateOptions contains the optional parameters for the VolumesClient.BeginRelocate method. +type VolumesClientBeginRelocateOptions struct { + // Relocate volume request + Body *RelocateVolumeRequest + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginResetCifsPasswordOptions contains the optional parameters for the VolumesClient.BeginResetCifsPassword +// method. +type VolumesClientBeginResetCifsPasswordOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginResyncReplicationOptions contains the optional parameters for the VolumesClient.BeginResyncReplication +// method. +type VolumesClientBeginResyncReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginRevertOptions contains the optional parameters for the VolumesClient.BeginRevert method. +type VolumesClientBeginRevertOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginRevertRelocationOptions contains the optional parameters for the VolumesClient.BeginRevertRelocation +// method. +type VolumesClientBeginRevertRelocationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientBeginUpdateOptions contains the optional parameters for the VolumesClient.BeginUpdate method. +type VolumesClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// VolumesClientGetOptions contains the optional parameters for the VolumesClient.Get method. +type VolumesClientGetOptions struct { + // placeholder for future optional parameters +} + +// VolumesClientListOptions contains the optional parameters for the VolumesClient.NewListPager method. +type VolumesClientListOptions struct { + // placeholder for future optional parameters +} + +// VolumesClientListReplicationsOptions contains the optional parameters for the VolumesClient.NewListReplicationsPager method. +type VolumesClientListReplicationsOptions struct { + // placeholder for future optional parameters +} + +// VolumesClientReplicationStatusOptions contains the optional parameters for the VolumesClient.ReplicationStatus method. +type VolumesClientReplicationStatusOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/pools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/pools_client.go new file mode 100644 index 00000000..553a45a5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/pools_client.go @@ -0,0 +1,426 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PoolsClient contains the methods for the Pools group. +// Don't use this type directly, use NewPoolsClient() instead. +type PoolsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPoolsClient creates a new instance of PoolsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PoolsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PoolsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or Update a capacity pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - body - Capacity pool object supplied in the body of the operation. +// - options - PoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the PoolsClient.BeginCreateOrUpdate +// method. +func (client *PoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPool, options *PoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PoolsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, accountName, poolName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PoolsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or Update a capacity pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *PoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPool, options *PoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PoolsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, poolName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PoolsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPool, _ *PoolsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the specified capacity pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - options - PoolsClientBeginDeleteOptions contains the optional parameters for the PoolsClient.BeginDelete method. +func (client *PoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolsClientBeginDeleteOptions) (*runtime.Poller[PoolsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PoolsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the specified capacity pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *PoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PoolsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PoolsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, _ *PoolsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get details of the specified capacity pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - options - PoolsClientGetOptions contains the optional parameters for the PoolsClient.Get method. +func (client *PoolsClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolsClientGetOptions) (PoolsClientGetResponse, error) { + var err error + const operationName = "PoolsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, options) + if err != nil { + return PoolsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PoolsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PoolsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PoolsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, _ *PoolsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PoolsClient) getHandleResponse(resp *http.Response) (PoolsClientGetResponse, error) { + result := PoolsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CapacityPool); err != nil { + return PoolsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all capacity pools in the NetApp Account +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - PoolsClientListOptions contains the optional parameters for the PoolsClient.NewListPager method. +func (client *PoolsClient) NewListPager(resourceGroupName string, accountName string, options *PoolsClientListOptions) *runtime.Pager[PoolsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PoolsClientListResponse]{ + More: func(page PoolsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PoolsClientListResponse) (PoolsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PoolsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, accountName, options) + }, nil) + if err != nil { + return PoolsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PoolsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *PoolsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PoolsClient) listHandleResponse(resp *http.Response) (PoolsClientListResponse, error) { + result := PoolsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CapacityPoolList); err != nil { + return PoolsClientListResponse{}, err + } + return result, nil +} + +// BeginUpdate - Patch the specified capacity pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - body - Capacity pool object supplied in the body of the operation. +// - options - PoolsClientBeginUpdateOptions contains the optional parameters for the PoolsClient.BeginUpdate method. +func (client *PoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPoolPatch, options *PoolsClientBeginUpdateOptions) (*runtime.Poller[PoolsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, poolName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PoolsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PoolsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch the specified capacity pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *PoolsClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPoolPatch, options *PoolsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PoolsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *PoolsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPoolPatch, _ *PoolsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resource_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resource_client.go new file mode 100644 index 00000000..a3c2fe42 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resource_client.go @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ResourceClient contains the methods for the NetAppResource group. +// Don't use this type directly, use NewResourceClient() instead. +type ResourceClient struct { + internal *arm.Client + subscriptionID string +} + +// NewResourceClient creates a new instance of ResourceClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ResourceClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckFilePathAvailability - Check if a file path is available. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - body - File path availability request. +// - options - ResourceClientCheckFilePathAvailabilityOptions contains the optional parameters for the ResourceClient.CheckFilePathAvailability +// method. +func (client *ResourceClient) CheckFilePathAvailability(ctx context.Context, location string, body FilePathAvailabilityRequest, options *ResourceClientCheckFilePathAvailabilityOptions) (ResourceClientCheckFilePathAvailabilityResponse, error) { + var err error + const operationName = "ResourceClient.CheckFilePathAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkFilePathAvailabilityCreateRequest(ctx, location, body, options) + if err != nil { + return ResourceClientCheckFilePathAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceClientCheckFilePathAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientCheckFilePathAvailabilityResponse{}, err + } + resp, err := client.checkFilePathAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkFilePathAvailabilityCreateRequest creates the CheckFilePathAvailability request. +func (client *ResourceClient) checkFilePathAvailabilityCreateRequest(ctx context.Context, location string, body FilePathAvailabilityRequest, _ *ResourceClientCheckFilePathAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// checkFilePathAvailabilityHandleResponse handles the CheckFilePathAvailability response. +func (client *ResourceClient) checkFilePathAvailabilityHandleResponse(resp *http.Response) (ResourceClientCheckFilePathAvailabilityResponse, error) { + result := ResourceClientCheckFilePathAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckAvailabilityResponse); err != nil { + return ResourceClientCheckFilePathAvailabilityResponse{}, err + } + return result, nil +} + +// CheckNameAvailability - Check if a resource name is available. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - body - Name availability request. +// - options - ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability +// method. +func (client *ResourceClient) CheckNameAvailability(ctx context.Context, location string, body ResourceNameAvailabilityRequest, options *ResourceClientCheckNameAvailabilityOptions) (ResourceClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "ResourceClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkNameAvailabilityCreateRequest(ctx, location, body, options) + if err != nil { + return ResourceClientCheckNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceClientCheckNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientCheckNameAvailabilityResponse{}, err + } + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. +func (client *ResourceClient) checkNameAvailabilityCreateRequest(ctx context.Context, location string, body ResourceNameAvailabilityRequest, _ *ResourceClientCheckNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. +func (client *ResourceClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ResourceClientCheckNameAvailabilityResponse, error) { + result := ResourceClientCheckNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckAvailabilityResponse); err != nil { + return ResourceClientCheckNameAvailabilityResponse{}, err + } + return result, nil +} + +// CheckQuotaAvailability - Check if a quota is available. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - body - Quota availability request. +// - options - ResourceClientCheckQuotaAvailabilityOptions contains the optional parameters for the ResourceClient.CheckQuotaAvailability +// method. +func (client *ResourceClient) CheckQuotaAvailability(ctx context.Context, location string, body QuotaAvailabilityRequest, options *ResourceClientCheckQuotaAvailabilityOptions) (ResourceClientCheckQuotaAvailabilityResponse, error) { + var err error + const operationName = "ResourceClient.CheckQuotaAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkQuotaAvailabilityCreateRequest(ctx, location, body, options) + if err != nil { + return ResourceClientCheckQuotaAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceClientCheckQuotaAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientCheckQuotaAvailabilityResponse{}, err + } + resp, err := client.checkQuotaAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkQuotaAvailabilityCreateRequest creates the CheckQuotaAvailability request. +func (client *ResourceClient) checkQuotaAvailabilityCreateRequest(ctx context.Context, location string, body QuotaAvailabilityRequest, _ *ResourceClientCheckQuotaAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// checkQuotaAvailabilityHandleResponse handles the CheckQuotaAvailability response. +func (client *ResourceClient) checkQuotaAvailabilityHandleResponse(resp *http.Response) (ResourceClientCheckQuotaAvailabilityResponse, error) { + result := ResourceClientCheckQuotaAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckAvailabilityResponse); err != nil { + return ResourceClientCheckQuotaAvailabilityResponse{}, err + } + return result, nil +} + +// QueryNetworkSiblingSet - Get details of the specified network sibling set. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - body - Network sibling set to query. +// - options - ResourceClientQueryNetworkSiblingSetOptions contains the optional parameters for the ResourceClient.QueryNetworkSiblingSet +// method. +func (client *ResourceClient) QueryNetworkSiblingSet(ctx context.Context, location string, body QueryNetworkSiblingSetRequest, options *ResourceClientQueryNetworkSiblingSetOptions) (ResourceClientQueryNetworkSiblingSetResponse, error) { + var err error + const operationName = "ResourceClient.QueryNetworkSiblingSet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.queryNetworkSiblingSetCreateRequest(ctx, location, body, options) + if err != nil { + return ResourceClientQueryNetworkSiblingSetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceClientQueryNetworkSiblingSetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientQueryNetworkSiblingSetResponse{}, err + } + resp, err := client.queryNetworkSiblingSetHandleResponse(httpResp) + return resp, err +} + +// queryNetworkSiblingSetCreateRequest creates the QueryNetworkSiblingSet request. +func (client *ResourceClient) queryNetworkSiblingSetCreateRequest(ctx context.Context, location string, body QueryNetworkSiblingSetRequest, _ *ResourceClientQueryNetworkSiblingSetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/queryNetworkSiblingSet" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// queryNetworkSiblingSetHandleResponse handles the QueryNetworkSiblingSet response. +func (client *ResourceClient) queryNetworkSiblingSetHandleResponse(resp *http.Response) (ResourceClientQueryNetworkSiblingSetResponse, error) { + result := ResourceClientQueryNetworkSiblingSetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkSiblingSet); err != nil { + return ResourceClientQueryNetworkSiblingSetResponse{}, err + } + return result, nil +} + +// QueryRegionInfo - Provides storage to network proximity and logical zone mapping information. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - options - ResourceClientQueryRegionInfoOptions contains the optional parameters for the ResourceClient.QueryRegionInfo +// method. +func (client *ResourceClient) QueryRegionInfo(ctx context.Context, location string, options *ResourceClientQueryRegionInfoOptions) (ResourceClientQueryRegionInfoResponse, error) { + var err error + const operationName = "ResourceClient.QueryRegionInfo" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.queryRegionInfoCreateRequest(ctx, location, options) + if err != nil { + return ResourceClientQueryRegionInfoResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceClientQueryRegionInfoResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceClientQueryRegionInfoResponse{}, err + } + resp, err := client.queryRegionInfoHandleResponse(httpResp) + return resp, err +} + +// queryRegionInfoCreateRequest creates the QueryRegionInfo request. +func (client *ResourceClient) queryRegionInfoCreateRequest(ctx context.Context, location string, _ *ResourceClientQueryRegionInfoOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfo" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// queryRegionInfoHandleResponse handles the QueryRegionInfo response. +func (client *ResourceClient) queryRegionInfoHandleResponse(resp *http.Response) (ResourceClientQueryRegionInfoResponse, error) { + result := ResourceClientQueryRegionInfoResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegionInfo); err != nil { + return ResourceClientQueryRegionInfoResponse{}, err + } + return result, nil +} + +// BeginUpdateNetworkSiblingSet - Update the network features of the specified network sibling set. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - body - Update for the specified network sibling set. +// - options - ResourceClientBeginUpdateNetworkSiblingSetOptions contains the optional parameters for the ResourceClient.BeginUpdateNetworkSiblingSet +// method. +func (client *ResourceClient) BeginUpdateNetworkSiblingSet(ctx context.Context, location string, body UpdateNetworkSiblingSetRequest, options *ResourceClientBeginUpdateNetworkSiblingSetOptions) (*runtime.Poller[ResourceClientUpdateNetworkSiblingSetResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateNetworkSiblingSet(ctx, location, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ResourceClientUpdateNetworkSiblingSetResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ResourceClientUpdateNetworkSiblingSetResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateNetworkSiblingSet - Update the network features of the specified network sibling set. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ResourceClient) updateNetworkSiblingSet(ctx context.Context, location string, body UpdateNetworkSiblingSetRequest, options *ResourceClientBeginUpdateNetworkSiblingSetOptions) (*http.Response, error) { + var err error + const operationName = "ResourceClient.BeginUpdateNetworkSiblingSet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateNetworkSiblingSetCreateRequest(ctx, location, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateNetworkSiblingSetCreateRequest creates the UpdateNetworkSiblingSet request. +func (client *ResourceClient) updateNetworkSiblingSetCreateRequest(ctx context.Context, location string, body UpdateNetworkSiblingSetRequest, _ *ResourceClientBeginUpdateNetworkSiblingSetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/updateNetworkSiblingSet" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resourcequotalimits_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resourcequotalimits_client.go new file mode 100644 index 00000000..7ffbecf9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resourcequotalimits_client.go @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ResourceQuotaLimitsClient contains the methods for the NetAppResourceQuotaLimits group. +// Don't use this type directly, use NewResourceQuotaLimitsClient() instead. +type ResourceQuotaLimitsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewResourceQuotaLimitsClient creates a new instance of ResourceQuotaLimitsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewResourceQuotaLimitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceQuotaLimitsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ResourceQuotaLimitsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get the default and current subscription quota limit +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - quotaLimitName - The name of the Quota Limit +// - options - ResourceQuotaLimitsClientGetOptions contains the optional parameters for the ResourceQuotaLimitsClient.Get method. +func (client *ResourceQuotaLimitsClient) Get(ctx context.Context, location string, quotaLimitName string, options *ResourceQuotaLimitsClientGetOptions) (ResourceQuotaLimitsClientGetResponse, error) { + var err error + const operationName = "ResourceQuotaLimitsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, quotaLimitName, options) + if err != nil { + return ResourceQuotaLimitsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceQuotaLimitsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceQuotaLimitsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ResourceQuotaLimitsClient) getCreateRequest(ctx context.Context, location string, quotaLimitName string, _ *ResourceQuotaLimitsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if quotaLimitName == "" { + return nil, errors.New("parameter quotaLimitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{quotaLimitName}", url.PathEscape(quotaLimitName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ResourceQuotaLimitsClient) getHandleResponse(resp *http.Response) (ResourceQuotaLimitsClientGetResponse, error) { + result := ResourceQuotaLimitsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionQuotaItem); err != nil { + return ResourceQuotaLimitsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Get the default and current limits for quotas +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - options - ResourceQuotaLimitsClientListOptions contains the optional parameters for the ResourceQuotaLimitsClient.NewListPager +// method. +func (client *ResourceQuotaLimitsClient) NewListPager(location string, options *ResourceQuotaLimitsClientListOptions) *runtime.Pager[ResourceQuotaLimitsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceQuotaLimitsClientListResponse]{ + More: func(page ResourceQuotaLimitsClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ResourceQuotaLimitsClientListResponse) (ResourceQuotaLimitsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceQuotaLimitsClient.NewListPager") + req, err := client.listCreateRequest(ctx, location, options) + if err != nil { + return ResourceQuotaLimitsClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceQuotaLimitsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ResourceQuotaLimitsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ResourceQuotaLimitsClient) listCreateRequest(ctx context.Context, location string, _ *ResourceQuotaLimitsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ResourceQuotaLimitsClient) listHandleResponse(resp *http.Response) (ResourceQuotaLimitsClientListResponse, error) { + result := ResourceQuotaLimitsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionQuotaItemList); err != nil { + return ResourceQuotaLimitsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resourceregioninfos_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resourceregioninfos_client.go new file mode 100644 index 00000000..8dbf2e22 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resourceregioninfos_client.go @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ResourceRegionInfosClient contains the methods for the NetAppResourceRegionInfos group. +// Don't use this type directly, use NewResourceRegionInfosClient() instead. +type ResourceRegionInfosClient struct { + internal *arm.Client + subscriptionID string +} + +// NewResourceRegionInfosClient creates a new instance of ResourceRegionInfosClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewResourceRegionInfosClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceRegionInfosClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ResourceRegionInfosClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Provides storage to network proximity and logical zone mapping information. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - options - ResourceRegionInfosClientGetOptions contains the optional parameters for the ResourceRegionInfosClient.Get method. +func (client *ResourceRegionInfosClient) Get(ctx context.Context, location string, options *ResourceRegionInfosClientGetOptions) (ResourceRegionInfosClientGetResponse, error) { + var err error + const operationName = "ResourceRegionInfosClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, options) + if err != nil { + return ResourceRegionInfosClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceRegionInfosClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceRegionInfosClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ResourceRegionInfosClient) getCreateRequest(ctx context.Context, location string, _ *ResourceRegionInfosClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ResourceRegionInfosClient) getHandleResponse(resp *http.Response) (ResourceRegionInfosClientGetResponse, error) { + result := ResourceRegionInfosClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegionInfoResource); err != nil { + return ResourceRegionInfosClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Provides region specific information. +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - options - ResourceRegionInfosClientListOptions contains the optional parameters for the ResourceRegionInfosClient.NewListPager +// method. +func (client *ResourceRegionInfosClient) NewListPager(location string, options *ResourceRegionInfosClientListOptions) *runtime.Pager[ResourceRegionInfosClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceRegionInfosClientListResponse]{ + More: func(page ResourceRegionInfosClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceRegionInfosClientListResponse) (ResourceRegionInfosClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceRegionInfosClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return ResourceRegionInfosClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ResourceRegionInfosClient) listCreateRequest(ctx context.Context, location string, _ *ResourceRegionInfosClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ResourceRegionInfosClient) listHandleResponse(resp *http.Response) (ResourceRegionInfosClientListResponse, error) { + result := ResourceRegionInfosClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegionInfosList); err != nil { + return ResourceRegionInfosClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resourceusages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resourceusages_client.go new file mode 100644 index 00000000..bc1ed6ee --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/resourceusages_client.go @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ResourceUsagesClient contains the methods for the NetAppResourceUsages group. +// Don't use this type directly, use NewResourceUsagesClient() instead. +type ResourceUsagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewResourceUsagesClient creates a new instance of ResourceUsagesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewResourceUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceUsagesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ResourceUsagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get current subscription usage of the specific type +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - usageType - The type of usage +// - options - ResourceUsagesClientGetOptions contains the optional parameters for the ResourceUsagesClient.Get method. +func (client *ResourceUsagesClient) Get(ctx context.Context, location string, usageType string, options *ResourceUsagesClientGetOptions) (ResourceUsagesClientGetResponse, error) { + var err error + const operationName = "ResourceUsagesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, usageType, options) + if err != nil { + return ResourceUsagesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceUsagesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceUsagesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ResourceUsagesClient) getCreateRequest(ctx context.Context, location string, usageType string, _ *ResourceUsagesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/usages/{usageType}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if usageType == "" { + return nil, errors.New("parameter usageType cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{usageType}", url.PathEscape(usageType)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ResourceUsagesClient) getHandleResponse(resp *http.Response) (ResourceUsagesClientGetResponse, error) { + result := ResourceUsagesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UsageResult); err != nil { + return ResourceUsagesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Get current subscription usages +// +// Generated from API version 2025-01-01 +// - location - The name of the Azure region. +// - options - ResourceUsagesClientListOptions contains the optional parameters for the ResourceUsagesClient.NewListPager method. +func (client *ResourceUsagesClient) NewListPager(location string, options *ResourceUsagesClientListOptions) *runtime.Pager[ResourceUsagesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceUsagesClientListResponse]{ + More: func(page ResourceUsagesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceUsagesClientListResponse) (ResourceUsagesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceUsagesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return ResourceUsagesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ResourceUsagesClient) listCreateRequest(ctx context.Context, location string, _ *ResourceUsagesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/usages" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ResourceUsagesClient) listHandleResponse(resp *http.Response) (ResourceUsagesClientListResponse, error) { + result := ResourceUsagesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UsagesListResult); err != nil { + return ResourceUsagesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/responses.go new file mode 100644 index 00000000..b4eb9752 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/responses.go @@ -0,0 +1,580 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +// AccountsClientChangeKeyVaultResponse contains the response from method AccountsClient.BeginChangeKeyVault. +type AccountsClientChangeKeyVaultResponse struct { + // placeholder for future response values +} + +// AccountsClientCreateOrUpdateResponse contains the response from method AccountsClient.BeginCreateOrUpdate. +type AccountsClientCreateOrUpdateResponse struct { + // NetApp account resource + Account +} + +// AccountsClientDeleteResponse contains the response from method AccountsClient.BeginDelete. +type AccountsClientDeleteResponse struct { + // placeholder for future response values +} + +// AccountsClientGetChangeKeyVaultInformationResponse contains the response from method AccountsClient.BeginGetChangeKeyVaultInformation. +type AccountsClientGetChangeKeyVaultInformationResponse struct { + // Result of getKeyVaultStatus with information about how volumes under NetApp account are encrypted. + GetKeyVaultStatusResponse +} + +// AccountsClientGetResponse contains the response from method AccountsClient.Get. +type AccountsClientGetResponse struct { + // NetApp account resource + Account +} + +// AccountsClientListBySubscriptionResponse contains the response from method AccountsClient.NewListBySubscriptionPager. +type AccountsClientListBySubscriptionResponse struct { + // List of NetApp account resources + AccountList +} + +// AccountsClientListResponse contains the response from method AccountsClient.NewListPager. +type AccountsClientListResponse struct { + // List of NetApp account resources + AccountList +} + +// AccountsClientRenewCredentialsResponse contains the response from method AccountsClient.BeginRenewCredentials. +type AccountsClientRenewCredentialsResponse struct { + // placeholder for future response values +} + +// AccountsClientTransitionToCmkResponse contains the response from method AccountsClient.BeginTransitionToCmk. +type AccountsClientTransitionToCmkResponse struct { + // placeholder for future response values +} + +// AccountsClientUpdateResponse contains the response from method AccountsClient.BeginUpdate. +type AccountsClientUpdateResponse struct { + // NetApp account resource + Account +} + +// BackupPoliciesClientCreateResponse contains the response from method BackupPoliciesClient.BeginCreate. +type BackupPoliciesClientCreateResponse struct { + // Backup policy information + BackupPolicy +} + +// BackupPoliciesClientDeleteResponse contains the response from method BackupPoliciesClient.BeginDelete. +type BackupPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// BackupPoliciesClientGetResponse contains the response from method BackupPoliciesClient.Get. +type BackupPoliciesClientGetResponse struct { + // Backup policy information + BackupPolicy +} + +// BackupPoliciesClientListResponse contains the response from method BackupPoliciesClient.NewListPager. +type BackupPoliciesClientListResponse struct { + // List of Backup Policies + BackupPoliciesList +} + +// BackupPoliciesClientUpdateResponse contains the response from method BackupPoliciesClient.BeginUpdate. +type BackupPoliciesClientUpdateResponse struct { + // Backup policy information + BackupPolicy +} + +// BackupVaultsClientCreateOrUpdateResponse contains the response from method BackupVaultsClient.BeginCreateOrUpdate. +type BackupVaultsClientCreateOrUpdateResponse struct { + // Backup Vault information + BackupVault +} + +// BackupVaultsClientDeleteResponse contains the response from method BackupVaultsClient.BeginDelete. +type BackupVaultsClientDeleteResponse struct { + // placeholder for future response values +} + +// BackupVaultsClientGetResponse contains the response from method BackupVaultsClient.Get. +type BackupVaultsClientGetResponse struct { + // Backup Vault information + BackupVault +} + +// BackupVaultsClientListByNetAppAccountResponse contains the response from method BackupVaultsClient.NewListByNetAppAccountPager. +type BackupVaultsClientListByNetAppAccountResponse struct { + // List of Backup Vaults + BackupVaultsList +} + +// BackupVaultsClientUpdateResponse contains the response from method BackupVaultsClient.BeginUpdate. +type BackupVaultsClientUpdateResponse struct { + // Backup Vault information + BackupVault +} + +// BackupsClientCreateResponse contains the response from method BackupsClient.BeginCreate. +type BackupsClientCreateResponse struct { + // Backup under a Backup Vault + Backup +} + +// BackupsClientDeleteResponse contains the response from method BackupsClient.BeginDelete. +type BackupsClientDeleteResponse struct { + // placeholder for future response values +} + +// BackupsClientGetLatestStatusResponse contains the response from method BackupsClient.GetLatestStatus. +type BackupsClientGetLatestStatusResponse struct { + // Backup status + BackupStatus +} + +// BackupsClientGetResponse contains the response from method BackupsClient.Get. +type BackupsClientGetResponse struct { + // Backup under a Backup Vault + Backup +} + +// BackupsClientGetVolumeLatestRestoreStatusResponse contains the response from method BackupsClient.GetVolumeLatestRestoreStatus. +type BackupsClientGetVolumeLatestRestoreStatusResponse struct { + // Restore status + RestoreStatus +} + +// BackupsClientListByVaultResponse contains the response from method BackupsClient.NewListByVaultPager. +type BackupsClientListByVaultResponse struct { + // List of Backups + BackupsList +} + +// BackupsClientUpdateResponse contains the response from method BackupsClient.BeginUpdate. +type BackupsClientUpdateResponse struct { + // Backup under a Backup Vault + Backup +} + +// BackupsUnderAccountClientMigrateBackupsResponse contains the response from method BackupsUnderAccountClient.BeginMigrateBackups. +type BackupsUnderAccountClientMigrateBackupsResponse struct { + // placeholder for future response values +} + +// BackupsUnderBackupVaultClientRestoreFilesResponse contains the response from method BackupsUnderBackupVaultClient.BeginRestoreFiles. +type BackupsUnderBackupVaultClientRestoreFilesResponse struct { + // placeholder for future response values +} + +// BackupsUnderVolumeClientMigrateBackupsResponse contains the response from method BackupsUnderVolumeClient.BeginMigrateBackups. +type BackupsUnderVolumeClientMigrateBackupsResponse struct { + // placeholder for future response values +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Result of the request to list Cloud Volume operations. It contains a list of operations and a URL link to get the next + // set of results. + OperationListResult +} + +// PoolsClientCreateOrUpdateResponse contains the response from method PoolsClient.BeginCreateOrUpdate. +type PoolsClientCreateOrUpdateResponse struct { + // Capacity pool resource + CapacityPool +} + +// PoolsClientDeleteResponse contains the response from method PoolsClient.BeginDelete. +type PoolsClientDeleteResponse struct { + // placeholder for future response values +} + +// PoolsClientGetResponse contains the response from method PoolsClient.Get. +type PoolsClientGetResponse struct { + // Capacity pool resource + CapacityPool +} + +// PoolsClientListResponse contains the response from method PoolsClient.NewListPager. +type PoolsClientListResponse struct { + // List of capacity pool resources + CapacityPoolList +} + +// PoolsClientUpdateResponse contains the response from method PoolsClient.BeginUpdate. +type PoolsClientUpdateResponse struct { + // Capacity pool resource + CapacityPool +} + +// ResourceClientCheckFilePathAvailabilityResponse contains the response from method ResourceClient.CheckFilePathAvailability. +type ResourceClientCheckFilePathAvailabilityResponse struct { + // Information regarding availability of a resource. + CheckAvailabilityResponse +} + +// ResourceClientCheckNameAvailabilityResponse contains the response from method ResourceClient.CheckNameAvailability. +type ResourceClientCheckNameAvailabilityResponse struct { + // Information regarding availability of a resource. + CheckAvailabilityResponse +} + +// ResourceClientCheckQuotaAvailabilityResponse contains the response from method ResourceClient.CheckQuotaAvailability. +type ResourceClientCheckQuotaAvailabilityResponse struct { + // Information regarding availability of a resource. + CheckAvailabilityResponse +} + +// ResourceClientQueryNetworkSiblingSetResponse contains the response from method ResourceClient.QueryNetworkSiblingSet. +type ResourceClientQueryNetworkSiblingSetResponse struct { + // Describes the contents of a network sibling set. + NetworkSiblingSet +} + +// ResourceClientQueryRegionInfoResponse contains the response from method ResourceClient.QueryRegionInfo. +type ResourceClientQueryRegionInfoResponse struct { + // Provides region specific information. + RegionInfo +} + +// ResourceClientUpdateNetworkSiblingSetResponse contains the response from method ResourceClient.BeginUpdateNetworkSiblingSet. +type ResourceClientUpdateNetworkSiblingSetResponse struct { + // Describes the contents of a network sibling set. + NetworkSiblingSet +} + +// ResourceQuotaLimitsClientGetResponse contains the response from method ResourceQuotaLimitsClient.Get. +type ResourceQuotaLimitsClientGetResponse struct { + // Information regarding Subscription Quota Item. + SubscriptionQuotaItem +} + +// ResourceQuotaLimitsClientListResponse contains the response from method ResourceQuotaLimitsClient.NewListPager. +type ResourceQuotaLimitsClientListResponse struct { + // List of Subscription Quota Items + SubscriptionQuotaItemList +} + +// ResourceRegionInfosClientGetResponse contains the response from method ResourceRegionInfosClient.Get. +type ResourceRegionInfosClientGetResponse struct { + // Information regarding regionInfo Item. + RegionInfoResource +} + +// ResourceRegionInfosClientListResponse contains the response from method ResourceRegionInfosClient.NewListPager. +type ResourceRegionInfosClientListResponse struct { + // List of regionInfo resources + RegionInfosList +} + +// ResourceUsagesClientGetResponse contains the response from method ResourceUsagesClient.Get. +type ResourceUsagesClientGetResponse struct { + // Usages entity model + UsageResult +} + +// ResourceUsagesClientListResponse contains the response from method ResourceUsagesClient.NewListPager. +type ResourceUsagesClientListResponse struct { + // Usages result + UsagesListResult +} + +// SnapshotPoliciesClientCreateResponse contains the response from method SnapshotPoliciesClient.Create. +type SnapshotPoliciesClientCreateResponse struct { + // Snapshot policy information + SnapshotPolicy +} + +// SnapshotPoliciesClientDeleteResponse contains the response from method SnapshotPoliciesClient.BeginDelete. +type SnapshotPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// SnapshotPoliciesClientGetResponse contains the response from method SnapshotPoliciesClient.Get. +type SnapshotPoliciesClientGetResponse struct { + // Snapshot policy information + SnapshotPolicy +} + +// SnapshotPoliciesClientListResponse contains the response from method SnapshotPoliciesClient.NewListPager. +type SnapshotPoliciesClientListResponse struct { + // List of Snapshot Policies + SnapshotPoliciesList +} + +// SnapshotPoliciesClientListVolumesResponse contains the response from method SnapshotPoliciesClient.ListVolumes. +type SnapshotPoliciesClientListVolumesResponse struct { + // Volumes associated with snapshot policy + SnapshotPolicyVolumeList +} + +// SnapshotPoliciesClientUpdateResponse contains the response from method SnapshotPoliciesClient.BeginUpdate. +type SnapshotPoliciesClientUpdateResponse struct { + // Snapshot policy information + SnapshotPolicy +} + +// SnapshotsClientCreateResponse contains the response from method SnapshotsClient.BeginCreate. +type SnapshotsClientCreateResponse struct { + // Snapshot of a Volume + Snapshot +} + +// SnapshotsClientDeleteResponse contains the response from method SnapshotsClient.BeginDelete. +type SnapshotsClientDeleteResponse struct { + // placeholder for future response values +} + +// SnapshotsClientGetResponse contains the response from method SnapshotsClient.Get. +type SnapshotsClientGetResponse struct { + // Snapshot of a Volume + Snapshot +} + +// SnapshotsClientListResponse contains the response from method SnapshotsClient.NewListPager. +type SnapshotsClientListResponse struct { + // List of Snapshots + SnapshotsList +} + +// SnapshotsClientRestoreFilesResponse contains the response from method SnapshotsClient.BeginRestoreFiles. +type SnapshotsClientRestoreFilesResponse struct { + // placeholder for future response values +} + +// SnapshotsClientUpdateResponse contains the response from method SnapshotsClient.BeginUpdate. +type SnapshotsClientUpdateResponse struct { + // Snapshot of a Volume + Snapshot +} + +// SubvolumesClientCreateResponse contains the response from method SubvolumesClient.BeginCreate. +type SubvolumesClientCreateResponse struct { + // Subvolume Information properties + SubvolumeInfo +} + +// SubvolumesClientDeleteResponse contains the response from method SubvolumesClient.BeginDelete. +type SubvolumesClientDeleteResponse struct { + // placeholder for future response values +} + +// SubvolumesClientGetMetadataResponse contains the response from method SubvolumesClient.BeginGetMetadata. +type SubvolumesClientGetMetadataResponse struct { + // Result of the post subvolume and action is to get metadata of the subvolume. + SubvolumeModel +} + +// SubvolumesClientGetResponse contains the response from method SubvolumesClient.Get. +type SubvolumesClientGetResponse struct { + // Subvolume Information properties + SubvolumeInfo +} + +// SubvolumesClientListByVolumeResponse contains the response from method SubvolumesClient.NewListByVolumePager. +type SubvolumesClientListByVolumeResponse struct { + // List of Subvolumes + SubvolumesList +} + +// SubvolumesClientUpdateResponse contains the response from method SubvolumesClient.BeginUpdate. +type SubvolumesClientUpdateResponse struct { + // Subvolume Information properties + SubvolumeInfo +} + +// VolumeGroupsClientCreateResponse contains the response from method VolumeGroupsClient.BeginCreate. +type VolumeGroupsClientCreateResponse struct { + // Volume group resource for create + VolumeGroupDetails +} + +// VolumeGroupsClientDeleteResponse contains the response from method VolumeGroupsClient.BeginDelete. +type VolumeGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// VolumeGroupsClientGetResponse contains the response from method VolumeGroupsClient.Get. +type VolumeGroupsClientGetResponse struct { + // Volume group resource for create + VolumeGroupDetails +} + +// VolumeGroupsClientListByNetAppAccountResponse contains the response from method VolumeGroupsClient.NewListByNetAppAccountPager. +type VolumeGroupsClientListByNetAppAccountResponse struct { + // List of volume group resources + VolumeGroupList +} + +// VolumeQuotaRulesClientCreateResponse contains the response from method VolumeQuotaRulesClient.BeginCreate. +type VolumeQuotaRulesClientCreateResponse struct { + // Quota Rule of a Volume + VolumeQuotaRule +} + +// VolumeQuotaRulesClientDeleteResponse contains the response from method VolumeQuotaRulesClient.BeginDelete. +type VolumeQuotaRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// VolumeQuotaRulesClientGetResponse contains the response from method VolumeQuotaRulesClient.Get. +type VolumeQuotaRulesClientGetResponse struct { + // Quota Rule of a Volume + VolumeQuotaRule +} + +// VolumeQuotaRulesClientListByVolumeResponse contains the response from method VolumeQuotaRulesClient.NewListByVolumePager. +type VolumeQuotaRulesClientListByVolumeResponse struct { + // List of Volume Quota Rules + VolumeQuotaRulesList +} + +// VolumeQuotaRulesClientUpdateResponse contains the response from method VolumeQuotaRulesClient.BeginUpdate. +type VolumeQuotaRulesClientUpdateResponse struct { + // Quota Rule of a Volume + VolumeQuotaRule +} + +// VolumesClientAuthorizeExternalReplicationResponse contains the response from method VolumesClient.BeginAuthorizeExternalReplication. +type VolumesClientAuthorizeExternalReplicationResponse struct { + // Information about svm peering process + SvmPeerCommandResponse +} + +// VolumesClientAuthorizeReplicationResponse contains the response from method VolumesClient.BeginAuthorizeReplication. +type VolumesClientAuthorizeReplicationResponse struct { + // placeholder for future response values +} + +// VolumesClientBreakFileLocksResponse contains the response from method VolumesClient.BeginBreakFileLocks. +type VolumesClientBreakFileLocksResponse struct { + // placeholder for future response values +} + +// VolumesClientBreakReplicationResponse contains the response from method VolumesClient.BeginBreakReplication. +type VolumesClientBreakReplicationResponse struct { + // placeholder for future response values +} + +// VolumesClientCreateOrUpdateResponse contains the response from method VolumesClient.BeginCreateOrUpdate. +type VolumesClientCreateOrUpdateResponse struct { + // Volume resource + Volume +} + +// VolumesClientDeleteReplicationResponse contains the response from method VolumesClient.BeginDeleteReplication. +type VolumesClientDeleteReplicationResponse struct { + // placeholder for future response values +} + +// VolumesClientDeleteResponse contains the response from method VolumesClient.BeginDelete. +type VolumesClientDeleteResponse struct { + // placeholder for future response values +} + +// VolumesClientFinalizeExternalReplicationResponse contains the response from method VolumesClient.BeginFinalizeExternalReplication. +type VolumesClientFinalizeExternalReplicationResponse struct { + // placeholder for future response values +} + +// VolumesClientFinalizeRelocationResponse contains the response from method VolumesClient.BeginFinalizeRelocation. +type VolumesClientFinalizeRelocationResponse struct { + // placeholder for future response values +} + +// VolumesClientGetResponse contains the response from method VolumesClient.Get. +type VolumesClientGetResponse struct { + // Volume resource + Volume +} + +// VolumesClientListGetGroupIDListForLdapUserResponse contains the response from method VolumesClient.BeginListGetGroupIDListForLdapUser. +type VolumesClientListGetGroupIDListForLdapUserResponse struct { + // Group Id list for Ldap user + GetGroupIDListForLDAPUserResponse +} + +// VolumesClientListReplicationsResponse contains the response from method VolumesClient.NewListReplicationsPager. +type VolumesClientListReplicationsResponse struct { + // List Replications + ListReplications +} + +// VolumesClientListResponse contains the response from method VolumesClient.NewListPager. +type VolumesClientListResponse struct { + // List of volume resources + VolumeList +} + +// VolumesClientPeerExternalClusterResponse contains the response from method VolumesClient.BeginPeerExternalCluster. +type VolumesClientPeerExternalClusterResponse struct { + // Information about cluster peering process + ClusterPeerCommandResponse +} + +// VolumesClientPerformReplicationTransferResponse contains the response from method VolumesClient.BeginPerformReplicationTransfer. +type VolumesClientPerformReplicationTransferResponse struct { + // placeholder for future response values +} + +// VolumesClientPoolChangeResponse contains the response from method VolumesClient.BeginPoolChange. +type VolumesClientPoolChangeResponse struct { + // placeholder for future response values +} + +// VolumesClientPopulateAvailabilityZoneResponse contains the response from method VolumesClient.BeginPopulateAvailabilityZone. +type VolumesClientPopulateAvailabilityZoneResponse struct { + // Volume resource + Volume +} + +// VolumesClientReInitializeReplicationResponse contains the response from method VolumesClient.BeginReInitializeReplication. +type VolumesClientReInitializeReplicationResponse struct { + // placeholder for future response values +} + +// VolumesClientReestablishReplicationResponse contains the response from method VolumesClient.BeginReestablishReplication. +type VolumesClientReestablishReplicationResponse struct { + // placeholder for future response values +} + +// VolumesClientRelocateResponse contains the response from method VolumesClient.BeginRelocate. +type VolumesClientRelocateResponse struct { + // placeholder for future response values +} + +// VolumesClientReplicationStatusResponse contains the response from method VolumesClient.ReplicationStatus. +type VolumesClientReplicationStatusResponse struct { + // Replication status + ReplicationStatus +} + +// VolumesClientResetCifsPasswordResponse contains the response from method VolumesClient.BeginResetCifsPassword. +type VolumesClientResetCifsPasswordResponse struct { + // placeholder for future response values +} + +// VolumesClientResyncReplicationResponse contains the response from method VolumesClient.BeginResyncReplication. +type VolumesClientResyncReplicationResponse struct { + // placeholder for future response values +} + +// VolumesClientRevertRelocationResponse contains the response from method VolumesClient.BeginRevertRelocation. +type VolumesClientRevertRelocationResponse struct { + // placeholder for future response values +} + +// VolumesClientRevertResponse contains the response from method VolumesClient.BeginRevert. +type VolumesClientRevertResponse struct { + // placeholder for future response values +} + +// VolumesClientUpdateResponse contains the response from method VolumesClient.BeginUpdate. +type VolumesClientUpdateResponse struct { + // Volume resource + Volume +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/snapshotpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/snapshotpolicies_client.go new file mode 100644 index 00000000..de8084d0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/snapshotpolicies_client.go @@ -0,0 +1,487 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SnapshotPoliciesClient contains the methods for the SnapshotPolicies group. +// Don't use this type directly, use NewSnapshotPoliciesClient() instead. +type SnapshotPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSnapshotPoliciesClient creates a new instance of SnapshotPoliciesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSnapshotPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SnapshotPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SnapshotPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Create - Create a snapshot policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - snapshotPolicyName - The name of the snapshot policy +// - body - Snapshot policy object supplied in the body of the operation. +// - options - SnapshotPoliciesClientCreateOptions contains the optional parameters for the SnapshotPoliciesClient.Create method. +func (client *SnapshotPoliciesClient) Create(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicy, options *SnapshotPoliciesClientCreateOptions) (SnapshotPoliciesClientCreateResponse, error) { + var err error + const operationName = "SnapshotPoliciesClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, snapshotPolicyName, body, options) + if err != nil { + return SnapshotPoliciesClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SnapshotPoliciesClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SnapshotPoliciesClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *SnapshotPoliciesClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicy, _ *SnapshotPoliciesClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if snapshotPolicyName == "" { + return nil, errors.New("parameter snapshotPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotPolicyName}", url.PathEscape(snapshotPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *SnapshotPoliciesClient) createHandleResponse(resp *http.Response) (SnapshotPoliciesClientCreateResponse, error) { + result := SnapshotPoliciesClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotPolicy); err != nil { + return SnapshotPoliciesClientCreateResponse{}, err + } + return result, nil +} + +// BeginDelete - Delete snapshot policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - snapshotPolicyName - The name of the snapshot policy +// - options - SnapshotPoliciesClientBeginDeleteOptions contains the optional parameters for the SnapshotPoliciesClient.BeginDelete +// method. +func (client *SnapshotPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientBeginDeleteOptions) (*runtime.Poller[SnapshotPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, snapshotPolicyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotPoliciesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete snapshot policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *SnapshotPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SnapshotPoliciesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, snapshotPolicyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SnapshotPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, _ *SnapshotPoliciesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if snapshotPolicyName == "" { + return nil, errors.New("parameter snapshotPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotPolicyName}", url.PathEscape(snapshotPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a snapshot Policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - snapshotPolicyName - The name of the snapshot policy +// - options - SnapshotPoliciesClientGetOptions contains the optional parameters for the SnapshotPoliciesClient.Get method. +func (client *SnapshotPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientGetOptions) (SnapshotPoliciesClientGetResponse, error) { + var err error + const operationName = "SnapshotPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, snapshotPolicyName, options) + if err != nil { + return SnapshotPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SnapshotPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SnapshotPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SnapshotPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, _ *SnapshotPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if snapshotPolicyName == "" { + return nil, errors.New("parameter snapshotPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotPolicyName}", url.PathEscape(snapshotPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SnapshotPoliciesClient) getHandleResponse(resp *http.Response) (SnapshotPoliciesClientGetResponse, error) { + result := SnapshotPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotPolicy); err != nil { + return SnapshotPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List snapshot policy +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - SnapshotPoliciesClientListOptions contains the optional parameters for the SnapshotPoliciesClient.NewListPager +// method. +func (client *SnapshotPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *SnapshotPoliciesClientListOptions) *runtime.Pager[SnapshotPoliciesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SnapshotPoliciesClientListResponse]{ + More: func(page SnapshotPoliciesClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *SnapshotPoliciesClientListResponse) (SnapshotPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SnapshotPoliciesClient.NewListPager") + req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return SnapshotPoliciesClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SnapshotPoliciesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SnapshotPoliciesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SnapshotPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *SnapshotPoliciesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SnapshotPoliciesClient) listHandleResponse(resp *http.Response) (SnapshotPoliciesClientListResponse, error) { + result := SnapshotPoliciesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotPoliciesList); err != nil { + return SnapshotPoliciesClientListResponse{}, err + } + return result, nil +} + +// ListVolumes - Get volumes associated with snapshot policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - snapshotPolicyName - The name of the snapshot policy +// - options - SnapshotPoliciesClientListVolumesOptions contains the optional parameters for the SnapshotPoliciesClient.ListVolumes +// method. +func (client *SnapshotPoliciesClient) ListVolumes(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientListVolumesOptions) (SnapshotPoliciesClientListVolumesResponse, error) { + var err error + const operationName = "SnapshotPoliciesClient.ListVolumes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listVolumesCreateRequest(ctx, resourceGroupName, accountName, snapshotPolicyName, options) + if err != nil { + return SnapshotPoliciesClientListVolumesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SnapshotPoliciesClientListVolumesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SnapshotPoliciesClientListVolumesResponse{}, err + } + resp, err := client.listVolumesHandleResponse(httpResp) + return resp, err +} + +// listVolumesCreateRequest creates the ListVolumes request. +func (client *SnapshotPoliciesClient) listVolumesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, _ *SnapshotPoliciesClientListVolumesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if snapshotPolicyName == "" { + return nil, errors.New("parameter snapshotPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotPolicyName}", url.PathEscape(snapshotPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVolumesHandleResponse handles the ListVolumes response. +func (client *SnapshotPoliciesClient) listVolumesHandleResponse(resp *http.Response) (SnapshotPoliciesClientListVolumesResponse, error) { + result := SnapshotPoliciesClientListVolumesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotPolicyVolumeList); err != nil { + return SnapshotPoliciesClientListVolumesResponse{}, err + } + return result, nil +} + +// BeginUpdate - Patch a snapshot policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - snapshotPolicyName - The name of the snapshot policy +// - body - Snapshot policy object supplied in the body of the operation. +// - options - SnapshotPoliciesClientBeginUpdateOptions contains the optional parameters for the SnapshotPoliciesClient.BeginUpdate +// method. +func (client *SnapshotPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicyPatch, options *SnapshotPoliciesClientBeginUpdateOptions) (*runtime.Poller[SnapshotPoliciesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, snapshotPolicyName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotPoliciesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotPoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch a snapshot policy +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *SnapshotPoliciesClient) update(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicyPatch, options *SnapshotPoliciesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SnapshotPoliciesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, snapshotPolicyName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *SnapshotPoliciesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicyPatch, _ *SnapshotPoliciesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if snapshotPolicyName == "" { + return nil, errors.New("parameter snapshotPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotPolicyName}", url.PathEscape(snapshotPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/snapshots_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/snapshots_client.go new file mode 100644 index 00000000..1d4d980a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/snapshots_client.go @@ -0,0 +1,572 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SnapshotsClient contains the methods for the Snapshots group. +// Don't use this type directly, use NewSnapshotsClient() instead. +type SnapshotsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSnapshotsClient creates a new instance of SnapshotsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSnapshotsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SnapshotsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SnapshotsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Create the specified snapshot within the given volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - snapshotName - The name of the snapshot +// - body - Snapshot object supplied in the body of the operation. +// - options - SnapshotsClientBeginCreateOptions contains the optional parameters for the SnapshotsClient.BeginCreate method. +func (client *SnapshotsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body Snapshot, options *SnapshotsClientBeginCreateOptions) (*runtime.Poller[SnapshotsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Create the specified snapshot within the given volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *SnapshotsClient) create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body Snapshot, options *SnapshotsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "SnapshotsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *SnapshotsClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body Snapshot, _ *SnapshotsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if snapshotName == "" { + return nil, errors.New("parameter snapshotName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete snapshot +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - snapshotName - The name of the snapshot +// - options - SnapshotsClientBeginDeleteOptions contains the optional parameters for the SnapshotsClient.BeginDelete method. +func (client *SnapshotsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*runtime.Poller[SnapshotsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete snapshot +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *SnapshotsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SnapshotsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, _ *SnapshotsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if snapshotName == "" { + return nil, errors.New("parameter snapshotName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get details of the specified snapshot +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - snapshotName - The name of the snapshot +// - options - SnapshotsClientGetOptions contains the optional parameters for the SnapshotsClient.Get method. +func (client *SnapshotsClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, options *SnapshotsClientGetOptions) (SnapshotsClientGetResponse, error) { + var err error + const operationName = "SnapshotsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, options) + if err != nil { + return SnapshotsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SnapshotsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SnapshotsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SnapshotsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, _ *SnapshotsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if snapshotName == "" { + return nil, errors.New("parameter snapshotName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SnapshotsClient) getHandleResponse(resp *http.Response) (SnapshotsClientGetResponse, error) { + result := SnapshotsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Snapshot); err != nil { + return SnapshotsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all snapshots associated with the volume +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.NewListPager method. +func (client *SnapshotsClient) NewListPager(resourceGroupName string, accountName string, poolName string, volumeName string, options *SnapshotsClientListOptions) *runtime.Pager[SnapshotsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SnapshotsClientListResponse]{ + More: func(page SnapshotsClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *SnapshotsClientListResponse) (SnapshotsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SnapshotsClient.NewListPager") + req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return SnapshotsClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SnapshotsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SnapshotsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SnapshotsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *SnapshotsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SnapshotsClient) listHandleResponse(resp *http.Response) (SnapshotsClientListResponse, error) { + result := SnapshotsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotsList); err != nil { + return SnapshotsClientListResponse{}, err + } + return result, nil +} + +// BeginRestoreFiles - Restore the specified files from the specified snapshot to the active filesystem +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - snapshotName - The name of the snapshot +// - body - Restore payload supplied in the body of the operation. +// - options - SnapshotsClientBeginRestoreFilesOptions contains the optional parameters for the SnapshotsClient.BeginRestoreFiles +// method. +func (client *SnapshotsClient) BeginRestoreFiles(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body SnapshotRestoreFiles, options *SnapshotsClientBeginRestoreFilesOptions) (*runtime.Poller[SnapshotsClientRestoreFilesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restoreFiles(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientRestoreFilesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientRestoreFilesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RestoreFiles - Restore the specified files from the specified snapshot to the active filesystem +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *SnapshotsClient) restoreFiles(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body SnapshotRestoreFiles, options *SnapshotsClientBeginRestoreFilesOptions) (*http.Response, error) { + var err error + const operationName = "SnapshotsClient.BeginRestoreFiles" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreFilesCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreFilesCreateRequest creates the RestoreFiles request. +func (client *SnapshotsClient) restoreFilesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body SnapshotRestoreFiles, _ *SnapshotsClientBeginRestoreFilesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}/restoreFiles" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if snapshotName == "" { + return nil, errors.New("parameter snapshotName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdate - Patch a snapshot +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - snapshotName - The name of the snapshot +// - body - Snapshot object supplied in the body of the operation. +// - options - SnapshotsClientBeginUpdateOptions contains the optional parameters for the SnapshotsClient.BeginUpdate method. +func (client *SnapshotsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body any, options *SnapshotsClientBeginUpdateOptions) (*runtime.Poller[SnapshotsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch a snapshot +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *SnapshotsClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body any, options *SnapshotsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SnapshotsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *SnapshotsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body any, _ *SnapshotsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if snapshotName == "" { + return nil, errors.New("parameter snapshotName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/subvolumes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/subvolumes_client.go new file mode 100644 index 00000000..eedad2f6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/subvolumes_client.go @@ -0,0 +1,568 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SubvolumesClient contains the methods for the Subvolumes group. +// Don't use this type directly, use NewSubvolumesClient() instead. +type SubvolumesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSubvolumesClient creates a new instance of SubvolumesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSubvolumesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubvolumesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SubvolumesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Creates a subvolume in the path or clones the subvolume mentioned in the parentPath +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - subvolumeName - The name of the subvolume. +// - body - Subvolume object supplied in the body of the operation. +// - options - SubvolumesClientBeginCreateOptions contains the optional parameters for the SubvolumesClient.BeginCreate method. +func (client *SubvolumesClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumeInfo, options *SubvolumesClientBeginCreateOptions) (*runtime.Poller[SubvolumesClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubvolumesClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubvolumesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Creates a subvolume in the path or clones the subvolume mentioned in the parentPath +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *SubvolumesClient) create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumeInfo, options *SubvolumesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "SubvolumesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *SubvolumesClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumeInfo, _ *SubvolumesClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if subvolumeName == "" { + return nil, errors.New("parameter subvolumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subvolumeName}", url.PathEscape(subvolumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete subvolume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - subvolumeName - The name of the subvolume. +// - options - SubvolumesClientBeginDeleteOptions contains the optional parameters for the SubvolumesClient.BeginDelete method. +func (client *SubvolumesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginDeleteOptions) (*runtime.Poller[SubvolumesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubvolumesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubvolumesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete subvolume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *SubvolumesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SubvolumesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SubvolumesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, _ *SubvolumesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if subvolumeName == "" { + return nil, errors.New("parameter subvolumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subvolumeName}", url.PathEscape(subvolumeName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns the path associated with the subvolumeName provided +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - subvolumeName - The name of the subvolume. +// - options - SubvolumesClientGetOptions contains the optional parameters for the SubvolumesClient.Get method. +func (client *SubvolumesClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientGetOptions) (SubvolumesClientGetResponse, error) { + var err error + const operationName = "SubvolumesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, options) + if err != nil { + return SubvolumesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SubvolumesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SubvolumesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SubvolumesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, _ *SubvolumesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if subvolumeName == "" { + return nil, errors.New("parameter subvolumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subvolumeName}", url.PathEscape(subvolumeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SubvolumesClient) getHandleResponse(resp *http.Response) (SubvolumesClientGetResponse, error) { + result := SubvolumesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SubvolumeInfo); err != nil { + return SubvolumesClientGetResponse{}, err + } + return result, nil +} + +// BeginGetMetadata - Get details of the specified subvolume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - subvolumeName - The name of the subvolume. +// - options - SubvolumesClientBeginGetMetadataOptions contains the optional parameters for the SubvolumesClient.BeginGetMetadata +// method. +func (client *SubvolumesClient) BeginGetMetadata(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginGetMetadataOptions) (*runtime.Poller[SubvolumesClientGetMetadataResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getMetadata(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubvolumesClientGetMetadataResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubvolumesClientGetMetadataResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetMetadata - Get details of the specified subvolume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *SubvolumesClient) getMetadata(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginGetMetadataOptions) (*http.Response, error) { + var err error + const operationName = "SubvolumesClient.BeginGetMetadata" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getMetadataCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getMetadataCreateRequest creates the GetMetadata request. +func (client *SubvolumesClient) getMetadataCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, _ *SubvolumesClientBeginGetMetadataOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}/getMetadata" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if subvolumeName == "" { + return nil, errors.New("parameter subvolumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subvolumeName}", url.PathEscape(subvolumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListByVolumePager - Returns a list of the subvolumes in the volume +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - SubvolumesClientListByVolumeOptions contains the optional parameters for the SubvolumesClient.NewListByVolumePager +// method. +func (client *SubvolumesClient) NewListByVolumePager(resourceGroupName string, accountName string, poolName string, volumeName string, options *SubvolumesClientListByVolumeOptions) *runtime.Pager[SubvolumesClientListByVolumeResponse] { + return runtime.NewPager(runtime.PagingHandler[SubvolumesClientListByVolumeResponse]{ + More: func(page SubvolumesClientListByVolumeResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SubvolumesClientListByVolumeResponse) (SubvolumesClientListByVolumeResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SubvolumesClient.NewListByVolumePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVolumeCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + }, nil) + if err != nil { + return SubvolumesClientListByVolumeResponse{}, err + } + return client.listByVolumeHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByVolumeCreateRequest creates the ListByVolume request. +func (client *SubvolumesClient) listByVolumeCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *SubvolumesClientListByVolumeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByVolumeHandleResponse handles the ListByVolume response. +func (client *SubvolumesClient) listByVolumeHandleResponse(resp *http.Response) (SubvolumesClientListByVolumeResponse, error) { + result := SubvolumesClientListByVolumeResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SubvolumesList); err != nil { + return SubvolumesClientListByVolumeResponse{}, err + } + return result, nil +} + +// BeginUpdate - Patch a subvolume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - subvolumeName - The name of the subvolume. +// - body - Subvolume object supplied in the body of the operation. +// - options - SubvolumesClientBeginUpdateOptions contains the optional parameters for the SubvolumesClient.BeginUpdate method. +func (client *SubvolumesClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumePatchRequest, options *SubvolumesClientBeginUpdateOptions) (*runtime.Poller[SubvolumesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubvolumesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubvolumesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch a subvolume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *SubvolumesClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumePatchRequest, options *SubvolumesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SubvolumesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *SubvolumesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumePatchRequest, _ *SubvolumesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if subvolumeName == "" { + return nil, errors.New("parameter subvolumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subvolumeName}", url.PathEscape(subvolumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/time_rfc3339.go new file mode 100644 index 00000000..7b37ad99 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/time_rfc3339.go @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + if len(data) == 0 { + return nil + } + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/volumegroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/volumegroups_client.go new file mode 100644 index 00000000..ee81d653 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/volumegroups_client.go @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VolumeGroupsClient contains the methods for the VolumeGroups group. +// Don't use this type directly, use NewVolumeGroupsClient() instead. +type VolumeGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVolumeGroupsClient creates a new instance of VolumeGroupsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVolumeGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VolumeGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VolumeGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Create a volume group along with specified volumes +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - volumeGroupName - The name of the volumeGroup +// - body - Volume Group object supplied in the body of the operation. +// - options - VolumeGroupsClientBeginCreateOptions contains the optional parameters for the VolumeGroupsClient.BeginCreate +// method. +func (client *VolumeGroupsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, body VolumeGroupDetails, options *VolumeGroupsClientBeginCreateOptions) (*runtime.Poller[VolumeGroupsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, accountName, volumeGroupName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumeGroupsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumeGroupsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Create a volume group along with specified volumes +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumeGroupsClient) create(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, body VolumeGroupDetails, options *VolumeGroupsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "VolumeGroupsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, volumeGroupName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *VolumeGroupsClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, body VolumeGroupDetails, _ *VolumeGroupsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if volumeGroupName == "" { + return nil, errors.New("parameter volumeGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeGroupName}", url.PathEscape(volumeGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the specified volume group only if there are no volumes under volume group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - volumeGroupName - The name of the volumeGroup +// - options - VolumeGroupsClientBeginDeleteOptions contains the optional parameters for the VolumeGroupsClient.BeginDelete +// method. +func (client *VolumeGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, options *VolumeGroupsClientBeginDeleteOptions) (*runtime.Poller[VolumeGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, volumeGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumeGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumeGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the specified volume group only if there are no volumes under volume group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumeGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, options *VolumeGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VolumeGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, volumeGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VolumeGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, _ *VolumeGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if volumeGroupName == "" { + return nil, errors.New("parameter volumeGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeGroupName}", url.PathEscape(volumeGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get details of the specified volume group +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - volumeGroupName - The name of the volumeGroup +// - options - VolumeGroupsClientGetOptions contains the optional parameters for the VolumeGroupsClient.Get method. +func (client *VolumeGroupsClient) Get(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, options *VolumeGroupsClientGetOptions) (VolumeGroupsClientGetResponse, error) { + var err error + const operationName = "VolumeGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, volumeGroupName, options) + if err != nil { + return VolumeGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VolumeGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VolumeGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VolumeGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, _ *VolumeGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if volumeGroupName == "" { + return nil, errors.New("parameter volumeGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeGroupName}", url.PathEscape(volumeGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VolumeGroupsClient) getHandleResponse(resp *http.Response) (VolumeGroupsClientGetResponse, error) { + result := VolumeGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VolumeGroupDetails); err != nil { + return VolumeGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByNetAppAccountPager - List all volume groups for given account +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - options - VolumeGroupsClientListByNetAppAccountOptions contains the optional parameters for the VolumeGroupsClient.NewListByNetAppAccountPager +// method. +func (client *VolumeGroupsClient) NewListByNetAppAccountPager(resourceGroupName string, accountName string, options *VolumeGroupsClientListByNetAppAccountOptions) *runtime.Pager[VolumeGroupsClientListByNetAppAccountResponse] { + return runtime.NewPager(runtime.PagingHandler[VolumeGroupsClientListByNetAppAccountResponse]{ + More: func(page VolumeGroupsClientListByNetAppAccountResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *VolumeGroupsClientListByNetAppAccountResponse) (VolumeGroupsClientListByNetAppAccountResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VolumeGroupsClient.NewListByNetAppAccountPager") + req, err := client.listByNetAppAccountCreateRequest(ctx, resourceGroupName, accountName, options) + if err != nil { + return VolumeGroupsClientListByNetAppAccountResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VolumeGroupsClientListByNetAppAccountResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VolumeGroupsClientListByNetAppAccountResponse{}, runtime.NewResponseError(resp) + } + return client.listByNetAppAccountHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByNetAppAccountCreateRequest creates the ListByNetAppAccount request. +func (client *VolumeGroupsClient) listByNetAppAccountCreateRequest(ctx context.Context, resourceGroupName string, accountName string, _ *VolumeGroupsClientListByNetAppAccountOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByNetAppAccountHandleResponse handles the ListByNetAppAccount response. +func (client *VolumeGroupsClient) listByNetAppAccountHandleResponse(resp *http.Response) (VolumeGroupsClientListByNetAppAccountResponse, error) { + result := VolumeGroupsClientListByNetAppAccountResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VolumeGroupList); err != nil { + return VolumeGroupsClientListByNetAppAccountResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/volumequotarules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/volumequotarules_client.go new file mode 100644 index 00000000..5ecaf996 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/volumequotarules_client.go @@ -0,0 +1,480 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VolumeQuotaRulesClient contains the methods for the VolumeQuotaRules group. +// Don't use this type directly, use NewVolumeQuotaRulesClient() instead. +type VolumeQuotaRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVolumeQuotaRulesClient creates a new instance of VolumeQuotaRulesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVolumeQuotaRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VolumeQuotaRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VolumeQuotaRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Create the specified quota rule within the given volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - volumeQuotaRuleName - The name of volume quota rule +// - body - Quota rule object supplied in the body of the operation. +// - options - VolumeQuotaRulesClientBeginCreateOptions contains the optional parameters for the VolumeQuotaRulesClient.BeginCreate +// method. +func (client *VolumeQuotaRulesClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, body VolumeQuotaRule, options *VolumeQuotaRulesClientBeginCreateOptions) (*runtime.Poller[VolumeQuotaRulesClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumeQuotaRulesClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumeQuotaRulesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Create the specified quota rule within the given volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumeQuotaRulesClient) create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, body VolumeQuotaRule, options *VolumeQuotaRulesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "VolumeQuotaRulesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *VolumeQuotaRulesClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, body VolumeQuotaRule, _ *VolumeQuotaRulesClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if volumeQuotaRuleName == "" { + return nil, errors.New("parameter volumeQuotaRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeQuotaRuleName}", url.PathEscape(volumeQuotaRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete quota rule +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - volumeQuotaRuleName - The name of volume quota rule +// - options - VolumeQuotaRulesClientBeginDeleteOptions contains the optional parameters for the VolumeQuotaRulesClient.BeginDelete +// method. +func (client *VolumeQuotaRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, options *VolumeQuotaRulesClientBeginDeleteOptions) (*runtime.Poller[VolumeQuotaRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumeQuotaRulesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumeQuotaRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete quota rule +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumeQuotaRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, options *VolumeQuotaRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VolumeQuotaRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VolumeQuotaRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, _ *VolumeQuotaRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if volumeQuotaRuleName == "" { + return nil, errors.New("parameter volumeQuotaRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeQuotaRuleName}", url.PathEscape(volumeQuotaRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get details of the specified quota rule +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - volumeQuotaRuleName - The name of volume quota rule +// - options - VolumeQuotaRulesClientGetOptions contains the optional parameters for the VolumeQuotaRulesClient.Get method. +func (client *VolumeQuotaRulesClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, options *VolumeQuotaRulesClientGetOptions) (VolumeQuotaRulesClientGetResponse, error) { + var err error + const operationName = "VolumeQuotaRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, options) + if err != nil { + return VolumeQuotaRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VolumeQuotaRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VolumeQuotaRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VolumeQuotaRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, _ *VolumeQuotaRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if volumeQuotaRuleName == "" { + return nil, errors.New("parameter volumeQuotaRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeQuotaRuleName}", url.PathEscape(volumeQuotaRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VolumeQuotaRulesClient) getHandleResponse(resp *http.Response) (VolumeQuotaRulesClientGetResponse, error) { + result := VolumeQuotaRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VolumeQuotaRule); err != nil { + return VolumeQuotaRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListByVolumePager - List all quota rules associated with the volume +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumeQuotaRulesClientListByVolumeOptions contains the optional parameters for the VolumeQuotaRulesClient.NewListByVolumePager +// method. +func (client *VolumeQuotaRulesClient) NewListByVolumePager(resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumeQuotaRulesClientListByVolumeOptions) *runtime.Pager[VolumeQuotaRulesClientListByVolumeResponse] { + return runtime.NewPager(runtime.PagingHandler[VolumeQuotaRulesClientListByVolumeResponse]{ + More: func(page VolumeQuotaRulesClientListByVolumeResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *VolumeQuotaRulesClientListByVolumeResponse) (VolumeQuotaRulesClientListByVolumeResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VolumeQuotaRulesClient.NewListByVolumePager") + req, err := client.listByVolumeCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return VolumeQuotaRulesClientListByVolumeResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VolumeQuotaRulesClientListByVolumeResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VolumeQuotaRulesClientListByVolumeResponse{}, runtime.NewResponseError(resp) + } + return client.listByVolumeHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByVolumeCreateRequest creates the ListByVolume request. +func (client *VolumeQuotaRulesClient) listByVolumeCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumeQuotaRulesClientListByVolumeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByVolumeHandleResponse handles the ListByVolume response. +func (client *VolumeQuotaRulesClient) listByVolumeHandleResponse(resp *http.Response) (VolumeQuotaRulesClientListByVolumeResponse, error) { + result := VolumeQuotaRulesClientListByVolumeResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VolumeQuotaRulesList); err != nil { + return VolumeQuotaRulesClientListByVolumeResponse{}, err + } + return result, nil +} + +// BeginUpdate - Patch a quota rule +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - volumeQuotaRuleName - The name of volume quota rule +// - body - Quota rule object supplied in the body of the operation. +// - options - VolumeQuotaRulesClientBeginUpdateOptions contains the optional parameters for the VolumeQuotaRulesClient.BeginUpdate +// method. +func (client *VolumeQuotaRulesClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, body VolumeQuotaRulePatch, options *VolumeQuotaRulesClientBeginUpdateOptions) (*runtime.Poller[VolumeQuotaRulesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumeQuotaRulesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumeQuotaRulesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch a quota rule +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumeQuotaRulesClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, body VolumeQuotaRulePatch, options *VolumeQuotaRulesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VolumeQuotaRulesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *VolumeQuotaRulesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, volumeQuotaRuleName string, body VolumeQuotaRulePatch, _ *VolumeQuotaRulesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + if volumeQuotaRuleName == "" { + return nil, errors.New("parameter volumeQuotaRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeQuotaRuleName}", url.PathEscape(volumeQuotaRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/volumes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/volumes_client.go new file mode 100644 index 00000000..eb018b6e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7/volumes_client.go @@ -0,0 +1,2304 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetapp + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// VolumesClient contains the methods for the Volumes group. +// Don't use this type directly, use NewVolumesClient() instead. +type VolumesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVolumesClient creates a new instance of VolumesClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVolumesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VolumesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VolumesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginAuthorizeExternalReplication - Starts SVM peering and returns a command to be run on the external ONTAP to accept +// it. Once the SVM have been peered a SnapMirror will be created +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginAuthorizeExternalReplicationOptions contains the optional parameters for the VolumesClient.BeginAuthorizeExternalReplication +// method. +func (client *VolumesClient) BeginAuthorizeExternalReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginAuthorizeExternalReplicationOptions) (*runtime.Poller[VolumesClientAuthorizeExternalReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.authorizeExternalReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientAuthorizeExternalReplicationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientAuthorizeExternalReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// AuthorizeExternalReplication - Starts SVM peering and returns a command to be run on the external ONTAP to accept it. Once +// the SVM have been peered a SnapMirror will be created +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) authorizeExternalReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginAuthorizeExternalReplicationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginAuthorizeExternalReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.authorizeExternalReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// authorizeExternalReplicationCreateRequest creates the AuthorizeExternalReplication request. +func (client *VolumesClient) authorizeExternalReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginAuthorizeExternalReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeExternalReplication" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginAuthorizeReplication - Authorize the replication connection on the source volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - body - Authorize request object supplied in the body of the operation. +// - options - VolumesClientBeginAuthorizeReplicationOptions contains the optional parameters for the VolumesClient.BeginAuthorizeReplication +// method. +func (client *VolumesClient) BeginAuthorizeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body AuthorizeRequest, options *VolumesClientBeginAuthorizeReplicationOptions) (*runtime.Poller[VolumesClientAuthorizeReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.authorizeReplication(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientAuthorizeReplicationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientAuthorizeReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// AuthorizeReplication - Authorize the replication connection on the source volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) authorizeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body AuthorizeRequest, options *VolumesClientBeginAuthorizeReplicationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginAuthorizeReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.authorizeReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// authorizeReplicationCreateRequest creates the AuthorizeReplication request. +func (client *VolumesClient) authorizeReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body AuthorizeRequest, _ *VolumesClientBeginAuthorizeReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginBreakFileLocks - Break all the file locks on a volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginBreakFileLocksOptions contains the optional parameters for the VolumesClient.BeginBreakFileLocks +// method. +func (client *VolumesClient) BeginBreakFileLocks(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakFileLocksOptions) (*runtime.Poller[VolumesClientBreakFileLocksResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.breakFileLocks(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientBreakFileLocksResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientBreakFileLocksResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// BreakFileLocks - Break all the file locks on a volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) breakFileLocks(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakFileLocksOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginBreakFileLocks" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.breakFileLocksCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// breakFileLocksCreateRequest creates the BreakFileLocks request. +func (client *VolumesClient) breakFileLocksCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakFileLocksOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakFileLocks" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginBreakReplication - Break the replication connection on the destination volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginBreakReplicationOptions contains the optional parameters for the VolumesClient.BeginBreakReplication +// method. +func (client *VolumesClient) BeginBreakReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakReplicationOptions) (*runtime.Poller[VolumesClientBreakReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.breakReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientBreakReplicationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientBreakReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// BreakReplication - Break the replication connection on the destination volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) breakReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakReplicationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginBreakReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.breakReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// breakReplicationCreateRequest creates the BreakReplication request. +func (client *VolumesClient) breakReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginCreateOrUpdate - Create or update the specified volume within the capacity pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - body - Volume object supplied in the body of the operation. +// - options - VolumesClientBeginCreateOrUpdateOptions contains the optional parameters for the VolumesClient.BeginCreateOrUpdate +// method. +func (client *VolumesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body Volume, options *VolumesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VolumesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update the specified volume within the capacity pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body Volume, options *VolumesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VolumesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body Volume, _ *VolumesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the specified volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginDeleteOptions contains the optional parameters for the VolumesClient.BeginDelete method. +func (client *VolumesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteOptions) (*runtime.Poller[VolumesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the specified volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VolumesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + if options != nil && options.ForceDelete != nil { + reqQP.Set("forceDelete", strconv.FormatBool(*options.ForceDelete)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDeleteReplication - Delete the replication connection on the destination volume, and send release to the source replication +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginDeleteReplicationOptions contains the optional parameters for the VolumesClient.BeginDeleteReplication +// method. +func (client *VolumesClient) BeginDeleteReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteReplicationOptions) (*runtime.Poller[VolumesClientDeleteReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientDeleteReplicationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientDeleteReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeleteReplication - Delete the replication connection on the destination volume, and send release to the source replication +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) deleteReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteReplicationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginDeleteReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteReplicationCreateRequest creates the DeleteReplication request. +func (client *VolumesClient) deleteReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginDeleteReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginFinalizeExternalReplication - Finalizes the migration of an external volume by releasing the replication and breaking +// the external cluster peering if no other migration is active. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginFinalizeExternalReplicationOptions contains the optional parameters for the VolumesClient.BeginFinalizeExternalReplication +// method. +func (client *VolumesClient) BeginFinalizeExternalReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginFinalizeExternalReplicationOptions) (*runtime.Poller[VolumesClientFinalizeExternalReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.finalizeExternalReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientFinalizeExternalReplicationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientFinalizeExternalReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// FinalizeExternalReplication - Finalizes the migration of an external volume by releasing the replication and breaking the +// external cluster peering if no other migration is active. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) finalizeExternalReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginFinalizeExternalReplicationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginFinalizeExternalReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.finalizeExternalReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// finalizeExternalReplicationCreateRequest creates the FinalizeExternalReplication request. +func (client *VolumesClient) finalizeExternalReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginFinalizeExternalReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeExternalReplication" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginFinalizeRelocation - Finalizes the relocation of the volume and cleans up the old volume. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginFinalizeRelocationOptions contains the optional parameters for the VolumesClient.BeginFinalizeRelocation +// method. +func (client *VolumesClient) BeginFinalizeRelocation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginFinalizeRelocationOptions) (*runtime.Poller[VolumesClientFinalizeRelocationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.finalizeRelocation(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientFinalizeRelocationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientFinalizeRelocationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// FinalizeRelocation - Finalizes the relocation of the volume and cleans up the old volume. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) finalizeRelocation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginFinalizeRelocationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginFinalizeRelocation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.finalizeRelocationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// finalizeRelocationCreateRequest creates the FinalizeRelocation request. +func (client *VolumesClient) finalizeRelocationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginFinalizeRelocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeRelocation" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the details of the specified volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientGetOptions contains the optional parameters for the VolumesClient.Get method. +func (client *VolumesClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientGetOptions) (VolumesClientGetResponse, error) { + var err error + const operationName = "VolumesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return VolumesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VolumesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VolumesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VolumesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VolumesClient) getHandleResponse(resp *http.Response) (VolumesClientGetResponse, error) { + result := VolumesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Volume); err != nil { + return VolumesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all volumes within the capacity pool +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - options - VolumesClientListOptions contains the optional parameters for the VolumesClient.NewListPager method. +func (client *VolumesClient) NewListPager(resourceGroupName string, accountName string, poolName string, options *VolumesClientListOptions) *runtime.Pager[VolumesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VolumesClientListResponse]{ + More: func(page VolumesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VolumesClientListResponse) (VolumesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VolumesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, accountName, poolName, options) + }, nil) + if err != nil { + return VolumesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VolumesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, _ *VolumesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VolumesClient) listHandleResponse(resp *http.Response) (VolumesClientListResponse, error) { + result := VolumesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VolumeList); err != nil { + return VolumesClientListResponse{}, err + } + return result, nil +} + +// BeginListGetGroupIDListForLdapUser - Returns the list of group Ids for a specific LDAP User +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - body - Returns group Id list for a specific LDAP user +// - options - VolumesClientBeginListGetGroupIDListForLdapUserOptions contains the optional parameters for the VolumesClient.BeginListGetGroupIDListForLdapUser +// method. +func (client *VolumesClient) BeginListGetGroupIDListForLdapUser(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body GetGroupIDListForLDAPUserRequest, options *VolumesClientBeginListGetGroupIDListForLdapUserOptions) (*runtime.Poller[VolumesClientListGetGroupIDListForLdapUserResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listGetGroupIDListForLdapUser(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientListGetGroupIDListForLdapUserResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientListGetGroupIDListForLdapUserResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListGetGroupIDListForLdapUser - Returns the list of group Ids for a specific LDAP User +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) listGetGroupIDListForLdapUser(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body GetGroupIDListForLDAPUserRequest, options *VolumesClientBeginListGetGroupIDListForLdapUserOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginListGetGroupIDListForLdapUser" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listGetGroupIDListForLdapUserCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listGetGroupIDListForLdapUserCreateRequest creates the ListGetGroupIDListForLdapUser request. +func (client *VolumesClient) listGetGroupIDListForLdapUserCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body GetGroupIDListForLDAPUserRequest, _ *VolumesClientBeginListGetGroupIDListForLdapUserOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/getGroupIdListForLdapUser" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// NewListReplicationsPager - List all replications for a specified volume +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientListReplicationsOptions contains the optional parameters for the VolumesClient.NewListReplicationsPager +// method. +func (client *VolumesClient) NewListReplicationsPager(resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientListReplicationsOptions) *runtime.Pager[VolumesClientListReplicationsResponse] { + return runtime.NewPager(runtime.PagingHandler[VolumesClientListReplicationsResponse]{ + More: func(page VolumesClientListReplicationsResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *VolumesClientListReplicationsResponse) (VolumesClientListReplicationsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VolumesClient.NewListReplicationsPager") + req, err := client.listReplicationsCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return VolumesClientListReplicationsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VolumesClientListReplicationsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VolumesClientListReplicationsResponse{}, runtime.NewResponseError(resp) + } + return client.listReplicationsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listReplicationsCreateRequest creates the ListReplications request. +func (client *VolumesClient) listReplicationsCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientListReplicationsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listReplications" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listReplicationsHandleResponse handles the ListReplications response. +func (client *VolumesClient) listReplicationsHandleResponse(resp *http.Response) (VolumesClientListReplicationsResponse, error) { + result := VolumesClientListReplicationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListReplications); err != nil { + return VolumesClientListReplicationsResponse{}, err + } + return result, nil +} + +// BeginPeerExternalCluster - Starts peering the external cluster for this migration volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - body - Cluster peer request object supplied in the body of the operation. +// - options - VolumesClientBeginPeerExternalClusterOptions contains the optional parameters for the VolumesClient.BeginPeerExternalCluster +// method. +func (client *VolumesClient) BeginPeerExternalCluster(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PeerClusterForVolumeMigrationRequest, options *VolumesClientBeginPeerExternalClusterOptions) (*runtime.Poller[VolumesClientPeerExternalClusterResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.peerExternalCluster(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientPeerExternalClusterResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientPeerExternalClusterResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PeerExternalCluster - Starts peering the external cluster for this migration volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) peerExternalCluster(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PeerClusterForVolumeMigrationRequest, options *VolumesClientBeginPeerExternalClusterOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginPeerExternalCluster" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.peerExternalClusterCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// peerExternalClusterCreateRequest creates the PeerExternalCluster request. +func (client *VolumesClient) peerExternalClusterCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PeerClusterForVolumeMigrationRequest, _ *VolumesClientBeginPeerExternalClusterOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/peerExternalCluster" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginPerformReplicationTransfer - Performs an adhoc replication transfer on a volume with volumeType Migration +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginPerformReplicationTransferOptions contains the optional parameters for the VolumesClient.BeginPerformReplicationTransfer +// method. +func (client *VolumesClient) BeginPerformReplicationTransfer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginPerformReplicationTransferOptions) (*runtime.Poller[VolumesClientPerformReplicationTransferResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.performReplicationTransfer(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientPerformReplicationTransferResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientPerformReplicationTransferResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PerformReplicationTransfer - Performs an adhoc replication transfer on a volume with volumeType Migration +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) performReplicationTransfer(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginPerformReplicationTransferOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginPerformReplicationTransfer" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.performReplicationTransferCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// performReplicationTransferCreateRequest creates the PerformReplicationTransfer request. +func (client *VolumesClient) performReplicationTransferCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginPerformReplicationTransferOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/performReplicationTransfer" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginPoolChange - Moves volume to another pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - body - Move volume to the pool supplied in the body of the operation. +// - options - VolumesClientBeginPoolChangeOptions contains the optional parameters for the VolumesClient.BeginPoolChange method. +func (client *VolumesClient) BeginPoolChange(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PoolChangeRequest, options *VolumesClientBeginPoolChangeOptions) (*runtime.Poller[VolumesClientPoolChangeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.poolChange(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientPoolChangeResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientPoolChangeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PoolChange - Moves volume to another pool +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) poolChange(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PoolChangeRequest, options *VolumesClientBeginPoolChangeOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginPoolChange" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.poolChangeCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// poolChangeCreateRequest creates the PoolChange request. +func (client *VolumesClient) poolChangeCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PoolChangeRequest, _ *VolumesClientBeginPoolChangeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginPopulateAvailabilityZone - This operation will populate availability zone information for a volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginPopulateAvailabilityZoneOptions contains the optional parameters for the VolumesClient.BeginPopulateAvailabilityZone +// method. +func (client *VolumesClient) BeginPopulateAvailabilityZone(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginPopulateAvailabilityZoneOptions) (*runtime.Poller[VolumesClientPopulateAvailabilityZoneResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.populateAvailabilityZone(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientPopulateAvailabilityZoneResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientPopulateAvailabilityZoneResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PopulateAvailabilityZone - This operation will populate availability zone information for a volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) populateAvailabilityZone(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginPopulateAvailabilityZoneOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginPopulateAvailabilityZone" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.populateAvailabilityZoneCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// populateAvailabilityZoneCreateRequest creates the PopulateAvailabilityZone request. +func (client *VolumesClient) populateAvailabilityZoneCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginPopulateAvailabilityZoneOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/populateAvailabilityZone" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginReInitializeReplication - Re-Initializes the replication connection on the destination volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginReInitializeReplicationOptions contains the optional parameters for the VolumesClient.BeginReInitializeReplication +// method. +func (client *VolumesClient) BeginReInitializeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginReInitializeReplicationOptions) (*runtime.Poller[VolumesClientReInitializeReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reInitializeReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientReInitializeReplicationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientReInitializeReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ReInitializeReplication - Re-Initializes the replication connection on the destination volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) reInitializeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginReInitializeReplicationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginReInitializeReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.reInitializeReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// reInitializeReplicationCreateRequest creates the ReInitializeReplication request. +func (client *VolumesClient) reInitializeReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginReInitializeReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reinitializeReplication" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginReestablishReplication - Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc +// or policy-based snapshots +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - body - body for the id of the source volume. +// - options - VolumesClientBeginReestablishReplicationOptions contains the optional parameters for the VolumesClient.BeginReestablishReplication +// method. +func (client *VolumesClient) BeginReestablishReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body ReestablishReplicationRequest, options *VolumesClientBeginReestablishReplicationOptions) (*runtime.Poller[VolumesClientReestablishReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reestablishReplication(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientReestablishReplicationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientReestablishReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ReestablishReplication - Re-establish a previously deleted replication between 2 volumes that have a common ad-hoc or policy-based +// snapshots +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) reestablishReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body ReestablishReplicationRequest, options *VolumesClientBeginReestablishReplicationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginReestablishReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.reestablishReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// reestablishReplicationCreateRequest creates the ReestablishReplication request. +func (client *VolumesClient) reestablishReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body ReestablishReplicationRequest, _ *VolumesClientBeginReestablishReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reestablishReplication" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginRelocate - Relocates volume to a new stamp +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginRelocateOptions contains the optional parameters for the VolumesClient.BeginRelocate method. +func (client *VolumesClient) BeginRelocate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginRelocateOptions) (*runtime.Poller[VolumesClientRelocateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.relocate(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientRelocateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientRelocateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Relocate - Relocates volume to a new stamp +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) relocate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginRelocateOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginRelocate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.relocateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// relocateCreateRequest creates the Relocate request. +func (client *VolumesClient) relocateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginRelocateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/relocate" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// ReplicationStatus - Get the status of the replication +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientReplicationStatusOptions contains the optional parameters for the VolumesClient.ReplicationStatus +// method. +func (client *VolumesClient) ReplicationStatus(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientReplicationStatusOptions) (VolumesClientReplicationStatusResponse, error) { + var err error + const operationName = "VolumesClient.ReplicationStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.replicationStatusCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return VolumesClientReplicationStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VolumesClientReplicationStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VolumesClientReplicationStatusResponse{}, err + } + resp, err := client.replicationStatusHandleResponse(httpResp) + return resp, err +} + +// replicationStatusCreateRequest creates the ReplicationStatus request. +func (client *VolumesClient) replicationStatusCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientReplicationStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// replicationStatusHandleResponse handles the ReplicationStatus response. +func (client *VolumesClient) replicationStatusHandleResponse(resp *http.Response) (VolumesClientReplicationStatusResponse, error) { + result := VolumesClientReplicationStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationStatus); err != nil { + return VolumesClientReplicationStatusResponse{}, err + } + return result, nil +} + +// BeginResetCifsPassword - Reset cifs password from volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginResetCifsPasswordOptions contains the optional parameters for the VolumesClient.BeginResetCifsPassword +// method. +func (client *VolumesClient) BeginResetCifsPassword(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginResetCifsPasswordOptions) (*runtime.Poller[VolumesClientResetCifsPasswordResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resetCifsPassword(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientResetCifsPasswordResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientResetCifsPasswordResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResetCifsPassword - Reset cifs password from volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) resetCifsPassword(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginResetCifsPasswordOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginResetCifsPassword" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetCifsPasswordCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resetCifsPasswordCreateRequest creates the ResetCifsPassword request. +func (client *VolumesClient) resetCifsPasswordCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginResetCifsPasswordOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resetCifsPassword" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginResyncReplication - Resync the connection on the destination volume. If the operation is ran on the source volume +// it will reverse-resync the connection and sync from destination to source. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginResyncReplicationOptions contains the optional parameters for the VolumesClient.BeginResyncReplication +// method. +func (client *VolumesClient) BeginResyncReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginResyncReplicationOptions) (*runtime.Poller[VolumesClientResyncReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resyncReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientResyncReplicationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientResyncReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResyncReplication - Resync the connection on the destination volume. If the operation is ran on the source volume it will +// reverse-resync the connection and sync from destination to source. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) resyncReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginResyncReplicationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginResyncReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resyncReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resyncReplicationCreateRequest creates the ResyncReplication request. +func (client *VolumesClient) resyncReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginResyncReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginRevert - Revert a volume to the snapshot specified in the body +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - body - Object for snapshot to revert supplied in the body of the operation. +// - options - VolumesClientBeginRevertOptions contains the optional parameters for the VolumesClient.BeginRevert method. +func (client *VolumesClient) BeginRevert(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumeRevert, options *VolumesClientBeginRevertOptions) (*runtime.Poller[VolumesClientRevertResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.revert(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientRevertResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientRevertResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Revert - Revert a volume to the snapshot specified in the body +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) revert(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumeRevert, options *VolumesClientBeginRevertOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginRevert" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.revertCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// revertCreateRequest creates the Revert request. +func (client *VolumesClient) revertCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumeRevert, _ *VolumesClientBeginRevertOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginRevertRelocation - Reverts the volume relocation process, cleans up the new volume and starts using the former-existing +// volume. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - options - VolumesClientBeginRevertRelocationOptions contains the optional parameters for the VolumesClient.BeginRevertRelocation +// method. +func (client *VolumesClient) BeginRevertRelocation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginRevertRelocationOptions) (*runtime.Poller[VolumesClientRevertRelocationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.revertRelocation(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientRevertRelocationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientRevertRelocationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RevertRelocation - Reverts the volume relocation process, cleans up the new volume and starts using the former-existing +// volume. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) revertRelocation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginRevertRelocationOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginRevertRelocation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.revertRelocationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// revertRelocationCreateRequest creates the RevertRelocation request. +func (client *VolumesClient) revertRelocationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, _ *VolumesClientBeginRevertRelocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revertRelocation" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdate - Patch the specified volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - accountName - The name of the NetApp account +// - poolName - The name of the capacity pool +// - volumeName - The name of the volume +// - body - Volume object supplied in the body of the operation. +// - options - VolumesClientBeginUpdateOptions contains the optional parameters for the VolumesClient.BeginUpdate method. +func (client *VolumesClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumePatch, options *VolumesClientBeginUpdateOptions) (*runtime.Poller[VolumesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VolumesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VolumesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Patch the specified volume +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *VolumesClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumePatch, options *VolumesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VolumesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *VolumesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumePatch, _ *VolumesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if accountName == "" { + return nil, errors.New("parameter accountName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if volumeName == "" { + return nil, errors.New("parameter volumeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_accountbackups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_accountbackups_client.go deleted file mode 100644 index a701a6bd..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_accountbackups_client.go +++ /dev/null @@ -1,249 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AccountBackupsClient contains the methods for the AccountBackups group. -// Don't use this type directly, use NewAccountBackupsClient() instead. -type AccountBackupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAccountBackupsClient creates a new instance of AccountBackupsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAccountBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountBackupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AccountBackupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginDelete - Delete the specified Backup for a Netapp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// backupName - The name of the backup -// options - AccountBackupsClientBeginDeleteOptions contains the optional parameters for the AccountBackupsClient.BeginDelete -// method. -func (client *AccountBackupsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, backupName string, options *AccountBackupsClientBeginDeleteOptions) (*runtime.Poller[AccountBackupsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, backupName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AccountBackupsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[AccountBackupsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the specified Backup for a Netapp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *AccountBackupsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, backupName string, options *AccountBackupsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, backupName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *AccountBackupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupName string, options *AccountBackupsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if backupName == "" { - return nil, errors.New("parameter backupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets the specified backup for a Netapp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// backupName - The name of the backup -// options - AccountBackupsClientGetOptions contains the optional parameters for the AccountBackupsClient.Get method. -func (client *AccountBackupsClient) Get(ctx context.Context, resourceGroupName string, accountName string, backupName string, options *AccountBackupsClientGetOptions) (AccountBackupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, backupName, options) - if err != nil { - return AccountBackupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AccountBackupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountBackupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *AccountBackupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupName string, options *AccountBackupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if backupName == "" { - return nil, errors.New("parameter backupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AccountBackupsClient) getHandleResponse(resp *http.Response) (AccountBackupsClientGetResponse, error) { - result := AccountBackupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Backup); err != nil { - return AccountBackupsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all Backups for a Netapp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// options - AccountBackupsClientListOptions contains the optional parameters for the AccountBackupsClient.List method. -func (client *AccountBackupsClient) NewListPager(resourceGroupName string, accountName string, options *AccountBackupsClientListOptions) *runtime.Pager[AccountBackupsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AccountBackupsClientListResponse]{ - More: func(page AccountBackupsClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *AccountBackupsClientListResponse) (AccountBackupsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) - if err != nil { - return AccountBackupsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AccountBackupsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountBackupsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AccountBackupsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountBackupsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AccountBackupsClient) listHandleResponse(resp *http.Response) (AccountBackupsClientListResponse, error) { - result := AccountBackupsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupsList); err != nil { - return AccountBackupsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_accounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_accounts_client.go deleted file mode 100644 index b0bcea62..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_accounts_client.go +++ /dev/null @@ -1,430 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AccountsClient contains the methods for the Accounts group. -// Don't use this type directly, use NewAccountsClient() instead. -type AccountsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAccountsClient creates a new instance of AccountsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AccountsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update the specified NetApp account within the resource group -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// body - NetApp Account object supplied in the body of the operation. -// options - AccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the AccountsClient.BeginCreateOrUpdate -// method. -func (client *AccountsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, body Account, options *AccountsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AccountsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, accountName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AccountsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[AccountsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update the specified NetApp account within the resource group -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *AccountsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, body Account, options *AccountsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *AccountsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, body Account, options *AccountsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginDelete - Delete the specified NetApp account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// options - AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method. -func (client *AccountsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginDeleteOptions) (*runtime.Poller[AccountsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AccountsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[AccountsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the specified NetApp account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *AccountsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Get the NetApp account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// options - AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method. -func (client *AccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientGetOptions) (AccountsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, options) - if err != nil { - return AccountsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AccountsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *AccountsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *AccountsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AccountsClient) getHandleResponse(resp *http.Response) (AccountsClientGetResponse, error) { - result := AccountsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Account); err != nil { - return AccountsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List and describe all NetApp accounts in the resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// options - AccountsClientListOptions contains the optional parameters for the AccountsClient.List method. -func (client *AccountsClient) NewListPager(resourceGroupName string, options *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AccountsClientListResponse]{ - More: func(page AccountsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AccountsClientListResponse) (AccountsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AccountsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AccountsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AccountsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *AccountsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AccountsClient) listHandleResponse(resp *http.Response) (AccountsClientListResponse, error) { - result := AccountsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AccountList); err != nil { - return AccountsClientListResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - List and describe all NetApp accounts in the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.ListBySubscription -// method. -func (client *AccountsClient) NewListBySubscriptionPager(options *AccountsClientListBySubscriptionOptions) *runtime.Pager[AccountsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[AccountsClientListBySubscriptionResponse]{ - More: func(page AccountsClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AccountsClientListBySubscriptionResponse) (AccountsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AccountsClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AccountsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AccountsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *AccountsClient) listBySubscriptionCreateRequest(ctx context.Context, options *AccountsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *AccountsClient) listBySubscriptionHandleResponse(resp *http.Response) (AccountsClientListBySubscriptionResponse, error) { - result := AccountsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AccountList); err != nil { - return AccountsClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// BeginUpdate - Patch the specified NetApp account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// body - NetApp Account object supplied in the body of the operation. -// options - AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method. -func (client *AccountsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, body AccountPatch, options *AccountsClientBeginUpdateOptions) (*runtime.Poller[AccountsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, accountName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AccountsClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[AccountsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Patch the specified NetApp account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *AccountsClient) update(ctx context.Context, resourceGroupName string, accountName string, body AccountPatch, options *AccountsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *AccountsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, body AccountPatch, options *AccountsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_backuppolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_backuppolicies_client.go deleted file mode 100644 index 5e41b053..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_backuppolicies_client.go +++ /dev/null @@ -1,391 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupPoliciesClient contains the methods for the BackupPolicies group. -// Don't use this type directly, use NewBackupPoliciesClient() instead. -type BackupPoliciesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupPoliciesClient creates a new instance of BackupPoliciesClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupPoliciesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupPoliciesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - Create a backup policy for Netapp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// backupPolicyName - Backup policy Name which uniquely identify backup policy. -// body - Backup policy object supplied in the body of the operation. -// options - BackupPoliciesClientBeginCreateOptions contains the optional parameters for the BackupPoliciesClient.BeginCreate -// method. -func (client *BackupPoliciesClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy, options *BackupPoliciesClientBeginCreateOptions) (*runtime.Poller[BackupPoliciesClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, accountName, backupPolicyName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BackupPoliciesClientCreateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BackupPoliciesClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - Create a backup policy for Netapp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *BackupPoliciesClient) create(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy, options *BackupPoliciesClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, backupPolicyName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *BackupPoliciesClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicy, options *BackupPoliciesClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if backupPolicyName == "" { - return nil, errors.New("parameter backupPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginDelete - Delete backup policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// backupPolicyName - Backup policy Name which uniquely identify backup policy. -// options - BackupPoliciesClientBeginDeleteOptions contains the optional parameters for the BackupPoliciesClient.BeginDelete -// method. -func (client *BackupPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, options *BackupPoliciesClientBeginDeleteOptions) (*runtime.Poller[BackupPoliciesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, backupPolicyName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BackupPoliciesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[BackupPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete backup policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *BackupPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, options *BackupPoliciesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, backupPolicyName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *BackupPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, options *BackupPoliciesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if backupPolicyName == "" { - return nil, errors.New("parameter backupPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Get a particular backup Policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// backupPolicyName - Backup policy Name which uniquely identify backup policy. -// options - BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method. -func (client *BackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, options *BackupPoliciesClientGetOptions) (BackupPoliciesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, backupPolicyName, options) - if err != nil { - return BackupPoliciesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupPoliciesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupPoliciesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, options *BackupPoliciesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if backupPolicyName == "" { - return nil, errors.New("parameter backupPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupPoliciesClient) getHandleResponse(resp *http.Response) (BackupPoliciesClientGetResponse, error) { - result := BackupPoliciesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupPolicy); err != nil { - return BackupPoliciesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List backup policies for Netapp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// options - BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.List method. -func (client *BackupPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *BackupPoliciesClientListOptions) *runtime.Pager[BackupPoliciesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupPoliciesClientListResponse]{ - More: func(page BackupPoliciesClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *BackupPoliciesClientListResponse) (BackupPoliciesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) - if err != nil { - return BackupPoliciesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupPoliciesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *BackupPoliciesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupPoliciesClient) listHandleResponse(resp *http.Response) (BackupPoliciesClientListResponse, error) { - result := BackupPoliciesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupPoliciesList); err != nil { - return BackupPoliciesClientListResponse{}, err - } - return result, nil -} - -// BeginUpdate - Patch a backup policy for Netapp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// backupPolicyName - Backup policy Name which uniquely identify backup policy. -// body - Backup policy object supplied in the body of the operation. -// options - BackupPoliciesClientBeginUpdateOptions contains the optional parameters for the BackupPoliciesClient.BeginUpdate -// method. -func (client *BackupPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch, options *BackupPoliciesClientBeginUpdateOptions) (*runtime.Poller[BackupPoliciesClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, accountName, backupPolicyName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BackupPoliciesClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BackupPoliciesClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Patch a backup policy for Netapp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *BackupPoliciesClient) update(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch, options *BackupPoliciesClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, backupPolicyName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *BackupPoliciesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, backupPolicyName string, body BackupPolicyPatch, options *BackupPoliciesClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if backupPolicyName == "" { - return nil, errors.New("parameter backupPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupPolicyName}", url.PathEscape(backupPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_backups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_backups_client.go deleted file mode 100644 index bee3602b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_backups_client.go +++ /dev/null @@ -1,573 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupsClient contains the methods for the Backups group. -// Don't use this type directly, use NewBackupsClient() instead. -type BackupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupsClient creates a new instance of BackupsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - Create a backup for the volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// backupName - The name of the backup -// body - Backup object supplied in the body of the operation. -// options - BackupsClientBeginCreateOptions contains the optional parameters for the BackupsClient.BeginCreate method. -func (client *BackupsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, body Backup, options *BackupsClientBeginCreateOptions) (*runtime.Poller[BackupsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, accountName, poolName, volumeName, backupName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BackupsClientCreateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[BackupsClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - Create a backup for the volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *BackupsClient) create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, body Backup, options *BackupsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, backupName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *BackupsClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, body Backup, options *BackupsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if backupName == "" { - return nil, errors.New("parameter backupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginDelete - Delete a backup of the volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// backupName - The name of the backup -// options - BackupsClientBeginDeleteOptions contains the optional parameters for the BackupsClient.BeginDelete method. -func (client *BackupsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, options *BackupsClientBeginDeleteOptions) (*runtime.Poller[BackupsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, volumeName, backupName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BackupsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[BackupsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete a backup of the volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *BackupsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, options *BackupsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, backupName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *BackupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, options *BackupsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if backupName == "" { - return nil, errors.New("parameter backupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets the specified backup of the volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// backupName - The name of the backup -// options - BackupsClientGetOptions contains the optional parameters for the BackupsClient.Get method. -func (client *BackupsClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, options *BackupsClientGetOptions) (BackupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, backupName, options) - if err != nil { - return BackupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, options *BackupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if backupName == "" { - return nil, errors.New("parameter backupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupsClient) getHandleResponse(resp *http.Response) (BackupsClientGetResponse, error) { - result := BackupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Backup); err != nil { - return BackupsClientGetResponse{}, err - } - return result, nil -} - -// GetStatus - Get the status of the backup for a volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - BackupsClientGetStatusOptions contains the optional parameters for the BackupsClient.GetStatus method. -func (client *BackupsClient) GetStatus(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *BackupsClientGetStatusOptions) (BackupsClientGetStatusResponse, error) { - req, err := client.getStatusCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return BackupsClientGetStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupsClientGetStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupsClientGetStatusResponse{}, runtime.NewResponseError(resp) - } - return client.getStatusHandleResponse(resp) -} - -// getStatusCreateRequest creates the GetStatus request. -func (client *BackupsClient) getStatusCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *BackupsClientGetStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getStatusHandleResponse handles the GetStatus response. -func (client *BackupsClient) getStatusHandleResponse(resp *http.Response) (BackupsClientGetStatusResponse, error) { - result := BackupsClientGetStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupStatus); err != nil { - return BackupsClientGetStatusResponse{}, err - } - return result, nil -} - -// GetVolumeRestoreStatus - Get the status of the restore for a volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - BackupsClientGetVolumeRestoreStatusOptions contains the optional parameters for the BackupsClient.GetVolumeRestoreStatus -// method. -func (client *BackupsClient) GetVolumeRestoreStatus(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *BackupsClientGetVolumeRestoreStatusOptions) (BackupsClientGetVolumeRestoreStatusResponse, error) { - req, err := client.getVolumeRestoreStatusCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return BackupsClientGetVolumeRestoreStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupsClientGetVolumeRestoreStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupsClientGetVolumeRestoreStatusResponse{}, runtime.NewResponseError(resp) - } - return client.getVolumeRestoreStatusHandleResponse(resp) -} - -// getVolumeRestoreStatusCreateRequest creates the GetVolumeRestoreStatus request. -func (client *BackupsClient) getVolumeRestoreStatusCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *BackupsClientGetVolumeRestoreStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/restoreStatus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVolumeRestoreStatusHandleResponse handles the GetVolumeRestoreStatus response. -func (client *BackupsClient) getVolumeRestoreStatusHandleResponse(resp *http.Response) (BackupsClientGetVolumeRestoreStatusResponse, error) { - result := BackupsClientGetVolumeRestoreStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RestoreStatus); err != nil { - return BackupsClientGetVolumeRestoreStatusResponse{}, err - } - return result, nil -} - -// NewListPager - List all backups for a volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - BackupsClientListOptions contains the optional parameters for the BackupsClient.List method. -func (client *BackupsClient) NewListPager(resourceGroupName string, accountName string, poolName string, volumeName string, options *BackupsClientListOptions) *runtime.Pager[BackupsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupsClientListResponse]{ - More: func(page BackupsClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *BackupsClientListResponse) (BackupsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return BackupsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *BackupsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupsClient) listHandleResponse(resp *http.Response) (BackupsClientListResponse, error) { - result := BackupsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupsList); err != nil { - return BackupsClientListResponse{}, err - } - return result, nil -} - -// BeginUpdate - Patch a backup for the volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// backupName - The name of the backup -// options - BackupsClientBeginUpdateOptions contains the optional parameters for the BackupsClient.BeginUpdate method. -func (client *BackupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, options *BackupsClientBeginUpdateOptions) (*runtime.Poller[BackupsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, accountName, poolName, volumeName, backupName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BackupsClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[BackupsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Patch a backup for the volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *BackupsClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, options *BackupsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, backupName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *BackupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, backupName string, options *BackupsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if backupName == "" { - return nil, errors.New("parameter backupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupName}", url.PathEscape(backupName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Body != nil { - return req, runtime.MarshalAsJSON(req, *options.Body) - } - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_constants.go deleted file mode 100644 index 93b26c95..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_constants.go +++ /dev/null @@ -1,401 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -const ( - moduleName = "armnetapp" - moduleVersion = "v1.0.0" -) - -// ActiveDirectoryStatus - Status of the Active Directory -type ActiveDirectoryStatus string - -const ( - // ActiveDirectoryStatusCreated - Active Directory created but not in use - ActiveDirectoryStatusCreated ActiveDirectoryStatus = "Created" - // ActiveDirectoryStatusDeleted - Active Directory Deleted - ActiveDirectoryStatusDeleted ActiveDirectoryStatus = "Deleted" - // ActiveDirectoryStatusError - Error with the Active Directory - ActiveDirectoryStatusError ActiveDirectoryStatus = "Error" - // ActiveDirectoryStatusInUse - Active Directory in use by SMB Volume - ActiveDirectoryStatusInUse ActiveDirectoryStatus = "InUse" - // ActiveDirectoryStatusUpdating - Active Directory Updating - ActiveDirectoryStatusUpdating ActiveDirectoryStatus = "Updating" -) - -// PossibleActiveDirectoryStatusValues returns the possible values for the ActiveDirectoryStatus const type. -func PossibleActiveDirectoryStatusValues() []ActiveDirectoryStatus { - return []ActiveDirectoryStatus{ - ActiveDirectoryStatusCreated, - ActiveDirectoryStatusDeleted, - ActiveDirectoryStatusError, - ActiveDirectoryStatusInUse, - ActiveDirectoryStatusUpdating, - } -} - -// ApplicationType - Application Type -type ApplicationType string - -const ( - ApplicationTypeSAPHANA ApplicationType = "SAP-HANA" -) - -// PossibleApplicationTypeValues returns the possible values for the ApplicationType const type. -func PossibleApplicationTypeValues() []ApplicationType { - return []ApplicationType{ - ApplicationTypeSAPHANA, - } -} - -// AvsDataStore - Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose -type AvsDataStore string - -const ( - // AvsDataStoreDisabled - avsDataStore is disabled - AvsDataStoreDisabled AvsDataStore = "Disabled" - // AvsDataStoreEnabled - avsDataStore is enabled - AvsDataStoreEnabled AvsDataStore = "Enabled" -) - -// PossibleAvsDataStoreValues returns the possible values for the AvsDataStore const type. -func PossibleAvsDataStoreValues() []AvsDataStore { - return []AvsDataStore{ - AvsDataStoreDisabled, - AvsDataStoreEnabled, - } -} - -// BackupType - Type of backup Manual or Scheduled -type BackupType string - -const ( - // BackupTypeManual - Manual backup - BackupTypeManual BackupType = "Manual" - // BackupTypeScheduled - Scheduled backup - BackupTypeScheduled BackupType = "Scheduled" -) - -// PossibleBackupTypeValues returns the possible values for the BackupType const type. -func PossibleBackupTypeValues() []BackupType { - return []BackupType{ - BackupTypeManual, - BackupTypeScheduled, - } -} - -// CheckNameResourceTypes - Resource type used for verification. -type CheckNameResourceTypes string - -const ( - CheckNameResourceTypesMicrosoftNetAppNetAppAccounts CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts" - CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPools CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools" - CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumes CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" - CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots CheckNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" -) - -// PossibleCheckNameResourceTypesValues returns the possible values for the CheckNameResourceTypes const type. -func PossibleCheckNameResourceTypesValues() []CheckNameResourceTypes { - return []CheckNameResourceTypes{ - CheckNameResourceTypesMicrosoftNetAppNetAppAccounts, - CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPools, - CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumes, - CheckNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots, - } -} - -// CheckQuotaNameResourceTypes - Resource type used for verification. -type CheckQuotaNameResourceTypes string - -const ( - CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccounts CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts" - CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPools CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools" - CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumes CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" - CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots CheckQuotaNameResourceTypes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" -) - -// PossibleCheckQuotaNameResourceTypesValues returns the possible values for the CheckQuotaNameResourceTypes const type. -func PossibleCheckQuotaNameResourceTypesValues() []CheckQuotaNameResourceTypes { - return []CheckQuotaNameResourceTypes{ - CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccounts, - CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPools, - CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumes, - CheckQuotaNameResourceTypesMicrosoftNetAppNetAppAccountsCapacityPoolsVolumesSnapshots, - } -} - -// ChownMode - This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can -// change the ownership of the file. unrestricted - Non-root users can change ownership of -// files that they own. -type ChownMode string - -const ( - ChownModeRestricted ChownMode = "Restricted" - ChownModeUnrestricted ChownMode = "Unrestricted" -) - -// PossibleChownModeValues returns the possible values for the ChownMode const type. -func PossibleChownModeValues() []ChownMode { - return []ChownMode{ - ChownModeRestricted, - ChownModeUnrestricted, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// EnableSubvolumes - Flag indicating whether subvolume operations are enabled on the volume -type EnableSubvolumes string - -const ( - // EnableSubvolumesDisabled - subvolumes are not enabled - EnableSubvolumesDisabled EnableSubvolumes = "Disabled" - // EnableSubvolumesEnabled - subvolumes are enabled - EnableSubvolumesEnabled EnableSubvolumes = "Enabled" -) - -// PossibleEnableSubvolumesValues returns the possible values for the EnableSubvolumes const type. -func PossibleEnableSubvolumesValues() []EnableSubvolumes { - return []EnableSubvolumes{ - EnableSubvolumesDisabled, - EnableSubvolumesEnabled, - } -} - -// EncryptionType - Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes -// in it. This value can only be set when creating new pool. -type EncryptionType string - -const ( - // EncryptionTypeDouble - EncryptionType Double, volumes will use double encryption at rest - EncryptionTypeDouble EncryptionType = "Double" - // EncryptionTypeSingle - EncryptionType Single, volumes will use single encryption at rest - EncryptionTypeSingle EncryptionType = "Single" -) - -// PossibleEncryptionTypeValues returns the possible values for the EncryptionType const type. -func PossibleEncryptionTypeValues() []EncryptionType { - return []EncryptionType{ - EncryptionTypeDouble, - EncryptionTypeSingle, - } -} - -// EndpointType - Indicates whether the local volume is the source or destination for the Volume Replication -type EndpointType string - -const ( - EndpointTypeDst EndpointType = "dst" - EndpointTypeSrc EndpointType = "src" -) - -// PossibleEndpointTypeValues returns the possible values for the EndpointType const type. -func PossibleEndpointTypeValues() []EndpointType { - return []EndpointType{ - EndpointTypeDst, - EndpointTypeSrc, - } -} - -// InAvailabilityReasonType - Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists -// indicates that the name is already in use and is therefore unavailable. -type InAvailabilityReasonType string - -const ( - InAvailabilityReasonTypeAlreadyExists InAvailabilityReasonType = "AlreadyExists" - InAvailabilityReasonTypeInvalid InAvailabilityReasonType = "Invalid" -) - -// PossibleInAvailabilityReasonTypeValues returns the possible values for the InAvailabilityReasonType const type. -func PossibleInAvailabilityReasonTypeValues() []InAvailabilityReasonType { - return []InAvailabilityReasonType{ - InAvailabilityReasonTypeAlreadyExists, - InAvailabilityReasonTypeInvalid, - } -} - -type MetricAggregationType string - -const ( - MetricAggregationTypeAverage MetricAggregationType = "Average" -) - -// PossibleMetricAggregationTypeValues returns the possible values for the MetricAggregationType const type. -func PossibleMetricAggregationTypeValues() []MetricAggregationType { - return []MetricAggregationType{ - MetricAggregationTypeAverage, - } -} - -// MirrorState - The status of the replication -type MirrorState string - -const ( - MirrorStateBroken MirrorState = "Broken" - MirrorStateMirrored MirrorState = "Mirrored" - MirrorStateUninitialized MirrorState = "Uninitialized" -) - -// PossibleMirrorStateValues returns the possible values for the MirrorState const type. -func PossibleMirrorStateValues() []MirrorState { - return []MirrorState{ - MirrorStateBroken, - MirrorStateMirrored, - MirrorStateUninitialized, - } -} - -// NetworkFeatures - Basic network, or Standard features available to the volume. -type NetworkFeatures string - -const ( - // NetworkFeaturesBasic - Basic network feature. - NetworkFeaturesBasic NetworkFeatures = "Basic" - // NetworkFeaturesStandard - Standard network feature. - NetworkFeaturesStandard NetworkFeatures = "Standard" -) - -// PossibleNetworkFeaturesValues returns the possible values for the NetworkFeatures const type. -func PossibleNetworkFeaturesValues() []NetworkFeatures { - return []NetworkFeatures{ - NetworkFeaturesBasic, - NetworkFeaturesStandard, - } -} - -// QosType - The qos type of the pool -type QosType string - -const ( - // QosTypeAuto - qos type Auto - QosTypeAuto QosType = "Auto" - // QosTypeManual - qos type Manual - QosTypeManual QosType = "Manual" -) - -// PossibleQosTypeValues returns the possible values for the QosType const type. -func PossibleQosTypeValues() []QosType { - return []QosType{ - QosTypeAuto, - QosTypeManual, - } -} - -// RelationshipStatus - Status of the mirror relationship -type RelationshipStatus string - -const ( - RelationshipStatusIdle RelationshipStatus = "Idle" - RelationshipStatusTransferring RelationshipStatus = "Transferring" -) - -// PossibleRelationshipStatusValues returns the possible values for the RelationshipStatus const type. -func PossibleRelationshipStatusValues() []RelationshipStatus { - return []RelationshipStatus{ - RelationshipStatusIdle, - RelationshipStatusTransferring, - } -} - -// ReplicationSchedule - Schedule -type ReplicationSchedule string - -const ( - ReplicationSchedule10Minutely ReplicationSchedule = "_10minutely" - ReplicationScheduleDaily ReplicationSchedule = "daily" - ReplicationScheduleHourly ReplicationSchedule = "hourly" -) - -// PossibleReplicationScheduleValues returns the possible values for the ReplicationSchedule const type. -func PossibleReplicationScheduleValues() []ReplicationSchedule { - return []ReplicationSchedule{ - ReplicationSchedule10Minutely, - ReplicationScheduleDaily, - ReplicationScheduleHourly, - } -} - -// SecurityStyle - The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol -type SecurityStyle string - -const ( - SecurityStyleNtfs SecurityStyle = "ntfs" - SecurityStyleUnix SecurityStyle = "unix" -) - -// PossibleSecurityStyleValues returns the possible values for the SecurityStyle const type. -func PossibleSecurityStyleValues() []SecurityStyle { - return []SecurityStyle{ - SecurityStyleNtfs, - SecurityStyleUnix, - } -} - -// ServiceLevel - The service level of the file system -type ServiceLevel string - -const ( - // ServiceLevelPremium - Premium service level - ServiceLevelPremium ServiceLevel = "Premium" - // ServiceLevelStandard - Standard service level - ServiceLevelStandard ServiceLevel = "Standard" - // ServiceLevelStandardZRS - Zone redundant storage service level - ServiceLevelStandardZRS ServiceLevel = "StandardZRS" - // ServiceLevelUltra - Ultra service level - ServiceLevelUltra ServiceLevel = "Ultra" -) - -// PossibleServiceLevelValues returns the possible values for the ServiceLevel const type. -func PossibleServiceLevelValues() []ServiceLevel { - return []ServiceLevel{ - ServiceLevelPremium, - ServiceLevelStandard, - ServiceLevelStandardZRS, - ServiceLevelUltra, - } -} - -// VolumeStorageToNetworkProximity - Provides storage to network proximity information for the volume. -type VolumeStorageToNetworkProximity string - -const ( - // VolumeStorageToNetworkProximityDefault - Basic storage to network connectivity. - VolumeStorageToNetworkProximityDefault VolumeStorageToNetworkProximity = "Default" - // VolumeStorageToNetworkProximityT1 - Standard T1 storage to network connectivity. - VolumeStorageToNetworkProximityT1 VolumeStorageToNetworkProximity = "T1" - // VolumeStorageToNetworkProximityT2 - Standard T2 storage to network connectivity. - VolumeStorageToNetworkProximityT2 VolumeStorageToNetworkProximity = "T2" -) - -// PossibleVolumeStorageToNetworkProximityValues returns the possible values for the VolumeStorageToNetworkProximity const type. -func PossibleVolumeStorageToNetworkProximityValues() []VolumeStorageToNetworkProximity { - return []VolumeStorageToNetworkProximity{ - VolumeStorageToNetworkProximityDefault, - VolumeStorageToNetworkProximityT1, - VolumeStorageToNetworkProximityT2, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_models.go deleted file mode 100644 index 81df854e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_models.go +++ /dev/null @@ -1,2055 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import "time" - -// Account - NetApp account resource -type Account struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // NetApp Account properties - Properties *AccountProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AccountBackupsClientBeginDeleteOptions contains the optional parameters for the AccountBackupsClient.BeginDelete method. -type AccountBackupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountBackupsClientGetOptions contains the optional parameters for the AccountBackupsClient.Get method. -type AccountBackupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AccountBackupsClientListOptions contains the optional parameters for the AccountBackupsClient.List method. -type AccountBackupsClientListOptions struct { - // placeholder for future optional parameters -} - -// AccountEncryption - Encryption settings -type AccountEncryption struct { - // Encryption Key Source. Possible values are: 'Microsoft.NetApp'. - KeySource *string `json:"keySource,omitempty"` -} - -// AccountList - List of NetApp account resources -type AccountList struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // Multiple NetApp accounts - Value []*Account `json:"value,omitempty"` -} - -// AccountPatch - NetApp account patch resource -type AccountPatch struct { - // Resource location - Location *string `json:"location,omitempty"` - - // NetApp Account properties - Properties *AccountProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AccountProperties - NetApp account properties -type AccountProperties struct { - // Active Directories - ActiveDirectories []*ActiveDirectory `json:"activeDirectories,omitempty"` - - // Encryption settings - Encryption *AccountEncryption `json:"encryption,omitempty"` - - // READ-ONLY; Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// AccountsClientBeginCreateOrUpdateOptions contains the optional parameters for the AccountsClient.BeginCreateOrUpdate method. -type AccountsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientBeginDeleteOptions contains the optional parameters for the AccountsClient.BeginDelete method. -type AccountsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientBeginUpdateOptions contains the optional parameters for the AccountsClient.BeginUpdate method. -type AccountsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientGetOptions contains the optional parameters for the AccountsClient.Get method. -type AccountsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientListBySubscriptionOptions contains the optional parameters for the AccountsClient.ListBySubscription method. -type AccountsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientListOptions contains the optional parameters for the AccountsClient.List method. -type AccountsClientListOptions struct { - // placeholder for future optional parameters -} - -// ActiveDirectory - Active Directory -type ActiveDirectory struct { - // Id of the Active Directory - ActiveDirectoryID *string `json:"activeDirectoryId,omitempty"` - - // Name of the active directory machine. This optional parameter is used only while creating kerberos volume - AdName *string `json:"adName,omitempty"` - - // Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier - Administrators []*string `json:"administrators,omitempty"` - - // If enabled, AES encryption will be enabled for SMB communication. - AesEncryption *bool `json:"aesEncryption,omitempty"` - - // If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. - AllowLocalNfsUsersWithLdap *bool `json:"allowLocalNfsUsersWithLdap,omitempty"` - - // Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier - BackupOperators []*string `json:"backupOperators,omitempty"` - - // Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain - DNS *string `json:"dns,omitempty"` - - // Name of the Active Directory domain - Domain *string `json:"domain,omitempty"` - - // If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. - EncryptDCConnections *bool `json:"encryptDCConnections,omitempty"` - - // kdc server IP addresses for the active directory machine. This optional parameter is used only while creating kerberos - // volume. - KdcIP *string `json:"kdcIP,omitempty"` - - // Specifies whether or not the LDAP traffic needs to be secured via TLS. - LdapOverTLS *bool `json:"ldapOverTLS,omitempty"` - - // LDAP Search scope options - LdapSearchScope *LdapSearchScopeOpt `json:"ldapSearchScope,omitempty"` - - // Specifies whether or not the LDAP traffic needs to be signed. - LdapSigning *bool `json:"ldapSigning,omitempty"` - - // The Organizational Unit (OU) within the Windows Active Directory - OrganizationalUnit *string `json:"organizationalUnit,omitempty"` - - // Plain text password of Active Directory domain administrator, value is masked in the response - Password *string `json:"password,omitempty"` - - // Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares - // for SQL). A list of unique usernames without domain specifier - SecurityOperators []*string `json:"securityOperators,omitempty"` - - // When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's - // self-signed root CA certificate, this optional parameter is used only for - // dual protocol with LDAP user-mapping volumes. - ServerRootCACertificate *string `json:"serverRootCACertificate,omitempty"` - - // The Active Directory site the service will limit Domain Controller discovery to - Site *string `json:"site,omitempty"` - - // NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes - SmbServerName *string `json:"smbServerName,omitempty"` - - // Username of Active Directory domain administrator - Username *string `json:"username,omitempty"` - - // READ-ONLY; Status of the Active Directory - Status *ActiveDirectoryStatus `json:"status,omitempty" azure:"ro"` - - // READ-ONLY; Any details in regards to the Status of the Active Directory - StatusDetails *string `json:"statusDetails,omitempty" azure:"ro"` -} - -// AuthorizeRequest - Authorize request -type AuthorizeRequest struct { - // Resource id of the remote volume - RemoteVolumeResourceID *string `json:"remoteVolumeResourceId,omitempty"` -} - -// Backup of a Volume -type Backup struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; Backup Properties - Properties *BackupProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupPatch - Backup patch -type BackupPatch struct { - // Backup Properties - Properties *BackupProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` -} - -// BackupPoliciesClientBeginCreateOptions contains the optional parameters for the BackupPoliciesClient.BeginCreate method. -type BackupPoliciesClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupPoliciesClientBeginDeleteOptions contains the optional parameters for the BackupPoliciesClient.BeginDelete method. -type BackupPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupPoliciesClientBeginUpdateOptions contains the optional parameters for the BackupPoliciesClient.BeginUpdate method. -type BackupPoliciesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupPoliciesClientGetOptions contains the optional parameters for the BackupPoliciesClient.Get method. -type BackupPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.List method. -type BackupPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - -// BackupPoliciesList - List of Backup Policies -type BackupPoliciesList struct { - // A list of backup policies - Value []*BackupPolicy `json:"value,omitempty"` -} - -// BackupPolicy - Backup policy information -type BackupPolicy struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; Backup policy Properties - Properties *BackupPolicyProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupPolicyDetails - Backup policy properties -type BackupPolicyDetails struct { - // Resource location - Location *string `json:"location,omitempty"` - - // Backup policy Properties - Properties *BackupPolicyProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupPolicyPatch - Backup policy Details for create and update -type BackupPolicyPatch struct { - // Resource location - Location *string `json:"location,omitempty"` - - // Backup policy Properties - Properties *BackupPolicyProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupPolicyProperties - Backup policy properties -type BackupPolicyProperties struct { - // Daily backups count to keep - DailyBackupsToKeep *int32 `json:"dailyBackupsToKeep,omitempty"` - - // The property to decide policy is enabled or not - Enabled *bool `json:"enabled,omitempty"` - - // Monthly backups count to keep - MonthlyBackupsToKeep *int32 `json:"monthlyBackupsToKeep,omitempty"` - - // Weekly backups count to keep - WeeklyBackupsToKeep *int32 `json:"weeklyBackupsToKeep,omitempty"` - - // READ-ONLY; Backup Policy Resource ID - BackupPolicyID *string `json:"backupPolicyId,omitempty" azure:"ro"` - - // READ-ONLY; Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; A list of volumes assigned to this policy - VolumeBackups []*VolumeBackups `json:"volumeBackups,omitempty" azure:"ro"` - - // READ-ONLY; Volumes using current backup policy - VolumesAssigned *int32 `json:"volumesAssigned,omitempty" azure:"ro"` -} - -// BackupProperties - Backup properties -type BackupProperties struct { - // Label for backup - Label *string `json:"label,omitempty"` - - // Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups - UseExistingSnapshot *bool `json:"useExistingSnapshot,omitempty"` - - // READ-ONLY; UUID v4 used to identify the Backup - BackupID *string `json:"backupId,omitempty" azure:"ro"` - - // READ-ONLY; Type of backup Manual or Scheduled - BackupType *BackupType `json:"backupType,omitempty" azure:"ro"` - - // READ-ONLY; The creation date of the backup - CreationDate *time.Time `json:"creationDate,omitempty" azure:"ro"` - - // READ-ONLY; Failure reason - FailureReason *string `json:"failureReason,omitempty" azure:"ro"` - - // READ-ONLY; Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Size of backup - Size *int64 `json:"size,omitempty" azure:"ro"` - - // READ-ONLY; Volume name - VolumeName *string `json:"volumeName,omitempty" azure:"ro"` -} - -// BackupStatus - Backup status -type BackupStatus struct { - // READ-ONLY; Displays error message if the backup is in an error state - ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` - - // READ-ONLY; Backup health status - Healthy *bool `json:"healthy,omitempty" azure:"ro"` - - // READ-ONLY; Displays the last transfer size - LastTransferSize *int64 `json:"lastTransferSize,omitempty" azure:"ro"` - - // READ-ONLY; Displays the last transfer type - LastTransferType *string `json:"lastTransferType,omitempty" azure:"ro"` - - // READ-ONLY; The status of the backup - MirrorState *MirrorState `json:"mirrorState,omitempty" azure:"ro"` - - // READ-ONLY; Status of the backup mirror relationship - RelationshipStatus *RelationshipStatus `json:"relationshipStatus,omitempty" azure:"ro"` - - // READ-ONLY; Displays the total bytes transferred - TotalTransferBytes *int64 `json:"totalTransferBytes,omitempty" azure:"ro"` - - // READ-ONLY; Reason for the unhealthy backup relationship - UnhealthyReason *string `json:"unhealthyReason,omitempty" azure:"ro"` -} - -// BackupsClientBeginCreateOptions contains the optional parameters for the BackupsClient.BeginCreate method. -type BackupsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupsClientBeginDeleteOptions contains the optional parameters for the BackupsClient.BeginDelete method. -type BackupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupsClientBeginUpdateOptions contains the optional parameters for the BackupsClient.BeginUpdate method. -type BackupsClientBeginUpdateOptions struct { - // Backup object supplied in the body of the operation. - Body *BackupPatch - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BackupsClientGetOptions contains the optional parameters for the BackupsClient.Get method. -type BackupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupsClientGetStatusOptions contains the optional parameters for the BackupsClient.GetStatus method. -type BackupsClientGetStatusOptions struct { - // placeholder for future optional parameters -} - -// BackupsClientGetVolumeRestoreStatusOptions contains the optional parameters for the BackupsClient.GetVolumeRestoreStatus -// method. -type BackupsClientGetVolumeRestoreStatusOptions struct { - // placeholder for future optional parameters -} - -// BackupsClientListOptions contains the optional parameters for the BackupsClient.List method. -type BackupsClientListOptions struct { - // placeholder for future optional parameters -} - -// BackupsList - List of Backups -type BackupsList struct { - // A list of Backups - Value []*Backup `json:"value,omitempty"` -} - -// BreakReplicationRequest - Break replication request -type BreakReplicationRequest struct { - // If replication is in status transferring and you want to force break the replication, set to true - ForceBreakReplication *bool `json:"forceBreakReplication,omitempty"` -} - -// CapacityPool - Capacity pool resource -type CapacityPool struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; Capacity pool properties - Properties *PoolProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CapacityPoolList - List of capacity pool resources -type CapacityPoolList struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Capacity pools - Value []*CapacityPool `json:"value,omitempty"` -} - -// CapacityPoolPatch - Capacity pool patch resource -type CapacityPoolPatch struct { - // Resource location - Location *string `json:"location,omitempty"` - - // Capacity pool properties - Properties *PoolPatchProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CheckAvailabilityResponse - Information regarding availability of a resource. -type CheckAvailabilityResponse struct { - // true indicates name is valid and available. false indicates the name is invalid, unavailable, or both. - IsAvailable *bool `json:"isAvailable,omitempty"` - - // If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements - // so that the user can select a valid name. If reason == AlreadyExists, - // explain that resource name is already in use, and direct them to select a different name. - Message *string `json:"message,omitempty"` - - // Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that - // the name is already in use and is therefore unavailable. - Reason *InAvailabilityReasonType `json:"reason,omitempty"` -} - -// CloudError - An error response from the service. -type CloudError struct { - // Cloud error body. - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorBody - An error response from the service. -type CloudErrorBody struct { - // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - - // A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` -} - -// DailySchedule - Daily Schedule properties -type DailySchedule struct { - // Indicates which hour in UTC timezone a snapshot should be taken - Hour *int32 `json:"hour,omitempty"` - - // Indicates which minute snapshot should be taken - Minute *int32 `json:"minute,omitempty"` - - // Daily snapshot count to keep - SnapshotsToKeep *int32 `json:"snapshotsToKeep,omitempty"` - - // Resource size in bytes, current storage usage for the volume in bytes - UsedBytes *int64 `json:"usedBytes,omitempty"` -} - -// Dimension of blobs, possibly be blob type or access tier. -type Dimension struct { - // Display name of dimension. - DisplayName *string `json:"displayName,omitempty"` - - // Display name of dimension. - Name *string `json:"name,omitempty"` -} - -// ExportPolicyRule - Volume Export Policy Rule -type ExportPolicyRule struct { - // Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names - AllowedClients *string `json:"allowedClients,omitempty"` - - // This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the - // ownership of the file. unrestricted - Non-root users can change ownership of - // files that they own. - ChownMode *ChownMode `json:"chownMode,omitempty"` - - // Allows CIFS protocol - Cifs *bool `json:"cifs,omitempty"` - - // Has root access to volume - HasRootAccess *bool `json:"hasRootAccess,omitempty"` - - // Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later - Kerberos5IReadOnly *bool `json:"kerberos5iReadOnly,omitempty"` - - // Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later - Kerberos5IReadWrite *bool `json:"kerberos5iReadWrite,omitempty"` - - // Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later - Kerberos5PReadOnly *bool `json:"kerberos5pReadOnly,omitempty"` - - // Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later - Kerberos5PReadWrite *bool `json:"kerberos5pReadWrite,omitempty"` - - // Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later - Kerberos5ReadOnly *bool `json:"kerberos5ReadOnly,omitempty"` - - // Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later - Kerberos5ReadWrite *bool `json:"kerberos5ReadWrite,omitempty"` - - // Allows NFSv3 protocol. Enable only for NFSv3 type volumes - Nfsv3 *bool `json:"nfsv3,omitempty"` - - // Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes - Nfsv41 *bool `json:"nfsv41,omitempty"` - - // Order index - RuleIndex *int32 `json:"ruleIndex,omitempty"` - - // Read only access - UnixReadOnly *bool `json:"unixReadOnly,omitempty"` - - // Read and write access - UnixReadWrite *bool `json:"unixReadWrite,omitempty"` -} - -// FilePathAvailabilityRequest - File path availability request content - availability is based on the name and the subnetId. -type FilePathAvailabilityRequest struct { - // REQUIRED; File path to verify. - Name *string `json:"name,omitempty"` - - // REQUIRED; The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes - SubnetID *string `json:"subnetId,omitempty"` -} - -// HourlySchedule - Hourly Schedule properties -type HourlySchedule struct { - // Indicates which minute snapshot should be taken - Minute *int32 `json:"minute,omitempty"` - - // Hourly snapshot count to keep - SnapshotsToKeep *int32 `json:"snapshotsToKeep,omitempty"` - - // Resource size in bytes, current storage usage for the volume in bytes - UsedBytes *int64 `json:"usedBytes,omitempty"` -} - -// LdapSearchScopeOpt - LDAP search scope -type LdapSearchScopeOpt struct { - // This specifies the group DN, which overrides the base DN for group lookups. - GroupDN *string `json:"groupDN,omitempty"` - - // This specifies the custom LDAP search filter to be used when looking up group membership from LDAP server. - GroupMembershipFilter *string `json:"groupMembershipFilter,omitempty"` - - // This specifies the user DN, which overrides the base DN for user lookups. - UserDN *string `json:"userDN,omitempty"` -} - -// LogSpecification - Log Definition of a single resource metric. -type LogSpecification struct { - // Display name of log specification. - DisplayName *string `json:"displayName,omitempty"` - - // Name of log specification. - Name *string `json:"name,omitempty"` -} - -// MetricSpecification - Metric specification of operation. -type MetricSpecification struct { - // Aggregation type could be Average. - AggregationType *string `json:"aggregationType,omitempty"` - - // The category this metric specification belong to, could be Capacity. - Category *string `json:"category,omitempty"` - - // Dimensions of blobs, including blob type and access tier. - Dimensions []*Dimension `json:"dimensions,omitempty"` - - // Display description of metric specification. - DisplayDescription *string `json:"displayDescription,omitempty"` - - // Display name of metric specification. - DisplayName *string `json:"displayName,omitempty"` - - // Whether or not the service is using regional MDM accounts. - EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` - - // The property to decide fill gap with zero or not. - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` - - // The internal metric name. - InternalMetricName *string `json:"internalMetricName,omitempty"` - - // Whether the metric is internal. - IsInternal *bool `json:"isInternal,omitempty"` - - // Name of metric specification. - Name *string `json:"name,omitempty"` - - // Account Resource Id. - ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` - - // The source MDM account. - SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` - - // The source MDM namespace. - SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` - - // Support metric aggregation type. - SupportedAggregationTypes []*MetricAggregationType `json:"supportedAggregationTypes,omitempty"` - - // The supported time grain types for the metrics. - SupportedTimeGrainTypes []*string `json:"supportedTimeGrainTypes,omitempty"` - - // Unit could be Bytes or Count. - Unit *string `json:"unit,omitempty"` -} - -// MonthlySchedule - Monthly Schedule properties -type MonthlySchedule struct { - // Indicates which days of the month snapshot should be taken. A comma delimited string. - DaysOfMonth *string `json:"daysOfMonth,omitempty"` - - // Indicates which hour in UTC timezone a snapshot should be taken - Hour *int32 `json:"hour,omitempty"` - - // Indicates which minute snapshot should be taken - Minute *int32 `json:"minute,omitempty"` - - // Monthly snapshot count to keep - SnapshotsToKeep *int32 `json:"snapshotsToKeep,omitempty"` - - // Resource size in bytes, current storage usage for the volume in bytes - UsedBytes *int64 `json:"usedBytes,omitempty"` -} - -// MountTarget - Mount Target -type MountTarget struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; Mount Target Properties - Properties *MountTargetProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MountTargetProperties - Mount target properties -type MountTargetProperties struct { - // REQUIRED; UUID v4 used to identify the MountTarget - FileSystemID *string `json:"fileSystemId,omitempty"` - - // The SMB server's Fully Qualified Domain Name, FQDN - SmbServerFqdn *string `json:"smbServerFqdn,omitempty"` - - // READ-ONLY; The mount target's IPv4 address - IPAddress *string `json:"ipAddress,omitempty" azure:"ro"` - - // READ-ONLY; UUID v4 used to identify the MountTarget - MountTargetID *string `json:"mountTargetId,omitempty" azure:"ro"` -} - -// Operation - Microsoft.NetApp REST API operation definition. -type Operation struct { - // Display metadata associated with the operation. - Display *OperationDisplay `json:"display,omitempty"` - - // Operation name: {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` - - // The origin of operations. - Origin *string `json:"origin,omitempty"` - - // Properties of operation, include metric specifications. - Properties *OperationProperties `json:"properties,omitempty"` -} - -// OperationDisplay - Display metadata associated with the operation. -type OperationDisplay struct { - // Operation description. - Description *string `json:"description,omitempty"` - - // Type of operation: get, read, delete, etc. - Operation *string `json:"operation,omitempty"` - - // Service provider: Microsoft NetApp. - Provider *string `json:"provider,omitempty"` - - // Resource on which the operation is performed etc. - Resource *string `json:"resource,omitempty"` -} - -// OperationListResult - Result of the request to list Cloud Volume operations. It contains a list of operations and a URL -// link to get the next set of results. -type OperationListResult struct { - // List of Storage operations supported by the Storage resource provider. - Value []*Operation `json:"value,omitempty"` -} - -// OperationProperties - Properties of operation, include metric specifications. -type OperationProperties struct { - // One property of operation, include metric specifications. - ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// PlacementKeyValuePairs - Application specific parameters for the placement of volumes in the volume group -type PlacementKeyValuePairs struct { - // REQUIRED; Key for an application specific parameter for the placement of volumes in the volume group - Key *string `json:"key,omitempty"` - - // REQUIRED; Value for an application specific parameter for the placement of volumes in the volume group - Value *string `json:"value,omitempty"` -} - -// PoolChangeRequest - Pool change request -type PoolChangeRequest struct { - // REQUIRED; Resource id of the pool to move volume to - NewPoolResourceID *string `json:"newPoolResourceId,omitempty"` -} - -// PoolPatchProperties - Patchable pool properties -type PoolPatchProperties struct { - // The qos type of the pool - QosType *QosType `json:"qosType,omitempty"` - - // Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 4398046511104). - Size *int64 `json:"size,omitempty"` -} - -// PoolProperties - Pool properties -type PoolProperties struct { - // REQUIRED; The service level of the file system - ServiceLevel *ServiceLevel `json:"serviceLevel,omitempty"` - - // REQUIRED; Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 4398046511104). - Size *int64 `json:"size,omitempty"` - - // If enabled (true) the pool can contain cool Access enabled volumes. - CoolAccess *bool `json:"coolAccess,omitempty"` - - // Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value - // can only be set when creating new pool. - EncryptionType *EncryptionType `json:"encryptionType,omitempty"` - - // The qos type of the pool - QosType *QosType `json:"qosType,omitempty"` - - // READ-ONLY; UUID v4 used to identify the Pool - PoolID *string `json:"poolId,omitempty" azure:"ro"` - - // READ-ONLY; Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Total throughput of pool in Mibps - TotalThroughputMibps *float32 `json:"totalThroughputMibps,omitempty" azure:"ro"` - - // READ-ONLY; Utilized throughput of pool in Mibps - UtilizedThroughputMibps *float32 `json:"utilizedThroughputMibps,omitempty" azure:"ro"` -} - -// PoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the PoolsClient.BeginCreateOrUpdate method. -type PoolsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PoolsClientBeginDeleteOptions contains the optional parameters for the PoolsClient.BeginDelete method. -type PoolsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PoolsClientBeginUpdateOptions contains the optional parameters for the PoolsClient.BeginUpdate method. -type PoolsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PoolsClientGetOptions contains the optional parameters for the PoolsClient.Get method. -type PoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PoolsClientListOptions contains the optional parameters for the PoolsClient.List method. -type PoolsClientListOptions struct { - // placeholder for future optional parameters -} - -// ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a -// location -type ProxyResource struct { - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// QuotaAvailabilityRequest - Quota availability request content. -type QuotaAvailabilityRequest struct { - // REQUIRED; Name of the resource to verify. - Name *string `json:"name,omitempty"` - - // REQUIRED; Resource group name. - ResourceGroup *string `json:"resourceGroup,omitempty"` - - // REQUIRED; Resource type used for verification. - Type *CheckQuotaNameResourceTypes `json:"type,omitempty"` -} - -// ReplicationObject - Replication properties -type ReplicationObject struct { - // REQUIRED; The resource ID of the remote volume. - RemoteVolumeResourceID *string `json:"remoteVolumeResourceId,omitempty"` - - // Indicates whether the local volume is the source or destination for the Volume Replication - EndpointType *EndpointType `json:"endpointType,omitempty"` - - // The remote region for the other end of the Volume Replication. - RemoteVolumeRegion *string `json:"remoteVolumeRegion,omitempty"` - - // Id - ReplicationID *string `json:"replicationId,omitempty"` - - // Schedule - ReplicationSchedule *ReplicationSchedule `json:"replicationSchedule,omitempty"` -} - -// ReplicationStatus - Replication status -type ReplicationStatus struct { - // Displays error message if the replication is in an error state - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Replication health check - Healthy *bool `json:"healthy,omitempty"` - - // The status of the replication - MirrorState *MirrorState `json:"mirrorState,omitempty"` - - // Status of the mirror relationship - RelationshipStatus *RelationshipStatus `json:"relationshipStatus,omitempty"` - - // The progress of the replication - TotalProgress *string `json:"totalProgress,omitempty"` -} - -// Resource - Common fields that are returned in the response for all Azure Resource Manager resources -type Resource struct { - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceClientCheckFilePathAvailabilityOptions contains the optional parameters for the ResourceClient.CheckFilePathAvailability -// method. -type ResourceClientCheckFilePathAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability -// method. -type ResourceClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ResourceClientCheckQuotaAvailabilityOptions contains the optional parameters for the ResourceClient.CheckQuotaAvailability -// method. -type ResourceClientCheckQuotaAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ResourceIdentity - Identity for the resource. -type ResourceIdentity struct { - // Type of Identity. Supported values are: 'None', 'SystemAssigned' - Type *string `json:"type,omitempty"` - - // READ-ONLY; Object id of the identity resource - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` - - // READ-ONLY; The tenant id of the resource - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// ResourceNameAvailabilityRequest - Resource name availability request content. -type ResourceNameAvailabilityRequest struct { - // REQUIRED; Resource name to verify. - Name *string `json:"name,omitempty"` - - // REQUIRED; Resource group name. - ResourceGroup *string `json:"resourceGroup,omitempty"` - - // REQUIRED; Resource type used for verification. - Type *CheckNameResourceTypes `json:"type,omitempty"` -} - -// ResourceQuotaLimitsClientGetOptions contains the optional parameters for the ResourceQuotaLimitsClient.Get method. -type ResourceQuotaLimitsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ResourceQuotaLimitsClientListOptions contains the optional parameters for the ResourceQuotaLimitsClient.List method. -type ResourceQuotaLimitsClientListOptions struct { - // placeholder for future optional parameters -} - -// RestoreStatus - Restore status -type RestoreStatus struct { - // READ-ONLY; Displays error message if the restore is in an error state - ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` - - // READ-ONLY; Restore health status - Healthy *bool `json:"healthy,omitempty" azure:"ro"` - - // READ-ONLY; The status of the restore - MirrorState *MirrorState `json:"mirrorState,omitempty" azure:"ro"` - - // READ-ONLY; Status of the restore SnapMirror relationship - RelationshipStatus *RelationshipStatus `json:"relationshipStatus,omitempty" azure:"ro"` - - // READ-ONLY; Displays the total bytes transferred - TotalTransferBytes *int64 `json:"totalTransferBytes,omitempty" azure:"ro"` - - // READ-ONLY; Reason for the unhealthy restore relationship - UnhealthyReason *string `json:"unhealthyReason,omitempty" azure:"ro"` -} - -// ServiceSpecification - One property of operation, include metric specifications. -type ServiceSpecification struct { - // Log specification of operation. - LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"` - - // Metric specifications of operation. - MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` -} - -// Snapshot of a Volume -type Snapshot struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // Snapshot Properties - Properties *SnapshotProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SnapshotPoliciesClientBeginDeleteOptions contains the optional parameters for the SnapshotPoliciesClient.BeginDelete method. -type SnapshotPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SnapshotPoliciesClientBeginUpdateOptions contains the optional parameters for the SnapshotPoliciesClient.BeginUpdate method. -type SnapshotPoliciesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SnapshotPoliciesClientCreateOptions contains the optional parameters for the SnapshotPoliciesClient.Create method. -type SnapshotPoliciesClientCreateOptions struct { - // placeholder for future optional parameters -} - -// SnapshotPoliciesClientGetOptions contains the optional parameters for the SnapshotPoliciesClient.Get method. -type SnapshotPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SnapshotPoliciesClientListOptions contains the optional parameters for the SnapshotPoliciesClient.List method. -type SnapshotPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - -// SnapshotPoliciesClientListVolumesOptions contains the optional parameters for the SnapshotPoliciesClient.ListVolumes method. -type SnapshotPoliciesClientListVolumesOptions struct { - // placeholder for future optional parameters -} - -// SnapshotPoliciesList - List of Snapshot Policies -type SnapshotPoliciesList struct { - // A list of snapshot policies - Value []*SnapshotPolicy `json:"value,omitempty"` -} - -// SnapshotPolicy - Snapshot policy information -type SnapshotPolicy struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; Snapshot policy Properties - Properties *SnapshotPolicyProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SnapshotPolicyDetails - Snapshot policy properties -type SnapshotPolicyDetails struct { - // Resource location - Location *string `json:"location,omitempty"` - - // Snapshot policy Properties - Properties *SnapshotPolicyProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SnapshotPolicyPatch - Snapshot policy Details for create and update -type SnapshotPolicyPatch struct { - // Resource location - Location *string `json:"location,omitempty"` - - // Snapshot Policy properties - Properties *SnapshotPolicyProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SnapshotPolicyProperties - Snapshot policy properties -type SnapshotPolicyProperties struct { - // Schedule for daily snapshots - DailySchedule *DailySchedule `json:"dailySchedule,omitempty"` - - // The property to decide policy is enabled or not - Enabled *bool `json:"enabled,omitempty"` - - // Schedule for hourly snapshots - HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"` - - // Schedule for monthly snapshots - MonthlySchedule *MonthlySchedule `json:"monthlySchedule,omitempty"` - - // Schedule for weekly snapshots - WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` - - // READ-ONLY; Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// SnapshotPolicyVolumeList - Volumes associated with snapshot policy -type SnapshotPolicyVolumeList struct { - // List of volumes - Value []*Volume `json:"value,omitempty"` -} - -// SnapshotProperties - Snapshot properties -type SnapshotProperties struct { - // READ-ONLY; The creation date of the snapshot - Created *time.Time `json:"created,omitempty" azure:"ro"` - - // READ-ONLY; Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; UUID v4 used to identify the Snapshot - SnapshotID *string `json:"snapshotId,omitempty" azure:"ro"` -} - -// SnapshotRestoreFiles - Restore payload for Single File Snapshot Restore -type SnapshotRestoreFiles struct { - // REQUIRED; List of files to be restored - FilePaths []*string `json:"filePaths,omitempty"` - - // Destination folder where the files will be restored - DestinationPath *string `json:"destinationPath,omitempty"` -} - -// SnapshotsClientBeginCreateOptions contains the optional parameters for the SnapshotsClient.BeginCreate method. -type SnapshotsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SnapshotsClientBeginDeleteOptions contains the optional parameters for the SnapshotsClient.BeginDelete method. -type SnapshotsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SnapshotsClientBeginRestoreFilesOptions contains the optional parameters for the SnapshotsClient.BeginRestoreFiles method. -type SnapshotsClientBeginRestoreFilesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SnapshotsClientBeginUpdateOptions contains the optional parameters for the SnapshotsClient.BeginUpdate method. -type SnapshotsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SnapshotsClientGetOptions contains the optional parameters for the SnapshotsClient.Get method. -type SnapshotsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.List method. -type SnapshotsClientListOptions struct { - // placeholder for future optional parameters -} - -// SnapshotsList - List of Snapshots -type SnapshotsList struct { - // A list of Snapshots - Value []*Snapshot `json:"value,omitempty"` -} - -// SubscriptionQuotaItem - Information regarding Subscription Quota Item. -type SubscriptionQuotaItem struct { - // SubscriptionQuotaItem properties - Properties *SubscriptionQuotaItemProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SubscriptionQuotaItemList - List of Subscription Quota Items -type SubscriptionQuotaItemList struct { - // A list of SubscriptionQuotaItems - Value []*SubscriptionQuotaItem `json:"value,omitempty"` -} - -// SubscriptionQuotaItemProperties - SubscriptionQuotaItem Properties -type SubscriptionQuotaItemProperties struct { - // READ-ONLY; The current quota value. - Current *int32 `json:"current,omitempty" azure:"ro"` - - // READ-ONLY; The default quota value. - Default *int32 `json:"default,omitempty" azure:"ro"` -} - -// SubvolumeInfo - Subvolume Information properties -type SubvolumeInfo struct { - // Subvolume Properties - Properties *SubvolumeProperties `json:"properties,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SubvolumeModel - Result of the post subvolume and action is to get metadata of the subvolume. -type SubvolumeModel struct { - // It represents the minimal properties of the subvolume. - Properties *SubvolumeModelProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SubvolumeModelProperties - Properties which represents actual subvolume model which is stored as a file in the system. -type SubvolumeModelProperties struct { - // Most recent access time and date - AccessedTimeStamp *time.Time `json:"accessedTimeStamp,omitempty"` - - // Bytes used - BytesUsed *int64 `json:"bytesUsed,omitempty"` - - // Most recent change time and date - ChangedTimeStamp *time.Time `json:"changedTimeStamp,omitempty"` - - // Creation time and date - CreationTimeStamp *time.Time `json:"creationTimeStamp,omitempty"` - - // Most recent modification time and date - ModifiedTimeStamp *time.Time `json:"modifiedTimeStamp,omitempty"` - - // Path to the parent subvolume - ParentPath *string `json:"parentPath,omitempty"` - - // Path to the subvolume - Path *string `json:"path,omitempty"` - - // Permissions of the subvolume - Permissions *string `json:"permissions,omitempty"` - - // Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty"` - - // Size of subvolume - Size *int64 `json:"size,omitempty"` -} - -// SubvolumePatchParams - Parameters with which a subvolume can be updated -type SubvolumePatchParams struct { - // path to the subvolume - Path *string `json:"path,omitempty"` - - // Truncate subvolume to the provided size in bytes - Size *int64 `json:"size,omitempty"` -} - -// SubvolumePatchRequest - Subvolume Patch Request properties -type SubvolumePatchRequest struct { - // Subvolume Properties - Properties *SubvolumePatchParams `json:"properties,omitempty"` -} - -// SubvolumeProperties - This represents path associated with the subvolume -type SubvolumeProperties struct { - // parent path to the subvolume - ParentPath *string `json:"parentPath,omitempty"` - - // Path to the subvolume - Path *string `json:"path,omitempty"` - - // Truncate subvolume to the provided size in bytes - Size *int64 `json:"size,omitempty"` - - // READ-ONLY; Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// SubvolumesClientBeginCreateOptions contains the optional parameters for the SubvolumesClient.BeginCreate method. -type SubvolumesClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubvolumesClientBeginDeleteOptions contains the optional parameters for the SubvolumesClient.BeginDelete method. -type SubvolumesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubvolumesClientBeginGetMetadataOptions contains the optional parameters for the SubvolumesClient.BeginGetMetadata method. -type SubvolumesClientBeginGetMetadataOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubvolumesClientBeginUpdateOptions contains the optional parameters for the SubvolumesClient.BeginUpdate method. -type SubvolumesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubvolumesClientGetOptions contains the optional parameters for the SubvolumesClient.Get method. -type SubvolumesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SubvolumesClientListByVolumeOptions contains the optional parameters for the SubvolumesClient.ListByVolume method. -type SubvolumesClientListByVolumeOptions struct { - // placeholder for future optional parameters -} - -// SubvolumesList - List of Subvolumes -type SubvolumesList struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of Subvolumes - Value []*SubvolumeInfo `json:"value,omitempty"` -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -// Vault information -type Vault struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; Vault Properties - Properties *VaultProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VaultList - List of Vaults -type VaultList struct { - // A list of vaults - Value []*Vault `json:"value,omitempty"` -} - -// VaultProperties - Vault properties -type VaultProperties struct { - // Vault Name - VaultName *string `json:"vaultName,omitempty"` -} - -// VaultsClientListOptions contains the optional parameters for the VaultsClient.List method. -type VaultsClientListOptions struct { - // placeholder for future optional parameters -} - -// Volume resource -type Volume struct { - // REQUIRED; Resource location - Location *string `json:"location,omitempty"` - - // REQUIRED; Volume properties - Properties *VolumeProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VolumeBackupProperties - Volume Backup Properties -type VolumeBackupProperties struct { - // Backup Enabled - BackupEnabled *bool `json:"backupEnabled,omitempty"` - - // Backup Policy Resource ID - BackupPolicyID *string `json:"backupPolicyId,omitempty"` - - // Policy Enforced - PolicyEnforced *bool `json:"policyEnforced,omitempty"` - - // Vault Resource ID - VaultID *string `json:"vaultId,omitempty"` -} - -// VolumeBackups - Volume details using the backup policy -type VolumeBackups struct { - // Total count of backups for volume - BackupsCount *int32 `json:"backupsCount,omitempty"` - - // Policy enabled - PolicyEnabled *bool `json:"policyEnabled,omitempty"` - - // Volume name - VolumeName *string `json:"volumeName,omitempty"` -} - -// VolumeGroup - Volume group resource -type VolumeGroup struct { - // Resource location - Location *string `json:"location,omitempty"` - - // Volume group properties - Properties *VolumeGroupListProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VolumeGroupDetails - Volume group resource for create -type VolumeGroupDetails struct { - // Resource location - Location *string `json:"location,omitempty"` - - // Volume group properties - Properties *VolumeGroupProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VolumeGroupList - List of volume group resources -type VolumeGroupList struct { - // List of volume Groups - Value []*VolumeGroup `json:"value,omitempty"` -} - -// VolumeGroupListProperties - Volume group properties -type VolumeGroupListProperties struct { - // Volume group details - GroupMetaData *VolumeGroupMetaData `json:"groupMetaData,omitempty"` - - // READ-ONLY; Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// VolumeGroupMetaData - Volume group properties -type VolumeGroupMetaData struct { - // Application specific identifier - ApplicationIdentifier *string `json:"applicationIdentifier,omitempty"` - - // Application Type - ApplicationType *ApplicationType `json:"applicationType,omitempty"` - - // Application specific identifier of deployment rules for the volume group - DeploymentSpecID *string `json:"deploymentSpecId,omitempty"` - - // Application specific placement rules for the volume group - GlobalPlacementRules []*PlacementKeyValuePairs `json:"globalPlacementRules,omitempty"` - - // Group Description - GroupDescription *string `json:"groupDescription,omitempty"` - - // READ-ONLY; Number of volumes in volume group - VolumesCount *int64 `json:"volumesCount,omitempty" azure:"ro"` -} - -// VolumeGroupProperties - Volume group properties -type VolumeGroupProperties struct { - // Volume group details - GroupMetaData *VolumeGroupMetaData `json:"groupMetaData,omitempty"` - - // List of volumes from group - Volumes []*VolumeGroupVolumeProperties `json:"volumes,omitempty"` - - // READ-ONLY; Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// VolumeGroupVolumeProperties - Volume resource -type VolumeGroupVolumeProperties struct { - // REQUIRED; Volume properties - Properties *VolumeProperties `json:"properties,omitempty"` - - // Resource name - Name *string `json:"name,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VolumeGroupsClientBeginCreateOptions contains the optional parameters for the VolumeGroupsClient.BeginCreate method. -type VolumeGroupsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumeGroupsClientBeginDeleteOptions contains the optional parameters for the VolumeGroupsClient.BeginDelete method. -type VolumeGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumeGroupsClientGetOptions contains the optional parameters for the VolumeGroupsClient.Get method. -type VolumeGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VolumeGroupsClientListByNetAppAccountOptions contains the optional parameters for the VolumeGroupsClient.ListByNetAppAccount -// method. -type VolumeGroupsClientListByNetAppAccountOptions struct { - // placeholder for future optional parameters -} - -// VolumeList - List of volume resources -type VolumeList struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of volumes - Value []*Volume `json:"value,omitempty"` -} - -// VolumePatch - Volume patch resource -type VolumePatch struct { - // Resource location - Location *string `json:"location,omitempty"` - - // Patchable volume properties - Properties *VolumePatchProperties `json:"properties,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VolumePatchProperties - Patchable volume properties -type VolumePatchProperties struct { - // DataProtection type volumes include an object containing details of the replication - DataProtection *VolumePatchPropertiesDataProtection `json:"dataProtection,omitempty"` - - // Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. - DefaultGroupQuotaInKiBs *int64 `json:"defaultGroupQuotaInKiBs,omitempty"` - - // Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . - DefaultUserQuotaInKiBs *int64 `json:"defaultUserQuotaInKiBs,omitempty"` - - // Set of export policy rules - ExportPolicy *VolumePatchPropertiesExportPolicy `json:"exportPolicy,omitempty"` - - // Specifies if default quota is enabled for the volume. - IsDefaultQuotaEnabled *bool `json:"isDefaultQuotaEnabled,omitempty"` - - // The service level of the file system - ServiceLevel *ServiceLevel `json:"serviceLevel,omitempty"` - - // Maximum throughput in Mibps that can be achieved by this volume and this will be accepted as input only for manual qosType - // volume - ThroughputMibps *float32 `json:"throughputMibps,omitempty"` - - // UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID - // (2) and sticky (1) attributes. Second digit selects permission for the owner of - // the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth - // for other users not in the group. 0755 - gives read/write/execute permissions to - // owner and read/execute to group and other users. - UnixPermissions *string `json:"unixPermissions,omitempty"` - - // Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is - // 100 GiB. Upper limit is 100TiB. Specified in bytes. - UsageThreshold *int64 `json:"usageThreshold,omitempty"` -} - -// VolumePatchPropertiesDataProtection - DataProtection type volumes include an object containing details of the replication -type VolumePatchPropertiesDataProtection struct { - // Backup Properties - Backup *VolumeBackupProperties `json:"backup,omitempty"` - - // Snapshot properties. - Snapshot *VolumeSnapshotProperties `json:"snapshot,omitempty"` -} - -// VolumePatchPropertiesExportPolicy - Set of export policy rules -type VolumePatchPropertiesExportPolicy struct { - // Export policy rule - Rules []*ExportPolicyRule `json:"rules,omitempty"` -} - -// VolumeProperties - Volume properties -type VolumeProperties struct { - // REQUIRED; A unique file path for the volume. Used when creating mount targets - CreationToken *string `json:"creationToken,omitempty"` - - // REQUIRED; The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes - SubnetID *string `json:"subnetId,omitempty"` - - // REQUIRED; Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - // size is 100 GiB. Upper limit is 100TiB. Specified in bytes. - UsageThreshold *int64 `json:"usageThreshold,omitempty"` - - // Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose - AvsDataStore *AvsDataStore `json:"avsDataStore,omitempty"` - - // UUID v4 or resource identifier used to identify the Backup. - BackupID *string `json:"backupId,omitempty"` - - // Pool Resource Id used in case of creating a volume through volume group - CapacityPoolResourceID *string `json:"capacityPoolResourceId,omitempty"` - - // Specifies whether Cool Access(tiering) is enabled for the volume. - CoolAccess *bool `json:"coolAccess,omitempty"` - - // Specifies the number of days after which data that is not accessed by clients will be tiered. - CoolnessPeriod *int32 `json:"coolnessPeriod,omitempty"` - - // DataProtection type volumes include an object containing details of the replication - DataProtection *VolumePropertiesDataProtection `json:"dataProtection,omitempty"` - - // Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. - DefaultGroupQuotaInKiBs *int64 `json:"defaultGroupQuotaInKiBs,omitempty"` - - // Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . - DefaultUserQuotaInKiBs *int64 `json:"defaultUserQuotaInKiBs,omitempty"` - - // Flag indicating whether subvolume operations are enabled on the volume - EnableSubvolumes *EnableSubvolumes `json:"enableSubvolumes,omitempty"` - - // Encryption Key Source. Possible values are: 'Microsoft.NetApp' - EncryptionKeySource *string `json:"encryptionKeySource,omitempty"` - - // Set of export policy rules - ExportPolicy *VolumePropertiesExportPolicy `json:"exportPolicy,omitempty"` - - // Specifies if default quota is enabled for the volume. - IsDefaultQuotaEnabled *bool `json:"isDefaultQuotaEnabled,omitempty"` - - // Restoring - IsRestoring *bool `json:"isRestoring,omitempty"` - - // Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later - KerberosEnabled *bool `json:"kerberosEnabled,omitempty"` - - // Specifies whether LDAP is enabled or not for a given NFS volume. - LdapEnabled *bool `json:"ldapEnabled,omitempty"` - - // Basic network, or Standard features available to the volume. - NetworkFeatures *NetworkFeatures `json:"networkFeatures,omitempty"` - - // Application specific placement rules for the particular volume - PlacementRules []*PlacementKeyValuePairs `json:"placementRules,omitempty"` - - // Set of protocol types, default NFSv3, CIFS for SMB protocol - ProtocolTypes []*string `json:"protocolTypes,omitempty"` - - // Proximity placement group associated with the volume - ProximityPlacementGroup *string `json:"proximityPlacementGroup,omitempty"` - - // The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol - SecurityStyle *SecurityStyle `json:"securityStyle,omitempty"` - - // The service level of the file system - ServiceLevel *ServiceLevel `json:"serviceLevel,omitempty"` - - // Enables continuously available share property for smb volume. Only applicable for SMB volume - SmbContinuouslyAvailable *bool `json:"smbContinuouslyAvailable,omitempty"` - - // Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version - // 2020-08-01 or later - SmbEncryption *bool `json:"smbEncryption,omitempty"` - - // If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's - // snapshots (default to true). - SnapshotDirectoryVisible *bool `json:"snapshotDirectoryVisible,omitempty"` - - // UUID v4 or resource identifier used to identify the Snapshot. - SnapshotID *string `json:"snapshotId,omitempty"` - - // Maximum throughput in Mibps that can be achieved by this volume and this will be accepted as input only for manual qosType - // volume - ThroughputMibps *float32 `json:"throughputMibps,omitempty"` - - // UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID - // (2) and sticky (1) attributes. Second digit selects permission for the owner of - // the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth - // for other users not in the group. 0755 - gives read/write/execute permissions to - // owner and read/execute to group and other users. - UnixPermissions *string `json:"unixPermissions,omitempty"` - - // Volume spec name is the application specific designation or identifier for the particular volume in a volume group for - // e.g. data, log - VolumeSpecName *string `json:"volumeSpecName,omitempty"` - - // What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection - VolumeType *string `json:"volumeType,omitempty"` - - // READ-ONLY; Unique Baremetal Tenant Identifier. - BaremetalTenantID *string `json:"baremetalTenantId,omitempty" azure:"ro"` - - // READ-ONLY; When a volume is being restored from another volume's snapshot, will show the percentage completion of this - // cloning process. When this value is empty/null there is no cloning process currently - // happening on this volume. This value will update every 5 minutes during cloning. - CloneProgress *int32 `json:"cloneProgress,omitempty" azure:"ro"` - - // READ-ONLY; Unique FileSystem Identifier. - FileSystemID *string `json:"fileSystemId,omitempty" azure:"ro"` - - // READ-ONLY; Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed - // if volume quota is more than 4TiB. - MaximumNumberOfFiles *int64 `json:"maximumNumberOfFiles,omitempty" azure:"ro"` - - // READ-ONLY; List of mount targets - MountTargets []*MountTargetProperties `json:"mountTargets,omitempty" azure:"ro"` - - // READ-ONLY; Network Sibling Set ID for the the group of volumes sharing networking resources. - NetworkSiblingSetID *string `json:"networkSiblingSetId,omitempty" azure:"ro"` - - // READ-ONLY; Azure lifecycle management - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Provides storage to network proximity information for the volume. - StorageToNetworkProximity *VolumeStorageToNetworkProximity `json:"storageToNetworkProximity,omitempty" azure:"ro"` - - // READ-ONLY; T2 network information - T2Network *string `json:"t2Network,omitempty" azure:"ro"` - - // READ-ONLY; Volume Group Name - VolumeGroupName *string `json:"volumeGroupName,omitempty" azure:"ro"` -} - -// VolumePropertiesDataProtection - DataProtection type volumes include an object containing details of the replication -type VolumePropertiesDataProtection struct { - // Backup Properties - Backup *VolumeBackupProperties `json:"backup,omitempty"` - - // Replication properties - Replication *ReplicationObject `json:"replication,omitempty"` - - // Snapshot properties. - Snapshot *VolumeSnapshotProperties `json:"snapshot,omitempty"` -} - -// VolumePropertiesExportPolicy - Set of export policy rules -type VolumePropertiesExportPolicy struct { - // Export policy rule - Rules []*ExportPolicyRule `json:"rules,omitempty"` -} - -// VolumeRevert - revert a volume to the snapshot -type VolumeRevert struct { - // Resource id of the snapshot - SnapshotID *string `json:"snapshotId,omitempty"` -} - -// VolumeSnapshotProperties - Volume Snapshot Properties -type VolumeSnapshotProperties struct { - // Snapshot Policy ResourceId - SnapshotPolicyID *string `json:"snapshotPolicyId,omitempty"` -} - -// VolumesClientBeginAuthorizeReplicationOptions contains the optional parameters for the VolumesClient.BeginAuthorizeReplication -// method. -type VolumesClientBeginAuthorizeReplicationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumesClientBeginBreakReplicationOptions contains the optional parameters for the VolumesClient.BeginBreakReplication -// method. -type VolumesClientBeginBreakReplicationOptions struct { - // Optional body to force break the replication. - Body *BreakReplicationRequest - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumesClientBeginCreateOrUpdateOptions contains the optional parameters for the VolumesClient.BeginCreateOrUpdate method. -type VolumesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumesClientBeginDeleteOptions contains the optional parameters for the VolumesClient.BeginDelete method. -type VolumesClientBeginDeleteOptions struct { - // An option to force delete the volume. Will cleanup resources connected to the particular volume - ForceDelete *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumesClientBeginDeleteReplicationOptions contains the optional parameters for the VolumesClient.BeginDeleteReplication -// method. -type VolumesClientBeginDeleteReplicationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumesClientBeginPoolChangeOptions contains the optional parameters for the VolumesClient.BeginPoolChange method. -type VolumesClientBeginPoolChangeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumesClientBeginReInitializeReplicationOptions contains the optional parameters for the VolumesClient.BeginReInitializeReplication -// method. -type VolumesClientBeginReInitializeReplicationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumesClientBeginResyncReplicationOptions contains the optional parameters for the VolumesClient.BeginResyncReplication -// method. -type VolumesClientBeginResyncReplicationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumesClientBeginRevertOptions contains the optional parameters for the VolumesClient.BeginRevert method. -type VolumesClientBeginRevertOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumesClientBeginUpdateOptions contains the optional parameters for the VolumesClient.BeginUpdate method. -type VolumesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VolumesClientGetOptions contains the optional parameters for the VolumesClient.Get method. -type VolumesClientGetOptions struct { - // placeholder for future optional parameters -} - -// VolumesClientListOptions contains the optional parameters for the VolumesClient.List method. -type VolumesClientListOptions struct { - // placeholder for future optional parameters -} - -// VolumesClientReplicationStatusOptions contains the optional parameters for the VolumesClient.ReplicationStatus method. -type VolumesClientReplicationStatusOptions struct { - // placeholder for future optional parameters -} - -// WeeklySchedule - Weekly Schedule properties, make a snapshot every week at a specific day or days -type WeeklySchedule struct { - // Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english - Day *string `json:"day,omitempty"` - - // Indicates which hour in UTC timezone a snapshot should be taken - Hour *int32 `json:"hour,omitempty"` - - // Indicates which minute snapshot should be taken - Minute *int32 `json:"minute,omitempty"` - - // Weekly snapshot count to keep - SnapshotsToKeep *int32 `json:"snapshotsToKeep,omitempty"` - - // Resource size in bytes, current storage usage for the volume in bytes - UsedBytes *int64 `json:"usedBytes,omitempty"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_models_serde.go deleted file mode 100644 index 92c8ac10..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_models_serde.go +++ /dev/null @@ -1,534 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type Account. -func (a Account) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AccountPatch. -func (a AccountPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AccountProperties. -func (a AccountProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeDirectories", a.ActiveDirectories) - populate(objectMap, "encryption", a.Encryption) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ActiveDirectory. -func (a ActiveDirectory) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeDirectoryId", a.ActiveDirectoryID) - populate(objectMap, "adName", a.AdName) - populate(objectMap, "administrators", a.Administrators) - populate(objectMap, "aesEncryption", a.AesEncryption) - populate(objectMap, "allowLocalNfsUsersWithLdap", a.AllowLocalNfsUsersWithLdap) - populate(objectMap, "backupOperators", a.BackupOperators) - populate(objectMap, "dns", a.DNS) - populate(objectMap, "domain", a.Domain) - populate(objectMap, "encryptDCConnections", a.EncryptDCConnections) - populate(objectMap, "kdcIP", a.KdcIP) - populate(objectMap, "ldapOverTLS", a.LdapOverTLS) - populate(objectMap, "ldapSearchScope", a.LdapSearchScope) - populate(objectMap, "ldapSigning", a.LdapSigning) - populate(objectMap, "organizationalUnit", a.OrganizationalUnit) - populate(objectMap, "password", a.Password) - populate(objectMap, "securityOperators", a.SecurityOperators) - populate(objectMap, "serverRootCACertificate", a.ServerRootCACertificate) - populate(objectMap, "site", a.Site) - populate(objectMap, "smbServerName", a.SmbServerName) - populate(objectMap, "status", a.Status) - populate(objectMap, "statusDetails", a.StatusDetails) - populate(objectMap, "username", a.Username) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupPatch. -func (b BackupPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupPolicy. -func (b BackupPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", b.Etag) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupPolicyPatch. -func (b BackupPolicyPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupPolicyProperties. -func (b BackupPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupPolicyId", b.BackupPolicyID) - populate(objectMap, "dailyBackupsToKeep", b.DailyBackupsToKeep) - populate(objectMap, "enabled", b.Enabled) - populate(objectMap, "monthlyBackupsToKeep", b.MonthlyBackupsToKeep) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "volumeBackups", b.VolumeBackups) - populate(objectMap, "volumesAssigned", b.VolumesAssigned) - populate(objectMap, "weeklyBackupsToKeep", b.WeeklyBackupsToKeep) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupProperties. -func (b BackupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupId", b.BackupID) - populate(objectMap, "backupType", b.BackupType) - populateTimeRFC3339(objectMap, "creationDate", b.CreationDate) - populate(objectMap, "failureReason", b.FailureReason) - populate(objectMap, "label", b.Label) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "size", b.Size) - populate(objectMap, "useExistingSnapshot", b.UseExistingSnapshot) - populate(objectMap, "volumeName", b.VolumeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupProperties. -func (b *BackupProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupId": - err = unpopulate(val, "BackupID", &b.BackupID) - delete(rawMsg, key) - case "backupType": - err = unpopulate(val, "BackupType", &b.BackupType) - delete(rawMsg, key) - case "creationDate": - err = unpopulateTimeRFC3339(val, "CreationDate", &b.CreationDate) - delete(rawMsg, key) - case "failureReason": - err = unpopulate(val, "FailureReason", &b.FailureReason) - delete(rawMsg, key) - case "label": - err = unpopulate(val, "Label", &b.Label) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - case "size": - err = unpopulate(val, "Size", &b.Size) - delete(rawMsg, key) - case "useExistingSnapshot": - err = unpopulate(val, "UseExistingSnapshot", &b.UseExistingSnapshot) - delete(rawMsg, key) - case "volumeName": - err = unpopulate(val, "VolumeName", &b.VolumeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CapacityPool. -func (c CapacityPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "id", c.ID) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CapacityPoolPatch. -func (c CapacityPoolPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SnapshotPolicy. -func (s SnapshotPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SnapshotPolicyPatch. -func (s SnapshotPolicyPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SnapshotProperties. -func (s SnapshotProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "created", s.Created) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "snapshotId", s.SnapshotID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotProperties. -func (s *SnapshotProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "created": - err = unpopulateTimeRFC3339(val, "Created", &s.Created) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "snapshotId": - err = unpopulate(val, "SnapshotID", &s.SnapshotID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SnapshotRestoreFiles. -func (s SnapshotRestoreFiles) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationPath", s.DestinationPath) - populate(objectMap, "filePaths", s.FilePaths) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubvolumeModelProperties. -func (s *SubvolumeModelProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accessedTimeStamp": - err = unpopulateTimeRFC3339(val, "AccessedTimeStamp", &s.AccessedTimeStamp) - delete(rawMsg, key) - case "bytesUsed": - err = unpopulate(val, "BytesUsed", &s.BytesUsed) - delete(rawMsg, key) - case "changedTimeStamp": - err = unpopulateTimeRFC3339(val, "ChangedTimeStamp", &s.ChangedTimeStamp) - delete(rawMsg, key) - case "creationTimeStamp": - err = unpopulateTimeRFC3339(val, "CreationTimeStamp", &s.CreationTimeStamp) - delete(rawMsg, key) - case "modifiedTimeStamp": - err = unpopulateTimeRFC3339(val, "ModifiedTimeStamp", &s.ModifiedTimeStamp) - delete(rawMsg, key) - case "parentPath": - err = unpopulate(val, "ParentPath", &s.ParentPath) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &s.Path) - delete(rawMsg, key) - case "permissions": - err = unpopulate(val, "Permissions", &s.Permissions) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "size": - err = unpopulate(val, "Size", &s.Size) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubvolumePatchRequest. -func (s SubvolumePatchRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", s.Properties) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Volume. -func (v Volume) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "systemData", v.SystemData) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VolumeGroupDetails. -func (v VolumeGroupDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VolumeGroupMetaData. -func (v VolumeGroupMetaData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationIdentifier", v.ApplicationIdentifier) - populate(objectMap, "applicationType", v.ApplicationType) - populate(objectMap, "deploymentSpecId", v.DeploymentSpecID) - populate(objectMap, "globalPlacementRules", v.GlobalPlacementRules) - populate(objectMap, "groupDescription", v.GroupDescription) - populate(objectMap, "volumesCount", v.VolumesCount) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VolumeGroupProperties. -func (v VolumeGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupMetaData", v.GroupMetaData) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "volumes", v.Volumes) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VolumeGroupVolumeProperties. -func (v VolumeGroupVolumeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VolumePatch. -func (v VolumePatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VolumePatchPropertiesExportPolicy. -func (v VolumePatchPropertiesExportPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "rules", v.Rules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VolumeProperties. -func (v VolumeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "avsDataStore", v.AvsDataStore) - populate(objectMap, "backupId", v.BackupID) - populate(objectMap, "baremetalTenantId", v.BaremetalTenantID) - populate(objectMap, "capacityPoolResourceId", v.CapacityPoolResourceID) - populate(objectMap, "cloneProgress", v.CloneProgress) - populate(objectMap, "coolAccess", v.CoolAccess) - populate(objectMap, "coolnessPeriod", v.CoolnessPeriod) - populate(objectMap, "creationToken", v.CreationToken) - populate(objectMap, "dataProtection", v.DataProtection) - populate(objectMap, "defaultGroupQuotaInKiBs", v.DefaultGroupQuotaInKiBs) - populate(objectMap, "defaultUserQuotaInKiBs", v.DefaultUserQuotaInKiBs) - populate(objectMap, "enableSubvolumes", v.EnableSubvolumes) - populate(objectMap, "encryptionKeySource", v.EncryptionKeySource) - populate(objectMap, "exportPolicy", v.ExportPolicy) - populate(objectMap, "fileSystemId", v.FileSystemID) - populate(objectMap, "isDefaultQuotaEnabled", v.IsDefaultQuotaEnabled) - populate(objectMap, "isRestoring", v.IsRestoring) - populate(objectMap, "kerberosEnabled", v.KerberosEnabled) - populate(objectMap, "ldapEnabled", v.LdapEnabled) - populate(objectMap, "maximumNumberOfFiles", v.MaximumNumberOfFiles) - populate(objectMap, "mountTargets", v.MountTargets) - populate(objectMap, "networkFeatures", v.NetworkFeatures) - populate(objectMap, "networkSiblingSetId", v.NetworkSiblingSetID) - populate(objectMap, "placementRules", v.PlacementRules) - populate(objectMap, "protocolTypes", v.ProtocolTypes) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "proximityPlacementGroup", v.ProximityPlacementGroup) - populate(objectMap, "securityStyle", v.SecurityStyle) - populate(objectMap, "serviceLevel", v.ServiceLevel) - populate(objectMap, "smbContinuouslyAvailable", v.SmbContinuouslyAvailable) - populate(objectMap, "smbEncryption", v.SmbEncryption) - populate(objectMap, "snapshotDirectoryVisible", v.SnapshotDirectoryVisible) - populate(objectMap, "snapshotId", v.SnapshotID) - populate(objectMap, "storageToNetworkProximity", v.StorageToNetworkProximity) - populate(objectMap, "subnetId", v.SubnetID) - populate(objectMap, "t2Network", v.T2Network) - populate(objectMap, "throughputMibps", v.ThroughputMibps) - populate(objectMap, "unixPermissions", v.UnixPermissions) - populate(objectMap, "usageThreshold", v.UsageThreshold) - populate(objectMap, "volumeGroupName", v.VolumeGroupName) - populate(objectMap, "volumeSpecName", v.VolumeSpecName) - populate(objectMap, "volumeType", v.VolumeType) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VolumePropertiesExportPolicy. -func (v VolumePropertiesExportPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "rules", v.Rules) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_operations_client.go deleted file mode 100644 index 935e5a7d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_operations_client.go +++ /dev/null @@ -1,98 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - host string - pl runtime.Pipeline -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists all of the available Microsoft.NetApp Rest API operations -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, options) - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.NetApp/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_pools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_pools_client.go deleted file mode 100644 index 0e903eb9..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_pools_client.go +++ /dev/null @@ -1,395 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PoolsClient contains the methods for the Pools group. -// Don't use this type directly, use NewPoolsClient() instead. -type PoolsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPoolsClient creates a new instance of PoolsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PoolsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PoolsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or Update a capacity pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// body - Capacity pool object supplied in the body of the operation. -// options - PoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the PoolsClient.BeginCreateOrUpdate -// method. -func (client *PoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPool, options *PoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PoolsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, accountName, poolName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PoolsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PoolsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or Update a capacity pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *PoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPool, options *PoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, poolName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PoolsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPool, options *PoolsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginDelete - Delete the specified capacity pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// options - PoolsClientBeginDeleteOptions contains the optional parameters for the PoolsClient.BeginDelete method. -func (client *PoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolsClientBeginDeleteOptions) (*runtime.Poller[PoolsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PoolsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PoolsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the specified capacity pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *PoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PoolsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Get details of the specified capacity pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// options - PoolsClientGetOptions contains the optional parameters for the PoolsClient.Get method. -func (client *PoolsClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolsClientGetOptions) (PoolsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, options) - if err != nil { - return PoolsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PoolsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PoolsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PoolsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *PoolsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PoolsClient) getHandleResponse(resp *http.Response) (PoolsClientGetResponse, error) { - result := PoolsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CapacityPool); err != nil { - return PoolsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all capacity pools in the NetApp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// options - PoolsClientListOptions contains the optional parameters for the PoolsClient.List method. -func (client *PoolsClient) NewListPager(resourceGroupName string, accountName string, options *PoolsClientListOptions) *runtime.Pager[PoolsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PoolsClientListResponse]{ - More: func(page PoolsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PoolsClientListResponse) (PoolsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, accountName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PoolsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PoolsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PoolsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PoolsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *PoolsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PoolsClient) listHandleResponse(resp *http.Response) (PoolsClientListResponse, error) { - result := PoolsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CapacityPoolList); err != nil { - return PoolsClientListResponse{}, err - } - return result, nil -} - -// BeginUpdate - Patch the specified capacity pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// body - Capacity pool object supplied in the body of the operation. -// options - PoolsClientBeginUpdateOptions contains the optional parameters for the PoolsClient.BeginUpdate method. -func (client *PoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPoolPatch, options *PoolsClientBeginUpdateOptions) (*runtime.Poller[PoolsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, accountName, poolName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PoolsClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PoolsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Patch the specified capacity pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *PoolsClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPoolPatch, options *PoolsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *PoolsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, body CapacityPoolPatch, options *PoolsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_resource_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_resource_client.go deleted file mode 100644 index 92fdff55..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_resource_client.go +++ /dev/null @@ -1,215 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ResourceClient contains the methods for the NetAppResource group. -// Don't use this type directly, use NewResourceClient() instead. -type ResourceClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewResourceClient creates a new instance of ResourceClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewResourceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ResourceClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CheckFilePathAvailability - Check if a file path is available. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// location - The location -// body - File path availability request. -// options - ResourceClientCheckFilePathAvailabilityOptions contains the optional parameters for the ResourceClient.CheckFilePathAvailability -// method. -func (client *ResourceClient) CheckFilePathAvailability(ctx context.Context, location string, body FilePathAvailabilityRequest, options *ResourceClientCheckFilePathAvailabilityOptions) (ResourceClientCheckFilePathAvailabilityResponse, error) { - req, err := client.checkFilePathAvailabilityCreateRequest(ctx, location, body, options) - if err != nil { - return ResourceClientCheckFilePathAvailabilityResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceClientCheckFilePathAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientCheckFilePathAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkFilePathAvailabilityHandleResponse(resp) -} - -// checkFilePathAvailabilityCreateRequest creates the CheckFilePathAvailability request. -func (client *ResourceClient) checkFilePathAvailabilityCreateRequest(ctx context.Context, location string, body FilePathAvailabilityRequest, options *ResourceClientCheckFilePathAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// checkFilePathAvailabilityHandleResponse handles the CheckFilePathAvailability response. -func (client *ResourceClient) checkFilePathAvailabilityHandleResponse(resp *http.Response) (ResourceClientCheckFilePathAvailabilityResponse, error) { - result := ResourceClientCheckFilePathAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckAvailabilityResponse); err != nil { - return ResourceClientCheckFilePathAvailabilityResponse{}, err - } - return result, nil -} - -// CheckNameAvailability - Check if a resource name is available. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// location - The location -// body - Name availability request. -// options - ResourceClientCheckNameAvailabilityOptions contains the optional parameters for the ResourceClient.CheckNameAvailability -// method. -func (client *ResourceClient) CheckNameAvailability(ctx context.Context, location string, body ResourceNameAvailabilityRequest, options *ResourceClientCheckNameAvailabilityOptions) (ResourceClientCheckNameAvailabilityResponse, error) { - req, err := client.checkNameAvailabilityCreateRequest(ctx, location, body, options) - if err != nil { - return ResourceClientCheckNameAvailabilityResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceClientCheckNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkNameAvailabilityHandleResponse(resp) -} - -// checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. -func (client *ResourceClient) checkNameAvailabilityCreateRequest(ctx context.Context, location string, body ResourceNameAvailabilityRequest, options *ResourceClientCheckNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. -func (client *ResourceClient) checkNameAvailabilityHandleResponse(resp *http.Response) (ResourceClientCheckNameAvailabilityResponse, error) { - result := ResourceClientCheckNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckAvailabilityResponse); err != nil { - return ResourceClientCheckNameAvailabilityResponse{}, err - } - return result, nil -} - -// CheckQuotaAvailability - Check if a quota is available. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// location - The location -// body - Quota availability request. -// options - ResourceClientCheckQuotaAvailabilityOptions contains the optional parameters for the ResourceClient.CheckQuotaAvailability -// method. -func (client *ResourceClient) CheckQuotaAvailability(ctx context.Context, location string, body QuotaAvailabilityRequest, options *ResourceClientCheckQuotaAvailabilityOptions) (ResourceClientCheckQuotaAvailabilityResponse, error) { - req, err := client.checkQuotaAvailabilityCreateRequest(ctx, location, body, options) - if err != nil { - return ResourceClientCheckQuotaAvailabilityResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceClientCheckQuotaAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceClientCheckQuotaAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkQuotaAvailabilityHandleResponse(resp) -} - -// checkQuotaAvailabilityCreateRequest creates the CheckQuotaAvailability request. -func (client *ResourceClient) checkQuotaAvailabilityCreateRequest(ctx context.Context, location string, body QuotaAvailabilityRequest, options *ResourceClientCheckQuotaAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// checkQuotaAvailabilityHandleResponse handles the CheckQuotaAvailability response. -func (client *ResourceClient) checkQuotaAvailabilityHandleResponse(resp *http.Response) (ResourceClientCheckQuotaAvailabilityResponse, error) { - result := ResourceClientCheckQuotaAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CheckAvailabilityResponse); err != nil { - return ResourceClientCheckQuotaAvailabilityResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_resourcequotalimits_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_resourcequotalimits_client.go deleted file mode 100644 index 8b10296a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_resourcequotalimits_client.go +++ /dev/null @@ -1,171 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ResourceQuotaLimitsClient contains the methods for the NetAppResourceQuotaLimits group. -// Don't use this type directly, use NewResourceQuotaLimitsClient() instead. -type ResourceQuotaLimitsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewResourceQuotaLimitsClient creates a new instance of ResourceQuotaLimitsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewResourceQuotaLimitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceQuotaLimitsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ResourceQuotaLimitsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get the default and current subscription quota limit -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// location - The location -// quotaLimitName - The name of the Quota Limit -// options - ResourceQuotaLimitsClientGetOptions contains the optional parameters for the ResourceQuotaLimitsClient.Get method. -func (client *ResourceQuotaLimitsClient) Get(ctx context.Context, location string, quotaLimitName string, options *ResourceQuotaLimitsClientGetOptions) (ResourceQuotaLimitsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, location, quotaLimitName, options) - if err != nil { - return ResourceQuotaLimitsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceQuotaLimitsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceQuotaLimitsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ResourceQuotaLimitsClient) getCreateRequest(ctx context.Context, location string, quotaLimitName string, options *ResourceQuotaLimitsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if quotaLimitName == "" { - return nil, errors.New("parameter quotaLimitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{quotaLimitName}", url.PathEscape(quotaLimitName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ResourceQuotaLimitsClient) getHandleResponse(resp *http.Response) (ResourceQuotaLimitsClientGetResponse, error) { - result := ResourceQuotaLimitsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionQuotaItem); err != nil { - return ResourceQuotaLimitsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get the default and current limits for quotas -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// location - The location -// options - ResourceQuotaLimitsClientListOptions contains the optional parameters for the ResourceQuotaLimitsClient.List -// method. -func (client *ResourceQuotaLimitsClient) NewListPager(location string, options *ResourceQuotaLimitsClientListOptions) *runtime.Pager[ResourceQuotaLimitsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceQuotaLimitsClientListResponse]{ - More: func(page ResourceQuotaLimitsClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ResourceQuotaLimitsClientListResponse) (ResourceQuotaLimitsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, location, options) - if err != nil { - return ResourceQuotaLimitsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceQuotaLimitsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceQuotaLimitsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ResourceQuotaLimitsClient) listCreateRequest(ctx context.Context, location string, options *ResourceQuotaLimitsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ResourceQuotaLimitsClient) listHandleResponse(resp *http.Response) (ResourceQuotaLimitsClientListResponse, error) { - result := ResourceQuotaLimitsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SubscriptionQuotaItemList); err != nil { - return ResourceQuotaLimitsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_response_types.go deleted file mode 100644 index 7d4ff90c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_response_types.go +++ /dev/null @@ -1,349 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -// AccountBackupsClientDeleteResponse contains the response from method AccountBackupsClient.Delete. -type AccountBackupsClientDeleteResponse struct { - // placeholder for future response values -} - -// AccountBackupsClientGetResponse contains the response from method AccountBackupsClient.Get. -type AccountBackupsClientGetResponse struct { - Backup -} - -// AccountBackupsClientListResponse contains the response from method AccountBackupsClient.List. -type AccountBackupsClientListResponse struct { - BackupsList -} - -// AccountsClientCreateOrUpdateResponse contains the response from method AccountsClient.CreateOrUpdate. -type AccountsClientCreateOrUpdateResponse struct { - Account -} - -// AccountsClientDeleteResponse contains the response from method AccountsClient.Delete. -type AccountsClientDeleteResponse struct { - // placeholder for future response values -} - -// AccountsClientGetResponse contains the response from method AccountsClient.Get. -type AccountsClientGetResponse struct { - Account -} - -// AccountsClientListBySubscriptionResponse contains the response from method AccountsClient.ListBySubscription. -type AccountsClientListBySubscriptionResponse struct { - AccountList -} - -// AccountsClientListResponse contains the response from method AccountsClient.List. -type AccountsClientListResponse struct { - AccountList -} - -// AccountsClientUpdateResponse contains the response from method AccountsClient.Update. -type AccountsClientUpdateResponse struct { - Account -} - -// BackupPoliciesClientCreateResponse contains the response from method BackupPoliciesClient.Create. -type BackupPoliciesClientCreateResponse struct { - BackupPolicy -} - -// BackupPoliciesClientDeleteResponse contains the response from method BackupPoliciesClient.Delete. -type BackupPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// BackupPoliciesClientGetResponse contains the response from method BackupPoliciesClient.Get. -type BackupPoliciesClientGetResponse struct { - BackupPolicy -} - -// BackupPoliciesClientListResponse contains the response from method BackupPoliciesClient.List. -type BackupPoliciesClientListResponse struct { - BackupPoliciesList -} - -// BackupPoliciesClientUpdateResponse contains the response from method BackupPoliciesClient.Update. -type BackupPoliciesClientUpdateResponse struct { - BackupPolicy -} - -// BackupsClientCreateResponse contains the response from method BackupsClient.Create. -type BackupsClientCreateResponse struct { - Backup -} - -// BackupsClientDeleteResponse contains the response from method BackupsClient.Delete. -type BackupsClientDeleteResponse struct { - // placeholder for future response values -} - -// BackupsClientGetResponse contains the response from method BackupsClient.Get. -type BackupsClientGetResponse struct { - Backup -} - -// BackupsClientGetStatusResponse contains the response from method BackupsClient.GetStatus. -type BackupsClientGetStatusResponse struct { - BackupStatus -} - -// BackupsClientGetVolumeRestoreStatusResponse contains the response from method BackupsClient.GetVolumeRestoreStatus. -type BackupsClientGetVolumeRestoreStatusResponse struct { - RestoreStatus -} - -// BackupsClientListResponse contains the response from method BackupsClient.List. -type BackupsClientListResponse struct { - BackupsList -} - -// BackupsClientUpdateResponse contains the response from method BackupsClient.Update. -type BackupsClientUpdateResponse struct { - Backup -} - -// OperationsClientListResponse contains the response from method OperationsClient.List. -type OperationsClientListResponse struct { - OperationListResult -} - -// PoolsClientCreateOrUpdateResponse contains the response from method PoolsClient.CreateOrUpdate. -type PoolsClientCreateOrUpdateResponse struct { - CapacityPool -} - -// PoolsClientDeleteResponse contains the response from method PoolsClient.Delete. -type PoolsClientDeleteResponse struct { - // placeholder for future response values -} - -// PoolsClientGetResponse contains the response from method PoolsClient.Get. -type PoolsClientGetResponse struct { - CapacityPool -} - -// PoolsClientListResponse contains the response from method PoolsClient.List. -type PoolsClientListResponse struct { - CapacityPoolList -} - -// PoolsClientUpdateResponse contains the response from method PoolsClient.Update. -type PoolsClientUpdateResponse struct { - CapacityPool -} - -// ResourceClientCheckFilePathAvailabilityResponse contains the response from method ResourceClient.CheckFilePathAvailability. -type ResourceClientCheckFilePathAvailabilityResponse struct { - CheckAvailabilityResponse -} - -// ResourceClientCheckNameAvailabilityResponse contains the response from method ResourceClient.CheckNameAvailability. -type ResourceClientCheckNameAvailabilityResponse struct { - CheckAvailabilityResponse -} - -// ResourceClientCheckQuotaAvailabilityResponse contains the response from method ResourceClient.CheckQuotaAvailability. -type ResourceClientCheckQuotaAvailabilityResponse struct { - CheckAvailabilityResponse -} - -// ResourceQuotaLimitsClientGetResponse contains the response from method ResourceQuotaLimitsClient.Get. -type ResourceQuotaLimitsClientGetResponse struct { - SubscriptionQuotaItem -} - -// ResourceQuotaLimitsClientListResponse contains the response from method ResourceQuotaLimitsClient.List. -type ResourceQuotaLimitsClientListResponse struct { - SubscriptionQuotaItemList -} - -// SnapshotPoliciesClientCreateResponse contains the response from method SnapshotPoliciesClient.Create. -type SnapshotPoliciesClientCreateResponse struct { - SnapshotPolicy -} - -// SnapshotPoliciesClientDeleteResponse contains the response from method SnapshotPoliciesClient.Delete. -type SnapshotPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// SnapshotPoliciesClientGetResponse contains the response from method SnapshotPoliciesClient.Get. -type SnapshotPoliciesClientGetResponse struct { - SnapshotPolicy -} - -// SnapshotPoliciesClientListResponse contains the response from method SnapshotPoliciesClient.List. -type SnapshotPoliciesClientListResponse struct { - SnapshotPoliciesList -} - -// SnapshotPoliciesClientListVolumesResponse contains the response from method SnapshotPoliciesClient.ListVolumes. -type SnapshotPoliciesClientListVolumesResponse struct { - SnapshotPolicyVolumeList -} - -// SnapshotPoliciesClientUpdateResponse contains the response from method SnapshotPoliciesClient.Update. -type SnapshotPoliciesClientUpdateResponse struct { - SnapshotPolicy -} - -// SnapshotsClientCreateResponse contains the response from method SnapshotsClient.Create. -type SnapshotsClientCreateResponse struct { - Snapshot -} - -// SnapshotsClientDeleteResponse contains the response from method SnapshotsClient.Delete. -type SnapshotsClientDeleteResponse struct { - // placeholder for future response values -} - -// SnapshotsClientGetResponse contains the response from method SnapshotsClient.Get. -type SnapshotsClientGetResponse struct { - Snapshot -} - -// SnapshotsClientListResponse contains the response from method SnapshotsClient.List. -type SnapshotsClientListResponse struct { - SnapshotsList -} - -// SnapshotsClientRestoreFilesResponse contains the response from method SnapshotsClient.RestoreFiles. -type SnapshotsClientRestoreFilesResponse struct { - // placeholder for future response values -} - -// SnapshotsClientUpdateResponse contains the response from method SnapshotsClient.Update. -type SnapshotsClientUpdateResponse struct { - Snapshot -} - -// SubvolumesClientCreateResponse contains the response from method SubvolumesClient.Create. -type SubvolumesClientCreateResponse struct { - SubvolumeInfo -} - -// SubvolumesClientDeleteResponse contains the response from method SubvolumesClient.Delete. -type SubvolumesClientDeleteResponse struct { - // placeholder for future response values -} - -// SubvolumesClientGetMetadataResponse contains the response from method SubvolumesClient.GetMetadata. -type SubvolumesClientGetMetadataResponse struct { - SubvolumeModel -} - -// SubvolumesClientGetResponse contains the response from method SubvolumesClient.Get. -type SubvolumesClientGetResponse struct { - SubvolumeInfo -} - -// SubvolumesClientListByVolumeResponse contains the response from method SubvolumesClient.ListByVolume. -type SubvolumesClientListByVolumeResponse struct { - SubvolumesList -} - -// SubvolumesClientUpdateResponse contains the response from method SubvolumesClient.Update. -type SubvolumesClientUpdateResponse struct { - SubvolumeInfo -} - -// VaultsClientListResponse contains the response from method VaultsClient.List. -type VaultsClientListResponse struct { - VaultList -} - -// VolumeGroupsClientCreateResponse contains the response from method VolumeGroupsClient.Create. -type VolumeGroupsClientCreateResponse struct { - VolumeGroupDetails -} - -// VolumeGroupsClientDeleteResponse contains the response from method VolumeGroupsClient.Delete. -type VolumeGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// VolumeGroupsClientGetResponse contains the response from method VolumeGroupsClient.Get. -type VolumeGroupsClientGetResponse struct { - VolumeGroupDetails -} - -// VolumeGroupsClientListByNetAppAccountResponse contains the response from method VolumeGroupsClient.ListByNetAppAccount. -type VolumeGroupsClientListByNetAppAccountResponse struct { - VolumeGroupList -} - -// VolumesClientAuthorizeReplicationResponse contains the response from method VolumesClient.AuthorizeReplication. -type VolumesClientAuthorizeReplicationResponse struct { - // placeholder for future response values -} - -// VolumesClientBreakReplicationResponse contains the response from method VolumesClient.BreakReplication. -type VolumesClientBreakReplicationResponse struct { - // placeholder for future response values -} - -// VolumesClientCreateOrUpdateResponse contains the response from method VolumesClient.CreateOrUpdate. -type VolumesClientCreateOrUpdateResponse struct { - Volume -} - -// VolumesClientDeleteReplicationResponse contains the response from method VolumesClient.DeleteReplication. -type VolumesClientDeleteReplicationResponse struct { - // placeholder for future response values -} - -// VolumesClientDeleteResponse contains the response from method VolumesClient.Delete. -type VolumesClientDeleteResponse struct { - // placeholder for future response values -} - -// VolumesClientGetResponse contains the response from method VolumesClient.Get. -type VolumesClientGetResponse struct { - Volume -} - -// VolumesClientListResponse contains the response from method VolumesClient.List. -type VolumesClientListResponse struct { - VolumeList -} - -// VolumesClientPoolChangeResponse contains the response from method VolumesClient.PoolChange. -type VolumesClientPoolChangeResponse struct { - // placeholder for future response values -} - -// VolumesClientReInitializeReplicationResponse contains the response from method VolumesClient.ReInitializeReplication. -type VolumesClientReInitializeReplicationResponse struct { - // placeholder for future response values -} - -// VolumesClientReplicationStatusResponse contains the response from method VolumesClient.ReplicationStatus. -type VolumesClientReplicationStatusResponse struct { - ReplicationStatus -} - -// VolumesClientResyncReplicationResponse contains the response from method VolumesClient.ResyncReplication. -type VolumesClientResyncReplicationResponse struct { - // placeholder for future response values -} - -// VolumesClientRevertResponse contains the response from method VolumesClient.Revert. -type VolumesClientRevertResponse struct { - // placeholder for future response values -} - -// VolumesClientUpdateResponse contains the response from method VolumesClient.Update. -type VolumesClientUpdateResponse struct { - Volume -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_snapshotpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_snapshotpolicies_client.go deleted file mode 100644 index 8568b8ca..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_snapshotpolicies_client.go +++ /dev/null @@ -1,444 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SnapshotPoliciesClient contains the methods for the SnapshotPolicies group. -// Don't use this type directly, use NewSnapshotPoliciesClient() instead. -type SnapshotPoliciesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSnapshotPoliciesClient creates a new instance of SnapshotPoliciesClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSnapshotPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SnapshotPoliciesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SnapshotPoliciesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Create - Create a snapshot policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// snapshotPolicyName - The name of the snapshot policy -// body - Snapshot policy object supplied in the body of the operation. -// options - SnapshotPoliciesClientCreateOptions contains the optional parameters for the SnapshotPoliciesClient.Create method. -func (client *SnapshotPoliciesClient) Create(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicy, options *SnapshotPoliciesClientCreateOptions) (SnapshotPoliciesClientCreateResponse, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, snapshotPolicyName, body, options) - if err != nil { - return SnapshotPoliciesClientCreateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SnapshotPoliciesClientCreateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SnapshotPoliciesClientCreateResponse{}, runtime.NewResponseError(resp) - } - return client.createHandleResponse(resp) -} - -// createCreateRequest creates the Create request. -func (client *SnapshotPoliciesClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicy, options *SnapshotPoliciesClientCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if snapshotPolicyName == "" { - return nil, errors.New("parameter snapshotPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotPolicyName}", url.PathEscape(snapshotPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// createHandleResponse handles the Create response. -func (client *SnapshotPoliciesClient) createHandleResponse(resp *http.Response) (SnapshotPoliciesClientCreateResponse, error) { - result := SnapshotPoliciesClientCreateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotPolicy); err != nil { - return SnapshotPoliciesClientCreateResponse{}, err - } - return result, nil -} - -// BeginDelete - Delete snapshot policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// snapshotPolicyName - The name of the snapshot policy -// options - SnapshotPoliciesClientBeginDeleteOptions contains the optional parameters for the SnapshotPoliciesClient.BeginDelete -// method. -func (client *SnapshotPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientBeginDeleteOptions) (*runtime.Poller[SnapshotPoliciesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, snapshotPolicyName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SnapshotPoliciesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SnapshotPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete snapshot policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *SnapshotPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, snapshotPolicyName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *SnapshotPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if snapshotPolicyName == "" { - return nil, errors.New("parameter snapshotPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotPolicyName}", url.PathEscape(snapshotPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Get a snapshot Policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// snapshotPolicyName - The name of the snapshot policy -// options - SnapshotPoliciesClientGetOptions contains the optional parameters for the SnapshotPoliciesClient.Get method. -func (client *SnapshotPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientGetOptions) (SnapshotPoliciesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, snapshotPolicyName, options) - if err != nil { - return SnapshotPoliciesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SnapshotPoliciesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SnapshotPoliciesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SnapshotPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if snapshotPolicyName == "" { - return nil, errors.New("parameter snapshotPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotPolicyName}", url.PathEscape(snapshotPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SnapshotPoliciesClient) getHandleResponse(resp *http.Response) (SnapshotPoliciesClientGetResponse, error) { - result := SnapshotPoliciesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotPolicy); err != nil { - return SnapshotPoliciesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List snapshot policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// options - SnapshotPoliciesClientListOptions contains the optional parameters for the SnapshotPoliciesClient.List method. -func (client *SnapshotPoliciesClient) NewListPager(resourceGroupName string, accountName string, options *SnapshotPoliciesClientListOptions) *runtime.Pager[SnapshotPoliciesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SnapshotPoliciesClientListResponse]{ - More: func(page SnapshotPoliciesClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *SnapshotPoliciesClientListResponse) (SnapshotPoliciesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) - if err != nil { - return SnapshotPoliciesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SnapshotPoliciesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SnapshotPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SnapshotPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *SnapshotPoliciesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SnapshotPoliciesClient) listHandleResponse(resp *http.Response) (SnapshotPoliciesClientListResponse, error) { - result := SnapshotPoliciesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotPoliciesList); err != nil { - return SnapshotPoliciesClientListResponse{}, err - } - return result, nil -} - -// ListVolumes - Get volumes associated with snapshot policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// snapshotPolicyName - The name of the snapshot policy -// options - SnapshotPoliciesClientListVolumesOptions contains the optional parameters for the SnapshotPoliciesClient.ListVolumes -// method. -func (client *SnapshotPoliciesClient) ListVolumes(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientListVolumesOptions) (SnapshotPoliciesClientListVolumesResponse, error) { - req, err := client.listVolumesCreateRequest(ctx, resourceGroupName, accountName, snapshotPolicyName, options) - if err != nil { - return SnapshotPoliciesClientListVolumesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SnapshotPoliciesClientListVolumesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SnapshotPoliciesClientListVolumesResponse{}, runtime.NewResponseError(resp) - } - return client.listVolumesHandleResponse(resp) -} - -// listVolumesCreateRequest creates the ListVolumes request. -func (client *SnapshotPoliciesClient) listVolumesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, options *SnapshotPoliciesClientListVolumesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if snapshotPolicyName == "" { - return nil, errors.New("parameter snapshotPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotPolicyName}", url.PathEscape(snapshotPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listVolumesHandleResponse handles the ListVolumes response. -func (client *SnapshotPoliciesClient) listVolumesHandleResponse(resp *http.Response) (SnapshotPoliciesClientListVolumesResponse, error) { - result := SnapshotPoliciesClientListVolumesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotPolicyVolumeList); err != nil { - return SnapshotPoliciesClientListVolumesResponse{}, err - } - return result, nil -} - -// BeginUpdate - Patch a snapshot policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// snapshotPolicyName - The name of the snapshot policy -// body - Snapshot policy object supplied in the body of the operation. -// options - SnapshotPoliciesClientBeginUpdateOptions contains the optional parameters for the SnapshotPoliciesClient.BeginUpdate -// method. -func (client *SnapshotPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicyPatch, options *SnapshotPoliciesClientBeginUpdateOptions) (*runtime.Poller[SnapshotPoliciesClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, accountName, snapshotPolicyName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SnapshotPoliciesClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SnapshotPoliciesClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Patch a snapshot policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *SnapshotPoliciesClient) update(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicyPatch, options *SnapshotPoliciesClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, snapshotPolicyName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *SnapshotPoliciesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, snapshotPolicyName string, body SnapshotPolicyPatch, options *SnapshotPoliciesClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if snapshotPolicyName == "" { - return nil, errors.New("parameter snapshotPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotPolicyName}", url.PathEscape(snapshotPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_snapshots_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_snapshots_client.go deleted file mode 100644 index 140a3a49..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_snapshots_client.go +++ /dev/null @@ -1,516 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SnapshotsClient contains the methods for the Snapshots group. -// Don't use this type directly, use NewSnapshotsClient() instead. -type SnapshotsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSnapshotsClient creates a new instance of SnapshotsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSnapshotsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SnapshotsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SnapshotsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - Create the specified snapshot within the given volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// snapshotName - The name of the snapshot -// body - Snapshot object supplied in the body of the operation. -// options - SnapshotsClientBeginCreateOptions contains the optional parameters for the SnapshotsClient.BeginCreate method. -func (client *SnapshotsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body Snapshot, options *SnapshotsClientBeginCreateOptions) (*runtime.Poller[SnapshotsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SnapshotsClientCreateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SnapshotsClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - Create the specified snapshot within the given volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *SnapshotsClient) create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body Snapshot, options *SnapshotsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *SnapshotsClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body Snapshot, options *SnapshotsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if snapshotName == "" { - return nil, errors.New("parameter snapshotName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginDelete - Delete snapshot -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// snapshotName - The name of the snapshot -// options - SnapshotsClientBeginDeleteOptions contains the optional parameters for the SnapshotsClient.BeginDelete method. -func (client *SnapshotsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*runtime.Poller[SnapshotsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SnapshotsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SnapshotsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete snapshot -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *SnapshotsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if snapshotName == "" { - return nil, errors.New("parameter snapshotName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Get details of the specified snapshot -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// snapshotName - The name of the snapshot -// options - SnapshotsClientGetOptions contains the optional parameters for the SnapshotsClient.Get method. -func (client *SnapshotsClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, options *SnapshotsClientGetOptions) (SnapshotsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, options) - if err != nil { - return SnapshotsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SnapshotsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SnapshotsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SnapshotsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, options *SnapshotsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if snapshotName == "" { - return nil, errors.New("parameter snapshotName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SnapshotsClient) getHandleResponse(resp *http.Response) (SnapshotsClientGetResponse, error) { - result := SnapshotsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Snapshot); err != nil { - return SnapshotsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all snapshots associated with the volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.List method. -func (client *SnapshotsClient) NewListPager(resourceGroupName string, accountName string, poolName string, volumeName string, options *SnapshotsClientListOptions) *runtime.Pager[SnapshotsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SnapshotsClientListResponse]{ - More: func(page SnapshotsClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *SnapshotsClientListResponse) (SnapshotsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return SnapshotsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SnapshotsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SnapshotsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SnapshotsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *SnapshotsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SnapshotsClient) listHandleResponse(resp *http.Response) (SnapshotsClientListResponse, error) { - result := SnapshotsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotsList); err != nil { - return SnapshotsClientListResponse{}, err - } - return result, nil -} - -// BeginRestoreFiles - Restore the specified files from the specified snapshot to the active filesystem -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// snapshotName - The name of the snapshot -// body - Restore payload supplied in the body of the operation. -// options - SnapshotsClientBeginRestoreFilesOptions contains the optional parameters for the SnapshotsClient.BeginRestoreFiles -// method. -func (client *SnapshotsClient) BeginRestoreFiles(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body SnapshotRestoreFiles, options *SnapshotsClientBeginRestoreFilesOptions) (*runtime.Poller[SnapshotsClientRestoreFilesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restoreFiles(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[SnapshotsClientRestoreFilesResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[SnapshotsClientRestoreFilesResponse](options.ResumeToken, client.pl, nil) - } -} - -// RestoreFiles - Restore the specified files from the specified snapshot to the active filesystem -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *SnapshotsClient) restoreFiles(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body SnapshotRestoreFiles, options *SnapshotsClientBeginRestoreFilesOptions) (*http.Response, error) { - req, err := client.restoreFilesCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restoreFilesCreateRequest creates the RestoreFiles request. -func (client *SnapshotsClient) restoreFilesCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body SnapshotRestoreFiles, options *SnapshotsClientBeginRestoreFilesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}/restoreFiles" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if snapshotName == "" { - return nil, errors.New("parameter snapshotName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginUpdate - Patch a snapshot -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// snapshotName - The name of the snapshot -// body - Snapshot object supplied in the body of the operation. -// options - SnapshotsClientBeginUpdateOptions contains the optional parameters for the SnapshotsClient.BeginUpdate method. -func (client *SnapshotsClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body interface{}, options *SnapshotsClientBeginUpdateOptions) (*runtime.Poller[SnapshotsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SnapshotsClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SnapshotsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Patch a snapshot -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *SnapshotsClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body interface{}, options *SnapshotsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, snapshotName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *SnapshotsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, snapshotName string, body interface{}, options *SnapshotsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if snapshotName == "" { - return nil, errors.New("parameter snapshotName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_subvolumes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_subvolumes_client.go deleted file mode 100644 index 6627a93f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_subvolumes_client.go +++ /dev/null @@ -1,524 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SubvolumesClient contains the methods for the Subvolumes group. -// Don't use this type directly, use NewSubvolumesClient() instead. -type SubvolumesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSubvolumesClient creates a new instance of SubvolumesClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSubvolumesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubvolumesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SubvolumesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - Creates a subvolume in the path or clones the subvolume mentioned in the parentPath -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// subvolumeName - The name of the subvolume. -// body - Subvolume object supplied in the body of the operation. -// options - SubvolumesClientBeginCreateOptions contains the optional parameters for the SubvolumesClient.BeginCreate method. -func (client *SubvolumesClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumeInfo, options *SubvolumesClientBeginCreateOptions) (*runtime.Poller[SubvolumesClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SubvolumesClientCreateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[SubvolumesClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - Creates a subvolume in the path or clones the subvolume mentioned in the parentPath -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *SubvolumesClient) create(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumeInfo, options *SubvolumesClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *SubvolumesClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumeInfo, options *SubvolumesClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if subvolumeName == "" { - return nil, errors.New("parameter subvolumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subvolumeName}", url.PathEscape(subvolumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginDelete - Delete subvolume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// subvolumeName - The name of the subvolume. -// options - SubvolumesClientBeginDeleteOptions contains the optional parameters for the SubvolumesClient.BeginDelete method. -func (client *SubvolumesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginDeleteOptions) (*runtime.Poller[SubvolumesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SubvolumesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[SubvolumesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete subvolume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *SubvolumesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *SubvolumesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if subvolumeName == "" { - return nil, errors.New("parameter subvolumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subvolumeName}", url.PathEscape(subvolumeName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Returns the path associated with the subvolumeName provided -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// subvolumeName - The name of the subvolume. -// options - SubvolumesClientGetOptions contains the optional parameters for the SubvolumesClient.Get method. -func (client *SubvolumesClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientGetOptions) (SubvolumesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, options) - if err != nil { - return SubvolumesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SubvolumesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubvolumesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SubvolumesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if subvolumeName == "" { - return nil, errors.New("parameter subvolumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subvolumeName}", url.PathEscape(subvolumeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SubvolumesClient) getHandleResponse(resp *http.Response) (SubvolumesClientGetResponse, error) { - result := SubvolumesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SubvolumeInfo); err != nil { - return SubvolumesClientGetResponse{}, err - } - return result, nil -} - -// BeginGetMetadata - Get details of the specified subvolume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// subvolumeName - The name of the subvolume. -// options - SubvolumesClientBeginGetMetadataOptions contains the optional parameters for the SubvolumesClient.BeginGetMetadata -// method. -func (client *SubvolumesClient) BeginGetMetadata(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginGetMetadataOptions) (*runtime.Poller[SubvolumesClientGetMetadataResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getMetadata(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SubvolumesClientGetMetadataResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[SubvolumesClientGetMetadataResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetMetadata - Get details of the specified subvolume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *SubvolumesClient) getMetadata(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginGetMetadataOptions) (*http.Response, error) { - req, err := client.getMetadataCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getMetadataCreateRequest creates the GetMetadata request. -func (client *SubvolumesClient) getMetadataCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, options *SubvolumesClientBeginGetMetadataOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}/getMetadata" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if subvolumeName == "" { - return nil, errors.New("parameter subvolumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subvolumeName}", url.PathEscape(subvolumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// NewListByVolumePager - Returns a list of the subvolumes in the volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - SubvolumesClientListByVolumeOptions contains the optional parameters for the SubvolumesClient.ListByVolume method. -func (client *SubvolumesClient) NewListByVolumePager(resourceGroupName string, accountName string, poolName string, volumeName string, options *SubvolumesClientListByVolumeOptions) *runtime.Pager[SubvolumesClientListByVolumeResponse] { - return runtime.NewPager(runtime.PagingHandler[SubvolumesClientListByVolumeResponse]{ - More: func(page SubvolumesClientListByVolumeResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SubvolumesClientListByVolumeResponse) (SubvolumesClientListByVolumeResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVolumeCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SubvolumesClientListByVolumeResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SubvolumesClientListByVolumeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubvolumesClientListByVolumeResponse{}, runtime.NewResponseError(resp) - } - return client.listByVolumeHandleResponse(resp) - }, - }) -} - -// listByVolumeCreateRequest creates the ListByVolume request. -func (client *SubvolumesClient) listByVolumeCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *SubvolumesClientListByVolumeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByVolumeHandleResponse handles the ListByVolume response. -func (client *SubvolumesClient) listByVolumeHandleResponse(resp *http.Response) (SubvolumesClientListByVolumeResponse, error) { - result := SubvolumesClientListByVolumeResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SubvolumesList); err != nil { - return SubvolumesClientListByVolumeResponse{}, err - } - return result, nil -} - -// BeginUpdate - Patch a subvolume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// subvolumeName - The name of the subvolume. -// body - Subvolume object supplied in the body of the operation. -// options - SubvolumesClientBeginUpdateOptions contains the optional parameters for the SubvolumesClient.BeginUpdate method. -func (client *SubvolumesClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumePatchRequest, options *SubvolumesClientBeginUpdateOptions) (*runtime.Poller[SubvolumesClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SubvolumesClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[SubvolumesClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Patch a subvolume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *SubvolumesClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumePatchRequest, options *SubvolumesClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, subvolumeName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *SubvolumesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, subvolumeName string, body SubvolumePatchRequest, options *SubvolumesClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - if subvolumeName == "" { - return nil, errors.New("parameter subvolumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subvolumeName}", url.PathEscape(subvolumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_time_rfc3339.go deleted file mode 100644 index ae4e28bf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_time_rfc3339.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_vaults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_vaults_client.go deleted file mode 100644 index 4978ee72..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_vaults_client.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VaultsClient contains the methods for the Vaults group. -// Don't use this type directly, use NewVaultsClient() instead. -type VaultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVaultsClient creates a new instance of VaultsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVaultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VaultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VaultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - List vaults for a Netapp Account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// options - VaultsClientListOptions contains the optional parameters for the VaultsClient.List method. -func (client *VaultsClient) NewListPager(resourceGroupName string, accountName string, options *VaultsClientListOptions) *runtime.Pager[VaultsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VaultsClientListResponse]{ - More: func(page VaultsClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *VaultsClientListResponse) (VaultsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, accountName, options) - if err != nil { - return VaultsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VaultsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VaultsClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *VaultsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/vaults" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VaultsClient) listHandleResponse(resp *http.Response) (VaultsClientListResponse, error) { - result := VaultsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VaultList); err != nil { - return VaultsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_volumegroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_volumegroups_client.go deleted file mode 100644 index b78f4080..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_volumegroups_client.go +++ /dev/null @@ -1,317 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VolumeGroupsClient contains the methods for the VolumeGroups group. -// Don't use this type directly, use NewVolumeGroupsClient() instead. -type VolumeGroupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVolumeGroupsClient creates a new instance of VolumeGroupsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVolumeGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VolumeGroupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VolumeGroupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - Create a volume group along with specified volumes -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// volumeGroupName - The name of the volumeGroup -// body - Volume Group object supplied in the body of the operation. -// options - VolumeGroupsClientBeginCreateOptions contains the optional parameters for the VolumeGroupsClient.BeginCreate -// method. -func (client *VolumeGroupsClient) BeginCreate(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, body VolumeGroupDetails, options *VolumeGroupsClientBeginCreateOptions) (*runtime.Poller[VolumeGroupsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, accountName, volumeGroupName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[VolumeGroupsClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[VolumeGroupsClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - Create a volume group along with specified volumes -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumeGroupsClient) create(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, body VolumeGroupDetails, options *VolumeGroupsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, accountName, volumeGroupName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *VolumeGroupsClient) createCreateRequest(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, body VolumeGroupDetails, options *VolumeGroupsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if volumeGroupName == "" { - return nil, errors.New("parameter volumeGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeGroupName}", url.PathEscape(volumeGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginDelete - Delete the specified volume group only if there are no volumes under volume group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// volumeGroupName - The name of the volumeGroup -// options - VolumeGroupsClientBeginDeleteOptions contains the optional parameters for the VolumeGroupsClient.BeginDelete -// method. -func (client *VolumeGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, options *VolumeGroupsClientBeginDeleteOptions) (*runtime.Poller[VolumeGroupsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, volumeGroupName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[VolumeGroupsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[VolumeGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the specified volume group only if there are no volumes under volume group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumeGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, options *VolumeGroupsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, volumeGroupName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VolumeGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, options *VolumeGroupsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if volumeGroupName == "" { - return nil, errors.New("parameter volumeGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeGroupName}", url.PathEscape(volumeGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Get details of the specified volume group -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// volumeGroupName - The name of the volumeGroup -// options - VolumeGroupsClientGetOptions contains the optional parameters for the VolumeGroupsClient.Get method. -func (client *VolumeGroupsClient) Get(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, options *VolumeGroupsClientGetOptions) (VolumeGroupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, volumeGroupName, options) - if err != nil { - return VolumeGroupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VolumeGroupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VolumeGroupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VolumeGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, volumeGroupName string, options *VolumeGroupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if volumeGroupName == "" { - return nil, errors.New("parameter volumeGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeGroupName}", url.PathEscape(volumeGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VolumeGroupsClient) getHandleResponse(resp *http.Response) (VolumeGroupsClientGetResponse, error) { - result := VolumeGroupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VolumeGroupDetails); err != nil { - return VolumeGroupsClientGetResponse{}, err - } - return result, nil -} - -// NewListByNetAppAccountPager - List all volume groups for given account -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// options - VolumeGroupsClientListByNetAppAccountOptions contains the optional parameters for the VolumeGroupsClient.ListByNetAppAccount -// method. -func (client *VolumeGroupsClient) NewListByNetAppAccountPager(resourceGroupName string, accountName string, options *VolumeGroupsClientListByNetAppAccountOptions) *runtime.Pager[VolumeGroupsClientListByNetAppAccountResponse] { - return runtime.NewPager(runtime.PagingHandler[VolumeGroupsClientListByNetAppAccountResponse]{ - More: func(page VolumeGroupsClientListByNetAppAccountResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *VolumeGroupsClientListByNetAppAccountResponse) (VolumeGroupsClientListByNetAppAccountResponse, error) { - req, err := client.listByNetAppAccountCreateRequest(ctx, resourceGroupName, accountName, options) - if err != nil { - return VolumeGroupsClientListByNetAppAccountResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VolumeGroupsClientListByNetAppAccountResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VolumeGroupsClientListByNetAppAccountResponse{}, runtime.NewResponseError(resp) - } - return client.listByNetAppAccountHandleResponse(resp) - }, - }) -} - -// listByNetAppAccountCreateRequest creates the ListByNetAppAccount request. -func (client *VolumeGroupsClient) listByNetAppAccountCreateRequest(ctx context.Context, resourceGroupName string, accountName string, options *VolumeGroupsClientListByNetAppAccountOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByNetAppAccountHandleResponse handles the ListByNetAppAccount response. -func (client *VolumeGroupsClient) listByNetAppAccountHandleResponse(resp *http.Response) (VolumeGroupsClientListByNetAppAccountResponse, error) { - result := VolumeGroupsClientListByNetAppAccountResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VolumeGroupList); err != nil { - return VolumeGroupsClientListByNetAppAccountResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_volumes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_volumes_client.go deleted file mode 100644 index c978cd9a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/zz_generated_volumes_client.go +++ /dev/null @@ -1,1015 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetapp - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// VolumesClient contains the methods for the Volumes group. -// Don't use this type directly, use NewVolumesClient() instead. -type VolumesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVolumesClient creates a new instance of VolumesClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVolumesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VolumesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VolumesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginAuthorizeReplication - Authorize the replication connection on the source volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// body - Authorize request object supplied in the body of the operation. -// options - VolumesClientBeginAuthorizeReplicationOptions contains the optional parameters for the VolumesClient.BeginAuthorizeReplication -// method. -func (client *VolumesClient) BeginAuthorizeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body AuthorizeRequest, options *VolumesClientBeginAuthorizeReplicationOptions) (*runtime.Poller[VolumesClientAuthorizeReplicationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.authorizeReplication(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VolumesClientAuthorizeReplicationResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VolumesClientAuthorizeReplicationResponse](options.ResumeToken, client.pl, nil) - } -} - -// AuthorizeReplication - Authorize the replication connection on the source volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumesClient) authorizeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body AuthorizeRequest, options *VolumesClientBeginAuthorizeReplicationOptions) (*http.Response, error) { - req, err := client.authorizeReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// authorizeReplicationCreateRequest creates the AuthorizeReplication request. -func (client *VolumesClient) authorizeReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body AuthorizeRequest, options *VolumesClientBeginAuthorizeReplicationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginBreakReplication - Break the replication connection on the destination volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - VolumesClientBeginBreakReplicationOptions contains the optional parameters for the VolumesClient.BeginBreakReplication -// method. -func (client *VolumesClient) BeginBreakReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakReplicationOptions) (*runtime.Poller[VolumesClientBreakReplicationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.breakReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VolumesClientBreakReplicationResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VolumesClientBreakReplicationResponse](options.ResumeToken, client.pl, nil) - } -} - -// BreakReplication - Break the replication connection on the destination volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumesClient) breakReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakReplicationOptions) (*http.Response, error) { - req, err := client.breakReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// breakReplicationCreateRequest creates the BreakReplication request. -func (client *VolumesClient) breakReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginBreakReplicationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - if options != nil && options.Body != nil { - return req, runtime.MarshalAsJSON(req, *options.Body) - } - return req, nil -} - -// BeginCreateOrUpdate - Create or update the specified volume within the capacity pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// body - Volume object supplied in the body of the operation. -// options - VolumesClientBeginCreateOrUpdateOptions contains the optional parameters for the VolumesClient.BeginCreateOrUpdate -// method. -func (client *VolumesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body Volume, options *VolumesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VolumesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VolumesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VolumesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update the specified volume within the capacity pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumesClient) createOrUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body Volume, options *VolumesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VolumesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body Volume, options *VolumesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginDelete - Delete the specified volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - VolumesClientBeginDeleteOptions contains the optional parameters for the VolumesClient.BeginDelete method. -func (client *VolumesClient) BeginDelete(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteOptions) (*runtime.Poller[VolumesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VolumesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VolumesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete the specified volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumesClient) deleteOperation(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VolumesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.ForceDelete != nil { - reqQP.Set("forceDelete", strconv.FormatBool(*options.ForceDelete)) - } - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// BeginDeleteReplication - Delete the replication connection on the destination volume, and send release to the source replication -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - VolumesClientBeginDeleteReplicationOptions contains the optional parameters for the VolumesClient.BeginDeleteReplication -// method. -func (client *VolumesClient) BeginDeleteReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteReplicationOptions) (*runtime.Poller[VolumesClientDeleteReplicationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VolumesClientDeleteReplicationResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VolumesClientDeleteReplicationResponse](options.ResumeToken, client.pl, nil) - } -} - -// DeleteReplication - Delete the replication connection on the destination volume, and send release to the source replication -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumesClient) deleteReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteReplicationOptions) (*http.Response, error) { - req, err := client.deleteReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteReplicationCreateRequest creates the DeleteReplication request. -func (client *VolumesClient) deleteReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginDeleteReplicationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Get the details of the specified volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - VolumesClientGetOptions contains the optional parameters for the VolumesClient.Get method. -func (client *VolumesClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientGetOptions) (VolumesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return VolumesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VolumesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VolumesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VolumesClient) getCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VolumesClient) getHandleResponse(resp *http.Response) (VolumesClientGetResponse, error) { - result := VolumesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Volume); err != nil { - return VolumesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all volumes within the capacity pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// options - VolumesClientListOptions contains the optional parameters for the VolumesClient.List method. -func (client *VolumesClient) NewListPager(resourceGroupName string, accountName string, poolName string, options *VolumesClientListOptions) *runtime.Pager[VolumesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VolumesClientListResponse]{ - More: func(page VolumesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VolumesClientListResponse) (VolumesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, accountName, poolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VolumesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VolumesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VolumesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VolumesClient) listCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, options *VolumesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VolumesClient) listHandleResponse(resp *http.Response) (VolumesClientListResponse, error) { - result := VolumesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VolumeList); err != nil { - return VolumesClientListResponse{}, err - } - return result, nil -} - -// BeginPoolChange - Moves volume to another pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// body - Move volume to the pool supplied in the body of the operation. -// options - VolumesClientBeginPoolChangeOptions contains the optional parameters for the VolumesClient.BeginPoolChange method. -func (client *VolumesClient) BeginPoolChange(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PoolChangeRequest, options *VolumesClientBeginPoolChangeOptions) (*runtime.Poller[VolumesClientPoolChangeResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.poolChange(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VolumesClientPoolChangeResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VolumesClientPoolChangeResponse](options.ResumeToken, client.pl, nil) - } -} - -// PoolChange - Moves volume to another pool -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumesClient) poolChange(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PoolChangeRequest, options *VolumesClientBeginPoolChangeOptions) (*http.Response, error) { - req, err := client.poolChangeCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// poolChangeCreateRequest creates the PoolChange request. -func (client *VolumesClient) poolChangeCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body PoolChangeRequest, options *VolumesClientBeginPoolChangeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginReInitializeReplication - Re-Initializes the replication connection on the destination volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - VolumesClientBeginReInitializeReplicationOptions contains the optional parameters for the VolumesClient.BeginReInitializeReplication -// method. -func (client *VolumesClient) BeginReInitializeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginReInitializeReplicationOptions) (*runtime.Poller[VolumesClientReInitializeReplicationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.reInitializeReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VolumesClientReInitializeReplicationResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VolumesClientReInitializeReplicationResponse](options.ResumeToken, client.pl, nil) - } -} - -// ReInitializeReplication - Re-Initializes the replication connection on the destination volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumesClient) reInitializeReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginReInitializeReplicationOptions) (*http.Response, error) { - req, err := client.reInitializeReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// reInitializeReplicationCreateRequest creates the ReInitializeReplication request. -func (client *VolumesClient) reInitializeReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginReInitializeReplicationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reinitializeReplication" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// ReplicationStatus - Get the status of the replication -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - VolumesClientReplicationStatusOptions contains the optional parameters for the VolumesClient.ReplicationStatus -// method. -func (client *VolumesClient) ReplicationStatus(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientReplicationStatusOptions) (VolumesClientReplicationStatusResponse, error) { - req, err := client.replicationStatusCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return VolumesClientReplicationStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VolumesClientReplicationStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VolumesClientReplicationStatusResponse{}, runtime.NewResponseError(resp) - } - return client.replicationStatusHandleResponse(resp) -} - -// replicationStatusCreateRequest creates the ReplicationStatus request. -func (client *VolumesClient) replicationStatusCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientReplicationStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// replicationStatusHandleResponse handles the ReplicationStatus response. -func (client *VolumesClient) replicationStatusHandleResponse(resp *http.Response) (VolumesClientReplicationStatusResponse, error) { - result := VolumesClientReplicationStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationStatus); err != nil { - return VolumesClientReplicationStatusResponse{}, err - } - return result, nil -} - -// BeginResyncReplication - Resync the connection on the destination volume. If the operation is ran on the source volume -// it will reverse-resync the connection and sync from destination to source. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// options - VolumesClientBeginResyncReplicationOptions contains the optional parameters for the VolumesClient.BeginResyncReplication -// method. -func (client *VolumesClient) BeginResyncReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginResyncReplicationOptions) (*runtime.Poller[VolumesClientResyncReplicationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resyncReplication(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VolumesClientResyncReplicationResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VolumesClientResyncReplicationResponse](options.ResumeToken, client.pl, nil) - } -} - -// ResyncReplication - Resync the connection on the destination volume. If the operation is ran on the source volume it will -// reverse-resync the connection and sync from destination to source. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumesClient) resyncReplication(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginResyncReplicationOptions) (*http.Response, error) { - req, err := client.resyncReplicationCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resyncReplicationCreateRequest creates the ResyncReplication request. -func (client *VolumesClient) resyncReplicationCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, options *VolumesClientBeginResyncReplicationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// BeginRevert - Revert a volume to the snapshot specified in the body -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// body - Object for snapshot to revert supplied in the body of the operation. -// options - VolumesClientBeginRevertOptions contains the optional parameters for the VolumesClient.BeginRevert method. -func (client *VolumesClient) BeginRevert(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumeRevert, options *VolumesClientBeginRevertOptions) (*runtime.Poller[VolumesClientRevertResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.revert(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VolumesClientRevertResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VolumesClientRevertResponse](options.ResumeToken, client.pl, nil) - } -} - -// Revert - Revert a volume to the snapshot specified in the body -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumesClient) revert(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumeRevert, options *VolumesClientBeginRevertOptions) (*http.Response, error) { - req, err := client.revertCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// revertCreateRequest creates the Revert request. -func (client *VolumesClient) revertCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumeRevert, options *VolumesClientBeginRevertOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, runtime.MarshalAsJSON(req, body) -} - -// BeginUpdate - Patch the specified volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group. -// accountName - The name of the NetApp account -// poolName - The name of the capacity pool -// volumeName - The name of the volume -// body - Volume object supplied in the body of the operation. -// options - VolumesClientBeginUpdateOptions contains the optional parameters for the VolumesClient.BeginUpdate method. -func (client *VolumesClient) BeginUpdate(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumePatch, options *VolumesClientBeginUpdateOptions) (*runtime.Poller[VolumesClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VolumesClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VolumesClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Patch the specified volume -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -func (client *VolumesClient) update(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumePatch, options *VolumesClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, accountName, poolName, volumeName, body, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *VolumesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, accountName string, poolName string, volumeName string, body VolumePatch, options *VolumesClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if accountName == "" { - return nil, errors.New("parameter accountName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{accountName}", url.PathEscape(accountName)) - if poolName == "" { - return nil, errors.New("parameter poolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) - if volumeName == "" { - return nil, errors.New("parameter volumeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{volumeName}", url.PathEscape(volumeName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, body) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/CHANGELOG.md deleted file mode 100644 index 9ee3cb2c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/CHANGELOG.md +++ /dev/null @@ -1,350 +0,0 @@ -# Release History - -## 1.1.0 (2022-08-05) -### Features Added - -- New const `SecurityConfigurationRuleDirectionInbound` -- New const `IsGlobalFalse` -- New const `EndpointTypeAzureVMSS` -- New const `ScopeConnectionStateConflict` -- New const `SecurityConfigurationRuleDirectionOutbound` -- New const `GroupConnectivityDirectlyConnected` -- New const `ScopeConnectionStateRejected` -- New const `ConfigurationTypeConnectivity` -- New const `AutoLearnPrivateRangesModeEnabled` -- New const `UseHubGatewayFalse` -- New const `NetworkIntentPolicyBasedServiceNone` -- New const `DeleteExistingPeeringFalse` -- New const `EffectiveAdminRuleKindDefault` -- New const `DeploymentStatusFailed` -- New const `AddressPrefixTypeIPPrefix` -- New const `AddressPrefixTypeServiceTag` -- New const `UseHubGatewayTrue` -- New const `WebApplicationFirewallOperatorAny` -- New const `SecurityConfigurationRuleAccessAlwaysAllow` -- New const `CreatedByTypeUser` -- New const `EndpointTypeAzureArcVM` -- New const `DeploymentStatusNotStarted` -- New const `SecurityConfigurationRuleProtocolTCP` -- New const `SecurityConfigurationRuleAccessDeny` -- New const `SecurityConfigurationRuleProtocolEsp` -- New const `IsGlobalTrue` -- New const `DeploymentStatusDeployed` -- New const `NetworkIntentPolicyBasedServiceAll` -- New const `SecurityConfigurationRuleProtocolUDP` -- New const `CreatedByTypeKey` -- New const `PacketCaptureTargetTypeAzureVMSS` -- New const `ApplicationGatewaySSLPolicyTypeCustomV2` -- New const `DeleteExistingPeeringTrue` -- New const `ScopeConnectionStateConnected` -- New const `ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101S` -- New const `ConnectivityTopologyMesh` -- New const `CreatedByTypeManagedIdentity` -- New const `AdminRuleKindCustom` -- New const `ApplicationGatewaySSLProtocolTLSv13` -- New const `ConnectivityTopologyHubAndSpoke` -- New const `ScopeConnectionStateRevoked` -- New const `ConfigurationTypeSecurityAdmin` -- New const `SecurityConfigurationRuleProtocolAh` -- New const `CommissionedStateCommissionedNoInternetAdvertise` -- New const `ScopeConnectionStatePending` -- New const `SecurityConfigurationRuleAccessAllow` -- New const `SecurityConfigurationRuleProtocolIcmp` -- New const `AutoLearnPrivateRangesModeDisabled` -- New const `SecurityConfigurationRuleProtocolAny` -- New const `ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101` -- New const `CreatedByTypeApplication` -- New const `GroupConnectivityNone` -- New const `EffectiveAdminRuleKindCustom` -- New const `AdminRuleKindDefault` -- New const `DeploymentStatusDeploying` -- New const `PacketCaptureTargetTypeAzureVM` -- New function `*ManagementClient.ListActiveConnectivityConfigurations(context.Context, string, string, ActiveConfigurationParameter, *ManagementClientListActiveConnectivityConfigurationsOptions) (ManagementClientListActiveConnectivityConfigurationsResponse, error)` -- New function `*ManagersClient.NewListBySubscriptionPager(*ManagersClientListBySubscriptionOptions) *runtime.Pager[ManagersClientListBySubscriptionResponse]` -- New function `NewStaticMembersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*StaticMembersClient, error)` -- New function `NewAdminRulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AdminRulesClient, error)` -- New function `*EffectiveDefaultSecurityAdminRule.GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule` -- New function `PossibleAddressPrefixTypeValues() []AddressPrefixType` -- New function `PossibleUseHubGatewayValues() []UseHubGateway` -- New function `*ScopeConnectionsClient.Delete(context.Context, string, string, string, *ScopeConnectionsClientDeleteOptions) (ScopeConnectionsClientDeleteResponse, error)` -- New function `PossibleIsGlobalValues() []IsGlobal` -- New function `*ManagementClient.ListActiveSecurityAdminRules(context.Context, string, string, ActiveConfigurationParameter, *ManagementClientListActiveSecurityAdminRulesOptions) (ManagementClientListActiveSecurityAdminRulesResponse, error)` -- New function `*ManagersClient.NewListPager(string, *ManagersClientListOptions) *runtime.Pager[ManagersClientListResponse]` -- New function `NewConnectivityConfigurationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ConnectivityConfigurationsClient, error)` -- New function `*GroupsClient.Get(context.Context, string, string, string, *GroupsClientGetOptions) (GroupsClientGetResponse, error)` -- New function `PossibleAdminRuleKindValues() []AdminRuleKind` -- New function `*ScopeConnectionsClient.Get(context.Context, string, string, string, *ScopeConnectionsClientGetOptions) (ScopeConnectionsClientGetResponse, error)` -- New function `*AdminRuleCollectionsClient.CreateOrUpdate(context.Context, string, string, string, string, AdminRuleCollection, *AdminRuleCollectionsClientCreateOrUpdateOptions) (AdminRuleCollectionsClientCreateOrUpdateResponse, error)` -- New function `PossibleScopeConnectionStateValues() []ScopeConnectionState` -- New function `*ConnectivityConfigurationsClient.NewListPager(string, string, *ConnectivityConfigurationsClientListOptions) *runtime.Pager[ConnectivityConfigurationsClientListResponse]` -- New function `*BaseAdminRule.GetBaseAdminRule() *BaseAdminRule` -- New function `PossibleSecurityConfigurationRuleProtocolValues() []SecurityConfigurationRuleProtocol` -- New function `*AdminRulesClient.CreateOrUpdate(context.Context, string, string, string, string, string, BaseAdminRuleClassification, *AdminRulesClientCreateOrUpdateOptions) (AdminRulesClientCreateOrUpdateResponse, error)` -- New function `PossibleNetworkIntentPolicyBasedServiceValues() []NetworkIntentPolicyBasedService` -- New function `*ManagementGroupNetworkManagerConnectionsClient.Delete(context.Context, string, string, *ManagementGroupNetworkManagerConnectionsClientDeleteOptions) (ManagementGroupNetworkManagerConnectionsClientDeleteResponse, error)` -- New function `PossibleSecurityConfigurationRuleAccessValues() []SecurityConfigurationRuleAccess` -- New function `*ManagersClient.BeginDelete(context.Context, string, string, *ManagersClientBeginDeleteOptions) (*runtime.Poller[ManagersClientDeleteResponse], error)` -- New function `*ManagementClient.ExpressRouteProviderPort(context.Context, string, *ManagementClientExpressRouteProviderPortOptions) (ManagementClientExpressRouteProviderPortResponse, error)` -- New function `*ActiveBaseSecurityAdminRule.GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule` -- New function `*ConnectivityConfigurationsClient.BeginDelete(context.Context, string, string, string, *ConnectivityConfigurationsClientBeginDeleteOptions) (*runtime.Poller[ConnectivityConfigurationsClientDeleteResponse], error)` -- New function `*AdminRuleCollectionsClient.BeginDelete(context.Context, string, string, string, string, *AdminRuleCollectionsClientBeginDeleteOptions) (*runtime.Poller[AdminRuleCollectionsClientDeleteResponse], error)` -- New function `*ConnectivityConfigurationsClient.CreateOrUpdate(context.Context, string, string, string, ConnectivityConfiguration, *ConnectivityConfigurationsClientCreateOrUpdateOptions) (ConnectivityConfigurationsClientCreateOrUpdateResponse, error)` -- New function `*SecurityAdminConfigurationsClient.Get(context.Context, string, string, string, *SecurityAdminConfigurationsClientGetOptions) (SecurityAdminConfigurationsClientGetResponse, error)` -- New function `*StaticMembersClient.Delete(context.Context, string, string, string, string, *StaticMembersClientDeleteOptions) (StaticMembersClientDeleteResponse, error)` -- New function `*ManagerDeploymentStatusClient.List(context.Context, string, string, ManagerDeploymentStatusParameter, *ManagerDeploymentStatusClientListOptions) (ManagerDeploymentStatusClientListResponse, error)` -- New function `*SubscriptionNetworkManagerConnectionsClient.Delete(context.Context, string, *SubscriptionNetworkManagerConnectionsClientDeleteOptions) (SubscriptionNetworkManagerConnectionsClientDeleteResponse, error)` -- New function `PossibleEffectiveAdminRuleKindValues() []EffectiveAdminRuleKind` -- New function `*AdminRulesClient.NewListPager(string, string, string, string, *AdminRulesClientListOptions) *runtime.Pager[AdminRulesClientListResponse]` -- New function `*GroupsClient.NewListPager(string, string, *GroupsClientListOptions) *runtime.Pager[GroupsClientListResponse]` -- New function `*GroupsClient.BeginDelete(context.Context, string, string, string, *GroupsClientBeginDeleteOptions) (*runtime.Poller[GroupsClientDeleteResponse], error)` -- New function `*StaticMembersClient.NewListPager(string, string, string, *StaticMembersClientListOptions) *runtime.Pager[StaticMembersClientListResponse]` -- New function `NewGroupsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GroupsClient, error)` -- New function `PossibleCreatedByTypeValues() []CreatedByType` -- New function `PossibleAutoLearnPrivateRangesModeValues() []AutoLearnPrivateRangesMode` -- New function `*ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate(context.Context, string, string, ManagerConnection, *ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions) (ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse, error)` -- New function `*GroupsClient.CreateOrUpdate(context.Context, string, string, string, Group, *GroupsClientCreateOrUpdateOptions) (GroupsClientCreateOrUpdateResponse, error)` -- New function `*ActiveSecurityAdminRule.GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule` -- New function `*AdminRuleCollectionsClient.Get(context.Context, string, string, string, string, *AdminRuleCollectionsClientGetOptions) (AdminRuleCollectionsClientGetResponse, error)` -- New function `*ManagersClient.CreateOrUpdate(context.Context, string, string, Manager, *ManagersClientCreateOrUpdateOptions) (ManagersClientCreateOrUpdateResponse, error)` -- New function `*SubscriptionNetworkManagerConnectionsClient.NewListPager(*SubscriptionNetworkManagerConnectionsClientListOptions) *runtime.Pager[SubscriptionNetworkManagerConnectionsClientListResponse]` -- New function `*AdminRule.GetBaseAdminRule() *BaseAdminRule` -- New function `*AdminRulesClient.Get(context.Context, string, string, string, string, string, *AdminRulesClientGetOptions) (AdminRulesClientGetResponse, error)` -- New function `PossiblePacketCaptureTargetTypeValues() []PacketCaptureTargetType` -- New function `*ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules(context.Context, string, string, QueryRequestOptions, *ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions) (ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse, error)` -- New function `*ManagementGroupNetworkManagerConnectionsClient.Get(context.Context, string, string, *ManagementGroupNetworkManagerConnectionsClientGetOptions) (ManagementGroupNetworkManagerConnectionsClientGetResponse, error)` -- New function `NewExpressRouteProviderPortsLocationClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ExpressRouteProviderPortsLocationClient, error)` -- New function `*DefaultAdminRule.GetBaseAdminRule() *BaseAdminRule` -- New function `*ConnectivityConfigurationsClient.Get(context.Context, string, string, string, *ConnectivityConfigurationsClientGetOptions) (ConnectivityConfigurationsClientGetResponse, error)` -- New function `NewManagersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagersClient, error)` -- New function `*SubscriptionNetworkManagerConnectionsClient.Get(context.Context, string, *SubscriptionNetworkManagerConnectionsClientGetOptions) (SubscriptionNetworkManagerConnectionsClientGetResponse, error)` -- New function `*EffectiveSecurityAdminRule.GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule` -- New function `*EffectiveBaseSecurityAdminRule.GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule` -- New function `NewScopeConnectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ScopeConnectionsClient, error)` -- New function `NewAdminRuleCollectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AdminRuleCollectionsClient, error)` -- New function `*ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations(context.Context, string, string, QueryRequestOptions, *ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions) (ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse, error)` -- New function `PossibleGroupConnectivityValues() []GroupConnectivity` -- New function `NewSubscriptionNetworkManagerConnectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SubscriptionNetworkManagerConnectionsClient, error)` -- New function `*AzureFirewallsClient.BeginListLearnedPrefixes(context.Context, string, string, *AzureFirewallsClientBeginListLearnedPrefixesOptions) (*runtime.Poller[AzureFirewallsClientListLearnedPrefixesResponse], error)` -- New function `*ManagersClient.Patch(context.Context, string, string, PatchObject, *ManagersClientPatchOptions) (ManagersClientPatchResponse, error)` -- New function `*ManagersClient.Get(context.Context, string, string, *ManagersClientGetOptions) (ManagersClientGetResponse, error)` -- New function `*StaticMembersClient.CreateOrUpdate(context.Context, string, string, string, string, StaticMember, *StaticMembersClientCreateOrUpdateOptions) (StaticMembersClientCreateOrUpdateResponse, error)` -- New function `*AdminRuleCollectionsClient.NewListPager(string, string, string, *AdminRuleCollectionsClientListOptions) *runtime.Pager[AdminRuleCollectionsClientListResponse]` -- New function `*ScopeConnectionsClient.NewListPager(string, string, *ScopeConnectionsClientListOptions) *runtime.Pager[ScopeConnectionsClientListResponse]` -- New function `*ActiveDefaultSecurityAdminRule.GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule` -- New function `*ExpressRouteProviderPortsLocationClient.List(context.Context, *ExpressRouteProviderPortsLocationClientListOptions) (ExpressRouteProviderPortsLocationClientListResponse, error)` -- New function `*ManagerCommitsClient.BeginPost(context.Context, string, string, ManagerCommit, *ManagerCommitsClientBeginPostOptions) (*runtime.Poller[ManagerCommitsClientPostResponse], error)` -- New function `NewManagerCommitsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagerCommitsClient, error)` -- New function `PossibleConfigurationTypeValues() []ConfigurationType` -- New function `NewManagerDeploymentStatusClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagerDeploymentStatusClient, error)` -- New function `*ScopeConnectionsClient.CreateOrUpdate(context.Context, string, string, string, ScopeConnection, *ScopeConnectionsClientCreateOrUpdateOptions) (ScopeConnectionsClientCreateOrUpdateResponse, error)` -- New function `*SecurityAdminConfigurationsClient.CreateOrUpdate(context.Context, string, string, string, SecurityAdminConfiguration, *SecurityAdminConfigurationsClientCreateOrUpdateOptions) (SecurityAdminConfigurationsClientCreateOrUpdateResponse, error)` -- New function `NewManagementGroupNetworkManagerConnectionsClient(azcore.TokenCredential, *arm.ClientOptions) (*ManagementGroupNetworkManagerConnectionsClient, error)` -- New function `PossibleDeleteExistingPeeringValues() []DeleteExistingPeering` -- New function `PossibleDeploymentStatusValues() []DeploymentStatus` -- New function `*ManagementGroupNetworkManagerConnectionsClient.NewListPager(string, *ManagementGroupNetworkManagerConnectionsClientListOptions) *runtime.Pager[ManagementGroupNetworkManagerConnectionsClientListResponse]` -- New function `*SecurityAdminConfigurationsClient.NewListPager(string, string, *SecurityAdminConfigurationsClientListOptions) *runtime.Pager[SecurityAdminConfigurationsClientListResponse]` -- New function `PossibleConnectivityTopologyValues() []ConnectivityTopology` -- New function `*StaticMembersClient.Get(context.Context, string, string, string, string, *StaticMembersClientGetOptions) (StaticMembersClientGetResponse, error)` -- New function `PossibleSecurityConfigurationRuleDirectionValues() []SecurityConfigurationRuleDirection` -- New function `*SecurityAdminConfigurationsClient.BeginDelete(context.Context, string, string, string, *SecurityAdminConfigurationsClientBeginDeleteOptions) (*runtime.Poller[SecurityAdminConfigurationsClientDeleteResponse], error)` -- New function `NewSecurityAdminConfigurationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SecurityAdminConfigurationsClient, error)` -- New function `*AdminRulesClient.BeginDelete(context.Context, string, string, string, string, string, *AdminRulesClientBeginDeleteOptions) (*runtime.Poller[AdminRulesClientDeleteResponse], error)` -- New function `*SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate(context.Context, string, ManagerConnection, *SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions) (SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse, error)` -- New struct `ActiveBaseSecurityAdminRule` -- New struct `ActiveConfigurationParameter` -- New struct `ActiveConnectivityConfiguration` -- New struct `ActiveConnectivityConfigurationsListResult` -- New struct `ActiveDefaultSecurityAdminRule` -- New struct `ActiveSecurityAdminRule` -- New struct `ActiveSecurityAdminRulesListResult` -- New struct `AddressPrefixItem` -- New struct `AdminPropertiesFormat` -- New struct `AdminRule` -- New struct `AdminRuleCollection` -- New struct `AdminRuleCollectionListResult` -- New struct `AdminRuleCollectionPropertiesFormat` -- New struct `AdminRuleCollectionsClient` -- New struct `AdminRuleCollectionsClientBeginDeleteOptions` -- New struct `AdminRuleCollectionsClientCreateOrUpdateOptions` -- New struct `AdminRuleCollectionsClientCreateOrUpdateResponse` -- New struct `AdminRuleCollectionsClientDeleteResponse` -- New struct `AdminRuleCollectionsClientGetOptions` -- New struct `AdminRuleCollectionsClientGetResponse` -- New struct `AdminRuleCollectionsClientListOptions` -- New struct `AdminRuleCollectionsClientListResponse` -- New struct `AdminRuleListResult` -- New struct `AdminRulesClient` -- New struct `AdminRulesClientBeginDeleteOptions` -- New struct `AdminRulesClientCreateOrUpdateOptions` -- New struct `AdminRulesClientCreateOrUpdateResponse` -- New struct `AdminRulesClientDeleteResponse` -- New struct `AdminRulesClientGetOptions` -- New struct `AdminRulesClientGetResponse` -- New struct `AdminRulesClientListOptions` -- New struct `AdminRulesClientListResponse` -- New struct `AzureFirewallsClientBeginListLearnedPrefixesOptions` -- New struct `AzureFirewallsClientListLearnedPrefixesResponse` -- New struct `BaseAdminRule` -- New struct `ChildResource` -- New struct `ConfigurationGroup` -- New struct `ConnectivityConfiguration` -- New struct `ConnectivityConfigurationListResult` -- New struct `ConnectivityConfigurationProperties` -- New struct `ConnectivityConfigurationsClient` -- New struct `ConnectivityConfigurationsClientBeginDeleteOptions` -- New struct `ConnectivityConfigurationsClientCreateOrUpdateOptions` -- New struct `ConnectivityConfigurationsClientCreateOrUpdateResponse` -- New struct `ConnectivityConfigurationsClientDeleteResponse` -- New struct `ConnectivityConfigurationsClientGetOptions` -- New struct `ConnectivityConfigurationsClientGetResponse` -- New struct `ConnectivityConfigurationsClientListOptions` -- New struct `ConnectivityConfigurationsClientListResponse` -- New struct `ConnectivityGroupItem` -- New struct `CrossTenantScopes` -- New struct `DefaultAdminPropertiesFormat` -- New struct `DefaultAdminRule` -- New struct `EffectiveBaseSecurityAdminRule` -- New struct `EffectiveConnectivityConfiguration` -- New struct `EffectiveDefaultSecurityAdminRule` -- New struct `EffectiveSecurityAdminRule` -- New struct `ExpressRouteProviderPort` -- New struct `ExpressRouteProviderPortListResult` -- New struct `ExpressRouteProviderPortProperties` -- New struct `ExpressRouteProviderPortsLocationClient` -- New struct `ExpressRouteProviderPortsLocationClientListOptions` -- New struct `ExpressRouteProviderPortsLocationClientListResponse` -- New struct `Group` -- New struct `GroupListResult` -- New struct `GroupProperties` -- New struct `GroupsClient` -- New struct `GroupsClientBeginDeleteOptions` -- New struct `GroupsClientCreateOrUpdateOptions` -- New struct `GroupsClientCreateOrUpdateResponse` -- New struct `GroupsClientDeleteResponse` -- New struct `GroupsClientGetOptions` -- New struct `GroupsClientGetResponse` -- New struct `GroupsClientListOptions` -- New struct `GroupsClientListResponse` -- New struct `Hub` -- New struct `IPPrefixesList` -- New struct `ManagementClientExpressRouteProviderPortOptions` -- New struct `ManagementClientExpressRouteProviderPortResponse` -- New struct `ManagementClientListActiveConnectivityConfigurationsOptions` -- New struct `ManagementClientListActiveConnectivityConfigurationsResponse` -- New struct `ManagementClientListActiveSecurityAdminRulesOptions` -- New struct `ManagementClientListActiveSecurityAdminRulesResponse` -- New struct `ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions` -- New struct `ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse` -- New struct `ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions` -- New struct `ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse` -- New struct `ManagementGroupNetworkManagerConnectionsClient` -- New struct `ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions` -- New struct `ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse` -- New struct `ManagementGroupNetworkManagerConnectionsClientDeleteOptions` -- New struct `ManagementGroupNetworkManagerConnectionsClientDeleteResponse` -- New struct `ManagementGroupNetworkManagerConnectionsClientGetOptions` -- New struct `ManagementGroupNetworkManagerConnectionsClientGetResponse` -- New struct `ManagementGroupNetworkManagerConnectionsClientListOptions` -- New struct `ManagementGroupNetworkManagerConnectionsClientListResponse` -- New struct `Manager` -- New struct `ManagerCommit` -- New struct `ManagerCommitsClient` -- New struct `ManagerCommitsClientBeginPostOptions` -- New struct `ManagerCommitsClientPostResponse` -- New struct `ManagerConnection` -- New struct `ManagerConnectionListResult` -- New struct `ManagerConnectionProperties` -- New struct `ManagerDeploymentStatus` -- New struct `ManagerDeploymentStatusClient` -- New struct `ManagerDeploymentStatusClientListOptions` -- New struct `ManagerDeploymentStatusClientListResponse` -- New struct `ManagerDeploymentStatusListResult` -- New struct `ManagerDeploymentStatusParameter` -- New struct `ManagerEffectiveConnectivityConfigurationListResult` -- New struct `ManagerEffectiveSecurityAdminRulesListResult` -- New struct `ManagerListResult` -- New struct `ManagerProperties` -- New struct `ManagerPropertiesNetworkManagerScopes` -- New struct `ManagerSecurityGroupItem` -- New struct `ManagersClient` -- New struct `ManagersClientBeginDeleteOptions` -- New struct `ManagersClientCreateOrUpdateOptions` -- New struct `ManagersClientCreateOrUpdateResponse` -- New struct `ManagersClientDeleteResponse` -- New struct `ManagersClientGetOptions` -- New struct `ManagersClientGetResponse` -- New struct `ManagersClientListBySubscriptionOptions` -- New struct `ManagersClientListBySubscriptionResponse` -- New struct `ManagersClientListOptions` -- New struct `ManagersClientListResponse` -- New struct `ManagersClientPatchOptions` -- New struct `ManagersClientPatchResponse` -- New struct `PacketCaptureMachineScope` -- New struct `PatchObject` -- New struct `QueryRequestOptions` -- New struct `ScopeConnection` -- New struct `ScopeConnectionListResult` -- New struct `ScopeConnectionProperties` -- New struct `ScopeConnectionsClient` -- New struct `ScopeConnectionsClientCreateOrUpdateOptions` -- New struct `ScopeConnectionsClientCreateOrUpdateResponse` -- New struct `ScopeConnectionsClientDeleteOptions` -- New struct `ScopeConnectionsClientDeleteResponse` -- New struct `ScopeConnectionsClientGetOptions` -- New struct `ScopeConnectionsClientGetResponse` -- New struct `ScopeConnectionsClientListOptions` -- New struct `ScopeConnectionsClientListResponse` -- New struct `SecurityAdminConfiguration` -- New struct `SecurityAdminConfigurationListResult` -- New struct `SecurityAdminConfigurationPropertiesFormat` -- New struct `SecurityAdminConfigurationsClient` -- New struct `SecurityAdminConfigurationsClientBeginDeleteOptions` -- New struct `SecurityAdminConfigurationsClientCreateOrUpdateOptions` -- New struct `SecurityAdminConfigurationsClientCreateOrUpdateResponse` -- New struct `SecurityAdminConfigurationsClientDeleteResponse` -- New struct `SecurityAdminConfigurationsClientGetOptions` -- New struct `SecurityAdminConfigurationsClientGetResponse` -- New struct `SecurityAdminConfigurationsClientListOptions` -- New struct `SecurityAdminConfigurationsClientListResponse` -- New struct `StaticMember` -- New struct `StaticMemberListResult` -- New struct `StaticMemberProperties` -- New struct `StaticMembersClient` -- New struct `StaticMembersClientCreateOrUpdateOptions` -- New struct `StaticMembersClientCreateOrUpdateResponse` -- New struct `StaticMembersClientDeleteOptions` -- New struct `StaticMembersClientDeleteResponse` -- New struct `StaticMembersClientGetOptions` -- New struct `StaticMembersClientGetResponse` -- New struct `StaticMembersClientListOptions` -- New struct `StaticMembersClientListResponse` -- New struct `SubscriptionNetworkManagerConnectionsClient` -- New struct `SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions` -- New struct `SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse` -- New struct `SubscriptionNetworkManagerConnectionsClientDeleteOptions` -- New struct `SubscriptionNetworkManagerConnectionsClientDeleteResponse` -- New struct `SubscriptionNetworkManagerConnectionsClientGetOptions` -- New struct `SubscriptionNetworkManagerConnectionsClientGetResponse` -- New struct `SubscriptionNetworkManagerConnectionsClientListOptions` -- New struct `SubscriptionNetworkManagerConnectionsClientListResponse` -- New struct `SystemData` -- New struct `VirtualRouterAutoScaleConfiguration` -- New field `NoInternetAdvertise` in struct `CustomIPPrefixPropertiesFormat` -- New field `FlushConnection` in struct `SecurityGroupPropertiesFormat` -- New field `EnablePacFile` in struct `ExplicitProxySettings` -- New field `Scope` in struct `PacketCaptureParameters` -- New field `TargetType` in struct `PacketCaptureParameters` -- New field `Scope` in struct `PacketCaptureResultProperties` -- New field `TargetType` in struct `PacketCaptureResultProperties` -- New field `AutoLearnPrivateRanges` in struct `FirewallPolicySNAT` -- New field `VirtualRouterAutoScaleConfiguration` in struct `VirtualHubProperties` -- New field `Priority` in struct `ApplicationGatewayRoutingRulePropertiesFormat` - - -## 1.0.0 (2022-05-16) - -The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. - -To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). - -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/README.md deleted file mode 100644 index a967c337..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# Azure Network Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork) - -The `armnetwork` module provides operations for working with Azure Network. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/network/armnetwork) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Network module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Network. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure Network modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armnetwork.NewVirtualHubBgpConnectionsClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armnetwork.NewVirtualHubBgpConnectionsClient(, cred, &options) -``` - -## More sample code - -- [IP Address](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/ipaddress) -- [Load Balancer](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/loadbalancer) -- [Network Interface](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/networkInterface) -- [Security Group](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/securitygroups) -- [Subnet](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/subnets) -- [Virtual Network](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/virtualnetwork) - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Network` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/adminrulecollections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/adminrulecollections_client.go deleted file mode 100644 index cad23d81..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/adminrulecollections_client.go +++ /dev/null @@ -1,352 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// AdminRuleCollectionsClient contains the methods for the AdminRuleCollections group. -// Don't use this type directly, use NewAdminRuleCollectionsClient() instead. -type AdminRuleCollectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAdminRuleCollectionsClient creates a new instance of AdminRuleCollectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAdminRuleCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdminRuleCollectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AdminRuleCollectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates an admin rule collection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// ruleCollection - The Rule Collection to create or update -// options - AdminRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the AdminRuleCollectionsClient.CreateOrUpdate -// method. -func (client *AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleCollection AdminRuleCollection, options *AdminRuleCollectionsClientCreateOrUpdateOptions) (AdminRuleCollectionsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleCollection, options) - if err != nil { - return AdminRuleCollectionsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AdminRuleCollectionsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AdminRuleCollectionsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *AdminRuleCollectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleCollection AdminRuleCollection, options *AdminRuleCollectionsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - if ruleCollectionName == "" { - return nil, errors.New("parameter ruleCollectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, ruleCollection) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *AdminRuleCollectionsClient) createOrUpdateHandleResponse(resp *http.Response) (AdminRuleCollectionsClientCreateOrUpdateResponse, error) { - result := AdminRuleCollectionsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AdminRuleCollection); err != nil { - return AdminRuleCollectionsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes an admin rule collection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// options - AdminRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the AdminRuleCollectionsClient.BeginDelete -// method. -func (client *AdminRuleCollectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientBeginDeleteOptions) (*runtime.Poller[AdminRuleCollectionsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AdminRuleCollectionsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[AdminRuleCollectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes an admin rule collection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *AdminRuleCollectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *AdminRuleCollectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - if ruleCollectionName == "" { - return nil, errors.New("parameter ruleCollectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Force != nil { - reqQP.Set("force", strconv.FormatBool(*options.Force)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a network manager security admin configuration rule collection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// options - AdminRuleCollectionsClientGetOptions contains the optional parameters for the AdminRuleCollectionsClient.Get -// method. -func (client *AdminRuleCollectionsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientGetOptions) (AdminRuleCollectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) - if err != nil { - return AdminRuleCollectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AdminRuleCollectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AdminRuleCollectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *AdminRuleCollectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - if ruleCollectionName == "" { - return nil, errors.New("parameter ruleCollectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AdminRuleCollectionsClient) getHandleResponse(resp *http.Response) (AdminRuleCollectionsClientGetResponse, error) { - result := AdminRuleCollectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AdminRuleCollection); err != nil { - return AdminRuleCollectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all the rule collections in a security admin configuration, in a paginated format. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// options - AdminRuleCollectionsClientListOptions contains the optional parameters for the AdminRuleCollectionsClient.List -// method. -func (client *AdminRuleCollectionsClient) NewListPager(resourceGroupName string, networkManagerName string, configurationName string, options *AdminRuleCollectionsClientListOptions) *runtime.Pager[AdminRuleCollectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AdminRuleCollectionsClientListResponse]{ - More: func(page AdminRuleCollectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AdminRuleCollectionsClientListResponse) (AdminRuleCollectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AdminRuleCollectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AdminRuleCollectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AdminRuleCollectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AdminRuleCollectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *AdminRuleCollectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AdminRuleCollectionsClient) listHandleResponse(resp *http.Response) (AdminRuleCollectionsClientListResponse, error) { - result := AdminRuleCollectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AdminRuleCollectionListResult); err != nil { - return AdminRuleCollectionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/adminrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/adminrules_client.go deleted file mode 100644 index e92cabbe..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/adminrules_client.go +++ /dev/null @@ -1,369 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// AdminRulesClient contains the methods for the AdminRules group. -// Don't use this type directly, use NewAdminRulesClient() instead. -type AdminRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAdminRulesClient creates a new instance of AdminRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAdminRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdminRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AdminRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates an admin rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// ruleName - The name of the rule. -// adminRule - The admin rule to create or update -// options - AdminRulesClientCreateOrUpdateOptions contains the optional parameters for the AdminRulesClient.CreateOrUpdate -// method. -func (client *AdminRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, adminRule BaseAdminRuleClassification, options *AdminRulesClientCreateOrUpdateOptions) (AdminRulesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, adminRule, options) - if err != nil { - return AdminRulesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AdminRulesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return AdminRulesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *AdminRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, adminRule BaseAdminRuleClassification, options *AdminRulesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - if ruleCollectionName == "" { - return nil, errors.New("parameter ruleCollectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, adminRule) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *AdminRulesClient) createOrUpdateHandleResponse(resp *http.Response) (AdminRulesClientCreateOrUpdateResponse, error) { - result := AdminRulesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { - return AdminRulesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes an admin rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// ruleName - The name of the rule. -// options - AdminRulesClientBeginDeleteOptions contains the optional parameters for the AdminRulesClient.BeginDelete method. -func (client *AdminRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientBeginDeleteOptions) (*runtime.Poller[AdminRulesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AdminRulesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[AdminRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes an admin rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *AdminRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *AdminRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - if ruleCollectionName == "" { - return nil, errors.New("parameter ruleCollectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Force != nil { - reqQP.Set("force", strconv.FormatBool(*options.Force)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a network manager security configuration admin rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// ruleName - The name of the rule. -// options - AdminRulesClientGetOptions contains the optional parameters for the AdminRulesClient.Get method. -func (client *AdminRulesClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientGetOptions) (AdminRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) - if err != nil { - return AdminRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AdminRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AdminRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *AdminRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - if ruleCollectionName == "" { - return nil, errors.New("parameter ruleCollectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AdminRulesClient) getHandleResponse(resp *http.Response) (AdminRulesClientGetResponse, error) { - result := AdminRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { - return AdminRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all network manager security configuration admin rules. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// options - AdminRulesClientListOptions contains the optional parameters for the AdminRulesClient.List method. -func (client *AdminRulesClient) NewListPager(resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRulesClientListOptions) *runtime.Pager[AdminRulesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AdminRulesClientListResponse]{ - More: func(page AdminRulesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AdminRulesClientListResponse) (AdminRulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AdminRulesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AdminRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AdminRulesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AdminRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRulesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - if ruleCollectionName == "" { - return nil, errors.New("parameter ruleCollectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AdminRulesClient) listHandleResponse(resp *http.Response) (AdminRulesClientListResponse, error) { - result := AdminRulesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AdminRuleListResult); err != nil { - return AdminRulesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationgatewayprivateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationgatewayprivateendpointconnections_client.go deleted file mode 100644 index 7904f565..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationgatewayprivateendpointconnections_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ApplicationGatewayPrivateEndpointConnectionsClient contains the methods for the ApplicationGatewayPrivateEndpointConnections group. -// Don't use this type directly, use NewApplicationGatewayPrivateEndpointConnectionsClient() instead. -type ApplicationGatewayPrivateEndpointConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewApplicationGatewayPrivateEndpointConnectionsClient creates a new instance of ApplicationGatewayPrivateEndpointConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewApplicationGatewayPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ApplicationGatewayPrivateEndpointConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginDelete - Deletes the specified private endpoint connection on application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// connectionName - The name of the application gateway private endpoint connection. -// options - ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the -// ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete method. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, applicationGatewayName, connectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified private endpoint connection on application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationGatewayName, connectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified private endpoint connection on application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// connectionName - The name of the application gateway private endpoint connection. -// options - ApplicationGatewayPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.Get -// method. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientGetOptions) (ApplicationGatewayPrivateEndpointConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGatewayName, connectionName, options) - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) getHandleResponse(resp *http.Response) (ApplicationGatewayPrivateEndpointConnectionsClientGetResponse, error) { - result := ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayPrivateEndpointConnection); err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all private endpoint connections on an application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.List -// method. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateEndpointConnectionsClientListOptions) *runtime.Pager[ApplicationGatewayPrivateEndpointConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationGatewayPrivateEndpointConnectionsClientListResponse]{ - More: func(page ApplicationGatewayPrivateEndpointConnectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationGatewayPrivateEndpointConnectionsClientListResponse) (ApplicationGatewayPrivateEndpointConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateEndpointConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) listHandleResponse(resp *http.Response) (ApplicationGatewayPrivateEndpointConnectionsClientListResponse, error) { - result := ApplicationGatewayPrivateEndpointConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayPrivateEndpointConnectionListResult); err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, err - } - return result, nil -} - -// BeginUpdate - Updates the specified private endpoint connection on application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// connectionName - The name of the application gateway private endpoint connection. -// parameters - Parameters supplied to update application gateway private endpoint connection operation. -// options - ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the -// ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate method. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions) (*runtime.Poller[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, resourceGroupName, applicationGatewayName, connectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - Updates the specified private endpoint connection on application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) update(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, applicationGatewayName, connectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationgatewayprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationgatewayprivatelinkresources_client.go deleted file mode 100644 index a64ce25f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationgatewayprivatelinkresources_client.go +++ /dev/null @@ -1,127 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ApplicationGatewayPrivateLinkResourcesClient contains the methods for the ApplicationGatewayPrivateLinkResources group. -// Don't use this type directly, use NewApplicationGatewayPrivateLinkResourcesClient() instead. -type ApplicationGatewayPrivateLinkResourcesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewApplicationGatewayPrivateLinkResourcesClient creates a new instance of ApplicationGatewayPrivateLinkResourcesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewApplicationGatewayPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayPrivateLinkResourcesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ApplicationGatewayPrivateLinkResourcesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists all private link resources on an application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.List -// method. -func (client *ApplicationGatewayPrivateLinkResourcesClient) NewListPager(resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateLinkResourcesClientListOptions) *runtime.Pager[ApplicationGatewayPrivateLinkResourcesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationGatewayPrivateLinkResourcesClientListResponse]{ - More: func(page ApplicationGatewayPrivateLinkResourcesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationGatewayPrivateLinkResourcesClientListResponse) (ApplicationGatewayPrivateLinkResourcesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ApplicationGatewayPrivateLinkResourcesClient) listCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateLinkResourcesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateLinkResources" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ApplicationGatewayPrivateLinkResourcesClient) listHandleResponse(resp *http.Response) (ApplicationGatewayPrivateLinkResourcesClientListResponse, error) { - result := ApplicationGatewayPrivateLinkResourcesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayPrivateLinkResourceListResult); err != nil { - return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationgateways_client.go deleted file mode 100644 index 464b5ffd..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationgateways_client.go +++ /dev/null @@ -1,1043 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ApplicationGatewaysClient contains the methods for the ApplicationGateways group. -// Don't use this type directly, use NewApplicationGatewaysClient() instead. -type ApplicationGatewaysClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewApplicationGatewaysClient creates a new instance of ApplicationGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewApplicationGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewaysClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ApplicationGatewaysClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginBackendHealth - Gets the backend health of the specified application gateway in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewaysClientBeginBackendHealthOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealth -// method. -func (client *ApplicationGatewaysClient) BeginBackendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginBackendHealthOptions) (*runtime.Poller[ApplicationGatewaysClientBackendHealthResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.backendHealth(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ApplicationGatewaysClientBackendHealthResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientBackendHealthResponse](options.ResumeToken, client.pl, nil) - } -} - -// BackendHealth - Gets the backend health of the specified application gateway in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ApplicationGatewaysClient) backendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginBackendHealthOptions) (*http.Response, error) { - req, err := client.backendHealthCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// backendHealthCreateRequest creates the BackendHealth request. -func (client *ApplicationGatewaysClient) backendHealthCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginBackendHealthOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginBackendHealthOnDemand - Gets the backend health for given combination of backend pool and http setting of the specified -// application gateway in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// probeRequest - Request body for on-demand test probe operation. -// options - ApplicationGatewaysClientBeginBackendHealthOnDemandOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealthOnDemand -// method. -func (client *ApplicationGatewaysClient) BeginBackendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, options *ApplicationGatewaysClientBeginBackendHealthOnDemandOptions) (*runtime.Poller[ApplicationGatewaysClientBackendHealthOnDemandResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.backendHealthOnDemand(ctx, resourceGroupName, applicationGatewayName, probeRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ApplicationGatewaysClientBackendHealthOnDemandResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientBackendHealthOnDemandResponse](options.ResumeToken, client.pl, nil) - } -} - -// BackendHealthOnDemand - Gets the backend health for given combination of backend pool and http setting of the specified -// application gateway in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ApplicationGatewaysClient) backendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, options *ApplicationGatewaysClientBeginBackendHealthOnDemandOptions) (*http.Response, error) { - req, err := client.backendHealthOnDemandCreateRequest(ctx, resourceGroupName, applicationGatewayName, probeRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// backendHealthOnDemandCreateRequest creates the BackendHealthOnDemand request. -func (client *ApplicationGatewaysClient) backendHealthOnDemandCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, options *ApplicationGatewaysClientBeginBackendHealthOnDemandOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, probeRequest) -} - -// BeginCreateOrUpdate - Creates or updates the specified application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// parameters - Parameters supplied to the create or update application gateway operation. -// options - ApplicationGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationGatewaysClient.BeginCreateOrUpdate -// method. -func (client *ApplicationGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, options *ApplicationGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationGatewaysClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationGatewayName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ApplicationGatewaysClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ApplicationGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, options *ApplicationGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationGatewayName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ApplicationGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, options *ApplicationGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewaysClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewaysClient.BeginDelete -// method. -func (client *ApplicationGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginDeleteOptions) (*runtime.Poller[ApplicationGatewaysClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ApplicationGatewaysClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ApplicationGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ApplicationGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewaysClientGetOptions contains the optional parameters for the ApplicationGatewaysClient.Get method. -func (client *ApplicationGatewaysClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientGetOptions) (ApplicationGatewaysClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return ApplicationGatewaysClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ApplicationGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ApplicationGatewaysClient) getHandleResponse(resp *http.Response) (ApplicationGatewaysClientGetResponse, error) { - result := ApplicationGatewaysClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGateway); err != nil { - return ApplicationGatewaysClientGetResponse{}, err - } - return result, nil -} - -// GetSSLPredefinedPolicy - Gets Ssl predefined policy with the specified policy name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// predefinedPolicyName - Name of Ssl predefined policy. -// options - ApplicationGatewaysClientGetSSLPredefinedPolicyOptions contains the optional parameters for the ApplicationGatewaysClient.GetSSLPredefinedPolicy -// method. -func (client *ApplicationGatewaysClient) GetSSLPredefinedPolicy(ctx context.Context, predefinedPolicyName string, options *ApplicationGatewaysClientGetSSLPredefinedPolicyOptions) (ApplicationGatewaysClientGetSSLPredefinedPolicyResponse, error) { - req, err := client.getSSLPredefinedPolicyCreateRequest(ctx, predefinedPolicyName, options) - if err != nil { - return ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{}, runtime.NewResponseError(resp) - } - return client.getSSLPredefinedPolicyHandleResponse(resp) -} - -// getSSLPredefinedPolicyCreateRequest creates the GetSSLPredefinedPolicy request. -func (client *ApplicationGatewaysClient) getSSLPredefinedPolicyCreateRequest(ctx context.Context, predefinedPolicyName string, options *ApplicationGatewaysClientGetSSLPredefinedPolicyOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if predefinedPolicyName == "" { - return nil, errors.New("parameter predefinedPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{predefinedPolicyName}", url.PathEscape(predefinedPolicyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSSLPredefinedPolicyHandleResponse handles the GetSSLPredefinedPolicy response. -func (client *ApplicationGatewaysClient) getSSLPredefinedPolicyHandleResponse(resp *http.Response) (ApplicationGatewaysClientGetSSLPredefinedPolicyResponse, error) { - result := ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewaySSLPredefinedPolicy); err != nil { - return ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all application gateways in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.List -// method. -func (client *ApplicationGatewaysClient) NewListPager(resourceGroupName string, options *ApplicationGatewaysClientListOptions) *runtime.Pager[ApplicationGatewaysClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationGatewaysClientListResponse]{ - More: func(page ApplicationGatewaysClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListResponse) (ApplicationGatewaysClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationGatewaysClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ApplicationGatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ApplicationGatewaysClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ApplicationGatewaysClient) listHandleResponse(resp *http.Response) (ApplicationGatewaysClientListResponse, error) { - result := ApplicationGatewaysClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayListResult); err != nil { - return ApplicationGatewaysClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the application gateways in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.ListAll -// method. -func (client *ApplicationGatewaysClient) NewListAllPager(options *ApplicationGatewaysClientListAllOptions) *runtime.Pager[ApplicationGatewaysClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationGatewaysClientListAllResponse]{ - More: func(page ApplicationGatewaysClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListAllResponse) (ApplicationGatewaysClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationGatewaysClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *ApplicationGatewaysClient) listAllCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *ApplicationGatewaysClient) listAllHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAllResponse, error) { - result := ApplicationGatewaysClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayListResult); err != nil { - return ApplicationGatewaysClientListAllResponse{}, err - } - return result, nil -} - -// ListAvailableRequestHeaders - Lists all available request headers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ApplicationGatewaysClientListAvailableRequestHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableRequestHeaders -// method. -func (client *ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context, options *ApplicationGatewaysClientListAvailableRequestHeadersOptions) (ApplicationGatewaysClientListAvailableRequestHeadersResponse, error) { - req, err := client.listAvailableRequestHeadersCreateRequest(ctx, options) - if err != nil { - return ApplicationGatewaysClientListAvailableRequestHeadersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientListAvailableRequestHeadersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListAvailableRequestHeadersResponse{}, runtime.NewResponseError(resp) - } - return client.listAvailableRequestHeadersHandleResponse(resp) -} - -// listAvailableRequestHeadersCreateRequest creates the ListAvailableRequestHeaders request. -func (client *ApplicationGatewaysClient) listAvailableRequestHeadersCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableRequestHeadersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAvailableRequestHeadersHandleResponse handles the ListAvailableRequestHeaders response. -func (client *ApplicationGatewaysClient) listAvailableRequestHeadersHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableRequestHeadersResponse, error) { - result := ApplicationGatewaysClientListAvailableRequestHeadersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringArray); err != nil { - return ApplicationGatewaysClientListAvailableRequestHeadersResponse{}, err - } - return result, nil -} - -// ListAvailableResponseHeaders - Lists all available response headers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ApplicationGatewaysClientListAvailableResponseHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableResponseHeaders -// method. -func (client *ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context, options *ApplicationGatewaysClientListAvailableResponseHeadersOptions) (ApplicationGatewaysClientListAvailableResponseHeadersResponse, error) { - req, err := client.listAvailableResponseHeadersCreateRequest(ctx, options) - if err != nil { - return ApplicationGatewaysClientListAvailableResponseHeadersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientListAvailableResponseHeadersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListAvailableResponseHeadersResponse{}, runtime.NewResponseError(resp) - } - return client.listAvailableResponseHeadersHandleResponse(resp) -} - -// listAvailableResponseHeadersCreateRequest creates the ListAvailableResponseHeaders request. -func (client *ApplicationGatewaysClient) listAvailableResponseHeadersCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableResponseHeadersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAvailableResponseHeadersHandleResponse handles the ListAvailableResponseHeaders response. -func (client *ApplicationGatewaysClient) listAvailableResponseHeadersHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableResponseHeadersResponse, error) { - result := ApplicationGatewaysClientListAvailableResponseHeadersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringArray); err != nil { - return ApplicationGatewaysClientListAvailableResponseHeadersResponse{}, err - } - return result, nil -} - -// ListAvailableSSLOptions - Lists available Ssl options for configuring Ssl policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ApplicationGatewaysClientListAvailableSSLOptionsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLOptions -// method. -func (client *ApplicationGatewaysClient) ListAvailableSSLOptions(ctx context.Context, options *ApplicationGatewaysClientListAvailableSSLOptionsOptions) (ApplicationGatewaysClientListAvailableSSLOptionsResponse, error) { - req, err := client.listAvailableSSLOptionsCreateRequest(ctx, options) - if err != nil { - return ApplicationGatewaysClientListAvailableSSLOptionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientListAvailableSSLOptionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListAvailableSSLOptionsResponse{}, runtime.NewResponseError(resp) - } - return client.listAvailableSSLOptionsHandleResponse(resp) -} - -// listAvailableSSLOptionsCreateRequest creates the ListAvailableSSLOptions request. -func (client *ApplicationGatewaysClient) listAvailableSSLOptionsCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableSSLOptionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAvailableSSLOptionsHandleResponse handles the ListAvailableSSLOptions response. -func (client *ApplicationGatewaysClient) listAvailableSSLOptionsHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableSSLOptionsResponse, error) { - result := ApplicationGatewaysClientListAvailableSSLOptionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayAvailableSSLOptions); err != nil { - return ApplicationGatewaysClientListAvailableSSLOptionsResponse{}, err - } - return result, nil -} - -// NewListAvailableSSLPredefinedPoliciesPager - Lists all SSL predefined policies for configuring Ssl policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies -// method. -func (client *ApplicationGatewaysClient) NewListAvailableSSLPredefinedPoliciesPager(options *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions) *runtime.Pager[ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse]{ - More: func(page ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse) (ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAvailableSSLPredefinedPoliciesCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, runtime.NewResponseError(resp) - } - return client.listAvailableSSLPredefinedPoliciesHandleResponse(resp) - }, - }) -} - -// listAvailableSSLPredefinedPoliciesCreateRequest creates the ListAvailableSSLPredefinedPolicies request. -func (client *ApplicationGatewaysClient) listAvailableSSLPredefinedPoliciesCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAvailableSSLPredefinedPoliciesHandleResponse handles the ListAvailableSSLPredefinedPolicies response. -func (client *ApplicationGatewaysClient) listAvailableSSLPredefinedPoliciesHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse, error) { - result := ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayAvailableSSLPredefinedPolicies); err != nil { - return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, err - } - return result, nil -} - -// ListAvailableServerVariables - Lists all available server variables. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ApplicationGatewaysClientListAvailableServerVariablesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableServerVariables -// method. -func (client *ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context, options *ApplicationGatewaysClientListAvailableServerVariablesOptions) (ApplicationGatewaysClientListAvailableServerVariablesResponse, error) { - req, err := client.listAvailableServerVariablesCreateRequest(ctx, options) - if err != nil { - return ApplicationGatewaysClientListAvailableServerVariablesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientListAvailableServerVariablesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListAvailableServerVariablesResponse{}, runtime.NewResponseError(resp) - } - return client.listAvailableServerVariablesHandleResponse(resp) -} - -// listAvailableServerVariablesCreateRequest creates the ListAvailableServerVariables request. -func (client *ApplicationGatewaysClient) listAvailableServerVariablesCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableServerVariablesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAvailableServerVariablesHandleResponse handles the ListAvailableServerVariables response. -func (client *ApplicationGatewaysClient) listAvailableServerVariablesHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableServerVariablesResponse, error) { - result := ApplicationGatewaysClientListAvailableServerVariablesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StringArray); err != nil { - return ApplicationGatewaysClientListAvailableServerVariablesResponse{}, err - } - return result, nil -} - -// ListAvailableWafRuleSets - Lists all available web application firewall rule sets. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ApplicationGatewaysClientListAvailableWafRuleSetsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableWafRuleSets -// method. -func (client *ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, options *ApplicationGatewaysClientListAvailableWafRuleSetsOptions) (ApplicationGatewaysClientListAvailableWafRuleSetsResponse, error) { - req, err := client.listAvailableWafRuleSetsCreateRequest(ctx, options) - if err != nil { - return ApplicationGatewaysClientListAvailableWafRuleSetsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientListAvailableWafRuleSetsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientListAvailableWafRuleSetsResponse{}, runtime.NewResponseError(resp) - } - return client.listAvailableWafRuleSetsHandleResponse(resp) -} - -// listAvailableWafRuleSetsCreateRequest creates the ListAvailableWafRuleSets request. -func (client *ApplicationGatewaysClient) listAvailableWafRuleSetsCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableWafRuleSetsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAvailableWafRuleSetsHandleResponse handles the ListAvailableWafRuleSets response. -func (client *ApplicationGatewaysClient) listAvailableWafRuleSetsHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableWafRuleSetsResponse, error) { - result := ApplicationGatewaysClientListAvailableWafRuleSetsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayAvailableWafRuleSetsResult); err != nil { - return ApplicationGatewaysClientListAvailableWafRuleSetsResponse{}, err - } - return result, nil -} - -// BeginStart - Starts the specified application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewaysClientBeginStartOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStart -// method. -func (client *ApplicationGatewaysClient) BeginStart(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStartOptions) (*runtime.Poller[ApplicationGatewaysClientStartResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.start(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ApplicationGatewaysClientStartResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientStartResponse](options.ResumeToken, client.pl, nil) - } -} - -// Start - Starts the specified application gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ApplicationGatewaysClient) start(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStartOptions) (*http.Response, error) { - req, err := client.startCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startCreateRequest creates the Start request. -func (client *ApplicationGatewaysClient) startCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStop - Stops the specified application gateway in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewaysClientBeginStopOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStop -// method. -func (client *ApplicationGatewaysClient) BeginStop(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStopOptions) (*runtime.Poller[ApplicationGatewaysClientStopResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stop(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ApplicationGatewaysClientStopResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ApplicationGatewaysClientStopResponse](options.ResumeToken, client.pl, nil) - } -} - -// Stop - Stops the specified application gateway in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ApplicationGatewaysClient) stop(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStopOptions) (*http.Response, error) { - req, err := client.stopCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopCreateRequest creates the Stop request. -func (client *ApplicationGatewaysClient) stopCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// UpdateTags - Updates the specified application gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// parameters - Parameters supplied to update application gateway tags. -// options - ApplicationGatewaysClientUpdateTagsOptions contains the optional parameters for the ApplicationGatewaysClient.UpdateTags -// method. -func (client *ApplicationGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject, options *ApplicationGatewaysClientUpdateTagsOptions) (ApplicationGatewaysClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, applicationGatewayName, parameters, options) - if err != nil { - return ApplicationGatewaysClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationGatewaysClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationGatewaysClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *ApplicationGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject, options *ApplicationGatewaysClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationGatewayName == "" { - return nil, errors.New("parameter applicationGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *ApplicationGatewaysClient) updateTagsHandleResponse(resp *http.Response) (ApplicationGatewaysClientUpdateTagsResponse, error) { - result := ApplicationGatewaysClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGateway); err != nil { - return ApplicationGatewaysClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationsecuritygroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationsecuritygroups_client.go deleted file mode 100644 index 2310e13c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/applicationsecuritygroups_client.go +++ /dev/null @@ -1,428 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ApplicationSecurityGroupsClient contains the methods for the ApplicationSecurityGroups group. -// Don't use this type directly, use NewApplicationSecurityGroupsClient() instead. -type ApplicationSecurityGroupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewApplicationSecurityGroupsClient creates a new instance of ApplicationSecurityGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewApplicationSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationSecurityGroupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ApplicationSecurityGroupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates an application security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationSecurityGroupName - The name of the application security group. -// parameters - Parameters supplied to the create or update ApplicationSecurityGroup operation. -// options - ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginCreateOrUpdate -// method. -func (client *ApplicationSecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, options *ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationSecurityGroupsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ApplicationSecurityGroupsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ApplicationSecurityGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates an application security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ApplicationSecurityGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, options *ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ApplicationSecurityGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, options *ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationSecurityGroupName == "" { - return nil, errors.New("parameter applicationSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationSecurityGroupName}", url.PathEscape(applicationSecurityGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified application security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationSecurityGroupName - The name of the application security group. -// options - ApplicationSecurityGroupsClientBeginDeleteOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginDelete -// method. -func (client *ApplicationSecurityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientBeginDeleteOptions) (*runtime.Poller[ApplicationSecurityGroupsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, applicationSecurityGroupName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ApplicationSecurityGroupsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ApplicationSecurityGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified application security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ApplicationSecurityGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ApplicationSecurityGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationSecurityGroupName == "" { - return nil, errors.New("parameter applicationSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationSecurityGroupName}", url.PathEscape(applicationSecurityGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets information about the specified application security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationSecurityGroupName - The name of the application security group. -// options - ApplicationSecurityGroupsClientGetOptions contains the optional parameters for the ApplicationSecurityGroupsClient.Get -// method. -func (client *ApplicationSecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientGetOptions) (ApplicationSecurityGroupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, options) - if err != nil { - return ApplicationSecurityGroupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationSecurityGroupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationSecurityGroupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ApplicationSecurityGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationSecurityGroupName == "" { - return nil, errors.New("parameter applicationSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationSecurityGroupName}", url.PathEscape(applicationSecurityGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ApplicationSecurityGroupsClient) getHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientGetResponse, error) { - result := ApplicationSecurityGroupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroup); err != nil { - return ApplicationSecurityGroupsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the application security groups in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.List -// method. -func (client *ApplicationSecurityGroupsClient) NewListPager(resourceGroupName string, options *ApplicationSecurityGroupsClientListOptions) *runtime.Pager[ApplicationSecurityGroupsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationSecurityGroupsClientListResponse]{ - More: func(page ApplicationSecurityGroupsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationSecurityGroupsClientListResponse) (ApplicationSecurityGroupsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationSecurityGroupsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationSecurityGroupsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationSecurityGroupsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ApplicationSecurityGroupsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ApplicationSecurityGroupsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ApplicationSecurityGroupsClient) listHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientListResponse, error) { - result := ApplicationSecurityGroupsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroupListResult); err != nil { - return ApplicationSecurityGroupsClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all application security groups in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.ListAll -// method. -func (client *ApplicationSecurityGroupsClient) NewListAllPager(options *ApplicationSecurityGroupsClientListAllOptions) *runtime.Pager[ApplicationSecurityGroupsClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[ApplicationSecurityGroupsClientListAllResponse]{ - More: func(page ApplicationSecurityGroupsClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ApplicationSecurityGroupsClientListAllResponse) (ApplicationSecurityGroupsClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ApplicationSecurityGroupsClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationSecurityGroupsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationSecurityGroupsClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *ApplicationSecurityGroupsClient) listAllCreateRequest(ctx context.Context, options *ApplicationSecurityGroupsClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *ApplicationSecurityGroupsClient) listAllHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientListAllResponse, error) { - result := ApplicationSecurityGroupsClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroupListResult); err != nil { - return ApplicationSecurityGroupsClientListAllResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates an application security group's tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// applicationSecurityGroupName - The name of the application security group. -// parameters - Parameters supplied to update application security group tags. -// options - ApplicationSecurityGroupsClientUpdateTagsOptions contains the optional parameters for the ApplicationSecurityGroupsClient.UpdateTags -// method. -func (client *ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject, options *ApplicationSecurityGroupsClientUpdateTagsOptions) (ApplicationSecurityGroupsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) - if err != nil { - return ApplicationSecurityGroupsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ApplicationSecurityGroupsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ApplicationSecurityGroupsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *ApplicationSecurityGroupsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject, options *ApplicationSecurityGroupsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if applicationSecurityGroupName == "" { - return nil, errors.New("parameter applicationSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{applicationSecurityGroupName}", url.PathEscape(applicationSecurityGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *ApplicationSecurityGroupsClient) updateTagsHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientUpdateTagsResponse, error) { - result := ApplicationSecurityGroupsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroup); err != nil { - return ApplicationSecurityGroupsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/autorest.md deleted file mode 100644 index dadc1000..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/autorest.md +++ /dev/null @@ -1,12 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/2feaf7f24cc26a7274c9fd79015ae62b1d273986/specification/network/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/2feaf7f24cc26a7274c9fd79015ae62b1d273986/specification/network/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0 -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availabledelegations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availabledelegations_client.go deleted file mode 100644 index 5b757f20..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availabledelegations_client.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AvailableDelegationsClient contains the methods for the AvailableDelegations group. -// Don't use this type directly, use NewAvailableDelegationsClient() instead. -type AvailableDelegationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAvailableDelegationsClient creates a new instance of AvailableDelegationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAvailableDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableDelegationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AvailableDelegationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Gets all of the available subnet delegations for this subscription in this region. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location of the subnet. -// options - AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.List -// method. -func (client *AvailableDelegationsClient) NewListPager(location string, options *AvailableDelegationsClientListOptions) *runtime.Pager[AvailableDelegationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AvailableDelegationsClientListResponse]{ - More: func(page AvailableDelegationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AvailableDelegationsClientListResponse) (AvailableDelegationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AvailableDelegationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AvailableDelegationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableDelegationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AvailableDelegationsClient) listCreateRequest(ctx context.Context, location string, options *AvailableDelegationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AvailableDelegationsClient) listHandleResponse(resp *http.Response) (AvailableDelegationsClientListResponse, error) { - result := AvailableDelegationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AvailableDelegationsResult); err != nil { - return AvailableDelegationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableendpointservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableendpointservices_client.go deleted file mode 100644 index 8505fbbd..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableendpointservices_client.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AvailableEndpointServicesClient contains the methods for the AvailableEndpointServices group. -// Don't use this type directly, use NewAvailableEndpointServicesClient() instead. -type AvailableEndpointServicesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAvailableEndpointServicesClient creates a new instance of AvailableEndpointServicesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAvailableEndpointServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableEndpointServicesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AvailableEndpointServicesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - List what values of endpoint services are available for use. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location to check available endpoint services. -// options - AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.List -// method. -func (client *AvailableEndpointServicesClient) NewListPager(location string, options *AvailableEndpointServicesClientListOptions) *runtime.Pager[AvailableEndpointServicesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AvailableEndpointServicesClientListResponse]{ - More: func(page AvailableEndpointServicesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AvailableEndpointServicesClientListResponse) (AvailableEndpointServicesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AvailableEndpointServicesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AvailableEndpointServicesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableEndpointServicesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AvailableEndpointServicesClient) listCreateRequest(ctx context.Context, location string, options *AvailableEndpointServicesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AvailableEndpointServicesClient) listHandleResponse(resp *http.Response) (AvailableEndpointServicesClientListResponse, error) { - result := AvailableEndpointServicesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EndpointServicesListResult); err != nil { - return AvailableEndpointServicesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableprivateendpointtypes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableprivateendpointtypes_client.go deleted file mode 100644 index fc500d41..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableprivateendpointtypes_client.go +++ /dev/null @@ -1,194 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AvailablePrivateEndpointTypesClient contains the methods for the AvailablePrivateEndpointTypes group. -// Don't use this type directly, use NewAvailablePrivateEndpointTypesClient() instead. -type AvailablePrivateEndpointTypesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAvailablePrivateEndpointTypesClient creates a new instance of AvailablePrivateEndpointTypesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAvailablePrivateEndpointTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailablePrivateEndpointTypesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AvailablePrivateEndpointTypesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this -// region. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location of the domain name. -// options - AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.List -// method. -func (client *AvailablePrivateEndpointTypesClient) NewListPager(location string, options *AvailablePrivateEndpointTypesClientListOptions) *runtime.Pager[AvailablePrivateEndpointTypesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AvailablePrivateEndpointTypesClientListResponse]{ - More: func(page AvailablePrivateEndpointTypesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AvailablePrivateEndpointTypesClientListResponse) (AvailablePrivateEndpointTypesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AvailablePrivateEndpointTypesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AvailablePrivateEndpointTypesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailablePrivateEndpointTypesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AvailablePrivateEndpointTypesClient) listCreateRequest(ctx context.Context, location string, options *AvailablePrivateEndpointTypesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AvailablePrivateEndpointTypesClient) listHandleResponse(resp *http.Response) (AvailablePrivateEndpointTypesClientListResponse, error) { - result := AvailablePrivateEndpointTypesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AvailablePrivateEndpointTypesResult); err != nil { - return AvailablePrivateEndpointTypesClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Returns all of the resource types that can be linked to a Private Endpoint in this subscription -// in this region. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location of the domain name. -// resourceGroupName - The name of the resource group. -// options - AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.ListByResourceGroup -// method. -func (client *AvailablePrivateEndpointTypesClient) NewListByResourceGroupPager(location string, resourceGroupName string, options *AvailablePrivateEndpointTypesClientListByResourceGroupOptions) *runtime.Pager[AvailablePrivateEndpointTypesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[AvailablePrivateEndpointTypesClientListByResourceGroupResponse]{ - More: func(page AvailablePrivateEndpointTypesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AvailablePrivateEndpointTypesClientListByResourceGroupResponse) (AvailablePrivateEndpointTypesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *AvailablePrivateEndpointTypesClient) listByResourceGroupCreateRequest(ctx context.Context, location string, resourceGroupName string, options *AvailablePrivateEndpointTypesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *AvailablePrivateEndpointTypesClient) listByResourceGroupHandleResponse(resp *http.Response) (AvailablePrivateEndpointTypesClientListByResourceGroupResponse, error) { - result := AvailablePrivateEndpointTypesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AvailablePrivateEndpointTypesResult); err != nil { - return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableresourcegroupdelegations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableresourcegroupdelegations_client.go deleted file mode 100644 index 56f813c9..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableresourcegroupdelegations_client.go +++ /dev/null @@ -1,127 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AvailableResourceGroupDelegationsClient contains the methods for the AvailableResourceGroupDelegations group. -// Don't use this type directly, use NewAvailableResourceGroupDelegationsClient() instead. -type AvailableResourceGroupDelegationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAvailableResourceGroupDelegationsClient creates a new instance of AvailableResourceGroupDelegationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAvailableResourceGroupDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableResourceGroupDelegationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AvailableResourceGroupDelegationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Gets all of the available subnet delegations for this resource group in this region. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location of the domain name. -// resourceGroupName - The name of the resource group. -// options - AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.List -// method. -func (client *AvailableResourceGroupDelegationsClient) NewListPager(location string, resourceGroupName string, options *AvailableResourceGroupDelegationsClientListOptions) *runtime.Pager[AvailableResourceGroupDelegationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AvailableResourceGroupDelegationsClientListResponse]{ - More: func(page AvailableResourceGroupDelegationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AvailableResourceGroupDelegationsClientListResponse) (AvailableResourceGroupDelegationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AvailableResourceGroupDelegationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AvailableResourceGroupDelegationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableResourceGroupDelegationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AvailableResourceGroupDelegationsClient) listCreateRequest(ctx context.Context, location string, resourceGroupName string, options *AvailableResourceGroupDelegationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableDelegations" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AvailableResourceGroupDelegationsClient) listHandleResponse(resp *http.Response) (AvailableResourceGroupDelegationsClientListResponse, error) { - result := AvailableResourceGroupDelegationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AvailableDelegationsResult); err != nil { - return AvailableResourceGroupDelegationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableservicealiases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableservicealiases_client.go deleted file mode 100644 index fd49aa0c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/availableservicealiases_client.go +++ /dev/null @@ -1,192 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AvailableServiceAliasesClient contains the methods for the AvailableServiceAliases group. -// Don't use this type directly, use NewAvailableServiceAliasesClient() instead. -type AvailableServiceAliasesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAvailableServiceAliasesClient creates a new instance of AvailableServiceAliasesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAvailableServiceAliasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableServiceAliasesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AvailableServiceAliasesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Gets all available service aliases for this subscription in this region. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location. -// options - AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.List -// method. -func (client *AvailableServiceAliasesClient) NewListPager(location string, options *AvailableServiceAliasesClientListOptions) *runtime.Pager[AvailableServiceAliasesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AvailableServiceAliasesClientListResponse]{ - More: func(page AvailableServiceAliasesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AvailableServiceAliasesClientListResponse) (AvailableServiceAliasesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AvailableServiceAliasesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AvailableServiceAliasesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableServiceAliasesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AvailableServiceAliasesClient) listCreateRequest(ctx context.Context, location string, options *AvailableServiceAliasesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AvailableServiceAliasesClient) listHandleResponse(resp *http.Response) (AvailableServiceAliasesClientListResponse, error) { - result := AvailableServiceAliasesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AvailableServiceAliasesResult); err != nil { - return AvailableServiceAliasesClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Gets all available service aliases for this resource group in this region. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// location - The location. -// options - AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.ListByResourceGroup -// method. -func (client *AvailableServiceAliasesClient) NewListByResourceGroupPager(resourceGroupName string, location string, options *AvailableServiceAliasesClientListByResourceGroupOptions) *runtime.Pager[AvailableServiceAliasesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[AvailableServiceAliasesClientListByResourceGroupResponse]{ - More: func(page AvailableServiceAliasesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AvailableServiceAliasesClientListByResourceGroupResponse) (AvailableServiceAliasesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AvailableServiceAliasesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AvailableServiceAliasesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AvailableServiceAliasesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *AvailableServiceAliasesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, location string, options *AvailableServiceAliasesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableServiceAliases" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *AvailableServiceAliasesClient) listByResourceGroupHandleResponse(resp *http.Response) (AvailableServiceAliasesClientListByResourceGroupResponse, error) { - result := AvailableServiceAliasesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AvailableServiceAliasesResult); err != nil { - return AvailableServiceAliasesClientListByResourceGroupResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntags_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntags_client.go deleted file mode 100644 index 925a6784..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntags_client.go +++ /dev/null @@ -1,117 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AzureFirewallFqdnTagsClient contains the methods for the AzureFirewallFqdnTags group. -// Don't use this type directly, use NewAzureFirewallFqdnTagsClient() instead. -type AzureFirewallFqdnTagsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAzureFirewallFqdnTagsClient creates a new instance of AzureFirewallFqdnTagsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAzureFirewallFqdnTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureFirewallFqdnTagsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AzureFirewallFqdnTagsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListAllPager - Gets all the Azure Firewall FQDN Tags in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.ListAll -// method. -func (client *AzureFirewallFqdnTagsClient) NewListAllPager(options *AzureFirewallFqdnTagsClientListAllOptions) *runtime.Pager[AzureFirewallFqdnTagsClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[AzureFirewallFqdnTagsClientListAllResponse]{ - More: func(page AzureFirewallFqdnTagsClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AzureFirewallFqdnTagsClientListAllResponse) (AzureFirewallFqdnTagsClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AzureFirewallFqdnTagsClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AzureFirewallFqdnTagsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AzureFirewallFqdnTagsClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *AzureFirewallFqdnTagsClient) listAllCreateRequest(ctx context.Context, options *AzureFirewallFqdnTagsClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *AzureFirewallFqdnTagsClient) listAllHandleResponse(resp *http.Response) (AzureFirewallFqdnTagsClientListAllResponse, error) { - result := AzureFirewallFqdnTagsClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewallFqdnTagListResult); err != nil { - return AzureFirewallFqdnTagsClientListAllResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/azurefirewalls_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/azurefirewalls_client.go deleted file mode 100644 index d7a8e613..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/azurefirewalls_client.go +++ /dev/null @@ -1,498 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AzureFirewallsClient contains the methods for the AzureFirewalls group. -// Don't use this type directly, use NewAzureFirewallsClient() instead. -type AzureFirewallsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAzureFirewallsClient creates a new instance of AzureFirewallsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAzureFirewallsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureFirewallsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AzureFirewallsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified Azure Firewall. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// azureFirewallName - The name of the Azure Firewall. -// parameters - Parameters supplied to the create or update Azure Firewall operation. -// options - AzureFirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureFirewallsClient.BeginCreateOrUpdate -// method. -func (client *AzureFirewallsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall, options *AzureFirewallsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureFirewallsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, azureFirewallName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AzureFirewallsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[AzureFirewallsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified Azure Firewall. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *AzureFirewallsClient) createOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall, options *AzureFirewallsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, azureFirewallName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *AzureFirewallsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall, options *AzureFirewallsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if azureFirewallName == "" { - return nil, errors.New("parameter azureFirewallName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified Azure Firewall. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// azureFirewallName - The name of the Azure Firewall. -// options - AzureFirewallsClientBeginDeleteOptions contains the optional parameters for the AzureFirewallsClient.BeginDelete -// method. -func (client *AzureFirewallsClient) BeginDelete(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginDeleteOptions) (*runtime.Poller[AzureFirewallsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, azureFirewallName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AzureFirewallsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[AzureFirewallsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified Azure Firewall. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *AzureFirewallsClient) deleteOperation(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, azureFirewallName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *AzureFirewallsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if azureFirewallName == "" { - return nil, errors.New("parameter azureFirewallName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Azure Firewall. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// azureFirewallName - The name of the Azure Firewall. -// options - AzureFirewallsClientGetOptions contains the optional parameters for the AzureFirewallsClient.Get method. -func (client *AzureFirewallsClient) Get(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientGetOptions) (AzureFirewallsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, azureFirewallName, options) - if err != nil { - return AzureFirewallsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AzureFirewallsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AzureFirewallsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *AzureFirewallsClient) getCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if azureFirewallName == "" { - return nil, errors.New("parameter azureFirewallName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AzureFirewallsClient) getHandleResponse(resp *http.Response) (AzureFirewallsClientGetResponse, error) { - result := AzureFirewallsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewall); err != nil { - return AzureFirewallsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all Azure Firewalls in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.List method. -func (client *AzureFirewallsClient) NewListPager(resourceGroupName string, options *AzureFirewallsClientListOptions) *runtime.Pager[AzureFirewallsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AzureFirewallsClientListResponse]{ - More: func(page AzureFirewallsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AzureFirewallsClientListResponse) (AzureFirewallsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AzureFirewallsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AzureFirewallsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AzureFirewallsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AzureFirewallsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *AzureFirewallsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AzureFirewallsClient) listHandleResponse(resp *http.Response) (AzureFirewallsClientListResponse, error) { - result := AzureFirewallsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewallListResult); err != nil { - return AzureFirewallsClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the Azure Firewalls in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.ListAll method. -func (client *AzureFirewallsClient) NewListAllPager(options *AzureFirewallsClientListAllOptions) *runtime.Pager[AzureFirewallsClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[AzureFirewallsClientListAllResponse]{ - More: func(page AzureFirewallsClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AzureFirewallsClientListAllResponse) (AzureFirewallsClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AzureFirewallsClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AzureFirewallsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AzureFirewallsClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *AzureFirewallsClient) listAllCreateRequest(ctx context.Context, options *AzureFirewallsClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *AzureFirewallsClient) listAllHandleResponse(resp *http.Response) (AzureFirewallsClientListAllResponse, error) { - result := AzureFirewallsClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewallListResult); err != nil { - return AzureFirewallsClientListAllResponse{}, err - } - return result, nil -} - -// BeginListLearnedPrefixes - Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// azureFirewallName - The name of the azure firewall. -// options - AzureFirewallsClientBeginListLearnedPrefixesOptions contains the optional parameters for the AzureFirewallsClient.BeginListLearnedPrefixes -// method. -func (client *AzureFirewallsClient) BeginListLearnedPrefixes(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginListLearnedPrefixesOptions) (*runtime.Poller[AzureFirewallsClientListLearnedPrefixesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listLearnedPrefixes(ctx, resourceGroupName, azureFirewallName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AzureFirewallsClientListLearnedPrefixesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[AzureFirewallsClientListLearnedPrefixesResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListLearnedPrefixes - Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *AzureFirewallsClient) listLearnedPrefixes(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginListLearnedPrefixesOptions) (*http.Response, error) { - req, err := client.listLearnedPrefixesCreateRequest(ctx, resourceGroupName, azureFirewallName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listLearnedPrefixesCreateRequest creates the ListLearnedPrefixes request. -func (client *AzureFirewallsClient) listLearnedPrefixesCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginListLearnedPrefixesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/learnedIPPrefixes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if azureFirewallName == "" { - return nil, errors.New("parameter azureFirewallName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginUpdateTags - Updates tags of an Azure Firewall resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// azureFirewallName - The name of the Azure Firewall. -// parameters - Parameters supplied to update azure firewall tags. -// options - AzureFirewallsClientBeginUpdateTagsOptions contains the optional parameters for the AzureFirewallsClient.BeginUpdateTags -// method. -func (client *AzureFirewallsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject, options *AzureFirewallsClientBeginUpdateTagsOptions) (*runtime.Poller[AzureFirewallsClientUpdateTagsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updateTags(ctx, resourceGroupName, azureFirewallName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[AzureFirewallsClientUpdateTagsResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[AzureFirewallsClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdateTags - Updates tags of an Azure Firewall resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *AzureFirewallsClient) updateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject, options *AzureFirewallsClientBeginUpdateTagsOptions) (*http.Response, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, azureFirewallName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *AzureFirewallsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject, options *AzureFirewallsClientBeginUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if azureFirewallName == "" { - return nil, errors.New("parameter azureFirewallName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/bastionhosts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/bastionhosts_client.go deleted file mode 100644 index 1574c4ce..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/bastionhosts_client.go +++ /dev/null @@ -1,434 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BastionHostsClient contains the methods for the BastionHosts group. -// Don't use this type directly, use NewBastionHostsClient() instead. -type BastionHostsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBastionHostsClient creates a new instance of BastionHostsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBastionHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BastionHostsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BastionHostsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified Bastion Host. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// parameters - Parameters supplied to the create or update Bastion Host operation. -// options - BastionHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the BastionHostsClient.BeginCreateOrUpdate -// method. -func (client *BastionHostsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost, options *BastionHostsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BastionHostsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, bastionHostName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BastionHostsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BastionHostsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified Bastion Host. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *BastionHostsClient) createOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost, options *BastionHostsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, bastionHostName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *BastionHostsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost, options *BastionHostsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if bastionHostName == "" { - return nil, errors.New("parameter bastionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified Bastion Host. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// options - BastionHostsClientBeginDeleteOptions contains the optional parameters for the BastionHostsClient.BeginDelete -// method. -func (client *BastionHostsClient) BeginDelete(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientBeginDeleteOptions) (*runtime.Poller[BastionHostsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, bastionHostName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BastionHostsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[BastionHostsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified Bastion Host. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *BastionHostsClient) deleteOperation(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, bastionHostName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *BastionHostsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if bastionHostName == "" { - return nil, errors.New("parameter bastionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Bastion Host. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// options - BastionHostsClientGetOptions contains the optional parameters for the BastionHostsClient.Get method. -func (client *BastionHostsClient) Get(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientGetOptions) (BastionHostsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, bastionHostName, options) - if err != nil { - return BastionHostsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BastionHostsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BastionHostsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BastionHostsClient) getCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if bastionHostName == "" { - return nil, errors.New("parameter bastionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BastionHostsClient) getHandleResponse(resp *http.Response) (BastionHostsClientGetResponse, error) { - result := BastionHostsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BastionHost); err != nil { - return BastionHostsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all Bastion Hosts in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.List method. -func (client *BastionHostsClient) NewListPager(options *BastionHostsClientListOptions) *runtime.Pager[BastionHostsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BastionHostsClientListResponse]{ - More: func(page BastionHostsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BastionHostsClientListResponse) (BastionHostsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BastionHostsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BastionHostsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BastionHostsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BastionHostsClient) listCreateRequest(ctx context.Context, options *BastionHostsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BastionHostsClient) listHandleResponse(resp *http.Response) (BastionHostsClientListResponse, error) { - result := BastionHostsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BastionHostListResult); err != nil { - return BastionHostsClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all Bastion Hosts in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.ListByResourceGroup -// method. -func (client *BastionHostsClient) NewListByResourceGroupPager(resourceGroupName string, options *BastionHostsClientListByResourceGroupOptions) *runtime.Pager[BastionHostsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[BastionHostsClientListByResourceGroupResponse]{ - More: func(page BastionHostsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BastionHostsClientListByResourceGroupResponse) (BastionHostsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BastionHostsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BastionHostsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BastionHostsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *BastionHostsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *BastionHostsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *BastionHostsClient) listByResourceGroupHandleResponse(resp *http.Response) (BastionHostsClientListByResourceGroupResponse, error) { - result := BastionHostsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BastionHostListResult); err != nil { - return BastionHostsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// BeginUpdateTags - Updates Tags for BastionHost resource -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// parameters - Parameters supplied to update BastionHost tags. -// options - BastionHostsClientBeginUpdateTagsOptions contains the optional parameters for the BastionHostsClient.BeginUpdateTags -// method. -func (client *BastionHostsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject, options *BastionHostsClientBeginUpdateTagsOptions) (*runtime.Poller[BastionHostsClientUpdateTagsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updateTags(ctx, resourceGroupName, bastionHostName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BastionHostsClientUpdateTagsResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[BastionHostsClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdateTags - Updates Tags for BastionHost resource -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *BastionHostsClient) updateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject, options *BastionHostsClientBeginUpdateTagsOptions) (*http.Response, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, bastionHostName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *BastionHostsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject, options *BastionHostsClientBeginUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if bastionHostName == "" { - return nil, errors.New("parameter bastionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/bgpservicecommunities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/bgpservicecommunities_client.go deleted file mode 100644 index 1c5d2951..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/bgpservicecommunities_client.go +++ /dev/null @@ -1,117 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BgpServiceCommunitiesClient contains the methods for the BgpServiceCommunities group. -// Don't use this type directly, use NewBgpServiceCommunitiesClient() instead. -type BgpServiceCommunitiesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBgpServiceCommunitiesClient creates a new instance of BgpServiceCommunitiesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBgpServiceCommunitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BgpServiceCommunitiesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BgpServiceCommunitiesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Gets all the available bgp service communities. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.List -// method. -func (client *BgpServiceCommunitiesClient) NewListPager(options *BgpServiceCommunitiesClientListOptions) *runtime.Pager[BgpServiceCommunitiesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BgpServiceCommunitiesClientListResponse]{ - More: func(page BgpServiceCommunitiesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BgpServiceCommunitiesClientListResponse) (BgpServiceCommunitiesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BgpServiceCommunitiesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BgpServiceCommunitiesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BgpServiceCommunitiesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BgpServiceCommunitiesClient) listCreateRequest(ctx context.Context, options *BgpServiceCommunitiesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BgpServiceCommunitiesClient) listHandleResponse(resp *http.Response) (BgpServiceCommunitiesClientListResponse, error) { - result := BgpServiceCommunitiesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BgpServiceCommunityListResult); err != nil { - return BgpServiceCommunitiesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ci.yml deleted file mode 100644 index d1d36edc..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/network/armnetwork/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/network/armnetwork/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/network/armnetwork' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/configurationpolicygroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/configurationpolicygroups_client.go deleted file mode 100644 index da723bf1..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/configurationpolicygroups_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ConfigurationPolicyGroupsClient contains the methods for the ConfigurationPolicyGroups group. -// Don't use this type directly, use NewConfigurationPolicyGroupsClient() instead. -type ConfigurationPolicyGroupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewConfigurationPolicyGroupsClient creates a new instance of ConfigurationPolicyGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewConfigurationPolicyGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationPolicyGroupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ConfigurationPolicyGroupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the ConfigurationPolicyGroup. -// vpnServerConfigurationName - The name of the VpnServerConfiguration. -// configurationPolicyGroupName - The name of the ConfigurationPolicyGroup. -// vpnServerConfigurationPolicyGroupParameters - Parameters supplied to create or update a VpnServerConfiguration PolicyGroup. -// options - ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginCreateOrUpdate -// method. -func (client *ConfigurationPolicyGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, vpnServerConfigurationPolicyGroupParameters VPNServerConfigurationPolicyGroup, options *ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationPolicyGroupsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, vpnServerConfigurationPolicyGroupParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConfigurationPolicyGroupsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ConfigurationPolicyGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ConfigurationPolicyGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, vpnServerConfigurationPolicyGroupParameters VPNServerConfigurationPolicyGroup, options *ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, vpnServerConfigurationPolicyGroupParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConfigurationPolicyGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, vpnServerConfigurationPolicyGroupParameters VPNServerConfigurationPolicyGroup, options *ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnServerConfigurationName == "" { - return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) - if configurationPolicyGroupName == "" { - return nil, errors.New("parameter configurationPolicyGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationPolicyGroupName}", url.PathEscape(configurationPolicyGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vpnServerConfigurationPolicyGroupParameters) -} - -// BeginDelete - Deletes a ConfigurationPolicyGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the ConfigurationPolicyGroup. -// vpnServerConfigurationName - The name of the VpnServerConfiguration. -// configurationPolicyGroupName - The name of the ConfigurationPolicyGroup. -// options - ConfigurationPolicyGroupsClientBeginDeleteOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginDelete -// method. -func (client *ConfigurationPolicyGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientBeginDeleteOptions) (*runtime.Poller[ConfigurationPolicyGroupsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConfigurationPolicyGroupsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ConfigurationPolicyGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a ConfigurationPolicyGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ConfigurationPolicyGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ConfigurationPolicyGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnServerConfigurationName == "" { - return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) - if configurationPolicyGroupName == "" { - return nil, errors.New("parameter configurationPolicyGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationPolicyGroupName}", url.PathEscape(configurationPolicyGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a ConfigurationPolicyGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration. -// configurationPolicyGroupName - The name of the ConfigurationPolicyGroup being retrieved. -// options - ConfigurationPolicyGroupsClientGetOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.Get -// method. -func (client *ConfigurationPolicyGroupsClient) Get(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientGetOptions) (ConfigurationPolicyGroupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, options) - if err != nil { - return ConfigurationPolicyGroupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConfigurationPolicyGroupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConfigurationPolicyGroupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ConfigurationPolicyGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnServerConfigurationName == "" { - return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) - if configurationPolicyGroupName == "" { - return nil, errors.New("parameter configurationPolicyGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationPolicyGroupName}", url.PathEscape(configurationPolicyGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ConfigurationPolicyGroupsClient) getHandleResponse(resp *http.Response) (ConfigurationPolicyGroupsClientGetResponse, error) { - result := ConfigurationPolicyGroupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VPNServerConfigurationPolicyGroup); err != nil { - return ConfigurationPolicyGroupsClientGetResponse{}, err - } - return result, nil -} - -// NewListByVPNServerConfigurationPager - Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration. -// options - ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.ListByVPNServerConfiguration -// method. -func (client *ConfigurationPolicyGroupsClient) NewListByVPNServerConfigurationPager(resourceGroupName string, vpnServerConfigurationName string, options *ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions) *runtime.Pager[ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse] { - return runtime.NewPager(runtime.PagingHandler[ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse]{ - More: func(page ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse) (ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVPNServerConfigurationCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{}, runtime.NewResponseError(resp) - } - return client.listByVPNServerConfigurationHandleResponse(resp) - }, - }) -} - -// listByVPNServerConfigurationCreateRequest creates the ListByVPNServerConfiguration request. -func (client *ConfigurationPolicyGroupsClient) listByVPNServerConfigurationCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnServerConfigurationName == "" { - return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByVPNServerConfigurationHandleResponse handles the ListByVPNServerConfiguration response. -func (client *ConfigurationPolicyGroupsClient) listByVPNServerConfigurationHandleResponse(resp *http.Response) (ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse, error) { - result := ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNServerConfigurationPolicyGroupsResult); err != nil { - return ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/connectionmonitors_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/connectionmonitors_client.go deleted file mode 100644 index 7c5598ef..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/connectionmonitors_client.go +++ /dev/null @@ -1,598 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ConnectionMonitorsClient contains the methods for the ConnectionMonitors group. -// Don't use this type directly, use NewConnectionMonitorsClient() instead. -type ConnectionMonitorsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewConnectionMonitorsClient creates a new instance of ConnectionMonitorsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewConnectionMonitorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectionMonitorsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ConnectionMonitorsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update a connection monitor. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name of the connection monitor. -// parameters - Parameters that define the operation to create a connection monitor. -// options - ConnectionMonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorsClient.BeginCreateOrUpdate -// method. -func (client *ConnectionMonitorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, options *ConnectionMonitorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConnectionMonitorsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConnectionMonitorsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ConnectionMonitorsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update a connection monitor. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ConnectionMonitorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, options *ConnectionMonitorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConnectionMonitorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, options *ConnectionMonitorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if connectionMonitorName == "" { - return nil, errors.New("parameter connectionMonitorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Migrate != nil { - reqQP.Set("migrate", *options.Migrate) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified connection monitor. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name of the connection monitor. -// options - ConnectionMonitorsClientBeginDeleteOptions contains the optional parameters for the ConnectionMonitorsClient.BeginDelete -// method. -func (client *ConnectionMonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginDeleteOptions) (*runtime.Poller[ConnectionMonitorsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConnectionMonitorsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ConnectionMonitorsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified connection monitor. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ConnectionMonitorsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ConnectionMonitorsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if connectionMonitorName == "" { - return nil, errors.New("parameter connectionMonitorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a connection monitor by name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name of the connection monitor. -// options - ConnectionMonitorsClientGetOptions contains the optional parameters for the ConnectionMonitorsClient.Get method. -func (client *ConnectionMonitorsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientGetOptions) (ConnectionMonitorsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return ConnectionMonitorsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConnectionMonitorsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionMonitorsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ConnectionMonitorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if connectionMonitorName == "" { - return nil, errors.New("parameter connectionMonitorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ConnectionMonitorsClient) getHandleResponse(resp *http.Response) (ConnectionMonitorsClientGetResponse, error) { - result := ConnectionMonitorsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionMonitorResult); err != nil { - return ConnectionMonitorsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all connection monitors for the specified Network Watcher. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// options - ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.List method. -func (client *ConnectionMonitorsClient) NewListPager(resourceGroupName string, networkWatcherName string, options *ConnectionMonitorsClientListOptions) *runtime.Pager[ConnectionMonitorsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ConnectionMonitorsClientListResponse]{ - More: func(page ConnectionMonitorsClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *ConnectionMonitorsClientListResponse) (ConnectionMonitorsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) - if err != nil { - return ConnectionMonitorsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConnectionMonitorsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionMonitorsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ConnectionMonitorsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, options *ConnectionMonitorsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ConnectionMonitorsClient) listHandleResponse(resp *http.Response) (ConnectionMonitorsClientListResponse, error) { - result := ConnectionMonitorsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionMonitorListResult); err != nil { - return ConnectionMonitorsClientListResponse{}, err - } - return result, nil -} - -// BeginQuery - Query a snapshot of the most recent connection states. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name given to the connection monitor. -// options - ConnectionMonitorsClientBeginQueryOptions contains the optional parameters for the ConnectionMonitorsClient.BeginQuery -// method. -func (client *ConnectionMonitorsClient) BeginQuery(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginQueryOptions) (*runtime.Poller[ConnectionMonitorsClientQueryResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.query(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConnectionMonitorsClientQueryResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ConnectionMonitorsClientQueryResponse](options.ResumeToken, client.pl, nil) - } -} - -// Query - Query a snapshot of the most recent connection states. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ConnectionMonitorsClient) query(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginQueryOptions) (*http.Response, error) { - req, err := client.queryCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// queryCreateRequest creates the Query request. -func (client *ConnectionMonitorsClient) queryCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginQueryOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if connectionMonitorName == "" { - return nil, errors.New("parameter connectionMonitorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStart - Starts the specified connection monitor. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name of the connection monitor. -// options - ConnectionMonitorsClientBeginStartOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStart -// method. -func (client *ConnectionMonitorsClient) BeginStart(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStartOptions) (*runtime.Poller[ConnectionMonitorsClientStartResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.start(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConnectionMonitorsClientStartResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ConnectionMonitorsClientStartResponse](options.ResumeToken, client.pl, nil) - } -} - -// Start - Starts the specified connection monitor. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ConnectionMonitorsClient) start(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStartOptions) (*http.Response, error) { - req, err := client.startCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startCreateRequest creates the Start request. -func (client *ConnectionMonitorsClient) startCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if connectionMonitorName == "" { - return nil, errors.New("parameter connectionMonitorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStop - Stops the specified connection monitor. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name of the connection monitor. -// options - ConnectionMonitorsClientBeginStopOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStop -// method. -func (client *ConnectionMonitorsClient) BeginStop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStopOptions) (*runtime.Poller[ConnectionMonitorsClientStopResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stop(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConnectionMonitorsClientStopResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ConnectionMonitorsClientStopResponse](options.ResumeToken, client.pl, nil) - } -} - -// Stop - Stops the specified connection monitor. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ConnectionMonitorsClient) stop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStopOptions) (*http.Response, error) { - req, err := client.stopCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopCreateRequest creates the Stop request. -func (client *ConnectionMonitorsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if connectionMonitorName == "" { - return nil, errors.New("parameter connectionMonitorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// UpdateTags - Update tags of the specified connection monitor. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// connectionMonitorName - The name of the connection monitor. -// parameters - Parameters supplied to update connection monitor tags. -// options - ConnectionMonitorsClientUpdateTagsOptions contains the optional parameters for the ConnectionMonitorsClient.UpdateTags -// method. -func (client *ConnectionMonitorsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters TagsObject, options *ConnectionMonitorsClientUpdateTagsOptions) (ConnectionMonitorsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) - if err != nil { - return ConnectionMonitorsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConnectionMonitorsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionMonitorsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *ConnectionMonitorsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters TagsObject, options *ConnectionMonitorsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if connectionMonitorName == "" { - return nil, errors.New("parameter connectionMonitorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *ConnectionMonitorsClient) updateTagsHandleResponse(resp *http.Response) (ConnectionMonitorsClientUpdateTagsResponse, error) { - result := ConnectionMonitorsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionMonitorResult); err != nil { - return ConnectionMonitorsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/connectivityconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/connectivityconfigurations_client.go deleted file mode 100644 index 264bc481..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/connectivityconfigurations_client.go +++ /dev/null @@ -1,335 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// ConnectivityConfigurationsClient contains the methods for the ConnectivityConfigurations group. -// Don't use this type directly, use NewConnectivityConfigurationsClient() instead. -type ConnectivityConfigurationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewConnectivityConfigurationsClient creates a new instance of ConnectivityConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewConnectivityConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectivityConfigurationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ConnectivityConfigurationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates/Updates a new network manager connectivity configuration -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager connectivity configuration. -// connectivityConfiguration - Parameters supplied to create/update a network manager connectivity configuration -// options - ConnectivityConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the ConnectivityConfigurationsClient.CreateOrUpdate -// method. -func (client *ConnectivityConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, connectivityConfiguration ConnectivityConfiguration, options *ConnectivityConfigurationsClientCreateOrUpdateOptions) (ConnectivityConfigurationsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, connectivityConfiguration, options) - if err != nil { - return ConnectivityConfigurationsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConnectivityConfigurationsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ConnectivityConfigurationsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ConnectivityConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, connectivityConfiguration ConnectivityConfiguration, options *ConnectivityConfigurationsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectivityConfiguration) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ConnectivityConfigurationsClient) createOrUpdateHandleResponse(resp *http.Response) (ConnectivityConfigurationsClientCreateOrUpdateResponse, error) { - result := ConnectivityConfigurationsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectivityConfiguration); err != nil { - return ConnectivityConfigurationsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes a network manager connectivity configuration, specified by the resource group, network manager name, -// and connectivity configuration name -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager connectivity configuration. -// options - ConnectivityConfigurationsClientBeginDeleteOptions contains the optional parameters for the ConnectivityConfigurationsClient.BeginDelete -// method. -func (client *ConnectivityConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientBeginDeleteOptions) (*runtime.Poller[ConnectivityConfigurationsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ConnectivityConfigurationsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ConnectivityConfigurationsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and -// connectivity configuration name -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ConnectivityConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ConnectivityConfigurationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Force != nil { - reqQP.Set("force", strconv.FormatBool(*options.Force)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity -// Configuration name -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager connectivity configuration. -// options - ConnectivityConfigurationsClientGetOptions contains the optional parameters for the ConnectivityConfigurationsClient.Get -// method. -func (client *ConnectivityConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientGetOptions) (ConnectivityConfigurationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) - if err != nil { - return ConnectivityConfigurationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConnectivityConfigurationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectivityConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ConnectivityConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ConnectivityConfigurationsClient) getHandleResponse(resp *http.Response) (ConnectivityConfigurationsClientGetResponse, error) { - result := ConnectivityConfigurationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectivityConfiguration); err != nil { - return ConnectivityConfigurationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all the network manager connectivity configuration in a specified network manager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - ConnectivityConfigurationsClientListOptions contains the optional parameters for the ConnectivityConfigurationsClient.List -// method. -func (client *ConnectivityConfigurationsClient) NewListPager(resourceGroupName string, networkManagerName string, options *ConnectivityConfigurationsClientListOptions) *runtime.Pager[ConnectivityConfigurationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ConnectivityConfigurationsClientListResponse]{ - More: func(page ConnectivityConfigurationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ConnectivityConfigurationsClientListResponse) (ConnectivityConfigurationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ConnectivityConfigurationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConnectivityConfigurationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectivityConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ConnectivityConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *ConnectivityConfigurationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ConnectivityConfigurationsClient) listHandleResponse(resp *http.Response) (ConnectivityConfigurationsClientListResponse, error) { - result := ConnectivityConfigurationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectivityConfigurationListResult); err != nil { - return ConnectivityConfigurationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/constants.go deleted file mode 100644 index 82fa85bb..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/constants.go +++ /dev/null @@ -1,3695 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -const ( - moduleName = "armnetwork" - moduleVersion = "v1.1.0" -) - -// Access - Access to be allowed or denied. -type Access string - -const ( - AccessAllow Access = "Allow" - AccessDeny Access = "Deny" -) - -// PossibleAccessValues returns the possible values for the Access const type. -func PossibleAccessValues() []Access { - return []Access{ - AccessAllow, - AccessDeny, - } -} - -// AddressPrefixType - Address prefix type. -type AddressPrefixType string - -const ( - AddressPrefixTypeIPPrefix AddressPrefixType = "IPPrefix" - AddressPrefixTypeServiceTag AddressPrefixType = "ServiceTag" -) - -// PossibleAddressPrefixTypeValues returns the possible values for the AddressPrefixType const type. -func PossibleAddressPrefixTypeValues() []AddressPrefixType { - return []AddressPrefixType{ - AddressPrefixTypeIPPrefix, - AddressPrefixTypeServiceTag, - } -} - -// AdminRuleKind - Whether the rule is custom or default. -type AdminRuleKind string - -const ( - AdminRuleKindCustom AdminRuleKind = "Custom" - AdminRuleKindDefault AdminRuleKind = "Default" -) - -// PossibleAdminRuleKindValues returns the possible values for the AdminRuleKind const type. -func PossibleAdminRuleKindValues() []AdminRuleKind { - return []AdminRuleKind{ - AdminRuleKindCustom, - AdminRuleKindDefault, - } -} - -// ApplicationGatewayBackendHealthServerHealth - Health of backend server. -type ApplicationGatewayBackendHealthServerHealth string - -const ( - ApplicationGatewayBackendHealthServerHealthDown ApplicationGatewayBackendHealthServerHealth = "Down" - ApplicationGatewayBackendHealthServerHealthDraining ApplicationGatewayBackendHealthServerHealth = "Draining" - ApplicationGatewayBackendHealthServerHealthPartial ApplicationGatewayBackendHealthServerHealth = "Partial" - ApplicationGatewayBackendHealthServerHealthUnknown ApplicationGatewayBackendHealthServerHealth = "Unknown" - ApplicationGatewayBackendHealthServerHealthUp ApplicationGatewayBackendHealthServerHealth = "Up" -) - -// PossibleApplicationGatewayBackendHealthServerHealthValues returns the possible values for the ApplicationGatewayBackendHealthServerHealth const type. -func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth { - return []ApplicationGatewayBackendHealthServerHealth{ - ApplicationGatewayBackendHealthServerHealthDown, - ApplicationGatewayBackendHealthServerHealthDraining, - ApplicationGatewayBackendHealthServerHealthPartial, - ApplicationGatewayBackendHealthServerHealthUnknown, - ApplicationGatewayBackendHealthServerHealthUp, - } -} - -// ApplicationGatewayCookieBasedAffinity - Cookie based affinity. -type ApplicationGatewayCookieBasedAffinity string - -const ( - ApplicationGatewayCookieBasedAffinityDisabled ApplicationGatewayCookieBasedAffinity = "Disabled" - ApplicationGatewayCookieBasedAffinityEnabled ApplicationGatewayCookieBasedAffinity = "Enabled" -) - -// PossibleApplicationGatewayCookieBasedAffinityValues returns the possible values for the ApplicationGatewayCookieBasedAffinity const type. -func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity { - return []ApplicationGatewayCookieBasedAffinity{ - ApplicationGatewayCookieBasedAffinityDisabled, - ApplicationGatewayCookieBasedAffinityEnabled, - } -} - -// ApplicationGatewayCustomErrorStatusCode - Status code of the application gateway customer error. -type ApplicationGatewayCustomErrorStatusCode string - -const ( - ApplicationGatewayCustomErrorStatusCodeHTTPStatus403 ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" - ApplicationGatewayCustomErrorStatusCodeHTTPStatus502 ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" -) - -// PossibleApplicationGatewayCustomErrorStatusCodeValues returns the possible values for the ApplicationGatewayCustomErrorStatusCode const type. -func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewayCustomErrorStatusCode { - return []ApplicationGatewayCustomErrorStatusCode{ - ApplicationGatewayCustomErrorStatusCodeHTTPStatus403, - ApplicationGatewayCustomErrorStatusCodeHTTPStatus502, - } -} - -// ApplicationGatewayFirewallMode - Web application firewall mode. -type ApplicationGatewayFirewallMode string - -const ( - ApplicationGatewayFirewallModeDetection ApplicationGatewayFirewallMode = "Detection" - ApplicationGatewayFirewallModePrevention ApplicationGatewayFirewallMode = "Prevention" -) - -// PossibleApplicationGatewayFirewallModeValues returns the possible values for the ApplicationGatewayFirewallMode const type. -func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode { - return []ApplicationGatewayFirewallMode{ - ApplicationGatewayFirewallModeDetection, - ApplicationGatewayFirewallModePrevention, - } -} - -// ApplicationGatewayLoadDistributionAlgorithm - Load Distribution Algorithm enums. -type ApplicationGatewayLoadDistributionAlgorithm string - -const ( - ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = "IpHash" - ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = "LeastConnections" - ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = "RoundRobin" -) - -// PossibleApplicationGatewayLoadDistributionAlgorithmValues returns the possible values for the ApplicationGatewayLoadDistributionAlgorithm const type. -func PossibleApplicationGatewayLoadDistributionAlgorithmValues() []ApplicationGatewayLoadDistributionAlgorithm { - return []ApplicationGatewayLoadDistributionAlgorithm{ - ApplicationGatewayLoadDistributionAlgorithmIPHash, - ApplicationGatewayLoadDistributionAlgorithmLeastConnections, - ApplicationGatewayLoadDistributionAlgorithmRoundRobin, - } -} - -// ApplicationGatewayOperationalState - Operational state of the application gateway resource. -type ApplicationGatewayOperationalState string - -const ( - ApplicationGatewayOperationalStateRunning ApplicationGatewayOperationalState = "Running" - ApplicationGatewayOperationalStateStarting ApplicationGatewayOperationalState = "Starting" - ApplicationGatewayOperationalStateStopped ApplicationGatewayOperationalState = "Stopped" - ApplicationGatewayOperationalStateStopping ApplicationGatewayOperationalState = "Stopping" -) - -// PossibleApplicationGatewayOperationalStateValues returns the possible values for the ApplicationGatewayOperationalState const type. -func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState { - return []ApplicationGatewayOperationalState{ - ApplicationGatewayOperationalStateRunning, - ApplicationGatewayOperationalStateStarting, - ApplicationGatewayOperationalStateStopped, - ApplicationGatewayOperationalStateStopping, - } -} - -// ApplicationGatewayProtocol - Application Gateway protocol. -type ApplicationGatewayProtocol string - -const ( - ApplicationGatewayProtocolHTTP ApplicationGatewayProtocol = "Http" - ApplicationGatewayProtocolHTTPS ApplicationGatewayProtocol = "Https" - ApplicationGatewayProtocolTCP ApplicationGatewayProtocol = "Tcp" - ApplicationGatewayProtocolTLS ApplicationGatewayProtocol = "Tls" -) - -// PossibleApplicationGatewayProtocolValues returns the possible values for the ApplicationGatewayProtocol const type. -func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol { - return []ApplicationGatewayProtocol{ - ApplicationGatewayProtocolHTTP, - ApplicationGatewayProtocolHTTPS, - ApplicationGatewayProtocolTCP, - ApplicationGatewayProtocolTLS, - } -} - -// ApplicationGatewayRedirectType - Redirect type enum. -type ApplicationGatewayRedirectType string - -const ( - ApplicationGatewayRedirectTypeFound ApplicationGatewayRedirectType = "Found" - ApplicationGatewayRedirectTypePermanent ApplicationGatewayRedirectType = "Permanent" - ApplicationGatewayRedirectTypeSeeOther ApplicationGatewayRedirectType = "SeeOther" - ApplicationGatewayRedirectTypeTemporary ApplicationGatewayRedirectType = "Temporary" -) - -// PossibleApplicationGatewayRedirectTypeValues returns the possible values for the ApplicationGatewayRedirectType const type. -func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType { - return []ApplicationGatewayRedirectType{ - ApplicationGatewayRedirectTypeFound, - ApplicationGatewayRedirectTypePermanent, - ApplicationGatewayRedirectTypeSeeOther, - ApplicationGatewayRedirectTypeTemporary, - } -} - -// ApplicationGatewayRequestRoutingRuleType - Rule type. -type ApplicationGatewayRequestRoutingRuleType string - -const ( - ApplicationGatewayRequestRoutingRuleTypeBasic ApplicationGatewayRequestRoutingRuleType = "Basic" - ApplicationGatewayRequestRoutingRuleTypePathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" -) - -// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns the possible values for the ApplicationGatewayRequestRoutingRuleType const type. -func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType { - return []ApplicationGatewayRequestRoutingRuleType{ - ApplicationGatewayRequestRoutingRuleTypeBasic, - ApplicationGatewayRequestRoutingRuleTypePathBasedRouting, - } -} - -// ApplicationGatewaySKUName - Name of an application gateway SKU. -type ApplicationGatewaySKUName string - -const ( - ApplicationGatewaySKUNameStandardLarge ApplicationGatewaySKUName = "Standard_Large" - ApplicationGatewaySKUNameStandardMedium ApplicationGatewaySKUName = "Standard_Medium" - ApplicationGatewaySKUNameStandardSmall ApplicationGatewaySKUName = "Standard_Small" - ApplicationGatewaySKUNameStandardV2 ApplicationGatewaySKUName = "Standard_v2" - ApplicationGatewaySKUNameWAFLarge ApplicationGatewaySKUName = "WAF_Large" - ApplicationGatewaySKUNameWAFMedium ApplicationGatewaySKUName = "WAF_Medium" - ApplicationGatewaySKUNameWAFV2 ApplicationGatewaySKUName = "WAF_v2" -) - -// PossibleApplicationGatewaySKUNameValues returns the possible values for the ApplicationGatewaySKUName const type. -func PossibleApplicationGatewaySKUNameValues() []ApplicationGatewaySKUName { - return []ApplicationGatewaySKUName{ - ApplicationGatewaySKUNameStandardLarge, - ApplicationGatewaySKUNameStandardMedium, - ApplicationGatewaySKUNameStandardSmall, - ApplicationGatewaySKUNameStandardV2, - ApplicationGatewaySKUNameWAFLarge, - ApplicationGatewaySKUNameWAFMedium, - ApplicationGatewaySKUNameWAFV2, - } -} - -// ApplicationGatewaySSLCipherSuite - Ssl cipher suites enums. -type ApplicationGatewaySSLCipherSuite string - -const ( - ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITH3DESEDECBCSHA ApplicationGatewaySSLCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES128CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySSLCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES256CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySSLCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128GCMSHA256 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256GCMSHA384 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySSLCipherSuiteTLSRSAWITH3DESEDECBCSHA ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128GCMSHA256 ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256GCMSHA384 ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" -) - -// PossibleApplicationGatewaySSLCipherSuiteValues returns the possible values for the ApplicationGatewaySSLCipherSuite const type. -func PossibleApplicationGatewaySSLCipherSuiteValues() []ApplicationGatewaySSLCipherSuite { - return []ApplicationGatewaySSLCipherSuite{ - ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITH3DESEDECBCSHA, - ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES128CBCSHA, - ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES128CBCSHA256, - ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES256CBCSHA, - ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES256CBCSHA256, - ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES128CBCSHA, - ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES128GCMSHA256, - ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES256CBCSHA, - ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES256GCMSHA384, - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA, - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA256, - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128GCMSHA256, - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA, - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA384, - ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256GCMSHA384, - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128CBCSHA, - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128CBCSHA256, - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128GCMSHA256, - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256CBCSHA, - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256CBCSHA384, - ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256GCMSHA384, - ApplicationGatewaySSLCipherSuiteTLSRSAWITH3DESEDECBCSHA, - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128CBCSHA, - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128CBCSHA256, - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128GCMSHA256, - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256CBCSHA, - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256CBCSHA256, - ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256GCMSHA384, - } -} - -// ApplicationGatewaySSLPolicyName - Ssl predefined policy name enums. -type ApplicationGatewaySSLPolicyName string - -const ( - ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20150501 ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20150501" - ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401 ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20170401" - ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401S ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20170401S" - ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101 ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20220101" - ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101S ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20220101S" -) - -// PossibleApplicationGatewaySSLPolicyNameValues returns the possible values for the ApplicationGatewaySSLPolicyName const type. -func PossibleApplicationGatewaySSLPolicyNameValues() []ApplicationGatewaySSLPolicyName { - return []ApplicationGatewaySSLPolicyName{ - ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20150501, - ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401, - ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401S, - ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101, - ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101S, - } -} - -// ApplicationGatewaySSLPolicyType - Type of Ssl Policy. -type ApplicationGatewaySSLPolicyType string - -const ( - ApplicationGatewaySSLPolicyTypeCustom ApplicationGatewaySSLPolicyType = "Custom" - ApplicationGatewaySSLPolicyTypeCustomV2 ApplicationGatewaySSLPolicyType = "CustomV2" - ApplicationGatewaySSLPolicyTypePredefined ApplicationGatewaySSLPolicyType = "Predefined" -) - -// PossibleApplicationGatewaySSLPolicyTypeValues returns the possible values for the ApplicationGatewaySSLPolicyType const type. -func PossibleApplicationGatewaySSLPolicyTypeValues() []ApplicationGatewaySSLPolicyType { - return []ApplicationGatewaySSLPolicyType{ - ApplicationGatewaySSLPolicyTypeCustom, - ApplicationGatewaySSLPolicyTypeCustomV2, - ApplicationGatewaySSLPolicyTypePredefined, - } -} - -// ApplicationGatewaySSLProtocol - Ssl protocol enums. -type ApplicationGatewaySSLProtocol string - -const ( - ApplicationGatewaySSLProtocolTLSv10 ApplicationGatewaySSLProtocol = "TLSv1_0" - ApplicationGatewaySSLProtocolTLSv11 ApplicationGatewaySSLProtocol = "TLSv1_1" - ApplicationGatewaySSLProtocolTLSv12 ApplicationGatewaySSLProtocol = "TLSv1_2" - ApplicationGatewaySSLProtocolTLSv13 ApplicationGatewaySSLProtocol = "TLSv1_3" -) - -// PossibleApplicationGatewaySSLProtocolValues returns the possible values for the ApplicationGatewaySSLProtocol const type. -func PossibleApplicationGatewaySSLProtocolValues() []ApplicationGatewaySSLProtocol { - return []ApplicationGatewaySSLProtocol{ - ApplicationGatewaySSLProtocolTLSv10, - ApplicationGatewaySSLProtocolTLSv11, - ApplicationGatewaySSLProtocolTLSv12, - ApplicationGatewaySSLProtocolTLSv13, - } -} - -// ApplicationGatewayTier - Tier of an application gateway. -type ApplicationGatewayTier string - -const ( - ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" - ApplicationGatewayTierStandardV2 ApplicationGatewayTier = "Standard_v2" - ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" - ApplicationGatewayTierWAFV2 ApplicationGatewayTier = "WAF_v2" -) - -// PossibleApplicationGatewayTierValues returns the possible values for the ApplicationGatewayTier const type. -func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier { - return []ApplicationGatewayTier{ - ApplicationGatewayTierStandard, - ApplicationGatewayTierStandardV2, - ApplicationGatewayTierWAF, - ApplicationGatewayTierWAFV2, - } -} - -// AssociationType - The association type of the child resource to the parent resource. -type AssociationType string - -const ( - AssociationTypeAssociated AssociationType = "Associated" - AssociationTypeContains AssociationType = "Contains" -) - -// PossibleAssociationTypeValues returns the possible values for the AssociationType const type. -func PossibleAssociationTypeValues() []AssociationType { - return []AssociationType{ - AssociationTypeAssociated, - AssociationTypeContains, - } -} - -// AuthenticationMethod - VPN client authentication method. -type AuthenticationMethod string - -const ( - AuthenticationMethodEAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2" - AuthenticationMethodEAPTLS AuthenticationMethod = "EAPTLS" -) - -// PossibleAuthenticationMethodValues returns the possible values for the AuthenticationMethod const type. -func PossibleAuthenticationMethodValues() []AuthenticationMethod { - return []AuthenticationMethod{ - AuthenticationMethodEAPMSCHAPv2, - AuthenticationMethodEAPTLS, - } -} - -// AuthorizationUseStatus - The authorization use status. -type AuthorizationUseStatus string - -const ( - AuthorizationUseStatusAvailable AuthorizationUseStatus = "Available" - AuthorizationUseStatusInUse AuthorizationUseStatus = "InUse" -) - -// PossibleAuthorizationUseStatusValues returns the possible values for the AuthorizationUseStatus const type. -func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus { - return []AuthorizationUseStatus{ - AuthorizationUseStatusAvailable, - AuthorizationUseStatusInUse, - } -} - -// AutoLearnPrivateRangesMode - The operation mode for automatically learning private ranges to not be SNAT -type AutoLearnPrivateRangesMode string - -const ( - AutoLearnPrivateRangesModeDisabled AutoLearnPrivateRangesMode = "Disabled" - AutoLearnPrivateRangesModeEnabled AutoLearnPrivateRangesMode = "Enabled" -) - -// PossibleAutoLearnPrivateRangesModeValues returns the possible values for the AutoLearnPrivateRangesMode const type. -func PossibleAutoLearnPrivateRangesModeValues() []AutoLearnPrivateRangesMode { - return []AutoLearnPrivateRangesMode{ - AutoLearnPrivateRangesModeDisabled, - AutoLearnPrivateRangesModeEnabled, - } -} - -// AzureFirewallApplicationRuleProtocolType - The protocol type of a Application Rule resource. -type AzureFirewallApplicationRuleProtocolType string - -const ( - AzureFirewallApplicationRuleProtocolTypeHTTP AzureFirewallApplicationRuleProtocolType = "Http" - AzureFirewallApplicationRuleProtocolTypeHTTPS AzureFirewallApplicationRuleProtocolType = "Https" - AzureFirewallApplicationRuleProtocolTypeMssql AzureFirewallApplicationRuleProtocolType = "Mssql" -) - -// PossibleAzureFirewallApplicationRuleProtocolTypeValues returns the possible values for the AzureFirewallApplicationRuleProtocolType const type. -func PossibleAzureFirewallApplicationRuleProtocolTypeValues() []AzureFirewallApplicationRuleProtocolType { - return []AzureFirewallApplicationRuleProtocolType{ - AzureFirewallApplicationRuleProtocolTypeHTTP, - AzureFirewallApplicationRuleProtocolTypeHTTPS, - AzureFirewallApplicationRuleProtocolTypeMssql, - } -} - -// AzureFirewallNatRCActionType - The action type of a NAT rule collection. -type AzureFirewallNatRCActionType string - -const ( - AzureFirewallNatRCActionTypeDnat AzureFirewallNatRCActionType = "Dnat" - AzureFirewallNatRCActionTypeSnat AzureFirewallNatRCActionType = "Snat" -) - -// PossibleAzureFirewallNatRCActionTypeValues returns the possible values for the AzureFirewallNatRCActionType const type. -func PossibleAzureFirewallNatRCActionTypeValues() []AzureFirewallNatRCActionType { - return []AzureFirewallNatRCActionType{ - AzureFirewallNatRCActionTypeDnat, - AzureFirewallNatRCActionTypeSnat, - } -} - -// AzureFirewallNetworkRuleProtocol - The protocol of a Network Rule resource. -type AzureFirewallNetworkRuleProtocol string - -const ( - AzureFirewallNetworkRuleProtocolAny AzureFirewallNetworkRuleProtocol = "Any" - AzureFirewallNetworkRuleProtocolICMP AzureFirewallNetworkRuleProtocol = "ICMP" - AzureFirewallNetworkRuleProtocolTCP AzureFirewallNetworkRuleProtocol = "TCP" - AzureFirewallNetworkRuleProtocolUDP AzureFirewallNetworkRuleProtocol = "UDP" -) - -// PossibleAzureFirewallNetworkRuleProtocolValues returns the possible values for the AzureFirewallNetworkRuleProtocol const type. -func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRuleProtocol { - return []AzureFirewallNetworkRuleProtocol{ - AzureFirewallNetworkRuleProtocolAny, - AzureFirewallNetworkRuleProtocolICMP, - AzureFirewallNetworkRuleProtocolTCP, - AzureFirewallNetworkRuleProtocolUDP, - } -} - -// AzureFirewallRCActionType - The action type of a rule collection. -type AzureFirewallRCActionType string - -const ( - AzureFirewallRCActionTypeAllow AzureFirewallRCActionType = "Allow" - AzureFirewallRCActionTypeDeny AzureFirewallRCActionType = "Deny" -) - -// PossibleAzureFirewallRCActionTypeValues returns the possible values for the AzureFirewallRCActionType const type. -func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType { - return []AzureFirewallRCActionType{ - AzureFirewallRCActionTypeAllow, - AzureFirewallRCActionTypeDeny, - } -} - -// AzureFirewallSKUName - Name of an Azure Firewall SKU. -type AzureFirewallSKUName string - -const ( - AzureFirewallSKUNameAZFWHub AzureFirewallSKUName = "AZFW_Hub" - AzureFirewallSKUNameAZFWVnet AzureFirewallSKUName = "AZFW_VNet" -) - -// PossibleAzureFirewallSKUNameValues returns the possible values for the AzureFirewallSKUName const type. -func PossibleAzureFirewallSKUNameValues() []AzureFirewallSKUName { - return []AzureFirewallSKUName{ - AzureFirewallSKUNameAZFWHub, - AzureFirewallSKUNameAZFWVnet, - } -} - -// AzureFirewallSKUTier - Tier of an Azure Firewall. -type AzureFirewallSKUTier string - -const ( - AzureFirewallSKUTierBasic AzureFirewallSKUTier = "Basic" - AzureFirewallSKUTierPremium AzureFirewallSKUTier = "Premium" - AzureFirewallSKUTierStandard AzureFirewallSKUTier = "Standard" -) - -// PossibleAzureFirewallSKUTierValues returns the possible values for the AzureFirewallSKUTier const type. -func PossibleAzureFirewallSKUTierValues() []AzureFirewallSKUTier { - return []AzureFirewallSKUTier{ - AzureFirewallSKUTierBasic, - AzureFirewallSKUTierPremium, - AzureFirewallSKUTierStandard, - } -} - -// AzureFirewallThreatIntelMode - The operation mode for Threat Intel. -type AzureFirewallThreatIntelMode string - -const ( - AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert" - AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny" - AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off" -) - -// PossibleAzureFirewallThreatIntelModeValues returns the possible values for the AzureFirewallThreatIntelMode const type. -func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode { - return []AzureFirewallThreatIntelMode{ - AzureFirewallThreatIntelModeAlert, - AzureFirewallThreatIntelModeDeny, - AzureFirewallThreatIntelModeOff, - } -} - -// BastionConnectProtocol - The protocol used to connect to the target. -type BastionConnectProtocol string - -const ( - BastionConnectProtocolRDP BastionConnectProtocol = "RDP" - BastionConnectProtocolSSH BastionConnectProtocol = "SSH" -) - -// PossibleBastionConnectProtocolValues returns the possible values for the BastionConnectProtocol const type. -func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { - return []BastionConnectProtocol{ - BastionConnectProtocolRDP, - BastionConnectProtocolSSH, - } -} - -// BastionHostSKUName - The name of this Bastion Host. -type BastionHostSKUName string - -const ( - BastionHostSKUNameBasic BastionHostSKUName = "Basic" - BastionHostSKUNameStandard BastionHostSKUName = "Standard" -) - -// PossibleBastionHostSKUNameValues returns the possible values for the BastionHostSKUName const type. -func PossibleBastionHostSKUNameValues() []BastionHostSKUName { - return []BastionHostSKUName{ - BastionHostSKUNameBasic, - BastionHostSKUNameStandard, - } -} - -// BgpPeerState - The BGP peer state. -type BgpPeerState string - -const ( - BgpPeerStateConnected BgpPeerState = "Connected" - BgpPeerStateConnecting BgpPeerState = "Connecting" - BgpPeerStateIdle BgpPeerState = "Idle" - BgpPeerStateStopped BgpPeerState = "Stopped" - BgpPeerStateUnknown BgpPeerState = "Unknown" -) - -// PossibleBgpPeerStateValues returns the possible values for the BgpPeerState const type. -func PossibleBgpPeerStateValues() []BgpPeerState { - return []BgpPeerState{ - BgpPeerStateConnected, - BgpPeerStateConnecting, - BgpPeerStateIdle, - BgpPeerStateStopped, - BgpPeerStateUnknown, - } -} - -// CircuitConnectionStatus - Express Route Circuit connection state. -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -// PossibleCircuitConnectionStatusValues returns the possible values for the CircuitConnectionStatus const type. -func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { - return []CircuitConnectionStatus{ - CircuitConnectionStatusConnected, - CircuitConnectionStatusConnecting, - CircuitConnectionStatusDisconnected, - } -} - -// CommissionedState - The commissioned state of the Custom IP Prefix. -type CommissionedState string - -const ( - CommissionedStateCommissioned CommissionedState = "Commissioned" - CommissionedStateCommissionedNoInternetAdvertise CommissionedState = "CommissionedNoInternetAdvertise" - CommissionedStateCommissioning CommissionedState = "Commissioning" - CommissionedStateDecommissioning CommissionedState = "Decommissioning" - CommissionedStateDeprovisioning CommissionedState = "Deprovisioning" - CommissionedStateProvisioned CommissionedState = "Provisioned" - CommissionedStateProvisioning CommissionedState = "Provisioning" -) - -// PossibleCommissionedStateValues returns the possible values for the CommissionedState const type. -func PossibleCommissionedStateValues() []CommissionedState { - return []CommissionedState{ - CommissionedStateCommissioned, - CommissionedStateCommissionedNoInternetAdvertise, - CommissionedStateCommissioning, - CommissionedStateDecommissioning, - CommissionedStateDeprovisioning, - CommissionedStateProvisioned, - CommissionedStateProvisioning, - } -} - -// ConfigurationType - Configuration Deployment Type. -type ConfigurationType string - -const ( - ConfigurationTypeConnectivity ConfigurationType = "Connectivity" - ConfigurationTypeSecurityAdmin ConfigurationType = "SecurityAdmin" -) - -// PossibleConfigurationTypeValues returns the possible values for the ConfigurationType const type. -func PossibleConfigurationTypeValues() []ConfigurationType { - return []ConfigurationType{ - ConfigurationTypeConnectivity, - ConfigurationTypeSecurityAdmin, - } -} - -// ConnectionMonitorEndpointFilterItemType - The type of item included in the filter. Currently only 'AgentAddress' is supported. -type ConnectionMonitorEndpointFilterItemType string - -const ( - ConnectionMonitorEndpointFilterItemTypeAgentAddress ConnectionMonitorEndpointFilterItemType = "AgentAddress" -) - -// PossibleConnectionMonitorEndpointFilterItemTypeValues returns the possible values for the ConnectionMonitorEndpointFilterItemType const type. -func PossibleConnectionMonitorEndpointFilterItemTypeValues() []ConnectionMonitorEndpointFilterItemType { - return []ConnectionMonitorEndpointFilterItemType{ - ConnectionMonitorEndpointFilterItemTypeAgentAddress, - } -} - -// ConnectionMonitorEndpointFilterType - The behavior of the endpoint filter. Currently only 'Include' is supported. -type ConnectionMonitorEndpointFilterType string - -const ( - ConnectionMonitorEndpointFilterTypeInclude ConnectionMonitorEndpointFilterType = "Include" -) - -// PossibleConnectionMonitorEndpointFilterTypeValues returns the possible values for the ConnectionMonitorEndpointFilterType const type. -func PossibleConnectionMonitorEndpointFilterTypeValues() []ConnectionMonitorEndpointFilterType { - return []ConnectionMonitorEndpointFilterType{ - ConnectionMonitorEndpointFilterTypeInclude, - } -} - -// ConnectionMonitorSourceStatus - Status of connection monitor source. -type ConnectionMonitorSourceStatus string - -const ( - ConnectionMonitorSourceStatusActive ConnectionMonitorSourceStatus = "Active" - ConnectionMonitorSourceStatusInactive ConnectionMonitorSourceStatus = "Inactive" - ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = "Unknown" -) - -// PossibleConnectionMonitorSourceStatusValues returns the possible values for the ConnectionMonitorSourceStatus const type. -func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus { - return []ConnectionMonitorSourceStatus{ - ConnectionMonitorSourceStatusActive, - ConnectionMonitorSourceStatusInactive, - ConnectionMonitorSourceStatusUnknown, - } -} - -// ConnectionMonitorTestConfigurationProtocol - The protocol to use in test evaluation. -type ConnectionMonitorTestConfigurationProtocol string - -const ( - ConnectionMonitorTestConfigurationProtocolHTTP ConnectionMonitorTestConfigurationProtocol = "Http" - ConnectionMonitorTestConfigurationProtocolIcmp ConnectionMonitorTestConfigurationProtocol = "Icmp" - ConnectionMonitorTestConfigurationProtocolTCP ConnectionMonitorTestConfigurationProtocol = "Tcp" -) - -// PossibleConnectionMonitorTestConfigurationProtocolValues returns the possible values for the ConnectionMonitorTestConfigurationProtocol const type. -func PossibleConnectionMonitorTestConfigurationProtocolValues() []ConnectionMonitorTestConfigurationProtocol { - return []ConnectionMonitorTestConfigurationProtocol{ - ConnectionMonitorTestConfigurationProtocolHTTP, - ConnectionMonitorTestConfigurationProtocolIcmp, - ConnectionMonitorTestConfigurationProtocolTCP, - } -} - -// ConnectionMonitorType - Type of connection monitor. -type ConnectionMonitorType string - -const ( - ConnectionMonitorTypeMultiEndpoint ConnectionMonitorType = "MultiEndpoint" - ConnectionMonitorTypeSingleSourceDestination ConnectionMonitorType = "SingleSourceDestination" -) - -// PossibleConnectionMonitorTypeValues returns the possible values for the ConnectionMonitorType const type. -func PossibleConnectionMonitorTypeValues() []ConnectionMonitorType { - return []ConnectionMonitorType{ - ConnectionMonitorTypeMultiEndpoint, - ConnectionMonitorTypeSingleSourceDestination, - } -} - -// ConnectionState - The connection state. -type ConnectionState string - -const ( - ConnectionStateReachable ConnectionState = "Reachable" - ConnectionStateUnknown ConnectionState = "Unknown" - ConnectionStateUnreachable ConnectionState = "Unreachable" -) - -// PossibleConnectionStateValues returns the possible values for the ConnectionState const type. -func PossibleConnectionStateValues() []ConnectionState { - return []ConnectionState{ - ConnectionStateReachable, - ConnectionStateUnknown, - ConnectionStateUnreachable, - } -} - -// ConnectionStatus - The connection status. -type ConnectionStatus string - -const ( - ConnectionStatusConnected ConnectionStatus = "Connected" - ConnectionStatusDegraded ConnectionStatus = "Degraded" - ConnectionStatusDisconnected ConnectionStatus = "Disconnected" - ConnectionStatusUnknown ConnectionStatus = "Unknown" -) - -// PossibleConnectionStatusValues returns the possible values for the ConnectionStatus const type. -func PossibleConnectionStatusValues() []ConnectionStatus { - return []ConnectionStatus{ - ConnectionStatusConnected, - ConnectionStatusDegraded, - ConnectionStatusDisconnected, - ConnectionStatusUnknown, - } -} - -// ConnectivityTopology - Connectivity topology type. -type ConnectivityTopology string - -const ( - ConnectivityTopologyHubAndSpoke ConnectivityTopology = "HubAndSpoke" - ConnectivityTopologyMesh ConnectivityTopology = "Mesh" -) - -// PossibleConnectivityTopologyValues returns the possible values for the ConnectivityTopology const type. -func PossibleConnectivityTopologyValues() []ConnectivityTopology { - return []ConnectivityTopology{ - ConnectivityTopologyHubAndSpoke, - ConnectivityTopologyMesh, - } -} - -// CoverageLevel - Test coverage for the endpoint. -type CoverageLevel string - -const ( - CoverageLevelAboveAverage CoverageLevel = "AboveAverage" - CoverageLevelAverage CoverageLevel = "Average" - CoverageLevelBelowAverage CoverageLevel = "BelowAverage" - CoverageLevelDefault CoverageLevel = "Default" - CoverageLevelFull CoverageLevel = "Full" - CoverageLevelLow CoverageLevel = "Low" -) - -// PossibleCoverageLevelValues returns the possible values for the CoverageLevel const type. -func PossibleCoverageLevelValues() []CoverageLevel { - return []CoverageLevel{ - CoverageLevelAboveAverage, - CoverageLevelAverage, - CoverageLevelBelowAverage, - CoverageLevelDefault, - CoverageLevelFull, - CoverageLevelLow, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// DdosCustomPolicyProtocol - The protocol for which the DDoS protection policy is being customized. -type DdosCustomPolicyProtocol string - -const ( - DdosCustomPolicyProtocolSyn DdosCustomPolicyProtocol = "Syn" - DdosCustomPolicyProtocolTCP DdosCustomPolicyProtocol = "Tcp" - DdosCustomPolicyProtocolUDP DdosCustomPolicyProtocol = "Udp" -) - -// PossibleDdosCustomPolicyProtocolValues returns the possible values for the DdosCustomPolicyProtocol const type. -func PossibleDdosCustomPolicyProtocolValues() []DdosCustomPolicyProtocol { - return []DdosCustomPolicyProtocol{ - DdosCustomPolicyProtocolSyn, - DdosCustomPolicyProtocolTCP, - DdosCustomPolicyProtocolUDP, - } -} - -// DdosCustomPolicyTriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger -// rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal -// traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity -// w.r.t. normal traffic. -type DdosCustomPolicyTriggerSensitivityOverride string - -const ( - DdosCustomPolicyTriggerSensitivityOverrideDefault DdosCustomPolicyTriggerSensitivityOverride = "Default" - DdosCustomPolicyTriggerSensitivityOverrideHigh DdosCustomPolicyTriggerSensitivityOverride = "High" - DdosCustomPolicyTriggerSensitivityOverrideLow DdosCustomPolicyTriggerSensitivityOverride = "Low" - DdosCustomPolicyTriggerSensitivityOverrideRelaxed DdosCustomPolicyTriggerSensitivityOverride = "Relaxed" -) - -// PossibleDdosCustomPolicyTriggerSensitivityOverrideValues returns the possible values for the DdosCustomPolicyTriggerSensitivityOverride const type. -func PossibleDdosCustomPolicyTriggerSensitivityOverrideValues() []DdosCustomPolicyTriggerSensitivityOverride { - return []DdosCustomPolicyTriggerSensitivityOverride{ - DdosCustomPolicyTriggerSensitivityOverrideDefault, - DdosCustomPolicyTriggerSensitivityOverrideHigh, - DdosCustomPolicyTriggerSensitivityOverrideLow, - DdosCustomPolicyTriggerSensitivityOverrideRelaxed, - } -} - -// DdosSettingsProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will -// have the ability to be customized. -type DdosSettingsProtectionCoverage string - -const ( - DdosSettingsProtectionCoverageBasic DdosSettingsProtectionCoverage = "Basic" - DdosSettingsProtectionCoverageStandard DdosSettingsProtectionCoverage = "Standard" -) - -// PossibleDdosSettingsProtectionCoverageValues returns the possible values for the DdosSettingsProtectionCoverage const type. -func PossibleDdosSettingsProtectionCoverageValues() []DdosSettingsProtectionCoverage { - return []DdosSettingsProtectionCoverage{ - DdosSettingsProtectionCoverageBasic, - DdosSettingsProtectionCoverageStandard, - } -} - -// DeleteExistingPeering - Flag if need to remove current existing peerings. -type DeleteExistingPeering string - -const ( - DeleteExistingPeeringFalse DeleteExistingPeering = "False" - DeleteExistingPeeringTrue DeleteExistingPeering = "True" -) - -// PossibleDeleteExistingPeeringValues returns the possible values for the DeleteExistingPeering const type. -func PossibleDeleteExistingPeeringValues() []DeleteExistingPeering { - return []DeleteExistingPeering{ - DeleteExistingPeeringFalse, - DeleteExistingPeeringTrue, - } -} - -// DeleteOptions - Specify what happens to the public IP address when the VM using it is deleted -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -// PossibleDeleteOptionsValues returns the possible values for the DeleteOptions const type. -func PossibleDeleteOptionsValues() []DeleteOptions { - return []DeleteOptions{ - DeleteOptionsDelete, - DeleteOptionsDetach, - } -} - -// DeploymentStatus - Deployment Status. -type DeploymentStatus string - -const ( - DeploymentStatusDeployed DeploymentStatus = "Deployed" - DeploymentStatusDeploying DeploymentStatus = "Deploying" - DeploymentStatusFailed DeploymentStatus = "Failed" - DeploymentStatusNotStarted DeploymentStatus = "NotStarted" -) - -// PossibleDeploymentStatusValues returns the possible values for the DeploymentStatus const type. -func PossibleDeploymentStatusValues() []DeploymentStatus { - return []DeploymentStatus{ - DeploymentStatusDeployed, - DeploymentStatusDeploying, - DeploymentStatusFailed, - DeploymentStatusNotStarted, - } -} - -// DestinationPortBehavior - Destination port behavior. -type DestinationPortBehavior string - -const ( - DestinationPortBehaviorListenIfAvailable DestinationPortBehavior = "ListenIfAvailable" - DestinationPortBehaviorNone DestinationPortBehavior = "None" -) - -// PossibleDestinationPortBehaviorValues returns the possible values for the DestinationPortBehavior const type. -func PossibleDestinationPortBehaviorValues() []DestinationPortBehavior { - return []DestinationPortBehavior{ - DestinationPortBehaviorListenIfAvailable, - DestinationPortBehaviorNone, - } -} - -// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. -type DhGroup string - -const ( - DhGroupDHGroup1 DhGroup = "DHGroup1" - DhGroupDHGroup14 DhGroup = "DHGroup14" - DhGroupDHGroup2 DhGroup = "DHGroup2" - DhGroupDHGroup2048 DhGroup = "DHGroup2048" - DhGroupDHGroup24 DhGroup = "DHGroup24" - DhGroupECP256 DhGroup = "ECP256" - DhGroupECP384 DhGroup = "ECP384" - DhGroupNone DhGroup = "None" -) - -// PossibleDhGroupValues returns the possible values for the DhGroup const type. -func PossibleDhGroupValues() []DhGroup { - return []DhGroup{ - DhGroupDHGroup1, - DhGroupDHGroup14, - DhGroupDHGroup2, - DhGroupDHGroup2048, - DhGroupDHGroup24, - DhGroupECP256, - DhGroupECP384, - DhGroupNone, - } -} - -// Direction - The direction of the traffic. -type Direction string - -const ( - DirectionInbound Direction = "Inbound" - DirectionOutbound Direction = "Outbound" -) - -// PossibleDirectionValues returns the possible values for the Direction const type. -func PossibleDirectionValues() []Direction { - return []Direction{ - DirectionInbound, - DirectionOutbound, - } -} - -// EffectiveAdminRuleKind - Whether the rule is custom or default. -type EffectiveAdminRuleKind string - -const ( - EffectiveAdminRuleKindCustom EffectiveAdminRuleKind = "Custom" - EffectiveAdminRuleKindDefault EffectiveAdminRuleKind = "Default" -) - -// PossibleEffectiveAdminRuleKindValues returns the possible values for the EffectiveAdminRuleKind const type. -func PossibleEffectiveAdminRuleKindValues() []EffectiveAdminRuleKind { - return []EffectiveAdminRuleKind{ - EffectiveAdminRuleKindCustom, - EffectiveAdminRuleKindDefault, - } -} - -// EffectiveRouteSource - Who created the route. -type EffectiveRouteSource string - -const ( - EffectiveRouteSourceDefault EffectiveRouteSource = "Default" - EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown" - EffectiveRouteSourceUser EffectiveRouteSource = "User" - EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway" -) - -// PossibleEffectiveRouteSourceValues returns the possible values for the EffectiveRouteSource const type. -func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource { - return []EffectiveRouteSource{ - EffectiveRouteSourceDefault, - EffectiveRouteSourceUnknown, - EffectiveRouteSourceUser, - EffectiveRouteSourceVirtualNetworkGateway, - } -} - -// EffectiveRouteState - The value of effective route. -type EffectiveRouteState string - -const ( - EffectiveRouteStateActive EffectiveRouteState = "Active" - EffectiveRouteStateInvalid EffectiveRouteState = "Invalid" -) - -// PossibleEffectiveRouteStateValues returns the possible values for the EffectiveRouteState const type. -func PossibleEffectiveRouteStateValues() []EffectiveRouteState { - return []EffectiveRouteState{ - EffectiveRouteStateActive, - EffectiveRouteStateInvalid, - } -} - -// EffectiveSecurityRuleProtocol - The network protocol this rule applies to. -type EffectiveSecurityRuleProtocol string - -const ( - EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All" - EffectiveSecurityRuleProtocolTCP EffectiveSecurityRuleProtocol = "Tcp" - EffectiveSecurityRuleProtocolUDP EffectiveSecurityRuleProtocol = "Udp" -) - -// PossibleEffectiveSecurityRuleProtocolValues returns the possible values for the EffectiveSecurityRuleProtocol const type. -func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol { - return []EffectiveSecurityRuleProtocol{ - EffectiveSecurityRuleProtocolAll, - EffectiveSecurityRuleProtocolTCP, - EffectiveSecurityRuleProtocolUDP, - } -} - -// EndpointType - The endpoint type. -type EndpointType string - -const ( - EndpointTypeAzureArcVM EndpointType = "AzureArcVM" - EndpointTypeAzureSubnet EndpointType = "AzureSubnet" - EndpointTypeAzureVM EndpointType = "AzureVM" - EndpointTypeAzureVMSS EndpointType = "AzureVMSS" - EndpointTypeAzureVNet EndpointType = "AzureVNet" - EndpointTypeExternalAddress EndpointType = "ExternalAddress" - EndpointTypeMMAWorkspaceMachine EndpointType = "MMAWorkspaceMachine" - EndpointTypeMMAWorkspaceNetwork EndpointType = "MMAWorkspaceNetwork" -) - -// PossibleEndpointTypeValues returns the possible values for the EndpointType const type. -func PossibleEndpointTypeValues() []EndpointType { - return []EndpointType{ - EndpointTypeAzureArcVM, - EndpointTypeAzureSubnet, - EndpointTypeAzureVM, - EndpointTypeAzureVMSS, - EndpointTypeAzureVNet, - EndpointTypeExternalAddress, - EndpointTypeMMAWorkspaceMachine, - EndpointTypeMMAWorkspaceNetwork, - } -} - -// EvaluationState - Connectivity analysis evaluation state. -type EvaluationState string - -const ( - EvaluationStateCompleted EvaluationState = "Completed" - EvaluationStateInProgress EvaluationState = "InProgress" - EvaluationStateNotStarted EvaluationState = "NotStarted" -) - -// PossibleEvaluationStateValues returns the possible values for the EvaluationState const type. -func PossibleEvaluationStateValues() []EvaluationState { - return []EvaluationState{ - EvaluationStateCompleted, - EvaluationStateInProgress, - EvaluationStateNotStarted, - } -} - -// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState - The advertised public prefix state of the Peering resource. -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns the possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type. -func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { - return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } -} - -// ExpressRouteCircuitPeeringState - The state of peering. -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -// PossibleExpressRouteCircuitPeeringStateValues returns the possible values for the ExpressRouteCircuitPeeringState const type. -func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState { - return []ExpressRouteCircuitPeeringState{ - ExpressRouteCircuitPeeringStateDisabled, - ExpressRouteCircuitPeeringStateEnabled, - } -} - -// ExpressRouteCircuitSKUFamily - The family of the SKU. -type ExpressRouteCircuitSKUFamily string - -const ( - ExpressRouteCircuitSKUFamilyMeteredData ExpressRouteCircuitSKUFamily = "MeteredData" - ExpressRouteCircuitSKUFamilyUnlimitedData ExpressRouteCircuitSKUFamily = "UnlimitedData" -) - -// PossibleExpressRouteCircuitSKUFamilyValues returns the possible values for the ExpressRouteCircuitSKUFamily const type. -func PossibleExpressRouteCircuitSKUFamilyValues() []ExpressRouteCircuitSKUFamily { - return []ExpressRouteCircuitSKUFamily{ - ExpressRouteCircuitSKUFamilyMeteredData, - ExpressRouteCircuitSKUFamilyUnlimitedData, - } -} - -// ExpressRouteCircuitSKUTier - The tier of the SKU. -type ExpressRouteCircuitSKUTier string - -const ( - ExpressRouteCircuitSKUTierBasic ExpressRouteCircuitSKUTier = "Basic" - ExpressRouteCircuitSKUTierLocal ExpressRouteCircuitSKUTier = "Local" - ExpressRouteCircuitSKUTierPremium ExpressRouteCircuitSKUTier = "Premium" - ExpressRouteCircuitSKUTierStandard ExpressRouteCircuitSKUTier = "Standard" -) - -// PossibleExpressRouteCircuitSKUTierValues returns the possible values for the ExpressRouteCircuitSKUTier const type. -func PossibleExpressRouteCircuitSKUTierValues() []ExpressRouteCircuitSKUTier { - return []ExpressRouteCircuitSKUTier{ - ExpressRouteCircuitSKUTierBasic, - ExpressRouteCircuitSKUTierLocal, - ExpressRouteCircuitSKUTierPremium, - ExpressRouteCircuitSKUTierStandard, - } -} - -// ExpressRouteLinkAdminState - Administrative state of the physical port. -type ExpressRouteLinkAdminState string - -const ( - ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled" - ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled" -) - -// PossibleExpressRouteLinkAdminStateValues returns the possible values for the ExpressRouteLinkAdminState const type. -func PossibleExpressRouteLinkAdminStateValues() []ExpressRouteLinkAdminState { - return []ExpressRouteLinkAdminState{ - ExpressRouteLinkAdminStateDisabled, - ExpressRouteLinkAdminStateEnabled, - } -} - -// ExpressRouteLinkConnectorType - Physical fiber port type. -type ExpressRouteLinkConnectorType string - -const ( - ExpressRouteLinkConnectorTypeLC ExpressRouteLinkConnectorType = "LC" - ExpressRouteLinkConnectorTypeSC ExpressRouteLinkConnectorType = "SC" -) - -// PossibleExpressRouteLinkConnectorTypeValues returns the possible values for the ExpressRouteLinkConnectorType const type. -func PossibleExpressRouteLinkConnectorTypeValues() []ExpressRouteLinkConnectorType { - return []ExpressRouteLinkConnectorType{ - ExpressRouteLinkConnectorTypeLC, - ExpressRouteLinkConnectorTypeSC, - } -} - -// ExpressRouteLinkMacSecCipher - Mac security cipher. -type ExpressRouteLinkMacSecCipher string - -const ( - ExpressRouteLinkMacSecCipherGCMAES128 ExpressRouteLinkMacSecCipher = "GcmAes128" - ExpressRouteLinkMacSecCipherGCMAES256 ExpressRouteLinkMacSecCipher = "GcmAes256" - ExpressRouteLinkMacSecCipherGCMAesXpn128 ExpressRouteLinkMacSecCipher = "GcmAesXpn128" - ExpressRouteLinkMacSecCipherGCMAesXpn256 ExpressRouteLinkMacSecCipher = "GcmAesXpn256" -) - -// PossibleExpressRouteLinkMacSecCipherValues returns the possible values for the ExpressRouteLinkMacSecCipher const type. -func PossibleExpressRouteLinkMacSecCipherValues() []ExpressRouteLinkMacSecCipher { - return []ExpressRouteLinkMacSecCipher{ - ExpressRouteLinkMacSecCipherGCMAES128, - ExpressRouteLinkMacSecCipherGCMAES256, - ExpressRouteLinkMacSecCipherGCMAesXpn128, - ExpressRouteLinkMacSecCipherGCMAesXpn256, - } -} - -// ExpressRouteLinkMacSecSciState - Sci mode enabled/disabled. -type ExpressRouteLinkMacSecSciState string - -const ( - ExpressRouteLinkMacSecSciStateDisabled ExpressRouteLinkMacSecSciState = "Disabled" - ExpressRouteLinkMacSecSciStateEnabled ExpressRouteLinkMacSecSciState = "Enabled" -) - -// PossibleExpressRouteLinkMacSecSciStateValues returns the possible values for the ExpressRouteLinkMacSecSciState const type. -func PossibleExpressRouteLinkMacSecSciStateValues() []ExpressRouteLinkMacSecSciState { - return []ExpressRouteLinkMacSecSciState{ - ExpressRouteLinkMacSecSciStateDisabled, - ExpressRouteLinkMacSecSciStateEnabled, - } -} - -// ExpressRoutePeeringState - The state of peering. -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -// PossibleExpressRoutePeeringStateValues returns the possible values for the ExpressRoutePeeringState const type. -func PossibleExpressRoutePeeringStateValues() []ExpressRoutePeeringState { - return []ExpressRoutePeeringState{ - ExpressRoutePeeringStateDisabled, - ExpressRoutePeeringStateEnabled, - } -} - -// ExpressRoutePeeringType - The peering type. -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -// PossibleExpressRoutePeeringTypeValues returns the possible values for the ExpressRoutePeeringType const type. -func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType { - return []ExpressRoutePeeringType{ - ExpressRoutePeeringTypeAzurePrivatePeering, - ExpressRoutePeeringTypeAzurePublicPeering, - ExpressRoutePeeringTypeMicrosoftPeering, - } -} - -// ExpressRoutePortAuthorizationUseStatus - The authorization use status. -type ExpressRoutePortAuthorizationUseStatus string - -const ( - ExpressRoutePortAuthorizationUseStatusAvailable ExpressRoutePortAuthorizationUseStatus = "Available" - ExpressRoutePortAuthorizationUseStatusInUse ExpressRoutePortAuthorizationUseStatus = "InUse" -) - -// PossibleExpressRoutePortAuthorizationUseStatusValues returns the possible values for the ExpressRoutePortAuthorizationUseStatus const type. -func PossibleExpressRoutePortAuthorizationUseStatusValues() []ExpressRoutePortAuthorizationUseStatus { - return []ExpressRoutePortAuthorizationUseStatus{ - ExpressRoutePortAuthorizationUseStatusAvailable, - ExpressRoutePortAuthorizationUseStatusInUse, - } -} - -// ExpressRoutePortsEncapsulation - Encapsulation method on physical ports. -type ExpressRoutePortsEncapsulation string - -const ( - ExpressRoutePortsEncapsulationDot1Q ExpressRoutePortsEncapsulation = "Dot1Q" - ExpressRoutePortsEncapsulationQinQ ExpressRoutePortsEncapsulation = "QinQ" -) - -// PossibleExpressRoutePortsEncapsulationValues returns the possible values for the ExpressRoutePortsEncapsulation const type. -func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsulation { - return []ExpressRoutePortsEncapsulation{ - ExpressRoutePortsEncapsulationDot1Q, - ExpressRoutePortsEncapsulationQinQ, - } -} - -// ExtendedLocationTypes - The supported ExtendedLocation types. Currently only EdgeZone is supported in Microsoft.Network -// resources. -type ExtendedLocationTypes string - -const ( - ExtendedLocationTypesEdgeZone ExtendedLocationTypes = "EdgeZone" -) - -// PossibleExtendedLocationTypesValues returns the possible values for the ExtendedLocationTypes const type. -func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { - return []ExtendedLocationTypes{ - ExtendedLocationTypesEdgeZone, - } -} - -// FirewallPolicyFilterRuleCollectionActionType - The action type of a rule. -type FirewallPolicyFilterRuleCollectionActionType string - -const ( - FirewallPolicyFilterRuleCollectionActionTypeAllow FirewallPolicyFilterRuleCollectionActionType = "Allow" - FirewallPolicyFilterRuleCollectionActionTypeDeny FirewallPolicyFilterRuleCollectionActionType = "Deny" -) - -// PossibleFirewallPolicyFilterRuleCollectionActionTypeValues returns the possible values for the FirewallPolicyFilterRuleCollectionActionType const type. -func PossibleFirewallPolicyFilterRuleCollectionActionTypeValues() []FirewallPolicyFilterRuleCollectionActionType { - return []FirewallPolicyFilterRuleCollectionActionType{ - FirewallPolicyFilterRuleCollectionActionTypeAllow, - FirewallPolicyFilterRuleCollectionActionTypeDeny, - } -} - -// FirewallPolicyIDPSQuerySortOrder - Describes if results should be in ascending/descending order -type FirewallPolicyIDPSQuerySortOrder string - -const ( - FirewallPolicyIDPSQuerySortOrderAscending FirewallPolicyIDPSQuerySortOrder = "Ascending" - FirewallPolicyIDPSQuerySortOrderDescending FirewallPolicyIDPSQuerySortOrder = "Descending" -) - -// PossibleFirewallPolicyIDPSQuerySortOrderValues returns the possible values for the FirewallPolicyIDPSQuerySortOrder const type. -func PossibleFirewallPolicyIDPSQuerySortOrderValues() []FirewallPolicyIDPSQuerySortOrder { - return []FirewallPolicyIDPSQuerySortOrder{ - FirewallPolicyIDPSQuerySortOrderAscending, - FirewallPolicyIDPSQuerySortOrderDescending, - } -} - -// FirewallPolicyIDPSSignatureDirection - Describes in which direction signature is being enforced: 0 - Inbound, 1 - OutBound, -// 2 - Bidirectional -type FirewallPolicyIDPSSignatureDirection int32 - -const ( - FirewallPolicyIDPSSignatureDirectionZero FirewallPolicyIDPSSignatureDirection = 0 - FirewallPolicyIDPSSignatureDirectionOne FirewallPolicyIDPSSignatureDirection = 1 - FirewallPolicyIDPSSignatureDirectionTwo FirewallPolicyIDPSSignatureDirection = 2 -) - -// PossibleFirewallPolicyIDPSSignatureDirectionValues returns the possible values for the FirewallPolicyIDPSSignatureDirection const type. -func PossibleFirewallPolicyIDPSSignatureDirectionValues() []FirewallPolicyIDPSSignatureDirection { - return []FirewallPolicyIDPSSignatureDirection{ - FirewallPolicyIDPSSignatureDirectionZero, - FirewallPolicyIDPSSignatureDirectionOne, - FirewallPolicyIDPSSignatureDirectionTwo, - } -} - -// FirewallPolicyIDPSSignatureMode - The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny -type FirewallPolicyIDPSSignatureMode int32 - -const ( - FirewallPolicyIDPSSignatureModeZero FirewallPolicyIDPSSignatureMode = 0 - FirewallPolicyIDPSSignatureModeOne FirewallPolicyIDPSSignatureMode = 1 - FirewallPolicyIDPSSignatureModeTwo FirewallPolicyIDPSSignatureMode = 2 -) - -// PossibleFirewallPolicyIDPSSignatureModeValues returns the possible values for the FirewallPolicyIDPSSignatureMode const type. -func PossibleFirewallPolicyIDPSSignatureModeValues() []FirewallPolicyIDPSSignatureMode { - return []FirewallPolicyIDPSSignatureMode{ - FirewallPolicyIDPSSignatureModeZero, - FirewallPolicyIDPSSignatureModeOne, - FirewallPolicyIDPSSignatureModeTwo, - } -} - -// FirewallPolicyIDPSSignatureSeverity - Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High -type FirewallPolicyIDPSSignatureSeverity int32 - -const ( - FirewallPolicyIDPSSignatureSeverityOne FirewallPolicyIDPSSignatureSeverity = 1 - FirewallPolicyIDPSSignatureSeverityTwo FirewallPolicyIDPSSignatureSeverity = 2 - FirewallPolicyIDPSSignatureSeverityThree FirewallPolicyIDPSSignatureSeverity = 3 -) - -// PossibleFirewallPolicyIDPSSignatureSeverityValues returns the possible values for the FirewallPolicyIDPSSignatureSeverity const type. -func PossibleFirewallPolicyIDPSSignatureSeverityValues() []FirewallPolicyIDPSSignatureSeverity { - return []FirewallPolicyIDPSSignatureSeverity{ - FirewallPolicyIDPSSignatureSeverityOne, - FirewallPolicyIDPSSignatureSeverityTwo, - FirewallPolicyIDPSSignatureSeverityThree, - } -} - -// FirewallPolicyIntrusionDetectionProtocol - Possible intrusion detection bypass traffic protocols. -type FirewallPolicyIntrusionDetectionProtocol string - -const ( - FirewallPolicyIntrusionDetectionProtocolANY FirewallPolicyIntrusionDetectionProtocol = "ANY" - FirewallPolicyIntrusionDetectionProtocolICMP FirewallPolicyIntrusionDetectionProtocol = "ICMP" - FirewallPolicyIntrusionDetectionProtocolTCP FirewallPolicyIntrusionDetectionProtocol = "TCP" - FirewallPolicyIntrusionDetectionProtocolUDP FirewallPolicyIntrusionDetectionProtocol = "UDP" -) - -// PossibleFirewallPolicyIntrusionDetectionProtocolValues returns the possible values for the FirewallPolicyIntrusionDetectionProtocol const type. -func PossibleFirewallPolicyIntrusionDetectionProtocolValues() []FirewallPolicyIntrusionDetectionProtocol { - return []FirewallPolicyIntrusionDetectionProtocol{ - FirewallPolicyIntrusionDetectionProtocolANY, - FirewallPolicyIntrusionDetectionProtocolICMP, - FirewallPolicyIntrusionDetectionProtocolTCP, - FirewallPolicyIntrusionDetectionProtocolUDP, - } -} - -// FirewallPolicyIntrusionDetectionStateType - Possible state values. -type FirewallPolicyIntrusionDetectionStateType string - -const ( - FirewallPolicyIntrusionDetectionStateTypeAlert FirewallPolicyIntrusionDetectionStateType = "Alert" - FirewallPolicyIntrusionDetectionStateTypeDeny FirewallPolicyIntrusionDetectionStateType = "Deny" - FirewallPolicyIntrusionDetectionStateTypeOff FirewallPolicyIntrusionDetectionStateType = "Off" -) - -// PossibleFirewallPolicyIntrusionDetectionStateTypeValues returns the possible values for the FirewallPolicyIntrusionDetectionStateType const type. -func PossibleFirewallPolicyIntrusionDetectionStateTypeValues() []FirewallPolicyIntrusionDetectionStateType { - return []FirewallPolicyIntrusionDetectionStateType{ - FirewallPolicyIntrusionDetectionStateTypeAlert, - FirewallPolicyIntrusionDetectionStateTypeDeny, - FirewallPolicyIntrusionDetectionStateTypeOff, - } -} - -// FirewallPolicyNatRuleCollectionActionType - The action type of a rule. -type FirewallPolicyNatRuleCollectionActionType string - -const ( - FirewallPolicyNatRuleCollectionActionTypeDNAT FirewallPolicyNatRuleCollectionActionType = "DNAT" -) - -// PossibleFirewallPolicyNatRuleCollectionActionTypeValues returns the possible values for the FirewallPolicyNatRuleCollectionActionType const type. -func PossibleFirewallPolicyNatRuleCollectionActionTypeValues() []FirewallPolicyNatRuleCollectionActionType { - return []FirewallPolicyNatRuleCollectionActionType{ - FirewallPolicyNatRuleCollectionActionTypeDNAT, - } -} - -// FirewallPolicyRuleApplicationProtocolType - The application protocol type of a Rule. -type FirewallPolicyRuleApplicationProtocolType string - -const ( - FirewallPolicyRuleApplicationProtocolTypeHTTP FirewallPolicyRuleApplicationProtocolType = "Http" - FirewallPolicyRuleApplicationProtocolTypeHTTPS FirewallPolicyRuleApplicationProtocolType = "Https" -) - -// PossibleFirewallPolicyRuleApplicationProtocolTypeValues returns the possible values for the FirewallPolicyRuleApplicationProtocolType const type. -func PossibleFirewallPolicyRuleApplicationProtocolTypeValues() []FirewallPolicyRuleApplicationProtocolType { - return []FirewallPolicyRuleApplicationProtocolType{ - FirewallPolicyRuleApplicationProtocolTypeHTTP, - FirewallPolicyRuleApplicationProtocolTypeHTTPS, - } -} - -// FirewallPolicyRuleCollectionType - The type of the rule collection. -type FirewallPolicyRuleCollectionType string - -const ( - FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection FirewallPolicyRuleCollectionType = "FirewallPolicyFilterRuleCollection" - FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection FirewallPolicyRuleCollectionType = "FirewallPolicyNatRuleCollection" -) - -// PossibleFirewallPolicyRuleCollectionTypeValues returns the possible values for the FirewallPolicyRuleCollectionType const type. -func PossibleFirewallPolicyRuleCollectionTypeValues() []FirewallPolicyRuleCollectionType { - return []FirewallPolicyRuleCollectionType{ - FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection, - FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection, - } -} - -// FirewallPolicyRuleNetworkProtocol - The Network protocol of a Rule. -type FirewallPolicyRuleNetworkProtocol string - -const ( - FirewallPolicyRuleNetworkProtocolAny FirewallPolicyRuleNetworkProtocol = "Any" - FirewallPolicyRuleNetworkProtocolICMP FirewallPolicyRuleNetworkProtocol = "ICMP" - FirewallPolicyRuleNetworkProtocolTCP FirewallPolicyRuleNetworkProtocol = "TCP" - FirewallPolicyRuleNetworkProtocolUDP FirewallPolicyRuleNetworkProtocol = "UDP" -) - -// PossibleFirewallPolicyRuleNetworkProtocolValues returns the possible values for the FirewallPolicyRuleNetworkProtocol const type. -func PossibleFirewallPolicyRuleNetworkProtocolValues() []FirewallPolicyRuleNetworkProtocol { - return []FirewallPolicyRuleNetworkProtocol{ - FirewallPolicyRuleNetworkProtocolAny, - FirewallPolicyRuleNetworkProtocolICMP, - FirewallPolicyRuleNetworkProtocolTCP, - FirewallPolicyRuleNetworkProtocolUDP, - } -} - -// FirewallPolicyRuleType - Rule Type. -type FirewallPolicyRuleType string - -const ( - FirewallPolicyRuleTypeApplicationRule FirewallPolicyRuleType = "ApplicationRule" - FirewallPolicyRuleTypeNatRule FirewallPolicyRuleType = "NatRule" - FirewallPolicyRuleTypeNetworkRule FirewallPolicyRuleType = "NetworkRule" -) - -// PossibleFirewallPolicyRuleTypeValues returns the possible values for the FirewallPolicyRuleType const type. -func PossibleFirewallPolicyRuleTypeValues() []FirewallPolicyRuleType { - return []FirewallPolicyRuleType{ - FirewallPolicyRuleTypeApplicationRule, - FirewallPolicyRuleTypeNatRule, - FirewallPolicyRuleTypeNetworkRule, - } -} - -// FirewallPolicySKUTier - Tier of Firewall Policy. -type FirewallPolicySKUTier string - -const ( - FirewallPolicySKUTierBasic FirewallPolicySKUTier = "Basic" - FirewallPolicySKUTierPremium FirewallPolicySKUTier = "Premium" - FirewallPolicySKUTierStandard FirewallPolicySKUTier = "Standard" -) - -// PossibleFirewallPolicySKUTierValues returns the possible values for the FirewallPolicySKUTier const type. -func PossibleFirewallPolicySKUTierValues() []FirewallPolicySKUTier { - return []FirewallPolicySKUTier{ - FirewallPolicySKUTierBasic, - FirewallPolicySKUTierPremium, - FirewallPolicySKUTierStandard, - } -} - -// FlowLogFormatType - The file type of flow log. -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -// PossibleFlowLogFormatTypeValues returns the possible values for the FlowLogFormatType const type. -func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { - return []FlowLogFormatType{ - FlowLogFormatTypeJSON, - } -} - -// GatewayLoadBalancerTunnelInterfaceType - Traffic type of gateway load balancer tunnel interface. -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -// PossibleGatewayLoadBalancerTunnelInterfaceTypeValues returns the possible values for the GatewayLoadBalancerTunnelInterfaceType const type. -func PossibleGatewayLoadBalancerTunnelInterfaceTypeValues() []GatewayLoadBalancerTunnelInterfaceType { - return []GatewayLoadBalancerTunnelInterfaceType{ - GatewayLoadBalancerTunnelInterfaceTypeExternal, - GatewayLoadBalancerTunnelInterfaceTypeInternal, - GatewayLoadBalancerTunnelInterfaceTypeNone, - } -} - -// GatewayLoadBalancerTunnelProtocol - Protocol of gateway load balancer tunnel interface. -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -// PossibleGatewayLoadBalancerTunnelProtocolValues returns the possible values for the GatewayLoadBalancerTunnelProtocol const type. -func PossibleGatewayLoadBalancerTunnelProtocolValues() []GatewayLoadBalancerTunnelProtocol { - return []GatewayLoadBalancerTunnelProtocol{ - GatewayLoadBalancerTunnelProtocolNative, - GatewayLoadBalancerTunnelProtocolNone, - GatewayLoadBalancerTunnelProtocolVXLAN, - } -} - -// GroupConnectivity - Group connectivity type. -type GroupConnectivity string - -const ( - GroupConnectivityDirectlyConnected GroupConnectivity = "DirectlyConnected" - GroupConnectivityNone GroupConnectivity = "None" -) - -// PossibleGroupConnectivityValues returns the possible values for the GroupConnectivity const type. -func PossibleGroupConnectivityValues() []GroupConnectivity { - return []GroupConnectivity{ - GroupConnectivityDirectlyConnected, - GroupConnectivityNone, - } -} - -// HTTPConfigurationMethod - The HTTP method to use. -type HTTPConfigurationMethod string - -const ( - HTTPConfigurationMethodGet HTTPConfigurationMethod = "Get" - HTTPConfigurationMethodPost HTTPConfigurationMethod = "Post" -) - -// PossibleHTTPConfigurationMethodValues returns the possible values for the HTTPConfigurationMethod const type. -func PossibleHTTPConfigurationMethodValues() []HTTPConfigurationMethod { - return []HTTPConfigurationMethod{ - HTTPConfigurationMethodGet, - HTTPConfigurationMethodPost, - } -} - -// HTTPMethod - HTTP method. -type HTTPMethod string - -const ( - HTTPMethodGet HTTPMethod = "Get" -) - -// PossibleHTTPMethodValues returns the possible values for the HTTPMethod const type. -func PossibleHTTPMethodValues() []HTTPMethod { - return []HTTPMethod{ - HTTPMethodGet, - } -} - -// HubBgpConnectionStatus - The current state of the VirtualHub to Peer. -type HubBgpConnectionStatus string - -const ( - HubBgpConnectionStatusConnected HubBgpConnectionStatus = "Connected" - HubBgpConnectionStatusConnecting HubBgpConnectionStatus = "Connecting" - HubBgpConnectionStatusNotConnected HubBgpConnectionStatus = "NotConnected" - HubBgpConnectionStatusUnknown HubBgpConnectionStatus = "Unknown" -) - -// PossibleHubBgpConnectionStatusValues returns the possible values for the HubBgpConnectionStatus const type. -func PossibleHubBgpConnectionStatusValues() []HubBgpConnectionStatus { - return []HubBgpConnectionStatus{ - HubBgpConnectionStatusConnected, - HubBgpConnectionStatusConnecting, - HubBgpConnectionStatusNotConnected, - HubBgpConnectionStatusUnknown, - } -} - -// HubRoutingPreference - The hub routing preference gateway types -type HubRoutingPreference string - -const ( - HubRoutingPreferenceASPath HubRoutingPreference = "ASPath" - HubRoutingPreferenceExpressRoute HubRoutingPreference = "ExpressRoute" - HubRoutingPreferenceVPNGateway HubRoutingPreference = "VpnGateway" -) - -// PossibleHubRoutingPreferenceValues returns the possible values for the HubRoutingPreference const type. -func PossibleHubRoutingPreferenceValues() []HubRoutingPreference { - return []HubRoutingPreference{ - HubRoutingPreferenceASPath, - HubRoutingPreferenceExpressRoute, - HubRoutingPreferenceVPNGateway, - } -} - -// HubVirtualNetworkConnectionStatus - The current state of the VirtualHub to vnet connection. -type HubVirtualNetworkConnectionStatus string - -const ( - HubVirtualNetworkConnectionStatusConnected HubVirtualNetworkConnectionStatus = "Connected" - HubVirtualNetworkConnectionStatusConnecting HubVirtualNetworkConnectionStatus = "Connecting" - HubVirtualNetworkConnectionStatusNotConnected HubVirtualNetworkConnectionStatus = "NotConnected" - HubVirtualNetworkConnectionStatusUnknown HubVirtualNetworkConnectionStatus = "Unknown" -) - -// PossibleHubVirtualNetworkConnectionStatusValues returns the possible values for the HubVirtualNetworkConnectionStatus const type. -func PossibleHubVirtualNetworkConnectionStatusValues() []HubVirtualNetworkConnectionStatus { - return []HubVirtualNetworkConnectionStatus{ - HubVirtualNetworkConnectionStatusConnected, - HubVirtualNetworkConnectionStatusConnecting, - HubVirtualNetworkConnectionStatusNotConnected, - HubVirtualNetworkConnectionStatusUnknown, - } -} - -// IPAllocationMethod - IP address allocation method. -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -// PossibleIPAllocationMethodValues returns the possible values for the IPAllocationMethod const type. -func PossibleIPAllocationMethodValues() []IPAllocationMethod { - return []IPAllocationMethod{ - IPAllocationMethodDynamic, - IPAllocationMethodStatic, - } -} - -// IPAllocationType - IpAllocation type. -type IPAllocationType string - -const ( - IPAllocationTypeHypernet IPAllocationType = "Hypernet" - IPAllocationTypeUndefined IPAllocationType = "Undefined" -) - -// PossibleIPAllocationTypeValues returns the possible values for the IPAllocationType const type. -func PossibleIPAllocationTypeValues() []IPAllocationType { - return []IPAllocationType{ - IPAllocationTypeHypernet, - IPAllocationTypeUndefined, - } -} - -// IPFlowProtocol - Protocol to be verified on. -type IPFlowProtocol string - -const ( - IPFlowProtocolTCP IPFlowProtocol = "TCP" - IPFlowProtocolUDP IPFlowProtocol = "UDP" -) - -// PossibleIPFlowProtocolValues returns the possible values for the IPFlowProtocol const type. -func PossibleIPFlowProtocolValues() []IPFlowProtocol { - return []IPFlowProtocol{ - IPFlowProtocolTCP, - IPFlowProtocolUDP, - } -} - -// IPSecEncryption - The IPSec encryption algorithm (IKE phase 1). -type IPSecEncryption string - -const ( - IPSecEncryptionAES128 IPSecEncryption = "AES128" - IPSecEncryptionAES192 IPSecEncryption = "AES192" - IPSecEncryptionAES256 IPSecEncryption = "AES256" - IPSecEncryptionDES IPSecEncryption = "DES" - IPSecEncryptionDES3 IPSecEncryption = "DES3" - IPSecEncryptionGCMAES128 IPSecEncryption = "GCMAES128" - IPSecEncryptionGCMAES192 IPSecEncryption = "GCMAES192" - IPSecEncryptionGCMAES256 IPSecEncryption = "GCMAES256" - IPSecEncryptionNone IPSecEncryption = "None" -) - -// PossibleIPSecEncryptionValues returns the possible values for the IPSecEncryption const type. -func PossibleIPSecEncryptionValues() []IPSecEncryption { - return []IPSecEncryption{ - IPSecEncryptionAES128, - IPSecEncryptionAES192, - IPSecEncryptionAES256, - IPSecEncryptionDES, - IPSecEncryptionDES3, - IPSecEncryptionGCMAES128, - IPSecEncryptionGCMAES192, - IPSecEncryptionGCMAES256, - IPSecEncryptionNone, - } -} - -// IPSecIntegrity - The IPSec integrity algorithm (IKE phase 1). -type IPSecIntegrity string - -const ( - IPSecIntegrityGCMAES128 IPSecIntegrity = "GCMAES128" - IPSecIntegrityGCMAES192 IPSecIntegrity = "GCMAES192" - IPSecIntegrityGCMAES256 IPSecIntegrity = "GCMAES256" - IPSecIntegrityMD5 IPSecIntegrity = "MD5" - IPSecIntegritySHA1 IPSecIntegrity = "SHA1" - IPSecIntegritySHA256 IPSecIntegrity = "SHA256" -) - -// PossibleIPSecIntegrityValues returns the possible values for the IPSecIntegrity const type. -func PossibleIPSecIntegrityValues() []IPSecIntegrity { - return []IPSecIntegrity{ - IPSecIntegrityGCMAES128, - IPSecIntegrityGCMAES192, - IPSecIntegrityGCMAES256, - IPSecIntegrityMD5, - IPSecIntegritySHA1, - IPSecIntegritySHA256, - } -} - -// IPVersion - IP address version. -type IPVersion string - -const ( - IPVersionIPv4 IPVersion = "IPv4" - IPVersionIPv6 IPVersion = "IPv6" -) - -// PossibleIPVersionValues returns the possible values for the IPVersion const type. -func PossibleIPVersionValues() []IPVersion { - return []IPVersion{ - IPVersionIPv4, - IPVersionIPv6, - } -} - -// IkeEncryption - The IKE encryption algorithm (IKE phase 2). -type IkeEncryption string - -const ( - IkeEncryptionAES128 IkeEncryption = "AES128" - IkeEncryptionAES192 IkeEncryption = "AES192" - IkeEncryptionAES256 IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDES3 IkeEncryption = "DES3" - IkeEncryptionGCMAES128 IkeEncryption = "GCMAES128" - IkeEncryptionGCMAES256 IkeEncryption = "GCMAES256" -) - -// PossibleIkeEncryptionValues returns the possible values for the IkeEncryption const type. -func PossibleIkeEncryptionValues() []IkeEncryption { - return []IkeEncryption{ - IkeEncryptionAES128, - IkeEncryptionAES192, - IkeEncryptionAES256, - IkeEncryptionDES, - IkeEncryptionDES3, - IkeEncryptionGCMAES128, - IkeEncryptionGCMAES256, - } -} - -// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). -type IkeIntegrity string - -const ( - IkeIntegrityGCMAES128 IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAES256 IkeIntegrity = "GCMAES256" - IkeIntegrityMD5 IkeIntegrity = "MD5" - IkeIntegritySHA1 IkeIntegrity = "SHA1" - IkeIntegritySHA256 IkeIntegrity = "SHA256" - IkeIntegritySHA384 IkeIntegrity = "SHA384" -) - -// PossibleIkeIntegrityValues returns the possible values for the IkeIntegrity const type. -func PossibleIkeIntegrityValues() []IkeIntegrity { - return []IkeIntegrity{ - IkeIntegrityGCMAES128, - IkeIntegrityGCMAES256, - IkeIntegrityMD5, - IkeIntegritySHA1, - IkeIntegritySHA256, - IkeIntegritySHA384, - } -} - -// InboundSecurityRulesProtocol - Protocol. This should be either TCP or UDP. -type InboundSecurityRulesProtocol string - -const ( - InboundSecurityRulesProtocolTCP InboundSecurityRulesProtocol = "TCP" - InboundSecurityRulesProtocolUDP InboundSecurityRulesProtocol = "UDP" -) - -// PossibleInboundSecurityRulesProtocolValues returns the possible values for the InboundSecurityRulesProtocol const type. -func PossibleInboundSecurityRulesProtocolValues() []InboundSecurityRulesProtocol { - return []InboundSecurityRulesProtocol{ - InboundSecurityRulesProtocolTCP, - InboundSecurityRulesProtocolUDP, - } -} - -// IsGlobal - Flag if global mesh is supported. -type IsGlobal string - -const ( - IsGlobalFalse IsGlobal = "False" - IsGlobalTrue IsGlobal = "True" -) - -// PossibleIsGlobalValues returns the possible values for the IsGlobal const type. -func PossibleIsGlobalValues() []IsGlobal { - return []IsGlobal{ - IsGlobalFalse, - IsGlobalTrue, - } -} - -// IssueType - The type of issue. -type IssueType string - -const ( - IssueTypeAgentStopped IssueType = "AgentStopped" - IssueTypeDNSResolution IssueType = "DnsResolution" - IssueTypeGuestFirewall IssueType = "GuestFirewall" - IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" - IssueTypePlatform IssueType = "Platform" - IssueTypePortThrottled IssueType = "PortThrottled" - IssueTypeSocketBind IssueType = "SocketBind" - IssueTypeUnknown IssueType = "Unknown" - IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" -) - -// PossibleIssueTypeValues returns the possible values for the IssueType const type. -func PossibleIssueTypeValues() []IssueType { - return []IssueType{ - IssueTypeAgentStopped, - IssueTypeDNSResolution, - IssueTypeGuestFirewall, - IssueTypeNetworkSecurityRule, - IssueTypePlatform, - IssueTypePortThrottled, - IssueTypeSocketBind, - IssueTypeUnknown, - IssueTypeUserDefinedRoute, - } -} - -// LoadBalancerBackendAddressAdminState - A list of administrative states which once set can override health probe so that -// Load Balancer will always forward new connections to backend, or deny new connections and reset existing connections. -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -// PossibleLoadBalancerBackendAddressAdminStateValues returns the possible values for the LoadBalancerBackendAddressAdminState const type. -func PossibleLoadBalancerBackendAddressAdminStateValues() []LoadBalancerBackendAddressAdminState { - return []LoadBalancerBackendAddressAdminState{ - LoadBalancerBackendAddressAdminStateDown, - LoadBalancerBackendAddressAdminStateDrain, - LoadBalancerBackendAddressAdminStateNone, - LoadBalancerBackendAddressAdminStateUp, - } -} - -// LoadBalancerOutboundRuleProtocol - The protocol for the outbound rule in load balancer. -type LoadBalancerOutboundRuleProtocol string - -const ( - LoadBalancerOutboundRuleProtocolAll LoadBalancerOutboundRuleProtocol = "All" - LoadBalancerOutboundRuleProtocolTCP LoadBalancerOutboundRuleProtocol = "Tcp" - LoadBalancerOutboundRuleProtocolUDP LoadBalancerOutboundRuleProtocol = "Udp" -) - -// PossibleLoadBalancerOutboundRuleProtocolValues returns the possible values for the LoadBalancerOutboundRuleProtocol const type. -func PossibleLoadBalancerOutboundRuleProtocolValues() []LoadBalancerOutboundRuleProtocol { - return []LoadBalancerOutboundRuleProtocol{ - LoadBalancerOutboundRuleProtocolAll, - LoadBalancerOutboundRuleProtocolTCP, - LoadBalancerOutboundRuleProtocolUDP, - } -} - -// LoadBalancerSKUName - Name of a load balancer SKU. -type LoadBalancerSKUName string - -const ( - LoadBalancerSKUNameBasic LoadBalancerSKUName = "Basic" - LoadBalancerSKUNameGateway LoadBalancerSKUName = "Gateway" - LoadBalancerSKUNameStandard LoadBalancerSKUName = "Standard" -) - -// PossibleLoadBalancerSKUNameValues returns the possible values for the LoadBalancerSKUName const type. -func PossibleLoadBalancerSKUNameValues() []LoadBalancerSKUName { - return []LoadBalancerSKUName{ - LoadBalancerSKUNameBasic, - LoadBalancerSKUNameGateway, - LoadBalancerSKUNameStandard, - } -} - -// LoadBalancerSKUTier - Tier of a load balancer SKU. -type LoadBalancerSKUTier string - -const ( - LoadBalancerSKUTierGlobal LoadBalancerSKUTier = "Global" - LoadBalancerSKUTierRegional LoadBalancerSKUTier = "Regional" -) - -// PossibleLoadBalancerSKUTierValues returns the possible values for the LoadBalancerSKUTier const type. -func PossibleLoadBalancerSKUTierValues() []LoadBalancerSKUTier { - return []LoadBalancerSKUTier{ - LoadBalancerSKUTierGlobal, - LoadBalancerSKUTierRegional, - } -} - -// LoadDistribution - The load distribution policy for this rule. -type LoadDistribution string - -const ( - LoadDistributionDefault LoadDistribution = "Default" - LoadDistributionSourceIP LoadDistribution = "SourceIP" - LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol" -) - -// PossibleLoadDistributionValues returns the possible values for the LoadDistribution const type. -func PossibleLoadDistributionValues() []LoadDistribution { - return []LoadDistribution{ - LoadDistributionDefault, - LoadDistributionSourceIP, - LoadDistributionSourceIPProtocol, - } -} - -// ManagedRuleEnabledState - The state of the managed rule. Defaults to Disabled if not specified. -type ManagedRuleEnabledState string - -const ( - ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" -) - -// PossibleManagedRuleEnabledStateValues returns the possible values for the ManagedRuleEnabledState const type. -func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { - return []ManagedRuleEnabledState{ - ManagedRuleEnabledStateDisabled, - } -} - -// NatGatewaySKUName - Name of Nat Gateway SKU. -type NatGatewaySKUName string - -const ( - NatGatewaySKUNameStandard NatGatewaySKUName = "Standard" -) - -// PossibleNatGatewaySKUNameValues returns the possible values for the NatGatewaySKUName const type. -func PossibleNatGatewaySKUNameValues() []NatGatewaySKUName { - return []NatGatewaySKUName{ - NatGatewaySKUNameStandard, - } -} - -// NetworkIntentPolicyBasedService - Network intent policy based services. -type NetworkIntentPolicyBasedService string - -const ( - NetworkIntentPolicyBasedServiceAll NetworkIntentPolicyBasedService = "All" - NetworkIntentPolicyBasedServiceNone NetworkIntentPolicyBasedService = "None" -) - -// PossibleNetworkIntentPolicyBasedServiceValues returns the possible values for the NetworkIntentPolicyBasedService const type. -func PossibleNetworkIntentPolicyBasedServiceValues() []NetworkIntentPolicyBasedService { - return []NetworkIntentPolicyBasedService{ - NetworkIntentPolicyBasedServiceAll, - NetworkIntentPolicyBasedServiceNone, - } -} - -// NetworkInterfaceAuxiliaryMode - Auxiliary mode of Network Interface resource. -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -// PossibleNetworkInterfaceAuxiliaryModeValues returns the possible values for the NetworkInterfaceAuxiliaryMode const type. -func PossibleNetworkInterfaceAuxiliaryModeValues() []NetworkInterfaceAuxiliaryMode { - return []NetworkInterfaceAuxiliaryMode{ - NetworkInterfaceAuxiliaryModeFloating, - NetworkInterfaceAuxiliaryModeMaxConnections, - NetworkInterfaceAuxiliaryModeNone, - } -} - -// NetworkInterfaceMigrationPhase - Migration phase of Network Interface resource. -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -// PossibleNetworkInterfaceMigrationPhaseValues returns the possible values for the NetworkInterfaceMigrationPhase const type. -func PossibleNetworkInterfaceMigrationPhaseValues() []NetworkInterfaceMigrationPhase { - return []NetworkInterfaceMigrationPhase{ - NetworkInterfaceMigrationPhaseAbort, - NetworkInterfaceMigrationPhaseCommit, - NetworkInterfaceMigrationPhaseCommitted, - NetworkInterfaceMigrationPhaseNone, - NetworkInterfaceMigrationPhasePrepare, - } -} - -// NetworkInterfaceNicType - Type of Network Interface resource. -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -// PossibleNetworkInterfaceNicTypeValues returns the possible values for the NetworkInterfaceNicType const type. -func PossibleNetworkInterfaceNicTypeValues() []NetworkInterfaceNicType { - return []NetworkInterfaceNicType{ - NetworkInterfaceNicTypeElastic, - NetworkInterfaceNicTypeStandard, - } -} - -// NetworkOperationStatus - Status of the Azure async operation. -type NetworkOperationStatus string - -const ( - NetworkOperationStatusFailed NetworkOperationStatus = "Failed" - NetworkOperationStatusInProgress NetworkOperationStatus = "InProgress" - NetworkOperationStatusSucceeded NetworkOperationStatus = "Succeeded" -) - -// PossibleNetworkOperationStatusValues returns the possible values for the NetworkOperationStatus const type. -func PossibleNetworkOperationStatusValues() []NetworkOperationStatus { - return []NetworkOperationStatus{ - NetworkOperationStatusFailed, - NetworkOperationStatusInProgress, - NetworkOperationStatusSucceeded, - } -} - -// NextHopType - Next hop type. -type NextHopType string - -const ( - NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway" - NextHopTypeInternet NextHopType = "Internet" - NextHopTypeNone NextHopType = "None" - NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance" - NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway" - NextHopTypeVnetLocal NextHopType = "VnetLocal" -) - -// PossibleNextHopTypeValues returns the possible values for the NextHopType const type. -func PossibleNextHopTypeValues() []NextHopType { - return []NextHopType{ - NextHopTypeHyperNetGateway, - NextHopTypeInternet, - NextHopTypeNone, - NextHopTypeVirtualAppliance, - NextHopTypeVirtualNetworkGateway, - NextHopTypeVnetLocal, - } -} - -// OfficeTrafficCategory - The office traffic category. -type OfficeTrafficCategory string - -const ( - OfficeTrafficCategoryAll OfficeTrafficCategory = "All" - OfficeTrafficCategoryNone OfficeTrafficCategory = "None" - OfficeTrafficCategoryOptimize OfficeTrafficCategory = "Optimize" - OfficeTrafficCategoryOptimizeAndAllow OfficeTrafficCategory = "OptimizeAndAllow" -) - -// PossibleOfficeTrafficCategoryValues returns the possible values for the OfficeTrafficCategory const type. -func PossibleOfficeTrafficCategoryValues() []OfficeTrafficCategory { - return []OfficeTrafficCategory{ - OfficeTrafficCategoryAll, - OfficeTrafficCategoryNone, - OfficeTrafficCategoryOptimize, - OfficeTrafficCategoryOptimizeAndAllow, - } -} - -// Origin - The origin of the issue. -type Origin string - -const ( - OriginInbound Origin = "Inbound" - OriginLocal Origin = "Local" - OriginOutbound Origin = "Outbound" -) - -// PossibleOriginValues returns the possible values for the Origin const type. -func PossibleOriginValues() []Origin { - return []Origin{ - OriginInbound, - OriginLocal, - OriginOutbound, - } -} - -// OutputType - Connection monitor output destination type. Currently, only "Workspace" is supported. -type OutputType string - -const ( - OutputTypeWorkspace OutputType = "Workspace" -) - -// PossibleOutputTypeValues returns the possible values for the OutputType const type. -func PossibleOutputTypeValues() []OutputType { - return []OutputType{ - OutputTypeWorkspace, - } -} - -// OwaspCrsExclusionEntryMatchVariable - The variable to be excluded. -type OwaspCrsExclusionEntryMatchVariable string - -const ( - OwaspCrsExclusionEntryMatchVariableRequestArgKeys OwaspCrsExclusionEntryMatchVariable = "RequestArgKeys" - OwaspCrsExclusionEntryMatchVariableRequestArgNames OwaspCrsExclusionEntryMatchVariable = "RequestArgNames" - OwaspCrsExclusionEntryMatchVariableRequestArgValues OwaspCrsExclusionEntryMatchVariable = "RequestArgValues" - OwaspCrsExclusionEntryMatchVariableRequestCookieKeys OwaspCrsExclusionEntryMatchVariable = "RequestCookieKeys" - OwaspCrsExclusionEntryMatchVariableRequestCookieNames OwaspCrsExclusionEntryMatchVariable = "RequestCookieNames" - OwaspCrsExclusionEntryMatchVariableRequestCookieValues OwaspCrsExclusionEntryMatchVariable = "RequestCookieValues" - OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys OwaspCrsExclusionEntryMatchVariable = "RequestHeaderKeys" - OwaspCrsExclusionEntryMatchVariableRequestHeaderNames OwaspCrsExclusionEntryMatchVariable = "RequestHeaderNames" - OwaspCrsExclusionEntryMatchVariableRequestHeaderValues OwaspCrsExclusionEntryMatchVariable = "RequestHeaderValues" -) - -// PossibleOwaspCrsExclusionEntryMatchVariableValues returns the possible values for the OwaspCrsExclusionEntryMatchVariable const type. -func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntryMatchVariable { - return []OwaspCrsExclusionEntryMatchVariable{ - OwaspCrsExclusionEntryMatchVariableRequestArgKeys, - OwaspCrsExclusionEntryMatchVariableRequestArgNames, - OwaspCrsExclusionEntryMatchVariableRequestArgValues, - OwaspCrsExclusionEntryMatchVariableRequestCookieKeys, - OwaspCrsExclusionEntryMatchVariableRequestCookieNames, - OwaspCrsExclusionEntryMatchVariableRequestCookieValues, - OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys, - OwaspCrsExclusionEntryMatchVariableRequestHeaderNames, - OwaspCrsExclusionEntryMatchVariableRequestHeaderValues, - } -} - -// OwaspCrsExclusionEntrySelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which -// elements in the collection this exclusion applies to. -type OwaspCrsExclusionEntrySelectorMatchOperator string - -const ( - OwaspCrsExclusionEntrySelectorMatchOperatorContains OwaspCrsExclusionEntrySelectorMatchOperator = "Contains" - OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith OwaspCrsExclusionEntrySelectorMatchOperator = "EndsWith" - OwaspCrsExclusionEntrySelectorMatchOperatorEquals OwaspCrsExclusionEntrySelectorMatchOperator = "Equals" - OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny OwaspCrsExclusionEntrySelectorMatchOperator = "EqualsAny" - OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith OwaspCrsExclusionEntrySelectorMatchOperator = "StartsWith" -) - -// PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues returns the possible values for the OwaspCrsExclusionEntrySelectorMatchOperator const type. -func PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues() []OwaspCrsExclusionEntrySelectorMatchOperator { - return []OwaspCrsExclusionEntrySelectorMatchOperator{ - OwaspCrsExclusionEntrySelectorMatchOperatorContains, - OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith, - OwaspCrsExclusionEntrySelectorMatchOperatorEquals, - OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny, - OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith, - } -} - -// PacketCaptureTargetType - Target type of the resource provided. -type PacketCaptureTargetType string - -const ( - PacketCaptureTargetTypeAzureVM PacketCaptureTargetType = "AzureVM" - PacketCaptureTargetTypeAzureVMSS PacketCaptureTargetType = "AzureVMSS" -) - -// PossiblePacketCaptureTargetTypeValues returns the possible values for the PacketCaptureTargetType const type. -func PossiblePacketCaptureTargetTypeValues() []PacketCaptureTargetType { - return []PacketCaptureTargetType{ - PacketCaptureTargetTypeAzureVM, - PacketCaptureTargetTypeAzureVMSS, - } -} - -type PcError string - -const ( - PcErrorAgentStopped PcError = "AgentStopped" - PcErrorCaptureFailed PcError = "CaptureFailed" - PcErrorInternalError PcError = "InternalError" - PcErrorLocalFileFailed PcError = "LocalFileFailed" - PcErrorStorageFailed PcError = "StorageFailed" -) - -// PossiblePcErrorValues returns the possible values for the PcError const type. -func PossiblePcErrorValues() []PcError { - return []PcError{ - PcErrorAgentStopped, - PcErrorCaptureFailed, - PcErrorInternalError, - PcErrorLocalFileFailed, - PcErrorStorageFailed, - } -} - -// PcProtocol - Protocol to be filtered on. -type PcProtocol string - -const ( - PcProtocolAny PcProtocol = "Any" - PcProtocolTCP PcProtocol = "TCP" - PcProtocolUDP PcProtocol = "UDP" -) - -// PossiblePcProtocolValues returns the possible values for the PcProtocol const type. -func PossiblePcProtocolValues() []PcProtocol { - return []PcProtocol{ - PcProtocolAny, - PcProtocolTCP, - PcProtocolUDP, - } -} - -// PcStatus - The status of the packet capture session. -type PcStatus string - -const ( - PcStatusError PcStatus = "Error" - PcStatusNotStarted PcStatus = "NotStarted" - PcStatusRunning PcStatus = "Running" - PcStatusStopped PcStatus = "Stopped" - PcStatusUnknown PcStatus = "Unknown" -) - -// PossiblePcStatusValues returns the possible values for the PcStatus const type. -func PossiblePcStatusValues() []PcStatus { - return []PcStatus{ - PcStatusError, - PcStatusNotStarted, - PcStatusRunning, - PcStatusStopped, - PcStatusUnknown, - } -} - -// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. -type PfsGroup string - -const ( - PfsGroupECP256 PfsGroup = "ECP256" - PfsGroupECP384 PfsGroup = "ECP384" - PfsGroupNone PfsGroup = "None" - PfsGroupPFS1 PfsGroup = "PFS1" - PfsGroupPFS14 PfsGroup = "PFS14" - PfsGroupPFS2 PfsGroup = "PFS2" - PfsGroupPFS2048 PfsGroup = "PFS2048" - PfsGroupPFS24 PfsGroup = "PFS24" - PfsGroupPFSMM PfsGroup = "PFSMM" -) - -// PossiblePfsGroupValues returns the possible values for the PfsGroup const type. -func PossiblePfsGroupValues() []PfsGroup { - return []PfsGroup{ - PfsGroupECP256, - PfsGroupECP384, - PfsGroupNone, - PfsGroupPFS1, - PfsGroupPFS14, - PfsGroupPFS2, - PfsGroupPFS2048, - PfsGroupPFS24, - PfsGroupPFSMM, - } -} - -// PreferredIPVersion - The preferred IP version to use in test evaluation. The connection monitor may choose to use a different -// version depending on other parameters. -type PreferredIPVersion string - -const ( - PreferredIPVersionIPv4 PreferredIPVersion = "IPv4" - PreferredIPVersionIPv6 PreferredIPVersion = "IPv6" -) - -// PossiblePreferredIPVersionValues returns the possible values for the PreferredIPVersion const type. -func PossiblePreferredIPVersionValues() []PreferredIPVersion { - return []PreferredIPVersion{ - PreferredIPVersionIPv4, - PreferredIPVersionIPv6, - } -} - -// PreferredRoutingGateway - The preferred routing gateway types -type PreferredRoutingGateway string - -const ( - PreferredRoutingGatewayExpressRoute PreferredRoutingGateway = "ExpressRoute" - PreferredRoutingGatewayNone PreferredRoutingGateway = "None" - PreferredRoutingGatewayVPNGateway PreferredRoutingGateway = "VpnGateway" -) - -// PossiblePreferredRoutingGatewayValues returns the possible values for the PreferredRoutingGateway const type. -func PossiblePreferredRoutingGatewayValues() []PreferredRoutingGateway { - return []PreferredRoutingGateway{ - PreferredRoutingGatewayExpressRoute, - PreferredRoutingGatewayNone, - PreferredRoutingGatewayVPNGateway, - } -} - -// ProbeProtocol - The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. -// If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required -// for the probe to be successful. -type ProbeProtocol string - -const ( - ProbeProtocolHTTP ProbeProtocol = "Http" - ProbeProtocolHTTPS ProbeProtocol = "Https" - ProbeProtocolTCP ProbeProtocol = "Tcp" -) - -// PossibleProbeProtocolValues returns the possible values for the ProbeProtocol const type. -func PossibleProbeProtocolValues() []ProbeProtocol { - return []ProbeProtocol{ - ProbeProtocolHTTP, - ProbeProtocolHTTPS, - ProbeProtocolTCP, - } -} - -// ProcessorArchitecture - VPN client Processor Architecture. -type ProcessorArchitecture string - -const ( - ProcessorArchitectureAmd64 ProcessorArchitecture = "Amd64" - ProcessorArchitectureX86 ProcessorArchitecture = "X86" -) - -// PossibleProcessorArchitectureValues returns the possible values for the ProcessorArchitecture const type. -func PossibleProcessorArchitectureValues() []ProcessorArchitecture { - return []ProcessorArchitecture{ - ProcessorArchitectureAmd64, - ProcessorArchitectureX86, - } -} - -// Protocol - Network protocol. -type Protocol string - -const ( - ProtocolHTTP Protocol = "Http" - ProtocolHTTPS Protocol = "Https" - ProtocolIcmp Protocol = "Icmp" - ProtocolTCP Protocol = "Tcp" -) - -// PossibleProtocolValues returns the possible values for the Protocol const type. -func PossibleProtocolValues() []Protocol { - return []Protocol{ - ProtocolHTTP, - ProtocolHTTPS, - ProtocolIcmp, - ProtocolTCP, - } -} - -// ProtocolType - RNM supported protocol types. -type ProtocolType string - -const ( - ProtocolTypeAh ProtocolType = "Ah" - ProtocolTypeAll ProtocolType = "All" - ProtocolTypeDoNotUse ProtocolType = "DoNotUse" - ProtocolTypeEsp ProtocolType = "Esp" - ProtocolTypeGre ProtocolType = "Gre" - ProtocolTypeIcmp ProtocolType = "Icmp" - ProtocolTypeTCP ProtocolType = "Tcp" - ProtocolTypeUDP ProtocolType = "Udp" - ProtocolTypeVxlan ProtocolType = "Vxlan" -) - -// PossibleProtocolTypeValues returns the possible values for the ProtocolType const type. -func PossibleProtocolTypeValues() []ProtocolType { - return []ProtocolType{ - ProtocolTypeAh, - ProtocolTypeAll, - ProtocolTypeDoNotUse, - ProtocolTypeEsp, - ProtocolTypeGre, - ProtocolTypeIcmp, - ProtocolTypeTCP, - ProtocolTypeUDP, - ProtocolTypeVxlan, - } -} - -// ProvisioningState - The current provisioning state. -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateDeleting, - ProvisioningStateFailed, - ProvisioningStateSucceeded, - ProvisioningStateUpdating, - } -} - -// PublicIPAddressMigrationPhase - Migration phase of Public IP Address. -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -// PossiblePublicIPAddressMigrationPhaseValues returns the possible values for the PublicIPAddressMigrationPhase const type. -func PossiblePublicIPAddressMigrationPhaseValues() []PublicIPAddressMigrationPhase { - return []PublicIPAddressMigrationPhase{ - PublicIPAddressMigrationPhaseAbort, - PublicIPAddressMigrationPhaseCommit, - PublicIPAddressMigrationPhaseCommitted, - PublicIPAddressMigrationPhaseNone, - PublicIPAddressMigrationPhasePrepare, - } -} - -// PublicIPAddressSKUName - Name of a public IP address SKU. -type PublicIPAddressSKUName string - -const ( - PublicIPAddressSKUNameBasic PublicIPAddressSKUName = "Basic" - PublicIPAddressSKUNameStandard PublicIPAddressSKUName = "Standard" -) - -// PossiblePublicIPAddressSKUNameValues returns the possible values for the PublicIPAddressSKUName const type. -func PossiblePublicIPAddressSKUNameValues() []PublicIPAddressSKUName { - return []PublicIPAddressSKUName{ - PublicIPAddressSKUNameBasic, - PublicIPAddressSKUNameStandard, - } -} - -// PublicIPAddressSKUTier - Tier of a public IP address SKU. -type PublicIPAddressSKUTier string - -const ( - PublicIPAddressSKUTierGlobal PublicIPAddressSKUTier = "Global" - PublicIPAddressSKUTierRegional PublicIPAddressSKUTier = "Regional" -) - -// PossiblePublicIPAddressSKUTierValues returns the possible values for the PublicIPAddressSKUTier const type. -func PossiblePublicIPAddressSKUTierValues() []PublicIPAddressSKUTier { - return []PublicIPAddressSKUTier{ - PublicIPAddressSKUTierGlobal, - PublicIPAddressSKUTierRegional, - } -} - -// PublicIPPrefixSKUName - Name of a public IP prefix SKU. -type PublicIPPrefixSKUName string - -const ( - PublicIPPrefixSKUNameStandard PublicIPPrefixSKUName = "Standard" -) - -// PossiblePublicIPPrefixSKUNameValues returns the possible values for the PublicIPPrefixSKUName const type. -func PossiblePublicIPPrefixSKUNameValues() []PublicIPPrefixSKUName { - return []PublicIPPrefixSKUName{ - PublicIPPrefixSKUNameStandard, - } -} - -// PublicIPPrefixSKUTier - Tier of a public IP prefix SKU. -type PublicIPPrefixSKUTier string - -const ( - PublicIPPrefixSKUTierGlobal PublicIPPrefixSKUTier = "Global" - PublicIPPrefixSKUTierRegional PublicIPPrefixSKUTier = "Regional" -) - -// PossiblePublicIPPrefixSKUTierValues returns the possible values for the PublicIPPrefixSKUTier const type. -func PossiblePublicIPPrefixSKUTierValues() []PublicIPPrefixSKUTier { - return []PublicIPPrefixSKUTier{ - PublicIPPrefixSKUTierGlobal, - PublicIPPrefixSKUTierRegional, - } -} - -// ResourceIdentityType - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both -// an implicitly created identity and a set of user assigned identities. The type 'None' will remove any -// identities from the virtual machine. -type ResourceIdentityType string - -const ( - ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" - ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" - ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" - ResourceIdentityTypeNone ResourceIdentityType = "None" -) - -// PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type. -func PossibleResourceIdentityTypeValues() []ResourceIdentityType { - return []ResourceIdentityType{ - ResourceIdentityTypeSystemAssigned, - ResourceIdentityTypeUserAssigned, - ResourceIdentityTypeSystemAssignedUserAssigned, - ResourceIdentityTypeNone, - } -} - -// RouteFilterRuleType - The rule type of the rule. -type RouteFilterRuleType string - -const ( - RouteFilterRuleTypeCommunity RouteFilterRuleType = "Community" -) - -// PossibleRouteFilterRuleTypeValues returns the possible values for the RouteFilterRuleType const type. -func PossibleRouteFilterRuleTypeValues() []RouteFilterRuleType { - return []RouteFilterRuleType{ - RouteFilterRuleTypeCommunity, - } -} - -// RouteNextHopType - The type of Azure hop the packet should be sent to. -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -// PossibleRouteNextHopTypeValues returns the possible values for the RouteNextHopType const type. -func PossibleRouteNextHopTypeValues() []RouteNextHopType { - return []RouteNextHopType{ - RouteNextHopTypeInternet, - RouteNextHopTypeNone, - RouteNextHopTypeVirtualAppliance, - RouteNextHopTypeVirtualNetworkGateway, - RouteNextHopTypeVnetLocal, - } -} - -// RoutingState - The current routing state of the VirtualHub. -type RoutingState string - -const ( - RoutingStateFailed RoutingState = "Failed" - RoutingStateNone RoutingState = "None" - RoutingStateProvisioned RoutingState = "Provisioned" - RoutingStateProvisioning RoutingState = "Provisioning" -) - -// PossibleRoutingStateValues returns the possible values for the RoutingState const type. -func PossibleRoutingStateValues() []RoutingState { - return []RoutingState{ - RoutingStateFailed, - RoutingStateNone, - RoutingStateProvisioned, - RoutingStateProvisioning, - } -} - -// ScopeConnectionState - The current scope connection state. -type ScopeConnectionState string - -const ( - ScopeConnectionStateConflict ScopeConnectionState = "Conflict" - ScopeConnectionStateConnected ScopeConnectionState = "Connected" - ScopeConnectionStatePending ScopeConnectionState = "Pending" - ScopeConnectionStateRejected ScopeConnectionState = "Rejected" - ScopeConnectionStateRevoked ScopeConnectionState = "Revoked" -) - -// PossibleScopeConnectionStateValues returns the possible values for the ScopeConnectionState const type. -func PossibleScopeConnectionStateValues() []ScopeConnectionState { - return []ScopeConnectionState{ - ScopeConnectionStateConflict, - ScopeConnectionStateConnected, - ScopeConnectionStatePending, - ScopeConnectionStateRejected, - ScopeConnectionStateRevoked, - } -} - -// SecurityConfigurationRuleAccess - Whether network traffic is allowed or denied. -type SecurityConfigurationRuleAccess string - -const ( - SecurityConfigurationRuleAccessAllow SecurityConfigurationRuleAccess = "Allow" - SecurityConfigurationRuleAccessAlwaysAllow SecurityConfigurationRuleAccess = "AlwaysAllow" - SecurityConfigurationRuleAccessDeny SecurityConfigurationRuleAccess = "Deny" -) - -// PossibleSecurityConfigurationRuleAccessValues returns the possible values for the SecurityConfigurationRuleAccess const type. -func PossibleSecurityConfigurationRuleAccessValues() []SecurityConfigurationRuleAccess { - return []SecurityConfigurationRuleAccess{ - SecurityConfigurationRuleAccessAllow, - SecurityConfigurationRuleAccessAlwaysAllow, - SecurityConfigurationRuleAccessDeny, - } -} - -// SecurityConfigurationRuleDirection - The direction of the rule. The direction specifies if the rule will be evaluated on -// incoming or outgoing traffic. -type SecurityConfigurationRuleDirection string - -const ( - SecurityConfigurationRuleDirectionInbound SecurityConfigurationRuleDirection = "Inbound" - SecurityConfigurationRuleDirectionOutbound SecurityConfigurationRuleDirection = "Outbound" -) - -// PossibleSecurityConfigurationRuleDirectionValues returns the possible values for the SecurityConfigurationRuleDirection const type. -func PossibleSecurityConfigurationRuleDirectionValues() []SecurityConfigurationRuleDirection { - return []SecurityConfigurationRuleDirection{ - SecurityConfigurationRuleDirectionInbound, - SecurityConfigurationRuleDirectionOutbound, - } -} - -// SecurityConfigurationRuleProtocol - Network protocol this rule applies to. -type SecurityConfigurationRuleProtocol string - -const ( - SecurityConfigurationRuleProtocolAh SecurityConfigurationRuleProtocol = "Ah" - SecurityConfigurationRuleProtocolAny SecurityConfigurationRuleProtocol = "Any" - SecurityConfigurationRuleProtocolEsp SecurityConfigurationRuleProtocol = "Esp" - SecurityConfigurationRuleProtocolIcmp SecurityConfigurationRuleProtocol = "Icmp" - SecurityConfigurationRuleProtocolTCP SecurityConfigurationRuleProtocol = "Tcp" - SecurityConfigurationRuleProtocolUDP SecurityConfigurationRuleProtocol = "Udp" -) - -// PossibleSecurityConfigurationRuleProtocolValues returns the possible values for the SecurityConfigurationRuleProtocol const type. -func PossibleSecurityConfigurationRuleProtocolValues() []SecurityConfigurationRuleProtocol { - return []SecurityConfigurationRuleProtocol{ - SecurityConfigurationRuleProtocolAh, - SecurityConfigurationRuleProtocolAny, - SecurityConfigurationRuleProtocolEsp, - SecurityConfigurationRuleProtocolIcmp, - SecurityConfigurationRuleProtocolTCP, - SecurityConfigurationRuleProtocolUDP, - } -} - -// SecurityPartnerProviderConnectionStatus - The current state of the connection with Security Partner Provider. -type SecurityPartnerProviderConnectionStatus string - -const ( - SecurityPartnerProviderConnectionStatusConnected SecurityPartnerProviderConnectionStatus = "Connected" - SecurityPartnerProviderConnectionStatusNotConnected SecurityPartnerProviderConnectionStatus = "NotConnected" - SecurityPartnerProviderConnectionStatusPartiallyConnected SecurityPartnerProviderConnectionStatus = "PartiallyConnected" - SecurityPartnerProviderConnectionStatusUnknown SecurityPartnerProviderConnectionStatus = "Unknown" -) - -// PossibleSecurityPartnerProviderConnectionStatusValues returns the possible values for the SecurityPartnerProviderConnectionStatus const type. -func PossibleSecurityPartnerProviderConnectionStatusValues() []SecurityPartnerProviderConnectionStatus { - return []SecurityPartnerProviderConnectionStatus{ - SecurityPartnerProviderConnectionStatusConnected, - SecurityPartnerProviderConnectionStatusNotConnected, - SecurityPartnerProviderConnectionStatusPartiallyConnected, - SecurityPartnerProviderConnectionStatusUnknown, - } -} - -// SecurityProviderName - The Security Providers. -type SecurityProviderName string - -const ( - SecurityProviderNameCheckpoint SecurityProviderName = "Checkpoint" - SecurityProviderNameIBoss SecurityProviderName = "IBoss" - SecurityProviderNameZScaler SecurityProviderName = "ZScaler" -) - -// PossibleSecurityProviderNameValues returns the possible values for the SecurityProviderName const type. -func PossibleSecurityProviderNameValues() []SecurityProviderName { - return []SecurityProviderName{ - SecurityProviderNameCheckpoint, - SecurityProviderNameIBoss, - SecurityProviderNameZScaler, - } -} - -// SecurityRuleAccess - Whether network traffic is allowed or denied. -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -// PossibleSecurityRuleAccessValues returns the possible values for the SecurityRuleAccess const type. -func PossibleSecurityRuleAccessValues() []SecurityRuleAccess { - return []SecurityRuleAccess{ - SecurityRuleAccessAllow, - SecurityRuleAccessDeny, - } -} - -// SecurityRuleDirection - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing -// traffic. -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -// PossibleSecurityRuleDirectionValues returns the possible values for the SecurityRuleDirection const type. -func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection { - return []SecurityRuleDirection{ - SecurityRuleDirectionInbound, - SecurityRuleDirectionOutbound, - } -} - -// SecurityRuleProtocol - Network protocol this rule applies to. -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp" -) - -// PossibleSecurityRuleProtocolValues returns the possible values for the SecurityRuleProtocol const type. -func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol { - return []SecurityRuleProtocol{ - SecurityRuleProtocolAh, - SecurityRuleProtocolAsterisk, - SecurityRuleProtocolEsp, - SecurityRuleProtocolIcmp, - SecurityRuleProtocolTCP, - SecurityRuleProtocolUDP, - } -} - -// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. -type ServiceProviderProvisioningState string - -const ( - ServiceProviderProvisioningStateDeprovisioning ServiceProviderProvisioningState = "Deprovisioning" - ServiceProviderProvisioningStateNotProvisioned ServiceProviderProvisioningState = "NotProvisioned" - ServiceProviderProvisioningStateProvisioned ServiceProviderProvisioningState = "Provisioned" - ServiceProviderProvisioningStateProvisioning ServiceProviderProvisioningState = "Provisioning" -) - -// PossibleServiceProviderProvisioningStateValues returns the possible values for the ServiceProviderProvisioningState const type. -func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState { - return []ServiceProviderProvisioningState{ - ServiceProviderProvisioningStateDeprovisioning, - ServiceProviderProvisioningStateNotProvisioned, - ServiceProviderProvisioningStateProvisioned, - ServiceProviderProvisioningStateProvisioning, - } -} - -// Severity - The severity of the issue. -type Severity string - -const ( - SeverityError Severity = "Error" - SeverityWarning Severity = "Warning" -) - -// PossibleSeverityValues returns the possible values for the Severity const type. -func PossibleSeverityValues() []Severity { - return []Severity{ - SeverityError, - SeverityWarning, - } -} - -type SyncRemoteAddressSpace string - -const ( - SyncRemoteAddressSpaceTrue SyncRemoteAddressSpace = "true" -) - -// PossibleSyncRemoteAddressSpaceValues returns the possible values for the SyncRemoteAddressSpace const type. -func PossibleSyncRemoteAddressSpaceValues() []SyncRemoteAddressSpace { - return []SyncRemoteAddressSpace{ - SyncRemoteAddressSpaceTrue, - } -} - -// TransportProtocol - The transport protocol for the endpoint. -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTCP TransportProtocol = "Tcp" - TransportProtocolUDP TransportProtocol = "Udp" -) - -// PossibleTransportProtocolValues returns the possible values for the TransportProtocol const type. -func PossibleTransportProtocolValues() []TransportProtocol { - return []TransportProtocol{ - TransportProtocolAll, - TransportProtocolTCP, - TransportProtocolUDP, - } -} - -// TunnelConnectionStatus - The current state of the tunnel. -type TunnelConnectionStatus string - -const ( - TunnelConnectionStatusConnected TunnelConnectionStatus = "Connected" - TunnelConnectionStatusConnecting TunnelConnectionStatus = "Connecting" - TunnelConnectionStatusNotConnected TunnelConnectionStatus = "NotConnected" - TunnelConnectionStatusUnknown TunnelConnectionStatus = "Unknown" -) - -// PossibleTunnelConnectionStatusValues returns the possible values for the TunnelConnectionStatus const type. -func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus { - return []TunnelConnectionStatus{ - TunnelConnectionStatusConnected, - TunnelConnectionStatusConnecting, - TunnelConnectionStatusNotConnected, - TunnelConnectionStatusUnknown, - } -} - -// UsageUnit - An enum describing the unit of measurement. -type UsageUnit string - -const ( - UsageUnitCount UsageUnit = "Count" -) - -// PossibleUsageUnitValues returns the possible values for the UsageUnit const type. -func PossibleUsageUnitValues() []UsageUnit { - return []UsageUnit{ - UsageUnitCount, - } -} - -// UseHubGateway - Flag if need to use hub gateway. -type UseHubGateway string - -const ( - UseHubGatewayFalse UseHubGateway = "False" - UseHubGatewayTrue UseHubGateway = "True" -) - -// PossibleUseHubGatewayValues returns the possible values for the UseHubGateway const type. -func PossibleUseHubGatewayValues() []UseHubGateway { - return []UseHubGateway{ - UseHubGatewayFalse, - UseHubGatewayTrue, - } -} - -// VPNAuthenticationType - VPN authentication types enabled for the virtual network gateway. -type VPNAuthenticationType string - -const ( - VPNAuthenticationTypeAAD VPNAuthenticationType = "AAD" - VPNAuthenticationTypeCertificate VPNAuthenticationType = "Certificate" - VPNAuthenticationTypeRadius VPNAuthenticationType = "Radius" -) - -// PossibleVPNAuthenticationTypeValues returns the possible values for the VPNAuthenticationType const type. -func PossibleVPNAuthenticationTypeValues() []VPNAuthenticationType { - return []VPNAuthenticationType{ - VPNAuthenticationTypeAAD, - VPNAuthenticationTypeCertificate, - VPNAuthenticationTypeRadius, - } -} - -// VPNClientProtocol - VPN client protocol enabled for the virtual network gateway. -type VPNClientProtocol string - -const ( - VPNClientProtocolIkeV2 VPNClientProtocol = "IkeV2" - VPNClientProtocolOpenVPN VPNClientProtocol = "OpenVPN" - VPNClientProtocolSSTP VPNClientProtocol = "SSTP" -) - -// PossibleVPNClientProtocolValues returns the possible values for the VPNClientProtocol const type. -func PossibleVPNClientProtocolValues() []VPNClientProtocol { - return []VPNClientProtocol{ - VPNClientProtocolIkeV2, - VPNClientProtocolOpenVPN, - VPNClientProtocolSSTP, - } -} - -// VPNConnectionStatus - The current state of the vpn connection. -type VPNConnectionStatus string - -const ( - VPNConnectionStatusConnected VPNConnectionStatus = "Connected" - VPNConnectionStatusConnecting VPNConnectionStatus = "Connecting" - VPNConnectionStatusNotConnected VPNConnectionStatus = "NotConnected" - VPNConnectionStatusUnknown VPNConnectionStatus = "Unknown" -) - -// PossibleVPNConnectionStatusValues returns the possible values for the VPNConnectionStatus const type. -func PossibleVPNConnectionStatusValues() []VPNConnectionStatus { - return []VPNConnectionStatus{ - VPNConnectionStatusConnected, - VPNConnectionStatusConnecting, - VPNConnectionStatusNotConnected, - VPNConnectionStatusUnknown, - } -} - -// VPNGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. -type VPNGatewayGeneration string - -const ( - VPNGatewayGenerationGeneration1 VPNGatewayGeneration = "Generation1" - VPNGatewayGenerationGeneration2 VPNGatewayGeneration = "Generation2" - VPNGatewayGenerationNone VPNGatewayGeneration = "None" -) - -// PossibleVPNGatewayGenerationValues returns the possible values for the VPNGatewayGeneration const type. -func PossibleVPNGatewayGenerationValues() []VPNGatewayGeneration { - return []VPNGatewayGeneration{ - VPNGatewayGenerationGeneration1, - VPNGatewayGenerationGeneration2, - VPNGatewayGenerationNone, - } -} - -// VPNGatewayTunnelingProtocol - VPN protocol enabled for the VpnServerConfiguration. -type VPNGatewayTunnelingProtocol string - -const ( - VPNGatewayTunnelingProtocolIkeV2 VPNGatewayTunnelingProtocol = "IkeV2" - VPNGatewayTunnelingProtocolOpenVPN VPNGatewayTunnelingProtocol = "OpenVPN" -) - -// PossibleVPNGatewayTunnelingProtocolValues returns the possible values for the VPNGatewayTunnelingProtocol const type. -func PossibleVPNGatewayTunnelingProtocolValues() []VPNGatewayTunnelingProtocol { - return []VPNGatewayTunnelingProtocol{ - VPNGatewayTunnelingProtocolIkeV2, - VPNGatewayTunnelingProtocolOpenVPN, - } -} - -// VPNLinkConnectionMode - Vpn link connection mode. -type VPNLinkConnectionMode string - -const ( - VPNLinkConnectionModeDefault VPNLinkConnectionMode = "Default" - VPNLinkConnectionModeInitiatorOnly VPNLinkConnectionMode = "InitiatorOnly" - VPNLinkConnectionModeResponderOnly VPNLinkConnectionMode = "ResponderOnly" -) - -// PossibleVPNLinkConnectionModeValues returns the possible values for the VPNLinkConnectionMode const type. -func PossibleVPNLinkConnectionModeValues() []VPNLinkConnectionMode { - return []VPNLinkConnectionMode{ - VPNLinkConnectionModeDefault, - VPNLinkConnectionModeInitiatorOnly, - VPNLinkConnectionModeResponderOnly, - } -} - -// VPNNatRuleMode - The Source NAT direction of a VPN NAT. -type VPNNatRuleMode string - -const ( - VPNNatRuleModeEgressSnat VPNNatRuleMode = "EgressSnat" - VPNNatRuleModeIngressSnat VPNNatRuleMode = "IngressSnat" -) - -// PossibleVPNNatRuleModeValues returns the possible values for the VPNNatRuleMode const type. -func PossibleVPNNatRuleModeValues() []VPNNatRuleMode { - return []VPNNatRuleMode{ - VPNNatRuleModeEgressSnat, - VPNNatRuleModeIngressSnat, - } -} - -// VPNNatRuleType - The type of NAT rule for VPN NAT. -type VPNNatRuleType string - -const ( - VPNNatRuleTypeDynamic VPNNatRuleType = "Dynamic" - VPNNatRuleTypeStatic VPNNatRuleType = "Static" -) - -// PossibleVPNNatRuleTypeValues returns the possible values for the VPNNatRuleType const type. -func PossibleVPNNatRuleTypeValues() []VPNNatRuleType { - return []VPNNatRuleType{ - VPNNatRuleTypeDynamic, - VPNNatRuleTypeStatic, - } -} - -// VPNPolicyMemberAttributeType - The Vpn Policy member attribute type. -type VPNPolicyMemberAttributeType string - -const ( - VPNPolicyMemberAttributeTypeAADGroupID VPNPolicyMemberAttributeType = "AADGroupId" - VPNPolicyMemberAttributeTypeCertificateGroupID VPNPolicyMemberAttributeType = "CertificateGroupId" - VPNPolicyMemberAttributeTypeRadiusAzureGroupID VPNPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -// PossibleVPNPolicyMemberAttributeTypeValues returns the possible values for the VPNPolicyMemberAttributeType const type. -func PossibleVPNPolicyMemberAttributeTypeValues() []VPNPolicyMemberAttributeType { - return []VPNPolicyMemberAttributeType{ - VPNPolicyMemberAttributeTypeAADGroupID, - VPNPolicyMemberAttributeTypeCertificateGroupID, - VPNPolicyMemberAttributeTypeRadiusAzureGroupID, - } -} - -// VPNType - The type of this virtual network gateway. -type VPNType string - -const ( - VPNTypePolicyBased VPNType = "PolicyBased" - VPNTypeRouteBased VPNType = "RouteBased" -) - -// PossibleVPNTypeValues returns the possible values for the VPNType const type. -func PossibleVPNTypeValues() []VPNType { - return []VPNType{ - VPNTypePolicyBased, - VPNTypeRouteBased, - } -} - -// VerbosityLevel - Verbosity level. -type VerbosityLevel string - -const ( - VerbosityLevelFull VerbosityLevel = "Full" - VerbosityLevelMinimum VerbosityLevel = "Minimum" - VerbosityLevelNormal VerbosityLevel = "Normal" -) - -// PossibleVerbosityLevelValues returns the possible values for the VerbosityLevel const type. -func PossibleVerbosityLevelValues() []VerbosityLevel { - return []VerbosityLevel{ - VerbosityLevelFull, - VerbosityLevelMinimum, - VerbosityLevelNormal, - } -} - -// VirtualNetworkEncryptionEnforcement - If the encrypted VNet allows VM that does not support encryption -type VirtualNetworkEncryptionEnforcement string - -const ( - VirtualNetworkEncryptionEnforcementAllowUnencrypted VirtualNetworkEncryptionEnforcement = "AllowUnencrypted" - VirtualNetworkEncryptionEnforcementDropUnencrypted VirtualNetworkEncryptionEnforcement = "DropUnencrypted" -) - -// PossibleVirtualNetworkEncryptionEnforcementValues returns the possible values for the VirtualNetworkEncryptionEnforcement const type. -func PossibleVirtualNetworkEncryptionEnforcementValues() []VirtualNetworkEncryptionEnforcement { - return []VirtualNetworkEncryptionEnforcement{ - VirtualNetworkEncryptionEnforcementAllowUnencrypted, - VirtualNetworkEncryptionEnforcementDropUnencrypted, - } -} - -// VirtualNetworkGatewayConnectionMode - Gateway connection type. -type VirtualNetworkGatewayConnectionMode string - -const ( - VirtualNetworkGatewayConnectionModeDefault VirtualNetworkGatewayConnectionMode = "Default" - VirtualNetworkGatewayConnectionModeInitiatorOnly VirtualNetworkGatewayConnectionMode = "InitiatorOnly" - VirtualNetworkGatewayConnectionModeResponderOnly VirtualNetworkGatewayConnectionMode = "ResponderOnly" -) - -// PossibleVirtualNetworkGatewayConnectionModeValues returns the possible values for the VirtualNetworkGatewayConnectionMode const type. -func PossibleVirtualNetworkGatewayConnectionModeValues() []VirtualNetworkGatewayConnectionMode { - return []VirtualNetworkGatewayConnectionMode{ - VirtualNetworkGatewayConnectionModeDefault, - VirtualNetworkGatewayConnectionModeInitiatorOnly, - VirtualNetworkGatewayConnectionModeResponderOnly, - } -} - -// VirtualNetworkGatewayConnectionProtocol - Gateway connection protocol. -type VirtualNetworkGatewayConnectionProtocol string - -const ( - VirtualNetworkGatewayConnectionProtocolIKEv1 VirtualNetworkGatewayConnectionProtocol = "IKEv1" - VirtualNetworkGatewayConnectionProtocolIKEv2 VirtualNetworkGatewayConnectionProtocol = "IKEv2" -) - -// PossibleVirtualNetworkGatewayConnectionProtocolValues returns the possible values for the VirtualNetworkGatewayConnectionProtocol const type. -func PossibleVirtualNetworkGatewayConnectionProtocolValues() []VirtualNetworkGatewayConnectionProtocol { - return []VirtualNetworkGatewayConnectionProtocol{ - VirtualNetworkGatewayConnectionProtocolIKEv1, - VirtualNetworkGatewayConnectionProtocolIKEv2, - } -} - -// VirtualNetworkGatewayConnectionStatus - Virtual Network Gateway connection status. -type VirtualNetworkGatewayConnectionStatus string - -const ( - VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" - VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" - VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" - VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" -) - -// PossibleVirtualNetworkGatewayConnectionStatusValues returns the possible values for the VirtualNetworkGatewayConnectionStatus const type. -func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus { - return []VirtualNetworkGatewayConnectionStatus{ - VirtualNetworkGatewayConnectionStatusConnected, - VirtualNetworkGatewayConnectionStatusConnecting, - VirtualNetworkGatewayConnectionStatusNotConnected, - VirtualNetworkGatewayConnectionStatusUnknown, - } -} - -// VirtualNetworkGatewayConnectionType - Gateway connection type. -type VirtualNetworkGatewayConnectionType string - -const ( - VirtualNetworkGatewayConnectionTypeExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" - VirtualNetworkGatewayConnectionTypeIPsec VirtualNetworkGatewayConnectionType = "IPsec" - VirtualNetworkGatewayConnectionTypeVPNClient VirtualNetworkGatewayConnectionType = "VPNClient" - VirtualNetworkGatewayConnectionTypeVnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" -) - -// PossibleVirtualNetworkGatewayConnectionTypeValues returns the possible values for the VirtualNetworkGatewayConnectionType const type. -func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType { - return []VirtualNetworkGatewayConnectionType{ - VirtualNetworkGatewayConnectionTypeExpressRoute, - VirtualNetworkGatewayConnectionTypeIPsec, - VirtualNetworkGatewayConnectionTypeVPNClient, - VirtualNetworkGatewayConnectionTypeVnet2Vnet, - } -} - -// VirtualNetworkGatewaySKUName - Gateway SKU name. -type VirtualNetworkGatewaySKUName string - -const ( - VirtualNetworkGatewaySKUNameBasic VirtualNetworkGatewaySKUName = "Basic" - VirtualNetworkGatewaySKUNameErGw1AZ VirtualNetworkGatewaySKUName = "ErGw1AZ" - VirtualNetworkGatewaySKUNameErGw2AZ VirtualNetworkGatewaySKUName = "ErGw2AZ" - VirtualNetworkGatewaySKUNameErGw3AZ VirtualNetworkGatewaySKUName = "ErGw3AZ" - VirtualNetworkGatewaySKUNameHighPerformance VirtualNetworkGatewaySKUName = "HighPerformance" - VirtualNetworkGatewaySKUNameStandard VirtualNetworkGatewaySKUName = "Standard" - VirtualNetworkGatewaySKUNameUltraPerformance VirtualNetworkGatewaySKUName = "UltraPerformance" - VirtualNetworkGatewaySKUNameVPNGw1 VirtualNetworkGatewaySKUName = "VpnGw1" - VirtualNetworkGatewaySKUNameVPNGw1AZ VirtualNetworkGatewaySKUName = "VpnGw1AZ" - VirtualNetworkGatewaySKUNameVPNGw2 VirtualNetworkGatewaySKUName = "VpnGw2" - VirtualNetworkGatewaySKUNameVPNGw2AZ VirtualNetworkGatewaySKUName = "VpnGw2AZ" - VirtualNetworkGatewaySKUNameVPNGw3 VirtualNetworkGatewaySKUName = "VpnGw3" - VirtualNetworkGatewaySKUNameVPNGw3AZ VirtualNetworkGatewaySKUName = "VpnGw3AZ" - VirtualNetworkGatewaySKUNameVPNGw4 VirtualNetworkGatewaySKUName = "VpnGw4" - VirtualNetworkGatewaySKUNameVPNGw4AZ VirtualNetworkGatewaySKUName = "VpnGw4AZ" - VirtualNetworkGatewaySKUNameVPNGw5 VirtualNetworkGatewaySKUName = "VpnGw5" - VirtualNetworkGatewaySKUNameVPNGw5AZ VirtualNetworkGatewaySKUName = "VpnGw5AZ" -) - -// PossibleVirtualNetworkGatewaySKUNameValues returns the possible values for the VirtualNetworkGatewaySKUName const type. -func PossibleVirtualNetworkGatewaySKUNameValues() []VirtualNetworkGatewaySKUName { - return []VirtualNetworkGatewaySKUName{ - VirtualNetworkGatewaySKUNameBasic, - VirtualNetworkGatewaySKUNameErGw1AZ, - VirtualNetworkGatewaySKUNameErGw2AZ, - VirtualNetworkGatewaySKUNameErGw3AZ, - VirtualNetworkGatewaySKUNameHighPerformance, - VirtualNetworkGatewaySKUNameStandard, - VirtualNetworkGatewaySKUNameUltraPerformance, - VirtualNetworkGatewaySKUNameVPNGw1, - VirtualNetworkGatewaySKUNameVPNGw1AZ, - VirtualNetworkGatewaySKUNameVPNGw2, - VirtualNetworkGatewaySKUNameVPNGw2AZ, - VirtualNetworkGatewaySKUNameVPNGw3, - VirtualNetworkGatewaySKUNameVPNGw3AZ, - VirtualNetworkGatewaySKUNameVPNGw4, - VirtualNetworkGatewaySKUNameVPNGw4AZ, - VirtualNetworkGatewaySKUNameVPNGw5, - VirtualNetworkGatewaySKUNameVPNGw5AZ, - } -} - -// VirtualNetworkGatewaySKUTier - Gateway SKU tier. -type VirtualNetworkGatewaySKUTier string - -const ( - VirtualNetworkGatewaySKUTierBasic VirtualNetworkGatewaySKUTier = "Basic" - VirtualNetworkGatewaySKUTierErGw1AZ VirtualNetworkGatewaySKUTier = "ErGw1AZ" - VirtualNetworkGatewaySKUTierErGw2AZ VirtualNetworkGatewaySKUTier = "ErGw2AZ" - VirtualNetworkGatewaySKUTierErGw3AZ VirtualNetworkGatewaySKUTier = "ErGw3AZ" - VirtualNetworkGatewaySKUTierHighPerformance VirtualNetworkGatewaySKUTier = "HighPerformance" - VirtualNetworkGatewaySKUTierStandard VirtualNetworkGatewaySKUTier = "Standard" - VirtualNetworkGatewaySKUTierUltraPerformance VirtualNetworkGatewaySKUTier = "UltraPerformance" - VirtualNetworkGatewaySKUTierVPNGw1 VirtualNetworkGatewaySKUTier = "VpnGw1" - VirtualNetworkGatewaySKUTierVPNGw1AZ VirtualNetworkGatewaySKUTier = "VpnGw1AZ" - VirtualNetworkGatewaySKUTierVPNGw2 VirtualNetworkGatewaySKUTier = "VpnGw2" - VirtualNetworkGatewaySKUTierVPNGw2AZ VirtualNetworkGatewaySKUTier = "VpnGw2AZ" - VirtualNetworkGatewaySKUTierVPNGw3 VirtualNetworkGatewaySKUTier = "VpnGw3" - VirtualNetworkGatewaySKUTierVPNGw3AZ VirtualNetworkGatewaySKUTier = "VpnGw3AZ" - VirtualNetworkGatewaySKUTierVPNGw4 VirtualNetworkGatewaySKUTier = "VpnGw4" - VirtualNetworkGatewaySKUTierVPNGw4AZ VirtualNetworkGatewaySKUTier = "VpnGw4AZ" - VirtualNetworkGatewaySKUTierVPNGw5 VirtualNetworkGatewaySKUTier = "VpnGw5" - VirtualNetworkGatewaySKUTierVPNGw5AZ VirtualNetworkGatewaySKUTier = "VpnGw5AZ" -) - -// PossibleVirtualNetworkGatewaySKUTierValues returns the possible values for the VirtualNetworkGatewaySKUTier const type. -func PossibleVirtualNetworkGatewaySKUTierValues() []VirtualNetworkGatewaySKUTier { - return []VirtualNetworkGatewaySKUTier{ - VirtualNetworkGatewaySKUTierBasic, - VirtualNetworkGatewaySKUTierErGw1AZ, - VirtualNetworkGatewaySKUTierErGw2AZ, - VirtualNetworkGatewaySKUTierErGw3AZ, - VirtualNetworkGatewaySKUTierHighPerformance, - VirtualNetworkGatewaySKUTierStandard, - VirtualNetworkGatewaySKUTierUltraPerformance, - VirtualNetworkGatewaySKUTierVPNGw1, - VirtualNetworkGatewaySKUTierVPNGw1AZ, - VirtualNetworkGatewaySKUTierVPNGw2, - VirtualNetworkGatewaySKUTierVPNGw2AZ, - VirtualNetworkGatewaySKUTierVPNGw3, - VirtualNetworkGatewaySKUTierVPNGw3AZ, - VirtualNetworkGatewaySKUTierVPNGw4, - VirtualNetworkGatewaySKUTierVPNGw4AZ, - VirtualNetworkGatewaySKUTierVPNGw5, - VirtualNetworkGatewaySKUTierVPNGw5AZ, - } -} - -// VirtualNetworkGatewayType - The type of this virtual network gateway. -type VirtualNetworkGatewayType string - -const ( - VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" - VirtualNetworkGatewayTypeLocalGateway VirtualNetworkGatewayType = "LocalGateway" - VirtualNetworkGatewayTypeVPN VirtualNetworkGatewayType = "Vpn" -) - -// PossibleVirtualNetworkGatewayTypeValues returns the possible values for the VirtualNetworkGatewayType const type. -func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType { - return []VirtualNetworkGatewayType{ - VirtualNetworkGatewayTypeExpressRoute, - VirtualNetworkGatewayTypeLocalGateway, - VirtualNetworkGatewayTypeVPN, - } -} - -// VirtualNetworkPeeringLevel - The peering sync status of the virtual network peering. -type VirtualNetworkPeeringLevel string - -const ( - VirtualNetworkPeeringLevelFullyInSync VirtualNetworkPeeringLevel = "FullyInSync" - VirtualNetworkPeeringLevelLocalAndRemoteNotInSync VirtualNetworkPeeringLevel = "LocalAndRemoteNotInSync" - VirtualNetworkPeeringLevelLocalNotInSync VirtualNetworkPeeringLevel = "LocalNotInSync" - VirtualNetworkPeeringLevelRemoteNotInSync VirtualNetworkPeeringLevel = "RemoteNotInSync" -) - -// PossibleVirtualNetworkPeeringLevelValues returns the possible values for the VirtualNetworkPeeringLevel const type. -func PossibleVirtualNetworkPeeringLevelValues() []VirtualNetworkPeeringLevel { - return []VirtualNetworkPeeringLevel{ - VirtualNetworkPeeringLevelFullyInSync, - VirtualNetworkPeeringLevelLocalAndRemoteNotInSync, - VirtualNetworkPeeringLevelLocalNotInSync, - VirtualNetworkPeeringLevelRemoteNotInSync, - } -} - -// VirtualNetworkPeeringState - The status of the virtual network peering. -type VirtualNetworkPeeringState string - -const ( - VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected" - VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected" - VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated" -) - -// PossibleVirtualNetworkPeeringStateValues returns the possible values for the VirtualNetworkPeeringState const type. -func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState { - return []VirtualNetworkPeeringState{ - VirtualNetworkPeeringStateConnected, - VirtualNetworkPeeringStateDisconnected, - VirtualNetworkPeeringStateInitiated, - } -} - -// VirtualNetworkPrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet. -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -// PossibleVirtualNetworkPrivateEndpointNetworkPoliciesValues returns the possible values for the VirtualNetworkPrivateEndpointNetworkPolicies const type. -func PossibleVirtualNetworkPrivateEndpointNetworkPoliciesValues() []VirtualNetworkPrivateEndpointNetworkPolicies { - return []VirtualNetworkPrivateEndpointNetworkPolicies{ - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } -} - -// VirtualNetworkPrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the -// subnet. -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -// PossibleVirtualNetworkPrivateLinkServiceNetworkPoliciesValues returns the possible values for the VirtualNetworkPrivateLinkServiceNetworkPolicies const type. -func PossibleVirtualNetworkPrivateLinkServiceNetworkPoliciesValues() []VirtualNetworkPrivateLinkServiceNetworkPolicies { - return []VirtualNetworkPrivateLinkServiceNetworkPolicies{ - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } -} - -// VirtualWanSecurityProviderType - The virtual wan security provider type. -type VirtualWanSecurityProviderType string - -const ( - VirtualWanSecurityProviderTypeExternal VirtualWanSecurityProviderType = "External" - VirtualWanSecurityProviderTypeNative VirtualWanSecurityProviderType = "Native" -) - -// PossibleVirtualWanSecurityProviderTypeValues returns the possible values for the VirtualWanSecurityProviderType const type. -func PossibleVirtualWanSecurityProviderTypeValues() []VirtualWanSecurityProviderType { - return []VirtualWanSecurityProviderType{ - VirtualWanSecurityProviderTypeExternal, - VirtualWanSecurityProviderTypeNative, - } -} - -// WebApplicationFirewallAction - Type of Actions. -type WebApplicationFirewallAction string - -const ( - WebApplicationFirewallActionAllow WebApplicationFirewallAction = "Allow" - WebApplicationFirewallActionBlock WebApplicationFirewallAction = "Block" - WebApplicationFirewallActionLog WebApplicationFirewallAction = "Log" -) - -// PossibleWebApplicationFirewallActionValues returns the possible values for the WebApplicationFirewallAction const type. -func PossibleWebApplicationFirewallActionValues() []WebApplicationFirewallAction { - return []WebApplicationFirewallAction{ - WebApplicationFirewallActionAllow, - WebApplicationFirewallActionBlock, - WebApplicationFirewallActionLog, - } -} - -// WebApplicationFirewallEnabledState - The state of the policy. -type WebApplicationFirewallEnabledState string - -const ( - WebApplicationFirewallEnabledStateDisabled WebApplicationFirewallEnabledState = "Disabled" - WebApplicationFirewallEnabledStateEnabled WebApplicationFirewallEnabledState = "Enabled" -) - -// PossibleWebApplicationFirewallEnabledStateValues returns the possible values for the WebApplicationFirewallEnabledState const type. -func PossibleWebApplicationFirewallEnabledStateValues() []WebApplicationFirewallEnabledState { - return []WebApplicationFirewallEnabledState{ - WebApplicationFirewallEnabledStateDisabled, - WebApplicationFirewallEnabledStateEnabled, - } -} - -// WebApplicationFirewallMatchVariable - Match Variable. -type WebApplicationFirewallMatchVariable string - -const ( - WebApplicationFirewallMatchVariablePostArgs WebApplicationFirewallMatchVariable = "PostArgs" - WebApplicationFirewallMatchVariableQueryString WebApplicationFirewallMatchVariable = "QueryString" - WebApplicationFirewallMatchVariableRemoteAddr WebApplicationFirewallMatchVariable = "RemoteAddr" - WebApplicationFirewallMatchVariableRequestBody WebApplicationFirewallMatchVariable = "RequestBody" - WebApplicationFirewallMatchVariableRequestCookies WebApplicationFirewallMatchVariable = "RequestCookies" - WebApplicationFirewallMatchVariableRequestHeaders WebApplicationFirewallMatchVariable = "RequestHeaders" - WebApplicationFirewallMatchVariableRequestMethod WebApplicationFirewallMatchVariable = "RequestMethod" - WebApplicationFirewallMatchVariableRequestURI WebApplicationFirewallMatchVariable = "RequestUri" -) - -// PossibleWebApplicationFirewallMatchVariableValues returns the possible values for the WebApplicationFirewallMatchVariable const type. -func PossibleWebApplicationFirewallMatchVariableValues() []WebApplicationFirewallMatchVariable { - return []WebApplicationFirewallMatchVariable{ - WebApplicationFirewallMatchVariablePostArgs, - WebApplicationFirewallMatchVariableQueryString, - WebApplicationFirewallMatchVariableRemoteAddr, - WebApplicationFirewallMatchVariableRequestBody, - WebApplicationFirewallMatchVariableRequestCookies, - WebApplicationFirewallMatchVariableRequestHeaders, - WebApplicationFirewallMatchVariableRequestMethod, - WebApplicationFirewallMatchVariableRequestURI, - } -} - -// WebApplicationFirewallMode - The mode of the policy. -type WebApplicationFirewallMode string - -const ( - WebApplicationFirewallModeDetection WebApplicationFirewallMode = "Detection" - WebApplicationFirewallModePrevention WebApplicationFirewallMode = "Prevention" -) - -// PossibleWebApplicationFirewallModeValues returns the possible values for the WebApplicationFirewallMode const type. -func PossibleWebApplicationFirewallModeValues() []WebApplicationFirewallMode { - return []WebApplicationFirewallMode{ - WebApplicationFirewallModeDetection, - WebApplicationFirewallModePrevention, - } -} - -// WebApplicationFirewallOperator - The operator to be matched. -type WebApplicationFirewallOperator string - -const ( - WebApplicationFirewallOperatorAny WebApplicationFirewallOperator = "Any" - WebApplicationFirewallOperatorBeginsWith WebApplicationFirewallOperator = "BeginsWith" - WebApplicationFirewallOperatorContains WebApplicationFirewallOperator = "Contains" - WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith" - WebApplicationFirewallOperatorEqual WebApplicationFirewallOperator = "Equal" - WebApplicationFirewallOperatorGeoMatch WebApplicationFirewallOperator = "GeoMatch" - WebApplicationFirewallOperatorGreaterThan WebApplicationFirewallOperator = "GreaterThan" - WebApplicationFirewallOperatorGreaterThanOrEqual WebApplicationFirewallOperator = "GreaterThanOrEqual" - WebApplicationFirewallOperatorIPMatch WebApplicationFirewallOperator = "IPMatch" - WebApplicationFirewallOperatorLessThan WebApplicationFirewallOperator = "LessThan" - WebApplicationFirewallOperatorLessThanOrEqual WebApplicationFirewallOperator = "LessThanOrEqual" - WebApplicationFirewallOperatorRegex WebApplicationFirewallOperator = "Regex" -) - -// PossibleWebApplicationFirewallOperatorValues returns the possible values for the WebApplicationFirewallOperator const type. -func PossibleWebApplicationFirewallOperatorValues() []WebApplicationFirewallOperator { - return []WebApplicationFirewallOperator{ - WebApplicationFirewallOperatorAny, - WebApplicationFirewallOperatorBeginsWith, - WebApplicationFirewallOperatorContains, - WebApplicationFirewallOperatorEndsWith, - WebApplicationFirewallOperatorEqual, - WebApplicationFirewallOperatorGeoMatch, - WebApplicationFirewallOperatorGreaterThan, - WebApplicationFirewallOperatorGreaterThanOrEqual, - WebApplicationFirewallOperatorIPMatch, - WebApplicationFirewallOperatorLessThan, - WebApplicationFirewallOperatorLessThanOrEqual, - WebApplicationFirewallOperatorRegex, - } -} - -// WebApplicationFirewallPolicyResourceState - Resource status of the policy. -type WebApplicationFirewallPolicyResourceState string - -const ( - WebApplicationFirewallPolicyResourceStateCreating WebApplicationFirewallPolicyResourceState = "Creating" - WebApplicationFirewallPolicyResourceStateDeleting WebApplicationFirewallPolicyResourceState = "Deleting" - WebApplicationFirewallPolicyResourceStateDisabled WebApplicationFirewallPolicyResourceState = "Disabled" - WebApplicationFirewallPolicyResourceStateDisabling WebApplicationFirewallPolicyResourceState = "Disabling" - WebApplicationFirewallPolicyResourceStateEnabled WebApplicationFirewallPolicyResourceState = "Enabled" - WebApplicationFirewallPolicyResourceStateEnabling WebApplicationFirewallPolicyResourceState = "Enabling" -) - -// PossibleWebApplicationFirewallPolicyResourceStateValues returns the possible values for the WebApplicationFirewallPolicyResourceState const type. -func PossibleWebApplicationFirewallPolicyResourceStateValues() []WebApplicationFirewallPolicyResourceState { - return []WebApplicationFirewallPolicyResourceState{ - WebApplicationFirewallPolicyResourceStateCreating, - WebApplicationFirewallPolicyResourceStateDeleting, - WebApplicationFirewallPolicyResourceStateDisabled, - WebApplicationFirewallPolicyResourceStateDisabling, - WebApplicationFirewallPolicyResourceStateEnabled, - WebApplicationFirewallPolicyResourceStateEnabling, - } -} - -// WebApplicationFirewallRuleType - The rule type. -type WebApplicationFirewallRuleType string - -const ( - WebApplicationFirewallRuleTypeInvalid WebApplicationFirewallRuleType = "Invalid" - WebApplicationFirewallRuleTypeMatchRule WebApplicationFirewallRuleType = "MatchRule" -) - -// PossibleWebApplicationFirewallRuleTypeValues returns the possible values for the WebApplicationFirewallRuleType const type. -func PossibleWebApplicationFirewallRuleTypeValues() []WebApplicationFirewallRuleType { - return []WebApplicationFirewallRuleType{ - WebApplicationFirewallRuleTypeInvalid, - WebApplicationFirewallRuleTypeMatchRule, - } -} - -// WebApplicationFirewallTransform - Transforms applied before matching. -type WebApplicationFirewallTransform string - -const ( - WebApplicationFirewallTransformHTMLEntityDecode WebApplicationFirewallTransform = "HtmlEntityDecode" - WebApplicationFirewallTransformLowercase WebApplicationFirewallTransform = "Lowercase" - WebApplicationFirewallTransformRemoveNulls WebApplicationFirewallTransform = "RemoveNulls" - WebApplicationFirewallTransformTrim WebApplicationFirewallTransform = "Trim" - WebApplicationFirewallTransformURLDecode WebApplicationFirewallTransform = "UrlDecode" - WebApplicationFirewallTransformURLEncode WebApplicationFirewallTransform = "UrlEncode" -) - -// PossibleWebApplicationFirewallTransformValues returns the possible values for the WebApplicationFirewallTransform const type. -func PossibleWebApplicationFirewallTransformValues() []WebApplicationFirewallTransform { - return []WebApplicationFirewallTransform{ - WebApplicationFirewallTransformHTMLEntityDecode, - WebApplicationFirewallTransformLowercase, - WebApplicationFirewallTransformRemoveNulls, - WebApplicationFirewallTransformTrim, - WebApplicationFirewallTransformURLDecode, - WebApplicationFirewallTransformURLEncode, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/customipprefixes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/customipprefixes_client.go deleted file mode 100644 index 2edf1cda..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/customipprefixes_client.go +++ /dev/null @@ -1,429 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// CustomIPPrefixesClient contains the methods for the CustomIPPrefixes group. -// Don't use this type directly, use NewCustomIPPrefixesClient() instead. -type CustomIPPrefixesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewCustomIPPrefixesClient creates a new instance of CustomIPPrefixesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewCustomIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomIPPrefixesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &CustomIPPrefixesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a custom IP prefix. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// customIPPrefixName - The name of the custom IP prefix. -// parameters - Parameters supplied to the create or update custom IP prefix operation. -// options - CustomIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomIPPrefixesClient.BeginCreateOrUpdate -// method. -func (client *CustomIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix, options *CustomIPPrefixesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomIPPrefixesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, customIPPrefixName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CustomIPPrefixesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[CustomIPPrefixesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a custom IP prefix. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *CustomIPPrefixesClient) createOrUpdate(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix, options *CustomIPPrefixesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, customIPPrefixName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *CustomIPPrefixesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix, options *CustomIPPrefixesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customIPPrefixName == "" { - return nil, errors.New("parameter customIPPrefixName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customIpPrefixName}", url.PathEscape(customIPPrefixName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified custom IP prefix. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// customIPPrefixName - The name of the CustomIpPrefix. -// options - CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete -// method. -func (client *CustomIPPrefixesClient) BeginDelete(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientBeginDeleteOptions) (*runtime.Poller[CustomIPPrefixesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, customIPPrefixName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CustomIPPrefixesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[CustomIPPrefixesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified custom IP prefix. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *CustomIPPrefixesClient) deleteOperation(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, customIPPrefixName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *CustomIPPrefixesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customIPPrefixName == "" { - return nil, errors.New("parameter customIPPrefixName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customIpPrefixName}", url.PathEscape(customIPPrefixName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified custom IP prefix in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// customIPPrefixName - The name of the custom IP prefix. -// options - CustomIPPrefixesClientGetOptions contains the optional parameters for the CustomIPPrefixesClient.Get method. -func (client *CustomIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientGetOptions) (CustomIPPrefixesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, customIPPrefixName, options) - if err != nil { - return CustomIPPrefixesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CustomIPPrefixesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomIPPrefixesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *CustomIPPrefixesClient) getCreateRequest(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customIPPrefixName == "" { - return nil, errors.New("parameter customIPPrefixName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customIpPrefixName}", url.PathEscape(customIPPrefixName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *CustomIPPrefixesClient) getHandleResponse(resp *http.Response) (CustomIPPrefixesClientGetResponse, error) { - result := CustomIPPrefixesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefix); err != nil { - return CustomIPPrefixesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all custom IP prefixes in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.List method. -func (client *CustomIPPrefixesClient) NewListPager(resourceGroupName string, options *CustomIPPrefixesClientListOptions) *runtime.Pager[CustomIPPrefixesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[CustomIPPrefixesClientListResponse]{ - More: func(page CustomIPPrefixesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CustomIPPrefixesClientListResponse) (CustomIPPrefixesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CustomIPPrefixesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CustomIPPrefixesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomIPPrefixesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *CustomIPPrefixesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *CustomIPPrefixesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *CustomIPPrefixesClient) listHandleResponse(resp *http.Response) (CustomIPPrefixesClientListResponse, error) { - result := CustomIPPrefixesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefixListResult); err != nil { - return CustomIPPrefixesClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the custom IP prefixes in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.ListAll -// method. -func (client *CustomIPPrefixesClient) NewListAllPager(options *CustomIPPrefixesClientListAllOptions) *runtime.Pager[CustomIPPrefixesClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[CustomIPPrefixesClientListAllResponse]{ - More: func(page CustomIPPrefixesClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CustomIPPrefixesClientListAllResponse) (CustomIPPrefixesClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CustomIPPrefixesClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CustomIPPrefixesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomIPPrefixesClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *CustomIPPrefixesClient) listAllCreateRequest(ctx context.Context, options *CustomIPPrefixesClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/customIpPrefixes" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *CustomIPPrefixesClient) listAllHandleResponse(resp *http.Response) (CustomIPPrefixesClientListAllResponse, error) { - result := CustomIPPrefixesClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefixListResult); err != nil { - return CustomIPPrefixesClientListAllResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates custom IP prefix tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// customIPPrefixName - The name of the custom IP prefix. -// parameters - Parameters supplied to update custom IP prefix tags. -// options - CustomIPPrefixesClientUpdateTagsOptions contains the optional parameters for the CustomIPPrefixesClient.UpdateTags -// method. -func (client *CustomIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters TagsObject, options *CustomIPPrefixesClientUpdateTagsOptions) (CustomIPPrefixesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, customIPPrefixName, parameters, options) - if err != nil { - return CustomIPPrefixesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CustomIPPrefixesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CustomIPPrefixesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *CustomIPPrefixesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters TagsObject, options *CustomIPPrefixesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if customIPPrefixName == "" { - return nil, errors.New("parameter customIPPrefixName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{customIpPrefixName}", url.PathEscape(customIPPrefixName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *CustomIPPrefixesClient) updateTagsHandleResponse(resp *http.Response) (CustomIPPrefixesClientUpdateTagsResponse, error) { - result := CustomIPPrefixesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefix); err != nil { - return CustomIPPrefixesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ddoscustompolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ddoscustompolicies_client.go deleted file mode 100644 index 71abcb27..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ddoscustompolicies_client.go +++ /dev/null @@ -1,302 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DdosCustomPoliciesClient contains the methods for the DdosCustomPolicies group. -// Don't use this type directly, use NewDdosCustomPoliciesClient() instead. -type DdosCustomPoliciesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDdosCustomPoliciesClient creates a new instance of DdosCustomPoliciesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDdosCustomPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DdosCustomPoliciesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DdosCustomPoliciesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a DDoS custom policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ddosCustomPolicyName - The name of the DDoS custom policy. -// parameters - Parameters supplied to the create or update operation. -// options - DdosCustomPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginCreateOrUpdate -// method. -func (client *DdosCustomPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy, options *DdosCustomPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DdosCustomPoliciesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DdosCustomPoliciesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DdosCustomPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a DDoS custom policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *DdosCustomPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy, options *DdosCustomPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DdosCustomPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy, options *DdosCustomPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ddosCustomPolicyName == "" { - return nil, errors.New("parameter ddosCustomPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ddosCustomPolicyName}", url.PathEscape(ddosCustomPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified DDoS custom policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ddosCustomPolicyName - The name of the DDoS custom policy. -// options - DdosCustomPoliciesClientBeginDeleteOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginDelete -// method. -func (client *DdosCustomPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientBeginDeleteOptions) (*runtime.Poller[DdosCustomPoliciesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, ddosCustomPolicyName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DdosCustomPoliciesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[DdosCustomPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified DDoS custom policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *DdosCustomPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DdosCustomPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ddosCustomPolicyName == "" { - return nil, errors.New("parameter ddosCustomPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ddosCustomPolicyName}", url.PathEscape(ddosCustomPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets information about the specified DDoS custom policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ddosCustomPolicyName - The name of the DDoS custom policy. -// options - DdosCustomPoliciesClientGetOptions contains the optional parameters for the DdosCustomPoliciesClient.Get method. -func (client *DdosCustomPoliciesClient) Get(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientGetOptions) (DdosCustomPoliciesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, options) - if err != nil { - return DdosCustomPoliciesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DdosCustomPoliciesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DdosCustomPoliciesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DdosCustomPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ddosCustomPolicyName == "" { - return nil, errors.New("parameter ddosCustomPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ddosCustomPolicyName}", url.PathEscape(ddosCustomPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DdosCustomPoliciesClient) getHandleResponse(resp *http.Response) (DdosCustomPoliciesClientGetResponse, error) { - result := DdosCustomPoliciesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DdosCustomPolicy); err != nil { - return DdosCustomPoliciesClientGetResponse{}, err - } - return result, nil -} - -// UpdateTags - Update a DDoS custom policy tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ddosCustomPolicyName - The name of the DDoS custom policy. -// parameters - Parameters supplied to update DDoS custom policy resource tags. -// options - DdosCustomPoliciesClientUpdateTagsOptions contains the optional parameters for the DdosCustomPoliciesClient.UpdateTags -// method. -func (client *DdosCustomPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject, options *DdosCustomPoliciesClientUpdateTagsOptions) (DdosCustomPoliciesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) - if err != nil { - return DdosCustomPoliciesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DdosCustomPoliciesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DdosCustomPoliciesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *DdosCustomPoliciesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject, options *DdosCustomPoliciesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ddosCustomPolicyName == "" { - return nil, errors.New("parameter ddosCustomPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ddosCustomPolicyName}", url.PathEscape(ddosCustomPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *DdosCustomPoliciesClient) updateTagsHandleResponse(resp *http.Response) (DdosCustomPoliciesClientUpdateTagsResponse, error) { - result := DdosCustomPoliciesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DdosCustomPolicy); err != nil { - return DdosCustomPoliciesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ddosprotectionplans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ddosprotectionplans_client.go deleted file mode 100644 index 123a897b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ddosprotectionplans_client.go +++ /dev/null @@ -1,427 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DdosProtectionPlansClient contains the methods for the DdosProtectionPlans group. -// Don't use this type directly, use NewDdosProtectionPlansClient() instead. -type DdosProtectionPlansClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDdosProtectionPlansClient creates a new instance of DdosProtectionPlansClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDdosProtectionPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DdosProtectionPlansClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DdosProtectionPlansClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a DDoS protection plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ddosProtectionPlanName - The name of the DDoS protection plan. -// parameters - Parameters supplied to the create or update operation. -// options - DdosProtectionPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosProtectionPlansClient.BeginCreateOrUpdate -// method. -func (client *DdosProtectionPlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan, options *DdosProtectionPlansClientBeginCreateOrUpdateOptions) (*runtime.Poller[DdosProtectionPlansClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DdosProtectionPlansClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[DdosProtectionPlansClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a DDoS protection plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *DdosProtectionPlansClient) createOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan, options *DdosProtectionPlansClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DdosProtectionPlansClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan, options *DdosProtectionPlansClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ddosProtectionPlanName == "" { - return nil, errors.New("parameter ddosProtectionPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ddosProtectionPlanName}", url.PathEscape(ddosProtectionPlanName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified DDoS protection plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ddosProtectionPlanName - The name of the DDoS protection plan. -// options - DdosProtectionPlansClientBeginDeleteOptions contains the optional parameters for the DdosProtectionPlansClient.BeginDelete -// method. -func (client *DdosProtectionPlansClient) BeginDelete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientBeginDeleteOptions) (*runtime.Poller[DdosProtectionPlansClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, ddosProtectionPlanName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DdosProtectionPlansClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[DdosProtectionPlansClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified DDoS protection plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *DdosProtectionPlansClient) deleteOperation(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DdosProtectionPlansClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ddosProtectionPlanName == "" { - return nil, errors.New("parameter ddosProtectionPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ddosProtectionPlanName}", url.PathEscape(ddosProtectionPlanName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets information about the specified DDoS protection plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ddosProtectionPlanName - The name of the DDoS protection plan. -// options - DdosProtectionPlansClientGetOptions contains the optional parameters for the DdosProtectionPlansClient.Get method. -func (client *DdosProtectionPlansClient) Get(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientGetOptions) (DdosProtectionPlansClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, options) - if err != nil { - return DdosProtectionPlansClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DdosProtectionPlansClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DdosProtectionPlansClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DdosProtectionPlansClient) getCreateRequest(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ddosProtectionPlanName == "" { - return nil, errors.New("parameter ddosProtectionPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ddosProtectionPlanName}", url.PathEscape(ddosProtectionPlanName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DdosProtectionPlansClient) getHandleResponse(resp *http.Response) (DdosProtectionPlansClientGetResponse, error) { - result := DdosProtectionPlansClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlan); err != nil { - return DdosProtectionPlansClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all DDoS protection plans in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.List -// method. -func (client *DdosProtectionPlansClient) NewListPager(options *DdosProtectionPlansClientListOptions) *runtime.Pager[DdosProtectionPlansClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[DdosProtectionPlansClientListResponse]{ - More: func(page DdosProtectionPlansClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DdosProtectionPlansClientListResponse) (DdosProtectionPlansClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DdosProtectionPlansClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DdosProtectionPlansClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DdosProtectionPlansClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *DdosProtectionPlansClient) listCreateRequest(ctx context.Context, options *DdosProtectionPlansClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DdosProtectionPlansClient) listHandleResponse(resp *http.Response) (DdosProtectionPlansClientListResponse, error) { - result := DdosProtectionPlansClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlanListResult); err != nil { - return DdosProtectionPlansClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Gets all the DDoS protection plans in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.ListByResourceGroup -// method. -func (client *DdosProtectionPlansClient) NewListByResourceGroupPager(resourceGroupName string, options *DdosProtectionPlansClientListByResourceGroupOptions) *runtime.Pager[DdosProtectionPlansClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[DdosProtectionPlansClientListByResourceGroupResponse]{ - More: func(page DdosProtectionPlansClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DdosProtectionPlansClientListByResourceGroupResponse) (DdosProtectionPlansClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DdosProtectionPlansClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DdosProtectionPlansClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DdosProtectionPlansClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *DdosProtectionPlansClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DdosProtectionPlansClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *DdosProtectionPlansClient) listByResourceGroupHandleResponse(resp *http.Response) (DdosProtectionPlansClientListByResourceGroupResponse, error) { - result := DdosProtectionPlansClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlanListResult); err != nil { - return DdosProtectionPlansClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Update a DDoS protection plan tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ddosProtectionPlanName - The name of the DDoS protection plan. -// parameters - Parameters supplied to the update DDoS protection plan resource tags. -// options - DdosProtectionPlansClientUpdateTagsOptions contains the optional parameters for the DdosProtectionPlansClient.UpdateTags -// method. -func (client *DdosProtectionPlansClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject, options *DdosProtectionPlansClientUpdateTagsOptions) (DdosProtectionPlansClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) - if err != nil { - return DdosProtectionPlansClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DdosProtectionPlansClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DdosProtectionPlansClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *DdosProtectionPlansClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject, options *DdosProtectionPlansClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ddosProtectionPlanName == "" { - return nil, errors.New("parameter ddosProtectionPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ddosProtectionPlanName}", url.PathEscape(ddosProtectionPlanName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *DdosProtectionPlansClient) updateTagsHandleResponse(resp *http.Response) (DdosProtectionPlansClientUpdateTagsResponse, error) { - result := DdosProtectionPlansClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlan); err != nil { - return DdosProtectionPlansClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/defaultsecurityrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/defaultsecurityrules_client.go deleted file mode 100644 index fdda1e8c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/defaultsecurityrules_client.go +++ /dev/null @@ -1,189 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DefaultSecurityRulesClient contains the methods for the DefaultSecurityRules group. -// Don't use this type directly, use NewDefaultSecurityRulesClient() instead. -type DefaultSecurityRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDefaultSecurityRulesClient creates a new instance of DefaultSecurityRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDefaultSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DefaultSecurityRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DefaultSecurityRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get the specified default network security rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// defaultSecurityRuleName - The name of the default security rule. -// options - DefaultSecurityRulesClientGetOptions contains the optional parameters for the DefaultSecurityRulesClient.Get -// method. -func (client *DefaultSecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string, options *DefaultSecurityRulesClientGetOptions) (DefaultSecurityRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, options) - if err != nil { - return DefaultSecurityRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DefaultSecurityRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DefaultSecurityRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DefaultSecurityRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string, options *DefaultSecurityRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkSecurityGroupName == "" { - return nil, errors.New("parameter networkSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) - if defaultSecurityRuleName == "" { - return nil, errors.New("parameter defaultSecurityRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{defaultSecurityRuleName}", url.PathEscape(defaultSecurityRuleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DefaultSecurityRulesClient) getHandleResponse(resp *http.Response) (DefaultSecurityRulesClientGetResponse, error) { - result := DefaultSecurityRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRule); err != nil { - return DefaultSecurityRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all default security rules in a network security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// options - DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.List -// method. -func (client *DefaultSecurityRulesClient) NewListPager(resourceGroupName string, networkSecurityGroupName string, options *DefaultSecurityRulesClientListOptions) *runtime.Pager[DefaultSecurityRulesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[DefaultSecurityRulesClientListResponse]{ - More: func(page DefaultSecurityRulesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DefaultSecurityRulesClientListResponse) (DefaultSecurityRulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DefaultSecurityRulesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DefaultSecurityRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DefaultSecurityRulesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *DefaultSecurityRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *DefaultSecurityRulesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkSecurityGroupName == "" { - return nil, errors.New("parameter networkSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DefaultSecurityRulesClient) listHandleResponse(resp *http.Response) (DefaultSecurityRulesClientListResponse, error) { - result := DefaultSecurityRulesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRuleListResult); err != nil { - return DefaultSecurityRulesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/dscpconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/dscpconfiguration_client.go deleted file mode 100644 index 5ebcee2f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/dscpconfiguration_client.go +++ /dev/null @@ -1,368 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// DscpConfigurationClient contains the methods for the DscpConfiguration group. -// Don't use this type directly, use NewDscpConfigurationClient() instead. -type DscpConfigurationClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewDscpConfigurationClient creates a new instance of DscpConfigurationClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewDscpConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DscpConfigurationClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &DscpConfigurationClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a DSCP Configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// dscpConfigurationName - The name of the resource. -// parameters - Parameters supplied to the create or update dscp configuration operation. -// options - DscpConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscpConfigurationClient.BeginCreateOrUpdate -// method. -func (client *DscpConfigurationClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration, options *DscpConfigurationClientBeginCreateOrUpdateOptions) (*runtime.Poller[DscpConfigurationClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, dscpConfigurationName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DscpConfigurationClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[DscpConfigurationClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a DSCP Configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *DscpConfigurationClient) createOrUpdate(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration, options *DscpConfigurationClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, dscpConfigurationName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *DscpConfigurationClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration, options *DscpConfigurationClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dscpConfigurationName == "" { - return nil, errors.New("parameter dscpConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dscpConfigurationName}", url.PathEscape(dscpConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes a DSCP Configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// dscpConfigurationName - The name of the resource. -// options - DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete -// method. -func (client *DscpConfigurationClient) BeginDelete(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientBeginDeleteOptions) (*runtime.Poller[DscpConfigurationClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, dscpConfigurationName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[DscpConfigurationClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[DscpConfigurationClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a DSCP Configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *DscpConfigurationClient) deleteOperation(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, dscpConfigurationName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *DscpConfigurationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dscpConfigurationName == "" { - return nil, errors.New("parameter dscpConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dscpConfigurationName}", url.PathEscape(dscpConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a DSCP Configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// dscpConfigurationName - The name of the resource. -// options - DscpConfigurationClientGetOptions contains the optional parameters for the DscpConfigurationClient.Get method. -func (client *DscpConfigurationClient) Get(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientGetOptions) (DscpConfigurationClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, dscpConfigurationName, options) - if err != nil { - return DscpConfigurationClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DscpConfigurationClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscpConfigurationClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *DscpConfigurationClient) getCreateRequest(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if dscpConfigurationName == "" { - return nil, errors.New("parameter dscpConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{dscpConfigurationName}", url.PathEscape(dscpConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *DscpConfigurationClient) getHandleResponse(resp *http.Response) (DscpConfigurationClientGetResponse, error) { - result := DscpConfigurationClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DscpConfiguration); err != nil { - return DscpConfigurationClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets a DSCP Configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.List method. -func (client *DscpConfigurationClient) NewListPager(resourceGroupName string, options *DscpConfigurationClientListOptions) *runtime.Pager[DscpConfigurationClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[DscpConfigurationClientListResponse]{ - More: func(page DscpConfigurationClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DscpConfigurationClientListResponse) (DscpConfigurationClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DscpConfigurationClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DscpConfigurationClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscpConfigurationClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *DscpConfigurationClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *DscpConfigurationClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *DscpConfigurationClient) listHandleResponse(resp *http.Response) (DscpConfigurationClientListResponse, error) { - result := DscpConfigurationClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DscpConfigurationListResult); err != nil { - return DscpConfigurationClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all dscp configurations in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.ListAll -// method. -func (client *DscpConfigurationClient) NewListAllPager(options *DscpConfigurationClientListAllOptions) *runtime.Pager[DscpConfigurationClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[DscpConfigurationClientListAllResponse]{ - More: func(page DscpConfigurationClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *DscpConfigurationClientListAllResponse) (DscpConfigurationClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DscpConfigurationClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return DscpConfigurationClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DscpConfigurationClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *DscpConfigurationClient) listAllCreateRequest(ctx context.Context, options *DscpConfigurationClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/dscpConfigurations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *DscpConfigurationClient) listAllHandleResponse(resp *http.Response) (DscpConfigurationClientListAllResponse, error) { - result := DscpConfigurationClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DscpConfigurationListResult); err != nil { - return DscpConfigurationClientListAllResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuitauthorizations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuitauthorizations_client.go deleted file mode 100644 index ca48a3f3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuitauthorizations_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteCircuitAuthorizationsClient contains the methods for the ExpressRouteCircuitAuthorizations group. -// Don't use this type directly, use NewExpressRouteCircuitAuthorizationsClient() instead. -type ExpressRouteCircuitAuthorizationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteCircuitAuthorizationsClient creates a new instance of ExpressRouteCircuitAuthorizationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitAuthorizationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteCircuitAuthorizationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates an authorization in the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// authorizationName - The name of the authorization. -// authorizationParameters - Parameters supplied to the create or update express route circuit authorization operation. -// options - ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate -// method. -func (client *ExpressRouteCircuitAuthorizationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, options *ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates an authorization in the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitAuthorizationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, options *ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ExpressRouteCircuitAuthorizationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, options *ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if authorizationName == "" { - return nil, errors.New("parameter authorizationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, authorizationParameters) -} - -// BeginDelete - Deletes the specified authorization from the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// authorizationName - The name of the authorization. -// options - ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginDelete -// method. -func (client *ExpressRouteCircuitAuthorizationsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitAuthorizationsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, authorizationName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitAuthorizationsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitAuthorizationsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified authorization from the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitAuthorizationsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, authorizationName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ExpressRouteCircuitAuthorizationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if authorizationName == "" { - return nil, errors.New("parameter authorizationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified authorization from the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// authorizationName - The name of the authorization. -// options - ExpressRouteCircuitAuthorizationsClientGetOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.Get -// method. -func (client *ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientGetOptions) (ExpressRouteCircuitAuthorizationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, authorizationName, options) - if err != nil { - return ExpressRouteCircuitAuthorizationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitAuthorizationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitAuthorizationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRouteCircuitAuthorizationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if authorizationName == "" { - return nil, errors.New("parameter authorizationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRouteCircuitAuthorizationsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitAuthorizationsClientGetResponse, error) { - result := ExpressRouteCircuitAuthorizationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitAuthorization); err != nil { - return ExpressRouteCircuitAuthorizationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all authorizations in an express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the circuit. -// options - ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.List -// method. -func (client *ExpressRouteCircuitAuthorizationsClient) NewListPager(resourceGroupName string, circuitName string, options *ExpressRouteCircuitAuthorizationsClientListOptions) *runtime.Pager[ExpressRouteCircuitAuthorizationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitAuthorizationsClientListResponse]{ - More: func(page ExpressRouteCircuitAuthorizationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRouteCircuitAuthorizationsClientListResponse) (ExpressRouteCircuitAuthorizationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCircuitAuthorizationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitAuthorizationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitAuthorizationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRouteCircuitAuthorizationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitAuthorizationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRouteCircuitAuthorizationsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitAuthorizationsClientListResponse, error) { - result := ExpressRouteCircuitAuthorizationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationListResult); err != nil { - return ExpressRouteCircuitAuthorizationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuitconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuitconnections_client.go deleted file mode 100644 index ade11515..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuitconnections_client.go +++ /dev/null @@ -1,351 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteCircuitConnectionsClient contains the methods for the ExpressRouteCircuitConnections group. -// Don't use this type directly, use NewExpressRouteCircuitConnectionsClient() instead. -type ExpressRouteCircuitConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteCircuitConnectionsClient creates a new instance of ExpressRouteCircuitConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteCircuitConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a Express Route Circuit Connection in the specified express route circuits. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// connectionName - The name of the express route circuit connection. -// expressRouteCircuitConnectionParameters - Parameters supplied to the create or update express route circuit connection -// operation. -// options - ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate -// method. -func (client *ExpressRouteCircuitConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection, options *ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a Express Route Circuit Connection in the specified express route circuits. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection, options *ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ExpressRouteCircuitConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection, options *ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, expressRouteCircuitConnectionParameters) -} - -// BeginDelete - Deletes the specified Express Route Circuit Connection from the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// connectionName - The name of the express route circuit connection. -// options - ExpressRouteCircuitConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginDelete -// method. -func (client *ExpressRouteCircuitConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitConnectionsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitConnectionsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified Express Route Circuit Connection from the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ExpressRouteCircuitConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Express Route Circuit Connection from the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// connectionName - The name of the express route circuit connection. -// options - ExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.Get -// method. -func (client *ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientGetOptions) (ExpressRouteCircuitConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) - if err != nil { - return ExpressRouteCircuitConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRouteCircuitConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRouteCircuitConnectionsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitConnectionsClientGetResponse, error) { - result := ExpressRouteCircuitConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitConnection); err != nil { - return ExpressRouteCircuitConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all global reach connections associated with a private peering in an express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the circuit. -// peeringName - The name of the peering. -// options - ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.List -// method. -func (client *ExpressRouteCircuitConnectionsClient) NewListPager(resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitConnectionsClientListOptions) *runtime.Pager[ExpressRouteCircuitConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitConnectionsClientListResponse]{ - More: func(page ExpressRouteCircuitConnectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRouteCircuitConnectionsClientListResponse) (ExpressRouteCircuitConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCircuitConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRouteCircuitConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRouteCircuitConnectionsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitConnectionsClientListResponse, error) { - result := ExpressRouteCircuitConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitConnectionListResult); err != nil { - return ExpressRouteCircuitConnectionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuitpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuitpeerings_client.go deleted file mode 100644 index 68eab70f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuitpeerings_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteCircuitPeeringsClient contains the methods for the ExpressRouteCircuitPeerings group. -// Don't use this type directly, use NewExpressRouteCircuitPeeringsClient() instead. -type ExpressRouteCircuitPeeringsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteCircuitPeeringsClient creates a new instance of ExpressRouteCircuitPeeringsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteCircuitPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitPeeringsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteCircuitPeeringsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a peering in the specified express route circuits. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// peeringParameters - Parameters supplied to the create or update express route circuit peering operation. -// options - ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate -// method. -func (client *ExpressRouteCircuitPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, options *ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, peeringName, peeringParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a peering in the specified express route circuits. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, options *ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, peeringName, peeringParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ExpressRouteCircuitPeeringsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, options *ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, peeringParameters) -} - -// BeginDelete - Deletes the specified peering from the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// options - ExpressRouteCircuitPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginDelete -// method. -func (client *ExpressRouteCircuitPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitPeeringsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, peeringName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitPeeringsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitPeeringsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified peering from the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ExpressRouteCircuitPeeringsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified peering for the express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// options - ExpressRouteCircuitPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.Get -// method. -func (client *ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientGetOptions) (ExpressRouteCircuitPeeringsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) - if err != nil { - return ExpressRouteCircuitPeeringsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitPeeringsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitPeeringsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRouteCircuitPeeringsClient) getCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRouteCircuitPeeringsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitPeeringsClientGetResponse, error) { - result := ExpressRouteCircuitPeeringsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitPeering); err != nil { - return ExpressRouteCircuitPeeringsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all peerings in a specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// options - ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.List -// method. -func (client *ExpressRouteCircuitPeeringsClient) NewListPager(resourceGroupName string, circuitName string, options *ExpressRouteCircuitPeeringsClientListOptions) *runtime.Pager[ExpressRouteCircuitPeeringsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitPeeringsClientListResponse]{ - More: func(page ExpressRouteCircuitPeeringsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRouteCircuitPeeringsClientListResponse) (ExpressRouteCircuitPeeringsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCircuitPeeringsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitPeeringsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitPeeringsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRouteCircuitPeeringsClient) listCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitPeeringsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRouteCircuitPeeringsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitPeeringsClientListResponse, error) { - result := ExpressRouteCircuitPeeringsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitPeeringListResult); err != nil { - return ExpressRouteCircuitPeeringsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuits_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuits_client.go deleted file mode 100644 index 2d01459d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecircuits_client.go +++ /dev/null @@ -1,775 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteCircuitsClient contains the methods for the ExpressRouteCircuits group. -// Don't use this type directly, use NewExpressRouteCircuitsClient() instead. -type ExpressRouteCircuitsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteCircuitsClient creates a new instance of ExpressRouteCircuitsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteCircuitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteCircuitsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates an express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the circuit. -// parameters - Parameters supplied to the create or update express route circuit operation. -// options - ExpressRouteCircuitsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginCreateOrUpdate -// method. -func (client *ExpressRouteCircuitsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, options *ExpressRouteCircuitsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates an express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, options *ExpressRouteCircuitsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ExpressRouteCircuitsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, options *ExpressRouteCircuitsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// options - ExpressRouteCircuitsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginDelete -// method. -func (client *ExpressRouteCircuitsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ExpressRouteCircuitsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets information about the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of express route circuit. -// options - ExpressRouteCircuitsClientGetOptions contains the optional parameters for the ExpressRouteCircuitsClient.Get -// method. -func (client *ExpressRouteCircuitsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientGetOptions) (ExpressRouteCircuitsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, options) - if err != nil { - return ExpressRouteCircuitsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRouteCircuitsClient) getCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRouteCircuitsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientGetResponse, error) { - result := ExpressRouteCircuitsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuit); err != nil { - return ExpressRouteCircuitsClientGetResponse{}, err - } - return result, nil -} - -// GetPeeringStats - Gets all stats from an express route circuit in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// options - ExpressRouteCircuitsClientGetPeeringStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetPeeringStats -// method. -func (client *ExpressRouteCircuitsClient) GetPeeringStats(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitsClientGetPeeringStatsOptions) (ExpressRouteCircuitsClientGetPeeringStatsResponse, error) { - req, err := client.getPeeringStatsCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) - if err != nil { - return ExpressRouteCircuitsClientGetPeeringStatsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitsClientGetPeeringStatsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitsClientGetPeeringStatsResponse{}, runtime.NewResponseError(resp) - } - return client.getPeeringStatsHandleResponse(resp) -} - -// getPeeringStatsCreateRequest creates the GetPeeringStats request. -func (client *ExpressRouteCircuitsClient) getPeeringStatsCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitsClientGetPeeringStatsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPeeringStatsHandleResponse handles the GetPeeringStats response. -func (client *ExpressRouteCircuitsClient) getPeeringStatsHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientGetPeeringStatsResponse, error) { - result := ExpressRouteCircuitsClientGetPeeringStatsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitStats); err != nil { - return ExpressRouteCircuitsClientGetPeeringStatsResponse{}, err - } - return result, nil -} - -// GetStats - Gets all the stats from an express route circuit in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// options - ExpressRouteCircuitsClientGetStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetStats -// method. -func (client *ExpressRouteCircuitsClient) GetStats(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientGetStatsOptions) (ExpressRouteCircuitsClientGetStatsResponse, error) { - req, err := client.getStatsCreateRequest(ctx, resourceGroupName, circuitName, options) - if err != nil { - return ExpressRouteCircuitsClientGetStatsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitsClientGetStatsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitsClientGetStatsResponse{}, runtime.NewResponseError(resp) - } - return client.getStatsHandleResponse(resp) -} - -// getStatsCreateRequest creates the GetStats request. -func (client *ExpressRouteCircuitsClient) getStatsCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientGetStatsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getStatsHandleResponse handles the GetStats response. -func (client *ExpressRouteCircuitsClient) getStatsHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientGetStatsResponse, error) { - result := ExpressRouteCircuitsClientGetStatsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitStats); err != nil { - return ExpressRouteCircuitsClientGetStatsResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the express route circuits in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.List -// method. -func (client *ExpressRouteCircuitsClient) NewListPager(resourceGroupName string, options *ExpressRouteCircuitsClientListOptions) *runtime.Pager[ExpressRouteCircuitsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitsClientListResponse]{ - More: func(page ExpressRouteCircuitsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRouteCircuitsClientListResponse) (ExpressRouteCircuitsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCircuitsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRouteCircuitsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ExpressRouteCircuitsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRouteCircuitsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientListResponse, error) { - result := ExpressRouteCircuitsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitListResult); err != nil { - return ExpressRouteCircuitsClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the express route circuits in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.ListAll -// method. -func (client *ExpressRouteCircuitsClient) NewListAllPager(options *ExpressRouteCircuitsClientListAllOptions) *runtime.Pager[ExpressRouteCircuitsClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitsClientListAllResponse]{ - More: func(page ExpressRouteCircuitsClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRouteCircuitsClientListAllResponse) (ExpressRouteCircuitsClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCircuitsClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitsClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *ExpressRouteCircuitsClient) listAllCreateRequest(ctx context.Context, options *ExpressRouteCircuitsClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *ExpressRouteCircuitsClient) listAllHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientListAllResponse, error) { - result := ExpressRouteCircuitsClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitListResult); err != nil { - return ExpressRouteCircuitsClientListAllResponse{}, err - } - return result, nil -} - -// BeginListArpTable - Gets the currently advertised ARP table associated with the express route circuit in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCircuitsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListArpTable -// method. -func (client *ExpressRouteCircuitsClient) BeginListArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListArpTableOptions) (*runtime.Poller[ExpressRouteCircuitsClientListArpTableResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listArpTable(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitsClientListArpTableResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitsClientListArpTableResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListArpTable - Gets the currently advertised ARP table associated with the express route circuit in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitsClient) listArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListArpTableOptions) (*http.Response, error) { - req, err := client.listArpTableCreateRequest(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listArpTableCreateRequest creates the ListArpTable request. -func (client *ExpressRouteCircuitsClient) listArpTableCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListArpTableOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if devicePath == "" { - return nil, errors.New("parameter devicePath cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginListRoutesTable - Gets the currently advertised routes table associated with the express route circuit in a resource -// group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCircuitsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTable -// method. -func (client *ExpressRouteCircuitsClient) BeginListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableOptions) (*runtime.Poller[ExpressRouteCircuitsClientListRoutesTableResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listRoutesTable(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitsClientListRoutesTableResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitsClientListRoutesTableResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListRoutesTable - Gets the currently advertised routes table associated with the express route circuit in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitsClient) listRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableOptions) (*http.Response, error) { - req, err := client.listRoutesTableCreateRequest(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listRoutesTableCreateRequest creates the ListRoutesTable request. -func (client *ExpressRouteCircuitsClient) listRoutesTableCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if devicePath == "" { - return nil, errors.New("parameter devicePath cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginListRoutesTableSummary - Gets the currently advertised routes table summary associated with the express route circuit -// in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTableSummary -// method. -func (client *ExpressRouteCircuitsClient) BeginListRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions) (*runtime.Poller[ExpressRouteCircuitsClientListRoutesTableSummaryResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listRoutesTableSummary(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCircuitsClientListRoutesTableSummaryResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCircuitsClientListRoutesTableSummaryResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListRoutesTableSummary - Gets the currently advertised routes table summary associated with the express route circuit in -// a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCircuitsClient) listRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions) (*http.Response, error) { - req, err := client.listRoutesTableSummaryCreateRequest(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listRoutesTableSummaryCreateRequest creates the ListRoutesTableSummary request. -func (client *ExpressRouteCircuitsClient) listRoutesTableSummaryCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if devicePath == "" { - return nil, errors.New("parameter devicePath cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// UpdateTags - Updates an express route circuit tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the circuit. -// parameters - Parameters supplied to update express route circuit tags. -// options - ExpressRouteCircuitsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCircuitsClient.UpdateTags -// method. -func (client *ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject, options *ExpressRouteCircuitsClientUpdateTagsOptions) (ExpressRouteCircuitsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, circuitName, parameters, options) - if err != nil { - return ExpressRouteCircuitsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCircuitsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCircuitsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *ExpressRouteCircuitsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject, options *ExpressRouteCircuitsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *ExpressRouteCircuitsClient) updateTagsHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientUpdateTagsResponse, error) { - result := ExpressRouteCircuitsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuit); err != nil { - return ExpressRouteCircuitsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteconnections_client.go deleted file mode 100644 index 17c9857b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteconnections_client.go +++ /dev/null @@ -1,317 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteConnectionsClient contains the methods for the ExpressRouteConnections group. -// Don't use this type directly, use NewExpressRouteConnectionsClient() instead. -type ExpressRouteConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteConnectionsClient creates a new instance of ExpressRouteConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// connectionName - The name of the connection subresource. -// putExpressRouteConnectionParameters - Parameters required in an ExpressRouteConnection PUT operation. -// options - ExpressRouteConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginCreateOrUpdate -// method. -func (client *ExpressRouteConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection, options *ExpressRouteConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteConnectionsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteConnectionsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection, options *ExpressRouteConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ExpressRouteConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection, options *ExpressRouteConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRouteGatewayName == "" { - return nil, errors.New("parameter expressRouteGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, putExpressRouteConnectionParameters) -} - -// BeginDelete - Deletes a connection to a ExpressRoute circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// connectionName - The name of the connection subresource. -// options - ExpressRouteConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginDelete -// method. -func (client *ExpressRouteConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteConnectionsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteConnectionsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a connection to a ExpressRoute circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ExpressRouteConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRouteGatewayName == "" { - return nil, errors.New("parameter expressRouteGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified ExpressRouteConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// connectionName - The name of the ExpressRoute connection. -// options - ExpressRouteConnectionsClientGetOptions contains the optional parameters for the ExpressRouteConnectionsClient.Get -// method. -func (client *ExpressRouteConnectionsClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientGetOptions) (ExpressRouteConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) - if err != nil { - return ExpressRouteConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRouteConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRouteGatewayName == "" { - return nil, errors.New("parameter expressRouteGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRouteConnectionsClient) getHandleResponse(resp *http.Response) (ExpressRouteConnectionsClientGetResponse, error) { - result := ExpressRouteConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteConnection); err != nil { - return ExpressRouteConnectionsClientGetResponse{}, err - } - return result, nil -} - -// List - Lists ExpressRouteConnections. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// options - ExpressRouteConnectionsClientListOptions contains the optional parameters for the ExpressRouteConnectionsClient.List -// method. -func (client *ExpressRouteConnectionsClient) List(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteConnectionsClientListOptions) (ExpressRouteConnectionsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, options) - if err != nil { - return ExpressRouteConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *ExpressRouteConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRouteGatewayName == "" { - return nil, errors.New("parameter expressRouteGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRouteConnectionsClient) listHandleResponse(resp *http.Response) (ExpressRouteConnectionsClientListResponse, error) { - result := ExpressRouteConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteConnectionList); err != nil { - return ExpressRouteConnectionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecrossconnectionpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecrossconnectionpeerings_client.go deleted file mode 100644 index 2e0ddf3d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecrossconnectionpeerings_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteCrossConnectionPeeringsClient contains the methods for the ExpressRouteCrossConnectionPeerings group. -// Don't use this type directly, use NewExpressRouteCrossConnectionPeeringsClient() instead. -type ExpressRouteCrossConnectionPeeringsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteCrossConnectionPeeringsClient creates a new instance of ExpressRouteCrossConnectionPeeringsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCrossConnectionPeeringsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteCrossConnectionPeeringsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a peering in the specified ExpressRouteCrossConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// peeringParameters - Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. -// options - ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the -// ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate method. -func (client *ExpressRouteCrossConnectionPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering, options *ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a peering in the specified ExpressRouteCrossConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCrossConnectionPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering, options *ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ExpressRouteCrossConnectionPeeringsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering, options *ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if crossConnectionName == "" { - return nil, errors.New("parameter crossConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, peeringParameters) -} - -// BeginDelete - Deletes the specified peering from the ExpressRouteCrossConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// options - ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginDelete -// method. -func (client *ExpressRouteCrossConnectionPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCrossConnectionPeeringsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, crossConnectionName, peeringName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCrossConnectionPeeringsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionPeeringsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified peering from the ExpressRouteCrossConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCrossConnectionPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ExpressRouteCrossConnectionPeeringsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if crossConnectionName == "" { - return nil, errors.New("parameter crossConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified peering for the ExpressRouteCrossConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// options - ExpressRouteCrossConnectionPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.Get -// method. -func (client *ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientGetOptions) (ExpressRouteCrossConnectionPeeringsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, options) - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCrossConnectionPeeringsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRouteCrossConnectionPeeringsClient) getCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if crossConnectionName == "" { - return nil, errors.New("parameter crossConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRouteCrossConnectionPeeringsClient) getHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionPeeringsClientGetResponse, error) { - result := ExpressRouteCrossConnectionPeeringsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionPeering); err != nil { - return ExpressRouteCrossConnectionPeeringsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all peerings in a specified ExpressRouteCrossConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// options - ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.List -// method. -func (client *ExpressRouteCrossConnectionPeeringsClient) NewListPager(resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionPeeringsClientListOptions) *runtime.Pager[ExpressRouteCrossConnectionPeeringsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRouteCrossConnectionPeeringsClientListResponse]{ - More: func(page ExpressRouteCrossConnectionPeeringsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionPeeringsClientListResponse) (ExpressRouteCrossConnectionPeeringsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, crossConnectionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCrossConnectionPeeringsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRouteCrossConnectionPeeringsClient) listCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionPeeringsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if crossConnectionName == "" { - return nil, errors.New("parameter crossConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRouteCrossConnectionPeeringsClient) listHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionPeeringsClientListResponse, error) { - result := ExpressRouteCrossConnectionPeeringsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionPeeringList); err != nil { - return ExpressRouteCrossConnectionPeeringsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecrossconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecrossconnections_client.go deleted file mode 100644 index 6edbdd28..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutecrossconnections_client.go +++ /dev/null @@ -1,594 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteCrossConnectionsClient contains the methods for the ExpressRouteCrossConnections group. -// Don't use this type directly, use NewExpressRouteCrossConnectionsClient() instead. -type ExpressRouteCrossConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteCrossConnectionsClient creates a new instance of ExpressRouteCrossConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteCrossConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCrossConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteCrossConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Update the specified ExpressRouteCrossConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// parameters - Parameters supplied to the update express route crossConnection operation. -// options - ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate -// method. -func (client *ExpressRouteCrossConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection, options *ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, crossConnectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Update the specified ExpressRouteCrossConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCrossConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection, options *ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, crossConnectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ExpressRouteCrossConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection, options *ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if crossConnectionName == "" { - return nil, errors.New("parameter crossConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// Get - Gets details about the specified ExpressRouteCrossConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group (peering location of the circuit). -// crossConnectionName - The name of the ExpressRouteCrossConnection (service key of the circuit). -// options - ExpressRouteCrossConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.Get -// method. -func (client *ExpressRouteCrossConnectionsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionsClientGetOptions) (ExpressRouteCrossConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, crossConnectionName, options) - if err != nil { - return ExpressRouteCrossConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCrossConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCrossConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRouteCrossConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if crossConnectionName == "" { - return nil, errors.New("parameter crossConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRouteCrossConnectionsClient) getHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientGetResponse, error) { - result := ExpressRouteCrossConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnection); err != nil { - return ExpressRouteCrossConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Retrieves all the ExpressRouteCrossConnections in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.List -// method. -func (client *ExpressRouteCrossConnectionsClient) NewListPager(options *ExpressRouteCrossConnectionsClientListOptions) *runtime.Pager[ExpressRouteCrossConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRouteCrossConnectionsClientListResponse]{ - More: func(page ExpressRouteCrossConnectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionsClientListResponse) (ExpressRouteCrossConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCrossConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCrossConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCrossConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRouteCrossConnectionsClient) listCreateRequest(ctx context.Context, options *ExpressRouteCrossConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRouteCrossConnectionsClient) listHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientListResponse, error) { - result := ExpressRouteCrossConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionListResult); err != nil { - return ExpressRouteCrossConnectionsClientListResponse{}, err - } - return result, nil -} - -// BeginListArpTable - Gets the currently advertised ARP table associated with the express route cross connection in a resource -// group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCrossConnectionsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListArpTable -// method. -func (client *ExpressRouteCrossConnectionsClient) BeginListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListArpTableOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientListArpTableResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listArpTable(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientListArpTableResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientListArpTableResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListArpTable - Gets the currently advertised ARP table associated with the express route cross connection in a resource -// group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCrossConnectionsClient) listArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListArpTableOptions) (*http.Response, error) { - req, err := client.listArpTableCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listArpTableCreateRequest creates the ListArpTable request. -func (client *ExpressRouteCrossConnectionsClient) listArpTableCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListArpTableOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if crossConnectionName == "" { - return nil, errors.New("parameter crossConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if devicePath == "" { - return nil, errors.New("parameter devicePath cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// NewListByResourceGroupPager - Retrieves all the ExpressRouteCrossConnections in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.ListByResourceGroup -// method. -func (client *ExpressRouteCrossConnectionsClient) NewListByResourceGroupPager(resourceGroupName string, options *ExpressRouteCrossConnectionsClientListByResourceGroupOptions) *runtime.Pager[ExpressRouteCrossConnectionsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRouteCrossConnectionsClientListByResourceGroupResponse]{ - More: func(page ExpressRouteCrossConnectionsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionsClientListByResourceGroupResponse) (ExpressRouteCrossConnectionsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ExpressRouteCrossConnectionsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ExpressRouteCrossConnectionsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ExpressRouteCrossConnectionsClient) listByResourceGroupHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientListByResourceGroupResponse, error) { - result := ExpressRouteCrossConnectionsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionListResult); err != nil { - return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// BeginListRoutesTable - Gets the currently advertised routes table associated with the express route cross connection in -// a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTable -// method. -func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientListRoutesTableResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listRoutesTable(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientListRoutesTableResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientListRoutesTableResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListRoutesTable - Gets the currently advertised routes table associated with the express route cross connection in a resource -// group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCrossConnectionsClient) listRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions) (*http.Response, error) { - req, err := client.listRoutesTableCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listRoutesTableCreateRequest creates the ListRoutesTable request. -func (client *ExpressRouteCrossConnectionsClient) listRoutesTableCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if crossConnectionName == "" { - return nil, errors.New("parameter crossConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if devicePath == "" { - return nil, errors.New("parameter devicePath cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginListRoutesTableSummary - Gets the route table summary associated with the express route cross connection in a resource -// group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the -// ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary method. -func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listRoutesTableSummary(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListRoutesTableSummary - Gets the route table summary associated with the express route cross connection in a resource -// group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteCrossConnectionsClient) listRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions) (*http.Response, error) { - req, err := client.listRoutesTableSummaryCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listRoutesTableSummaryCreateRequest creates the ListRoutesTableSummary request. -func (client *ExpressRouteCrossConnectionsClient) listRoutesTableSummaryCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if crossConnectionName == "" { - return nil, errors.New("parameter crossConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if devicePath == "" { - return nil, errors.New("parameter devicePath cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// UpdateTags - Updates an express route cross connection tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the cross connection. -// crossConnectionParameters - Parameters supplied to update express route cross connection tags. -// options - ExpressRouteCrossConnectionsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.UpdateTags -// method. -func (client *ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject, options *ExpressRouteCrossConnectionsClientUpdateTagsOptions) (ExpressRouteCrossConnectionsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, crossConnectionName, crossConnectionParameters, options) - if err != nil { - return ExpressRouteCrossConnectionsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteCrossConnectionsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteCrossConnectionsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *ExpressRouteCrossConnectionsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject, options *ExpressRouteCrossConnectionsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if crossConnectionName == "" { - return nil, errors.New("parameter crossConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, crossConnectionParameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *ExpressRouteCrossConnectionsClient) updateTagsHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientUpdateTagsResponse, error) { - result := ExpressRouteCrossConnectionsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnection); err != nil { - return ExpressRouteCrossConnectionsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutegateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutegateways_client.go deleted file mode 100644 index 909b28a7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutegateways_client.go +++ /dev/null @@ -1,412 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteGatewaysClient contains the methods for the ExpressRouteGateways group. -// Don't use this type directly, use NewExpressRouteGatewaysClient() instead. -type ExpressRouteGatewaysClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteGatewaysClient creates a new instance of ExpressRouteGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteGatewaysClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteGatewaysClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a ExpressRoute gateway in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// putExpressRouteGatewayParameters - Parameters required in an ExpressRoute gateway PUT operation. -// options - ExpressRouteGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginCreateOrUpdate -// method. -func (client *ExpressRouteGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway, options *ExpressRouteGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteGatewaysClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteGatewaysClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a ExpressRoute gateway in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway, options *ExpressRouteGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ExpressRouteGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway, options *ExpressRouteGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRouteGatewayName == "" { - return nil, errors.New("parameter expressRouteGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, putExpressRouteGatewayParameters) -} - -// BeginDelete - Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only -// be deleted when there are no connection subresources. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// options - ExpressRouteGatewaysClientBeginDeleteOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginDelete -// method. -func (client *ExpressRouteGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteGatewaysClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, expressRouteGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteGatewaysClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted -// when there are no connection subresources. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ExpressRouteGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRouteGatewayName == "" { - return nil, errors.New("parameter expressRouteGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Fetches the details of a ExpressRoute gateway in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// options - ExpressRouteGatewaysClientGetOptions contains the optional parameters for the ExpressRouteGatewaysClient.Get -// method. -func (client *ExpressRouteGatewaysClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientGetOptions) (ExpressRouteGatewaysClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, options) - if err != nil { - return ExpressRouteGatewaysClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteGatewaysClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteGatewaysClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRouteGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRouteGatewayName == "" { - return nil, errors.New("parameter expressRouteGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRouteGatewaysClient) getHandleResponse(resp *http.Response) (ExpressRouteGatewaysClientGetResponse, error) { - result := ExpressRouteGatewaysClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteGateway); err != nil { - return ExpressRouteGatewaysClientGetResponse{}, err - } - return result, nil -} - -// ListByResourceGroup - Lists ExpressRoute gateways in a given resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - ExpressRouteGatewaysClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListByResourceGroup -// method. -func (client *ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, options *ExpressRouteGatewaysClientListByResourceGroupOptions) (ExpressRouteGatewaysClientListByResourceGroupResponse, error) { - req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - if err != nil { - return ExpressRouteGatewaysClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteGatewaysClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteGatewaysClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ExpressRouteGatewaysClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ExpressRouteGatewaysClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ExpressRouteGatewaysClient) listByResourceGroupHandleResponse(resp *http.Response) (ExpressRouteGatewaysClientListByResourceGroupResponse, error) { - result := ExpressRouteGatewaysClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteGatewayList); err != nil { - return ExpressRouteGatewaysClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// ListBySubscription - Lists ExpressRoute gateways under a given subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ExpressRouteGatewaysClientListBySubscriptionOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListBySubscription -// method. -func (client *ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context, options *ExpressRouteGatewaysClientListBySubscriptionOptions) (ExpressRouteGatewaysClientListBySubscriptionResponse, error) { - req, err := client.listBySubscriptionCreateRequest(ctx, options) - if err != nil { - return ExpressRouteGatewaysClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteGatewaysClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteGatewaysClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ExpressRouteGatewaysClient) listBySubscriptionCreateRequest(ctx context.Context, options *ExpressRouteGatewaysClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *ExpressRouteGatewaysClient) listBySubscriptionHandleResponse(resp *http.Response) (ExpressRouteGatewaysClientListBySubscriptionResponse, error) { - result := ExpressRouteGatewaysClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteGatewayList); err != nil { - return ExpressRouteGatewaysClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// BeginUpdateTags - Updates express route gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the ExpressRouteGateway. -// expressRouteGatewayName - The name of the gateway. -// expressRouteGatewayParameters - Parameters supplied to update a virtual wan express route gateway tags. -// options - ExpressRouteGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginUpdateTags -// method. -func (client *ExpressRouteGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject, options *ExpressRouteGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[ExpressRouteGatewaysClientUpdateTagsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updateTags(ctx, resourceGroupName, expressRouteGatewayName, expressRouteGatewayParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRouteGatewaysClientUpdateTagsResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRouteGatewaysClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdateTags - Updates express route gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRouteGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject, options *ExpressRouteGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, expressRouteGatewayParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *ExpressRouteGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject, options *ExpressRouteGatewaysClientBeginUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRouteGatewayName == "" { - return nil, errors.New("parameter expressRouteGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, expressRouteGatewayParameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutelinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutelinks_client.go deleted file mode 100644 index d1812abd..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressroutelinks_client.go +++ /dev/null @@ -1,187 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteLinksClient contains the methods for the ExpressRouteLinks group. -// Don't use this type directly, use NewExpressRouteLinksClient() instead. -type ExpressRouteLinksClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteLinksClient creates a new instance of ExpressRouteLinksClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteLinksClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteLinksClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Retrieves the specified ExpressRouteLink resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the ExpressRoutePort resource. -// linkName - The name of the ExpressRouteLink resource. -// options - ExpressRouteLinksClientGetOptions contains the optional parameters for the ExpressRouteLinksClient.Get method. -func (client *ExpressRouteLinksClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string, options *ExpressRouteLinksClientGetOptions) (ExpressRouteLinksClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, expressRoutePortName, linkName, options) - if err != nil { - return ExpressRouteLinksClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteLinksClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteLinksClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRouteLinksClient) getCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string, options *ExpressRouteLinksClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - if linkName == "" { - return nil, errors.New("parameter linkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{linkName}", url.PathEscape(linkName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRouteLinksClient) getHandleResponse(resp *http.Response) (ExpressRouteLinksClientGetResponse, error) { - result := ExpressRouteLinksClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteLink); err != nil { - return ExpressRouteLinksClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the ExpressRoutePort resource. -// options - ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.List method. -func (client *ExpressRouteLinksClient) NewListPager(resourceGroupName string, expressRoutePortName string, options *ExpressRouteLinksClientListOptions) *runtime.Pager[ExpressRouteLinksClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRouteLinksClientListResponse]{ - More: func(page ExpressRouteLinksClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRouteLinksClientListResponse) (ExpressRouteLinksClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteLinksClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteLinksClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteLinksClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRouteLinksClient) listCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRouteLinksClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRouteLinksClient) listHandleResponse(resp *http.Response) (ExpressRouteLinksClientListResponse, error) { - result := ExpressRouteLinksClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteLinkListResult); err != nil { - return ExpressRouteLinksClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteportauthorizations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteportauthorizations_client.go deleted file mode 100644 index 15aee2e0..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteportauthorizations_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRoutePortAuthorizationsClient contains the methods for the ExpressRoutePortAuthorizations group. -// Don't use this type directly, use NewExpressRoutePortAuthorizationsClient() instead. -type ExpressRoutePortAuthorizationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRoutePortAuthorizationsClient creates a new instance of ExpressRoutePortAuthorizationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRoutePortAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortAuthorizationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRoutePortAuthorizationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates an authorization in the specified express route port. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the express route port. -// authorizationName - The name of the authorization. -// authorizationParameters - Parameters supplied to the create or update express route port authorization operation. -// options - ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate -// method. -func (client *ExpressRoutePortAuthorizationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, authorizationParameters ExpressRoutePortAuthorization, options *ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRoutePortName, authorizationName, authorizationParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates an authorization in the specified express route port. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRoutePortAuthorizationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, authorizationParameters ExpressRoutePortAuthorization, options *ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRoutePortName, authorizationName, authorizationParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ExpressRoutePortAuthorizationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, authorizationParameters ExpressRoutePortAuthorization, options *ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - if authorizationName == "" { - return nil, errors.New("parameter authorizationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, authorizationParameters) -} - -// BeginDelete - Deletes the specified authorization from the specified express route port. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the express route port. -// authorizationName - The name of the authorization. -// options - ExpressRoutePortAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginDelete -// method. -func (client *ExpressRoutePortAuthorizationsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientBeginDeleteOptions) (*runtime.Poller[ExpressRoutePortAuthorizationsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, expressRoutePortName, authorizationName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRoutePortAuthorizationsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRoutePortAuthorizationsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified authorization from the specified express route port. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRoutePortAuthorizationsClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRoutePortName, authorizationName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ExpressRoutePortAuthorizationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - if authorizationName == "" { - return nil, errors.New("parameter authorizationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified authorization from the specified express route port. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the express route port. -// authorizationName - The name of the authorization. -// options - ExpressRoutePortAuthorizationsClientGetOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.Get -// method. -func (client *ExpressRoutePortAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientGetOptions) (ExpressRoutePortAuthorizationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, expressRoutePortName, authorizationName, options) - if err != nil { - return ExpressRoutePortAuthorizationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRoutePortAuthorizationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortAuthorizationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRoutePortAuthorizationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - if authorizationName == "" { - return nil, errors.New("parameter authorizationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRoutePortAuthorizationsClient) getHandleResponse(resp *http.Response) (ExpressRoutePortAuthorizationsClientGetResponse, error) { - result := ExpressRoutePortAuthorizationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortAuthorization); err != nil { - return ExpressRoutePortAuthorizationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all authorizations in an express route port. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the express route port. -// options - ExpressRoutePortAuthorizationsClientListOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.List -// method. -func (client *ExpressRoutePortAuthorizationsClient) NewListPager(resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortAuthorizationsClientListOptions) *runtime.Pager[ExpressRoutePortAuthorizationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortAuthorizationsClientListResponse]{ - More: func(page ExpressRoutePortAuthorizationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRoutePortAuthorizationsClientListResponse) (ExpressRoutePortAuthorizationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRoutePortAuthorizationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRoutePortAuthorizationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortAuthorizationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRoutePortAuthorizationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortAuthorizationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRoutePortAuthorizationsClient) listHandleResponse(resp *http.Response) (ExpressRoutePortAuthorizationsClientListResponse, error) { - result := ExpressRoutePortAuthorizationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortAuthorizationListResult); err != nil { - return ExpressRoutePortAuthorizationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteports_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteports_client.go deleted file mode 100644 index b51a5fa1..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteports_client.go +++ /dev/null @@ -1,484 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRoutePortsClient contains the methods for the ExpressRoutePorts group. -// Don't use this type directly, use NewExpressRoutePortsClient() instead. -type ExpressRoutePortsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRoutePortsClient creates a new instance of ExpressRoutePortsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRoutePortsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRoutePortsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified ExpressRoutePort resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the ExpressRoutePort resource. -// parameters - Parameters supplied to the create ExpressRoutePort operation. -// options - ExpressRoutePortsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortsClient.BeginCreateOrUpdate -// method. -func (client *ExpressRoutePortsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort, options *ExpressRoutePortsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRoutePortsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRoutePortName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRoutePortsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRoutePortsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified ExpressRoutePort resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRoutePortsClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort, options *ExpressRoutePortsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRoutePortName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ExpressRoutePortsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort, options *ExpressRoutePortsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified ExpressRoutePort resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the ExpressRoutePort resource. -// options - ExpressRoutePortsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortsClient.BeginDelete -// method. -func (client *ExpressRoutePortsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientBeginDeleteOptions) (*runtime.Poller[ExpressRoutePortsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, expressRoutePortName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ExpressRoutePortsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ExpressRoutePortsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified ExpressRoutePort resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ExpressRoutePortsClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ExpressRoutePortsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GenerateLOA - Generate a letter of authorization for the requested ExpressRoutePort resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of ExpressRoutePort. -// request - Request parameters supplied to generate a letter of authorization. -// options - ExpressRoutePortsClientGenerateLOAOptions contains the optional parameters for the ExpressRoutePortsClient.GenerateLOA -// method. -func (client *ExpressRoutePortsClient) GenerateLOA(ctx context.Context, resourceGroupName string, expressRoutePortName string, request GenerateExpressRoutePortsLOARequest, options *ExpressRoutePortsClientGenerateLOAOptions) (ExpressRoutePortsClientGenerateLOAResponse, error) { - req, err := client.generateLOACreateRequest(ctx, resourceGroupName, expressRoutePortName, request, options) - if err != nil { - return ExpressRoutePortsClientGenerateLOAResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRoutePortsClientGenerateLOAResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortsClientGenerateLOAResponse{}, runtime.NewResponseError(resp) - } - return client.generateLOAHandleResponse(resp) -} - -// generateLOACreateRequest creates the GenerateLOA request. -func (client *ExpressRoutePortsClient) generateLOACreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, request GenerateExpressRoutePortsLOARequest, options *ExpressRoutePortsClientGenerateLOAOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/generateLoa" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// generateLOAHandleResponse handles the GenerateLOA response. -func (client *ExpressRoutePortsClient) generateLOAHandleResponse(resp *http.Response) (ExpressRoutePortsClientGenerateLOAResponse, error) { - result := ExpressRoutePortsClientGenerateLOAResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GenerateExpressRoutePortsLOAResult); err != nil { - return ExpressRoutePortsClientGenerateLOAResponse{}, err - } - return result, nil -} - -// Get - Retrieves the requested ExpressRoutePort resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of ExpressRoutePort. -// options - ExpressRoutePortsClientGetOptions contains the optional parameters for the ExpressRoutePortsClient.Get method. -func (client *ExpressRoutePortsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientGetOptions) (ExpressRoutePortsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) - if err != nil { - return ExpressRoutePortsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRoutePortsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRoutePortsClient) getCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRoutePortsClient) getHandleResponse(resp *http.Response) (ExpressRoutePortsClientGetResponse, error) { - result := ExpressRoutePortsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePort); err != nil { - return ExpressRoutePortsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all the ExpressRoutePort resources in the specified subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.List method. -func (client *ExpressRoutePortsClient) NewListPager(options *ExpressRoutePortsClientListOptions) *runtime.Pager[ExpressRoutePortsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortsClientListResponse]{ - More: func(page ExpressRoutePortsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRoutePortsClientListResponse) (ExpressRoutePortsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRoutePortsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRoutePortsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRoutePortsClient) listCreateRequest(ctx context.Context, options *ExpressRoutePortsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRoutePortsClient) listHandleResponse(resp *http.Response) (ExpressRoutePortsClientListResponse, error) { - result := ExpressRoutePortsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortListResult); err != nil { - return ExpressRoutePortsClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - List all the ExpressRoutePort resources in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.ListByResourceGroup -// method. -func (client *ExpressRoutePortsClient) NewListByResourceGroupPager(resourceGroupName string, options *ExpressRoutePortsClientListByResourceGroupOptions) *runtime.Pager[ExpressRoutePortsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortsClientListByResourceGroupResponse]{ - More: func(page ExpressRoutePortsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRoutePortsClientListByResourceGroupResponse) (ExpressRoutePortsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRoutePortsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRoutePortsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ExpressRoutePortsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ExpressRoutePortsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ExpressRoutePortsClient) listByResourceGroupHandleResponse(resp *http.Response) (ExpressRoutePortsClientListByResourceGroupResponse, error) { - result := ExpressRoutePortsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortListResult); err != nil { - return ExpressRoutePortsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Update ExpressRoutePort tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the ExpressRoutePort resource. -// parameters - Parameters supplied to update ExpressRoutePort resource tags. -// options - ExpressRoutePortsClientUpdateTagsOptions contains the optional parameters for the ExpressRoutePortsClient.UpdateTags -// method. -func (client *ExpressRoutePortsClient) UpdateTags(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject, options *ExpressRoutePortsClientUpdateTagsOptions) (ExpressRoutePortsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, expressRoutePortName, parameters, options) - if err != nil { - return ExpressRoutePortsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRoutePortsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *ExpressRoutePortsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject, options *ExpressRoutePortsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if expressRoutePortName == "" { - return nil, errors.New("parameter expressRoutePortName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *ExpressRoutePortsClient) updateTagsHandleResponse(resp *http.Response) (ExpressRoutePortsClientUpdateTagsResponse, error) { - result := ExpressRoutePortsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePort); err != nil { - return ExpressRoutePortsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteportslocations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteportslocations_client.go deleted file mode 100644 index 6310479c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteportslocations_client.go +++ /dev/null @@ -1,171 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRoutePortsLocationsClient contains the methods for the ExpressRoutePortsLocations group. -// Don't use this type directly, use NewExpressRoutePortsLocationsClient() instead. -type ExpressRoutePortsLocationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRoutePortsLocationsClient creates a new instance of ExpressRoutePortsLocationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRoutePortsLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortsLocationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRoutePortsLocationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said -// peering location. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// locationName - Name of the requested ExpressRoutePort peering location. -// options - ExpressRoutePortsLocationsClientGetOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.Get -// method. -func (client *ExpressRoutePortsLocationsClient) Get(ctx context.Context, locationName string, options *ExpressRoutePortsLocationsClientGetOptions) (ExpressRoutePortsLocationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, locationName, options) - if err != nil { - return ExpressRoutePortsLocationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRoutePortsLocationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortsLocationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExpressRoutePortsLocationsClient) getCreateRequest(ctx context.Context, locationName string, options *ExpressRoutePortsLocationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if locationName == "" { - return nil, errors.New("parameter locationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExpressRoutePortsLocationsClient) getHandleResponse(resp *http.Response) (ExpressRoutePortsLocationsClientGetResponse, error) { - result := ExpressRoutePortsLocationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortsLocation); err != nil { - return ExpressRoutePortsLocationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. -// Available bandwidths can only be obtained when retrieving a specific peering location. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.List -// method. -func (client *ExpressRoutePortsLocationsClient) NewListPager(options *ExpressRoutePortsLocationsClientListOptions) *runtime.Pager[ExpressRoutePortsLocationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortsLocationsClientListResponse]{ - More: func(page ExpressRoutePortsLocationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRoutePortsLocationsClientListResponse) (ExpressRoutePortsLocationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRoutePortsLocationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRoutePortsLocationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRoutePortsLocationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRoutePortsLocationsClient) listCreateRequest(ctx context.Context, options *ExpressRoutePortsLocationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRoutePortsLocationsClient) listHandleResponse(resp *http.Response) (ExpressRoutePortsLocationsClientListResponse, error) { - result := ExpressRoutePortsLocationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortsLocationListResult); err != nil { - return ExpressRoutePortsLocationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteproviderportslocation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteproviderportslocation_client.go deleted file mode 100644 index 2774ea08..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteproviderportslocation_client.go +++ /dev/null @@ -1,107 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteProviderPortsLocationClient contains the methods for the ExpressRouteProviderPortsLocation group. -// Don't use this type directly, use NewExpressRouteProviderPortsLocationClient() instead. -type ExpressRouteProviderPortsLocationClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteProviderPortsLocationClient creates a new instance of ExpressRouteProviderPortsLocationClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteProviderPortsLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteProviderPortsLocationClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteProviderPortsLocationClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// List - Retrieves all the ExpressRouteProviderPorts in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ExpressRouteProviderPortsLocationClientListOptions contains the optional parameters for the ExpressRouteProviderPortsLocationClient.List -// method. -func (client *ExpressRouteProviderPortsLocationClient) List(ctx context.Context, options *ExpressRouteProviderPortsLocationClientListOptions) (ExpressRouteProviderPortsLocationClientListResponse, error) { - req, err := client.listCreateRequest(ctx, options) - if err != nil { - return ExpressRouteProviderPortsLocationClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteProviderPortsLocationClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteProviderPortsLocationClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *ExpressRouteProviderPortsLocationClient) listCreateRequest(ctx context.Context, options *ExpressRouteProviderPortsLocationClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRouteProviderPortsLocationClient) listHandleResponse(resp *http.Response) (ExpressRouteProviderPortsLocationClientListResponse, error) { - result := ExpressRouteProviderPortsLocationClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteProviderPortListResult); err != nil { - return ExpressRouteProviderPortsLocationClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteserviceproviders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteserviceproviders_client.go deleted file mode 100644 index cc257630..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/expressrouteserviceproviders_client.go +++ /dev/null @@ -1,117 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExpressRouteServiceProvidersClient contains the methods for the ExpressRouteServiceProviders group. -// Don't use this type directly, use NewExpressRouteServiceProvidersClient() instead. -type ExpressRouteServiceProvidersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExpressRouteServiceProvidersClient creates a new instance of ExpressRouteServiceProvidersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExpressRouteServiceProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteServiceProvidersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExpressRouteServiceProvidersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Gets all the available express route service providers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.List -// method. -func (client *ExpressRouteServiceProvidersClient) NewListPager(options *ExpressRouteServiceProvidersClientListOptions) *runtime.Pager[ExpressRouteServiceProvidersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ExpressRouteServiceProvidersClientListResponse]{ - More: func(page ExpressRouteServiceProvidersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ExpressRouteServiceProvidersClientListResponse) (ExpressRouteServiceProvidersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ExpressRouteServiceProvidersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExpressRouteServiceProvidersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ExpressRouteServiceProvidersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ExpressRouteServiceProvidersClient) listCreateRequest(ctx context.Context, options *ExpressRouteServiceProvidersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ExpressRouteServiceProvidersClient) listHandleResponse(resp *http.Response) (ExpressRouteServiceProvidersClientListResponse, error) { - result := ExpressRouteServiceProvidersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteServiceProviderListResult); err != nil { - return ExpressRouteServiceProvidersClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicies_client.go deleted file mode 100644 index 6a7e0e81..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicies_client.go +++ /dev/null @@ -1,429 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// FirewallPoliciesClient contains the methods for the FirewallPolicies group. -// Don't use this type directly, use NewFirewallPoliciesClient() instead. -type FirewallPoliciesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewFirewallPoliciesClient creates a new instance of FirewallPoliciesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPoliciesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &FirewallPoliciesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified Firewall Policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// parameters - Parameters supplied to the create or update Firewall Policy operation. -// options - FirewallPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPoliciesClient.BeginCreateOrUpdate -// method. -func (client *FirewallPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy, options *FirewallPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallPoliciesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, firewallPolicyName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FirewallPoliciesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[FirewallPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified Firewall Policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *FirewallPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy, options *FirewallPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *FirewallPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy, options *FirewallPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified Firewall Policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the FirewallPoliciesClient.BeginDelete -// method. -func (client *FirewallPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientBeginDeleteOptions) (*runtime.Poller[FirewallPoliciesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, firewallPolicyName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FirewallPoliciesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[FirewallPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified Firewall Policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *FirewallPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *FirewallPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Firewall Policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPoliciesClientGetOptions contains the optional parameters for the FirewallPoliciesClient.Get method. -func (client *FirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientGetOptions) (FirewallPoliciesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) - if err != nil { - return FirewallPoliciesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPoliciesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPoliciesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *FirewallPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *FirewallPoliciesClient) getHandleResponse(resp *http.Response) (FirewallPoliciesClientGetResponse, error) { - result := FirewallPoliciesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicy); err != nil { - return FirewallPoliciesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all Firewall Policies in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.List method. -func (client *FirewallPoliciesClient) NewListPager(resourceGroupName string, options *FirewallPoliciesClientListOptions) *runtime.Pager[FirewallPoliciesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[FirewallPoliciesClientListResponse]{ - More: func(page FirewallPoliciesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *FirewallPoliciesClientListResponse) (FirewallPoliciesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FirewallPoliciesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPoliciesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *FirewallPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *FirewallPoliciesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *FirewallPoliciesClient) listHandleResponse(resp *http.Response) (FirewallPoliciesClientListResponse, error) { - result := FirewallPoliciesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyListResult); err != nil { - return FirewallPoliciesClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the Firewall Policies in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.ListAll -// method. -func (client *FirewallPoliciesClient) NewListAllPager(options *FirewallPoliciesClientListAllOptions) *runtime.Pager[FirewallPoliciesClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[FirewallPoliciesClientListAllResponse]{ - More: func(page FirewallPoliciesClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *FirewallPoliciesClientListAllResponse) (FirewallPoliciesClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FirewallPoliciesClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPoliciesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPoliciesClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *FirewallPoliciesClient) listAllCreateRequest(ctx context.Context, options *FirewallPoliciesClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *FirewallPoliciesClient) listAllHandleResponse(resp *http.Response) (FirewallPoliciesClientListAllResponse, error) { - result := FirewallPoliciesClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyListResult); err != nil { - return FirewallPoliciesClientListAllResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates tags of a Azure Firewall Policy resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// parameters - Parameters supplied to update Azure Firewall Policy tags. -// options - FirewallPoliciesClientUpdateTagsOptions contains the optional parameters for the FirewallPoliciesClient.UpdateTags -// method. -func (client *FirewallPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters TagsObject, options *FirewallPoliciesClientUpdateTagsOptions) (FirewallPoliciesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) - if err != nil { - return FirewallPoliciesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPoliciesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPoliciesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *FirewallPoliciesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters TagsObject, options *FirewallPoliciesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *FirewallPoliciesClient) updateTagsHandleResponse(resp *http.Response) (FirewallPoliciesClientUpdateTagsResponse, error) { - result := FirewallPoliciesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicy); err != nil { - return FirewallPoliciesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignatures_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignatures_client.go deleted file mode 100644 index 56901b4f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignatures_client.go +++ /dev/null @@ -1,114 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// FirewallPolicyIdpsSignaturesClient contains the methods for the FirewallPolicyIdpsSignatures group. -// Don't use this type directly, use NewFirewallPolicyIdpsSignaturesClient() instead. -type FirewallPolicyIdpsSignaturesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewFirewallPolicyIdpsSignaturesClient creates a new instance of FirewallPolicyIdpsSignaturesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewFirewallPolicyIdpsSignaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &FirewallPolicyIdpsSignaturesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// List - Retrieves the current status of IDPS signatures for the relevant policy -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPolicyIdpsSignaturesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesClient.List -// method. -func (client *FirewallPolicyIdpsSignaturesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters IDPSQueryObject, options *FirewallPolicyIdpsSignaturesClientListOptions) (FirewallPolicyIdpsSignaturesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) - if err != nil { - return FirewallPolicyIdpsSignaturesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPolicyIdpsSignaturesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPolicyIdpsSignaturesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *FirewallPolicyIdpsSignaturesClient) listCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters IDPSQueryObject, options *FirewallPolicyIdpsSignaturesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsSignatures" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// listHandleResponse handles the List response. -func (client *FirewallPolicyIdpsSignaturesClient) listHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesClientListResponse, error) { - result := FirewallPolicyIdpsSignaturesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.QueryResults); err != nil { - return FirewallPolicyIdpsSignaturesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesfiltervalues_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesfiltervalues_client.go deleted file mode 100644 index 23ea5dba..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesfiltervalues_client.go +++ /dev/null @@ -1,114 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// FirewallPolicyIdpsSignaturesFilterValuesClient contains the methods for the FirewallPolicyIdpsSignaturesFilterValues group. -// Don't use this type directly, use NewFirewallPolicyIdpsSignaturesFilterValuesClient() instead. -type FirewallPolicyIdpsSignaturesFilterValuesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewFirewallPolicyIdpsSignaturesFilterValuesClient creates a new instance of FirewallPolicyIdpsSignaturesFilterValuesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewFirewallPolicyIdpsSignaturesFilterValuesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesFilterValuesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &FirewallPolicyIdpsSignaturesFilterValuesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// List - Retrieves the current filter values for the signatures overrides -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPolicyIdpsSignaturesFilterValuesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesFilterValuesClient.List -// method. -func (client *FirewallPolicyIdpsSignaturesFilterValuesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignatureOverridesFilterValuesQuery, options *FirewallPolicyIdpsSignaturesFilterValuesClientListOptions) (FirewallPolicyIdpsSignaturesFilterValuesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) - if err != nil { - return FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *FirewallPolicyIdpsSignaturesFilterValuesClient) listCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignatureOverridesFilterValuesQuery, options *FirewallPolicyIdpsSignaturesFilterValuesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsFilterOptions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// listHandleResponse handles the List response. -func (client *FirewallPolicyIdpsSignaturesFilterValuesClient) listHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesFilterValuesClientListResponse, error) { - result := FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SignatureOverridesFilterValuesResponse); err != nil { - return FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesoverrides_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesoverrides_client.go deleted file mode 100644 index 05fdd98d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesoverrides_client.go +++ /dev/null @@ -1,287 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// FirewallPolicyIdpsSignaturesOverridesClient contains the methods for the FirewallPolicyIdpsSignaturesOverrides group. -// Don't use this type directly, use NewFirewallPolicyIdpsSignaturesOverridesClient() instead. -type FirewallPolicyIdpsSignaturesOverridesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewFirewallPolicyIdpsSignaturesOverridesClient creates a new instance of FirewallPolicyIdpsSignaturesOverridesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewFirewallPolicyIdpsSignaturesOverridesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesOverridesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &FirewallPolicyIdpsSignaturesOverridesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Returns all signatures overrides for a specific policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPolicyIdpsSignaturesOverridesClientGetOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Get -// method. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyIdpsSignaturesOverridesClientGetOptions) (FirewallPolicyIdpsSignaturesOverridesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) - if err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPolicyIdpsSignaturesOverridesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) getCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyIdpsSignaturesOverridesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) getHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientGetResponse, error) { - result := FirewallPolicyIdpsSignaturesOverridesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverrides); err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientGetResponse{}, err - } - return result, nil -} - -// List - Returns all signatures overrides objects for a specific policy as a list containing a single value. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPolicyIdpsSignaturesOverridesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.List -// method. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyIdpsSignaturesOverridesClientListOptions) (FirewallPolicyIdpsSignaturesOverridesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) - if err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPolicyIdpsSignaturesOverridesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) listCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyIdpsSignaturesOverridesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) listHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientListResponse, error) { - result := FirewallPolicyIdpsSignaturesOverridesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverridesList); err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientListResponse{}, err - } - return result, nil -} - -// Patch - Will update the status of policy's signature overrides for IDPS -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// parameters - Will contain all properties of the object to put -// options - FirewallPolicyIdpsSignaturesOverridesClientPatchOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Patch -// method. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) Patch(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignaturesOverrides, options *FirewallPolicyIdpsSignaturesOverridesClientPatchOptions) (FirewallPolicyIdpsSignaturesOverridesClientPatchResponse, error) { - req, err := client.patchCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) - if err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{}, runtime.NewResponseError(resp) - } - return client.patchHandleResponse(resp) -} - -// patchCreateRequest creates the Patch request. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) patchCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignaturesOverrides, options *FirewallPolicyIdpsSignaturesOverridesClientPatchOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// patchHandleResponse handles the Patch response. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) patchHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientPatchResponse, error) { - result := FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverrides); err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{}, err - } - return result, nil -} - -// Put - Will override/create a new signature overrides for the policy's IDPS -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// parameters - Will contain all properties of the object to put -// options - FirewallPolicyIdpsSignaturesOverridesClientPutOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Put -// method. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) Put(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignaturesOverrides, options *FirewallPolicyIdpsSignaturesOverridesClientPutOptions) (FirewallPolicyIdpsSignaturesOverridesClientPutResponse, error) { - req, err := client.putCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) - if err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientPutResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientPutResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPolicyIdpsSignaturesOverridesClientPutResponse{}, runtime.NewResponseError(resp) - } - return client.putHandleResponse(resp) -} - -// putCreateRequest creates the Put request. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) putCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignaturesOverrides, options *FirewallPolicyIdpsSignaturesOverridesClientPutOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// putHandleResponse handles the Put response. -func (client *FirewallPolicyIdpsSignaturesOverridesClient) putHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientPutResponse, error) { - result := FirewallPolicyIdpsSignaturesOverridesClientPutResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverrides); err != nil { - return FirewallPolicyIdpsSignaturesOverridesClientPutResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyrulecollectiongroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyrulecollectiongroups_client.go deleted file mode 100644 index f3cb915a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/firewallpolicyrulecollectiongroups_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// FirewallPolicyRuleCollectionGroupsClient contains the methods for the FirewallPolicyRuleCollectionGroups group. -// Don't use this type directly, use NewFirewallPolicyRuleCollectionGroupsClient() instead. -type FirewallPolicyRuleCollectionGroupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewFirewallPolicyRuleCollectionGroupsClient creates a new instance of FirewallPolicyRuleCollectionGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewFirewallPolicyRuleCollectionGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyRuleCollectionGroupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &FirewallPolicyRuleCollectionGroupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified FirewallPolicyRuleCollectionGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. -// parameters - Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup operation. -// options - FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate -// method. -func (client *FirewallPolicyRuleCollectionGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup, options *FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified FirewallPolicyRuleCollectionGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *FirewallPolicyRuleCollectionGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup, options *FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *FirewallPolicyRuleCollectionGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup, options *FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if ruleCollectionGroupName == "" { - return nil, errors.New("parameter ruleCollectionGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionGroupName}", url.PathEscape(ruleCollectionGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified FirewallPolicyRuleCollectionGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. -// options - FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginDelete -// method. -func (client *FirewallPolicyRuleCollectionGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions) (*runtime.Poller[FirewallPolicyRuleCollectionGroupsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FirewallPolicyRuleCollectionGroupsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[FirewallPolicyRuleCollectionGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified FirewallPolicyRuleCollectionGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *FirewallPolicyRuleCollectionGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *FirewallPolicyRuleCollectionGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if ruleCollectionGroupName == "" { - return nil, errors.New("parameter ruleCollectionGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionGroupName}", url.PathEscape(ruleCollectionGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified FirewallPolicyRuleCollectionGroup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. -// options - FirewallPolicyRuleCollectionGroupsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.Get -// method. -func (client *FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientGetOptions) (FirewallPolicyRuleCollectionGroupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPolicyRuleCollectionGroupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *FirewallPolicyRuleCollectionGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if ruleCollectionGroupName == "" { - return nil, errors.New("parameter ruleCollectionGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionGroupName}", url.PathEscape(ruleCollectionGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *FirewallPolicyRuleCollectionGroupsClient) getHandleResponse(resp *http.Response) (FirewallPolicyRuleCollectionGroupsClientGetResponse, error) { - result := FirewallPolicyRuleCollectionGroupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyRuleCollectionGroup); err != nil { - return FirewallPolicyRuleCollectionGroupsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.List -// method. -func (client *FirewallPolicyRuleCollectionGroupsClient) NewListPager(resourceGroupName string, firewallPolicyName string, options *FirewallPolicyRuleCollectionGroupsClientListOptions) *runtime.Pager[FirewallPolicyRuleCollectionGroupsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[FirewallPolicyRuleCollectionGroupsClientListResponse]{ - More: func(page FirewallPolicyRuleCollectionGroupsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *FirewallPolicyRuleCollectionGroupsClientListResponse) (FirewallPolicyRuleCollectionGroupsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FirewallPolicyRuleCollectionGroupsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *FirewallPolicyRuleCollectionGroupsClient) listCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyRuleCollectionGroupsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if firewallPolicyName == "" { - return nil, errors.New("parameter firewallPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *FirewallPolicyRuleCollectionGroupsClient) listHandleResponse(resp *http.Response) (FirewallPolicyRuleCollectionGroupsClientListResponse, error) { - result := FirewallPolicyRuleCollectionGroupsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyRuleCollectionGroupListResult); err != nil { - return FirewallPolicyRuleCollectionGroupsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/flowlogs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/flowlogs_client.go deleted file mode 100644 index 179cd512..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/flowlogs_client.go +++ /dev/null @@ -1,389 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// FlowLogsClient contains the methods for the FlowLogs group. -// Don't use this type directly, use NewFlowLogsClient() instead. -type FlowLogsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewFlowLogsClient creates a new instance of FlowLogsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewFlowLogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FlowLogsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &FlowLogsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update a flow log for the specified network security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// flowLogName - The name of the flow log. -// parameters - Parameters that define the create or update flow log resource. -// options - FlowLogsClientBeginCreateOrUpdateOptions contains the optional parameters for the FlowLogsClient.BeginCreateOrUpdate -// method. -func (client *FlowLogsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog, options *FlowLogsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FlowLogsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FlowLogsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[FlowLogsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update a flow log for the specified network security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *FlowLogsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog, options *FlowLogsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *FlowLogsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog, options *FlowLogsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if flowLogName == "" { - return nil, errors.New("parameter flowLogName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{flowLogName}", url.PathEscape(flowLogName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified flow log resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// flowLogName - The name of the flow log resource. -// options - FlowLogsClientBeginDeleteOptions contains the optional parameters for the FlowLogsClient.BeginDelete method. -func (client *FlowLogsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientBeginDeleteOptions) (*runtime.Poller[FlowLogsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, flowLogName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FlowLogsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[FlowLogsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified flow log resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *FlowLogsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *FlowLogsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if flowLogName == "" { - return nil, errors.New("parameter flowLogName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{flowLogName}", url.PathEscape(flowLogName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a flow log resource by name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// flowLogName - The name of the flow log resource. -// options - FlowLogsClientGetOptions contains the optional parameters for the FlowLogsClient.Get method. -func (client *FlowLogsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientGetOptions) (FlowLogsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, options) - if err != nil { - return FlowLogsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FlowLogsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FlowLogsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *FlowLogsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if flowLogName == "" { - return nil, errors.New("parameter flowLogName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{flowLogName}", url.PathEscape(flowLogName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *FlowLogsClient) getHandleResponse(resp *http.Response) (FlowLogsClientGetResponse, error) { - result := FlowLogsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FlowLog); err != nil { - return FlowLogsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all flow log resources for the specified Network Watcher. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// options - FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.List method. -func (client *FlowLogsClient) NewListPager(resourceGroupName string, networkWatcherName string, options *FlowLogsClientListOptions) *runtime.Pager[FlowLogsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[FlowLogsClientListResponse]{ - More: func(page FlowLogsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *FlowLogsClientListResponse) (FlowLogsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return FlowLogsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FlowLogsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FlowLogsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *FlowLogsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, options *FlowLogsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *FlowLogsClient) listHandleResponse(resp *http.Response) (FlowLogsClientListResponse, error) { - result := FlowLogsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FlowLogListResult); err != nil { - return FlowLogsClientListResponse{}, err - } - return result, nil -} - -// UpdateTags - Update tags of the specified flow log. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// flowLogName - The name of the flow log. -// parameters - Parameters supplied to update flow log tags. -// options - FlowLogsClientUpdateTagsOptions contains the optional parameters for the FlowLogsClient.UpdateTags method. -func (client *FlowLogsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters TagsObject, options *FlowLogsClientUpdateTagsOptions) (FlowLogsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) - if err != nil { - return FlowLogsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FlowLogsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FlowLogsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *FlowLogsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters TagsObject, options *FlowLogsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if flowLogName == "" { - return nil, errors.New("parameter flowLogName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{flowLogName}", url.PathEscape(flowLogName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *FlowLogsClient) updateTagsHandleResponse(resp *http.Response) (FlowLogsClientUpdateTagsResponse, error) { - result := FlowLogsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FlowLog); err != nil { - return FlowLogsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/groups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/groups_client.go deleted file mode 100644 index 78f244a6..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/groups_client.go +++ /dev/null @@ -1,334 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// GroupsClient contains the methods for the NetworkGroups group. -// Don't use this type directly, use NewGroupsClient() instead. -type GroupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewGroupsClient creates a new instance of GroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &GroupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a network group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// parameters - Parameters supplied to the specify which network group need to create -// options - GroupsClientCreateOrUpdateOptions contains the optional parameters for the GroupsClient.CreateOrUpdate method. -func (client *GroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, parameters Group, options *GroupsClientCreateOrUpdateOptions) (GroupsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, parameters, options) - if err != nil { - return GroupsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GroupsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return GroupsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *GroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, parameters Group, options *GroupsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if networkGroupName == "" { - return nil, errors.New("parameter networkGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - if options != nil && options.IfMatch != nil { - req.Raw().Header["If-Match"] = []string{*options.IfMatch} - } - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *GroupsClient) createOrUpdateHandleResponse(resp *http.Response) (GroupsClientCreateOrUpdateResponse, error) { - result := GroupsClientCreateOrUpdateResponse{} - if val := resp.Header.Get("ETag"); val != "" { - result.ETag = &val - } - if err := runtime.UnmarshalAsJSON(resp, &result.Group); err != nil { - return GroupsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes a network group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// options - GroupsClientBeginDeleteOptions contains the optional parameters for the GroupsClient.BeginDelete method. -func (client *GroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientBeginDeleteOptions) (*runtime.Poller[GroupsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, networkGroupName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[GroupsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[GroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a network group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *GroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *GroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if networkGroupName == "" { - return nil, errors.New("parameter networkGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Force != nil { - reqQP.Set("force", strconv.FormatBool(*options.Force)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified network group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// options - GroupsClientGetOptions contains the optional parameters for the GroupsClient.Get method. -func (client *GroupsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientGetOptions) (GroupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, options) - if err != nil { - return GroupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GroupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GroupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *GroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if networkGroupName == "" { - return nil, errors.New("parameter networkGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *GroupsClient) getHandleResponse(resp *http.Response) (GroupsClientGetResponse, error) { - result := GroupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Group); err != nil { - return GroupsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the specified network group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - GroupsClientListOptions contains the optional parameters for the GroupsClient.List method. -func (client *GroupsClient) NewListPager(resourceGroupName string, networkManagerName string, options *GroupsClientListOptions) *runtime.Pager[GroupsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[GroupsClientListResponse]{ - More: func(page GroupsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *GroupsClientListResponse) (GroupsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return GroupsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return GroupsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GroupsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *GroupsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *GroupsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *GroupsClient) listHandleResponse(resp *http.Response) (GroupsClientListResponse, error) { - result := GroupsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GroupListResult); err != nil { - return GroupsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/hubroutetables_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/hubroutetables_client.go deleted file mode 100644 index 9aac479e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/hubroutetables_client.go +++ /dev/null @@ -1,328 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// HubRouteTablesClient contains the methods for the HubRouteTables group. -// Don't use this type directly, use NewHubRouteTablesClient() instead. -type HubRouteTablesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewHubRouteTablesClient creates a new instance of HubRouteTablesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewHubRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubRouteTablesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &HubRouteTablesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the RouteTable. -// routeTableParameters - Parameters supplied to create or update RouteTable. -// options - HubRouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the HubRouteTablesClient.BeginCreateOrUpdate -// method. -func (client *HubRouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable, options *HubRouteTablesClientBeginCreateOrUpdateOptions) (*runtime.Poller[HubRouteTablesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeTableName, routeTableParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[HubRouteTablesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[HubRouteTablesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *HubRouteTablesClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable, options *HubRouteTablesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, routeTableParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *HubRouteTablesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable, options *HubRouteTablesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, routeTableParameters) -} - -// BeginDelete - Deletes a RouteTable. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the RouteTable. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the RouteTable. -// options - HubRouteTablesClientBeginDeleteOptions contains the optional parameters for the HubRouteTablesClient.BeginDelete -// method. -func (client *HubRouteTablesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientBeginDeleteOptions) (*runtime.Poller[HubRouteTablesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeTableName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[HubRouteTablesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[HubRouteTablesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a RouteTable. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *HubRouteTablesClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *HubRouteTablesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a RouteTable. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the RouteTable. -// options - HubRouteTablesClientGetOptions contains the optional parameters for the HubRouteTablesClient.Get method. -func (client *HubRouteTablesClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientGetOptions) (HubRouteTablesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) - if err != nil { - return HubRouteTablesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HubRouteTablesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HubRouteTablesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *HubRouteTablesClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *HubRouteTablesClient) getHandleResponse(resp *http.Response) (HubRouteTablesClientGetResponse, error) { - result := HubRouteTablesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HubRouteTable); err != nil { - return HubRouteTablesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Retrieves the details of all RouteTables. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.List method. -func (client *HubRouteTablesClient) NewListPager(resourceGroupName string, virtualHubName string, options *HubRouteTablesClientListOptions) *runtime.Pager[HubRouteTablesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[HubRouteTablesClientListResponse]{ - More: func(page HubRouteTablesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *HubRouteTablesClientListResponse) (HubRouteTablesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return HubRouteTablesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HubRouteTablesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HubRouteTablesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *HubRouteTablesClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *HubRouteTablesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *HubRouteTablesClient) listHandleResponse(resp *http.Response) (HubRouteTablesClientListResponse, error) { - result := HubRouteTablesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListHubRouteTablesResult); err != nil { - return HubRouteTablesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/hubvirtualnetworkconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/hubvirtualnetworkconnections_client.go deleted file mode 100644 index 7a189455..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/hubvirtualnetworkconnections_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// HubVirtualNetworkConnectionsClient contains the methods for the HubVirtualNetworkConnections group. -// Don't use this type directly, use NewHubVirtualNetworkConnectionsClient() instead. -type HubVirtualNetworkConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewHubVirtualNetworkConnectionsClient creates a new instance of HubVirtualNetworkConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewHubVirtualNetworkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubVirtualNetworkConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &HubVirtualNetworkConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a hub virtual network connection if it doesn't exist else updates the existing one. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the HubVirtualNetworkConnection. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the HubVirtualNetworkConnection. -// hubVirtualNetworkConnectionParameters - Parameters supplied to create or update a hub virtual network connection. -// options - HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate -// method. -func (client *HubVirtualNetworkConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection, options *HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, connectionName, hubVirtualNetworkConnectionParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a hub virtual network connection if it doesn't exist else updates the existing one. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *HubVirtualNetworkConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection, options *HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, hubVirtualNetworkConnectionParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *HubVirtualNetworkConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection, options *HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hubVirtualNetworkConnectionParameters) -} - -// BeginDelete - Deletes a HubVirtualNetworkConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the HubVirtualNetworkConnection. -// options - HubVirtualNetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginDelete -// method. -func (client *HubVirtualNetworkConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientBeginDeleteOptions) (*runtime.Poller[HubVirtualNetworkConnectionsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, connectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[HubVirtualNetworkConnectionsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[HubVirtualNetworkConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a HubVirtualNetworkConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *HubVirtualNetworkConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *HubVirtualNetworkConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a HubVirtualNetworkConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the vpn connection. -// options - HubVirtualNetworkConnectionsClientGetOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.Get -// method. -func (client *HubVirtualNetworkConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientGetOptions) (HubVirtualNetworkConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) - if err != nil { - return HubVirtualNetworkConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HubVirtualNetworkConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HubVirtualNetworkConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *HubVirtualNetworkConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *HubVirtualNetworkConnectionsClient) getHandleResponse(resp *http.Response) (HubVirtualNetworkConnectionsClientGetResponse, error) { - result := HubVirtualNetworkConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HubVirtualNetworkConnection); err != nil { - return HubVirtualNetworkConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Retrieves the details of all HubVirtualNetworkConnections. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.List -// method. -func (client *HubVirtualNetworkConnectionsClient) NewListPager(resourceGroupName string, virtualHubName string, options *HubVirtualNetworkConnectionsClientListOptions) *runtime.Pager[HubVirtualNetworkConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[HubVirtualNetworkConnectionsClientListResponse]{ - More: func(page HubVirtualNetworkConnectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *HubVirtualNetworkConnectionsClientListResponse) (HubVirtualNetworkConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return HubVirtualNetworkConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return HubVirtualNetworkConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return HubVirtualNetworkConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *HubVirtualNetworkConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *HubVirtualNetworkConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *HubVirtualNetworkConnectionsClient) listHandleResponse(resp *http.Response) (HubVirtualNetworkConnectionsClientListResponse, error) { - result := HubVirtualNetworkConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListHubVirtualNetworkConnectionsResult); err != nil { - return HubVirtualNetworkConnectionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/inboundnatrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/inboundnatrules_client.go deleted file mode 100644 index 5a11d49c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/inboundnatrules_client.go +++ /dev/null @@ -1,331 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// InboundNatRulesClient contains the methods for the InboundNatRules group. -// Don't use this type directly, use NewInboundNatRulesClient() instead. -type InboundNatRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewInboundNatRulesClient creates a new instance of InboundNatRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewInboundNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundNatRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &InboundNatRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a load balancer inbound NAT rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// inboundNatRuleName - The name of the inbound NAT rule. -// inboundNatRuleParameters - Parameters supplied to the create or update inbound NAT rule operation. -// options - InboundNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundNatRulesClient.BeginCreateOrUpdate -// method. -func (client *InboundNatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, options *InboundNatRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[InboundNatRulesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[InboundNatRulesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[InboundNatRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a load balancer inbound NAT rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *InboundNatRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, options *InboundNatRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *InboundNatRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, options *InboundNatRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if inboundNatRuleName == "" { - return nil, errors.New("parameter inboundNatRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{inboundNatRuleName}", url.PathEscape(inboundNatRuleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, inboundNatRuleParameters) -} - -// BeginDelete - Deletes the specified load balancer inbound NAT rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// inboundNatRuleName - The name of the inbound NAT rule. -// options - InboundNatRulesClientBeginDeleteOptions contains the optional parameters for the InboundNatRulesClient.BeginDelete -// method. -func (client *InboundNatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientBeginDeleteOptions) (*runtime.Poller[InboundNatRulesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[InboundNatRulesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[InboundNatRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified load balancer inbound NAT rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *InboundNatRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *InboundNatRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if inboundNatRuleName == "" { - return nil, errors.New("parameter inboundNatRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{inboundNatRuleName}", url.PathEscape(inboundNatRuleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified load balancer inbound NAT rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// inboundNatRuleName - The name of the inbound NAT rule. -// options - InboundNatRulesClientGetOptions contains the optional parameters for the InboundNatRulesClient.Get method. -func (client *InboundNatRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientGetOptions) (InboundNatRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) - if err != nil { - return InboundNatRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InboundNatRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InboundNatRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *InboundNatRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if inboundNatRuleName == "" { - return nil, errors.New("parameter inboundNatRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{inboundNatRuleName}", url.PathEscape(inboundNatRuleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *InboundNatRulesClient) getHandleResponse(resp *http.Response) (InboundNatRulesClientGetResponse, error) { - result := InboundNatRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InboundNatRule); err != nil { - return InboundNatRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the inbound NAT rules in a load balancer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.List method. -func (client *InboundNatRulesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *InboundNatRulesClientListOptions) *runtime.Pager[InboundNatRulesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[InboundNatRulesClientListResponse]{ - More: func(page InboundNatRulesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InboundNatRulesClientListResponse) (InboundNatRulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InboundNatRulesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InboundNatRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InboundNatRulesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *InboundNatRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *InboundNatRulesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *InboundNatRulesClient) listHandleResponse(resp *http.Response) (InboundNatRulesClientListResponse, error) { - result := InboundNatRulesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InboundNatRuleListResult); err != nil { - return InboundNatRulesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/inboundsecurityrule_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/inboundsecurityrule_client.go deleted file mode 100644 index b30ffbff..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/inboundsecurityrule_client.go +++ /dev/null @@ -1,128 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// InboundSecurityRuleClient contains the methods for the InboundSecurityRule group. -// Don't use this type directly, use NewInboundSecurityRuleClient() instead. -type InboundSecurityRuleClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewInboundSecurityRuleClient creates a new instance of InboundSecurityRuleClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewInboundSecurityRuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundSecurityRuleClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &InboundSecurityRuleClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance Inbound Security Rules. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of the Network Virtual Appliance. -// ruleCollectionName - The name of security rule collection. -// parameters - Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. -// options - InboundSecurityRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundSecurityRuleClient.BeginCreateOrUpdate -// method. -func (client *InboundSecurityRuleClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule, options *InboundSecurityRuleClientBeginCreateOrUpdateOptions) (*runtime.Poller[InboundSecurityRuleClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[InboundSecurityRuleClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[InboundSecurityRuleClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified Network Virtual Appliance Inbound Security Rules. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *InboundSecurityRuleClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule, options *InboundSecurityRuleClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *InboundSecurityRuleClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule, options *InboundSecurityRuleClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkVirtualApplianceName == "" { - return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) - if ruleCollectionName == "" { - return nil, errors.New("parameter ruleCollectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfaceipconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfaceipconfigurations_client.go deleted file mode 100644 index 6f364b99..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfaceipconfigurations_client.go +++ /dev/null @@ -1,189 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// InterfaceIPConfigurationsClient contains the methods for the NetworkInterfaceIPConfigurations group. -// Don't use this type directly, use NewInterfaceIPConfigurationsClient() instead. -type InterfaceIPConfigurationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewInterfaceIPConfigurationsClient creates a new instance of InterfaceIPConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewInterfaceIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceIPConfigurationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &InterfaceIPConfigurationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the specified network interface ip configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// ipConfigurationName - The name of the ip configuration name. -// options - InterfaceIPConfigurationsClientGetOptions contains the optional parameters for the InterfaceIPConfigurationsClient.Get -// method. -func (client *InterfaceIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, ipConfigurationName string, options *InterfaceIPConfigurationsClientGetOptions) (InterfaceIPConfigurationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkInterfaceName, ipConfigurationName, options) - if err != nil { - return InterfaceIPConfigurationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfaceIPConfigurationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfaceIPConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *InterfaceIPConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, ipConfigurationName string, options *InterfaceIPConfigurationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if ipConfigurationName == "" { - return nil, errors.New("parameter ipConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *InterfaceIPConfigurationsClient) getHandleResponse(resp *http.Response) (InterfaceIPConfigurationsClientGetResponse, error) { - result := InterfaceIPConfigurationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfiguration); err != nil { - return InterfaceIPConfigurationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get all ip configurations in a network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.List -// method. -func (client *InterfaceIPConfigurationsClient) NewListPager(resourceGroupName string, networkInterfaceName string, options *InterfaceIPConfigurationsClientListOptions) *runtime.Pager[InterfaceIPConfigurationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[InterfaceIPConfigurationsClientListResponse]{ - More: func(page InterfaceIPConfigurationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InterfaceIPConfigurationsClientListResponse) (InterfaceIPConfigurationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfaceIPConfigurationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfaceIPConfigurationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfaceIPConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *InterfaceIPConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfaceIPConfigurationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *InterfaceIPConfigurationsClient) listHandleResponse(resp *http.Response) (InterfaceIPConfigurationsClientListResponse, error) { - result := InterfaceIPConfigurationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfigurationListResult); err != nil { - return InterfaceIPConfigurationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfaceloadbalancers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfaceloadbalancers_client.go deleted file mode 100644 index 25841beb..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfaceloadbalancers_client.go +++ /dev/null @@ -1,127 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// InterfaceLoadBalancersClient contains the methods for the NetworkInterfaceLoadBalancers group. -// Don't use this type directly, use NewInterfaceLoadBalancersClient() instead. -type InterfaceLoadBalancersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewInterfaceLoadBalancersClient creates a new instance of InterfaceLoadBalancersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewInterfaceLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceLoadBalancersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &InterfaceLoadBalancersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - List all load balancers in a network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.List -// method. -func (client *InterfaceLoadBalancersClient) NewListPager(resourceGroupName string, networkInterfaceName string, options *InterfaceLoadBalancersClientListOptions) *runtime.Pager[InterfaceLoadBalancersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[InterfaceLoadBalancersClientListResponse]{ - More: func(page InterfaceLoadBalancersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InterfaceLoadBalancersClientListResponse) (InterfaceLoadBalancersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfaceLoadBalancersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfaceLoadBalancersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfaceLoadBalancersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *InterfaceLoadBalancersClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfaceLoadBalancersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *InterfaceLoadBalancersClient) listHandleResponse(resp *http.Response) (InterfaceLoadBalancersClientListResponse, error) { - result := InterfaceLoadBalancersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceLoadBalancerListResult); err != nil { - return InterfaceLoadBalancersClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfaces_client.go deleted file mode 100644 index 2fcd6b5a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfaces_client.go +++ /dev/null @@ -1,1148 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// InterfacesClient contains the methods for the NetworkInterfaces group. -// Don't use this type directly, use NewInterfacesClient() instead. -type InterfacesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewInterfacesClient creates a new instance of InterfacesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfacesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &InterfacesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// parameters - Parameters supplied to the create or update network interface operation. -// options - InterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfacesClient.BeginCreateOrUpdate -// method. -func (client *InterfacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface, options *InterfacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[InterfacesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkInterfaceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[InterfacesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[InterfacesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *InterfacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface, options *InterfacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkInterfaceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *InterfacesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface, options *InterfacesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientBeginDeleteOptions contains the optional parameters for the InterfacesClient.BeginDelete method. -func (client *InterfacesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginDeleteOptions) (*runtime.Poller[InterfacesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkInterfaceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[InterfacesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[InterfacesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *InterfacesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *InterfacesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets information about the specified network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientGetOptions contains the optional parameters for the InterfacesClient.Get method. -func (client *InterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientGetOptions) (InterfacesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) - if err != nil { - return InterfacesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *InterfacesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *InterfacesClient) getHandleResponse(resp *http.Response) (InterfacesClientGetResponse, error) { - result := InterfacesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { - return InterfacesClientGetResponse{}, err - } - return result, nil -} - -// GetCloudServiceNetworkInterface - Get the specified network interface in a cloud service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// roleInstanceName - The name of role instance. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientGetCloudServiceNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetCloudServiceNetworkInterface -// method. -func (client *InterfacesClient) GetCloudServiceNetworkInterface(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, options *InterfacesClientGetCloudServiceNetworkInterfaceOptions) (InterfacesClientGetCloudServiceNetworkInterfaceResponse, error) { - req, err := client.getCloudServiceNetworkInterfaceCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, options) - if err != nil { - return InterfacesClientGetCloudServiceNetworkInterfaceResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientGetCloudServiceNetworkInterfaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientGetCloudServiceNetworkInterfaceResponse{}, runtime.NewResponseError(resp) - } - return client.getCloudServiceNetworkInterfaceHandleResponse(resp) -} - -// getCloudServiceNetworkInterfaceCreateRequest creates the GetCloudServiceNetworkInterface request. -func (client *InterfacesClient) getCloudServiceNetworkInterfaceCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, options *InterfacesClientGetCloudServiceNetworkInterfaceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if cloudServiceName == "" { - return nil, errors.New("parameter cloudServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) - if roleInstanceName == "" { - return nil, errors.New("parameter roleInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getCloudServiceNetworkInterfaceHandleResponse handles the GetCloudServiceNetworkInterface response. -func (client *InterfacesClient) getCloudServiceNetworkInterfaceHandleResponse(resp *http.Response) (InterfacesClientGetCloudServiceNetworkInterfaceResponse, error) { - result := InterfacesClientGetCloudServiceNetworkInterfaceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { - return InterfacesClientGetCloudServiceNetworkInterfaceResponse{}, err - } - return result, nil -} - -// BeginGetEffectiveRouteTable - Gets all route tables applied to a network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientBeginGetEffectiveRouteTableOptions contains the optional parameters for the InterfacesClient.BeginGetEffectiveRouteTable -// method. -func (client *InterfacesClient) BeginGetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginGetEffectiveRouteTableOptions) (*runtime.Poller[InterfacesClientGetEffectiveRouteTableResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getEffectiveRouteTable(ctx, resourceGroupName, networkInterfaceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[InterfacesClientGetEffectiveRouteTableResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[InterfacesClientGetEffectiveRouteTableResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetEffectiveRouteTable - Gets all route tables applied to a network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *InterfacesClient) getEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginGetEffectiveRouteTableOptions) (*http.Response, error) { - req, err := client.getEffectiveRouteTableCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getEffectiveRouteTableCreateRequest creates the GetEffectiveRouteTable request. -func (client *InterfacesClient) getEffectiveRouteTableCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginGetEffectiveRouteTableOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GetVirtualMachineScaleSetIPConfiguration - Get the specified network interface ip configuration in a virtual machine scale -// set. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// networkInterfaceName - The name of the network interface. -// ipConfigurationName - The name of the ip configuration. -// options - InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetIPConfiguration -// method. -func (client *InterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions) (InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse, error) { - req, err := client.getVirtualMachineScaleSetIPConfigurationCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, options) - if err != nil { - return InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{}, runtime.NewResponseError(resp) - } - return client.getVirtualMachineScaleSetIPConfigurationHandleResponse(resp) -} - -// getVirtualMachineScaleSetIPConfigurationCreateRequest creates the GetVirtualMachineScaleSetIPConfiguration request. -func (client *InterfacesClient) getVirtualMachineScaleSetIPConfigurationCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualMachineScaleSetName == "" { - return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) - if virtualmachineIndex == "" { - return nil, errors.New("parameter virtualmachineIndex cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if ipConfigurationName == "" { - return nil, errors.New("parameter ipConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-10-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVirtualMachineScaleSetIPConfigurationHandleResponse handles the GetVirtualMachineScaleSetIPConfiguration response. -func (client *InterfacesClient) getVirtualMachineScaleSetIPConfigurationHandleResponse(resp *http.Response) (InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse, error) { - result := InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfiguration); err != nil { - return InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{}, err - } - return result, nil -} - -// GetVirtualMachineScaleSetNetworkInterface - Get the specified network interface in a virtual machine scale set. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetNetworkInterface -// method. -func (client *InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions) (InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse, error) { - req, err := client.getVirtualMachineScaleSetNetworkInterfaceCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, options) - if err != nil { - return InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{}, runtime.NewResponseError(resp) - } - return client.getVirtualMachineScaleSetNetworkInterfaceHandleResponse(resp) -} - -// getVirtualMachineScaleSetNetworkInterfaceCreateRequest creates the GetVirtualMachineScaleSetNetworkInterface request. -func (client *InterfacesClient) getVirtualMachineScaleSetNetworkInterfaceCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualMachineScaleSetName == "" { - return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) - if virtualmachineIndex == "" { - return nil, errors.New("parameter virtualmachineIndex cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-10-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVirtualMachineScaleSetNetworkInterfaceHandleResponse handles the GetVirtualMachineScaleSetNetworkInterface response. -func (client *InterfacesClient) getVirtualMachineScaleSetNetworkInterfaceHandleResponse(resp *http.Response) (InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse, error) { - result := InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { - return InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all network interfaces in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - InterfacesClientListOptions contains the optional parameters for the InterfacesClient.List method. -func (client *InterfacesClient) NewListPager(resourceGroupName string, options *InterfacesClientListOptions) *runtime.Pager[InterfacesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[InterfacesClientListResponse]{ - More: func(page InterfacesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InterfacesClientListResponse) (InterfacesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *InterfacesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *InterfacesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *InterfacesClient) listHandleResponse(resp *http.Response) (InterfacesClientListResponse, error) { - result := InterfacesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { - return InterfacesClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all network interfaces in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.ListAll method. -func (client *InterfacesClient) NewListAllPager(options *InterfacesClientListAllOptions) *runtime.Pager[InterfacesClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[InterfacesClientListAllResponse]{ - More: func(page InterfacesClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InterfacesClientListAllResponse) (InterfacesClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *InterfacesClient) listAllCreateRequest(ctx context.Context, options *InterfacesClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *InterfacesClient) listAllHandleResponse(resp *http.Response) (InterfacesClientListAllResponse, error) { - result := InterfacesClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { - return InterfacesClientListAllResponse{}, err - } - return result, nil -} - -// NewListCloudServiceNetworkInterfacesPager - Gets all network interfaces in a cloud service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// options - InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListCloudServiceNetworkInterfaces -// method. -func (client *InterfacesClient) NewListCloudServiceNetworkInterfacesPager(resourceGroupName string, cloudServiceName string, options *InterfacesClientListCloudServiceNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListCloudServiceNetworkInterfacesResponse] { - return runtime.NewPager(runtime.PagingHandler[InterfacesClientListCloudServiceNetworkInterfacesResponse]{ - More: func(page InterfacesClientListCloudServiceNetworkInterfacesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InterfacesClientListCloudServiceNetworkInterfacesResponse) (InterfacesClientListCloudServiceNetworkInterfacesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCloudServiceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, runtime.NewResponseError(resp) - } - return client.listCloudServiceNetworkInterfacesHandleResponse(resp) - }, - }) -} - -// listCloudServiceNetworkInterfacesCreateRequest creates the ListCloudServiceNetworkInterfaces request. -func (client *InterfacesClient) listCloudServiceNetworkInterfacesCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *InterfacesClientListCloudServiceNetworkInterfacesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if cloudServiceName == "" { - return nil, errors.New("parameter cloudServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listCloudServiceNetworkInterfacesHandleResponse handles the ListCloudServiceNetworkInterfaces response. -func (client *InterfacesClient) listCloudServiceNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListCloudServiceNetworkInterfacesResponse, error) { - result := InterfacesClientListCloudServiceNetworkInterfacesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { - return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, err - } - return result, nil -} - -// NewListCloudServiceRoleInstanceNetworkInterfacesPager - Gets information about all network interfaces in a role instance -// in a cloud service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// roleInstanceName - The name of role instance. -// options - InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the -// InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces method. -func (client *InterfacesClient) NewListCloudServiceRoleInstanceNetworkInterfacesPager(resourceGroupName string, cloudServiceName string, roleInstanceName string, options *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse] { - return runtime.NewPager(runtime.PagingHandler[InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse]{ - More: func(page InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse) (InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCloudServiceRoleInstanceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, runtime.NewResponseError(resp) - } - return client.listCloudServiceRoleInstanceNetworkInterfacesHandleResponse(resp) - }, - }) -} - -// listCloudServiceRoleInstanceNetworkInterfacesCreateRequest creates the ListCloudServiceRoleInstanceNetworkInterfaces request. -func (client *InterfacesClient) listCloudServiceRoleInstanceNetworkInterfacesCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, options *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if cloudServiceName == "" { - return nil, errors.New("parameter cloudServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) - if roleInstanceName == "" { - return nil, errors.New("parameter roleInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listCloudServiceRoleInstanceNetworkInterfacesHandleResponse handles the ListCloudServiceRoleInstanceNetworkInterfaces response. -func (client *InterfacesClient) listCloudServiceRoleInstanceNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse, error) { - result := InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { - return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, err - } - return result, nil -} - -// BeginListEffectiveNetworkSecurityGroups - Gets all network security groups applied to a network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions contains the optional parameters for the InterfacesClient.BeginListEffectiveNetworkSecurityGroups -// method. -func (client *InterfacesClient) BeginListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions) (*runtime.Poller[InterfacesClientListEffectiveNetworkSecurityGroupsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listEffectiveNetworkSecurityGroups(ctx, resourceGroupName, networkInterfaceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[InterfacesClientListEffectiveNetworkSecurityGroupsResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[InterfacesClientListEffectiveNetworkSecurityGroupsResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListEffectiveNetworkSecurityGroups - Gets all network security groups applied to a network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *InterfacesClient) listEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions) (*http.Response, error) { - req, err := client.listEffectiveNetworkSecurityGroupsCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listEffectiveNetworkSecurityGroupsCreateRequest creates the ListEffectiveNetworkSecurityGroups request. -func (client *InterfacesClient) listEffectiveNetworkSecurityGroupsCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// NewListVirtualMachineScaleSetIPConfigurationsPager - Get the specified network interface ip configuration in a virtual -// machine scale set. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetIPConfigurations -// method. -func (client *InterfacesClient) NewListVirtualMachineScaleSetIPConfigurationsPager(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse] { - return runtime.NewPager(runtime.PagingHandler[InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse]{ - More: func(page InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse) (InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listVirtualMachineScaleSetIPConfigurationsCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, runtime.NewResponseError(resp) - } - return client.listVirtualMachineScaleSetIPConfigurationsHandleResponse(resp) - }, - }) -} - -// listVirtualMachineScaleSetIPConfigurationsCreateRequest creates the ListVirtualMachineScaleSetIPConfigurations request. -func (client *InterfacesClient) listVirtualMachineScaleSetIPConfigurationsCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualMachineScaleSetName == "" { - return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) - if virtualmachineIndex == "" { - return nil, errors.New("parameter virtualmachineIndex cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-10-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listVirtualMachineScaleSetIPConfigurationsHandleResponse handles the ListVirtualMachineScaleSetIPConfigurations response. -func (client *InterfacesClient) listVirtualMachineScaleSetIPConfigurationsHandleResponse(resp *http.Response) (InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse, error) { - result := InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfigurationListResult); err != nil { - return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, err - } - return result, nil -} - -// NewListVirtualMachineScaleSetNetworkInterfacesPager - Gets all network interfaces in a virtual machine scale set. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// options - InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces -// method. -func (client *InterfacesClient) NewListVirtualMachineScaleSetNetworkInterfacesPager(resourceGroupName string, virtualMachineScaleSetName string, options *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse] { - return runtime.NewPager(runtime.PagingHandler[InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse]{ - More: func(page InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse) (InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listVirtualMachineScaleSetNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, runtime.NewResponseError(resp) - } - return client.listVirtualMachineScaleSetNetworkInterfacesHandleResponse(resp) - }, - }) -} - -// listVirtualMachineScaleSetNetworkInterfacesCreateRequest creates the ListVirtualMachineScaleSetNetworkInterfaces request. -func (client *InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, options *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualMachineScaleSetName == "" { - return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listVirtualMachineScaleSetNetworkInterfacesHandleResponse handles the ListVirtualMachineScaleSetNetworkInterfaces response. -func (client *InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse, error) { - result := InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { - return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, err - } - return result, nil -} - -// NewListVirtualMachineScaleSetVMNetworkInterfacesPager - Gets information about all network interfaces in a virtual machine -// in a virtual machine scale set. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// options - InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the -// InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces method. -func (client *InterfacesClient) NewListVirtualMachineScaleSetVMNetworkInterfacesPager(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, options *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse] { - return runtime.NewPager(runtime.PagingHandler[InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse]{ - More: func(page InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse) (InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, runtime.NewResponseError(resp) - } - return client.listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse(resp) - }, - }) -} - -// listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest creates the ListVirtualMachineScaleSetVMNetworkInterfaces request. -func (client *InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, options *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualMachineScaleSetName == "" { - return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) - if virtualmachineIndex == "" { - return nil, errors.New("parameter virtualmachineIndex cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse handles the ListVirtualMachineScaleSetVMNetworkInterfaces response. -func (client *InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse, error) { - result := InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { - return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates a network interface tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// parameters - Parameters supplied to update network interface tags. -// options - InterfacesClientUpdateTagsOptions contains the optional parameters for the InterfacesClient.UpdateTags method. -func (client *InterfacesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject, options *InterfacesClientUpdateTagsOptions) (InterfacesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkInterfaceName, parameters, options) - if err != nil { - return InterfacesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfacesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfacesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *InterfacesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject, options *InterfacesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *InterfacesClient) updateTagsHandleResponse(resp *http.Response) (InterfacesClientUpdateTagsResponse, error) { - result := InterfacesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { - return InterfacesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfacetapconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfacetapconfigurations_client.go deleted file mode 100644 index 7a271e47..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/interfacetapconfigurations_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// InterfaceTapConfigurationsClient contains the methods for the NetworkInterfaceTapConfigurations group. -// Don't use this type directly, use NewInterfaceTapConfigurationsClient() instead. -type InterfaceTapConfigurationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewInterfaceTapConfigurationsClient creates a new instance of InterfaceTapConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewInterfaceTapConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceTapConfigurationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &InterfaceTapConfigurationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a Tap configuration in the specified NetworkInterface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// tapConfigurationName - The name of the tap configuration. -// tapConfigurationParameters - Parameters supplied to the create or update tap configuration operation. -// options - InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginCreateOrUpdate -// method. -func (client *InterfaceTapConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration, options *InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[InterfaceTapConfigurationsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[InterfaceTapConfigurationsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[InterfaceTapConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a Tap configuration in the specified NetworkInterface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *InterfaceTapConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration, options *InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *InterfaceTapConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration, options *InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if tapConfigurationName == "" { - return nil, errors.New("parameter tapConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{tapConfigurationName}", url.PathEscape(tapConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, tapConfigurationParameters) -} - -// BeginDelete - Deletes the specified tap configuration from the NetworkInterface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// tapConfigurationName - The name of the tap configuration. -// options - InterfaceTapConfigurationsClientBeginDeleteOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginDelete -// method. -func (client *InterfaceTapConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientBeginDeleteOptions) (*runtime.Poller[InterfaceTapConfigurationsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[InterfaceTapConfigurationsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[InterfaceTapConfigurationsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified tap configuration from the NetworkInterface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *InterfaceTapConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *InterfaceTapConfigurationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if tapConfigurationName == "" { - return nil, errors.New("parameter tapConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{tapConfigurationName}", url.PathEscape(tapConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the specified tap configuration on a network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// tapConfigurationName - The name of the tap configuration. -// options - InterfaceTapConfigurationsClientGetOptions contains the optional parameters for the InterfaceTapConfigurationsClient.Get -// method. -func (client *InterfaceTapConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientGetOptions) (InterfaceTapConfigurationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) - if err != nil { - return InterfaceTapConfigurationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfaceTapConfigurationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfaceTapConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *InterfaceTapConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if tapConfigurationName == "" { - return nil, errors.New("parameter tapConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{tapConfigurationName}", url.PathEscape(tapConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *InterfaceTapConfigurationsClient) getHandleResponse(resp *http.Response) (InterfaceTapConfigurationsClientGetResponse, error) { - result := InterfaceTapConfigurationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceTapConfiguration); err != nil { - return InterfaceTapConfigurationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Get all Tap configurations in a network interface. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.List -// method. -func (client *InterfaceTapConfigurationsClient) NewListPager(resourceGroupName string, networkInterfaceName string, options *InterfaceTapConfigurationsClientListOptions) *runtime.Pager[InterfaceTapConfigurationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[InterfaceTapConfigurationsClientListResponse]{ - More: func(page InterfaceTapConfigurationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *InterfaceTapConfigurationsClientListResponse) (InterfaceTapConfigurationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return InterfaceTapConfigurationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return InterfaceTapConfigurationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return InterfaceTapConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *InterfaceTapConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfaceTapConfigurationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *InterfaceTapConfigurationsClient) listHandleResponse(resp *http.Response) (InterfaceTapConfigurationsClientListResponse, error) { - result := InterfaceTapConfigurationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceTapConfigurationListResult); err != nil { - return InterfaceTapConfigurationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ipallocations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ipallocations_client.go deleted file mode 100644 index bd4657c0..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ipallocations_client.go +++ /dev/null @@ -1,429 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// IPAllocationsClient contains the methods for the IPAllocations group. -// Don't use this type directly, use NewIPAllocationsClient() instead. -type IPAllocationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewIPAllocationsClient creates a new instance of IPAllocationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewIPAllocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPAllocationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &IPAllocationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates an IpAllocation in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ipAllocationName - The name of the IpAllocation. -// parameters - Parameters supplied to the create or update virtual network operation. -// options - IPAllocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPAllocationsClient.BeginCreateOrUpdate -// method. -func (client *IPAllocationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[IPAllocationsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, ipAllocationName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[IPAllocationsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[IPAllocationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates an IpAllocation in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *IPAllocationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ipAllocationName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *IPAllocationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ipAllocationName == "" { - return nil, errors.New("parameter ipAllocationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipAllocationName}", url.PathEscape(ipAllocationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified IpAllocation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ipAllocationName - The name of the IpAllocation. -// options - IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete -// method. -func (client *IPAllocationsClient) BeginDelete(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (*runtime.Poller[IPAllocationsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, ipAllocationName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[IPAllocationsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[IPAllocationsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified IpAllocation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *IPAllocationsClient) deleteOperation(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, ipAllocationName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *IPAllocationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ipAllocationName == "" { - return nil, errors.New("parameter ipAllocationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipAllocationName}", url.PathEscape(ipAllocationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified IpAllocation by resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ipAllocationName - The name of the IpAllocation. -// options - IPAllocationsClientGetOptions contains the optional parameters for the IPAllocationsClient.Get method. -func (client *IPAllocationsClient) Get(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientGetOptions) (IPAllocationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, ipAllocationName, options) - if err != nil { - return IPAllocationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return IPAllocationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPAllocationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *IPAllocationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ipAllocationName == "" { - return nil, errors.New("parameter ipAllocationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipAllocationName}", url.PathEscape(ipAllocationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *IPAllocationsClient) getHandleResponse(resp *http.Response) (IPAllocationsClientGetResponse, error) { - result := IPAllocationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocation); err != nil { - return IPAllocationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all IpAllocations in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.List method. -func (client *IPAllocationsClient) NewListPager(options *IPAllocationsClientListOptions) *runtime.Pager[IPAllocationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[IPAllocationsClientListResponse]{ - More: func(page IPAllocationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *IPAllocationsClientListResponse) (IPAllocationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IPAllocationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return IPAllocationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPAllocationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *IPAllocationsClient) listCreateRequest(ctx context.Context, options *IPAllocationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *IPAllocationsClient) listHandleResponse(resp *http.Response) (IPAllocationsClientListResponse, error) { - result := IPAllocationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocationListResult); err != nil { - return IPAllocationsClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Gets all IpAllocations in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.ListByResourceGroup -// method. -func (client *IPAllocationsClient) NewListByResourceGroupPager(resourceGroupName string, options *IPAllocationsClientListByResourceGroupOptions) *runtime.Pager[IPAllocationsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[IPAllocationsClientListByResourceGroupResponse]{ - More: func(page IPAllocationsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *IPAllocationsClientListByResourceGroupResponse) (IPAllocationsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IPAllocationsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return IPAllocationsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPAllocationsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *IPAllocationsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *IPAllocationsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *IPAllocationsClient) listByResourceGroupHandleResponse(resp *http.Response) (IPAllocationsClientListByResourceGroupResponse, error) { - result := IPAllocationsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocationListResult); err != nil { - return IPAllocationsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates a IpAllocation tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ipAllocationName - The name of the IpAllocation. -// parameters - Parameters supplied to update IpAllocation tags. -// options - IPAllocationsClientUpdateTagsOptions contains the optional parameters for the IPAllocationsClient.UpdateTags -// method. -func (client *IPAllocationsClient) UpdateTags(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters TagsObject, options *IPAllocationsClientUpdateTagsOptions) (IPAllocationsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, ipAllocationName, parameters, options) - if err != nil { - return IPAllocationsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return IPAllocationsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPAllocationsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *IPAllocationsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters TagsObject, options *IPAllocationsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ipAllocationName == "" { - return nil, errors.New("parameter ipAllocationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipAllocationName}", url.PathEscape(ipAllocationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *IPAllocationsClient) updateTagsHandleResponse(resp *http.Response) (IPAllocationsClientUpdateTagsResponse, error) { - result := IPAllocationsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocation); err != nil { - return IPAllocationsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ipgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ipgroups_client.go deleted file mode 100644 index 611fe436..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ipgroups_client.go +++ /dev/null @@ -1,427 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// IPGroupsClient contains the methods for the IPGroups group. -// Don't use this type directly, use NewIPGroupsClient() instead. -type IPGroupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewIPGroupsClient creates a new instance of IPGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewIPGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPGroupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &IPGroupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates an ipGroups in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ipGroupsName - The name of the ipGroups. -// parameters - Parameters supplied to the create or update IpGroups operation. -// options - IPGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPGroupsClient.BeginCreateOrUpdate -// method. -func (client *IPGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters IPGroup, options *IPGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[IPGroupsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, ipGroupsName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[IPGroupsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[IPGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates an ipGroups in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *IPGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters IPGroup, options *IPGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ipGroupsName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *IPGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters IPGroup, options *IPGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ipGroupsName == "" { - return nil, errors.New("parameter ipGroupsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipGroupsName}", url.PathEscape(ipGroupsName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified ipGroups. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ipGroupsName - The name of the ipGroups. -// options - IPGroupsClientBeginDeleteOptions contains the optional parameters for the IPGroupsClient.BeginDelete method. -func (client *IPGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientBeginDeleteOptions) (*runtime.Poller[IPGroupsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, ipGroupsName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[IPGroupsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[IPGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified ipGroups. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *IPGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, ipGroupsName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *IPGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ipGroupsName == "" { - return nil, errors.New("parameter ipGroupsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipGroupsName}", url.PathEscape(ipGroupsName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified ipGroups. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ipGroupsName - The name of the ipGroups. -// options - IPGroupsClientGetOptions contains the optional parameters for the IPGroupsClient.Get method. -func (client *IPGroupsClient) Get(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientGetOptions) (IPGroupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, ipGroupsName, options) - if err != nil { - return IPGroupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return IPGroupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPGroupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *IPGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ipGroupsName == "" { - return nil, errors.New("parameter ipGroupsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipGroupsName}", url.PathEscape(ipGroupsName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *IPGroupsClient) getHandleResponse(resp *http.Response) (IPGroupsClientGetResponse, error) { - result := IPGroupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IPGroup); err != nil { - return IPGroupsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all IpGroups in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.List method. -func (client *IPGroupsClient) NewListPager(options *IPGroupsClientListOptions) *runtime.Pager[IPGroupsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[IPGroupsClientListResponse]{ - More: func(page IPGroupsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *IPGroupsClientListResponse) (IPGroupsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IPGroupsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return IPGroupsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPGroupsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *IPGroupsClient) listCreateRequest(ctx context.Context, options *IPGroupsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *IPGroupsClient) listHandleResponse(resp *http.Response) (IPGroupsClientListResponse, error) { - result := IPGroupsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IPGroupListResult); err != nil { - return IPGroupsClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Gets all IpGroups in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.ListByResourceGroup -// method. -func (client *IPGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *IPGroupsClientListByResourceGroupOptions) *runtime.Pager[IPGroupsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[IPGroupsClientListByResourceGroupResponse]{ - More: func(page IPGroupsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *IPGroupsClientListByResourceGroupResponse) (IPGroupsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return IPGroupsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return IPGroupsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPGroupsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *IPGroupsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *IPGroupsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *IPGroupsClient) listByResourceGroupHandleResponse(resp *http.Response) (IPGroupsClientListByResourceGroupResponse, error) { - result := IPGroupsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IPGroupListResult); err != nil { - return IPGroupsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateGroups - Updates tags of an IpGroups resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// ipGroupsName - The name of the ipGroups. -// parameters - Parameters supplied to the update ipGroups operation. -// options - IPGroupsClientUpdateGroupsOptions contains the optional parameters for the IPGroupsClient.UpdateGroups method. -func (client *IPGroupsClient) UpdateGroups(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters TagsObject, options *IPGroupsClientUpdateGroupsOptions) (IPGroupsClientUpdateGroupsResponse, error) { - req, err := client.updateGroupsCreateRequest(ctx, resourceGroupName, ipGroupsName, parameters, options) - if err != nil { - return IPGroupsClientUpdateGroupsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return IPGroupsClientUpdateGroupsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return IPGroupsClientUpdateGroupsResponse{}, runtime.NewResponseError(resp) - } - return client.updateGroupsHandleResponse(resp) -} - -// updateGroupsCreateRequest creates the UpdateGroups request. -func (client *IPGroupsClient) updateGroupsCreateRequest(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters TagsObject, options *IPGroupsClientUpdateGroupsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if ipGroupsName == "" { - return nil, errors.New("parameter ipGroupsName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipGroupsName}", url.PathEscape(ipGroupsName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateGroupsHandleResponse handles the UpdateGroups response. -func (client *IPGroupsClient) updateGroupsHandleResponse(resp *http.Response) (IPGroupsClientUpdateGroupsResponse, error) { - result := IPGroupsClientUpdateGroupsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IPGroup); err != nil { - return IPGroupsClientUpdateGroupsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerbackendaddresspools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerbackendaddresspools_client.go deleted file mode 100644 index 70e19d6c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerbackendaddresspools_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// LoadBalancerBackendAddressPoolsClient contains the methods for the LoadBalancerBackendAddressPools group. -// Don't use this type directly, use NewLoadBalancerBackendAddressPoolsClient() instead. -type LoadBalancerBackendAddressPoolsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewLoadBalancerBackendAddressPoolsClient creates a new instance of LoadBalancerBackendAddressPoolsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerBackendAddressPoolsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &LoadBalancerBackendAddressPoolsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a load balancer backend address pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// backendAddressPoolName - The name of the backend address pool. -// parameters - Parameters supplied to the create or update load balancer backend address pool operation. -// options - LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate -// method. -func (client *LoadBalancerBackendAddressPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool, options *LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a load balancer backend address pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *LoadBalancerBackendAddressPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool, options *LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *LoadBalancerBackendAddressPoolsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool, options *LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if backendAddressPoolName == "" { - return nil, errors.New("parameter backendAddressPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backendAddressPoolName}", url.PathEscape(backendAddressPoolName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified load balancer backend address pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// backendAddressPoolName - The name of the backend address pool. -// options - LoadBalancerBackendAddressPoolsClientBeginDeleteOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginDelete -// method. -func (client *LoadBalancerBackendAddressPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientBeginDeleteOptions) (*runtime.Poller[LoadBalancerBackendAddressPoolsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[LoadBalancerBackendAddressPoolsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[LoadBalancerBackendAddressPoolsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified load balancer backend address pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *LoadBalancerBackendAddressPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *LoadBalancerBackendAddressPoolsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if backendAddressPoolName == "" { - return nil, errors.New("parameter backendAddressPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backendAddressPoolName}", url.PathEscape(backendAddressPoolName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets load balancer backend address pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// backendAddressPoolName - The name of the backend address pool. -// options - LoadBalancerBackendAddressPoolsClientGetOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.Get -// method. -func (client *LoadBalancerBackendAddressPoolsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientGetOptions) (LoadBalancerBackendAddressPoolsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) - if err != nil { - return LoadBalancerBackendAddressPoolsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerBackendAddressPoolsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerBackendAddressPoolsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *LoadBalancerBackendAddressPoolsClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if backendAddressPoolName == "" { - return nil, errors.New("parameter backendAddressPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backendAddressPoolName}", url.PathEscape(backendAddressPoolName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *LoadBalancerBackendAddressPoolsClient) getHandleResponse(resp *http.Response) (LoadBalancerBackendAddressPoolsClientGetResponse, error) { - result := LoadBalancerBackendAddressPoolsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackendAddressPool); err != nil { - return LoadBalancerBackendAddressPoolsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the load balancer backed address pools. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.List -// method. -func (client *LoadBalancerBackendAddressPoolsClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerBackendAddressPoolsClientListOptions) *runtime.Pager[LoadBalancerBackendAddressPoolsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[LoadBalancerBackendAddressPoolsClientListResponse]{ - More: func(page LoadBalancerBackendAddressPoolsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *LoadBalancerBackendAddressPoolsClientListResponse) (LoadBalancerBackendAddressPoolsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoadBalancerBackendAddressPoolsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerBackendAddressPoolsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerBackendAddressPoolsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *LoadBalancerBackendAddressPoolsClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerBackendAddressPoolsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *LoadBalancerBackendAddressPoolsClient) listHandleResponse(resp *http.Response) (LoadBalancerBackendAddressPoolsClientListResponse, error) { - result := LoadBalancerBackendAddressPoolsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerBackendAddressPoolListResult); err != nil { - return LoadBalancerBackendAddressPoolsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerfrontendipconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerfrontendipconfigurations_client.go deleted file mode 100644 index ac95bf3e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerfrontendipconfigurations_client.go +++ /dev/null @@ -1,189 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// LoadBalancerFrontendIPConfigurationsClient contains the methods for the LoadBalancerFrontendIPConfigurations group. -// Don't use this type directly, use NewLoadBalancerFrontendIPConfigurationsClient() instead. -type LoadBalancerFrontendIPConfigurationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewLoadBalancerFrontendIPConfigurationsClient creates a new instance of LoadBalancerFrontendIPConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerFrontendIPConfigurationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &LoadBalancerFrontendIPConfigurationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets load balancer frontend IP configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// frontendIPConfigurationName - The name of the frontend IP configuration. -// options - LoadBalancerFrontendIPConfigurationsClientGetOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.Get -// method. -func (client *LoadBalancerFrontendIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string, options *LoadBalancerFrontendIPConfigurationsClientGetOptions) (LoadBalancerFrontendIPConfigurationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, frontendIPConfigurationName, options) - if err != nil { - return LoadBalancerFrontendIPConfigurationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerFrontendIPConfigurationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerFrontendIPConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *LoadBalancerFrontendIPConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string, options *LoadBalancerFrontendIPConfigurationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if frontendIPConfigurationName == "" { - return nil, errors.New("parameter frontendIPConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{frontendIPConfigurationName}", url.PathEscape(frontendIPConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *LoadBalancerFrontendIPConfigurationsClient) getHandleResponse(resp *http.Response) (LoadBalancerFrontendIPConfigurationsClientGetResponse, error) { - result := LoadBalancerFrontendIPConfigurationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FrontendIPConfiguration); err != nil { - return LoadBalancerFrontendIPConfigurationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the load balancer frontend IP configurations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.List -// method. -func (client *LoadBalancerFrontendIPConfigurationsClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerFrontendIPConfigurationsClientListOptions) *runtime.Pager[LoadBalancerFrontendIPConfigurationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[LoadBalancerFrontendIPConfigurationsClientListResponse]{ - More: func(page LoadBalancerFrontendIPConfigurationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *LoadBalancerFrontendIPConfigurationsClientListResponse) (LoadBalancerFrontendIPConfigurationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoadBalancerFrontendIPConfigurationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerFrontendIPConfigurationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerFrontendIPConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *LoadBalancerFrontendIPConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerFrontendIPConfigurationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *LoadBalancerFrontendIPConfigurationsClient) listHandleResponse(resp *http.Response) (LoadBalancerFrontendIPConfigurationsClientListResponse, error) { - result := LoadBalancerFrontendIPConfigurationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerFrontendIPConfigurationListResult); err != nil { - return LoadBalancerFrontendIPConfigurationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerloadbalancingrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerloadbalancingrules_client.go deleted file mode 100644 index 134c009e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerloadbalancingrules_client.go +++ /dev/null @@ -1,189 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// LoadBalancerLoadBalancingRulesClient contains the methods for the LoadBalancerLoadBalancingRules group. -// Don't use this type directly, use NewLoadBalancerLoadBalancingRulesClient() instead. -type LoadBalancerLoadBalancingRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewLoadBalancerLoadBalancingRulesClient creates a new instance of LoadBalancerLoadBalancingRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerLoadBalancingRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &LoadBalancerLoadBalancingRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the specified load balancer load balancing rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// loadBalancingRuleName - The name of the load balancing rule. -// options - LoadBalancerLoadBalancingRulesClientGetOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.Get -// method. -func (client *LoadBalancerLoadBalancingRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string, options *LoadBalancerLoadBalancingRulesClientGetOptions) (LoadBalancerLoadBalancingRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, loadBalancingRuleName, options) - if err != nil { - return LoadBalancerLoadBalancingRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerLoadBalancingRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerLoadBalancingRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *LoadBalancerLoadBalancingRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string, options *LoadBalancerLoadBalancingRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if loadBalancingRuleName == "" { - return nil, errors.New("parameter loadBalancingRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancingRuleName}", url.PathEscape(loadBalancingRuleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *LoadBalancerLoadBalancingRulesClient) getHandleResponse(resp *http.Response) (LoadBalancerLoadBalancingRulesClientGetResponse, error) { - result := LoadBalancerLoadBalancingRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancingRule); err != nil { - return LoadBalancerLoadBalancingRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the load balancing rules in a load balancer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.List -// method. -func (client *LoadBalancerLoadBalancingRulesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerLoadBalancingRulesClientListOptions) *runtime.Pager[LoadBalancerLoadBalancingRulesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[LoadBalancerLoadBalancingRulesClientListResponse]{ - More: func(page LoadBalancerLoadBalancingRulesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *LoadBalancerLoadBalancingRulesClientListResponse) (LoadBalancerLoadBalancingRulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoadBalancerLoadBalancingRulesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerLoadBalancingRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerLoadBalancingRulesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *LoadBalancerLoadBalancingRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerLoadBalancingRulesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *LoadBalancerLoadBalancingRulesClient) listHandleResponse(resp *http.Response) (LoadBalancerLoadBalancingRulesClientListResponse, error) { - result := LoadBalancerLoadBalancingRulesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerLoadBalancingRuleListResult); err != nil { - return LoadBalancerLoadBalancingRulesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancernetworkinterfaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancernetworkinterfaces_client.go deleted file mode 100644 index 62faa653..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancernetworkinterfaces_client.go +++ /dev/null @@ -1,127 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// LoadBalancerNetworkInterfacesClient contains the methods for the LoadBalancerNetworkInterfaces group. -// Don't use this type directly, use NewLoadBalancerNetworkInterfacesClient() instead. -type LoadBalancerNetworkInterfacesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewLoadBalancerNetworkInterfacesClient creates a new instance of LoadBalancerNetworkInterfacesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewLoadBalancerNetworkInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerNetworkInterfacesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &LoadBalancerNetworkInterfacesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Gets associated load balancer network interfaces. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.List -// method. -func (client *LoadBalancerNetworkInterfacesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerNetworkInterfacesClientListOptions) *runtime.Pager[LoadBalancerNetworkInterfacesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[LoadBalancerNetworkInterfacesClientListResponse]{ - More: func(page LoadBalancerNetworkInterfacesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *LoadBalancerNetworkInterfacesClientListResponse) (LoadBalancerNetworkInterfacesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoadBalancerNetworkInterfacesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerNetworkInterfacesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerNetworkInterfacesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *LoadBalancerNetworkInterfacesClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerNetworkInterfacesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *LoadBalancerNetworkInterfacesClient) listHandleResponse(resp *http.Response) (LoadBalancerNetworkInterfacesClientListResponse, error) { - result := LoadBalancerNetworkInterfacesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { - return LoadBalancerNetworkInterfacesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalanceroutboundrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalanceroutboundrules_client.go deleted file mode 100644 index 4dda4d42..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalanceroutboundrules_client.go +++ /dev/null @@ -1,189 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// LoadBalancerOutboundRulesClient contains the methods for the LoadBalancerOutboundRules group. -// Don't use this type directly, use NewLoadBalancerOutboundRulesClient() instead. -type LoadBalancerOutboundRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewLoadBalancerOutboundRulesClient creates a new instance of LoadBalancerOutboundRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewLoadBalancerOutboundRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerOutboundRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &LoadBalancerOutboundRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the specified load balancer outbound rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// outboundRuleName - The name of the outbound rule. -// options - LoadBalancerOutboundRulesClientGetOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.Get -// method. -func (client *LoadBalancerOutboundRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string, options *LoadBalancerOutboundRulesClientGetOptions) (LoadBalancerOutboundRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, outboundRuleName, options) - if err != nil { - return LoadBalancerOutboundRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerOutboundRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerOutboundRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *LoadBalancerOutboundRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string, options *LoadBalancerOutboundRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if outboundRuleName == "" { - return nil, errors.New("parameter outboundRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{outboundRuleName}", url.PathEscape(outboundRuleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *LoadBalancerOutboundRulesClient) getHandleResponse(resp *http.Response) (LoadBalancerOutboundRulesClientGetResponse, error) { - result := LoadBalancerOutboundRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OutboundRule); err != nil { - return LoadBalancerOutboundRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the outbound rules in a load balancer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.List -// method. -func (client *LoadBalancerOutboundRulesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerOutboundRulesClientListOptions) *runtime.Pager[LoadBalancerOutboundRulesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[LoadBalancerOutboundRulesClientListResponse]{ - More: func(page LoadBalancerOutboundRulesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *LoadBalancerOutboundRulesClientListResponse) (LoadBalancerOutboundRulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoadBalancerOutboundRulesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerOutboundRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerOutboundRulesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *LoadBalancerOutboundRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerOutboundRulesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *LoadBalancerOutboundRulesClient) listHandleResponse(resp *http.Response) (LoadBalancerOutboundRulesClientListResponse, error) { - result := LoadBalancerOutboundRulesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerOutboundRuleListResult); err != nil { - return LoadBalancerOutboundRulesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerprobes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerprobes_client.go deleted file mode 100644 index 86d7bb60..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancerprobes_client.go +++ /dev/null @@ -1,187 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// LoadBalancerProbesClient contains the methods for the LoadBalancerProbes group. -// Don't use this type directly, use NewLoadBalancerProbesClient() instead. -type LoadBalancerProbesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewLoadBalancerProbesClient creates a new instance of LoadBalancerProbesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewLoadBalancerProbesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerProbesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &LoadBalancerProbesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets load balancer probe. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// probeName - The name of the probe. -// options - LoadBalancerProbesClientGetOptions contains the optional parameters for the LoadBalancerProbesClient.Get method. -func (client *LoadBalancerProbesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string, options *LoadBalancerProbesClientGetOptions) (LoadBalancerProbesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, probeName, options) - if err != nil { - return LoadBalancerProbesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerProbesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerProbesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *LoadBalancerProbesClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string, options *LoadBalancerProbesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if probeName == "" { - return nil, errors.New("parameter probeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{probeName}", url.PathEscape(probeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *LoadBalancerProbesClient) getHandleResponse(resp *http.Response) (LoadBalancerProbesClientGetResponse, error) { - result := LoadBalancerProbesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Probe); err != nil { - return LoadBalancerProbesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the load balancer probes. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.List method. -func (client *LoadBalancerProbesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerProbesClientListOptions) *runtime.Pager[LoadBalancerProbesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[LoadBalancerProbesClientListResponse]{ - More: func(page LoadBalancerProbesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *LoadBalancerProbesClientListResponse) (LoadBalancerProbesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoadBalancerProbesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancerProbesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancerProbesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *LoadBalancerProbesClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerProbesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *LoadBalancerProbesClient) listHandleResponse(resp *http.Response) (LoadBalancerProbesClientListResponse, error) { - result := LoadBalancerProbesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerProbeListResult); err != nil { - return LoadBalancerProbesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancers_client.go deleted file mode 100644 index a52fc786..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/loadbalancers_client.go +++ /dev/null @@ -1,560 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// LoadBalancersClient contains the methods for the LoadBalancers group. -// Don't use this type directly, use NewLoadBalancersClient() instead. -type LoadBalancersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewLoadBalancersClient creates a new instance of LoadBalancersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &LoadBalancersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a load balancer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// parameters - Parameters supplied to the create or update load balancer operation. -// options - LoadBalancersClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.BeginCreateOrUpdate -// method. -func (client *LoadBalancersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientBeginCreateOrUpdateOptions) (*runtime.Poller[LoadBalancersClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[LoadBalancersClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[LoadBalancersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a load balancer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *LoadBalancersClient) createOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, loadBalancerName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *LoadBalancersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified load balancer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete -// method. -func (client *LoadBalancersClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*runtime.Poller[LoadBalancersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[LoadBalancersClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[LoadBalancersClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified load balancer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *LoadBalancersClient) deleteOperation(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *LoadBalancersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified load balancer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. -func (client *LoadBalancersClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientGetOptions) (LoadBalancersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, options) - if err != nil { - return LoadBalancersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *LoadBalancersClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *LoadBalancersClient) getHandleResponse(resp *http.Response) (LoadBalancersClientGetResponse, error) { - result := LoadBalancersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancer); err != nil { - return LoadBalancersClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the load balancers in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.List method. -func (client *LoadBalancersClient) NewListPager(resourceGroupName string, options *LoadBalancersClientListOptions) *runtime.Pager[LoadBalancersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[LoadBalancersClientListResponse]{ - More: func(page LoadBalancersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *LoadBalancersClientListResponse) (LoadBalancersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoadBalancersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *LoadBalancersClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *LoadBalancersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *LoadBalancersClient) listHandleResponse(resp *http.Response) (LoadBalancersClientListResponse, error) { - result := LoadBalancersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerListResult); err != nil { - return LoadBalancersClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the load balancers in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.ListAll method. -func (client *LoadBalancersClient) NewListAllPager(options *LoadBalancersClientListAllOptions) *runtime.Pager[LoadBalancersClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[LoadBalancersClientListAllResponse]{ - More: func(page LoadBalancersClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *LoadBalancersClientListAllResponse) (LoadBalancersClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LoadBalancersClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancersClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancersClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *LoadBalancersClient) listAllCreateRequest(ctx context.Context, options *LoadBalancersClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *LoadBalancersClient) listAllHandleResponse(resp *http.Response) (LoadBalancersClientListAllResponse, error) { - result := LoadBalancersClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerListResult); err != nil { - return LoadBalancersClientListAllResponse{}, err - } - return result, nil -} - -// BeginListInboundNatRulePortMappings - List of inbound NAT rule port mappings. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// groupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// backendPoolName - The name of the load balancer backend address pool. -// parameters - Query inbound NAT rule port mapping request. -// options - LoadBalancersClientBeginListInboundNatRulePortMappingsOptions contains the optional parameters for the LoadBalancersClient.BeginListInboundNatRulePortMappings -// method. -func (client *LoadBalancersClient) BeginListInboundNatRulePortMappings(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest, options *LoadBalancersClientBeginListInboundNatRulePortMappingsOptions) (*runtime.Poller[LoadBalancersClientListInboundNatRulePortMappingsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listInboundNatRulePortMappings(ctx, groupName, loadBalancerName, backendPoolName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[LoadBalancersClientListInboundNatRulePortMappingsResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[LoadBalancersClientListInboundNatRulePortMappingsResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListInboundNatRulePortMappings - List of inbound NAT rule port mappings. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *LoadBalancersClient) listInboundNatRulePortMappings(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest, options *LoadBalancersClientBeginListInboundNatRulePortMappingsOptions) (*http.Response, error) { - req, err := client.listInboundNatRulePortMappingsCreateRequest(ctx, groupName, loadBalancerName, backendPoolName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listInboundNatRulePortMappingsCreateRequest creates the ListInboundNatRulePortMappings request. -func (client *LoadBalancersClient) listInboundNatRulePortMappingsCreateRequest(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest, options *LoadBalancersClientBeginListInboundNatRulePortMappingsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping" - if groupName == "" { - return nil, errors.New("parameter groupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{groupName}", url.PathEscape(groupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if backendPoolName == "" { - return nil, errors.New("parameter backendPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backendPoolName}", url.PathEscape(backendPoolName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginSwapPublicIPAddresses - Swaps VIPs between two load balancers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The region where load balancers are located at. -// parameters - Parameters that define which VIPs should be swapped. -// options - LoadBalancersClientBeginSwapPublicIPAddressesOptions contains the optional parameters for the LoadBalancersClient.BeginSwapPublicIPAddresses -// method. -func (client *LoadBalancersClient) BeginSwapPublicIPAddresses(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest, options *LoadBalancersClientBeginSwapPublicIPAddressesOptions) (*runtime.Poller[LoadBalancersClientSwapPublicIPAddressesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.swapPublicIPAddresses(ctx, location, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[LoadBalancersClientSwapPublicIPAddressesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[LoadBalancersClientSwapPublicIPAddressesResponse](options.ResumeToken, client.pl, nil) - } -} - -// SwapPublicIPAddresses - Swaps VIPs between two load balancers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *LoadBalancersClient) swapPublicIPAddresses(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest, options *LoadBalancersClientBeginSwapPublicIPAddressesOptions) (*http.Response, error) { - req, err := client.swapPublicIPAddressesCreateRequest(ctx, location, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// swapPublicIPAddressesCreateRequest creates the SwapPublicIPAddresses request. -func (client *LoadBalancersClient) swapPublicIPAddressesCreateRequest(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest, options *LoadBalancersClientBeginSwapPublicIPAddressesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// UpdateTags - Updates a load balancer tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// parameters - Parameters supplied to update load balancer tags. -// options - LoadBalancersClientUpdateTagsOptions contains the optional parameters for the LoadBalancersClient.UpdateTags -// method. -func (client *LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject, options *LoadBalancersClientUpdateTagsOptions) (LoadBalancersClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, loadBalancerName, parameters, options) - if err != nil { - return LoadBalancersClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LoadBalancersClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LoadBalancersClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *LoadBalancersClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject, options *LoadBalancersClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *LoadBalancersClient) updateTagsHandleResponse(resp *http.Response) (LoadBalancersClientUpdateTagsResponse, error) { - result := LoadBalancersClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancer); err != nil { - return LoadBalancersClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/localnetworkgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/localnetworkgateways_client.go deleted file mode 100644 index fbb94c9d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/localnetworkgateways_client.go +++ /dev/null @@ -1,368 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// LocalNetworkGatewaysClient contains the methods for the LocalNetworkGateways group. -// Don't use this type directly, use NewLocalNetworkGatewaysClient() instead. -type LocalNetworkGatewaysClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewLocalNetworkGatewaysClient creates a new instance of LocalNetworkGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewLocalNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocalNetworkGatewaysClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &LocalNetworkGatewaysClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a local network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// localNetworkGatewayName - The name of the local network gateway. -// parameters - Parameters supplied to the create or update local network gateway operation. -// options - LocalNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginCreateOrUpdate -// method. -func (client *LocalNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, options *LocalNetworkGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[LocalNetworkGatewaysClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[LocalNetworkGatewaysClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[LocalNetworkGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a local network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *LocalNetworkGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, options *LocalNetworkGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *LocalNetworkGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, options *LocalNetworkGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if localNetworkGatewayName == "" { - return nil, errors.New("parameter localNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{localNetworkGatewayName}", url.PathEscape(localNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified local network gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// localNetworkGatewayName - The name of the local network gateway. -// options - LocalNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginDelete -// method. -func (client *LocalNetworkGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientBeginDeleteOptions) (*runtime.Poller[LocalNetworkGatewaysClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, localNetworkGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[LocalNetworkGatewaysClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[LocalNetworkGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified local network gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *LocalNetworkGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *LocalNetworkGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if localNetworkGatewayName == "" { - return nil, errors.New("parameter localNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{localNetworkGatewayName}", url.PathEscape(localNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified local network gateway in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// localNetworkGatewayName - The name of the local network gateway. -// options - LocalNetworkGatewaysClientGetOptions contains the optional parameters for the LocalNetworkGatewaysClient.Get -// method. -func (client *LocalNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientGetOptions) (LocalNetworkGatewaysClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, options) - if err != nil { - return LocalNetworkGatewaysClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LocalNetworkGatewaysClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalNetworkGatewaysClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *LocalNetworkGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if localNetworkGatewayName == "" { - return nil, errors.New("parameter localNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{localNetworkGatewayName}", url.PathEscape(localNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *LocalNetworkGatewaysClient) getHandleResponse(resp *http.Response) (LocalNetworkGatewaysClientGetResponse, error) { - result := LocalNetworkGatewaysClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LocalNetworkGateway); err != nil { - return LocalNetworkGatewaysClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the local network gateways in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.List -// method. -func (client *LocalNetworkGatewaysClient) NewListPager(resourceGroupName string, options *LocalNetworkGatewaysClientListOptions) *runtime.Pager[LocalNetworkGatewaysClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[LocalNetworkGatewaysClientListResponse]{ - More: func(page LocalNetworkGatewaysClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *LocalNetworkGatewaysClientListResponse) (LocalNetworkGatewaysClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return LocalNetworkGatewaysClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LocalNetworkGatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalNetworkGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *LocalNetworkGatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *LocalNetworkGatewaysClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *LocalNetworkGatewaysClient) listHandleResponse(resp *http.Response) (LocalNetworkGatewaysClientListResponse, error) { - result := LocalNetworkGatewaysClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LocalNetworkGatewayListResult); err != nil { - return LocalNetworkGatewaysClientListResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates a local network gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// localNetworkGatewayName - The name of the local network gateway. -// parameters - Parameters supplied to update local network gateway tags. -// options - LocalNetworkGatewaysClientUpdateTagsOptions contains the optional parameters for the LocalNetworkGatewaysClient.UpdateTags -// method. -func (client *LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject, options *LocalNetworkGatewaysClientUpdateTagsOptions) (LocalNetworkGatewaysClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) - if err != nil { - return LocalNetworkGatewaysClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return LocalNetworkGatewaysClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return LocalNetworkGatewaysClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *LocalNetworkGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject, options *LocalNetworkGatewaysClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if localNetworkGatewayName == "" { - return nil, errors.New("parameter localNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{localNetworkGatewayName}", url.PathEscape(localNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *LocalNetworkGatewaysClient) updateTagsHandleResponse(resp *http.Response) (LocalNetworkGatewaysClientUpdateTagsResponse, error) { - result := LocalNetworkGatewaysClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LocalNetworkGateway); err != nil { - return LocalNetworkGatewaysClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/management_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/management_client.go deleted file mode 100644 index 14b4772c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/management_client.go +++ /dev/null @@ -1,922 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ManagementClient contains the methods for the NetworkManagementClient group. -// Don't use this type directly, use NewManagementClient() instead. -type ManagementClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewManagementClient creates a new instance of ManagementClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ManagementClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CheckDNSNameAvailability - Checks whether a domain name in the cloudapp.azure.com zone is available for use. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location of the domain name. -// domainNameLabel - The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. -// options - ManagementClientCheckDNSNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDNSNameAvailability -// method. -func (client *ManagementClient) CheckDNSNameAvailability(ctx context.Context, location string, domainNameLabel string, options *ManagementClientCheckDNSNameAvailabilityOptions) (ManagementClientCheckDNSNameAvailabilityResponse, error) { - req, err := client.checkDNSNameAvailabilityCreateRequest(ctx, location, domainNameLabel, options) - if err != nil { - return ManagementClientCheckDNSNameAvailabilityResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientCheckDNSNameAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientCheckDNSNameAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkDNSNameAvailabilityHandleResponse(resp) -} - -// checkDNSNameAvailabilityCreateRequest creates the CheckDNSNameAvailability request. -func (client *ManagementClient) checkDNSNameAvailabilityCreateRequest(ctx context.Context, location string, domainNameLabel string, options *ManagementClientCheckDNSNameAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("domainNameLabel", domainNameLabel) - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// checkDNSNameAvailabilityHandleResponse handles the CheckDNSNameAvailability response. -func (client *ManagementClient) checkDNSNameAvailabilityHandleResponse(resp *http.Response) (ManagementClientCheckDNSNameAvailabilityResponse, error) { - result := ManagementClientCheckDNSNameAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DNSNameAvailabilityResult); err != nil { - return ManagementClientCheckDNSNameAvailabilityResponse{}, err - } - return result, nil -} - -// BeginDeleteBastionShareableLink - Deletes the Bastion Shareable Links for all the VMs specified in the request. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// bslRequest - Post request for all the Bastion Shareable Link endpoints. -// options - ManagementClientBeginDeleteBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLink -// method. -func (client *ManagementClient) BeginDeleteBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginDeleteBastionShareableLinkOptions) (*runtime.Poller[ManagementClientDeleteBastionShareableLinkResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ManagementClientDeleteBastionShareableLinkResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ManagementClientDeleteBastionShareableLinkResponse](options.ResumeToken, client.pl, nil) - } -} - -// DeleteBastionShareableLink - Deletes the Bastion Shareable Links for all the VMs specified in the request. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ManagementClient) deleteBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginDeleteBastionShareableLinkOptions) (*http.Response, error) { - req, err := client.deleteBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteBastionShareableLinkCreateRequest creates the DeleteBastionShareableLink request. -func (client *ManagementClient) deleteBastionShareableLinkCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginDeleteBastionShareableLinkOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if bastionHostName == "" { - return nil, errors.New("parameter bastionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, bslRequest) -} - -// NewDisconnectActiveSessionsPager - Returns the list of currently active sessions on the Bastion. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// sessionIDs - The list of sessionids to disconnect. -// options - ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.DisconnectActiveSessions -// method. -func (client *ManagementClient) NewDisconnectActiveSessionsPager(resourceGroupName string, bastionHostName string, sessionIDs SessionIDs, options *ManagementClientDisconnectActiveSessionsOptions) *runtime.Pager[ManagementClientDisconnectActiveSessionsResponse] { - return runtime.NewPager(runtime.PagingHandler[ManagementClientDisconnectActiveSessionsResponse]{ - More: func(page ManagementClientDisconnectActiveSessionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagementClientDisconnectActiveSessionsResponse) (ManagementClientDisconnectActiveSessionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.disconnectActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, sessionIDs, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ManagementClientDisconnectActiveSessionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientDisconnectActiveSessionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientDisconnectActiveSessionsResponse{}, runtime.NewResponseError(resp) - } - return client.disconnectActiveSessionsHandleResponse(resp) - }, - }) -} - -// disconnectActiveSessionsCreateRequest creates the DisconnectActiveSessions request. -func (client *ManagementClient) disconnectActiveSessionsCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, sessionIDs SessionIDs, options *ManagementClientDisconnectActiveSessionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if bastionHostName == "" { - return nil, errors.New("parameter bastionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, sessionIDs) -} - -// disconnectActiveSessionsHandleResponse handles the DisconnectActiveSessions response. -func (client *ManagementClient) disconnectActiveSessionsHandleResponse(resp *http.Response) (ManagementClientDisconnectActiveSessionsResponse, error) { - result := ManagementClientDisconnectActiveSessionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BastionSessionDeleteResult); err != nil { - return ManagementClientDisconnectActiveSessionsResponse{}, err - } - return result, nil -} - -// ExpressRouteProviderPort - Retrieves detail of a provider port. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// providerport - The name of the provider port. -// options - ManagementClientExpressRouteProviderPortOptions contains the optional parameters for the ManagementClient.ExpressRouteProviderPort -// method. -func (client *ManagementClient) ExpressRouteProviderPort(ctx context.Context, providerport string, options *ManagementClientExpressRouteProviderPortOptions) (ManagementClientExpressRouteProviderPortResponse, error) { - req, err := client.expressRouteProviderPortCreateRequest(ctx, providerport, options) - if err != nil { - return ManagementClientExpressRouteProviderPortResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientExpressRouteProviderPortResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientExpressRouteProviderPortResponse{}, runtime.NewResponseError(resp) - } - return client.expressRouteProviderPortHandleResponse(resp) -} - -// expressRouteProviderPortCreateRequest creates the ExpressRouteProviderPort request. -func (client *ManagementClient) expressRouteProviderPortCreateRequest(ctx context.Context, providerport string, options *ManagementClientExpressRouteProviderPortOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts/{providerport}" - if providerport == "" { - return nil, errors.New("parameter providerport cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{providerport}", url.PathEscape(providerport)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// expressRouteProviderPortHandleResponse handles the ExpressRouteProviderPort response. -func (client *ManagementClient) expressRouteProviderPortHandleResponse(resp *http.Response) (ManagementClientExpressRouteProviderPortResponse, error) { - result := ManagementClientExpressRouteProviderPortResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteProviderPort); err != nil { - return ManagementClientExpressRouteProviderPortResponse{}, err - } - return result, nil -} - -// BeginGeneratevirtualwanvpnserverconfigurationvpnprofile - Generates a unique VPN profile for P2S clients for VirtualWan -// and associated VpnServerConfiguration combination in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name. -// virtualWANName - The name of the VirtualWAN whose associated VpnServerConfigurations is needed. -// vpnClientParams - Parameters supplied to the generate VirtualWan VPN profile generation operation. -// options - ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions contains the optional parameters -// for the ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile method. -func (client *ManagementClient) BeginGeneratevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVPNProfileParameters, options *ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions) (*runtime.Poller[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.generatevirtualwanvpnserverconfigurationvpnprofile(ctx, resourceGroupName, virtualWANName, vpnClientParams, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse](options.ResumeToken, client.pl, nil) - } -} - -// Generatevirtualwanvpnserverconfigurationvpnprofile - Generates a unique VPN profile for P2S clients for VirtualWan and -// associated VpnServerConfiguration combination in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ManagementClient) generatevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVPNProfileParameters, options *ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions) (*http.Response, error) { - req, err := client.generatevirtualwanvpnserverconfigurationvpnprofileCreateRequest(ctx, resourceGroupName, virtualWANName, vpnClientParams, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// generatevirtualwanvpnserverconfigurationvpnprofileCreateRequest creates the Generatevirtualwanvpnserverconfigurationvpnprofile request. -func (client *ManagementClient) generatevirtualwanvpnserverconfigurationvpnprofileCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVPNProfileParameters, options *ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualWANName == "" { - return nil, errors.New("parameter virtualWANName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualWANName}", url.PathEscape(virtualWANName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vpnClientParams) -} - -// BeginGetActiveSessions - Returns the list of currently active sessions on the Bastion. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// options - ManagementClientBeginGetActiveSessionsOptions contains the optional parameters for the ManagementClient.BeginGetActiveSessions -// method. -func (client *ManagementClient) BeginGetActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string, options *ManagementClientBeginGetActiveSessionsOptions) (*runtime.Poller[*runtime.Pager[ManagementClientGetActiveSessionsResponse]], error) { - pager := runtime.NewPager(runtime.PagingHandler[ManagementClientGetActiveSessionsResponse]{ - More: func(page ManagementClientGetActiveSessionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagementClientGetActiveSessionsResponse) (ManagementClientGetActiveSessionsResponse, error) { - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - if err != nil { - return ManagementClientGetActiveSessionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientGetActiveSessionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientGetActiveSessionsResponse{}, runtime.NewResponseError(resp) - } - return client.getActiveSessionsHandleResponse(resp) - }, - }) - if options == nil || options.ResumeToken == "" { - resp, err := client.getActiveSessions(ctx, resourceGroupName, bastionHostName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[*runtime.Pager[ManagementClientGetActiveSessionsResponse]]{ - FinalStateVia: runtime.FinalStateViaLocation, - Response: &pager, - }) - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.pl, &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[ManagementClientGetActiveSessionsResponse]]{ - Response: &pager, - }) - } -} - -// GetActiveSessions - Returns the list of currently active sessions on the Bastion. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ManagementClient) getActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string, options *ManagementClientBeginGetActiveSessionsOptions) (*http.Response, error) { - req, err := client.getActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getActiveSessionsCreateRequest creates the GetActiveSessions request. -func (client *ManagementClient) getActiveSessionsCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, options *ManagementClientBeginGetActiveSessionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if bastionHostName == "" { - return nil, errors.New("parameter bastionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getActiveSessionsHandleResponse handles the GetActiveSessions response. -func (client *ManagementClient) getActiveSessionsHandleResponse(resp *http.Response) (ManagementClientGetActiveSessionsResponse, error) { - result := ManagementClientGetActiveSessionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BastionActiveSessionListResult); err != nil { - return ManagementClientGetActiveSessionsResponse{}, err - } - return result, nil -} - -// NewGetBastionShareableLinkPager - Return the Bastion Shareable Links for all the VMs specified in the request. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// bslRequest - Post request for all the Bastion Shareable Link endpoints. -// options - ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.GetBastionShareableLink -// method. -func (client *ManagementClient) NewGetBastionShareableLinkPager(resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientGetBastionShareableLinkOptions) *runtime.Pager[ManagementClientGetBastionShareableLinkResponse] { - return runtime.NewPager(runtime.PagingHandler[ManagementClientGetBastionShareableLinkResponse]{ - More: func(page ManagementClientGetBastionShareableLinkResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagementClientGetBastionShareableLinkResponse) (ManagementClientGetBastionShareableLinkResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ManagementClientGetBastionShareableLinkResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientGetBastionShareableLinkResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientGetBastionShareableLinkResponse{}, runtime.NewResponseError(resp) - } - return client.getBastionShareableLinkHandleResponse(resp) - }, - }) -} - -// getBastionShareableLinkCreateRequest creates the GetBastionShareableLink request. -func (client *ManagementClient) getBastionShareableLinkCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientGetBastionShareableLinkOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if bastionHostName == "" { - return nil, errors.New("parameter bastionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, bslRequest) -} - -// getBastionShareableLinkHandleResponse handles the GetBastionShareableLink response. -func (client *ManagementClient) getBastionShareableLinkHandleResponse(resp *http.Response) (ManagementClientGetBastionShareableLinkResponse, error) { - result := ManagementClientGetBastionShareableLinkResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BastionShareableLinkListResult); err != nil { - return ManagementClientGetBastionShareableLinkResponse{}, err - } - return result, nil -} - -// ListActiveConnectivityConfigurations - Lists active connectivity configurations in a network manager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Active Configuration Parameter. -// options - ManagementClientListActiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListActiveConnectivityConfigurations -// method. -func (client *ManagementClient) ListActiveConnectivityConfigurations(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ActiveConfigurationParameter, options *ManagementClientListActiveConnectivityConfigurationsOptions) (ManagementClientListActiveConnectivityConfigurationsResponse, error) { - req, err := client.listActiveConnectivityConfigurationsCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) - if err != nil { - return ManagementClientListActiveConnectivityConfigurationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientListActiveConnectivityConfigurationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientListActiveConnectivityConfigurationsResponse{}, runtime.NewResponseError(resp) - } - return client.listActiveConnectivityConfigurationsHandleResponse(resp) -} - -// listActiveConnectivityConfigurationsCreateRequest creates the ListActiveConnectivityConfigurations request. -func (client *ManagementClient) listActiveConnectivityConfigurationsCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ActiveConfigurationParameter, options *ManagementClientListActiveConnectivityConfigurationsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveConnectivityConfigurations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// listActiveConnectivityConfigurationsHandleResponse handles the ListActiveConnectivityConfigurations response. -func (client *ManagementClient) listActiveConnectivityConfigurationsHandleResponse(resp *http.Response) (ManagementClientListActiveConnectivityConfigurationsResponse, error) { - result := ManagementClientListActiveConnectivityConfigurationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ActiveConnectivityConfigurationsListResult); err != nil { - return ManagementClientListActiveConnectivityConfigurationsResponse{}, err - } - return result, nil -} - -// ListActiveSecurityAdminRules - Lists active security admin rules in a network manager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Active Configuration Parameter. -// options - ManagementClientListActiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListActiveSecurityAdminRules -// method. -func (client *ManagementClient) ListActiveSecurityAdminRules(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ActiveConfigurationParameter, options *ManagementClientListActiveSecurityAdminRulesOptions) (ManagementClientListActiveSecurityAdminRulesResponse, error) { - req, err := client.listActiveSecurityAdminRulesCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) - if err != nil { - return ManagementClientListActiveSecurityAdminRulesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientListActiveSecurityAdminRulesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientListActiveSecurityAdminRulesResponse{}, runtime.NewResponseError(resp) - } - return client.listActiveSecurityAdminRulesHandleResponse(resp) -} - -// listActiveSecurityAdminRulesCreateRequest creates the ListActiveSecurityAdminRules request. -func (client *ManagementClient) listActiveSecurityAdminRulesCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ActiveConfigurationParameter, options *ManagementClientListActiveSecurityAdminRulesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityAdminRules" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// listActiveSecurityAdminRulesHandleResponse handles the ListActiveSecurityAdminRules response. -func (client *ManagementClient) listActiveSecurityAdminRulesHandleResponse(resp *http.Response) (ManagementClientListActiveSecurityAdminRulesResponse, error) { - result := ManagementClientListActiveSecurityAdminRulesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ActiveSecurityAdminRulesListResult); err != nil { - return ManagementClientListActiveSecurityAdminRulesResponse{}, err - } - return result, nil -} - -// ListNetworkManagerEffectiveConnectivityConfigurations - List all effective connectivity configurations applied on a virtual -// network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// parameters - Parameters supplied to list correct page. -// options - ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions contains the optional parameters -// for the ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations method. -func (client *ManagementClient) ListNetworkManagerEffectiveConnectivityConfigurations(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters QueryRequestOptions, options *ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions) (ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse, error) { - req, err := client.listNetworkManagerEffectiveConnectivityConfigurationsCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) - if err != nil { - return ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse{}, runtime.NewResponseError(resp) - } - return client.listNetworkManagerEffectiveConnectivityConfigurationsHandleResponse(resp) -} - -// listNetworkManagerEffectiveConnectivityConfigurationsCreateRequest creates the ListNetworkManagerEffectiveConnectivityConfigurations request. -func (client *ManagementClient) listNetworkManagerEffectiveConnectivityConfigurationsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters QueryRequestOptions, options *ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveConnectivityConfigurations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// listNetworkManagerEffectiveConnectivityConfigurationsHandleResponse handles the ListNetworkManagerEffectiveConnectivityConfigurations response. -func (client *ManagementClient) listNetworkManagerEffectiveConnectivityConfigurationsHandleResponse(resp *http.Response) (ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse, error) { - result := ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerEffectiveConnectivityConfigurationListResult); err != nil { - return ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse{}, err - } - return result, nil -} - -// ListNetworkManagerEffectiveSecurityAdminRules - List all effective security admin rules applied on a virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// parameters - Parameters supplied to list correct page. -// options - ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions contains the optional parameters for the -// ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules method. -func (client *ManagementClient) ListNetworkManagerEffectiveSecurityAdminRules(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters QueryRequestOptions, options *ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions) (ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse, error) { - req, err := client.listNetworkManagerEffectiveSecurityAdminRulesCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) - if err != nil { - return ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse{}, runtime.NewResponseError(resp) - } - return client.listNetworkManagerEffectiveSecurityAdminRulesHandleResponse(resp) -} - -// listNetworkManagerEffectiveSecurityAdminRulesCreateRequest creates the ListNetworkManagerEffectiveSecurityAdminRules request. -func (client *ManagementClient) listNetworkManagerEffectiveSecurityAdminRulesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters QueryRequestOptions, options *ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveSecurityAdminRules" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// listNetworkManagerEffectiveSecurityAdminRulesHandleResponse handles the ListNetworkManagerEffectiveSecurityAdminRules response. -func (client *ManagementClient) listNetworkManagerEffectiveSecurityAdminRulesHandleResponse(resp *http.Response) (ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse, error) { - result := ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerEffectiveSecurityAdminRulesListResult); err != nil { - return ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse{}, err - } - return result, nil -} - -// BeginPutBastionShareableLink - Creates a Bastion Shareable Links for all the VMs specified in the request. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// bslRequest - Post request for all the Bastion Shareable Link endpoints. -// options - ManagementClientBeginPutBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginPutBastionShareableLink -// method. -func (client *ManagementClient) BeginPutBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginPutBastionShareableLinkOptions) (*runtime.Poller[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]], error) { - pager := runtime.NewPager(runtime.PagingHandler[ManagementClientPutBastionShareableLinkResponse]{ - More: func(page ManagementClientPutBastionShareableLinkResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagementClientPutBastionShareableLinkResponse) (ManagementClientPutBastionShareableLinkResponse, error) { - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - if err != nil { - return ManagementClientPutBastionShareableLinkResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientPutBastionShareableLinkResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientPutBastionShareableLinkResponse{}, runtime.NewResponseError(resp) - } - return client.putBastionShareableLinkHandleResponse(resp) - }, - }) - if options == nil || options.ResumeToken == "" { - resp, err := client.putBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]]{ - FinalStateVia: runtime.FinalStateViaLocation, - Response: &pager, - }) - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.pl, &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]]{ - Response: &pager, - }) - } -} - -// PutBastionShareableLink - Creates a Bastion Shareable Links for all the VMs specified in the request. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ManagementClient) putBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginPutBastionShareableLinkOptions) (*http.Response, error) { - req, err := client.putBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// putBastionShareableLinkCreateRequest creates the PutBastionShareableLink request. -func (client *ManagementClient) putBastionShareableLinkCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginPutBastionShareableLinkOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if bastionHostName == "" { - return nil, errors.New("parameter bastionHostName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, bslRequest) -} - -// putBastionShareableLinkHandleResponse handles the PutBastionShareableLink response. -func (client *ManagementClient) putBastionShareableLinkHandleResponse(resp *http.Response) (ManagementClientPutBastionShareableLinkResponse, error) { - result := ManagementClientPutBastionShareableLinkResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BastionShareableLinkListResult); err != nil { - return ManagementClientPutBastionShareableLinkResponse{}, err - } - return result, nil -} - -// SupportedSecurityProviders - Gives the supported security providers for the virtual wan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name. -// virtualWANName - The name of the VirtualWAN for which supported security providers are needed. -// options - ManagementClientSupportedSecurityProvidersOptions contains the optional parameters for the ManagementClient.SupportedSecurityProviders -// method. -func (client *ManagementClient) SupportedSecurityProviders(ctx context.Context, resourceGroupName string, virtualWANName string, options *ManagementClientSupportedSecurityProvidersOptions) (ManagementClientSupportedSecurityProvidersResponse, error) { - req, err := client.supportedSecurityProvidersCreateRequest(ctx, resourceGroupName, virtualWANName, options) - if err != nil { - return ManagementClientSupportedSecurityProvidersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementClientSupportedSecurityProvidersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementClientSupportedSecurityProvidersResponse{}, runtime.NewResponseError(resp) - } - return client.supportedSecurityProvidersHandleResponse(resp) -} - -// supportedSecurityProvidersCreateRequest creates the SupportedSecurityProviders request. -func (client *ManagementClient) supportedSecurityProvidersCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, options *ManagementClientSupportedSecurityProvidersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualWANName == "" { - return nil, errors.New("parameter virtualWANName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualWANName}", url.PathEscape(virtualWANName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// supportedSecurityProvidersHandleResponse handles the SupportedSecurityProviders response. -func (client *ManagementClient) supportedSecurityProvidersHandleResponse(resp *http.Response) (ManagementClientSupportedSecurityProvidersResponse, error) { - result := ManagementClientSupportedSecurityProvidersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualWanSecurityProviders); err != nil { - return ManagementClientSupportedSecurityProvidersResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managementgroupnetworkmanagerconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managementgroupnetworkmanagerconnections_client.go deleted file mode 100644 index 38807117..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managementgroupnetworkmanagerconnections_client.go +++ /dev/null @@ -1,272 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// ManagementGroupNetworkManagerConnectionsClient contains the methods for the ManagementGroupNetworkManagerConnections group. -// Don't use this type directly, use NewManagementGroupNetworkManagerConnectionsClient() instead. -type ManagementGroupNetworkManagerConnectionsClient struct { - host string - pl runtime.Pipeline -} - -// NewManagementGroupNetworkManagerConnectionsClient creates a new instance of ManagementGroupNetworkManagerConnectionsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewManagementGroupNetworkManagerConnectionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementGroupNetworkManagerConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ManagementGroupNetworkManagerConnectionsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create a network manager connection on this management group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. -// networkManagerConnectionName - Name for the network manager connection. -// parameters - Network manager connection to be created/updated. -// options - ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the -// ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate method. -func (client *ManagementGroupNetworkManagerConnectionsClient) CreateOrUpdate(ctx context.Context, managementGroupID string, networkManagerConnectionName string, parameters ManagerConnection, options *ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions) (ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, managementGroupID, networkManagerConnectionName, parameters, options) - if err != nil { - return ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ManagementGroupNetworkManagerConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, managementGroupID string, networkManagerConnectionName string, parameters ManagerConnection, options *ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" - if managementGroupID == "" { - return nil, errors.New("parameter managementGroupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{managementGroupId}", url.PathEscape(managementGroupID)) - if networkManagerConnectionName == "" { - return nil, errors.New("parameter networkManagerConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ManagementGroupNetworkManagerConnectionsClient) createOrUpdateHandleResponse(resp *http.Response) (ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse, error) { - result := ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnection); err != nil { - return ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete specified pending connection created by this management group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. -// networkManagerConnectionName - Name for the network manager connection. -// options - ManagementGroupNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Delete -// method. -func (client *ManagementGroupNetworkManagerConnectionsClient) Delete(ctx context.Context, managementGroupID string, networkManagerConnectionName string, options *ManagementGroupNetworkManagerConnectionsClientDeleteOptions) (ManagementGroupNetworkManagerConnectionsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, managementGroupID, networkManagerConnectionName, options) - if err != nil { - return ManagementGroupNetworkManagerConnectionsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementGroupNetworkManagerConnectionsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ManagementGroupNetworkManagerConnectionsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ManagementGroupNetworkManagerConnectionsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ManagementGroupNetworkManagerConnectionsClient) deleteCreateRequest(ctx context.Context, managementGroupID string, networkManagerConnectionName string, options *ManagementGroupNetworkManagerConnectionsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" - if managementGroupID == "" { - return nil, errors.New("parameter managementGroupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{managementGroupId}", url.PathEscape(managementGroupID)) - if networkManagerConnectionName == "" { - return nil, errors.New("parameter networkManagerConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a specified connection created by this management group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. -// networkManagerConnectionName - Name for the network manager connection. -// options - ManagementGroupNetworkManagerConnectionsClientGetOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Get -// method. -func (client *ManagementGroupNetworkManagerConnectionsClient) Get(ctx context.Context, managementGroupID string, networkManagerConnectionName string, options *ManagementGroupNetworkManagerConnectionsClientGetOptions) (ManagementGroupNetworkManagerConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, managementGroupID, networkManagerConnectionName, options) - if err != nil { - return ManagementGroupNetworkManagerConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementGroupNetworkManagerConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementGroupNetworkManagerConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ManagementGroupNetworkManagerConnectionsClient) getCreateRequest(ctx context.Context, managementGroupID string, networkManagerConnectionName string, options *ManagementGroupNetworkManagerConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" - if managementGroupID == "" { - return nil, errors.New("parameter managementGroupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{managementGroupId}", url.PathEscape(managementGroupID)) - if networkManagerConnectionName == "" { - return nil, errors.New("parameter networkManagerConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ManagementGroupNetworkManagerConnectionsClient) getHandleResponse(resp *http.Response) (ManagementGroupNetworkManagerConnectionsClientGetResponse, error) { - result := ManagementGroupNetworkManagerConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnection); err != nil { - return ManagementGroupNetworkManagerConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all network manager connections created by this management group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. -// options - ManagementGroupNetworkManagerConnectionsClientListOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.List -// method. -func (client *ManagementGroupNetworkManagerConnectionsClient) NewListPager(managementGroupID string, options *ManagementGroupNetworkManagerConnectionsClientListOptions) *runtime.Pager[ManagementGroupNetworkManagerConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ManagementGroupNetworkManagerConnectionsClientListResponse]{ - More: func(page ManagementGroupNetworkManagerConnectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagementGroupNetworkManagerConnectionsClientListResponse) (ManagementGroupNetworkManagerConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, managementGroupID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ManagementGroupNetworkManagerConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagementGroupNetworkManagerConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagementGroupNetworkManagerConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ManagementGroupNetworkManagerConnectionsClient) listCreateRequest(ctx context.Context, managementGroupID string, options *ManagementGroupNetworkManagerConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections" - if managementGroupID == "" { - return nil, errors.New("parameter managementGroupID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{managementGroupId}", url.PathEscape(managementGroupID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ManagementGroupNetworkManagerConnectionsClient) listHandleResponse(resp *http.Response) (ManagementGroupNetworkManagerConnectionsClientListResponse, error) { - result := ManagementGroupNetworkManagerConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnectionListResult); err != nil { - return ManagementGroupNetworkManagerConnectionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managercommits_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managercommits_client.go deleted file mode 100644 index 4ba8cc48..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managercommits_client.go +++ /dev/null @@ -1,123 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ManagerCommitsClient contains the methods for the NetworkManagerCommits group. -// Don't use this type directly, use NewManagerCommitsClient() instead. -type ManagerCommitsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewManagerCommitsClient creates a new instance of ManagerCommitsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewManagerCommitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagerCommitsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ManagerCommitsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginPost - Post a Network Manager Commit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Parameters supplied to specify which Managed Network commit is. -// options - ManagerCommitsClientBeginPostOptions contains the optional parameters for the ManagerCommitsClient.BeginPost -// method. -func (client *ManagerCommitsClient) BeginPost(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerCommit, options *ManagerCommitsClientBeginPostOptions) (*runtime.Poller[ManagerCommitsClientPostResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.post(ctx, resourceGroupName, networkManagerName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ManagerCommitsClientPostResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ManagerCommitsClientPostResponse](options.ResumeToken, client.pl, nil) - } -} - -// Post - Post a Network Manager Commit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ManagerCommitsClient) post(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerCommit, options *ManagerCommitsClientBeginPostOptions) (*http.Response, error) { - req, err := client.postCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// postCreateRequest creates the Post request. -func (client *ManagerCommitsClient) postCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerCommit, options *ManagerCommitsClientBeginPostOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commit" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managerdeploymentstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managerdeploymentstatus_client.go deleted file mode 100644 index 72b63164..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managerdeploymentstatus_client.go +++ /dev/null @@ -1,115 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ManagerDeploymentStatusClient contains the methods for the NetworkManagerDeploymentStatus group. -// Don't use this type directly, use NewManagerDeploymentStatusClient() instead. -type ManagerDeploymentStatusClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewManagerDeploymentStatusClient creates a new instance of ManagerDeploymentStatusClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewManagerDeploymentStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagerDeploymentStatusClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ManagerDeploymentStatusClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// List - Post to List of Network Manager Deployment Status. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Parameters supplied to specify which Managed Network deployment status is. -// options - ManagerDeploymentStatusClientListOptions contains the optional parameters for the ManagerDeploymentStatusClient.List -// method. -func (client *ManagerDeploymentStatusClient) List(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerDeploymentStatusParameter, options *ManagerDeploymentStatusClientListOptions) (ManagerDeploymentStatusClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) - if err != nil { - return ManagerDeploymentStatusClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagerDeploymentStatusClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagerDeploymentStatusClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *ManagerDeploymentStatusClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerDeploymentStatusParameter, options *ManagerDeploymentStatusClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listDeploymentStatus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// listHandleResponse handles the List response. -func (client *ManagerDeploymentStatusClient) listHandleResponse(resp *http.Response) (ManagerDeploymentStatusClientListResponse, error) { - result := ManagerDeploymentStatusClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerDeploymentStatusListResult); err != nil { - return ManagerDeploymentStatusClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managers_client.go deleted file mode 100644 index b8a64c3e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/managers_client.go +++ /dev/null @@ -1,431 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// ManagersClient contains the methods for the NetworkManagers group. -// Don't use this type directly, use NewManagersClient() instead. -type ManagersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewManagersClient creates a new instance of ManagersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewManagersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ManagersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a Network Manager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Parameters supplied to specify which network manager is. -// options - ManagersClientCreateOrUpdateOptions contains the optional parameters for the ManagersClient.CreateOrUpdate method. -func (client *ManagersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, parameters Manager, options *ManagersClientCreateOrUpdateOptions) (ManagersClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) - if err != nil { - return ManagersClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagersClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ManagersClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ManagersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters Manager, options *ManagersClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ManagersClient) createOrUpdateHandleResponse(resp *http.Response) (ManagersClientCreateOrUpdateResponse, error) { - result := ManagersClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Manager); err != nil { - return ManagersClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes a network manager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - ManagersClientBeginDeleteOptions contains the optional parameters for the ManagersClient.BeginDelete method. -func (client *ManagersClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientBeginDeleteOptions) (*runtime.Poller[ManagersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ManagersClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ManagersClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a network manager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ManagersClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ManagersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Force != nil { - reqQP.Set("force", strconv.FormatBool(*options.Force)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Network Manager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - ManagersClientGetOptions contains the optional parameters for the ManagersClient.Get method. -func (client *ManagersClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientGetOptions) (ManagersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, options) - if err != nil { - return ManagersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ManagersClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ManagersClient) getHandleResponse(resp *http.Response) (ManagersClientGetResponse, error) { - result := ManagersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Manager); err != nil { - return ManagersClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List network managers in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - ManagersClientListOptions contains the optional parameters for the ManagersClient.List method. -func (client *ManagersClient) NewListPager(resourceGroupName string, options *ManagersClientListOptions) *runtime.Pager[ManagersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ManagersClientListResponse]{ - More: func(page ManagersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagersClientListResponse) (ManagersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ManagersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ManagersClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ManagersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ManagersClient) listHandleResponse(resp *http.Response) (ManagersClientListResponse, error) { - result := ManagersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerListResult); err != nil { - return ManagersClientListResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - List all network managers in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ManagersClientListBySubscriptionOptions contains the optional parameters for the ManagersClient.ListBySubscription -// method. -func (client *ManagersClient) NewListBySubscriptionPager(options *ManagersClientListBySubscriptionOptions) *runtime.Pager[ManagersClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[ManagersClientListBySubscriptionResponse]{ - More: func(page ManagersClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagersClientListBySubscriptionResponse) (ManagersClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ManagersClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagersClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagersClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *ManagersClient) listBySubscriptionCreateRequest(ctx context.Context, options *ManagersClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagers" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *ManagersClient) listBySubscriptionHandleResponse(resp *http.Response) (ManagersClientListBySubscriptionResponse, error) { - result := ManagersClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerListResult); err != nil { - return ManagersClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Patch - Patch NetworkManager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Parameters supplied to specify which network manager is. -// options - ManagersClientPatchOptions contains the optional parameters for the ManagersClient.Patch method. -func (client *ManagersClient) Patch(ctx context.Context, resourceGroupName string, networkManagerName string, parameters PatchObject, options *ManagersClientPatchOptions) (ManagersClientPatchResponse, error) { - req, err := client.patchCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) - if err != nil { - return ManagersClientPatchResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ManagersClientPatchResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagersClientPatchResponse{}, runtime.NewResponseError(resp) - } - return client.patchHandleResponse(resp) -} - -// patchCreateRequest creates the Patch request. -func (client *ManagersClient) patchCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters PatchObject, options *ManagersClientPatchOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// patchHandleResponse handles the Patch response. -func (client *ManagersClient) patchHandleResponse(resp *http.Response) (ManagersClientPatchResponse, error) { - result := ManagersClientPatchResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Manager); err != nil { - return ManagersClientPatchResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/models.go deleted file mode 100644 index ce906452..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/models.go +++ /dev/null @@ -1,16991 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import "time" - -// AADAuthenticationParameters - AAD Vpn authentication type related parameters. -type AADAuthenticationParameters struct { - // AAD Vpn authentication parameter AAD audience. - AADAudience *string `json:"aadAudience,omitempty"` - - // AAD Vpn authentication parameter AAD issuer. - AADIssuer *string `json:"aadIssuer,omitempty"` - - // AAD Vpn authentication parameter AAD tenant. - AADTenant *string `json:"aadTenant,omitempty"` -} - -// ActiveBaseSecurityAdminRuleClassification provides polymorphic access to related types. -// Call the interface's GetActiveBaseSecurityAdminRule() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ActiveBaseSecurityAdminRule, *ActiveDefaultSecurityAdminRule, *ActiveSecurityAdminRule -type ActiveBaseSecurityAdminRuleClassification interface { - // GetActiveBaseSecurityAdminRule returns the ActiveBaseSecurityAdminRule content of the underlying type. - GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule -} - -// ActiveBaseSecurityAdminRule - Network base admin rule. -type ActiveBaseSecurityAdminRule struct { - // REQUIRED; Whether the rule is custom or default. - Kind *EffectiveAdminRuleKind `json:"kind,omitempty"` - - // Deployment time string. - CommitTime *time.Time `json:"commitTime,omitempty"` - - // A description of the security admin configuration. - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Deployment region. - Region *string `json:"region,omitempty"` - - // Groups for rule collection - RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - - // A description of the rule collection. - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - - // Effective configuration groups. - RuleGroups []*ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -// GetActiveBaseSecurityAdminRule implements the ActiveBaseSecurityAdminRuleClassification interface for type ActiveBaseSecurityAdminRule. -func (a *ActiveBaseSecurityAdminRule) GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule { - return a -} - -// ActiveConfigurationParameter - Effective Virtual Networks Parameter. -type ActiveConfigurationParameter struct { - // List of regions. - Regions []*string `json:"regions,omitempty"` - - // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current - // request) to retrieve the next page of data. - SkipToken *string `json:"skipToken,omitempty"` -} - -// ActiveConnectivityConfiguration - Active connectivity configuration. -type ActiveConnectivityConfiguration struct { - // Deployment time string. - CommitTime *time.Time `json:"commitTime,omitempty"` - - // Effective configuration groups. - ConfigurationGroups []*ConfigurationGroup `json:"configurationGroups,omitempty"` - - // Connectivity configuration ID. - ID *string `json:"id,omitempty"` - - // Properties of a network manager connectivity configuration - Properties *ConnectivityConfigurationProperties `json:"properties,omitempty"` - - // Deployment region. - Region *string `json:"region,omitempty"` -} - -// ActiveConnectivityConfigurationsListResult - Result of the request to list active connectivity configurations. It contains -// a list of active connectivity configurations and a skiptoken to get the next set of results. -type ActiveConnectivityConfigurationsListResult struct { - // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current - // request) to retrieve the next page of data. - SkipToken *string `json:"skipToken,omitempty"` - - // Gets a page of active connectivity configurations. - Value []*ActiveConnectivityConfiguration `json:"value,omitempty"` -} - -// ActiveDefaultSecurityAdminRule - Network default admin rule. -type ActiveDefaultSecurityAdminRule struct { - // REQUIRED; Whether the rule is custom or default. - Kind *EffectiveAdminRuleKind `json:"kind,omitempty"` - - // Deployment time string. - CommitTime *time.Time `json:"commitTime,omitempty"` - - // A description of the security admin configuration. - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Indicates the properties of the default security admin rule - Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` - - // Deployment region. - Region *string `json:"region,omitempty"` - - // Groups for rule collection - RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - - // A description of the rule collection. - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - - // Effective configuration groups. - RuleGroups []*ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -// GetActiveBaseSecurityAdminRule implements the ActiveBaseSecurityAdminRuleClassification interface for type ActiveDefaultSecurityAdminRule. -func (a *ActiveDefaultSecurityAdminRule) GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule { - return &ActiveBaseSecurityAdminRule{ - ID: a.ID, - CommitTime: a.CommitTime, - Region: a.Region, - ConfigurationDescription: a.ConfigurationDescription, - RuleCollectionDescription: a.RuleCollectionDescription, - RuleCollectionAppliesToGroups: a.RuleCollectionAppliesToGroups, - RuleGroups: a.RuleGroups, - Kind: a.Kind, - } -} - -// ActiveSecurityAdminRule - Network admin rule. -type ActiveSecurityAdminRule struct { - // REQUIRED; Whether the rule is custom or default. - Kind *EffectiveAdminRuleKind `json:"kind,omitempty"` - - // Deployment time string. - CommitTime *time.Time `json:"commitTime,omitempty"` - - // A description of the security admin configuration. - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Indicates the properties of the security admin rule - Properties *AdminPropertiesFormat `json:"properties,omitempty"` - - // Deployment region. - Region *string `json:"region,omitempty"` - - // Groups for rule collection - RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - - // A description of the rule collection. - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - - // Effective configuration groups. - RuleGroups []*ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -// GetActiveBaseSecurityAdminRule implements the ActiveBaseSecurityAdminRuleClassification interface for type ActiveSecurityAdminRule. -func (a *ActiveSecurityAdminRule) GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule { - return &ActiveBaseSecurityAdminRule{ - ID: a.ID, - CommitTime: a.CommitTime, - Region: a.Region, - ConfigurationDescription: a.ConfigurationDescription, - RuleCollectionDescription: a.RuleCollectionDescription, - RuleCollectionAppliesToGroups: a.RuleCollectionAppliesToGroups, - RuleGroups: a.RuleGroups, - Kind: a.Kind, - } -} - -// ActiveSecurityAdminRulesListResult - Result of the request to list active security admin rules. It contains a list of active -// security admin rules and a skiptoken to get the next set of results. -type ActiveSecurityAdminRulesListResult struct { - // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current - // request) to retrieve the next page of data. - SkipToken *string `json:"skipToken,omitempty"` - - // Gets a page of active security admin rules. - Value []ActiveBaseSecurityAdminRuleClassification `json:"value,omitempty"` -} - -// AddressPrefixItem - Address prefix item. -type AddressPrefixItem struct { - // Address prefix. - AddressPrefix *string `json:"addressPrefix,omitempty"` - - // Address prefix type. - AddressPrefixType *AddressPrefixType `json:"addressPrefixType,omitempty"` -} - -// AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. -type AddressSpace struct { - // A list of address blocks reserved for this virtual network in CIDR notation. - AddressPrefixes []*string `json:"addressPrefixes,omitempty"` -} - -// AdminPropertiesFormat - Security admin rule resource. -type AdminPropertiesFormat struct { - // REQUIRED; Indicates the access allowed for this particular rule - Access *SecurityConfigurationRuleAccess `json:"access,omitempty"` - - // REQUIRED; Indicates if the traffic matched against the rule in inbound or outbound. - Direction *SecurityConfigurationRuleDirection `json:"direction,omitempty"` - - // REQUIRED; The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule - // in the collection. The lower the priority number, the higher the priority of the rule. - Priority *int32 `json:"priority,omitempty"` - - // REQUIRED; Network protocol this rule applies to. - Protocol *SecurityConfigurationRuleProtocol `json:"protocol,omitempty"` - - // A description for this rule. Restricted to 140 chars. - Description *string `json:"description,omitempty"` - - // The destination port ranges. - DestinationPortRanges []*string `json:"destinationPortRanges,omitempty"` - - // The destination address prefixes. CIDR or destination IP ranges. - Destinations []*AddressPrefixItem `json:"destinations,omitempty"` - - // The source port ranges. - SourcePortRanges []*string `json:"sourcePortRanges,omitempty"` - - // The CIDR or source IP ranges. - Sources []*AddressPrefixItem `json:"sources,omitempty"` - - // READ-ONLY; The provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// AdminRule - Network admin rule. -type AdminRule struct { - // REQUIRED; Whether the rule is custom or default. - Kind *AdminRuleKind `json:"kind,omitempty"` - - // Indicates the properties of the security admin rule - Properties *AdminPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GetBaseAdminRule implements the BaseAdminRuleClassification interface for type AdminRule. -func (a *AdminRule) GetBaseAdminRule() *BaseAdminRule { - return &BaseAdminRule{ - Kind: a.Kind, - SystemData: a.SystemData, - ID: a.ID, - Name: a.Name, - Type: a.Type, - Etag: a.Etag, - } -} - -// AdminRuleCollection - Defines the admin rule collection. -type AdminRuleCollection struct { - // Indicates the properties for the network manager admin rule collection. - Properties *AdminRuleCollectionPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AdminRuleCollectionListResult - Security admin configuration rule collection list result. -type AdminRuleCollectionListResult struct { - // Gets the URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of network manager security admin configuration rule collections - Value []*AdminRuleCollection `json:"value,omitempty"` -} - -// AdminRuleCollectionPropertiesFormat - Defines the admin rule collection properties. -type AdminRuleCollectionPropertiesFormat struct { - // REQUIRED; Groups for configuration - AppliesToGroups []*ManagerSecurityGroupItem `json:"appliesToGroups,omitempty"` - - // A description of the admin rule collection. - Description *string `json:"description,omitempty"` - - // READ-ONLY; The provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// AdminRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the AdminRuleCollectionsClient.BeginDelete -// method. -type AdminRuleCollectionsClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AdminRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the AdminRuleCollectionsClient.CreateOrUpdate -// method. -type AdminRuleCollectionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AdminRuleCollectionsClientGetOptions contains the optional parameters for the AdminRuleCollectionsClient.Get method. -type AdminRuleCollectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AdminRuleCollectionsClientListOptions contains the optional parameters for the AdminRuleCollectionsClient.List method. -type AdminRuleCollectionsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// AdminRuleListResult - security configuration admin rule list result. -type AdminRuleListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of admin rules - Value []BaseAdminRuleClassification `json:"value,omitempty"` -} - -// AdminRulesClientBeginDeleteOptions contains the optional parameters for the AdminRulesClient.BeginDelete method. -type AdminRulesClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AdminRulesClientCreateOrUpdateOptions contains the optional parameters for the AdminRulesClient.CreateOrUpdate method. -type AdminRulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AdminRulesClientGetOptions contains the optional parameters for the AdminRulesClient.Get method. -type AdminRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// AdminRulesClientListOptions contains the optional parameters for the AdminRulesClient.List method. -type AdminRulesClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// ApplicationGateway - Application gateway resource. -type ApplicationGateway struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The identity of the application gateway, if configured. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the application gateway. - Properties *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // A list of availability zones denoting where the resource needs to come from. - Zones []*string `json:"zones,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayAuthenticationCertificate - Authentication certificates of an application gateway. -type ApplicationGatewayAuthenticationCertificate struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the authentication certificate that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway authentication certificate. - Properties *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayAuthenticationCertificatePropertiesFormat - Authentication certificates properties of an application -// gateway. -type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { - // Certificate public data. - Data *string `json:"data,omitempty"` - - // READ-ONLY; The provisioning state of the authentication certificate resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayAutoscaleConfiguration - Application Gateway autoscale configuration. -type ApplicationGatewayAutoscaleConfiguration struct { - // REQUIRED; Lower bound on number of Application Gateway capacity. - MinCapacity *int32 `json:"minCapacity,omitempty"` - - // Upper bound on number of Application Gateway capacity. - MaxCapacity *int32 `json:"maxCapacity,omitempty"` -} - -// ApplicationGatewayAvailableSSLOptions - Response for ApplicationGatewayAvailableSslOptions API service call. -type ApplicationGatewayAvailableSSLOptions struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the application gateway available SSL options. - Properties *ApplicationGatewayAvailableSSLOptionsPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayAvailableSSLOptionsPropertiesFormat - Properties of ApplicationGatewayAvailableSslOptions. -type ApplicationGatewayAvailableSSLOptionsPropertiesFormat struct { - // List of available Ssl cipher suites. - AvailableCipherSuites []*ApplicationGatewaySSLCipherSuite `json:"availableCipherSuites,omitempty"` - - // List of available Ssl protocols. - AvailableProtocols []*ApplicationGatewaySSLProtocol `json:"availableProtocols,omitempty"` - - // Name of the Ssl predefined policy applied by default to application gateway. - DefaultPolicy *ApplicationGatewaySSLPolicyName `json:"defaultPolicy,omitempty"` - - // List of available Ssl predefined policy. - PredefinedPolicies []*SubResource `json:"predefinedPolicies,omitempty"` -} - -// ApplicationGatewayAvailableSSLPredefinedPolicies - Response for ApplicationGatewayAvailableSslOptions API service call. -type ApplicationGatewayAvailableSSLPredefinedPolicies struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of available Ssl predefined policy. - Value []*ApplicationGatewaySSLPredefinedPolicy `json:"value,omitempty"` -} - -// ApplicationGatewayAvailableWafRuleSetsResult - Response for ApplicationGatewayAvailableWafRuleSets API service call. -type ApplicationGatewayAvailableWafRuleSetsResult struct { - // The list of application gateway rule sets. - Value []*ApplicationGatewayFirewallRuleSet `json:"value,omitempty"` -} - -// ApplicationGatewayBackendAddress - Backend address of an application gateway. -type ApplicationGatewayBackendAddress struct { - // Fully qualified domain name (FQDN). - Fqdn *string `json:"fqdn,omitempty"` - - // IP address. - IPAddress *string `json:"ipAddress,omitempty"` -} - -// ApplicationGatewayBackendAddressPool - Backend Address Pool of an application gateway. -type ApplicationGatewayBackendAddressPool struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the backend address pool that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway backend address pool. - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayBackendAddressPoolPropertiesFormat - Properties of Backend Address Pool of an application gateway. -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - // Backend addresses. - BackendAddresses []*ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - - // READ-ONLY; Collection of references to IPs defined in network interfaces. - BackendIPConfigurations []*InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the backend address pool resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayBackendHTTPSettings - Backend address pool settings of an application gateway. -type ApplicationGatewayBackendHTTPSettings struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the backend http settings that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway backend HTTP settings. - Properties *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayBackendHTTPSettingsPropertiesFormat - Properties of Backend address pool settings of an application gateway. -type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { - // Cookie name to use for the affinity cookie. - AffinityCookieName *string `json:"affinityCookieName,omitempty"` - - // Array of references to application gateway authentication certificates. - AuthenticationCertificates []*SubResource `json:"authenticationCertificates,omitempty"` - - // Connection draining of the backend http settings resource. - ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` - - // Cookie based affinity. - CookieBasedAffinity *ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` - - // Host header to be sent to the backend servers. - HostName *string `json:"hostName,omitempty"` - - // Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. - Path *string `json:"path,omitempty"` - - // Whether to pick host header should be picked from the host name of the backend server. Default value is false. - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - - // The destination port on the backend. - Port *int32 `json:"port,omitempty"` - - // Probe resource of an application gateway. - Probe *SubResource `json:"probe,omitempty"` - - // Whether the probe is enabled. Default value is false. - ProbeEnabled *bool `json:"probeEnabled,omitempty"` - - // The protocol used to communicate with the backend. - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - - // Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. - // Acceptable values are from 1 second to 86400 seconds. - RequestTimeout *int32 `json:"requestTimeout,omitempty"` - - // Array of references to application gateway trusted root certificates. - TrustedRootCertificates []*SubResource `json:"trustedRootCertificates,omitempty"` - - // READ-ONLY; The provisioning state of the backend HTTP settings resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayBackendHealth - Response for ApplicationGatewayBackendHealth API service call. -type ApplicationGatewayBackendHealth struct { - // A list of ApplicationGatewayBackendHealthPool resources. - BackendAddressPools []*ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` -} - -// ApplicationGatewayBackendHealthHTTPSettings - Application gateway BackendHealthHttp settings. -type ApplicationGatewayBackendHealthHTTPSettings struct { - // Reference to an ApplicationGatewayBackendHttpSettings resource. - BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"` - - // List of ApplicationGatewayBackendHealthServer resources. - Servers []*ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` -} - -// ApplicationGatewayBackendHealthOnDemand - Result of on demand test probe. -type ApplicationGatewayBackendHealthOnDemand struct { - // Reference to an ApplicationGatewayBackendAddressPool resource. - BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` - - // Application gateway BackendHealthHttp settings. - BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"` -} - -// ApplicationGatewayBackendHealthPool - Application gateway BackendHealth pool. -type ApplicationGatewayBackendHealthPool struct { - // Reference to an ApplicationGatewayBackendAddressPool resource. - BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` - - // List of ApplicationGatewayBackendHealthHttpSettings resources. - BackendHTTPSettingsCollection []*ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` -} - -// ApplicationGatewayBackendHealthServer - Application gateway backendhealth http settings. -type ApplicationGatewayBackendHealthServer struct { - // IP address or FQDN of backend server. - Address *string `json:"address,omitempty"` - - // Health of backend server. - Health *ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"` - - // Health Probe Log. - HealthProbeLog *string `json:"healthProbeLog,omitempty"` - - // Reference to IP configuration of backend server. - IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"` -} - -// ApplicationGatewayBackendSettings - Backend address pool settings of an application gateway. -type ApplicationGatewayBackendSettings struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the backend settings that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway backend settings. - Properties *ApplicationGatewayBackendSettingsPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayBackendSettingsPropertiesFormat - Properties of Backend address pool settings of an application gateway. -type ApplicationGatewayBackendSettingsPropertiesFormat struct { - // Server name indication to be sent to the backend servers for Tls protocol. - HostName *string `json:"hostName,omitempty"` - - // Whether to pick server name indication from the host name of the backend server for Tls protocol. Default value is false. - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - - // The destination port on the backend. - Port *int32 `json:"port,omitempty"` - - // Probe resource of an application gateway. - Probe *SubResource `json:"probe,omitempty"` - - // The protocol used to communicate with the backend. - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - - // Connection timeout in seconds. Application Gateway will fail the request if response is not received within ConnectionTimeout. - // Acceptable values are from 1 second to 86400 seconds. - Timeout *int32 `json:"timeout,omitempty"` - - // Array of references to application gateway trusted root certificates. - TrustedRootCertificates []*SubResource `json:"trustedRootCertificates,omitempty"` - - // READ-ONLY; The provisioning state of the backend HTTP settings resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayClientAuthConfiguration - Application gateway client authentication configuration. -type ApplicationGatewayClientAuthConfiguration struct { - // Verify client certificate issuer name on the application gateway. - VerifyClientCertIssuerDN *bool `json:"verifyClientCertIssuerDN,omitempty"` -} - -// ApplicationGatewayConnectionDraining - Connection draining allows open connections to a backend server to be active for -// a specified time after the backend server got removed from the configuration. -type ApplicationGatewayConnectionDraining struct { - // REQUIRED; The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. - DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"` - - // REQUIRED; Whether connection draining is enabled or not. - Enabled *bool `json:"enabled,omitempty"` -} - -// ApplicationGatewayCustomError - Customer error of an application gateway. -type ApplicationGatewayCustomError struct { - // Error page URL of the application gateway customer error. - CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"` - - // Status code of the application gateway customer error. - StatusCode *ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"` -} - -// ApplicationGatewayFirewallDisabledRuleGroup - Allows to disable rules within a rule group or an entire rule group. -type ApplicationGatewayFirewallDisabledRuleGroup struct { - // REQUIRED; The name of the rule group that will be disabled. - RuleGroupName *string `json:"ruleGroupName,omitempty"` - - // The list of rules that will be disabled. If null, all rules of the rule group will be disabled. - Rules []*int32 `json:"rules,omitempty"` -} - -// ApplicationGatewayFirewallExclusion - Allow to exclude some variable satisfy the condition for the WAF check. -type ApplicationGatewayFirewallExclusion struct { - // REQUIRED; The variable to be excluded. - MatchVariable *string `json:"matchVariable,omitempty"` - - // REQUIRED; When matchVariable is a collection, operator used to specify which elements in the collection this exclusion - // applies to. - Selector *string `json:"selector,omitempty"` - - // REQUIRED; When matchVariable is a collection, operate on the selector to specify which elements in the collection this - // exclusion applies to. - SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"` -} - -// ApplicationGatewayFirewallRule - A web application firewall rule. -type ApplicationGatewayFirewallRule struct { - // REQUIRED; The identifier of the web application firewall rule. - RuleID *int32 `json:"ruleId,omitempty"` - - // The description of the web application firewall rule. - Description *string `json:"description,omitempty"` -} - -// ApplicationGatewayFirewallRuleGroup - A web application firewall rule group. -type ApplicationGatewayFirewallRuleGroup struct { - // REQUIRED; The name of the web application firewall rule group. - RuleGroupName *string `json:"ruleGroupName,omitempty"` - - // REQUIRED; The rules of the web application firewall rule group. - Rules []*ApplicationGatewayFirewallRule `json:"rules,omitempty"` - - // The description of the web application firewall rule group. - Description *string `json:"description,omitempty"` -} - -// ApplicationGatewayFirewallRuleSet - A web application firewall rule set. -type ApplicationGatewayFirewallRuleSet struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the application gateway firewall rule set. - Properties *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the web application firewall rule set. -type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { - // REQUIRED; The rule groups of the web application firewall rule set. - RuleGroups []*ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"` - - // REQUIRED; The type of the web application firewall rule set. - RuleSetType *string `json:"ruleSetType,omitempty"` - - // REQUIRED; The version of the web application firewall rule set type. - RuleSetVersion *string `json:"ruleSetVersion,omitempty"` - - // READ-ONLY; The provisioning state of the web application firewall rule set. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayFrontendIPConfiguration - Frontend IP configuration of an application gateway. -type ApplicationGatewayFrontendIPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the frontend IP configuration that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway frontend IP configuration. - Properties *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of Frontend IP configuration of an application gateway. -type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { - // PrivateIPAddress of the network interface IP Configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - - // The private IP address allocation method. - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - - // Reference to the application gateway private link configuration. - PrivateLinkConfiguration *SubResource `json:"privateLinkConfiguration,omitempty"` - - // Reference to the PublicIP resource. - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - - // Reference to the subnet resource. - Subnet *SubResource `json:"subnet,omitempty"` - - // READ-ONLY; The provisioning state of the frontend IP configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayFrontendPort - Frontend port of an application gateway. -type ApplicationGatewayFrontendPort struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the frontend port that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway frontend port. - Properties *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayFrontendPortPropertiesFormat - Properties of Frontend port of an application gateway. -type ApplicationGatewayFrontendPortPropertiesFormat struct { - // Frontend port. - Port *int32 `json:"port,omitempty"` - - // READ-ONLY; The provisioning state of the frontend port resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayGlobalConfiguration - Application Gateway global configuration. -type ApplicationGatewayGlobalConfiguration struct { - // Enable request buffering. - EnableRequestBuffering *bool `json:"enableRequestBuffering,omitempty"` - - // Enable response buffering. - EnableResponseBuffering *bool `json:"enableResponseBuffering,omitempty"` -} - -// ApplicationGatewayHTTPListener - Http listener of an application gateway. -type ApplicationGatewayHTTPListener struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the HTTP listener that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway HTTP listener. - Properties *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayHTTPListenerPropertiesFormat - Properties of HTTP listener of an application gateway. -type ApplicationGatewayHTTPListenerPropertiesFormat struct { - // Custom error configurations of the HTTP listener. - CustomErrorConfigurations []*ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - - // Reference to the FirewallPolicy resource. - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - - // Frontend IP configuration resource of an application gateway. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - - // Frontend port resource of an application gateway. - FrontendPort *SubResource `json:"frontendPort,omitempty"` - - // Host name of HTTP listener. - HostName *string `json:"hostName,omitempty"` - - // List of Host names for HTTP Listener that allows special wildcard characters as well. - HostNames []*string `json:"hostNames,omitempty"` - - // Protocol of the HTTP listener. - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - - // Applicable only if protocol is https. Enables SNI for multi-hosting. - RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` - - // SSL certificate resource of an application gateway. - SSLCertificate *SubResource `json:"sslCertificate,omitempty"` - - // SSL profile resource of the application gateway. - SSLProfile *SubResource `json:"sslProfile,omitempty"` - - // READ-ONLY; The provisioning state of the HTTP listener resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayHeaderConfiguration - Header configuration of the Actions set in Application Gateway. -type ApplicationGatewayHeaderConfiguration struct { - // Header name of the header configuration. - HeaderName *string `json:"headerName,omitempty"` - - // Header value of the header configuration. - HeaderValue *string `json:"headerValue,omitempty"` -} - -// ApplicationGatewayIPConfiguration - IP configuration of an application gateway. Currently 1 public and 1 private IP configuration -// is allowed. -type ApplicationGatewayIPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the IP configuration that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway IP configuration. - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayIPConfigurationPropertiesFormat - Properties of IP configuration of an application gateway. -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - // Reference to the subnet resource. A subnet from where application gateway gets its private address. - Subnet *SubResource `json:"subnet,omitempty"` - - // READ-ONLY; The provisioning state of the application gateway IP configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayListResult - Response for ListApplicationGateways API service call. -type ApplicationGatewayListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of an application gateways in a resource group. - Value []*ApplicationGateway `json:"value,omitempty"` -} - -// ApplicationGatewayListener - Listener of an application gateway. -type ApplicationGatewayListener struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the listener that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway listener. - Properties *ApplicationGatewayListenerPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayListenerPropertiesFormat - Properties of listener of an application gateway. -type ApplicationGatewayListenerPropertiesFormat struct { - // Frontend IP configuration resource of an application gateway. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - - // Frontend port resource of an application gateway. - FrontendPort *SubResource `json:"frontendPort,omitempty"` - - // Protocol of the listener. - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - - // SSL certificate resource of an application gateway. - SSLCertificate *SubResource `json:"sslCertificate,omitempty"` - - // SSL profile resource of the application gateway. - SSLProfile *SubResource `json:"sslProfile,omitempty"` - - // READ-ONLY; The provisioning state of the listener resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayLoadDistributionPolicy - Load Distribution Policy of an application gateway. -type ApplicationGatewayLoadDistributionPolicy struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the load distribution policy that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway load distribution policy. - Properties *ApplicationGatewayLoadDistributionPolicyPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayLoadDistributionPolicyPropertiesFormat - Properties of Load Distribution Policy of an application gateway. -type ApplicationGatewayLoadDistributionPolicyPropertiesFormat struct { - // Load Distribution Targets resource of an application gateway. - LoadDistributionAlgorithm *ApplicationGatewayLoadDistributionAlgorithm `json:"loadDistributionAlgorithm,omitempty"` - - // Load Distribution Targets resource of an application gateway. - LoadDistributionTargets []*ApplicationGatewayLoadDistributionTarget `json:"loadDistributionTargets,omitempty"` - - // READ-ONLY; The provisioning state of the Load Distribution Policy resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayLoadDistributionTarget - Load Distribution Target of an application gateway. -type ApplicationGatewayLoadDistributionTarget struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the load distribution policy that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway load distribution target. - Properties *ApplicationGatewayLoadDistributionTargetPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -type ApplicationGatewayLoadDistributionTargetPropertiesFormat struct { - // Backend address pool resource of the application gateway. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - - // Weight per server. Range between 1 and 100. - WeightPerServer *int32 `json:"weightPerServer,omitempty"` -} - -// ApplicationGatewayOnDemandProbe - Details of on demand test probe request. -type ApplicationGatewayOnDemandProbe struct { - // Reference to backend pool of application gateway to which probe request will be sent. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - - // Reference to backend http setting of application gateway to be used for test probe. - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - - // Host name to send the probe to. - Host *string `json:"host,omitempty"` - - // Criterion for classifying a healthy probe response. - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - - // Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. - Path *string `json:"path,omitempty"` - - // Whether the host header should be picked from the backend http settings. Default value is false. - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - - // The protocol used for the probe. - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - - // The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable - // values are from 1 second to 86400 seconds. - Timeout *int32 `json:"timeout,omitempty"` -} - -// ApplicationGatewayPathRule - Path rule of URL path map of an application gateway. -type ApplicationGatewayPathRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the path rule that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway path rule. - Properties *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayPathRulePropertiesFormat - Properties of path rule of an application gateway. -type ApplicationGatewayPathRulePropertiesFormat struct { - // Backend address pool resource of URL path map path rule. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - - // Backend http settings resource of URL path map path rule. - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - - // Reference to the FirewallPolicy resource. - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - - // Load Distribution Policy resource of URL path map path rule. - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - - // Path rules of URL path map. - Paths []*string `json:"paths,omitempty"` - - // Redirect configuration resource of URL path map path rule. - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - - // Rewrite rule set resource of URL path map path rule. - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` - - // READ-ONLY; The provisioning state of the path rule resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayPrivateEndpointConnection - Private Endpoint connection on an application gateway. -type ApplicationGatewayPrivateEndpointConnection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the private endpoint connection on an application gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway private endpoint connection. - Properties *ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayPrivateEndpointConnectionListResult - Response for ListApplicationGatewayPrivateEndpointConnection API -// service call. Gets all private endpoint connections for an application gateway. -type ApplicationGatewayPrivateEndpointConnectionListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of private endpoint connections on an application gateway. - Value []*ApplicationGatewayPrivateEndpointConnection `json:"value,omitempty"` -} - -// ApplicationGatewayPrivateEndpointConnectionProperties - Properties of Private Link Resource of an application gateway. -type ApplicationGatewayPrivateEndpointConnectionProperties struct { - // A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - - // READ-ONLY; The consumer link id. - LinkIdentifier *string `json:"linkIdentifier,omitempty" azure:"ro"` - - // READ-ONLY; The resource of private end point. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the application gateway private endpoint connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete -// method. -type ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate -// method. -type ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewayPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.Get -// method. -type ApplicationGatewayPrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.List -// method. -type ApplicationGatewayPrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewayPrivateLinkConfiguration - Private Link Configuration on an application gateway. -type ApplicationGatewayPrivateLinkConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the private link configuration that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway private link configuration. - Properties *ApplicationGatewayPrivateLinkConfigurationProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayPrivateLinkConfigurationProperties - Properties of private link configuration on an application gateway. -type ApplicationGatewayPrivateLinkConfigurationProperties struct { - // An array of application gateway private link ip configurations. - IPConfigurations []*ApplicationGatewayPrivateLinkIPConfiguration `json:"ipConfigurations,omitempty"` - - // READ-ONLY; The provisioning state of the application gateway private link configuration. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayPrivateLinkIPConfiguration - The application gateway private link ip configuration. -type ApplicationGatewayPrivateLinkIPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of application gateway private link ip configuration. - Name *string `json:"name,omitempty"` - - // Properties of an application gateway private link ip configuration. - Properties *ApplicationGatewayPrivateLinkIPConfigurationProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayPrivateLinkIPConfigurationProperties - Properties of an application gateway private link IP configuration. -type ApplicationGatewayPrivateLinkIPConfigurationProperties struct { - // Whether the ip configuration is primary or not. - Primary *bool `json:"primary,omitempty"` - - // The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - - // The private IP address allocation method. - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - - // Reference to the subnet resource. - Subnet *SubResource `json:"subnet,omitempty"` - - // READ-ONLY; The provisioning state of the application gateway private link IP configuration. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayPrivateLinkResource - PrivateLink Resource of an application gateway. -type ApplicationGatewayPrivateLinkResource struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the private link resource that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway private link resource. - Properties *ApplicationGatewayPrivateLinkResourceProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayPrivateLinkResourceListResult - Response for ListApplicationGatewayPrivateLinkResources API service call. -// Gets all private link resources for an application gateway. -type ApplicationGatewayPrivateLinkResourceListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of private link resources of an application gateway. - Value []*ApplicationGatewayPrivateLinkResource `json:"value,omitempty"` -} - -// ApplicationGatewayPrivateLinkResourceProperties - Properties of a private link resource. -type ApplicationGatewayPrivateLinkResourceProperties struct { - // Required DNS zone names of the the private link resource. - RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` - - // READ-ONLY; Group identifier of private link resource. - GroupID *string `json:"groupId,omitempty" azure:"ro"` - - // READ-ONLY; Required member names of private link resource. - RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` -} - -// ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.List -// method. -type ApplicationGatewayPrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewayProbe - Probe of the application gateway. -type ApplicationGatewayProbe struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the probe that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway probe. - Properties *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayProbeHealthResponseMatch - Application gateway probe health response match. -type ApplicationGatewayProbeHealthResponseMatch struct { - // Body that must be contained in the health response. Default value is empty. - Body *string `json:"body,omitempty"` - - // Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. - StatusCodes []*string `json:"statusCodes,omitempty"` -} - -// ApplicationGatewayProbePropertiesFormat - Properties of probe of an application gateway. -type ApplicationGatewayProbePropertiesFormat struct { - // Host name to send the probe to. - Host *string `json:"host,omitempty"` - - // The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 - // second to 86400 seconds. - Interval *int32 `json:"interval,omitempty"` - - // Criterion for classifying a healthy probe response. - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - - // Minimum number of servers that are always marked healthy. Default value is 0. - MinServers *int32 `json:"minServers,omitempty"` - - // Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. - Path *string `json:"path,omitempty"` - - // Whether the host header should be picked from the backend http settings. Default value is false. - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - - // Whether the server name indication should be picked from the backend settings for Tls protocol. Default value is false. - PickHostNameFromBackendSettings *bool `json:"pickHostNameFromBackendSettings,omitempty"` - - // Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, - // port from http settings will be used. This property is valid for Standardv2 and - // WAFv2 only. - Port *int32 `json:"port,omitempty"` - - // The protocol used for the probe. - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - - // The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable - // values are from 1 second to 86400 seconds. - Timeout *int32 `json:"timeout,omitempty"` - - // The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. - // Acceptable values are from 1 second to 20. - UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` - - // READ-ONLY; The provisioning state of the probe resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayPropertiesFormat - Properties of the application gateway. -type ApplicationGatewayPropertiesFormat struct { - // Authentication certificates of the application gateway resource. For default limits, see Application Gateway limits - // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - AuthenticationCertificates []*ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` - - // Autoscale Configuration. - AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"` - - // Backend address pool of the application gateway resource. For default limits, see Application Gateway limits - // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - BackendAddressPools []*ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` - - // Backend http settings of the application gateway resource. For default limits, see Application Gateway limits - // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - BackendHTTPSettingsCollection []*ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` - - // Backend settings of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits] - // . - BackendSettingsCollection []*ApplicationGatewayBackendSettings `json:"backendSettingsCollection,omitempty"` - - // Custom error configurations of the application gateway resource. - CustomErrorConfigurations []*ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - - // Whether FIPS is enabled on the application gateway resource. - EnableFips *bool `json:"enableFips,omitempty"` - - // Whether HTTP2 is enabled on the application gateway resource. - EnableHTTP2 *bool `json:"enableHttp2,omitempty"` - - // Reference to the FirewallPolicy resource. - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - - // If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config. - ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"` - - // Frontend IP addresses of the application gateway resource. For default limits, see Application Gateway limits - // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - FrontendIPConfigurations []*ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - - // Frontend ports of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - FrontendPorts []*ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` - - // Subnets of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - GatewayIPConfigurations []*ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` - - // Global Configuration. - GlobalConfiguration *ApplicationGatewayGlobalConfiguration `json:"globalConfiguration,omitempty"` - - // Http listeners of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - HTTPListeners []*ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` - - // Listeners of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - Listeners []*ApplicationGatewayListener `json:"listeners,omitempty"` - - // Load distribution policies of the application gateway resource. - LoadDistributionPolicies []*ApplicationGatewayLoadDistributionPolicy `json:"loadDistributionPolicies,omitempty"` - - // PrivateLink configurations on application gateway. - PrivateLinkConfigurations []*ApplicationGatewayPrivateLinkConfiguration `json:"privateLinkConfigurations,omitempty"` - - // Probes of the application gateway resource. - Probes []*ApplicationGatewayProbe `json:"probes,omitempty"` - - // Redirect configurations of the application gateway resource. For default limits, see Application Gateway limits - // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - RedirectConfigurations []*ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` - - // Request routing rules of the application gateway resource. - RequestRoutingRules []*ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` - - // Rewrite rules for the application gateway resource. - RewriteRuleSets []*ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"` - - // Routing rules of the application gateway resource. - RoutingRules []*ApplicationGatewayRoutingRule `json:"routingRules,omitempty"` - - // SKU of the application gateway resource. - SKU *ApplicationGatewaySKU `json:"sku,omitempty"` - - // SSL certificates of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits] - // . - SSLCertificates []*ApplicationGatewaySSLCertificate `json:"sslCertificates,omitempty"` - - // SSL policy of the application gateway resource. - SSLPolicy *ApplicationGatewaySSLPolicy `json:"sslPolicy,omitempty"` - - // SSL profiles of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - SSLProfiles []*ApplicationGatewaySSLProfile `json:"sslProfiles,omitempty"` - - // Trusted client certificates of the application gateway resource. For default limits, see Application Gateway limits - // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - TrustedClientCertificates []*ApplicationGatewayTrustedClientCertificate `json:"trustedClientCertificates,omitempty"` - - // Trusted Root certificates of the application gateway resource. For default limits, see Application Gateway limits - // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - TrustedRootCertificates []*ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"` - - // URL path map of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. - URLPathMaps []*ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"` - - // Web application firewall configuration. - WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` - - // READ-ONLY; Operational state of the application gateway resource. - OperationalState *ApplicationGatewayOperationalState `json:"operationalState,omitempty" azure:"ro"` - - // READ-ONLY; Private Endpoint connections on application gateway. - PrivateEndpointConnections []*ApplicationGatewayPrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the application gateway resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the application gateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// ApplicationGatewayRedirectConfiguration - Redirect configuration of an application gateway. -type ApplicationGatewayRedirectConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the redirect configuration that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway redirect configuration. - Properties *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of redirect configuration of the application gateway. -type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { - // Include path in the redirected url. - IncludePath *bool `json:"includePath,omitempty"` - - // Include query string in the redirected url. - IncludeQueryString *bool `json:"includeQueryString,omitempty"` - - // Path rules specifying redirect configuration. - PathRules []*SubResource `json:"pathRules,omitempty"` - - // HTTP redirection type. - RedirectType *ApplicationGatewayRedirectType `json:"redirectType,omitempty"` - - // Request routing specifying redirect configuration. - RequestRoutingRules []*SubResource `json:"requestRoutingRules,omitempty"` - - // Reference to a listener to redirect the request to. - TargetListener *SubResource `json:"targetListener,omitempty"` - - // Url to redirect the request to. - TargetURL *string `json:"targetUrl,omitempty"` - - // Url path maps specifying default redirect configuration. - URLPathMaps []*SubResource `json:"urlPathMaps,omitempty"` -} - -// ApplicationGatewayRequestRoutingRule - Request routing rule of an application gateway. -type ApplicationGatewayRequestRoutingRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the request routing rule that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway request routing rule. - Properties *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of request routing rule of the application gateway. -type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { - // Backend address pool resource of the application gateway. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - - // Backend http settings resource of the application gateway. - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - - // Http listener resource of the application gateway. - HTTPListener *SubResource `json:"httpListener,omitempty"` - - // Load Distribution Policy resource of the application gateway. - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - - // Priority of the request routing rule. - Priority *int32 `json:"priority,omitempty"` - - // Redirect configuration resource of the application gateway. - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - - // Rewrite Rule Set resource in Basic rule of the application gateway. - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` - - // Rule type. - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` - - // URL path map resource of the application gateway. - URLPathMap *SubResource `json:"urlPathMap,omitempty"` - - // READ-ONLY; The provisioning state of the request routing rule resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayRewriteRule - Rewrite rule of an application gateway. -type ApplicationGatewayRewriteRule struct { - // Set of actions to be done as part of the rewrite Rule. - ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"` - - // Conditions based on which the action set execution will be evaluated. - Conditions []*ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"` - - // Name of the rewrite rule that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet. - RuleSequence *int32 `json:"ruleSequence,omitempty"` -} - -// ApplicationGatewayRewriteRuleActionSet - Set of actions in the Rewrite Rule in Application Gateway. -type ApplicationGatewayRewriteRuleActionSet struct { - // Request Header Actions in the Action Set. - RequestHeaderConfigurations []*ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"` - - // Response Header Actions in the Action Set. - ResponseHeaderConfigurations []*ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"` - - // Url Configuration Action in the Action Set. - URLConfiguration *ApplicationGatewayURLConfiguration `json:"urlConfiguration,omitempty"` -} - -// ApplicationGatewayRewriteRuleCondition - Set of conditions in the Rewrite Rule in Application Gateway. -type ApplicationGatewayRewriteRuleCondition struct { - // Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison. - IgnoreCase *bool `json:"ignoreCase,omitempty"` - - // Setting this value as truth will force to check the negation of the condition given by the user. - Negate *bool `json:"negate,omitempty"` - - // The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition. - Pattern *string `json:"pattern,omitempty"` - - // The condition parameter of the RewriteRuleCondition. - Variable *string `json:"variable,omitempty"` -} - -// ApplicationGatewayRewriteRuleSet - Rewrite rule set of an application gateway. -type ApplicationGatewayRewriteRuleSet struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the rewrite rule set that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway rewrite rule set. - Properties *ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of rewrite rule set of the application gateway. -type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { - // Rewrite rules in the rewrite rule set. - RewriteRules []*ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"` - - // READ-ONLY; The provisioning state of the rewrite rule set resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayRoutingRule - Routing rule of an application gateway. -type ApplicationGatewayRoutingRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the routing rule that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway routing rule. - Properties *ApplicationGatewayRoutingRulePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayRoutingRulePropertiesFormat - Properties of routing rule of the application gateway. -type ApplicationGatewayRoutingRulePropertiesFormat struct { - // REQUIRED; Priority of the routing rule. - Priority *int32 `json:"priority,omitempty"` - - // Backend address pool resource of the application gateway. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - - // Backend settings resource of the application gateway. - BackendSettings *SubResource `json:"backendSettings,omitempty"` - - // Listener resource of the application gateway. - Listener *SubResource `json:"listener,omitempty"` - - // Rule type. - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` - - // READ-ONLY; The provisioning state of the request routing rule resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewaySKU - SKU of an application gateway. -type ApplicationGatewaySKU struct { - // Capacity (instance count) of an application gateway. - Capacity *int32 `json:"capacity,omitempty"` - - // Name of an application gateway SKU. - Name *ApplicationGatewaySKUName `json:"name,omitempty"` - - // Tier of an application gateway. - Tier *ApplicationGatewayTier `json:"tier,omitempty"` -} - -// ApplicationGatewaySSLCertificate - SSL certificates of an application gateway. -type ApplicationGatewaySSLCertificate struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the SSL certificate that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway SSL certificate. - Properties *ApplicationGatewaySSLCertificatePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewaySSLCertificatePropertiesFormat - Properties of SSL certificates of an application gateway. -type ApplicationGatewaySSLCertificatePropertiesFormat struct { - // Base-64 encoded pfx certificate. Only applicable in PUT Request. - Data *string `json:"data,omitempty"` - - // Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. - KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` - - // Password for the pfx file specified in data. Only applicable in PUT request. - Password *string `json:"password,omitempty"` - - // READ-ONLY; The provisioning state of the SSL certificate resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. - PublicCertData *string `json:"publicCertData,omitempty" azure:"ro"` -} - -// ApplicationGatewaySSLPolicy - Application Gateway Ssl policy. -type ApplicationGatewaySSLPolicy struct { - // Ssl cipher suites to be enabled in the specified order to application gateway. - CipherSuites []*ApplicationGatewaySSLCipherSuite `json:"cipherSuites,omitempty"` - - // Ssl protocols to be disabled on application gateway. - DisabledSSLProtocols []*ApplicationGatewaySSLProtocol `json:"disabledSslProtocols,omitempty"` - - // Minimum version of Ssl protocol to be supported on application gateway. - MinProtocolVersion *ApplicationGatewaySSLProtocol `json:"minProtocolVersion,omitempty"` - - // Name of Ssl predefined policy. - PolicyName *ApplicationGatewaySSLPolicyName `json:"policyName,omitempty"` - - // Type of Ssl Policy. - PolicyType *ApplicationGatewaySSLPolicyType `json:"policyType,omitempty"` -} - -// ApplicationGatewaySSLPredefinedPolicy - An Ssl predefined policy. -type ApplicationGatewaySSLPredefinedPolicy struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the Ssl predefined policy. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway SSL predefined policy. - Properties *ApplicationGatewaySSLPredefinedPolicyPropertiesFormat `json:"properties,omitempty"` -} - -// ApplicationGatewaySSLPredefinedPolicyPropertiesFormat - Properties of ApplicationGatewaySslPredefinedPolicy. -type ApplicationGatewaySSLPredefinedPolicyPropertiesFormat struct { - // Ssl cipher suites to be enabled in the specified order for application gateway. - CipherSuites []*ApplicationGatewaySSLCipherSuite `json:"cipherSuites,omitempty"` - - // Minimum version of Ssl protocol to be supported on application gateway. - MinProtocolVersion *ApplicationGatewaySSLProtocol `json:"minProtocolVersion,omitempty"` -} - -// ApplicationGatewaySSLProfile - SSL profile of an application gateway. -type ApplicationGatewaySSLProfile struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the SSL profile that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway SSL profile. - Properties *ApplicationGatewaySSLProfilePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewaySSLProfilePropertiesFormat - Properties of SSL profile of an application gateway. -type ApplicationGatewaySSLProfilePropertiesFormat struct { - // Client authentication configuration of the application gateway resource. - ClientAuthConfiguration *ApplicationGatewayClientAuthConfiguration `json:"clientAuthConfiguration,omitempty"` - - // SSL policy of the application gateway resource. - SSLPolicy *ApplicationGatewaySSLPolicy `json:"sslPolicy,omitempty"` - - // Array of references to application gateway trusted client certificates. - TrustedClientCertificates []*SubResource `json:"trustedClientCertificates,omitempty"` - - // READ-ONLY; The provisioning state of the HTTP listener resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayTrustedClientCertificate - Trusted client certificates of an application gateway. -type ApplicationGatewayTrustedClientCertificate struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the trusted client certificate that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway trusted client certificate. - Properties *ApplicationGatewayTrustedClientCertificatePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayTrustedClientCertificatePropertiesFormat - Trusted client certificates properties of an application gateway. -type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct { - // Certificate public data. - Data *string `json:"data,omitempty"` - - // READ-ONLY; Distinguished name of client certificate issuer. - ClientCertIssuerDN *string `json:"clientCertIssuerDN,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the trusted client certificate resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Validated certificate data. - ValidatedCertData *string `json:"validatedCertData,omitempty" azure:"ro"` -} - -// ApplicationGatewayTrustedRootCertificate - Trusted Root certificates of an application gateway. -type ApplicationGatewayTrustedRootCertificate struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the trusted root certificate that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway trusted root certificate. - Properties *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Trusted Root certificates properties of an application gateway. -type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { - // Certificate public data. - Data *string `json:"data,omitempty"` - - // Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. - KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` - - // READ-ONLY; The provisioning state of the trusted root certificate resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayURLConfiguration - Url configuration of the Actions set in Application Gateway. -type ApplicationGatewayURLConfiguration struct { - // Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null. - ModifiedPath *string `json:"modifiedPath,omitempty"` - - // Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null. - ModifiedQueryString *string `json:"modifiedQueryString,omitempty"` - - // If set as true, it will re-evaluate the url path map provided in path based request routing rules using modified path. - // Default value is false. - Reroute *bool `json:"reroute,omitempty"` -} - -// ApplicationGatewayURLPathMap - UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. -type ApplicationGatewayURLPathMap struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the URL path map that is unique within an Application Gateway. - Name *string `json:"name,omitempty"` - - // Properties of the application gateway URL path map. - Properties *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationGatewayURLPathMapPropertiesFormat - Properties of UrlPathMap of the application gateway. -type ApplicationGatewayURLPathMapPropertiesFormat struct { - // Default backend address pool resource of URL path map. - DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` - - // Default backend http settings resource of URL path map. - DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` - - // Default Load Distribution Policy resource of URL path map. - DefaultLoadDistributionPolicy *SubResource `json:"defaultLoadDistributionPolicy,omitempty"` - - // Default redirect configuration resource of URL path map. - DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` - - // Default Rewrite rule set resource of URL path map. - DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"` - - // Path rule of URL path map resource. - PathRules []*ApplicationGatewayPathRule `json:"pathRules,omitempty"` - - // READ-ONLY; The provisioning state of the URL path map resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ApplicationGatewayWebApplicationFirewallConfiguration - Application gateway web application firewall configuration. -type ApplicationGatewayWebApplicationFirewallConfiguration struct { - // REQUIRED; Whether the web application firewall is enabled or not. - Enabled *bool `json:"enabled,omitempty"` - - // REQUIRED; Web application firewall mode. - FirewallMode *ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"` - - // REQUIRED; The type of the web application firewall rule set. Possible values are: 'OWASP'. - RuleSetType *string `json:"ruleSetType,omitempty"` - - // REQUIRED; The version of the rule set type. - RuleSetVersion *string `json:"ruleSetVersion,omitempty"` - - // The disabled rule groups. - DisabledRuleGroups []*ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` - - // The exclusion list. - Exclusions []*ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"` - - // Maximum file upload size in Mb for WAF. - FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"` - - // Maximum request body size for WAF. - MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"` - - // Maximum request body size in Kb for WAF. - MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"` - - // Whether allow WAF to check request Body. - RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` -} - -// ApplicationGatewaysClientBeginBackendHealthOnDemandOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealthOnDemand -// method. -type ApplicationGatewaysClientBeginBackendHealthOnDemandOptions struct { - // Expands BackendAddressPool and BackendHttpSettings referenced in backend health. - Expand *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientBeginBackendHealthOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealth -// method. -type ApplicationGatewaysClientBeginBackendHealthOptions struct { - // Expands BackendAddressPool and BackendHttpSettings referenced in backend health. - Expand *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationGatewaysClient.BeginCreateOrUpdate -// method. -type ApplicationGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewaysClient.BeginDelete -// method. -type ApplicationGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientBeginStartOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStart -// method. -type ApplicationGatewaysClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientBeginStopOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStop -// method. -type ApplicationGatewaysClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientGetOptions contains the optional parameters for the ApplicationGatewaysClient.Get method. -type ApplicationGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientGetSSLPredefinedPolicyOptions contains the optional parameters for the ApplicationGatewaysClient.GetSSLPredefinedPolicy -// method. -type ApplicationGatewaysClientGetSSLPredefinedPolicyOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.ListAll method. -type ApplicationGatewaysClientListAllOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableRequestHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableRequestHeaders -// method. -type ApplicationGatewaysClientListAvailableRequestHeadersOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableResponseHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableResponseHeaders -// method. -type ApplicationGatewaysClientListAvailableResponseHeadersOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableSSLOptionsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLOptions -// method. -type ApplicationGatewaysClientListAvailableSSLOptionsOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies -// method. -type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableServerVariablesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableServerVariables -// method. -type ApplicationGatewaysClientListAvailableServerVariablesOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableWafRuleSetsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableWafRuleSets -// method. -type ApplicationGatewaysClientListAvailableWafRuleSetsOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.List method. -type ApplicationGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientUpdateTagsOptions contains the optional parameters for the ApplicationGatewaysClient.UpdateTags -// method. -type ApplicationGatewaysClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// ApplicationRule - Rule of type application. -type ApplicationRule struct { - // REQUIRED; Rule Type. - RuleType *FirewallPolicyRuleType `json:"ruleType,omitempty"` - - // Description of the rule. - Description *string `json:"description,omitempty"` - - // List of destination IP addresses or Service Tags. - DestinationAddresses []*string `json:"destinationAddresses,omitempty"` - - // List of FQDN Tags for this rule. - FqdnTags []*string `json:"fqdnTags,omitempty"` - - // Name of the rule. - Name *string `json:"name,omitempty"` - - // Array of Application Protocols. - Protocols []*FirewallPolicyRuleApplicationProtocol `json:"protocols,omitempty"` - - // List of source IP addresses for this rule. - SourceAddresses []*string `json:"sourceAddresses,omitempty"` - - // List of source IpGroups for this rule. - SourceIPGroups []*string `json:"sourceIpGroups,omitempty"` - - // List of FQDNs for this rule. - TargetFqdns []*string `json:"targetFqdns,omitempty"` - - // List of Urls for this rule condition. - TargetUrls []*string `json:"targetUrls,omitempty"` - - // Terminate TLS connections for this rule. - TerminateTLS *bool `json:"terminateTLS,omitempty"` - - // List of destination azure web categories. - WebCategories []*string `json:"webCategories,omitempty"` -} - -// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type ApplicationRule. -func (a *ApplicationRule) GetFirewallPolicyRule() *FirewallPolicyRule { - return &FirewallPolicyRule{ - Name: a.Name, - Description: a.Description, - RuleType: a.RuleType, - } -} - -// ApplicationSecurityGroup - An application security group in a resource group. -type ApplicationSecurityGroup struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the application security group. - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ApplicationSecurityGroupListResult - A list of application security groups. -type ApplicationSecurityGroupListResult struct { - // A list of application security groups. - Value []*ApplicationSecurityGroup `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ApplicationSecurityGroupPropertiesFormat - Application security group properties. -type ApplicationSecurityGroupPropertiesFormat struct { - // READ-ONLY; The provisioning state of the application security group resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even - // if the user changes its name or migrate the resource across subscriptions or resource - // groups. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginCreateOrUpdate -// method. -type ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationSecurityGroupsClientBeginDeleteOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginDelete -// method. -type ApplicationSecurityGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationSecurityGroupsClientGetOptions contains the optional parameters for the ApplicationSecurityGroupsClient.Get -// method. -type ApplicationSecurityGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.ListAll -// method. -type ApplicationSecurityGroupsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.List -// method. -type ApplicationSecurityGroupsClientListOptions struct { - // placeholder for future optional parameters -} - -// ApplicationSecurityGroupsClientUpdateTagsOptions contains the optional parameters for the ApplicationSecurityGroupsClient.UpdateTags -// method. -type ApplicationSecurityGroupsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// AuthorizationListResult - Response for ListAuthorizations API service call retrieves all authorizations that belongs to -// an ExpressRouteCircuit. -type AuthorizationListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The authorizations in an ExpressRoute Circuit. - Value []*ExpressRouteCircuitAuthorization `json:"value,omitempty"` -} - -// AuthorizationPropertiesFormat - Properties of ExpressRouteCircuitAuthorization. -type AuthorizationPropertiesFormat struct { - // The authorization key. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - - // The authorization use status. - AuthorizationUseStatus *AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` - - // READ-ONLY; The provisioning state of the authorization resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// AutoApprovedPrivateLinkService - The information of an AutoApprovedPrivateLinkService. -type AutoApprovedPrivateLinkService struct { - // The id of the private link service resource. - PrivateLinkService *string `json:"privateLinkService,omitempty"` -} - -// AutoApprovedPrivateLinkServicesResult - An array of private link service id that can be linked to a private end point with -// auto approved. -type AutoApprovedPrivateLinkServicesResult struct { - // An array of auto approved private link service. - Value []*AutoApprovedPrivateLinkService `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// Availability of the metric. -type Availability struct { - // Duration of the availability blob. - BlobDuration *string `json:"blobDuration,omitempty"` - - // The retention of the availability. - Retention *string `json:"retention,omitempty"` - - // The time grain of the availability. - TimeGrain *string `json:"timeGrain,omitempty"` -} - -// AvailableDelegation - The serviceName of an AvailableDelegation indicates a possible delegation for a subnet. -type AvailableDelegation struct { - // The actions permitted to the service upon delegation. - Actions []*string `json:"actions,omitempty"` - - // A unique identifier of the AvailableDelegation resource. - ID *string `json:"id,omitempty"` - - // The name of the AvailableDelegation resource. - Name *string `json:"name,omitempty"` - - // The name of the service and resource. - ServiceName *string `json:"serviceName,omitempty"` - - // Resource type. - Type *string `json:"type,omitempty"` -} - -// AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.List method. -type AvailableDelegationsClientListOptions struct { - // placeholder for future optional parameters -} - -// AvailableDelegationsResult - An array of available delegations. -type AvailableDelegationsResult struct { - // An array of available delegations. - Value []*AvailableDelegation `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.List -// method. -type AvailableEndpointServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// AvailablePrivateEndpointType - The information of an AvailablePrivateEndpointType. -type AvailablePrivateEndpointType struct { - // Display name of the resource. - DisplayName *string `json:"displayName,omitempty"` - - // A unique identifier of the AvailablePrivateEndpoint Type resource. - ID *string `json:"id,omitempty"` - - // The name of the service and resource. - Name *string `json:"name,omitempty"` - - // The name of the service and resource. - ResourceName *string `json:"resourceName,omitempty"` - - // Resource type. - Type *string `json:"type,omitempty"` -} - -// AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.ListByResourceGroup -// method. -type AvailablePrivateEndpointTypesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.List -// method. -type AvailablePrivateEndpointTypesClientListOptions struct { - // placeholder for future optional parameters -} - -// AvailablePrivateEndpointTypesResult - An array of available PrivateEndpoint types. -type AvailablePrivateEndpointTypesResult struct { - // An array of available privateEndpoint type. - Value []*AvailablePrivateEndpointType `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// AvailableProvidersList - List of available countries with details. -type AvailableProvidersList struct { - // REQUIRED; List of available countries. - Countries []*AvailableProvidersListCountry `json:"countries,omitempty"` -} - -// AvailableProvidersListCity - City or town details. -type AvailableProvidersListCity struct { - // The city or town name. - CityName *string `json:"cityName,omitempty"` - - // A list of Internet service providers. - Providers []*string `json:"providers,omitempty"` -} - -// AvailableProvidersListCountry - Country details. -type AvailableProvidersListCountry struct { - // The country name. - CountryName *string `json:"countryName,omitempty"` - - // A list of Internet service providers. - Providers []*string `json:"providers,omitempty"` - - // List of available states in the country. - States []*AvailableProvidersListState `json:"states,omitempty"` -} - -// AvailableProvidersListParameters - Constraints that determine the list of available Internet service providers. -type AvailableProvidersListParameters struct { - // A list of Azure regions. - AzureLocations []*string `json:"azureLocations,omitempty"` - - // The city or town for available providers list. - City *string `json:"city,omitempty"` - - // The country for available providers list. - Country *string `json:"country,omitempty"` - - // The state for available providers list. - State *string `json:"state,omitempty"` -} - -// AvailableProvidersListState - State details. -type AvailableProvidersListState struct { - // List of available cities or towns in the state. - Cities []*AvailableProvidersListCity `json:"cities,omitempty"` - - // A list of Internet service providers. - Providers []*string `json:"providers,omitempty"` - - // The state name. - StateName *string `json:"stateName,omitempty"` -} - -// AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.List -// method. -type AvailableResourceGroupDelegationsClientListOptions struct { - // placeholder for future optional parameters -} - -// AvailableServiceAlias - The available service alias. -type AvailableServiceAlias struct { - // The ID of the service alias. - ID *string `json:"id,omitempty"` - - // The name of the service alias. - Name *string `json:"name,omitempty"` - - // The resource name of the service alias. - ResourceName *string `json:"resourceName,omitempty"` - - // The type of the resource. - Type *string `json:"type,omitempty"` -} - -// AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.ListByResourceGroup -// method. -type AvailableServiceAliasesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.List method. -type AvailableServiceAliasesClientListOptions struct { - // placeholder for future optional parameters -} - -// AvailableServiceAliasesResult - An array of available service aliases. -type AvailableServiceAliasesResult struct { - // An array of available service aliases. - Value []*AvailableServiceAlias `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// AzureAsyncOperationResult - The response body contains the status of the specified asynchronous operation, indicating whether -// it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP -// status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response -// body includes the HTTP status code for the successful request. If the -// asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information -// regarding the failure. -type AzureAsyncOperationResult struct { - // Details of the error occurred during specified asynchronous operation. - Error *Error `json:"error,omitempty"` - - // Status of the Azure async operation. - Status *NetworkOperationStatus `json:"status,omitempty"` -} - -// AzureFirewall - Azure Firewall resource. -type AzureFirewall struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the azure firewall. - Properties *AzureFirewallPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // A list of availability zones denoting where the resource needs to come from. - Zones []*string `json:"zones,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AzureFirewallApplicationRule - Properties of an application rule. -type AzureFirewallApplicationRule struct { - // Description of the rule. - Description *string `json:"description,omitempty"` - - // List of FQDN Tags for this rule. - FqdnTags []*string `json:"fqdnTags,omitempty"` - - // Name of the application rule. - Name *string `json:"name,omitempty"` - - // Array of ApplicationRuleProtocols. - Protocols []*AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"` - - // List of source IP addresses for this rule. - SourceAddresses []*string `json:"sourceAddresses,omitempty"` - - // List of source IpGroups for this rule. - SourceIPGroups []*string `json:"sourceIpGroups,omitempty"` - - // List of FQDNs for this rule. - TargetFqdns []*string `json:"targetFqdns,omitempty"` -} - -// AzureFirewallApplicationRuleCollection - Application rule collection resource. -type AzureFirewallApplicationRuleCollection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the azure firewall application rule collection. - Properties *AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the application rule collection. -type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { - // The action type of a rule collection. - Action *AzureFirewallRCAction `json:"action,omitempty"` - - // Priority of the application rule collection resource. - Priority *int32 `json:"priority,omitempty"` - - // Collection of rules used by a application rule collection. - Rules []*AzureFirewallApplicationRule `json:"rules,omitempty"` - - // READ-ONLY; The provisioning state of the application rule collection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// AzureFirewallApplicationRuleProtocol - Properties of the application rule protocol. -type AzureFirewallApplicationRuleProtocol struct { - // Port number for the protocol, cannot be greater than 64000. This field is optional. - Port *int32 `json:"port,omitempty"` - - // Protocol type. - ProtocolType *AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"` -} - -// AzureFirewallFqdnTag - Azure Firewall FQDN Tag Resource. -type AzureFirewallFqdnTag struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the azure firewall FQDN tag. - Properties *AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AzureFirewallFqdnTagListResult - Response for ListAzureFirewallFqdnTags API service call. -type AzureFirewallFqdnTagListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Azure Firewall FQDN Tags in a resource group. - Value []*AzureFirewallFqdnTag `json:"value,omitempty"` -} - -// AzureFirewallFqdnTagPropertiesFormat - Azure Firewall FQDN Tag Properties. -type AzureFirewallFqdnTagPropertiesFormat struct { - // READ-ONLY; The name of this FQDN Tag. - FqdnTagName *string `json:"fqdnTagName,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the Azure firewall FQDN tag resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.ListAll -// method. -type AzureFirewallFqdnTagsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// AzureFirewallIPConfiguration - IP configuration of an Azure Firewall. -type AzureFirewallIPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the azure firewall IP configuration. - Properties *AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AzureFirewallIPConfigurationPropertiesFormat - Properties of IP configuration of an Azure Firewall. -type AzureFirewallIPConfigurationPropertiesFormat struct { - // Reference to the PublicIP resource. This field is a mandatory input if subnet is not null. - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - - // Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'. - Subnet *SubResource `json:"subnet,omitempty"` - - // READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. - PrivateIPAddress *string `json:"privateIPAddress,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the Azure firewall IP configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// AzureFirewallIPGroups - IpGroups associated with azure firewall. -type AzureFirewallIPGroups struct { - // READ-ONLY; The iteration number. - ChangeNumber *string `json:"changeNumber,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` -} - -// AzureFirewallListResult - Response for ListAzureFirewalls API service call. -type AzureFirewallListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Azure Firewalls in a resource group. - Value []*AzureFirewall `json:"value,omitempty"` -} - -// AzureFirewallNatRCAction - AzureFirewall NAT Rule Collection Action. -type AzureFirewallNatRCAction struct { - // The type of action. - Type *AzureFirewallNatRCActionType `json:"type,omitempty"` -} - -// AzureFirewallNatRule - Properties of a NAT rule. -type AzureFirewallNatRule struct { - // Description of the rule. - Description *string `json:"description,omitempty"` - - // List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags. - DestinationAddresses []*string `json:"destinationAddresses,omitempty"` - - // List of destination ports. - DestinationPorts []*string `json:"destinationPorts,omitempty"` - - // Name of the NAT rule. - Name *string `json:"name,omitempty"` - - // Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. - Protocols []*AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` - - // List of source IP addresses for this rule. - SourceAddresses []*string `json:"sourceAddresses,omitempty"` - - // List of source IpGroups for this rule. - SourceIPGroups []*string `json:"sourceIpGroups,omitempty"` - - // The translated address for this NAT rule. - TranslatedAddress *string `json:"translatedAddress,omitempty"` - - // The translated FQDN for this NAT rule. - TranslatedFqdn *string `json:"translatedFqdn,omitempty"` - - // The translated port for this NAT rule. - TranslatedPort *string `json:"translatedPort,omitempty"` -} - -// AzureFirewallNatRuleCollection - NAT rule collection resource. -type AzureFirewallNatRuleCollection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the azure firewall NAT rule collection. - Properties *AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// AzureFirewallNatRuleCollectionProperties - Properties of the NAT rule collection. -type AzureFirewallNatRuleCollectionProperties struct { - // The action type of a NAT rule collection. - Action *AzureFirewallNatRCAction `json:"action,omitempty"` - - // Priority of the NAT rule collection resource. - Priority *int32 `json:"priority,omitempty"` - - // Collection of rules used by a NAT rule collection. - Rules []*AzureFirewallNatRule `json:"rules,omitempty"` - - // READ-ONLY; The provisioning state of the NAT rule collection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// AzureFirewallNetworkRule - Properties of the network rule. -type AzureFirewallNetworkRule struct { - // Description of the rule. - Description *string `json:"description,omitempty"` - - // List of destination IP addresses. - DestinationAddresses []*string `json:"destinationAddresses,omitempty"` - - // List of destination FQDNs. - DestinationFqdns []*string `json:"destinationFqdns,omitempty"` - - // List of destination IpGroups for this rule. - DestinationIPGroups []*string `json:"destinationIpGroups,omitempty"` - - // List of destination ports. - DestinationPorts []*string `json:"destinationPorts,omitempty"` - - // Name of the network rule. - Name *string `json:"name,omitempty"` - - // Array of AzureFirewallNetworkRuleProtocols. - Protocols []*AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` - - // List of source IP addresses for this rule. - SourceAddresses []*string `json:"sourceAddresses,omitempty"` - - // List of source IpGroups for this rule. - SourceIPGroups []*string `json:"sourceIpGroups,omitempty"` -} - -// AzureFirewallNetworkRuleCollection - Network rule collection resource. -type AzureFirewallNetworkRuleCollection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the azure firewall network rule collection. - Properties *AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the network rule collection. -type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { - // The action type of a rule collection. - Action *AzureFirewallRCAction `json:"action,omitempty"` - - // Priority of the network rule collection resource. - Priority *int32 `json:"priority,omitempty"` - - // Collection of rules used by a network rule collection. - Rules []*AzureFirewallNetworkRule `json:"rules,omitempty"` - - // READ-ONLY; The provisioning state of the network rule collection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// AzureFirewallPropertiesFormat - Properties of the Azure Firewall. -type AzureFirewallPropertiesFormat struct { - // The additional properties used to further config this azure firewall. - AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"` - - // Collection of application rule collections used by Azure Firewall. - ApplicationRuleCollections []*AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"` - - // The firewallPolicy associated with this azure firewall. - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - - // IP addresses associated with AzureFirewall. - HubIPAddresses *HubIPAddresses `json:"hubIPAddresses,omitempty"` - - // IP configuration of the Azure Firewall resource. - IPConfigurations []*AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"` - - // IP configuration of the Azure Firewall used for management traffic. - ManagementIPConfiguration *AzureFirewallIPConfiguration `json:"managementIpConfiguration,omitempty"` - - // Collection of NAT rule collections used by Azure Firewall. - NatRuleCollections []*AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"` - - // Collection of network rule collections used by Azure Firewall. - NetworkRuleCollections []*AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"` - - // The Azure Firewall Resource SKU. - SKU *AzureFirewallSKU `json:"sku,omitempty"` - - // The operation mode for Threat Intelligence. - ThreatIntelMode *AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` - - // The virtualHub to which the firewall belongs. - VirtualHub *SubResource `json:"virtualHub,omitempty"` - - // READ-ONLY; IpGroups associated with AzureFirewall. - IPGroups []*AzureFirewallIPGroups `json:"ipGroups,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the Azure firewall resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// AzureFirewallPublicIPAddress - Public IP Address associated with azure firewall. -type AzureFirewallPublicIPAddress struct { - // Public IP Address value. - Address *string `json:"address,omitempty"` -} - -// AzureFirewallRCAction - Properties of the AzureFirewallRCAction. -type AzureFirewallRCAction struct { - // The type of action. - Type *AzureFirewallRCActionType `json:"type,omitempty"` -} - -// AzureFirewallSKU - SKU of an Azure Firewall. -type AzureFirewallSKU struct { - // Name of an Azure Firewall SKU. - Name *AzureFirewallSKUName `json:"name,omitempty"` - - // Tier of an Azure Firewall. - Tier *AzureFirewallSKUTier `json:"tier,omitempty"` -} - -// AzureFirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureFirewallsClient.BeginCreateOrUpdate -// method. -type AzureFirewallsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AzureFirewallsClientBeginDeleteOptions contains the optional parameters for the AzureFirewallsClient.BeginDelete method. -type AzureFirewallsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AzureFirewallsClientBeginListLearnedPrefixesOptions contains the optional parameters for the AzureFirewallsClient.BeginListLearnedPrefixes -// method. -type AzureFirewallsClientBeginListLearnedPrefixesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AzureFirewallsClientBeginUpdateTagsOptions contains the optional parameters for the AzureFirewallsClient.BeginUpdateTags -// method. -type AzureFirewallsClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AzureFirewallsClientGetOptions contains the optional parameters for the AzureFirewallsClient.Get method. -type AzureFirewallsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.ListAll method. -type AzureFirewallsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.List method. -type AzureFirewallsClientListOptions struct { - // placeholder for future optional parameters -} - -// AzureReachabilityReport - Azure reachability report details. -type AzureReachabilityReport struct { - // REQUIRED; The aggregation level of Azure reachability report. Can be Country, State or City. - AggregationLevel *string `json:"aggregationLevel,omitempty"` - - // REQUIRED; Parameters that define a geographic location. - ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` - - // REQUIRED; List of Azure reachability report items. - ReachabilityReport []*AzureReachabilityReportItem `json:"reachabilityReport,omitempty"` -} - -// AzureReachabilityReportItem - Azure reachability report details for a given provider location. -type AzureReachabilityReportItem struct { - // The Azure region. - AzureLocation *string `json:"azureLocation,omitempty"` - - // List of latency details for each of the time series. - Latencies []*AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"` - - // The Internet service provider. - Provider *string `json:"provider,omitempty"` -} - -// AzureReachabilityReportLatencyInfo - Details on latency for a time series. -type AzureReachabilityReportLatencyInfo struct { - // The relative latency score between 1 and 100, higher values indicating a faster connection. - Score *int32 `json:"score,omitempty"` - - // The time stamp. - TimeStamp *time.Time `json:"timeStamp,omitempty"` -} - -// AzureReachabilityReportLocation - Parameters that define a geographic location. -type AzureReachabilityReportLocation struct { - // REQUIRED; The name of the country. - Country *string `json:"country,omitempty"` - - // The name of the city or town. - City *string `json:"city,omitempty"` - - // The name of the state. - State *string `json:"state,omitempty"` -} - -// AzureReachabilityReportParameters - Geographic and time constraints for Azure reachability report. -type AzureReachabilityReportParameters struct { - // REQUIRED; The end time for the Azure reachability report. - EndTime *time.Time `json:"endTime,omitempty"` - - // REQUIRED; Parameters that define a geographic location. - ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` - - // REQUIRED; The start time for the Azure reachability report. - StartTime *time.Time `json:"startTime,omitempty"` - - // Optional Azure regions to scope the query to. - AzureLocations []*string `json:"azureLocations,omitempty"` - - // List of Internet service providers. - Providers []*string `json:"providers,omitempty"` -} - -// AzureWebCategory - Azure Web Category Resource. -type AzureWebCategory struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Properties of the Azure Web Category. - Properties *AzureWebCategoryPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AzureWebCategoryListResult - Response for ListAzureWebCategories API service call. -type AzureWebCategoryListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Azure Web Categories for a given Subscription. - Value []*AzureWebCategory `json:"value,omitempty"` -} - -// AzureWebCategoryPropertiesFormat - Azure Web Category Properties. -type AzureWebCategoryPropertiesFormat struct { - // READ-ONLY; The name of the group that the category belongs to. - Group *string `json:"group,omitempty" azure:"ro"` -} - -// BGPCommunity - Contains bgp community information offered in Service Community resources. -type BGPCommunity struct { - // The name of the bgp community. e.g. Skype. - CommunityName *string `json:"communityName,omitempty"` - - // The prefixes that the bgp community contains. - CommunityPrefixes []*string `json:"communityPrefixes,omitempty"` - - // The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. - CommunityValue *string `json:"communityValue,omitempty"` - - // Customer is authorized to use bgp community or not. - IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` - - // The service group of the bgp community contains. - ServiceGroup *string `json:"serviceGroup,omitempty"` - - // The region which the service support. e.g. For O365, region is Global. - ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` -} - -// BackendAddressInboundNatRulePortMappings - The response for a QueryInboundNatRulePortMapping API. -type BackendAddressInboundNatRulePortMappings struct { - // Collection of inbound NAT rule port mappings. - InboundNatRulePortMappings []*InboundNatRulePortMapping `json:"inboundNatRulePortMappings,omitempty"` -} - -// BackendAddressPool - Pool of backend IP addresses. -type BackendAddressPool struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within the set of backend address pools used by the load balancer. This name can - // be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of load balancer backend address pool. - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackendAddressPoolPropertiesFormat - Properties of the backend address pool. -type BackendAddressPoolPropertiesFormat struct { - // Amount of seconds Load Balancer waits for before sending RESET to client and backend address. - DrainPeriodInSeconds *int32 `json:"drainPeriodInSeconds,omitempty"` - - // An array of backend addresses. - LoadBalancerBackendAddresses []*LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - - // The location of the backend address pool. - Location *string `json:"location,omitempty"` - - // An array of gateway load balancer tunnel interfaces. - TunnelInterfaces []*GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - - // READ-ONLY; An array of references to IP addresses defined in network interfaces. - BackendIPConfigurations []*InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to inbound NAT rules that use this backend address pool. - InboundNatRules []*SubResource `json:"inboundNatRules,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to load balancing rules that use this backend address pool. - LoadBalancingRules []*SubResource `json:"loadBalancingRules,omitempty" azure:"ro"` - - // READ-ONLY; A reference to an outbound rule that uses this backend address pool. - OutboundRule *SubResource `json:"outboundRule,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to outbound rules that use this backend address pool. - OutboundRules []*SubResource `json:"outboundRules,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the backend address pool resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// BaseAdminRuleClassification provides polymorphic access to related types. -// Call the interface's GetBaseAdminRule() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AdminRule, *BaseAdminRule, *DefaultAdminRule -type BaseAdminRuleClassification interface { - // GetBaseAdminRule returns the BaseAdminRule content of the underlying type. - GetBaseAdminRule() *BaseAdminRule -} - -// BaseAdminRule - Network base admin rule. -type BaseAdminRule struct { - // REQUIRED; Whether the rule is custom or default. - Kind *AdminRuleKind `json:"kind,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GetBaseAdminRule implements the BaseAdminRuleClassification interface for type BaseAdminRule. -func (b *BaseAdminRule) GetBaseAdminRule() *BaseAdminRule { return b } - -// BastionActiveSession - The session detail for a target. -type BastionActiveSession struct { - // READ-ONLY; The protocol used to connect to the target. - Protocol *BastionConnectProtocol `json:"protocol,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. - ResourceType *string `json:"resourceType,omitempty" azure:"ro"` - - // READ-ONLY; Duration in mins the session has been active. - SessionDurationInMins *float32 `json:"sessionDurationInMins,omitempty" azure:"ro"` - - // READ-ONLY; A unique id for the session. - SessionID *string `json:"sessionId,omitempty" azure:"ro"` - - // READ-ONLY; The time when the session started. - StartTime interface{} `json:"startTime,omitempty" azure:"ro"` - - // READ-ONLY; The host name of the target. - TargetHostName *string `json:"targetHostName,omitempty" azure:"ro"` - - // READ-ONLY; The IP Address of the target. - TargetIPAddress *string `json:"targetIpAddress,omitempty" azure:"ro"` - - // READ-ONLY; The resource group of the target. - TargetResourceGroup *string `json:"targetResourceGroup,omitempty" azure:"ro"` - - // READ-ONLY; The resource id of the target. - TargetResourceID *string `json:"targetResourceId,omitempty" azure:"ro"` - - // READ-ONLY; The subscription id for the target virtual machine. - TargetSubscriptionID *string `json:"targetSubscriptionId,omitempty" azure:"ro"` - - // READ-ONLY; The user name who is active on this session. - UserName *string `json:"userName,omitempty" azure:"ro"` -} - -// BastionActiveSessionListResult - Response for GetActiveSessions. -type BastionActiveSessionListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of active sessions on the bastion. - Value []*BastionActiveSession `json:"value,omitempty"` -} - -// BastionHost - Bastion Host resource. -type BastionHost struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Represents the bastion host resource. - Properties *BastionHostPropertiesFormat `json:"properties,omitempty"` - - // The sku of this Bastion Host. - SKU *SKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BastionHostIPConfiguration - IP configuration of an Bastion Host. -type BastionHostIPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Represents the ip configuration associated with the resource. - Properties *BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Ip configuration type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BastionHostIPConfigurationPropertiesFormat - Properties of IP configuration of an Bastion Host. -type BastionHostIPConfigurationPropertiesFormat struct { - // REQUIRED; Reference of the PublicIP resource. - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - - // REQUIRED; Reference of the subnet resource. - Subnet *SubResource `json:"subnet,omitempty"` - - // Private IP allocation method. - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - - // READ-ONLY; The provisioning state of the bastion host IP configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// BastionHostListResult - Response for ListBastionHosts API service call. -type BastionHostListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Bastion Hosts in a resource group. - Value []*BastionHost `json:"value,omitempty"` -} - -// BastionHostPropertiesFormat - Properties of the Bastion Host. -type BastionHostPropertiesFormat struct { - // FQDN for the endpoint on which bastion host is accessible. - DNSName *string `json:"dnsName,omitempty"` - - // Enable/Disable Copy/Paste feature of the Bastion Host resource. - DisableCopyPaste *bool `json:"disableCopyPaste,omitempty"` - - // Enable/Disable File Copy feature of the Bastion Host resource. - EnableFileCopy *bool `json:"enableFileCopy,omitempty"` - - // Enable/Disable IP Connect feature of the Bastion Host resource. - EnableIPConnect *bool `json:"enableIpConnect,omitempty"` - - // Enable/Disable Shareable Link of the Bastion Host resource. - EnableShareableLink *bool `json:"enableShareableLink,omitempty"` - - // Enable/Disable Tunneling feature of the Bastion Host resource. - EnableTunneling *bool `json:"enableTunneling,omitempty"` - - // IP configuration of the Bastion Host resource. - IPConfigurations []*BastionHostIPConfiguration `json:"ipConfigurations,omitempty"` - - // The scale units for the Bastion Host resource. - ScaleUnits *int32 `json:"scaleUnits,omitempty"` - - // READ-ONLY; The provisioning state of the bastion host resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// BastionHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the BastionHostsClient.BeginCreateOrUpdate -// method. -type BastionHostsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BastionHostsClientBeginDeleteOptions contains the optional parameters for the BastionHostsClient.BeginDelete method. -type BastionHostsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BastionHostsClientBeginUpdateTagsOptions contains the optional parameters for the BastionHostsClient.BeginUpdateTags method. -type BastionHostsClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BastionHostsClientGetOptions contains the optional parameters for the BastionHostsClient.Get method. -type BastionHostsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.ListByResourceGroup -// method. -type BastionHostsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.List method. -type BastionHostsClientListOptions struct { - // placeholder for future optional parameters -} - -// BastionSessionDeleteResult - Response for DisconnectActiveSessions. -type BastionSessionDeleteResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of sessions with their corresponding state. - Value []*BastionSessionState `json:"value,omitempty"` -} - -// BastionSessionState - The session state detail for a target. -type BastionSessionState struct { - // READ-ONLY; Used for extra information. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; A unique id for the session. - SessionID *string `json:"sessionId,omitempty" azure:"ro"` - - // READ-ONLY; The state of the session. Disconnected/Failed/NotFound. - State *string `json:"state,omitempty" azure:"ro"` -} - -// BastionShareableLink - Bastion Shareable Link. -type BastionShareableLink struct { - // REQUIRED; Reference of the virtual machine resource. - VM *VM `json:"vm,omitempty"` - - // READ-ONLY; The unique Bastion Shareable Link to the virtual machine. - Bsl *string `json:"bsl,omitempty" azure:"ro"` - - // READ-ONLY; The time when the link was created. - CreatedAt *string `json:"createdAt,omitempty" azure:"ro"` - - // READ-ONLY; Optional field indicating the warning or error message related to the vm in case of partial failure. - Message *string `json:"message,omitempty" azure:"ro"` -} - -// BastionShareableLinkListRequest - Post request for all the Bastion Shareable Link endpoints. -type BastionShareableLinkListRequest struct { - // List of VM references. - VMs []*BastionShareableLink `json:"vms,omitempty"` -} - -// BastionShareableLinkListResult - Response for all the Bastion Shareable Link endpoints. -type BastionShareableLinkListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Bastion Shareable Links for the request. - Value []*BastionShareableLink `json:"value,omitempty"` -} - -// BgpConnection - Virtual Appliance Site resource. -type BgpConnection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the connection. - Name *string `json:"name,omitempty"` - - // The properties of the Bgp connections. - Properties *BgpConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Connection type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BgpConnectionProperties - Properties of the bgp connection. -type BgpConnectionProperties struct { - // The reference to the HubVirtualNetworkConnection resource. - HubVirtualNetworkConnection *SubResource `json:"hubVirtualNetworkConnection,omitempty"` - - // Peer ASN. - PeerAsn *int64 `json:"peerAsn,omitempty"` - - // Peer IP. - PeerIP *string `json:"peerIp,omitempty"` - - // READ-ONLY; The current state of the VirtualHub to Peer. - ConnectionState *HubBgpConnectionStatus `json:"connectionState,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// BgpPeerStatus - BGP peer status details. -type BgpPeerStatus struct { - // READ-ONLY; The autonomous system number of the remote BGP peer. - Asn *int64 `json:"asn,omitempty" azure:"ro"` - - // READ-ONLY; For how long the peering has been up. - ConnectedDuration *string `json:"connectedDuration,omitempty" azure:"ro"` - - // READ-ONLY; The virtual network gateway's local address. - LocalAddress *string `json:"localAddress,omitempty" azure:"ro"` - - // READ-ONLY; The number of BGP messages received. - MessagesReceived *int64 `json:"messagesReceived,omitempty" azure:"ro"` - - // READ-ONLY; The number of BGP messages sent. - MessagesSent *int64 `json:"messagesSent,omitempty" azure:"ro"` - - // READ-ONLY; The remote BGP peer. - Neighbor *string `json:"neighbor,omitempty" azure:"ro"` - - // READ-ONLY; The number of routes learned from this peer. - RoutesReceived *int64 `json:"routesReceived,omitempty" azure:"ro"` - - // READ-ONLY; The BGP peer state. - State *BgpPeerState `json:"state,omitempty" azure:"ro"` -} - -// BgpPeerStatusListResult - Response for list BGP peer status API service call. -type BgpPeerStatusListResult struct { - // List of BGP peers. - Value []*BgpPeerStatus `json:"value,omitempty"` -} - -// BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.List method. -type BgpServiceCommunitiesClientListOptions struct { - // placeholder for future optional parameters -} - -// BgpServiceCommunity - Service Community Properties. -type BgpServiceCommunity struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the BGP service community. - Properties *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BgpServiceCommunityListResult - Response for the ListServiceCommunity API service call. -type BgpServiceCommunityListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of service community resources. - Value []*BgpServiceCommunity `json:"value,omitempty"` -} - -// BgpServiceCommunityPropertiesFormat - Properties of Service Community. -type BgpServiceCommunityPropertiesFormat struct { - // A list of bgp communities. - BgpCommunities []*BGPCommunity `json:"bgpCommunities,omitempty"` - - // The name of the bgp community. e.g. Skype. - ServiceName *string `json:"serviceName,omitempty"` -} - -// BgpSettings - BGP settings details. -type BgpSettings struct { - // The BGP speaker's ASN. - Asn *int64 `json:"asn,omitempty"` - - // The BGP peering address and BGP identifier of this BGP speaker. - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - - // BGP peering address with IP configuration ID for virtual network gateway. - BgpPeeringAddresses []*IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - - // The weight added to routes learned from this BGP speaker. - PeerWeight *int32 `json:"peerWeight,omitempty"` -} - -// BreakOutCategoryPolicies - Network Virtual Appliance Sku Properties. -type BreakOutCategoryPolicies struct { - // Flag to control breakout of o365 allow category. - Allow *bool `json:"allow,omitempty"` - - // Flag to control breakout of o365 default category. - Default *bool `json:"default,omitempty"` - - // Flag to control breakout of o365 optimize category. - Optimize *bool `json:"optimize,omitempty"` -} - -// CheckPrivateLinkServiceVisibilityRequest - Request body of the CheckPrivateLinkServiceVisibility API service call. -type CheckPrivateLinkServiceVisibilityRequest struct { - // The alias of the private link service. - PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"` -} - -// ChildResource - Proxy resource representation. -type ChildResource struct { - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CloudError - An error response from the service. -type CloudError struct { - // Cloud error body. - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorBody - An error response from the service. -type CloudErrorBody struct { - // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - - // A list of additional details about the error. - Details []*CloudErrorBody `json:"details,omitempty"` - - // A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` - - // The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` -} - -type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties struct { - // READ-ONLY; The client id of user assigned identity. - ClientID *string `json:"clientId,omitempty" azure:"ro"` - - // READ-ONLY; The principal id of user assigned identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` -} - -// ConfigurationDiagnosticParameters - Parameters to get network configuration diagnostic. -type ConfigurationDiagnosticParameters struct { - // REQUIRED; List of network configuration diagnostic profiles. - Profiles []*ConfigurationDiagnosticProfile `json:"profiles,omitempty"` - - // REQUIRED; The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, - // VMSS/NetworkInterface and Application Gateway. - TargetResourceID *string `json:"targetResourceId,omitempty"` - - // Verbosity level. - VerbosityLevel *VerbosityLevel `json:"verbosityLevel,omitempty"` -} - -// ConfigurationDiagnosticProfile - Parameters to compare with network configuration. -type ConfigurationDiagnosticProfile struct { - // REQUIRED; Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. - Destination *string `json:"destination,omitempty"` - - // REQUIRED; Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535). - DestinationPort *string `json:"destinationPort,omitempty"` - - // REQUIRED; The direction of the traffic. - Direction *Direction `json:"direction,omitempty"` - - // REQUIRED; Protocol to be verified on. Accepted values are '*', TCP, UDP. - Protocol *string `json:"protocol,omitempty"` - - // REQUIRED; Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. - Source *string `json:"source,omitempty"` -} - -// ConfigurationDiagnosticResponse - Results of network configuration diagnostic on the target resource. -type ConfigurationDiagnosticResponse struct { - // READ-ONLY; List of network configuration diagnostic results. - Results []*ConfigurationDiagnosticResult `json:"results,omitempty" azure:"ro"` -} - -// ConfigurationDiagnosticResult - Network configuration diagnostic result corresponded to provided traffic query. -type ConfigurationDiagnosticResult struct { - // Network security group result. - NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"` - - // Network configuration diagnostic profile. - Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"` -} - -// ConfigurationGroup - The network configuration group resource -type ConfigurationGroup struct { - // Network group ID. - ID *string `json:"id,omitempty"` - - // The network configuration group properties - Properties *GroupProperties `json:"properties,omitempty"` -} - -// ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginCreateOrUpdate -// method. -type ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationPolicyGroupsClientBeginDeleteOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginDelete -// method. -type ConfigurationPolicyGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationPolicyGroupsClientGetOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.Get -// method. -type ConfigurationPolicyGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.ListByVPNServerConfiguration -// method. -type ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions struct { - // placeholder for future optional parameters -} - -// ConnectionMonitor - Parameters that define the operation to create a connection monitor. -type ConnectionMonitor struct { - // REQUIRED; Properties of the connection monitor. - Properties *ConnectionMonitorParameters `json:"properties,omitempty"` - - // Connection monitor location. - Location *string `json:"location,omitempty"` - - // Connection monitor tags. - Tags map[string]*string `json:"tags,omitempty"` -} - -// ConnectionMonitorDestination - Describes the destination of connection monitor. -type ConnectionMonitorDestination struct { - // Address of the connection monitor destination (IP or domain name). - Address *string `json:"address,omitempty"` - - // The destination port used by connection monitor. - Port *int32 `json:"port,omitempty"` - - // The ID of the resource used as the destination by connection monitor. - ResourceID *string `json:"resourceId,omitempty"` -} - -// ConnectionMonitorEndpoint - Describes the connection monitor endpoint. -type ConnectionMonitorEndpoint struct { - // REQUIRED; The name of the connection monitor endpoint. - Name *string `json:"name,omitempty"` - - // Address of the connection monitor endpoint (IP or domain name). - Address *string `json:"address,omitempty"` - - // Test coverage for the endpoint. - CoverageLevel *CoverageLevel `json:"coverageLevel,omitempty"` - - // Filter for sub-items within the endpoint. - Filter *ConnectionMonitorEndpointFilter `json:"filter,omitempty"` - - // Resource ID of the connection monitor endpoint. - ResourceID *string `json:"resourceId,omitempty"` - - // Endpoint scope. - Scope *ConnectionMonitorEndpointScope `json:"scope,omitempty"` - - // The endpoint type. - Type *EndpointType `json:"type,omitempty"` -} - -// ConnectionMonitorEndpointFilter - Describes the connection monitor endpoint filter. -type ConnectionMonitorEndpointFilter struct { - // List of items in the filter. - Items []*ConnectionMonitorEndpointFilterItem `json:"items,omitempty"` - - // The behavior of the endpoint filter. Currently only 'Include' is supported. - Type *ConnectionMonitorEndpointFilterType `json:"type,omitempty"` -} - -// ConnectionMonitorEndpointFilterItem - Describes the connection monitor endpoint filter item. -type ConnectionMonitorEndpointFilterItem struct { - // The address of the filter item. - Address *string `json:"address,omitempty"` - - // The type of item included in the filter. Currently only 'AgentAddress' is supported. - Type *ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"` -} - -// ConnectionMonitorEndpointScope - Describes the connection monitor endpoint scope. -type ConnectionMonitorEndpointScope struct { - // List of items which needs to be excluded from the endpoint scope. - Exclude []*ConnectionMonitorEndpointScopeItem `json:"exclude,omitempty"` - - // List of items which needs to be included to the endpoint scope. - Include []*ConnectionMonitorEndpointScopeItem `json:"include,omitempty"` -} - -// ConnectionMonitorEndpointScopeItem - Describes the connection monitor endpoint scope item. -type ConnectionMonitorEndpointScopeItem struct { - // The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address. - Address *string `json:"address,omitempty"` -} - -// ConnectionMonitorHTTPConfiguration - Describes the HTTP configuration. -type ConnectionMonitorHTTPConfiguration struct { - // The HTTP method to use. - Method *HTTPConfigurationMethod `json:"method,omitempty"` - - // The path component of the URI. For instance, "/dir1/dir2". - Path *string `json:"path,omitempty"` - - // The port to connect to. - Port *int32 `json:"port,omitempty"` - - // Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit. - PreferHTTPS *bool `json:"preferHTTPS,omitempty"` - - // The HTTP headers to transmit with the request. - RequestHeaders []*HTTPHeader `json:"requestHeaders,omitempty"` - - // HTTP status codes to consider successful. For instance, "2xx,301-304,418". - ValidStatusCodeRanges []*string `json:"validStatusCodeRanges,omitempty"` -} - -// ConnectionMonitorIcmpConfiguration - Describes the ICMP configuration. -type ConnectionMonitorIcmpConfiguration struct { - // Value indicating whether path evaluation with trace route should be disabled. - DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"` -} - -// ConnectionMonitorListResult - List of connection monitors. -type ConnectionMonitorListResult struct { - // Information about connection monitors. - Value []*ConnectionMonitorResult `json:"value,omitempty"` -} - -// ConnectionMonitorOutput - Describes a connection monitor output destination. -type ConnectionMonitorOutput struct { - // Connection monitor output destination type. Currently, only "Workspace" is supported. - Type *OutputType `json:"type,omitempty"` - - // Describes the settings for producing output into a log analytics workspace. - WorkspaceSettings *ConnectionMonitorWorkspaceSettings `json:"workspaceSettings,omitempty"` -} - -// ConnectionMonitorParameters - Parameters that define the operation to create a connection monitor. -type ConnectionMonitorParameters struct { - // Determines if the connection monitor will start automatically once created. - AutoStart *bool `json:"autoStart,omitempty"` - - // Describes the destination of connection monitor. - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - - // List of connection monitor endpoints. - Endpoints []*ConnectionMonitorEndpoint `json:"endpoints,omitempty"` - - // Monitoring interval in seconds. - MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` - - // Optional notes to be associated with the connection monitor. - Notes *string `json:"notes,omitempty"` - - // List of connection monitor outputs. - Outputs []*ConnectionMonitorOutput `json:"outputs,omitempty"` - - // Describes the source of connection monitor. - Source *ConnectionMonitorSource `json:"source,omitempty"` - - // List of connection monitor test configurations. - TestConfigurations []*ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"` - - // List of connection monitor test groups. - TestGroups []*ConnectionMonitorTestGroup `json:"testGroups,omitempty"` -} - -// ConnectionMonitorQueryResult - List of connection states snapshots. -type ConnectionMonitorQueryResult struct { - // Status of connection monitor source. - SourceStatus *ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"` - - // Information about connection states. - States []*ConnectionStateSnapshot `json:"states,omitempty"` -} - -// ConnectionMonitorResult - Information about the connection monitor. -type ConnectionMonitorResult struct { - // Connection monitor location. - Location *string `json:"location,omitempty"` - - // Properties of the connection monitor result. - Properties *ConnectionMonitorResultProperties `json:"properties,omitempty"` - - // Connection monitor tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; ID of the connection monitor. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of the connection monitor. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Connection monitor type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ConnectionMonitorResultProperties - Describes the properties of a connection monitor. -type ConnectionMonitorResultProperties struct { - // Determines if the connection monitor will start automatically once created. - AutoStart *bool `json:"autoStart,omitempty"` - - // Describes the destination of connection monitor. - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - - // List of connection monitor endpoints. - Endpoints []*ConnectionMonitorEndpoint `json:"endpoints,omitempty"` - - // Monitoring interval in seconds. - MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` - - // Optional notes to be associated with the connection monitor. - Notes *string `json:"notes,omitempty"` - - // List of connection monitor outputs. - Outputs []*ConnectionMonitorOutput `json:"outputs,omitempty"` - - // Describes the source of connection monitor. - Source *ConnectionMonitorSource `json:"source,omitempty"` - - // List of connection monitor test configurations. - TestConfigurations []*ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"` - - // List of connection monitor test groups. - TestGroups []*ConnectionMonitorTestGroup `json:"testGroups,omitempty"` - - // READ-ONLY; Type of connection monitor. - ConnectionMonitorType *ConnectionMonitorType `json:"connectionMonitorType,omitempty" azure:"ro"` - - // READ-ONLY; The monitoring status of the connection monitor. - MonitoringStatus *string `json:"monitoringStatus,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the connection monitor. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The date and time when the connection monitor was started. - StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` -} - -// ConnectionMonitorSource - Describes the source of connection monitor. -type ConnectionMonitorSource struct { - // REQUIRED; The ID of the resource used as the source by connection monitor. - ResourceID *string `json:"resourceId,omitempty"` - - // The source port used by connection monitor. - Port *int32 `json:"port,omitempty"` -} - -// ConnectionMonitorSuccessThreshold - Describes the threshold for declaring a test successful. -type ConnectionMonitorSuccessThreshold struct { - // The maximum percentage of failed checks permitted for a test to evaluate as successful. - ChecksFailedPercent *int32 `json:"checksFailedPercent,omitempty"` - - // The maximum round-trip time in milliseconds permitted for a test to evaluate as successful. - RoundTripTimeMs *float32 `json:"roundTripTimeMs,omitempty"` -} - -// ConnectionMonitorTCPConfiguration - Describes the TCP configuration. -type ConnectionMonitorTCPConfiguration struct { - // Destination port behavior. - DestinationPortBehavior *DestinationPortBehavior `json:"destinationPortBehavior,omitempty"` - - // Value indicating whether path evaluation with trace route should be disabled. - DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"` - - // The port to connect to. - Port *int32 `json:"port,omitempty"` -} - -// ConnectionMonitorTestConfiguration - Describes a connection monitor test configuration. -type ConnectionMonitorTestConfiguration struct { - // REQUIRED; The name of the connection monitor test configuration. - Name *string `json:"name,omitempty"` - - // REQUIRED; The protocol to use in test evaluation. - Protocol *ConnectionMonitorTestConfigurationProtocol `json:"protocol,omitempty"` - - // The parameters used to perform test evaluation over HTTP. - HTTPConfiguration *ConnectionMonitorHTTPConfiguration `json:"httpConfiguration,omitempty"` - - // The parameters used to perform test evaluation over ICMP. - IcmpConfiguration *ConnectionMonitorIcmpConfiguration `json:"icmpConfiguration,omitempty"` - - // The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending - // on other parameters. - PreferredIPVersion *PreferredIPVersion `json:"preferredIPVersion,omitempty"` - - // The threshold for declaring a test successful. - SuccessThreshold *ConnectionMonitorSuccessThreshold `json:"successThreshold,omitempty"` - - // The parameters used to perform test evaluation over TCP. - TCPConfiguration *ConnectionMonitorTCPConfiguration `json:"tcpConfiguration,omitempty"` - - // The frequency of test evaluation, in seconds. - TestFrequencySec *int32 `json:"testFrequencySec,omitempty"` -} - -// ConnectionMonitorTestGroup - Describes the connection monitor test group. -type ConnectionMonitorTestGroup struct { - // REQUIRED; List of destination endpoint names. - Destinations []*string `json:"destinations,omitempty"` - - // REQUIRED; The name of the connection monitor test group. - Name *string `json:"name,omitempty"` - - // REQUIRED; List of source endpoint names. - Sources []*string `json:"sources,omitempty"` - - // REQUIRED; List of test configuration names. - TestConfigurations []*string `json:"testConfigurations,omitempty"` - - // Value indicating whether test group is disabled. - Disable *bool `json:"disable,omitempty"` -} - -// ConnectionMonitorWorkspaceSettings - Describes the settings for producing output into a log analytics workspace. -type ConnectionMonitorWorkspaceSettings struct { - // Log analytics workspace resource ID. - WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` -} - -// ConnectionMonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorsClient.BeginCreateOrUpdate -// method. -type ConnectionMonitorsClientBeginCreateOrUpdateOptions struct { - // Value indicating whether connection monitor V1 should be migrated to V2 format. - Migrate *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectionMonitorsClientBeginDeleteOptions contains the optional parameters for the ConnectionMonitorsClient.BeginDelete -// method. -type ConnectionMonitorsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectionMonitorsClientBeginQueryOptions contains the optional parameters for the ConnectionMonitorsClient.BeginQuery -// method. -type ConnectionMonitorsClientBeginQueryOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectionMonitorsClientBeginStartOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStart -// method. -type ConnectionMonitorsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectionMonitorsClientBeginStopOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStop method. -type ConnectionMonitorsClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectionMonitorsClientGetOptions contains the optional parameters for the ConnectionMonitorsClient.Get method. -type ConnectionMonitorsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.List method. -type ConnectionMonitorsClientListOptions struct { - // placeholder for future optional parameters -} - -// ConnectionMonitorsClientUpdateTagsOptions contains the optional parameters for the ConnectionMonitorsClient.UpdateTags -// method. -type ConnectionMonitorsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// ConnectionResetSharedKey - The virtual network connection reset shared key. -type ConnectionResetSharedKey struct { - // REQUIRED; The virtual network connection reset shared key length, should between 1 and 128. - KeyLength *int32 `json:"keyLength,omitempty"` -} - -// ConnectionSharedKey - Response for GetConnectionSharedKey API service call. -type ConnectionSharedKey struct { - // REQUIRED; The virtual network connection shared key value. - Value *string `json:"value,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` -} - -// ConnectionStateSnapshot - Connection state snapshot. -type ConnectionStateSnapshot struct { - // Average latency in ms. - AvgLatencyInMs *int64 `json:"avgLatencyInMs,omitempty"` - - // The connection state. - ConnectionState *ConnectionState `json:"connectionState,omitempty"` - - // The end time of the connection snapshot. - EndTime *time.Time `json:"endTime,omitempty"` - - // Connectivity analysis evaluation state. - EvaluationState *EvaluationState `json:"evaluationState,omitempty"` - - // Maximum latency in ms. - MaxLatencyInMs *int64 `json:"maxLatencyInMs,omitempty"` - - // Minimum latency in ms. - MinLatencyInMs *int64 `json:"minLatencyInMs,omitempty"` - - // The number of failed probes. - ProbesFailed *int64 `json:"probesFailed,omitempty"` - - // The number of sent probes. - ProbesSent *int64 `json:"probesSent,omitempty"` - - // The start time of the connection snapshot. - StartTime *time.Time `json:"startTime,omitempty"` - - // READ-ONLY; List of hops between the source and the destination. - Hops []*ConnectivityHop `json:"hops,omitempty" azure:"ro"` -} - -// ConnectivityConfiguration - The network manager connectivity configuration resource -type ConnectivityConfiguration struct { - // Properties of a network manager connectivity configuration - Properties *ConnectivityConfigurationProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ConnectivityConfigurationListResult - Result of the request to list network manager connectivity configurations. It contains -// a list of configurations and a link to get the next set of results. -type ConnectivityConfigurationListResult struct { - // Gets the URL to get the next page of results. - NextLink *string `json:"nextLink,omitempty"` - - // Gets a page of Connectivity Configurations - Value []*ConnectivityConfiguration `json:"value,omitempty"` -} - -// ConnectivityConfigurationProperties - Properties of network manager connectivity configuration -type ConnectivityConfigurationProperties struct { - // REQUIRED; Groups for configuration - AppliesToGroups []*ConnectivityGroupItem `json:"appliesToGroups,omitempty"` - - // REQUIRED; Connectivity topology type. - ConnectivityTopology *ConnectivityTopology `json:"connectivityTopology,omitempty"` - - // Flag if need to remove current existing peerings. - DeleteExistingPeering *DeleteExistingPeering `json:"deleteExistingPeering,omitempty"` - - // A description of the connectivity configuration. - Description *string `json:"description,omitempty"` - - // List of hubItems - Hubs []*Hub `json:"hubs,omitempty"` - - // Flag if global mesh is supported. - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - - // READ-ONLY; The provisioning state of the connectivity configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ConnectivityConfigurationsClientBeginDeleteOptions contains the optional parameters for the ConnectivityConfigurationsClient.BeginDelete -// method. -type ConnectivityConfigurationsClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectivityConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the ConnectivityConfigurationsClient.CreateOrUpdate -// method. -type ConnectivityConfigurationsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectivityConfigurationsClientGetOptions contains the optional parameters for the ConnectivityConfigurationsClient.Get -// method. -type ConnectivityConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectivityConfigurationsClientListOptions contains the optional parameters for the ConnectivityConfigurationsClient.List -// method. -type ConnectivityConfigurationsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// ConnectivityDestination - Parameters that define destination of connection. -type ConnectivityDestination struct { - // The IP address or URI the resource to which a connection attempt will be made. - Address *string `json:"address,omitempty"` - - // Port on which check connectivity will be performed. - Port *int32 `json:"port,omitempty"` - - // The ID of the resource to which a connection attempt will be made. - ResourceID *string `json:"resourceId,omitempty"` -} - -// ConnectivityGroupItem - Connectivity group item. -type ConnectivityGroupItem struct { - // REQUIRED; Group connectivity type. - GroupConnectivity *GroupConnectivity `json:"groupConnectivity,omitempty"` - - // REQUIRED; Network group Id. - NetworkGroupID *string `json:"networkGroupId,omitempty"` - - // Flag if global is supported. - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - - // Flag if need to use hub gateway. - UseHubGateway *UseHubGateway `json:"useHubGateway,omitempty"` -} - -// ConnectivityHop - Information about a hop between the source and the destination. -type ConnectivityHop struct { - // READ-ONLY; The IP address of the hop. - Address *string `json:"address,omitempty" azure:"ro"` - - // READ-ONLY; The ID of the hop. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; List of issues. - Issues []*ConnectivityIssue `json:"issues,omitempty" azure:"ro"` - - // READ-ONLY; List of hop links. - Links []*HopLink `json:"links,omitempty" azure:"ro"` - - // READ-ONLY; List of next hop identifiers. - NextHopIDs []*string `json:"nextHopIds,omitempty" azure:"ro"` - - // READ-ONLY; List of previous hop identifiers. - PreviousHopIDs []*string `json:"previousHopIds,omitempty" azure:"ro"` - - // READ-ONLY; List of previous hop links. - PreviousLinks []*HopLink `json:"previousLinks,omitempty" azure:"ro"` - - // READ-ONLY; The ID of the resource corresponding to this hop. - ResourceID *string `json:"resourceId,omitempty" azure:"ro"` - - // READ-ONLY; The type of the hop. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ConnectivityInformation - Information on the connectivity status. -type ConnectivityInformation struct { - // READ-ONLY; Average latency in milliseconds. - AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty" azure:"ro"` - - // READ-ONLY; The connection status. - ConnectionStatus *ConnectionStatus `json:"connectionStatus,omitempty" azure:"ro"` - - // READ-ONLY; List of hops between the source and the destination. - Hops []*ConnectivityHop `json:"hops,omitempty" azure:"ro"` - - // READ-ONLY; Maximum latency in milliseconds. - MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty" azure:"ro"` - - // READ-ONLY; Minimum latency in milliseconds. - MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty" azure:"ro"` - - // READ-ONLY; Number of failed probes. - ProbesFailed *int32 `json:"probesFailed,omitempty" azure:"ro"` - - // READ-ONLY; Total number of probes sent. - ProbesSent *int32 `json:"probesSent,omitempty" azure:"ro"` -} - -// ConnectivityIssue - Information about an issue encountered in the process of checking for connectivity. -type ConnectivityIssue struct { - // READ-ONLY; Provides additional context on the issue. - Context []map[string]*string `json:"context,omitempty" azure:"ro"` - - // READ-ONLY; The origin of the issue. - Origin *Origin `json:"origin,omitempty" azure:"ro"` - - // READ-ONLY; The severity of the issue. - Severity *Severity `json:"severity,omitempty" azure:"ro"` - - // READ-ONLY; The type of issue. - Type *IssueType `json:"type,omitempty" azure:"ro"` -} - -// ConnectivityParameters - Parameters that determine how the connectivity check will be performed. -type ConnectivityParameters struct { - // REQUIRED; The destination of connection. - Destination *ConnectivityDestination `json:"destination,omitempty"` - - // REQUIRED; The source of the connection. - Source *ConnectivitySource `json:"source,omitempty"` - - // Preferred IP version of the connection. - PreferredIPVersion *IPVersion `json:"preferredIPVersion,omitempty"` - - // Network protocol. - Protocol *Protocol `json:"protocol,omitempty"` - - // Configuration of the protocol. - ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"` -} - -// ConnectivitySource - Parameters that define the source of the connection. -type ConnectivitySource struct { - // REQUIRED; The ID of the resource from which a connectivity check will be initiated. - ResourceID *string `json:"resourceId,omitempty"` - - // The source port from which a connectivity check will be performed. - Port *int32 `json:"port,omitempty"` -} - -// Container - Reference to container resource in remote resource provider. -type Container struct { - // Resource ID. - ID *string `json:"id,omitempty"` -} - -// ContainerNetworkInterface - Container network interface child resource. -type ContainerNetworkInterface struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Container network interface properties. - Properties *ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ContainerNetworkInterfaceConfiguration - Container network interface configuration child resource. -type ContainerNetworkInterfaceConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Container network interface configuration properties. - Properties *ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties. -type ContainerNetworkInterfaceConfigurationPropertiesFormat struct { - // A list of container network interfaces created from this container network interface configuration. - ContainerNetworkInterfaces []*SubResource `json:"containerNetworkInterfaces,omitempty"` - - // A list of ip configurations of the container network interface configuration. - IPConfigurations []*IPConfigurationProfile `json:"ipConfigurations,omitempty"` - - // READ-ONLY; The provisioning state of the container network interface configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ContainerNetworkInterfaceIPConfiguration - The ip configuration for a container network interface. -type ContainerNetworkInterfaceIPConfiguration struct { - // The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the container network interface IP configuration. - Properties *ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration. -type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct { - // READ-ONLY; The provisioning state of the container network interface IP configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ContainerNetworkInterfacePropertiesFormat - Properties of container network interface. -type ContainerNetworkInterfacePropertiesFormat struct { - // Reference to the container to which this container network interface is attached. - Container *Container `json:"container,omitempty"` - - // READ-ONLY; Container network interface configuration from which this container network interface is created. - ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty" azure:"ro"` - - // READ-ONLY; Reference to the ip configuration on this container nic. - IPConfigurations []*ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the container network interface resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// CrossTenantScopes - Cross tenant scopes. -type CrossTenantScopes struct { - // READ-ONLY; List of management groups. - ManagementGroups []*string `json:"managementGroups,omitempty" azure:"ro"` - - // READ-ONLY; List of subscriptions. - Subscriptions []*string `json:"subscriptions,omitempty" azure:"ro"` - - // READ-ONLY; Tenant ID. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// CustomDNSConfigPropertiesFormat - Contains custom Dns resolution configuration from customer. -type CustomDNSConfigPropertiesFormat struct { - // Fqdn that resolves to private endpoint ip address. - Fqdn *string `json:"fqdn,omitempty"` - - // A list of private ip addresses of the private endpoint. - IPAddresses []*string `json:"ipAddresses,omitempty"` -} - -// CustomIPPrefix - Custom IP prefix resource. -type CustomIPPrefix struct { - // The extended location of the custom IP prefix. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Custom IP prefix properties. - Properties *CustomIPPrefixPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // A list of availability zones denoting the IP allocated for the resource needs to come from. - Zones []*string `json:"zones,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CustomIPPrefixListResult - Response for ListCustomIpPrefixes API service call. -type CustomIPPrefixListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of Custom IP prefixes that exists in a resource group. - Value []*CustomIPPrefix `json:"value,omitempty"` -} - -// CustomIPPrefixPropertiesFormat - Custom IP prefix properties. -type CustomIPPrefixPropertiesFormat struct { - // Authorization message for WAN validation. - AuthorizationMessage *string `json:"authorizationMessage,omitempty"` - - // The prefix range in CIDR notation. Should include the start address and the prefix length. - Cidr *string `json:"cidr,omitempty"` - - // The commissioned state of the Custom IP Prefix. - CommissionedState *CommissionedState `json:"commissionedState,omitempty"` - - // The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. - CustomIPPrefixParent *SubResource `json:"customIpPrefixParent,omitempty"` - - // Whether to Advertise the range to Internet. - NoInternetAdvertise *bool `json:"noInternetAdvertise,omitempty"` - - // Signed message for WAN validation. - SignedMessage *string `json:"signedMessage,omitempty"` - - // READ-ONLY; The list of all Children for IPv6 /48 CustomIpPrefix. - ChildCustomIPPrefixes []*SubResource `json:"childCustomIpPrefixes,omitempty" azure:"ro"` - - // READ-ONLY; The reason why resource is in failed state. - FailedReason *string `json:"failedReason,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the custom IP prefix resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The list of all referenced PublicIpPrefixes. - PublicIPPrefixes []*SubResource `json:"publicIpPrefixes,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the custom IP prefix resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// CustomIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomIPPrefixesClient.BeginCreateOrUpdate -// method. -type CustomIPPrefixesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete method. -type CustomIPPrefixesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomIPPrefixesClientGetOptions contains the optional parameters for the CustomIPPrefixesClient.Get method. -type CustomIPPrefixesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.ListAll method. -type CustomIPPrefixesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.List method. -type CustomIPPrefixesClientListOptions struct { - // placeholder for future optional parameters -} - -// CustomIPPrefixesClientUpdateTagsOptions contains the optional parameters for the CustomIPPrefixesClient.UpdateTags method. -type CustomIPPrefixesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// DNSNameAvailabilityResult - Response for the CheckDnsNameAvailability API service call. -type DNSNameAvailabilityResult struct { - // Domain availability (True/False). - Available *bool `json:"available,omitempty"` -} - -// DNSSettings - DNS Proxy Settings in Firewall Policy. -type DNSSettings struct { - // Enable DNS Proxy on Firewalls attached to the Firewall Policy. - EnableProxy *bool `json:"enableProxy,omitempty"` - - // FQDNs in Network Rules are supported when set to true. - RequireProxyForNetworkRules *bool `json:"requireProxyForNetworkRules,omitempty"` - - // List of Custom DNS Servers. - Servers []*string `json:"servers,omitempty"` -} - -// DdosCustomPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginCreateOrUpdate -// method. -type DdosCustomPoliciesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DdosCustomPoliciesClientBeginDeleteOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginDelete -// method. -type DdosCustomPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DdosCustomPoliciesClientGetOptions contains the optional parameters for the DdosCustomPoliciesClient.Get method. -type DdosCustomPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// DdosCustomPoliciesClientUpdateTagsOptions contains the optional parameters for the DdosCustomPoliciesClient.UpdateTags -// method. -type DdosCustomPoliciesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// DdosCustomPolicy - A DDoS custom policy in a resource group. -type DdosCustomPolicy struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the DDoS custom policy. - Properties *DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DdosCustomPolicyPropertiesFormat - DDoS custom policy properties. -type DdosCustomPolicyPropertiesFormat struct { - // The protocol-specific DDoS policy customization parameters. - ProtocolCustomSettings []*ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"` - - // READ-ONLY; The provisioning state of the DDoS custom policy resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only. - PublicIPAddresses []*SubResource `json:"publicIPAddresses,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if - // the user changes its name or migrate the resource across subscriptions or resource groups. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// DdosProtectionPlan - A DDoS protection plan in a resource group. -type DdosProtectionPlan struct { - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the DDoS protection plan. - Properties *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DdosProtectionPlanListResult - A list of DDoS protection plans. -type DdosProtectionPlanListResult struct { - // A list of DDoS protection plans. - Value []*DdosProtectionPlan `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DdosProtectionPlanPropertiesFormat - DDoS protection plan properties. -type DdosProtectionPlanPropertiesFormat struct { - // READ-ONLY; The provisioning state of the DDoS protection plan resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if - // the user changes its name or migrate the resource across subscriptions or resource groups. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` - - // READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. - VirtualNetworks []*SubResource `json:"virtualNetworks,omitempty" azure:"ro"` -} - -// DdosProtectionPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosProtectionPlansClient.BeginCreateOrUpdate -// method. -type DdosProtectionPlansClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DdosProtectionPlansClientBeginDeleteOptions contains the optional parameters for the DdosProtectionPlansClient.BeginDelete -// method. -type DdosProtectionPlansClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DdosProtectionPlansClientGetOptions contains the optional parameters for the DdosProtectionPlansClient.Get method. -type DdosProtectionPlansClientGetOptions struct { - // placeholder for future optional parameters -} - -// DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.ListByResourceGroup -// method. -type DdosProtectionPlansClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.List method. -type DdosProtectionPlansClientListOptions struct { - // placeholder for future optional parameters -} - -// DdosProtectionPlansClientUpdateTagsOptions contains the optional parameters for the DdosProtectionPlansClient.UpdateTags -// method. -type DdosProtectionPlansClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// DdosSettings - Contains the DDoS protection settings of the public IP. -type DdosSettings struct { - // The DDoS custom policy associated with the public IP. - DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"` - - // Enables DDoS protection on the public IP. - ProtectedIP *bool `json:"protectedIP,omitempty"` - - // The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. - ProtectionCoverage *DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"` -} - -// DefaultAdminPropertiesFormat - Security default admin rule resource. -type DefaultAdminPropertiesFormat struct { - // Default rule flag. - Flag *string `json:"flag,omitempty"` - - // READ-ONLY; Indicates the access allowed for this particular rule - Access *SecurityConfigurationRuleAccess `json:"access,omitempty" azure:"ro"` - - // READ-ONLY; A description for this rule. Restricted to 140 chars. - Description *string `json:"description,omitempty" azure:"ro"` - - // READ-ONLY; The destination port ranges. - DestinationPortRanges []*string `json:"destinationPortRanges,omitempty" azure:"ro"` - - // READ-ONLY; The destination address prefixes. CIDR or destination IP ranges. - Destinations []*AddressPrefixItem `json:"destinations,omitempty" azure:"ro"` - - // READ-ONLY; Indicates if the traffic matched against the rule in inbound or outbound. - Direction *SecurityConfigurationRuleDirection `json:"direction,omitempty" azure:"ro"` - - // READ-ONLY; The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule - // in the collection. The lower the priority number, the higher the priority of the rule. - Priority *int32 `json:"priority,omitempty" azure:"ro"` - - // READ-ONLY; Network protocol this rule applies to. - Protocol *SecurityConfigurationRuleProtocol `json:"protocol,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The source port ranges. - SourcePortRanges []*string `json:"sourcePortRanges,omitempty" azure:"ro"` - - // READ-ONLY; The CIDR or source IP ranges. - Sources []*AddressPrefixItem `json:"sources,omitempty" azure:"ro"` -} - -// DefaultAdminRule - Network default admin rule. -type DefaultAdminRule struct { - // REQUIRED; Whether the rule is custom or default. - Kind *AdminRuleKind `json:"kind,omitempty"` - - // Indicates the properties of the security admin rule - Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GetBaseAdminRule implements the BaseAdminRuleClassification interface for type DefaultAdminRule. -func (d *DefaultAdminRule) GetBaseAdminRule() *BaseAdminRule { - return &BaseAdminRule{ - Kind: d.Kind, - SystemData: d.SystemData, - ID: d.ID, - Name: d.Name, - Type: d.Type, - Etag: d.Etag, - } -} - -// DefaultSecurityRulesClientGetOptions contains the optional parameters for the DefaultSecurityRulesClient.Get method. -type DefaultSecurityRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.List method. -type DefaultSecurityRulesClientListOptions struct { - // placeholder for future optional parameters -} - -// Delegation - Details the service to which the subnet is delegated. -type Delegation struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a subnet. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the subnet. - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - - // Resource type. - Type *string `json:"type,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// DeviceProperties - List of properties of the device. -type DeviceProperties struct { - // Model of the device. - DeviceModel *string `json:"deviceModel,omitempty"` - - // Name of the device Vendor. - DeviceVendor *string `json:"deviceVendor,omitempty"` - - // Link speed. - LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"` -} - -// DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for -// a subnet overrides VNET DHCP options. -type DhcpOptions struct { - // The list of DNS servers IP addresses. - DNSServers []*string `json:"dnsServers,omitempty"` -} - -// Dimension of the metric. -type Dimension struct { - // The display name of the dimension. - DisplayName *string `json:"displayName,omitempty"` - - // The internal name of the dimension. - InternalName *string `json:"internalName,omitempty"` - - // The name of the dimension. - Name *string `json:"name,omitempty"` -} - -// DscpConfiguration - Differentiated Services Code Point configuration for any given network interface -type DscpConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the network interface. - Properties *DscpConfigurationPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// DscpConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscpConfigurationClient.BeginCreateOrUpdate -// method. -type DscpConfigurationClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete -// method. -type DscpConfigurationClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DscpConfigurationClientGetOptions contains the optional parameters for the DscpConfigurationClient.Get method. -type DscpConfigurationClientGetOptions struct { - // placeholder for future optional parameters -} - -// DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.ListAll method. -type DscpConfigurationClientListAllOptions struct { - // placeholder for future optional parameters -} - -// DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.List method. -type DscpConfigurationClientListOptions struct { - // placeholder for future optional parameters -} - -// DscpConfigurationListResult - Response for the DscpConfigurationList API service call. -type DscpConfigurationListResult struct { - // A list of dscp configurations in a resource group. - Value []*DscpConfiguration `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DscpConfigurationPropertiesFormat - Differentiated Services Code Point configuration properties. -type DscpConfigurationPropertiesFormat struct { - // Destination IP ranges. - DestinationIPRanges []*QosIPRange `json:"destinationIpRanges,omitempty"` - - // Destination port ranges. - DestinationPortRanges []*QosPortRange `json:"destinationPortRanges,omitempty"` - - // List of markings to be used in the configuration. - Markings []*int32 `json:"markings,omitempty"` - - // RNM supported protocol types. - Protocol *ProtocolType `json:"protocol,omitempty"` - - // QoS object definitions - QosDefinitionCollection []*QosDefinition `json:"qosDefinitionCollection,omitempty"` - - // Source IP ranges. - SourceIPRanges []*QosIPRange `json:"sourceIpRanges,omitempty"` - - // Sources port ranges. - SourcePortRanges []*QosPortRange `json:"sourcePortRanges,omitempty"` - - // READ-ONLY; Associated Network Interfaces to the DSCP Configuration. - AssociatedNetworkInterfaces []*Interface `json:"associatedNetworkInterfaces,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the DSCP Configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Qos Collection ID generated by RNM. - QosCollectionID *string `json:"qosCollectionId,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the DSCP Configuration resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// EffectiveBaseSecurityAdminRuleClassification provides polymorphic access to related types. -// Call the interface's GetEffectiveBaseSecurityAdminRule() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EffectiveBaseSecurityAdminRule, *EffectiveDefaultSecurityAdminRule, *EffectiveSecurityAdminRule -type EffectiveBaseSecurityAdminRuleClassification interface { - // GetEffectiveBaseSecurityAdminRule returns the EffectiveBaseSecurityAdminRule content of the underlying type. - GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule -} - -// EffectiveBaseSecurityAdminRule - Network base admin rule. -type EffectiveBaseSecurityAdminRule struct { - // REQUIRED; Whether the rule is custom or default. - Kind *EffectiveAdminRuleKind `json:"kind,omitempty"` - - // A description of the security admin configuration. - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Groups for rule collection - RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - - // A description of the rule collection. - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - - // Effective configuration groups. - RuleGroups []*ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -// GetEffectiveBaseSecurityAdminRule implements the EffectiveBaseSecurityAdminRuleClassification interface for type EffectiveBaseSecurityAdminRule. -func (e *EffectiveBaseSecurityAdminRule) GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule { - return e -} - -// EffectiveConnectivityConfiguration - The network manager effective connectivity configuration -type EffectiveConnectivityConfiguration struct { - // Effective configuration groups. - ConfigurationGroups []*ConfigurationGroup `json:"configurationGroups,omitempty"` - - // Connectivity configuration ID. - ID *string `json:"id,omitempty"` - - // Properties of a network manager connectivity configuration - Properties *ConnectivityConfigurationProperties `json:"properties,omitempty"` -} - -// EffectiveDefaultSecurityAdminRule - Network default admin rule. -type EffectiveDefaultSecurityAdminRule struct { - // REQUIRED; Whether the rule is custom or default. - Kind *EffectiveAdminRuleKind `json:"kind,omitempty"` - - // A description of the security admin configuration. - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Indicates the properties of the default security admin rule - Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` - - // Groups for rule collection - RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - - // A description of the rule collection. - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - - // Effective configuration groups. - RuleGroups []*ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -// GetEffectiveBaseSecurityAdminRule implements the EffectiveBaseSecurityAdminRuleClassification interface for type EffectiveDefaultSecurityAdminRule. -func (e *EffectiveDefaultSecurityAdminRule) GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule { - return &EffectiveBaseSecurityAdminRule{ - ID: e.ID, - ConfigurationDescription: e.ConfigurationDescription, - RuleCollectionDescription: e.RuleCollectionDescription, - RuleCollectionAppliesToGroups: e.RuleCollectionAppliesToGroups, - RuleGroups: e.RuleGroups, - Kind: e.Kind, - } -} - -// EffectiveNetworkSecurityGroup - Effective network security group. -type EffectiveNetworkSecurityGroup struct { - // Associated resources. - Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` - - // A collection of effective security rules. - EffectiveSecurityRules []*EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` - - // The ID of network security group that is applied. - NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` - - // Mapping of tags to list of IP Addresses included within the tag. - TagMap *string `json:"tagMap,omitempty"` -} - -// EffectiveNetworkSecurityGroupAssociation - The effective network security group association. -type EffectiveNetworkSecurityGroupAssociation struct { - // The ID of the network interface if assigned. - NetworkInterface *SubResource `json:"networkInterface,omitempty"` - - // The ID of the Azure network manager if assigned. - NetworkManager *SubResource `json:"networkManager,omitempty"` - - // The ID of the subnet if assigned. - Subnet *SubResource `json:"subnet,omitempty"` -} - -// EffectiveNetworkSecurityGroupListResult - Response for list effective network security groups API service call. -type EffectiveNetworkSecurityGroupListResult struct { - // A list of effective network security groups. - Value []*EffectiveNetworkSecurityGroup `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// EffectiveNetworkSecurityRule - Effective network security rules. -type EffectiveNetworkSecurityRule struct { - // Whether network traffic is allowed or denied. - Access *SecurityRuleAccess `json:"access,omitempty"` - - // The destination address prefix. - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - - // The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, - // Internet), System Tags, and the asterisk (*). - DestinationAddressPrefixes []*string `json:"destinationAddressPrefixes,omitempty"` - - // The destination port or range. - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - - // The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator - // (e.g. 100-400), or an asterisk (*). - DestinationPortRanges []*string `json:"destinationPortRanges,omitempty"` - - // The direction of the rule. - Direction *SecurityRuleDirection `json:"direction,omitempty"` - - // Expanded destination address prefix. - ExpandedDestinationAddressPrefix []*string `json:"expandedDestinationAddressPrefix,omitempty"` - - // The expanded source address prefix. - ExpandedSourceAddressPrefix []*string `json:"expandedSourceAddressPrefix,omitempty"` - - // The name of the security rule specified by the user (if created by the user). - Name *string `json:"name,omitempty"` - - // The priority of the rule. - Priority *int32 `json:"priority,omitempty"` - - // The network protocol this rule applies to. - Protocol *EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` - - // The source address prefix. - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - - // The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), - // System Tags, and the asterisk (*). - SourceAddressPrefixes []*string `json:"sourceAddressPrefixes,omitempty"` - - // The source port or range. - SourcePortRange *string `json:"sourcePortRange,omitempty"` - - // The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. - // 100-400), or an asterisk (*). - SourcePortRanges []*string `json:"sourcePortRanges,omitempty"` -} - -// EffectiveRoute - Effective Route. -type EffectiveRoute struct { - // The address prefixes of the effective routes in CIDR notation. - AddressPrefix []*string `json:"addressPrefix,omitempty"` - - // If true, on-premises routes are not propagated to the network interfaces in the subnet. - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - - // The name of the user defined route. This is optional. - Name *string `json:"name,omitempty"` - - // The IP address of the next hop of the effective route. - NextHopIPAddress []*string `json:"nextHopIpAddress,omitempty"` - - // The type of Azure hop the packet should be sent to. - NextHopType *RouteNextHopType `json:"nextHopType,omitempty"` - - // Who created the route. - Source *EffectiveRouteSource `json:"source,omitempty"` - - // The value of effective route. - State *EffectiveRouteState `json:"state,omitempty"` -} - -// EffectiveRouteListResult - Response for list effective route API service call. -type EffectiveRouteListResult struct { - // A list of effective routes. - Value []*EffectiveRoute `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// EffectiveRoutesParameters - The parameters specifying the resource whose effective routes are being requested. -type EffectiveRoutesParameters struct { - // The resource whose effective routes are being requested. - ResourceID *string `json:"resourceId,omitempty"` - - // The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection - // and P2SConnection. - VirtualWanResourceType *string `json:"virtualWanResourceType,omitempty"` -} - -// EffectiveSecurityAdminRule - Network admin rule. -type EffectiveSecurityAdminRule struct { - // REQUIRED; Whether the rule is custom or default. - Kind *EffectiveAdminRuleKind `json:"kind,omitempty"` - - // A description of the security admin configuration. - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Indicates the properties of the security admin rule - Properties *AdminPropertiesFormat `json:"properties,omitempty"` - - // Groups for rule collection - RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - - // A description of the rule collection. - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - - // Effective configuration groups. - RuleGroups []*ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -// GetEffectiveBaseSecurityAdminRule implements the EffectiveBaseSecurityAdminRuleClassification interface for type EffectiveSecurityAdminRule. -func (e *EffectiveSecurityAdminRule) GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule { - return &EffectiveBaseSecurityAdminRule{ - ID: e.ID, - ConfigurationDescription: e.ConfigurationDescription, - RuleCollectionDescription: e.RuleCollectionDescription, - RuleCollectionAppliesToGroups: e.RuleCollectionAppliesToGroups, - RuleGroups: e.RuleGroups, - Kind: e.Kind, - } -} - -// EndpointServiceResult - Endpoint service. -type EndpointServiceResult struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // READ-ONLY; Name of the endpoint service. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Type of the endpoint service. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// EndpointServicesListResult - Response for the ListAvailableEndpointServices API service call. -type EndpointServicesListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of available endpoint services in a region. - Value []*EndpointServiceResult `json:"value,omitempty"` -} - -// Error - Common error representation. -type Error struct { - // Error code. - Code *string `json:"code,omitempty"` - - // Error details. - Details []*ErrorDetails `json:"details,omitempty"` - - // Inner error message. - InnerError *string `json:"innerError,omitempty"` - - // Error message. - Message *string `json:"message,omitempty"` - - // Error target. - Target *string `json:"target,omitempty"` -} - -// ErrorDetails - Common error details representation. -type ErrorDetails struct { - // Error code. - Code *string `json:"code,omitempty"` - - // Error message. - Message *string `json:"message,omitempty"` - - // Error target. - Target *string `json:"target,omitempty"` -} - -// ErrorResponse - The error object. -type ErrorResponse struct { - // The error details object. - Error *ErrorDetails `json:"error,omitempty"` -} - -// EvaluatedNetworkSecurityGroup - Results of network security group evaluation. -type EvaluatedNetworkSecurityGroup struct { - // Resource ID of nic or subnet to which network security group is applied. - AppliedTo *string `json:"appliedTo,omitempty"` - - // Matched network security rule. - MatchedRule *MatchedRule `json:"matchedRule,omitempty"` - - // Network security group ID. - NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"` - - // READ-ONLY; List of network security rules evaluation results. - RulesEvaluationResult []*SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty" azure:"ro"` -} - -// ExclusionManagedRule - Defines a managed rule to use for exclusion. -type ExclusionManagedRule struct { - // REQUIRED; Identifier for the managed rule. - RuleID *string `json:"ruleId,omitempty"` -} - -// ExclusionManagedRuleGroup - Defines a managed rule group to use for exclusion. -type ExclusionManagedRuleGroup struct { - // REQUIRED; The managed rule group for exclusion. - RuleGroupName *string `json:"ruleGroupName,omitempty"` - - // List of rules that will be excluded. If none specified, all rules in the group will be excluded. - Rules []*ExclusionManagedRule `json:"rules,omitempty"` -} - -// ExclusionManagedRuleSet - Defines a managed rule set for Exclusions. -type ExclusionManagedRuleSet struct { - // REQUIRED; Defines the rule set type to use. - RuleSetType *string `json:"ruleSetType,omitempty"` - - // REQUIRED; Defines the version of the rule set to use. - RuleSetVersion *string `json:"ruleSetVersion,omitempty"` - - // Defines the rule groups to apply to the rule set. - RuleGroups []*ExclusionManagedRuleGroup `json:"ruleGroups,omitempty"` -} - -// ExplicitProxySettings - Explicit Proxy Settings in Firewall Policy. -type ExplicitProxySettings struct { - // When set to true, explicit proxy mode is enabled. - EnableExplicitProxy *bool `json:"enableExplicitProxy,omitempty"` - - // When set to true, pac file port and url needs to be provided. - EnablePacFile *bool `json:"enablePacFile,omitempty"` - - // Port number for explicit proxy http protocol, cannot be greater than 64000. - HTTPPort *int32 `json:"httpPort,omitempty"` - - // Port number for explicit proxy https protocol, cannot be greater than 64000. - HTTPSPort *int32 `json:"httpsPort,omitempty"` - - // SAS URL for PAC file. - PacFile *string `json:"pacFile,omitempty"` - - // Port number for firewall to serve PAC file. - PacFilePort *int32 `json:"pacFilePort,omitempty"` -} - -// ExpressRouteCircuit resource. -type ExpressRouteCircuit struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the express route circuit. - Properties *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` - - // The SKU. - SKU *ExpressRouteCircuitSKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRouteCircuitArpTable - The ARP table associated with the ExpressRouteCircuit. -type ExpressRouteCircuitArpTable struct { - // Entry age in minutes. - Age *int32 `json:"age,omitempty"` - - // The IP address. - IPAddress *string `json:"ipAddress,omitempty"` - - // Interface address. - Interface *string `json:"interface,omitempty"` - - // The MAC address. - MacAddress *string `json:"macAddress,omitempty"` -} - -// ExpressRouteCircuitAuthorization - Authorization in an ExpressRouteCircuit resource. -type ExpressRouteCircuitAuthorization struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the express route circuit authorization. - Properties *AuthorizationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginDelete -// method. -type ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitAuthorizationsClientGetOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.Get -// method. -type ExpressRouteCircuitAuthorizationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.List -// method. -type ExpressRouteCircuitAuthorizationsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitConnection - Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. -type ExpressRouteCircuitConnection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the express route circuit connection. - Properties *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRouteCircuitConnectionListResult - Response for ListConnections API service call retrieves all global reach connections -// that belongs to a Private Peering for an ExpressRouteCircuit. -type ExpressRouteCircuitConnectionListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The global reach connection associated with Private Peering in an ExpressRoute Circuit. - Value []*ExpressRouteCircuitConnection `json:"value,omitempty"` -} - -// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection. -type ExpressRouteCircuitConnectionPropertiesFormat struct { - // /29 IP address space to carve out Customer addresses for tunnels. - AddressPrefix *string `json:"addressPrefix,omitempty"` - - // The authorization key. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - - // Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - - // IPv6 Address PrefixProperties of the express route circuit connection. - IPv6CircuitConnectionConfig *IPv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"` - - // Reference to Express Route Circuit Private Peering Resource of the peered circuit. - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - - // READ-ONLY; Express Route Circuit connection state. - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the express route circuit connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginDelete -// method. -type ExpressRouteCircuitConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.Get -// method. -type ExpressRouteCircuitConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.List -// method. -type ExpressRouteCircuitConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitListResult - Response for ListExpressRouteCircuit API service call. -type ExpressRouteCircuitListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of ExpressRouteCircuits in a resource group. - Value []*ExpressRouteCircuit `json:"value,omitempty"` -} - -// ExpressRouteCircuitPeering - Peering in an ExpressRouteCircuit resource. -type ExpressRouteCircuitPeering struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the express route circuit peering. - Properties *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRouteCircuitPeeringConfig - Specifies the peering configuration. -type ExpressRouteCircuitPeeringConfig struct { - // The communities of bgp peering. Specified for microsoft peering. - AdvertisedCommunities []*string `json:"advertisedCommunities,omitempty"` - - // The reference to AdvertisedPublicPrefixes. - AdvertisedPublicPrefixes []*string `json:"advertisedPublicPrefixes,omitempty"` - - // The CustomerASN of the peering. - CustomerASN *int32 `json:"customerASN,omitempty"` - - // The legacy mode of the peering. - LegacyMode *int32 `json:"legacyMode,omitempty"` - - // The RoutingRegistryName of the configuration. - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` - - // READ-ONLY; The advertised public prefix state of the Peering resource. - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty" azure:"ro"` -} - -// ExpressRouteCircuitPeeringID - ExpressRoute circuit peering identifier. -type ExpressRouteCircuitPeeringID struct { - // The ID of the ExpressRoute circuit peering. - ID *string `json:"id,omitempty"` -} - -// ExpressRouteCircuitPeeringListResult - Response for ListPeering API service call retrieves all peerings that belong to -// an ExpressRouteCircuit. -type ExpressRouteCircuitPeeringListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The peerings in an express route circuit. - Value []*ExpressRouteCircuitPeering `json:"value,omitempty"` -} - -// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering. -type ExpressRouteCircuitPeeringPropertiesFormat struct { - // The Azure ASN. - AzureASN *int32 `json:"azureASN,omitempty"` - - // The list of circuit connections associated with Azure Private Peering for this circuit. - Connections []*ExpressRouteCircuitConnection `json:"connections,omitempty"` - - // The ExpressRoute connection. - ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"` - - // The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - - // The IPv6 peering configuration. - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - - // The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - - // The peer ASN. - PeerASN *int64 `json:"peerASN,omitempty"` - - // The peering type. - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - - // The primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - - // The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - - // The reference to the RouteFilter resource. - RouteFilter *SubResource `json:"routeFilter,omitempty"` - - // The secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - - // The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - - // The shared key. - SharedKey *string `json:"sharedKey,omitempty"` - - // The peering state. - State *ExpressRoutePeeringState `json:"state,omitempty"` - - // The peering stats of express route circuit. - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - - // The VLAN ID. - VlanID *int32 `json:"vlanId,omitempty"` - - // READ-ONLY; Who was the last to modify the peering. - LastModifiedBy *string `json:"lastModifiedBy,omitempty" azure:"ro"` - - // READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit. - PeeredConnections []*PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the express route circuit peering resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginDelete -// method. -type ExpressRouteCircuitPeeringsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.Get -// method. -type ExpressRouteCircuitPeeringsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.List -// method. -type ExpressRouteCircuitPeeringsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitPropertiesFormat - Properties of ExpressRouteCircuit. -type ExpressRouteCircuitPropertiesFormat struct { - // Allow classic operations. - AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` - - // The authorizationKey. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - - // The list of authorizations. - Authorizations []*ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` - - // The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. - BandwidthInGbps *float32 `json:"bandwidthInGbps,omitempty"` - - // The CircuitProvisioningState state of the resource. - CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` - - // The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. - ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"` - - // The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - - // Flag denoting global reach status. - GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"` - - // The list of peerings. - Peerings []*ExpressRouteCircuitPeering `json:"peerings,omitempty"` - - // The ServiceKey. - ServiceKey *string `json:"serviceKey,omitempty"` - - // The ServiceProviderNotes. - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - - // The ServiceProviderProperties. - ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` - - // The ServiceProviderProvisioningState state of the resource. - ServiceProviderProvisioningState *ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` - - // READ-ONLY; The provisioning state of the express route circuit resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation. - Stag *int32 `json:"stag,omitempty" azure:"ro"` -} - -// ExpressRouteCircuitReference - Reference to an express route circuit. -type ExpressRouteCircuitReference struct { - // Corresponding Express Route Circuit Id. - ID *string `json:"id,omitempty"` -} - -// ExpressRouteCircuitRoutesTable - The routes table associated with the ExpressRouteCircuit. -type ExpressRouteCircuitRoutesTable struct { - // Local preference value as set with the set local-preference route-map configuration command. - LocPrf *string `json:"locPrf,omitempty"` - - // IP address of a network entity. - Network *string `json:"network,omitempty"` - - // NextHop address. - NextHop *string `json:"nextHop,omitempty"` - - // Autonomous system paths to the destination network. - Path *string `json:"path,omitempty"` - - // Route Weight. - Weight *int32 `json:"weight,omitempty"` -} - -// ExpressRouteCircuitRoutesTableSummary - The routes table associated with the ExpressRouteCircuit. -type ExpressRouteCircuitRoutesTableSummary struct { - // Autonomous system number. - As *int32 `json:"as,omitempty"` - - // IP address of the neighbor. - Neighbor *string `json:"neighbor,omitempty"` - - // Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. - StatePfxRcd *string `json:"statePfxRcd,omitempty"` - - // The length of time that the BGP session has been in the Established state, or the current status if not in the Established - // state. - UpDown *string `json:"upDown,omitempty"` - - // BGP version number spoken to the neighbor. - V *int32 `json:"v,omitempty"` -} - -// ExpressRouteCircuitSKU - Contains SKU in an ExpressRouteCircuit. -type ExpressRouteCircuitSKU struct { - // The family of the SKU. - Family *ExpressRouteCircuitSKUFamily `json:"family,omitempty"` - - // The name of the SKU. - Name *string `json:"name,omitempty"` - - // The tier of the SKU. - Tier *ExpressRouteCircuitSKUTier `json:"tier,omitempty"` -} - -// ExpressRouteCircuitServiceProviderProperties - Contains ServiceProviderProperties in an ExpressRouteCircuit. -type ExpressRouteCircuitServiceProviderProperties struct { - // The BandwidthInMbps. - BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` - - // The peering location. - PeeringLocation *string `json:"peeringLocation,omitempty"` - - // The serviceProviderName. - ServiceProviderName *string `json:"serviceProviderName,omitempty"` -} - -// ExpressRouteCircuitStats - Contains stats associated with the peering. -type ExpressRouteCircuitStats struct { - // The Primary BytesIn of the peering. - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - - // The primary BytesOut of the peering. - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - - // The secondary BytesIn of the peering. - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - - // The secondary BytesOut of the peering. - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} - -// ExpressRouteCircuitsArpTableListResult - Response for ListArpTable associated with the Express Route Circuits API. -type ExpressRouteCircuitsArpTableListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of the ARP tables. - Value []*ExpressRouteCircuitArpTable `json:"value,omitempty"` -} - -// ExpressRouteCircuitsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCircuitsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginDelete -// method. -type ExpressRouteCircuitsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListArpTable -// method. -type ExpressRouteCircuitsClientBeginListArpTableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTable -// method. -type ExpressRouteCircuitsClientBeginListRoutesTableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTableSummary -// method. -type ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitsClientGetOptions contains the optional parameters for the ExpressRouteCircuitsClient.Get method. -type ExpressRouteCircuitsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsClientGetPeeringStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetPeeringStats -// method. -type ExpressRouteCircuitsClientGetPeeringStatsOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsClientGetStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetStats -// method. -type ExpressRouteCircuitsClientGetStatsOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.ListAll method. -type ExpressRouteCircuitsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.List method. -type ExpressRouteCircuitsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCircuitsClient.UpdateTags -// method. -type ExpressRouteCircuitsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsRoutesTableListResult - Response for ListRoutesTable associated with the Express Route Circuits API. -type ExpressRouteCircuitsRoutesTableListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The list of routes table. - Value []*ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} - -// ExpressRouteCircuitsRoutesTableSummaryListResult - Response for ListRoutesTable associated with the Express Route Circuits -// API. -type ExpressRouteCircuitsRoutesTableSummaryListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of the routes table. - Value []*ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` -} - -// ExpressRouteConnection resource. -type ExpressRouteConnection struct { - // REQUIRED; The name of the resource. - Name *string `json:"name,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Properties of the express route connection. - Properties *ExpressRouteConnectionProperties `json:"properties,omitempty"` -} - -// ExpressRouteConnectionID - The ID of the ExpressRouteConnection. -type ExpressRouteConnectionID struct { - // READ-ONLY; The ID of the ExpressRouteConnection. - ID *string `json:"id,omitempty" azure:"ro"` -} - -// ExpressRouteConnectionList - ExpressRouteConnection list. -type ExpressRouteConnectionList struct { - // The list of ExpressRoute connections. - Value []*ExpressRouteConnection `json:"value,omitempty"` -} - -// ExpressRouteConnectionProperties - Properties of the ExpressRouteConnection subresource. -type ExpressRouteConnectionProperties struct { - // REQUIRED; The ExpressRoute circuit peering. - ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"` - - // Authorization key to establish the connection. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - - // Enable internet security. - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - - // Enable FastPath to vWan Firewall hub. - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - - // The Routing Configuration indicating the associated and propagated route tables on this connection. - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - - // The routing weight associated to the connection. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - - // READ-ONLY; The provisioning state of the express route connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ExpressRouteConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginCreateOrUpdate -// method. -type ExpressRouteConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginDelete -// method. -type ExpressRouteConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteConnectionsClientGetOptions contains the optional parameters for the ExpressRouteConnectionsClient.Get method. -type ExpressRouteConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteConnectionsClientListOptions contains the optional parameters for the ExpressRouteConnectionsClient.List method. -type ExpressRouteConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnection resource. -type ExpressRouteCrossConnection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the express route cross connection. - Properties *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRouteCrossConnectionListResult - Response for ListExpressRouteCrossConnection API service call. -type ExpressRouteCrossConnectionListResult struct { - // A list of ExpressRouteCrossConnection resources. - Value []*ExpressRouteCrossConnection `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ExpressRouteCrossConnectionPeering - Peering in an ExpressRoute Cross Connection resource. -type ExpressRouteCrossConnectionPeering struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the express route cross connection peering. - Properties *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// ExpressRouteCrossConnectionPeeringList - Response for ListPeering API service call retrieves all peerings that belong to -// an ExpressRouteCrossConnection. -type ExpressRouteCrossConnectionPeeringList struct { - // The peerings in an express route cross connection. - Value []*ExpressRouteCrossConnectionPeering `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ExpressRouteCrossConnectionPeeringProperties - Properties of express route cross connection peering. -type ExpressRouteCrossConnectionPeeringProperties struct { - // The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - - // The IPv6 peering configuration. - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - - // The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - - // The peer ASN. - PeerASN *int64 `json:"peerASN,omitempty"` - - // The peering type. - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - - // The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - - // The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - - // The shared key. - SharedKey *string `json:"sharedKey,omitempty"` - - // The peering state. - State *ExpressRoutePeeringState `json:"state,omitempty"` - - // The VLAN ID. - VlanID *int32 `json:"vlanId,omitempty"` - - // READ-ONLY; The Azure ASN. - AzureASN *int32 `json:"azureASN,omitempty" azure:"ro"` - - // READ-ONLY; Who was the last to modify the peering. - LastModifiedBy *string `json:"lastModifiedBy,omitempty" azure:"ro"` - - // READ-ONLY; The primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the express route cross connection peering resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty" azure:"ro"` -} - -// ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginDelete -// method. -type ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.Get -// method. -type ExpressRouteCrossConnectionPeeringsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.List -// method. -type ExpressRouteCrossConnectionPeeringsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnectionProperties - Properties of ExpressRouteCrossConnection. -type ExpressRouteCrossConnectionProperties struct { - // The ExpressRouteCircuit. - ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"` - - // The list of peerings. - Peerings []*ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` - - // Additional read only notes set by the connectivity provider. - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - - // The provisioning state of the circuit in the connectivity provider system. - ServiceProviderProvisioningState *ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` - - // READ-ONLY; The circuit bandwidth In Mbps. - BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty" azure:"ro"` - - // READ-ONLY; The peering location of the ExpressRoute circuit. - PeeringLocation *string `json:"peeringLocation,omitempty" azure:"ro"` - - // READ-ONLY; The name of the primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the express route cross connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The identifier of the circuit traffic. - STag *int32 `json:"sTag,omitempty" azure:"ro"` - - // READ-ONLY; The name of the secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty" azure:"ro"` -} - -// ExpressRouteCrossConnectionRoutesTableSummary - The routes table associated with the ExpressRouteCircuit. -type ExpressRouteCrossConnectionRoutesTableSummary struct { - // Autonomous system number. - Asn *int32 `json:"asn,omitempty"` - - // IP address of Neighbor router. - Neighbor *string `json:"neighbor,omitempty"` - - // Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. - StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"` - - // The length of time that the BGP session has been in the Established state, or the current status if not in the Established - // state. - UpDown *string `json:"upDown,omitempty"` -} - -// ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListArpTable -// method. -type ExpressRouteCrossConnectionsClientBeginListArpTableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTable -// method. -type ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary -// method. -type ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.Get -// method. -type ExpressRouteCrossConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.ListByResourceGroup -// method. -type ExpressRouteCrossConnectionsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.List -// method. -type ExpressRouteCrossConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnectionsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.UpdateTags -// method. -type ExpressRouteCrossConnectionsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnectionsRoutesTableSummaryListResult - Response for ListRoutesTable associated with the Express Route -// Cross Connections. -type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { - // A list of the routes table. - Value []*ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ExpressRouteGateway - ExpressRoute gateway resource. -type ExpressRouteGateway struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the express route gateway. - Properties *ExpressRouteGatewayProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRouteGatewayList - List of ExpressRoute gateways. -type ExpressRouteGatewayList struct { - // List of ExpressRoute gateways. - Value []*ExpressRouteGateway `json:"value,omitempty"` -} - -// ExpressRouteGatewayProperties - ExpressRoute gateway resource properties. -type ExpressRouteGatewayProperties struct { - // REQUIRED; The Virtual Hub where the ExpressRoute gateway is or will be deployed. - VirtualHub *VirtualHubID `json:"virtualHub,omitempty"` - - // Configuration for auto scaling. - AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"` - - // List of ExpressRoute connections to the ExpressRoute gateway. - ExpressRouteConnections []*ExpressRouteConnection `json:"expressRouteConnections,omitempty"` - - // READ-ONLY; The provisioning state of the express route gateway resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ExpressRouteGatewayPropertiesAutoScaleConfiguration - Configuration for auto scaling. -type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct { - // Minimum and maximum number of scale units to deploy. - Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"` -} - -// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds - Minimum and maximum number of scale units to deploy. -type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct { - // Maximum number of scale units deployed for ExpressRoute gateway. - Max *int32 `json:"max,omitempty"` - - // Minimum number of scale units deployed for ExpressRoute gateway. - Min *int32 `json:"min,omitempty"` -} - -// ExpressRouteGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginCreateOrUpdate -// method. -type ExpressRouteGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteGatewaysClientBeginDeleteOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginDelete -// method. -type ExpressRouteGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginUpdateTags -// method. -type ExpressRouteGatewaysClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteGatewaysClientGetOptions contains the optional parameters for the ExpressRouteGatewaysClient.Get method. -type ExpressRouteGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteGatewaysClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListByResourceGroup -// method. -type ExpressRouteGatewaysClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteGatewaysClientListBySubscriptionOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListBySubscription -// method. -type ExpressRouteGatewaysClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteLink child resource definition. -type ExpressRouteLink struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of child port resource that is unique among child port resources of the parent. - Name *string `json:"name,omitempty"` - - // ExpressRouteLink properties. - Properties *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// ExpressRouteLinkListResult - Response for ListExpressRouteLinks API service call. -type ExpressRouteLinkListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The list of ExpressRouteLink sub-resources. - Value []*ExpressRouteLink `json:"value,omitempty"` -} - -// ExpressRouteLinkMacSecConfig - ExpressRouteLink Mac Security Configuration. -type ExpressRouteLinkMacSecConfig struct { - // Keyvault Secret Identifier URL containing Mac security CAK key. - CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"` - - // Mac security cipher. - Cipher *ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"` - - // Keyvault Secret Identifier URL containing Mac security CKN key. - CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"` - - // Sci mode enabled/disabled. - SciState *ExpressRouteLinkMacSecSciState `json:"sciState,omitempty"` -} - -// ExpressRouteLinkPropertiesFormat - Properties specific to ExpressRouteLink resources. -type ExpressRouteLinkPropertiesFormat struct { - // Administrative state of the physical port. - AdminState *ExpressRouteLinkAdminState `json:"adminState,omitempty"` - - // MacSec configuration. - MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"` - - // READ-ONLY; Physical fiber port type. - ConnectorType *ExpressRouteLinkConnectorType `json:"connectorType,omitempty" azure:"ro"` - - // READ-ONLY; Name of Azure router interface. - InterfaceName *string `json:"interfaceName,omitempty" azure:"ro"` - - // READ-ONLY; Mapping between physical port to patch panel port. - PatchPanelID *string `json:"patchPanelId,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the express route link resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Mapping of physical patch panel to rack. - RackID *string `json:"rackId,omitempty" azure:"ro"` - - // READ-ONLY; Name of Azure router associated with physical port. - RouterName *string `json:"routerName,omitempty" azure:"ro"` -} - -// ExpressRouteLinksClientGetOptions contains the optional parameters for the ExpressRouteLinksClient.Get method. -type ExpressRouteLinksClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.List method. -type ExpressRouteLinksClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePort resource definition. -type ExpressRoutePort struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The identity of ExpressRoutePort, if configured. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // ExpressRoutePort properties. - Properties *ExpressRoutePortPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRoutePortAuthorization - ExpressRoutePort Authorization resource definition. -type ExpressRoutePortAuthorization struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // ExpressRoutePort properties. - Properties *ExpressRoutePortAuthorizationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRoutePortAuthorizationListResult - Response for ListExpressRoutePortAuthorizations API service call. -type ExpressRoutePortAuthorizationListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The authorizations in an ExpressRoute Port. - Value []*ExpressRoutePortAuthorization `json:"value,omitempty"` -} - -// ExpressRoutePortAuthorizationPropertiesFormat - Properties of ExpressRoutePort Authorization. -type ExpressRoutePortAuthorizationPropertiesFormat struct { - // READ-ONLY; The authorization key. - AuthorizationKey *string `json:"authorizationKey,omitempty" azure:"ro"` - - // READ-ONLY; The authorization use status. - AuthorizationUseStatus *ExpressRoutePortAuthorizationUseStatus `json:"authorizationUseStatus,omitempty" azure:"ro"` - - // READ-ONLY; The reference to the ExpressRoute circuit resource using the authorization. - CircuitResourceURI *string `json:"circuitResourceUri,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the authorization resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate -// method. -type ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRoutePortAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginDelete -// method. -type ExpressRoutePortAuthorizationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRoutePortAuthorizationsClientGetOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.Get -// method. -type ExpressRoutePortAuthorizationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortAuthorizationsClientListOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.List -// method. -type ExpressRoutePortAuthorizationsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortListResult - Response for ListExpressRoutePorts API service call. -type ExpressRoutePortListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of ExpressRoutePort resources. - Value []*ExpressRoutePort `json:"value,omitempty"` -} - -// ExpressRoutePortPropertiesFormat - Properties specific to ExpressRoutePort resources. -type ExpressRoutePortPropertiesFormat struct { - // Bandwidth of procured ports in Gbps. - BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"` - - // Encapsulation method on physical ports. - Encapsulation *ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"` - - // The set of physical links of the ExpressRoutePort resource. - Links []*ExpressRouteLink `json:"links,omitempty"` - - // The name of the peering location that the ExpressRoutePort is mapped to physically. - PeeringLocation *string `json:"peeringLocation,omitempty"` - - // READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization. - AllocationDate *string `json:"allocationDate,omitempty" azure:"ro"` - - // READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. - Circuits []*SubResource `json:"circuits,omitempty" azure:"ro"` - - // READ-ONLY; Ether type of the physical port. - EtherType *string `json:"etherType,omitempty" azure:"ro"` - - // READ-ONLY; Maximum transmission unit of the physical port pair(s). - Mtu *string `json:"mtu,omitempty" azure:"ro"` - - // READ-ONLY; Aggregate Gbps of associated circuit bandwidths. - ProvisionedBandwidthInGbps *float32 `json:"provisionedBandwidthInGbps,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the express route port resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the express route port resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// ExpressRoutePortsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortsClient.BeginCreateOrUpdate -// method. -type ExpressRoutePortsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRoutePortsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortsClient.BeginDelete -// method. -type ExpressRoutePortsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRoutePortsClientGenerateLOAOptions contains the optional parameters for the ExpressRoutePortsClient.GenerateLOA -// method. -type ExpressRoutePortsClientGenerateLOAOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsClientGetOptions contains the optional parameters for the ExpressRoutePortsClient.Get method. -type ExpressRoutePortsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.ListByResourceGroup -// method. -type ExpressRoutePortsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.List method. -type ExpressRoutePortsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsClientUpdateTagsOptions contains the optional parameters for the ExpressRoutePortsClient.UpdateTags method. -type ExpressRoutePortsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsLocation - Definition of the ExpressRoutePorts peering location resource. -type ExpressRoutePortsLocation struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // ExpressRoutePort peering location properties. - Properties *ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRoutePortsLocationBandwidths - Real-time inventory of available ExpressRoute port bandwidths. -type ExpressRoutePortsLocationBandwidths struct { - // READ-ONLY; Bandwidth descriptive name. - OfferName *string `json:"offerName,omitempty" azure:"ro"` - - // READ-ONLY; Bandwidth value in Gbps. - ValueInGbps *int32 `json:"valueInGbps,omitempty" azure:"ro"` -} - -// ExpressRoutePortsLocationListResult - Response for ListExpressRoutePortsLocations API service call. -type ExpressRoutePortsLocationListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The list of all ExpressRoutePort peering locations. - Value []*ExpressRoutePortsLocation `json:"value,omitempty"` -} - -// ExpressRoutePortsLocationPropertiesFormat - Properties specific to ExpressRoutePorts peering location resources. -type ExpressRoutePortsLocationPropertiesFormat struct { - // The inventory of available ExpressRoutePort bandwidths. - AvailableBandwidths []*ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"` - - // READ-ONLY; Address of peering location. - Address *string `json:"address,omitempty" azure:"ro"` - - // READ-ONLY; Contact details of peering locations. - Contact *string `json:"contact,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the express route port location resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ExpressRoutePortsLocationsClientGetOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.Get -// method. -type ExpressRoutePortsLocationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.List -// method. -type ExpressRoutePortsLocationsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteProviderPort resource. -type ExpressRouteProviderPort struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the express route Service Provider Port. - Properties *ExpressRouteProviderPortProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRouteProviderPortListResult - Response for ListExpressRouteProviderPort API service call. -type ExpressRouteProviderPortListResult struct { - // A list of ExpressRouteProviderPort resources. - Value []*ExpressRouteProviderPort `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ExpressRouteProviderPortProperties - Properties of ExpressRouteProviderPort. -type ExpressRouteProviderPortProperties struct { - // Overprovisioning factor for the port pair. - OverprovisionFactor *int32 `json:"overprovisionFactor,omitempty"` - - // The peering location of the port pair. - PeeringLocation *string `json:"peeringLocation,omitempty"` - - // Bandwidth of the port in Mbps - PortBandwidthInMbps *int32 `json:"portBandwidthInMbps,omitempty"` - - // Remaining Bandwidth of the port in Mbps - RemainingBandwidthInMbps *int32 `json:"remainingBandwidthInMbps,omitempty"` - - // Used Bandwidth of the port in Mbps - UsedBandwidthInMbps *int32 `json:"usedBandwidthInMbps,omitempty"` - - // READ-ONLY; The name of the port pair. - PortPairDescriptor *string `json:"portPairDescriptor,omitempty" azure:"ro"` - - // READ-ONLY; The name of the primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty" azure:"ro"` - - // READ-ONLY; The name of the secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty" azure:"ro"` -} - -// ExpressRouteProviderPortsLocationClientListOptions contains the optional parameters for the ExpressRouteProviderPortsLocationClient.List -// method. -type ExpressRouteProviderPortsLocationClientListOptions struct { - // The filter to apply on the operation. For example, you can use $filter=location eq '{state}'. - Filter *string -} - -// ExpressRouteServiceProvider - A ExpressRouteResourceProvider object. -type ExpressRouteServiceProvider struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the express route service provider. - Properties *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ExpressRouteServiceProviderBandwidthsOffered - Contains bandwidths offered in ExpressRouteServiceProvider resources. -type ExpressRouteServiceProviderBandwidthsOffered struct { - // The OfferName. - OfferName *string `json:"offerName,omitempty"` - - // The ValueInMbps. - ValueInMbps *int32 `json:"valueInMbps,omitempty"` -} - -// ExpressRouteServiceProviderListResult - Response for the ListExpressRouteServiceProvider API service call. -type ExpressRouteServiceProviderListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of ExpressRouteResourceProvider resources. - Value []*ExpressRouteServiceProvider `json:"value,omitempty"` -} - -// ExpressRouteServiceProviderPropertiesFormat - Properties of ExpressRouteServiceProvider. -type ExpressRouteServiceProviderPropertiesFormat struct { - // A list of bandwidths offered. - BandwidthsOffered []*ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` - - // A list of peering locations. - PeeringLocations []*string `json:"peeringLocations,omitempty"` - - // READ-ONLY; The provisioning state of the express route service provider resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.List -// method. -type ExpressRouteServiceProvidersClientListOptions struct { - // placeholder for future optional parameters -} - -// ExtendedLocation complex type. -type ExtendedLocation struct { - // The name of the extended location. - Name *string `json:"name,omitempty"` - - // The type of the extended location. - Type *ExtendedLocationTypes `json:"type,omitempty"` -} - -// FilterItems - Will contain the filter name and values to operate on -type FilterItems struct { - // The name of the field we would like to filter - Field *string `json:"field,omitempty"` - - // List of values to filter the current field by - Values []*string `json:"values,omitempty"` -} - -// FirewallPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPoliciesClient.BeginCreateOrUpdate -// method. -type FirewallPoliciesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the FirewallPoliciesClient.BeginDelete method. -type FirewallPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FirewallPoliciesClientGetOptions contains the optional parameters for the FirewallPoliciesClient.Get method. -type FirewallPoliciesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.ListAll method. -type FirewallPoliciesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.List method. -type FirewallPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - -// FirewallPoliciesClientUpdateTagsOptions contains the optional parameters for the FirewallPoliciesClient.UpdateTags method. -type FirewallPoliciesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicy Resource. -type FirewallPolicy struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The identity of the firewall policy. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the firewall policy. - Properties *FirewallPolicyPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// FirewallPolicyCertificateAuthority - Trusted Root certificates properties for tls. -type FirewallPolicyCertificateAuthority struct { - // Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. - KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` - - // Name of the CA certificate. - Name *string `json:"name,omitempty"` -} - -// FirewallPolicyFilterRuleCollection - Firewall Policy Filter Rule Collection. -type FirewallPolicyFilterRuleCollection struct { - // REQUIRED; The type of the rule collection. - RuleCollectionType *FirewallPolicyRuleCollectionType `json:"ruleCollectionType,omitempty"` - - // The action type of a Filter rule collection. - Action *FirewallPolicyFilterRuleCollectionAction `json:"action,omitempty"` - - // The name of the rule collection. - Name *string `json:"name,omitempty"` - - // Priority of the Firewall Policy Rule Collection resource. - Priority *int32 `json:"priority,omitempty"` - - // List of rules included in a rule collection. - Rules []FirewallPolicyRuleClassification `json:"rules,omitempty"` -} - -// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyFilterRuleCollection. -func (f *FirewallPolicyFilterRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { - return &FirewallPolicyRuleCollection{ - RuleCollectionType: f.RuleCollectionType, - Name: f.Name, - Priority: f.Priority, - } -} - -// FirewallPolicyFilterRuleCollectionAction - Properties of the FirewallPolicyFilterRuleCollectionAction. -type FirewallPolicyFilterRuleCollectionAction struct { - // The type of action. - Type *FirewallPolicyFilterRuleCollectionActionType `json:"type,omitempty"` -} - -// FirewallPolicyIdpsSignaturesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesClient.List -// method. -type FirewallPolicyIdpsSignaturesClientListOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyIdpsSignaturesFilterValuesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesFilterValuesClient.List -// method. -type FirewallPolicyIdpsSignaturesFilterValuesClientListOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyIdpsSignaturesOverridesClientGetOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Get -// method. -type FirewallPolicyIdpsSignaturesOverridesClientGetOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyIdpsSignaturesOverridesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.List -// method. -type FirewallPolicyIdpsSignaturesOverridesClientListOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyIdpsSignaturesOverridesClientPatchOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Patch -// method. -type FirewallPolicyIdpsSignaturesOverridesClientPatchOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyIdpsSignaturesOverridesClientPutOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Put -// method. -type FirewallPolicyIdpsSignaturesOverridesClientPutOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyInsights - Firewall Policy Insights. -type FirewallPolicyInsights struct { - // A flag to indicate if the insights are enabled on the policy. - IsEnabled *bool `json:"isEnabled,omitempty"` - - // Workspaces needed to configure the Firewall Policy Insights. - LogAnalyticsResources *FirewallPolicyLogAnalyticsResources `json:"logAnalyticsResources,omitempty"` - - // Number of days the insights should be enabled on the policy. - RetentionDays *int32 `json:"retentionDays,omitempty"` -} - -// FirewallPolicyIntrusionDetection - Configuration for intrusion detection mode and rules. -type FirewallPolicyIntrusionDetection struct { - // Intrusion detection configuration properties. - Configuration *FirewallPolicyIntrusionDetectionConfiguration `json:"configuration,omitempty"` - - // Intrusion detection general state. - Mode *FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"` -} - -// FirewallPolicyIntrusionDetectionBypassTrafficSpecifications - Intrusion detection bypass traffic specification. -type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications struct { - // Description of the bypass traffic rule. - Description *string `json:"description,omitempty"` - - // List of destination IP addresses or ranges for this rule. - DestinationAddresses []*string `json:"destinationAddresses,omitempty"` - - // List of destination IpGroups for this rule. - DestinationIPGroups []*string `json:"destinationIpGroups,omitempty"` - - // List of destination ports or ranges. - DestinationPorts []*string `json:"destinationPorts,omitempty"` - - // Name of the bypass traffic rule. - Name *string `json:"name,omitempty"` - - // The rule bypass protocol. - Protocol *FirewallPolicyIntrusionDetectionProtocol `json:"protocol,omitempty"` - - // List of source IP addresses or ranges for this rule. - SourceAddresses []*string `json:"sourceAddresses,omitempty"` - - // List of source IpGroups for this rule. - SourceIPGroups []*string `json:"sourceIpGroups,omitempty"` -} - -// FirewallPolicyIntrusionDetectionConfiguration - The operation for configuring intrusion detection. -type FirewallPolicyIntrusionDetectionConfiguration struct { - // List of rules for traffic to bypass. - BypassTrafficSettings []*FirewallPolicyIntrusionDetectionBypassTrafficSpecifications `json:"bypassTrafficSettings,omitempty"` - - // IDPS Private IP address ranges are used to identify traffic direction (i.e. inbound, outbound, etc.). By default, only - // ranges defined by IANA RFC 1918 are considered private IP addresses. To modify - // default ranges, specify your Private IP address ranges with this property - PrivateRanges []*string `json:"privateRanges,omitempty"` - - // List of specific signatures states. - SignatureOverrides []*FirewallPolicyIntrusionDetectionSignatureSpecification `json:"signatureOverrides,omitempty"` -} - -// FirewallPolicyIntrusionDetectionSignatureSpecification - Intrusion detection signatures specification states. -type FirewallPolicyIntrusionDetectionSignatureSpecification struct { - // Signature id. - ID *string `json:"id,omitempty"` - - // The signature state. - Mode *FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"` -} - -// FirewallPolicyListResult - Response for ListFirewallPolicies API service call. -type FirewallPolicyListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Firewall Policies in a resource group. - Value []*FirewallPolicy `json:"value,omitempty"` -} - -// FirewallPolicyLogAnalyticsResources - Log Analytics Resources for Firewall Policy Insights. -type FirewallPolicyLogAnalyticsResources struct { - // The default workspace Id for Firewall Policy Insights. - DefaultWorkspaceID *SubResource `json:"defaultWorkspaceId,omitempty"` - - // List of workspaces for Firewall Policy Insights. - Workspaces []*FirewallPolicyLogAnalyticsWorkspace `json:"workspaces,omitempty"` -} - -// FirewallPolicyLogAnalyticsWorkspace - Log Analytics Workspace for Firewall Policy Insights. -type FirewallPolicyLogAnalyticsWorkspace struct { - // Region to configure the Workspace. - Region *string `json:"region,omitempty"` - - // The workspace Id for Firewall Policy Insights. - WorkspaceID *SubResource `json:"workspaceId,omitempty"` -} - -// FirewallPolicyNatRuleCollection - Firewall Policy NAT Rule Collection. -type FirewallPolicyNatRuleCollection struct { - // REQUIRED; The type of the rule collection. - RuleCollectionType *FirewallPolicyRuleCollectionType `json:"ruleCollectionType,omitempty"` - - // The action type of a Nat rule collection. - Action *FirewallPolicyNatRuleCollectionAction `json:"action,omitempty"` - - // The name of the rule collection. - Name *string `json:"name,omitempty"` - - // Priority of the Firewall Policy Rule Collection resource. - Priority *int32 `json:"priority,omitempty"` - - // List of rules included in a rule collection. - Rules []FirewallPolicyRuleClassification `json:"rules,omitempty"` -} - -// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyNatRuleCollection. -func (f *FirewallPolicyNatRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { - return &FirewallPolicyRuleCollection{ - RuleCollectionType: f.RuleCollectionType, - Name: f.Name, - Priority: f.Priority, - } -} - -// FirewallPolicyNatRuleCollectionAction - Properties of the FirewallPolicyNatRuleCollectionAction. -type FirewallPolicyNatRuleCollectionAction struct { - // The type of action. - Type *FirewallPolicyNatRuleCollectionActionType `json:"type,omitempty"` -} - -// FirewallPolicyPropertiesFormat - Firewall Policy definition. -type FirewallPolicyPropertiesFormat struct { - // The parent firewall policy from which rules are inherited. - BasePolicy *SubResource `json:"basePolicy,omitempty"` - - // DNS Proxy Settings definition. - DNSSettings *DNSSettings `json:"dnsSettings,omitempty"` - - // Explicit Proxy Settings definition. - ExplicitProxySettings *ExplicitProxySettings `json:"explicitProxySettings,omitempty"` - - // Insights on Firewall Policy. - Insights *FirewallPolicyInsights `json:"insights,omitempty"` - - // The configuration for Intrusion detection. - IntrusionDetection *FirewallPolicyIntrusionDetection `json:"intrusionDetection,omitempty"` - - // The Firewall Policy SKU. - SKU *FirewallPolicySKU `json:"sku,omitempty"` - - // SQL Settings definition. - SQL *FirewallPolicySQL `json:"sql,omitempty"` - - // The private IP addresses/IP ranges to which traffic will not be SNAT. - Snat *FirewallPolicySNAT `json:"snat,omitempty"` - - // The operation mode for Threat Intelligence. - ThreatIntelMode *AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` - - // ThreatIntel Whitelist for Firewall Policy. - ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist `json:"threatIntelWhitelist,omitempty"` - - // TLS Configuration definition. - TransportSecurity *FirewallPolicyTransportSecurity `json:"transportSecurity,omitempty"` - - // READ-ONLY; List of references to Child Firewall Policies. - ChildPolicies []*SubResource `json:"childPolicies,omitempty" azure:"ro"` - - // READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with. - Firewalls []*SubResource `json:"firewalls,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the firewall policy resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; List of references to FirewallPolicyRuleCollectionGroups. - RuleCollectionGroups []*SubResource `json:"ruleCollectionGroups,omitempty" azure:"ro"` -} - -// FirewallPolicyRuleClassification provides polymorphic access to related types. -// Call the interface's GetFirewallPolicyRule() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ApplicationRule, *FirewallPolicyRule, *NatRule, *Rule -type FirewallPolicyRuleClassification interface { - // GetFirewallPolicyRule returns the FirewallPolicyRule content of the underlying type. - GetFirewallPolicyRule() *FirewallPolicyRule -} - -// FirewallPolicyRule - Properties of a rule. -type FirewallPolicyRule struct { - // REQUIRED; Rule Type. - RuleType *FirewallPolicyRuleType `json:"ruleType,omitempty"` - - // Description of the rule. - Description *string `json:"description,omitempty"` - - // Name of the rule. - Name *string `json:"name,omitempty"` -} - -// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type FirewallPolicyRule. -func (f *FirewallPolicyRule) GetFirewallPolicyRule() *FirewallPolicyRule { return f } - -// FirewallPolicyRuleApplicationProtocol - Properties of the application rule protocol. -type FirewallPolicyRuleApplicationProtocol struct { - // Port number for the protocol, cannot be greater than 64000. - Port *int32 `json:"port,omitempty"` - - // Protocol type. - ProtocolType *FirewallPolicyRuleApplicationProtocolType `json:"protocolType,omitempty"` -} - -// FirewallPolicyRuleCollectionClassification provides polymorphic access to related types. -// Call the interface's GetFirewallPolicyRuleCollection() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *FirewallPolicyFilterRuleCollection, *FirewallPolicyNatRuleCollection, *FirewallPolicyRuleCollection -type FirewallPolicyRuleCollectionClassification interface { - // GetFirewallPolicyRuleCollection returns the FirewallPolicyRuleCollection content of the underlying type. - GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection -} - -// FirewallPolicyRuleCollection - Properties of the rule collection. -type FirewallPolicyRuleCollection struct { - // REQUIRED; The type of the rule collection. - RuleCollectionType *FirewallPolicyRuleCollectionType `json:"ruleCollectionType,omitempty"` - - // The name of the rule collection. - Name *string `json:"name,omitempty"` - - // Priority of the Firewall Policy Rule Collection resource. - Priority *int32 `json:"priority,omitempty"` -} - -// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyRuleCollection. -func (f *FirewallPolicyRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { - return f -} - -// FirewallPolicyRuleCollectionGroup - Rule Collection Group resource. -type FirewallPolicyRuleCollectionGroup struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // The properties of the firewall policy rule collection group. - Properties *FirewallPolicyRuleCollectionGroupProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Rule Group type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// FirewallPolicyRuleCollectionGroupListResult - Response for ListFirewallPolicyRuleCollectionGroups API service call. -type FirewallPolicyRuleCollectionGroupListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy. - Value []*FirewallPolicyRuleCollectionGroup `json:"value,omitempty"` -} - -// FirewallPolicyRuleCollectionGroupProperties - Properties of the rule collection group. -type FirewallPolicyRuleCollectionGroupProperties struct { - // Priority of the Firewall Policy Rule Collection Group resource. - Priority *int32 `json:"priority,omitempty"` - - // Group of Firewall Policy rule collections. - RuleCollections []FirewallPolicyRuleCollectionClassification `json:"ruleCollections,omitempty"` - - // READ-ONLY; The provisioning state of the firewall policy rule collection group resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate -// method. -type FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginDelete -// method. -type FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FirewallPolicyRuleCollectionGroupsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.Get -// method. -type FirewallPolicyRuleCollectionGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.List -// method. -type FirewallPolicyRuleCollectionGroupsClientListOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicySKU - SKU of Firewall policy. -type FirewallPolicySKU struct { - // Tier of Firewall Policy. - Tier *FirewallPolicySKUTier `json:"tier,omitempty"` -} - -// FirewallPolicySNAT - The private IP addresses/IP ranges to which traffic will not be SNAT. -type FirewallPolicySNAT struct { - // The operation mode for automatically learning private ranges to not be SNAT - AutoLearnPrivateRanges *AutoLearnPrivateRangesMode `json:"autoLearnPrivateRanges,omitempty"` - - // List of private IP addresses/IP address ranges to not be SNAT. - PrivateRanges []*string `json:"privateRanges,omitempty"` -} - -// FirewallPolicySQL - SQL Settings in Firewall Policy. -type FirewallPolicySQL struct { - // A flag to indicate if SQL Redirect traffic filtering is enabled. Turning on the flag requires no rule using port 11000-11999. - AllowSQLRedirect *bool `json:"allowSqlRedirect,omitempty"` -} - -// FirewallPolicyThreatIntelWhitelist - ThreatIntel Whitelist for Firewall Policy. -type FirewallPolicyThreatIntelWhitelist struct { - // List of FQDNs for the ThreatIntel Whitelist. - Fqdns []*string `json:"fqdns,omitempty"` - - // List of IP addresses for the ThreatIntel Whitelist. - IPAddresses []*string `json:"ipAddresses,omitempty"` -} - -// FirewallPolicyTransportSecurity - Configuration needed to perform TLS termination & initiation. -type FirewallPolicyTransportSecurity struct { - // The CA used for intermediate CA generation. - CertificateAuthority *FirewallPolicyCertificateAuthority `json:"certificateAuthority,omitempty"` -} - -// FlowLog - A flow log resource. -type FlowLog struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the flow log. - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// FlowLogFormatParameters - Parameters that define the flow log format. -type FlowLogFormatParameters struct { - // The file type of flow log. - Type *FlowLogFormatType `json:"type,omitempty"` - - // The version (revision) of the flow log. - Version *int32 `json:"version,omitempty"` -} - -// FlowLogInformation - Information on the configuration of flow log and traffic analytics (optional) . -type FlowLogInformation struct { - // REQUIRED; Properties of the flow log. - Properties *FlowLogProperties `json:"properties,omitempty"` - - // REQUIRED; The ID of the resource to configure for flow log and traffic analytics (optional) . - TargetResourceID *string `json:"targetResourceId,omitempty"` - - // Parameters that define the configuration of traffic analytics. - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` -} - -// FlowLogListResult - List of flow logs. -type FlowLogListResult struct { - // Information about flow log resource. - Value []*FlowLog `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// FlowLogProperties - Parameters that define the configuration of flow log. -type FlowLogProperties struct { - // REQUIRED; Flag to enable/disable flow logging. - Enabled *bool `json:"enabled,omitempty"` - - // REQUIRED; ID of the storage account which is used to store the flow log. - StorageID *string `json:"storageId,omitempty"` - - // Parameters that define the flow log format. - Format *FlowLogFormatParameters `json:"format,omitempty"` - - // Parameters that define the retention policy for flow log. - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` -} - -// FlowLogPropertiesFormat - Parameters that define the configuration of flow log. -type FlowLogPropertiesFormat struct { - // REQUIRED; ID of the storage account which is used to store the flow log. - StorageID *string `json:"storageId,omitempty"` - - // REQUIRED; ID of network security group to which flow log will be applied. - TargetResourceID *string `json:"targetResourceId,omitempty"` - - // Flag to enable/disable flow logging. - Enabled *bool `json:"enabled,omitempty"` - - // Parameters that define the configuration of traffic analytics. - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - - // Parameters that define the flow log format. - Format *FlowLogFormatParameters `json:"format,omitempty"` - - // Parameters that define the retention policy for flow log. - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - - // READ-ONLY; The provisioning state of the flow log. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Guid of network security group to which flow log will be applied. - TargetResourceGUID *string `json:"targetResourceGuid,omitempty" azure:"ro"` -} - -// FlowLogStatusParameters - Parameters that define a resource to query flow log and traffic analytics (optional) status. -type FlowLogStatusParameters struct { - // REQUIRED; The target resource where getting the flow log and traffic analytics (optional) status. - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// FlowLogsClientBeginCreateOrUpdateOptions contains the optional parameters for the FlowLogsClient.BeginCreateOrUpdate method. -type FlowLogsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FlowLogsClientBeginDeleteOptions contains the optional parameters for the FlowLogsClient.BeginDelete method. -type FlowLogsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FlowLogsClientGetOptions contains the optional parameters for the FlowLogsClient.Get method. -type FlowLogsClientGetOptions struct { - // placeholder for future optional parameters -} - -// FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.List method. -type FlowLogsClientListOptions struct { - // placeholder for future optional parameters -} - -// FlowLogsClientUpdateTagsOptions contains the optional parameters for the FlowLogsClient.UpdateTags method. -type FlowLogsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// FrontendIPConfiguration - Frontend IP address of the load balancer. -type FrontendIPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name - // can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the load balancer probe. - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - - // A list of availability zones denoting the IP allocated for the resource needs to come from. - Zones []*string `json:"zones,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// FrontendIPConfigurationPropertiesFormat - Properties of Frontend IP Configuration of the load balancer. -type FrontendIPConfigurationPropertiesFormat struct { - // The reference to gateway load balancer frontend IP. - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - - // The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - - // Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - - // The Private IP allocation method. - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - - // The reference to the Public IP resource. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - - // The reference to the Public IP Prefix resource. - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - - // The reference to the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - - // READ-ONLY; An array of references to inbound pools that use this frontend IP. - InboundNatPools []*SubResource `json:"inboundNatPools,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to inbound rules that use this frontend IP. - InboundNatRules []*SubResource `json:"inboundNatRules,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to load balancing rules that use this frontend IP. - LoadBalancingRules []*SubResource `json:"loadBalancingRules,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to outbound rules that use this frontend IP. - OutboundRules []*SubResource `json:"outboundRules,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the frontend IP configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// GatewayCustomBgpIPAddressIPConfiguration - GatewayCustomBgpIpAddressIpConfiguration for a virtual network gateway connection. -type GatewayCustomBgpIPAddressIPConfiguration struct { - // REQUIRED; The custom BgpPeeringAddress which belongs to IpconfigurationId. - CustomBgpIPAddress *string `json:"customBgpIpAddress,omitempty"` - - // REQUIRED; The IpconfigurationId of ipconfiguration which belongs to gateway. - IPConfigurationID *string `json:"ipConfigurationId,omitempty"` -} - -// GatewayLoadBalancerTunnelInterface - Gateway load balancer tunnel interface of a load balancer backend address pool. -type GatewayLoadBalancerTunnelInterface struct { - // Identifier of gateway load balancer tunnel interface. - Identifier *int32 `json:"identifier,omitempty"` - - // Port of gateway load balancer tunnel interface. - Port *int32 `json:"port,omitempty"` - - // Protocol of gateway load balancer tunnel interface. - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - - // Traffic type of gateway load balancer tunnel interface. - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} - -// GatewayRoute - Gateway routing details. -type GatewayRoute struct { - // READ-ONLY; The route's AS path sequence. - AsPath *string `json:"asPath,omitempty" azure:"ro"` - - // READ-ONLY; The gateway's local address. - LocalAddress *string `json:"localAddress,omitempty" azure:"ro"` - - // READ-ONLY; The route's network prefix. - Network *string `json:"network,omitempty" azure:"ro"` - - // READ-ONLY; The route's next hop. - NextHop *string `json:"nextHop,omitempty" azure:"ro"` - - // READ-ONLY; The source this route was learned from. - Origin *string `json:"origin,omitempty" azure:"ro"` - - // READ-ONLY; The peer this route was learned from. - SourcePeer *string `json:"sourcePeer,omitempty" azure:"ro"` - - // READ-ONLY; The route's weight. - Weight *int32 `json:"weight,omitempty" azure:"ro"` -} - -// GatewayRouteListResult - List of virtual network gateway routes. -type GatewayRouteListResult struct { - // List of gateway routes. - Value []*GatewayRoute `json:"value,omitempty"` -} - -// GenerateExpressRoutePortsLOARequest - The customer name to be printed on a letter of authorization. -type GenerateExpressRoutePortsLOARequest struct { - // REQUIRED; The customer name. - CustomerName *string `json:"customerName,omitempty"` -} - -// GenerateExpressRoutePortsLOAResult - Response for GenerateExpressRoutePortsLOA API service call. -type GenerateExpressRoutePortsLOAResult struct { - // The content as a base64 encoded string. - EncodedContent *string `json:"encodedContent,omitempty"` -} - -// GetVPNSitesConfigurationRequest - List of Vpn-Sites. -type GetVPNSitesConfigurationRequest struct { - // REQUIRED; The sas-url to download the configurations for vpn-sites. - OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"` - - // List of resource-ids of the vpn-sites for which config is to be downloaded. - VPNSites []*string `json:"vpnSites,omitempty"` -} - -// Group - The network group resource -type Group struct { - // The Network Group properties - Properties *GroupProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GroupListResult - Result of the request to list NetworkGroup. It contains a list of groups and a URL link to get the next -// set of results. -type GroupListResult struct { - // Gets the URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // Gets a page of NetworkGroup - Value []*Group `json:"value,omitempty"` -} - -// GroupProperties - Properties of network group -type GroupProperties struct { - // A description of the network group. - Description *string `json:"description,omitempty"` - - // READ-ONLY; The provisioning state of the scope assignment resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// GroupsClientBeginDeleteOptions contains the optional parameters for the GroupsClient.BeginDelete method. -type GroupsClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GroupsClientCreateOrUpdateOptions contains the optional parameters for the GroupsClient.CreateOrUpdate method. -type GroupsClientCreateOrUpdateOptions struct { - // The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value - // to prevent accidentally overwriting concurrent changes. - IfMatch *string -} - -// GroupsClientGetOptions contains the optional parameters for the GroupsClient.Get method. -type GroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// GroupsClientListOptions contains the optional parameters for the GroupsClient.List method. -type GroupsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// HTTPConfiguration - HTTP configuration of the connectivity check. -type HTTPConfiguration struct { - // List of HTTP headers. - Headers []*HTTPHeader `json:"headers,omitempty"` - - // HTTP method. - Method *HTTPMethod `json:"method,omitempty"` - - // Valid status codes. - ValidStatusCodes []*int32 `json:"validStatusCodes,omitempty"` -} - -// HTTPHeader - The HTTP header. -type HTTPHeader struct { - // The name in HTTP header. - Name *string `json:"name,omitempty"` - - // The value in HTTP header. - Value *string `json:"value,omitempty"` -} - -// HopLink - Hop link. -type HopLink struct { - // Hop link properties. - Properties *HopLinkProperties `json:"properties,omitempty"` - - // READ-ONLY; Provides additional context on links. - Context map[string]*string `json:"context,omitempty" azure:"ro"` - - // READ-ONLY; List of issues. - Issues []*ConnectivityIssue `json:"issues,omitempty" azure:"ro"` - - // READ-ONLY; Link type. - LinkType *string `json:"linkType,omitempty" azure:"ro"` - - // READ-ONLY; The ID of the next hop. - NextHopID *string `json:"nextHopId,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ResourceID *string `json:"resourceId,omitempty" azure:"ro"` -} - -// HopLinkProperties - Hop link properties. -type HopLinkProperties struct { - // READ-ONLY; Average roundtrip time in milliseconds. - RoundTripTimeAvg *int64 `json:"roundTripTimeAvg,omitempty" azure:"ro"` - - // READ-ONLY; Maximum roundtrip time in milliseconds. - RoundTripTimeMax *int64 `json:"roundTripTimeMax,omitempty" azure:"ro"` - - // READ-ONLY; Minimum roundtrip time in milliseconds. - RoundTripTimeMin *int64 `json:"roundTripTimeMin,omitempty" azure:"ro"` -} - -// Hub Item. -type Hub struct { - // Resource Id. - ResourceID *string `json:"resourceId,omitempty"` - - // Resource Type. - ResourceType *string `json:"resourceType,omitempty"` -} - -// HubIPAddresses - IP addresses associated with azure firewall. -type HubIPAddresses struct { - // Private IP Address associated with azure firewall. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - - // Public IP addresses associated with azure firewall. - PublicIPs *HubPublicIPAddresses `json:"publicIPs,omitempty"` -} - -// HubIPConfiguration - IpConfigurations. -type HubIPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the Ip Configuration. - Name *string `json:"name,omitempty"` - - // The properties of the Virtual Hub IPConfigurations. - Properties *HubIPConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Ipconfiguration type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// HubIPConfigurationPropertiesFormat - Properties of IP configuration. -type HubIPConfigurationPropertiesFormat struct { - // The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - - // The private IP address allocation method. - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - - // The reference to the public IP resource. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - - // The reference to the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - - // READ-ONLY; The provisioning state of the IP configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// HubPublicIPAddresses - Public IP addresses associated with azure firewall. -type HubPublicIPAddresses struct { - // The list of Public IP addresses associated with azure firewall or IP addresses to be retained. - Addresses []*AzureFirewallPublicIPAddress `json:"addresses,omitempty"` - - // The number of Public IP addresses associated with azure firewall. - Count *int32 `json:"count,omitempty"` -} - -// HubRoute - RouteTable route. -type HubRoute struct { - // REQUIRED; The type of destinations (eg: CIDR, ResourceId, Service). - DestinationType *string `json:"destinationType,omitempty"` - - // REQUIRED; List of all destinations. - Destinations []*string `json:"destinations,omitempty"` - - // REQUIRED; The name of the Route that is unique within a RouteTable. This name can be used to access this route. - Name *string `json:"name,omitempty"` - - // REQUIRED; NextHop resource ID. - NextHop *string `json:"nextHop,omitempty"` - - // REQUIRED; The type of next hop (eg: ResourceId). - NextHopType *string `json:"nextHopType,omitempty"` -} - -// HubRouteTable - RouteTable resource in a virtual hub. -type HubRouteTable struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the RouteTable resource. - Properties *HubRouteTableProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// HubRouteTableProperties - Parameters for RouteTable. -type HubRouteTableProperties struct { - // List of labels associated with this route table. - Labels []*string `json:"labels,omitempty"` - - // List of all routes. - Routes []*HubRoute `json:"routes,omitempty"` - - // READ-ONLY; List of all connections associated with this route table. - AssociatedConnections []*string `json:"associatedConnections,omitempty" azure:"ro"` - - // READ-ONLY; List of all connections that advertise to this route table. - PropagatingConnections []*string `json:"propagatingConnections,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the RouteTable resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// HubRouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the HubRouteTablesClient.BeginCreateOrUpdate -// method. -type HubRouteTablesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// HubRouteTablesClientBeginDeleteOptions contains the optional parameters for the HubRouteTablesClient.BeginDelete method. -type HubRouteTablesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// HubRouteTablesClientGetOptions contains the optional parameters for the HubRouteTablesClient.Get method. -type HubRouteTablesClientGetOptions struct { - // placeholder for future optional parameters -} - -// HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.List method. -type HubRouteTablesClientListOptions struct { - // placeholder for future optional parameters -} - -// HubVirtualNetworkConnection Resource. -type HubVirtualNetworkConnection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the hub virtual network connection. - Properties *HubVirtualNetworkConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// HubVirtualNetworkConnectionProperties - Parameters for HubVirtualNetworkConnection. -type HubVirtualNetworkConnectionProperties struct { - // Deprecated: VirtualHub to RemoteVnet transit to enabled or not. - AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"` - - // Deprecated: Allow RemoteVnet to use Virtual Hub's gateways. - AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"` - - // Enable internet security. - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - - // Reference to the remote virtual network. - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - - // The Routing Configuration indicating the associated and propagated route tables on this connection. - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - - // READ-ONLY; The provisioning state of the hub virtual network connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate -// method. -type HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// HubVirtualNetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginDelete -// method. -type HubVirtualNetworkConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// HubVirtualNetworkConnectionsClientGetOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.Get -// method. -type HubVirtualNetworkConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.List -// method. -type HubVirtualNetworkConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// IDPSQueryObject - Will describe the query to run against the IDPS signatures DB -type IDPSQueryObject struct { - // Contain all filters names and values - Filters []*FilterItems `json:"filters,omitempty"` - - // Column to sort response by - OrderBy *OrderBy `json:"orderBy,omitempty"` - - // The number of the results to return in each page - ResultsPerPage *int32 `json:"resultsPerPage,omitempty"` - - // Search term in all columns - Search *string `json:"search,omitempty"` - - // The number of records matching the filter to skip - Skip *int32 `json:"skip,omitempty"` -} - -// IPAddressAvailabilityResult - Response for CheckIPAddressAvailability API service call. -type IPAddressAvailabilityResult struct { - // Private IP address availability. - Available *bool `json:"available,omitempty"` - - // Contains other available private IP addresses if the asked for address is taken. - AvailableIPAddresses []*string `json:"availableIPAddresses,omitempty"` - - // Private IP address platform reserved. - IsPlatformReserved *bool `json:"isPlatformReserved,omitempty"` -} - -// IPAllocation - IpAllocation resource. -type IPAllocation struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the IpAllocation. - Properties *IPAllocationPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// IPAllocationListResult - Response for the ListIpAllocations API service call. -type IPAllocationListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of IpAllocation resources. - Value []*IPAllocation `json:"value,omitempty"` -} - -// IPAllocationPropertiesFormat - Properties of the IpAllocation. -type IPAllocationPropertiesFormat struct { - // IpAllocation tags. - AllocationTags map[string]*string `json:"allocationTags,omitempty"` - - // The IPAM allocation ID. - IpamAllocationID *string `json:"ipamAllocationId,omitempty"` - - // The address prefix for the IpAllocation. - Prefix *string `json:"prefix,omitempty"` - - // The address prefix length for the IpAllocation. - PrefixLength *int32 `json:"prefixLength,omitempty"` - - // The address prefix Type for the IpAllocation. - PrefixType *IPVersion `json:"prefixType,omitempty"` - - // The type for the IpAllocation. - Type *IPAllocationType `json:"type,omitempty"` - - // READ-ONLY; The Subnet that using the prefix of this IpAllocation resource. - Subnet *SubResource `json:"subnet,omitempty" azure:"ro"` - - // READ-ONLY; The VirtualNetwork that using the prefix of this IpAllocation resource. - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty" azure:"ro"` -} - -// IPAllocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPAllocationsClient.BeginCreateOrUpdate -// method. -type IPAllocationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete method. -type IPAllocationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPAllocationsClientGetOptions contains the optional parameters for the IPAllocationsClient.Get method. -type IPAllocationsClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.ListByResourceGroup -// method. -type IPAllocationsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.List method. -type IPAllocationsClientListOptions struct { - // placeholder for future optional parameters -} - -// IPAllocationsClientUpdateTagsOptions contains the optional parameters for the IPAllocationsClient.UpdateTags method. -type IPAllocationsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// IPConfiguration - IP configuration. -type IPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the IP configuration. - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// IPConfigurationBgpPeeringAddress - Properties of IPConfigurationBgpPeeringAddress. -type IPConfigurationBgpPeeringAddress struct { - // The list of custom BGP peering addresses which belong to IP configuration. - CustomBgpIPAddresses []*string `json:"customBgpIpAddresses,omitempty"` - - // The ID of IP configuration which belongs to gateway. - IPConfigurationID *string `json:"ipconfigurationId,omitempty"` - - // READ-ONLY; The list of default BGP peering addresses which belong to IP configuration. - DefaultBgpIPAddresses []*string `json:"defaultBgpIpAddresses,omitempty" azure:"ro"` - - // READ-ONLY; The list of tunnel public IP addresses which belong to IP configuration. - TunnelIPAddresses []*string `json:"tunnelIpAddresses,omitempty" azure:"ro"` -} - -// IPConfigurationProfile - IP configuration profile child resource. -type IPConfigurationProfile struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the IP configuration profile. - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// IPConfigurationProfilePropertiesFormat - IP configuration profile properties. -type IPConfigurationProfilePropertiesFormat struct { - // The reference to the subnet resource to create a container network interface ip configuration. - Subnet *Subnet `json:"subnet,omitempty"` - - // READ-ONLY; The provisioning state of the IP configuration profile resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// IPConfigurationPropertiesFormat - Properties of IP configuration. -type IPConfigurationPropertiesFormat struct { - // The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - - // The private IP address allocation method. - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - - // The reference to the public IP resource. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - - // The reference to the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - - // READ-ONLY; The provisioning state of the IP configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// IPGroup - The IpGroups resource information. -type IPGroup struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the IpGroups. - Properties *IPGroupPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// IPGroupListResult - Response for the ListIpGroups API service call. -type IPGroupListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The list of IpGroups information resources. - Value []*IPGroup `json:"value,omitempty"` -} - -// IPGroupPropertiesFormat - The IpGroups property information. -type IPGroupPropertiesFormat struct { - // IpAddresses/IpAddressPrefixes in the IpGroups resource. - IPAddresses []*string `json:"ipAddresses,omitempty"` - - // READ-ONLY; List of references to Firewall Policies resources that this IpGroups is associated with. - FirewallPolicies []*SubResource `json:"firewallPolicies,omitempty" azure:"ro"` - - // READ-ONLY; List of references to Firewall resources that this IpGroups is associated with. - Firewalls []*SubResource `json:"firewalls,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the IpGroups resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// IPGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPGroupsClient.BeginCreateOrUpdate method. -type IPGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPGroupsClientBeginDeleteOptions contains the optional parameters for the IPGroupsClient.BeginDelete method. -type IPGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPGroupsClientGetOptions contains the optional parameters for the IPGroupsClient.Get method. -type IPGroupsClientGetOptions struct { - // Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups resource. - Expand *string -} - -// IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.ListByResourceGroup method. -type IPGroupsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.List method. -type IPGroupsClientListOptions struct { - // placeholder for future optional parameters -} - -// IPGroupsClientUpdateGroupsOptions contains the optional parameters for the IPGroupsClient.UpdateGroups method. -type IPGroupsClientUpdateGroupsOptions struct { - // placeholder for future optional parameters -} - -// IPPrefixesList - List of SNAT IP Prefixes learnt by firewall to not SNAT -type IPPrefixesList struct { - // IP Prefix value. - IPPrefixes []*string `json:"ipPrefixes,omitempty"` -} - -// IPSecPolicy - An IPSec Policy configuration for a virtual network gateway connection. -type IPSecPolicy struct { - // REQUIRED; The DH Group used in IKE Phase 1 for initial SA. - DhGroup *DhGroup `json:"dhGroup,omitempty"` - - // REQUIRED; The IPSec encryption algorithm (IKE phase 1). - IPSecEncryption *IPSecEncryption `json:"ipsecEncryption,omitempty"` - - // REQUIRED; The IPSec integrity algorithm (IKE phase 1). - IPSecIntegrity *IPSecIntegrity `json:"ipsecIntegrity,omitempty"` - - // REQUIRED; The IKE encryption algorithm (IKE phase 2). - IkeEncryption *IkeEncryption `json:"ikeEncryption,omitempty"` - - // REQUIRED; The IKE integrity algorithm (IKE phase 2). - IkeIntegrity *IkeIntegrity `json:"ikeIntegrity,omitempty"` - - // REQUIRED; The Pfs Group used in IKE Phase 2 for new child SA. - PfsGroup *PfsGroup `json:"pfsGroup,omitempty"` - - // REQUIRED; The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN - // tunnel. - SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` - - // REQUIRED; The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site - // VPN tunnel. - SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` -} - -// IPTag - Contains the IpTag associated with the object. -type IPTag struct { - // The IP tag type. Example: FirstPartyUsage. - IPTagType *string `json:"ipTagType,omitempty"` - - // The value of the IP tag associated with the public IP. Example: SQL. - Tag *string `json:"tag,omitempty"` -} - -// IPv6CircuitConnectionConfig - IPv6 Circuit Connection properties for global reach. -type IPv6CircuitConnectionConfig struct { - // /125 IP address space to carve out customer addresses for global reach. - AddressPrefix *string `json:"addressPrefix,omitempty"` - - // READ-ONLY; Express Route Circuit connection state. - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty" azure:"ro"` -} - -// IPv6ExpressRouteCircuitPeeringConfig - Contains IPv6 peering config. -type IPv6ExpressRouteCircuitPeeringConfig struct { - // The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - - // The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - - // The reference to the RouteFilter resource. - RouteFilter *SubResource `json:"routeFilter,omitempty"` - - // The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - - // The state of peering. - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} - -// InboundNatPool - Inbound NAT pool of the load balancer. -type InboundNatPool struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be - // used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of load balancer inbound nat pool. - Properties *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// InboundNatPoolPropertiesFormat - Properties of Inbound NAT pool. -type InboundNatPoolPropertiesFormat struct { - // REQUIRED; The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. - BackendPort *int32 `json:"backendPort,omitempty"` - - // REQUIRED; The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated - // with a load balancer. Acceptable values range between 1 and 65535. - FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` - - // REQUIRED; The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated - // with a load balancer. Acceptable values range between 1 and 65534. - FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` - - // REQUIRED; The reference to the transport protocol used by the inbound NAT pool. - Protocol *TransportProtocol `json:"protocol,omitempty"` - - // Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability - // Group. This setting is required when using the SQL AlwaysOn Availability Groups - // in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - - // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used - // when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - - // A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - - // The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. - // This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - - // READ-ONLY; The provisioning state of the inbound NAT pool resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// InboundNatRule - Inbound NAT rule of the load balancer. -type InboundNatRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be - // used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of load balancer inbound NAT rule. - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// InboundNatRuleListResult - Response for ListInboundNatRule API service call. -type InboundNatRuleListResult struct { - // A list of inbound NAT rules in a load balancer. - Value []*InboundNatRule `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// InboundNatRulePortMapping - Individual port mappings for inbound NAT rule created for backend pool. -type InboundNatRulePortMapping struct { - // READ-ONLY; Backend port. - BackendPort *int32 `json:"backendPort,omitempty" azure:"ro"` - - // READ-ONLY; Frontend port. - FrontendPort *int32 `json:"frontendPort,omitempty" azure:"ro"` - - // READ-ONLY; Name of inbound NAT rule. - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty" azure:"ro"` - - // READ-ONLY; The reference to the transport protocol used by the inbound NAT rule. - Protocol *TransportProtocol `json:"protocol,omitempty" azure:"ro"` -} - -// InboundNatRulePropertiesFormat - Properties of the inbound NAT rule. -type InboundNatRulePropertiesFormat struct { - // A reference to backendAddressPool resource. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - - // The port used for the internal endpoint. Acceptable values range from 1 to 65535. - BackendPort *int32 `json:"backendPort,omitempty"` - - // Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability - // Group. This setting is required when using the SQL AlwaysOn Availability Groups - // in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - - // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used - // when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - - // A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - - // The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values - // range from 1 to 65534. - FrontendPort *int32 `json:"frontendPort,omitempty"` - - // The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. - // Individual inbound NAT rule port mappings will be created for each - // backend address from BackendAddressPool. Acceptable values range from 1 to 65534. - FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` - - // The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. - // Individual inbound NAT rule port mappings will be created for each - // backend address from BackendAddressPool. Acceptable values range from 1 to 65534. - FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` - - // The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. - // This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - - // The reference to the transport protocol used by the load balancing rule. - Protocol *TransportProtocol `json:"protocol,omitempty"` - - // READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port - // of each of the frontend IP configurations is forwarded to the backend IP. - BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the inbound NAT rule resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// InboundNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundNatRulesClient.BeginCreateOrUpdate -// method. -type InboundNatRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InboundNatRulesClientBeginDeleteOptions contains the optional parameters for the InboundNatRulesClient.BeginDelete method. -type InboundNatRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InboundNatRulesClientGetOptions contains the optional parameters for the InboundNatRulesClient.Get method. -type InboundNatRulesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.List method. -type InboundNatRulesClientListOptions struct { - // placeholder for future optional parameters -} - -// InboundSecurityRule - NVA Inbound Security Rule resource. -type InboundSecurityRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of security rule collection. - Name *string `json:"name,omitempty"` - - // The properties of the Inbound Security Rules. - Properties *InboundSecurityRuleProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; NVA inbound security rule type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// InboundSecurityRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundSecurityRuleClient.BeginCreateOrUpdate -// method. -type InboundSecurityRuleClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InboundSecurityRuleProperties - Properties of the Inbound Security Rules resource. -type InboundSecurityRuleProperties struct { - // List of allowed rules. - Rules []*InboundSecurityRules `json:"rules,omitempty"` - - // READ-ONLY; The provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// InboundSecurityRules - Properties of the Inbound Security Rules resource. -type InboundSecurityRules struct { - // NVA port ranges to be opened up. One needs to provide specific ports. - DestinationPortRange *int32 `json:"destinationPortRange,omitempty"` - - // Protocol. This should be either TCP or UDP. - Protocol *InboundSecurityRulesProtocol `json:"protocol,omitempty"` - - // The CIDR or source IP range. Only /30, /31 and /32 Ip ranges are allowed. - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` -} - -// IntentPolicy - Network Intent Policy resource. -type IntentPolicy struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// IntentPolicyConfiguration - Details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. -type IntentPolicyConfiguration struct { - // The name of the Network Intent Policy for storing in target subscription. - NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"` - - // Source network intent policy. - SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"` -} - -// Interface - A network interface in a resource group. -type Interface struct { - // The extended location of the network interface. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the network interface. - Properties *InterfacePropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// InterfaceAssociation - Network interface and its custom security rules. -type InterfaceAssociation struct { - // Collection of custom security rules. - SecurityRules []*SecurityRule `json:"securityRules,omitempty"` - - // READ-ONLY; Network interface ID. - ID *string `json:"id,omitempty" azure:"ro"` -} - -// InterfaceDNSSettings - DNS settings of a network interface. -type InterfaceDNSSettings struct { - // List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' - // value cannot be combined with other IPs, it must be the only value in dnsServers - // collection. - DNSServers []*string `json:"dnsServers,omitempty"` - - // Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. - InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` - - // READ-ONLY; If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers - // from all NICs that are part of the Availability Set. This property is what is - // configured on each of those VMs. - AppliedDNSServers []*string `json:"appliedDnsServers,omitempty" azure:"ro"` - - // READ-ONLY; Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS - // name can be constructed by concatenating the VM name with the value of - // internalDomainNameSuffix. - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty" azure:"ro"` - - // READ-ONLY; Fully qualified DNS name supporting internal communications between VMs in the same virtual network. - InternalFqdn *string `json:"internalFqdn,omitempty" azure:"ro"` -} - -// InterfaceIPConfiguration - IPConfiguration in a network interface. -type InterfaceIPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Network interface IP configuration properties. - Properties *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - - // Resource type. - Type *string `json:"type,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// InterfaceIPConfigurationListResult - Response for list ip configurations API service call. -type InterfaceIPConfigurationListResult struct { - // A list of ip configurations. - Value []*InterfaceIPConfiguration `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// InterfaceIPConfigurationPrivateLinkConnectionProperties - PrivateLinkConnection properties for the network interface. -type InterfaceIPConfigurationPrivateLinkConnectionProperties struct { - // READ-ONLY; List of FQDNs for current private link connection. - Fqdns []*string `json:"fqdns,omitempty" azure:"ro"` - - // READ-ONLY; The group ID for current private link connection. - GroupID *string `json:"groupId,omitempty" azure:"ro"` - - // READ-ONLY; The required member name for current private link connection. - RequiredMemberName *string `json:"requiredMemberName,omitempty" azure:"ro"` -} - -// InterfaceIPConfigurationPropertiesFormat - Properties of IP configuration. -type InterfaceIPConfigurationPropertiesFormat struct { - // The reference to ApplicationGatewayBackendAddressPool resource. - ApplicationGatewayBackendAddressPools []*ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - - // Application security groups in which the IP configuration is included. - ApplicationSecurityGroups []*ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - - // The reference to gateway load balancer frontend IP. - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - - // The reference to LoadBalancerBackendAddressPool resource. - LoadBalancerBackendAddressPools []*BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - - // A list of references of LoadBalancerInboundNatRules. - LoadBalancerInboundNatRules []*InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - - // Whether this is a primary customer address on the network interface. - Primary *bool `json:"primary,omitempty"` - - // Private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - - // Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - - // The private IP address allocation method. - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - - // Public IP address bound to the IP configuration. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - - // Subnet bound to the IP configuration. - Subnet *Subnet `json:"subnet,omitempty"` - - // The reference to Virtual Network Taps. - VirtualNetworkTaps []*VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` - - // READ-ONLY; PrivateLinkConnection properties for the network interface. - PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the network interface IP configuration. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// InterfaceIPConfigurationsClientGetOptions contains the optional parameters for the InterfaceIPConfigurationsClient.Get -// method. -type InterfaceIPConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.List -// method. -type InterfaceIPConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - -// InterfaceListResult - Response for the ListNetworkInterface API service call. -type InterfaceListResult struct { - // A list of network interfaces in a resource group. - Value []*Interface `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// InterfaceLoadBalancerListResult - Response for list ip configurations API service call. -type InterfaceLoadBalancerListResult struct { - // A list of load balancers. - Value []*LoadBalancer `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.List method. -type InterfaceLoadBalancersClientListOptions struct { - // placeholder for future optional parameters -} - -// InterfacePropertiesFormat - NetworkInterface properties. -type InterfacePropertiesFormat struct { - // Auxiliary mode of Network Interface resource. - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - - // The DNS settings in network interface. - DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` - - // If the network interface is configured for accelerated networking. Not applicable to VM sizes which require accelerated - // networking. - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - - // Indicates whether IP forwarding is enabled on this network interface. - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - - // A list of IPConfigurations of the network interface. - IPConfigurations []*InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - - // Migration phase of Network Interface resource. - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - - // The reference to the NetworkSecurityGroup resource. - NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` - - // Type of Network Interface resource. - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - - // Privatelinkservice of the network interface resource. - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - - // WorkloadType of the NetworkInterface for BareMetal resources - WorkloadType *string `json:"workloadType,omitempty"` - - // READ-ONLY; A reference to the dscp configuration to which the network interface is linked. - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty" azure:"ro"` - - // READ-ONLY; A list of references to linked BareMetal resources. - HostedWorkloads []*string `json:"hostedWorkloads,omitempty" azure:"ro"` - - // READ-ONLY; The MAC address of the network interface. - MacAddress *string `json:"macAddress,omitempty" azure:"ro"` - - // READ-ONLY; Whether this is a primary network interface on a virtual machine. - Primary *bool `json:"primary,omitempty" azure:"ro"` - - // READ-ONLY; A reference to the private endpoint to which the network interface is linked. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the network interface resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the network interface resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` - - // READ-ONLY; A list of TapConfigurations of the network interface. - TapConfigurations []*InterfaceTapConfiguration `json:"tapConfigurations,omitempty" azure:"ro"` - - // READ-ONLY; The reference to a virtual machine. - VirtualMachine *SubResource `json:"virtualMachine,omitempty" azure:"ro"` - - // READ-ONLY; Whether the virtual machine this nic is attached to supports encryption. - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty" azure:"ro"` -} - -// InterfaceTapConfiguration - Tap configuration in a Network Interface. -type InterfaceTapConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the Virtual Network Tap configuration. - Properties *InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// InterfaceTapConfigurationListResult - Response for list tap configurations API service call. -type InterfaceTapConfigurationListResult struct { - // A list of tap configurations. - Value []*InterfaceTapConfiguration `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// InterfaceTapConfigurationPropertiesFormat - Properties of Virtual Network Tap configuration. -type InterfaceTapConfigurationPropertiesFormat struct { - // The reference to the Virtual Network Tap resource. - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` - - // READ-ONLY; The provisioning state of the network interface tap configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginCreateOrUpdate -// method. -type InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InterfaceTapConfigurationsClientBeginDeleteOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginDelete -// method. -type InterfaceTapConfigurationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InterfaceTapConfigurationsClientGetOptions contains the optional parameters for the InterfaceTapConfigurationsClient.Get -// method. -type InterfaceTapConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.List -// method. -type InterfaceTapConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfacesClient.BeginCreateOrUpdate -// method. -type InterfacesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InterfacesClientBeginDeleteOptions contains the optional parameters for the InterfacesClient.BeginDelete method. -type InterfacesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InterfacesClientBeginGetEffectiveRouteTableOptions contains the optional parameters for the InterfacesClient.BeginGetEffectiveRouteTable -// method. -type InterfacesClientBeginGetEffectiveRouteTableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions contains the optional parameters for the InterfacesClient.BeginListEffectiveNetworkSecurityGroups -// method. -type InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InterfacesClientGetCloudServiceNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetCloudServiceNetworkInterface -// method. -type InterfacesClientGetCloudServiceNetworkInterfaceOptions struct { - // Expands referenced resources. - Expand *string -} - -// InterfacesClientGetOptions contains the optional parameters for the InterfacesClient.Get method. -type InterfacesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetIPConfiguration -// method. -type InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions struct { - // Expands referenced resources. - Expand *string -} - -// InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetNetworkInterface -// method. -type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions struct { - // Expands referenced resources. - Expand *string -} - -// InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.ListAll method. -type InterfacesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListCloudServiceNetworkInterfaces -// method. -type InterfacesClientListCloudServiceNetworkInterfacesOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces -// method. -type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientListOptions contains the optional parameters for the InterfacesClient.List method. -type InterfacesClientListOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetIPConfigurations -// method. -type InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions struct { - // Expands referenced resources. - Expand *string -} - -// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces -// method. -type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces -// method. -type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientUpdateTagsOptions contains the optional parameters for the InterfacesClient.UpdateTags method. -type InterfacesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// ListHubRouteTablesResult - List of RouteTables and a URL nextLink to get the next set of results. -type ListHubRouteTablesResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of RouteTables. - Value []*HubRouteTable `json:"value,omitempty"` -} - -// ListHubVirtualNetworkConnectionsResult - List of HubVirtualNetworkConnections and a URL nextLink to get the next set of -// results. -type ListHubVirtualNetworkConnectionsResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of HubVirtualNetworkConnections. - Value []*HubVirtualNetworkConnection `json:"value,omitempty"` -} - -// ListP2SVPNGatewaysResult - Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL -// nextLink to get the next set of results. -type ListP2SVPNGatewaysResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of P2SVpnGateways. - Value []*P2SVPNGateway `json:"value,omitempty"` -} - -// ListRoutingIntentResult - List of the routing intent result and a URL nextLink to get the next set of results. -type ListRoutingIntentResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of RoutingIntent resource. - Value []*RoutingIntent `json:"value,omitempty"` -} - -// ListVPNConnectionsResult - Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains -// a list of Vpn Connections and a URL nextLink to get the next set of results. -type ListVPNConnectionsResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of Vpn Connections. - Value []*VPNConnection `json:"value,omitempty"` -} - -// ListVPNGatewayNatRulesResult - Result of the request to list all nat rules to a virtual wan vpn gateway. It contains a -// list of Nat rules and a URL nextLink to get the next set of results. -type ListVPNGatewayNatRulesResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of Nat Rules. - Value []*VPNGatewayNatRule `json:"value,omitempty"` -} - -// ListVPNGatewaysResult - Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink -// to get the next set of results. -type ListVPNGatewaysResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of VpnGateways. - Value []*VPNGateway `json:"value,omitempty"` -} - -// ListVPNServerConfigurationPolicyGroupsResult - Result of the request to list VpnServerConfigurationPolicyGroups. It contains -// a list of VpnServerConfigurationPolicyGroups and a URL nextLink to get the next set of results. -type ListVPNServerConfigurationPolicyGroupsResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of VpnServerConfigurationPolicyGroups. - Value []*VPNServerConfigurationPolicyGroup `json:"value,omitempty"` -} - -// ListVPNServerConfigurationsResult - Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations -// and a URL nextLink to get the next set of results. -type ListVPNServerConfigurationsResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of VpnServerConfigurations. - Value []*VPNServerConfiguration `json:"value,omitempty"` -} - -// ListVPNSiteLinkConnectionsResult - Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains -// a list of Vpn Connections and a URL nextLink to get the next set of results. -type ListVPNSiteLinkConnectionsResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of VpnSiteLinkConnections. - Value []*VPNSiteLinkConnection `json:"value,omitempty"` -} - -// ListVPNSiteLinksResult - Result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks and a URL nextLink -// to get the next set of results. -type ListVPNSiteLinksResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of VpnSitesLinks. - Value []*VPNSiteLink `json:"value,omitempty"` -} - -// ListVPNSitesResult - Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the -// next set of results. -type ListVPNSitesResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of VpnSites. - Value []*VPNSite `json:"value,omitempty"` -} - -// ListVirtualHubBgpConnectionResults - VirtualHubBgpConnections list. -type ListVirtualHubBgpConnectionResults struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The list of VirtualHubBgpConnections. - Value []*BgpConnection `json:"value,omitempty"` -} - -// ListVirtualHubIPConfigurationResults - VirtualHubIpConfigurations list. -type ListVirtualHubIPConfigurationResults struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The list of VirtualHubIpConfigurations. - Value []*HubIPConfiguration `json:"value,omitempty"` -} - -// ListVirtualHubRouteTableV2SResult - List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. -type ListVirtualHubRouteTableV2SResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of VirtualHubRouteTableV2s. - Value []*VirtualHubRouteTableV2 `json:"value,omitempty"` -} - -// ListVirtualHubsResult - Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink -// to get the next set of results. -type ListVirtualHubsResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of VirtualHubs. - Value []*VirtualHub `json:"value,omitempty"` -} - -// ListVirtualNetworkGatewayNatRulesResult - Result of the request to list all nat rules to a virtual network gateway. It -// contains a list of Nat rules and a URL nextLink to get the next set of results. -type ListVirtualNetworkGatewayNatRulesResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of Nat Rules. - Value []*VirtualNetworkGatewayNatRule `json:"value,omitempty"` -} - -// ListVirtualWANsResult - Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink -// to get the next set of results. -type ListVirtualWANsResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of VirtualWANs. - Value []*VirtualWAN `json:"value,omitempty"` -} - -// LoadBalancer resource. -type LoadBalancer struct { - // The extended location of the load balancer. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of load balancer. - Properties *LoadBalancerPropertiesFormat `json:"properties,omitempty"` - - // The load balancer SKU. - SKU *LoadBalancerSKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// LoadBalancerBackendAddress - Load balancer backend addresses. -type LoadBalancerBackendAddress struct { - // Name of the backend address. - Name *string `json:"name,omitempty"` - - // Properties of load balancer backend address pool. - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} - -// LoadBalancerBackendAddressPoolListResult - Response for ListBackendAddressPool API service call. -type LoadBalancerBackendAddressPoolListResult struct { - // A list of backend address pools in a load balancer. - Value []*BackendAddressPool `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate -// method. -type LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancerBackendAddressPoolsClientBeginDeleteOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginDelete -// method. -type LoadBalancerBackendAddressPoolsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancerBackendAddressPoolsClientGetOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.Get -// method. -type LoadBalancerBackendAddressPoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.List -// method. -type LoadBalancerBackendAddressPoolsClientListOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerBackendAddressPropertiesFormat - Properties of the load balancer backend addresses. -type LoadBalancerBackendAddressPropertiesFormat struct { - // A list of administrative states which once set can override health probe so that Load Balancer will always forward new - // connections to backend, or deny new connections and reset existing connections. - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - - // IP Address belonging to the referenced virtual network. - IPAddress *string `json:"ipAddress,omitempty"` - - // Reference to the frontend ip address configuration defined in regional loadbalancer. - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - - // Reference to an existing subnet. - Subnet *SubResource `json:"subnet,omitempty"` - - // Reference to an existing virtual network. - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` - - // READ-ONLY; Collection of inbound NAT rule port mappings. - InboundNatRulesPortMapping []*NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty" azure:"ro"` - - // READ-ONLY; Reference to IP address defined in network interfaces. - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty" azure:"ro"` -} - -// LoadBalancerFrontendIPConfigurationListResult - Response for ListFrontendIPConfiguration API service call. -type LoadBalancerFrontendIPConfigurationListResult struct { - // A list of frontend IP configurations in a load balancer. - Value []*FrontendIPConfiguration `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// LoadBalancerFrontendIPConfigurationsClientGetOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.Get -// method. -type LoadBalancerFrontendIPConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.List -// method. -type LoadBalancerFrontendIPConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerListResult - Response for ListLoadBalancers API service call. -type LoadBalancerListResult struct { - // A list of load balancers in a resource group. - Value []*LoadBalancer `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// LoadBalancerLoadBalancingRuleListResult - Response for ListLoadBalancingRule API service call. -type LoadBalancerLoadBalancingRuleListResult struct { - // A list of load balancing rules in a load balancer. - Value []*LoadBalancingRule `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// LoadBalancerLoadBalancingRulesClientGetOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.Get -// method. -type LoadBalancerLoadBalancingRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.List -// method. -type LoadBalancerLoadBalancingRulesClientListOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.List -// method. -type LoadBalancerNetworkInterfacesClientListOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerOutboundRuleListResult - Response for ListOutboundRule API service call. -type LoadBalancerOutboundRuleListResult struct { - // A list of outbound rules in a load balancer. - Value []*OutboundRule `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// LoadBalancerOutboundRulesClientGetOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.Get -// method. -type LoadBalancerOutboundRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.List -// method. -type LoadBalancerOutboundRulesClientListOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerProbeListResult - Response for ListProbe API service call. -type LoadBalancerProbeListResult struct { - // A list of probes in a load balancer. - Value []*Probe `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// LoadBalancerProbesClientGetOptions contains the optional parameters for the LoadBalancerProbesClient.Get method. -type LoadBalancerProbesClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.List method. -type LoadBalancerProbesClientListOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerPropertiesFormat - Properties of the load balancer. -type LoadBalancerPropertiesFormat struct { - // Collection of backend address pools used by a load balancer. - BackendAddressPools []*BackendAddressPool `json:"backendAddressPools,omitempty"` - - // Object representing the frontend IPs to be used for the load balancer. - FrontendIPConfigurations []*FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - - // Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound - // NAT rules are created automatically for each NIC associated with the Load - // Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive - // with defining inbound NAT rules. Inbound NAT pools are referenced from virtual - // machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They - // have to reference individual inbound NAT rules. - InboundNatPools []*InboundNatPool `json:"inboundNatPools,omitempty"` - - // Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive - // with defining an inbound NAT pool. Inbound NAT pools are referenced from - // virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. - // They have to reference individual inbound NAT rules. - InboundNatRules []*InboundNatRule `json:"inboundNatRules,omitempty"` - - // Object collection representing the load balancing rules Gets the provisioning. - LoadBalancingRules []*LoadBalancingRule `json:"loadBalancingRules,omitempty"` - - // The outbound rules. - OutboundRules []*OutboundRule `json:"outboundRules,omitempty"` - - // Collection of probe objects used in the load balancer. - Probes []*Probe `json:"probes,omitempty"` - - // READ-ONLY; The provisioning state of the load balancer resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the load balancer resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// LoadBalancerSKU - SKU of a load balancer. -type LoadBalancerSKU struct { - // Name of a load balancer SKU. - Name *LoadBalancerSKUName `json:"name,omitempty"` - - // Tier of a load balancer SKU. - Tier *LoadBalancerSKUTier `json:"tier,omitempty"` -} - -// LoadBalancerVipSwapRequest - The request for a VIP swap. -type LoadBalancerVipSwapRequest struct { - // A list of frontend IP configuration resources that should swap VIPs. - FrontendIPConfigurations []*LoadBalancerVipSwapRequestFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` -} - -// LoadBalancerVipSwapRequestFrontendIPConfiguration - VIP swap request's frontend IP configuration object. -type LoadBalancerVipSwapRequestFrontendIPConfiguration struct { - // The ID of frontend IP configuration resource. - ID *string `json:"id,omitempty"` - - // The properties of VIP swap request's frontend IP configuration object. - Properties *LoadBalancerVipSwapRequestFrontendIPConfigurationProperties `json:"properties,omitempty"` -} - -// LoadBalancerVipSwapRequestFrontendIPConfigurationProperties - The properties of VIP swap request's frontend IP configuration -// object. -type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties struct { - // A reference to public IP address resource. - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` -} - -// LoadBalancersClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.BeginCreateOrUpdate -// method. -type LoadBalancersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete method. -type LoadBalancersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancersClientBeginListInboundNatRulePortMappingsOptions contains the optional parameters for the LoadBalancersClient.BeginListInboundNatRulePortMappings -// method. -type LoadBalancersClientBeginListInboundNatRulePortMappingsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancersClientBeginSwapPublicIPAddressesOptions contains the optional parameters for the LoadBalancersClient.BeginSwapPublicIPAddresses -// method. -type LoadBalancersClientBeginSwapPublicIPAddressesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. -type LoadBalancersClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.ListAll method. -type LoadBalancersClientListAllOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.List method. -type LoadBalancersClientListOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancersClientUpdateTagsOptions contains the optional parameters for the LoadBalancersClient.UpdateTags method. -type LoadBalancersClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancingRule - A load balancing rule for a load balancer. -type LoadBalancingRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can - // be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of load balancer load balancing rule. - Properties *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// LoadBalancingRulePropertiesFormat - Properties of the load balancer. -type LoadBalancingRulePropertiesFormat struct { - // REQUIRED; The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable - // values are between 0 and 65534. Note that value 0 enables "Any Port". - FrontendPort *int32 `json:"frontendPort,omitempty"` - - // REQUIRED; The reference to the transport protocol used by the load balancing rule. - Protocol *TransportProtocol `json:"protocol,omitempty"` - - // A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - - // An array of references to pool of DIPs. - BackendAddressPools []*SubResource `json:"backendAddressPools,omitempty"` - - // The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables - // "Any Port". - BackendPort *int32 `json:"backendPort,omitempty"` - - // Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing - // rule. - DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` - - // Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability - // Group. This setting is required when using the SQL AlwaysOn Availability Groups - // in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - - // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used - // when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - - // A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - - // The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. - // This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - - // The load distribution policy for this rule. - LoadDistribution *LoadDistribution `json:"loadDistribution,omitempty"` - - // The reference to the load balancer probe used by the load balancing rule. - Probe *SubResource `json:"probe,omitempty"` - - // READ-ONLY; The provisioning state of the load balancing rule resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// LocalNetworkGateway - A common class for general resource information. -type LocalNetworkGateway struct { - // REQUIRED; Properties of the local network gateway. - Properties *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// LocalNetworkGatewayListResult - Response for ListLocalNetworkGateways API service call. -type LocalNetworkGatewayListResult struct { - // A list of local network gateways that exists in a resource group. - Value []*LocalNetworkGateway `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// LocalNetworkGatewayPropertiesFormat - LocalNetworkGateway properties. -type LocalNetworkGatewayPropertiesFormat struct { - // Local network gateway's BGP speaker settings. - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - - // FQDN of local network gateway. - Fqdn *string `json:"fqdn,omitempty"` - - // IP address of local network gateway. - GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` - - // Local network site address space. - LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` - - // READ-ONLY; The provisioning state of the local network gateway resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the local network gateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// LocalNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginCreateOrUpdate -// method. -type LocalNetworkGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LocalNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginDelete -// method. -type LocalNetworkGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LocalNetworkGatewaysClientGetOptions contains the optional parameters for the LocalNetworkGatewaysClient.Get method. -type LocalNetworkGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.List method. -type LocalNetworkGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// LocalNetworkGatewaysClientUpdateTagsOptions contains the optional parameters for the LocalNetworkGatewaysClient.UpdateTags -// method. -type LocalNetworkGatewaysClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// LogSpecification - Description of logging specification. -type LogSpecification struct { - // Duration of the blob. - BlobDuration *string `json:"blobDuration,omitempty"` - - // The display name of the specification. - DisplayName *string `json:"displayName,omitempty"` - - // The name of the specification. - Name *string `json:"name,omitempty"` -} - -// ManagedRuleGroupOverride - Defines a managed rule group override setting. -type ManagedRuleGroupOverride struct { - // REQUIRED; The managed rule group to override. - RuleGroupName *string `json:"ruleGroupName,omitempty"` - - // List of rules that will be disabled. If none specified, all rules in the group will be disabled. - Rules []*ManagedRuleOverride `json:"rules,omitempty"` -} - -// ManagedRuleOverride - Defines a managed rule group override setting. -type ManagedRuleOverride struct { - // REQUIRED; Identifier for the managed rule. - RuleID *string `json:"ruleId,omitempty"` - - // The state of the managed rule. Defaults to Disabled if not specified. - State *ManagedRuleEnabledState `json:"state,omitempty"` -} - -// ManagedRuleSet - Defines a managed rule set. -type ManagedRuleSet struct { - // REQUIRED; Defines the rule set type to use. - RuleSetType *string `json:"ruleSetType,omitempty"` - - // REQUIRED; Defines the version of the rule set to use. - RuleSetVersion *string `json:"ruleSetVersion,omitempty"` - - // Defines the rule group overrides to apply to the rule set. - RuleGroupOverrides []*ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"` -} - -// ManagedRulesDefinition - Allow to exclude some variable satisfy the condition for the WAF check. -type ManagedRulesDefinition struct { - // REQUIRED; The managed rule sets that are associated with the policy. - ManagedRuleSets []*ManagedRuleSet `json:"managedRuleSets,omitempty"` - - // The Exclusions that are applied on the policy. - Exclusions []*OwaspCrsExclusionEntry `json:"exclusions,omitempty"` -} - -// ManagedServiceIdentity - Identity for the resource. -type ManagedServiceIdentity struct { - // The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created - // identity and a set of user assigned identities. The type 'None' will remove any - // identities from the virtual machine. - Type *ResourceIdentityType `json:"type,omitempty"` - - // The list of user identities associated with 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]*Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties `json:"userAssignedIdentities,omitempty"` - - // READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned - // identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` - - // READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// ManagementClientBeginDeleteBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLink -// method. -type ManagementClientBeginDeleteBastionShareableLinkOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions contains the optional parameters for the -// ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile method. -type ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagementClientBeginGetActiveSessionsOptions contains the optional parameters for the ManagementClient.BeginGetActiveSessions -// method. -type ManagementClientBeginGetActiveSessionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagementClientBeginPutBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginPutBastionShareableLink -// method. -type ManagementClientBeginPutBastionShareableLinkOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagementClientCheckDNSNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDNSNameAvailability -// method. -type ManagementClientCheckDNSNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.DisconnectActiveSessions -// method. -type ManagementClientDisconnectActiveSessionsOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientExpressRouteProviderPortOptions contains the optional parameters for the ManagementClient.ExpressRouteProviderPort -// method. -type ManagementClientExpressRouteProviderPortOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.GetBastionShareableLink -// method. -type ManagementClientGetBastionShareableLinkOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientListActiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListActiveConnectivityConfigurations -// method. -type ManagementClientListActiveConnectivityConfigurationsOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientListActiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListActiveSecurityAdminRules -// method. -type ManagementClientListActiveSecurityAdminRulesOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations -// method. -type ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules -// method. -type ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientSupportedSecurityProvidersOptions contains the optional parameters for the ManagementClient.SupportedSecurityProviders -// method. -type ManagementClientSupportedSecurityProvidersOptions struct { - // placeholder for future optional parameters -} - -// ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate -// method. -type ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ManagementGroupNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Delete -// method. -type ManagementGroupNetworkManagerConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ManagementGroupNetworkManagerConnectionsClientGetOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Get -// method. -type ManagementGroupNetworkManagerConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagementGroupNetworkManagerConnectionsClientListOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.List -// method. -type ManagementGroupNetworkManagerConnectionsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// Manager - The Managed Network resource -type Manager struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // The network manager properties - Properties *ManagerProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ManagerCommit - Network Manager Commit. -type ManagerCommit struct { - // REQUIRED; Commit Type. - CommitType *ConfigurationType `json:"commitType,omitempty"` - - // REQUIRED; List of target locations. - TargetLocations []*string `json:"targetLocations,omitempty"` - - // List of configuration ids. - ConfigurationIDs []*string `json:"configurationIds,omitempty"` - - // READ-ONLY; Commit Id. - CommitID *string `json:"commitId,omitempty" azure:"ro"` -} - -// ManagerCommitsClientBeginPostOptions contains the optional parameters for the ManagerCommitsClient.BeginPost method. -type ManagerCommitsClientBeginPostOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagerConnection - The Network Manager Connection resource -type ManagerConnection struct { - // The scope connection properties - Properties *ManagerConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ManagerConnectionListResult - List of network manager connections. -type ManagerConnectionListResult struct { - // Gets the URL to get the next page of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of network manager connections. - Value []*ManagerConnection `json:"value,omitempty"` -} - -// ManagerConnectionProperties - Information about the network manager connection. -type ManagerConnectionProperties struct { - // A description of the network manager connection. - Description *string `json:"description,omitempty"` - - // Network Manager Id. - NetworkManagerID *string `json:"networkManagerId,omitempty"` - - // READ-ONLY; Connection state. - ConnectionState *ScopeConnectionState `json:"connectionState,omitempty" azure:"ro"` -} - -// ManagerDeploymentStatus - Network Manager Deployment Status. -type ManagerDeploymentStatus struct { - // Commit Time. - CommitTime *time.Time `json:"commitTime,omitempty"` - - // List of configuration ids. - ConfigurationIDs []*string `json:"configurationIds,omitempty"` - - // Deployment Status. - DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` - - // Configuration Deployment Type. - DeploymentType *ConfigurationType `json:"deploymentType,omitempty"` - - // Error Message. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Region Name. - Region *string `json:"region,omitempty"` -} - -// ManagerDeploymentStatusClientListOptions contains the optional parameters for the ManagerDeploymentStatusClient.List method. -type ManagerDeploymentStatusClientListOptions struct { - // placeholder for future optional parameters -} - -// ManagerDeploymentStatusListResult - A list of Network Manager Deployment Status -type ManagerDeploymentStatusListResult struct { - // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current - // request) to retrieve the next page of data. - SkipToken *string `json:"skipToken,omitempty"` - - // Gets a page of Network Manager Deployment Status - Value []*ManagerDeploymentStatus `json:"value,omitempty"` -} - -// ManagerDeploymentStatusParameter - Network Manager Deployment Status Parameter. -type ManagerDeploymentStatusParameter struct { - // List of deployment types. - DeploymentTypes []*ConfigurationType `json:"deploymentTypes,omitempty"` - - // List of locations. - Regions []*string `json:"regions,omitempty"` - - // Continuation token for pagination, capturing the next page size and offset, as well as the context of the query. - SkipToken *string `json:"skipToken,omitempty"` -} - -// ManagerEffectiveConnectivityConfigurationListResult - Result of the request to list networkManagerEffectiveConnectivityConfiguration. -// It contains a list of groups and a skiptoken to get the next set of results. -type ManagerEffectiveConnectivityConfigurationListResult struct { - // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current - // request) to retrieve the next page of data. - SkipToken *string `json:"skipToken,omitempty"` - - // Gets a page of NetworkManagerEffectiveConnectivityConfiguration - Value []*EffectiveConnectivityConfiguration `json:"value,omitempty"` -} - -// ManagerEffectiveSecurityAdminRulesListResult - Result of the request to list networkManagerEffectiveSecurityAdminRules. -// It contains a list of groups and a skiptoken to get the next set of results. -type ManagerEffectiveSecurityAdminRulesListResult struct { - // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current - // request) to retrieve the next page of data. - SkipToken *string `json:"skipToken,omitempty"` - - // Gets a page of NetworkManagerEffectiveSecurityAdminRules - Value []EffectiveBaseSecurityAdminRuleClassification `json:"value,omitempty"` -} - -// ManagerListResult - Result of the request to list NetworkManager. It contains a list of network managers and a URL link -// to get the next set of results. -type ManagerListResult struct { - // Gets the URL to get the next page of results. - NextLink *string `json:"nextLink,omitempty"` - - // Gets a page of NetworkManager - Value []*Manager `json:"value,omitempty"` -} - -// ManagerProperties - Properties of Managed Network -type ManagerProperties struct { - // REQUIRED; Scope Access. - NetworkManagerScopeAccesses []*ConfigurationType `json:"networkManagerScopeAccesses,omitempty"` - - // REQUIRED; Scope of Network Manager. - NetworkManagerScopes *ManagerPropertiesNetworkManagerScopes `json:"networkManagerScopes,omitempty"` - - // A description of the network manager. - Description *string `json:"description,omitempty"` - - // READ-ONLY; The provisioning state of the network manager resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ManagerPropertiesNetworkManagerScopes - Scope of Network Manager. -type ManagerPropertiesNetworkManagerScopes struct { - // List of management groups. - ManagementGroups []*string `json:"managementGroups,omitempty"` - - // List of subscriptions. - Subscriptions []*string `json:"subscriptions,omitempty"` - - // READ-ONLY; List of cross tenant scopes. - CrossTenantScopes []*CrossTenantScopes `json:"crossTenantScopes,omitempty" azure:"ro"` -} - -// ManagerSecurityGroupItem - Network manager security group item. -type ManagerSecurityGroupItem struct { - // REQUIRED; Network manager group Id. - NetworkGroupID *string `json:"networkGroupId,omitempty"` -} - -// ManagersClientBeginDeleteOptions contains the optional parameters for the ManagersClient.BeginDelete method. -type ManagersClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagersClientCreateOrUpdateOptions contains the optional parameters for the ManagersClient.CreateOrUpdate method. -type ManagersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ManagersClientGetOptions contains the optional parameters for the ManagersClient.Get method. -type ManagersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagersClientListBySubscriptionOptions contains the optional parameters for the ManagersClient.ListBySubscription method. -type ManagersClientListBySubscriptionOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// ManagersClientListOptions contains the optional parameters for the ManagersClient.List method. -type ManagersClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// ManagersClientPatchOptions contains the optional parameters for the ManagersClient.Patch method. -type ManagersClientPatchOptions struct { - // placeholder for future optional parameters -} - -// MatchCondition - Define match conditions. -type MatchCondition struct { - // REQUIRED; Match value. - MatchValues []*string `json:"matchValues,omitempty"` - - // REQUIRED; List of match variables. - MatchVariables []*MatchVariable `json:"matchVariables,omitempty"` - - // REQUIRED; The operator to be matched. - Operator *WebApplicationFirewallOperator `json:"operator,omitempty"` - - // Whether this is negate condition or not. - NegationConditon *bool `json:"negationConditon,omitempty"` - - // List of transforms. - Transforms []*WebApplicationFirewallTransform `json:"transforms,omitempty"` -} - -// MatchVariable - Define match variables. -type MatchVariable struct { - // REQUIRED; Match Variable. - VariableName *WebApplicationFirewallMatchVariable `json:"variableName,omitempty"` - - // The selector of match variable. - Selector *string `json:"selector,omitempty"` -} - -// MatchedRule - Matched rule. -type MatchedRule struct { - // The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. - Action *string `json:"action,omitempty"` - - // Name of the matched network security rule. - RuleName *string `json:"ruleName,omitempty"` -} - -// MetricSpecification - Description of metrics specification. -type MetricSpecification struct { - // The aggregation type. - AggregationType *string `json:"aggregationType,omitempty"` - - // List of availability. - Availabilities []*Availability `json:"availabilities,omitempty"` - - // List of dimensions. - Dimensions []*Dimension `json:"dimensions,omitempty"` - - // The description of the metric. - DisplayDescription *string `json:"displayDescription,omitempty"` - - // The display name of the metric. - DisplayName *string `json:"displayName,omitempty"` - - // Whether regional MDM account enabled. - EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` - - // Whether gaps would be filled with zeros. - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` - - // Whether the metric is internal. - IsInternal *bool `json:"isInternal,omitempty"` - - // Pattern for the filter of the metric. - MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` - - // The name of the metric. - Name *string `json:"name,omitempty"` - - // The resource Id dimension name override. - ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` - - // The source MDM account. - SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` - - // The source MDM namespace. - SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` - - // Units the metric to be displayed in. - Unit *string `json:"unit,omitempty"` -} - -// NatGateway - Nat Gateway resource. -type NatGateway struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Nat Gateway properties. - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - - // The nat gateway SKU. - SKU *NatGatewaySKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // A list of availability zones denoting the zone in which Nat Gateway should be deployed. - Zones []*string `json:"zones,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// NatGatewayListResult - Response for ListNatGateways API service call. -type NatGatewayListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of Nat Gateways that exists in a resource group. - Value []*NatGateway `json:"value,omitempty"` -} - -// NatGatewayPropertiesFormat - Nat Gateway properties. -type NatGatewayPropertiesFormat struct { - // The idle timeout of the nat gateway. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - - // An array of public ip addresses associated with the nat gateway resource. - PublicIPAddresses []*SubResource `json:"publicIpAddresses,omitempty"` - - // An array of public ip prefixes associated with the nat gateway resource. - PublicIPPrefixes []*SubResource `json:"publicIpPrefixes,omitempty"` - - // READ-ONLY; The provisioning state of the NAT gateway resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the NAT gateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to the subnets using this nat gateway resource. - Subnets []*SubResource `json:"subnets,omitempty" azure:"ro"` -} - -// NatGatewaySKU - SKU of nat gateway. -type NatGatewaySKU struct { - // Name of Nat Gateway SKU. - Name *NatGatewaySKUName `json:"name,omitempty"` -} - -// NatGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the NatGatewaysClient.BeginCreateOrUpdate -// method. -type NatGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NatGatewaysClientBeginDeleteOptions contains the optional parameters for the NatGatewaysClient.BeginDelete method. -type NatGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NatGatewaysClientGetOptions contains the optional parameters for the NatGatewaysClient.Get method. -type NatGatewaysClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.ListAll method. -type NatGatewaysClientListAllOptions struct { - // placeholder for future optional parameters -} - -// NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.List method. -type NatGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// NatGatewaysClientUpdateTagsOptions contains the optional parameters for the NatGatewaysClient.UpdateTags method. -type NatGatewaysClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// NatRule - Rule of type nat. -type NatRule struct { - // REQUIRED; Rule Type. - RuleType *FirewallPolicyRuleType `json:"ruleType,omitempty"` - - // Description of the rule. - Description *string `json:"description,omitempty"` - - // List of destination IP addresses or Service Tags. - DestinationAddresses []*string `json:"destinationAddresses,omitempty"` - - // List of destination ports. - DestinationPorts []*string `json:"destinationPorts,omitempty"` - - // Array of FirewallPolicyRuleNetworkProtocols. - IPProtocols []*FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"` - - // Name of the rule. - Name *string `json:"name,omitempty"` - - // List of source IP addresses for this rule. - SourceAddresses []*string `json:"sourceAddresses,omitempty"` - - // List of source IpGroups for this rule. - SourceIPGroups []*string `json:"sourceIpGroups,omitempty"` - - // The translated address for this NAT rule. - TranslatedAddress *string `json:"translatedAddress,omitempty"` - - // The translated FQDN for this NAT rule. - TranslatedFqdn *string `json:"translatedFqdn,omitempty"` - - // The translated port for this NAT rule. - TranslatedPort *string `json:"translatedPort,omitempty"` -} - -// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type NatRule. -func (n *NatRule) GetFirewallPolicyRule() *FirewallPolicyRule { - return &FirewallPolicyRule{ - Name: n.Name, - Description: n.Description, - RuleType: n.RuleType, - } -} - -// NatRulePortMapping - Individual port mappings for inbound NAT rule created for backend pool. -type NatRulePortMapping struct { - // Backend port. - BackendPort *int32 `json:"backendPort,omitempty"` - - // Frontend port. - FrontendPort *int32 `json:"frontendPort,omitempty"` - - // Name of inbound NAT rule. - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} - -// NatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the NatRulesClient.BeginCreateOrUpdate method. -type NatRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NatRulesClientBeginDeleteOptions contains the optional parameters for the NatRulesClient.BeginDelete method. -type NatRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NatRulesClientGetOptions contains the optional parameters for the NatRulesClient.Get method. -type NatRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.ListByVPNGateway method. -type NatRulesClientListByVPNGatewayOptions struct { - // placeholder for future optional parameters -} - -// NextHopParameters - Parameters that define the source and destination endpoint. -type NextHopParameters struct { - // REQUIRED; The destination IP address. - DestinationIPAddress *string `json:"destinationIPAddress,omitempty"` - - // REQUIRED; The source IP address. - SourceIPAddress *string `json:"sourceIPAddress,omitempty"` - - // REQUIRED; The resource identifier of the target resource against which the action is to be performed. - TargetResourceID *string `json:"targetResourceId,omitempty"` - - // The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. - // Otherwise optional). - TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` -} - -// NextHopResult - The information about next hop from the specified VM. -type NextHopResult struct { - // Next hop IP Address. - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - - // Next hop type. - NextHopType *NextHopType `json:"nextHopType,omitempty"` - - // The resource identifier for the route table associated with the route being returned. If the route being returned does - // not correspond to any user created routes then this field will be the string - // 'System Route'. - RouteTableID *string `json:"routeTableId,omitempty"` -} - -// O365BreakOutCategoryPolicies - Office365 breakout categories. -type O365BreakOutCategoryPolicies struct { - // Flag to control allow category. - Allow *bool `json:"allow,omitempty"` - - // Flag to control default category. - Default *bool `json:"default,omitempty"` - - // Flag to control optimize category. - Optimize *bool `json:"optimize,omitempty"` -} - -// O365PolicyProperties - The Office365 breakout policy. -type O365PolicyProperties struct { - // Office365 breakout categories. - BreakOutCategories *O365BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"` -} - -// Office365PolicyProperties - Network Virtual Appliance Sku Properties. -type Office365PolicyProperties struct { - // Office 365 breakout categories. - BreakOutCategories *BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"` -} - -// Operation - Network REST API operation definition. -type Operation struct { - // Display metadata associated with the operation. - Display *OperationDisplay `json:"display,omitempty"` - - // Operation name: {provider}/{resource}/{operation}. - Name *string `json:"name,omitempty"` - - // Origin of the operation. - Origin *string `json:"origin,omitempty"` - - // Operation properties format. - Properties *OperationPropertiesFormat `json:"properties,omitempty"` -} - -// OperationDisplay - Display metadata associated with the operation. -type OperationDisplay struct { - // Description of the operation. - Description *string `json:"description,omitempty"` - - // Type of the operation: get, read, delete, etc. - Operation *string `json:"operation,omitempty"` - - // Service provider: Microsoft Network. - Provider *string `json:"provider,omitempty"` - - // Resource on which the operation is performed. - Resource *string `json:"resource,omitempty"` -} - -// OperationListResult - Result of the request to list Network operations. It contains a list of operations and a URL link -// to get the next set of results. -type OperationListResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of Network operations supported by the Network resource provider. - Value []*Operation `json:"value,omitempty"` -} - -// OperationPropertiesFormat - Description of operation properties format. -type OperationPropertiesFormat struct { - // Specification of the service. - ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// OperationPropertiesFormatServiceSpecification - Specification of the service. -type OperationPropertiesFormatServiceSpecification struct { - // Operation log specification. - LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"` - - // Operation service specification. - MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// OrderBy - Describes a column to sort -type OrderBy struct { - // Describes the actual column name to sort by - Field *string `json:"field,omitempty"` - - // Describes if results should be in ascending/descending order - Order *FirewallPolicyIDPSQuerySortOrder `json:"order,omitempty"` -} - -// OutboundRule - Outbound rule of the load balancer. -type OutboundRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used - // to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of load balancer outbound rule. - Properties *OutboundRulePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// OutboundRulePropertiesFormat - Outbound rule of the load balancer. -type OutboundRulePropertiesFormat struct { - // REQUIRED; A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - - // REQUIRED; The Frontend IP addresses of the load balancer. - FrontendIPConfigurations []*SubResource `json:"frontendIPConfigurations,omitempty"` - - // REQUIRED; The protocol for the outbound rule in load balancer. - Protocol *LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"` - - // The number of outbound ports to be used for NAT. - AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` - - // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used - // when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - - // The timeout for the TCP idle connection. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - - // READ-ONLY; The provisioning state of the outbound rule resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// OwaspCrsExclusionEntry - Allow to exclude some variable satisfy the condition for the WAF check. -type OwaspCrsExclusionEntry struct { - // REQUIRED; The variable to be excluded. - MatchVariable *OwaspCrsExclusionEntryMatchVariable `json:"matchVariable,omitempty"` - - // REQUIRED; When matchVariable is a collection, operator used to specify which elements in the collection this exclusion - // applies to. - Selector *string `json:"selector,omitempty"` - - // REQUIRED; When matchVariable is a collection, operate on the selector to specify which elements in the collection this - // exclusion applies to. - SelectorMatchOperator *OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator,omitempty"` - - // The managed rule sets that are associated with the exclusion. - ExclusionManagedRuleSets []*ExclusionManagedRuleSet `json:"exclusionManagedRuleSets,omitempty"` -} - -// P2SConnectionConfiguration Resource. -type P2SConnectionConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the P2S connection configuration. - Properties *P2SConnectionConfigurationProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// P2SConnectionConfigurationProperties - Parameters for P2SConnectionConfiguration. -type P2SConnectionConfigurationProperties struct { - // Flag indicating whether the enable internet security flag is turned on for the P2S Connections or not. - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - - // The Routing Configuration indicating the associated and propagated route tables on this connection. - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - - // The reference to the address space resource which represents Address space for P2S VpnClient. - VPNClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - - // READ-ONLY; List of Configuration Policy Groups that this P2SConnectionConfiguration is attached to. - ConfigurationPolicyGroupAssociations []*SubResource `json:"configurationPolicyGroupAssociations,omitempty" azure:"ro"` - - // READ-ONLY; List of previous Configuration Policy Groups that this P2SConnectionConfiguration was attached to. - PreviousConfigurationPolicyGroupAssociations []*VPNServerConfigurationPolicyGroup `json:"previousConfigurationPolicyGroupAssociations,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// P2SVPNConnectionHealth - P2S Vpn connection detailed health written to sas url. -type P2SVPNConnectionHealth struct { - // Returned sas url of the blob to which the p2s vpn connection detailed health will be written. - SasURL *string `json:"sasUrl,omitempty"` -} - -// P2SVPNConnectionHealthRequest - List of P2S Vpn connection health request. -type P2SVPNConnectionHealthRequest struct { - // The sas-url to download the P2S Vpn connection health detail. - OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"` - - // The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for. - VPNUserNamesFilter []*string `json:"vpnUserNamesFilter,omitempty"` -} - -// P2SVPNConnectionRequest - List of p2s vpn connections to be disconnected. -type P2SVPNConnectionRequest struct { - // List of p2s vpn connection Ids. - VPNConnectionIDs []*string `json:"vpnConnectionIds,omitempty"` -} - -// P2SVPNGateway - P2SVpnGateway Resource. -type P2SVPNGateway struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the P2SVpnGateway. - Properties *P2SVPNGatewayProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// P2SVPNGatewayProperties - Parameters for P2SVpnGateway. -type P2SVPNGatewayProperties struct { - // List of all customer specified DNS servers IP addresses. - CustomDNSServers []*string `json:"customDnsServers,omitempty"` - - // Enable Routing Preference property for the Public IP Interface of the P2SVpnGateway. - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - - // List of all p2s connection configurations of the gateway. - P2SConnectionConfigurations []*P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"` - - // The scale unit for this p2s vpn gateway. - VPNGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` - - // The VpnServerConfiguration to which the p2sVpnGateway is attached to. - VPNServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"` - - // The VirtualHub to which the gateway belongs. - VirtualHub *SubResource `json:"virtualHub,omitempty"` - - // READ-ONLY; The provisioning state of the P2S VPN gateway resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; All P2S VPN clients' connection health status. - VPNClientConnectionHealth *VPNClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty" azure:"ro"` -} - -// P2SVPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginCreateOrUpdate -// method. -type P2SVPNGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginDeleteOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDelete method. -type P2SVPNGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections -// method. -type P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGenerateVPNProfile -// method. -type P2SVPNGatewaysClientBeginGenerateVPNProfileOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed -// method. -type P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth -// method. -type P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginResetOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginReset method. -type P2SVPNGatewaysClientBeginResetOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginUpdateTags -// method. -type P2SVPNGatewaysClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientGetOptions contains the optional parameters for the P2SVPNGatewaysClient.Get method. -type P2SVPNGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.ListByResourceGroup -// method. -type P2SVPNGatewaysClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.List method. -type P2SVPNGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// P2SVPNProfileParameters - Vpn Client Parameters for package generation. -type P2SVPNProfileParameters struct { - // VPN client authentication method. - AuthenticationMethod *AuthenticationMethod `json:"authenticationMethod,omitempty"` -} - -// PacketCapture - Parameters that define the create packet capture operation. -type PacketCapture struct { - // REQUIRED; Properties of the packet capture. - Properties *PacketCaptureParameters `json:"properties,omitempty"` -} - -// PacketCaptureFilter - Filter that is applied to packet capture request. Multiple filters can be applied. -type PacketCaptureFilter struct { - // Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. - // "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently - // supported. Mixing ranges with multiple entries not currently supported. Default = null. - LocalIPAddress *string `json:"localIPAddress,omitempty"` - - // Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple - // ranges not currently supported. Mixing ranges with multiple entries not - // currently supported. Default = null. - LocalPort *string `json:"localPort,omitempty"` - - // Protocol to be filtered on. - Protocol *PcProtocol `json:"protocol,omitempty"` - - // Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. - // "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently - // supported. Mixing ranges with multiple entries not currently supported. Default = null. - RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` - - // Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. - // Multiple ranges not currently supported. Mixing ranges with multiple entries not - // currently supported. Default = null. - RemotePort *string `json:"remotePort,omitempty"` -} - -// PacketCaptureListResult - List of packet capture sessions. -type PacketCaptureListResult struct { - // Information about packet capture sessions. - Value []*PacketCaptureResult `json:"value,omitempty"` -} - -// PacketCaptureMachineScope - A list of AzureVMSS instances which can be included or excluded to run packet capture. If both -// included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. -type PacketCaptureMachineScope struct { - // List of AzureVMSS instances which has to be excluded from the AzureVMSS from running packet capture. - Exclude []*string `json:"exclude,omitempty"` - - // List of AzureVMSS instances to run packet capture on. - Include []*string `json:"include,omitempty"` -} - -// PacketCaptureParameters - Parameters that define the create packet capture operation. -type PacketCaptureParameters struct { - // REQUIRED; The storage location for a packet capture session. - StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` - - // REQUIRED; The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. - Target *string `json:"target,omitempty"` - - // Number of bytes captured per packet, the remaining bytes are truncated. - BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"` - - // A list of packet capture filters. - Filters []*PacketCaptureFilter `json:"filters,omitempty"` - - // A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are - // empty, then the packet capture will run on all instances of AzureVMSS. - Scope *PacketCaptureMachineScope `json:"scope,omitempty"` - - // Target type of the resource provided. - TargetType *PacketCaptureTargetType `json:"targetType,omitempty"` - - // Maximum duration of the capture session in seconds. - TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` - - // Maximum size of the capture output. - TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"` -} - -// PacketCaptureQueryStatusResult - Status of packet capture session. -type PacketCaptureQueryStatusResult struct { - // The start time of the packet capture session. - CaptureStartTime *time.Time `json:"captureStartTime,omitempty"` - - // The ID of the packet capture resource. - ID *string `json:"id,omitempty"` - - // The name of the packet capture resource. - Name *string `json:"name,omitempty"` - - // List of errors of packet capture session. - PacketCaptureError []*PcError `json:"packetCaptureError,omitempty"` - - // The status of the packet capture session. - PacketCaptureStatus *PcStatus `json:"packetCaptureStatus,omitempty"` - - // The reason the current packet capture session was stopped. - StopReason *string `json:"stopReason,omitempty"` -} - -// PacketCaptureResult - Information about packet capture session. -type PacketCaptureResult struct { - // Properties of the packet capture result. - Properties *PacketCaptureResultProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; ID of the packet capture operation. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of the packet capture session. - Name *string `json:"name,omitempty" azure:"ro"` -} - -// PacketCaptureResultProperties - The properties of a packet capture session. -type PacketCaptureResultProperties struct { - // REQUIRED; The storage location for a packet capture session. - StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` - - // REQUIRED; The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. - Target *string `json:"target,omitempty"` - - // Number of bytes captured per packet, the remaining bytes are truncated. - BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"` - - // A list of packet capture filters. - Filters []*PacketCaptureFilter `json:"filters,omitempty"` - - // A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are - // empty, then the packet capture will run on all instances of AzureVMSS. - Scope *PacketCaptureMachineScope `json:"scope,omitempty"` - - // Target type of the resource provided. - TargetType *PacketCaptureTargetType `json:"targetType,omitempty"` - - // Maximum duration of the capture session in seconds. - TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` - - // Maximum size of the capture output. - TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"` - - // READ-ONLY; The provisioning state of the packet capture session. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// PacketCaptureStorageLocation - The storage location for a packet capture session. -type PacketCaptureStorageLocation struct { - // A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it - // must start with /var/captures. Required if no storage ID is provided, otherwise - // optional. - FilePath *string `json:"filePath,omitempty"` - - // The ID of the storage account to save the packet capture session. Required if no local file path is provided. - StorageID *string `json:"storageId,omitempty"` - - // The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet - // capture. - StoragePath *string `json:"storagePath,omitempty"` -} - -// PacketCapturesClientBeginCreateOptions contains the optional parameters for the PacketCapturesClient.BeginCreate method. -type PacketCapturesClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PacketCapturesClientBeginDeleteOptions contains the optional parameters for the PacketCapturesClient.BeginDelete method. -type PacketCapturesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PacketCapturesClientBeginGetStatusOptions contains the optional parameters for the PacketCapturesClient.BeginGetStatus -// method. -type PacketCapturesClientBeginGetStatusOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PacketCapturesClientBeginStopOptions contains the optional parameters for the PacketCapturesClient.BeginStop method. -type PacketCapturesClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PacketCapturesClientGetOptions contains the optional parameters for the PacketCapturesClient.Get method. -type PacketCapturesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.List method. -type PacketCapturesClientListOptions struct { - // placeholder for future optional parameters -} - -// PatchObject - Object for patch operations. -type PatchObject struct { - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` -} - -// PatchRouteFilter - Route Filter Resource. -type PatchRouteFilter struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Properties of the route filter. - Properties *RouteFilterPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PatchRouteFilterRule - Route Filter Rule Resource. -type PatchRouteFilterRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Properties of the route filter rule. - Properties *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty" azure:"ro"` -} - -// PeerExpressRouteCircuitConnection - Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. -type PeerExpressRouteCircuitConnection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the peer express route circuit connection. - Properties *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PeerExpressRouteCircuitConnectionListResult - Response for ListPeeredConnections API service call retrieves all global -// reach peer circuit connections that belongs to a Private Peering for an ExpressRouteCircuit. -type PeerExpressRouteCircuitConnectionListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit. - Value []*PeerExpressRouteCircuitConnection `json:"value,omitempty"` -} - -// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection. -type PeerExpressRouteCircuitConnectionPropertiesFormat struct { - // /29 IP address space to carve out Customer addresses for tunnels. - AddressPrefix *string `json:"addressPrefix,omitempty"` - - // The resource guid of the authorization used for the express route circuit connection. - AuthResourceGUID *string `json:"authResourceGuid,omitempty"` - - // The name of the express route circuit connection resource. - ConnectionName *string `json:"connectionName,omitempty"` - - // Reference to Express Route Circuit Private Peering Resource of the circuit. - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - - // Reference to Express Route Circuit Private Peering Resource of the peered circuit. - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - - // READ-ONLY; Express Route Circuit connection state. - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the peer express route circuit connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// PeerExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.Get -// method. -type PeerExpressRouteCircuitConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.List -// method. -type PeerExpressRouteCircuitConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// PeerRoute - Peer routing details. -type PeerRoute struct { - // READ-ONLY; The route's AS path sequence. - AsPath *string `json:"asPath,omitempty" azure:"ro"` - - // READ-ONLY; The peer's local address. - LocalAddress *string `json:"localAddress,omitempty" azure:"ro"` - - // READ-ONLY; The route's network prefix. - Network *string `json:"network,omitempty" azure:"ro"` - - // READ-ONLY; The route's next hop. - NextHop *string `json:"nextHop,omitempty" azure:"ro"` - - // READ-ONLY; The source this route was learned from. - Origin *string `json:"origin,omitempty" azure:"ro"` - - // READ-ONLY; The peer this route was learned from. - SourcePeer *string `json:"sourcePeer,omitempty" azure:"ro"` - - // READ-ONLY; The route's weight. - Weight *int32 `json:"weight,omitempty" azure:"ro"` -} - -// PeerRouteList - List of virtual router peer routes. -type PeerRouteList struct { - // List of peer routes. - Value []*PeerRoute `json:"value,omitempty"` -} - -// PolicySettings - Defines contents of a web application firewall global configuration. -type PolicySettings struct { - // Maximum file upload size in Mb for WAF. - FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"` - - // Maximum request body size in Kb for WAF. - MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"` - - // The mode of the policy. - Mode *WebApplicationFirewallMode `json:"mode,omitempty"` - - // Whether to allow WAF to check request Body. - RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` - - // The state of the policy. - State *WebApplicationFirewallEnabledState `json:"state,omitempty"` -} - -// PrepareNetworkPoliciesRequest - Details of PrepareNetworkPolicies for Subnet. -type PrepareNetworkPoliciesRequest struct { - // A list of NetworkIntentPolicyConfiguration. - NetworkIntentPolicyConfigurations []*IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"` - - // The name of the service for which subnet is being prepared for. - ServiceName *string `json:"serviceName,omitempty"` -} - -// PrivateDNSZoneConfig - PrivateDnsZoneConfig resource. -type PrivateDNSZoneConfig struct { - // Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the private dns zone configuration. - Properties *PrivateDNSZonePropertiesFormat `json:"properties,omitempty"` -} - -// PrivateDNSZoneGroup - Private dns zone group resource. -type PrivateDNSZoneGroup struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the private dns zone group. - Properties *PrivateDNSZoneGroupPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// PrivateDNSZoneGroupListResult - Response for the ListPrivateDnsZoneGroups API service call. -type PrivateDNSZoneGroupListResult struct { - // A list of private dns zone group resources in a private endpoint. - Value []*PrivateDNSZoneGroup `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PrivateDNSZoneGroupPropertiesFormat - Properties of the private dns zone group. -type PrivateDNSZoneGroupPropertiesFormat struct { - // A collection of private dns zone configurations of the private dns zone group. - PrivateDNSZoneConfigs []*PrivateDNSZoneConfig `json:"privateDnsZoneConfigs,omitempty"` - - // READ-ONLY; The provisioning state of the private dns zone group resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginCreateOrUpdate -// method. -type PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateDNSZoneGroupsClientBeginDeleteOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginDelete -// method. -type PrivateDNSZoneGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateDNSZoneGroupsClientGetOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.Get method. -type PrivateDNSZoneGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.List method. -type PrivateDNSZoneGroupsClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateDNSZonePropertiesFormat - Properties of the private dns zone configuration resource. -type PrivateDNSZonePropertiesFormat struct { - // The resource id of the private dns zone. - PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty"` - - // READ-ONLY; A collection of information regarding a recordSet, holding information to identify private resources. - RecordSets []*RecordSet `json:"recordSets,omitempty" azure:"ro"` -} - -// PrivateEndpoint - Private endpoint resource. -type PrivateEndpoint struct { - // The extended location of the load balancer. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the private endpoint. - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateEndpointConnection resource. -type PrivateEndpointConnection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the private end point connection. - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateEndpointConnectionListResult - Response for the ListPrivateEndpointConnection API service call. -type PrivateEndpointConnectionListResult struct { - // A list of PrivateEndpointConnection resources for a specific private link service. - Value []*PrivateEndpointConnection `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. -type PrivateEndpointConnectionProperties struct { - // A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - - // READ-ONLY; The consumer link id. - LinkIdentifier *string `json:"linkIdentifier,omitempty" azure:"ro"` - - // READ-ONLY; The resource of private end point. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the private endpoint connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// PrivateEndpointIPConfiguration - An IP Configuration of the private endpoint. -type PrivateEndpointIPConfiguration struct { - // The name of the resource that is unique within a resource group. - Name *string `json:"name,omitempty"` - - // Properties of private endpoint IP configurations. - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateEndpointIPConfigurationProperties - Properties of an IP Configuration of the private endpoint. -type PrivateEndpointIPConfigurationProperties struct { - // The ID of a group obtained from the remote resource that this private endpoint should connect to. - GroupID *string `json:"groupId,omitempty"` - - // The member name of a group obtained from the remote resource that this private endpoint should connect to. - MemberName *string `json:"memberName,omitempty"` - - // A private ip address obtained from the private endpoint's subnet. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} - -// PrivateEndpointListResult - Response for the ListPrivateEndpoints API service call. -type PrivateEndpointListResult struct { - // A list of private endpoint resources in a resource group. - Value []*PrivateEndpoint `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PrivateEndpointProperties - Properties of the private endpoint. -type PrivateEndpointProperties struct { - // Application security groups in which the private endpoint IP configuration is included. - ApplicationSecurityGroups []*ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - - // An array of custom dns configurations. - CustomDNSConfigs []*CustomDNSConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - - // The custom name of the network interface attached to the private endpoint. - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - - // A list of IP configurations of the private endpoint. This will be used to map to the First Party Service's endpoints. - IPConfigurations []*PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - - // A grouping of information about the connection to the remote resource. Used when the network admin does not have access - // to approve connections to the remote resource. - ManualPrivateLinkServiceConnections []*PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - - // A grouping of information about the connection to the remote resource. - PrivateLinkServiceConnections []*PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - - // The ID of the subnet from which the private IP will be allocated. - Subnet *Subnet `json:"subnet,omitempty"` - - // READ-ONLY; An array of references to the network interfaces created for this private endpoint. - NetworkInterfaces []*Interface `json:"networkInterfaces,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the private endpoint resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// PrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.BeginCreateOrUpdate -// method. -type PrivateEndpointsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete method. -type PrivateEndpointsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. -type PrivateEndpointsClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.ListBySubscription -// method. -type PrivateEndpointsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.List method. -type PrivateEndpointsClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkService - Private link service resource. -type PrivateLinkService struct { - // The extended location of the load balancer. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the private link service. - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateLinkServiceConnection resource. -type PrivateLinkServiceConnection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the private link service connection. - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateLinkServiceConnectionProperties - Properties of the PrivateLinkServiceConnection. -type PrivateLinkServiceConnectionProperties struct { - // The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. - GroupIDs []*string `json:"groupIds,omitempty"` - - // A collection of read-only information about the state of the connection to the remote resource. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - - // The resource id of private link service. - PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"` - - // A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. - RequestMessage *string `json:"requestMessage,omitempty"` - - // READ-ONLY; The provisioning state of the private link service connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer -// and provider. -type PrivateLinkServiceConnectionState struct { - // A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *string `json:"actionsRequired,omitempty"` - - // The reason for approval/rejection of the connection. - Description *string `json:"description,omitempty"` - - // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - Status *string `json:"status,omitempty"` -} - -// PrivateLinkServiceIPConfiguration - The private link service ip configuration. -type PrivateLinkServiceIPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of private link service ip configuration. - Name *string `json:"name,omitempty"` - - // Properties of the private link service ip configuration. - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; The resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateLinkServiceIPConfigurationProperties - Properties of private link service IP configuration. -type PrivateLinkServiceIPConfigurationProperties struct { - // Whether the ip configuration is primary or not. - Primary *bool `json:"primary,omitempty"` - - // The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - - // Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - - // The private IP address allocation method. - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - - // The reference to the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - - // READ-ONLY; The provisioning state of the private link service IP configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// PrivateLinkServiceListResult - Response for the ListPrivateLinkService API service call. -type PrivateLinkServiceListResult struct { - // A list of PrivateLinkService resources in a resource group. - Value []*PrivateLinkService `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// PrivateLinkServiceProperties - Properties of the private link service. -type PrivateLinkServiceProperties struct { - // The auto-approval list of the private link service. - AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"` - - // Whether the private link service is enabled for proxy protocol or not. - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - - // The list of Fqdn. - Fqdns []*string `json:"fqdns,omitempty"` - - // An array of private link service IP configurations. - IPConfigurations []*PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - - // An array of references to the load balancer IP configurations. - LoadBalancerFrontendIPConfigurations []*FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - - // The visibility list of the private link service. - Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"` - - // READ-ONLY; The alias of the private link service. - Alias *string `json:"alias,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to the network interfaces created for this private link service. - NetworkInterfaces []*Interface `json:"networkInterfaces,omitempty" azure:"ro"` - - // READ-ONLY; An array of list about connections to the private endpoint. - PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the private link service resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// PrivateLinkServicePropertiesAutoApproval - The auto-approval list of the private link service. -type PrivateLinkServicePropertiesAutoApproval struct { - // The list of subscriptions. - Subscriptions []*string `json:"subscriptions,omitempty"` -} - -// PrivateLinkServicePropertiesVisibility - The visibility list of the private link service. -type PrivateLinkServicePropertiesVisibility struct { - // The list of subscriptions. - Subscriptions []*string `json:"subscriptions,omitempty"` -} - -// PrivateLinkServiceVisibility - Response for the CheckPrivateLinkServiceVisibility API service call. -type PrivateLinkServiceVisibility struct { - // Private Link Service Visibility (True/False). - Visible *bool `json:"visible,omitempty"` -} - -// PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions contains the optional parameters -// for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup method. -type PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility -// method. -type PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateLinkServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCreateOrUpdate -// method. -type PrivateLinkServicesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateLinkServicesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDelete -// method. -type PrivateLinkServicesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection -// method. -type PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateLinkServicesClientGetOptions contains the optional parameters for the PrivateLinkServicesClient.Get method. -type PrivateLinkServicesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// PrivateLinkServicesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.GetPrivateEndpointConnection -// method. -type PrivateLinkServicesClientGetPrivateEndpointConnectionOptions struct { - // Expands referenced resources. - Expand *string -} - -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters for -// the PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup method. -type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices -// method. -type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.ListBySubscription -// method. -type PrivateLinkServicesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.List method. -type PrivateLinkServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.ListPrivateEndpointConnections -// method. -type PrivateLinkServicesClientListPrivateEndpointConnectionsOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.UpdatePrivateEndpointConnection -// method. -type PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions struct { - // placeholder for future optional parameters -} - -// Probe - A load balancer probe. -type Probe struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access - // the resource. - Name *string `json:"name,omitempty"` - - // Properties of load balancer probe. - Properties *ProbePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Type of the resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProbePropertiesFormat - Load balancer probe resource. -type ProbePropertiesFormat struct { - // REQUIRED; The port for communicating the probe. Possible values range from 1 to 65535, inclusive. - Port *int32 `json:"port,omitempty"` - - // REQUIRED; The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. - // If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required - // for the probe to be successful. - Protocol *ProbeProtocol `json:"protocol,omitempty"` - - // The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly - // less than half the allocated timeout period (in seconds) which allows two full - // probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. - IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` - - // The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. - // This values allows endpoints to be taken out of rotation faster or slower than - // the typical times used in Azure. - NumberOfProbes *int32 `json:"numberOfProbes,omitempty"` - - // The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is - // not allowed. There is no default value. - RequestPath *string `json:"requestPath,omitempty"` - - // READ-ONLY; The load balancer rules that use this probe. - LoadBalancingRules []*SubResource `json:"loadBalancingRules,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the probe resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// Profile - Network profile resource. -type Profile struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Network profile properties. - Properties *ProfilePropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProfileListResult - Response for ListNetworkProfiles API service call. -type ProfileListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of network profiles that exist in a resource group. - Value []*Profile `json:"value,omitempty"` -} - -// ProfilePropertiesFormat - Network profile properties. -type ProfilePropertiesFormat struct { - // List of chid container network interface configurations. - ContainerNetworkInterfaceConfigurations []*ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"` - - // READ-ONLY; List of child container network interfaces. - ContainerNetworkInterfaces []*ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the network profile resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the network profile resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. -type ProfilesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ProfilesClientCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.CreateOrUpdate method. -type ProfilesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. -type ProfilesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.ListAll method. -type ProfilesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientListOptions contains the optional parameters for the ProfilesClient.List method. -type ProfilesClientListOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientUpdateTagsOptions contains the optional parameters for the ProfilesClient.UpdateTags method. -type ProfilesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// PropagatedRouteTable - The list of RouteTables to advertise the routes to. -type PropagatedRouteTable struct { - // The list of resource ids of all the RouteTables. - IDs []*SubResource `json:"ids,omitempty"` - - // The list of labels. - Labels []*string `json:"labels,omitempty"` -} - -// ProtocolConfiguration - Configuration of the protocol. -type ProtocolConfiguration struct { - // HTTP configuration of the connectivity check. - HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"` -} - -// ProtocolCustomSettingsFormat - DDoS custom policy properties. -type ProtocolCustomSettingsFormat struct { - // The protocol for which the DDoS protection policy is being customized. - Protocol *DdosCustomPolicyProtocol `json:"protocol,omitempty"` - - // The customized DDoS protection source rate. - SourceRateOverride *string `json:"sourceRateOverride,omitempty"` - - // The customized DDoS protection trigger rate. - TriggerRateOverride *string `json:"triggerRateOverride,omitempty"` - - // The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal - // traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal - // traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity - // w.r.t. normal traffic. - TriggerSensitivityOverride *DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"` -} - -// PublicIPAddress - Public IP address resource. -type PublicIPAddress struct { - // The extended location of the public ip address. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Public IP address properties. - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - - // The public IP address SKU. - SKU *PublicIPAddressSKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // A list of availability zones denoting the IP allocated for the resource needs to come from. - Zones []*string `json:"zones,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PublicIPAddressDNSSettings - Contains FQDN of the DNS record associated with the public IP address. -type PublicIPAddressDNSSettings struct { - // The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified - // domain name associated with the public IP address. If a domain name label is - // specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - - // The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel - // and the regionalized DNS zone. - Fqdn *string `json:"fqdn,omitempty"` - - // The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn - // is specified, then a PTR DNS record is created pointing from the IP address in - // the in-addr.arpa domain to the reverse FQDN. - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} - -// PublicIPAddressListResult - Response for ListPublicIpAddresses API service call. -type PublicIPAddressListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of public IP addresses that exists in a resource group. - Value []*PublicIPAddress `json:"value,omitempty"` -} - -// PublicIPAddressPropertiesFormat - Public IP address properties. -type PublicIPAddressPropertiesFormat struct { - // The FQDN of the DNS record associated with the public IP address. - DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"` - - // The DDoS protection custom policy associated with the public IP address. - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - - // Specify what happens to the public IP address when the VM using it is deleted - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - - // The IP address associated with the public IP address resource. - IPAddress *string `json:"ipAddress,omitempty"` - - // The list of tags associated with the public IP address. - IPTags []*IPTag `json:"ipTags,omitempty"` - - // The idle timeout of the public IP address. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - - // The linked public IP address of the public IP address resource. - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - - // Migration phase of Public IP Address. - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - - // The NatGateway for the Public IP address. - NatGateway *NatGateway `json:"natGateway,omitempty"` - - // The public IP address version. - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - - // The public IP address allocation method. - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - - // The Public IP Prefix this Public IP Address should be allocated from. - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - - // The service public IP address of the public IP address resource. - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` - - // READ-ONLY; The IP configuration associated with the public IP address. - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the public IP address resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the public IP address resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// PublicIPAddressSKU - SKU of a public IP address. -type PublicIPAddressSKU struct { - // Name of a public IP address SKU. - Name *PublicIPAddressSKUName `json:"name,omitempty"` - - // Tier of a public IP address SKU. - Tier *PublicIPAddressSKUTier `json:"tier,omitempty"` -} - -// PublicIPAddressesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPAddressesClient.BeginCreateOrUpdate -// method. -type PublicIPAddressesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PublicIPAddressesClientBeginDeleteOptions contains the optional parameters for the PublicIPAddressesClient.BeginDelete -// method. -type PublicIPAddressesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PublicIPAddressesClientGetCloudServicePublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetCloudServicePublicIPAddress -// method. -type PublicIPAddressesClientGetCloudServicePublicIPAddressOptions struct { - // Expands referenced resources. - Expand *string -} - -// PublicIPAddressesClientGetOptions contains the optional parameters for the PublicIPAddressesClient.Get method. -type PublicIPAddressesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress -// method. -type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions struct { - // Expands referenced resources. - Expand *string -} - -// PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.ListAll method. -type PublicIPAddressesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListCloudServicePublicIPAddresses -// method. -type PublicIPAddressesClientListCloudServicePublicIPAddressesOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses -// method. -type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.List method. -type PublicIPAddressesClientListOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses -// method. -type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses -// method. -type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientUpdateTagsOptions contains the optional parameters for the PublicIPAddressesClient.UpdateTags method. -type PublicIPAddressesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// PublicIPPrefix - Public IP prefix resource. -type PublicIPPrefix struct { - // The extended location of the public ip address. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Public IP prefix properties. - Properties *PublicIPPrefixPropertiesFormat `json:"properties,omitempty"` - - // The public IP prefix SKU. - SKU *PublicIPPrefixSKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // A list of availability zones denoting the IP allocated for the resource needs to come from. - Zones []*string `json:"zones,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PublicIPPrefixListResult - Response for ListPublicIpPrefixes API service call. -type PublicIPPrefixListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of public IP prefixes that exists in a resource group. - Value []*PublicIPPrefix `json:"value,omitempty"` -} - -// PublicIPPrefixPropertiesFormat - Public IP prefix properties. -type PublicIPPrefixPropertiesFormat struct { - // The customIpPrefix that this prefix is associated with. - CustomIPPrefix *SubResource `json:"customIPPrefix,omitempty"` - - // The list of tags associated with the public IP prefix. - IPTags []*IPTag `json:"ipTags,omitempty"` - - // NatGateway of Public IP Prefix. - NatGateway *NatGateway `json:"natGateway,omitempty"` - - // The Length of the Public IP Prefix. - PrefixLength *int32 `json:"prefixLength,omitempty"` - - // The public IP address version. - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - - // READ-ONLY; The allocated Prefix. - IPPrefix *string `json:"ipPrefix,omitempty" azure:"ro"` - - // READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix. - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the public IP prefix resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The list of all referenced PublicIPAddresses. - PublicIPAddresses []*ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the public IP prefix resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// PublicIPPrefixSKU - SKU of a public IP prefix. -type PublicIPPrefixSKU struct { - // Name of a public IP prefix SKU. - Name *PublicIPPrefixSKUName `json:"name,omitempty"` - - // Tier of a public IP prefix SKU. - Tier *PublicIPPrefixSKUTier `json:"tier,omitempty"` -} - -// PublicIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPPrefixesClient.BeginCreateOrUpdate -// method. -type PublicIPPrefixesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete method. -type PublicIPPrefixesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PublicIPPrefixesClientGetOptions contains the optional parameters for the PublicIPPrefixesClient.Get method. -type PublicIPPrefixesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.ListAll method. -type PublicIPPrefixesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.List method. -type PublicIPPrefixesClientListOptions struct { - // placeholder for future optional parameters -} - -// PublicIPPrefixesClientUpdateTagsOptions contains the optional parameters for the PublicIPPrefixesClient.UpdateTags method. -type PublicIPPrefixesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// QosDefinition - Quality of Service defines the traffic configuration between endpoints. Mandatory to have one marking. -type QosDefinition struct { - // Destination IP ranges. - DestinationIPRanges []*QosIPRange `json:"destinationIpRanges,omitempty"` - - // Destination port ranges. - DestinationPortRanges []*QosPortRange `json:"destinationPortRanges,omitempty"` - - // List of markings to be used in the configuration. - Markings []*int32 `json:"markings,omitempty"` - - // RNM supported protocol types. - Protocol *ProtocolType `json:"protocol,omitempty"` - - // Source IP ranges. - SourceIPRanges []*QosIPRange `json:"sourceIpRanges,omitempty"` - - // Sources port ranges. - SourcePortRanges []*QosPortRange `json:"sourcePortRanges,omitempty"` -} - -// QosIPRange - Qos Traffic Profiler IP Range properties. -type QosIPRange struct { - // End IP Address. - EndIP *string `json:"endIP,omitempty"` - - // Start IP Address. - StartIP *string `json:"startIP,omitempty"` -} - -// QosPortRange - Qos Traffic Profiler Port range properties. -type QosPortRange struct { - // Qos Port Range end. - End *int32 `json:"end,omitempty"` - - // Qos Port Range start. - Start *int32 `json:"start,omitempty"` -} - -// QueryInboundNatRulePortMappingRequest - The request for a QueryInboundNatRulePortMapping API. Either IpConfiguration or -// IpAddress should be set -type QueryInboundNatRulePortMappingRequest struct { - // IP address set in load balancer backend address. - IPAddress *string `json:"ipAddress,omitempty"` - - // NetworkInterfaceIPConfiguration set in load balancer backend address. - IPConfiguration *SubResource `json:"ipConfiguration,omitempty"` -} - -// QueryRequestOptions - Query Request Options -type QueryRequestOptions struct { - // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current - // request) to retrieve the next page of data. - SkipToken *string `json:"skipToken,omitempty"` -} - -// QueryResults - Query result -type QueryResults struct { - // Number of total records matching the query. - MatchingRecordsCount *int64 `json:"matchingRecordsCount,omitempty"` - - // Array containing the results of the query - Signatures []*SingleQueryResult `json:"signatures,omitempty"` -} - -// QueryTroubleshootingParameters - Parameters that define the resource to query the troubleshooting result. -type QueryTroubleshootingParameters struct { - // REQUIRED; The target resource ID to query the troubleshooting result. - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// RadiusServer - Radius Server Settings. -type RadiusServer struct { - // REQUIRED; The address of this radius server. - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - - // The initial score assigned to this radius server. - RadiusServerScore *int64 `json:"radiusServerScore,omitempty"` - - // The secret used for this radius server. - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` -} - -// RecordSet - A collective group of information about the record set information. -type RecordSet struct { - // Fqdn that resolves to private endpoint ip address. - Fqdn *string `json:"fqdn,omitempty"` - - // The private ip address of the private endpoint. - IPAddresses []*string `json:"ipAddresses,omitempty"` - - // Recordset name. - RecordSetName *string `json:"recordSetName,omitempty"` - - // Resource record type. - RecordType *string `json:"recordType,omitempty"` - - // Recordset time to live. - TTL *int32 `json:"ttl,omitempty"` - - // READ-ONLY; The provisioning state of the recordset. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ReferencedPublicIPAddress - Reference to a public IP address. -type ReferencedPublicIPAddress struct { - // The PublicIPAddress Reference. - ID *string `json:"id,omitempty"` -} - -// Resource - Common resource representation. -type Resource struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceNavigationLink resource. -type ResourceNavigationLink struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Resource navigation link properties format. - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceNavigationLinkFormat - Properties of ResourceNavigationLink. -type ResourceNavigationLinkFormat struct { - // Link to the external resource. - Link *string `json:"link,omitempty"` - - // Resource type of the linked resource. - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - - // READ-ONLY; The provisioning state of the resource navigation link resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ResourceNavigationLinksClientListOptions contains the optional parameters for the ResourceNavigationLinksClient.List method. -type ResourceNavigationLinksClientListOptions struct { - // placeholder for future optional parameters -} - -// ResourceNavigationLinksListResult - Response for ResourceNavigationLinks_List operation. -type ResourceNavigationLinksListResult struct { - // The resource navigation links in a subnet. - Value []*ResourceNavigationLink `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ResourceSet - The base resource set for visibility and auto-approval. -type ResourceSet struct { - // The list of subscriptions. - Subscriptions []*string `json:"subscriptions,omitempty"` -} - -// RetentionPolicyParameters - Parameters that define the retention policy for flow log. -type RetentionPolicyParameters struct { - // Number of days to retain flow log records. - Days *int32 `json:"days,omitempty"` - - // Flag to enable/disable retention. - Enabled *bool `json:"enabled,omitempty"` -} - -// Route resource. -type Route struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the route. - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - - // The type of the resource. - Type *string `json:"type,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// RouteFilter - Route Filter Resource. -type RouteFilter struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the route filter. - Properties *RouteFilterPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RouteFilterListResult - Response for the ListRouteFilters API service call. -type RouteFilterListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of route filters in a resource group. - Value []*RouteFilter `json:"value,omitempty"` -} - -// RouteFilterPropertiesFormat - Route Filter Resource. -type RouteFilterPropertiesFormat struct { - // Collection of RouteFilterRules contained within a route filter. - Rules []*RouteFilterRule `json:"rules,omitempty"` - - // READ-ONLY; A collection of references to express route circuit ipv6 peerings. - IPv6Peerings []*ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty" azure:"ro"` - - // READ-ONLY; A collection of references to express route circuit peerings. - Peerings []*ExpressRouteCircuitPeering `json:"peerings,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the route filter resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// RouteFilterRule - Route Filter Rule Resource. -type RouteFilterRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the route filter rule. - Properties *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// RouteFilterRuleListResult - Response for the ListRouteFilterRules API service call. -type RouteFilterRuleListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of RouteFilterRules in a resource group. - Value []*RouteFilterRule `json:"value,omitempty"` -} - -// RouteFilterRulePropertiesFormat - Route Filter Rule Resource. -type RouteFilterRulePropertiesFormat struct { - // REQUIRED; The access type of the rule. - Access *Access `json:"access,omitempty"` - - // REQUIRED; The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. - Communities []*string `json:"communities,omitempty"` - - // REQUIRED; The rule type of the rule. - RouteFilterRuleType *RouteFilterRuleType `json:"routeFilterRuleType,omitempty"` - - // READ-ONLY; The provisioning state of the route filter rule resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// RouteFilterRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFilterRulesClient.BeginCreateOrUpdate -// method. -type RouteFilterRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteFilterRulesClientBeginDeleteOptions contains the optional parameters for the RouteFilterRulesClient.BeginDelete method. -type RouteFilterRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteFilterRulesClientGetOptions contains the optional parameters for the RouteFilterRulesClient.Get method. -type RouteFilterRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.ListByRouteFilter -// method. -type RouteFilterRulesClientListByRouteFilterOptions struct { - // placeholder for future optional parameters -} - -// RouteFiltersClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFiltersClient.BeginCreateOrUpdate -// method. -type RouteFiltersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteFiltersClientBeginDeleteOptions contains the optional parameters for the RouteFiltersClient.BeginDelete method. -type RouteFiltersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteFiltersClientGetOptions contains the optional parameters for the RouteFiltersClient.Get method. -type RouteFiltersClientGetOptions struct { - // Expands referenced express route bgp peering resources. - Expand *string -} - -// RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.ListByResourceGroup -// method. -type RouteFiltersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.List method. -type RouteFiltersClientListOptions struct { - // placeholder for future optional parameters -} - -// RouteFiltersClientUpdateTagsOptions contains the optional parameters for the RouteFiltersClient.UpdateTags method. -type RouteFiltersClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// RouteListResult - Response for the ListRoute API service call. -type RouteListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of routes in a resource group. - Value []*Route `json:"value,omitempty"` -} - -// RoutePropertiesFormat - Route resource. -type RoutePropertiesFormat struct { - // REQUIRED; The type of Azure hop the packet should be sent to. - NextHopType *RouteNextHopType `json:"nextHopType,omitempty"` - - // The destination CIDR to which the route applies. - AddressPrefix *string `json:"addressPrefix,omitempty"` - - // A value indicating whether this route overrides overlapping BGP routes regardless of LPM. - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - - // The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - - // READ-ONLY; The provisioning state of the route resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// RouteTable - Route table resource. -type RouteTable struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the route table. - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RouteTableListResult - Response for the ListRouteTable API service call. -type RouteTableListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of route tables in a resource group. - Value []*RouteTable `json:"value,omitempty"` -} - -// RouteTablePropertiesFormat - Route Table resource. -type RouteTablePropertiesFormat struct { - // Whether to disable the routes learned by BGP on that route table. True means disable. - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - - // Collection of routes contained within a route table. - Routes []*Route `json:"routes,omitempty"` - - // READ-ONLY; The provisioning state of the route table resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the route table. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` - - // READ-ONLY; A collection of references to subnets. - Subnets []*Subnet `json:"subnets,omitempty" azure:"ro"` -} - -// RouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteTablesClient.BeginCreateOrUpdate -// method. -type RouteTablesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteTablesClientBeginDeleteOptions contains the optional parameters for the RouteTablesClient.BeginDelete method. -type RouteTablesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteTablesClientGetOptions contains the optional parameters for the RouteTablesClient.Get method. -type RouteTablesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.ListAll method. -type RouteTablesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.List method. -type RouteTablesClientListOptions struct { - // placeholder for future optional parameters -} - -// RouteTablesClientUpdateTagsOptions contains the optional parameters for the RouteTablesClient.UpdateTags method. -type RouteTablesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// RoutesClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutesClient.BeginCreateOrUpdate method. -type RoutesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. -type RoutesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. -type RoutesClientGetOptions struct { - // placeholder for future optional parameters -} - -// RoutesClientListOptions contains the optional parameters for the RoutesClient.List method. -type RoutesClientListOptions struct { - // placeholder for future optional parameters -} - -// RoutingConfiguration - Routing Configuration indicating the associated and propagated route tables for this connection. -type RoutingConfiguration struct { - // The resource id RouteTable associated with this RoutingConfiguration. - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - - // The list of RouteTables to advertise the routes to. - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - - // List of routes that control routing from VirtualHub into a virtual network connection. - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} - -// RoutingIntent - The routing intent child resource of a Virtual hub. -type RoutingIntent struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the RoutingIntent resource. - Properties *RoutingIntentProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RoutingIntentClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutingIntentClient.BeginCreateOrUpdate -// method. -type RoutingIntentClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutingIntentClientBeginDeleteOptions contains the optional parameters for the RoutingIntentClient.BeginDelete method. -type RoutingIntentClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutingIntentClientGetOptions contains the optional parameters for the RoutingIntentClient.Get method. -type RoutingIntentClientGetOptions struct { - // placeholder for future optional parameters -} - -// RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.List method. -type RoutingIntentClientListOptions struct { - // placeholder for future optional parameters -} - -// RoutingIntentProperties - The properties of a RoutingIntent resource. -type RoutingIntentProperties struct { - // List of routing policies. - RoutingPolicies []*RoutingPolicy `json:"routingPolicies,omitempty"` - - // READ-ONLY; The provisioning state of the RoutingIntent resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// RoutingPolicy - The routing policy object used in a RoutingIntent resource. -type RoutingPolicy struct { - // REQUIRED; List of all destinations which this routing policy is applicable to (for example: Internet, PrivateTraffic). - Destinations []*string `json:"destinations,omitempty"` - - // REQUIRED; The unique name for the routing policy. - Name *string `json:"name,omitempty"` - - // REQUIRED; The next hop resource id on which this routing policy is applicable to. - NextHop *string `json:"nextHop,omitempty"` -} - -// Rule of type network. -type Rule struct { - // REQUIRED; Rule Type. - RuleType *FirewallPolicyRuleType `json:"ruleType,omitempty"` - - // Description of the rule. - Description *string `json:"description,omitempty"` - - // List of destination IP addresses or Service Tags. - DestinationAddresses []*string `json:"destinationAddresses,omitempty"` - - // List of destination FQDNs. - DestinationFqdns []*string `json:"destinationFqdns,omitempty"` - - // List of destination IpGroups for this rule. - DestinationIPGroups []*string `json:"destinationIpGroups,omitempty"` - - // List of destination ports. - DestinationPorts []*string `json:"destinationPorts,omitempty"` - - // Array of FirewallPolicyRuleNetworkProtocols. - IPProtocols []*FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"` - - // Name of the rule. - Name *string `json:"name,omitempty"` - - // List of source IP addresses for this rule. - SourceAddresses []*string `json:"sourceAddresses,omitempty"` - - // List of source IpGroups for this rule. - SourceIPGroups []*string `json:"sourceIpGroups,omitempty"` -} - -// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type Rule. -func (r *Rule) GetFirewallPolicyRule() *FirewallPolicyRule { - return &FirewallPolicyRule{ - Name: r.Name, - Description: r.Description, - RuleType: r.RuleType, - } -} - -// SKU - The sku of this Bastion Host. -type SKU struct { - // The name of this Bastion Host. - Name *BastionHostSKUName `json:"name,omitempty"` -} - -// ScopeConnection - The Scope Connections resource -type ScopeConnection struct { - // The scope connection properties - Properties *ScopeConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ScopeConnectionListResult - List of scope connections. -type ScopeConnectionListResult struct { - // Gets the URL to get the next page of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of scope connections. - Value []*ScopeConnection `json:"value,omitempty"` -} - -// ScopeConnectionProperties - Scope connection. -type ScopeConnectionProperties struct { - // A description of the scope connection. - Description *string `json:"description,omitempty"` - - // Resource ID. - ResourceID *string `json:"resourceId,omitempty"` - - // Tenant ID. - TenantID *string `json:"tenantId,omitempty"` - - // READ-ONLY; Connection State - ConnectionState *ScopeConnectionState `json:"connectionState,omitempty" azure:"ro"` -} - -// ScopeConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ScopeConnectionsClient.CreateOrUpdate -// method. -type ScopeConnectionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ScopeConnectionsClientDeleteOptions contains the optional parameters for the ScopeConnectionsClient.Delete method. -type ScopeConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ScopeConnectionsClientGetOptions contains the optional parameters for the ScopeConnectionsClient.Get method. -type ScopeConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ScopeConnectionsClientListOptions contains the optional parameters for the ScopeConnectionsClient.List method. -type ScopeConnectionsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// SecurityAdminConfiguration - Defines the security admin configuration -type SecurityAdminConfiguration struct { - // Indicates the properties for the network manager security admin configuration. - Properties *SecurityAdminConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SecurityAdminConfigurationListResult - A list of network manager security admin configurations -type SecurityAdminConfigurationListResult struct { - // Gets the URL to get the next page of results. - NextLink *string `json:"nextLink,omitempty"` - - // Gets a page of security admin configurations - Value []*SecurityAdminConfiguration `json:"value,omitempty"` -} - -// SecurityAdminConfigurationPropertiesFormat - Defines the security admin configuration properties. -type SecurityAdminConfigurationPropertiesFormat struct { - // Enum list of network intent policy based services. - ApplyOnNetworkIntentPolicyBasedServices []*NetworkIntentPolicyBasedService `json:"applyOnNetworkIntentPolicyBasedServices,omitempty"` - - // A description of the security configuration. - Description *string `json:"description,omitempty"` - - // READ-ONLY; The provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// SecurityAdminConfigurationsClientBeginDeleteOptions contains the optional parameters for the SecurityAdminConfigurationsClient.BeginDelete -// method. -type SecurityAdminConfigurationsClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityAdminConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the SecurityAdminConfigurationsClient.CreateOrUpdate -// method. -type SecurityAdminConfigurationsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SecurityAdminConfigurationsClientGetOptions contains the optional parameters for the SecurityAdminConfigurationsClient.Get -// method. -type SecurityAdminConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecurityAdminConfigurationsClientListOptions contains the optional parameters for the SecurityAdminConfigurationsClient.List -// method. -type SecurityAdminConfigurationsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// SecurityGroup - NetworkSecurityGroup resource. -type SecurityGroup struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the network security group. - Properties *SecurityGroupPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SecurityGroupListResult - Response for ListNetworkSecurityGroups API service call. -type SecurityGroupListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of NetworkSecurityGroup resources. - Value []*SecurityGroup `json:"value,omitempty"` -} - -// SecurityGroupNetworkInterface - Network interface and all its associated security rules. -type SecurityGroupNetworkInterface struct { - // ID of the network interface. - ID *string `json:"id,omitempty"` - - // All security rules associated with the network interface. - SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` -} - -// SecurityGroupPropertiesFormat - Network Security Group resource. -type SecurityGroupPropertiesFormat struct { - // When enabled, flows created from Network Security Group connections will be re-evaluated when rules are updates. Initial - // enablement will trigger re-evaluation. - FlushConnection *bool `json:"flushConnection,omitempty"` - - // A collection of security rules of the network security group. - SecurityRules []*SecurityRule `json:"securityRules,omitempty"` - - // READ-ONLY; The default security rules of network security group. - DefaultSecurityRules []*SecurityRule `json:"defaultSecurityRules,omitempty" azure:"ro"` - - // READ-ONLY; A collection of references to flow log resources. - FlowLogs []*FlowLog `json:"flowLogs,omitempty" azure:"ro"` - - // READ-ONLY; A collection of references to network interfaces. - NetworkInterfaces []*Interface `json:"networkInterfaces,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the network security group resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the network security group resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` - - // READ-ONLY; A collection of references to subnets. - Subnets []*Subnet `json:"subnets,omitempty" azure:"ro"` -} - -// SecurityGroupResult - Network configuration diagnostic result corresponded provided traffic query. -type SecurityGroupResult struct { - // The network traffic is allowed or denied. - SecurityRuleAccessResult *SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"` - - // READ-ONLY; List of results network security groups diagnostic. - EvaluatedNetworkSecurityGroups []*EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty" azure:"ro"` -} - -// SecurityGroupViewParameters - Parameters that define the VM to check security groups for. -type SecurityGroupViewParameters struct { - // REQUIRED; ID of the target VM. - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// SecurityGroupViewResult - The information about security rules applied to the specified VM. -type SecurityGroupViewResult struct { - // List of network interfaces on the specified VM. - NetworkInterfaces []*SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` -} - -// SecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityGroupsClient.BeginCreateOrUpdate -// method. -type SecurityGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityGroupsClientBeginDeleteOptions contains the optional parameters for the SecurityGroupsClient.BeginDelete method. -type SecurityGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityGroupsClientGetOptions contains the optional parameters for the SecurityGroupsClient.Get method. -type SecurityGroupsClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.ListAll method. -type SecurityGroupsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.List method. -type SecurityGroupsClientListOptions struct { - // placeholder for future optional parameters -} - -// SecurityGroupsClientUpdateTagsOptions contains the optional parameters for the SecurityGroupsClient.UpdateTags method. -type SecurityGroupsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// SecurityPartnerProvider - Security Partner Provider resource. -type SecurityPartnerProvider struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the Security Partner Provider. - Properties *SecurityPartnerProviderPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SecurityPartnerProviderListResult - Response for ListSecurityPartnerProviders API service call. -type SecurityPartnerProviderListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Security Partner Providers in a resource group. - Value []*SecurityPartnerProvider `json:"value,omitempty"` -} - -// SecurityPartnerProviderPropertiesFormat - Properties of the Security Partner Provider. -type SecurityPartnerProviderPropertiesFormat struct { - // The security provider name. - SecurityProviderName *SecurityProviderName `json:"securityProviderName,omitempty"` - - // The virtualHub to which the Security Partner Provider belongs. - VirtualHub *SubResource `json:"virtualHub,omitempty"` - - // READ-ONLY; The connection status with the Security Partner Provider. - ConnectionStatus *SecurityPartnerProviderConnectionStatus `json:"connectionStatus,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the Security Partner Provider resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// SecurityPartnerProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginCreateOrUpdate -// method. -type SecurityPartnerProvidersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityPartnerProvidersClientBeginDeleteOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginDelete -// method. -type SecurityPartnerProvidersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityPartnerProvidersClientGetOptions contains the optional parameters for the SecurityPartnerProvidersClient.Get method. -type SecurityPartnerProvidersClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.ListByResourceGroup -// method. -type SecurityPartnerProvidersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.List -// method. -type SecurityPartnerProvidersClientListOptions struct { - // placeholder for future optional parameters -} - -// SecurityPartnerProvidersClientUpdateTagsOptions contains the optional parameters for the SecurityPartnerProvidersClient.UpdateTags -// method. -type SecurityPartnerProvidersClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// SecurityRule - Network security rule. -type SecurityRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the security rule. - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - - // The type of the resource. - Type *string `json:"type,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// SecurityRuleAssociations - All security rules associated with the network interface. -type SecurityRuleAssociations struct { - // Collection of default security rules of the network security group. - DefaultSecurityRules []*SecurityRule `json:"defaultSecurityRules,omitempty"` - - // Collection of effective security rules. - EffectiveSecurityRules []*EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` - - // Network interface and it's custom security rules. - NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` - - // Subnet and it's custom security rules. - SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` -} - -// SecurityRuleListResult - Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a -// network security group. -type SecurityRuleListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The security rules in a network security group. - Value []*SecurityRule `json:"value,omitempty"` -} - -// SecurityRulePropertiesFormat - Security rule resource. -type SecurityRulePropertiesFormat struct { - // REQUIRED; The network traffic is allowed or denied. - Access *SecurityRuleAccess `json:"access,omitempty"` - - // REQUIRED; The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. - Direction *SecurityRuleDirection `json:"direction,omitempty"` - - // REQUIRED; Network protocol this rule applies to. - Protocol *SecurityRuleProtocol `json:"protocol,omitempty"` - - // A description for this rule. Restricted to 140 chars. - Description *string `json:"description,omitempty"` - - // The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default - // tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also - // be used. - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - - // The destination address prefixes. CIDR or destination IP ranges. - DestinationAddressPrefixes []*string `json:"destinationAddressPrefixes,omitempty"` - - // The application security group specified as destination. - DestinationApplicationSecurityGroups []*ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - - // The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - - // The destination port ranges. - DestinationPortRanges []*string `json:"destinationPortRanges,omitempty"` - - // The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the - // collection. The lower the priority number, the higher the priority of the rule. - Priority *int32 `json:"priority,omitempty"` - - // The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', - // 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress - // rule, specifies where network traffic originates from. - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - - // The CIDR or source IP ranges. - SourceAddressPrefixes []*string `json:"sourceAddressPrefixes,omitempty"` - - // The application security group specified as source. - SourceApplicationSecurityGroups []*ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - - // The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. - SourcePortRange *string `json:"sourcePortRange,omitempty"` - - // The source port ranges. - SourcePortRanges []*string `json:"sourcePortRanges,omitempty"` - - // READ-ONLY; The provisioning state of the security rule resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// SecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityRulesClient.BeginCreateOrUpdate -// method. -type SecurityRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityRulesClientBeginDeleteOptions contains the optional parameters for the SecurityRulesClient.BeginDelete method. -type SecurityRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityRulesClientGetOptions contains the optional parameters for the SecurityRulesClient.Get method. -type SecurityRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.List method. -type SecurityRulesClientListOptions struct { - // placeholder for future optional parameters -} - -// SecurityRulesEvaluationResult - Network security rules evaluation result. -type SecurityRulesEvaluationResult struct { - // Value indicating whether destination is matched. - DestinationMatched *bool `json:"destinationMatched,omitempty"` - - // Value indicating whether destination port is matched. - DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"` - - // Name of the network security rule. - Name *string `json:"name,omitempty"` - - // Value indicating whether protocol is matched. - ProtocolMatched *bool `json:"protocolMatched,omitempty"` - - // Value indicating whether source is matched. - SourceMatched *bool `json:"sourceMatched,omitempty"` - - // Value indicating whether source port is matched. - SourcePortMatched *bool `json:"sourcePortMatched,omitempty"` -} - -// ServiceAssociationLink resource. -type ServiceAssociationLink struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Resource navigation link properties format. - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ServiceAssociationLinkPropertiesFormat - Properties of ServiceAssociationLink. -type ServiceAssociationLinkPropertiesFormat struct { - // If true, the resource can be deleted. - AllowDelete *bool `json:"allowDelete,omitempty"` - - // Link to the external resource. - Link *string `json:"link,omitempty"` - - // Resource type of the linked resource. - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - - // A list of locations. - Locations []*string `json:"locations,omitempty"` - - // READ-ONLY; The provisioning state of the service association link resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ServiceAssociationLinksClientListOptions contains the optional parameters for the ServiceAssociationLinksClient.List method. -type ServiceAssociationLinksClientListOptions struct { - // placeholder for future optional parameters -} - -// ServiceAssociationLinksListResult - Response for ServiceAssociationLinks_List operation. -type ServiceAssociationLinksListResult struct { - // The service association links in a subnet. - Value []*ServiceAssociationLink `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ServiceDelegationPropertiesFormat - Properties of a service delegation. -type ServiceDelegationPropertiesFormat struct { - // The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). - ServiceName *string `json:"serviceName,omitempty"` - - // READ-ONLY; The actions permitted to the service upon delegation. - Actions []*string `json:"actions,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the service delegation resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginCreateOrUpdate -// method. -type ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceEndpointPoliciesClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginDelete -// method. -type ServiceEndpointPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceEndpointPoliciesClientGetOptions contains the optional parameters for the ServiceEndpointPoliciesClient.Get method. -type ServiceEndpointPoliciesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.ListByResourceGroup -// method. -type ServiceEndpointPoliciesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.List method. -type ServiceEndpointPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - -// ServiceEndpointPoliciesClientUpdateTagsOptions contains the optional parameters for the ServiceEndpointPoliciesClient.UpdateTags -// method. -type ServiceEndpointPoliciesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// ServiceEndpointPolicy - Service End point policy resource. -type ServiceEndpointPolicy struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the service end point policy. - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Kind of service endpoint policy. This is metadata used for the Azure portal experience. - Kind *string `json:"kind,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ServiceEndpointPolicyDefinition - Service Endpoint policy definitions. -type ServiceEndpointPolicyDefinition struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the service endpoint policy definition. - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - - // The type of the resource. - Type *string `json:"type,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// ServiceEndpointPolicyDefinitionListResult - Response for ListServiceEndpointPolicyDefinition API service call. Retrieves -// all service endpoint policy definition that belongs to a service endpoint policy. -type ServiceEndpointPolicyDefinitionListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The service endpoint policy definition in a service endpoint policy. - Value []*ServiceEndpointPolicyDefinition `json:"value,omitempty"` -} - -// ServiceEndpointPolicyDefinitionPropertiesFormat - Service Endpoint policy definition resource. -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - // A description for this rule. Restricted to 140 chars. - Description *string `json:"description,omitempty"` - - // Service endpoint name. - Service *string `json:"service,omitempty"` - - // A list of service resources. - ServiceResources []*string `json:"serviceResources,omitempty"` - - // READ-ONLY; The provisioning state of the service endpoint policy definition resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate -// method. -type ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginDelete -// method. -type ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceEndpointPolicyDefinitionsClientGetOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.Get -// method. -type ServiceEndpointPolicyDefinitionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup -// method. -type ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ServiceEndpointPolicyListResult - Response for ListServiceEndpointPolicies API service call. -type ServiceEndpointPolicyListResult struct { - // A list of ServiceEndpointPolicy resources. - Value []*ServiceEndpointPolicy `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ServiceEndpointPolicyPropertiesFormat - Service Endpoint Policy resource. -type ServiceEndpointPolicyPropertiesFormat struct { - // A collection of contextual service endpoint policy. - ContextualServiceEndpointPolicies []*string `json:"contextualServiceEndpointPolicies,omitempty"` - - // The alias indicating if the policy belongs to a service - ServiceAlias *string `json:"serviceAlias,omitempty"` - - // A collection of service endpoint policy definitions of the service endpoint policy. - ServiceEndpointPolicyDefinitions []*ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - - // READ-ONLY; The provisioning state of the service endpoint policy resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the service endpoint policy resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` - - // READ-ONLY; A collection of references to subnets. - Subnets []*Subnet `json:"subnets,omitempty" azure:"ro"` -} - -// ServiceEndpointPropertiesFormat - The service endpoint properties. -type ServiceEndpointPropertiesFormat struct { - // A list of locations. - Locations []*string `json:"locations,omitempty"` - - // The type of the endpoint service. - Service *string `json:"service,omitempty"` - - // READ-ONLY; The provisioning state of the service endpoint resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// ServiceTagInformation - The service tag information. -type ServiceTagInformation struct { - // READ-ONLY; The ID of service tag. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of service tag. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Properties of the service tag information. - Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty" azure:"ro"` - - // READ-ONLY; The iteration number of service tag object for region. - ServiceTagChangeNumber *string `json:"serviceTagChangeNumber,omitempty" azure:"ro"` -} - -// ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.List method. -type ServiceTagInformationClientListOptions struct { - // Do not return address prefixes for the tag(s). - NoAddressPrefixes *bool - // Return tag information for a particular tag. - TagName *string -} - -// ServiceTagInformationListResult - Response for Get ServiceTagInformation API service call. Retrieves the list of service -// tag information resources. -type ServiceTagInformationListResult struct { - // The list of service tag information resources. - Value []*ServiceTagInformation `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// ServiceTagInformationPropertiesFormat - Properties of the service tag information. -type ServiceTagInformationPropertiesFormat struct { - // READ-ONLY; The list of IP address prefixes. - AddressPrefixes []*string `json:"addressPrefixes,omitempty" azure:"ro"` - - // READ-ONLY; The iteration number of service tag. - ChangeNumber *string `json:"changeNumber,omitempty" azure:"ro"` - - // READ-ONLY; The region of service tag. - Region *string `json:"region,omitempty" azure:"ro"` - - // READ-ONLY; The state of the service tag. - State *string `json:"state,omitempty" azure:"ro"` - - // READ-ONLY; The name of system service. - SystemService *string `json:"systemService,omitempty" azure:"ro"` -} - -// ServiceTagsClientListOptions contains the optional parameters for the ServiceTagsClient.List method. -type ServiceTagsClientListOptions struct { - // placeholder for future optional parameters -} - -// ServiceTagsListResult - Response for the ListServiceTags API service call. -type ServiceTagsListResult struct { - // READ-ONLY; The iteration number. - ChangeNumber *string `json:"changeNumber,omitempty" azure:"ro"` - - // READ-ONLY; The name of the cloud. - Cloud *string `json:"cloud,omitempty" azure:"ro"` - - // READ-ONLY; The ID of the cloud. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the cloud. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The URL to get next page of service tag information resources. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` - - // READ-ONLY; The azure resource type. - Type *string `json:"type,omitempty" azure:"ro"` - - // READ-ONLY; The list of service tag information resources. - Values []*ServiceTagInformation `json:"values,omitempty" azure:"ro"` -} - -// SessionIDs - List of session IDs. -type SessionIDs struct { - // List of session IDs. - SessionIDs []*string `json:"sessionIds,omitempty"` -} - -// SignatureOverridesFilterValuesQuery - Describes the filter values possibles for a given column -type SignatureOverridesFilterValuesQuery struct { - // Describes the name of the column which values will be returned - FilterName *string `json:"filterName,omitempty"` -} - -// SignatureOverridesFilterValuesResponse - Describes the list of all possible values for a specific filter value -type SignatureOverridesFilterValuesResponse struct { - // Describes the possible values - FilterValues []*string `json:"filterValues,omitempty"` -} - -// SignaturesOverrides - Contains all specific policy signatures overrides for the IDPS -type SignaturesOverrides struct { - // Will contain the resource id of the signature override resource - ID *string `json:"id,omitempty"` - - // Contains the name of the resource (default) - Name *string `json:"name,omitempty"` - - // Will contain the properties of the resource (the actual signature overrides) - Properties *SignaturesOverridesProperties `json:"properties,omitempty"` - - // Will contain the type of the resource: Microsoft.Network/firewallPolicies/intrusionDetectionSignaturesOverrides - Type *string `json:"type,omitempty"` -} - -// SignaturesOverridesList - Describes an object containing an array with a single item -type SignaturesOverridesList struct { - // Describes a list consisting exactly one item describing the policy's signature override status - Value []*SignaturesOverrides `json:"value,omitempty"` -} - -// SignaturesOverridesProperties - Will contain the properties of the resource (the actual signature overrides) -type SignaturesOverridesProperties struct { - // Dictionary of - Signatures map[string]*string `json:"signatures,omitempty"` -} - -type SingleQueryResult struct { - // Describes what is the signature enforces - Description *string `json:"description,omitempty"` - - // Describes the list of destination ports related to this signature - DestinationPorts []*string `json:"destinationPorts,omitempty"` - - // Describes in which direction signature is being enforced: 0 - Inbound, 1 - OutBound, 2 - Bidirectional - Direction *FirewallPolicyIDPSSignatureDirection `json:"direction,omitempty"` - - // Describes the groups the signature belongs to - Group *string `json:"group,omitempty"` - - // Describes if this override is inherited from base policy or not - InheritedFromParentPolicy *bool `json:"inheritedFromParentPolicy,omitempty"` - - // Describes the last updated time of the signature (provided from 3rd party vendor) - LastUpdated *string `json:"lastUpdated,omitempty"` - - // The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny - Mode *FirewallPolicyIDPSSignatureMode `json:"mode,omitempty"` - - // Describes the protocol the signatures is being enforced in - Protocol *string `json:"protocol,omitempty"` - - // Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High - Severity *FirewallPolicyIDPSSignatureSeverity `json:"severity,omitempty"` - - // The ID of the signature - SignatureID *int32 `json:"signatureId,omitempty"` - - // Describes the list of source ports related to this signature - SourcePorts []*string `json:"sourcePorts,omitempty"` -} - -// StaticMember Item. -type StaticMember struct { - // The Static Member properties - Properties *StaticMemberProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource ID. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StaticMemberListResult - Result of the request to list StaticMember. It contains a list of groups and a URL link to get -// the next set of results. -type StaticMemberListResult struct { - // Gets the URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // Gets a page of StaticMember - Value []*StaticMember `json:"value,omitempty"` -} - -// StaticMemberProperties - Properties of static member. -type StaticMemberProperties struct { - // Resource Id. - ResourceID *string `json:"resourceId,omitempty"` - - // READ-ONLY; The provisioning state of the scope assignment resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Resource region. - Region *string `json:"region,omitempty" azure:"ro"` -} - -// StaticMembersClientCreateOrUpdateOptions contains the optional parameters for the StaticMembersClient.CreateOrUpdate method. -type StaticMembersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// StaticMembersClientDeleteOptions contains the optional parameters for the StaticMembersClient.Delete method. -type StaticMembersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// StaticMembersClientGetOptions contains the optional parameters for the StaticMembersClient.Get method. -type StaticMembersClientGetOptions struct { - // placeholder for future optional parameters -} - -// StaticMembersClientListOptions contains the optional parameters for the StaticMembersClient.List method. -type StaticMembersClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// StaticRoute - List of all Static Routes. -type StaticRoute struct { - // List of all address prefixes. - AddressPrefixes []*string `json:"addressPrefixes,omitempty"` - - // The name of the StaticRoute that is unique within a VnetRoute. - Name *string `json:"name,omitempty"` - - // The ip address of the next hop. - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} - -// SubResource - Reference to another subresource. -type SubResource struct { - // Resource ID. - ID *string `json:"id,omitempty"` -} - -// Subnet in a virtual network resource. -type Subnet struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the subnet. - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - - // Resource type. - Type *string `json:"type,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// SubnetAssociation - Subnet and it's custom security rules. -type SubnetAssociation struct { - // Collection of custom security rules. - SecurityRules []*SecurityRule `json:"securityRules,omitempty"` - - // READ-ONLY; Subnet ID. - ID *string `json:"id,omitempty" azure:"ro"` -} - -// SubnetListResult - Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. -type SubnetListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The subnets in a virtual network. - Value []*Subnet `json:"value,omitempty"` -} - -// SubnetPropertiesFormat - Properties of the subnet. -type SubnetPropertiesFormat struct { - // The address prefix for the subnet. - AddressPrefix *string `json:"addressPrefix,omitempty"` - - // List of address prefixes for the subnet. - AddressPrefixes []*string `json:"addressPrefixes,omitempty"` - - // Application gateway IP configurations of virtual network resource. - ApplicationGatewayIPConfigurations []*ApplicationGatewayIPConfiguration `json:"applicationGatewayIpConfigurations,omitempty"` - - // An array of references to the delegations on the subnet. - Delegations []*Delegation `json:"delegations,omitempty"` - - // Array of IpAllocation which reference this subnet. - IPAllocations []*SubResource `json:"ipAllocations,omitempty"` - - // Nat gateway associated with this subnet. - NatGateway *SubResource `json:"natGateway,omitempty"` - - // The reference to the NetworkSecurityGroup resource. - NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` - - // Enable or Disable apply network policies on private end point in the subnet. - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - - // Enable or Disable apply network policies on private link service in the subnet. - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - - // The reference to the RouteTable resource. - RouteTable *RouteTable `json:"routeTable,omitempty"` - - // An array of service endpoint policies. - ServiceEndpointPolicies []*ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - - // An array of service endpoints. - ServiceEndpoints []*ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` - - // READ-ONLY; Array of IP configuration profiles which reference this subnet. - IPConfigurationProfiles []*IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to the network interface IP configurations using subnet. - IPConfigurations []*IPConfiguration `json:"ipConfigurations,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to private endpoints. - PrivateEndpoints []*PrivateEndpoint `json:"privateEndpoints,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the subnet resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined - // properties. - Purpose *string `json:"purpose,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to the external resources using subnet. - ResourceNavigationLinks []*ResourceNavigationLink `json:"resourceNavigationLinks,omitempty" azure:"ro"` - - // READ-ONLY; An array of references to services injecting into this subnet. - ServiceAssociationLinks []*ServiceAssociationLink `json:"serviceAssociationLinks,omitempty" azure:"ro"` -} - -// SubnetsClientBeginCreateOrUpdateOptions contains the optional parameters for the SubnetsClient.BeginCreateOrUpdate method. -type SubnetsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubnetsClientBeginDeleteOptions contains the optional parameters for the SubnetsClient.BeginDelete method. -type SubnetsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubnetsClientBeginPrepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginPrepareNetworkPolicies -// method. -type SubnetsClientBeginPrepareNetworkPoliciesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubnetsClientBeginUnprepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginUnprepareNetworkPolicies -// method. -type SubnetsClientBeginUnprepareNetworkPoliciesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubnetsClientGetOptions contains the optional parameters for the SubnetsClient.Get method. -type SubnetsClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// SubnetsClientListOptions contains the optional parameters for the SubnetsClient.List method. -type SubnetsClientListOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate -// method. -type SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Delete -// method. -type SubscriptionNetworkManagerConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionNetworkManagerConnectionsClientGetOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Get -// method. -type SubscriptionNetworkManagerConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionNetworkManagerConnectionsClientListOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.List -// method. -type SubscriptionNetworkManagerConnectionsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -// TagsObject - Tags object for patch operations. -type TagsObject struct { - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` -} - -// Topology of the specified resource group. -type Topology struct { - // A list of topology resources. - Resources []*TopologyResource `json:"resources,omitempty"` - - // READ-ONLY; The datetime when the topology was initially created for the resource group. - CreatedDateTime *time.Time `json:"createdDateTime,omitempty" azure:"ro"` - - // READ-ONLY; GUID representing the operation id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The datetime when the topology was last modified. - LastModified *time.Time `json:"lastModified,omitempty" azure:"ro"` -} - -// TopologyAssociation - Resources that have an association with the parent resource. -type TopologyAssociation struct { - // The association type of the child resource to the parent resource. - AssociationType *AssociationType `json:"associationType,omitempty"` - - // The name of the resource that is associated with the parent resource. - Name *string `json:"name,omitempty"` - - // The ID of the resource that is associated with the parent resource. - ResourceID *string `json:"resourceId,omitempty"` -} - -// TopologyParameters - Parameters that define the representation of topology. -type TopologyParameters struct { - // The name of the target resource group to perform topology on. - TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"` - - // The reference to the Subnet resource. - TargetSubnet *SubResource `json:"targetSubnet,omitempty"` - - // The reference to the Virtual Network resource. - TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"` -} - -// TopologyResource - The network resource topology information for the given resource group. -type TopologyResource struct { - // Holds the associations the resource has with other resources in the resource group. - Associations []*TopologyAssociation `json:"associations,omitempty"` - - // ID of the resource. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Name of the resource. - Name *string `json:"name,omitempty"` -} - -// TrafficAnalyticsConfigurationProperties - Parameters that define the configuration of traffic analytics. -type TrafficAnalyticsConfigurationProperties struct { - // Flag to enable/disable traffic analytics. - Enabled *bool `json:"enabled,omitempty"` - - // The interval in minutes which would decide how frequently TA service should do flow analytics. - TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"` - - // The resource guid of the attached workspace. - WorkspaceID *string `json:"workspaceId,omitempty"` - - // The location of the attached workspace. - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - - // Resource Id of the attached workspace. - WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` -} - -// TrafficAnalyticsProperties - Parameters that define the configuration of traffic analytics. -type TrafficAnalyticsProperties struct { - // Parameters that define the configuration of traffic analytics. - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} - -// TrafficSelectorPolicy - An traffic selector policy for a virtual network gateway connection. -type TrafficSelectorPolicy struct { - // REQUIRED; A collection of local address spaces in CIDR format. - LocalAddressRanges []*string `json:"localAddressRanges,omitempty"` - - // REQUIRED; A collection of remote address spaces in CIDR format. - RemoteAddressRanges []*string `json:"remoteAddressRanges,omitempty"` -} - -// TroubleshootingDetails - Information gained from troubleshooting of specified resource. -type TroubleshootingDetails struct { - // Details on troubleshooting results. - Detail *string `json:"detail,omitempty"` - - // The id of the get troubleshoot operation. - ID *string `json:"id,omitempty"` - - // Reason type of failure. - ReasonType *string `json:"reasonType,omitempty"` - - // List of recommended actions. - RecommendedActions []*TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"` - - // A summary of troubleshooting. - Summary *string `json:"summary,omitempty"` -} - -// TroubleshootingParameters - Parameters that define the resource to troubleshoot. -type TroubleshootingParameters struct { - // REQUIRED; Properties of the troubleshooting resource. - Properties *TroubleshootingProperties `json:"properties,omitempty"` - - // REQUIRED; The target resource to troubleshoot. - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// TroubleshootingProperties - Storage location provided for troubleshoot. -type TroubleshootingProperties struct { - // REQUIRED; The ID for the storage account to save the troubleshoot result. - StorageID *string `json:"storageId,omitempty"` - - // REQUIRED; The path to the blob to save the troubleshoot result in. - StoragePath *string `json:"storagePath,omitempty"` -} - -// TroubleshootingRecommendedActions - Recommended actions based on discovered issues. -type TroubleshootingRecommendedActions struct { - // ID of the recommended action. - ActionID *string `json:"actionId,omitempty"` - - // Description of recommended actions. - ActionText *string `json:"actionText,omitempty"` - - // The uri linking to a documentation for the recommended troubleshooting actions. - ActionURI *string `json:"actionUri,omitempty"` - - // The information from the URI for the recommended troubleshooting actions. - ActionURIText *string `json:"actionUriText,omitempty"` -} - -// TroubleshootingResult - Troubleshooting information gained from specified resource. -type TroubleshootingResult struct { - // The result code of the troubleshooting. - Code *string `json:"code,omitempty"` - - // The end time of the troubleshooting. - EndTime *time.Time `json:"endTime,omitempty"` - - // Information from troubleshooting. - Results []*TroubleshootingDetails `json:"results,omitempty"` - - // The start time of the troubleshooting. - StartTime *time.Time `json:"startTime,omitempty"` -} - -// TunnelConnectionHealth - VirtualNetworkGatewayConnection properties. -type TunnelConnectionHealth struct { - // READ-ONLY; Virtual Network Gateway connection status. - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty" azure:"ro"` - - // READ-ONLY; The Egress Bytes Transferred in this connection. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The Ingress Bytes Transferred in this connection. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The time at which connection was established in Utc format. - LastConnectionEstablishedUTCTime *string `json:"lastConnectionEstablishedUtcTime,omitempty" azure:"ro"` - - // READ-ONLY; Tunnel name. - Tunnel *string `json:"tunnel,omitempty" azure:"ro"` -} - -// UnprepareNetworkPoliciesRequest - Details of UnprepareNetworkPolicies for Subnet. -type UnprepareNetworkPoliciesRequest struct { - // The name of the service for which subnet is being unprepared for. - ServiceName *string `json:"serviceName,omitempty"` -} - -// Usage - The network resource usage. -type Usage struct { - // REQUIRED; The current value of the usage. - CurrentValue *int64 `json:"currentValue,omitempty"` - - // REQUIRED; The limit of usage. - Limit *int64 `json:"limit,omitempty"` - - // REQUIRED; The name of the type of usage. - Name *UsageName `json:"name,omitempty"` - - // REQUIRED; An enum describing the unit of measurement. - Unit *UsageUnit `json:"unit,omitempty"` - - // READ-ONLY; Resource identifier. - ID *string `json:"id,omitempty" azure:"ro"` -} - -// UsageName - The usage names. -type UsageName struct { - // A localized string describing the resource name. - LocalizedValue *string `json:"localizedValue,omitempty"` - - // A string describing the resource name. - Value *string `json:"value,omitempty"` -} - -// UsagesClientListOptions contains the optional parameters for the UsagesClient.List method. -type UsagesClientListOptions struct { - // placeholder for future optional parameters -} - -// UsagesListResult - The list usages operation response. -type UsagesListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The list network resource usages. - Value []*Usage `json:"value,omitempty"` -} - -// VM - Describes a Virtual Machine. -type VM struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VPNClientConfiguration - VpnClientConfiguration for P2S client. -type VPNClientConfiguration struct { - // The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. - AADAudience *string `json:"aadAudience,omitempty"` - - // The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. - AADIssuer *string `json:"aadIssuer,omitempty"` - - // The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. - AADTenant *string `json:"aadTenant,omitempty"` - - // The radius server address property of the VirtualNetworkGateway resource for vpn client connection. - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - - // The radius secret property of the VirtualNetworkGateway resource for vpn client connection. - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - - // The radiusServers property for multiple radius server configuration. - RadiusServers []*RadiusServer `json:"radiusServers,omitempty"` - - // VPN authentication types for the virtual network gateway.. - VPNAuthenticationTypes []*VPNAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - - // The reference to the address space resource which represents Address space for P2S VpnClient. - VPNClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - - // VpnClientIpsecPolicies for virtual network gateway P2S client. - VPNClientIPSecPolicies []*IPSecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - - // VpnClientProtocols for Virtual network gateway. - VPNClientProtocols []*VPNClientProtocol `json:"vpnClientProtocols,omitempty"` - - // VpnClientRevokedCertificate for Virtual network gateway. - VPNClientRevokedCertificates []*VPNClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - - // VpnClientRootCertificate for virtual network gateway. - VPNClientRootCertificates []*VPNClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` -} - -// VPNClientConnectionHealth - VpnClientConnectionHealth properties. -type VPNClientConnectionHealth struct { - // List of allocated ip addresses to the connected p2s vpn clients. - AllocatedIPAddresses []*string `json:"allocatedIpAddresses,omitempty"` - - // The total of p2s vpn clients connected at this time to this P2SVpnGateway. - VPNClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"` - - // READ-ONLY; Total of the Egress Bytes Transferred in this connection. - TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection. - TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty" azure:"ro"` -} - -// VPNClientConnectionHealthDetail - VPN client connection health detail. -type VPNClientConnectionHealthDetail struct { - // READ-ONLY; The egress bytes per second. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The egress packets per second. - EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The ingress bytes per second. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The ingress packets per second. - IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The max band width. - MaxBandwidth *int64 `json:"maxBandwidth,omitempty" azure:"ro"` - - // READ-ONLY; The max packets transferred per second. - MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty" azure:"ro"` - - // READ-ONLY; The assigned private Ip of a connected vpn client. - PrivateIPAddress *string `json:"privateIpAddress,omitempty" azure:"ro"` - - // READ-ONLY; The public Ip of a connected vpn client. - PublicIPAddress *string `json:"publicIpAddress,omitempty" azure:"ro"` - - // READ-ONLY; The duration time of a connected vpn client. - VPNConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty" azure:"ro"` - - // READ-ONLY; The vpn client Id. - VPNConnectionID *string `json:"vpnConnectionId,omitempty" azure:"ro"` - - // READ-ONLY; The start time of a connected vpn client. - VPNConnectionTime *string `json:"vpnConnectionTime,omitempty" azure:"ro"` - - // READ-ONLY; The user name of a connected vpn client. - VPNUserName *string `json:"vpnUserName,omitempty" azure:"ro"` -} - -// VPNClientConnectionHealthDetailListResult - List of virtual network gateway vpn client connection health. -type VPNClientConnectionHealthDetailListResult struct { - // List of vpn client connection health. - Value []*VPNClientConnectionHealthDetail `json:"value,omitempty"` -} - -// VPNClientIPsecParameters - An IPSec parameters for a virtual network gateway P2S connection. -type VPNClientIPsecParameters struct { - // REQUIRED; The DH Group used in IKE Phase 1 for initial SA. - DhGroup *DhGroup `json:"dhGroup,omitempty"` - - // REQUIRED; The IPSec encryption algorithm (IKE phase 1). - IPSecEncryption *IPSecEncryption `json:"ipsecEncryption,omitempty"` - - // REQUIRED; The IPSec integrity algorithm (IKE phase 1). - IPSecIntegrity *IPSecIntegrity `json:"ipsecIntegrity,omitempty"` - - // REQUIRED; The IKE encryption algorithm (IKE phase 2). - IkeEncryption *IkeEncryption `json:"ikeEncryption,omitempty"` - - // REQUIRED; The IKE integrity algorithm (IKE phase 2). - IkeIntegrity *IkeIntegrity `json:"ikeIntegrity,omitempty"` - - // REQUIRED; The Pfs Group used in IKE Phase 2 for new child SA. - PfsGroup *PfsGroup `json:"pfsGroup,omitempty"` - - // REQUIRED; The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. - SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` - - // REQUIRED; The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. - SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` -} - -// VPNClientParameters - Vpn Client Parameters for package generation. -type VPNClientParameters struct { - // VPN client authentication method. - AuthenticationMethod *AuthenticationMethod `json:"authenticationMethod,omitempty"` - - // A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external - // radius based authentication with EAPTLS. - ClientRootCertificates []*string `json:"clientRootCertificates,omitempty"` - - // VPN client Processor Architecture. - ProcessorArchitecture *ProcessorArchitecture `json:"processorArchitecture,omitempty"` - - // The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only - // if external radius authentication has been configured with EAPTLS - // authentication. - RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` -} - -// VPNClientRevokedCertificate - VPN client revoked certificate of virtual network gateway. -type VPNClientRevokedCertificate struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the vpn client revoked certificate. - Properties *VPNClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// VPNClientRevokedCertificatePropertiesFormat - Properties of the revoked VPN client certificate of virtual network gateway. -type VPNClientRevokedCertificatePropertiesFormat struct { - // The revoked VPN client certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` - - // READ-ONLY; The provisioning state of the VPN client revoked certificate resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VPNClientRootCertificate - VPN client root certificate of virtual network gateway. -type VPNClientRootCertificate struct { - // REQUIRED; Properties of the vpn client root certificate. - Properties *VPNClientRootCertificatePropertiesFormat `json:"properties,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// VPNClientRootCertificatePropertiesFormat - Properties of SSL certificates of application gateway. -type VPNClientRootCertificatePropertiesFormat struct { - // REQUIRED; The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` - - // READ-ONLY; The provisioning state of the VPN client root certificate resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VPNConnection - VpnConnection Resource. -type VPNConnection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the VPN connection. - Properties *VPNConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// VPNConnectionPacketCaptureStartParameters - Vpn Connection packet capture parameters supplied to start packet capture on -// gateway connection. -type VPNConnectionPacketCaptureStartParameters struct { - // Start Packet capture parameters on vpn connection. - FilterData *string `json:"filterData,omitempty"` - - // List of site link connection names. - LinkConnectionNames []*string `json:"linkConnectionNames,omitempty"` -} - -// VPNConnectionPacketCaptureStopParameters - Vpn Connection packet capture parameters supplied to stop packet capture on -// gateway connection. -type VPNConnectionPacketCaptureStopParameters struct { - // List of site link connection names. - LinkConnectionNames []*string `json:"linkConnectionNames,omitempty"` - - // SAS url for packet capture on vpn connection. - SasURL *string `json:"sasUrl,omitempty"` -} - -// VPNConnectionProperties - Parameters for VpnConnection. -type VPNConnectionProperties struct { - // Expected bandwidth in MBPS. - ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"` - - // DPD timeout in seconds for vpn connection. - DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"` - - // EnableBgp flag. - EnableBgp *bool `json:"enableBgp,omitempty"` - - // Enable internet security. - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - - // EnableBgp flag. - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - - // The IPSec Policies to be considered by this connection. - IPSecPolicies []*IPSecPolicy `json:"ipsecPolicies,omitempty"` - - // Id of the connected vpn site. - RemoteVPNSite *SubResource `json:"remoteVpnSite,omitempty"` - - // The Routing Configuration indicating the associated and propagated route tables on this connection. - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - - // Routing weight for vpn connection. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - - // SharedKey for the vpn connection. - SharedKey *string `json:"sharedKey,omitempty"` - - // The Traffic Selector Policies to be considered by this connection. - TrafficSelectorPolicies []*TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - - // Use local azure ip to initiate connection. - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - - // Enable policy-based traffic selectors. - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - - // Connection protocol used for this connection. - VPNConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - - // List of all vpn site link connections to the gateway. - VPNLinkConnections []*VPNSiteLinkConnection `json:"vpnLinkConnections,omitempty"` - - // READ-ONLY; The connection status. - ConnectionStatus *VPNConnectionStatus `json:"connectionStatus,omitempty" azure:"ro"` - - // READ-ONLY; Egress bytes transferred. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; Ingress bytes transferred. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the VPN connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VPNConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNConnectionsClient.BeginCreateOrUpdate -// method. -type VPNConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNConnectionsClientBeginDeleteOptions contains the optional parameters for the VPNConnectionsClient.BeginDelete method. -type VPNConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStartPacketCapture -// method. -type VPNConnectionsClientBeginStartPacketCaptureOptions struct { - // Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. - Parameters *VPNConnectionPacketCaptureStartParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStopPacketCapture -// method. -type VPNConnectionsClientBeginStopPacketCaptureOptions struct { - // Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. - Parameters *VPNConnectionPacketCaptureStopParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNConnectionsClientGetOptions contains the optional parameters for the VPNConnectionsClient.Get method. -type VPNConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.ListByVPNGateway -// method. -type VPNConnectionsClientListByVPNGatewayOptions struct { - // placeholder for future optional parameters -} - -// VPNDeviceScriptParameters - Vpn device configuration script generation parameters. -type VPNDeviceScriptParameters struct { - // The device family for the vpn device. - DeviceFamily *string `json:"deviceFamily,omitempty"` - - // The firmware version for the vpn device. - FirmwareVersion *string `json:"firmwareVersion,omitempty"` - - // The vendor for the vpn device. - Vendor *string `json:"vendor,omitempty"` -} - -// VPNGateway - VpnGateway Resource. -type VPNGateway struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the VPN gateway. - Properties *VPNGatewayProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VPNGatewayIPConfiguration - IP Configuration of a VPN Gateway Resource. -type VPNGatewayIPConfiguration struct { - // The identifier of the IP configuration for a VPN Gateway. - ID *string `json:"id,omitempty"` - - // The private IP address of this IP configuration. - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - - // The public IP address of this IP configuration. - PublicIPAddress *string `json:"publicIpAddress,omitempty"` -} - -// VPNGatewayNatRule - VpnGatewayNatRule Resource. -type VPNGatewayNatRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the VpnGateway NAT rule. - Properties *VPNGatewayNatRuleProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VPNGatewayNatRuleProperties - Parameters for VpnGatewayNatRule. -type VPNGatewayNatRuleProperties struct { - // The private IP address external mapping for NAT. - ExternalMappings []*VPNNatRuleMapping `json:"externalMappings,omitempty"` - - // The IP Configuration ID this NAT rule applies to. - IPConfigurationID *string `json:"ipConfigurationId,omitempty"` - - // The private IP address internal mapping for NAT. - InternalMappings []*VPNNatRuleMapping `json:"internalMappings,omitempty"` - - // The Source NAT direction of a VPN NAT. - Mode *VPNNatRuleMode `json:"mode,omitempty"` - - // The type of NAT rule for VPN NAT. - Type *VPNNatRuleType `json:"type,omitempty"` - - // READ-ONLY; List of egress VpnSiteLinkConnections. - EgressVPNSiteLinkConnections []*SubResource `json:"egressVpnSiteLinkConnections,omitempty" azure:"ro"` - - // READ-ONLY; List of ingress VpnSiteLinkConnections. - IngressVPNSiteLinkConnections []*SubResource `json:"ingressVpnSiteLinkConnections,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the NAT Rule resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VPNGatewayPacketCaptureStartParameters - Start packet capture parameters. -type VPNGatewayPacketCaptureStartParameters struct { - // Start Packet capture parameters on vpn gateway. - FilterData *string `json:"filterData,omitempty"` -} - -// VPNGatewayPacketCaptureStopParameters - Stop packet capture parameters. -type VPNGatewayPacketCaptureStopParameters struct { - // SAS url for packet capture on vpn gateway. - SasURL *string `json:"sasUrl,omitempty"` -} - -// VPNGatewayProperties - Parameters for VpnGateway. -type VPNGatewayProperties struct { - // Local network gateway's BGP speaker settings. - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - - // List of all vpn connections to the gateway. - Connections []*VPNConnection `json:"connections,omitempty"` - - // Enable BGP routes translation for NAT on this VpnGateway. - EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` - - // Enable Routing Preference property for the Public IP Interface of the VpnGateway. - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - - // List of all the nat Rules associated with the gateway. - NatRules []*VPNGatewayNatRule `json:"natRules,omitempty"` - - // The scale unit for this vpn gateway. - VPNGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` - - // The VirtualHub to which the gateway belongs. - VirtualHub *SubResource `json:"virtualHub,omitempty"` - - // READ-ONLY; List of all IPs configured on the gateway. - IPConfigurations []*VPNGatewayIPConfiguration `json:"ipConfigurations,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the VPN gateway resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNGatewaysClient.BeginCreateOrUpdate -// method. -type VPNGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientBeginDeleteOptions contains the optional parameters for the VPNGatewaysClient.BeginDelete method. -type VPNGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientBeginResetOptions contains the optional parameters for the VPNGatewaysClient.BeginReset method. -type VPNGatewaysClientBeginResetOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStartPacketCapture -// method. -type VPNGatewaysClientBeginStartPacketCaptureOptions struct { - // Vpn gateway packet capture parameters supplied to start packet capture on vpn gateway. - Parameters *VPNGatewayPacketCaptureStartParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStopPacketCapture -// method. -type VPNGatewaysClientBeginStopPacketCaptureOptions struct { - // Vpn gateway packet capture parameters supplied to stop packet capture on vpn gateway. - Parameters *VPNGatewayPacketCaptureStopParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VPNGatewaysClient.BeginUpdateTags method. -type VPNGatewaysClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientGetOptions contains the optional parameters for the VPNGatewaysClient.Get method. -type VPNGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.ListByResourceGroup -// method. -type VPNGatewaysClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.List method. -type VPNGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// VPNLinkBgpSettings - BGP settings details for a link. -type VPNLinkBgpSettings struct { - // The BGP speaker's ASN. - Asn *int64 `json:"asn,omitempty"` - - // The BGP peering address and BGP identifier of this BGP speaker. - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` -} - -// VPNLinkConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginGetIkeSas -// method. -type VPNLinkConnectionsClientBeginGetIkeSasOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNLinkConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginResetConnection -// method. -type VPNLinkConnectionsClientBeginResetConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.ListByVPNConnection -// method. -type VPNLinkConnectionsClientListByVPNConnectionOptions struct { - // placeholder for future optional parameters -} - -// VPNLinkProviderProperties - List of properties of a link provider. -type VPNLinkProviderProperties struct { - // Name of the link provider. - LinkProviderName *string `json:"linkProviderName,omitempty"` - - // Link speed. - LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"` -} - -// VPNNatRuleMapping - Vpn NatRule mapping. -type VPNNatRuleMapping struct { - // Address space for Vpn NatRule mapping. - AddressSpace *string `json:"addressSpace,omitempty"` - - // Port range for Vpn NatRule mapping. - PortRange *string `json:"portRange,omitempty"` -} - -// VPNPacketCaptureStartParameters - Start packet capture parameters on virtual network gateway. -type VPNPacketCaptureStartParameters struct { - // Start Packet capture parameters. - FilterData *string `json:"filterData,omitempty"` -} - -// VPNPacketCaptureStopParameters - Stop packet capture parameters. -type VPNPacketCaptureStopParameters struct { - // SAS url for packet capture on virtual network gateway. - SasURL *string `json:"sasUrl,omitempty"` -} - -// VPNProfileResponse - Vpn Profile Response for package generation. -type VPNProfileResponse struct { - // URL to the VPN profile. - ProfileURL *string `json:"profileUrl,omitempty"` -} - -// VPNServerConfigRadiusClientRootCertificate - Properties of the Radius client root certificate of VpnServerConfiguration. -type VPNServerConfigRadiusClientRootCertificate struct { - // The certificate name. - Name *string `json:"name,omitempty"` - - // The Radius client root certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` -} - -// VPNServerConfigRadiusServerRootCertificate - Properties of Radius Server root certificate of VpnServerConfiguration. -type VPNServerConfigRadiusServerRootCertificate struct { - // The certificate name. - Name *string `json:"name,omitempty"` - - // The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` -} - -// VPNServerConfigVPNClientRevokedCertificate - Properties of the revoked VPN client certificate of VpnServerConfiguration. -type VPNServerConfigVPNClientRevokedCertificate struct { - // The certificate name. - Name *string `json:"name,omitempty"` - - // The revoked VPN client certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` -} - -// VPNServerConfigVPNClientRootCertificate - Properties of VPN client root certificate of VpnServerConfiguration. -type VPNServerConfigVPNClientRootCertificate struct { - // The certificate name. - Name *string `json:"name,omitempty"` - - // The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` -} - -// VPNServerConfiguration - VpnServerConfiguration Resource. -type VPNServerConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the P2SVpnServer configuration. - Properties *VPNServerConfigurationProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VPNServerConfigurationPolicyGroup - VpnServerConfigurationPolicyGroup Resource. -type VPNServerConfigurationPolicyGroup struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the VpnServerConfigurationPolicyGroup. - Properties *VPNServerConfigurationPolicyGroupProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VPNServerConfigurationPolicyGroupMember - VpnServerConfiguration PolicyGroup member -type VPNServerConfigurationPolicyGroupMember struct { - // The Vpn Policy member attribute type. - AttributeType *VPNPolicyMemberAttributeType `json:"attributeType,omitempty"` - - // The value of Attribute used for this VpnServerConfigurationPolicyGroupMember. - AttributeValue *string `json:"attributeValue,omitempty"` - - // Name of the VpnServerConfigurationPolicyGroupMember. - Name *string `json:"name,omitempty"` -} - -// VPNServerConfigurationPolicyGroupProperties - Parameters for VpnServerConfigurationPolicyGroup. -type VPNServerConfigurationPolicyGroupProperties struct { - // Shows if this is a Default VpnServerConfigurationPolicyGroup or not. - IsDefault *bool `json:"isDefault,omitempty"` - - // Multiple PolicyMembers for VpnServerConfigurationPolicyGroup. - PolicyMembers []*VPNServerConfigurationPolicyGroupMember `json:"policyMembers,omitempty"` - - // Priority for VpnServerConfigurationPolicyGroup. - Priority *int32 `json:"priority,omitempty"` - - // READ-ONLY; List of references to P2SConnectionConfigurations. - P2SConnectionConfigurations []*SubResource `json:"p2SConnectionConfigurations,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the VpnServerConfigurationPolicyGroup resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VPNServerConfigurationProperties - Parameters for VpnServerConfiguration. -type VPNServerConfigurationProperties struct { - // The set of aad vpn authentication parameters. - AADAuthenticationParameters *AADAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"` - - // List of all VpnServerConfigurationPolicyGroups. - ConfigurationPolicyGroups []*VPNServerConfigurationPolicyGroup `json:"configurationPolicyGroups,omitempty"` - - // The name of the VpnServerConfiguration that is unique within a resource group. - Name *string `json:"name,omitempty"` - - // Radius client root certificate of VpnServerConfiguration. - RadiusClientRootCertificates []*VPNServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"` - - // The radius server address property of the VpnServerConfiguration resource for point to site client connection. - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - - // Radius Server root certificate of VpnServerConfiguration. - RadiusServerRootCertificates []*VPNServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"` - - // The radius secret property of the VpnServerConfiguration resource for point to site client connection. - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - - // Multiple Radius Server configuration for VpnServerConfiguration. - RadiusServers []*RadiusServer `json:"radiusServers,omitempty"` - - // VPN authentication types for the VpnServerConfiguration. - VPNAuthenticationTypes []*VPNAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - - // VpnClientIpsecPolicies for VpnServerConfiguration. - VPNClientIPSecPolicies []*IPSecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - - // VPN client revoked certificate of VpnServerConfiguration. - VPNClientRevokedCertificates []*VPNServerConfigVPNClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - - // VPN client root certificate of VpnServerConfiguration. - VPNClientRootCertificates []*VPNServerConfigVPNClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` - - // VPN protocols for the VpnServerConfiguration. - VPNProtocols []*VPNGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; List of references to P2SVpnGateways. - P2SVPNGateways []*P2SVPNGateway `json:"p2SVpnGateways,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', - // and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` -} - -// VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions contains the optional parameters for the VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList -// method. -type VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNServerConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginCreateOrUpdate -// method. -type VPNServerConfigurationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNServerConfigurationsClientBeginDeleteOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginDelete -// method. -type VPNServerConfigurationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNServerConfigurationsClientGetOptions contains the optional parameters for the VPNServerConfigurationsClient.Get method. -type VPNServerConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.ListByResourceGroup -// method. -type VPNServerConfigurationsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.List method. -type VPNServerConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - -// VPNServerConfigurationsClientUpdateTagsOptions contains the optional parameters for the VPNServerConfigurationsClient.UpdateTags -// method. -type VPNServerConfigurationsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// VPNServerConfigurationsResponse - VpnServerConfigurations list associated with VirtualWan Response. -type VPNServerConfigurationsResponse struct { - // List of VpnServerConfigurations associated with VirtualWan. - VPNServerConfigurationResourceIDs []*string `json:"vpnServerConfigurationResourceIds,omitempty"` -} - -// VPNSite - VpnSite Resource. -type VPNSite struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the VPN site. - Properties *VPNSiteProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VPNSiteID - VpnSite Resource. -type VPNSiteID struct { - // READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched. - VPNSite *string `json:"vpnSite,omitempty" azure:"ro"` -} - -// VPNSiteLink - VpnSiteLink Resource. -type VPNSiteLink struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the VPN site link. - Properties *VPNSiteLinkProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VPNSiteLinkConnection - VpnSiteLinkConnection Resource. -type VPNSiteLinkConnection struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the VPN site link connection. - Properties *VPNSiteLinkConnectionProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VPNSiteLinkConnectionProperties - Parameters for VpnConnection. -type VPNSiteLinkConnectionProperties struct { - // Expected bandwidth in MBPS. - ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"` - - // List of egress NatRules. - EgressNatRules []*SubResource `json:"egressNatRules,omitempty"` - - // EnableBgp flag. - EnableBgp *bool `json:"enableBgp,omitempty"` - - // EnableBgp flag. - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - - // The IPSec Policies to be considered by this connection. - IPSecPolicies []*IPSecPolicy `json:"ipsecPolicies,omitempty"` - - // List of ingress NatRules. - IngressNatRules []*SubResource `json:"ingressNatRules,omitempty"` - - // Routing weight for vpn connection. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - - // SharedKey for the vpn connection. - SharedKey *string `json:"sharedKey,omitempty"` - - // Use local azure ip to initiate connection. - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - - // Enable policy-based traffic selectors. - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - - // Connection protocol used for this connection. - VPNConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - - // vpnGatewayCustomBgpAddresses used by this connection. - VPNGatewayCustomBgpAddresses []*GatewayCustomBgpIPAddressIPConfiguration `json:"vpnGatewayCustomBgpAddresses,omitempty"` - - // Vpn link connection mode. - VPNLinkConnectionMode *VPNLinkConnectionMode `json:"vpnLinkConnectionMode,omitempty"` - - // Id of the connected vpn site link. - VPNSiteLink *SubResource `json:"vpnSiteLink,omitempty"` - - // READ-ONLY; The connection status. - ConnectionStatus *VPNConnectionStatus `json:"connectionStatus,omitempty" azure:"ro"` - - // READ-ONLY; Egress bytes transferred. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; Ingress bytes transferred. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the VPN site link connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VPNSiteLinkConnectionsClientGetOptions contains the optional parameters for the VPNSiteLinkConnectionsClient.Get method. -type VPNSiteLinkConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNSiteLinkProperties - Parameters for VpnSite. -type VPNSiteLinkProperties struct { - // The set of bgp properties. - BgpProperties *VPNLinkBgpSettings `json:"bgpProperties,omitempty"` - - // FQDN of vpn-site-link. - Fqdn *string `json:"fqdn,omitempty"` - - // The ip-address for the vpn-site-link. - IPAddress *string `json:"ipAddress,omitempty"` - - // The link provider properties. - LinkProperties *VPNLinkProviderProperties `json:"linkProperties,omitempty"` - - // READ-ONLY; The provisioning state of the VPN site link resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VPNSiteLinksClientGetOptions contains the optional parameters for the VPNSiteLinksClient.Get method. -type VPNSiteLinksClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.ListByVPNSite method. -type VPNSiteLinksClientListByVPNSiteOptions struct { - // placeholder for future optional parameters -} - -// VPNSiteProperties - Parameters for VpnSite. -type VPNSiteProperties struct { - // The AddressSpace that contains an array of IP address ranges. - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - - // The set of bgp properties. - BgpProperties *BgpSettings `json:"bgpProperties,omitempty"` - - // The device properties. - DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"` - - // The ip-address for the vpn-site. - IPAddress *string `json:"ipAddress,omitempty"` - - // IsSecuritySite flag. - IsSecuritySite *bool `json:"isSecuritySite,omitempty"` - - // Office365 Policy. - O365Policy *O365PolicyProperties `json:"o365Policy,omitempty"` - - // The key for vpn-site that can be used for connections. - SiteKey *string `json:"siteKey,omitempty"` - - // List of all vpn site links. - VPNSiteLinks []*VPNSiteLink `json:"vpnSiteLinks,omitempty"` - - // The VirtualWAN to which the vpnSite belongs. - VirtualWan *SubResource `json:"virtualWan,omitempty"` - - // READ-ONLY; The provisioning state of the VPN site resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VPNSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNSitesClient.BeginCreateOrUpdate method. -type VPNSitesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNSitesClientBeginDeleteOptions contains the optional parameters for the VPNSitesClient.BeginDelete method. -type VPNSitesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNSitesClientGetOptions contains the optional parameters for the VPNSitesClient.Get method. -type VPNSitesClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.ListByResourceGroup method. -type VPNSitesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.List method. -type VPNSitesClientListOptions struct { - // placeholder for future optional parameters -} - -// VPNSitesClientUpdateTagsOptions contains the optional parameters for the VPNSitesClient.UpdateTags method. -type VPNSitesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// VPNSitesConfigurationClientBeginDownloadOptions contains the optional parameters for the VPNSitesConfigurationClient.BeginDownload -// method. -type VPNSitesConfigurationClientBeginDownloadOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VerificationIPFlowParameters - Parameters that define the IP flow to be verified. -type VerificationIPFlowParameters struct { - // REQUIRED; The direction of the packet represented as a 5-tuple. - Direction *Direction `json:"direction,omitempty"` - - // REQUIRED; The local IP address. Acceptable values are valid IPv4 addresses. - LocalIPAddress *string `json:"localIPAddress,omitempty"` - - // REQUIRED; The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, - // which depends on the direction. - LocalPort *string `json:"localPort,omitempty"` - - // REQUIRED; Protocol to be verified on. - Protocol *IPFlowProtocol `json:"protocol,omitempty"` - - // REQUIRED; The remote IP address. Acceptable values are valid IPv4 addresses. - RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` - - // REQUIRED; The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source - // port, which depends on the direction. - RemotePort *string `json:"remotePort,omitempty"` - - // REQUIRED; The ID of the target resource to perform next-hop on. - TargetResourceID *string `json:"targetResourceId,omitempty"` - - // The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. - // Otherwise optional). - TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` -} - -// VerificationIPFlowResult - Results of IP flow verification on the target resource. -type VerificationIPFlowResult struct { - // Indicates whether the traffic is allowed or denied. - Access *Access `json:"access,omitempty"` - - // Name of the rule. If input is not matched against any security rule, it is not displayed. - RuleName *string `json:"ruleName,omitempty"` -} - -// VirtualAppliance - NetworkVirtualAppliance Resource. -type VirtualAppliance struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The service principal that has read access to cloud-init and config blob. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the Network Virtual Appliance. - Properties *VirtualAppliancePropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualApplianceListResult - Response for ListNetworkVirtualAppliances API service call. -type VirtualApplianceListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Network Virtual Appliances. - Value []*VirtualAppliance `json:"value,omitempty"` -} - -// VirtualApplianceNicProperties - Network Virtual Appliance NIC properties. -type VirtualApplianceNicProperties struct { - // READ-ONLY; NIC name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Private IP address. - PrivateIPAddress *string `json:"privateIpAddress,omitempty" azure:"ro"` - - // READ-ONLY; Public IP address. - PublicIPAddress *string `json:"publicIpAddress,omitempty" azure:"ro"` -} - -// VirtualAppliancePropertiesFormat - Network Virtual Appliance definition. -type VirtualAppliancePropertiesFormat struct { - // BootStrapConfigurationBlobs storage URLs. - BootStrapConfigurationBlobs []*string `json:"bootStrapConfigurationBlobs,omitempty"` - - // CloudInitConfiguration string in plain text. - CloudInitConfiguration *string `json:"cloudInitConfiguration,omitempty"` - - // CloudInitConfigurationBlob storage URLs. - CloudInitConfigurationBlobs []*string `json:"cloudInitConfigurationBlobs,omitempty"` - - // Network Virtual Appliance SKU. - NvaSKU *VirtualApplianceSKUProperties `json:"nvaSku,omitempty"` - - // Public key for SSH login. - SSHPublicKey *string `json:"sshPublicKey,omitempty"` - - // VirtualAppliance ASN. - VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"` - - // The Virtual Hub where Network Virtual Appliance is being deployed. - VirtualHub *SubResource `json:"virtualHub,omitempty"` - - // READ-ONLY; Address Prefix. - AddressPrefix *string `json:"addressPrefix,omitempty" azure:"ro"` - - // READ-ONLY; List of references to InboundSecurityRules. - InboundSecurityRules []*SubResource `json:"inboundSecurityRules,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; List of Virtual Appliance Network Interfaces. - VirtualApplianceNics []*VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty" azure:"ro"` - - // READ-ONLY; List of references to VirtualApplianceSite. - VirtualApplianceSites []*SubResource `json:"virtualApplianceSites,omitempty" azure:"ro"` -} - -// VirtualApplianceSKU - Definition of the NetworkVirtualApplianceSkus resource. -type VirtualApplianceSKU struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // NetworkVirtualApplianceSku properties. - Properties *VirtualApplianceSKUPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualApplianceSKUInstances - List of available Sku and instances. -type VirtualApplianceSKUInstances struct { - // READ-ONLY; Instance Count. - InstanceCount *int32 `json:"instanceCount,omitempty" azure:"ro"` - - // READ-ONLY; Scale Unit. - ScaleUnit *string `json:"scaleUnit,omitempty" azure:"ro"` -} - -// VirtualApplianceSKUListResult - Response for ListNetworkVirtualApplianceSkus API service call. -type VirtualApplianceSKUListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Network Virtual Appliance Skus that are available. - Value []*VirtualApplianceSKU `json:"value,omitempty"` -} - -// VirtualApplianceSKUProperties - Network Virtual Appliance Sku Properties. -type VirtualApplianceSKUProperties struct { - // Virtual Appliance Scale Unit. - BundledScaleUnit *string `json:"bundledScaleUnit,omitempty"` - - // Virtual Appliance Version. - MarketPlaceVersion *string `json:"marketPlaceVersion,omitempty"` - - // Virtual Appliance Vendor. - Vendor *string `json:"vendor,omitempty"` -} - -// VirtualApplianceSKUPropertiesFormat - Properties specific to NetworkVirtualApplianceSkus. -type VirtualApplianceSKUPropertiesFormat struct { - // The list of scale units available. - AvailableScaleUnits []*VirtualApplianceSKUInstances `json:"availableScaleUnits,omitempty"` - - // READ-ONLY; Available Network Virtual Appliance versions. - AvailableVersions []*string `json:"availableVersions,omitempty" azure:"ro"` - - // READ-ONLY; Network Virtual Appliance Sku vendor. - Vendor *string `json:"vendor,omitempty" azure:"ro"` -} - -// VirtualApplianceSKUsClientGetOptions contains the optional parameters for the VirtualApplianceSKUsClient.Get method. -type VirtualApplianceSKUsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.List method. -type VirtualApplianceSKUsClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualApplianceSite - Virtual Appliance Site resource. -type VirtualApplianceSite struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the virtual appliance site. - Name *string `json:"name,omitempty"` - - // The properties of the Virtual Appliance Sites. - Properties *VirtualApplianceSiteProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Site type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualApplianceSiteListResult - Response for ListNetworkVirtualApplianceSites API service call. -type VirtualApplianceSiteListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Network Virtual Appliance sites. - Value []*VirtualApplianceSite `json:"value,omitempty"` -} - -// VirtualApplianceSiteProperties - Properties of the rule group. -type VirtualApplianceSiteProperties struct { - // Address Prefix. - AddressPrefix *string `json:"addressPrefix,omitempty"` - - // Office 365 Policy. - O365Policy *Office365PolicyProperties `json:"o365Policy,omitempty"` - - // READ-ONLY; The provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VirtualApplianceSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginCreateOrUpdate -// method. -type VirtualApplianceSitesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualApplianceSitesClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginDelete -// method. -type VirtualApplianceSitesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualApplianceSitesClientGetOptions contains the optional parameters for the VirtualApplianceSitesClient.Get method. -type VirtualApplianceSitesClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.List method. -type VirtualApplianceSitesClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualAppliancesClient.BeginCreateOrUpdate -// method. -type VirtualAppliancesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualAppliancesClientBeginDeleteOptions contains the optional parameters for the VirtualAppliancesClient.BeginDelete -// method. -type VirtualAppliancesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualAppliancesClientGetOptions contains the optional parameters for the VirtualAppliancesClient.Get method. -type VirtualAppliancesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.ListByResourceGroup -// method. -type VirtualAppliancesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.List method. -type VirtualAppliancesClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualAppliancesClientUpdateTagsOptions contains the optional parameters for the VirtualAppliancesClient.UpdateTags method. -type VirtualAppliancesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// VirtualHub Resource. -type VirtualHub struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the virtual hub. - Properties *VirtualHubProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server. - Kind *string `json:"kind,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginCreateOrUpdate -// method. -type VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubBgpConnectionClientBeginDeleteOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginDelete -// method. -type VirtualHubBgpConnectionClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubBgpConnectionClientGetOptions contains the optional parameters for the VirtualHubBgpConnectionClient.Get method. -type VirtualHubBgpConnectionClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes -// method. -type VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListLearnedRoutes -// method. -type VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.List -// method. -type VirtualHubBgpConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubEffectiveRoute - The effective route configured on the virtual hub or specified resource. -type VirtualHubEffectiveRoute struct { - // The list of address prefixes. - AddressPrefixes []*string `json:"addressPrefixes,omitempty"` - - // The ASPath of this route. - AsPath *string `json:"asPath,omitempty"` - - // The type of the next hop. - NextHopType *string `json:"nextHopType,omitempty"` - - // The list of next hops. - NextHops []*string `json:"nextHops,omitempty"` - - // The origin of this route. - RouteOrigin *string `json:"routeOrigin,omitempty"` -} - -// VirtualHubEffectiveRouteList - EffectiveRoutes List. -type VirtualHubEffectiveRouteList struct { - // The list of effective routes configured on the virtual hub or the specified resource. - Value []*VirtualHubEffectiveRoute `json:"value,omitempty"` -} - -// VirtualHubID - Virtual Hub identifier. -type VirtualHubID struct { - // The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and - // the ExpressRoute gateway resource reside in the same subscription. - ID *string `json:"id,omitempty"` -} - -// VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginCreateOrUpdate -// method. -type VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubIPConfigurationClientBeginDeleteOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginDelete -// method. -type VirtualHubIPConfigurationClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubIPConfigurationClientGetOptions contains the optional parameters for the VirtualHubIPConfigurationClient.Get -// method. -type VirtualHubIPConfigurationClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.List -// method. -type VirtualHubIPConfigurationClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubProperties - Parameters for VirtualHub. -type VirtualHubProperties struct { - // Address-prefix for this VirtualHub. - AddressPrefix *string `json:"addressPrefix,omitempty"` - - // Flag to control transit for VirtualRouter hub. - AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` - - // The azureFirewall associated with this VirtualHub. - AzureFirewall *SubResource `json:"azureFirewall,omitempty"` - - // The expressRouteGateway associated with this VirtualHub. - ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"` - - // The hubRoutingPreference of this VirtualHub. - HubRoutingPreference *HubRoutingPreference `json:"hubRoutingPreference,omitempty"` - - // The P2SVpnGateway associated with this VirtualHub. - P2SVPNGateway *SubResource `json:"p2SVpnGateway,omitempty"` - - // The preferred gateway to route on-prem traffic - PreferredRoutingGateway *PreferredRoutingGateway `json:"preferredRoutingGateway,omitempty"` - - // The routeTable associated with this virtual hub. - RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"` - - // The sku of this VirtualHub. - SKU *string `json:"sku,omitempty"` - - // The securityPartnerProvider associated with this VirtualHub. - SecurityPartnerProvider *SubResource `json:"securityPartnerProvider,omitempty"` - - // The Security Provider name. - SecurityProviderName *string `json:"securityProviderName,omitempty"` - - // The VpnGateway associated with this VirtualHub. - VPNGateway *SubResource `json:"vpnGateway,omitempty"` - - // List of all virtual hub route table v2s associated with this VirtualHub. - VirtualHubRouteTableV2S []*VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"` - - // VirtualRouter ASN. - VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"` - - // The VirtualHub Router autoscale configuration. - VirtualRouterAutoScaleConfiguration *VirtualRouterAutoScaleConfiguration `json:"virtualRouterAutoScaleConfiguration,omitempty"` - - // VirtualRouter IPs. - VirtualRouterIPs []*string `json:"virtualRouterIps,omitempty"` - - // The VirtualWAN to which the VirtualHub belongs. - VirtualWan *SubResource `json:"virtualWan,omitempty"` - - // READ-ONLY; List of references to Bgp Connections. - BgpConnections []*SubResource `json:"bgpConnections,omitempty" azure:"ro"` - - // READ-ONLY; List of references to IpConfigurations. - IPConfigurations []*SubResource `json:"ipConfigurations,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the virtual hub resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The routing state. - RoutingState *RoutingState `json:"routingState,omitempty" azure:"ro"` -} - -// VirtualHubRoute - VirtualHub route. -type VirtualHubRoute struct { - // List of all addressPrefixes. - AddressPrefixes []*string `json:"addressPrefixes,omitempty"` - - // NextHop ip address. - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} - -// VirtualHubRouteTable - VirtualHub route table. -type VirtualHubRouteTable struct { - // List of all routes. - Routes []*VirtualHubRoute `json:"routes,omitempty"` -} - -// VirtualHubRouteTableV2 Resource. -type VirtualHubRouteTableV2 struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the virtual hub route table v2. - Properties *VirtualHubRouteTableV2Properties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// VirtualHubRouteTableV2Properties - Parameters for VirtualHubRouteTableV2. -type VirtualHubRouteTableV2Properties struct { - // List of all connections attached to this route table v2. - AttachedConnections []*string `json:"attachedConnections,omitempty"` - - // List of all routes. - Routes []*VirtualHubRouteV2 `json:"routes,omitempty"` - - // READ-ONLY; The provisioning state of the virtual hub route table v2 resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginCreateOrUpdate -// method. -type VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubRouteTableV2SClientBeginDeleteOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginDelete -// method. -type VirtualHubRouteTableV2SClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubRouteTableV2SClientGetOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.Get method. -type VirtualHubRouteTableV2SClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.List method. -type VirtualHubRouteTableV2SClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubRouteV2 - VirtualHubRouteTableV2 route. -type VirtualHubRouteV2 struct { - // The type of destinations. - DestinationType *string `json:"destinationType,omitempty"` - - // List of all destinations. - Destinations []*string `json:"destinations,omitempty"` - - // The type of next hops. - NextHopType *string `json:"nextHopType,omitempty"` - - // NextHops ip address. - NextHops []*string `json:"nextHops,omitempty"` -} - -// VirtualHubsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubsClient.BeginCreateOrUpdate -// method. -type VirtualHubsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubsClientBeginDeleteOptions contains the optional parameters for the VirtualHubsClient.BeginDelete method. -type VirtualHubsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes -// method. -type VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions struct { - // Parameters supplied to get the effective routes for a specific resource. - EffectiveRoutesParameters *EffectiveRoutesParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubsClientGetOptions contains the optional parameters for the VirtualHubsClient.Get method. -type VirtualHubsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.ListByResourceGroup -// method. -type VirtualHubsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.List method. -type VirtualHubsClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubsClientUpdateTagsOptions contains the optional parameters for the VirtualHubsClient.UpdateTags method. -type VirtualHubsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetwork - Virtual Network resource. -type VirtualNetwork struct { - // The extended location of the virtual network. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the virtual network. - Properties *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualNetworkBgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this -// VNET. -type VirtualNetworkBgpCommunities struct { - // REQUIRED; The BGP community associated with the virtual network. - VirtualNetworkCommunity *string `json:"virtualNetworkCommunity,omitempty"` - - // READ-ONLY; The BGP community associated with the region of the virtual network. - RegionalCommunity *string `json:"regionalCommunity,omitempty" azure:"ro"` -} - -// VirtualNetworkConnectionGatewayReference - A reference to VirtualNetworkGateway or LocalNetworkGateway resource. -type VirtualNetworkConnectionGatewayReference struct { - // REQUIRED; The ID of VirtualNetworkGateway or LocalNetworkGateway resource. - ID *string `json:"id,omitempty"` -} - -// VirtualNetworkEncryption - Indicates if encryption is enabled on virtual network and if VM without encryption is allowed -// in encrypted VNet. -type VirtualNetworkEncryption struct { - // REQUIRED; Indicates if encryption is enabled on the virtual network. - Enabled *bool `json:"enabled,omitempty"` - - // If the encrypted VNet allows VM that does not support encryption - Enforcement *VirtualNetworkEncryptionEnforcement `json:"enforcement,omitempty"` -} - -// VirtualNetworkGateway - A common class for general resource information. -type VirtualNetworkGateway struct { - // REQUIRED; Properties of the virtual network gateway. - Properties *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` - - // The extended location of type local virtual network gateway. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayConnection - A common class for general resource information. -type VirtualNetworkGatewayConnection struct { - // REQUIRED; Properties of the virtual network gateway connection. - Properties *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayConnectionListEntity - A common class for general resource information. -type VirtualNetworkGatewayConnectionListEntity struct { - // REQUIRED; Properties of the virtual network gateway connection. - Properties *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"` - - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - VirtualNetworkGatewayConnection properties. -type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { - // REQUIRED; Gateway connection type. - ConnectionType *VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` - - // REQUIRED; The reference to virtual network gateway resource. - VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"` - - // The authorizationKey. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - - // The connection mode for this connection. - ConnectionMode *VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"` - - // Connection protocol used for this connection. - ConnectionProtocol *VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` - - // EnableBgp flag. - EnableBgp *bool `json:"enableBgp,omitempty"` - - // Bypass ExpressRoute Gateway for data forwarding. - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - - // GatewayCustomBgpIpAddresses to be used for virtual network gateway Connection. - GatewayCustomBgpIPAddresses []*GatewayCustomBgpIPAddressIPConfiguration `json:"gatewayCustomBgpIpAddresses,omitempty"` - - // The IPSec Policies to be considered by this connection. - IPSecPolicies []*IPSecPolicy `json:"ipsecPolicies,omitempty"` - - // The reference to local network gateway resource. - LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` - - // The reference to peerings resource. - Peer *SubResource `json:"peer,omitempty"` - - // The routing weight. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - - // The IPSec shared key. - SharedKey *string `json:"sharedKey,omitempty"` - - // The Traffic Selector Policies to be considered by this connection. - TrafficSelectorPolicies []*TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - - // Enable policy-based traffic selectors. - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - - // The reference to virtual network gateway resource. - VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` - - // READ-ONLY; Virtual Network Gateway connection status. - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty" azure:"ro"` - - // READ-ONLY; The egress bytes transferred in this connection. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The ingress bytes transferred in this connection. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the virtual network gateway connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the virtual network gateway connection resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` - - // READ-ONLY; Collection of all tunnels' connection health status. - TunnelConnectionStatus []*TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayConnectionListResult - Response for the ListVirtualNetworkGatewayConnections API service call. -type VirtualNetworkGatewayConnectionListResult struct { - // A list of VirtualNetworkGatewayConnection resources that exists in a resource group. - Value []*VirtualNetworkGatewayConnection `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayConnectionPropertiesFormat - VirtualNetworkGatewayConnection properties. -type VirtualNetworkGatewayConnectionPropertiesFormat struct { - // REQUIRED; Gateway connection type. - ConnectionType *VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` - - // REQUIRED; The reference to virtual network gateway resource. - VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"` - - // The authorizationKey. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - - // The connection mode for this connection. - ConnectionMode *VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"` - - // Connection protocol used for this connection. - ConnectionProtocol *VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` - - // The dead peer detection timeout of this connection in seconds. - DpdTimeoutSeconds *int32 `json:"dpdTimeoutSeconds,omitempty"` - - // List of egress NatRules. - EgressNatRules []*SubResource `json:"egressNatRules,omitempty"` - - // EnableBgp flag. - EnableBgp *bool `json:"enableBgp,omitempty"` - - // Bypass ExpressRoute Gateway for data forwarding. - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - - // GatewayCustomBgpIpAddresses to be used for virtual network gateway Connection. - GatewayCustomBgpIPAddresses []*GatewayCustomBgpIPAddressIPConfiguration `json:"gatewayCustomBgpIpAddresses,omitempty"` - - // The IPSec Policies to be considered by this connection. - IPSecPolicies []*IPSecPolicy `json:"ipsecPolicies,omitempty"` - - // List of ingress NatRules. - IngressNatRules []*SubResource `json:"ingressNatRules,omitempty"` - - // The reference to local network gateway resource. - LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` - - // The reference to peerings resource. - Peer *SubResource `json:"peer,omitempty"` - - // The routing weight. - RoutingWeight *int32 `json:"routingWeight,omitempty"` - - // The IPSec shared key. - SharedKey *string `json:"sharedKey,omitempty"` - - // The Traffic Selector Policies to be considered by this connection. - TrafficSelectorPolicies []*TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - - // Use private local Azure IP for the connection. - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - - // Enable policy-based traffic selectors. - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - - // The reference to virtual network gateway resource. - VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` - - // READ-ONLY; Virtual Network Gateway connection status. - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty" azure:"ro"` - - // READ-ONLY; The egress bytes transferred in this connection. - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The ingress bytes transferred in this connection. - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the virtual network gateway connection resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the virtual network gateway connection resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` - - // READ-ONLY; Collection of all tunnels' connection health status. - TunnelConnectionStatus []*TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate -// method. -type VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginDelete -// method. -type VirtualNetworkGatewayConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas -// method. -type VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetConnection -// method. -type VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey -// method. -type VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey -// method. -type VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture -// method. -type VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions struct { - // Virtual network gateway packet capture parameters supplied to start packet capture on gateway connection. - Parameters *VPNPacketCaptureStartParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture -// method. -type VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginUpdateTags -// method. -type VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientGetOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.Get -// method. -type VirtualNetworkGatewayConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.GetSharedKey -// method. -type VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.List -// method. -type VirtualNetworkGatewayConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewayIPConfiguration - IP configuration for virtual network gateway. -type VirtualNetworkGatewayIPConfiguration struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the virtual network gateway ip configuration. - Properties *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of VirtualNetworkGatewayIPConfiguration. -type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { - // The private IP address allocation method. - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - - // The reference to the public IP resource. - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - - // The reference to the subnet resource. - Subnet *SubResource `json:"subnet,omitempty"` - - // READ-ONLY; Private IP Address for this gateway. - PrivateIPAddress *string `json:"privateIPAddress,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayListConnectionsResult - Response for the VirtualNetworkGatewayListConnections API service call. -type VirtualNetworkGatewayListConnectionsResult struct { - // A list of VirtualNetworkGatewayConnection resources that exists in a resource group. - Value []*VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayListResult - Response for the ListVirtualNetworkGateways API service call. -type VirtualNetworkGatewayListResult struct { - // A list of VirtualNetworkGateway resources that exists in a resource group. - Value []*VirtualNetworkGateway `json:"value,omitempty"` - - // READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayNatRule Resource. -type VirtualNetworkGatewayNatRule struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the Virtual Network Gateway NAT rule. - Properties *VirtualNetworkGatewayNatRuleProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayNatRuleProperties - Parameters for VirtualNetworkGatewayNatRule. -type VirtualNetworkGatewayNatRuleProperties struct { - // The private IP address external mapping for NAT. - ExternalMappings []*VPNNatRuleMapping `json:"externalMappings,omitempty"` - - // The IP Configuration ID this NAT rule applies to. - IPConfigurationID *string `json:"ipConfigurationId,omitempty"` - - // The private IP address internal mapping for NAT. - InternalMappings []*VPNNatRuleMapping `json:"internalMappings,omitempty"` - - // The Source NAT direction of a VPN NAT. - Mode *VPNNatRuleMode `json:"mode,omitempty"` - - // The type of NAT rule for VPN NAT. - Type *VPNNatRuleType `json:"type,omitempty"` - - // READ-ONLY; The provisioning state of the NAT Rule resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate -// method. -type VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayNatRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginDelete -// method. -type VirtualNetworkGatewayNatRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayNatRulesClientGetOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.Get -// method. -type VirtualNetworkGatewayNatRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway -// method. -type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewayPropertiesFormat - VirtualNetworkGateway properties. -type VirtualNetworkGatewayPropertiesFormat struct { - // ActiveActive flag. - Active *bool `json:"activeActive,omitempty"` - - // Virtual network gateway's BGP speaker settings. - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - - // The reference to the address space resource which represents the custom routes address space specified by the customer - // for virtual network gateway and VpnClient. - CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` - - // disableIPSecReplayProtection flag. - DisableIPSecReplayProtection *bool `json:"disableIPSecReplayProtection,omitempty"` - - // Whether BGP is enabled for this virtual network gateway or not. - EnableBgp *bool `json:"enableBgp,omitempty"` - - // EnableBgpRouteTranslationForNat flag. - EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` - - // Whether dns forwarding is enabled or not. - EnableDNSForwarding *bool `json:"enableDnsForwarding,omitempty"` - - // Whether private IP needs to be enabled on this gateway for connections or not. - EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"` - - // The reference to the LocalNetworkGateway resource which represents local network site having default routes. Assign Null - // value in case of removing existing default site setting. - GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` - - // The type of this virtual network gateway. - GatewayType *VirtualNetworkGatewayType `json:"gatewayType,omitempty"` - - // IP configurations for virtual network gateway. - IPConfigurations []*VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - - // NatRules for virtual network gateway. - NatRules []*VirtualNetworkGatewayNatRule `json:"natRules,omitempty"` - - // The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. - SKU *VirtualNetworkGatewaySKU `json:"sku,omitempty"` - - // Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet. - VNetExtendedLocationResourceID *string `json:"vNetExtendedLocationResourceId,omitempty"` - - // The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations. - VPNClientConfiguration *VPNClientConfiguration `json:"vpnClientConfiguration,omitempty"` - - // The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. - VPNGatewayGeneration *VPNGatewayGeneration `json:"vpnGatewayGeneration,omitempty"` - - // The type of this virtual network gateway. - VPNType *VPNType `json:"vpnType,omitempty"` - - // READ-ONLY; The IP address allocated by the gateway to which dns requests can be sent. - InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the virtual network gateway resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the virtual network gateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewaySKU - VirtualNetworkGatewaySku details. -type VirtualNetworkGatewaySKU struct { - // Gateway SKU name. - Name *VirtualNetworkGatewaySKUName `json:"name,omitempty"` - - // Gateway SKU tier. - Tier *VirtualNetworkGatewaySKUTier `json:"tier,omitempty"` - - // READ-ONLY; The capacity. - Capacity *int32 `json:"capacity,omitempty" azure:"ro"` -} - -// VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginCreateOrUpdate -// method. -type VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginDelete -// method. -type VirtualNetworkGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions contains the optional parameters -// for the VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections method. -type VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGenerateVPNProfile -// method. -type VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage -// method. -type VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes -// method. -type VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus -// method. -type VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions struct { - // The IP address of the peer to retrieve the status of. - Peer *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetLearnedRoutes -// method. -type VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL -// method. -type VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth -// method. -type VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters -// method. -type VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginResetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginReset -// method. -type VirtualNetworkGatewaysClientBeginResetOptions struct { - // Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. - GatewayVip *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey -// method. -type VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters -// method. -type VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStartPacketCapture -// method. -type VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions struct { - // Virtual network gateway packet capture parameters supplied to start packet capture on gateway. - Parameters *VPNPacketCaptureStartParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStopPacketCapture -// method. -type VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginUpdateTags -// method. -type VirtualNetworkGatewaysClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientGetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.Get method. -type VirtualNetworkGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.ListConnections -// method. -type VirtualNetworkGatewaysClientListConnectionsOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.List method. -type VirtualNetworkGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewaysClientSupportedVPNDevicesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.SupportedVPNDevices -// method. -type VirtualNetworkGatewaysClientSupportedVPNDevicesOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions contains the optional parameters for the VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript -// method. -type VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkListResult - Response for the ListVirtualNetworks API service call. -type VirtualNetworkListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of VirtualNetwork resources in a resource group. - Value []*VirtualNetwork `json:"value,omitempty"` -} - -// VirtualNetworkListUsageResult - Response for the virtual networks GetUsage API service call. -type VirtualNetworkListUsageResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // READ-ONLY; VirtualNetwork usage stats. - Value []*VirtualNetworkUsage `json:"value,omitempty" azure:"ro"` -} - -// VirtualNetworkPeering - Peerings in a virtual network resource. -type VirtualNetworkPeering struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // Properties of the virtual network peering. - Properties *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` - - // Resource type. - Type *string `json:"type,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// VirtualNetworkPeeringListResult - Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual -// network. -type VirtualNetworkPeeringListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // The peerings in a virtual network. - Value []*VirtualNetworkPeering `json:"value,omitempty"` -} - -// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering. -type VirtualNetworkPeeringPropertiesFormat struct { - // Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. - AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` - - // If gateway links can be used in remote virtual networking to link to this virtual network. - AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` - - // Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. - AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` - - // If we need to verify the provisioning state of the remote gateway. - DoNotVerifyRemoteGateways *bool `json:"doNotVerifyRemoteGateways,omitempty"` - - // The status of the virtual network peering. - PeeringState *VirtualNetworkPeeringState `json:"peeringState,omitempty"` - - // The peering sync status of the virtual network peering. - PeeringSyncLevel *VirtualNetworkPeeringLevel `json:"peeringSyncLevel,omitempty"` - - // The reference to the address space peered with the remote virtual network. - RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` - - // The reference to the remote virtual network's Bgp Communities. - RemoteBgpCommunities *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"` - - // The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). - // See here to register for the preview and learn more - // (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - - // The reference to the current address space of the remote virtual network. - RemoteVirtualNetworkAddressSpace *AddressSpace `json:"remoteVirtualNetworkAddressSpace,omitempty"` - - // If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering - // is also true, virtual network will use gateways of remote virtual network - // for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a - // gateway. - UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` - - // READ-ONLY; The provisioning state of the virtual network peering resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The reference to the remote virtual network's encryption - RemoteVirtualNetworkEncryption *VirtualNetworkEncryption `json:"remoteVirtualNetworkEncryption,omitempty" azure:"ro"` - - // READ-ONLY; The resourceGuid property of the Virtual Network peering resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginCreateOrUpdate -// method. -type VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string - // Parameter indicates the intention to sync the peering with the current address space on the remote vNet after it's updated. - SyncRemoteAddressSpace *SyncRemoteAddressSpace -} - -// VirtualNetworkPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginDelete -// method. -type VirtualNetworkPeeringsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkPeeringsClientGetOptions contains the optional parameters for the VirtualNetworkPeeringsClient.Get method. -type VirtualNetworkPeeringsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.List method. -type VirtualNetworkPeeringsClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkPropertiesFormat - Properties of the virtual network. -type VirtualNetworkPropertiesFormat struct { - // The AddressSpace that contains an array of IP address ranges that can be used by subnets. - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - - // Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. - BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"` - - // The DDoS protection plan associated with the virtual network. - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - - // The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. - DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` - - // Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection - // plan associated with the resource. - EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` - - // Indicates if VM protection is enabled for all the subnets in the virtual network. - EnableVMProtection *bool `json:"enableVmProtection,omitempty"` - - // Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. - Encryption *VirtualNetworkEncryption `json:"encryption,omitempty"` - - // The FlowTimeout value (in minutes) for the Virtual Network - FlowTimeoutInMinutes *int32 `json:"flowTimeoutInMinutes,omitempty"` - - // Array of IpAllocation which reference this VNET. - IPAllocations []*SubResource `json:"ipAllocations,omitempty"` - - // A list of subnets in a Virtual Network. - Subnets []*Subnet `json:"subnets,omitempty"` - - // A list of peerings in a Virtual Network. - VirtualNetworkPeerings []*VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` - - // READ-ONLY; The provisioning state of the virtual network resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resourceGuid property of the Virtual Network resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// VirtualNetworkTap - Virtual Network Tap resource. -type VirtualNetworkTap struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Virtual Network Tap Properties. - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualNetworkTapListResult - Response for ListVirtualNetworkTap API service call. -type VirtualNetworkTapListResult struct { - // The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // A list of VirtualNetworkTaps in a resource group. - Value []*VirtualNetworkTap `json:"value,omitempty"` -} - -// VirtualNetworkTapPropertiesFormat - Virtual Network Tap properties. -type VirtualNetworkTapPropertiesFormat struct { - // The reference to the private IP address on the internal Load Balancer that will receive the tap. - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - - // The reference to the private IP Address of the collector nic that will receive the tap. - DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - - // The VXLAN destination port that will receive the tapped traffic. - DestinationPort *int32 `json:"destinationPort,omitempty"` - - // READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped. - NetworkInterfaceTapConfigurations []*InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the virtual network tap resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; The resource GUID property of the virtual network tap resource. - ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` -} - -// VirtualNetworkTapsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginCreateOrUpdate -// method. -type VirtualNetworkTapsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkTapsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginDelete -// method. -type VirtualNetworkTapsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkTapsClientGetOptions contains the optional parameters for the VirtualNetworkTapsClient.Get method. -type VirtualNetworkTapsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.ListAll method. -type VirtualNetworkTapsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.ListByResourceGroup -// method. -type VirtualNetworkTapsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkTapsClientUpdateTagsOptions contains the optional parameters for the VirtualNetworkTapsClient.UpdateTags -// method. -type VirtualNetworkTapsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkUsage - Usage details for subnet. -type VirtualNetworkUsage struct { - // READ-ONLY; Indicates number of IPs used from the Subnet. - CurrentValue *float64 `json:"currentValue,omitempty" azure:"ro"` - - // READ-ONLY; Subnet identifier. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Indicates the size of the subnet. - Limit *float64 `json:"limit,omitempty" azure:"ro"` - - // READ-ONLY; The name containing common and localized value for usage. - Name *VirtualNetworkUsageName `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Usage units. Returns 'Count'. - Unit *string `json:"unit,omitempty" azure:"ro"` -} - -// VirtualNetworkUsageName - Usage strings container. -type VirtualNetworkUsageName struct { - // READ-ONLY; Localized subnet size and usage string. - LocalizedValue *string `json:"localizedValue,omitempty" azure:"ro"` - - // READ-ONLY; Subnet size and usage string. - Value *string `json:"value,omitempty" azure:"ro"` -} - -// VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate -// method. -type VirtualNetworksClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method. -type VirtualNetworksClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworksClientCheckIPAddressAvailabilityOptions contains the optional parameters for the VirtualNetworksClient.CheckIPAddressAvailability -// method. -type VirtualNetworksClientCheckIPAddressAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. -type VirtualNetworksClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.ListAll method. -type VirtualNetworksClientListAllOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.List method. -type VirtualNetworksClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.ListUsage method. -type VirtualNetworksClientListUsageOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworksClientUpdateTagsOptions contains the optional parameters for the VirtualNetworksClient.UpdateTags method. -type VirtualNetworksClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// VirtualRouter Resource. -type VirtualRouter struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the Virtual Router. - Properties *VirtualRouterPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualRouterAutoScaleConfiguration - The VirtualHub Router autoscale configuration. -type VirtualRouterAutoScaleConfiguration struct { - // The minimum number of scale units for VirtualHub Router. - MinCapacity *int32 `json:"minCapacity,omitempty"` -} - -// VirtualRouterListResult - Response for ListVirtualRouters API service call. -type VirtualRouterListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of Virtual Routers. - Value []*VirtualRouter `json:"value,omitempty"` -} - -// VirtualRouterPeering - Virtual Router Peering resource. -type VirtualRouterPeering struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Name of the virtual router peering that is unique within a virtual router. - Name *string `json:"name,omitempty"` - - // The properties of the Virtual Router Peering. - Properties *VirtualRouterPeeringProperties `json:"properties,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Peering type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualRouterPeeringListResult - Response for ListVirtualRouterPeerings API service call. -type VirtualRouterPeeringListResult struct { - // URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` - - // List of VirtualRouterPeerings in a VirtualRouter. - Value []*VirtualRouterPeering `json:"value,omitempty"` -} - -// VirtualRouterPeeringProperties - Properties of the rule group. -type VirtualRouterPeeringProperties struct { - // Peer ASN. - PeerAsn *int64 `json:"peerAsn,omitempty"` - - // Peer IP. - PeerIP *string `json:"peerIp,omitempty"` - - // READ-ONLY; The provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VirtualRouterPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginCreateOrUpdate -// method. -type VirtualRouterPeeringsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualRouterPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginDelete -// method. -type VirtualRouterPeeringsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualRouterPeeringsClientGetOptions contains the optional parameters for the VirtualRouterPeeringsClient.Get method. -type VirtualRouterPeeringsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.List method. -type VirtualRouterPeeringsClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualRouterPropertiesFormat - Virtual Router definition. -type VirtualRouterPropertiesFormat struct { - // The Gateway on which VirtualRouter is hosted. - HostedGateway *SubResource `json:"hostedGateway,omitempty"` - - // The Subnet on which VirtualRouter is hosted. - HostedSubnet *SubResource `json:"hostedSubnet,omitempty"` - - // VirtualRouter ASN. - VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"` - - // VirtualRouter IPs. - VirtualRouterIPs []*string `json:"virtualRouterIps,omitempty"` - - // READ-ONLY; List of references to VirtualRouterPeerings. - Peerings []*SubResource `json:"peerings,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// VirtualRoutersClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRoutersClient.BeginCreateOrUpdate -// method. -type VirtualRoutersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualRoutersClientBeginDeleteOptions contains the optional parameters for the VirtualRoutersClient.BeginDelete method. -type VirtualRoutersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualRoutersClientGetOptions contains the optional parameters for the VirtualRoutersClient.Get method. -type VirtualRoutersClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.ListByResourceGroup -// method. -type VirtualRoutersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.List method. -type VirtualRoutersClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualWAN Resource. -type VirtualWAN struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the virtual WAN. - Properties *VirtualWanProperties `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VirtualWanProperties - Parameters for VirtualWAN. -type VirtualWanProperties struct { - // True if branch to branch traffic is allowed. - AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` - - // True if Vnet to Vnet traffic is allowed. - AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"` - - // Vpn encryption to be disabled or not. - DisableVPNEncryption *bool `json:"disableVpnEncryption,omitempty"` - - // The type of the VirtualWAN. - Type *string `json:"type,omitempty"` - - // READ-ONLY; The office local breakout category. - Office365LocalBreakoutCategory *OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the virtual WAN resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; List of VpnSites in the VirtualWAN. - VPNSites []*SubResource `json:"vpnSites,omitempty" azure:"ro"` - - // READ-ONLY; List of VirtualHubs in the VirtualWAN. - VirtualHubs []*SubResource `json:"virtualHubs,omitempty" azure:"ro"` -} - -// VirtualWanSecurityProvider - Collection of SecurityProviders. -type VirtualWanSecurityProvider struct { - // Name of the security provider. - Name *string `json:"name,omitempty"` - - // Url of the security provider. - URL *string `json:"url,omitempty"` - - // READ-ONLY; Name of the security provider. - Type *VirtualWanSecurityProviderType `json:"type,omitempty" azure:"ro"` -} - -// VirtualWanSecurityProviders - Collection of SecurityProviders. -type VirtualWanSecurityProviders struct { - // List of VirtualWAN security providers. - SupportedProviders []*VirtualWanSecurityProvider `json:"supportedProviders,omitempty"` -} - -// VirtualWanVPNProfileParameters - Virtual Wan Vpn profile parameters Vpn profile generation. -type VirtualWanVPNProfileParameters struct { - // VPN client authentication method. - AuthenticationMethod *AuthenticationMethod `json:"authenticationMethod,omitempty"` - - // VpnServerConfiguration partial resource uri with which VirtualWan is associated to. - VPNServerConfigurationResourceID *string `json:"vpnServerConfigurationResourceId,omitempty"` -} - -// VirtualWansClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualWansClient.BeginCreateOrUpdate -// method. -type VirtualWansClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualWansClientBeginDeleteOptions contains the optional parameters for the VirtualWansClient.BeginDelete method. -type VirtualWansClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualWansClientGetOptions contains the optional parameters for the VirtualWansClient.Get method. -type VirtualWansClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.ListByResourceGroup -// method. -type VirtualWansClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.List method. -type VirtualWansClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualWansClientUpdateTagsOptions contains the optional parameters for the VirtualWansClient.UpdateTags method. -type VirtualWansClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// VnetRoute - List of routes that control routing from VirtualHub into a virtual network connection. -type VnetRoute struct { - // List of all Static Routes. - StaticRoutes []*StaticRoute `json:"staticRoutes,omitempty"` - - // READ-ONLY; The list of references to HubBgpConnection objects. - BgpConnections []*SubResource `json:"bgpConnections,omitempty" azure:"ro"` -} - -// Watcher - Network watcher in a resource group. -type Watcher struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the network watcher. - Properties *WatcherPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WatcherListResult - Response for ListNetworkWatchers API service call. -type WatcherListResult struct { - // List of network watcher resources. - Value []*Watcher `json:"value,omitempty"` -} - -// WatcherPropertiesFormat - The network watcher properties. -type WatcherPropertiesFormat struct { - // READ-ONLY; The provisioning state of the network watcher resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} - -// WatchersClientBeginCheckConnectivityOptions contains the optional parameters for the WatchersClient.BeginCheckConnectivity -// method. -type WatchersClientBeginCheckConnectivityOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method. -type WatchersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetAzureReachabilityReportOptions contains the optional parameters for the WatchersClient.BeginGetAzureReachabilityReport -// method. -type WatchersClientBeginGetAzureReachabilityReportOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetFlowLogStatusOptions contains the optional parameters for the WatchersClient.BeginGetFlowLogStatus -// method. -type WatchersClientBeginGetFlowLogStatusOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetNetworkConfigurationDiagnosticOptions contains the optional parameters for the WatchersClient.BeginGetNetworkConfigurationDiagnostic -// method. -type WatchersClientBeginGetNetworkConfigurationDiagnosticOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetNextHopOptions contains the optional parameters for the WatchersClient.BeginGetNextHop method. -type WatchersClientBeginGetNextHopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetTroubleshootingOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshooting -// method. -type WatchersClientBeginGetTroubleshootingOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetTroubleshootingResultOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshootingResult -// method. -type WatchersClientBeginGetTroubleshootingResultOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetVMSecurityRulesOptions contains the optional parameters for the WatchersClient.BeginGetVMSecurityRules -// method. -type WatchersClientBeginGetVMSecurityRulesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginListAvailableProvidersOptions contains the optional parameters for the WatchersClient.BeginListAvailableProviders -// method. -type WatchersClientBeginListAvailableProvidersOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginSetFlowLogConfigurationOptions contains the optional parameters for the WatchersClient.BeginSetFlowLogConfiguration -// method. -type WatchersClientBeginSetFlowLogConfigurationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginVerifyIPFlowOptions contains the optional parameters for the WatchersClient.BeginVerifyIPFlow method. -type WatchersClientBeginVerifyIPFlowOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientCreateOrUpdateOptions contains the optional parameters for the WatchersClient.CreateOrUpdate method. -type WatchersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WatchersClientGetOptions contains the optional parameters for the WatchersClient.Get method. -type WatchersClientGetOptions struct { - // placeholder for future optional parameters -} - -// WatchersClientGetTopologyOptions contains the optional parameters for the WatchersClient.GetTopology method. -type WatchersClientGetTopologyOptions struct { - // placeholder for future optional parameters -} - -// WatchersClientListAllOptions contains the optional parameters for the WatchersClient.ListAll method. -type WatchersClientListAllOptions struct { - // placeholder for future optional parameters -} - -// WatchersClientListOptions contains the optional parameters for the WatchersClient.List method. -type WatchersClientListOptions struct { - // placeholder for future optional parameters -} - -// WatchersClientUpdateTagsOptions contains the optional parameters for the WatchersClient.UpdateTags method. -type WatchersClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// WebApplicationFirewallCustomRule - Defines contents of a web application rule. -type WebApplicationFirewallCustomRule struct { - // REQUIRED; Type of Actions. - Action *WebApplicationFirewallAction `json:"action,omitempty"` - - // REQUIRED; List of match conditions. - MatchConditions []*MatchCondition `json:"matchConditions,omitempty"` - - // REQUIRED; Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. - Priority *int32 `json:"priority,omitempty"` - - // REQUIRED; The rule type. - RuleType *WebApplicationFirewallRuleType `json:"ruleType,omitempty"` - - // The name of the resource that is unique within a policy. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` -} - -// WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete -// method. -type WebApplicationFirewallPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebApplicationFirewallPoliciesClientCreateOrUpdateOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.CreateOrUpdate -// method. -type WebApplicationFirewallPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WebApplicationFirewallPoliciesClientGetOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.Get -// method. -type WebApplicationFirewallPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.ListAll -// method. -type WebApplicationFirewallPoliciesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.List -// method. -type WebApplicationFirewallPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - -// WebApplicationFirewallPolicy - Defines web application firewall policy. -type WebApplicationFirewallPolicy struct { - // Resource ID. - ID *string `json:"id,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Properties of the web application firewall policy. - Properties *WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty" azure:"ro"` - - // READ-ONLY; Resource name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WebApplicationFirewallPolicyListResult - Result of the request to list WebApplicationFirewallPolicies. It contains a list -// of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. -type WebApplicationFirewallPolicyListResult struct { - // READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` - - // READ-ONLY; List of WebApplicationFirewallPolicies within a resource group. - Value []*WebApplicationFirewallPolicy `json:"value,omitempty" azure:"ro"` -} - -// WebApplicationFirewallPolicyPropertiesFormat - Defines web application firewall policy properties. -type WebApplicationFirewallPolicyPropertiesFormat struct { - // REQUIRED; Describes the managedRules structure. - ManagedRules *ManagedRulesDefinition `json:"managedRules,omitempty"` - - // The custom rules inside the policy. - CustomRules []*WebApplicationFirewallCustomRule `json:"customRules,omitempty"` - - // The PolicySettings for policy. - PolicySettings *PolicySettings `json:"policySettings,omitempty"` - - // READ-ONLY; A collection of references to application gateways. - ApplicationGateways []*ApplicationGateway `json:"applicationGateways,omitempty" azure:"ro"` - - // READ-ONLY; A collection of references to application gateway http listeners. - HTTPListeners []*SubResource `json:"httpListeners,omitempty" azure:"ro"` - - // READ-ONLY; A collection of references to application gateway path rules. - PathBasedRules []*SubResource `json:"pathBasedRules,omitempty" azure:"ro"` - - // READ-ONLY; The provisioning state of the web application firewall policy resource. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Resource status of the policy. - ResourceState *WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty" azure:"ro"` -} - -// WebCategoriesClientGetOptions contains the optional parameters for the WebCategoriesClient.Get method. -type WebCategoriesClientGetOptions struct { - // Expands resourceIds back referenced by the azureWebCategory resource. - Expand *string -} - -// WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.ListBySubscription -// method. -type WebCategoriesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/models_serde.go deleted file mode 100644 index 3702a5a7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/models_serde.go +++ /dev/null @@ -1,32651 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type AADAuthenticationParameters. -func (a AADAuthenticationParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aadAudience", a.AADAudience) - populate(objectMap, "aadIssuer", a.AADIssuer) - populate(objectMap, "aadTenant", a.AADTenant) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AADAuthenticationParameters. -func (a *AADAuthenticationParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aadAudience": - err = unpopulate(val, "AADAudience", &a.AADAudience) - delete(rawMsg, key) - case "aadIssuer": - err = unpopulate(val, "AADIssuer", &a.AADIssuer) - delete(rawMsg, key) - case "aadTenant": - err = unpopulate(val, "AADTenant", &a.AADTenant) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ActiveBaseSecurityAdminRule. -func (a ActiveBaseSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) - populate(objectMap, "configurationDescription", a.ConfigurationDescription) - populate(objectMap, "id", a.ID) - objectMap["kind"] = a.Kind - populate(objectMap, "region", a.Region) - populate(objectMap, "ruleCollectionAppliesToGroups", a.RuleCollectionAppliesToGroups) - populate(objectMap, "ruleCollectionDescription", a.RuleCollectionDescription) - populate(objectMap, "ruleGroups", a.RuleGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveBaseSecurityAdminRule. -func (a *ActiveBaseSecurityAdminRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "commitTime": - err = unpopulateTimeRFC3339(val, "CommitTime", &a.CommitTime) - delete(rawMsg, key) - case "configurationDescription": - err = unpopulate(val, "ConfigurationDescription", &a.ConfigurationDescription) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &a.Kind) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &a.Region) - delete(rawMsg, key) - case "ruleCollectionAppliesToGroups": - err = unpopulate(val, "RuleCollectionAppliesToGroups", &a.RuleCollectionAppliesToGroups) - delete(rawMsg, key) - case "ruleCollectionDescription": - err = unpopulate(val, "RuleCollectionDescription", &a.RuleCollectionDescription) - delete(rawMsg, key) - case "ruleGroups": - err = unpopulate(val, "RuleGroups", &a.RuleGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ActiveConfigurationParameter. -func (a ActiveConfigurationParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "regions", a.Regions) - populate(objectMap, "skipToken", a.SkipToken) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveConfigurationParameter. -func (a *ActiveConfigurationParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "regions": - err = unpopulate(val, "Regions", &a.Regions) - delete(rawMsg, key) - case "skipToken": - err = unpopulate(val, "SkipToken", &a.SkipToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ActiveConnectivityConfiguration. -func (a ActiveConnectivityConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) - populate(objectMap, "configurationGroups", a.ConfigurationGroups) - populate(objectMap, "id", a.ID) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "region", a.Region) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveConnectivityConfiguration. -func (a *ActiveConnectivityConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "commitTime": - err = unpopulateTimeRFC3339(val, "CommitTime", &a.CommitTime) - delete(rawMsg, key) - case "configurationGroups": - err = unpopulate(val, "ConfigurationGroups", &a.ConfigurationGroups) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &a.Region) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ActiveConnectivityConfigurationsListResult. -func (a ActiveConnectivityConfigurationsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "skipToken", a.SkipToken) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveConnectivityConfigurationsListResult. -func (a *ActiveConnectivityConfigurationsListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "skipToken": - err = unpopulate(val, "SkipToken", &a.SkipToken) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ActiveDefaultSecurityAdminRule. -func (a ActiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) - populate(objectMap, "configurationDescription", a.ConfigurationDescription) - populate(objectMap, "id", a.ID) - objectMap["kind"] = EffectiveAdminRuleKindDefault - populate(objectMap, "properties", a.Properties) - populate(objectMap, "region", a.Region) - populate(objectMap, "ruleCollectionAppliesToGroups", a.RuleCollectionAppliesToGroups) - populate(objectMap, "ruleCollectionDescription", a.RuleCollectionDescription) - populate(objectMap, "ruleGroups", a.RuleGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDefaultSecurityAdminRule. -func (a *ActiveDefaultSecurityAdminRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "commitTime": - err = unpopulateTimeRFC3339(val, "CommitTime", &a.CommitTime) - delete(rawMsg, key) - case "configurationDescription": - err = unpopulate(val, "ConfigurationDescription", &a.ConfigurationDescription) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &a.Kind) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &a.Region) - delete(rawMsg, key) - case "ruleCollectionAppliesToGroups": - err = unpopulate(val, "RuleCollectionAppliesToGroups", &a.RuleCollectionAppliesToGroups) - delete(rawMsg, key) - case "ruleCollectionDescription": - err = unpopulate(val, "RuleCollectionDescription", &a.RuleCollectionDescription) - delete(rawMsg, key) - case "ruleGroups": - err = unpopulate(val, "RuleGroups", &a.RuleGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ActiveSecurityAdminRule. -func (a ActiveSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) - populate(objectMap, "configurationDescription", a.ConfigurationDescription) - populate(objectMap, "id", a.ID) - objectMap["kind"] = EffectiveAdminRuleKindCustom - populate(objectMap, "properties", a.Properties) - populate(objectMap, "region", a.Region) - populate(objectMap, "ruleCollectionAppliesToGroups", a.RuleCollectionAppliesToGroups) - populate(objectMap, "ruleCollectionDescription", a.RuleCollectionDescription) - populate(objectMap, "ruleGroups", a.RuleGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveSecurityAdminRule. -func (a *ActiveSecurityAdminRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "commitTime": - err = unpopulateTimeRFC3339(val, "CommitTime", &a.CommitTime) - delete(rawMsg, key) - case "configurationDescription": - err = unpopulate(val, "ConfigurationDescription", &a.ConfigurationDescription) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &a.Kind) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &a.Region) - delete(rawMsg, key) - case "ruleCollectionAppliesToGroups": - err = unpopulate(val, "RuleCollectionAppliesToGroups", &a.RuleCollectionAppliesToGroups) - delete(rawMsg, key) - case "ruleCollectionDescription": - err = unpopulate(val, "RuleCollectionDescription", &a.RuleCollectionDescription) - delete(rawMsg, key) - case "ruleGroups": - err = unpopulate(val, "RuleGroups", &a.RuleGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ActiveSecurityAdminRulesListResult. -func (a ActiveSecurityAdminRulesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "skipToken", a.SkipToken) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveSecurityAdminRulesListResult. -func (a *ActiveSecurityAdminRulesListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "skipToken": - err = unpopulate(val, "SkipToken", &a.SkipToken) - delete(rawMsg, key) - case "value": - a.Value, err = unmarshalActiveBaseSecurityAdminRuleClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AddressPrefixItem. -func (a AddressPrefixItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", a.AddressPrefix) - populate(objectMap, "addressPrefixType", a.AddressPrefixType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AddressPrefixItem. -func (a *AddressPrefixItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefix": - err = unpopulate(val, "AddressPrefix", &a.AddressPrefix) - delete(rawMsg, key) - case "addressPrefixType": - err = unpopulate(val, "AddressPrefixType", &a.AddressPrefixType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AddressSpace. -func (a AddressSpace) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefixes", a.AddressPrefixes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AddressSpace. -func (a *AddressSpace) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefixes": - err = unpopulate(val, "AddressPrefixes", &a.AddressPrefixes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AdminPropertiesFormat. -func (a AdminPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "access", a.Access) - populate(objectMap, "description", a.Description) - populate(objectMap, "destinationPortRanges", a.DestinationPortRanges) - populate(objectMap, "destinations", a.Destinations) - populate(objectMap, "direction", a.Direction) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "sourcePortRanges", a.SourcePortRanges) - populate(objectMap, "sources", a.Sources) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdminPropertiesFormat. -func (a *AdminPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "access": - err = unpopulate(val, "Access", &a.Access) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "destinationPortRanges": - err = unpopulate(val, "DestinationPortRanges", &a.DestinationPortRanges) - delete(rawMsg, key) - case "destinations": - err = unpopulate(val, "Destinations", &a.Destinations) - delete(rawMsg, key) - case "direction": - err = unpopulate(val, "Direction", &a.Direction) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &a.Priority) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &a.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "sourcePortRanges": - err = unpopulate(val, "SourcePortRanges", &a.SourcePortRanges) - delete(rawMsg, key) - case "sources": - err = unpopulate(val, "Sources", &a.Sources) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AdminRule. -func (a AdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - objectMap["kind"] = AdminRuleKindCustom - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRule. -func (a *AdminRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &a.Kind) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AdminRuleCollection. -func (a AdminRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRuleCollection. -func (a *AdminRuleCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AdminRuleCollectionListResult. -func (a AdminRuleCollectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRuleCollectionListResult. -func (a *AdminRuleCollectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AdminRuleCollectionPropertiesFormat. -func (a AdminRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appliesToGroups", a.AppliesToGroups) - populate(objectMap, "description", a.Description) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRuleCollectionPropertiesFormat. -func (a *AdminRuleCollectionPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appliesToGroups": - err = unpopulate(val, "AppliesToGroups", &a.AppliesToGroups) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AdminRuleListResult. -func (a AdminRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRuleListResult. -func (a *AdminRuleListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - a.Value, err = unmarshalBaseAdminRuleClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGateway. -func (a ApplicationGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - populate(objectMap, "zones", a.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGateway. -func (a *ApplicationGateway) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &a.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &a.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAuthenticationCertificate. -func (a ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAuthenticationCertificate. -func (a *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAuthenticationCertificatePropertiesFormat. -func (a ApplicationGatewayAuthenticationCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "data", a.Data) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAuthenticationCertificatePropertiesFormat. -func (a *ApplicationGatewayAuthenticationCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "data": - err = unpopulate(val, "Data", &a.Data) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAutoscaleConfiguration. -func (a ApplicationGatewayAutoscaleConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "maxCapacity", a.MaxCapacity) - populate(objectMap, "minCapacity", a.MinCapacity) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAutoscaleConfiguration. -func (a *ApplicationGatewayAutoscaleConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "maxCapacity": - err = unpopulate(val, "MaxCapacity", &a.MaxCapacity) - delete(rawMsg, key) - case "minCapacity": - err = unpopulate(val, "MinCapacity", &a.MinCapacity) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLOptions. -func (a ApplicationGatewayAvailableSSLOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAvailableSSLOptions. -func (a *ApplicationGatewayAvailableSSLOptions) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLOptionsPropertiesFormat. -func (a ApplicationGatewayAvailableSSLOptionsPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "availableCipherSuites", a.AvailableCipherSuites) - populate(objectMap, "availableProtocols", a.AvailableProtocols) - populate(objectMap, "defaultPolicy", a.DefaultPolicy) - populate(objectMap, "predefinedPolicies", a.PredefinedPolicies) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAvailableSSLOptionsPropertiesFormat. -func (a *ApplicationGatewayAvailableSSLOptionsPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "availableCipherSuites": - err = unpopulate(val, "AvailableCipherSuites", &a.AvailableCipherSuites) - delete(rawMsg, key) - case "availableProtocols": - err = unpopulate(val, "AvailableProtocols", &a.AvailableProtocols) - delete(rawMsg, key) - case "defaultPolicy": - err = unpopulate(val, "DefaultPolicy", &a.DefaultPolicy) - delete(rawMsg, key) - case "predefinedPolicies": - err = unpopulate(val, "PredefinedPolicies", &a.PredefinedPolicies) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLPredefinedPolicies. -func (a ApplicationGatewayAvailableSSLPredefinedPolicies) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAvailableSSLPredefinedPolicies. -func (a *ApplicationGatewayAvailableSSLPredefinedPolicies) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableWafRuleSetsResult. -func (a ApplicationGatewayAvailableWafRuleSetsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAvailableWafRuleSetsResult. -func (a *ApplicationGatewayAvailableWafRuleSetsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddress. -func (a ApplicationGatewayBackendAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fqdn", a.Fqdn) - populate(objectMap, "ipAddress", a.IPAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendAddress. -func (a *ApplicationGatewayBackendAddress) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fqdn": - err = unpopulate(val, "Fqdn", &a.Fqdn) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &a.IPAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddressPool. -func (a ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendAddressPool. -func (a *ApplicationGatewayBackendAddressPool) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddressPoolPropertiesFormat. -func (a ApplicationGatewayBackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddresses", a.BackendAddresses) - populate(objectMap, "backendIPConfigurations", a.BackendIPConfigurations) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendAddressPoolPropertiesFormat. -func (a *ApplicationGatewayBackendAddressPoolPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddresses": - err = unpopulate(val, "BackendAddresses", &a.BackendAddresses) - delete(rawMsg, key) - case "backendIPConfigurations": - err = unpopulate(val, "BackendIPConfigurations", &a.BackendIPConfigurations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHTTPSettings. -func (a ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHTTPSettings. -func (a *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHTTPSettingsPropertiesFormat. -func (a ApplicationGatewayBackendHTTPSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affinityCookieName", a.AffinityCookieName) - populate(objectMap, "authenticationCertificates", a.AuthenticationCertificates) - populate(objectMap, "connectionDraining", a.ConnectionDraining) - populate(objectMap, "cookieBasedAffinity", a.CookieBasedAffinity) - populate(objectMap, "hostName", a.HostName) - populate(objectMap, "path", a.Path) - populate(objectMap, "pickHostNameFromBackendAddress", a.PickHostNameFromBackendAddress) - populate(objectMap, "port", a.Port) - populate(objectMap, "probe", a.Probe) - populate(objectMap, "probeEnabled", a.ProbeEnabled) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "requestTimeout", a.RequestTimeout) - populate(objectMap, "trustedRootCertificates", a.TrustedRootCertificates) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHTTPSettingsPropertiesFormat. -func (a *ApplicationGatewayBackendHTTPSettingsPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affinityCookieName": - err = unpopulate(val, "AffinityCookieName", &a.AffinityCookieName) - delete(rawMsg, key) - case "authenticationCertificates": - err = unpopulate(val, "AuthenticationCertificates", &a.AuthenticationCertificates) - delete(rawMsg, key) - case "connectionDraining": - err = unpopulate(val, "ConnectionDraining", &a.ConnectionDraining) - delete(rawMsg, key) - case "cookieBasedAffinity": - err = unpopulate(val, "CookieBasedAffinity", &a.CookieBasedAffinity) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &a.HostName) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &a.Path) - delete(rawMsg, key) - case "pickHostNameFromBackendAddress": - err = unpopulate(val, "PickHostNameFromBackendAddress", &a.PickHostNameFromBackendAddress) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &a.Port) - delete(rawMsg, key) - case "probe": - err = unpopulate(val, "Probe", &a.Probe) - delete(rawMsg, key) - case "probeEnabled": - err = unpopulate(val, "ProbeEnabled", &a.ProbeEnabled) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &a.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "requestTimeout": - err = unpopulate(val, "RequestTimeout", &a.RequestTimeout) - delete(rawMsg, key) - case "trustedRootCertificates": - err = unpopulate(val, "TrustedRootCertificates", &a.TrustedRootCertificates) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealth. -func (a ApplicationGatewayBackendHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPools", a.BackendAddressPools) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHealth. -func (a *ApplicationGatewayBackendHealth) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPools": - err = unpopulate(val, "BackendAddressPools", &a.BackendAddressPools) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthHTTPSettings. -func (a ApplicationGatewayBackendHealthHTTPSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) - populate(objectMap, "servers", a.Servers) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHealthHTTPSettings. -func (a *ApplicationGatewayBackendHealthHTTPSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendHttpSettings": - err = unpopulate(val, "BackendHTTPSettings", &a.BackendHTTPSettings) - delete(rawMsg, key) - case "servers": - err = unpopulate(val, "Servers", &a.Servers) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthOnDemand. -func (a ApplicationGatewayBackendHealthOnDemand) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", a.BackendAddressPool) - populate(objectMap, "backendHealthHttpSettings", a.BackendHealthHTTPSettings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHealthOnDemand. -func (a *ApplicationGatewayBackendHealthOnDemand) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPool": - err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) - delete(rawMsg, key) - case "backendHealthHttpSettings": - err = unpopulate(val, "BackendHealthHTTPSettings", &a.BackendHealthHTTPSettings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthPool. -func (a ApplicationGatewayBackendHealthPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", a.BackendAddressPool) - populate(objectMap, "backendHttpSettingsCollection", a.BackendHTTPSettingsCollection) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHealthPool. -func (a *ApplicationGatewayBackendHealthPool) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPool": - err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) - delete(rawMsg, key) - case "backendHttpSettingsCollection": - err = unpopulate(val, "BackendHTTPSettingsCollection", &a.BackendHTTPSettingsCollection) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthServer. -func (a ApplicationGatewayBackendHealthServer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", a.Address) - populate(objectMap, "health", a.Health) - populate(objectMap, "healthProbeLog", a.HealthProbeLog) - populate(objectMap, "ipConfiguration", a.IPConfiguration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHealthServer. -func (a *ApplicationGatewayBackendHealthServer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &a.Address) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &a.Health) - delete(rawMsg, key) - case "healthProbeLog": - err = unpopulate(val, "HealthProbeLog", &a.HealthProbeLog) - delete(rawMsg, key) - case "ipConfiguration": - err = unpopulate(val, "IPConfiguration", &a.IPConfiguration) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendSettings. -func (a ApplicationGatewayBackendSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendSettings. -func (a *ApplicationGatewayBackendSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendSettingsPropertiesFormat. -func (a ApplicationGatewayBackendSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hostName", a.HostName) - populate(objectMap, "pickHostNameFromBackendAddress", a.PickHostNameFromBackendAddress) - populate(objectMap, "port", a.Port) - populate(objectMap, "probe", a.Probe) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "timeout", a.Timeout) - populate(objectMap, "trustedRootCertificates", a.TrustedRootCertificates) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendSettingsPropertiesFormat. -func (a *ApplicationGatewayBackendSettingsPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "hostName": - err = unpopulate(val, "HostName", &a.HostName) - delete(rawMsg, key) - case "pickHostNameFromBackendAddress": - err = unpopulate(val, "PickHostNameFromBackendAddress", &a.PickHostNameFromBackendAddress) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &a.Port) - delete(rawMsg, key) - case "probe": - err = unpopulate(val, "Probe", &a.Probe) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &a.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &a.Timeout) - delete(rawMsg, key) - case "trustedRootCertificates": - err = unpopulate(val, "TrustedRootCertificates", &a.TrustedRootCertificates) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayClientAuthConfiguration. -func (a ApplicationGatewayClientAuthConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "verifyClientCertIssuerDN", a.VerifyClientCertIssuerDN) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayClientAuthConfiguration. -func (a *ApplicationGatewayClientAuthConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "verifyClientCertIssuerDN": - err = unpopulate(val, "VerifyClientCertIssuerDN", &a.VerifyClientCertIssuerDN) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayConnectionDraining. -func (a ApplicationGatewayConnectionDraining) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "drainTimeoutInSec", a.DrainTimeoutInSec) - populate(objectMap, "enabled", a.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayConnectionDraining. -func (a *ApplicationGatewayConnectionDraining) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "drainTimeoutInSec": - err = unpopulate(val, "DrainTimeoutInSec", &a.DrainTimeoutInSec) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayCustomError. -func (a ApplicationGatewayCustomError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customErrorPageUrl", a.CustomErrorPageURL) - populate(objectMap, "statusCode", a.StatusCode) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayCustomError. -func (a *ApplicationGatewayCustomError) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customErrorPageUrl": - err = unpopulate(val, "CustomErrorPageURL", &a.CustomErrorPageURL) - delete(rawMsg, key) - case "statusCode": - err = unpopulate(val, "StatusCode", &a.StatusCode) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallDisabledRuleGroup. -func (a ApplicationGatewayFirewallDisabledRuleGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleGroupName", a.RuleGroupName) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallDisabledRuleGroup. -func (a *ApplicationGatewayFirewallDisabledRuleGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ruleGroupName": - err = unpopulate(val, "RuleGroupName", &a.RuleGroupName) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &a.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallExclusion. -func (a ApplicationGatewayFirewallExclusion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "matchVariable", a.MatchVariable) - populate(objectMap, "selector", a.Selector) - populate(objectMap, "selectorMatchOperator", a.SelectorMatchOperator) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallExclusion. -func (a *ApplicationGatewayFirewallExclusion) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchVariable": - err = unpopulate(val, "MatchVariable", &a.MatchVariable) - delete(rawMsg, key) - case "selector": - err = unpopulate(val, "Selector", &a.Selector) - delete(rawMsg, key) - case "selectorMatchOperator": - err = unpopulate(val, "SelectorMatchOperator", &a.SelectorMatchOperator) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRule. -func (a ApplicationGatewayFirewallRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "ruleId", a.RuleID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallRule. -func (a *ApplicationGatewayFirewallRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "ruleId": - err = unpopulate(val, "RuleID", &a.RuleID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleGroup. -func (a ApplicationGatewayFirewallRuleGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "ruleGroupName", a.RuleGroupName) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallRuleGroup. -func (a *ApplicationGatewayFirewallRuleGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "ruleGroupName": - err = unpopulate(val, "RuleGroupName", &a.RuleGroupName) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &a.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleSet. -func (a ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallRuleSet. -func (a *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleSetPropertiesFormat. -func (a ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "ruleGroups", a.RuleGroups) - populate(objectMap, "ruleSetType", a.RuleSetType) - populate(objectMap, "ruleSetVersion", a.RuleSetVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallRuleSetPropertiesFormat. -func (a *ApplicationGatewayFirewallRuleSetPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "ruleGroups": - err = unpopulate(val, "RuleGroups", &a.RuleGroups) - delete(rawMsg, key) - case "ruleSetType": - err = unpopulate(val, "RuleSetType", &a.RuleSetType) - delete(rawMsg, key) - case "ruleSetVersion": - err = unpopulate(val, "RuleSetVersion", &a.RuleSetVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendIPConfiguration. -func (a ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFrontendIPConfiguration. -func (a *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendIPConfigurationPropertiesFormat. -func (a ApplicationGatewayFrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateIPAddress", a.PrivateIPAddress) - populate(objectMap, "privateIPAllocationMethod", a.PrivateIPAllocationMethod) - populate(objectMap, "privateLinkConfiguration", a.PrivateLinkConfiguration) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "publicIPAddress", a.PublicIPAddress) - populate(objectMap, "subnet", a.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFrontendIPConfigurationPropertiesFormat. -func (a *ApplicationGatewayFrontendIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &a.PrivateIPAddress) - delete(rawMsg, key) - case "privateIPAllocationMethod": - err = unpopulate(val, "PrivateIPAllocationMethod", &a.PrivateIPAllocationMethod) - delete(rawMsg, key) - case "privateLinkConfiguration": - err = unpopulate(val, "PrivateLinkConfiguration", &a.PrivateLinkConfiguration) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddress": - err = unpopulate(val, "PublicIPAddress", &a.PublicIPAddress) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &a.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendPort. -func (a ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFrontendPort. -func (a *ApplicationGatewayFrontendPort) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendPortPropertiesFormat. -func (a ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "port", a.Port) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFrontendPortPropertiesFormat. -func (a *ApplicationGatewayFrontendPortPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "port": - err = unpopulate(val, "Port", &a.Port) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayGlobalConfiguration. -func (a ApplicationGatewayGlobalConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enableRequestBuffering", a.EnableRequestBuffering) - populate(objectMap, "enableResponseBuffering", a.EnableResponseBuffering) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayGlobalConfiguration. -func (a *ApplicationGatewayGlobalConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enableRequestBuffering": - err = unpopulate(val, "EnableRequestBuffering", &a.EnableRequestBuffering) - delete(rawMsg, key) - case "enableResponseBuffering": - err = unpopulate(val, "EnableResponseBuffering", &a.EnableResponseBuffering) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHTTPListener. -func (a ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayHTTPListener. -func (a *ApplicationGatewayHTTPListener) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHTTPListenerPropertiesFormat. -func (a ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customErrorConfigurations", a.CustomErrorConfigurations) - populate(objectMap, "firewallPolicy", a.FirewallPolicy) - populate(objectMap, "frontendIPConfiguration", a.FrontendIPConfiguration) - populate(objectMap, "frontendPort", a.FrontendPort) - populate(objectMap, "hostName", a.HostName) - populate(objectMap, "hostNames", a.HostNames) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "requireServerNameIndication", a.RequireServerNameIndication) - populate(objectMap, "sslCertificate", a.SSLCertificate) - populate(objectMap, "sslProfile", a.SSLProfile) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayHTTPListenerPropertiesFormat. -func (a *ApplicationGatewayHTTPListenerPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customErrorConfigurations": - err = unpopulate(val, "CustomErrorConfigurations", &a.CustomErrorConfigurations) - delete(rawMsg, key) - case "firewallPolicy": - err = unpopulate(val, "FirewallPolicy", &a.FirewallPolicy) - delete(rawMsg, key) - case "frontendIPConfiguration": - err = unpopulate(val, "FrontendIPConfiguration", &a.FrontendIPConfiguration) - delete(rawMsg, key) - case "frontendPort": - err = unpopulate(val, "FrontendPort", &a.FrontendPort) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &a.HostName) - delete(rawMsg, key) - case "hostNames": - err = unpopulate(val, "HostNames", &a.HostNames) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &a.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "requireServerNameIndication": - err = unpopulate(val, "RequireServerNameIndication", &a.RequireServerNameIndication) - delete(rawMsg, key) - case "sslCertificate": - err = unpopulate(val, "SSLCertificate", &a.SSLCertificate) - delete(rawMsg, key) - case "sslProfile": - err = unpopulate(val, "SSLProfile", &a.SSLProfile) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHeaderConfiguration. -func (a ApplicationGatewayHeaderConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "headerName", a.HeaderName) - populate(objectMap, "headerValue", a.HeaderValue) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayHeaderConfiguration. -func (a *ApplicationGatewayHeaderConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "headerName": - err = unpopulate(val, "HeaderName", &a.HeaderName) - delete(rawMsg, key) - case "headerValue": - err = unpopulate(val, "HeaderValue", &a.HeaderValue) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayIPConfiguration. -func (a ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayIPConfiguration. -func (a *ApplicationGatewayIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayIPConfigurationPropertiesFormat. -func (a ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "subnet", a.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayIPConfigurationPropertiesFormat. -func (a *ApplicationGatewayIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &a.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListResult. -func (a ApplicationGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayListResult. -func (a *ApplicationGatewayListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListener. -func (a ApplicationGatewayListener) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayListener. -func (a *ApplicationGatewayListener) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListenerPropertiesFormat. -func (a ApplicationGatewayListenerPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "frontendIPConfiguration", a.FrontendIPConfiguration) - populate(objectMap, "frontendPort", a.FrontendPort) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "sslCertificate", a.SSLCertificate) - populate(objectMap, "sslProfile", a.SSLProfile) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayListenerPropertiesFormat. -func (a *ApplicationGatewayListenerPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "frontendIPConfiguration": - err = unpopulate(val, "FrontendIPConfiguration", &a.FrontendIPConfiguration) - delete(rawMsg, key) - case "frontendPort": - err = unpopulate(val, "FrontendPort", &a.FrontendPort) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &a.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "sslCertificate": - err = unpopulate(val, "SSLCertificate", &a.SSLCertificate) - delete(rawMsg, key) - case "sslProfile": - err = unpopulate(val, "SSLProfile", &a.SSLProfile) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionPolicy. -func (a ApplicationGatewayLoadDistributionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayLoadDistributionPolicy. -func (a *ApplicationGatewayLoadDistributionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionPolicyPropertiesFormat. -func (a ApplicationGatewayLoadDistributionPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "loadDistributionAlgorithm", a.LoadDistributionAlgorithm) - populate(objectMap, "loadDistributionTargets", a.LoadDistributionTargets) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayLoadDistributionPolicyPropertiesFormat. -func (a *ApplicationGatewayLoadDistributionPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "loadDistributionAlgorithm": - err = unpopulate(val, "LoadDistributionAlgorithm", &a.LoadDistributionAlgorithm) - delete(rawMsg, key) - case "loadDistributionTargets": - err = unpopulate(val, "LoadDistributionTargets", &a.LoadDistributionTargets) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionTarget. -func (a ApplicationGatewayLoadDistributionTarget) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayLoadDistributionTarget. -func (a *ApplicationGatewayLoadDistributionTarget) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionTargetPropertiesFormat. -func (a ApplicationGatewayLoadDistributionTargetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", a.BackendAddressPool) - populate(objectMap, "weightPerServer", a.WeightPerServer) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayLoadDistributionTargetPropertiesFormat. -func (a *ApplicationGatewayLoadDistributionTargetPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPool": - err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) - delete(rawMsg, key) - case "weightPerServer": - err = unpopulate(val, "WeightPerServer", &a.WeightPerServer) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayOnDemandProbe. -func (a ApplicationGatewayOnDemandProbe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", a.BackendAddressPool) - populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) - populate(objectMap, "host", a.Host) - populate(objectMap, "match", a.Match) - populate(objectMap, "path", a.Path) - populate(objectMap, "pickHostNameFromBackendHttpSettings", a.PickHostNameFromBackendHTTPSettings) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "timeout", a.Timeout) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayOnDemandProbe. -func (a *ApplicationGatewayOnDemandProbe) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPool": - err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) - delete(rawMsg, key) - case "backendHttpSettings": - err = unpopulate(val, "BackendHTTPSettings", &a.BackendHTTPSettings) - delete(rawMsg, key) - case "host": - err = unpopulate(val, "Host", &a.Host) - delete(rawMsg, key) - case "match": - err = unpopulate(val, "Match", &a.Match) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &a.Path) - delete(rawMsg, key) - case "pickHostNameFromBackendHttpSettings": - err = unpopulate(val, "PickHostNameFromBackendHTTPSettings", &a.PickHostNameFromBackendHTTPSettings) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &a.Protocol) - delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &a.Timeout) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPathRule. -func (a ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPathRule. -func (a *ApplicationGatewayPathRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPathRulePropertiesFormat. -func (a ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", a.BackendAddressPool) - populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) - populate(objectMap, "firewallPolicy", a.FirewallPolicy) - populate(objectMap, "loadDistributionPolicy", a.LoadDistributionPolicy) - populate(objectMap, "paths", a.Paths) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "redirectConfiguration", a.RedirectConfiguration) - populate(objectMap, "rewriteRuleSet", a.RewriteRuleSet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPathRulePropertiesFormat. -func (a *ApplicationGatewayPathRulePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPool": - err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) - delete(rawMsg, key) - case "backendHttpSettings": - err = unpopulate(val, "BackendHTTPSettings", &a.BackendHTTPSettings) - delete(rawMsg, key) - case "firewallPolicy": - err = unpopulate(val, "FirewallPolicy", &a.FirewallPolicy) - delete(rawMsg, key) - case "loadDistributionPolicy": - err = unpopulate(val, "LoadDistributionPolicy", &a.LoadDistributionPolicy) - delete(rawMsg, key) - case "paths": - err = unpopulate(val, "Paths", &a.Paths) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "redirectConfiguration": - err = unpopulate(val, "RedirectConfiguration", &a.RedirectConfiguration) - delete(rawMsg, key) - case "rewriteRuleSet": - err = unpopulate(val, "RewriteRuleSet", &a.RewriteRuleSet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnection. -func (a ApplicationGatewayPrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateEndpointConnection. -func (a *ApplicationGatewayPrivateEndpointConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnectionListResult. -func (a ApplicationGatewayPrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateEndpointConnectionListResult. -func (a *ApplicationGatewayPrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnectionProperties. -func (a ApplicationGatewayPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "linkIdentifier", a.LinkIdentifier) - populate(objectMap, "privateEndpoint", a.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", a.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateEndpointConnectionProperties. -func (a *ApplicationGatewayPrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "linkIdentifier": - err = unpopulate(val, "LinkIdentifier", &a.LinkIdentifier) - delete(rawMsg, key) - case "privateEndpoint": - err = unpopulate(val, "PrivateEndpoint", &a.PrivateEndpoint) - delete(rawMsg, key) - case "privateLinkServiceConnectionState": - err = unpopulate(val, "PrivateLinkServiceConnectionState", &a.PrivateLinkServiceConnectionState) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkConfiguration. -func (a ApplicationGatewayPrivateLinkConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkConfiguration. -func (a *ApplicationGatewayPrivateLinkConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkConfigurationProperties. -func (a ApplicationGatewayPrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipConfigurations", a.IPConfigurations) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkConfigurationProperties. -func (a *ApplicationGatewayPrivateLinkConfigurationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &a.IPConfigurations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkIPConfiguration. -func (a ApplicationGatewayPrivateLinkIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkIPConfiguration. -func (a *ApplicationGatewayPrivateLinkIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkIPConfigurationProperties. -func (a ApplicationGatewayPrivateLinkIPConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "primary", a.Primary) - populate(objectMap, "privateIPAddress", a.PrivateIPAddress) - populate(objectMap, "privateIPAllocationMethod", a.PrivateIPAllocationMethod) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "subnet", a.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkIPConfigurationProperties. -func (a *ApplicationGatewayPrivateLinkIPConfigurationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "primary": - err = unpopulate(val, "Primary", &a.Primary) - delete(rawMsg, key) - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &a.PrivateIPAddress) - delete(rawMsg, key) - case "privateIPAllocationMethod": - err = unpopulate(val, "PrivateIPAllocationMethod", &a.PrivateIPAllocationMethod) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &a.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResource. -func (a ApplicationGatewayPrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkResource. -func (a *ApplicationGatewayPrivateLinkResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResourceListResult. -func (a ApplicationGatewayPrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkResourceListResult. -func (a *ApplicationGatewayPrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResourceProperties. -func (a ApplicationGatewayPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", a.GroupID) - populate(objectMap, "requiredMembers", a.RequiredMembers) - populate(objectMap, "requiredZoneNames", a.RequiredZoneNames) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkResourceProperties. -func (a *ApplicationGatewayPrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupId": - err = unpopulate(val, "GroupID", &a.GroupID) - delete(rawMsg, key) - case "requiredMembers": - err = unpopulate(val, "RequiredMembers", &a.RequiredMembers) - delete(rawMsg, key) - case "requiredZoneNames": - err = unpopulate(val, "RequiredZoneNames", &a.RequiredZoneNames) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbe. -func (a ApplicationGatewayProbe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayProbe. -func (a *ApplicationGatewayProbe) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbeHealthResponseMatch. -func (a ApplicationGatewayProbeHealthResponseMatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "body", a.Body) - populate(objectMap, "statusCodes", a.StatusCodes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayProbeHealthResponseMatch. -func (a *ApplicationGatewayProbeHealthResponseMatch) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "body": - err = unpopulate(val, "Body", &a.Body) - delete(rawMsg, key) - case "statusCodes": - err = unpopulate(val, "StatusCodes", &a.StatusCodes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbePropertiesFormat. -func (a ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "host", a.Host) - populate(objectMap, "interval", a.Interval) - populate(objectMap, "match", a.Match) - populate(objectMap, "minServers", a.MinServers) - populate(objectMap, "path", a.Path) - populate(objectMap, "pickHostNameFromBackendHttpSettings", a.PickHostNameFromBackendHTTPSettings) - populate(objectMap, "pickHostNameFromBackendSettings", a.PickHostNameFromBackendSettings) - populate(objectMap, "port", a.Port) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "timeout", a.Timeout) - populate(objectMap, "unhealthyThreshold", a.UnhealthyThreshold) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayProbePropertiesFormat. -func (a *ApplicationGatewayProbePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "host": - err = unpopulate(val, "Host", &a.Host) - delete(rawMsg, key) - case "interval": - err = unpopulate(val, "Interval", &a.Interval) - delete(rawMsg, key) - case "match": - err = unpopulate(val, "Match", &a.Match) - delete(rawMsg, key) - case "minServers": - err = unpopulate(val, "MinServers", &a.MinServers) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &a.Path) - delete(rawMsg, key) - case "pickHostNameFromBackendHttpSettings": - err = unpopulate(val, "PickHostNameFromBackendHTTPSettings", &a.PickHostNameFromBackendHTTPSettings) - delete(rawMsg, key) - case "pickHostNameFromBackendSettings": - err = unpopulate(val, "PickHostNameFromBackendSettings", &a.PickHostNameFromBackendSettings) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &a.Port) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &a.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &a.Timeout) - delete(rawMsg, key) - case "unhealthyThreshold": - err = unpopulate(val, "UnhealthyThreshold", &a.UnhealthyThreshold) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPropertiesFormat. -func (a ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authenticationCertificates", a.AuthenticationCertificates) - populate(objectMap, "autoscaleConfiguration", a.AutoscaleConfiguration) - populate(objectMap, "backendAddressPools", a.BackendAddressPools) - populate(objectMap, "backendHttpSettingsCollection", a.BackendHTTPSettingsCollection) - populate(objectMap, "backendSettingsCollection", a.BackendSettingsCollection) - populate(objectMap, "customErrorConfigurations", a.CustomErrorConfigurations) - populate(objectMap, "enableFips", a.EnableFips) - populate(objectMap, "enableHttp2", a.EnableHTTP2) - populate(objectMap, "firewallPolicy", a.FirewallPolicy) - populate(objectMap, "forceFirewallPolicyAssociation", a.ForceFirewallPolicyAssociation) - populate(objectMap, "frontendIPConfigurations", a.FrontendIPConfigurations) - populate(objectMap, "frontendPorts", a.FrontendPorts) - populate(objectMap, "gatewayIPConfigurations", a.GatewayIPConfigurations) - populate(objectMap, "globalConfiguration", a.GlobalConfiguration) - populate(objectMap, "httpListeners", a.HTTPListeners) - populate(objectMap, "listeners", a.Listeners) - populate(objectMap, "loadDistributionPolicies", a.LoadDistributionPolicies) - populate(objectMap, "operationalState", a.OperationalState) - populate(objectMap, "privateEndpointConnections", a.PrivateEndpointConnections) - populate(objectMap, "privateLinkConfigurations", a.PrivateLinkConfigurations) - populate(objectMap, "probes", a.Probes) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "redirectConfigurations", a.RedirectConfigurations) - populate(objectMap, "requestRoutingRules", a.RequestRoutingRules) - populate(objectMap, "resourceGuid", a.ResourceGUID) - populate(objectMap, "rewriteRuleSets", a.RewriteRuleSets) - populate(objectMap, "routingRules", a.RoutingRules) - populate(objectMap, "sku", a.SKU) - populate(objectMap, "sslCertificates", a.SSLCertificates) - populate(objectMap, "sslPolicy", a.SSLPolicy) - populate(objectMap, "sslProfiles", a.SSLProfiles) - populate(objectMap, "trustedClientCertificates", a.TrustedClientCertificates) - populate(objectMap, "trustedRootCertificates", a.TrustedRootCertificates) - populate(objectMap, "urlPathMaps", a.URLPathMaps) - populate(objectMap, "webApplicationFirewallConfiguration", a.WebApplicationFirewallConfiguration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPropertiesFormat. -func (a *ApplicationGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authenticationCertificates": - err = unpopulate(val, "AuthenticationCertificates", &a.AuthenticationCertificates) - delete(rawMsg, key) - case "autoscaleConfiguration": - err = unpopulate(val, "AutoscaleConfiguration", &a.AutoscaleConfiguration) - delete(rawMsg, key) - case "backendAddressPools": - err = unpopulate(val, "BackendAddressPools", &a.BackendAddressPools) - delete(rawMsg, key) - case "backendHttpSettingsCollection": - err = unpopulate(val, "BackendHTTPSettingsCollection", &a.BackendHTTPSettingsCollection) - delete(rawMsg, key) - case "backendSettingsCollection": - err = unpopulate(val, "BackendSettingsCollection", &a.BackendSettingsCollection) - delete(rawMsg, key) - case "customErrorConfigurations": - err = unpopulate(val, "CustomErrorConfigurations", &a.CustomErrorConfigurations) - delete(rawMsg, key) - case "enableFips": - err = unpopulate(val, "EnableFips", &a.EnableFips) - delete(rawMsg, key) - case "enableHttp2": - err = unpopulate(val, "EnableHTTP2", &a.EnableHTTP2) - delete(rawMsg, key) - case "firewallPolicy": - err = unpopulate(val, "FirewallPolicy", &a.FirewallPolicy) - delete(rawMsg, key) - case "forceFirewallPolicyAssociation": - err = unpopulate(val, "ForceFirewallPolicyAssociation", &a.ForceFirewallPolicyAssociation) - delete(rawMsg, key) - case "frontendIPConfigurations": - err = unpopulate(val, "FrontendIPConfigurations", &a.FrontendIPConfigurations) - delete(rawMsg, key) - case "frontendPorts": - err = unpopulate(val, "FrontendPorts", &a.FrontendPorts) - delete(rawMsg, key) - case "gatewayIPConfigurations": - err = unpopulate(val, "GatewayIPConfigurations", &a.GatewayIPConfigurations) - delete(rawMsg, key) - case "globalConfiguration": - err = unpopulate(val, "GlobalConfiguration", &a.GlobalConfiguration) - delete(rawMsg, key) - case "httpListeners": - err = unpopulate(val, "HTTPListeners", &a.HTTPListeners) - delete(rawMsg, key) - case "listeners": - err = unpopulate(val, "Listeners", &a.Listeners) - delete(rawMsg, key) - case "loadDistributionPolicies": - err = unpopulate(val, "LoadDistributionPolicies", &a.LoadDistributionPolicies) - delete(rawMsg, key) - case "operationalState": - err = unpopulate(val, "OperationalState", &a.OperationalState) - delete(rawMsg, key) - case "privateEndpointConnections": - err = unpopulate(val, "PrivateEndpointConnections", &a.PrivateEndpointConnections) - delete(rawMsg, key) - case "privateLinkConfigurations": - err = unpopulate(val, "PrivateLinkConfigurations", &a.PrivateLinkConfigurations) - delete(rawMsg, key) - case "probes": - err = unpopulate(val, "Probes", &a.Probes) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "redirectConfigurations": - err = unpopulate(val, "RedirectConfigurations", &a.RedirectConfigurations) - delete(rawMsg, key) - case "requestRoutingRules": - err = unpopulate(val, "RequestRoutingRules", &a.RequestRoutingRules) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &a.ResourceGUID) - delete(rawMsg, key) - case "rewriteRuleSets": - err = unpopulate(val, "RewriteRuleSets", &a.RewriteRuleSets) - delete(rawMsg, key) - case "routingRules": - err = unpopulate(val, "RoutingRules", &a.RoutingRules) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &a.SKU) - delete(rawMsg, key) - case "sslCertificates": - err = unpopulate(val, "SSLCertificates", &a.SSLCertificates) - delete(rawMsg, key) - case "sslPolicy": - err = unpopulate(val, "SSLPolicy", &a.SSLPolicy) - delete(rawMsg, key) - case "sslProfiles": - err = unpopulate(val, "SSLProfiles", &a.SSLProfiles) - delete(rawMsg, key) - case "trustedClientCertificates": - err = unpopulate(val, "TrustedClientCertificates", &a.TrustedClientCertificates) - delete(rawMsg, key) - case "trustedRootCertificates": - err = unpopulate(val, "TrustedRootCertificates", &a.TrustedRootCertificates) - delete(rawMsg, key) - case "urlPathMaps": - err = unpopulate(val, "URLPathMaps", &a.URLPathMaps) - delete(rawMsg, key) - case "webApplicationFirewallConfiguration": - err = unpopulate(val, "WebApplicationFirewallConfiguration", &a.WebApplicationFirewallConfiguration) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRedirectConfiguration. -func (a ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRedirectConfiguration. -func (a *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRedirectConfigurationPropertiesFormat. -func (a ApplicationGatewayRedirectConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "includePath", a.IncludePath) - populate(objectMap, "includeQueryString", a.IncludeQueryString) - populate(objectMap, "pathRules", a.PathRules) - populate(objectMap, "redirectType", a.RedirectType) - populate(objectMap, "requestRoutingRules", a.RequestRoutingRules) - populate(objectMap, "targetListener", a.TargetListener) - populate(objectMap, "targetUrl", a.TargetURL) - populate(objectMap, "urlPathMaps", a.URLPathMaps) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRedirectConfigurationPropertiesFormat. -func (a *ApplicationGatewayRedirectConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "includePath": - err = unpopulate(val, "IncludePath", &a.IncludePath) - delete(rawMsg, key) - case "includeQueryString": - err = unpopulate(val, "IncludeQueryString", &a.IncludeQueryString) - delete(rawMsg, key) - case "pathRules": - err = unpopulate(val, "PathRules", &a.PathRules) - delete(rawMsg, key) - case "redirectType": - err = unpopulate(val, "RedirectType", &a.RedirectType) - delete(rawMsg, key) - case "requestRoutingRules": - err = unpopulate(val, "RequestRoutingRules", &a.RequestRoutingRules) - delete(rawMsg, key) - case "targetListener": - err = unpopulate(val, "TargetListener", &a.TargetListener) - delete(rawMsg, key) - case "targetUrl": - err = unpopulate(val, "TargetURL", &a.TargetURL) - delete(rawMsg, key) - case "urlPathMaps": - err = unpopulate(val, "URLPathMaps", &a.URLPathMaps) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRequestRoutingRule. -func (a ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRequestRoutingRule. -func (a *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRequestRoutingRulePropertiesFormat. -func (a ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", a.BackendAddressPool) - populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) - populate(objectMap, "httpListener", a.HTTPListener) - populate(objectMap, "loadDistributionPolicy", a.LoadDistributionPolicy) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "redirectConfiguration", a.RedirectConfiguration) - populate(objectMap, "rewriteRuleSet", a.RewriteRuleSet) - populate(objectMap, "ruleType", a.RuleType) - populate(objectMap, "urlPathMap", a.URLPathMap) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRequestRoutingRulePropertiesFormat. -func (a *ApplicationGatewayRequestRoutingRulePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPool": - err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) - delete(rawMsg, key) - case "backendHttpSettings": - err = unpopulate(val, "BackendHTTPSettings", &a.BackendHTTPSettings) - delete(rawMsg, key) - case "httpListener": - err = unpopulate(val, "HTTPListener", &a.HTTPListener) - delete(rawMsg, key) - case "loadDistributionPolicy": - err = unpopulate(val, "LoadDistributionPolicy", &a.LoadDistributionPolicy) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &a.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "redirectConfiguration": - err = unpopulate(val, "RedirectConfiguration", &a.RedirectConfiguration) - delete(rawMsg, key) - case "rewriteRuleSet": - err = unpopulate(val, "RewriteRuleSet", &a.RewriteRuleSet) - delete(rawMsg, key) - case "ruleType": - err = unpopulate(val, "RuleType", &a.RuleType) - delete(rawMsg, key) - case "urlPathMap": - err = unpopulate(val, "URLPathMap", &a.URLPathMap) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRule. -func (a ApplicationGatewayRewriteRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionSet", a.ActionSet) - populate(objectMap, "conditions", a.Conditions) - populate(objectMap, "name", a.Name) - populate(objectMap, "ruleSequence", a.RuleSequence) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRewriteRule. -func (a *ApplicationGatewayRewriteRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionSet": - err = unpopulate(val, "ActionSet", &a.ActionSet) - delete(rawMsg, key) - case "conditions": - err = unpopulate(val, "Conditions", &a.Conditions) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "ruleSequence": - err = unpopulate(val, "RuleSequence", &a.RuleSequence) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleActionSet. -func (a ApplicationGatewayRewriteRuleActionSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "requestHeaderConfigurations", a.RequestHeaderConfigurations) - populate(objectMap, "responseHeaderConfigurations", a.ResponseHeaderConfigurations) - populate(objectMap, "urlConfiguration", a.URLConfiguration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRewriteRuleActionSet. -func (a *ApplicationGatewayRewriteRuleActionSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "requestHeaderConfigurations": - err = unpopulate(val, "RequestHeaderConfigurations", &a.RequestHeaderConfigurations) - delete(rawMsg, key) - case "responseHeaderConfigurations": - err = unpopulate(val, "ResponseHeaderConfigurations", &a.ResponseHeaderConfigurations) - delete(rawMsg, key) - case "urlConfiguration": - err = unpopulate(val, "URLConfiguration", &a.URLConfiguration) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleCondition. -func (a ApplicationGatewayRewriteRuleCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ignoreCase", a.IgnoreCase) - populate(objectMap, "negate", a.Negate) - populate(objectMap, "pattern", a.Pattern) - populate(objectMap, "variable", a.Variable) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRewriteRuleCondition. -func (a *ApplicationGatewayRewriteRuleCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ignoreCase": - err = unpopulate(val, "IgnoreCase", &a.IgnoreCase) - delete(rawMsg, key) - case "negate": - err = unpopulate(val, "Negate", &a.Negate) - delete(rawMsg, key) - case "pattern": - err = unpopulate(val, "Pattern", &a.Pattern) - delete(rawMsg, key) - case "variable": - err = unpopulate(val, "Variable", &a.Variable) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleSet. -func (a ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRewriteRuleSet. -func (a *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleSetPropertiesFormat. -func (a ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "rewriteRules", a.RewriteRules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRewriteRuleSetPropertiesFormat. -func (a *ApplicationGatewayRewriteRuleSetPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "rewriteRules": - err = unpopulate(val, "RewriteRules", &a.RewriteRules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRoutingRule. -func (a ApplicationGatewayRoutingRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRoutingRule. -func (a *ApplicationGatewayRoutingRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRoutingRulePropertiesFormat. -func (a ApplicationGatewayRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", a.BackendAddressPool) - populate(objectMap, "backendSettings", a.BackendSettings) - populate(objectMap, "listener", a.Listener) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "ruleType", a.RuleType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRoutingRulePropertiesFormat. -func (a *ApplicationGatewayRoutingRulePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPool": - err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) - delete(rawMsg, key) - case "backendSettings": - err = unpopulate(val, "BackendSettings", &a.BackendSettings) - delete(rawMsg, key) - case "listener": - err = unpopulate(val, "Listener", &a.Listener) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &a.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "ruleType": - err = unpopulate(val, "RuleType", &a.RuleType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySKU. -func (a ApplicationGatewaySKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capacity", a.Capacity) - populate(objectMap, "name", a.Name) - populate(objectMap, "tier", a.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySKU. -func (a *ApplicationGatewaySKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacity": - err = unpopulate(val, "Capacity", &a.Capacity) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &a.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLCertificate. -func (a ApplicationGatewaySSLCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLCertificate. -func (a *ApplicationGatewaySSLCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLCertificatePropertiesFormat. -func (a ApplicationGatewaySSLCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "data", a.Data) - populate(objectMap, "keyVaultSecretId", a.KeyVaultSecretID) - populate(objectMap, "password", a.Password) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "publicCertData", a.PublicCertData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLCertificatePropertiesFormat. -func (a *ApplicationGatewaySSLCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "data": - err = unpopulate(val, "Data", &a.Data) - delete(rawMsg, key) - case "keyVaultSecretId": - err = unpopulate(val, "KeyVaultSecretID", &a.KeyVaultSecretID) - delete(rawMsg, key) - case "password": - err = unpopulate(val, "Password", &a.Password) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "publicCertData": - err = unpopulate(val, "PublicCertData", &a.PublicCertData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPolicy. -func (a ApplicationGatewaySSLPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cipherSuites", a.CipherSuites) - populate(objectMap, "disabledSslProtocols", a.DisabledSSLProtocols) - populate(objectMap, "minProtocolVersion", a.MinProtocolVersion) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "policyType", a.PolicyType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLPolicy. -func (a *ApplicationGatewaySSLPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cipherSuites": - err = unpopulate(val, "CipherSuites", &a.CipherSuites) - delete(rawMsg, key) - case "disabledSslProtocols": - err = unpopulate(val, "DisabledSSLProtocols", &a.DisabledSSLProtocols) - delete(rawMsg, key) - case "minProtocolVersion": - err = unpopulate(val, "MinProtocolVersion", &a.MinProtocolVersion) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "policyType": - err = unpopulate(val, "PolicyType", &a.PolicyType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPredefinedPolicy. -func (a ApplicationGatewaySSLPredefinedPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLPredefinedPolicy. -func (a *ApplicationGatewaySSLPredefinedPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPredefinedPolicyPropertiesFormat. -func (a ApplicationGatewaySSLPredefinedPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cipherSuites", a.CipherSuites) - populate(objectMap, "minProtocolVersion", a.MinProtocolVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLPredefinedPolicyPropertiesFormat. -func (a *ApplicationGatewaySSLPredefinedPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cipherSuites": - err = unpopulate(val, "CipherSuites", &a.CipherSuites) - delete(rawMsg, key) - case "minProtocolVersion": - err = unpopulate(val, "MinProtocolVersion", &a.MinProtocolVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLProfile. -func (a ApplicationGatewaySSLProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLProfile. -func (a *ApplicationGatewaySSLProfile) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLProfilePropertiesFormat. -func (a ApplicationGatewaySSLProfilePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clientAuthConfiguration", a.ClientAuthConfiguration) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "sslPolicy", a.SSLPolicy) - populate(objectMap, "trustedClientCertificates", a.TrustedClientCertificates) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLProfilePropertiesFormat. -func (a *ApplicationGatewaySSLProfilePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientAuthConfiguration": - err = unpopulate(val, "ClientAuthConfiguration", &a.ClientAuthConfiguration) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "sslPolicy": - err = unpopulate(val, "SSLPolicy", &a.SSLPolicy) - delete(rawMsg, key) - case "trustedClientCertificates": - err = unpopulate(val, "TrustedClientCertificates", &a.TrustedClientCertificates) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedClientCertificate. -func (a ApplicationGatewayTrustedClientCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayTrustedClientCertificate. -func (a *ApplicationGatewayTrustedClientCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedClientCertificatePropertiesFormat. -func (a ApplicationGatewayTrustedClientCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clientCertIssuerDN", a.ClientCertIssuerDN) - populate(objectMap, "data", a.Data) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "validatedCertData", a.ValidatedCertData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayTrustedClientCertificatePropertiesFormat. -func (a *ApplicationGatewayTrustedClientCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientCertIssuerDN": - err = unpopulate(val, "ClientCertIssuerDN", &a.ClientCertIssuerDN) - delete(rawMsg, key) - case "data": - err = unpopulate(val, "Data", &a.Data) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "validatedCertData": - err = unpopulate(val, "ValidatedCertData", &a.ValidatedCertData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedRootCertificate. -func (a ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayTrustedRootCertificate. -func (a *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedRootCertificatePropertiesFormat. -func (a ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "data", a.Data) - populate(objectMap, "keyVaultSecretId", a.KeyVaultSecretID) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayTrustedRootCertificatePropertiesFormat. -func (a *ApplicationGatewayTrustedRootCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "data": - err = unpopulate(val, "Data", &a.Data) - delete(rawMsg, key) - case "keyVaultSecretId": - err = unpopulate(val, "KeyVaultSecretID", &a.KeyVaultSecretID) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLConfiguration. -func (a ApplicationGatewayURLConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "modifiedPath", a.ModifiedPath) - populate(objectMap, "modifiedQueryString", a.ModifiedQueryString) - populate(objectMap, "reroute", a.Reroute) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayURLConfiguration. -func (a *ApplicationGatewayURLConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "modifiedPath": - err = unpopulate(val, "ModifiedPath", &a.ModifiedPath) - delete(rawMsg, key) - case "modifiedQueryString": - err = unpopulate(val, "ModifiedQueryString", &a.ModifiedQueryString) - delete(rawMsg, key) - case "reroute": - err = unpopulate(val, "Reroute", &a.Reroute) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLPathMap. -func (a ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayURLPathMap. -func (a *ApplicationGatewayURLPathMap) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLPathMapPropertiesFormat. -func (a ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "defaultBackendAddressPool", a.DefaultBackendAddressPool) - populate(objectMap, "defaultBackendHttpSettings", a.DefaultBackendHTTPSettings) - populate(objectMap, "defaultLoadDistributionPolicy", a.DefaultLoadDistributionPolicy) - populate(objectMap, "defaultRedirectConfiguration", a.DefaultRedirectConfiguration) - populate(objectMap, "defaultRewriteRuleSet", a.DefaultRewriteRuleSet) - populate(objectMap, "pathRules", a.PathRules) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayURLPathMapPropertiesFormat. -func (a *ApplicationGatewayURLPathMapPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "defaultBackendAddressPool": - err = unpopulate(val, "DefaultBackendAddressPool", &a.DefaultBackendAddressPool) - delete(rawMsg, key) - case "defaultBackendHttpSettings": - err = unpopulate(val, "DefaultBackendHTTPSettings", &a.DefaultBackendHTTPSettings) - delete(rawMsg, key) - case "defaultLoadDistributionPolicy": - err = unpopulate(val, "DefaultLoadDistributionPolicy", &a.DefaultLoadDistributionPolicy) - delete(rawMsg, key) - case "defaultRedirectConfiguration": - err = unpopulate(val, "DefaultRedirectConfiguration", &a.DefaultRedirectConfiguration) - delete(rawMsg, key) - case "defaultRewriteRuleSet": - err = unpopulate(val, "DefaultRewriteRuleSet", &a.DefaultRewriteRuleSet) - delete(rawMsg, key) - case "pathRules": - err = unpopulate(val, "PathRules", &a.PathRules) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWebApplicationFirewallConfiguration. -func (a ApplicationGatewayWebApplicationFirewallConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disabledRuleGroups", a.DisabledRuleGroups) - populate(objectMap, "enabled", a.Enabled) - populate(objectMap, "exclusions", a.Exclusions) - populate(objectMap, "fileUploadLimitInMb", a.FileUploadLimitInMb) - populate(objectMap, "firewallMode", a.FirewallMode) - populate(objectMap, "maxRequestBodySize", a.MaxRequestBodySize) - populate(objectMap, "maxRequestBodySizeInKb", a.MaxRequestBodySizeInKb) - populate(objectMap, "requestBodyCheck", a.RequestBodyCheck) - populate(objectMap, "ruleSetType", a.RuleSetType) - populate(objectMap, "ruleSetVersion", a.RuleSetVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayWebApplicationFirewallConfiguration. -func (a *ApplicationGatewayWebApplicationFirewallConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disabledRuleGroups": - err = unpopulate(val, "DisabledRuleGroups", &a.DisabledRuleGroups) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - delete(rawMsg, key) - case "exclusions": - err = unpopulate(val, "Exclusions", &a.Exclusions) - delete(rawMsg, key) - case "fileUploadLimitInMb": - err = unpopulate(val, "FileUploadLimitInMb", &a.FileUploadLimitInMb) - delete(rawMsg, key) - case "firewallMode": - err = unpopulate(val, "FirewallMode", &a.FirewallMode) - delete(rawMsg, key) - case "maxRequestBodySize": - err = unpopulate(val, "MaxRequestBodySize", &a.MaxRequestBodySize) - delete(rawMsg, key) - case "maxRequestBodySizeInKb": - err = unpopulate(val, "MaxRequestBodySizeInKb", &a.MaxRequestBodySizeInKb) - delete(rawMsg, key) - case "requestBodyCheck": - err = unpopulate(val, "RequestBodyCheck", &a.RequestBodyCheck) - delete(rawMsg, key) - case "ruleSetType": - err = unpopulate(val, "RuleSetType", &a.RuleSetType) - delete(rawMsg, key) - case "ruleSetVersion": - err = unpopulate(val, "RuleSetVersion", &a.RuleSetVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationRule. -func (a ApplicationRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "destinationAddresses", a.DestinationAddresses) - populate(objectMap, "fqdnTags", a.FqdnTags) - populate(objectMap, "name", a.Name) - populate(objectMap, "protocols", a.Protocols) - objectMap["ruleType"] = FirewallPolicyRuleTypeApplicationRule - populate(objectMap, "sourceAddresses", a.SourceAddresses) - populate(objectMap, "sourceIpGroups", a.SourceIPGroups) - populate(objectMap, "targetFqdns", a.TargetFqdns) - populate(objectMap, "targetUrls", a.TargetUrls) - populate(objectMap, "terminateTLS", a.TerminateTLS) - populate(objectMap, "webCategories", a.WebCategories) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationRule. -func (a *ApplicationRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "destinationAddresses": - err = unpopulate(val, "DestinationAddresses", &a.DestinationAddresses) - delete(rawMsg, key) - case "fqdnTags": - err = unpopulate(val, "FqdnTags", &a.FqdnTags) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "protocols": - err = unpopulate(val, "Protocols", &a.Protocols) - delete(rawMsg, key) - case "ruleType": - err = unpopulate(val, "RuleType", &a.RuleType) - delete(rawMsg, key) - case "sourceAddresses": - err = unpopulate(val, "SourceAddresses", &a.SourceAddresses) - delete(rawMsg, key) - case "sourceIpGroups": - err = unpopulate(val, "SourceIPGroups", &a.SourceIPGroups) - delete(rawMsg, key) - case "targetFqdns": - err = unpopulate(val, "TargetFqdns", &a.TargetFqdns) - delete(rawMsg, key) - case "targetUrls": - err = unpopulate(val, "TargetUrls", &a.TargetUrls) - delete(rawMsg, key) - case "terminateTLS": - err = unpopulate(val, "TerminateTLS", &a.TerminateTLS) - delete(rawMsg, key) - case "webCategories": - err = unpopulate(val, "WebCategories", &a.WebCategories) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroup. -func (a ApplicationSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationSecurityGroup. -func (a *ApplicationSecurityGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroupListResult. -func (a ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationSecurityGroupListResult. -func (a *ApplicationSecurityGroupListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroupPropertiesFormat. -func (a ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "resourceGuid", a.ResourceGUID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationSecurityGroupPropertiesFormat. -func (a *ApplicationSecurityGroupPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &a.ResourceGUID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AuthorizationListResult. -func (a AuthorizationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationListResult. -func (a *AuthorizationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AuthorizationPropertiesFormat. -func (a AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorizationKey", a.AuthorizationKey) - populate(objectMap, "authorizationUseStatus", a.AuthorizationUseStatus) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationPropertiesFormat. -func (a *AuthorizationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationKey": - err = unpopulate(val, "AuthorizationKey", &a.AuthorizationKey) - delete(rawMsg, key) - case "authorizationUseStatus": - err = unpopulate(val, "AuthorizationUseStatus", &a.AuthorizationUseStatus) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AutoApprovedPrivateLinkService. -func (a AutoApprovedPrivateLinkService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateLinkService", a.PrivateLinkService) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AutoApprovedPrivateLinkService. -func (a *AutoApprovedPrivateLinkService) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateLinkService": - err = unpopulate(val, "PrivateLinkService", &a.PrivateLinkService) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AutoApprovedPrivateLinkServicesResult. -func (a AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AutoApprovedPrivateLinkServicesResult. -func (a *AutoApprovedPrivateLinkServicesResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Availability. -func (a Availability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "blobDuration", a.BlobDuration) - populate(objectMap, "retention", a.Retention) - populate(objectMap, "timeGrain", a.TimeGrain) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Availability. -func (a *Availability) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blobDuration": - err = unpopulate(val, "BlobDuration", &a.BlobDuration) - delete(rawMsg, key) - case "retention": - err = unpopulate(val, "Retention", &a.Retention) - delete(rawMsg, key) - case "timeGrain": - err = unpopulate(val, "TimeGrain", &a.TimeGrain) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableDelegation. -func (a AvailableDelegation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actions", a.Actions) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "serviceName", a.ServiceName) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableDelegation. -func (a *AvailableDelegation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actions": - err = unpopulate(val, "Actions", &a.Actions) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "serviceName": - err = unpopulate(val, "ServiceName", &a.ServiceName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableDelegationsResult. -func (a AvailableDelegationsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableDelegationsResult. -func (a *AvailableDelegationsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailablePrivateEndpointType. -func (a AvailablePrivateEndpointType) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayName", a.DisplayName) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "resourceName", a.ResourceName) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailablePrivateEndpointType. -func (a *AvailablePrivateEndpointType) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "displayName": - err = unpopulate(val, "DisplayName", &a.DisplayName) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "resourceName": - err = unpopulate(val, "ResourceName", &a.ResourceName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailablePrivateEndpointTypesResult. -func (a AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailablePrivateEndpointTypesResult. -func (a *AvailablePrivateEndpointTypesResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersList. -func (a AvailableProvidersList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "countries", a.Countries) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableProvidersList. -func (a *AvailableProvidersList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "countries": - err = unpopulate(val, "Countries", &a.Countries) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListCity. -func (a AvailableProvidersListCity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cityName", a.CityName) - populate(objectMap, "providers", a.Providers) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableProvidersListCity. -func (a *AvailableProvidersListCity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cityName": - err = unpopulate(val, "CityName", &a.CityName) - delete(rawMsg, key) - case "providers": - err = unpopulate(val, "Providers", &a.Providers) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListCountry. -func (a AvailableProvidersListCountry) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "countryName", a.CountryName) - populate(objectMap, "providers", a.Providers) - populate(objectMap, "states", a.States) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableProvidersListCountry. -func (a *AvailableProvidersListCountry) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "countryName": - err = unpopulate(val, "CountryName", &a.CountryName) - delete(rawMsg, key) - case "providers": - err = unpopulate(val, "Providers", &a.Providers) - delete(rawMsg, key) - case "states": - err = unpopulate(val, "States", &a.States) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListParameters. -func (a AvailableProvidersListParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureLocations", a.AzureLocations) - populate(objectMap, "city", a.City) - populate(objectMap, "country", a.Country) - populate(objectMap, "state", a.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableProvidersListParameters. -func (a *AvailableProvidersListParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureLocations": - err = unpopulate(val, "AzureLocations", &a.AzureLocations) - delete(rawMsg, key) - case "city": - err = unpopulate(val, "City", &a.City) - delete(rawMsg, key) - case "country": - err = unpopulate(val, "Country", &a.Country) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &a.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListState. -func (a AvailableProvidersListState) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cities", a.Cities) - populate(objectMap, "providers", a.Providers) - populate(objectMap, "stateName", a.StateName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableProvidersListState. -func (a *AvailableProvidersListState) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cities": - err = unpopulate(val, "Cities", &a.Cities) - delete(rawMsg, key) - case "providers": - err = unpopulate(val, "Providers", &a.Providers) - delete(rawMsg, key) - case "stateName": - err = unpopulate(val, "StateName", &a.StateName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableServiceAlias. -func (a AvailableServiceAlias) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "resourceName", a.ResourceName) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableServiceAlias. -func (a *AvailableServiceAlias) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "resourceName": - err = unpopulate(val, "ResourceName", &a.ResourceName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AvailableServiceAliasesResult. -func (a AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableServiceAliasesResult. -func (a *AvailableServiceAliasesResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureAsyncOperationResult. -func (a AzureAsyncOperationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "error", a.Error) - populate(objectMap, "status", a.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureAsyncOperationResult. -func (a *AzureAsyncOperationResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &a.Error) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewall. -func (a AzureFirewall) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - populate(objectMap, "zones", a.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewall. -func (a *AzureFirewall) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &a.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRule. -func (a AzureFirewallApplicationRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "fqdnTags", a.FqdnTags) - populate(objectMap, "name", a.Name) - populate(objectMap, "protocols", a.Protocols) - populate(objectMap, "sourceAddresses", a.SourceAddresses) - populate(objectMap, "sourceIpGroups", a.SourceIPGroups) - populate(objectMap, "targetFqdns", a.TargetFqdns) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallApplicationRule. -func (a *AzureFirewallApplicationRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "fqdnTags": - err = unpopulate(val, "FqdnTags", &a.FqdnTags) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "protocols": - err = unpopulate(val, "Protocols", &a.Protocols) - delete(rawMsg, key) - case "sourceAddresses": - err = unpopulate(val, "SourceAddresses", &a.SourceAddresses) - delete(rawMsg, key) - case "sourceIpGroups": - err = unpopulate(val, "SourceIPGroups", &a.SourceIPGroups) - delete(rawMsg, key) - case "targetFqdns": - err = unpopulate(val, "TargetFqdns", &a.TargetFqdns) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleCollection. -func (a AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallApplicationRuleCollection. -func (a *AzureFirewallApplicationRuleCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleCollectionPropertiesFormat. -func (a AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", a.Action) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallApplicationRuleCollectionPropertiesFormat. -func (a *AzureFirewallApplicationRuleCollectionPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &a.Action) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &a.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &a.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleProtocol. -func (a AzureFirewallApplicationRuleProtocol) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "port", a.Port) - populate(objectMap, "protocolType", a.ProtocolType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallApplicationRuleProtocol. -func (a *AzureFirewallApplicationRuleProtocol) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "port": - err = unpopulate(val, "Port", &a.Port) - delete(rawMsg, key) - case "protocolType": - err = unpopulate(val, "ProtocolType", &a.ProtocolType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTag. -func (a AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallFqdnTag. -func (a *AzureFirewallFqdnTag) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTagListResult. -func (a AzureFirewallFqdnTagListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallFqdnTagListResult. -func (a *AzureFirewallFqdnTagListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTagPropertiesFormat. -func (a AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fqdnTagName", a.FqdnTagName) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallFqdnTagPropertiesFormat. -func (a *AzureFirewallFqdnTagPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fqdnTagName": - err = unpopulate(val, "FqdnTagName", &a.FqdnTagName) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallIPConfiguration. -func (a AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallIPConfiguration. -func (a *AzureFirewallIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallIPConfigurationPropertiesFormat. -func (a AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateIPAddress", a.PrivateIPAddress) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "publicIPAddress", a.PublicIPAddress) - populate(objectMap, "subnet", a.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallIPConfigurationPropertiesFormat. -func (a *AzureFirewallIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &a.PrivateIPAddress) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddress": - err = unpopulate(val, "PublicIPAddress", &a.PublicIPAddress) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &a.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallIPGroups. -func (a AzureFirewallIPGroups) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "changeNumber", a.ChangeNumber) - populate(objectMap, "id", a.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallIPGroups. -func (a *AzureFirewallIPGroups) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "changeNumber": - err = unpopulate(val, "ChangeNumber", &a.ChangeNumber) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallListResult. -func (a AzureFirewallListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallListResult. -func (a *AzureFirewallListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRCAction. -func (a AzureFirewallNatRCAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNatRCAction. -func (a *AzureFirewallNatRCAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRule. -func (a AzureFirewallNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "destinationAddresses", a.DestinationAddresses) - populate(objectMap, "destinationPorts", a.DestinationPorts) - populate(objectMap, "name", a.Name) - populate(objectMap, "protocols", a.Protocols) - populate(objectMap, "sourceAddresses", a.SourceAddresses) - populate(objectMap, "sourceIpGroups", a.SourceIPGroups) - populate(objectMap, "translatedAddress", a.TranslatedAddress) - populate(objectMap, "translatedFqdn", a.TranslatedFqdn) - populate(objectMap, "translatedPort", a.TranslatedPort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNatRule. -func (a *AzureFirewallNatRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "destinationAddresses": - err = unpopulate(val, "DestinationAddresses", &a.DestinationAddresses) - delete(rawMsg, key) - case "destinationPorts": - err = unpopulate(val, "DestinationPorts", &a.DestinationPorts) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "protocols": - err = unpopulate(val, "Protocols", &a.Protocols) - delete(rawMsg, key) - case "sourceAddresses": - err = unpopulate(val, "SourceAddresses", &a.SourceAddresses) - delete(rawMsg, key) - case "sourceIpGroups": - err = unpopulate(val, "SourceIPGroups", &a.SourceIPGroups) - delete(rawMsg, key) - case "translatedAddress": - err = unpopulate(val, "TranslatedAddress", &a.TranslatedAddress) - delete(rawMsg, key) - case "translatedFqdn": - err = unpopulate(val, "TranslatedFqdn", &a.TranslatedFqdn) - delete(rawMsg, key) - case "translatedPort": - err = unpopulate(val, "TranslatedPort", &a.TranslatedPort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRuleCollection. -func (a AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNatRuleCollection. -func (a *AzureFirewallNatRuleCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRuleCollectionProperties. -func (a AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", a.Action) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNatRuleCollectionProperties. -func (a *AzureFirewallNatRuleCollectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &a.Action) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &a.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &a.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRule. -func (a AzureFirewallNetworkRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "destinationAddresses", a.DestinationAddresses) - populate(objectMap, "destinationFqdns", a.DestinationFqdns) - populate(objectMap, "destinationIpGroups", a.DestinationIPGroups) - populate(objectMap, "destinationPorts", a.DestinationPorts) - populate(objectMap, "name", a.Name) - populate(objectMap, "protocols", a.Protocols) - populate(objectMap, "sourceAddresses", a.SourceAddresses) - populate(objectMap, "sourceIpGroups", a.SourceIPGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNetworkRule. -func (a *AzureFirewallNetworkRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "destinationAddresses": - err = unpopulate(val, "DestinationAddresses", &a.DestinationAddresses) - delete(rawMsg, key) - case "destinationFqdns": - err = unpopulate(val, "DestinationFqdns", &a.DestinationFqdns) - delete(rawMsg, key) - case "destinationIpGroups": - err = unpopulate(val, "DestinationIPGroups", &a.DestinationIPGroups) - delete(rawMsg, key) - case "destinationPorts": - err = unpopulate(val, "DestinationPorts", &a.DestinationPorts) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "protocols": - err = unpopulate(val, "Protocols", &a.Protocols) - delete(rawMsg, key) - case "sourceAddresses": - err = unpopulate(val, "SourceAddresses", &a.SourceAddresses) - delete(rawMsg, key) - case "sourceIpGroups": - err = unpopulate(val, "SourceIPGroups", &a.SourceIPGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRuleCollection. -func (a AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNetworkRuleCollection. -func (a *AzureFirewallNetworkRuleCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRuleCollectionPropertiesFormat. -func (a AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", a.Action) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNetworkRuleCollectionPropertiesFormat. -func (a *AzureFirewallNetworkRuleCollectionPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &a.Action) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &a.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &a.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallPropertiesFormat. -func (a AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "additionalProperties", a.AdditionalProperties) - populate(objectMap, "applicationRuleCollections", a.ApplicationRuleCollections) - populate(objectMap, "firewallPolicy", a.FirewallPolicy) - populate(objectMap, "hubIPAddresses", a.HubIPAddresses) - populate(objectMap, "ipConfigurations", a.IPConfigurations) - populate(objectMap, "ipGroups", a.IPGroups) - populate(objectMap, "managementIpConfiguration", a.ManagementIPConfiguration) - populate(objectMap, "natRuleCollections", a.NatRuleCollections) - populate(objectMap, "networkRuleCollections", a.NetworkRuleCollections) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "sku", a.SKU) - populate(objectMap, "threatIntelMode", a.ThreatIntelMode) - populate(objectMap, "virtualHub", a.VirtualHub) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallPropertiesFormat. -func (a *AzureFirewallPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "additionalProperties": - err = unpopulate(val, "AdditionalProperties", &a.AdditionalProperties) - delete(rawMsg, key) - case "applicationRuleCollections": - err = unpopulate(val, "ApplicationRuleCollections", &a.ApplicationRuleCollections) - delete(rawMsg, key) - case "firewallPolicy": - err = unpopulate(val, "FirewallPolicy", &a.FirewallPolicy) - delete(rawMsg, key) - case "hubIPAddresses": - err = unpopulate(val, "HubIPAddresses", &a.HubIPAddresses) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &a.IPConfigurations) - delete(rawMsg, key) - case "ipGroups": - err = unpopulate(val, "IPGroups", &a.IPGroups) - delete(rawMsg, key) - case "managementIpConfiguration": - err = unpopulate(val, "ManagementIPConfiguration", &a.ManagementIPConfiguration) - delete(rawMsg, key) - case "natRuleCollections": - err = unpopulate(val, "NatRuleCollections", &a.NatRuleCollections) - delete(rawMsg, key) - case "networkRuleCollections": - err = unpopulate(val, "NetworkRuleCollections", &a.NetworkRuleCollections) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &a.SKU) - delete(rawMsg, key) - case "threatIntelMode": - err = unpopulate(val, "ThreatIntelMode", &a.ThreatIntelMode) - delete(rawMsg, key) - case "virtualHub": - err = unpopulate(val, "VirtualHub", &a.VirtualHub) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallPublicIPAddress. -func (a AzureFirewallPublicIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", a.Address) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallPublicIPAddress. -func (a *AzureFirewallPublicIPAddress) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &a.Address) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallRCAction. -func (a AzureFirewallRCAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallRCAction. -func (a *AzureFirewallRCAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallSKU. -func (a AzureFirewallSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", a.Name) - populate(objectMap, "tier", a.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallSKU. -func (a *AzureFirewallSKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &a.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReport. -func (a AzureReachabilityReport) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aggregationLevel", a.AggregationLevel) - populate(objectMap, "providerLocation", a.ProviderLocation) - populate(objectMap, "reachabilityReport", a.ReachabilityReport) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReport. -func (a *AzureReachabilityReport) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aggregationLevel": - err = unpopulate(val, "AggregationLevel", &a.AggregationLevel) - delete(rawMsg, key) - case "providerLocation": - err = unpopulate(val, "ProviderLocation", &a.ProviderLocation) - delete(rawMsg, key) - case "reachabilityReport": - err = unpopulate(val, "ReachabilityReport", &a.ReachabilityReport) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportItem. -func (a AzureReachabilityReportItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureLocation", a.AzureLocation) - populate(objectMap, "latencies", a.Latencies) - populate(objectMap, "provider", a.Provider) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportItem. -func (a *AzureReachabilityReportItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureLocation": - err = unpopulate(val, "AzureLocation", &a.AzureLocation) - delete(rawMsg, key) - case "latencies": - err = unpopulate(val, "Latencies", &a.Latencies) - delete(rawMsg, key) - case "provider": - err = unpopulate(val, "Provider", &a.Provider) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportLatencyInfo. -func (a AzureReachabilityReportLatencyInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "score", a.Score) - populateTimeRFC3339(objectMap, "timeStamp", a.TimeStamp) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportLatencyInfo. -func (a *AzureReachabilityReportLatencyInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "score": - err = unpopulate(val, "Score", &a.Score) - delete(rawMsg, key) - case "timeStamp": - err = unpopulateTimeRFC3339(val, "TimeStamp", &a.TimeStamp) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportLocation. -func (a AzureReachabilityReportLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "city", a.City) - populate(objectMap, "country", a.Country) - populate(objectMap, "state", a.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportLocation. -func (a *AzureReachabilityReportLocation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "city": - err = unpopulate(val, "City", &a.City) - delete(rawMsg, key) - case "country": - err = unpopulate(val, "Country", &a.Country) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &a.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportParameters. -func (a AzureReachabilityReportParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureLocations", a.AzureLocations) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "providerLocation", a.ProviderLocation) - populate(objectMap, "providers", a.Providers) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportParameters. -func (a *AzureReachabilityReportParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureLocations": - err = unpopulate(val, "AzureLocations", &a.AzureLocations) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) - delete(rawMsg, key) - case "providerLocation": - err = unpopulate(val, "ProviderLocation", &a.ProviderLocation) - delete(rawMsg, key) - case "providers": - err = unpopulate(val, "Providers", &a.Providers) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWebCategory. -func (a AzureWebCategory) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWebCategory. -func (a *AzureWebCategory) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &a.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWebCategoryListResult. -func (a AzureWebCategoryListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWebCategoryListResult. -func (a *AzureWebCategoryListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWebCategoryPropertiesFormat. -func (a AzureWebCategoryPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "group", a.Group) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWebCategoryPropertiesFormat. -func (a *AzureWebCategoryPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "group": - err = unpopulate(val, "Group", &a.Group) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BGPCommunity. -func (b BGPCommunity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "communityName", b.CommunityName) - populate(objectMap, "communityPrefixes", b.CommunityPrefixes) - populate(objectMap, "communityValue", b.CommunityValue) - populate(objectMap, "isAuthorizedToUse", b.IsAuthorizedToUse) - populate(objectMap, "serviceGroup", b.ServiceGroup) - populate(objectMap, "serviceSupportedRegion", b.ServiceSupportedRegion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BGPCommunity. -func (b *BGPCommunity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "communityName": - err = unpopulate(val, "CommunityName", &b.CommunityName) - delete(rawMsg, key) - case "communityPrefixes": - err = unpopulate(val, "CommunityPrefixes", &b.CommunityPrefixes) - delete(rawMsg, key) - case "communityValue": - err = unpopulate(val, "CommunityValue", &b.CommunityValue) - delete(rawMsg, key) - case "isAuthorizedToUse": - err = unpopulate(val, "IsAuthorizedToUse", &b.IsAuthorizedToUse) - delete(rawMsg, key) - case "serviceGroup": - err = unpopulate(val, "ServiceGroup", &b.ServiceGroup) - delete(rawMsg, key) - case "serviceSupportedRegion": - err = unpopulate(val, "ServiceSupportedRegion", &b.ServiceSupportedRegion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendAddressInboundNatRulePortMappings. -func (b BackendAddressInboundNatRulePortMappings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "inboundNatRulePortMappings", b.InboundNatRulePortMappings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendAddressInboundNatRulePortMappings. -func (b *BackendAddressInboundNatRulePortMappings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "inboundNatRulePortMappings": - err = unpopulate(val, "InboundNatRulePortMappings", &b.InboundNatRulePortMappings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendAddressPool. -func (b BackendAddressPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", b.Etag) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendAddressPool. -func (b *BackendAddressPool) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &b.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackendAddressPoolPropertiesFormat. -func (b BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendIPConfigurations", b.BackendIPConfigurations) - populate(objectMap, "drainPeriodInSeconds", b.DrainPeriodInSeconds) - populate(objectMap, "inboundNatRules", b.InboundNatRules) - populate(objectMap, "loadBalancerBackendAddresses", b.LoadBalancerBackendAddresses) - populate(objectMap, "loadBalancingRules", b.LoadBalancingRules) - populate(objectMap, "location", b.Location) - populate(objectMap, "outboundRule", b.OutboundRule) - populate(objectMap, "outboundRules", b.OutboundRules) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "tunnelInterfaces", b.TunnelInterfaces) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackendAddressPoolPropertiesFormat. -func (b *BackendAddressPoolPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendIPConfigurations": - err = unpopulate(val, "BackendIPConfigurations", &b.BackendIPConfigurations) - delete(rawMsg, key) - case "drainPeriodInSeconds": - err = unpopulate(val, "DrainPeriodInSeconds", &b.DrainPeriodInSeconds) - delete(rawMsg, key) - case "inboundNatRules": - err = unpopulate(val, "InboundNatRules", &b.InboundNatRules) - delete(rawMsg, key) - case "loadBalancerBackendAddresses": - err = unpopulate(val, "LoadBalancerBackendAddresses", &b.LoadBalancerBackendAddresses) - delete(rawMsg, key) - case "loadBalancingRules": - err = unpopulate(val, "LoadBalancingRules", &b.LoadBalancingRules) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &b.Location) - delete(rawMsg, key) - case "outboundRule": - err = unpopulate(val, "OutboundRule", &b.OutboundRule) - delete(rawMsg, key) - case "outboundRules": - err = unpopulate(val, "OutboundRules", &b.OutboundRules) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - case "tunnelInterfaces": - err = unpopulate(val, "TunnelInterfaces", &b.TunnelInterfaces) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BaseAdminRule. -func (b BaseAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", b.Etag) - populate(objectMap, "id", b.ID) - objectMap["kind"] = b.Kind - populate(objectMap, "name", b.Name) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BaseAdminRule. -func (b *BaseAdminRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &b.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &b.Kind) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &b.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionActiveSession. -func (b BastionActiveSession) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "protocol", b.Protocol) - populate(objectMap, "resourceType", b.ResourceType) - populate(objectMap, "sessionDurationInMins", b.SessionDurationInMins) - populate(objectMap, "sessionId", b.SessionID) - populate(objectMap, "startTime", &b.StartTime) - populate(objectMap, "targetHostName", b.TargetHostName) - populate(objectMap, "targetIpAddress", b.TargetIPAddress) - populate(objectMap, "targetResourceGroup", b.TargetResourceGroup) - populate(objectMap, "targetResourceId", b.TargetResourceID) - populate(objectMap, "targetSubscriptionId", b.TargetSubscriptionID) - populate(objectMap, "userName", b.UserName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionActiveSession. -func (b *BastionActiveSession) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "protocol": - err = unpopulate(val, "Protocol", &b.Protocol) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &b.ResourceType) - delete(rawMsg, key) - case "sessionDurationInMins": - err = unpopulate(val, "SessionDurationInMins", &b.SessionDurationInMins) - delete(rawMsg, key) - case "sessionId": - err = unpopulate(val, "SessionID", &b.SessionID) - delete(rawMsg, key) - case "startTime": - err = unpopulate(val, "StartTime", &b.StartTime) - delete(rawMsg, key) - case "targetHostName": - err = unpopulate(val, "TargetHostName", &b.TargetHostName) - delete(rawMsg, key) - case "targetIpAddress": - err = unpopulate(val, "TargetIPAddress", &b.TargetIPAddress) - delete(rawMsg, key) - case "targetResourceGroup": - err = unpopulate(val, "TargetResourceGroup", &b.TargetResourceGroup) - delete(rawMsg, key) - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &b.TargetResourceID) - delete(rawMsg, key) - case "targetSubscriptionId": - err = unpopulate(val, "TargetSubscriptionID", &b.TargetSubscriptionID) - delete(rawMsg, key) - case "userName": - err = unpopulate(val, "UserName", &b.UserName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionActiveSessionListResult. -func (b BastionActiveSessionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionActiveSessionListResult. -func (b *BastionActiveSessionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionHost. -func (b BastionHost) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", b.Etag) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "sku", b.SKU) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHost. -func (b *BastionHost) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &b.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &b.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &b.SKU) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &b.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionHostIPConfiguration. -func (b BastionHostIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", b.Etag) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHostIPConfiguration. -func (b *BastionHostIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &b.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionHostIPConfigurationPropertiesFormat. -func (b BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateIPAllocationMethod", b.PrivateIPAllocationMethod) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "publicIPAddress", b.PublicIPAddress) - populate(objectMap, "subnet", b.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHostIPConfigurationPropertiesFormat. -func (b *BastionHostIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateIPAllocationMethod": - err = unpopulate(val, "PrivateIPAllocationMethod", &b.PrivateIPAllocationMethod) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddress": - err = unpopulate(val, "PublicIPAddress", &b.PublicIPAddress) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &b.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionHostListResult. -func (b BastionHostListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHostListResult. -func (b *BastionHostListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionHostPropertiesFormat. -func (b BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dnsName", b.DNSName) - populate(objectMap, "disableCopyPaste", b.DisableCopyPaste) - populate(objectMap, "enableFileCopy", b.EnableFileCopy) - populate(objectMap, "enableIpConnect", b.EnableIPConnect) - populate(objectMap, "enableShareableLink", b.EnableShareableLink) - populate(objectMap, "enableTunneling", b.EnableTunneling) - populate(objectMap, "ipConfigurations", b.IPConfigurations) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "scaleUnits", b.ScaleUnits) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHostPropertiesFormat. -func (b *BastionHostPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dnsName": - err = unpopulate(val, "DNSName", &b.DNSName) - delete(rawMsg, key) - case "disableCopyPaste": - err = unpopulate(val, "DisableCopyPaste", &b.DisableCopyPaste) - delete(rawMsg, key) - case "enableFileCopy": - err = unpopulate(val, "EnableFileCopy", &b.EnableFileCopy) - delete(rawMsg, key) - case "enableIpConnect": - err = unpopulate(val, "EnableIPConnect", &b.EnableIPConnect) - delete(rawMsg, key) - case "enableShareableLink": - err = unpopulate(val, "EnableShareableLink", &b.EnableShareableLink) - delete(rawMsg, key) - case "enableTunneling": - err = unpopulate(val, "EnableTunneling", &b.EnableTunneling) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &b.IPConfigurations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - case "scaleUnits": - err = unpopulate(val, "ScaleUnits", &b.ScaleUnits) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionSessionDeleteResult. -func (b BastionSessionDeleteResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionSessionDeleteResult. -func (b *BastionSessionDeleteResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionSessionState. -func (b BastionSessionState) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "message", b.Message) - populate(objectMap, "sessionId", b.SessionID) - populate(objectMap, "state", b.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionSessionState. -func (b *BastionSessionState) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "message": - err = unpopulate(val, "Message", &b.Message) - delete(rawMsg, key) - case "sessionId": - err = unpopulate(val, "SessionID", &b.SessionID) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &b.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionShareableLink. -func (b BastionShareableLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bsl", b.Bsl) - populate(objectMap, "createdAt", b.CreatedAt) - populate(objectMap, "message", b.Message) - populate(objectMap, "vm", b.VM) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionShareableLink. -func (b *BastionShareableLink) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bsl": - err = unpopulate(val, "Bsl", &b.Bsl) - delete(rawMsg, key) - case "createdAt": - err = unpopulate(val, "CreatedAt", &b.CreatedAt) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &b.Message) - delete(rawMsg, key) - case "vm": - err = unpopulate(val, "VM", &b.VM) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkListRequest. -func (b BastionShareableLinkListRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "vms", b.VMs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionShareableLinkListRequest. -func (b *BastionShareableLinkListRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "vms": - err = unpopulate(val, "VMs", &b.VMs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkListResult. -func (b BastionShareableLinkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BastionShareableLinkListResult. -func (b *BastionShareableLinkListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BgpConnection. -func (b BgpConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", b.Etag) - populate(objectMap, "id", b.ID) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BgpConnection. -func (b *BgpConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &b.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BgpConnectionProperties. -func (b BgpConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "connectionState", b.ConnectionState) - populate(objectMap, "hubVirtualNetworkConnection", b.HubVirtualNetworkConnection) - populate(objectMap, "peerAsn", b.PeerAsn) - populate(objectMap, "peerIp", b.PeerIP) - populate(objectMap, "provisioningState", b.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BgpConnectionProperties. -func (b *BgpConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionState": - err = unpopulate(val, "ConnectionState", &b.ConnectionState) - delete(rawMsg, key) - case "hubVirtualNetworkConnection": - err = unpopulate(val, "HubVirtualNetworkConnection", &b.HubVirtualNetworkConnection) - delete(rawMsg, key) - case "peerAsn": - err = unpopulate(val, "PeerAsn", &b.PeerAsn) - delete(rawMsg, key) - case "peerIp": - err = unpopulate(val, "PeerIP", &b.PeerIP) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BgpPeerStatus. -func (b BgpPeerStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "asn", b.Asn) - populate(objectMap, "connectedDuration", b.ConnectedDuration) - populate(objectMap, "localAddress", b.LocalAddress) - populate(objectMap, "messagesReceived", b.MessagesReceived) - populate(objectMap, "messagesSent", b.MessagesSent) - populate(objectMap, "neighbor", b.Neighbor) - populate(objectMap, "routesReceived", b.RoutesReceived) - populate(objectMap, "state", b.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BgpPeerStatus. -func (b *BgpPeerStatus) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "asn": - err = unpopulate(val, "Asn", &b.Asn) - delete(rawMsg, key) - case "connectedDuration": - err = unpopulate(val, "ConnectedDuration", &b.ConnectedDuration) - delete(rawMsg, key) - case "localAddress": - err = unpopulate(val, "LocalAddress", &b.LocalAddress) - delete(rawMsg, key) - case "messagesReceived": - err = unpopulate(val, "MessagesReceived", &b.MessagesReceived) - delete(rawMsg, key) - case "messagesSent": - err = unpopulate(val, "MessagesSent", &b.MessagesSent) - delete(rawMsg, key) - case "neighbor": - err = unpopulate(val, "Neighbor", &b.Neighbor) - delete(rawMsg, key) - case "routesReceived": - err = unpopulate(val, "RoutesReceived", &b.RoutesReceived) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &b.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BgpPeerStatusListResult. -func (b BgpPeerStatusListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BgpPeerStatusListResult. -func (b *BgpPeerStatusListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunity. -func (b BgpServiceCommunity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BgpServiceCommunity. -func (b *BgpServiceCommunity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &b.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &b.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunityListResult. -func (b BgpServiceCommunityListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BgpServiceCommunityListResult. -func (b *BgpServiceCommunityListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &b.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &b.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunityPropertiesFormat. -func (b BgpServiceCommunityPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bgpCommunities", b.BgpCommunities) - populate(objectMap, "serviceName", b.ServiceName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BgpServiceCommunityPropertiesFormat. -func (b *BgpServiceCommunityPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bgpCommunities": - err = unpopulate(val, "BgpCommunities", &b.BgpCommunities) - delete(rawMsg, key) - case "serviceName": - err = unpopulate(val, "ServiceName", &b.ServiceName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BgpSettings. -func (b BgpSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "asn", b.Asn) - populate(objectMap, "bgpPeeringAddress", b.BgpPeeringAddress) - populate(objectMap, "bgpPeeringAddresses", b.BgpPeeringAddresses) - populate(objectMap, "peerWeight", b.PeerWeight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BgpSettings. -func (b *BgpSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "asn": - err = unpopulate(val, "Asn", &b.Asn) - delete(rawMsg, key) - case "bgpPeeringAddress": - err = unpopulate(val, "BgpPeeringAddress", &b.BgpPeeringAddress) - delete(rawMsg, key) - case "bgpPeeringAddresses": - err = unpopulate(val, "BgpPeeringAddresses", &b.BgpPeeringAddresses) - delete(rawMsg, key) - case "peerWeight": - err = unpopulate(val, "PeerWeight", &b.PeerWeight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BreakOutCategoryPolicies. -func (b BreakOutCategoryPolicies) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allow", b.Allow) - populate(objectMap, "default", b.Default) - populate(objectMap, "optimize", b.Optimize) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BreakOutCategoryPolicies. -func (b *BreakOutCategoryPolicies) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allow": - err = unpopulate(val, "Allow", &b.Allow) - delete(rawMsg, key) - case "default": - err = unpopulate(val, "Default", &b.Default) - delete(rawMsg, key) - case "optimize": - err = unpopulate(val, "Optimize", &b.Optimize) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CheckPrivateLinkServiceVisibilityRequest. -func (c CheckPrivateLinkServiceVisibilityRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateLinkServiceAlias", c.PrivateLinkServiceAlias) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CheckPrivateLinkServiceVisibilityRequest. -func (c *CheckPrivateLinkServiceVisibilityRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateLinkServiceAlias": - err = unpopulate(val, "PrivateLinkServiceAlias", &c.PrivateLinkServiceAlias) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ChildResource. -func (c ChildResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ChildResource. -func (c *ChildResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &c.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CloudError. -func (c CloudError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "error", c.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CloudError. -func (c *CloudError) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &c.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CloudErrorBody. -func (c CloudErrorBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", c.Code) - populate(objectMap, "details", c.Details) - populate(objectMap, "message", c.Message) - populate(objectMap, "target", c.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CloudErrorBody. -func (c *CloudErrorBody) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &c.Code) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &c.Details) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &c.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. -func (c Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clientId", c.ClientID) - populate(objectMap, "principalId", c.PrincipalID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. -func (c *Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &c.ClientID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &c.PrincipalID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticParameters. -func (c ConfigurationDiagnosticParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "profiles", c.Profiles) - populate(objectMap, "targetResourceId", c.TargetResourceID) - populate(objectMap, "verbosityLevel", c.VerbosityLevel) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationDiagnosticParameters. -func (c *ConfigurationDiagnosticParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "profiles": - err = unpopulate(val, "Profiles", &c.Profiles) - delete(rawMsg, key) - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &c.TargetResourceID) - delete(rawMsg, key) - case "verbosityLevel": - err = unpopulate(val, "VerbosityLevel", &c.VerbosityLevel) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticProfile. -func (c ConfigurationDiagnosticProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destination", c.Destination) - populate(objectMap, "destinationPort", c.DestinationPort) - populate(objectMap, "direction", c.Direction) - populate(objectMap, "protocol", c.Protocol) - populate(objectMap, "source", c.Source) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationDiagnosticProfile. -func (c *ConfigurationDiagnosticProfile) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destination": - err = unpopulate(val, "Destination", &c.Destination) - delete(rawMsg, key) - case "destinationPort": - err = unpopulate(val, "DestinationPort", &c.DestinationPort) - delete(rawMsg, key) - case "direction": - err = unpopulate(val, "Direction", &c.Direction) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &c.Protocol) - delete(rawMsg, key) - case "source": - err = unpopulate(val, "Source", &c.Source) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticResponse. -func (c ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "results", c.Results) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationDiagnosticResponse. -func (c *ConfigurationDiagnosticResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "results": - err = unpopulate(val, "Results", &c.Results) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticResult. -func (c ConfigurationDiagnosticResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "networkSecurityGroupResult", c.NetworkSecurityGroupResult) - populate(objectMap, "profile", c.Profile) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationDiagnosticResult. -func (c *ConfigurationDiagnosticResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "networkSecurityGroupResult": - err = unpopulate(val, "NetworkSecurityGroupResult", &c.NetworkSecurityGroupResult) - delete(rawMsg, key) - case "profile": - err = unpopulate(val, "Profile", &c.Profile) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigurationGroup. -func (c ConfigurationGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationGroup. -func (c *ConfigurationGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitor. -func (c ConnectionMonitor) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "location", c.Location) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitor. -func (c *ConnectionMonitor) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "location": - err = unpopulate(val, "Location", &c.Location) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorDestination. -func (c ConnectionMonitorDestination) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", c.Address) - populate(objectMap, "port", c.Port) - populate(objectMap, "resourceId", c.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorDestination. -func (c *ConnectionMonitorDestination) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &c.Address) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &c.Port) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpoint. -func (c ConnectionMonitorEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", c.Address) - populate(objectMap, "coverageLevel", c.CoverageLevel) - populate(objectMap, "filter", c.Filter) - populate(objectMap, "name", c.Name) - populate(objectMap, "resourceId", c.ResourceID) - populate(objectMap, "scope", c.Scope) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpoint. -func (c *ConnectionMonitorEndpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &c.Address) - delete(rawMsg, key) - case "coverageLevel": - err = unpopulate(val, "CoverageLevel", &c.CoverageLevel) - delete(rawMsg, key) - case "filter": - err = unpopulate(val, "Filter", &c.Filter) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &c.Scope) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointFilter. -func (c ConnectionMonitorEndpointFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "items", c.Items) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpointFilter. -func (c *ConnectionMonitorEndpointFilter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "items": - err = unpopulate(val, "Items", &c.Items) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointFilterItem. -func (c ConnectionMonitorEndpointFilterItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", c.Address) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpointFilterItem. -func (c *ConnectionMonitorEndpointFilterItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &c.Address) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointScope. -func (c ConnectionMonitorEndpointScope) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "exclude", c.Exclude) - populate(objectMap, "include", c.Include) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpointScope. -func (c *ConnectionMonitorEndpointScope) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "exclude": - err = unpopulate(val, "Exclude", &c.Exclude) - delete(rawMsg, key) - case "include": - err = unpopulate(val, "Include", &c.Include) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointScopeItem. -func (c ConnectionMonitorEndpointScopeItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", c.Address) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpointScopeItem. -func (c *ConnectionMonitorEndpointScopeItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &c.Address) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorHTTPConfiguration. -func (c ConnectionMonitorHTTPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "method", c.Method) - populate(objectMap, "path", c.Path) - populate(objectMap, "port", c.Port) - populate(objectMap, "preferHTTPS", c.PreferHTTPS) - populate(objectMap, "requestHeaders", c.RequestHeaders) - populate(objectMap, "validStatusCodeRanges", c.ValidStatusCodeRanges) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorHTTPConfiguration. -func (c *ConnectionMonitorHTTPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "method": - err = unpopulate(val, "Method", &c.Method) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &c.Path) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &c.Port) - delete(rawMsg, key) - case "preferHTTPS": - err = unpopulate(val, "PreferHTTPS", &c.PreferHTTPS) - delete(rawMsg, key) - case "requestHeaders": - err = unpopulate(val, "RequestHeaders", &c.RequestHeaders) - delete(rawMsg, key) - case "validStatusCodeRanges": - err = unpopulate(val, "ValidStatusCodeRanges", &c.ValidStatusCodeRanges) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorIcmpConfiguration. -func (c ConnectionMonitorIcmpConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disableTraceRoute", c.DisableTraceRoute) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorIcmpConfiguration. -func (c *ConnectionMonitorIcmpConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disableTraceRoute": - err = unpopulate(val, "DisableTraceRoute", &c.DisableTraceRoute) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorListResult. -func (c ConnectionMonitorListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorListResult. -func (c *ConnectionMonitorListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorOutput. -func (c ConnectionMonitorOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "type", c.Type) - populate(objectMap, "workspaceSettings", c.WorkspaceSettings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorOutput. -func (c *ConnectionMonitorOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - case "workspaceSettings": - err = unpopulate(val, "WorkspaceSettings", &c.WorkspaceSettings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorParameters. -func (c ConnectionMonitorParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "autoStart", c.AutoStart) - populate(objectMap, "destination", c.Destination) - populate(objectMap, "endpoints", c.Endpoints) - populate(objectMap, "monitoringIntervalInSeconds", c.MonitoringIntervalInSeconds) - populate(objectMap, "notes", c.Notes) - populate(objectMap, "outputs", c.Outputs) - populate(objectMap, "source", c.Source) - populate(objectMap, "testConfigurations", c.TestConfigurations) - populate(objectMap, "testGroups", c.TestGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorParameters. -func (c *ConnectionMonitorParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "autoStart": - err = unpopulate(val, "AutoStart", &c.AutoStart) - delete(rawMsg, key) - case "destination": - err = unpopulate(val, "Destination", &c.Destination) - delete(rawMsg, key) - case "endpoints": - err = unpopulate(val, "Endpoints", &c.Endpoints) - delete(rawMsg, key) - case "monitoringIntervalInSeconds": - err = unpopulate(val, "MonitoringIntervalInSeconds", &c.MonitoringIntervalInSeconds) - delete(rawMsg, key) - case "notes": - err = unpopulate(val, "Notes", &c.Notes) - delete(rawMsg, key) - case "outputs": - err = unpopulate(val, "Outputs", &c.Outputs) - delete(rawMsg, key) - case "source": - err = unpopulate(val, "Source", &c.Source) - delete(rawMsg, key) - case "testConfigurations": - err = unpopulate(val, "TestConfigurations", &c.TestConfigurations) - delete(rawMsg, key) - case "testGroups": - err = unpopulate(val, "TestGroups", &c.TestGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorQueryResult. -func (c ConnectionMonitorQueryResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "sourceStatus", c.SourceStatus) - populate(objectMap, "states", c.States) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorQueryResult. -func (c *ConnectionMonitorQueryResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "sourceStatus": - err = unpopulate(val, "SourceStatus", &c.SourceStatus) - delete(rawMsg, key) - case "states": - err = unpopulate(val, "States", &c.States) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorResult. -func (c ConnectionMonitorResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "id", c.ID) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorResult. -func (c *ConnectionMonitorResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &c.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorResultProperties. -func (c ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "autoStart", c.AutoStart) - populate(objectMap, "connectionMonitorType", c.ConnectionMonitorType) - populate(objectMap, "destination", c.Destination) - populate(objectMap, "endpoints", c.Endpoints) - populate(objectMap, "monitoringIntervalInSeconds", c.MonitoringIntervalInSeconds) - populate(objectMap, "monitoringStatus", c.MonitoringStatus) - populate(objectMap, "notes", c.Notes) - populate(objectMap, "outputs", c.Outputs) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "source", c.Source) - populateTimeRFC3339(objectMap, "startTime", c.StartTime) - populate(objectMap, "testConfigurations", c.TestConfigurations) - populate(objectMap, "testGroups", c.TestGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorResultProperties. -func (c *ConnectionMonitorResultProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "autoStart": - err = unpopulate(val, "AutoStart", &c.AutoStart) - delete(rawMsg, key) - case "connectionMonitorType": - err = unpopulate(val, "ConnectionMonitorType", &c.ConnectionMonitorType) - delete(rawMsg, key) - case "destination": - err = unpopulate(val, "Destination", &c.Destination) - delete(rawMsg, key) - case "endpoints": - err = unpopulate(val, "Endpoints", &c.Endpoints) - delete(rawMsg, key) - case "monitoringIntervalInSeconds": - err = unpopulate(val, "MonitoringIntervalInSeconds", &c.MonitoringIntervalInSeconds) - delete(rawMsg, key) - case "monitoringStatus": - err = unpopulate(val, "MonitoringStatus", &c.MonitoringStatus) - delete(rawMsg, key) - case "notes": - err = unpopulate(val, "Notes", &c.Notes) - delete(rawMsg, key) - case "outputs": - err = unpopulate(val, "Outputs", &c.Outputs) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "source": - err = unpopulate(val, "Source", &c.Source) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &c.StartTime) - delete(rawMsg, key) - case "testConfigurations": - err = unpopulate(val, "TestConfigurations", &c.TestConfigurations) - delete(rawMsg, key) - case "testGroups": - err = unpopulate(val, "TestGroups", &c.TestGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorSource. -func (c ConnectionMonitorSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "port", c.Port) - populate(objectMap, "resourceId", c.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorSource. -func (c *ConnectionMonitorSource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "port": - err = unpopulate(val, "Port", &c.Port) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorSuccessThreshold. -func (c ConnectionMonitorSuccessThreshold) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "checksFailedPercent", c.ChecksFailedPercent) - populate(objectMap, "roundTripTimeMs", c.RoundTripTimeMs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorSuccessThreshold. -func (c *ConnectionMonitorSuccessThreshold) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "checksFailedPercent": - err = unpopulate(val, "ChecksFailedPercent", &c.ChecksFailedPercent) - delete(rawMsg, key) - case "roundTripTimeMs": - err = unpopulate(val, "RoundTripTimeMs", &c.RoundTripTimeMs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTCPConfiguration. -func (c ConnectionMonitorTCPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationPortBehavior", c.DestinationPortBehavior) - populate(objectMap, "disableTraceRoute", c.DisableTraceRoute) - populate(objectMap, "port", c.Port) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorTCPConfiguration. -func (c *ConnectionMonitorTCPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinationPortBehavior": - err = unpopulate(val, "DestinationPortBehavior", &c.DestinationPortBehavior) - delete(rawMsg, key) - case "disableTraceRoute": - err = unpopulate(val, "DisableTraceRoute", &c.DisableTraceRoute) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &c.Port) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTestConfiguration. -func (c ConnectionMonitorTestConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "httpConfiguration", c.HTTPConfiguration) - populate(objectMap, "icmpConfiguration", c.IcmpConfiguration) - populate(objectMap, "name", c.Name) - populate(objectMap, "preferredIPVersion", c.PreferredIPVersion) - populate(objectMap, "protocol", c.Protocol) - populate(objectMap, "successThreshold", c.SuccessThreshold) - populate(objectMap, "tcpConfiguration", c.TCPConfiguration) - populate(objectMap, "testFrequencySec", c.TestFrequencySec) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorTestConfiguration. -func (c *ConnectionMonitorTestConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "httpConfiguration": - err = unpopulate(val, "HTTPConfiguration", &c.HTTPConfiguration) - delete(rawMsg, key) - case "icmpConfiguration": - err = unpopulate(val, "IcmpConfiguration", &c.IcmpConfiguration) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "preferredIPVersion": - err = unpopulate(val, "PreferredIPVersion", &c.PreferredIPVersion) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &c.Protocol) - delete(rawMsg, key) - case "successThreshold": - err = unpopulate(val, "SuccessThreshold", &c.SuccessThreshold) - delete(rawMsg, key) - case "tcpConfiguration": - err = unpopulate(val, "TCPConfiguration", &c.TCPConfiguration) - delete(rawMsg, key) - case "testFrequencySec": - err = unpopulate(val, "TestFrequencySec", &c.TestFrequencySec) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTestGroup. -func (c ConnectionMonitorTestGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinations", c.Destinations) - populate(objectMap, "disable", c.Disable) - populate(objectMap, "name", c.Name) - populate(objectMap, "sources", c.Sources) - populate(objectMap, "testConfigurations", c.TestConfigurations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorTestGroup. -func (c *ConnectionMonitorTestGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinations": - err = unpopulate(val, "Destinations", &c.Destinations) - delete(rawMsg, key) - case "disable": - err = unpopulate(val, "Disable", &c.Disable) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "sources": - err = unpopulate(val, "Sources", &c.Sources) - delete(rawMsg, key) - case "testConfigurations": - err = unpopulate(val, "TestConfigurations", &c.TestConfigurations) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorWorkspaceSettings. -func (c ConnectionMonitorWorkspaceSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "workspaceResourceId", c.WorkspaceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorWorkspaceSettings. -func (c *ConnectionMonitorWorkspaceSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "workspaceResourceId": - err = unpopulate(val, "WorkspaceResourceID", &c.WorkspaceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionResetSharedKey. -func (c ConnectionResetSharedKey) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "keyLength", c.KeyLength) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionResetSharedKey. -func (c *ConnectionResetSharedKey) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "keyLength": - err = unpopulate(val, "KeyLength", &c.KeyLength) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionSharedKey. -func (c ConnectionSharedKey) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionSharedKey. -func (c *ConnectionSharedKey) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectionStateSnapshot. -func (c ConnectionStateSnapshot) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) - populate(objectMap, "connectionState", c.ConnectionState) - populateTimeRFC3339(objectMap, "endTime", c.EndTime) - populate(objectMap, "evaluationState", c.EvaluationState) - populate(objectMap, "hops", c.Hops) - populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) - populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) - populate(objectMap, "probesFailed", c.ProbesFailed) - populate(objectMap, "probesSent", c.ProbesSent) - populateTimeRFC3339(objectMap, "startTime", c.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionStateSnapshot. -func (c *ConnectionStateSnapshot) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "avgLatencyInMs": - err = unpopulate(val, "AvgLatencyInMs", &c.AvgLatencyInMs) - delete(rawMsg, key) - case "connectionState": - err = unpopulate(val, "ConnectionState", &c.ConnectionState) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &c.EndTime) - delete(rawMsg, key) - case "evaluationState": - err = unpopulate(val, "EvaluationState", &c.EvaluationState) - delete(rawMsg, key) - case "hops": - err = unpopulate(val, "Hops", &c.Hops) - delete(rawMsg, key) - case "maxLatencyInMs": - err = unpopulate(val, "MaxLatencyInMs", &c.MaxLatencyInMs) - delete(rawMsg, key) - case "minLatencyInMs": - err = unpopulate(val, "MinLatencyInMs", &c.MinLatencyInMs) - delete(rawMsg, key) - case "probesFailed": - err = unpopulate(val, "ProbesFailed", &c.ProbesFailed) - delete(rawMsg, key) - case "probesSent": - err = unpopulate(val, "ProbesSent", &c.ProbesSent) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &c.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityConfiguration. -func (c ConnectivityConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityConfiguration. -func (c *ConnectivityConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &c.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityConfigurationListResult. -func (c ConnectivityConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityConfigurationListResult. -func (c *ConnectivityConfigurationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityConfigurationProperties. -func (c ConnectivityConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appliesToGroups", c.AppliesToGroups) - populate(objectMap, "connectivityTopology", c.ConnectivityTopology) - populate(objectMap, "deleteExistingPeering", c.DeleteExistingPeering) - populate(objectMap, "description", c.Description) - populate(objectMap, "hubs", c.Hubs) - populate(objectMap, "isGlobal", c.IsGlobal) - populate(objectMap, "provisioningState", c.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityConfigurationProperties. -func (c *ConnectivityConfigurationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appliesToGroups": - err = unpopulate(val, "AppliesToGroups", &c.AppliesToGroups) - delete(rawMsg, key) - case "connectivityTopology": - err = unpopulate(val, "ConnectivityTopology", &c.ConnectivityTopology) - delete(rawMsg, key) - case "deleteExistingPeering": - err = unpopulate(val, "DeleteExistingPeering", &c.DeleteExistingPeering) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "hubs": - err = unpopulate(val, "Hubs", &c.Hubs) - delete(rawMsg, key) - case "isGlobal": - err = unpopulate(val, "IsGlobal", &c.IsGlobal) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityDestination. -func (c ConnectivityDestination) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", c.Address) - populate(objectMap, "port", c.Port) - populate(objectMap, "resourceId", c.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityDestination. -func (c *ConnectivityDestination) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &c.Address) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &c.Port) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityGroupItem. -func (c ConnectivityGroupItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupConnectivity", c.GroupConnectivity) - populate(objectMap, "isGlobal", c.IsGlobal) - populate(objectMap, "networkGroupId", c.NetworkGroupID) - populate(objectMap, "useHubGateway", c.UseHubGateway) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityGroupItem. -func (c *ConnectivityGroupItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupConnectivity": - err = unpopulate(val, "GroupConnectivity", &c.GroupConnectivity) - delete(rawMsg, key) - case "isGlobal": - err = unpopulate(val, "IsGlobal", &c.IsGlobal) - delete(rawMsg, key) - case "networkGroupId": - err = unpopulate(val, "NetworkGroupID", &c.NetworkGroupID) - delete(rawMsg, key) - case "useHubGateway": - err = unpopulate(val, "UseHubGateway", &c.UseHubGateway) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityHop. -func (c ConnectivityHop) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", c.Address) - populate(objectMap, "id", c.ID) - populate(objectMap, "issues", c.Issues) - populate(objectMap, "links", c.Links) - populate(objectMap, "nextHopIds", c.NextHopIDs) - populate(objectMap, "previousHopIds", c.PreviousHopIDs) - populate(objectMap, "previousLinks", c.PreviousLinks) - populate(objectMap, "resourceId", c.ResourceID) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityHop. -func (c *ConnectivityHop) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &c.Address) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "issues": - err = unpopulate(val, "Issues", &c.Issues) - delete(rawMsg, key) - case "links": - err = unpopulate(val, "Links", &c.Links) - delete(rawMsg, key) - case "nextHopIds": - err = unpopulate(val, "NextHopIDs", &c.NextHopIDs) - delete(rawMsg, key) - case "previousHopIds": - err = unpopulate(val, "PreviousHopIDs", &c.PreviousHopIDs) - delete(rawMsg, key) - case "previousLinks": - err = unpopulate(val, "PreviousLinks", &c.PreviousLinks) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityInformation. -func (c ConnectivityInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) - populate(objectMap, "connectionStatus", c.ConnectionStatus) - populate(objectMap, "hops", c.Hops) - populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) - populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) - populate(objectMap, "probesFailed", c.ProbesFailed) - populate(objectMap, "probesSent", c.ProbesSent) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityInformation. -func (c *ConnectivityInformation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "avgLatencyInMs": - err = unpopulate(val, "AvgLatencyInMs", &c.AvgLatencyInMs) - delete(rawMsg, key) - case "connectionStatus": - err = unpopulate(val, "ConnectionStatus", &c.ConnectionStatus) - delete(rawMsg, key) - case "hops": - err = unpopulate(val, "Hops", &c.Hops) - delete(rawMsg, key) - case "maxLatencyInMs": - err = unpopulate(val, "MaxLatencyInMs", &c.MaxLatencyInMs) - delete(rawMsg, key) - case "minLatencyInMs": - err = unpopulate(val, "MinLatencyInMs", &c.MinLatencyInMs) - delete(rawMsg, key) - case "probesFailed": - err = unpopulate(val, "ProbesFailed", &c.ProbesFailed) - delete(rawMsg, key) - case "probesSent": - err = unpopulate(val, "ProbesSent", &c.ProbesSent) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityIssue. -func (c ConnectivityIssue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "context", c.Context) - populate(objectMap, "origin", c.Origin) - populate(objectMap, "severity", c.Severity) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityIssue. -func (c *ConnectivityIssue) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "context": - err = unpopulate(val, "Context", &c.Context) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &c.Origin) - delete(rawMsg, key) - case "severity": - err = unpopulate(val, "Severity", &c.Severity) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivityParameters. -func (c ConnectivityParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destination", c.Destination) - populate(objectMap, "preferredIPVersion", c.PreferredIPVersion) - populate(objectMap, "protocol", c.Protocol) - populate(objectMap, "protocolConfiguration", c.ProtocolConfiguration) - populate(objectMap, "source", c.Source) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityParameters. -func (c *ConnectivityParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destination": - err = unpopulate(val, "Destination", &c.Destination) - delete(rawMsg, key) - case "preferredIPVersion": - err = unpopulate(val, "PreferredIPVersion", &c.PreferredIPVersion) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &c.Protocol) - delete(rawMsg, key) - case "protocolConfiguration": - err = unpopulate(val, "ProtocolConfiguration", &c.ProtocolConfiguration) - delete(rawMsg, key) - case "source": - err = unpopulate(val, "Source", &c.Source) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConnectivitySource. -func (c ConnectivitySource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "port", c.Port) - populate(objectMap, "resourceId", c.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivitySource. -func (c *ConnectivitySource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "port": - err = unpopulate(val, "Port", &c.Port) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Container. -func (c Container) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Container. -func (c *Container) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterface. -func (c ContainerNetworkInterface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterface. -func (c *ContainerNetworkInterface) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &c.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceConfiguration. -func (c ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "id", c.ID) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfaceConfiguration. -func (c *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &c.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceConfigurationPropertiesFormat. -func (c ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerNetworkInterfaces", c.ContainerNetworkInterfaces) - populate(objectMap, "ipConfigurations", c.IPConfigurations) - populate(objectMap, "provisioningState", c.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfaceConfigurationPropertiesFormat. -func (c *ContainerNetworkInterfaceConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containerNetworkInterfaces": - err = unpopulate(val, "ContainerNetworkInterfaces", &c.ContainerNetworkInterfaces) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &c.IPConfigurations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceIPConfiguration. -func (c ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfaceIPConfiguration. -func (c *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &c.Etag) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceIPConfigurationPropertiesFormat. -func (c ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", c.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfaceIPConfigurationPropertiesFormat. -func (c *ContainerNetworkInterfaceIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfacePropertiesFormat. -func (c ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "container", c.Container) - populate(objectMap, "containerNetworkInterfaceConfiguration", c.ContainerNetworkInterfaceConfiguration) - populate(objectMap, "ipConfigurations", c.IPConfigurations) - populate(objectMap, "provisioningState", c.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfacePropertiesFormat. -func (c *ContainerNetworkInterfacePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "container": - err = unpopulate(val, "Container", &c.Container) - delete(rawMsg, key) - case "containerNetworkInterfaceConfiguration": - err = unpopulate(val, "ContainerNetworkInterfaceConfiguration", &c.ContainerNetworkInterfaceConfiguration) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &c.IPConfigurations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CrossTenantScopes. -func (c CrossTenantScopes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "managementGroups", c.ManagementGroups) - populate(objectMap, "subscriptions", c.Subscriptions) - populate(objectMap, "tenantId", c.TenantID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CrossTenantScopes. -func (c *CrossTenantScopes) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "managementGroups": - err = unpopulate(val, "ManagementGroups", &c.ManagementGroups) - delete(rawMsg, key) - case "subscriptions": - err = unpopulate(val, "Subscriptions", &c.Subscriptions) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &c.TenantID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomDNSConfigPropertiesFormat. -func (c CustomDNSConfigPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fqdn", c.Fqdn) - populate(objectMap, "ipAddresses", c.IPAddresses) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDNSConfigPropertiesFormat. -func (c *CustomDNSConfigPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fqdn": - err = unpopulate(val, "Fqdn", &c.Fqdn) - delete(rawMsg, key) - case "ipAddresses": - err = unpopulate(val, "IPAddresses", &c.IPAddresses) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefix. -func (c CustomIPPrefix) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "extendedLocation", c.ExtendedLocation) - populate(objectMap, "id", c.ID) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - populate(objectMap, "zones", c.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomIPPrefix. -func (c *CustomIPPrefix) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &c.Etag) - delete(rawMsg, key) - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &c.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &c.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefixListResult. -func (c CustomIPPrefixListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomIPPrefixListResult. -func (c *CustomIPPrefixListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &c.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &c.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefixPropertiesFormat. -func (c CustomIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorizationMessage", c.AuthorizationMessage) - populate(objectMap, "childCustomIpPrefixes", c.ChildCustomIPPrefixes) - populate(objectMap, "cidr", c.Cidr) - populate(objectMap, "commissionedState", c.CommissionedState) - populate(objectMap, "customIpPrefixParent", c.CustomIPPrefixParent) - populate(objectMap, "failedReason", c.FailedReason) - populate(objectMap, "noInternetAdvertise", c.NoInternetAdvertise) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "publicIpPrefixes", c.PublicIPPrefixes) - populate(objectMap, "resourceGuid", c.ResourceGUID) - populate(objectMap, "signedMessage", c.SignedMessage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomIPPrefixPropertiesFormat. -func (c *CustomIPPrefixPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationMessage": - err = unpopulate(val, "AuthorizationMessage", &c.AuthorizationMessage) - delete(rawMsg, key) - case "childCustomIpPrefixes": - err = unpopulate(val, "ChildCustomIPPrefixes", &c.ChildCustomIPPrefixes) - delete(rawMsg, key) - case "cidr": - err = unpopulate(val, "Cidr", &c.Cidr) - delete(rawMsg, key) - case "commissionedState": - err = unpopulate(val, "CommissionedState", &c.CommissionedState) - delete(rawMsg, key) - case "customIpPrefixParent": - err = unpopulate(val, "CustomIPPrefixParent", &c.CustomIPPrefixParent) - delete(rawMsg, key) - case "failedReason": - err = unpopulate(val, "FailedReason", &c.FailedReason) - delete(rawMsg, key) - case "noInternetAdvertise": - err = unpopulate(val, "NoInternetAdvertise", &c.NoInternetAdvertise) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "publicIpPrefixes": - err = unpopulate(val, "PublicIPPrefixes", &c.PublicIPPrefixes) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &c.ResourceGUID) - delete(rawMsg, key) - case "signedMessage": - err = unpopulate(val, "SignedMessage", &c.SignedMessage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DNSNameAvailabilityResult. -func (d DNSNameAvailabilityResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "available", d.Available) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DNSNameAvailabilityResult. -func (d *DNSNameAvailabilityResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "available": - err = unpopulate(val, "Available", &d.Available) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DNSSettings. -func (d DNSSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enableProxy", d.EnableProxy) - populate(objectMap, "requireProxyForNetworkRules", d.RequireProxyForNetworkRules) - populate(objectMap, "servers", d.Servers) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DNSSettings. -func (d *DNSSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enableProxy": - err = unpopulate(val, "EnableProxy", &d.EnableProxy) - delete(rawMsg, key) - case "requireProxyForNetworkRules": - err = unpopulate(val, "RequireProxyForNetworkRules", &d.RequireProxyForNetworkRules) - delete(rawMsg, key) - case "servers": - err = unpopulate(val, "Servers", &d.Servers) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DdosCustomPolicy. -func (d DdosCustomPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DdosCustomPolicy. -func (d *DdosCustomPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &d.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &d.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DdosCustomPolicyPropertiesFormat. -func (d DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "protocolCustomSettings", d.ProtocolCustomSettings) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "publicIPAddresses", d.PublicIPAddresses) - populate(objectMap, "resourceGuid", d.ResourceGUID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DdosCustomPolicyPropertiesFormat. -func (d *DdosCustomPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "protocolCustomSettings": - err = unpopulate(val, "ProtocolCustomSettings", &d.ProtocolCustomSettings) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddresses": - err = unpopulate(val, "PublicIPAddresses", &d.PublicIPAddresses) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &d.ResourceGUID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlan. -func (d DdosProtectionPlan) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DdosProtectionPlan. -func (d *DdosProtectionPlan) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &d.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &d.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlanListResult. -func (d DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DdosProtectionPlanListResult. -func (d *DdosProtectionPlanListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlanPropertiesFormat. -func (d DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "resourceGuid", d.ResourceGUID) - populate(objectMap, "virtualNetworks", d.VirtualNetworks) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DdosProtectionPlanPropertiesFormat. -func (d *DdosProtectionPlanPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &d.ResourceGUID) - delete(rawMsg, key) - case "virtualNetworks": - err = unpopulate(val, "VirtualNetworks", &d.VirtualNetworks) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DdosSettings. -func (d DdosSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ddosCustomPolicy", d.DdosCustomPolicy) - populate(objectMap, "protectedIP", d.ProtectedIP) - populate(objectMap, "protectionCoverage", d.ProtectionCoverage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DdosSettings. -func (d *DdosSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ddosCustomPolicy": - err = unpopulate(val, "DdosCustomPolicy", &d.DdosCustomPolicy) - delete(rawMsg, key) - case "protectedIP": - err = unpopulate(val, "ProtectedIP", &d.ProtectedIP) - delete(rawMsg, key) - case "protectionCoverage": - err = unpopulate(val, "ProtectionCoverage", &d.ProtectionCoverage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DefaultAdminPropertiesFormat. -func (d DefaultAdminPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "access", d.Access) - populate(objectMap, "description", d.Description) - populate(objectMap, "destinationPortRanges", d.DestinationPortRanges) - populate(objectMap, "destinations", d.Destinations) - populate(objectMap, "direction", d.Direction) - populate(objectMap, "flag", d.Flag) - populate(objectMap, "priority", d.Priority) - populate(objectMap, "protocol", d.Protocol) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "sourcePortRanges", d.SourcePortRanges) - populate(objectMap, "sources", d.Sources) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultAdminPropertiesFormat. -func (d *DefaultAdminPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "access": - err = unpopulate(val, "Access", &d.Access) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &d.Description) - delete(rawMsg, key) - case "destinationPortRanges": - err = unpopulate(val, "DestinationPortRanges", &d.DestinationPortRanges) - delete(rawMsg, key) - case "destinations": - err = unpopulate(val, "Destinations", &d.Destinations) - delete(rawMsg, key) - case "direction": - err = unpopulate(val, "Direction", &d.Direction) - delete(rawMsg, key) - case "flag": - err = unpopulate(val, "Flag", &d.Flag) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &d.Priority) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &d.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "sourcePortRanges": - err = unpopulate(val, "SourcePortRanges", &d.SourcePortRanges) - delete(rawMsg, key) - case "sources": - err = unpopulate(val, "Sources", &d.Sources) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DefaultAdminRule. -func (d DefaultAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - objectMap["kind"] = AdminRuleKindDefault - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultAdminRule. -func (d *DefaultAdminRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &d.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &d.Kind) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Delegation. -func (d Delegation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Delegation. -func (d *Delegation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &d.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeviceProperties. -func (d DeviceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "deviceModel", d.DeviceModel) - populate(objectMap, "deviceVendor", d.DeviceVendor) - populate(objectMap, "linkSpeedInMbps", d.LinkSpeedInMbps) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceProperties. -func (d *DeviceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deviceModel": - err = unpopulate(val, "DeviceModel", &d.DeviceModel) - delete(rawMsg, key) - case "deviceVendor": - err = unpopulate(val, "DeviceVendor", &d.DeviceVendor) - delete(rawMsg, key) - case "linkSpeedInMbps": - err = unpopulate(val, "LinkSpeedInMbps", &d.LinkSpeedInMbps) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DhcpOptions. -func (d DhcpOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dnsServers", d.DNSServers) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DhcpOptions. -func (d *DhcpOptions) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dnsServers": - err = unpopulate(val, "DNSServers", &d.DNSServers) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Dimension. -func (d Dimension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "displayName", d.DisplayName) - populate(objectMap, "internalName", d.InternalName) - populate(objectMap, "name", d.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Dimension. -func (d *Dimension) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "displayName": - err = unpopulate(val, "DisplayName", &d.DisplayName) - delete(rawMsg, key) - case "internalName": - err = unpopulate(val, "InternalName", &d.InternalName) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DscpConfiguration. -func (d DscpConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DscpConfiguration. -func (d *DscpConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &d.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &d.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DscpConfigurationListResult. -func (d DscpConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DscpConfigurationListResult. -func (d *DscpConfigurationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &d.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DscpConfigurationPropertiesFormat. -func (d DscpConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "associatedNetworkInterfaces", d.AssociatedNetworkInterfaces) - populate(objectMap, "destinationIpRanges", d.DestinationIPRanges) - populate(objectMap, "destinationPortRanges", d.DestinationPortRanges) - populate(objectMap, "markings", d.Markings) - populate(objectMap, "protocol", d.Protocol) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "qosCollectionId", d.QosCollectionID) - populate(objectMap, "qosDefinitionCollection", d.QosDefinitionCollection) - populate(objectMap, "resourceGuid", d.ResourceGUID) - populate(objectMap, "sourceIpRanges", d.SourceIPRanges) - populate(objectMap, "sourcePortRanges", d.SourcePortRanges) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DscpConfigurationPropertiesFormat. -func (d *DscpConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "associatedNetworkInterfaces": - err = unpopulate(val, "AssociatedNetworkInterfaces", &d.AssociatedNetworkInterfaces) - delete(rawMsg, key) - case "destinationIpRanges": - err = unpopulate(val, "DestinationIPRanges", &d.DestinationIPRanges) - delete(rawMsg, key) - case "destinationPortRanges": - err = unpopulate(val, "DestinationPortRanges", &d.DestinationPortRanges) - delete(rawMsg, key) - case "markings": - err = unpopulate(val, "Markings", &d.Markings) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &d.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "qosCollectionId": - err = unpopulate(val, "QosCollectionID", &d.QosCollectionID) - delete(rawMsg, key) - case "qosDefinitionCollection": - err = unpopulate(val, "QosDefinitionCollection", &d.QosDefinitionCollection) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &d.ResourceGUID) - delete(rawMsg, key) - case "sourceIpRanges": - err = unpopulate(val, "SourceIPRanges", &d.SourceIPRanges) - delete(rawMsg, key) - case "sourcePortRanges": - err = unpopulate(val, "SourcePortRanges", &d.SourcePortRanges) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveBaseSecurityAdminRule. -func (e EffectiveBaseSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "configurationDescription", e.ConfigurationDescription) - populate(objectMap, "id", e.ID) - objectMap["kind"] = e.Kind - populate(objectMap, "ruleCollectionAppliesToGroups", e.RuleCollectionAppliesToGroups) - populate(objectMap, "ruleCollectionDescription", e.RuleCollectionDescription) - populate(objectMap, "ruleGroups", e.RuleGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveBaseSecurityAdminRule. -func (e *EffectiveBaseSecurityAdminRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "configurationDescription": - err = unpopulate(val, "ConfigurationDescription", &e.ConfigurationDescription) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &e.Kind) - delete(rawMsg, key) - case "ruleCollectionAppliesToGroups": - err = unpopulate(val, "RuleCollectionAppliesToGroups", &e.RuleCollectionAppliesToGroups) - delete(rawMsg, key) - case "ruleCollectionDescription": - err = unpopulate(val, "RuleCollectionDescription", &e.RuleCollectionDescription) - delete(rawMsg, key) - case "ruleGroups": - err = unpopulate(val, "RuleGroups", &e.RuleGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveConnectivityConfiguration. -func (e EffectiveConnectivityConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "configurationGroups", e.ConfigurationGroups) - populate(objectMap, "id", e.ID) - populate(objectMap, "properties", e.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveConnectivityConfiguration. -func (e *EffectiveConnectivityConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "configurationGroups": - err = unpopulate(val, "ConfigurationGroups", &e.ConfigurationGroups) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveDefaultSecurityAdminRule. -func (e EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "configurationDescription", e.ConfigurationDescription) - populate(objectMap, "id", e.ID) - objectMap["kind"] = EffectiveAdminRuleKindDefault - populate(objectMap, "properties", e.Properties) - populate(objectMap, "ruleCollectionAppliesToGroups", e.RuleCollectionAppliesToGroups) - populate(objectMap, "ruleCollectionDescription", e.RuleCollectionDescription) - populate(objectMap, "ruleGroups", e.RuleGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveDefaultSecurityAdminRule. -func (e *EffectiveDefaultSecurityAdminRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "configurationDescription": - err = unpopulate(val, "ConfigurationDescription", &e.ConfigurationDescription) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &e.Kind) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "ruleCollectionAppliesToGroups": - err = unpopulate(val, "RuleCollectionAppliesToGroups", &e.RuleCollectionAppliesToGroups) - delete(rawMsg, key) - case "ruleCollectionDescription": - err = unpopulate(val, "RuleCollectionDescription", &e.RuleCollectionDescription) - delete(rawMsg, key) - case "ruleGroups": - err = unpopulate(val, "RuleGroups", &e.RuleGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroup. -func (e EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "association", e.Association) - populate(objectMap, "effectiveSecurityRules", e.EffectiveSecurityRules) - populate(objectMap, "networkSecurityGroup", e.NetworkSecurityGroup) - populate(objectMap, "tagMap", e.TagMap) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveNetworkSecurityGroup. -func (e *EffectiveNetworkSecurityGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "association": - err = unpopulate(val, "Association", &e.Association) - delete(rawMsg, key) - case "effectiveSecurityRules": - err = unpopulate(val, "EffectiveSecurityRules", &e.EffectiveSecurityRules) - delete(rawMsg, key) - case "networkSecurityGroup": - err = unpopulate(val, "NetworkSecurityGroup", &e.NetworkSecurityGroup) - delete(rawMsg, key) - case "tagMap": - err = unpopulate(val, "TagMap", &e.TagMap) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroupAssociation. -func (e EffectiveNetworkSecurityGroupAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "networkInterface", e.NetworkInterface) - populate(objectMap, "networkManager", e.NetworkManager) - populate(objectMap, "subnet", e.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveNetworkSecurityGroupAssociation. -func (e *EffectiveNetworkSecurityGroupAssociation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "networkInterface": - err = unpopulate(val, "NetworkInterface", &e.NetworkInterface) - delete(rawMsg, key) - case "networkManager": - err = unpopulate(val, "NetworkManager", &e.NetworkManager) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &e.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroupListResult. -func (e EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveNetworkSecurityGroupListResult. -func (e *EffectiveNetworkSecurityGroupListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityRule. -func (e EffectiveNetworkSecurityRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "access", e.Access) - populate(objectMap, "destinationAddressPrefix", e.DestinationAddressPrefix) - populate(objectMap, "destinationAddressPrefixes", e.DestinationAddressPrefixes) - populate(objectMap, "destinationPortRange", e.DestinationPortRange) - populate(objectMap, "destinationPortRanges", e.DestinationPortRanges) - populate(objectMap, "direction", e.Direction) - populate(objectMap, "expandedDestinationAddressPrefix", e.ExpandedDestinationAddressPrefix) - populate(objectMap, "expandedSourceAddressPrefix", e.ExpandedSourceAddressPrefix) - populate(objectMap, "name", e.Name) - populate(objectMap, "priority", e.Priority) - populate(objectMap, "protocol", e.Protocol) - populate(objectMap, "sourceAddressPrefix", e.SourceAddressPrefix) - populate(objectMap, "sourceAddressPrefixes", e.SourceAddressPrefixes) - populate(objectMap, "sourcePortRange", e.SourcePortRange) - populate(objectMap, "sourcePortRanges", e.SourcePortRanges) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveNetworkSecurityRule. -func (e *EffectiveNetworkSecurityRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "access": - err = unpopulate(val, "Access", &e.Access) - delete(rawMsg, key) - case "destinationAddressPrefix": - err = unpopulate(val, "DestinationAddressPrefix", &e.DestinationAddressPrefix) - delete(rawMsg, key) - case "destinationAddressPrefixes": - err = unpopulate(val, "DestinationAddressPrefixes", &e.DestinationAddressPrefixes) - delete(rawMsg, key) - case "destinationPortRange": - err = unpopulate(val, "DestinationPortRange", &e.DestinationPortRange) - delete(rawMsg, key) - case "destinationPortRanges": - err = unpopulate(val, "DestinationPortRanges", &e.DestinationPortRanges) - delete(rawMsg, key) - case "direction": - err = unpopulate(val, "Direction", &e.Direction) - delete(rawMsg, key) - case "expandedDestinationAddressPrefix": - err = unpopulate(val, "ExpandedDestinationAddressPrefix", &e.ExpandedDestinationAddressPrefix) - delete(rawMsg, key) - case "expandedSourceAddressPrefix": - err = unpopulate(val, "ExpandedSourceAddressPrefix", &e.ExpandedSourceAddressPrefix) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &e.Priority) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &e.Protocol) - delete(rawMsg, key) - case "sourceAddressPrefix": - err = unpopulate(val, "SourceAddressPrefix", &e.SourceAddressPrefix) - delete(rawMsg, key) - case "sourceAddressPrefixes": - err = unpopulate(val, "SourceAddressPrefixes", &e.SourceAddressPrefixes) - delete(rawMsg, key) - case "sourcePortRange": - err = unpopulate(val, "SourcePortRange", &e.SourcePortRange) - delete(rawMsg, key) - case "sourcePortRanges": - err = unpopulate(val, "SourcePortRanges", &e.SourcePortRanges) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveRoute. -func (e EffectiveRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", e.AddressPrefix) - populate(objectMap, "disableBgpRoutePropagation", e.DisableBgpRoutePropagation) - populate(objectMap, "name", e.Name) - populate(objectMap, "nextHopIpAddress", e.NextHopIPAddress) - populate(objectMap, "nextHopType", e.NextHopType) - populate(objectMap, "source", e.Source) - populate(objectMap, "state", e.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveRoute. -func (e *EffectiveRoute) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefix": - err = unpopulate(val, "AddressPrefix", &e.AddressPrefix) - delete(rawMsg, key) - case "disableBgpRoutePropagation": - err = unpopulate(val, "DisableBgpRoutePropagation", &e.DisableBgpRoutePropagation) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "nextHopIpAddress": - err = unpopulate(val, "NextHopIPAddress", &e.NextHopIPAddress) - delete(rawMsg, key) - case "nextHopType": - err = unpopulate(val, "NextHopType", &e.NextHopType) - delete(rawMsg, key) - case "source": - err = unpopulate(val, "Source", &e.Source) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &e.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveRouteListResult. -func (e EffectiveRouteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveRouteListResult. -func (e *EffectiveRouteListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveRoutesParameters. -func (e EffectiveRoutesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "resourceId", e.ResourceID) - populate(objectMap, "virtualWanResourceType", e.VirtualWanResourceType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveRoutesParameters. -func (e *EffectiveRoutesParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "resourceId": - err = unpopulate(val, "ResourceID", &e.ResourceID) - delete(rawMsg, key) - case "virtualWanResourceType": - err = unpopulate(val, "VirtualWanResourceType", &e.VirtualWanResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EffectiveSecurityAdminRule. -func (e EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "configurationDescription", e.ConfigurationDescription) - populate(objectMap, "id", e.ID) - objectMap["kind"] = EffectiveAdminRuleKindCustom - populate(objectMap, "properties", e.Properties) - populate(objectMap, "ruleCollectionAppliesToGroups", e.RuleCollectionAppliesToGroups) - populate(objectMap, "ruleCollectionDescription", e.RuleCollectionDescription) - populate(objectMap, "ruleGroups", e.RuleGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveSecurityAdminRule. -func (e *EffectiveSecurityAdminRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "configurationDescription": - err = unpopulate(val, "ConfigurationDescription", &e.ConfigurationDescription) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &e.Kind) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "ruleCollectionAppliesToGroups": - err = unpopulate(val, "RuleCollectionAppliesToGroups", &e.RuleCollectionAppliesToGroups) - delete(rawMsg, key) - case "ruleCollectionDescription": - err = unpopulate(val, "RuleCollectionDescription", &e.RuleCollectionDescription) - delete(rawMsg, key) - case "ruleGroups": - err = unpopulate(val, "RuleGroups", &e.RuleGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointServiceResult. -func (e EndpointServiceResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointServiceResult. -func (e *EndpointServiceResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointServicesListResult. -func (e EndpointServicesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointServicesListResult. -func (e *EndpointServicesListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Error. -func (e Error) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "innerError", e.InnerError) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Error. -func (e *Error) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &e.Details) - delete(rawMsg, key) - case "innerError": - err = unpopulate(val, "InnerError", &e.InnerError) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &e.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorDetails. -func (e ErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", e.Code) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetails. -func (e *ErrorDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &e.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. -func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "error", e.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. -func (e *ErrorResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &e.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EvaluatedNetworkSecurityGroup. -func (e EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appliedTo", e.AppliedTo) - populate(objectMap, "matchedRule", e.MatchedRule) - populate(objectMap, "networkSecurityGroupId", e.NetworkSecurityGroupID) - populate(objectMap, "rulesEvaluationResult", e.RulesEvaluationResult) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EvaluatedNetworkSecurityGroup. -func (e *EvaluatedNetworkSecurityGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appliedTo": - err = unpopulate(val, "AppliedTo", &e.AppliedTo) - delete(rawMsg, key) - case "matchedRule": - err = unpopulate(val, "MatchedRule", &e.MatchedRule) - delete(rawMsg, key) - case "networkSecurityGroupId": - err = unpopulate(val, "NetworkSecurityGroupID", &e.NetworkSecurityGroupID) - delete(rawMsg, key) - case "rulesEvaluationResult": - err = unpopulate(val, "RulesEvaluationResult", &e.RulesEvaluationResult) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRule. -func (e ExclusionManagedRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleId", e.RuleID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExclusionManagedRule. -func (e *ExclusionManagedRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ruleId": - err = unpopulate(val, "RuleID", &e.RuleID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRuleGroup. -func (e ExclusionManagedRuleGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleGroupName", e.RuleGroupName) - populate(objectMap, "rules", e.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExclusionManagedRuleGroup. -func (e *ExclusionManagedRuleGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ruleGroupName": - err = unpopulate(val, "RuleGroupName", &e.RuleGroupName) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &e.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRuleSet. -func (e ExclusionManagedRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleGroups", e.RuleGroups) - populate(objectMap, "ruleSetType", e.RuleSetType) - populate(objectMap, "ruleSetVersion", e.RuleSetVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExclusionManagedRuleSet. -func (e *ExclusionManagedRuleSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ruleGroups": - err = unpopulate(val, "RuleGroups", &e.RuleGroups) - delete(rawMsg, key) - case "ruleSetType": - err = unpopulate(val, "RuleSetType", &e.RuleSetType) - delete(rawMsg, key) - case "ruleSetVersion": - err = unpopulate(val, "RuleSetVersion", &e.RuleSetVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExplicitProxySettings. -func (e ExplicitProxySettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enableExplicitProxy", e.EnableExplicitProxy) - populate(objectMap, "enablePacFile", e.EnablePacFile) - populate(objectMap, "httpPort", e.HTTPPort) - populate(objectMap, "httpsPort", e.HTTPSPort) - populate(objectMap, "pacFile", e.PacFile) - populate(objectMap, "pacFilePort", e.PacFilePort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExplicitProxySettings. -func (e *ExplicitProxySettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enableExplicitProxy": - err = unpopulate(val, "EnableExplicitProxy", &e.EnableExplicitProxy) - delete(rawMsg, key) - case "enablePacFile": - err = unpopulate(val, "EnablePacFile", &e.EnablePacFile) - delete(rawMsg, key) - case "httpPort": - err = unpopulate(val, "HTTPPort", &e.HTTPPort) - delete(rawMsg, key) - case "httpsPort": - err = unpopulate(val, "HTTPSPort", &e.HTTPSPort) - delete(rawMsg, key) - case "pacFile": - err = unpopulate(val, "PacFile", &e.PacFile) - delete(rawMsg, key) - case "pacFilePort": - err = unpopulate(val, "PacFilePort", &e.PacFilePort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuit. -func (e ExpressRouteCircuit) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "sku", e.SKU) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuit. -func (e *ExpressRouteCircuit) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &e.SKU) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &e.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitArpTable. -func (e ExpressRouteCircuitArpTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "age", e.Age) - populate(objectMap, "ipAddress", e.IPAddress) - populate(objectMap, "interface", e.Interface) - populate(objectMap, "macAddress", e.MacAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitArpTable. -func (e *ExpressRouteCircuitArpTable) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "age": - err = unpopulate(val, "Age", &e.Age) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &e.IPAddress) - delete(rawMsg, key) - case "interface": - err = unpopulate(val, "Interface", &e.Interface) - delete(rawMsg, key) - case "macAddress": - err = unpopulate(val, "MacAddress", &e.MacAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitAuthorization. -func (e ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitAuthorization. -func (e *ExpressRouteCircuitAuthorization) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnection. -func (e ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitConnection. -func (e *ExpressRouteCircuitConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnectionListResult. -func (e ExpressRouteCircuitConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitConnectionListResult. -func (e *ExpressRouteCircuitConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnectionPropertiesFormat. -func (e ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", e.AddressPrefix) - populate(objectMap, "authorizationKey", e.AuthorizationKey) - populate(objectMap, "circuitConnectionStatus", e.CircuitConnectionStatus) - populate(objectMap, "expressRouteCircuitPeering", e.ExpressRouteCircuitPeering) - populate(objectMap, "ipv6CircuitConnectionConfig", e.IPv6CircuitConnectionConfig) - populate(objectMap, "peerExpressRouteCircuitPeering", e.PeerExpressRouteCircuitPeering) - populate(objectMap, "provisioningState", e.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitConnectionPropertiesFormat. -func (e *ExpressRouteCircuitConnectionPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefix": - err = unpopulate(val, "AddressPrefix", &e.AddressPrefix) - delete(rawMsg, key) - case "authorizationKey": - err = unpopulate(val, "AuthorizationKey", &e.AuthorizationKey) - delete(rawMsg, key) - case "circuitConnectionStatus": - err = unpopulate(val, "CircuitConnectionStatus", &e.CircuitConnectionStatus) - delete(rawMsg, key) - case "expressRouteCircuitPeering": - err = unpopulate(val, "ExpressRouteCircuitPeering", &e.ExpressRouteCircuitPeering) - delete(rawMsg, key) - case "ipv6CircuitConnectionConfig": - err = unpopulate(val, "IPv6CircuitConnectionConfig", &e.IPv6CircuitConnectionConfig) - delete(rawMsg, key) - case "peerExpressRouteCircuitPeering": - err = unpopulate(val, "PeerExpressRouteCircuitPeering", &e.PeerExpressRouteCircuitPeering) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitListResult. -func (e ExpressRouteCircuitListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitListResult. -func (e *ExpressRouteCircuitListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeering. -func (e ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPeering. -func (e *ExpressRouteCircuitPeering) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringConfig. -func (e ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "advertisedCommunities", e.AdvertisedCommunities) - populate(objectMap, "advertisedPublicPrefixes", e.AdvertisedPublicPrefixes) - populate(objectMap, "advertisedPublicPrefixesState", e.AdvertisedPublicPrefixesState) - populate(objectMap, "customerASN", e.CustomerASN) - populate(objectMap, "legacyMode", e.LegacyMode) - populate(objectMap, "routingRegistryName", e.RoutingRegistryName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPeeringConfig. -func (e *ExpressRouteCircuitPeeringConfig) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "advertisedCommunities": - err = unpopulate(val, "AdvertisedCommunities", &e.AdvertisedCommunities) - delete(rawMsg, key) - case "advertisedPublicPrefixes": - err = unpopulate(val, "AdvertisedPublicPrefixes", &e.AdvertisedPublicPrefixes) - delete(rawMsg, key) - case "advertisedPublicPrefixesState": - err = unpopulate(val, "AdvertisedPublicPrefixesState", &e.AdvertisedPublicPrefixesState) - delete(rawMsg, key) - case "customerASN": - err = unpopulate(val, "CustomerASN", &e.CustomerASN) - delete(rawMsg, key) - case "legacyMode": - err = unpopulate(val, "LegacyMode", &e.LegacyMode) - delete(rawMsg, key) - case "routingRegistryName": - err = unpopulate(val, "RoutingRegistryName", &e.RoutingRegistryName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringID. -func (e ExpressRouteCircuitPeeringID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPeeringID. -func (e *ExpressRouteCircuitPeeringID) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringListResult. -func (e ExpressRouteCircuitPeeringListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPeeringListResult. -func (e *ExpressRouteCircuitPeeringListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringPropertiesFormat. -func (e ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureASN", e.AzureASN) - populate(objectMap, "connections", e.Connections) - populate(objectMap, "expressRouteConnection", e.ExpressRouteConnection) - populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) - populate(objectMap, "ipv6PeeringConfig", e.IPv6PeeringConfig) - populate(objectMap, "lastModifiedBy", e.LastModifiedBy) - populate(objectMap, "microsoftPeeringConfig", e.MicrosoftPeeringConfig) - populate(objectMap, "peerASN", e.PeerASN) - populate(objectMap, "peeredConnections", e.PeeredConnections) - populate(objectMap, "peeringType", e.PeeringType) - populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) - populate(objectMap, "primaryPeerAddressPrefix", e.PrimaryPeerAddressPrefix) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "routeFilter", e.RouteFilter) - populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) - populate(objectMap, "secondaryPeerAddressPrefix", e.SecondaryPeerAddressPrefix) - populate(objectMap, "sharedKey", e.SharedKey) - populate(objectMap, "state", e.State) - populate(objectMap, "stats", e.Stats) - populate(objectMap, "vlanId", e.VlanID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPeeringPropertiesFormat. -func (e *ExpressRouteCircuitPeeringPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureASN": - err = unpopulate(val, "AzureASN", &e.AzureASN) - delete(rawMsg, key) - case "connections": - err = unpopulate(val, "Connections", &e.Connections) - delete(rawMsg, key) - case "expressRouteConnection": - err = unpopulate(val, "ExpressRouteConnection", &e.ExpressRouteConnection) - delete(rawMsg, key) - case "gatewayManagerEtag": - err = unpopulate(val, "GatewayManagerEtag", &e.GatewayManagerEtag) - delete(rawMsg, key) - case "ipv6PeeringConfig": - err = unpopulate(val, "IPv6PeeringConfig", &e.IPv6PeeringConfig) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &e.LastModifiedBy) - delete(rawMsg, key) - case "microsoftPeeringConfig": - err = unpopulate(val, "MicrosoftPeeringConfig", &e.MicrosoftPeeringConfig) - delete(rawMsg, key) - case "peerASN": - err = unpopulate(val, "PeerASN", &e.PeerASN) - delete(rawMsg, key) - case "peeredConnections": - err = unpopulate(val, "PeeredConnections", &e.PeeredConnections) - delete(rawMsg, key) - case "peeringType": - err = unpopulate(val, "PeeringType", &e.PeeringType) - delete(rawMsg, key) - case "primaryAzurePort": - err = unpopulate(val, "PrimaryAzurePort", &e.PrimaryAzurePort) - delete(rawMsg, key) - case "primaryPeerAddressPrefix": - err = unpopulate(val, "PrimaryPeerAddressPrefix", &e.PrimaryPeerAddressPrefix) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "routeFilter": - err = unpopulate(val, "RouteFilter", &e.RouteFilter) - delete(rawMsg, key) - case "secondaryAzurePort": - err = unpopulate(val, "SecondaryAzurePort", &e.SecondaryAzurePort) - delete(rawMsg, key) - case "secondaryPeerAddressPrefix": - err = unpopulate(val, "SecondaryPeerAddressPrefix", &e.SecondaryPeerAddressPrefix) - delete(rawMsg, key) - case "sharedKey": - err = unpopulate(val, "SharedKey", &e.SharedKey) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &e.State) - delete(rawMsg, key) - case "stats": - err = unpopulate(val, "Stats", &e.Stats) - delete(rawMsg, key) - case "vlanId": - err = unpopulate(val, "VlanID", &e.VlanID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPropertiesFormat. -func (e ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowClassicOperations", e.AllowClassicOperations) - populate(objectMap, "authorizationKey", e.AuthorizationKey) - populate(objectMap, "authorizations", e.Authorizations) - populate(objectMap, "bandwidthInGbps", e.BandwidthInGbps) - populate(objectMap, "circuitProvisioningState", e.CircuitProvisioningState) - populate(objectMap, "expressRoutePort", e.ExpressRoutePort) - populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) - populate(objectMap, "globalReachEnabled", e.GlobalReachEnabled) - populate(objectMap, "peerings", e.Peerings) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "serviceKey", e.ServiceKey) - populate(objectMap, "serviceProviderNotes", e.ServiceProviderNotes) - populate(objectMap, "serviceProviderProperties", e.ServiceProviderProperties) - populate(objectMap, "serviceProviderProvisioningState", e.ServiceProviderProvisioningState) - populate(objectMap, "stag", e.Stag) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPropertiesFormat. -func (e *ExpressRouteCircuitPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowClassicOperations": - err = unpopulate(val, "AllowClassicOperations", &e.AllowClassicOperations) - delete(rawMsg, key) - case "authorizationKey": - err = unpopulate(val, "AuthorizationKey", &e.AuthorizationKey) - delete(rawMsg, key) - case "authorizations": - err = unpopulate(val, "Authorizations", &e.Authorizations) - delete(rawMsg, key) - case "bandwidthInGbps": - err = unpopulate(val, "BandwidthInGbps", &e.BandwidthInGbps) - delete(rawMsg, key) - case "circuitProvisioningState": - err = unpopulate(val, "CircuitProvisioningState", &e.CircuitProvisioningState) - delete(rawMsg, key) - case "expressRoutePort": - err = unpopulate(val, "ExpressRoutePort", &e.ExpressRoutePort) - delete(rawMsg, key) - case "gatewayManagerEtag": - err = unpopulate(val, "GatewayManagerEtag", &e.GatewayManagerEtag) - delete(rawMsg, key) - case "globalReachEnabled": - err = unpopulate(val, "GlobalReachEnabled", &e.GlobalReachEnabled) - delete(rawMsg, key) - case "peerings": - err = unpopulate(val, "Peerings", &e.Peerings) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "serviceKey": - err = unpopulate(val, "ServiceKey", &e.ServiceKey) - delete(rawMsg, key) - case "serviceProviderNotes": - err = unpopulate(val, "ServiceProviderNotes", &e.ServiceProviderNotes) - delete(rawMsg, key) - case "serviceProviderProperties": - err = unpopulate(val, "ServiceProviderProperties", &e.ServiceProviderProperties) - delete(rawMsg, key) - case "serviceProviderProvisioningState": - err = unpopulate(val, "ServiceProviderProvisioningState", &e.ServiceProviderProvisioningState) - delete(rawMsg, key) - case "stag": - err = unpopulate(val, "Stag", &e.Stag) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitReference. -func (e ExpressRouteCircuitReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitReference. -func (e *ExpressRouteCircuitReference) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitRoutesTable. -func (e ExpressRouteCircuitRoutesTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "locPrf", e.LocPrf) - populate(objectMap, "network", e.Network) - populate(objectMap, "nextHop", e.NextHop) - populate(objectMap, "path", e.Path) - populate(objectMap, "weight", e.Weight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitRoutesTable. -func (e *ExpressRouteCircuitRoutesTable) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "locPrf": - err = unpopulate(val, "LocPrf", &e.LocPrf) - delete(rawMsg, key) - case "network": - err = unpopulate(val, "Network", &e.Network) - delete(rawMsg, key) - case "nextHop": - err = unpopulate(val, "NextHop", &e.NextHop) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &e.Path) - delete(rawMsg, key) - case "weight": - err = unpopulate(val, "Weight", &e.Weight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitRoutesTableSummary. -func (e ExpressRouteCircuitRoutesTableSummary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "as", e.As) - populate(objectMap, "neighbor", e.Neighbor) - populate(objectMap, "statePfxRcd", e.StatePfxRcd) - populate(objectMap, "upDown", e.UpDown) - populate(objectMap, "v", e.V) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitRoutesTableSummary. -func (e *ExpressRouteCircuitRoutesTableSummary) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "as": - err = unpopulate(val, "As", &e.As) - delete(rawMsg, key) - case "neighbor": - err = unpopulate(val, "Neighbor", &e.Neighbor) - delete(rawMsg, key) - case "statePfxRcd": - err = unpopulate(val, "StatePfxRcd", &e.StatePfxRcd) - delete(rawMsg, key) - case "upDown": - err = unpopulate(val, "UpDown", &e.UpDown) - delete(rawMsg, key) - case "v": - err = unpopulate(val, "V", &e.V) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitSKU. -func (e ExpressRouteCircuitSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "family", e.Family) - populate(objectMap, "name", e.Name) - populate(objectMap, "tier", e.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitSKU. -func (e *ExpressRouteCircuitSKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "family": - err = unpopulate(val, "Family", &e.Family) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &e.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitServiceProviderProperties. -func (e ExpressRouteCircuitServiceProviderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bandwidthInMbps", e.BandwidthInMbps) - populate(objectMap, "peeringLocation", e.PeeringLocation) - populate(objectMap, "serviceProviderName", e.ServiceProviderName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitServiceProviderProperties. -func (e *ExpressRouteCircuitServiceProviderProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bandwidthInMbps": - err = unpopulate(val, "BandwidthInMbps", &e.BandwidthInMbps) - delete(rawMsg, key) - case "peeringLocation": - err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) - delete(rawMsg, key) - case "serviceProviderName": - err = unpopulate(val, "ServiceProviderName", &e.ServiceProviderName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitStats. -func (e ExpressRouteCircuitStats) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "primarybytesIn", e.PrimarybytesIn) - populate(objectMap, "primarybytesOut", e.PrimarybytesOut) - populate(objectMap, "secondarybytesIn", e.SecondarybytesIn) - populate(objectMap, "secondarybytesOut", e.SecondarybytesOut) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitStats. -func (e *ExpressRouteCircuitStats) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "primarybytesIn": - err = unpopulate(val, "PrimarybytesIn", &e.PrimarybytesIn) - delete(rawMsg, key) - case "primarybytesOut": - err = unpopulate(val, "PrimarybytesOut", &e.PrimarybytesOut) - delete(rawMsg, key) - case "secondarybytesIn": - err = unpopulate(val, "SecondarybytesIn", &e.SecondarybytesIn) - delete(rawMsg, key) - case "secondarybytesOut": - err = unpopulate(val, "SecondarybytesOut", &e.SecondarybytesOut) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsArpTableListResult. -func (e ExpressRouteCircuitsArpTableListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitsArpTableListResult. -func (e *ExpressRouteCircuitsArpTableListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsRoutesTableListResult. -func (e ExpressRouteCircuitsRoutesTableListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitsRoutesTableListResult. -func (e *ExpressRouteCircuitsRoutesTableListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsRoutesTableSummaryListResult. -func (e ExpressRouteCircuitsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitsRoutesTableSummaryListResult. -func (e *ExpressRouteCircuitsRoutesTableSummaryListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnection. -func (e ExpressRouteConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteConnection. -func (e *ExpressRouteConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionID. -func (e ExpressRouteConnectionID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteConnectionID. -func (e *ExpressRouteConnectionID) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionList. -func (e ExpressRouteConnectionList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteConnectionList. -func (e *ExpressRouteConnectionList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionProperties. -func (e ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorizationKey", e.AuthorizationKey) - populate(objectMap, "enableInternetSecurity", e.EnableInternetSecurity) - populate(objectMap, "expressRouteCircuitPeering", e.ExpressRouteCircuitPeering) - populate(objectMap, "expressRouteGatewayBypass", e.ExpressRouteGatewayBypass) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "routingConfiguration", e.RoutingConfiguration) - populate(objectMap, "routingWeight", e.RoutingWeight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteConnectionProperties. -func (e *ExpressRouteConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationKey": - err = unpopulate(val, "AuthorizationKey", &e.AuthorizationKey) - delete(rawMsg, key) - case "enableInternetSecurity": - err = unpopulate(val, "EnableInternetSecurity", &e.EnableInternetSecurity) - delete(rawMsg, key) - case "expressRouteCircuitPeering": - err = unpopulate(val, "ExpressRouteCircuitPeering", &e.ExpressRouteCircuitPeering) - delete(rawMsg, key) - case "expressRouteGatewayBypass": - err = unpopulate(val, "ExpressRouteGatewayBypass", &e.ExpressRouteGatewayBypass) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "routingConfiguration": - err = unpopulate(val, "RoutingConfiguration", &e.RoutingConfiguration) - delete(rawMsg, key) - case "routingWeight": - err = unpopulate(val, "RoutingWeight", &e.RoutingWeight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnection. -func (e ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnection. -func (e *ExpressRouteCrossConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &e.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionListResult. -func (e ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionListResult. -func (e *ExpressRouteCrossConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeering. -func (e ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionPeering. -func (e *ExpressRouteCrossConnectionPeering) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeeringList. -func (e ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionPeeringList. -func (e *ExpressRouteCrossConnectionPeeringList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeeringProperties. -func (e ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureASN", e.AzureASN) - populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) - populate(objectMap, "ipv6PeeringConfig", e.IPv6PeeringConfig) - populate(objectMap, "lastModifiedBy", e.LastModifiedBy) - populate(objectMap, "microsoftPeeringConfig", e.MicrosoftPeeringConfig) - populate(objectMap, "peerASN", e.PeerASN) - populate(objectMap, "peeringType", e.PeeringType) - populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) - populate(objectMap, "primaryPeerAddressPrefix", e.PrimaryPeerAddressPrefix) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) - populate(objectMap, "secondaryPeerAddressPrefix", e.SecondaryPeerAddressPrefix) - populate(objectMap, "sharedKey", e.SharedKey) - populate(objectMap, "state", e.State) - populate(objectMap, "vlanId", e.VlanID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionPeeringProperties. -func (e *ExpressRouteCrossConnectionPeeringProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureASN": - err = unpopulate(val, "AzureASN", &e.AzureASN) - delete(rawMsg, key) - case "gatewayManagerEtag": - err = unpopulate(val, "GatewayManagerEtag", &e.GatewayManagerEtag) - delete(rawMsg, key) - case "ipv6PeeringConfig": - err = unpopulate(val, "IPv6PeeringConfig", &e.IPv6PeeringConfig) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &e.LastModifiedBy) - delete(rawMsg, key) - case "microsoftPeeringConfig": - err = unpopulate(val, "MicrosoftPeeringConfig", &e.MicrosoftPeeringConfig) - delete(rawMsg, key) - case "peerASN": - err = unpopulate(val, "PeerASN", &e.PeerASN) - delete(rawMsg, key) - case "peeringType": - err = unpopulate(val, "PeeringType", &e.PeeringType) - delete(rawMsg, key) - case "primaryAzurePort": - err = unpopulate(val, "PrimaryAzurePort", &e.PrimaryAzurePort) - delete(rawMsg, key) - case "primaryPeerAddressPrefix": - err = unpopulate(val, "PrimaryPeerAddressPrefix", &e.PrimaryPeerAddressPrefix) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "secondaryAzurePort": - err = unpopulate(val, "SecondaryAzurePort", &e.SecondaryAzurePort) - delete(rawMsg, key) - case "secondaryPeerAddressPrefix": - err = unpopulate(val, "SecondaryPeerAddressPrefix", &e.SecondaryPeerAddressPrefix) - delete(rawMsg, key) - case "sharedKey": - err = unpopulate(val, "SharedKey", &e.SharedKey) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &e.State) - delete(rawMsg, key) - case "vlanId": - err = unpopulate(val, "VlanID", &e.VlanID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionProperties. -func (e ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bandwidthInMbps", e.BandwidthInMbps) - populate(objectMap, "expressRouteCircuit", e.ExpressRouteCircuit) - populate(objectMap, "peeringLocation", e.PeeringLocation) - populate(objectMap, "peerings", e.Peerings) - populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "sTag", e.STag) - populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) - populate(objectMap, "serviceProviderNotes", e.ServiceProviderNotes) - populate(objectMap, "serviceProviderProvisioningState", e.ServiceProviderProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionProperties. -func (e *ExpressRouteCrossConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bandwidthInMbps": - err = unpopulate(val, "BandwidthInMbps", &e.BandwidthInMbps) - delete(rawMsg, key) - case "expressRouteCircuit": - err = unpopulate(val, "ExpressRouteCircuit", &e.ExpressRouteCircuit) - delete(rawMsg, key) - case "peeringLocation": - err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) - delete(rawMsg, key) - case "peerings": - err = unpopulate(val, "Peerings", &e.Peerings) - delete(rawMsg, key) - case "primaryAzurePort": - err = unpopulate(val, "PrimaryAzurePort", &e.PrimaryAzurePort) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "sTag": - err = unpopulate(val, "STag", &e.STag) - delete(rawMsg, key) - case "secondaryAzurePort": - err = unpopulate(val, "SecondaryAzurePort", &e.SecondaryAzurePort) - delete(rawMsg, key) - case "serviceProviderNotes": - err = unpopulate(val, "ServiceProviderNotes", &e.ServiceProviderNotes) - delete(rawMsg, key) - case "serviceProviderProvisioningState": - err = unpopulate(val, "ServiceProviderProvisioningState", &e.ServiceProviderProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionRoutesTableSummary. -func (e ExpressRouteCrossConnectionRoutesTableSummary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "asn", e.Asn) - populate(objectMap, "neighbor", e.Neighbor) - populate(objectMap, "stateOrPrefixesReceived", e.StateOrPrefixesReceived) - populate(objectMap, "upDown", e.UpDown) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionRoutesTableSummary. -func (e *ExpressRouteCrossConnectionRoutesTableSummary) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "asn": - err = unpopulate(val, "Asn", &e.Asn) - delete(rawMsg, key) - case "neighbor": - err = unpopulate(val, "Neighbor", &e.Neighbor) - delete(rawMsg, key) - case "stateOrPrefixesReceived": - err = unpopulate(val, "StateOrPrefixesReceived", &e.StateOrPrefixesReceived) - delete(rawMsg, key) - case "upDown": - err = unpopulate(val, "UpDown", &e.UpDown) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionsRoutesTableSummaryListResult. -func (e ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionsRoutesTableSummaryListResult. -func (e *ExpressRouteCrossConnectionsRoutesTableSummaryListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGateway. -func (e ExpressRouteGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteGateway. -func (e *ExpressRouteGateway) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &e.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayList. -func (e ExpressRouteGatewayList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteGatewayList. -func (e *ExpressRouteGatewayList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayProperties. -func (e ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "autoScaleConfiguration", e.AutoScaleConfiguration) - populate(objectMap, "expressRouteConnections", e.ExpressRouteConnections) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "virtualHub", e.VirtualHub) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteGatewayProperties. -func (e *ExpressRouteGatewayProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "autoScaleConfiguration": - err = unpopulate(val, "AutoScaleConfiguration", &e.AutoScaleConfiguration) - delete(rawMsg, key) - case "expressRouteConnections": - err = unpopulate(val, "ExpressRouteConnections", &e.ExpressRouteConnections) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "virtualHub": - err = unpopulate(val, "VirtualHub", &e.VirtualHub) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayPropertiesAutoScaleConfiguration. -func (e ExpressRouteGatewayPropertiesAutoScaleConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bounds", e.Bounds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteGatewayPropertiesAutoScaleConfiguration. -func (e *ExpressRouteGatewayPropertiesAutoScaleConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bounds": - err = unpopulate(val, "Bounds", &e.Bounds) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds. -func (e ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "max", e.Max) - populate(objectMap, "min", e.Min) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds. -func (e *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "max": - err = unpopulate(val, "Max", &e.Max) - delete(rawMsg, key) - case "min": - err = unpopulate(val, "Min", &e.Min) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteLink. -func (e ExpressRouteLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteLink. -func (e *ExpressRouteLink) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkListResult. -func (e ExpressRouteLinkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteLinkListResult. -func (e *ExpressRouteLinkListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkMacSecConfig. -func (e ExpressRouteLinkMacSecConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cakSecretIdentifier", e.CakSecretIdentifier) - populate(objectMap, "cipher", e.Cipher) - populate(objectMap, "cknSecretIdentifier", e.CknSecretIdentifier) - populate(objectMap, "sciState", e.SciState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteLinkMacSecConfig. -func (e *ExpressRouteLinkMacSecConfig) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cakSecretIdentifier": - err = unpopulate(val, "CakSecretIdentifier", &e.CakSecretIdentifier) - delete(rawMsg, key) - case "cipher": - err = unpopulate(val, "Cipher", &e.Cipher) - delete(rawMsg, key) - case "cknSecretIdentifier": - err = unpopulate(val, "CknSecretIdentifier", &e.CknSecretIdentifier) - delete(rawMsg, key) - case "sciState": - err = unpopulate(val, "SciState", &e.SciState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkPropertiesFormat. -func (e ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "adminState", e.AdminState) - populate(objectMap, "connectorType", e.ConnectorType) - populate(objectMap, "interfaceName", e.InterfaceName) - populate(objectMap, "macSecConfig", e.MacSecConfig) - populate(objectMap, "patchPanelId", e.PatchPanelID) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "rackId", e.RackID) - populate(objectMap, "routerName", e.RouterName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteLinkPropertiesFormat. -func (e *ExpressRouteLinkPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "adminState": - err = unpopulate(val, "AdminState", &e.AdminState) - delete(rawMsg, key) - case "connectorType": - err = unpopulate(val, "ConnectorType", &e.ConnectorType) - delete(rawMsg, key) - case "interfaceName": - err = unpopulate(val, "InterfaceName", &e.InterfaceName) - delete(rawMsg, key) - case "macSecConfig": - err = unpopulate(val, "MacSecConfig", &e.MacSecConfig) - delete(rawMsg, key) - case "patchPanelId": - err = unpopulate(val, "PatchPanelID", &e.PatchPanelID) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "rackId": - err = unpopulate(val, "RackID", &e.RackID) - delete(rawMsg, key) - case "routerName": - err = unpopulate(val, "RouterName", &e.RouterName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePort. -func (e ExpressRoutePort) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "identity", e.Identity) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePort. -func (e *ExpressRoutePort) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &e.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &e.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortAuthorization. -func (e ExpressRoutePortAuthorization) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortAuthorization. -func (e *ExpressRoutePortAuthorization) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortAuthorizationListResult. -func (e ExpressRoutePortAuthorizationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortAuthorizationListResult. -func (e *ExpressRoutePortAuthorizationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortAuthorizationPropertiesFormat. -func (e ExpressRoutePortAuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorizationKey", e.AuthorizationKey) - populate(objectMap, "authorizationUseStatus", e.AuthorizationUseStatus) - populate(objectMap, "circuitResourceUri", e.CircuitResourceURI) - populate(objectMap, "provisioningState", e.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortAuthorizationPropertiesFormat. -func (e *ExpressRoutePortAuthorizationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationKey": - err = unpopulate(val, "AuthorizationKey", &e.AuthorizationKey) - delete(rawMsg, key) - case "authorizationUseStatus": - err = unpopulate(val, "AuthorizationUseStatus", &e.AuthorizationUseStatus) - delete(rawMsg, key) - case "circuitResourceUri": - err = unpopulate(val, "CircuitResourceURI", &e.CircuitResourceURI) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortListResult. -func (e ExpressRoutePortListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortListResult. -func (e *ExpressRoutePortListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortPropertiesFormat. -func (e ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allocationDate", e.AllocationDate) - populate(objectMap, "bandwidthInGbps", e.BandwidthInGbps) - populate(objectMap, "circuits", e.Circuits) - populate(objectMap, "encapsulation", e.Encapsulation) - populate(objectMap, "etherType", e.EtherType) - populate(objectMap, "links", e.Links) - populate(objectMap, "mtu", e.Mtu) - populate(objectMap, "peeringLocation", e.PeeringLocation) - populate(objectMap, "provisionedBandwidthInGbps", e.ProvisionedBandwidthInGbps) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "resourceGuid", e.ResourceGUID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortPropertiesFormat. -func (e *ExpressRoutePortPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allocationDate": - err = unpopulate(val, "AllocationDate", &e.AllocationDate) - delete(rawMsg, key) - case "bandwidthInGbps": - err = unpopulate(val, "BandwidthInGbps", &e.BandwidthInGbps) - delete(rawMsg, key) - case "circuits": - err = unpopulate(val, "Circuits", &e.Circuits) - delete(rawMsg, key) - case "encapsulation": - err = unpopulate(val, "Encapsulation", &e.Encapsulation) - delete(rawMsg, key) - case "etherType": - err = unpopulate(val, "EtherType", &e.EtherType) - delete(rawMsg, key) - case "links": - err = unpopulate(val, "Links", &e.Links) - delete(rawMsg, key) - case "mtu": - err = unpopulate(val, "Mtu", &e.Mtu) - delete(rawMsg, key) - case "peeringLocation": - err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) - delete(rawMsg, key) - case "provisionedBandwidthInGbps": - err = unpopulate(val, "ProvisionedBandwidthInGbps", &e.ProvisionedBandwidthInGbps) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &e.ResourceGUID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocation. -func (e ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortsLocation. -func (e *ExpressRoutePortsLocation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &e.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationBandwidths. -func (e ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "offerName", e.OfferName) - populate(objectMap, "valueInGbps", e.ValueInGbps) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortsLocationBandwidths. -func (e *ExpressRoutePortsLocationBandwidths) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "offerName": - err = unpopulate(val, "OfferName", &e.OfferName) - delete(rawMsg, key) - case "valueInGbps": - err = unpopulate(val, "ValueInGbps", &e.ValueInGbps) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationListResult. -func (e ExpressRoutePortsLocationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortsLocationListResult. -func (e *ExpressRoutePortsLocationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationPropertiesFormat. -func (e ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", e.Address) - populate(objectMap, "availableBandwidths", e.AvailableBandwidths) - populate(objectMap, "contact", e.Contact) - populate(objectMap, "provisioningState", e.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortsLocationPropertiesFormat. -func (e *ExpressRoutePortsLocationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "address": - err = unpopulate(val, "Address", &e.Address) - delete(rawMsg, key) - case "availableBandwidths": - err = unpopulate(val, "AvailableBandwidths", &e.AvailableBandwidths) - delete(rawMsg, key) - case "contact": - err = unpopulate(val, "Contact", &e.Contact) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteProviderPort. -func (e ExpressRouteProviderPort) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteProviderPort. -func (e *ExpressRouteProviderPort) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &e.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &e.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteProviderPortListResult. -func (e ExpressRouteProviderPortListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteProviderPortListResult. -func (e *ExpressRouteProviderPortListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteProviderPortProperties. -func (e ExpressRouteProviderPortProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "overprovisionFactor", e.OverprovisionFactor) - populate(objectMap, "peeringLocation", e.PeeringLocation) - populate(objectMap, "portBandwidthInMbps", e.PortBandwidthInMbps) - populate(objectMap, "portPairDescriptor", e.PortPairDescriptor) - populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) - populate(objectMap, "remainingBandwidthInMbps", e.RemainingBandwidthInMbps) - populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) - populate(objectMap, "usedBandwidthInMbps", e.UsedBandwidthInMbps) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteProviderPortProperties. -func (e *ExpressRouteProviderPortProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "overprovisionFactor": - err = unpopulate(val, "OverprovisionFactor", &e.OverprovisionFactor) - delete(rawMsg, key) - case "peeringLocation": - err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) - delete(rawMsg, key) - case "portBandwidthInMbps": - err = unpopulate(val, "PortBandwidthInMbps", &e.PortBandwidthInMbps) - delete(rawMsg, key) - case "portPairDescriptor": - err = unpopulate(val, "PortPairDescriptor", &e.PortPairDescriptor) - delete(rawMsg, key) - case "primaryAzurePort": - err = unpopulate(val, "PrimaryAzurePort", &e.PrimaryAzurePort) - delete(rawMsg, key) - case "remainingBandwidthInMbps": - err = unpopulate(val, "RemainingBandwidthInMbps", &e.RemainingBandwidthInMbps) - delete(rawMsg, key) - case "secondaryAzurePort": - err = unpopulate(val, "SecondaryAzurePort", &e.SecondaryAzurePort) - delete(rawMsg, key) - case "usedBandwidthInMbps": - err = unpopulate(val, "UsedBandwidthInMbps", &e.UsedBandwidthInMbps) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProvider. -func (e ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteServiceProvider. -func (e *ExpressRouteServiceProvider) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &e.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderBandwidthsOffered. -func (e ExpressRouteServiceProviderBandwidthsOffered) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "offerName", e.OfferName) - populate(objectMap, "valueInMbps", e.ValueInMbps) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteServiceProviderBandwidthsOffered. -func (e *ExpressRouteServiceProviderBandwidthsOffered) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "offerName": - err = unpopulate(val, "OfferName", &e.OfferName) - delete(rawMsg, key) - case "valueInMbps": - err = unpopulate(val, "ValueInMbps", &e.ValueInMbps) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderListResult. -func (e ExpressRouteServiceProviderListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteServiceProviderListResult. -func (e *ExpressRouteServiceProviderListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderPropertiesFormat. -func (e ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bandwidthsOffered", e.BandwidthsOffered) - populate(objectMap, "peeringLocations", e.PeeringLocations) - populate(objectMap, "provisioningState", e.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteServiceProviderPropertiesFormat. -func (e *ExpressRouteServiceProviderPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bandwidthsOffered": - err = unpopulate(val, "BandwidthsOffered", &e.BandwidthsOffered) - delete(rawMsg, key) - case "peeringLocations": - err = unpopulate(val, "PeeringLocations", &e.PeeringLocations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. -func (e ExtendedLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", e.Name) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation. -func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FilterItems. -func (f FilterItems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "field", f.Field) - populate(objectMap, "values", f.Values) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FilterItems. -func (f *FilterItems) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "field": - err = unpopulate(val, "Field", &f.Field) - delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &f.Values) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicy. -func (f FirewallPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", f.Etag) - populate(objectMap, "id", f.ID) - populate(objectMap, "identity", f.Identity) - populate(objectMap, "location", f.Location) - populate(objectMap, "name", f.Name) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "tags", f.Tags) - populate(objectMap, "type", f.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicy. -func (f *FirewallPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &f.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &f.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &f.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &f.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &f.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &f.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &f.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyCertificateAuthority. -func (f FirewallPolicyCertificateAuthority) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "keyVaultSecretId", f.KeyVaultSecretID) - populate(objectMap, "name", f.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyCertificateAuthority. -func (f *FirewallPolicyCertificateAuthority) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "keyVaultSecretId": - err = unpopulate(val, "KeyVaultSecretID", &f.KeyVaultSecretID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyFilterRuleCollection. -func (f FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", f.Action) - populate(objectMap, "name", f.Name) - populate(objectMap, "priority", f.Priority) - objectMap["ruleCollectionType"] = FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection - populate(objectMap, "rules", f.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyFilterRuleCollection. -func (f *FirewallPolicyFilterRuleCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &f.Action) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &f.Priority) - delete(rawMsg, key) - case "ruleCollectionType": - err = unpopulate(val, "RuleCollectionType", &f.RuleCollectionType) - delete(rawMsg, key) - case "rules": - f.Rules, err = unmarshalFirewallPolicyRuleClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyFilterRuleCollectionAction. -func (f FirewallPolicyFilterRuleCollectionAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "type", f.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyFilterRuleCollectionAction. -func (f *FirewallPolicyFilterRuleCollectionAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &f.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyInsights. -func (f FirewallPolicyInsights) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isEnabled", f.IsEnabled) - populate(objectMap, "logAnalyticsResources", f.LogAnalyticsResources) - populate(objectMap, "retentionDays", f.RetentionDays) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyInsights. -func (f *FirewallPolicyInsights) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isEnabled": - err = unpopulate(val, "IsEnabled", &f.IsEnabled) - delete(rawMsg, key) - case "logAnalyticsResources": - err = unpopulate(val, "LogAnalyticsResources", &f.LogAnalyticsResources) - delete(rawMsg, key) - case "retentionDays": - err = unpopulate(val, "RetentionDays", &f.RetentionDays) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetection. -func (f FirewallPolicyIntrusionDetection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "configuration", f.Configuration) - populate(objectMap, "mode", f.Mode) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyIntrusionDetection. -func (f *FirewallPolicyIntrusionDetection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "configuration": - err = unpopulate(val, "Configuration", &f.Configuration) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &f.Mode) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications. -func (f FirewallPolicyIntrusionDetectionBypassTrafficSpecifications) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", f.Description) - populate(objectMap, "destinationAddresses", f.DestinationAddresses) - populate(objectMap, "destinationIpGroups", f.DestinationIPGroups) - populate(objectMap, "destinationPorts", f.DestinationPorts) - populate(objectMap, "name", f.Name) - populate(objectMap, "protocol", f.Protocol) - populate(objectMap, "sourceAddresses", f.SourceAddresses) - populate(objectMap, "sourceIpGroups", f.SourceIPGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications. -func (f *FirewallPolicyIntrusionDetectionBypassTrafficSpecifications) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &f.Description) - delete(rawMsg, key) - case "destinationAddresses": - err = unpopulate(val, "DestinationAddresses", &f.DestinationAddresses) - delete(rawMsg, key) - case "destinationIpGroups": - err = unpopulate(val, "DestinationIPGroups", &f.DestinationIPGroups) - delete(rawMsg, key) - case "destinationPorts": - err = unpopulate(val, "DestinationPorts", &f.DestinationPorts) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &f.Protocol) - delete(rawMsg, key) - case "sourceAddresses": - err = unpopulate(val, "SourceAddresses", &f.SourceAddresses) - delete(rawMsg, key) - case "sourceIpGroups": - err = unpopulate(val, "SourceIPGroups", &f.SourceIPGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionConfiguration. -func (f FirewallPolicyIntrusionDetectionConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bypassTrafficSettings", f.BypassTrafficSettings) - populate(objectMap, "privateRanges", f.PrivateRanges) - populate(objectMap, "signatureOverrides", f.SignatureOverrides) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyIntrusionDetectionConfiguration. -func (f *FirewallPolicyIntrusionDetectionConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bypassTrafficSettings": - err = unpopulate(val, "BypassTrafficSettings", &f.BypassTrafficSettings) - delete(rawMsg, key) - case "privateRanges": - err = unpopulate(val, "PrivateRanges", &f.PrivateRanges) - delete(rawMsg, key) - case "signatureOverrides": - err = unpopulate(val, "SignatureOverrides", &f.SignatureOverrides) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionSignatureSpecification. -func (f FirewallPolicyIntrusionDetectionSignatureSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", f.ID) - populate(objectMap, "mode", f.Mode) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyIntrusionDetectionSignatureSpecification. -func (f *FirewallPolicyIntrusionDetectionSignatureSpecification) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &f.ID) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &f.Mode) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyListResult. -func (f FirewallPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", f.NextLink) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyListResult. -func (f *FirewallPolicyListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &f.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &f.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyLogAnalyticsResources. -func (f FirewallPolicyLogAnalyticsResources) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "defaultWorkspaceId", f.DefaultWorkspaceID) - populate(objectMap, "workspaces", f.Workspaces) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyLogAnalyticsResources. -func (f *FirewallPolicyLogAnalyticsResources) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "defaultWorkspaceId": - err = unpopulate(val, "DefaultWorkspaceID", &f.DefaultWorkspaceID) - delete(rawMsg, key) - case "workspaces": - err = unpopulate(val, "Workspaces", &f.Workspaces) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyLogAnalyticsWorkspace. -func (f FirewallPolicyLogAnalyticsWorkspace) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "region", f.Region) - populate(objectMap, "workspaceId", f.WorkspaceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyLogAnalyticsWorkspace. -func (f *FirewallPolicyLogAnalyticsWorkspace) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "region": - err = unpopulate(val, "Region", &f.Region) - delete(rawMsg, key) - case "workspaceId": - err = unpopulate(val, "WorkspaceID", &f.WorkspaceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyNatRuleCollection. -func (f FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", f.Action) - populate(objectMap, "name", f.Name) - populate(objectMap, "priority", f.Priority) - objectMap["ruleCollectionType"] = FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection - populate(objectMap, "rules", f.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyNatRuleCollection. -func (f *FirewallPolicyNatRuleCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &f.Action) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &f.Priority) - delete(rawMsg, key) - case "ruleCollectionType": - err = unpopulate(val, "RuleCollectionType", &f.RuleCollectionType) - delete(rawMsg, key) - case "rules": - f.Rules, err = unmarshalFirewallPolicyRuleClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyNatRuleCollectionAction. -func (f FirewallPolicyNatRuleCollectionAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "type", f.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyNatRuleCollectionAction. -func (f *FirewallPolicyNatRuleCollectionAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &f.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyPropertiesFormat. -func (f FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "basePolicy", f.BasePolicy) - populate(objectMap, "childPolicies", f.ChildPolicies) - populate(objectMap, "dnsSettings", f.DNSSettings) - populate(objectMap, "explicitProxySettings", f.ExplicitProxySettings) - populate(objectMap, "firewalls", f.Firewalls) - populate(objectMap, "insights", f.Insights) - populate(objectMap, "intrusionDetection", f.IntrusionDetection) - populate(objectMap, "provisioningState", f.ProvisioningState) - populate(objectMap, "ruleCollectionGroups", f.RuleCollectionGroups) - populate(objectMap, "sku", f.SKU) - populate(objectMap, "sql", f.SQL) - populate(objectMap, "snat", f.Snat) - populate(objectMap, "threatIntelMode", f.ThreatIntelMode) - populate(objectMap, "threatIntelWhitelist", f.ThreatIntelWhitelist) - populate(objectMap, "transportSecurity", f.TransportSecurity) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyPropertiesFormat. -func (f *FirewallPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "basePolicy": - err = unpopulate(val, "BasePolicy", &f.BasePolicy) - delete(rawMsg, key) - case "childPolicies": - err = unpopulate(val, "ChildPolicies", &f.ChildPolicies) - delete(rawMsg, key) - case "dnsSettings": - err = unpopulate(val, "DNSSettings", &f.DNSSettings) - delete(rawMsg, key) - case "explicitProxySettings": - err = unpopulate(val, "ExplicitProxySettings", &f.ExplicitProxySettings) - delete(rawMsg, key) - case "firewalls": - err = unpopulate(val, "Firewalls", &f.Firewalls) - delete(rawMsg, key) - case "insights": - err = unpopulate(val, "Insights", &f.Insights) - delete(rawMsg, key) - case "intrusionDetection": - err = unpopulate(val, "IntrusionDetection", &f.IntrusionDetection) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) - delete(rawMsg, key) - case "ruleCollectionGroups": - err = unpopulate(val, "RuleCollectionGroups", &f.RuleCollectionGroups) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &f.SKU) - delete(rawMsg, key) - case "sql": - err = unpopulate(val, "SQL", &f.SQL) - delete(rawMsg, key) - case "snat": - err = unpopulate(val, "Snat", &f.Snat) - delete(rawMsg, key) - case "threatIntelMode": - err = unpopulate(val, "ThreatIntelMode", &f.ThreatIntelMode) - delete(rawMsg, key) - case "threatIntelWhitelist": - err = unpopulate(val, "ThreatIntelWhitelist", &f.ThreatIntelWhitelist) - delete(rawMsg, key) - case "transportSecurity": - err = unpopulate(val, "TransportSecurity", &f.TransportSecurity) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRule. -func (f FirewallPolicyRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", f.Description) - populate(objectMap, "name", f.Name) - objectMap["ruleType"] = f.RuleType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRule. -func (f *FirewallPolicyRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &f.Description) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "ruleType": - err = unpopulate(val, "RuleType", &f.RuleType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleApplicationProtocol. -func (f FirewallPolicyRuleApplicationProtocol) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "port", f.Port) - populate(objectMap, "protocolType", f.ProtocolType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleApplicationProtocol. -func (f *FirewallPolicyRuleApplicationProtocol) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "port": - err = unpopulate(val, "Port", &f.Port) - delete(rawMsg, key) - case "protocolType": - err = unpopulate(val, "ProtocolType", &f.ProtocolType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollection. -func (f FirewallPolicyRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", f.Name) - populate(objectMap, "priority", f.Priority) - objectMap["ruleCollectionType"] = f.RuleCollectionType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollection. -func (f *FirewallPolicyRuleCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &f.Priority) - delete(rawMsg, key) - case "ruleCollectionType": - err = unpopulate(val, "RuleCollectionType", &f.RuleCollectionType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroup. -func (f FirewallPolicyRuleCollectionGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", f.Etag) - populate(objectMap, "id", f.ID) - populate(objectMap, "name", f.Name) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "type", f.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollectionGroup. -func (f *FirewallPolicyRuleCollectionGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &f.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &f.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &f.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &f.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupListResult. -func (f FirewallPolicyRuleCollectionGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", f.NextLink) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollectionGroupListResult. -func (f *FirewallPolicyRuleCollectionGroupListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &f.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &f.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupProperties. -func (f FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "priority", f.Priority) - populate(objectMap, "provisioningState", f.ProvisioningState) - populate(objectMap, "ruleCollections", f.RuleCollections) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollectionGroupProperties. -func (f *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "priority": - err = unpopulate(val, "Priority", &f.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) - delete(rawMsg, key) - case "ruleCollections": - f.RuleCollections, err = unmarshalFirewallPolicyRuleCollectionClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicySKU. -func (f FirewallPolicySKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tier", f.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicySKU. -func (f *FirewallPolicySKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "tier": - err = unpopulate(val, "Tier", &f.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicySNAT. -func (f FirewallPolicySNAT) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "autoLearnPrivateRanges", f.AutoLearnPrivateRanges) - populate(objectMap, "privateRanges", f.PrivateRanges) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicySNAT. -func (f *FirewallPolicySNAT) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "autoLearnPrivateRanges": - err = unpopulate(val, "AutoLearnPrivateRanges", &f.AutoLearnPrivateRanges) - delete(rawMsg, key) - case "privateRanges": - err = unpopulate(val, "PrivateRanges", &f.PrivateRanges) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicySQL. -func (f FirewallPolicySQL) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowSqlRedirect", f.AllowSQLRedirect) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicySQL. -func (f *FirewallPolicySQL) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowSqlRedirect": - err = unpopulate(val, "AllowSQLRedirect", &f.AllowSQLRedirect) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyThreatIntelWhitelist. -func (f FirewallPolicyThreatIntelWhitelist) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fqdns", f.Fqdns) - populate(objectMap, "ipAddresses", f.IPAddresses) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyThreatIntelWhitelist. -func (f *FirewallPolicyThreatIntelWhitelist) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fqdns": - err = unpopulate(val, "Fqdns", &f.Fqdns) - delete(rawMsg, key) - case "ipAddresses": - err = unpopulate(val, "IPAddresses", &f.IPAddresses) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyTransportSecurity. -func (f FirewallPolicyTransportSecurity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "certificateAuthority", f.CertificateAuthority) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyTransportSecurity. -func (f *FirewallPolicyTransportSecurity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificateAuthority": - err = unpopulate(val, "CertificateAuthority", &f.CertificateAuthority) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FlowLog. -func (f FlowLog) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", f.Etag) - populate(objectMap, "id", f.ID) - populate(objectMap, "location", f.Location) - populate(objectMap, "name", f.Name) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "tags", f.Tags) - populate(objectMap, "type", f.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLog. -func (f *FlowLog) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &f.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &f.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &f.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &f.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &f.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &f.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FlowLogFormatParameters. -func (f FlowLogFormatParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "type", f.Type) - populate(objectMap, "version", f.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogFormatParameters. -func (f *FlowLogFormatParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "type": - err = unpopulate(val, "Type", &f.Type) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &f.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FlowLogInformation. -func (f FlowLogInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "flowAnalyticsConfiguration", f.FlowAnalyticsConfiguration) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "targetResourceId", f.TargetResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogInformation. -func (f *FlowLogInformation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "flowAnalyticsConfiguration": - err = unpopulate(val, "FlowAnalyticsConfiguration", &f.FlowAnalyticsConfiguration) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &f.Properties) - delete(rawMsg, key) - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &f.TargetResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FlowLogListResult. -func (f FlowLogListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", f.NextLink) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogListResult. -func (f *FlowLogListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &f.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &f.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FlowLogProperties. -func (f FlowLogProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enabled", f.Enabled) - populate(objectMap, "format", f.Format) - populate(objectMap, "retentionPolicy", f.RetentionPolicy) - populate(objectMap, "storageId", f.StorageID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogProperties. -func (f *FlowLogProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &f.Enabled) - delete(rawMsg, key) - case "format": - err = unpopulate(val, "Format", &f.Format) - delete(rawMsg, key) - case "retentionPolicy": - err = unpopulate(val, "RetentionPolicy", &f.RetentionPolicy) - delete(rawMsg, key) - case "storageId": - err = unpopulate(val, "StorageID", &f.StorageID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FlowLogPropertiesFormat. -func (f FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enabled", f.Enabled) - populate(objectMap, "flowAnalyticsConfiguration", f.FlowAnalyticsConfiguration) - populate(objectMap, "format", f.Format) - populate(objectMap, "provisioningState", f.ProvisioningState) - populate(objectMap, "retentionPolicy", f.RetentionPolicy) - populate(objectMap, "storageId", f.StorageID) - populate(objectMap, "targetResourceGuid", f.TargetResourceGUID) - populate(objectMap, "targetResourceId", f.TargetResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogPropertiesFormat. -func (f *FlowLogPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &f.Enabled) - delete(rawMsg, key) - case "flowAnalyticsConfiguration": - err = unpopulate(val, "FlowAnalyticsConfiguration", &f.FlowAnalyticsConfiguration) - delete(rawMsg, key) - case "format": - err = unpopulate(val, "Format", &f.Format) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) - delete(rawMsg, key) - case "retentionPolicy": - err = unpopulate(val, "RetentionPolicy", &f.RetentionPolicy) - delete(rawMsg, key) - case "storageId": - err = unpopulate(val, "StorageID", &f.StorageID) - delete(rawMsg, key) - case "targetResourceGuid": - err = unpopulate(val, "TargetResourceGUID", &f.TargetResourceGUID) - delete(rawMsg, key) - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &f.TargetResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FlowLogStatusParameters. -func (f FlowLogStatusParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "targetResourceId", f.TargetResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogStatusParameters. -func (f *FlowLogStatusParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &f.TargetResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FrontendIPConfiguration. -func (f FrontendIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", f.Etag) - populate(objectMap, "id", f.ID) - populate(objectMap, "name", f.Name) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "type", f.Type) - populate(objectMap, "zones", f.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FrontendIPConfiguration. -func (f *FrontendIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &f.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &f.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &f.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &f.Type) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &f.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FrontendIPConfigurationPropertiesFormat. -func (f FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "gatewayLoadBalancer", f.GatewayLoadBalancer) - populate(objectMap, "inboundNatPools", f.InboundNatPools) - populate(objectMap, "inboundNatRules", f.InboundNatRules) - populate(objectMap, "loadBalancingRules", f.LoadBalancingRules) - populate(objectMap, "outboundRules", f.OutboundRules) - populate(objectMap, "privateIPAddress", f.PrivateIPAddress) - populate(objectMap, "privateIPAddressVersion", f.PrivateIPAddressVersion) - populate(objectMap, "privateIPAllocationMethod", f.PrivateIPAllocationMethod) - populate(objectMap, "provisioningState", f.ProvisioningState) - populate(objectMap, "publicIPAddress", f.PublicIPAddress) - populate(objectMap, "publicIPPrefix", f.PublicIPPrefix) - populate(objectMap, "subnet", f.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FrontendIPConfigurationPropertiesFormat. -func (f *FrontendIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "gatewayLoadBalancer": - err = unpopulate(val, "GatewayLoadBalancer", &f.GatewayLoadBalancer) - delete(rawMsg, key) - case "inboundNatPools": - err = unpopulate(val, "InboundNatPools", &f.InboundNatPools) - delete(rawMsg, key) - case "inboundNatRules": - err = unpopulate(val, "InboundNatRules", &f.InboundNatRules) - delete(rawMsg, key) - case "loadBalancingRules": - err = unpopulate(val, "LoadBalancingRules", &f.LoadBalancingRules) - delete(rawMsg, key) - case "outboundRules": - err = unpopulate(val, "OutboundRules", &f.OutboundRules) - delete(rawMsg, key) - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &f.PrivateIPAddress) - delete(rawMsg, key) - case "privateIPAddressVersion": - err = unpopulate(val, "PrivateIPAddressVersion", &f.PrivateIPAddressVersion) - delete(rawMsg, key) - case "privateIPAllocationMethod": - err = unpopulate(val, "PrivateIPAllocationMethod", &f.PrivateIPAllocationMethod) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddress": - err = unpopulate(val, "PublicIPAddress", &f.PublicIPAddress) - delete(rawMsg, key) - case "publicIPPrefix": - err = unpopulate(val, "PublicIPPrefix", &f.PublicIPPrefix) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &f.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayCustomBgpIPAddressIPConfiguration. -func (g GatewayCustomBgpIPAddressIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customBgpIpAddress", g.CustomBgpIPAddress) - populate(objectMap, "ipConfigurationId", g.IPConfigurationID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCustomBgpIPAddressIPConfiguration. -func (g *GatewayCustomBgpIPAddressIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customBgpIpAddress": - err = unpopulate(val, "CustomBgpIPAddress", &g.CustomBgpIPAddress) - delete(rawMsg, key) - case "ipConfigurationId": - err = unpopulate(val, "IPConfigurationID", &g.IPConfigurationID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayLoadBalancerTunnelInterface. -func (g GatewayLoadBalancerTunnelInterface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "identifier", g.Identifier) - populate(objectMap, "port", g.Port) - populate(objectMap, "protocol", g.Protocol) - populate(objectMap, "type", g.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayLoadBalancerTunnelInterface. -func (g *GatewayLoadBalancerTunnelInterface) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "identifier": - err = unpopulate(val, "Identifier", &g.Identifier) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &g.Port) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &g.Protocol) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayRoute. -func (g GatewayRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "asPath", g.AsPath) - populate(objectMap, "localAddress", g.LocalAddress) - populate(objectMap, "network", g.Network) - populate(objectMap, "nextHop", g.NextHop) - populate(objectMap, "origin", g.Origin) - populate(objectMap, "sourcePeer", g.SourcePeer) - populate(objectMap, "weight", g.Weight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRoute. -func (g *GatewayRoute) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "asPath": - err = unpopulate(val, "AsPath", &g.AsPath) - delete(rawMsg, key) - case "localAddress": - err = unpopulate(val, "LocalAddress", &g.LocalAddress) - delete(rawMsg, key) - case "network": - err = unpopulate(val, "Network", &g.Network) - delete(rawMsg, key) - case "nextHop": - err = unpopulate(val, "NextHop", &g.NextHop) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &g.Origin) - delete(rawMsg, key) - case "sourcePeer": - err = unpopulate(val, "SourcePeer", &g.SourcePeer) - delete(rawMsg, key) - case "weight": - err = unpopulate(val, "Weight", &g.Weight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GatewayRouteListResult. -func (g GatewayRouteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRouteListResult. -func (g *GatewayRouteListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GenerateExpressRoutePortsLOARequest. -func (g GenerateExpressRoutePortsLOARequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customerName", g.CustomerName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GenerateExpressRoutePortsLOARequest. -func (g *GenerateExpressRoutePortsLOARequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customerName": - err = unpopulate(val, "CustomerName", &g.CustomerName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GenerateExpressRoutePortsLOAResult. -func (g GenerateExpressRoutePortsLOAResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "encodedContent", g.EncodedContent) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GenerateExpressRoutePortsLOAResult. -func (g *GenerateExpressRoutePortsLOAResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "encodedContent": - err = unpopulate(val, "EncodedContent", &g.EncodedContent) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GetVPNSitesConfigurationRequest. -func (g GetVPNSitesConfigurationRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "outputBlobSasUrl", g.OutputBlobSasURL) - populate(objectMap, "vpnSites", g.VPNSites) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GetVPNSitesConfigurationRequest. -func (g *GetVPNSitesConfigurationRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "outputBlobSasUrl": - err = unpopulate(val, "OutputBlobSasURL", &g.OutputBlobSasURL) - delete(rawMsg, key) - case "vpnSites": - err = unpopulate(val, "VPNSites", &g.VPNSites) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Group. -func (g Group) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", g.Etag) - populate(objectMap, "id", g.ID) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "systemData", g.SystemData) - populate(objectMap, "type", g.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Group. -func (g *Group) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &g.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &g.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GroupListResult. -func (g GroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GroupListResult. -func (g *GroupListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &g.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GroupProperties. -func (g GroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", g.Description) - populate(objectMap, "provisioningState", g.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GroupProperties. -func (g *GroupProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &g.Description) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HTTPConfiguration. -func (h HTTPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "headers", h.Headers) - populate(objectMap, "method", h.Method) - populate(objectMap, "validStatusCodes", h.ValidStatusCodes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPConfiguration. -func (h *HTTPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "headers": - err = unpopulate(val, "Headers", &h.Headers) - delete(rawMsg, key) - case "method": - err = unpopulate(val, "Method", &h.Method) - delete(rawMsg, key) - case "validStatusCodes": - err = unpopulate(val, "ValidStatusCodes", &h.ValidStatusCodes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HTTPHeader. -func (h HTTPHeader) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", h.Name) - populate(objectMap, "value", h.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPHeader. -func (h *HTTPHeader) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &h.Name) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &h.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HopLink. -func (h HopLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "context", h.Context) - populate(objectMap, "issues", h.Issues) - populate(objectMap, "linkType", h.LinkType) - populate(objectMap, "nextHopId", h.NextHopID) - populate(objectMap, "properties", h.Properties) - populate(objectMap, "resourceId", h.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HopLink. -func (h *HopLink) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "context": - err = unpopulate(val, "Context", &h.Context) - delete(rawMsg, key) - case "issues": - err = unpopulate(val, "Issues", &h.Issues) - delete(rawMsg, key) - case "linkType": - err = unpopulate(val, "LinkType", &h.LinkType) - delete(rawMsg, key) - case "nextHopId": - err = unpopulate(val, "NextHopID", &h.NextHopID) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &h.Properties) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &h.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HopLinkProperties. -func (h HopLinkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "roundTripTimeAvg", h.RoundTripTimeAvg) - populate(objectMap, "roundTripTimeMax", h.RoundTripTimeMax) - populate(objectMap, "roundTripTimeMin", h.RoundTripTimeMin) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HopLinkProperties. -func (h *HopLinkProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "roundTripTimeAvg": - err = unpopulate(val, "RoundTripTimeAvg", &h.RoundTripTimeAvg) - delete(rawMsg, key) - case "roundTripTimeMax": - err = unpopulate(val, "RoundTripTimeMax", &h.RoundTripTimeMax) - delete(rawMsg, key) - case "roundTripTimeMin": - err = unpopulate(val, "RoundTripTimeMin", &h.RoundTripTimeMin) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Hub. -func (h Hub) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "resourceId", h.ResourceID) - populate(objectMap, "resourceType", h.ResourceType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Hub. -func (h *Hub) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "resourceId": - err = unpopulate(val, "ResourceID", &h.ResourceID) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &h.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HubIPAddresses. -func (h HubIPAddresses) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateIPAddress", h.PrivateIPAddress) - populate(objectMap, "publicIPs", h.PublicIPs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HubIPAddresses. -func (h *HubIPAddresses) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &h.PrivateIPAddress) - delete(rawMsg, key) - case "publicIPs": - err = unpopulate(val, "PublicIPs", &h.PublicIPs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HubIPConfiguration. -func (h HubIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", h.Etag) - populate(objectMap, "id", h.ID) - populate(objectMap, "name", h.Name) - populate(objectMap, "properties", h.Properties) - populate(objectMap, "type", h.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HubIPConfiguration. -func (h *HubIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &h.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &h.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &h.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &h.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &h.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HubIPConfigurationPropertiesFormat. -func (h HubIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateIPAddress", h.PrivateIPAddress) - populate(objectMap, "privateIPAllocationMethod", h.PrivateIPAllocationMethod) - populate(objectMap, "provisioningState", h.ProvisioningState) - populate(objectMap, "publicIPAddress", h.PublicIPAddress) - populate(objectMap, "subnet", h.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HubIPConfigurationPropertiesFormat. -func (h *HubIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &h.PrivateIPAddress) - delete(rawMsg, key) - case "privateIPAllocationMethod": - err = unpopulate(val, "PrivateIPAllocationMethod", &h.PrivateIPAllocationMethod) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &h.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddress": - err = unpopulate(val, "PublicIPAddress", &h.PublicIPAddress) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &h.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HubPublicIPAddresses. -func (h HubPublicIPAddresses) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addresses", h.Addresses) - populate(objectMap, "count", h.Count) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HubPublicIPAddresses. -func (h *HubPublicIPAddresses) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addresses": - err = unpopulate(val, "Addresses", &h.Addresses) - delete(rawMsg, key) - case "count": - err = unpopulate(val, "Count", &h.Count) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HubRoute. -func (h HubRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationType", h.DestinationType) - populate(objectMap, "destinations", h.Destinations) - populate(objectMap, "name", h.Name) - populate(objectMap, "nextHop", h.NextHop) - populate(objectMap, "nextHopType", h.NextHopType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HubRoute. -func (h *HubRoute) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinationType": - err = unpopulate(val, "DestinationType", &h.DestinationType) - delete(rawMsg, key) - case "destinations": - err = unpopulate(val, "Destinations", &h.Destinations) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &h.Name) - delete(rawMsg, key) - case "nextHop": - err = unpopulate(val, "NextHop", &h.NextHop) - delete(rawMsg, key) - case "nextHopType": - err = unpopulate(val, "NextHopType", &h.NextHopType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HubRouteTable. -func (h HubRouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", h.Etag) - populate(objectMap, "id", h.ID) - populate(objectMap, "name", h.Name) - populate(objectMap, "properties", h.Properties) - populate(objectMap, "type", h.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HubRouteTable. -func (h *HubRouteTable) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &h.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &h.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &h.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &h.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &h.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HubRouteTableProperties. -func (h HubRouteTableProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "associatedConnections", h.AssociatedConnections) - populate(objectMap, "labels", h.Labels) - populate(objectMap, "propagatingConnections", h.PropagatingConnections) - populate(objectMap, "provisioningState", h.ProvisioningState) - populate(objectMap, "routes", h.Routes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HubRouteTableProperties. -func (h *HubRouteTableProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "associatedConnections": - err = unpopulate(val, "AssociatedConnections", &h.AssociatedConnections) - delete(rawMsg, key) - case "labels": - err = unpopulate(val, "Labels", &h.Labels) - delete(rawMsg, key) - case "propagatingConnections": - err = unpopulate(val, "PropagatingConnections", &h.PropagatingConnections) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &h.ProvisioningState) - delete(rawMsg, key) - case "routes": - err = unpopulate(val, "Routes", &h.Routes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HubVirtualNetworkConnection. -func (h HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", h.Etag) - populate(objectMap, "id", h.ID) - populate(objectMap, "name", h.Name) - populate(objectMap, "properties", h.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HubVirtualNetworkConnection. -func (h *HubVirtualNetworkConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &h.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &h.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &h.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &h.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HubVirtualNetworkConnectionProperties. -func (h HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowHubToRemoteVnetTransit", h.AllowHubToRemoteVnetTransit) - populate(objectMap, "allowRemoteVnetToUseHubVnetGateways", h.AllowRemoteVnetToUseHubVnetGateways) - populate(objectMap, "enableInternetSecurity", h.EnableInternetSecurity) - populate(objectMap, "provisioningState", h.ProvisioningState) - populate(objectMap, "remoteVirtualNetwork", h.RemoteVirtualNetwork) - populate(objectMap, "routingConfiguration", h.RoutingConfiguration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HubVirtualNetworkConnectionProperties. -func (h *HubVirtualNetworkConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowHubToRemoteVnetTransit": - err = unpopulate(val, "AllowHubToRemoteVnetTransit", &h.AllowHubToRemoteVnetTransit) - delete(rawMsg, key) - case "allowRemoteVnetToUseHubVnetGateways": - err = unpopulate(val, "AllowRemoteVnetToUseHubVnetGateways", &h.AllowRemoteVnetToUseHubVnetGateways) - delete(rawMsg, key) - case "enableInternetSecurity": - err = unpopulate(val, "EnableInternetSecurity", &h.EnableInternetSecurity) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &h.ProvisioningState) - delete(rawMsg, key) - case "remoteVirtualNetwork": - err = unpopulate(val, "RemoteVirtualNetwork", &h.RemoteVirtualNetwork) - delete(rawMsg, key) - case "routingConfiguration": - err = unpopulate(val, "RoutingConfiguration", &h.RoutingConfiguration) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IDPSQueryObject. -func (i IDPSQueryObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filters", i.Filters) - populate(objectMap, "orderBy", i.OrderBy) - populate(objectMap, "resultsPerPage", i.ResultsPerPage) - populate(objectMap, "search", i.Search) - populate(objectMap, "skip", i.Skip) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IDPSQueryObject. -func (i *IDPSQueryObject) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "filters": - err = unpopulate(val, "Filters", &i.Filters) - delete(rawMsg, key) - case "orderBy": - err = unpopulate(val, "OrderBy", &i.OrderBy) - delete(rawMsg, key) - case "resultsPerPage": - err = unpopulate(val, "ResultsPerPage", &i.ResultsPerPage) - delete(rawMsg, key) - case "search": - err = unpopulate(val, "Search", &i.Search) - delete(rawMsg, key) - case "skip": - err = unpopulate(val, "Skip", &i.Skip) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPAddressAvailabilityResult. -func (i IPAddressAvailabilityResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "available", i.Available) - populate(objectMap, "availableIPAddresses", i.AvailableIPAddresses) - populate(objectMap, "isPlatformReserved", i.IsPlatformReserved) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressAvailabilityResult. -func (i *IPAddressAvailabilityResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "available": - err = unpopulate(val, "Available", &i.Available) - delete(rawMsg, key) - case "availableIPAddresses": - err = unpopulate(val, "AvailableIPAddresses", &i.AvailableIPAddresses) - delete(rawMsg, key) - case "isPlatformReserved": - err = unpopulate(val, "IsPlatformReserved", &i.IsPlatformReserved) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPAllocation. -func (i IPAllocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "tags", i.Tags) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPAllocation. -func (i *IPAllocation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &i.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &i.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPAllocationListResult. -func (i IPAllocationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPAllocationListResult. -func (i *IPAllocationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPAllocationPropertiesFormat. -func (i IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allocationTags", i.AllocationTags) - populate(objectMap, "ipamAllocationId", i.IpamAllocationID) - populate(objectMap, "prefix", i.Prefix) - populate(objectMap, "prefixLength", i.PrefixLength) - populate(objectMap, "prefixType", i.PrefixType) - populate(objectMap, "subnet", i.Subnet) - populate(objectMap, "type", i.Type) - populate(objectMap, "virtualNetwork", i.VirtualNetwork) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPAllocationPropertiesFormat. -func (i *IPAllocationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allocationTags": - err = unpopulate(val, "AllocationTags", &i.AllocationTags) - delete(rawMsg, key) - case "ipamAllocationId": - err = unpopulate(val, "IpamAllocationID", &i.IpamAllocationID) - delete(rawMsg, key) - case "prefix": - err = unpopulate(val, "Prefix", &i.Prefix) - delete(rawMsg, key) - case "prefixLength": - err = unpopulate(val, "PrefixLength", &i.PrefixLength) - delete(rawMsg, key) - case "prefixType": - err = unpopulate(val, "PrefixType", &i.PrefixType) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &i.Subnet) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - case "virtualNetwork": - err = unpopulate(val, "VirtualNetwork", &i.VirtualNetwork) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPConfiguration. -func (i IPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfiguration. -func (i *IPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPConfigurationBgpPeeringAddress. -func (i IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customBgpIpAddresses", i.CustomBgpIPAddresses) - populate(objectMap, "defaultBgpIpAddresses", i.DefaultBgpIPAddresses) - populate(objectMap, "ipconfigurationId", i.IPConfigurationID) - populate(objectMap, "tunnelIpAddresses", i.TunnelIPAddresses) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationBgpPeeringAddress. -func (i *IPConfigurationBgpPeeringAddress) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customBgpIpAddresses": - err = unpopulate(val, "CustomBgpIPAddresses", &i.CustomBgpIPAddresses) - delete(rawMsg, key) - case "defaultBgpIpAddresses": - err = unpopulate(val, "DefaultBgpIPAddresses", &i.DefaultBgpIPAddresses) - delete(rawMsg, key) - case "ipconfigurationId": - err = unpopulate(val, "IPConfigurationID", &i.IPConfigurationID) - delete(rawMsg, key) - case "tunnelIpAddresses": - err = unpopulate(val, "TunnelIPAddresses", &i.TunnelIPAddresses) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPConfigurationProfile. -func (i IPConfigurationProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationProfile. -func (i *IPConfigurationProfile) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPConfigurationProfilePropertiesFormat. -func (i IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", i.ProvisioningState) - populate(objectMap, "subnet", i.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationProfilePropertiesFormat. -func (i *IPConfigurationProfilePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &i.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPConfigurationPropertiesFormat. -func (i IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateIPAddress", i.PrivateIPAddress) - populate(objectMap, "privateIPAllocationMethod", i.PrivateIPAllocationMethod) - populate(objectMap, "provisioningState", i.ProvisioningState) - populate(objectMap, "publicIPAddress", i.PublicIPAddress) - populate(objectMap, "subnet", i.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationPropertiesFormat. -func (i *IPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &i.PrivateIPAddress) - delete(rawMsg, key) - case "privateIPAllocationMethod": - err = unpopulate(val, "PrivateIPAllocationMethod", &i.PrivateIPAllocationMethod) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddress": - err = unpopulate(val, "PublicIPAddress", &i.PublicIPAddress) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &i.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPGroup. -func (i IPGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "tags", i.Tags) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPGroup. -func (i *IPGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &i.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &i.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPGroupListResult. -func (i IPGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPGroupListResult. -func (i *IPGroupListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPGroupPropertiesFormat. -func (i IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "firewallPolicies", i.FirewallPolicies) - populate(objectMap, "firewalls", i.Firewalls) - populate(objectMap, "ipAddresses", i.IPAddresses) - populate(objectMap, "provisioningState", i.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPGroupPropertiesFormat. -func (i *IPGroupPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "firewallPolicies": - err = unpopulate(val, "FirewallPolicies", &i.FirewallPolicies) - delete(rawMsg, key) - case "firewalls": - err = unpopulate(val, "Firewalls", &i.Firewalls) - delete(rawMsg, key) - case "ipAddresses": - err = unpopulate(val, "IPAddresses", &i.IPAddresses) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPPrefixesList. -func (i IPPrefixesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipPrefixes", i.IPPrefixes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPPrefixesList. -func (i *IPPrefixesList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ipPrefixes": - err = unpopulate(val, "IPPrefixes", &i.IPPrefixes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPSecPolicy. -func (i IPSecPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dhGroup", i.DhGroup) - populate(objectMap, "ipsecEncryption", i.IPSecEncryption) - populate(objectMap, "ipsecIntegrity", i.IPSecIntegrity) - populate(objectMap, "ikeEncryption", i.IkeEncryption) - populate(objectMap, "ikeIntegrity", i.IkeIntegrity) - populate(objectMap, "pfsGroup", i.PfsGroup) - populate(objectMap, "saDataSizeKilobytes", i.SaDataSizeKilobytes) - populate(objectMap, "saLifeTimeSeconds", i.SaLifeTimeSeconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPSecPolicy. -func (i *IPSecPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dhGroup": - err = unpopulate(val, "DhGroup", &i.DhGroup) - delete(rawMsg, key) - case "ipsecEncryption": - err = unpopulate(val, "IPSecEncryption", &i.IPSecEncryption) - delete(rawMsg, key) - case "ipsecIntegrity": - err = unpopulate(val, "IPSecIntegrity", &i.IPSecIntegrity) - delete(rawMsg, key) - case "ikeEncryption": - err = unpopulate(val, "IkeEncryption", &i.IkeEncryption) - delete(rawMsg, key) - case "ikeIntegrity": - err = unpopulate(val, "IkeIntegrity", &i.IkeIntegrity) - delete(rawMsg, key) - case "pfsGroup": - err = unpopulate(val, "PfsGroup", &i.PfsGroup) - delete(rawMsg, key) - case "saDataSizeKilobytes": - err = unpopulate(val, "SaDataSizeKilobytes", &i.SaDataSizeKilobytes) - delete(rawMsg, key) - case "saLifeTimeSeconds": - err = unpopulate(val, "SaLifeTimeSeconds", &i.SaLifeTimeSeconds) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPTag. -func (i IPTag) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipTagType", i.IPTagType) - populate(objectMap, "tag", i.Tag) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPTag. -func (i *IPTag) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ipTagType": - err = unpopulate(val, "IPTagType", &i.IPTagType) - delete(rawMsg, key) - case "tag": - err = unpopulate(val, "Tag", &i.Tag) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPv6CircuitConnectionConfig. -func (i IPv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", i.AddressPrefix) - populate(objectMap, "circuitConnectionStatus", i.CircuitConnectionStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPv6CircuitConnectionConfig. -func (i *IPv6CircuitConnectionConfig) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefix": - err = unpopulate(val, "AddressPrefix", &i.AddressPrefix) - delete(rawMsg, key) - case "circuitConnectionStatus": - err = unpopulate(val, "CircuitConnectionStatus", &i.CircuitConnectionStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPv6ExpressRouteCircuitPeeringConfig. -func (i IPv6ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "microsoftPeeringConfig", i.MicrosoftPeeringConfig) - populate(objectMap, "primaryPeerAddressPrefix", i.PrimaryPeerAddressPrefix) - populate(objectMap, "routeFilter", i.RouteFilter) - populate(objectMap, "secondaryPeerAddressPrefix", i.SecondaryPeerAddressPrefix) - populate(objectMap, "state", i.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPv6ExpressRouteCircuitPeeringConfig. -func (i *IPv6ExpressRouteCircuitPeeringConfig) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "microsoftPeeringConfig": - err = unpopulate(val, "MicrosoftPeeringConfig", &i.MicrosoftPeeringConfig) - delete(rawMsg, key) - case "primaryPeerAddressPrefix": - err = unpopulate(val, "PrimaryPeerAddressPrefix", &i.PrimaryPeerAddressPrefix) - delete(rawMsg, key) - case "routeFilter": - err = unpopulate(val, "RouteFilter", &i.RouteFilter) - delete(rawMsg, key) - case "secondaryPeerAddressPrefix": - err = unpopulate(val, "SecondaryPeerAddressPrefix", &i.SecondaryPeerAddressPrefix) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &i.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InboundNatPool. -func (i InboundNatPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatPool. -func (i *InboundNatPool) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InboundNatPoolPropertiesFormat. -func (i InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendPort", i.BackendPort) - populate(objectMap, "enableFloatingIP", i.EnableFloatingIP) - populate(objectMap, "enableTcpReset", i.EnableTCPReset) - populate(objectMap, "frontendIPConfiguration", i.FrontendIPConfiguration) - populate(objectMap, "frontendPortRangeEnd", i.FrontendPortRangeEnd) - populate(objectMap, "frontendPortRangeStart", i.FrontendPortRangeStart) - populate(objectMap, "idleTimeoutInMinutes", i.IdleTimeoutInMinutes) - populate(objectMap, "protocol", i.Protocol) - populate(objectMap, "provisioningState", i.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatPoolPropertiesFormat. -func (i *InboundNatPoolPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendPort": - err = unpopulate(val, "BackendPort", &i.BackendPort) - delete(rawMsg, key) - case "enableFloatingIP": - err = unpopulate(val, "EnableFloatingIP", &i.EnableFloatingIP) - delete(rawMsg, key) - case "enableTcpReset": - err = unpopulate(val, "EnableTCPReset", &i.EnableTCPReset) - delete(rawMsg, key) - case "frontendIPConfiguration": - err = unpopulate(val, "FrontendIPConfiguration", &i.FrontendIPConfiguration) - delete(rawMsg, key) - case "frontendPortRangeEnd": - err = unpopulate(val, "FrontendPortRangeEnd", &i.FrontendPortRangeEnd) - delete(rawMsg, key) - case "frontendPortRangeStart": - err = unpopulate(val, "FrontendPortRangeStart", &i.FrontendPortRangeStart) - delete(rawMsg, key) - case "idleTimeoutInMinutes": - err = unpopulate(val, "IdleTimeoutInMinutes", &i.IdleTimeoutInMinutes) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &i.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InboundNatRule. -func (i InboundNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatRule. -func (i *InboundNatRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InboundNatRuleListResult. -func (i InboundNatRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatRuleListResult. -func (i *InboundNatRuleListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InboundNatRulePortMapping. -func (i InboundNatRulePortMapping) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendPort", i.BackendPort) - populate(objectMap, "frontendPort", i.FrontendPort) - populate(objectMap, "inboundNatRuleName", i.InboundNatRuleName) - populate(objectMap, "protocol", i.Protocol) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatRulePortMapping. -func (i *InboundNatRulePortMapping) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendPort": - err = unpopulate(val, "BackendPort", &i.BackendPort) - delete(rawMsg, key) - case "frontendPort": - err = unpopulate(val, "FrontendPort", &i.FrontendPort) - delete(rawMsg, key) - case "inboundNatRuleName": - err = unpopulate(val, "InboundNatRuleName", &i.InboundNatRuleName) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &i.Protocol) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InboundNatRulePropertiesFormat. -func (i InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", i.BackendAddressPool) - populate(objectMap, "backendIPConfiguration", i.BackendIPConfiguration) - populate(objectMap, "backendPort", i.BackendPort) - populate(objectMap, "enableFloatingIP", i.EnableFloatingIP) - populate(objectMap, "enableTcpReset", i.EnableTCPReset) - populate(objectMap, "frontendIPConfiguration", i.FrontendIPConfiguration) - populate(objectMap, "frontendPort", i.FrontendPort) - populate(objectMap, "frontendPortRangeEnd", i.FrontendPortRangeEnd) - populate(objectMap, "frontendPortRangeStart", i.FrontendPortRangeStart) - populate(objectMap, "idleTimeoutInMinutes", i.IdleTimeoutInMinutes) - populate(objectMap, "protocol", i.Protocol) - populate(objectMap, "provisioningState", i.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatRulePropertiesFormat. -func (i *InboundNatRulePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPool": - err = unpopulate(val, "BackendAddressPool", &i.BackendAddressPool) - delete(rawMsg, key) - case "backendIPConfiguration": - err = unpopulate(val, "BackendIPConfiguration", &i.BackendIPConfiguration) - delete(rawMsg, key) - case "backendPort": - err = unpopulate(val, "BackendPort", &i.BackendPort) - delete(rawMsg, key) - case "enableFloatingIP": - err = unpopulate(val, "EnableFloatingIP", &i.EnableFloatingIP) - delete(rawMsg, key) - case "enableTcpReset": - err = unpopulate(val, "EnableTCPReset", &i.EnableTCPReset) - delete(rawMsg, key) - case "frontendIPConfiguration": - err = unpopulate(val, "FrontendIPConfiguration", &i.FrontendIPConfiguration) - delete(rawMsg, key) - case "frontendPort": - err = unpopulate(val, "FrontendPort", &i.FrontendPort) - delete(rawMsg, key) - case "frontendPortRangeEnd": - err = unpopulate(val, "FrontendPortRangeEnd", &i.FrontendPortRangeEnd) - delete(rawMsg, key) - case "frontendPortRangeStart": - err = unpopulate(val, "FrontendPortRangeStart", &i.FrontendPortRangeStart) - delete(rawMsg, key) - case "idleTimeoutInMinutes": - err = unpopulate(val, "IdleTimeoutInMinutes", &i.IdleTimeoutInMinutes) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &i.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InboundSecurityRule. -func (i InboundSecurityRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InboundSecurityRule. -func (i *InboundSecurityRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InboundSecurityRuleProperties. -func (i InboundSecurityRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", i.ProvisioningState) - populate(objectMap, "rules", i.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InboundSecurityRuleProperties. -func (i *InboundSecurityRuleProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &i.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InboundSecurityRules. -func (i InboundSecurityRules) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationPortRange", i.DestinationPortRange) - populate(objectMap, "protocol", i.Protocol) - populate(objectMap, "sourceAddressPrefix", i.SourceAddressPrefix) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InboundSecurityRules. -func (i *InboundSecurityRules) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinationPortRange": - err = unpopulate(val, "DestinationPortRange", &i.DestinationPortRange) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &i.Protocol) - delete(rawMsg, key) - case "sourceAddressPrefix": - err = unpopulate(val, "SourceAddressPrefix", &i.SourceAddressPrefix) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IntentPolicy. -func (i IntentPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "tags", i.Tags) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntentPolicy. -func (i *IntentPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &i.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &i.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IntentPolicyConfiguration. -func (i IntentPolicyConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "networkIntentPolicyName", i.NetworkIntentPolicyName) - populate(objectMap, "sourceNetworkIntentPolicy", i.SourceNetworkIntentPolicy) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IntentPolicyConfiguration. -func (i *IntentPolicyConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "networkIntentPolicyName": - err = unpopulate(val, "NetworkIntentPolicyName", &i.NetworkIntentPolicyName) - delete(rawMsg, key) - case "sourceNetworkIntentPolicy": - err = unpopulate(val, "SourceNetworkIntentPolicy", &i.SourceNetworkIntentPolicy) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Interface. -func (i Interface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "extendedLocation", i.ExtendedLocation) - populate(objectMap, "id", i.ID) - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "tags", i.Tags) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Interface. -func (i *Interface) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &i.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &i.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &i.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceAssociation. -func (i InterfaceAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", i.ID) - populate(objectMap, "securityRules", i.SecurityRules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceAssociation. -func (i *InterfaceAssociation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "securityRules": - err = unpopulate(val, "SecurityRules", &i.SecurityRules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceDNSSettings. -func (i InterfaceDNSSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appliedDnsServers", i.AppliedDNSServers) - populate(objectMap, "dnsServers", i.DNSServers) - populate(objectMap, "internalDnsNameLabel", i.InternalDNSNameLabel) - populate(objectMap, "internalDomainNameSuffix", i.InternalDomainNameSuffix) - populate(objectMap, "internalFqdn", i.InternalFqdn) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceDNSSettings. -func (i *InterfaceDNSSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appliedDnsServers": - err = unpopulate(val, "AppliedDNSServers", &i.AppliedDNSServers) - delete(rawMsg, key) - case "dnsServers": - err = unpopulate(val, "DNSServers", &i.DNSServers) - delete(rawMsg, key) - case "internalDnsNameLabel": - err = unpopulate(val, "InternalDNSNameLabel", &i.InternalDNSNameLabel) - delete(rawMsg, key) - case "internalDomainNameSuffix": - err = unpopulate(val, "InternalDomainNameSuffix", &i.InternalDomainNameSuffix) - delete(rawMsg, key) - case "internalFqdn": - err = unpopulate(val, "InternalFqdn", &i.InternalFqdn) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfiguration. -func (i InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceIPConfiguration. -func (i *InterfaceIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationListResult. -func (i InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceIPConfigurationListResult. -func (i *InterfaceIPConfigurationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationPrivateLinkConnectionProperties. -func (i InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fqdns", i.Fqdns) - populate(objectMap, "groupId", i.GroupID) - populate(objectMap, "requiredMemberName", i.RequiredMemberName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceIPConfigurationPrivateLinkConnectionProperties. -func (i *InterfaceIPConfigurationPrivateLinkConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fqdns": - err = unpopulate(val, "Fqdns", &i.Fqdns) - delete(rawMsg, key) - case "groupId": - err = unpopulate(val, "GroupID", &i.GroupID) - delete(rawMsg, key) - case "requiredMemberName": - err = unpopulate(val, "RequiredMemberName", &i.RequiredMemberName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationPropertiesFormat. -func (i InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationGatewayBackendAddressPools", i.ApplicationGatewayBackendAddressPools) - populate(objectMap, "applicationSecurityGroups", i.ApplicationSecurityGroups) - populate(objectMap, "gatewayLoadBalancer", i.GatewayLoadBalancer) - populate(objectMap, "loadBalancerBackendAddressPools", i.LoadBalancerBackendAddressPools) - populate(objectMap, "loadBalancerInboundNatRules", i.LoadBalancerInboundNatRules) - populate(objectMap, "primary", i.Primary) - populate(objectMap, "privateIPAddress", i.PrivateIPAddress) - populate(objectMap, "privateIPAddressVersion", i.PrivateIPAddressVersion) - populate(objectMap, "privateIPAllocationMethod", i.PrivateIPAllocationMethod) - populate(objectMap, "privateLinkConnectionProperties", i.PrivateLinkConnectionProperties) - populate(objectMap, "provisioningState", i.ProvisioningState) - populate(objectMap, "publicIPAddress", i.PublicIPAddress) - populate(objectMap, "subnet", i.Subnet) - populate(objectMap, "virtualNetworkTaps", i.VirtualNetworkTaps) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceIPConfigurationPropertiesFormat. -func (i *InterfaceIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "applicationGatewayBackendAddressPools": - err = unpopulate(val, "ApplicationGatewayBackendAddressPools", &i.ApplicationGatewayBackendAddressPools) - delete(rawMsg, key) - case "applicationSecurityGroups": - err = unpopulate(val, "ApplicationSecurityGroups", &i.ApplicationSecurityGroups) - delete(rawMsg, key) - case "gatewayLoadBalancer": - err = unpopulate(val, "GatewayLoadBalancer", &i.GatewayLoadBalancer) - delete(rawMsg, key) - case "loadBalancerBackendAddressPools": - err = unpopulate(val, "LoadBalancerBackendAddressPools", &i.LoadBalancerBackendAddressPools) - delete(rawMsg, key) - case "loadBalancerInboundNatRules": - err = unpopulate(val, "LoadBalancerInboundNatRules", &i.LoadBalancerInboundNatRules) - delete(rawMsg, key) - case "primary": - err = unpopulate(val, "Primary", &i.Primary) - delete(rawMsg, key) - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &i.PrivateIPAddress) - delete(rawMsg, key) - case "privateIPAddressVersion": - err = unpopulate(val, "PrivateIPAddressVersion", &i.PrivateIPAddressVersion) - delete(rawMsg, key) - case "privateIPAllocationMethod": - err = unpopulate(val, "PrivateIPAllocationMethod", &i.PrivateIPAllocationMethod) - delete(rawMsg, key) - case "privateLinkConnectionProperties": - err = unpopulate(val, "PrivateLinkConnectionProperties", &i.PrivateLinkConnectionProperties) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddress": - err = unpopulate(val, "PublicIPAddress", &i.PublicIPAddress) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &i.Subnet) - delete(rawMsg, key) - case "virtualNetworkTaps": - err = unpopulate(val, "VirtualNetworkTaps", &i.VirtualNetworkTaps) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceListResult. -func (i InterfaceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceListResult. -func (i *InterfaceListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceLoadBalancerListResult. -func (i InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceLoadBalancerListResult. -func (i *InterfaceLoadBalancerListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfacePropertiesFormat. -func (i InterfacePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "auxiliaryMode", i.AuxiliaryMode) - populate(objectMap, "dnsSettings", i.DNSSettings) - populate(objectMap, "dscpConfiguration", i.DscpConfiguration) - populate(objectMap, "enableAcceleratedNetworking", i.EnableAcceleratedNetworking) - populate(objectMap, "enableIPForwarding", i.EnableIPForwarding) - populate(objectMap, "hostedWorkloads", i.HostedWorkloads) - populate(objectMap, "ipConfigurations", i.IPConfigurations) - populate(objectMap, "macAddress", i.MacAddress) - populate(objectMap, "migrationPhase", i.MigrationPhase) - populate(objectMap, "networkSecurityGroup", i.NetworkSecurityGroup) - populate(objectMap, "nicType", i.NicType) - populate(objectMap, "primary", i.Primary) - populate(objectMap, "privateEndpoint", i.PrivateEndpoint) - populate(objectMap, "privateLinkService", i.PrivateLinkService) - populate(objectMap, "provisioningState", i.ProvisioningState) - populate(objectMap, "resourceGuid", i.ResourceGUID) - populate(objectMap, "tapConfigurations", i.TapConfigurations) - populate(objectMap, "virtualMachine", i.VirtualMachine) - populate(objectMap, "vnetEncryptionSupported", i.VnetEncryptionSupported) - populate(objectMap, "workloadType", i.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfacePropertiesFormat. -func (i *InterfacePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "auxiliaryMode": - err = unpopulate(val, "AuxiliaryMode", &i.AuxiliaryMode) - delete(rawMsg, key) - case "dnsSettings": - err = unpopulate(val, "DNSSettings", &i.DNSSettings) - delete(rawMsg, key) - case "dscpConfiguration": - err = unpopulate(val, "DscpConfiguration", &i.DscpConfiguration) - delete(rawMsg, key) - case "enableAcceleratedNetworking": - err = unpopulate(val, "EnableAcceleratedNetworking", &i.EnableAcceleratedNetworking) - delete(rawMsg, key) - case "enableIPForwarding": - err = unpopulate(val, "EnableIPForwarding", &i.EnableIPForwarding) - delete(rawMsg, key) - case "hostedWorkloads": - err = unpopulate(val, "HostedWorkloads", &i.HostedWorkloads) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &i.IPConfigurations) - delete(rawMsg, key) - case "macAddress": - err = unpopulate(val, "MacAddress", &i.MacAddress) - delete(rawMsg, key) - case "migrationPhase": - err = unpopulate(val, "MigrationPhase", &i.MigrationPhase) - delete(rawMsg, key) - case "networkSecurityGroup": - err = unpopulate(val, "NetworkSecurityGroup", &i.NetworkSecurityGroup) - delete(rawMsg, key) - case "nicType": - err = unpopulate(val, "NicType", &i.NicType) - delete(rawMsg, key) - case "primary": - err = unpopulate(val, "Primary", &i.Primary) - delete(rawMsg, key) - case "privateEndpoint": - err = unpopulate(val, "PrivateEndpoint", &i.PrivateEndpoint) - delete(rawMsg, key) - case "privateLinkService": - err = unpopulate(val, "PrivateLinkService", &i.PrivateLinkService) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &i.ResourceGUID) - delete(rawMsg, key) - case "tapConfigurations": - err = unpopulate(val, "TapConfigurations", &i.TapConfigurations) - delete(rawMsg, key) - case "virtualMachine": - err = unpopulate(val, "VirtualMachine", &i.VirtualMachine) - delete(rawMsg, key) - case "vnetEncryptionSupported": - err = unpopulate(val, "VnetEncryptionSupported", &i.VnetEncryptionSupported) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &i.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfiguration. -func (i InterfaceTapConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceTapConfiguration. -func (i *InterfaceTapConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &i.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfigurationListResult. -func (i InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceTapConfigurationListResult. -func (i *InterfaceTapConfigurationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfigurationPropertiesFormat. -func (i InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", i.ProvisioningState) - populate(objectMap, "virtualNetworkTap", i.VirtualNetworkTap) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceTapConfigurationPropertiesFormat. -func (i *InterfaceTapConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) - delete(rawMsg, key) - case "virtualNetworkTap": - err = unpopulate(val, "VirtualNetworkTap", &i.VirtualNetworkTap) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListHubRouteTablesResult. -func (l ListHubRouteTablesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListHubRouteTablesResult. -func (l *ListHubRouteTablesResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListHubVirtualNetworkConnectionsResult. -func (l ListHubVirtualNetworkConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListHubVirtualNetworkConnectionsResult. -func (l *ListHubVirtualNetworkConnectionsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListP2SVPNGatewaysResult. -func (l ListP2SVPNGatewaysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListP2SVPNGatewaysResult. -func (l *ListP2SVPNGatewaysResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListRoutingIntentResult. -func (l ListRoutingIntentResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListRoutingIntentResult. -func (l *ListRoutingIntentResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVPNConnectionsResult. -func (l ListVPNConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNConnectionsResult. -func (l *ListVPNConnectionsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVPNGatewayNatRulesResult. -func (l ListVPNGatewayNatRulesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNGatewayNatRulesResult. -func (l *ListVPNGatewayNatRulesResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVPNGatewaysResult. -func (l ListVPNGatewaysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNGatewaysResult. -func (l *ListVPNGatewaysResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVPNServerConfigurationPolicyGroupsResult. -func (l ListVPNServerConfigurationPolicyGroupsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNServerConfigurationPolicyGroupsResult. -func (l *ListVPNServerConfigurationPolicyGroupsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVPNServerConfigurationsResult. -func (l ListVPNServerConfigurationsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNServerConfigurationsResult. -func (l *ListVPNServerConfigurationsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVPNSiteLinkConnectionsResult. -func (l ListVPNSiteLinkConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNSiteLinkConnectionsResult. -func (l *ListVPNSiteLinkConnectionsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVPNSiteLinksResult. -func (l ListVPNSiteLinksResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNSiteLinksResult. -func (l *ListVPNSiteLinksResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVPNSitesResult. -func (l ListVPNSitesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNSitesResult. -func (l *ListVPNSitesResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubBgpConnectionResults. -func (l ListVirtualHubBgpConnectionResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualHubBgpConnectionResults. -func (l *ListVirtualHubBgpConnectionResults) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubIPConfigurationResults. -func (l ListVirtualHubIPConfigurationResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualHubIPConfigurationResults. -func (l *ListVirtualHubIPConfigurationResults) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubRouteTableV2SResult. -func (l ListVirtualHubRouteTableV2SResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualHubRouteTableV2SResult. -func (l *ListVirtualHubRouteTableV2SResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubsResult. -func (l ListVirtualHubsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualHubsResult. -func (l *ListVirtualHubsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVirtualNetworkGatewayNatRulesResult. -func (l ListVirtualNetworkGatewayNatRulesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualNetworkGatewayNatRulesResult. -func (l *ListVirtualNetworkGatewayNatRulesResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ListVirtualWANsResult. -func (l ListVirtualWANsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualWANsResult. -func (l *ListVirtualWANsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancer. -func (l LoadBalancer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", l.Etag) - populate(objectMap, "extendedLocation", l.ExtendedLocation) - populate(objectMap, "id", l.ID) - populate(objectMap, "location", l.Location) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "sku", l.SKU) - populate(objectMap, "tags", l.Tags) - populate(objectMap, "type", l.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancer. -func (l *LoadBalancer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &l.Etag) - delete(rawMsg, key) - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &l.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &l.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &l.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &l.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &l.SKU) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &l.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &l.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddress. -func (l LoadBalancerBackendAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerBackendAddress. -func (l *LoadBalancerBackendAddress) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &l.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddressPoolListResult. -func (l LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerBackendAddressPoolListResult. -func (l *LoadBalancerBackendAddressPoolListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddressPropertiesFormat. -func (l LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "adminState", l.AdminState) - populate(objectMap, "ipAddress", l.IPAddress) - populate(objectMap, "inboundNatRulesPortMapping", l.InboundNatRulesPortMapping) - populate(objectMap, "loadBalancerFrontendIPConfiguration", l.LoadBalancerFrontendIPConfiguration) - populate(objectMap, "networkInterfaceIPConfiguration", l.NetworkInterfaceIPConfiguration) - populate(objectMap, "subnet", l.Subnet) - populate(objectMap, "virtualNetwork", l.VirtualNetwork) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerBackendAddressPropertiesFormat. -func (l *LoadBalancerBackendAddressPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "adminState": - err = unpopulate(val, "AdminState", &l.AdminState) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &l.IPAddress) - delete(rawMsg, key) - case "inboundNatRulesPortMapping": - err = unpopulate(val, "InboundNatRulesPortMapping", &l.InboundNatRulesPortMapping) - delete(rawMsg, key) - case "loadBalancerFrontendIPConfiguration": - err = unpopulate(val, "LoadBalancerFrontendIPConfiguration", &l.LoadBalancerFrontendIPConfiguration) - delete(rawMsg, key) - case "networkInterfaceIPConfiguration": - err = unpopulate(val, "NetworkInterfaceIPConfiguration", &l.NetworkInterfaceIPConfiguration) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &l.Subnet) - delete(rawMsg, key) - case "virtualNetwork": - err = unpopulate(val, "VirtualNetwork", &l.VirtualNetwork) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerFrontendIPConfigurationListResult. -func (l LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerFrontendIPConfigurationListResult. -func (l *LoadBalancerFrontendIPConfigurationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerListResult. -func (l LoadBalancerListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerListResult. -func (l *LoadBalancerListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerLoadBalancingRuleListResult. -func (l LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerLoadBalancingRuleListResult. -func (l *LoadBalancerLoadBalancingRuleListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerOutboundRuleListResult. -func (l LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerOutboundRuleListResult. -func (l *LoadBalancerOutboundRuleListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerProbeListResult. -func (l LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerProbeListResult. -func (l *LoadBalancerProbeListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerPropertiesFormat. -func (l LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPools", l.BackendAddressPools) - populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) - populate(objectMap, "inboundNatPools", l.InboundNatPools) - populate(objectMap, "inboundNatRules", l.InboundNatRules) - populate(objectMap, "loadBalancingRules", l.LoadBalancingRules) - populate(objectMap, "outboundRules", l.OutboundRules) - populate(objectMap, "probes", l.Probes) - populate(objectMap, "provisioningState", l.ProvisioningState) - populate(objectMap, "resourceGuid", l.ResourceGUID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerPropertiesFormat. -func (l *LoadBalancerPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPools": - err = unpopulate(val, "BackendAddressPools", &l.BackendAddressPools) - delete(rawMsg, key) - case "frontendIPConfigurations": - err = unpopulate(val, "FrontendIPConfigurations", &l.FrontendIPConfigurations) - delete(rawMsg, key) - case "inboundNatPools": - err = unpopulate(val, "InboundNatPools", &l.InboundNatPools) - delete(rawMsg, key) - case "inboundNatRules": - err = unpopulate(val, "InboundNatRules", &l.InboundNatRules) - delete(rawMsg, key) - case "loadBalancingRules": - err = unpopulate(val, "LoadBalancingRules", &l.LoadBalancingRules) - delete(rawMsg, key) - case "outboundRules": - err = unpopulate(val, "OutboundRules", &l.OutboundRules) - delete(rawMsg, key) - case "probes": - err = unpopulate(val, "Probes", &l.Probes) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &l.ResourceGUID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerSKU. -func (l LoadBalancerSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", l.Name) - populate(objectMap, "tier", l.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerSKU. -func (l *LoadBalancerSKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &l.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequest. -func (l LoadBalancerVipSwapRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerVipSwapRequest. -func (l *LoadBalancerVipSwapRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "frontendIPConfigurations": - err = unpopulate(val, "FrontendIPConfigurations", &l.FrontendIPConfigurations) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequestFrontendIPConfiguration. -func (l LoadBalancerVipSwapRequestFrontendIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", l.ID) - populate(objectMap, "properties", l.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerVipSwapRequestFrontendIPConfiguration. -func (l *LoadBalancerVipSwapRequestFrontendIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &l.ID) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &l.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties. -func (l LoadBalancerVipSwapRequestFrontendIPConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "publicIPAddress", l.PublicIPAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties. -func (l *LoadBalancerVipSwapRequestFrontendIPConfigurationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "publicIPAddress": - err = unpopulate(val, "PublicIPAddress", &l.PublicIPAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancingRule. -func (l LoadBalancingRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", l.Etag) - populate(objectMap, "id", l.ID) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "type", l.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingRule. -func (l *LoadBalancingRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &l.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &l.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &l.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &l.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancingRulePropertiesFormat. -func (l LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", l.BackendAddressPool) - populate(objectMap, "backendAddressPools", l.BackendAddressPools) - populate(objectMap, "backendPort", l.BackendPort) - populate(objectMap, "disableOutboundSnat", l.DisableOutboundSnat) - populate(objectMap, "enableFloatingIP", l.EnableFloatingIP) - populate(objectMap, "enableTcpReset", l.EnableTCPReset) - populate(objectMap, "frontendIPConfiguration", l.FrontendIPConfiguration) - populate(objectMap, "frontendPort", l.FrontendPort) - populate(objectMap, "idleTimeoutInMinutes", l.IdleTimeoutInMinutes) - populate(objectMap, "loadDistribution", l.LoadDistribution) - populate(objectMap, "probe", l.Probe) - populate(objectMap, "protocol", l.Protocol) - populate(objectMap, "provisioningState", l.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingRulePropertiesFormat. -func (l *LoadBalancingRulePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendAddressPool": - err = unpopulate(val, "BackendAddressPool", &l.BackendAddressPool) - delete(rawMsg, key) - case "backendAddressPools": - err = unpopulate(val, "BackendAddressPools", &l.BackendAddressPools) - delete(rawMsg, key) - case "backendPort": - err = unpopulate(val, "BackendPort", &l.BackendPort) - delete(rawMsg, key) - case "disableOutboundSnat": - err = unpopulate(val, "DisableOutboundSnat", &l.DisableOutboundSnat) - delete(rawMsg, key) - case "enableFloatingIP": - err = unpopulate(val, "EnableFloatingIP", &l.EnableFloatingIP) - delete(rawMsg, key) - case "enableTcpReset": - err = unpopulate(val, "EnableTCPReset", &l.EnableTCPReset) - delete(rawMsg, key) - case "frontendIPConfiguration": - err = unpopulate(val, "FrontendIPConfiguration", &l.FrontendIPConfiguration) - delete(rawMsg, key) - case "frontendPort": - err = unpopulate(val, "FrontendPort", &l.FrontendPort) - delete(rawMsg, key) - case "idleTimeoutInMinutes": - err = unpopulate(val, "IdleTimeoutInMinutes", &l.IdleTimeoutInMinutes) - delete(rawMsg, key) - case "loadDistribution": - err = unpopulate(val, "LoadDistribution", &l.LoadDistribution) - delete(rawMsg, key) - case "probe": - err = unpopulate(val, "Probe", &l.Probe) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &l.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LocalNetworkGateway. -func (l LocalNetworkGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", l.Etag) - populate(objectMap, "id", l.ID) - populate(objectMap, "location", l.Location) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "tags", l.Tags) - populate(objectMap, "type", l.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LocalNetworkGateway. -func (l *LocalNetworkGateway) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &l.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &l.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &l.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &l.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &l.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &l.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LocalNetworkGatewayListResult. -func (l LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LocalNetworkGatewayListResult. -func (l *LocalNetworkGatewayListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LocalNetworkGatewayPropertiesFormat. -func (l LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bgpSettings", l.BgpSettings) - populate(objectMap, "fqdn", l.Fqdn) - populate(objectMap, "gatewayIpAddress", l.GatewayIPAddress) - populate(objectMap, "localNetworkAddressSpace", l.LocalNetworkAddressSpace) - populate(objectMap, "provisioningState", l.ProvisioningState) - populate(objectMap, "resourceGuid", l.ResourceGUID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LocalNetworkGatewayPropertiesFormat. -func (l *LocalNetworkGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bgpSettings": - err = unpopulate(val, "BgpSettings", &l.BgpSettings) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &l.Fqdn) - delete(rawMsg, key) - case "gatewayIpAddress": - err = unpopulate(val, "GatewayIPAddress", &l.GatewayIPAddress) - delete(rawMsg, key) - case "localNetworkAddressSpace": - err = unpopulate(val, "LocalNetworkAddressSpace", &l.LocalNetworkAddressSpace) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &l.ResourceGUID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LogSpecification. -func (l LogSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "blobDuration", l.BlobDuration) - populate(objectMap, "displayName", l.DisplayName) - populate(objectMap, "name", l.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. -func (l *LogSpecification) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blobDuration": - err = unpopulate(val, "BlobDuration", &l.BlobDuration) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &l.DisplayName) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupOverride. -func (m ManagedRuleGroupOverride) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleGroupName", m.RuleGroupName) - populate(objectMap, "rules", m.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleGroupOverride. -func (m *ManagedRuleGroupOverride) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ruleGroupName": - err = unpopulate(val, "RuleGroupName", &m.RuleGroupName) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &m.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleOverride. -func (m ManagedRuleOverride) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleId", m.RuleID) - populate(objectMap, "state", m.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleOverride. -func (m *ManagedRuleOverride) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ruleId": - err = unpopulate(val, "RuleID", &m.RuleID) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &m.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSet. -func (m ManagedRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleGroupOverrides", m.RuleGroupOverrides) - populate(objectMap, "ruleSetType", m.RuleSetType) - populate(objectMap, "ruleSetVersion", m.RuleSetVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSet. -func (m *ManagedRuleSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ruleGroupOverrides": - err = unpopulate(val, "RuleGroupOverrides", &m.RuleGroupOverrides) - delete(rawMsg, key) - case "ruleSetType": - err = unpopulate(val, "RuleSetType", &m.RuleSetType) - delete(rawMsg, key) - case "ruleSetVersion": - err = unpopulate(val, "RuleSetVersion", &m.RuleSetVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedRulesDefinition. -func (m ManagedRulesDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "exclusions", m.Exclusions) - populate(objectMap, "managedRuleSets", m.ManagedRuleSets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRulesDefinition. -func (m *ManagedRulesDefinition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "exclusions": - err = unpopulate(val, "Exclusions", &m.Exclusions) - delete(rawMsg, key) - case "managedRuleSets": - err = unpopulate(val, "ManagedRuleSets", &m.ManagedRuleSets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. -func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. -func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Manager. -func (m Manager) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", m.Etag) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Manager. -func (m *Manager) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &m.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerCommit. -func (m ManagerCommit) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "commitId", m.CommitID) - populate(objectMap, "commitType", m.CommitType) - populate(objectMap, "configurationIds", m.ConfigurationIDs) - populate(objectMap, "targetLocations", m.TargetLocations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerCommit. -func (m *ManagerCommit) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "commitId": - err = unpopulate(val, "CommitID", &m.CommitID) - delete(rawMsg, key) - case "commitType": - err = unpopulate(val, "CommitType", &m.CommitType) - delete(rawMsg, key) - case "configurationIds": - err = unpopulate(val, "ConfigurationIDs", &m.ConfigurationIDs) - delete(rawMsg, key) - case "targetLocations": - err = unpopulate(val, "TargetLocations", &m.TargetLocations) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerConnection. -func (m ManagerConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", m.Etag) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerConnection. -func (m *ManagerConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &m.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerConnectionListResult. -func (m ManagerConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerConnectionListResult. -func (m *ManagerConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerConnectionProperties. -func (m ManagerConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "connectionState", m.ConnectionState) - populate(objectMap, "description", m.Description) - populate(objectMap, "networkManagerId", m.NetworkManagerID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerConnectionProperties. -func (m *ManagerConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionState": - err = unpopulate(val, "ConnectionState", &m.ConnectionState) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "networkManagerId": - err = unpopulate(val, "NetworkManagerID", &m.NetworkManagerID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerDeploymentStatus. -func (m ManagerDeploymentStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "commitTime", m.CommitTime) - populate(objectMap, "configurationIds", m.ConfigurationIDs) - populate(objectMap, "deploymentStatus", m.DeploymentStatus) - populate(objectMap, "deploymentType", m.DeploymentType) - populate(objectMap, "errorMessage", m.ErrorMessage) - populate(objectMap, "region", m.Region) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerDeploymentStatus. -func (m *ManagerDeploymentStatus) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "commitTime": - err = unpopulateTimeRFC3339(val, "CommitTime", &m.CommitTime) - delete(rawMsg, key) - case "configurationIds": - err = unpopulate(val, "ConfigurationIDs", &m.ConfigurationIDs) - delete(rawMsg, key) - case "deploymentStatus": - err = unpopulate(val, "DeploymentStatus", &m.DeploymentStatus) - delete(rawMsg, key) - case "deploymentType": - err = unpopulate(val, "DeploymentType", &m.DeploymentType) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &m.ErrorMessage) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &m.Region) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerDeploymentStatusListResult. -func (m ManagerDeploymentStatusListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "skipToken", m.SkipToken) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerDeploymentStatusListResult. -func (m *ManagerDeploymentStatusListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "skipToken": - err = unpopulate(val, "SkipToken", &m.SkipToken) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerDeploymentStatusParameter. -func (m ManagerDeploymentStatusParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "deploymentTypes", m.DeploymentTypes) - populate(objectMap, "regions", m.Regions) - populate(objectMap, "skipToken", m.SkipToken) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerDeploymentStatusParameter. -func (m *ManagerDeploymentStatusParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deploymentTypes": - err = unpopulate(val, "DeploymentTypes", &m.DeploymentTypes) - delete(rawMsg, key) - case "regions": - err = unpopulate(val, "Regions", &m.Regions) - delete(rawMsg, key) - case "skipToken": - err = unpopulate(val, "SkipToken", &m.SkipToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerEffectiveConnectivityConfigurationListResult. -func (m ManagerEffectiveConnectivityConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "skipToken", m.SkipToken) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerEffectiveConnectivityConfigurationListResult. -func (m *ManagerEffectiveConnectivityConfigurationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "skipToken": - err = unpopulate(val, "SkipToken", &m.SkipToken) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerEffectiveSecurityAdminRulesListResult. -func (m ManagerEffectiveSecurityAdminRulesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "skipToken", m.SkipToken) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerEffectiveSecurityAdminRulesListResult. -func (m *ManagerEffectiveSecurityAdminRulesListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "skipToken": - err = unpopulate(val, "SkipToken", &m.SkipToken) - delete(rawMsg, key) - case "value": - m.Value, err = unmarshalEffectiveBaseSecurityAdminRuleClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerListResult. -func (m ManagerListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerListResult. -func (m *ManagerListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerProperties. -func (m ManagerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", m.Description) - populate(objectMap, "networkManagerScopeAccesses", m.NetworkManagerScopeAccesses) - populate(objectMap, "networkManagerScopes", m.NetworkManagerScopes) - populate(objectMap, "provisioningState", m.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerProperties. -func (m *ManagerProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "networkManagerScopeAccesses": - err = unpopulate(val, "NetworkManagerScopeAccesses", &m.NetworkManagerScopeAccesses) - delete(rawMsg, key) - case "networkManagerScopes": - err = unpopulate(val, "NetworkManagerScopes", &m.NetworkManagerScopes) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerPropertiesNetworkManagerScopes. -func (m ManagerPropertiesNetworkManagerScopes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "crossTenantScopes", m.CrossTenantScopes) - populate(objectMap, "managementGroups", m.ManagementGroups) - populate(objectMap, "subscriptions", m.Subscriptions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerPropertiesNetworkManagerScopes. -func (m *ManagerPropertiesNetworkManagerScopes) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "crossTenantScopes": - err = unpopulate(val, "CrossTenantScopes", &m.CrossTenantScopes) - delete(rawMsg, key) - case "managementGroups": - err = unpopulate(val, "ManagementGroups", &m.ManagementGroups) - delete(rawMsg, key) - case "subscriptions": - err = unpopulate(val, "Subscriptions", &m.Subscriptions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagerSecurityGroupItem. -func (m ManagerSecurityGroupItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "networkGroupId", m.NetworkGroupID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerSecurityGroupItem. -func (m *ManagerSecurityGroupItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "networkGroupId": - err = unpopulate(val, "NetworkGroupID", &m.NetworkGroupID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MatchCondition. -func (m MatchCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "matchValues", m.MatchValues) - populate(objectMap, "matchVariables", m.MatchVariables) - populate(objectMap, "negationConditon", m.NegationConditon) - populate(objectMap, "operator", m.Operator) - populate(objectMap, "transforms", m.Transforms) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MatchCondition. -func (m *MatchCondition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchValues": - err = unpopulate(val, "MatchValues", &m.MatchValues) - delete(rawMsg, key) - case "matchVariables": - err = unpopulate(val, "MatchVariables", &m.MatchVariables) - delete(rawMsg, key) - case "negationConditon": - err = unpopulate(val, "NegationConditon", &m.NegationConditon) - delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &m.Operator) - delete(rawMsg, key) - case "transforms": - err = unpopulate(val, "Transforms", &m.Transforms) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MatchVariable. -func (m MatchVariable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "selector", m.Selector) - populate(objectMap, "variableName", m.VariableName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MatchVariable. -func (m *MatchVariable) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "selector": - err = unpopulate(val, "Selector", &m.Selector) - delete(rawMsg, key) - case "variableName": - err = unpopulate(val, "VariableName", &m.VariableName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MatchedRule. -func (m MatchedRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", m.Action) - populate(objectMap, "ruleName", m.RuleName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MatchedRule. -func (m *MatchedRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &m.Action) - delete(rawMsg, key) - case "ruleName": - err = unpopulate(val, "RuleName", &m.RuleName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. -func (m MetricSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aggregationType", m.AggregationType) - populate(objectMap, "availabilities", m.Availabilities) - populate(objectMap, "dimensions", m.Dimensions) - populate(objectMap, "displayDescription", m.DisplayDescription) - populate(objectMap, "displayName", m.DisplayName) - populate(objectMap, "enableRegionalMdmAccount", m.EnableRegionalMdmAccount) - populate(objectMap, "fillGapWithZero", m.FillGapWithZero) - populate(objectMap, "isInternal", m.IsInternal) - populate(objectMap, "metricFilterPattern", m.MetricFilterPattern) - populate(objectMap, "name", m.Name) - populate(objectMap, "resourceIdDimensionNameOverride", m.ResourceIDDimensionNameOverride) - populate(objectMap, "sourceMdmAccount", m.SourceMdmAccount) - populate(objectMap, "sourceMdmNamespace", m.SourceMdmNamespace) - populate(objectMap, "unit", m.Unit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. -func (m *MetricSpecification) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aggregationType": - err = unpopulate(val, "AggregationType", &m.AggregationType) - delete(rawMsg, key) - case "availabilities": - err = unpopulate(val, "Availabilities", &m.Availabilities) - delete(rawMsg, key) - case "dimensions": - err = unpopulate(val, "Dimensions", &m.Dimensions) - delete(rawMsg, key) - case "displayDescription": - err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &m.DisplayName) - delete(rawMsg, key) - case "enableRegionalMdmAccount": - err = unpopulate(val, "EnableRegionalMdmAccount", &m.EnableRegionalMdmAccount) - delete(rawMsg, key) - case "fillGapWithZero": - err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) - delete(rawMsg, key) - case "isInternal": - err = unpopulate(val, "IsInternal", &m.IsInternal) - delete(rawMsg, key) - case "metricFilterPattern": - err = unpopulate(val, "MetricFilterPattern", &m.MetricFilterPattern) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "resourceIdDimensionNameOverride": - err = unpopulate(val, "ResourceIDDimensionNameOverride", &m.ResourceIDDimensionNameOverride) - delete(rawMsg, key) - case "sourceMdmAccount": - err = unpopulate(val, "SourceMdmAccount", &m.SourceMdmAccount) - delete(rawMsg, key) - case "sourceMdmNamespace": - err = unpopulate(val, "SourceMdmNamespace", &m.SourceMdmNamespace) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &m.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NatGateway. -func (n NatGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", n.Etag) - populate(objectMap, "id", n.ID) - populate(objectMap, "location", n.Location) - populate(objectMap, "name", n.Name) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "sku", n.SKU) - populate(objectMap, "tags", n.Tags) - populate(objectMap, "type", n.Type) - populate(objectMap, "zones", n.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NatGateway. -func (n *NatGateway) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &n.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &n.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &n.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &n.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &n.SKU) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &n.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &n.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NatGatewayListResult. -func (n NatGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", n.NextLink) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NatGatewayListResult. -func (n *NatGatewayListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &n.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NatGatewayPropertiesFormat. -func (n NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "idleTimeoutInMinutes", n.IdleTimeoutInMinutes) - populate(objectMap, "provisioningState", n.ProvisioningState) - populate(objectMap, "publicIpAddresses", n.PublicIPAddresses) - populate(objectMap, "publicIpPrefixes", n.PublicIPPrefixes) - populate(objectMap, "resourceGuid", n.ResourceGUID) - populate(objectMap, "subnets", n.Subnets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NatGatewayPropertiesFormat. -func (n *NatGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "idleTimeoutInMinutes": - err = unpopulate(val, "IdleTimeoutInMinutes", &n.IdleTimeoutInMinutes) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) - delete(rawMsg, key) - case "publicIpAddresses": - err = unpopulate(val, "PublicIPAddresses", &n.PublicIPAddresses) - delete(rawMsg, key) - case "publicIpPrefixes": - err = unpopulate(val, "PublicIPPrefixes", &n.PublicIPPrefixes) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &n.ResourceGUID) - delete(rawMsg, key) - case "subnets": - err = unpopulate(val, "Subnets", &n.Subnets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NatGatewaySKU. -func (n NatGatewaySKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", n.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NatGatewaySKU. -func (n *NatGatewaySKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NatRule. -func (n NatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", n.Description) - populate(objectMap, "destinationAddresses", n.DestinationAddresses) - populate(objectMap, "destinationPorts", n.DestinationPorts) - populate(objectMap, "ipProtocols", n.IPProtocols) - populate(objectMap, "name", n.Name) - objectMap["ruleType"] = FirewallPolicyRuleTypeNatRule - populate(objectMap, "sourceAddresses", n.SourceAddresses) - populate(objectMap, "sourceIpGroups", n.SourceIPGroups) - populate(objectMap, "translatedAddress", n.TranslatedAddress) - populate(objectMap, "translatedFqdn", n.TranslatedFqdn) - populate(objectMap, "translatedPort", n.TranslatedPort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NatRule. -func (n *NatRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &n.Description) - delete(rawMsg, key) - case "destinationAddresses": - err = unpopulate(val, "DestinationAddresses", &n.DestinationAddresses) - delete(rawMsg, key) - case "destinationPorts": - err = unpopulate(val, "DestinationPorts", &n.DestinationPorts) - delete(rawMsg, key) - case "ipProtocols": - err = unpopulate(val, "IPProtocols", &n.IPProtocols) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - case "ruleType": - err = unpopulate(val, "RuleType", &n.RuleType) - delete(rawMsg, key) - case "sourceAddresses": - err = unpopulate(val, "SourceAddresses", &n.SourceAddresses) - delete(rawMsg, key) - case "sourceIpGroups": - err = unpopulate(val, "SourceIPGroups", &n.SourceIPGroups) - delete(rawMsg, key) - case "translatedAddress": - err = unpopulate(val, "TranslatedAddress", &n.TranslatedAddress) - delete(rawMsg, key) - case "translatedFqdn": - err = unpopulate(val, "TranslatedFqdn", &n.TranslatedFqdn) - delete(rawMsg, key) - case "translatedPort": - err = unpopulate(val, "TranslatedPort", &n.TranslatedPort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NatRulePortMapping. -func (n NatRulePortMapping) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendPort", n.BackendPort) - populate(objectMap, "frontendPort", n.FrontendPort) - populate(objectMap, "inboundNatRuleName", n.InboundNatRuleName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NatRulePortMapping. -func (n *NatRulePortMapping) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backendPort": - err = unpopulate(val, "BackendPort", &n.BackendPort) - delete(rawMsg, key) - case "frontendPort": - err = unpopulate(val, "FrontendPort", &n.FrontendPort) - delete(rawMsg, key) - case "inboundNatRuleName": - err = unpopulate(val, "InboundNatRuleName", &n.InboundNatRuleName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NextHopParameters. -func (n NextHopParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationIPAddress", n.DestinationIPAddress) - populate(objectMap, "sourceIPAddress", n.SourceIPAddress) - populate(objectMap, "targetNicResourceId", n.TargetNicResourceID) - populate(objectMap, "targetResourceId", n.TargetResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NextHopParameters. -func (n *NextHopParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinationIPAddress": - err = unpopulate(val, "DestinationIPAddress", &n.DestinationIPAddress) - delete(rawMsg, key) - case "sourceIPAddress": - err = unpopulate(val, "SourceIPAddress", &n.SourceIPAddress) - delete(rawMsg, key) - case "targetNicResourceId": - err = unpopulate(val, "TargetNicResourceID", &n.TargetNicResourceID) - delete(rawMsg, key) - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &n.TargetResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NextHopResult. -func (n NextHopResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextHopIpAddress", n.NextHopIPAddress) - populate(objectMap, "nextHopType", n.NextHopType) - populate(objectMap, "routeTableId", n.RouteTableID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NextHopResult. -func (n *NextHopResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextHopIpAddress": - err = unpopulate(val, "NextHopIPAddress", &n.NextHopIPAddress) - delete(rawMsg, key) - case "nextHopType": - err = unpopulate(val, "NextHopType", &n.NextHopType) - delete(rawMsg, key) - case "routeTableId": - err = unpopulate(val, "RouteTableID", &n.RouteTableID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type O365BreakOutCategoryPolicies. -func (o O365BreakOutCategoryPolicies) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allow", o.Allow) - populate(objectMap, "default", o.Default) - populate(objectMap, "optimize", o.Optimize) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type O365BreakOutCategoryPolicies. -func (o *O365BreakOutCategoryPolicies) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allow": - err = unpopulate(val, "Allow", &o.Allow) - delete(rawMsg, key) - case "default": - err = unpopulate(val, "Default", &o.Default) - delete(rawMsg, key) - case "optimize": - err = unpopulate(val, "Optimize", &o.Optimize) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type O365PolicyProperties. -func (o O365PolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "breakOutCategories", o.BreakOutCategories) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type O365PolicyProperties. -func (o *O365PolicyProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "breakOutCategories": - err = unpopulate(val, "BreakOutCategories", &o.BreakOutCategories) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Office365PolicyProperties. -func (o Office365PolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "breakOutCategories", o.BreakOutCategories) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Office365PolicyProperties. -func (o *Office365PolicyProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "breakOutCategories": - err = unpopulate(val, "BreakOutCategories", &o.BreakOutCategories) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "display", o.Display) - populate(objectMap, "name", o.Name) - populate(objectMap, "origin", o.Origin) - populate(objectMap, "properties", o.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. -func (o *Operation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "display": - err = unpopulate(val, "Display", &o.Display) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &o.Origin) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. -func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", o.Description) - populate(objectMap, "operation", o.Operation) - populate(objectMap, "provider", o.Provider) - populate(objectMap, "resource", o.Resource) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. -func (o *OperationDisplay) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &o.Operation) - delete(rawMsg, key) - case "provider": - err = unpopulate(val, "Provider", &o.Provider) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &o.Resource) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. -func (o *OperationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationPropertiesFormat. -func (o OperationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "serviceSpecification", o.ServiceSpecification) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationPropertiesFormat. -func (o *OperationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "serviceSpecification": - err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationPropertiesFormatServiceSpecification. -func (o OperationPropertiesFormatServiceSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "logSpecifications", o.LogSpecifications) - populate(objectMap, "metricSpecifications", o.MetricSpecifications) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationPropertiesFormatServiceSpecification. -func (o *OperationPropertiesFormatServiceSpecification) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "logSpecifications": - err = unpopulate(val, "LogSpecifications", &o.LogSpecifications) - delete(rawMsg, key) - case "metricSpecifications": - err = unpopulate(val, "MetricSpecifications", &o.MetricSpecifications) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OrderBy. -func (o OrderBy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "field", o.Field) - populate(objectMap, "order", o.Order) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OrderBy. -func (o *OrderBy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "field": - err = unpopulate(val, "Field", &o.Field) - delete(rawMsg, key) - case "order": - err = unpopulate(val, "Order", &o.Order) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OutboundRule. -func (o OutboundRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", o.Etag) - populate(objectMap, "id", o.ID) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "type", o.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundRule. -func (o *OutboundRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &o.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &o.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OutboundRulePropertiesFormat. -func (o OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allocatedOutboundPorts", o.AllocatedOutboundPorts) - populate(objectMap, "backendAddressPool", o.BackendAddressPool) - populate(objectMap, "enableTcpReset", o.EnableTCPReset) - populate(objectMap, "frontendIPConfigurations", o.FrontendIPConfigurations) - populate(objectMap, "idleTimeoutInMinutes", o.IdleTimeoutInMinutes) - populate(objectMap, "protocol", o.Protocol) - populate(objectMap, "provisioningState", o.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundRulePropertiesFormat. -func (o *OutboundRulePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allocatedOutboundPorts": - err = unpopulate(val, "AllocatedOutboundPorts", &o.AllocatedOutboundPorts) - delete(rawMsg, key) - case "backendAddressPool": - err = unpopulate(val, "BackendAddressPool", &o.BackendAddressPool) - delete(rawMsg, key) - case "enableTcpReset": - err = unpopulate(val, "EnableTCPReset", &o.EnableTCPReset) - delete(rawMsg, key) - case "frontendIPConfigurations": - err = unpopulate(val, "FrontendIPConfigurations", &o.FrontendIPConfigurations) - delete(rawMsg, key) - case "idleTimeoutInMinutes": - err = unpopulate(val, "IdleTimeoutInMinutes", &o.IdleTimeoutInMinutes) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &o.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OwaspCrsExclusionEntry. -func (o OwaspCrsExclusionEntry) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "exclusionManagedRuleSets", o.ExclusionManagedRuleSets) - populate(objectMap, "matchVariable", o.MatchVariable) - populate(objectMap, "selector", o.Selector) - populate(objectMap, "selectorMatchOperator", o.SelectorMatchOperator) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OwaspCrsExclusionEntry. -func (o *OwaspCrsExclusionEntry) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "exclusionManagedRuleSets": - err = unpopulate(val, "ExclusionManagedRuleSets", &o.ExclusionManagedRuleSets) - delete(rawMsg, key) - case "matchVariable": - err = unpopulate(val, "MatchVariable", &o.MatchVariable) - delete(rawMsg, key) - case "selector": - err = unpopulate(val, "Selector", &o.Selector) - delete(rawMsg, key) - case "selectorMatchOperator": - err = unpopulate(val, "SelectorMatchOperator", &o.SelectorMatchOperator) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type P2SConnectionConfiguration. -func (p P2SConnectionConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type P2SConnectionConfiguration. -func (p *P2SConnectionConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type P2SConnectionConfigurationProperties. -func (p P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "configurationPolicyGroupAssociations", p.ConfigurationPolicyGroupAssociations) - populate(objectMap, "enableInternetSecurity", p.EnableInternetSecurity) - populate(objectMap, "previousConfigurationPolicyGroupAssociations", p.PreviousConfigurationPolicyGroupAssociations) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "routingConfiguration", p.RoutingConfiguration) - populate(objectMap, "vpnClientAddressPool", p.VPNClientAddressPool) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type P2SConnectionConfigurationProperties. -func (p *P2SConnectionConfigurationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "configurationPolicyGroupAssociations": - err = unpopulate(val, "ConfigurationPolicyGroupAssociations", &p.ConfigurationPolicyGroupAssociations) - delete(rawMsg, key) - case "enableInternetSecurity": - err = unpopulate(val, "EnableInternetSecurity", &p.EnableInternetSecurity) - delete(rawMsg, key) - case "previousConfigurationPolicyGroupAssociations": - err = unpopulate(val, "PreviousConfigurationPolicyGroupAssociations", &p.PreviousConfigurationPolicyGroupAssociations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "routingConfiguration": - err = unpopulate(val, "RoutingConfiguration", &p.RoutingConfiguration) - delete(rawMsg, key) - case "vpnClientAddressPool": - err = unpopulate(val, "VPNClientAddressPool", &p.VPNClientAddressPool) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionHealth. -func (p P2SVPNConnectionHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "sasUrl", p.SasURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNConnectionHealth. -func (p *P2SVPNConnectionHealth) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "sasUrl": - err = unpopulate(val, "SasURL", &p.SasURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionHealthRequest. -func (p P2SVPNConnectionHealthRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "outputBlobSasUrl", p.OutputBlobSasURL) - populate(objectMap, "vpnUserNamesFilter", p.VPNUserNamesFilter) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNConnectionHealthRequest. -func (p *P2SVPNConnectionHealthRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "outputBlobSasUrl": - err = unpopulate(val, "OutputBlobSasURL", &p.OutputBlobSasURL) - delete(rawMsg, key) - case "vpnUserNamesFilter": - err = unpopulate(val, "VPNUserNamesFilter", &p.VPNUserNamesFilter) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionRequest. -func (p P2SVPNConnectionRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "vpnConnectionIds", p.VPNConnectionIDs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNConnectionRequest. -func (p *P2SVPNConnectionRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "vpnConnectionIds": - err = unpopulate(val, "VPNConnectionIDs", &p.VPNConnectionIDs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type P2SVPNGateway. -func (p P2SVPNGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNGateway. -func (p *P2SVPNGateway) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type P2SVPNGatewayProperties. -func (p P2SVPNGatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customDnsServers", p.CustomDNSServers) - populate(objectMap, "isRoutingPreferenceInternet", p.IsRoutingPreferenceInternet) - populate(objectMap, "p2SConnectionConfigurations", p.P2SConnectionConfigurations) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "vpnClientConnectionHealth", p.VPNClientConnectionHealth) - populate(objectMap, "vpnGatewayScaleUnit", p.VPNGatewayScaleUnit) - populate(objectMap, "vpnServerConfiguration", p.VPNServerConfiguration) - populate(objectMap, "virtualHub", p.VirtualHub) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNGatewayProperties. -func (p *P2SVPNGatewayProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customDnsServers": - err = unpopulate(val, "CustomDNSServers", &p.CustomDNSServers) - delete(rawMsg, key) - case "isRoutingPreferenceInternet": - err = unpopulate(val, "IsRoutingPreferenceInternet", &p.IsRoutingPreferenceInternet) - delete(rawMsg, key) - case "p2SConnectionConfigurations": - err = unpopulate(val, "P2SConnectionConfigurations", &p.P2SConnectionConfigurations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "vpnClientConnectionHealth": - err = unpopulate(val, "VPNClientConnectionHealth", &p.VPNClientConnectionHealth) - delete(rawMsg, key) - case "vpnGatewayScaleUnit": - err = unpopulate(val, "VPNGatewayScaleUnit", &p.VPNGatewayScaleUnit) - delete(rawMsg, key) - case "vpnServerConfiguration": - err = unpopulate(val, "VPNServerConfiguration", &p.VPNServerConfiguration) - delete(rawMsg, key) - case "virtualHub": - err = unpopulate(val, "VirtualHub", &p.VirtualHub) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type P2SVPNProfileParameters. -func (p P2SVPNProfileParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authenticationMethod", p.AuthenticationMethod) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNProfileParameters. -func (p *P2SVPNProfileParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authenticationMethod": - err = unpopulate(val, "AuthenticationMethod", &p.AuthenticationMethod) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PacketCapture. -func (p PacketCapture) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCapture. -func (p *PacketCapture) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureFilter. -func (p PacketCaptureFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "localIPAddress", p.LocalIPAddress) - populate(objectMap, "localPort", p.LocalPort) - populate(objectMap, "protocol", p.Protocol) - populate(objectMap, "remoteIPAddress", p.RemoteIPAddress) - populate(objectMap, "remotePort", p.RemotePort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureFilter. -func (p *PacketCaptureFilter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "localIPAddress": - err = unpopulate(val, "LocalIPAddress", &p.LocalIPAddress) - delete(rawMsg, key) - case "localPort": - err = unpopulate(val, "LocalPort", &p.LocalPort) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &p.Protocol) - delete(rawMsg, key) - case "remoteIPAddress": - err = unpopulate(val, "RemoteIPAddress", &p.RemoteIPAddress) - delete(rawMsg, key) - case "remotePort": - err = unpopulate(val, "RemotePort", &p.RemotePort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureListResult. -func (p PacketCaptureListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureListResult. -func (p *PacketCaptureListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureMachineScope. -func (p PacketCaptureMachineScope) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "exclude", p.Exclude) - populate(objectMap, "include", p.Include) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureMachineScope. -func (p *PacketCaptureMachineScope) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "exclude": - err = unpopulate(val, "Exclude", &p.Exclude) - delete(rawMsg, key) - case "include": - err = unpopulate(val, "Include", &p.Include) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureParameters. -func (p PacketCaptureParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) - populate(objectMap, "filters", p.Filters) - populate(objectMap, "scope", p.Scope) - populate(objectMap, "storageLocation", p.StorageLocation) - populate(objectMap, "target", p.Target) - populate(objectMap, "targetType", p.TargetType) - populate(objectMap, "timeLimitInSeconds", p.TimeLimitInSeconds) - populate(objectMap, "totalBytesPerSession", p.TotalBytesPerSession) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureParameters. -func (p *PacketCaptureParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bytesToCapturePerPacket": - err = unpopulate(val, "BytesToCapturePerPacket", &p.BytesToCapturePerPacket) - delete(rawMsg, key) - case "filters": - err = unpopulate(val, "Filters", &p.Filters) - delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &p.Scope) - delete(rawMsg, key) - case "storageLocation": - err = unpopulate(val, "StorageLocation", &p.StorageLocation) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &p.Target) - delete(rawMsg, key) - case "targetType": - err = unpopulate(val, "TargetType", &p.TargetType) - delete(rawMsg, key) - case "timeLimitInSeconds": - err = unpopulate(val, "TimeLimitInSeconds", &p.TimeLimitInSeconds) - delete(rawMsg, key) - case "totalBytesPerSession": - err = unpopulate(val, "TotalBytesPerSession", &p.TotalBytesPerSession) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureQueryStatusResult. -func (p PacketCaptureQueryStatusResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "captureStartTime", p.CaptureStartTime) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "packetCaptureError", p.PacketCaptureError) - populate(objectMap, "packetCaptureStatus", p.PacketCaptureStatus) - populate(objectMap, "stopReason", p.StopReason) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureQueryStatusResult. -func (p *PacketCaptureQueryStatusResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "captureStartTime": - err = unpopulateTimeRFC3339(val, "CaptureStartTime", &p.CaptureStartTime) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "packetCaptureError": - err = unpopulate(val, "PacketCaptureError", &p.PacketCaptureError) - delete(rawMsg, key) - case "packetCaptureStatus": - err = unpopulate(val, "PacketCaptureStatus", &p.PacketCaptureStatus) - delete(rawMsg, key) - case "stopReason": - err = unpopulate(val, "StopReason", &p.StopReason) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureResult. -func (p PacketCaptureResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureResult. -func (p *PacketCaptureResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureResultProperties. -func (p PacketCaptureResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) - populate(objectMap, "filters", p.Filters) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "scope", p.Scope) - populate(objectMap, "storageLocation", p.StorageLocation) - populate(objectMap, "target", p.Target) - populate(objectMap, "targetType", p.TargetType) - populate(objectMap, "timeLimitInSeconds", p.TimeLimitInSeconds) - populate(objectMap, "totalBytesPerSession", p.TotalBytesPerSession) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureResultProperties. -func (p *PacketCaptureResultProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bytesToCapturePerPacket": - err = unpopulate(val, "BytesToCapturePerPacket", &p.BytesToCapturePerPacket) - delete(rawMsg, key) - case "filters": - err = unpopulate(val, "Filters", &p.Filters) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &p.Scope) - delete(rawMsg, key) - case "storageLocation": - err = unpopulate(val, "StorageLocation", &p.StorageLocation) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &p.Target) - delete(rawMsg, key) - case "targetType": - err = unpopulate(val, "TargetType", &p.TargetType) - delete(rawMsg, key) - case "timeLimitInSeconds": - err = unpopulate(val, "TimeLimitInSeconds", &p.TimeLimitInSeconds) - delete(rawMsg, key) - case "totalBytesPerSession": - err = unpopulate(val, "TotalBytesPerSession", &p.TotalBytesPerSession) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureStorageLocation. -func (p PacketCaptureStorageLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filePath", p.FilePath) - populate(objectMap, "storageId", p.StorageID) - populate(objectMap, "storagePath", p.StoragePath) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureStorageLocation. -func (p *PacketCaptureStorageLocation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "filePath": - err = unpopulate(val, "FilePath", &p.FilePath) - delete(rawMsg, key) - case "storageId": - err = unpopulate(val, "StorageID", &p.StorageID) - delete(rawMsg, key) - case "storagePath": - err = unpopulate(val, "StoragePath", &p.StoragePath) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PatchObject. -func (p PatchObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tags", p.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PatchObject. -func (p *PatchObject) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PatchRouteFilter. -func (p PatchRouteFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PatchRouteFilter. -func (p *PatchRouteFilter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PatchRouteFilterRule. -func (p PatchRouteFilterRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PatchRouteFilterRule. -func (p *PatchRouteFilterRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnection. -func (p PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PeerExpressRouteCircuitConnection. -func (p *PeerExpressRouteCircuitConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnectionListResult. -func (p PeerExpressRouteCircuitConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PeerExpressRouteCircuitConnectionListResult. -func (p *PeerExpressRouteCircuitConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnectionPropertiesFormat. -func (p PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", p.AddressPrefix) - populate(objectMap, "authResourceGuid", p.AuthResourceGUID) - populate(objectMap, "circuitConnectionStatus", p.CircuitConnectionStatus) - populate(objectMap, "connectionName", p.ConnectionName) - populate(objectMap, "expressRouteCircuitPeering", p.ExpressRouteCircuitPeering) - populate(objectMap, "peerExpressRouteCircuitPeering", p.PeerExpressRouteCircuitPeering) - populate(objectMap, "provisioningState", p.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PeerExpressRouteCircuitConnectionPropertiesFormat. -func (p *PeerExpressRouteCircuitConnectionPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefix": - err = unpopulate(val, "AddressPrefix", &p.AddressPrefix) - delete(rawMsg, key) - case "authResourceGuid": - err = unpopulate(val, "AuthResourceGUID", &p.AuthResourceGUID) - delete(rawMsg, key) - case "circuitConnectionStatus": - err = unpopulate(val, "CircuitConnectionStatus", &p.CircuitConnectionStatus) - delete(rawMsg, key) - case "connectionName": - err = unpopulate(val, "ConnectionName", &p.ConnectionName) - delete(rawMsg, key) - case "expressRouteCircuitPeering": - err = unpopulate(val, "ExpressRouteCircuitPeering", &p.ExpressRouteCircuitPeering) - delete(rawMsg, key) - case "peerExpressRouteCircuitPeering": - err = unpopulate(val, "PeerExpressRouteCircuitPeering", &p.PeerExpressRouteCircuitPeering) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PeerRoute. -func (p PeerRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "asPath", p.AsPath) - populate(objectMap, "localAddress", p.LocalAddress) - populate(objectMap, "network", p.Network) - populate(objectMap, "nextHop", p.NextHop) - populate(objectMap, "origin", p.Origin) - populate(objectMap, "sourcePeer", p.SourcePeer) - populate(objectMap, "weight", p.Weight) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PeerRoute. -func (p *PeerRoute) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "asPath": - err = unpopulate(val, "AsPath", &p.AsPath) - delete(rawMsg, key) - case "localAddress": - err = unpopulate(val, "LocalAddress", &p.LocalAddress) - delete(rawMsg, key) - case "network": - err = unpopulate(val, "Network", &p.Network) - delete(rawMsg, key) - case "nextHop": - err = unpopulate(val, "NextHop", &p.NextHop) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &p.Origin) - delete(rawMsg, key) - case "sourcePeer": - err = unpopulate(val, "SourcePeer", &p.SourcePeer) - delete(rawMsg, key) - case "weight": - err = unpopulate(val, "Weight", &p.Weight) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PeerRouteList. -func (p PeerRouteList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PeerRouteList. -func (p *PeerRouteList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicySettings. -func (p PolicySettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fileUploadLimitInMb", p.FileUploadLimitInMb) - populate(objectMap, "maxRequestBodySizeInKb", p.MaxRequestBodySizeInKb) - populate(objectMap, "mode", p.Mode) - populate(objectMap, "requestBodyCheck", p.RequestBodyCheck) - populate(objectMap, "state", p.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicySettings. -func (p *PolicySettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fileUploadLimitInMb": - err = unpopulate(val, "FileUploadLimitInMb", &p.FileUploadLimitInMb) - delete(rawMsg, key) - case "maxRequestBodySizeInKb": - err = unpopulate(val, "MaxRequestBodySizeInKb", &p.MaxRequestBodySizeInKb) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &p.Mode) - delete(rawMsg, key) - case "requestBodyCheck": - err = unpopulate(val, "RequestBodyCheck", &p.RequestBodyCheck) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &p.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrepareNetworkPoliciesRequest. -func (p PrepareNetworkPoliciesRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "networkIntentPolicyConfigurations", p.NetworkIntentPolicyConfigurations) - populate(objectMap, "serviceName", p.ServiceName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrepareNetworkPoliciesRequest. -func (p *PrepareNetworkPoliciesRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "networkIntentPolicyConfigurations": - err = unpopulate(val, "NetworkIntentPolicyConfigurations", &p.NetworkIntentPolicyConfigurations) - delete(rawMsg, key) - case "serviceName": - err = unpopulate(val, "ServiceName", &p.ServiceName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneConfig. -func (p PrivateDNSZoneConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateDNSZoneConfig. -func (p *PrivateDNSZoneConfig) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroup. -func (p PrivateDNSZoneGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateDNSZoneGroup. -func (p *PrivateDNSZoneGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroupListResult. -func (p PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateDNSZoneGroupListResult. -func (p *PrivateDNSZoneGroupListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroupPropertiesFormat. -func (p PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateDnsZoneConfigs", p.PrivateDNSZoneConfigs) - populate(objectMap, "provisioningState", p.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateDNSZoneGroupPropertiesFormat. -func (p *PrivateDNSZoneGroupPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateDnsZoneConfigs": - err = unpopulate(val, "PrivateDNSZoneConfigs", &p.PrivateDNSZoneConfigs) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZonePropertiesFormat. -func (p PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateDnsZoneId", p.PrivateDNSZoneID) - populate(objectMap, "recordSets", p.RecordSets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateDNSZonePropertiesFormat. -func (p *PrivateDNSZonePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateDnsZoneId": - err = unpopulate(val, "PrivateDNSZoneID", &p.PrivateDNSZoneID) - delete(rawMsg, key) - case "recordSets": - err = unpopulate(val, "RecordSets", &p.RecordSets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. -func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. -func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. -func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. -func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. -func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. -func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. -func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "linkIdentifier", p.LinkIdentifier) - populate(objectMap, "privateEndpoint", p.PrivateEndpoint) - populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) - populate(objectMap, "provisioningState", p.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. -func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "linkIdentifier": - err = unpopulate(val, "LinkIdentifier", &p.LinkIdentifier) - delete(rawMsg, key) - case "privateEndpoint": - err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) - delete(rawMsg, key) - case "privateLinkServiceConnectionState": - err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointIPConfiguration. -func (p PrivateEndpointIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointIPConfiguration. -func (p *PrivateEndpointIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointIPConfigurationProperties. -func (p PrivateEndpointIPConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "memberName", p.MemberName) - populate(objectMap, "privateIPAddress", p.PrivateIPAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointIPConfigurationProperties. -func (p *PrivateEndpointIPConfigurationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupId": - err = unpopulate(val, "GroupID", &p.GroupID) - delete(rawMsg, key) - case "memberName": - err = unpopulate(val, "MemberName", &p.MemberName) - delete(rawMsg, key) - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &p.PrivateIPAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointListResult. -func (p PrivateEndpointListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointListResult. -func (p *PrivateEndpointListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperties. -func (p PrivateEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationSecurityGroups", p.ApplicationSecurityGroups) - populate(objectMap, "customDnsConfigs", p.CustomDNSConfigs) - populate(objectMap, "customNetworkInterfaceName", p.CustomNetworkInterfaceName) - populate(objectMap, "ipConfigurations", p.IPConfigurations) - populate(objectMap, "manualPrivateLinkServiceConnections", p.ManualPrivateLinkServiceConnections) - populate(objectMap, "networkInterfaces", p.NetworkInterfaces) - populate(objectMap, "privateLinkServiceConnections", p.PrivateLinkServiceConnections) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "subnet", p.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointProperties. -func (p *PrivateEndpointProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "applicationSecurityGroups": - err = unpopulate(val, "ApplicationSecurityGroups", &p.ApplicationSecurityGroups) - delete(rawMsg, key) - case "customDnsConfigs": - err = unpopulate(val, "CustomDNSConfigs", &p.CustomDNSConfigs) - delete(rawMsg, key) - case "customNetworkInterfaceName": - err = unpopulate(val, "CustomNetworkInterfaceName", &p.CustomNetworkInterfaceName) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &p.IPConfigurations) - delete(rawMsg, key) - case "manualPrivateLinkServiceConnections": - err = unpopulate(val, "ManualPrivateLinkServiceConnections", &p.ManualPrivateLinkServiceConnections) - delete(rawMsg, key) - case "networkInterfaces": - err = unpopulate(val, "NetworkInterfaces", &p.NetworkInterfaces) - delete(rawMsg, key) - case "privateLinkServiceConnections": - err = unpopulate(val, "PrivateLinkServiceConnections", &p.PrivateLinkServiceConnections) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &p.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkService. -func (p PrivateLinkService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkService. -func (p *PrivateLinkService) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnection. -func (p PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnection. -func (p *PrivateLinkServiceConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionProperties. -func (p PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupIds", p.GroupIDs) - populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) - populate(objectMap, "privateLinkServiceId", p.PrivateLinkServiceID) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "requestMessage", p.RequestMessage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionProperties. -func (p *PrivateLinkServiceConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groupIds": - err = unpopulate(val, "GroupIDs", &p.GroupIDs) - delete(rawMsg, key) - case "privateLinkServiceConnectionState": - err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) - delete(rawMsg, key) - case "privateLinkServiceId": - err = unpopulate(val, "PrivateLinkServiceID", &p.PrivateLinkServiceID) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "requestMessage": - err = unpopulate(val, "RequestMessage", &p.RequestMessage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. -func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionsRequired", p.ActionsRequired) - populate(objectMap, "description", p.Description) - populate(objectMap, "status", p.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. -func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionsRequired": - err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceIPConfiguration. -func (p PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceIPConfiguration. -func (p *PrivateLinkServiceIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceIPConfigurationProperties. -func (p PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "primary", p.Primary) - populate(objectMap, "privateIPAddress", p.PrivateIPAddress) - populate(objectMap, "privateIPAddressVersion", p.PrivateIPAddressVersion) - populate(objectMap, "privateIPAllocationMethod", p.PrivateIPAllocationMethod) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "subnet", p.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceIPConfigurationProperties. -func (p *PrivateLinkServiceIPConfigurationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "primary": - err = unpopulate(val, "Primary", &p.Primary) - delete(rawMsg, key) - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &p.PrivateIPAddress) - delete(rawMsg, key) - case "privateIPAddressVersion": - err = unpopulate(val, "PrivateIPAddressVersion", &p.PrivateIPAddressVersion) - delete(rawMsg, key) - case "privateIPAllocationMethod": - err = unpopulate(val, "PrivateIPAllocationMethod", &p.PrivateIPAllocationMethod) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &p.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceListResult. -func (p PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceListResult. -func (p *PrivateLinkServiceListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceProperties. -func (p PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "alias", p.Alias) - populate(objectMap, "autoApproval", p.AutoApproval) - populate(objectMap, "enableProxyProtocol", p.EnableProxyProtocol) - populate(objectMap, "fqdns", p.Fqdns) - populate(objectMap, "ipConfigurations", p.IPConfigurations) - populate(objectMap, "loadBalancerFrontendIpConfigurations", p.LoadBalancerFrontendIPConfigurations) - populate(objectMap, "networkInterfaces", p.NetworkInterfaces) - populate(objectMap, "privateEndpointConnections", p.PrivateEndpointConnections) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "visibility", p.Visibility) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceProperties. -func (p *PrivateLinkServiceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "alias": - err = unpopulate(val, "Alias", &p.Alias) - delete(rawMsg, key) - case "autoApproval": - err = unpopulate(val, "AutoApproval", &p.AutoApproval) - delete(rawMsg, key) - case "enableProxyProtocol": - err = unpopulate(val, "EnableProxyProtocol", &p.EnableProxyProtocol) - delete(rawMsg, key) - case "fqdns": - err = unpopulate(val, "Fqdns", &p.Fqdns) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &p.IPConfigurations) - delete(rawMsg, key) - case "loadBalancerFrontendIpConfigurations": - err = unpopulate(val, "LoadBalancerFrontendIPConfigurations", &p.LoadBalancerFrontendIPConfigurations) - delete(rawMsg, key) - case "networkInterfaces": - err = unpopulate(val, "NetworkInterfaces", &p.NetworkInterfaces) - delete(rawMsg, key) - case "privateEndpointConnections": - err = unpopulate(val, "PrivateEndpointConnections", &p.PrivateEndpointConnections) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "visibility": - err = unpopulate(val, "Visibility", &p.Visibility) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServicePropertiesAutoApproval. -func (p PrivateLinkServicePropertiesAutoApproval) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "subscriptions", p.Subscriptions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServicePropertiesAutoApproval. -func (p *PrivateLinkServicePropertiesAutoApproval) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "subscriptions": - err = unpopulate(val, "Subscriptions", &p.Subscriptions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServicePropertiesVisibility. -func (p PrivateLinkServicePropertiesVisibility) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "subscriptions", p.Subscriptions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServicePropertiesVisibility. -func (p *PrivateLinkServicePropertiesVisibility) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "subscriptions": - err = unpopulate(val, "Subscriptions", &p.Subscriptions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceVisibility. -func (p PrivateLinkServiceVisibility) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "visible", p.Visible) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceVisibility. -func (p *PrivateLinkServiceVisibility) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "visible": - err = unpopulate(val, "Visible", &p.Visible) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Probe. -func (p Probe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Probe. -func (p *Probe) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProbePropertiesFormat. -func (p ProbePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "intervalInSeconds", p.IntervalInSeconds) - populate(objectMap, "loadBalancingRules", p.LoadBalancingRules) - populate(objectMap, "numberOfProbes", p.NumberOfProbes) - populate(objectMap, "port", p.Port) - populate(objectMap, "protocol", p.Protocol) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "requestPath", p.RequestPath) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProbePropertiesFormat. -func (p *ProbePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "intervalInSeconds": - err = unpopulate(val, "IntervalInSeconds", &p.IntervalInSeconds) - delete(rawMsg, key) - case "loadBalancingRules": - err = unpopulate(val, "LoadBalancingRules", &p.LoadBalancingRules) - delete(rawMsg, key) - case "numberOfProbes": - err = unpopulate(val, "NumberOfProbes", &p.NumberOfProbes) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &p.Port) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &p.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "requestPath": - err = unpopulate(val, "RequestPath", &p.RequestPath) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Profile. -func (p Profile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Profile. -func (p *Profile) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProfileListResult. -func (p ProfileListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileListResult. -func (p *ProfileListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProfilePropertiesFormat. -func (p ProfilePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerNetworkInterfaceConfigurations", p.ContainerNetworkInterfaceConfigurations) - populate(objectMap, "containerNetworkInterfaces", p.ContainerNetworkInterfaces) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "resourceGuid", p.ResourceGUID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProfilePropertiesFormat. -func (p *ProfilePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containerNetworkInterfaceConfigurations": - err = unpopulate(val, "ContainerNetworkInterfaceConfigurations", &p.ContainerNetworkInterfaceConfigurations) - delete(rawMsg, key) - case "containerNetworkInterfaces": - err = unpopulate(val, "ContainerNetworkInterfaces", &p.ContainerNetworkInterfaces) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &p.ResourceGUID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PropagatedRouteTable. -func (p PropagatedRouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ids", p.IDs) - populate(objectMap, "labels", p.Labels) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PropagatedRouteTable. -func (p *PropagatedRouteTable) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ids": - err = unpopulate(val, "IDs", &p.IDs) - delete(rawMsg, key) - case "labels": - err = unpopulate(val, "Labels", &p.Labels) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtocolConfiguration. -func (p ProtocolConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "HTTPConfiguration", p.HTTPConfiguration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtocolConfiguration. -func (p *ProtocolConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "HTTPConfiguration": - err = unpopulate(val, "HTTPConfiguration", &p.HTTPConfiguration) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtocolCustomSettingsFormat. -func (p ProtocolCustomSettingsFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "protocol", p.Protocol) - populate(objectMap, "sourceRateOverride", p.SourceRateOverride) - populate(objectMap, "triggerRateOverride", p.TriggerRateOverride) - populate(objectMap, "triggerSensitivityOverride", p.TriggerSensitivityOverride) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtocolCustomSettingsFormat. -func (p *ProtocolCustomSettingsFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "protocol": - err = unpopulate(val, "Protocol", &p.Protocol) - delete(rawMsg, key) - case "sourceRateOverride": - err = unpopulate(val, "SourceRateOverride", &p.SourceRateOverride) - delete(rawMsg, key) - case "triggerRateOverride": - err = unpopulate(val, "TriggerRateOverride", &p.TriggerRateOverride) - delete(rawMsg, key) - case "triggerSensitivityOverride": - err = unpopulate(val, "TriggerSensitivityOverride", &p.TriggerSensitivityOverride) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicIPAddress. -func (p PublicIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - populate(objectMap, "zones", p.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddress. -func (p *PublicIPAddress) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &p.SKU) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &p.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressDNSSettings. -func (p PublicIPAddressDNSSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "domainNameLabel", p.DomainNameLabel) - populate(objectMap, "fqdn", p.Fqdn) - populate(objectMap, "reverseFqdn", p.ReverseFqdn) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddressDNSSettings. -func (p *PublicIPAddressDNSSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "domainNameLabel": - err = unpopulate(val, "DomainNameLabel", &p.DomainNameLabel) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &p.Fqdn) - delete(rawMsg, key) - case "reverseFqdn": - err = unpopulate(val, "ReverseFqdn", &p.ReverseFqdn) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressListResult. -func (p PublicIPAddressListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddressListResult. -func (p *PublicIPAddressListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressPropertiesFormat. -func (p PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dnsSettings", p.DNSSettings) - populate(objectMap, "ddosSettings", p.DdosSettings) - populate(objectMap, "deleteOption", p.DeleteOption) - populate(objectMap, "ipAddress", p.IPAddress) - populate(objectMap, "ipConfiguration", p.IPConfiguration) - populate(objectMap, "ipTags", p.IPTags) - populate(objectMap, "idleTimeoutInMinutes", p.IdleTimeoutInMinutes) - populate(objectMap, "linkedPublicIPAddress", p.LinkedPublicIPAddress) - populate(objectMap, "migrationPhase", p.MigrationPhase) - populate(objectMap, "natGateway", p.NatGateway) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "publicIPAddressVersion", p.PublicIPAddressVersion) - populate(objectMap, "publicIPAllocationMethod", p.PublicIPAllocationMethod) - populate(objectMap, "publicIPPrefix", p.PublicIPPrefix) - populate(objectMap, "resourceGuid", p.ResourceGUID) - populate(objectMap, "servicePublicIPAddress", p.ServicePublicIPAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddressPropertiesFormat. -func (p *PublicIPAddressPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dnsSettings": - err = unpopulate(val, "DNSSettings", &p.DNSSettings) - delete(rawMsg, key) - case "ddosSettings": - err = unpopulate(val, "DdosSettings", &p.DdosSettings) - delete(rawMsg, key) - case "deleteOption": - err = unpopulate(val, "DeleteOption", &p.DeleteOption) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &p.IPAddress) - delete(rawMsg, key) - case "ipConfiguration": - err = unpopulate(val, "IPConfiguration", &p.IPConfiguration) - delete(rawMsg, key) - case "ipTags": - err = unpopulate(val, "IPTags", &p.IPTags) - delete(rawMsg, key) - case "idleTimeoutInMinutes": - err = unpopulate(val, "IdleTimeoutInMinutes", &p.IdleTimeoutInMinutes) - delete(rawMsg, key) - case "linkedPublicIPAddress": - err = unpopulate(val, "LinkedPublicIPAddress", &p.LinkedPublicIPAddress) - delete(rawMsg, key) - case "migrationPhase": - err = unpopulate(val, "MigrationPhase", &p.MigrationPhase) - delete(rawMsg, key) - case "natGateway": - err = unpopulate(val, "NatGateway", &p.NatGateway) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddressVersion": - err = unpopulate(val, "PublicIPAddressVersion", &p.PublicIPAddressVersion) - delete(rawMsg, key) - case "publicIPAllocationMethod": - err = unpopulate(val, "PublicIPAllocationMethod", &p.PublicIPAllocationMethod) - delete(rawMsg, key) - case "publicIPPrefix": - err = unpopulate(val, "PublicIPPrefix", &p.PublicIPPrefix) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &p.ResourceGUID) - delete(rawMsg, key) - case "servicePublicIPAddress": - err = unpopulate(val, "ServicePublicIPAddress", &p.ServicePublicIPAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressSKU. -func (p PublicIPAddressSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", p.Name) - populate(objectMap, "tier", p.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddressSKU. -func (p *PublicIPAddressSKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &p.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefix. -func (p PublicIPPrefix) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - populate(objectMap, "zones", p.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPPrefix. -func (p *PublicIPPrefix) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &p.Etag) - delete(rawMsg, key) - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &p.SKU) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &p.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixListResult. -func (p PublicIPPrefixListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPPrefixListResult. -func (p *PublicIPPrefixListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixPropertiesFormat. -func (p PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customIPPrefix", p.CustomIPPrefix) - populate(objectMap, "ipPrefix", p.IPPrefix) - populate(objectMap, "ipTags", p.IPTags) - populate(objectMap, "loadBalancerFrontendIpConfiguration", p.LoadBalancerFrontendIPConfiguration) - populate(objectMap, "natGateway", p.NatGateway) - populate(objectMap, "prefixLength", p.PrefixLength) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "publicIPAddressVersion", p.PublicIPAddressVersion) - populate(objectMap, "publicIPAddresses", p.PublicIPAddresses) - populate(objectMap, "resourceGuid", p.ResourceGUID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPPrefixPropertiesFormat. -func (p *PublicIPPrefixPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customIPPrefix": - err = unpopulate(val, "CustomIPPrefix", &p.CustomIPPrefix) - delete(rawMsg, key) - case "ipPrefix": - err = unpopulate(val, "IPPrefix", &p.IPPrefix) - delete(rawMsg, key) - case "ipTags": - err = unpopulate(val, "IPTags", &p.IPTags) - delete(rawMsg, key) - case "loadBalancerFrontendIpConfiguration": - err = unpopulate(val, "LoadBalancerFrontendIPConfiguration", &p.LoadBalancerFrontendIPConfiguration) - delete(rawMsg, key) - case "natGateway": - err = unpopulate(val, "NatGateway", &p.NatGateway) - delete(rawMsg, key) - case "prefixLength": - err = unpopulate(val, "PrefixLength", &p.PrefixLength) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddressVersion": - err = unpopulate(val, "PublicIPAddressVersion", &p.PublicIPAddressVersion) - delete(rawMsg, key) - case "publicIPAddresses": - err = unpopulate(val, "PublicIPAddresses", &p.PublicIPAddresses) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &p.ResourceGUID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixSKU. -func (p PublicIPPrefixSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", p.Name) - populate(objectMap, "tier", p.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPPrefixSKU. -func (p *PublicIPPrefixSKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &p.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QosDefinition. -func (q QosDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationIpRanges", q.DestinationIPRanges) - populate(objectMap, "destinationPortRanges", q.DestinationPortRanges) - populate(objectMap, "markings", q.Markings) - populate(objectMap, "protocol", q.Protocol) - populate(objectMap, "sourceIpRanges", q.SourceIPRanges) - populate(objectMap, "sourcePortRanges", q.SourcePortRanges) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QosDefinition. -func (q *QosDefinition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinationIpRanges": - err = unpopulate(val, "DestinationIPRanges", &q.DestinationIPRanges) - delete(rawMsg, key) - case "destinationPortRanges": - err = unpopulate(val, "DestinationPortRanges", &q.DestinationPortRanges) - delete(rawMsg, key) - case "markings": - err = unpopulate(val, "Markings", &q.Markings) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &q.Protocol) - delete(rawMsg, key) - case "sourceIpRanges": - err = unpopulate(val, "SourceIPRanges", &q.SourceIPRanges) - delete(rawMsg, key) - case "sourcePortRanges": - err = unpopulate(val, "SourcePortRanges", &q.SourcePortRanges) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QosIPRange. -func (q QosIPRange) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "endIP", q.EndIP) - populate(objectMap, "startIP", q.StartIP) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QosIPRange. -func (q *QosIPRange) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endIP": - err = unpopulate(val, "EndIP", &q.EndIP) - delete(rawMsg, key) - case "startIP": - err = unpopulate(val, "StartIP", &q.StartIP) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QosPortRange. -func (q QosPortRange) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "end", q.End) - populate(objectMap, "start", q.Start) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QosPortRange. -func (q *QosPortRange) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "end": - err = unpopulate(val, "End", &q.End) - delete(rawMsg, key) - case "start": - err = unpopulate(val, "Start", &q.Start) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QueryInboundNatRulePortMappingRequest. -func (q QueryInboundNatRulePortMappingRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipAddress", q.IPAddress) - populate(objectMap, "ipConfiguration", q.IPConfiguration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QueryInboundNatRulePortMappingRequest. -func (q *QueryInboundNatRulePortMappingRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ipAddress": - err = unpopulate(val, "IPAddress", &q.IPAddress) - delete(rawMsg, key) - case "ipConfiguration": - err = unpopulate(val, "IPConfiguration", &q.IPConfiguration) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QueryRequestOptions. -func (q QueryRequestOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "skipToken", q.SkipToken) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QueryRequestOptions. -func (q *QueryRequestOptions) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "skipToken": - err = unpopulate(val, "SkipToken", &q.SkipToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QueryResults. -func (q QueryResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "matchingRecordsCount", q.MatchingRecordsCount) - populate(objectMap, "signatures", q.Signatures) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QueryResults. -func (q *QueryResults) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "matchingRecordsCount": - err = unpopulate(val, "MatchingRecordsCount", &q.MatchingRecordsCount) - delete(rawMsg, key) - case "signatures": - err = unpopulate(val, "Signatures", &q.Signatures) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QueryTroubleshootingParameters. -func (q QueryTroubleshootingParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "targetResourceId", q.TargetResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type QueryTroubleshootingParameters. -func (q *QueryTroubleshootingParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &q.TargetResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", q, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RadiusServer. -func (r RadiusServer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "radiusServerAddress", r.RadiusServerAddress) - populate(objectMap, "radiusServerScore", r.RadiusServerScore) - populate(objectMap, "radiusServerSecret", r.RadiusServerSecret) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RadiusServer. -func (r *RadiusServer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "radiusServerAddress": - err = unpopulate(val, "RadiusServerAddress", &r.RadiusServerAddress) - delete(rawMsg, key) - case "radiusServerScore": - err = unpopulate(val, "RadiusServerScore", &r.RadiusServerScore) - delete(rawMsg, key) - case "radiusServerSecret": - err = unpopulate(val, "RadiusServerSecret", &r.RadiusServerSecret) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecordSet. -func (r RecordSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fqdn", r.Fqdn) - populate(objectMap, "ipAddresses", r.IPAddresses) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "recordSetName", r.RecordSetName) - populate(objectMap, "recordType", r.RecordType) - populate(objectMap, "ttl", r.TTL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecordSet. -func (r *RecordSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fqdn": - err = unpopulate(val, "Fqdn", &r.Fqdn) - delete(rawMsg, key) - case "ipAddresses": - err = unpopulate(val, "IPAddresses", &r.IPAddresses) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "recordSetName": - err = unpopulate(val, "RecordSetName", &r.RecordSetName) - delete(rawMsg, key) - case "recordType": - err = unpopulate(val, "RecordType", &r.RecordType) - delete(rawMsg, key) - case "ttl": - err = unpopulate(val, "TTL", &r.TTL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReferencedPublicIPAddress. -func (r ReferencedPublicIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReferencedPublicIPAddress. -func (r *ReferencedPublicIPAddress) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. -func (r *Resource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &r.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLink. -func (r ResourceNavigationLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", r.Etag) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNavigationLink. -func (r *ResourceNavigationLink) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &r.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLinkFormat. -func (r ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "link", r.Link) - populate(objectMap, "linkedResourceType", r.LinkedResourceType) - populate(objectMap, "provisioningState", r.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNavigationLinkFormat. -func (r *ResourceNavigationLinkFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "link": - err = unpopulate(val, "Link", &r.Link) - delete(rawMsg, key) - case "linkedResourceType": - err = unpopulate(val, "LinkedResourceType", &r.LinkedResourceType) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLinksListResult. -func (r ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNavigationLinksListResult. -func (r *ResourceNavigationLinksListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceSet. -func (r ResourceSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "subscriptions", r.Subscriptions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSet. -func (r *ResourceSet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "subscriptions": - err = unpopulate(val, "Subscriptions", &r.Subscriptions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RetentionPolicyParameters. -func (r RetentionPolicyParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "days", r.Days) - populate(objectMap, "enabled", r.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RetentionPolicyParameters. -func (r *RetentionPolicyParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "days": - err = unpopulate(val, "Days", &r.Days) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &r.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Route. -func (r Route) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", r.Etag) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Route. -func (r *Route) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &r.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteFilter. -func (r RouteFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", r.Etag) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilter. -func (r *RouteFilter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &r.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &r.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteFilterListResult. -func (r RouteFilterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilterListResult. -func (r *RouteFilterListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteFilterPropertiesFormat. -func (r RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipv6Peerings", r.IPv6Peerings) - populate(objectMap, "peerings", r.Peerings) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "rules", r.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilterPropertiesFormat. -func (r *RouteFilterPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ipv6Peerings": - err = unpopulate(val, "IPv6Peerings", &r.IPv6Peerings) - delete(rawMsg, key) - case "peerings": - err = unpopulate(val, "Peerings", &r.Peerings) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "rules": - err = unpopulate(val, "Rules", &r.Rules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteFilterRule. -func (r RouteFilterRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", r.Etag) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilterRule. -func (r *RouteFilterRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &r.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteFilterRuleListResult. -func (r RouteFilterRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilterRuleListResult. -func (r *RouteFilterRuleListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteFilterRulePropertiesFormat. -func (r RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "access", r.Access) - populate(objectMap, "communities", r.Communities) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "routeFilterRuleType", r.RouteFilterRuleType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilterRulePropertiesFormat. -func (r *RouteFilterRulePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "access": - err = unpopulate(val, "Access", &r.Access) - delete(rawMsg, key) - case "communities": - err = unpopulate(val, "Communities", &r.Communities) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "routeFilterRuleType": - err = unpopulate(val, "RouteFilterRuleType", &r.RouteFilterRuleType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteListResult. -func (r RouteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteListResult. -func (r *RouteListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RoutePropertiesFormat. -func (r RoutePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", r.AddressPrefix) - populate(objectMap, "hasBgpOverride", r.HasBgpOverride) - populate(objectMap, "nextHopIpAddress", r.NextHopIPAddress) - populate(objectMap, "nextHopType", r.NextHopType) - populate(objectMap, "provisioningState", r.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RoutePropertiesFormat. -func (r *RoutePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefix": - err = unpopulate(val, "AddressPrefix", &r.AddressPrefix) - delete(rawMsg, key) - case "hasBgpOverride": - err = unpopulate(val, "HasBgpOverride", &r.HasBgpOverride) - delete(rawMsg, key) - case "nextHopIpAddress": - err = unpopulate(val, "NextHopIPAddress", &r.NextHopIPAddress) - delete(rawMsg, key) - case "nextHopType": - err = unpopulate(val, "NextHopType", &r.NextHopType) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteTable. -func (r RouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", r.Etag) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteTable. -func (r *RouteTable) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &r.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &r.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteTableListResult. -func (r RouteTableListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteTableListResult. -func (r *RouteTableListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RouteTablePropertiesFormat. -func (r RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disableBgpRoutePropagation", r.DisableBgpRoutePropagation) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "resourceGuid", r.ResourceGUID) - populate(objectMap, "routes", r.Routes) - populate(objectMap, "subnets", r.Subnets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RouteTablePropertiesFormat. -func (r *RouteTablePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disableBgpRoutePropagation": - err = unpopulate(val, "DisableBgpRoutePropagation", &r.DisableBgpRoutePropagation) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &r.ResourceGUID) - delete(rawMsg, key) - case "routes": - err = unpopulate(val, "Routes", &r.Routes) - delete(rawMsg, key) - case "subnets": - err = unpopulate(val, "Subnets", &r.Subnets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RoutingConfiguration. -func (r RoutingConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "associatedRouteTable", r.AssociatedRouteTable) - populate(objectMap, "propagatedRouteTables", r.PropagatedRouteTables) - populate(objectMap, "vnetRoutes", r.VnetRoutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingConfiguration. -func (r *RoutingConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "associatedRouteTable": - err = unpopulate(val, "AssociatedRouteTable", &r.AssociatedRouteTable) - delete(rawMsg, key) - case "propagatedRouteTables": - err = unpopulate(val, "PropagatedRouteTables", &r.PropagatedRouteTables) - delete(rawMsg, key) - case "vnetRoutes": - err = unpopulate(val, "VnetRoutes", &r.VnetRoutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RoutingIntent. -func (r RoutingIntent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", r.Etag) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingIntent. -func (r *RoutingIntent) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &r.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RoutingIntentProperties. -func (r RoutingIntentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "routingPolicies", r.RoutingPolicies) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingIntentProperties. -func (r *RoutingIntentProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) - delete(rawMsg, key) - case "routingPolicies": - err = unpopulate(val, "RoutingPolicies", &r.RoutingPolicies) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RoutingPolicy. -func (r RoutingPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinations", r.Destinations) - populate(objectMap, "name", r.Name) - populate(objectMap, "nextHop", r.NextHop) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingPolicy. -func (r *RoutingPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinations": - err = unpopulate(val, "Destinations", &r.Destinations) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "nextHop": - err = unpopulate(val, "NextHop", &r.NextHop) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Rule. -func (r Rule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", r.Description) - populate(objectMap, "destinationAddresses", r.DestinationAddresses) - populate(objectMap, "destinationFqdns", r.DestinationFqdns) - populate(objectMap, "destinationIpGroups", r.DestinationIPGroups) - populate(objectMap, "destinationPorts", r.DestinationPorts) - populate(objectMap, "ipProtocols", r.IPProtocols) - populate(objectMap, "name", r.Name) - objectMap["ruleType"] = FirewallPolicyRuleTypeNetworkRule - populate(objectMap, "sourceAddresses", r.SourceAddresses) - populate(objectMap, "sourceIpGroups", r.SourceIPGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Rule. -func (r *Rule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &r.Description) - delete(rawMsg, key) - case "destinationAddresses": - err = unpopulate(val, "DestinationAddresses", &r.DestinationAddresses) - delete(rawMsg, key) - case "destinationFqdns": - err = unpopulate(val, "DestinationFqdns", &r.DestinationFqdns) - delete(rawMsg, key) - case "destinationIpGroups": - err = unpopulate(val, "DestinationIPGroups", &r.DestinationIPGroups) - delete(rawMsg, key) - case "destinationPorts": - err = unpopulate(val, "DestinationPorts", &r.DestinationPorts) - delete(rawMsg, key) - case "ipProtocols": - err = unpopulate(val, "IPProtocols", &r.IPProtocols) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "ruleType": - err = unpopulate(val, "RuleType", &r.RuleType) - delete(rawMsg, key) - case "sourceAddresses": - err = unpopulate(val, "SourceAddresses", &r.SourceAddresses) - delete(rawMsg, key) - case "sourceIpGroups": - err = unpopulate(val, "SourceIPGroups", &r.SourceIPGroups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SKU. -func (s SKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", s.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. -func (s *SKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ScopeConnection. -func (s ScopeConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScopeConnection. -func (s *ScopeConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ScopeConnectionListResult. -func (s ScopeConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScopeConnectionListResult. -func (s *ScopeConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ScopeConnectionProperties. -func (s ScopeConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "connectionState", s.ConnectionState) - populate(objectMap, "description", s.Description) - populate(objectMap, "resourceId", s.ResourceID) - populate(objectMap, "tenantId", s.TenantID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScopeConnectionProperties. -func (s *ScopeConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionState": - err = unpopulate(val, "ConnectionState", &s.ConnectionState) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &s.ResourceID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &s.TenantID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityAdminConfiguration. -func (s SecurityAdminConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAdminConfiguration. -func (s *SecurityAdminConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityAdminConfigurationListResult. -func (s SecurityAdminConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAdminConfigurationListResult. -func (s *SecurityAdminConfigurationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityAdminConfigurationPropertiesFormat. -func (s SecurityAdminConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applyOnNetworkIntentPolicyBasedServices", s.ApplyOnNetworkIntentPolicyBasedServices) - populate(objectMap, "description", s.Description) - populate(objectMap, "provisioningState", s.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAdminConfigurationPropertiesFormat. -func (s *SecurityAdminConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "applyOnNetworkIntentPolicyBasedServices": - err = unpopulate(val, "ApplyOnNetworkIntentPolicyBasedServices", &s.ApplyOnNetworkIntentPolicyBasedServices) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityGroup. -func (s SecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroup. -func (s *SecurityGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &s.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityGroupListResult. -func (s SecurityGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupListResult. -func (s *SecurityGroupListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityGroupNetworkInterface. -func (s SecurityGroupNetworkInterface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "securityRuleAssociations", s.SecurityRuleAssociations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupNetworkInterface. -func (s *SecurityGroupNetworkInterface) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "securityRuleAssociations": - err = unpopulate(val, "SecurityRuleAssociations", &s.SecurityRuleAssociations) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityGroupPropertiesFormat. -func (s SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "defaultSecurityRules", s.DefaultSecurityRules) - populate(objectMap, "flowLogs", s.FlowLogs) - populate(objectMap, "flushConnection", s.FlushConnection) - populate(objectMap, "networkInterfaces", s.NetworkInterfaces) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "resourceGuid", s.ResourceGUID) - populate(objectMap, "securityRules", s.SecurityRules) - populate(objectMap, "subnets", s.Subnets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupPropertiesFormat. -func (s *SecurityGroupPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "defaultSecurityRules": - err = unpopulate(val, "DefaultSecurityRules", &s.DefaultSecurityRules) - delete(rawMsg, key) - case "flowLogs": - err = unpopulate(val, "FlowLogs", &s.FlowLogs) - delete(rawMsg, key) - case "flushConnection": - err = unpopulate(val, "FlushConnection", &s.FlushConnection) - delete(rawMsg, key) - case "networkInterfaces": - err = unpopulate(val, "NetworkInterfaces", &s.NetworkInterfaces) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &s.ResourceGUID) - delete(rawMsg, key) - case "securityRules": - err = unpopulate(val, "SecurityRules", &s.SecurityRules) - delete(rawMsg, key) - case "subnets": - err = unpopulate(val, "Subnets", &s.Subnets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityGroupResult. -func (s SecurityGroupResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "evaluatedNetworkSecurityGroups", s.EvaluatedNetworkSecurityGroups) - populate(objectMap, "securityRuleAccessResult", s.SecurityRuleAccessResult) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupResult. -func (s *SecurityGroupResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "evaluatedNetworkSecurityGroups": - err = unpopulate(val, "EvaluatedNetworkSecurityGroups", &s.EvaluatedNetworkSecurityGroups) - delete(rawMsg, key) - case "securityRuleAccessResult": - err = unpopulate(val, "SecurityRuleAccessResult", &s.SecurityRuleAccessResult) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityGroupViewParameters. -func (s SecurityGroupViewParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "targetResourceId", s.TargetResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupViewParameters. -func (s *SecurityGroupViewParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &s.TargetResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityGroupViewResult. -func (s SecurityGroupViewResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "networkInterfaces", s.NetworkInterfaces) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupViewResult. -func (s *SecurityGroupViewResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "networkInterfaces": - err = unpopulate(val, "NetworkInterfaces", &s.NetworkInterfaces) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProvider. -func (s SecurityPartnerProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPartnerProvider. -func (s *SecurityPartnerProvider) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &s.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProviderListResult. -func (s SecurityPartnerProviderListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPartnerProviderListResult. -func (s *SecurityPartnerProviderListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProviderPropertiesFormat. -func (s SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "connectionStatus", s.ConnectionStatus) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "securityProviderName", s.SecurityProviderName) - populate(objectMap, "virtualHub", s.VirtualHub) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPartnerProviderPropertiesFormat. -func (s *SecurityPartnerProviderPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionStatus": - err = unpopulate(val, "ConnectionStatus", &s.ConnectionStatus) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "securityProviderName": - err = unpopulate(val, "SecurityProviderName", &s.SecurityProviderName) - delete(rawMsg, key) - case "virtualHub": - err = unpopulate(val, "VirtualHub", &s.VirtualHub) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityRule. -func (s SecurityRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityRule. -func (s *SecurityRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityRuleAssociations. -func (s SecurityRuleAssociations) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "defaultSecurityRules", s.DefaultSecurityRules) - populate(objectMap, "effectiveSecurityRules", s.EffectiveSecurityRules) - populate(objectMap, "networkInterfaceAssociation", s.NetworkInterfaceAssociation) - populate(objectMap, "subnetAssociation", s.SubnetAssociation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityRuleAssociations. -func (s *SecurityRuleAssociations) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "defaultSecurityRules": - err = unpopulate(val, "DefaultSecurityRules", &s.DefaultSecurityRules) - delete(rawMsg, key) - case "effectiveSecurityRules": - err = unpopulate(val, "EffectiveSecurityRules", &s.EffectiveSecurityRules) - delete(rawMsg, key) - case "networkInterfaceAssociation": - err = unpopulate(val, "NetworkInterfaceAssociation", &s.NetworkInterfaceAssociation) - delete(rawMsg, key) - case "subnetAssociation": - err = unpopulate(val, "SubnetAssociation", &s.SubnetAssociation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityRuleListResult. -func (s SecurityRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityRuleListResult. -func (s *SecurityRuleListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityRulePropertiesFormat. -func (s SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "access", s.Access) - populate(objectMap, "description", s.Description) - populate(objectMap, "destinationAddressPrefix", s.DestinationAddressPrefix) - populate(objectMap, "destinationAddressPrefixes", s.DestinationAddressPrefixes) - populate(objectMap, "destinationApplicationSecurityGroups", s.DestinationApplicationSecurityGroups) - populate(objectMap, "destinationPortRange", s.DestinationPortRange) - populate(objectMap, "destinationPortRanges", s.DestinationPortRanges) - populate(objectMap, "direction", s.Direction) - populate(objectMap, "priority", s.Priority) - populate(objectMap, "protocol", s.Protocol) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "sourceAddressPrefix", s.SourceAddressPrefix) - populate(objectMap, "sourceAddressPrefixes", s.SourceAddressPrefixes) - populate(objectMap, "sourceApplicationSecurityGroups", s.SourceApplicationSecurityGroups) - populate(objectMap, "sourcePortRange", s.SourcePortRange) - populate(objectMap, "sourcePortRanges", s.SourcePortRanges) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityRulePropertiesFormat. -func (s *SecurityRulePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "access": - err = unpopulate(val, "Access", &s.Access) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "destinationAddressPrefix": - err = unpopulate(val, "DestinationAddressPrefix", &s.DestinationAddressPrefix) - delete(rawMsg, key) - case "destinationAddressPrefixes": - err = unpopulate(val, "DestinationAddressPrefixes", &s.DestinationAddressPrefixes) - delete(rawMsg, key) - case "destinationApplicationSecurityGroups": - err = unpopulate(val, "DestinationApplicationSecurityGroups", &s.DestinationApplicationSecurityGroups) - delete(rawMsg, key) - case "destinationPortRange": - err = unpopulate(val, "DestinationPortRange", &s.DestinationPortRange) - delete(rawMsg, key) - case "destinationPortRanges": - err = unpopulate(val, "DestinationPortRanges", &s.DestinationPortRanges) - delete(rawMsg, key) - case "direction": - err = unpopulate(val, "Direction", &s.Direction) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &s.Priority) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &s.Protocol) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "sourceAddressPrefix": - err = unpopulate(val, "SourceAddressPrefix", &s.SourceAddressPrefix) - delete(rawMsg, key) - case "sourceAddressPrefixes": - err = unpopulate(val, "SourceAddressPrefixes", &s.SourceAddressPrefixes) - delete(rawMsg, key) - case "sourceApplicationSecurityGroups": - err = unpopulate(val, "SourceApplicationSecurityGroups", &s.SourceApplicationSecurityGroups) - delete(rawMsg, key) - case "sourcePortRange": - err = unpopulate(val, "SourcePortRange", &s.SourcePortRange) - delete(rawMsg, key) - case "sourcePortRanges": - err = unpopulate(val, "SourcePortRanges", &s.SourcePortRanges) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityRulesEvaluationResult. -func (s SecurityRulesEvaluationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationMatched", s.DestinationMatched) - populate(objectMap, "destinationPortMatched", s.DestinationPortMatched) - populate(objectMap, "name", s.Name) - populate(objectMap, "protocolMatched", s.ProtocolMatched) - populate(objectMap, "sourceMatched", s.SourceMatched) - populate(objectMap, "sourcePortMatched", s.SourcePortMatched) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityRulesEvaluationResult. -func (s *SecurityRulesEvaluationResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinationMatched": - err = unpopulate(val, "DestinationMatched", &s.DestinationMatched) - delete(rawMsg, key) - case "destinationPortMatched": - err = unpopulate(val, "DestinationPortMatched", &s.DestinationPortMatched) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "protocolMatched": - err = unpopulate(val, "ProtocolMatched", &s.ProtocolMatched) - delete(rawMsg, key) - case "sourceMatched": - err = unpopulate(val, "SourceMatched", &s.SourceMatched) - delete(rawMsg, key) - case "sourcePortMatched": - err = unpopulate(val, "SourcePortMatched", &s.SourcePortMatched) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLink. -func (s ServiceAssociationLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceAssociationLink. -func (s *ServiceAssociationLink) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLinkPropertiesFormat. -func (s ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowDelete", s.AllowDelete) - populate(objectMap, "link", s.Link) - populate(objectMap, "linkedResourceType", s.LinkedResourceType) - populate(objectMap, "locations", s.Locations) - populate(objectMap, "provisioningState", s.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceAssociationLinkPropertiesFormat. -func (s *ServiceAssociationLinkPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowDelete": - err = unpopulate(val, "AllowDelete", &s.AllowDelete) - delete(rawMsg, key) - case "link": - err = unpopulate(val, "Link", &s.Link) - delete(rawMsg, key) - case "linkedResourceType": - err = unpopulate(val, "LinkedResourceType", &s.LinkedResourceType) - delete(rawMsg, key) - case "locations": - err = unpopulate(val, "Locations", &s.Locations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLinksListResult. -func (s ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceAssociationLinksListResult. -func (s *ServiceAssociationLinksListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceDelegationPropertiesFormat. -func (s ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actions", s.Actions) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "serviceName", s.ServiceName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceDelegationPropertiesFormat. -func (s *ServiceDelegationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actions": - err = unpopulate(val, "Actions", &s.Actions) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "serviceName": - err = unpopulate(val, "ServiceName", &s.ServiceName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicy. -func (s ServiceEndpointPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicy. -func (s *ServiceEndpointPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &s.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &s.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinition. -func (s ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicyDefinition. -func (s *ServiceEndpointPolicyDefinition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinitionListResult. -func (s ServiceEndpointPolicyDefinitionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicyDefinitionListResult. -func (s *ServiceEndpointPolicyDefinitionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinitionPropertiesFormat. -func (s ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", s.Description) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "service", s.Service) - populate(objectMap, "serviceResources", s.ServiceResources) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicyDefinitionPropertiesFormat. -func (s *ServiceEndpointPolicyDefinitionPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "service": - err = unpopulate(val, "Service", &s.Service) - delete(rawMsg, key) - case "serviceResources": - err = unpopulate(val, "ServiceResources", &s.ServiceResources) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyListResult. -func (s ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicyListResult. -func (s *ServiceEndpointPolicyListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyPropertiesFormat. -func (s ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "contextualServiceEndpointPolicies", s.ContextualServiceEndpointPolicies) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "resourceGuid", s.ResourceGUID) - populate(objectMap, "serviceAlias", s.ServiceAlias) - populate(objectMap, "serviceEndpointPolicyDefinitions", s.ServiceEndpointPolicyDefinitions) - populate(objectMap, "subnets", s.Subnets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicyPropertiesFormat. -func (s *ServiceEndpointPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "contextualServiceEndpointPolicies": - err = unpopulate(val, "ContextualServiceEndpointPolicies", &s.ContextualServiceEndpointPolicies) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &s.ResourceGUID) - delete(rawMsg, key) - case "serviceAlias": - err = unpopulate(val, "ServiceAlias", &s.ServiceAlias) - delete(rawMsg, key) - case "serviceEndpointPolicyDefinitions": - err = unpopulate(val, "ServiceEndpointPolicyDefinitions", &s.ServiceEndpointPolicyDefinitions) - delete(rawMsg, key) - case "subnets": - err = unpopulate(val, "Subnets", &s.Subnets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPropertiesFormat. -func (s ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "locations", s.Locations) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "service", s.Service) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPropertiesFormat. -func (s *ServiceEndpointPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "locations": - err = unpopulate(val, "Locations", &s.Locations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "service": - err = unpopulate(val, "Service", &s.Service) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceTagInformation. -func (s ServiceTagInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "serviceTagChangeNumber", s.ServiceTagChangeNumber) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTagInformation. -func (s *ServiceTagInformation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "serviceTagChangeNumber": - err = unpopulate(val, "ServiceTagChangeNumber", &s.ServiceTagChangeNumber) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceTagInformationListResult. -func (s ServiceTagInformationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTagInformationListResult. -func (s *ServiceTagInformationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceTagInformationPropertiesFormat. -func (s ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefixes", s.AddressPrefixes) - populate(objectMap, "changeNumber", s.ChangeNumber) - populate(objectMap, "region", s.Region) - populate(objectMap, "state", s.State) - populate(objectMap, "systemService", s.SystemService) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTagInformationPropertiesFormat. -func (s *ServiceTagInformationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefixes": - err = unpopulate(val, "AddressPrefixes", &s.AddressPrefixes) - delete(rawMsg, key) - case "changeNumber": - err = unpopulate(val, "ChangeNumber", &s.ChangeNumber) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &s.Region) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &s.State) - delete(rawMsg, key) - case "systemService": - err = unpopulate(val, "SystemService", &s.SystemService) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceTagsListResult. -func (s ServiceTagsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "changeNumber", s.ChangeNumber) - populate(objectMap, "cloud", s.Cloud) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "type", s.Type) - populate(objectMap, "values", s.Values) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTagsListResult. -func (s *ServiceTagsListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "changeNumber": - err = unpopulate(val, "ChangeNumber", &s.ChangeNumber) - delete(rawMsg, key) - case "cloud": - err = unpopulate(val, "Cloud", &s.Cloud) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &s.Values) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SessionIDs. -func (s SessionIDs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "sessionIds", s.SessionIDs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SessionIDs. -func (s *SessionIDs) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "sessionIds": - err = unpopulate(val, "SessionIDs", &s.SessionIDs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SignatureOverridesFilterValuesQuery. -func (s SignatureOverridesFilterValuesQuery) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filterName", s.FilterName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SignatureOverridesFilterValuesQuery. -func (s *SignatureOverridesFilterValuesQuery) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "filterName": - err = unpopulate(val, "FilterName", &s.FilterName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SignatureOverridesFilterValuesResponse. -func (s SignatureOverridesFilterValuesResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filterValues", s.FilterValues) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SignatureOverridesFilterValuesResponse. -func (s *SignatureOverridesFilterValuesResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "filterValues": - err = unpopulate(val, "FilterValues", &s.FilterValues) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SignaturesOverrides. -func (s SignaturesOverrides) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SignaturesOverrides. -func (s *SignaturesOverrides) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SignaturesOverridesList. -func (s SignaturesOverridesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SignaturesOverridesList. -func (s *SignaturesOverridesList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SignaturesOverridesProperties. -func (s SignaturesOverridesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "signatures", s.Signatures) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SignaturesOverridesProperties. -func (s *SignaturesOverridesProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "signatures": - err = unpopulate(val, "Signatures", &s.Signatures) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SingleQueryResult. -func (s SingleQueryResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", s.Description) - populate(objectMap, "destinationPorts", s.DestinationPorts) - populate(objectMap, "direction", s.Direction) - populate(objectMap, "group", s.Group) - populate(objectMap, "inheritedFromParentPolicy", s.InheritedFromParentPolicy) - populate(objectMap, "lastUpdated", s.LastUpdated) - populate(objectMap, "mode", s.Mode) - populate(objectMap, "protocol", s.Protocol) - populate(objectMap, "severity", s.Severity) - populate(objectMap, "signatureId", s.SignatureID) - populate(objectMap, "sourcePorts", s.SourcePorts) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SingleQueryResult. -func (s *SingleQueryResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "destinationPorts": - err = unpopulate(val, "DestinationPorts", &s.DestinationPorts) - delete(rawMsg, key) - case "direction": - err = unpopulate(val, "Direction", &s.Direction) - delete(rawMsg, key) - case "group": - err = unpopulate(val, "Group", &s.Group) - delete(rawMsg, key) - case "inheritedFromParentPolicy": - err = unpopulate(val, "InheritedFromParentPolicy", &s.InheritedFromParentPolicy) - delete(rawMsg, key) - case "lastUpdated": - err = unpopulate(val, "LastUpdated", &s.LastUpdated) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &s.Mode) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &s.Protocol) - delete(rawMsg, key) - case "severity": - err = unpopulate(val, "Severity", &s.Severity) - delete(rawMsg, key) - case "signatureId": - err = unpopulate(val, "SignatureID", &s.SignatureID) - delete(rawMsg, key) - case "sourcePorts": - err = unpopulate(val, "SourcePorts", &s.SourcePorts) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticMember. -func (s StaticMember) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticMember. -func (s *StaticMember) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticMemberListResult. -func (s StaticMemberListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticMemberListResult. -func (s *StaticMemberListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticMemberProperties. -func (s StaticMemberProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "region", s.Region) - populate(objectMap, "resourceId", s.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticMemberProperties. -func (s *StaticMemberProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &s.Region) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &s.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StaticRoute. -func (s StaticRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefixes", s.AddressPrefixes) - populate(objectMap, "name", s.Name) - populate(objectMap, "nextHopIpAddress", s.NextHopIPAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StaticRoute. -func (s *StaticRoute) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefixes": - err = unpopulate(val, "AddressPrefixes", &s.AddressPrefixes) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "nextHopIpAddress": - err = unpopulate(val, "NextHopIPAddress", &s.NextHopIPAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubResource. -func (s SubResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubResource. -func (s *SubResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Subnet. -func (s Subnet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Subnet. -func (s *Subnet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &s.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubnetAssociation. -func (s SubnetAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "securityRules", s.SecurityRules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubnetAssociation. -func (s *SubnetAssociation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "securityRules": - err = unpopulate(val, "SecurityRules", &s.SecurityRules) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubnetListResult. -func (s SubnetListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubnetListResult. -func (s *SubnetListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubnetPropertiesFormat. -func (s SubnetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", s.AddressPrefix) - populate(objectMap, "addressPrefixes", s.AddressPrefixes) - populate(objectMap, "applicationGatewayIpConfigurations", s.ApplicationGatewayIPConfigurations) - populate(objectMap, "delegations", s.Delegations) - populate(objectMap, "ipAllocations", s.IPAllocations) - populate(objectMap, "ipConfigurationProfiles", s.IPConfigurationProfiles) - populate(objectMap, "ipConfigurations", s.IPConfigurations) - populate(objectMap, "natGateway", s.NatGateway) - populate(objectMap, "networkSecurityGroup", s.NetworkSecurityGroup) - populate(objectMap, "privateEndpointNetworkPolicies", s.PrivateEndpointNetworkPolicies) - populate(objectMap, "privateEndpoints", s.PrivateEndpoints) - populate(objectMap, "privateLinkServiceNetworkPolicies", s.PrivateLinkServiceNetworkPolicies) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "purpose", s.Purpose) - populate(objectMap, "resourceNavigationLinks", s.ResourceNavigationLinks) - populate(objectMap, "routeTable", s.RouteTable) - populate(objectMap, "serviceAssociationLinks", s.ServiceAssociationLinks) - populate(objectMap, "serviceEndpointPolicies", s.ServiceEndpointPolicies) - populate(objectMap, "serviceEndpoints", s.ServiceEndpoints) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubnetPropertiesFormat. -func (s *SubnetPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefix": - err = unpopulate(val, "AddressPrefix", &s.AddressPrefix) - delete(rawMsg, key) - case "addressPrefixes": - err = unpopulate(val, "AddressPrefixes", &s.AddressPrefixes) - delete(rawMsg, key) - case "applicationGatewayIpConfigurations": - err = unpopulate(val, "ApplicationGatewayIPConfigurations", &s.ApplicationGatewayIPConfigurations) - delete(rawMsg, key) - case "delegations": - err = unpopulate(val, "Delegations", &s.Delegations) - delete(rawMsg, key) - case "ipAllocations": - err = unpopulate(val, "IPAllocations", &s.IPAllocations) - delete(rawMsg, key) - case "ipConfigurationProfiles": - err = unpopulate(val, "IPConfigurationProfiles", &s.IPConfigurationProfiles) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &s.IPConfigurations) - delete(rawMsg, key) - case "natGateway": - err = unpopulate(val, "NatGateway", &s.NatGateway) - delete(rawMsg, key) - case "networkSecurityGroup": - err = unpopulate(val, "NetworkSecurityGroup", &s.NetworkSecurityGroup) - delete(rawMsg, key) - case "privateEndpointNetworkPolicies": - err = unpopulate(val, "PrivateEndpointNetworkPolicies", &s.PrivateEndpointNetworkPolicies) - delete(rawMsg, key) - case "privateEndpoints": - err = unpopulate(val, "PrivateEndpoints", &s.PrivateEndpoints) - delete(rawMsg, key) - case "privateLinkServiceNetworkPolicies": - err = unpopulate(val, "PrivateLinkServiceNetworkPolicies", &s.PrivateLinkServiceNetworkPolicies) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "purpose": - err = unpopulate(val, "Purpose", &s.Purpose) - delete(rawMsg, key) - case "resourceNavigationLinks": - err = unpopulate(val, "ResourceNavigationLinks", &s.ResourceNavigationLinks) - delete(rawMsg, key) - case "routeTable": - err = unpopulate(val, "RouteTable", &s.RouteTable) - delete(rawMsg, key) - case "serviceAssociationLinks": - err = unpopulate(val, "ServiceAssociationLinks", &s.ServiceAssociationLinks) - delete(rawMsg, key) - case "serviceEndpointPolicies": - err = unpopulate(val, "ServiceEndpointPolicies", &s.ServiceEndpointPolicies) - delete(rawMsg, key) - case "serviceEndpoints": - err = unpopulate(val, "ServiceEndpoints", &s.ServiceEndpoints) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TagsObject. -func (t TagsObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tags", t.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TagsObject. -func (t *TagsObject) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "tags": - err = unpopulate(val, "Tags", &t.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Topology. -func (t Topology) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdDateTime", t.CreatedDateTime) - populate(objectMap, "id", t.ID) - populateTimeRFC3339(objectMap, "lastModified", t.LastModified) - populate(objectMap, "resources", t.Resources) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Topology. -func (t *Topology) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdDateTime": - err = unpopulateTimeRFC3339(val, "CreatedDateTime", &t.CreatedDateTime) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "lastModified": - err = unpopulateTimeRFC3339(val, "LastModified", &t.LastModified) - delete(rawMsg, key) - case "resources": - err = unpopulate(val, "Resources", &t.Resources) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TopologyAssociation. -func (t TopologyAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "associationType", t.AssociationType) - populate(objectMap, "name", t.Name) - populate(objectMap, "resourceId", t.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TopologyAssociation. -func (t *TopologyAssociation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "associationType": - err = unpopulate(val, "AssociationType", &t.AssociationType) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &t.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TopologyParameters. -func (t TopologyParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "targetResourceGroupName", t.TargetResourceGroupName) - populate(objectMap, "targetSubnet", t.TargetSubnet) - populate(objectMap, "targetVirtualNetwork", t.TargetVirtualNetwork) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TopologyParameters. -func (t *TopologyParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "targetResourceGroupName": - err = unpopulate(val, "TargetResourceGroupName", &t.TargetResourceGroupName) - delete(rawMsg, key) - case "targetSubnet": - err = unpopulate(val, "TargetSubnet", &t.TargetSubnet) - delete(rawMsg, key) - case "targetVirtualNetwork": - err = unpopulate(val, "TargetVirtualNetwork", &t.TargetVirtualNetwork) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TopologyResource. -func (t TopologyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "associations", t.Associations) - populate(objectMap, "id", t.ID) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TopologyResource. -func (t *TopologyResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "associations": - err = unpopulate(val, "Associations", &t.Associations) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &t.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TrafficAnalyticsConfigurationProperties. -func (t TrafficAnalyticsConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enabled", t.Enabled) - populate(objectMap, "trafficAnalyticsInterval", t.TrafficAnalyticsInterval) - populate(objectMap, "workspaceId", t.WorkspaceID) - populate(objectMap, "workspaceRegion", t.WorkspaceRegion) - populate(objectMap, "workspaceResourceId", t.WorkspaceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TrafficAnalyticsConfigurationProperties. -func (t *TrafficAnalyticsConfigurationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &t.Enabled) - delete(rawMsg, key) - case "trafficAnalyticsInterval": - err = unpopulate(val, "TrafficAnalyticsInterval", &t.TrafficAnalyticsInterval) - delete(rawMsg, key) - case "workspaceId": - err = unpopulate(val, "WorkspaceID", &t.WorkspaceID) - delete(rawMsg, key) - case "workspaceRegion": - err = unpopulate(val, "WorkspaceRegion", &t.WorkspaceRegion) - delete(rawMsg, key) - case "workspaceResourceId": - err = unpopulate(val, "WorkspaceResourceID", &t.WorkspaceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TrafficAnalyticsProperties. -func (t TrafficAnalyticsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "networkWatcherFlowAnalyticsConfiguration", t.NetworkWatcherFlowAnalyticsConfiguration) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TrafficAnalyticsProperties. -func (t *TrafficAnalyticsProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "networkWatcherFlowAnalyticsConfiguration": - err = unpopulate(val, "NetworkWatcherFlowAnalyticsConfiguration", &t.NetworkWatcherFlowAnalyticsConfiguration) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TrafficSelectorPolicy. -func (t TrafficSelectorPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "localAddressRanges", t.LocalAddressRanges) - populate(objectMap, "remoteAddressRanges", t.RemoteAddressRanges) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TrafficSelectorPolicy. -func (t *TrafficSelectorPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "localAddressRanges": - err = unpopulate(val, "LocalAddressRanges", &t.LocalAddressRanges) - delete(rawMsg, key) - case "remoteAddressRanges": - err = unpopulate(val, "RemoteAddressRanges", &t.RemoteAddressRanges) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TroubleshootingDetails. -func (t TroubleshootingDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "detail", t.Detail) - populate(objectMap, "id", t.ID) - populate(objectMap, "reasonType", t.ReasonType) - populate(objectMap, "recommendedActions", t.RecommendedActions) - populate(objectMap, "summary", t.Summary) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingDetails. -func (t *TroubleshootingDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "detail": - err = unpopulate(val, "Detail", &t.Detail) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "reasonType": - err = unpopulate(val, "ReasonType", &t.ReasonType) - delete(rawMsg, key) - case "recommendedActions": - err = unpopulate(val, "RecommendedActions", &t.RecommendedActions) - delete(rawMsg, key) - case "summary": - err = unpopulate(val, "Summary", &t.Summary) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TroubleshootingParameters. -func (t TroubleshootingParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", t.Properties) - populate(objectMap, "targetResourceId", t.TargetResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingParameters. -func (t *TroubleshootingParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &t.TargetResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TroubleshootingProperties. -func (t TroubleshootingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "storageId", t.StorageID) - populate(objectMap, "storagePath", t.StoragePath) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingProperties. -func (t *TroubleshootingProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "storageId": - err = unpopulate(val, "StorageID", &t.StorageID) - delete(rawMsg, key) - case "storagePath": - err = unpopulate(val, "StoragePath", &t.StoragePath) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TroubleshootingRecommendedActions. -func (t TroubleshootingRecommendedActions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionId", t.ActionID) - populate(objectMap, "actionText", t.ActionText) - populate(objectMap, "actionUri", t.ActionURI) - populate(objectMap, "actionUriText", t.ActionURIText) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingRecommendedActions. -func (t *TroubleshootingRecommendedActions) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionId": - err = unpopulate(val, "ActionID", &t.ActionID) - delete(rawMsg, key) - case "actionText": - err = unpopulate(val, "ActionText", &t.ActionText) - delete(rawMsg, key) - case "actionUri": - err = unpopulate(val, "ActionURI", &t.ActionURI) - delete(rawMsg, key) - case "actionUriText": - err = unpopulate(val, "ActionURIText", &t.ActionURIText) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TroubleshootingResult. -func (t TroubleshootingResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", t.Code) - populateTimeRFC3339(objectMap, "endTime", t.EndTime) - populate(objectMap, "results", t.Results) - populateTimeRFC3339(objectMap, "startTime", t.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingResult. -func (t *TroubleshootingResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &t.Code) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &t.EndTime) - delete(rawMsg, key) - case "results": - err = unpopulate(val, "Results", &t.Results) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &t.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TunnelConnectionHealth. -func (t TunnelConnectionHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "connectionStatus", t.ConnectionStatus) - populate(objectMap, "egressBytesTransferred", t.EgressBytesTransferred) - populate(objectMap, "ingressBytesTransferred", t.IngressBytesTransferred) - populate(objectMap, "lastConnectionEstablishedUtcTime", t.LastConnectionEstablishedUTCTime) - populate(objectMap, "tunnel", t.Tunnel) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TunnelConnectionHealth. -func (t *TunnelConnectionHealth) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionStatus": - err = unpopulate(val, "ConnectionStatus", &t.ConnectionStatus) - delete(rawMsg, key) - case "egressBytesTransferred": - err = unpopulate(val, "EgressBytesTransferred", &t.EgressBytesTransferred) - delete(rawMsg, key) - case "ingressBytesTransferred": - err = unpopulate(val, "IngressBytesTransferred", &t.IngressBytesTransferred) - delete(rawMsg, key) - case "lastConnectionEstablishedUtcTime": - err = unpopulate(val, "LastConnectionEstablishedUTCTime", &t.LastConnectionEstablishedUTCTime) - delete(rawMsg, key) - case "tunnel": - err = unpopulate(val, "Tunnel", &t.Tunnel) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UnprepareNetworkPoliciesRequest. -func (u UnprepareNetworkPoliciesRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "serviceName", u.ServiceName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UnprepareNetworkPoliciesRequest. -func (u *UnprepareNetworkPoliciesRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "serviceName": - err = unpopulate(val, "ServiceName", &u.ServiceName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Usage. -func (u Usage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "currentValue", u.CurrentValue) - populate(objectMap, "id", u.ID) - populate(objectMap, "limit", u.Limit) - populate(objectMap, "name", u.Name) - populate(objectMap, "unit", u.Unit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Usage. -func (u *Usage) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentValue": - err = unpopulate(val, "CurrentValue", &u.CurrentValue) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &u.ID) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &u.Limit) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &u.Name) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &u.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UsageName. -func (u UsageName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "localizedValue", u.LocalizedValue) - populate(objectMap, "value", u.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UsageName. -func (u *UsageName) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "localizedValue": - err = unpopulate(val, "LocalizedValue", &u.LocalizedValue) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &u.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UsagesListResult. -func (u UsagesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", u.NextLink) - populate(objectMap, "value", u.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UsagesListResult. -func (u *UsagesListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &u.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &u.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VM. -func (v VM) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VM. -func (v *VM) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNClientConfiguration. -func (v VPNClientConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aadAudience", v.AADAudience) - populate(objectMap, "aadIssuer", v.AADIssuer) - populate(objectMap, "aadTenant", v.AADTenant) - populate(objectMap, "radiusServerAddress", v.RadiusServerAddress) - populate(objectMap, "radiusServerSecret", v.RadiusServerSecret) - populate(objectMap, "radiusServers", v.RadiusServers) - populate(objectMap, "vpnAuthenticationTypes", v.VPNAuthenticationTypes) - populate(objectMap, "vpnClientAddressPool", v.VPNClientAddressPool) - populate(objectMap, "vpnClientIpsecPolicies", v.VPNClientIPSecPolicies) - populate(objectMap, "vpnClientProtocols", v.VPNClientProtocols) - populate(objectMap, "vpnClientRevokedCertificates", v.VPNClientRevokedCertificates) - populate(objectMap, "vpnClientRootCertificates", v.VPNClientRootCertificates) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientConfiguration. -func (v *VPNClientConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aadAudience": - err = unpopulate(val, "AADAudience", &v.AADAudience) - delete(rawMsg, key) - case "aadIssuer": - err = unpopulate(val, "AADIssuer", &v.AADIssuer) - delete(rawMsg, key) - case "aadTenant": - err = unpopulate(val, "AADTenant", &v.AADTenant) - delete(rawMsg, key) - case "radiusServerAddress": - err = unpopulate(val, "RadiusServerAddress", &v.RadiusServerAddress) - delete(rawMsg, key) - case "radiusServerSecret": - err = unpopulate(val, "RadiusServerSecret", &v.RadiusServerSecret) - delete(rawMsg, key) - case "radiusServers": - err = unpopulate(val, "RadiusServers", &v.RadiusServers) - delete(rawMsg, key) - case "vpnAuthenticationTypes": - err = unpopulate(val, "VPNAuthenticationTypes", &v.VPNAuthenticationTypes) - delete(rawMsg, key) - case "vpnClientAddressPool": - err = unpopulate(val, "VPNClientAddressPool", &v.VPNClientAddressPool) - delete(rawMsg, key) - case "vpnClientIpsecPolicies": - err = unpopulate(val, "VPNClientIPSecPolicies", &v.VPNClientIPSecPolicies) - delete(rawMsg, key) - case "vpnClientProtocols": - err = unpopulate(val, "VPNClientProtocols", &v.VPNClientProtocols) - delete(rawMsg, key) - case "vpnClientRevokedCertificates": - err = unpopulate(val, "VPNClientRevokedCertificates", &v.VPNClientRevokedCertificates) - delete(rawMsg, key) - case "vpnClientRootCertificates": - err = unpopulate(val, "VPNClientRootCertificates", &v.VPNClientRootCertificates) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealth. -func (v VPNClientConnectionHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allocatedIpAddresses", v.AllocatedIPAddresses) - populate(objectMap, "totalEgressBytesTransferred", v.TotalEgressBytesTransferred) - populate(objectMap, "totalIngressBytesTransferred", v.TotalIngressBytesTransferred) - populate(objectMap, "vpnClientConnectionsCount", v.VPNClientConnectionsCount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientConnectionHealth. -func (v *VPNClientConnectionHealth) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allocatedIpAddresses": - err = unpopulate(val, "AllocatedIPAddresses", &v.AllocatedIPAddresses) - delete(rawMsg, key) - case "totalEgressBytesTransferred": - err = unpopulate(val, "TotalEgressBytesTransferred", &v.TotalEgressBytesTransferred) - delete(rawMsg, key) - case "totalIngressBytesTransferred": - err = unpopulate(val, "TotalIngressBytesTransferred", &v.TotalIngressBytesTransferred) - delete(rawMsg, key) - case "vpnClientConnectionsCount": - err = unpopulate(val, "VPNClientConnectionsCount", &v.VPNClientConnectionsCount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealthDetail. -func (v VPNClientConnectionHealthDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) - populate(objectMap, "egressPacketsTransferred", v.EgressPacketsTransferred) - populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) - populate(objectMap, "ingressPacketsTransferred", v.IngressPacketsTransferred) - populate(objectMap, "maxBandwidth", v.MaxBandwidth) - populate(objectMap, "maxPacketsPerSecond", v.MaxPacketsPerSecond) - populate(objectMap, "privateIpAddress", v.PrivateIPAddress) - populate(objectMap, "publicIpAddress", v.PublicIPAddress) - populate(objectMap, "vpnConnectionDuration", v.VPNConnectionDuration) - populate(objectMap, "vpnConnectionId", v.VPNConnectionID) - populate(objectMap, "vpnConnectionTime", v.VPNConnectionTime) - populate(objectMap, "vpnUserName", v.VPNUserName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientConnectionHealthDetail. -func (v *VPNClientConnectionHealthDetail) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "egressBytesTransferred": - err = unpopulate(val, "EgressBytesTransferred", &v.EgressBytesTransferred) - delete(rawMsg, key) - case "egressPacketsTransferred": - err = unpopulate(val, "EgressPacketsTransferred", &v.EgressPacketsTransferred) - delete(rawMsg, key) - case "ingressBytesTransferred": - err = unpopulate(val, "IngressBytesTransferred", &v.IngressBytesTransferred) - delete(rawMsg, key) - case "ingressPacketsTransferred": - err = unpopulate(val, "IngressPacketsTransferred", &v.IngressPacketsTransferred) - delete(rawMsg, key) - case "maxBandwidth": - err = unpopulate(val, "MaxBandwidth", &v.MaxBandwidth) - delete(rawMsg, key) - case "maxPacketsPerSecond": - err = unpopulate(val, "MaxPacketsPerSecond", &v.MaxPacketsPerSecond) - delete(rawMsg, key) - case "privateIpAddress": - err = unpopulate(val, "PrivateIPAddress", &v.PrivateIPAddress) - delete(rawMsg, key) - case "publicIpAddress": - err = unpopulate(val, "PublicIPAddress", &v.PublicIPAddress) - delete(rawMsg, key) - case "vpnConnectionDuration": - err = unpopulate(val, "VPNConnectionDuration", &v.VPNConnectionDuration) - delete(rawMsg, key) - case "vpnConnectionId": - err = unpopulate(val, "VPNConnectionID", &v.VPNConnectionID) - delete(rawMsg, key) - case "vpnConnectionTime": - err = unpopulate(val, "VPNConnectionTime", &v.VPNConnectionTime) - delete(rawMsg, key) - case "vpnUserName": - err = unpopulate(val, "VPNUserName", &v.VPNUserName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealthDetailListResult. -func (v VPNClientConnectionHealthDetailListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientConnectionHealthDetailListResult. -func (v *VPNClientConnectionHealthDetailListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNClientIPsecParameters. -func (v VPNClientIPsecParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dhGroup", v.DhGroup) - populate(objectMap, "ipsecEncryption", v.IPSecEncryption) - populate(objectMap, "ipsecIntegrity", v.IPSecIntegrity) - populate(objectMap, "ikeEncryption", v.IkeEncryption) - populate(objectMap, "ikeIntegrity", v.IkeIntegrity) - populate(objectMap, "pfsGroup", v.PfsGroup) - populate(objectMap, "saDataSizeKilobytes", v.SaDataSizeKilobytes) - populate(objectMap, "saLifeTimeSeconds", v.SaLifeTimeSeconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientIPsecParameters. -func (v *VPNClientIPsecParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dhGroup": - err = unpopulate(val, "DhGroup", &v.DhGroup) - delete(rawMsg, key) - case "ipsecEncryption": - err = unpopulate(val, "IPSecEncryption", &v.IPSecEncryption) - delete(rawMsg, key) - case "ipsecIntegrity": - err = unpopulate(val, "IPSecIntegrity", &v.IPSecIntegrity) - delete(rawMsg, key) - case "ikeEncryption": - err = unpopulate(val, "IkeEncryption", &v.IkeEncryption) - delete(rawMsg, key) - case "ikeIntegrity": - err = unpopulate(val, "IkeIntegrity", &v.IkeIntegrity) - delete(rawMsg, key) - case "pfsGroup": - err = unpopulate(val, "PfsGroup", &v.PfsGroup) - delete(rawMsg, key) - case "saDataSizeKilobytes": - err = unpopulate(val, "SaDataSizeKilobytes", &v.SaDataSizeKilobytes) - delete(rawMsg, key) - case "saLifeTimeSeconds": - err = unpopulate(val, "SaLifeTimeSeconds", &v.SaLifeTimeSeconds) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNClientParameters. -func (v VPNClientParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authenticationMethod", v.AuthenticationMethod) - populate(objectMap, "clientRootCertificates", v.ClientRootCertificates) - populate(objectMap, "processorArchitecture", v.ProcessorArchitecture) - populate(objectMap, "radiusServerAuthCertificate", v.RadiusServerAuthCertificate) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientParameters. -func (v *VPNClientParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authenticationMethod": - err = unpopulate(val, "AuthenticationMethod", &v.AuthenticationMethod) - delete(rawMsg, key) - case "clientRootCertificates": - err = unpopulate(val, "ClientRootCertificates", &v.ClientRootCertificates) - delete(rawMsg, key) - case "processorArchitecture": - err = unpopulate(val, "ProcessorArchitecture", &v.ProcessorArchitecture) - delete(rawMsg, key) - case "radiusServerAuthCertificate": - err = unpopulate(val, "RadiusServerAuthCertificate", &v.RadiusServerAuthCertificate) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNClientRevokedCertificate. -func (v VPNClientRevokedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientRevokedCertificate. -func (v *VPNClientRevokedCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNClientRevokedCertificatePropertiesFormat. -func (v VPNClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "thumbprint", v.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientRevokedCertificatePropertiesFormat. -func (v *VPNClientRevokedCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &v.Thumbprint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNClientRootCertificate. -func (v VPNClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientRootCertificate. -func (v *VPNClientRootCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNClientRootCertificatePropertiesFormat. -func (v VPNClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "publicCertData", v.PublicCertData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientRootCertificatePropertiesFormat. -func (v *VPNClientRootCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "publicCertData": - err = unpopulate(val, "PublicCertData", &v.PublicCertData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNConnection. -func (v VPNConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnection. -func (v *VPNConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNConnectionPacketCaptureStartParameters. -func (v VPNConnectionPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filterData", v.FilterData) - populate(objectMap, "linkConnectionNames", v.LinkConnectionNames) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionPacketCaptureStartParameters. -func (v *VPNConnectionPacketCaptureStartParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "filterData": - err = unpopulate(val, "FilterData", &v.FilterData) - delete(rawMsg, key) - case "linkConnectionNames": - err = unpopulate(val, "LinkConnectionNames", &v.LinkConnectionNames) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNConnectionPacketCaptureStopParameters. -func (v VPNConnectionPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "linkConnectionNames", v.LinkConnectionNames) - populate(objectMap, "sasUrl", v.SasURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionPacketCaptureStopParameters. -func (v *VPNConnectionPacketCaptureStopParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "linkConnectionNames": - err = unpopulate(val, "LinkConnectionNames", &v.LinkConnectionNames) - delete(rawMsg, key) - case "sasUrl": - err = unpopulate(val, "SasURL", &v.SasURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNConnectionProperties. -func (v VPNConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "connectionBandwidth", v.ConnectionBandwidth) - populate(objectMap, "connectionStatus", v.ConnectionStatus) - populate(objectMap, "dpdTimeoutSeconds", v.DpdTimeoutSeconds) - populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) - populate(objectMap, "enableBgp", v.EnableBgp) - populate(objectMap, "enableInternetSecurity", v.EnableInternetSecurity) - populate(objectMap, "enableRateLimiting", v.EnableRateLimiting) - populate(objectMap, "ipsecPolicies", v.IPSecPolicies) - populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "remoteVpnSite", v.RemoteVPNSite) - populate(objectMap, "routingConfiguration", v.RoutingConfiguration) - populate(objectMap, "routingWeight", v.RoutingWeight) - populate(objectMap, "sharedKey", v.SharedKey) - populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) - populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) - populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) - populate(objectMap, "vpnConnectionProtocolType", v.VPNConnectionProtocolType) - populate(objectMap, "vpnLinkConnections", v.VPNLinkConnections) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionProperties. -func (v *VPNConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionBandwidth": - err = unpopulate(val, "ConnectionBandwidth", &v.ConnectionBandwidth) - delete(rawMsg, key) - case "connectionStatus": - err = unpopulate(val, "ConnectionStatus", &v.ConnectionStatus) - delete(rawMsg, key) - case "dpdTimeoutSeconds": - err = unpopulate(val, "DpdTimeoutSeconds", &v.DpdTimeoutSeconds) - delete(rawMsg, key) - case "egressBytesTransferred": - err = unpopulate(val, "EgressBytesTransferred", &v.EgressBytesTransferred) - delete(rawMsg, key) - case "enableBgp": - err = unpopulate(val, "EnableBgp", &v.EnableBgp) - delete(rawMsg, key) - case "enableInternetSecurity": - err = unpopulate(val, "EnableInternetSecurity", &v.EnableInternetSecurity) - delete(rawMsg, key) - case "enableRateLimiting": - err = unpopulate(val, "EnableRateLimiting", &v.EnableRateLimiting) - delete(rawMsg, key) - case "ipsecPolicies": - err = unpopulate(val, "IPSecPolicies", &v.IPSecPolicies) - delete(rawMsg, key) - case "ingressBytesTransferred": - err = unpopulate(val, "IngressBytesTransferred", &v.IngressBytesTransferred) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "remoteVpnSite": - err = unpopulate(val, "RemoteVPNSite", &v.RemoteVPNSite) - delete(rawMsg, key) - case "routingConfiguration": - err = unpopulate(val, "RoutingConfiguration", &v.RoutingConfiguration) - delete(rawMsg, key) - case "routingWeight": - err = unpopulate(val, "RoutingWeight", &v.RoutingWeight) - delete(rawMsg, key) - case "sharedKey": - err = unpopulate(val, "SharedKey", &v.SharedKey) - delete(rawMsg, key) - case "trafficSelectorPolicies": - err = unpopulate(val, "TrafficSelectorPolicies", &v.TrafficSelectorPolicies) - delete(rawMsg, key) - case "useLocalAzureIpAddress": - err = unpopulate(val, "UseLocalAzureIPAddress", &v.UseLocalAzureIPAddress) - delete(rawMsg, key) - case "usePolicyBasedTrafficSelectors": - err = unpopulate(val, "UsePolicyBasedTrafficSelectors", &v.UsePolicyBasedTrafficSelectors) - delete(rawMsg, key) - case "vpnConnectionProtocolType": - err = unpopulate(val, "VPNConnectionProtocolType", &v.VPNConnectionProtocolType) - delete(rawMsg, key) - case "vpnLinkConnections": - err = unpopulate(val, "VPNLinkConnections", &v.VPNLinkConnections) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNDeviceScriptParameters. -func (v VPNDeviceScriptParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "deviceFamily", v.DeviceFamily) - populate(objectMap, "firmwareVersion", v.FirmwareVersion) - populate(objectMap, "vendor", v.Vendor) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNDeviceScriptParameters. -func (v *VPNDeviceScriptParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deviceFamily": - err = unpopulate(val, "DeviceFamily", &v.DeviceFamily) - delete(rawMsg, key) - case "firmwareVersion": - err = unpopulate(val, "FirmwareVersion", &v.FirmwareVersion) - delete(rawMsg, key) - case "vendor": - err = unpopulate(val, "Vendor", &v.Vendor) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNGateway. -func (v VPNGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGateway. -func (v *VPNGateway) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNGatewayIPConfiguration. -func (v VPNGatewayIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "privateIpAddress", v.PrivateIPAddress) - populate(objectMap, "publicIpAddress", v.PublicIPAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayIPConfiguration. -func (v *VPNGatewayIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "privateIpAddress": - err = unpopulate(val, "PrivateIPAddress", &v.PrivateIPAddress) - delete(rawMsg, key) - case "publicIpAddress": - err = unpopulate(val, "PublicIPAddress", &v.PublicIPAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNGatewayNatRule. -func (v VPNGatewayNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayNatRule. -func (v *VPNGatewayNatRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNGatewayNatRuleProperties. -func (v VPNGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "egressVpnSiteLinkConnections", v.EgressVPNSiteLinkConnections) - populate(objectMap, "externalMappings", v.ExternalMappings) - populate(objectMap, "ipConfigurationId", v.IPConfigurationID) - populate(objectMap, "ingressVpnSiteLinkConnections", v.IngressVPNSiteLinkConnections) - populate(objectMap, "internalMappings", v.InternalMappings) - populate(objectMap, "mode", v.Mode) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayNatRuleProperties. -func (v *VPNGatewayNatRuleProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "egressVpnSiteLinkConnections": - err = unpopulate(val, "EgressVPNSiteLinkConnections", &v.EgressVPNSiteLinkConnections) - delete(rawMsg, key) - case "externalMappings": - err = unpopulate(val, "ExternalMappings", &v.ExternalMappings) - delete(rawMsg, key) - case "ipConfigurationId": - err = unpopulate(val, "IPConfigurationID", &v.IPConfigurationID) - delete(rawMsg, key) - case "ingressVpnSiteLinkConnections": - err = unpopulate(val, "IngressVPNSiteLinkConnections", &v.IngressVPNSiteLinkConnections) - delete(rawMsg, key) - case "internalMappings": - err = unpopulate(val, "InternalMappings", &v.InternalMappings) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &v.Mode) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNGatewayPacketCaptureStartParameters. -func (v VPNGatewayPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filterData", v.FilterData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayPacketCaptureStartParameters. -func (v *VPNGatewayPacketCaptureStartParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "filterData": - err = unpopulate(val, "FilterData", &v.FilterData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNGatewayPacketCaptureStopParameters. -func (v VPNGatewayPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "sasUrl", v.SasURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayPacketCaptureStopParameters. -func (v *VPNGatewayPacketCaptureStopParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "sasUrl": - err = unpopulate(val, "SasURL", &v.SasURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNGatewayProperties. -func (v VPNGatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bgpSettings", v.BgpSettings) - populate(objectMap, "connections", v.Connections) - populate(objectMap, "enableBgpRouteTranslationForNat", v.EnableBgpRouteTranslationForNat) - populate(objectMap, "ipConfigurations", v.IPConfigurations) - populate(objectMap, "isRoutingPreferenceInternet", v.IsRoutingPreferenceInternet) - populate(objectMap, "natRules", v.NatRules) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "vpnGatewayScaleUnit", v.VPNGatewayScaleUnit) - populate(objectMap, "virtualHub", v.VirtualHub) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayProperties. -func (v *VPNGatewayProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bgpSettings": - err = unpopulate(val, "BgpSettings", &v.BgpSettings) - delete(rawMsg, key) - case "connections": - err = unpopulate(val, "Connections", &v.Connections) - delete(rawMsg, key) - case "enableBgpRouteTranslationForNat": - err = unpopulate(val, "EnableBgpRouteTranslationForNat", &v.EnableBgpRouteTranslationForNat) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &v.IPConfigurations) - delete(rawMsg, key) - case "isRoutingPreferenceInternet": - err = unpopulate(val, "IsRoutingPreferenceInternet", &v.IsRoutingPreferenceInternet) - delete(rawMsg, key) - case "natRules": - err = unpopulate(val, "NatRules", &v.NatRules) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "vpnGatewayScaleUnit": - err = unpopulate(val, "VPNGatewayScaleUnit", &v.VPNGatewayScaleUnit) - delete(rawMsg, key) - case "virtualHub": - err = unpopulate(val, "VirtualHub", &v.VirtualHub) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNLinkBgpSettings. -func (v VPNLinkBgpSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "asn", v.Asn) - populate(objectMap, "bgpPeeringAddress", v.BgpPeeringAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNLinkBgpSettings. -func (v *VPNLinkBgpSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "asn": - err = unpopulate(val, "Asn", &v.Asn) - delete(rawMsg, key) - case "bgpPeeringAddress": - err = unpopulate(val, "BgpPeeringAddress", &v.BgpPeeringAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNLinkProviderProperties. -func (v VPNLinkProviderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "linkProviderName", v.LinkProviderName) - populate(objectMap, "linkSpeedInMbps", v.LinkSpeedInMbps) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNLinkProviderProperties. -func (v *VPNLinkProviderProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "linkProviderName": - err = unpopulate(val, "LinkProviderName", &v.LinkProviderName) - delete(rawMsg, key) - case "linkSpeedInMbps": - err = unpopulate(val, "LinkSpeedInMbps", &v.LinkSpeedInMbps) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNNatRuleMapping. -func (v VPNNatRuleMapping) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressSpace", v.AddressSpace) - populate(objectMap, "portRange", v.PortRange) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNNatRuleMapping. -func (v *VPNNatRuleMapping) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressSpace": - err = unpopulate(val, "AddressSpace", &v.AddressSpace) - delete(rawMsg, key) - case "portRange": - err = unpopulate(val, "PortRange", &v.PortRange) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNPacketCaptureStartParameters. -func (v VPNPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filterData", v.FilterData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNPacketCaptureStartParameters. -func (v *VPNPacketCaptureStartParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "filterData": - err = unpopulate(val, "FilterData", &v.FilterData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNPacketCaptureStopParameters. -func (v VPNPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "sasUrl", v.SasURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNPacketCaptureStopParameters. -func (v *VPNPacketCaptureStopParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "sasUrl": - err = unpopulate(val, "SasURL", &v.SasURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNProfileResponse. -func (v VPNProfileResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "profileUrl", v.ProfileURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNProfileResponse. -func (v *VPNProfileResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "profileUrl": - err = unpopulate(val, "ProfileURL", &v.ProfileURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigRadiusClientRootCertificate. -func (v VPNServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", v.Name) - populate(objectMap, "thumbprint", v.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigRadiusClientRootCertificate. -func (v *VPNServerConfigRadiusClientRootCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &v.Thumbprint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigRadiusServerRootCertificate. -func (v VPNServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", v.Name) - populate(objectMap, "publicCertData", v.PublicCertData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigRadiusServerRootCertificate. -func (v *VPNServerConfigRadiusServerRootCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "publicCertData": - err = unpopulate(val, "PublicCertData", &v.PublicCertData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigVPNClientRevokedCertificate. -func (v VPNServerConfigVPNClientRevokedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", v.Name) - populate(objectMap, "thumbprint", v.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigVPNClientRevokedCertificate. -func (v *VPNServerConfigVPNClientRevokedCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &v.Thumbprint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigVPNClientRootCertificate. -func (v VPNServerConfigVPNClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", v.Name) - populate(objectMap, "publicCertData", v.PublicCertData) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigVPNClientRootCertificate. -func (v *VPNServerConfigVPNClientRootCertificate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "publicCertData": - err = unpopulate(val, "PublicCertData", &v.PublicCertData) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfiguration. -func (v VPNServerConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfiguration. -func (v *VPNServerConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationPolicyGroup. -func (v VPNServerConfigurationPolicyGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigurationPolicyGroup. -func (v *VPNServerConfigurationPolicyGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationPolicyGroupMember. -func (v VPNServerConfigurationPolicyGroupMember) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "attributeType", v.AttributeType) - populate(objectMap, "attributeValue", v.AttributeValue) - populate(objectMap, "name", v.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigurationPolicyGroupMember. -func (v *VPNServerConfigurationPolicyGroupMember) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "attributeType": - err = unpopulate(val, "AttributeType", &v.AttributeType) - delete(rawMsg, key) - case "attributeValue": - err = unpopulate(val, "AttributeValue", &v.AttributeValue) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationPolicyGroupProperties. -func (v VPNServerConfigurationPolicyGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isDefault", v.IsDefault) - populate(objectMap, "p2SConnectionConfigurations", v.P2SConnectionConfigurations) - populate(objectMap, "policyMembers", v.PolicyMembers) - populate(objectMap, "priority", v.Priority) - populate(objectMap, "provisioningState", v.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigurationPolicyGroupProperties. -func (v *VPNServerConfigurationPolicyGroupProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isDefault": - err = unpopulate(val, "IsDefault", &v.IsDefault) - delete(rawMsg, key) - case "p2SConnectionConfigurations": - err = unpopulate(val, "P2SConnectionConfigurations", &v.P2SConnectionConfigurations) - delete(rawMsg, key) - case "policyMembers": - err = unpopulate(val, "PolicyMembers", &v.PolicyMembers) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &v.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationProperties. -func (v VPNServerConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aadAuthenticationParameters", v.AADAuthenticationParameters) - populate(objectMap, "configurationPolicyGroups", v.ConfigurationPolicyGroups) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "name", v.Name) - populate(objectMap, "p2SVpnGateways", v.P2SVPNGateways) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "radiusClientRootCertificates", v.RadiusClientRootCertificates) - populate(objectMap, "radiusServerAddress", v.RadiusServerAddress) - populate(objectMap, "radiusServerRootCertificates", v.RadiusServerRootCertificates) - populate(objectMap, "radiusServerSecret", v.RadiusServerSecret) - populate(objectMap, "radiusServers", v.RadiusServers) - populate(objectMap, "vpnAuthenticationTypes", v.VPNAuthenticationTypes) - populate(objectMap, "vpnClientIpsecPolicies", v.VPNClientIPSecPolicies) - populate(objectMap, "vpnClientRevokedCertificates", v.VPNClientRevokedCertificates) - populate(objectMap, "vpnClientRootCertificates", v.VPNClientRootCertificates) - populate(objectMap, "vpnProtocols", v.VPNProtocols) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigurationProperties. -func (v *VPNServerConfigurationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aadAuthenticationParameters": - err = unpopulate(val, "AADAuthenticationParameters", &v.AADAuthenticationParameters) - delete(rawMsg, key) - case "configurationPolicyGroups": - err = unpopulate(val, "ConfigurationPolicyGroups", &v.ConfigurationPolicyGroups) - delete(rawMsg, key) - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "p2SVpnGateways": - err = unpopulate(val, "P2SVPNGateways", &v.P2SVPNGateways) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "radiusClientRootCertificates": - err = unpopulate(val, "RadiusClientRootCertificates", &v.RadiusClientRootCertificates) - delete(rawMsg, key) - case "radiusServerAddress": - err = unpopulate(val, "RadiusServerAddress", &v.RadiusServerAddress) - delete(rawMsg, key) - case "radiusServerRootCertificates": - err = unpopulate(val, "RadiusServerRootCertificates", &v.RadiusServerRootCertificates) - delete(rawMsg, key) - case "radiusServerSecret": - err = unpopulate(val, "RadiusServerSecret", &v.RadiusServerSecret) - delete(rawMsg, key) - case "radiusServers": - err = unpopulate(val, "RadiusServers", &v.RadiusServers) - delete(rawMsg, key) - case "vpnAuthenticationTypes": - err = unpopulate(val, "VPNAuthenticationTypes", &v.VPNAuthenticationTypes) - delete(rawMsg, key) - case "vpnClientIpsecPolicies": - err = unpopulate(val, "VPNClientIPSecPolicies", &v.VPNClientIPSecPolicies) - delete(rawMsg, key) - case "vpnClientRevokedCertificates": - err = unpopulate(val, "VPNClientRevokedCertificates", &v.VPNClientRevokedCertificates) - delete(rawMsg, key) - case "vpnClientRootCertificates": - err = unpopulate(val, "VPNClientRootCertificates", &v.VPNClientRootCertificates) - delete(rawMsg, key) - case "vpnProtocols": - err = unpopulate(val, "VPNProtocols", &v.VPNProtocols) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationsResponse. -func (v VPNServerConfigurationsResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "vpnServerConfigurationResourceIds", v.VPNServerConfigurationResourceIDs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigurationsResponse. -func (v *VPNServerConfigurationsResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "vpnServerConfigurationResourceIds": - err = unpopulate(val, "VPNServerConfigurationResourceIDs", &v.VPNServerConfigurationResourceIDs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNSite. -func (v VPNSite) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSite. -func (v *VPNSite) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNSiteID. -func (v VPNSiteID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "vpnSite", v.VPNSite) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteID. -func (v *VPNSiteID) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "vpnSite": - err = unpopulate(val, "VPNSite", &v.VPNSite) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNSiteLink. -func (v VPNSiteLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteLink. -func (v *VPNSiteLink) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkConnection. -func (v VPNSiteLinkConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteLinkConnection. -func (v *VPNSiteLinkConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkConnectionProperties. -func (v VPNSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "connectionBandwidth", v.ConnectionBandwidth) - populate(objectMap, "connectionStatus", v.ConnectionStatus) - populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) - populate(objectMap, "egressNatRules", v.EgressNatRules) - populate(objectMap, "enableBgp", v.EnableBgp) - populate(objectMap, "enableRateLimiting", v.EnableRateLimiting) - populate(objectMap, "ipsecPolicies", v.IPSecPolicies) - populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) - populate(objectMap, "ingressNatRules", v.IngressNatRules) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "routingWeight", v.RoutingWeight) - populate(objectMap, "sharedKey", v.SharedKey) - populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) - populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) - populate(objectMap, "vpnConnectionProtocolType", v.VPNConnectionProtocolType) - populate(objectMap, "vpnGatewayCustomBgpAddresses", v.VPNGatewayCustomBgpAddresses) - populate(objectMap, "vpnLinkConnectionMode", v.VPNLinkConnectionMode) - populate(objectMap, "vpnSiteLink", v.VPNSiteLink) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteLinkConnectionProperties. -func (v *VPNSiteLinkConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "connectionBandwidth": - err = unpopulate(val, "ConnectionBandwidth", &v.ConnectionBandwidth) - delete(rawMsg, key) - case "connectionStatus": - err = unpopulate(val, "ConnectionStatus", &v.ConnectionStatus) - delete(rawMsg, key) - case "egressBytesTransferred": - err = unpopulate(val, "EgressBytesTransferred", &v.EgressBytesTransferred) - delete(rawMsg, key) - case "egressNatRules": - err = unpopulate(val, "EgressNatRules", &v.EgressNatRules) - delete(rawMsg, key) - case "enableBgp": - err = unpopulate(val, "EnableBgp", &v.EnableBgp) - delete(rawMsg, key) - case "enableRateLimiting": - err = unpopulate(val, "EnableRateLimiting", &v.EnableRateLimiting) - delete(rawMsg, key) - case "ipsecPolicies": - err = unpopulate(val, "IPSecPolicies", &v.IPSecPolicies) - delete(rawMsg, key) - case "ingressBytesTransferred": - err = unpopulate(val, "IngressBytesTransferred", &v.IngressBytesTransferred) - delete(rawMsg, key) - case "ingressNatRules": - err = unpopulate(val, "IngressNatRules", &v.IngressNatRules) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "routingWeight": - err = unpopulate(val, "RoutingWeight", &v.RoutingWeight) - delete(rawMsg, key) - case "sharedKey": - err = unpopulate(val, "SharedKey", &v.SharedKey) - delete(rawMsg, key) - case "useLocalAzureIpAddress": - err = unpopulate(val, "UseLocalAzureIPAddress", &v.UseLocalAzureIPAddress) - delete(rawMsg, key) - case "usePolicyBasedTrafficSelectors": - err = unpopulate(val, "UsePolicyBasedTrafficSelectors", &v.UsePolicyBasedTrafficSelectors) - delete(rawMsg, key) - case "vpnConnectionProtocolType": - err = unpopulate(val, "VPNConnectionProtocolType", &v.VPNConnectionProtocolType) - delete(rawMsg, key) - case "vpnGatewayCustomBgpAddresses": - err = unpopulate(val, "VPNGatewayCustomBgpAddresses", &v.VPNGatewayCustomBgpAddresses) - delete(rawMsg, key) - case "vpnLinkConnectionMode": - err = unpopulate(val, "VPNLinkConnectionMode", &v.VPNLinkConnectionMode) - delete(rawMsg, key) - case "vpnSiteLink": - err = unpopulate(val, "VPNSiteLink", &v.VPNSiteLink) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkProperties. -func (v VPNSiteLinkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bgpProperties", v.BgpProperties) - populate(objectMap, "fqdn", v.Fqdn) - populate(objectMap, "ipAddress", v.IPAddress) - populate(objectMap, "linkProperties", v.LinkProperties) - populate(objectMap, "provisioningState", v.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteLinkProperties. -func (v *VPNSiteLinkProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bgpProperties": - err = unpopulate(val, "BgpProperties", &v.BgpProperties) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &v.Fqdn) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &v.IPAddress) - delete(rawMsg, key) - case "linkProperties": - err = unpopulate(val, "LinkProperties", &v.LinkProperties) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VPNSiteProperties. -func (v VPNSiteProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressSpace", v.AddressSpace) - populate(objectMap, "bgpProperties", v.BgpProperties) - populate(objectMap, "deviceProperties", v.DeviceProperties) - populate(objectMap, "ipAddress", v.IPAddress) - populate(objectMap, "isSecuritySite", v.IsSecuritySite) - populate(objectMap, "o365Policy", v.O365Policy) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "siteKey", v.SiteKey) - populate(objectMap, "vpnSiteLinks", v.VPNSiteLinks) - populate(objectMap, "virtualWan", v.VirtualWan) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteProperties. -func (v *VPNSiteProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressSpace": - err = unpopulate(val, "AddressSpace", &v.AddressSpace) - delete(rawMsg, key) - case "bgpProperties": - err = unpopulate(val, "BgpProperties", &v.BgpProperties) - delete(rawMsg, key) - case "deviceProperties": - err = unpopulate(val, "DeviceProperties", &v.DeviceProperties) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &v.IPAddress) - delete(rawMsg, key) - case "isSecuritySite": - err = unpopulate(val, "IsSecuritySite", &v.IsSecuritySite) - delete(rawMsg, key) - case "o365Policy": - err = unpopulate(val, "O365Policy", &v.O365Policy) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "siteKey": - err = unpopulate(val, "SiteKey", &v.SiteKey) - delete(rawMsg, key) - case "vpnSiteLinks": - err = unpopulate(val, "VPNSiteLinks", &v.VPNSiteLinks) - delete(rawMsg, key) - case "virtualWan": - err = unpopulate(val, "VirtualWan", &v.VirtualWan) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VerificationIPFlowParameters. -func (v VerificationIPFlowParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "direction", v.Direction) - populate(objectMap, "localIPAddress", v.LocalIPAddress) - populate(objectMap, "localPort", v.LocalPort) - populate(objectMap, "protocol", v.Protocol) - populate(objectMap, "remoteIPAddress", v.RemoteIPAddress) - populate(objectMap, "remotePort", v.RemotePort) - populate(objectMap, "targetNicResourceId", v.TargetNicResourceID) - populate(objectMap, "targetResourceId", v.TargetResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VerificationIPFlowParameters. -func (v *VerificationIPFlowParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "direction": - err = unpopulate(val, "Direction", &v.Direction) - delete(rawMsg, key) - case "localIPAddress": - err = unpopulate(val, "LocalIPAddress", &v.LocalIPAddress) - delete(rawMsg, key) - case "localPort": - err = unpopulate(val, "LocalPort", &v.LocalPort) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &v.Protocol) - delete(rawMsg, key) - case "remoteIPAddress": - err = unpopulate(val, "RemoteIPAddress", &v.RemoteIPAddress) - delete(rawMsg, key) - case "remotePort": - err = unpopulate(val, "RemotePort", &v.RemotePort) - delete(rawMsg, key) - case "targetNicResourceId": - err = unpopulate(val, "TargetNicResourceID", &v.TargetNicResourceID) - delete(rawMsg, key) - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &v.TargetResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VerificationIPFlowResult. -func (v VerificationIPFlowResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "access", v.Access) - populate(objectMap, "ruleName", v.RuleName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VerificationIPFlowResult. -func (v *VerificationIPFlowResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "access": - err = unpopulate(val, "Access", &v.Access) - delete(rawMsg, key) - case "ruleName": - err = unpopulate(val, "RuleName", &v.RuleName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualAppliance. -func (v VirtualAppliance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "identity", v.Identity) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualAppliance. -func (v *VirtualAppliance) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &v.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceListResult. -func (v VirtualApplianceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceListResult. -func (v *VirtualApplianceListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceNicProperties. -func (v VirtualApplianceNicProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", v.Name) - populate(objectMap, "privateIpAddress", v.PrivateIPAddress) - populate(objectMap, "publicIpAddress", v.PublicIPAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceNicProperties. -func (v *VirtualApplianceNicProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "privateIpAddress": - err = unpopulate(val, "PrivateIPAddress", &v.PrivateIPAddress) - delete(rawMsg, key) - case "publicIpAddress": - err = unpopulate(val, "PublicIPAddress", &v.PublicIPAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualAppliancePropertiesFormat. -func (v VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", v.AddressPrefix) - populate(objectMap, "bootStrapConfigurationBlobs", v.BootStrapConfigurationBlobs) - populate(objectMap, "cloudInitConfiguration", v.CloudInitConfiguration) - populate(objectMap, "cloudInitConfigurationBlobs", v.CloudInitConfigurationBlobs) - populate(objectMap, "inboundSecurityRules", v.InboundSecurityRules) - populate(objectMap, "nvaSku", v.NvaSKU) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "sshPublicKey", v.SSHPublicKey) - populate(objectMap, "virtualApplianceAsn", v.VirtualApplianceAsn) - populate(objectMap, "virtualApplianceNics", v.VirtualApplianceNics) - populate(objectMap, "virtualApplianceSites", v.VirtualApplianceSites) - populate(objectMap, "virtualHub", v.VirtualHub) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualAppliancePropertiesFormat. -func (v *VirtualAppliancePropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefix": - err = unpopulate(val, "AddressPrefix", &v.AddressPrefix) - delete(rawMsg, key) - case "bootStrapConfigurationBlobs": - err = unpopulate(val, "BootStrapConfigurationBlobs", &v.BootStrapConfigurationBlobs) - delete(rawMsg, key) - case "cloudInitConfiguration": - err = unpopulate(val, "CloudInitConfiguration", &v.CloudInitConfiguration) - delete(rawMsg, key) - case "cloudInitConfigurationBlobs": - err = unpopulate(val, "CloudInitConfigurationBlobs", &v.CloudInitConfigurationBlobs) - delete(rawMsg, key) - case "inboundSecurityRules": - err = unpopulate(val, "InboundSecurityRules", &v.InboundSecurityRules) - delete(rawMsg, key) - case "nvaSku": - err = unpopulate(val, "NvaSKU", &v.NvaSKU) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "sshPublicKey": - err = unpopulate(val, "SSHPublicKey", &v.SSHPublicKey) - delete(rawMsg, key) - case "virtualApplianceAsn": - err = unpopulate(val, "VirtualApplianceAsn", &v.VirtualApplianceAsn) - delete(rawMsg, key) - case "virtualApplianceNics": - err = unpopulate(val, "VirtualApplianceNics", &v.VirtualApplianceNics) - delete(rawMsg, key) - case "virtualApplianceSites": - err = unpopulate(val, "VirtualApplianceSites", &v.VirtualApplianceSites) - delete(rawMsg, key) - case "virtualHub": - err = unpopulate(val, "VirtualHub", &v.VirtualHub) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKU. -func (v VirtualApplianceSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSKU. -func (v *VirtualApplianceSKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUInstances. -func (v VirtualApplianceSKUInstances) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instanceCount", v.InstanceCount) - populate(objectMap, "scaleUnit", v.ScaleUnit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSKUInstances. -func (v *VirtualApplianceSKUInstances) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceCount": - err = unpopulate(val, "InstanceCount", &v.InstanceCount) - delete(rawMsg, key) - case "scaleUnit": - err = unpopulate(val, "ScaleUnit", &v.ScaleUnit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUListResult. -func (v VirtualApplianceSKUListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSKUListResult. -func (v *VirtualApplianceSKUListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUProperties. -func (v VirtualApplianceSKUProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bundledScaleUnit", v.BundledScaleUnit) - populate(objectMap, "marketPlaceVersion", v.MarketPlaceVersion) - populate(objectMap, "vendor", v.Vendor) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSKUProperties. -func (v *VirtualApplianceSKUProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bundledScaleUnit": - err = unpopulate(val, "BundledScaleUnit", &v.BundledScaleUnit) - delete(rawMsg, key) - case "marketPlaceVersion": - err = unpopulate(val, "MarketPlaceVersion", &v.MarketPlaceVersion) - delete(rawMsg, key) - case "vendor": - err = unpopulate(val, "Vendor", &v.Vendor) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUPropertiesFormat. -func (v VirtualApplianceSKUPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "availableScaleUnits", v.AvailableScaleUnits) - populate(objectMap, "availableVersions", v.AvailableVersions) - populate(objectMap, "vendor", v.Vendor) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSKUPropertiesFormat. -func (v *VirtualApplianceSKUPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "availableScaleUnits": - err = unpopulate(val, "AvailableScaleUnits", &v.AvailableScaleUnits) - delete(rawMsg, key) - case "availableVersions": - err = unpopulate(val, "AvailableVersions", &v.AvailableVersions) - delete(rawMsg, key) - case "vendor": - err = unpopulate(val, "Vendor", &v.Vendor) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSite. -func (v VirtualApplianceSite) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSite. -func (v *VirtualApplianceSite) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSiteListResult. -func (v VirtualApplianceSiteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSiteListResult. -func (v *VirtualApplianceSiteListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSiteProperties. -func (v VirtualApplianceSiteProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", v.AddressPrefix) - populate(objectMap, "o365Policy", v.O365Policy) - populate(objectMap, "provisioningState", v.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSiteProperties. -func (v *VirtualApplianceSiteProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefix": - err = unpopulate(val, "AddressPrefix", &v.AddressPrefix) - delete(rawMsg, key) - case "o365Policy": - err = unpopulate(val, "O365Policy", &v.O365Policy) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualHub. -func (v VirtualHub) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "kind", v.Kind) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHub. -func (v *VirtualHub) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &v.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualHubEffectiveRoute. -func (v VirtualHubEffectiveRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefixes", v.AddressPrefixes) - populate(objectMap, "asPath", v.AsPath) - populate(objectMap, "nextHopType", v.NextHopType) - populate(objectMap, "nextHops", v.NextHops) - populate(objectMap, "routeOrigin", v.RouteOrigin) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubEffectiveRoute. -func (v *VirtualHubEffectiveRoute) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefixes": - err = unpopulate(val, "AddressPrefixes", &v.AddressPrefixes) - delete(rawMsg, key) - case "asPath": - err = unpopulate(val, "AsPath", &v.AsPath) - delete(rawMsg, key) - case "nextHopType": - err = unpopulate(val, "NextHopType", &v.NextHopType) - delete(rawMsg, key) - case "nextHops": - err = unpopulate(val, "NextHops", &v.NextHops) - delete(rawMsg, key) - case "routeOrigin": - err = unpopulate(val, "RouteOrigin", &v.RouteOrigin) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualHubEffectiveRouteList. -func (v VirtualHubEffectiveRouteList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubEffectiveRouteList. -func (v *VirtualHubEffectiveRouteList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualHubID. -func (v VirtualHubID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubID. -func (v *VirtualHubID) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualHubProperties. -func (v VirtualHubProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", v.AddressPrefix) - populate(objectMap, "allowBranchToBranchTraffic", v.AllowBranchToBranchTraffic) - populate(objectMap, "azureFirewall", v.AzureFirewall) - populate(objectMap, "bgpConnections", v.BgpConnections) - populate(objectMap, "expressRouteGateway", v.ExpressRouteGateway) - populate(objectMap, "hubRoutingPreference", v.HubRoutingPreference) - populate(objectMap, "ipConfigurations", v.IPConfigurations) - populate(objectMap, "p2SVpnGateway", v.P2SVPNGateway) - populate(objectMap, "preferredRoutingGateway", v.PreferredRoutingGateway) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "routeTable", v.RouteTable) - populate(objectMap, "routingState", v.RoutingState) - populate(objectMap, "sku", v.SKU) - populate(objectMap, "securityPartnerProvider", v.SecurityPartnerProvider) - populate(objectMap, "securityProviderName", v.SecurityProviderName) - populate(objectMap, "vpnGateway", v.VPNGateway) - populate(objectMap, "virtualHubRouteTableV2s", v.VirtualHubRouteTableV2S) - populate(objectMap, "virtualRouterAsn", v.VirtualRouterAsn) - populate(objectMap, "virtualRouterAutoScaleConfiguration", v.VirtualRouterAutoScaleConfiguration) - populate(objectMap, "virtualRouterIps", v.VirtualRouterIPs) - populate(objectMap, "virtualWan", v.VirtualWan) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubProperties. -func (v *VirtualHubProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefix": - err = unpopulate(val, "AddressPrefix", &v.AddressPrefix) - delete(rawMsg, key) - case "allowBranchToBranchTraffic": - err = unpopulate(val, "AllowBranchToBranchTraffic", &v.AllowBranchToBranchTraffic) - delete(rawMsg, key) - case "azureFirewall": - err = unpopulate(val, "AzureFirewall", &v.AzureFirewall) - delete(rawMsg, key) - case "bgpConnections": - err = unpopulate(val, "BgpConnections", &v.BgpConnections) - delete(rawMsg, key) - case "expressRouteGateway": - err = unpopulate(val, "ExpressRouteGateway", &v.ExpressRouteGateway) - delete(rawMsg, key) - case "hubRoutingPreference": - err = unpopulate(val, "HubRoutingPreference", &v.HubRoutingPreference) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &v.IPConfigurations) - delete(rawMsg, key) - case "p2SVpnGateway": - err = unpopulate(val, "P2SVPNGateway", &v.P2SVPNGateway) - delete(rawMsg, key) - case "preferredRoutingGateway": - err = unpopulate(val, "PreferredRoutingGateway", &v.PreferredRoutingGateway) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "routeTable": - err = unpopulate(val, "RouteTable", &v.RouteTable) - delete(rawMsg, key) - case "routingState": - err = unpopulate(val, "RoutingState", &v.RoutingState) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &v.SKU) - delete(rawMsg, key) - case "securityPartnerProvider": - err = unpopulate(val, "SecurityPartnerProvider", &v.SecurityPartnerProvider) - delete(rawMsg, key) - case "securityProviderName": - err = unpopulate(val, "SecurityProviderName", &v.SecurityProviderName) - delete(rawMsg, key) - case "vpnGateway": - err = unpopulate(val, "VPNGateway", &v.VPNGateway) - delete(rawMsg, key) - case "virtualHubRouteTableV2s": - err = unpopulate(val, "VirtualHubRouteTableV2S", &v.VirtualHubRouteTableV2S) - delete(rawMsg, key) - case "virtualRouterAsn": - err = unpopulate(val, "VirtualRouterAsn", &v.VirtualRouterAsn) - delete(rawMsg, key) - case "virtualRouterAutoScaleConfiguration": - err = unpopulate(val, "VirtualRouterAutoScaleConfiguration", &v.VirtualRouterAutoScaleConfiguration) - delete(rawMsg, key) - case "virtualRouterIps": - err = unpopulate(val, "VirtualRouterIPs", &v.VirtualRouterIPs) - delete(rawMsg, key) - case "virtualWan": - err = unpopulate(val, "VirtualWan", &v.VirtualWan) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualHubRoute. -func (v VirtualHubRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefixes", v.AddressPrefixes) - populate(objectMap, "nextHopIpAddress", v.NextHopIPAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubRoute. -func (v *VirtualHubRoute) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressPrefixes": - err = unpopulate(val, "AddressPrefixes", &v.AddressPrefixes) - delete(rawMsg, key) - case "nextHopIpAddress": - err = unpopulate(val, "NextHopIPAddress", &v.NextHopIPAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTable. -func (v VirtualHubRouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "routes", v.Routes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubRouteTable. -func (v *VirtualHubRouteTable) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "routes": - err = unpopulate(val, "Routes", &v.Routes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTableV2. -func (v VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubRouteTableV2. -func (v *VirtualHubRouteTableV2) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTableV2Properties. -func (v VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "attachedConnections", v.AttachedConnections) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "routes", v.Routes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubRouteTableV2Properties. -func (v *VirtualHubRouteTableV2Properties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "attachedConnections": - err = unpopulate(val, "AttachedConnections", &v.AttachedConnections) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "routes": - err = unpopulate(val, "Routes", &v.Routes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteV2. -func (v VirtualHubRouteV2) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationType", v.DestinationType) - populate(objectMap, "destinations", v.Destinations) - populate(objectMap, "nextHopType", v.NextHopType) - populate(objectMap, "nextHops", v.NextHops) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubRouteV2. -func (v *VirtualHubRouteV2) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinationType": - err = unpopulate(val, "DestinationType", &v.DestinationType) - delete(rawMsg, key) - case "destinations": - err = unpopulate(val, "Destinations", &v.Destinations) - delete(rawMsg, key) - case "nextHopType": - err = unpopulate(val, "NextHopType", &v.NextHopType) - delete(rawMsg, key) - case "nextHops": - err = unpopulate(val, "NextHops", &v.NextHops) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetwork. -func (v VirtualNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "extendedLocation", v.ExtendedLocation) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetwork. -func (v *VirtualNetwork) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &v.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkBgpCommunities. -func (v VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "regionalCommunity", v.RegionalCommunity) - populate(objectMap, "virtualNetworkCommunity", v.VirtualNetworkCommunity) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkBgpCommunities. -func (v *VirtualNetworkBgpCommunities) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "regionalCommunity": - err = unpopulate(val, "RegionalCommunity", &v.RegionalCommunity) - delete(rawMsg, key) - case "virtualNetworkCommunity": - err = unpopulate(val, "VirtualNetworkCommunity", &v.VirtualNetworkCommunity) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkConnectionGatewayReference. -func (v VirtualNetworkConnectionGatewayReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkConnectionGatewayReference. -func (v *VirtualNetworkConnectionGatewayReference) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkEncryption. -func (v VirtualNetworkEncryption) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enabled", v.Enabled) - populate(objectMap, "enforcement", v.Enforcement) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkEncryption. -func (v *VirtualNetworkEncryption) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &v.Enabled) - delete(rawMsg, key) - case "enforcement": - err = unpopulate(val, "Enforcement", &v.Enforcement) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGateway. -func (v VirtualNetworkGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "extendedLocation", v.ExtendedLocation) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGateway. -func (v *VirtualNetworkGateway) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &v.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnection. -func (v VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnection. -func (v *VirtualNetworkGatewayConnection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListEntity. -func (v VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionListEntity. -func (v *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListEntityPropertiesFormat. -func (v VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorizationKey", v.AuthorizationKey) - populate(objectMap, "connectionMode", v.ConnectionMode) - populate(objectMap, "connectionProtocol", v.ConnectionProtocol) - populate(objectMap, "connectionStatus", v.ConnectionStatus) - populate(objectMap, "connectionType", v.ConnectionType) - populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) - populate(objectMap, "enableBgp", v.EnableBgp) - populate(objectMap, "expressRouteGatewayBypass", v.ExpressRouteGatewayBypass) - populate(objectMap, "gatewayCustomBgpIpAddresses", v.GatewayCustomBgpIPAddresses) - populate(objectMap, "ipsecPolicies", v.IPSecPolicies) - populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) - populate(objectMap, "localNetworkGateway2", v.LocalNetworkGateway2) - populate(objectMap, "peer", v.Peer) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceGuid", v.ResourceGUID) - populate(objectMap, "routingWeight", v.RoutingWeight) - populate(objectMap, "sharedKey", v.SharedKey) - populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) - populate(objectMap, "tunnelConnectionStatus", v.TunnelConnectionStatus) - populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) - populate(objectMap, "virtualNetworkGateway1", v.VirtualNetworkGateway1) - populate(objectMap, "virtualNetworkGateway2", v.VirtualNetworkGateway2) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionListEntityPropertiesFormat. -func (v *VirtualNetworkGatewayConnectionListEntityPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationKey": - err = unpopulate(val, "AuthorizationKey", &v.AuthorizationKey) - delete(rawMsg, key) - case "connectionMode": - err = unpopulate(val, "ConnectionMode", &v.ConnectionMode) - delete(rawMsg, key) - case "connectionProtocol": - err = unpopulate(val, "ConnectionProtocol", &v.ConnectionProtocol) - delete(rawMsg, key) - case "connectionStatus": - err = unpopulate(val, "ConnectionStatus", &v.ConnectionStatus) - delete(rawMsg, key) - case "connectionType": - err = unpopulate(val, "ConnectionType", &v.ConnectionType) - delete(rawMsg, key) - case "egressBytesTransferred": - err = unpopulate(val, "EgressBytesTransferred", &v.EgressBytesTransferred) - delete(rawMsg, key) - case "enableBgp": - err = unpopulate(val, "EnableBgp", &v.EnableBgp) - delete(rawMsg, key) - case "expressRouteGatewayBypass": - err = unpopulate(val, "ExpressRouteGatewayBypass", &v.ExpressRouteGatewayBypass) - delete(rawMsg, key) - case "gatewayCustomBgpIpAddresses": - err = unpopulate(val, "GatewayCustomBgpIPAddresses", &v.GatewayCustomBgpIPAddresses) - delete(rawMsg, key) - case "ipsecPolicies": - err = unpopulate(val, "IPSecPolicies", &v.IPSecPolicies) - delete(rawMsg, key) - case "ingressBytesTransferred": - err = unpopulate(val, "IngressBytesTransferred", &v.IngressBytesTransferred) - delete(rawMsg, key) - case "localNetworkGateway2": - err = unpopulate(val, "LocalNetworkGateway2", &v.LocalNetworkGateway2) - delete(rawMsg, key) - case "peer": - err = unpopulate(val, "Peer", &v.Peer) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) - delete(rawMsg, key) - case "routingWeight": - err = unpopulate(val, "RoutingWeight", &v.RoutingWeight) - delete(rawMsg, key) - case "sharedKey": - err = unpopulate(val, "SharedKey", &v.SharedKey) - delete(rawMsg, key) - case "trafficSelectorPolicies": - err = unpopulate(val, "TrafficSelectorPolicies", &v.TrafficSelectorPolicies) - delete(rawMsg, key) - case "tunnelConnectionStatus": - err = unpopulate(val, "TunnelConnectionStatus", &v.TunnelConnectionStatus) - delete(rawMsg, key) - case "usePolicyBasedTrafficSelectors": - err = unpopulate(val, "UsePolicyBasedTrafficSelectors", &v.UsePolicyBasedTrafficSelectors) - delete(rawMsg, key) - case "virtualNetworkGateway1": - err = unpopulate(val, "VirtualNetworkGateway1", &v.VirtualNetworkGateway1) - delete(rawMsg, key) - case "virtualNetworkGateway2": - err = unpopulate(val, "VirtualNetworkGateway2", &v.VirtualNetworkGateway2) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListResult. -func (v VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionListResult. -func (v *VirtualNetworkGatewayConnectionListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionPropertiesFormat. -func (v VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorizationKey", v.AuthorizationKey) - populate(objectMap, "connectionMode", v.ConnectionMode) - populate(objectMap, "connectionProtocol", v.ConnectionProtocol) - populate(objectMap, "connectionStatus", v.ConnectionStatus) - populate(objectMap, "connectionType", v.ConnectionType) - populate(objectMap, "dpdTimeoutSeconds", v.DpdTimeoutSeconds) - populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) - populate(objectMap, "egressNatRules", v.EgressNatRules) - populate(objectMap, "enableBgp", v.EnableBgp) - populate(objectMap, "expressRouteGatewayBypass", v.ExpressRouteGatewayBypass) - populate(objectMap, "gatewayCustomBgpIpAddresses", v.GatewayCustomBgpIPAddresses) - populate(objectMap, "ipsecPolicies", v.IPSecPolicies) - populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) - populate(objectMap, "ingressNatRules", v.IngressNatRules) - populate(objectMap, "localNetworkGateway2", v.LocalNetworkGateway2) - populate(objectMap, "peer", v.Peer) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceGuid", v.ResourceGUID) - populate(objectMap, "routingWeight", v.RoutingWeight) - populate(objectMap, "sharedKey", v.SharedKey) - populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) - populate(objectMap, "tunnelConnectionStatus", v.TunnelConnectionStatus) - populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) - populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) - populate(objectMap, "virtualNetworkGateway1", v.VirtualNetworkGateway1) - populate(objectMap, "virtualNetworkGateway2", v.VirtualNetworkGateway2) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionPropertiesFormat. -func (v *VirtualNetworkGatewayConnectionPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorizationKey": - err = unpopulate(val, "AuthorizationKey", &v.AuthorizationKey) - delete(rawMsg, key) - case "connectionMode": - err = unpopulate(val, "ConnectionMode", &v.ConnectionMode) - delete(rawMsg, key) - case "connectionProtocol": - err = unpopulate(val, "ConnectionProtocol", &v.ConnectionProtocol) - delete(rawMsg, key) - case "connectionStatus": - err = unpopulate(val, "ConnectionStatus", &v.ConnectionStatus) - delete(rawMsg, key) - case "connectionType": - err = unpopulate(val, "ConnectionType", &v.ConnectionType) - delete(rawMsg, key) - case "dpdTimeoutSeconds": - err = unpopulate(val, "DpdTimeoutSeconds", &v.DpdTimeoutSeconds) - delete(rawMsg, key) - case "egressBytesTransferred": - err = unpopulate(val, "EgressBytesTransferred", &v.EgressBytesTransferred) - delete(rawMsg, key) - case "egressNatRules": - err = unpopulate(val, "EgressNatRules", &v.EgressNatRules) - delete(rawMsg, key) - case "enableBgp": - err = unpopulate(val, "EnableBgp", &v.EnableBgp) - delete(rawMsg, key) - case "expressRouteGatewayBypass": - err = unpopulate(val, "ExpressRouteGatewayBypass", &v.ExpressRouteGatewayBypass) - delete(rawMsg, key) - case "gatewayCustomBgpIpAddresses": - err = unpopulate(val, "GatewayCustomBgpIPAddresses", &v.GatewayCustomBgpIPAddresses) - delete(rawMsg, key) - case "ipsecPolicies": - err = unpopulate(val, "IPSecPolicies", &v.IPSecPolicies) - delete(rawMsg, key) - case "ingressBytesTransferred": - err = unpopulate(val, "IngressBytesTransferred", &v.IngressBytesTransferred) - delete(rawMsg, key) - case "ingressNatRules": - err = unpopulate(val, "IngressNatRules", &v.IngressNatRules) - delete(rawMsg, key) - case "localNetworkGateway2": - err = unpopulate(val, "LocalNetworkGateway2", &v.LocalNetworkGateway2) - delete(rawMsg, key) - case "peer": - err = unpopulate(val, "Peer", &v.Peer) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) - delete(rawMsg, key) - case "routingWeight": - err = unpopulate(val, "RoutingWeight", &v.RoutingWeight) - delete(rawMsg, key) - case "sharedKey": - err = unpopulate(val, "SharedKey", &v.SharedKey) - delete(rawMsg, key) - case "trafficSelectorPolicies": - err = unpopulate(val, "TrafficSelectorPolicies", &v.TrafficSelectorPolicies) - delete(rawMsg, key) - case "tunnelConnectionStatus": - err = unpopulate(val, "TunnelConnectionStatus", &v.TunnelConnectionStatus) - delete(rawMsg, key) - case "useLocalAzureIpAddress": - err = unpopulate(val, "UseLocalAzureIPAddress", &v.UseLocalAzureIPAddress) - delete(rawMsg, key) - case "usePolicyBasedTrafficSelectors": - err = unpopulate(val, "UsePolicyBasedTrafficSelectors", &v.UsePolicyBasedTrafficSelectors) - delete(rawMsg, key) - case "virtualNetworkGateway1": - err = unpopulate(val, "VirtualNetworkGateway1", &v.VirtualNetworkGateway1) - delete(rawMsg, key) - case "virtualNetworkGateway2": - err = unpopulate(val, "VirtualNetworkGateway2", &v.VirtualNetworkGateway2) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayIPConfiguration. -func (v VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayIPConfiguration. -func (v *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayIPConfigurationPropertiesFormat. -func (v VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateIPAddress", v.PrivateIPAddress) - populate(objectMap, "privateIPAllocationMethod", v.PrivateIPAllocationMethod) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "publicIPAddress", v.PublicIPAddress) - populate(objectMap, "subnet", v.Subnet) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayIPConfigurationPropertiesFormat. -func (v *VirtualNetworkGatewayIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "privateIPAddress": - err = unpopulate(val, "PrivateIPAddress", &v.PrivateIPAddress) - delete(rawMsg, key) - case "privateIPAllocationMethod": - err = unpopulate(val, "PrivateIPAllocationMethod", &v.PrivateIPAllocationMethod) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "publicIPAddress": - err = unpopulate(val, "PublicIPAddress", &v.PublicIPAddress) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &v.Subnet) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayListConnectionsResult. -func (v VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayListConnectionsResult. -func (v *VirtualNetworkGatewayListConnectionsResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayListResult. -func (v VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayListResult. -func (v *VirtualNetworkGatewayListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayNatRule. -func (v VirtualNetworkGatewayNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayNatRule. -func (v *VirtualNetworkGatewayNatRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayNatRuleProperties. -func (v VirtualNetworkGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "externalMappings", v.ExternalMappings) - populate(objectMap, "ipConfigurationId", v.IPConfigurationID) - populate(objectMap, "internalMappings", v.InternalMappings) - populate(objectMap, "mode", v.Mode) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayNatRuleProperties. -func (v *VirtualNetworkGatewayNatRuleProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "externalMappings": - err = unpopulate(val, "ExternalMappings", &v.ExternalMappings) - delete(rawMsg, key) - case "ipConfigurationId": - err = unpopulate(val, "IPConfigurationID", &v.IPConfigurationID) - delete(rawMsg, key) - case "internalMappings": - err = unpopulate(val, "InternalMappings", &v.InternalMappings) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &v.Mode) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPropertiesFormat. -func (v VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeActive", v.Active) - populate(objectMap, "bgpSettings", v.BgpSettings) - populate(objectMap, "customRoutes", v.CustomRoutes) - populate(objectMap, "disableIPSecReplayProtection", v.DisableIPSecReplayProtection) - populate(objectMap, "enableBgp", v.EnableBgp) - populate(objectMap, "enableBgpRouteTranslationForNat", v.EnableBgpRouteTranslationForNat) - populate(objectMap, "enableDnsForwarding", v.EnableDNSForwarding) - populate(objectMap, "enablePrivateIpAddress", v.EnablePrivateIPAddress) - populate(objectMap, "gatewayDefaultSite", v.GatewayDefaultSite) - populate(objectMap, "gatewayType", v.GatewayType) - populate(objectMap, "ipConfigurations", v.IPConfigurations) - populate(objectMap, "inboundDnsForwardingEndpoint", v.InboundDNSForwardingEndpoint) - populate(objectMap, "natRules", v.NatRules) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceGuid", v.ResourceGUID) - populate(objectMap, "sku", v.SKU) - populate(objectMap, "vNetExtendedLocationResourceId", v.VNetExtendedLocationResourceID) - populate(objectMap, "vpnClientConfiguration", v.VPNClientConfiguration) - populate(objectMap, "vpnGatewayGeneration", v.VPNGatewayGeneration) - populate(objectMap, "vpnType", v.VPNType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayPropertiesFormat. -func (v *VirtualNetworkGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activeActive": - err = unpopulate(val, "Active", &v.Active) - delete(rawMsg, key) - case "bgpSettings": - err = unpopulate(val, "BgpSettings", &v.BgpSettings) - delete(rawMsg, key) - case "customRoutes": - err = unpopulate(val, "CustomRoutes", &v.CustomRoutes) - delete(rawMsg, key) - case "disableIPSecReplayProtection": - err = unpopulate(val, "DisableIPSecReplayProtection", &v.DisableIPSecReplayProtection) - delete(rawMsg, key) - case "enableBgp": - err = unpopulate(val, "EnableBgp", &v.EnableBgp) - delete(rawMsg, key) - case "enableBgpRouteTranslationForNat": - err = unpopulate(val, "EnableBgpRouteTranslationForNat", &v.EnableBgpRouteTranslationForNat) - delete(rawMsg, key) - case "enableDnsForwarding": - err = unpopulate(val, "EnableDNSForwarding", &v.EnableDNSForwarding) - delete(rawMsg, key) - case "enablePrivateIpAddress": - err = unpopulate(val, "EnablePrivateIPAddress", &v.EnablePrivateIPAddress) - delete(rawMsg, key) - case "gatewayDefaultSite": - err = unpopulate(val, "GatewayDefaultSite", &v.GatewayDefaultSite) - delete(rawMsg, key) - case "gatewayType": - err = unpopulate(val, "GatewayType", &v.GatewayType) - delete(rawMsg, key) - case "ipConfigurations": - err = unpopulate(val, "IPConfigurations", &v.IPConfigurations) - delete(rawMsg, key) - case "inboundDnsForwardingEndpoint": - err = unpopulate(val, "InboundDNSForwardingEndpoint", &v.InboundDNSForwardingEndpoint) - delete(rawMsg, key) - case "natRules": - err = unpopulate(val, "NatRules", &v.NatRules) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &v.SKU) - delete(rawMsg, key) - case "vNetExtendedLocationResourceId": - err = unpopulate(val, "VNetExtendedLocationResourceID", &v.VNetExtendedLocationResourceID) - delete(rawMsg, key) - case "vpnClientConfiguration": - err = unpopulate(val, "VPNClientConfiguration", &v.VPNClientConfiguration) - delete(rawMsg, key) - case "vpnGatewayGeneration": - err = unpopulate(val, "VPNGatewayGeneration", &v.VPNGatewayGeneration) - delete(rawMsg, key) - case "vpnType": - err = unpopulate(val, "VPNType", &v.VPNType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewaySKU. -func (v VirtualNetworkGatewaySKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capacity", v.Capacity) - populate(objectMap, "name", v.Name) - populate(objectMap, "tier", v.Tier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaySKU. -func (v *VirtualNetworkGatewaySKU) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacity": - err = unpopulate(val, "Capacity", &v.Capacity) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &v.Tier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListResult. -func (v VirtualNetworkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkListResult. -func (v *VirtualNetworkListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListUsageResult. -func (v VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkListUsageResult. -func (v *VirtualNetworkListUsageResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeering. -func (v VirtualNetworkPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPeering. -func (v *VirtualNetworkPeering) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeeringListResult. -func (v VirtualNetworkPeeringListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPeeringListResult. -func (v *VirtualNetworkPeeringListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeeringPropertiesFormat. -func (v VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowForwardedTraffic", v.AllowForwardedTraffic) - populate(objectMap, "allowGatewayTransit", v.AllowGatewayTransit) - populate(objectMap, "allowVirtualNetworkAccess", v.AllowVirtualNetworkAccess) - populate(objectMap, "doNotVerifyRemoteGateways", v.DoNotVerifyRemoteGateways) - populate(objectMap, "peeringState", v.PeeringState) - populate(objectMap, "peeringSyncLevel", v.PeeringSyncLevel) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "remoteAddressSpace", v.RemoteAddressSpace) - populate(objectMap, "remoteBgpCommunities", v.RemoteBgpCommunities) - populate(objectMap, "remoteVirtualNetwork", v.RemoteVirtualNetwork) - populate(objectMap, "remoteVirtualNetworkAddressSpace", v.RemoteVirtualNetworkAddressSpace) - populate(objectMap, "remoteVirtualNetworkEncryption", v.RemoteVirtualNetworkEncryption) - populate(objectMap, "resourceGuid", v.ResourceGUID) - populate(objectMap, "useRemoteGateways", v.UseRemoteGateways) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPeeringPropertiesFormat. -func (v *VirtualNetworkPeeringPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowForwardedTraffic": - err = unpopulate(val, "AllowForwardedTraffic", &v.AllowForwardedTraffic) - delete(rawMsg, key) - case "allowGatewayTransit": - err = unpopulate(val, "AllowGatewayTransit", &v.AllowGatewayTransit) - delete(rawMsg, key) - case "allowVirtualNetworkAccess": - err = unpopulate(val, "AllowVirtualNetworkAccess", &v.AllowVirtualNetworkAccess) - delete(rawMsg, key) - case "doNotVerifyRemoteGateways": - err = unpopulate(val, "DoNotVerifyRemoteGateways", &v.DoNotVerifyRemoteGateways) - delete(rawMsg, key) - case "peeringState": - err = unpopulate(val, "PeeringState", &v.PeeringState) - delete(rawMsg, key) - case "peeringSyncLevel": - err = unpopulate(val, "PeeringSyncLevel", &v.PeeringSyncLevel) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "remoteAddressSpace": - err = unpopulate(val, "RemoteAddressSpace", &v.RemoteAddressSpace) - delete(rawMsg, key) - case "remoteBgpCommunities": - err = unpopulate(val, "RemoteBgpCommunities", &v.RemoteBgpCommunities) - delete(rawMsg, key) - case "remoteVirtualNetwork": - err = unpopulate(val, "RemoteVirtualNetwork", &v.RemoteVirtualNetwork) - delete(rawMsg, key) - case "remoteVirtualNetworkAddressSpace": - err = unpopulate(val, "RemoteVirtualNetworkAddressSpace", &v.RemoteVirtualNetworkAddressSpace) - delete(rawMsg, key) - case "remoteVirtualNetworkEncryption": - err = unpopulate(val, "RemoteVirtualNetworkEncryption", &v.RemoteVirtualNetworkEncryption) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) - delete(rawMsg, key) - case "useRemoteGateways": - err = unpopulate(val, "UseRemoteGateways", &v.UseRemoteGateways) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesFormat. -func (v VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressSpace", v.AddressSpace) - populate(objectMap, "bgpCommunities", v.BgpCommunities) - populate(objectMap, "ddosProtectionPlan", v.DdosProtectionPlan) - populate(objectMap, "dhcpOptions", v.DhcpOptions) - populate(objectMap, "enableDdosProtection", v.EnableDdosProtection) - populate(objectMap, "enableVmProtection", v.EnableVMProtection) - populate(objectMap, "encryption", v.Encryption) - populate(objectMap, "flowTimeoutInMinutes", v.FlowTimeoutInMinutes) - populate(objectMap, "ipAllocations", v.IPAllocations) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceGuid", v.ResourceGUID) - populate(objectMap, "subnets", v.Subnets) - populate(objectMap, "virtualNetworkPeerings", v.VirtualNetworkPeerings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPropertiesFormat. -func (v *VirtualNetworkPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressSpace": - err = unpopulate(val, "AddressSpace", &v.AddressSpace) - delete(rawMsg, key) - case "bgpCommunities": - err = unpopulate(val, "BgpCommunities", &v.BgpCommunities) - delete(rawMsg, key) - case "ddosProtectionPlan": - err = unpopulate(val, "DdosProtectionPlan", &v.DdosProtectionPlan) - delete(rawMsg, key) - case "dhcpOptions": - err = unpopulate(val, "DhcpOptions", &v.DhcpOptions) - delete(rawMsg, key) - case "enableDdosProtection": - err = unpopulate(val, "EnableDdosProtection", &v.EnableDdosProtection) - delete(rawMsg, key) - case "enableVmProtection": - err = unpopulate(val, "EnableVMProtection", &v.EnableVMProtection) - delete(rawMsg, key) - case "encryption": - err = unpopulate(val, "Encryption", &v.Encryption) - delete(rawMsg, key) - case "flowTimeoutInMinutes": - err = unpopulate(val, "FlowTimeoutInMinutes", &v.FlowTimeoutInMinutes) - delete(rawMsg, key) - case "ipAllocations": - err = unpopulate(val, "IPAllocations", &v.IPAllocations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) - delete(rawMsg, key) - case "subnets": - err = unpopulate(val, "Subnets", &v.Subnets) - delete(rawMsg, key) - case "virtualNetworkPeerings": - err = unpopulate(val, "VirtualNetworkPeerings", &v.VirtualNetworkPeerings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTap. -func (v VirtualNetworkTap) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkTap. -func (v *VirtualNetworkTap) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTapListResult. -func (v VirtualNetworkTapListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkTapListResult. -func (v *VirtualNetworkTapListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTapPropertiesFormat. -func (v VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationLoadBalancerFrontEndIPConfiguration", v.DestinationLoadBalancerFrontEndIPConfiguration) - populate(objectMap, "destinationNetworkInterfaceIPConfiguration", v.DestinationNetworkInterfaceIPConfiguration) - populate(objectMap, "destinationPort", v.DestinationPort) - populate(objectMap, "networkInterfaceTapConfigurations", v.NetworkInterfaceTapConfigurations) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceGuid", v.ResourceGUID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkTapPropertiesFormat. -func (v *VirtualNetworkTapPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "destinationLoadBalancerFrontEndIPConfiguration": - err = unpopulate(val, "DestinationLoadBalancerFrontEndIPConfiguration", &v.DestinationLoadBalancerFrontEndIPConfiguration) - delete(rawMsg, key) - case "destinationNetworkInterfaceIPConfiguration": - err = unpopulate(val, "DestinationNetworkInterfaceIPConfiguration", &v.DestinationNetworkInterfaceIPConfiguration) - delete(rawMsg, key) - case "destinationPort": - err = unpopulate(val, "DestinationPort", &v.DestinationPort) - delete(rawMsg, key) - case "networkInterfaceTapConfigurations": - err = unpopulate(val, "NetworkInterfaceTapConfigurations", &v.NetworkInterfaceTapConfigurations) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "resourceGuid": - err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkUsage. -func (v VirtualNetworkUsage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "currentValue", v.CurrentValue) - populate(objectMap, "id", v.ID) - populate(objectMap, "limit", v.Limit) - populate(objectMap, "name", v.Name) - populate(objectMap, "unit", v.Unit) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkUsage. -func (v *VirtualNetworkUsage) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentValue": - err = unpopulate(val, "CurrentValue", &v.CurrentValue) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &v.Limit) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &v.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkUsageName. -func (v VirtualNetworkUsageName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "localizedValue", v.LocalizedValue) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkUsageName. -func (v *VirtualNetworkUsageName) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "localizedValue": - err = unpopulate(val, "LocalizedValue", &v.LocalizedValue) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualRouter. -func (v VirtualRouter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouter. -func (v *VirtualRouter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualRouterAutoScaleConfiguration. -func (v VirtualRouterAutoScaleConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "minCapacity", v.MinCapacity) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterAutoScaleConfiguration. -func (v *VirtualRouterAutoScaleConfiguration) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "minCapacity": - err = unpopulate(val, "MinCapacity", &v.MinCapacity) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualRouterListResult. -func (v VirtualRouterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterListResult. -func (v *VirtualRouterListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeering. -func (v VirtualRouterPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterPeering. -func (v *VirtualRouterPeering) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeeringListResult. -func (v VirtualRouterPeeringListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterPeeringListResult. -func (v *VirtualRouterPeeringListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeeringProperties. -func (v VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "peerAsn", v.PeerAsn) - populate(objectMap, "peerIp", v.PeerIP) - populate(objectMap, "provisioningState", v.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterPeeringProperties. -func (v *VirtualRouterPeeringProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "peerAsn": - err = unpopulate(val, "PeerAsn", &v.PeerAsn) - delete(rawMsg, key) - case "peerIp": - err = unpopulate(val, "PeerIP", &v.PeerIP) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPropertiesFormat. -func (v VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hostedGateway", v.HostedGateway) - populate(objectMap, "hostedSubnet", v.HostedSubnet) - populate(objectMap, "peerings", v.Peerings) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "virtualRouterAsn", v.VirtualRouterAsn) - populate(objectMap, "virtualRouterIps", v.VirtualRouterIPs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterPropertiesFormat. -func (v *VirtualRouterPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "hostedGateway": - err = unpopulate(val, "HostedGateway", &v.HostedGateway) - delete(rawMsg, key) - case "hostedSubnet": - err = unpopulate(val, "HostedSubnet", &v.HostedSubnet) - delete(rawMsg, key) - case "peerings": - err = unpopulate(val, "Peerings", &v.Peerings) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "virtualRouterAsn": - err = unpopulate(val, "VirtualRouterAsn", &v.VirtualRouterAsn) - delete(rawMsg, key) - case "virtualRouterIps": - err = unpopulate(val, "VirtualRouterIPs", &v.VirtualRouterIPs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualWAN. -func (v VirtualWAN) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualWAN. -func (v *VirtualWAN) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &v.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &v.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualWanProperties. -func (v VirtualWanProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowBranchToBranchTraffic", v.AllowBranchToBranchTraffic) - populate(objectMap, "allowVnetToVnetTraffic", v.AllowVnetToVnetTraffic) - populate(objectMap, "disableVpnEncryption", v.DisableVPNEncryption) - populate(objectMap, "office365LocalBreakoutCategory", v.Office365LocalBreakoutCategory) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "type", v.Type) - populate(objectMap, "vpnSites", v.VPNSites) - populate(objectMap, "virtualHubs", v.VirtualHubs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualWanProperties. -func (v *VirtualWanProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowBranchToBranchTraffic": - err = unpopulate(val, "AllowBranchToBranchTraffic", &v.AllowBranchToBranchTraffic) - delete(rawMsg, key) - case "allowVnetToVnetTraffic": - err = unpopulate(val, "AllowVnetToVnetTraffic", &v.AllowVnetToVnetTraffic) - delete(rawMsg, key) - case "disableVpnEncryption": - err = unpopulate(val, "DisableVPNEncryption", &v.DisableVPNEncryption) - delete(rawMsg, key) - case "office365LocalBreakoutCategory": - err = unpopulate(val, "Office365LocalBreakoutCategory", &v.Office365LocalBreakoutCategory) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - case "vpnSites": - err = unpopulate(val, "VPNSites", &v.VPNSites) - delete(rawMsg, key) - case "virtualHubs": - err = unpopulate(val, "VirtualHubs", &v.VirtualHubs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualWanSecurityProvider. -func (v VirtualWanSecurityProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", v.Name) - populate(objectMap, "type", v.Type) - populate(objectMap, "url", v.URL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualWanSecurityProvider. -func (v *VirtualWanSecurityProvider) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &v.URL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualWanSecurityProviders. -func (v VirtualWanSecurityProviders) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "supportedProviders", v.SupportedProviders) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualWanSecurityProviders. -func (v *VirtualWanSecurityProviders) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "supportedProviders": - err = unpopulate(val, "SupportedProviders", &v.SupportedProviders) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualWanVPNProfileParameters. -func (v VirtualWanVPNProfileParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authenticationMethod", v.AuthenticationMethod) - populate(objectMap, "vpnServerConfigurationResourceId", v.VPNServerConfigurationResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualWanVPNProfileParameters. -func (v *VirtualWanVPNProfileParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authenticationMethod": - err = unpopulate(val, "AuthenticationMethod", &v.AuthenticationMethod) - delete(rawMsg, key) - case "vpnServerConfigurationResourceId": - err = unpopulate(val, "VPNServerConfigurationResourceID", &v.VPNServerConfigurationResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VnetRoute. -func (v VnetRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bgpConnections", v.BgpConnections) - populate(objectMap, "staticRoutes", v.StaticRoutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VnetRoute. -func (v *VnetRoute) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bgpConnections": - err = unpopulate(val, "BgpConnections", &v.BgpConnections) - delete(rawMsg, key) - case "staticRoutes": - err = unpopulate(val, "StaticRoutes", &v.StaticRoutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Watcher. -func (w Watcher) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", w.Etag) - populate(objectMap, "id", w.ID) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Watcher. -func (w *Watcher) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &w.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &w.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &w.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &w.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &w.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WatcherListResult. -func (w WatcherListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WatcherListResult. -func (w *WatcherListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &w.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WatcherPropertiesFormat. -func (w WatcherPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", w.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WatcherPropertiesFormat. -func (w *WatcherPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallCustomRule. -func (w WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", w.Action) - populate(objectMap, "etag", w.Etag) - populate(objectMap, "matchConditions", w.MatchConditions) - populate(objectMap, "name", w.Name) - populate(objectMap, "priority", w.Priority) - populate(objectMap, "ruleType", w.RuleType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallCustomRule. -func (w *WebApplicationFirewallCustomRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, "Action", &w.Action) - delete(rawMsg, key) - case "etag": - err = unpopulate(val, "Etag", &w.Etag) - delete(rawMsg, key) - case "matchConditions": - err = unpopulate(val, "MatchConditions", &w.MatchConditions) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &w.Priority) - delete(rawMsg, key) - case "ruleType": - err = unpopulate(val, "RuleType", &w.RuleType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicy. -func (w WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", w.Etag) - populate(objectMap, "id", w.ID) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicy. -func (w *WebApplicationFirewallPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "etag": - err = unpopulate(val, "Etag", &w.Etag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &w.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &w.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &w.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &w.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyListResult. -func (w WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", w.NextLink) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyListResult. -func (w *WebApplicationFirewallPolicyListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &w.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &w.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyPropertiesFormat. -func (w WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationGateways", w.ApplicationGateways) - populate(objectMap, "customRules", w.CustomRules) - populate(objectMap, "httpListeners", w.HTTPListeners) - populate(objectMap, "managedRules", w.ManagedRules) - populate(objectMap, "pathBasedRules", w.PathBasedRules) - populate(objectMap, "policySettings", w.PolicySettings) - populate(objectMap, "provisioningState", w.ProvisioningState) - populate(objectMap, "resourceState", w.ResourceState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyPropertiesFormat. -func (w *WebApplicationFirewallPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "applicationGateways": - err = unpopulate(val, "ApplicationGateways", &w.ApplicationGateways) - delete(rawMsg, key) - case "customRules": - err = unpopulate(val, "CustomRules", &w.CustomRules) - delete(rawMsg, key) - case "httpListeners": - err = unpopulate(val, "HTTPListeners", &w.HTTPListeners) - delete(rawMsg, key) - case "managedRules": - err = unpopulate(val, "ManagedRules", &w.ManagedRules) - delete(rawMsg, key) - case "pathBasedRules": - err = unpopulate(val, "PathBasedRules", &w.PathBasedRules) - delete(rawMsg, key) - case "policySettings": - err = unpopulate(val, "PolicySettings", &w.PolicySettings) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) - delete(rawMsg, key) - case "resourceState": - err = unpopulate(val, "ResourceState", &w.ResourceState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/natgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/natgateways_client.go deleted file mode 100644 index efd67fe8..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/natgateways_client.go +++ /dev/null @@ -1,426 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// NatGatewaysClient contains the methods for the NatGateways group. -// Don't use this type directly, use NewNatGatewaysClient() instead. -type NatGatewaysClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewNatGatewaysClient creates a new instance of NatGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewNatGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NatGatewaysClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &NatGatewaysClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a nat gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// natGatewayName - The name of the nat gateway. -// parameters - Parameters supplied to the create or update nat gateway operation. -// options - NatGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the NatGatewaysClient.BeginCreateOrUpdate -// method. -func (client *NatGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway, options *NatGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[NatGatewaysClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, natGatewayName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[NatGatewaysClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[NatGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a nat gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *NatGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway, options *NatGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, natGatewayName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *NatGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway, options *NatGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if natGatewayName == "" { - return nil, errors.New("parameter natGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{natGatewayName}", url.PathEscape(natGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified nat gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// natGatewayName - The name of the nat gateway. -// options - NatGatewaysClientBeginDeleteOptions contains the optional parameters for the NatGatewaysClient.BeginDelete method. -func (client *NatGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientBeginDeleteOptions) (*runtime.Poller[NatGatewaysClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, natGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[NatGatewaysClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[NatGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified nat gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *NatGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, natGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *NatGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if natGatewayName == "" { - return nil, errors.New("parameter natGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{natGatewayName}", url.PathEscape(natGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified nat gateway in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// natGatewayName - The name of the nat gateway. -// options - NatGatewaysClientGetOptions contains the optional parameters for the NatGatewaysClient.Get method. -func (client *NatGatewaysClient) Get(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientGetOptions) (NatGatewaysClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, natGatewayName, options) - if err != nil { - return NatGatewaysClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return NatGatewaysClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NatGatewaysClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *NatGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if natGatewayName == "" { - return nil, errors.New("parameter natGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{natGatewayName}", url.PathEscape(natGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *NatGatewaysClient) getHandleResponse(resp *http.Response) (NatGatewaysClientGetResponse, error) { - result := NatGatewaysClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NatGateway); err != nil { - return NatGatewaysClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all nat gateways in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.List method. -func (client *NatGatewaysClient) NewListPager(resourceGroupName string, options *NatGatewaysClientListOptions) *runtime.Pager[NatGatewaysClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[NatGatewaysClientListResponse]{ - More: func(page NatGatewaysClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *NatGatewaysClientListResponse) (NatGatewaysClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return NatGatewaysClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return NatGatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NatGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *NatGatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *NatGatewaysClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *NatGatewaysClient) listHandleResponse(resp *http.Response) (NatGatewaysClientListResponse, error) { - result := NatGatewaysClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NatGatewayListResult); err != nil { - return NatGatewaysClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the Nat Gateways in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.ListAll method. -func (client *NatGatewaysClient) NewListAllPager(options *NatGatewaysClientListAllOptions) *runtime.Pager[NatGatewaysClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[NatGatewaysClientListAllResponse]{ - More: func(page NatGatewaysClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *NatGatewaysClientListAllResponse) (NatGatewaysClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return NatGatewaysClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return NatGatewaysClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NatGatewaysClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *NatGatewaysClient) listAllCreateRequest(ctx context.Context, options *NatGatewaysClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *NatGatewaysClient) listAllHandleResponse(resp *http.Response) (NatGatewaysClientListAllResponse, error) { - result := NatGatewaysClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NatGatewayListResult); err != nil { - return NatGatewaysClientListAllResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates nat gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// natGatewayName - The name of the nat gateway. -// parameters - Parameters supplied to update nat gateway tags. -// options - NatGatewaysClientUpdateTagsOptions contains the optional parameters for the NatGatewaysClient.UpdateTags method. -func (client *NatGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject, options *NatGatewaysClientUpdateTagsOptions) (NatGatewaysClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, natGatewayName, parameters, options) - if err != nil { - return NatGatewaysClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return NatGatewaysClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NatGatewaysClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *NatGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject, options *NatGatewaysClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if natGatewayName == "" { - return nil, errors.New("parameter natGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{natGatewayName}", url.PathEscape(natGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *NatGatewaysClient) updateTagsHandleResponse(resp *http.Response) (NatGatewaysClientUpdateTagsResponse, error) { - result := NatGatewaysClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NatGateway); err != nil { - return NatGatewaysClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/natrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/natrules_client.go deleted file mode 100644 index 08c2a51d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/natrules_client.go +++ /dev/null @@ -1,328 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// NatRulesClient contains the methods for the NatRules group. -// Don't use this type directly, use NewNatRulesClient() instead. -type NatRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewNatRulesClient creates a new instance of NatRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NatRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &NatRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// natRuleParameters - Parameters supplied to create or Update a Nat Rule. -// options - NatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the NatRulesClient.BeginCreateOrUpdate -// method. -func (client *NatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VPNGatewayNatRule, options *NatRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[NatRulesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, natRuleName, natRuleParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[NatRulesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[NatRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *NatRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VPNGatewayNatRule, options *NatRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, natRuleName, natRuleParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *NatRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VPNGatewayNatRule, options *NatRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if natRuleName == "" { - return nil, errors.New("parameter natRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, natRuleParameters) -} - -// BeginDelete - Deletes a nat rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// options - NatRulesClientBeginDeleteOptions contains the optional parameters for the NatRulesClient.BeginDelete method. -func (client *NatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientBeginDeleteOptions) (*runtime.Poller[NatRulesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, natRuleName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[NatRulesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[NatRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a nat rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *NatRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, natRuleName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *NatRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if natRuleName == "" { - return nil, errors.New("parameter natRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a nat ruleGet. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// options - NatRulesClientGetOptions contains the optional parameters for the NatRulesClient.Get method. -func (client *NatRulesClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientGetOptions) (NatRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, natRuleName, options) - if err != nil { - return NatRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return NatRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NatRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *NatRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if natRuleName == "" { - return nil, errors.New("parameter natRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *NatRulesClient) getHandleResponse(resp *http.Response) (NatRulesClientGetResponse, error) { - result := NatRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VPNGatewayNatRule); err != nil { - return NatRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListByVPNGatewayPager - Retrieves all nat rules for a particular virtual wan vpn gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.ListByVPNGateway -// method. -func (client *NatRulesClient) NewListByVPNGatewayPager(resourceGroupName string, gatewayName string, options *NatRulesClientListByVPNGatewayOptions) *runtime.Pager[NatRulesClientListByVPNGatewayResponse] { - return runtime.NewPager(runtime.PagingHandler[NatRulesClientListByVPNGatewayResponse]{ - More: func(page NatRulesClientListByVPNGatewayResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *NatRulesClientListByVPNGatewayResponse) (NatRulesClientListByVPNGatewayResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return NatRulesClientListByVPNGatewayResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return NatRulesClientListByVPNGatewayResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return NatRulesClientListByVPNGatewayResponse{}, runtime.NewResponseError(resp) - } - return client.listByVPNGatewayHandleResponse(resp) - }, - }) -} - -// listByVPNGatewayCreateRequest creates the ListByVPNGateway request. -func (client *NatRulesClient) listByVPNGatewayCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *NatRulesClientListByVPNGatewayOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByVPNGatewayHandleResponse handles the ListByVPNGateway response. -func (client *NatRulesClient) listByVPNGatewayHandleResponse(resp *http.Response) (NatRulesClientListByVPNGatewayResponse, error) { - result := NatRulesClientListByVPNGatewayResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNGatewayNatRulesResult); err != nil { - return NatRulesClientListByVPNGatewayResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/operations_client.go deleted file mode 100644 index b46a8761..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/operations_client.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - host string - pl runtime.Pipeline -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists all of the available Network Rest API operations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.Network/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/p2svpngateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/p2svpngateways_client.go deleted file mode 100644 index 2ca605c9..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/p2svpngateways_client.go +++ /dev/null @@ -1,768 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// P2SVPNGatewaysClient contains the methods for the P2SVPNGateways group. -// Don't use this type directly, use NewP2SVPNGatewaysClient() instead. -type P2SVPNGatewaysClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewP2SVPNGatewaysClient creates a new instance of P2SVPNGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewP2SVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*P2SVPNGatewaysClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &P2SVPNGatewaysClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// gatewayName - The name of the gateway. -// p2SVPNGatewayParameters - Parameters supplied to create or Update a virtual wan p2s vpn gateway. -// options - P2SVPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginCreateOrUpdate -// method. -func (client *P2SVPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters P2SVPNGateway, options *P2SVPNGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[P2SVPNGatewaysClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[P2SVPNGatewaysClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *P2SVPNGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters P2SVPNGateway, options *P2SVPNGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *P2SVPNGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters P2SVPNGateway, options *P2SVPNGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, p2SVPNGatewayParameters) -} - -// BeginDelete - Deletes a virtual wan p2s vpn gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// gatewayName - The name of the gateway. -// options - P2SVPNGatewaysClientBeginDeleteOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDelete -// method. -func (client *P2SVPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginDeleteOptions) (*runtime.Poller[P2SVPNGatewaysClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[P2SVPNGatewaysClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a virtual wan p2s vpn gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *P2SVPNGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *P2SVPNGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDisconnectP2SVPNConnections - Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource -// group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// p2SVPNGatewayName - The name of the P2S Vpn Gateway. -// request - The parameters are supplied to disconnect p2s vpn connections. -// options - P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections -// method. -func (client *P2SVPNGatewaysClient) BeginDisconnectP2SVPNConnections(ctx context.Context, resourceGroupName string, p2SVPNGatewayName string, request P2SVPNConnectionRequest, options *P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions) (*runtime.Poller[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.disconnectP2SVPNConnections(ctx, resourceGroupName, p2SVPNGatewayName, request, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse](options.ResumeToken, client.pl, nil) - } -} - -// DisconnectP2SVPNConnections - Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource -// group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *P2SVPNGatewaysClient) disconnectP2SVPNConnections(ctx context.Context, resourceGroupName string, p2SVPNGatewayName string, request P2SVPNConnectionRequest, options *P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions) (*http.Response, error) { - req, err := client.disconnectP2SVPNConnectionsCreateRequest(ctx, resourceGroupName, p2SVPNGatewayName, request, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// disconnectP2SVPNConnectionsCreateRequest creates the DisconnectP2SVPNConnections request. -func (client *P2SVPNGatewaysClient) disconnectP2SVPNConnectionsCreateRequest(ctx context.Context, resourceGroupName string, p2SVPNGatewayName string, request P2SVPNConnectionRequest, options *P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if p2SVPNGatewayName == "" { - return nil, errors.New("parameter p2SVPNGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{p2sVpnGatewayName}", url.PathEscape(p2SVPNGatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// BeginGenerateVPNProfile - Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the P2SVpnGateway. -// parameters - Parameters supplied to the generate P2SVpnGateway VPN client package operation. -// options - P2SVPNGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGenerateVPNProfile -// method. -func (client *P2SVPNGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVPNProfileParameters, options *P2SVPNGatewaysClientBeginGenerateVPNProfileOptions) (*runtime.Poller[P2SVPNGatewaysClientGenerateVPNProfileResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.generateVPNProfile(ctx, resourceGroupName, gatewayName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[P2SVPNGatewaysClientGenerateVPNProfileResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientGenerateVPNProfileResponse](options.ResumeToken, client.pl, nil) - } -} - -// GenerateVPNProfile - Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *P2SVPNGatewaysClient) generateVPNProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVPNProfileParameters, options *P2SVPNGatewaysClientBeginGenerateVPNProfileOptions) (*http.Response, error) { - req, err := client.generateVPNProfileCreateRequest(ctx, resourceGroupName, gatewayName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// generateVPNProfileCreateRequest creates the GenerateVPNProfile request. -func (client *P2SVPNGatewaysClient) generateVPNProfileCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVPNProfileParameters, options *P2SVPNGatewaysClientBeginGenerateVPNProfileOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// Get - Retrieves the details of a virtual wan p2s vpn gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// gatewayName - The name of the gateway. -// options - P2SVPNGatewaysClientGetOptions contains the optional parameters for the P2SVPNGatewaysClient.Get method. -func (client *P2SVPNGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientGetOptions) (P2SVPNGatewaysClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return P2SVPNGatewaysClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return P2SVPNGatewaysClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return P2SVPNGatewaysClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *P2SVPNGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *P2SVPNGatewaysClient) getHandleResponse(resp *http.Response) (P2SVPNGatewaysClientGetResponse, error) { - result := P2SVPNGatewaysClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.P2SVPNGateway); err != nil { - return P2SVPNGatewaysClientGetResponse{}, err - } - return result, nil -} - -// BeginGetP2SVPNConnectionHealth - Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified -// resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the P2SVpnGateway. -// options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth -// method. -func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions) (*runtime.Poller[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getP2SVPNConnectionHealth(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetP2SVPNConnectionHealth - Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified -// resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions) (*http.Response, error) { - req, err := client.getP2SVPNConnectionHealthCreateRequest(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getP2SVPNConnectionHealthCreateRequest creates the GetP2SVPNConnectionHealth request. -func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginGetP2SVPNConnectionHealthDetailed - Gets the sas url to get the connection health detail of P2S clients of the virtual -// wan P2SVpnGateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the P2SVpnGateway. -// request - Request parameters supplied to get p2s vpn connections detailed health. -// options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed -// method. -func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVPNConnectionHealthRequest, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions) (*runtime.Poller[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getP2SVPNConnectionHealthDetailed(ctx, resourceGroupName, gatewayName, request, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetP2SVPNConnectionHealthDetailed - Gets the sas url to get the connection health detail of P2S clients of the virtual -// wan P2SVpnGateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVPNConnectionHealthRequest, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions) (*http.Response, error) { - req, err := client.getP2SVPNConnectionHealthDetailedCreateRequest(ctx, resourceGroupName, gatewayName, request, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getP2SVPNConnectionHealthDetailedCreateRequest creates the GetP2SVPNConnectionHealthDetailed request. -func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthDetailedCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVPNConnectionHealthRequest, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// NewListPager - Lists all the P2SVpnGateways in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.List method. -func (client *P2SVPNGatewaysClient) NewListPager(options *P2SVPNGatewaysClientListOptions) *runtime.Pager[P2SVPNGatewaysClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[P2SVPNGatewaysClientListResponse]{ - More: func(page P2SVPNGatewaysClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *P2SVPNGatewaysClientListResponse) (P2SVPNGatewaysClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return P2SVPNGatewaysClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return P2SVPNGatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return P2SVPNGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *P2SVPNGatewaysClient) listCreateRequest(ctx context.Context, options *P2SVPNGatewaysClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *P2SVPNGatewaysClient) listHandleResponse(resp *http.Response) (P2SVPNGatewaysClientListResponse, error) { - result := P2SVPNGatewaysClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListP2SVPNGatewaysResult); err != nil { - return P2SVPNGatewaysClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all the P2SVpnGateways in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// options - P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.ListByResourceGroup -// method. -func (client *P2SVPNGatewaysClient) NewListByResourceGroupPager(resourceGroupName string, options *P2SVPNGatewaysClientListByResourceGroupOptions) *runtime.Pager[P2SVPNGatewaysClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[P2SVPNGatewaysClientListByResourceGroupResponse]{ - More: func(page P2SVPNGatewaysClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *P2SVPNGatewaysClientListByResourceGroupResponse) (P2SVPNGatewaysClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return P2SVPNGatewaysClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return P2SVPNGatewaysClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return P2SVPNGatewaysClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *P2SVPNGatewaysClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *P2SVPNGatewaysClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *P2SVPNGatewaysClient) listByResourceGroupHandleResponse(resp *http.Response) (P2SVPNGatewaysClientListByResourceGroupResponse, error) { - result := P2SVPNGatewaysClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListP2SVPNGatewaysResult); err != nil { - return P2SVPNGatewaysClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// BeginReset - Resets the primary of the p2s vpn gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// gatewayName - The name of the gateway. -// options - P2SVPNGatewaysClientBeginResetOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginReset -// method. -func (client *P2SVPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginResetOptions) (*runtime.Poller[P2SVPNGatewaysClientResetResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.reset(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[P2SVPNGatewaysClientResetResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientResetResponse](options.ResumeToken, client.pl, nil) - } -} - -// Reset - Resets the primary of the p2s vpn gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *P2SVPNGatewaysClient) reset(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginResetOptions) (*http.Response, error) { - req, err := client.resetCreateRequest(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resetCreateRequest creates the Reset request. -func (client *P2SVPNGatewaysClient) resetCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginResetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginUpdateTags - Updates virtual wan p2s vpn gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// gatewayName - The name of the gateway. -// p2SVPNGatewayParameters - Parameters supplied to update a virtual wan p2s vpn gateway tags. -// options - P2SVPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginUpdateTags -// method. -func (client *P2SVPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters TagsObject, options *P2SVPNGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[P2SVPNGatewaysClientUpdateTagsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updateTags(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[P2SVPNGatewaysClientUpdateTagsResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[P2SVPNGatewaysClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdateTags - Updates virtual wan p2s vpn gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *P2SVPNGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters TagsObject, options *P2SVPNGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *P2SVPNGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters TagsObject, options *P2SVPNGatewaysClientBeginUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, p2SVPNGatewayParameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/packetcaptures_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/packetcaptures_client.go deleted file mode 100644 index ce31b491..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/packetcaptures_client.go +++ /dev/null @@ -1,462 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PacketCapturesClient contains the methods for the PacketCaptures group. -// Don't use this type directly, use NewPacketCapturesClient() instead. -type PacketCapturesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPacketCapturesClient creates a new instance of PacketCapturesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPacketCapturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PacketCapturesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PacketCapturesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - Create and start a packet capture on the specified VM. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// packetCaptureName - The name of the packet capture session. -// parameters - Parameters that define the create packet capture operation. -// options - PacketCapturesClientBeginCreateOptions contains the optional parameters for the PacketCapturesClient.BeginCreate -// method. -func (client *PacketCapturesClient) BeginCreate(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOptions) (*runtime.Poller[PacketCapturesClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PacketCapturesClientCreateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[PacketCapturesClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - Create and start a packet capture on the specified VM. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PacketCapturesClient) create(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *PacketCapturesClient) createCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if packetCaptureName == "" { - return nil, errors.New("parameter packetCaptureName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{packetCaptureName}", url.PathEscape(packetCaptureName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified packet capture session. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// packetCaptureName - The name of the packet capture session. -// options - PacketCapturesClientBeginDeleteOptions contains the optional parameters for the PacketCapturesClient.BeginDelete -// method. -func (client *PacketCapturesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (*runtime.Poller[PacketCapturesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PacketCapturesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PacketCapturesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified packet capture session. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PacketCapturesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PacketCapturesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if packetCaptureName == "" { - return nil, errors.New("parameter packetCaptureName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{packetCaptureName}", url.PathEscape(packetCaptureName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a packet capture session by name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// packetCaptureName - The name of the packet capture session. -// options - PacketCapturesClientGetOptions contains the optional parameters for the PacketCapturesClient.Get method. -func (client *PacketCapturesClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientGetOptions) (PacketCapturesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) - if err != nil { - return PacketCapturesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PacketCapturesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PacketCapturesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PacketCapturesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if packetCaptureName == "" { - return nil, errors.New("parameter packetCaptureName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{packetCaptureName}", url.PathEscape(packetCaptureName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PacketCapturesClient) getHandleResponse(resp *http.Response) (PacketCapturesClientGetResponse, error) { - result := PacketCapturesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PacketCaptureResult); err != nil { - return PacketCapturesClientGetResponse{}, err - } - return result, nil -} - -// BeginGetStatus - Query the status of a running packet capture session. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the Network Watcher resource. -// packetCaptureName - The name given to the packet capture session. -// options - PacketCapturesClientBeginGetStatusOptions contains the optional parameters for the PacketCapturesClient.BeginGetStatus -// method. -func (client *PacketCapturesClient) BeginGetStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginGetStatusOptions) (*runtime.Poller[PacketCapturesClientGetStatusResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getStatus(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PacketCapturesClientGetStatusResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PacketCapturesClientGetStatusResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetStatus - Query the status of a running packet capture session. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PacketCapturesClient) getStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginGetStatusOptions) (*http.Response, error) { - req, err := client.getStatusCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getStatusCreateRequest creates the GetStatus request. -func (client *PacketCapturesClient) getStatusCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginGetStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if packetCaptureName == "" { - return nil, errors.New("parameter packetCaptureName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{packetCaptureName}", url.PathEscape(packetCaptureName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// NewListPager - Lists all packet capture sessions within the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the Network Watcher resource. -// options - PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.List method. -func (client *PacketCapturesClient) NewListPager(resourceGroupName string, networkWatcherName string, options *PacketCapturesClientListOptions) *runtime.Pager[PacketCapturesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PacketCapturesClientListResponse]{ - More: func(page PacketCapturesClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *PacketCapturesClientListResponse) (PacketCapturesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) - if err != nil { - return PacketCapturesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PacketCapturesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PacketCapturesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PacketCapturesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, options *PacketCapturesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PacketCapturesClient) listHandleResponse(resp *http.Response) (PacketCapturesClientListResponse, error) { - result := PacketCapturesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PacketCaptureListResult); err != nil { - return PacketCapturesClientListResponse{}, err - } - return result, nil -} - -// BeginStop - Stops a specified packet capture session. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// packetCaptureName - The name of the packet capture session. -// options - PacketCapturesClientBeginStopOptions contains the optional parameters for the PacketCapturesClient.BeginStop -// method. -func (client *PacketCapturesClient) BeginStop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (*runtime.Poller[PacketCapturesClientStopResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stop(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PacketCapturesClientStopResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PacketCapturesClientStopResponse](options.ResumeToken, client.pl, nil) - } -} - -// Stop - Stops a specified packet capture session. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PacketCapturesClient) stop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (*http.Response, error) { - req, err := client.stopCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopCreateRequest creates the Stop request. -func (client *PacketCapturesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if packetCaptureName == "" { - return nil, errors.New("parameter packetCaptureName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{packetCaptureName}", url.PathEscape(packetCaptureName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/peerexpressroutecircuitconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/peerexpressroutecircuitconnections_client.go deleted file mode 100644 index cfa4b305..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/peerexpressroutecircuitconnections_client.go +++ /dev/null @@ -1,199 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PeerExpressRouteCircuitConnectionsClient contains the methods for the PeerExpressRouteCircuitConnections group. -// Don't use this type directly, use NewPeerExpressRouteCircuitConnectionsClient() instead. -type PeerExpressRouteCircuitConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPeerExpressRouteCircuitConnectionsClient creates a new instance of PeerExpressRouteCircuitConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PeerExpressRouteCircuitConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PeerExpressRouteCircuitConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// connectionName - The name of the peer express route circuit connection. -// options - PeerExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.Get -// method. -func (client *PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *PeerExpressRouteCircuitConnectionsClientGetOptions) (PeerExpressRouteCircuitConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) - if err != nil { - return PeerExpressRouteCircuitConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PeerExpressRouteCircuitConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PeerExpressRouteCircuitConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PeerExpressRouteCircuitConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *PeerExpressRouteCircuitConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PeerExpressRouteCircuitConnectionsClient) getHandleResponse(resp *http.Response) (PeerExpressRouteCircuitConnectionsClientGetResponse, error) { - result := PeerExpressRouteCircuitConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PeerExpressRouteCircuitConnection); err != nil { - return PeerExpressRouteCircuitConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all global reach peer connections associated with a private peering in an express route circuit. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the circuit. -// peeringName - The name of the peering. -// options - PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.List -// method. -func (client *PeerExpressRouteCircuitConnectionsClient) NewListPager(resourceGroupName string, circuitName string, peeringName string, options *PeerExpressRouteCircuitConnectionsClientListOptions) *runtime.Pager[PeerExpressRouteCircuitConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PeerExpressRouteCircuitConnectionsClientListResponse]{ - More: func(page PeerExpressRouteCircuitConnectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PeerExpressRouteCircuitConnectionsClientListResponse) (PeerExpressRouteCircuitConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PeerExpressRouteCircuitConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PeerExpressRouteCircuitConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PeerExpressRouteCircuitConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PeerExpressRouteCircuitConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *PeerExpressRouteCircuitConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if circuitName == "" { - return nil, errors.New("parameter circuitName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PeerExpressRouteCircuitConnectionsClient) listHandleResponse(resp *http.Response) (PeerExpressRouteCircuitConnectionsClientListResponse, error) { - result := PeerExpressRouteCircuitConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PeerExpressRouteCircuitConnectionListResult); err != nil { - return PeerExpressRouteCircuitConnectionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/polymorphic_helpers.go deleted file mode 100644 index b109bf52..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/polymorphic_helpers.go +++ /dev/null @@ -1,209 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import "encoding/json" - -func unmarshalActiveBaseSecurityAdminRuleClassification(rawMsg json.RawMessage) (ActiveBaseSecurityAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ActiveBaseSecurityAdminRuleClassification - switch m["kind"] { - case string(EffectiveAdminRuleKindCustom): - b = &ActiveSecurityAdminRule{} - case string(EffectiveAdminRuleKindDefault): - b = &ActiveDefaultSecurityAdminRule{} - default: - b = &ActiveBaseSecurityAdminRule{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalActiveBaseSecurityAdminRuleClassificationArray(rawMsg json.RawMessage) ([]ActiveBaseSecurityAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]ActiveBaseSecurityAdminRuleClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalActiveBaseSecurityAdminRuleClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalBaseAdminRuleClassification(rawMsg json.RawMessage) (BaseAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b BaseAdminRuleClassification - switch m["kind"] { - case string(AdminRuleKindCustom): - b = &AdminRule{} - case string(AdminRuleKindDefault): - b = &DefaultAdminRule{} - default: - b = &BaseAdminRule{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalBaseAdminRuleClassificationArray(rawMsg json.RawMessage) ([]BaseAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]BaseAdminRuleClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalBaseAdminRuleClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalEffectiveBaseSecurityAdminRuleClassification(rawMsg json.RawMessage) (EffectiveBaseSecurityAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b EffectiveBaseSecurityAdminRuleClassification - switch m["kind"] { - case string(EffectiveAdminRuleKindCustom): - b = &EffectiveSecurityAdminRule{} - case string(EffectiveAdminRuleKindDefault): - b = &EffectiveDefaultSecurityAdminRule{} - default: - b = &EffectiveBaseSecurityAdminRule{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalEffectiveBaseSecurityAdminRuleClassificationArray(rawMsg json.RawMessage) ([]EffectiveBaseSecurityAdminRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]EffectiveBaseSecurityAdminRuleClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalEffectiveBaseSecurityAdminRuleClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalFirewallPolicyRuleClassification(rawMsg json.RawMessage) (FirewallPolicyRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b FirewallPolicyRuleClassification - switch m["ruleType"] { - case string(FirewallPolicyRuleTypeApplicationRule): - b = &ApplicationRule{} - case string(FirewallPolicyRuleTypeNatRule): - b = &NatRule{} - case string(FirewallPolicyRuleTypeNetworkRule): - b = &Rule{} - default: - b = &FirewallPolicyRule{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalFirewallPolicyRuleClassificationArray(rawMsg json.RawMessage) ([]FirewallPolicyRuleClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]FirewallPolicyRuleClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalFirewallPolicyRuleClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalFirewallPolicyRuleCollectionClassification(rawMsg json.RawMessage) (FirewallPolicyRuleCollectionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b FirewallPolicyRuleCollectionClassification - switch m["ruleCollectionType"] { - case string(FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection): - b = &FirewallPolicyFilterRuleCollection{} - case string(FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection): - b = &FirewallPolicyNatRuleCollection{} - default: - b = &FirewallPolicyRuleCollection{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalFirewallPolicyRuleCollectionClassificationArray(rawMsg json.RawMessage) ([]FirewallPolicyRuleCollectionClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]FirewallPolicyRuleCollectionClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalFirewallPolicyRuleCollectionClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/privatednszonegroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/privatednszonegroups_client.go deleted file mode 100644 index 18973d2e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/privatednszonegroups_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateDNSZoneGroupsClient contains the methods for the PrivateDNSZoneGroups group. -// Don't use this type directly, use NewPrivateDNSZoneGroupsClient() instead. -type PrivateDNSZoneGroupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPrivateDNSZoneGroupsClient creates a new instance of PrivateDNSZoneGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPrivateDNSZoneGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateDNSZoneGroupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PrivateDNSZoneGroupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a private dns zone group in the specified private endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// privateDNSZoneGroupName - The name of the private dns zone group. -// parameters - Parameters supplied to the create or update private dns zone group operation. -// options - PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginCreateOrUpdate -// method. -func (client *PrivateDNSZoneGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup, options *PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateDNSZoneGroupsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PrivateDNSZoneGroupsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[PrivateDNSZoneGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a private dns zone group in the specified private endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PrivateDNSZoneGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup, options *PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PrivateDNSZoneGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup, options *PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if privateEndpointName == "" { - return nil, errors.New("parameter privateEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) - if privateDNSZoneGroupName == "" { - return nil, errors.New("parameter privateDNSZoneGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateDnsZoneGroupName}", url.PathEscape(privateDNSZoneGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified private dns zone group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// privateDNSZoneGroupName - The name of the private dns zone group. -// options - PrivateDNSZoneGroupsClientBeginDeleteOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginDelete -// method. -func (client *PrivateDNSZoneGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientBeginDeleteOptions) (*runtime.Poller[PrivateDNSZoneGroupsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PrivateDNSZoneGroupsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PrivateDNSZoneGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified private dns zone group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PrivateDNSZoneGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PrivateDNSZoneGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if privateEndpointName == "" { - return nil, errors.New("parameter privateEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) - if privateDNSZoneGroupName == "" { - return nil, errors.New("parameter privateDNSZoneGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateDnsZoneGroupName}", url.PathEscape(privateDNSZoneGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the private dns zone group resource by specified private dns zone group name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// privateDNSZoneGroupName - The name of the private dns zone group. -// options - PrivateDNSZoneGroupsClientGetOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.Get -// method. -func (client *PrivateDNSZoneGroupsClient) Get(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientGetOptions) (PrivateDNSZoneGroupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) - if err != nil { - return PrivateDNSZoneGroupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateDNSZoneGroupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateDNSZoneGroupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateDNSZoneGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if privateEndpointName == "" { - return nil, errors.New("parameter privateEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) - if privateDNSZoneGroupName == "" { - return nil, errors.New("parameter privateDNSZoneGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateDnsZoneGroupName}", url.PathEscape(privateDNSZoneGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateDNSZoneGroupsClient) getHandleResponse(resp *http.Response) (PrivateDNSZoneGroupsClientGetResponse, error) { - result := PrivateDNSZoneGroupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateDNSZoneGroup); err != nil { - return PrivateDNSZoneGroupsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all private dns zone groups in a private endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// privateEndpointName - The name of the private endpoint. -// resourceGroupName - The name of the resource group. -// options - PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.List -// method. -func (client *PrivateDNSZoneGroupsClient) NewListPager(privateEndpointName string, resourceGroupName string, options *PrivateDNSZoneGroupsClientListOptions) *runtime.Pager[PrivateDNSZoneGroupsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateDNSZoneGroupsClientListResponse]{ - More: func(page PrivateDNSZoneGroupsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateDNSZoneGroupsClientListResponse) (PrivateDNSZoneGroupsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, privateEndpointName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateDNSZoneGroupsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateDNSZoneGroupsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateDNSZoneGroupsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PrivateDNSZoneGroupsClient) listCreateRequest(ctx context.Context, privateEndpointName string, resourceGroupName string, options *PrivateDNSZoneGroupsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups" - if privateEndpointName == "" { - return nil, errors.New("parameter privateEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PrivateDNSZoneGroupsClient) listHandleResponse(resp *http.Response) (PrivateDNSZoneGroupsClientListResponse, error) { - result := PrivateDNSZoneGroupsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateDNSZoneGroupListResult); err != nil { - return PrivateDNSZoneGroupsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/privateendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/privateendpoints_client.go deleted file mode 100644 index 11cdb9bf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/privateendpoints_client.go +++ /dev/null @@ -1,371 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateEndpointsClient contains the methods for the PrivateEndpoints group. -// Don't use this type directly, use NewPrivateEndpointsClient() instead. -type PrivateEndpointsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPrivateEndpointsClient creates a new instance of PrivateEndpointsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PrivateEndpointsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates an private endpoint in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// parameters - Parameters supplied to the create or update private endpoint operation. -// options - PrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.BeginCreateOrUpdate -// method. -func (client *PrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint, options *PrivateEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, privateEndpointName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PrivateEndpointsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates an private endpoint in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PrivateEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint, options *PrivateEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, privateEndpointName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PrivateEndpointsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint, options *PrivateEndpointsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if privateEndpointName == "" { - return nil, errors.New("parameter privateEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified private endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// options - PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete -// method. -func (client *PrivateEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, privateEndpointName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PrivateEndpointsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified private endpoint. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PrivateEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, privateEndpointName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PrivateEndpointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if privateEndpointName == "" { - return nil, errors.New("parameter privateEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified private endpoint by resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// options - PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. -func (client *PrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientGetOptions) (PrivateEndpointsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, privateEndpointName, options) - if err != nil { - return PrivateEndpointsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateEndpointsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateEndpointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if privateEndpointName == "" { - return nil, errors.New("parameter privateEndpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateEndpointsClient) getHandleResponse(resp *http.Response) (PrivateEndpointsClientGetResponse, error) { - result := PrivateEndpointsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpoint); err != nil { - return PrivateEndpointsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all private endpoints in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.List method. -func (client *PrivateEndpointsClient) NewListPager(resourceGroupName string, options *PrivateEndpointsClientListOptions) *runtime.Pager[PrivateEndpointsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateEndpointsClientListResponse]{ - More: func(page PrivateEndpointsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateEndpointsClientListResponse) (PrivateEndpointsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateEndpointsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateEndpointsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PrivateEndpointsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *PrivateEndpointsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PrivateEndpointsClient) listHandleResponse(resp *http.Response) (PrivateEndpointsClientListResponse, error) { - result := PrivateEndpointsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointListResult); err != nil { - return PrivateEndpointsClientListResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Gets all private endpoints in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.ListBySubscription -// method. -func (client *PrivateEndpointsClient) NewListBySubscriptionPager(options *PrivateEndpointsClientListBySubscriptionOptions) *runtime.Pager[PrivateEndpointsClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateEndpointsClientListBySubscriptionResponse]{ - More: func(page PrivateEndpointsClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateEndpointsClientListBySubscriptionResponse) (PrivateEndpointsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateEndpointsClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateEndpointsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *PrivateEndpointsClient) listBySubscriptionCreateRequest(ctx context.Context, options *PrivateEndpointsClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *PrivateEndpointsClient) listBySubscriptionHandleResponse(resp *http.Response) (PrivateEndpointsClientListBySubscriptionResponse, error) { - result := PrivateEndpointsClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointListResult); err != nil { - return PrivateEndpointsClientListBySubscriptionResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/privatelinkservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/privatelinkservices_client.go deleted file mode 100644 index 8def9ee2..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/privatelinkservices_client.go +++ /dev/null @@ -1,907 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateLinkServicesClient contains the methods for the PrivateLinkServices group. -// Don't use this type directly, use NewPrivateLinkServicesClient() instead. -type PrivateLinkServicesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPrivateLinkServicesClient creates a new instance of PrivateLinkServicesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPrivateLinkServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkServicesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PrivateLinkServicesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCheckPrivateLinkServiceVisibility - Checks whether the subscription is visible to private link service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location of the domain name. -// parameters - The request body of CheckPrivateLinkService API call. -// options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the -// PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility method. -func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions) (*runtime.Poller[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.checkPrivateLinkServiceVisibility(ctx, location, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse](options.ResumeToken, client.pl, nil) - } -} - -// CheckPrivateLinkServiceVisibility - Checks whether the subscription is visible to private link service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions) (*http.Response, error) { - req, err := client.checkPrivateLinkServiceVisibilityCreateRequest(ctx, location, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// checkPrivateLinkServiceVisibilityCreateRequest creates the CheckPrivateLinkServiceVisibility request. -func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityCreateRequest(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginCheckPrivateLinkServiceVisibilityByResourceGroup - Checks whether the subscription is visible to private link service -// in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location of the domain name. -// resourceGroupName - The name of the resource group. -// parameters - The request body of CheckPrivateLinkService API call. -// options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions contains the optional parameters -// for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup method. -func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions) (*runtime.Poller[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.checkPrivateLinkServiceVisibilityByResourceGroup(ctx, location, resourceGroupName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse](options.ResumeToken, client.pl, nil) - } -} - -// CheckPrivateLinkServiceVisibilityByResourceGroup - Checks whether the subscription is visible to private link service in -// the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions) (*http.Response, error) { - req, err := client.checkPrivateLinkServiceVisibilityByResourceGroupCreateRequest(ctx, location, resourceGroupName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// checkPrivateLinkServiceVisibilityByResourceGroupCreateRequest creates the CheckPrivateLinkServiceVisibilityByResourceGroup request. -func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityByResourceGroupCreateRequest(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginCreateOrUpdate - Creates or updates an private link service in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// parameters - Parameters supplied to the create or update private link service operation. -// options - PrivateLinkServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCreateOrUpdate -// method. -func (client *PrivateLinkServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService, options *PrivateLinkServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateLinkServicesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PrivateLinkServicesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[PrivateLinkServicesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates an private link service in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PrivateLinkServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService, options *PrivateLinkServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PrivateLinkServicesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService, options *PrivateLinkServicesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified private link service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// options - PrivateLinkServicesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDelete -// method. -func (client *PrivateLinkServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientBeginDeleteOptions) (*runtime.Poller[PrivateLinkServicesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PrivateLinkServicesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PrivateLinkServicesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified private link service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PrivateLinkServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PrivateLinkServicesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDeletePrivateEndpointConnection - Delete private end point connection for a private link service in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// peConnectionName - The name of the private end point connection. -// options - PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the -// PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection method. -func (client *PrivateLinkServicesClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) (*runtime.Poller[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, serviceName, peConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// DeletePrivateEndpointConnection - Delete private end point connection for a private link service in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PrivateLinkServicesClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { - req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, serviceName, peConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. -func (client *PrivateLinkServicesClient) deletePrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if peConnectionName == "" { - return nil, errors.New("parameter peConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peConnectionName}", url.PathEscape(peConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified private link service by resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// options - PrivateLinkServicesClientGetOptions contains the optional parameters for the PrivateLinkServicesClient.Get method. -func (client *PrivateLinkServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientGetOptions) (PrivateLinkServicesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) - if err != nil { - return PrivateLinkServicesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkServicesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateLinkServicesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateLinkServicesClient) getHandleResponse(resp *http.Response) (PrivateLinkServicesClientGetResponse, error) { - result := PrivateLinkServicesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkService); err != nil { - return PrivateLinkServicesClientGetResponse{}, err - } - return result, nil -} - -// GetPrivateEndpointConnection - Get the specific private end point connection by specific private link service in the resource -// group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// peConnectionName - The name of the private end point connection. -// options - PrivateLinkServicesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.GetPrivateEndpointConnection -// method. -func (client *PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientGetPrivateEndpointConnectionOptions) (PrivateLinkServicesClientGetPrivateEndpointConnectionResponse, error) { - req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, serviceName, peConnectionName, options) - if err != nil { - return PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.getPrivateEndpointConnectionHandleResponse(resp) -} - -// getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. -func (client *PrivateLinkServicesClient) getPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientGetPrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if peConnectionName == "" { - return nil, errors.New("parameter peConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peConnectionName}", url.PathEscape(peConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getPrivateEndpointConnectionHandleResponse handles the GetPrivateEndpointConnection response. -func (client *PrivateLinkServicesClient) getPrivateEndpointConnectionHandleResponse(resp *http.Response) (PrivateLinkServicesClientGetPrivateEndpointConnectionResponse, error) { - result := PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { - return PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all private link services in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.List -// method. -func (client *PrivateLinkServicesClient) NewListPager(resourceGroupName string, options *PrivateLinkServicesClientListOptions) *runtime.Pager[PrivateLinkServicesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListResponse]{ - More: func(page PrivateLinkServicesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListResponse) (PrivateLinkServicesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkServicesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkServicesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PrivateLinkServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *PrivateLinkServicesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PrivateLinkServicesClient) listHandleResponse(resp *http.Response) (PrivateLinkServicesClientListResponse, error) { - result := PrivateLinkServicesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkServiceListResult); err != nil { - return PrivateLinkServicesClientListResponse{}, err - } - return result, nil -} - -// NewListAutoApprovedPrivateLinkServicesPager - Returns all of the private link service ids that can be linked to a Private -// Endpoint with auto approved in this subscription in this region. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location of the domain name. -// options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the -// PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices method. -func (client *PrivateLinkServicesClient) NewListAutoApprovedPrivateLinkServicesPager(location string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions) *runtime.Pager[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse]{ - More: func(page PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAutoApprovedPrivateLinkServicesCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, runtime.NewResponseError(resp) - } - return client.listAutoApprovedPrivateLinkServicesHandleResponse(resp) - }, - }) -} - -// listAutoApprovedPrivateLinkServicesCreateRequest creates the ListAutoApprovedPrivateLinkServices request. -func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesCreateRequest(ctx context.Context, location string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAutoApprovedPrivateLinkServicesHandleResponse handles the ListAutoApprovedPrivateLinkServices response. -func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesHandleResponse(resp *http.Response) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse, error) { - result := PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AutoApprovedPrivateLinkServicesResult); err != nil { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, err - } - return result, nil -} - -// NewListAutoApprovedPrivateLinkServicesByResourceGroupPager - Returns all of the private link service ids that can be linked -// to a Private Endpoint with auto approved in this subscription in this region. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location of the domain name. -// resourceGroupName - The name of the resource group. -// options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters -// for the PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup method. -func (client *PrivateLinkServicesClient) NewListAutoApprovedPrivateLinkServicesByResourceGroupPager(location string, resourceGroupName string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions) *runtime.Pager[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse]{ - More: func(page PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse(resp) - }, - }) -} - -// listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest creates the ListAutoApprovedPrivateLinkServicesByResourceGroup request. -func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest(ctx context.Context, location string, resourceGroupName string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse handles the ListAutoApprovedPrivateLinkServicesByResourceGroup response. -func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse(resp *http.Response) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse, error) { - result := PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AutoApprovedPrivateLinkServicesResult); err != nil { - return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Gets all private link service in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.ListBySubscription -// method. -func (client *PrivateLinkServicesClient) NewListBySubscriptionPager(options *PrivateLinkServicesClientListBySubscriptionOptions) *runtime.Pager[PrivateLinkServicesClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListBySubscriptionResponse]{ - More: func(page PrivateLinkServicesClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListBySubscriptionResponse) (PrivateLinkServicesClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkServicesClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkServicesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *PrivateLinkServicesClient) listBySubscriptionCreateRequest(ctx context.Context, options *PrivateLinkServicesClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *PrivateLinkServicesClient) listBySubscriptionHandleResponse(resp *http.Response) (PrivateLinkServicesClientListBySubscriptionResponse, error) { - result := PrivateLinkServicesClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkServiceListResult); err != nil { - return PrivateLinkServicesClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// NewListPrivateEndpointConnectionsPager - Gets all private end point connections for a specific private link service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// options - PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.ListPrivateEndpointConnections -// method. -func (client *PrivateLinkServicesClient) NewListPrivateEndpointConnectionsPager(resourceGroupName string, serviceName string, options *PrivateLinkServicesClientListPrivateEndpointConnectionsOptions) *runtime.Pager[PrivateLinkServicesClientListPrivateEndpointConnectionsResponse] { - return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListPrivateEndpointConnectionsResponse]{ - More: func(page PrivateLinkServicesClientListPrivateEndpointConnectionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListPrivateEndpointConnectionsResponse) (PrivateLinkServicesClientListPrivateEndpointConnectionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPrivateEndpointConnectionsCreateRequest(ctx, resourceGroupName, serviceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, runtime.NewResponseError(resp) - } - return client.listPrivateEndpointConnectionsHandleResponse(resp) - }, - }) -} - -// listPrivateEndpointConnectionsCreateRequest creates the ListPrivateEndpointConnections request. -func (client *PrivateLinkServicesClient) listPrivateEndpointConnectionsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientListPrivateEndpointConnectionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listPrivateEndpointConnectionsHandleResponse handles the ListPrivateEndpointConnections response. -func (client *PrivateLinkServicesClient) listPrivateEndpointConnectionsHandleResponse(resp *http.Response) (PrivateLinkServicesClientListPrivateEndpointConnectionsResponse, error) { - result := PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResult); err != nil { - return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, err - } - return result, nil -} - -// UpdatePrivateEndpointConnection - Approve or reject private end point connection for a private link service in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// peConnectionName - The name of the private end point connection. -// parameters - Parameters supplied to approve or reject the private end point connection. -// options - PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.UpdatePrivateEndpointConnection -// method. -func (client *PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection, options *PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions) (PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse, error) { - req, err := client.updatePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, serviceName, peConnectionName, parameters, options) - if err != nil { - return PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.updatePrivateEndpointConnectionHandleResponse(resp) -} - -// updatePrivateEndpointConnectionCreateRequest creates the UpdatePrivateEndpointConnection request. -func (client *PrivateLinkServicesClient) updatePrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection, options *PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceName == "" { - return nil, errors.New("parameter serviceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) - if peConnectionName == "" { - return nil, errors.New("parameter peConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peConnectionName}", url.PathEscape(peConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updatePrivateEndpointConnectionHandleResponse handles the UpdatePrivateEndpointConnection response. -func (client *PrivateLinkServicesClient) updatePrivateEndpointConnectionHandleResponse(resp *http.Response) (PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse, error) { - result := PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { - return PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/profiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/profiles_client.go deleted file mode 100644 index d15852f6..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/profiles_client.go +++ /dev/null @@ -1,417 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProfilesClient contains the methods for the NetworkProfiles group. -// Don't use this type directly, use NewProfilesClient() instead. -type ProfilesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProfilesClient creates a new instance of ProfilesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProfilesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProfilesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a network profile. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkProfileName - The name of the network profile. -// parameters - Parameters supplied to the create or update network profile operation. -// options - ProfilesClientCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.CreateOrUpdate method. -func (client *ProfilesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile, options *ProfilesClientCreateOrUpdateOptions) (ProfilesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkProfileName, parameters, options) - if err != nil { - return ProfilesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProfilesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ProfilesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ProfilesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile, options *ProfilesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkProfileName == "" { - return nil, errors.New("parameter networkProfileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkProfileName}", url.PathEscape(networkProfileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ProfilesClient) createOrUpdateHandleResponse(resp *http.Response) (ProfilesClientCreateOrUpdateResponse, error) { - result := ProfilesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { - return ProfilesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes the specified network profile. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkProfileName - The name of the NetworkProfile. -// options - ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. -func (client *ProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientBeginDeleteOptions) (*runtime.Poller[ProfilesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkProfileName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ProfilesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ProfilesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified network profile. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ProfilesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkProfileName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ProfilesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkProfileName == "" { - return nil, errors.New("parameter networkProfileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkProfileName}", url.PathEscape(networkProfileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified network profile in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkProfileName - The name of the public IP prefix. -// options - ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. -func (client *ProfilesClient) Get(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientGetOptions) (ProfilesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkProfileName, options) - if err != nil { - return ProfilesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProfilesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProfilesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkProfileName == "" { - return nil, errors.New("parameter networkProfileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkProfileName}", url.PathEscape(networkProfileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProfilesClient) getHandleResponse(resp *http.Response) (ProfilesClientGetResponse, error) { - result := ProfilesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { - return ProfilesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all network profiles in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - ProfilesClientListOptions contains the optional parameters for the ProfilesClient.List method. -func (client *ProfilesClient) NewListPager(resourceGroupName string, options *ProfilesClientListOptions) *runtime.Pager[ProfilesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ProfilesClientListResponse]{ - More: func(page ProfilesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProfilesClientListResponse) (ProfilesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProfilesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProfilesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ProfilesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ProfilesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ProfilesClient) listHandleResponse(resp *http.Response) (ProfilesClientListResponse, error) { - result := ProfilesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProfileListResult); err != nil { - return ProfilesClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the network profiles in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.ListAll method. -func (client *ProfilesClient) NewListAllPager(options *ProfilesClientListAllOptions) *runtime.Pager[ProfilesClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[ProfilesClientListAllResponse]{ - More: func(page ProfilesClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProfilesClientListAllResponse) (ProfilesClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProfilesClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProfilesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *ProfilesClient) listAllCreateRequest(ctx context.Context, options *ProfilesClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *ProfilesClient) listAllHandleResponse(resp *http.Response) (ProfilesClientListAllResponse, error) { - result := ProfilesClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProfileListResult); err != nil { - return ProfilesClientListAllResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates network profile tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkProfileName - The name of the network profile. -// parameters - Parameters supplied to update network profile tags. -// options - ProfilesClientUpdateTagsOptions contains the optional parameters for the ProfilesClient.UpdateTags method. -func (client *ProfilesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject, options *ProfilesClientUpdateTagsOptions) (ProfilesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkProfileName, parameters, options) - if err != nil { - return ProfilesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProfilesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProfilesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *ProfilesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject, options *ProfilesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkProfileName == "" { - return nil, errors.New("parameter networkProfileName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkProfileName}", url.PathEscape(networkProfileName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *ProfilesClient) updateTagsHandleResponse(resp *http.Response) (ProfilesClientUpdateTagsResponse, error) { - result := ProfilesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { - return ProfilesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/publicipaddresses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/publicipaddresses_client.go deleted file mode 100644 index d8b9246c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/publicipaddresses_client.go +++ /dev/null @@ -1,902 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PublicIPAddressesClient contains the methods for the PublicIPAddresses group. -// Don't use this type directly, use NewPublicIPAddressesClient() instead. -type PublicIPAddressesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPublicIPAddressesClient creates a new instance of PublicIPAddressesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPublicIPAddressesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PublicIPAddressesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PublicIPAddressesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a static or dynamic public IP address. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// publicIPAddressName - The name of the public IP address. -// parameters - Parameters supplied to the create or update public IP address operation. -// options - PublicIPAddressesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPAddressesClient.BeginCreateOrUpdate -// method. -func (client *PublicIPAddressesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, options *PublicIPAddressesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PublicIPAddressesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PublicIPAddressesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[PublicIPAddressesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a static or dynamic public IP address. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PublicIPAddressesClient) createOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, options *PublicIPAddressesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, publicIPAddressName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PublicIPAddressesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, options *PublicIPAddressesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if publicIPAddressName == "" { - return nil, errors.New("parameter publicIPAddressName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified public IP address. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// publicIPAddressName - The name of the public IP address. -// options - PublicIPAddressesClientBeginDeleteOptions contains the optional parameters for the PublicIPAddressesClient.BeginDelete -// method. -func (client *PublicIPAddressesClient) BeginDelete(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDeleteOptions) (*runtime.Poller[PublicIPAddressesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, publicIPAddressName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PublicIPAddressesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PublicIPAddressesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified public IP address. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PublicIPAddressesClient) deleteOperation(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, publicIPAddressName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PublicIPAddressesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if publicIPAddressName == "" { - return nil, errors.New("parameter publicIPAddressName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified public IP address in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// publicIPAddressName - The name of the public IP address. -// options - PublicIPAddressesClientGetOptions contains the optional parameters for the PublicIPAddressesClient.Get method. -func (client *PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientGetOptions) (PublicIPAddressesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, publicIPAddressName, options) - if err != nil { - return PublicIPAddressesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPAddressesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PublicIPAddressesClient) getCreateRequest(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if publicIPAddressName == "" { - return nil, errors.New("parameter publicIPAddressName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PublicIPAddressesClient) getHandleResponse(resp *http.Response) (PublicIPAddressesClientGetResponse, error) { - result := PublicIPAddressesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { - return PublicIPAddressesClientGetResponse{}, err - } - return result, nil -} - -// GetCloudServicePublicIPAddress - Get the specified public IP address in a cloud service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// roleInstanceName - The role instance name. -// networkInterfaceName - The name of the network interface. -// ipConfigurationName - The name of the IP configuration. -// publicIPAddressName - The name of the public IP Address. -// options - PublicIPAddressesClientGetCloudServicePublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetCloudServicePublicIPAddress -// method. -func (client *PublicIPAddressesClient) GetCloudServicePublicIPAddress(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, publicIPAddressName string, options *PublicIPAddressesClientGetCloudServicePublicIPAddressOptions) (PublicIPAddressesClientGetCloudServicePublicIPAddressResponse, error) { - req, err := client.getCloudServicePublicIPAddressCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, ipConfigurationName, publicIPAddressName, options) - if err != nil { - return PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{}, runtime.NewResponseError(resp) - } - return client.getCloudServicePublicIPAddressHandleResponse(resp) -} - -// getCloudServicePublicIPAddressCreateRequest creates the GetCloudServicePublicIPAddress request. -func (client *PublicIPAddressesClient) getCloudServicePublicIPAddressCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, publicIPAddressName string, options *PublicIPAddressesClientGetCloudServicePublicIPAddressOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if cloudServiceName == "" { - return nil, errors.New("parameter cloudServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) - if roleInstanceName == "" { - return nil, errors.New("parameter roleInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if ipConfigurationName == "" { - return nil, errors.New("parameter ipConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) - if publicIPAddressName == "" { - return nil, errors.New("parameter publicIPAddressName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getCloudServicePublicIPAddressHandleResponse handles the GetCloudServicePublicIPAddress response. -func (client *PublicIPAddressesClient) getCloudServicePublicIPAddressHandleResponse(resp *http.Response) (PublicIPAddressesClientGetCloudServicePublicIPAddressResponse, error) { - result := PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { - return PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{}, err - } - return result, nil -} - -// GetVirtualMachineScaleSetPublicIPAddress - Get the specified public IP address in a virtual machine scale set. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// networkInterfaceName - The name of the network interface. -// ipConfigurationName - The name of the IP configuration. -// publicIPAddressName - The name of the public IP Address. -// options - PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions contains the optional parameters for the -// PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress method. -func (client *PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, publicIPAddressName string, options *PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions) (PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse, error) { - req, err := client.getVirtualMachineScaleSetPublicIPAddressCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIPAddressName, options) - if err != nil { - return PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{}, runtime.NewResponseError(resp) - } - return client.getVirtualMachineScaleSetPublicIPAddressHandleResponse(resp) -} - -// getVirtualMachineScaleSetPublicIPAddressCreateRequest creates the GetVirtualMachineScaleSetPublicIPAddress request. -func (client *PublicIPAddressesClient) getVirtualMachineScaleSetPublicIPAddressCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, publicIPAddressName string, options *PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualMachineScaleSetName == "" { - return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) - if virtualmachineIndex == "" { - return nil, errors.New("parameter virtualmachineIndex cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if ipConfigurationName == "" { - return nil, errors.New("parameter ipConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) - if publicIPAddressName == "" { - return nil, errors.New("parameter publicIPAddressName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-10-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getVirtualMachineScaleSetPublicIPAddressHandleResponse handles the GetVirtualMachineScaleSetPublicIPAddress response. -func (client *PublicIPAddressesClient) getVirtualMachineScaleSetPublicIPAddressHandleResponse(resp *http.Response) (PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse, error) { - result := PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { - return PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all public IP addresses in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.List method. -func (client *PublicIPAddressesClient) NewListPager(resourceGroupName string, options *PublicIPAddressesClientListOptions) *runtime.Pager[PublicIPAddressesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListResponse]{ - More: func(page PublicIPAddressesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListResponse) (PublicIPAddressesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPAddressesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPAddressesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PublicIPAddressesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *PublicIPAddressesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PublicIPAddressesClient) listHandleResponse(resp *http.Response) (PublicIPAddressesClientListResponse, error) { - result := PublicIPAddressesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { - return PublicIPAddressesClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the public IP addresses in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.ListAll -// method. -func (client *PublicIPAddressesClient) NewListAllPager(options *PublicIPAddressesClientListAllOptions) *runtime.Pager[PublicIPAddressesClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListAllResponse]{ - More: func(page PublicIPAddressesClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListAllResponse) (PublicIPAddressesClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPAddressesClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPAddressesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *PublicIPAddressesClient) listAllCreateRequest(ctx context.Context, options *PublicIPAddressesClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *PublicIPAddressesClient) listAllHandleResponse(resp *http.Response) (PublicIPAddressesClientListAllResponse, error) { - result := PublicIPAddressesClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { - return PublicIPAddressesClientListAllResponse{}, err - } - return result, nil -} - -// NewListCloudServicePublicIPAddressesPager - Gets information about all public IP addresses on a cloud service level. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// options - PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListCloudServicePublicIPAddresses -// method. -func (client *PublicIPAddressesClient) NewListCloudServicePublicIPAddressesPager(resourceGroupName string, cloudServiceName string, options *PublicIPAddressesClientListCloudServicePublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListCloudServicePublicIPAddressesResponse] { - return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListCloudServicePublicIPAddressesResponse]{ - More: func(page PublicIPAddressesClientListCloudServicePublicIPAddressesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListCloudServicePublicIPAddressesResponse) (PublicIPAddressesClientListCloudServicePublicIPAddressesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCloudServicePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, runtime.NewResponseError(resp) - } - return client.listCloudServicePublicIPAddressesHandleResponse(resp) - }, - }) -} - -// listCloudServicePublicIPAddressesCreateRequest creates the ListCloudServicePublicIPAddresses request. -func (client *PublicIPAddressesClient) listCloudServicePublicIPAddressesCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *PublicIPAddressesClientListCloudServicePublicIPAddressesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if cloudServiceName == "" { - return nil, errors.New("parameter cloudServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listCloudServicePublicIPAddressesHandleResponse handles the ListCloudServicePublicIPAddresses response. -func (client *PublicIPAddressesClient) listCloudServicePublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListCloudServicePublicIPAddressesResponse, error) { - result := PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { - return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, err - } - return result, nil -} - -// NewListCloudServiceRoleInstancePublicIPAddressesPager - Gets information about all public IP addresses in a role instance -// IP configuration in a cloud service. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// roleInstanceName - The name of role instance. -// networkInterfaceName - The network interface name. -// ipConfigurationName - The IP configuration name. -// options - PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters -// for the PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses method. -func (client *PublicIPAddressesClient) NewListCloudServiceRoleInstancePublicIPAddressesPager(resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse] { - return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse]{ - More: func(page PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse) (PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCloudServiceRoleInstancePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, ipConfigurationName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, runtime.NewResponseError(resp) - } - return client.listCloudServiceRoleInstancePublicIPAddressesHandleResponse(resp) - }, - }) -} - -// listCloudServiceRoleInstancePublicIPAddressesCreateRequest creates the ListCloudServiceRoleInstancePublicIPAddresses request. -func (client *PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddressesCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if cloudServiceName == "" { - return nil, errors.New("parameter cloudServiceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) - if roleInstanceName == "" { - return nil, errors.New("parameter roleInstanceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if ipConfigurationName == "" { - return nil, errors.New("parameter ipConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listCloudServiceRoleInstancePublicIPAddressesHandleResponse handles the ListCloudServiceRoleInstancePublicIPAddresses response. -func (client *PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse, error) { - result := PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { - return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, err - } - return result, nil -} - -// NewListVirtualMachineScaleSetPublicIPAddressesPager - Gets information about all public IP addresses on a virtual machine -// scale set level. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// options - PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for -// the PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses method. -func (client *PublicIPAddressesClient) NewListVirtualMachineScaleSetPublicIPAddressesPager(resourceGroupName string, virtualMachineScaleSetName string, options *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse] { - return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse]{ - More: func(page PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse) (PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listVirtualMachineScaleSetPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, runtime.NewResponseError(resp) - } - return client.listVirtualMachineScaleSetPublicIPAddressesHandleResponse(resp) - }, - }) -} - -// listVirtualMachineScaleSetPublicIPAddressesCreateRequest creates the ListVirtualMachineScaleSetPublicIPAddresses request. -func (client *PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddressesCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, options *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualMachineScaleSetName == "" { - return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listVirtualMachineScaleSetPublicIPAddressesHandleResponse handles the ListVirtualMachineScaleSetPublicIPAddresses response. -func (client *PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse, error) { - result := PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { - return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, err - } - return result, nil -} - -// NewListVirtualMachineScaleSetVMPublicIPAddressesPager - Gets information about all public IP addresses in a virtual machine -// IP configuration in a virtual machine scale set. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// networkInterfaceName - The network interface name. -// ipConfigurationName - The IP configuration name. -// options - PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters -// for the PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses method. -func (client *PublicIPAddressesClient) NewListVirtualMachineScaleSetVMPublicIPAddressesPager(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse] { - return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse]{ - More: func(page PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse) (PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, runtime.NewResponseError(resp) - } - return client.listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse(resp) - }, - }) -} - -// listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest creates the ListVirtualMachineScaleSetVMPublicIPAddresses request. -func (client *PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualMachineScaleSetName == "" { - return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) - if virtualmachineIndex == "" { - return nil, errors.New("parameter virtualmachineIndex cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) - if networkInterfaceName == "" { - return nil, errors.New("parameter networkInterfaceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) - if ipConfigurationName == "" { - return nil, errors.New("parameter ipConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse handles the ListVirtualMachineScaleSetVMPublicIPAddresses response. -func (client *PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse, error) { - result := PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { - return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates public IP address tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// publicIPAddressName - The name of the public IP address. -// parameters - Parameters supplied to update public IP address tags. -// options - PublicIPAddressesClientUpdateTagsOptions contains the optional parameters for the PublicIPAddressesClient.UpdateTags -// method. -func (client *PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject, options *PublicIPAddressesClientUpdateTagsOptions) (PublicIPAddressesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, publicIPAddressName, parameters, options) - if err != nil { - return PublicIPAddressesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPAddressesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPAddressesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *PublicIPAddressesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject, options *PublicIPAddressesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if publicIPAddressName == "" { - return nil, errors.New("parameter publicIPAddressName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *PublicIPAddressesClient) updateTagsHandleResponse(resp *http.Response) (PublicIPAddressesClientUpdateTagsResponse, error) { - result := PublicIPAddressesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { - return PublicIPAddressesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/publicipprefixes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/publicipprefixes_client.go deleted file mode 100644 index 7fde2c8b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/publicipprefixes_client.go +++ /dev/null @@ -1,429 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PublicIPPrefixesClient contains the methods for the PublicIPPrefixes group. -// Don't use this type directly, use NewPublicIPPrefixesClient() instead. -type PublicIPPrefixesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPublicIPPrefixesClient creates a new instance of PublicIPPrefixesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPublicIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PublicIPPrefixesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PublicIPPrefixesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a static or dynamic public IP prefix. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// publicIPPrefixName - The name of the public IP prefix. -// parameters - Parameters supplied to the create or update public IP prefix operation. -// options - PublicIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPPrefixesClient.BeginCreateOrUpdate -// method. -func (client *PublicIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix, options *PublicIPPrefixesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PublicIPPrefixesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, publicIPPrefixName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PublicIPPrefixesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PublicIPPrefixesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a static or dynamic public IP prefix. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PublicIPPrefixesClient) createOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix, options *PublicIPPrefixesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, publicIPPrefixName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *PublicIPPrefixesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix, options *PublicIPPrefixesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if publicIPPrefixName == "" { - return nil, errors.New("parameter publicIPPrefixName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicIpPrefixName}", url.PathEscape(publicIPPrefixName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified public IP prefix. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// publicIPPrefixName - The name of the PublicIpPrefix. -// options - PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete -// method. -func (client *PublicIPPrefixesClient) BeginDelete(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientBeginDeleteOptions) (*runtime.Poller[PublicIPPrefixesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, publicIPPrefixName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[PublicIPPrefixesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[PublicIPPrefixesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified public IP prefix. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *PublicIPPrefixesClient) deleteOperation(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, publicIPPrefixName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PublicIPPrefixesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if publicIPPrefixName == "" { - return nil, errors.New("parameter publicIPPrefixName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicIpPrefixName}", url.PathEscape(publicIPPrefixName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified public IP prefix in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// publicIPPrefixName - The name of the public IP prefix. -// options - PublicIPPrefixesClientGetOptions contains the optional parameters for the PublicIPPrefixesClient.Get method. -func (client *PublicIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientGetOptions) (PublicIPPrefixesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, publicIPPrefixName, options) - if err != nil { - return PublicIPPrefixesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPPrefixesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPPrefixesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PublicIPPrefixesClient) getCreateRequest(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if publicIPPrefixName == "" { - return nil, errors.New("parameter publicIPPrefixName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicIpPrefixName}", url.PathEscape(publicIPPrefixName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PublicIPPrefixesClient) getHandleResponse(resp *http.Response) (PublicIPPrefixesClientGetResponse, error) { - result := PublicIPPrefixesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefix); err != nil { - return PublicIPPrefixesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all public IP prefixes in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.List method. -func (client *PublicIPPrefixesClient) NewListPager(resourceGroupName string, options *PublicIPPrefixesClientListOptions) *runtime.Pager[PublicIPPrefixesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[PublicIPPrefixesClientListResponse]{ - More: func(page PublicIPPrefixesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PublicIPPrefixesClientListResponse) (PublicIPPrefixesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPPrefixesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPPrefixesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPPrefixesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *PublicIPPrefixesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *PublicIPPrefixesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *PublicIPPrefixesClient) listHandleResponse(resp *http.Response) (PublicIPPrefixesClientListResponse, error) { - result := PublicIPPrefixesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefixListResult); err != nil { - return PublicIPPrefixesClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the public IP prefixes in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.ListAll -// method. -func (client *PublicIPPrefixesClient) NewListAllPager(options *PublicIPPrefixesClientListAllOptions) *runtime.Pager[PublicIPPrefixesClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[PublicIPPrefixesClientListAllResponse]{ - More: func(page PublicIPPrefixesClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *PublicIPPrefixesClientListAllResponse) (PublicIPPrefixesClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PublicIPPrefixesClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPPrefixesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPPrefixesClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *PublicIPPrefixesClient) listAllCreateRequest(ctx context.Context, options *PublicIPPrefixesClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *PublicIPPrefixesClient) listAllHandleResponse(resp *http.Response) (PublicIPPrefixesClientListAllResponse, error) { - result := PublicIPPrefixesClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefixListResult); err != nil { - return PublicIPPrefixesClientListAllResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates public IP prefix tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// publicIPPrefixName - The name of the public IP prefix. -// parameters - Parameters supplied to update public IP prefix tags. -// options - PublicIPPrefixesClientUpdateTagsOptions contains the optional parameters for the PublicIPPrefixesClient.UpdateTags -// method. -func (client *PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject, options *PublicIPPrefixesClientUpdateTagsOptions) (PublicIPPrefixesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, publicIPPrefixName, parameters, options) - if err != nil { - return PublicIPPrefixesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PublicIPPrefixesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PublicIPPrefixesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *PublicIPPrefixesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject, options *PublicIPPrefixesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if publicIPPrefixName == "" { - return nil, errors.New("parameter publicIPPrefixName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{publicIpPrefixName}", url.PathEscape(publicIPPrefixName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *PublicIPPrefixesClient) updateTagsHandleResponse(resp *http.Response) (PublicIPPrefixesClientUpdateTagsResponse, error) { - result := PublicIPPrefixesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefix); err != nil { - return PublicIPPrefixesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/resourcenavigationlinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/resourcenavigationlinks_client.go deleted file mode 100644 index ab023b92..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/resourcenavigationlinks_client.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ResourceNavigationLinksClient contains the methods for the ResourceNavigationLinks group. -// Don't use this type directly, use NewResourceNavigationLinksClient() instead. -type ResourceNavigationLinksClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewResourceNavigationLinksClient creates a new instance of ResourceNavigationLinksClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewResourceNavigationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceNavigationLinksClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ResourceNavigationLinksClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// List - Gets a list of resource navigation links for a subnet. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// options - ResourceNavigationLinksClientListOptions contains the optional parameters for the ResourceNavigationLinksClient.List -// method. -func (client *ResourceNavigationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *ResourceNavigationLinksClientListOptions) (ResourceNavigationLinksClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) - if err != nil { - return ResourceNavigationLinksClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceNavigationLinksClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceNavigationLinksClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *ResourceNavigationLinksClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *ResourceNavigationLinksClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if subnetName == "" { - return nil, errors.New("parameter subnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ResourceNavigationLinksClient) listHandleResponse(resp *http.Response) (ResourceNavigationLinksClientListResponse, error) { - result := ResourceNavigationLinksClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceNavigationLinksListResult); err != nil { - return ResourceNavigationLinksClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/response_types.go deleted file mode 100644 index 5faa4e56..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/response_types.go +++ /dev/null @@ -1,3102 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import "encoding/json" - -// AdminRuleCollectionsClientCreateOrUpdateResponse contains the response from method AdminRuleCollectionsClient.CreateOrUpdate. -type AdminRuleCollectionsClientCreateOrUpdateResponse struct { - AdminRuleCollection -} - -// AdminRuleCollectionsClientDeleteResponse contains the response from method AdminRuleCollectionsClient.Delete. -type AdminRuleCollectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// AdminRuleCollectionsClientGetResponse contains the response from method AdminRuleCollectionsClient.Get. -type AdminRuleCollectionsClientGetResponse struct { - AdminRuleCollection -} - -// AdminRuleCollectionsClientListResponse contains the response from method AdminRuleCollectionsClient.List. -type AdminRuleCollectionsClientListResponse struct { - AdminRuleCollectionListResult -} - -// AdminRulesClientCreateOrUpdateResponse contains the response from method AdminRulesClient.CreateOrUpdate. -type AdminRulesClientCreateOrUpdateResponse struct { - BaseAdminRuleClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRulesClientCreateOrUpdateResponse. -func (a *AdminRulesClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalBaseAdminRuleClassification(data) - if err != nil { - return err - } - a.BaseAdminRuleClassification = res - return nil -} - -// AdminRulesClientDeleteResponse contains the response from method AdminRulesClient.Delete. -type AdminRulesClientDeleteResponse struct { - // placeholder for future response values -} - -// AdminRulesClientGetResponse contains the response from method AdminRulesClient.Get. -type AdminRulesClientGetResponse struct { - BaseAdminRuleClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRulesClientGetResponse. -func (a *AdminRulesClientGetResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalBaseAdminRuleClassification(data) - if err != nil { - return err - } - a.BaseAdminRuleClassification = res - return nil -} - -// AdminRulesClientListResponse contains the response from method AdminRulesClient.List. -type AdminRulesClientListResponse struct { - AdminRuleListResult -} - -// ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Delete. -type ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// ApplicationGatewayPrivateEndpointConnectionsClientGetResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Get. -type ApplicationGatewayPrivateEndpointConnectionsClientGetResponse struct { - ApplicationGatewayPrivateEndpointConnection -} - -// ApplicationGatewayPrivateEndpointConnectionsClientListResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.List. -type ApplicationGatewayPrivateEndpointConnectionsClientListResponse struct { - ApplicationGatewayPrivateEndpointConnectionListResult -} - -// ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Update. -type ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse struct { - ApplicationGatewayPrivateEndpointConnection -} - -// ApplicationGatewayPrivateLinkResourcesClientListResponse contains the response from method ApplicationGatewayPrivateLinkResourcesClient.List. -type ApplicationGatewayPrivateLinkResourcesClientListResponse struct { - ApplicationGatewayPrivateLinkResourceListResult -} - -// ApplicationGatewaysClientBackendHealthOnDemandResponse contains the response from method ApplicationGatewaysClient.BackendHealthOnDemand. -type ApplicationGatewaysClientBackendHealthOnDemandResponse struct { - ApplicationGatewayBackendHealthOnDemand -} - -// ApplicationGatewaysClientBackendHealthResponse contains the response from method ApplicationGatewaysClient.BackendHealth. -type ApplicationGatewaysClientBackendHealthResponse struct { - ApplicationGatewayBackendHealth -} - -// ApplicationGatewaysClientCreateOrUpdateResponse contains the response from method ApplicationGatewaysClient.CreateOrUpdate. -type ApplicationGatewaysClientCreateOrUpdateResponse struct { - ApplicationGateway -} - -// ApplicationGatewaysClientDeleteResponse contains the response from method ApplicationGatewaysClient.Delete. -type ApplicationGatewaysClientDeleteResponse struct { - // placeholder for future response values -} - -// ApplicationGatewaysClientGetResponse contains the response from method ApplicationGatewaysClient.Get. -type ApplicationGatewaysClientGetResponse struct { - ApplicationGateway -} - -// ApplicationGatewaysClientGetSSLPredefinedPolicyResponse contains the response from method ApplicationGatewaysClient.GetSSLPredefinedPolicy. -type ApplicationGatewaysClientGetSSLPredefinedPolicyResponse struct { - ApplicationGatewaySSLPredefinedPolicy -} - -// ApplicationGatewaysClientListAllResponse contains the response from method ApplicationGatewaysClient.ListAll. -type ApplicationGatewaysClientListAllResponse struct { - ApplicationGatewayListResult -} - -// ApplicationGatewaysClientListAvailableRequestHeadersResponse contains the response from method ApplicationGatewaysClient.ListAvailableRequestHeaders. -type ApplicationGatewaysClientListAvailableRequestHeadersResponse struct { - // Response for ApplicationGatewayAvailableRequestHeaders API service call. - StringArray []*string -} - -// ApplicationGatewaysClientListAvailableResponseHeadersResponse contains the response from method ApplicationGatewaysClient.ListAvailableResponseHeaders. -type ApplicationGatewaysClientListAvailableResponseHeadersResponse struct { - // Response for ApplicationGatewayAvailableResponseHeaders API service call. - StringArray []*string -} - -// ApplicationGatewaysClientListAvailableSSLOptionsResponse contains the response from method ApplicationGatewaysClient.ListAvailableSSLOptions. -type ApplicationGatewaysClientListAvailableSSLOptionsResponse struct { - ApplicationGatewayAvailableSSLOptions -} - -// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse contains the response from method ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies. -type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse struct { - ApplicationGatewayAvailableSSLPredefinedPolicies -} - -// ApplicationGatewaysClientListAvailableServerVariablesResponse contains the response from method ApplicationGatewaysClient.ListAvailableServerVariables. -type ApplicationGatewaysClientListAvailableServerVariablesResponse struct { - // Response for ApplicationGatewayAvailableServerVariables API service call. - StringArray []*string -} - -// ApplicationGatewaysClientListAvailableWafRuleSetsResponse contains the response from method ApplicationGatewaysClient.ListAvailableWafRuleSets. -type ApplicationGatewaysClientListAvailableWafRuleSetsResponse struct { - ApplicationGatewayAvailableWafRuleSetsResult -} - -// ApplicationGatewaysClientListResponse contains the response from method ApplicationGatewaysClient.List. -type ApplicationGatewaysClientListResponse struct { - ApplicationGatewayListResult -} - -// ApplicationGatewaysClientStartResponse contains the response from method ApplicationGatewaysClient.Start. -type ApplicationGatewaysClientStartResponse struct { - // placeholder for future response values -} - -// ApplicationGatewaysClientStopResponse contains the response from method ApplicationGatewaysClient.Stop. -type ApplicationGatewaysClientStopResponse struct { - // placeholder for future response values -} - -// ApplicationGatewaysClientUpdateTagsResponse contains the response from method ApplicationGatewaysClient.UpdateTags. -type ApplicationGatewaysClientUpdateTagsResponse struct { - ApplicationGateway -} - -// ApplicationSecurityGroupsClientCreateOrUpdateResponse contains the response from method ApplicationSecurityGroupsClient.CreateOrUpdate. -type ApplicationSecurityGroupsClientCreateOrUpdateResponse struct { - ApplicationSecurityGroup -} - -// ApplicationSecurityGroupsClientDeleteResponse contains the response from method ApplicationSecurityGroupsClient.Delete. -type ApplicationSecurityGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// ApplicationSecurityGroupsClientGetResponse contains the response from method ApplicationSecurityGroupsClient.Get. -type ApplicationSecurityGroupsClientGetResponse struct { - ApplicationSecurityGroup -} - -// ApplicationSecurityGroupsClientListAllResponse contains the response from method ApplicationSecurityGroupsClient.ListAll. -type ApplicationSecurityGroupsClientListAllResponse struct { - ApplicationSecurityGroupListResult -} - -// ApplicationSecurityGroupsClientListResponse contains the response from method ApplicationSecurityGroupsClient.List. -type ApplicationSecurityGroupsClientListResponse struct { - ApplicationSecurityGroupListResult -} - -// ApplicationSecurityGroupsClientUpdateTagsResponse contains the response from method ApplicationSecurityGroupsClient.UpdateTags. -type ApplicationSecurityGroupsClientUpdateTagsResponse struct { - ApplicationSecurityGroup -} - -// AvailableDelegationsClientListResponse contains the response from method AvailableDelegationsClient.List. -type AvailableDelegationsClientListResponse struct { - AvailableDelegationsResult -} - -// AvailableEndpointServicesClientListResponse contains the response from method AvailableEndpointServicesClient.List. -type AvailableEndpointServicesClientListResponse struct { - EndpointServicesListResult -} - -// AvailablePrivateEndpointTypesClientListByResourceGroupResponse contains the response from method AvailablePrivateEndpointTypesClient.ListByResourceGroup. -type AvailablePrivateEndpointTypesClientListByResourceGroupResponse struct { - AvailablePrivateEndpointTypesResult -} - -// AvailablePrivateEndpointTypesClientListResponse contains the response from method AvailablePrivateEndpointTypesClient.List. -type AvailablePrivateEndpointTypesClientListResponse struct { - AvailablePrivateEndpointTypesResult -} - -// AvailableResourceGroupDelegationsClientListResponse contains the response from method AvailableResourceGroupDelegationsClient.List. -type AvailableResourceGroupDelegationsClientListResponse struct { - AvailableDelegationsResult -} - -// AvailableServiceAliasesClientListByResourceGroupResponse contains the response from method AvailableServiceAliasesClient.ListByResourceGroup. -type AvailableServiceAliasesClientListByResourceGroupResponse struct { - AvailableServiceAliasesResult -} - -// AvailableServiceAliasesClientListResponse contains the response from method AvailableServiceAliasesClient.List. -type AvailableServiceAliasesClientListResponse struct { - AvailableServiceAliasesResult -} - -// AzureFirewallFqdnTagsClientListAllResponse contains the response from method AzureFirewallFqdnTagsClient.ListAll. -type AzureFirewallFqdnTagsClientListAllResponse struct { - AzureFirewallFqdnTagListResult -} - -// AzureFirewallsClientCreateOrUpdateResponse contains the response from method AzureFirewallsClient.CreateOrUpdate. -type AzureFirewallsClientCreateOrUpdateResponse struct { - AzureFirewall -} - -// AzureFirewallsClientDeleteResponse contains the response from method AzureFirewallsClient.Delete. -type AzureFirewallsClientDeleteResponse struct { - // placeholder for future response values -} - -// AzureFirewallsClientGetResponse contains the response from method AzureFirewallsClient.Get. -type AzureFirewallsClientGetResponse struct { - AzureFirewall -} - -// AzureFirewallsClientListAllResponse contains the response from method AzureFirewallsClient.ListAll. -type AzureFirewallsClientListAllResponse struct { - AzureFirewallListResult -} - -// AzureFirewallsClientListLearnedPrefixesResponse contains the response from method AzureFirewallsClient.ListLearnedPrefixes. -type AzureFirewallsClientListLearnedPrefixesResponse struct { - IPPrefixesList -} - -// AzureFirewallsClientListResponse contains the response from method AzureFirewallsClient.List. -type AzureFirewallsClientListResponse struct { - AzureFirewallListResult -} - -// AzureFirewallsClientUpdateTagsResponse contains the response from method AzureFirewallsClient.UpdateTags. -type AzureFirewallsClientUpdateTagsResponse struct { - AzureFirewall -} - -// BastionHostsClientCreateOrUpdateResponse contains the response from method BastionHostsClient.CreateOrUpdate. -type BastionHostsClientCreateOrUpdateResponse struct { - BastionHost -} - -// BastionHostsClientDeleteResponse contains the response from method BastionHostsClient.Delete. -type BastionHostsClientDeleteResponse struct { - // placeholder for future response values -} - -// BastionHostsClientGetResponse contains the response from method BastionHostsClient.Get. -type BastionHostsClientGetResponse struct { - BastionHost -} - -// BastionHostsClientListByResourceGroupResponse contains the response from method BastionHostsClient.ListByResourceGroup. -type BastionHostsClientListByResourceGroupResponse struct { - BastionHostListResult -} - -// BastionHostsClientListResponse contains the response from method BastionHostsClient.List. -type BastionHostsClientListResponse struct { - BastionHostListResult -} - -// BastionHostsClientUpdateTagsResponse contains the response from method BastionHostsClient.UpdateTags. -type BastionHostsClientUpdateTagsResponse struct { - BastionHost -} - -// BgpServiceCommunitiesClientListResponse contains the response from method BgpServiceCommunitiesClient.List. -type BgpServiceCommunitiesClientListResponse struct { - BgpServiceCommunityListResult -} - -// ConfigurationPolicyGroupsClientCreateOrUpdateResponse contains the response from method ConfigurationPolicyGroupsClient.CreateOrUpdate. -type ConfigurationPolicyGroupsClientCreateOrUpdateResponse struct { - VPNServerConfigurationPolicyGroup -} - -// ConfigurationPolicyGroupsClientDeleteResponse contains the response from method ConfigurationPolicyGroupsClient.Delete. -type ConfigurationPolicyGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// ConfigurationPolicyGroupsClientGetResponse contains the response from method ConfigurationPolicyGroupsClient.Get. -type ConfigurationPolicyGroupsClientGetResponse struct { - VPNServerConfigurationPolicyGroup -} - -// ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse contains the response from method ConfigurationPolicyGroupsClient.ListByVPNServerConfiguration. -type ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse struct { - ListVPNServerConfigurationPolicyGroupsResult -} - -// ConnectionMonitorsClientCreateOrUpdateResponse contains the response from method ConnectionMonitorsClient.CreateOrUpdate. -type ConnectionMonitorsClientCreateOrUpdateResponse struct { - ConnectionMonitorResult -} - -// ConnectionMonitorsClientDeleteResponse contains the response from method ConnectionMonitorsClient.Delete. -type ConnectionMonitorsClientDeleteResponse struct { - // placeholder for future response values -} - -// ConnectionMonitorsClientGetResponse contains the response from method ConnectionMonitorsClient.Get. -type ConnectionMonitorsClientGetResponse struct { - ConnectionMonitorResult -} - -// ConnectionMonitorsClientListResponse contains the response from method ConnectionMonitorsClient.List. -type ConnectionMonitorsClientListResponse struct { - ConnectionMonitorListResult -} - -// ConnectionMonitorsClientQueryResponse contains the response from method ConnectionMonitorsClient.Query. -type ConnectionMonitorsClientQueryResponse struct { - ConnectionMonitorQueryResult -} - -// ConnectionMonitorsClientStartResponse contains the response from method ConnectionMonitorsClient.Start. -type ConnectionMonitorsClientStartResponse struct { - // placeholder for future response values -} - -// ConnectionMonitorsClientStopResponse contains the response from method ConnectionMonitorsClient.Stop. -type ConnectionMonitorsClientStopResponse struct { - // placeholder for future response values -} - -// ConnectionMonitorsClientUpdateTagsResponse contains the response from method ConnectionMonitorsClient.UpdateTags. -type ConnectionMonitorsClientUpdateTagsResponse struct { - ConnectionMonitorResult -} - -// ConnectivityConfigurationsClientCreateOrUpdateResponse contains the response from method ConnectivityConfigurationsClient.CreateOrUpdate. -type ConnectivityConfigurationsClientCreateOrUpdateResponse struct { - ConnectivityConfiguration -} - -// ConnectivityConfigurationsClientDeleteResponse contains the response from method ConnectivityConfigurationsClient.Delete. -type ConnectivityConfigurationsClientDeleteResponse struct { - // placeholder for future response values -} - -// ConnectivityConfigurationsClientGetResponse contains the response from method ConnectivityConfigurationsClient.Get. -type ConnectivityConfigurationsClientGetResponse struct { - ConnectivityConfiguration -} - -// ConnectivityConfigurationsClientListResponse contains the response from method ConnectivityConfigurationsClient.List. -type ConnectivityConfigurationsClientListResponse struct { - ConnectivityConfigurationListResult -} - -// CustomIPPrefixesClientCreateOrUpdateResponse contains the response from method CustomIPPrefixesClient.CreateOrUpdate. -type CustomIPPrefixesClientCreateOrUpdateResponse struct { - CustomIPPrefix -} - -// CustomIPPrefixesClientDeleteResponse contains the response from method CustomIPPrefixesClient.Delete. -type CustomIPPrefixesClientDeleteResponse struct { - // placeholder for future response values -} - -// CustomIPPrefixesClientGetResponse contains the response from method CustomIPPrefixesClient.Get. -type CustomIPPrefixesClientGetResponse struct { - CustomIPPrefix -} - -// CustomIPPrefixesClientListAllResponse contains the response from method CustomIPPrefixesClient.ListAll. -type CustomIPPrefixesClientListAllResponse struct { - CustomIPPrefixListResult -} - -// CustomIPPrefixesClientListResponse contains the response from method CustomIPPrefixesClient.List. -type CustomIPPrefixesClientListResponse struct { - CustomIPPrefixListResult -} - -// CustomIPPrefixesClientUpdateTagsResponse contains the response from method CustomIPPrefixesClient.UpdateTags. -type CustomIPPrefixesClientUpdateTagsResponse struct { - CustomIPPrefix -} - -// DdosCustomPoliciesClientCreateOrUpdateResponse contains the response from method DdosCustomPoliciesClient.CreateOrUpdate. -type DdosCustomPoliciesClientCreateOrUpdateResponse struct { - DdosCustomPolicy -} - -// DdosCustomPoliciesClientDeleteResponse contains the response from method DdosCustomPoliciesClient.Delete. -type DdosCustomPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// DdosCustomPoliciesClientGetResponse contains the response from method DdosCustomPoliciesClient.Get. -type DdosCustomPoliciesClientGetResponse struct { - DdosCustomPolicy -} - -// DdosCustomPoliciesClientUpdateTagsResponse contains the response from method DdosCustomPoliciesClient.UpdateTags. -type DdosCustomPoliciesClientUpdateTagsResponse struct { - DdosCustomPolicy -} - -// DdosProtectionPlansClientCreateOrUpdateResponse contains the response from method DdosProtectionPlansClient.CreateOrUpdate. -type DdosProtectionPlansClientCreateOrUpdateResponse struct { - DdosProtectionPlan -} - -// DdosProtectionPlansClientDeleteResponse contains the response from method DdosProtectionPlansClient.Delete. -type DdosProtectionPlansClientDeleteResponse struct { - // placeholder for future response values -} - -// DdosProtectionPlansClientGetResponse contains the response from method DdosProtectionPlansClient.Get. -type DdosProtectionPlansClientGetResponse struct { - DdosProtectionPlan -} - -// DdosProtectionPlansClientListByResourceGroupResponse contains the response from method DdosProtectionPlansClient.ListByResourceGroup. -type DdosProtectionPlansClientListByResourceGroupResponse struct { - DdosProtectionPlanListResult -} - -// DdosProtectionPlansClientListResponse contains the response from method DdosProtectionPlansClient.List. -type DdosProtectionPlansClientListResponse struct { - DdosProtectionPlanListResult -} - -// DdosProtectionPlansClientUpdateTagsResponse contains the response from method DdosProtectionPlansClient.UpdateTags. -type DdosProtectionPlansClientUpdateTagsResponse struct { - DdosProtectionPlan -} - -// DefaultSecurityRulesClientGetResponse contains the response from method DefaultSecurityRulesClient.Get. -type DefaultSecurityRulesClientGetResponse struct { - SecurityRule -} - -// DefaultSecurityRulesClientListResponse contains the response from method DefaultSecurityRulesClient.List. -type DefaultSecurityRulesClientListResponse struct { - SecurityRuleListResult -} - -// DscpConfigurationClientCreateOrUpdateResponse contains the response from method DscpConfigurationClient.CreateOrUpdate. -type DscpConfigurationClientCreateOrUpdateResponse struct { - DscpConfiguration -} - -// DscpConfigurationClientDeleteResponse contains the response from method DscpConfigurationClient.Delete. -type DscpConfigurationClientDeleteResponse struct { - // placeholder for future response values -} - -// DscpConfigurationClientGetResponse contains the response from method DscpConfigurationClient.Get. -type DscpConfigurationClientGetResponse struct { - DscpConfiguration -} - -// DscpConfigurationClientListAllResponse contains the response from method DscpConfigurationClient.ListAll. -type DscpConfigurationClientListAllResponse struct { - DscpConfigurationListResult -} - -// DscpConfigurationClientListResponse contains the response from method DscpConfigurationClient.List. -type DscpConfigurationClientListResponse struct { - DscpConfigurationListResult -} - -// ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate. -type ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse struct { - ExpressRouteCircuitAuthorization -} - -// ExpressRouteCircuitAuthorizationsClientDeleteResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.Delete. -type ExpressRouteCircuitAuthorizationsClientDeleteResponse struct { - // placeholder for future response values -} - -// ExpressRouteCircuitAuthorizationsClientGetResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.Get. -type ExpressRouteCircuitAuthorizationsClientGetResponse struct { - ExpressRouteCircuitAuthorization -} - -// ExpressRouteCircuitAuthorizationsClientListResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.List. -type ExpressRouteCircuitAuthorizationsClientListResponse struct { - AuthorizationListResult -} - -// ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitConnectionsClient.CreateOrUpdate. -type ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse struct { - ExpressRouteCircuitConnection -} - -// ExpressRouteCircuitConnectionsClientDeleteResponse contains the response from method ExpressRouteCircuitConnectionsClient.Delete. -type ExpressRouteCircuitConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// ExpressRouteCircuitConnectionsClientGetResponse contains the response from method ExpressRouteCircuitConnectionsClient.Get. -type ExpressRouteCircuitConnectionsClientGetResponse struct { - ExpressRouteCircuitConnection -} - -// ExpressRouteCircuitConnectionsClientListResponse contains the response from method ExpressRouteCircuitConnectionsClient.List. -type ExpressRouteCircuitConnectionsClientListResponse struct { - ExpressRouteCircuitConnectionListResult -} - -// ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitPeeringsClient.CreateOrUpdate. -type ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse struct { - ExpressRouteCircuitPeering -} - -// ExpressRouteCircuitPeeringsClientDeleteResponse contains the response from method ExpressRouteCircuitPeeringsClient.Delete. -type ExpressRouteCircuitPeeringsClientDeleteResponse struct { - // placeholder for future response values -} - -// ExpressRouteCircuitPeeringsClientGetResponse contains the response from method ExpressRouteCircuitPeeringsClient.Get. -type ExpressRouteCircuitPeeringsClientGetResponse struct { - ExpressRouteCircuitPeering -} - -// ExpressRouteCircuitPeeringsClientListResponse contains the response from method ExpressRouteCircuitPeeringsClient.List. -type ExpressRouteCircuitPeeringsClientListResponse struct { - ExpressRouteCircuitPeeringListResult -} - -// ExpressRouteCircuitsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitsClient.CreateOrUpdate. -type ExpressRouteCircuitsClientCreateOrUpdateResponse struct { - ExpressRouteCircuit -} - -// ExpressRouteCircuitsClientDeleteResponse contains the response from method ExpressRouteCircuitsClient.Delete. -type ExpressRouteCircuitsClientDeleteResponse struct { - // placeholder for future response values -} - -// ExpressRouteCircuitsClientGetPeeringStatsResponse contains the response from method ExpressRouteCircuitsClient.GetPeeringStats. -type ExpressRouteCircuitsClientGetPeeringStatsResponse struct { - ExpressRouteCircuitStats -} - -// ExpressRouteCircuitsClientGetResponse contains the response from method ExpressRouteCircuitsClient.Get. -type ExpressRouteCircuitsClientGetResponse struct { - ExpressRouteCircuit -} - -// ExpressRouteCircuitsClientGetStatsResponse contains the response from method ExpressRouteCircuitsClient.GetStats. -type ExpressRouteCircuitsClientGetStatsResponse struct { - ExpressRouteCircuitStats -} - -// ExpressRouteCircuitsClientListAllResponse contains the response from method ExpressRouteCircuitsClient.ListAll. -type ExpressRouteCircuitsClientListAllResponse struct { - ExpressRouteCircuitListResult -} - -// ExpressRouteCircuitsClientListArpTableResponse contains the response from method ExpressRouteCircuitsClient.ListArpTable. -type ExpressRouteCircuitsClientListArpTableResponse struct { - ExpressRouteCircuitsArpTableListResult -} - -// ExpressRouteCircuitsClientListResponse contains the response from method ExpressRouteCircuitsClient.List. -type ExpressRouteCircuitsClientListResponse struct { - ExpressRouteCircuitListResult -} - -// ExpressRouteCircuitsClientListRoutesTableResponse contains the response from method ExpressRouteCircuitsClient.ListRoutesTable. -type ExpressRouteCircuitsClientListRoutesTableResponse struct { - ExpressRouteCircuitsRoutesTableListResult -} - -// ExpressRouteCircuitsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCircuitsClient.ListRoutesTableSummary. -type ExpressRouteCircuitsClientListRoutesTableSummaryResponse struct { - ExpressRouteCircuitsRoutesTableSummaryListResult -} - -// ExpressRouteCircuitsClientUpdateTagsResponse contains the response from method ExpressRouteCircuitsClient.UpdateTags. -type ExpressRouteCircuitsClientUpdateTagsResponse struct { - ExpressRouteCircuit -} - -// ExpressRouteConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteConnectionsClient.CreateOrUpdate. -type ExpressRouteConnectionsClientCreateOrUpdateResponse struct { - ExpressRouteConnection -} - -// ExpressRouteConnectionsClientDeleteResponse contains the response from method ExpressRouteConnectionsClient.Delete. -type ExpressRouteConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// ExpressRouteConnectionsClientGetResponse contains the response from method ExpressRouteConnectionsClient.Get. -type ExpressRouteConnectionsClientGetResponse struct { - ExpressRouteConnection -} - -// ExpressRouteConnectionsClientListResponse contains the response from method ExpressRouteConnectionsClient.List. -type ExpressRouteConnectionsClientListResponse struct { - ExpressRouteConnectionList -} - -// ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate. -type ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse struct { - ExpressRouteCrossConnectionPeering -} - -// ExpressRouteCrossConnectionPeeringsClientDeleteResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.Delete. -type ExpressRouteCrossConnectionPeeringsClientDeleteResponse struct { - // placeholder for future response values -} - -// ExpressRouteCrossConnectionPeeringsClientGetResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.Get. -type ExpressRouteCrossConnectionPeeringsClientGetResponse struct { - ExpressRouteCrossConnectionPeering -} - -// ExpressRouteCrossConnectionPeeringsClientListResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.List. -type ExpressRouteCrossConnectionPeeringsClientListResponse struct { - ExpressRouteCrossConnectionPeeringList -} - -// ExpressRouteCrossConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionsClient.CreateOrUpdate. -type ExpressRouteCrossConnectionsClientCreateOrUpdateResponse struct { - ExpressRouteCrossConnection -} - -// ExpressRouteCrossConnectionsClientGetResponse contains the response from method ExpressRouteCrossConnectionsClient.Get. -type ExpressRouteCrossConnectionsClientGetResponse struct { - ExpressRouteCrossConnection -} - -// ExpressRouteCrossConnectionsClientListArpTableResponse contains the response from method ExpressRouteCrossConnectionsClient.ListArpTable. -type ExpressRouteCrossConnectionsClientListArpTableResponse struct { - ExpressRouteCircuitsArpTableListResult -} - -// ExpressRouteCrossConnectionsClientListByResourceGroupResponse contains the response from method ExpressRouteCrossConnectionsClient.ListByResourceGroup. -type ExpressRouteCrossConnectionsClientListByResourceGroupResponse struct { - ExpressRouteCrossConnectionListResult -} - -// ExpressRouteCrossConnectionsClientListResponse contains the response from method ExpressRouteCrossConnectionsClient.List. -type ExpressRouteCrossConnectionsClientListResponse struct { - ExpressRouteCrossConnectionListResult -} - -// ExpressRouteCrossConnectionsClientListRoutesTableResponse contains the response from method ExpressRouteCrossConnectionsClient.ListRoutesTable. -type ExpressRouteCrossConnectionsClientListRoutesTableResponse struct { - ExpressRouteCircuitsRoutesTableListResult -} - -// ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCrossConnectionsClient.ListRoutesTableSummary. -type ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse struct { - ExpressRouteCrossConnectionsRoutesTableSummaryListResult -} - -// ExpressRouteCrossConnectionsClientUpdateTagsResponse contains the response from method ExpressRouteCrossConnectionsClient.UpdateTags. -type ExpressRouteCrossConnectionsClientUpdateTagsResponse struct { - ExpressRouteCrossConnection -} - -// ExpressRouteGatewaysClientCreateOrUpdateResponse contains the response from method ExpressRouteGatewaysClient.CreateOrUpdate. -type ExpressRouteGatewaysClientCreateOrUpdateResponse struct { - ExpressRouteGateway -} - -// ExpressRouteGatewaysClientDeleteResponse contains the response from method ExpressRouteGatewaysClient.Delete. -type ExpressRouteGatewaysClientDeleteResponse struct { - // placeholder for future response values -} - -// ExpressRouteGatewaysClientGetResponse contains the response from method ExpressRouteGatewaysClient.Get. -type ExpressRouteGatewaysClientGetResponse struct { - ExpressRouteGateway -} - -// ExpressRouteGatewaysClientListByResourceGroupResponse contains the response from method ExpressRouteGatewaysClient.ListByResourceGroup. -type ExpressRouteGatewaysClientListByResourceGroupResponse struct { - ExpressRouteGatewayList -} - -// ExpressRouteGatewaysClientListBySubscriptionResponse contains the response from method ExpressRouteGatewaysClient.ListBySubscription. -type ExpressRouteGatewaysClientListBySubscriptionResponse struct { - ExpressRouteGatewayList -} - -// ExpressRouteGatewaysClientUpdateTagsResponse contains the response from method ExpressRouteGatewaysClient.UpdateTags. -type ExpressRouteGatewaysClientUpdateTagsResponse struct { - ExpressRouteGateway -} - -// ExpressRouteLinksClientGetResponse contains the response from method ExpressRouteLinksClient.Get. -type ExpressRouteLinksClientGetResponse struct { - ExpressRouteLink -} - -// ExpressRouteLinksClientListResponse contains the response from method ExpressRouteLinksClient.List. -type ExpressRouteLinksClientListResponse struct { - ExpressRouteLinkListResult -} - -// ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortAuthorizationsClient.CreateOrUpdate. -type ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse struct { - ExpressRoutePortAuthorization -} - -// ExpressRoutePortAuthorizationsClientDeleteResponse contains the response from method ExpressRoutePortAuthorizationsClient.Delete. -type ExpressRoutePortAuthorizationsClientDeleteResponse struct { - // placeholder for future response values -} - -// ExpressRoutePortAuthorizationsClientGetResponse contains the response from method ExpressRoutePortAuthorizationsClient.Get. -type ExpressRoutePortAuthorizationsClientGetResponse struct { - ExpressRoutePortAuthorization -} - -// ExpressRoutePortAuthorizationsClientListResponse contains the response from method ExpressRoutePortAuthorizationsClient.List. -type ExpressRoutePortAuthorizationsClientListResponse struct { - ExpressRoutePortAuthorizationListResult -} - -// ExpressRoutePortsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortsClient.CreateOrUpdate. -type ExpressRoutePortsClientCreateOrUpdateResponse struct { - ExpressRoutePort -} - -// ExpressRoutePortsClientDeleteResponse contains the response from method ExpressRoutePortsClient.Delete. -type ExpressRoutePortsClientDeleteResponse struct { - // placeholder for future response values -} - -// ExpressRoutePortsClientGenerateLOAResponse contains the response from method ExpressRoutePortsClient.GenerateLOA. -type ExpressRoutePortsClientGenerateLOAResponse struct { - GenerateExpressRoutePortsLOAResult -} - -// ExpressRoutePortsClientGetResponse contains the response from method ExpressRoutePortsClient.Get. -type ExpressRoutePortsClientGetResponse struct { - ExpressRoutePort -} - -// ExpressRoutePortsClientListByResourceGroupResponse contains the response from method ExpressRoutePortsClient.ListByResourceGroup. -type ExpressRoutePortsClientListByResourceGroupResponse struct { - ExpressRoutePortListResult -} - -// ExpressRoutePortsClientListResponse contains the response from method ExpressRoutePortsClient.List. -type ExpressRoutePortsClientListResponse struct { - ExpressRoutePortListResult -} - -// ExpressRoutePortsClientUpdateTagsResponse contains the response from method ExpressRoutePortsClient.UpdateTags. -type ExpressRoutePortsClientUpdateTagsResponse struct { - ExpressRoutePort -} - -// ExpressRoutePortsLocationsClientGetResponse contains the response from method ExpressRoutePortsLocationsClient.Get. -type ExpressRoutePortsLocationsClientGetResponse struct { - ExpressRoutePortsLocation -} - -// ExpressRoutePortsLocationsClientListResponse contains the response from method ExpressRoutePortsLocationsClient.List. -type ExpressRoutePortsLocationsClientListResponse struct { - ExpressRoutePortsLocationListResult -} - -// ExpressRouteProviderPortsLocationClientListResponse contains the response from method ExpressRouteProviderPortsLocationClient.List. -type ExpressRouteProviderPortsLocationClientListResponse struct { - ExpressRouteProviderPortListResult -} - -// ExpressRouteServiceProvidersClientListResponse contains the response from method ExpressRouteServiceProvidersClient.List. -type ExpressRouteServiceProvidersClientListResponse struct { - ExpressRouteServiceProviderListResult -} - -// FirewallPoliciesClientCreateOrUpdateResponse contains the response from method FirewallPoliciesClient.CreateOrUpdate. -type FirewallPoliciesClientCreateOrUpdateResponse struct { - FirewallPolicy -} - -// FirewallPoliciesClientDeleteResponse contains the response from method FirewallPoliciesClient.Delete. -type FirewallPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// FirewallPoliciesClientGetResponse contains the response from method FirewallPoliciesClient.Get. -type FirewallPoliciesClientGetResponse struct { - FirewallPolicy -} - -// FirewallPoliciesClientListAllResponse contains the response from method FirewallPoliciesClient.ListAll. -type FirewallPoliciesClientListAllResponse struct { - FirewallPolicyListResult -} - -// FirewallPoliciesClientListResponse contains the response from method FirewallPoliciesClient.List. -type FirewallPoliciesClientListResponse struct { - FirewallPolicyListResult -} - -// FirewallPoliciesClientUpdateTagsResponse contains the response from method FirewallPoliciesClient.UpdateTags. -type FirewallPoliciesClientUpdateTagsResponse struct { - FirewallPolicy -} - -// FirewallPolicyIdpsSignaturesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesClient.List. -type FirewallPolicyIdpsSignaturesClientListResponse struct { - QueryResults -} - -// FirewallPolicyIdpsSignaturesFilterValuesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesFilterValuesClient.List. -type FirewallPolicyIdpsSignaturesFilterValuesClientListResponse struct { - SignatureOverridesFilterValuesResponse -} - -// FirewallPolicyIdpsSignaturesOverridesClientGetResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Get. -type FirewallPolicyIdpsSignaturesOverridesClientGetResponse struct { - SignaturesOverrides -} - -// FirewallPolicyIdpsSignaturesOverridesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.List. -type FirewallPolicyIdpsSignaturesOverridesClientListResponse struct { - SignaturesOverridesList -} - -// FirewallPolicyIdpsSignaturesOverridesClientPatchResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Patch. -type FirewallPolicyIdpsSignaturesOverridesClientPatchResponse struct { - SignaturesOverrides -} - -// FirewallPolicyIdpsSignaturesOverridesClientPutResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Put. -type FirewallPolicyIdpsSignaturesOverridesClientPutResponse struct { - SignaturesOverrides -} - -// FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.CreateOrUpdate. -type FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse struct { - FirewallPolicyRuleCollectionGroup -} - -// FirewallPolicyRuleCollectionGroupsClientDeleteResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.Delete. -type FirewallPolicyRuleCollectionGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// FirewallPolicyRuleCollectionGroupsClientGetResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.Get. -type FirewallPolicyRuleCollectionGroupsClientGetResponse struct { - FirewallPolicyRuleCollectionGroup -} - -// FirewallPolicyRuleCollectionGroupsClientListResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.List. -type FirewallPolicyRuleCollectionGroupsClientListResponse struct { - FirewallPolicyRuleCollectionGroupListResult -} - -// FlowLogsClientCreateOrUpdateResponse contains the response from method FlowLogsClient.CreateOrUpdate. -type FlowLogsClientCreateOrUpdateResponse struct { - FlowLog -} - -// FlowLogsClientDeleteResponse contains the response from method FlowLogsClient.Delete. -type FlowLogsClientDeleteResponse struct { - // placeholder for future response values -} - -// FlowLogsClientGetResponse contains the response from method FlowLogsClient.Get. -type FlowLogsClientGetResponse struct { - FlowLog -} - -// FlowLogsClientListResponse contains the response from method FlowLogsClient.List. -type FlowLogsClientListResponse struct { - FlowLogListResult -} - -// FlowLogsClientUpdateTagsResponse contains the response from method FlowLogsClient.UpdateTags. -type FlowLogsClientUpdateTagsResponse struct { - FlowLog -} - -// GroupsClientCreateOrUpdateResponse contains the response from method GroupsClient.CreateOrUpdate. -type GroupsClientCreateOrUpdateResponse struct { - Group - // ETag contains the information returned from the ETag header response. - ETag *string -} - -// GroupsClientDeleteResponse contains the response from method GroupsClient.Delete. -type GroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// GroupsClientGetResponse contains the response from method GroupsClient.Get. -type GroupsClientGetResponse struct { - Group -} - -// GroupsClientListResponse contains the response from method GroupsClient.List. -type GroupsClientListResponse struct { - GroupListResult -} - -// HubRouteTablesClientCreateOrUpdateResponse contains the response from method HubRouteTablesClient.CreateOrUpdate. -type HubRouteTablesClientCreateOrUpdateResponse struct { - HubRouteTable -} - -// HubRouteTablesClientDeleteResponse contains the response from method HubRouteTablesClient.Delete. -type HubRouteTablesClientDeleteResponse struct { - // placeholder for future response values -} - -// HubRouteTablesClientGetResponse contains the response from method HubRouteTablesClient.Get. -type HubRouteTablesClientGetResponse struct { - HubRouteTable -} - -// HubRouteTablesClientListResponse contains the response from method HubRouteTablesClient.List. -type HubRouteTablesClientListResponse struct { - ListHubRouteTablesResult -} - -// HubVirtualNetworkConnectionsClientCreateOrUpdateResponse contains the response from method HubVirtualNetworkConnectionsClient.CreateOrUpdate. -type HubVirtualNetworkConnectionsClientCreateOrUpdateResponse struct { - HubVirtualNetworkConnection -} - -// HubVirtualNetworkConnectionsClientDeleteResponse contains the response from method HubVirtualNetworkConnectionsClient.Delete. -type HubVirtualNetworkConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// HubVirtualNetworkConnectionsClientGetResponse contains the response from method HubVirtualNetworkConnectionsClient.Get. -type HubVirtualNetworkConnectionsClientGetResponse struct { - HubVirtualNetworkConnection -} - -// HubVirtualNetworkConnectionsClientListResponse contains the response from method HubVirtualNetworkConnectionsClient.List. -type HubVirtualNetworkConnectionsClientListResponse struct { - ListHubVirtualNetworkConnectionsResult -} - -// IPAllocationsClientCreateOrUpdateResponse contains the response from method IPAllocationsClient.CreateOrUpdate. -type IPAllocationsClientCreateOrUpdateResponse struct { - IPAllocation -} - -// IPAllocationsClientDeleteResponse contains the response from method IPAllocationsClient.Delete. -type IPAllocationsClientDeleteResponse struct { - // placeholder for future response values -} - -// IPAllocationsClientGetResponse contains the response from method IPAllocationsClient.Get. -type IPAllocationsClientGetResponse struct { - IPAllocation -} - -// IPAllocationsClientListByResourceGroupResponse contains the response from method IPAllocationsClient.ListByResourceGroup. -type IPAllocationsClientListByResourceGroupResponse struct { - IPAllocationListResult -} - -// IPAllocationsClientListResponse contains the response from method IPAllocationsClient.List. -type IPAllocationsClientListResponse struct { - IPAllocationListResult -} - -// IPAllocationsClientUpdateTagsResponse contains the response from method IPAllocationsClient.UpdateTags. -type IPAllocationsClientUpdateTagsResponse struct { - IPAllocation -} - -// IPGroupsClientCreateOrUpdateResponse contains the response from method IPGroupsClient.CreateOrUpdate. -type IPGroupsClientCreateOrUpdateResponse struct { - IPGroup -} - -// IPGroupsClientDeleteResponse contains the response from method IPGroupsClient.Delete. -type IPGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// IPGroupsClientGetResponse contains the response from method IPGroupsClient.Get. -type IPGroupsClientGetResponse struct { - IPGroup -} - -// IPGroupsClientListByResourceGroupResponse contains the response from method IPGroupsClient.ListByResourceGroup. -type IPGroupsClientListByResourceGroupResponse struct { - IPGroupListResult -} - -// IPGroupsClientListResponse contains the response from method IPGroupsClient.List. -type IPGroupsClientListResponse struct { - IPGroupListResult -} - -// IPGroupsClientUpdateGroupsResponse contains the response from method IPGroupsClient.UpdateGroups. -type IPGroupsClientUpdateGroupsResponse struct { - IPGroup -} - -// InboundNatRulesClientCreateOrUpdateResponse contains the response from method InboundNatRulesClient.CreateOrUpdate. -type InboundNatRulesClientCreateOrUpdateResponse struct { - InboundNatRule -} - -// InboundNatRulesClientDeleteResponse contains the response from method InboundNatRulesClient.Delete. -type InboundNatRulesClientDeleteResponse struct { - // placeholder for future response values -} - -// InboundNatRulesClientGetResponse contains the response from method InboundNatRulesClient.Get. -type InboundNatRulesClientGetResponse struct { - InboundNatRule -} - -// InboundNatRulesClientListResponse contains the response from method InboundNatRulesClient.List. -type InboundNatRulesClientListResponse struct { - InboundNatRuleListResult -} - -// InboundSecurityRuleClientCreateOrUpdateResponse contains the response from method InboundSecurityRuleClient.CreateOrUpdate. -type InboundSecurityRuleClientCreateOrUpdateResponse struct { - InboundSecurityRule -} - -// InterfaceIPConfigurationsClientGetResponse contains the response from method InterfaceIPConfigurationsClient.Get. -type InterfaceIPConfigurationsClientGetResponse struct { - InterfaceIPConfiguration -} - -// InterfaceIPConfigurationsClientListResponse contains the response from method InterfaceIPConfigurationsClient.List. -type InterfaceIPConfigurationsClientListResponse struct { - InterfaceIPConfigurationListResult -} - -// InterfaceLoadBalancersClientListResponse contains the response from method InterfaceLoadBalancersClient.List. -type InterfaceLoadBalancersClientListResponse struct { - InterfaceLoadBalancerListResult -} - -// InterfaceTapConfigurationsClientCreateOrUpdateResponse contains the response from method InterfaceTapConfigurationsClient.CreateOrUpdate. -type InterfaceTapConfigurationsClientCreateOrUpdateResponse struct { - InterfaceTapConfiguration -} - -// InterfaceTapConfigurationsClientDeleteResponse contains the response from method InterfaceTapConfigurationsClient.Delete. -type InterfaceTapConfigurationsClientDeleteResponse struct { - // placeholder for future response values -} - -// InterfaceTapConfigurationsClientGetResponse contains the response from method InterfaceTapConfigurationsClient.Get. -type InterfaceTapConfigurationsClientGetResponse struct { - InterfaceTapConfiguration -} - -// InterfaceTapConfigurationsClientListResponse contains the response from method InterfaceTapConfigurationsClient.List. -type InterfaceTapConfigurationsClientListResponse struct { - InterfaceTapConfigurationListResult -} - -// InterfacesClientCreateOrUpdateResponse contains the response from method InterfacesClient.CreateOrUpdate. -type InterfacesClientCreateOrUpdateResponse struct { - Interface -} - -// InterfacesClientDeleteResponse contains the response from method InterfacesClient.Delete. -type InterfacesClientDeleteResponse struct { - // placeholder for future response values -} - -// InterfacesClientGetCloudServiceNetworkInterfaceResponse contains the response from method InterfacesClient.GetCloudServiceNetworkInterface. -type InterfacesClientGetCloudServiceNetworkInterfaceResponse struct { - Interface -} - -// InterfacesClientGetEffectiveRouteTableResponse contains the response from method InterfacesClient.GetEffectiveRouteTable. -type InterfacesClientGetEffectiveRouteTableResponse struct { - EffectiveRouteListResult -} - -// InterfacesClientGetResponse contains the response from method InterfacesClient.Get. -type InterfacesClientGetResponse struct { - Interface -} - -// InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse contains the response from method InterfacesClient.GetVirtualMachineScaleSetIPConfiguration. -type InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse struct { - InterfaceIPConfiguration -} - -// InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse contains the response from method InterfacesClient.GetVirtualMachineScaleSetNetworkInterface. -type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse struct { - Interface -} - -// InterfacesClientListAllResponse contains the response from method InterfacesClient.ListAll. -type InterfacesClientListAllResponse struct { - InterfaceListResult -} - -// InterfacesClientListCloudServiceNetworkInterfacesResponse contains the response from method InterfacesClient.ListCloudServiceNetworkInterfaces. -type InterfacesClientListCloudServiceNetworkInterfacesResponse struct { - InterfaceListResult -} - -// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse contains the response from method InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces. -type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse struct { - InterfaceListResult -} - -// InterfacesClientListEffectiveNetworkSecurityGroupsResponse contains the response from method InterfacesClient.ListEffectiveNetworkSecurityGroups. -type InterfacesClientListEffectiveNetworkSecurityGroupsResponse struct { - EffectiveNetworkSecurityGroupListResult -} - -// InterfacesClientListResponse contains the response from method InterfacesClient.List. -type InterfacesClientListResponse struct { - InterfaceListResult -} - -// InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse contains the response from method InterfacesClient.ListVirtualMachineScaleSetIPConfigurations. -type InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse struct { - InterfaceIPConfigurationListResult -} - -// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse contains the response from method InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces. -type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse struct { - InterfaceListResult -} - -// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse contains the response from method InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces. -type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse struct { - InterfaceListResult -} - -// InterfacesClientUpdateTagsResponse contains the response from method InterfacesClient.UpdateTags. -type InterfacesClientUpdateTagsResponse struct { - Interface -} - -// LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse contains the response from method LoadBalancerBackendAddressPoolsClient.CreateOrUpdate. -type LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse struct { - BackendAddressPool -} - -// LoadBalancerBackendAddressPoolsClientDeleteResponse contains the response from method LoadBalancerBackendAddressPoolsClient.Delete. -type LoadBalancerBackendAddressPoolsClientDeleteResponse struct { - // placeholder for future response values -} - -// LoadBalancerBackendAddressPoolsClientGetResponse contains the response from method LoadBalancerBackendAddressPoolsClient.Get. -type LoadBalancerBackendAddressPoolsClientGetResponse struct { - BackendAddressPool -} - -// LoadBalancerBackendAddressPoolsClientListResponse contains the response from method LoadBalancerBackendAddressPoolsClient.List. -type LoadBalancerBackendAddressPoolsClientListResponse struct { - LoadBalancerBackendAddressPoolListResult -} - -// LoadBalancerFrontendIPConfigurationsClientGetResponse contains the response from method LoadBalancerFrontendIPConfigurationsClient.Get. -type LoadBalancerFrontendIPConfigurationsClientGetResponse struct { - FrontendIPConfiguration -} - -// LoadBalancerFrontendIPConfigurationsClientListResponse contains the response from method LoadBalancerFrontendIPConfigurationsClient.List. -type LoadBalancerFrontendIPConfigurationsClientListResponse struct { - LoadBalancerFrontendIPConfigurationListResult -} - -// LoadBalancerLoadBalancingRulesClientGetResponse contains the response from method LoadBalancerLoadBalancingRulesClient.Get. -type LoadBalancerLoadBalancingRulesClientGetResponse struct { - LoadBalancingRule -} - -// LoadBalancerLoadBalancingRulesClientListResponse contains the response from method LoadBalancerLoadBalancingRulesClient.List. -type LoadBalancerLoadBalancingRulesClientListResponse struct { - LoadBalancerLoadBalancingRuleListResult -} - -// LoadBalancerNetworkInterfacesClientListResponse contains the response from method LoadBalancerNetworkInterfacesClient.List. -type LoadBalancerNetworkInterfacesClientListResponse struct { - InterfaceListResult -} - -// LoadBalancerOutboundRulesClientGetResponse contains the response from method LoadBalancerOutboundRulesClient.Get. -type LoadBalancerOutboundRulesClientGetResponse struct { - OutboundRule -} - -// LoadBalancerOutboundRulesClientListResponse contains the response from method LoadBalancerOutboundRulesClient.List. -type LoadBalancerOutboundRulesClientListResponse struct { - LoadBalancerOutboundRuleListResult -} - -// LoadBalancerProbesClientGetResponse contains the response from method LoadBalancerProbesClient.Get. -type LoadBalancerProbesClientGetResponse struct { - Probe -} - -// LoadBalancerProbesClientListResponse contains the response from method LoadBalancerProbesClient.List. -type LoadBalancerProbesClientListResponse struct { - LoadBalancerProbeListResult -} - -// LoadBalancersClientCreateOrUpdateResponse contains the response from method LoadBalancersClient.CreateOrUpdate. -type LoadBalancersClientCreateOrUpdateResponse struct { - LoadBalancer -} - -// LoadBalancersClientDeleteResponse contains the response from method LoadBalancersClient.Delete. -type LoadBalancersClientDeleteResponse struct { - // placeholder for future response values -} - -// LoadBalancersClientGetResponse contains the response from method LoadBalancersClient.Get. -type LoadBalancersClientGetResponse struct { - LoadBalancer -} - -// LoadBalancersClientListAllResponse contains the response from method LoadBalancersClient.ListAll. -type LoadBalancersClientListAllResponse struct { - LoadBalancerListResult -} - -// LoadBalancersClientListInboundNatRulePortMappingsResponse contains the response from method LoadBalancersClient.ListInboundNatRulePortMappings. -type LoadBalancersClientListInboundNatRulePortMappingsResponse struct { - BackendAddressInboundNatRulePortMappings -} - -// LoadBalancersClientListResponse contains the response from method LoadBalancersClient.List. -type LoadBalancersClientListResponse struct { - LoadBalancerListResult -} - -// LoadBalancersClientSwapPublicIPAddressesResponse contains the response from method LoadBalancersClient.SwapPublicIPAddresses. -type LoadBalancersClientSwapPublicIPAddressesResponse struct { - // placeholder for future response values -} - -// LoadBalancersClientUpdateTagsResponse contains the response from method LoadBalancersClient.UpdateTags. -type LoadBalancersClientUpdateTagsResponse struct { - LoadBalancer -} - -// LocalNetworkGatewaysClientCreateOrUpdateResponse contains the response from method LocalNetworkGatewaysClient.CreateOrUpdate. -type LocalNetworkGatewaysClientCreateOrUpdateResponse struct { - LocalNetworkGateway -} - -// LocalNetworkGatewaysClientDeleteResponse contains the response from method LocalNetworkGatewaysClient.Delete. -type LocalNetworkGatewaysClientDeleteResponse struct { - // placeholder for future response values -} - -// LocalNetworkGatewaysClientGetResponse contains the response from method LocalNetworkGatewaysClient.Get. -type LocalNetworkGatewaysClientGetResponse struct { - LocalNetworkGateway -} - -// LocalNetworkGatewaysClientListResponse contains the response from method LocalNetworkGatewaysClient.List. -type LocalNetworkGatewaysClientListResponse struct { - LocalNetworkGatewayListResult -} - -// LocalNetworkGatewaysClientUpdateTagsResponse contains the response from method LocalNetworkGatewaysClient.UpdateTags. -type LocalNetworkGatewaysClientUpdateTagsResponse struct { - LocalNetworkGateway -} - -// ManagementClientCheckDNSNameAvailabilityResponse contains the response from method ManagementClient.CheckDNSNameAvailability. -type ManagementClientCheckDNSNameAvailabilityResponse struct { - DNSNameAvailabilityResult -} - -// ManagementClientDeleteBastionShareableLinkResponse contains the response from method ManagementClient.DeleteBastionShareableLink. -type ManagementClientDeleteBastionShareableLinkResponse struct { - // placeholder for future response values -} - -// ManagementClientDisconnectActiveSessionsResponse contains the response from method ManagementClient.DisconnectActiveSessions. -type ManagementClientDisconnectActiveSessionsResponse struct { - BastionSessionDeleteResult -} - -// ManagementClientExpressRouteProviderPortResponse contains the response from method ManagementClient.ExpressRouteProviderPort. -type ManagementClientExpressRouteProviderPortResponse struct { - ExpressRouteProviderPort -} - -// ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse contains the response from method ManagementClient.Generatevirtualwanvpnserverconfigurationvpnprofile. -type ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse struct { - VPNProfileResponse -} - -// ManagementClientGetActiveSessionsResponse contains the response from method ManagementClient.GetActiveSessions. -type ManagementClientGetActiveSessionsResponse struct { - BastionActiveSessionListResult -} - -// ManagementClientGetBastionShareableLinkResponse contains the response from method ManagementClient.GetBastionShareableLink. -type ManagementClientGetBastionShareableLinkResponse struct { - BastionShareableLinkListResult -} - -// ManagementClientListActiveConnectivityConfigurationsResponse contains the response from method ManagementClient.ListActiveConnectivityConfigurations. -type ManagementClientListActiveConnectivityConfigurationsResponse struct { - ActiveConnectivityConfigurationsListResult -} - -// ManagementClientListActiveSecurityAdminRulesResponse contains the response from method ManagementClient.ListActiveSecurityAdminRules. -type ManagementClientListActiveSecurityAdminRulesResponse struct { - ActiveSecurityAdminRulesListResult -} - -// ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse contains the response from method ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations. -type ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse struct { - ManagerEffectiveConnectivityConfigurationListResult -} - -// ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse contains the response from method ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules. -type ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse struct { - ManagerEffectiveSecurityAdminRulesListResult -} - -// ManagementClientPutBastionShareableLinkResponse contains the response from method ManagementClient.PutBastionShareableLink. -type ManagementClientPutBastionShareableLinkResponse struct { - BastionShareableLinkListResult -} - -// ManagementClientSupportedSecurityProvidersResponse contains the response from method ManagementClient.SupportedSecurityProviders. -type ManagementClientSupportedSecurityProvidersResponse struct { - VirtualWanSecurityProviders -} - -// ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate. -type ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse struct { - ManagerConnection -} - -// ManagementGroupNetworkManagerConnectionsClientDeleteResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.Delete. -type ManagementGroupNetworkManagerConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// ManagementGroupNetworkManagerConnectionsClientGetResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.Get. -type ManagementGroupNetworkManagerConnectionsClientGetResponse struct { - ManagerConnection -} - -// ManagementGroupNetworkManagerConnectionsClientListResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.List. -type ManagementGroupNetworkManagerConnectionsClientListResponse struct { - ManagerConnectionListResult -} - -// ManagerCommitsClientPostResponse contains the response from method ManagerCommitsClient.Post. -type ManagerCommitsClientPostResponse struct { - ManagerCommit -} - -// ManagerDeploymentStatusClientListResponse contains the response from method ManagerDeploymentStatusClient.List. -type ManagerDeploymentStatusClientListResponse struct { - ManagerDeploymentStatusListResult -} - -// ManagersClientCreateOrUpdateResponse contains the response from method ManagersClient.CreateOrUpdate. -type ManagersClientCreateOrUpdateResponse struct { - Manager -} - -// ManagersClientDeleteResponse contains the response from method ManagersClient.Delete. -type ManagersClientDeleteResponse struct { - // placeholder for future response values -} - -// ManagersClientGetResponse contains the response from method ManagersClient.Get. -type ManagersClientGetResponse struct { - Manager -} - -// ManagersClientListBySubscriptionResponse contains the response from method ManagersClient.ListBySubscription. -type ManagersClientListBySubscriptionResponse struct { - ManagerListResult -} - -// ManagersClientListResponse contains the response from method ManagersClient.List. -type ManagersClientListResponse struct { - ManagerListResult -} - -// ManagersClientPatchResponse contains the response from method ManagersClient.Patch. -type ManagersClientPatchResponse struct { - Manager -} - -// NatGatewaysClientCreateOrUpdateResponse contains the response from method NatGatewaysClient.CreateOrUpdate. -type NatGatewaysClientCreateOrUpdateResponse struct { - NatGateway -} - -// NatGatewaysClientDeleteResponse contains the response from method NatGatewaysClient.Delete. -type NatGatewaysClientDeleteResponse struct { - // placeholder for future response values -} - -// NatGatewaysClientGetResponse contains the response from method NatGatewaysClient.Get. -type NatGatewaysClientGetResponse struct { - NatGateway -} - -// NatGatewaysClientListAllResponse contains the response from method NatGatewaysClient.ListAll. -type NatGatewaysClientListAllResponse struct { - NatGatewayListResult -} - -// NatGatewaysClientListResponse contains the response from method NatGatewaysClient.List. -type NatGatewaysClientListResponse struct { - NatGatewayListResult -} - -// NatGatewaysClientUpdateTagsResponse contains the response from method NatGatewaysClient.UpdateTags. -type NatGatewaysClientUpdateTagsResponse struct { - NatGateway -} - -// NatRulesClientCreateOrUpdateResponse contains the response from method NatRulesClient.CreateOrUpdate. -type NatRulesClientCreateOrUpdateResponse struct { - VPNGatewayNatRule -} - -// NatRulesClientDeleteResponse contains the response from method NatRulesClient.Delete. -type NatRulesClientDeleteResponse struct { - // placeholder for future response values -} - -// NatRulesClientGetResponse contains the response from method NatRulesClient.Get. -type NatRulesClientGetResponse struct { - VPNGatewayNatRule -} - -// NatRulesClientListByVPNGatewayResponse contains the response from method NatRulesClient.ListByVPNGateway. -type NatRulesClientListByVPNGatewayResponse struct { - ListVPNGatewayNatRulesResult -} - -// OperationsClientListResponse contains the response from method OperationsClient.List. -type OperationsClientListResponse struct { - OperationListResult -} - -// P2SVPNGatewaysClientCreateOrUpdateResponse contains the response from method P2SVPNGatewaysClient.CreateOrUpdate. -type P2SVPNGatewaysClientCreateOrUpdateResponse struct { - P2SVPNGateway -} - -// P2SVPNGatewaysClientDeleteResponse contains the response from method P2SVPNGatewaysClient.Delete. -type P2SVPNGatewaysClientDeleteResponse struct { - // placeholder for future response values -} - -// P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse contains the response from method P2SVPNGatewaysClient.DisconnectP2SVPNConnections. -type P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse struct { - // placeholder for future response values -} - -// P2SVPNGatewaysClientGenerateVPNProfileResponse contains the response from method P2SVPNGatewaysClient.GenerateVPNProfile. -type P2SVPNGatewaysClientGenerateVPNProfileResponse struct { - VPNProfileResponse -} - -// P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse contains the response from method P2SVPNGatewaysClient.GetP2SVPNConnectionHealthDetailed. -type P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse struct { - P2SVPNConnectionHealth -} - -// P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse contains the response from method P2SVPNGatewaysClient.GetP2SVPNConnectionHealth. -type P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse struct { - P2SVPNGateway -} - -// P2SVPNGatewaysClientGetResponse contains the response from method P2SVPNGatewaysClient.Get. -type P2SVPNGatewaysClientGetResponse struct { - P2SVPNGateway -} - -// P2SVPNGatewaysClientListByResourceGroupResponse contains the response from method P2SVPNGatewaysClient.ListByResourceGroup. -type P2SVPNGatewaysClientListByResourceGroupResponse struct { - ListP2SVPNGatewaysResult -} - -// P2SVPNGatewaysClientListResponse contains the response from method P2SVPNGatewaysClient.List. -type P2SVPNGatewaysClientListResponse struct { - ListP2SVPNGatewaysResult -} - -// P2SVPNGatewaysClientResetResponse contains the response from method P2SVPNGatewaysClient.Reset. -type P2SVPNGatewaysClientResetResponse struct { - P2SVPNGateway -} - -// P2SVPNGatewaysClientUpdateTagsResponse contains the response from method P2SVPNGatewaysClient.UpdateTags. -type P2SVPNGatewaysClientUpdateTagsResponse struct { - P2SVPNGateway -} - -// PacketCapturesClientCreateResponse contains the response from method PacketCapturesClient.Create. -type PacketCapturesClientCreateResponse struct { - PacketCaptureResult -} - -// PacketCapturesClientDeleteResponse contains the response from method PacketCapturesClient.Delete. -type PacketCapturesClientDeleteResponse struct { - // placeholder for future response values -} - -// PacketCapturesClientGetResponse contains the response from method PacketCapturesClient.Get. -type PacketCapturesClientGetResponse struct { - PacketCaptureResult -} - -// PacketCapturesClientGetStatusResponse contains the response from method PacketCapturesClient.GetStatus. -type PacketCapturesClientGetStatusResponse struct { - PacketCaptureQueryStatusResult -} - -// PacketCapturesClientListResponse contains the response from method PacketCapturesClient.List. -type PacketCapturesClientListResponse struct { - PacketCaptureListResult -} - -// PacketCapturesClientStopResponse contains the response from method PacketCapturesClient.Stop. -type PacketCapturesClientStopResponse struct { - // placeholder for future response values -} - -// PeerExpressRouteCircuitConnectionsClientGetResponse contains the response from method PeerExpressRouteCircuitConnectionsClient.Get. -type PeerExpressRouteCircuitConnectionsClientGetResponse struct { - PeerExpressRouteCircuitConnection -} - -// PeerExpressRouteCircuitConnectionsClientListResponse contains the response from method PeerExpressRouteCircuitConnectionsClient.List. -type PeerExpressRouteCircuitConnectionsClientListResponse struct { - PeerExpressRouteCircuitConnectionListResult -} - -// PrivateDNSZoneGroupsClientCreateOrUpdateResponse contains the response from method PrivateDNSZoneGroupsClient.CreateOrUpdate. -type PrivateDNSZoneGroupsClientCreateOrUpdateResponse struct { - PrivateDNSZoneGroup -} - -// PrivateDNSZoneGroupsClientDeleteResponse contains the response from method PrivateDNSZoneGroupsClient.Delete. -type PrivateDNSZoneGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// PrivateDNSZoneGroupsClientGetResponse contains the response from method PrivateDNSZoneGroupsClient.Get. -type PrivateDNSZoneGroupsClientGetResponse struct { - PrivateDNSZoneGroup -} - -// PrivateDNSZoneGroupsClientListResponse contains the response from method PrivateDNSZoneGroupsClient.List. -type PrivateDNSZoneGroupsClientListResponse struct { - PrivateDNSZoneGroupListResult -} - -// PrivateEndpointsClientCreateOrUpdateResponse contains the response from method PrivateEndpointsClient.CreateOrUpdate. -type PrivateEndpointsClientCreateOrUpdateResponse struct { - PrivateEndpoint -} - -// PrivateEndpointsClientDeleteResponse contains the response from method PrivateEndpointsClient.Delete. -type PrivateEndpointsClientDeleteResponse struct { - // placeholder for future response values -} - -// PrivateEndpointsClientGetResponse contains the response from method PrivateEndpointsClient.Get. -type PrivateEndpointsClientGetResponse struct { - PrivateEndpoint -} - -// PrivateEndpointsClientListBySubscriptionResponse contains the response from method PrivateEndpointsClient.ListBySubscription. -type PrivateEndpointsClientListBySubscriptionResponse struct { - PrivateEndpointListResult -} - -// PrivateEndpointsClientListResponse contains the response from method PrivateEndpointsClient.List. -type PrivateEndpointsClientListResponse struct { - PrivateEndpointListResult -} - -// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse contains the response from method PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup. -type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse struct { - PrivateLinkServiceVisibility -} - -// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse contains the response from method PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility. -type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse struct { - PrivateLinkServiceVisibility -} - -// PrivateLinkServicesClientCreateOrUpdateResponse contains the response from method PrivateLinkServicesClient.CreateOrUpdate. -type PrivateLinkServicesClientCreateOrUpdateResponse struct { - PrivateLinkService -} - -// PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.DeletePrivateEndpointConnection. -type PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse struct { - // placeholder for future response values -} - -// PrivateLinkServicesClientDeleteResponse contains the response from method PrivateLinkServicesClient.Delete. -type PrivateLinkServicesClientDeleteResponse struct { - // placeholder for future response values -} - -// PrivateLinkServicesClientGetPrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.GetPrivateEndpointConnection. -type PrivateLinkServicesClientGetPrivateEndpointConnectionResponse struct { - PrivateEndpointConnection -} - -// PrivateLinkServicesClientGetResponse contains the response from method PrivateLinkServicesClient.Get. -type PrivateLinkServicesClientGetResponse struct { - PrivateLinkService -} - -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse contains the response from method PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup. -type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse struct { - AutoApprovedPrivateLinkServicesResult -} - -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse contains the response from method PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices. -type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse struct { - AutoApprovedPrivateLinkServicesResult -} - -// PrivateLinkServicesClientListBySubscriptionResponse contains the response from method PrivateLinkServicesClient.ListBySubscription. -type PrivateLinkServicesClientListBySubscriptionResponse struct { - PrivateLinkServiceListResult -} - -// PrivateLinkServicesClientListPrivateEndpointConnectionsResponse contains the response from method PrivateLinkServicesClient.ListPrivateEndpointConnections. -type PrivateLinkServicesClientListPrivateEndpointConnectionsResponse struct { - PrivateEndpointConnectionListResult -} - -// PrivateLinkServicesClientListResponse contains the response from method PrivateLinkServicesClient.List. -type PrivateLinkServicesClientListResponse struct { - PrivateLinkServiceListResult -} - -// PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.UpdatePrivateEndpointConnection. -type PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse struct { - PrivateEndpointConnection -} - -// ProfilesClientCreateOrUpdateResponse contains the response from method ProfilesClient.CreateOrUpdate. -type ProfilesClientCreateOrUpdateResponse struct { - Profile -} - -// ProfilesClientDeleteResponse contains the response from method ProfilesClient.Delete. -type ProfilesClientDeleteResponse struct { - // placeholder for future response values -} - -// ProfilesClientGetResponse contains the response from method ProfilesClient.Get. -type ProfilesClientGetResponse struct { - Profile -} - -// ProfilesClientListAllResponse contains the response from method ProfilesClient.ListAll. -type ProfilesClientListAllResponse struct { - ProfileListResult -} - -// ProfilesClientListResponse contains the response from method ProfilesClient.List. -type ProfilesClientListResponse struct { - ProfileListResult -} - -// ProfilesClientUpdateTagsResponse contains the response from method ProfilesClient.UpdateTags. -type ProfilesClientUpdateTagsResponse struct { - Profile -} - -// PublicIPAddressesClientCreateOrUpdateResponse contains the response from method PublicIPAddressesClient.CreateOrUpdate. -type PublicIPAddressesClientCreateOrUpdateResponse struct { - PublicIPAddress -} - -// PublicIPAddressesClientDeleteResponse contains the response from method PublicIPAddressesClient.Delete. -type PublicIPAddressesClientDeleteResponse struct { - // placeholder for future response values -} - -// PublicIPAddressesClientGetCloudServicePublicIPAddressResponse contains the response from method PublicIPAddressesClient.GetCloudServicePublicIPAddress. -type PublicIPAddressesClientGetCloudServicePublicIPAddressResponse struct { - PublicIPAddress -} - -// PublicIPAddressesClientGetResponse contains the response from method PublicIPAddressesClient.Get. -type PublicIPAddressesClientGetResponse struct { - PublicIPAddress -} - -// PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse contains the response from method PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress. -type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse struct { - PublicIPAddress -} - -// PublicIPAddressesClientListAllResponse contains the response from method PublicIPAddressesClient.ListAll. -type PublicIPAddressesClientListAllResponse struct { - PublicIPAddressListResult -} - -// PublicIPAddressesClientListCloudServicePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListCloudServicePublicIPAddresses. -type PublicIPAddressesClientListCloudServicePublicIPAddressesResponse struct { - PublicIPAddressListResult -} - -// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses. -type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse struct { - PublicIPAddressListResult -} - -// PublicIPAddressesClientListResponse contains the response from method PublicIPAddressesClient.List. -type PublicIPAddressesClientListResponse struct { - PublicIPAddressListResult -} - -// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses. -type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse struct { - PublicIPAddressListResult -} - -// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses. -type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse struct { - PublicIPAddressListResult -} - -// PublicIPAddressesClientUpdateTagsResponse contains the response from method PublicIPAddressesClient.UpdateTags. -type PublicIPAddressesClientUpdateTagsResponse struct { - PublicIPAddress -} - -// PublicIPPrefixesClientCreateOrUpdateResponse contains the response from method PublicIPPrefixesClient.CreateOrUpdate. -type PublicIPPrefixesClientCreateOrUpdateResponse struct { - PublicIPPrefix -} - -// PublicIPPrefixesClientDeleteResponse contains the response from method PublicIPPrefixesClient.Delete. -type PublicIPPrefixesClientDeleteResponse struct { - // placeholder for future response values -} - -// PublicIPPrefixesClientGetResponse contains the response from method PublicIPPrefixesClient.Get. -type PublicIPPrefixesClientGetResponse struct { - PublicIPPrefix -} - -// PublicIPPrefixesClientListAllResponse contains the response from method PublicIPPrefixesClient.ListAll. -type PublicIPPrefixesClientListAllResponse struct { - PublicIPPrefixListResult -} - -// PublicIPPrefixesClientListResponse contains the response from method PublicIPPrefixesClient.List. -type PublicIPPrefixesClientListResponse struct { - PublicIPPrefixListResult -} - -// PublicIPPrefixesClientUpdateTagsResponse contains the response from method PublicIPPrefixesClient.UpdateTags. -type PublicIPPrefixesClientUpdateTagsResponse struct { - PublicIPPrefix -} - -// ResourceNavigationLinksClientListResponse contains the response from method ResourceNavigationLinksClient.List. -type ResourceNavigationLinksClientListResponse struct { - ResourceNavigationLinksListResult -} - -// RouteFilterRulesClientCreateOrUpdateResponse contains the response from method RouteFilterRulesClient.CreateOrUpdate. -type RouteFilterRulesClientCreateOrUpdateResponse struct { - RouteFilterRule -} - -// RouteFilterRulesClientDeleteResponse contains the response from method RouteFilterRulesClient.Delete. -type RouteFilterRulesClientDeleteResponse struct { - // placeholder for future response values -} - -// RouteFilterRulesClientGetResponse contains the response from method RouteFilterRulesClient.Get. -type RouteFilterRulesClientGetResponse struct { - RouteFilterRule -} - -// RouteFilterRulesClientListByRouteFilterResponse contains the response from method RouteFilterRulesClient.ListByRouteFilter. -type RouteFilterRulesClientListByRouteFilterResponse struct { - RouteFilterRuleListResult -} - -// RouteFiltersClientCreateOrUpdateResponse contains the response from method RouteFiltersClient.CreateOrUpdate. -type RouteFiltersClientCreateOrUpdateResponse struct { - RouteFilter -} - -// RouteFiltersClientDeleteResponse contains the response from method RouteFiltersClient.Delete. -type RouteFiltersClientDeleteResponse struct { - // placeholder for future response values -} - -// RouteFiltersClientGetResponse contains the response from method RouteFiltersClient.Get. -type RouteFiltersClientGetResponse struct { - RouteFilter -} - -// RouteFiltersClientListByResourceGroupResponse contains the response from method RouteFiltersClient.ListByResourceGroup. -type RouteFiltersClientListByResourceGroupResponse struct { - RouteFilterListResult -} - -// RouteFiltersClientListResponse contains the response from method RouteFiltersClient.List. -type RouteFiltersClientListResponse struct { - RouteFilterListResult -} - -// RouteFiltersClientUpdateTagsResponse contains the response from method RouteFiltersClient.UpdateTags. -type RouteFiltersClientUpdateTagsResponse struct { - RouteFilter -} - -// RouteTablesClientCreateOrUpdateResponse contains the response from method RouteTablesClient.CreateOrUpdate. -type RouteTablesClientCreateOrUpdateResponse struct { - RouteTable -} - -// RouteTablesClientDeleteResponse contains the response from method RouteTablesClient.Delete. -type RouteTablesClientDeleteResponse struct { - // placeholder for future response values -} - -// RouteTablesClientGetResponse contains the response from method RouteTablesClient.Get. -type RouteTablesClientGetResponse struct { - RouteTable -} - -// RouteTablesClientListAllResponse contains the response from method RouteTablesClient.ListAll. -type RouteTablesClientListAllResponse struct { - RouteTableListResult -} - -// RouteTablesClientListResponse contains the response from method RouteTablesClient.List. -type RouteTablesClientListResponse struct { - RouteTableListResult -} - -// RouteTablesClientUpdateTagsResponse contains the response from method RouteTablesClient.UpdateTags. -type RouteTablesClientUpdateTagsResponse struct { - RouteTable -} - -// RoutesClientCreateOrUpdateResponse contains the response from method RoutesClient.CreateOrUpdate. -type RoutesClientCreateOrUpdateResponse struct { - Route -} - -// RoutesClientDeleteResponse contains the response from method RoutesClient.Delete. -type RoutesClientDeleteResponse struct { - // placeholder for future response values -} - -// RoutesClientGetResponse contains the response from method RoutesClient.Get. -type RoutesClientGetResponse struct { - Route -} - -// RoutesClientListResponse contains the response from method RoutesClient.List. -type RoutesClientListResponse struct { - RouteListResult -} - -// RoutingIntentClientCreateOrUpdateResponse contains the response from method RoutingIntentClient.CreateOrUpdate. -type RoutingIntentClientCreateOrUpdateResponse struct { - RoutingIntent -} - -// RoutingIntentClientDeleteResponse contains the response from method RoutingIntentClient.Delete. -type RoutingIntentClientDeleteResponse struct { - // placeholder for future response values -} - -// RoutingIntentClientGetResponse contains the response from method RoutingIntentClient.Get. -type RoutingIntentClientGetResponse struct { - RoutingIntent -} - -// RoutingIntentClientListResponse contains the response from method RoutingIntentClient.List. -type RoutingIntentClientListResponse struct { - ListRoutingIntentResult -} - -// ScopeConnectionsClientCreateOrUpdateResponse contains the response from method ScopeConnectionsClient.CreateOrUpdate. -type ScopeConnectionsClientCreateOrUpdateResponse struct { - ScopeConnection -} - -// ScopeConnectionsClientDeleteResponse contains the response from method ScopeConnectionsClient.Delete. -type ScopeConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// ScopeConnectionsClientGetResponse contains the response from method ScopeConnectionsClient.Get. -type ScopeConnectionsClientGetResponse struct { - ScopeConnection -} - -// ScopeConnectionsClientListResponse contains the response from method ScopeConnectionsClient.List. -type ScopeConnectionsClientListResponse struct { - ScopeConnectionListResult -} - -// SecurityAdminConfigurationsClientCreateOrUpdateResponse contains the response from method SecurityAdminConfigurationsClient.CreateOrUpdate. -type SecurityAdminConfigurationsClientCreateOrUpdateResponse struct { - SecurityAdminConfiguration -} - -// SecurityAdminConfigurationsClientDeleteResponse contains the response from method SecurityAdminConfigurationsClient.Delete. -type SecurityAdminConfigurationsClientDeleteResponse struct { - // placeholder for future response values -} - -// SecurityAdminConfigurationsClientGetResponse contains the response from method SecurityAdminConfigurationsClient.Get. -type SecurityAdminConfigurationsClientGetResponse struct { - SecurityAdminConfiguration -} - -// SecurityAdminConfigurationsClientListResponse contains the response from method SecurityAdminConfigurationsClient.List. -type SecurityAdminConfigurationsClientListResponse struct { - SecurityAdminConfigurationListResult -} - -// SecurityGroupsClientCreateOrUpdateResponse contains the response from method SecurityGroupsClient.CreateOrUpdate. -type SecurityGroupsClientCreateOrUpdateResponse struct { - SecurityGroup -} - -// SecurityGroupsClientDeleteResponse contains the response from method SecurityGroupsClient.Delete. -type SecurityGroupsClientDeleteResponse struct { - // placeholder for future response values -} - -// SecurityGroupsClientGetResponse contains the response from method SecurityGroupsClient.Get. -type SecurityGroupsClientGetResponse struct { - SecurityGroup -} - -// SecurityGroupsClientListAllResponse contains the response from method SecurityGroupsClient.ListAll. -type SecurityGroupsClientListAllResponse struct { - SecurityGroupListResult -} - -// SecurityGroupsClientListResponse contains the response from method SecurityGroupsClient.List. -type SecurityGroupsClientListResponse struct { - SecurityGroupListResult -} - -// SecurityGroupsClientUpdateTagsResponse contains the response from method SecurityGroupsClient.UpdateTags. -type SecurityGroupsClientUpdateTagsResponse struct { - SecurityGroup -} - -// SecurityPartnerProvidersClientCreateOrUpdateResponse contains the response from method SecurityPartnerProvidersClient.CreateOrUpdate. -type SecurityPartnerProvidersClientCreateOrUpdateResponse struct { - SecurityPartnerProvider -} - -// SecurityPartnerProvidersClientDeleteResponse contains the response from method SecurityPartnerProvidersClient.Delete. -type SecurityPartnerProvidersClientDeleteResponse struct { - // placeholder for future response values -} - -// SecurityPartnerProvidersClientGetResponse contains the response from method SecurityPartnerProvidersClient.Get. -type SecurityPartnerProvidersClientGetResponse struct { - SecurityPartnerProvider -} - -// SecurityPartnerProvidersClientListByResourceGroupResponse contains the response from method SecurityPartnerProvidersClient.ListByResourceGroup. -type SecurityPartnerProvidersClientListByResourceGroupResponse struct { - SecurityPartnerProviderListResult -} - -// SecurityPartnerProvidersClientListResponse contains the response from method SecurityPartnerProvidersClient.List. -type SecurityPartnerProvidersClientListResponse struct { - SecurityPartnerProviderListResult -} - -// SecurityPartnerProvidersClientUpdateTagsResponse contains the response from method SecurityPartnerProvidersClient.UpdateTags. -type SecurityPartnerProvidersClientUpdateTagsResponse struct { - SecurityPartnerProvider -} - -// SecurityRulesClientCreateOrUpdateResponse contains the response from method SecurityRulesClient.CreateOrUpdate. -type SecurityRulesClientCreateOrUpdateResponse struct { - SecurityRule -} - -// SecurityRulesClientDeleteResponse contains the response from method SecurityRulesClient.Delete. -type SecurityRulesClientDeleteResponse struct { - // placeholder for future response values -} - -// SecurityRulesClientGetResponse contains the response from method SecurityRulesClient.Get. -type SecurityRulesClientGetResponse struct { - SecurityRule -} - -// SecurityRulesClientListResponse contains the response from method SecurityRulesClient.List. -type SecurityRulesClientListResponse struct { - SecurityRuleListResult -} - -// ServiceAssociationLinksClientListResponse contains the response from method ServiceAssociationLinksClient.List. -type ServiceAssociationLinksClientListResponse struct { - ServiceAssociationLinksListResult -} - -// ServiceEndpointPoliciesClientCreateOrUpdateResponse contains the response from method ServiceEndpointPoliciesClient.CreateOrUpdate. -type ServiceEndpointPoliciesClientCreateOrUpdateResponse struct { - ServiceEndpointPolicy -} - -// ServiceEndpointPoliciesClientDeleteResponse contains the response from method ServiceEndpointPoliciesClient.Delete. -type ServiceEndpointPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// ServiceEndpointPoliciesClientGetResponse contains the response from method ServiceEndpointPoliciesClient.Get. -type ServiceEndpointPoliciesClientGetResponse struct { - ServiceEndpointPolicy -} - -// ServiceEndpointPoliciesClientListByResourceGroupResponse contains the response from method ServiceEndpointPoliciesClient.ListByResourceGroup. -type ServiceEndpointPoliciesClientListByResourceGroupResponse struct { - ServiceEndpointPolicyListResult -} - -// ServiceEndpointPoliciesClientListResponse contains the response from method ServiceEndpointPoliciesClient.List. -type ServiceEndpointPoliciesClientListResponse struct { - ServiceEndpointPolicyListResult -} - -// ServiceEndpointPoliciesClientUpdateTagsResponse contains the response from method ServiceEndpointPoliciesClient.UpdateTags. -type ServiceEndpointPoliciesClientUpdateTagsResponse struct { - ServiceEndpointPolicy -} - -// ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate. -type ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse struct { - ServiceEndpointPolicyDefinition -} - -// ServiceEndpointPolicyDefinitionsClientDeleteResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.Delete. -type ServiceEndpointPolicyDefinitionsClientDeleteResponse struct { - // placeholder for future response values -} - -// ServiceEndpointPolicyDefinitionsClientGetResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.Get. -type ServiceEndpointPolicyDefinitionsClientGetResponse struct { - ServiceEndpointPolicyDefinition -} - -// ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup. -type ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse struct { - ServiceEndpointPolicyDefinitionListResult -} - -// ServiceTagInformationClientListResponse contains the response from method ServiceTagInformationClient.List. -type ServiceTagInformationClientListResponse struct { - ServiceTagInformationListResult -} - -// ServiceTagsClientListResponse contains the response from method ServiceTagsClient.List. -type ServiceTagsClientListResponse struct { - ServiceTagsListResult -} - -// StaticMembersClientCreateOrUpdateResponse contains the response from method StaticMembersClient.CreateOrUpdate. -type StaticMembersClientCreateOrUpdateResponse struct { - StaticMember -} - -// StaticMembersClientDeleteResponse contains the response from method StaticMembersClient.Delete. -type StaticMembersClientDeleteResponse struct { - // placeholder for future response values -} - -// StaticMembersClientGetResponse contains the response from method StaticMembersClient.Get. -type StaticMembersClientGetResponse struct { - StaticMember -} - -// StaticMembersClientListResponse contains the response from method StaticMembersClient.List. -type StaticMembersClientListResponse struct { - StaticMemberListResult -} - -// SubnetsClientCreateOrUpdateResponse contains the response from method SubnetsClient.CreateOrUpdate. -type SubnetsClientCreateOrUpdateResponse struct { - Subnet -} - -// SubnetsClientDeleteResponse contains the response from method SubnetsClient.Delete. -type SubnetsClientDeleteResponse struct { - // placeholder for future response values -} - -// SubnetsClientGetResponse contains the response from method SubnetsClient.Get. -type SubnetsClientGetResponse struct { - Subnet -} - -// SubnetsClientListResponse contains the response from method SubnetsClient.List. -type SubnetsClientListResponse struct { - SubnetListResult -} - -// SubnetsClientPrepareNetworkPoliciesResponse contains the response from method SubnetsClient.PrepareNetworkPolicies. -type SubnetsClientPrepareNetworkPoliciesResponse struct { - // placeholder for future response values -} - -// SubnetsClientUnprepareNetworkPoliciesResponse contains the response from method SubnetsClient.UnprepareNetworkPolicies. -type SubnetsClientUnprepareNetworkPoliciesResponse struct { - // placeholder for future response values -} - -// SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate. -type SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse struct { - ManagerConnection -} - -// SubscriptionNetworkManagerConnectionsClientDeleteResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.Delete. -type SubscriptionNetworkManagerConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// SubscriptionNetworkManagerConnectionsClientGetResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.Get. -type SubscriptionNetworkManagerConnectionsClientGetResponse struct { - ManagerConnection -} - -// SubscriptionNetworkManagerConnectionsClientListResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.List. -type SubscriptionNetworkManagerConnectionsClientListResponse struct { - ManagerConnectionListResult -} - -// UsagesClientListResponse contains the response from method UsagesClient.List. -type UsagesClientListResponse struct { - UsagesListResult -} - -// VPNConnectionsClientCreateOrUpdateResponse contains the response from method VPNConnectionsClient.CreateOrUpdate. -type VPNConnectionsClientCreateOrUpdateResponse struct { - VPNConnection -} - -// VPNConnectionsClientDeleteResponse contains the response from method VPNConnectionsClient.Delete. -type VPNConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// VPNConnectionsClientGetResponse contains the response from method VPNConnectionsClient.Get. -type VPNConnectionsClientGetResponse struct { - VPNConnection -} - -// VPNConnectionsClientListByVPNGatewayResponse contains the response from method VPNConnectionsClient.ListByVPNGateway. -type VPNConnectionsClientListByVPNGatewayResponse struct { - ListVPNConnectionsResult -} - -// VPNConnectionsClientStartPacketCaptureResponse contains the response from method VPNConnectionsClient.StartPacketCapture. -type VPNConnectionsClientStartPacketCaptureResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionsClientStartPacketCaptureResponse. -func (v *VPNConnectionsClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VPNConnectionsClientStopPacketCaptureResponse contains the response from method VPNConnectionsClient.StopPacketCapture. -type VPNConnectionsClientStopPacketCaptureResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionsClientStopPacketCaptureResponse. -func (v *VPNConnectionsClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VPNGatewaysClientCreateOrUpdateResponse contains the response from method VPNGatewaysClient.CreateOrUpdate. -type VPNGatewaysClientCreateOrUpdateResponse struct { - VPNGateway -} - -// VPNGatewaysClientDeleteResponse contains the response from method VPNGatewaysClient.Delete. -type VPNGatewaysClientDeleteResponse struct { - // placeholder for future response values -} - -// VPNGatewaysClientGetResponse contains the response from method VPNGatewaysClient.Get. -type VPNGatewaysClientGetResponse struct { - VPNGateway -} - -// VPNGatewaysClientListByResourceGroupResponse contains the response from method VPNGatewaysClient.ListByResourceGroup. -type VPNGatewaysClientListByResourceGroupResponse struct { - ListVPNGatewaysResult -} - -// VPNGatewaysClientListResponse contains the response from method VPNGatewaysClient.List. -type VPNGatewaysClientListResponse struct { - ListVPNGatewaysResult -} - -// VPNGatewaysClientResetResponse contains the response from method VPNGatewaysClient.Reset. -type VPNGatewaysClientResetResponse struct { - VPNGateway -} - -// VPNGatewaysClientStartPacketCaptureResponse contains the response from method VPNGatewaysClient.StartPacketCapture. -type VPNGatewaysClientStartPacketCaptureResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewaysClientStartPacketCaptureResponse. -func (v *VPNGatewaysClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VPNGatewaysClientStopPacketCaptureResponse contains the response from method VPNGatewaysClient.StopPacketCapture. -type VPNGatewaysClientStopPacketCaptureResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewaysClientStopPacketCaptureResponse. -func (v *VPNGatewaysClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VPNGatewaysClientUpdateTagsResponse contains the response from method VPNGatewaysClient.UpdateTags. -type VPNGatewaysClientUpdateTagsResponse struct { - VPNGateway -} - -// VPNLinkConnectionsClientGetIkeSasResponse contains the response from method VPNLinkConnectionsClient.GetIkeSas. -type VPNLinkConnectionsClientGetIkeSasResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VPNLinkConnectionsClientGetIkeSasResponse. -func (v *VPNLinkConnectionsClientGetIkeSasResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VPNLinkConnectionsClientListByVPNConnectionResponse contains the response from method VPNLinkConnectionsClient.ListByVPNConnection. -type VPNLinkConnectionsClientListByVPNConnectionResponse struct { - ListVPNSiteLinkConnectionsResult -} - -// VPNLinkConnectionsClientResetConnectionResponse contains the response from method VPNLinkConnectionsClient.ResetConnection. -type VPNLinkConnectionsClientResetConnectionResponse struct { - // placeholder for future response values -} - -// VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse contains the response from method VPNServerConfigurationsAssociatedWithVirtualWanClient.List. -type VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse struct { - VPNServerConfigurationsResponse -} - -// VPNServerConfigurationsClientCreateOrUpdateResponse contains the response from method VPNServerConfigurationsClient.CreateOrUpdate. -type VPNServerConfigurationsClientCreateOrUpdateResponse struct { - VPNServerConfiguration -} - -// VPNServerConfigurationsClientDeleteResponse contains the response from method VPNServerConfigurationsClient.Delete. -type VPNServerConfigurationsClientDeleteResponse struct { - // placeholder for future response values -} - -// VPNServerConfigurationsClientGetResponse contains the response from method VPNServerConfigurationsClient.Get. -type VPNServerConfigurationsClientGetResponse struct { - VPNServerConfiguration -} - -// VPNServerConfigurationsClientListByResourceGroupResponse contains the response from method VPNServerConfigurationsClient.ListByResourceGroup. -type VPNServerConfigurationsClientListByResourceGroupResponse struct { - ListVPNServerConfigurationsResult -} - -// VPNServerConfigurationsClientListResponse contains the response from method VPNServerConfigurationsClient.List. -type VPNServerConfigurationsClientListResponse struct { - ListVPNServerConfigurationsResult -} - -// VPNServerConfigurationsClientUpdateTagsResponse contains the response from method VPNServerConfigurationsClient.UpdateTags. -type VPNServerConfigurationsClientUpdateTagsResponse struct { - VPNServerConfiguration -} - -// VPNSiteLinkConnectionsClientGetResponse contains the response from method VPNSiteLinkConnectionsClient.Get. -type VPNSiteLinkConnectionsClientGetResponse struct { - VPNSiteLinkConnection -} - -// VPNSiteLinksClientGetResponse contains the response from method VPNSiteLinksClient.Get. -type VPNSiteLinksClientGetResponse struct { - VPNSiteLink -} - -// VPNSiteLinksClientListByVPNSiteResponse contains the response from method VPNSiteLinksClient.ListByVPNSite. -type VPNSiteLinksClientListByVPNSiteResponse struct { - ListVPNSiteLinksResult -} - -// VPNSitesClientCreateOrUpdateResponse contains the response from method VPNSitesClient.CreateOrUpdate. -type VPNSitesClientCreateOrUpdateResponse struct { - VPNSite -} - -// VPNSitesClientDeleteResponse contains the response from method VPNSitesClient.Delete. -type VPNSitesClientDeleteResponse struct { - // placeholder for future response values -} - -// VPNSitesClientGetResponse contains the response from method VPNSitesClient.Get. -type VPNSitesClientGetResponse struct { - VPNSite -} - -// VPNSitesClientListByResourceGroupResponse contains the response from method VPNSitesClient.ListByResourceGroup. -type VPNSitesClientListByResourceGroupResponse struct { - ListVPNSitesResult -} - -// VPNSitesClientListResponse contains the response from method VPNSitesClient.List. -type VPNSitesClientListResponse struct { - ListVPNSitesResult -} - -// VPNSitesClientUpdateTagsResponse contains the response from method VPNSitesClient.UpdateTags. -type VPNSitesClientUpdateTagsResponse struct { - VPNSite -} - -// VPNSitesConfigurationClientDownloadResponse contains the response from method VPNSitesConfigurationClient.Download. -type VPNSitesConfigurationClientDownloadResponse struct { - // placeholder for future response values -} - -// VirtualApplianceSKUsClientGetResponse contains the response from method VirtualApplianceSKUsClient.Get. -type VirtualApplianceSKUsClientGetResponse struct { - VirtualApplianceSKU -} - -// VirtualApplianceSKUsClientListResponse contains the response from method VirtualApplianceSKUsClient.List. -type VirtualApplianceSKUsClientListResponse struct { - VirtualApplianceSKUListResult -} - -// VirtualApplianceSitesClientCreateOrUpdateResponse contains the response from method VirtualApplianceSitesClient.CreateOrUpdate. -type VirtualApplianceSitesClientCreateOrUpdateResponse struct { - VirtualApplianceSite -} - -// VirtualApplianceSitesClientDeleteResponse contains the response from method VirtualApplianceSitesClient.Delete. -type VirtualApplianceSitesClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualApplianceSitesClientGetResponse contains the response from method VirtualApplianceSitesClient.Get. -type VirtualApplianceSitesClientGetResponse struct { - VirtualApplianceSite -} - -// VirtualApplianceSitesClientListResponse contains the response from method VirtualApplianceSitesClient.List. -type VirtualApplianceSitesClientListResponse struct { - VirtualApplianceSiteListResult -} - -// VirtualAppliancesClientCreateOrUpdateResponse contains the response from method VirtualAppliancesClient.CreateOrUpdate. -type VirtualAppliancesClientCreateOrUpdateResponse struct { - VirtualAppliance -} - -// VirtualAppliancesClientDeleteResponse contains the response from method VirtualAppliancesClient.Delete. -type VirtualAppliancesClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualAppliancesClientGetResponse contains the response from method VirtualAppliancesClient.Get. -type VirtualAppliancesClientGetResponse struct { - VirtualAppliance -} - -// VirtualAppliancesClientListByResourceGroupResponse contains the response from method VirtualAppliancesClient.ListByResourceGroup. -type VirtualAppliancesClientListByResourceGroupResponse struct { - VirtualApplianceListResult -} - -// VirtualAppliancesClientListResponse contains the response from method VirtualAppliancesClient.List. -type VirtualAppliancesClientListResponse struct { - VirtualApplianceListResult -} - -// VirtualAppliancesClientUpdateTagsResponse contains the response from method VirtualAppliancesClient.UpdateTags. -type VirtualAppliancesClientUpdateTagsResponse struct { - VirtualAppliance -} - -// VirtualHubBgpConnectionClientCreateOrUpdateResponse contains the response from method VirtualHubBgpConnectionClient.CreateOrUpdate. -type VirtualHubBgpConnectionClientCreateOrUpdateResponse struct { - BgpConnection -} - -// VirtualHubBgpConnectionClientDeleteResponse contains the response from method VirtualHubBgpConnectionClient.Delete. -type VirtualHubBgpConnectionClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualHubBgpConnectionClientGetResponse contains the response from method VirtualHubBgpConnectionClient.Get. -type VirtualHubBgpConnectionClientGetResponse struct { - BgpConnection -} - -// VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse contains the response from method VirtualHubBgpConnectionsClient.ListAdvertisedRoutes. -type VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse struct { - PeerRouteList -} - -// VirtualHubBgpConnectionsClientListLearnedRoutesResponse contains the response from method VirtualHubBgpConnectionsClient.ListLearnedRoutes. -type VirtualHubBgpConnectionsClientListLearnedRoutesResponse struct { - PeerRouteList -} - -// VirtualHubBgpConnectionsClientListResponse contains the response from method VirtualHubBgpConnectionsClient.List. -type VirtualHubBgpConnectionsClientListResponse struct { - ListVirtualHubBgpConnectionResults -} - -// VirtualHubIPConfigurationClientCreateOrUpdateResponse contains the response from method VirtualHubIPConfigurationClient.CreateOrUpdate. -type VirtualHubIPConfigurationClientCreateOrUpdateResponse struct { - HubIPConfiguration -} - -// VirtualHubIPConfigurationClientDeleteResponse contains the response from method VirtualHubIPConfigurationClient.Delete. -type VirtualHubIPConfigurationClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualHubIPConfigurationClientGetResponse contains the response from method VirtualHubIPConfigurationClient.Get. -type VirtualHubIPConfigurationClientGetResponse struct { - HubIPConfiguration -} - -// VirtualHubIPConfigurationClientListResponse contains the response from method VirtualHubIPConfigurationClient.List. -type VirtualHubIPConfigurationClientListResponse struct { - ListVirtualHubIPConfigurationResults -} - -// VirtualHubRouteTableV2SClientCreateOrUpdateResponse contains the response from method VirtualHubRouteTableV2SClient.CreateOrUpdate. -type VirtualHubRouteTableV2SClientCreateOrUpdateResponse struct { - VirtualHubRouteTableV2 -} - -// VirtualHubRouteTableV2SClientDeleteResponse contains the response from method VirtualHubRouteTableV2SClient.Delete. -type VirtualHubRouteTableV2SClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualHubRouteTableV2SClientGetResponse contains the response from method VirtualHubRouteTableV2SClient.Get. -type VirtualHubRouteTableV2SClientGetResponse struct { - VirtualHubRouteTableV2 -} - -// VirtualHubRouteTableV2SClientListResponse contains the response from method VirtualHubRouteTableV2SClient.List. -type VirtualHubRouteTableV2SClientListResponse struct { - ListVirtualHubRouteTableV2SResult -} - -// VirtualHubsClientCreateOrUpdateResponse contains the response from method VirtualHubsClient.CreateOrUpdate. -type VirtualHubsClientCreateOrUpdateResponse struct { - VirtualHub -} - -// VirtualHubsClientDeleteResponse contains the response from method VirtualHubsClient.Delete. -type VirtualHubsClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualHubsClientGetEffectiveVirtualHubRoutesResponse contains the response from method VirtualHubsClient.GetEffectiveVirtualHubRoutes. -type VirtualHubsClientGetEffectiveVirtualHubRoutesResponse struct { - // placeholder for future response values -} - -// VirtualHubsClientGetResponse contains the response from method VirtualHubsClient.Get. -type VirtualHubsClientGetResponse struct { - VirtualHub -} - -// VirtualHubsClientListByResourceGroupResponse contains the response from method VirtualHubsClient.ListByResourceGroup. -type VirtualHubsClientListByResourceGroupResponse struct { - ListVirtualHubsResult -} - -// VirtualHubsClientListResponse contains the response from method VirtualHubsClient.List. -type VirtualHubsClientListResponse struct { - ListVirtualHubsResult -} - -// VirtualHubsClientUpdateTagsResponse contains the response from method VirtualHubsClient.UpdateTags. -type VirtualHubsClientUpdateTagsResponse struct { - VirtualHub -} - -// VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayConnectionsClient.CreateOrUpdate. -type VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse struct { - VirtualNetworkGatewayConnection -} - -// VirtualNetworkGatewayConnectionsClientDeleteResponse contains the response from method VirtualNetworkGatewayConnectionsClient.Delete. -type VirtualNetworkGatewayConnectionsClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualNetworkGatewayConnectionsClientGetIkeSasResponse contains the response from method VirtualNetworkGatewayConnectionsClient.GetIkeSas. -type VirtualNetworkGatewayConnectionsClientGetIkeSasResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionsClientGetIkeSasResponse. -func (v *VirtualNetworkGatewayConnectionsClientGetIkeSasResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VirtualNetworkGatewayConnectionsClientGetResponse contains the response from method VirtualNetworkGatewayConnectionsClient.Get. -type VirtualNetworkGatewayConnectionsClientGetResponse struct { - VirtualNetworkGatewayConnection -} - -// VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.GetSharedKey. -type VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse struct { - ConnectionSharedKey -} - -// VirtualNetworkGatewayConnectionsClientListResponse contains the response from method VirtualNetworkGatewayConnectionsClient.List. -type VirtualNetworkGatewayConnectionsClientListResponse struct { - VirtualNetworkGatewayConnectionListResult -} - -// VirtualNetworkGatewayConnectionsClientResetConnectionResponse contains the response from method VirtualNetworkGatewayConnectionsClient.ResetConnection. -type VirtualNetworkGatewayConnectionsClientResetConnectionResponse struct { - // placeholder for future response values -} - -// VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.ResetSharedKey. -type VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse struct { - ConnectionResetSharedKey -} - -// VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.SetSharedKey. -type VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse struct { - ConnectionSharedKey -} - -// VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse contains the response from method VirtualNetworkGatewayConnectionsClient.StartPacketCapture. -type VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse. -func (v *VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse contains the response from method VirtualNetworkGatewayConnectionsClient.StopPacketCapture. -type VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse. -func (v *VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VirtualNetworkGatewayConnectionsClientUpdateTagsResponse contains the response from method VirtualNetworkGatewayConnectionsClient.UpdateTags. -type VirtualNetworkGatewayConnectionsClientUpdateTagsResponse struct { - VirtualNetworkGatewayConnection -} - -// VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayNatRulesClient.CreateOrUpdate. -type VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse struct { - VirtualNetworkGatewayNatRule -} - -// VirtualNetworkGatewayNatRulesClientDeleteResponse contains the response from method VirtualNetworkGatewayNatRulesClient.Delete. -type VirtualNetworkGatewayNatRulesClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualNetworkGatewayNatRulesClientGetResponse contains the response from method VirtualNetworkGatewayNatRulesClient.Get. -type VirtualNetworkGatewayNatRulesClientGetResponse struct { - VirtualNetworkGatewayNatRule -} - -// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse contains the response from method VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway. -type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse struct { - ListVirtualNetworkGatewayNatRulesResult -} - -// VirtualNetworkGatewaysClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewaysClient.CreateOrUpdate. -type VirtualNetworkGatewaysClientCreateOrUpdateResponse struct { - VirtualNetworkGateway -} - -// VirtualNetworkGatewaysClientDeleteResponse contains the response from method VirtualNetworkGatewaysClient.Delete. -type VirtualNetworkGatewaysClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.DisconnectVirtualNetworkGatewayVPNConnections. -type VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse struct { - // placeholder for future response values -} - -// VirtualNetworkGatewaysClientGenerateVPNProfileResponse contains the response from method VirtualNetworkGatewaysClient.GenerateVPNProfile. -type VirtualNetworkGatewaysClientGenerateVPNProfileResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGenerateVPNProfileResponse. -func (v *VirtualNetworkGatewaysClientGenerateVPNProfileResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse contains the response from method VirtualNetworkGatewaysClient.Generatevpnclientpackage. -type VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse. -func (v *VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.GetAdvertisedRoutes. -type VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse struct { - GatewayRouteListResult -} - -// VirtualNetworkGatewaysClientGetBgpPeerStatusResponse contains the response from method VirtualNetworkGatewaysClient.GetBgpPeerStatus. -type VirtualNetworkGatewaysClientGetBgpPeerStatusResponse struct { - BgpPeerStatusListResult -} - -// VirtualNetworkGatewaysClientGetLearnedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.GetLearnedRoutes. -type VirtualNetworkGatewaysClientGetLearnedRoutesResponse struct { - GatewayRouteListResult -} - -// VirtualNetworkGatewaysClientGetResponse contains the response from method VirtualNetworkGatewaysClient.Get. -type VirtualNetworkGatewaysClientGetResponse struct { - VirtualNetworkGateway -} - -// VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse contains the response from method VirtualNetworkGatewaysClient.GetVPNProfilePackageURL. -type VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse. -func (v *VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse contains the response from method VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth. -type VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse struct { - VPNClientConnectionHealthDetailListResult -} - -// VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.GetVpnclientIPSecParameters. -type VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse struct { - VPNClientIPsecParameters -} - -// VirtualNetworkGatewaysClientListConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.ListConnections. -type VirtualNetworkGatewaysClientListConnectionsResponse struct { - VirtualNetworkGatewayListConnectionsResult -} - -// VirtualNetworkGatewaysClientListResponse contains the response from method VirtualNetworkGatewaysClient.List. -type VirtualNetworkGatewaysClientListResponse struct { - VirtualNetworkGatewayListResult -} - -// VirtualNetworkGatewaysClientResetResponse contains the response from method VirtualNetworkGatewaysClient.Reset. -type VirtualNetworkGatewaysClientResetResponse struct { - VirtualNetworkGateway -} - -// VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse contains the response from method VirtualNetworkGatewaysClient.ResetVPNClientSharedKey. -type VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse struct { - // placeholder for future response values -} - -// VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.SetVpnclientIPSecParameters. -type VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse struct { - VPNClientIPsecParameters -} - -// VirtualNetworkGatewaysClientStartPacketCaptureResponse contains the response from method VirtualNetworkGatewaysClient.StartPacketCapture. -type VirtualNetworkGatewaysClientStartPacketCaptureResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientStartPacketCaptureResponse. -func (v *VirtualNetworkGatewaysClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VirtualNetworkGatewaysClientStopPacketCaptureResponse contains the response from method VirtualNetworkGatewaysClient.StopPacketCapture. -type VirtualNetworkGatewaysClientStopPacketCaptureResponse struct { - Value *string -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientStopPacketCaptureResponse. -func (v *VirtualNetworkGatewaysClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, &v.Value) -} - -// VirtualNetworkGatewaysClientSupportedVPNDevicesResponse contains the response from method VirtualNetworkGatewaysClient.SupportedVPNDevices. -type VirtualNetworkGatewaysClientSupportedVPNDevicesResponse struct { - Value *string -} - -// VirtualNetworkGatewaysClientUpdateTagsResponse contains the response from method VirtualNetworkGatewaysClient.UpdateTags. -type VirtualNetworkGatewaysClientUpdateTagsResponse struct { - VirtualNetworkGateway -} - -// VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse contains the response from method VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript. -type VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse struct { - Value *string -} - -// VirtualNetworkPeeringsClientCreateOrUpdateResponse contains the response from method VirtualNetworkPeeringsClient.CreateOrUpdate. -type VirtualNetworkPeeringsClientCreateOrUpdateResponse struct { - VirtualNetworkPeering -} - -// VirtualNetworkPeeringsClientDeleteResponse contains the response from method VirtualNetworkPeeringsClient.Delete. -type VirtualNetworkPeeringsClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualNetworkPeeringsClientGetResponse contains the response from method VirtualNetworkPeeringsClient.Get. -type VirtualNetworkPeeringsClientGetResponse struct { - VirtualNetworkPeering -} - -// VirtualNetworkPeeringsClientListResponse contains the response from method VirtualNetworkPeeringsClient.List. -type VirtualNetworkPeeringsClientListResponse struct { - VirtualNetworkPeeringListResult -} - -// VirtualNetworkTapsClientCreateOrUpdateResponse contains the response from method VirtualNetworkTapsClient.CreateOrUpdate. -type VirtualNetworkTapsClientCreateOrUpdateResponse struct { - VirtualNetworkTap -} - -// VirtualNetworkTapsClientDeleteResponse contains the response from method VirtualNetworkTapsClient.Delete. -type VirtualNetworkTapsClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualNetworkTapsClientGetResponse contains the response from method VirtualNetworkTapsClient.Get. -type VirtualNetworkTapsClientGetResponse struct { - VirtualNetworkTap -} - -// VirtualNetworkTapsClientListAllResponse contains the response from method VirtualNetworkTapsClient.ListAll. -type VirtualNetworkTapsClientListAllResponse struct { - VirtualNetworkTapListResult -} - -// VirtualNetworkTapsClientListByResourceGroupResponse contains the response from method VirtualNetworkTapsClient.ListByResourceGroup. -type VirtualNetworkTapsClientListByResourceGroupResponse struct { - VirtualNetworkTapListResult -} - -// VirtualNetworkTapsClientUpdateTagsResponse contains the response from method VirtualNetworkTapsClient.UpdateTags. -type VirtualNetworkTapsClientUpdateTagsResponse struct { - VirtualNetworkTap -} - -// VirtualNetworksClientCheckIPAddressAvailabilityResponse contains the response from method VirtualNetworksClient.CheckIPAddressAvailability. -type VirtualNetworksClientCheckIPAddressAvailabilityResponse struct { - IPAddressAvailabilityResult -} - -// VirtualNetworksClientCreateOrUpdateResponse contains the response from method VirtualNetworksClient.CreateOrUpdate. -type VirtualNetworksClientCreateOrUpdateResponse struct { - VirtualNetwork -} - -// VirtualNetworksClientDeleteResponse contains the response from method VirtualNetworksClient.Delete. -type VirtualNetworksClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualNetworksClientGetResponse contains the response from method VirtualNetworksClient.Get. -type VirtualNetworksClientGetResponse struct { - VirtualNetwork -} - -// VirtualNetworksClientListAllResponse contains the response from method VirtualNetworksClient.ListAll. -type VirtualNetworksClientListAllResponse struct { - VirtualNetworkListResult -} - -// VirtualNetworksClientListResponse contains the response from method VirtualNetworksClient.List. -type VirtualNetworksClientListResponse struct { - VirtualNetworkListResult -} - -// VirtualNetworksClientListUsageResponse contains the response from method VirtualNetworksClient.ListUsage. -type VirtualNetworksClientListUsageResponse struct { - VirtualNetworkListUsageResult -} - -// VirtualNetworksClientUpdateTagsResponse contains the response from method VirtualNetworksClient.UpdateTags. -type VirtualNetworksClientUpdateTagsResponse struct { - VirtualNetwork -} - -// VirtualRouterPeeringsClientCreateOrUpdateResponse contains the response from method VirtualRouterPeeringsClient.CreateOrUpdate. -type VirtualRouterPeeringsClientCreateOrUpdateResponse struct { - VirtualRouterPeering -} - -// VirtualRouterPeeringsClientDeleteResponse contains the response from method VirtualRouterPeeringsClient.Delete. -type VirtualRouterPeeringsClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualRouterPeeringsClientGetResponse contains the response from method VirtualRouterPeeringsClient.Get. -type VirtualRouterPeeringsClientGetResponse struct { - VirtualRouterPeering -} - -// VirtualRouterPeeringsClientListResponse contains the response from method VirtualRouterPeeringsClient.List. -type VirtualRouterPeeringsClientListResponse struct { - VirtualRouterPeeringListResult -} - -// VirtualRoutersClientCreateOrUpdateResponse contains the response from method VirtualRoutersClient.CreateOrUpdate. -type VirtualRoutersClientCreateOrUpdateResponse struct { - VirtualRouter -} - -// VirtualRoutersClientDeleteResponse contains the response from method VirtualRoutersClient.Delete. -type VirtualRoutersClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualRoutersClientGetResponse contains the response from method VirtualRoutersClient.Get. -type VirtualRoutersClientGetResponse struct { - VirtualRouter -} - -// VirtualRoutersClientListByResourceGroupResponse contains the response from method VirtualRoutersClient.ListByResourceGroup. -type VirtualRoutersClientListByResourceGroupResponse struct { - VirtualRouterListResult -} - -// VirtualRoutersClientListResponse contains the response from method VirtualRoutersClient.List. -type VirtualRoutersClientListResponse struct { - VirtualRouterListResult -} - -// VirtualWansClientCreateOrUpdateResponse contains the response from method VirtualWansClient.CreateOrUpdate. -type VirtualWansClientCreateOrUpdateResponse struct { - VirtualWAN -} - -// VirtualWansClientDeleteResponse contains the response from method VirtualWansClient.Delete. -type VirtualWansClientDeleteResponse struct { - // placeholder for future response values -} - -// VirtualWansClientGetResponse contains the response from method VirtualWansClient.Get. -type VirtualWansClientGetResponse struct { - VirtualWAN -} - -// VirtualWansClientListByResourceGroupResponse contains the response from method VirtualWansClient.ListByResourceGroup. -type VirtualWansClientListByResourceGroupResponse struct { - ListVirtualWANsResult -} - -// VirtualWansClientListResponse contains the response from method VirtualWansClient.List. -type VirtualWansClientListResponse struct { - ListVirtualWANsResult -} - -// VirtualWansClientUpdateTagsResponse contains the response from method VirtualWansClient.UpdateTags. -type VirtualWansClientUpdateTagsResponse struct { - VirtualWAN -} - -// WatchersClientCheckConnectivityResponse contains the response from method WatchersClient.CheckConnectivity. -type WatchersClientCheckConnectivityResponse struct { - ConnectivityInformation -} - -// WatchersClientCreateOrUpdateResponse contains the response from method WatchersClient.CreateOrUpdate. -type WatchersClientCreateOrUpdateResponse struct { - Watcher -} - -// WatchersClientDeleteResponse contains the response from method WatchersClient.Delete. -type WatchersClientDeleteResponse struct { - // placeholder for future response values -} - -// WatchersClientGetAzureReachabilityReportResponse contains the response from method WatchersClient.GetAzureReachabilityReport. -type WatchersClientGetAzureReachabilityReportResponse struct { - AzureReachabilityReport -} - -// WatchersClientGetFlowLogStatusResponse contains the response from method WatchersClient.GetFlowLogStatus. -type WatchersClientGetFlowLogStatusResponse struct { - FlowLogInformation -} - -// WatchersClientGetNetworkConfigurationDiagnosticResponse contains the response from method WatchersClient.GetNetworkConfigurationDiagnostic. -type WatchersClientGetNetworkConfigurationDiagnosticResponse struct { - ConfigurationDiagnosticResponse -} - -// WatchersClientGetNextHopResponse contains the response from method WatchersClient.GetNextHop. -type WatchersClientGetNextHopResponse struct { - NextHopResult -} - -// WatchersClientGetResponse contains the response from method WatchersClient.Get. -type WatchersClientGetResponse struct { - Watcher -} - -// WatchersClientGetTopologyResponse contains the response from method WatchersClient.GetTopology. -type WatchersClientGetTopologyResponse struct { - Topology -} - -// WatchersClientGetTroubleshootingResponse contains the response from method WatchersClient.GetTroubleshooting. -type WatchersClientGetTroubleshootingResponse struct { - TroubleshootingResult -} - -// WatchersClientGetTroubleshootingResultResponse contains the response from method WatchersClient.GetTroubleshootingResult. -type WatchersClientGetTroubleshootingResultResponse struct { - TroubleshootingResult -} - -// WatchersClientGetVMSecurityRulesResponse contains the response from method WatchersClient.GetVMSecurityRules. -type WatchersClientGetVMSecurityRulesResponse struct { - SecurityGroupViewResult -} - -// WatchersClientListAllResponse contains the response from method WatchersClient.ListAll. -type WatchersClientListAllResponse struct { - WatcherListResult -} - -// WatchersClientListAvailableProvidersResponse contains the response from method WatchersClient.ListAvailableProviders. -type WatchersClientListAvailableProvidersResponse struct { - AvailableProvidersList -} - -// WatchersClientListResponse contains the response from method WatchersClient.List. -type WatchersClientListResponse struct { - WatcherListResult -} - -// WatchersClientSetFlowLogConfigurationResponse contains the response from method WatchersClient.SetFlowLogConfiguration. -type WatchersClientSetFlowLogConfigurationResponse struct { - FlowLogInformation -} - -// WatchersClientUpdateTagsResponse contains the response from method WatchersClient.UpdateTags. -type WatchersClientUpdateTagsResponse struct { - Watcher -} - -// WatchersClientVerifyIPFlowResponse contains the response from method WatchersClient.VerifyIPFlow. -type WatchersClientVerifyIPFlowResponse struct { - VerificationIPFlowResult -} - -// WebApplicationFirewallPoliciesClientCreateOrUpdateResponse contains the response from method WebApplicationFirewallPoliciesClient.CreateOrUpdate. -type WebApplicationFirewallPoliciesClientCreateOrUpdateResponse struct { - WebApplicationFirewallPolicy -} - -// WebApplicationFirewallPoliciesClientDeleteResponse contains the response from method WebApplicationFirewallPoliciesClient.Delete. -type WebApplicationFirewallPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// WebApplicationFirewallPoliciesClientGetResponse contains the response from method WebApplicationFirewallPoliciesClient.Get. -type WebApplicationFirewallPoliciesClientGetResponse struct { - WebApplicationFirewallPolicy -} - -// WebApplicationFirewallPoliciesClientListAllResponse contains the response from method WebApplicationFirewallPoliciesClient.ListAll. -type WebApplicationFirewallPoliciesClientListAllResponse struct { - WebApplicationFirewallPolicyListResult -} - -// WebApplicationFirewallPoliciesClientListResponse contains the response from method WebApplicationFirewallPoliciesClient.List. -type WebApplicationFirewallPoliciesClientListResponse struct { - WebApplicationFirewallPolicyListResult -} - -// WebCategoriesClientGetResponse contains the response from method WebCategoriesClient.Get. -type WebCategoriesClientGetResponse struct { - AzureWebCategory -} - -// WebCategoriesClientListBySubscriptionResponse contains the response from method WebCategoriesClient.ListBySubscription. -type WebCategoriesClientListBySubscriptionResponse struct { - AzureWebCategoryListResult -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routefilterrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routefilterrules_client.go deleted file mode 100644 index 670948ab..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routefilterrules_client.go +++ /dev/null @@ -1,329 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RouteFilterRulesClient contains the methods for the RouteFilterRules group. -// Don't use this type directly, use NewRouteFilterRulesClient() instead. -type RouteFilterRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRouteFilterRulesClient creates a new instance of RouteFilterRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRouteFilterRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteFilterRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RouteFilterRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a route in the specified route filter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// ruleName - The name of the route filter rule. -// routeFilterRuleParameters - Parameters supplied to the create or update route filter rule operation. -// options - RouteFilterRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFilterRulesClient.BeginCreateOrUpdate -// method. -func (client *RouteFilterRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, options *RouteFilterRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteFilterRulesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RouteFilterRulesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[RouteFilterRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a route in the specified route filter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *RouteFilterRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, options *RouteFilterRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *RouteFilterRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, options *RouteFilterRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeFilterName == "" { - return nil, errors.New("parameter routeFilterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, routeFilterRuleParameters) -} - -// BeginDelete - Deletes the specified rule from a route filter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// ruleName - The name of the rule. -// options - RouteFilterRulesClientBeginDeleteOptions contains the optional parameters for the RouteFilterRulesClient.BeginDelete -// method. -func (client *RouteFilterRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientBeginDeleteOptions) (*runtime.Poller[RouteFilterRulesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, routeFilterName, ruleName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RouteFilterRulesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[RouteFilterRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified rule from a route filter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *RouteFilterRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeFilterName, ruleName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *RouteFilterRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeFilterName == "" { - return nil, errors.New("parameter routeFilterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified rule from a route filter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// ruleName - The name of the rule. -// options - RouteFilterRulesClientGetOptions contains the optional parameters for the RouteFilterRulesClient.Get method. -func (client *RouteFilterRulesClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientGetOptions) (RouteFilterRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, routeFilterName, ruleName, options) - if err != nil { - return RouteFilterRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RouteFilterRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteFilterRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *RouteFilterRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeFilterName == "" { - return nil, errors.New("parameter routeFilterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) - if ruleName == "" { - return nil, errors.New("parameter ruleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *RouteFilterRulesClient) getHandleResponse(resp *http.Response) (RouteFilterRulesClientGetResponse, error) { - result := RouteFilterRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterRule); err != nil { - return RouteFilterRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListByRouteFilterPager - Gets all RouteFilterRules in a route filter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// options - RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.ListByRouteFilter -// method. -func (client *RouteFilterRulesClient) NewListByRouteFilterPager(resourceGroupName string, routeFilterName string, options *RouteFilterRulesClientListByRouteFilterOptions) *runtime.Pager[RouteFilterRulesClientListByRouteFilterResponse] { - return runtime.NewPager(runtime.PagingHandler[RouteFilterRulesClientListByRouteFilterResponse]{ - More: func(page RouteFilterRulesClientListByRouteFilterResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RouteFilterRulesClientListByRouteFilterResponse) (RouteFilterRulesClientListByRouteFilterResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByRouteFilterCreateRequest(ctx, resourceGroupName, routeFilterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RouteFilterRulesClientListByRouteFilterResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RouteFilterRulesClientListByRouteFilterResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteFilterRulesClientListByRouteFilterResponse{}, runtime.NewResponseError(resp) - } - return client.listByRouteFilterHandleResponse(resp) - }, - }) -} - -// listByRouteFilterCreateRequest creates the ListByRouteFilter request. -func (client *RouteFilterRulesClient) listByRouteFilterCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFilterRulesClientListByRouteFilterOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeFilterName == "" { - return nil, errors.New("parameter routeFilterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByRouteFilterHandleResponse handles the ListByRouteFilter response. -func (client *RouteFilterRulesClient) listByRouteFilterHandleResponse(resp *http.Response) (RouteFilterRulesClientListByRouteFilterResponse, error) { - result := RouteFilterRulesClientListByRouteFilterResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterRuleListResult); err != nil { - return RouteFilterRulesClientListByRouteFilterResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routefilters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routefilters_client.go deleted file mode 100644 index 37537cfc..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routefilters_client.go +++ /dev/null @@ -1,428 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RouteFiltersClient contains the methods for the RouteFilters group. -// Don't use this type directly, use NewRouteFiltersClient() instead. -type RouteFiltersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRouteFiltersClient creates a new instance of RouteFiltersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRouteFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteFiltersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RouteFiltersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a route filter in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// routeFilterParameters - Parameters supplied to the create or update route filter operation. -// options - RouteFiltersClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFiltersClient.BeginCreateOrUpdate -// method. -func (client *RouteFiltersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, options *RouteFiltersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteFiltersClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, routeFilterName, routeFilterParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RouteFiltersClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[RouteFiltersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a route filter in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *RouteFiltersClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, options *RouteFiltersClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeFilterName, routeFilterParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *RouteFiltersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, options *RouteFiltersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeFilterName == "" { - return nil, errors.New("parameter routeFilterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, routeFilterParameters) -} - -// BeginDelete - Deletes the specified route filter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// options - RouteFiltersClientBeginDeleteOptions contains the optional parameters for the RouteFiltersClient.BeginDelete -// method. -func (client *RouteFiltersClient) BeginDelete(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientBeginDeleteOptions) (*runtime.Poller[RouteFiltersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, routeFilterName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RouteFiltersClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[RouteFiltersClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified route filter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *RouteFiltersClient) deleteOperation(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeFilterName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *RouteFiltersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeFilterName == "" { - return nil, errors.New("parameter routeFilterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified route filter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// options - RouteFiltersClientGetOptions contains the optional parameters for the RouteFiltersClient.Get method. -func (client *RouteFiltersClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientGetOptions) (RouteFiltersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, routeFilterName, options) - if err != nil { - return RouteFiltersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RouteFiltersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteFiltersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *RouteFiltersClient) getCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeFilterName == "" { - return nil, errors.New("parameter routeFilterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *RouteFiltersClient) getHandleResponse(resp *http.Response) (RouteFiltersClientGetResponse, error) { - result := RouteFiltersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilter); err != nil { - return RouteFiltersClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all route filters in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.List method. -func (client *RouteFiltersClient) NewListPager(options *RouteFiltersClientListOptions) *runtime.Pager[RouteFiltersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[RouteFiltersClientListResponse]{ - More: func(page RouteFiltersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RouteFiltersClientListResponse) (RouteFiltersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RouteFiltersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RouteFiltersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteFiltersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *RouteFiltersClient) listCreateRequest(ctx context.Context, options *RouteFiltersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *RouteFiltersClient) listHandleResponse(resp *http.Response) (RouteFiltersClientListResponse, error) { - result := RouteFiltersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterListResult); err != nil { - return RouteFiltersClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Gets all route filters in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.ListByResourceGroup -// method. -func (client *RouteFiltersClient) NewListByResourceGroupPager(resourceGroupName string, options *RouteFiltersClientListByResourceGroupOptions) *runtime.Pager[RouteFiltersClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[RouteFiltersClientListByResourceGroupResponse]{ - More: func(page RouteFiltersClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RouteFiltersClientListByResourceGroupResponse) (RouteFiltersClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RouteFiltersClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RouteFiltersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteFiltersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *RouteFiltersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *RouteFiltersClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *RouteFiltersClient) listByResourceGroupHandleResponse(resp *http.Response) (RouteFiltersClientListByResourceGroupResponse, error) { - result := RouteFiltersClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterListResult); err != nil { - return RouteFiltersClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates tags of a route filter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// parameters - Parameters supplied to update route filter tags. -// options - RouteFiltersClientUpdateTagsOptions contains the optional parameters for the RouteFiltersClient.UpdateTags method. -func (client *RouteFiltersClient) UpdateTags(ctx context.Context, resourceGroupName string, routeFilterName string, parameters TagsObject, options *RouteFiltersClientUpdateTagsOptions) (RouteFiltersClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, routeFilterName, parameters, options) - if err != nil { - return RouteFiltersClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RouteFiltersClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteFiltersClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *RouteFiltersClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, parameters TagsObject, options *RouteFiltersClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeFilterName == "" { - return nil, errors.New("parameter routeFilterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *RouteFiltersClient) updateTagsHandleResponse(resp *http.Response) (RouteFiltersClientUpdateTagsResponse, error) { - result := RouteFiltersClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilter); err != nil { - return RouteFiltersClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routes_client.go deleted file mode 100644 index ad016312..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routes_client.go +++ /dev/null @@ -1,327 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RoutesClient contains the methods for the Routes group. -// Don't use this type directly, use NewRoutesClient() instead. -type RoutesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRoutesClient creates a new instance of RoutesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RoutesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a route in the specified route table. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// routeName - The name of the route. -// routeParameters - Parameters supplied to the create or update route operation. -// options - RoutesClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutesClient.BeginCreateOrUpdate -// method. -func (client *RoutesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route, options *RoutesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RoutesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, routeTableName, routeName, routeParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RoutesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[RoutesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a route in the specified route table. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *RoutesClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route, options *RoutesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeTableName, routeName, routeParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *RoutesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route, options *RoutesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, routeParameters) -} - -// BeginDelete - Deletes the specified route from a route table. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// routeName - The name of the route. -// options - RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. -func (client *RoutesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientBeginDeleteOptions) (*runtime.Poller[RoutesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, routeTableName, routeName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RoutesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[RoutesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified route from a route table. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *RoutesClient) deleteOperation(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeTableName, routeName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *RoutesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified route from a route table. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// routeName - The name of the route. -// options - RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. -func (client *RoutesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientGetOptions) (RoutesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, routeTableName, routeName, options) - if err != nil { - return RoutesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RoutesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RoutesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *RoutesClient) getCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - if routeName == "" { - return nil, errors.New("parameter routeName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *RoutesClient) getHandleResponse(resp *http.Response) (RoutesClientGetResponse, error) { - result := RoutesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Route); err != nil { - return RoutesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all routes in a route table. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// options - RoutesClientListOptions contains the optional parameters for the RoutesClient.List method. -func (client *RoutesClient) NewListPager(resourceGroupName string, routeTableName string, options *RoutesClientListOptions) *runtime.Pager[RoutesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[RoutesClientListResponse]{ - More: func(page RoutesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RoutesClientListResponse) (RoutesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, routeTableName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RoutesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RoutesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RoutesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *RoutesClient) listCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, options *RoutesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *RoutesClient) listHandleResponse(resp *http.Response) (RoutesClientListResponse, error) { - result := RoutesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteListResult); err != nil { - return RoutesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routetables_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routetables_client.go deleted file mode 100644 index 39f00e61..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routetables_client.go +++ /dev/null @@ -1,426 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RouteTablesClient contains the methods for the RouteTables group. -// Don't use this type directly, use NewRouteTablesClient() instead. -type RouteTablesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRouteTablesClient creates a new instance of RouteTablesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteTablesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RouteTablesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or updates a route table in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// parameters - Parameters supplied to the create or update route table operation. -// options - RouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteTablesClient.BeginCreateOrUpdate -// method. -func (client *RouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable, options *RouteTablesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteTablesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, routeTableName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RouteTablesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[RouteTablesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or updates a route table in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *RouteTablesClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable, options *RouteTablesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeTableName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *RouteTablesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable, options *RouteTablesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified route table. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// options - RouteTablesClientBeginDeleteOptions contains the optional parameters for the RouteTablesClient.BeginDelete method. -func (client *RouteTablesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientBeginDeleteOptions) (*runtime.Poller[RouteTablesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, routeTableName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RouteTablesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[RouteTablesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified route table. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *RouteTablesClient) deleteOperation(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeTableName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *RouteTablesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified route table. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// options - RouteTablesClientGetOptions contains the optional parameters for the RouteTablesClient.Get method. -func (client *RouteTablesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientGetOptions) (RouteTablesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, routeTableName, options) - if err != nil { - return RouteTablesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RouteTablesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteTablesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *RouteTablesClient) getCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *RouteTablesClient) getHandleResponse(resp *http.Response) (RouteTablesClientGetResponse, error) { - result := RouteTablesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteTable); err != nil { - return RouteTablesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all route tables in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.List method. -func (client *RouteTablesClient) NewListPager(resourceGroupName string, options *RouteTablesClientListOptions) *runtime.Pager[RouteTablesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[RouteTablesClientListResponse]{ - More: func(page RouteTablesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RouteTablesClientListResponse) (RouteTablesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RouteTablesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RouteTablesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteTablesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *RouteTablesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *RouteTablesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *RouteTablesClient) listHandleResponse(resp *http.Response) (RouteTablesClientListResponse, error) { - result := RouteTablesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteTableListResult); err != nil { - return RouteTablesClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all route tables in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.ListAll method. -func (client *RouteTablesClient) NewListAllPager(options *RouteTablesClientListAllOptions) *runtime.Pager[RouteTablesClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[RouteTablesClientListAllResponse]{ - More: func(page RouteTablesClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RouteTablesClientListAllResponse) (RouteTablesClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RouteTablesClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RouteTablesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteTablesClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *RouteTablesClient) listAllCreateRequest(ctx context.Context, options *RouteTablesClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *RouteTablesClient) listAllHandleResponse(resp *http.Response) (RouteTablesClientListAllResponse, error) { - result := RouteTablesClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteTableListResult); err != nil { - return RouteTablesClientListAllResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates a route table tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// parameters - Parameters supplied to update route table tags. -// options - RouteTablesClientUpdateTagsOptions contains the optional parameters for the RouteTablesClient.UpdateTags method. -func (client *RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject, options *RouteTablesClientUpdateTagsOptions) (RouteTablesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, routeTableName, parameters, options) - if err != nil { - return RouteTablesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RouteTablesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RouteTablesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *RouteTablesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject, options *RouteTablesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *RouteTablesClient) updateTagsHandleResponse(resp *http.Response) (RouteTablesClientUpdateTagsResponse, error) { - result := RouteTablesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RouteTable); err != nil { - return RouteTablesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routingintent_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routingintent_client.go deleted file mode 100644 index 26ef049d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/routingintent_client.go +++ /dev/null @@ -1,328 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RoutingIntentClient contains the methods for the RoutingIntent group. -// Don't use this type directly, use NewRoutingIntentClient() instead. -type RoutingIntentClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRoutingIntentClient creates a new instance of RoutingIntentClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRoutingIntentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutingIntentClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RoutingIntentClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the RoutingIntent. -// virtualHubName - The name of the VirtualHub. -// routingIntentName - The name of the per VirtualHub singleton Routing Intent resource. -// routingIntentParameters - Parameters supplied to create or update RoutingIntent. -// options - RoutingIntentClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutingIntentClient.BeginCreateOrUpdate -// method. -func (client *RoutingIntentClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent, options *RoutingIntentClientBeginCreateOrUpdateOptions) (*runtime.Poller[RoutingIntentClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RoutingIntentClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[RoutingIntentClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *RoutingIntentClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent, options *RoutingIntentClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *RoutingIntentClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent, options *RoutingIntentClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if routingIntentName == "" { - return nil, errors.New("parameter routingIntentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routingIntentName}", url.PathEscape(routingIntentName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, routingIntentParameters) -} - -// BeginDelete - Deletes a RoutingIntent. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the RoutingIntent. -// virtualHubName - The name of the VirtualHub. -// routingIntentName - The name of the RoutingIntent. -// options - RoutingIntentClientBeginDeleteOptions contains the optional parameters for the RoutingIntentClient.BeginDelete -// method. -func (client *RoutingIntentClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientBeginDeleteOptions) (*runtime.Poller[RoutingIntentClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routingIntentName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RoutingIntentClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[RoutingIntentClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a RoutingIntent. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *RoutingIntentClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routingIntentName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *RoutingIntentClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if routingIntentName == "" { - return nil, errors.New("parameter routingIntentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routingIntentName}", url.PathEscape(routingIntentName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a RoutingIntent. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the RoutingIntent. -// virtualHubName - The name of the VirtualHub. -// routingIntentName - The name of the RoutingIntent. -// options - RoutingIntentClientGetOptions contains the optional parameters for the RoutingIntentClient.Get method. -func (client *RoutingIntentClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientGetOptions) (RoutingIntentClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routingIntentName, options) - if err != nil { - return RoutingIntentClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RoutingIntentClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RoutingIntentClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *RoutingIntentClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if routingIntentName == "" { - return nil, errors.New("parameter routingIntentName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routingIntentName}", url.PathEscape(routingIntentName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *RoutingIntentClient) getHandleResponse(resp *http.Response) (RoutingIntentClientGetResponse, error) { - result := RoutingIntentClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RoutingIntent); err != nil { - return RoutingIntentClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Retrieves the details of all RoutingIntent child resources of the VirtualHub. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.List method. -func (client *RoutingIntentClient) NewListPager(resourceGroupName string, virtualHubName string, options *RoutingIntentClientListOptions) *runtime.Pager[RoutingIntentClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[RoutingIntentClientListResponse]{ - More: func(page RoutingIntentClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RoutingIntentClientListResponse) (RoutingIntentClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RoutingIntentClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RoutingIntentClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RoutingIntentClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *RoutingIntentClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *RoutingIntentClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *RoutingIntentClient) listHandleResponse(resp *http.Response) (RoutingIntentClientListResponse, error) { - result := RoutingIntentClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListRoutingIntentResult); err != nil { - return RoutingIntentClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/scopeconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/scopeconnections_client.go deleted file mode 100644 index 84109e74..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/scopeconnections_client.go +++ /dev/null @@ -1,309 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// ScopeConnectionsClient contains the methods for the ScopeConnections group. -// Don't use this type directly, use NewScopeConnectionsClient() instead. -type ScopeConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewScopeConnectionsClient creates a new instance of ScopeConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewScopeConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ScopeConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates scope connection from Network Manager -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// scopeConnectionName - Name for the cross-tenant connection. -// parameters - Scope connection to be created/updated. -// options - ScopeConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ScopeConnectionsClient.CreateOrUpdate -// method. -func (client *ScopeConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, parameters ScopeConnection, options *ScopeConnectionsClientCreateOrUpdateOptions) (ScopeConnectionsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, scopeConnectionName, parameters, options) - if err != nil { - return ScopeConnectionsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScopeConnectionsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ScopeConnectionsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ScopeConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, parameters ScopeConnection, options *ScopeConnectionsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if scopeConnectionName == "" { - return nil, errors.New("parameter scopeConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeConnectionName}", url.PathEscape(scopeConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ScopeConnectionsClient) createOrUpdateHandleResponse(resp *http.Response) (ScopeConnectionsClientCreateOrUpdateResponse, error) { - result := ScopeConnectionsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScopeConnection); err != nil { - return ScopeConnectionsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete the pending scope connection created by this network manager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// scopeConnectionName - Name for the cross-tenant connection. -// options - ScopeConnectionsClientDeleteOptions contains the optional parameters for the ScopeConnectionsClient.Delete method. -func (client *ScopeConnectionsClient) Delete(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, options *ScopeConnectionsClientDeleteOptions) (ScopeConnectionsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, scopeConnectionName, options) - if err != nil { - return ScopeConnectionsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScopeConnectionsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ScopeConnectionsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ScopeConnectionsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ScopeConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, options *ScopeConnectionsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if scopeConnectionName == "" { - return nil, errors.New("parameter scopeConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeConnectionName}", url.PathEscape(scopeConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get specified scope connection created by this Network Manager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// scopeConnectionName - Name for the cross-tenant connection. -// options - ScopeConnectionsClientGetOptions contains the optional parameters for the ScopeConnectionsClient.Get method. -func (client *ScopeConnectionsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, options *ScopeConnectionsClientGetOptions) (ScopeConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, scopeConnectionName, options) - if err != nil { - return ScopeConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScopeConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScopeConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ScopeConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, options *ScopeConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if scopeConnectionName == "" { - return nil, errors.New("parameter scopeConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scopeConnectionName}", url.PathEscape(scopeConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ScopeConnectionsClient) getHandleResponse(resp *http.Response) (ScopeConnectionsClientGetResponse, error) { - result := ScopeConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScopeConnection); err != nil { - return ScopeConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all scope connections created by this network manager. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - ScopeConnectionsClientListOptions contains the optional parameters for the ScopeConnectionsClient.List method. -func (client *ScopeConnectionsClient) NewListPager(resourceGroupName string, networkManagerName string, options *ScopeConnectionsClientListOptions) *runtime.Pager[ScopeConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ScopeConnectionsClientListResponse]{ - More: func(page ScopeConnectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ScopeConnectionsClientListResponse) (ScopeConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ScopeConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ScopeConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ScopeConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ScopeConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *ScopeConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ScopeConnectionsClient) listHandleResponse(resp *http.Response) (ScopeConnectionsClientListResponse, error) { - result := ScopeConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScopeConnectionListResult); err != nil { - return ScopeConnectionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securityadminconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securityadminconfigurations_client.go deleted file mode 100644 index de20c46a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securityadminconfigurations_client.go +++ /dev/null @@ -1,332 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// SecurityAdminConfigurationsClient contains the methods for the SecurityAdminConfigurations group. -// Don't use this type directly, use NewSecurityAdminConfigurationsClient() instead. -type SecurityAdminConfigurationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSecurityAdminConfigurationsClient creates a new instance of SecurityAdminConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSecurityAdminConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityAdminConfigurationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SecurityAdminConfigurationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a network manager security admin configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// securityAdminConfiguration - The security admin configuration to create or update -// options - SecurityAdminConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the SecurityAdminConfigurationsClient.CreateOrUpdate -// method. -func (client *SecurityAdminConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, securityAdminConfiguration SecurityAdminConfiguration, options *SecurityAdminConfigurationsClientCreateOrUpdateOptions) (SecurityAdminConfigurationsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, securityAdminConfiguration, options) - if err != nil { - return SecurityAdminConfigurationsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityAdminConfigurationsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SecurityAdminConfigurationsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *SecurityAdminConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, securityAdminConfiguration SecurityAdminConfiguration, options *SecurityAdminConfigurationsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, securityAdminConfiguration) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *SecurityAdminConfigurationsClient) createOrUpdateHandleResponse(resp *http.Response) (SecurityAdminConfigurationsClientCreateOrUpdateResponse, error) { - result := SecurityAdminConfigurationsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityAdminConfiguration); err != nil { - return SecurityAdminConfigurationsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes a network manager security admin configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// options - SecurityAdminConfigurationsClientBeginDeleteOptions contains the optional parameters for the SecurityAdminConfigurationsClient.BeginDelete -// method. -func (client *SecurityAdminConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientBeginDeleteOptions) (*runtime.Poller[SecurityAdminConfigurationsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SecurityAdminConfigurationsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SecurityAdminConfigurationsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a network manager security admin configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SecurityAdminConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *SecurityAdminConfigurationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Force != nil { - reqQP.Set("force", strconv.FormatBool(*options.Force)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves a network manager security admin configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// options - SecurityAdminConfigurationsClientGetOptions contains the optional parameters for the SecurityAdminConfigurationsClient.Get -// method. -func (client *SecurityAdminConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientGetOptions) (SecurityAdminConfigurationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) - if err != nil { - return SecurityAdminConfigurationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityAdminConfigurationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityAdminConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SecurityAdminConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if configurationName == "" { - return nil, errors.New("parameter configurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SecurityAdminConfigurationsClient) getHandleResponse(resp *http.Response) (SecurityAdminConfigurationsClientGetResponse, error) { - result := SecurityAdminConfigurationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityAdminConfiguration); err != nil { - return SecurityAdminConfigurationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all the network manager security admin configurations in a network manager, in a paginated format. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - SecurityAdminConfigurationsClientListOptions contains the optional parameters for the SecurityAdminConfigurationsClient.List -// method. -func (client *SecurityAdminConfigurationsClient) NewListPager(resourceGroupName string, networkManagerName string, options *SecurityAdminConfigurationsClientListOptions) *runtime.Pager[SecurityAdminConfigurationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SecurityAdminConfigurationsClientListResponse]{ - More: func(page SecurityAdminConfigurationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SecurityAdminConfigurationsClientListResponse) (SecurityAdminConfigurationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecurityAdminConfigurationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityAdminConfigurationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityAdminConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SecurityAdminConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *SecurityAdminConfigurationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SecurityAdminConfigurationsClient) listHandleResponse(resp *http.Response) (SecurityAdminConfigurationsClientListResponse, error) { - result := SecurityAdminConfigurationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityAdminConfigurationListResult); err != nil { - return SecurityAdminConfigurationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securitygroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securitygroups_client.go deleted file mode 100644 index 8da5fdde..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securitygroups_client.go +++ /dev/null @@ -1,428 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SecurityGroupsClient contains the methods for the NetworkSecurityGroups group. -// Don't use this type directly, use NewSecurityGroupsClient() instead. -type SecurityGroupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSecurityGroupsClient creates a new instance of SecurityGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityGroupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SecurityGroupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a network security group in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// parameters - Parameters supplied to the create or update network security group operation. -// options - SecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityGroupsClient.BeginCreateOrUpdate -// method. -func (client *SecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, options *SecurityGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SecurityGroupsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SecurityGroupsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[SecurityGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a network security group in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SecurityGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, options *SecurityGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *SecurityGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, options *SecurityGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkSecurityGroupName == "" { - return nil, errors.New("parameter networkSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified network security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// options - SecurityGroupsClientBeginDeleteOptions contains the optional parameters for the SecurityGroupsClient.BeginDelete -// method. -func (client *SecurityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientBeginDeleteOptions) (*runtime.Poller[SecurityGroupsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkSecurityGroupName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SecurityGroupsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SecurityGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified network security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SecurityGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *SecurityGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkSecurityGroupName == "" { - return nil, errors.New("parameter networkSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified network security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// options - SecurityGroupsClientGetOptions contains the optional parameters for the SecurityGroupsClient.Get method. -func (client *SecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientGetOptions) (SecurityGroupsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) - if err != nil { - return SecurityGroupsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityGroupsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityGroupsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SecurityGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkSecurityGroupName == "" { - return nil, errors.New("parameter networkSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SecurityGroupsClient) getHandleResponse(resp *http.Response) (SecurityGroupsClientGetResponse, error) { - result := SecurityGroupsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroup); err != nil { - return SecurityGroupsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all network security groups in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.List method. -func (client *SecurityGroupsClient) NewListPager(resourceGroupName string, options *SecurityGroupsClientListOptions) *runtime.Pager[SecurityGroupsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SecurityGroupsClientListResponse]{ - More: func(page SecurityGroupsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SecurityGroupsClientListResponse) (SecurityGroupsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecurityGroupsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityGroupsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityGroupsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SecurityGroupsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *SecurityGroupsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SecurityGroupsClient) listHandleResponse(resp *http.Response) (SecurityGroupsClientListResponse, error) { - result := SecurityGroupsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroupListResult); err != nil { - return SecurityGroupsClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all network security groups in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.ListAll method. -func (client *SecurityGroupsClient) NewListAllPager(options *SecurityGroupsClientListAllOptions) *runtime.Pager[SecurityGroupsClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[SecurityGroupsClientListAllResponse]{ - More: func(page SecurityGroupsClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SecurityGroupsClientListAllResponse) (SecurityGroupsClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecurityGroupsClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityGroupsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityGroupsClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *SecurityGroupsClient) listAllCreateRequest(ctx context.Context, options *SecurityGroupsClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *SecurityGroupsClient) listAllHandleResponse(resp *http.Response) (SecurityGroupsClientListAllResponse, error) { - result := SecurityGroupsClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroupListResult); err != nil { - return SecurityGroupsClientListAllResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates a network security group tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// parameters - Parameters supplied to update network security group tags. -// options - SecurityGroupsClientUpdateTagsOptions contains the optional parameters for the SecurityGroupsClient.UpdateTags -// method. -func (client *SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject, options *SecurityGroupsClientUpdateTagsOptions) (SecurityGroupsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) - if err != nil { - return SecurityGroupsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityGroupsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityGroupsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *SecurityGroupsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject, options *SecurityGroupsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkSecurityGroupName == "" { - return nil, errors.New("parameter networkSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *SecurityGroupsClient) updateTagsHandleResponse(resp *http.Response) (SecurityGroupsClientUpdateTagsResponse, error) { - result := SecurityGroupsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroup); err != nil { - return SecurityGroupsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securitypartnerproviders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securitypartnerproviders_client.go deleted file mode 100644 index 98e55279..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securitypartnerproviders_client.go +++ /dev/null @@ -1,428 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SecurityPartnerProvidersClient contains the methods for the SecurityPartnerProviders group. -// Don't use this type directly, use NewSecurityPartnerProvidersClient() instead. -type SecurityPartnerProvidersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSecurityPartnerProvidersClient creates a new instance of SecurityPartnerProvidersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSecurityPartnerProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityPartnerProvidersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SecurityPartnerProvidersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified Security Partner Provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// securityPartnerProviderName - The name of the Security Partner Provider. -// parameters - Parameters supplied to the create or update Security Partner Provider operation. -// options - SecurityPartnerProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginCreateOrUpdate -// method. -func (client *SecurityPartnerProvidersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider, options *SecurityPartnerProvidersClientBeginCreateOrUpdateOptions) (*runtime.Poller[SecurityPartnerProvidersClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SecurityPartnerProvidersClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[SecurityPartnerProvidersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified Security Partner Provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SecurityPartnerProvidersClient) createOrUpdate(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider, options *SecurityPartnerProvidersClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *SecurityPartnerProvidersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider, options *SecurityPartnerProvidersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if securityPartnerProviderName == "" { - return nil, errors.New("parameter securityPartnerProviderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{securityPartnerProviderName}", url.PathEscape(securityPartnerProviderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified Security Partner Provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// securityPartnerProviderName - The name of the Security Partner Provider. -// options - SecurityPartnerProvidersClientBeginDeleteOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginDelete -// method. -func (client *SecurityPartnerProvidersClient) BeginDelete(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientBeginDeleteOptions) (*runtime.Poller[SecurityPartnerProvidersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, securityPartnerProviderName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SecurityPartnerProvidersClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SecurityPartnerProvidersClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified Security Partner Provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SecurityPartnerProvidersClient) deleteOperation(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *SecurityPartnerProvidersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if securityPartnerProviderName == "" { - return nil, errors.New("parameter securityPartnerProviderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{securityPartnerProviderName}", url.PathEscape(securityPartnerProviderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Security Partner Provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// securityPartnerProviderName - The name of the Security Partner Provider. -// options - SecurityPartnerProvidersClientGetOptions contains the optional parameters for the SecurityPartnerProvidersClient.Get -// method. -func (client *SecurityPartnerProvidersClient) Get(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientGetOptions) (SecurityPartnerProvidersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, options) - if err != nil { - return SecurityPartnerProvidersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityPartnerProvidersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityPartnerProvidersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SecurityPartnerProvidersClient) getCreateRequest(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if securityPartnerProviderName == "" { - return nil, errors.New("parameter securityPartnerProviderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{securityPartnerProviderName}", url.PathEscape(securityPartnerProviderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SecurityPartnerProvidersClient) getHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientGetResponse, error) { - result := SecurityPartnerProvidersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProvider); err != nil { - return SecurityPartnerProvidersClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the Security Partner Providers in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.List -// method. -func (client *SecurityPartnerProvidersClient) NewListPager(options *SecurityPartnerProvidersClientListOptions) *runtime.Pager[SecurityPartnerProvidersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SecurityPartnerProvidersClientListResponse]{ - More: func(page SecurityPartnerProvidersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SecurityPartnerProvidersClientListResponse) (SecurityPartnerProvidersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecurityPartnerProvidersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityPartnerProvidersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityPartnerProvidersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SecurityPartnerProvidersClient) listCreateRequest(ctx context.Context, options *SecurityPartnerProvidersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/securityPartnerProviders" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SecurityPartnerProvidersClient) listHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientListResponse, error) { - result := SecurityPartnerProvidersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProviderListResult); err != nil { - return SecurityPartnerProvidersClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all Security Partner Providers in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.ListByResourceGroup -// method. -func (client *SecurityPartnerProvidersClient) NewListByResourceGroupPager(resourceGroupName string, options *SecurityPartnerProvidersClientListByResourceGroupOptions) *runtime.Pager[SecurityPartnerProvidersClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[SecurityPartnerProvidersClientListByResourceGroupResponse]{ - More: func(page SecurityPartnerProvidersClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SecurityPartnerProvidersClientListByResourceGroupResponse) (SecurityPartnerProvidersClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecurityPartnerProvidersClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityPartnerProvidersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityPartnerProvidersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *SecurityPartnerProvidersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *SecurityPartnerProvidersClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *SecurityPartnerProvidersClient) listByResourceGroupHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientListByResourceGroupResponse, error) { - result := SecurityPartnerProvidersClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProviderListResult); err != nil { - return SecurityPartnerProvidersClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates tags of a Security Partner Provider resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// securityPartnerProviderName - The name of the Security Partner Provider. -// parameters - Parameters supplied to update Security Partner Provider tags. -// options - SecurityPartnerProvidersClientUpdateTagsOptions contains the optional parameters for the SecurityPartnerProvidersClient.UpdateTags -// method. -func (client *SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters TagsObject, options *SecurityPartnerProvidersClientUpdateTagsOptions) (SecurityPartnerProvidersClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) - if err != nil { - return SecurityPartnerProvidersClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityPartnerProvidersClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityPartnerProvidersClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *SecurityPartnerProvidersClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters TagsObject, options *SecurityPartnerProvidersClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if securityPartnerProviderName == "" { - return nil, errors.New("parameter securityPartnerProviderName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{securityPartnerProviderName}", url.PathEscape(securityPartnerProviderName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *SecurityPartnerProvidersClient) updateTagsHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientUpdateTagsResponse, error) { - result := SecurityPartnerProvidersClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProvider); err != nil { - return SecurityPartnerProvidersClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securityrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securityrules_client.go deleted file mode 100644 index d2bae13b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/securityrules_client.go +++ /dev/null @@ -1,328 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SecurityRulesClient contains the methods for the SecurityRules group. -// Don't use this type directly, use NewSecurityRulesClient() instead. -type SecurityRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSecurityRulesClient creates a new instance of SecurityRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SecurityRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a security rule in the specified network security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// securityRuleName - The name of the security rule. -// securityRuleParameters - Parameters supplied to the create or update network security rule operation. -// options - SecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityRulesClient.BeginCreateOrUpdate -// method. -func (client *SecurityRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, options *SecurityRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SecurityRulesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SecurityRulesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[SecurityRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a security rule in the specified network security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SecurityRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, options *SecurityRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *SecurityRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, options *SecurityRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkSecurityGroupName == "" { - return nil, errors.New("parameter networkSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) - if securityRuleName == "" { - return nil, errors.New("parameter securityRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{securityRuleName}", url.PathEscape(securityRuleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, securityRuleParameters) -} - -// BeginDelete - Deletes the specified network security rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// securityRuleName - The name of the security rule. -// options - SecurityRulesClientBeginDeleteOptions contains the optional parameters for the SecurityRulesClient.BeginDelete -// method. -func (client *SecurityRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientBeginDeleteOptions) (*runtime.Poller[SecurityRulesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SecurityRulesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SecurityRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified network security rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SecurityRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *SecurityRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkSecurityGroupName == "" { - return nil, errors.New("parameter networkSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) - if securityRuleName == "" { - return nil, errors.New("parameter securityRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{securityRuleName}", url.PathEscape(securityRuleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the specified network security rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// securityRuleName - The name of the security rule. -// options - SecurityRulesClientGetOptions contains the optional parameters for the SecurityRulesClient.Get method. -func (client *SecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientGetOptions) (SecurityRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) - if err != nil { - return SecurityRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SecurityRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkSecurityGroupName == "" { - return nil, errors.New("parameter networkSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) - if securityRuleName == "" { - return nil, errors.New("parameter securityRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{securityRuleName}", url.PathEscape(securityRuleName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SecurityRulesClient) getHandleResponse(resp *http.Response) (SecurityRulesClientGetResponse, error) { - result := SecurityRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRule); err != nil { - return SecurityRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all security rules in a network security group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// options - SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.List method. -func (client *SecurityRulesClient) NewListPager(resourceGroupName string, networkSecurityGroupName string, options *SecurityRulesClientListOptions) *runtime.Pager[SecurityRulesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SecurityRulesClientListResponse]{ - More: func(page SecurityRulesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SecurityRulesClientListResponse) (SecurityRulesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SecurityRulesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityRulesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityRulesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SecurityRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityRulesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkSecurityGroupName == "" { - return nil, errors.New("parameter networkSecurityGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SecurityRulesClient) listHandleResponse(resp *http.Response) (SecurityRulesClientListResponse, error) { - result := SecurityRulesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRuleListResult); err != nil { - return SecurityRulesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/serviceassociationlinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/serviceassociationlinks_client.go deleted file mode 100644 index e105d482..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/serviceassociationlinks_client.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ServiceAssociationLinksClient contains the methods for the ServiceAssociationLinks group. -// Don't use this type directly, use NewServiceAssociationLinksClient() instead. -type ServiceAssociationLinksClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewServiceAssociationLinksClient creates a new instance of ServiceAssociationLinksClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewServiceAssociationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceAssociationLinksClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ServiceAssociationLinksClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// List - Gets a list of service association links for a subnet. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// options - ServiceAssociationLinksClientListOptions contains the optional parameters for the ServiceAssociationLinksClient.List -// method. -func (client *ServiceAssociationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *ServiceAssociationLinksClientListOptions) (ServiceAssociationLinksClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) - if err != nil { - return ServiceAssociationLinksClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceAssociationLinksClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceAssociationLinksClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *ServiceAssociationLinksClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *ServiceAssociationLinksClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if subnetName == "" { - return nil, errors.New("parameter subnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ServiceAssociationLinksClient) listHandleResponse(resp *http.Response) (ServiceAssociationLinksClientListResponse, error) { - result := ServiceAssociationLinksClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceAssociationLinksListResult); err != nil { - return ServiceAssociationLinksClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/serviceendpointpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/serviceendpointpolicies_client.go deleted file mode 100644 index 2f5aa7a4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/serviceendpointpolicies_client.go +++ /dev/null @@ -1,431 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ServiceEndpointPoliciesClient contains the methods for the ServiceEndpointPolicies group. -// Don't use this type directly, use NewServiceEndpointPoliciesClient() instead. -type ServiceEndpointPoliciesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewServiceEndpointPoliciesClient creates a new instance of ServiceEndpointPoliciesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewServiceEndpointPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceEndpointPoliciesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ServiceEndpointPoliciesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a service Endpoint Policies. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy. -// parameters - Parameters supplied to the create or update service endpoint policy operation. -// options - ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginCreateOrUpdate -// method. -func (client *ServiceEndpointPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy, options *ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceEndpointPoliciesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServiceEndpointPoliciesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ServiceEndpointPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a service Endpoint Policies. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ServiceEndpointPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy, options *ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ServiceEndpointPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy, options *ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceEndpointPolicyName == "" { - return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified service endpoint policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy. -// options - ServiceEndpointPoliciesClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginDelete -// method. -func (client *ServiceEndpointPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientBeginDeleteOptions) (*runtime.Poller[ServiceEndpointPoliciesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceEndpointPolicyName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServiceEndpointPoliciesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ServiceEndpointPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified service endpoint policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ServiceEndpointPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ServiceEndpointPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceEndpointPolicyName == "" { - return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified service Endpoint Policies in a specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy. -// options - ServiceEndpointPoliciesClientGetOptions contains the optional parameters for the ServiceEndpointPoliciesClient.Get -// method. -func (client *ServiceEndpointPoliciesClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientGetOptions) (ServiceEndpointPoliciesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) - if err != nil { - return ServiceEndpointPoliciesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceEndpointPoliciesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceEndpointPoliciesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ServiceEndpointPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceEndpointPolicyName == "" { - return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ServiceEndpointPoliciesClient) getHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientGetResponse, error) { - result := ServiceEndpointPoliciesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicy); err != nil { - return ServiceEndpointPoliciesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the service endpoint policies in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.List -// method. -func (client *ServiceEndpointPoliciesClient) NewListPager(options *ServiceEndpointPoliciesClientListOptions) *runtime.Pager[ServiceEndpointPoliciesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ServiceEndpointPoliciesClientListResponse]{ - More: func(page ServiceEndpointPoliciesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ServiceEndpointPoliciesClientListResponse) (ServiceEndpointPoliciesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServiceEndpointPoliciesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceEndpointPoliciesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceEndpointPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ServiceEndpointPoliciesClient) listCreateRequest(ctx context.Context, options *ServiceEndpointPoliciesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ServiceEndpointPoliciesClient) listHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientListResponse, error) { - result := ServiceEndpointPoliciesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyListResult); err != nil { - return ServiceEndpointPoliciesClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Gets all service endpoint Policies in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.ListByResourceGroup -// method. -func (client *ServiceEndpointPoliciesClient) NewListByResourceGroupPager(resourceGroupName string, options *ServiceEndpointPoliciesClientListByResourceGroupOptions) *runtime.Pager[ServiceEndpointPoliciesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ServiceEndpointPoliciesClientListByResourceGroupResponse]{ - More: func(page ServiceEndpointPoliciesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ServiceEndpointPoliciesClientListByResourceGroupResponse) (ServiceEndpointPoliciesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ServiceEndpointPoliciesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ServiceEndpointPoliciesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ServiceEndpointPoliciesClient) listByResourceGroupHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientListByResourceGroupResponse, error) { - result := ServiceEndpointPoliciesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyListResult); err != nil { - return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates tags of a service endpoint policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy. -// parameters - Parameters supplied to update service endpoint policy tags. -// options - ServiceEndpointPoliciesClientUpdateTagsOptions contains the optional parameters for the ServiceEndpointPoliciesClient.UpdateTags -// method. -func (client *ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject, options *ServiceEndpointPoliciesClientUpdateTagsOptions) (ServiceEndpointPoliciesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) - if err != nil { - return ServiceEndpointPoliciesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceEndpointPoliciesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceEndpointPoliciesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *ServiceEndpointPoliciesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject, options *ServiceEndpointPoliciesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceEndpointPolicyName == "" { - return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *ServiceEndpointPoliciesClient) updateTagsHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientUpdateTagsResponse, error) { - result := ServiceEndpointPoliciesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicy); err != nil { - return ServiceEndpointPoliciesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/serviceendpointpolicydefinitions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/serviceendpointpolicydefinitions_client.go deleted file mode 100644 index e3ef3eee..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/serviceendpointpolicydefinitions_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ServiceEndpointPolicyDefinitionsClient contains the methods for the ServiceEndpointPolicyDefinitions group. -// Don't use this type directly, use NewServiceEndpointPolicyDefinitionsClient() instead. -type ServiceEndpointPolicyDefinitionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewServiceEndpointPolicyDefinitionsClient creates a new instance of ServiceEndpointPolicyDefinitionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceEndpointPolicyDefinitionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ServiceEndpointPolicyDefinitionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a service endpoint policy definition in the specified service endpoint policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy. -// serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition name. -// serviceEndpointPolicyDefinitions - Parameters supplied to the create or update service endpoint policy operation. -// options - ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate -// method. -func (client *ServiceEndpointPolicyDefinitionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition, options *ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a service endpoint policy definition in the specified service endpoint policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ServiceEndpointPolicyDefinitionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition, options *ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ServiceEndpointPolicyDefinitionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition, options *ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceEndpointPolicyName == "" { - return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) - if serviceEndpointPolicyDefinitionName == "" { - return nil, errors.New("parameter serviceEndpointPolicyDefinitionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyDefinitionName}", url.PathEscape(serviceEndpointPolicyDefinitionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, serviceEndpointPolicyDefinitions) -} - -// BeginDelete - Deletes the specified ServiceEndpoint policy definitions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the Service Endpoint Policy. -// serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition. -// options - ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginDelete -// method. -func (client *ServiceEndpointPolicyDefinitionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions) (*runtime.Poller[ServiceEndpointPolicyDefinitionsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ServiceEndpointPolicyDefinitionsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ServiceEndpointPolicyDefinitionsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified ServiceEndpoint policy definitions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *ServiceEndpointPolicyDefinitionsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ServiceEndpointPolicyDefinitionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceEndpointPolicyName == "" { - return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) - if serviceEndpointPolicyDefinitionName == "" { - return nil, errors.New("parameter serviceEndpointPolicyDefinitionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyDefinitionName}", url.PathEscape(serviceEndpointPolicyDefinitionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get the specified service endpoint policy definitions from service endpoint policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy name. -// serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition name. -// options - ServiceEndpointPolicyDefinitionsClientGetOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.Get -// method. -func (client *ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientGetOptions) (ServiceEndpointPolicyDefinitionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) - if err != nil { - return ServiceEndpointPolicyDefinitionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceEndpointPolicyDefinitionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceEndpointPolicyDefinitionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ServiceEndpointPolicyDefinitionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceEndpointPolicyName == "" { - return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) - if serviceEndpointPolicyDefinitionName == "" { - return nil, errors.New("parameter serviceEndpointPolicyDefinitionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyDefinitionName}", url.PathEscape(serviceEndpointPolicyDefinitionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ServiceEndpointPolicyDefinitionsClient) getHandleResponse(resp *http.Response) (ServiceEndpointPolicyDefinitionsClientGetResponse, error) { - result := ServiceEndpointPolicyDefinitionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyDefinition); err != nil { - return ServiceEndpointPolicyDefinitionsClientGetResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Gets all service endpoint policy definitions in a service end point policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy name. -// options - ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup -// method. -func (client *ServiceEndpointPolicyDefinitionsClient) NewListByResourceGroupPager(resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions) *runtime.Pager[ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse]{ - More: func(page ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse) (ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ServiceEndpointPolicyDefinitionsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if serviceEndpointPolicyName == "" { - return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ServiceEndpointPolicyDefinitionsClient) listByResourceGroupHandleResponse(resp *http.Response) (ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse, error) { - result := ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyDefinitionListResult); err != nil { - return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/servicetaginformation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/servicetaginformation_client.go deleted file mode 100644 index 7d999e79..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/servicetaginformation_client.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// ServiceTagInformationClient contains the methods for the ServiceTagInformation group. -// Don't use this type directly, use NewServiceTagInformationClient() instead. -type ServiceTagInformationClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewServiceTagInformationClient creates a new instance of ServiceTagInformationClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewServiceTagInformationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceTagInformationClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ServiceTagInformationClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Gets a list of service tag information resources with pagination. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location that will be used as a reference for cloud (not as a filter based on location, you will get the -// list of service tags with prefix details across all regions but limited to the cloud that -// your subscription belongs to). -// options - ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.List -// method. -func (client *ServiceTagInformationClient) NewListPager(location string, options *ServiceTagInformationClientListOptions) *runtime.Pager[ServiceTagInformationClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ServiceTagInformationClientListResponse]{ - More: func(page ServiceTagInformationClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ServiceTagInformationClientListResponse) (ServiceTagInformationClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ServiceTagInformationClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceTagInformationClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceTagInformationClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ServiceTagInformationClient) listCreateRequest(ctx context.Context, location string, options *ServiceTagInformationClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.NoAddressPrefixes != nil { - reqQP.Set("noAddressPrefixes", strconv.FormatBool(*options.NoAddressPrefixes)) - } - if options != nil && options.TagName != nil { - reqQP.Set("tagName", *options.TagName) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ServiceTagInformationClient) listHandleResponse(resp *http.Response) (ServiceTagInformationClientListResponse, error) { - result := ServiceTagInformationClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceTagInformationListResult); err != nil { - return ServiceTagInformationClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/servicetags_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/servicetags_client.go deleted file mode 100644 index ba2e48c5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/servicetags_client.go +++ /dev/null @@ -1,110 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ServiceTagsClient contains the methods for the ServiceTags group. -// Don't use this type directly, use NewServiceTagsClient() instead. -type ServiceTagsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewServiceTagsClient creates a new instance of ServiceTagsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewServiceTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceTagsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ServiceTagsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// List - Gets a list of service tag information resources. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location that will be used as a reference for version (not as a filter based on location, you will get the -// list of service tags with prefix details across all regions but limited to the cloud that -// your subscription belongs to). -// options - ServiceTagsClientListOptions contains the optional parameters for the ServiceTagsClient.List method. -func (client *ServiceTagsClient) List(ctx context.Context, location string, options *ServiceTagsClientListOptions) (ServiceTagsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, location, options) - if err != nil { - return ServiceTagsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ServiceTagsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ServiceTagsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *ServiceTagsClient) listCreateRequest(ctx context.Context, location string, options *ServiceTagsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ServiceTagsClient) listHandleResponse(resp *http.Response) (ServiceTagsClientListResponse, error) { - result := ServiceTagsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ServiceTagsListResult); err != nil { - return ServiceTagsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/staticmembers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/staticmembers_client.go deleted file mode 100644 index c3005ed7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/staticmembers_client.go +++ /dev/null @@ -1,329 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// StaticMembersClient contains the methods for the StaticMembers group. -// Don't use this type directly, use NewStaticMembersClient() instead. -type StaticMembersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewStaticMembersClient creates a new instance of StaticMembersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewStaticMembersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StaticMembersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &StaticMembersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a static member. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// staticMemberName - The name of the static member. -// parameters - Parameters supplied to the specify the static member to create -// options - StaticMembersClientCreateOrUpdateOptions contains the optional parameters for the StaticMembersClient.CreateOrUpdate -// method. -func (client *StaticMembersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, parameters StaticMember, options *StaticMembersClientCreateOrUpdateOptions) (StaticMembersClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, staticMemberName, parameters, options) - if err != nil { - return StaticMembersClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticMembersClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return StaticMembersClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *StaticMembersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, parameters StaticMember, options *StaticMembersClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if networkGroupName == "" { - return nil, errors.New("parameter networkGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) - if staticMemberName == "" { - return nil, errors.New("parameter staticMemberName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{staticMemberName}", url.PathEscape(staticMemberName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *StaticMembersClient) createOrUpdateHandleResponse(resp *http.Response) (StaticMembersClientCreateOrUpdateResponse, error) { - result := StaticMembersClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticMember); err != nil { - return StaticMembersClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes a static member. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// staticMemberName - The name of the static member. -// options - StaticMembersClientDeleteOptions contains the optional parameters for the StaticMembersClient.Delete method. -func (client *StaticMembersClient) Delete(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, options *StaticMembersClientDeleteOptions) (StaticMembersClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, staticMemberName, options) - if err != nil { - return StaticMembersClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticMembersClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticMembersClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return StaticMembersClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *StaticMembersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, options *StaticMembersClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if networkGroupName == "" { - return nil, errors.New("parameter networkGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) - if staticMemberName == "" { - return nil, errors.New("parameter staticMemberName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{staticMemberName}", url.PathEscape(staticMemberName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified static member. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// staticMemberName - The name of the static member. -// options - StaticMembersClientGetOptions contains the optional parameters for the StaticMembersClient.Get method. -func (client *StaticMembersClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, options *StaticMembersClientGetOptions) (StaticMembersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, staticMemberName, options) - if err != nil { - return StaticMembersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticMembersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticMembersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *StaticMembersClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, options *StaticMembersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if networkGroupName == "" { - return nil, errors.New("parameter networkGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) - if staticMemberName == "" { - return nil, errors.New("parameter staticMemberName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{staticMemberName}", url.PathEscape(staticMemberName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *StaticMembersClient) getHandleResponse(resp *http.Response) (StaticMembersClientGetResponse, error) { - result := StaticMembersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticMember); err != nil { - return StaticMembersClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the specified static member. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// options - StaticMembersClientListOptions contains the optional parameters for the StaticMembersClient.List method. -func (client *StaticMembersClient) NewListPager(resourceGroupName string, networkManagerName string, networkGroupName string, options *StaticMembersClientListOptions) *runtime.Pager[StaticMembersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[StaticMembersClientListResponse]{ - More: func(page StaticMembersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StaticMembersClientListResponse) (StaticMembersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticMembersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StaticMembersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticMembersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *StaticMembersClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *StaticMembersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkManagerName == "" { - return nil, errors.New("parameter networkManagerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) - if networkGroupName == "" { - return nil, errors.New("parameter networkGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *StaticMembersClient) listHandleResponse(resp *http.Response) (StaticMembersClientListResponse, error) { - result := StaticMembersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StaticMemberListResult); err != nil { - return StaticMembersClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/subnets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/subnets_client.go deleted file mode 100644 index efbdce39..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/subnets_client.go +++ /dev/null @@ -1,472 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SubnetsClient contains the methods for the Subnets group. -// Don't use this type directly, use NewSubnetsClient() instead. -type SubnetsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSubnetsClient creates a new instance of SubnetsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSubnetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubnetsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SubnetsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a subnet in the specified virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// subnetParameters - Parameters supplied to the create or update subnet operation. -// options - SubnetsClientBeginCreateOrUpdateOptions contains the optional parameters for the SubnetsClient.BeginCreateOrUpdate -// method. -func (client *SubnetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, options *SubnetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SubnetsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SubnetsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[SubnetsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a subnet in the specified virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SubnetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, options *SubnetsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *SubnetsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, options *SubnetsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if subnetName == "" { - return nil, errors.New("parameter subnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, subnetParameters) -} - -// BeginDelete - Deletes the specified subnet. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// options - SubnetsClientBeginDeleteOptions contains the optional parameters for the SubnetsClient.BeginDelete method. -func (client *SubnetsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientBeginDeleteOptions) (*runtime.Poller[SubnetsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, subnetName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SubnetsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SubnetsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified subnet. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SubnetsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *SubnetsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if subnetName == "" { - return nil, errors.New("parameter subnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified subnet by virtual network and resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// options - SubnetsClientGetOptions contains the optional parameters for the SubnetsClient.Get method. -func (client *SubnetsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientGetOptions) (SubnetsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) - if err != nil { - return SubnetsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SubnetsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubnetsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SubnetsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if subnetName == "" { - return nil, errors.New("parameter subnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SubnetsClient) getHandleResponse(resp *http.Response) (SubnetsClientGetResponse, error) { - result := SubnetsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Subnet); err != nil { - return SubnetsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all subnets in a virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - SubnetsClientListOptions contains the optional parameters for the SubnetsClient.List method. -func (client *SubnetsClient) NewListPager(resourceGroupName string, virtualNetworkName string, options *SubnetsClientListOptions) *runtime.Pager[SubnetsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SubnetsClientListResponse]{ - More: func(page SubnetsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SubnetsClientListResponse) (SubnetsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SubnetsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SubnetsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubnetsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SubnetsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *SubnetsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SubnetsClient) listHandleResponse(resp *http.Response) (SubnetsClientListResponse, error) { - result := SubnetsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SubnetListResult); err != nil { - return SubnetsClientListResponse{}, err - } - return result, nil -} - -// BeginPrepareNetworkPolicies - Prepares a subnet by applying network intent policies. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// prepareNetworkPoliciesRequestParameters - Parameters supplied to prepare subnet by applying network intent policies. -// options - SubnetsClientBeginPrepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginPrepareNetworkPolicies -// method. -func (client *SubnetsClient) BeginPrepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest, options *SubnetsClientBeginPrepareNetworkPoliciesOptions) (*runtime.Poller[SubnetsClientPrepareNetworkPoliciesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.prepareNetworkPolicies(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SubnetsClientPrepareNetworkPoliciesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SubnetsClientPrepareNetworkPoliciesResponse](options.ResumeToken, client.pl, nil) - } -} - -// PrepareNetworkPolicies - Prepares a subnet by applying network intent policies. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SubnetsClient) prepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest, options *SubnetsClientBeginPrepareNetworkPoliciesOptions) (*http.Response, error) { - req, err := client.prepareNetworkPoliciesCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// prepareNetworkPoliciesCreateRequest creates the PrepareNetworkPolicies request. -func (client *SubnetsClient) prepareNetworkPoliciesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest, options *SubnetsClientBeginPrepareNetworkPoliciesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if subnetName == "" { - return nil, errors.New("parameter subnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, prepareNetworkPoliciesRequestParameters) -} - -// BeginUnprepareNetworkPolicies - Unprepares a subnet by removing network intent policies. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// unprepareNetworkPoliciesRequestParameters - Parameters supplied to unprepare subnet to remove network intent policies. -// options - SubnetsClientBeginUnprepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginUnprepareNetworkPolicies -// method. -func (client *SubnetsClient) BeginUnprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest, options *SubnetsClientBeginUnprepareNetworkPoliciesOptions) (*runtime.Poller[SubnetsClientUnprepareNetworkPoliciesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.unprepareNetworkPolicies(ctx, resourceGroupName, virtualNetworkName, subnetName, unprepareNetworkPoliciesRequestParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SubnetsClientUnprepareNetworkPoliciesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[SubnetsClientUnprepareNetworkPoliciesResponse](options.ResumeToken, client.pl, nil) - } -} - -// UnprepareNetworkPolicies - Unprepares a subnet by removing network intent policies. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *SubnetsClient) unprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest, options *SubnetsClientBeginUnprepareNetworkPoliciesOptions) (*http.Response, error) { - req, err := client.unprepareNetworkPoliciesCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, unprepareNetworkPoliciesRequestParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// unprepareNetworkPoliciesCreateRequest creates the UnprepareNetworkPolicies request. -func (client *SubnetsClient) unprepareNetworkPoliciesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest, options *SubnetsClientBeginUnprepareNetworkPoliciesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if subnetName == "" { - return nil, errors.New("parameter subnetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, unprepareNetworkPoliciesRequestParameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/subscriptionnetworkmanagerconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/subscriptionnetworkmanagerconnections_client.go deleted file mode 100644 index 10780e97..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/subscriptionnetworkmanagerconnections_client.go +++ /dev/null @@ -1,272 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// SubscriptionNetworkManagerConnectionsClient contains the methods for the SubscriptionNetworkManagerConnections group. -// Don't use this type directly, use NewSubscriptionNetworkManagerConnectionsClient() instead. -type SubscriptionNetworkManagerConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSubscriptionNetworkManagerConnectionsClient creates a new instance of SubscriptionNetworkManagerConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSubscriptionNetworkManagerConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionNetworkManagerConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SubscriptionNetworkManagerConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create a network manager connection on this subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// networkManagerConnectionName - Name for the network manager connection. -// parameters - Network manager connection to be created/updated. -// options - SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate -// method. -func (client *SubscriptionNetworkManagerConnectionsClient) CreateOrUpdate(ctx context.Context, networkManagerConnectionName string, parameters ManagerConnection, options *SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions) (SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, networkManagerConnectionName, parameters, options) - if err != nil { - return SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *SubscriptionNetworkManagerConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, networkManagerConnectionName string, parameters ManagerConnection, options *SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if networkManagerConnectionName == "" { - return nil, errors.New("parameter networkManagerConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *SubscriptionNetworkManagerConnectionsClient) createOrUpdateHandleResponse(resp *http.Response) (SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse, error) { - result := SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnection); err != nil { - return SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Delete specified connection created by this subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// networkManagerConnectionName - Name for the network manager connection. -// options - SubscriptionNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Delete -// method. -func (client *SubscriptionNetworkManagerConnectionsClient) Delete(ctx context.Context, networkManagerConnectionName string, options *SubscriptionNetworkManagerConnectionsClientDeleteOptions) (SubscriptionNetworkManagerConnectionsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, networkManagerConnectionName, options) - if err != nil { - return SubscriptionNetworkManagerConnectionsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SubscriptionNetworkManagerConnectionsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return SubscriptionNetworkManagerConnectionsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return SubscriptionNetworkManagerConnectionsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *SubscriptionNetworkManagerConnectionsClient) deleteCreateRequest(ctx context.Context, networkManagerConnectionName string, options *SubscriptionNetworkManagerConnectionsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if networkManagerConnectionName == "" { - return nil, errors.New("parameter networkManagerConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get a specified connection created by this subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// networkManagerConnectionName - Name for the network manager connection. -// options - SubscriptionNetworkManagerConnectionsClientGetOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Get -// method. -func (client *SubscriptionNetworkManagerConnectionsClient) Get(ctx context.Context, networkManagerConnectionName string, options *SubscriptionNetworkManagerConnectionsClientGetOptions) (SubscriptionNetworkManagerConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, networkManagerConnectionName, options) - if err != nil { - return SubscriptionNetworkManagerConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SubscriptionNetworkManagerConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubscriptionNetworkManagerConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SubscriptionNetworkManagerConnectionsClient) getCreateRequest(ctx context.Context, networkManagerConnectionName string, options *SubscriptionNetworkManagerConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if networkManagerConnectionName == "" { - return nil, errors.New("parameter networkManagerConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SubscriptionNetworkManagerConnectionsClient) getHandleResponse(resp *http.Response) (SubscriptionNetworkManagerConnectionsClientGetResponse, error) { - result := SubscriptionNetworkManagerConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnection); err != nil { - return SubscriptionNetworkManagerConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all network manager connections created by this subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - SubscriptionNetworkManagerConnectionsClientListOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.List -// method. -func (client *SubscriptionNetworkManagerConnectionsClient) NewListPager(options *SubscriptionNetworkManagerConnectionsClientListOptions) *runtime.Pager[SubscriptionNetworkManagerConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SubscriptionNetworkManagerConnectionsClientListResponse]{ - More: func(page SubscriptionNetworkManagerConnectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SubscriptionNetworkManagerConnectionsClientListResponse) (SubscriptionNetworkManagerConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SubscriptionNetworkManagerConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SubscriptionNetworkManagerConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SubscriptionNetworkManagerConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SubscriptionNetworkManagerConnectionsClient) listCreateRequest(ctx context.Context, options *SubscriptionNetworkManagerConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Top != nil { - reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SubscriptionNetworkManagerConnectionsClient) listHandleResponse(resp *http.Response) (SubscriptionNetworkManagerConnectionsClientListResponse, error) { - result := SubscriptionNetworkManagerConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnectionListResult); err != nil { - return SubscriptionNetworkManagerConnectionsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/time_rfc3339.go deleted file mode 100644 index c9d8a00e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/time_rfc3339.go +++ /dev/null @@ -1,87 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/usages_client.go deleted file mode 100644 index 5af3a803..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/usages_client.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// UsagesClient contains the methods for the Usages group. -// Don't use this type directly, use NewUsagesClient() instead. -type UsagesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewUsagesClient creates a new instance of UsagesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &UsagesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - List network usages for a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The location where resource usage is queried. -// options - UsagesClientListOptions contains the optional parameters for the UsagesClient.List method. -func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[UsagesClientListResponse]{ - More: func(page UsagesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *UsagesClientListResponse) (UsagesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return UsagesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return UsagesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UsagesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *UsagesClient) listCreateRequest(ctx context.Context, location string, options *UsagesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages" - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *UsagesClient) listHandleResponse(resp *http.Response) (UsagesClientListResponse, error) { - result := UsagesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UsagesListResult); err != nil { - return UsagesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/CHANGELOG.md new file mode 100644 index 00000000..0de615e4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/CHANGELOG.md @@ -0,0 +1,1043 @@ +# Release History + +## 6.2.0 (2024-12-09) +### Features Added + +- New value `AddressPrefixTypeNetworkGroup` added to enum type `AddressPrefixType` +- New value `FirewallPolicyIDPSSignatureDirectionFive` added to enum type `FirewallPolicyIDPSSignatureDirection` +- New value `ProvisioningStateCanceled`, `ProvisioningStateCreating` added to enum type `ProvisioningState` +- New enum type `AddressSpaceAggregationOption` with values `AddressSpaceAggregationOptionManual`, `AddressSpaceAggregationOptionNone` +- New enum type `FailoverConnectionStatus` with values `FailoverConnectionStatusConnected`, `FailoverConnectionStatusDisconnected` +- New enum type `FailoverTestStatus` with values `FailoverTestStatusCompleted`, `FailoverTestStatusExpired`, `FailoverTestStatusInvalid`, `FailoverTestStatusNotStarted`, `FailoverTestStatusRunning`, `FailoverTestStatusStartFailed`, `FailoverTestStatusStarting`, `FailoverTestStatusStopFailed`, `FailoverTestStatusStopping` +- New enum type `FailoverTestStatusForSingleTest` with values `FailoverTestStatusForSingleTestCompleted`, `FailoverTestStatusForSingleTestExpired`, `FailoverTestStatusForSingleTestInvalid`, `FailoverTestStatusForSingleTestNotStarted`, `FailoverTestStatusForSingleTestRunning`, `FailoverTestStatusForSingleTestStartFailed`, `FailoverTestStatusForSingleTestStarting`, `FailoverTestStatusForSingleTestStopFailed`, `FailoverTestStatusForSingleTestStopping` +- New enum type `FailoverTestType` with values `FailoverTestTypeAll`, `FailoverTestTypeMultiSiteFailover`, `FailoverTestTypeSingleSiteFailover` +- New enum type `IPType` with values `IPTypeIPv4`, `IPTypeIPv6` +- New enum type `NetworkProtocol` with values `NetworkProtocolAny`, `NetworkProtocolICMP`, `NetworkProtocolTCP`, `NetworkProtocolUDP` +- New function `*ClientFactory.NewIpamPoolsClient() *IpamPoolsClient` +- New function `*ClientFactory.NewReachabilityAnalysisIntentsClient() *ReachabilityAnalysisIntentsClient` +- New function `*ClientFactory.NewReachabilityAnalysisRunsClient() *ReachabilityAnalysisRunsClient` +- New function `*ClientFactory.NewStaticCidrsClient() *StaticCidrsClient` +- New function `*ClientFactory.NewVerifierWorkspacesClient() *VerifierWorkspacesClient` +- New function `NewIpamPoolsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*IpamPoolsClient, error)` +- New function `*IpamPoolsClient.BeginCreate(context.Context, string, string, string, IpamPool, *IpamPoolsClientBeginCreateOptions) (*runtime.Poller[IpamPoolsClientCreateResponse], error)` +- New function `*IpamPoolsClient.BeginDelete(context.Context, string, string, string, *IpamPoolsClientBeginDeleteOptions) (*runtime.Poller[IpamPoolsClientDeleteResponse], error)` +- New function `*IpamPoolsClient.Get(context.Context, string, string, string, *IpamPoolsClientGetOptions) (IpamPoolsClientGetResponse, error)` +- New function `*IpamPoolsClient.GetPoolUsage(context.Context, string, string, string, *IpamPoolsClientGetPoolUsageOptions) (IpamPoolsClientGetPoolUsageResponse, error)` +- New function `*IpamPoolsClient.NewListAssociatedResourcesPager(string, string, string, *IpamPoolsClientListAssociatedResourcesOptions) *runtime.Pager[IpamPoolsClientListAssociatedResourcesResponse]` +- New function `*IpamPoolsClient.NewListPager(string, string, *IpamPoolsClientListOptions) *runtime.Pager[IpamPoolsClientListResponse]` +- New function `*IpamPoolsClient.Update(context.Context, string, string, string, *IpamPoolsClientUpdateOptions) (IpamPoolsClientUpdateResponse, error)` +- New function `*LoadBalancerLoadBalancingRulesClient.BeginHealth(context.Context, string, string, string, *LoadBalancerLoadBalancingRulesClientBeginHealthOptions) (*runtime.Poller[LoadBalancerLoadBalancingRulesClientHealthResponse], error)` +- New function `NewReachabilityAnalysisIntentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ReachabilityAnalysisIntentsClient, error)` +- New function `*ReachabilityAnalysisIntentsClient.Create(context.Context, string, string, string, string, ReachabilityAnalysisIntent, *ReachabilityAnalysisIntentsClientCreateOptions) (ReachabilityAnalysisIntentsClientCreateResponse, error)` +- New function `*ReachabilityAnalysisIntentsClient.Delete(context.Context, string, string, string, string, *ReachabilityAnalysisIntentsClientDeleteOptions) (ReachabilityAnalysisIntentsClientDeleteResponse, error)` +- New function `*ReachabilityAnalysisIntentsClient.Get(context.Context, string, string, string, string, *ReachabilityAnalysisIntentsClientGetOptions) (ReachabilityAnalysisIntentsClientGetResponse, error)` +- New function `*ReachabilityAnalysisIntentsClient.NewListPager(string, string, string, *ReachabilityAnalysisIntentsClientListOptions) *runtime.Pager[ReachabilityAnalysisIntentsClientListResponse]` +- New function `NewReachabilityAnalysisRunsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ReachabilityAnalysisRunsClient, error)` +- New function `*ReachabilityAnalysisRunsClient.Create(context.Context, string, string, string, string, ReachabilityAnalysisRun, *ReachabilityAnalysisRunsClientCreateOptions) (ReachabilityAnalysisRunsClientCreateResponse, error)` +- New function `*ReachabilityAnalysisRunsClient.BeginDelete(context.Context, string, string, string, string, *ReachabilityAnalysisRunsClientBeginDeleteOptions) (*runtime.Poller[ReachabilityAnalysisRunsClientDeleteResponse], error)` +- New function `*ReachabilityAnalysisRunsClient.Get(context.Context, string, string, string, string, *ReachabilityAnalysisRunsClientGetOptions) (ReachabilityAnalysisRunsClientGetResponse, error)` +- New function `*ReachabilityAnalysisRunsClient.NewListPager(string, string, string, *ReachabilityAnalysisRunsClientListOptions) *runtime.Pager[ReachabilityAnalysisRunsClientListResponse]` +- New function `NewStaticCidrsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*StaticCidrsClient, error)` +- New function `*StaticCidrsClient.Create(context.Context, string, string, string, string, *StaticCidrsClientCreateOptions) (StaticCidrsClientCreateResponse, error)` +- New function `*StaticCidrsClient.BeginDelete(context.Context, string, string, string, string, *StaticCidrsClientBeginDeleteOptions) (*runtime.Poller[StaticCidrsClientDeleteResponse], error)` +- New function `*StaticCidrsClient.Get(context.Context, string, string, string, string, *StaticCidrsClientGetOptions) (StaticCidrsClientGetResponse, error)` +- New function `*StaticCidrsClient.NewListPager(string, string, string, *StaticCidrsClientListOptions) *runtime.Pager[StaticCidrsClientListResponse]` +- New function `NewVerifierWorkspacesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VerifierWorkspacesClient, error)` +- New function `*VerifierWorkspacesClient.Create(context.Context, string, string, string, VerifierWorkspace, *VerifierWorkspacesClientCreateOptions) (VerifierWorkspacesClientCreateResponse, error)` +- New function `*VerifierWorkspacesClient.BeginDelete(context.Context, string, string, string, *VerifierWorkspacesClientBeginDeleteOptions) (*runtime.Poller[VerifierWorkspacesClientDeleteResponse], error)` +- New function `*VerifierWorkspacesClient.Get(context.Context, string, string, string, *VerifierWorkspacesClientGetOptions) (VerifierWorkspacesClientGetResponse, error)` +- New function `*VerifierWorkspacesClient.NewListPager(string, string, *VerifierWorkspacesClientListOptions) *runtime.Pager[VerifierWorkspacesClientListResponse]` +- New function `*VerifierWorkspacesClient.Update(context.Context, string, string, string, *VerifierWorkspacesClientUpdateOptions) (VerifierWorkspacesClientUpdateResponse, error)` +- New function `*VirtualNetworkGatewaysClient.BeginGetFailoverAllTestDetails(context.Context, string, string, string, bool, *VirtualNetworkGatewaysClientBeginGetFailoverAllTestDetailsOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetFailoverAllTestDetailsResponse], error)` +- New function `*VirtualNetworkGatewaysClient.BeginGetFailoverSingleTestDetails(context.Context, string, string, string, string, *VirtualNetworkGatewaysClientBeginGetFailoverSingleTestDetailsOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetFailoverSingleTestDetailsResponse], error)` +- New function `*VirtualNetworkGatewaysClient.BeginStartExpressRouteSiteFailoverSimulation(context.Context, string, string, string, *VirtualNetworkGatewaysClientBeginStartExpressRouteSiteFailoverSimulationOptions) (*runtime.Poller[VirtualNetworkGatewaysClientStartExpressRouteSiteFailoverSimulationResponse], error)` +- New function `*VirtualNetworkGatewaysClient.BeginStopExpressRouteSiteFailoverSimulation(context.Context, string, string, ExpressRouteFailoverStopAPIParameters, *VirtualNetworkGatewaysClientBeginStopExpressRouteSiteFailoverSimulationOptions) (*runtime.Poller[VirtualNetworkGatewaysClientStopExpressRouteSiteFailoverSimulationResponse], error)` +- New struct `CommonErrorAdditionalInfo` +- New struct `CommonErrorDetail` +- New struct `CommonErrorResponse` +- New struct `CommonProxyResource` +- New struct `CommonResource` +- New struct `CommonTrackedResource` +- New struct `ExpressRouteFailoverCircuitResourceDetails` +- New struct `ExpressRouteFailoverConnectionResourceDetails` +- New struct `ExpressRouteFailoverRedundantRoute` +- New struct `ExpressRouteFailoverSingleTestDetails` +- New struct `ExpressRouteFailoverStopAPIParameters` +- New struct `ExpressRouteFailoverTestDetails` +- New struct `FailoverConnectionDetails` +- New struct `IPTraffic` +- New struct `IntentContent` +- New struct `IpamPool` +- New struct `IpamPoolList` +- New struct `IpamPoolPrefixAllocation` +- New struct `IpamPoolPrefixAllocationPool` +- New struct `IpamPoolProperties` +- New struct `IpamPoolUpdate` +- New struct `IpamPoolUpdateProperties` +- New struct `LoadBalancerHealthPerRule` +- New struct `LoadBalancerHealthPerRulePerBackendAddress` +- New struct `PoolAssociation` +- New struct `PoolAssociationList` +- New struct `PoolUsage` +- New struct `ReachabilityAnalysisIntent` +- New struct `ReachabilityAnalysisIntentListResult` +- New struct `ReachabilityAnalysisIntentProperties` +- New struct `ReachabilityAnalysisRun` +- New struct `ReachabilityAnalysisRunListResult` +- New struct `ReachabilityAnalysisRunProperties` +- New struct `ResourceBasics` +- New struct `StaticCidr` +- New struct `StaticCidrList` +- New struct `StaticCidrProperties` +- New struct `VerifierWorkspace` +- New struct `VerifierWorkspaceListResult` +- New struct `VerifierWorkspaceProperties` +- New struct `VerifierWorkspaceUpdate` +- New struct `VerifierWorkspaceUpdateProperties` +- New field `IpamPoolPrefixAllocations` in struct `AddressSpace` +- New field `EnablePrivateOnlyBastion` in struct `BastionHostPropertiesFormat` +- New field `DefaultOutboundConnectivityEnabled` in struct `InterfacePropertiesFormat` +- New field `NetworkGroupAddressSpaceAggregationOption` in struct `SecurityAdminConfigurationPropertiesFormat` +- New field `IpamPoolPrefixAllocations` in struct `SubnetPropertiesFormat` + + +## 6.1.0 (2024-09-24) +### Features Added + +- New value `ConfigurationTypeRouting`, `ConfigurationTypeSecurityUser` added to enum type `ConfigurationType` +- New enum type `ApplicationGatewayWafRuleSensitivityTypes` with values `ApplicationGatewayWafRuleSensitivityTypesHigh`, `ApplicationGatewayWafRuleSensitivityTypesLow`, `ApplicationGatewayWafRuleSensitivityTypesMedium`, `ApplicationGatewayWafRuleSensitivityTypesNone` +- New enum type `DisableBgpRoutePropagation` with values `DisableBgpRoutePropagationFalse`, `DisableBgpRoutePropagationTrue` +- New enum type `ExceptionEntryMatchVariable` with values `ExceptionEntryMatchVariableRemoteAddr`, `ExceptionEntryMatchVariableRequestHeader`, `ExceptionEntryMatchVariableRequestURI` +- New enum type `ExceptionEntrySelectorMatchOperator` with values `ExceptionEntrySelectorMatchOperatorContains`, `ExceptionEntrySelectorMatchOperatorEndsWith`, `ExceptionEntrySelectorMatchOperatorEquals`, `ExceptionEntrySelectorMatchOperatorStartsWith` +- New enum type `ExceptionEntryValueMatchOperator` with values `ExceptionEntryValueMatchOperatorContains`, `ExceptionEntryValueMatchOperatorEndsWith`, `ExceptionEntryValueMatchOperatorEquals`, `ExceptionEntryValueMatchOperatorIPMatch`, `ExceptionEntryValueMatchOperatorStartsWith` +- New enum type `GroupMemberType` with values `GroupMemberTypeSubnet`, `GroupMemberTypeVirtualNetwork` +- New enum type `PrivateEndpointVNetPolicies` with values `PrivateEndpointVNetPoliciesBasic`, `PrivateEndpointVNetPoliciesDisabled` +- New enum type `ResiliencyModel` with values `ResiliencyModelMultiHomed`, `ResiliencyModelSingleHomed` +- New enum type `RoutingRuleDestinationType` with values `RoutingRuleDestinationTypeAddressPrefix`, `RoutingRuleDestinationTypeServiceTag` +- New enum type `RoutingRuleNextHopType` with values `RoutingRuleNextHopTypeInternet`, `RoutingRuleNextHopTypeNoNextHop`, `RoutingRuleNextHopTypeVirtualAppliance`, `RoutingRuleNextHopTypeVirtualNetworkGateway`, `RoutingRuleNextHopTypeVnetLocal` +- New enum type `SensitivityType` with values `SensitivityTypeHigh`, `SensitivityTypeLow`, `SensitivityTypeMedium`, `SensitivityTypeNone` +- New function `*ClientFactory.NewManagerRoutingConfigurationsClient() *ManagerRoutingConfigurationsClient` +- New function `*ClientFactory.NewRoutingRuleCollectionsClient() *RoutingRuleCollectionsClient` +- New function `*ClientFactory.NewRoutingRulesClient() *RoutingRulesClient` +- New function `*ClientFactory.NewSecurityUserConfigurationsClient() *SecurityUserConfigurationsClient` +- New function `*ClientFactory.NewSecurityUserRuleCollectionsClient() *SecurityUserRuleCollectionsClient` +- New function `*ClientFactory.NewSecurityUserRulesClient() *SecurityUserRulesClient` +- New function `NewManagerRoutingConfigurationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagerRoutingConfigurationsClient, error)` +- New function `*ManagerRoutingConfigurationsClient.CreateOrUpdate(context.Context, string, string, string, ManagerRoutingConfiguration, *ManagerRoutingConfigurationsClientCreateOrUpdateOptions) (ManagerRoutingConfigurationsClientCreateOrUpdateResponse, error)` +- New function `*ManagerRoutingConfigurationsClient.BeginDelete(context.Context, string, string, string, *ManagerRoutingConfigurationsClientBeginDeleteOptions) (*runtime.Poller[ManagerRoutingConfigurationsClientDeleteResponse], error)` +- New function `*ManagerRoutingConfigurationsClient.Get(context.Context, string, string, string, *ManagerRoutingConfigurationsClientGetOptions) (ManagerRoutingConfigurationsClientGetResponse, error)` +- New function `*ManagerRoutingConfigurationsClient.NewListPager(string, string, *ManagerRoutingConfigurationsClientListOptions) *runtime.Pager[ManagerRoutingConfigurationsClientListResponse]` +- New function `NewRoutingRuleCollectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RoutingRuleCollectionsClient, error)` +- New function `*RoutingRuleCollectionsClient.CreateOrUpdate(context.Context, string, string, string, string, RoutingRuleCollection, *RoutingRuleCollectionsClientCreateOrUpdateOptions) (RoutingRuleCollectionsClientCreateOrUpdateResponse, error)` +- New function `*RoutingRuleCollectionsClient.BeginDelete(context.Context, string, string, string, string, *RoutingRuleCollectionsClientBeginDeleteOptions) (*runtime.Poller[RoutingRuleCollectionsClientDeleteResponse], error)` +- New function `*RoutingRuleCollectionsClient.Get(context.Context, string, string, string, string, *RoutingRuleCollectionsClientGetOptions) (RoutingRuleCollectionsClientGetResponse, error)` +- New function `*RoutingRuleCollectionsClient.NewListPager(string, string, string, *RoutingRuleCollectionsClientListOptions) *runtime.Pager[RoutingRuleCollectionsClientListResponse]` +- New function `NewRoutingRulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RoutingRulesClient, error)` +- New function `*RoutingRulesClient.CreateOrUpdate(context.Context, string, string, string, string, string, RoutingRule, *RoutingRulesClientCreateOrUpdateOptions) (RoutingRulesClientCreateOrUpdateResponse, error)` +- New function `*RoutingRulesClient.BeginDelete(context.Context, string, string, string, string, string, *RoutingRulesClientBeginDeleteOptions) (*runtime.Poller[RoutingRulesClientDeleteResponse], error)` +- New function `*RoutingRulesClient.Get(context.Context, string, string, string, string, string, *RoutingRulesClientGetOptions) (RoutingRulesClientGetResponse, error)` +- New function `*RoutingRulesClient.NewListPager(string, string, string, string, *RoutingRulesClientListOptions) *runtime.Pager[RoutingRulesClientListResponse]` +- New function `NewSecurityUserConfigurationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SecurityUserConfigurationsClient, error)` +- New function `*SecurityUserConfigurationsClient.CreateOrUpdate(context.Context, string, string, string, SecurityUserConfiguration, *SecurityUserConfigurationsClientCreateOrUpdateOptions) (SecurityUserConfigurationsClientCreateOrUpdateResponse, error)` +- New function `*SecurityUserConfigurationsClient.BeginDelete(context.Context, string, string, string, *SecurityUserConfigurationsClientBeginDeleteOptions) (*runtime.Poller[SecurityUserConfigurationsClientDeleteResponse], error)` +- New function `*SecurityUserConfigurationsClient.Get(context.Context, string, string, string, *SecurityUserConfigurationsClientGetOptions) (SecurityUserConfigurationsClientGetResponse, error)` +- New function `*SecurityUserConfigurationsClient.NewListPager(string, string, *SecurityUserConfigurationsClientListOptions) *runtime.Pager[SecurityUserConfigurationsClientListResponse]` +- New function `NewSecurityUserRuleCollectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SecurityUserRuleCollectionsClient, error)` +- New function `*SecurityUserRuleCollectionsClient.CreateOrUpdate(context.Context, string, string, string, string, SecurityUserRuleCollection, *SecurityUserRuleCollectionsClientCreateOrUpdateOptions) (SecurityUserRuleCollectionsClientCreateOrUpdateResponse, error)` +- New function `*SecurityUserRuleCollectionsClient.BeginDelete(context.Context, string, string, string, string, *SecurityUserRuleCollectionsClientBeginDeleteOptions) (*runtime.Poller[SecurityUserRuleCollectionsClientDeleteResponse], error)` +- New function `*SecurityUserRuleCollectionsClient.Get(context.Context, string, string, string, string, *SecurityUserRuleCollectionsClientGetOptions) (SecurityUserRuleCollectionsClientGetResponse, error)` +- New function `*SecurityUserRuleCollectionsClient.NewListPager(string, string, string, *SecurityUserRuleCollectionsClientListOptions) *runtime.Pager[SecurityUserRuleCollectionsClientListResponse]` +- New function `NewSecurityUserRulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SecurityUserRulesClient, error)` +- New function `*SecurityUserRulesClient.CreateOrUpdate(context.Context, string, string, string, string, string, SecurityUserRule, *SecurityUserRulesClientCreateOrUpdateOptions) (SecurityUserRulesClientCreateOrUpdateResponse, error)` +- New function `*SecurityUserRulesClient.BeginDelete(context.Context, string, string, string, string, string, *SecurityUserRulesClientBeginDeleteOptions) (*runtime.Poller[SecurityUserRulesClientDeleteResponse], error)` +- New function `*SecurityUserRulesClient.Get(context.Context, string, string, string, string, string, *SecurityUserRulesClientGetOptions) (SecurityUserRulesClientGetResponse, error)` +- New function `*SecurityUserRulesClient.NewListPager(string, string, string, string, *SecurityUserRulesClientListOptions) *runtime.Pager[SecurityUserRulesClientListResponse]` +- New function `*VPNLinkConnectionsClient.NewGetAllSharedKeysPager(string, string, string, string, *VPNLinkConnectionsClientGetAllSharedKeysOptions) *runtime.Pager[VPNLinkConnectionsClientGetAllSharedKeysResponse]` +- New function `*VPNLinkConnectionsClient.GetDefaultSharedKey(context.Context, string, string, string, string, *VPNLinkConnectionsClientGetDefaultSharedKeyOptions) (VPNLinkConnectionsClientGetDefaultSharedKeyResponse, error)` +- New function `*VPNLinkConnectionsClient.ListDefaultSharedKey(context.Context, string, string, string, string, *VPNLinkConnectionsClientListDefaultSharedKeyOptions) (VPNLinkConnectionsClientListDefaultSharedKeyResponse, error)` +- New function `*VPNLinkConnectionsClient.BeginSetOrInitDefaultSharedKey(context.Context, string, string, string, string, ConnectionSharedKeyResult, *VPNLinkConnectionsClientBeginSetOrInitDefaultSharedKeyOptions) (*runtime.Poller[VPNLinkConnectionsClientSetOrInitDefaultSharedKeyResponse], error)` +- New struct `ApplicationGatewayForContainersReferenceDefinition` +- New struct `AzureFirewallAutoscaleConfiguration` +- New struct `ConnectionSharedKeyResult` +- New struct `ConnectionSharedKeyResultList` +- New struct `ExceptionEntry` +- New struct `ManagerRoutingConfiguration` +- New struct `ManagerRoutingConfigurationListResult` +- New struct `ManagerRoutingConfigurationPropertiesFormat` +- New struct `ManagerRoutingGroupItem` +- New struct `RoutingRule` +- New struct `RoutingRuleCollection` +- New struct `RoutingRuleCollectionListResult` +- New struct `RoutingRuleCollectionPropertiesFormat` +- New struct `RoutingRuleListResult` +- New struct `RoutingRuleNextHop` +- New struct `RoutingRulePropertiesFormat` +- New struct `RoutingRuleRouteDestination` +- New struct `SecurityUserConfiguration` +- New struct `SecurityUserConfigurationListResult` +- New struct `SecurityUserConfigurationPropertiesFormat` +- New struct `SecurityUserGroupItem` +- New struct `SecurityUserRule` +- New struct `SecurityUserRuleCollection` +- New struct `SecurityUserRuleCollectionListResult` +- New struct `SecurityUserRuleCollectionPropertiesFormat` +- New struct `SecurityUserRuleListResult` +- New struct `SecurityUserRulePropertiesFormat` +- New struct `SharedKeyProperties` +- New field `Sensitivity` in struct `ApplicationGatewayFirewallRule` +- New field `AutoscaleConfiguration` in struct `AzureFirewallPropertiesFormat` +- New field `EnabledFilteringCriteria` in struct `FlowLogProperties` +- New field `EnabledFilteringCriteria` in struct `FlowLogPropertiesFormat` +- New field `MemberType` in struct `GroupProperties` +- New field `Sensitivity` in struct `ManagedRuleOverride` +- New field `Exceptions` in struct `ManagedRulesDefinition` +- New field `DestinationIPAddress` in struct `PrivateLinkServiceProperties` +- New field `ResiliencyModel` in struct `VirtualNetworkGatewayPropertiesFormat` +- New field `PrivateEndpointVNetPolicies` in struct `VirtualNetworkPropertiesFormat` +- New field `ApplicationGatewayForContainers` in struct `WebApplicationFirewallPolicyPropertiesFormat` + + +## 6.0.0 (2024-07-25) +### Breaking Changes + +- Struct `FirewallPacketCaptureParametersFormat` has been removed +- Field `ID`, `Properties` of struct `FirewallPacketCaptureParameters` has been removed + +### Features Added + +- New value `BastionHostSKUNamePremium` added to enum type `BastionHostSKUName` +- New enum type `ProbeNoHealthyBackendsBehavior` with values `ProbeNoHealthyBackendsBehaviorAllProbedDown`, `ProbeNoHealthyBackendsBehaviorAllProbedUp` +- New function `*InboundSecurityRuleClient.Get(context.Context, string, string, string, *InboundSecurityRuleClientGetOptions) (InboundSecurityRuleClientGetResponse, error)` +- New field `ConnectionResourceURI` in struct `AuthorizationPropertiesFormat` +- New field `EnableSessionRecording` in struct `BastionHostPropertiesFormat` +- New field `Filter` in struct `ExpressRouteCrossConnectionsClientListOptions` +- New field `DurationInSeconds`, `FileName`, `Filters`, `Flags`, `NumberOfPacketsToCapture`, `Protocol`, `SasURL` in struct `FirewallPacketCaptureParameters` +- New field `Identity` in struct `FlowLog` +- New field `Identity` in struct `FlowLogInformation` +- New field `NoHealthyBackendsBehavior` in struct `ProbePropertiesFormat` +- New field `NetworkIdentifier` in struct `ServiceEndpointPropertiesFormat` +- New field `Identity` in struct `VirtualNetworkGateway` + + +## 5.2.0 (2024-06-21) +### Features Added + +- New value `EndpointTypeAzureArcNetwork` added to enum type `EndpointType` +- New enum type `ApplicationGatewaySKUFamily` with values `ApplicationGatewaySKUFamilyGeneration1`, `ApplicationGatewaySKUFamilyGeneration2` +- New enum type `InboundSecurityRuleType` with values `InboundSecurityRuleTypeAutoExpire`, `InboundSecurityRuleTypePermanent` +- New enum type `NicTypeInRequest` with values `NicTypeInRequestPrivateNic`, `NicTypeInRequestPublicNic` +- New enum type `NicTypeInResponse` with values `NicTypeInResponseAdditionalNic`, `NicTypeInResponsePrivateNic`, `NicTypeInResponsePublicNic` +- New enum type `SharingScope` with values `SharingScopeDelegatedServices`, `SharingScopeTenant` +- New function `*ClientFactory.NewFirewallPolicyDeploymentsClient() *FirewallPolicyDeploymentsClient` +- New function `*ClientFactory.NewFirewallPolicyDraftsClient() *FirewallPolicyDraftsClient` +- New function `*ClientFactory.NewFirewallPolicyRuleCollectionGroupDraftsClient() *FirewallPolicyRuleCollectionGroupDraftsClient` +- New function `NewFirewallPolicyDeploymentsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FirewallPolicyDeploymentsClient, error)` +- New function `*FirewallPolicyDeploymentsClient.BeginDeploy(context.Context, string, string, *FirewallPolicyDeploymentsClientBeginDeployOptions) (*runtime.Poller[FirewallPolicyDeploymentsClientDeployResponse], error)` +- New function `NewFirewallPolicyDraftsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FirewallPolicyDraftsClient, error)` +- New function `*FirewallPolicyDraftsClient.CreateOrUpdate(context.Context, string, string, FirewallPolicyDraft, *FirewallPolicyDraftsClientCreateOrUpdateOptions) (FirewallPolicyDraftsClientCreateOrUpdateResponse, error)` +- New function `*FirewallPolicyDraftsClient.Delete(context.Context, string, string, *FirewallPolicyDraftsClientDeleteOptions) (FirewallPolicyDraftsClientDeleteResponse, error)` +- New function `*FirewallPolicyDraftsClient.Get(context.Context, string, string, *FirewallPolicyDraftsClientGetOptions) (FirewallPolicyDraftsClientGetResponse, error)` +- New function `NewFirewallPolicyRuleCollectionGroupDraftsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FirewallPolicyRuleCollectionGroupDraftsClient, error)` +- New function `*FirewallPolicyRuleCollectionGroupDraftsClient.CreateOrUpdate(context.Context, string, string, string, FirewallPolicyRuleCollectionGroupDraft, *FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateOptions) (FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateResponse, error)` +- New function `*FirewallPolicyRuleCollectionGroupDraftsClient.Delete(context.Context, string, string, string, *FirewallPolicyRuleCollectionGroupDraftsClientDeleteOptions) (FirewallPolicyRuleCollectionGroupDraftsClientDeleteResponse, error)` +- New function `*FirewallPolicyRuleCollectionGroupDraftsClient.Get(context.Context, string, string, string, *FirewallPolicyRuleCollectionGroupDraftsClientGetOptions) (FirewallPolicyRuleCollectionGroupDraftsClientGetResponse, error)` +- New function `*VirtualAppliancesClient.BeginRestart(context.Context, string, string, *VirtualAppliancesClientBeginRestartOptions) (*runtime.Poller[VirtualAppliancesClientRestartResponse], error)` +- New struct `ConnectionMonitorEndpointLocationDetails` +- New struct `FirewallPolicyDraft` +- New struct `FirewallPolicyDraftProperties` +- New struct `FirewallPolicyRuleCollectionGroupDraft` +- New struct `FirewallPolicyRuleCollectionGroupDraftProperties` +- New struct `HeaderValueMatcher` +- New struct `PacketCaptureSettings` +- New struct `VirtualApplianceIPConfiguration` +- New struct `VirtualApplianceIPConfigurationProperties` +- New struct `VirtualApplianceInstanceIDs` +- New struct `VirtualApplianceNetworkInterfaceConfiguration` +- New struct `VirtualApplianceNetworkInterfaceConfigurationProperties` +- New struct `VirtualAppliancePropertiesFormatNetworkProfile` +- New field `HeaderValueMatcher` in struct `ApplicationGatewayHeaderConfiguration` +- New field `Family` in struct `ApplicationGatewaySKU` +- New field `LocationDetails`, `SubscriptionID` in struct `ConnectionMonitorEndpoint` +- New field `EnableDirectPortRateLimit` in struct `ExpressRouteCircuitPropertiesFormat` +- New field `RuleType` in struct `InboundSecurityRuleProperties` +- New field `AppliesOn`, `DestinationPortRanges`, `Name` in struct `InboundSecurityRules` +- New field `PrivateIPAddressPrefixLength` in struct `InterfaceIPConfigurationPropertiesFormat` +- New field `CaptureSettings`, `ContinuousCapture` in struct `PacketCaptureParameters` +- New field `CaptureSettings`, `ContinuousCapture` in struct `PacketCaptureResultProperties` +- New field `LocalPath` in struct `PacketCaptureStorageLocation` +- New field `JsChallengeCookieExpirationInMins` in struct `PolicySettings` +- New field `SharingScope` in struct `SubnetPropertiesFormat` +- New field `DpdTimeoutSeconds` in struct `VPNSiteLinkConnectionProperties` +- New field `NicType` in struct `VirtualApplianceNicProperties` +- New field `NetworkProfile` in struct `VirtualAppliancePropertiesFormat` +- New field `EnableOnlyIPv6Peering`, `LocalAddressSpace`, `LocalSubnetNames`, `LocalVirtualNetworkAddressSpace`, `PeerCompleteVnets`, `RemoteSubnetNames` in struct `VirtualNetworkPeeringPropertiesFormat` + + +## 5.1.1 (2024-04-02) +### Other Changes + +- upgrade azcore version + + +## 5.1.0 (2024-02-23) +### Features Added + +- New value `VirtualNetworkPrivateEndpointNetworkPoliciesNetworkSecurityGroupEnabled`, `VirtualNetworkPrivateEndpointNetworkPoliciesRouteTableEnabled` added to enum type `VirtualNetworkPrivateEndpointNetworkPolicies` +- New field `Zones` in struct `BastionHost` + + +## 5.0.0 (2023-12-22) +### Breaking Changes + +- Type of `VirtualApplianceConnectionProperties.RoutingConfiguration` has been changed from `*RoutingConfigurationNfv` to `*RoutingConfiguration` +- Struct `PropagatedRouteTableNfv` has been removed +- Struct `RoutingConfigurationNfv` has been removed +- Struct `RoutingConfigurationNfvSubResource` has been removed + +### Features Added + +- New value `ActionTypeJSChallenge` added to enum type `ActionType` +- New value `BastionHostSKUNameDeveloper` added to enum type `BastionHostSKUName` +- New value `FirewallPolicyIDPSSignatureDirectionFour`, `FirewallPolicyIDPSSignatureDirectionThree` added to enum type `FirewallPolicyIDPSSignatureDirection` +- New value `VirtualNetworkGatewaySKUNameErGwScale` added to enum type `VirtualNetworkGatewaySKUName` +- New value `VirtualNetworkGatewaySKUTierErGwScale` added to enum type `VirtualNetworkGatewaySKUTier` +- New value `WebApplicationFirewallActionJSChallenge` added to enum type `WebApplicationFirewallAction` +- New enum type `FirewallPolicyIntrusionDetectionProfileType` with values `FirewallPolicyIntrusionDetectionProfileTypeAdvanced`, `FirewallPolicyIntrusionDetectionProfileTypeBasic`, `FirewallPolicyIntrusionDetectionProfileTypeExtended`, `FirewallPolicyIntrusionDetectionProfileTypeStandard` +- New function `*ManagementClient.BeginDeleteBastionShareableLinkByToken(context.Context, string, string, BastionShareableLinkTokenListRequest, *ManagementClientBeginDeleteBastionShareableLinkByTokenOptions) (*runtime.Poller[ManagementClientDeleteBastionShareableLinkByTokenResponse], error)` +- New struct `BastionShareableLinkTokenListRequest` +- New struct `InternetIngressPublicIPsProperties` +- New field `HostNames` in struct `ApplicationGatewayListenerPropertiesFormat` +- New field `Profile` in struct `FirewallPolicyIntrusionDetection` +- New field `InternetIngressPublicIPs` in struct `VirtualAppliancePropertiesFormat` + + +## 4.3.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 4.3.0-beta.1 (2023-10-09) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + +## 4.2.0 (2023-09-22) +### Features Added + +- New struct `BastionHostPropertiesFormatNetworkACLs` +- New struct `IPRule` +- New struct `VirtualNetworkGatewayAutoScaleBounds` +- New struct `VirtualNetworkGatewayAutoScaleConfiguration` +- New field `NetworkACLs`, `VirtualNetwork` in struct `BastionHostPropertiesFormat` +- New field `Size` in struct `FirewallPolicyPropertiesFormat` +- New field `Size` in struct `FirewallPolicyRuleCollectionGroupProperties` +- New field `DefaultOutboundAccess` in struct `SubnetPropertiesFormat` +- New field `AutoScaleConfiguration` in struct `VirtualNetworkGatewayPropertiesFormat` + + +## 4.1.0 (2023-08-25) +### Features Added + +- New value `ApplicationGatewaySKUNameBasic` added to enum type `ApplicationGatewaySKUName` +- New value `ApplicationGatewayTierBasic` added to enum type `ApplicationGatewayTier` +- New enum type `SyncMode` with values `SyncModeAutomatic`, `SyncModeManual` +- New function `*LoadBalancersClient.MigrateToIPBased(context.Context, string, string, *LoadBalancersClientMigrateToIPBasedOptions) (LoadBalancersClientMigrateToIPBasedResponse, error)` +- New struct `MigrateLoadBalancerToIPBasedRequest` +- New struct `MigratedPools` +- New field `SyncMode` in struct `BackendAddressPoolPropertiesFormat` + + +## 4.0.0 (2023-07-11) +### Breaking Changes + +- `ApplicationGatewayCustomErrorStatusCodeHTTPStatus499` from enum `ApplicationGatewayCustomErrorStatusCode` has been removed + +### Features Added + +- New enum type `AdminState` with values `AdminStateDisabled`, `AdminStateEnabled` +- New field `ResourceGUID` in struct `AdminPropertiesFormat` +- New field `ResourceGUID` in struct `AdminRuleCollectionPropertiesFormat` +- New field `DefaultPredefinedSSLPolicy` in struct `ApplicationGatewayPropertiesFormat` +- New field `ResourceGUID` in struct `ConnectivityConfigurationProperties` +- New field `ResourceGUID` in struct `DefaultAdminPropertiesFormat` +- New field `ResourceGUID` in struct `GroupProperties` +- New field `ResourceGUID` in struct `ManagerProperties` +- New field `ResourceGUID` in struct `SecurityAdminConfigurationPropertiesFormat` +- New field `AdminState` in struct `VirtualNetworkGatewayPropertiesFormat` + + +## 3.0.0 (2023-05-26) +### Breaking Changes + +- Type of `EffectiveRouteMapRoute.Prefix` has been changed from `[]*string` to `*string` +- `LoadBalancerBackendAddressAdminStateDrain` from enum `LoadBalancerBackendAddressAdminState` has been removed +- Struct `PeerRouteList` has been removed +- Field `PeerRouteList` of struct `VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse` has been removed +- Field `PeerRouteList` of struct `VirtualHubBgpConnectionsClientListLearnedRoutesResponse` has been removed + +### Features Added + +- New value `NetworkInterfaceAuxiliaryModeAcceleratedConnections` added to enum type `NetworkInterfaceAuxiliaryMode` +- New value `WebApplicationFirewallRuleTypeRateLimitRule` added to enum type `WebApplicationFirewallRuleType` +- New enum type `ApplicationGatewayFirewallRateLimitDuration` with values `ApplicationGatewayFirewallRateLimitDurationFiveMins`, `ApplicationGatewayFirewallRateLimitDurationOneMin` +- New enum type `ApplicationGatewayFirewallUserSessionVariable` with values `ApplicationGatewayFirewallUserSessionVariableClientAddr`, `ApplicationGatewayFirewallUserSessionVariableGeoLocation`, `ApplicationGatewayFirewallUserSessionVariableNone` +- New enum type `AzureFirewallPacketCaptureFlagsType` with values `AzureFirewallPacketCaptureFlagsTypeAck`, `AzureFirewallPacketCaptureFlagsTypeFin`, `AzureFirewallPacketCaptureFlagsTypePush`, `AzureFirewallPacketCaptureFlagsTypeRst`, `AzureFirewallPacketCaptureFlagsTypeSyn`, `AzureFirewallPacketCaptureFlagsTypeUrg` +- New enum type `NetworkInterfaceAuxiliarySKU` with values `NetworkInterfaceAuxiliarySKUA1`, `NetworkInterfaceAuxiliarySKUA2`, `NetworkInterfaceAuxiliarySKUA4`, `NetworkInterfaceAuxiliarySKUA8`, `NetworkInterfaceAuxiliarySKUNone` +- New enum type `PublicIPAddressDNSSettingsDomainNameLabelScope` with values `PublicIPAddressDNSSettingsDomainNameLabelScopeNoReuse`, `PublicIPAddressDNSSettingsDomainNameLabelScopeResourceGroupReuse`, `PublicIPAddressDNSSettingsDomainNameLabelScopeSubscriptionReuse`, `PublicIPAddressDNSSettingsDomainNameLabelScopeTenantReuse` +- New enum type `ScrubbingRuleEntryMatchOperator` with values `ScrubbingRuleEntryMatchOperatorEquals`, `ScrubbingRuleEntryMatchOperatorEqualsAny` +- New enum type `ScrubbingRuleEntryMatchVariable` with values `ScrubbingRuleEntryMatchVariableRequestArgNames`, `ScrubbingRuleEntryMatchVariableRequestCookieNames`, `ScrubbingRuleEntryMatchVariableRequestHeaderNames`, `ScrubbingRuleEntryMatchVariableRequestIPAddress`, `ScrubbingRuleEntryMatchVariableRequestJSONArgNames`, `ScrubbingRuleEntryMatchVariableRequestPostArgNames` +- New enum type `ScrubbingRuleEntryState` with values `ScrubbingRuleEntryStateDisabled`, `ScrubbingRuleEntryStateEnabled` +- New enum type `WebApplicationFirewallScrubbingState` with values `WebApplicationFirewallScrubbingStateDisabled`, `WebApplicationFirewallScrubbingStateEnabled` +- New function `*AzureFirewallsClient.BeginPacketCapture(context.Context, string, string, FirewallPacketCaptureParameters, *AzureFirewallsClientBeginPacketCaptureOptions) (*runtime.Poller[AzureFirewallsClientPacketCaptureResponse], error)` +- New function `*ClientFactory.NewVirtualApplianceConnectionsClient() *VirtualApplianceConnectionsClient` +- New function `NewVirtualApplianceConnectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VirtualApplianceConnectionsClient, error)` +- New function `*VirtualApplianceConnectionsClient.BeginCreateOrUpdate(context.Context, string, string, string, VirtualApplianceConnection, *VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualApplianceConnectionsClientCreateOrUpdateResponse], error)` +- New function `*VirtualApplianceConnectionsClient.BeginDelete(context.Context, string, string, string, *VirtualApplianceConnectionsClientBeginDeleteOptions) (*runtime.Poller[VirtualApplianceConnectionsClientDeleteResponse], error)` +- New function `*VirtualApplianceConnectionsClient.Get(context.Context, string, string, string, *VirtualApplianceConnectionsClientGetOptions) (VirtualApplianceConnectionsClientGetResponse, error)` +- New function `*VirtualApplianceConnectionsClient.NewListPager(string, string, *VirtualApplianceConnectionsClientListOptions) *runtime.Pager[VirtualApplianceConnectionsClientListResponse]` +- New struct `AzureFirewallPacketCaptureFlags` +- New struct `AzureFirewallPacketCaptureRule` +- New struct `EffectiveRouteMapRouteList` +- New struct `FirewallPacketCaptureParameters` +- New struct `FirewallPacketCaptureParametersFormat` +- New struct `FirewallPolicyHTTPHeaderToInsert` +- New struct `GroupByUserSession` +- New struct `GroupByVariable` +- New struct `PolicySettingsLogScrubbing` +- New struct `PropagatedRouteTableNfv` +- New struct `RoutingConfigurationNfv` +- New struct `RoutingConfigurationNfvSubResource` +- New struct `VirtualApplianceAdditionalNicProperties` +- New struct `VirtualApplianceConnection` +- New struct `VirtualApplianceConnectionList` +- New struct `VirtualApplianceConnectionProperties` +- New struct `WebApplicationFirewallScrubbingRules` +- New field `HTTPHeadersToInsert` in struct `ApplicationRule` +- New field `EnableKerberos` in struct `BastionHostPropertiesFormat` +- New field `AuxiliarySKU` in struct `InterfacePropertiesFormat` +- New field `FileUploadEnforcement`, `LogScrubbing`, `RequestBodyEnforcement`, `RequestBodyInspectLimitInKB` in struct `PolicySettings` +- New field `PrivateEndpointLocation` in struct `PrivateEndpointConnectionProperties` +- New field `DomainNameLabelScope` in struct `PublicIPAddressDNSSettings` +- New field `InstanceName` in struct `VirtualApplianceNicProperties` +- New field `AdditionalNics`, `VirtualApplianceConnections` in struct `VirtualAppliancePropertiesFormat` +- New field `Value` in struct `VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse` +- New field `Value` in struct `VirtualHubBgpConnectionsClientListLearnedRoutesResponse` +- New anonymous field `VirtualHubEffectiveRouteList` in struct `VirtualHubsClientGetEffectiveVirtualHubRoutesResponse` +- New anonymous field `EffectiveRouteMapRouteList` in struct `VirtualHubsClientGetInboundRoutesResponse` +- New anonymous field `EffectiveRouteMapRouteList` in struct `VirtualHubsClientGetOutboundRoutesResponse` +- New field `GroupByUserSession`, `RateLimitDuration`, `RateLimitThreshold` in struct `WebApplicationFirewallCustomRule` + + +## 2.2.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + + +## 2.2.0 (2023-03-24) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module +- New value `ApplicationGatewayCustomErrorStatusCodeHTTPStatus400`, `ApplicationGatewayCustomErrorStatusCodeHTTPStatus404`, `ApplicationGatewayCustomErrorStatusCodeHTTPStatus405`, `ApplicationGatewayCustomErrorStatusCodeHTTPStatus408`, `ApplicationGatewayCustomErrorStatusCodeHTTPStatus499`, `ApplicationGatewayCustomErrorStatusCodeHTTPStatus500`, `ApplicationGatewayCustomErrorStatusCodeHTTPStatus503`, `ApplicationGatewayCustomErrorStatusCodeHTTPStatus504` added to enum type `ApplicationGatewayCustomErrorStatusCode` +- New enum type `WebApplicationFirewallState` with values `WebApplicationFirewallStateDisabled`, `WebApplicationFirewallStateEnabled` +- New field `AuthorizationStatus` in struct `ExpressRouteCircuitPropertiesFormat` +- New field `IPConfigurationID` in struct `VPNGatewaysClientBeginResetOptions` +- New field `FlowLogs` in struct `VirtualNetworkPropertiesFormat` +- New field `State` in struct `WebApplicationFirewallCustomRule` + + +## 2.1.0 (2022-12-23) +### Features Added + +- New struct `DelegationProperties` +- New struct `PartnerManagedResourceProperties` +- New field `VirtualNetwork` in struct `BackendAddressPoolPropertiesFormat` +- New field `CustomBlockResponseBody` in struct `PolicySettings` +- New field `CustomBlockResponseStatusCode` in struct `PolicySettings` +- New field `Delegation` in struct `VirtualAppliancePropertiesFormat` +- New field `DeploymentType` in struct `VirtualAppliancePropertiesFormat` +- New field `PartnerManagedResource` in struct `VirtualAppliancePropertiesFormat` + + +## 2.0.1 (2022-10-14) +### Others Changes +- Update live test dependencies + +## 2.0.0 (2022-09-29) +### Breaking Changes + +- Const `DdosCustomPolicyProtocolSyn` has been removed +- Const `DdosCustomPolicyTriggerSensitivityOverrideHigh` has been removed +- Const `DdosSettingsProtectionCoverageBasic` has been removed +- Const `DdosCustomPolicyProtocolUDP` has been removed +- Const `DdosCustomPolicyProtocolTCP` has been removed +- Const `DdosCustomPolicyTriggerSensitivityOverrideLow` has been removed +- Const `DdosCustomPolicyTriggerSensitivityOverrideDefault` has been removed +- Const `DdosSettingsProtectionCoverageStandard` has been removed +- Const `DdosCustomPolicyTriggerSensitivityOverrideRelaxed` has been removed +- Type alias `DdosSettingsProtectionCoverage` has been removed +- Type alias `DdosCustomPolicyTriggerSensitivityOverride` has been removed +- Type alias `DdosCustomPolicyProtocol` has been removed +- Function `PossibleDdosCustomPolicyProtocolValues` has been removed +- Function `PossibleDdosSettingsProtectionCoverageValues` has been removed +- Function `PossibleDdosCustomPolicyTriggerSensitivityOverrideValues` has been removed +- Struct `ProtocolCustomSettingsFormat` has been removed +- Field `PublicIPAddresses` of struct `DdosCustomPolicyPropertiesFormat` has been removed +- Field `ProtocolCustomSettings` of struct `DdosCustomPolicyPropertiesFormat` has been removed +- Field `DdosCustomPolicy` of struct `DdosSettings` has been removed +- Field `ProtectedIP` of struct `DdosSettings` has been removed +- Field `ProtectionCoverage` of struct `DdosSettings` has been removed + +### Features Added + +- New const `ApplicationGatewayWafRuleStateTypesEnabled` +- New const `RouteMapMatchConditionNotEquals` +- New const `ActionTypeBlock` +- New const `RouteMapActionTypeUnknown` +- New const `GeoAFRI` +- New const `IsWorkloadProtectedFalse` +- New const `ApplicationGatewayRuleSetStatusOptionsDeprecated` +- New const `ApplicationGatewayWafRuleActionTypesAllow` +- New const `RouteMapActionTypeRemove` +- New const `ApplicationGatewayClientRevocationOptionsNone` +- New const `NextStepContinue` +- New const `SlotTypeProduction` +- New const `NetworkIntentPolicyBasedServiceAllowRulesOnly` +- New const `ApplicationGatewayTierTypesWAFV2` +- New const `ActionTypeLog` +- New const `CommissionedStateDeprovisioned` +- New const `RouteMapMatchConditionEquals` +- New const `GeoOCEANIA` +- New const `GeoGLOBAL` +- New const `WebApplicationFirewallTransformUppercase` +- New const `NextStepUnknown` +- New const `ApplicationGatewayTierTypesWAF` +- New const `ApplicationGatewayWafRuleActionTypesNone` +- New const `CustomIPPrefixTypeSingular` +- New const `GeoME` +- New const `GeoLATAM` +- New const `ApplicationGatewayWafRuleActionTypesBlock` +- New const `ApplicationGatewayRuleSetStatusOptionsGA` +- New const `RouteMapMatchConditionUnknown` +- New const `ApplicationGatewayWafRuleStateTypesDisabled` +- New const `ApplicationGatewayTierTypesStandardV2` +- New const `VnetLocalRouteOverrideCriteriaEqual` +- New const `ManagedRuleEnabledStateEnabled` +- New const `RouteMapMatchConditionContains` +- New const `DdosSettingsProtectionModeDisabled` +- New const `ActionTypeAnomalyScoring` +- New const `ActionTypeAllow` +- New const `SlotTypeStaging` +- New const `GeoAQ` +- New const `RouteMapMatchConditionNotContains` +- New const `ApplicationGatewayClientRevocationOptionsOCSP` +- New const `RouteMapActionTypeReplace` +- New const `GeoNAM` +- New const `CustomIPPrefixTypeChild` +- New const `GeoEURO` +- New const `ExpressRoutePortsBillingTypeMeteredData` +- New const `GeoAPAC` +- New const `CustomIPPrefixTypeParent` +- New const `VnetLocalRouteOverrideCriteriaContains` +- New const `DdosSettingsProtectionModeVirtualNetworkInherited` +- New const `ApplicationGatewayWafRuleActionTypesLog` +- New const `ApplicationGatewayWafRuleActionTypesAnomalyScoring` +- New const `ApplicationGatewayRuleSetStatusOptionsSupported` +- New const `ExpressRoutePortsBillingTypeUnlimitedData` +- New const `DdosSettingsProtectionModeEnabled` +- New const `IsWorkloadProtectedTrue` +- New const `ApplicationGatewayRuleSetStatusOptionsPreview` +- New const `RouteMapActionTypeDrop` +- New const `ApplicationGatewayTierTypesStandard` +- New const `NextStepTerminate` +- New const `RouteMapActionTypeAdd` +- New type alias `DdosSettingsProtectionMode` +- New type alias `ApplicationGatewayWafRuleActionTypes` +- New type alias `ApplicationGatewayClientRevocationOptions` +- New type alias `NextStep` +- New type alias `ActionType` +- New type alias `SlotType` +- New type alias `IsWorkloadProtected` +- New type alias `RouteMapMatchCondition` +- New type alias `ApplicationGatewayWafRuleStateTypes` +- New type alias `ApplicationGatewayTierTypes` +- New type alias `CustomIPPrefixType` +- New type alias `RouteMapActionType` +- New type alias `ExpressRoutePortsBillingType` +- New type alias `ApplicationGatewayRuleSetStatusOptions` +- New type alias `Geo` +- New type alias `VnetLocalRouteOverrideCriteria` +- New function `PossibleSlotTypeValues() []SlotType` +- New function `NewVipSwapClient(string, azcore.TokenCredential, *arm.ClientOptions) (*VipSwapClient, error)` +- New function `PossibleNextStepValues() []NextStep` +- New function `*RouteMapsClient.BeginDelete(context.Context, string, string, string, *RouteMapsClientBeginDeleteOptions) (*runtime.Poller[RouteMapsClientDeleteResponse], error)` +- New function `PossibleRouteMapActionTypeValues() []RouteMapActionType` +- New function `*RouteMapsClient.Get(context.Context, string, string, string, *RouteMapsClientGetOptions) (RouteMapsClientGetResponse, error)` +- New function `*VirtualHubsClient.BeginGetOutboundRoutes(context.Context, string, string, GetOutboundRoutesParameters, *VirtualHubsClientBeginGetOutboundRoutesOptions) (*runtime.Poller[VirtualHubsClientGetOutboundRoutesResponse], error)` +- New function `PossibleGeoValues() []Geo` +- New function `PossibleApplicationGatewayClientRevocationOptionsValues() []ApplicationGatewayClientRevocationOptions` +- New function `*ApplicationGatewayWafDynamicManifestsClient.NewGetPager(string, *ApplicationGatewayWafDynamicManifestsClientGetOptions) *runtime.Pager[ApplicationGatewayWafDynamicManifestsClientGetResponse]` +- New function `*ApplicationGatewayWafDynamicManifestsDefaultClient.Get(context.Context, string, *ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions) (ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse, error)` +- New function `PossibleActionTypeValues() []ActionType` +- New function `*RouteMapsClient.NewListPager(string, string, *RouteMapsClientListOptions) *runtime.Pager[RouteMapsClientListResponse]` +- New function `PossibleApplicationGatewayTierTypesValues() []ApplicationGatewayTierTypes` +- New function `NewApplicationGatewayWafDynamicManifestsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ApplicationGatewayWafDynamicManifestsClient, error)` +- New function `PossibleApplicationGatewayRuleSetStatusOptionsValues() []ApplicationGatewayRuleSetStatusOptions` +- New function `PossibleCustomIPPrefixTypeValues() []CustomIPPrefixType` +- New function `NewApplicationGatewayWafDynamicManifestsDefaultClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ApplicationGatewayWafDynamicManifestsDefaultClient, error)` +- New function `PossibleVnetLocalRouteOverrideCriteriaValues() []VnetLocalRouteOverrideCriteria` +- New function `*VirtualHubsClient.BeginGetInboundRoutes(context.Context, string, string, GetInboundRoutesParameters, *VirtualHubsClientBeginGetInboundRoutesOptions) (*runtime.Poller[VirtualHubsClientGetInboundRoutesResponse], error)` +- New function `*VipSwapClient.Get(context.Context, string, string, *VipSwapClientGetOptions) (VipSwapClientGetResponse, error)` +- New function `*PublicIPAddressesClient.BeginDdosProtectionStatus(context.Context, string, string, *PublicIPAddressesClientBeginDdosProtectionStatusOptions) (*runtime.Poller[PublicIPAddressesClientDdosProtectionStatusResponse], error)` +- New function `PossibleExpressRoutePortsBillingTypeValues() []ExpressRoutePortsBillingType` +- New function `*VipSwapClient.List(context.Context, string, string, *VipSwapClientListOptions) (VipSwapClientListResponse, error)` +- New function `*VirtualNetworksClient.BeginListDdosProtectionStatus(context.Context, string, string, *VirtualNetworksClientBeginListDdosProtectionStatusOptions) (*runtime.Poller[*runtime.Pager[VirtualNetworksClientListDdosProtectionStatusResponse]], error)` +- New function `PossibleIsWorkloadProtectedValues() []IsWorkloadProtected` +- New function `PossibleDdosSettingsProtectionModeValues() []DdosSettingsProtectionMode` +- New function `PossibleApplicationGatewayWafRuleStateTypesValues() []ApplicationGatewayWafRuleStateTypes` +- New function `NewRouteMapsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RouteMapsClient, error)` +- New function `PossibleRouteMapMatchConditionValues() []RouteMapMatchCondition` +- New function `*VipSwapClient.BeginCreate(context.Context, string, string, SwapResource, *VipSwapClientBeginCreateOptions) (*runtime.Poller[VipSwapClientCreateResponse], error)` +- New function `PossibleApplicationGatewayWafRuleActionTypesValues() []ApplicationGatewayWafRuleActionTypes` +- New function `*RouteMapsClient.BeginCreateOrUpdate(context.Context, string, string, string, RouteMap, *RouteMapsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteMapsClientCreateOrUpdateResponse], error)` +- New struct `Action` +- New struct `ApplicationGatewayFirewallManifestRuleSet` +- New struct `ApplicationGatewayWafDynamicManifestPropertiesResult` +- New struct `ApplicationGatewayWafDynamicManifestResult` +- New struct `ApplicationGatewayWafDynamicManifestResultList` +- New struct `ApplicationGatewayWafDynamicManifestsClient` +- New struct `ApplicationGatewayWafDynamicManifestsClientGetOptions` +- New struct `ApplicationGatewayWafDynamicManifestsClientGetResponse` +- New struct `ApplicationGatewayWafDynamicManifestsDefaultClient` +- New struct `ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions` +- New struct `ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse` +- New struct `Criterion` +- New struct `DefaultRuleSetPropertyFormat` +- New struct `EffectiveRouteMapRoute` +- New struct `GetInboundRoutesParameters` +- New struct `GetOutboundRoutesParameters` +- New struct `ListRouteMapsResult` +- New struct `Parameter` +- New struct `PublicIPAddressesClientBeginDdosProtectionStatusOptions` +- New struct `PublicIPAddressesClientDdosProtectionStatusResponse` +- New struct `PublicIPDdosProtectionStatusResult` +- New struct `RouteMap` +- New struct `RouteMapProperties` +- New struct `RouteMapRule` +- New struct `RouteMapsClient` +- New struct `RouteMapsClientBeginCreateOrUpdateOptions` +- New struct `RouteMapsClientBeginDeleteOptions` +- New struct `RouteMapsClientCreateOrUpdateResponse` +- New struct `RouteMapsClientDeleteResponse` +- New struct `RouteMapsClientGetOptions` +- New struct `RouteMapsClientGetResponse` +- New struct `RouteMapsClientListOptions` +- New struct `RouteMapsClientListResponse` +- New struct `StaticRoutesConfig` +- New struct `SwapResource` +- New struct `SwapResourceListResult` +- New struct `SwapResourceProperties` +- New struct `VipSwapClient` +- New struct `VipSwapClientBeginCreateOptions` +- New struct `VipSwapClientCreateResponse` +- New struct `VipSwapClientGetOptions` +- New struct `VipSwapClientGetResponse` +- New struct `VipSwapClientListOptions` +- New struct `VipSwapClientListResponse` +- New struct `VirtualHubsClientBeginGetInboundRoutesOptions` +- New struct `VirtualHubsClientBeginGetOutboundRoutesOptions` +- New struct `VirtualHubsClientGetInboundRoutesResponse` +- New struct `VirtualHubsClientGetOutboundRoutesResponse` +- New struct `VirtualNetworkDdosProtectionStatusResult` +- New struct `VirtualNetworkGatewayPolicyGroup` +- New struct `VirtualNetworkGatewayPolicyGroupMember` +- New struct `VirtualNetworkGatewayPolicyGroupProperties` +- New struct `VirtualNetworksClientBeginListDdosProtectionStatusOptions` +- New struct `VirtualNetworksClientListDdosProtectionStatusResponse` +- New struct `VngClientConnectionConfiguration` +- New struct `VngClientConnectionConfigurationProperties` +- New field `RouteMaps` in struct `VirtualHubProperties` +- New field `Tiers` in struct `ApplicationGatewayFirewallRuleSetPropertiesFormat` +- New field `EnablePrivateLinkFastPath` in struct `VirtualNetworkGatewayConnectionListEntityPropertiesFormat` +- New field `ColoLocation` in struct `ExpressRouteLinkPropertiesFormat` +- New field `EnablePrivateLinkFastPath` in struct `VirtualNetworkGatewayConnectionPropertiesFormat` +- New field `DisableTCPStateTracking` in struct `InterfacePropertiesFormat` +- New field `Top` in struct `ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions` +- New field `Action` in struct `ManagedRuleOverride` +- New field `VngClientConnectionConfigurations` in struct `VPNClientConfiguration` +- New field `StaticRoutesConfig` in struct `VnetRoute` +- New field `AllowVirtualWanTraffic` in struct `VirtualNetworkGatewayPropertiesFormat` +- New field `VirtualNetworkGatewayPolicyGroups` in struct `VirtualNetworkGatewayPropertiesFormat` +- New field `AllowRemoteVnetTraffic` in struct `VirtualNetworkGatewayPropertiesFormat` +- New field `RuleIDString` in struct `ApplicationGatewayFirewallRule` +- New field `State` in struct `ApplicationGatewayFirewallRule` +- New field `Action` in struct `ApplicationGatewayFirewallRule` +- New field `Top` in struct `ManagerDeploymentStatusClientListOptions` +- New field `InboundRouteMap` in struct `RoutingConfiguration` +- New field `OutboundRouteMap` in struct `RoutingConfiguration` +- New field `VerifyClientRevocation` in struct `ApplicationGatewayClientAuthConfiguration` +- New field `Top` in struct `ManagementClientListActiveSecurityAdminRulesOptions` +- New field `ProbeThreshold` in struct `ProbePropertiesFormat` +- New field `AllowNonVirtualWanTraffic` in struct `ExpressRouteGatewayProperties` +- New field `Top` in struct `ManagementClientListActiveConnectivityConfigurationsOptions` +- New field `PublicIPAddresses` in struct `DdosProtectionPlanPropertiesFormat` +- New field `ProtectionMode` in struct `DdosSettings` +- New field `DdosProtectionPlan` in struct `DdosSettings` +- New field `ExpressRouteAdvertise` in struct `CustomIPPrefixPropertiesFormat` +- New field `Geo` in struct `CustomIPPrefixPropertiesFormat` +- New field `PrefixType` in struct `CustomIPPrefixPropertiesFormat` +- New field `Asn` in struct `CustomIPPrefixPropertiesFormat` +- New field `Top` in struct `ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions` +- New field `EnablePrivateLinkFastPath` in struct `ExpressRouteConnectionProperties` +- New field `BillingType` in struct `ExpressRoutePortPropertiesFormat` + + +## 1.1.0 (2022-08-05) +### Features Added + +- New const `SecurityConfigurationRuleDirectionInbound` +- New const `IsGlobalFalse` +- New const `EndpointTypeAzureVMSS` +- New const `ScopeConnectionStateConflict` +- New const `SecurityConfigurationRuleDirectionOutbound` +- New const `GroupConnectivityDirectlyConnected` +- New const `ScopeConnectionStateRejected` +- New const `ConfigurationTypeConnectivity` +- New const `AutoLearnPrivateRangesModeEnabled` +- New const `UseHubGatewayFalse` +- New const `NetworkIntentPolicyBasedServiceNone` +- New const `DeleteExistingPeeringFalse` +- New const `EffectiveAdminRuleKindDefault` +- New const `DeploymentStatusFailed` +- New const `AddressPrefixTypeIPPrefix` +- New const `AddressPrefixTypeServiceTag` +- New const `UseHubGatewayTrue` +- New const `WebApplicationFirewallOperatorAny` +- New const `SecurityConfigurationRuleAccessAlwaysAllow` +- New const `CreatedByTypeUser` +- New const `EndpointTypeAzureArcVM` +- New const `DeploymentStatusNotStarted` +- New const `SecurityConfigurationRuleProtocolTCP` +- New const `SecurityConfigurationRuleAccessDeny` +- New const `SecurityConfigurationRuleProtocolEsp` +- New const `IsGlobalTrue` +- New const `DeploymentStatusDeployed` +- New const `NetworkIntentPolicyBasedServiceAll` +- New const `SecurityConfigurationRuleProtocolUDP` +- New const `CreatedByTypeKey` +- New const `PacketCaptureTargetTypeAzureVMSS` +- New const `ApplicationGatewaySSLPolicyTypeCustomV2` +- New const `DeleteExistingPeeringTrue` +- New const `ScopeConnectionStateConnected` +- New const `ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101S` +- New const `ConnectivityTopologyMesh` +- New const `CreatedByTypeManagedIdentity` +- New const `AdminRuleKindCustom` +- New const `ApplicationGatewaySSLProtocolTLSv13` +- New const `ConnectivityTopologyHubAndSpoke` +- New const `ScopeConnectionStateRevoked` +- New const `ConfigurationTypeSecurityAdmin` +- New const `SecurityConfigurationRuleProtocolAh` +- New const `CommissionedStateCommissionedNoInternetAdvertise` +- New const `ScopeConnectionStatePending` +- New const `SecurityConfigurationRuleAccessAllow` +- New const `SecurityConfigurationRuleProtocolIcmp` +- New const `AutoLearnPrivateRangesModeDisabled` +- New const `SecurityConfigurationRuleProtocolAny` +- New const `ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101` +- New const `CreatedByTypeApplication` +- New const `GroupConnectivityNone` +- New const `EffectiveAdminRuleKindCustom` +- New const `AdminRuleKindDefault` +- New const `DeploymentStatusDeploying` +- New const `PacketCaptureTargetTypeAzureVM` +- New function `*ManagementClient.ListActiveConnectivityConfigurations(context.Context, string, string, ActiveConfigurationParameter, *ManagementClientListActiveConnectivityConfigurationsOptions) (ManagementClientListActiveConnectivityConfigurationsResponse, error)` +- New function `*ManagersClient.NewListBySubscriptionPager(*ManagersClientListBySubscriptionOptions) *runtime.Pager[ManagersClientListBySubscriptionResponse]` +- New function `NewStaticMembersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*StaticMembersClient, error)` +- New function `NewAdminRulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AdminRulesClient, error)` +- New function `*EffectiveDefaultSecurityAdminRule.GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule` +- New function `PossibleAddressPrefixTypeValues() []AddressPrefixType` +- New function `PossibleUseHubGatewayValues() []UseHubGateway` +- New function `*ScopeConnectionsClient.Delete(context.Context, string, string, string, *ScopeConnectionsClientDeleteOptions) (ScopeConnectionsClientDeleteResponse, error)` +- New function `PossibleIsGlobalValues() []IsGlobal` +- New function `*ManagementClient.ListActiveSecurityAdminRules(context.Context, string, string, ActiveConfigurationParameter, *ManagementClientListActiveSecurityAdminRulesOptions) (ManagementClientListActiveSecurityAdminRulesResponse, error)` +- New function `*ManagersClient.NewListPager(string, *ManagersClientListOptions) *runtime.Pager[ManagersClientListResponse]` +- New function `NewConnectivityConfigurationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ConnectivityConfigurationsClient, error)` +- New function `*GroupsClient.Get(context.Context, string, string, string, *GroupsClientGetOptions) (GroupsClientGetResponse, error)` +- New function `PossibleAdminRuleKindValues() []AdminRuleKind` +- New function `*ScopeConnectionsClient.Get(context.Context, string, string, string, *ScopeConnectionsClientGetOptions) (ScopeConnectionsClientGetResponse, error)` +- New function `*AdminRuleCollectionsClient.CreateOrUpdate(context.Context, string, string, string, string, AdminRuleCollection, *AdminRuleCollectionsClientCreateOrUpdateOptions) (AdminRuleCollectionsClientCreateOrUpdateResponse, error)` +- New function `PossibleScopeConnectionStateValues() []ScopeConnectionState` +- New function `*ConnectivityConfigurationsClient.NewListPager(string, string, *ConnectivityConfigurationsClientListOptions) *runtime.Pager[ConnectivityConfigurationsClientListResponse]` +- New function `*BaseAdminRule.GetBaseAdminRule() *BaseAdminRule` +- New function `PossibleSecurityConfigurationRuleProtocolValues() []SecurityConfigurationRuleProtocol` +- New function `*AdminRulesClient.CreateOrUpdate(context.Context, string, string, string, string, string, BaseAdminRuleClassification, *AdminRulesClientCreateOrUpdateOptions) (AdminRulesClientCreateOrUpdateResponse, error)` +- New function `PossibleNetworkIntentPolicyBasedServiceValues() []NetworkIntentPolicyBasedService` +- New function `*ManagementGroupNetworkManagerConnectionsClient.Delete(context.Context, string, string, *ManagementGroupNetworkManagerConnectionsClientDeleteOptions) (ManagementGroupNetworkManagerConnectionsClientDeleteResponse, error)` +- New function `PossibleSecurityConfigurationRuleAccessValues() []SecurityConfigurationRuleAccess` +- New function `*ManagersClient.BeginDelete(context.Context, string, string, *ManagersClientBeginDeleteOptions) (*runtime.Poller[ManagersClientDeleteResponse], error)` +- New function `*ManagementClient.ExpressRouteProviderPort(context.Context, string, *ManagementClientExpressRouteProviderPortOptions) (ManagementClientExpressRouteProviderPortResponse, error)` +- New function `*ActiveBaseSecurityAdminRule.GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule` +- New function `*ConnectivityConfigurationsClient.BeginDelete(context.Context, string, string, string, *ConnectivityConfigurationsClientBeginDeleteOptions) (*runtime.Poller[ConnectivityConfigurationsClientDeleteResponse], error)` +- New function `*AdminRuleCollectionsClient.BeginDelete(context.Context, string, string, string, string, *AdminRuleCollectionsClientBeginDeleteOptions) (*runtime.Poller[AdminRuleCollectionsClientDeleteResponse], error)` +- New function `*ConnectivityConfigurationsClient.CreateOrUpdate(context.Context, string, string, string, ConnectivityConfiguration, *ConnectivityConfigurationsClientCreateOrUpdateOptions) (ConnectivityConfigurationsClientCreateOrUpdateResponse, error)` +- New function `*SecurityAdminConfigurationsClient.Get(context.Context, string, string, string, *SecurityAdminConfigurationsClientGetOptions) (SecurityAdminConfigurationsClientGetResponse, error)` +- New function `*StaticMembersClient.Delete(context.Context, string, string, string, string, *StaticMembersClientDeleteOptions) (StaticMembersClientDeleteResponse, error)` +- New function `*ManagerDeploymentStatusClient.List(context.Context, string, string, ManagerDeploymentStatusParameter, *ManagerDeploymentStatusClientListOptions) (ManagerDeploymentStatusClientListResponse, error)` +- New function `*SubscriptionNetworkManagerConnectionsClient.Delete(context.Context, string, *SubscriptionNetworkManagerConnectionsClientDeleteOptions) (SubscriptionNetworkManagerConnectionsClientDeleteResponse, error)` +- New function `PossibleEffectiveAdminRuleKindValues() []EffectiveAdminRuleKind` +- New function `*AdminRulesClient.NewListPager(string, string, string, string, *AdminRulesClientListOptions) *runtime.Pager[AdminRulesClientListResponse]` +- New function `*GroupsClient.NewListPager(string, string, *GroupsClientListOptions) *runtime.Pager[GroupsClientListResponse]` +- New function `*GroupsClient.BeginDelete(context.Context, string, string, string, *GroupsClientBeginDeleteOptions) (*runtime.Poller[GroupsClientDeleteResponse], error)` +- New function `*StaticMembersClient.NewListPager(string, string, string, *StaticMembersClientListOptions) *runtime.Pager[StaticMembersClientListResponse]` +- New function `NewGroupsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GroupsClient, error)` +- New function `PossibleCreatedByTypeValues() []CreatedByType` +- New function `PossibleAutoLearnPrivateRangesModeValues() []AutoLearnPrivateRangesMode` +- New function `*ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate(context.Context, string, string, ManagerConnection, *ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions) (ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse, error)` +- New function `*GroupsClient.CreateOrUpdate(context.Context, string, string, string, Group, *GroupsClientCreateOrUpdateOptions) (GroupsClientCreateOrUpdateResponse, error)` +- New function `*ActiveSecurityAdminRule.GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule` +- New function `*AdminRuleCollectionsClient.Get(context.Context, string, string, string, string, *AdminRuleCollectionsClientGetOptions) (AdminRuleCollectionsClientGetResponse, error)` +- New function `*ManagersClient.CreateOrUpdate(context.Context, string, string, Manager, *ManagersClientCreateOrUpdateOptions) (ManagersClientCreateOrUpdateResponse, error)` +- New function `*SubscriptionNetworkManagerConnectionsClient.NewListPager(*SubscriptionNetworkManagerConnectionsClientListOptions) *runtime.Pager[SubscriptionNetworkManagerConnectionsClientListResponse]` +- New function `*AdminRule.GetBaseAdminRule() *BaseAdminRule` +- New function `*AdminRulesClient.Get(context.Context, string, string, string, string, string, *AdminRulesClientGetOptions) (AdminRulesClientGetResponse, error)` +- New function `PossiblePacketCaptureTargetTypeValues() []PacketCaptureTargetType` +- New function `*ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules(context.Context, string, string, QueryRequestOptions, *ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions) (ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse, error)` +- New function `*ManagementGroupNetworkManagerConnectionsClient.Get(context.Context, string, string, *ManagementGroupNetworkManagerConnectionsClientGetOptions) (ManagementGroupNetworkManagerConnectionsClientGetResponse, error)` +- New function `NewExpressRouteProviderPortsLocationClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ExpressRouteProviderPortsLocationClient, error)` +- New function `*DefaultAdminRule.GetBaseAdminRule() *BaseAdminRule` +- New function `*ConnectivityConfigurationsClient.Get(context.Context, string, string, string, *ConnectivityConfigurationsClientGetOptions) (ConnectivityConfigurationsClientGetResponse, error)` +- New function `NewManagersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagersClient, error)` +- New function `*SubscriptionNetworkManagerConnectionsClient.Get(context.Context, string, *SubscriptionNetworkManagerConnectionsClientGetOptions) (SubscriptionNetworkManagerConnectionsClientGetResponse, error)` +- New function `*EffectiveSecurityAdminRule.GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule` +- New function `*EffectiveBaseSecurityAdminRule.GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule` +- New function `NewScopeConnectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ScopeConnectionsClient, error)` +- New function `NewAdminRuleCollectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AdminRuleCollectionsClient, error)` +- New function `*ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations(context.Context, string, string, QueryRequestOptions, *ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions) (ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse, error)` +- New function `PossibleGroupConnectivityValues() []GroupConnectivity` +- New function `NewSubscriptionNetworkManagerConnectionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SubscriptionNetworkManagerConnectionsClient, error)` +- New function `*AzureFirewallsClient.BeginListLearnedPrefixes(context.Context, string, string, *AzureFirewallsClientBeginListLearnedPrefixesOptions) (*runtime.Poller[AzureFirewallsClientListLearnedPrefixesResponse], error)` +- New function `*ManagersClient.Patch(context.Context, string, string, PatchObject, *ManagersClientPatchOptions) (ManagersClientPatchResponse, error)` +- New function `*ManagersClient.Get(context.Context, string, string, *ManagersClientGetOptions) (ManagersClientGetResponse, error)` +- New function `*StaticMembersClient.CreateOrUpdate(context.Context, string, string, string, string, StaticMember, *StaticMembersClientCreateOrUpdateOptions) (StaticMembersClientCreateOrUpdateResponse, error)` +- New function `*AdminRuleCollectionsClient.NewListPager(string, string, string, *AdminRuleCollectionsClientListOptions) *runtime.Pager[AdminRuleCollectionsClientListResponse]` +- New function `*ScopeConnectionsClient.NewListPager(string, string, *ScopeConnectionsClientListOptions) *runtime.Pager[ScopeConnectionsClientListResponse]` +- New function `*ActiveDefaultSecurityAdminRule.GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule` +- New function `*ExpressRouteProviderPortsLocationClient.List(context.Context, *ExpressRouteProviderPortsLocationClientListOptions) (ExpressRouteProviderPortsLocationClientListResponse, error)` +- New function `*ManagerCommitsClient.BeginPost(context.Context, string, string, ManagerCommit, *ManagerCommitsClientBeginPostOptions) (*runtime.Poller[ManagerCommitsClientPostResponse], error)` +- New function `NewManagerCommitsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagerCommitsClient, error)` +- New function `PossibleConfigurationTypeValues() []ConfigurationType` +- New function `NewManagerDeploymentStatusClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagerDeploymentStatusClient, error)` +- New function `*ScopeConnectionsClient.CreateOrUpdate(context.Context, string, string, string, ScopeConnection, *ScopeConnectionsClientCreateOrUpdateOptions) (ScopeConnectionsClientCreateOrUpdateResponse, error)` +- New function `*SecurityAdminConfigurationsClient.CreateOrUpdate(context.Context, string, string, string, SecurityAdminConfiguration, *SecurityAdminConfigurationsClientCreateOrUpdateOptions) (SecurityAdminConfigurationsClientCreateOrUpdateResponse, error)` +- New function `NewManagementGroupNetworkManagerConnectionsClient(azcore.TokenCredential, *arm.ClientOptions) (*ManagementGroupNetworkManagerConnectionsClient, error)` +- New function `PossibleDeleteExistingPeeringValues() []DeleteExistingPeering` +- New function `PossibleDeploymentStatusValues() []DeploymentStatus` +- New function `*ManagementGroupNetworkManagerConnectionsClient.NewListPager(string, *ManagementGroupNetworkManagerConnectionsClientListOptions) *runtime.Pager[ManagementGroupNetworkManagerConnectionsClientListResponse]` +- New function `*SecurityAdminConfigurationsClient.NewListPager(string, string, *SecurityAdminConfigurationsClientListOptions) *runtime.Pager[SecurityAdminConfigurationsClientListResponse]` +- New function `PossibleConnectivityTopologyValues() []ConnectivityTopology` +- New function `*StaticMembersClient.Get(context.Context, string, string, string, string, *StaticMembersClientGetOptions) (StaticMembersClientGetResponse, error)` +- New function `PossibleSecurityConfigurationRuleDirectionValues() []SecurityConfigurationRuleDirection` +- New function `*SecurityAdminConfigurationsClient.BeginDelete(context.Context, string, string, string, *SecurityAdminConfigurationsClientBeginDeleteOptions) (*runtime.Poller[SecurityAdminConfigurationsClientDeleteResponse], error)` +- New function `NewSecurityAdminConfigurationsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SecurityAdminConfigurationsClient, error)` +- New function `*AdminRulesClient.BeginDelete(context.Context, string, string, string, string, string, *AdminRulesClientBeginDeleteOptions) (*runtime.Poller[AdminRulesClientDeleteResponse], error)` +- New function `*SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate(context.Context, string, ManagerConnection, *SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions) (SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse, error)` +- New struct `ActiveBaseSecurityAdminRule` +- New struct `ActiveConfigurationParameter` +- New struct `ActiveConnectivityConfiguration` +- New struct `ActiveConnectivityConfigurationsListResult` +- New struct `ActiveDefaultSecurityAdminRule` +- New struct `ActiveSecurityAdminRule` +- New struct `ActiveSecurityAdminRulesListResult` +- New struct `AddressPrefixItem` +- New struct `AdminPropertiesFormat` +- New struct `AdminRule` +- New struct `AdminRuleCollection` +- New struct `AdminRuleCollectionListResult` +- New struct `AdminRuleCollectionPropertiesFormat` +- New struct `AdminRuleCollectionsClient` +- New struct `AdminRuleCollectionsClientBeginDeleteOptions` +- New struct `AdminRuleCollectionsClientCreateOrUpdateOptions` +- New struct `AdminRuleCollectionsClientCreateOrUpdateResponse` +- New struct `AdminRuleCollectionsClientDeleteResponse` +- New struct `AdminRuleCollectionsClientGetOptions` +- New struct `AdminRuleCollectionsClientGetResponse` +- New struct `AdminRuleCollectionsClientListOptions` +- New struct `AdminRuleCollectionsClientListResponse` +- New struct `AdminRuleListResult` +- New struct `AdminRulesClient` +- New struct `AdminRulesClientBeginDeleteOptions` +- New struct `AdminRulesClientCreateOrUpdateOptions` +- New struct `AdminRulesClientCreateOrUpdateResponse` +- New struct `AdminRulesClientDeleteResponse` +- New struct `AdminRulesClientGetOptions` +- New struct `AdminRulesClientGetResponse` +- New struct `AdminRulesClientListOptions` +- New struct `AdminRulesClientListResponse` +- New struct `AzureFirewallsClientBeginListLearnedPrefixesOptions` +- New struct `AzureFirewallsClientListLearnedPrefixesResponse` +- New struct `BaseAdminRule` +- New struct `ChildResource` +- New struct `ConfigurationGroup` +- New struct `ConnectivityConfiguration` +- New struct `ConnectivityConfigurationListResult` +- New struct `ConnectivityConfigurationProperties` +- New struct `ConnectivityConfigurationsClient` +- New struct `ConnectivityConfigurationsClientBeginDeleteOptions` +- New struct `ConnectivityConfigurationsClientCreateOrUpdateOptions` +- New struct `ConnectivityConfigurationsClientCreateOrUpdateResponse` +- New struct `ConnectivityConfigurationsClientDeleteResponse` +- New struct `ConnectivityConfigurationsClientGetOptions` +- New struct `ConnectivityConfigurationsClientGetResponse` +- New struct `ConnectivityConfigurationsClientListOptions` +- New struct `ConnectivityConfigurationsClientListResponse` +- New struct `ConnectivityGroupItem` +- New struct `CrossTenantScopes` +- New struct `DefaultAdminPropertiesFormat` +- New struct `DefaultAdminRule` +- New struct `EffectiveBaseSecurityAdminRule` +- New struct `EffectiveConnectivityConfiguration` +- New struct `EffectiveDefaultSecurityAdminRule` +- New struct `EffectiveSecurityAdminRule` +- New struct `ExpressRouteProviderPort` +- New struct `ExpressRouteProviderPortListResult` +- New struct `ExpressRouteProviderPortProperties` +- New struct `ExpressRouteProviderPortsLocationClient` +- New struct `ExpressRouteProviderPortsLocationClientListOptions` +- New struct `ExpressRouteProviderPortsLocationClientListResponse` +- New struct `Group` +- New struct `GroupListResult` +- New struct `GroupProperties` +- New struct `GroupsClient` +- New struct `GroupsClientBeginDeleteOptions` +- New struct `GroupsClientCreateOrUpdateOptions` +- New struct `GroupsClientCreateOrUpdateResponse` +- New struct `GroupsClientDeleteResponse` +- New struct `GroupsClientGetOptions` +- New struct `GroupsClientGetResponse` +- New struct `GroupsClientListOptions` +- New struct `GroupsClientListResponse` +- New struct `Hub` +- New struct `IPPrefixesList` +- New struct `ManagementClientExpressRouteProviderPortOptions` +- New struct `ManagementClientExpressRouteProviderPortResponse` +- New struct `ManagementClientListActiveConnectivityConfigurationsOptions` +- New struct `ManagementClientListActiveConnectivityConfigurationsResponse` +- New struct `ManagementClientListActiveSecurityAdminRulesOptions` +- New struct `ManagementClientListActiveSecurityAdminRulesResponse` +- New struct `ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions` +- New struct `ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse` +- New struct `ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions` +- New struct `ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse` +- New struct `ManagementGroupNetworkManagerConnectionsClient` +- New struct `ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions` +- New struct `ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse` +- New struct `ManagementGroupNetworkManagerConnectionsClientDeleteOptions` +- New struct `ManagementGroupNetworkManagerConnectionsClientDeleteResponse` +- New struct `ManagementGroupNetworkManagerConnectionsClientGetOptions` +- New struct `ManagementGroupNetworkManagerConnectionsClientGetResponse` +- New struct `ManagementGroupNetworkManagerConnectionsClientListOptions` +- New struct `ManagementGroupNetworkManagerConnectionsClientListResponse` +- New struct `Manager` +- New struct `ManagerCommit` +- New struct `ManagerCommitsClient` +- New struct `ManagerCommitsClientBeginPostOptions` +- New struct `ManagerCommitsClientPostResponse` +- New struct `ManagerConnection` +- New struct `ManagerConnectionListResult` +- New struct `ManagerConnectionProperties` +- New struct `ManagerDeploymentStatus` +- New struct `ManagerDeploymentStatusClient` +- New struct `ManagerDeploymentStatusClientListOptions` +- New struct `ManagerDeploymentStatusClientListResponse` +- New struct `ManagerDeploymentStatusListResult` +- New struct `ManagerDeploymentStatusParameter` +- New struct `ManagerEffectiveConnectivityConfigurationListResult` +- New struct `ManagerEffectiveSecurityAdminRulesListResult` +- New struct `ManagerListResult` +- New struct `ManagerProperties` +- New struct `ManagerPropertiesNetworkManagerScopes` +- New struct `ManagerSecurityGroupItem` +- New struct `ManagersClient` +- New struct `ManagersClientBeginDeleteOptions` +- New struct `ManagersClientCreateOrUpdateOptions` +- New struct `ManagersClientCreateOrUpdateResponse` +- New struct `ManagersClientDeleteResponse` +- New struct `ManagersClientGetOptions` +- New struct `ManagersClientGetResponse` +- New struct `ManagersClientListBySubscriptionOptions` +- New struct `ManagersClientListBySubscriptionResponse` +- New struct `ManagersClientListOptions` +- New struct `ManagersClientListResponse` +- New struct `ManagersClientPatchOptions` +- New struct `ManagersClientPatchResponse` +- New struct `PacketCaptureMachineScope` +- New struct `PatchObject` +- New struct `QueryRequestOptions` +- New struct `ScopeConnection` +- New struct `ScopeConnectionListResult` +- New struct `ScopeConnectionProperties` +- New struct `ScopeConnectionsClient` +- New struct `ScopeConnectionsClientCreateOrUpdateOptions` +- New struct `ScopeConnectionsClientCreateOrUpdateResponse` +- New struct `ScopeConnectionsClientDeleteOptions` +- New struct `ScopeConnectionsClientDeleteResponse` +- New struct `ScopeConnectionsClientGetOptions` +- New struct `ScopeConnectionsClientGetResponse` +- New struct `ScopeConnectionsClientListOptions` +- New struct `ScopeConnectionsClientListResponse` +- New struct `SecurityAdminConfiguration` +- New struct `SecurityAdminConfigurationListResult` +- New struct `SecurityAdminConfigurationPropertiesFormat` +- New struct `SecurityAdminConfigurationsClient` +- New struct `SecurityAdminConfigurationsClientBeginDeleteOptions` +- New struct `SecurityAdminConfigurationsClientCreateOrUpdateOptions` +- New struct `SecurityAdminConfigurationsClientCreateOrUpdateResponse` +- New struct `SecurityAdminConfigurationsClientDeleteResponse` +- New struct `SecurityAdminConfigurationsClientGetOptions` +- New struct `SecurityAdminConfigurationsClientGetResponse` +- New struct `SecurityAdminConfigurationsClientListOptions` +- New struct `SecurityAdminConfigurationsClientListResponse` +- New struct `StaticMember` +- New struct `StaticMemberListResult` +- New struct `StaticMemberProperties` +- New struct `StaticMembersClient` +- New struct `StaticMembersClientCreateOrUpdateOptions` +- New struct `StaticMembersClientCreateOrUpdateResponse` +- New struct `StaticMembersClientDeleteOptions` +- New struct `StaticMembersClientDeleteResponse` +- New struct `StaticMembersClientGetOptions` +- New struct `StaticMembersClientGetResponse` +- New struct `StaticMembersClientListOptions` +- New struct `StaticMembersClientListResponse` +- New struct `SubscriptionNetworkManagerConnectionsClient` +- New struct `SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions` +- New struct `SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse` +- New struct `SubscriptionNetworkManagerConnectionsClientDeleteOptions` +- New struct `SubscriptionNetworkManagerConnectionsClientDeleteResponse` +- New struct `SubscriptionNetworkManagerConnectionsClientGetOptions` +- New struct `SubscriptionNetworkManagerConnectionsClientGetResponse` +- New struct `SubscriptionNetworkManagerConnectionsClientListOptions` +- New struct `SubscriptionNetworkManagerConnectionsClientListResponse` +- New struct `SystemData` +- New struct `VirtualRouterAutoScaleConfiguration` +- New field `NoInternetAdvertise` in struct `CustomIPPrefixPropertiesFormat` +- New field `FlushConnection` in struct `SecurityGroupPropertiesFormat` +- New field `EnablePacFile` in struct `ExplicitProxySettings` +- New field `Scope` in struct `PacketCaptureParameters` +- New field `TargetType` in struct `PacketCaptureParameters` +- New field `Scope` in struct `PacketCaptureResultProperties` +- New field `TargetType` in struct `PacketCaptureResultProperties` +- New field `AutoLearnPrivateRanges` in struct `FirewallPolicySNAT` +- New field `VirtualRouterAutoScaleConfiguration` in struct `VirtualHubProperties` +- New field `Priority` in struct `ApplicationGatewayRoutingRulePropertiesFormat` + + +## 1.0.0 (2022-05-16) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/README.md new file mode 100644 index 00000000..c4348574 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/README.md @@ -0,0 +1,100 @@ +# Azure Network Module for Go + +The `armnetwork` module provides operations for working with Azure Network. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/network/armnetwork) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Network module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Network. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Network module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armnetwork.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armnetwork.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewAdminRuleCollectionsClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## More sample code + +- [Creating a Fake](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/resourcemanager/network/armnetwork/fake_example_test.go) +- [IP Address](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/ipaddress) +- [Load Balancer](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/loadbalancer) +- [Network Interface](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/networkInterface) +- [Security Group](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/securitygroups) +- [Subnet](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/subnets) +- [Virtual Network](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/network/virtualnetwork) + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Network` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/adminrulecollections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/adminrulecollections_client.go new file mode 100644 index 00000000..9a4c50e8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/adminrulecollections_client.go @@ -0,0 +1,366 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// AdminRuleCollectionsClient contains the methods for the AdminRuleCollections group. +// Don't use this type directly, use NewAdminRuleCollectionsClient() instead. +type AdminRuleCollectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAdminRuleCollectionsClient creates a new instance of AdminRuleCollectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAdminRuleCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdminRuleCollectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AdminRuleCollectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates an admin rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleCollection - The Rule Collection to create or update +// - options - AdminRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the AdminRuleCollectionsClient.CreateOrUpdate +// method. +func (client *AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleCollection AdminRuleCollection, options *AdminRuleCollectionsClientCreateOrUpdateOptions) (AdminRuleCollectionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AdminRuleCollectionsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleCollection, options) + if err != nil { + return AdminRuleCollectionsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AdminRuleCollectionsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AdminRuleCollectionsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AdminRuleCollectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleCollection AdminRuleCollection, options *AdminRuleCollectionsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, ruleCollection); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *AdminRuleCollectionsClient) createOrUpdateHandleResponse(resp *http.Response) (AdminRuleCollectionsClientCreateOrUpdateResponse, error) { + result := AdminRuleCollectionsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AdminRuleCollection); err != nil { + return AdminRuleCollectionsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes an admin rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - options - AdminRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the AdminRuleCollectionsClient.BeginDelete +// method. +func (client *AdminRuleCollectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientBeginDeleteOptions) (*runtime.Poller[AdminRuleCollectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AdminRuleCollectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AdminRuleCollectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an admin rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *AdminRuleCollectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AdminRuleCollectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AdminRuleCollectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a network manager security admin configuration rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - options - AdminRuleCollectionsClientGetOptions contains the optional parameters for the AdminRuleCollectionsClient.Get +// method. +func (client *AdminRuleCollectionsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientGetOptions) (AdminRuleCollectionsClientGetResponse, error) { + var err error + const operationName = "AdminRuleCollectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + if err != nil { + return AdminRuleCollectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AdminRuleCollectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AdminRuleCollectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AdminRuleCollectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AdminRuleCollectionsClient) getHandleResponse(resp *http.Response) (AdminRuleCollectionsClientGetResponse, error) { + result := AdminRuleCollectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AdminRuleCollection); err != nil { + return AdminRuleCollectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the rule collections in a security admin configuration, in a paginated format. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - options - AdminRuleCollectionsClientListOptions contains the optional parameters for the AdminRuleCollectionsClient.NewListPager +// method. +func (client *AdminRuleCollectionsClient) NewListPager(resourceGroupName string, networkManagerName string, configurationName string, options *AdminRuleCollectionsClientListOptions) *runtime.Pager[AdminRuleCollectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AdminRuleCollectionsClientListResponse]{ + More: func(page AdminRuleCollectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AdminRuleCollectionsClientListResponse) (AdminRuleCollectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AdminRuleCollectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + }, nil) + if err != nil { + return AdminRuleCollectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AdminRuleCollectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *AdminRuleCollectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AdminRuleCollectionsClient) listHandleResponse(resp *http.Response) (AdminRuleCollectionsClientListResponse, error) { + result := AdminRuleCollectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AdminRuleCollectionListResult); err != nil { + return AdminRuleCollectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/adminrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/adminrules_client.go new file mode 100644 index 00000000..e6787b35 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/adminrules_client.go @@ -0,0 +1,383 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// AdminRulesClient contains the methods for the AdminRules group. +// Don't use this type directly, use NewAdminRulesClient() instead. +type AdminRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAdminRulesClient creates a new instance of AdminRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAdminRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdminRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AdminRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates an admin rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleName - The name of the rule. +// - adminRule - The admin rule to create or update +// - options - AdminRulesClientCreateOrUpdateOptions contains the optional parameters for the AdminRulesClient.CreateOrUpdate +// method. +func (client *AdminRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, adminRule BaseAdminRuleClassification, options *AdminRulesClientCreateOrUpdateOptions) (AdminRulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AdminRulesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, adminRule, options) + if err != nil { + return AdminRulesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AdminRulesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return AdminRulesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AdminRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, adminRule BaseAdminRuleClassification, options *AdminRulesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, adminRule); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *AdminRulesClient) createOrUpdateHandleResponse(resp *http.Response) (AdminRulesClientCreateOrUpdateResponse, error) { + result := AdminRulesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { + return AdminRulesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes an admin rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleName - The name of the rule. +// - options - AdminRulesClientBeginDeleteOptions contains the optional parameters for the AdminRulesClient.BeginDelete method. +func (client *AdminRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientBeginDeleteOptions) (*runtime.Poller[AdminRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AdminRulesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AdminRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an admin rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *AdminRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AdminRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AdminRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a network manager security configuration admin rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleName - The name of the rule. +// - options - AdminRulesClientGetOptions contains the optional parameters for the AdminRulesClient.Get method. +func (client *AdminRulesClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientGetOptions) (AdminRulesClientGetResponse, error) { + var err error + const operationName = "AdminRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) + if err != nil { + return AdminRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AdminRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AdminRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AdminRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AdminRulesClient) getHandleResponse(resp *http.Response) (AdminRulesClientGetResponse, error) { + result := AdminRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { + return AdminRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all network manager security configuration admin rules. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - options - AdminRulesClientListOptions contains the optional parameters for the AdminRulesClient.NewListPager method. +func (client *AdminRulesClient) NewListPager(resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRulesClientListOptions) *runtime.Pager[AdminRulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AdminRulesClientListResponse]{ + More: func(page AdminRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AdminRulesClientListResponse) (AdminRulesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AdminRulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + }, nil) + if err != nil { + return AdminRulesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AdminRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AdminRulesClient) listHandleResponse(resp *http.Response) (AdminRulesClientListResponse, error) { + result := AdminRulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AdminRuleListResult); err != nil { + return AdminRulesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewayprivateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewayprivateendpointconnections_client.go new file mode 100644 index 00000000..08621ae7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewayprivateendpointconnections_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ApplicationGatewayPrivateEndpointConnectionsClient contains the methods for the ApplicationGatewayPrivateEndpointConnections group. +// Don't use this type directly, use NewApplicationGatewayPrivateEndpointConnectionsClient() instead. +type ApplicationGatewayPrivateEndpointConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApplicationGatewayPrivateEndpointConnectionsClient creates a new instance of ApplicationGatewayPrivateEndpointConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApplicationGatewayPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApplicationGatewayPrivateEndpointConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginDelete - Deletes the specified private endpoint connection on application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - connectionName - The name of the application gateway private endpoint connection. +// - options - ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the +// ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete method. +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, applicationGatewayName, connectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified private endpoint connection on application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationGatewayName, connectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified private endpoint connection on application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - connectionName - The name of the application gateway private endpoint connection. +// - options - ApplicationGatewayPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.Get +// method. +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientGetOptions) (ApplicationGatewayPrivateEndpointConnectionsClientGetResponse, error) { + var err error + const operationName = "ApplicationGatewayPrivateEndpointConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGatewayName, connectionName, options) + if err != nil { + return ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) getHandleResponse(resp *http.Response) (ApplicationGatewayPrivateEndpointConnectionsClientGetResponse, error) { + result := ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayPrivateEndpointConnection); err != nil { + return ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all private endpoint connections on an application gateway. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager +// method. +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateEndpointConnectionsClientListOptions) *runtime.Pager[ApplicationGatewayPrivateEndpointConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationGatewayPrivateEndpointConnectionsClientListResponse]{ + More: func(page ApplicationGatewayPrivateEndpointConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationGatewayPrivateEndpointConnectionsClientListResponse) (ApplicationGatewayPrivateEndpointConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + }, nil) + if err != nil { + return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateEndpointConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) listHandleResponse(resp *http.Response) (ApplicationGatewayPrivateEndpointConnectionsClientListResponse, error) { + result := ApplicationGatewayPrivateEndpointConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayPrivateEndpointConnectionListResult); err != nil { + return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, err + } + return result, nil +} + +// BeginUpdate - Updates the specified private endpoint connection on application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - connectionName - The name of the application gateway private endpoint connection. +// - parameters - Parameters supplied to update application gateway private endpoint connection operation. +// - options - ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the +// ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate method. +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions) (*runtime.Poller[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, applicationGatewayName, connectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Updates the specified private endpoint connection on application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) update(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, applicationGatewayName, connectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewayprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewayprivatelinkresources_client.go new file mode 100644 index 00000000..bffc0442 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewayprivatelinkresources_client.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ApplicationGatewayPrivateLinkResourcesClient contains the methods for the ApplicationGatewayPrivateLinkResources group. +// Don't use this type directly, use NewApplicationGatewayPrivateLinkResourcesClient() instead. +type ApplicationGatewayPrivateLinkResourcesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApplicationGatewayPrivateLinkResourcesClient creates a new instance of ApplicationGatewayPrivateLinkResourcesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApplicationGatewayPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayPrivateLinkResourcesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApplicationGatewayPrivateLinkResourcesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Lists all private link resources on an application gateway. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.NewListPager +// method. +func (client *ApplicationGatewayPrivateLinkResourcesClient) NewListPager(resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateLinkResourcesClientListOptions) *runtime.Pager[ApplicationGatewayPrivateLinkResourcesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationGatewayPrivateLinkResourcesClientListResponse]{ + More: func(page ApplicationGatewayPrivateLinkResourcesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationGatewayPrivateLinkResourcesClientListResponse) (ApplicationGatewayPrivateLinkResourcesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewayPrivateLinkResourcesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + }, nil) + if err != nil { + return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ApplicationGatewayPrivateLinkResourcesClient) listCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateLinkResourcesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateLinkResources" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ApplicationGatewayPrivateLinkResourcesClient) listHandleResponse(resp *http.Response) (ApplicationGatewayPrivateLinkResourcesClientListResponse, error) { + result := ApplicationGatewayPrivateLinkResourcesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayPrivateLinkResourceListResult); err != nil { + return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgateways_client.go new file mode 100644 index 00000000..0ccdcae6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgateways_client.go @@ -0,0 +1,1161 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ApplicationGatewaysClient contains the methods for the ApplicationGateways group. +// Don't use this type directly, use NewApplicationGatewaysClient() instead. +type ApplicationGatewaysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApplicationGatewaysClient creates a new instance of ApplicationGatewaysClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApplicationGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewaysClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApplicationGatewaysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginBackendHealth - Gets the backend health of the specified application gateway in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewaysClientBeginBackendHealthOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealth +// method. +func (client *ApplicationGatewaysClient) BeginBackendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginBackendHealthOptions) (*runtime.Poller[ApplicationGatewaysClientBackendHealthResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.backendHealth(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientBackendHealthResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientBackendHealthResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// BackendHealth - Gets the backend health of the specified application gateway in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ApplicationGatewaysClient) backendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginBackendHealthOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationGatewaysClient.BeginBackendHealth" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.backendHealthCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// backendHealthCreateRequest creates the BackendHealth request. +func (client *ApplicationGatewaysClient) backendHealthCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginBackendHealthOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginBackendHealthOnDemand - Gets the backend health for given combination of backend pool and http setting of the specified +// application gateway in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - probeRequest - Request body for on-demand test probe operation. +// - options - ApplicationGatewaysClientBeginBackendHealthOnDemandOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealthOnDemand +// method. +func (client *ApplicationGatewaysClient) BeginBackendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, options *ApplicationGatewaysClientBeginBackendHealthOnDemandOptions) (*runtime.Poller[ApplicationGatewaysClientBackendHealthOnDemandResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.backendHealthOnDemand(ctx, resourceGroupName, applicationGatewayName, probeRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientBackendHealthOnDemandResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientBackendHealthOnDemandResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// BackendHealthOnDemand - Gets the backend health for given combination of backend pool and http setting of the specified +// application gateway in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ApplicationGatewaysClient) backendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, options *ApplicationGatewaysClientBeginBackendHealthOnDemandOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationGatewaysClient.BeginBackendHealthOnDemand" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.backendHealthOnDemandCreateRequest(ctx, resourceGroupName, applicationGatewayName, probeRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// backendHealthOnDemandCreateRequest creates the BackendHealthOnDemand request. +func (client *ApplicationGatewaysClient) backendHealthOnDemandCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, options *ApplicationGatewaysClientBeginBackendHealthOnDemandOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, probeRequest); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - parameters - Parameters supplied to the create or update application gateway operation. +// - options - ApplicationGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationGatewaysClient.BeginCreateOrUpdate +// method. +func (client *ApplicationGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, options *ApplicationGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationGatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ApplicationGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, options *ApplicationGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationGatewaysClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationGatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ApplicationGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, options *ApplicationGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewaysClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewaysClient.BeginDelete +// method. +func (client *ApplicationGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginDeleteOptions) (*runtime.Poller[ApplicationGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ApplicationGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationGatewaysClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ApplicationGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewaysClientGetOptions contains the optional parameters for the ApplicationGatewaysClient.Get method. +func (client *ApplicationGatewaysClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientGetOptions) (ApplicationGatewaysClientGetResponse, error) { + var err error + const operationName = "ApplicationGatewaysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return ApplicationGatewaysClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGatewaysClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGatewaysClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ApplicationGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ApplicationGatewaysClient) getHandleResponse(resp *http.Response) (ApplicationGatewaysClientGetResponse, error) { + result := ApplicationGatewaysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGateway); err != nil { + return ApplicationGatewaysClientGetResponse{}, err + } + return result, nil +} + +// GetSSLPredefinedPolicy - Gets Ssl predefined policy with the specified policy name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - predefinedPolicyName - Name of Ssl predefined policy. +// - options - ApplicationGatewaysClientGetSSLPredefinedPolicyOptions contains the optional parameters for the ApplicationGatewaysClient.GetSSLPredefinedPolicy +// method. +func (client *ApplicationGatewaysClient) GetSSLPredefinedPolicy(ctx context.Context, predefinedPolicyName string, options *ApplicationGatewaysClientGetSSLPredefinedPolicyOptions) (ApplicationGatewaysClientGetSSLPredefinedPolicyResponse, error) { + var err error + const operationName = "ApplicationGatewaysClient.GetSSLPredefinedPolicy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSSLPredefinedPolicyCreateRequest(ctx, predefinedPolicyName, options) + if err != nil { + return ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{}, err + } + resp, err := client.getSSLPredefinedPolicyHandleResponse(httpResp) + return resp, err +} + +// getSSLPredefinedPolicyCreateRequest creates the GetSSLPredefinedPolicy request. +func (client *ApplicationGatewaysClient) getSSLPredefinedPolicyCreateRequest(ctx context.Context, predefinedPolicyName string, options *ApplicationGatewaysClientGetSSLPredefinedPolicyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if predefinedPolicyName == "" { + return nil, errors.New("parameter predefinedPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{predefinedPolicyName}", url.PathEscape(predefinedPolicyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSSLPredefinedPolicyHandleResponse handles the GetSSLPredefinedPolicy response. +func (client *ApplicationGatewaysClient) getSSLPredefinedPolicyHandleResponse(resp *http.Response) (ApplicationGatewaysClientGetSSLPredefinedPolicyResponse, error) { + result := ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewaySSLPredefinedPolicy); err != nil { + return ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all application gateways in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.NewListPager +// method. +func (client *ApplicationGatewaysClient) NewListPager(resourceGroupName string, options *ApplicationGatewaysClientListOptions) *runtime.Pager[ApplicationGatewaysClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationGatewaysClientListResponse]{ + More: func(page ApplicationGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListResponse) (ApplicationGatewaysClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewaysClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ApplicationGatewaysClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ApplicationGatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ApplicationGatewaysClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ApplicationGatewaysClient) listHandleResponse(resp *http.Response) (ApplicationGatewaysClientListResponse, error) { + result := ApplicationGatewaysClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayListResult); err != nil { + return ApplicationGatewaysClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the application gateways in a subscription. +// +// Generated from API version 2024-05-01 +// - options - ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAllPager +// method. +func (client *ApplicationGatewaysClient) NewListAllPager(options *ApplicationGatewaysClientListAllOptions) *runtime.Pager[ApplicationGatewaysClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationGatewaysClientListAllResponse]{ + More: func(page ApplicationGatewaysClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListAllResponse) (ApplicationGatewaysClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewaysClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return ApplicationGatewaysClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *ApplicationGatewaysClient) listAllCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *ApplicationGatewaysClient) listAllHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAllResponse, error) { + result := ApplicationGatewaysClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayListResult); err != nil { + return ApplicationGatewaysClientListAllResponse{}, err + } + return result, nil +} + +// ListAvailableRequestHeaders - Lists all available request headers. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - options - ApplicationGatewaysClientListAvailableRequestHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableRequestHeaders +// method. +func (client *ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context, options *ApplicationGatewaysClientListAvailableRequestHeadersOptions) (ApplicationGatewaysClientListAvailableRequestHeadersResponse, error) { + var err error + const operationName = "ApplicationGatewaysClient.ListAvailableRequestHeaders" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listAvailableRequestHeadersCreateRequest(ctx, options) + if err != nil { + return ApplicationGatewaysClientListAvailableRequestHeadersResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGatewaysClientListAvailableRequestHeadersResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGatewaysClientListAvailableRequestHeadersResponse{}, err + } + resp, err := client.listAvailableRequestHeadersHandleResponse(httpResp) + return resp, err +} + +// listAvailableRequestHeadersCreateRequest creates the ListAvailableRequestHeaders request. +func (client *ApplicationGatewaysClient) listAvailableRequestHeadersCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableRequestHeadersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAvailableRequestHeadersHandleResponse handles the ListAvailableRequestHeaders response. +func (client *ApplicationGatewaysClient) listAvailableRequestHeadersHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableRequestHeadersResponse, error) { + result := ApplicationGatewaysClientListAvailableRequestHeadersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringArray); err != nil { + return ApplicationGatewaysClientListAvailableRequestHeadersResponse{}, err + } + return result, nil +} + +// ListAvailableResponseHeaders - Lists all available response headers. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - options - ApplicationGatewaysClientListAvailableResponseHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableResponseHeaders +// method. +func (client *ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context, options *ApplicationGatewaysClientListAvailableResponseHeadersOptions) (ApplicationGatewaysClientListAvailableResponseHeadersResponse, error) { + var err error + const operationName = "ApplicationGatewaysClient.ListAvailableResponseHeaders" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listAvailableResponseHeadersCreateRequest(ctx, options) + if err != nil { + return ApplicationGatewaysClientListAvailableResponseHeadersResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGatewaysClientListAvailableResponseHeadersResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGatewaysClientListAvailableResponseHeadersResponse{}, err + } + resp, err := client.listAvailableResponseHeadersHandleResponse(httpResp) + return resp, err +} + +// listAvailableResponseHeadersCreateRequest creates the ListAvailableResponseHeaders request. +func (client *ApplicationGatewaysClient) listAvailableResponseHeadersCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableResponseHeadersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAvailableResponseHeadersHandleResponse handles the ListAvailableResponseHeaders response. +func (client *ApplicationGatewaysClient) listAvailableResponseHeadersHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableResponseHeadersResponse, error) { + result := ApplicationGatewaysClientListAvailableResponseHeadersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringArray); err != nil { + return ApplicationGatewaysClientListAvailableResponseHeadersResponse{}, err + } + return result, nil +} + +// ListAvailableSSLOptions - Lists available Ssl options for configuring Ssl policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - options - ApplicationGatewaysClientListAvailableSSLOptionsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLOptions +// method. +func (client *ApplicationGatewaysClient) ListAvailableSSLOptions(ctx context.Context, options *ApplicationGatewaysClientListAvailableSSLOptionsOptions) (ApplicationGatewaysClientListAvailableSSLOptionsResponse, error) { + var err error + const operationName = "ApplicationGatewaysClient.ListAvailableSSLOptions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listAvailableSSLOptionsCreateRequest(ctx, options) + if err != nil { + return ApplicationGatewaysClientListAvailableSSLOptionsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGatewaysClientListAvailableSSLOptionsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGatewaysClientListAvailableSSLOptionsResponse{}, err + } + resp, err := client.listAvailableSSLOptionsHandleResponse(httpResp) + return resp, err +} + +// listAvailableSSLOptionsCreateRequest creates the ListAvailableSSLOptions request. +func (client *ApplicationGatewaysClient) listAvailableSSLOptionsCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableSSLOptionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAvailableSSLOptionsHandleResponse handles the ListAvailableSSLOptions response. +func (client *ApplicationGatewaysClient) listAvailableSSLOptionsHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableSSLOptionsResponse, error) { + result := ApplicationGatewaysClientListAvailableSSLOptionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayAvailableSSLOptions); err != nil { + return ApplicationGatewaysClientListAvailableSSLOptionsResponse{}, err + } + return result, nil +} + +// NewListAvailableSSLPredefinedPoliciesPager - Lists all SSL predefined policies for configuring Ssl policy. +// +// Generated from API version 2024-05-01 +// - options - ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager +// method. +func (client *ApplicationGatewaysClient) NewListAvailableSSLPredefinedPoliciesPager(options *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions) *runtime.Pager[ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse]{ + More: func(page ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse) (ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAvailableSSLPredefinedPoliciesCreateRequest(ctx, options) + }, nil) + if err != nil { + return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, err + } + return client.listAvailableSSLPredefinedPoliciesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAvailableSSLPredefinedPoliciesCreateRequest creates the ListAvailableSSLPredefinedPolicies request. +func (client *ApplicationGatewaysClient) listAvailableSSLPredefinedPoliciesCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAvailableSSLPredefinedPoliciesHandleResponse handles the ListAvailableSSLPredefinedPolicies response. +func (client *ApplicationGatewaysClient) listAvailableSSLPredefinedPoliciesHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse, error) { + result := ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayAvailableSSLPredefinedPolicies); err != nil { + return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, err + } + return result, nil +} + +// ListAvailableServerVariables - Lists all available server variables. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - options - ApplicationGatewaysClientListAvailableServerVariablesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableServerVariables +// method. +func (client *ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context, options *ApplicationGatewaysClientListAvailableServerVariablesOptions) (ApplicationGatewaysClientListAvailableServerVariablesResponse, error) { + var err error + const operationName = "ApplicationGatewaysClient.ListAvailableServerVariables" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listAvailableServerVariablesCreateRequest(ctx, options) + if err != nil { + return ApplicationGatewaysClientListAvailableServerVariablesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGatewaysClientListAvailableServerVariablesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGatewaysClientListAvailableServerVariablesResponse{}, err + } + resp, err := client.listAvailableServerVariablesHandleResponse(httpResp) + return resp, err +} + +// listAvailableServerVariablesCreateRequest creates the ListAvailableServerVariables request. +func (client *ApplicationGatewaysClient) listAvailableServerVariablesCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableServerVariablesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAvailableServerVariablesHandleResponse handles the ListAvailableServerVariables response. +func (client *ApplicationGatewaysClient) listAvailableServerVariablesHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableServerVariablesResponse, error) { + result := ApplicationGatewaysClientListAvailableServerVariablesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StringArray); err != nil { + return ApplicationGatewaysClientListAvailableServerVariablesResponse{}, err + } + return result, nil +} + +// ListAvailableWafRuleSets - Lists all available web application firewall rule sets. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - options - ApplicationGatewaysClientListAvailableWafRuleSetsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableWafRuleSets +// method. +func (client *ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, options *ApplicationGatewaysClientListAvailableWafRuleSetsOptions) (ApplicationGatewaysClientListAvailableWafRuleSetsResponse, error) { + var err error + const operationName = "ApplicationGatewaysClient.ListAvailableWafRuleSets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listAvailableWafRuleSetsCreateRequest(ctx, options) + if err != nil { + return ApplicationGatewaysClientListAvailableWafRuleSetsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGatewaysClientListAvailableWafRuleSetsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGatewaysClientListAvailableWafRuleSetsResponse{}, err + } + resp, err := client.listAvailableWafRuleSetsHandleResponse(httpResp) + return resp, err +} + +// listAvailableWafRuleSetsCreateRequest creates the ListAvailableWafRuleSets request. +func (client *ApplicationGatewaysClient) listAvailableWafRuleSetsCreateRequest(ctx context.Context, options *ApplicationGatewaysClientListAvailableWafRuleSetsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAvailableWafRuleSetsHandleResponse handles the ListAvailableWafRuleSets response. +func (client *ApplicationGatewaysClient) listAvailableWafRuleSetsHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableWafRuleSetsResponse, error) { + result := ApplicationGatewaysClientListAvailableWafRuleSetsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayAvailableWafRuleSetsResult); err != nil { + return ApplicationGatewaysClientListAvailableWafRuleSetsResponse{}, err + } + return result, nil +} + +// BeginStart - Starts the specified application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewaysClientBeginStartOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStart +// method. +func (client *ApplicationGatewaysClient) BeginStart(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStartOptions) (*runtime.Poller[ApplicationGatewaysClientStartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.start(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientStartResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Start - Starts the specified application gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ApplicationGatewaysClient) start(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationGatewaysClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startCreateRequest creates the Start request. +func (client *ApplicationGatewaysClient) startCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStop - Stops the specified application gateway in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewaysClientBeginStopOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStop +// method. +func (client *ApplicationGatewaysClient) BeginStop(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStopOptions) (*runtime.Poller[ApplicationGatewaysClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationGatewaysClientStopResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationGatewaysClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Stop - Stops the specified application gateway in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ApplicationGatewaysClient) stop(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationGatewaysClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopCreateRequest creates the Stop request. +func (client *ApplicationGatewaysClient) stopCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// UpdateTags - Updates the specified application gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - parameters - Parameters supplied to update application gateway tags. +// - options - ApplicationGatewaysClientUpdateTagsOptions contains the optional parameters for the ApplicationGatewaysClient.UpdateTags +// method. +func (client *ApplicationGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject, options *ApplicationGatewaysClientUpdateTagsOptions) (ApplicationGatewaysClientUpdateTagsResponse, error) { + var err error + const operationName = "ApplicationGatewaysClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, applicationGatewayName, parameters, options) + if err != nil { + return ApplicationGatewaysClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGatewaysClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGatewaysClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *ApplicationGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject, options *ApplicationGatewaysClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationGatewayName == "" { + return nil, errors.New("parameter applicationGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationGatewayName}", url.PathEscape(applicationGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *ApplicationGatewaysClient) updateTagsHandleResponse(resp *http.Response) (ApplicationGatewaysClientUpdateTagsResponse, error) { + result := ApplicationGatewaysClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGateway); err != nil { + return ApplicationGatewaysClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewaywafdynamicmanifests_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewaywafdynamicmanifests_client.go new file mode 100644 index 00000000..45d3570b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewaywafdynamicmanifests_client.go @@ -0,0 +1,105 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ApplicationGatewayWafDynamicManifestsClient contains the methods for the ApplicationGatewayWafDynamicManifests group. +// Don't use this type directly, use NewApplicationGatewayWafDynamicManifestsClient() instead. +type ApplicationGatewayWafDynamicManifestsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApplicationGatewayWafDynamicManifestsClient creates a new instance of ApplicationGatewayWafDynamicManifestsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApplicationGatewayWafDynamicManifestsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayWafDynamicManifestsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApplicationGatewayWafDynamicManifestsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewGetPager - Gets the regional application gateway waf manifest. +// +// Generated from API version 2024-05-01 +// - location - The region where the nrp are located at. +// - options - ApplicationGatewayWafDynamicManifestsClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsClient.NewGetPager +// method. +func (client *ApplicationGatewayWafDynamicManifestsClient) NewGetPager(location string, options *ApplicationGatewayWafDynamicManifestsClientGetOptions) *runtime.Pager[ApplicationGatewayWafDynamicManifestsClientGetResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationGatewayWafDynamicManifestsClientGetResponse]{ + More: func(page ApplicationGatewayWafDynamicManifestsClientGetResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationGatewayWafDynamicManifestsClientGetResponse) (ApplicationGatewayWafDynamicManifestsClientGetResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationGatewayWafDynamicManifestsClient.NewGetPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return ApplicationGatewayWafDynamicManifestsClientGetResponse{}, err + } + return client.getHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getCreateRequest creates the Get request. +func (client *ApplicationGatewayWafDynamicManifestsClient) getCreateRequest(ctx context.Context, location string, options *ApplicationGatewayWafDynamicManifestsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ApplicationGatewayWafDynamicManifestsClient) getHandleResponse(resp *http.Response) (ApplicationGatewayWafDynamicManifestsClientGetResponse, error) { + result := ApplicationGatewayWafDynamicManifestsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayWafDynamicManifestResultList); err != nil { + return ApplicationGatewayWafDynamicManifestsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewaywafdynamicmanifestsdefault_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewaywafdynamicmanifestsdefault_client.go new file mode 100644 index 00000000..b5acb342 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationgatewaywafdynamicmanifestsdefault_client.go @@ -0,0 +1,105 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ApplicationGatewayWafDynamicManifestsDefaultClient contains the methods for the ApplicationGatewayWafDynamicManifestsDefault group. +// Don't use this type directly, use NewApplicationGatewayWafDynamicManifestsDefaultClient() instead. +type ApplicationGatewayWafDynamicManifestsDefaultClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApplicationGatewayWafDynamicManifestsDefaultClient creates a new instance of ApplicationGatewayWafDynamicManifestsDefaultClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApplicationGatewayWafDynamicManifestsDefaultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayWafDynamicManifestsDefaultClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApplicationGatewayWafDynamicManifestsDefaultClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the regional application gateway waf manifest. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - location - The region where the nrp are located at. +// - options - ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsDefaultClient.Get +// method. +func (client *ApplicationGatewayWafDynamicManifestsDefaultClient) Get(ctx context.Context, location string, options *ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions) (ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse, error) { + var err error + const operationName = "ApplicationGatewayWafDynamicManifestsDefaultClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, options) + if err != nil { + return ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ApplicationGatewayWafDynamicManifestsDefaultClient) getCreateRequest(ctx context.Context, location string, options *ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/applicationGatewayWafDynamicManifests/dafault" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ApplicationGatewayWafDynamicManifestsDefaultClient) getHandleResponse(resp *http.Response) (ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse, error) { + result := ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayWafDynamicManifestResult); err != nil { + return ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationsecuritygroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationsecuritygroups_client.go new file mode 100644 index 00000000..d11fe3c1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/applicationsecuritygroups_client.go @@ -0,0 +1,452 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ApplicationSecurityGroupsClient contains the methods for the ApplicationSecurityGroups group. +// Don't use this type directly, use NewApplicationSecurityGroupsClient() instead. +type ApplicationSecurityGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewApplicationSecurityGroupsClient creates a new instance of ApplicationSecurityGroupsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewApplicationSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationSecurityGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ApplicationSecurityGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an application security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationSecurityGroupName - The name of the application security group. +// - parameters - Parameters supplied to the create or update ApplicationSecurityGroup operation. +// - options - ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginCreateOrUpdate +// method. +func (client *ApplicationSecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, options *ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationSecurityGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationSecurityGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationSecurityGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an application security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ApplicationSecurityGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, options *ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationSecurityGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ApplicationSecurityGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, options *ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationSecurityGroupName == "" { + return nil, errors.New("parameter applicationSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationSecurityGroupName}", url.PathEscape(applicationSecurityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified application security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationSecurityGroupName - The name of the application security group. +// - options - ApplicationSecurityGroupsClientBeginDeleteOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginDelete +// method. +func (client *ApplicationSecurityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientBeginDeleteOptions) (*runtime.Poller[ApplicationSecurityGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, applicationSecurityGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ApplicationSecurityGroupsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ApplicationSecurityGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified application security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ApplicationSecurityGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ApplicationSecurityGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ApplicationSecurityGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationSecurityGroupName == "" { + return nil, errors.New("parameter applicationSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationSecurityGroupName}", url.PathEscape(applicationSecurityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets information about the specified application security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationSecurityGroupName - The name of the application security group. +// - options - ApplicationSecurityGroupsClientGetOptions contains the optional parameters for the ApplicationSecurityGroupsClient.Get +// method. +func (client *ApplicationSecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientGetOptions) (ApplicationSecurityGroupsClientGetResponse, error) { + var err error + const operationName = "ApplicationSecurityGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, options) + if err != nil { + return ApplicationSecurityGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationSecurityGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationSecurityGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ApplicationSecurityGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationSecurityGroupName == "" { + return nil, errors.New("parameter applicationSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationSecurityGroupName}", url.PathEscape(applicationSecurityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ApplicationSecurityGroupsClient) getHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientGetResponse, error) { + result := ApplicationSecurityGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroup); err != nil { + return ApplicationSecurityGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the application security groups in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListPager +// method. +func (client *ApplicationSecurityGroupsClient) NewListPager(resourceGroupName string, options *ApplicationSecurityGroupsClientListOptions) *runtime.Pager[ApplicationSecurityGroupsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationSecurityGroupsClientListResponse]{ + More: func(page ApplicationSecurityGroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationSecurityGroupsClientListResponse) (ApplicationSecurityGroupsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationSecurityGroupsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ApplicationSecurityGroupsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ApplicationSecurityGroupsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ApplicationSecurityGroupsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ApplicationSecurityGroupsClient) listHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientListResponse, error) { + result := ApplicationSecurityGroupsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroupListResult); err != nil { + return ApplicationSecurityGroupsClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all application security groups in a subscription. +// +// Generated from API version 2024-05-01 +// - options - ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListAllPager +// method. +func (client *ApplicationSecurityGroupsClient) NewListAllPager(options *ApplicationSecurityGroupsClientListAllOptions) *runtime.Pager[ApplicationSecurityGroupsClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[ApplicationSecurityGroupsClientListAllResponse]{ + More: func(page ApplicationSecurityGroupsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ApplicationSecurityGroupsClientListAllResponse) (ApplicationSecurityGroupsClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ApplicationSecurityGroupsClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return ApplicationSecurityGroupsClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *ApplicationSecurityGroupsClient) listAllCreateRequest(ctx context.Context, options *ApplicationSecurityGroupsClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *ApplicationSecurityGroupsClient) listAllHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientListAllResponse, error) { + result := ApplicationSecurityGroupsClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroupListResult); err != nil { + return ApplicationSecurityGroupsClientListAllResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates an application security group's tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - applicationSecurityGroupName - The name of the application security group. +// - parameters - Parameters supplied to update application security group tags. +// - options - ApplicationSecurityGroupsClientUpdateTagsOptions contains the optional parameters for the ApplicationSecurityGroupsClient.UpdateTags +// method. +func (client *ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject, options *ApplicationSecurityGroupsClientUpdateTagsOptions) (ApplicationSecurityGroupsClientUpdateTagsResponse, error) { + var err error + const operationName = "ApplicationSecurityGroupsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) + if err != nil { + return ApplicationSecurityGroupsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ApplicationSecurityGroupsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ApplicationSecurityGroupsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *ApplicationSecurityGroupsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject, options *ApplicationSecurityGroupsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if applicationSecurityGroupName == "" { + return nil, errors.New("parameter applicationSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{applicationSecurityGroupName}", url.PathEscape(applicationSecurityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *ApplicationSecurityGroupsClient) updateTagsHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientUpdateTagsResponse, error) { + result := ApplicationSecurityGroupsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroup); err != nil { + return ApplicationSecurityGroupsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/assets.json new file mode 100644 index 00000000..d3fc68f5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/network/armnetwork", + "Tag": "go/resourcemanager/network/armnetwork_b9e335a4c8" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/autorest.md new file mode 100644 index 00000000..05ed14d2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/ab04533261eff228f28e08900445d0edef3eb70c/specification/network/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/ab04533261eff228f28e08900445d0edef3eb70c/specification/network/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 6.2.0 +tag: package-2024-05 +``` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availabledelegations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availabledelegations_client.go new file mode 100644 index 00000000..ba70192e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availabledelegations_client.go @@ -0,0 +1,105 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AvailableDelegationsClient contains the methods for the AvailableDelegations group. +// Don't use this type directly, use NewAvailableDelegationsClient() instead. +type AvailableDelegationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAvailableDelegationsClient creates a new instance of AvailableDelegationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAvailableDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableDelegationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AvailableDelegationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets all of the available subnet delegations for this subscription in this region. +// +// Generated from API version 2024-05-01 +// - location - The location of the subnet. +// - options - AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.NewListPager +// method. +func (client *AvailableDelegationsClient) NewListPager(location string, options *AvailableDelegationsClientListOptions) *runtime.Pager[AvailableDelegationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AvailableDelegationsClientListResponse]{ + More: func(page AvailableDelegationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AvailableDelegationsClientListResponse) (AvailableDelegationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailableDelegationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return AvailableDelegationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AvailableDelegationsClient) listCreateRequest(ctx context.Context, location string, options *AvailableDelegationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AvailableDelegationsClient) listHandleResponse(resp *http.Response) (AvailableDelegationsClientListResponse, error) { + result := AvailableDelegationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AvailableDelegationsResult); err != nil { + return AvailableDelegationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableendpointservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableendpointservices_client.go new file mode 100644 index 00000000..c133087e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableendpointservices_client.go @@ -0,0 +1,105 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AvailableEndpointServicesClient contains the methods for the AvailableEndpointServices group. +// Don't use this type directly, use NewAvailableEndpointServicesClient() instead. +type AvailableEndpointServicesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAvailableEndpointServicesClient creates a new instance of AvailableEndpointServicesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAvailableEndpointServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableEndpointServicesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AvailableEndpointServicesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - List what values of endpoint services are available for use. +// +// Generated from API version 2024-05-01 +// - location - The location to check available endpoint services. +// - options - AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.NewListPager +// method. +func (client *AvailableEndpointServicesClient) NewListPager(location string, options *AvailableEndpointServicesClientListOptions) *runtime.Pager[AvailableEndpointServicesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AvailableEndpointServicesClientListResponse]{ + More: func(page AvailableEndpointServicesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AvailableEndpointServicesClientListResponse) (AvailableEndpointServicesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailableEndpointServicesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return AvailableEndpointServicesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AvailableEndpointServicesClient) listCreateRequest(ctx context.Context, location string, options *AvailableEndpointServicesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AvailableEndpointServicesClient) listHandleResponse(resp *http.Response) (AvailableEndpointServicesClientListResponse, error) { + result := AvailableEndpointServicesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EndpointServicesListResult); err != nil { + return AvailableEndpointServicesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableprivateendpointtypes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableprivateendpointtypes_client.go new file mode 100644 index 00000000..1a9771da --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableprivateendpointtypes_client.go @@ -0,0 +1,172 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AvailablePrivateEndpointTypesClient contains the methods for the AvailablePrivateEndpointTypes group. +// Don't use this type directly, use NewAvailablePrivateEndpointTypesClient() instead. +type AvailablePrivateEndpointTypesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAvailablePrivateEndpointTypesClient creates a new instance of AvailablePrivateEndpointTypesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAvailablePrivateEndpointTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailablePrivateEndpointTypesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AvailablePrivateEndpointTypesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this +// region. +// +// Generated from API version 2024-05-01 +// - location - The location of the domain name. +// - options - AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListPager +// method. +func (client *AvailablePrivateEndpointTypesClient) NewListPager(location string, options *AvailablePrivateEndpointTypesClientListOptions) *runtime.Pager[AvailablePrivateEndpointTypesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AvailablePrivateEndpointTypesClientListResponse]{ + More: func(page AvailablePrivateEndpointTypesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AvailablePrivateEndpointTypesClientListResponse) (AvailablePrivateEndpointTypesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailablePrivateEndpointTypesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return AvailablePrivateEndpointTypesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AvailablePrivateEndpointTypesClient) listCreateRequest(ctx context.Context, location string, options *AvailablePrivateEndpointTypesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AvailablePrivateEndpointTypesClient) listHandleResponse(resp *http.Response) (AvailablePrivateEndpointTypesClientListResponse, error) { + result := AvailablePrivateEndpointTypesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AvailablePrivateEndpointTypesResult); err != nil { + return AvailablePrivateEndpointTypesClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Returns all of the resource types that can be linked to a Private Endpoint in this subscription +// in this region. +// +// Generated from API version 2024-05-01 +// - location - The location of the domain name. +// - resourceGroupName - The name of the resource group. +// - options - AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager +// method. +func (client *AvailablePrivateEndpointTypesClient) NewListByResourceGroupPager(location string, resourceGroupName string, options *AvailablePrivateEndpointTypesClientListByResourceGroupOptions) *runtime.Pager[AvailablePrivateEndpointTypesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[AvailablePrivateEndpointTypesClientListByResourceGroupResponse]{ + More: func(page AvailablePrivateEndpointTypesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AvailablePrivateEndpointTypesClientListByResourceGroupResponse) (AvailablePrivateEndpointTypesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) + }, nil) + if err != nil { + return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *AvailablePrivateEndpointTypesClient) listByResourceGroupCreateRequest(ctx context.Context, location string, resourceGroupName string, options *AvailablePrivateEndpointTypesClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *AvailablePrivateEndpointTypesClient) listByResourceGroupHandleResponse(resp *http.Response) (AvailablePrivateEndpointTypesClientListByResourceGroupResponse, error) { + result := AvailablePrivateEndpointTypesClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AvailablePrivateEndpointTypesResult); err != nil { + return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableresourcegroupdelegations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableresourcegroupdelegations_client.go new file mode 100644 index 00000000..63c742f3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableresourcegroupdelegations_client.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AvailableResourceGroupDelegationsClient contains the methods for the AvailableResourceGroupDelegations group. +// Don't use this type directly, use NewAvailableResourceGroupDelegationsClient() instead. +type AvailableResourceGroupDelegationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAvailableResourceGroupDelegationsClient creates a new instance of AvailableResourceGroupDelegationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAvailableResourceGroupDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableResourceGroupDelegationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AvailableResourceGroupDelegationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets all of the available subnet delegations for this resource group in this region. +// +// Generated from API version 2024-05-01 +// - location - The location of the domain name. +// - resourceGroupName - The name of the resource group. +// - options - AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.NewListPager +// method. +func (client *AvailableResourceGroupDelegationsClient) NewListPager(location string, resourceGroupName string, options *AvailableResourceGroupDelegationsClientListOptions) *runtime.Pager[AvailableResourceGroupDelegationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AvailableResourceGroupDelegationsClientListResponse]{ + More: func(page AvailableResourceGroupDelegationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AvailableResourceGroupDelegationsClientListResponse) (AvailableResourceGroupDelegationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailableResourceGroupDelegationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, resourceGroupName, options) + }, nil) + if err != nil { + return AvailableResourceGroupDelegationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AvailableResourceGroupDelegationsClient) listCreateRequest(ctx context.Context, location string, resourceGroupName string, options *AvailableResourceGroupDelegationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableDelegations" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AvailableResourceGroupDelegationsClient) listHandleResponse(resp *http.Response) (AvailableResourceGroupDelegationsClientListResponse, error) { + result := AvailableResourceGroupDelegationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AvailableDelegationsResult); err != nil { + return AvailableResourceGroupDelegationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableservicealiases_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableservicealiases_client.go new file mode 100644 index 00000000..25fed378 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/availableservicealiases_client.go @@ -0,0 +1,170 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AvailableServiceAliasesClient contains the methods for the AvailableServiceAliases group. +// Don't use this type directly, use NewAvailableServiceAliasesClient() instead. +type AvailableServiceAliasesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAvailableServiceAliasesClient creates a new instance of AvailableServiceAliasesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAvailableServiceAliasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableServiceAliasesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AvailableServiceAliasesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets all available service aliases for this subscription in this region. +// +// Generated from API version 2024-05-01 +// - location - The location. +// - options - AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListPager +// method. +func (client *AvailableServiceAliasesClient) NewListPager(location string, options *AvailableServiceAliasesClientListOptions) *runtime.Pager[AvailableServiceAliasesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AvailableServiceAliasesClientListResponse]{ + More: func(page AvailableServiceAliasesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AvailableServiceAliasesClientListResponse) (AvailableServiceAliasesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailableServiceAliasesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return AvailableServiceAliasesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AvailableServiceAliasesClient) listCreateRequest(ctx context.Context, location string, options *AvailableServiceAliasesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AvailableServiceAliasesClient) listHandleResponse(resp *http.Response) (AvailableServiceAliasesClientListResponse, error) { + result := AvailableServiceAliasesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AvailableServiceAliasesResult); err != nil { + return AvailableServiceAliasesClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets all available service aliases for this resource group in this region. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - location - The location. +// - options - AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListByResourceGroupPager +// method. +func (client *AvailableServiceAliasesClient) NewListByResourceGroupPager(resourceGroupName string, location string, options *AvailableServiceAliasesClientListByResourceGroupOptions) *runtime.Pager[AvailableServiceAliasesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[AvailableServiceAliasesClientListByResourceGroupResponse]{ + More: func(page AvailableServiceAliasesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AvailableServiceAliasesClientListByResourceGroupResponse) (AvailableServiceAliasesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailableServiceAliasesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, location, options) + }, nil) + if err != nil { + return AvailableServiceAliasesClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *AvailableServiceAliasesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, location string, options *AvailableServiceAliasesClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableServiceAliases" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *AvailableServiceAliasesClient) listByResourceGroupHandleResponse(resp *http.Response) (AvailableServiceAliasesClientListByResourceGroupResponse, error) { + result := AvailableServiceAliasesClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AvailableServiceAliasesResult); err != nil { + return AvailableServiceAliasesClientListByResourceGroupResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/azurefirewallfqdntags_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/azurefirewallfqdntags_client.go new file mode 100644 index 00000000..386bfe8f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/azurefirewallfqdntags_client.go @@ -0,0 +1,100 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AzureFirewallFqdnTagsClient contains the methods for the AzureFirewallFqdnTags group. +// Don't use this type directly, use NewAzureFirewallFqdnTagsClient() instead. +type AzureFirewallFqdnTagsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAzureFirewallFqdnTagsClient creates a new instance of AzureFirewallFqdnTagsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAzureFirewallFqdnTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureFirewallFqdnTagsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AzureFirewallFqdnTagsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListAllPager - Gets all the Azure Firewall FQDN Tags in a subscription. +// +// Generated from API version 2024-05-01 +// - options - AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.NewListAllPager +// method. +func (client *AzureFirewallFqdnTagsClient) NewListAllPager(options *AzureFirewallFqdnTagsClientListAllOptions) *runtime.Pager[AzureFirewallFqdnTagsClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[AzureFirewallFqdnTagsClientListAllResponse]{ + More: func(page AzureFirewallFqdnTagsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AzureFirewallFqdnTagsClientListAllResponse) (AzureFirewallFqdnTagsClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzureFirewallFqdnTagsClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return AzureFirewallFqdnTagsClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *AzureFirewallFqdnTagsClient) listAllCreateRequest(ctx context.Context, options *AzureFirewallFqdnTagsClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *AzureFirewallFqdnTagsClient) listAllHandleResponse(resp *http.Response) (AzureFirewallFqdnTagsClientListAllResponse, error) { + result := AzureFirewallFqdnTagsClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewallFqdnTagListResult); err != nil { + return AzureFirewallFqdnTagsClientListAllResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/azurefirewalls_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/azurefirewalls_client.go new file mode 100644 index 00000000..798b5c85 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/azurefirewalls_client.go @@ -0,0 +1,620 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AzureFirewallsClient contains the methods for the AzureFirewalls group. +// Don't use this type directly, use NewAzureFirewallsClient() instead. +type AzureFirewallsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAzureFirewallsClient creates a new instance of AzureFirewallsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAzureFirewallsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureFirewallsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AzureFirewallsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified Azure Firewall. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the Azure Firewall. +// - parameters - Parameters supplied to the create or update Azure Firewall operation. +// - options - AzureFirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureFirewallsClient.BeginCreateOrUpdate +// method. +func (client *AzureFirewallsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall, options *AzureFirewallsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureFirewallsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, azureFirewallName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureFirewallsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureFirewallsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified Azure Firewall. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *AzureFirewallsClient) createOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall, options *AzureFirewallsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AzureFirewallsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, azureFirewallName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AzureFirewallsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall, options *AzureFirewallsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if azureFirewallName == "" { + return nil, errors.New("parameter azureFirewallName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified Azure Firewall. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the Azure Firewall. +// - options - AzureFirewallsClientBeginDeleteOptions contains the optional parameters for the AzureFirewallsClient.BeginDelete +// method. +func (client *AzureFirewallsClient) BeginDelete(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginDeleteOptions) (*runtime.Poller[AzureFirewallsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, azureFirewallName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureFirewallsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureFirewallsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified Azure Firewall. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *AzureFirewallsClient) deleteOperation(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AzureFirewallsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, azureFirewallName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AzureFirewallsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if azureFirewallName == "" { + return nil, errors.New("parameter azureFirewallName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Azure Firewall. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the Azure Firewall. +// - options - AzureFirewallsClientGetOptions contains the optional parameters for the AzureFirewallsClient.Get method. +func (client *AzureFirewallsClient) Get(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientGetOptions) (AzureFirewallsClientGetResponse, error) { + var err error + const operationName = "AzureFirewallsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, azureFirewallName, options) + if err != nil { + return AzureFirewallsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AzureFirewallsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AzureFirewallsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AzureFirewallsClient) getCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if azureFirewallName == "" { + return nil, errors.New("parameter azureFirewallName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AzureFirewallsClient) getHandleResponse(resp *http.Response) (AzureFirewallsClientGetResponse, error) { + result := AzureFirewallsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewall); err != nil { + return AzureFirewallsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all Azure Firewalls in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.NewListPager method. +func (client *AzureFirewallsClient) NewListPager(resourceGroupName string, options *AzureFirewallsClientListOptions) *runtime.Pager[AzureFirewallsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AzureFirewallsClientListResponse]{ + More: func(page AzureFirewallsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AzureFirewallsClientListResponse) (AzureFirewallsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzureFirewallsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return AzureFirewallsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AzureFirewallsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *AzureFirewallsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AzureFirewallsClient) listHandleResponse(resp *http.Response) (AzureFirewallsClientListResponse, error) { + result := AzureFirewallsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewallListResult); err != nil { + return AzureFirewallsClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the Azure Firewalls in a subscription. +// +// Generated from API version 2024-05-01 +// - options - AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.NewListAllPager +// method. +func (client *AzureFirewallsClient) NewListAllPager(options *AzureFirewallsClientListAllOptions) *runtime.Pager[AzureFirewallsClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[AzureFirewallsClientListAllResponse]{ + More: func(page AzureFirewallsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AzureFirewallsClientListAllResponse) (AzureFirewallsClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AzureFirewallsClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return AzureFirewallsClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *AzureFirewallsClient) listAllCreateRequest(ctx context.Context, options *AzureFirewallsClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *AzureFirewallsClient) listAllHandleResponse(resp *http.Response) (AzureFirewallsClientListAllResponse, error) { + result := AzureFirewallsClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewallListResult); err != nil { + return AzureFirewallsClientListAllResponse{}, err + } + return result, nil +} + +// BeginListLearnedPrefixes - Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the azure firewall. +// - options - AzureFirewallsClientBeginListLearnedPrefixesOptions contains the optional parameters for the AzureFirewallsClient.BeginListLearnedPrefixes +// method. +func (client *AzureFirewallsClient) BeginListLearnedPrefixes(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginListLearnedPrefixesOptions) (*runtime.Poller[AzureFirewallsClientListLearnedPrefixesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listLearnedPrefixes(ctx, resourceGroupName, azureFirewallName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureFirewallsClientListLearnedPrefixesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureFirewallsClientListLearnedPrefixesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListLearnedPrefixes - Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *AzureFirewallsClient) listLearnedPrefixes(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginListLearnedPrefixesOptions) (*http.Response, error) { + var err error + const operationName = "AzureFirewallsClient.BeginListLearnedPrefixes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listLearnedPrefixesCreateRequest(ctx, resourceGroupName, azureFirewallName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listLearnedPrefixesCreateRequest creates the ListLearnedPrefixes request. +func (client *AzureFirewallsClient) listLearnedPrefixesCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginListLearnedPrefixesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/learnedIPPrefixes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if azureFirewallName == "" { + return nil, errors.New("parameter azureFirewallName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginPacketCapture - Runs a packet capture on AzureFirewall. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the Azure Firewall. +// - parameters - Parameters supplied to run packet capture on azure firewall. +// - options - AzureFirewallsClientBeginPacketCaptureOptions contains the optional parameters for the AzureFirewallsClient.BeginPacketCapture +// method. +func (client *AzureFirewallsClient) BeginPacketCapture(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters FirewallPacketCaptureParameters, options *AzureFirewallsClientBeginPacketCaptureOptions) (*runtime.Poller[AzureFirewallsClientPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.packetCapture(ctx, resourceGroupName, azureFirewallName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureFirewallsClientPacketCaptureResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureFirewallsClientPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PacketCapture - Runs a packet capture on AzureFirewall. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *AzureFirewallsClient) packetCapture(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters FirewallPacketCaptureParameters, options *AzureFirewallsClientBeginPacketCaptureOptions) (*http.Response, error) { + var err error + const operationName = "AzureFirewallsClient.BeginPacketCapture" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.packetCaptureCreateRequest(ctx, resourceGroupName, azureFirewallName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// packetCaptureCreateRequest creates the PacketCapture request. +func (client *AzureFirewallsClient) packetCaptureCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters FirewallPacketCaptureParameters, options *AzureFirewallsClientBeginPacketCaptureOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCapture" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if azureFirewallName == "" { + return nil, errors.New("parameter azureFirewallName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdateTags - Updates tags of an Azure Firewall resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the Azure Firewall. +// - parameters - Parameters supplied to update azure firewall tags. +// - options - AzureFirewallsClientBeginUpdateTagsOptions contains the optional parameters for the AzureFirewallsClient.BeginUpdateTags +// method. +func (client *AzureFirewallsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject, options *AzureFirewallsClientBeginUpdateTagsOptions) (*runtime.Poller[AzureFirewallsClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, azureFirewallName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AzureFirewallsClientUpdateTagsResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AzureFirewallsClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateTags - Updates tags of an Azure Firewall resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *AzureFirewallsClient) updateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject, options *AzureFirewallsClientBeginUpdateTagsOptions) (*http.Response, error) { + var err error + const operationName = "AzureFirewallsClient.BeginUpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, azureFirewallName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *AzureFirewallsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject, options *AzureFirewallsClientBeginUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if azureFirewallName == "" { + return nil, errors.New("parameter azureFirewallName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{azureFirewallName}", url.PathEscape(azureFirewallName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/bastionhosts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/bastionhosts_client.go new file mode 100644 index 00000000..39d56ad1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/bastionhosts_client.go @@ -0,0 +1,462 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BastionHostsClient contains the methods for the BastionHosts group. +// Don't use this type directly, use NewBastionHostsClient() instead. +type BastionHostsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBastionHostsClient creates a new instance of BastionHostsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBastionHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BastionHostsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BastionHostsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified Bastion Host. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - parameters - Parameters supplied to the create or update Bastion Host operation. +// - options - BastionHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the BastionHostsClient.BeginCreateOrUpdate +// method. +func (client *BastionHostsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost, options *BastionHostsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BastionHostsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, bastionHostName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BastionHostsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BastionHostsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified Bastion Host. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *BastionHostsClient) createOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost, options *BastionHostsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "BastionHostsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, bastionHostName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *BastionHostsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost, options *BastionHostsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if bastionHostName == "" { + return nil, errors.New("parameter bastionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified Bastion Host. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - options - BastionHostsClientBeginDeleteOptions contains the optional parameters for the BastionHostsClient.BeginDelete +// method. +func (client *BastionHostsClient) BeginDelete(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientBeginDeleteOptions) (*runtime.Poller[BastionHostsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, bastionHostName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BastionHostsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BastionHostsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified Bastion Host. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *BastionHostsClient) deleteOperation(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "BastionHostsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, bastionHostName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *BastionHostsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if bastionHostName == "" { + return nil, errors.New("parameter bastionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Bastion Host. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - options - BastionHostsClientGetOptions contains the optional parameters for the BastionHostsClient.Get method. +func (client *BastionHostsClient) Get(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientGetOptions) (BastionHostsClientGetResponse, error) { + var err error + const operationName = "BastionHostsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, bastionHostName, options) + if err != nil { + return BastionHostsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BastionHostsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BastionHostsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BastionHostsClient) getCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if bastionHostName == "" { + return nil, errors.New("parameter bastionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BastionHostsClient) getHandleResponse(resp *http.Response) (BastionHostsClientGetResponse, error) { + result := BastionHostsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BastionHost); err != nil { + return BastionHostsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all Bastion Hosts in a subscription. +// +// Generated from API version 2024-05-01 +// - options - BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.NewListPager method. +func (client *BastionHostsClient) NewListPager(options *BastionHostsClientListOptions) *runtime.Pager[BastionHostsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BastionHostsClientListResponse]{ + More: func(page BastionHostsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BastionHostsClientListResponse) (BastionHostsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BastionHostsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return BastionHostsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BastionHostsClient) listCreateRequest(ctx context.Context, options *BastionHostsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BastionHostsClient) listHandleResponse(resp *http.Response) (BastionHostsClientListResponse, error) { + result := BastionHostsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BastionHostListResult); err != nil { + return BastionHostsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all Bastion Hosts in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.NewListByResourceGroupPager +// method. +func (client *BastionHostsClient) NewListByResourceGroupPager(resourceGroupName string, options *BastionHostsClientListByResourceGroupOptions) *runtime.Pager[BastionHostsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[BastionHostsClientListByResourceGroupResponse]{ + More: func(page BastionHostsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BastionHostsClientListByResourceGroupResponse) (BastionHostsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BastionHostsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return BastionHostsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *BastionHostsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *BastionHostsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *BastionHostsClient) listByResourceGroupHandleResponse(resp *http.Response) (BastionHostsClientListByResourceGroupResponse, error) { + result := BastionHostsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BastionHostListResult); err != nil { + return BastionHostsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginUpdateTags - Updates Tags for BastionHost resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - parameters - Parameters supplied to update BastionHost tags. +// - options - BastionHostsClientBeginUpdateTagsOptions contains the optional parameters for the BastionHostsClient.BeginUpdateTags +// method. +func (client *BastionHostsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject, options *BastionHostsClientBeginUpdateTagsOptions) (*runtime.Poller[BastionHostsClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, bastionHostName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BastionHostsClientUpdateTagsResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BastionHostsClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateTags - Updates Tags for BastionHost resource +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *BastionHostsClient) updateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject, options *BastionHostsClientBeginUpdateTagsOptions) (*http.Response, error) { + var err error + const operationName = "BastionHostsClient.BeginUpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, bastionHostName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *BastionHostsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject, options *BastionHostsClientBeginUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if bastionHostName == "" { + return nil, errors.New("parameter bastionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/bgpservicecommunities_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/bgpservicecommunities_client.go new file mode 100644 index 00000000..e018e227 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/bgpservicecommunities_client.go @@ -0,0 +1,100 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BgpServiceCommunitiesClient contains the methods for the BgpServiceCommunities group. +// Don't use this type directly, use NewBgpServiceCommunitiesClient() instead. +type BgpServiceCommunitiesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBgpServiceCommunitiesClient creates a new instance of BgpServiceCommunitiesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBgpServiceCommunitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BgpServiceCommunitiesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BgpServiceCommunitiesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets all the available bgp service communities. +// +// Generated from API version 2024-05-01 +// - options - BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.NewListPager +// method. +func (client *BgpServiceCommunitiesClient) NewListPager(options *BgpServiceCommunitiesClientListOptions) *runtime.Pager[BgpServiceCommunitiesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BgpServiceCommunitiesClientListResponse]{ + More: func(page BgpServiceCommunitiesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BgpServiceCommunitiesClientListResponse) (BgpServiceCommunitiesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BgpServiceCommunitiesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return BgpServiceCommunitiesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BgpServiceCommunitiesClient) listCreateRequest(ctx context.Context, options *BgpServiceCommunitiesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BgpServiceCommunitiesClient) listHandleResponse(resp *http.Response) (BgpServiceCommunitiesClientListResponse, error) { + result := BgpServiceCommunitiesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BgpServiceCommunityListResult); err != nil { + return BgpServiceCommunitiesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/build.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/build.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/build.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ci.yml new file mode 100644 index 00000000..358b9309 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ci.yml @@ -0,0 +1,29 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/network/armnetwork/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/network/armnetwork/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/network/armnetwork' + UsePipelineProxy: false diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/client_factory.go new file mode 100644 index 00000000..1a46e2b8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/client_factory.go @@ -0,0 +1,1212 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewAdminRuleCollectionsClient creates a new instance of AdminRuleCollectionsClient. +func (c *ClientFactory) NewAdminRuleCollectionsClient() *AdminRuleCollectionsClient { + return &AdminRuleCollectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAdminRulesClient creates a new instance of AdminRulesClient. +func (c *ClientFactory) NewAdminRulesClient() *AdminRulesClient { + return &AdminRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewApplicationGatewayPrivateEndpointConnectionsClient creates a new instance of ApplicationGatewayPrivateEndpointConnectionsClient. +func (c *ClientFactory) NewApplicationGatewayPrivateEndpointConnectionsClient() *ApplicationGatewayPrivateEndpointConnectionsClient { + return &ApplicationGatewayPrivateEndpointConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewApplicationGatewayPrivateLinkResourcesClient creates a new instance of ApplicationGatewayPrivateLinkResourcesClient. +func (c *ClientFactory) NewApplicationGatewayPrivateLinkResourcesClient() *ApplicationGatewayPrivateLinkResourcesClient { + return &ApplicationGatewayPrivateLinkResourcesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewApplicationGatewayWafDynamicManifestsClient creates a new instance of ApplicationGatewayWafDynamicManifestsClient. +func (c *ClientFactory) NewApplicationGatewayWafDynamicManifestsClient() *ApplicationGatewayWafDynamicManifestsClient { + return &ApplicationGatewayWafDynamicManifestsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewApplicationGatewayWafDynamicManifestsDefaultClient creates a new instance of ApplicationGatewayWafDynamicManifestsDefaultClient. +func (c *ClientFactory) NewApplicationGatewayWafDynamicManifestsDefaultClient() *ApplicationGatewayWafDynamicManifestsDefaultClient { + return &ApplicationGatewayWafDynamicManifestsDefaultClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewApplicationGatewaysClient creates a new instance of ApplicationGatewaysClient. +func (c *ClientFactory) NewApplicationGatewaysClient() *ApplicationGatewaysClient { + return &ApplicationGatewaysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewApplicationSecurityGroupsClient creates a new instance of ApplicationSecurityGroupsClient. +func (c *ClientFactory) NewApplicationSecurityGroupsClient() *ApplicationSecurityGroupsClient { + return &ApplicationSecurityGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAvailableDelegationsClient creates a new instance of AvailableDelegationsClient. +func (c *ClientFactory) NewAvailableDelegationsClient() *AvailableDelegationsClient { + return &AvailableDelegationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAvailableEndpointServicesClient creates a new instance of AvailableEndpointServicesClient. +func (c *ClientFactory) NewAvailableEndpointServicesClient() *AvailableEndpointServicesClient { + return &AvailableEndpointServicesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAvailablePrivateEndpointTypesClient creates a new instance of AvailablePrivateEndpointTypesClient. +func (c *ClientFactory) NewAvailablePrivateEndpointTypesClient() *AvailablePrivateEndpointTypesClient { + return &AvailablePrivateEndpointTypesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAvailableResourceGroupDelegationsClient creates a new instance of AvailableResourceGroupDelegationsClient. +func (c *ClientFactory) NewAvailableResourceGroupDelegationsClient() *AvailableResourceGroupDelegationsClient { + return &AvailableResourceGroupDelegationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAvailableServiceAliasesClient creates a new instance of AvailableServiceAliasesClient. +func (c *ClientFactory) NewAvailableServiceAliasesClient() *AvailableServiceAliasesClient { + return &AvailableServiceAliasesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAzureFirewallFqdnTagsClient creates a new instance of AzureFirewallFqdnTagsClient. +func (c *ClientFactory) NewAzureFirewallFqdnTagsClient() *AzureFirewallFqdnTagsClient { + return &AzureFirewallFqdnTagsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAzureFirewallsClient creates a new instance of AzureFirewallsClient. +func (c *ClientFactory) NewAzureFirewallsClient() *AzureFirewallsClient { + return &AzureFirewallsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBastionHostsClient creates a new instance of BastionHostsClient. +func (c *ClientFactory) NewBastionHostsClient() *BastionHostsClient { + return &BastionHostsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBgpServiceCommunitiesClient creates a new instance of BgpServiceCommunitiesClient. +func (c *ClientFactory) NewBgpServiceCommunitiesClient() *BgpServiceCommunitiesClient { + return &BgpServiceCommunitiesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewConfigurationPolicyGroupsClient creates a new instance of ConfigurationPolicyGroupsClient. +func (c *ClientFactory) NewConfigurationPolicyGroupsClient() *ConfigurationPolicyGroupsClient { + return &ConfigurationPolicyGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewConnectionMonitorsClient creates a new instance of ConnectionMonitorsClient. +func (c *ClientFactory) NewConnectionMonitorsClient() *ConnectionMonitorsClient { + return &ConnectionMonitorsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewConnectivityConfigurationsClient creates a new instance of ConnectivityConfigurationsClient. +func (c *ClientFactory) NewConnectivityConfigurationsClient() *ConnectivityConfigurationsClient { + return &ConnectivityConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCustomIPPrefixesClient creates a new instance of CustomIPPrefixesClient. +func (c *ClientFactory) NewCustomIPPrefixesClient() *CustomIPPrefixesClient { + return &CustomIPPrefixesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDdosCustomPoliciesClient creates a new instance of DdosCustomPoliciesClient. +func (c *ClientFactory) NewDdosCustomPoliciesClient() *DdosCustomPoliciesClient { + return &DdosCustomPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDdosProtectionPlansClient creates a new instance of DdosProtectionPlansClient. +func (c *ClientFactory) NewDdosProtectionPlansClient() *DdosProtectionPlansClient { + return &DdosProtectionPlansClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDefaultSecurityRulesClient creates a new instance of DefaultSecurityRulesClient. +func (c *ClientFactory) NewDefaultSecurityRulesClient() *DefaultSecurityRulesClient { + return &DefaultSecurityRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDscpConfigurationClient creates a new instance of DscpConfigurationClient. +func (c *ClientFactory) NewDscpConfigurationClient() *DscpConfigurationClient { + return &DscpConfigurationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteCircuitAuthorizationsClient creates a new instance of ExpressRouteCircuitAuthorizationsClient. +func (c *ClientFactory) NewExpressRouteCircuitAuthorizationsClient() *ExpressRouteCircuitAuthorizationsClient { + return &ExpressRouteCircuitAuthorizationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteCircuitConnectionsClient creates a new instance of ExpressRouteCircuitConnectionsClient. +func (c *ClientFactory) NewExpressRouteCircuitConnectionsClient() *ExpressRouteCircuitConnectionsClient { + return &ExpressRouteCircuitConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteCircuitPeeringsClient creates a new instance of ExpressRouteCircuitPeeringsClient. +func (c *ClientFactory) NewExpressRouteCircuitPeeringsClient() *ExpressRouteCircuitPeeringsClient { + return &ExpressRouteCircuitPeeringsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteCircuitsClient creates a new instance of ExpressRouteCircuitsClient. +func (c *ClientFactory) NewExpressRouteCircuitsClient() *ExpressRouteCircuitsClient { + return &ExpressRouteCircuitsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteConnectionsClient creates a new instance of ExpressRouteConnectionsClient. +func (c *ClientFactory) NewExpressRouteConnectionsClient() *ExpressRouteConnectionsClient { + return &ExpressRouteConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteCrossConnectionPeeringsClient creates a new instance of ExpressRouteCrossConnectionPeeringsClient. +func (c *ClientFactory) NewExpressRouteCrossConnectionPeeringsClient() *ExpressRouteCrossConnectionPeeringsClient { + return &ExpressRouteCrossConnectionPeeringsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteCrossConnectionsClient creates a new instance of ExpressRouteCrossConnectionsClient. +func (c *ClientFactory) NewExpressRouteCrossConnectionsClient() *ExpressRouteCrossConnectionsClient { + return &ExpressRouteCrossConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteGatewaysClient creates a new instance of ExpressRouteGatewaysClient. +func (c *ClientFactory) NewExpressRouteGatewaysClient() *ExpressRouteGatewaysClient { + return &ExpressRouteGatewaysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteLinksClient creates a new instance of ExpressRouteLinksClient. +func (c *ClientFactory) NewExpressRouteLinksClient() *ExpressRouteLinksClient { + return &ExpressRouteLinksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRoutePortAuthorizationsClient creates a new instance of ExpressRoutePortAuthorizationsClient. +func (c *ClientFactory) NewExpressRoutePortAuthorizationsClient() *ExpressRoutePortAuthorizationsClient { + return &ExpressRoutePortAuthorizationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRoutePortsClient creates a new instance of ExpressRoutePortsClient. +func (c *ClientFactory) NewExpressRoutePortsClient() *ExpressRoutePortsClient { + return &ExpressRoutePortsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRoutePortsLocationsClient creates a new instance of ExpressRoutePortsLocationsClient. +func (c *ClientFactory) NewExpressRoutePortsLocationsClient() *ExpressRoutePortsLocationsClient { + return &ExpressRoutePortsLocationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteProviderPortsLocationClient creates a new instance of ExpressRouteProviderPortsLocationClient. +func (c *ClientFactory) NewExpressRouteProviderPortsLocationClient() *ExpressRouteProviderPortsLocationClient { + return &ExpressRouteProviderPortsLocationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExpressRouteServiceProvidersClient creates a new instance of ExpressRouteServiceProvidersClient. +func (c *ClientFactory) NewExpressRouteServiceProvidersClient() *ExpressRouteServiceProvidersClient { + return &ExpressRouteServiceProvidersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFirewallPoliciesClient creates a new instance of FirewallPoliciesClient. +func (c *ClientFactory) NewFirewallPoliciesClient() *FirewallPoliciesClient { + return &FirewallPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFirewallPolicyDeploymentsClient creates a new instance of FirewallPolicyDeploymentsClient. +func (c *ClientFactory) NewFirewallPolicyDeploymentsClient() *FirewallPolicyDeploymentsClient { + return &FirewallPolicyDeploymentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFirewallPolicyDraftsClient creates a new instance of FirewallPolicyDraftsClient. +func (c *ClientFactory) NewFirewallPolicyDraftsClient() *FirewallPolicyDraftsClient { + return &FirewallPolicyDraftsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFirewallPolicyIdpsSignaturesClient creates a new instance of FirewallPolicyIdpsSignaturesClient. +func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesClient() *FirewallPolicyIdpsSignaturesClient { + return &FirewallPolicyIdpsSignaturesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFirewallPolicyIdpsSignaturesFilterValuesClient creates a new instance of FirewallPolicyIdpsSignaturesFilterValuesClient. +func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesFilterValuesClient() *FirewallPolicyIdpsSignaturesFilterValuesClient { + return &FirewallPolicyIdpsSignaturesFilterValuesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFirewallPolicyIdpsSignaturesOverridesClient creates a new instance of FirewallPolicyIdpsSignaturesOverridesClient. +func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesOverridesClient() *FirewallPolicyIdpsSignaturesOverridesClient { + return &FirewallPolicyIdpsSignaturesOverridesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFirewallPolicyRuleCollectionGroupDraftsClient creates a new instance of FirewallPolicyRuleCollectionGroupDraftsClient. +func (c *ClientFactory) NewFirewallPolicyRuleCollectionGroupDraftsClient() *FirewallPolicyRuleCollectionGroupDraftsClient { + return &FirewallPolicyRuleCollectionGroupDraftsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFirewallPolicyRuleCollectionGroupsClient creates a new instance of FirewallPolicyRuleCollectionGroupsClient. +func (c *ClientFactory) NewFirewallPolicyRuleCollectionGroupsClient() *FirewallPolicyRuleCollectionGroupsClient { + return &FirewallPolicyRuleCollectionGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFlowLogsClient creates a new instance of FlowLogsClient. +func (c *ClientFactory) NewFlowLogsClient() *FlowLogsClient { + return &FlowLogsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGroupsClient creates a new instance of GroupsClient. +func (c *ClientFactory) NewGroupsClient() *GroupsClient { + return &GroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewHubRouteTablesClient creates a new instance of HubRouteTablesClient. +func (c *ClientFactory) NewHubRouteTablesClient() *HubRouteTablesClient { + return &HubRouteTablesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewHubVirtualNetworkConnectionsClient creates a new instance of HubVirtualNetworkConnectionsClient. +func (c *ClientFactory) NewHubVirtualNetworkConnectionsClient() *HubVirtualNetworkConnectionsClient { + return &HubVirtualNetworkConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewIPAllocationsClient creates a new instance of IPAllocationsClient. +func (c *ClientFactory) NewIPAllocationsClient() *IPAllocationsClient { + return &IPAllocationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewIPGroupsClient creates a new instance of IPGroupsClient. +func (c *ClientFactory) NewIPGroupsClient() *IPGroupsClient { + return &IPGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewInboundNatRulesClient creates a new instance of InboundNatRulesClient. +func (c *ClientFactory) NewInboundNatRulesClient() *InboundNatRulesClient { + return &InboundNatRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewInboundSecurityRuleClient creates a new instance of InboundSecurityRuleClient. +func (c *ClientFactory) NewInboundSecurityRuleClient() *InboundSecurityRuleClient { + return &InboundSecurityRuleClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewInterfaceIPConfigurationsClient creates a new instance of InterfaceIPConfigurationsClient. +func (c *ClientFactory) NewInterfaceIPConfigurationsClient() *InterfaceIPConfigurationsClient { + return &InterfaceIPConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewInterfaceLoadBalancersClient creates a new instance of InterfaceLoadBalancersClient. +func (c *ClientFactory) NewInterfaceLoadBalancersClient() *InterfaceLoadBalancersClient { + return &InterfaceLoadBalancersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewInterfaceTapConfigurationsClient creates a new instance of InterfaceTapConfigurationsClient. +func (c *ClientFactory) NewInterfaceTapConfigurationsClient() *InterfaceTapConfigurationsClient { + return &InterfaceTapConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewInterfacesClient creates a new instance of InterfacesClient. +func (c *ClientFactory) NewInterfacesClient() *InterfacesClient { + return &InterfacesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewIpamPoolsClient creates a new instance of IpamPoolsClient. +func (c *ClientFactory) NewIpamPoolsClient() *IpamPoolsClient { + return &IpamPoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLoadBalancerBackendAddressPoolsClient creates a new instance of LoadBalancerBackendAddressPoolsClient. +func (c *ClientFactory) NewLoadBalancerBackendAddressPoolsClient() *LoadBalancerBackendAddressPoolsClient { + return &LoadBalancerBackendAddressPoolsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLoadBalancerFrontendIPConfigurationsClient creates a new instance of LoadBalancerFrontendIPConfigurationsClient. +func (c *ClientFactory) NewLoadBalancerFrontendIPConfigurationsClient() *LoadBalancerFrontendIPConfigurationsClient { + return &LoadBalancerFrontendIPConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLoadBalancerLoadBalancingRulesClient creates a new instance of LoadBalancerLoadBalancingRulesClient. +func (c *ClientFactory) NewLoadBalancerLoadBalancingRulesClient() *LoadBalancerLoadBalancingRulesClient { + return &LoadBalancerLoadBalancingRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLoadBalancerNetworkInterfacesClient creates a new instance of LoadBalancerNetworkInterfacesClient. +func (c *ClientFactory) NewLoadBalancerNetworkInterfacesClient() *LoadBalancerNetworkInterfacesClient { + return &LoadBalancerNetworkInterfacesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLoadBalancerOutboundRulesClient creates a new instance of LoadBalancerOutboundRulesClient. +func (c *ClientFactory) NewLoadBalancerOutboundRulesClient() *LoadBalancerOutboundRulesClient { + return &LoadBalancerOutboundRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLoadBalancerProbesClient creates a new instance of LoadBalancerProbesClient. +func (c *ClientFactory) NewLoadBalancerProbesClient() *LoadBalancerProbesClient { + return &LoadBalancerProbesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLoadBalancersClient creates a new instance of LoadBalancersClient. +func (c *ClientFactory) NewLoadBalancersClient() *LoadBalancersClient { + return &LoadBalancersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewLocalNetworkGatewaysClient creates a new instance of LocalNetworkGatewaysClient. +func (c *ClientFactory) NewLocalNetworkGatewaysClient() *LocalNetworkGatewaysClient { + return &LocalNetworkGatewaysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagementClient creates a new instance of ManagementClient. +func (c *ClientFactory) NewManagementClient() *ManagementClient { + return &ManagementClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagementGroupNetworkManagerConnectionsClient creates a new instance of ManagementGroupNetworkManagerConnectionsClient. +func (c *ClientFactory) NewManagementGroupNetworkManagerConnectionsClient() *ManagementGroupNetworkManagerConnectionsClient { + return &ManagementGroupNetworkManagerConnectionsClient{ + internal: c.internal, + } +} + +// NewManagerCommitsClient creates a new instance of ManagerCommitsClient. +func (c *ClientFactory) NewManagerCommitsClient() *ManagerCommitsClient { + return &ManagerCommitsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagerDeploymentStatusClient creates a new instance of ManagerDeploymentStatusClient. +func (c *ClientFactory) NewManagerDeploymentStatusClient() *ManagerDeploymentStatusClient { + return &ManagerDeploymentStatusClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagerRoutingConfigurationsClient creates a new instance of ManagerRoutingConfigurationsClient. +func (c *ClientFactory) NewManagerRoutingConfigurationsClient() *ManagerRoutingConfigurationsClient { + return &ManagerRoutingConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagersClient creates a new instance of ManagersClient. +func (c *ClientFactory) NewManagersClient() *ManagersClient { + return &ManagersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewNatGatewaysClient creates a new instance of NatGatewaysClient. +func (c *ClientFactory) NewNatGatewaysClient() *NatGatewaysClient { + return &NatGatewaysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewNatRulesClient creates a new instance of NatRulesClient. +func (c *ClientFactory) NewNatRulesClient() *NatRulesClient { + return &NatRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewP2SVPNGatewaysClient creates a new instance of P2SVPNGatewaysClient. +func (c *ClientFactory) NewP2SVPNGatewaysClient() *P2SVPNGatewaysClient { + return &P2SVPNGatewaysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPacketCapturesClient creates a new instance of PacketCapturesClient. +func (c *ClientFactory) NewPacketCapturesClient() *PacketCapturesClient { + return &PacketCapturesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPeerExpressRouteCircuitConnectionsClient creates a new instance of PeerExpressRouteCircuitConnectionsClient. +func (c *ClientFactory) NewPeerExpressRouteCircuitConnectionsClient() *PeerExpressRouteCircuitConnectionsClient { + return &PeerExpressRouteCircuitConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPrivateDNSZoneGroupsClient creates a new instance of PrivateDNSZoneGroupsClient. +func (c *ClientFactory) NewPrivateDNSZoneGroupsClient() *PrivateDNSZoneGroupsClient { + return &PrivateDNSZoneGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPrivateEndpointsClient creates a new instance of PrivateEndpointsClient. +func (c *ClientFactory) NewPrivateEndpointsClient() *PrivateEndpointsClient { + return &PrivateEndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPrivateLinkServicesClient creates a new instance of PrivateLinkServicesClient. +func (c *ClientFactory) NewPrivateLinkServicesClient() *PrivateLinkServicesClient { + return &PrivateLinkServicesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProfilesClient creates a new instance of ProfilesClient. +func (c *ClientFactory) NewProfilesClient() *ProfilesClient { + return &ProfilesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPublicIPAddressesClient creates a new instance of PublicIPAddressesClient. +func (c *ClientFactory) NewPublicIPAddressesClient() *PublicIPAddressesClient { + return &PublicIPAddressesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPublicIPPrefixesClient creates a new instance of PublicIPPrefixesClient. +func (c *ClientFactory) NewPublicIPPrefixesClient() *PublicIPPrefixesClient { + return &PublicIPPrefixesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReachabilityAnalysisIntentsClient creates a new instance of ReachabilityAnalysisIntentsClient. +func (c *ClientFactory) NewReachabilityAnalysisIntentsClient() *ReachabilityAnalysisIntentsClient { + return &ReachabilityAnalysisIntentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReachabilityAnalysisRunsClient creates a new instance of ReachabilityAnalysisRunsClient. +func (c *ClientFactory) NewReachabilityAnalysisRunsClient() *ReachabilityAnalysisRunsClient { + return &ReachabilityAnalysisRunsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewResourceNavigationLinksClient creates a new instance of ResourceNavigationLinksClient. +func (c *ClientFactory) NewResourceNavigationLinksClient() *ResourceNavigationLinksClient { + return &ResourceNavigationLinksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRouteFilterRulesClient creates a new instance of RouteFilterRulesClient. +func (c *ClientFactory) NewRouteFilterRulesClient() *RouteFilterRulesClient { + return &RouteFilterRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRouteFiltersClient creates a new instance of RouteFiltersClient. +func (c *ClientFactory) NewRouteFiltersClient() *RouteFiltersClient { + return &RouteFiltersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRouteMapsClient creates a new instance of RouteMapsClient. +func (c *ClientFactory) NewRouteMapsClient() *RouteMapsClient { + return &RouteMapsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRouteTablesClient creates a new instance of RouteTablesClient. +func (c *ClientFactory) NewRouteTablesClient() *RouteTablesClient { + return &RouteTablesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRoutesClient creates a new instance of RoutesClient. +func (c *ClientFactory) NewRoutesClient() *RoutesClient { + return &RoutesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRoutingIntentClient creates a new instance of RoutingIntentClient. +func (c *ClientFactory) NewRoutingIntentClient() *RoutingIntentClient { + return &RoutingIntentClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRoutingRuleCollectionsClient creates a new instance of RoutingRuleCollectionsClient. +func (c *ClientFactory) NewRoutingRuleCollectionsClient() *RoutingRuleCollectionsClient { + return &RoutingRuleCollectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRoutingRulesClient creates a new instance of RoutingRulesClient. +func (c *ClientFactory) NewRoutingRulesClient() *RoutingRulesClient { + return &RoutingRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewScopeConnectionsClient creates a new instance of ScopeConnectionsClient. +func (c *ClientFactory) NewScopeConnectionsClient() *ScopeConnectionsClient { + return &ScopeConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSecurityAdminConfigurationsClient creates a new instance of SecurityAdminConfigurationsClient. +func (c *ClientFactory) NewSecurityAdminConfigurationsClient() *SecurityAdminConfigurationsClient { + return &SecurityAdminConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSecurityGroupsClient creates a new instance of SecurityGroupsClient. +func (c *ClientFactory) NewSecurityGroupsClient() *SecurityGroupsClient { + return &SecurityGroupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSecurityPartnerProvidersClient creates a new instance of SecurityPartnerProvidersClient. +func (c *ClientFactory) NewSecurityPartnerProvidersClient() *SecurityPartnerProvidersClient { + return &SecurityPartnerProvidersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSecurityRulesClient creates a new instance of SecurityRulesClient. +func (c *ClientFactory) NewSecurityRulesClient() *SecurityRulesClient { + return &SecurityRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSecurityUserConfigurationsClient creates a new instance of SecurityUserConfigurationsClient. +func (c *ClientFactory) NewSecurityUserConfigurationsClient() *SecurityUserConfigurationsClient { + return &SecurityUserConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSecurityUserRuleCollectionsClient creates a new instance of SecurityUserRuleCollectionsClient. +func (c *ClientFactory) NewSecurityUserRuleCollectionsClient() *SecurityUserRuleCollectionsClient { + return &SecurityUserRuleCollectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSecurityUserRulesClient creates a new instance of SecurityUserRulesClient. +func (c *ClientFactory) NewSecurityUserRulesClient() *SecurityUserRulesClient { + return &SecurityUserRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewServiceAssociationLinksClient creates a new instance of ServiceAssociationLinksClient. +func (c *ClientFactory) NewServiceAssociationLinksClient() *ServiceAssociationLinksClient { + return &ServiceAssociationLinksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewServiceEndpointPoliciesClient creates a new instance of ServiceEndpointPoliciesClient. +func (c *ClientFactory) NewServiceEndpointPoliciesClient() *ServiceEndpointPoliciesClient { + return &ServiceEndpointPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewServiceEndpointPolicyDefinitionsClient creates a new instance of ServiceEndpointPolicyDefinitionsClient. +func (c *ClientFactory) NewServiceEndpointPolicyDefinitionsClient() *ServiceEndpointPolicyDefinitionsClient { + return &ServiceEndpointPolicyDefinitionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewServiceTagInformationClient creates a new instance of ServiceTagInformationClient. +func (c *ClientFactory) NewServiceTagInformationClient() *ServiceTagInformationClient { + return &ServiceTagInformationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewServiceTagsClient creates a new instance of ServiceTagsClient. +func (c *ClientFactory) NewServiceTagsClient() *ServiceTagsClient { + return &ServiceTagsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewStaticCidrsClient creates a new instance of StaticCidrsClient. +func (c *ClientFactory) NewStaticCidrsClient() *StaticCidrsClient { + return &StaticCidrsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewStaticMembersClient creates a new instance of StaticMembersClient. +func (c *ClientFactory) NewStaticMembersClient() *StaticMembersClient { + return &StaticMembersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSubnetsClient creates a new instance of SubnetsClient. +func (c *ClientFactory) NewSubnetsClient() *SubnetsClient { + return &SubnetsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSubscriptionNetworkManagerConnectionsClient creates a new instance of SubscriptionNetworkManagerConnectionsClient. +func (c *ClientFactory) NewSubscriptionNetworkManagerConnectionsClient() *SubscriptionNetworkManagerConnectionsClient { + return &SubscriptionNetworkManagerConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewUsagesClient creates a new instance of UsagesClient. +func (c *ClientFactory) NewUsagesClient() *UsagesClient { + return &UsagesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVPNConnectionsClient creates a new instance of VPNConnectionsClient. +func (c *ClientFactory) NewVPNConnectionsClient() *VPNConnectionsClient { + return &VPNConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVPNGatewaysClient creates a new instance of VPNGatewaysClient. +func (c *ClientFactory) NewVPNGatewaysClient() *VPNGatewaysClient { + return &VPNGatewaysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVPNLinkConnectionsClient creates a new instance of VPNLinkConnectionsClient. +func (c *ClientFactory) NewVPNLinkConnectionsClient() *VPNLinkConnectionsClient { + return &VPNLinkConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVPNServerConfigurationsAssociatedWithVirtualWanClient creates a new instance of VPNServerConfigurationsAssociatedWithVirtualWanClient. +func (c *ClientFactory) NewVPNServerConfigurationsAssociatedWithVirtualWanClient() *VPNServerConfigurationsAssociatedWithVirtualWanClient { + return &VPNServerConfigurationsAssociatedWithVirtualWanClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVPNServerConfigurationsClient creates a new instance of VPNServerConfigurationsClient. +func (c *ClientFactory) NewVPNServerConfigurationsClient() *VPNServerConfigurationsClient { + return &VPNServerConfigurationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVPNSiteLinkConnectionsClient creates a new instance of VPNSiteLinkConnectionsClient. +func (c *ClientFactory) NewVPNSiteLinkConnectionsClient() *VPNSiteLinkConnectionsClient { + return &VPNSiteLinkConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVPNSiteLinksClient creates a new instance of VPNSiteLinksClient. +func (c *ClientFactory) NewVPNSiteLinksClient() *VPNSiteLinksClient { + return &VPNSiteLinksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVPNSitesClient creates a new instance of VPNSitesClient. +func (c *ClientFactory) NewVPNSitesClient() *VPNSitesClient { + return &VPNSitesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVPNSitesConfigurationClient creates a new instance of VPNSitesConfigurationClient. +func (c *ClientFactory) NewVPNSitesConfigurationClient() *VPNSitesConfigurationClient { + return &VPNSitesConfigurationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVerifierWorkspacesClient creates a new instance of VerifierWorkspacesClient. +func (c *ClientFactory) NewVerifierWorkspacesClient() *VerifierWorkspacesClient { + return &VerifierWorkspacesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVipSwapClient creates a new instance of VipSwapClient. +func (c *ClientFactory) NewVipSwapClient() *VipSwapClient { + return &VipSwapClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualApplianceConnectionsClient creates a new instance of VirtualApplianceConnectionsClient. +func (c *ClientFactory) NewVirtualApplianceConnectionsClient() *VirtualApplianceConnectionsClient { + return &VirtualApplianceConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualApplianceSKUsClient creates a new instance of VirtualApplianceSKUsClient. +func (c *ClientFactory) NewVirtualApplianceSKUsClient() *VirtualApplianceSKUsClient { + return &VirtualApplianceSKUsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualApplianceSitesClient creates a new instance of VirtualApplianceSitesClient. +func (c *ClientFactory) NewVirtualApplianceSitesClient() *VirtualApplianceSitesClient { + return &VirtualApplianceSitesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualAppliancesClient creates a new instance of VirtualAppliancesClient. +func (c *ClientFactory) NewVirtualAppliancesClient() *VirtualAppliancesClient { + return &VirtualAppliancesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualHubBgpConnectionClient creates a new instance of VirtualHubBgpConnectionClient. +func (c *ClientFactory) NewVirtualHubBgpConnectionClient() *VirtualHubBgpConnectionClient { + return &VirtualHubBgpConnectionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualHubBgpConnectionsClient creates a new instance of VirtualHubBgpConnectionsClient. +func (c *ClientFactory) NewVirtualHubBgpConnectionsClient() *VirtualHubBgpConnectionsClient { + return &VirtualHubBgpConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualHubIPConfigurationClient creates a new instance of VirtualHubIPConfigurationClient. +func (c *ClientFactory) NewVirtualHubIPConfigurationClient() *VirtualHubIPConfigurationClient { + return &VirtualHubIPConfigurationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualHubRouteTableV2SClient creates a new instance of VirtualHubRouteTableV2SClient. +func (c *ClientFactory) NewVirtualHubRouteTableV2SClient() *VirtualHubRouteTableV2SClient { + return &VirtualHubRouteTableV2SClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualHubsClient creates a new instance of VirtualHubsClient. +func (c *ClientFactory) NewVirtualHubsClient() *VirtualHubsClient { + return &VirtualHubsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualNetworkGatewayConnectionsClient creates a new instance of VirtualNetworkGatewayConnectionsClient. +func (c *ClientFactory) NewVirtualNetworkGatewayConnectionsClient() *VirtualNetworkGatewayConnectionsClient { + return &VirtualNetworkGatewayConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualNetworkGatewayNatRulesClient creates a new instance of VirtualNetworkGatewayNatRulesClient. +func (c *ClientFactory) NewVirtualNetworkGatewayNatRulesClient() *VirtualNetworkGatewayNatRulesClient { + return &VirtualNetworkGatewayNatRulesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualNetworkGatewaysClient creates a new instance of VirtualNetworkGatewaysClient. +func (c *ClientFactory) NewVirtualNetworkGatewaysClient() *VirtualNetworkGatewaysClient { + return &VirtualNetworkGatewaysClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualNetworkPeeringsClient creates a new instance of VirtualNetworkPeeringsClient. +func (c *ClientFactory) NewVirtualNetworkPeeringsClient() *VirtualNetworkPeeringsClient { + return &VirtualNetworkPeeringsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualNetworkTapsClient creates a new instance of VirtualNetworkTapsClient. +func (c *ClientFactory) NewVirtualNetworkTapsClient() *VirtualNetworkTapsClient { + return &VirtualNetworkTapsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualNetworksClient creates a new instance of VirtualNetworksClient. +func (c *ClientFactory) NewVirtualNetworksClient() *VirtualNetworksClient { + return &VirtualNetworksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualRouterPeeringsClient creates a new instance of VirtualRouterPeeringsClient. +func (c *ClientFactory) NewVirtualRouterPeeringsClient() *VirtualRouterPeeringsClient { + return &VirtualRouterPeeringsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualRoutersClient creates a new instance of VirtualRoutersClient. +func (c *ClientFactory) NewVirtualRoutersClient() *VirtualRoutersClient { + return &VirtualRoutersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewVirtualWansClient creates a new instance of VirtualWansClient. +func (c *ClientFactory) NewVirtualWansClient() *VirtualWansClient { + return &VirtualWansClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWatchersClient creates a new instance of WatchersClient. +func (c *ClientFactory) NewWatchersClient() *WatchersClient { + return &WatchersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWebApplicationFirewallPoliciesClient creates a new instance of WebApplicationFirewallPoliciesClient. +func (c *ClientFactory) NewWebApplicationFirewallPoliciesClient() *WebApplicationFirewallPoliciesClient { + return &WebApplicationFirewallPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewWebCategoriesClient creates a new instance of WebCategoriesClient. +func (c *ClientFactory) NewWebCategoriesClient() *WebCategoriesClient { + return &WebCategoriesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/configurationpolicygroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/configurationpolicygroups_client.go new file mode 100644 index 00000000..1c615a89 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/configurationpolicygroups_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ConfigurationPolicyGroupsClient contains the methods for the ConfigurationPolicyGroups group. +// Don't use this type directly, use NewConfigurationPolicyGroupsClient() instead. +type ConfigurationPolicyGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewConfigurationPolicyGroupsClient creates a new instance of ConfigurationPolicyGroupsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewConfigurationPolicyGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationPolicyGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ConfigurationPolicyGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the ConfigurationPolicyGroup. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration. +// - configurationPolicyGroupName - The name of the ConfigurationPolicyGroup. +// - vpnServerConfigurationPolicyGroupParameters - Parameters supplied to create or update a VpnServerConfiguration PolicyGroup. +// - options - ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginCreateOrUpdate +// method. +func (client *ConfigurationPolicyGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, vpnServerConfigurationPolicyGroupParameters VPNServerConfigurationPolicyGroup, options *ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationPolicyGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, vpnServerConfigurationPolicyGroupParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationPolicyGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigurationPolicyGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ConfigurationPolicyGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, vpnServerConfigurationPolicyGroupParameters VPNServerConfigurationPolicyGroup, options *ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ConfigurationPolicyGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, vpnServerConfigurationPolicyGroupParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ConfigurationPolicyGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, vpnServerConfigurationPolicyGroupParameters VPNServerConfigurationPolicyGroup, options *ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnServerConfigurationName == "" { + return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) + if configurationPolicyGroupName == "" { + return nil, errors.New("parameter configurationPolicyGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationPolicyGroupName}", url.PathEscape(configurationPolicyGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vpnServerConfigurationPolicyGroupParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a ConfigurationPolicyGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the ConfigurationPolicyGroup. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration. +// - configurationPolicyGroupName - The name of the ConfigurationPolicyGroup. +// - options - ConfigurationPolicyGroupsClientBeginDeleteOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginDelete +// method. +func (client *ConfigurationPolicyGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientBeginDeleteOptions) (*runtime.Poller[ConfigurationPolicyGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConfigurationPolicyGroupsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConfigurationPolicyGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a ConfigurationPolicyGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ConfigurationPolicyGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ConfigurationPolicyGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ConfigurationPolicyGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnServerConfigurationName == "" { + return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) + if configurationPolicyGroupName == "" { + return nil, errors.New("parameter configurationPolicyGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationPolicyGroupName}", url.PathEscape(configurationPolicyGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a ConfigurationPolicyGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration. +// - configurationPolicyGroupName - The name of the ConfigurationPolicyGroup being retrieved. +// - options - ConfigurationPolicyGroupsClientGetOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.Get +// method. +func (client *ConfigurationPolicyGroupsClient) Get(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientGetOptions) (ConfigurationPolicyGroupsClientGetResponse, error) { + var err error + const operationName = "ConfigurationPolicyGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, options) + if err != nil { + return ConfigurationPolicyGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConfigurationPolicyGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConfigurationPolicyGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ConfigurationPolicyGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnServerConfigurationName == "" { + return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) + if configurationPolicyGroupName == "" { + return nil, errors.New("parameter configurationPolicyGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationPolicyGroupName}", url.PathEscape(configurationPolicyGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ConfigurationPolicyGroupsClient) getHandleResponse(resp *http.Response) (ConfigurationPolicyGroupsClientGetResponse, error) { + result := ConfigurationPolicyGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VPNServerConfigurationPolicyGroup); err != nil { + return ConfigurationPolicyGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListByVPNServerConfigurationPager - Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration. +// - options - ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager +// method. +func (client *ConfigurationPolicyGroupsClient) NewListByVPNServerConfigurationPager(resourceGroupName string, vpnServerConfigurationName string, options *ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions) *runtime.Pager[ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse] { + return runtime.NewPager(runtime.PagingHandler[ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse]{ + More: func(page ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse) (ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVPNServerConfigurationCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, options) + }, nil) + if err != nil { + return ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{}, err + } + return client.listByVPNServerConfigurationHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByVPNServerConfigurationCreateRequest creates the ListByVPNServerConfiguration request. +func (client *ConfigurationPolicyGroupsClient) listByVPNServerConfigurationCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnServerConfigurationName == "" { + return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByVPNServerConfigurationHandleResponse handles the ListByVPNServerConfiguration response. +func (client *ConfigurationPolicyGroupsClient) listByVPNServerConfigurationHandleResponse(resp *http.Response) (ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse, error) { + result := ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNServerConfigurationPolicyGroupsResult); err != nil { + return ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/connectionmonitors_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/connectionmonitors_client.go new file mode 100644 index 00000000..1e94426f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/connectionmonitors_client.go @@ -0,0 +1,671 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ConnectionMonitorsClient contains the methods for the ConnectionMonitors group. +// Don't use this type directly, use NewConnectionMonitorsClient() instead. +type ConnectionMonitorsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewConnectionMonitorsClient creates a new instance of ConnectionMonitorsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewConnectionMonitorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectionMonitorsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ConnectionMonitorsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a connection monitor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name of the connection monitor. +// - parameters - Parameters that define the operation to create a connection monitor. +// - options - ConnectionMonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorsClient.BeginCreateOrUpdate +// method. +func (client *ConnectionMonitorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, options *ConnectionMonitorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConnectionMonitorsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectionMonitorsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectionMonitorsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a connection monitor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ConnectionMonitorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, options *ConnectionMonitorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ConnectionMonitorsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ConnectionMonitorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, options *ConnectionMonitorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if connectionMonitorName == "" { + return nil, errors.New("parameter connectionMonitorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Migrate != nil { + reqQP.Set("migrate", *options.Migrate) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified connection monitor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name of the connection monitor. +// - options - ConnectionMonitorsClientBeginDeleteOptions contains the optional parameters for the ConnectionMonitorsClient.BeginDelete +// method. +func (client *ConnectionMonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginDeleteOptions) (*runtime.Poller[ConnectionMonitorsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectionMonitorsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectionMonitorsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified connection monitor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ConnectionMonitorsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ConnectionMonitorsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ConnectionMonitorsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if connectionMonitorName == "" { + return nil, errors.New("parameter connectionMonitorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a connection monitor by name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name of the connection monitor. +// - options - ConnectionMonitorsClientGetOptions contains the optional parameters for the ConnectionMonitorsClient.Get method. +func (client *ConnectionMonitorsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientGetOptions) (ConnectionMonitorsClientGetResponse, error) { + var err error + const operationName = "ConnectionMonitorsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return ConnectionMonitorsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConnectionMonitorsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectionMonitorsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ConnectionMonitorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if connectionMonitorName == "" { + return nil, errors.New("parameter connectionMonitorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ConnectionMonitorsClient) getHandleResponse(resp *http.Response) (ConnectionMonitorsClientGetResponse, error) { + result := ConnectionMonitorsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionMonitorResult); err != nil { + return ConnectionMonitorsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all connection monitors for the specified Network Watcher. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - options - ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.NewListPager +// method. +func (client *ConnectionMonitorsClient) NewListPager(resourceGroupName string, networkWatcherName string, options *ConnectionMonitorsClientListOptions) *runtime.Pager[ConnectionMonitorsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ConnectionMonitorsClientListResponse]{ + More: func(page ConnectionMonitorsClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ConnectionMonitorsClientListResponse) (ConnectionMonitorsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConnectionMonitorsClient.NewListPager") + req, err := client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) + if err != nil { + return ConnectionMonitorsClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConnectionMonitorsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ConnectionMonitorsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ConnectionMonitorsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, options *ConnectionMonitorsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ConnectionMonitorsClient) listHandleResponse(resp *http.Response) (ConnectionMonitorsClientListResponse, error) { + result := ConnectionMonitorsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionMonitorListResult); err != nil { + return ConnectionMonitorsClientListResponse{}, err + } + return result, nil +} + +// BeginQuery - Query a snapshot of the most recent connection states. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name given to the connection monitor. +// - options - ConnectionMonitorsClientBeginQueryOptions contains the optional parameters for the ConnectionMonitorsClient.BeginQuery +// method. +func (client *ConnectionMonitorsClient) BeginQuery(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginQueryOptions) (*runtime.Poller[ConnectionMonitorsClientQueryResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.query(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectionMonitorsClientQueryResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectionMonitorsClientQueryResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Query - Query a snapshot of the most recent connection states. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ConnectionMonitorsClient) query(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginQueryOptions) (*http.Response, error) { + var err error + const operationName = "ConnectionMonitorsClient.BeginQuery" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.queryCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// queryCreateRequest creates the Query request. +func (client *ConnectionMonitorsClient) queryCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginQueryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if connectionMonitorName == "" { + return nil, errors.New("parameter connectionMonitorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStart - Starts the specified connection monitor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name of the connection monitor. +// - options - ConnectionMonitorsClientBeginStartOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStart +// method. +func (client *ConnectionMonitorsClient) BeginStart(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStartOptions) (*runtime.Poller[ConnectionMonitorsClientStartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.start(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectionMonitorsClientStartResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectionMonitorsClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Start - Starts the specified connection monitor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ConnectionMonitorsClient) start(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "ConnectionMonitorsClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startCreateRequest creates the Start request. +func (client *ConnectionMonitorsClient) startCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if connectionMonitorName == "" { + return nil, errors.New("parameter connectionMonitorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStop - Stops the specified connection monitor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name of the connection monitor. +// - options - ConnectionMonitorsClientBeginStopOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStop +// method. +func (client *ConnectionMonitorsClient) BeginStop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStopOptions) (*runtime.Poller[ConnectionMonitorsClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectionMonitorsClientStopResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectionMonitorsClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Stop - Stops the specified connection monitor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ConnectionMonitorsClient) stop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "ConnectionMonitorsClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopCreateRequest creates the Stop request. +func (client *ConnectionMonitorsClient) stopCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if connectionMonitorName == "" { + return nil, errors.New("parameter connectionMonitorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// UpdateTags - Update tags of the specified connection monitor. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - connectionMonitorName - The name of the connection monitor. +// - parameters - Parameters supplied to update connection monitor tags. +// - options - ConnectionMonitorsClientUpdateTagsOptions contains the optional parameters for the ConnectionMonitorsClient.UpdateTags +// method. +func (client *ConnectionMonitorsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters TagsObject, options *ConnectionMonitorsClientUpdateTagsOptions) (ConnectionMonitorsClientUpdateTagsResponse, error) { + var err error + const operationName = "ConnectionMonitorsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) + if err != nil { + return ConnectionMonitorsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConnectionMonitorsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectionMonitorsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *ConnectionMonitorsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters TagsObject, options *ConnectionMonitorsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if connectionMonitorName == "" { + return nil, errors.New("parameter connectionMonitorName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionMonitorName}", url.PathEscape(connectionMonitorName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *ConnectionMonitorsClient) updateTagsHandleResponse(resp *http.Response) (ConnectionMonitorsClientUpdateTagsResponse, error) { + result := ConnectionMonitorsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionMonitorResult); err != nil { + return ConnectionMonitorsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/connectivityconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/connectivityconfigurations_client.go new file mode 100644 index 00000000..fe590913 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/connectivityconfigurations_client.go @@ -0,0 +1,349 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ConnectivityConfigurationsClient contains the methods for the ConnectivityConfigurations group. +// Don't use this type directly, use NewConnectivityConfigurationsClient() instead. +type ConnectivityConfigurationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewConnectivityConfigurationsClient creates a new instance of ConnectivityConfigurationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewConnectivityConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectivityConfigurationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ConnectivityConfigurationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates/Updates a new network manager connectivity configuration +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager connectivity configuration. +// - connectivityConfiguration - Parameters supplied to create/update a network manager connectivity configuration +// - options - ConnectivityConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the ConnectivityConfigurationsClient.CreateOrUpdate +// method. +func (client *ConnectivityConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, connectivityConfiguration ConnectivityConfiguration, options *ConnectivityConfigurationsClientCreateOrUpdateOptions) (ConnectivityConfigurationsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ConnectivityConfigurationsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, connectivityConfiguration, options) + if err != nil { + return ConnectivityConfigurationsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConnectivityConfigurationsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ConnectivityConfigurationsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ConnectivityConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, connectivityConfiguration ConnectivityConfiguration, options *ConnectivityConfigurationsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectivityConfiguration); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ConnectivityConfigurationsClient) createOrUpdateHandleResponse(resp *http.Response) (ConnectivityConfigurationsClientCreateOrUpdateResponse, error) { + result := ConnectivityConfigurationsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectivityConfiguration); err != nil { + return ConnectivityConfigurationsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes a network manager connectivity configuration, specified by the resource group, network manager name, +// and connectivity configuration name +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager connectivity configuration. +// - options - ConnectivityConfigurationsClientBeginDeleteOptions contains the optional parameters for the ConnectivityConfigurationsClient.BeginDelete +// method. +func (client *ConnectivityConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientBeginDeleteOptions) (*runtime.Poller[ConnectivityConfigurationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ConnectivityConfigurationsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ConnectivityConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and +// connectivity configuration name +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ConnectivityConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ConnectivityConfigurationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ConnectivityConfigurationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity +// Configuration name +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager connectivity configuration. +// - options - ConnectivityConfigurationsClientGetOptions contains the optional parameters for the ConnectivityConfigurationsClient.Get +// method. +func (client *ConnectivityConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientGetOptions) (ConnectivityConfigurationsClientGetResponse, error) { + var err error + const operationName = "ConnectivityConfigurationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return ConnectivityConfigurationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ConnectivityConfigurationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ConnectivityConfigurationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ConnectivityConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ConnectivityConfigurationsClient) getHandleResponse(resp *http.Response) (ConnectivityConfigurationsClientGetResponse, error) { + result := ConnectivityConfigurationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectivityConfiguration); err != nil { + return ConnectivityConfigurationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the network manager connectivity configuration in a specified network manager. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - ConnectivityConfigurationsClientListOptions contains the optional parameters for the ConnectivityConfigurationsClient.NewListPager +// method. +func (client *ConnectivityConfigurationsClient) NewListPager(resourceGroupName string, networkManagerName string, options *ConnectivityConfigurationsClientListOptions) *runtime.Pager[ConnectivityConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ConnectivityConfigurationsClientListResponse]{ + More: func(page ConnectivityConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ConnectivityConfigurationsClientListResponse) (ConnectivityConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ConnectivityConfigurationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) + if err != nil { + return ConnectivityConfigurationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ConnectivityConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *ConnectivityConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ConnectivityConfigurationsClient) listHandleResponse(resp *http.Response) (ConnectivityConfigurationsClientListResponse, error) { + result := ConnectivityConfigurationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectivityConfigurationListResult); err != nil { + return ConnectivityConfigurationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/constants.go new file mode 100644 index 00000000..eb9395b8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/constants.go @@ -0,0 +1,4712 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" + moduleVersion = "v6.2.0" +) + +// Access - Access to be allowed or denied. +type Access string + +const ( + AccessAllow Access = "Allow" + AccessDeny Access = "Deny" +) + +// PossibleAccessValues returns the possible values for the Access const type. +func PossibleAccessValues() []Access { + return []Access{ + AccessAllow, + AccessDeny, + } +} + +// ActionType - Defines the action to take on rule match. +type ActionType string + +const ( + ActionTypeAllow ActionType = "Allow" + ActionTypeAnomalyScoring ActionType = "AnomalyScoring" + ActionTypeBlock ActionType = "Block" + ActionTypeJSChallenge ActionType = "JSChallenge" + ActionTypeLog ActionType = "Log" +) + +// PossibleActionTypeValues returns the possible values for the ActionType const type. +func PossibleActionTypeValues() []ActionType { + return []ActionType{ + ActionTypeAllow, + ActionTypeAnomalyScoring, + ActionTypeBlock, + ActionTypeJSChallenge, + ActionTypeLog, + } +} + +// AddressPrefixType - Address prefix type. +type AddressPrefixType string + +const ( + AddressPrefixTypeIPPrefix AddressPrefixType = "IPPrefix" + AddressPrefixTypeNetworkGroup AddressPrefixType = "NetworkGroup" + AddressPrefixTypeServiceTag AddressPrefixType = "ServiceTag" +) + +// PossibleAddressPrefixTypeValues returns the possible values for the AddressPrefixType const type. +func PossibleAddressPrefixTypeValues() []AddressPrefixType { + return []AddressPrefixType{ + AddressPrefixTypeIPPrefix, + AddressPrefixTypeNetworkGroup, + AddressPrefixTypeServiceTag, + } +} + +// AddressSpaceAggregationOption - Option indicating the update behavior of a resource's address prefixes referenced within +// a network manager configuration. +type AddressSpaceAggregationOption string + +const ( + AddressSpaceAggregationOptionManual AddressSpaceAggregationOption = "Manual" + AddressSpaceAggregationOptionNone AddressSpaceAggregationOption = "None" +) + +// PossibleAddressSpaceAggregationOptionValues returns the possible values for the AddressSpaceAggregationOption const type. +func PossibleAddressSpaceAggregationOptionValues() []AddressSpaceAggregationOption { + return []AddressSpaceAggregationOption{ + AddressSpaceAggregationOptionManual, + AddressSpaceAggregationOptionNone, + } +} + +// AdminRuleKind - Whether the rule is custom or default. +type AdminRuleKind string + +const ( + AdminRuleKindCustom AdminRuleKind = "Custom" + AdminRuleKindDefault AdminRuleKind = "Default" +) + +// PossibleAdminRuleKindValues returns the possible values for the AdminRuleKind const type. +func PossibleAdminRuleKindValues() []AdminRuleKind { + return []AdminRuleKind{ + AdminRuleKindCustom, + AdminRuleKindDefault, + } +} + +// AdminState - Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways +// in the vnet +type AdminState string + +const ( + AdminStateDisabled AdminState = "Disabled" + AdminStateEnabled AdminState = "Enabled" +) + +// PossibleAdminStateValues returns the possible values for the AdminState const type. +func PossibleAdminStateValues() []AdminState { + return []AdminState{ + AdminStateDisabled, + AdminStateEnabled, + } +} + +// ApplicationGatewayBackendHealthServerHealth - Health of backend server. +type ApplicationGatewayBackendHealthServerHealth string + +const ( + ApplicationGatewayBackendHealthServerHealthDown ApplicationGatewayBackendHealthServerHealth = "Down" + ApplicationGatewayBackendHealthServerHealthDraining ApplicationGatewayBackendHealthServerHealth = "Draining" + ApplicationGatewayBackendHealthServerHealthPartial ApplicationGatewayBackendHealthServerHealth = "Partial" + ApplicationGatewayBackendHealthServerHealthUnknown ApplicationGatewayBackendHealthServerHealth = "Unknown" + ApplicationGatewayBackendHealthServerHealthUp ApplicationGatewayBackendHealthServerHealth = "Up" +) + +// PossibleApplicationGatewayBackendHealthServerHealthValues returns the possible values for the ApplicationGatewayBackendHealthServerHealth const type. +func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth { + return []ApplicationGatewayBackendHealthServerHealth{ + ApplicationGatewayBackendHealthServerHealthDown, + ApplicationGatewayBackendHealthServerHealthDraining, + ApplicationGatewayBackendHealthServerHealthPartial, + ApplicationGatewayBackendHealthServerHealthUnknown, + ApplicationGatewayBackendHealthServerHealthUp, + } +} + +// ApplicationGatewayClientRevocationOptions - Verify client certificate revocation status. +type ApplicationGatewayClientRevocationOptions string + +const ( + ApplicationGatewayClientRevocationOptionsNone ApplicationGatewayClientRevocationOptions = "None" + ApplicationGatewayClientRevocationOptionsOCSP ApplicationGatewayClientRevocationOptions = "OCSP" +) + +// PossibleApplicationGatewayClientRevocationOptionsValues returns the possible values for the ApplicationGatewayClientRevocationOptions const type. +func PossibleApplicationGatewayClientRevocationOptionsValues() []ApplicationGatewayClientRevocationOptions { + return []ApplicationGatewayClientRevocationOptions{ + ApplicationGatewayClientRevocationOptionsNone, + ApplicationGatewayClientRevocationOptionsOCSP, + } +} + +// ApplicationGatewayCookieBasedAffinity - Cookie based affinity. +type ApplicationGatewayCookieBasedAffinity string + +const ( + ApplicationGatewayCookieBasedAffinityDisabled ApplicationGatewayCookieBasedAffinity = "Disabled" + ApplicationGatewayCookieBasedAffinityEnabled ApplicationGatewayCookieBasedAffinity = "Enabled" +) + +// PossibleApplicationGatewayCookieBasedAffinityValues returns the possible values for the ApplicationGatewayCookieBasedAffinity const type. +func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity { + return []ApplicationGatewayCookieBasedAffinity{ + ApplicationGatewayCookieBasedAffinityDisabled, + ApplicationGatewayCookieBasedAffinityEnabled, + } +} + +// ApplicationGatewayCustomErrorStatusCode - Status code of the application gateway custom error. +type ApplicationGatewayCustomErrorStatusCode string + +const ( + ApplicationGatewayCustomErrorStatusCodeHTTPStatus400 ApplicationGatewayCustomErrorStatusCode = "HttpStatus400" + ApplicationGatewayCustomErrorStatusCodeHTTPStatus403 ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" + ApplicationGatewayCustomErrorStatusCodeHTTPStatus404 ApplicationGatewayCustomErrorStatusCode = "HttpStatus404" + ApplicationGatewayCustomErrorStatusCodeHTTPStatus405 ApplicationGatewayCustomErrorStatusCode = "HttpStatus405" + ApplicationGatewayCustomErrorStatusCodeHTTPStatus408 ApplicationGatewayCustomErrorStatusCode = "HttpStatus408" + ApplicationGatewayCustomErrorStatusCodeHTTPStatus500 ApplicationGatewayCustomErrorStatusCode = "HttpStatus500" + ApplicationGatewayCustomErrorStatusCodeHTTPStatus502 ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" + ApplicationGatewayCustomErrorStatusCodeHTTPStatus503 ApplicationGatewayCustomErrorStatusCode = "HttpStatus503" + ApplicationGatewayCustomErrorStatusCodeHTTPStatus504 ApplicationGatewayCustomErrorStatusCode = "HttpStatus504" +) + +// PossibleApplicationGatewayCustomErrorStatusCodeValues returns the possible values for the ApplicationGatewayCustomErrorStatusCode const type. +func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewayCustomErrorStatusCode { + return []ApplicationGatewayCustomErrorStatusCode{ + ApplicationGatewayCustomErrorStatusCodeHTTPStatus400, + ApplicationGatewayCustomErrorStatusCodeHTTPStatus403, + ApplicationGatewayCustomErrorStatusCodeHTTPStatus404, + ApplicationGatewayCustomErrorStatusCodeHTTPStatus405, + ApplicationGatewayCustomErrorStatusCodeHTTPStatus408, + ApplicationGatewayCustomErrorStatusCodeHTTPStatus500, + ApplicationGatewayCustomErrorStatusCodeHTTPStatus502, + ApplicationGatewayCustomErrorStatusCodeHTTPStatus503, + ApplicationGatewayCustomErrorStatusCodeHTTPStatus504, + } +} + +// ApplicationGatewayFirewallMode - Web application firewall mode. +type ApplicationGatewayFirewallMode string + +const ( + ApplicationGatewayFirewallModeDetection ApplicationGatewayFirewallMode = "Detection" + ApplicationGatewayFirewallModePrevention ApplicationGatewayFirewallMode = "Prevention" +) + +// PossibleApplicationGatewayFirewallModeValues returns the possible values for the ApplicationGatewayFirewallMode const type. +func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode { + return []ApplicationGatewayFirewallMode{ + ApplicationGatewayFirewallModeDetection, + ApplicationGatewayFirewallModePrevention, + } +} + +// ApplicationGatewayFirewallRateLimitDuration - Duration over which Rate Limit policy will be applied. Applies only when +// ruleType is RateLimitRule. +type ApplicationGatewayFirewallRateLimitDuration string + +const ( + ApplicationGatewayFirewallRateLimitDurationFiveMins ApplicationGatewayFirewallRateLimitDuration = "FiveMins" + ApplicationGatewayFirewallRateLimitDurationOneMin ApplicationGatewayFirewallRateLimitDuration = "OneMin" +) + +// PossibleApplicationGatewayFirewallRateLimitDurationValues returns the possible values for the ApplicationGatewayFirewallRateLimitDuration const type. +func PossibleApplicationGatewayFirewallRateLimitDurationValues() []ApplicationGatewayFirewallRateLimitDuration { + return []ApplicationGatewayFirewallRateLimitDuration{ + ApplicationGatewayFirewallRateLimitDurationFiveMins, + ApplicationGatewayFirewallRateLimitDurationOneMin, + } +} + +// ApplicationGatewayFirewallUserSessionVariable - User Session clause variable. +type ApplicationGatewayFirewallUserSessionVariable string + +const ( + ApplicationGatewayFirewallUserSessionVariableClientAddr ApplicationGatewayFirewallUserSessionVariable = "ClientAddr" + ApplicationGatewayFirewallUserSessionVariableGeoLocation ApplicationGatewayFirewallUserSessionVariable = "GeoLocation" + ApplicationGatewayFirewallUserSessionVariableNone ApplicationGatewayFirewallUserSessionVariable = "None" +) + +// PossibleApplicationGatewayFirewallUserSessionVariableValues returns the possible values for the ApplicationGatewayFirewallUserSessionVariable const type. +func PossibleApplicationGatewayFirewallUserSessionVariableValues() []ApplicationGatewayFirewallUserSessionVariable { + return []ApplicationGatewayFirewallUserSessionVariable{ + ApplicationGatewayFirewallUserSessionVariableClientAddr, + ApplicationGatewayFirewallUserSessionVariableGeoLocation, + ApplicationGatewayFirewallUserSessionVariableNone, + } +} + +// ApplicationGatewayLoadDistributionAlgorithm - Load Distribution Algorithm enums. +type ApplicationGatewayLoadDistributionAlgorithm string + +const ( + ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = "IpHash" + ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = "LeastConnections" + ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = "RoundRobin" +) + +// PossibleApplicationGatewayLoadDistributionAlgorithmValues returns the possible values for the ApplicationGatewayLoadDistributionAlgorithm const type. +func PossibleApplicationGatewayLoadDistributionAlgorithmValues() []ApplicationGatewayLoadDistributionAlgorithm { + return []ApplicationGatewayLoadDistributionAlgorithm{ + ApplicationGatewayLoadDistributionAlgorithmIPHash, + ApplicationGatewayLoadDistributionAlgorithmLeastConnections, + ApplicationGatewayLoadDistributionAlgorithmRoundRobin, + } +} + +// ApplicationGatewayOperationalState - Operational state of the application gateway resource. +type ApplicationGatewayOperationalState string + +const ( + ApplicationGatewayOperationalStateRunning ApplicationGatewayOperationalState = "Running" + ApplicationGatewayOperationalStateStarting ApplicationGatewayOperationalState = "Starting" + ApplicationGatewayOperationalStateStopped ApplicationGatewayOperationalState = "Stopped" + ApplicationGatewayOperationalStateStopping ApplicationGatewayOperationalState = "Stopping" +) + +// PossibleApplicationGatewayOperationalStateValues returns the possible values for the ApplicationGatewayOperationalState const type. +func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState { + return []ApplicationGatewayOperationalState{ + ApplicationGatewayOperationalStateRunning, + ApplicationGatewayOperationalStateStarting, + ApplicationGatewayOperationalStateStopped, + ApplicationGatewayOperationalStateStopping, + } +} + +// ApplicationGatewayProtocol - Application Gateway protocol. +type ApplicationGatewayProtocol string + +const ( + // ApplicationGatewayProtocolHTTP - Supported for httpListeners and backendHttpSettingsCollection properties. + ApplicationGatewayProtocolHTTP ApplicationGatewayProtocol = "Http" + // ApplicationGatewayProtocolHTTPS - Supported for httpListeners and backendHttpSettingsCollection properties. + ApplicationGatewayProtocolHTTPS ApplicationGatewayProtocol = "Https" + // ApplicationGatewayProtocolTCP - Supported for listeners and backendSettingsCollection properties. + ApplicationGatewayProtocolTCP ApplicationGatewayProtocol = "Tcp" + // ApplicationGatewayProtocolTLS - Supported for listeners and backendSettingsCollection properties. + ApplicationGatewayProtocolTLS ApplicationGatewayProtocol = "Tls" +) + +// PossibleApplicationGatewayProtocolValues returns the possible values for the ApplicationGatewayProtocol const type. +func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol { + return []ApplicationGatewayProtocol{ + ApplicationGatewayProtocolHTTP, + ApplicationGatewayProtocolHTTPS, + ApplicationGatewayProtocolTCP, + ApplicationGatewayProtocolTLS, + } +} + +// ApplicationGatewayRedirectType - Redirect type enum. +type ApplicationGatewayRedirectType string + +const ( + ApplicationGatewayRedirectTypeFound ApplicationGatewayRedirectType = "Found" + ApplicationGatewayRedirectTypePermanent ApplicationGatewayRedirectType = "Permanent" + ApplicationGatewayRedirectTypeSeeOther ApplicationGatewayRedirectType = "SeeOther" + ApplicationGatewayRedirectTypeTemporary ApplicationGatewayRedirectType = "Temporary" +) + +// PossibleApplicationGatewayRedirectTypeValues returns the possible values for the ApplicationGatewayRedirectType const type. +func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType { + return []ApplicationGatewayRedirectType{ + ApplicationGatewayRedirectTypeFound, + ApplicationGatewayRedirectTypePermanent, + ApplicationGatewayRedirectTypeSeeOther, + ApplicationGatewayRedirectTypeTemporary, + } +} + +// ApplicationGatewayRequestRoutingRuleType - Rule type. +type ApplicationGatewayRequestRoutingRuleType string + +const ( + ApplicationGatewayRequestRoutingRuleTypeBasic ApplicationGatewayRequestRoutingRuleType = "Basic" + ApplicationGatewayRequestRoutingRuleTypePathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" +) + +// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns the possible values for the ApplicationGatewayRequestRoutingRuleType const type. +func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType { + return []ApplicationGatewayRequestRoutingRuleType{ + ApplicationGatewayRequestRoutingRuleTypeBasic, + ApplicationGatewayRequestRoutingRuleTypePathBasedRouting, + } +} + +// ApplicationGatewayRuleSetStatusOptions - The rule set status +type ApplicationGatewayRuleSetStatusOptions string + +const ( + ApplicationGatewayRuleSetStatusOptionsDeprecated ApplicationGatewayRuleSetStatusOptions = "Deprecated" + ApplicationGatewayRuleSetStatusOptionsGA ApplicationGatewayRuleSetStatusOptions = "GA" + ApplicationGatewayRuleSetStatusOptionsPreview ApplicationGatewayRuleSetStatusOptions = "Preview" + ApplicationGatewayRuleSetStatusOptionsSupported ApplicationGatewayRuleSetStatusOptions = "Supported" +) + +// PossibleApplicationGatewayRuleSetStatusOptionsValues returns the possible values for the ApplicationGatewayRuleSetStatusOptions const type. +func PossibleApplicationGatewayRuleSetStatusOptionsValues() []ApplicationGatewayRuleSetStatusOptions { + return []ApplicationGatewayRuleSetStatusOptions{ + ApplicationGatewayRuleSetStatusOptionsDeprecated, + ApplicationGatewayRuleSetStatusOptionsGA, + ApplicationGatewayRuleSetStatusOptionsPreview, + ApplicationGatewayRuleSetStatusOptionsSupported, + } +} + +// ApplicationGatewaySKUFamily - Family of an application gateway SKU. +type ApplicationGatewaySKUFamily string + +const ( + ApplicationGatewaySKUFamilyGeneration1 ApplicationGatewaySKUFamily = "Generation_1" + ApplicationGatewaySKUFamilyGeneration2 ApplicationGatewaySKUFamily = "Generation_2" +) + +// PossibleApplicationGatewaySKUFamilyValues returns the possible values for the ApplicationGatewaySKUFamily const type. +func PossibleApplicationGatewaySKUFamilyValues() []ApplicationGatewaySKUFamily { + return []ApplicationGatewaySKUFamily{ + ApplicationGatewaySKUFamilyGeneration1, + ApplicationGatewaySKUFamilyGeneration2, + } +} + +// ApplicationGatewaySKUName - Name of an application gateway SKU. +type ApplicationGatewaySKUName string + +const ( + ApplicationGatewaySKUNameBasic ApplicationGatewaySKUName = "Basic" + ApplicationGatewaySKUNameStandardLarge ApplicationGatewaySKUName = "Standard_Large" + ApplicationGatewaySKUNameStandardMedium ApplicationGatewaySKUName = "Standard_Medium" + ApplicationGatewaySKUNameStandardSmall ApplicationGatewaySKUName = "Standard_Small" + ApplicationGatewaySKUNameStandardV2 ApplicationGatewaySKUName = "Standard_v2" + ApplicationGatewaySKUNameWAFLarge ApplicationGatewaySKUName = "WAF_Large" + ApplicationGatewaySKUNameWAFMedium ApplicationGatewaySKUName = "WAF_Medium" + ApplicationGatewaySKUNameWAFV2 ApplicationGatewaySKUName = "WAF_v2" +) + +// PossibleApplicationGatewaySKUNameValues returns the possible values for the ApplicationGatewaySKUName const type. +func PossibleApplicationGatewaySKUNameValues() []ApplicationGatewaySKUName { + return []ApplicationGatewaySKUName{ + ApplicationGatewaySKUNameBasic, + ApplicationGatewaySKUNameStandardLarge, + ApplicationGatewaySKUNameStandardMedium, + ApplicationGatewaySKUNameStandardSmall, + ApplicationGatewaySKUNameStandardV2, + ApplicationGatewaySKUNameWAFLarge, + ApplicationGatewaySKUNameWAFMedium, + ApplicationGatewaySKUNameWAFV2, + } +} + +// ApplicationGatewaySSLCipherSuite - Ssl cipher suites enums. +type ApplicationGatewaySSLCipherSuite string + +const ( + ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITH3DESEDECBCSHA ApplicationGatewaySSLCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" + ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" + ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES128CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySSLCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" + ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES256CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySSLCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128GCMSHA256 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256GCMSHA384 ApplicationGatewaySSLCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + ApplicationGatewaySSLCipherSuiteTLSRSAWITH3DESEDECBCSHA ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128GCMSHA256 ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256CBCSHA ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256CBCSHA256 ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256GCMSHA384 ApplicationGatewaySSLCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" +) + +// PossibleApplicationGatewaySSLCipherSuiteValues returns the possible values for the ApplicationGatewaySSLCipherSuite const type. +func PossibleApplicationGatewaySSLCipherSuiteValues() []ApplicationGatewaySSLCipherSuite { + return []ApplicationGatewaySSLCipherSuite{ + ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITH3DESEDECBCSHA, + ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES128CBCSHA, + ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES128CBCSHA256, + ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES256CBCSHA, + ApplicationGatewaySSLCipherSuiteTLSDHEDSSWITHAES256CBCSHA256, + ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES128CBCSHA, + ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES128GCMSHA256, + ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES256CBCSHA, + ApplicationGatewaySSLCipherSuiteTLSDHERSAWITHAES256GCMSHA384, + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA, + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128CBCSHA256, + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES128GCMSHA256, + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA, + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256CBCSHA384, + ApplicationGatewaySSLCipherSuiteTLSECDHEECDSAWITHAES256GCMSHA384, + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128CBCSHA, + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128CBCSHA256, + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128GCMSHA256, + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256CBCSHA, + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256CBCSHA384, + ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES256GCMSHA384, + ApplicationGatewaySSLCipherSuiteTLSRSAWITH3DESEDECBCSHA, + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128CBCSHA, + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128CBCSHA256, + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES128GCMSHA256, + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256CBCSHA, + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256CBCSHA256, + ApplicationGatewaySSLCipherSuiteTLSRSAWITHAES256GCMSHA384, + } +} + +// ApplicationGatewaySSLPolicyName - Ssl predefined policy name enums. +type ApplicationGatewaySSLPolicyName string + +const ( + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20150501 ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20150501" + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401 ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20170401" + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401S ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20170401S" + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101 ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20220101" + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101S ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20220101S" +) + +// PossibleApplicationGatewaySSLPolicyNameValues returns the possible values for the ApplicationGatewaySSLPolicyName const type. +func PossibleApplicationGatewaySSLPolicyNameValues() []ApplicationGatewaySSLPolicyName { + return []ApplicationGatewaySSLPolicyName{ + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20150501, + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401, + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401S, + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101, + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101S, + } +} + +// ApplicationGatewaySSLPolicyType - Type of Ssl Policy. +type ApplicationGatewaySSLPolicyType string + +const ( + ApplicationGatewaySSLPolicyTypeCustom ApplicationGatewaySSLPolicyType = "Custom" + ApplicationGatewaySSLPolicyTypeCustomV2 ApplicationGatewaySSLPolicyType = "CustomV2" + ApplicationGatewaySSLPolicyTypePredefined ApplicationGatewaySSLPolicyType = "Predefined" +) + +// PossibleApplicationGatewaySSLPolicyTypeValues returns the possible values for the ApplicationGatewaySSLPolicyType const type. +func PossibleApplicationGatewaySSLPolicyTypeValues() []ApplicationGatewaySSLPolicyType { + return []ApplicationGatewaySSLPolicyType{ + ApplicationGatewaySSLPolicyTypeCustom, + ApplicationGatewaySSLPolicyTypeCustomV2, + ApplicationGatewaySSLPolicyTypePredefined, + } +} + +// ApplicationGatewaySSLProtocol - Ssl protocol enums. +type ApplicationGatewaySSLProtocol string + +const ( + ApplicationGatewaySSLProtocolTLSv10 ApplicationGatewaySSLProtocol = "TLSv1_0" + ApplicationGatewaySSLProtocolTLSv11 ApplicationGatewaySSLProtocol = "TLSv1_1" + ApplicationGatewaySSLProtocolTLSv12 ApplicationGatewaySSLProtocol = "TLSv1_2" + ApplicationGatewaySSLProtocolTLSv13 ApplicationGatewaySSLProtocol = "TLSv1_3" +) + +// PossibleApplicationGatewaySSLProtocolValues returns the possible values for the ApplicationGatewaySSLProtocol const type. +func PossibleApplicationGatewaySSLProtocolValues() []ApplicationGatewaySSLProtocol { + return []ApplicationGatewaySSLProtocol{ + ApplicationGatewaySSLProtocolTLSv10, + ApplicationGatewaySSLProtocolTLSv11, + ApplicationGatewaySSLProtocolTLSv12, + ApplicationGatewaySSLProtocolTLSv13, + } +} + +// ApplicationGatewayTier - Tier of an application gateway. +type ApplicationGatewayTier string + +const ( + ApplicationGatewayTierBasic ApplicationGatewayTier = "Basic" + ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" + ApplicationGatewayTierStandardV2 ApplicationGatewayTier = "Standard_v2" + ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" + ApplicationGatewayTierWAFV2 ApplicationGatewayTier = "WAF_v2" +) + +// PossibleApplicationGatewayTierValues returns the possible values for the ApplicationGatewayTier const type. +func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier { + return []ApplicationGatewayTier{ + ApplicationGatewayTierBasic, + ApplicationGatewayTierStandard, + ApplicationGatewayTierStandardV2, + ApplicationGatewayTierWAF, + ApplicationGatewayTierWAFV2, + } +} + +type ApplicationGatewayTierTypes string + +const ( + ApplicationGatewayTierTypesStandard ApplicationGatewayTierTypes = "Standard" + ApplicationGatewayTierTypesStandardV2 ApplicationGatewayTierTypes = "Standard_v2" + ApplicationGatewayTierTypesWAF ApplicationGatewayTierTypes = "WAF" + ApplicationGatewayTierTypesWAFV2 ApplicationGatewayTierTypes = "WAF_v2" +) + +// PossibleApplicationGatewayTierTypesValues returns the possible values for the ApplicationGatewayTierTypes const type. +func PossibleApplicationGatewayTierTypesValues() []ApplicationGatewayTierTypes { + return []ApplicationGatewayTierTypes{ + ApplicationGatewayTierTypesStandard, + ApplicationGatewayTierTypesStandardV2, + ApplicationGatewayTierTypesWAF, + ApplicationGatewayTierTypesWAFV2, + } +} + +// ApplicationGatewayWafRuleActionTypes - The string representation of the web application firewall rule action. +type ApplicationGatewayWafRuleActionTypes string + +const ( + ApplicationGatewayWafRuleActionTypesAllow ApplicationGatewayWafRuleActionTypes = "Allow" + ApplicationGatewayWafRuleActionTypesAnomalyScoring ApplicationGatewayWafRuleActionTypes = "AnomalyScoring" + ApplicationGatewayWafRuleActionTypesBlock ApplicationGatewayWafRuleActionTypes = "Block" + ApplicationGatewayWafRuleActionTypesLog ApplicationGatewayWafRuleActionTypes = "Log" + ApplicationGatewayWafRuleActionTypesNone ApplicationGatewayWafRuleActionTypes = "None" +) + +// PossibleApplicationGatewayWafRuleActionTypesValues returns the possible values for the ApplicationGatewayWafRuleActionTypes const type. +func PossibleApplicationGatewayWafRuleActionTypesValues() []ApplicationGatewayWafRuleActionTypes { + return []ApplicationGatewayWafRuleActionTypes{ + ApplicationGatewayWafRuleActionTypesAllow, + ApplicationGatewayWafRuleActionTypesAnomalyScoring, + ApplicationGatewayWafRuleActionTypesBlock, + ApplicationGatewayWafRuleActionTypesLog, + ApplicationGatewayWafRuleActionTypesNone, + } +} + +// ApplicationGatewayWafRuleSensitivityTypes - The string representation of the web application firewall rule sensitivity. +type ApplicationGatewayWafRuleSensitivityTypes string + +const ( + ApplicationGatewayWafRuleSensitivityTypesHigh ApplicationGatewayWafRuleSensitivityTypes = "High" + ApplicationGatewayWafRuleSensitivityTypesLow ApplicationGatewayWafRuleSensitivityTypes = "Low" + ApplicationGatewayWafRuleSensitivityTypesMedium ApplicationGatewayWafRuleSensitivityTypes = "Medium" + ApplicationGatewayWafRuleSensitivityTypesNone ApplicationGatewayWafRuleSensitivityTypes = "None" +) + +// PossibleApplicationGatewayWafRuleSensitivityTypesValues returns the possible values for the ApplicationGatewayWafRuleSensitivityTypes const type. +func PossibleApplicationGatewayWafRuleSensitivityTypesValues() []ApplicationGatewayWafRuleSensitivityTypes { + return []ApplicationGatewayWafRuleSensitivityTypes{ + ApplicationGatewayWafRuleSensitivityTypesHigh, + ApplicationGatewayWafRuleSensitivityTypesLow, + ApplicationGatewayWafRuleSensitivityTypesMedium, + ApplicationGatewayWafRuleSensitivityTypesNone, + } +} + +// ApplicationGatewayWafRuleStateTypes - The string representation of the web application firewall rule state. +type ApplicationGatewayWafRuleStateTypes string + +const ( + ApplicationGatewayWafRuleStateTypesDisabled ApplicationGatewayWafRuleStateTypes = "Disabled" + ApplicationGatewayWafRuleStateTypesEnabled ApplicationGatewayWafRuleStateTypes = "Enabled" +) + +// PossibleApplicationGatewayWafRuleStateTypesValues returns the possible values for the ApplicationGatewayWafRuleStateTypes const type. +func PossibleApplicationGatewayWafRuleStateTypesValues() []ApplicationGatewayWafRuleStateTypes { + return []ApplicationGatewayWafRuleStateTypes{ + ApplicationGatewayWafRuleStateTypesDisabled, + ApplicationGatewayWafRuleStateTypesEnabled, + } +} + +// AssociationType - The association type of the child resource to the parent resource. +type AssociationType string + +const ( + AssociationTypeAssociated AssociationType = "Associated" + AssociationTypeContains AssociationType = "Contains" +) + +// PossibleAssociationTypeValues returns the possible values for the AssociationType const type. +func PossibleAssociationTypeValues() []AssociationType { + return []AssociationType{ + AssociationTypeAssociated, + AssociationTypeContains, + } +} + +// AuthenticationMethod - VPN client authentication method. +type AuthenticationMethod string + +const ( + AuthenticationMethodEAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2" + AuthenticationMethodEAPTLS AuthenticationMethod = "EAPTLS" +) + +// PossibleAuthenticationMethodValues returns the possible values for the AuthenticationMethod const type. +func PossibleAuthenticationMethodValues() []AuthenticationMethod { + return []AuthenticationMethod{ + AuthenticationMethodEAPMSCHAPv2, + AuthenticationMethodEAPTLS, + } +} + +// AuthorizationUseStatus - The authorization use status. +type AuthorizationUseStatus string + +const ( + AuthorizationUseStatusAvailable AuthorizationUseStatus = "Available" + AuthorizationUseStatusInUse AuthorizationUseStatus = "InUse" +) + +// PossibleAuthorizationUseStatusValues returns the possible values for the AuthorizationUseStatus const type. +func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus { + return []AuthorizationUseStatus{ + AuthorizationUseStatusAvailable, + AuthorizationUseStatusInUse, + } +} + +// AutoLearnPrivateRangesMode - The operation mode for automatically learning private ranges to not be SNAT +type AutoLearnPrivateRangesMode string + +const ( + AutoLearnPrivateRangesModeDisabled AutoLearnPrivateRangesMode = "Disabled" + AutoLearnPrivateRangesModeEnabled AutoLearnPrivateRangesMode = "Enabled" +) + +// PossibleAutoLearnPrivateRangesModeValues returns the possible values for the AutoLearnPrivateRangesMode const type. +func PossibleAutoLearnPrivateRangesModeValues() []AutoLearnPrivateRangesMode { + return []AutoLearnPrivateRangesMode{ + AutoLearnPrivateRangesModeDisabled, + AutoLearnPrivateRangesModeEnabled, + } +} + +// AzureFirewallApplicationRuleProtocolType - The protocol type of a Application Rule resource. +type AzureFirewallApplicationRuleProtocolType string + +const ( + AzureFirewallApplicationRuleProtocolTypeHTTP AzureFirewallApplicationRuleProtocolType = "Http" + AzureFirewallApplicationRuleProtocolTypeHTTPS AzureFirewallApplicationRuleProtocolType = "Https" + AzureFirewallApplicationRuleProtocolTypeMssql AzureFirewallApplicationRuleProtocolType = "Mssql" +) + +// PossibleAzureFirewallApplicationRuleProtocolTypeValues returns the possible values for the AzureFirewallApplicationRuleProtocolType const type. +func PossibleAzureFirewallApplicationRuleProtocolTypeValues() []AzureFirewallApplicationRuleProtocolType { + return []AzureFirewallApplicationRuleProtocolType{ + AzureFirewallApplicationRuleProtocolTypeHTTP, + AzureFirewallApplicationRuleProtocolTypeHTTPS, + AzureFirewallApplicationRuleProtocolTypeMssql, + } +} + +// AzureFirewallNatRCActionType - The action type of a NAT rule collection. +type AzureFirewallNatRCActionType string + +const ( + AzureFirewallNatRCActionTypeDnat AzureFirewallNatRCActionType = "Dnat" + AzureFirewallNatRCActionTypeSnat AzureFirewallNatRCActionType = "Snat" +) + +// PossibleAzureFirewallNatRCActionTypeValues returns the possible values for the AzureFirewallNatRCActionType const type. +func PossibleAzureFirewallNatRCActionTypeValues() []AzureFirewallNatRCActionType { + return []AzureFirewallNatRCActionType{ + AzureFirewallNatRCActionTypeDnat, + AzureFirewallNatRCActionTypeSnat, + } +} + +// AzureFirewallNetworkRuleProtocol - The protocol of a Network Rule resource. +type AzureFirewallNetworkRuleProtocol string + +const ( + AzureFirewallNetworkRuleProtocolAny AzureFirewallNetworkRuleProtocol = "Any" + AzureFirewallNetworkRuleProtocolICMP AzureFirewallNetworkRuleProtocol = "ICMP" + AzureFirewallNetworkRuleProtocolTCP AzureFirewallNetworkRuleProtocol = "TCP" + AzureFirewallNetworkRuleProtocolUDP AzureFirewallNetworkRuleProtocol = "UDP" +) + +// PossibleAzureFirewallNetworkRuleProtocolValues returns the possible values for the AzureFirewallNetworkRuleProtocol const type. +func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRuleProtocol { + return []AzureFirewallNetworkRuleProtocol{ + AzureFirewallNetworkRuleProtocolAny, + AzureFirewallNetworkRuleProtocolICMP, + AzureFirewallNetworkRuleProtocolTCP, + AzureFirewallNetworkRuleProtocolUDP, + } +} + +// AzureFirewallPacketCaptureFlagsType - The flags type to be captured. +type AzureFirewallPacketCaptureFlagsType string + +const ( + AzureFirewallPacketCaptureFlagsTypeAck AzureFirewallPacketCaptureFlagsType = "ack" + AzureFirewallPacketCaptureFlagsTypeFin AzureFirewallPacketCaptureFlagsType = "fin" + AzureFirewallPacketCaptureFlagsTypePush AzureFirewallPacketCaptureFlagsType = "push" + AzureFirewallPacketCaptureFlagsTypeRst AzureFirewallPacketCaptureFlagsType = "rst" + AzureFirewallPacketCaptureFlagsTypeSyn AzureFirewallPacketCaptureFlagsType = "syn" + AzureFirewallPacketCaptureFlagsTypeUrg AzureFirewallPacketCaptureFlagsType = "urg" +) + +// PossibleAzureFirewallPacketCaptureFlagsTypeValues returns the possible values for the AzureFirewallPacketCaptureFlagsType const type. +func PossibleAzureFirewallPacketCaptureFlagsTypeValues() []AzureFirewallPacketCaptureFlagsType { + return []AzureFirewallPacketCaptureFlagsType{ + AzureFirewallPacketCaptureFlagsTypeAck, + AzureFirewallPacketCaptureFlagsTypeFin, + AzureFirewallPacketCaptureFlagsTypePush, + AzureFirewallPacketCaptureFlagsTypeRst, + AzureFirewallPacketCaptureFlagsTypeSyn, + AzureFirewallPacketCaptureFlagsTypeUrg, + } +} + +// AzureFirewallRCActionType - The action type of a rule collection. +type AzureFirewallRCActionType string + +const ( + AzureFirewallRCActionTypeAllow AzureFirewallRCActionType = "Allow" + AzureFirewallRCActionTypeDeny AzureFirewallRCActionType = "Deny" +) + +// PossibleAzureFirewallRCActionTypeValues returns the possible values for the AzureFirewallRCActionType const type. +func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType { + return []AzureFirewallRCActionType{ + AzureFirewallRCActionTypeAllow, + AzureFirewallRCActionTypeDeny, + } +} + +// AzureFirewallSKUName - Name of an Azure Firewall SKU. +type AzureFirewallSKUName string + +const ( + AzureFirewallSKUNameAZFWHub AzureFirewallSKUName = "AZFW_Hub" + AzureFirewallSKUNameAZFWVnet AzureFirewallSKUName = "AZFW_VNet" +) + +// PossibleAzureFirewallSKUNameValues returns the possible values for the AzureFirewallSKUName const type. +func PossibleAzureFirewallSKUNameValues() []AzureFirewallSKUName { + return []AzureFirewallSKUName{ + AzureFirewallSKUNameAZFWHub, + AzureFirewallSKUNameAZFWVnet, + } +} + +// AzureFirewallSKUTier - Tier of an Azure Firewall. +type AzureFirewallSKUTier string + +const ( + AzureFirewallSKUTierBasic AzureFirewallSKUTier = "Basic" + AzureFirewallSKUTierPremium AzureFirewallSKUTier = "Premium" + AzureFirewallSKUTierStandard AzureFirewallSKUTier = "Standard" +) + +// PossibleAzureFirewallSKUTierValues returns the possible values for the AzureFirewallSKUTier const type. +func PossibleAzureFirewallSKUTierValues() []AzureFirewallSKUTier { + return []AzureFirewallSKUTier{ + AzureFirewallSKUTierBasic, + AzureFirewallSKUTierPremium, + AzureFirewallSKUTierStandard, + } +} + +// AzureFirewallThreatIntelMode - The operation mode for Threat Intel. +type AzureFirewallThreatIntelMode string + +const ( + AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert" + AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny" + AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off" +) + +// PossibleAzureFirewallThreatIntelModeValues returns the possible values for the AzureFirewallThreatIntelMode const type. +func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode { + return []AzureFirewallThreatIntelMode{ + AzureFirewallThreatIntelModeAlert, + AzureFirewallThreatIntelModeDeny, + AzureFirewallThreatIntelModeOff, + } +} + +// BastionConnectProtocol - The protocol used to connect to the target. +type BastionConnectProtocol string + +const ( + BastionConnectProtocolRDP BastionConnectProtocol = "RDP" + BastionConnectProtocolSSH BastionConnectProtocol = "SSH" +) + +// PossibleBastionConnectProtocolValues returns the possible values for the BastionConnectProtocol const type. +func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { + return []BastionConnectProtocol{ + BastionConnectProtocolRDP, + BastionConnectProtocolSSH, + } +} + +// BastionHostSKUName - The name of the sku of this Bastion Host. +type BastionHostSKUName string + +const ( + BastionHostSKUNameBasic BastionHostSKUName = "Basic" + BastionHostSKUNameDeveloper BastionHostSKUName = "Developer" + BastionHostSKUNamePremium BastionHostSKUName = "Premium" + BastionHostSKUNameStandard BastionHostSKUName = "Standard" +) + +// PossibleBastionHostSKUNameValues returns the possible values for the BastionHostSKUName const type. +func PossibleBastionHostSKUNameValues() []BastionHostSKUName { + return []BastionHostSKUName{ + BastionHostSKUNameBasic, + BastionHostSKUNameDeveloper, + BastionHostSKUNamePremium, + BastionHostSKUNameStandard, + } +} + +// BgpPeerState - The BGP peer state. +type BgpPeerState string + +const ( + BgpPeerStateConnected BgpPeerState = "Connected" + BgpPeerStateConnecting BgpPeerState = "Connecting" + BgpPeerStateIdle BgpPeerState = "Idle" + BgpPeerStateStopped BgpPeerState = "Stopped" + BgpPeerStateUnknown BgpPeerState = "Unknown" +) + +// PossibleBgpPeerStateValues returns the possible values for the BgpPeerState const type. +func PossibleBgpPeerStateValues() []BgpPeerState { + return []BgpPeerState{ + BgpPeerStateConnected, + BgpPeerStateConnecting, + BgpPeerStateIdle, + BgpPeerStateStopped, + BgpPeerStateUnknown, + } +} + +// CircuitConnectionStatus - Express Route Circuit connection state. +type CircuitConnectionStatus string + +const ( + CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" + CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" + CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" +) + +// PossibleCircuitConnectionStatusValues returns the possible values for the CircuitConnectionStatus const type. +func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { + return []CircuitConnectionStatus{ + CircuitConnectionStatusConnected, + CircuitConnectionStatusConnecting, + CircuitConnectionStatusDisconnected, + } +} + +// CommissionedState - The commissioned state of the Custom IP Prefix. +type CommissionedState string + +const ( + CommissionedStateCommissioned CommissionedState = "Commissioned" + CommissionedStateCommissionedNoInternetAdvertise CommissionedState = "CommissionedNoInternetAdvertise" + CommissionedStateCommissioning CommissionedState = "Commissioning" + CommissionedStateDecommissioning CommissionedState = "Decommissioning" + CommissionedStateDeprovisioned CommissionedState = "Deprovisioned" + CommissionedStateDeprovisioning CommissionedState = "Deprovisioning" + CommissionedStateProvisioned CommissionedState = "Provisioned" + CommissionedStateProvisioning CommissionedState = "Provisioning" +) + +// PossibleCommissionedStateValues returns the possible values for the CommissionedState const type. +func PossibleCommissionedStateValues() []CommissionedState { + return []CommissionedState{ + CommissionedStateCommissioned, + CommissionedStateCommissionedNoInternetAdvertise, + CommissionedStateCommissioning, + CommissionedStateDecommissioning, + CommissionedStateDeprovisioned, + CommissionedStateDeprovisioning, + CommissionedStateProvisioned, + CommissionedStateProvisioning, + } +} + +// ConfigurationType - Configuration Deployment Type. +type ConfigurationType string + +const ( + ConfigurationTypeConnectivity ConfigurationType = "Connectivity" + ConfigurationTypeRouting ConfigurationType = "Routing" + ConfigurationTypeSecurityAdmin ConfigurationType = "SecurityAdmin" + ConfigurationTypeSecurityUser ConfigurationType = "SecurityUser" +) + +// PossibleConfigurationTypeValues returns the possible values for the ConfigurationType const type. +func PossibleConfigurationTypeValues() []ConfigurationType { + return []ConfigurationType{ + ConfigurationTypeConnectivity, + ConfigurationTypeRouting, + ConfigurationTypeSecurityAdmin, + ConfigurationTypeSecurityUser, + } +} + +// ConnectionMonitorEndpointFilterItemType - The type of item included in the filter. Currently only 'AgentAddress' is supported. +type ConnectionMonitorEndpointFilterItemType string + +const ( + ConnectionMonitorEndpointFilterItemTypeAgentAddress ConnectionMonitorEndpointFilterItemType = "AgentAddress" +) + +// PossibleConnectionMonitorEndpointFilterItemTypeValues returns the possible values for the ConnectionMonitorEndpointFilterItemType const type. +func PossibleConnectionMonitorEndpointFilterItemTypeValues() []ConnectionMonitorEndpointFilterItemType { + return []ConnectionMonitorEndpointFilterItemType{ + ConnectionMonitorEndpointFilterItemTypeAgentAddress, + } +} + +// ConnectionMonitorEndpointFilterType - The behavior of the endpoint filter. Currently only 'Include' is supported. +type ConnectionMonitorEndpointFilterType string + +const ( + ConnectionMonitorEndpointFilterTypeInclude ConnectionMonitorEndpointFilterType = "Include" +) + +// PossibleConnectionMonitorEndpointFilterTypeValues returns the possible values for the ConnectionMonitorEndpointFilterType const type. +func PossibleConnectionMonitorEndpointFilterTypeValues() []ConnectionMonitorEndpointFilterType { + return []ConnectionMonitorEndpointFilterType{ + ConnectionMonitorEndpointFilterTypeInclude, + } +} + +// ConnectionMonitorSourceStatus - Status of connection monitor source. +type ConnectionMonitorSourceStatus string + +const ( + ConnectionMonitorSourceStatusActive ConnectionMonitorSourceStatus = "Active" + ConnectionMonitorSourceStatusInactive ConnectionMonitorSourceStatus = "Inactive" + ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = "Unknown" +) + +// PossibleConnectionMonitorSourceStatusValues returns the possible values for the ConnectionMonitorSourceStatus const type. +func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus { + return []ConnectionMonitorSourceStatus{ + ConnectionMonitorSourceStatusActive, + ConnectionMonitorSourceStatusInactive, + ConnectionMonitorSourceStatusUnknown, + } +} + +// ConnectionMonitorTestConfigurationProtocol - The protocol to use in test evaluation. +type ConnectionMonitorTestConfigurationProtocol string + +const ( + ConnectionMonitorTestConfigurationProtocolHTTP ConnectionMonitorTestConfigurationProtocol = "Http" + ConnectionMonitorTestConfigurationProtocolIcmp ConnectionMonitorTestConfigurationProtocol = "Icmp" + ConnectionMonitorTestConfigurationProtocolTCP ConnectionMonitorTestConfigurationProtocol = "Tcp" +) + +// PossibleConnectionMonitorTestConfigurationProtocolValues returns the possible values for the ConnectionMonitorTestConfigurationProtocol const type. +func PossibleConnectionMonitorTestConfigurationProtocolValues() []ConnectionMonitorTestConfigurationProtocol { + return []ConnectionMonitorTestConfigurationProtocol{ + ConnectionMonitorTestConfigurationProtocolHTTP, + ConnectionMonitorTestConfigurationProtocolIcmp, + ConnectionMonitorTestConfigurationProtocolTCP, + } +} + +// ConnectionMonitorType - Type of connection monitor. +type ConnectionMonitorType string + +const ( + ConnectionMonitorTypeMultiEndpoint ConnectionMonitorType = "MultiEndpoint" + ConnectionMonitorTypeSingleSourceDestination ConnectionMonitorType = "SingleSourceDestination" +) + +// PossibleConnectionMonitorTypeValues returns the possible values for the ConnectionMonitorType const type. +func PossibleConnectionMonitorTypeValues() []ConnectionMonitorType { + return []ConnectionMonitorType{ + ConnectionMonitorTypeMultiEndpoint, + ConnectionMonitorTypeSingleSourceDestination, + } +} + +// ConnectionState - The connection state. +type ConnectionState string + +const ( + ConnectionStateReachable ConnectionState = "Reachable" + ConnectionStateUnknown ConnectionState = "Unknown" + ConnectionStateUnreachable ConnectionState = "Unreachable" +) + +// PossibleConnectionStateValues returns the possible values for the ConnectionState const type. +func PossibleConnectionStateValues() []ConnectionState { + return []ConnectionState{ + ConnectionStateReachable, + ConnectionStateUnknown, + ConnectionStateUnreachable, + } +} + +// ConnectionStatus - The connection status. +type ConnectionStatus string + +const ( + ConnectionStatusConnected ConnectionStatus = "Connected" + ConnectionStatusDegraded ConnectionStatus = "Degraded" + ConnectionStatusDisconnected ConnectionStatus = "Disconnected" + ConnectionStatusUnknown ConnectionStatus = "Unknown" +) + +// PossibleConnectionStatusValues returns the possible values for the ConnectionStatus const type. +func PossibleConnectionStatusValues() []ConnectionStatus { + return []ConnectionStatus{ + ConnectionStatusConnected, + ConnectionStatusDegraded, + ConnectionStatusDisconnected, + ConnectionStatusUnknown, + } +} + +// ConnectivityTopology - Connectivity topology type. +type ConnectivityTopology string + +const ( + ConnectivityTopologyHubAndSpoke ConnectivityTopology = "HubAndSpoke" + ConnectivityTopologyMesh ConnectivityTopology = "Mesh" +) + +// PossibleConnectivityTopologyValues returns the possible values for the ConnectivityTopology const type. +func PossibleConnectivityTopologyValues() []ConnectivityTopology { + return []ConnectivityTopology{ + ConnectivityTopologyHubAndSpoke, + ConnectivityTopologyMesh, + } +} + +// CoverageLevel - Test coverage for the endpoint. +type CoverageLevel string + +const ( + CoverageLevelAboveAverage CoverageLevel = "AboveAverage" + CoverageLevelAverage CoverageLevel = "Average" + CoverageLevelBelowAverage CoverageLevel = "BelowAverage" + CoverageLevelDefault CoverageLevel = "Default" + CoverageLevelFull CoverageLevel = "Full" + CoverageLevelLow CoverageLevel = "Low" +) + +// PossibleCoverageLevelValues returns the possible values for the CoverageLevel const type. +func PossibleCoverageLevelValues() []CoverageLevel { + return []CoverageLevel{ + CoverageLevelAboveAverage, + CoverageLevelAverage, + CoverageLevelBelowAverage, + CoverageLevelDefault, + CoverageLevelFull, + CoverageLevelLow, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// CustomIPPrefixType - Type of custom IP prefix. Should be Singular, Parent, or Child. +type CustomIPPrefixType string + +const ( + CustomIPPrefixTypeChild CustomIPPrefixType = "Child" + CustomIPPrefixTypeParent CustomIPPrefixType = "Parent" + CustomIPPrefixTypeSingular CustomIPPrefixType = "Singular" +) + +// PossibleCustomIPPrefixTypeValues returns the possible values for the CustomIPPrefixType const type. +func PossibleCustomIPPrefixTypeValues() []CustomIPPrefixType { + return []CustomIPPrefixType{ + CustomIPPrefixTypeChild, + CustomIPPrefixTypeParent, + CustomIPPrefixTypeSingular, + } +} + +// DdosSettingsProtectionMode - The DDoS protection mode of the public IP +type DdosSettingsProtectionMode string + +const ( + DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" + DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" + DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" +) + +// PossibleDdosSettingsProtectionModeValues returns the possible values for the DdosSettingsProtectionMode const type. +func PossibleDdosSettingsProtectionModeValues() []DdosSettingsProtectionMode { + return []DdosSettingsProtectionMode{ + DdosSettingsProtectionModeDisabled, + DdosSettingsProtectionModeEnabled, + DdosSettingsProtectionModeVirtualNetworkInherited, + } +} + +// DeleteExistingPeering - Flag if need to remove current existing peerings. +type DeleteExistingPeering string + +const ( + DeleteExistingPeeringFalse DeleteExistingPeering = "False" + DeleteExistingPeeringTrue DeleteExistingPeering = "True" +) + +// PossibleDeleteExistingPeeringValues returns the possible values for the DeleteExistingPeering const type. +func PossibleDeleteExistingPeeringValues() []DeleteExistingPeering { + return []DeleteExistingPeering{ + DeleteExistingPeeringFalse, + DeleteExistingPeeringTrue, + } +} + +// DeleteOptions - Specify what happens to the public IP address when the VM using it is deleted +type DeleteOptions string + +const ( + DeleteOptionsDelete DeleteOptions = "Delete" + DeleteOptionsDetach DeleteOptions = "Detach" +) + +// PossibleDeleteOptionsValues returns the possible values for the DeleteOptions const type. +func PossibleDeleteOptionsValues() []DeleteOptions { + return []DeleteOptions{ + DeleteOptionsDelete, + DeleteOptionsDetach, + } +} + +// DeploymentStatus - Deployment Status. +type DeploymentStatus string + +const ( + DeploymentStatusDeployed DeploymentStatus = "Deployed" + DeploymentStatusDeploying DeploymentStatus = "Deploying" + DeploymentStatusFailed DeploymentStatus = "Failed" + DeploymentStatusNotStarted DeploymentStatus = "NotStarted" +) + +// PossibleDeploymentStatusValues returns the possible values for the DeploymentStatus const type. +func PossibleDeploymentStatusValues() []DeploymentStatus { + return []DeploymentStatus{ + DeploymentStatusDeployed, + DeploymentStatusDeploying, + DeploymentStatusFailed, + DeploymentStatusNotStarted, + } +} + +// DestinationPortBehavior - Destination port behavior. +type DestinationPortBehavior string + +const ( + DestinationPortBehaviorListenIfAvailable DestinationPortBehavior = "ListenIfAvailable" + DestinationPortBehaviorNone DestinationPortBehavior = "None" +) + +// PossibleDestinationPortBehaviorValues returns the possible values for the DestinationPortBehavior const type. +func PossibleDestinationPortBehaviorValues() []DestinationPortBehavior { + return []DestinationPortBehavior{ + DestinationPortBehaviorListenIfAvailable, + DestinationPortBehaviorNone, + } +} + +// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. +type DhGroup string + +const ( + DhGroupDHGroup1 DhGroup = "DHGroup1" + DhGroupDHGroup14 DhGroup = "DHGroup14" + DhGroupDHGroup2 DhGroup = "DHGroup2" + DhGroupDHGroup2048 DhGroup = "DHGroup2048" + DhGroupDHGroup24 DhGroup = "DHGroup24" + DhGroupECP256 DhGroup = "ECP256" + DhGroupECP384 DhGroup = "ECP384" + DhGroupNone DhGroup = "None" +) + +// PossibleDhGroupValues returns the possible values for the DhGroup const type. +func PossibleDhGroupValues() []DhGroup { + return []DhGroup{ + DhGroupDHGroup1, + DhGroupDHGroup14, + DhGroupDHGroup2, + DhGroupDHGroup2048, + DhGroupDHGroup24, + DhGroupECP256, + DhGroupECP384, + DhGroupNone, + } +} + +// Direction - The direction of the traffic. +type Direction string + +const ( + DirectionInbound Direction = "Inbound" + DirectionOutbound Direction = "Outbound" +) + +// PossibleDirectionValues returns the possible values for the Direction const type. +func PossibleDirectionValues() []Direction { + return []Direction{ + DirectionInbound, + DirectionOutbound, + } +} + +// DisableBgpRoutePropagation - Determines whether BGP route propagation is enabled. Defaults to true. +type DisableBgpRoutePropagation string + +const ( + DisableBgpRoutePropagationFalse DisableBgpRoutePropagation = "False" + DisableBgpRoutePropagationTrue DisableBgpRoutePropagation = "True" +) + +// PossibleDisableBgpRoutePropagationValues returns the possible values for the DisableBgpRoutePropagation const type. +func PossibleDisableBgpRoutePropagationValues() []DisableBgpRoutePropagation { + return []DisableBgpRoutePropagation{ + DisableBgpRoutePropagationFalse, + DisableBgpRoutePropagationTrue, + } +} + +// EffectiveAdminRuleKind - Whether the rule is custom or default. +type EffectiveAdminRuleKind string + +const ( + EffectiveAdminRuleKindCustom EffectiveAdminRuleKind = "Custom" + EffectiveAdminRuleKindDefault EffectiveAdminRuleKind = "Default" +) + +// PossibleEffectiveAdminRuleKindValues returns the possible values for the EffectiveAdminRuleKind const type. +func PossibleEffectiveAdminRuleKindValues() []EffectiveAdminRuleKind { + return []EffectiveAdminRuleKind{ + EffectiveAdminRuleKindCustom, + EffectiveAdminRuleKindDefault, + } +} + +// EffectiveRouteSource - Who created the route. +type EffectiveRouteSource string + +const ( + EffectiveRouteSourceDefault EffectiveRouteSource = "Default" + EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown" + EffectiveRouteSourceUser EffectiveRouteSource = "User" + EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway" +) + +// PossibleEffectiveRouteSourceValues returns the possible values for the EffectiveRouteSource const type. +func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource { + return []EffectiveRouteSource{ + EffectiveRouteSourceDefault, + EffectiveRouteSourceUnknown, + EffectiveRouteSourceUser, + EffectiveRouteSourceVirtualNetworkGateway, + } +} + +// EffectiveRouteState - The value of effective route. +type EffectiveRouteState string + +const ( + EffectiveRouteStateActive EffectiveRouteState = "Active" + EffectiveRouteStateInvalid EffectiveRouteState = "Invalid" +) + +// PossibleEffectiveRouteStateValues returns the possible values for the EffectiveRouteState const type. +func PossibleEffectiveRouteStateValues() []EffectiveRouteState { + return []EffectiveRouteState{ + EffectiveRouteStateActive, + EffectiveRouteStateInvalid, + } +} + +// EffectiveSecurityRuleProtocol - The network protocol this rule applies to. +type EffectiveSecurityRuleProtocol string + +const ( + EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All" + EffectiveSecurityRuleProtocolTCP EffectiveSecurityRuleProtocol = "Tcp" + EffectiveSecurityRuleProtocolUDP EffectiveSecurityRuleProtocol = "Udp" +) + +// PossibleEffectiveSecurityRuleProtocolValues returns the possible values for the EffectiveSecurityRuleProtocol const type. +func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol { + return []EffectiveSecurityRuleProtocol{ + EffectiveSecurityRuleProtocolAll, + EffectiveSecurityRuleProtocolTCP, + EffectiveSecurityRuleProtocolUDP, + } +} + +// EndpointType - The endpoint type. +type EndpointType string + +const ( + EndpointTypeAzureArcNetwork EndpointType = "AzureArcNetwork" + EndpointTypeAzureArcVM EndpointType = "AzureArcVM" + EndpointTypeAzureSubnet EndpointType = "AzureSubnet" + EndpointTypeAzureVM EndpointType = "AzureVM" + EndpointTypeAzureVMSS EndpointType = "AzureVMSS" + EndpointTypeAzureVNet EndpointType = "AzureVNet" + EndpointTypeExternalAddress EndpointType = "ExternalAddress" + EndpointTypeMMAWorkspaceMachine EndpointType = "MMAWorkspaceMachine" + EndpointTypeMMAWorkspaceNetwork EndpointType = "MMAWorkspaceNetwork" +) + +// PossibleEndpointTypeValues returns the possible values for the EndpointType const type. +func PossibleEndpointTypeValues() []EndpointType { + return []EndpointType{ + EndpointTypeAzureArcNetwork, + EndpointTypeAzureArcVM, + EndpointTypeAzureSubnet, + EndpointTypeAzureVM, + EndpointTypeAzureVMSS, + EndpointTypeAzureVNet, + EndpointTypeExternalAddress, + EndpointTypeMMAWorkspaceMachine, + EndpointTypeMMAWorkspaceNetwork, + } +} + +// EvaluationState - Connectivity analysis evaluation state. +type EvaluationState string + +const ( + EvaluationStateCompleted EvaluationState = "Completed" + EvaluationStateInProgress EvaluationState = "InProgress" + EvaluationStateNotStarted EvaluationState = "NotStarted" +) + +// PossibleEvaluationStateValues returns the possible values for the EvaluationState const type. +func PossibleEvaluationStateValues() []EvaluationState { + return []EvaluationState{ + EvaluationStateCompleted, + EvaluationStateInProgress, + EvaluationStateNotStarted, + } +} + +// ExceptionEntryMatchVariable - The variable on which we evaluate the exception condition +type ExceptionEntryMatchVariable string + +const ( + ExceptionEntryMatchVariableRemoteAddr ExceptionEntryMatchVariable = "RemoteAddr" + ExceptionEntryMatchVariableRequestHeader ExceptionEntryMatchVariable = "RequestHeader" + ExceptionEntryMatchVariableRequestURI ExceptionEntryMatchVariable = "RequestURI" +) + +// PossibleExceptionEntryMatchVariableValues returns the possible values for the ExceptionEntryMatchVariable const type. +func PossibleExceptionEntryMatchVariableValues() []ExceptionEntryMatchVariable { + return []ExceptionEntryMatchVariable{ + ExceptionEntryMatchVariableRemoteAddr, + ExceptionEntryMatchVariableRequestHeader, + ExceptionEntryMatchVariableRequestURI, + } +} + +// ExceptionEntrySelectorMatchOperator - When the matchVariable points to a key-value pair (e.g, RequestHeader), this operates +// on the selector +type ExceptionEntrySelectorMatchOperator string + +const ( + ExceptionEntrySelectorMatchOperatorContains ExceptionEntrySelectorMatchOperator = "Contains" + ExceptionEntrySelectorMatchOperatorEndsWith ExceptionEntrySelectorMatchOperator = "EndsWith" + ExceptionEntrySelectorMatchOperatorEquals ExceptionEntrySelectorMatchOperator = "Equals" + ExceptionEntrySelectorMatchOperatorStartsWith ExceptionEntrySelectorMatchOperator = "StartsWith" +) + +// PossibleExceptionEntrySelectorMatchOperatorValues returns the possible values for the ExceptionEntrySelectorMatchOperator const type. +func PossibleExceptionEntrySelectorMatchOperatorValues() []ExceptionEntrySelectorMatchOperator { + return []ExceptionEntrySelectorMatchOperator{ + ExceptionEntrySelectorMatchOperatorContains, + ExceptionEntrySelectorMatchOperatorEndsWith, + ExceptionEntrySelectorMatchOperatorEquals, + ExceptionEntrySelectorMatchOperatorStartsWith, + } +} + +// ExceptionEntryValueMatchOperator - Operates on the allowed values for the matchVariable +type ExceptionEntryValueMatchOperator string + +const ( + ExceptionEntryValueMatchOperatorContains ExceptionEntryValueMatchOperator = "Contains" + ExceptionEntryValueMatchOperatorEndsWith ExceptionEntryValueMatchOperator = "EndsWith" + ExceptionEntryValueMatchOperatorEquals ExceptionEntryValueMatchOperator = "Equals" + ExceptionEntryValueMatchOperatorIPMatch ExceptionEntryValueMatchOperator = "IPMatch" + ExceptionEntryValueMatchOperatorStartsWith ExceptionEntryValueMatchOperator = "StartsWith" +) + +// PossibleExceptionEntryValueMatchOperatorValues returns the possible values for the ExceptionEntryValueMatchOperator const type. +func PossibleExceptionEntryValueMatchOperatorValues() []ExceptionEntryValueMatchOperator { + return []ExceptionEntryValueMatchOperator{ + ExceptionEntryValueMatchOperatorContains, + ExceptionEntryValueMatchOperatorEndsWith, + ExceptionEntryValueMatchOperatorEquals, + ExceptionEntryValueMatchOperatorIPMatch, + ExceptionEntryValueMatchOperatorStartsWith, + } +} + +// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState - The advertised public prefix state of the Peering resource. +type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string + +const ( + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" +) + +// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns the possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type. +func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { + return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, + ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, + } +} + +// ExpressRouteCircuitPeeringState - The state of peering. +type ExpressRouteCircuitPeeringState string + +const ( + ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" + ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" +) + +// PossibleExpressRouteCircuitPeeringStateValues returns the possible values for the ExpressRouteCircuitPeeringState const type. +func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState { + return []ExpressRouteCircuitPeeringState{ + ExpressRouteCircuitPeeringStateDisabled, + ExpressRouteCircuitPeeringStateEnabled, + } +} + +// ExpressRouteCircuitSKUFamily - The family of the SKU. +type ExpressRouteCircuitSKUFamily string + +const ( + ExpressRouteCircuitSKUFamilyMeteredData ExpressRouteCircuitSKUFamily = "MeteredData" + ExpressRouteCircuitSKUFamilyUnlimitedData ExpressRouteCircuitSKUFamily = "UnlimitedData" +) + +// PossibleExpressRouteCircuitSKUFamilyValues returns the possible values for the ExpressRouteCircuitSKUFamily const type. +func PossibleExpressRouteCircuitSKUFamilyValues() []ExpressRouteCircuitSKUFamily { + return []ExpressRouteCircuitSKUFamily{ + ExpressRouteCircuitSKUFamilyMeteredData, + ExpressRouteCircuitSKUFamilyUnlimitedData, + } +} + +// ExpressRouteCircuitSKUTier - The tier of the SKU. +type ExpressRouteCircuitSKUTier string + +const ( + ExpressRouteCircuitSKUTierBasic ExpressRouteCircuitSKUTier = "Basic" + ExpressRouteCircuitSKUTierLocal ExpressRouteCircuitSKUTier = "Local" + ExpressRouteCircuitSKUTierPremium ExpressRouteCircuitSKUTier = "Premium" + ExpressRouteCircuitSKUTierStandard ExpressRouteCircuitSKUTier = "Standard" +) + +// PossibleExpressRouteCircuitSKUTierValues returns the possible values for the ExpressRouteCircuitSKUTier const type. +func PossibleExpressRouteCircuitSKUTierValues() []ExpressRouteCircuitSKUTier { + return []ExpressRouteCircuitSKUTier{ + ExpressRouteCircuitSKUTierBasic, + ExpressRouteCircuitSKUTierLocal, + ExpressRouteCircuitSKUTierPremium, + ExpressRouteCircuitSKUTierStandard, + } +} + +// ExpressRouteLinkAdminState - Administrative state of the physical port. +type ExpressRouteLinkAdminState string + +const ( + ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled" + ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled" +) + +// PossibleExpressRouteLinkAdminStateValues returns the possible values for the ExpressRouteLinkAdminState const type. +func PossibleExpressRouteLinkAdminStateValues() []ExpressRouteLinkAdminState { + return []ExpressRouteLinkAdminState{ + ExpressRouteLinkAdminStateDisabled, + ExpressRouteLinkAdminStateEnabled, + } +} + +// ExpressRouteLinkConnectorType - Physical fiber port type. +type ExpressRouteLinkConnectorType string + +const ( + ExpressRouteLinkConnectorTypeLC ExpressRouteLinkConnectorType = "LC" + ExpressRouteLinkConnectorTypeSC ExpressRouteLinkConnectorType = "SC" +) + +// PossibleExpressRouteLinkConnectorTypeValues returns the possible values for the ExpressRouteLinkConnectorType const type. +func PossibleExpressRouteLinkConnectorTypeValues() []ExpressRouteLinkConnectorType { + return []ExpressRouteLinkConnectorType{ + ExpressRouteLinkConnectorTypeLC, + ExpressRouteLinkConnectorTypeSC, + } +} + +// ExpressRouteLinkMacSecCipher - Mac security cipher. +type ExpressRouteLinkMacSecCipher string + +const ( + ExpressRouteLinkMacSecCipherGCMAES128 ExpressRouteLinkMacSecCipher = "GcmAes128" + ExpressRouteLinkMacSecCipherGCMAES256 ExpressRouteLinkMacSecCipher = "GcmAes256" + ExpressRouteLinkMacSecCipherGCMAesXpn128 ExpressRouteLinkMacSecCipher = "GcmAesXpn128" + ExpressRouteLinkMacSecCipherGCMAesXpn256 ExpressRouteLinkMacSecCipher = "GcmAesXpn256" +) + +// PossibleExpressRouteLinkMacSecCipherValues returns the possible values for the ExpressRouteLinkMacSecCipher const type. +func PossibleExpressRouteLinkMacSecCipherValues() []ExpressRouteLinkMacSecCipher { + return []ExpressRouteLinkMacSecCipher{ + ExpressRouteLinkMacSecCipherGCMAES128, + ExpressRouteLinkMacSecCipherGCMAES256, + ExpressRouteLinkMacSecCipherGCMAesXpn128, + ExpressRouteLinkMacSecCipherGCMAesXpn256, + } +} + +// ExpressRouteLinkMacSecSciState - Sci mode enabled/disabled. +type ExpressRouteLinkMacSecSciState string + +const ( + ExpressRouteLinkMacSecSciStateDisabled ExpressRouteLinkMacSecSciState = "Disabled" + ExpressRouteLinkMacSecSciStateEnabled ExpressRouteLinkMacSecSciState = "Enabled" +) + +// PossibleExpressRouteLinkMacSecSciStateValues returns the possible values for the ExpressRouteLinkMacSecSciState const type. +func PossibleExpressRouteLinkMacSecSciStateValues() []ExpressRouteLinkMacSecSciState { + return []ExpressRouteLinkMacSecSciState{ + ExpressRouteLinkMacSecSciStateDisabled, + ExpressRouteLinkMacSecSciStateEnabled, + } +} + +// ExpressRoutePeeringState - The state of peering. +type ExpressRoutePeeringState string + +const ( + ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" + ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" +) + +// PossibleExpressRoutePeeringStateValues returns the possible values for the ExpressRoutePeeringState const type. +func PossibleExpressRoutePeeringStateValues() []ExpressRoutePeeringState { + return []ExpressRoutePeeringState{ + ExpressRoutePeeringStateDisabled, + ExpressRoutePeeringStateEnabled, + } +} + +// ExpressRoutePeeringType - The peering type. +type ExpressRoutePeeringType string + +const ( + ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" + ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" + ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" +) + +// PossibleExpressRoutePeeringTypeValues returns the possible values for the ExpressRoutePeeringType const type. +func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType { + return []ExpressRoutePeeringType{ + ExpressRoutePeeringTypeAzurePrivatePeering, + ExpressRoutePeeringTypeAzurePublicPeering, + ExpressRoutePeeringTypeMicrosoftPeering, + } +} + +// ExpressRoutePortAuthorizationUseStatus - The authorization use status. +type ExpressRoutePortAuthorizationUseStatus string + +const ( + ExpressRoutePortAuthorizationUseStatusAvailable ExpressRoutePortAuthorizationUseStatus = "Available" + ExpressRoutePortAuthorizationUseStatusInUse ExpressRoutePortAuthorizationUseStatus = "InUse" +) + +// PossibleExpressRoutePortAuthorizationUseStatusValues returns the possible values for the ExpressRoutePortAuthorizationUseStatus const type. +func PossibleExpressRoutePortAuthorizationUseStatusValues() []ExpressRoutePortAuthorizationUseStatus { + return []ExpressRoutePortAuthorizationUseStatus{ + ExpressRoutePortAuthorizationUseStatusAvailable, + ExpressRoutePortAuthorizationUseStatusInUse, + } +} + +// ExpressRoutePortsBillingType - The billing type of the ExpressRoutePort resource. +type ExpressRoutePortsBillingType string + +const ( + ExpressRoutePortsBillingTypeMeteredData ExpressRoutePortsBillingType = "MeteredData" + ExpressRoutePortsBillingTypeUnlimitedData ExpressRoutePortsBillingType = "UnlimitedData" +) + +// PossibleExpressRoutePortsBillingTypeValues returns the possible values for the ExpressRoutePortsBillingType const type. +func PossibleExpressRoutePortsBillingTypeValues() []ExpressRoutePortsBillingType { + return []ExpressRoutePortsBillingType{ + ExpressRoutePortsBillingTypeMeteredData, + ExpressRoutePortsBillingTypeUnlimitedData, + } +} + +// ExpressRoutePortsEncapsulation - Encapsulation method on physical ports. +type ExpressRoutePortsEncapsulation string + +const ( + ExpressRoutePortsEncapsulationDot1Q ExpressRoutePortsEncapsulation = "Dot1Q" + ExpressRoutePortsEncapsulationQinQ ExpressRoutePortsEncapsulation = "QinQ" +) + +// PossibleExpressRoutePortsEncapsulationValues returns the possible values for the ExpressRoutePortsEncapsulation const type. +func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsulation { + return []ExpressRoutePortsEncapsulation{ + ExpressRoutePortsEncapsulationDot1Q, + ExpressRoutePortsEncapsulationQinQ, + } +} + +// ExtendedLocationTypes - The supported ExtendedLocation types. Currently only EdgeZone is supported in Microsoft.Network +// resources. +type ExtendedLocationTypes string + +const ( + ExtendedLocationTypesEdgeZone ExtendedLocationTypes = "EdgeZone" +) + +// PossibleExtendedLocationTypesValues returns the possible values for the ExtendedLocationTypes const type. +func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { + return []ExtendedLocationTypes{ + ExtendedLocationTypesEdgeZone, + } +} + +// FailoverConnectionStatus - The current status of the connection +type FailoverConnectionStatus string + +const ( + FailoverConnectionStatusConnected FailoverConnectionStatus = "Connected" + FailoverConnectionStatusDisconnected FailoverConnectionStatus = "Disconnected" +) + +// PossibleFailoverConnectionStatusValues returns the possible values for the FailoverConnectionStatus const type. +func PossibleFailoverConnectionStatusValues() []FailoverConnectionStatus { + return []FailoverConnectionStatus{ + FailoverConnectionStatusConnected, + FailoverConnectionStatusDisconnected, + } +} + +// FailoverTestStatus - The current status of the test +type FailoverTestStatus string + +const ( + FailoverTestStatusCompleted FailoverTestStatus = "Completed" + FailoverTestStatusExpired FailoverTestStatus = "Expired" + FailoverTestStatusInvalid FailoverTestStatus = "Invalid" + FailoverTestStatusNotStarted FailoverTestStatus = "NotStarted" + FailoverTestStatusRunning FailoverTestStatus = "Running" + FailoverTestStatusStartFailed FailoverTestStatus = "StartFailed" + FailoverTestStatusStarting FailoverTestStatus = "Starting" + FailoverTestStatusStopFailed FailoverTestStatus = "StopFailed" + FailoverTestStatusStopping FailoverTestStatus = "Stopping" +) + +// PossibleFailoverTestStatusValues returns the possible values for the FailoverTestStatus const type. +func PossibleFailoverTestStatusValues() []FailoverTestStatus { + return []FailoverTestStatus{ + FailoverTestStatusCompleted, + FailoverTestStatusExpired, + FailoverTestStatusInvalid, + FailoverTestStatusNotStarted, + FailoverTestStatusRunning, + FailoverTestStatusStartFailed, + FailoverTestStatusStarting, + FailoverTestStatusStopFailed, + FailoverTestStatusStopping, + } +} + +// FailoverTestStatusForSingleTest - The current status of the test +type FailoverTestStatusForSingleTest string + +const ( + FailoverTestStatusForSingleTestCompleted FailoverTestStatusForSingleTest = "Completed" + FailoverTestStatusForSingleTestExpired FailoverTestStatusForSingleTest = "Expired" + FailoverTestStatusForSingleTestInvalid FailoverTestStatusForSingleTest = "Invalid" + FailoverTestStatusForSingleTestNotStarted FailoverTestStatusForSingleTest = "NotStarted" + FailoverTestStatusForSingleTestRunning FailoverTestStatusForSingleTest = "Running" + FailoverTestStatusForSingleTestStartFailed FailoverTestStatusForSingleTest = "StartFailed" + FailoverTestStatusForSingleTestStarting FailoverTestStatusForSingleTest = "Starting" + FailoverTestStatusForSingleTestStopFailed FailoverTestStatusForSingleTest = "StopFailed" + FailoverTestStatusForSingleTestStopping FailoverTestStatusForSingleTest = "Stopping" +) + +// PossibleFailoverTestStatusForSingleTestValues returns the possible values for the FailoverTestStatusForSingleTest const type. +func PossibleFailoverTestStatusForSingleTestValues() []FailoverTestStatusForSingleTest { + return []FailoverTestStatusForSingleTest{ + FailoverTestStatusForSingleTestCompleted, + FailoverTestStatusForSingleTestExpired, + FailoverTestStatusForSingleTestInvalid, + FailoverTestStatusForSingleTestNotStarted, + FailoverTestStatusForSingleTestRunning, + FailoverTestStatusForSingleTestStartFailed, + FailoverTestStatusForSingleTestStarting, + FailoverTestStatusForSingleTestStopFailed, + FailoverTestStatusForSingleTestStopping, + } +} + +// FailoverTestType - The type of failover test +type FailoverTestType string + +const ( + FailoverTestTypeAll FailoverTestType = "All" + FailoverTestTypeMultiSiteFailover FailoverTestType = "MultiSiteFailover" + FailoverTestTypeSingleSiteFailover FailoverTestType = "SingleSiteFailover" +) + +// PossibleFailoverTestTypeValues returns the possible values for the FailoverTestType const type. +func PossibleFailoverTestTypeValues() []FailoverTestType { + return []FailoverTestType{ + FailoverTestTypeAll, + FailoverTestTypeMultiSiteFailover, + FailoverTestTypeSingleSiteFailover, + } +} + +// FirewallPolicyFilterRuleCollectionActionType - The action type of a rule. +type FirewallPolicyFilterRuleCollectionActionType string + +const ( + FirewallPolicyFilterRuleCollectionActionTypeAllow FirewallPolicyFilterRuleCollectionActionType = "Allow" + FirewallPolicyFilterRuleCollectionActionTypeDeny FirewallPolicyFilterRuleCollectionActionType = "Deny" +) + +// PossibleFirewallPolicyFilterRuleCollectionActionTypeValues returns the possible values for the FirewallPolicyFilterRuleCollectionActionType const type. +func PossibleFirewallPolicyFilterRuleCollectionActionTypeValues() []FirewallPolicyFilterRuleCollectionActionType { + return []FirewallPolicyFilterRuleCollectionActionType{ + FirewallPolicyFilterRuleCollectionActionTypeAllow, + FirewallPolicyFilterRuleCollectionActionTypeDeny, + } +} + +// FirewallPolicyIDPSQuerySortOrder - Describes if results should be in ascending/descending order +type FirewallPolicyIDPSQuerySortOrder string + +const ( + FirewallPolicyIDPSQuerySortOrderAscending FirewallPolicyIDPSQuerySortOrder = "Ascending" + FirewallPolicyIDPSQuerySortOrderDescending FirewallPolicyIDPSQuerySortOrder = "Descending" +) + +// PossibleFirewallPolicyIDPSQuerySortOrderValues returns the possible values for the FirewallPolicyIDPSQuerySortOrder const type. +func PossibleFirewallPolicyIDPSQuerySortOrderValues() []FirewallPolicyIDPSQuerySortOrder { + return []FirewallPolicyIDPSQuerySortOrder{ + FirewallPolicyIDPSQuerySortOrderAscending, + FirewallPolicyIDPSQuerySortOrderDescending, + } +} + +// FirewallPolicyIDPSSignatureDirection - Describes in which direction signature is being enforced: 0 - OutBound, 1 - InBound, +// 2 - Any, 3 - Internal, 4 - InternalOutbound, 5 - InternalInbound +type FirewallPolicyIDPSSignatureDirection int32 + +const ( + FirewallPolicyIDPSSignatureDirectionFive FirewallPolicyIDPSSignatureDirection = 5 + FirewallPolicyIDPSSignatureDirectionFour FirewallPolicyIDPSSignatureDirection = 4 + FirewallPolicyIDPSSignatureDirectionOne FirewallPolicyIDPSSignatureDirection = 1 + FirewallPolicyIDPSSignatureDirectionThree FirewallPolicyIDPSSignatureDirection = 3 + FirewallPolicyIDPSSignatureDirectionTwo FirewallPolicyIDPSSignatureDirection = 2 + FirewallPolicyIDPSSignatureDirectionZero FirewallPolicyIDPSSignatureDirection = 0 +) + +// PossibleFirewallPolicyIDPSSignatureDirectionValues returns the possible values for the FirewallPolicyIDPSSignatureDirection const type. +func PossibleFirewallPolicyIDPSSignatureDirectionValues() []FirewallPolicyIDPSSignatureDirection { + return []FirewallPolicyIDPSSignatureDirection{ + FirewallPolicyIDPSSignatureDirectionFive, + FirewallPolicyIDPSSignatureDirectionFour, + FirewallPolicyIDPSSignatureDirectionOne, + FirewallPolicyIDPSSignatureDirectionThree, + FirewallPolicyIDPSSignatureDirectionTwo, + FirewallPolicyIDPSSignatureDirectionZero, + } +} + +// FirewallPolicyIDPSSignatureMode - The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny +type FirewallPolicyIDPSSignatureMode int32 + +const ( + FirewallPolicyIDPSSignatureModeOne FirewallPolicyIDPSSignatureMode = 1 + FirewallPolicyIDPSSignatureModeTwo FirewallPolicyIDPSSignatureMode = 2 + FirewallPolicyIDPSSignatureModeZero FirewallPolicyIDPSSignatureMode = 0 +) + +// PossibleFirewallPolicyIDPSSignatureModeValues returns the possible values for the FirewallPolicyIDPSSignatureMode const type. +func PossibleFirewallPolicyIDPSSignatureModeValues() []FirewallPolicyIDPSSignatureMode { + return []FirewallPolicyIDPSSignatureMode{ + FirewallPolicyIDPSSignatureModeOne, + FirewallPolicyIDPSSignatureModeTwo, + FirewallPolicyIDPSSignatureModeZero, + } +} + +// FirewallPolicyIDPSSignatureSeverity - Describes the severity of signature: 1 - High, 2 - Medium, 3 - Low +type FirewallPolicyIDPSSignatureSeverity int32 + +const ( + FirewallPolicyIDPSSignatureSeverityOne FirewallPolicyIDPSSignatureSeverity = 1 + FirewallPolicyIDPSSignatureSeverityThree FirewallPolicyIDPSSignatureSeverity = 3 + FirewallPolicyIDPSSignatureSeverityTwo FirewallPolicyIDPSSignatureSeverity = 2 +) + +// PossibleFirewallPolicyIDPSSignatureSeverityValues returns the possible values for the FirewallPolicyIDPSSignatureSeverity const type. +func PossibleFirewallPolicyIDPSSignatureSeverityValues() []FirewallPolicyIDPSSignatureSeverity { + return []FirewallPolicyIDPSSignatureSeverity{ + FirewallPolicyIDPSSignatureSeverityOne, + FirewallPolicyIDPSSignatureSeverityThree, + FirewallPolicyIDPSSignatureSeverityTwo, + } +} + +// FirewallPolicyIntrusionDetectionProfileType - Possible Intrusion Detection profile values. +type FirewallPolicyIntrusionDetectionProfileType string + +const ( + FirewallPolicyIntrusionDetectionProfileTypeAdvanced FirewallPolicyIntrusionDetectionProfileType = "Advanced" + FirewallPolicyIntrusionDetectionProfileTypeBasic FirewallPolicyIntrusionDetectionProfileType = "Basic" + FirewallPolicyIntrusionDetectionProfileTypeExtended FirewallPolicyIntrusionDetectionProfileType = "Extended" + FirewallPolicyIntrusionDetectionProfileTypeStandard FirewallPolicyIntrusionDetectionProfileType = "Standard" +) + +// PossibleFirewallPolicyIntrusionDetectionProfileTypeValues returns the possible values for the FirewallPolicyIntrusionDetectionProfileType const type. +func PossibleFirewallPolicyIntrusionDetectionProfileTypeValues() []FirewallPolicyIntrusionDetectionProfileType { + return []FirewallPolicyIntrusionDetectionProfileType{ + FirewallPolicyIntrusionDetectionProfileTypeAdvanced, + FirewallPolicyIntrusionDetectionProfileTypeBasic, + FirewallPolicyIntrusionDetectionProfileTypeExtended, + FirewallPolicyIntrusionDetectionProfileTypeStandard, + } +} + +// FirewallPolicyIntrusionDetectionProtocol - Possible intrusion detection bypass traffic protocols. +type FirewallPolicyIntrusionDetectionProtocol string + +const ( + FirewallPolicyIntrusionDetectionProtocolANY FirewallPolicyIntrusionDetectionProtocol = "ANY" + FirewallPolicyIntrusionDetectionProtocolICMP FirewallPolicyIntrusionDetectionProtocol = "ICMP" + FirewallPolicyIntrusionDetectionProtocolTCP FirewallPolicyIntrusionDetectionProtocol = "TCP" + FirewallPolicyIntrusionDetectionProtocolUDP FirewallPolicyIntrusionDetectionProtocol = "UDP" +) + +// PossibleFirewallPolicyIntrusionDetectionProtocolValues returns the possible values for the FirewallPolicyIntrusionDetectionProtocol const type. +func PossibleFirewallPolicyIntrusionDetectionProtocolValues() []FirewallPolicyIntrusionDetectionProtocol { + return []FirewallPolicyIntrusionDetectionProtocol{ + FirewallPolicyIntrusionDetectionProtocolANY, + FirewallPolicyIntrusionDetectionProtocolICMP, + FirewallPolicyIntrusionDetectionProtocolTCP, + FirewallPolicyIntrusionDetectionProtocolUDP, + } +} + +// FirewallPolicyIntrusionDetectionStateType - Possible state values. +type FirewallPolicyIntrusionDetectionStateType string + +const ( + FirewallPolicyIntrusionDetectionStateTypeAlert FirewallPolicyIntrusionDetectionStateType = "Alert" + FirewallPolicyIntrusionDetectionStateTypeDeny FirewallPolicyIntrusionDetectionStateType = "Deny" + FirewallPolicyIntrusionDetectionStateTypeOff FirewallPolicyIntrusionDetectionStateType = "Off" +) + +// PossibleFirewallPolicyIntrusionDetectionStateTypeValues returns the possible values for the FirewallPolicyIntrusionDetectionStateType const type. +func PossibleFirewallPolicyIntrusionDetectionStateTypeValues() []FirewallPolicyIntrusionDetectionStateType { + return []FirewallPolicyIntrusionDetectionStateType{ + FirewallPolicyIntrusionDetectionStateTypeAlert, + FirewallPolicyIntrusionDetectionStateTypeDeny, + FirewallPolicyIntrusionDetectionStateTypeOff, + } +} + +// FirewallPolicyNatRuleCollectionActionType - The action type of a rule. +type FirewallPolicyNatRuleCollectionActionType string + +const ( + FirewallPolicyNatRuleCollectionActionTypeDNAT FirewallPolicyNatRuleCollectionActionType = "DNAT" +) + +// PossibleFirewallPolicyNatRuleCollectionActionTypeValues returns the possible values for the FirewallPolicyNatRuleCollectionActionType const type. +func PossibleFirewallPolicyNatRuleCollectionActionTypeValues() []FirewallPolicyNatRuleCollectionActionType { + return []FirewallPolicyNatRuleCollectionActionType{ + FirewallPolicyNatRuleCollectionActionTypeDNAT, + } +} + +// FirewallPolicyRuleApplicationProtocolType - The application protocol type of a Rule. +type FirewallPolicyRuleApplicationProtocolType string + +const ( + FirewallPolicyRuleApplicationProtocolTypeHTTP FirewallPolicyRuleApplicationProtocolType = "Http" + FirewallPolicyRuleApplicationProtocolTypeHTTPS FirewallPolicyRuleApplicationProtocolType = "Https" +) + +// PossibleFirewallPolicyRuleApplicationProtocolTypeValues returns the possible values for the FirewallPolicyRuleApplicationProtocolType const type. +func PossibleFirewallPolicyRuleApplicationProtocolTypeValues() []FirewallPolicyRuleApplicationProtocolType { + return []FirewallPolicyRuleApplicationProtocolType{ + FirewallPolicyRuleApplicationProtocolTypeHTTP, + FirewallPolicyRuleApplicationProtocolTypeHTTPS, + } +} + +// FirewallPolicyRuleCollectionType - The type of the rule collection. +type FirewallPolicyRuleCollectionType string + +const ( + FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection FirewallPolicyRuleCollectionType = "FirewallPolicyFilterRuleCollection" + FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection FirewallPolicyRuleCollectionType = "FirewallPolicyNatRuleCollection" +) + +// PossibleFirewallPolicyRuleCollectionTypeValues returns the possible values for the FirewallPolicyRuleCollectionType const type. +func PossibleFirewallPolicyRuleCollectionTypeValues() []FirewallPolicyRuleCollectionType { + return []FirewallPolicyRuleCollectionType{ + FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection, + FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection, + } +} + +// FirewallPolicyRuleNetworkProtocol - The Network protocol of a Rule. +type FirewallPolicyRuleNetworkProtocol string + +const ( + FirewallPolicyRuleNetworkProtocolAny FirewallPolicyRuleNetworkProtocol = "Any" + FirewallPolicyRuleNetworkProtocolICMP FirewallPolicyRuleNetworkProtocol = "ICMP" + FirewallPolicyRuleNetworkProtocolTCP FirewallPolicyRuleNetworkProtocol = "TCP" + FirewallPolicyRuleNetworkProtocolUDP FirewallPolicyRuleNetworkProtocol = "UDP" +) + +// PossibleFirewallPolicyRuleNetworkProtocolValues returns the possible values for the FirewallPolicyRuleNetworkProtocol const type. +func PossibleFirewallPolicyRuleNetworkProtocolValues() []FirewallPolicyRuleNetworkProtocol { + return []FirewallPolicyRuleNetworkProtocol{ + FirewallPolicyRuleNetworkProtocolAny, + FirewallPolicyRuleNetworkProtocolICMP, + FirewallPolicyRuleNetworkProtocolTCP, + FirewallPolicyRuleNetworkProtocolUDP, + } +} + +// FirewallPolicyRuleType - Rule Type. +type FirewallPolicyRuleType string + +const ( + FirewallPolicyRuleTypeApplicationRule FirewallPolicyRuleType = "ApplicationRule" + FirewallPolicyRuleTypeNatRule FirewallPolicyRuleType = "NatRule" + FirewallPolicyRuleTypeNetworkRule FirewallPolicyRuleType = "NetworkRule" +) + +// PossibleFirewallPolicyRuleTypeValues returns the possible values for the FirewallPolicyRuleType const type. +func PossibleFirewallPolicyRuleTypeValues() []FirewallPolicyRuleType { + return []FirewallPolicyRuleType{ + FirewallPolicyRuleTypeApplicationRule, + FirewallPolicyRuleTypeNatRule, + FirewallPolicyRuleTypeNetworkRule, + } +} + +// FirewallPolicySKUTier - Tier of Firewall Policy. +type FirewallPolicySKUTier string + +const ( + FirewallPolicySKUTierBasic FirewallPolicySKUTier = "Basic" + FirewallPolicySKUTierPremium FirewallPolicySKUTier = "Premium" + FirewallPolicySKUTierStandard FirewallPolicySKUTier = "Standard" +) + +// PossibleFirewallPolicySKUTierValues returns the possible values for the FirewallPolicySKUTier const type. +func PossibleFirewallPolicySKUTierValues() []FirewallPolicySKUTier { + return []FirewallPolicySKUTier{ + FirewallPolicySKUTierBasic, + FirewallPolicySKUTierPremium, + FirewallPolicySKUTierStandard, + } +} + +// FlowLogFormatType - The file type of flow log. +type FlowLogFormatType string + +const ( + FlowLogFormatTypeJSON FlowLogFormatType = "JSON" +) + +// PossibleFlowLogFormatTypeValues returns the possible values for the FlowLogFormatType const type. +func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { + return []FlowLogFormatType{ + FlowLogFormatTypeJSON, + } +} + +// GatewayLoadBalancerTunnelInterfaceType - Traffic type of gateway load balancer tunnel interface. +type GatewayLoadBalancerTunnelInterfaceType string + +const ( + GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" + GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" + GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" +) + +// PossibleGatewayLoadBalancerTunnelInterfaceTypeValues returns the possible values for the GatewayLoadBalancerTunnelInterfaceType const type. +func PossibleGatewayLoadBalancerTunnelInterfaceTypeValues() []GatewayLoadBalancerTunnelInterfaceType { + return []GatewayLoadBalancerTunnelInterfaceType{ + GatewayLoadBalancerTunnelInterfaceTypeExternal, + GatewayLoadBalancerTunnelInterfaceTypeInternal, + GatewayLoadBalancerTunnelInterfaceTypeNone, + } +} + +// GatewayLoadBalancerTunnelProtocol - Protocol of gateway load balancer tunnel interface. +type GatewayLoadBalancerTunnelProtocol string + +const ( + GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" + GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" + GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" +) + +// PossibleGatewayLoadBalancerTunnelProtocolValues returns the possible values for the GatewayLoadBalancerTunnelProtocol const type. +func PossibleGatewayLoadBalancerTunnelProtocolValues() []GatewayLoadBalancerTunnelProtocol { + return []GatewayLoadBalancerTunnelProtocol{ + GatewayLoadBalancerTunnelProtocolNative, + GatewayLoadBalancerTunnelProtocolNone, + GatewayLoadBalancerTunnelProtocolVXLAN, + } +} + +// Geo - The Geo for CIDR advertising. Should be an Geo code. +type Geo string + +const ( + GeoAFRI Geo = "AFRI" + GeoAPAC Geo = "APAC" + GeoAQ Geo = "AQ" + GeoEURO Geo = "EURO" + GeoGLOBAL Geo = "GLOBAL" + GeoLATAM Geo = "LATAM" + GeoME Geo = "ME" + GeoNAM Geo = "NAM" + GeoOCEANIA Geo = "OCEANIA" +) + +// PossibleGeoValues returns the possible values for the Geo const type. +func PossibleGeoValues() []Geo { + return []Geo{ + GeoAFRI, + GeoAPAC, + GeoAQ, + GeoEURO, + GeoGLOBAL, + GeoLATAM, + GeoME, + GeoNAM, + GeoOCEANIA, + } +} + +// GroupConnectivity - Group connectivity type. +type GroupConnectivity string + +const ( + GroupConnectivityDirectlyConnected GroupConnectivity = "DirectlyConnected" + GroupConnectivityNone GroupConnectivity = "None" +) + +// PossibleGroupConnectivityValues returns the possible values for the GroupConnectivity const type. +func PossibleGroupConnectivityValues() []GroupConnectivity { + return []GroupConnectivity{ + GroupConnectivityDirectlyConnected, + GroupConnectivityNone, + } +} + +// GroupMemberType - Network Group member type +type GroupMemberType string + +const ( + GroupMemberTypeSubnet GroupMemberType = "Subnet" + GroupMemberTypeVirtualNetwork GroupMemberType = "VirtualNetwork" +) + +// PossibleGroupMemberTypeValues returns the possible values for the GroupMemberType const type. +func PossibleGroupMemberTypeValues() []GroupMemberType { + return []GroupMemberType{ + GroupMemberTypeSubnet, + GroupMemberTypeVirtualNetwork, + } +} + +// HTTPConfigurationMethod - The HTTP method to use. +type HTTPConfigurationMethod string + +const ( + HTTPConfigurationMethodGet HTTPConfigurationMethod = "Get" + HTTPConfigurationMethodPost HTTPConfigurationMethod = "Post" +) + +// PossibleHTTPConfigurationMethodValues returns the possible values for the HTTPConfigurationMethod const type. +func PossibleHTTPConfigurationMethodValues() []HTTPConfigurationMethod { + return []HTTPConfigurationMethod{ + HTTPConfigurationMethodGet, + HTTPConfigurationMethodPost, + } +} + +// HTTPMethod - HTTP method. +type HTTPMethod string + +const ( + HTTPMethodGet HTTPMethod = "Get" +) + +// PossibleHTTPMethodValues returns the possible values for the HTTPMethod const type. +func PossibleHTTPMethodValues() []HTTPMethod { + return []HTTPMethod{ + HTTPMethodGet, + } +} + +// HubBgpConnectionStatus - The current state of the VirtualHub to Peer. +type HubBgpConnectionStatus string + +const ( + HubBgpConnectionStatusConnected HubBgpConnectionStatus = "Connected" + HubBgpConnectionStatusConnecting HubBgpConnectionStatus = "Connecting" + HubBgpConnectionStatusNotConnected HubBgpConnectionStatus = "NotConnected" + HubBgpConnectionStatusUnknown HubBgpConnectionStatus = "Unknown" +) + +// PossibleHubBgpConnectionStatusValues returns the possible values for the HubBgpConnectionStatus const type. +func PossibleHubBgpConnectionStatusValues() []HubBgpConnectionStatus { + return []HubBgpConnectionStatus{ + HubBgpConnectionStatusConnected, + HubBgpConnectionStatusConnecting, + HubBgpConnectionStatusNotConnected, + HubBgpConnectionStatusUnknown, + } +} + +// HubRoutingPreference - The hub routing preference gateway types +type HubRoutingPreference string + +const ( + HubRoutingPreferenceASPath HubRoutingPreference = "ASPath" + HubRoutingPreferenceExpressRoute HubRoutingPreference = "ExpressRoute" + HubRoutingPreferenceVPNGateway HubRoutingPreference = "VpnGateway" +) + +// PossibleHubRoutingPreferenceValues returns the possible values for the HubRoutingPreference const type. +func PossibleHubRoutingPreferenceValues() []HubRoutingPreference { + return []HubRoutingPreference{ + HubRoutingPreferenceASPath, + HubRoutingPreferenceExpressRoute, + HubRoutingPreferenceVPNGateway, + } +} + +// HubVirtualNetworkConnectionStatus - The current state of the VirtualHub to vnet connection. +type HubVirtualNetworkConnectionStatus string + +const ( + HubVirtualNetworkConnectionStatusConnected HubVirtualNetworkConnectionStatus = "Connected" + HubVirtualNetworkConnectionStatusConnecting HubVirtualNetworkConnectionStatus = "Connecting" + HubVirtualNetworkConnectionStatusNotConnected HubVirtualNetworkConnectionStatus = "NotConnected" + HubVirtualNetworkConnectionStatusUnknown HubVirtualNetworkConnectionStatus = "Unknown" +) + +// PossibleHubVirtualNetworkConnectionStatusValues returns the possible values for the HubVirtualNetworkConnectionStatus const type. +func PossibleHubVirtualNetworkConnectionStatusValues() []HubVirtualNetworkConnectionStatus { + return []HubVirtualNetworkConnectionStatus{ + HubVirtualNetworkConnectionStatusConnected, + HubVirtualNetworkConnectionStatusConnecting, + HubVirtualNetworkConnectionStatusNotConnected, + HubVirtualNetworkConnectionStatusUnknown, + } +} + +// IPAllocationMethod - IP address allocation method. +type IPAllocationMethod string + +const ( + IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" + IPAllocationMethodStatic IPAllocationMethod = "Static" +) + +// PossibleIPAllocationMethodValues returns the possible values for the IPAllocationMethod const type. +func PossibleIPAllocationMethodValues() []IPAllocationMethod { + return []IPAllocationMethod{ + IPAllocationMethodDynamic, + IPAllocationMethodStatic, + } +} + +// IPAllocationType - IpAllocation type. +type IPAllocationType string + +const ( + IPAllocationTypeHypernet IPAllocationType = "Hypernet" + IPAllocationTypeUndefined IPAllocationType = "Undefined" +) + +// PossibleIPAllocationTypeValues returns the possible values for the IPAllocationType const type. +func PossibleIPAllocationTypeValues() []IPAllocationType { + return []IPAllocationType{ + IPAllocationTypeHypernet, + IPAllocationTypeUndefined, + } +} + +// IPFlowProtocol - Protocol to be verified on. +type IPFlowProtocol string + +const ( + IPFlowProtocolTCP IPFlowProtocol = "TCP" + IPFlowProtocolUDP IPFlowProtocol = "UDP" +) + +// PossibleIPFlowProtocolValues returns the possible values for the IPFlowProtocol const type. +func PossibleIPFlowProtocolValues() []IPFlowProtocol { + return []IPFlowProtocol{ + IPFlowProtocolTCP, + IPFlowProtocolUDP, + } +} + +// IPSecEncryption - The IPSec encryption algorithm (IKE phase 1). +type IPSecEncryption string + +const ( + IPSecEncryptionAES128 IPSecEncryption = "AES128" + IPSecEncryptionAES192 IPSecEncryption = "AES192" + IPSecEncryptionAES256 IPSecEncryption = "AES256" + IPSecEncryptionDES IPSecEncryption = "DES" + IPSecEncryptionDES3 IPSecEncryption = "DES3" + IPSecEncryptionGCMAES128 IPSecEncryption = "GCMAES128" + IPSecEncryptionGCMAES192 IPSecEncryption = "GCMAES192" + IPSecEncryptionGCMAES256 IPSecEncryption = "GCMAES256" + IPSecEncryptionNone IPSecEncryption = "None" +) + +// PossibleIPSecEncryptionValues returns the possible values for the IPSecEncryption const type. +func PossibleIPSecEncryptionValues() []IPSecEncryption { + return []IPSecEncryption{ + IPSecEncryptionAES128, + IPSecEncryptionAES192, + IPSecEncryptionAES256, + IPSecEncryptionDES, + IPSecEncryptionDES3, + IPSecEncryptionGCMAES128, + IPSecEncryptionGCMAES192, + IPSecEncryptionGCMAES256, + IPSecEncryptionNone, + } +} + +// IPSecIntegrity - The IPSec integrity algorithm (IKE phase 1). +type IPSecIntegrity string + +const ( + IPSecIntegrityGCMAES128 IPSecIntegrity = "GCMAES128" + IPSecIntegrityGCMAES192 IPSecIntegrity = "GCMAES192" + IPSecIntegrityGCMAES256 IPSecIntegrity = "GCMAES256" + IPSecIntegrityMD5 IPSecIntegrity = "MD5" + IPSecIntegritySHA1 IPSecIntegrity = "SHA1" + IPSecIntegritySHA256 IPSecIntegrity = "SHA256" +) + +// PossibleIPSecIntegrityValues returns the possible values for the IPSecIntegrity const type. +func PossibleIPSecIntegrityValues() []IPSecIntegrity { + return []IPSecIntegrity{ + IPSecIntegrityGCMAES128, + IPSecIntegrityGCMAES192, + IPSecIntegrityGCMAES256, + IPSecIntegrityMD5, + IPSecIntegritySHA1, + IPSecIntegritySHA256, + } +} + +// IPType - Enumeration to indicate the IP type. +type IPType string + +const ( + IPTypeIPv4 IPType = "IPv4" + IPTypeIPv6 IPType = "IPv6" +) + +// PossibleIPTypeValues returns the possible values for the IPType const type. +func PossibleIPTypeValues() []IPType { + return []IPType{ + IPTypeIPv4, + IPTypeIPv6, + } +} + +// IPVersion - IP address version. +type IPVersion string + +const ( + IPVersionIPv4 IPVersion = "IPv4" + IPVersionIPv6 IPVersion = "IPv6" +) + +// PossibleIPVersionValues returns the possible values for the IPVersion const type. +func PossibleIPVersionValues() []IPVersion { + return []IPVersion{ + IPVersionIPv4, + IPVersionIPv6, + } +} + +// IkeEncryption - The IKE encryption algorithm (IKE phase 2). +type IkeEncryption string + +const ( + IkeEncryptionAES128 IkeEncryption = "AES128" + IkeEncryptionAES192 IkeEncryption = "AES192" + IkeEncryptionAES256 IkeEncryption = "AES256" + IkeEncryptionDES IkeEncryption = "DES" + IkeEncryptionDES3 IkeEncryption = "DES3" + IkeEncryptionGCMAES128 IkeEncryption = "GCMAES128" + IkeEncryptionGCMAES256 IkeEncryption = "GCMAES256" +) + +// PossibleIkeEncryptionValues returns the possible values for the IkeEncryption const type. +func PossibleIkeEncryptionValues() []IkeEncryption { + return []IkeEncryption{ + IkeEncryptionAES128, + IkeEncryptionAES192, + IkeEncryptionAES256, + IkeEncryptionDES, + IkeEncryptionDES3, + IkeEncryptionGCMAES128, + IkeEncryptionGCMAES256, + } +} + +// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). +type IkeIntegrity string + +const ( + IkeIntegrityGCMAES128 IkeIntegrity = "GCMAES128" + IkeIntegrityGCMAES256 IkeIntegrity = "GCMAES256" + IkeIntegrityMD5 IkeIntegrity = "MD5" + IkeIntegritySHA1 IkeIntegrity = "SHA1" + IkeIntegritySHA256 IkeIntegrity = "SHA256" + IkeIntegritySHA384 IkeIntegrity = "SHA384" +) + +// PossibleIkeIntegrityValues returns the possible values for the IkeIntegrity const type. +func PossibleIkeIntegrityValues() []IkeIntegrity { + return []IkeIntegrity{ + IkeIntegrityGCMAES128, + IkeIntegrityGCMAES256, + IkeIntegrityMD5, + IkeIntegritySHA1, + IkeIntegritySHA256, + IkeIntegritySHA384, + } +} + +// InboundSecurityRuleType - Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. +// Permanent Rule creates NSG rule and SLB LB Rule. +type InboundSecurityRuleType string + +const ( + InboundSecurityRuleTypeAutoExpire InboundSecurityRuleType = "AutoExpire" + InboundSecurityRuleTypePermanent InboundSecurityRuleType = "Permanent" +) + +// PossibleInboundSecurityRuleTypeValues returns the possible values for the InboundSecurityRuleType const type. +func PossibleInboundSecurityRuleTypeValues() []InboundSecurityRuleType { + return []InboundSecurityRuleType{ + InboundSecurityRuleTypeAutoExpire, + InboundSecurityRuleTypePermanent, + } +} + +// InboundSecurityRulesProtocol - Protocol. This should be either TCP or UDP. +type InboundSecurityRulesProtocol string + +const ( + InboundSecurityRulesProtocolTCP InboundSecurityRulesProtocol = "TCP" + InboundSecurityRulesProtocolUDP InboundSecurityRulesProtocol = "UDP" +) + +// PossibleInboundSecurityRulesProtocolValues returns the possible values for the InboundSecurityRulesProtocol const type. +func PossibleInboundSecurityRulesProtocolValues() []InboundSecurityRulesProtocol { + return []InboundSecurityRulesProtocol{ + InboundSecurityRulesProtocolTCP, + InboundSecurityRulesProtocolUDP, + } +} + +// IsGlobal - Flag if global mesh is supported. +type IsGlobal string + +const ( + IsGlobalFalse IsGlobal = "False" + IsGlobalTrue IsGlobal = "True" +) + +// PossibleIsGlobalValues returns the possible values for the IsGlobal const type. +func PossibleIsGlobalValues() []IsGlobal { + return []IsGlobal{ + IsGlobalFalse, + IsGlobalTrue, + } +} + +// IsWorkloadProtected - Value indicating whether the IP address is DDoS workload protected or not. +type IsWorkloadProtected string + +const ( + IsWorkloadProtectedFalse IsWorkloadProtected = "False" + IsWorkloadProtectedTrue IsWorkloadProtected = "True" +) + +// PossibleIsWorkloadProtectedValues returns the possible values for the IsWorkloadProtected const type. +func PossibleIsWorkloadProtectedValues() []IsWorkloadProtected { + return []IsWorkloadProtected{ + IsWorkloadProtectedFalse, + IsWorkloadProtectedTrue, + } +} + +// IssueType - The type of issue. +type IssueType string + +const ( + IssueTypeAgentStopped IssueType = "AgentStopped" + IssueTypeDNSResolution IssueType = "DnsResolution" + IssueTypeGuestFirewall IssueType = "GuestFirewall" + IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" + IssueTypePlatform IssueType = "Platform" + IssueTypePortThrottled IssueType = "PortThrottled" + IssueTypeSocketBind IssueType = "SocketBind" + IssueTypeUnknown IssueType = "Unknown" + IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" +) + +// PossibleIssueTypeValues returns the possible values for the IssueType const type. +func PossibleIssueTypeValues() []IssueType { + return []IssueType{ + IssueTypeAgentStopped, + IssueTypeDNSResolution, + IssueTypeGuestFirewall, + IssueTypeNetworkSecurityRule, + IssueTypePlatform, + IssueTypePortThrottled, + IssueTypeSocketBind, + IssueTypeUnknown, + IssueTypeUserDefinedRoute, + } +} + +// LoadBalancerBackendAddressAdminState - A list of administrative states which once set can override health probe so that +// Load Balancer will always forward new connections to backend, or deny new connections and reset existing connections. +type LoadBalancerBackendAddressAdminState string + +const ( + LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" + LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" + LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" +) + +// PossibleLoadBalancerBackendAddressAdminStateValues returns the possible values for the LoadBalancerBackendAddressAdminState const type. +func PossibleLoadBalancerBackendAddressAdminStateValues() []LoadBalancerBackendAddressAdminState { + return []LoadBalancerBackendAddressAdminState{ + LoadBalancerBackendAddressAdminStateDown, + LoadBalancerBackendAddressAdminStateNone, + LoadBalancerBackendAddressAdminStateUp, + } +} + +// LoadBalancerOutboundRuleProtocol - The protocol for the outbound rule in load balancer. +type LoadBalancerOutboundRuleProtocol string + +const ( + LoadBalancerOutboundRuleProtocolAll LoadBalancerOutboundRuleProtocol = "All" + LoadBalancerOutboundRuleProtocolTCP LoadBalancerOutboundRuleProtocol = "Tcp" + LoadBalancerOutboundRuleProtocolUDP LoadBalancerOutboundRuleProtocol = "Udp" +) + +// PossibleLoadBalancerOutboundRuleProtocolValues returns the possible values for the LoadBalancerOutboundRuleProtocol const type. +func PossibleLoadBalancerOutboundRuleProtocolValues() []LoadBalancerOutboundRuleProtocol { + return []LoadBalancerOutboundRuleProtocol{ + LoadBalancerOutboundRuleProtocolAll, + LoadBalancerOutboundRuleProtocolTCP, + LoadBalancerOutboundRuleProtocolUDP, + } +} + +// LoadBalancerSKUName - Name of a load balancer SKU. +type LoadBalancerSKUName string + +const ( + LoadBalancerSKUNameBasic LoadBalancerSKUName = "Basic" + LoadBalancerSKUNameGateway LoadBalancerSKUName = "Gateway" + LoadBalancerSKUNameStandard LoadBalancerSKUName = "Standard" +) + +// PossibleLoadBalancerSKUNameValues returns the possible values for the LoadBalancerSKUName const type. +func PossibleLoadBalancerSKUNameValues() []LoadBalancerSKUName { + return []LoadBalancerSKUName{ + LoadBalancerSKUNameBasic, + LoadBalancerSKUNameGateway, + LoadBalancerSKUNameStandard, + } +} + +// LoadBalancerSKUTier - Tier of a load balancer SKU. +type LoadBalancerSKUTier string + +const ( + LoadBalancerSKUTierGlobal LoadBalancerSKUTier = "Global" + LoadBalancerSKUTierRegional LoadBalancerSKUTier = "Regional" +) + +// PossibleLoadBalancerSKUTierValues returns the possible values for the LoadBalancerSKUTier const type. +func PossibleLoadBalancerSKUTierValues() []LoadBalancerSKUTier { + return []LoadBalancerSKUTier{ + LoadBalancerSKUTierGlobal, + LoadBalancerSKUTierRegional, + } +} + +// LoadDistribution - The load distribution policy for this rule. +type LoadDistribution string + +const ( + LoadDistributionDefault LoadDistribution = "Default" + LoadDistributionSourceIP LoadDistribution = "SourceIP" + LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol" +) + +// PossibleLoadDistributionValues returns the possible values for the LoadDistribution const type. +func PossibleLoadDistributionValues() []LoadDistribution { + return []LoadDistribution{ + LoadDistributionDefault, + LoadDistributionSourceIP, + LoadDistributionSourceIPProtocol, + } +} + +// ManagedRuleEnabledState - The state of the managed rule. Defaults to Disabled if not specified. +type ManagedRuleEnabledState string + +const ( + ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" + ManagedRuleEnabledStateEnabled ManagedRuleEnabledState = "Enabled" +) + +// PossibleManagedRuleEnabledStateValues returns the possible values for the ManagedRuleEnabledState const type. +func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { + return []ManagedRuleEnabledState{ + ManagedRuleEnabledStateDisabled, + ManagedRuleEnabledStateEnabled, + } +} + +// NatGatewaySKUName - Name of Nat Gateway SKU. +type NatGatewaySKUName string + +const ( + NatGatewaySKUNameStandard NatGatewaySKUName = "Standard" +) + +// PossibleNatGatewaySKUNameValues returns the possible values for the NatGatewaySKUName const type. +func PossibleNatGatewaySKUNameValues() []NatGatewaySKUName { + return []NatGatewaySKUName{ + NatGatewaySKUNameStandard, + } +} + +// NetworkIntentPolicyBasedService - Network intent policy based services. +type NetworkIntentPolicyBasedService string + +const ( + NetworkIntentPolicyBasedServiceAll NetworkIntentPolicyBasedService = "All" + NetworkIntentPolicyBasedServiceAllowRulesOnly NetworkIntentPolicyBasedService = "AllowRulesOnly" + NetworkIntentPolicyBasedServiceNone NetworkIntentPolicyBasedService = "None" +) + +// PossibleNetworkIntentPolicyBasedServiceValues returns the possible values for the NetworkIntentPolicyBasedService const type. +func PossibleNetworkIntentPolicyBasedServiceValues() []NetworkIntentPolicyBasedService { + return []NetworkIntentPolicyBasedService{ + NetworkIntentPolicyBasedServiceAll, + NetworkIntentPolicyBasedServiceAllowRulesOnly, + NetworkIntentPolicyBasedServiceNone, + } +} + +// NetworkInterfaceAuxiliaryMode - Auxiliary mode of Network Interface resource. +type NetworkInterfaceAuxiliaryMode string + +const ( + NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" + NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" + NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" + NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" +) + +// PossibleNetworkInterfaceAuxiliaryModeValues returns the possible values for the NetworkInterfaceAuxiliaryMode const type. +func PossibleNetworkInterfaceAuxiliaryModeValues() []NetworkInterfaceAuxiliaryMode { + return []NetworkInterfaceAuxiliaryMode{ + NetworkInterfaceAuxiliaryModeAcceleratedConnections, + NetworkInterfaceAuxiliaryModeFloating, + NetworkInterfaceAuxiliaryModeMaxConnections, + NetworkInterfaceAuxiliaryModeNone, + } +} + +// NetworkInterfaceAuxiliarySKU - Auxiliary sku of Network Interface resource. +type NetworkInterfaceAuxiliarySKU string + +const ( + NetworkInterfaceAuxiliarySKUA1 NetworkInterfaceAuxiliarySKU = "A1" + NetworkInterfaceAuxiliarySKUA2 NetworkInterfaceAuxiliarySKU = "A2" + NetworkInterfaceAuxiliarySKUA4 NetworkInterfaceAuxiliarySKU = "A4" + NetworkInterfaceAuxiliarySKUA8 NetworkInterfaceAuxiliarySKU = "A8" + NetworkInterfaceAuxiliarySKUNone NetworkInterfaceAuxiliarySKU = "None" +) + +// PossibleNetworkInterfaceAuxiliarySKUValues returns the possible values for the NetworkInterfaceAuxiliarySKU const type. +func PossibleNetworkInterfaceAuxiliarySKUValues() []NetworkInterfaceAuxiliarySKU { + return []NetworkInterfaceAuxiliarySKU{ + NetworkInterfaceAuxiliarySKUA1, + NetworkInterfaceAuxiliarySKUA2, + NetworkInterfaceAuxiliarySKUA4, + NetworkInterfaceAuxiliarySKUA8, + NetworkInterfaceAuxiliarySKUNone, + } +} + +// NetworkInterfaceMigrationPhase - Migration phase of Network Interface resource. +type NetworkInterfaceMigrationPhase string + +const ( + NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" + NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" + NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" + NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" + NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" +) + +// PossibleNetworkInterfaceMigrationPhaseValues returns the possible values for the NetworkInterfaceMigrationPhase const type. +func PossibleNetworkInterfaceMigrationPhaseValues() []NetworkInterfaceMigrationPhase { + return []NetworkInterfaceMigrationPhase{ + NetworkInterfaceMigrationPhaseAbort, + NetworkInterfaceMigrationPhaseCommit, + NetworkInterfaceMigrationPhaseCommitted, + NetworkInterfaceMigrationPhaseNone, + NetworkInterfaceMigrationPhasePrepare, + } +} + +// NetworkInterfaceNicType - Type of Network Interface resource. +type NetworkInterfaceNicType string + +const ( + NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" + NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" +) + +// PossibleNetworkInterfaceNicTypeValues returns the possible values for the NetworkInterfaceNicType const type. +func PossibleNetworkInterfaceNicTypeValues() []NetworkInterfaceNicType { + return []NetworkInterfaceNicType{ + NetworkInterfaceNicTypeElastic, + NetworkInterfaceNicTypeStandard, + } +} + +// NetworkOperationStatus - Status of the Azure async operation. +type NetworkOperationStatus string + +const ( + NetworkOperationStatusFailed NetworkOperationStatus = "Failed" + NetworkOperationStatusInProgress NetworkOperationStatus = "InProgress" + NetworkOperationStatusSucceeded NetworkOperationStatus = "Succeeded" +) + +// PossibleNetworkOperationStatusValues returns the possible values for the NetworkOperationStatus const type. +func PossibleNetworkOperationStatusValues() []NetworkOperationStatus { + return []NetworkOperationStatus{ + NetworkOperationStatusFailed, + NetworkOperationStatusInProgress, + NetworkOperationStatusSucceeded, + } +} + +// NetworkProtocol - Network Protocol. +type NetworkProtocol string + +const ( + NetworkProtocolAny NetworkProtocol = "Any" + NetworkProtocolICMP NetworkProtocol = "ICMP" + NetworkProtocolTCP NetworkProtocol = "TCP" + NetworkProtocolUDP NetworkProtocol = "UDP" +) + +// PossibleNetworkProtocolValues returns the possible values for the NetworkProtocol const type. +func PossibleNetworkProtocolValues() []NetworkProtocol { + return []NetworkProtocol{ + NetworkProtocolAny, + NetworkProtocolICMP, + NetworkProtocolTCP, + NetworkProtocolUDP, + } +} + +// NextHopType - Next hop type. +type NextHopType string + +const ( + NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway" + NextHopTypeInternet NextHopType = "Internet" + NextHopTypeNone NextHopType = "None" + NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance" + NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway" + NextHopTypeVnetLocal NextHopType = "VnetLocal" +) + +// PossibleNextHopTypeValues returns the possible values for the NextHopType const type. +func PossibleNextHopTypeValues() []NextHopType { + return []NextHopType{ + NextHopTypeHyperNetGateway, + NextHopTypeInternet, + NextHopTypeNone, + NextHopTypeVirtualAppliance, + NextHopTypeVirtualNetworkGateway, + NextHopTypeVnetLocal, + } +} + +// NextStep - Supported next step behaviors after a rule is applied to a matched route +type NextStep string + +const ( + NextStepContinue NextStep = "Continue" + NextStepTerminate NextStep = "Terminate" + NextStepUnknown NextStep = "Unknown" +) + +// PossibleNextStepValues returns the possible values for the NextStep const type. +func PossibleNextStepValues() []NextStep { + return []NextStep{ + NextStepContinue, + NextStepTerminate, + NextStepUnknown, + } +} + +// NicTypeInRequest - NIC type. This should be either PublicNic or PrivateNic. +type NicTypeInRequest string + +const ( + NicTypeInRequestPrivateNic NicTypeInRequest = "PrivateNic" + NicTypeInRequestPublicNic NicTypeInRequest = "PublicNic" +) + +// PossibleNicTypeInRequestValues returns the possible values for the NicTypeInRequest const type. +func PossibleNicTypeInRequestValues() []NicTypeInRequest { + return []NicTypeInRequest{ + NicTypeInRequestPrivateNic, + NicTypeInRequestPublicNic, + } +} + +// NicTypeInResponse - NIC type - PublicNic, PrivateNic, or AdditionalNic. +type NicTypeInResponse string + +const ( + NicTypeInResponseAdditionalNic NicTypeInResponse = "AdditionalNic" + NicTypeInResponsePrivateNic NicTypeInResponse = "PrivateNic" + NicTypeInResponsePublicNic NicTypeInResponse = "PublicNic" +) + +// PossibleNicTypeInResponseValues returns the possible values for the NicTypeInResponse const type. +func PossibleNicTypeInResponseValues() []NicTypeInResponse { + return []NicTypeInResponse{ + NicTypeInResponseAdditionalNic, + NicTypeInResponsePrivateNic, + NicTypeInResponsePublicNic, + } +} + +// OfficeTrafficCategory - The office traffic category. +type OfficeTrafficCategory string + +const ( + OfficeTrafficCategoryAll OfficeTrafficCategory = "All" + OfficeTrafficCategoryNone OfficeTrafficCategory = "None" + OfficeTrafficCategoryOptimize OfficeTrafficCategory = "Optimize" + OfficeTrafficCategoryOptimizeAndAllow OfficeTrafficCategory = "OptimizeAndAllow" +) + +// PossibleOfficeTrafficCategoryValues returns the possible values for the OfficeTrafficCategory const type. +func PossibleOfficeTrafficCategoryValues() []OfficeTrafficCategory { + return []OfficeTrafficCategory{ + OfficeTrafficCategoryAll, + OfficeTrafficCategoryNone, + OfficeTrafficCategoryOptimize, + OfficeTrafficCategoryOptimizeAndAllow, + } +} + +// Origin - The origin of the issue. +type Origin string + +const ( + OriginInbound Origin = "Inbound" + OriginLocal Origin = "Local" + OriginOutbound Origin = "Outbound" +) + +// PossibleOriginValues returns the possible values for the Origin const type. +func PossibleOriginValues() []Origin { + return []Origin{ + OriginInbound, + OriginLocal, + OriginOutbound, + } +} + +// OutputType - Connection monitor output destination type. Currently, only "Workspace" is supported. +type OutputType string + +const ( + OutputTypeWorkspace OutputType = "Workspace" +) + +// PossibleOutputTypeValues returns the possible values for the OutputType const type. +func PossibleOutputTypeValues() []OutputType { + return []OutputType{ + OutputTypeWorkspace, + } +} + +// OwaspCrsExclusionEntryMatchVariable - The variable to be excluded. +type OwaspCrsExclusionEntryMatchVariable string + +const ( + OwaspCrsExclusionEntryMatchVariableRequestArgKeys OwaspCrsExclusionEntryMatchVariable = "RequestArgKeys" + OwaspCrsExclusionEntryMatchVariableRequestArgNames OwaspCrsExclusionEntryMatchVariable = "RequestArgNames" + OwaspCrsExclusionEntryMatchVariableRequestArgValues OwaspCrsExclusionEntryMatchVariable = "RequestArgValues" + OwaspCrsExclusionEntryMatchVariableRequestCookieKeys OwaspCrsExclusionEntryMatchVariable = "RequestCookieKeys" + OwaspCrsExclusionEntryMatchVariableRequestCookieNames OwaspCrsExclusionEntryMatchVariable = "RequestCookieNames" + OwaspCrsExclusionEntryMatchVariableRequestCookieValues OwaspCrsExclusionEntryMatchVariable = "RequestCookieValues" + OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys OwaspCrsExclusionEntryMatchVariable = "RequestHeaderKeys" + OwaspCrsExclusionEntryMatchVariableRequestHeaderNames OwaspCrsExclusionEntryMatchVariable = "RequestHeaderNames" + OwaspCrsExclusionEntryMatchVariableRequestHeaderValues OwaspCrsExclusionEntryMatchVariable = "RequestHeaderValues" +) + +// PossibleOwaspCrsExclusionEntryMatchVariableValues returns the possible values for the OwaspCrsExclusionEntryMatchVariable const type. +func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntryMatchVariable { + return []OwaspCrsExclusionEntryMatchVariable{ + OwaspCrsExclusionEntryMatchVariableRequestArgKeys, + OwaspCrsExclusionEntryMatchVariableRequestArgNames, + OwaspCrsExclusionEntryMatchVariableRequestArgValues, + OwaspCrsExclusionEntryMatchVariableRequestCookieKeys, + OwaspCrsExclusionEntryMatchVariableRequestCookieNames, + OwaspCrsExclusionEntryMatchVariableRequestCookieValues, + OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys, + OwaspCrsExclusionEntryMatchVariableRequestHeaderNames, + OwaspCrsExclusionEntryMatchVariableRequestHeaderValues, + } +} + +// OwaspCrsExclusionEntrySelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which +// elements in the collection this exclusion applies to. +type OwaspCrsExclusionEntrySelectorMatchOperator string + +const ( + OwaspCrsExclusionEntrySelectorMatchOperatorContains OwaspCrsExclusionEntrySelectorMatchOperator = "Contains" + OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith OwaspCrsExclusionEntrySelectorMatchOperator = "EndsWith" + OwaspCrsExclusionEntrySelectorMatchOperatorEquals OwaspCrsExclusionEntrySelectorMatchOperator = "Equals" + OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny OwaspCrsExclusionEntrySelectorMatchOperator = "EqualsAny" + OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith OwaspCrsExclusionEntrySelectorMatchOperator = "StartsWith" +) + +// PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues returns the possible values for the OwaspCrsExclusionEntrySelectorMatchOperator const type. +func PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues() []OwaspCrsExclusionEntrySelectorMatchOperator { + return []OwaspCrsExclusionEntrySelectorMatchOperator{ + OwaspCrsExclusionEntrySelectorMatchOperatorContains, + OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith, + OwaspCrsExclusionEntrySelectorMatchOperatorEquals, + OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny, + OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith, + } +} + +// PacketCaptureTargetType - Target type of the resource provided. +type PacketCaptureTargetType string + +const ( + PacketCaptureTargetTypeAzureVM PacketCaptureTargetType = "AzureVM" + PacketCaptureTargetTypeAzureVMSS PacketCaptureTargetType = "AzureVMSS" +) + +// PossiblePacketCaptureTargetTypeValues returns the possible values for the PacketCaptureTargetType const type. +func PossiblePacketCaptureTargetTypeValues() []PacketCaptureTargetType { + return []PacketCaptureTargetType{ + PacketCaptureTargetTypeAzureVM, + PacketCaptureTargetTypeAzureVMSS, + } +} + +type PcError string + +const ( + PcErrorAgentStopped PcError = "AgentStopped" + PcErrorCaptureFailed PcError = "CaptureFailed" + PcErrorInternalError PcError = "InternalError" + PcErrorLocalFileFailed PcError = "LocalFileFailed" + PcErrorStorageFailed PcError = "StorageFailed" +) + +// PossiblePcErrorValues returns the possible values for the PcError const type. +func PossiblePcErrorValues() []PcError { + return []PcError{ + PcErrorAgentStopped, + PcErrorCaptureFailed, + PcErrorInternalError, + PcErrorLocalFileFailed, + PcErrorStorageFailed, + } +} + +// PcProtocol - Protocol to be filtered on. +type PcProtocol string + +const ( + PcProtocolAny PcProtocol = "Any" + PcProtocolTCP PcProtocol = "TCP" + PcProtocolUDP PcProtocol = "UDP" +) + +// PossiblePcProtocolValues returns the possible values for the PcProtocol const type. +func PossiblePcProtocolValues() []PcProtocol { + return []PcProtocol{ + PcProtocolAny, + PcProtocolTCP, + PcProtocolUDP, + } +} + +// PcStatus - The status of the packet capture session. +type PcStatus string + +const ( + PcStatusError PcStatus = "Error" + PcStatusNotStarted PcStatus = "NotStarted" + PcStatusRunning PcStatus = "Running" + PcStatusStopped PcStatus = "Stopped" + PcStatusUnknown PcStatus = "Unknown" +) + +// PossiblePcStatusValues returns the possible values for the PcStatus const type. +func PossiblePcStatusValues() []PcStatus { + return []PcStatus{ + PcStatusError, + PcStatusNotStarted, + PcStatusRunning, + PcStatusStopped, + PcStatusUnknown, + } +} + +// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. +type PfsGroup string + +const ( + PfsGroupECP256 PfsGroup = "ECP256" + PfsGroupECP384 PfsGroup = "ECP384" + PfsGroupNone PfsGroup = "None" + PfsGroupPFS1 PfsGroup = "PFS1" + PfsGroupPFS14 PfsGroup = "PFS14" + PfsGroupPFS2 PfsGroup = "PFS2" + PfsGroupPFS2048 PfsGroup = "PFS2048" + PfsGroupPFS24 PfsGroup = "PFS24" + PfsGroupPFSMM PfsGroup = "PFSMM" +) + +// PossiblePfsGroupValues returns the possible values for the PfsGroup const type. +func PossiblePfsGroupValues() []PfsGroup { + return []PfsGroup{ + PfsGroupECP256, + PfsGroupECP384, + PfsGroupNone, + PfsGroupPFS1, + PfsGroupPFS14, + PfsGroupPFS2, + PfsGroupPFS2048, + PfsGroupPFS24, + PfsGroupPFSMM, + } +} + +// PreferredIPVersion - The preferred IP version to use in test evaluation. The connection monitor may choose to use a different +// version depending on other parameters. +type PreferredIPVersion string + +const ( + PreferredIPVersionIPv4 PreferredIPVersion = "IPv4" + PreferredIPVersionIPv6 PreferredIPVersion = "IPv6" +) + +// PossiblePreferredIPVersionValues returns the possible values for the PreferredIPVersion const type. +func PossiblePreferredIPVersionValues() []PreferredIPVersion { + return []PreferredIPVersion{ + PreferredIPVersionIPv4, + PreferredIPVersionIPv6, + } +} + +// PreferredRoutingGateway - The preferred routing gateway types +type PreferredRoutingGateway string + +const ( + PreferredRoutingGatewayExpressRoute PreferredRoutingGateway = "ExpressRoute" + PreferredRoutingGatewayNone PreferredRoutingGateway = "None" + PreferredRoutingGatewayVPNGateway PreferredRoutingGateway = "VpnGateway" +) + +// PossiblePreferredRoutingGatewayValues returns the possible values for the PreferredRoutingGateway const type. +func PossiblePreferredRoutingGatewayValues() []PreferredRoutingGateway { + return []PreferredRoutingGateway{ + PreferredRoutingGatewayExpressRoute, + PreferredRoutingGatewayNone, + PreferredRoutingGatewayVPNGateway, + } +} + +// PrivateEndpointVNetPolicies - Private Endpoint VNet Policies. +type PrivateEndpointVNetPolicies string + +const ( + PrivateEndpointVNetPoliciesBasic PrivateEndpointVNetPolicies = "Basic" + PrivateEndpointVNetPoliciesDisabled PrivateEndpointVNetPolicies = "Disabled" +) + +// PossiblePrivateEndpointVNetPoliciesValues returns the possible values for the PrivateEndpointVNetPolicies const type. +func PossiblePrivateEndpointVNetPoliciesValues() []PrivateEndpointVNetPolicies { + return []PrivateEndpointVNetPolicies{ + PrivateEndpointVNetPoliciesBasic, + PrivateEndpointVNetPoliciesDisabled, + } +} + +// ProbeNoHealthyBackendsBehavior - Determines how new connections are handled by the load balancer when all backend instances +// are probed down. +type ProbeNoHealthyBackendsBehavior string + +const ( + // ProbeNoHealthyBackendsBehaviorAllProbedDown - No new flows will be sent to the backend pool. + ProbeNoHealthyBackendsBehaviorAllProbedDown ProbeNoHealthyBackendsBehavior = "AllProbedDown" + // ProbeNoHealthyBackendsBehaviorAllProbedUp - When all backend instances are probed down, incoming packets will be sent to + // all instances. + ProbeNoHealthyBackendsBehaviorAllProbedUp ProbeNoHealthyBackendsBehavior = "AllProbedUp" +) + +// PossibleProbeNoHealthyBackendsBehaviorValues returns the possible values for the ProbeNoHealthyBackendsBehavior const type. +func PossibleProbeNoHealthyBackendsBehaviorValues() []ProbeNoHealthyBackendsBehavior { + return []ProbeNoHealthyBackendsBehavior{ + ProbeNoHealthyBackendsBehaviorAllProbedDown, + ProbeNoHealthyBackendsBehaviorAllProbedUp, + } +} + +// ProbeProtocol - The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. +// If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required +// for the probe to be successful. +type ProbeProtocol string + +const ( + ProbeProtocolHTTP ProbeProtocol = "Http" + ProbeProtocolHTTPS ProbeProtocol = "Https" + ProbeProtocolTCP ProbeProtocol = "Tcp" +) + +// PossibleProbeProtocolValues returns the possible values for the ProbeProtocol const type. +func PossibleProbeProtocolValues() []ProbeProtocol { + return []ProbeProtocol{ + ProbeProtocolHTTP, + ProbeProtocolHTTPS, + ProbeProtocolTCP, + } +} + +// ProcessorArchitecture - VPN client Processor Architecture. +type ProcessorArchitecture string + +const ( + ProcessorArchitectureAmd64 ProcessorArchitecture = "Amd64" + ProcessorArchitectureX86 ProcessorArchitecture = "X86" +) + +// PossibleProcessorArchitectureValues returns the possible values for the ProcessorArchitecture const type. +func PossibleProcessorArchitectureValues() []ProcessorArchitecture { + return []ProcessorArchitecture{ + ProcessorArchitectureAmd64, + ProcessorArchitectureX86, + } +} + +// Protocol - Network protocol. +type Protocol string + +const ( + ProtocolHTTP Protocol = "Http" + ProtocolHTTPS Protocol = "Https" + ProtocolIcmp Protocol = "Icmp" + ProtocolTCP Protocol = "Tcp" +) + +// PossibleProtocolValues returns the possible values for the Protocol const type. +func PossibleProtocolValues() []Protocol { + return []Protocol{ + ProtocolHTTP, + ProtocolHTTPS, + ProtocolIcmp, + ProtocolTCP, + } +} + +// ProtocolType - RNM supported protocol types. +type ProtocolType string + +const ( + ProtocolTypeAh ProtocolType = "Ah" + ProtocolTypeAll ProtocolType = "All" + ProtocolTypeDoNotUse ProtocolType = "DoNotUse" + ProtocolTypeEsp ProtocolType = "Esp" + ProtocolTypeGre ProtocolType = "Gre" + ProtocolTypeIcmp ProtocolType = "Icmp" + ProtocolTypeTCP ProtocolType = "Tcp" + ProtocolTypeUDP ProtocolType = "Udp" + ProtocolTypeVxlan ProtocolType = "Vxlan" +) + +// PossibleProtocolTypeValues returns the possible values for the ProtocolType const type. +func PossibleProtocolTypeValues() []ProtocolType { + return []ProtocolType{ + ProtocolTypeAh, + ProtocolTypeAll, + ProtocolTypeDoNotUse, + ProtocolTypeEsp, + ProtocolTypeGre, + ProtocolTypeIcmp, + ProtocolTypeTCP, + ProtocolTypeUDP, + ProtocolTypeVxlan, + } +} + +// ProvisioningState - Provisioning states of a resource. +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateCanceled, + ProvisioningStateCreating, + ProvisioningStateDeleting, + ProvisioningStateFailed, + ProvisioningStateSucceeded, + ProvisioningStateUpdating, + } +} + +// PublicIPAddressDNSSettingsDomainNameLabelScope - The domain name label scope. If a domain name label and a domain name +// label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed +// value +// includes in FQDN. +type PublicIPAddressDNSSettingsDomainNameLabelScope string + +const ( + PublicIPAddressDNSSettingsDomainNameLabelScopeNoReuse PublicIPAddressDNSSettingsDomainNameLabelScope = "NoReuse" + PublicIPAddressDNSSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDNSSettingsDomainNameLabelScope = "ResourceGroupReuse" + PublicIPAddressDNSSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDNSSettingsDomainNameLabelScope = "SubscriptionReuse" + PublicIPAddressDNSSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDNSSettingsDomainNameLabelScope = "TenantReuse" +) + +// PossiblePublicIPAddressDNSSettingsDomainNameLabelScopeValues returns the possible values for the PublicIPAddressDNSSettingsDomainNameLabelScope const type. +func PossiblePublicIPAddressDNSSettingsDomainNameLabelScopeValues() []PublicIPAddressDNSSettingsDomainNameLabelScope { + return []PublicIPAddressDNSSettingsDomainNameLabelScope{ + PublicIPAddressDNSSettingsDomainNameLabelScopeNoReuse, + PublicIPAddressDNSSettingsDomainNameLabelScopeResourceGroupReuse, + PublicIPAddressDNSSettingsDomainNameLabelScopeSubscriptionReuse, + PublicIPAddressDNSSettingsDomainNameLabelScopeTenantReuse, + } +} + +// PublicIPAddressMigrationPhase - Migration phase of Public IP Address. +type PublicIPAddressMigrationPhase string + +const ( + PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" + PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" + PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" + PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" + PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" +) + +// PossiblePublicIPAddressMigrationPhaseValues returns the possible values for the PublicIPAddressMigrationPhase const type. +func PossiblePublicIPAddressMigrationPhaseValues() []PublicIPAddressMigrationPhase { + return []PublicIPAddressMigrationPhase{ + PublicIPAddressMigrationPhaseAbort, + PublicIPAddressMigrationPhaseCommit, + PublicIPAddressMigrationPhaseCommitted, + PublicIPAddressMigrationPhaseNone, + PublicIPAddressMigrationPhasePrepare, + } +} + +// PublicIPAddressSKUName - Name of a public IP address SKU. +type PublicIPAddressSKUName string + +const ( + PublicIPAddressSKUNameBasic PublicIPAddressSKUName = "Basic" + PublicIPAddressSKUNameStandard PublicIPAddressSKUName = "Standard" +) + +// PossiblePublicIPAddressSKUNameValues returns the possible values for the PublicIPAddressSKUName const type. +func PossiblePublicIPAddressSKUNameValues() []PublicIPAddressSKUName { + return []PublicIPAddressSKUName{ + PublicIPAddressSKUNameBasic, + PublicIPAddressSKUNameStandard, + } +} + +// PublicIPAddressSKUTier - Tier of a public IP address SKU. +type PublicIPAddressSKUTier string + +const ( + PublicIPAddressSKUTierGlobal PublicIPAddressSKUTier = "Global" + PublicIPAddressSKUTierRegional PublicIPAddressSKUTier = "Regional" +) + +// PossiblePublicIPAddressSKUTierValues returns the possible values for the PublicIPAddressSKUTier const type. +func PossiblePublicIPAddressSKUTierValues() []PublicIPAddressSKUTier { + return []PublicIPAddressSKUTier{ + PublicIPAddressSKUTierGlobal, + PublicIPAddressSKUTierRegional, + } +} + +// PublicIPPrefixSKUName - Name of a public IP prefix SKU. +type PublicIPPrefixSKUName string + +const ( + PublicIPPrefixSKUNameStandard PublicIPPrefixSKUName = "Standard" +) + +// PossiblePublicIPPrefixSKUNameValues returns the possible values for the PublicIPPrefixSKUName const type. +func PossiblePublicIPPrefixSKUNameValues() []PublicIPPrefixSKUName { + return []PublicIPPrefixSKUName{ + PublicIPPrefixSKUNameStandard, + } +} + +// PublicIPPrefixSKUTier - Tier of a public IP prefix SKU. +type PublicIPPrefixSKUTier string + +const ( + PublicIPPrefixSKUTierGlobal PublicIPPrefixSKUTier = "Global" + PublicIPPrefixSKUTierRegional PublicIPPrefixSKUTier = "Regional" +) + +// PossiblePublicIPPrefixSKUTierValues returns the possible values for the PublicIPPrefixSKUTier const type. +func PossiblePublicIPPrefixSKUTierValues() []PublicIPPrefixSKUTier { + return []PublicIPPrefixSKUTier{ + PublicIPPrefixSKUTierGlobal, + PublicIPPrefixSKUTierRegional, + } +} + +// ResiliencyModel - Property to indicate if the Express Route Gateway has resiliency model of MultiHomed or SingleHomed +type ResiliencyModel string + +const ( + ResiliencyModelMultiHomed ResiliencyModel = "MultiHomed" + ResiliencyModelSingleHomed ResiliencyModel = "SingleHomed" +) + +// PossibleResiliencyModelValues returns the possible values for the ResiliencyModel const type. +func PossibleResiliencyModelValues() []ResiliencyModel { + return []ResiliencyModel{ + ResiliencyModelMultiHomed, + ResiliencyModelSingleHomed, + } +} + +// ResourceIdentityType - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both +// an implicitly created identity and a set of user assigned identities. The type 'None' will remove any +// identities from the virtual machine. +type ResourceIdentityType string + +const ( + ResourceIdentityTypeNone ResourceIdentityType = "None" + ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" + ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{ + ResourceIdentityTypeNone, + ResourceIdentityTypeSystemAssigned, + ResourceIdentityTypeSystemAssignedUserAssigned, + ResourceIdentityTypeUserAssigned, + } +} + +// RouteFilterRuleType - The rule type of the rule. +type RouteFilterRuleType string + +const ( + RouteFilterRuleTypeCommunity RouteFilterRuleType = "Community" +) + +// PossibleRouteFilterRuleTypeValues returns the possible values for the RouteFilterRuleType const type. +func PossibleRouteFilterRuleTypeValues() []RouteFilterRuleType { + return []RouteFilterRuleType{ + RouteFilterRuleTypeCommunity, + } +} + +// RouteMapActionType - Kind of actions which can be taken on a matched route. Add, Replace, Remove refer to parameters on +// the route, like community or prefix +type RouteMapActionType string + +const ( + RouteMapActionTypeAdd RouteMapActionType = "Add" + RouteMapActionTypeDrop RouteMapActionType = "Drop" + RouteMapActionTypeRemove RouteMapActionType = "Remove" + RouteMapActionTypeReplace RouteMapActionType = "Replace" + RouteMapActionTypeUnknown RouteMapActionType = "Unknown" +) + +// PossibleRouteMapActionTypeValues returns the possible values for the RouteMapActionType const type. +func PossibleRouteMapActionTypeValues() []RouteMapActionType { + return []RouteMapActionType{ + RouteMapActionTypeAdd, + RouteMapActionTypeDrop, + RouteMapActionTypeRemove, + RouteMapActionTypeReplace, + RouteMapActionTypeUnknown, + } +} + +// RouteMapMatchCondition - Match condition to apply RouteMap rules. +type RouteMapMatchCondition string + +const ( + RouteMapMatchConditionContains RouteMapMatchCondition = "Contains" + RouteMapMatchConditionEquals RouteMapMatchCondition = "Equals" + RouteMapMatchConditionNotContains RouteMapMatchCondition = "NotContains" + RouteMapMatchConditionNotEquals RouteMapMatchCondition = "NotEquals" + RouteMapMatchConditionUnknown RouteMapMatchCondition = "Unknown" +) + +// PossibleRouteMapMatchConditionValues returns the possible values for the RouteMapMatchCondition const type. +func PossibleRouteMapMatchConditionValues() []RouteMapMatchCondition { + return []RouteMapMatchCondition{ + RouteMapMatchConditionContains, + RouteMapMatchConditionEquals, + RouteMapMatchConditionNotContains, + RouteMapMatchConditionNotEquals, + RouteMapMatchConditionUnknown, + } +} + +// RouteNextHopType - The type of Azure hop the packet should be sent to. +type RouteNextHopType string + +const ( + RouteNextHopTypeInternet RouteNextHopType = "Internet" + RouteNextHopTypeNone RouteNextHopType = "None" + RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" + RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" + RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" +) + +// PossibleRouteNextHopTypeValues returns the possible values for the RouteNextHopType const type. +func PossibleRouteNextHopTypeValues() []RouteNextHopType { + return []RouteNextHopType{ + RouteNextHopTypeInternet, + RouteNextHopTypeNone, + RouteNextHopTypeVirtualAppliance, + RouteNextHopTypeVirtualNetworkGateway, + RouteNextHopTypeVnetLocal, + } +} + +// RoutingRuleDestinationType - Routing rule destination type. +type RoutingRuleDestinationType string + +const ( + RoutingRuleDestinationTypeAddressPrefix RoutingRuleDestinationType = "AddressPrefix" + RoutingRuleDestinationTypeServiceTag RoutingRuleDestinationType = "ServiceTag" +) + +// PossibleRoutingRuleDestinationTypeValues returns the possible values for the RoutingRuleDestinationType const type. +func PossibleRoutingRuleDestinationTypeValues() []RoutingRuleDestinationType { + return []RoutingRuleDestinationType{ + RoutingRuleDestinationTypeAddressPrefix, + RoutingRuleDestinationTypeServiceTag, + } +} + +// RoutingRuleNextHopType - Routing rule next hop type. +type RoutingRuleNextHopType string + +const ( + RoutingRuleNextHopTypeInternet RoutingRuleNextHopType = "Internet" + RoutingRuleNextHopTypeNoNextHop RoutingRuleNextHopType = "NoNextHop" + RoutingRuleNextHopTypeVirtualAppliance RoutingRuleNextHopType = "VirtualAppliance" + RoutingRuleNextHopTypeVirtualNetworkGateway RoutingRuleNextHopType = "VirtualNetworkGateway" + RoutingRuleNextHopTypeVnetLocal RoutingRuleNextHopType = "VnetLocal" +) + +// PossibleRoutingRuleNextHopTypeValues returns the possible values for the RoutingRuleNextHopType const type. +func PossibleRoutingRuleNextHopTypeValues() []RoutingRuleNextHopType { + return []RoutingRuleNextHopType{ + RoutingRuleNextHopTypeInternet, + RoutingRuleNextHopTypeNoNextHop, + RoutingRuleNextHopTypeVirtualAppliance, + RoutingRuleNextHopTypeVirtualNetworkGateway, + RoutingRuleNextHopTypeVnetLocal, + } +} + +// RoutingState - The current routing state of the VirtualHub. +type RoutingState string + +const ( + RoutingStateFailed RoutingState = "Failed" + RoutingStateNone RoutingState = "None" + RoutingStateProvisioned RoutingState = "Provisioned" + RoutingStateProvisioning RoutingState = "Provisioning" +) + +// PossibleRoutingStateValues returns the possible values for the RoutingState const type. +func PossibleRoutingStateValues() []RoutingState { + return []RoutingState{ + RoutingStateFailed, + RoutingStateNone, + RoutingStateProvisioned, + RoutingStateProvisioning, + } +} + +// ScopeConnectionState - The current scope connection state. +type ScopeConnectionState string + +const ( + ScopeConnectionStateConflict ScopeConnectionState = "Conflict" + ScopeConnectionStateConnected ScopeConnectionState = "Connected" + ScopeConnectionStatePending ScopeConnectionState = "Pending" + ScopeConnectionStateRejected ScopeConnectionState = "Rejected" + ScopeConnectionStateRevoked ScopeConnectionState = "Revoked" +) + +// PossibleScopeConnectionStateValues returns the possible values for the ScopeConnectionState const type. +func PossibleScopeConnectionStateValues() []ScopeConnectionState { + return []ScopeConnectionState{ + ScopeConnectionStateConflict, + ScopeConnectionStateConnected, + ScopeConnectionStatePending, + ScopeConnectionStateRejected, + ScopeConnectionStateRevoked, + } +} + +// ScrubbingRuleEntryMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements +// in the collection this rule applies to. +type ScrubbingRuleEntryMatchOperator string + +const ( + ScrubbingRuleEntryMatchOperatorEquals ScrubbingRuleEntryMatchOperator = "Equals" + ScrubbingRuleEntryMatchOperatorEqualsAny ScrubbingRuleEntryMatchOperator = "EqualsAny" +) + +// PossibleScrubbingRuleEntryMatchOperatorValues returns the possible values for the ScrubbingRuleEntryMatchOperator const type. +func PossibleScrubbingRuleEntryMatchOperatorValues() []ScrubbingRuleEntryMatchOperator { + return []ScrubbingRuleEntryMatchOperator{ + ScrubbingRuleEntryMatchOperatorEquals, + ScrubbingRuleEntryMatchOperatorEqualsAny, + } +} + +// ScrubbingRuleEntryMatchVariable - The variable to be scrubbed from the logs. +type ScrubbingRuleEntryMatchVariable string + +const ( + ScrubbingRuleEntryMatchVariableRequestArgNames ScrubbingRuleEntryMatchVariable = "RequestArgNames" + ScrubbingRuleEntryMatchVariableRequestCookieNames ScrubbingRuleEntryMatchVariable = "RequestCookieNames" + ScrubbingRuleEntryMatchVariableRequestHeaderNames ScrubbingRuleEntryMatchVariable = "RequestHeaderNames" + ScrubbingRuleEntryMatchVariableRequestIPAddress ScrubbingRuleEntryMatchVariable = "RequestIPAddress" + ScrubbingRuleEntryMatchVariableRequestJSONArgNames ScrubbingRuleEntryMatchVariable = "RequestJSONArgNames" + ScrubbingRuleEntryMatchVariableRequestPostArgNames ScrubbingRuleEntryMatchVariable = "RequestPostArgNames" +) + +// PossibleScrubbingRuleEntryMatchVariableValues returns the possible values for the ScrubbingRuleEntryMatchVariable const type. +func PossibleScrubbingRuleEntryMatchVariableValues() []ScrubbingRuleEntryMatchVariable { + return []ScrubbingRuleEntryMatchVariable{ + ScrubbingRuleEntryMatchVariableRequestArgNames, + ScrubbingRuleEntryMatchVariableRequestCookieNames, + ScrubbingRuleEntryMatchVariableRequestHeaderNames, + ScrubbingRuleEntryMatchVariableRequestIPAddress, + ScrubbingRuleEntryMatchVariableRequestJSONArgNames, + ScrubbingRuleEntryMatchVariableRequestPostArgNames, + } +} + +// ScrubbingRuleEntryState - Defines the state of log scrubbing rule. Default value is Enabled. +type ScrubbingRuleEntryState string + +const ( + ScrubbingRuleEntryStateDisabled ScrubbingRuleEntryState = "Disabled" + ScrubbingRuleEntryStateEnabled ScrubbingRuleEntryState = "Enabled" +) + +// PossibleScrubbingRuleEntryStateValues returns the possible values for the ScrubbingRuleEntryState const type. +func PossibleScrubbingRuleEntryStateValues() []ScrubbingRuleEntryState { + return []ScrubbingRuleEntryState{ + ScrubbingRuleEntryStateDisabled, + ScrubbingRuleEntryStateEnabled, + } +} + +// SecurityConfigurationRuleAccess - Whether network traffic is allowed or denied. +type SecurityConfigurationRuleAccess string + +const ( + SecurityConfigurationRuleAccessAllow SecurityConfigurationRuleAccess = "Allow" + SecurityConfigurationRuleAccessAlwaysAllow SecurityConfigurationRuleAccess = "AlwaysAllow" + SecurityConfigurationRuleAccessDeny SecurityConfigurationRuleAccess = "Deny" +) + +// PossibleSecurityConfigurationRuleAccessValues returns the possible values for the SecurityConfigurationRuleAccess const type. +func PossibleSecurityConfigurationRuleAccessValues() []SecurityConfigurationRuleAccess { + return []SecurityConfigurationRuleAccess{ + SecurityConfigurationRuleAccessAllow, + SecurityConfigurationRuleAccessAlwaysAllow, + SecurityConfigurationRuleAccessDeny, + } +} + +// SecurityConfigurationRuleDirection - The direction of the rule. The direction specifies if the rule will be evaluated on +// incoming or outgoing traffic. +type SecurityConfigurationRuleDirection string + +const ( + SecurityConfigurationRuleDirectionInbound SecurityConfigurationRuleDirection = "Inbound" + SecurityConfigurationRuleDirectionOutbound SecurityConfigurationRuleDirection = "Outbound" +) + +// PossibleSecurityConfigurationRuleDirectionValues returns the possible values for the SecurityConfigurationRuleDirection const type. +func PossibleSecurityConfigurationRuleDirectionValues() []SecurityConfigurationRuleDirection { + return []SecurityConfigurationRuleDirection{ + SecurityConfigurationRuleDirectionInbound, + SecurityConfigurationRuleDirectionOutbound, + } +} + +// SecurityConfigurationRuleProtocol - Network protocol this rule applies to. +type SecurityConfigurationRuleProtocol string + +const ( + SecurityConfigurationRuleProtocolAh SecurityConfigurationRuleProtocol = "Ah" + SecurityConfigurationRuleProtocolAny SecurityConfigurationRuleProtocol = "Any" + SecurityConfigurationRuleProtocolEsp SecurityConfigurationRuleProtocol = "Esp" + SecurityConfigurationRuleProtocolIcmp SecurityConfigurationRuleProtocol = "Icmp" + SecurityConfigurationRuleProtocolTCP SecurityConfigurationRuleProtocol = "Tcp" + SecurityConfigurationRuleProtocolUDP SecurityConfigurationRuleProtocol = "Udp" +) + +// PossibleSecurityConfigurationRuleProtocolValues returns the possible values for the SecurityConfigurationRuleProtocol const type. +func PossibleSecurityConfigurationRuleProtocolValues() []SecurityConfigurationRuleProtocol { + return []SecurityConfigurationRuleProtocol{ + SecurityConfigurationRuleProtocolAh, + SecurityConfigurationRuleProtocolAny, + SecurityConfigurationRuleProtocolEsp, + SecurityConfigurationRuleProtocolIcmp, + SecurityConfigurationRuleProtocolTCP, + SecurityConfigurationRuleProtocolUDP, + } +} + +// SecurityPartnerProviderConnectionStatus - The current state of the connection with Security Partner Provider. +type SecurityPartnerProviderConnectionStatus string + +const ( + SecurityPartnerProviderConnectionStatusConnected SecurityPartnerProviderConnectionStatus = "Connected" + SecurityPartnerProviderConnectionStatusNotConnected SecurityPartnerProviderConnectionStatus = "NotConnected" + SecurityPartnerProviderConnectionStatusPartiallyConnected SecurityPartnerProviderConnectionStatus = "PartiallyConnected" + SecurityPartnerProviderConnectionStatusUnknown SecurityPartnerProviderConnectionStatus = "Unknown" +) + +// PossibleSecurityPartnerProviderConnectionStatusValues returns the possible values for the SecurityPartnerProviderConnectionStatus const type. +func PossibleSecurityPartnerProviderConnectionStatusValues() []SecurityPartnerProviderConnectionStatus { + return []SecurityPartnerProviderConnectionStatus{ + SecurityPartnerProviderConnectionStatusConnected, + SecurityPartnerProviderConnectionStatusNotConnected, + SecurityPartnerProviderConnectionStatusPartiallyConnected, + SecurityPartnerProviderConnectionStatusUnknown, + } +} + +// SecurityProviderName - The Security Providers. +type SecurityProviderName string + +const ( + SecurityProviderNameCheckpoint SecurityProviderName = "Checkpoint" + SecurityProviderNameIBoss SecurityProviderName = "IBoss" + SecurityProviderNameZScaler SecurityProviderName = "ZScaler" +) + +// PossibleSecurityProviderNameValues returns the possible values for the SecurityProviderName const type. +func PossibleSecurityProviderNameValues() []SecurityProviderName { + return []SecurityProviderName{ + SecurityProviderNameCheckpoint, + SecurityProviderNameIBoss, + SecurityProviderNameZScaler, + } +} + +// SecurityRuleAccess - Whether network traffic is allowed or denied. +type SecurityRuleAccess string + +const ( + SecurityRuleAccessAllow SecurityRuleAccess = "Allow" + SecurityRuleAccessDeny SecurityRuleAccess = "Deny" +) + +// PossibleSecurityRuleAccessValues returns the possible values for the SecurityRuleAccess const type. +func PossibleSecurityRuleAccessValues() []SecurityRuleAccess { + return []SecurityRuleAccess{ + SecurityRuleAccessAllow, + SecurityRuleAccessDeny, + } +} + +// SecurityRuleDirection - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing +// traffic. +type SecurityRuleDirection string + +const ( + SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" + SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" +) + +// PossibleSecurityRuleDirectionValues returns the possible values for the SecurityRuleDirection const type. +func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection { + return []SecurityRuleDirection{ + SecurityRuleDirectionInbound, + SecurityRuleDirectionOutbound, + } +} + +// SecurityRuleProtocol - Network protocol this rule applies to. +type SecurityRuleProtocol string + +const ( + SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" + SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*" + SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" + SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" + SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp" + SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp" +) + +// PossibleSecurityRuleProtocolValues returns the possible values for the SecurityRuleProtocol const type. +func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol { + return []SecurityRuleProtocol{ + SecurityRuleProtocolAh, + SecurityRuleProtocolAsterisk, + SecurityRuleProtocolEsp, + SecurityRuleProtocolIcmp, + SecurityRuleProtocolTCP, + SecurityRuleProtocolUDP, + } +} + +// SensitivityType - Defines the sensitivity for the rule. +type SensitivityType string + +const ( + SensitivityTypeHigh SensitivityType = "High" + SensitivityTypeLow SensitivityType = "Low" + SensitivityTypeMedium SensitivityType = "Medium" + SensitivityTypeNone SensitivityType = "None" +) + +// PossibleSensitivityTypeValues returns the possible values for the SensitivityType const type. +func PossibleSensitivityTypeValues() []SensitivityType { + return []SensitivityType{ + SensitivityTypeHigh, + SensitivityTypeLow, + SensitivityTypeMedium, + SensitivityTypeNone, + } +} + +// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. +type ServiceProviderProvisioningState string + +const ( + ServiceProviderProvisioningStateDeprovisioning ServiceProviderProvisioningState = "Deprovisioning" + ServiceProviderProvisioningStateNotProvisioned ServiceProviderProvisioningState = "NotProvisioned" + ServiceProviderProvisioningStateProvisioned ServiceProviderProvisioningState = "Provisioned" + ServiceProviderProvisioningStateProvisioning ServiceProviderProvisioningState = "Provisioning" +) + +// PossibleServiceProviderProvisioningStateValues returns the possible values for the ServiceProviderProvisioningState const type. +func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState { + return []ServiceProviderProvisioningState{ + ServiceProviderProvisioningStateDeprovisioning, + ServiceProviderProvisioningStateNotProvisioned, + ServiceProviderProvisioningStateProvisioned, + ServiceProviderProvisioningStateProvisioning, + } +} + +// Severity - The severity of the issue. +type Severity string + +const ( + SeverityError Severity = "Error" + SeverityWarning Severity = "Warning" +) + +// PossibleSeverityValues returns the possible values for the Severity const type. +func PossibleSeverityValues() []Severity { + return []Severity{ + SeverityError, + SeverityWarning, + } +} + +// SharingScope - Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property +// can only be set if defaultOutboundAccess is set to false, both properties can only be set +// if subnet is empty. +type SharingScope string + +const ( + SharingScopeDelegatedServices SharingScope = "DelegatedServices" + SharingScopeTenant SharingScope = "Tenant" +) + +// PossibleSharingScopeValues returns the possible values for the SharingScope const type. +func PossibleSharingScopeValues() []SharingScope { + return []SharingScope{ + SharingScopeDelegatedServices, + SharingScopeTenant, + } +} + +// SlotType - Specifies slot info on a cloud service +type SlotType string + +const ( + SlotTypeProduction SlotType = "Production" + SlotTypeStaging SlotType = "Staging" +) + +// PossibleSlotTypeValues returns the possible values for the SlotType const type. +func PossibleSlotTypeValues() []SlotType { + return []SlotType{ + SlotTypeProduction, + SlotTypeStaging, + } +} + +// SyncMode - Backend address synchronous mode for the backend pool +type SyncMode string + +const ( + SyncModeAutomatic SyncMode = "Automatic" + SyncModeManual SyncMode = "Manual" +) + +// PossibleSyncModeValues returns the possible values for the SyncMode const type. +func PossibleSyncModeValues() []SyncMode { + return []SyncMode{ + SyncModeAutomatic, + SyncModeManual, + } +} + +type SyncRemoteAddressSpace string + +const ( + SyncRemoteAddressSpaceTrue SyncRemoteAddressSpace = "true" +) + +// PossibleSyncRemoteAddressSpaceValues returns the possible values for the SyncRemoteAddressSpace const type. +func PossibleSyncRemoteAddressSpaceValues() []SyncRemoteAddressSpace { + return []SyncRemoteAddressSpace{ + SyncRemoteAddressSpaceTrue, + } +} + +// TransportProtocol - The transport protocol for the endpoint. +type TransportProtocol string + +const ( + TransportProtocolAll TransportProtocol = "All" + TransportProtocolTCP TransportProtocol = "Tcp" + TransportProtocolUDP TransportProtocol = "Udp" +) + +// PossibleTransportProtocolValues returns the possible values for the TransportProtocol const type. +func PossibleTransportProtocolValues() []TransportProtocol { + return []TransportProtocol{ + TransportProtocolAll, + TransportProtocolTCP, + TransportProtocolUDP, + } +} + +// TunnelConnectionStatus - The current state of the tunnel. +type TunnelConnectionStatus string + +const ( + TunnelConnectionStatusConnected TunnelConnectionStatus = "Connected" + TunnelConnectionStatusConnecting TunnelConnectionStatus = "Connecting" + TunnelConnectionStatusNotConnected TunnelConnectionStatus = "NotConnected" + TunnelConnectionStatusUnknown TunnelConnectionStatus = "Unknown" +) + +// PossibleTunnelConnectionStatusValues returns the possible values for the TunnelConnectionStatus const type. +func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus { + return []TunnelConnectionStatus{ + TunnelConnectionStatusConnected, + TunnelConnectionStatusConnecting, + TunnelConnectionStatusNotConnected, + TunnelConnectionStatusUnknown, + } +} + +// UsageUnit - An enum describing the unit of measurement. +type UsageUnit string + +const ( + UsageUnitCount UsageUnit = "Count" +) + +// PossibleUsageUnitValues returns the possible values for the UsageUnit const type. +func PossibleUsageUnitValues() []UsageUnit { + return []UsageUnit{ + UsageUnitCount, + } +} + +// UseHubGateway - Flag if need to use hub gateway. +type UseHubGateway string + +const ( + UseHubGatewayFalse UseHubGateway = "False" + UseHubGatewayTrue UseHubGateway = "True" +) + +// PossibleUseHubGatewayValues returns the possible values for the UseHubGateway const type. +func PossibleUseHubGatewayValues() []UseHubGateway { + return []UseHubGateway{ + UseHubGatewayFalse, + UseHubGatewayTrue, + } +} + +// VPNAuthenticationType - VPN authentication types enabled for the virtual network gateway. +type VPNAuthenticationType string + +const ( + VPNAuthenticationTypeAAD VPNAuthenticationType = "AAD" + VPNAuthenticationTypeCertificate VPNAuthenticationType = "Certificate" + VPNAuthenticationTypeRadius VPNAuthenticationType = "Radius" +) + +// PossibleVPNAuthenticationTypeValues returns the possible values for the VPNAuthenticationType const type. +func PossibleVPNAuthenticationTypeValues() []VPNAuthenticationType { + return []VPNAuthenticationType{ + VPNAuthenticationTypeAAD, + VPNAuthenticationTypeCertificate, + VPNAuthenticationTypeRadius, + } +} + +// VPNClientProtocol - VPN client protocol enabled for the virtual network gateway. +type VPNClientProtocol string + +const ( + VPNClientProtocolIkeV2 VPNClientProtocol = "IkeV2" + VPNClientProtocolOpenVPN VPNClientProtocol = "OpenVPN" + VPNClientProtocolSSTP VPNClientProtocol = "SSTP" +) + +// PossibleVPNClientProtocolValues returns the possible values for the VPNClientProtocol const type. +func PossibleVPNClientProtocolValues() []VPNClientProtocol { + return []VPNClientProtocol{ + VPNClientProtocolIkeV2, + VPNClientProtocolOpenVPN, + VPNClientProtocolSSTP, + } +} + +// VPNConnectionStatus - The current state of the vpn connection. +type VPNConnectionStatus string + +const ( + VPNConnectionStatusConnected VPNConnectionStatus = "Connected" + VPNConnectionStatusConnecting VPNConnectionStatus = "Connecting" + VPNConnectionStatusNotConnected VPNConnectionStatus = "NotConnected" + VPNConnectionStatusUnknown VPNConnectionStatus = "Unknown" +) + +// PossibleVPNConnectionStatusValues returns the possible values for the VPNConnectionStatus const type. +func PossibleVPNConnectionStatusValues() []VPNConnectionStatus { + return []VPNConnectionStatus{ + VPNConnectionStatusConnected, + VPNConnectionStatusConnecting, + VPNConnectionStatusNotConnected, + VPNConnectionStatusUnknown, + } +} + +// VPNGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. +type VPNGatewayGeneration string + +const ( + VPNGatewayGenerationGeneration1 VPNGatewayGeneration = "Generation1" + VPNGatewayGenerationGeneration2 VPNGatewayGeneration = "Generation2" + VPNGatewayGenerationNone VPNGatewayGeneration = "None" +) + +// PossibleVPNGatewayGenerationValues returns the possible values for the VPNGatewayGeneration const type. +func PossibleVPNGatewayGenerationValues() []VPNGatewayGeneration { + return []VPNGatewayGeneration{ + VPNGatewayGenerationGeneration1, + VPNGatewayGenerationGeneration2, + VPNGatewayGenerationNone, + } +} + +// VPNGatewayTunnelingProtocol - VPN protocol enabled for the VpnServerConfiguration. +type VPNGatewayTunnelingProtocol string + +const ( + VPNGatewayTunnelingProtocolIkeV2 VPNGatewayTunnelingProtocol = "IkeV2" + VPNGatewayTunnelingProtocolOpenVPN VPNGatewayTunnelingProtocol = "OpenVPN" +) + +// PossibleVPNGatewayTunnelingProtocolValues returns the possible values for the VPNGatewayTunnelingProtocol const type. +func PossibleVPNGatewayTunnelingProtocolValues() []VPNGatewayTunnelingProtocol { + return []VPNGatewayTunnelingProtocol{ + VPNGatewayTunnelingProtocolIkeV2, + VPNGatewayTunnelingProtocolOpenVPN, + } +} + +// VPNLinkConnectionMode - Vpn link connection mode. +type VPNLinkConnectionMode string + +const ( + VPNLinkConnectionModeDefault VPNLinkConnectionMode = "Default" + VPNLinkConnectionModeInitiatorOnly VPNLinkConnectionMode = "InitiatorOnly" + VPNLinkConnectionModeResponderOnly VPNLinkConnectionMode = "ResponderOnly" +) + +// PossibleVPNLinkConnectionModeValues returns the possible values for the VPNLinkConnectionMode const type. +func PossibleVPNLinkConnectionModeValues() []VPNLinkConnectionMode { + return []VPNLinkConnectionMode{ + VPNLinkConnectionModeDefault, + VPNLinkConnectionModeInitiatorOnly, + VPNLinkConnectionModeResponderOnly, + } +} + +// VPNNatRuleMode - The Source NAT direction of a VPN NAT. +type VPNNatRuleMode string + +const ( + VPNNatRuleModeEgressSnat VPNNatRuleMode = "EgressSnat" + VPNNatRuleModeIngressSnat VPNNatRuleMode = "IngressSnat" +) + +// PossibleVPNNatRuleModeValues returns the possible values for the VPNNatRuleMode const type. +func PossibleVPNNatRuleModeValues() []VPNNatRuleMode { + return []VPNNatRuleMode{ + VPNNatRuleModeEgressSnat, + VPNNatRuleModeIngressSnat, + } +} + +// VPNNatRuleType - The type of NAT rule for VPN NAT. +type VPNNatRuleType string + +const ( + VPNNatRuleTypeDynamic VPNNatRuleType = "Dynamic" + VPNNatRuleTypeStatic VPNNatRuleType = "Static" +) + +// PossibleVPNNatRuleTypeValues returns the possible values for the VPNNatRuleType const type. +func PossibleVPNNatRuleTypeValues() []VPNNatRuleType { + return []VPNNatRuleType{ + VPNNatRuleTypeDynamic, + VPNNatRuleTypeStatic, + } +} + +// VPNPolicyMemberAttributeType - The Vpn Policy member attribute type. +type VPNPolicyMemberAttributeType string + +const ( + VPNPolicyMemberAttributeTypeAADGroupID VPNPolicyMemberAttributeType = "AADGroupId" + VPNPolicyMemberAttributeTypeCertificateGroupID VPNPolicyMemberAttributeType = "CertificateGroupId" + VPNPolicyMemberAttributeTypeRadiusAzureGroupID VPNPolicyMemberAttributeType = "RadiusAzureGroupId" +) + +// PossibleVPNPolicyMemberAttributeTypeValues returns the possible values for the VPNPolicyMemberAttributeType const type. +func PossibleVPNPolicyMemberAttributeTypeValues() []VPNPolicyMemberAttributeType { + return []VPNPolicyMemberAttributeType{ + VPNPolicyMemberAttributeTypeAADGroupID, + VPNPolicyMemberAttributeTypeCertificateGroupID, + VPNPolicyMemberAttributeTypeRadiusAzureGroupID, + } +} + +// VPNType - The type of this virtual network gateway. +type VPNType string + +const ( + VPNTypePolicyBased VPNType = "PolicyBased" + VPNTypeRouteBased VPNType = "RouteBased" +) + +// PossibleVPNTypeValues returns the possible values for the VPNType const type. +func PossibleVPNTypeValues() []VPNType { + return []VPNType{ + VPNTypePolicyBased, + VPNTypeRouteBased, + } +} + +// VerbosityLevel - Verbosity level. +type VerbosityLevel string + +const ( + VerbosityLevelFull VerbosityLevel = "Full" + VerbosityLevelMinimum VerbosityLevel = "Minimum" + VerbosityLevelNormal VerbosityLevel = "Normal" +) + +// PossibleVerbosityLevelValues returns the possible values for the VerbosityLevel const type. +func PossibleVerbosityLevelValues() []VerbosityLevel { + return []VerbosityLevel{ + VerbosityLevelFull, + VerbosityLevelMinimum, + VerbosityLevelNormal, + } +} + +// VirtualNetworkEncryptionEnforcement - If the encrypted VNet allows VM that does not support encryption. This field is for +// future support, AllowUnencrypted is the only supported value at general availability. +type VirtualNetworkEncryptionEnforcement string + +const ( + VirtualNetworkEncryptionEnforcementAllowUnencrypted VirtualNetworkEncryptionEnforcement = "AllowUnencrypted" + VirtualNetworkEncryptionEnforcementDropUnencrypted VirtualNetworkEncryptionEnforcement = "DropUnencrypted" +) + +// PossibleVirtualNetworkEncryptionEnforcementValues returns the possible values for the VirtualNetworkEncryptionEnforcement const type. +func PossibleVirtualNetworkEncryptionEnforcementValues() []VirtualNetworkEncryptionEnforcement { + return []VirtualNetworkEncryptionEnforcement{ + VirtualNetworkEncryptionEnforcementAllowUnencrypted, + VirtualNetworkEncryptionEnforcementDropUnencrypted, + } +} + +// VirtualNetworkGatewayConnectionMode - Gateway connection type. +type VirtualNetworkGatewayConnectionMode string + +const ( + VirtualNetworkGatewayConnectionModeDefault VirtualNetworkGatewayConnectionMode = "Default" + VirtualNetworkGatewayConnectionModeInitiatorOnly VirtualNetworkGatewayConnectionMode = "InitiatorOnly" + VirtualNetworkGatewayConnectionModeResponderOnly VirtualNetworkGatewayConnectionMode = "ResponderOnly" +) + +// PossibleVirtualNetworkGatewayConnectionModeValues returns the possible values for the VirtualNetworkGatewayConnectionMode const type. +func PossibleVirtualNetworkGatewayConnectionModeValues() []VirtualNetworkGatewayConnectionMode { + return []VirtualNetworkGatewayConnectionMode{ + VirtualNetworkGatewayConnectionModeDefault, + VirtualNetworkGatewayConnectionModeInitiatorOnly, + VirtualNetworkGatewayConnectionModeResponderOnly, + } +} + +// VirtualNetworkGatewayConnectionProtocol - Gateway connection protocol. +type VirtualNetworkGatewayConnectionProtocol string + +const ( + VirtualNetworkGatewayConnectionProtocolIKEv1 VirtualNetworkGatewayConnectionProtocol = "IKEv1" + VirtualNetworkGatewayConnectionProtocolIKEv2 VirtualNetworkGatewayConnectionProtocol = "IKEv2" +) + +// PossibleVirtualNetworkGatewayConnectionProtocolValues returns the possible values for the VirtualNetworkGatewayConnectionProtocol const type. +func PossibleVirtualNetworkGatewayConnectionProtocolValues() []VirtualNetworkGatewayConnectionProtocol { + return []VirtualNetworkGatewayConnectionProtocol{ + VirtualNetworkGatewayConnectionProtocolIKEv1, + VirtualNetworkGatewayConnectionProtocolIKEv2, + } +} + +// VirtualNetworkGatewayConnectionStatus - Virtual Network Gateway connection status. +type VirtualNetworkGatewayConnectionStatus string + +const ( + VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" + VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" + VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" + VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" +) + +// PossibleVirtualNetworkGatewayConnectionStatusValues returns the possible values for the VirtualNetworkGatewayConnectionStatus const type. +func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus { + return []VirtualNetworkGatewayConnectionStatus{ + VirtualNetworkGatewayConnectionStatusConnected, + VirtualNetworkGatewayConnectionStatusConnecting, + VirtualNetworkGatewayConnectionStatusNotConnected, + VirtualNetworkGatewayConnectionStatusUnknown, + } +} + +// VirtualNetworkGatewayConnectionType - Gateway connection type. +type VirtualNetworkGatewayConnectionType string + +const ( + VirtualNetworkGatewayConnectionTypeExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" + VirtualNetworkGatewayConnectionTypeIPsec VirtualNetworkGatewayConnectionType = "IPsec" + VirtualNetworkGatewayConnectionTypeVPNClient VirtualNetworkGatewayConnectionType = "VPNClient" + VirtualNetworkGatewayConnectionTypeVnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" +) + +// PossibleVirtualNetworkGatewayConnectionTypeValues returns the possible values for the VirtualNetworkGatewayConnectionType const type. +func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType { + return []VirtualNetworkGatewayConnectionType{ + VirtualNetworkGatewayConnectionTypeExpressRoute, + VirtualNetworkGatewayConnectionTypeIPsec, + VirtualNetworkGatewayConnectionTypeVPNClient, + VirtualNetworkGatewayConnectionTypeVnet2Vnet, + } +} + +// VirtualNetworkGatewaySKUName - Gateway SKU name. +type VirtualNetworkGatewaySKUName string + +const ( + VirtualNetworkGatewaySKUNameBasic VirtualNetworkGatewaySKUName = "Basic" + VirtualNetworkGatewaySKUNameErGw1AZ VirtualNetworkGatewaySKUName = "ErGw1AZ" + VirtualNetworkGatewaySKUNameErGw2AZ VirtualNetworkGatewaySKUName = "ErGw2AZ" + VirtualNetworkGatewaySKUNameErGw3AZ VirtualNetworkGatewaySKUName = "ErGw3AZ" + VirtualNetworkGatewaySKUNameErGwScale VirtualNetworkGatewaySKUName = "ErGwScale" + VirtualNetworkGatewaySKUNameHighPerformance VirtualNetworkGatewaySKUName = "HighPerformance" + VirtualNetworkGatewaySKUNameStandard VirtualNetworkGatewaySKUName = "Standard" + VirtualNetworkGatewaySKUNameUltraPerformance VirtualNetworkGatewaySKUName = "UltraPerformance" + VirtualNetworkGatewaySKUNameVPNGw1 VirtualNetworkGatewaySKUName = "VpnGw1" + VirtualNetworkGatewaySKUNameVPNGw1AZ VirtualNetworkGatewaySKUName = "VpnGw1AZ" + VirtualNetworkGatewaySKUNameVPNGw2 VirtualNetworkGatewaySKUName = "VpnGw2" + VirtualNetworkGatewaySKUNameVPNGw2AZ VirtualNetworkGatewaySKUName = "VpnGw2AZ" + VirtualNetworkGatewaySKUNameVPNGw3 VirtualNetworkGatewaySKUName = "VpnGw3" + VirtualNetworkGatewaySKUNameVPNGw3AZ VirtualNetworkGatewaySKUName = "VpnGw3AZ" + VirtualNetworkGatewaySKUNameVPNGw4 VirtualNetworkGatewaySKUName = "VpnGw4" + VirtualNetworkGatewaySKUNameVPNGw4AZ VirtualNetworkGatewaySKUName = "VpnGw4AZ" + VirtualNetworkGatewaySKUNameVPNGw5 VirtualNetworkGatewaySKUName = "VpnGw5" + VirtualNetworkGatewaySKUNameVPNGw5AZ VirtualNetworkGatewaySKUName = "VpnGw5AZ" +) + +// PossibleVirtualNetworkGatewaySKUNameValues returns the possible values for the VirtualNetworkGatewaySKUName const type. +func PossibleVirtualNetworkGatewaySKUNameValues() []VirtualNetworkGatewaySKUName { + return []VirtualNetworkGatewaySKUName{ + VirtualNetworkGatewaySKUNameBasic, + VirtualNetworkGatewaySKUNameErGw1AZ, + VirtualNetworkGatewaySKUNameErGw2AZ, + VirtualNetworkGatewaySKUNameErGw3AZ, + VirtualNetworkGatewaySKUNameErGwScale, + VirtualNetworkGatewaySKUNameHighPerformance, + VirtualNetworkGatewaySKUNameStandard, + VirtualNetworkGatewaySKUNameUltraPerformance, + VirtualNetworkGatewaySKUNameVPNGw1, + VirtualNetworkGatewaySKUNameVPNGw1AZ, + VirtualNetworkGatewaySKUNameVPNGw2, + VirtualNetworkGatewaySKUNameVPNGw2AZ, + VirtualNetworkGatewaySKUNameVPNGw3, + VirtualNetworkGatewaySKUNameVPNGw3AZ, + VirtualNetworkGatewaySKUNameVPNGw4, + VirtualNetworkGatewaySKUNameVPNGw4AZ, + VirtualNetworkGatewaySKUNameVPNGw5, + VirtualNetworkGatewaySKUNameVPNGw5AZ, + } +} + +// VirtualNetworkGatewaySKUTier - Gateway SKU tier. +type VirtualNetworkGatewaySKUTier string + +const ( + VirtualNetworkGatewaySKUTierBasic VirtualNetworkGatewaySKUTier = "Basic" + VirtualNetworkGatewaySKUTierErGw1AZ VirtualNetworkGatewaySKUTier = "ErGw1AZ" + VirtualNetworkGatewaySKUTierErGw2AZ VirtualNetworkGatewaySKUTier = "ErGw2AZ" + VirtualNetworkGatewaySKUTierErGw3AZ VirtualNetworkGatewaySKUTier = "ErGw3AZ" + VirtualNetworkGatewaySKUTierErGwScale VirtualNetworkGatewaySKUTier = "ErGwScale" + VirtualNetworkGatewaySKUTierHighPerformance VirtualNetworkGatewaySKUTier = "HighPerformance" + VirtualNetworkGatewaySKUTierStandard VirtualNetworkGatewaySKUTier = "Standard" + VirtualNetworkGatewaySKUTierUltraPerformance VirtualNetworkGatewaySKUTier = "UltraPerformance" + VirtualNetworkGatewaySKUTierVPNGw1 VirtualNetworkGatewaySKUTier = "VpnGw1" + VirtualNetworkGatewaySKUTierVPNGw1AZ VirtualNetworkGatewaySKUTier = "VpnGw1AZ" + VirtualNetworkGatewaySKUTierVPNGw2 VirtualNetworkGatewaySKUTier = "VpnGw2" + VirtualNetworkGatewaySKUTierVPNGw2AZ VirtualNetworkGatewaySKUTier = "VpnGw2AZ" + VirtualNetworkGatewaySKUTierVPNGw3 VirtualNetworkGatewaySKUTier = "VpnGw3" + VirtualNetworkGatewaySKUTierVPNGw3AZ VirtualNetworkGatewaySKUTier = "VpnGw3AZ" + VirtualNetworkGatewaySKUTierVPNGw4 VirtualNetworkGatewaySKUTier = "VpnGw4" + VirtualNetworkGatewaySKUTierVPNGw4AZ VirtualNetworkGatewaySKUTier = "VpnGw4AZ" + VirtualNetworkGatewaySKUTierVPNGw5 VirtualNetworkGatewaySKUTier = "VpnGw5" + VirtualNetworkGatewaySKUTierVPNGw5AZ VirtualNetworkGatewaySKUTier = "VpnGw5AZ" +) + +// PossibleVirtualNetworkGatewaySKUTierValues returns the possible values for the VirtualNetworkGatewaySKUTier const type. +func PossibleVirtualNetworkGatewaySKUTierValues() []VirtualNetworkGatewaySKUTier { + return []VirtualNetworkGatewaySKUTier{ + VirtualNetworkGatewaySKUTierBasic, + VirtualNetworkGatewaySKUTierErGw1AZ, + VirtualNetworkGatewaySKUTierErGw2AZ, + VirtualNetworkGatewaySKUTierErGw3AZ, + VirtualNetworkGatewaySKUTierErGwScale, + VirtualNetworkGatewaySKUTierHighPerformance, + VirtualNetworkGatewaySKUTierStandard, + VirtualNetworkGatewaySKUTierUltraPerformance, + VirtualNetworkGatewaySKUTierVPNGw1, + VirtualNetworkGatewaySKUTierVPNGw1AZ, + VirtualNetworkGatewaySKUTierVPNGw2, + VirtualNetworkGatewaySKUTierVPNGw2AZ, + VirtualNetworkGatewaySKUTierVPNGw3, + VirtualNetworkGatewaySKUTierVPNGw3AZ, + VirtualNetworkGatewaySKUTierVPNGw4, + VirtualNetworkGatewaySKUTierVPNGw4AZ, + VirtualNetworkGatewaySKUTierVPNGw5, + VirtualNetworkGatewaySKUTierVPNGw5AZ, + } +} + +// VirtualNetworkGatewayType - The type of this virtual network gateway. +type VirtualNetworkGatewayType string + +const ( + VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" + VirtualNetworkGatewayTypeLocalGateway VirtualNetworkGatewayType = "LocalGateway" + VirtualNetworkGatewayTypeVPN VirtualNetworkGatewayType = "Vpn" +) + +// PossibleVirtualNetworkGatewayTypeValues returns the possible values for the VirtualNetworkGatewayType const type. +func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType { + return []VirtualNetworkGatewayType{ + VirtualNetworkGatewayTypeExpressRoute, + VirtualNetworkGatewayTypeLocalGateway, + VirtualNetworkGatewayTypeVPN, + } +} + +// VirtualNetworkPeeringLevel - The peering sync status of the virtual network peering. +type VirtualNetworkPeeringLevel string + +const ( + VirtualNetworkPeeringLevelFullyInSync VirtualNetworkPeeringLevel = "FullyInSync" + VirtualNetworkPeeringLevelLocalAndRemoteNotInSync VirtualNetworkPeeringLevel = "LocalAndRemoteNotInSync" + VirtualNetworkPeeringLevelLocalNotInSync VirtualNetworkPeeringLevel = "LocalNotInSync" + VirtualNetworkPeeringLevelRemoteNotInSync VirtualNetworkPeeringLevel = "RemoteNotInSync" +) + +// PossibleVirtualNetworkPeeringLevelValues returns the possible values for the VirtualNetworkPeeringLevel const type. +func PossibleVirtualNetworkPeeringLevelValues() []VirtualNetworkPeeringLevel { + return []VirtualNetworkPeeringLevel{ + VirtualNetworkPeeringLevelFullyInSync, + VirtualNetworkPeeringLevelLocalAndRemoteNotInSync, + VirtualNetworkPeeringLevelLocalNotInSync, + VirtualNetworkPeeringLevelRemoteNotInSync, + } +} + +// VirtualNetworkPeeringState - The status of the virtual network peering. +type VirtualNetworkPeeringState string + +const ( + VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected" + VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected" + VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated" +) + +// PossibleVirtualNetworkPeeringStateValues returns the possible values for the VirtualNetworkPeeringState const type. +func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState { + return []VirtualNetworkPeeringState{ + VirtualNetworkPeeringStateConnected, + VirtualNetworkPeeringStateDisconnected, + VirtualNetworkPeeringStateInitiated, + } +} + +// VirtualNetworkPrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet. +type VirtualNetworkPrivateEndpointNetworkPolicies string + +const ( + VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" + VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" + VirtualNetworkPrivateEndpointNetworkPoliciesNetworkSecurityGroupEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "NetworkSecurityGroupEnabled" + VirtualNetworkPrivateEndpointNetworkPoliciesRouteTableEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "RouteTableEnabled" +) + +// PossibleVirtualNetworkPrivateEndpointNetworkPoliciesValues returns the possible values for the VirtualNetworkPrivateEndpointNetworkPolicies const type. +func PossibleVirtualNetworkPrivateEndpointNetworkPoliciesValues() []VirtualNetworkPrivateEndpointNetworkPolicies { + return []VirtualNetworkPrivateEndpointNetworkPolicies{ + VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, + VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, + VirtualNetworkPrivateEndpointNetworkPoliciesNetworkSecurityGroupEnabled, + VirtualNetworkPrivateEndpointNetworkPoliciesRouteTableEnabled, + } +} + +// VirtualNetworkPrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the +// subnet. +type VirtualNetworkPrivateLinkServiceNetworkPolicies string + +const ( + VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" + VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" +) + +// PossibleVirtualNetworkPrivateLinkServiceNetworkPoliciesValues returns the possible values for the VirtualNetworkPrivateLinkServiceNetworkPolicies const type. +func PossibleVirtualNetworkPrivateLinkServiceNetworkPoliciesValues() []VirtualNetworkPrivateLinkServiceNetworkPolicies { + return []VirtualNetworkPrivateLinkServiceNetworkPolicies{ + VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, + VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, + } +} + +// VirtualWanSecurityProviderType - The virtual wan security provider type. +type VirtualWanSecurityProviderType string + +const ( + VirtualWanSecurityProviderTypeExternal VirtualWanSecurityProviderType = "External" + VirtualWanSecurityProviderTypeNative VirtualWanSecurityProviderType = "Native" +) + +// PossibleVirtualWanSecurityProviderTypeValues returns the possible values for the VirtualWanSecurityProviderType const type. +func PossibleVirtualWanSecurityProviderTypeValues() []VirtualWanSecurityProviderType { + return []VirtualWanSecurityProviderType{ + VirtualWanSecurityProviderTypeExternal, + VirtualWanSecurityProviderTypeNative, + } +} + +// VnetLocalRouteOverrideCriteria - Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination +// in spoke vnet. +type VnetLocalRouteOverrideCriteria string + +const ( + VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" + VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" +) + +// PossibleVnetLocalRouteOverrideCriteriaValues returns the possible values for the VnetLocalRouteOverrideCriteria const type. +func PossibleVnetLocalRouteOverrideCriteriaValues() []VnetLocalRouteOverrideCriteria { + return []VnetLocalRouteOverrideCriteria{ + VnetLocalRouteOverrideCriteriaContains, + VnetLocalRouteOverrideCriteriaEqual, + } +} + +// WebApplicationFirewallAction - Type of Actions. +type WebApplicationFirewallAction string + +const ( + WebApplicationFirewallActionAllow WebApplicationFirewallAction = "Allow" + WebApplicationFirewallActionBlock WebApplicationFirewallAction = "Block" + WebApplicationFirewallActionJSChallenge WebApplicationFirewallAction = "JSChallenge" + WebApplicationFirewallActionLog WebApplicationFirewallAction = "Log" +) + +// PossibleWebApplicationFirewallActionValues returns the possible values for the WebApplicationFirewallAction const type. +func PossibleWebApplicationFirewallActionValues() []WebApplicationFirewallAction { + return []WebApplicationFirewallAction{ + WebApplicationFirewallActionAllow, + WebApplicationFirewallActionBlock, + WebApplicationFirewallActionJSChallenge, + WebApplicationFirewallActionLog, + } +} + +// WebApplicationFirewallEnabledState - The state of the policy. +type WebApplicationFirewallEnabledState string + +const ( + WebApplicationFirewallEnabledStateDisabled WebApplicationFirewallEnabledState = "Disabled" + WebApplicationFirewallEnabledStateEnabled WebApplicationFirewallEnabledState = "Enabled" +) + +// PossibleWebApplicationFirewallEnabledStateValues returns the possible values for the WebApplicationFirewallEnabledState const type. +func PossibleWebApplicationFirewallEnabledStateValues() []WebApplicationFirewallEnabledState { + return []WebApplicationFirewallEnabledState{ + WebApplicationFirewallEnabledStateDisabled, + WebApplicationFirewallEnabledStateEnabled, + } +} + +// WebApplicationFirewallMatchVariable - Match Variable. +type WebApplicationFirewallMatchVariable string + +const ( + WebApplicationFirewallMatchVariablePostArgs WebApplicationFirewallMatchVariable = "PostArgs" + WebApplicationFirewallMatchVariableQueryString WebApplicationFirewallMatchVariable = "QueryString" + WebApplicationFirewallMatchVariableRemoteAddr WebApplicationFirewallMatchVariable = "RemoteAddr" + WebApplicationFirewallMatchVariableRequestBody WebApplicationFirewallMatchVariable = "RequestBody" + WebApplicationFirewallMatchVariableRequestCookies WebApplicationFirewallMatchVariable = "RequestCookies" + WebApplicationFirewallMatchVariableRequestHeaders WebApplicationFirewallMatchVariable = "RequestHeaders" + WebApplicationFirewallMatchVariableRequestMethod WebApplicationFirewallMatchVariable = "RequestMethod" + WebApplicationFirewallMatchVariableRequestURI WebApplicationFirewallMatchVariable = "RequestUri" +) + +// PossibleWebApplicationFirewallMatchVariableValues returns the possible values for the WebApplicationFirewallMatchVariable const type. +func PossibleWebApplicationFirewallMatchVariableValues() []WebApplicationFirewallMatchVariable { + return []WebApplicationFirewallMatchVariable{ + WebApplicationFirewallMatchVariablePostArgs, + WebApplicationFirewallMatchVariableQueryString, + WebApplicationFirewallMatchVariableRemoteAddr, + WebApplicationFirewallMatchVariableRequestBody, + WebApplicationFirewallMatchVariableRequestCookies, + WebApplicationFirewallMatchVariableRequestHeaders, + WebApplicationFirewallMatchVariableRequestMethod, + WebApplicationFirewallMatchVariableRequestURI, + } +} + +// WebApplicationFirewallMode - The mode of the policy. +type WebApplicationFirewallMode string + +const ( + WebApplicationFirewallModeDetection WebApplicationFirewallMode = "Detection" + WebApplicationFirewallModePrevention WebApplicationFirewallMode = "Prevention" +) + +// PossibleWebApplicationFirewallModeValues returns the possible values for the WebApplicationFirewallMode const type. +func PossibleWebApplicationFirewallModeValues() []WebApplicationFirewallMode { + return []WebApplicationFirewallMode{ + WebApplicationFirewallModeDetection, + WebApplicationFirewallModePrevention, + } +} + +// WebApplicationFirewallOperator - The operator to be matched. +type WebApplicationFirewallOperator string + +const ( + WebApplicationFirewallOperatorAny WebApplicationFirewallOperator = "Any" + WebApplicationFirewallOperatorBeginsWith WebApplicationFirewallOperator = "BeginsWith" + WebApplicationFirewallOperatorContains WebApplicationFirewallOperator = "Contains" + WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith" + WebApplicationFirewallOperatorEqual WebApplicationFirewallOperator = "Equal" + WebApplicationFirewallOperatorGeoMatch WebApplicationFirewallOperator = "GeoMatch" + WebApplicationFirewallOperatorGreaterThan WebApplicationFirewallOperator = "GreaterThan" + WebApplicationFirewallOperatorGreaterThanOrEqual WebApplicationFirewallOperator = "GreaterThanOrEqual" + WebApplicationFirewallOperatorIPMatch WebApplicationFirewallOperator = "IPMatch" + WebApplicationFirewallOperatorLessThan WebApplicationFirewallOperator = "LessThan" + WebApplicationFirewallOperatorLessThanOrEqual WebApplicationFirewallOperator = "LessThanOrEqual" + WebApplicationFirewallOperatorRegex WebApplicationFirewallOperator = "Regex" +) + +// PossibleWebApplicationFirewallOperatorValues returns the possible values for the WebApplicationFirewallOperator const type. +func PossibleWebApplicationFirewallOperatorValues() []WebApplicationFirewallOperator { + return []WebApplicationFirewallOperator{ + WebApplicationFirewallOperatorAny, + WebApplicationFirewallOperatorBeginsWith, + WebApplicationFirewallOperatorContains, + WebApplicationFirewallOperatorEndsWith, + WebApplicationFirewallOperatorEqual, + WebApplicationFirewallOperatorGeoMatch, + WebApplicationFirewallOperatorGreaterThan, + WebApplicationFirewallOperatorGreaterThanOrEqual, + WebApplicationFirewallOperatorIPMatch, + WebApplicationFirewallOperatorLessThan, + WebApplicationFirewallOperatorLessThanOrEqual, + WebApplicationFirewallOperatorRegex, + } +} + +// WebApplicationFirewallPolicyResourceState - Resource status of the policy. +type WebApplicationFirewallPolicyResourceState string + +const ( + WebApplicationFirewallPolicyResourceStateCreating WebApplicationFirewallPolicyResourceState = "Creating" + WebApplicationFirewallPolicyResourceStateDeleting WebApplicationFirewallPolicyResourceState = "Deleting" + WebApplicationFirewallPolicyResourceStateDisabled WebApplicationFirewallPolicyResourceState = "Disabled" + WebApplicationFirewallPolicyResourceStateDisabling WebApplicationFirewallPolicyResourceState = "Disabling" + WebApplicationFirewallPolicyResourceStateEnabled WebApplicationFirewallPolicyResourceState = "Enabled" + WebApplicationFirewallPolicyResourceStateEnabling WebApplicationFirewallPolicyResourceState = "Enabling" +) + +// PossibleWebApplicationFirewallPolicyResourceStateValues returns the possible values for the WebApplicationFirewallPolicyResourceState const type. +func PossibleWebApplicationFirewallPolicyResourceStateValues() []WebApplicationFirewallPolicyResourceState { + return []WebApplicationFirewallPolicyResourceState{ + WebApplicationFirewallPolicyResourceStateCreating, + WebApplicationFirewallPolicyResourceStateDeleting, + WebApplicationFirewallPolicyResourceStateDisabled, + WebApplicationFirewallPolicyResourceStateDisabling, + WebApplicationFirewallPolicyResourceStateEnabled, + WebApplicationFirewallPolicyResourceStateEnabling, + } +} + +// WebApplicationFirewallRuleType - The rule type. +type WebApplicationFirewallRuleType string + +const ( + WebApplicationFirewallRuleTypeInvalid WebApplicationFirewallRuleType = "Invalid" + WebApplicationFirewallRuleTypeMatchRule WebApplicationFirewallRuleType = "MatchRule" + WebApplicationFirewallRuleTypeRateLimitRule WebApplicationFirewallRuleType = "RateLimitRule" +) + +// PossibleWebApplicationFirewallRuleTypeValues returns the possible values for the WebApplicationFirewallRuleType const type. +func PossibleWebApplicationFirewallRuleTypeValues() []WebApplicationFirewallRuleType { + return []WebApplicationFirewallRuleType{ + WebApplicationFirewallRuleTypeInvalid, + WebApplicationFirewallRuleTypeMatchRule, + WebApplicationFirewallRuleTypeRateLimitRule, + } +} + +// WebApplicationFirewallScrubbingState - State of the log scrubbing config. Default value is Enabled. +type WebApplicationFirewallScrubbingState string + +const ( + WebApplicationFirewallScrubbingStateDisabled WebApplicationFirewallScrubbingState = "Disabled" + WebApplicationFirewallScrubbingStateEnabled WebApplicationFirewallScrubbingState = "Enabled" +) + +// PossibleWebApplicationFirewallScrubbingStateValues returns the possible values for the WebApplicationFirewallScrubbingState const type. +func PossibleWebApplicationFirewallScrubbingStateValues() []WebApplicationFirewallScrubbingState { + return []WebApplicationFirewallScrubbingState{ + WebApplicationFirewallScrubbingStateDisabled, + WebApplicationFirewallScrubbingStateEnabled, + } +} + +// WebApplicationFirewallState - Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not +// specified. +type WebApplicationFirewallState string + +const ( + WebApplicationFirewallStateDisabled WebApplicationFirewallState = "Disabled" + WebApplicationFirewallStateEnabled WebApplicationFirewallState = "Enabled" +) + +// PossibleWebApplicationFirewallStateValues returns the possible values for the WebApplicationFirewallState const type. +func PossibleWebApplicationFirewallStateValues() []WebApplicationFirewallState { + return []WebApplicationFirewallState{ + WebApplicationFirewallStateDisabled, + WebApplicationFirewallStateEnabled, + } +} + +// WebApplicationFirewallTransform - Transforms applied before matching. +type WebApplicationFirewallTransform string + +const ( + WebApplicationFirewallTransformHTMLEntityDecode WebApplicationFirewallTransform = "HtmlEntityDecode" + WebApplicationFirewallTransformLowercase WebApplicationFirewallTransform = "Lowercase" + WebApplicationFirewallTransformRemoveNulls WebApplicationFirewallTransform = "RemoveNulls" + WebApplicationFirewallTransformTrim WebApplicationFirewallTransform = "Trim" + WebApplicationFirewallTransformURLDecode WebApplicationFirewallTransform = "UrlDecode" + WebApplicationFirewallTransformURLEncode WebApplicationFirewallTransform = "UrlEncode" + WebApplicationFirewallTransformUppercase WebApplicationFirewallTransform = "Uppercase" +) + +// PossibleWebApplicationFirewallTransformValues returns the possible values for the WebApplicationFirewallTransform const type. +func PossibleWebApplicationFirewallTransformValues() []WebApplicationFirewallTransform { + return []WebApplicationFirewallTransform{ + WebApplicationFirewallTransformHTMLEntityDecode, + WebApplicationFirewallTransformLowercase, + WebApplicationFirewallTransformRemoveNulls, + WebApplicationFirewallTransformTrim, + WebApplicationFirewallTransformURLDecode, + WebApplicationFirewallTransformURLEncode, + WebApplicationFirewallTransformUppercase, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/customipprefixes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/customipprefixes_client.go new file mode 100644 index 00000000..4340573a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/customipprefixes_client.go @@ -0,0 +1,454 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// CustomIPPrefixesClient contains the methods for the CustomIPPrefixes group. +// Don't use this type directly, use NewCustomIPPrefixesClient() instead. +type CustomIPPrefixesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCustomIPPrefixesClient creates a new instance of CustomIPPrefixesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCustomIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomIPPrefixesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CustomIPPrefixesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a custom IP prefix. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - customIPPrefixName - The name of the custom IP prefix. +// - parameters - Parameters supplied to the create or update custom IP prefix operation. +// - options - CustomIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomIPPrefixesClient.BeginCreateOrUpdate +// method. +func (client *CustomIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix, options *CustomIPPrefixesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomIPPrefixesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, customIPPrefixName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomIPPrefixesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomIPPrefixesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a custom IP prefix. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *CustomIPPrefixesClient) createOrUpdate(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix, options *CustomIPPrefixesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CustomIPPrefixesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, customIPPrefixName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *CustomIPPrefixesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix, options *CustomIPPrefixesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if customIPPrefixName == "" { + return nil, errors.New("parameter customIPPrefixName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customIpPrefixName}", url.PathEscape(customIPPrefixName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified custom IP prefix. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - customIPPrefixName - The name of the CustomIpPrefix. +// - options - CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete +// method. +func (client *CustomIPPrefixesClient) BeginDelete(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientBeginDeleteOptions) (*runtime.Poller[CustomIPPrefixesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, customIPPrefixName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CustomIPPrefixesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CustomIPPrefixesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified custom IP prefix. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *CustomIPPrefixesClient) deleteOperation(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "CustomIPPrefixesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, customIPPrefixName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *CustomIPPrefixesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if customIPPrefixName == "" { + return nil, errors.New("parameter customIPPrefixName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customIpPrefixName}", url.PathEscape(customIPPrefixName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified custom IP prefix in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - customIPPrefixName - The name of the custom IP prefix. +// - options - CustomIPPrefixesClientGetOptions contains the optional parameters for the CustomIPPrefixesClient.Get method. +func (client *CustomIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientGetOptions) (CustomIPPrefixesClientGetResponse, error) { + var err error + const operationName = "CustomIPPrefixesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, customIPPrefixName, options) + if err != nil { + return CustomIPPrefixesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CustomIPPrefixesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CustomIPPrefixesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *CustomIPPrefixesClient) getCreateRequest(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if customIPPrefixName == "" { + return nil, errors.New("parameter customIPPrefixName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customIpPrefixName}", url.PathEscape(customIPPrefixName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *CustomIPPrefixesClient) getHandleResponse(resp *http.Response) (CustomIPPrefixesClientGetResponse, error) { + result := CustomIPPrefixesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefix); err != nil { + return CustomIPPrefixesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all custom IP prefixes in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.NewListPager +// method. +func (client *CustomIPPrefixesClient) NewListPager(resourceGroupName string, options *CustomIPPrefixesClientListOptions) *runtime.Pager[CustomIPPrefixesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[CustomIPPrefixesClientListResponse]{ + More: func(page CustomIPPrefixesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CustomIPPrefixesClientListResponse) (CustomIPPrefixesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CustomIPPrefixesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return CustomIPPrefixesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *CustomIPPrefixesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *CustomIPPrefixesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *CustomIPPrefixesClient) listHandleResponse(resp *http.Response) (CustomIPPrefixesClientListResponse, error) { + result := CustomIPPrefixesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefixListResult); err != nil { + return CustomIPPrefixesClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the custom IP prefixes in a subscription. +// +// Generated from API version 2024-05-01 +// - options - CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.NewListAllPager +// method. +func (client *CustomIPPrefixesClient) NewListAllPager(options *CustomIPPrefixesClientListAllOptions) *runtime.Pager[CustomIPPrefixesClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[CustomIPPrefixesClientListAllResponse]{ + More: func(page CustomIPPrefixesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CustomIPPrefixesClientListAllResponse) (CustomIPPrefixesClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CustomIPPrefixesClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return CustomIPPrefixesClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *CustomIPPrefixesClient) listAllCreateRequest(ctx context.Context, options *CustomIPPrefixesClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/customIpPrefixes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *CustomIPPrefixesClient) listAllHandleResponse(resp *http.Response) (CustomIPPrefixesClientListAllResponse, error) { + result := CustomIPPrefixesClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefixListResult); err != nil { + return CustomIPPrefixesClientListAllResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates custom IP prefix tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - customIPPrefixName - The name of the custom IP prefix. +// - parameters - Parameters supplied to update custom IP prefix tags. +// - options - CustomIPPrefixesClientUpdateTagsOptions contains the optional parameters for the CustomIPPrefixesClient.UpdateTags +// method. +func (client *CustomIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters TagsObject, options *CustomIPPrefixesClientUpdateTagsOptions) (CustomIPPrefixesClientUpdateTagsResponse, error) { + var err error + const operationName = "CustomIPPrefixesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, customIPPrefixName, parameters, options) + if err != nil { + return CustomIPPrefixesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CustomIPPrefixesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CustomIPPrefixesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *CustomIPPrefixesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters TagsObject, options *CustomIPPrefixesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if customIPPrefixName == "" { + return nil, errors.New("parameter customIPPrefixName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{customIpPrefixName}", url.PathEscape(customIPPrefixName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *CustomIPPrefixesClient) updateTagsHandleResponse(resp *http.Response) (CustomIPPrefixesClientUpdateTagsResponse, error) { + result := CustomIPPrefixesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefix); err != nil { + return CustomIPPrefixesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ddoscustompolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ddoscustompolicies_client.go new file mode 100644 index 00000000..ff5c08f8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ddoscustompolicies_client.go @@ -0,0 +1,336 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DdosCustomPoliciesClient contains the methods for the DdosCustomPolicies group. +// Don't use this type directly, use NewDdosCustomPoliciesClient() instead. +type DdosCustomPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDdosCustomPoliciesClient creates a new instance of DdosCustomPoliciesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDdosCustomPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DdosCustomPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DdosCustomPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a DDoS custom policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ddosCustomPolicyName - The name of the DDoS custom policy. +// - parameters - Parameters supplied to the create or update operation. +// - options - DdosCustomPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginCreateOrUpdate +// method. +func (client *DdosCustomPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy, options *DdosCustomPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DdosCustomPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DdosCustomPoliciesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DdosCustomPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a DDoS custom policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *DdosCustomPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy, options *DdosCustomPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DdosCustomPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DdosCustomPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy, options *DdosCustomPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ddosCustomPolicyName == "" { + return nil, errors.New("parameter ddosCustomPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ddosCustomPolicyName}", url.PathEscape(ddosCustomPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified DDoS custom policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ddosCustomPolicyName - The name of the DDoS custom policy. +// - options - DdosCustomPoliciesClientBeginDeleteOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginDelete +// method. +func (client *DdosCustomPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientBeginDeleteOptions) (*runtime.Poller[DdosCustomPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, ddosCustomPolicyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DdosCustomPoliciesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DdosCustomPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified DDoS custom policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *DdosCustomPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DdosCustomPoliciesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DdosCustomPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ddosCustomPolicyName == "" { + return nil, errors.New("parameter ddosCustomPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ddosCustomPolicyName}", url.PathEscape(ddosCustomPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets information about the specified DDoS custom policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ddosCustomPolicyName - The name of the DDoS custom policy. +// - options - DdosCustomPoliciesClientGetOptions contains the optional parameters for the DdosCustomPoliciesClient.Get method. +func (client *DdosCustomPoliciesClient) Get(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientGetOptions) (DdosCustomPoliciesClientGetResponse, error) { + var err error + const operationName = "DdosCustomPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, options) + if err != nil { + return DdosCustomPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DdosCustomPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DdosCustomPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DdosCustomPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ddosCustomPolicyName == "" { + return nil, errors.New("parameter ddosCustomPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ddosCustomPolicyName}", url.PathEscape(ddosCustomPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DdosCustomPoliciesClient) getHandleResponse(resp *http.Response) (DdosCustomPoliciesClientGetResponse, error) { + result := DdosCustomPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DdosCustomPolicy); err != nil { + return DdosCustomPoliciesClientGetResponse{}, err + } + return result, nil +} + +// UpdateTags - Update a DDoS custom policy tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ddosCustomPolicyName - The name of the DDoS custom policy. +// - parameters - Parameters supplied to update DDoS custom policy resource tags. +// - options - DdosCustomPoliciesClientUpdateTagsOptions contains the optional parameters for the DdosCustomPoliciesClient.UpdateTags +// method. +func (client *DdosCustomPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject, options *DdosCustomPoliciesClientUpdateTagsOptions) (DdosCustomPoliciesClientUpdateTagsResponse, error) { + var err error + const operationName = "DdosCustomPoliciesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) + if err != nil { + return DdosCustomPoliciesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DdosCustomPoliciesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DdosCustomPoliciesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *DdosCustomPoliciesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject, options *DdosCustomPoliciesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ddosCustomPolicyName == "" { + return nil, errors.New("parameter ddosCustomPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ddosCustomPolicyName}", url.PathEscape(ddosCustomPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *DdosCustomPoliciesClient) updateTagsHandleResponse(resp *http.Response) (DdosCustomPoliciesClientUpdateTagsResponse, error) { + result := DdosCustomPoliciesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DdosCustomPolicy); err != nil { + return DdosCustomPoliciesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ddosprotectionplans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ddosprotectionplans_client.go new file mode 100644 index 00000000..744620b5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ddosprotectionplans_client.go @@ -0,0 +1,451 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DdosProtectionPlansClient contains the methods for the DdosProtectionPlans group. +// Don't use this type directly, use NewDdosProtectionPlansClient() instead. +type DdosProtectionPlansClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDdosProtectionPlansClient creates a new instance of DdosProtectionPlansClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDdosProtectionPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DdosProtectionPlansClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DdosProtectionPlansClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a DDoS protection plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ddosProtectionPlanName - The name of the DDoS protection plan. +// - parameters - Parameters supplied to the create or update operation. +// - options - DdosProtectionPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosProtectionPlansClient.BeginCreateOrUpdate +// method. +func (client *DdosProtectionPlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan, options *DdosProtectionPlansClientBeginCreateOrUpdateOptions) (*runtime.Poller[DdosProtectionPlansClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DdosProtectionPlansClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DdosProtectionPlansClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a DDoS protection plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *DdosProtectionPlansClient) createOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan, options *DdosProtectionPlansClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DdosProtectionPlansClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DdosProtectionPlansClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan, options *DdosProtectionPlansClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ddosProtectionPlanName == "" { + return nil, errors.New("parameter ddosProtectionPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ddosProtectionPlanName}", url.PathEscape(ddosProtectionPlanName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified DDoS protection plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ddosProtectionPlanName - The name of the DDoS protection plan. +// - options - DdosProtectionPlansClientBeginDeleteOptions contains the optional parameters for the DdosProtectionPlansClient.BeginDelete +// method. +func (client *DdosProtectionPlansClient) BeginDelete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientBeginDeleteOptions) (*runtime.Poller[DdosProtectionPlansClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, ddosProtectionPlanName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DdosProtectionPlansClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DdosProtectionPlansClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified DDoS protection plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *DdosProtectionPlansClient) deleteOperation(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DdosProtectionPlansClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DdosProtectionPlansClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ddosProtectionPlanName == "" { + return nil, errors.New("parameter ddosProtectionPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ddosProtectionPlanName}", url.PathEscape(ddosProtectionPlanName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets information about the specified DDoS protection plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ddosProtectionPlanName - The name of the DDoS protection plan. +// - options - DdosProtectionPlansClientGetOptions contains the optional parameters for the DdosProtectionPlansClient.Get method. +func (client *DdosProtectionPlansClient) Get(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientGetOptions) (DdosProtectionPlansClientGetResponse, error) { + var err error + const operationName = "DdosProtectionPlansClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, options) + if err != nil { + return DdosProtectionPlansClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DdosProtectionPlansClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DdosProtectionPlansClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DdosProtectionPlansClient) getCreateRequest(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ddosProtectionPlanName == "" { + return nil, errors.New("parameter ddosProtectionPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ddosProtectionPlanName}", url.PathEscape(ddosProtectionPlanName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DdosProtectionPlansClient) getHandleResponse(resp *http.Response) (DdosProtectionPlansClientGetResponse, error) { + result := DdosProtectionPlansClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlan); err != nil { + return DdosProtectionPlansClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all DDoS protection plans in a subscription. +// +// Generated from API version 2024-05-01 +// - options - DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.NewListPager +// method. +func (client *DdosProtectionPlansClient) NewListPager(options *DdosProtectionPlansClientListOptions) *runtime.Pager[DdosProtectionPlansClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DdosProtectionPlansClientListResponse]{ + More: func(page DdosProtectionPlansClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DdosProtectionPlansClientListResponse) (DdosProtectionPlansClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DdosProtectionPlansClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return DdosProtectionPlansClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DdosProtectionPlansClient) listCreateRequest(ctx context.Context, options *DdosProtectionPlansClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DdosProtectionPlansClient) listHandleResponse(resp *http.Response) (DdosProtectionPlansClientListResponse, error) { + result := DdosProtectionPlansClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlanListResult); err != nil { + return DdosProtectionPlansClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets all the DDoS protection plans in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.NewListByResourceGroupPager +// method. +func (client *DdosProtectionPlansClient) NewListByResourceGroupPager(resourceGroupName string, options *DdosProtectionPlansClientListByResourceGroupOptions) *runtime.Pager[DdosProtectionPlansClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[DdosProtectionPlansClientListByResourceGroupResponse]{ + More: func(page DdosProtectionPlansClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DdosProtectionPlansClientListByResourceGroupResponse) (DdosProtectionPlansClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DdosProtectionPlansClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return DdosProtectionPlansClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *DdosProtectionPlansClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DdosProtectionPlansClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *DdosProtectionPlansClient) listByResourceGroupHandleResponse(resp *http.Response) (DdosProtectionPlansClientListByResourceGroupResponse, error) { + result := DdosProtectionPlansClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlanListResult); err != nil { + return DdosProtectionPlansClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Update a DDoS protection plan tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ddosProtectionPlanName - The name of the DDoS protection plan. +// - parameters - Parameters supplied to the update DDoS protection plan resource tags. +// - options - DdosProtectionPlansClientUpdateTagsOptions contains the optional parameters for the DdosProtectionPlansClient.UpdateTags +// method. +func (client *DdosProtectionPlansClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject, options *DdosProtectionPlansClientUpdateTagsOptions) (DdosProtectionPlansClientUpdateTagsResponse, error) { + var err error + const operationName = "DdosProtectionPlansClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) + if err != nil { + return DdosProtectionPlansClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DdosProtectionPlansClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DdosProtectionPlansClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *DdosProtectionPlansClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject, options *DdosProtectionPlansClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ddosProtectionPlanName == "" { + return nil, errors.New("parameter ddosProtectionPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ddosProtectionPlanName}", url.PathEscape(ddosProtectionPlanName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *DdosProtectionPlansClient) updateTagsHandleResponse(resp *http.Response) (DdosProtectionPlansClientUpdateTagsResponse, error) { + result := DdosProtectionPlansClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlan); err != nil { + return DdosProtectionPlansClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/defaultsecurityrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/defaultsecurityrules_client.go new file mode 100644 index 00000000..3678338b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/defaultsecurityrules_client.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DefaultSecurityRulesClient contains the methods for the DefaultSecurityRules group. +// Don't use this type directly, use NewDefaultSecurityRulesClient() instead. +type DefaultSecurityRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDefaultSecurityRulesClient creates a new instance of DefaultSecurityRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDefaultSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DefaultSecurityRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DefaultSecurityRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get the specified default network security rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - defaultSecurityRuleName - The name of the default security rule. +// - options - DefaultSecurityRulesClientGetOptions contains the optional parameters for the DefaultSecurityRulesClient.Get +// method. +func (client *DefaultSecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string, options *DefaultSecurityRulesClientGetOptions) (DefaultSecurityRulesClientGetResponse, error) { + var err error + const operationName = "DefaultSecurityRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, options) + if err != nil { + return DefaultSecurityRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DefaultSecurityRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DefaultSecurityRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DefaultSecurityRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string, options *DefaultSecurityRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkSecurityGroupName == "" { + return nil, errors.New("parameter networkSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) + if defaultSecurityRuleName == "" { + return nil, errors.New("parameter defaultSecurityRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{defaultSecurityRuleName}", url.PathEscape(defaultSecurityRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DefaultSecurityRulesClient) getHandleResponse(resp *http.Response) (DefaultSecurityRulesClientGetResponse, error) { + result := DefaultSecurityRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRule); err != nil { + return DefaultSecurityRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all default security rules in a network security group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - options - DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.NewListPager +// method. +func (client *DefaultSecurityRulesClient) NewListPager(resourceGroupName string, networkSecurityGroupName string, options *DefaultSecurityRulesClientListOptions) *runtime.Pager[DefaultSecurityRulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DefaultSecurityRulesClientListResponse]{ + More: func(page DefaultSecurityRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DefaultSecurityRulesClientListResponse) (DefaultSecurityRulesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DefaultSecurityRulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) + }, nil) + if err != nil { + return DefaultSecurityRulesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DefaultSecurityRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *DefaultSecurityRulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkSecurityGroupName == "" { + return nil, errors.New("parameter networkSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DefaultSecurityRulesClient) listHandleResponse(resp *http.Response) (DefaultSecurityRulesClientListResponse, error) { + result := DefaultSecurityRulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRuleListResult); err != nil { + return DefaultSecurityRulesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/dscpconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/dscpconfiguration_client.go new file mode 100644 index 00000000..b4279544 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/dscpconfiguration_client.go @@ -0,0 +1,382 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DscpConfigurationClient contains the methods for the DscpConfiguration group. +// Don't use this type directly, use NewDscpConfigurationClient() instead. +type DscpConfigurationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDscpConfigurationClient creates a new instance of DscpConfigurationClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDscpConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DscpConfigurationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DscpConfigurationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a DSCP Configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - dscpConfigurationName - The name of the resource. +// - parameters - Parameters supplied to the create or update dscp configuration operation. +// - options - DscpConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscpConfigurationClient.BeginCreateOrUpdate +// method. +func (client *DscpConfigurationClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration, options *DscpConfigurationClientBeginCreateOrUpdateOptions) (*runtime.Poller[DscpConfigurationClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, dscpConfigurationName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DscpConfigurationClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DscpConfigurationClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a DSCP Configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *DscpConfigurationClient) createOrUpdate(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration, options *DscpConfigurationClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DscpConfigurationClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, dscpConfigurationName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *DscpConfigurationClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration, options *DscpConfigurationClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if dscpConfigurationName == "" { + return nil, errors.New("parameter dscpConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{dscpConfigurationName}", url.PathEscape(dscpConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a DSCP Configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - dscpConfigurationName - The name of the resource. +// - options - DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete +// method. +func (client *DscpConfigurationClient) BeginDelete(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientBeginDeleteOptions) (*runtime.Poller[DscpConfigurationClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, dscpConfigurationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DscpConfigurationClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DscpConfigurationClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a DSCP Configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *DscpConfigurationClient) deleteOperation(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "DscpConfigurationClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, dscpConfigurationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *DscpConfigurationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if dscpConfigurationName == "" { + return nil, errors.New("parameter dscpConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{dscpConfigurationName}", url.PathEscape(dscpConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a DSCP Configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - dscpConfigurationName - The name of the resource. +// - options - DscpConfigurationClientGetOptions contains the optional parameters for the DscpConfigurationClient.Get method. +func (client *DscpConfigurationClient) Get(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientGetOptions) (DscpConfigurationClientGetResponse, error) { + var err error + const operationName = "DscpConfigurationClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, dscpConfigurationName, options) + if err != nil { + return DscpConfigurationClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return DscpConfigurationClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DscpConfigurationClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *DscpConfigurationClient) getCreateRequest(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if dscpConfigurationName == "" { + return nil, errors.New("parameter dscpConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{dscpConfigurationName}", url.PathEscape(dscpConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *DscpConfigurationClient) getHandleResponse(resp *http.Response) (DscpConfigurationClientGetResponse, error) { + result := DscpConfigurationClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DscpConfiguration); err != nil { + return DscpConfigurationClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a DSCP Configuration. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.NewListPager +// method. +func (client *DscpConfigurationClient) NewListPager(resourceGroupName string, options *DscpConfigurationClientListOptions) *runtime.Pager[DscpConfigurationClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DscpConfigurationClientListResponse]{ + More: func(page DscpConfigurationClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DscpConfigurationClientListResponse) (DscpConfigurationClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DscpConfigurationClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return DscpConfigurationClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DscpConfigurationClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *DscpConfigurationClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DscpConfigurationClient) listHandleResponse(resp *http.Response) (DscpConfigurationClientListResponse, error) { + result := DscpConfigurationClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DscpConfigurationListResult); err != nil { + return DscpConfigurationClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all dscp configurations in a subscription. +// +// Generated from API version 2024-05-01 +// - options - DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.NewListAllPager +// method. +func (client *DscpConfigurationClient) NewListAllPager(options *DscpConfigurationClientListAllOptions) *runtime.Pager[DscpConfigurationClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[DscpConfigurationClientListAllResponse]{ + More: func(page DscpConfigurationClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DscpConfigurationClientListAllResponse) (DscpConfigurationClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DscpConfigurationClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return DscpConfigurationClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *DscpConfigurationClient) listAllCreateRequest(ctx context.Context, options *DscpConfigurationClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/dscpConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *DscpConfigurationClient) listAllHandleResponse(resp *http.Response) (DscpConfigurationClientListAllResponse, error) { + result := DscpConfigurationClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DscpConfigurationListResult); err != nil { + return DscpConfigurationClientListAllResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuitauthorizations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuitauthorizations_client.go new file mode 100644 index 00000000..25ffbfd5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuitauthorizations_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteCircuitAuthorizationsClient contains the methods for the ExpressRouteCircuitAuthorizations group. +// Don't use this type directly, use NewExpressRouteCircuitAuthorizationsClient() instead. +type ExpressRouteCircuitAuthorizationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteCircuitAuthorizationsClient creates a new instance of ExpressRouteCircuitAuthorizationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitAuthorizationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteCircuitAuthorizationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an authorization in the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - authorizationName - The name of the authorization. +// - authorizationParameters - Parameters supplied to the create or update express route circuit authorization operation. +// - options - ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate +// method. +func (client *ExpressRouteCircuitAuthorizationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, options *ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an authorization in the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitAuthorizationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, options *ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExpressRouteCircuitAuthorizationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, options *ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if authorizationName == "" { + return nil, errors.New("parameter authorizationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, authorizationParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified authorization from the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - authorizationName - The name of the authorization. +// - options - ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginDelete +// method. +func (client *ExpressRouteCircuitAuthorizationsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitAuthorizationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, authorizationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitAuthorizationsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitAuthorizationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified authorization from the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitAuthorizationsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitAuthorizationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, authorizationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ExpressRouteCircuitAuthorizationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if authorizationName == "" { + return nil, errors.New("parameter authorizationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified authorization from the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - authorizationName - The name of the authorization. +// - options - ExpressRouteCircuitAuthorizationsClientGetOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.Get +// method. +func (client *ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientGetOptions) (ExpressRouteCircuitAuthorizationsClientGetResponse, error) { + var err error + const operationName = "ExpressRouteCircuitAuthorizationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, authorizationName, options) + if err != nil { + return ExpressRouteCircuitAuthorizationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteCircuitAuthorizationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteCircuitAuthorizationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRouteCircuitAuthorizationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if authorizationName == "" { + return nil, errors.New("parameter authorizationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRouteCircuitAuthorizationsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitAuthorizationsClientGetResponse, error) { + result := ExpressRouteCircuitAuthorizationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitAuthorization); err != nil { + return ExpressRouteCircuitAuthorizationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all authorizations in an express route circuit. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the circuit. +// - options - ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.NewListPager +// method. +func (client *ExpressRouteCircuitAuthorizationsClient) NewListPager(resourceGroupName string, circuitName string, options *ExpressRouteCircuitAuthorizationsClientListOptions) *runtime.Pager[ExpressRouteCircuitAuthorizationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitAuthorizationsClientListResponse]{ + More: func(page ExpressRouteCircuitAuthorizationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRouteCircuitAuthorizationsClientListResponse) (ExpressRouteCircuitAuthorizationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCircuitAuthorizationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, circuitName, options) + }, nil) + if err != nil { + return ExpressRouteCircuitAuthorizationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteCircuitAuthorizationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitAuthorizationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteCircuitAuthorizationsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitAuthorizationsClientListResponse, error) { + result := ExpressRouteCircuitAuthorizationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationListResult); err != nil { + return ExpressRouteCircuitAuthorizationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuitconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuitconnections_client.go new file mode 100644 index 00000000..96aea094 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuitconnections_client.go @@ -0,0 +1,369 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteCircuitConnectionsClient contains the methods for the ExpressRouteCircuitConnections group. +// Don't use this type directly, use NewExpressRouteCircuitConnectionsClient() instead. +type ExpressRouteCircuitConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteCircuitConnectionsClient creates a new instance of ExpressRouteCircuitConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteCircuitConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a Express Route Circuit Connection in the specified express route circuits. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - connectionName - The name of the express route circuit connection. +// - expressRouteCircuitConnectionParameters - Parameters supplied to the create or update express route circuit connection +// operation. +// - options - ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate +// method. +func (client *ExpressRouteCircuitConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection, options *ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a Express Route Circuit Connection in the specified express route circuits. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection, options *ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExpressRouteCircuitConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection, options *ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, expressRouteCircuitConnectionParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified Express Route Circuit Connection from the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - connectionName - The name of the express route circuit connection. +// - options - ExpressRouteCircuitConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginDelete +// method. +func (client *ExpressRouteCircuitConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitConnectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified Express Route Circuit Connection from the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ExpressRouteCircuitConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Express Route Circuit Connection from the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - connectionName - The name of the express route circuit connection. +// - options - ExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.Get +// method. +func (client *ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientGetOptions) (ExpressRouteCircuitConnectionsClientGetResponse, error) { + var err error + const operationName = "ExpressRouteCircuitConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) + if err != nil { + return ExpressRouteCircuitConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteCircuitConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteCircuitConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRouteCircuitConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRouteCircuitConnectionsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitConnectionsClientGetResponse, error) { + result := ExpressRouteCircuitConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitConnection); err != nil { + return ExpressRouteCircuitConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all global reach connections associated with a private peering in an express route circuit. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the circuit. +// - peeringName - The name of the peering. +// - options - ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.NewListPager +// method. +func (client *ExpressRouteCircuitConnectionsClient) NewListPager(resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitConnectionsClientListOptions) *runtime.Pager[ExpressRouteCircuitConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitConnectionsClientListResponse]{ + More: func(page ExpressRouteCircuitConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRouteCircuitConnectionsClientListResponse) (ExpressRouteCircuitConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCircuitConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) + }, nil) + if err != nil { + return ExpressRouteCircuitConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteCircuitConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteCircuitConnectionsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitConnectionsClientListResponse, error) { + result := ExpressRouteCircuitConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitConnectionListResult); err != nil { + return ExpressRouteCircuitConnectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuitpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuitpeerings_client.go new file mode 100644 index 00000000..0e734f30 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuitpeerings_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteCircuitPeeringsClient contains the methods for the ExpressRouteCircuitPeerings group. +// Don't use this type directly, use NewExpressRouteCircuitPeeringsClient() instead. +type ExpressRouteCircuitPeeringsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteCircuitPeeringsClient creates a new instance of ExpressRouteCircuitPeeringsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteCircuitPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitPeeringsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteCircuitPeeringsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a peering in the specified express route circuits. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - peeringParameters - Parameters supplied to the create or update express route circuit peering operation. +// - options - ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate +// method. +func (client *ExpressRouteCircuitPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, options *ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, peeringName, peeringParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a peering in the specified express route circuits. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, options *ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, peeringName, peeringParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExpressRouteCircuitPeeringsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, options *ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, peeringParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified peering from the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - options - ExpressRouteCircuitPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginDelete +// method. +func (client *ExpressRouteCircuitPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitPeeringsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, peeringName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitPeeringsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitPeeringsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified peering from the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitPeeringsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ExpressRouteCircuitPeeringsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified peering for the express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - options - ExpressRouteCircuitPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.Get +// method. +func (client *ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientGetOptions) (ExpressRouteCircuitPeeringsClientGetResponse, error) { + var err error + const operationName = "ExpressRouteCircuitPeeringsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) + if err != nil { + return ExpressRouteCircuitPeeringsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteCircuitPeeringsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteCircuitPeeringsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRouteCircuitPeeringsClient) getCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRouteCircuitPeeringsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitPeeringsClientGetResponse, error) { + result := ExpressRouteCircuitPeeringsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitPeering); err != nil { + return ExpressRouteCircuitPeeringsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all peerings in a specified express route circuit. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - options - ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.NewListPager +// method. +func (client *ExpressRouteCircuitPeeringsClient) NewListPager(resourceGroupName string, circuitName string, options *ExpressRouteCircuitPeeringsClientListOptions) *runtime.Pager[ExpressRouteCircuitPeeringsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitPeeringsClientListResponse]{ + More: func(page ExpressRouteCircuitPeeringsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRouteCircuitPeeringsClientListResponse) (ExpressRouteCircuitPeeringsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCircuitPeeringsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, circuitName, options) + }, nil) + if err != nil { + return ExpressRouteCircuitPeeringsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteCircuitPeeringsClient) listCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitPeeringsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteCircuitPeeringsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitPeeringsClientListResponse, error) { + result := ExpressRouteCircuitPeeringsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitPeeringListResult); err != nil { + return ExpressRouteCircuitPeeringsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuits_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuits_client.go new file mode 100644 index 00000000..51b386a2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecircuits_client.go @@ -0,0 +1,851 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteCircuitsClient contains the methods for the ExpressRouteCircuits group. +// Don't use this type directly, use NewExpressRouteCircuitsClient() instead. +type ExpressRouteCircuitsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteCircuitsClient creates a new instance of ExpressRouteCircuitsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteCircuitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteCircuitsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the circuit. +// - parameters - Parameters supplied to the create or update express route circuit operation. +// - options - ExpressRouteCircuitsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginCreateOrUpdate +// method. +func (client *ExpressRouteCircuitsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, options *ExpressRouteCircuitsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, options *ExpressRouteCircuitsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExpressRouteCircuitsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, options *ExpressRouteCircuitsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - options - ExpressRouteCircuitsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginDelete +// method. +func (client *ExpressRouteCircuitsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ExpressRouteCircuitsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets information about the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of express route circuit. +// - options - ExpressRouteCircuitsClientGetOptions contains the optional parameters for the ExpressRouteCircuitsClient.Get +// method. +func (client *ExpressRouteCircuitsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientGetOptions) (ExpressRouteCircuitsClientGetResponse, error) { + var err error + const operationName = "ExpressRouteCircuitsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, options) + if err != nil { + return ExpressRouteCircuitsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteCircuitsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteCircuitsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRouteCircuitsClient) getCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRouteCircuitsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientGetResponse, error) { + result := ExpressRouteCircuitsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuit); err != nil { + return ExpressRouteCircuitsClientGetResponse{}, err + } + return result, nil +} + +// GetPeeringStats - Gets all stats from an express route circuit in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - options - ExpressRouteCircuitsClientGetPeeringStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetPeeringStats +// method. +func (client *ExpressRouteCircuitsClient) GetPeeringStats(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitsClientGetPeeringStatsOptions) (ExpressRouteCircuitsClientGetPeeringStatsResponse, error) { + var err error + const operationName = "ExpressRouteCircuitsClient.GetPeeringStats" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPeeringStatsCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) + if err != nil { + return ExpressRouteCircuitsClientGetPeeringStatsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteCircuitsClientGetPeeringStatsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteCircuitsClientGetPeeringStatsResponse{}, err + } + resp, err := client.getPeeringStatsHandleResponse(httpResp) + return resp, err +} + +// getPeeringStatsCreateRequest creates the GetPeeringStats request. +func (client *ExpressRouteCircuitsClient) getPeeringStatsCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitsClientGetPeeringStatsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPeeringStatsHandleResponse handles the GetPeeringStats response. +func (client *ExpressRouteCircuitsClient) getPeeringStatsHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientGetPeeringStatsResponse, error) { + result := ExpressRouteCircuitsClientGetPeeringStatsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitStats); err != nil { + return ExpressRouteCircuitsClientGetPeeringStatsResponse{}, err + } + return result, nil +} + +// GetStats - Gets all the stats from an express route circuit in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - options - ExpressRouteCircuitsClientGetStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetStats +// method. +func (client *ExpressRouteCircuitsClient) GetStats(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientGetStatsOptions) (ExpressRouteCircuitsClientGetStatsResponse, error) { + var err error + const operationName = "ExpressRouteCircuitsClient.GetStats" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getStatsCreateRequest(ctx, resourceGroupName, circuitName, options) + if err != nil { + return ExpressRouteCircuitsClientGetStatsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteCircuitsClientGetStatsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteCircuitsClientGetStatsResponse{}, err + } + resp, err := client.getStatsHandleResponse(httpResp) + return resp, err +} + +// getStatsCreateRequest creates the GetStats request. +func (client *ExpressRouteCircuitsClient) getStatsCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientGetStatsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getStatsHandleResponse handles the GetStats response. +func (client *ExpressRouteCircuitsClient) getStatsHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientGetStatsResponse, error) { + result := ExpressRouteCircuitsClientGetStatsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitStats); err != nil { + return ExpressRouteCircuitsClientGetStatsResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the express route circuits in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListPager +// method. +func (client *ExpressRouteCircuitsClient) NewListPager(resourceGroupName string, options *ExpressRouteCircuitsClientListOptions) *runtime.Pager[ExpressRouteCircuitsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitsClientListResponse]{ + More: func(page ExpressRouteCircuitsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRouteCircuitsClientListResponse) (ExpressRouteCircuitsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCircuitsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ExpressRouteCircuitsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteCircuitsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ExpressRouteCircuitsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteCircuitsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientListResponse, error) { + result := ExpressRouteCircuitsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitListResult); err != nil { + return ExpressRouteCircuitsClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the express route circuits in a subscription. +// +// Generated from API version 2024-05-01 +// - options - ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListAllPager +// method. +func (client *ExpressRouteCircuitsClient) NewListAllPager(options *ExpressRouteCircuitsClientListAllOptions) *runtime.Pager[ExpressRouteCircuitsClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitsClientListAllResponse]{ + More: func(page ExpressRouteCircuitsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRouteCircuitsClientListAllResponse) (ExpressRouteCircuitsClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCircuitsClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return ExpressRouteCircuitsClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *ExpressRouteCircuitsClient) listAllCreateRequest(ctx context.Context, options *ExpressRouteCircuitsClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *ExpressRouteCircuitsClient) listAllHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientListAllResponse, error) { + result := ExpressRouteCircuitsClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitListResult); err != nil { + return ExpressRouteCircuitsClientListAllResponse{}, err + } + return result, nil +} + +// BeginListArpTable - Gets the currently advertised ARP table associated with the express route circuit in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCircuitsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListArpTable +// method. +func (client *ExpressRouteCircuitsClient) BeginListArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListArpTableOptions) (*runtime.Poller[ExpressRouteCircuitsClientListArpTableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listArpTable(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitsClientListArpTableResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitsClientListArpTableResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListArpTable - Gets the currently advertised ARP table associated with the express route circuit in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitsClient) listArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListArpTableOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitsClient.BeginListArpTable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listArpTableCreateRequest(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listArpTableCreateRequest creates the ListArpTable request. +func (client *ExpressRouteCircuitsClient) listArpTableCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListArpTableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if devicePath == "" { + return nil, errors.New("parameter devicePath cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginListRoutesTable - Gets the currently advertised routes table associated with the express route circuit in a resource +// group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCircuitsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTable +// method. +func (client *ExpressRouteCircuitsClient) BeginListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableOptions) (*runtime.Poller[ExpressRouteCircuitsClientListRoutesTableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listRoutesTable(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitsClientListRoutesTableResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitsClientListRoutesTableResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListRoutesTable - Gets the currently advertised routes table associated with the express route circuit in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitsClient) listRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitsClient.BeginListRoutesTable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listRoutesTableCreateRequest(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listRoutesTableCreateRequest creates the ListRoutesTable request. +func (client *ExpressRouteCircuitsClient) listRoutesTableCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if devicePath == "" { + return nil, errors.New("parameter devicePath cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginListRoutesTableSummary - Gets the currently advertised routes table summary associated with the express route circuit +// in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTableSummary +// method. +func (client *ExpressRouteCircuitsClient) BeginListRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions) (*runtime.Poller[ExpressRouteCircuitsClientListRoutesTableSummaryResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listRoutesTableSummary(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCircuitsClientListRoutesTableSummaryResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCircuitsClientListRoutesTableSummaryResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListRoutesTableSummary - Gets the currently advertised routes table summary associated with the express route circuit in +// a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCircuitsClient) listRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCircuitsClient.BeginListRoutesTableSummary" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listRoutesTableSummaryCreateRequest(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listRoutesTableSummaryCreateRequest creates the ListRoutesTableSummary request. +func (client *ExpressRouteCircuitsClient) listRoutesTableSummaryCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if devicePath == "" { + return nil, errors.New("parameter devicePath cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// UpdateTags - Updates an express route circuit tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the circuit. +// - parameters - Parameters supplied to update express route circuit tags. +// - options - ExpressRouteCircuitsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCircuitsClient.UpdateTags +// method. +func (client *ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject, options *ExpressRouteCircuitsClientUpdateTagsOptions) (ExpressRouteCircuitsClientUpdateTagsResponse, error) { + var err error + const operationName = "ExpressRouteCircuitsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, circuitName, parameters, options) + if err != nil { + return ExpressRouteCircuitsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteCircuitsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteCircuitsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *ExpressRouteCircuitsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject, options *ExpressRouteCircuitsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *ExpressRouteCircuitsClient) updateTagsHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientUpdateTagsResponse, error) { + result := ExpressRouteCircuitsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuit); err != nil { + return ExpressRouteCircuitsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteconnections_client.go new file mode 100644 index 00000000..da0b5248 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteconnections_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteConnectionsClient contains the methods for the ExpressRouteConnections group. +// Don't use this type directly, use NewExpressRouteConnectionsClient() instead. +type ExpressRouteConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteConnectionsClient creates a new instance of ExpressRouteConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - connectionName - The name of the connection subresource. +// - putExpressRouteConnectionParameters - Parameters required in an ExpressRouteConnection PUT operation. +// - options - ExpressRouteConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginCreateOrUpdate +// method. +func (client *ExpressRouteConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection, options *ExpressRouteConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection, options *ExpressRouteConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExpressRouteConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection, options *ExpressRouteConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRouteGatewayName == "" { + return nil, errors.New("parameter expressRouteGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, putExpressRouteConnectionParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a connection to a ExpressRoute circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - connectionName - The name of the connection subresource. +// - options - ExpressRouteConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginDelete +// method. +func (client *ExpressRouteConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteConnectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a connection to a ExpressRoute circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ExpressRouteConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRouteGatewayName == "" { + return nil, errors.New("parameter expressRouteGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified ExpressRouteConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - connectionName - The name of the ExpressRoute connection. +// - options - ExpressRouteConnectionsClientGetOptions contains the optional parameters for the ExpressRouteConnectionsClient.Get +// method. +func (client *ExpressRouteConnectionsClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientGetOptions) (ExpressRouteConnectionsClientGetResponse, error) { + var err error + const operationName = "ExpressRouteConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) + if err != nil { + return ExpressRouteConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRouteConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRouteGatewayName == "" { + return nil, errors.New("parameter expressRouteGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRouteConnectionsClient) getHandleResponse(resp *http.Response) (ExpressRouteConnectionsClientGetResponse, error) { + result := ExpressRouteConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteConnection); err != nil { + return ExpressRouteConnectionsClientGetResponse{}, err + } + return result, nil +} + +// List - Lists ExpressRouteConnections. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - options - ExpressRouteConnectionsClientListOptions contains the optional parameters for the ExpressRouteConnectionsClient.List +// method. +func (client *ExpressRouteConnectionsClient) List(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteConnectionsClientListOptions) (ExpressRouteConnectionsClientListResponse, error) { + var err error + const operationName = "ExpressRouteConnectionsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, options) + if err != nil { + return ExpressRouteConnectionsClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteConnectionsClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteConnectionsClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRouteGatewayName == "" { + return nil, errors.New("parameter expressRouteGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteConnectionsClient) listHandleResponse(resp *http.Response) (ExpressRouteConnectionsClientListResponse, error) { + result := ExpressRouteConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteConnectionList); err != nil { + return ExpressRouteConnectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecrossconnectionpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecrossconnectionpeerings_client.go new file mode 100644 index 00000000..0ee7169e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecrossconnectionpeerings_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteCrossConnectionPeeringsClient contains the methods for the ExpressRouteCrossConnectionPeerings group. +// Don't use this type directly, use NewExpressRouteCrossConnectionPeeringsClient() instead. +type ExpressRouteCrossConnectionPeeringsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteCrossConnectionPeeringsClient creates a new instance of ExpressRouteCrossConnectionPeeringsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCrossConnectionPeeringsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteCrossConnectionPeeringsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a peering in the specified ExpressRouteCrossConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - peeringParameters - Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. +// - options - ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the +// ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate method. +func (client *ExpressRouteCrossConnectionPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering, options *ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a peering in the specified ExpressRouteCrossConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCrossConnectionPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering, options *ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExpressRouteCrossConnectionPeeringsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering, options *ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if crossConnectionName == "" { + return nil, errors.New("parameter crossConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, peeringParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified peering from the ExpressRouteCrossConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - options - ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginDelete +// method. +func (client *ExpressRouteCrossConnectionPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCrossConnectionPeeringsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, crossConnectionName, peeringName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionPeeringsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionPeeringsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified peering from the ExpressRouteCrossConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCrossConnectionPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCrossConnectionPeeringsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ExpressRouteCrossConnectionPeeringsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if crossConnectionName == "" { + return nil, errors.New("parameter crossConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified peering for the ExpressRouteCrossConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - options - ExpressRouteCrossConnectionPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.Get +// method. +func (client *ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientGetOptions) (ExpressRouteCrossConnectionPeeringsClientGetResponse, error) { + var err error + const operationName = "ExpressRouteCrossConnectionPeeringsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, options) + if err != nil { + return ExpressRouteCrossConnectionPeeringsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteCrossConnectionPeeringsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteCrossConnectionPeeringsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRouteCrossConnectionPeeringsClient) getCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if crossConnectionName == "" { + return nil, errors.New("parameter crossConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRouteCrossConnectionPeeringsClient) getHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionPeeringsClientGetResponse, error) { + result := ExpressRouteCrossConnectionPeeringsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionPeering); err != nil { + return ExpressRouteCrossConnectionPeeringsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all peerings in a specified ExpressRouteCrossConnection. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - options - ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.NewListPager +// method. +func (client *ExpressRouteCrossConnectionPeeringsClient) NewListPager(resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionPeeringsClientListOptions) *runtime.Pager[ExpressRouteCrossConnectionPeeringsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRouteCrossConnectionPeeringsClientListResponse]{ + More: func(page ExpressRouteCrossConnectionPeeringsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionPeeringsClientListResponse) (ExpressRouteCrossConnectionPeeringsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCrossConnectionPeeringsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, crossConnectionName, options) + }, nil) + if err != nil { + return ExpressRouteCrossConnectionPeeringsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteCrossConnectionPeeringsClient) listCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionPeeringsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if crossConnectionName == "" { + return nil, errors.New("parameter crossConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteCrossConnectionPeeringsClient) listHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionPeeringsClientListResponse, error) { + result := ExpressRouteCrossConnectionPeeringsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionPeeringList); err != nil { + return ExpressRouteCrossConnectionPeeringsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecrossconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecrossconnections_client.go new file mode 100644 index 00000000..b831b4ab --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutecrossconnections_client.go @@ -0,0 +1,645 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteCrossConnectionsClient contains the methods for the ExpressRouteCrossConnections group. +// Don't use this type directly, use NewExpressRouteCrossConnectionsClient() instead. +type ExpressRouteCrossConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteCrossConnectionsClient creates a new instance of ExpressRouteCrossConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteCrossConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCrossConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteCrossConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Update the specified ExpressRouteCrossConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - parameters - Parameters supplied to the update express route crossConnection operation. +// - options - ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate +// method. +func (client *ExpressRouteCrossConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection, options *ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, crossConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Update the specified ExpressRouteCrossConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCrossConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection, options *ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, crossConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExpressRouteCrossConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection, options *ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if crossConnectionName == "" { + return nil, errors.New("parameter crossConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets details about the specified ExpressRouteCrossConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group (peering location of the circuit). +// - crossConnectionName - The name of the ExpressRouteCrossConnection (service key of the circuit). +// - options - ExpressRouteCrossConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.Get +// method. +func (client *ExpressRouteCrossConnectionsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionsClientGetOptions) (ExpressRouteCrossConnectionsClientGetResponse, error) { + var err error + const operationName = "ExpressRouteCrossConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, crossConnectionName, options) + if err != nil { + return ExpressRouteCrossConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteCrossConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteCrossConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRouteCrossConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if crossConnectionName == "" { + return nil, errors.New("parameter crossConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRouteCrossConnectionsClient) getHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientGetResponse, error) { + result := ExpressRouteCrossConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnection); err != nil { + return ExpressRouteCrossConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Retrieves all the ExpressRouteCrossConnections in a subscription. +// +// Generated from API version 2024-05-01 +// - options - ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListPager +// method. +func (client *ExpressRouteCrossConnectionsClient) NewListPager(options *ExpressRouteCrossConnectionsClientListOptions) *runtime.Pager[ExpressRouteCrossConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRouteCrossConnectionsClientListResponse]{ + More: func(page ExpressRouteCrossConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionsClientListResponse) (ExpressRouteCrossConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCrossConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return ExpressRouteCrossConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteCrossConnectionsClient) listCreateRequest(ctx context.Context, options *ExpressRouteCrossConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteCrossConnectionsClient) listHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientListResponse, error) { + result := ExpressRouteCrossConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionListResult); err != nil { + return ExpressRouteCrossConnectionsClientListResponse{}, err + } + return result, nil +} + +// BeginListArpTable - Gets the currently advertised ARP table associated with the express route cross connection in a resource +// group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCrossConnectionsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListArpTable +// method. +func (client *ExpressRouteCrossConnectionsClient) BeginListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListArpTableOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientListArpTableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listArpTable(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientListArpTableResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionsClientListArpTableResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListArpTable - Gets the currently advertised ARP table associated with the express route cross connection in a resource +// group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCrossConnectionsClient) listArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListArpTableOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCrossConnectionsClient.BeginListArpTable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listArpTableCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listArpTableCreateRequest creates the ListArpTable request. +func (client *ExpressRouteCrossConnectionsClient) listArpTableCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListArpTableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if crossConnectionName == "" { + return nil, errors.New("parameter crossConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if devicePath == "" { + return nil, errors.New("parameter devicePath cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListByResourceGroupPager - Retrieves all the ExpressRouteCrossConnections in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager +// method. +func (client *ExpressRouteCrossConnectionsClient) NewListByResourceGroupPager(resourceGroupName string, options *ExpressRouteCrossConnectionsClientListByResourceGroupOptions) *runtime.Pager[ExpressRouteCrossConnectionsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRouteCrossConnectionsClientListByResourceGroupResponse]{ + More: func(page ExpressRouteCrossConnectionsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionsClientListByResourceGroupResponse) (ExpressRouteCrossConnectionsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ExpressRouteCrossConnectionsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ExpressRouteCrossConnectionsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ExpressRouteCrossConnectionsClient) listByResourceGroupHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientListByResourceGroupResponse, error) { + result := ExpressRouteCrossConnectionsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionListResult); err != nil { + return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginListRoutesTable - Gets the currently advertised routes table associated with the express route cross connection in +// a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTable +// method. +func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientListRoutesTableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listRoutesTable(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientListRoutesTableResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionsClientListRoutesTableResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListRoutesTable - Gets the currently advertised routes table associated with the express route cross connection in a resource +// group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCrossConnectionsClient) listRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCrossConnectionsClient.BeginListRoutesTable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listRoutesTableCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listRoutesTableCreateRequest creates the ListRoutesTable request. +func (client *ExpressRouteCrossConnectionsClient) listRoutesTableCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if crossConnectionName == "" { + return nil, errors.New("parameter crossConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if devicePath == "" { + return nil, errors.New("parameter devicePath cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginListRoutesTableSummary - Gets the route table summary associated with the express route cross connection in a resource +// group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the +// ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary method. +func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listRoutesTableSummary(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListRoutesTableSummary - Gets the route table summary associated with the express route cross connection in a resource +// group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteCrossConnectionsClient) listRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listRoutesTableSummaryCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listRoutesTableSummaryCreateRequest creates the ListRoutesTableSummary request. +func (client *ExpressRouteCrossConnectionsClient) listRoutesTableSummaryCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if crossConnectionName == "" { + return nil, errors.New("parameter crossConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if devicePath == "" { + return nil, errors.New("parameter devicePath cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{devicePath}", url.PathEscape(devicePath)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// UpdateTags - Updates an express route cross connection tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the cross connection. +// - crossConnectionParameters - Parameters supplied to update express route cross connection tags. +// - options - ExpressRouteCrossConnectionsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.UpdateTags +// method. +func (client *ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject, options *ExpressRouteCrossConnectionsClientUpdateTagsOptions) (ExpressRouteCrossConnectionsClientUpdateTagsResponse, error) { + var err error + const operationName = "ExpressRouteCrossConnectionsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, crossConnectionName, crossConnectionParameters, options) + if err != nil { + return ExpressRouteCrossConnectionsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteCrossConnectionsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteCrossConnectionsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *ExpressRouteCrossConnectionsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject, options *ExpressRouteCrossConnectionsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if crossConnectionName == "" { + return nil, errors.New("parameter crossConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{crossConnectionName}", url.PathEscape(crossConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, crossConnectionParameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *ExpressRouteCrossConnectionsClient) updateTagsHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientUpdateTagsResponse, error) { + result := ExpressRouteCrossConnectionsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnection); err != nil { + return ExpressRouteCrossConnectionsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutegateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutegateways_client.go new file mode 100644 index 00000000..952e5af3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutegateways_client.go @@ -0,0 +1,466 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteGatewaysClient contains the methods for the ExpressRouteGateways group. +// Don't use this type directly, use NewExpressRouteGatewaysClient() instead. +type ExpressRouteGatewaysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteGatewaysClient creates a new instance of ExpressRouteGatewaysClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteGatewaysClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteGatewaysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a ExpressRoute gateway in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - putExpressRouteGatewayParameters - Parameters required in an ExpressRoute gateway PUT operation. +// - options - ExpressRouteGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginCreateOrUpdate +// method. +func (client *ExpressRouteGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway, options *ExpressRouteGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a ExpressRoute gateway in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway, options *ExpressRouteGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteGatewaysClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExpressRouteGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway, options *ExpressRouteGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRouteGatewayName == "" { + return nil, errors.New("parameter expressRouteGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, putExpressRouteGatewayParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only +// be deleted when there are no connection subresources. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - options - ExpressRouteGatewaysClientBeginDeleteOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginDelete +// method. +func (client *ExpressRouteGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, expressRouteGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteGatewaysClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted +// when there are no connection subresources. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteGatewaysClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ExpressRouteGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRouteGatewayName == "" { + return nil, errors.New("parameter expressRouteGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Fetches the details of a ExpressRoute gateway in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - options - ExpressRouteGatewaysClientGetOptions contains the optional parameters for the ExpressRouteGatewaysClient.Get +// method. +func (client *ExpressRouteGatewaysClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientGetOptions) (ExpressRouteGatewaysClientGetResponse, error) { + var err error + const operationName = "ExpressRouteGatewaysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, options) + if err != nil { + return ExpressRouteGatewaysClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteGatewaysClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteGatewaysClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRouteGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRouteGatewayName == "" { + return nil, errors.New("parameter expressRouteGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRouteGatewaysClient) getHandleResponse(resp *http.Response) (ExpressRouteGatewaysClientGetResponse, error) { + result := ExpressRouteGatewaysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteGateway); err != nil { + return ExpressRouteGatewaysClientGetResponse{}, err + } + return result, nil +} + +// ListByResourceGroup - Lists ExpressRoute gateways in a given resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - ExpressRouteGatewaysClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListByResourceGroup +// method. +func (client *ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, options *ExpressRouteGatewaysClientListByResourceGroupOptions) (ExpressRouteGatewaysClientListByResourceGroupResponse, error) { + var err error + const operationName = "ExpressRouteGatewaysClient.ListByResourceGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + if err != nil { + return ExpressRouteGatewaysClientListByResourceGroupResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteGatewaysClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteGatewaysClientListByResourceGroupResponse{}, err + } + resp, err := client.listByResourceGroupHandleResponse(httpResp) + return resp, err +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ExpressRouteGatewaysClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ExpressRouteGatewaysClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ExpressRouteGatewaysClient) listByResourceGroupHandleResponse(resp *http.Response) (ExpressRouteGatewaysClientListByResourceGroupResponse, error) { + result := ExpressRouteGatewaysClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteGatewayList); err != nil { + return ExpressRouteGatewaysClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// ListBySubscription - Lists ExpressRoute gateways under a given subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - options - ExpressRouteGatewaysClientListBySubscriptionOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListBySubscription +// method. +func (client *ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context, options *ExpressRouteGatewaysClientListBySubscriptionOptions) (ExpressRouteGatewaysClientListBySubscriptionResponse, error) { + var err error + const operationName = "ExpressRouteGatewaysClient.ListBySubscription" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listBySubscriptionCreateRequest(ctx, options) + if err != nil { + return ExpressRouteGatewaysClientListBySubscriptionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteGatewaysClientListBySubscriptionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteGatewaysClientListBySubscriptionResponse{}, err + } + resp, err := client.listBySubscriptionHandleResponse(httpResp) + return resp, err +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *ExpressRouteGatewaysClient) listBySubscriptionCreateRequest(ctx context.Context, options *ExpressRouteGatewaysClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *ExpressRouteGatewaysClient) listBySubscriptionHandleResponse(resp *http.Response) (ExpressRouteGatewaysClientListBySubscriptionResponse, error) { + result := ExpressRouteGatewaysClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteGatewayList); err != nil { + return ExpressRouteGatewaysClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// BeginUpdateTags - Updates express route gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the ExpressRouteGateway. +// - expressRouteGatewayName - The name of the gateway. +// - expressRouteGatewayParameters - Parameters supplied to update a virtual wan express route gateway tags. +// - options - ExpressRouteGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginUpdateTags +// method. +func (client *ExpressRouteGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject, options *ExpressRouteGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[ExpressRouteGatewaysClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, expressRouteGatewayName, expressRouteGatewayParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRouteGatewaysClientUpdateTagsResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRouteGatewaysClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateTags - Updates express route gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRouteGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject, options *ExpressRouteGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRouteGatewaysClient.BeginUpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, expressRouteGatewayParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *ExpressRouteGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject, options *ExpressRouteGatewaysClientBeginUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRouteGatewayName == "" { + return nil, errors.New("parameter expressRouteGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRouteGatewayName}", url.PathEscape(expressRouteGatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, expressRouteGatewayParameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutelinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutelinks_client.go new file mode 100644 index 00000000..71c1f29e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressroutelinks_client.go @@ -0,0 +1,179 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteLinksClient contains the methods for the ExpressRouteLinks group. +// Don't use this type directly, use NewExpressRouteLinksClient() instead. +type ExpressRouteLinksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteLinksClient creates a new instance of ExpressRouteLinksClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteLinksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteLinksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Retrieves the specified ExpressRouteLink resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the ExpressRoutePort resource. +// - linkName - The name of the ExpressRouteLink resource. +// - options - ExpressRouteLinksClientGetOptions contains the optional parameters for the ExpressRouteLinksClient.Get method. +func (client *ExpressRouteLinksClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string, options *ExpressRouteLinksClientGetOptions) (ExpressRouteLinksClientGetResponse, error) { + var err error + const operationName = "ExpressRouteLinksClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, expressRoutePortName, linkName, options) + if err != nil { + return ExpressRouteLinksClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteLinksClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteLinksClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRouteLinksClient) getCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string, options *ExpressRouteLinksClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + if linkName == "" { + return nil, errors.New("parameter linkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkName}", url.PathEscape(linkName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRouteLinksClient) getHandleResponse(resp *http.Response) (ExpressRouteLinksClientGetResponse, error) { + result := ExpressRouteLinksClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteLink); err != nil { + return ExpressRouteLinksClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the ExpressRoutePort resource. +// - options - ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.NewListPager +// method. +func (client *ExpressRouteLinksClient) NewListPager(resourceGroupName string, expressRoutePortName string, options *ExpressRouteLinksClientListOptions) *runtime.Pager[ExpressRouteLinksClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRouteLinksClientListResponse]{ + More: func(page ExpressRouteLinksClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRouteLinksClientListResponse) (ExpressRouteLinksClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteLinksClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) + }, nil) + if err != nil { + return ExpressRouteLinksClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteLinksClient) listCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRouteLinksClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteLinksClient) listHandleResponse(resp *http.Response) (ExpressRouteLinksClientListResponse, error) { + result := ExpressRouteLinksClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteLinkListResult); err != nil { + return ExpressRouteLinksClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteportauthorizations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteportauthorizations_client.go new file mode 100644 index 00000000..b75717de --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteportauthorizations_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRoutePortAuthorizationsClient contains the methods for the ExpressRoutePortAuthorizations group. +// Don't use this type directly, use NewExpressRoutePortAuthorizationsClient() instead. +type ExpressRoutePortAuthorizationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRoutePortAuthorizationsClient creates a new instance of ExpressRoutePortAuthorizationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRoutePortAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortAuthorizationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRoutePortAuthorizationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an authorization in the specified express route port. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the express route port. +// - authorizationName - The name of the authorization. +// - authorizationParameters - Parameters supplied to the create or update express route port authorization operation. +// - options - ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate +// method. +func (client *ExpressRoutePortAuthorizationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, authorizationParameters ExpressRoutePortAuthorization, options *ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRoutePortName, authorizationName, authorizationParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an authorization in the specified express route port. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRoutePortAuthorizationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, authorizationParameters ExpressRoutePortAuthorization, options *ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRoutePortName, authorizationName, authorizationParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExpressRoutePortAuthorizationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, authorizationParameters ExpressRoutePortAuthorization, options *ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + if authorizationName == "" { + return nil, errors.New("parameter authorizationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, authorizationParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified authorization from the specified express route port. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the express route port. +// - authorizationName - The name of the authorization. +// - options - ExpressRoutePortAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginDelete +// method. +func (client *ExpressRoutePortAuthorizationsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientBeginDeleteOptions) (*runtime.Poller[ExpressRoutePortAuthorizationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, expressRoutePortName, authorizationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRoutePortAuthorizationsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRoutePortAuthorizationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified authorization from the specified express route port. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRoutePortAuthorizationsClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRoutePortAuthorizationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRoutePortName, authorizationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ExpressRoutePortAuthorizationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + if authorizationName == "" { + return nil, errors.New("parameter authorizationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified authorization from the specified express route port. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the express route port. +// - authorizationName - The name of the authorization. +// - options - ExpressRoutePortAuthorizationsClientGetOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.Get +// method. +func (client *ExpressRoutePortAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientGetOptions) (ExpressRoutePortAuthorizationsClientGetResponse, error) { + var err error + const operationName = "ExpressRoutePortAuthorizationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, expressRoutePortName, authorizationName, options) + if err != nil { + return ExpressRoutePortAuthorizationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRoutePortAuthorizationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRoutePortAuthorizationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRoutePortAuthorizationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + if authorizationName == "" { + return nil, errors.New("parameter authorizationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{authorizationName}", url.PathEscape(authorizationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRoutePortAuthorizationsClient) getHandleResponse(resp *http.Response) (ExpressRoutePortAuthorizationsClientGetResponse, error) { + result := ExpressRoutePortAuthorizationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortAuthorization); err != nil { + return ExpressRoutePortAuthorizationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all authorizations in an express route port. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the express route port. +// - options - ExpressRoutePortAuthorizationsClientListOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.NewListPager +// method. +func (client *ExpressRoutePortAuthorizationsClient) NewListPager(resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortAuthorizationsClientListOptions) *runtime.Pager[ExpressRoutePortAuthorizationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortAuthorizationsClientListResponse]{ + More: func(page ExpressRoutePortAuthorizationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRoutePortAuthorizationsClientListResponse) (ExpressRoutePortAuthorizationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRoutePortAuthorizationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) + }, nil) + if err != nil { + return ExpressRoutePortAuthorizationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRoutePortAuthorizationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortAuthorizationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRoutePortAuthorizationsClient) listHandleResponse(resp *http.Response) (ExpressRoutePortAuthorizationsClientListResponse, error) { + result := ExpressRoutePortAuthorizationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortAuthorizationListResult); err != nil { + return ExpressRoutePortAuthorizationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteports_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteports_client.go new file mode 100644 index 00000000..6f39f008 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteports_client.go @@ -0,0 +1,520 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRoutePortsClient contains the methods for the ExpressRoutePorts group. +// Don't use this type directly, use NewExpressRoutePortsClient() instead. +type ExpressRoutePortsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRoutePortsClient creates a new instance of ExpressRoutePortsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRoutePortsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRoutePortsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified ExpressRoutePort resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the ExpressRoutePort resource. +// - parameters - Parameters supplied to the create ExpressRoutePort operation. +// - options - ExpressRoutePortsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortsClient.BeginCreateOrUpdate +// method. +func (client *ExpressRoutePortsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort, options *ExpressRoutePortsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRoutePortsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRoutePortName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRoutePortsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRoutePortsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified ExpressRoutePort resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRoutePortsClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort, options *ExpressRoutePortsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRoutePortsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRoutePortName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ExpressRoutePortsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort, options *ExpressRoutePortsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified ExpressRoutePort resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the ExpressRoutePort resource. +// - options - ExpressRoutePortsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortsClient.BeginDelete +// method. +func (client *ExpressRoutePortsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientBeginDeleteOptions) (*runtime.Poller[ExpressRoutePortsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, expressRoutePortName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ExpressRoutePortsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ExpressRoutePortsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified ExpressRoutePort resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ExpressRoutePortsClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ExpressRoutePortsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ExpressRoutePortsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GenerateLOA - Generate a letter of authorization for the requested ExpressRoutePort resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of ExpressRoutePort. +// - request - Request parameters supplied to generate a letter of authorization. +// - options - ExpressRoutePortsClientGenerateLOAOptions contains the optional parameters for the ExpressRoutePortsClient.GenerateLOA +// method. +func (client *ExpressRoutePortsClient) GenerateLOA(ctx context.Context, resourceGroupName string, expressRoutePortName string, request GenerateExpressRoutePortsLOARequest, options *ExpressRoutePortsClientGenerateLOAOptions) (ExpressRoutePortsClientGenerateLOAResponse, error) { + var err error + const operationName = "ExpressRoutePortsClient.GenerateLOA" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateLOACreateRequest(ctx, resourceGroupName, expressRoutePortName, request, options) + if err != nil { + return ExpressRoutePortsClientGenerateLOAResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRoutePortsClientGenerateLOAResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRoutePortsClientGenerateLOAResponse{}, err + } + resp, err := client.generateLOAHandleResponse(httpResp) + return resp, err +} + +// generateLOACreateRequest creates the GenerateLOA request. +func (client *ExpressRoutePortsClient) generateLOACreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, request GenerateExpressRoutePortsLOARequest, options *ExpressRoutePortsClientGenerateLOAOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/generateLoa" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// generateLOAHandleResponse handles the GenerateLOA response. +func (client *ExpressRoutePortsClient) generateLOAHandleResponse(resp *http.Response) (ExpressRoutePortsClientGenerateLOAResponse, error) { + result := ExpressRoutePortsClientGenerateLOAResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GenerateExpressRoutePortsLOAResult); err != nil { + return ExpressRoutePortsClientGenerateLOAResponse{}, err + } + return result, nil +} + +// Get - Retrieves the requested ExpressRoutePort resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of ExpressRoutePort. +// - options - ExpressRoutePortsClientGetOptions contains the optional parameters for the ExpressRoutePortsClient.Get method. +func (client *ExpressRoutePortsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientGetOptions) (ExpressRoutePortsClientGetResponse, error) { + var err error + const operationName = "ExpressRoutePortsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) + if err != nil { + return ExpressRoutePortsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRoutePortsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRoutePortsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRoutePortsClient) getCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRoutePortsClient) getHandleResponse(resp *http.Response) (ExpressRoutePortsClientGetResponse, error) { + result := ExpressRoutePortsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePort); err != nil { + return ExpressRoutePortsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all the ExpressRoutePort resources in the specified subscription. +// +// Generated from API version 2024-05-01 +// - options - ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.NewListPager +// method. +func (client *ExpressRoutePortsClient) NewListPager(options *ExpressRoutePortsClientListOptions) *runtime.Pager[ExpressRoutePortsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortsClientListResponse]{ + More: func(page ExpressRoutePortsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRoutePortsClientListResponse) (ExpressRoutePortsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRoutePortsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return ExpressRoutePortsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRoutePortsClient) listCreateRequest(ctx context.Context, options *ExpressRoutePortsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRoutePortsClient) listHandleResponse(resp *http.Response) (ExpressRoutePortsClientListResponse, error) { + result := ExpressRoutePortsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortListResult); err != nil { + return ExpressRoutePortsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - List all the ExpressRoutePort resources in the specified resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.NewListByResourceGroupPager +// method. +func (client *ExpressRoutePortsClient) NewListByResourceGroupPager(resourceGroupName string, options *ExpressRoutePortsClientListByResourceGroupOptions) *runtime.Pager[ExpressRoutePortsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortsClientListByResourceGroupResponse]{ + More: func(page ExpressRoutePortsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRoutePortsClientListByResourceGroupResponse) (ExpressRoutePortsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRoutePortsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ExpressRoutePortsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ExpressRoutePortsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ExpressRoutePortsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ExpressRoutePortsClient) listByResourceGroupHandleResponse(resp *http.Response) (ExpressRoutePortsClientListByResourceGroupResponse, error) { + result := ExpressRoutePortsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortListResult); err != nil { + return ExpressRoutePortsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Update ExpressRoutePort tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the ExpressRoutePort resource. +// - parameters - Parameters supplied to update ExpressRoutePort resource tags. +// - options - ExpressRoutePortsClientUpdateTagsOptions contains the optional parameters for the ExpressRoutePortsClient.UpdateTags +// method. +func (client *ExpressRoutePortsClient) UpdateTags(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject, options *ExpressRoutePortsClientUpdateTagsOptions) (ExpressRoutePortsClientUpdateTagsResponse, error) { + var err error + const operationName = "ExpressRoutePortsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, expressRoutePortName, parameters, options) + if err != nil { + return ExpressRoutePortsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRoutePortsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRoutePortsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *ExpressRoutePortsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject, options *ExpressRoutePortsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if expressRoutePortName == "" { + return nil, errors.New("parameter expressRoutePortName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{expressRoutePortName}", url.PathEscape(expressRoutePortName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *ExpressRoutePortsClient) updateTagsHandleResponse(resp *http.Response) (ExpressRoutePortsClientUpdateTagsResponse, error) { + result := ExpressRoutePortsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePort); err != nil { + return ExpressRoutePortsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteportslocations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteportslocations_client.go new file mode 100644 index 00000000..917531a0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteportslocations_client.go @@ -0,0 +1,162 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRoutePortsLocationsClient contains the methods for the ExpressRoutePortsLocations group. +// Don't use this type directly, use NewExpressRoutePortsLocationsClient() instead. +type ExpressRoutePortsLocationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRoutePortsLocationsClient creates a new instance of ExpressRoutePortsLocationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRoutePortsLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortsLocationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRoutePortsLocationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said +// peering location. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - locationName - Name of the requested ExpressRoutePort peering location. +// - options - ExpressRoutePortsLocationsClientGetOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.Get +// method. +func (client *ExpressRoutePortsLocationsClient) Get(ctx context.Context, locationName string, options *ExpressRoutePortsLocationsClientGetOptions) (ExpressRoutePortsLocationsClientGetResponse, error) { + var err error + const operationName = "ExpressRoutePortsLocationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, locationName, options) + if err != nil { + return ExpressRoutePortsLocationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRoutePortsLocationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRoutePortsLocationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExpressRoutePortsLocationsClient) getCreateRequest(ctx context.Context, locationName string, options *ExpressRoutePortsLocationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if locationName == "" { + return nil, errors.New("parameter locationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{locationName}", url.PathEscape(locationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExpressRoutePortsLocationsClient) getHandleResponse(resp *http.Response) (ExpressRoutePortsLocationsClientGetResponse, error) { + result := ExpressRoutePortsLocationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortsLocation); err != nil { + return ExpressRoutePortsLocationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. +// Available bandwidths can only be obtained when retrieving a specific peering location. +// +// Generated from API version 2024-05-01 +// - options - ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.NewListPager +// method. +func (client *ExpressRoutePortsLocationsClient) NewListPager(options *ExpressRoutePortsLocationsClientListOptions) *runtime.Pager[ExpressRoutePortsLocationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortsLocationsClientListResponse]{ + More: func(page ExpressRoutePortsLocationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRoutePortsLocationsClientListResponse) (ExpressRoutePortsLocationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRoutePortsLocationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return ExpressRoutePortsLocationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRoutePortsLocationsClient) listCreateRequest(ctx context.Context, options *ExpressRoutePortsLocationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRoutePortsLocationsClient) listHandleResponse(resp *http.Response) (ExpressRoutePortsLocationsClientListResponse, error) { + result := ExpressRoutePortsLocationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortsLocationListResult); err != nil { + return ExpressRoutePortsLocationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteproviderportslocation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteproviderportslocation_client.go new file mode 100644 index 00000000..7967c35d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteproviderportslocation_client.go @@ -0,0 +1,103 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteProviderPortsLocationClient contains the methods for the ExpressRouteProviderPortsLocation group. +// Don't use this type directly, use NewExpressRouteProviderPortsLocationClient() instead. +type ExpressRouteProviderPortsLocationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteProviderPortsLocationClient creates a new instance of ExpressRouteProviderPortsLocationClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteProviderPortsLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteProviderPortsLocationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteProviderPortsLocationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// List - Retrieves all the ExpressRouteProviderPorts in a subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - options - ExpressRouteProviderPortsLocationClientListOptions contains the optional parameters for the ExpressRouteProviderPortsLocationClient.List +// method. +func (client *ExpressRouteProviderPortsLocationClient) List(ctx context.Context, options *ExpressRouteProviderPortsLocationClientListOptions) (ExpressRouteProviderPortsLocationClientListResponse, error) { + var err error + const operationName = "ExpressRouteProviderPortsLocationClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, options) + if err != nil { + return ExpressRouteProviderPortsLocationClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExpressRouteProviderPortsLocationClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ExpressRouteProviderPortsLocationClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteProviderPortsLocationClient) listCreateRequest(ctx context.Context, options *ExpressRouteProviderPortsLocationClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteProviderPortsLocationClient) listHandleResponse(resp *http.Response) (ExpressRouteProviderPortsLocationClientListResponse, error) { + result := ExpressRouteProviderPortsLocationClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteProviderPortListResult); err != nil { + return ExpressRouteProviderPortsLocationClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteserviceproviders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteserviceproviders_client.go new file mode 100644 index 00000000..903af3f3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/expressrouteserviceproviders_client.go @@ -0,0 +1,100 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteServiceProvidersClient contains the methods for the ExpressRouteServiceProviders group. +// Don't use this type directly, use NewExpressRouteServiceProvidersClient() instead. +type ExpressRouteServiceProvidersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExpressRouteServiceProvidersClient creates a new instance of ExpressRouteServiceProvidersClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExpressRouteServiceProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteServiceProvidersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExpressRouteServiceProvidersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets all the available express route service providers. +// +// Generated from API version 2024-05-01 +// - options - ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.NewListPager +// method. +func (client *ExpressRouteServiceProvidersClient) NewListPager(options *ExpressRouteServiceProvidersClientListOptions) *runtime.Pager[ExpressRouteServiceProvidersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ExpressRouteServiceProvidersClientListResponse]{ + More: func(page ExpressRouteServiceProvidersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ExpressRouteServiceProvidersClientListResponse) (ExpressRouteServiceProvidersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ExpressRouteServiceProvidersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return ExpressRouteServiceProvidersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteServiceProvidersClient) listCreateRequest(ctx context.Context, options *ExpressRouteServiceProvidersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteServiceProvidersClient) listHandleResponse(resp *http.Response) (ExpressRouteServiceProvidersClientListResponse, error) { + result := ExpressRouteServiceProvidersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteServiceProviderListResult); err != nil { + return ExpressRouteServiceProvidersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicies_client.go new file mode 100644 index 00000000..f36b3f47 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicies_client.go @@ -0,0 +1,454 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FirewallPoliciesClient contains the methods for the FirewallPolicies group. +// Don't use this type directly, use NewFirewallPoliciesClient() instead. +type FirewallPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFirewallPoliciesClient creates a new instance of FirewallPoliciesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FirewallPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified Firewall Policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - parameters - Parameters supplied to the create or update Firewall Policy operation. +// - options - FirewallPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPoliciesClient.BeginCreateOrUpdate +// method. +func (client *FirewallPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy, options *FirewallPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, firewallPolicyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallPoliciesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified Firewall Policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *FirewallPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy, options *FirewallPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FirewallPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FirewallPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy, options *FirewallPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified Firewall Policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the FirewallPoliciesClient.BeginDelete +// method. +func (client *FirewallPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientBeginDeleteOptions) (*runtime.Poller[FirewallPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, firewallPolicyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallPoliciesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified Firewall Policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *FirewallPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FirewallPoliciesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FirewallPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Firewall Policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPoliciesClientGetOptions contains the optional parameters for the FirewallPoliciesClient.Get method. +func (client *FirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientGetOptions) (FirewallPoliciesClientGetResponse, error) { + var err error + const operationName = "FirewallPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) + if err != nil { + return FirewallPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FirewallPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FirewallPoliciesClient) getHandleResponse(resp *http.Response) (FirewallPoliciesClientGetResponse, error) { + result := FirewallPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicy); err != nil { + return FirewallPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all Firewall Policies in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.NewListPager +// method. +func (client *FirewallPoliciesClient) NewListPager(resourceGroupName string, options *FirewallPoliciesClientListOptions) *runtime.Pager[FirewallPoliciesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FirewallPoliciesClientListResponse]{ + More: func(page FirewallPoliciesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FirewallPoliciesClientListResponse) (FirewallPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FirewallPoliciesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return FirewallPoliciesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *FirewallPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *FirewallPoliciesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FirewallPoliciesClient) listHandleResponse(resp *http.Response) (FirewallPoliciesClientListResponse, error) { + result := FirewallPoliciesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyListResult); err != nil { + return FirewallPoliciesClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the Firewall Policies in a subscription. +// +// Generated from API version 2024-05-01 +// - options - FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.NewListAllPager +// method. +func (client *FirewallPoliciesClient) NewListAllPager(options *FirewallPoliciesClientListAllOptions) *runtime.Pager[FirewallPoliciesClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[FirewallPoliciesClientListAllResponse]{ + More: func(page FirewallPoliciesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FirewallPoliciesClientListAllResponse) (FirewallPoliciesClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FirewallPoliciesClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return FirewallPoliciesClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *FirewallPoliciesClient) listAllCreateRequest(ctx context.Context, options *FirewallPoliciesClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *FirewallPoliciesClient) listAllHandleResponse(resp *http.Response) (FirewallPoliciesClientListAllResponse, error) { + result := FirewallPoliciesClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyListResult); err != nil { + return FirewallPoliciesClientListAllResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates tags of a Azure Firewall Policy resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - parameters - Parameters supplied to update Azure Firewall Policy tags. +// - options - FirewallPoliciesClientUpdateTagsOptions contains the optional parameters for the FirewallPoliciesClient.UpdateTags +// method. +func (client *FirewallPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters TagsObject, options *FirewallPoliciesClientUpdateTagsOptions) (FirewallPoliciesClientUpdateTagsResponse, error) { + var err error + const operationName = "FirewallPoliciesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) + if err != nil { + return FirewallPoliciesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPoliciesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPoliciesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *FirewallPoliciesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters TagsObject, options *FirewallPoliciesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *FirewallPoliciesClient) updateTagsHandleResponse(resp *http.Response) (FirewallPoliciesClientUpdateTagsResponse, error) { + result := FirewallPoliciesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicy); err != nil { + return FirewallPoliciesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicydeployments_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicydeployments_client.go new file mode 100644 index 00000000..8d83c781 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicydeployments_client.go @@ -0,0 +1,122 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FirewallPolicyDeploymentsClient contains the methods for the FirewallPolicyDeployments group. +// Don't use this type directly, use NewFirewallPolicyDeploymentsClient() instead. +type FirewallPolicyDeploymentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFirewallPolicyDeploymentsClient creates a new instance of FirewallPolicyDeploymentsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFirewallPolicyDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyDeploymentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FirewallPolicyDeploymentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginDeploy - Deploys the firewall policy draft and child rule collection group drafts. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyDeploymentsClientBeginDeployOptions contains the optional parameters for the FirewallPolicyDeploymentsClient.BeginDeploy +// method. +func (client *FirewallPolicyDeploymentsClient) BeginDeploy(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyDeploymentsClientBeginDeployOptions) (*runtime.Poller[FirewallPolicyDeploymentsClientDeployResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deploy(ctx, resourceGroupName, firewallPolicyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallPolicyDeploymentsClientDeployResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallPolicyDeploymentsClientDeployResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Deploy - Deploys the firewall policy draft and child rule collection group drafts. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *FirewallPolicyDeploymentsClient) deploy(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyDeploymentsClientBeginDeployOptions) (*http.Response, error) { + var err error + const operationName = "FirewallPolicyDeploymentsClient.BeginDeploy" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deployCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deployCreateRequest creates the Deploy request. +func (client *FirewallPolicyDeploymentsClient) deployCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyDeploymentsClientBeginDeployOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/deploy" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicydrafts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicydrafts_client.go new file mode 100644 index 00000000..30bd0cf2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicydrafts_client.go @@ -0,0 +1,234 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FirewallPolicyDraftsClient contains the methods for the FirewallPolicyDrafts group. +// Don't use this type directly, use NewFirewallPolicyDraftsClient() instead. +type FirewallPolicyDraftsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFirewallPolicyDraftsClient creates a new instance of FirewallPolicyDraftsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFirewallPolicyDraftsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyDraftsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FirewallPolicyDraftsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or update a draft Firewall Policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - parameters - Parameters supplied to the create or update Firewall Policy Draft operation. +// - options - FirewallPolicyDraftsClientCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyDraftsClient.CreateOrUpdate +// method. +func (client *FirewallPolicyDraftsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicyDraft, options *FirewallPolicyDraftsClientCreateOrUpdateOptions) (FirewallPolicyDraftsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "FirewallPolicyDraftsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) + if err != nil { + return FirewallPolicyDraftsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyDraftsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyDraftsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FirewallPolicyDraftsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicyDraft, options *FirewallPolicyDraftsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/firewallPolicyDrafts/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *FirewallPolicyDraftsClient) createOrUpdateHandleResponse(resp *http.Response) (FirewallPolicyDraftsClientCreateOrUpdateResponse, error) { + result := FirewallPolicyDraftsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyDraft); err != nil { + return FirewallPolicyDraftsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete a draft policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyDraftsClientDeleteOptions contains the optional parameters for the FirewallPolicyDraftsClient.Delete +// method. +func (client *FirewallPolicyDraftsClient) Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyDraftsClientDeleteOptions) (FirewallPolicyDraftsClientDeleteResponse, error) { + var err error + const operationName = "FirewallPolicyDraftsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) + if err != nil { + return FirewallPolicyDraftsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyDraftsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyDraftsClientDeleteResponse{}, err + } + return FirewallPolicyDraftsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FirewallPolicyDraftsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyDraftsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/firewallPolicyDrafts/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a draft Firewall Policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyDraftsClientGetOptions contains the optional parameters for the FirewallPolicyDraftsClient.Get +// method. +func (client *FirewallPolicyDraftsClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyDraftsClientGetOptions) (FirewallPolicyDraftsClientGetResponse, error) { + var err error + const operationName = "FirewallPolicyDraftsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) + if err != nil { + return FirewallPolicyDraftsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyDraftsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyDraftsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FirewallPolicyDraftsClient) getCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyDraftsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/firewallPolicyDrafts/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FirewallPolicyDraftsClient) getHandleResponse(resp *http.Response) (FirewallPolicyDraftsClientGetResponse, error) { + result := FirewallPolicyDraftsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyDraft); err != nil { + return FirewallPolicyDraftsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyidpssignatures_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyidpssignatures_client.go new file mode 100644 index 00000000..f9209a0d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyidpssignatures_client.go @@ -0,0 +1,114 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FirewallPolicyIdpsSignaturesClient contains the methods for the FirewallPolicyIdpsSignatures group. +// Don't use this type directly, use NewFirewallPolicyIdpsSignaturesClient() instead. +type FirewallPolicyIdpsSignaturesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFirewallPolicyIdpsSignaturesClient creates a new instance of FirewallPolicyIdpsSignaturesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFirewallPolicyIdpsSignaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FirewallPolicyIdpsSignaturesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// List - Retrieves the current status of IDPS signatures for the relevant policy. Maximal amount of returned signatures is +// 1000. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyIdpsSignaturesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesClient.List +// method. +func (client *FirewallPolicyIdpsSignaturesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters IDPSQueryObject, options *FirewallPolicyIdpsSignaturesClientListOptions) (FirewallPolicyIdpsSignaturesClientListResponse, error) { + var err error + const operationName = "FirewallPolicyIdpsSignaturesClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) + if err != nil { + return FirewallPolicyIdpsSignaturesClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyIdpsSignaturesClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyIdpsSignaturesClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *FirewallPolicyIdpsSignaturesClient) listCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters IDPSQueryObject, options *FirewallPolicyIdpsSignaturesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsSignatures" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FirewallPolicyIdpsSignaturesClient) listHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesClientListResponse, error) { + result := FirewallPolicyIdpsSignaturesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.QueryResults); err != nil { + return FirewallPolicyIdpsSignaturesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyidpssignaturesfiltervalues_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyidpssignaturesfiltervalues_client.go new file mode 100644 index 00000000..e199e4a0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyidpssignaturesfiltervalues_client.go @@ -0,0 +1,113 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FirewallPolicyIdpsSignaturesFilterValuesClient contains the methods for the FirewallPolicyIdpsSignaturesFilterValues group. +// Don't use this type directly, use NewFirewallPolicyIdpsSignaturesFilterValuesClient() instead. +type FirewallPolicyIdpsSignaturesFilterValuesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFirewallPolicyIdpsSignaturesFilterValuesClient creates a new instance of FirewallPolicyIdpsSignaturesFilterValuesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFirewallPolicyIdpsSignaturesFilterValuesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesFilterValuesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FirewallPolicyIdpsSignaturesFilterValuesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// List - Retrieves the current filter values for the signatures overrides +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyIdpsSignaturesFilterValuesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesFilterValuesClient.List +// method. +func (client *FirewallPolicyIdpsSignaturesFilterValuesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignatureOverridesFilterValuesQuery, options *FirewallPolicyIdpsSignaturesFilterValuesClientListOptions) (FirewallPolicyIdpsSignaturesFilterValuesClientListResponse, error) { + var err error + const operationName = "FirewallPolicyIdpsSignaturesFilterValuesClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) + if err != nil { + return FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *FirewallPolicyIdpsSignaturesFilterValuesClient) listCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignatureOverridesFilterValuesQuery, options *FirewallPolicyIdpsSignaturesFilterValuesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsFilterOptions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FirewallPolicyIdpsSignaturesFilterValuesClient) listHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesFilterValuesClientListResponse, error) { + result := FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SignatureOverridesFilterValuesResponse); err != nil { + return FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyidpssignaturesoverrides_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyidpssignaturesoverrides_client.go new file mode 100644 index 00000000..1daa0d65 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyidpssignaturesoverrides_client.go @@ -0,0 +1,313 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FirewallPolicyIdpsSignaturesOverridesClient contains the methods for the FirewallPolicyIdpsSignaturesOverrides group. +// Don't use this type directly, use NewFirewallPolicyIdpsSignaturesOverridesClient() instead. +type FirewallPolicyIdpsSignaturesOverridesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFirewallPolicyIdpsSignaturesOverridesClient creates a new instance of FirewallPolicyIdpsSignaturesOverridesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFirewallPolicyIdpsSignaturesOverridesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesOverridesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FirewallPolicyIdpsSignaturesOverridesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Returns all signatures overrides for a specific policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyIdpsSignaturesOverridesClientGetOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Get +// method. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyIdpsSignaturesOverridesClientGetOptions) (FirewallPolicyIdpsSignaturesOverridesClientGetResponse, error) { + var err error + const operationName = "FirewallPolicyIdpsSignaturesOverridesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) + if err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyIdpsSignaturesOverridesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) getCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyIdpsSignaturesOverridesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) getHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientGetResponse, error) { + result := FirewallPolicyIdpsSignaturesOverridesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverrides); err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientGetResponse{}, err + } + return result, nil +} + +// List - Returns all signatures overrides objects for a specific policy as a list containing a single value. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyIdpsSignaturesOverridesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.List +// method. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyIdpsSignaturesOverridesClientListOptions) (FirewallPolicyIdpsSignaturesOverridesClientListResponse, error) { + var err error + const operationName = "FirewallPolicyIdpsSignaturesOverridesClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) + if err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyIdpsSignaturesOverridesClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) listCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyIdpsSignaturesOverridesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) listHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientListResponse, error) { + result := FirewallPolicyIdpsSignaturesOverridesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverridesList); err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientListResponse{}, err + } + return result, nil +} + +// Patch - Will update the status of policy's signature overrides for IDPS +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - parameters - Will contain all properties of the object to put +// - options - FirewallPolicyIdpsSignaturesOverridesClientPatchOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Patch +// method. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) Patch(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignaturesOverrides, options *FirewallPolicyIdpsSignaturesOverridesClientPatchOptions) (FirewallPolicyIdpsSignaturesOverridesClientPatchResponse, error) { + var err error + const operationName = "FirewallPolicyIdpsSignaturesOverridesClient.Patch" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.patchCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) + if err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{}, err + } + resp, err := client.patchHandleResponse(httpResp) + return resp, err +} + +// patchCreateRequest creates the Patch request. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) patchCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignaturesOverrides, options *FirewallPolicyIdpsSignaturesOverridesClientPatchOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// patchHandleResponse handles the Patch response. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) patchHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientPatchResponse, error) { + result := FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverrides); err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{}, err + } + return result, nil +} + +// Put - Will override/create a new signature overrides for the policy's IDPS +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - parameters - Will contain all properties of the object to put +// - options - FirewallPolicyIdpsSignaturesOverridesClientPutOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Put +// method. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) Put(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignaturesOverrides, options *FirewallPolicyIdpsSignaturesOverridesClientPutOptions) (FirewallPolicyIdpsSignaturesOverridesClientPutResponse, error) { + var err error + const operationName = "FirewallPolicyIdpsSignaturesOverridesClient.Put" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.putCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) + if err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientPutResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientPutResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyIdpsSignaturesOverridesClientPutResponse{}, err + } + resp, err := client.putHandleResponse(httpResp) + return resp, err +} + +// putCreateRequest creates the Put request. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) putCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignaturesOverrides, options *FirewallPolicyIdpsSignaturesOverridesClientPutOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// putHandleResponse handles the Put response. +func (client *FirewallPolicyIdpsSignaturesOverridesClient) putHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientPutResponse, error) { + result := FirewallPolicyIdpsSignaturesOverridesClientPutResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverrides); err != nil { + return FirewallPolicyIdpsSignaturesOverridesClientPutResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyrulecollectiongroupdrafts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyrulecollectiongroupdrafts_client.go new file mode 100644 index 00000000..742cf9a2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyrulecollectiongroupdrafts_client.go @@ -0,0 +1,249 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FirewallPolicyRuleCollectionGroupDraftsClient contains the methods for the FirewallPolicyRuleCollectionGroupDrafts group. +// Don't use this type directly, use NewFirewallPolicyRuleCollectionGroupDraftsClient() instead. +type FirewallPolicyRuleCollectionGroupDraftsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFirewallPolicyRuleCollectionGroupDraftsClient creates a new instance of FirewallPolicyRuleCollectionGroupDraftsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFirewallPolicyRuleCollectionGroupDraftsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyRuleCollectionGroupDraftsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FirewallPolicyRuleCollectionGroupDraftsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or Update Rule Collection Group Draft. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. +// - parameters - Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup operation. +// - options - FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupDraftsClient.CreateOrUpdate +// method. +func (client *FirewallPolicyRuleCollectionGroupDraftsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroupDraft, options *FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateOptions) (FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "FirewallPolicyRuleCollectionGroupDraftsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters, options) + if err != nil { + return FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FirewallPolicyRuleCollectionGroupDraftsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroupDraft, options *FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if ruleCollectionGroupName == "" { + return nil, errors.New("parameter ruleCollectionGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionGroupName}", url.PathEscape(ruleCollectionGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *FirewallPolicyRuleCollectionGroupDraftsClient) createOrUpdateHandleResponse(resp *http.Response) (FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateResponse, error) { + result := FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyRuleCollectionGroupDraft); err != nil { + return FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete Rule Collection Group Draft. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. +// - options - FirewallPolicyRuleCollectionGroupDraftsClientDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupDraftsClient.Delete +// method. +func (client *FirewallPolicyRuleCollectionGroupDraftsClient) Delete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupDraftsClientDeleteOptions) (FirewallPolicyRuleCollectionGroupDraftsClientDeleteResponse, error) { + var err error + const operationName = "FirewallPolicyRuleCollectionGroupDraftsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) + if err != nil { + return FirewallPolicyRuleCollectionGroupDraftsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyRuleCollectionGroupDraftsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyRuleCollectionGroupDraftsClientDeleteResponse{}, err + } + return FirewallPolicyRuleCollectionGroupDraftsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FirewallPolicyRuleCollectionGroupDraftsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupDraftsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if ruleCollectionGroupName == "" { + return nil, errors.New("parameter ruleCollectionGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionGroupName}", url.PathEscape(ruleCollectionGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get Rule Collection Group Draft. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. +// - options - FirewallPolicyRuleCollectionGroupDraftsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupDraftsClient.Get +// method. +func (client *FirewallPolicyRuleCollectionGroupDraftsClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupDraftsClientGetOptions) (FirewallPolicyRuleCollectionGroupDraftsClientGetResponse, error) { + var err error + const operationName = "FirewallPolicyRuleCollectionGroupDraftsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) + if err != nil { + return FirewallPolicyRuleCollectionGroupDraftsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyRuleCollectionGroupDraftsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyRuleCollectionGroupDraftsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FirewallPolicyRuleCollectionGroupDraftsClient) getCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupDraftsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}/ruleCollectionGroupDrafts/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if ruleCollectionGroupName == "" { + return nil, errors.New("parameter ruleCollectionGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionGroupName}", url.PathEscape(ruleCollectionGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FirewallPolicyRuleCollectionGroupDraftsClient) getHandleResponse(resp *http.Response) (FirewallPolicyRuleCollectionGroupDraftsClientGetResponse, error) { + result := FirewallPolicyRuleCollectionGroupDraftsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyRuleCollectionGroupDraft); err != nil { + return FirewallPolicyRuleCollectionGroupDraftsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyrulecollectiongroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyrulecollectiongroups_client.go new file mode 100644 index 00000000..67655c09 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/firewallpolicyrulecollectiongroups_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FirewallPolicyRuleCollectionGroupsClient contains the methods for the FirewallPolicyRuleCollectionGroups group. +// Don't use this type directly, use NewFirewallPolicyRuleCollectionGroupsClient() instead. +type FirewallPolicyRuleCollectionGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFirewallPolicyRuleCollectionGroupsClient creates a new instance of FirewallPolicyRuleCollectionGroupsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFirewallPolicyRuleCollectionGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyRuleCollectionGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FirewallPolicyRuleCollectionGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified FirewallPolicyRuleCollectionGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. +// - parameters - Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup operation. +// - options - FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate +// method. +func (client *FirewallPolicyRuleCollectionGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup, options *FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified FirewallPolicyRuleCollectionGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *FirewallPolicyRuleCollectionGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup, options *FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FirewallPolicyRuleCollectionGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup, options *FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if ruleCollectionGroupName == "" { + return nil, errors.New("parameter ruleCollectionGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionGroupName}", url.PathEscape(ruleCollectionGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified FirewallPolicyRuleCollectionGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. +// - options - FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginDelete +// method. +func (client *FirewallPolicyRuleCollectionGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions) (*runtime.Poller[FirewallPolicyRuleCollectionGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FirewallPolicyRuleCollectionGroupsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FirewallPolicyRuleCollectionGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified FirewallPolicyRuleCollectionGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *FirewallPolicyRuleCollectionGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FirewallPolicyRuleCollectionGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FirewallPolicyRuleCollectionGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if ruleCollectionGroupName == "" { + return nil, errors.New("parameter ruleCollectionGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionGroupName}", url.PathEscape(ruleCollectionGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified FirewallPolicyRuleCollectionGroup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. +// - options - FirewallPolicyRuleCollectionGroupsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.Get +// method. +func (client *FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientGetOptions) (FirewallPolicyRuleCollectionGroupsClientGetResponse, error) { + var err error + const operationName = "FirewallPolicyRuleCollectionGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) + if err != nil { + return FirewallPolicyRuleCollectionGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FirewallPolicyRuleCollectionGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FirewallPolicyRuleCollectionGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FirewallPolicyRuleCollectionGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if ruleCollectionGroupName == "" { + return nil, errors.New("parameter ruleCollectionGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionGroupName}", url.PathEscape(ruleCollectionGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FirewallPolicyRuleCollectionGroupsClient) getHandleResponse(resp *http.Response) (FirewallPolicyRuleCollectionGroupsClientGetResponse, error) { + result := FirewallPolicyRuleCollectionGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyRuleCollectionGroup); err != nil { + return FirewallPolicyRuleCollectionGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.NewListPager +// method. +func (client *FirewallPolicyRuleCollectionGroupsClient) NewListPager(resourceGroupName string, firewallPolicyName string, options *FirewallPolicyRuleCollectionGroupsClientListOptions) *runtime.Pager[FirewallPolicyRuleCollectionGroupsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FirewallPolicyRuleCollectionGroupsClientListResponse]{ + More: func(page FirewallPolicyRuleCollectionGroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FirewallPolicyRuleCollectionGroupsClientListResponse) (FirewallPolicyRuleCollectionGroupsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FirewallPolicyRuleCollectionGroupsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) + }, nil) + if err != nil { + return FirewallPolicyRuleCollectionGroupsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *FirewallPolicyRuleCollectionGroupsClient) listCreateRequest(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyRuleCollectionGroupsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if firewallPolicyName == "" { + return nil, errors.New("parameter firewallPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firewallPolicyName}", url.PathEscape(firewallPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FirewallPolicyRuleCollectionGroupsClient) listHandleResponse(resp *http.Response) (FirewallPolicyRuleCollectionGroupsClientListResponse, error) { + result := FirewallPolicyRuleCollectionGroupsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyRuleCollectionGroupListResult); err != nil { + return FirewallPolicyRuleCollectionGroupsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/flowlogs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/flowlogs_client.go new file mode 100644 index 00000000..18d8d6a1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/flowlogs_client.go @@ -0,0 +1,418 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FlowLogsClient contains the methods for the FlowLogs group. +// Don't use this type directly, use NewFlowLogsClient() instead. +type FlowLogsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFlowLogsClient creates a new instance of FlowLogsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFlowLogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FlowLogsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FlowLogsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a flow log for the specified network security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - flowLogName - The name of the flow log. +// - parameters - Parameters that define the create or update flow log resource. +// - options - FlowLogsClientBeginCreateOrUpdateOptions contains the optional parameters for the FlowLogsClient.BeginCreateOrUpdate +// method. +func (client *FlowLogsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog, options *FlowLogsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FlowLogsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FlowLogsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FlowLogsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a flow log for the specified network security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *FlowLogsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog, options *FlowLogsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "FlowLogsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FlowLogsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog, options *FlowLogsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if flowLogName == "" { + return nil, errors.New("parameter flowLogName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{flowLogName}", url.PathEscape(flowLogName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified flow log resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - flowLogName - The name of the flow log resource. +// - options - FlowLogsClientBeginDeleteOptions contains the optional parameters for the FlowLogsClient.BeginDelete method. +func (client *FlowLogsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientBeginDeleteOptions) (*runtime.Poller[FlowLogsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, flowLogName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FlowLogsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FlowLogsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified flow log resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *FlowLogsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "FlowLogsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FlowLogsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if flowLogName == "" { + return nil, errors.New("parameter flowLogName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{flowLogName}", url.PathEscape(flowLogName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a flow log resource by name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - flowLogName - The name of the flow log resource. +// - options - FlowLogsClientGetOptions contains the optional parameters for the FlowLogsClient.Get method. +func (client *FlowLogsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientGetOptions) (FlowLogsClientGetResponse, error) { + var err error + const operationName = "FlowLogsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, options) + if err != nil { + return FlowLogsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FlowLogsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FlowLogsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *FlowLogsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if flowLogName == "" { + return nil, errors.New("parameter flowLogName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{flowLogName}", url.PathEscape(flowLogName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *FlowLogsClient) getHandleResponse(resp *http.Response) (FlowLogsClientGetResponse, error) { + result := FlowLogsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FlowLog); err != nil { + return FlowLogsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all flow log resources for the specified Network Watcher. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - options - FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.NewListPager method. +func (client *FlowLogsClient) NewListPager(resourceGroupName string, networkWatcherName string, options *FlowLogsClientListOptions) *runtime.Pager[FlowLogsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FlowLogsClientListResponse]{ + More: func(page FlowLogsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FlowLogsClientListResponse) (FlowLogsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "FlowLogsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) + }, nil) + if err != nil { + return FlowLogsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *FlowLogsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, options *FlowLogsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FlowLogsClient) listHandleResponse(resp *http.Response) (FlowLogsClientListResponse, error) { + result := FlowLogsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FlowLogListResult); err != nil { + return FlowLogsClientListResponse{}, err + } + return result, nil +} + +// UpdateTags - Update tags of the specified flow log. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - flowLogName - The name of the flow log. +// - parameters - Parameters supplied to update flow log tags. +// - options - FlowLogsClientUpdateTagsOptions contains the optional parameters for the FlowLogsClient.UpdateTags method. +func (client *FlowLogsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters TagsObject, options *FlowLogsClientUpdateTagsOptions) (FlowLogsClientUpdateTagsResponse, error) { + var err error + const operationName = "FlowLogsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) + if err != nil { + return FlowLogsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FlowLogsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FlowLogsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *FlowLogsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters TagsObject, options *FlowLogsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if flowLogName == "" { + return nil, errors.New("parameter flowLogName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{flowLogName}", url.PathEscape(flowLogName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *FlowLogsClient) updateTagsHandleResponse(resp *http.Response) (FlowLogsClientUpdateTagsResponse, error) { + result := FlowLogsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FlowLog); err != nil { + return FlowLogsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/groups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/groups_client.go new file mode 100644 index 00000000..beaac1f2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/groups_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// GroupsClient contains the methods for the NetworkGroups group. +// Don't use this type directly, use NewGroupsClient() instead. +type GroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGroupsClient creates a new instance of GroupsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a network group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - parameters - Parameters supplied to the specify which network group need to create +// - options - GroupsClientCreateOrUpdateOptions contains the optional parameters for the GroupsClient.CreateOrUpdate method. +func (client *GroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, parameters Group, options *GroupsClientCreateOrUpdateOptions) (GroupsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "GroupsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, parameters, options) + if err != nil { + return GroupsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GroupsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return GroupsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *GroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, parameters Group, options *GroupsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if networkGroupName == "" { + return nil, errors.New("parameter networkGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.IfMatch != nil { + req.Raw().Header["If-Match"] = []string{*options.IfMatch} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *GroupsClient) createOrUpdateHandleResponse(resp *http.Response) (GroupsClientCreateOrUpdateResponse, error) { + result := GroupsClientCreateOrUpdateResponse{} + if val := resp.Header.Get("ETag"); val != "" { + result.ETag = &val + } + if err := runtime.UnmarshalAsJSON(resp, &result.Group); err != nil { + return GroupsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes a network group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - options - GroupsClientBeginDeleteOptions contains the optional parameters for the GroupsClient.BeginDelete method. +func (client *GroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientBeginDeleteOptions) (*runtime.Poller[GroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, networkGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GroupsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a network group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *GroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "GroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *GroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if networkGroupName == "" { + return nil, errors.New("parameter networkGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified network group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - options - GroupsClientGetOptions contains the optional parameters for the GroupsClient.Get method. +func (client *GroupsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientGetOptions) (GroupsClientGetResponse, error) { + var err error + const operationName = "GroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, options) + if err != nil { + return GroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *GroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if networkGroupName == "" { + return nil, errors.New("parameter networkGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *GroupsClient) getHandleResponse(resp *http.Response) (GroupsClientGetResponse, error) { + result := GroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Group); err != nil { + return GroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the specified network group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - GroupsClientListOptions contains the optional parameters for the GroupsClient.NewListPager method. +func (client *GroupsClient) NewListPager(resourceGroupName string, networkManagerName string, options *GroupsClientListOptions) *runtime.Pager[GroupsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[GroupsClientListResponse]{ + More: func(page GroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GroupsClientListResponse) (GroupsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GroupsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) + if err != nil { + return GroupsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *GroupsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *GroupsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *GroupsClient) listHandleResponse(resp *http.Response) (GroupsClientListResponse, error) { + result := GroupsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GroupListResult); err != nil { + return GroupsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/hubroutetables_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/hubroutetables_client.go new file mode 100644 index 00000000..8fb1ea57 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/hubroutetables_client.go @@ -0,0 +1,346 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// HubRouteTablesClient contains the methods for the HubRouteTables group. +// Don't use this type directly, use NewHubRouteTablesClient() instead. +type HubRouteTablesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewHubRouteTablesClient creates a new instance of HubRouteTablesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewHubRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubRouteTablesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &HubRouteTablesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the RouteTable. +// - routeTableParameters - Parameters supplied to create or update RouteTable. +// - options - HubRouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the HubRouteTablesClient.BeginCreateOrUpdate +// method. +func (client *HubRouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable, options *HubRouteTablesClientBeginCreateOrUpdateOptions) (*runtime.Poller[HubRouteTablesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeTableName, routeTableParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[HubRouteTablesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[HubRouteTablesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *HubRouteTablesClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable, options *HubRouteTablesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "HubRouteTablesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, routeTableParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *HubRouteTablesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable, options *HubRouteTablesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, routeTableParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a RouteTable. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the RouteTable. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the RouteTable. +// - options - HubRouteTablesClientBeginDeleteOptions contains the optional parameters for the HubRouteTablesClient.BeginDelete +// method. +func (client *HubRouteTablesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientBeginDeleteOptions) (*runtime.Poller[HubRouteTablesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeTableName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[HubRouteTablesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[HubRouteTablesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a RouteTable. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *HubRouteTablesClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "HubRouteTablesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *HubRouteTablesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a RouteTable. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the RouteTable. +// - options - HubRouteTablesClientGetOptions contains the optional parameters for the HubRouteTablesClient.Get method. +func (client *HubRouteTablesClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientGetOptions) (HubRouteTablesClientGetResponse, error) { + var err error + const operationName = "HubRouteTablesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) + if err != nil { + return HubRouteTablesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return HubRouteTablesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HubRouteTablesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *HubRouteTablesClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *HubRouteTablesClient) getHandleResponse(resp *http.Response) (HubRouteTablesClientGetResponse, error) { + result := HubRouteTablesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HubRouteTable); err != nil { + return HubRouteTablesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Retrieves the details of all RouteTables. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.NewListPager method. +func (client *HubRouteTablesClient) NewListPager(resourceGroupName string, virtualHubName string, options *HubRouteTablesClientListOptions) *runtime.Pager[HubRouteTablesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[HubRouteTablesClientListResponse]{ + More: func(page HubRouteTablesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *HubRouteTablesClientListResponse) (HubRouteTablesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "HubRouteTablesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) + if err != nil { + return HubRouteTablesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *HubRouteTablesClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *HubRouteTablesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *HubRouteTablesClient) listHandleResponse(resp *http.Response) (HubRouteTablesClientListResponse, error) { + result := HubRouteTablesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListHubRouteTablesResult); err != nil { + return HubRouteTablesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/hubvirtualnetworkconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/hubvirtualnetworkconnections_client.go new file mode 100644 index 00000000..7159fff7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/hubvirtualnetworkconnections_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// HubVirtualNetworkConnectionsClient contains the methods for the HubVirtualNetworkConnections group. +// Don't use this type directly, use NewHubVirtualNetworkConnectionsClient() instead. +type HubVirtualNetworkConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewHubVirtualNetworkConnectionsClient creates a new instance of HubVirtualNetworkConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewHubVirtualNetworkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubVirtualNetworkConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &HubVirtualNetworkConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a hub virtual network connection if it doesn't exist else updates the existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the HubVirtualNetworkConnection. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the HubVirtualNetworkConnection. +// - hubVirtualNetworkConnectionParameters - Parameters supplied to create or update a hub virtual network connection. +// - options - HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate +// method. +func (client *HubVirtualNetworkConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection, options *HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, connectionName, hubVirtualNetworkConnectionParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a hub virtual network connection if it doesn't exist else updates the existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *HubVirtualNetworkConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection, options *HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, hubVirtualNetworkConnectionParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *HubVirtualNetworkConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection, options *HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, hubVirtualNetworkConnectionParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a HubVirtualNetworkConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the HubVirtualNetworkConnection. +// - options - HubVirtualNetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginDelete +// method. +func (client *HubVirtualNetworkConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientBeginDeleteOptions) (*runtime.Poller[HubVirtualNetworkConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, connectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[HubVirtualNetworkConnectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[HubVirtualNetworkConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a HubVirtualNetworkConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *HubVirtualNetworkConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "HubVirtualNetworkConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *HubVirtualNetworkConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a HubVirtualNetworkConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the vpn connection. +// - options - HubVirtualNetworkConnectionsClientGetOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.Get +// method. +func (client *HubVirtualNetworkConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientGetOptions) (HubVirtualNetworkConnectionsClientGetResponse, error) { + var err error + const operationName = "HubVirtualNetworkConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) + if err != nil { + return HubVirtualNetworkConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return HubVirtualNetworkConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return HubVirtualNetworkConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *HubVirtualNetworkConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *HubVirtualNetworkConnectionsClient) getHandleResponse(resp *http.Response) (HubVirtualNetworkConnectionsClientGetResponse, error) { + result := HubVirtualNetworkConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HubVirtualNetworkConnection); err != nil { + return HubVirtualNetworkConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Retrieves the details of all HubVirtualNetworkConnections. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.NewListPager +// method. +func (client *HubVirtualNetworkConnectionsClient) NewListPager(resourceGroupName string, virtualHubName string, options *HubVirtualNetworkConnectionsClientListOptions) *runtime.Pager[HubVirtualNetworkConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[HubVirtualNetworkConnectionsClientListResponse]{ + More: func(page HubVirtualNetworkConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *HubVirtualNetworkConnectionsClientListResponse) (HubVirtualNetworkConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "HubVirtualNetworkConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) + if err != nil { + return HubVirtualNetworkConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *HubVirtualNetworkConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *HubVirtualNetworkConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *HubVirtualNetworkConnectionsClient) listHandleResponse(resp *http.Response) (HubVirtualNetworkConnectionsClientListResponse, error) { + result := HubVirtualNetworkConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListHubVirtualNetworkConnectionsResult); err != nil { + return HubVirtualNetworkConnectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/inboundnatrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/inboundnatrules_client.go new file mode 100644 index 00000000..0766cd16 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/inboundnatrules_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// InboundNatRulesClient contains the methods for the InboundNatRules group. +// Don't use this type directly, use NewInboundNatRulesClient() instead. +type InboundNatRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewInboundNatRulesClient creates a new instance of InboundNatRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewInboundNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundNatRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &InboundNatRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a load balancer inbound NAT rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - inboundNatRuleName - The name of the inbound NAT rule. +// - inboundNatRuleParameters - Parameters supplied to the create or update inbound NAT rule operation. +// - options - InboundNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundNatRulesClient.BeginCreateOrUpdate +// method. +func (client *InboundNatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, options *InboundNatRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[InboundNatRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InboundNatRulesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InboundNatRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a load balancer inbound NAT rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *InboundNatRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, options *InboundNatRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "InboundNatRulesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *InboundNatRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, options *InboundNatRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if inboundNatRuleName == "" { + return nil, errors.New("parameter inboundNatRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{inboundNatRuleName}", url.PathEscape(inboundNatRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, inboundNatRuleParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified load balancer inbound NAT rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - inboundNatRuleName - The name of the inbound NAT rule. +// - options - InboundNatRulesClientBeginDeleteOptions contains the optional parameters for the InboundNatRulesClient.BeginDelete +// method. +func (client *InboundNatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientBeginDeleteOptions) (*runtime.Poller[InboundNatRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InboundNatRulesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InboundNatRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified load balancer inbound NAT rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *InboundNatRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "InboundNatRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *InboundNatRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if inboundNatRuleName == "" { + return nil, errors.New("parameter inboundNatRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{inboundNatRuleName}", url.PathEscape(inboundNatRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified load balancer inbound NAT rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - inboundNatRuleName - The name of the inbound NAT rule. +// - options - InboundNatRulesClientGetOptions contains the optional parameters for the InboundNatRulesClient.Get method. +func (client *InboundNatRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientGetOptions) (InboundNatRulesClientGetResponse, error) { + var err error + const operationName = "InboundNatRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) + if err != nil { + return InboundNatRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InboundNatRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InboundNatRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *InboundNatRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if inboundNatRuleName == "" { + return nil, errors.New("parameter inboundNatRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{inboundNatRuleName}", url.PathEscape(inboundNatRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *InboundNatRulesClient) getHandleResponse(resp *http.Response) (InboundNatRulesClientGetResponse, error) { + result := InboundNatRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InboundNatRule); err != nil { + return InboundNatRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the inbound NAT rules in a load balancer. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.NewListPager +// method. +func (client *InboundNatRulesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *InboundNatRulesClientListOptions) *runtime.Pager[InboundNatRulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[InboundNatRulesClientListResponse]{ + More: func(page InboundNatRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InboundNatRulesClientListResponse) (InboundNatRulesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InboundNatRulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) + if err != nil { + return InboundNatRulesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *InboundNatRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *InboundNatRulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *InboundNatRulesClient) listHandleResponse(resp *http.Response) (InboundNatRulesClientListResponse, error) { + result := InboundNatRulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InboundNatRuleListResult); err != nil { + return InboundNatRulesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/inboundsecurityrule_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/inboundsecurityrule_client.go new file mode 100644 index 00000000..5471a9f4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/inboundsecurityrule_client.go @@ -0,0 +1,200 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// InboundSecurityRuleClient contains the methods for the InboundSecurityRule group. +// Don't use this type directly, use NewInboundSecurityRuleClient() instead. +type InboundSecurityRuleClient struct { + internal *arm.Client + subscriptionID string +} + +// NewInboundSecurityRuleClient creates a new instance of InboundSecurityRuleClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewInboundSecurityRuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundSecurityRuleClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &InboundSecurityRuleClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance Inbound Security Rules. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - ruleCollectionName - The name of security rule collection. +// - parameters - Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. +// - options - InboundSecurityRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundSecurityRuleClient.BeginCreateOrUpdate +// method. +func (client *InboundSecurityRuleClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule, options *InboundSecurityRuleClientBeginCreateOrUpdateOptions) (*runtime.Poller[InboundSecurityRuleClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InboundSecurityRuleClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InboundSecurityRuleClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified Network Virtual Appliance Inbound Security Rules. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *InboundSecurityRuleClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule, options *InboundSecurityRuleClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "InboundSecurityRuleClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *InboundSecurityRuleClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule, options *InboundSecurityRuleClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - ruleCollectionName - The name of security rule collection. +// - options - InboundSecurityRuleClientGetOptions contains the optional parameters for the InboundSecurityRuleClient.Get method. +func (client *InboundSecurityRuleClient) Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, options *InboundSecurityRuleClientGetOptions) (InboundSecurityRuleClientGetResponse, error) { + var err error + const operationName = "InboundSecurityRuleClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, options) + if err != nil { + return InboundSecurityRuleClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InboundSecurityRuleClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InboundSecurityRuleClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *InboundSecurityRuleClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, options *InboundSecurityRuleClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *InboundSecurityRuleClient) getHandleResponse(resp *http.Response) (InboundSecurityRuleClientGetResponse, error) { + result := InboundSecurityRuleClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InboundSecurityRule); err != nil { + return InboundSecurityRuleClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaceipconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaceipconfigurations_client.go new file mode 100644 index 00000000..50c4d89e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaceipconfigurations_client.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// InterfaceIPConfigurationsClient contains the methods for the NetworkInterfaceIPConfigurations group. +// Don't use this type directly, use NewInterfaceIPConfigurationsClient() instead. +type InterfaceIPConfigurationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewInterfaceIPConfigurationsClient creates a new instance of InterfaceIPConfigurationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewInterfaceIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceIPConfigurationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &InterfaceIPConfigurationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the specified network interface ip configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - ipConfigurationName - The name of the ip configuration name. +// - options - InterfaceIPConfigurationsClientGetOptions contains the optional parameters for the InterfaceIPConfigurationsClient.Get +// method. +func (client *InterfaceIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, ipConfigurationName string, options *InterfaceIPConfigurationsClientGetOptions) (InterfaceIPConfigurationsClientGetResponse, error) { + var err error + const operationName = "InterfaceIPConfigurationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkInterfaceName, ipConfigurationName, options) + if err != nil { + return InterfaceIPConfigurationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InterfaceIPConfigurationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InterfaceIPConfigurationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *InterfaceIPConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, ipConfigurationName string, options *InterfaceIPConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if ipConfigurationName == "" { + return nil, errors.New("parameter ipConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *InterfaceIPConfigurationsClient) getHandleResponse(resp *http.Response) (InterfaceIPConfigurationsClientGetResponse, error) { + result := InterfaceIPConfigurationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfiguration); err != nil { + return InterfaceIPConfigurationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Get all ip configurations in a network interface. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.NewListPager +// method. +func (client *InterfaceIPConfigurationsClient) NewListPager(resourceGroupName string, networkInterfaceName string, options *InterfaceIPConfigurationsClientListOptions) *runtime.Pager[InterfaceIPConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[InterfaceIPConfigurationsClientListResponse]{ + More: func(page InterfaceIPConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InterfaceIPConfigurationsClientListResponse) (InterfaceIPConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfaceIPConfigurationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + }, nil) + if err != nil { + return InterfaceIPConfigurationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *InterfaceIPConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfaceIPConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *InterfaceIPConfigurationsClient) listHandleResponse(resp *http.Response) (InterfaceIPConfigurationsClientListResponse, error) { + result := InterfaceIPConfigurationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfigurationListResult); err != nil { + return InterfaceIPConfigurationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaceloadbalancers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaceloadbalancers_client.go new file mode 100644 index 00000000..699183c3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaceloadbalancers_client.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// InterfaceLoadBalancersClient contains the methods for the NetworkInterfaceLoadBalancers group. +// Don't use this type directly, use NewInterfaceLoadBalancersClient() instead. +type InterfaceLoadBalancersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewInterfaceLoadBalancersClient creates a new instance of InterfaceLoadBalancersClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewInterfaceLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceLoadBalancersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &InterfaceLoadBalancersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - List all load balancers in a network interface. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.NewListPager +// method. +func (client *InterfaceLoadBalancersClient) NewListPager(resourceGroupName string, networkInterfaceName string, options *InterfaceLoadBalancersClientListOptions) *runtime.Pager[InterfaceLoadBalancersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[InterfaceLoadBalancersClientListResponse]{ + More: func(page InterfaceLoadBalancersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InterfaceLoadBalancersClientListResponse) (InterfaceLoadBalancersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfaceLoadBalancersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + }, nil) + if err != nil { + return InterfaceLoadBalancersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *InterfaceLoadBalancersClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfaceLoadBalancersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *InterfaceLoadBalancersClient) listHandleResponse(resp *http.Response) (InterfaceLoadBalancersClientListResponse, error) { + result := InterfaceLoadBalancersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceLoadBalancerListResult); err != nil { + return InterfaceLoadBalancersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaces.go new file mode 100644 index 00000000..a153dd57 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaces.go @@ -0,0 +1,54 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +// ActiveBaseSecurityAdminRuleClassification provides polymorphic access to related types. +// Call the interface's GetActiveBaseSecurityAdminRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ActiveBaseSecurityAdminRule, *ActiveDefaultSecurityAdminRule, *ActiveSecurityAdminRule +type ActiveBaseSecurityAdminRuleClassification interface { + // GetActiveBaseSecurityAdminRule returns the ActiveBaseSecurityAdminRule content of the underlying type. + GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule +} + +// BaseAdminRuleClassification provides polymorphic access to related types. +// Call the interface's GetBaseAdminRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AdminRule, *BaseAdminRule, *DefaultAdminRule +type BaseAdminRuleClassification interface { + // GetBaseAdminRule returns the BaseAdminRule content of the underlying type. + GetBaseAdminRule() *BaseAdminRule +} + +// EffectiveBaseSecurityAdminRuleClassification provides polymorphic access to related types. +// Call the interface's GetEffectiveBaseSecurityAdminRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EffectiveBaseSecurityAdminRule, *EffectiveDefaultSecurityAdminRule, *EffectiveSecurityAdminRule +type EffectiveBaseSecurityAdminRuleClassification interface { + // GetEffectiveBaseSecurityAdminRule returns the EffectiveBaseSecurityAdminRule content of the underlying type. + GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule +} + +// FirewallPolicyRuleClassification provides polymorphic access to related types. +// Call the interface's GetFirewallPolicyRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ApplicationRule, *FirewallPolicyRule, *NatRule, *Rule +type FirewallPolicyRuleClassification interface { + // GetFirewallPolicyRule returns the FirewallPolicyRule content of the underlying type. + GetFirewallPolicyRule() *FirewallPolicyRule +} + +// FirewallPolicyRuleCollectionClassification provides polymorphic access to related types. +// Call the interface's GetFirewallPolicyRuleCollection() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *FirewallPolicyFilterRuleCollection, *FirewallPolicyNatRuleCollection, *FirewallPolicyRuleCollection +type FirewallPolicyRuleCollectionClassification interface { + // GetFirewallPolicyRuleCollection returns the FirewallPolicyRuleCollection content of the underlying type. + GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaces_client.go new file mode 100644 index 00000000..9d511dab --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfaces_client.go @@ -0,0 +1,1195 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// InterfacesClient contains the methods for the NetworkInterfaces group. +// Don't use this type directly, use NewInterfacesClient() instead. +type InterfacesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewInterfacesClient creates a new instance of InterfacesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfacesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &InterfacesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a network interface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - parameters - Parameters supplied to the create or update network interface operation. +// - options - InterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfacesClient.BeginCreateOrUpdate +// method. +func (client *InterfacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface, options *InterfacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[InterfacesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkInterfaceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfacesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfacesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a network interface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *InterfacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface, options *InterfacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "InterfacesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkInterfaceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *InterfacesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface, options *InterfacesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified network interface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientBeginDeleteOptions contains the optional parameters for the InterfacesClient.BeginDelete method. +func (client *InterfacesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginDeleteOptions) (*runtime.Poller[InterfacesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkInterfaceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfacesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfacesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified network interface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *InterfacesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "InterfacesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *InterfacesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets information about the specified network interface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientGetOptions contains the optional parameters for the InterfacesClient.Get method. +func (client *InterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientGetOptions) (InterfacesClientGetResponse, error) { + var err error + const operationName = "InterfacesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + if err != nil { + return InterfacesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InterfacesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InterfacesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *InterfacesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *InterfacesClient) getHandleResponse(resp *http.Response) (InterfacesClientGetResponse, error) { + result := InterfacesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { + return InterfacesClientGetResponse{}, err + } + return result, nil +} + +// GetCloudServiceNetworkInterface - Get the specified network interface in a cloud service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - roleInstanceName - The name of role instance. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientGetCloudServiceNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetCloudServiceNetworkInterface +// method. +func (client *InterfacesClient) GetCloudServiceNetworkInterface(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, options *InterfacesClientGetCloudServiceNetworkInterfaceOptions) (InterfacesClientGetCloudServiceNetworkInterfaceResponse, error) { + var err error + const operationName = "InterfacesClient.GetCloudServiceNetworkInterface" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCloudServiceNetworkInterfaceCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, options) + if err != nil { + return InterfacesClientGetCloudServiceNetworkInterfaceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InterfacesClientGetCloudServiceNetworkInterfaceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InterfacesClientGetCloudServiceNetworkInterfaceResponse{}, err + } + resp, err := client.getCloudServiceNetworkInterfaceHandleResponse(httpResp) + return resp, err +} + +// getCloudServiceNetworkInterfaceCreateRequest creates the GetCloudServiceNetworkInterface request. +func (client *InterfacesClient) getCloudServiceNetworkInterfaceCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, options *InterfacesClientGetCloudServiceNetworkInterfaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cloudServiceName == "" { + return nil, errors.New("parameter cloudServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) + if roleInstanceName == "" { + return nil, errors.New("parameter roleInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getCloudServiceNetworkInterfaceHandleResponse handles the GetCloudServiceNetworkInterface response. +func (client *InterfacesClient) getCloudServiceNetworkInterfaceHandleResponse(resp *http.Response) (InterfacesClientGetCloudServiceNetworkInterfaceResponse, error) { + result := InterfacesClientGetCloudServiceNetworkInterfaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { + return InterfacesClientGetCloudServiceNetworkInterfaceResponse{}, err + } + return result, nil +} + +// BeginGetEffectiveRouteTable - Gets all route tables applied to a network interface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientBeginGetEffectiveRouteTableOptions contains the optional parameters for the InterfacesClient.BeginGetEffectiveRouteTable +// method. +func (client *InterfacesClient) BeginGetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginGetEffectiveRouteTableOptions) (*runtime.Poller[InterfacesClientGetEffectiveRouteTableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getEffectiveRouteTable(ctx, resourceGroupName, networkInterfaceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfacesClientGetEffectiveRouteTableResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfacesClientGetEffectiveRouteTableResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetEffectiveRouteTable - Gets all route tables applied to a network interface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *InterfacesClient) getEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginGetEffectiveRouteTableOptions) (*http.Response, error) { + var err error + const operationName = "InterfacesClient.BeginGetEffectiveRouteTable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEffectiveRouteTableCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getEffectiveRouteTableCreateRequest creates the GetEffectiveRouteTable request. +func (client *InterfacesClient) getEffectiveRouteTableCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginGetEffectiveRouteTableOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetVirtualMachineScaleSetIPConfiguration - Get the specified network interface ip configuration in a virtual machine scale +// set. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2018-10-01 +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - networkInterfaceName - The name of the network interface. +// - ipConfigurationName - The name of the ip configuration. +// - options - InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetIPConfiguration +// method. +func (client *InterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions) (InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse, error) { + var err error + const operationName = "InterfacesClient.GetVirtualMachineScaleSetIPConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVirtualMachineScaleSetIPConfigurationCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, options) + if err != nil { + return InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{}, err + } + resp, err := client.getVirtualMachineScaleSetIPConfigurationHandleResponse(httpResp) + return resp, err +} + +// getVirtualMachineScaleSetIPConfigurationCreateRequest creates the GetVirtualMachineScaleSetIPConfiguration request. +func (client *InterfacesClient) getVirtualMachineScaleSetIPConfigurationCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualMachineScaleSetName == "" { + return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) + if virtualmachineIndex == "" { + return nil, errors.New("parameter virtualmachineIndex cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if ipConfigurationName == "" { + return nil, errors.New("parameter ipConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2018-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVirtualMachineScaleSetIPConfigurationHandleResponse handles the GetVirtualMachineScaleSetIPConfiguration response. +func (client *InterfacesClient) getVirtualMachineScaleSetIPConfigurationHandleResponse(resp *http.Response) (InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse, error) { + result := InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfiguration); err != nil { + return InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{}, err + } + return result, nil +} + +// GetVirtualMachineScaleSetNetworkInterface - Get the specified network interface in a virtual machine scale set. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2018-10-01 +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetNetworkInterface +// method. +func (client *InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions) (InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse, error) { + var err error + const operationName = "InterfacesClient.GetVirtualMachineScaleSetNetworkInterface" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVirtualMachineScaleSetNetworkInterfaceCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, options) + if err != nil { + return InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{}, err + } + resp, err := client.getVirtualMachineScaleSetNetworkInterfaceHandleResponse(httpResp) + return resp, err +} + +// getVirtualMachineScaleSetNetworkInterfaceCreateRequest creates the GetVirtualMachineScaleSetNetworkInterface request. +func (client *InterfacesClient) getVirtualMachineScaleSetNetworkInterfaceCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualMachineScaleSetName == "" { + return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) + if virtualmachineIndex == "" { + return nil, errors.New("parameter virtualmachineIndex cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2018-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVirtualMachineScaleSetNetworkInterfaceHandleResponse handles the GetVirtualMachineScaleSetNetworkInterface response. +func (client *InterfacesClient) getVirtualMachineScaleSetNetworkInterfaceHandleResponse(resp *http.Response) (InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse, error) { + result := InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { + return InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all network interfaces in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - InterfacesClientListOptions contains the optional parameters for the InterfacesClient.NewListPager method. +func (client *InterfacesClient) NewListPager(resourceGroupName string, options *InterfacesClientListOptions) *runtime.Pager[InterfacesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[InterfacesClientListResponse]{ + More: func(page InterfacesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InterfacesClientListResponse) (InterfacesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return InterfacesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *InterfacesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *InterfacesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *InterfacesClient) listHandleResponse(resp *http.Response) (InterfacesClientListResponse, error) { + result := InterfacesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { + return InterfacesClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all network interfaces in a subscription. +// +// Generated from API version 2024-05-01 +// - options - InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.NewListAllPager method. +func (client *InterfacesClient) NewListAllPager(options *InterfacesClientListAllOptions) *runtime.Pager[InterfacesClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[InterfacesClientListAllResponse]{ + More: func(page InterfacesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InterfacesClientListAllResponse) (InterfacesClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return InterfacesClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *InterfacesClient) listAllCreateRequest(ctx context.Context, options *InterfacesClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *InterfacesClient) listAllHandleResponse(resp *http.Response) (InterfacesClientListAllResponse, error) { + result := InterfacesClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { + return InterfacesClientListAllResponse{}, err + } + return result, nil +} + +// NewListCloudServiceNetworkInterfacesPager - Gets all network interfaces in a cloud service. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - options - InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListCloudServiceNetworkInterfacesPager +// method. +func (client *InterfacesClient) NewListCloudServiceNetworkInterfacesPager(resourceGroupName string, cloudServiceName string, options *InterfacesClientListCloudServiceNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListCloudServiceNetworkInterfacesResponse] { + return runtime.NewPager(runtime.PagingHandler[InterfacesClientListCloudServiceNetworkInterfacesResponse]{ + More: func(page InterfacesClientListCloudServiceNetworkInterfacesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InterfacesClientListCloudServiceNetworkInterfacesResponse) (InterfacesClientListCloudServiceNetworkInterfacesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListCloudServiceNetworkInterfacesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCloudServiceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) + }, nil) + if err != nil { + return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, err + } + return client.listCloudServiceNetworkInterfacesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCloudServiceNetworkInterfacesCreateRequest creates the ListCloudServiceNetworkInterfaces request. +func (client *InterfacesClient) listCloudServiceNetworkInterfacesCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *InterfacesClientListCloudServiceNetworkInterfacesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cloudServiceName == "" { + return nil, errors.New("parameter cloudServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCloudServiceNetworkInterfacesHandleResponse handles the ListCloudServiceNetworkInterfaces response. +func (client *InterfacesClient) listCloudServiceNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListCloudServiceNetworkInterfacesResponse, error) { + result := InterfacesClientListCloudServiceNetworkInterfacesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { + return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, err + } + return result, nil +} + +// NewListCloudServiceRoleInstanceNetworkInterfacesPager - Gets information about all network interfaces in a role instance +// in a cloud service. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - roleInstanceName - The name of role instance. +// - options - InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the +// InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager method. +func (client *InterfacesClient) NewListCloudServiceRoleInstanceNetworkInterfacesPager(resourceGroupName string, cloudServiceName string, roleInstanceName string, options *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse] { + return runtime.NewPager(runtime.PagingHandler[InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse]{ + More: func(page InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse) (InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCloudServiceRoleInstanceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, options) + }, nil) + if err != nil { + return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, err + } + return client.listCloudServiceRoleInstanceNetworkInterfacesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCloudServiceRoleInstanceNetworkInterfacesCreateRequest creates the ListCloudServiceRoleInstanceNetworkInterfaces request. +func (client *InterfacesClient) listCloudServiceRoleInstanceNetworkInterfacesCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, options *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cloudServiceName == "" { + return nil, errors.New("parameter cloudServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) + if roleInstanceName == "" { + return nil, errors.New("parameter roleInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCloudServiceRoleInstanceNetworkInterfacesHandleResponse handles the ListCloudServiceRoleInstanceNetworkInterfaces response. +func (client *InterfacesClient) listCloudServiceRoleInstanceNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse, error) { + result := InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { + return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, err + } + return result, nil +} + +// BeginListEffectiveNetworkSecurityGroups - Gets all network security groups applied to a network interface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions contains the optional parameters for the InterfacesClient.BeginListEffectiveNetworkSecurityGroups +// method. +func (client *InterfacesClient) BeginListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions) (*runtime.Poller[InterfacesClientListEffectiveNetworkSecurityGroupsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listEffectiveNetworkSecurityGroups(ctx, resourceGroupName, networkInterfaceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfacesClientListEffectiveNetworkSecurityGroupsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfacesClientListEffectiveNetworkSecurityGroupsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListEffectiveNetworkSecurityGroups - Gets all network security groups applied to a network interface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *InterfacesClient) listEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions) (*http.Response, error) { + var err error + const operationName = "InterfacesClient.BeginListEffectiveNetworkSecurityGroups" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listEffectiveNetworkSecurityGroupsCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listEffectiveNetworkSecurityGroupsCreateRequest creates the ListEffectiveNetworkSecurityGroups request. +func (client *InterfacesClient) listEffectiveNetworkSecurityGroupsCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListVirtualMachineScaleSetIPConfigurationsPager - Get the specified network interface ip configuration in a virtual +// machine scale set. +// +// Generated from API version 2018-10-01 +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager +// method. +func (client *InterfacesClient) NewListVirtualMachineScaleSetIPConfigurationsPager(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse] { + return runtime.NewPager(runtime.PagingHandler[InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse]{ + More: func(page InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse) (InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachineScaleSetIPConfigurationsCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, options) + }, nil) + if err != nil { + return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, err + } + return client.listVirtualMachineScaleSetIPConfigurationsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listVirtualMachineScaleSetIPConfigurationsCreateRequest creates the ListVirtualMachineScaleSetIPConfigurations request. +func (client *InterfacesClient) listVirtualMachineScaleSetIPConfigurationsCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualMachineScaleSetName == "" { + return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) + if virtualmachineIndex == "" { + return nil, errors.New("parameter virtualmachineIndex cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2018-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVirtualMachineScaleSetIPConfigurationsHandleResponse handles the ListVirtualMachineScaleSetIPConfigurations response. +func (client *InterfacesClient) listVirtualMachineScaleSetIPConfigurationsHandleResponse(resp *http.Response) (InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse, error) { + result := InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfigurationListResult); err != nil { + return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, err + } + return result, nil +} + +// NewListVirtualMachineScaleSetNetworkInterfacesPager - Gets all network interfaces in a virtual machine scale set. +// +// Generated from API version 2018-10-01 +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - options - InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager +// method. +func (client *InterfacesClient) NewListVirtualMachineScaleSetNetworkInterfacesPager(resourceGroupName string, virtualMachineScaleSetName string, options *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse] { + return runtime.NewPager(runtime.PagingHandler[InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse]{ + More: func(page InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse) (InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachineScaleSetNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) + }, nil) + if err != nil { + return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, err + } + return client.listVirtualMachineScaleSetNetworkInterfacesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listVirtualMachineScaleSetNetworkInterfacesCreateRequest creates the ListVirtualMachineScaleSetNetworkInterfaces request. +func (client *InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, options *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualMachineScaleSetName == "" { + return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2018-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVirtualMachineScaleSetNetworkInterfacesHandleResponse handles the ListVirtualMachineScaleSetNetworkInterfaces response. +func (client *InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse, error) { + result := InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { + return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, err + } + return result, nil +} + +// NewListVirtualMachineScaleSetVMNetworkInterfacesPager - Gets information about all network interfaces in a virtual machine +// in a virtual machine scale set. +// +// Generated from API version 2018-10-01 +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - options - InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the +// InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager method. +func (client *InterfacesClient) NewListVirtualMachineScaleSetVMNetworkInterfacesPager(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, options *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse] { + return runtime.NewPager(runtime.PagingHandler[InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse]{ + More: func(page InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse) (InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, options) + }, nil) + if err != nil { + return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, err + } + return client.listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest creates the ListVirtualMachineScaleSetVMNetworkInterfaces request. +func (client *InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, options *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualMachineScaleSetName == "" { + return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) + if virtualmachineIndex == "" { + return nil, errors.New("parameter virtualmachineIndex cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2018-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse handles the ListVirtualMachineScaleSetVMNetworkInterfaces response. +func (client *InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse, error) { + result := InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { + return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates a network interface tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - parameters - Parameters supplied to update network interface tags. +// - options - InterfacesClientUpdateTagsOptions contains the optional parameters for the InterfacesClient.UpdateTags method. +func (client *InterfacesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject, options *InterfacesClientUpdateTagsOptions) (InterfacesClientUpdateTagsResponse, error) { + var err error + const operationName = "InterfacesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkInterfaceName, parameters, options) + if err != nil { + return InterfacesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InterfacesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InterfacesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *InterfacesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject, options *InterfacesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *InterfacesClient) updateTagsHandleResponse(resp *http.Response) (InterfacesClientUpdateTagsResponse, error) { + result := InterfacesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { + return InterfacesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfacetapconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfacetapconfigurations_client.go new file mode 100644 index 00000000..7b2f499f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/interfacetapconfigurations_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// InterfaceTapConfigurationsClient contains the methods for the NetworkInterfaceTapConfigurations group. +// Don't use this type directly, use NewInterfaceTapConfigurationsClient() instead. +type InterfaceTapConfigurationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewInterfaceTapConfigurationsClient creates a new instance of InterfaceTapConfigurationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewInterfaceTapConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceTapConfigurationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &InterfaceTapConfigurationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a Tap configuration in the specified NetworkInterface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - tapConfigurationName - The name of the tap configuration. +// - tapConfigurationParameters - Parameters supplied to the create or update tap configuration operation. +// - options - InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginCreateOrUpdate +// method. +func (client *InterfaceTapConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration, options *InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[InterfaceTapConfigurationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfaceTapConfigurationsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfaceTapConfigurationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a Tap configuration in the specified NetworkInterface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *InterfaceTapConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration, options *InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "InterfaceTapConfigurationsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *InterfaceTapConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration, options *InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if tapConfigurationName == "" { + return nil, errors.New("parameter tapConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tapConfigurationName}", url.PathEscape(tapConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, tapConfigurationParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified tap configuration from the NetworkInterface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - tapConfigurationName - The name of the tap configuration. +// - options - InterfaceTapConfigurationsClientBeginDeleteOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginDelete +// method. +func (client *InterfaceTapConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientBeginDeleteOptions) (*runtime.Poller[InterfaceTapConfigurationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[InterfaceTapConfigurationsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[InterfaceTapConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified tap configuration from the NetworkInterface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *InterfaceTapConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "InterfaceTapConfigurationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *InterfaceTapConfigurationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if tapConfigurationName == "" { + return nil, errors.New("parameter tapConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tapConfigurationName}", url.PathEscape(tapConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the specified tap configuration on a network interface. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - tapConfigurationName - The name of the tap configuration. +// - options - InterfaceTapConfigurationsClientGetOptions contains the optional parameters for the InterfaceTapConfigurationsClient.Get +// method. +func (client *InterfaceTapConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientGetOptions) (InterfaceTapConfigurationsClientGetResponse, error) { + var err error + const operationName = "InterfaceTapConfigurationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) + if err != nil { + return InterfaceTapConfigurationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return InterfaceTapConfigurationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return InterfaceTapConfigurationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *InterfaceTapConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if tapConfigurationName == "" { + return nil, errors.New("parameter tapConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tapConfigurationName}", url.PathEscape(tapConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *InterfaceTapConfigurationsClient) getHandleResponse(resp *http.Response) (InterfaceTapConfigurationsClientGetResponse, error) { + result := InterfaceTapConfigurationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceTapConfiguration); err != nil { + return InterfaceTapConfigurationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Get all Tap configurations in a network interface. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.NewListPager +// method. +func (client *InterfaceTapConfigurationsClient) NewListPager(resourceGroupName string, networkInterfaceName string, options *InterfaceTapConfigurationsClientListOptions) *runtime.Pager[InterfaceTapConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[InterfaceTapConfigurationsClientListResponse]{ + More: func(page InterfaceTapConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *InterfaceTapConfigurationsClientListResponse) (InterfaceTapConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "InterfaceTapConfigurationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + }, nil) + if err != nil { + return InterfaceTapConfigurationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *InterfaceTapConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfaceTapConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *InterfaceTapConfigurationsClient) listHandleResponse(resp *http.Response) (InterfaceTapConfigurationsClientListResponse, error) { + result := InterfaceTapConfigurationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceTapConfigurationListResult); err != nil { + return InterfaceTapConfigurationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ipallocations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ipallocations_client.go new file mode 100644 index 00000000..6cd53bcb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ipallocations_client.go @@ -0,0 +1,453 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// IPAllocationsClient contains the methods for the IPAllocations group. +// Don't use this type directly, use NewIPAllocationsClient() instead. +type IPAllocationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewIPAllocationsClient creates a new instance of IPAllocationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewIPAllocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPAllocationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &IPAllocationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an IpAllocation in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ipAllocationName - The name of the IpAllocation. +// - parameters - Parameters supplied to the create or update virtual network operation. +// - options - IPAllocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPAllocationsClient.BeginCreateOrUpdate +// method. +func (client *IPAllocationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[IPAllocationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, ipAllocationName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPAllocationsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPAllocationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an IpAllocation in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *IPAllocationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "IPAllocationsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ipAllocationName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *IPAllocationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ipAllocationName == "" { + return nil, errors.New("parameter ipAllocationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipAllocationName}", url.PathEscape(ipAllocationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified IpAllocation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ipAllocationName - The name of the IpAllocation. +// - options - IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete +// method. +func (client *IPAllocationsClient) BeginDelete(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (*runtime.Poller[IPAllocationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, ipAllocationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPAllocationsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPAllocationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified IpAllocation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *IPAllocationsClient) deleteOperation(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "IPAllocationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, ipAllocationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *IPAllocationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ipAllocationName == "" { + return nil, errors.New("parameter ipAllocationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipAllocationName}", url.PathEscape(ipAllocationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified IpAllocation by resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ipAllocationName - The name of the IpAllocation. +// - options - IPAllocationsClientGetOptions contains the optional parameters for the IPAllocationsClient.Get method. +func (client *IPAllocationsClient) Get(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientGetOptions) (IPAllocationsClientGetResponse, error) { + var err error + const operationName = "IPAllocationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, ipAllocationName, options) + if err != nil { + return IPAllocationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IPAllocationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IPAllocationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *IPAllocationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ipAllocationName == "" { + return nil, errors.New("parameter ipAllocationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipAllocationName}", url.PathEscape(ipAllocationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *IPAllocationsClient) getHandleResponse(resp *http.Response) (IPAllocationsClientGetResponse, error) { + result := IPAllocationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocation); err != nil { + return IPAllocationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all IpAllocations in a subscription. +// +// Generated from API version 2024-05-01 +// - options - IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.NewListPager method. +func (client *IPAllocationsClient) NewListPager(options *IPAllocationsClientListOptions) *runtime.Pager[IPAllocationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[IPAllocationsClientListResponse]{ + More: func(page IPAllocationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *IPAllocationsClientListResponse) (IPAllocationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IPAllocationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return IPAllocationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *IPAllocationsClient) listCreateRequest(ctx context.Context, options *IPAllocationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *IPAllocationsClient) listHandleResponse(resp *http.Response) (IPAllocationsClientListResponse, error) { + result := IPAllocationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocationListResult); err != nil { + return IPAllocationsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets all IpAllocations in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.NewListByResourceGroupPager +// method. +func (client *IPAllocationsClient) NewListByResourceGroupPager(resourceGroupName string, options *IPAllocationsClientListByResourceGroupOptions) *runtime.Pager[IPAllocationsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[IPAllocationsClientListByResourceGroupResponse]{ + More: func(page IPAllocationsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *IPAllocationsClientListByResourceGroupResponse) (IPAllocationsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IPAllocationsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return IPAllocationsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *IPAllocationsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *IPAllocationsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *IPAllocationsClient) listByResourceGroupHandleResponse(resp *http.Response) (IPAllocationsClientListByResourceGroupResponse, error) { + result := IPAllocationsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocationListResult); err != nil { + return IPAllocationsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates a IpAllocation tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ipAllocationName - The name of the IpAllocation. +// - parameters - Parameters supplied to update IpAllocation tags. +// - options - IPAllocationsClientUpdateTagsOptions contains the optional parameters for the IPAllocationsClient.UpdateTags +// method. +func (client *IPAllocationsClient) UpdateTags(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters TagsObject, options *IPAllocationsClientUpdateTagsOptions) (IPAllocationsClientUpdateTagsResponse, error) { + var err error + const operationName = "IPAllocationsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, ipAllocationName, parameters, options) + if err != nil { + return IPAllocationsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IPAllocationsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IPAllocationsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *IPAllocationsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters TagsObject, options *IPAllocationsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ipAllocationName == "" { + return nil, errors.New("parameter ipAllocationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipAllocationName}", url.PathEscape(ipAllocationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *IPAllocationsClient) updateTagsHandleResponse(resp *http.Response) (IPAllocationsClientUpdateTagsResponse, error) { + result := IPAllocationsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocation); err != nil { + return IPAllocationsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ipampools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ipampools_client.go new file mode 100644 index 00000000..000dd7cb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ipampools_client.go @@ -0,0 +1,574 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// IpamPoolsClient contains the methods for the IpamPools group. +// Don't use this type directly, use NewIpamPoolsClient() instead. +type IpamPoolsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewIpamPoolsClient creates a new instance of IpamPoolsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewIpamPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IpamPoolsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &IpamPoolsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Creates/Updates the Pool resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - poolName - IP Address Manager Pool resource name. +// - body - Pool resource object to create/update. +// - options - IpamPoolsClientBeginCreateOptions contains the optional parameters for the IpamPoolsClient.BeginCreate method. +func (client *IpamPoolsClient) BeginCreate(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, body IpamPool, options *IpamPoolsClientBeginCreateOptions) (*runtime.Poller[IpamPoolsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, networkManagerName, poolName, body, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IpamPoolsClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IpamPoolsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Creates/Updates the Pool resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *IpamPoolsClient) create(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, body IpamPool, options *IpamPoolsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "IpamPoolsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, networkManagerName, poolName, body, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *IpamPoolsClient) createCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, body IpamPool, options *IpamPoolsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete the Pool resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - poolName - Pool resource name. +// - options - IpamPoolsClientBeginDeleteOptions contains the optional parameters for the IpamPoolsClient.BeginDelete method. +func (client *IpamPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientBeginDeleteOptions) (*runtime.Poller[IpamPoolsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, poolName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IpamPoolsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IpamPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the Pool resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *IpamPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "IpamPoolsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, poolName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *IpamPoolsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specific Pool resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - poolName - Pool resource name. +// - options - IpamPoolsClientGetOptions contains the optional parameters for the IpamPoolsClient.Get method. +func (client *IpamPoolsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientGetOptions) (IpamPoolsClientGetResponse, error) { + var err error + const operationName = "IpamPoolsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, poolName, options) + if err != nil { + return IpamPoolsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IpamPoolsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IpamPoolsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *IpamPoolsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *IpamPoolsClient) getHandleResponse(resp *http.Response) (IpamPoolsClientGetResponse, error) { + result := IpamPoolsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IpamPool); err != nil { + return IpamPoolsClientGetResponse{}, err + } + return result, nil +} + +// GetPoolUsage - Get the Pool Usage. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - poolName - Pool resource name. +// - options - IpamPoolsClientGetPoolUsageOptions contains the optional parameters for the IpamPoolsClient.GetPoolUsage method. +func (client *IpamPoolsClient) GetPoolUsage(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientGetPoolUsageOptions) (IpamPoolsClientGetPoolUsageResponse, error) { + var err error + const operationName = "IpamPoolsClient.GetPoolUsage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPoolUsageCreateRequest(ctx, resourceGroupName, networkManagerName, poolName, options) + if err != nil { + return IpamPoolsClientGetPoolUsageResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IpamPoolsClientGetPoolUsageResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IpamPoolsClientGetPoolUsageResponse{}, err + } + resp, err := client.getPoolUsageHandleResponse(httpResp) + return resp, err +} + +// getPoolUsageCreateRequest creates the GetPoolUsage request. +func (client *IpamPoolsClient) getPoolUsageCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientGetPoolUsageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/getPoolUsage" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPoolUsageHandleResponse handles the GetPoolUsage response. +func (client *IpamPoolsClient) getPoolUsageHandleResponse(resp *http.Response) (IpamPoolsClientGetPoolUsageResponse, error) { + result := IpamPoolsClientGetPoolUsageResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PoolUsage); err != nil { + return IpamPoolsClientGetPoolUsageResponse{}, err + } + return result, nil +} + +// NewListPager - Gets list of Pool resources at Network Manager level. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - IpamPoolsClientListOptions contains the optional parameters for the IpamPoolsClient.NewListPager method. +func (client *IpamPoolsClient) NewListPager(resourceGroupName string, networkManagerName string, options *IpamPoolsClientListOptions) *runtime.Pager[IpamPoolsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[IpamPoolsClientListResponse]{ + More: func(page IpamPoolsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *IpamPoolsClientListResponse) (IpamPoolsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IpamPoolsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) + if err != nil { + return IpamPoolsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *IpamPoolsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *IpamPoolsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Skip != nil { + reqQP.Set("skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + if options != nil && options.SortKey != nil { + reqQP.Set("sortKey", *options.SortKey) + } + if options != nil && options.SortValue != nil { + reqQP.Set("sortValue", *options.SortValue) + } + if options != nil && options.Top != nil { + reqQP.Set("top", strconv.FormatInt(int64(*options.Top), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *IpamPoolsClient) listHandleResponse(resp *http.Response) (IpamPoolsClientListResponse, error) { + result := IpamPoolsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IpamPoolList); err != nil { + return IpamPoolsClientListResponse{}, err + } + return result, nil +} + +// NewListAssociatedResourcesPager - List Associated Resource in the Pool. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - poolName - Pool resource name. +// - options - IpamPoolsClientListAssociatedResourcesOptions contains the optional parameters for the IpamPoolsClient.NewListAssociatedResourcesPager +// method. +func (client *IpamPoolsClient) NewListAssociatedResourcesPager(resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientListAssociatedResourcesOptions) *runtime.Pager[IpamPoolsClientListAssociatedResourcesResponse] { + return runtime.NewPager(runtime.PagingHandler[IpamPoolsClientListAssociatedResourcesResponse]{ + More: func(page IpamPoolsClientListAssociatedResourcesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *IpamPoolsClientListAssociatedResourcesResponse) (IpamPoolsClientListAssociatedResourcesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IpamPoolsClient.NewListAssociatedResourcesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAssociatedResourcesCreateRequest(ctx, resourceGroupName, networkManagerName, poolName, options) + }, nil) + if err != nil { + return IpamPoolsClientListAssociatedResourcesResponse{}, err + } + return client.listAssociatedResourcesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAssociatedResourcesCreateRequest creates the ListAssociatedResources request. +func (client *IpamPoolsClient) listAssociatedResourcesCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientListAssociatedResourcesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/listAssociatedResources" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAssociatedResourcesHandleResponse handles the ListAssociatedResources response. +func (client *IpamPoolsClient) listAssociatedResourcesHandleResponse(resp *http.Response) (IpamPoolsClientListAssociatedResourcesResponse, error) { + result := IpamPoolsClientListAssociatedResourcesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PoolAssociationList); err != nil { + return IpamPoolsClientListAssociatedResourcesResponse{}, err + } + return result, nil +} + +// Update - Updates the specific Pool resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - poolName - IP Address Manager Pool resource name. +// - options - IpamPoolsClientUpdateOptions contains the optional parameters for the IpamPoolsClient.Update method. +func (client *IpamPoolsClient) Update(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientUpdateOptions) (IpamPoolsClientUpdateResponse, error) { + var err error + const operationName = "IpamPoolsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, networkManagerName, poolName, options) + if err != nil { + return IpamPoolsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IpamPoolsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IpamPoolsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *IpamPoolsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *IpamPoolsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *IpamPoolsClient) updateHandleResponse(resp *http.Response) (IpamPoolsClientUpdateResponse, error) { + result := IpamPoolsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IpamPool); err != nil { + return IpamPoolsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ipgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ipgroups_client.go new file mode 100644 index 00000000..4bbb8e0b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/ipgroups_client.go @@ -0,0 +1,451 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// IPGroupsClient contains the methods for the IPGroups group. +// Don't use this type directly, use NewIPGroupsClient() instead. +type IPGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewIPGroupsClient creates a new instance of IPGroupsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewIPGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &IPGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an ipGroups in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ipGroupsName - The name of the ipGroups. +// - parameters - Parameters supplied to the create or update IpGroups operation. +// - options - IPGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPGroupsClient.BeginCreateOrUpdate +// method. +func (client *IPGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters IPGroup, options *IPGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[IPGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, ipGroupsName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an ipGroups in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *IPGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters IPGroup, options *IPGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "IPGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ipGroupsName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *IPGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters IPGroup, options *IPGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ipGroupsName == "" { + return nil, errors.New("parameter ipGroupsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipGroupsName}", url.PathEscape(ipGroupsName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified ipGroups. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ipGroupsName - The name of the ipGroups. +// - options - IPGroupsClientBeginDeleteOptions contains the optional parameters for the IPGroupsClient.BeginDelete method. +func (client *IPGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientBeginDeleteOptions) (*runtime.Poller[IPGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, ipGroupsName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IPGroupsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IPGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified ipGroups. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *IPGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "IPGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, ipGroupsName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *IPGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ipGroupsName == "" { + return nil, errors.New("parameter ipGroupsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipGroupsName}", url.PathEscape(ipGroupsName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified ipGroups. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ipGroupsName - The name of the ipGroups. +// - options - IPGroupsClientGetOptions contains the optional parameters for the IPGroupsClient.Get method. +func (client *IPGroupsClient) Get(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientGetOptions) (IPGroupsClientGetResponse, error) { + var err error + const operationName = "IPGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, ipGroupsName, options) + if err != nil { + return IPGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IPGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IPGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *IPGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ipGroupsName == "" { + return nil, errors.New("parameter ipGroupsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipGroupsName}", url.PathEscape(ipGroupsName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *IPGroupsClient) getHandleResponse(resp *http.Response) (IPGroupsClientGetResponse, error) { + result := IPGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPGroup); err != nil { + return IPGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all IpGroups in a subscription. +// +// Generated from API version 2024-05-01 +// - options - IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.NewListPager method. +func (client *IPGroupsClient) NewListPager(options *IPGroupsClientListOptions) *runtime.Pager[IPGroupsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[IPGroupsClientListResponse]{ + More: func(page IPGroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *IPGroupsClientListResponse) (IPGroupsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IPGroupsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return IPGroupsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *IPGroupsClient) listCreateRequest(ctx context.Context, options *IPGroupsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *IPGroupsClient) listHandleResponse(resp *http.Response) (IPGroupsClientListResponse, error) { + result := IPGroupsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPGroupListResult); err != nil { + return IPGroupsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets all IpGroups in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.NewListByResourceGroupPager +// method. +func (client *IPGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *IPGroupsClientListByResourceGroupOptions) *runtime.Pager[IPGroupsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[IPGroupsClientListByResourceGroupResponse]{ + More: func(page IPGroupsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *IPGroupsClientListByResourceGroupResponse) (IPGroupsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IPGroupsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return IPGroupsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *IPGroupsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *IPGroupsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *IPGroupsClient) listByResourceGroupHandleResponse(resp *http.Response) (IPGroupsClientListByResourceGroupResponse, error) { + result := IPGroupsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPGroupListResult); err != nil { + return IPGroupsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateGroups - Updates tags of an IpGroups resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - ipGroupsName - The name of the ipGroups. +// - parameters - Parameters supplied to the update ipGroups operation. +// - options - IPGroupsClientUpdateGroupsOptions contains the optional parameters for the IPGroupsClient.UpdateGroups method. +func (client *IPGroupsClient) UpdateGroups(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters TagsObject, options *IPGroupsClientUpdateGroupsOptions) (IPGroupsClientUpdateGroupsResponse, error) { + var err error + const operationName = "IPGroupsClient.UpdateGroups" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateGroupsCreateRequest(ctx, resourceGroupName, ipGroupsName, parameters, options) + if err != nil { + return IPGroupsClientUpdateGroupsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return IPGroupsClientUpdateGroupsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return IPGroupsClientUpdateGroupsResponse{}, err + } + resp, err := client.updateGroupsHandleResponse(httpResp) + return resp, err +} + +// updateGroupsCreateRequest creates the UpdateGroups request. +func (client *IPGroupsClient) updateGroupsCreateRequest(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters TagsObject, options *IPGroupsClientUpdateGroupsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if ipGroupsName == "" { + return nil, errors.New("parameter ipGroupsName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipGroupsName}", url.PathEscape(ipGroupsName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateGroupsHandleResponse handles the UpdateGroups response. +func (client *IPGroupsClient) updateGroupsHandleResponse(resp *http.Response) (IPGroupsClientUpdateGroupsResponse, error) { + result := IPGroupsClientUpdateGroupsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPGroup); err != nil { + return IPGroupsClientUpdateGroupsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerbackendaddresspools_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerbackendaddresspools_client.go new file mode 100644 index 00000000..23379642 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerbackendaddresspools_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LoadBalancerBackendAddressPoolsClient contains the methods for the LoadBalancerBackendAddressPools group. +// Don't use this type directly, use NewLoadBalancerBackendAddressPoolsClient() instead. +type LoadBalancerBackendAddressPoolsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLoadBalancerBackendAddressPoolsClient creates a new instance of LoadBalancerBackendAddressPoolsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerBackendAddressPoolsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LoadBalancerBackendAddressPoolsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a load balancer backend address pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - backendAddressPoolName - The name of the backend address pool. +// - parameters - Parameters supplied to the create or update load balancer backend address pool operation. +// - options - LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate +// method. +func (client *LoadBalancerBackendAddressPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool, options *LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a load balancer backend address pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *LoadBalancerBackendAddressPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool, options *LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *LoadBalancerBackendAddressPoolsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool, options *LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if backendAddressPoolName == "" { + return nil, errors.New("parameter backendAddressPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backendAddressPoolName}", url.PathEscape(backendAddressPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified load balancer backend address pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - backendAddressPoolName - The name of the backend address pool. +// - options - LoadBalancerBackendAddressPoolsClientBeginDeleteOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginDelete +// method. +func (client *LoadBalancerBackendAddressPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientBeginDeleteOptions) (*runtime.Poller[LoadBalancerBackendAddressPoolsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancerBackendAddressPoolsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancerBackendAddressPoolsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified load balancer backend address pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *LoadBalancerBackendAddressPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "LoadBalancerBackendAddressPoolsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *LoadBalancerBackendAddressPoolsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if backendAddressPoolName == "" { + return nil, errors.New("parameter backendAddressPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backendAddressPoolName}", url.PathEscape(backendAddressPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets load balancer backend address pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - backendAddressPoolName - The name of the backend address pool. +// - options - LoadBalancerBackendAddressPoolsClientGetOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.Get +// method. +func (client *LoadBalancerBackendAddressPoolsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientGetOptions) (LoadBalancerBackendAddressPoolsClientGetResponse, error) { + var err error + const operationName = "LoadBalancerBackendAddressPoolsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) + if err != nil { + return LoadBalancerBackendAddressPoolsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LoadBalancerBackendAddressPoolsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoadBalancerBackendAddressPoolsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LoadBalancerBackendAddressPoolsClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if backendAddressPoolName == "" { + return nil, errors.New("parameter backendAddressPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backendAddressPoolName}", url.PathEscape(backendAddressPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LoadBalancerBackendAddressPoolsClient) getHandleResponse(resp *http.Response) (LoadBalancerBackendAddressPoolsClientGetResponse, error) { + result := LoadBalancerBackendAddressPoolsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackendAddressPool); err != nil { + return LoadBalancerBackendAddressPoolsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the load balancer backed address pools. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.NewListPager +// method. +func (client *LoadBalancerBackendAddressPoolsClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerBackendAddressPoolsClientListOptions) *runtime.Pager[LoadBalancerBackendAddressPoolsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[LoadBalancerBackendAddressPoolsClientListResponse]{ + More: func(page LoadBalancerBackendAddressPoolsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LoadBalancerBackendAddressPoolsClientListResponse) (LoadBalancerBackendAddressPoolsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerBackendAddressPoolsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) + if err != nil { + return LoadBalancerBackendAddressPoolsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *LoadBalancerBackendAddressPoolsClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerBackendAddressPoolsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LoadBalancerBackendAddressPoolsClient) listHandleResponse(resp *http.Response) (LoadBalancerBackendAddressPoolsClientListResponse, error) { + result := LoadBalancerBackendAddressPoolsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerBackendAddressPoolListResult); err != nil { + return LoadBalancerBackendAddressPoolsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerfrontendipconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerfrontendipconfigurations_client.go new file mode 100644 index 00000000..c5a4b6f8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerfrontendipconfigurations_client.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LoadBalancerFrontendIPConfigurationsClient contains the methods for the LoadBalancerFrontendIPConfigurations group. +// Don't use this type directly, use NewLoadBalancerFrontendIPConfigurationsClient() instead. +type LoadBalancerFrontendIPConfigurationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLoadBalancerFrontendIPConfigurationsClient creates a new instance of LoadBalancerFrontendIPConfigurationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerFrontendIPConfigurationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LoadBalancerFrontendIPConfigurationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets load balancer frontend IP configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - frontendIPConfigurationName - The name of the frontend IP configuration. +// - options - LoadBalancerFrontendIPConfigurationsClientGetOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.Get +// method. +func (client *LoadBalancerFrontendIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string, options *LoadBalancerFrontendIPConfigurationsClientGetOptions) (LoadBalancerFrontendIPConfigurationsClientGetResponse, error) { + var err error + const operationName = "LoadBalancerFrontendIPConfigurationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, frontendIPConfigurationName, options) + if err != nil { + return LoadBalancerFrontendIPConfigurationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LoadBalancerFrontendIPConfigurationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoadBalancerFrontendIPConfigurationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LoadBalancerFrontendIPConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string, options *LoadBalancerFrontendIPConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if frontendIPConfigurationName == "" { + return nil, errors.New("parameter frontendIPConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{frontendIPConfigurationName}", url.PathEscape(frontendIPConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LoadBalancerFrontendIPConfigurationsClient) getHandleResponse(resp *http.Response) (LoadBalancerFrontendIPConfigurationsClientGetResponse, error) { + result := LoadBalancerFrontendIPConfigurationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FrontendIPConfiguration); err != nil { + return LoadBalancerFrontendIPConfigurationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the load balancer frontend IP configurations. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.NewListPager +// method. +func (client *LoadBalancerFrontendIPConfigurationsClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerFrontendIPConfigurationsClientListOptions) *runtime.Pager[LoadBalancerFrontendIPConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[LoadBalancerFrontendIPConfigurationsClientListResponse]{ + More: func(page LoadBalancerFrontendIPConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LoadBalancerFrontendIPConfigurationsClientListResponse) (LoadBalancerFrontendIPConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerFrontendIPConfigurationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) + if err != nil { + return LoadBalancerFrontendIPConfigurationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *LoadBalancerFrontendIPConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerFrontendIPConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LoadBalancerFrontendIPConfigurationsClient) listHandleResponse(resp *http.Response) (LoadBalancerFrontendIPConfigurationsClientListResponse, error) { + result := LoadBalancerFrontendIPConfigurationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerFrontendIPConfigurationListResult); err != nil { + return LoadBalancerFrontendIPConfigurationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerloadbalancingrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerloadbalancingrules_client.go new file mode 100644 index 00000000..b8ad74fe --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerloadbalancingrules_client.go @@ -0,0 +1,262 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LoadBalancerLoadBalancingRulesClient contains the methods for the LoadBalancerLoadBalancingRules group. +// Don't use this type directly, use NewLoadBalancerLoadBalancingRulesClient() instead. +type LoadBalancerLoadBalancingRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLoadBalancerLoadBalancingRulesClient creates a new instance of LoadBalancerLoadBalancingRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerLoadBalancingRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LoadBalancerLoadBalancingRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the specified load balancer load balancing rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - loadBalancingRuleName - The name of the load balancing rule. +// - options - LoadBalancerLoadBalancingRulesClientGetOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.Get +// method. +func (client *LoadBalancerLoadBalancingRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string, options *LoadBalancerLoadBalancingRulesClientGetOptions) (LoadBalancerLoadBalancingRulesClientGetResponse, error) { + var err error + const operationName = "LoadBalancerLoadBalancingRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, loadBalancingRuleName, options) + if err != nil { + return LoadBalancerLoadBalancingRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LoadBalancerLoadBalancingRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoadBalancerLoadBalancingRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LoadBalancerLoadBalancingRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string, options *LoadBalancerLoadBalancingRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if loadBalancingRuleName == "" { + return nil, errors.New("parameter loadBalancingRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancingRuleName}", url.PathEscape(loadBalancingRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LoadBalancerLoadBalancingRulesClient) getHandleResponse(resp *http.Response) (LoadBalancerLoadBalancingRulesClientGetResponse, error) { + result := LoadBalancerLoadBalancingRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancingRule); err != nil { + return LoadBalancerLoadBalancingRulesClientGetResponse{}, err + } + return result, nil +} + +// BeginHealth - Get health details of a load balancing rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - groupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - loadBalancingRuleName - The name of the load balancing rule. +// - options - LoadBalancerLoadBalancingRulesClientBeginHealthOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.BeginHealth +// method. +func (client *LoadBalancerLoadBalancingRulesClient) BeginHealth(ctx context.Context, groupName string, loadBalancerName string, loadBalancingRuleName string, options *LoadBalancerLoadBalancingRulesClientBeginHealthOptions) (*runtime.Poller[LoadBalancerLoadBalancingRulesClientHealthResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.health(ctx, groupName, loadBalancerName, loadBalancingRuleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancerLoadBalancingRulesClientHealthResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancerLoadBalancingRulesClientHealthResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Health - Get health details of a load balancing rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *LoadBalancerLoadBalancingRulesClient) health(ctx context.Context, groupName string, loadBalancerName string, loadBalancingRuleName string, options *LoadBalancerLoadBalancingRulesClientBeginHealthOptions) (*http.Response, error) { + var err error + const operationName = "LoadBalancerLoadBalancingRulesClient.BeginHealth" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.healthCreateRequest(ctx, groupName, loadBalancerName, loadBalancingRuleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// healthCreateRequest creates the Health request. +func (client *LoadBalancerLoadBalancingRulesClient) healthCreateRequest(ctx context.Context, groupName string, loadBalancerName string, loadBalancingRuleName string, options *LoadBalancerLoadBalancingRulesClientBeginHealthOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}/health" + if groupName == "" { + return nil, errors.New("parameter groupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupName}", url.PathEscape(groupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if loadBalancingRuleName == "" { + return nil, errors.New("parameter loadBalancingRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancingRuleName}", url.PathEscape(loadBalancingRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListPager - Gets all the load balancing rules in a load balancer. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.NewListPager +// method. +func (client *LoadBalancerLoadBalancingRulesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerLoadBalancingRulesClientListOptions) *runtime.Pager[LoadBalancerLoadBalancingRulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[LoadBalancerLoadBalancingRulesClientListResponse]{ + More: func(page LoadBalancerLoadBalancingRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LoadBalancerLoadBalancingRulesClientListResponse) (LoadBalancerLoadBalancingRulesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerLoadBalancingRulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) + if err != nil { + return LoadBalancerLoadBalancingRulesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *LoadBalancerLoadBalancingRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerLoadBalancingRulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LoadBalancerLoadBalancingRulesClient) listHandleResponse(resp *http.Response) (LoadBalancerLoadBalancingRulesClientListResponse, error) { + result := LoadBalancerLoadBalancingRulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerLoadBalancingRuleListResult); err != nil { + return LoadBalancerLoadBalancingRulesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancernetworkinterfaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancernetworkinterfaces_client.go new file mode 100644 index 00000000..27426ef6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancernetworkinterfaces_client.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LoadBalancerNetworkInterfacesClient contains the methods for the LoadBalancerNetworkInterfaces group. +// Don't use this type directly, use NewLoadBalancerNetworkInterfacesClient() instead. +type LoadBalancerNetworkInterfacesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLoadBalancerNetworkInterfacesClient creates a new instance of LoadBalancerNetworkInterfacesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLoadBalancerNetworkInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerNetworkInterfacesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LoadBalancerNetworkInterfacesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets associated load balancer network interfaces. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.NewListPager +// method. +func (client *LoadBalancerNetworkInterfacesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerNetworkInterfacesClientListOptions) *runtime.Pager[LoadBalancerNetworkInterfacesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[LoadBalancerNetworkInterfacesClientListResponse]{ + More: func(page LoadBalancerNetworkInterfacesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LoadBalancerNetworkInterfacesClientListResponse) (LoadBalancerNetworkInterfacesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerNetworkInterfacesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) + if err != nil { + return LoadBalancerNetworkInterfacesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *LoadBalancerNetworkInterfacesClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerNetworkInterfacesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LoadBalancerNetworkInterfacesClient) listHandleResponse(resp *http.Response) (LoadBalancerNetworkInterfacesClientListResponse, error) { + result := LoadBalancerNetworkInterfacesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { + return LoadBalancerNetworkInterfacesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalanceroutboundrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalanceroutboundrules_client.go new file mode 100644 index 00000000..d8d9724e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalanceroutboundrules_client.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LoadBalancerOutboundRulesClient contains the methods for the LoadBalancerOutboundRules group. +// Don't use this type directly, use NewLoadBalancerOutboundRulesClient() instead. +type LoadBalancerOutboundRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLoadBalancerOutboundRulesClient creates a new instance of LoadBalancerOutboundRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLoadBalancerOutboundRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerOutboundRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LoadBalancerOutboundRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the specified load balancer outbound rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - outboundRuleName - The name of the outbound rule. +// - options - LoadBalancerOutboundRulesClientGetOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.Get +// method. +func (client *LoadBalancerOutboundRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string, options *LoadBalancerOutboundRulesClientGetOptions) (LoadBalancerOutboundRulesClientGetResponse, error) { + var err error + const operationName = "LoadBalancerOutboundRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, outboundRuleName, options) + if err != nil { + return LoadBalancerOutboundRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LoadBalancerOutboundRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoadBalancerOutboundRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LoadBalancerOutboundRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string, options *LoadBalancerOutboundRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if outboundRuleName == "" { + return nil, errors.New("parameter outboundRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{outboundRuleName}", url.PathEscape(outboundRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LoadBalancerOutboundRulesClient) getHandleResponse(resp *http.Response) (LoadBalancerOutboundRulesClientGetResponse, error) { + result := LoadBalancerOutboundRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OutboundRule); err != nil { + return LoadBalancerOutboundRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the outbound rules in a load balancer. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.NewListPager +// method. +func (client *LoadBalancerOutboundRulesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerOutboundRulesClientListOptions) *runtime.Pager[LoadBalancerOutboundRulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[LoadBalancerOutboundRulesClientListResponse]{ + More: func(page LoadBalancerOutboundRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LoadBalancerOutboundRulesClientListResponse) (LoadBalancerOutboundRulesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerOutboundRulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) + if err != nil { + return LoadBalancerOutboundRulesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *LoadBalancerOutboundRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerOutboundRulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LoadBalancerOutboundRulesClient) listHandleResponse(resp *http.Response) (LoadBalancerOutboundRulesClientListResponse, error) { + result := LoadBalancerOutboundRulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerOutboundRuleListResult); err != nil { + return LoadBalancerOutboundRulesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerprobes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerprobes_client.go new file mode 100644 index 00000000..5e52e1b3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancerprobes_client.go @@ -0,0 +1,179 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LoadBalancerProbesClient contains the methods for the LoadBalancerProbes group. +// Don't use this type directly, use NewLoadBalancerProbesClient() instead. +type LoadBalancerProbesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLoadBalancerProbesClient creates a new instance of LoadBalancerProbesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLoadBalancerProbesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerProbesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LoadBalancerProbesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets load balancer probe. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - probeName - The name of the probe. +// - options - LoadBalancerProbesClientGetOptions contains the optional parameters for the LoadBalancerProbesClient.Get method. +func (client *LoadBalancerProbesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string, options *LoadBalancerProbesClientGetOptions) (LoadBalancerProbesClientGetResponse, error) { + var err error + const operationName = "LoadBalancerProbesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, probeName, options) + if err != nil { + return LoadBalancerProbesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LoadBalancerProbesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoadBalancerProbesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LoadBalancerProbesClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string, options *LoadBalancerProbesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if probeName == "" { + return nil, errors.New("parameter probeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{probeName}", url.PathEscape(probeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LoadBalancerProbesClient) getHandleResponse(resp *http.Response) (LoadBalancerProbesClientGetResponse, error) { + result := LoadBalancerProbesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Probe); err != nil { + return LoadBalancerProbesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the load balancer probes. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.NewListPager +// method. +func (client *LoadBalancerProbesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerProbesClientListOptions) *runtime.Pager[LoadBalancerProbesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[LoadBalancerProbesClientListResponse]{ + More: func(page LoadBalancerProbesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LoadBalancerProbesClientListResponse) (LoadBalancerProbesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancerProbesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + }, nil) + if err != nil { + return LoadBalancerProbesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *LoadBalancerProbesClient) listCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancerProbesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LoadBalancerProbesClient) listHandleResponse(resp *http.Response) (LoadBalancerProbesClientListResponse, error) { + result := LoadBalancerProbesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerProbeListResult); err != nil { + return LoadBalancerProbesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancers_client.go new file mode 100644 index 00000000..0b71a6fe --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/loadbalancers_client.go @@ -0,0 +1,686 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LoadBalancersClient contains the methods for the LoadBalancers group. +// Don't use this type directly, use NewLoadBalancersClient() instead. +type LoadBalancersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLoadBalancersClient creates a new instance of LoadBalancersClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LoadBalancersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a load balancer. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - parameters - Parameters supplied to the create or update load balancer operation. +// - options - LoadBalancersClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.BeginCreateOrUpdate +// method. +func (client *LoadBalancersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientBeginCreateOrUpdateOptions) (*runtime.Poller[LoadBalancersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a load balancer. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *LoadBalancersClient) createOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "LoadBalancersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, loadBalancerName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *LoadBalancersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified load balancer. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete +// method. +func (client *LoadBalancersClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*runtime.Poller[LoadBalancersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified load balancer. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *LoadBalancersClient) deleteOperation(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "LoadBalancersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *LoadBalancersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified load balancer. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. +func (client *LoadBalancersClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientGetOptions) (LoadBalancersClientGetResponse, error) { + var err error + const operationName = "LoadBalancersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + if err != nil { + return LoadBalancersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LoadBalancersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoadBalancersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LoadBalancersClient) getCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LoadBalancersClient) getHandleResponse(resp *http.Response) (LoadBalancersClientGetResponse, error) { + result := LoadBalancersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancer); err != nil { + return LoadBalancersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the load balancers in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.NewListPager method. +func (client *LoadBalancersClient) NewListPager(resourceGroupName string, options *LoadBalancersClientListOptions) *runtime.Pager[LoadBalancersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[LoadBalancersClientListResponse]{ + More: func(page LoadBalancersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LoadBalancersClientListResponse) (LoadBalancersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return LoadBalancersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *LoadBalancersClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *LoadBalancersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LoadBalancersClient) listHandleResponse(resp *http.Response) (LoadBalancersClientListResponse, error) { + result := LoadBalancersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerListResult); err != nil { + return LoadBalancersClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the load balancers in a subscription. +// +// Generated from API version 2024-05-01 +// - options - LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.NewListAllPager +// method. +func (client *LoadBalancersClient) NewListAllPager(options *LoadBalancersClientListAllOptions) *runtime.Pager[LoadBalancersClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[LoadBalancersClientListAllResponse]{ + More: func(page LoadBalancersClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LoadBalancersClientListAllResponse) (LoadBalancersClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancersClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return LoadBalancersClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *LoadBalancersClient) listAllCreateRequest(ctx context.Context, options *LoadBalancersClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *LoadBalancersClient) listAllHandleResponse(resp *http.Response) (LoadBalancersClientListAllResponse, error) { + result := LoadBalancersClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerListResult); err != nil { + return LoadBalancersClientListAllResponse{}, err + } + return result, nil +} + +// BeginListInboundNatRulePortMappings - List of inbound NAT rule port mappings. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - groupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - backendPoolName - The name of the load balancer backend address pool. +// - parameters - Query inbound NAT rule port mapping request. +// - options - LoadBalancersClientBeginListInboundNatRulePortMappingsOptions contains the optional parameters for the LoadBalancersClient.BeginListInboundNatRulePortMappings +// method. +func (client *LoadBalancersClient) BeginListInboundNatRulePortMappings(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest, options *LoadBalancersClientBeginListInboundNatRulePortMappingsOptions) (*runtime.Poller[LoadBalancersClientListInboundNatRulePortMappingsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listInboundNatRulePortMappings(ctx, groupName, loadBalancerName, backendPoolName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancersClientListInboundNatRulePortMappingsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancersClientListInboundNatRulePortMappingsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListInboundNatRulePortMappings - List of inbound NAT rule port mappings. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *LoadBalancersClient) listInboundNatRulePortMappings(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest, options *LoadBalancersClientBeginListInboundNatRulePortMappingsOptions) (*http.Response, error) { + var err error + const operationName = "LoadBalancersClient.BeginListInboundNatRulePortMappings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listInboundNatRulePortMappingsCreateRequest(ctx, groupName, loadBalancerName, backendPoolName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listInboundNatRulePortMappingsCreateRequest creates the ListInboundNatRulePortMappings request. +func (client *LoadBalancersClient) listInboundNatRulePortMappingsCreateRequest(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest, options *LoadBalancersClientBeginListInboundNatRulePortMappingsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping" + if groupName == "" { + return nil, errors.New("parameter groupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupName}", url.PathEscape(groupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if backendPoolName == "" { + return nil, errors.New("parameter backendPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backendPoolName}", url.PathEscape(backendPoolName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// MigrateToIPBased - Migrate load balancer to IP Based +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - groupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancersClientMigrateToIPBasedOptions contains the optional parameters for the LoadBalancersClient.MigrateToIPBased +// method. +func (client *LoadBalancersClient) MigrateToIPBased(ctx context.Context, groupName string, loadBalancerName string, options *LoadBalancersClientMigrateToIPBasedOptions) (LoadBalancersClientMigrateToIPBasedResponse, error) { + var err error + const operationName = "LoadBalancersClient.MigrateToIPBased" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateToIPBasedCreateRequest(ctx, groupName, loadBalancerName, options) + if err != nil { + return LoadBalancersClientMigrateToIPBasedResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LoadBalancersClientMigrateToIPBasedResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoadBalancersClientMigrateToIPBasedResponse{}, err + } + resp, err := client.migrateToIPBasedHandleResponse(httpResp) + return resp, err +} + +// migrateToIPBasedCreateRequest creates the MigrateToIPBased request. +func (client *LoadBalancersClient) migrateToIPBasedCreateRequest(ctx context.Context, groupName string, loadBalancerName string, options *LoadBalancersClientMigrateToIPBasedOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/migrateToIpBased" + if groupName == "" { + return nil, errors.New("parameter groupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupName}", url.PathEscape(groupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// migrateToIPBasedHandleResponse handles the MigrateToIPBased response. +func (client *LoadBalancersClient) migrateToIPBasedHandleResponse(resp *http.Response) (LoadBalancersClientMigrateToIPBasedResponse, error) { + result := LoadBalancersClientMigrateToIPBasedResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MigratedPools); err != nil { + return LoadBalancersClientMigrateToIPBasedResponse{}, err + } + return result, nil +} + +// BeginSwapPublicIPAddresses - Swaps VIPs between two load balancers. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - location - The region where load balancers are located at. +// - parameters - Parameters that define which VIPs should be swapped. +// - options - LoadBalancersClientBeginSwapPublicIPAddressesOptions contains the optional parameters for the LoadBalancersClient.BeginSwapPublicIPAddresses +// method. +func (client *LoadBalancersClient) BeginSwapPublicIPAddresses(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest, options *LoadBalancersClientBeginSwapPublicIPAddressesOptions) (*runtime.Poller[LoadBalancersClientSwapPublicIPAddressesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.swapPublicIPAddresses(ctx, location, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancersClientSwapPublicIPAddressesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancersClientSwapPublicIPAddressesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SwapPublicIPAddresses - Swaps VIPs between two load balancers. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *LoadBalancersClient) swapPublicIPAddresses(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest, options *LoadBalancersClientBeginSwapPublicIPAddressesOptions) (*http.Response, error) { + var err error + const operationName = "LoadBalancersClient.BeginSwapPublicIPAddresses" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.swapPublicIPAddressesCreateRequest(ctx, location, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// swapPublicIPAddressesCreateRequest creates the SwapPublicIPAddresses request. +func (client *LoadBalancersClient) swapPublicIPAddressesCreateRequest(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest, options *LoadBalancersClientBeginSwapPublicIPAddressesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// UpdateTags - Updates a load balancer tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - parameters - Parameters supplied to update load balancer tags. +// - options - LoadBalancersClientUpdateTagsOptions contains the optional parameters for the LoadBalancersClient.UpdateTags +// method. +func (client *LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject, options *LoadBalancersClientUpdateTagsOptions) (LoadBalancersClientUpdateTagsResponse, error) { + var err error + const operationName = "LoadBalancersClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, loadBalancerName, parameters, options) + if err != nil { + return LoadBalancersClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LoadBalancersClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LoadBalancersClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *LoadBalancersClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject, options *LoadBalancersClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if loadBalancerName == "" { + return nil, errors.New("parameter loadBalancerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *LoadBalancersClient) updateTagsHandleResponse(resp *http.Response) (LoadBalancersClientUpdateTagsResponse, error) { + result := LoadBalancersClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancer); err != nil { + return LoadBalancersClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/localnetworkgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/localnetworkgateways_client.go new file mode 100644 index 00000000..4bcfa427 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/localnetworkgateways_client.go @@ -0,0 +1,397 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// LocalNetworkGatewaysClient contains the methods for the LocalNetworkGateways group. +// Don't use this type directly, use NewLocalNetworkGatewaysClient() instead. +type LocalNetworkGatewaysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewLocalNetworkGatewaysClient creates a new instance of LocalNetworkGatewaysClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewLocalNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocalNetworkGatewaysClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &LocalNetworkGatewaysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a local network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - localNetworkGatewayName - The name of the local network gateway. +// - parameters - Parameters supplied to the create or update local network gateway operation. +// - options - LocalNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginCreateOrUpdate +// method. +func (client *LocalNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, options *LocalNetworkGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[LocalNetworkGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalNetworkGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LocalNetworkGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a local network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *LocalNetworkGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, options *LocalNetworkGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "LocalNetworkGatewaysClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *LocalNetworkGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, options *LocalNetworkGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if localNetworkGatewayName == "" { + return nil, errors.New("parameter localNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{localNetworkGatewayName}", url.PathEscape(localNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified local network gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - localNetworkGatewayName - The name of the local network gateway. +// - options - LocalNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginDelete +// method. +func (client *LocalNetworkGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientBeginDeleteOptions) (*runtime.Poller[LocalNetworkGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, localNetworkGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LocalNetworkGatewaysClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LocalNetworkGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified local network gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *LocalNetworkGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "LocalNetworkGatewaysClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *LocalNetworkGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if localNetworkGatewayName == "" { + return nil, errors.New("parameter localNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{localNetworkGatewayName}", url.PathEscape(localNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified local network gateway in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - localNetworkGatewayName - The name of the local network gateway. +// - options - LocalNetworkGatewaysClientGetOptions contains the optional parameters for the LocalNetworkGatewaysClient.Get +// method. +func (client *LocalNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientGetOptions) (LocalNetworkGatewaysClientGetResponse, error) { + var err error + const operationName = "LocalNetworkGatewaysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, options) + if err != nil { + return LocalNetworkGatewaysClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LocalNetworkGatewaysClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalNetworkGatewaysClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *LocalNetworkGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if localNetworkGatewayName == "" { + return nil, errors.New("parameter localNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{localNetworkGatewayName}", url.PathEscape(localNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LocalNetworkGatewaysClient) getHandleResponse(resp *http.Response) (LocalNetworkGatewaysClientGetResponse, error) { + result := LocalNetworkGatewaysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LocalNetworkGateway); err != nil { + return LocalNetworkGatewaysClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the local network gateways in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.NewListPager +// method. +func (client *LocalNetworkGatewaysClient) NewListPager(resourceGroupName string, options *LocalNetworkGatewaysClientListOptions) *runtime.Pager[LocalNetworkGatewaysClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[LocalNetworkGatewaysClientListResponse]{ + More: func(page LocalNetworkGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LocalNetworkGatewaysClientListResponse) (LocalNetworkGatewaysClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LocalNetworkGatewaysClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return LocalNetworkGatewaysClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *LocalNetworkGatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *LocalNetworkGatewaysClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LocalNetworkGatewaysClient) listHandleResponse(resp *http.Response) (LocalNetworkGatewaysClientListResponse, error) { + result := LocalNetworkGatewaysClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LocalNetworkGatewayListResult); err != nil { + return LocalNetworkGatewaysClientListResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates a local network gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - localNetworkGatewayName - The name of the local network gateway. +// - parameters - Parameters supplied to update local network gateway tags. +// - options - LocalNetworkGatewaysClientUpdateTagsOptions contains the optional parameters for the LocalNetworkGatewaysClient.UpdateTags +// method. +func (client *LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject, options *LocalNetworkGatewaysClientUpdateTagsOptions) (LocalNetworkGatewaysClientUpdateTagsResponse, error) { + var err error + const operationName = "LocalNetworkGatewaysClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) + if err != nil { + return LocalNetworkGatewaysClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return LocalNetworkGatewaysClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return LocalNetworkGatewaysClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *LocalNetworkGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject, options *LocalNetworkGatewaysClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if localNetworkGatewayName == "" { + return nil, errors.New("parameter localNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{localNetworkGatewayName}", url.PathEscape(localNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *LocalNetworkGatewaysClient) updateTagsHandleResponse(resp *http.Response) (LocalNetworkGatewaysClientUpdateTagsResponse, error) { + result := LocalNetworkGatewaysClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LocalNetworkGateway); err != nil { + return LocalNetworkGatewaysClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/management_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/management_client.go new file mode 100644 index 00000000..e2532f6f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/management_client.go @@ -0,0 +1,1113 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ManagementClient contains the methods for the NetworkManagementClient group. +// Don't use this type directly, use NewManagementClient() instead. +type ManagementClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagementClient creates a new instance of ManagementClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagementClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckDNSNameAvailability - Checks whether a domain name in the cloudapp.azure.com zone is available for use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - location - The location of the domain name. +// - domainNameLabel - The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. +// - options - ManagementClientCheckDNSNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDNSNameAvailability +// method. +func (client *ManagementClient) CheckDNSNameAvailability(ctx context.Context, location string, domainNameLabel string, options *ManagementClientCheckDNSNameAvailabilityOptions) (ManagementClientCheckDNSNameAvailabilityResponse, error) { + var err error + const operationName = "ManagementClient.CheckDNSNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkDNSNameAvailabilityCreateRequest(ctx, location, domainNameLabel, options) + if err != nil { + return ManagementClientCheckDNSNameAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientCheckDNSNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientCheckDNSNameAvailabilityResponse{}, err + } + resp, err := client.checkDNSNameAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkDNSNameAvailabilityCreateRequest creates the CheckDNSNameAvailability request. +func (client *ManagementClient) checkDNSNameAvailabilityCreateRequest(ctx context.Context, location string, domainNameLabel string, options *ManagementClientCheckDNSNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + reqQP.Set("domainNameLabel", domainNameLabel) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// checkDNSNameAvailabilityHandleResponse handles the CheckDNSNameAvailability response. +func (client *ManagementClient) checkDNSNameAvailabilityHandleResponse(resp *http.Response) (ManagementClientCheckDNSNameAvailabilityResponse, error) { + result := ManagementClientCheckDNSNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DNSNameAvailabilityResult); err != nil { + return ManagementClientCheckDNSNameAvailabilityResponse{}, err + } + return result, nil +} + +// BeginDeleteBastionShareableLink - Deletes the Bastion Shareable Links for all the VMs specified in the request. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - bslRequest - Post request for Create/Delete/Get Bastion Shareable Link endpoints. +// - options - ManagementClientBeginDeleteBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLink +// method. +func (client *ManagementClient) BeginDeleteBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginDeleteBastionShareableLinkOptions) (*runtime.Poller[ManagementClientDeleteBastionShareableLinkResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagementClientDeleteBastionShareableLinkResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagementClientDeleteBastionShareableLinkResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeleteBastionShareableLink - Deletes the Bastion Shareable Links for all the VMs specified in the request. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ManagementClient) deleteBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginDeleteBastionShareableLinkOptions) (*http.Response, error) { + var err error + const operationName = "ManagementClient.BeginDeleteBastionShareableLink" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteBastionShareableLinkCreateRequest creates the DeleteBastionShareableLink request. +func (client *ManagementClient) deleteBastionShareableLinkCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginDeleteBastionShareableLinkOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if bastionHostName == "" { + return nil, errors.New("parameter bastionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, bslRequest); err != nil { + return nil, err + } + return req, nil +} + +// BeginDeleteBastionShareableLinkByToken - Deletes the Bastion Shareable Links for all the tokens specified in the request. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - bslTokenRequest - Post request for Delete Bastion Shareable Link By Token endpoint. +// - options - ManagementClientBeginDeleteBastionShareableLinkByTokenOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLinkByToken +// method. +func (client *ManagementClient) BeginDeleteBastionShareableLinkByToken(ctx context.Context, resourceGroupName string, bastionHostName string, bslTokenRequest BastionShareableLinkTokenListRequest, options *ManagementClientBeginDeleteBastionShareableLinkByTokenOptions) (*runtime.Poller[ManagementClientDeleteBastionShareableLinkByTokenResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteBastionShareableLinkByToken(ctx, resourceGroupName, bastionHostName, bslTokenRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagementClientDeleteBastionShareableLinkByTokenResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagementClientDeleteBastionShareableLinkByTokenResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeleteBastionShareableLinkByToken - Deletes the Bastion Shareable Links for all the tokens specified in the request. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ManagementClient) deleteBastionShareableLinkByToken(ctx context.Context, resourceGroupName string, bastionHostName string, bslTokenRequest BastionShareableLinkTokenListRequest, options *ManagementClientBeginDeleteBastionShareableLinkByTokenOptions) (*http.Response, error) { + var err error + const operationName = "ManagementClient.BeginDeleteBastionShareableLinkByToken" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteBastionShareableLinkByTokenCreateRequest(ctx, resourceGroupName, bastionHostName, bslTokenRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteBastionShareableLinkByTokenCreateRequest creates the DeleteBastionShareableLinkByToken request. +func (client *ManagementClient) deleteBastionShareableLinkByTokenCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, bslTokenRequest BastionShareableLinkTokenListRequest, options *ManagementClientBeginDeleteBastionShareableLinkByTokenOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinksByToken" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if bastionHostName == "" { + return nil, errors.New("parameter bastionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, bslTokenRequest); err != nil { + return nil, err + } + return req, nil +} + +// NewDisconnectActiveSessionsPager - Returns the list of currently active sessions on the Bastion. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - sessionIDs - The list of sessionids to disconnect. +// - options - ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.NewDisconnectActiveSessionsPager +// method. +func (client *ManagementClient) NewDisconnectActiveSessionsPager(resourceGroupName string, bastionHostName string, sessionIDs SessionIDs, options *ManagementClientDisconnectActiveSessionsOptions) *runtime.Pager[ManagementClientDisconnectActiveSessionsResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagementClientDisconnectActiveSessionsResponse]{ + More: func(page ManagementClientDisconnectActiveSessionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagementClientDisconnectActiveSessionsResponse) (ManagementClientDisconnectActiveSessionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementClient.NewDisconnectActiveSessionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.disconnectActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, sessionIDs, options) + }, nil) + if err != nil { + return ManagementClientDisconnectActiveSessionsResponse{}, err + } + return client.disconnectActiveSessionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// disconnectActiveSessionsCreateRequest creates the DisconnectActiveSessions request. +func (client *ManagementClient) disconnectActiveSessionsCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, sessionIDs SessionIDs, options *ManagementClientDisconnectActiveSessionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if bastionHostName == "" { + return nil, errors.New("parameter bastionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, sessionIDs); err != nil { + return nil, err + } + return req, nil +} + +// disconnectActiveSessionsHandleResponse handles the DisconnectActiveSessions response. +func (client *ManagementClient) disconnectActiveSessionsHandleResponse(resp *http.Response) (ManagementClientDisconnectActiveSessionsResponse, error) { + result := ManagementClientDisconnectActiveSessionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BastionSessionDeleteResult); err != nil { + return ManagementClientDisconnectActiveSessionsResponse{}, err + } + return result, nil +} + +// ExpressRouteProviderPort - Retrieves detail of a provider port. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - providerport - The name of the provider port. +// - options - ManagementClientExpressRouteProviderPortOptions contains the optional parameters for the ManagementClient.ExpressRouteProviderPort +// method. +func (client *ManagementClient) ExpressRouteProviderPort(ctx context.Context, providerport string, options *ManagementClientExpressRouteProviderPortOptions) (ManagementClientExpressRouteProviderPortResponse, error) { + var err error + const operationName = "ManagementClient.ExpressRouteProviderPort" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.expressRouteProviderPortCreateRequest(ctx, providerport, options) + if err != nil { + return ManagementClientExpressRouteProviderPortResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientExpressRouteProviderPortResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientExpressRouteProviderPortResponse{}, err + } + resp, err := client.expressRouteProviderPortHandleResponse(httpResp) + return resp, err +} + +// expressRouteProviderPortCreateRequest creates the ExpressRouteProviderPort request. +func (client *ManagementClient) expressRouteProviderPortCreateRequest(ctx context.Context, providerport string, options *ManagementClientExpressRouteProviderPortOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts/{providerport}" + if providerport == "" { + return nil, errors.New("parameter providerport cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{providerport}", url.PathEscape(providerport)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// expressRouteProviderPortHandleResponse handles the ExpressRouteProviderPort response. +func (client *ManagementClient) expressRouteProviderPortHandleResponse(resp *http.Response) (ManagementClientExpressRouteProviderPortResponse, error) { + result := ManagementClientExpressRouteProviderPortResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteProviderPort); err != nil { + return ManagementClientExpressRouteProviderPortResponse{}, err + } + return result, nil +} + +// BeginGeneratevirtualwanvpnserverconfigurationvpnprofile - Generates a unique VPN profile for P2S clients for VirtualWan +// and associated VpnServerConfiguration combination in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name. +// - virtualWANName - The name of the VirtualWAN whose associated VpnServerConfigurations is needed. +// - vpnClientParams - Parameters supplied to the generate VirtualWan VPN profile generation operation. +// - options - ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions contains the optional parameters +// for the ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile method. +func (client *ManagementClient) BeginGeneratevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVPNProfileParameters, options *ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions) (*runtime.Poller[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.generatevirtualwanvpnserverconfigurationvpnprofile(ctx, resourceGroupName, virtualWANName, vpnClientParams, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Generatevirtualwanvpnserverconfigurationvpnprofile - Generates a unique VPN profile for P2S clients for VirtualWan and +// associated VpnServerConfiguration combination in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ManagementClient) generatevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVPNProfileParameters, options *ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions) (*http.Response, error) { + var err error + const operationName = "ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generatevirtualwanvpnserverconfigurationvpnprofileCreateRequest(ctx, resourceGroupName, virtualWANName, vpnClientParams, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// generatevirtualwanvpnserverconfigurationvpnprofileCreateRequest creates the Generatevirtualwanvpnserverconfigurationvpnprofile request. +func (client *ManagementClient) generatevirtualwanvpnserverconfigurationvpnprofileCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVPNProfileParameters, options *ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualWANName == "" { + return nil, errors.New("parameter virtualWANName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualWANName}", url.PathEscape(virtualWANName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vpnClientParams); err != nil { + return nil, err + } + return req, nil +} + +// BeginGetActiveSessions - Returns the list of currently active sessions on the Bastion. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - options - ManagementClientBeginGetActiveSessionsOptions contains the optional parameters for the ManagementClient.BeginGetActiveSessions +// method. +func (client *ManagementClient) BeginGetActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string, options *ManagementClientBeginGetActiveSessionsOptions) (*runtime.Poller[*runtime.Pager[ManagementClientGetActiveSessionsResponse]], error) { + pager := runtime.NewPager(runtime.PagingHandler[ManagementClientGetActiveSessionsResponse]{ + More: func(page ManagementClientGetActiveSessionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagementClientGetActiveSessionsResponse) (ManagementClientGetActiveSessionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementClient.BeginGetActiveSessions") + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, options) + }, nil) + if err != nil { + return ManagementClientGetActiveSessionsResponse{}, err + } + return client.getActiveSessionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) + if options == nil || options.ResumeToken == "" { + resp, err := client.getActiveSessions(ctx, resourceGroupName, bastionHostName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[ManagementClientGetActiveSessionsResponse]]{ + FinalStateVia: runtime.FinalStateViaLocation, + Response: &pager, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[ManagementClientGetActiveSessionsResponse]]{ + Response: &pager, + Tracer: client.internal.Tracer(), + }) + } +} + +// GetActiveSessions - Returns the list of currently active sessions on the Bastion. +// +// Generated from API version 2024-05-01 +func (client *ManagementClient) getActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string, options *ManagementClientBeginGetActiveSessionsOptions) (*http.Response, error) { + var err error + const operationName = "ManagementClient.BeginGetActiveSessions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getActiveSessionsCreateRequest creates the GetActiveSessions request. +func (client *ManagementClient) getActiveSessionsCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, options *ManagementClientBeginGetActiveSessionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if bastionHostName == "" { + return nil, errors.New("parameter bastionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getActiveSessionsHandleResponse handles the GetActiveSessions response. +func (client *ManagementClient) getActiveSessionsHandleResponse(resp *http.Response) (ManagementClientGetActiveSessionsResponse, error) { + result := ManagementClientGetActiveSessionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BastionActiveSessionListResult); err != nil { + return ManagementClientGetActiveSessionsResponse{}, err + } + return result, nil +} + +// NewGetBastionShareableLinkPager - Return the Bastion Shareable Links for all the VMs specified in the request. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - bslRequest - Post request for Create/Delete/Get Bastion Shareable Link endpoints. +// - options - ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.NewGetBastionShareableLinkPager +// method. +func (client *ManagementClient) NewGetBastionShareableLinkPager(resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientGetBastionShareableLinkOptions) *runtime.Pager[ManagementClientGetBastionShareableLinkResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagementClientGetBastionShareableLinkResponse]{ + More: func(page ManagementClientGetBastionShareableLinkResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagementClientGetBastionShareableLinkResponse) (ManagementClientGetBastionShareableLinkResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementClient.NewGetBastionShareableLinkPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) + }, nil) + if err != nil { + return ManagementClientGetBastionShareableLinkResponse{}, err + } + return client.getBastionShareableLinkHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getBastionShareableLinkCreateRequest creates the GetBastionShareableLink request. +func (client *ManagementClient) getBastionShareableLinkCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientGetBastionShareableLinkOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if bastionHostName == "" { + return nil, errors.New("parameter bastionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, bslRequest); err != nil { + return nil, err + } + return req, nil +} + +// getBastionShareableLinkHandleResponse handles the GetBastionShareableLink response. +func (client *ManagementClient) getBastionShareableLinkHandleResponse(resp *http.Response) (ManagementClientGetBastionShareableLinkResponse, error) { + result := ManagementClientGetBastionShareableLinkResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BastionShareableLinkListResult); err != nil { + return ManagementClientGetBastionShareableLinkResponse{}, err + } + return result, nil +} + +// ListActiveConnectivityConfigurations - Lists active connectivity configurations in a network manager. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Active Configuration Parameter. +// - options - ManagementClientListActiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListActiveConnectivityConfigurations +// method. +func (client *ManagementClient) ListActiveConnectivityConfigurations(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ActiveConfigurationParameter, options *ManagementClientListActiveConnectivityConfigurationsOptions) (ManagementClientListActiveConnectivityConfigurationsResponse, error) { + var err error + const operationName = "ManagementClient.ListActiveConnectivityConfigurations" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listActiveConnectivityConfigurationsCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) + if err != nil { + return ManagementClientListActiveConnectivityConfigurationsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientListActiveConnectivityConfigurationsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientListActiveConnectivityConfigurationsResponse{}, err + } + resp, err := client.listActiveConnectivityConfigurationsHandleResponse(httpResp) + return resp, err +} + +// listActiveConnectivityConfigurationsCreateRequest creates the ListActiveConnectivityConfigurations request. +func (client *ManagementClient) listActiveConnectivityConfigurationsCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ActiveConfigurationParameter, options *ManagementClientListActiveConnectivityConfigurationsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveConnectivityConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listActiveConnectivityConfigurationsHandleResponse handles the ListActiveConnectivityConfigurations response. +func (client *ManagementClient) listActiveConnectivityConfigurationsHandleResponse(resp *http.Response) (ManagementClientListActiveConnectivityConfigurationsResponse, error) { + result := ManagementClientListActiveConnectivityConfigurationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ActiveConnectivityConfigurationsListResult); err != nil { + return ManagementClientListActiveConnectivityConfigurationsResponse{}, err + } + return result, nil +} + +// ListActiveSecurityAdminRules - Lists active security admin rules in a network manager. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Active Configuration Parameter. +// - options - ManagementClientListActiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListActiveSecurityAdminRules +// method. +func (client *ManagementClient) ListActiveSecurityAdminRules(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ActiveConfigurationParameter, options *ManagementClientListActiveSecurityAdminRulesOptions) (ManagementClientListActiveSecurityAdminRulesResponse, error) { + var err error + const operationName = "ManagementClient.ListActiveSecurityAdminRules" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listActiveSecurityAdminRulesCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) + if err != nil { + return ManagementClientListActiveSecurityAdminRulesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientListActiveSecurityAdminRulesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientListActiveSecurityAdminRulesResponse{}, err + } + resp, err := client.listActiveSecurityAdminRulesHandleResponse(httpResp) + return resp, err +} + +// listActiveSecurityAdminRulesCreateRequest creates the ListActiveSecurityAdminRules request. +func (client *ManagementClient) listActiveSecurityAdminRulesCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ActiveConfigurationParameter, options *ManagementClientListActiveSecurityAdminRulesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityAdminRules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listActiveSecurityAdminRulesHandleResponse handles the ListActiveSecurityAdminRules response. +func (client *ManagementClient) listActiveSecurityAdminRulesHandleResponse(resp *http.Response) (ManagementClientListActiveSecurityAdminRulesResponse, error) { + result := ManagementClientListActiveSecurityAdminRulesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ActiveSecurityAdminRulesListResult); err != nil { + return ManagementClientListActiveSecurityAdminRulesResponse{}, err + } + return result, nil +} + +// ListNetworkManagerEffectiveConnectivityConfigurations - List all effective connectivity configurations applied on a virtual +// network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - parameters - Parameters supplied to list correct page. +// - options - ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions contains the optional parameters +// for the ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations method. +func (client *ManagementClient) ListNetworkManagerEffectiveConnectivityConfigurations(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters QueryRequestOptions, options *ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions) (ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse, error) { + var err error + const operationName = "ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listNetworkManagerEffectiveConnectivityConfigurationsCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) + if err != nil { + return ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse{}, err + } + resp, err := client.listNetworkManagerEffectiveConnectivityConfigurationsHandleResponse(httpResp) + return resp, err +} + +// listNetworkManagerEffectiveConnectivityConfigurationsCreateRequest creates the ListNetworkManagerEffectiveConnectivityConfigurations request. +func (client *ManagementClient) listNetworkManagerEffectiveConnectivityConfigurationsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters QueryRequestOptions, options *ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveConnectivityConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listNetworkManagerEffectiveConnectivityConfigurationsHandleResponse handles the ListNetworkManagerEffectiveConnectivityConfigurations response. +func (client *ManagementClient) listNetworkManagerEffectiveConnectivityConfigurationsHandleResponse(resp *http.Response) (ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse, error) { + result := ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerEffectiveConnectivityConfigurationListResult); err != nil { + return ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse{}, err + } + return result, nil +} + +// ListNetworkManagerEffectiveSecurityAdminRules - List all effective security admin rules applied on a virtual network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - parameters - Parameters supplied to list correct page. +// - options - ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions contains the optional parameters for the +// ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules method. +func (client *ManagementClient) ListNetworkManagerEffectiveSecurityAdminRules(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters QueryRequestOptions, options *ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions) (ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse, error) { + var err error + const operationName = "ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listNetworkManagerEffectiveSecurityAdminRulesCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) + if err != nil { + return ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse{}, err + } + resp, err := client.listNetworkManagerEffectiveSecurityAdminRulesHandleResponse(httpResp) + return resp, err +} + +// listNetworkManagerEffectiveSecurityAdminRulesCreateRequest creates the ListNetworkManagerEffectiveSecurityAdminRules request. +func (client *ManagementClient) listNetworkManagerEffectiveSecurityAdminRulesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters QueryRequestOptions, options *ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveSecurityAdminRules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listNetworkManagerEffectiveSecurityAdminRulesHandleResponse handles the ListNetworkManagerEffectiveSecurityAdminRules response. +func (client *ManagementClient) listNetworkManagerEffectiveSecurityAdminRulesHandleResponse(resp *http.Response) (ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse, error) { + result := ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerEffectiveSecurityAdminRulesListResult); err != nil { + return ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse{}, err + } + return result, nil +} + +// BeginPutBastionShareableLink - Creates a Bastion Shareable Links for all the VMs specified in the request. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - bslRequest - Post request for Create/Delete/Get Bastion Shareable Link endpoints. +// - options - ManagementClientBeginPutBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginPutBastionShareableLink +// method. +func (client *ManagementClient) BeginPutBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginPutBastionShareableLinkOptions) (*runtime.Poller[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]], error) { + pager := runtime.NewPager(runtime.PagingHandler[ManagementClientPutBastionShareableLinkResponse]{ + More: func(page ManagementClientPutBastionShareableLinkResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagementClientPutBastionShareableLinkResponse) (ManagementClientPutBastionShareableLinkResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementClient.BeginPutBastionShareableLink") + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.putBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) + }, nil) + if err != nil { + return ManagementClientPutBastionShareableLinkResponse{}, err + } + return client.putBastionShareableLinkHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) + if options == nil || options.ResumeToken == "" { + resp, err := client.putBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]]{ + FinalStateVia: runtime.FinalStateViaLocation, + Response: &pager, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]]{ + Response: &pager, + Tracer: client.internal.Tracer(), + }) + } +} + +// PutBastionShareableLink - Creates a Bastion Shareable Links for all the VMs specified in the request. +// +// Generated from API version 2024-05-01 +func (client *ManagementClient) putBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginPutBastionShareableLinkOptions) (*http.Response, error) { + var err error + const operationName = "ManagementClient.BeginPutBastionShareableLink" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.putBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// putBastionShareableLinkCreateRequest creates the PutBastionShareableLink request. +func (client *ManagementClient) putBastionShareableLinkCreateRequest(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginPutBastionShareableLinkOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if bastionHostName == "" { + return nil, errors.New("parameter bastionHostName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{bastionHostName}", url.PathEscape(bastionHostName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, bslRequest); err != nil { + return nil, err + } + return req, nil +} + +// putBastionShareableLinkHandleResponse handles the PutBastionShareableLink response. +func (client *ManagementClient) putBastionShareableLinkHandleResponse(resp *http.Response) (ManagementClientPutBastionShareableLinkResponse, error) { + result := ManagementClientPutBastionShareableLinkResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BastionShareableLinkListResult); err != nil { + return ManagementClientPutBastionShareableLinkResponse{}, err + } + return result, nil +} + +// SupportedSecurityProviders - Gives the supported security providers for the virtual wan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name. +// - virtualWANName - The name of the VirtualWAN for which supported security providers are needed. +// - options - ManagementClientSupportedSecurityProvidersOptions contains the optional parameters for the ManagementClient.SupportedSecurityProviders +// method. +func (client *ManagementClient) SupportedSecurityProviders(ctx context.Context, resourceGroupName string, virtualWANName string, options *ManagementClientSupportedSecurityProvidersOptions) (ManagementClientSupportedSecurityProvidersResponse, error) { + var err error + const operationName = "ManagementClient.SupportedSecurityProviders" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.supportedSecurityProvidersCreateRequest(ctx, resourceGroupName, virtualWANName, options) + if err != nil { + return ManagementClientSupportedSecurityProvidersResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientSupportedSecurityProvidersResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientSupportedSecurityProvidersResponse{}, err + } + resp, err := client.supportedSecurityProvidersHandleResponse(httpResp) + return resp, err +} + +// supportedSecurityProvidersCreateRequest creates the SupportedSecurityProviders request. +func (client *ManagementClient) supportedSecurityProvidersCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, options *ManagementClientSupportedSecurityProvidersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualWANName == "" { + return nil, errors.New("parameter virtualWANName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualWANName}", url.PathEscape(virtualWANName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// supportedSecurityProvidersHandleResponse handles the SupportedSecurityProviders response. +func (client *ManagementClient) supportedSecurityProvidersHandleResponse(resp *http.Response) (ManagementClientSupportedSecurityProvidersResponse, error) { + result := ManagementClientSupportedSecurityProvidersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualWanSecurityProviders); err != nil { + return ManagementClientSupportedSecurityProvidersResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managementgroupnetworkmanagerconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managementgroupnetworkmanagerconnections_client.go new file mode 100644 index 00000000..185997bf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managementgroupnetworkmanagerconnections_client.go @@ -0,0 +1,281 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ManagementGroupNetworkManagerConnectionsClient contains the methods for the ManagementGroupNetworkManagerConnections group. +// Don't use this type directly, use NewManagementGroupNetworkManagerConnectionsClient() instead. +type ManagementGroupNetworkManagerConnectionsClient struct { + internal *arm.Client +} + +// NewManagementGroupNetworkManagerConnectionsClient creates a new instance of ManagementGroupNetworkManagerConnectionsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagementGroupNetworkManagerConnectionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementGroupNetworkManagerConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagementGroupNetworkManagerConnectionsClient{ + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create a network manager connection on this management group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. +// - networkManagerConnectionName - Name for the network manager connection. +// - parameters - Network manager connection to be created/updated. +// - options - ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the +// ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate method. +func (client *ManagementGroupNetworkManagerConnectionsClient) CreateOrUpdate(ctx context.Context, managementGroupID string, networkManagerConnectionName string, parameters ManagerConnection, options *ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions) (ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, managementGroupID, networkManagerConnectionName, parameters, options) + if err != nil { + return ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagementGroupNetworkManagerConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, managementGroupID string, networkManagerConnectionName string, parameters ManagerConnection, options *ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" + if managementGroupID == "" { + return nil, errors.New("parameter managementGroupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managementGroupId}", url.PathEscape(managementGroupID)) + if networkManagerConnectionName == "" { + return nil, errors.New("parameter networkManagerConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ManagementGroupNetworkManagerConnectionsClient) createOrUpdateHandleResponse(resp *http.Response) (ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse, error) { + result := ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnection); err != nil { + return ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete specified pending connection created by this management group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. +// - networkManagerConnectionName - Name for the network manager connection. +// - options - ManagementGroupNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Delete +// method. +func (client *ManagementGroupNetworkManagerConnectionsClient) Delete(ctx context.Context, managementGroupID string, networkManagerConnectionName string, options *ManagementGroupNetworkManagerConnectionsClientDeleteOptions) (ManagementGroupNetworkManagerConnectionsClientDeleteResponse, error) { + var err error + const operationName = "ManagementGroupNetworkManagerConnectionsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, managementGroupID, networkManagerConnectionName, options) + if err != nil { + return ManagementGroupNetworkManagerConnectionsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementGroupNetworkManagerConnectionsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ManagementGroupNetworkManagerConnectionsClientDeleteResponse{}, err + } + return ManagementGroupNetworkManagerConnectionsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagementGroupNetworkManagerConnectionsClient) deleteCreateRequest(ctx context.Context, managementGroupID string, networkManagerConnectionName string, options *ManagementGroupNetworkManagerConnectionsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" + if managementGroupID == "" { + return nil, errors.New("parameter managementGroupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managementGroupId}", url.PathEscape(managementGroupID)) + if networkManagerConnectionName == "" { + return nil, errors.New("parameter networkManagerConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a specified connection created by this management group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. +// - networkManagerConnectionName - Name for the network manager connection. +// - options - ManagementGroupNetworkManagerConnectionsClientGetOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Get +// method. +func (client *ManagementGroupNetworkManagerConnectionsClient) Get(ctx context.Context, managementGroupID string, networkManagerConnectionName string, options *ManagementGroupNetworkManagerConnectionsClientGetOptions) (ManagementGroupNetworkManagerConnectionsClientGetResponse, error) { + var err error + const operationName = "ManagementGroupNetworkManagerConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, managementGroupID, networkManagerConnectionName, options) + if err != nil { + return ManagementGroupNetworkManagerConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementGroupNetworkManagerConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementGroupNetworkManagerConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagementGroupNetworkManagerConnectionsClient) getCreateRequest(ctx context.Context, managementGroupID string, networkManagerConnectionName string, options *ManagementGroupNetworkManagerConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" + if managementGroupID == "" { + return nil, errors.New("parameter managementGroupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managementGroupId}", url.PathEscape(managementGroupID)) + if networkManagerConnectionName == "" { + return nil, errors.New("parameter networkManagerConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagementGroupNetworkManagerConnectionsClient) getHandleResponse(resp *http.Response) (ManagementGroupNetworkManagerConnectionsClientGetResponse, error) { + result := ManagementGroupNetworkManagerConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnection); err != nil { + return ManagementGroupNetworkManagerConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all network manager connections created by this management group. +// +// Generated from API version 2024-05-01 +// - managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. +// - options - ManagementGroupNetworkManagerConnectionsClientListOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.NewListPager +// method. +func (client *ManagementGroupNetworkManagerConnectionsClient) NewListPager(managementGroupID string, options *ManagementGroupNetworkManagerConnectionsClientListOptions) *runtime.Pager[ManagementGroupNetworkManagerConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagementGroupNetworkManagerConnectionsClientListResponse]{ + More: func(page ManagementGroupNetworkManagerConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagementGroupNetworkManagerConnectionsClientListResponse) (ManagementGroupNetworkManagerConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagementGroupNetworkManagerConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, managementGroupID, options) + }, nil) + if err != nil { + return ManagementGroupNetworkManagerConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ManagementGroupNetworkManagerConnectionsClient) listCreateRequest(ctx context.Context, managementGroupID string, options *ManagementGroupNetworkManagerConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections" + if managementGroupID == "" { + return nil, errors.New("parameter managementGroupID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{managementGroupId}", url.PathEscape(managementGroupID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ManagementGroupNetworkManagerConnectionsClient) listHandleResponse(resp *http.Response) (ManagementGroupNetworkManagerConnectionsClientListResponse, error) { + result := ManagementGroupNetworkManagerConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnectionListResult); err != nil { + return ManagementGroupNetworkManagerConnectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managercommits_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managercommits_client.go new file mode 100644 index 00000000..6f9a0a8a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managercommits_client.go @@ -0,0 +1,126 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagerCommitsClient contains the methods for the NetworkManagerCommits group. +// Don't use this type directly, use NewManagerCommitsClient() instead. +type ManagerCommitsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagerCommitsClient creates a new instance of ManagerCommitsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagerCommitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagerCommitsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagerCommitsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginPost - Post a Network Manager Commit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Parameters supplied to specify which Managed Network commit is. +// - options - ManagerCommitsClientBeginPostOptions contains the optional parameters for the ManagerCommitsClient.BeginPost +// method. +func (client *ManagerCommitsClient) BeginPost(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerCommit, options *ManagerCommitsClientBeginPostOptions) (*runtime.Poller[ManagerCommitsClientPostResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.post(ctx, resourceGroupName, networkManagerName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagerCommitsClientPostResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagerCommitsClientPostResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Post - Post a Network Manager Commit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ManagerCommitsClient) post(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerCommit, options *ManagerCommitsClientBeginPostOptions) (*http.Response, error) { + var err error + const operationName = "ManagerCommitsClient.BeginPost" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.postCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// postCreateRequest creates the Post request. +func (client *ManagerCommitsClient) postCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerCommit, options *ManagerCommitsClientBeginPostOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commit" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managerdeploymentstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managerdeploymentstatus_client.go new file mode 100644 index 00000000..73935ee7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managerdeploymentstatus_client.go @@ -0,0 +1,118 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ManagerDeploymentStatusClient contains the methods for the NetworkManagerDeploymentStatus group. +// Don't use this type directly, use NewManagerDeploymentStatusClient() instead. +type ManagerDeploymentStatusClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagerDeploymentStatusClient creates a new instance of ManagerDeploymentStatusClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagerDeploymentStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagerDeploymentStatusClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagerDeploymentStatusClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// List - Post to List of Network Manager Deployment Status. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Parameters supplied to specify which Managed Network deployment status is. +// - options - ManagerDeploymentStatusClientListOptions contains the optional parameters for the ManagerDeploymentStatusClient.List +// method. +func (client *ManagerDeploymentStatusClient) List(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerDeploymentStatusParameter, options *ManagerDeploymentStatusClientListOptions) (ManagerDeploymentStatusClientListResponse, error) { + var err error + const operationName = "ManagerDeploymentStatusClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) + if err != nil { + return ManagerDeploymentStatusClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagerDeploymentStatusClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagerDeploymentStatusClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *ManagerDeploymentStatusClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerDeploymentStatusParameter, options *ManagerDeploymentStatusClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listDeploymentStatus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ManagerDeploymentStatusClient) listHandleResponse(resp *http.Response) (ManagerDeploymentStatusClientListResponse, error) { + result := ManagerDeploymentStatusClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerDeploymentStatusListResult); err != nil { + return ManagerDeploymentStatusClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managerroutingconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managerroutingconfigurations_client.go new file mode 100644 index 00000000..81bfecf2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managerroutingconfigurations_client.go @@ -0,0 +1,346 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ManagerRoutingConfigurationsClient contains the methods for the NetworkManagerRoutingConfigurations group. +// Don't use this type directly, use NewManagerRoutingConfigurationsClient() instead. +type ManagerRoutingConfigurationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagerRoutingConfigurationsClient creates a new instance of ManagerRoutingConfigurationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagerRoutingConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagerRoutingConfigurationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagerRoutingConfigurationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a network manager routing configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - routingConfiguration - The routing configuration to create or update +// - options - ManagerRoutingConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the ManagerRoutingConfigurationsClient.CreateOrUpdate +// method. +func (client *ManagerRoutingConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, routingConfiguration ManagerRoutingConfiguration, options *ManagerRoutingConfigurationsClientCreateOrUpdateOptions) (ManagerRoutingConfigurationsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ManagerRoutingConfigurationsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, routingConfiguration, options) + if err != nil { + return ManagerRoutingConfigurationsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagerRoutingConfigurationsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ManagerRoutingConfigurationsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagerRoutingConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, routingConfiguration ManagerRoutingConfiguration, options *ManagerRoutingConfigurationsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, routingConfiguration); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ManagerRoutingConfigurationsClient) createOrUpdateHandleResponse(resp *http.Response) (ManagerRoutingConfigurationsClientCreateOrUpdateResponse, error) { + result := ManagerRoutingConfigurationsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerRoutingConfiguration); err != nil { + return ManagerRoutingConfigurationsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes a network manager routing configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - options - ManagerRoutingConfigurationsClientBeginDeleteOptions contains the optional parameters for the ManagerRoutingConfigurationsClient.BeginDelete +// method. +func (client *ManagerRoutingConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ManagerRoutingConfigurationsClientBeginDeleteOptions) (*runtime.Poller[ManagerRoutingConfigurationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagerRoutingConfigurationsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagerRoutingConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a network manager routing configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ManagerRoutingConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ManagerRoutingConfigurationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagerRoutingConfigurationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagerRoutingConfigurationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ManagerRoutingConfigurationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves a network manager routing configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - options - ManagerRoutingConfigurationsClientGetOptions contains the optional parameters for the ManagerRoutingConfigurationsClient.Get +// method. +func (client *ManagerRoutingConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ManagerRoutingConfigurationsClientGetOptions) (ManagerRoutingConfigurationsClientGetResponse, error) { + var err error + const operationName = "ManagerRoutingConfigurationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return ManagerRoutingConfigurationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagerRoutingConfigurationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagerRoutingConfigurationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagerRoutingConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ManagerRoutingConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagerRoutingConfigurationsClient) getHandleResponse(resp *http.Response) (ManagerRoutingConfigurationsClientGetResponse, error) { + result := ManagerRoutingConfigurationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerRoutingConfiguration); err != nil { + return ManagerRoutingConfigurationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the network manager routing configurations in a network manager, in a paginated format. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - options - ManagerRoutingConfigurationsClientListOptions contains the optional parameters for the ManagerRoutingConfigurationsClient.NewListPager +// method. +func (client *ManagerRoutingConfigurationsClient) NewListPager(resourceGroupName string, networkManagerName string, options *ManagerRoutingConfigurationsClientListOptions) *runtime.Pager[ManagerRoutingConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagerRoutingConfigurationsClientListResponse]{ + More: func(page ManagerRoutingConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagerRoutingConfigurationsClientListResponse) (ManagerRoutingConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagerRoutingConfigurationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) + if err != nil { + return ManagerRoutingConfigurationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ManagerRoutingConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagerRoutingConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ManagerRoutingConfigurationsClient) listHandleResponse(resp *http.Response) (ManagerRoutingConfigurationsClientListResponse, error) { + result := ManagerRoutingConfigurationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerRoutingConfigurationListResult); err != nil { + return ManagerRoutingConfigurationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managers_client.go new file mode 100644 index 00000000..738791ef --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/managers_client.go @@ -0,0 +1,451 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ManagersClient contains the methods for the NetworkManagers group. +// Don't use this type directly, use NewManagersClient() instead. +type ManagersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagersClient creates a new instance of ManagersClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a Network Manager. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Parameters supplied to specify which network manager is. +// - options - ManagersClientCreateOrUpdateOptions contains the optional parameters for the ManagersClient.CreateOrUpdate method. +func (client *ManagersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, parameters Manager, options *ManagersClientCreateOrUpdateOptions) (ManagersClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ManagersClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) + if err != nil { + return ManagersClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagersClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ManagersClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters Manager, options *ManagersClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ManagersClient) createOrUpdateHandleResponse(resp *http.Response) (ManagersClientCreateOrUpdateResponse, error) { + result := ManagersClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Manager); err != nil { + return ManagersClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes a network manager. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - ManagersClientBeginDeleteOptions contains the optional parameters for the ManagersClient.BeginDelete method. +func (client *ManagersClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientBeginDeleteOptions) (*runtime.Poller[ManagersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a network manager. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ManagersClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ManagersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Network Manager. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - ManagersClientGetOptions contains the optional parameters for the ManagersClient.Get method. +func (client *ManagersClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientGetOptions) (ManagersClientGetResponse, error) { + var err error + const operationName = "ManagersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, options) + if err != nil { + return ManagersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagersClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagersClient) getHandleResponse(resp *http.Response) (ManagersClientGetResponse, error) { + result := ManagersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Manager); err != nil { + return ManagersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List network managers in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - ManagersClientListOptions contains the optional parameters for the ManagersClient.NewListPager method. +func (client *ManagersClient) NewListPager(resourceGroupName string, options *ManagersClientListOptions) *runtime.Pager[ManagersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagersClientListResponse]{ + More: func(page ManagersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagersClientListResponse) (ManagersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ManagersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ManagersClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ManagersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ManagersClient) listHandleResponse(resp *http.Response) (ManagersClientListResponse, error) { + result := ManagersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerListResult); err != nil { + return ManagersClientListResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - List all network managers in a subscription. +// +// Generated from API version 2024-05-01 +// - options - ManagersClientListBySubscriptionOptions contains the optional parameters for the ManagersClient.NewListBySubscriptionPager +// method. +func (client *ManagersClient) NewListBySubscriptionPager(options *ManagersClientListBySubscriptionOptions) *runtime.Pager[ManagersClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagersClientListBySubscriptionResponse]{ + More: func(page ManagersClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagersClientListBySubscriptionResponse) (ManagersClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagersClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return ManagersClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *ManagersClient) listBySubscriptionCreateRequest(ctx context.Context, options *ManagersClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *ManagersClient) listBySubscriptionHandleResponse(resp *http.Response) (ManagersClientListBySubscriptionResponse, error) { + result := ManagersClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerListResult); err != nil { + return ManagersClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// Patch - Patch NetworkManager. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Parameters supplied to specify which network manager is. +// - options - ManagersClientPatchOptions contains the optional parameters for the ManagersClient.Patch method. +func (client *ManagersClient) Patch(ctx context.Context, resourceGroupName string, networkManagerName string, parameters PatchObject, options *ManagersClientPatchOptions) (ManagersClientPatchResponse, error) { + var err error + const operationName = "ManagersClient.Patch" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.patchCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) + if err != nil { + return ManagersClientPatchResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagersClientPatchResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagersClientPatchResponse{}, err + } + resp, err := client.patchHandleResponse(httpResp) + return resp, err +} + +// patchCreateRequest creates the Patch request. +func (client *ManagersClient) patchCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, parameters PatchObject, options *ManagersClientPatchOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// patchHandleResponse handles the Patch response. +func (client *ManagersClient) patchHandleResponse(resp *http.Response) (ManagersClientPatchResponse, error) { + result := ManagersClientPatchResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Manager); err != nil { + return ManagersClientPatchResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/models.go new file mode 100644 index 00000000..82906f6a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/models.go @@ -0,0 +1,15232 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import "time" + +// AADAuthenticationParameters - AAD Vpn authentication type related parameters. +type AADAuthenticationParameters struct { + // AAD Vpn authentication parameter AAD audience. + AADAudience *string + + // AAD Vpn authentication parameter AAD issuer. + AADIssuer *string + + // AAD Vpn authentication parameter AAD tenant. + AADTenant *string +} + +// Action to be taken on a route matching a RouteMap criterion. +type Action struct { + // List of parameters relevant to the action.For instance if type is drop then parameters has list of prefixes to be dropped.If + // type is add, parameters would have list of ASN numbers to be added + Parameters []*Parameter + + // Type of action to be taken. Supported types are 'Remove', 'Add', 'Replace', and 'Drop.' + Type *RouteMapActionType +} + +// ActiveBaseSecurityAdminRule - Network base admin rule. +type ActiveBaseSecurityAdminRule struct { + // REQUIRED; Whether the rule is custom or default. + Kind *EffectiveAdminRuleKind + + // Deployment time string. + CommitTime *time.Time + + // A description of the security admin configuration. + ConfigurationDescription *string + + // Resource ID. + ID *string + + // Deployment region. + Region *string + + // Groups for rule collection + RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem + + // A description of the rule collection. + RuleCollectionDescription *string + + // Effective configuration groups. + RuleGroups []*ConfigurationGroup +} + +// GetActiveBaseSecurityAdminRule implements the ActiveBaseSecurityAdminRuleClassification interface for type ActiveBaseSecurityAdminRule. +func (a *ActiveBaseSecurityAdminRule) GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule { + return a +} + +// ActiveConfigurationParameter - Effective Virtual Networks Parameter. +type ActiveConfigurationParameter struct { + // List of regions. + Regions []*string + + // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current + // request) to retrieve the next page of data. + SkipToken *string +} + +// ActiveConnectivityConfiguration - Active connectivity configuration. +type ActiveConnectivityConfiguration struct { + // Deployment time string. + CommitTime *time.Time + + // Effective configuration groups. + ConfigurationGroups []*ConfigurationGroup + + // Connectivity configuration ID. + ID *string + + // Properties of a network manager connectivity configuration + Properties *ConnectivityConfigurationProperties + + // Deployment region. + Region *string +} + +// ActiveConnectivityConfigurationsListResult - Result of the request to list active connectivity configurations. It contains +// a list of active connectivity configurations and a skiptoken to get the next set of results. +type ActiveConnectivityConfigurationsListResult struct { + // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current + // request) to retrieve the next page of data. + SkipToken *string + + // Gets a page of active connectivity configurations. + Value []*ActiveConnectivityConfiguration +} + +// ActiveDefaultSecurityAdminRule - Network default admin rule. +type ActiveDefaultSecurityAdminRule struct { + // REQUIRED; Whether the rule is custom or default. + Kind *EffectiveAdminRuleKind + + // Deployment time string. + CommitTime *time.Time + + // A description of the security admin configuration. + ConfigurationDescription *string + + // Resource ID. + ID *string + + // Indicates the properties of the default security admin rule + Properties *DefaultAdminPropertiesFormat + + // Deployment region. + Region *string + + // Groups for rule collection + RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem + + // A description of the rule collection. + RuleCollectionDescription *string + + // Effective configuration groups. + RuleGroups []*ConfigurationGroup +} + +// GetActiveBaseSecurityAdminRule implements the ActiveBaseSecurityAdminRuleClassification interface for type ActiveDefaultSecurityAdminRule. +func (a *ActiveDefaultSecurityAdminRule) GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule { + return &ActiveBaseSecurityAdminRule{ + CommitTime: a.CommitTime, + ConfigurationDescription: a.ConfigurationDescription, + ID: a.ID, + Kind: a.Kind, + Region: a.Region, + RuleCollectionAppliesToGroups: a.RuleCollectionAppliesToGroups, + RuleCollectionDescription: a.RuleCollectionDescription, + RuleGroups: a.RuleGroups, + } +} + +// ActiveSecurityAdminRule - Network admin rule. +type ActiveSecurityAdminRule struct { + // REQUIRED; Whether the rule is custom or default. + Kind *EffectiveAdminRuleKind + + // Deployment time string. + CommitTime *time.Time + + // A description of the security admin configuration. + ConfigurationDescription *string + + // Resource ID. + ID *string + + // Indicates the properties of the security admin rule + Properties *AdminPropertiesFormat + + // Deployment region. + Region *string + + // Groups for rule collection + RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem + + // A description of the rule collection. + RuleCollectionDescription *string + + // Effective configuration groups. + RuleGroups []*ConfigurationGroup +} + +// GetActiveBaseSecurityAdminRule implements the ActiveBaseSecurityAdminRuleClassification interface for type ActiveSecurityAdminRule. +func (a *ActiveSecurityAdminRule) GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule { + return &ActiveBaseSecurityAdminRule{ + CommitTime: a.CommitTime, + ConfigurationDescription: a.ConfigurationDescription, + ID: a.ID, + Kind: a.Kind, + Region: a.Region, + RuleCollectionAppliesToGroups: a.RuleCollectionAppliesToGroups, + RuleCollectionDescription: a.RuleCollectionDescription, + RuleGroups: a.RuleGroups, + } +} + +// ActiveSecurityAdminRulesListResult - Result of the request to list active security admin rules. It contains a list of active +// security admin rules and a skiptoken to get the next set of results. +type ActiveSecurityAdminRulesListResult struct { + // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current + // request) to retrieve the next page of data. + SkipToken *string + + // Gets a page of active security admin rules. + Value []ActiveBaseSecurityAdminRuleClassification +} + +// AddressPrefixItem - Address prefix item. +type AddressPrefixItem struct { + // Address prefix. + AddressPrefix *string + + // Address prefix type. + AddressPrefixType *AddressPrefixType +} + +// AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. +type AddressSpace struct { + // A list of address blocks reserved for this virtual network in CIDR notation. + AddressPrefixes []*string + + // A list of IPAM Pools allocating IP address prefixes. + IpamPoolPrefixAllocations []*IpamPoolPrefixAllocation +} + +// AdminPropertiesFormat - Security admin rule resource. +type AdminPropertiesFormat struct { + // REQUIRED; Indicates the access allowed for this particular rule + Access *SecurityConfigurationRuleAccess + + // REQUIRED; Indicates if the traffic matched against the rule in inbound or outbound. + Direction *SecurityConfigurationRuleDirection + + // REQUIRED; The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule + // in the collection. The lower the priority number, the higher the priority of the rule. + Priority *int32 + + // REQUIRED; Network protocol this rule applies to. + Protocol *SecurityConfigurationRuleProtocol + + // A description for this rule. Restricted to 140 chars. + Description *string + + // The destination port ranges. + DestinationPortRanges []*string + + // The destination address prefixes. CIDR or destination IP ranges. + Destinations []*AddressPrefixItem + + // The source port ranges. + SourcePortRanges []*string + + // The CIDR or source IP ranges. + Sources []*AddressPrefixItem + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// AdminRule - Network admin rule. +type AdminRule struct { + // REQUIRED; Whether the rule is custom or default. + Kind *AdminRuleKind + + // Indicates the properties of the security admin rule + Properties *AdminPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// GetBaseAdminRule implements the BaseAdminRuleClassification interface for type AdminRule. +func (a *AdminRule) GetBaseAdminRule() *BaseAdminRule { + return &BaseAdminRule{ + Etag: a.Etag, + ID: a.ID, + Kind: a.Kind, + Name: a.Name, + SystemData: a.SystemData, + Type: a.Type, + } +} + +// AdminRuleCollection - Defines the admin rule collection. +type AdminRuleCollection struct { + // Indicates the properties for the network manager admin rule collection. + Properties *AdminRuleCollectionPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// AdminRuleCollectionListResult - Security admin configuration rule collection list result. +type AdminRuleCollectionListResult struct { + // Gets the URL to get the next set of results. + NextLink *string + + // A list of network manager security admin configuration rule collections + Value []*AdminRuleCollection +} + +// AdminRuleCollectionPropertiesFormat - Defines the admin rule collection properties. +type AdminRuleCollectionPropertiesFormat struct { + // REQUIRED; Groups for configuration + AppliesToGroups []*ManagerSecurityGroupItem + + // A description of the admin rule collection. + Description *string + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// AdminRuleListResult - security configuration admin rule list result. +type AdminRuleListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of admin rules + Value []BaseAdminRuleClassification +} + +// ApplicationGateway - Application gateway resource. +type ApplicationGateway struct { + // Resource ID. + ID *string + + // The identity of the application gateway, if configured. + Identity *ManagedServiceIdentity + + // Resource location. + Location *string + + // Properties of the application gateway. + Properties *ApplicationGatewayPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // A list of availability zones denoting where the resource needs to come from. + Zones []*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ApplicationGatewayAuthenticationCertificate - Authentication certificates of an application gateway. +type ApplicationGatewayAuthenticationCertificate struct { + // Resource ID. + ID *string + + // Name of the authentication certificate that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway authentication certificate. + Properties *ApplicationGatewayAuthenticationCertificatePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayAuthenticationCertificatePropertiesFormat - Authentication certificates properties of an application +// gateway. +type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { + // Certificate public data. + Data *string + + // READ-ONLY; The provisioning state of the authentication certificate resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayAutoscaleConfiguration - Application Gateway autoscale configuration. +type ApplicationGatewayAutoscaleConfiguration struct { + // REQUIRED; Lower bound on number of Application Gateway capacity. + MinCapacity *int32 + + // Upper bound on number of Application Gateway capacity. + MaxCapacity *int32 +} + +// ApplicationGatewayAvailableSSLOptions - Response for ApplicationGatewayAvailableSslOptions API service call. +type ApplicationGatewayAvailableSSLOptions struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the application gateway available SSL options. + Properties *ApplicationGatewayAvailableSSLOptionsPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ApplicationGatewayAvailableSSLOptionsPropertiesFormat - Properties of ApplicationGatewayAvailableSslOptions. +type ApplicationGatewayAvailableSSLOptionsPropertiesFormat struct { + // List of available Ssl cipher suites. + AvailableCipherSuites []*ApplicationGatewaySSLCipherSuite + + // List of available Ssl protocols. + AvailableProtocols []*ApplicationGatewaySSLProtocol + + // Name of the Ssl predefined policy applied by default to application gateway. + DefaultPolicy *ApplicationGatewaySSLPolicyName + + // List of available Ssl predefined policy. + PredefinedPolicies []*SubResource +} + +// ApplicationGatewayAvailableSSLPredefinedPolicies - Response for ApplicationGatewayAvailableSslOptions API service call. +type ApplicationGatewayAvailableSSLPredefinedPolicies struct { + // URL to get the next set of results. + NextLink *string + + // List of available Ssl predefined policy. + Value []*ApplicationGatewaySSLPredefinedPolicy +} + +// ApplicationGatewayAvailableWafRuleSetsResult - Response for ApplicationGatewayAvailableWafRuleSets API service call. +type ApplicationGatewayAvailableWafRuleSetsResult struct { + // The list of application gateway rule sets. + Value []*ApplicationGatewayFirewallRuleSet +} + +// ApplicationGatewayBackendAddress - Backend address of an application gateway. +type ApplicationGatewayBackendAddress struct { + // Fully qualified domain name (FQDN). + Fqdn *string + + // IP address. + IPAddress *string +} + +// ApplicationGatewayBackendAddressPool - Backend Address Pool of an application gateway. +type ApplicationGatewayBackendAddressPool struct { + // Resource ID. + ID *string + + // Name of the backend address pool that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway backend address pool. + Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayBackendAddressPoolPropertiesFormat - Properties of Backend Address Pool of an application gateway. +type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { + // Backend addresses. + BackendAddresses []*ApplicationGatewayBackendAddress + + // READ-ONLY; Collection of references to IPs defined in network interfaces. + BackendIPConfigurations []*InterfaceIPConfiguration + + // READ-ONLY; The provisioning state of the backend address pool resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayBackendHTTPSettings - Backend address pool settings of an application gateway. +type ApplicationGatewayBackendHTTPSettings struct { + // Resource ID. + ID *string + + // Name of the backend http settings that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway backend HTTP settings. + Properties *ApplicationGatewayBackendHTTPSettingsPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayBackendHTTPSettingsPropertiesFormat - Properties of Backend address pool settings of an application gateway. +type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { + // Cookie name to use for the affinity cookie. + AffinityCookieName *string + + // Array of references to application gateway authentication certificates. + AuthenticationCertificates []*SubResource + + // Connection draining of the backend http settings resource. + ConnectionDraining *ApplicationGatewayConnectionDraining + + // Cookie based affinity. + CookieBasedAffinity *ApplicationGatewayCookieBasedAffinity + + // Host header to be sent to the backend servers. + HostName *string + + // Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. + Path *string + + // Whether to pick host header should be picked from the host name of the backend server. Default value is false. + PickHostNameFromBackendAddress *bool + + // The destination port on the backend. + Port *int32 + + // Probe resource of an application gateway. + Probe *SubResource + + // Whether the probe is enabled. Default value is false. + ProbeEnabled *bool + + // The protocol used to communicate with the backend. + Protocol *ApplicationGatewayProtocol + + // Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. + // Acceptable values are from 1 second to 86400 seconds. + RequestTimeout *int32 + + // Array of references to application gateway trusted root certificates. + TrustedRootCertificates []*SubResource + + // READ-ONLY; The provisioning state of the backend HTTP settings resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayBackendHealth - Response for ApplicationGatewayBackendHealth API service call. +type ApplicationGatewayBackendHealth struct { + // A list of ApplicationGatewayBackendHealthPool resources. + BackendAddressPools []*ApplicationGatewayBackendHealthPool +} + +// ApplicationGatewayBackendHealthHTTPSettings - Application gateway BackendHealthHttp settings. +type ApplicationGatewayBackendHealthHTTPSettings struct { + // Reference to an ApplicationGatewayBackendHttpSettings resource. + BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings + + // List of ApplicationGatewayBackendHealthServer resources. + Servers []*ApplicationGatewayBackendHealthServer +} + +// ApplicationGatewayBackendHealthOnDemand - Result of on demand test probe. +type ApplicationGatewayBackendHealthOnDemand struct { + // Reference to an ApplicationGatewayBackendAddressPool resource. + BackendAddressPool *ApplicationGatewayBackendAddressPool + + // Application gateway BackendHealthHttp settings. + BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings +} + +// ApplicationGatewayBackendHealthPool - Application gateway BackendHealth pool. +type ApplicationGatewayBackendHealthPool struct { + // Reference to an ApplicationGatewayBackendAddressPool resource. + BackendAddressPool *ApplicationGatewayBackendAddressPool + + // List of ApplicationGatewayBackendHealthHttpSettings resources. + BackendHTTPSettingsCollection []*ApplicationGatewayBackendHealthHTTPSettings +} + +// ApplicationGatewayBackendHealthServer - Application gateway backendhealth http settings. +type ApplicationGatewayBackendHealthServer struct { + // IP address or FQDN of backend server. + Address *string + + // Health of backend server. + Health *ApplicationGatewayBackendHealthServerHealth + + // Health Probe Log. + HealthProbeLog *string + + // Reference to IP configuration of backend server. + IPConfiguration *InterfaceIPConfiguration +} + +// ApplicationGatewayBackendSettings - Backend address pool settings of an application gateway. +type ApplicationGatewayBackendSettings struct { + // Resource ID. + ID *string + + // Name of the backend settings that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway backend settings. + Properties *ApplicationGatewayBackendSettingsPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayBackendSettingsPropertiesFormat - Properties of Backend address pool settings of an application gateway. +type ApplicationGatewayBackendSettingsPropertiesFormat struct { + // Server name indication to be sent to the backend servers for Tls protocol. + HostName *string + + // Whether to pick server name indication from the host name of the backend server for Tls protocol. Default value is false. + PickHostNameFromBackendAddress *bool + + // The destination port on the backend. + Port *int32 + + // Probe resource of an application gateway. + Probe *SubResource + + // The protocol used to communicate with the backend. + Protocol *ApplicationGatewayProtocol + + // Connection timeout in seconds. Application Gateway will fail the request if response is not received within ConnectionTimeout. + // Acceptable values are from 1 second to 86400 seconds. + Timeout *int32 + + // Array of references to application gateway trusted root certificates. + TrustedRootCertificates []*SubResource + + // READ-ONLY; The provisioning state of the backend HTTP settings resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayClientAuthConfiguration - Application gateway client authentication configuration. +type ApplicationGatewayClientAuthConfiguration struct { + // Verify client certificate issuer name on the application gateway. + VerifyClientCertIssuerDN *bool + + // Verify client certificate revocation status. + VerifyClientRevocation *ApplicationGatewayClientRevocationOptions +} + +// ApplicationGatewayConnectionDraining - Connection draining allows open connections to a backend server to be active for +// a specified time after the backend server got removed from the configuration. +type ApplicationGatewayConnectionDraining struct { + // REQUIRED; The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds. + DrainTimeoutInSec *int32 + + // REQUIRED; Whether connection draining is enabled or not. + Enabled *bool +} + +// ApplicationGatewayCustomError - Custom error of an application gateway. +type ApplicationGatewayCustomError struct { + // Error page URL of the application gateway custom error. + CustomErrorPageURL *string + + // Status code of the application gateway custom error. + StatusCode *ApplicationGatewayCustomErrorStatusCode +} + +// ApplicationGatewayFirewallDisabledRuleGroup - Allows to disable rules within a rule group or an entire rule group. +type ApplicationGatewayFirewallDisabledRuleGroup struct { + // REQUIRED; The name of the rule group that will be disabled. + RuleGroupName *string + + // The list of rules that will be disabled. If null, all rules of the rule group will be disabled. + Rules []*int32 +} + +// ApplicationGatewayFirewallExclusion - Allow to exclude some variable satisfy the condition for the WAF check. +type ApplicationGatewayFirewallExclusion struct { + // REQUIRED; The variable to be excluded. + MatchVariable *string + + // REQUIRED; When matchVariable is a collection, operator used to specify which elements in the collection this exclusion + // applies to. + Selector *string + + // REQUIRED; When matchVariable is a collection, operate on the selector to specify which elements in the collection this + // exclusion applies to. + SelectorMatchOperator *string +} + +// ApplicationGatewayFirewallManifestRuleSet - Properties of the web application firewall rule set. +type ApplicationGatewayFirewallManifestRuleSet struct { + // REQUIRED; The rule groups of the web application firewall rule set. + RuleGroups []*ApplicationGatewayFirewallRuleGroup + + // REQUIRED; The type of the web application firewall rule set. + RuleSetType *string + + // REQUIRED; The version of the web application firewall rule set type. + RuleSetVersion *string + + // The rule set status + Status *ApplicationGatewayRuleSetStatusOptions + + // Tier of an application gateway that support the rule set. + Tiers []*ApplicationGatewayTierTypes +} + +// ApplicationGatewayFirewallRule - A web application firewall rule. +type ApplicationGatewayFirewallRule struct { + // REQUIRED; The identifier of the web application firewall rule. + RuleID *int32 + + // The string representation of the web application firewall rule action. + Action *ApplicationGatewayWafRuleActionTypes + + // The description of the web application firewall rule. + Description *string + + // The string representation of the web application firewall rule identifier. + RuleIDString *string + + // The string representation of the web application firewall rule sensitivity. + Sensitivity *ApplicationGatewayWafRuleSensitivityTypes + + // The string representation of the web application firewall rule state. + State *ApplicationGatewayWafRuleStateTypes +} + +// ApplicationGatewayFirewallRuleGroup - A web application firewall rule group. +type ApplicationGatewayFirewallRuleGroup struct { + // REQUIRED; The name of the web application firewall rule group. + RuleGroupName *string + + // REQUIRED; The rules of the web application firewall rule group. + Rules []*ApplicationGatewayFirewallRule + + // The description of the web application firewall rule group. + Description *string +} + +// ApplicationGatewayFirewallRuleSet - A web application firewall rule set. +type ApplicationGatewayFirewallRuleSet struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the application gateway firewall rule set. + Properties *ApplicationGatewayFirewallRuleSetPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the web application firewall rule set. +type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { + // REQUIRED; The rule groups of the web application firewall rule set. + RuleGroups []*ApplicationGatewayFirewallRuleGroup + + // REQUIRED; The type of the web application firewall rule set. + RuleSetType *string + + // REQUIRED; The version of the web application firewall rule set type. + RuleSetVersion *string + + // Tier of an application gateway that support the rule set. + Tiers []*ApplicationGatewayTierTypes + + // READ-ONLY; The provisioning state of the web application firewall rule set. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayForContainersReferenceDefinition - Defines an application gateway for containers reference. +type ApplicationGatewayForContainersReferenceDefinition struct { + // REQUIRED; Resource Id of the application gateway for containers. + ID *string +} + +// ApplicationGatewayFrontendIPConfiguration - Frontend IP configuration of an application gateway. +type ApplicationGatewayFrontendIPConfiguration struct { + // Resource ID. + ID *string + + // Name of the frontend IP configuration that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway frontend IP configuration. + Properties *ApplicationGatewayFrontendIPConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of Frontend IP configuration of an application gateway. +type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { + // PrivateIPAddress of the network interface IP Configuration. + PrivateIPAddress *string + + // The private IP address allocation method. + PrivateIPAllocationMethod *IPAllocationMethod + + // Reference to the application gateway private link configuration. + PrivateLinkConfiguration *SubResource + + // Reference to the PublicIP resource. + PublicIPAddress *SubResource + + // Reference to the subnet resource. + Subnet *SubResource + + // READ-ONLY; The provisioning state of the frontend IP configuration resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayFrontendPort - Frontend port of an application gateway. +type ApplicationGatewayFrontendPort struct { + // Resource ID. + ID *string + + // Name of the frontend port that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway frontend port. + Properties *ApplicationGatewayFrontendPortPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayFrontendPortPropertiesFormat - Properties of Frontend port of an application gateway. +type ApplicationGatewayFrontendPortPropertiesFormat struct { + // Frontend port. + Port *int32 + + // READ-ONLY; The provisioning state of the frontend port resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayGlobalConfiguration - Application Gateway global configuration. +type ApplicationGatewayGlobalConfiguration struct { + // Enable request buffering. + EnableRequestBuffering *bool + + // Enable response buffering. + EnableResponseBuffering *bool +} + +// ApplicationGatewayHTTPListener - Http listener of an application gateway. +type ApplicationGatewayHTTPListener struct { + // Resource ID. + ID *string + + // Name of the HTTP listener that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway HTTP listener. + Properties *ApplicationGatewayHTTPListenerPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayHTTPListenerPropertiesFormat - Properties of HTTP listener of an application gateway. +type ApplicationGatewayHTTPListenerPropertiesFormat struct { + // Custom error configurations of the HTTP listener. + CustomErrorConfigurations []*ApplicationGatewayCustomError + + // Reference to the FirewallPolicy resource. + FirewallPolicy *SubResource + + // Frontend IP configuration resource of an application gateway. + FrontendIPConfiguration *SubResource + + // Frontend port resource of an application gateway. + FrontendPort *SubResource + + // Host name of HTTP listener. + HostName *string + + // List of Host names for HTTP Listener that allows special wildcard characters as well. + HostNames []*string + + // Protocol of the HTTP listener. + Protocol *ApplicationGatewayProtocol + + // Applicable only if protocol is https. Enables SNI for multi-hosting. + RequireServerNameIndication *bool + + // SSL certificate resource of an application gateway. + SSLCertificate *SubResource + + // SSL profile resource of the application gateway. + SSLProfile *SubResource + + // READ-ONLY; The provisioning state of the HTTP listener resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayHeaderConfiguration - Header configuration of the Actions set in Application Gateway. +type ApplicationGatewayHeaderConfiguration struct { + // Header name of the header configuration. + HeaderName *string + + // Header value of the header configuration. + HeaderValue *string + + // An optional field under "Rewrite Action". It lets you capture and modify the value(s) of a specific header when multiple + // headers with the same name exist. Currently supported for Set-Cookie Response + // header only. For more details, visit https://aka.ms/appgwheadercrud + HeaderValueMatcher *HeaderValueMatcher +} + +// ApplicationGatewayIPConfiguration - IP configuration of an application gateway. Currently 1 public and 1 private IP configuration +// is allowed. +type ApplicationGatewayIPConfiguration struct { + // Resource ID. + ID *string + + // Name of the IP configuration that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway IP configuration. + Properties *ApplicationGatewayIPConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayIPConfigurationPropertiesFormat - Properties of IP configuration of an application gateway. +type ApplicationGatewayIPConfigurationPropertiesFormat struct { + // Reference to the subnet resource. A subnet from where application gateway gets its private address. + Subnet *SubResource + + // READ-ONLY; The provisioning state of the application gateway IP configuration resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayListResult - Response for ListApplicationGateways API service call. +type ApplicationGatewayListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of an application gateways in a resource group. + Value []*ApplicationGateway +} + +// ApplicationGatewayListener - Listener of an application gateway. +type ApplicationGatewayListener struct { + // Resource ID. + ID *string + + // Name of the listener that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway listener. + Properties *ApplicationGatewayListenerPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayListenerPropertiesFormat - Properties of listener of an application gateway. +type ApplicationGatewayListenerPropertiesFormat struct { + // Frontend IP configuration resource of an application gateway. + FrontendIPConfiguration *SubResource + + // Frontend port resource of an application gateway. + FrontendPort *SubResource + + // List of Server Name Indications(SNI) for TLS Multi-site Listener that allows special wildcard characters as well. + HostNames []*string + + // Protocol of the listener. + Protocol *ApplicationGatewayProtocol + + // SSL certificate resource of an application gateway. + SSLCertificate *SubResource + + // SSL profile resource of the application gateway. + SSLProfile *SubResource + + // READ-ONLY; The provisioning state of the listener resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayLoadDistributionPolicy - Load Distribution Policy of an application gateway. +type ApplicationGatewayLoadDistributionPolicy struct { + // Resource ID. + ID *string + + // Name of the load distribution policy that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway load distribution policy. + Properties *ApplicationGatewayLoadDistributionPolicyPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayLoadDistributionPolicyPropertiesFormat - Properties of Load Distribution Policy of an application gateway. +type ApplicationGatewayLoadDistributionPolicyPropertiesFormat struct { + // Load Distribution Targets resource of an application gateway. + LoadDistributionAlgorithm *ApplicationGatewayLoadDistributionAlgorithm + + // Load Distribution Targets resource of an application gateway. + LoadDistributionTargets []*ApplicationGatewayLoadDistributionTarget + + // READ-ONLY; The provisioning state of the Load Distribution Policy resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayLoadDistributionTarget - Load Distribution Target of an application gateway. +type ApplicationGatewayLoadDistributionTarget struct { + // Resource ID. + ID *string + + // Name of the load distribution policy that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway load distribution target. + Properties *ApplicationGatewayLoadDistributionTargetPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +type ApplicationGatewayLoadDistributionTargetPropertiesFormat struct { + // Backend address pool resource of the application gateway. + BackendAddressPool *SubResource + + // Weight per server. Range between 1 and 100. + WeightPerServer *int32 +} + +// ApplicationGatewayOnDemandProbe - Details of on demand test probe request. +type ApplicationGatewayOnDemandProbe struct { + // Reference to backend pool of application gateway to which probe request will be sent. + BackendAddressPool *SubResource + + // Reference to backend http setting of application gateway to be used for test probe. + BackendHTTPSettings *SubResource + + // Host name to send the probe to. + Host *string + + // Criterion for classifying a healthy probe response. + Match *ApplicationGatewayProbeHealthResponseMatch + + // Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. + Path *string + + // Whether the host header should be picked from the backend http settings. Default value is false. + PickHostNameFromBackendHTTPSettings *bool + + // The protocol used for the probe. + Protocol *ApplicationGatewayProtocol + + // The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable + // values are from 1 second to 86400 seconds. + Timeout *int32 +} + +// ApplicationGatewayPathRule - Path rule of URL path map of an application gateway. +type ApplicationGatewayPathRule struct { + // Resource ID. + ID *string + + // Name of the path rule that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway path rule. + Properties *ApplicationGatewayPathRulePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayPathRulePropertiesFormat - Properties of path rule of an application gateway. +type ApplicationGatewayPathRulePropertiesFormat struct { + // Backend address pool resource of URL path map path rule. + BackendAddressPool *SubResource + + // Backend http settings resource of URL path map path rule. + BackendHTTPSettings *SubResource + + // Reference to the FirewallPolicy resource. + FirewallPolicy *SubResource + + // Load Distribution Policy resource of URL path map path rule. + LoadDistributionPolicy *SubResource + + // Path rules of URL path map. + Paths []*string + + // Redirect configuration resource of URL path map path rule. + RedirectConfiguration *SubResource + + // Rewrite rule set resource of URL path map path rule. + RewriteRuleSet *SubResource + + // READ-ONLY; The provisioning state of the path rule resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayPrivateEndpointConnection - Private Endpoint connection on an application gateway. +type ApplicationGatewayPrivateEndpointConnection struct { + // Resource ID. + ID *string + + // Name of the private endpoint connection on an application gateway. + Name *string + + // Properties of the application gateway private endpoint connection. + Properties *ApplicationGatewayPrivateEndpointConnectionProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayPrivateEndpointConnectionListResult - Response for ListApplicationGatewayPrivateEndpointConnection API +// service call. Gets all private endpoint connections for an application gateway. +type ApplicationGatewayPrivateEndpointConnectionListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of private endpoint connections on an application gateway. + Value []*ApplicationGatewayPrivateEndpointConnection +} + +// ApplicationGatewayPrivateEndpointConnectionProperties - Properties of Private Link Resource of an application gateway. +type ApplicationGatewayPrivateEndpointConnectionProperties struct { + // A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState + + // READ-ONLY; The consumer link id. + LinkIdentifier *string + + // READ-ONLY; The resource of private end point. + PrivateEndpoint *PrivateEndpoint + + // READ-ONLY; The provisioning state of the application gateway private endpoint connection resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayPrivateLinkConfiguration - Private Link Configuration on an application gateway. +type ApplicationGatewayPrivateLinkConfiguration struct { + // Resource ID. + ID *string + + // Name of the private link configuration that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway private link configuration. + Properties *ApplicationGatewayPrivateLinkConfigurationProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayPrivateLinkConfigurationProperties - Properties of private link configuration on an application gateway. +type ApplicationGatewayPrivateLinkConfigurationProperties struct { + // An array of application gateway private link ip configurations. + IPConfigurations []*ApplicationGatewayPrivateLinkIPConfiguration + + // READ-ONLY; The provisioning state of the application gateway private link configuration. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayPrivateLinkIPConfiguration - The application gateway private link ip configuration. +type ApplicationGatewayPrivateLinkIPConfiguration struct { + // Resource ID. + ID *string + + // The name of application gateway private link ip configuration. + Name *string + + // Properties of an application gateway private link ip configuration. + Properties *ApplicationGatewayPrivateLinkIPConfigurationProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; The resource type. + Type *string +} + +// ApplicationGatewayPrivateLinkIPConfigurationProperties - Properties of an application gateway private link IP configuration. +type ApplicationGatewayPrivateLinkIPConfigurationProperties struct { + // Whether the ip configuration is primary or not. + Primary *bool + + // The private IP address of the IP configuration. + PrivateIPAddress *string + + // The private IP address allocation method. + PrivateIPAllocationMethod *IPAllocationMethod + + // Reference to the subnet resource. + Subnet *SubResource + + // READ-ONLY; The provisioning state of the application gateway private link IP configuration. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayPrivateLinkResource - PrivateLink Resource of an application gateway. +type ApplicationGatewayPrivateLinkResource struct { + // Resource ID. + ID *string + + // Name of the private link resource that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway private link resource. + Properties *ApplicationGatewayPrivateLinkResourceProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayPrivateLinkResourceListResult - Response for ListApplicationGatewayPrivateLinkResources API service call. +// Gets all private link resources for an application gateway. +type ApplicationGatewayPrivateLinkResourceListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of private link resources of an application gateway. + Value []*ApplicationGatewayPrivateLinkResource +} + +// ApplicationGatewayPrivateLinkResourceProperties - Properties of a private link resource. +type ApplicationGatewayPrivateLinkResourceProperties struct { + // Required DNS zone names of the the private link resource. + RequiredZoneNames []*string + + // READ-ONLY; Group identifier of private link resource. + GroupID *string + + // READ-ONLY; Required member names of private link resource. + RequiredMembers []*string +} + +// ApplicationGatewayProbe - Probe of the application gateway. +type ApplicationGatewayProbe struct { + // Resource ID. + ID *string + + // Name of the probe that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway probe. + Properties *ApplicationGatewayProbePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayProbeHealthResponseMatch - Application gateway probe health response match. +type ApplicationGatewayProbeHealthResponseMatch struct { + // Body that must be contained in the health response. Default value is empty. + Body *string + + // Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. + StatusCodes []*string +} + +// ApplicationGatewayProbePropertiesFormat - Properties of probe of an application gateway. +type ApplicationGatewayProbePropertiesFormat struct { + // Host name to send the probe to. + Host *string + + // The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 + // second to 86400 seconds. + Interval *int32 + + // Criterion for classifying a healthy probe response. + Match *ApplicationGatewayProbeHealthResponseMatch + + // Minimum number of servers that are always marked healthy. Default value is 0. + MinServers *int32 + + // Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. + Path *string + + // Whether the host header should be picked from the backend http settings. Default value is false. + PickHostNameFromBackendHTTPSettings *bool + + // Whether the server name indication should be picked from the backend settings for Tls protocol. Default value is false. + PickHostNameFromBackendSettings *bool + + // Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, + // port from http settings will be used. This property is valid for Basic, + // Standardv2 and WAFv2 only. + Port *int32 + + // The protocol used for the probe. + Protocol *ApplicationGatewayProtocol + + // The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable + // values are from 1 second to 86400 seconds. + Timeout *int32 + + // The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. + // Acceptable values are from 1 second to 20. + UnhealthyThreshold *int32 + + // READ-ONLY; The provisioning state of the probe resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayPropertiesFormat - Properties of the application gateway. +type ApplicationGatewayPropertiesFormat struct { + // Authentication certificates of the application gateway resource. For default limits, see Application Gateway limits + // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + AuthenticationCertificates []*ApplicationGatewayAuthenticationCertificate + + // Autoscale Configuration. + AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration + + // Backend address pool of the application gateway resource. For default limits, see Application Gateway limits + // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + BackendAddressPools []*ApplicationGatewayBackendAddressPool + + // Backend http settings of the application gateway resource. For default limits, see Application Gateway limits + // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + BackendHTTPSettingsCollection []*ApplicationGatewayBackendHTTPSettings + + // Backend settings of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits] + // . + BackendSettingsCollection []*ApplicationGatewayBackendSettings + + // Custom error configurations of the application gateway resource. + CustomErrorConfigurations []*ApplicationGatewayCustomError + + // Whether FIPS is enabled on the application gateway resource. + EnableFips *bool + + // Whether HTTP2 is enabled on the application gateway resource. + EnableHTTP2 *bool + + // Reference to the FirewallPolicy resource. + FirewallPolicy *SubResource + + // If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config. + ForceFirewallPolicyAssociation *bool + + // Frontend IP addresses of the application gateway resource. For default limits, see Application Gateway limits + // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + FrontendIPConfigurations []*ApplicationGatewayFrontendIPConfiguration + + // Frontend ports of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + FrontendPorts []*ApplicationGatewayFrontendPort + + // Subnets of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + GatewayIPConfigurations []*ApplicationGatewayIPConfiguration + + // Global Configuration. + GlobalConfiguration *ApplicationGatewayGlobalConfiguration + + // Http listeners of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + HTTPListeners []*ApplicationGatewayHTTPListener + + // Listeners of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + Listeners []*ApplicationGatewayListener + + // Load distribution policies of the application gateway resource. + LoadDistributionPolicies []*ApplicationGatewayLoadDistributionPolicy + + // PrivateLink configurations on application gateway. + PrivateLinkConfigurations []*ApplicationGatewayPrivateLinkConfiguration + + // Probes of the application gateway resource. + Probes []*ApplicationGatewayProbe + + // Redirect configurations of the application gateway resource. For default limits, see Application Gateway limits + // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + RedirectConfigurations []*ApplicationGatewayRedirectConfiguration + + // Request routing rules of the application gateway resource. + RequestRoutingRules []*ApplicationGatewayRequestRoutingRule + + // Rewrite rules for the application gateway resource. + RewriteRuleSets []*ApplicationGatewayRewriteRuleSet + + // Routing rules of the application gateway resource. + RoutingRules []*ApplicationGatewayRoutingRule + + // SKU of the application gateway resource. + SKU *ApplicationGatewaySKU + + // SSL certificates of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits] + // . + SSLCertificates []*ApplicationGatewaySSLCertificate + + // SSL policy of the application gateway resource. + SSLPolicy *ApplicationGatewaySSLPolicy + + // SSL profiles of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + SSLProfiles []*ApplicationGatewaySSLProfile + + // Trusted client certificates of the application gateway resource. For default limits, see Application Gateway limits + // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + TrustedClientCertificates []*ApplicationGatewayTrustedClientCertificate + + // Trusted Root certificates of the application gateway resource. For default limits, see Application Gateway limits + // [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + TrustedRootCertificates []*ApplicationGatewayTrustedRootCertificate + + // URL path map of the application gateway resource. For default limits, see Application Gateway limits [https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits]. + URLPathMaps []*ApplicationGatewayURLPathMap + + // Web application firewall configuration. + WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration + + // READ-ONLY; The default predefined SSL Policy applied on the application gateway resource. + DefaultPredefinedSSLPolicy *ApplicationGatewaySSLPolicyName + + // READ-ONLY; Operational state of the application gateway resource. + OperationalState *ApplicationGatewayOperationalState + + // READ-ONLY; Private Endpoint connections on application gateway. + PrivateEndpointConnections []*ApplicationGatewayPrivateEndpointConnection + + // READ-ONLY; The provisioning state of the application gateway resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the application gateway resource. + ResourceGUID *string +} + +// ApplicationGatewayRedirectConfiguration - Redirect configuration of an application gateway. +type ApplicationGatewayRedirectConfiguration struct { + // Resource ID. + ID *string + + // Name of the redirect configuration that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway redirect configuration. + Properties *ApplicationGatewayRedirectConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of redirect configuration of the application gateway. +type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { + // Include path in the redirected url. + IncludePath *bool + + // Include query string in the redirected url. + IncludeQueryString *bool + + // Path rules specifying redirect configuration. + PathRules []*SubResource + + // HTTP redirection type. + RedirectType *ApplicationGatewayRedirectType + + // Request routing specifying redirect configuration. + RequestRoutingRules []*SubResource + + // Reference to a listener to redirect the request to. + TargetListener *SubResource + + // Url to redirect the request to. + TargetURL *string + + // Url path maps specifying default redirect configuration. + URLPathMaps []*SubResource +} + +// ApplicationGatewayRequestRoutingRule - Request routing rule of an application gateway. +type ApplicationGatewayRequestRoutingRule struct { + // Resource ID. + ID *string + + // Name of the request routing rule that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway request routing rule. + Properties *ApplicationGatewayRequestRoutingRulePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of request routing rule of the application gateway. +type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { + // Backend address pool resource of the application gateway. + BackendAddressPool *SubResource + + // Backend http settings resource of the application gateway. + BackendHTTPSettings *SubResource + + // Http listener resource of the application gateway. + HTTPListener *SubResource + + // Load Distribution Policy resource of the application gateway. + LoadDistributionPolicy *SubResource + + // Priority of the request routing rule. + Priority *int32 + + // Redirect configuration resource of the application gateway. + RedirectConfiguration *SubResource + + // Rewrite Rule Set resource in Basic rule of the application gateway. + RewriteRuleSet *SubResource + + // Rule type. + RuleType *ApplicationGatewayRequestRoutingRuleType + + // URL path map resource of the application gateway. + URLPathMap *SubResource + + // READ-ONLY; The provisioning state of the request routing rule resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayRewriteRule - Rewrite rule of an application gateway. +type ApplicationGatewayRewriteRule struct { + // Set of actions to be done as part of the rewrite Rule. + ActionSet *ApplicationGatewayRewriteRuleActionSet + + // Conditions based on which the action set execution will be evaluated. + Conditions []*ApplicationGatewayRewriteRuleCondition + + // Name of the rewrite rule that is unique within an Application Gateway. + Name *string + + // Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet. + RuleSequence *int32 +} + +// ApplicationGatewayRewriteRuleActionSet - Set of actions in the Rewrite Rule in Application Gateway. +type ApplicationGatewayRewriteRuleActionSet struct { + // Request Header Actions in the Action Set. + RequestHeaderConfigurations []*ApplicationGatewayHeaderConfiguration + + // Response Header Actions in the Action Set. + ResponseHeaderConfigurations []*ApplicationGatewayHeaderConfiguration + + // Url Configuration Action in the Action Set. + URLConfiguration *ApplicationGatewayURLConfiguration +} + +// ApplicationGatewayRewriteRuleCondition - Set of conditions in the Rewrite Rule in Application Gateway. +type ApplicationGatewayRewriteRuleCondition struct { + // Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison. + IgnoreCase *bool + + // Setting this value as truth will force to check the negation of the condition given by the user. + Negate *bool + + // The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition. + Pattern *string + + // The condition parameter of the RewriteRuleCondition. + Variable *string +} + +// ApplicationGatewayRewriteRuleSet - Rewrite rule set of an application gateway. +type ApplicationGatewayRewriteRuleSet struct { + // Resource ID. + ID *string + + // Name of the rewrite rule set that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway rewrite rule set. + Properties *ApplicationGatewayRewriteRuleSetPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of rewrite rule set of the application gateway. +type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { + // Rewrite rules in the rewrite rule set. + RewriteRules []*ApplicationGatewayRewriteRule + + // READ-ONLY; The provisioning state of the rewrite rule set resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayRoutingRule - Routing rule of an application gateway. +type ApplicationGatewayRoutingRule struct { + // Resource ID. + ID *string + + // Name of the routing rule that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway routing rule. + Properties *ApplicationGatewayRoutingRulePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayRoutingRulePropertiesFormat - Properties of routing rule of the application gateway. +type ApplicationGatewayRoutingRulePropertiesFormat struct { + // REQUIRED; Priority of the routing rule. + Priority *int32 + + // Backend address pool resource of the application gateway. + BackendAddressPool *SubResource + + // Backend settings resource of the application gateway. + BackendSettings *SubResource + + // Listener resource of the application gateway. + Listener *SubResource + + // Rule type. + RuleType *ApplicationGatewayRequestRoutingRuleType + + // READ-ONLY; The provisioning state of the request routing rule resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewaySKU - SKU of an application gateway. +type ApplicationGatewaySKU struct { + // Capacity (instance count) of an application gateway. + Capacity *int32 + + // Family of an application gateway SKU. + Family *ApplicationGatewaySKUFamily + + // Name of an application gateway SKU. + Name *ApplicationGatewaySKUName + + // Tier of an application gateway. + Tier *ApplicationGatewayTier +} + +// ApplicationGatewaySSLCertificate - SSL certificates of an application gateway. +type ApplicationGatewaySSLCertificate struct { + // Resource ID. + ID *string + + // Name of the SSL certificate that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway SSL certificate. + Properties *ApplicationGatewaySSLCertificatePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewaySSLCertificatePropertiesFormat - Properties of SSL certificates of an application gateway. +type ApplicationGatewaySSLCertificatePropertiesFormat struct { + // Base-64 encoded pfx certificate. Only applicable in PUT Request. + Data *string + + // Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + KeyVaultSecretID *string + + // Password for the pfx file specified in data. Only applicable in PUT request. + Password *string + + // READ-ONLY; The provisioning state of the SSL certificate resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. + PublicCertData *string +} + +// ApplicationGatewaySSLPolicy - Application Gateway Ssl policy. +type ApplicationGatewaySSLPolicy struct { + // Ssl cipher suites to be enabled in the specified order to application gateway. + CipherSuites []*ApplicationGatewaySSLCipherSuite + + // Ssl protocols to be disabled on application gateway. + DisabledSSLProtocols []*ApplicationGatewaySSLProtocol + + // Minimum version of Ssl protocol to be supported on application gateway. + MinProtocolVersion *ApplicationGatewaySSLProtocol + + // Name of Ssl predefined policy. + PolicyName *ApplicationGatewaySSLPolicyName + + // Type of Ssl Policy. + PolicyType *ApplicationGatewaySSLPolicyType +} + +// ApplicationGatewaySSLPredefinedPolicy - An Ssl predefined policy. +type ApplicationGatewaySSLPredefinedPolicy struct { + // Resource ID. + ID *string + + // Name of the Ssl predefined policy. + Name *string + + // Properties of the application gateway SSL predefined policy. + Properties *ApplicationGatewaySSLPredefinedPolicyPropertiesFormat +} + +// ApplicationGatewaySSLPredefinedPolicyPropertiesFormat - Properties of ApplicationGatewaySslPredefinedPolicy. +type ApplicationGatewaySSLPredefinedPolicyPropertiesFormat struct { + // Ssl cipher suites to be enabled in the specified order for application gateway. + CipherSuites []*ApplicationGatewaySSLCipherSuite + + // Minimum version of Ssl protocol to be supported on application gateway. + MinProtocolVersion *ApplicationGatewaySSLProtocol +} + +// ApplicationGatewaySSLProfile - SSL profile of an application gateway. +type ApplicationGatewaySSLProfile struct { + // Resource ID. + ID *string + + // Name of the SSL profile that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway SSL profile. + Properties *ApplicationGatewaySSLProfilePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewaySSLProfilePropertiesFormat - Properties of SSL profile of an application gateway. +type ApplicationGatewaySSLProfilePropertiesFormat struct { + // Client authentication configuration of the application gateway resource. + ClientAuthConfiguration *ApplicationGatewayClientAuthConfiguration + + // SSL policy of the application gateway resource. + SSLPolicy *ApplicationGatewaySSLPolicy + + // Array of references to application gateway trusted client certificates. + TrustedClientCertificates []*SubResource + + // READ-ONLY; The provisioning state of the HTTP listener resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayTrustedClientCertificate - Trusted client certificates of an application gateway. +type ApplicationGatewayTrustedClientCertificate struct { + // Resource ID. + ID *string + + // Name of the trusted client certificate that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway trusted client certificate. + Properties *ApplicationGatewayTrustedClientCertificatePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayTrustedClientCertificatePropertiesFormat - Trusted client certificates properties of an application gateway. +type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct { + // Certificate public data. + Data *string + + // READ-ONLY; Distinguished name of client certificate issuer. + ClientCertIssuerDN *string + + // READ-ONLY; The provisioning state of the trusted client certificate resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Validated certificate data. + ValidatedCertData *string +} + +// ApplicationGatewayTrustedRootCertificate - Trusted Root certificates of an application gateway. +type ApplicationGatewayTrustedRootCertificate struct { + // Resource ID. + ID *string + + // Name of the trusted root certificate that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway trusted root certificate. + Properties *ApplicationGatewayTrustedRootCertificatePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Trusted Root certificates properties of an application gateway. +type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { + // Certificate public data. + Data *string + + // Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + KeyVaultSecretID *string + + // READ-ONLY; The provisioning state of the trusted root certificate resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayURLConfiguration - Url configuration of the Actions set in Application Gateway. +type ApplicationGatewayURLConfiguration struct { + // Url path which user has provided for url rewrite. Null means no path will be updated. Default value is null. + ModifiedPath *string + + // Query string which user has provided for url rewrite. Null means no query string will be updated. Default value is null. + ModifiedQueryString *string + + // If set as true, it will re-evaluate the url path map provided in path based request routing rules using modified path. + // Default value is false. + Reroute *bool +} + +// ApplicationGatewayURLPathMap - UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. +type ApplicationGatewayURLPathMap struct { + // Resource ID. + ID *string + + // Name of the URL path map that is unique within an Application Gateway. + Name *string + + // Properties of the application gateway URL path map. + Properties *ApplicationGatewayURLPathMapPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ApplicationGatewayURLPathMapPropertiesFormat - Properties of UrlPathMap of the application gateway. +type ApplicationGatewayURLPathMapPropertiesFormat struct { + // Default backend address pool resource of URL path map. + DefaultBackendAddressPool *SubResource + + // Default backend http settings resource of URL path map. + DefaultBackendHTTPSettings *SubResource + + // Default Load Distribution Policy resource of URL path map. + DefaultLoadDistributionPolicy *SubResource + + // Default redirect configuration resource of URL path map. + DefaultRedirectConfiguration *SubResource + + // Default Rewrite rule set resource of URL path map. + DefaultRewriteRuleSet *SubResource + + // Path rule of URL path map resource. + PathRules []*ApplicationGatewayPathRule + + // READ-ONLY; The provisioning state of the URL path map resource. + ProvisioningState *ProvisioningState +} + +// ApplicationGatewayWafDynamicManifestPropertiesResult - Properties of ApplicationGatewayWafDynamicManifest. +type ApplicationGatewayWafDynamicManifestPropertiesResult struct { + // The available rulesets. + AvailableRuleSets []*ApplicationGatewayFirewallManifestRuleSet + + // The default ruleset. + DefaultRuleSet *DefaultRuleSetPropertyFormat +} + +// ApplicationGatewayWafDynamicManifestResult - Response for ApplicationGatewayWafDynamicManifest API service call. +type ApplicationGatewayWafDynamicManifestResult struct { + // Resource ID. + ID *string + + // Properties of the ApplicationGatewayWafDynamicManifest . + Properties *ApplicationGatewayWafDynamicManifestPropertiesResult + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ApplicationGatewayWafDynamicManifestResultList - Response for ApplicationGatewayWafDynamicManifests API service call. +type ApplicationGatewayWafDynamicManifestResultList struct { + // URL to get the next set of results. + NextLink *string + + // The list of application gateway waf manifest. + Value []*ApplicationGatewayWafDynamicManifestResult +} + +// ApplicationGatewayWebApplicationFirewallConfiguration - Application gateway web application firewall configuration. +type ApplicationGatewayWebApplicationFirewallConfiguration struct { + // REQUIRED; Whether the web application firewall is enabled or not. + Enabled *bool + + // REQUIRED; Web application firewall mode. + FirewallMode *ApplicationGatewayFirewallMode + + // REQUIRED; The type of the web application firewall rule set. Possible values are: 'OWASP'. + RuleSetType *string + + // REQUIRED; The version of the rule set type. + RuleSetVersion *string + + // The disabled rule groups. + DisabledRuleGroups []*ApplicationGatewayFirewallDisabledRuleGroup + + // The exclusion list. + Exclusions []*ApplicationGatewayFirewallExclusion + + // Maximum file upload size in Mb for WAF. + FileUploadLimitInMb *int32 + + // Maximum request body size for WAF. + MaxRequestBodySize *int32 + + // Maximum request body size in Kb for WAF. + MaxRequestBodySizeInKb *int32 + + // Whether allow WAF to check request Body. + RequestBodyCheck *bool +} + +// ApplicationRule - Rule of type application. +type ApplicationRule struct { + // REQUIRED; Rule Type. + RuleType *FirewallPolicyRuleType + + // Description of the rule. + Description *string + + // List of destination IP addresses or Service Tags. + DestinationAddresses []*string + + // List of FQDN Tags for this rule. + FqdnTags []*string + + // List of HTTP/S headers to insert. + HTTPHeadersToInsert []*FirewallPolicyHTTPHeaderToInsert + + // Name of the rule. + Name *string + + // Array of Application Protocols. + Protocols []*FirewallPolicyRuleApplicationProtocol + + // List of source IP addresses for this rule. + SourceAddresses []*string + + // List of source IpGroups for this rule. + SourceIPGroups []*string + + // List of FQDNs for this rule. + TargetFqdns []*string + + // List of Urls for this rule condition. + TargetUrls []*string + + // Terminate TLS connections for this rule. + TerminateTLS *bool + + // List of destination azure web categories. + WebCategories []*string +} + +// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type ApplicationRule. +func (a *ApplicationRule) GetFirewallPolicyRule() *FirewallPolicyRule { + return &FirewallPolicyRule{ + Description: a.Description, + Name: a.Name, + RuleType: a.RuleType, + } +} + +// ApplicationSecurityGroup - An application security group in a resource group. +type ApplicationSecurityGroup struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the application security group. + Properties *ApplicationSecurityGroupPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ApplicationSecurityGroupListResult - A list of application security groups. +type ApplicationSecurityGroupListResult struct { + // A list of application security groups. + Value []*ApplicationSecurityGroup + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// ApplicationSecurityGroupPropertiesFormat - Application security group properties. +type ApplicationSecurityGroupPropertiesFormat struct { + // READ-ONLY; The provisioning state of the application security group resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even + // if the user changes its name or migrate the resource across subscriptions or resource + // groups. + ResourceGUID *string +} + +// AuthorizationListResult - Response for ListAuthorizations API service call retrieves all authorizations that belongs to +// an ExpressRouteCircuit. +type AuthorizationListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The authorizations in an ExpressRoute Circuit. + Value []*ExpressRouteCircuitAuthorization +} + +// AuthorizationPropertiesFormat - Properties of ExpressRouteCircuitAuthorization. +type AuthorizationPropertiesFormat struct { + // The authorization key. + AuthorizationKey *string + + // The authorization use status. + AuthorizationUseStatus *AuthorizationUseStatus + + // READ-ONLY; The reference to the ExpressRoute connection resource using the authorization. + ConnectionResourceURI *string + + // READ-ONLY; The provisioning state of the authorization resource. + ProvisioningState *ProvisioningState +} + +// AutoApprovedPrivateLinkService - The information of an AutoApprovedPrivateLinkService. +type AutoApprovedPrivateLinkService struct { + // The id of the private link service resource. + PrivateLinkService *string +} + +// AutoApprovedPrivateLinkServicesResult - An array of private link service id that can be linked to a private end point with +// auto approved. +type AutoApprovedPrivateLinkServicesResult struct { + // An array of auto approved private link service. + Value []*AutoApprovedPrivateLinkService + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// Availability of the metric. +type Availability struct { + // Duration of the availability blob. + BlobDuration *string + + // The retention of the availability. + Retention *string + + // The time grain of the availability. + TimeGrain *string +} + +// AvailableDelegation - The serviceName of an AvailableDelegation indicates a possible delegation for a subnet. +type AvailableDelegation struct { + // The actions permitted to the service upon delegation. + Actions []*string + + // A unique identifier of the AvailableDelegation resource. + ID *string + + // The name of the AvailableDelegation resource. + Name *string + + // The name of the service and resource. + ServiceName *string + + // Resource type. + Type *string +} + +// AvailableDelegationsResult - An array of available delegations. +type AvailableDelegationsResult struct { + // An array of available delegations. + Value []*AvailableDelegation + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// AvailablePrivateEndpointType - The information of an AvailablePrivateEndpointType. +type AvailablePrivateEndpointType struct { + // Display name of the resource. + DisplayName *string + + // A unique identifier of the AvailablePrivateEndpoint Type resource. + ID *string + + // The name of the service and resource. + Name *string + + // The name of the service and resource. + ResourceName *string + + // Resource type. + Type *string +} + +// AvailablePrivateEndpointTypesResult - An array of available PrivateEndpoint types. +type AvailablePrivateEndpointTypesResult struct { + // An array of available privateEndpoint type. + Value []*AvailablePrivateEndpointType + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// AvailableProvidersList - List of available countries with details. +type AvailableProvidersList struct { + // REQUIRED; List of available countries. + Countries []*AvailableProvidersListCountry +} + +// AvailableProvidersListCity - City or town details. +type AvailableProvidersListCity struct { + // The city or town name. + CityName *string + + // A list of Internet service providers. + Providers []*string +} + +// AvailableProvidersListCountry - Country details. +type AvailableProvidersListCountry struct { + // The country name. + CountryName *string + + // A list of Internet service providers. + Providers []*string + + // List of available states in the country. + States []*AvailableProvidersListState +} + +// AvailableProvidersListParameters - Constraints that determine the list of available Internet service providers. +type AvailableProvidersListParameters struct { + // A list of Azure regions. + AzureLocations []*string + + // The city or town for available providers list. + City *string + + // The country for available providers list. + Country *string + + // The state for available providers list. + State *string +} + +// AvailableProvidersListState - State details. +type AvailableProvidersListState struct { + // List of available cities or towns in the state. + Cities []*AvailableProvidersListCity + + // A list of Internet service providers. + Providers []*string + + // The state name. + StateName *string +} + +// AvailableServiceAlias - The available service alias. +type AvailableServiceAlias struct { + // The ID of the service alias. + ID *string + + // The name of the service alias. + Name *string + + // The resource name of the service alias. + ResourceName *string + + // The type of the resource. + Type *string +} + +// AvailableServiceAliasesResult - An array of available service aliases. +type AvailableServiceAliasesResult struct { + // An array of available service aliases. + Value []*AvailableServiceAlias + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// AzureAsyncOperationResult - The response body contains the status of the specified asynchronous operation, indicating whether +// it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP +// status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response +// body includes the HTTP status code for the successful request. If the +// asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information +// regarding the failure. +type AzureAsyncOperationResult struct { + // Details of the error occurred during specified asynchronous operation. + Error *Error + + // Status of the Azure async operation. + Status *NetworkOperationStatus +} + +// AzureFirewall - Azure Firewall resource. +type AzureFirewall struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the azure firewall. + Properties *AzureFirewallPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // A list of availability zones denoting where the resource needs to come from. + Zones []*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AzureFirewallApplicationRule - Properties of an application rule. +type AzureFirewallApplicationRule struct { + // Description of the rule. + Description *string + + // List of FQDN Tags for this rule. + FqdnTags []*string + + // Name of the application rule. + Name *string + + // Array of ApplicationRuleProtocols. + Protocols []*AzureFirewallApplicationRuleProtocol + + // List of source IP addresses for this rule. + SourceAddresses []*string + + // List of source IpGroups for this rule. + SourceIPGroups []*string + + // List of FQDNs for this rule. + TargetFqdns []*string +} + +// AzureFirewallApplicationRuleCollection - Application rule collection resource. +type AzureFirewallApplicationRuleCollection struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + Name *string + + // Properties of the azure firewall application rule collection. + Properties *AzureFirewallApplicationRuleCollectionPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the application rule collection. +type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { + // The action type of a rule collection. + Action *AzureFirewallRCAction + + // Priority of the application rule collection resource. + Priority *int32 + + // Collection of rules used by a application rule collection. + Rules []*AzureFirewallApplicationRule + + // READ-ONLY; The provisioning state of the application rule collection resource. + ProvisioningState *ProvisioningState +} + +// AzureFirewallApplicationRuleProtocol - Properties of the application rule protocol. +type AzureFirewallApplicationRuleProtocol struct { + // Port number for the protocol, cannot be greater than 64000. This field is optional. + Port *int32 + + // Protocol type. + ProtocolType *AzureFirewallApplicationRuleProtocolType +} + +// AzureFirewallAutoscaleConfiguration - Azure Firewall Autoscale Configuration parameters. +type AzureFirewallAutoscaleConfiguration struct { + // The maximum number of capacity units for this azure firewall. Use null to reset the value to the service default. + MaxCapacity *int32 + + // The minimum number of capacity units for this azure firewall. Use null to reset the value to the service default. + MinCapacity *int32 +} + +// AzureFirewallFqdnTag - Azure Firewall FQDN Tag Resource. +type AzureFirewallFqdnTag struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the azure firewall FQDN tag. + Properties *AzureFirewallFqdnTagPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AzureFirewallFqdnTagListResult - Response for ListAzureFirewallFqdnTags API service call. +type AzureFirewallFqdnTagListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of Azure Firewall FQDN Tags in a resource group. + Value []*AzureFirewallFqdnTag +} + +// AzureFirewallFqdnTagPropertiesFormat - Azure Firewall FQDN Tag Properties. +type AzureFirewallFqdnTagPropertiesFormat struct { + // READ-ONLY; The name of this FQDN Tag. + FqdnTagName *string + + // READ-ONLY; The provisioning state of the Azure firewall FQDN tag resource. + ProvisioningState *ProvisioningState +} + +// AzureFirewallIPConfiguration - IP configuration of an Azure Firewall. +type AzureFirewallIPConfiguration struct { + // Resource ID. + ID *string + + // Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the azure firewall IP configuration. + Properties *AzureFirewallIPConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// AzureFirewallIPConfigurationPropertiesFormat - Properties of IP configuration of an Azure Firewall. +type AzureFirewallIPConfigurationPropertiesFormat struct { + // Reference to the PublicIP resource. This field is a mandatory input if subnet is not null. + PublicIPAddress *SubResource + + // Reference to the subnet resource. This resource must be named 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'. + Subnet *SubResource + + // READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. + PrivateIPAddress *string + + // READ-ONLY; The provisioning state of the Azure firewall IP configuration resource. + ProvisioningState *ProvisioningState +} + +// AzureFirewallIPGroups - IpGroups associated with azure firewall. +type AzureFirewallIPGroups struct { + // READ-ONLY; The iteration number. + ChangeNumber *string + + // READ-ONLY; Resource ID. + ID *string +} + +// AzureFirewallListResult - Response for ListAzureFirewalls API service call. +type AzureFirewallListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of Azure Firewalls in a resource group. + Value []*AzureFirewall +} + +// AzureFirewallNatRCAction - AzureFirewall NAT Rule Collection Action. +type AzureFirewallNatRCAction struct { + // The type of action. + Type *AzureFirewallNatRCActionType +} + +// AzureFirewallNatRule - Properties of a NAT rule. +type AzureFirewallNatRule struct { + // Description of the rule. + Description *string + + // List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags. + DestinationAddresses []*string + + // List of destination ports. + DestinationPorts []*string + + // Name of the NAT rule. + Name *string + + // Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. + Protocols []*AzureFirewallNetworkRuleProtocol + + // List of source IP addresses for this rule. + SourceAddresses []*string + + // List of source IpGroups for this rule. + SourceIPGroups []*string + + // The translated address for this NAT rule. + TranslatedAddress *string + + // The translated FQDN for this NAT rule. + TranslatedFqdn *string + + // The translated port for this NAT rule. + TranslatedPort *string +} + +// AzureFirewallNatRuleCollection - NAT rule collection resource. +type AzureFirewallNatRuleCollection struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + Name *string + + // Properties of the azure firewall NAT rule collection. + Properties *AzureFirewallNatRuleCollectionProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// AzureFirewallNatRuleCollectionProperties - Properties of the NAT rule collection. +type AzureFirewallNatRuleCollectionProperties struct { + // The action type of a NAT rule collection. + Action *AzureFirewallNatRCAction + + // Priority of the NAT rule collection resource. + Priority *int32 + + // Collection of rules used by a NAT rule collection. + Rules []*AzureFirewallNatRule + + // READ-ONLY; The provisioning state of the NAT rule collection resource. + ProvisioningState *ProvisioningState +} + +// AzureFirewallNetworkRule - Properties of the network rule. +type AzureFirewallNetworkRule struct { + // Description of the rule. + Description *string + + // List of destination IP addresses. + DestinationAddresses []*string + + // List of destination FQDNs. + DestinationFqdns []*string + + // List of destination IpGroups for this rule. + DestinationIPGroups []*string + + // List of destination ports. + DestinationPorts []*string + + // Name of the network rule. + Name *string + + // Array of AzureFirewallNetworkRuleProtocols. + Protocols []*AzureFirewallNetworkRuleProtocol + + // List of source IP addresses for this rule. + SourceAddresses []*string + + // List of source IpGroups for this rule. + SourceIPGroups []*string +} + +// AzureFirewallNetworkRuleCollection - Network rule collection resource. +type AzureFirewallNetworkRuleCollection struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within the Azure firewall. This name can be used to access the resource. + Name *string + + // Properties of the azure firewall network rule collection. + Properties *AzureFirewallNetworkRuleCollectionPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the network rule collection. +type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { + // The action type of a rule collection. + Action *AzureFirewallRCAction + + // Priority of the network rule collection resource. + Priority *int32 + + // Collection of rules used by a network rule collection. + Rules []*AzureFirewallNetworkRule + + // READ-ONLY; The provisioning state of the network rule collection resource. + ProvisioningState *ProvisioningState +} + +// AzureFirewallPacketCaptureFlags - Properties of the AzureFirewallRCAction. +type AzureFirewallPacketCaptureFlags struct { + // Flags to capture + Type *AzureFirewallPacketCaptureFlagsType +} + +// AzureFirewallPacketCaptureRule - Group of src/dest ips and ports to be captured. +type AzureFirewallPacketCaptureRule struct { + // List of ports to be captured. + DestinationPorts []*string + + // List of destination IP addresses/subnets to be captured. + Destinations []*string + + // List of source IP addresses/subnets to be captured. + Sources []*string +} + +// AzureFirewallPropertiesFormat - Properties of the Azure Firewall. +type AzureFirewallPropertiesFormat struct { + // The additional properties used to further config this azure firewall. + AdditionalProperties map[string]*string + + // Collection of application rule collections used by Azure Firewall. + ApplicationRuleCollections []*AzureFirewallApplicationRuleCollection + + // Properties to provide a custom autoscale configuration to this azure firewall. + AutoscaleConfiguration *AzureFirewallAutoscaleConfiguration + + // The firewallPolicy associated with this azure firewall. + FirewallPolicy *SubResource + + // IP addresses associated with AzureFirewall. + HubIPAddresses *HubIPAddresses + + // IP configuration of the Azure Firewall resource. + IPConfigurations []*AzureFirewallIPConfiguration + + // IP configuration of the Azure Firewall used for management traffic. + ManagementIPConfiguration *AzureFirewallIPConfiguration + + // Collection of NAT rule collections used by Azure Firewall. + NatRuleCollections []*AzureFirewallNatRuleCollection + + // Collection of network rule collections used by Azure Firewall. + NetworkRuleCollections []*AzureFirewallNetworkRuleCollection + + // The Azure Firewall Resource SKU. + SKU *AzureFirewallSKU + + // The operation mode for Threat Intelligence. + ThreatIntelMode *AzureFirewallThreatIntelMode + + // The virtualHub to which the firewall belongs. + VirtualHub *SubResource + + // READ-ONLY; IpGroups associated with AzureFirewall. + IPGroups []*AzureFirewallIPGroups + + // READ-ONLY; The provisioning state of the Azure firewall resource. + ProvisioningState *ProvisioningState +} + +// AzureFirewallPublicIPAddress - Public IP Address associated with azure firewall. +type AzureFirewallPublicIPAddress struct { + // Public IP Address value. + Address *string +} + +// AzureFirewallRCAction - Properties of the AzureFirewallRCAction. +type AzureFirewallRCAction struct { + // The type of action. + Type *AzureFirewallRCActionType +} + +// AzureFirewallSKU - SKU of an Azure Firewall. +type AzureFirewallSKU struct { + // Name of an Azure Firewall SKU. + Name *AzureFirewallSKUName + + // Tier of an Azure Firewall. + Tier *AzureFirewallSKUTier +} + +// AzureReachabilityReport - Azure reachability report details. +type AzureReachabilityReport struct { + // REQUIRED; The aggregation level of Azure reachability report. Can be Country, State or City. + AggregationLevel *string + + // REQUIRED; Parameters that define a geographic location. + ProviderLocation *AzureReachabilityReportLocation + + // REQUIRED; List of Azure reachability report items. + ReachabilityReport []*AzureReachabilityReportItem +} + +// AzureReachabilityReportItem - Azure reachability report details for a given provider location. +type AzureReachabilityReportItem struct { + // The Azure region. + AzureLocation *string + + // List of latency details for each of the time series. + Latencies []*AzureReachabilityReportLatencyInfo + + // The Internet service provider. + Provider *string +} + +// AzureReachabilityReportLatencyInfo - Details on latency for a time series. +type AzureReachabilityReportLatencyInfo struct { + // The relative latency score between 1 and 100, higher values indicating a faster connection. + Score *int32 + + // The time stamp. + TimeStamp *time.Time +} + +// AzureReachabilityReportLocation - Parameters that define a geographic location. +type AzureReachabilityReportLocation struct { + // REQUIRED; The name of the country. + Country *string + + // The name of the city or town. + City *string + + // The name of the state. + State *string +} + +// AzureReachabilityReportParameters - Geographic and time constraints for Azure reachability report. +type AzureReachabilityReportParameters struct { + // REQUIRED; The end time for the Azure reachability report. + EndTime *time.Time + + // REQUIRED; Parameters that define a geographic location. + ProviderLocation *AzureReachabilityReportLocation + + // REQUIRED; The start time for the Azure reachability report. + StartTime *time.Time + + // Optional Azure regions to scope the query to. + AzureLocations []*string + + // List of Internet service providers. + Providers []*string +} + +// AzureWebCategory - Azure Web Category Resource. +type AzureWebCategory struct { + // Resource ID. + ID *string + + // Properties of the Azure Web Category. + Properties *AzureWebCategoryPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AzureWebCategoryListResult - Response for ListAzureWebCategories API service call. +type AzureWebCategoryListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of Azure Web Categories for a given Subscription. + Value []*AzureWebCategory +} + +// AzureWebCategoryPropertiesFormat - Azure Web Category Properties. +type AzureWebCategoryPropertiesFormat struct { + // READ-ONLY; The name of the group that the category belongs to. + Group *string +} + +// BGPCommunity - Contains bgp community information offered in Service Community resources. +type BGPCommunity struct { + // The name of the bgp community. e.g. Skype. + CommunityName *string + + // The prefixes that the bgp community contains. + CommunityPrefixes []*string + + // The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + CommunityValue *string + + // Customer is authorized to use bgp community or not. + IsAuthorizedToUse *bool + + // The service group of the bgp community contains. + ServiceGroup *string + + // The region which the service support. e.g. For O365, region is Global. + ServiceSupportedRegion *string +} + +// BackendAddressInboundNatRulePortMappings - The response for a QueryInboundNatRulePortMapping API. +type BackendAddressInboundNatRulePortMappings struct { + // Collection of inbound NAT rule port mappings. + InboundNatRulePortMappings []*InboundNatRulePortMapping +} + +// BackendAddressPool - Pool of backend IP addresses. +type BackendAddressPool struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within the set of backend address pools used by the load balancer. This name can + // be used to access the resource. + Name *string + + // Properties of load balancer backend address pool. + Properties *BackendAddressPoolPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// BackendAddressPoolPropertiesFormat - Properties of the backend address pool. +type BackendAddressPoolPropertiesFormat struct { + // Amount of seconds Load Balancer waits for before sending RESET to client and backend address. + DrainPeriodInSeconds *int32 + + // An array of backend addresses. + LoadBalancerBackendAddresses []*LoadBalancerBackendAddress + + // The location of the backend address pool. + Location *string + + // Backend address synchronous mode for the backend pool + SyncMode *SyncMode + + // An array of gateway load balancer tunnel interfaces. + TunnelInterfaces []*GatewayLoadBalancerTunnelInterface + + // A reference to a virtual network. + VirtualNetwork *SubResource + + // READ-ONLY; An array of references to IP addresses defined in network interfaces. + BackendIPConfigurations []*InterfaceIPConfiguration + + // READ-ONLY; An array of references to inbound NAT rules that use this backend address pool. + InboundNatRules []*SubResource + + // READ-ONLY; An array of references to load balancing rules that use this backend address pool. + LoadBalancingRules []*SubResource + + // READ-ONLY; A reference to an outbound rule that uses this backend address pool. + OutboundRule *SubResource + + // READ-ONLY; An array of references to outbound rules that use this backend address pool. + OutboundRules []*SubResource + + // READ-ONLY; The provisioning state of the backend address pool resource. + ProvisioningState *ProvisioningState +} + +// BaseAdminRule - Network base admin rule. +type BaseAdminRule struct { + // REQUIRED; Whether the rule is custom or default. + Kind *AdminRuleKind + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// GetBaseAdminRule implements the BaseAdminRuleClassification interface for type BaseAdminRule. +func (b *BaseAdminRule) GetBaseAdminRule() *BaseAdminRule { return b } + +// BastionActiveSession - The session detail for a target. +type BastionActiveSession struct { + // READ-ONLY; The protocol used to connect to the target. + Protocol *BastionConnectProtocol + + // READ-ONLY; The type of the resource. + ResourceType *string + + // READ-ONLY; Duration in mins the session has been active. + SessionDurationInMins *float32 + + // READ-ONLY; A unique id for the session. + SessionID *string + + // READ-ONLY; The time when the session started. + StartTime any + + // READ-ONLY; The host name of the target. + TargetHostName *string + + // READ-ONLY; The IP Address of the target. + TargetIPAddress *string + + // READ-ONLY; The resource group of the target. + TargetResourceGroup *string + + // READ-ONLY; The resource id of the target. + TargetResourceID *string + + // READ-ONLY; The subscription id for the target virtual machine. + TargetSubscriptionID *string + + // READ-ONLY; The user name who is active on this session. + UserName *string +} + +// BastionActiveSessionListResult - Response for GetActiveSessions. +type BastionActiveSessionListResult struct { + // The URL to get the next set of results. + NextLink *string + + // List of active sessions on the bastion. + Value []*BastionActiveSession +} + +// BastionHost - Bastion Host resource. +type BastionHost struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Represents the bastion host resource. + Properties *BastionHostPropertiesFormat + + // The sku of this Bastion Host. + SKU *SKU + + // Resource tags. + Tags map[string]*string + + // A list of availability zones denoting where the resource needs to come from. + Zones []*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// BastionHostIPConfiguration - IP configuration of an Bastion Host. +type BastionHostIPConfiguration struct { + // Resource ID. + ID *string + + // Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Represents the ip configuration associated with the resource. + Properties *BastionHostIPConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Ip configuration type. + Type *string +} + +// BastionHostIPConfigurationPropertiesFormat - Properties of IP configuration of an Bastion Host. +type BastionHostIPConfigurationPropertiesFormat struct { + // REQUIRED; Reference of the subnet resource. + Subnet *SubResource + + // Private IP allocation method. + PrivateIPAllocationMethod *IPAllocationMethod + + // Reference of the PublicIP resource. Null for private only bastion + PublicIPAddress *SubResource + + // READ-ONLY; The provisioning state of the bastion host IP configuration resource. + ProvisioningState *ProvisioningState +} + +// BastionHostListResult - Response for ListBastionHosts API service call. +type BastionHostListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of Bastion Hosts in a resource group. + Value []*BastionHost +} + +// BastionHostPropertiesFormat - Properties of the Bastion Host. +type BastionHostPropertiesFormat struct { + // FQDN for the endpoint on which bastion host is accessible. + DNSName *string + + // Enable/Disable Copy/Paste feature of the Bastion Host resource. + DisableCopyPaste *bool + + // Enable/Disable File Copy feature of the Bastion Host resource. + EnableFileCopy *bool + + // Enable/Disable IP Connect feature of the Bastion Host resource. + EnableIPConnect *bool + + // Enable/Disable Kerberos feature of the Bastion Host resource. + EnableKerberos *bool + + // Enable/Disable Private Only feature of the Bastion Host resource. + EnablePrivateOnlyBastion *bool + + // Enable/Disable Session Recording feature of the Bastion Host resource. + EnableSessionRecording *bool + + // Enable/Disable Shareable Link of the Bastion Host resource. + EnableShareableLink *bool + + // Enable/Disable Tunneling feature of the Bastion Host resource. + EnableTunneling *bool + + // IP configuration of the Bastion Host resource. + IPConfigurations []*BastionHostIPConfiguration + NetworkACLs *BastionHostPropertiesFormatNetworkACLs + + // The scale units for the Bastion Host resource. + ScaleUnits *int32 + + // Reference to an existing virtual network required for Developer Bastion Host only. + VirtualNetwork *SubResource + + // READ-ONLY; The provisioning state of the bastion host resource. + ProvisioningState *ProvisioningState +} + +type BastionHostPropertiesFormatNetworkACLs struct { + // Sets the IP ACL rules for Developer Bastion Host. + IPRules []*IPRule +} + +// BastionSessionDeleteResult - Response for DisconnectActiveSessions. +type BastionSessionDeleteResult struct { + // The URL to get the next set of results. + NextLink *string + + // List of sessions with their corresponding state. + Value []*BastionSessionState +} + +// BastionSessionState - The session state detail for a target. +type BastionSessionState struct { + // READ-ONLY; Used for extra information. + Message *string + + // READ-ONLY; A unique id for the session. + SessionID *string + + // READ-ONLY; The state of the session. Disconnected/Failed/NotFound. + State *string +} + +// BastionShareableLink - Bastion Shareable Link. +type BastionShareableLink struct { + // REQUIRED; Reference of the virtual machine resource. + VM *VM + + // READ-ONLY; The unique Bastion Shareable Link to the virtual machine. + Bsl *string + + // READ-ONLY; The time when the link was created. + CreatedAt *string + + // READ-ONLY; Optional field indicating the warning or error message related to the vm in case of partial failure. + Message *string +} + +// BastionShareableLinkListRequest - Post request for Create/Delete/Get Bastion Shareable Link endpoints. +type BastionShareableLinkListRequest struct { + // List of VM references. + VMs []*BastionShareableLink +} + +// BastionShareableLinkListResult - Response for all the Bastion Shareable Link endpoints. +type BastionShareableLinkListResult struct { + // The URL to get the next set of results. + NextLink *string + + // List of Bastion Shareable Links for the request. + Value []*BastionShareableLink +} + +// BastionShareableLinkTokenListRequest - Post request for Delete Bastion Shareable Link By Token endpoint. +type BastionShareableLinkTokenListRequest struct { + // List of Bastion Shareable Link Token. + Tokens []*string +} + +// BgpConnection - Virtual Appliance Site resource. +type BgpConnection struct { + // Resource ID. + ID *string + + // Name of the connection. + Name *string + + // The properties of the Bgp connections. + Properties *BgpConnectionProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Connection type. + Type *string +} + +// BgpConnectionProperties - Properties of the bgp connection. +type BgpConnectionProperties struct { + // The reference to the HubVirtualNetworkConnection resource. + HubVirtualNetworkConnection *SubResource + + // Peer ASN. + PeerAsn *int64 + + // Peer IP. + PeerIP *string + + // READ-ONLY; The current state of the VirtualHub to Peer. + ConnectionState *HubBgpConnectionStatus + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState +} + +// BgpPeerStatus - BGP peer status details. +type BgpPeerStatus struct { + // READ-ONLY; The autonomous system number of the remote BGP peer. + Asn *int64 + + // READ-ONLY; For how long the peering has been up. + ConnectedDuration *string + + // READ-ONLY; The virtual network gateway's local address. + LocalAddress *string + + // READ-ONLY; The number of BGP messages received. + MessagesReceived *int64 + + // READ-ONLY; The number of BGP messages sent. + MessagesSent *int64 + + // READ-ONLY; The remote BGP peer. + Neighbor *string + + // READ-ONLY; The number of routes learned from this peer. + RoutesReceived *int64 + + // READ-ONLY; The BGP peer state. + State *BgpPeerState +} + +// BgpPeerStatusListResult - Response for list BGP peer status API service call. +type BgpPeerStatusListResult struct { + // List of BGP peers. + Value []*BgpPeerStatus +} + +// BgpServiceCommunity - Service Community Properties. +type BgpServiceCommunity struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the BGP service community. + Properties *BgpServiceCommunityPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// BgpServiceCommunityListResult - Response for the ListServiceCommunity API service call. +type BgpServiceCommunityListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of service community resources. + Value []*BgpServiceCommunity +} + +// BgpServiceCommunityPropertiesFormat - Properties of Service Community. +type BgpServiceCommunityPropertiesFormat struct { + // A list of bgp communities. + BgpCommunities []*BGPCommunity + + // The name of the bgp community. e.g. Skype. + ServiceName *string +} + +// BgpSettings - BGP settings details. +type BgpSettings struct { + // The BGP speaker's ASN. + Asn *int64 + + // The BGP peering address and BGP identifier of this BGP speaker. + BgpPeeringAddress *string + + // BGP peering address with IP configuration ID for virtual network gateway. + BgpPeeringAddresses []*IPConfigurationBgpPeeringAddress + + // The weight added to routes learned from this BGP speaker. + PeerWeight *int32 +} + +// BreakOutCategoryPolicies - Network Virtual Appliance Sku Properties. +type BreakOutCategoryPolicies struct { + // Flag to control breakout of o365 allow category. + Allow *bool + + // Flag to control breakout of o365 default category. + Default *bool + + // Flag to control breakout of o365 optimize category. + Optimize *bool +} + +// CheckPrivateLinkServiceVisibilityRequest - Request body of the CheckPrivateLinkServiceVisibility API service call. +type CheckPrivateLinkServiceVisibilityRequest struct { + // The alias of the private link service. + PrivateLinkServiceAlias *string +} + +// ChildResource - Proxy resource representation. +type ChildResource struct { + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CommonErrorAdditionalInfo - The resource management error additional info. +type CommonErrorAdditionalInfo struct { + // READ-ONLY; The additional info. + Info any + + // READ-ONLY; The additional info type. + Type *string +} + +// CommonErrorDetail - The error detail. +type CommonErrorDetail struct { + // READ-ONLY; The error additional info. + AdditionalInfo []*CommonErrorAdditionalInfo + + // READ-ONLY; The error code. + Code *string + + // READ-ONLY; The error details. + Details []*CommonErrorDetail + + // READ-ONLY; The error message. + Message *string + + // READ-ONLY; The error target. + Target *string +} + +// CommonErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. +// (This also follows the OData error response format.). +type CommonErrorResponse struct { + // The error object. + Error *CommonErrorDetail +} + +// CommonProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags +// and a location +type CommonProxyResource struct { + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// CommonResource - Common fields that are returned in the response for all Azure Resource Manager resources +type CommonResource struct { + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// CommonTrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has +// 'tags' and a 'location' +type CommonTrackedResource struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties struct { + // READ-ONLY; The client id of user assigned identity. + ClientID *string + + // READ-ONLY; The principal id of user assigned identity. + PrincipalID *string +} + +// ConfigurationDiagnosticParameters - Parameters to get network configuration diagnostic. +type ConfigurationDiagnosticParameters struct { + // REQUIRED; List of network configuration diagnostic profiles. + Profiles []*ConfigurationDiagnosticProfile + + // REQUIRED; The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, + // VMSS/NetworkInterface and Application Gateway. + TargetResourceID *string + + // Verbosity level. + VerbosityLevel *VerbosityLevel +} + +// ConfigurationDiagnosticProfile - Parameters to compare with network configuration. +type ConfigurationDiagnosticProfile struct { + // REQUIRED; Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. + Destination *string + + // REQUIRED; Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535). + DestinationPort *string + + // REQUIRED; The direction of the traffic. + Direction *Direction + + // REQUIRED; Protocol to be verified on. Accepted values are '*', TCP, UDP. + Protocol *string + + // REQUIRED; Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + Source *string +} + +// ConfigurationDiagnosticResponse - Results of network configuration diagnostic on the target resource. +type ConfigurationDiagnosticResponse struct { + // READ-ONLY; List of network configuration diagnostic results. + Results []*ConfigurationDiagnosticResult +} + +// ConfigurationDiagnosticResult - Network configuration diagnostic result corresponded to provided traffic query. +type ConfigurationDiagnosticResult struct { + // Network security group result. + NetworkSecurityGroupResult *SecurityGroupResult + + // Network configuration diagnostic profile. + Profile *ConfigurationDiagnosticProfile +} + +// ConfigurationGroup - The network configuration group resource +type ConfigurationGroup struct { + // Network group ID. + ID *string + + // The network configuration group properties + Properties *GroupProperties +} + +// ConnectionMonitor - Parameters that define the operation to create a connection monitor. +type ConnectionMonitor struct { + // REQUIRED; Properties of the connection monitor. + Properties *ConnectionMonitorParameters + + // Connection monitor location. + Location *string + + // Connection monitor tags. + Tags map[string]*string +} + +// ConnectionMonitorDestination - Describes the destination of connection monitor. +type ConnectionMonitorDestination struct { + // Address of the connection monitor destination (IP or domain name). + Address *string + + // The destination port used by connection monitor. + Port *int32 + + // The ID of the resource used as the destination by connection monitor. + ResourceID *string +} + +// ConnectionMonitorEndpoint - Describes the connection monitor endpoint. +type ConnectionMonitorEndpoint struct { + // REQUIRED; The name of the connection monitor endpoint. + Name *string + + // Address of the connection monitor endpoint. Supported for AzureVM, ExternalAddress, ArcMachine, MMAWorkspaceMachine endpoint + // type. + Address *string + + // Test coverage for the endpoint. + CoverageLevel *CoverageLevel + + // Filter field is getting deprecated and should not be used. Instead use Include/Exclude scope fields for it. + Filter *ConnectionMonitorEndpointFilter + + // Location details is optional and only being used for 'AzureArcNetwork' type endpoints, which contains region details. + LocationDetails *ConnectionMonitorEndpointLocationDetails + + // Resource ID of the connection monitor endpoint are supported for AzureVM, AzureVMSS, AzureVNet, AzureSubnet, MMAWorkspaceMachine, + // MMAWorkspaceNetwork, AzureArcVM endpoint type. + ResourceID *string + + // Endpoint scope defines which target resource to monitor in case of compound resource endpoints like VMSS, AzureSubnet, + // AzureVNet, MMAWorkspaceNetwork, AzureArcNetwork. + Scope *ConnectionMonitorEndpointScope + + // Subscription ID for connection monitor endpoint. It's an optional parameter which is being used for 'AzureArcNetwork' type + // endpoint. + SubscriptionID *string + + // The endpoint type. + Type *EndpointType +} + +// ConnectionMonitorEndpointFilter - Describes the connection monitor endpoint filter. +type ConnectionMonitorEndpointFilter struct { + // List of items in the filter. + Items []*ConnectionMonitorEndpointFilterItem + + // The behavior of the endpoint filter. Currently only 'Include' is supported. + Type *ConnectionMonitorEndpointFilterType +} + +// ConnectionMonitorEndpointFilterItem - Describes the connection monitor endpoint filter item. +type ConnectionMonitorEndpointFilterItem struct { + // The address of the filter item. + Address *string + + // The type of item included in the filter. Currently only 'AgentAddress' is supported. + Type *ConnectionMonitorEndpointFilterItemType +} + +// ConnectionMonitorEndpointLocationDetails - Connection monitor endpoint location details only being used for 'AzureArcNetwork' +// type endpoints, which contains the region details. +type ConnectionMonitorEndpointLocationDetails struct { + // Region for connection monitor endpoint. + Region *string +} + +// ConnectionMonitorEndpointScope - Describes the connection monitor endpoint scope. +type ConnectionMonitorEndpointScope struct { + // List of items which needs to be excluded from the endpoint scope. + Exclude []*ConnectionMonitorEndpointScopeItem + + // List of items which needs to be included to the endpoint scope. + Include []*ConnectionMonitorEndpointScopeItem +} + +// ConnectionMonitorEndpointScopeItem - Describes the connection monitor endpoint scope item. +type ConnectionMonitorEndpointScopeItem struct { + // The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address. + Address *string +} + +// ConnectionMonitorHTTPConfiguration - Describes the HTTP configuration. +type ConnectionMonitorHTTPConfiguration struct { + // The HTTP method to use. + Method *HTTPConfigurationMethod + + // The path component of the URI. For instance, "/dir1/dir2". + Path *string + + // The port to connect to. + Port *int32 + + // Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit. + PreferHTTPS *bool + + // The HTTP headers to transmit with the request. + RequestHeaders []*HTTPHeader + + // HTTP status codes to consider successful. For instance, "2xx,301-304,418". + ValidStatusCodeRanges []*string +} + +// ConnectionMonitorIcmpConfiguration - Describes the ICMP configuration. +type ConnectionMonitorIcmpConfiguration struct { + // Value indicating whether path evaluation with trace route should be disabled. + DisableTraceRoute *bool +} + +// ConnectionMonitorListResult - List of connection monitors. +type ConnectionMonitorListResult struct { + // Information about connection monitors. + Value []*ConnectionMonitorResult +} + +// ConnectionMonitorOutput - Describes a connection monitor output destination. +type ConnectionMonitorOutput struct { + // Connection monitor output destination type. Currently, only "Workspace" is supported. + Type *OutputType + + // Describes the settings for producing output into a log analytics workspace. + WorkspaceSettings *ConnectionMonitorWorkspaceSettings +} + +// ConnectionMonitorParameters - Parameters that define the operation to create a connection monitor. +type ConnectionMonitorParameters struct { + // Determines if the connection monitor will start automatically once created. + AutoStart *bool + + // Describes the destination of connection monitor. + Destination *ConnectionMonitorDestination + + // List of connection monitor endpoints. + Endpoints []*ConnectionMonitorEndpoint + + // Monitoring interval in seconds. + MonitoringIntervalInSeconds *int32 + + // Optional notes to be associated with the connection monitor. + Notes *string + + // List of connection monitor outputs. + Outputs []*ConnectionMonitorOutput + + // Describes the source of connection monitor. + Source *ConnectionMonitorSource + + // List of connection monitor test configurations. + TestConfigurations []*ConnectionMonitorTestConfiguration + + // List of connection monitor test groups. + TestGroups []*ConnectionMonitorTestGroup +} + +// ConnectionMonitorQueryResult - List of connection states snapshots. +type ConnectionMonitorQueryResult struct { + // Status of connection monitor source. + SourceStatus *ConnectionMonitorSourceStatus + + // Information about connection states. + States []*ConnectionStateSnapshot +} + +// ConnectionMonitorResult - Information about the connection monitor. +type ConnectionMonitorResult struct { + // Connection monitor location. + Location *string + + // Properties of the connection monitor result. + Properties *ConnectionMonitorResultProperties + + // Connection monitor tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; ID of the connection monitor. + ID *string + + // READ-ONLY; Name of the connection monitor. + Name *string + + // READ-ONLY; Connection monitor type. + Type *string +} + +// ConnectionMonitorResultProperties - Describes the properties of a connection monitor. +type ConnectionMonitorResultProperties struct { + // Determines if the connection monitor will start automatically once created. + AutoStart *bool + + // Describes the destination of connection monitor. + Destination *ConnectionMonitorDestination + + // List of connection monitor endpoints. + Endpoints []*ConnectionMonitorEndpoint + + // Monitoring interval in seconds. + MonitoringIntervalInSeconds *int32 + + // Optional notes to be associated with the connection monitor. + Notes *string + + // List of connection monitor outputs. + Outputs []*ConnectionMonitorOutput + + // Describes the source of connection monitor. + Source *ConnectionMonitorSource + + // List of connection monitor test configurations. + TestConfigurations []*ConnectionMonitorTestConfiguration + + // List of connection monitor test groups. + TestGroups []*ConnectionMonitorTestGroup + + // READ-ONLY; Type of connection monitor. + ConnectionMonitorType *ConnectionMonitorType + + // READ-ONLY; The monitoring status of the connection monitor. + MonitoringStatus *string + + // READ-ONLY; The provisioning state of the connection monitor. + ProvisioningState *ProvisioningState + + // READ-ONLY; The date and time when the connection monitor was started. + StartTime *time.Time +} + +// ConnectionMonitorSource - Describes the source of connection monitor. +type ConnectionMonitorSource struct { + // REQUIRED; The ID of the resource used as the source by connection monitor. + ResourceID *string + + // The source port used by connection monitor. + Port *int32 +} + +// ConnectionMonitorSuccessThreshold - Describes the threshold for declaring a test successful. +type ConnectionMonitorSuccessThreshold struct { + // The maximum percentage of failed checks permitted for a test to evaluate as successful. + ChecksFailedPercent *int32 + + // The maximum round-trip time in milliseconds permitted for a test to evaluate as successful. + RoundTripTimeMs *float32 +} + +// ConnectionMonitorTCPConfiguration - Describes the TCP configuration. +type ConnectionMonitorTCPConfiguration struct { + // Destination port behavior. + DestinationPortBehavior *DestinationPortBehavior + + // Value indicating whether path evaluation with trace route should be disabled. + DisableTraceRoute *bool + + // The port to connect to. + Port *int32 +} + +// ConnectionMonitorTestConfiguration - Describes a connection monitor test configuration. +type ConnectionMonitorTestConfiguration struct { + // REQUIRED; The name of the connection monitor test configuration. + Name *string + + // REQUIRED; The protocol to use in test evaluation. + Protocol *ConnectionMonitorTestConfigurationProtocol + + // The parameters used to perform test evaluation over HTTP. + HTTPConfiguration *ConnectionMonitorHTTPConfiguration + + // The parameters used to perform test evaluation over ICMP. + IcmpConfiguration *ConnectionMonitorIcmpConfiguration + + // The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending + // on other parameters. + PreferredIPVersion *PreferredIPVersion + + // The threshold for declaring a test successful. + SuccessThreshold *ConnectionMonitorSuccessThreshold + + // The parameters used to perform test evaluation over TCP. + TCPConfiguration *ConnectionMonitorTCPConfiguration + + // The frequency of test evaluation, in seconds. + TestFrequencySec *int32 +} + +// ConnectionMonitorTestGroup - Describes the connection monitor test group. +type ConnectionMonitorTestGroup struct { + // REQUIRED; List of destination endpoint names. + Destinations []*string + + // REQUIRED; The name of the connection monitor test group. + Name *string + + // REQUIRED; List of source endpoint names. + Sources []*string + + // REQUIRED; List of test configuration names. + TestConfigurations []*string + + // Value indicating whether test group is disabled. + Disable *bool +} + +// ConnectionMonitorWorkspaceSettings - Describes the settings for producing output into a log analytics workspace. +type ConnectionMonitorWorkspaceSettings struct { + // Log analytics workspace resource ID. + WorkspaceResourceID *string +} + +// ConnectionResetSharedKey - The virtual network connection reset shared key. +type ConnectionResetSharedKey struct { + // REQUIRED; The virtual network connection reset shared key length, should between 1 and 128. + KeyLength *int32 +} + +// ConnectionSharedKey - Response for GetConnectionSharedKey API service call. +type ConnectionSharedKey struct { + // REQUIRED; The virtual network connection shared key value. + Value *string + + // Resource ID. + ID *string +} + +// ConnectionSharedKeyResult - SharedKey Resource . +type ConnectionSharedKeyResult struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the shared key. + Properties *SharedKeyProperties + + // READ-ONLY; Resource type. + Type *string +} + +// ConnectionSharedKeyResultList - The list of shared keys for the vpn link connection. It should only contain one shared +// key for each vpn link connection. +type ConnectionSharedKeyResultList struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of SharedKeys. + Value []*ConnectionSharedKeyResult +} + +// ConnectionStateSnapshot - Connection state snapshot. +type ConnectionStateSnapshot struct { + // Average latency in ms. + AvgLatencyInMs *int64 + + // The connection state. + ConnectionState *ConnectionState + + // The end time of the connection snapshot. + EndTime *time.Time + + // Connectivity analysis evaluation state. + EvaluationState *EvaluationState + + // Maximum latency in ms. + MaxLatencyInMs *int64 + + // Minimum latency in ms. + MinLatencyInMs *int64 + + // The number of failed probes. + ProbesFailed *int64 + + // The number of sent probes. + ProbesSent *int64 + + // The start time of the connection snapshot. + StartTime *time.Time + + // READ-ONLY; List of hops between the source and the destination. + Hops []*ConnectivityHop +} + +// ConnectivityConfiguration - The network manager connectivity configuration resource +type ConnectivityConfiguration struct { + // Properties of a network manager connectivity configuration + Properties *ConnectivityConfigurationProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ConnectivityConfigurationListResult - Result of the request to list network manager connectivity configurations. It contains +// a list of configurations and a link to get the next set of results. +type ConnectivityConfigurationListResult struct { + // Gets the URL to get the next page of results. + NextLink *string + + // Gets a page of Connectivity Configurations + Value []*ConnectivityConfiguration +} + +// ConnectivityConfigurationProperties - Properties of network manager connectivity configuration +type ConnectivityConfigurationProperties struct { + // REQUIRED; Groups for configuration + AppliesToGroups []*ConnectivityGroupItem + + // REQUIRED; Connectivity topology type. + ConnectivityTopology *ConnectivityTopology + + // Flag if need to remove current existing peerings. + DeleteExistingPeering *DeleteExistingPeering + + // A description of the connectivity configuration. + Description *string + + // List of hubItems + Hubs []*Hub + + // Flag if global mesh is supported. + IsGlobal *IsGlobal + + // READ-ONLY; The provisioning state of the connectivity configuration resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// ConnectivityDestination - Parameters that define destination of connection. +type ConnectivityDestination struct { + // The IP address or URI the resource to which a connection attempt will be made. + Address *string + + // Port on which check connectivity will be performed. + Port *int32 + + // The ID of the resource to which a connection attempt will be made. + ResourceID *string +} + +// ConnectivityGroupItem - Connectivity group item. +type ConnectivityGroupItem struct { + // REQUIRED; Group connectivity type. + GroupConnectivity *GroupConnectivity + + // REQUIRED; Network group Id. + NetworkGroupID *string + + // Flag if global is supported. + IsGlobal *IsGlobal + + // Flag if need to use hub gateway. + UseHubGateway *UseHubGateway +} + +// ConnectivityHop - Information about a hop between the source and the destination. +type ConnectivityHop struct { + // READ-ONLY; The IP address of the hop. + Address *string + + // READ-ONLY; The ID of the hop. + ID *string + + // READ-ONLY; List of issues. + Issues []*ConnectivityIssue + + // READ-ONLY; List of hop links. + Links []*HopLink + + // READ-ONLY; List of next hop identifiers. + NextHopIDs []*string + + // READ-ONLY; List of previous hop identifiers. + PreviousHopIDs []*string + + // READ-ONLY; List of previous hop links. + PreviousLinks []*HopLink + + // READ-ONLY; The ID of the resource corresponding to this hop. + ResourceID *string + + // READ-ONLY; The type of the hop. + Type *string +} + +// ConnectivityInformation - Information on the connectivity status. +type ConnectivityInformation struct { + // READ-ONLY; Average latency in milliseconds. + AvgLatencyInMs *int32 + + // READ-ONLY; The connection status. + ConnectionStatus *ConnectionStatus + + // READ-ONLY; List of hops between the source and the destination. + Hops []*ConnectivityHop + + // READ-ONLY; Maximum latency in milliseconds. + MaxLatencyInMs *int32 + + // READ-ONLY; Minimum latency in milliseconds. + MinLatencyInMs *int32 + + // READ-ONLY; Number of failed probes. + ProbesFailed *int32 + + // READ-ONLY; Total number of probes sent. + ProbesSent *int32 +} + +// ConnectivityIssue - Information about an issue encountered in the process of checking for connectivity. +type ConnectivityIssue struct { + // READ-ONLY; Provides additional context on the issue. + Context []map[string]*string + + // READ-ONLY; The origin of the issue. + Origin *Origin + + // READ-ONLY; The severity of the issue. + Severity *Severity + + // READ-ONLY; The type of issue. + Type *IssueType +} + +// ConnectivityParameters - Parameters that determine how the connectivity check will be performed. +type ConnectivityParameters struct { + // REQUIRED; The destination of connection. + Destination *ConnectivityDestination + + // REQUIRED; The source of the connection. + Source *ConnectivitySource + + // Preferred IP version of the connection. + PreferredIPVersion *IPVersion + + // Network protocol. + Protocol *Protocol + + // Configuration of the protocol. + ProtocolConfiguration *ProtocolConfiguration +} + +// ConnectivitySource - Parameters that define the source of the connection. +type ConnectivitySource struct { + // REQUIRED; The ID of the resource from which a connectivity check will be initiated. + ResourceID *string + + // The source port from which a connectivity check will be performed. + Port *int32 +} + +// Container - Reference to container resource in remote resource provider. +type Container struct { + // Resource ID. + ID *string +} + +// ContainerNetworkInterface - Container network interface child resource. +type ContainerNetworkInterface struct { + // Resource ID. + ID *string + + // The name of the resource. This name can be used to access the resource. + Name *string + + // Container network interface properties. + Properties *ContainerNetworkInterfacePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Sub Resource type. + Type *string +} + +// ContainerNetworkInterfaceConfiguration - Container network interface configuration child resource. +type ContainerNetworkInterfaceConfiguration struct { + // Resource ID. + ID *string + + // The name of the resource. This name can be used to access the resource. + Name *string + + // Container network interface configuration properties. + Properties *ContainerNetworkInterfaceConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Sub Resource type. + Type *string +} + +// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties. +type ContainerNetworkInterfaceConfigurationPropertiesFormat struct { + // A list of container network interfaces created from this container network interface configuration. + ContainerNetworkInterfaces []*SubResource + + // A list of ip configurations of the container network interface configuration. + IPConfigurations []*IPConfigurationProfile + + // READ-ONLY; The provisioning state of the container network interface configuration resource. + ProvisioningState *ProvisioningState +} + +// ContainerNetworkInterfaceIPConfiguration - The ip configuration for a container network interface. +type ContainerNetworkInterfaceIPConfiguration struct { + // The name of the resource. This name can be used to access the resource. + Name *string + + // Properties of the container network interface IP configuration. + Properties *ContainerNetworkInterfaceIPConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Sub Resource type. + Type *string +} + +// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration. +type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct { + // READ-ONLY; The provisioning state of the container network interface IP configuration resource. + ProvisioningState *ProvisioningState +} + +// ContainerNetworkInterfacePropertiesFormat - Properties of container network interface. +type ContainerNetworkInterfacePropertiesFormat struct { + // Reference to the container to which this container network interface is attached. + Container *Container + + // READ-ONLY; Container network interface configuration from which this container network interface is created. + ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration + + // READ-ONLY; Reference to the ip configuration on this container nic. + IPConfigurations []*ContainerNetworkInterfaceIPConfiguration + + // READ-ONLY; The provisioning state of the container network interface resource. + ProvisioningState *ProvisioningState +} + +// Criterion - A matching criteria which matches routes based on route prefix, community, and AS path. +type Criterion struct { + // List of AS paths which this criteria matches. + AsPath []*string + + // List of BGP communities which this criteria matches. + Community []*string + + // Match condition to apply RouteMap rules. + MatchCondition *RouteMapMatchCondition + + // List of route prefixes which this criteria matches. + RoutePrefix []*string +} + +// CrossTenantScopes - Cross tenant scopes. +type CrossTenantScopes struct { + // READ-ONLY; List of management groups. + ManagementGroups []*string + + // READ-ONLY; List of subscriptions. + Subscriptions []*string + + // READ-ONLY; Tenant ID. + TenantID *string +} + +// CustomDNSConfigPropertiesFormat - Contains custom Dns resolution configuration from customer. +type CustomDNSConfigPropertiesFormat struct { + // Fqdn that resolves to private endpoint ip address. + Fqdn *string + + // A list of private ip addresses of the private endpoint. + IPAddresses []*string +} + +// CustomIPPrefix - Custom IP prefix resource. +type CustomIPPrefix struct { + // The extended location of the custom IP prefix. + ExtendedLocation *ExtendedLocation + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Custom IP prefix properties. + Properties *CustomIPPrefixPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones []*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// CustomIPPrefixListResult - Response for ListCustomIpPrefixes API service call. +type CustomIPPrefixListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of Custom IP prefixes that exists in a resource group. + Value []*CustomIPPrefix +} + +// CustomIPPrefixPropertiesFormat - Custom IP prefix properties. +type CustomIPPrefixPropertiesFormat struct { + // The ASN for CIDR advertising. Should be an integer as string. + Asn *string + + // Authorization message for WAN validation. + AuthorizationMessage *string + + // The prefix range in CIDR notation. Should include the start address and the prefix length. + Cidr *string + + // The commissioned state of the Custom IP Prefix. + CommissionedState *CommissionedState + + // The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. + CustomIPPrefixParent *SubResource + + // Whether to do express route advertise. + ExpressRouteAdvertise *bool + + // The Geo for CIDR advertising. Should be an Geo code. + Geo *Geo + + // Whether to Advertise the range to Internet. + NoInternetAdvertise *bool + + // Type of custom IP prefix. Should be Singular, Parent, or Child. + PrefixType *CustomIPPrefixType + + // Signed message for WAN validation. + SignedMessage *string + + // READ-ONLY; The list of all Children for IPv6 /48 CustomIpPrefix. + ChildCustomIPPrefixes []*SubResource + + // READ-ONLY; The reason why resource is in failed state. + FailedReason *string + + // READ-ONLY; The provisioning state of the custom IP prefix resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The list of all referenced PublicIpPrefixes. + PublicIPPrefixes []*SubResource + + // READ-ONLY; The resource GUID property of the custom IP prefix resource. + ResourceGUID *string +} + +// DNSNameAvailabilityResult - Response for the CheckDnsNameAvailability API service call. +type DNSNameAvailabilityResult struct { + // Domain availability (True/False). + Available *bool +} + +// DNSSettings - DNS Proxy Settings in Firewall Policy. +type DNSSettings struct { + // Enable DNS Proxy on Firewalls attached to the Firewall Policy. + EnableProxy *bool + + // FQDNs in Network Rules are supported when set to true. + RequireProxyForNetworkRules *bool + + // List of Custom DNS Servers. + Servers []*string +} + +// DdosCustomPolicy - A DDoS custom policy in a resource group. +type DdosCustomPolicy struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the DDoS custom policy. + Properties *DdosCustomPolicyPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DdosCustomPolicyPropertiesFormat - DDoS custom policy properties. +type DdosCustomPolicyPropertiesFormat struct { + // READ-ONLY; The provisioning state of the DDoS custom policy resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if + // the user changes its name or migrate the resource across subscriptions or resource groups. + ResourceGUID *string +} + +// DdosProtectionPlan - A DDoS protection plan in a resource group. +type DdosProtectionPlan struct { + // Resource location. + Location *string + + // Properties of the DDoS protection plan. + Properties *DdosProtectionPlanPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DdosProtectionPlanListResult - A list of DDoS protection plans. +type DdosProtectionPlanListResult struct { + // A list of DDoS protection plans. + Value []*DdosProtectionPlan + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// DdosProtectionPlanPropertiesFormat - DDoS protection plan properties. +type DdosProtectionPlanPropertiesFormat struct { + // READ-ONLY; The provisioning state of the DDoS protection plan resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The list of public IPs associated with the DDoS protection plan resource. This list is read-only. + PublicIPAddresses []*SubResource + + // READ-ONLY; The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if + // the user changes its name or migrate the resource across subscriptions or resource groups. + ResourceGUID *string + + // READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. + VirtualNetworks []*SubResource +} + +// DdosSettings - Contains the DDoS protection settings of the public IP. +type DdosSettings struct { + // The DDoS protection plan associated with the public IP. Can only be set if ProtectionMode is Enabled + DdosProtectionPlan *SubResource + + // The DDoS protection mode of the public IP + ProtectionMode *DdosSettingsProtectionMode +} + +// DefaultAdminPropertiesFormat - Security default admin rule resource. +type DefaultAdminPropertiesFormat struct { + // Default rule flag. + Flag *string + + // READ-ONLY; Indicates the access allowed for this particular rule + Access *SecurityConfigurationRuleAccess + + // READ-ONLY; A description for this rule. Restricted to 140 chars. + Description *string + + // READ-ONLY; The destination port ranges. + DestinationPortRanges []*string + + // READ-ONLY; The destination address prefixes. CIDR or destination IP ranges. + Destinations []*AddressPrefixItem + + // READ-ONLY; Indicates if the traffic matched against the rule in inbound or outbound. + Direction *SecurityConfigurationRuleDirection + + // READ-ONLY; The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule + // in the collection. The lower the priority number, the higher the priority of the rule. + Priority *int32 + + // READ-ONLY; Network protocol this rule applies to. + Protocol *SecurityConfigurationRuleProtocol + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string + + // READ-ONLY; The source port ranges. + SourcePortRanges []*string + + // READ-ONLY; The CIDR or source IP ranges. + Sources []*AddressPrefixItem +} + +// DefaultAdminRule - Network default admin rule. +type DefaultAdminRule struct { + // REQUIRED; Whether the rule is custom or default. + Kind *AdminRuleKind + + // Indicates the properties of the security admin rule + Properties *DefaultAdminPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// GetBaseAdminRule implements the BaseAdminRuleClassification interface for type DefaultAdminRule. +func (d *DefaultAdminRule) GetBaseAdminRule() *BaseAdminRule { + return &BaseAdminRule{ + Etag: d.Etag, + ID: d.ID, + Kind: d.Kind, + Name: d.Name, + SystemData: d.SystemData, + Type: d.Type, + } +} + +// DefaultRuleSetPropertyFormat - the default web application firewall rule set. +type DefaultRuleSetPropertyFormat struct { + // The type of the web application firewall rule set. + RuleSetType *string + + // The version of the web application firewall rule set type. + RuleSetVersion *string +} + +// Delegation - Details the service to which the subnet is delegated. +type Delegation struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a subnet. This name can be used to access the resource. + Name *string + + // Properties of the subnet. + Properties *ServiceDelegationPropertiesFormat + + // Resource type. + Type *string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// DelegationProperties - Properties of the delegation. +type DelegationProperties struct { + // The service name to which the NVA is delegated. + ServiceName *string + + // READ-ONLY; Provisioning states of a resource. + ProvisioningState *ProvisioningState +} + +// DeviceProperties - List of properties of the device. +type DeviceProperties struct { + // Model of the device. + DeviceModel *string + + // Name of the device Vendor. + DeviceVendor *string + + // Link speed. + LinkSpeedInMbps *int32 +} + +// DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for +// a subnet overrides VNET DHCP options. +type DhcpOptions struct { + // The list of DNS servers IP addresses. + DNSServers []*string +} + +// Dimension of the metric. +type Dimension struct { + // The display name of the dimension. + DisplayName *string + + // The internal name of the dimension. + InternalName *string + + // The name of the dimension. + Name *string +} + +// DscpConfiguration - Differentiated Services Code Point configuration for any given network interface +type DscpConfiguration struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the network interface. + Properties *DscpConfigurationPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// DscpConfigurationListResult - Response for the DscpConfigurationList API service call. +type DscpConfigurationListResult struct { + // A list of dscp configurations in a resource group. + Value []*DscpConfiguration + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// DscpConfigurationPropertiesFormat - Differentiated Services Code Point configuration properties. +type DscpConfigurationPropertiesFormat struct { + // Destination IP ranges. + DestinationIPRanges []*QosIPRange + + // Destination port ranges. + DestinationPortRanges []*QosPortRange + + // List of markings to be used in the configuration. + Markings []*int32 + + // RNM supported protocol types. + Protocol *ProtocolType + + // QoS object definitions + QosDefinitionCollection []*QosDefinition + + // Source IP ranges. + SourceIPRanges []*QosIPRange + + // Sources port ranges. + SourcePortRanges []*QosPortRange + + // READ-ONLY; Associated Network Interfaces to the DSCP Configuration. + AssociatedNetworkInterfaces []*Interface + + // READ-ONLY; The provisioning state of the DSCP Configuration resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Qos Collection ID generated by RNM. + QosCollectionID *string + + // READ-ONLY; The resource GUID property of the DSCP Configuration resource. + ResourceGUID *string +} + +// EffectiveBaseSecurityAdminRule - Network base admin rule. +type EffectiveBaseSecurityAdminRule struct { + // REQUIRED; Whether the rule is custom or default. + Kind *EffectiveAdminRuleKind + + // A description of the security admin configuration. + ConfigurationDescription *string + + // Resource ID. + ID *string + + // Groups for rule collection + RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem + + // A description of the rule collection. + RuleCollectionDescription *string + + // Effective configuration groups. + RuleGroups []*ConfigurationGroup +} + +// GetEffectiveBaseSecurityAdminRule implements the EffectiveBaseSecurityAdminRuleClassification interface for type EffectiveBaseSecurityAdminRule. +func (e *EffectiveBaseSecurityAdminRule) GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule { + return e +} + +// EffectiveConnectivityConfiguration - The network manager effective connectivity configuration +type EffectiveConnectivityConfiguration struct { + // Effective configuration groups. + ConfigurationGroups []*ConfigurationGroup + + // Connectivity configuration ID. + ID *string + + // Properties of a network manager connectivity configuration + Properties *ConnectivityConfigurationProperties +} + +// EffectiveDefaultSecurityAdminRule - Network default admin rule. +type EffectiveDefaultSecurityAdminRule struct { + // REQUIRED; Whether the rule is custom or default. + Kind *EffectiveAdminRuleKind + + // A description of the security admin configuration. + ConfigurationDescription *string + + // Resource ID. + ID *string + + // Indicates the properties of the default security admin rule + Properties *DefaultAdminPropertiesFormat + + // Groups for rule collection + RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem + + // A description of the rule collection. + RuleCollectionDescription *string + + // Effective configuration groups. + RuleGroups []*ConfigurationGroup +} + +// GetEffectiveBaseSecurityAdminRule implements the EffectiveBaseSecurityAdminRuleClassification interface for type EffectiveDefaultSecurityAdminRule. +func (e *EffectiveDefaultSecurityAdminRule) GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule { + return &EffectiveBaseSecurityAdminRule{ + ConfigurationDescription: e.ConfigurationDescription, + ID: e.ID, + Kind: e.Kind, + RuleCollectionAppliesToGroups: e.RuleCollectionAppliesToGroups, + RuleCollectionDescription: e.RuleCollectionDescription, + RuleGroups: e.RuleGroups, + } +} + +// EffectiveNetworkSecurityGroup - Effective network security group. +type EffectiveNetworkSecurityGroup struct { + // Associated resources. + Association *EffectiveNetworkSecurityGroupAssociation + + // A collection of effective security rules. + EffectiveSecurityRules []*EffectiveNetworkSecurityRule + + // The ID of network security group that is applied. + NetworkSecurityGroup *SubResource + + // Mapping of tags to list of IP Addresses included within the tag. + TagMap *string +} + +// EffectiveNetworkSecurityGroupAssociation - The effective network security group association. +type EffectiveNetworkSecurityGroupAssociation struct { + // The ID of the network interface if assigned. + NetworkInterface *SubResource + + // The ID of the Azure network manager if assigned. + NetworkManager *SubResource + + // The ID of the subnet if assigned. + Subnet *SubResource +} + +// EffectiveNetworkSecurityGroupListResult - Response for list effective network security groups API service call. +type EffectiveNetworkSecurityGroupListResult struct { + // A list of effective network security groups. + Value []*EffectiveNetworkSecurityGroup + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// EffectiveNetworkSecurityRule - Effective network security rules. +type EffectiveNetworkSecurityRule struct { + // Whether network traffic is allowed or denied. + Access *SecurityRuleAccess + + // The destination address prefix. + DestinationAddressPrefix *string + + // The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, + // Internet), System Tags, and the asterisk (*). + DestinationAddressPrefixes []*string + + // The destination port or range. + DestinationPortRange *string + + // The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator + // (e.g. 100-400), or an asterisk (*). + DestinationPortRanges []*string + + // The direction of the rule. + Direction *SecurityRuleDirection + + // Expanded destination address prefix. + ExpandedDestinationAddressPrefix []*string + + // The expanded source address prefix. + ExpandedSourceAddressPrefix []*string + + // The name of the security rule specified by the user (if created by the user). + Name *string + + // The priority of the rule. + Priority *int32 + + // The network protocol this rule applies to. + Protocol *EffectiveSecurityRuleProtocol + + // The source address prefix. + SourceAddressPrefix *string + + // The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), + // System Tags, and the asterisk (*). + SourceAddressPrefixes []*string + + // The source port or range. + SourcePortRange *string + + // The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. + // 100-400), or an asterisk (*). + SourcePortRanges []*string +} + +// EffectiveRoute - Effective Route. +type EffectiveRoute struct { + // The address prefixes of the effective routes in CIDR notation. + AddressPrefix []*string + + // If true, on-premises routes are not propagated to the network interfaces in the subnet. + DisableBgpRoutePropagation *bool + + // The name of the user defined route. This is optional. + Name *string + + // The IP address of the next hop of the effective route. + NextHopIPAddress []*string + + // The type of Azure hop the packet should be sent to. + NextHopType *RouteNextHopType + + // Who created the route. + Source *EffectiveRouteSource + + // The value of effective route. + State *EffectiveRouteState +} + +// EffectiveRouteListResult - Response for list effective route API service call. +type EffectiveRouteListResult struct { + // A list of effective routes. + Value []*EffectiveRoute + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// EffectiveRouteMapRoute - The effective RouteMap route configured on the connection resource. +type EffectiveRouteMapRoute struct { + // The ASPath of this route. + AsPath *string + + // BGP communities of the route. + BgpCommunities *string + + // The address prefix of the route. + Prefix *string +} + +// EffectiveRouteMapRouteList - EffectiveRouteMapRoute List. +type EffectiveRouteMapRouteList struct { + // The list of Effective RouteMap Routes configured on the connection resource. + Value []*EffectiveRouteMapRoute +} + +// EffectiveRoutesParameters - The parameters specifying the resource whose effective routes are being requested. +type EffectiveRoutesParameters struct { + // The resource whose effective routes are being requested. + ResourceID *string + + // The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection + // and P2SConnection. + VirtualWanResourceType *string +} + +// EffectiveSecurityAdminRule - Network admin rule. +type EffectiveSecurityAdminRule struct { + // REQUIRED; Whether the rule is custom or default. + Kind *EffectiveAdminRuleKind + + // A description of the security admin configuration. + ConfigurationDescription *string + + // Resource ID. + ID *string + + // Indicates the properties of the security admin rule + Properties *AdminPropertiesFormat + + // Groups for rule collection + RuleCollectionAppliesToGroups []*ManagerSecurityGroupItem + + // A description of the rule collection. + RuleCollectionDescription *string + + // Effective configuration groups. + RuleGroups []*ConfigurationGroup +} + +// GetEffectiveBaseSecurityAdminRule implements the EffectiveBaseSecurityAdminRuleClassification interface for type EffectiveSecurityAdminRule. +func (e *EffectiveSecurityAdminRule) GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule { + return &EffectiveBaseSecurityAdminRule{ + ConfigurationDescription: e.ConfigurationDescription, + ID: e.ID, + Kind: e.Kind, + RuleCollectionAppliesToGroups: e.RuleCollectionAppliesToGroups, + RuleCollectionDescription: e.RuleCollectionDescription, + RuleGroups: e.RuleGroups, + } +} + +// EndpointServiceResult - Endpoint service. +type EndpointServiceResult struct { + // Resource ID. + ID *string + + // READ-ONLY; Name of the endpoint service. + Name *string + + // READ-ONLY; Type of the endpoint service. + Type *string +} + +// EndpointServicesListResult - Response for the ListAvailableEndpointServices API service call. +type EndpointServicesListResult struct { + // The URL to get the next set of results. + NextLink *string + + // List of available endpoint services in a region. + Value []*EndpointServiceResult +} + +// Error - Common error representation. +type Error struct { + // Error code. + Code *string + + // Error details. + Details []*ErrorDetails + + // Inner error message. + InnerError *string + + // Error message. + Message *string + + // Error target. + Target *string +} + +// ErrorDetails - Common error details representation. +type ErrorDetails struct { + // Error code. + Code *string + + // Error message. + Message *string + + // Error target. + Target *string +} + +// ErrorResponse - The error object. +type ErrorResponse struct { + // The error details object. + Error *ErrorDetails +} + +// EvaluatedNetworkSecurityGroup - Results of network security group evaluation. +type EvaluatedNetworkSecurityGroup struct { + // Resource ID of nic or subnet to which network security group is applied. + AppliedTo *string + + // Matched network security rule. + MatchedRule *MatchedRule + + // Network security group ID. + NetworkSecurityGroupID *string + + // READ-ONLY; List of network security rules evaluation results. + RulesEvaluationResult []*SecurityRulesEvaluationResult +} + +// ExceptionEntry - Adds exception to allow a request when the condition is satisfied. +type ExceptionEntry struct { + // REQUIRED; The variable on which we evaluate the exception condition + MatchVariable *ExceptionEntryMatchVariable + + // REQUIRED; Operates on the allowed values for the matchVariable + ValueMatchOperator *ExceptionEntryValueMatchOperator + + // The managed rule sets that are associated with the exception. + ExceptionManagedRuleSets []*ExclusionManagedRuleSet + + // When the matchVariable points to a key-value pair (e.g, RequestHeader), this identifies the key. + Selector *string + + // When the matchVariable points to a key-value pair (e.g, RequestHeader), this operates on the selector + SelectorMatchOperator *ExceptionEntrySelectorMatchOperator + + // Allowed values for the matchVariable + Values []*string +} + +// ExclusionManagedRule - Defines a managed rule to use for exclusion. +type ExclusionManagedRule struct { + // REQUIRED; Identifier for the managed rule. + RuleID *string +} + +// ExclusionManagedRuleGroup - Defines a managed rule group to use for exclusion. +type ExclusionManagedRuleGroup struct { + // REQUIRED; The managed rule group for exclusion. + RuleGroupName *string + + // List of rules that will be excluded. If none specified, all rules in the group will be excluded. + Rules []*ExclusionManagedRule +} + +// ExclusionManagedRuleSet - Defines a managed rule set for Exclusions. +type ExclusionManagedRuleSet struct { + // REQUIRED; Defines the rule set type to use. + RuleSetType *string + + // REQUIRED; Defines the version of the rule set to use. + RuleSetVersion *string + + // Defines the rule groups to apply to the rule set. + RuleGroups []*ExclusionManagedRuleGroup +} + +// ExplicitProxySettings - Explicit Proxy Settings in Firewall Policy. +type ExplicitProxySettings struct { + // When set to true, explicit proxy mode is enabled. + EnableExplicitProxy *bool + + // When set to true, pac file port and url needs to be provided. + EnablePacFile *bool + + // Port number for explicit proxy http protocol, cannot be greater than 64000. + HTTPPort *int32 + + // Port number for explicit proxy https protocol, cannot be greater than 64000. + HTTPSPort *int32 + + // SAS URL for PAC file. + PacFile *string + + // Port number for firewall to serve PAC file. + PacFilePort *int32 +} + +// ExpressRouteCircuit resource. +type ExpressRouteCircuit struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the express route circuit. + Properties *ExpressRouteCircuitPropertiesFormat + + // The SKU. + SKU *ExpressRouteCircuitSKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ExpressRouteCircuitArpTable - The ARP table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitArpTable struct { + // Entry age in minutes. + Age *int32 + + // The IP address. + IPAddress *string + + // Interface address. + Interface *string + + // The MAC address. + MacAddress *string +} + +// ExpressRouteCircuitAuthorization - Authorization in an ExpressRouteCircuit resource. +type ExpressRouteCircuitAuthorization struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the express route circuit authorization. + Properties *AuthorizationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ExpressRouteCircuitConnection - Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. +type ExpressRouteCircuitConnection struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the express route circuit connection. + Properties *ExpressRouteCircuitConnectionPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ExpressRouteCircuitConnectionListResult - Response for ListConnections API service call retrieves all global reach connections +// that belongs to a Private Peering for an ExpressRouteCircuit. +type ExpressRouteCircuitConnectionListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The global reach connection associated with Private Peering in an ExpressRoute Circuit. + Value []*ExpressRouteCircuitConnection +} + +// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection. +type ExpressRouteCircuitConnectionPropertiesFormat struct { + // /29 IP address space to carve out Customer addresses for tunnels. + AddressPrefix *string + + // The authorization key. + AuthorizationKey *string + + // Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. + ExpressRouteCircuitPeering *SubResource + + // IPv6 Address PrefixProperties of the express route circuit connection. + IPv6CircuitConnectionConfig *IPv6CircuitConnectionConfig + + // Reference to Express Route Circuit Private Peering Resource of the peered circuit. + PeerExpressRouteCircuitPeering *SubResource + + // READ-ONLY; Express Route Circuit connection state. + CircuitConnectionStatus *CircuitConnectionStatus + + // READ-ONLY; The provisioning state of the express route circuit connection resource. + ProvisioningState *ProvisioningState +} + +// ExpressRouteCircuitListResult - Response for ListExpressRouteCircuit API service call. +type ExpressRouteCircuitListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of ExpressRouteCircuits in a resource group. + Value []*ExpressRouteCircuit +} + +// ExpressRouteCircuitPeering - Peering in an ExpressRouteCircuit resource. +type ExpressRouteCircuitPeering struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the express route circuit peering. + Properties *ExpressRouteCircuitPeeringPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ExpressRouteCircuitPeeringConfig - Specifies the peering configuration. +type ExpressRouteCircuitPeeringConfig struct { + // The communities of bgp peering. Specified for microsoft peering. + AdvertisedCommunities []*string + + // The reference to AdvertisedPublicPrefixes. + AdvertisedPublicPrefixes []*string + + // The CustomerASN of the peering. + CustomerASN *int32 + + // The legacy mode of the peering. + LegacyMode *int32 + + // The RoutingRegistryName of the configuration. + RoutingRegistryName *string + + // READ-ONLY; The advertised public prefix state of the Peering resource. + AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState +} + +// ExpressRouteCircuitPeeringID - ExpressRoute circuit peering identifier. +type ExpressRouteCircuitPeeringID struct { + // The ID of the ExpressRoute circuit peering. + ID *string +} + +// ExpressRouteCircuitPeeringListResult - Response for ListPeering API service call retrieves all peerings that belong to +// an ExpressRouteCircuit. +type ExpressRouteCircuitPeeringListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The peerings in an express route circuit. + Value []*ExpressRouteCircuitPeering +} + +// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering. +type ExpressRouteCircuitPeeringPropertiesFormat struct { + // The Azure ASN. + AzureASN *int32 + + // The list of circuit connections associated with Azure Private Peering for this circuit. + Connections []*ExpressRouteCircuitConnection + + // The ExpressRoute connection. + ExpressRouteConnection *ExpressRouteConnectionID + + // The GatewayManager Etag. + GatewayManagerEtag *string + + // The IPv6 peering configuration. + IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig + + // The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig + + // The peer ASN. + PeerASN *int64 + + // The peering type. + PeeringType *ExpressRoutePeeringType + + // The primary port. + PrimaryAzurePort *string + + // The primary address prefix. + PrimaryPeerAddressPrefix *string + + // The reference to the RouteFilter resource. + RouteFilter *SubResource + + // The secondary port. + SecondaryAzurePort *string + + // The secondary address prefix. + SecondaryPeerAddressPrefix *string + + // The shared key. + SharedKey *string + + // The peering state. + State *ExpressRoutePeeringState + + // The peering stats of express route circuit. + Stats *ExpressRouteCircuitStats + + // The VLAN ID. + VlanID *int32 + + // READ-ONLY; Who was the last to modify the peering. + LastModifiedBy *string + + // READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit. + PeeredConnections []*PeerExpressRouteCircuitConnection + + // READ-ONLY; The provisioning state of the express route circuit peering resource. + ProvisioningState *ProvisioningState +} + +// ExpressRouteCircuitPropertiesFormat - Properties of ExpressRouteCircuit. +type ExpressRouteCircuitPropertiesFormat struct { + // Allow classic operations. + AllowClassicOperations *bool + + // The authorizationKey. + AuthorizationKey *string + + // The list of authorizations. + Authorizations []*ExpressRouteCircuitAuthorization + + // The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. + BandwidthInGbps *float32 + + // The CircuitProvisioningState state of the resource. + CircuitProvisioningState *string + + // Flag denoting rate-limiting status of the ExpressRoute direct-port circuit. + EnableDirectPortRateLimit *bool + + // The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. + ExpressRoutePort *SubResource + + // The GatewayManager Etag. + GatewayManagerEtag *string + + // Flag denoting global reach status. + GlobalReachEnabled *bool + + // The list of peerings. + Peerings []*ExpressRouteCircuitPeering + + // The ServiceKey. + ServiceKey *string + + // The ServiceProviderNotes. + ServiceProviderNotes *string + + // The ServiceProviderProperties. + ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties + + // The ServiceProviderProvisioningState state of the resource. + ServiceProviderProvisioningState *ServiceProviderProvisioningState + + // READ-ONLY; The authorization status of the Circuit. + AuthorizationStatus *string + + // READ-ONLY; The provisioning state of the express route circuit resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation. + Stag *int32 +} + +// ExpressRouteCircuitReference - Reference to an express route circuit. +type ExpressRouteCircuitReference struct { + // Corresponding Express Route Circuit Id. + ID *string +} + +// ExpressRouteCircuitRoutesTable - The routes table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitRoutesTable struct { + // Local preference value as set with the set local-preference route-map configuration command. + LocPrf *string + + // IP address of a network entity. + Network *string + + // NextHop address. + NextHop *string + + // Autonomous system paths to the destination network. + Path *string + + // Route Weight. + Weight *int32 +} + +// ExpressRouteCircuitRoutesTableSummary - The routes table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitRoutesTableSummary struct { + // Autonomous system number. + As *int32 + + // IP address of the neighbor. + Neighbor *string + + // Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + StatePfxRcd *string + + // The length of time that the BGP session has been in the Established state, or the current status if not in the Established + // state. + UpDown *string + + // BGP version number spoken to the neighbor. + V *int32 +} + +// ExpressRouteCircuitSKU - Contains SKU in an ExpressRouteCircuit. +type ExpressRouteCircuitSKU struct { + // The family of the SKU. + Family *ExpressRouteCircuitSKUFamily + + // The name of the SKU. + Name *string + + // The tier of the SKU. + Tier *ExpressRouteCircuitSKUTier +} + +// ExpressRouteCircuitServiceProviderProperties - Contains ServiceProviderProperties in an ExpressRouteCircuit. +type ExpressRouteCircuitServiceProviderProperties struct { + // The BandwidthInMbps. + BandwidthInMbps *int32 + + // The peering location. + PeeringLocation *string + + // The serviceProviderName. + ServiceProviderName *string +} + +// ExpressRouteCircuitStats - Contains stats associated with the peering. +type ExpressRouteCircuitStats struct { + // The Primary BytesIn of the peering. + PrimarybytesIn *int64 + + // The primary BytesOut of the peering. + PrimarybytesOut *int64 + + // The secondary BytesIn of the peering. + SecondarybytesIn *int64 + + // The secondary BytesOut of the peering. + SecondarybytesOut *int64 +} + +// ExpressRouteCircuitsArpTableListResult - Response for ListArpTable associated with the Express Route Circuits API. +type ExpressRouteCircuitsArpTableListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of the ARP tables. + Value []*ExpressRouteCircuitArpTable +} + +// ExpressRouteCircuitsRoutesTableListResult - Response for ListRoutesTable associated with the Express Route Circuits API. +type ExpressRouteCircuitsRoutesTableListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The list of routes table. + Value []*ExpressRouteCircuitRoutesTable +} + +// ExpressRouteCircuitsRoutesTableSummaryListResult - Response for ListRoutesTable associated with the Express Route Circuits +// API. +type ExpressRouteCircuitsRoutesTableSummaryListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of the routes table. + Value []*ExpressRouteCircuitRoutesTableSummary +} + +// ExpressRouteConnection resource. +type ExpressRouteConnection struct { + // REQUIRED; The name of the resource. + Name *string + + // Resource ID. + ID *string + + // Properties of the express route connection. + Properties *ExpressRouteConnectionProperties +} + +// ExpressRouteConnectionID - The ID of the ExpressRouteConnection. +type ExpressRouteConnectionID struct { + // READ-ONLY; The ID of the ExpressRouteConnection. + ID *string +} + +// ExpressRouteConnectionList - ExpressRouteConnection list. +type ExpressRouteConnectionList struct { + // The list of ExpressRoute connections. + Value []*ExpressRouteConnection +} + +// ExpressRouteConnectionProperties - Properties of the ExpressRouteConnection subresource. +type ExpressRouteConnectionProperties struct { + // REQUIRED; The ExpressRoute circuit peering. + ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID + + // Authorization key to establish the connection. + AuthorizationKey *string + + // Enable internet security. + EnableInternetSecurity *bool + + // Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be + // enabled. + EnablePrivateLinkFastPath *bool + + // Enable FastPath to vWan Firewall hub. + ExpressRouteGatewayBypass *bool + + // The Routing Configuration indicating the associated and propagated route tables on this connection. + RoutingConfiguration *RoutingConfiguration + + // The routing weight associated to the connection. + RoutingWeight *int32 + + // READ-ONLY; The provisioning state of the express route connection resource. + ProvisioningState *ProvisioningState +} + +// ExpressRouteCrossConnection resource. +type ExpressRouteCrossConnection struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the express route cross connection. + Properties *ExpressRouteCrossConnectionProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ExpressRouteCrossConnectionListResult - Response for ListExpressRouteCrossConnection API service call. +type ExpressRouteCrossConnectionListResult struct { + // A list of ExpressRouteCrossConnection resources. + Value []*ExpressRouteCrossConnection + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// ExpressRouteCrossConnectionPeering - Peering in an ExpressRoute Cross Connection resource. +type ExpressRouteCrossConnectionPeering struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the express route cross connection peering. + Properties *ExpressRouteCrossConnectionPeeringProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// ExpressRouteCrossConnectionPeeringList - Response for ListPeering API service call retrieves all peerings that belong to +// an ExpressRouteCrossConnection. +type ExpressRouteCrossConnectionPeeringList struct { + // The peerings in an express route cross connection. + Value []*ExpressRouteCrossConnectionPeering + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// ExpressRouteCrossConnectionPeeringProperties - Properties of express route cross connection peering. +type ExpressRouteCrossConnectionPeeringProperties struct { + // The GatewayManager Etag. + GatewayManagerEtag *string + + // The IPv6 peering configuration. + IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig + + // The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig + + // The peer ASN. + PeerASN *int64 + + // The peering type. + PeeringType *ExpressRoutePeeringType + + // The primary address prefix. + PrimaryPeerAddressPrefix *string + + // The secondary address prefix. + SecondaryPeerAddressPrefix *string + + // The shared key. + SharedKey *string + + // The peering state. + State *ExpressRoutePeeringState + + // The VLAN ID. + VlanID *int32 + + // READ-ONLY; The Azure ASN. + AzureASN *int32 + + // READ-ONLY; Who was the last to modify the peering. + LastModifiedBy *string + + // READ-ONLY; The primary port. + PrimaryAzurePort *string + + // READ-ONLY; The provisioning state of the express route cross connection peering resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The secondary port. + SecondaryAzurePort *string +} + +// ExpressRouteCrossConnectionProperties - Properties of ExpressRouteCrossConnection. +type ExpressRouteCrossConnectionProperties struct { + // The ExpressRouteCircuit. + ExpressRouteCircuit *ExpressRouteCircuitReference + + // The list of peerings. + Peerings []*ExpressRouteCrossConnectionPeering + + // Additional read only notes set by the connectivity provider. + ServiceProviderNotes *string + + // The provisioning state of the circuit in the connectivity provider system. + ServiceProviderProvisioningState *ServiceProviderProvisioningState + + // READ-ONLY; The circuit bandwidth In Mbps. + BandwidthInMbps *int32 + + // READ-ONLY; The peering location of the ExpressRoute circuit. + PeeringLocation *string + + // READ-ONLY; The name of the primary port. + PrimaryAzurePort *string + + // READ-ONLY; The provisioning state of the express route cross connection resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The identifier of the circuit traffic. + STag *int32 + + // READ-ONLY; The name of the secondary port. + SecondaryAzurePort *string +} + +// ExpressRouteCrossConnectionRoutesTableSummary - The routes table associated with the ExpressRouteCircuit. +type ExpressRouteCrossConnectionRoutesTableSummary struct { + // Autonomous system number. + Asn *int32 + + // IP address of Neighbor router. + Neighbor *string + + // Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + StateOrPrefixesReceived *string + + // The length of time that the BGP session has been in the Established state, or the current status if not in the Established + // state. + UpDown *string +} + +// ExpressRouteCrossConnectionsRoutesTableSummaryListResult - Response for ListRoutesTable associated with the Express Route +// Cross Connections. +type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { + // A list of the routes table. + Value []*ExpressRouteCrossConnectionRoutesTableSummary + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +type ExpressRouteFailoverCircuitResourceDetails struct { + // Connection name associated with the circuit + ConnectionName *string + + // Circuit Name + Name *string + + // NRP Resource URI of the circuit + NrpResourceURI *string +} + +type ExpressRouteFailoverConnectionResourceDetails struct { + // Time when the connection was last updated + LastUpdatedTime *string + + // Connection Name + Name *string + + // NRP Resource URI of the connection + NrpResourceURI *string + + // The current status of the connection + Status *FailoverConnectionStatus +} + +type ExpressRouteFailoverRedundantRoute struct { + // A list of all the peering locations for the redundant routes + PeeringLocations []*string + + // A list of all the redundant routes in the peering locations + Routes []*string +} + +// ExpressRouteFailoverSingleTestDetails - ExpressRoute failover single test details +type ExpressRouteFailoverSingleTestDetails struct { + // Time when the test was completed + EndTimeUTC *string + + // List of all the failover connections for this peering location + FailoverConnectionDetails []*FailoverConnectionDetails + + // List of al the routes that were received only from this peering location + NonRedundantRoutes []*string + + // Peering location of the test + PeeringLocation *string + + // List of routes received from this peering as well as some other peering location + RedundantRoutes []*ExpressRouteFailoverRedundantRoute + + // Time when the test was started + StartTimeUTC *string + + // The current status of the test + Status *FailoverTestStatusForSingleTest + + // Whether the failover simulation was successful or not + WasSimulationSuccessful *bool +} + +// ExpressRouteFailoverStopAPIParameters - Start packet capture parameters on virtual network gateway. +type ExpressRouteFailoverStopAPIParameters struct { + // List of all the failover connections for this peering location + Details []*FailoverConnectionDetails + + // Peering location of the test + PeeringLocation *string + + // Whether the failover simulation was successful or not + WasSimulationSuccessful *bool +} + +// ExpressRouteFailoverTestDetails - ExpressRoute failover test details +type ExpressRouteFailoverTestDetails struct { + // All circuits in the peering location + Circuits []*ExpressRouteFailoverCircuitResourceDetails + + // All connections to the circuits in the peering location + Connections []*ExpressRouteFailoverConnectionResourceDetails + + // Time when the test was completed + EndTime *string + + // A list of all issues with the test + Issues []*string + + // Peering location of the test + PeeringLocation *string + + // Time when the test was started + StartTime *string + + // The current status of the test + Status *FailoverTestStatus + + // The unique GUID associated with the test + TestGUID *string + + // The type of failover test + TestType *FailoverTestType +} + +// ExpressRouteGateway - ExpressRoute gateway resource. +type ExpressRouteGateway struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the express route gateway. + Properties *ExpressRouteGatewayProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ExpressRouteGatewayList - List of ExpressRoute gateways. +type ExpressRouteGatewayList struct { + // List of ExpressRoute gateways. + Value []*ExpressRouteGateway +} + +// ExpressRouteGatewayProperties - ExpressRoute gateway resource properties. +type ExpressRouteGatewayProperties struct { + // REQUIRED; The Virtual Hub where the ExpressRoute gateway is or will be deployed. + VirtualHub *VirtualHubID + + // Configures this gateway to accept traffic from non Virtual WAN networks. + AllowNonVirtualWanTraffic *bool + + // Configuration for auto scaling. + AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration + + // List of ExpressRoute connections to the ExpressRoute gateway. + ExpressRouteConnections []*ExpressRouteConnection + + // READ-ONLY; The provisioning state of the express route gateway resource. + ProvisioningState *ProvisioningState +} + +// ExpressRouteGatewayPropertiesAutoScaleConfiguration - Configuration for auto scaling. +type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct { + // Minimum and maximum number of scale units to deploy. + Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds +} + +// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds - Minimum and maximum number of scale units to deploy. +type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct { + // Maximum number of scale units deployed for ExpressRoute gateway. + Max *int32 + + // Minimum number of scale units deployed for ExpressRoute gateway. + Min *int32 +} + +// ExpressRouteLink child resource definition. +type ExpressRouteLink struct { + // Resource ID. + ID *string + + // Name of child port resource that is unique among child port resources of the parent. + Name *string + + // ExpressRouteLink properties. + Properties *ExpressRouteLinkPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// ExpressRouteLinkListResult - Response for ListExpressRouteLinks API service call. +type ExpressRouteLinkListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The list of ExpressRouteLink sub-resources. + Value []*ExpressRouteLink +} + +// ExpressRouteLinkMacSecConfig - ExpressRouteLink Mac Security Configuration. +type ExpressRouteLinkMacSecConfig struct { + // Keyvault Secret Identifier URL containing Mac security CAK key. + CakSecretIdentifier *string + + // Mac security cipher. + Cipher *ExpressRouteLinkMacSecCipher + + // Keyvault Secret Identifier URL containing Mac security CKN key. + CknSecretIdentifier *string + + // Sci mode enabled/disabled. + SciState *ExpressRouteLinkMacSecSciState +} + +// ExpressRouteLinkPropertiesFormat - Properties specific to ExpressRouteLink resources. +type ExpressRouteLinkPropertiesFormat struct { + // Administrative state of the physical port. + AdminState *ExpressRouteLinkAdminState + + // MacSec configuration. + MacSecConfig *ExpressRouteLinkMacSecConfig + + // READ-ONLY; Cololocation for ExpressRoute Hybrid Direct. + ColoLocation *string + + // READ-ONLY; Physical fiber port type. + ConnectorType *ExpressRouteLinkConnectorType + + // READ-ONLY; Name of Azure router interface. + InterfaceName *string + + // READ-ONLY; Mapping between physical port to patch panel port. + PatchPanelID *string + + // READ-ONLY; The provisioning state of the express route link resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Mapping of physical patch panel to rack. + RackID *string + + // READ-ONLY; Name of Azure router associated with physical port. + RouterName *string +} + +// ExpressRoutePort resource definition. +type ExpressRoutePort struct { + // Resource ID. + ID *string + + // The identity of ExpressRoutePort, if configured. + Identity *ManagedServiceIdentity + + // Resource location. + Location *string + + // ExpressRoutePort properties. + Properties *ExpressRoutePortPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ExpressRoutePortAuthorization - ExpressRoutePort Authorization resource definition. +type ExpressRoutePortAuthorization struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // ExpressRoutePort properties. + Properties *ExpressRoutePortAuthorizationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ExpressRoutePortAuthorizationListResult - Response for ListExpressRoutePortAuthorizations API service call. +type ExpressRoutePortAuthorizationListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The authorizations in an ExpressRoute Port. + Value []*ExpressRoutePortAuthorization +} + +// ExpressRoutePortAuthorizationPropertiesFormat - Properties of ExpressRoutePort Authorization. +type ExpressRoutePortAuthorizationPropertiesFormat struct { + // READ-ONLY; The authorization key. + AuthorizationKey *string + + // READ-ONLY; The authorization use status. + AuthorizationUseStatus *ExpressRoutePortAuthorizationUseStatus + + // READ-ONLY; The reference to the ExpressRoute circuit resource using the authorization. + CircuitResourceURI *string + + // READ-ONLY; The provisioning state of the authorization resource. + ProvisioningState *ProvisioningState +} + +// ExpressRoutePortListResult - Response for ListExpressRoutePorts API service call. +type ExpressRoutePortListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of ExpressRoutePort resources. + Value []*ExpressRoutePort +} + +// ExpressRoutePortPropertiesFormat - Properties specific to ExpressRoutePort resources. +type ExpressRoutePortPropertiesFormat struct { + // Bandwidth of procured ports in Gbps. + BandwidthInGbps *int32 + + // The billing type of the ExpressRoutePort resource. + BillingType *ExpressRoutePortsBillingType + + // Encapsulation method on physical ports. + Encapsulation *ExpressRoutePortsEncapsulation + + // The set of physical links of the ExpressRoutePort resource. + Links []*ExpressRouteLink + + // The name of the peering location that the ExpressRoutePort is mapped to physically. + PeeringLocation *string + + // READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization. + AllocationDate *string + + // READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. + Circuits []*SubResource + + // READ-ONLY; Ether type of the physical port. + EtherType *string + + // READ-ONLY; Maximum transmission unit of the physical port pair(s). + Mtu *string + + // READ-ONLY; Aggregate Gbps of associated circuit bandwidths. + ProvisionedBandwidthInGbps *float32 + + // READ-ONLY; The provisioning state of the express route port resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the express route port resource. + ResourceGUID *string +} + +// ExpressRoutePortsLocation - Definition of the ExpressRoutePorts peering location resource. +type ExpressRoutePortsLocation struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // ExpressRoutePort peering location properties. + Properties *ExpressRoutePortsLocationPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ExpressRoutePortsLocationBandwidths - Real-time inventory of available ExpressRoute port bandwidths. +type ExpressRoutePortsLocationBandwidths struct { + // READ-ONLY; Bandwidth descriptive name. + OfferName *string + + // READ-ONLY; Bandwidth value in Gbps. + ValueInGbps *int32 +} + +// ExpressRoutePortsLocationListResult - Response for ListExpressRoutePortsLocations API service call. +type ExpressRoutePortsLocationListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The list of all ExpressRoutePort peering locations. + Value []*ExpressRoutePortsLocation +} + +// ExpressRoutePortsLocationPropertiesFormat - Properties specific to ExpressRoutePorts peering location resources. +type ExpressRoutePortsLocationPropertiesFormat struct { + // The inventory of available ExpressRoutePort bandwidths. + AvailableBandwidths []*ExpressRoutePortsLocationBandwidths + + // READ-ONLY; Address of peering location. + Address *string + + // READ-ONLY; Contact details of peering locations. + Contact *string + + // READ-ONLY; The provisioning state of the express route port location resource. + ProvisioningState *ProvisioningState +} + +// ExpressRouteProviderPort resource. +type ExpressRouteProviderPort struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the express route Service Provider Port. + Properties *ExpressRouteProviderPortProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ExpressRouteProviderPortListResult - Response for ListExpressRouteProviderPort API service call. +type ExpressRouteProviderPortListResult struct { + // A list of ExpressRouteProviderPort resources. + Value []*ExpressRouteProviderPort + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// ExpressRouteProviderPortProperties - Properties of ExpressRouteProviderPort. +type ExpressRouteProviderPortProperties struct { + // Overprovisioning factor for the port pair. + OverprovisionFactor *int32 + + // The peering location of the port pair. + PeeringLocation *string + + // Bandwidth of the port in Mbps + PortBandwidthInMbps *int32 + + // Remaining Bandwidth of the port in Mbps + RemainingBandwidthInMbps *int32 + + // Used Bandwidth of the port in Mbps + UsedBandwidthInMbps *int32 + + // READ-ONLY; The name of the port pair. + PortPairDescriptor *string + + // READ-ONLY; The name of the primary port. + PrimaryAzurePort *string + + // READ-ONLY; The name of the secondary port. + SecondaryAzurePort *string +} + +// ExpressRouteServiceProvider - A ExpressRouteResourceProvider object. +type ExpressRouteServiceProvider struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the express route service provider. + Properties *ExpressRouteServiceProviderPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ExpressRouteServiceProviderBandwidthsOffered - Contains bandwidths offered in ExpressRouteServiceProvider resources. +type ExpressRouteServiceProviderBandwidthsOffered struct { + // The OfferName. + OfferName *string + + // The ValueInMbps. + ValueInMbps *int32 +} + +// ExpressRouteServiceProviderListResult - Response for the ListExpressRouteServiceProvider API service call. +type ExpressRouteServiceProviderListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of ExpressRouteResourceProvider resources. + Value []*ExpressRouteServiceProvider +} + +// ExpressRouteServiceProviderPropertiesFormat - Properties of ExpressRouteServiceProvider. +type ExpressRouteServiceProviderPropertiesFormat struct { + // A list of bandwidths offered. + BandwidthsOffered []*ExpressRouteServiceProviderBandwidthsOffered + + // A list of peering locations. + PeeringLocations []*string + + // READ-ONLY; The provisioning state of the express route service provider resource. + ProvisioningState *ProvisioningState +} + +// ExtendedLocation complex type. +type ExtendedLocation struct { + // The name of the extended location. + Name *string + + // The type of the extended location. + Type *ExtendedLocationTypes +} + +type FailoverConnectionDetails struct { + // Name of the failover connection + FailoverConnectionName *string + + // Location of the failover connection + FailoverLocation *string + + // Whether the customer was able to establish connectivity through this failover connection or not + IsVerified *bool +} + +// FilterItems - Will contain the filter name and values to operate on +type FilterItems struct { + // The name of the field we would like to filter + Field *string + + // List of values to filter the current field by + Values []*string +} + +// FirewallPacketCaptureParameters - Azure Firewall Packet Capture Parameters. +type FirewallPacketCaptureParameters struct { + // Duration of packet capture in seconds. + DurationInSeconds *int32 + + // Name of file to be uploaded to sasURL + FileName *string + + // Rules to filter packet captures. + Filters []*AzureFirewallPacketCaptureRule + + // The tcp-flag type to be captured. Used with protocol TCP + Flags []*AzureFirewallPacketCaptureFlags + + // Number of packets to be captured. + NumberOfPacketsToCapture *int32 + + // The protocol of packets to capture + Protocol *AzureFirewallNetworkRuleProtocol + + // Upload capture location + SasURL *string +} + +// FirewallPolicy Resource. +type FirewallPolicy struct { + // Resource ID. + ID *string + + // The identity of the firewall policy. + Identity *ManagedServiceIdentity + + // Resource location. + Location *string + + // Properties of the firewall policy. + Properties *FirewallPolicyPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// FirewallPolicyCertificateAuthority - Trusted Root certificates properties for tls. +type FirewallPolicyCertificateAuthority struct { + // Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + KeyVaultSecretID *string + + // Name of the CA certificate. + Name *string +} + +// FirewallPolicyDraft - FirewallPolicy Resource. +type FirewallPolicyDraft struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the firewall policy. + Properties *FirewallPolicyDraftProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +type FirewallPolicyDraftProperties struct { + // The parent firewall policy from which rules are inherited. + BasePolicy *SubResource + + // DNS Proxy Settings definition. + DNSSettings *DNSSettings + + // Explicit Proxy Settings definition. + ExplicitProxy *ExplicitProxySettings + + // Insights on Firewall Policy. + Insights *FirewallPolicyInsights + + // The configuration for Intrusion detection. + IntrusionDetection *FirewallPolicyIntrusionDetection + + // SQL Settings definition. + SQL *FirewallPolicySQL + + // The private IP addresses/IP ranges to which traffic will not be SNAT. + Snat *FirewallPolicySNAT + + // The operation mode for Threat Intelligence. + ThreatIntelMode *AzureFirewallThreatIntelMode + + // ThreatIntel Whitelist for Firewall Policy. + ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist +} + +// FirewallPolicyFilterRuleCollection - Firewall Policy Filter Rule Collection. +type FirewallPolicyFilterRuleCollection struct { + // REQUIRED; The type of the rule collection. + RuleCollectionType *FirewallPolicyRuleCollectionType + + // The action type of a Filter rule collection. + Action *FirewallPolicyFilterRuleCollectionAction + + // The name of the rule collection. + Name *string + + // Priority of the Firewall Policy Rule Collection resource. + Priority *int32 + + // List of rules included in a rule collection. + Rules []FirewallPolicyRuleClassification +} + +// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyFilterRuleCollection. +func (f *FirewallPolicyFilterRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { + return &FirewallPolicyRuleCollection{ + Name: f.Name, + Priority: f.Priority, + RuleCollectionType: f.RuleCollectionType, + } +} + +// FirewallPolicyFilterRuleCollectionAction - Properties of the FirewallPolicyFilterRuleCollectionAction. +type FirewallPolicyFilterRuleCollectionAction struct { + // The type of action. + Type *FirewallPolicyFilterRuleCollectionActionType +} + +// FirewallPolicyHTTPHeaderToInsert - name and value of HTTP/S header to insert +type FirewallPolicyHTTPHeaderToInsert struct { + // Contains the name of the header + HeaderName *string + + // Contains the value of the header + HeaderValue *string +} + +// FirewallPolicyInsights - Firewall Policy Insights. +type FirewallPolicyInsights struct { + // A flag to indicate if the insights are enabled on the policy. + IsEnabled *bool + + // Workspaces needed to configure the Firewall Policy Insights. + LogAnalyticsResources *FirewallPolicyLogAnalyticsResources + + // Number of days the insights should be enabled on the policy. + RetentionDays *int32 +} + +// FirewallPolicyIntrusionDetection - Configuration for intrusion detection mode and rules. +type FirewallPolicyIntrusionDetection struct { + // Intrusion detection configuration properties. + Configuration *FirewallPolicyIntrusionDetectionConfiguration + + // Intrusion detection general state. When attached to a parent policy, the firewall's effective IDPS mode is the stricter + // mode of the two. + Mode *FirewallPolicyIntrusionDetectionStateType + + // IDPS profile name. When attached to a parent policy, the firewall's effective profile is the profile name of the parent + // policy. + Profile *FirewallPolicyIntrusionDetectionProfileType +} + +// FirewallPolicyIntrusionDetectionBypassTrafficSpecifications - Intrusion detection bypass traffic specification. +type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications struct { + // Description of the bypass traffic rule. + Description *string + + // List of destination IP addresses or ranges for this rule. + DestinationAddresses []*string + + // List of destination IpGroups for this rule. + DestinationIPGroups []*string + + // List of destination ports or ranges. + DestinationPorts []*string + + // Name of the bypass traffic rule. + Name *string + + // The rule bypass protocol. + Protocol *FirewallPolicyIntrusionDetectionProtocol + + // List of source IP addresses or ranges for this rule. + SourceAddresses []*string + + // List of source IpGroups for this rule. + SourceIPGroups []*string +} + +// FirewallPolicyIntrusionDetectionConfiguration - The operation for configuring intrusion detection. +type FirewallPolicyIntrusionDetectionConfiguration struct { + // List of rules for traffic to bypass. + BypassTrafficSettings []*FirewallPolicyIntrusionDetectionBypassTrafficSpecifications + + // IDPS Private IP address ranges are used to identify traffic direction (i.e. inbound, outbound, etc.). By default, only + // ranges defined by IANA RFC 1918 are considered private IP addresses. To modify + // default ranges, specify your Private IP address ranges with this property + PrivateRanges []*string + + // List of specific signatures states. + SignatureOverrides []*FirewallPolicyIntrusionDetectionSignatureSpecification +} + +// FirewallPolicyIntrusionDetectionSignatureSpecification - Intrusion detection signatures specification states. +type FirewallPolicyIntrusionDetectionSignatureSpecification struct { + // Signature id. + ID *string + + // The signature state. + Mode *FirewallPolicyIntrusionDetectionStateType +} + +// FirewallPolicyListResult - Response for ListFirewallPolicies API service call. +type FirewallPolicyListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of Firewall Policies in a resource group. + Value []*FirewallPolicy +} + +// FirewallPolicyLogAnalyticsResources - Log Analytics Resources for Firewall Policy Insights. +type FirewallPolicyLogAnalyticsResources struct { + // The default workspace Id for Firewall Policy Insights. + DefaultWorkspaceID *SubResource + + // List of workspaces for Firewall Policy Insights. + Workspaces []*FirewallPolicyLogAnalyticsWorkspace +} + +// FirewallPolicyLogAnalyticsWorkspace - Log Analytics Workspace for Firewall Policy Insights. +type FirewallPolicyLogAnalyticsWorkspace struct { + // Region to configure the Workspace. + Region *string + + // The workspace Id for Firewall Policy Insights. + WorkspaceID *SubResource +} + +// FirewallPolicyNatRuleCollection - Firewall Policy NAT Rule Collection. +type FirewallPolicyNatRuleCollection struct { + // REQUIRED; The type of the rule collection. + RuleCollectionType *FirewallPolicyRuleCollectionType + + // The action type of a Nat rule collection. + Action *FirewallPolicyNatRuleCollectionAction + + // The name of the rule collection. + Name *string + + // Priority of the Firewall Policy Rule Collection resource. + Priority *int32 + + // List of rules included in a rule collection. + Rules []FirewallPolicyRuleClassification +} + +// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyNatRuleCollection. +func (f *FirewallPolicyNatRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { + return &FirewallPolicyRuleCollection{ + Name: f.Name, + Priority: f.Priority, + RuleCollectionType: f.RuleCollectionType, + } +} + +// FirewallPolicyNatRuleCollectionAction - Properties of the FirewallPolicyNatRuleCollectionAction. +type FirewallPolicyNatRuleCollectionAction struct { + // The type of action. + Type *FirewallPolicyNatRuleCollectionActionType +} + +// FirewallPolicyPropertiesFormat - Firewall Policy definition. +type FirewallPolicyPropertiesFormat struct { + // The parent firewall policy from which rules are inherited. + BasePolicy *SubResource + + // DNS Proxy Settings definition. + DNSSettings *DNSSettings + + // Explicit Proxy Settings definition. + ExplicitProxySettings *ExplicitProxySettings + + // Insights on Firewall Policy. + Insights *FirewallPolicyInsights + + // The configuration for Intrusion detection. + IntrusionDetection *FirewallPolicyIntrusionDetection + + // The Firewall Policy SKU. + SKU *FirewallPolicySKU + + // SQL Settings definition. + SQL *FirewallPolicySQL + + // The private IP addresses/IP ranges to which traffic will not be SNAT. + Snat *FirewallPolicySNAT + + // The operation mode for Threat Intelligence. + ThreatIntelMode *AzureFirewallThreatIntelMode + + // ThreatIntel Whitelist for Firewall Policy. + ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist + + // TLS Configuration definition. + TransportSecurity *FirewallPolicyTransportSecurity + + // READ-ONLY; List of references to Child Firewall Policies. + ChildPolicies []*SubResource + + // READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with. + Firewalls []*SubResource + + // READ-ONLY; The provisioning state of the firewall policy resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; List of references to FirewallPolicyRuleCollectionGroups. + RuleCollectionGroups []*SubResource + + // READ-ONLY; A read-only string that represents the size of the FirewallPolicyPropertiesFormat in MB. (ex 0.5MB) + Size *string +} + +// FirewallPolicyRule - Properties of a rule. +type FirewallPolicyRule struct { + // REQUIRED; Rule Type. + RuleType *FirewallPolicyRuleType + + // Description of the rule. + Description *string + + // Name of the rule. + Name *string +} + +// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type FirewallPolicyRule. +func (f *FirewallPolicyRule) GetFirewallPolicyRule() *FirewallPolicyRule { return f } + +// FirewallPolicyRuleApplicationProtocol - Properties of the application rule protocol. +type FirewallPolicyRuleApplicationProtocol struct { + // Port number for the protocol, cannot be greater than 64000. + Port *int32 + + // Protocol type. + ProtocolType *FirewallPolicyRuleApplicationProtocolType +} + +// FirewallPolicyRuleCollection - Properties of the rule collection. +type FirewallPolicyRuleCollection struct { + // REQUIRED; The type of the rule collection. + RuleCollectionType *FirewallPolicyRuleCollectionType + + // The name of the rule collection. + Name *string + + // Priority of the Firewall Policy Rule Collection resource. + Priority *int32 +} + +// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyRuleCollection. +func (f *FirewallPolicyRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { + return f +} + +// FirewallPolicyRuleCollectionGroup - Rule Collection Group resource. +type FirewallPolicyRuleCollectionGroup struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // The properties of the firewall policy rule collection group. + Properties *FirewallPolicyRuleCollectionGroupProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Rule Group type. + Type *string +} + +// FirewallPolicyRuleCollectionGroupDraft - Rule Collection Group resource. +type FirewallPolicyRuleCollectionGroupDraft struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // The properties of the firewall policy rule collection group. + Properties *FirewallPolicyRuleCollectionGroupDraftProperties + + // READ-ONLY; Rule Group type. + Type *string +} + +// FirewallPolicyRuleCollectionGroupDraftProperties - Properties of the rule collection group draft. +type FirewallPolicyRuleCollectionGroupDraftProperties struct { + // Priority of the Firewall Policy Rule Collection Group resource. + Priority *int32 + + // Group of Firewall Policy rule collections. + RuleCollections []FirewallPolicyRuleCollectionClassification + + // READ-ONLY; A read-only string that represents the size of the FirewallPolicyRuleCollectionGroupProperties in MB. (ex 1.2MB) + Size *string +} + +// FirewallPolicyRuleCollectionGroupListResult - Response for ListFirewallPolicyRuleCollectionGroups API service call. +type FirewallPolicyRuleCollectionGroupListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy. + Value []*FirewallPolicyRuleCollectionGroup +} + +// FirewallPolicyRuleCollectionGroupProperties - Properties of the rule collection group. +type FirewallPolicyRuleCollectionGroupProperties struct { + // Priority of the Firewall Policy Rule Collection Group resource. + Priority *int32 + + // Group of Firewall Policy rule collections. + RuleCollections []FirewallPolicyRuleCollectionClassification + + // READ-ONLY; The provisioning state of the firewall policy rule collection group resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; A read-only string that represents the size of the FirewallPolicyRuleCollectionGroupProperties in MB. (ex 1.2MB) + Size *string +} + +// FirewallPolicySKU - SKU of Firewall policy. +type FirewallPolicySKU struct { + // Tier of Firewall Policy. + Tier *FirewallPolicySKUTier +} + +// FirewallPolicySNAT - The private IP addresses/IP ranges to which traffic will not be SNAT. +type FirewallPolicySNAT struct { + // The operation mode for automatically learning private ranges to not be SNAT + AutoLearnPrivateRanges *AutoLearnPrivateRangesMode + + // List of private IP addresses/IP address ranges to not be SNAT. + PrivateRanges []*string +} + +// FirewallPolicySQL - SQL Settings in Firewall Policy. +type FirewallPolicySQL struct { + // A flag to indicate if SQL Redirect traffic filtering is enabled. Turning on the flag requires no rule using port 11000-11999. + AllowSQLRedirect *bool +} + +// FirewallPolicyThreatIntelWhitelist - ThreatIntel Whitelist for Firewall Policy. +type FirewallPolicyThreatIntelWhitelist struct { + // List of FQDNs for the ThreatIntel Whitelist. + Fqdns []*string + + // List of IP addresses for the ThreatIntel Whitelist. + IPAddresses []*string +} + +// FirewallPolicyTransportSecurity - Configuration needed to perform TLS termination & initiation. +type FirewallPolicyTransportSecurity struct { + // The CA used for intermediate CA generation. + CertificateAuthority *FirewallPolicyCertificateAuthority +} + +// FlowLog - A flow log resource. +type FlowLog struct { + // Resource ID. + ID *string + + // FlowLog resource Managed Identity + Identity *ManagedServiceIdentity + + // Resource location. + Location *string + + // Properties of the flow log. + Properties *FlowLogPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// FlowLogFormatParameters - Parameters that define the flow log format. +type FlowLogFormatParameters struct { + // The file type of flow log. + Type *FlowLogFormatType + + // The version (revision) of the flow log. + Version *int32 +} + +// FlowLogInformation - Information on the configuration of flow log and traffic analytics (optional) . +type FlowLogInformation struct { + // REQUIRED; Properties of the flow log. + Properties *FlowLogProperties + + // REQUIRED; The ID of the resource to configure for flow log and traffic analytics (optional) . + TargetResourceID *string + + // Parameters that define the configuration of traffic analytics. + FlowAnalyticsConfiguration *TrafficAnalyticsProperties + + // FlowLog resource Managed Identity + Identity *ManagedServiceIdentity +} + +// FlowLogListResult - List of flow logs. +type FlowLogListResult struct { + // Information about flow log resource. + Value []*FlowLog + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// FlowLogProperties - Parameters that define the configuration of flow log. +type FlowLogProperties struct { + // REQUIRED; Flag to enable/disable flow logging. + Enabled *bool + + // REQUIRED; ID of the storage account which is used to store the flow log. + StorageID *string + + // Optional field to filter network traffic logs based on SrcIP, SrcPort, DstIP, DstPort, Protocol, Encryption, Direction + // and Action. If not specified, all network traffic will be logged. + EnabledFilteringCriteria *string + + // Parameters that define the flow log format. + Format *FlowLogFormatParameters + + // Parameters that define the retention policy for flow log. + RetentionPolicy *RetentionPolicyParameters +} + +// FlowLogPropertiesFormat - Parameters that define the configuration of flow log. +type FlowLogPropertiesFormat struct { + // REQUIRED; ID of the storage account which is used to store the flow log. + StorageID *string + + // REQUIRED; ID of network security group to which flow log will be applied. + TargetResourceID *string + + // Flag to enable/disable flow logging. + Enabled *bool + + // Optional field to filter network traffic logs based on SrcIP, SrcPort, DstIP, DstPort, Protocol, Encryption, Direction + // and Action. If not specified, all network traffic will be logged. + EnabledFilteringCriteria *string + + // Parameters that define the configuration of traffic analytics. + FlowAnalyticsConfiguration *TrafficAnalyticsProperties + + // Parameters that define the flow log format. + Format *FlowLogFormatParameters + + // Parameters that define the retention policy for flow log. + RetentionPolicy *RetentionPolicyParameters + + // READ-ONLY; The provisioning state of the flow log. + ProvisioningState *ProvisioningState + + // READ-ONLY; Guid of network security group to which flow log will be applied. + TargetResourceGUID *string +} + +// FlowLogStatusParameters - Parameters that define a resource to query flow log and traffic analytics (optional) status. +type FlowLogStatusParameters struct { + // REQUIRED; The target resource where getting the flow log and traffic analytics (optional) status. + TargetResourceID *string +} + +// FrontendIPConfiguration - Frontend IP address of the load balancer. +type FrontendIPConfiguration struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name + // can be used to access the resource. + Name *string + + // Properties of the load balancer probe. + Properties *FrontendIPConfigurationPropertiesFormat + + // A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones []*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// FrontendIPConfigurationPropertiesFormat - Properties of Frontend IP Configuration of the load balancer. +type FrontendIPConfigurationPropertiesFormat struct { + // The reference to gateway load balancer frontend IP. + GatewayLoadBalancer *SubResource + + // The private IP address of the IP configuration. + PrivateIPAddress *string + + // Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. + PrivateIPAddressVersion *IPVersion + + // The Private IP allocation method. + PrivateIPAllocationMethod *IPAllocationMethod + + // The reference to the Public IP resource. + PublicIPAddress *PublicIPAddress + + // The reference to the Public IP Prefix resource. + PublicIPPrefix *SubResource + + // The reference to the subnet resource. + Subnet *Subnet + + // READ-ONLY; An array of references to inbound pools that use this frontend IP. + InboundNatPools []*SubResource + + // READ-ONLY; An array of references to inbound rules that use this frontend IP. + InboundNatRules []*SubResource + + // READ-ONLY; An array of references to load balancing rules that use this frontend IP. + LoadBalancingRules []*SubResource + + // READ-ONLY; An array of references to outbound rules that use this frontend IP. + OutboundRules []*SubResource + + // READ-ONLY; The provisioning state of the frontend IP configuration resource. + ProvisioningState *ProvisioningState +} + +// GatewayCustomBgpIPAddressIPConfiguration - GatewayCustomBgpIpAddressIpConfiguration for a virtual network gateway connection. +type GatewayCustomBgpIPAddressIPConfiguration struct { + // REQUIRED; The custom BgpPeeringAddress which belongs to IpconfigurationId. + CustomBgpIPAddress *string + + // REQUIRED; The IpconfigurationId of ipconfiguration which belongs to gateway. + IPConfigurationID *string +} + +// GatewayLoadBalancerTunnelInterface - Gateway load balancer tunnel interface of a load balancer backend address pool. +type GatewayLoadBalancerTunnelInterface struct { + // Identifier of gateway load balancer tunnel interface. + Identifier *int32 + + // Port of gateway load balancer tunnel interface. + Port *int32 + + // Protocol of gateway load balancer tunnel interface. + Protocol *GatewayLoadBalancerTunnelProtocol + + // Traffic type of gateway load balancer tunnel interface. + Type *GatewayLoadBalancerTunnelInterfaceType +} + +// GatewayRoute - Gateway routing details. +type GatewayRoute struct { + // READ-ONLY; The route's AS path sequence. + AsPath *string + + // READ-ONLY; The gateway's local address. + LocalAddress *string + + // READ-ONLY; The route's network prefix. + Network *string + + // READ-ONLY; The route's next hop. + NextHop *string + + // READ-ONLY; The source this route was learned from. + Origin *string + + // READ-ONLY; The peer this route was learned from. + SourcePeer *string + + // READ-ONLY; The route's weight. + Weight *int32 +} + +// GatewayRouteListResult - List of virtual network gateway routes. +type GatewayRouteListResult struct { + // List of gateway routes. + Value []*GatewayRoute +} + +// GenerateExpressRoutePortsLOARequest - The customer name to be printed on a letter of authorization. +type GenerateExpressRoutePortsLOARequest struct { + // REQUIRED; The customer name. + CustomerName *string +} + +// GenerateExpressRoutePortsLOAResult - Response for GenerateExpressRoutePortsLOA API service call. +type GenerateExpressRoutePortsLOAResult struct { + // The content as a base64 encoded string. + EncodedContent *string +} + +// GetInboundRoutesParameters - The parameters specifying the connection resource whose inbound routes are being requested. +type GetInboundRoutesParameters struct { + // The type of the specified connection resource like ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and + // P2SConnection. + ConnectionType *string + + // The connection resource whose inbound routes are being requested. + ResourceURI *string +} + +// GetOutboundRoutesParameters - The parameters specifying the connection resource whose outbound routes are being requested. +type GetOutboundRoutesParameters struct { + // The type of the specified connection resource like ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and + // P2SConnection. + ConnectionType *string + + // The connection resource whose outbound routes are being requested. + ResourceURI *string +} + +// GetVPNSitesConfigurationRequest - List of Vpn-Sites. +type GetVPNSitesConfigurationRequest struct { + // REQUIRED; The sas-url to download the configurations for vpn-sites. + OutputBlobSasURL *string + + // List of resource-ids of the vpn-sites for which config is to be downloaded. + VPNSites []*string +} + +// Group - The network group resource +type Group struct { + // The Network Group properties + Properties *GroupProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// GroupByUserSession - Define user session identifier group by clauses. +type GroupByUserSession struct { + // REQUIRED; List of group by clause variables. + GroupByVariables []*GroupByVariable +} + +// GroupByVariable - Define user session group by clause variables. +type GroupByVariable struct { + // REQUIRED; User Session clause variable. + VariableName *ApplicationGatewayFirewallUserSessionVariable +} + +// GroupListResult - Result of the request to list NetworkGroup. It contains a list of groups and a URL link to get the next +// set of results. +type GroupListResult struct { + // Gets the URL to get the next set of results. + NextLink *string + + // Gets a page of NetworkGroup + Value []*Group +} + +// GroupProperties - Properties of network group +type GroupProperties struct { + // A description of the network group. + Description *string + + // The type of the group member. + MemberType *GroupMemberType + + // READ-ONLY; The provisioning state of the scope assignment resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// HTTPConfiguration - HTTP configuration of the connectivity check. +type HTTPConfiguration struct { + // List of HTTP headers. + Headers []*HTTPHeader + + // HTTP method. + Method *HTTPMethod + + // Valid status codes. + ValidStatusCodes []*int32 +} + +// HTTPHeader - The HTTP header. +type HTTPHeader struct { + // The name in HTTP header. + Name *string + + // The value in HTTP header. + Value *string +} + +// HeaderValueMatcher - An optional field under "Rewrite Action". It lets you capture and modify the value(s) of a specific +// header when multiple headers with the same name exist. Currently supported for Set-Cookie Response +// header only. For more details, visit https://aka.ms/appgwheadercrud +type HeaderValueMatcher struct { + // Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison. + IgnoreCase *bool + + // Setting this value as truth will force to check the negation of the condition given by the user in the pattern field. + Negate *bool + + // The pattern, either fixed string or regular expression, that evaluates if a header value should be selected for rewrite. + Pattern *string +} + +// HopLink - Hop link. +type HopLink struct { + // Hop link properties. + Properties *HopLinkProperties + + // READ-ONLY; Provides additional context on links. + Context map[string]*string + + // READ-ONLY; List of issues. + Issues []*ConnectivityIssue + + // READ-ONLY; Link type. + LinkType *string + + // READ-ONLY; The ID of the next hop. + NextHopID *string + + // READ-ONLY; Resource ID. + ResourceID *string +} + +// HopLinkProperties - Hop link properties. +type HopLinkProperties struct { + // READ-ONLY; Average roundtrip time in milliseconds. + RoundTripTimeAvg *int64 + + // READ-ONLY; Maximum roundtrip time in milliseconds. + RoundTripTimeMax *int64 + + // READ-ONLY; Minimum roundtrip time in milliseconds. + RoundTripTimeMin *int64 +} + +// Hub Item. +type Hub struct { + // Resource Id. + ResourceID *string + + // Resource Type. + ResourceType *string +} + +// HubIPAddresses - IP addresses associated with azure firewall. +type HubIPAddresses struct { + // Private IP Address associated with azure firewall. + PrivateIPAddress *string + + // Public IP addresses associated with azure firewall. + PublicIPs *HubPublicIPAddresses +} + +// HubIPConfiguration - IpConfigurations. +type HubIPConfiguration struct { + // Resource ID. + ID *string + + // Name of the Ip Configuration. + Name *string + + // The properties of the Virtual Hub IPConfigurations. + Properties *HubIPConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Ipconfiguration type. + Type *string +} + +// HubIPConfigurationPropertiesFormat - Properties of IP configuration. +type HubIPConfigurationPropertiesFormat struct { + // The private IP address of the IP configuration. + PrivateIPAddress *string + + // The private IP address allocation method. + PrivateIPAllocationMethod *IPAllocationMethod + + // The reference to the public IP resource. + PublicIPAddress *PublicIPAddress + + // The reference to the subnet resource. + Subnet *Subnet + + // READ-ONLY; The provisioning state of the IP configuration resource. + ProvisioningState *ProvisioningState +} + +// HubPublicIPAddresses - Public IP addresses associated with azure firewall. +type HubPublicIPAddresses struct { + // The list of Public IP addresses associated with azure firewall or IP addresses to be retained. + Addresses []*AzureFirewallPublicIPAddress + + // The number of Public IP addresses associated with azure firewall. + Count *int32 +} + +// HubRoute - RouteTable route. +type HubRoute struct { + // REQUIRED; The type of destinations (eg: CIDR, ResourceId, Service). + DestinationType *string + + // REQUIRED; List of all destinations. + Destinations []*string + + // REQUIRED; The name of the Route that is unique within a RouteTable. This name can be used to access this route. + Name *string + + // REQUIRED; NextHop resource ID. + NextHop *string + + // REQUIRED; The type of next hop (eg: ResourceId). + NextHopType *string +} + +// HubRouteTable - RouteTable resource in a virtual hub. +type HubRouteTable struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the RouteTable resource. + Properties *HubRouteTableProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource type. + Type *string +} + +// HubRouteTableProperties - Parameters for RouteTable. +type HubRouteTableProperties struct { + // List of labels associated with this route table. + Labels []*string + + // List of all routes. + Routes []*HubRoute + + // READ-ONLY; List of all connections associated with this route table. + AssociatedConnections []*string + + // READ-ONLY; List of all connections that advertise to this route table. + PropagatingConnections []*string + + // READ-ONLY; The provisioning state of the RouteTable resource. + ProvisioningState *ProvisioningState +} + +// HubVirtualNetworkConnection Resource. +type HubVirtualNetworkConnection struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the hub virtual network connection. + Properties *HubVirtualNetworkConnectionProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// HubVirtualNetworkConnectionProperties - Parameters for HubVirtualNetworkConnection. +type HubVirtualNetworkConnectionProperties struct { + // Deprecated: VirtualHub to RemoteVnet transit to enabled or not. + AllowHubToRemoteVnetTransit *bool + + // Deprecated: Allow RemoteVnet to use Virtual Hub's gateways. + AllowRemoteVnetToUseHubVnetGateways *bool + + // Enable internet security. + EnableInternetSecurity *bool + + // Reference to the remote virtual network. + RemoteVirtualNetwork *SubResource + + // The Routing Configuration indicating the associated and propagated route tables on this connection. + RoutingConfiguration *RoutingConfiguration + + // READ-ONLY; The provisioning state of the hub virtual network connection resource. + ProvisioningState *ProvisioningState +} + +// IDPSQueryObject - Will describe the query to run against the IDPS signatures DB +type IDPSQueryObject struct { + // Contain all filters names and values + Filters []*FilterItems + + // Column to sort response by + OrderBy *OrderBy + + // The number of the results to return in each page + ResultsPerPage *int32 + + // Search term in all columns + Search *string + + // The number of records matching the filter to skip + Skip *int32 +} + +// IPAddressAvailabilityResult - Response for CheckIPAddressAvailability API service call. +type IPAddressAvailabilityResult struct { + // Private IP address availability. + Available *bool + + // Contains other available private IP addresses if the asked for address is taken. + AvailableIPAddresses []*string + + // Private IP address platform reserved. + IsPlatformReserved *bool +} + +// IPAllocation - IpAllocation resource. +type IPAllocation struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the IpAllocation. + Properties *IPAllocationPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// IPAllocationListResult - Response for the ListIpAllocations API service call. +type IPAllocationListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of IpAllocation resources. + Value []*IPAllocation +} + +// IPAllocationPropertiesFormat - Properties of the IpAllocation. +type IPAllocationPropertiesFormat struct { + // IpAllocation tags. + AllocationTags map[string]*string + + // The IPAM allocation ID. + IpamAllocationID *string + + // The address prefix for the IpAllocation. + Prefix *string + + // The address prefix length for the IpAllocation. + PrefixLength *int32 + + // The address prefix Type for the IpAllocation. + PrefixType *IPVersion + + // The type for the IpAllocation. + Type *IPAllocationType + + // READ-ONLY; The Subnet that using the prefix of this IpAllocation resource. + Subnet *SubResource + + // READ-ONLY; The VirtualNetwork that using the prefix of this IpAllocation resource. + VirtualNetwork *SubResource +} + +// IPConfiguration - IP configuration. +type IPConfiguration struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the IP configuration. + Properties *IPConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// IPConfigurationBgpPeeringAddress - Properties of IPConfigurationBgpPeeringAddress. +type IPConfigurationBgpPeeringAddress struct { + // The list of custom BGP peering addresses which belong to IP configuration. + CustomBgpIPAddresses []*string + + // The ID of IP configuration which belongs to gateway. + IPConfigurationID *string + + // READ-ONLY; The list of default BGP peering addresses which belong to IP configuration. + DefaultBgpIPAddresses []*string + + // READ-ONLY; The list of tunnel public IP addresses which belong to IP configuration. + TunnelIPAddresses []*string +} + +// IPConfigurationProfile - IP configuration profile child resource. +type IPConfigurationProfile struct { + // Resource ID. + ID *string + + // The name of the resource. This name can be used to access the resource. + Name *string + + // Properties of the IP configuration profile. + Properties *IPConfigurationProfilePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Sub Resource type. + Type *string +} + +// IPConfigurationProfilePropertiesFormat - IP configuration profile properties. +type IPConfigurationProfilePropertiesFormat struct { + // The reference to the subnet resource to create a container network interface ip configuration. + Subnet *Subnet + + // READ-ONLY; The provisioning state of the IP configuration profile resource. + ProvisioningState *ProvisioningState +} + +// IPConfigurationPropertiesFormat - Properties of IP configuration. +type IPConfigurationPropertiesFormat struct { + // The private IP address of the IP configuration. + PrivateIPAddress *string + + // The private IP address allocation method. + PrivateIPAllocationMethod *IPAllocationMethod + + // The reference to the public IP resource. + PublicIPAddress *PublicIPAddress + + // The reference to the subnet resource. + Subnet *Subnet + + // READ-ONLY; The provisioning state of the IP configuration resource. + ProvisioningState *ProvisioningState +} + +// IPGroup - The IpGroups resource information. +type IPGroup struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the IpGroups. + Properties *IPGroupPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// IPGroupListResult - Response for the ListIpGroups API service call. +type IPGroupListResult struct { + // URL to get the next set of results. + NextLink *string + + // The list of IpGroups information resources. + Value []*IPGroup +} + +// IPGroupPropertiesFormat - The IpGroups property information. +type IPGroupPropertiesFormat struct { + // IpAddresses/IpAddressPrefixes in the IpGroups resource. + IPAddresses []*string + + // READ-ONLY; List of references to Firewall Policies resources that this IpGroups is associated with. + FirewallPolicies []*SubResource + + // READ-ONLY; List of references to Firewall resources that this IpGroups is associated with. + Firewalls []*SubResource + + // READ-ONLY; The provisioning state of the IpGroups resource. + ProvisioningState *ProvisioningState +} + +// IPPrefixesList - List of SNAT IP Prefixes learnt by firewall to not SNAT +type IPPrefixesList struct { + // IP Prefix value. + IPPrefixes []*string +} + +type IPRule struct { + // Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + AddressPrefix *string +} + +// IPSecPolicy - An IPSec Policy configuration for a virtual network gateway connection. +type IPSecPolicy struct { + // REQUIRED; The DH Group used in IKE Phase 1 for initial SA. + DhGroup *DhGroup + + // REQUIRED; The IPSec encryption algorithm (IKE phase 1). + IPSecEncryption *IPSecEncryption + + // REQUIRED; The IPSec integrity algorithm (IKE phase 1). + IPSecIntegrity *IPSecIntegrity + + // REQUIRED; The IKE encryption algorithm (IKE phase 2). + IkeEncryption *IkeEncryption + + // REQUIRED; The IKE integrity algorithm (IKE phase 2). + IkeIntegrity *IkeIntegrity + + // REQUIRED; The Pfs Group used in IKE Phase 2 for new child SA. + PfsGroup *PfsGroup + + // REQUIRED; The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN + // tunnel. + SaDataSizeKilobytes *int32 + + // REQUIRED; The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site + // VPN tunnel. + SaLifeTimeSeconds *int32 +} + +// IPTag - Contains the IpTag associated with the object. +type IPTag struct { + // The IP tag type. Example: FirstPartyUsage. + IPTagType *string + + // The value of the IP tag associated with the public IP. Example: SQL. + Tag *string +} + +// IPTraffic - IP traffic information. +type IPTraffic struct { + // REQUIRED; List of destination IP addresses of the traffic.. + DestinationIPs []*string + + // REQUIRED; The destination ports of the traffic. + DestinationPorts []*string + + // REQUIRED + Protocols []*NetworkProtocol + + // REQUIRED; List of source IP addresses of the traffic.. + SourceIPs []*string + + // REQUIRED; The source ports of the traffic. + SourcePorts []*string +} + +// IPv6CircuitConnectionConfig - IPv6 Circuit Connection properties for global reach. +type IPv6CircuitConnectionConfig struct { + // /125 IP address space to carve out customer addresses for global reach. + AddressPrefix *string + + // READ-ONLY; Express Route Circuit connection state. + CircuitConnectionStatus *CircuitConnectionStatus +} + +// IPv6ExpressRouteCircuitPeeringConfig - Contains IPv6 peering config. +type IPv6ExpressRouteCircuitPeeringConfig struct { + // The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig + + // The primary address prefix. + PrimaryPeerAddressPrefix *string + + // The reference to the RouteFilter resource. + RouteFilter *SubResource + + // The secondary address prefix. + SecondaryPeerAddressPrefix *string + + // The state of peering. + State *ExpressRouteCircuitPeeringState +} + +// InboundNatPool - Inbound NAT pool of the load balancer. +type InboundNatPool struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be + // used to access the resource. + Name *string + + // Properties of load balancer inbound nat pool. + Properties *InboundNatPoolPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// InboundNatPoolPropertiesFormat - Properties of Inbound NAT pool. +type InboundNatPoolPropertiesFormat struct { + // REQUIRED; The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. + BackendPort *int32 + + // REQUIRED; The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated + // with a load balancer. Acceptable values range between 1 and 65535. + FrontendPortRangeEnd *int32 + + // REQUIRED; The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated + // with a load balancer. Acceptable values range between 1 and 65534. + FrontendPortRangeStart *int32 + + // REQUIRED; The reference to the transport protocol used by the inbound NAT pool. + Protocol *TransportProtocol + + // Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability + // Group. This setting is required when using the SQL AlwaysOn Availability Groups + // in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool + + // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used + // when the protocol is set to TCP. + EnableTCPReset *bool + + // A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource + + // The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. + // This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 + + // READ-ONLY; The provisioning state of the inbound NAT pool resource. + ProvisioningState *ProvisioningState +} + +// InboundNatRule - Inbound NAT rule of the load balancer. +type InboundNatRule struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be + // used to access the resource. + Name *string + + // Properties of load balancer inbound NAT rule. + Properties *InboundNatRulePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// InboundNatRuleListResult - Response for ListInboundNatRule API service call. +type InboundNatRuleListResult struct { + // A list of inbound NAT rules in a load balancer. + Value []*InboundNatRule + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// InboundNatRulePortMapping - Individual port mappings for inbound NAT rule created for backend pool. +type InboundNatRulePortMapping struct { + // READ-ONLY; Backend port. + BackendPort *int32 + + // READ-ONLY; Frontend port. + FrontendPort *int32 + + // READ-ONLY; Name of inbound NAT rule. + InboundNatRuleName *string + + // READ-ONLY; The reference to the transport protocol used by the inbound NAT rule. + Protocol *TransportProtocol +} + +// InboundNatRulePropertiesFormat - Properties of the inbound NAT rule. +type InboundNatRulePropertiesFormat struct { + // A reference to backendAddressPool resource. + BackendAddressPool *SubResource + + // The port used for the internal endpoint. Acceptable values range from 1 to 65535. + BackendPort *int32 + + // Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability + // Group. This setting is required when using the SQL AlwaysOn Availability Groups + // in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool + + // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used + // when the protocol is set to TCP. + EnableTCPReset *bool + + // A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource + + // The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values + // range from 1 to 65534. + FrontendPort *int32 + + // The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. + // Individual inbound NAT rule port mappings will be created for each + // backend address from BackendAddressPool. Acceptable values range from 1 to 65534. + FrontendPortRangeEnd *int32 + + // The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. + // Individual inbound NAT rule port mappings will be created for each + // backend address from BackendAddressPool. Acceptable values range from 1 to 65534. + FrontendPortRangeStart *int32 + + // The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. + // This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 + + // The reference to the transport protocol used by the load balancing rule. + Protocol *TransportProtocol + + // READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port + // of each of the frontend IP configurations is forwarded to the backend IP. + BackendIPConfiguration *InterfaceIPConfiguration + + // READ-ONLY; The provisioning state of the inbound NAT rule resource. + ProvisioningState *ProvisioningState +} + +// InboundSecurityRule - NVA Inbound Security Rule resource. +type InboundSecurityRule struct { + // Resource ID. + ID *string + + // Name of security rule collection. + Name *string + + // The properties of the Inbound Security Rules. + Properties *InboundSecurityRuleProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; NVA inbound security rule type. + Type *string +} + +// InboundSecurityRuleProperties - Properties of the Inbound Security Rules resource. +type InboundSecurityRuleProperties struct { + // Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates + // NSG rule and SLB LB Rule. + RuleType *InboundSecurityRuleType + + // List of allowed rules. + Rules []*InboundSecurityRules + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState +} + +// InboundSecurityRules - Properties of the Inbound Security Rules resource. +type InboundSecurityRules struct { + // Public IP name in case of Permanent Rule type & Interface Name in case of Auto Expire Rule type + AppliesOn []*string + + // NVA port ranges to be opened up. One needs to provide specific ports. + DestinationPortRange *int32 + + // NVA port ranges to be opened up. One can provide a range of ports. Allowed port value between 0 and 65535. + DestinationPortRanges []*string + + // Name of the rule. + Name *string + + // Protocol. This should be either TCP or UDP. + Protocol *InboundSecurityRulesProtocol + + // The CIDR or source IP range. + SourceAddressPrefix *string +} + +// IntentContent - Intent information. +type IntentContent struct { + // REQUIRED; Destination resource id of the intent. + DestinationResourceID *string + + // REQUIRED; IP traffic information. + IPTraffic *IPTraffic + + // REQUIRED; Source resource id of the intent. + SourceResourceID *string + Description *string +} + +// IntentPolicy - Network Intent Policy resource. +type IntentPolicy struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// IntentPolicyConfiguration - Details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. +type IntentPolicyConfiguration struct { + // The name of the Network Intent Policy for storing in target subscription. + NetworkIntentPolicyName *string + + // Source network intent policy. + SourceNetworkIntentPolicy *IntentPolicy +} + +// Interface - A network interface in a resource group. +type Interface struct { + // The extended location of the network interface. + ExtendedLocation *ExtendedLocation + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the network interface. + Properties *InterfacePropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// InterfaceAssociation - Network interface and its custom security rules. +type InterfaceAssociation struct { + // Collection of custom security rules. + SecurityRules []*SecurityRule + + // READ-ONLY; Network interface ID. + ID *string +} + +// InterfaceDNSSettings - DNS settings of a network interface. +type InterfaceDNSSettings struct { + // List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' + // value cannot be combined with other IPs, it must be the only value in dnsServers + // collection. + DNSServers []*string + + // Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. + InternalDNSNameLabel *string + + // READ-ONLY; If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers + // from all NICs that are part of the Availability Set. This property is what is + // configured on each of those VMs. + AppliedDNSServers []*string + + // READ-ONLY; Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS + // name can be constructed by concatenating the VM name with the value of + // internalDomainNameSuffix. + InternalDomainNameSuffix *string + + // READ-ONLY; Fully qualified DNS name supporting internal communications between VMs in the same virtual network. + InternalFqdn *string +} + +// InterfaceIPConfiguration - IPConfiguration in a network interface. +type InterfaceIPConfiguration struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Network interface IP configuration properties. + Properties *InterfaceIPConfigurationPropertiesFormat + + // Resource type. + Type *string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// InterfaceIPConfigurationListResult - Response for list ip configurations API service call. +type InterfaceIPConfigurationListResult struct { + // A list of ip configurations. + Value []*InterfaceIPConfiguration + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// InterfaceIPConfigurationPrivateLinkConnectionProperties - PrivateLinkConnection properties for the network interface. +type InterfaceIPConfigurationPrivateLinkConnectionProperties struct { + // READ-ONLY; List of FQDNs for current private link connection. + Fqdns []*string + + // READ-ONLY; The group ID for current private link connection. + GroupID *string + + // READ-ONLY; The required member name for current private link connection. + RequiredMemberName *string +} + +// InterfaceIPConfigurationPropertiesFormat - Properties of IP configuration. +type InterfaceIPConfigurationPropertiesFormat struct { + // The reference to ApplicationGatewayBackendAddressPool resource. + ApplicationGatewayBackendAddressPools []*ApplicationGatewayBackendAddressPool + + // Application security groups in which the IP configuration is included. + ApplicationSecurityGroups []*ApplicationSecurityGroup + + // The reference to gateway load balancer frontend IP. + GatewayLoadBalancer *SubResource + + // The reference to LoadBalancerBackendAddressPool resource. + LoadBalancerBackendAddressPools []*BackendAddressPool + + // A list of references of LoadBalancerInboundNatRules. + LoadBalancerInboundNatRules []*InboundNatRule + + // Whether this is a primary customer address on the network interface. + Primary *bool + + // Private IP address of the IP configuration. It can be a single IP address or a CIDR block in the format /. + PrivateIPAddress *string + + // The private IP address prefix length. If specified and the allocation method is dynamic, the service will allocate a CIDR + // block instead of a single IP address. + PrivateIPAddressPrefixLength *int32 + + // Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. + PrivateIPAddressVersion *IPVersion + + // The private IP address allocation method. + PrivateIPAllocationMethod *IPAllocationMethod + + // Public IP address bound to the IP configuration. + PublicIPAddress *PublicIPAddress + + // Subnet bound to the IP configuration. + Subnet *Subnet + + // The reference to Virtual Network Taps. + VirtualNetworkTaps []*VirtualNetworkTap + + // READ-ONLY; PrivateLinkConnection properties for the network interface. + PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties + + // READ-ONLY; The provisioning state of the network interface IP configuration. + ProvisioningState *ProvisioningState +} + +// InterfaceListResult - Response for the ListNetworkInterface API service call. +type InterfaceListResult struct { + // A list of network interfaces in a resource group. + Value []*Interface + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// InterfaceLoadBalancerListResult - Response for list ip configurations API service call. +type InterfaceLoadBalancerListResult struct { + // A list of load balancers. + Value []*LoadBalancer + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// InterfacePropertiesFormat - NetworkInterface properties. +type InterfacePropertiesFormat struct { + // Auxiliary mode of Network Interface resource. + AuxiliaryMode *NetworkInterfaceAuxiliaryMode + + // Auxiliary sku of Network Interface resource. + AuxiliarySKU *NetworkInterfaceAuxiliarySKU + + // The DNS settings in network interface. + DNSSettings *InterfaceDNSSettings + + // Indicates whether to disable tcp state tracking. + DisableTCPStateTracking *bool + + // If the network interface is configured for accelerated networking. Not applicable to VM sizes which require accelerated + // networking. + EnableAcceleratedNetworking *bool + + // Indicates whether IP forwarding is enabled on this network interface. + EnableIPForwarding *bool + + // A list of IPConfigurations of the network interface. + IPConfigurations []*InterfaceIPConfiguration + + // Migration phase of Network Interface resource. + MigrationPhase *NetworkInterfaceMigrationPhase + + // The reference to the NetworkSecurityGroup resource. + NetworkSecurityGroup *SecurityGroup + + // Type of Network Interface resource. + NicType *NetworkInterfaceNicType + + // Privatelinkservice of the network interface resource. + PrivateLinkService *PrivateLinkService + + // WorkloadType of the NetworkInterface for BareMetal resources + WorkloadType *string + + // READ-ONLY; Whether default outbound connectivity for nic was configured or not. + DefaultOutboundConnectivityEnabled *bool + + // READ-ONLY; A reference to the dscp configuration to which the network interface is linked. + DscpConfiguration *SubResource + + // READ-ONLY; A list of references to linked BareMetal resources. + HostedWorkloads []*string + + // READ-ONLY; The MAC address of the network interface. + MacAddress *string + + // READ-ONLY; Whether this is a primary network interface on a virtual machine. + Primary *bool + + // READ-ONLY; A reference to the private endpoint to which the network interface is linked. + PrivateEndpoint *PrivateEndpoint + + // READ-ONLY; The provisioning state of the network interface resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the network interface resource. + ResourceGUID *string + + // READ-ONLY; A list of TapConfigurations of the network interface. + TapConfigurations []*InterfaceTapConfiguration + + // READ-ONLY; The reference to a virtual machine. + VirtualMachine *SubResource + + // READ-ONLY; Whether the virtual machine this nic is attached to supports encryption. + VnetEncryptionSupported *bool +} + +// InterfaceTapConfiguration - Tap configuration in a Network Interface. +type InterfaceTapConfiguration struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the Virtual Network Tap configuration. + Properties *InterfaceTapConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Sub Resource type. + Type *string +} + +// InterfaceTapConfigurationListResult - Response for list tap configurations API service call. +type InterfaceTapConfigurationListResult struct { + // A list of tap configurations. + Value []*InterfaceTapConfiguration + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// InterfaceTapConfigurationPropertiesFormat - Properties of Virtual Network Tap configuration. +type InterfaceTapConfigurationPropertiesFormat struct { + // The reference to the Virtual Network Tap resource. + VirtualNetworkTap *VirtualNetworkTap + + // READ-ONLY; The provisioning state of the network interface tap configuration resource. + ProvisioningState *ProvisioningState +} + +// InternetIngressPublicIPsProperties - Resource Uri of Public Ip for Standard Load Balancer Frontend End. +type InternetIngressPublicIPsProperties struct { + // Resource Uri of Public Ip + ID *string +} + +// IpamPool - Instance of Pool resource. +type IpamPool struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // REQUIRED; Properties of IpamPool resource properties which are specific to the Pool resource. + Properties *IpamPoolProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// IpamPoolList - List of IpamPool +type IpamPoolList struct { + // The link used to get the next page of operations. + NextLink *string + Value []*IpamPool +} + +// IpamPoolPrefixAllocation - IpamPool prefix allocation reference. +type IpamPoolPrefixAllocation struct { + // Number of IP addresses to allocate. + NumberOfIPAddresses *string + Pool *IpamPoolPrefixAllocationPool + + // READ-ONLY; List of assigned IP address prefixes in the IpamPool of the associated resource. + AllocatedAddressPrefixes []*string +} + +type IpamPoolPrefixAllocationPool struct { + // Resource id of the associated Azure IpamPool resource. + ID *string +} + +// IpamPoolProperties - Properties of IpamPool resource properties which are specific to the Pool resource. +type IpamPoolProperties struct { + // REQUIRED; List of IP address prefixes of the resource. + AddressPrefixes []*string + Description *string + + // String representing a friendly name for the resource. + DisplayName *string + + // String representing parent IpamPool resource name. If empty the IpamPool will be a root pool. + ParentPoolName *string + + // Provisioning states of a resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; List of IP address type for the IpamPool. + IPAddressType []*IPType +} + +// IpamPoolUpdate - Represents the IpamPool update API request interface. +type IpamPoolUpdate struct { + // Represents the IpamPool update properties. + Properties *IpamPoolUpdateProperties + + // Dictionary of + Tags map[string]*string +} + +// IpamPoolUpdateProperties - Represents the IpamPool update properties. +type IpamPoolUpdateProperties struct { + Description *string + + // String representing a friendly name for the resource. + DisplayName *string +} + +// ListHubRouteTablesResult - List of RouteTables and a URL nextLink to get the next set of results. +type ListHubRouteTablesResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of RouteTables. + Value []*HubRouteTable +} + +// ListHubVirtualNetworkConnectionsResult - List of HubVirtualNetworkConnections and a URL nextLink to get the next set of +// results. +type ListHubVirtualNetworkConnectionsResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of HubVirtualNetworkConnections. + Value []*HubVirtualNetworkConnection +} + +// ListP2SVPNGatewaysResult - Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL +// nextLink to get the next set of results. +type ListP2SVPNGatewaysResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of P2SVpnGateways. + Value []*P2SVPNGateway +} + +// ListRouteMapsResult - List of RouteMaps and a URL nextLink to get the next set of results. +type ListRouteMapsResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of RouteMaps. + Value []*RouteMap +} + +// ListRoutingIntentResult - List of the routing intent result and a URL nextLink to get the next set of results. +type ListRoutingIntentResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of RoutingIntent resource. + Value []*RoutingIntent +} + +// ListVPNConnectionsResult - Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains +// a list of Vpn Connections and a URL nextLink to get the next set of results. +type ListVPNConnectionsResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of Vpn Connections. + Value []*VPNConnection +} + +// ListVPNGatewayNatRulesResult - Result of the request to list all nat rules to a virtual wan vpn gateway. It contains a +// list of Nat rules and a URL nextLink to get the next set of results. +type ListVPNGatewayNatRulesResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of Nat Rules. + Value []*VPNGatewayNatRule +} + +// ListVPNGatewaysResult - Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink +// to get the next set of results. +type ListVPNGatewaysResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of VpnGateways. + Value []*VPNGateway +} + +// ListVPNServerConfigurationPolicyGroupsResult - Result of the request to list VpnServerConfigurationPolicyGroups. It contains +// a list of VpnServerConfigurationPolicyGroups and a URL nextLink to get the next set of results. +type ListVPNServerConfigurationPolicyGroupsResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of VpnServerConfigurationPolicyGroups. + Value []*VPNServerConfigurationPolicyGroup +} + +// ListVPNServerConfigurationsResult - Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations +// and a URL nextLink to get the next set of results. +type ListVPNServerConfigurationsResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of VpnServerConfigurations. + Value []*VPNServerConfiguration +} + +// ListVPNSiteLinkConnectionsResult - Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains +// a list of Vpn Connections and a URL nextLink to get the next set of results. +type ListVPNSiteLinkConnectionsResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of VpnSiteLinkConnections. + Value []*VPNSiteLinkConnection +} + +// ListVPNSiteLinksResult - Result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks and a URL nextLink +// to get the next set of results. +type ListVPNSiteLinksResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of VpnSitesLinks. + Value []*VPNSiteLink +} + +// ListVPNSitesResult - Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the +// next set of results. +type ListVPNSitesResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of VpnSites. + Value []*VPNSite +} + +// ListVirtualHubBgpConnectionResults - VirtualHubBgpConnections list. +type ListVirtualHubBgpConnectionResults struct { + // URL to get the next set of results. + NextLink *string + + // The list of VirtualHubBgpConnections. + Value []*BgpConnection +} + +// ListVirtualHubIPConfigurationResults - VirtualHubIpConfigurations list. +type ListVirtualHubIPConfigurationResults struct { + // URL to get the next set of results. + NextLink *string + + // The list of VirtualHubIpConfigurations. + Value []*HubIPConfiguration +} + +// ListVirtualHubRouteTableV2SResult - List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. +type ListVirtualHubRouteTableV2SResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of VirtualHubRouteTableV2s. + Value []*VirtualHubRouteTableV2 +} + +// ListVirtualHubsResult - Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink +// to get the next set of results. +type ListVirtualHubsResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of VirtualHubs. + Value []*VirtualHub +} + +// ListVirtualNetworkGatewayNatRulesResult - Result of the request to list all nat rules to a virtual network gateway. It +// contains a list of Nat rules and a URL nextLink to get the next set of results. +type ListVirtualNetworkGatewayNatRulesResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of Nat Rules. + Value []*VirtualNetworkGatewayNatRule +} + +// ListVirtualWANsResult - Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink +// to get the next set of results. +type ListVirtualWANsResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of VirtualWANs. + Value []*VirtualWAN +} + +// LoadBalancer resource. +type LoadBalancer struct { + // The extended location of the load balancer. + ExtendedLocation *ExtendedLocation + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of load balancer. + Properties *LoadBalancerPropertiesFormat + + // The load balancer SKU. + SKU *LoadBalancerSKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// LoadBalancerBackendAddress - Load balancer backend addresses. +type LoadBalancerBackendAddress struct { + // Name of the backend address. + Name *string + + // Properties of load balancer backend address pool. + Properties *LoadBalancerBackendAddressPropertiesFormat +} + +// LoadBalancerBackendAddressPoolListResult - Response for ListBackendAddressPool API service call. +type LoadBalancerBackendAddressPoolListResult struct { + // A list of backend address pools in a load balancer. + Value []*BackendAddressPool + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// LoadBalancerBackendAddressPropertiesFormat - Properties of the load balancer backend addresses. +type LoadBalancerBackendAddressPropertiesFormat struct { + // A list of administrative states which once set can override health probe so that Load Balancer will always forward new + // connections to backend, or deny new connections and reset existing connections. + AdminState *LoadBalancerBackendAddressAdminState + + // IP Address belonging to the referenced virtual network. + IPAddress *string + + // Reference to the frontend ip address configuration defined in regional loadbalancer. + LoadBalancerFrontendIPConfiguration *SubResource + + // Reference to an existing subnet. + Subnet *SubResource + + // Reference to an existing virtual network. + VirtualNetwork *SubResource + + // READ-ONLY; Collection of inbound NAT rule port mappings. + InboundNatRulesPortMapping []*NatRulePortMapping + + // READ-ONLY; Reference to IP address defined in network interfaces. + NetworkInterfaceIPConfiguration *SubResource +} + +// LoadBalancerFrontendIPConfigurationListResult - Response for ListFrontendIPConfiguration API service call. +type LoadBalancerFrontendIPConfigurationListResult struct { + // A list of frontend IP configurations in a load balancer. + Value []*FrontendIPConfiguration + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// LoadBalancerHealthPerRule - The response for a Health API. +type LoadBalancerHealthPerRule struct { + // Number of backend instances associated to the LB rule that are considered unhealthy. + Down *int32 + + // Information about the health per rule of the backend addresses. + LoadBalancerBackendAddresses []*LoadBalancerHealthPerRulePerBackendAddress + + // Number of backend instances associated to the LB rule that are considered healthy. + Up *int32 +} + +// LoadBalancerHealthPerRulePerBackendAddress - The information about health per rule per backend address. +type LoadBalancerHealthPerRulePerBackendAddress struct { + // The IP address belonging to the backend address. + IPAddress *string + + // The id of the network interface ip configuration belonging to the backend address + NetworkInterfaceIPConfigurationID *InterfaceIPConfiguration + + // The explanation of the State + Reason *string + + // The current health of the backend instances that is associated to the LB rule. + State *string +} + +// LoadBalancerListResult - Response for ListLoadBalancers API service call. +type LoadBalancerListResult struct { + // A list of load balancers in a resource group. + Value []*LoadBalancer + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// LoadBalancerLoadBalancingRuleListResult - Response for ListLoadBalancingRule API service call. +type LoadBalancerLoadBalancingRuleListResult struct { + // A list of load balancing rules in a load balancer. + Value []*LoadBalancingRule + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// LoadBalancerOutboundRuleListResult - Response for ListOutboundRule API service call. +type LoadBalancerOutboundRuleListResult struct { + // A list of outbound rules in a load balancer. + Value []*OutboundRule + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// LoadBalancerProbeListResult - Response for ListProbe API service call. +type LoadBalancerProbeListResult struct { + // A list of probes in a load balancer. + Value []*Probe + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// LoadBalancerPropertiesFormat - Properties of the load balancer. +type LoadBalancerPropertiesFormat struct { + // Collection of backend address pools used by a load balancer. + BackendAddressPools []*BackendAddressPool + + // Object representing the frontend IPs to be used for the load balancer. + FrontendIPConfigurations []*FrontendIPConfiguration + + // Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound + // NAT rules are created automatically for each NIC associated with the Load + // Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive + // with defining inbound NAT rules. Inbound NAT pools are referenced from virtual + // machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They + // have to reference individual inbound NAT rules. + InboundNatPools []*InboundNatPool + + // Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive + // with defining an inbound NAT pool. Inbound NAT pools are referenced from + // virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. + // They have to reference individual inbound NAT rules. + InboundNatRules []*InboundNatRule + + // Object collection representing the load balancing rules Gets the provisioning. + LoadBalancingRules []*LoadBalancingRule + + // The outbound rules. + OutboundRules []*OutboundRule + + // Collection of probe objects used in the load balancer. + Probes []*Probe + + // READ-ONLY; The provisioning state of the load balancer resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the load balancer resource. + ResourceGUID *string +} + +// LoadBalancerSKU - SKU of a load balancer. +type LoadBalancerSKU struct { + // Name of a load balancer SKU. + Name *LoadBalancerSKUName + + // Tier of a load balancer SKU. + Tier *LoadBalancerSKUTier +} + +// LoadBalancerVipSwapRequest - The request for a VIP swap. +type LoadBalancerVipSwapRequest struct { + // A list of frontend IP configuration resources that should swap VIPs. + FrontendIPConfigurations []*LoadBalancerVipSwapRequestFrontendIPConfiguration +} + +// LoadBalancerVipSwapRequestFrontendIPConfiguration - VIP swap request's frontend IP configuration object. +type LoadBalancerVipSwapRequestFrontendIPConfiguration struct { + // The ID of frontend IP configuration resource. + ID *string + + // The properties of VIP swap request's frontend IP configuration object. + Properties *LoadBalancerVipSwapRequestFrontendIPConfigurationProperties +} + +// LoadBalancerVipSwapRequestFrontendIPConfigurationProperties - The properties of VIP swap request's frontend IP configuration +// object. +type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties struct { + // A reference to public IP address resource. + PublicIPAddress *SubResource +} + +// LoadBalancingRule - A load balancing rule for a load balancer. +type LoadBalancingRule struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can + // be used to access the resource. + Name *string + + // Properties of load balancer load balancing rule. + Properties *LoadBalancingRulePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// LoadBalancingRulePropertiesFormat - Properties of the load balancer. +type LoadBalancingRulePropertiesFormat struct { + // REQUIRED; The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable + // values are between 0 and 65534. Note that value 0 enables "Any Port". + FrontendPort *int32 + + // REQUIRED; The reference to the transport protocol used by the load balancing rule. + Protocol *TransportProtocol + + // A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. + BackendAddressPool *SubResource + + // An array of references to pool of DIPs. + BackendAddressPools []*SubResource + + // The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables + // "Any Port". + BackendPort *int32 + + // Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing + // rule. + DisableOutboundSnat *bool + + // Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability + // Group. This setting is required when using the SQL AlwaysOn Availability Groups + // in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool + + // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used + // when the protocol is set to TCP. + EnableTCPReset *bool + + // A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource + + // The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. + // This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 + + // The load distribution policy for this rule. + LoadDistribution *LoadDistribution + + // The reference to the load balancer probe used by the load balancing rule. + Probe *SubResource + + // READ-ONLY; The provisioning state of the load balancing rule resource. + ProvisioningState *ProvisioningState +} + +// LocalNetworkGateway - A common class for general resource information. +type LocalNetworkGateway struct { + // REQUIRED; Properties of the local network gateway. + Properties *LocalNetworkGatewayPropertiesFormat + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// LocalNetworkGatewayListResult - Response for ListLocalNetworkGateways API service call. +type LocalNetworkGatewayListResult struct { + // A list of local network gateways that exists in a resource group. + Value []*LocalNetworkGateway + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// LocalNetworkGatewayPropertiesFormat - LocalNetworkGateway properties. +type LocalNetworkGatewayPropertiesFormat struct { + // Local network gateway's BGP speaker settings. + BgpSettings *BgpSettings + + // FQDN of local network gateway. + Fqdn *string + + // IP address of local network gateway. + GatewayIPAddress *string + + // Local network site address space. + LocalNetworkAddressSpace *AddressSpace + + // READ-ONLY; The provisioning state of the local network gateway resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the local network gateway resource. + ResourceGUID *string +} + +// LogSpecification - Description of logging specification. +type LogSpecification struct { + // Duration of the blob. + BlobDuration *string + + // The display name of the specification. + DisplayName *string + + // The name of the specification. + Name *string +} + +// ManagedRuleGroupOverride - Defines a managed rule group override setting. +type ManagedRuleGroupOverride struct { + // REQUIRED; The managed rule group to override. + RuleGroupName *string + + // List of rules that will be disabled. If none specified, all rules in the group will be disabled. + Rules []*ManagedRuleOverride +} + +// ManagedRuleOverride - Defines a managed rule group override setting. +type ManagedRuleOverride struct { + // REQUIRED; Identifier for the managed rule. + RuleID *string + + // Describes the override action to be applied when rule matches. + Action *ActionType + + // Describes the override sensitivity to be applied when rule matches. + Sensitivity *SensitivityType + + // The state of the managed rule. Defaults to Disabled if not specified. + State *ManagedRuleEnabledState +} + +// ManagedRuleSet - Defines a managed rule set. +type ManagedRuleSet struct { + // REQUIRED; Defines the rule set type to use. + RuleSetType *string + + // REQUIRED; Defines the version of the rule set to use. + RuleSetVersion *string + + // Defines the rule group overrides to apply to the rule set. + RuleGroupOverrides []*ManagedRuleGroupOverride +} + +// ManagedRulesDefinition - Allow to exclude some variable satisfy the condition for the WAF check. +type ManagedRulesDefinition struct { + // REQUIRED; The managed rule sets that are associated with the policy. + ManagedRuleSets []*ManagedRuleSet + + // The exceptions that are applied on the policy. + Exceptions []*ExceptionEntry + + // The Exclusions that are applied on the policy. + Exclusions []*OwaspCrsExclusionEntry +} + +// ManagedServiceIdentity - Identity for the resource. +type ManagedServiceIdentity struct { + // The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created + // identity and a set of user assigned identities. The type 'None' will remove any + // identities from the virtual machine. + Type *ResourceIdentityType + + // The list of user identities associated with 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]*Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties + + // READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned + // identity. + PrincipalID *string + + // READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string +} + +// Manager - The Managed Network resource +type Manager struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // The network manager properties + Properties *ManagerProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ManagerCommit - Network Manager Commit. +type ManagerCommit struct { + // REQUIRED; Commit Type. + CommitType *ConfigurationType + + // REQUIRED; List of target locations. + TargetLocations []*string + + // List of configuration ids. + ConfigurationIDs []*string + + // READ-ONLY; Commit Id. + CommitID *string +} + +// ManagerConnection - The Network Manager Connection resource +type ManagerConnection struct { + // The scope connection properties + Properties *ManagerConnectionProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ManagerConnectionListResult - List of network manager connections. +type ManagerConnectionListResult struct { + // Gets the URL to get the next page of results. + NextLink *string + + // List of network manager connections. + Value []*ManagerConnection +} + +// ManagerConnectionProperties - Information about the network manager connection. +type ManagerConnectionProperties struct { + // A description of the network manager connection. + Description *string + + // Network Manager Id. + NetworkManagerID *string + + // READ-ONLY; Connection state. + ConnectionState *ScopeConnectionState +} + +// ManagerDeploymentStatus - Network Manager Deployment Status. +type ManagerDeploymentStatus struct { + // Commit Time. + CommitTime *time.Time + + // List of configuration ids. + ConfigurationIDs []*string + + // Deployment Status. + DeploymentStatus *DeploymentStatus + + // Configuration Deployment Type. + DeploymentType *ConfigurationType + + // Error Message. + ErrorMessage *string + + // Region Name. + Region *string +} + +// ManagerDeploymentStatusListResult - A list of Network Manager Deployment Status +type ManagerDeploymentStatusListResult struct { + // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current + // request) to retrieve the next page of data. + SkipToken *string + + // Gets a page of Network Manager Deployment Status + Value []*ManagerDeploymentStatus +} + +// ManagerDeploymentStatusParameter - Network Manager Deployment Status Parameter. +type ManagerDeploymentStatusParameter struct { + // List of deployment types. + DeploymentTypes []*ConfigurationType + + // List of locations. + Regions []*string + + // Continuation token for pagination, capturing the next page size and offset, as well as the context of the query. + SkipToken *string +} + +// ManagerEffectiveConnectivityConfigurationListResult - Result of the request to list networkManagerEffectiveConnectivityConfiguration. +// It contains a list of groups and a skiptoken to get the next set of results. +type ManagerEffectiveConnectivityConfigurationListResult struct { + // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current + // request) to retrieve the next page of data. + SkipToken *string + + // Gets a page of NetworkManagerEffectiveConnectivityConfiguration + Value []*EffectiveConnectivityConfiguration +} + +// ManagerEffectiveSecurityAdminRulesListResult - Result of the request to list networkManagerEffectiveSecurityAdminRules. +// It contains a list of groups and a skiptoken to get the next set of results. +type ManagerEffectiveSecurityAdminRulesListResult struct { + // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current + // request) to retrieve the next page of data. + SkipToken *string + + // Gets a page of NetworkManagerEffectiveSecurityAdminRules + Value []EffectiveBaseSecurityAdminRuleClassification +} + +// ManagerListResult - Result of the request to list NetworkManager. It contains a list of network managers and a URL link +// to get the next set of results. +type ManagerListResult struct { + // Gets the URL to get the next page of results. + NextLink *string + + // Gets a page of NetworkManager + Value []*Manager +} + +// ManagerProperties - Properties of Managed Network +type ManagerProperties struct { + // REQUIRED; Scope of Network Manager. + NetworkManagerScopes *ManagerPropertiesNetworkManagerScopes + + // A description of the network manager. + Description *string + + // Scope Access. + NetworkManagerScopeAccesses []*ConfigurationType + + // READ-ONLY; The provisioning state of the network manager resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// ManagerPropertiesNetworkManagerScopes - Scope of Network Manager. +type ManagerPropertiesNetworkManagerScopes struct { + // List of management groups. + ManagementGroups []*string + + // List of subscriptions. + Subscriptions []*string + + // READ-ONLY; List of cross tenant scopes. + CrossTenantScopes []*CrossTenantScopes +} + +// ManagerRoutingConfiguration - Defines the routing configuration +type ManagerRoutingConfiguration struct { + // Indicates the properties for the network manager routing configuration. + Properties *ManagerRoutingConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ManagerRoutingConfigurationListResult - A list of network manager routing configurations +type ManagerRoutingConfigurationListResult struct { + // Gets the URL to get the next page of results. + NextLink *string + + // Gets a page of routing configurations + Value []*ManagerRoutingConfiguration +} + +// ManagerRoutingConfigurationPropertiesFormat - Defines the routing configuration properties. +type ManagerRoutingConfigurationPropertiesFormat struct { + // A description of the routing configuration. + Description *string + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// ManagerRoutingGroupItem - Network manager routing group item. +type ManagerRoutingGroupItem struct { + // REQUIRED; Network manager group Id. + NetworkGroupID *string +} + +// ManagerSecurityGroupItem - Network manager security group item. +type ManagerSecurityGroupItem struct { + // REQUIRED; Network manager group Id. + NetworkGroupID *string +} + +// MatchCondition - Define match conditions. +type MatchCondition struct { + // REQUIRED; Match value. + MatchValues []*string + + // REQUIRED; List of match variables. + MatchVariables []*MatchVariable + + // REQUIRED; The operator to be matched. + Operator *WebApplicationFirewallOperator + + // Whether this is negate condition or not. + NegationConditon *bool + + // List of transforms. + Transforms []*WebApplicationFirewallTransform +} + +// MatchVariable - Define match variables. +type MatchVariable struct { + // REQUIRED; Match Variable. + VariableName *WebApplicationFirewallMatchVariable + + // The selector of match variable. + Selector *string +} + +// MatchedRule - Matched rule. +type MatchedRule struct { + // The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. + Action *string + + // Name of the matched network security rule. + RuleName *string +} + +// MetricSpecification - Description of metrics specification. +type MetricSpecification struct { + // The aggregation type. + AggregationType *string + + // List of availability. + Availabilities []*Availability + + // List of dimensions. + Dimensions []*Dimension + + // The description of the metric. + DisplayDescription *string + + // The display name of the metric. + DisplayName *string + + // Whether regional MDM account enabled. + EnableRegionalMdmAccount *bool + + // Whether gaps would be filled with zeros. + FillGapWithZero *bool + + // Whether the metric is internal. + IsInternal *bool + + // Pattern for the filter of the metric. + MetricFilterPattern *string + + // The name of the metric. + Name *string + + // The resource Id dimension name override. + ResourceIDDimensionNameOverride *string + + // The source MDM account. + SourceMdmAccount *string + + // The source MDM namespace. + SourceMdmNamespace *string + + // Units the metric to be displayed in. + Unit *string +} + +// MigrateLoadBalancerToIPBasedRequest - The request for a migrateToIpBased API. +type MigrateLoadBalancerToIPBasedRequest struct { + // A list of pool names that should be migrated from Nic based to IP based pool + Pools []*string +} + +// MigratedPools - The response for a migrateToIpBased API. +type MigratedPools struct { + // A list of pools migrated from Nic based to IP based pool + MigratedPools []*string +} + +// NatGateway - Nat Gateway resource. +type NatGateway struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Nat Gateway properties. + Properties *NatGatewayPropertiesFormat + + // The nat gateway SKU. + SKU *NatGatewaySKU + + // Resource tags. + Tags map[string]*string + + // A list of availability zones denoting the zone in which Nat Gateway should be deployed. + Zones []*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// NatGatewayListResult - Response for ListNatGateways API service call. +type NatGatewayListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of Nat Gateways that exists in a resource group. + Value []*NatGateway +} + +// NatGatewayPropertiesFormat - Nat Gateway properties. +type NatGatewayPropertiesFormat struct { + // The idle timeout of the nat gateway. + IdleTimeoutInMinutes *int32 + + // An array of public ip addresses associated with the nat gateway resource. + PublicIPAddresses []*SubResource + + // An array of public ip prefixes associated with the nat gateway resource. + PublicIPPrefixes []*SubResource + + // READ-ONLY; The provisioning state of the NAT gateway resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the NAT gateway resource. + ResourceGUID *string + + // READ-ONLY; An array of references to the subnets using this nat gateway resource. + Subnets []*SubResource +} + +// NatGatewaySKU - SKU of nat gateway. +type NatGatewaySKU struct { + // Name of Nat Gateway SKU. + Name *NatGatewaySKUName +} + +// NatRule - Rule of type nat. +type NatRule struct { + // REQUIRED; Rule Type. + RuleType *FirewallPolicyRuleType + + // Description of the rule. + Description *string + + // List of destination IP addresses or Service Tags. + DestinationAddresses []*string + + // List of destination ports. + DestinationPorts []*string + + // Array of FirewallPolicyRuleNetworkProtocols. + IPProtocols []*FirewallPolicyRuleNetworkProtocol + + // Name of the rule. + Name *string + + // List of source IP addresses for this rule. + SourceAddresses []*string + + // List of source IpGroups for this rule. + SourceIPGroups []*string + + // The translated address for this NAT rule. + TranslatedAddress *string + + // The translated FQDN for this NAT rule. + TranslatedFqdn *string + + // The translated port for this NAT rule. + TranslatedPort *string +} + +// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type NatRule. +func (n *NatRule) GetFirewallPolicyRule() *FirewallPolicyRule { + return &FirewallPolicyRule{ + Description: n.Description, + Name: n.Name, + RuleType: n.RuleType, + } +} + +// NatRulePortMapping - Individual port mappings for inbound NAT rule created for backend pool. +type NatRulePortMapping struct { + // Backend port. + BackendPort *int32 + + // Frontend port. + FrontendPort *int32 + + // Name of inbound NAT rule. + InboundNatRuleName *string +} + +// NextHopParameters - Parameters that define the source and destination endpoint. +type NextHopParameters struct { + // REQUIRED; The destination IP address. + DestinationIPAddress *string + + // REQUIRED; The source IP address. + SourceIPAddress *string + + // REQUIRED; The resource identifier of the target resource against which the action is to be performed. + TargetResourceID *string + + // The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. + // Otherwise optional). + TargetNicResourceID *string +} + +// NextHopResult - The information about next hop from the specified VM. +type NextHopResult struct { + // Next hop IP Address. + NextHopIPAddress *string + + // Next hop type. + NextHopType *NextHopType + + // The resource identifier for the route table associated with the route being returned. If the route being returned does + // not correspond to any user created routes then this field will be the string + // 'System Route'. + RouteTableID *string +} + +// O365BreakOutCategoryPolicies - Office365 breakout categories. +type O365BreakOutCategoryPolicies struct { + // Flag to control allow category. + Allow *bool + + // Flag to control default category. + Default *bool + + // Flag to control optimize category. + Optimize *bool +} + +// O365PolicyProperties - The Office365 breakout policy. +type O365PolicyProperties struct { + // Office365 breakout categories. + BreakOutCategories *O365BreakOutCategoryPolicies +} + +// Office365PolicyProperties - Network Virtual Appliance Sku Properties. +type Office365PolicyProperties struct { + // Office 365 breakout categories. + BreakOutCategories *BreakOutCategoryPolicies +} + +// Operation - Network REST API operation definition. +type Operation struct { + // Display metadata associated with the operation. + Display *OperationDisplay + + // Operation name: {provider}/{resource}/{operation}. + Name *string + + // Origin of the operation. + Origin *string + + // Operation properties format. + Properties *OperationPropertiesFormat +} + +// OperationDisplay - Display metadata associated with the operation. +type OperationDisplay struct { + // Description of the operation. + Description *string + + // Type of the operation: get, read, delete, etc. + Operation *string + + // Service provider: Microsoft Network. + Provider *string + + // Resource on which the operation is performed. + Resource *string +} + +// OperationListResult - Result of the request to list Network operations. It contains a list of operations and a URL link +// to get the next set of results. +type OperationListResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of Network operations supported by the Network resource provider. + Value []*Operation +} + +// OperationPropertiesFormat - Description of operation properties format. +type OperationPropertiesFormat struct { + // Specification of the service. + ServiceSpecification *OperationPropertiesFormatServiceSpecification +} + +// OperationPropertiesFormatServiceSpecification - Specification of the service. +type OperationPropertiesFormatServiceSpecification struct { + // Operation log specification. + LogSpecifications []*LogSpecification + + // Operation service specification. + MetricSpecifications []*MetricSpecification +} + +// OrderBy - Describes a column to sort +type OrderBy struct { + // Describes the actual column name to sort by + Field *string + + // Describes if results should be in ascending/descending order + Order *FirewallPolicyIDPSQuerySortOrder +} + +// OutboundRule - Outbound rule of the load balancer. +type OutboundRule struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used + // to access the resource. + Name *string + + // Properties of load balancer outbound rule. + Properties *OutboundRulePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// OutboundRulePropertiesFormat - Outbound rule of the load balancer. +type OutboundRulePropertiesFormat struct { + // REQUIRED; A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. + BackendAddressPool *SubResource + + // REQUIRED; The Frontend IP addresses of the load balancer. + FrontendIPConfigurations []*SubResource + + // REQUIRED; The protocol for the outbound rule in load balancer. + Protocol *LoadBalancerOutboundRuleProtocol + + // The number of outbound ports to be used for NAT. + AllocatedOutboundPorts *int32 + + // Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used + // when the protocol is set to TCP. + EnableTCPReset *bool + + // The timeout for the TCP idle connection. + IdleTimeoutInMinutes *int32 + + // READ-ONLY; The provisioning state of the outbound rule resource. + ProvisioningState *ProvisioningState +} + +// OwaspCrsExclusionEntry - Allow to exclude some variable satisfy the condition for the WAF check. +type OwaspCrsExclusionEntry struct { + // REQUIRED; The variable to be excluded. + MatchVariable *OwaspCrsExclusionEntryMatchVariable + + // REQUIRED; When matchVariable is a collection, operator used to specify which elements in the collection this exclusion + // applies to. + Selector *string + + // REQUIRED; When matchVariable is a collection, operate on the selector to specify which elements in the collection this + // exclusion applies to. + SelectorMatchOperator *OwaspCrsExclusionEntrySelectorMatchOperator + + // The managed rule sets that are associated with the exclusion. + ExclusionManagedRuleSets []*ExclusionManagedRuleSet +} + +// P2SConnectionConfiguration Resource. +type P2SConnectionConfiguration struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the P2S connection configuration. + Properties *P2SConnectionConfigurationProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// P2SConnectionConfigurationProperties - Parameters for P2SConnectionConfiguration. +type P2SConnectionConfigurationProperties struct { + // Flag indicating whether the enable internet security flag is turned on for the P2S Connections or not. + EnableInternetSecurity *bool + + // The Routing Configuration indicating the associated and propagated route tables on this connection. + RoutingConfiguration *RoutingConfiguration + + // The reference to the address space resource which represents Address space for P2S VpnClient. + VPNClientAddressPool *AddressSpace + + // READ-ONLY; List of Configuration Policy Groups that this P2SConnectionConfiguration is attached to. + ConfigurationPolicyGroupAssociations []*SubResource + + // READ-ONLY; List of previous Configuration Policy Groups that this P2SConnectionConfiguration was attached to. + PreviousConfigurationPolicyGroupAssociations []*VPNServerConfigurationPolicyGroup + + // READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. + ProvisioningState *ProvisioningState +} + +// P2SVPNConnectionHealth - P2S Vpn connection detailed health written to sas url. +type P2SVPNConnectionHealth struct { + // Returned sas url of the blob to which the p2s vpn connection detailed health will be written. + SasURL *string +} + +// P2SVPNConnectionHealthRequest - List of P2S Vpn connection health request. +type P2SVPNConnectionHealthRequest struct { + // The sas-url to download the P2S Vpn connection health detail. + OutputBlobSasURL *string + + // The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for. + VPNUserNamesFilter []*string +} + +// P2SVPNConnectionRequest - List of p2s vpn connections to be disconnected. +type P2SVPNConnectionRequest struct { + // List of p2s vpn connection Ids. + VPNConnectionIDs []*string +} + +// P2SVPNGateway - P2SVpnGateway Resource. +type P2SVPNGateway struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the P2SVpnGateway. + Properties *P2SVPNGatewayProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// P2SVPNGatewayProperties - Parameters for P2SVpnGateway. +type P2SVPNGatewayProperties struct { + // List of all customer specified DNS servers IP addresses. + CustomDNSServers []*string + + // Enable Routing Preference property for the Public IP Interface of the P2SVpnGateway. + IsRoutingPreferenceInternet *bool + + // List of all p2s connection configurations of the gateway. + P2SConnectionConfigurations []*P2SConnectionConfiguration + + // The scale unit for this p2s vpn gateway. + VPNGatewayScaleUnit *int32 + + // The VpnServerConfiguration to which the p2sVpnGateway is attached to. + VPNServerConfiguration *SubResource + + // The VirtualHub to which the gateway belongs. + VirtualHub *SubResource + + // READ-ONLY; The provisioning state of the P2S VPN gateway resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; All P2S VPN clients' connection health status. + VPNClientConnectionHealth *VPNClientConnectionHealth +} + +// P2SVPNProfileParameters - Vpn Client Parameters for package generation. +type P2SVPNProfileParameters struct { + // VPN client authentication method. + AuthenticationMethod *AuthenticationMethod +} + +// PacketCapture - Parameters that define the create packet capture operation. +type PacketCapture struct { + // REQUIRED; Properties of the packet capture. + Properties *PacketCaptureParameters +} + +// PacketCaptureFilter - Filter that is applied to packet capture request. Multiple filters can be applied. +type PacketCaptureFilter struct { + // Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. + // "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently + // supported. Mixing ranges with multiple entries not currently supported. Default = null. + LocalIPAddress *string + + // Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple + // ranges not currently supported. Mixing ranges with multiple entries not + // currently supported. Default = null. + LocalPort *string + + // Protocol to be filtered on. + Protocol *PcProtocol + + // Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. + // "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently + // supported. Mixing ranges with multiple entries not currently supported. Default = null. + RemoteIPAddress *string + + // Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. + // Multiple ranges not currently supported. Mixing ranges with multiple entries not + // currently supported. Default = null. + RemotePort *string +} + +// PacketCaptureListResult - List of packet capture sessions. +type PacketCaptureListResult struct { + // Information about packet capture sessions. + Value []*PacketCaptureResult +} + +// PacketCaptureMachineScope - A list of AzureVMSS instances which can be included or excluded to run packet capture. If both +// included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. +type PacketCaptureMachineScope struct { + // List of AzureVMSS instances which has to be excluded from the AzureVMSS from running packet capture. + Exclude []*string + + // List of AzureVMSS instances to run packet capture on. + Include []*string +} + +// PacketCaptureParameters - Parameters that define the create packet capture operation. +type PacketCaptureParameters struct { + // REQUIRED; The storage location for a packet capture session. + StorageLocation *PacketCaptureStorageLocation + + // REQUIRED; The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. + Target *string + + // Number of bytes captured per packet, the remaining bytes are truncated. + BytesToCapturePerPacket *int64 + + // The capture setting holds the 'FileCount', 'FileSizeInBytes', 'SessionTimeLimitInSeconds' values. + CaptureSettings *PacketCaptureSettings + + // This continuous capture is a nullable boolean, which can hold 'null', 'true' or 'false' value. If we do not pass this parameter, + // it would be consider as 'null', default value is 'null'. + ContinuousCapture *bool + + // A list of packet capture filters. + Filters []*PacketCaptureFilter + + // A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are + // empty, then the packet capture will run on all instances of AzureVMSS. + Scope *PacketCaptureMachineScope + + // Target type of the resource provided. + TargetType *PacketCaptureTargetType + + // Maximum duration of the capture session in seconds. + TimeLimitInSeconds *int32 + + // Maximum size of the capture output. + TotalBytesPerSession *int64 +} + +// PacketCaptureQueryStatusResult - Status of packet capture session. +type PacketCaptureQueryStatusResult struct { + // The start time of the packet capture session. + CaptureStartTime *time.Time + + // The ID of the packet capture resource. + ID *string + + // The name of the packet capture resource. + Name *string + + // List of errors of packet capture session. + PacketCaptureError []*PcError + + // The status of the packet capture session. + PacketCaptureStatus *PcStatus + + // The reason the current packet capture session was stopped. + StopReason *string +} + +// PacketCaptureResult - Information about packet capture session. +type PacketCaptureResult struct { + // Properties of the packet capture result. + Properties *PacketCaptureResultProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; ID of the packet capture operation. + ID *string + + // READ-ONLY; Name of the packet capture session. + Name *string +} + +// PacketCaptureResultProperties - The properties of a packet capture session. +type PacketCaptureResultProperties struct { + // REQUIRED; The storage location for a packet capture session. + StorageLocation *PacketCaptureStorageLocation + + // REQUIRED; The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. + Target *string + + // Number of bytes captured per packet, the remaining bytes are truncated. + BytesToCapturePerPacket *int64 + + // The capture setting holds the 'FileCount', 'FileSizeInBytes', 'SessionTimeLimitInSeconds' values. + CaptureSettings *PacketCaptureSettings + + // This continuous capture is a nullable boolean, which can hold 'null', 'true' or 'false' value. If we do not pass this parameter, + // it would be consider as 'null', default value is 'null'. + ContinuousCapture *bool + + // A list of packet capture filters. + Filters []*PacketCaptureFilter + + // A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are + // empty, then the packet capture will run on all instances of AzureVMSS. + Scope *PacketCaptureMachineScope + + // Target type of the resource provided. + TargetType *PacketCaptureTargetType + + // Maximum duration of the capture session in seconds. + TimeLimitInSeconds *int32 + + // Maximum size of the capture output. + TotalBytesPerSession *int64 + + // READ-ONLY; The provisioning state of the packet capture session. + ProvisioningState *ProvisioningState +} + +// PacketCaptureSettings - The storage location for a packet capture session. +type PacketCaptureSettings struct { + // Number of file count. Default value of count is 10 and maximum number is 10000. + FileCount *int32 + + // Number of bytes captured per packet. Default value in bytes 104857600 (100MB) and maximum in bytes 4294967295 (4GB). + FileSizeInBytes *int64 + + // Maximum duration of the capture session in seconds is 604800s (7 days) for a file. Default value in second 86400s (1 day). + SessionTimeLimitInSeconds *int32 +} + +// PacketCaptureStorageLocation - The storage location for a packet capture session. +type PacketCaptureStorageLocation struct { + // This path is invalid if 'Continuous Capture' is provided with 'true' or 'false'. A valid local path on the targeting VM. + // Must include the name of the capture file (*.cap). For linux virtual machine it + // must start with /var/captures. Required if no storage ID is provided, otherwise optional. + FilePath *string + + // This path is valid if 'Continuous Capture' is provided with 'true' or 'false' and required if no storage ID is provided, + // otherwise optional. Must include the name of the capture file (*.cap). For + // linux virtual machine it must start with /var/captures. + LocalPath *string + + // The ID of the storage account to save the packet capture session. Required if no localPath or filePath is provided. + StorageID *string + + // The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet + // capture. + StoragePath *string +} + +// Parameters for an Action. +type Parameter struct { + // List of AS paths. + AsPath []*string + + // List of BGP communities. + Community []*string + + // List of route prefixes. + RoutePrefix []*string +} + +// PartnerManagedResourceProperties - Properties of the partner managed resource. +type PartnerManagedResourceProperties struct { + // READ-ONLY; The partner managed resource id. + ID *string + + // READ-ONLY; The partner managed ILB resource id + InternalLoadBalancerID *string + + // READ-ONLY; The partner managed SLB resource id + StandardLoadBalancerID *string +} + +// PatchObject - Object for patch operations. +type PatchObject struct { + // Resource tags. + Tags map[string]*string +} + +// PatchRouteFilter - Route Filter Resource. +type PatchRouteFilter struct { + // Resource ID. + ID *string + + // Properties of the route filter. + Properties *RouteFilterPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PatchRouteFilterRule - Route Filter Rule Resource. +type PatchRouteFilterRule struct { + // Resource ID. + ID *string + + // Properties of the route filter rule. + Properties *RouteFilterRulePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string +} + +// PeerExpressRouteCircuitConnection - Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. +type PeerExpressRouteCircuitConnection struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the peer express route circuit connection. + Properties *PeerExpressRouteCircuitConnectionPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// PeerExpressRouteCircuitConnectionListResult - Response for ListPeeredConnections API service call retrieves all global +// reach peer circuit connections that belongs to a Private Peering for an ExpressRouteCircuit. +type PeerExpressRouteCircuitConnectionListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit. + Value []*PeerExpressRouteCircuitConnection +} + +// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection. +type PeerExpressRouteCircuitConnectionPropertiesFormat struct { + // /29 IP address space to carve out Customer addresses for tunnels. + AddressPrefix *string + + // The resource guid of the authorization used for the express route circuit connection. + AuthResourceGUID *string + + // The name of the express route circuit connection resource. + ConnectionName *string + + // Reference to Express Route Circuit Private Peering Resource of the circuit. + ExpressRouteCircuitPeering *SubResource + + // Reference to Express Route Circuit Private Peering Resource of the peered circuit. + PeerExpressRouteCircuitPeering *SubResource + + // READ-ONLY; Express Route Circuit connection state. + CircuitConnectionStatus *CircuitConnectionStatus + + // READ-ONLY; The provisioning state of the peer express route circuit connection resource. + ProvisioningState *ProvisioningState +} + +// PeerRoute - Peer routing details. +type PeerRoute struct { + // READ-ONLY; The route's AS path sequence. + AsPath *string + + // READ-ONLY; The peer's local address. + LocalAddress *string + + // READ-ONLY; The route's network prefix. + Network *string + + // READ-ONLY; The route's next hop. + NextHop *string + + // READ-ONLY; The source this route was learned from. + Origin *string + + // READ-ONLY; The peer this route was learned from. + SourcePeer *string + + // READ-ONLY; The route's weight. + Weight *int32 +} + +// PolicySettings - Defines contents of a web application firewall global configuration. +type PolicySettings struct { + // If the action type is block, customer can override the response body. The body must be specified in base64 encoding. + CustomBlockResponseBody *string + + // If the action type is block, customer can override the response status code. + CustomBlockResponseStatusCode *int32 + + // Whether allow WAF to enforce file upload limits. + FileUploadEnforcement *bool + + // Maximum file upload size in Mb for WAF. + FileUploadLimitInMb *int32 + + // Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes. + JsChallengeCookieExpirationInMins *int32 + + // To scrub sensitive log fields + LogScrubbing *PolicySettingsLogScrubbing + + // Maximum request body size in Kb for WAF. + MaxRequestBodySizeInKb *int32 + + // The mode of the policy. + Mode *WebApplicationFirewallMode + + // Whether to allow WAF to check request Body. + RequestBodyCheck *bool + + // Whether allow WAF to enforce request body limits. + RequestBodyEnforcement *bool + + // Max inspection limit in KB for request body inspection for WAF. + RequestBodyInspectLimitInKB *int32 + + // The state of the policy. + State *WebApplicationFirewallEnabledState +} + +// PolicySettingsLogScrubbing - To scrub sensitive log fields +type PolicySettingsLogScrubbing struct { + // The rules that are applied to the logs for scrubbing. + ScrubbingRules []*WebApplicationFirewallScrubbingRules + + // State of the log scrubbing config. Default value is Enabled. + State *WebApplicationFirewallScrubbingState +} + +// PoolAssociation - IpamPool association information. +type PoolAssociation struct { + // REQUIRED; Resource id of the associated Azure resource. + ResourceID *string + Description *string + + // IpamPool id for which the resource is associated to. + PoolID *string + + // READ-ONLY; List of assigned IP address prefixes in the IpamPool of the associated resource. + AddressPrefixes []*string + + // READ-ONLY; Creation time of the association. + CreatedAt *time.Time + + // READ-ONLY; Total number of reserved IP addresses of the association. + NumberOfReservedIPAddresses *string + + // READ-ONLY; Expire time for IP addresses reserved. + ReservationExpiresAt *time.Time + + // READ-ONLY; List of reserved IP address prefixes in the IpamPool of the associated resource. + ReservedPrefixes []*string + + // READ-ONLY; Total number of assigned IP addresses of the association. + TotalNumberOfIPAddresses *string +} + +// PoolAssociationList - List of PoolAssociation +type PoolAssociationList struct { + // The link used to get the next page of operations. + NextLink *string + Value []*PoolAssociation +} + +// PoolUsage - IpamPool usage information. +type PoolUsage struct { + // READ-ONLY; List of IP address prefixes of the resource. + AddressPrefixes []*string + + // READ-ONLY; List of assigned IP address prefixes. + AllocatedAddressPrefixes []*string + + // READ-ONLY; List of available IP address prefixes. + AvailableAddressPrefixes []*string + + // READ-ONLY; List of IpamPool that are children of this IpamPool. + ChildPools []*ResourceBasics + + // READ-ONLY; Total number of assigned IP addresses in the IpamPool. + NumberOfAllocatedIPAddresses *string + + // READ-ONLY; Total number of available IP addresses in the IpamPool. + NumberOfAvailableIPAddresses *string + + // READ-ONLY; Total number of reserved IP addresses in the IpamPool. + NumberOfReservedIPAddresses *string + + // READ-ONLY; List of reserved IP address prefixes. These IP addresses could be reclaimed if not assigned in the given time. + ReservedAddressPrefixes []*string + + // READ-ONLY; Total number of IP addresses managed in the IpamPool. + TotalNumberOfIPAddresses *string +} + +// PrepareNetworkPoliciesRequest - Details of PrepareNetworkPolicies for Subnet. +type PrepareNetworkPoliciesRequest struct { + // A list of NetworkIntentPolicyConfiguration. + NetworkIntentPolicyConfigurations []*IntentPolicyConfiguration + + // The name of the service for which subnet is being prepared for. + ServiceName *string +} + +// PrivateDNSZoneConfig - PrivateDnsZoneConfig resource. +type PrivateDNSZoneConfig struct { + // Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the private dns zone configuration. + Properties *PrivateDNSZonePropertiesFormat +} + +// PrivateDNSZoneGroup - Private dns zone group resource. +type PrivateDNSZoneGroup struct { + // Resource ID. + ID *string + + // Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the private dns zone group. + Properties *PrivateDNSZoneGroupPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// PrivateDNSZoneGroupListResult - Response for the ListPrivateDnsZoneGroups API service call. +type PrivateDNSZoneGroupListResult struct { + // A list of private dns zone group resources in a private endpoint. + Value []*PrivateDNSZoneGroup + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// PrivateDNSZoneGroupPropertiesFormat - Properties of the private dns zone group. +type PrivateDNSZoneGroupPropertiesFormat struct { + // A collection of private dns zone configurations of the private dns zone group. + PrivateDNSZoneConfigs []*PrivateDNSZoneConfig + + // READ-ONLY; The provisioning state of the private dns zone group resource. + ProvisioningState *ProvisioningState +} + +// PrivateDNSZonePropertiesFormat - Properties of the private dns zone configuration resource. +type PrivateDNSZonePropertiesFormat struct { + // The resource id of the private dns zone. + PrivateDNSZoneID *string + + // READ-ONLY; A collection of information regarding a recordSet, holding information to identify private resources. + RecordSets []*RecordSet +} + +// PrivateEndpoint - Private endpoint resource. +type PrivateEndpoint struct { + // The extended location of the load balancer. + ExtendedLocation *ExtendedLocation + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the private endpoint. + Properties *PrivateEndpointProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PrivateEndpointConnection resource. +type PrivateEndpointConnection struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the private end point connection. + Properties *PrivateEndpointConnectionProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; The resource type. + Type *string +} + +// PrivateEndpointConnectionListResult - Response for the ListPrivateEndpointConnection API service call. +type PrivateEndpointConnectionListResult struct { + // A list of PrivateEndpointConnection resources for a specific private link service. + Value []*PrivateEndpointConnection + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. +type PrivateEndpointConnectionProperties struct { + // A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState + + // READ-ONLY; The consumer link id. + LinkIdentifier *string + + // READ-ONLY; The resource of private end point. + PrivateEndpoint *PrivateEndpoint + + // READ-ONLY; The location of the private endpoint. + PrivateEndpointLocation *string + + // READ-ONLY; The provisioning state of the private endpoint connection resource. + ProvisioningState *ProvisioningState +} + +// PrivateEndpointIPConfiguration - An IP Configuration of the private endpoint. +type PrivateEndpointIPConfiguration struct { + // The name of the resource that is unique within a resource group. + Name *string + + // Properties of private endpoint IP configurations. + Properties *PrivateEndpointIPConfigurationProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; The resource type. + Type *string +} + +// PrivateEndpointIPConfigurationProperties - Properties of an IP Configuration of the private endpoint. +type PrivateEndpointIPConfigurationProperties struct { + // The ID of a group obtained from the remote resource that this private endpoint should connect to. + GroupID *string + + // The member name of a group obtained from the remote resource that this private endpoint should connect to. + MemberName *string + + // A private ip address obtained from the private endpoint's subnet. + PrivateIPAddress *string +} + +// PrivateEndpointListResult - Response for the ListPrivateEndpoints API service call. +type PrivateEndpointListResult struct { + // A list of private endpoint resources in a resource group. + Value []*PrivateEndpoint + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// PrivateEndpointProperties - Properties of the private endpoint. +type PrivateEndpointProperties struct { + // Application security groups in which the private endpoint IP configuration is included. + ApplicationSecurityGroups []*ApplicationSecurityGroup + + // An array of custom dns configurations. + CustomDNSConfigs []*CustomDNSConfigPropertiesFormat + + // The custom name of the network interface attached to the private endpoint. + CustomNetworkInterfaceName *string + + // A list of IP configurations of the private endpoint. This will be used to map to the First Party Service's endpoints. + IPConfigurations []*PrivateEndpointIPConfiguration + + // A grouping of information about the connection to the remote resource. Used when the network admin does not have access + // to approve connections to the remote resource. + ManualPrivateLinkServiceConnections []*PrivateLinkServiceConnection + + // A grouping of information about the connection to the remote resource. + PrivateLinkServiceConnections []*PrivateLinkServiceConnection + + // The ID of the subnet from which the private IP will be allocated. + Subnet *Subnet + + // READ-ONLY; An array of references to the network interfaces created for this private endpoint. + NetworkInterfaces []*Interface + + // READ-ONLY; The provisioning state of the private endpoint resource. + ProvisioningState *ProvisioningState +} + +// PrivateLinkService - Private link service resource. +type PrivateLinkService struct { + // The extended location of the load balancer. + ExtendedLocation *ExtendedLocation + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the private link service. + Properties *PrivateLinkServiceProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PrivateLinkServiceConnection resource. +type PrivateLinkServiceConnection struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the private link service connection. + Properties *PrivateLinkServiceConnectionProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; The resource type. + Type *string +} + +// PrivateLinkServiceConnectionProperties - Properties of the PrivateLinkServiceConnection. +type PrivateLinkServiceConnectionProperties struct { + // The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. + GroupIDs []*string + + // A collection of read-only information about the state of the connection to the remote resource. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState + + // The resource id of private link service. + PrivateLinkServiceID *string + + // A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. + RequestMessage *string + + // READ-ONLY; The provisioning state of the private link service connection resource. + ProvisioningState *ProvisioningState +} + +// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer +// and provider. +type PrivateLinkServiceConnectionState struct { + // A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *string + + // The reason for approval/rejection of the connection. + Description *string + + // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + Status *string +} + +// PrivateLinkServiceIPConfiguration - The private link service ip configuration. +type PrivateLinkServiceIPConfiguration struct { + // Resource ID. + ID *string + + // The name of private link service ip configuration. + Name *string + + // Properties of the private link service ip configuration. + Properties *PrivateLinkServiceIPConfigurationProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; The resource type. + Type *string +} + +// PrivateLinkServiceIPConfigurationProperties - Properties of private link service IP configuration. +type PrivateLinkServiceIPConfigurationProperties struct { + // Whether the ip configuration is primary or not. + Primary *bool + + // The private IP address of the IP configuration. + PrivateIPAddress *string + + // Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. + PrivateIPAddressVersion *IPVersion + + // The private IP address allocation method. + PrivateIPAllocationMethod *IPAllocationMethod + + // The reference to the subnet resource. + Subnet *Subnet + + // READ-ONLY; The provisioning state of the private link service IP configuration resource. + ProvisioningState *ProvisioningState +} + +// PrivateLinkServiceListResult - Response for the ListPrivateLinkService API service call. +type PrivateLinkServiceListResult struct { + // A list of PrivateLinkService resources in a resource group. + Value []*PrivateLinkService + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// PrivateLinkServiceProperties - Properties of the private link service. +type PrivateLinkServiceProperties struct { + // The auto-approval list of the private link service. + AutoApproval *PrivateLinkServicePropertiesAutoApproval + + // The destination IP address of the private link service. + DestinationIPAddress *string + + // Whether the private link service is enabled for proxy protocol or not. + EnableProxyProtocol *bool + + // The list of Fqdn. + Fqdns []*string + + // An array of private link service IP configurations. + IPConfigurations []*PrivateLinkServiceIPConfiguration + + // An array of references to the load balancer IP configurations. + LoadBalancerFrontendIPConfigurations []*FrontendIPConfiguration + + // The visibility list of the private link service. + Visibility *PrivateLinkServicePropertiesVisibility + + // READ-ONLY; The alias of the private link service. + Alias *string + + // READ-ONLY; An array of references to the network interfaces created for this private link service. + NetworkInterfaces []*Interface + + // READ-ONLY; An array of list about connections to the private endpoint. + PrivateEndpointConnections []*PrivateEndpointConnection + + // READ-ONLY; The provisioning state of the private link service resource. + ProvisioningState *ProvisioningState +} + +// PrivateLinkServicePropertiesAutoApproval - The auto-approval list of the private link service. +type PrivateLinkServicePropertiesAutoApproval struct { + // The list of subscriptions. + Subscriptions []*string +} + +// PrivateLinkServicePropertiesVisibility - The visibility list of the private link service. +type PrivateLinkServicePropertiesVisibility struct { + // The list of subscriptions. + Subscriptions []*string +} + +// PrivateLinkServiceVisibility - Response for the CheckPrivateLinkServiceVisibility API service call. +type PrivateLinkServiceVisibility struct { + // Private Link Service Visibility (True/False). + Visible *bool +} + +// Probe - A load balancer probe. +type Probe struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access + // the resource. + Name *string + + // Properties of load balancer probe. + Properties *ProbePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Type of the resource. + Type *string +} + +// ProbePropertiesFormat - Load balancer probe resource. +type ProbePropertiesFormat struct { + // REQUIRED; The port for communicating the probe. Possible values range from 1 to 65535, inclusive. + Port *int32 + + // REQUIRED; The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. + // If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required + // for the probe to be successful. + Protocol *ProbeProtocol + + // The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly + // less than half the allocated timeout period (in seconds) which allows two full + // probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. + IntervalInSeconds *int32 + + // Determines how new connections are handled by the load balancer when all backend instances are probed down. + NoHealthyBackendsBehavior *ProbeNoHealthyBackendsBehavior + + // The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. + // This values allows endpoints to be taken out of rotation faster or slower than + // the typical times used in Azure. + NumberOfProbes *int32 + + // The number of consecutive successful or failed probes in order to allow or deny traffic from being delivered to this endpoint. + // After failing the number of consecutive probes equal to this value, the + // endpoint will be taken out of rotation and require the same number of successful consecutive probes to be placed back in + // rotation. + ProbeThreshold *int32 + + // The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is + // not allowed. There is no default value. + RequestPath *string + + // READ-ONLY; The load balancer rules that use this probe. + LoadBalancingRules []*SubResource + + // READ-ONLY; The provisioning state of the probe resource. + ProvisioningState *ProvisioningState +} + +// Profile - Network profile resource. +type Profile struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Network profile properties. + Properties *ProfilePropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ProfileListResult - Response for ListNetworkProfiles API service call. +type ProfileListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of network profiles that exist in a resource group. + Value []*Profile +} + +// ProfilePropertiesFormat - Network profile properties. +type ProfilePropertiesFormat struct { + // List of chid container network interface configurations. + ContainerNetworkInterfaceConfigurations []*ContainerNetworkInterfaceConfiguration + + // READ-ONLY; List of child container network interfaces. + ContainerNetworkInterfaces []*ContainerNetworkInterface + + // READ-ONLY; The provisioning state of the network profile resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the network profile resource. + ResourceGUID *string +} + +// PropagatedRouteTable - The list of RouteTables to advertise the routes to. +type PropagatedRouteTable struct { + // The list of resource ids of all the RouteTables. + IDs []*SubResource + + // The list of labels. + Labels []*string +} + +// ProtocolConfiguration - Configuration of the protocol. +type ProtocolConfiguration struct { + // HTTP configuration of the connectivity check. + HTTPConfiguration *HTTPConfiguration +} + +// PublicIPAddress - Public IP address resource. +type PublicIPAddress struct { + // The extended location of the public ip address. + ExtendedLocation *ExtendedLocation + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Public IP address properties. + Properties *PublicIPAddressPropertiesFormat + + // The public IP address SKU. + SKU *PublicIPAddressSKU + + // Resource tags. + Tags map[string]*string + + // A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones []*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PublicIPAddressDNSSettings - Contains FQDN of the DNS record associated with the public IP address. +type PublicIPAddressDNSSettings struct { + // The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified + // domain name associated with the public IP address. If a domain name label is + // specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. + DomainNameLabel *string + + // The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created + // for the public IP in the Microsoft Azure DNS system with a hashed value + // includes in FQDN. + DomainNameLabelScope *PublicIPAddressDNSSettingsDomainNameLabelScope + + // The Fully Qualified Domain Name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel + // and the regionalized DNS zone. + Fqdn *string + + // The reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn + // is specified, then a PTR DNS record is created pointing from the IP address in + // the in-addr.arpa domain to the reverse FQDN. + ReverseFqdn *string +} + +// PublicIPAddressListResult - Response for ListPublicIpAddresses API service call. +type PublicIPAddressListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of public IP addresses that exists in a resource group. + Value []*PublicIPAddress +} + +// PublicIPAddressPropertiesFormat - Public IP address properties. +type PublicIPAddressPropertiesFormat struct { + // The FQDN of the DNS record associated with the public IP address. + DNSSettings *PublicIPAddressDNSSettings + + // The DDoS protection custom policy associated with the public IP address. + DdosSettings *DdosSettings + + // Specify what happens to the public IP address when the VM using it is deleted + DeleteOption *DeleteOptions + + // The IP address associated with the public IP address resource. + IPAddress *string + + // The list of tags associated with the public IP address. + IPTags []*IPTag + + // The idle timeout of the public IP address. + IdleTimeoutInMinutes *int32 + + // The linked public IP address of the public IP address resource. + LinkedPublicIPAddress *PublicIPAddress + + // Migration phase of Public IP Address. + MigrationPhase *PublicIPAddressMigrationPhase + + // The NatGateway for the Public IP address. + NatGateway *NatGateway + + // The public IP address version. + PublicIPAddressVersion *IPVersion + + // The public IP address allocation method. + PublicIPAllocationMethod *IPAllocationMethod + + // The Public IP Prefix this Public IP Address should be allocated from. + PublicIPPrefix *SubResource + + // The service public IP address of the public IP address resource. + ServicePublicIPAddress *PublicIPAddress + + // READ-ONLY; The IP configuration associated with the public IP address. + IPConfiguration *IPConfiguration + + // READ-ONLY; The provisioning state of the public IP address resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the public IP address resource. + ResourceGUID *string +} + +// PublicIPAddressSKU - SKU of a public IP address. +type PublicIPAddressSKU struct { + // Name of a public IP address SKU. + Name *PublicIPAddressSKUName + + // Tier of a public IP address SKU. + Tier *PublicIPAddressSKUTier +} + +// PublicIPDdosProtectionStatusResult - Response for GetPublicIpAddressDdosProtectionStatusOperation API service call. +type PublicIPDdosProtectionStatusResult struct { + // DDoS protection plan Resource Id of a if IP address is protected through a plan. + DdosProtectionPlanID *string + + // Value indicating whether the IP address is DDoS workload protected or not. + IsWorkloadProtected *IsWorkloadProtected + + // IP Address of the Public IP Resource + PublicIPAddress *string + + // Public IP ARM resource ID + PublicIPAddressID *string +} + +// PublicIPPrefix - Public IP prefix resource. +type PublicIPPrefix struct { + // The extended location of the public ip address. + ExtendedLocation *ExtendedLocation + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Public IP prefix properties. + Properties *PublicIPPrefixPropertiesFormat + + // The public IP prefix SKU. + SKU *PublicIPPrefixSKU + + // Resource tags. + Tags map[string]*string + + // A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones []*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// PublicIPPrefixListResult - Response for ListPublicIpPrefixes API service call. +type PublicIPPrefixListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of public IP prefixes that exists in a resource group. + Value []*PublicIPPrefix +} + +// PublicIPPrefixPropertiesFormat - Public IP prefix properties. +type PublicIPPrefixPropertiesFormat struct { + // The customIpPrefix that this prefix is associated with. + CustomIPPrefix *SubResource + + // The list of tags associated with the public IP prefix. + IPTags []*IPTag + + // NatGateway of Public IP Prefix. + NatGateway *NatGateway + + // The Length of the Public IP Prefix. + PrefixLength *int32 + + // The public IP address version. + PublicIPAddressVersion *IPVersion + + // READ-ONLY; The allocated Prefix. + IPPrefix *string + + // READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix. + LoadBalancerFrontendIPConfiguration *SubResource + + // READ-ONLY; The provisioning state of the public IP prefix resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The list of all referenced PublicIPAddresses. + PublicIPAddresses []*ReferencedPublicIPAddress + + // READ-ONLY; The resource GUID property of the public IP prefix resource. + ResourceGUID *string +} + +// PublicIPPrefixSKU - SKU of a public IP prefix. +type PublicIPPrefixSKU struct { + // Name of a public IP prefix SKU. + Name *PublicIPPrefixSKUName + + // Tier of a public IP prefix SKU. + Tier *PublicIPPrefixSKUTier +} + +// QosDefinition - Quality of Service defines the traffic configuration between endpoints. Mandatory to have one marking. +type QosDefinition struct { + // Destination IP ranges. + DestinationIPRanges []*QosIPRange + + // Destination port ranges. + DestinationPortRanges []*QosPortRange + + // List of markings to be used in the configuration. + Markings []*int32 + + // RNM supported protocol types. + Protocol *ProtocolType + + // Source IP ranges. + SourceIPRanges []*QosIPRange + + // Sources port ranges. + SourcePortRanges []*QosPortRange +} + +// QosIPRange - Qos Traffic Profiler IP Range properties. +type QosIPRange struct { + // End IP Address. + EndIP *string + + // Start IP Address. + StartIP *string +} + +// QosPortRange - Qos Traffic Profiler Port range properties. +type QosPortRange struct { + // Qos Port Range end. + End *int32 + + // Qos Port Range start. + Start *int32 +} + +// QueryInboundNatRulePortMappingRequest - The request for a QueryInboundNatRulePortMapping API. Either IpConfiguration or +// IpAddress should be set +type QueryInboundNatRulePortMappingRequest struct { + // IP address set in load balancer backend address. + IPAddress *string + + // NetworkInterfaceIPConfiguration set in load balancer backend address. + IPConfiguration *SubResource +} + +// QueryRequestOptions - Query Request Options +type QueryRequestOptions struct { + // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current + // request) to retrieve the next page of data. + SkipToken *string +} + +// QueryResults - Query result +type QueryResults struct { + // Number of total records matching the query. + MatchingRecordsCount *int64 + + // Array containing the results of the query + Signatures []*SingleQueryResult +} + +// QueryTroubleshootingParameters - Parameters that define the resource to query the troubleshooting result. +type QueryTroubleshootingParameters struct { + // REQUIRED; The target resource ID to query the troubleshooting result. + TargetResourceID *string +} + +// RadiusServer - Radius Server Settings. +type RadiusServer struct { + // REQUIRED; The address of this radius server. + RadiusServerAddress *string + + // The initial score assigned to this radius server. + RadiusServerScore *int64 + + // The secret used for this radius server. + RadiusServerSecret *string +} + +// ReachabilityAnalysisIntent - Configuration information or intent on which to do the analysis on. +type ReachabilityAnalysisIntent struct { + // REQUIRED; Represents the Reachability Analysis Intent properties. + Properties *ReachabilityAnalysisIntentProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ReachabilityAnalysisIntentListResult - A list of Reachability Analysis Intents. +type ReachabilityAnalysisIntentListResult struct { + // Gets the URL to get the next page of results. + NextLink *string + + // Gets a page of Reachability Analysis Intents + Value []*ReachabilityAnalysisIntent +} + +// ReachabilityAnalysisIntentProperties - Represents the Reachability Analysis Intent properties. +type ReachabilityAnalysisIntentProperties struct { + // REQUIRED; Destination resource id to verify the reachability path of. + DestinationResourceID *string + + // REQUIRED; IP traffic information. + IPTraffic *IPTraffic + + // REQUIRED; Source resource id to verify the reachability path of. + SourceResourceID *string + Description *string + + // Provisioning states of a resource. + ProvisioningState *ProvisioningState +} + +// ReachabilityAnalysisRun - Configuration information for analysis run. +type ReachabilityAnalysisRun struct { + // REQUIRED; Represents the Reachability Analysis Run properties. + Properties *ReachabilityAnalysisRunProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ReachabilityAnalysisRunListResult - A list of Reachability Analysis Run +type ReachabilityAnalysisRunListResult struct { + // Gets the URL to get the next page of results. + NextLink *string + + // Gets a page of Reachability Analysis Runs. + Value []*ReachabilityAnalysisRun +} + +// ReachabilityAnalysisRunProperties - Represents the Reachability Analysis Run properties. +type ReachabilityAnalysisRunProperties struct { + // REQUIRED; Id of the intent resource to run analysis on. + IntentID *string + Description *string + + // Provisioning states of a resource. + ProvisioningState *ProvisioningState + + // READ-ONLY + AnalysisResult *string + + // READ-ONLY + ErrorMessage *string + + // READ-ONLY; Intent information. + IntentContent *IntentContent +} + +// RecordSet - A collective group of information about the record set information. +type RecordSet struct { + // Fqdn that resolves to private endpoint ip address. + Fqdn *string + + // The private ip address of the private endpoint. + IPAddresses []*string + + // Recordset name. + RecordSetName *string + + // Resource record type. + RecordType *string + + // Recordset time to live. + TTL *int32 + + // READ-ONLY; The provisioning state of the recordset. + ProvisioningState *ProvisioningState +} + +// ReferencedPublicIPAddress - Reference to a public IP address. +type ReferencedPublicIPAddress struct { + // The PublicIPAddress Reference. + ID *string +} + +// Resource - Common resource representation. +type Resource struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ResourceBasics - Representation of basic resource information. +type ResourceBasics struct { + // List of IP address prefixes of the resource. + AddressPrefixes []*string + + // ResourceId of the Azure resource. + ResourceID *string +} + +// ResourceNavigationLink resource. +type ResourceNavigationLink struct { + // Resource ID. + ID *string + + // Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Resource navigation link properties format. + Properties *ResourceNavigationLinkFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource type. + Type *string +} + +// ResourceNavigationLinkFormat - Properties of ResourceNavigationLink. +type ResourceNavigationLinkFormat struct { + // Link to the external resource. + Link *string + + // Resource type of the linked resource. + LinkedResourceType *string + + // READ-ONLY; The provisioning state of the resource navigation link resource. + ProvisioningState *ProvisioningState +} + +// ResourceNavigationLinksListResult - Response for ResourceNavigationLinks_List operation. +type ResourceNavigationLinksListResult struct { + // The resource navigation links in a subnet. + Value []*ResourceNavigationLink + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// ResourceSet - The base resource set for visibility and auto-approval. +type ResourceSet struct { + // The list of subscriptions. + Subscriptions []*string +} + +// RetentionPolicyParameters - Parameters that define the retention policy for flow log. +type RetentionPolicyParameters struct { + // Number of days to retain flow log records. + Days *int32 + + // Flag to enable/disable retention. + Enabled *bool +} + +// Route resource. +type Route struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the route. + Properties *RoutePropertiesFormat + + // The type of the resource. + Type *string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// RouteFilter - Route Filter Resource. +type RouteFilter struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the route filter. + Properties *RouteFilterPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RouteFilterListResult - Response for the ListRouteFilters API service call. +type RouteFilterListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of route filters in a resource group. + Value []*RouteFilter +} + +// RouteFilterPropertiesFormat - Route Filter Resource. +type RouteFilterPropertiesFormat struct { + // Collection of RouteFilterRules contained within a route filter. + Rules []*RouteFilterRule + + // READ-ONLY; A collection of references to express route circuit ipv6 peerings. + IPv6Peerings []*ExpressRouteCircuitPeering + + // READ-ONLY; A collection of references to express route circuit peerings. + Peerings []*ExpressRouteCircuitPeering + + // READ-ONLY; The provisioning state of the route filter resource. + ProvisioningState *ProvisioningState +} + +// RouteFilterRule - Route Filter Rule Resource. +type RouteFilterRule struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the route filter rule. + Properties *RouteFilterRulePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// RouteFilterRuleListResult - Response for the ListRouteFilterRules API service call. +type RouteFilterRuleListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of RouteFilterRules in a resource group. + Value []*RouteFilterRule +} + +// RouteFilterRulePropertiesFormat - Route Filter Rule Resource. +type RouteFilterRulePropertiesFormat struct { + // REQUIRED; The access type of the rule. + Access *Access + + // REQUIRED; The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. + Communities []*string + + // REQUIRED; The rule type of the rule. + RouteFilterRuleType *RouteFilterRuleType + + // READ-ONLY; The provisioning state of the route filter rule resource. + ProvisioningState *ProvisioningState +} + +// RouteListResult - Response for the ListRoute API service call. +type RouteListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of routes in a resource group. + Value []*Route +} + +// RouteMap - The RouteMap child resource of a Virtual hub. +type RouteMap struct { + // Resource ID. + ID *string + + // Properties of the RouteMap resource. + Properties *RouteMapProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RouteMapProperties - Properties of RouteMap resource +type RouteMapProperties struct { + // List of connections which have this RoutMap associated for inbound traffic. + AssociatedInboundConnections []*string + + // List of connections which have this RoutMap associated for outbound traffic. + AssociatedOutboundConnections []*string + + // List of RouteMap rules to be applied. + Rules []*RouteMapRule + + // READ-ONLY; The provisioning state of the RouteMap resource. + ProvisioningState *ProvisioningState +} + +// RouteMapRule - A RouteMap Rule. +type RouteMapRule struct { + // List of actions which will be applied on a match. + Actions []*Action + + // List of matching criterion which will be applied to traffic. + MatchCriteria []*Criterion + + // The unique name for the rule. + Name *string + + // Next step after rule is evaluated. Current supported behaviors are 'Continue'(to next rule) and 'Terminate'. + NextStepIfMatched *NextStep +} + +// RoutePropertiesFormat - Route resource. +type RoutePropertiesFormat struct { + // REQUIRED; The type of Azure hop the packet should be sent to. + NextHopType *RouteNextHopType + + // The destination CIDR to which the route applies. + AddressPrefix *string + + // The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. + NextHopIPAddress *string + + // READ-ONLY; A value indicating whether this route overrides overlapping BGP routes regardless of LPM. + HasBgpOverride *bool + + // READ-ONLY; The provisioning state of the route resource. + ProvisioningState *ProvisioningState +} + +// RouteTable - Route table resource. +type RouteTable struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the route table. + Properties *RouteTablePropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// RouteTableListResult - Response for the ListRouteTable API service call. +type RouteTableListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of route tables in a resource group. + Value []*RouteTable +} + +// RouteTablePropertiesFormat - Route Table resource. +type RouteTablePropertiesFormat struct { + // Whether to disable the routes learned by BGP on that route table. True means disable. + DisableBgpRoutePropagation *bool + + // Collection of routes contained within a route table. + Routes []*Route + + // READ-ONLY; The provisioning state of the route table resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the route table. + ResourceGUID *string + + // READ-ONLY; A collection of references to subnets. + Subnets []*Subnet +} + +// RoutingConfiguration - Routing Configuration indicating the associated and propagated route tables for this connection. +type RoutingConfiguration struct { + // The resource id RouteTable associated with this RoutingConfiguration. + AssociatedRouteTable *SubResource + + // The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes. + InboundRouteMap *SubResource + + // The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes. + OutboundRouteMap *SubResource + + // The list of RouteTables to advertise the routes to. + PropagatedRouteTables *PropagatedRouteTable + + // List of routes that control routing from VirtualHub into a virtual network connection. + VnetRoutes *VnetRoute +} + +// RoutingIntent - The routing intent child resource of a Virtual hub. +type RoutingIntent struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the RoutingIntent resource. + Properties *RoutingIntentProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource type. + Type *string +} + +// RoutingIntentProperties - The properties of a RoutingIntent resource. +type RoutingIntentProperties struct { + // List of routing policies. + RoutingPolicies []*RoutingPolicy + + // READ-ONLY; The provisioning state of the RoutingIntent resource. + ProvisioningState *ProvisioningState +} + +// RoutingPolicy - The routing policy object used in a RoutingIntent resource. +type RoutingPolicy struct { + // REQUIRED; List of all destinations which this routing policy is applicable to (for example: Internet, PrivateTraffic). + Destinations []*string + + // REQUIRED; The unique name for the routing policy. + Name *string + + // REQUIRED; The next hop resource id on which this routing policy is applicable to. + NextHop *string +} + +// RoutingRule - Network routing rule. +type RoutingRule struct { + // Indicates the properties of the routing rule + Properties *RoutingRulePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// RoutingRuleCollection - Defines the routing rule collection. +type RoutingRuleCollection struct { + // Indicates the properties for the network manager routing rule collection. + Properties *RoutingRuleCollectionPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// RoutingRuleCollectionListResult - Routing configuration rule collection list result. +type RoutingRuleCollectionListResult struct { + // Gets the URL to get the next set of results. + NextLink *string + + // A list of network manager routing configuration rule collections + Value []*RoutingRuleCollection +} + +// RoutingRuleCollectionPropertiesFormat - Defines the routing rule collection properties. +type RoutingRuleCollectionPropertiesFormat struct { + // REQUIRED; Groups for configuration + AppliesTo []*ManagerRoutingGroupItem + + // A description of the routing rule collection. + Description *string + + // Determines whether BGP route propagation is enabled. Defaults to true. + DisableBgpRoutePropagation *DisableBgpRoutePropagation + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// RoutingRuleListResult - Routing configuration rule list result. +type RoutingRuleListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of routing rules. + Value []*RoutingRule +} + +// RoutingRuleNextHop - Next hop. +type RoutingRuleNextHop struct { + // REQUIRED; Next hop type. + NextHopType *RoutingRuleNextHopType + + // Next hop address. Only required if the next hop type is VirtualAppliance. + NextHopAddress *string +} + +// RoutingRulePropertiesFormat - Routing rule resource. +type RoutingRulePropertiesFormat struct { + // REQUIRED; Indicates the destination for this particular rule. + Destination *RoutingRuleRouteDestination + + // REQUIRED; Indicates the next hop for this particular rule. + NextHop *RoutingRuleNextHop + + // A description for this rule. + Description *string + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// RoutingRuleRouteDestination - Route destination. +type RoutingRuleRouteDestination struct { + // REQUIRED; Destination address. + DestinationAddress *string + + // REQUIRED; Destination type. + Type *RoutingRuleDestinationType +} + +// Rule of type network. +type Rule struct { + // REQUIRED; Rule Type. + RuleType *FirewallPolicyRuleType + + // Description of the rule. + Description *string + + // List of destination IP addresses or Service Tags. + DestinationAddresses []*string + + // List of destination FQDNs. + DestinationFqdns []*string + + // List of destination IpGroups for this rule. + DestinationIPGroups []*string + + // List of destination ports. + DestinationPorts []*string + + // Array of FirewallPolicyRuleNetworkProtocols. + IPProtocols []*FirewallPolicyRuleNetworkProtocol + + // Name of the rule. + Name *string + + // List of source IP addresses for this rule. + SourceAddresses []*string + + // List of source IpGroups for this rule. + SourceIPGroups []*string +} + +// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type Rule. +func (r *Rule) GetFirewallPolicyRule() *FirewallPolicyRule { + return &FirewallPolicyRule{ + Description: r.Description, + Name: r.Name, + RuleType: r.RuleType, + } +} + +// SKU - The sku of this Bastion Host. +type SKU struct { + // The name of the sku of this Bastion Host. + Name *BastionHostSKUName +} + +// ScopeConnection - The Scope Connections resource +type ScopeConnection struct { + // The scope connection properties + Properties *ScopeConnectionProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// ScopeConnectionListResult - List of scope connections. +type ScopeConnectionListResult struct { + // Gets the URL to get the next page of results. + NextLink *string + + // List of scope connections. + Value []*ScopeConnection +} + +// ScopeConnectionProperties - Scope connection. +type ScopeConnectionProperties struct { + // A description of the scope connection. + Description *string + + // Resource ID. + ResourceID *string + + // Tenant ID. + TenantID *string + + // READ-ONLY; Connection State + ConnectionState *ScopeConnectionState +} + +// SecurityAdminConfiguration - Defines the security admin configuration +type SecurityAdminConfiguration struct { + // Indicates the properties for the network manager security admin configuration. + Properties *SecurityAdminConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// SecurityAdminConfigurationListResult - A list of network manager security admin configurations +type SecurityAdminConfigurationListResult struct { + // Gets the URL to get the next page of results. + NextLink *string + + // Gets a page of security admin configurations + Value []*SecurityAdminConfiguration +} + +// SecurityAdminConfigurationPropertiesFormat - Defines the security admin configuration properties. +type SecurityAdminConfigurationPropertiesFormat struct { + // Enum list of network intent policy based services. + ApplyOnNetworkIntentPolicyBasedServices []*NetworkIntentPolicyBasedService + + // A description of the security configuration. + Description *string + + // Determine update behavior for changes to network groups referenced within the rules in this configuration. + NetworkGroupAddressSpaceAggregationOption *AddressSpaceAggregationOption + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// SecurityGroup - NetworkSecurityGroup resource. +type SecurityGroup struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the network security group. + Properties *SecurityGroupPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SecurityGroupListResult - Response for ListNetworkSecurityGroups API service call. +type SecurityGroupListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of NetworkSecurityGroup resources. + Value []*SecurityGroup +} + +// SecurityGroupNetworkInterface - Network interface and all its associated security rules. +type SecurityGroupNetworkInterface struct { + // ID of the network interface. + ID *string + + // All security rules associated with the network interface. + SecurityRuleAssociations *SecurityRuleAssociations +} + +// SecurityGroupPropertiesFormat - Network Security Group resource. +type SecurityGroupPropertiesFormat struct { + // When enabled, flows created from Network Security Group connections will be re-evaluated when rules are updates. Initial + // enablement will trigger re-evaluation. + FlushConnection *bool + + // A collection of security rules of the network security group. + SecurityRules []*SecurityRule + + // READ-ONLY; The default security rules of network security group. + DefaultSecurityRules []*SecurityRule + + // READ-ONLY; A collection of references to flow log resources. + FlowLogs []*FlowLog + + // READ-ONLY; A collection of references to network interfaces. + NetworkInterfaces []*Interface + + // READ-ONLY; The provisioning state of the network security group resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the network security group resource. + ResourceGUID *string + + // READ-ONLY; A collection of references to subnets. + Subnets []*Subnet +} + +// SecurityGroupResult - Network configuration diagnostic result corresponded provided traffic query. +type SecurityGroupResult struct { + // The network traffic is allowed or denied. + SecurityRuleAccessResult *SecurityRuleAccess + + // READ-ONLY; List of results network security groups diagnostic. + EvaluatedNetworkSecurityGroups []*EvaluatedNetworkSecurityGroup +} + +// SecurityGroupViewParameters - Parameters that define the VM to check security groups for. +type SecurityGroupViewParameters struct { + // REQUIRED; ID of the target VM. + TargetResourceID *string +} + +// SecurityGroupViewResult - The information about security rules applied to the specified VM. +type SecurityGroupViewResult struct { + // List of network interfaces on the specified VM. + NetworkInterfaces []*SecurityGroupNetworkInterface +} + +// SecurityPartnerProvider - Security Partner Provider resource. +type SecurityPartnerProvider struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the Security Partner Provider. + Properties *SecurityPartnerProviderPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SecurityPartnerProviderListResult - Response for ListSecurityPartnerProviders API service call. +type SecurityPartnerProviderListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of Security Partner Providers in a resource group. + Value []*SecurityPartnerProvider +} + +// SecurityPartnerProviderPropertiesFormat - Properties of the Security Partner Provider. +type SecurityPartnerProviderPropertiesFormat struct { + // The security provider name. + SecurityProviderName *SecurityProviderName + + // The virtualHub to which the Security Partner Provider belongs. + VirtualHub *SubResource + + // READ-ONLY; The connection status with the Security Partner Provider. + ConnectionStatus *SecurityPartnerProviderConnectionStatus + + // READ-ONLY; The provisioning state of the Security Partner Provider resource. + ProvisioningState *ProvisioningState +} + +// SecurityRule - Network security rule. +type SecurityRule struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the security rule. + Properties *SecurityRulePropertiesFormat + + // The type of the resource. + Type *string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// SecurityRuleAssociations - All security rules associated with the network interface. +type SecurityRuleAssociations struct { + // Collection of default security rules of the network security group. + DefaultSecurityRules []*SecurityRule + + // Collection of effective security rules. + EffectiveSecurityRules []*EffectiveNetworkSecurityRule + + // Network interface and it's custom security rules. + NetworkInterfaceAssociation *InterfaceAssociation + + // Subnet and it's custom security rules. + SubnetAssociation *SubnetAssociation +} + +// SecurityRuleListResult - Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a +// network security group. +type SecurityRuleListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The security rules in a network security group. + Value []*SecurityRule +} + +// SecurityRulePropertiesFormat - Security rule resource. +type SecurityRulePropertiesFormat struct { + // REQUIRED; The network traffic is allowed or denied. + Access *SecurityRuleAccess + + // REQUIRED; The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. + Direction *SecurityRuleDirection + + // REQUIRED; The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each + // rule in the collection. The lower the priority number, the higher the priority of the rule. + Priority *int32 + + // REQUIRED; Network protocol this rule applies to. + Protocol *SecurityRuleProtocol + + // A description for this rule. Restricted to 140 chars. + Description *string + + // The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default + // tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also + // be used. + DestinationAddressPrefix *string + + // The destination address prefixes. CIDR or destination IP ranges. + DestinationAddressPrefixes []*string + + // The application security group specified as destination. + DestinationApplicationSecurityGroups []*ApplicationSecurityGroup + + // The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. + DestinationPortRange *string + + // The destination port ranges. + DestinationPortRanges []*string + + // The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', + // 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress + // rule, specifies where network traffic originates from. + SourceAddressPrefix *string + + // The CIDR or source IP ranges. + SourceAddressPrefixes []*string + + // The application security group specified as source. + SourceApplicationSecurityGroups []*ApplicationSecurityGroup + + // The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. + SourcePortRange *string + + // The source port ranges. + SourcePortRanges []*string + + // READ-ONLY; The provisioning state of the security rule resource. + ProvisioningState *ProvisioningState +} + +// SecurityRulesEvaluationResult - Network security rules evaluation result. +type SecurityRulesEvaluationResult struct { + // Value indicating whether destination is matched. + DestinationMatched *bool + + // Value indicating whether destination port is matched. + DestinationPortMatched *bool + + // Name of the network security rule. + Name *string + + // Value indicating whether protocol is matched. + ProtocolMatched *bool + + // Value indicating whether source is matched. + SourceMatched *bool + + // Value indicating whether source port is matched. + SourcePortMatched *bool +} + +// SecurityUserConfiguration - Defines the security user configuration +type SecurityUserConfiguration struct { + // Indicates the properties for the network manager security user configuration. + Properties *SecurityUserConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// SecurityUserConfigurationListResult - A list of network manager security user configurations +type SecurityUserConfigurationListResult struct { + // Gets the URL to get the next page of results. + NextLink *string + + // Gets a page of security user configurations + Value []*SecurityUserConfiguration +} + +// SecurityUserConfigurationPropertiesFormat - Defines the security user configuration properties. +type SecurityUserConfigurationPropertiesFormat struct { + // A description of the security user configuration. + Description *string + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// SecurityUserGroupItem - Network manager security user group item. +type SecurityUserGroupItem struct { + // REQUIRED; Network manager group Id. + NetworkGroupID *string +} + +// SecurityUserRule - Network security user rule. +type SecurityUserRule struct { + // Indicates the properties of the security user rule + Properties *SecurityUserRulePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// SecurityUserRuleCollection - Defines the security user rule collection. +type SecurityUserRuleCollection struct { + // Indicates the properties for the network manager security user rule collection. + Properties *SecurityUserRuleCollectionPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// SecurityUserRuleCollectionListResult - Security user configuration rule collection list result. +type SecurityUserRuleCollectionListResult struct { + // Gets the URL to get the next set of results. + NextLink *string + + // A list of network manager security user configuration rule collections + Value []*SecurityUserRuleCollection +} + +// SecurityUserRuleCollectionPropertiesFormat - Defines the security user rule collection properties. +type SecurityUserRuleCollectionPropertiesFormat struct { + // REQUIRED; Groups for configuration + AppliesToGroups []*SecurityUserGroupItem + + // A description of the security user rule collection. + Description *string + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// SecurityUserRuleListResult - security user rule list result. +type SecurityUserRuleListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of security user rules + Value []*SecurityUserRule +} + +// SecurityUserRulePropertiesFormat - Security rule resource. +type SecurityUserRulePropertiesFormat struct { + // REQUIRED; Indicates if the traffic matched against the rule in inbound or outbound. + Direction *SecurityConfigurationRuleDirection + + // REQUIRED; Network protocol this rule applies to. + Protocol *SecurityConfigurationRuleProtocol + + // A description for this rule. + Description *string + + // The destination port ranges. + DestinationPortRanges []*string + + // The destination address prefixes. CIDR or destination IP ranges. + Destinations []*AddressPrefixItem + + // The source port ranges. + SourcePortRanges []*string + + // The CIDR or source IP ranges. + Sources []*AddressPrefixItem + + // READ-ONLY; The provisioning state of the security configuration user rule resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Unique identifier for this resource. + ResourceGUID *string +} + +// ServiceAssociationLink resource. +type ServiceAssociationLink struct { + // Resource ID. + ID *string + + // Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Resource navigation link properties format. + Properties *ServiceAssociationLinkPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServiceAssociationLinkPropertiesFormat - Properties of ServiceAssociationLink. +type ServiceAssociationLinkPropertiesFormat struct { + // If true, the resource can be deleted. + AllowDelete *bool + + // Link to the external resource. + Link *string + + // Resource type of the linked resource. + LinkedResourceType *string + + // A list of locations. + Locations []*string + + // READ-ONLY; The provisioning state of the service association link resource. + ProvisioningState *ProvisioningState +} + +// ServiceAssociationLinksListResult - Response for ServiceAssociationLinks_List operation. +type ServiceAssociationLinksListResult struct { + // The service association links in a subnet. + Value []*ServiceAssociationLink + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// ServiceDelegationPropertiesFormat - Properties of a service delegation. +type ServiceDelegationPropertiesFormat struct { + // The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). + ServiceName *string + + // READ-ONLY; The actions permitted to the service upon delegation. + Actions []*string + + // READ-ONLY; The provisioning state of the service delegation resource. + ProvisioningState *ProvisioningState +} + +// ServiceEndpointPolicy - Service End point policy resource. +type ServiceEndpointPolicy struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the service end point policy. + Properties *ServiceEndpointPolicyPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Kind of service endpoint policy. This is metadata used for the Azure portal experience. + Kind *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// ServiceEndpointPolicyDefinition - Service Endpoint policy definitions. +type ServiceEndpointPolicyDefinition struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the service endpoint policy definition. + Properties *ServiceEndpointPolicyDefinitionPropertiesFormat + + // The type of the resource. + Type *string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// ServiceEndpointPolicyDefinitionListResult - Response for ListServiceEndpointPolicyDefinition API service call. Retrieves +// all service endpoint policy definition that belongs to a service endpoint policy. +type ServiceEndpointPolicyDefinitionListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The service endpoint policy definition in a service endpoint policy. + Value []*ServiceEndpointPolicyDefinition +} + +// ServiceEndpointPolicyDefinitionPropertiesFormat - Service Endpoint policy definition resource. +type ServiceEndpointPolicyDefinitionPropertiesFormat struct { + // A description for this rule. Restricted to 140 chars. + Description *string + + // Service endpoint name. + Service *string + + // A list of service resources. + ServiceResources []*string + + // READ-ONLY; The provisioning state of the service endpoint policy definition resource. + ProvisioningState *ProvisioningState +} + +// ServiceEndpointPolicyListResult - Response for ListServiceEndpointPolicies API service call. +type ServiceEndpointPolicyListResult struct { + // A list of ServiceEndpointPolicy resources. + Value []*ServiceEndpointPolicy + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// ServiceEndpointPolicyPropertiesFormat - Service Endpoint Policy resource. +type ServiceEndpointPolicyPropertiesFormat struct { + // A collection of contextual service endpoint policy. + ContextualServiceEndpointPolicies []*string + + // The alias indicating if the policy belongs to a service + ServiceAlias *string + + // A collection of service endpoint policy definitions of the service endpoint policy. + ServiceEndpointPolicyDefinitions []*ServiceEndpointPolicyDefinition + + // READ-ONLY; The provisioning state of the service endpoint policy resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the service endpoint policy resource. + ResourceGUID *string + + // READ-ONLY; A collection of references to subnets. + Subnets []*Subnet +} + +// ServiceEndpointPropertiesFormat - The service endpoint properties. +type ServiceEndpointPropertiesFormat struct { + // A list of locations. + Locations []*string + + // SubResource as network identifier. + NetworkIdentifier *SubResource + + // The type of the endpoint service. + Service *string + + // READ-ONLY; The provisioning state of the service endpoint resource. + ProvisioningState *ProvisioningState +} + +// ServiceTagInformation - The service tag information. +type ServiceTagInformation struct { + // READ-ONLY; The ID of service tag. + ID *string + + // READ-ONLY; The name of service tag. + Name *string + + // READ-ONLY; Properties of the service tag information. + Properties *ServiceTagInformationPropertiesFormat + + // READ-ONLY; The iteration number of service tag object for region. + ServiceTagChangeNumber *string +} + +// ServiceTagInformationListResult - Response for Get ServiceTagInformation API service call. Retrieves the list of service +// tag information resources. +type ServiceTagInformationListResult struct { + // The list of service tag information resources. + Value []*ServiceTagInformation + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// ServiceTagInformationPropertiesFormat - Properties of the service tag information. +type ServiceTagInformationPropertiesFormat struct { + // READ-ONLY; The list of IP address prefixes. + AddressPrefixes []*string + + // READ-ONLY; The iteration number of service tag. + ChangeNumber *string + + // READ-ONLY; The region of service tag. + Region *string + + // READ-ONLY; The state of the service tag. + State *string + + // READ-ONLY; The name of system service. + SystemService *string +} + +// ServiceTagsListResult - Response for the ListServiceTags API service call. +type ServiceTagsListResult struct { + // READ-ONLY; The iteration number. + ChangeNumber *string + + // READ-ONLY; The name of the cloud. + Cloud *string + + // READ-ONLY; The ID of the cloud. + ID *string + + // READ-ONLY; The name of the cloud. + Name *string + + // READ-ONLY; The URL to get next page of service tag information resources. + NextLink *string + + // READ-ONLY; The azure resource type. + Type *string + + // READ-ONLY; The list of service tag information resources. + Values []*ServiceTagInformation +} + +// SessionIDs - List of session IDs. +type SessionIDs struct { + // List of session IDs. + SessionIDs []*string +} + +// SharedKeyProperties - Parameters for SharedKey. +type SharedKeyProperties struct { + // The value of the shared key for the vpn link connection. + SharedKey *string + + // The length of the shared key for the vpn link connection. + SharedKeyLength *int32 + + // READ-ONLY; The provisioning state of the SharedKey resource. + ProvisioningState *ProvisioningState +} + +// SignatureOverridesFilterValuesQuery - Describes the filter values possibles for a given column +type SignatureOverridesFilterValuesQuery struct { + // Describes the name of the column which values will be returned + FilterName *string +} + +// SignatureOverridesFilterValuesResponse - Describes the list of all possible values for a specific filter value +type SignatureOverridesFilterValuesResponse struct { + // Describes the possible values + FilterValues []*string +} + +// SignaturesOverrides - Contains all specific policy signatures overrides for the IDPS +type SignaturesOverrides struct { + // Will contain the resource id of the signature override resource + ID *string + + // Contains the name of the resource (default) + Name *string + + // Will contain the properties of the resource (the actual signature overrides) + Properties *SignaturesOverridesProperties + + // Will contain the type of the resource: Microsoft.Network/firewallPolicies/intrusionDetectionSignaturesOverrides + Type *string +} + +// SignaturesOverridesList - Describes an object containing an array with a single item +type SignaturesOverridesList struct { + // Describes a list consisting exactly one item describing the policy's signature override status + Value []*SignaturesOverrides +} + +// SignaturesOverridesProperties - Will contain the properties of the resource (the actual signature overrides) +type SignaturesOverridesProperties struct { + // Dictionary of + Signatures map[string]*string +} + +type SingleQueryResult struct { + // Describes what is the signature enforces + Description *string + + // Describes the list of destination ports related to this signature + DestinationPorts []*string + + // Describes in which direction signature is being enforced: 0 - OutBound, 1 - InBound, 2 - Any, 3 - Internal, 4 - InternalOutbound, + // 5 - InternalInbound + Direction *FirewallPolicyIDPSSignatureDirection + + // Describes the groups the signature belongs to + Group *string + + // Describes if this override is inherited from base policy or not + InheritedFromParentPolicy *bool + + // Describes the last updated time of the signature (provided from 3rd party vendor) + LastUpdated *string + + // The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny + Mode *FirewallPolicyIDPSSignatureMode + + // Describes the protocol the signatures is being enforced in + Protocol *string + + // Describes the severity of signature: 1 - High, 2 - Medium, 3 - Low + Severity *FirewallPolicyIDPSSignatureSeverity + + // The ID of the signature + SignatureID *int32 + + // Describes the list of source ports related to this signature + SourcePorts []*string +} + +// StaticCidr - Instance of StaticCidr resource. +type StaticCidr struct { + // Properties of static CIDR resource. + Properties *StaticCidrProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// StaticCidrList - List of StaticCidr +type StaticCidrList struct { + // The link used to get the next page of operations. + NextLink *string + Value []*StaticCidr +} + +// StaticCidrProperties - Properties of static CIDR resource. +type StaticCidrProperties struct { + // List of IP address prefixes of the resource. + AddressPrefixes []*string + Description *string + + // Number of IP addresses to allocate for a static CIDR resource. The IP addresses will be assigned based on IpamPools available + // space. + NumberOfIPAddressesToAllocate *string + + // Provisioning states of a resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Total number of IP addresses allocated for the static CIDR resource. + TotalNumberOfIPAddresses *string +} + +// StaticMember Item. +type StaticMember struct { + // The Static Member properties + Properties *StaticMemberProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Resource type. + Type *string +} + +// StaticMemberListResult - Result of the request to list StaticMember. It contains a list of groups and a URL link to get +// the next set of results. +type StaticMemberListResult struct { + // Gets the URL to get the next set of results. + NextLink *string + + // Gets a page of StaticMember + Value []*StaticMember +} + +// StaticMemberProperties - Properties of static member. +type StaticMemberProperties struct { + // Resource Id. + ResourceID *string + + // READ-ONLY; The provisioning state of the scope assignment resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Resource region. + Region *string +} + +// StaticRoute - List of all Static Routes. +type StaticRoute struct { + // List of all address prefixes. + AddressPrefixes []*string + + // The name of the StaticRoute that is unique within a VnetRoute. + Name *string + + // The ip address of the next hop. + NextHopIPAddress *string +} + +// StaticRoutesConfig - Configuration for static routes on this HubVnetConnectionConfiguration for static routes on this HubVnetConnection. +type StaticRoutesConfig struct { + // Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke. + VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria + + // READ-ONLY; Boolean indicating whether static routes on this connection are automatically propagate to route tables which + // this connection propagates to. + PropagateStaticRoutes *bool +} + +// SubResource - Reference to another subresource. +type SubResource struct { + // Resource ID. + ID *string +} + +// Subnet in a virtual network resource. +type Subnet struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the subnet. + Properties *SubnetPropertiesFormat + + // Resource type. + Type *string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// SubnetAssociation - Subnet and it's custom security rules. +type SubnetAssociation struct { + // Collection of custom security rules. + SecurityRules []*SecurityRule + + // READ-ONLY; Subnet ID. + ID *string +} + +// SubnetListResult - Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. +type SubnetListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The subnets in a virtual network. + Value []*Subnet +} + +// SubnetPropertiesFormat - Properties of the subnet. +type SubnetPropertiesFormat struct { + // The address prefix for the subnet. + AddressPrefix *string + + // List of address prefixes for the subnet. + AddressPrefixes []*string + + // Application gateway IP configurations of virtual network resource. + ApplicationGatewayIPConfigurations []*ApplicationGatewayIPConfiguration + + // Set this property to false to disable default outbound connectivity for all VMs in the subnet. This property can only be + // set at the time of subnet creation and cannot be updated for an existing + // subnet. + DefaultOutboundAccess *bool + + // An array of references to the delegations on the subnet. + Delegations []*Delegation + + // Array of IpAllocation which reference this subnet. + IPAllocations []*SubResource + + // A list of IPAM Pools for allocating IP address prefixes. + IpamPoolPrefixAllocations []*IpamPoolPrefixAllocation + + // Nat gateway associated with this subnet. + NatGateway *SubResource + + // The reference to the NetworkSecurityGroup resource. + NetworkSecurityGroup *SecurityGroup + + // Enable or Disable apply network policies on private end point in the subnet. + PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies + + // Enable or Disable apply network policies on private link service in the subnet. + PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies + + // The reference to the RouteTable resource. + RouteTable *RouteTable + + // An array of service endpoint policies. + ServiceEndpointPolicies []*ServiceEndpointPolicy + + // An array of service endpoints. + ServiceEndpoints []*ServiceEndpointPropertiesFormat + + // Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only + // be set if defaultOutboundAccess is set to false, both properties can only be set + // if subnet is empty. + SharingScope *SharingScope + + // READ-ONLY; Array of IP configuration profiles which reference this subnet. + IPConfigurationProfiles []*IPConfigurationProfile + + // READ-ONLY; An array of references to the network interface IP configurations using subnet. + IPConfigurations []*IPConfiguration + + // READ-ONLY; An array of references to private endpoints. + PrivateEndpoints []*PrivateEndpoint + + // READ-ONLY; The provisioning state of the subnet resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined + // properties. + Purpose *string + + // READ-ONLY; An array of references to the external resources using subnet. + ResourceNavigationLinks []*ResourceNavigationLink + + // READ-ONLY; An array of references to services injecting into this subnet. + ServiceAssociationLinks []*ServiceAssociationLink +} + +// SwapResource to represent slot type on the specified cloud service. +type SwapResource struct { + // Swap resource properties + Properties *SwapResourceProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// SwapResourceListResult - SwapResource List with single entry to represent slot type on the specified cloud service. +type SwapResourceListResult struct { + Value []*SwapResource +} + +// SwapResourceProperties - Swap resource properties +type SwapResourceProperties struct { + // Specifies slot info on a cloud service + SlotType *SlotType +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The type of identity that last modified the resource. + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *CreatedByType +} + +// TagsObject - Tags object for patch operations. +type TagsObject struct { + // Resource tags. + Tags map[string]*string +} + +// Topology of the specified resource group. +type Topology struct { + // A list of topology resources. + Resources []*TopologyResource + + // READ-ONLY; The datetime when the topology was initially created for the resource group. + CreatedDateTime *time.Time + + // READ-ONLY; GUID representing the operation id. + ID *string + + // READ-ONLY; The datetime when the topology was last modified. + LastModified *time.Time +} + +// TopologyAssociation - Resources that have an association with the parent resource. +type TopologyAssociation struct { + // The association type of the child resource to the parent resource. + AssociationType *AssociationType + + // The name of the resource that is associated with the parent resource. + Name *string + + // The ID of the resource that is associated with the parent resource. + ResourceID *string +} + +// TopologyParameters - Parameters that define the representation of topology. +type TopologyParameters struct { + // The name of the target resource group to perform topology on. + TargetResourceGroupName *string + + // The reference to the Subnet resource. + TargetSubnet *SubResource + + // The reference to the Virtual Network resource. + TargetVirtualNetwork *SubResource +} + +// TopologyResource - The network resource topology information for the given resource group. +type TopologyResource struct { + // Holds the associations the resource has with other resources in the resource group. + Associations []*TopologyAssociation + + // ID of the resource. + ID *string + + // Resource location. + Location *string + + // Name of the resource. + Name *string +} + +// TrafficAnalyticsConfigurationProperties - Parameters that define the configuration of traffic analytics. +type TrafficAnalyticsConfigurationProperties struct { + // Flag to enable/disable traffic analytics. + Enabled *bool + + // The interval in minutes which would decide how frequently TA service should do flow analytics. + TrafficAnalyticsInterval *int32 + + // The resource guid of the attached workspace. + WorkspaceID *string + + // The location of the attached workspace. + WorkspaceRegion *string + + // Resource Id of the attached workspace. + WorkspaceResourceID *string +} + +// TrafficAnalyticsProperties - Parameters that define the configuration of traffic analytics. +type TrafficAnalyticsProperties struct { + // Parameters that define the configuration of traffic analytics. + NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties +} + +// TrafficSelectorPolicy - An traffic selector policy for a virtual network gateway connection. +type TrafficSelectorPolicy struct { + // REQUIRED; A collection of local address spaces in CIDR format. + LocalAddressRanges []*string + + // REQUIRED; A collection of remote address spaces in CIDR format. + RemoteAddressRanges []*string +} + +// TroubleshootingDetails - Information gained from troubleshooting of specified resource. +type TroubleshootingDetails struct { + // Details on troubleshooting results. + Detail *string + + // The id of the get troubleshoot operation. + ID *string + + // Reason type of failure. + ReasonType *string + + // List of recommended actions. + RecommendedActions []*TroubleshootingRecommendedActions + + // A summary of troubleshooting. + Summary *string +} + +// TroubleshootingParameters - Parameters that define the resource to troubleshoot. +type TroubleshootingParameters struct { + // REQUIRED; Properties of the troubleshooting resource. + Properties *TroubleshootingProperties + + // REQUIRED; The target resource to troubleshoot. + TargetResourceID *string +} + +// TroubleshootingProperties - Storage location provided for troubleshoot. +type TroubleshootingProperties struct { + // REQUIRED; The ID for the storage account to save the troubleshoot result. + StorageID *string + + // REQUIRED; The path to the blob to save the troubleshoot result in. + StoragePath *string +} + +// TroubleshootingRecommendedActions - Recommended actions based on discovered issues. +type TroubleshootingRecommendedActions struct { + // ID of the recommended action. + ActionID *string + + // Description of recommended actions. + ActionText *string + + // The uri linking to a documentation for the recommended troubleshooting actions. + ActionURI *string + + // The information from the URI for the recommended troubleshooting actions. + ActionURIText *string +} + +// TroubleshootingResult - Troubleshooting information gained from specified resource. +type TroubleshootingResult struct { + // The result code of the troubleshooting. + Code *string + + // The end time of the troubleshooting. + EndTime *time.Time + + // Information from troubleshooting. + Results []*TroubleshootingDetails + + // The start time of the troubleshooting. + StartTime *time.Time +} + +// TunnelConnectionHealth - VirtualNetworkGatewayConnection properties. +type TunnelConnectionHealth struct { + // READ-ONLY; Virtual Network Gateway connection status. + ConnectionStatus *VirtualNetworkGatewayConnectionStatus + + // READ-ONLY; The Egress Bytes Transferred in this connection. + EgressBytesTransferred *int64 + + // READ-ONLY; The Ingress Bytes Transferred in this connection. + IngressBytesTransferred *int64 + + // READ-ONLY; The time at which connection was established in Utc format. + LastConnectionEstablishedUTCTime *string + + // READ-ONLY; Tunnel name. + Tunnel *string +} + +// UnprepareNetworkPoliciesRequest - Details of UnprepareNetworkPolicies for Subnet. +type UnprepareNetworkPoliciesRequest struct { + // The name of the service for which subnet is being unprepared for. + ServiceName *string +} + +// Usage - The network resource usage. +type Usage struct { + // REQUIRED; The current value of the usage. + CurrentValue *int64 + + // REQUIRED; The limit of usage. + Limit *int64 + + // REQUIRED; The name of the type of usage. + Name *UsageName + + // REQUIRED; An enum describing the unit of measurement. + Unit *UsageUnit + + // READ-ONLY; Resource identifier. + ID *string +} + +// UsageName - The usage names. +type UsageName struct { + // A localized string describing the resource name. + LocalizedValue *string + + // A string describing the resource name. + Value *string +} + +// UsagesListResult - The list usages operation response. +type UsagesListResult struct { + // URL to get the next set of results. + NextLink *string + + // The list network resource usages. + Value []*Usage +} + +// VM - Describes a Virtual Machine. +type VM struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VPNClientConfiguration - VpnClientConfiguration for P2S client. +type VPNClientConfiguration struct { + // The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + AADAudience *string + + // The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + AADIssuer *string + + // The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + AADTenant *string + + // The radius server address property of the VirtualNetworkGateway resource for vpn client connection. + RadiusServerAddress *string + + // The radius secret property of the VirtualNetworkGateway resource for vpn client connection. + RadiusServerSecret *string + + // The radiusServers property for multiple radius server configuration. + RadiusServers []*RadiusServer + + // VPN authentication types for the virtual network gateway.. + VPNAuthenticationTypes []*VPNAuthenticationType + + // The reference to the address space resource which represents Address space for P2S VpnClient. + VPNClientAddressPool *AddressSpace + + // VpnClientIpsecPolicies for virtual network gateway P2S client. + VPNClientIPSecPolicies []*IPSecPolicy + + // VpnClientProtocols for Virtual network gateway. + VPNClientProtocols []*VPNClientProtocol + + // VpnClientRevokedCertificate for Virtual network gateway. + VPNClientRevokedCertificates []*VPNClientRevokedCertificate + + // VpnClientRootCertificate for virtual network gateway. + VPNClientRootCertificates []*VPNClientRootCertificate + + // per ip address pool connection policy for virtual network gateway P2S client. + VngClientConnectionConfigurations []*VngClientConnectionConfiguration +} + +// VPNClientConnectionHealth - VpnClientConnectionHealth properties. +type VPNClientConnectionHealth struct { + // List of allocated ip addresses to the connected p2s vpn clients. + AllocatedIPAddresses []*string + + // The total of p2s vpn clients connected at this time to this P2SVpnGateway. + VPNClientConnectionsCount *int32 + + // READ-ONLY; Total of the Egress Bytes Transferred in this connection. + TotalEgressBytesTransferred *int64 + + // READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection. + TotalIngressBytesTransferred *int64 +} + +// VPNClientConnectionHealthDetail - VPN client connection health detail. +type VPNClientConnectionHealthDetail struct { + // READ-ONLY; The egress bytes per second. + EgressBytesTransferred *int64 + + // READ-ONLY; The egress packets per second. + EgressPacketsTransferred *int64 + + // READ-ONLY; The ingress bytes per second. + IngressBytesTransferred *int64 + + // READ-ONLY; The ingress packets per second. + IngressPacketsTransferred *int64 + + // READ-ONLY; The max band width. + MaxBandwidth *int64 + + // READ-ONLY; The max packets transferred per second. + MaxPacketsPerSecond *int64 + + // READ-ONLY; The assigned private Ip of a connected vpn client. + PrivateIPAddress *string + + // READ-ONLY; The public Ip of a connected vpn client. + PublicIPAddress *string + + // READ-ONLY; The duration time of a connected vpn client. + VPNConnectionDuration *int64 + + // READ-ONLY; The vpn client Id. + VPNConnectionID *string + + // READ-ONLY; The start time of a connected vpn client. + VPNConnectionTime *string + + // READ-ONLY; The user name of a connected vpn client. + VPNUserName *string +} + +// VPNClientConnectionHealthDetailListResult - List of virtual network gateway vpn client connection health. +type VPNClientConnectionHealthDetailListResult struct { + // List of vpn client connection health. + Value []*VPNClientConnectionHealthDetail +} + +// VPNClientIPsecParameters - An IPSec parameters for a virtual network gateway P2S connection. +type VPNClientIPsecParameters struct { + // REQUIRED; The DH Group used in IKE Phase 1 for initial SA. + DhGroup *DhGroup + + // REQUIRED; The IPSec encryption algorithm (IKE phase 1). + IPSecEncryption *IPSecEncryption + + // REQUIRED; The IPSec integrity algorithm (IKE phase 1). + IPSecIntegrity *IPSecIntegrity + + // REQUIRED; The IKE encryption algorithm (IKE phase 2). + IkeEncryption *IkeEncryption + + // REQUIRED; The IKE integrity algorithm (IKE phase 2). + IkeIntegrity *IkeIntegrity + + // REQUIRED; The Pfs Group used in IKE Phase 2 for new child SA. + PfsGroup *PfsGroup + + // REQUIRED; The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + SaDataSizeKilobytes *int32 + + // REQUIRED; The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + SaLifeTimeSeconds *int32 +} + +// VPNClientParameters - Vpn Client Parameters for package generation. +type VPNClientParameters struct { + // VPN client authentication method. + AuthenticationMethod *AuthenticationMethod + + // A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external + // radius based authentication with EAPTLS. + ClientRootCertificates []*string + + // VPN client Processor Architecture. + ProcessorArchitecture *ProcessorArchitecture + + // The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only + // if external radius authentication has been configured with EAPTLS + // authentication. + RadiusServerAuthCertificate *string +} + +// VPNClientRevokedCertificate - VPN client revoked certificate of virtual network gateway. +type VPNClientRevokedCertificate struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the vpn client revoked certificate. + Properties *VPNClientRevokedCertificatePropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// VPNClientRevokedCertificatePropertiesFormat - Properties of the revoked VPN client certificate of virtual network gateway. +type VPNClientRevokedCertificatePropertiesFormat struct { + // The revoked VPN client certificate thumbprint. + Thumbprint *string + + // READ-ONLY; The provisioning state of the VPN client revoked certificate resource. + ProvisioningState *ProvisioningState +} + +// VPNClientRootCertificate - VPN client root certificate of virtual network gateway. +type VPNClientRootCertificate struct { + // REQUIRED; Properties of the vpn client root certificate. + Properties *VPNClientRootCertificatePropertiesFormat + + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// VPNClientRootCertificatePropertiesFormat - Properties of SSL certificates of application gateway. +type VPNClientRootCertificatePropertiesFormat struct { + // REQUIRED; The certificate public data. + PublicCertData *string + + // READ-ONLY; The provisioning state of the VPN client root certificate resource. + ProvisioningState *ProvisioningState +} + +// VPNConnection - VpnConnection Resource. +type VPNConnection struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the VPN connection. + Properties *VPNConnectionProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// VPNConnectionPacketCaptureStartParameters - Vpn Connection packet capture parameters supplied to start packet capture on +// gateway connection. +type VPNConnectionPacketCaptureStartParameters struct { + // Start Packet capture parameters on vpn connection. + FilterData *string + + // List of site link connection names. + LinkConnectionNames []*string +} + +// VPNConnectionPacketCaptureStopParameters - Vpn Connection packet capture parameters supplied to stop packet capture on +// gateway connection. +type VPNConnectionPacketCaptureStopParameters struct { + // List of site link connection names. + LinkConnectionNames []*string + + // SAS url for packet capture on vpn connection. + SasURL *string +} + +// VPNConnectionProperties - Parameters for VpnConnection. +type VPNConnectionProperties struct { + // Expected bandwidth in MBPS. + ConnectionBandwidth *int32 + + // DPD timeout in seconds for vpn connection. + DpdTimeoutSeconds *int32 + + // EnableBgp flag. + EnableBgp *bool + + // Enable internet security. + EnableInternetSecurity *bool + + // EnableBgp flag. + EnableRateLimiting *bool + + // The IPSec Policies to be considered by this connection. + IPSecPolicies []*IPSecPolicy + + // Id of the connected vpn site. + RemoteVPNSite *SubResource + + // The Routing Configuration indicating the associated and propagated route tables on this connection. + RoutingConfiguration *RoutingConfiguration + + // Routing weight for vpn connection. + RoutingWeight *int32 + + // SharedKey for the vpn connection. + SharedKey *string + + // The Traffic Selector Policies to be considered by this connection. + TrafficSelectorPolicies []*TrafficSelectorPolicy + + // Use local azure ip to initiate connection. + UseLocalAzureIPAddress *bool + + // Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool + + // Connection protocol used for this connection. + VPNConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol + + // List of all vpn site link connections to the gateway. + VPNLinkConnections []*VPNSiteLinkConnection + + // READ-ONLY; The connection status. + ConnectionStatus *VPNConnectionStatus + + // READ-ONLY; Egress bytes transferred. + EgressBytesTransferred *int64 + + // READ-ONLY; Ingress bytes transferred. + IngressBytesTransferred *int64 + + // READ-ONLY; The provisioning state of the VPN connection resource. + ProvisioningState *ProvisioningState +} + +// VPNDeviceScriptParameters - Vpn device configuration script generation parameters. +type VPNDeviceScriptParameters struct { + // The device family for the vpn device. + DeviceFamily *string + + // The firmware version for the vpn device. + FirmwareVersion *string + + // The vendor for the vpn device. + Vendor *string +} + +// VPNGateway - VpnGateway Resource. +type VPNGateway struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the VPN gateway. + Properties *VPNGatewayProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VPNGatewayIPConfiguration - IP Configuration of a VPN Gateway Resource. +type VPNGatewayIPConfiguration struct { + // The identifier of the IP configuration for a VPN Gateway. + ID *string + + // The private IP address of this IP configuration. + PrivateIPAddress *string + + // The public IP address of this IP configuration. + PublicIPAddress *string +} + +// VPNGatewayNatRule - VpnGatewayNatRule Resource. +type VPNGatewayNatRule struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the VpnGateway NAT rule. + Properties *VPNGatewayNatRuleProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource type. + Type *string +} + +// VPNGatewayNatRuleProperties - Parameters for VpnGatewayNatRule. +type VPNGatewayNatRuleProperties struct { + // The private IP address external mapping for NAT. + ExternalMappings []*VPNNatRuleMapping + + // The IP Configuration ID this NAT rule applies to. + IPConfigurationID *string + + // The private IP address internal mapping for NAT. + InternalMappings []*VPNNatRuleMapping + + // The Source NAT direction of a VPN NAT. + Mode *VPNNatRuleMode + + // The type of NAT rule for VPN NAT. + Type *VPNNatRuleType + + // READ-ONLY; List of egress VpnSiteLinkConnections. + EgressVPNSiteLinkConnections []*SubResource + + // READ-ONLY; List of ingress VpnSiteLinkConnections. + IngressVPNSiteLinkConnections []*SubResource + + // READ-ONLY; The provisioning state of the NAT Rule resource. + ProvisioningState *ProvisioningState +} + +// VPNGatewayPacketCaptureStartParameters - Start packet capture parameters. +type VPNGatewayPacketCaptureStartParameters struct { + // Start Packet capture parameters on vpn gateway. + FilterData *string +} + +// VPNGatewayPacketCaptureStopParameters - Stop packet capture parameters. +type VPNGatewayPacketCaptureStopParameters struct { + // SAS url for packet capture on vpn gateway. + SasURL *string +} + +// VPNGatewayProperties - Parameters for VpnGateway. +type VPNGatewayProperties struct { + // Local network gateway's BGP speaker settings. + BgpSettings *BgpSettings + + // List of all vpn connections to the gateway. + Connections []*VPNConnection + + // Enable BGP routes translation for NAT on this VpnGateway. + EnableBgpRouteTranslationForNat *bool + + // Enable Routing Preference property for the Public IP Interface of the VpnGateway. + IsRoutingPreferenceInternet *bool + + // List of all the nat Rules associated with the gateway. + NatRules []*VPNGatewayNatRule + + // The scale unit for this vpn gateway. + VPNGatewayScaleUnit *int32 + + // The VirtualHub to which the gateway belongs. + VirtualHub *SubResource + + // READ-ONLY; List of all IPs configured on the gateway. + IPConfigurations []*VPNGatewayIPConfiguration + + // READ-ONLY; The provisioning state of the VPN gateway resource. + ProvisioningState *ProvisioningState +} + +// VPNLinkBgpSettings - BGP settings details for a link. +type VPNLinkBgpSettings struct { + // The BGP speaker's ASN. + Asn *int64 + + // The BGP peering address and BGP identifier of this BGP speaker. + BgpPeeringAddress *string +} + +// VPNLinkProviderProperties - List of properties of a link provider. +type VPNLinkProviderProperties struct { + // Name of the link provider. + LinkProviderName *string + + // Link speed. + LinkSpeedInMbps *int32 +} + +// VPNNatRuleMapping - Vpn NatRule mapping. +type VPNNatRuleMapping struct { + // Address space for Vpn NatRule mapping. + AddressSpace *string + + // Port range for Vpn NatRule mapping. + PortRange *string +} + +// VPNPacketCaptureStartParameters - Start packet capture parameters on virtual network gateway. +type VPNPacketCaptureStartParameters struct { + // Start Packet capture parameters. + FilterData *string +} + +// VPNPacketCaptureStopParameters - Stop packet capture parameters. +type VPNPacketCaptureStopParameters struct { + // SAS url for packet capture on virtual network gateway. + SasURL *string +} + +// VPNProfileResponse - Vpn Profile Response for package generation. +type VPNProfileResponse struct { + // URL to the VPN profile. + ProfileURL *string +} + +// VPNServerConfigRadiusClientRootCertificate - Properties of the Radius client root certificate of VpnServerConfiguration. +type VPNServerConfigRadiusClientRootCertificate struct { + // The certificate name. + Name *string + + // The Radius client root certificate thumbprint. + Thumbprint *string +} + +// VPNServerConfigRadiusServerRootCertificate - Properties of Radius Server root certificate of VpnServerConfiguration. +type VPNServerConfigRadiusServerRootCertificate struct { + // The certificate name. + Name *string + + // The certificate public data. + PublicCertData *string +} + +// VPNServerConfigVPNClientRevokedCertificate - Properties of the revoked VPN client certificate of VpnServerConfiguration. +type VPNServerConfigVPNClientRevokedCertificate struct { + // The certificate name. + Name *string + + // The revoked VPN client certificate thumbprint. + Thumbprint *string +} + +// VPNServerConfigVPNClientRootCertificate - Properties of VPN client root certificate of VpnServerConfiguration. +type VPNServerConfigVPNClientRootCertificate struct { + // The certificate name. + Name *string + + // The certificate public data. + PublicCertData *string +} + +// VPNServerConfiguration - VpnServerConfiguration Resource. +type VPNServerConfiguration struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the P2SVpnServer configuration. + Properties *VPNServerConfigurationProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VPNServerConfigurationPolicyGroup - VpnServerConfigurationPolicyGroup Resource. +type VPNServerConfigurationPolicyGroup struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the VpnServerConfigurationPolicyGroup. + Properties *VPNServerConfigurationPolicyGroupProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource type. + Type *string +} + +// VPNServerConfigurationPolicyGroupMember - VpnServerConfiguration PolicyGroup member +type VPNServerConfigurationPolicyGroupMember struct { + // The Vpn Policy member attribute type. + AttributeType *VPNPolicyMemberAttributeType + + // The value of Attribute used for this VpnServerConfigurationPolicyGroupMember. + AttributeValue *string + + // Name of the VpnServerConfigurationPolicyGroupMember. + Name *string +} + +// VPNServerConfigurationPolicyGroupProperties - Parameters for VpnServerConfigurationPolicyGroup. +type VPNServerConfigurationPolicyGroupProperties struct { + // Shows if this is a Default VpnServerConfigurationPolicyGroup or not. + IsDefault *bool + + // Multiple PolicyMembers for VpnServerConfigurationPolicyGroup. + PolicyMembers []*VPNServerConfigurationPolicyGroupMember + + // Priority for VpnServerConfigurationPolicyGroup. + Priority *int32 + + // READ-ONLY; List of references to P2SConnectionConfigurations. + P2SConnectionConfigurations []*SubResource + + // READ-ONLY; The provisioning state of the VpnServerConfigurationPolicyGroup resource. + ProvisioningState *ProvisioningState +} + +// VPNServerConfigurationProperties - Parameters for VpnServerConfiguration. +type VPNServerConfigurationProperties struct { + // The set of aad vpn authentication parameters. + AADAuthenticationParameters *AADAuthenticationParameters + + // List of all VpnServerConfigurationPolicyGroups. + ConfigurationPolicyGroups []*VPNServerConfigurationPolicyGroup + + // The name of the VpnServerConfiguration that is unique within a resource group. + Name *string + + // Radius client root certificate of VpnServerConfiguration. + RadiusClientRootCertificates []*VPNServerConfigRadiusClientRootCertificate + + // The radius server address property of the VpnServerConfiguration resource for point to site client connection. + RadiusServerAddress *string + + // Radius Server root certificate of VpnServerConfiguration. + RadiusServerRootCertificates []*VPNServerConfigRadiusServerRootCertificate + + // The radius secret property of the VpnServerConfiguration resource for point to site client connection. + RadiusServerSecret *string + + // Multiple Radius Server configuration for VpnServerConfiguration. + RadiusServers []*RadiusServer + + // VPN authentication types for the VpnServerConfiguration. + VPNAuthenticationTypes []*VPNAuthenticationType + + // VpnClientIpsecPolicies for VpnServerConfiguration. + VPNClientIPSecPolicies []*IPSecPolicy + + // VPN client revoked certificate of VpnServerConfiguration. + VPNClientRevokedCertificates []*VPNServerConfigVPNClientRevokedCertificate + + // VPN client root certificate of VpnServerConfiguration. + VPNClientRootCertificates []*VPNServerConfigVPNClientRootCertificate + + // VPN protocols for the VpnServerConfiguration. + VPNProtocols []*VPNGatewayTunnelingProtocol + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; List of references to P2SVpnGateways. + P2SVPNGateways []*P2SVPNGateway + + // READ-ONLY; The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', + // and 'Failed'. + ProvisioningState *string +} + +// VPNServerConfigurationsResponse - VpnServerConfigurations list associated with VirtualWan Response. +type VPNServerConfigurationsResponse struct { + // List of VpnServerConfigurations associated with VirtualWan. + VPNServerConfigurationResourceIDs []*string +} + +// VPNSite - VpnSite Resource. +type VPNSite struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the VPN site. + Properties *VPNSiteProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VPNSiteID - VpnSite Resource. +type VPNSiteID struct { + // READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched. + VPNSite *string +} + +// VPNSiteLink - VpnSiteLink Resource. +type VPNSiteLink struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the VPN site link. + Properties *VPNSiteLinkProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource type. + Type *string +} + +// VPNSiteLinkConnection - VpnSiteLinkConnection Resource. +type VPNSiteLinkConnection struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the VPN site link connection. + Properties *VPNSiteLinkConnectionProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource type. + Type *string +} + +// VPNSiteLinkConnectionProperties - Parameters for VpnConnection. +type VPNSiteLinkConnectionProperties struct { + // Expected bandwidth in MBPS. + ConnectionBandwidth *int32 + + // Dead Peer Detection timeout in seconds for VpnLink connection. + DpdTimeoutSeconds *int32 + + // List of egress NatRules. + EgressNatRules []*SubResource + + // EnableBgp flag. + EnableBgp *bool + + // EnableBgp flag. + EnableRateLimiting *bool + + // The IPSec Policies to be considered by this connection. + IPSecPolicies []*IPSecPolicy + + // List of ingress NatRules. + IngressNatRules []*SubResource + + // Routing weight for vpn connection. + RoutingWeight *int32 + + // SharedKey for the vpn connection. + SharedKey *string + + // Use local azure ip to initiate connection. + UseLocalAzureIPAddress *bool + + // Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool + + // Connection protocol used for this connection. + VPNConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol + + // vpnGatewayCustomBgpAddresses used by this connection. + VPNGatewayCustomBgpAddresses []*GatewayCustomBgpIPAddressIPConfiguration + + // Vpn link connection mode. + VPNLinkConnectionMode *VPNLinkConnectionMode + + // Id of the connected vpn site link. + VPNSiteLink *SubResource + + // READ-ONLY; The connection status. + ConnectionStatus *VPNConnectionStatus + + // READ-ONLY; Egress bytes transferred. + EgressBytesTransferred *int64 + + // READ-ONLY; Ingress bytes transferred. + IngressBytesTransferred *int64 + + // READ-ONLY; The provisioning state of the VPN site link connection resource. + ProvisioningState *ProvisioningState +} + +// VPNSiteLinkProperties - Parameters for VpnSite. +type VPNSiteLinkProperties struct { + // The set of bgp properties. + BgpProperties *VPNLinkBgpSettings + + // FQDN of vpn-site-link. + Fqdn *string + + // The ip-address for the vpn-site-link. + IPAddress *string + + // The link provider properties. + LinkProperties *VPNLinkProviderProperties + + // READ-ONLY; The provisioning state of the VPN site link resource. + ProvisioningState *ProvisioningState +} + +// VPNSiteProperties - Parameters for VpnSite. +type VPNSiteProperties struct { + // The AddressSpace that contains an array of IP address ranges. + AddressSpace *AddressSpace + + // The set of bgp properties. + BgpProperties *BgpSettings + + // The device properties. + DeviceProperties *DeviceProperties + + // The ip-address for the vpn-site. + IPAddress *string + + // IsSecuritySite flag. + IsSecuritySite *bool + + // Office365 Policy. + O365Policy *O365PolicyProperties + + // The key for vpn-site that can be used for connections. + SiteKey *string + + // List of all vpn site links. + VPNSiteLinks []*VPNSiteLink + + // The VirtualWAN to which the vpnSite belongs. + VirtualWan *SubResource + + // READ-ONLY; The provisioning state of the VPN site resource. + ProvisioningState *ProvisioningState +} + +// VerificationIPFlowParameters - Parameters that define the IP flow to be verified. +type VerificationIPFlowParameters struct { + // REQUIRED; The direction of the packet represented as a 5-tuple. + Direction *Direction + + // REQUIRED; The local IP address. Acceptable values are valid IPv4 addresses. + LocalIPAddress *string + + // REQUIRED; The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, + // which depends on the direction. + LocalPort *string + + // REQUIRED; Protocol to be verified on. + Protocol *IPFlowProtocol + + // REQUIRED; The remote IP address. Acceptable values are valid IPv4 addresses. + RemoteIPAddress *string + + // REQUIRED; The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source + // port, which depends on the direction. + RemotePort *string + + // REQUIRED; The ID of the target resource to perform next-hop on. + TargetResourceID *string + + // The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. + // Otherwise optional). + TargetNicResourceID *string +} + +// VerificationIPFlowResult - Results of IP flow verification on the target resource. +type VerificationIPFlowResult struct { + // Indicates whether the traffic is allowed or denied. + Access *Access + + // Name of the rule. If input is not matched against any security rule, it is not displayed. + RuleName *string +} + +// VerifierWorkspace - Instance of Verifier Workspace. +type VerifierWorkspace struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Properties of Verifier Workspace resource. + Properties *VerifierWorkspaceProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// VerifierWorkspaceListResult - A list of Verifier Workspace +type VerifierWorkspaceListResult struct { + // Gets the URL to get the next page of results. + NextLink *string + + // Gets a page of Verifier Workspaces. + Value []*VerifierWorkspace +} + +// VerifierWorkspaceProperties - Properties of Verifier Workspace resource. +type VerifierWorkspaceProperties struct { + Description *string + + // Provisioning states of a resource. + ProvisioningState *ProvisioningState +} + +// VerifierWorkspaceUpdate - Represents the VerifierWorkspace update API request interface. +type VerifierWorkspaceUpdate struct { + // Represents the VerifierWorkspace update properties. + Properties *VerifierWorkspaceUpdateProperties + + // Dictionary of + Tags map[string]*string +} + +// VerifierWorkspaceUpdateProperties - Represents the VerifierWorkspace update properties. +type VerifierWorkspaceUpdateProperties struct { + Description *string +} + +// VirtualAppliance - NetworkVirtualAppliance Resource. +type VirtualAppliance struct { + // Resource ID. + ID *string + + // The service principal that has read access to cloud-init and config blob. + Identity *ManagedServiceIdentity + + // Resource location. + Location *string + + // Properties of the Network Virtual Appliance. + Properties *VirtualAppliancePropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualApplianceAdditionalNicProperties - Network Virtual Appliance Additional NIC properties. +type VirtualApplianceAdditionalNicProperties struct { + // Flag (true or false) for Intent for Public Ip on additional nic + HasPublicIP *bool + + // Name of additional nic + Name *string +} + +// VirtualApplianceConnection - NetworkVirtualApplianceConnection resource. +type VirtualApplianceConnection struct { + // Resource ID. + ID *string + + // The name of the resource. + Name *string + + // Properties of the express route connection. + Properties *VirtualApplianceConnectionProperties +} + +// VirtualApplianceConnectionList - NetworkVirtualApplianceConnection list. +type VirtualApplianceConnectionList struct { + // URL to get the next set of results. + NextLink *string + + // The list of NetworkVirtualAppliance connections. + Value []*VirtualApplianceConnection +} + +// VirtualApplianceConnectionProperties - Properties of the NetworkVirtualApplianceConnection subresource. +type VirtualApplianceConnectionProperties struct { + // Network Virtual Appliance ASN. + Asn *int64 + + // List of bgpPeerAddresses for the NVA instances + BgpPeerAddress []*string + + // Enable internet security. + EnableInternetSecurity *bool + + // The name of the resource. + Name *string + + // The Routing Configuration indicating the associated and propagated route tables on this connection. + RoutingConfiguration *RoutingConfiguration + + // Unique identifier for the connection. + TunnelIdentifier *int64 + + // READ-ONLY; The provisioning state of the NetworkVirtualApplianceConnection resource. + ProvisioningState *ProvisioningState +} + +// VirtualApplianceIPConfiguration - Represents a single IP configuration. +type VirtualApplianceIPConfiguration struct { + // Name of the IP configuration. + Name *string + + // Represents a single IP configuration properties. + Properties *VirtualApplianceIPConfigurationProperties +} + +// VirtualApplianceIPConfigurationProperties - Represents a single IP configuration properties. +type VirtualApplianceIPConfigurationProperties struct { + // Whether or not this is primary IP configuration of the NIC. + Primary *bool +} + +// VirtualApplianceInstanceIDs - Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. +type VirtualApplianceInstanceIDs struct { + // The network virtual appliance instance ids. Omitting the network virtual appliance instance ids will result in the operation + // being performed on all virtual machines belonging to the network virtual + // appliance. + InstanceIDs []*string +} + +// VirtualApplianceListResult - Response for ListNetworkVirtualAppliances API service call. +type VirtualApplianceListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of Network Virtual Appliances. + Value []*VirtualAppliance +} + +// VirtualApplianceNetworkInterfaceConfiguration - Represents a single NIC configuration. +type VirtualApplianceNetworkInterfaceConfiguration struct { + // NIC type. This should be either PublicNic or PrivateNic. + NicType *NicTypeInRequest + + // Represents a single NIC configuration properties. + Properties *VirtualApplianceNetworkInterfaceConfigurationProperties +} + +// VirtualApplianceNetworkInterfaceConfigurationProperties - Represents a single NIC configuration properties. +type VirtualApplianceNetworkInterfaceConfigurationProperties struct { + IPConfigurations []*VirtualApplianceIPConfiguration +} + +// VirtualApplianceNicProperties - Network Virtual Appliance NIC properties. +type VirtualApplianceNicProperties struct { + // READ-ONLY; Instance on which nic is attached. + InstanceName *string + + // READ-ONLY; NIC name. + Name *string + + // READ-ONLY; NIC type - PublicNic, PrivateNic, or AdditionalNic. + NicType *NicTypeInResponse + + // READ-ONLY; Private IP address. + PrivateIPAddress *string + + // READ-ONLY; Public IP address. + PublicIPAddress *string +} + +// VirtualAppliancePropertiesFormat - Network Virtual Appliance definition. +type VirtualAppliancePropertiesFormat struct { + // Details required for Additional Network Interface. + AdditionalNics []*VirtualApplianceAdditionalNicProperties + + // BootStrapConfigurationBlobs storage URLs. + BootStrapConfigurationBlobs []*string + + // CloudInitConfiguration string in plain text. + CloudInitConfiguration *string + + // CloudInitConfigurationBlob storage URLs. + CloudInitConfigurationBlobs []*string + + // The delegation for the Virtual Appliance + Delegation *DelegationProperties + + // List of Resource Uri of Public IPs for Internet Ingress Scenario. + InternetIngressPublicIPs []*InternetIngressPublicIPsProperties + + // Network Profile containing configurations for Public and Private NIC. + NetworkProfile *VirtualAppliancePropertiesFormatNetworkProfile + + // Network Virtual Appliance SKU. + NvaSKU *VirtualApplianceSKUProperties + + // The delegation for the Virtual Appliance + PartnerManagedResource *PartnerManagedResourceProperties + + // Public key for SSH login. + SSHPublicKey *string + + // VirtualAppliance ASN. Microsoft private, public and IANA reserved ASN are not supported. + VirtualApplianceAsn *int64 + + // The Virtual Hub where Network Virtual Appliance is being deployed. + VirtualHub *SubResource + + // READ-ONLY; Address Prefix. + AddressPrefix *string + + // READ-ONLY; The deployment type. PartnerManaged for the SaaS NVA + DeploymentType *string + + // READ-ONLY; List of references to InboundSecurityRules. + InboundSecurityRules []*SubResource + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; List of references to VirtualApplianceConnections. + VirtualApplianceConnections []*SubResource + + // READ-ONLY; List of Virtual Appliance Network Interfaces. + VirtualApplianceNics []*VirtualApplianceNicProperties + + // READ-ONLY; List of references to VirtualApplianceSite. + VirtualApplianceSites []*SubResource +} + +// VirtualAppliancePropertiesFormatNetworkProfile - Network Profile containing configurations for Public and Private NIC. +type VirtualAppliancePropertiesFormatNetworkProfile struct { + NetworkInterfaceConfigurations []*VirtualApplianceNetworkInterfaceConfiguration +} + +// VirtualApplianceSKU - Definition of the NetworkVirtualApplianceSkus resource. +type VirtualApplianceSKU struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // NetworkVirtualApplianceSku properties. + Properties *VirtualApplianceSKUPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualApplianceSKUInstances - List of available Sku and instances. +type VirtualApplianceSKUInstances struct { + // READ-ONLY; Instance Count. + InstanceCount *int32 + + // READ-ONLY; Scale Unit. + ScaleUnit *string +} + +// VirtualApplianceSKUListResult - Response for ListNetworkVirtualApplianceSkus API service call. +type VirtualApplianceSKUListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of Network Virtual Appliance Skus that are available. + Value []*VirtualApplianceSKU +} + +// VirtualApplianceSKUProperties - Network Virtual Appliance Sku Properties. +type VirtualApplianceSKUProperties struct { + // Virtual Appliance Scale Unit. + BundledScaleUnit *string + + // Virtual Appliance Version. + MarketPlaceVersion *string + + // Virtual Appliance Vendor. + Vendor *string +} + +// VirtualApplianceSKUPropertiesFormat - Properties specific to NetworkVirtualApplianceSkus. +type VirtualApplianceSKUPropertiesFormat struct { + // The list of scale units available. + AvailableScaleUnits []*VirtualApplianceSKUInstances + + // READ-ONLY; Available Network Virtual Appliance versions. + AvailableVersions []*string + + // READ-ONLY; Network Virtual Appliance Sku vendor. + Vendor *string +} + +// VirtualApplianceSite - Virtual Appliance Site resource. +type VirtualApplianceSite struct { + // Resource ID. + ID *string + + // Name of the virtual appliance site. + Name *string + + // The properties of the Virtual Appliance Sites. + Properties *VirtualApplianceSiteProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Site type. + Type *string +} + +// VirtualApplianceSiteListResult - Response for ListNetworkVirtualApplianceSites API service call. +type VirtualApplianceSiteListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of Network Virtual Appliance sites. + Value []*VirtualApplianceSite +} + +// VirtualApplianceSiteProperties - Properties of the rule group. +type VirtualApplianceSiteProperties struct { + // Address Prefix. + AddressPrefix *string + + // Office 365 Policy. + O365Policy *Office365PolicyProperties + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState +} + +// VirtualHub Resource. +type VirtualHub struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the virtual hub. + Properties *VirtualHubProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server. + Kind *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualHubEffectiveRoute - The effective route configured on the virtual hub or specified resource. +type VirtualHubEffectiveRoute struct { + // The list of address prefixes. + AddressPrefixes []*string + + // The ASPath of this route. + AsPath *string + + // The type of the next hop. + NextHopType *string + + // The list of next hops. + NextHops []*string + + // The origin of this route. + RouteOrigin *string +} + +// VirtualHubEffectiveRouteList - EffectiveRoutes List. +type VirtualHubEffectiveRouteList struct { + // The list of effective routes configured on the virtual hub or the specified resource. + Value []*VirtualHubEffectiveRoute +} + +// VirtualHubID - Virtual Hub identifier. +type VirtualHubID struct { + // The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and + // the ExpressRoute gateway resource reside in the same subscription. + ID *string +} + +// VirtualHubProperties - Parameters for VirtualHub. +type VirtualHubProperties struct { + // Address-prefix for this VirtualHub. + AddressPrefix *string + + // Flag to control transit for VirtualRouter hub. + AllowBranchToBranchTraffic *bool + + // The azureFirewall associated with this VirtualHub. + AzureFirewall *SubResource + + // The expressRouteGateway associated with this VirtualHub. + ExpressRouteGateway *SubResource + + // The hubRoutingPreference of this VirtualHub. + HubRoutingPreference *HubRoutingPreference + + // The P2SVpnGateway associated with this VirtualHub. + P2SVPNGateway *SubResource + + // The preferred gateway to route on-prem traffic + PreferredRoutingGateway *PreferredRoutingGateway + + // The routeTable associated with this virtual hub. + RouteTable *VirtualHubRouteTable + + // The sku of this VirtualHub. + SKU *string + + // The securityPartnerProvider associated with this VirtualHub. + SecurityPartnerProvider *SubResource + + // The Security Provider name. + SecurityProviderName *string + + // The VpnGateway associated with this VirtualHub. + VPNGateway *SubResource + + // List of all virtual hub route table v2s associated with this VirtualHub. + VirtualHubRouteTableV2S []*VirtualHubRouteTableV2 + + // VirtualRouter ASN. + VirtualRouterAsn *int64 + + // The VirtualHub Router autoscale configuration. + VirtualRouterAutoScaleConfiguration *VirtualRouterAutoScaleConfiguration + + // VirtualRouter IPs. + VirtualRouterIPs []*string + + // The VirtualWAN to which the VirtualHub belongs. + VirtualWan *SubResource + + // READ-ONLY; List of references to Bgp Connections. + BgpConnections []*SubResource + + // READ-ONLY; List of references to IpConfigurations. + IPConfigurations []*SubResource + + // READ-ONLY; The provisioning state of the virtual hub resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; List of references to RouteMaps. + RouteMaps []*SubResource + + // READ-ONLY; The routing state. + RoutingState *RoutingState +} + +// VirtualHubRoute - VirtualHub route. +type VirtualHubRoute struct { + // List of all addressPrefixes. + AddressPrefixes []*string + + // NextHop ip address. + NextHopIPAddress *string +} + +// VirtualHubRouteTable - VirtualHub route table. +type VirtualHubRouteTable struct { + // List of all routes. + Routes []*VirtualHubRoute +} + +// VirtualHubRouteTableV2 Resource. +type VirtualHubRouteTableV2 struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the virtual hub route table v2. + Properties *VirtualHubRouteTableV2Properties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// VirtualHubRouteTableV2Properties - Parameters for VirtualHubRouteTableV2. +type VirtualHubRouteTableV2Properties struct { + // List of all connections attached to this route table v2. + AttachedConnections []*string + + // List of all routes. + Routes []*VirtualHubRouteV2 + + // READ-ONLY; The provisioning state of the virtual hub route table v2 resource. + ProvisioningState *ProvisioningState +} + +// VirtualHubRouteV2 - VirtualHubRouteTableV2 route. +type VirtualHubRouteV2 struct { + // The type of destinations. + DestinationType *string + + // List of all destinations. + Destinations []*string + + // The type of next hops. + NextHopType *string + + // NextHops ip address. + NextHops []*string +} + +// VirtualNetwork - Virtual Network resource. +type VirtualNetwork struct { + // The extended location of the virtual network. + ExtendedLocation *ExtendedLocation + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the virtual network. + Properties *VirtualNetworkPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualNetworkBgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this +// VNET. +type VirtualNetworkBgpCommunities struct { + // REQUIRED; The BGP community associated with the virtual network. + VirtualNetworkCommunity *string + + // READ-ONLY; The BGP community associated with the region of the virtual network. + RegionalCommunity *string +} + +// VirtualNetworkConnectionGatewayReference - A reference to VirtualNetworkGateway or LocalNetworkGateway resource. +type VirtualNetworkConnectionGatewayReference struct { + // REQUIRED; The ID of VirtualNetworkGateway or LocalNetworkGateway resource. + ID *string +} + +// VirtualNetworkDdosProtectionStatusResult - Response for GetVirtualNetworkDdosProtectionStatusOperation. +type VirtualNetworkDdosProtectionStatusResult struct { + // The URL to get the next set of results. + NextLink *string + + // The Ddos Protection Status Result for each public ip under a virtual network. + Value []*PublicIPDdosProtectionStatusResult +} + +// VirtualNetworkEncryption - Indicates if encryption is enabled on virtual network and if VM without encryption is allowed +// in encrypted VNet. +type VirtualNetworkEncryption struct { + // REQUIRED; Indicates if encryption is enabled on the virtual network. + Enabled *bool + + // If the encrypted VNet allows VM that does not support encryption. This field is for future support, AllowUnencrypted is + // the only supported value at general availability. + Enforcement *VirtualNetworkEncryptionEnforcement +} + +// VirtualNetworkGateway - A common class for general resource information. +type VirtualNetworkGateway struct { + // REQUIRED; Properties of the virtual network gateway. + Properties *VirtualNetworkGatewayPropertiesFormat + + // The extended location of type local virtual network gateway. + ExtendedLocation *ExtendedLocation + + // Resource ID. + ID *string + + // The identity of the virtual network gateway, if configured. + Identity *ManagedServiceIdentity + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +type VirtualNetworkGatewayAutoScaleBounds struct { + // Maximum Scale Units for Autoscale configuration + Max *int32 + + // Minimum scale Units for Autoscale configuration + Min *int32 +} + +// VirtualNetworkGatewayAutoScaleConfiguration - Virtual Network Gateway Autoscale Configuration details +type VirtualNetworkGatewayAutoScaleConfiguration struct { + // The bounds of the autoscale configuration + Bounds *VirtualNetworkGatewayAutoScaleBounds +} + +// VirtualNetworkGatewayConnection - A common class for general resource information. +type VirtualNetworkGatewayConnection struct { + // REQUIRED; Properties of the virtual network gateway connection. + Properties *VirtualNetworkGatewayConnectionPropertiesFormat + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualNetworkGatewayConnectionListEntity - A common class for general resource information. +type VirtualNetworkGatewayConnectionListEntity struct { + // REQUIRED; Properties of the virtual network gateway connection. + Properties *VirtualNetworkGatewayConnectionListEntityPropertiesFormat + + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - VirtualNetworkGatewayConnection properties. +type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { + // REQUIRED; Gateway connection type. + ConnectionType *VirtualNetworkGatewayConnectionType + + // REQUIRED; The reference to virtual network gateway resource. + VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference + + // The authorizationKey. + AuthorizationKey *string + + // The connection mode for this connection. + ConnectionMode *VirtualNetworkGatewayConnectionMode + + // Connection protocol used for this connection. + ConnectionProtocol *VirtualNetworkGatewayConnectionProtocol + + // EnableBgp flag. + EnableBgp *bool + + // Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be + // enabled. + EnablePrivateLinkFastPath *bool + + // Bypass ExpressRoute Gateway for data forwarding. + ExpressRouteGatewayBypass *bool + + // GatewayCustomBgpIpAddresses to be used for virtual network gateway Connection. + GatewayCustomBgpIPAddresses []*GatewayCustomBgpIPAddressIPConfiguration + + // The IPSec Policies to be considered by this connection. + IPSecPolicies []*IPSecPolicy + + // The reference to local network gateway resource. + LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference + + // The reference to peerings resource. + Peer *SubResource + + // The routing weight. + RoutingWeight *int32 + + // The IPSec shared key. + SharedKey *string + + // The Traffic Selector Policies to be considered by this connection. + TrafficSelectorPolicies []*TrafficSelectorPolicy + + // Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool + + // The reference to virtual network gateway resource. + VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference + + // READ-ONLY; Virtual Network Gateway connection status. + ConnectionStatus *VirtualNetworkGatewayConnectionStatus + + // READ-ONLY; The egress bytes transferred in this connection. + EgressBytesTransferred *int64 + + // READ-ONLY; The ingress bytes transferred in this connection. + IngressBytesTransferred *int64 + + // READ-ONLY; The provisioning state of the virtual network gateway connection resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the virtual network gateway connection resource. + ResourceGUID *string + + // READ-ONLY; Collection of all tunnels' connection health status. + TunnelConnectionStatus []*TunnelConnectionHealth +} + +// VirtualNetworkGatewayConnectionListResult - Response for the ListVirtualNetworkGatewayConnections API service call. +type VirtualNetworkGatewayConnectionListResult struct { + // A list of VirtualNetworkGatewayConnection resources that exists in a resource group. + Value []*VirtualNetworkGatewayConnection + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// VirtualNetworkGatewayConnectionPropertiesFormat - VirtualNetworkGatewayConnection properties. +type VirtualNetworkGatewayConnectionPropertiesFormat struct { + // REQUIRED; Gateway connection type. + ConnectionType *VirtualNetworkGatewayConnectionType + + // REQUIRED; The reference to virtual network gateway resource. + VirtualNetworkGateway1 *VirtualNetworkGateway + + // The authorizationKey. + AuthorizationKey *string + + // The connection mode for this connection. + ConnectionMode *VirtualNetworkGatewayConnectionMode + + // Connection protocol used for this connection. + ConnectionProtocol *VirtualNetworkGatewayConnectionProtocol + + // The dead peer detection timeout of this connection in seconds. + DpdTimeoutSeconds *int32 + + // List of egress NatRules. + EgressNatRules []*SubResource + + // EnableBgp flag. + EnableBgp *bool + + // Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be + // enabled. + EnablePrivateLinkFastPath *bool + + // Bypass ExpressRoute Gateway for data forwarding. + ExpressRouteGatewayBypass *bool + + // GatewayCustomBgpIpAddresses to be used for virtual network gateway Connection. + GatewayCustomBgpIPAddresses []*GatewayCustomBgpIPAddressIPConfiguration + + // The IPSec Policies to be considered by this connection. + IPSecPolicies []*IPSecPolicy + + // List of ingress NatRules. + IngressNatRules []*SubResource + + // The reference to local network gateway resource. + LocalNetworkGateway2 *LocalNetworkGateway + + // The reference to peerings resource. + Peer *SubResource + + // The routing weight. + RoutingWeight *int32 + + // The IPSec shared key. + SharedKey *string + + // The Traffic Selector Policies to be considered by this connection. + TrafficSelectorPolicies []*TrafficSelectorPolicy + + // Use private local Azure IP for the connection. + UseLocalAzureIPAddress *bool + + // Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool + + // The reference to virtual network gateway resource. + VirtualNetworkGateway2 *VirtualNetworkGateway + + // READ-ONLY; Virtual Network Gateway connection status. + ConnectionStatus *VirtualNetworkGatewayConnectionStatus + + // READ-ONLY; The egress bytes transferred in this connection. + EgressBytesTransferred *int64 + + // READ-ONLY; The ingress bytes transferred in this connection. + IngressBytesTransferred *int64 + + // READ-ONLY; The provisioning state of the virtual network gateway connection resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the virtual network gateway connection resource. + ResourceGUID *string + + // READ-ONLY; Collection of all tunnels' connection health status. + TunnelConnectionStatus []*TunnelConnectionHealth +} + +// VirtualNetworkGatewayIPConfiguration - IP configuration for virtual network gateway. +type VirtualNetworkGatewayIPConfiguration struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the virtual network gateway ip configuration. + Properties *VirtualNetworkGatewayIPConfigurationPropertiesFormat + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of VirtualNetworkGatewayIPConfiguration. +type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { + // The private IP address allocation method. + PrivateIPAllocationMethod *IPAllocationMethod + + // The reference to the public IP resource. + PublicIPAddress *SubResource + + // The reference to the subnet resource. + Subnet *SubResource + + // READ-ONLY; Private IP Address for this gateway. + PrivateIPAddress *string + + // READ-ONLY; The provisioning state of the virtual network gateway IP configuration resource. + ProvisioningState *ProvisioningState +} + +// VirtualNetworkGatewayListConnectionsResult - Response for the VirtualNetworkGatewayListConnections API service call. +type VirtualNetworkGatewayListConnectionsResult struct { + // A list of VirtualNetworkGatewayConnection resources that exists in a resource group. + Value []*VirtualNetworkGatewayConnectionListEntity + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// VirtualNetworkGatewayListResult - Response for the ListVirtualNetworkGateways API service call. +type VirtualNetworkGatewayListResult struct { + // A list of VirtualNetworkGateway resources that exists in a resource group. + Value []*VirtualNetworkGateway + + // READ-ONLY; The URL to get the next set of results. + NextLink *string +} + +// VirtualNetworkGatewayNatRule Resource. +type VirtualNetworkGatewayNatRule struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the Virtual Network Gateway NAT rule. + Properties *VirtualNetworkGatewayNatRuleProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualNetworkGatewayNatRuleProperties - Parameters for VirtualNetworkGatewayNatRule. +type VirtualNetworkGatewayNatRuleProperties struct { + // The private IP address external mapping for NAT. + ExternalMappings []*VPNNatRuleMapping + + // The IP Configuration ID this NAT rule applies to. + IPConfigurationID *string + + // The private IP address internal mapping for NAT. + InternalMappings []*VPNNatRuleMapping + + // The Source NAT direction of a VPN NAT. + Mode *VPNNatRuleMode + + // The type of NAT rule for VPN NAT. + Type *VPNNatRuleType + + // READ-ONLY; The provisioning state of the NAT Rule resource. + ProvisioningState *ProvisioningState +} + +// VirtualNetworkGatewayPolicyGroup - Parameters for VirtualNetworkGatewayPolicyGroup. +type VirtualNetworkGatewayPolicyGroup struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of tVirtualNetworkGatewayPolicyGroup. + Properties *VirtualNetworkGatewayPolicyGroupProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// VirtualNetworkGatewayPolicyGroupMember - Vpn Client Connection configuration PolicyGroup member +type VirtualNetworkGatewayPolicyGroupMember struct { + // The Vpn Policy member attribute type. + AttributeType *VPNPolicyMemberAttributeType + + // The value of Attribute used for this VirtualNetworkGatewayPolicyGroupMember. + AttributeValue *string + + // Name of the VirtualNetworkGatewayPolicyGroupMember. + Name *string +} + +// VirtualNetworkGatewayPolicyGroupProperties - Properties of VirtualNetworkGatewayPolicyGroup. +type VirtualNetworkGatewayPolicyGroupProperties struct { + // REQUIRED; Shows if this is a Default VirtualNetworkGatewayPolicyGroup or not. + IsDefault *bool + + // REQUIRED; Multiple PolicyMembers for VirtualNetworkGatewayPolicyGroup. + PolicyMembers []*VirtualNetworkGatewayPolicyGroupMember + + // REQUIRED; Priority for VirtualNetworkGatewayPolicyGroup. + Priority *int32 + + // READ-ONLY; The provisioning state of the VirtualNetworkGatewayPolicyGroup resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; List of references to vngClientConnectionConfigurations. + VngClientConnectionConfigurations []*SubResource +} + +// VirtualNetworkGatewayPropertiesFormat - VirtualNetworkGateway properties. +type VirtualNetworkGatewayPropertiesFormat struct { + // ActiveActive flag. + Active *bool + + // Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the + // vnet + AdminState *AdminState + + // Configure this gateway to accept traffic from other Azure Virtual Networks. This configuration does not support connectivity + // to Azure Virtual WAN. + AllowRemoteVnetTraffic *bool + + // Configures this gateway to accept traffic from remote Virtual WAN networks. + AllowVirtualWanTraffic *bool + + // Autoscale configuration for virutal network gateway + AutoScaleConfiguration *VirtualNetworkGatewayAutoScaleConfiguration + + // Virtual network gateway's BGP speaker settings. + BgpSettings *BgpSettings + + // The reference to the address space resource which represents the custom routes address space specified by the customer + // for virtual network gateway and VpnClient. + CustomRoutes *AddressSpace + + // disableIPSecReplayProtection flag. + DisableIPSecReplayProtection *bool + + // Whether BGP is enabled for this virtual network gateway or not. + EnableBgp *bool + + // EnableBgpRouteTranslationForNat flag. + EnableBgpRouteTranslationForNat *bool + + // Whether dns forwarding is enabled or not. + EnableDNSForwarding *bool + + // Whether private IP needs to be enabled on this gateway for connections or not. + EnablePrivateIPAddress *bool + + // The reference to the LocalNetworkGateway resource which represents local network site having default routes. Assign Null + // value in case of removing existing default site setting. + GatewayDefaultSite *SubResource + + // The type of this virtual network gateway. + GatewayType *VirtualNetworkGatewayType + + // IP configurations for virtual network gateway. + IPConfigurations []*VirtualNetworkGatewayIPConfiguration + + // NatRules for virtual network gateway. + NatRules []*VirtualNetworkGatewayNatRule + + // Property to indicate if the Express Route Gateway has resiliency model of MultiHomed or SingleHomed + ResiliencyModel *ResiliencyModel + + // The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. + SKU *VirtualNetworkGatewaySKU + + // Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet. + VNetExtendedLocationResourceID *string + + // The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations. + VPNClientConfiguration *VPNClientConfiguration + + // The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. + VPNGatewayGeneration *VPNGatewayGeneration + + // The type of this virtual network gateway. + VPNType *VPNType + + // The reference to the VirtualNetworkGatewayPolicyGroup resource which represents the available VirtualNetworkGatewayPolicyGroup + // for the gateway. + VirtualNetworkGatewayPolicyGroups []*VirtualNetworkGatewayPolicyGroup + + // READ-ONLY; The IP address allocated by the gateway to which dns requests can be sent. + InboundDNSForwardingEndpoint *string + + // READ-ONLY; The provisioning state of the virtual network gateway resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the virtual network gateway resource. + ResourceGUID *string +} + +// VirtualNetworkGatewaySKU - VirtualNetworkGatewaySku details. +type VirtualNetworkGatewaySKU struct { + // Gateway SKU name. + Name *VirtualNetworkGatewaySKUName + + // Gateway SKU tier. + Tier *VirtualNetworkGatewaySKUTier + + // READ-ONLY; The capacity. + Capacity *int32 +} + +// VirtualNetworkListResult - Response for the ListVirtualNetworks API service call. +type VirtualNetworkListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of VirtualNetwork resources in a resource group. + Value []*VirtualNetwork +} + +// VirtualNetworkListUsageResult - Response for the virtual networks GetUsage API service call. +type VirtualNetworkListUsageResult struct { + // The URL to get the next set of results. + NextLink *string + + // READ-ONLY; VirtualNetwork usage stats. + Value []*VirtualNetworkUsage +} + +// VirtualNetworkPeering - Peerings in a virtual network resource. +type VirtualNetworkPeering struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the virtual network peering. + Properties *VirtualNetworkPeeringPropertiesFormat + + // Resource type. + Type *string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// VirtualNetworkPeeringListResult - Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual +// network. +type VirtualNetworkPeeringListResult struct { + // The URL to get the next set of results. + NextLink *string + + // The peerings in a virtual network. + Value []*VirtualNetworkPeering +} + +// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering. +type VirtualNetworkPeeringPropertiesFormat struct { + // Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. + AllowForwardedTraffic *bool + + // If gateway links can be used in remote virtual networking to link to this virtual network. + AllowGatewayTransit *bool + + // Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. + AllowVirtualNetworkAccess *bool + + // If we need to verify the provisioning state of the remote gateway. + DoNotVerifyRemoteGateways *bool + + // Whether only Ipv6 address space is peered for subnet peering. + EnableOnlyIPv6Peering *bool + + // The local address space of the local virtual network that is peered. + LocalAddressSpace *AddressSpace + + // List of local subnet names that are subnet peered with remote virtual network. + LocalSubnetNames []*string + + // The current local address space of the local virtual network that is peered. + LocalVirtualNetworkAddressSpace *AddressSpace + + // Whether complete virtual network address space is peered. + PeerCompleteVnets *bool + + // The status of the virtual network peering. + PeeringState *VirtualNetworkPeeringState + + // The peering sync status of the virtual network peering. + PeeringSyncLevel *VirtualNetworkPeeringLevel + + // The reference to the address space peered with the remote virtual network. + RemoteAddressSpace *AddressSpace + + // The reference to the remote virtual network's Bgp Communities. + RemoteBgpCommunities *VirtualNetworkBgpCommunities + + // List of remote subnet names from remote virtual network that are subnet peered. + RemoteSubnetNames []*string + + // The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). + // See here to register for the preview and learn more + // (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + RemoteVirtualNetwork *SubResource + + // The reference to the current address space of the remote virtual network. + RemoteVirtualNetworkAddressSpace *AddressSpace + + // If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering + // is also true, virtual network will use gateways of remote virtual network + // for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a + // gateway. + UseRemoteGateways *bool + + // READ-ONLY; The provisioning state of the virtual network peering resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The reference to the remote virtual network's encryption + RemoteVirtualNetworkEncryption *VirtualNetworkEncryption + + // READ-ONLY; The resourceGuid property of the Virtual Network peering resource. + ResourceGUID *string +} + +// VirtualNetworkPropertiesFormat - Properties of the virtual network. +type VirtualNetworkPropertiesFormat struct { + // The AddressSpace that contains an array of IP address ranges that can be used by subnets. + AddressSpace *AddressSpace + + // Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. + BgpCommunities *VirtualNetworkBgpCommunities + + // The DDoS protection plan associated with the virtual network. + DdosProtectionPlan *SubResource + + // The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. + DhcpOptions *DhcpOptions + + // Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection + // plan associated with the resource. + EnableDdosProtection *bool + + // Indicates if VM protection is enabled for all the subnets in the virtual network. + EnableVMProtection *bool + + // Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. + Encryption *VirtualNetworkEncryption + + // The FlowTimeout value (in minutes) for the Virtual Network + FlowTimeoutInMinutes *int32 + + // Array of IpAllocation which reference this VNET. + IPAllocations []*SubResource + + // Private Endpoint VNet Policies. + PrivateEndpointVNetPolicies *PrivateEndpointVNetPolicies + + // A list of subnets in a Virtual Network. + Subnets []*Subnet + + // A list of peerings in a Virtual Network. + VirtualNetworkPeerings []*VirtualNetworkPeering + + // READ-ONLY; A collection of references to flow log resources. + FlowLogs []*FlowLog + + // READ-ONLY; The provisioning state of the virtual network resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resourceGuid property of the Virtual Network resource. + ResourceGUID *string +} + +// VirtualNetworkTap - Virtual Network Tap resource. +type VirtualNetworkTap struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Virtual Network Tap Properties. + Properties *VirtualNetworkTapPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualNetworkTapListResult - Response for ListVirtualNetworkTap API service call. +type VirtualNetworkTapListResult struct { + // The URL to get the next set of results. + NextLink *string + + // A list of VirtualNetworkTaps in a resource group. + Value []*VirtualNetworkTap +} + +// VirtualNetworkTapPropertiesFormat - Virtual Network Tap properties. +type VirtualNetworkTapPropertiesFormat struct { + // The reference to the private IP address on the internal Load Balancer that will receive the tap. + DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration + + // The reference to the private IP Address of the collector nic that will receive the tap. + DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration + + // The VXLAN destination port that will receive the tapped traffic. + DestinationPort *int32 + + // READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped. + NetworkInterfaceTapConfigurations []*InterfaceTapConfiguration + + // READ-ONLY; The provisioning state of the virtual network tap resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The resource GUID property of the virtual network tap resource. + ResourceGUID *string +} + +// VirtualNetworkUsage - Usage details for subnet. +type VirtualNetworkUsage struct { + // READ-ONLY; Indicates number of IPs used from the Subnet. + CurrentValue *float64 + + // READ-ONLY; Subnet identifier. + ID *string + + // READ-ONLY; Indicates the size of the subnet. + Limit *float64 + + // READ-ONLY; The name containing common and localized value for usage. + Name *VirtualNetworkUsageName + + // READ-ONLY; Usage units. Returns 'Count'. + Unit *string +} + +// VirtualNetworkUsageName - Usage strings container. +type VirtualNetworkUsageName struct { + // READ-ONLY; Localized subnet size and usage string. + LocalizedValue *string + + // READ-ONLY; Subnet size and usage string. + Value *string +} + +// VirtualRouter Resource. +type VirtualRouter struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the Virtual Router. + Properties *VirtualRouterPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualRouterAutoScaleConfiguration - The VirtualHub Router autoscale configuration. +type VirtualRouterAutoScaleConfiguration struct { + // The minimum number of scale units for VirtualHub Router. + MinCapacity *int32 +} + +// VirtualRouterListResult - Response for ListVirtualRouters API service call. +type VirtualRouterListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of Virtual Routers. + Value []*VirtualRouter +} + +// VirtualRouterPeering - Virtual Router Peering resource. +type VirtualRouterPeering struct { + // Resource ID. + ID *string + + // Name of the virtual router peering that is unique within a virtual router. + Name *string + + // The properties of the Virtual Router Peering. + Properties *VirtualRouterPeeringProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Peering type. + Type *string +} + +// VirtualRouterPeeringListResult - Response for ListVirtualRouterPeerings API service call. +type VirtualRouterPeeringListResult struct { + // URL to get the next set of results. + NextLink *string + + // List of VirtualRouterPeerings in a VirtualRouter. + Value []*VirtualRouterPeering +} + +// VirtualRouterPeeringProperties - Properties of the rule group. +type VirtualRouterPeeringProperties struct { + // Peer ASN. + PeerAsn *int64 + + // Peer IP. + PeerIP *string + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState +} + +// VirtualRouterPropertiesFormat - Virtual Router definition. +type VirtualRouterPropertiesFormat struct { + // The Gateway on which VirtualRouter is hosted. + HostedGateway *SubResource + + // The Subnet on which VirtualRouter is hosted. + HostedSubnet *SubResource + + // VirtualRouter ASN. + VirtualRouterAsn *int64 + + // VirtualRouter IPs. + VirtualRouterIPs []*string + + // READ-ONLY; List of references to VirtualRouterPeerings. + Peerings []*SubResource + + // READ-ONLY; The provisioning state of the resource. + ProvisioningState *ProvisioningState +} + +// VirtualWAN Resource. +type VirtualWAN struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the virtual WAN. + Properties *VirtualWanProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// VirtualWanProperties - Parameters for VirtualWAN. +type VirtualWanProperties struct { + // True if branch to branch traffic is allowed. + AllowBranchToBranchTraffic *bool + + // True if Vnet to Vnet traffic is allowed. + AllowVnetToVnetTraffic *bool + + // Vpn encryption to be disabled or not. + DisableVPNEncryption *bool + + // The type of the VirtualWAN. + Type *string + + // READ-ONLY; The office local breakout category. + Office365LocalBreakoutCategory *OfficeTrafficCategory + + // READ-ONLY; The provisioning state of the virtual WAN resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; List of VpnSites in the VirtualWAN. + VPNSites []*SubResource + + // READ-ONLY; List of VirtualHubs in the VirtualWAN. + VirtualHubs []*SubResource +} + +// VirtualWanSecurityProvider - Collection of SecurityProviders. +type VirtualWanSecurityProvider struct { + // Name of the security provider. + Name *string + + // Url of the security provider. + URL *string + + // READ-ONLY; Name of the security provider. + Type *VirtualWanSecurityProviderType +} + +// VirtualWanSecurityProviders - Collection of SecurityProviders. +type VirtualWanSecurityProviders struct { + // List of VirtualWAN security providers. + SupportedProviders []*VirtualWanSecurityProvider +} + +// VirtualWanVPNProfileParameters - Virtual Wan Vpn profile parameters Vpn profile generation. +type VirtualWanVPNProfileParameters struct { + // VPN client authentication method. + AuthenticationMethod *AuthenticationMethod + + // VpnServerConfiguration partial resource uri with which VirtualWan is associated to. + VPNServerConfigurationResourceID *string +} + +// VnetRoute - List of routes that control routing from VirtualHub into a virtual network connection. +type VnetRoute struct { + // List of all Static Routes. + StaticRoutes []*StaticRoute + + // Configuration for static routes on this HubVnetConnection. + StaticRoutesConfig *StaticRoutesConfig + + // READ-ONLY; The list of references to HubBgpConnection objects. + BgpConnections []*SubResource +} + +// VngClientConnectionConfiguration - A vpn client connection configuration for client connection configuration. +type VngClientConnectionConfiguration struct { + // Resource ID. + ID *string + + // The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // Properties of the vpn client root certificate. + Properties *VngClientConnectionConfigurationProperties + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// VngClientConnectionConfigurationProperties - Properties of VngClientConnectionConfiguration. +type VngClientConnectionConfigurationProperties struct { + // REQUIRED; The reference to the address space resource which represents Address space for P2S VpnClient. + VPNClientAddressPool *AddressSpace + + // REQUIRED; List of references to virtualNetworkGatewayPolicyGroups + VirtualNetworkGatewayPolicyGroups []*SubResource + + // READ-ONLY; The provisioning state of the VngClientConnectionConfiguration resource. + ProvisioningState *ProvisioningState +} + +// Watcher - Network watcher in a resource group. +type Watcher struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the network watcher. + Properties *WatcherPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// WatcherListResult - Response for ListNetworkWatchers API service call. +type WatcherListResult struct { + // List of network watcher resources. + Value []*Watcher +} + +// WatcherPropertiesFormat - The network watcher properties. +type WatcherPropertiesFormat struct { + // READ-ONLY; The provisioning state of the network watcher resource. + ProvisioningState *ProvisioningState +} + +// WebApplicationFirewallCustomRule - Defines contents of a web application rule. +type WebApplicationFirewallCustomRule struct { + // REQUIRED; Type of Actions. + Action *WebApplicationFirewallAction + + // REQUIRED; List of match conditions. + MatchConditions []*MatchCondition + + // REQUIRED; Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. + Priority *int32 + + // REQUIRED; The rule type. + RuleType *WebApplicationFirewallRuleType + + // List of user session identifier group by clauses. + GroupByUserSession []*GroupByUserSession + + // The name of the resource that is unique within a policy. This name can be used to access the resource. + Name *string + + // Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule. + RateLimitDuration *ApplicationGatewayFirewallRateLimitDuration + + // Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1 + RateLimitThreshold *int32 + + // Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. + State *WebApplicationFirewallState + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string +} + +// WebApplicationFirewallPolicy - Defines web application firewall policy. +type WebApplicationFirewallPolicy struct { + // Resource ID. + ID *string + + // Resource location. + Location *string + + // Properties of the web application firewall policy. + Properties *WebApplicationFirewallPolicyPropertiesFormat + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string + + // READ-ONLY; Resource name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// WebApplicationFirewallPolicyListResult - Result of the request to list WebApplicationFirewallPolicies. It contains a list +// of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. +type WebApplicationFirewallPolicyListResult struct { + // READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + NextLink *string + + // READ-ONLY; List of WebApplicationFirewallPolicies within a resource group. + Value []*WebApplicationFirewallPolicy +} + +// WebApplicationFirewallPolicyPropertiesFormat - Defines web application firewall policy properties. +type WebApplicationFirewallPolicyPropertiesFormat struct { + // REQUIRED; Describes the managedRules structure. + ManagedRules *ManagedRulesDefinition + + // The custom rules inside the policy. + CustomRules []*WebApplicationFirewallCustomRule + + // The PolicySettings for policy. + PolicySettings *PolicySettings + + // READ-ONLY; A collection of references to application gateway for containers. + ApplicationGatewayForContainers []*ApplicationGatewayForContainersReferenceDefinition + + // READ-ONLY; A collection of references to application gateways. + ApplicationGateways []*ApplicationGateway + + // READ-ONLY; A collection of references to application gateway http listeners. + HTTPListeners []*SubResource + + // READ-ONLY; A collection of references to application gateway path rules. + PathBasedRules []*SubResource + + // READ-ONLY; The provisioning state of the web application firewall policy resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Resource status of the policy. + ResourceState *WebApplicationFirewallPolicyResourceState +} + +// WebApplicationFirewallScrubbingRules - Allow certain variables to be scrubbed on WAF logs +type WebApplicationFirewallScrubbingRules struct { + // REQUIRED; The variable to be scrubbed from the logs. + MatchVariable *ScrubbingRuleEntryMatchVariable + + // REQUIRED; When matchVariable is a collection, operate on the selector to specify which elements in the collection this + // rule applies to. + SelectorMatchOperator *ScrubbingRuleEntryMatchOperator + + // When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to. + Selector *string + + // Defines the state of log scrubbing rule. Default value is Enabled. + State *ScrubbingRuleEntryState +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/models_serde.go new file mode 100644 index 00000000..f9540543 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/models_serde.go @@ -0,0 +1,37764 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AADAuthenticationParameters. +func (a AADAuthenticationParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadAudience", a.AADAudience) + populate(objectMap, "aadIssuer", a.AADIssuer) + populate(objectMap, "aadTenant", a.AADTenant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AADAuthenticationParameters. +func (a *AADAuthenticationParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadAudience": + err = unpopulate(val, "AADAudience", &a.AADAudience) + delete(rawMsg, key) + case "aadIssuer": + err = unpopulate(val, "AADIssuer", &a.AADIssuer) + delete(rawMsg, key) + case "aadTenant": + err = unpopulate(val, "AADTenant", &a.AADTenant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Action. +func (a Action) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "parameters", a.Parameters) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Action. +func (a *Action) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "parameters": + err = unpopulate(val, "Parameters", &a.Parameters) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ActiveBaseSecurityAdminRule. +func (a ActiveBaseSecurityAdminRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "commitTime", a.CommitTime) + populate(objectMap, "configurationDescription", a.ConfigurationDescription) + populate(objectMap, "id", a.ID) + objectMap["kind"] = a.Kind + populate(objectMap, "region", a.Region) + populate(objectMap, "ruleCollectionAppliesToGroups", a.RuleCollectionAppliesToGroups) + populate(objectMap, "ruleCollectionDescription", a.RuleCollectionDescription) + populate(objectMap, "ruleGroups", a.RuleGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveBaseSecurityAdminRule. +func (a *ActiveBaseSecurityAdminRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "commitTime": + err = unpopulateDateTimeRFC3339(val, "CommitTime", &a.CommitTime) + delete(rawMsg, key) + case "configurationDescription": + err = unpopulate(val, "ConfigurationDescription", &a.ConfigurationDescription) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &a.Region) + delete(rawMsg, key) + case "ruleCollectionAppliesToGroups": + err = unpopulate(val, "RuleCollectionAppliesToGroups", &a.RuleCollectionAppliesToGroups) + delete(rawMsg, key) + case "ruleCollectionDescription": + err = unpopulate(val, "RuleCollectionDescription", &a.RuleCollectionDescription) + delete(rawMsg, key) + case "ruleGroups": + err = unpopulate(val, "RuleGroups", &a.RuleGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ActiveConfigurationParameter. +func (a ActiveConfigurationParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "regions", a.Regions) + populate(objectMap, "skipToken", a.SkipToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveConfigurationParameter. +func (a *ActiveConfigurationParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "regions": + err = unpopulate(val, "Regions", &a.Regions) + delete(rawMsg, key) + case "skipToken": + err = unpopulate(val, "SkipToken", &a.SkipToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ActiveConnectivityConfiguration. +func (a ActiveConnectivityConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "commitTime", a.CommitTime) + populate(objectMap, "configurationGroups", a.ConfigurationGroups) + populate(objectMap, "id", a.ID) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "region", a.Region) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveConnectivityConfiguration. +func (a *ActiveConnectivityConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "commitTime": + err = unpopulateDateTimeRFC3339(val, "CommitTime", &a.CommitTime) + delete(rawMsg, key) + case "configurationGroups": + err = unpopulate(val, "ConfigurationGroups", &a.ConfigurationGroups) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &a.Region) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ActiveConnectivityConfigurationsListResult. +func (a ActiveConnectivityConfigurationsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "skipToken", a.SkipToken) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveConnectivityConfigurationsListResult. +func (a *ActiveConnectivityConfigurationsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "skipToken": + err = unpopulate(val, "SkipToken", &a.SkipToken) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ActiveDefaultSecurityAdminRule. +func (a ActiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "commitTime", a.CommitTime) + populate(objectMap, "configurationDescription", a.ConfigurationDescription) + populate(objectMap, "id", a.ID) + objectMap["kind"] = EffectiveAdminRuleKindDefault + populate(objectMap, "properties", a.Properties) + populate(objectMap, "region", a.Region) + populate(objectMap, "ruleCollectionAppliesToGroups", a.RuleCollectionAppliesToGroups) + populate(objectMap, "ruleCollectionDescription", a.RuleCollectionDescription) + populate(objectMap, "ruleGroups", a.RuleGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDefaultSecurityAdminRule. +func (a *ActiveDefaultSecurityAdminRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "commitTime": + err = unpopulateDateTimeRFC3339(val, "CommitTime", &a.CommitTime) + delete(rawMsg, key) + case "configurationDescription": + err = unpopulate(val, "ConfigurationDescription", &a.ConfigurationDescription) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &a.Region) + delete(rawMsg, key) + case "ruleCollectionAppliesToGroups": + err = unpopulate(val, "RuleCollectionAppliesToGroups", &a.RuleCollectionAppliesToGroups) + delete(rawMsg, key) + case "ruleCollectionDescription": + err = unpopulate(val, "RuleCollectionDescription", &a.RuleCollectionDescription) + delete(rawMsg, key) + case "ruleGroups": + err = unpopulate(val, "RuleGroups", &a.RuleGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ActiveSecurityAdminRule. +func (a ActiveSecurityAdminRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "commitTime", a.CommitTime) + populate(objectMap, "configurationDescription", a.ConfigurationDescription) + populate(objectMap, "id", a.ID) + objectMap["kind"] = EffectiveAdminRuleKindCustom + populate(objectMap, "properties", a.Properties) + populate(objectMap, "region", a.Region) + populate(objectMap, "ruleCollectionAppliesToGroups", a.RuleCollectionAppliesToGroups) + populate(objectMap, "ruleCollectionDescription", a.RuleCollectionDescription) + populate(objectMap, "ruleGroups", a.RuleGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveSecurityAdminRule. +func (a *ActiveSecurityAdminRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "commitTime": + err = unpopulateDateTimeRFC3339(val, "CommitTime", &a.CommitTime) + delete(rawMsg, key) + case "configurationDescription": + err = unpopulate(val, "ConfigurationDescription", &a.ConfigurationDescription) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &a.Region) + delete(rawMsg, key) + case "ruleCollectionAppliesToGroups": + err = unpopulate(val, "RuleCollectionAppliesToGroups", &a.RuleCollectionAppliesToGroups) + delete(rawMsg, key) + case "ruleCollectionDescription": + err = unpopulate(val, "RuleCollectionDescription", &a.RuleCollectionDescription) + delete(rawMsg, key) + case "ruleGroups": + err = unpopulate(val, "RuleGroups", &a.RuleGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ActiveSecurityAdminRulesListResult. +func (a ActiveSecurityAdminRulesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "skipToken", a.SkipToken) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ActiveSecurityAdminRulesListResult. +func (a *ActiveSecurityAdminRulesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "skipToken": + err = unpopulate(val, "SkipToken", &a.SkipToken) + delete(rawMsg, key) + case "value": + a.Value, err = unmarshalActiveBaseSecurityAdminRuleClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddressPrefixItem. +func (a AddressPrefixItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefix", a.AddressPrefix) + populate(objectMap, "addressPrefixType", a.AddressPrefixType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddressPrefixItem. +func (a *AddressPrefixItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &a.AddressPrefix) + delete(rawMsg, key) + case "addressPrefixType": + err = unpopulate(val, "AddressPrefixType", &a.AddressPrefixType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddressSpace. +func (a AddressSpace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", a.AddressPrefixes) + populate(objectMap, "ipamPoolPrefixAllocations", a.IpamPoolPrefixAllocations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddressSpace. +func (a *AddressSpace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &a.AddressPrefixes) + delete(rawMsg, key) + case "ipamPoolPrefixAllocations": + err = unpopulate(val, "IpamPoolPrefixAllocations", &a.IpamPoolPrefixAllocations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdminPropertiesFormat. +func (a AdminPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "access", a.Access) + populate(objectMap, "description", a.Description) + populate(objectMap, "destinationPortRanges", a.DestinationPortRanges) + populate(objectMap, "destinations", a.Destinations) + populate(objectMap, "direction", a.Direction) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "resourceGuid", a.ResourceGUID) + populate(objectMap, "sourcePortRanges", a.SourcePortRanges) + populate(objectMap, "sources", a.Sources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdminPropertiesFormat. +func (a *AdminPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "access": + err = unpopulate(val, "Access", &a.Access) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "destinationPortRanges": + err = unpopulate(val, "DestinationPortRanges", &a.DestinationPortRanges) + delete(rawMsg, key) + case "destinations": + err = unpopulate(val, "Destinations", &a.Destinations) + delete(rawMsg, key) + case "direction": + err = unpopulate(val, "Direction", &a.Direction) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &a.Priority) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &a.ResourceGUID) + delete(rawMsg, key) + case "sourcePortRanges": + err = unpopulate(val, "SourcePortRanges", &a.SourcePortRanges) + delete(rawMsg, key) + case "sources": + err = unpopulate(val, "Sources", &a.Sources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdminRule. +func (a AdminRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + objectMap["kind"] = AdminRuleKindCustom + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRule. +func (a *AdminRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdminRuleCollection. +func (a AdminRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRuleCollection. +func (a *AdminRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdminRuleCollectionListResult. +func (a AdminRuleCollectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRuleCollectionListResult. +func (a *AdminRuleCollectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdminRuleCollectionPropertiesFormat. +func (a AdminRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appliesToGroups", a.AppliesToGroups) + populate(objectMap, "description", a.Description) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "resourceGuid", a.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRuleCollectionPropertiesFormat. +func (a *AdminRuleCollectionPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appliesToGroups": + err = unpopulate(val, "AppliesToGroups", &a.AppliesToGroups) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &a.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AdminRuleListResult. +func (a AdminRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRuleListResult. +func (a *AdminRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + a.Value, err = unmarshalBaseAdminRuleClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGateway. +func (a ApplicationGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + populate(objectMap, "zones", a.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGateway. +func (a *ApplicationGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &a.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAuthenticationCertificate. +func (a ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAuthenticationCertificate. +func (a *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAuthenticationCertificatePropertiesFormat. +func (a ApplicationGatewayAuthenticationCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", a.Data) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAuthenticationCertificatePropertiesFormat. +func (a *ApplicationGatewayAuthenticationCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &a.Data) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAutoscaleConfiguration. +func (a ApplicationGatewayAutoscaleConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxCapacity", a.MaxCapacity) + populate(objectMap, "minCapacity", a.MinCapacity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAutoscaleConfiguration. +func (a *ApplicationGatewayAutoscaleConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxCapacity": + err = unpopulate(val, "MaxCapacity", &a.MaxCapacity) + delete(rawMsg, key) + case "minCapacity": + err = unpopulate(val, "MinCapacity", &a.MinCapacity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLOptions. +func (a ApplicationGatewayAvailableSSLOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAvailableSSLOptions. +func (a *ApplicationGatewayAvailableSSLOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLOptionsPropertiesFormat. +func (a ApplicationGatewayAvailableSSLOptionsPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableCipherSuites", a.AvailableCipherSuites) + populate(objectMap, "availableProtocols", a.AvailableProtocols) + populate(objectMap, "defaultPolicy", a.DefaultPolicy) + populate(objectMap, "predefinedPolicies", a.PredefinedPolicies) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAvailableSSLOptionsPropertiesFormat. +func (a *ApplicationGatewayAvailableSSLOptionsPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableCipherSuites": + err = unpopulate(val, "AvailableCipherSuites", &a.AvailableCipherSuites) + delete(rawMsg, key) + case "availableProtocols": + err = unpopulate(val, "AvailableProtocols", &a.AvailableProtocols) + delete(rawMsg, key) + case "defaultPolicy": + err = unpopulate(val, "DefaultPolicy", &a.DefaultPolicy) + delete(rawMsg, key) + case "predefinedPolicies": + err = unpopulate(val, "PredefinedPolicies", &a.PredefinedPolicies) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLPredefinedPolicies. +func (a ApplicationGatewayAvailableSSLPredefinedPolicies) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAvailableSSLPredefinedPolicies. +func (a *ApplicationGatewayAvailableSSLPredefinedPolicies) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableWafRuleSetsResult. +func (a ApplicationGatewayAvailableWafRuleSetsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayAvailableWafRuleSetsResult. +func (a *ApplicationGatewayAvailableWafRuleSetsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddress. +func (a ApplicationGatewayBackendAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fqdn", a.Fqdn) + populate(objectMap, "ipAddress", a.IPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendAddress. +func (a *ApplicationGatewayBackendAddress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fqdn": + err = unpopulate(val, "Fqdn", &a.Fqdn) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &a.IPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddressPool. +func (a ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendAddressPool. +func (a *ApplicationGatewayBackendAddressPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddressPoolPropertiesFormat. +func (a ApplicationGatewayBackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddresses", a.BackendAddresses) + populate(objectMap, "backendIPConfigurations", a.BackendIPConfigurations) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendAddressPoolPropertiesFormat. +func (a *ApplicationGatewayBackendAddressPoolPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddresses": + err = unpopulate(val, "BackendAddresses", &a.BackendAddresses) + delete(rawMsg, key) + case "backendIPConfigurations": + err = unpopulate(val, "BackendIPConfigurations", &a.BackendIPConfigurations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHTTPSettings. +func (a ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHTTPSettings. +func (a *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHTTPSettingsPropertiesFormat. +func (a ApplicationGatewayBackendHTTPSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affinityCookieName", a.AffinityCookieName) + populate(objectMap, "authenticationCertificates", a.AuthenticationCertificates) + populate(objectMap, "connectionDraining", a.ConnectionDraining) + populate(objectMap, "cookieBasedAffinity", a.CookieBasedAffinity) + populate(objectMap, "hostName", a.HostName) + populate(objectMap, "path", a.Path) + populate(objectMap, "pickHostNameFromBackendAddress", a.PickHostNameFromBackendAddress) + populate(objectMap, "port", a.Port) + populate(objectMap, "probe", a.Probe) + populate(objectMap, "probeEnabled", a.ProbeEnabled) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "requestTimeout", a.RequestTimeout) + populate(objectMap, "trustedRootCertificates", a.TrustedRootCertificates) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHTTPSettingsPropertiesFormat. +func (a *ApplicationGatewayBackendHTTPSettingsPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affinityCookieName": + err = unpopulate(val, "AffinityCookieName", &a.AffinityCookieName) + delete(rawMsg, key) + case "authenticationCertificates": + err = unpopulate(val, "AuthenticationCertificates", &a.AuthenticationCertificates) + delete(rawMsg, key) + case "connectionDraining": + err = unpopulate(val, "ConnectionDraining", &a.ConnectionDraining) + delete(rawMsg, key) + case "cookieBasedAffinity": + err = unpopulate(val, "CookieBasedAffinity", &a.CookieBasedAffinity) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &a.HostName) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &a.Path) + delete(rawMsg, key) + case "pickHostNameFromBackendAddress": + err = unpopulate(val, "PickHostNameFromBackendAddress", &a.PickHostNameFromBackendAddress) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &a.Port) + delete(rawMsg, key) + case "probe": + err = unpopulate(val, "Probe", &a.Probe) + delete(rawMsg, key) + case "probeEnabled": + err = unpopulate(val, "ProbeEnabled", &a.ProbeEnabled) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "requestTimeout": + err = unpopulate(val, "RequestTimeout", &a.RequestTimeout) + delete(rawMsg, key) + case "trustedRootCertificates": + err = unpopulate(val, "TrustedRootCertificates", &a.TrustedRootCertificates) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealth. +func (a ApplicationGatewayBackendHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPools", a.BackendAddressPools) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHealth. +func (a *ApplicationGatewayBackendHealth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPools": + err = unpopulate(val, "BackendAddressPools", &a.BackendAddressPools) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthHTTPSettings. +func (a ApplicationGatewayBackendHealthHTTPSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) + populate(objectMap, "servers", a.Servers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHealthHTTPSettings. +func (a *ApplicationGatewayBackendHealthHTTPSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendHttpSettings": + err = unpopulate(val, "BackendHTTPSettings", &a.BackendHTTPSettings) + delete(rawMsg, key) + case "servers": + err = unpopulate(val, "Servers", &a.Servers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthOnDemand. +func (a ApplicationGatewayBackendHealthOnDemand) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPool", a.BackendAddressPool) + populate(objectMap, "backendHealthHttpSettings", a.BackendHealthHTTPSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHealthOnDemand. +func (a *ApplicationGatewayBackendHealthOnDemand) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPool": + err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) + delete(rawMsg, key) + case "backendHealthHttpSettings": + err = unpopulate(val, "BackendHealthHTTPSettings", &a.BackendHealthHTTPSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthPool. +func (a ApplicationGatewayBackendHealthPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPool", a.BackendAddressPool) + populate(objectMap, "backendHttpSettingsCollection", a.BackendHTTPSettingsCollection) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHealthPool. +func (a *ApplicationGatewayBackendHealthPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPool": + err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) + delete(rawMsg, key) + case "backendHttpSettingsCollection": + err = unpopulate(val, "BackendHTTPSettingsCollection", &a.BackendHTTPSettingsCollection) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthServer. +func (a ApplicationGatewayBackendHealthServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", a.Address) + populate(objectMap, "health", a.Health) + populate(objectMap, "healthProbeLog", a.HealthProbeLog) + populate(objectMap, "ipConfiguration", a.IPConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendHealthServer. +func (a *ApplicationGatewayBackendHealthServer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &a.Address) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &a.Health) + delete(rawMsg, key) + case "healthProbeLog": + err = unpopulate(val, "HealthProbeLog", &a.HealthProbeLog) + delete(rawMsg, key) + case "ipConfiguration": + err = unpopulate(val, "IPConfiguration", &a.IPConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendSettings. +func (a ApplicationGatewayBackendSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendSettings. +func (a *ApplicationGatewayBackendSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendSettingsPropertiesFormat. +func (a ApplicationGatewayBackendSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostName", a.HostName) + populate(objectMap, "pickHostNameFromBackendAddress", a.PickHostNameFromBackendAddress) + populate(objectMap, "port", a.Port) + populate(objectMap, "probe", a.Probe) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "timeout", a.Timeout) + populate(objectMap, "trustedRootCertificates", a.TrustedRootCertificates) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayBackendSettingsPropertiesFormat. +func (a *ApplicationGatewayBackendSettingsPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostName": + err = unpopulate(val, "HostName", &a.HostName) + delete(rawMsg, key) + case "pickHostNameFromBackendAddress": + err = unpopulate(val, "PickHostNameFromBackendAddress", &a.PickHostNameFromBackendAddress) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &a.Port) + delete(rawMsg, key) + case "probe": + err = unpopulate(val, "Probe", &a.Probe) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &a.Timeout) + delete(rawMsg, key) + case "trustedRootCertificates": + err = unpopulate(val, "TrustedRootCertificates", &a.TrustedRootCertificates) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayClientAuthConfiguration. +func (a ApplicationGatewayClientAuthConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "verifyClientCertIssuerDN", a.VerifyClientCertIssuerDN) + populate(objectMap, "verifyClientRevocation", a.VerifyClientRevocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayClientAuthConfiguration. +func (a *ApplicationGatewayClientAuthConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "verifyClientCertIssuerDN": + err = unpopulate(val, "VerifyClientCertIssuerDN", &a.VerifyClientCertIssuerDN) + delete(rawMsg, key) + case "verifyClientRevocation": + err = unpopulate(val, "VerifyClientRevocation", &a.VerifyClientRevocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayConnectionDraining. +func (a ApplicationGatewayConnectionDraining) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "drainTimeoutInSec", a.DrainTimeoutInSec) + populate(objectMap, "enabled", a.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayConnectionDraining. +func (a *ApplicationGatewayConnectionDraining) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "drainTimeoutInSec": + err = unpopulate(val, "DrainTimeoutInSec", &a.DrainTimeoutInSec) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayCustomError. +func (a ApplicationGatewayCustomError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customErrorPageUrl", a.CustomErrorPageURL) + populate(objectMap, "statusCode", a.StatusCode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayCustomError. +func (a *ApplicationGatewayCustomError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customErrorPageUrl": + err = unpopulate(val, "CustomErrorPageURL", &a.CustomErrorPageURL) + delete(rawMsg, key) + case "statusCode": + err = unpopulate(val, "StatusCode", &a.StatusCode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallDisabledRuleGroup. +func (a ApplicationGatewayFirewallDisabledRuleGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ruleGroupName", a.RuleGroupName) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallDisabledRuleGroup. +func (a *ApplicationGatewayFirewallDisabledRuleGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ruleGroupName": + err = unpopulate(val, "RuleGroupName", &a.RuleGroupName) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &a.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallExclusion. +func (a ApplicationGatewayFirewallExclusion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchVariable", a.MatchVariable) + populate(objectMap, "selector", a.Selector) + populate(objectMap, "selectorMatchOperator", a.SelectorMatchOperator) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallExclusion. +func (a *ApplicationGatewayFirewallExclusion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchVariable": + err = unpopulate(val, "MatchVariable", &a.MatchVariable) + delete(rawMsg, key) + case "selector": + err = unpopulate(val, "Selector", &a.Selector) + delete(rawMsg, key) + case "selectorMatchOperator": + err = unpopulate(val, "SelectorMatchOperator", &a.SelectorMatchOperator) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallManifestRuleSet. +func (a ApplicationGatewayFirewallManifestRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ruleGroups", a.RuleGroups) + populate(objectMap, "ruleSetType", a.RuleSetType) + populate(objectMap, "ruleSetVersion", a.RuleSetVersion) + populate(objectMap, "status", a.Status) + populate(objectMap, "tiers", a.Tiers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallManifestRuleSet. +func (a *ApplicationGatewayFirewallManifestRuleSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ruleGroups": + err = unpopulate(val, "RuleGroups", &a.RuleGroups) + delete(rawMsg, key) + case "ruleSetType": + err = unpopulate(val, "RuleSetType", &a.RuleSetType) + delete(rawMsg, key) + case "ruleSetVersion": + err = unpopulate(val, "RuleSetVersion", &a.RuleSetVersion) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "tiers": + err = unpopulate(val, "Tiers", &a.Tiers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRule. +func (a ApplicationGatewayFirewallRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", a.Action) + populate(objectMap, "description", a.Description) + populate(objectMap, "ruleId", a.RuleID) + populate(objectMap, "ruleIdString", a.RuleIDString) + populate(objectMap, "sensitivity", a.Sensitivity) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallRule. +func (a *ApplicationGatewayFirewallRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &a.Action) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "ruleId": + err = unpopulate(val, "RuleID", &a.RuleID) + delete(rawMsg, key) + case "ruleIdString": + err = unpopulate(val, "RuleIDString", &a.RuleIDString) + delete(rawMsg, key) + case "sensitivity": + err = unpopulate(val, "Sensitivity", &a.Sensitivity) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleGroup. +func (a ApplicationGatewayFirewallRuleGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "ruleGroupName", a.RuleGroupName) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallRuleGroup. +func (a *ApplicationGatewayFirewallRuleGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "ruleGroupName": + err = unpopulate(val, "RuleGroupName", &a.RuleGroupName) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &a.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleSet. +func (a ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallRuleSet. +func (a *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleSetPropertiesFormat. +func (a ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "ruleGroups", a.RuleGroups) + populate(objectMap, "ruleSetType", a.RuleSetType) + populate(objectMap, "ruleSetVersion", a.RuleSetVersion) + populate(objectMap, "tiers", a.Tiers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFirewallRuleSetPropertiesFormat. +func (a *ApplicationGatewayFirewallRuleSetPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "ruleGroups": + err = unpopulate(val, "RuleGroups", &a.RuleGroups) + delete(rawMsg, key) + case "ruleSetType": + err = unpopulate(val, "RuleSetType", &a.RuleSetType) + delete(rawMsg, key) + case "ruleSetVersion": + err = unpopulate(val, "RuleSetVersion", &a.RuleSetVersion) + delete(rawMsg, key) + case "tiers": + err = unpopulate(val, "Tiers", &a.Tiers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayForContainersReferenceDefinition. +func (a ApplicationGatewayForContainersReferenceDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayForContainersReferenceDefinition. +func (a *ApplicationGatewayForContainersReferenceDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendIPConfiguration. +func (a ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFrontendIPConfiguration. +func (a *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendIPConfigurationPropertiesFormat. +func (a ApplicationGatewayFrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateIPAddress", a.PrivateIPAddress) + populate(objectMap, "privateIPAllocationMethod", a.PrivateIPAllocationMethod) + populate(objectMap, "privateLinkConfiguration", a.PrivateLinkConfiguration) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "publicIPAddress", a.PublicIPAddress) + populate(objectMap, "subnet", a.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFrontendIPConfigurationPropertiesFormat. +func (a *ApplicationGatewayFrontendIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &a.PrivateIPAddress) + delete(rawMsg, key) + case "privateIPAllocationMethod": + err = unpopulate(val, "PrivateIPAllocationMethod", &a.PrivateIPAllocationMethod) + delete(rawMsg, key) + case "privateLinkConfiguration": + err = unpopulate(val, "PrivateLinkConfiguration", &a.PrivateLinkConfiguration) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddress": + err = unpopulate(val, "PublicIPAddress", &a.PublicIPAddress) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &a.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendPort. +func (a ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFrontendPort. +func (a *ApplicationGatewayFrontendPort) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendPortPropertiesFormat. +func (a ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "port", a.Port) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayFrontendPortPropertiesFormat. +func (a *ApplicationGatewayFrontendPortPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "port": + err = unpopulate(val, "Port", &a.Port) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayGlobalConfiguration. +func (a ApplicationGatewayGlobalConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableRequestBuffering", a.EnableRequestBuffering) + populate(objectMap, "enableResponseBuffering", a.EnableResponseBuffering) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayGlobalConfiguration. +func (a *ApplicationGatewayGlobalConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableRequestBuffering": + err = unpopulate(val, "EnableRequestBuffering", &a.EnableRequestBuffering) + delete(rawMsg, key) + case "enableResponseBuffering": + err = unpopulate(val, "EnableResponseBuffering", &a.EnableResponseBuffering) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHTTPListener. +func (a ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayHTTPListener. +func (a *ApplicationGatewayHTTPListener) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHTTPListenerPropertiesFormat. +func (a ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customErrorConfigurations", a.CustomErrorConfigurations) + populate(objectMap, "firewallPolicy", a.FirewallPolicy) + populate(objectMap, "frontendIPConfiguration", a.FrontendIPConfiguration) + populate(objectMap, "frontendPort", a.FrontendPort) + populate(objectMap, "hostName", a.HostName) + populate(objectMap, "hostNames", a.HostNames) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "requireServerNameIndication", a.RequireServerNameIndication) + populate(objectMap, "sslCertificate", a.SSLCertificate) + populate(objectMap, "sslProfile", a.SSLProfile) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayHTTPListenerPropertiesFormat. +func (a *ApplicationGatewayHTTPListenerPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customErrorConfigurations": + err = unpopulate(val, "CustomErrorConfigurations", &a.CustomErrorConfigurations) + delete(rawMsg, key) + case "firewallPolicy": + err = unpopulate(val, "FirewallPolicy", &a.FirewallPolicy) + delete(rawMsg, key) + case "frontendIPConfiguration": + err = unpopulate(val, "FrontendIPConfiguration", &a.FrontendIPConfiguration) + delete(rawMsg, key) + case "frontendPort": + err = unpopulate(val, "FrontendPort", &a.FrontendPort) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &a.HostName) + delete(rawMsg, key) + case "hostNames": + err = unpopulate(val, "HostNames", &a.HostNames) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "requireServerNameIndication": + err = unpopulate(val, "RequireServerNameIndication", &a.RequireServerNameIndication) + delete(rawMsg, key) + case "sslCertificate": + err = unpopulate(val, "SSLCertificate", &a.SSLCertificate) + delete(rawMsg, key) + case "sslProfile": + err = unpopulate(val, "SSLProfile", &a.SSLProfile) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHeaderConfiguration. +func (a ApplicationGatewayHeaderConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "headerName", a.HeaderName) + populate(objectMap, "headerValue", a.HeaderValue) + populate(objectMap, "headerValueMatcher", a.HeaderValueMatcher) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayHeaderConfiguration. +func (a *ApplicationGatewayHeaderConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "headerName": + err = unpopulate(val, "HeaderName", &a.HeaderName) + delete(rawMsg, key) + case "headerValue": + err = unpopulate(val, "HeaderValue", &a.HeaderValue) + delete(rawMsg, key) + case "headerValueMatcher": + err = unpopulate(val, "HeaderValueMatcher", &a.HeaderValueMatcher) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayIPConfiguration. +func (a ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayIPConfiguration. +func (a *ApplicationGatewayIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayIPConfigurationPropertiesFormat. +func (a ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "subnet", a.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayIPConfigurationPropertiesFormat. +func (a *ApplicationGatewayIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &a.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListResult. +func (a ApplicationGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayListResult. +func (a *ApplicationGatewayListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListener. +func (a ApplicationGatewayListener) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayListener. +func (a *ApplicationGatewayListener) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListenerPropertiesFormat. +func (a ApplicationGatewayListenerPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "frontendIPConfiguration", a.FrontendIPConfiguration) + populate(objectMap, "frontendPort", a.FrontendPort) + populate(objectMap, "hostNames", a.HostNames) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "sslCertificate", a.SSLCertificate) + populate(objectMap, "sslProfile", a.SSLProfile) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayListenerPropertiesFormat. +func (a *ApplicationGatewayListenerPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "frontendIPConfiguration": + err = unpopulate(val, "FrontendIPConfiguration", &a.FrontendIPConfiguration) + delete(rawMsg, key) + case "frontendPort": + err = unpopulate(val, "FrontendPort", &a.FrontendPort) + delete(rawMsg, key) + case "hostNames": + err = unpopulate(val, "HostNames", &a.HostNames) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "sslCertificate": + err = unpopulate(val, "SSLCertificate", &a.SSLCertificate) + delete(rawMsg, key) + case "sslProfile": + err = unpopulate(val, "SSLProfile", &a.SSLProfile) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionPolicy. +func (a ApplicationGatewayLoadDistributionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayLoadDistributionPolicy. +func (a *ApplicationGatewayLoadDistributionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionPolicyPropertiesFormat. +func (a ApplicationGatewayLoadDistributionPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "loadDistributionAlgorithm", a.LoadDistributionAlgorithm) + populate(objectMap, "loadDistributionTargets", a.LoadDistributionTargets) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayLoadDistributionPolicyPropertiesFormat. +func (a *ApplicationGatewayLoadDistributionPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "loadDistributionAlgorithm": + err = unpopulate(val, "LoadDistributionAlgorithm", &a.LoadDistributionAlgorithm) + delete(rawMsg, key) + case "loadDistributionTargets": + err = unpopulate(val, "LoadDistributionTargets", &a.LoadDistributionTargets) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionTarget. +func (a ApplicationGatewayLoadDistributionTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayLoadDistributionTarget. +func (a *ApplicationGatewayLoadDistributionTarget) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionTargetPropertiesFormat. +func (a ApplicationGatewayLoadDistributionTargetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPool", a.BackendAddressPool) + populate(objectMap, "weightPerServer", a.WeightPerServer) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayLoadDistributionTargetPropertiesFormat. +func (a *ApplicationGatewayLoadDistributionTargetPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPool": + err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) + delete(rawMsg, key) + case "weightPerServer": + err = unpopulate(val, "WeightPerServer", &a.WeightPerServer) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayOnDemandProbe. +func (a ApplicationGatewayOnDemandProbe) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPool", a.BackendAddressPool) + populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) + populate(objectMap, "host", a.Host) + populate(objectMap, "match", a.Match) + populate(objectMap, "path", a.Path) + populate(objectMap, "pickHostNameFromBackendHttpSettings", a.PickHostNameFromBackendHTTPSettings) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "timeout", a.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayOnDemandProbe. +func (a *ApplicationGatewayOnDemandProbe) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPool": + err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) + delete(rawMsg, key) + case "backendHttpSettings": + err = unpopulate(val, "BackendHTTPSettings", &a.BackendHTTPSettings) + delete(rawMsg, key) + case "host": + err = unpopulate(val, "Host", &a.Host) + delete(rawMsg, key) + case "match": + err = unpopulate(val, "Match", &a.Match) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &a.Path) + delete(rawMsg, key) + case "pickHostNameFromBackendHttpSettings": + err = unpopulate(val, "PickHostNameFromBackendHTTPSettings", &a.PickHostNameFromBackendHTTPSettings) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &a.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPathRule. +func (a ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPathRule. +func (a *ApplicationGatewayPathRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPathRulePropertiesFormat. +func (a ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPool", a.BackendAddressPool) + populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) + populate(objectMap, "firewallPolicy", a.FirewallPolicy) + populate(objectMap, "loadDistributionPolicy", a.LoadDistributionPolicy) + populate(objectMap, "paths", a.Paths) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "redirectConfiguration", a.RedirectConfiguration) + populate(objectMap, "rewriteRuleSet", a.RewriteRuleSet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPathRulePropertiesFormat. +func (a *ApplicationGatewayPathRulePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPool": + err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) + delete(rawMsg, key) + case "backendHttpSettings": + err = unpopulate(val, "BackendHTTPSettings", &a.BackendHTTPSettings) + delete(rawMsg, key) + case "firewallPolicy": + err = unpopulate(val, "FirewallPolicy", &a.FirewallPolicy) + delete(rawMsg, key) + case "loadDistributionPolicy": + err = unpopulate(val, "LoadDistributionPolicy", &a.LoadDistributionPolicy) + delete(rawMsg, key) + case "paths": + err = unpopulate(val, "Paths", &a.Paths) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "redirectConfiguration": + err = unpopulate(val, "RedirectConfiguration", &a.RedirectConfiguration) + delete(rawMsg, key) + case "rewriteRuleSet": + err = unpopulate(val, "RewriteRuleSet", &a.RewriteRuleSet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnection. +func (a ApplicationGatewayPrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateEndpointConnection. +func (a *ApplicationGatewayPrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnectionListResult. +func (a ApplicationGatewayPrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateEndpointConnectionListResult. +func (a *ApplicationGatewayPrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnectionProperties. +func (a ApplicationGatewayPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "linkIdentifier", a.LinkIdentifier) + populate(objectMap, "privateEndpoint", a.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", a.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateEndpointConnectionProperties. +func (a *ApplicationGatewayPrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "linkIdentifier": + err = unpopulate(val, "LinkIdentifier", &a.LinkIdentifier) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &a.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &a.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkConfiguration. +func (a ApplicationGatewayPrivateLinkConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkConfiguration. +func (a *ApplicationGatewayPrivateLinkConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkConfigurationProperties. +func (a ApplicationGatewayPrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipConfigurations", a.IPConfigurations) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkConfigurationProperties. +func (a *ApplicationGatewayPrivateLinkConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &a.IPConfigurations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkIPConfiguration. +func (a ApplicationGatewayPrivateLinkIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkIPConfiguration. +func (a *ApplicationGatewayPrivateLinkIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkIPConfigurationProperties. +func (a ApplicationGatewayPrivateLinkIPConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primary", a.Primary) + populate(objectMap, "privateIPAddress", a.PrivateIPAddress) + populate(objectMap, "privateIPAllocationMethod", a.PrivateIPAllocationMethod) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "subnet", a.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkIPConfigurationProperties. +func (a *ApplicationGatewayPrivateLinkIPConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primary": + err = unpopulate(val, "Primary", &a.Primary) + delete(rawMsg, key) + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &a.PrivateIPAddress) + delete(rawMsg, key) + case "privateIPAllocationMethod": + err = unpopulate(val, "PrivateIPAllocationMethod", &a.PrivateIPAllocationMethod) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &a.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResource. +func (a ApplicationGatewayPrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkResource. +func (a *ApplicationGatewayPrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResourceListResult. +func (a ApplicationGatewayPrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkResourceListResult. +func (a *ApplicationGatewayPrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResourceProperties. +func (a ApplicationGatewayPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", a.GroupID) + populate(objectMap, "requiredMembers", a.RequiredMembers) + populate(objectMap, "requiredZoneNames", a.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPrivateLinkResourceProperties. +func (a *ApplicationGatewayPrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &a.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &a.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &a.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbe. +func (a ApplicationGatewayProbe) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayProbe. +func (a *ApplicationGatewayProbe) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbeHealthResponseMatch. +func (a ApplicationGatewayProbeHealthResponseMatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "body", a.Body) + populate(objectMap, "statusCodes", a.StatusCodes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayProbeHealthResponseMatch. +func (a *ApplicationGatewayProbeHealthResponseMatch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "body": + err = unpopulate(val, "Body", &a.Body) + delete(rawMsg, key) + case "statusCodes": + err = unpopulate(val, "StatusCodes", &a.StatusCodes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbePropertiesFormat. +func (a ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "host", a.Host) + populate(objectMap, "interval", a.Interval) + populate(objectMap, "match", a.Match) + populate(objectMap, "minServers", a.MinServers) + populate(objectMap, "path", a.Path) + populate(objectMap, "pickHostNameFromBackendHttpSettings", a.PickHostNameFromBackendHTTPSettings) + populate(objectMap, "pickHostNameFromBackendSettings", a.PickHostNameFromBackendSettings) + populate(objectMap, "port", a.Port) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "timeout", a.Timeout) + populate(objectMap, "unhealthyThreshold", a.UnhealthyThreshold) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayProbePropertiesFormat. +func (a *ApplicationGatewayProbePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "host": + err = unpopulate(val, "Host", &a.Host) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &a.Interval) + delete(rawMsg, key) + case "match": + err = unpopulate(val, "Match", &a.Match) + delete(rawMsg, key) + case "minServers": + err = unpopulate(val, "MinServers", &a.MinServers) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &a.Path) + delete(rawMsg, key) + case "pickHostNameFromBackendHttpSettings": + err = unpopulate(val, "PickHostNameFromBackendHTTPSettings", &a.PickHostNameFromBackendHTTPSettings) + delete(rawMsg, key) + case "pickHostNameFromBackendSettings": + err = unpopulate(val, "PickHostNameFromBackendSettings", &a.PickHostNameFromBackendSettings) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &a.Port) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &a.Timeout) + delete(rawMsg, key) + case "unhealthyThreshold": + err = unpopulate(val, "UnhealthyThreshold", &a.UnhealthyThreshold) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPropertiesFormat. +func (a ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authenticationCertificates", a.AuthenticationCertificates) + populate(objectMap, "autoscaleConfiguration", a.AutoscaleConfiguration) + populate(objectMap, "backendAddressPools", a.BackendAddressPools) + populate(objectMap, "backendHttpSettingsCollection", a.BackendHTTPSettingsCollection) + populate(objectMap, "backendSettingsCollection", a.BackendSettingsCollection) + populate(objectMap, "customErrorConfigurations", a.CustomErrorConfigurations) + populate(objectMap, "defaultPredefinedSslPolicy", a.DefaultPredefinedSSLPolicy) + populate(objectMap, "enableFips", a.EnableFips) + populate(objectMap, "enableHttp2", a.EnableHTTP2) + populate(objectMap, "firewallPolicy", a.FirewallPolicy) + populate(objectMap, "forceFirewallPolicyAssociation", a.ForceFirewallPolicyAssociation) + populate(objectMap, "frontendIPConfigurations", a.FrontendIPConfigurations) + populate(objectMap, "frontendPorts", a.FrontendPorts) + populate(objectMap, "gatewayIPConfigurations", a.GatewayIPConfigurations) + populate(objectMap, "globalConfiguration", a.GlobalConfiguration) + populate(objectMap, "httpListeners", a.HTTPListeners) + populate(objectMap, "listeners", a.Listeners) + populate(objectMap, "loadDistributionPolicies", a.LoadDistributionPolicies) + populate(objectMap, "operationalState", a.OperationalState) + populate(objectMap, "privateEndpointConnections", a.PrivateEndpointConnections) + populate(objectMap, "privateLinkConfigurations", a.PrivateLinkConfigurations) + populate(objectMap, "probes", a.Probes) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "redirectConfigurations", a.RedirectConfigurations) + populate(objectMap, "requestRoutingRules", a.RequestRoutingRules) + populate(objectMap, "resourceGuid", a.ResourceGUID) + populate(objectMap, "rewriteRuleSets", a.RewriteRuleSets) + populate(objectMap, "routingRules", a.RoutingRules) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "sslCertificates", a.SSLCertificates) + populate(objectMap, "sslPolicy", a.SSLPolicy) + populate(objectMap, "sslProfiles", a.SSLProfiles) + populate(objectMap, "trustedClientCertificates", a.TrustedClientCertificates) + populate(objectMap, "trustedRootCertificates", a.TrustedRootCertificates) + populate(objectMap, "urlPathMaps", a.URLPathMaps) + populate(objectMap, "webApplicationFirewallConfiguration", a.WebApplicationFirewallConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayPropertiesFormat. +func (a *ApplicationGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authenticationCertificates": + err = unpopulate(val, "AuthenticationCertificates", &a.AuthenticationCertificates) + delete(rawMsg, key) + case "autoscaleConfiguration": + err = unpopulate(val, "AutoscaleConfiguration", &a.AutoscaleConfiguration) + delete(rawMsg, key) + case "backendAddressPools": + err = unpopulate(val, "BackendAddressPools", &a.BackendAddressPools) + delete(rawMsg, key) + case "backendHttpSettingsCollection": + err = unpopulate(val, "BackendHTTPSettingsCollection", &a.BackendHTTPSettingsCollection) + delete(rawMsg, key) + case "backendSettingsCollection": + err = unpopulate(val, "BackendSettingsCollection", &a.BackendSettingsCollection) + delete(rawMsg, key) + case "customErrorConfigurations": + err = unpopulate(val, "CustomErrorConfigurations", &a.CustomErrorConfigurations) + delete(rawMsg, key) + case "defaultPredefinedSslPolicy": + err = unpopulate(val, "DefaultPredefinedSSLPolicy", &a.DefaultPredefinedSSLPolicy) + delete(rawMsg, key) + case "enableFips": + err = unpopulate(val, "EnableFips", &a.EnableFips) + delete(rawMsg, key) + case "enableHttp2": + err = unpopulate(val, "EnableHTTP2", &a.EnableHTTP2) + delete(rawMsg, key) + case "firewallPolicy": + err = unpopulate(val, "FirewallPolicy", &a.FirewallPolicy) + delete(rawMsg, key) + case "forceFirewallPolicyAssociation": + err = unpopulate(val, "ForceFirewallPolicyAssociation", &a.ForceFirewallPolicyAssociation) + delete(rawMsg, key) + case "frontendIPConfigurations": + err = unpopulate(val, "FrontendIPConfigurations", &a.FrontendIPConfigurations) + delete(rawMsg, key) + case "frontendPorts": + err = unpopulate(val, "FrontendPorts", &a.FrontendPorts) + delete(rawMsg, key) + case "gatewayIPConfigurations": + err = unpopulate(val, "GatewayIPConfigurations", &a.GatewayIPConfigurations) + delete(rawMsg, key) + case "globalConfiguration": + err = unpopulate(val, "GlobalConfiguration", &a.GlobalConfiguration) + delete(rawMsg, key) + case "httpListeners": + err = unpopulate(val, "HTTPListeners", &a.HTTPListeners) + delete(rawMsg, key) + case "listeners": + err = unpopulate(val, "Listeners", &a.Listeners) + delete(rawMsg, key) + case "loadDistributionPolicies": + err = unpopulate(val, "LoadDistributionPolicies", &a.LoadDistributionPolicies) + delete(rawMsg, key) + case "operationalState": + err = unpopulate(val, "OperationalState", &a.OperationalState) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &a.PrivateEndpointConnections) + delete(rawMsg, key) + case "privateLinkConfigurations": + err = unpopulate(val, "PrivateLinkConfigurations", &a.PrivateLinkConfigurations) + delete(rawMsg, key) + case "probes": + err = unpopulate(val, "Probes", &a.Probes) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "redirectConfigurations": + err = unpopulate(val, "RedirectConfigurations", &a.RedirectConfigurations) + delete(rawMsg, key) + case "requestRoutingRules": + err = unpopulate(val, "RequestRoutingRules", &a.RequestRoutingRules) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &a.ResourceGUID) + delete(rawMsg, key) + case "rewriteRuleSets": + err = unpopulate(val, "RewriteRuleSets", &a.RewriteRuleSets) + delete(rawMsg, key) + case "routingRules": + err = unpopulate(val, "RoutingRules", &a.RoutingRules) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + case "sslCertificates": + err = unpopulate(val, "SSLCertificates", &a.SSLCertificates) + delete(rawMsg, key) + case "sslPolicy": + err = unpopulate(val, "SSLPolicy", &a.SSLPolicy) + delete(rawMsg, key) + case "sslProfiles": + err = unpopulate(val, "SSLProfiles", &a.SSLProfiles) + delete(rawMsg, key) + case "trustedClientCertificates": + err = unpopulate(val, "TrustedClientCertificates", &a.TrustedClientCertificates) + delete(rawMsg, key) + case "trustedRootCertificates": + err = unpopulate(val, "TrustedRootCertificates", &a.TrustedRootCertificates) + delete(rawMsg, key) + case "urlPathMaps": + err = unpopulate(val, "URLPathMaps", &a.URLPathMaps) + delete(rawMsg, key) + case "webApplicationFirewallConfiguration": + err = unpopulate(val, "WebApplicationFirewallConfiguration", &a.WebApplicationFirewallConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRedirectConfiguration. +func (a ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRedirectConfiguration. +func (a *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRedirectConfigurationPropertiesFormat. +func (a ApplicationGatewayRedirectConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "includePath", a.IncludePath) + populate(objectMap, "includeQueryString", a.IncludeQueryString) + populate(objectMap, "pathRules", a.PathRules) + populate(objectMap, "redirectType", a.RedirectType) + populate(objectMap, "requestRoutingRules", a.RequestRoutingRules) + populate(objectMap, "targetListener", a.TargetListener) + populate(objectMap, "targetUrl", a.TargetURL) + populate(objectMap, "urlPathMaps", a.URLPathMaps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRedirectConfigurationPropertiesFormat. +func (a *ApplicationGatewayRedirectConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "includePath": + err = unpopulate(val, "IncludePath", &a.IncludePath) + delete(rawMsg, key) + case "includeQueryString": + err = unpopulate(val, "IncludeQueryString", &a.IncludeQueryString) + delete(rawMsg, key) + case "pathRules": + err = unpopulate(val, "PathRules", &a.PathRules) + delete(rawMsg, key) + case "redirectType": + err = unpopulate(val, "RedirectType", &a.RedirectType) + delete(rawMsg, key) + case "requestRoutingRules": + err = unpopulate(val, "RequestRoutingRules", &a.RequestRoutingRules) + delete(rawMsg, key) + case "targetListener": + err = unpopulate(val, "TargetListener", &a.TargetListener) + delete(rawMsg, key) + case "targetUrl": + err = unpopulate(val, "TargetURL", &a.TargetURL) + delete(rawMsg, key) + case "urlPathMaps": + err = unpopulate(val, "URLPathMaps", &a.URLPathMaps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRequestRoutingRule. +func (a ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRequestRoutingRule. +func (a *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRequestRoutingRulePropertiesFormat. +func (a ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPool", a.BackendAddressPool) + populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) + populate(objectMap, "httpListener", a.HTTPListener) + populate(objectMap, "loadDistributionPolicy", a.LoadDistributionPolicy) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "redirectConfiguration", a.RedirectConfiguration) + populate(objectMap, "rewriteRuleSet", a.RewriteRuleSet) + populate(objectMap, "ruleType", a.RuleType) + populate(objectMap, "urlPathMap", a.URLPathMap) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRequestRoutingRulePropertiesFormat. +func (a *ApplicationGatewayRequestRoutingRulePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPool": + err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) + delete(rawMsg, key) + case "backendHttpSettings": + err = unpopulate(val, "BackendHTTPSettings", &a.BackendHTTPSettings) + delete(rawMsg, key) + case "httpListener": + err = unpopulate(val, "HTTPListener", &a.HTTPListener) + delete(rawMsg, key) + case "loadDistributionPolicy": + err = unpopulate(val, "LoadDistributionPolicy", &a.LoadDistributionPolicy) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &a.Priority) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "redirectConfiguration": + err = unpopulate(val, "RedirectConfiguration", &a.RedirectConfiguration) + delete(rawMsg, key) + case "rewriteRuleSet": + err = unpopulate(val, "RewriteRuleSet", &a.RewriteRuleSet) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, "RuleType", &a.RuleType) + delete(rawMsg, key) + case "urlPathMap": + err = unpopulate(val, "URLPathMap", &a.URLPathMap) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRule. +func (a ApplicationGatewayRewriteRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionSet", a.ActionSet) + populate(objectMap, "conditions", a.Conditions) + populate(objectMap, "name", a.Name) + populate(objectMap, "ruleSequence", a.RuleSequence) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRewriteRule. +func (a *ApplicationGatewayRewriteRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionSet": + err = unpopulate(val, "ActionSet", &a.ActionSet) + delete(rawMsg, key) + case "conditions": + err = unpopulate(val, "Conditions", &a.Conditions) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "ruleSequence": + err = unpopulate(val, "RuleSequence", &a.RuleSequence) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleActionSet. +func (a ApplicationGatewayRewriteRuleActionSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "requestHeaderConfigurations", a.RequestHeaderConfigurations) + populate(objectMap, "responseHeaderConfigurations", a.ResponseHeaderConfigurations) + populate(objectMap, "urlConfiguration", a.URLConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRewriteRuleActionSet. +func (a *ApplicationGatewayRewriteRuleActionSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "requestHeaderConfigurations": + err = unpopulate(val, "RequestHeaderConfigurations", &a.RequestHeaderConfigurations) + delete(rawMsg, key) + case "responseHeaderConfigurations": + err = unpopulate(val, "ResponseHeaderConfigurations", &a.ResponseHeaderConfigurations) + delete(rawMsg, key) + case "urlConfiguration": + err = unpopulate(val, "URLConfiguration", &a.URLConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleCondition. +func (a ApplicationGatewayRewriteRuleCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ignoreCase", a.IgnoreCase) + populate(objectMap, "negate", a.Negate) + populate(objectMap, "pattern", a.Pattern) + populate(objectMap, "variable", a.Variable) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRewriteRuleCondition. +func (a *ApplicationGatewayRewriteRuleCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ignoreCase": + err = unpopulate(val, "IgnoreCase", &a.IgnoreCase) + delete(rawMsg, key) + case "negate": + err = unpopulate(val, "Negate", &a.Negate) + delete(rawMsg, key) + case "pattern": + err = unpopulate(val, "Pattern", &a.Pattern) + delete(rawMsg, key) + case "variable": + err = unpopulate(val, "Variable", &a.Variable) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleSet. +func (a ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRewriteRuleSet. +func (a *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleSetPropertiesFormat. +func (a ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "rewriteRules", a.RewriteRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRewriteRuleSetPropertiesFormat. +func (a *ApplicationGatewayRewriteRuleSetPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "rewriteRules": + err = unpopulate(val, "RewriteRules", &a.RewriteRules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRoutingRule. +func (a ApplicationGatewayRoutingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRoutingRule. +func (a *ApplicationGatewayRoutingRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRoutingRulePropertiesFormat. +func (a ApplicationGatewayRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPool", a.BackendAddressPool) + populate(objectMap, "backendSettings", a.BackendSettings) + populate(objectMap, "listener", a.Listener) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "ruleType", a.RuleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayRoutingRulePropertiesFormat. +func (a *ApplicationGatewayRoutingRulePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPool": + err = unpopulate(val, "BackendAddressPool", &a.BackendAddressPool) + delete(rawMsg, key) + case "backendSettings": + err = unpopulate(val, "BackendSettings", &a.BackendSettings) + delete(rawMsg, key) + case "listener": + err = unpopulate(val, "Listener", &a.Listener) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &a.Priority) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, "RuleType", &a.RuleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySKU. +func (a ApplicationGatewaySKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", a.Capacity) + populate(objectMap, "family", a.Family) + populate(objectMap, "name", a.Name) + populate(objectMap, "tier", a.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySKU. +func (a *ApplicationGatewaySKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &a.Capacity) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &a.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &a.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLCertificate. +func (a ApplicationGatewaySSLCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLCertificate. +func (a *ApplicationGatewaySSLCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLCertificatePropertiesFormat. +func (a ApplicationGatewaySSLCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", a.Data) + populate(objectMap, "keyVaultSecretId", a.KeyVaultSecretID) + populate(objectMap, "password", a.Password) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "publicCertData", a.PublicCertData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLCertificatePropertiesFormat. +func (a *ApplicationGatewaySSLCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &a.Data) + delete(rawMsg, key) + case "keyVaultSecretId": + err = unpopulate(val, "KeyVaultSecretID", &a.KeyVaultSecretID) + delete(rawMsg, key) + case "password": + err = unpopulate(val, "Password", &a.Password) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "publicCertData": + err = unpopulate(val, "PublicCertData", &a.PublicCertData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPolicy. +func (a ApplicationGatewaySSLPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cipherSuites", a.CipherSuites) + populate(objectMap, "disabledSslProtocols", a.DisabledSSLProtocols) + populate(objectMap, "minProtocolVersion", a.MinProtocolVersion) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "policyType", a.PolicyType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLPolicy. +func (a *ApplicationGatewaySSLPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cipherSuites": + err = unpopulate(val, "CipherSuites", &a.CipherSuites) + delete(rawMsg, key) + case "disabledSslProtocols": + err = unpopulate(val, "DisabledSSLProtocols", &a.DisabledSSLProtocols) + delete(rawMsg, key) + case "minProtocolVersion": + err = unpopulate(val, "MinProtocolVersion", &a.MinProtocolVersion) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "policyType": + err = unpopulate(val, "PolicyType", &a.PolicyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPredefinedPolicy. +func (a ApplicationGatewaySSLPredefinedPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLPredefinedPolicy. +func (a *ApplicationGatewaySSLPredefinedPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPredefinedPolicyPropertiesFormat. +func (a ApplicationGatewaySSLPredefinedPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cipherSuites", a.CipherSuites) + populate(objectMap, "minProtocolVersion", a.MinProtocolVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLPredefinedPolicyPropertiesFormat. +func (a *ApplicationGatewaySSLPredefinedPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cipherSuites": + err = unpopulate(val, "CipherSuites", &a.CipherSuites) + delete(rawMsg, key) + case "minProtocolVersion": + err = unpopulate(val, "MinProtocolVersion", &a.MinProtocolVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLProfile. +func (a ApplicationGatewaySSLProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLProfile. +func (a *ApplicationGatewaySSLProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLProfilePropertiesFormat. +func (a ApplicationGatewaySSLProfilePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientAuthConfiguration", a.ClientAuthConfiguration) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "sslPolicy", a.SSLPolicy) + populate(objectMap, "trustedClientCertificates", a.TrustedClientCertificates) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewaySSLProfilePropertiesFormat. +func (a *ApplicationGatewaySSLProfilePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientAuthConfiguration": + err = unpopulate(val, "ClientAuthConfiguration", &a.ClientAuthConfiguration) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "sslPolicy": + err = unpopulate(val, "SSLPolicy", &a.SSLPolicy) + delete(rawMsg, key) + case "trustedClientCertificates": + err = unpopulate(val, "TrustedClientCertificates", &a.TrustedClientCertificates) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedClientCertificate. +func (a ApplicationGatewayTrustedClientCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayTrustedClientCertificate. +func (a *ApplicationGatewayTrustedClientCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedClientCertificatePropertiesFormat. +func (a ApplicationGatewayTrustedClientCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientCertIssuerDN", a.ClientCertIssuerDN) + populate(objectMap, "data", a.Data) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "validatedCertData", a.ValidatedCertData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayTrustedClientCertificatePropertiesFormat. +func (a *ApplicationGatewayTrustedClientCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientCertIssuerDN": + err = unpopulate(val, "ClientCertIssuerDN", &a.ClientCertIssuerDN) + delete(rawMsg, key) + case "data": + err = unpopulate(val, "Data", &a.Data) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "validatedCertData": + err = unpopulate(val, "ValidatedCertData", &a.ValidatedCertData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedRootCertificate. +func (a ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayTrustedRootCertificate. +func (a *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedRootCertificatePropertiesFormat. +func (a ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "data", a.Data) + populate(objectMap, "keyVaultSecretId", a.KeyVaultSecretID) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayTrustedRootCertificatePropertiesFormat. +func (a *ApplicationGatewayTrustedRootCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &a.Data) + delete(rawMsg, key) + case "keyVaultSecretId": + err = unpopulate(val, "KeyVaultSecretID", &a.KeyVaultSecretID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLConfiguration. +func (a ApplicationGatewayURLConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "modifiedPath", a.ModifiedPath) + populate(objectMap, "modifiedQueryString", a.ModifiedQueryString) + populate(objectMap, "reroute", a.Reroute) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayURLConfiguration. +func (a *ApplicationGatewayURLConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "modifiedPath": + err = unpopulate(val, "ModifiedPath", &a.ModifiedPath) + delete(rawMsg, key) + case "modifiedQueryString": + err = unpopulate(val, "ModifiedQueryString", &a.ModifiedQueryString) + delete(rawMsg, key) + case "reroute": + err = unpopulate(val, "Reroute", &a.Reroute) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLPathMap. +func (a ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayURLPathMap. +func (a *ApplicationGatewayURLPathMap) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLPathMapPropertiesFormat. +func (a ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultBackendAddressPool", a.DefaultBackendAddressPool) + populate(objectMap, "defaultBackendHttpSettings", a.DefaultBackendHTTPSettings) + populate(objectMap, "defaultLoadDistributionPolicy", a.DefaultLoadDistributionPolicy) + populate(objectMap, "defaultRedirectConfiguration", a.DefaultRedirectConfiguration) + populate(objectMap, "defaultRewriteRuleSet", a.DefaultRewriteRuleSet) + populate(objectMap, "pathRules", a.PathRules) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayURLPathMapPropertiesFormat. +func (a *ApplicationGatewayURLPathMapPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultBackendAddressPool": + err = unpopulate(val, "DefaultBackendAddressPool", &a.DefaultBackendAddressPool) + delete(rawMsg, key) + case "defaultBackendHttpSettings": + err = unpopulate(val, "DefaultBackendHTTPSettings", &a.DefaultBackendHTTPSettings) + delete(rawMsg, key) + case "defaultLoadDistributionPolicy": + err = unpopulate(val, "DefaultLoadDistributionPolicy", &a.DefaultLoadDistributionPolicy) + delete(rawMsg, key) + case "defaultRedirectConfiguration": + err = unpopulate(val, "DefaultRedirectConfiguration", &a.DefaultRedirectConfiguration) + delete(rawMsg, key) + case "defaultRewriteRuleSet": + err = unpopulate(val, "DefaultRewriteRuleSet", &a.DefaultRewriteRuleSet) + delete(rawMsg, key) + case "pathRules": + err = unpopulate(val, "PathRules", &a.PathRules) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWafDynamicManifestPropertiesResult. +func (a ApplicationGatewayWafDynamicManifestPropertiesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableRuleSets", a.AvailableRuleSets) + populate(objectMap, "defaultRuleSet", a.DefaultRuleSet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayWafDynamicManifestPropertiesResult. +func (a *ApplicationGatewayWafDynamicManifestPropertiesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableRuleSets": + err = unpopulate(val, "AvailableRuleSets", &a.AvailableRuleSets) + delete(rawMsg, key) + case "defaultRuleSet": + err = unpopulate(val, "DefaultRuleSet", &a.DefaultRuleSet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWafDynamicManifestResult. +func (a ApplicationGatewayWafDynamicManifestResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayWafDynamicManifestResult. +func (a *ApplicationGatewayWafDynamicManifestResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWafDynamicManifestResultList. +func (a ApplicationGatewayWafDynamicManifestResultList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayWafDynamicManifestResultList. +func (a *ApplicationGatewayWafDynamicManifestResultList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWebApplicationFirewallConfiguration. +func (a ApplicationGatewayWebApplicationFirewallConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disabledRuleGroups", a.DisabledRuleGroups) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "exclusions", a.Exclusions) + populate(objectMap, "fileUploadLimitInMb", a.FileUploadLimitInMb) + populate(objectMap, "firewallMode", a.FirewallMode) + populate(objectMap, "maxRequestBodySize", a.MaxRequestBodySize) + populate(objectMap, "maxRequestBodySizeInKb", a.MaxRequestBodySizeInKb) + populate(objectMap, "requestBodyCheck", a.RequestBodyCheck) + populate(objectMap, "ruleSetType", a.RuleSetType) + populate(objectMap, "ruleSetVersion", a.RuleSetVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGatewayWebApplicationFirewallConfiguration. +func (a *ApplicationGatewayWebApplicationFirewallConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disabledRuleGroups": + err = unpopulate(val, "DisabledRuleGroups", &a.DisabledRuleGroups) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "exclusions": + err = unpopulate(val, "Exclusions", &a.Exclusions) + delete(rawMsg, key) + case "fileUploadLimitInMb": + err = unpopulate(val, "FileUploadLimitInMb", &a.FileUploadLimitInMb) + delete(rawMsg, key) + case "firewallMode": + err = unpopulate(val, "FirewallMode", &a.FirewallMode) + delete(rawMsg, key) + case "maxRequestBodySize": + err = unpopulate(val, "MaxRequestBodySize", &a.MaxRequestBodySize) + delete(rawMsg, key) + case "maxRequestBodySizeInKb": + err = unpopulate(val, "MaxRequestBodySizeInKb", &a.MaxRequestBodySizeInKb) + delete(rawMsg, key) + case "requestBodyCheck": + err = unpopulate(val, "RequestBodyCheck", &a.RequestBodyCheck) + delete(rawMsg, key) + case "ruleSetType": + err = unpopulate(val, "RuleSetType", &a.RuleSetType) + delete(rawMsg, key) + case "ruleSetVersion": + err = unpopulate(val, "RuleSetVersion", &a.RuleSetVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationRule. +func (a ApplicationRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "destinationAddresses", a.DestinationAddresses) + populate(objectMap, "fqdnTags", a.FqdnTags) + populate(objectMap, "httpHeadersToInsert", a.HTTPHeadersToInsert) + populate(objectMap, "name", a.Name) + populate(objectMap, "protocols", a.Protocols) + objectMap["ruleType"] = FirewallPolicyRuleTypeApplicationRule + populate(objectMap, "sourceAddresses", a.SourceAddresses) + populate(objectMap, "sourceIpGroups", a.SourceIPGroups) + populate(objectMap, "targetFqdns", a.TargetFqdns) + populate(objectMap, "targetUrls", a.TargetUrls) + populate(objectMap, "terminateTLS", a.TerminateTLS) + populate(objectMap, "webCategories", a.WebCategories) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationRule. +func (a *ApplicationRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "destinationAddresses": + err = unpopulate(val, "DestinationAddresses", &a.DestinationAddresses) + delete(rawMsg, key) + case "fqdnTags": + err = unpopulate(val, "FqdnTags", &a.FqdnTags) + delete(rawMsg, key) + case "httpHeadersToInsert": + err = unpopulate(val, "HTTPHeadersToInsert", &a.HTTPHeadersToInsert) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "protocols": + err = unpopulate(val, "Protocols", &a.Protocols) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, "RuleType", &a.RuleType) + delete(rawMsg, key) + case "sourceAddresses": + err = unpopulate(val, "SourceAddresses", &a.SourceAddresses) + delete(rawMsg, key) + case "sourceIpGroups": + err = unpopulate(val, "SourceIPGroups", &a.SourceIPGroups) + delete(rawMsg, key) + case "targetFqdns": + err = unpopulate(val, "TargetFqdns", &a.TargetFqdns) + delete(rawMsg, key) + case "targetUrls": + err = unpopulate(val, "TargetUrls", &a.TargetUrls) + delete(rawMsg, key) + case "terminateTLS": + err = unpopulate(val, "TerminateTLS", &a.TerminateTLS) + delete(rawMsg, key) + case "webCategories": + err = unpopulate(val, "WebCategories", &a.WebCategories) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroup. +func (a ApplicationSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationSecurityGroup. +func (a *ApplicationSecurityGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroupListResult. +func (a ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationSecurityGroupListResult. +func (a *ApplicationSecurityGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroupPropertiesFormat. +func (a ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "resourceGuid", a.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationSecurityGroupPropertiesFormat. +func (a *ApplicationSecurityGroupPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &a.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationListResult. +func (a AuthorizationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationListResult. +func (a *AuthorizationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationPropertiesFormat. +func (a AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationKey", a.AuthorizationKey) + populate(objectMap, "authorizationUseStatus", a.AuthorizationUseStatus) + populate(objectMap, "connectionResourceUri", a.ConnectionResourceURI) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationPropertiesFormat. +func (a *AuthorizationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationKey": + err = unpopulate(val, "AuthorizationKey", &a.AuthorizationKey) + delete(rawMsg, key) + case "authorizationUseStatus": + err = unpopulate(val, "AuthorizationUseStatus", &a.AuthorizationUseStatus) + delete(rawMsg, key) + case "connectionResourceUri": + err = unpopulate(val, "ConnectionResourceURI", &a.ConnectionResourceURI) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoApprovedPrivateLinkService. +func (a AutoApprovedPrivateLinkService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateLinkService", a.PrivateLinkService) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoApprovedPrivateLinkService. +func (a *AutoApprovedPrivateLinkService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateLinkService": + err = unpopulate(val, "PrivateLinkService", &a.PrivateLinkService) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoApprovedPrivateLinkServicesResult. +func (a AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoApprovedPrivateLinkServicesResult. +func (a *AutoApprovedPrivateLinkServicesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Availability. +func (a Availability) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", a.BlobDuration) + populate(objectMap, "retention", a.Retention) + populate(objectMap, "timeGrain", a.TimeGrain) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Availability. +func (a *Availability) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &a.BlobDuration) + delete(rawMsg, key) + case "retention": + err = unpopulate(val, "Retention", &a.Retention) + delete(rawMsg, key) + case "timeGrain": + err = unpopulate(val, "TimeGrain", &a.TimeGrain) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableDelegation. +func (a AvailableDelegation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actions", a.Actions) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "serviceName", a.ServiceName) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableDelegation. +func (a *AvailableDelegation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actions": + err = unpopulate(val, "Actions", &a.Actions) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "serviceName": + err = unpopulate(val, "ServiceName", &a.ServiceName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableDelegationsResult. +func (a AvailableDelegationsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableDelegationsResult. +func (a *AvailableDelegationsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailablePrivateEndpointType. +func (a AvailablePrivateEndpointType) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "resourceName", a.ResourceName) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailablePrivateEndpointType. +func (a *AvailablePrivateEndpointType) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &a.ResourceName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailablePrivateEndpointTypesResult. +func (a AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailablePrivateEndpointTypesResult. +func (a *AvailablePrivateEndpointTypesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersList. +func (a AvailableProvidersList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "countries", a.Countries) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableProvidersList. +func (a *AvailableProvidersList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "countries": + err = unpopulate(val, "Countries", &a.Countries) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListCity. +func (a AvailableProvidersListCity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cityName", a.CityName) + populate(objectMap, "providers", a.Providers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableProvidersListCity. +func (a *AvailableProvidersListCity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cityName": + err = unpopulate(val, "CityName", &a.CityName) + delete(rawMsg, key) + case "providers": + err = unpopulate(val, "Providers", &a.Providers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListCountry. +func (a AvailableProvidersListCountry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "countryName", a.CountryName) + populate(objectMap, "providers", a.Providers) + populate(objectMap, "states", a.States) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableProvidersListCountry. +func (a *AvailableProvidersListCountry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "countryName": + err = unpopulate(val, "CountryName", &a.CountryName) + delete(rawMsg, key) + case "providers": + err = unpopulate(val, "Providers", &a.Providers) + delete(rawMsg, key) + case "states": + err = unpopulate(val, "States", &a.States) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListParameters. +func (a AvailableProvidersListParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureLocations", a.AzureLocations) + populate(objectMap, "city", a.City) + populate(objectMap, "country", a.Country) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableProvidersListParameters. +func (a *AvailableProvidersListParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureLocations": + err = unpopulate(val, "AzureLocations", &a.AzureLocations) + delete(rawMsg, key) + case "city": + err = unpopulate(val, "City", &a.City) + delete(rawMsg, key) + case "country": + err = unpopulate(val, "Country", &a.Country) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListState. +func (a AvailableProvidersListState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cities", a.Cities) + populate(objectMap, "providers", a.Providers) + populate(objectMap, "stateName", a.StateName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableProvidersListState. +func (a *AvailableProvidersListState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cities": + err = unpopulate(val, "Cities", &a.Cities) + delete(rawMsg, key) + case "providers": + err = unpopulate(val, "Providers", &a.Providers) + delete(rawMsg, key) + case "stateName": + err = unpopulate(val, "StateName", &a.StateName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableServiceAlias. +func (a AvailableServiceAlias) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "resourceName", a.ResourceName) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableServiceAlias. +func (a *AvailableServiceAlias) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &a.ResourceName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableServiceAliasesResult. +func (a AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AvailableServiceAliasesResult. +func (a *AvailableServiceAliasesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureAsyncOperationResult. +func (a AzureAsyncOperationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", a.Error) + populate(objectMap, "status", a.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureAsyncOperationResult. +func (a *AzureAsyncOperationResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &a.Error) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewall. +func (a AzureFirewall) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + populate(objectMap, "zones", a.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewall. +func (a *AzureFirewall) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &a.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRule. +func (a AzureFirewallApplicationRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "fqdnTags", a.FqdnTags) + populate(objectMap, "name", a.Name) + populate(objectMap, "protocols", a.Protocols) + populate(objectMap, "sourceAddresses", a.SourceAddresses) + populate(objectMap, "sourceIpGroups", a.SourceIPGroups) + populate(objectMap, "targetFqdns", a.TargetFqdns) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallApplicationRule. +func (a *AzureFirewallApplicationRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "fqdnTags": + err = unpopulate(val, "FqdnTags", &a.FqdnTags) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "protocols": + err = unpopulate(val, "Protocols", &a.Protocols) + delete(rawMsg, key) + case "sourceAddresses": + err = unpopulate(val, "SourceAddresses", &a.SourceAddresses) + delete(rawMsg, key) + case "sourceIpGroups": + err = unpopulate(val, "SourceIPGroups", &a.SourceIPGroups) + delete(rawMsg, key) + case "targetFqdns": + err = unpopulate(val, "TargetFqdns", &a.TargetFqdns) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleCollection. +func (a AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallApplicationRuleCollection. +func (a *AzureFirewallApplicationRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleCollectionPropertiesFormat. +func (a AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", a.Action) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallApplicationRuleCollectionPropertiesFormat. +func (a *AzureFirewallApplicationRuleCollectionPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &a.Action) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &a.Priority) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &a.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleProtocol. +func (a AzureFirewallApplicationRuleProtocol) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "port", a.Port) + populate(objectMap, "protocolType", a.ProtocolType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallApplicationRuleProtocol. +func (a *AzureFirewallApplicationRuleProtocol) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "port": + err = unpopulate(val, "Port", &a.Port) + delete(rawMsg, key) + case "protocolType": + err = unpopulate(val, "ProtocolType", &a.ProtocolType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallAutoscaleConfiguration. +func (a AzureFirewallAutoscaleConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxCapacity", a.MaxCapacity) + populate(objectMap, "minCapacity", a.MinCapacity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallAutoscaleConfiguration. +func (a *AzureFirewallAutoscaleConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxCapacity": + err = unpopulate(val, "MaxCapacity", &a.MaxCapacity) + delete(rawMsg, key) + case "minCapacity": + err = unpopulate(val, "MinCapacity", &a.MinCapacity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTag. +func (a AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallFqdnTag. +func (a *AzureFirewallFqdnTag) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTagListResult. +func (a AzureFirewallFqdnTagListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallFqdnTagListResult. +func (a *AzureFirewallFqdnTagListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTagPropertiesFormat. +func (a AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fqdnTagName", a.FqdnTagName) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallFqdnTagPropertiesFormat. +func (a *AzureFirewallFqdnTagPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fqdnTagName": + err = unpopulate(val, "FqdnTagName", &a.FqdnTagName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallIPConfiguration. +func (a AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallIPConfiguration. +func (a *AzureFirewallIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallIPConfigurationPropertiesFormat. +func (a AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateIPAddress", a.PrivateIPAddress) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "publicIPAddress", a.PublicIPAddress) + populate(objectMap, "subnet", a.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallIPConfigurationPropertiesFormat. +func (a *AzureFirewallIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &a.PrivateIPAddress) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddress": + err = unpopulate(val, "PublicIPAddress", &a.PublicIPAddress) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &a.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallIPGroups. +func (a AzureFirewallIPGroups) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "changeNumber", a.ChangeNumber) + populate(objectMap, "id", a.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallIPGroups. +func (a *AzureFirewallIPGroups) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "changeNumber": + err = unpopulate(val, "ChangeNumber", &a.ChangeNumber) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallListResult. +func (a AzureFirewallListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallListResult. +func (a *AzureFirewallListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRCAction. +func (a AzureFirewallNatRCAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNatRCAction. +func (a *AzureFirewallNatRCAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRule. +func (a AzureFirewallNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "destinationAddresses", a.DestinationAddresses) + populate(objectMap, "destinationPorts", a.DestinationPorts) + populate(objectMap, "name", a.Name) + populate(objectMap, "protocols", a.Protocols) + populate(objectMap, "sourceAddresses", a.SourceAddresses) + populate(objectMap, "sourceIpGroups", a.SourceIPGroups) + populate(objectMap, "translatedAddress", a.TranslatedAddress) + populate(objectMap, "translatedFqdn", a.TranslatedFqdn) + populate(objectMap, "translatedPort", a.TranslatedPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNatRule. +func (a *AzureFirewallNatRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "destinationAddresses": + err = unpopulate(val, "DestinationAddresses", &a.DestinationAddresses) + delete(rawMsg, key) + case "destinationPorts": + err = unpopulate(val, "DestinationPorts", &a.DestinationPorts) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "protocols": + err = unpopulate(val, "Protocols", &a.Protocols) + delete(rawMsg, key) + case "sourceAddresses": + err = unpopulate(val, "SourceAddresses", &a.SourceAddresses) + delete(rawMsg, key) + case "sourceIpGroups": + err = unpopulate(val, "SourceIPGroups", &a.SourceIPGroups) + delete(rawMsg, key) + case "translatedAddress": + err = unpopulate(val, "TranslatedAddress", &a.TranslatedAddress) + delete(rawMsg, key) + case "translatedFqdn": + err = unpopulate(val, "TranslatedFqdn", &a.TranslatedFqdn) + delete(rawMsg, key) + case "translatedPort": + err = unpopulate(val, "TranslatedPort", &a.TranslatedPort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRuleCollection. +func (a AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNatRuleCollection. +func (a *AzureFirewallNatRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRuleCollectionProperties. +func (a AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", a.Action) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNatRuleCollectionProperties. +func (a *AzureFirewallNatRuleCollectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &a.Action) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &a.Priority) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &a.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRule. +func (a AzureFirewallNetworkRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "destinationAddresses", a.DestinationAddresses) + populate(objectMap, "destinationFqdns", a.DestinationFqdns) + populate(objectMap, "destinationIpGroups", a.DestinationIPGroups) + populate(objectMap, "destinationPorts", a.DestinationPorts) + populate(objectMap, "name", a.Name) + populate(objectMap, "protocols", a.Protocols) + populate(objectMap, "sourceAddresses", a.SourceAddresses) + populate(objectMap, "sourceIpGroups", a.SourceIPGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNetworkRule. +func (a *AzureFirewallNetworkRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "destinationAddresses": + err = unpopulate(val, "DestinationAddresses", &a.DestinationAddresses) + delete(rawMsg, key) + case "destinationFqdns": + err = unpopulate(val, "DestinationFqdns", &a.DestinationFqdns) + delete(rawMsg, key) + case "destinationIpGroups": + err = unpopulate(val, "DestinationIPGroups", &a.DestinationIPGroups) + delete(rawMsg, key) + case "destinationPorts": + err = unpopulate(val, "DestinationPorts", &a.DestinationPorts) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "protocols": + err = unpopulate(val, "Protocols", &a.Protocols) + delete(rawMsg, key) + case "sourceAddresses": + err = unpopulate(val, "SourceAddresses", &a.SourceAddresses) + delete(rawMsg, key) + case "sourceIpGroups": + err = unpopulate(val, "SourceIPGroups", &a.SourceIPGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRuleCollection. +func (a AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNetworkRuleCollection. +func (a *AzureFirewallNetworkRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRuleCollectionPropertiesFormat. +func (a AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", a.Action) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallNetworkRuleCollectionPropertiesFormat. +func (a *AzureFirewallNetworkRuleCollectionPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &a.Action) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &a.Priority) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &a.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallPacketCaptureFlags. +func (a AzureFirewallPacketCaptureFlags) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallPacketCaptureFlags. +func (a *AzureFirewallPacketCaptureFlags) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallPacketCaptureRule. +func (a AzureFirewallPacketCaptureRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationPorts", a.DestinationPorts) + populate(objectMap, "destinations", a.Destinations) + populate(objectMap, "sources", a.Sources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallPacketCaptureRule. +func (a *AzureFirewallPacketCaptureRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationPorts": + err = unpopulate(val, "DestinationPorts", &a.DestinationPorts) + delete(rawMsg, key) + case "destinations": + err = unpopulate(val, "Destinations", &a.Destinations) + delete(rawMsg, key) + case "sources": + err = unpopulate(val, "Sources", &a.Sources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallPropertiesFormat. +func (a AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalProperties", a.AdditionalProperties) + populate(objectMap, "applicationRuleCollections", a.ApplicationRuleCollections) + populate(objectMap, "autoscaleConfiguration", a.AutoscaleConfiguration) + populate(objectMap, "firewallPolicy", a.FirewallPolicy) + populate(objectMap, "hubIPAddresses", a.HubIPAddresses) + populate(objectMap, "ipConfigurations", a.IPConfigurations) + populate(objectMap, "ipGroups", a.IPGroups) + populate(objectMap, "managementIpConfiguration", a.ManagementIPConfiguration) + populate(objectMap, "natRuleCollections", a.NatRuleCollections) + populate(objectMap, "networkRuleCollections", a.NetworkRuleCollections) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "threatIntelMode", a.ThreatIntelMode) + populate(objectMap, "virtualHub", a.VirtualHub) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallPropertiesFormat. +func (a *AzureFirewallPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalProperties": + err = unpopulate(val, "AdditionalProperties", &a.AdditionalProperties) + delete(rawMsg, key) + case "applicationRuleCollections": + err = unpopulate(val, "ApplicationRuleCollections", &a.ApplicationRuleCollections) + delete(rawMsg, key) + case "autoscaleConfiguration": + err = unpopulate(val, "AutoscaleConfiguration", &a.AutoscaleConfiguration) + delete(rawMsg, key) + case "firewallPolicy": + err = unpopulate(val, "FirewallPolicy", &a.FirewallPolicy) + delete(rawMsg, key) + case "hubIPAddresses": + err = unpopulate(val, "HubIPAddresses", &a.HubIPAddresses) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &a.IPConfigurations) + delete(rawMsg, key) + case "ipGroups": + err = unpopulate(val, "IPGroups", &a.IPGroups) + delete(rawMsg, key) + case "managementIpConfiguration": + err = unpopulate(val, "ManagementIPConfiguration", &a.ManagementIPConfiguration) + delete(rawMsg, key) + case "natRuleCollections": + err = unpopulate(val, "NatRuleCollections", &a.NatRuleCollections) + delete(rawMsg, key) + case "networkRuleCollections": + err = unpopulate(val, "NetworkRuleCollections", &a.NetworkRuleCollections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + case "threatIntelMode": + err = unpopulate(val, "ThreatIntelMode", &a.ThreatIntelMode) + delete(rawMsg, key) + case "virtualHub": + err = unpopulate(val, "VirtualHub", &a.VirtualHub) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallPublicIPAddress. +func (a AzureFirewallPublicIPAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", a.Address) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallPublicIPAddress. +func (a *AzureFirewallPublicIPAddress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &a.Address) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallRCAction. +func (a AzureFirewallRCAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallRCAction. +func (a *AzureFirewallRCAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallSKU. +func (a AzureFirewallSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", a.Name) + populate(objectMap, "tier", a.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFirewallSKU. +func (a *AzureFirewallSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &a.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReport. +func (a AzureReachabilityReport) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationLevel", a.AggregationLevel) + populate(objectMap, "providerLocation", a.ProviderLocation) + populate(objectMap, "reachabilityReport", a.ReachabilityReport) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReport. +func (a *AzureReachabilityReport) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationLevel": + err = unpopulate(val, "AggregationLevel", &a.AggregationLevel) + delete(rawMsg, key) + case "providerLocation": + err = unpopulate(val, "ProviderLocation", &a.ProviderLocation) + delete(rawMsg, key) + case "reachabilityReport": + err = unpopulate(val, "ReachabilityReport", &a.ReachabilityReport) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportItem. +func (a AzureReachabilityReportItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureLocation", a.AzureLocation) + populate(objectMap, "latencies", a.Latencies) + populate(objectMap, "provider", a.Provider) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportItem. +func (a *AzureReachabilityReportItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureLocation": + err = unpopulate(val, "AzureLocation", &a.AzureLocation) + delete(rawMsg, key) + case "latencies": + err = unpopulate(val, "Latencies", &a.Latencies) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &a.Provider) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportLatencyInfo. +func (a AzureReachabilityReportLatencyInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "score", a.Score) + populateDateTimeRFC3339(objectMap, "timeStamp", a.TimeStamp) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportLatencyInfo. +func (a *AzureReachabilityReportLatencyInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "score": + err = unpopulate(val, "Score", &a.Score) + delete(rawMsg, key) + case "timeStamp": + err = unpopulateDateTimeRFC3339(val, "TimeStamp", &a.TimeStamp) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportLocation. +func (a AzureReachabilityReportLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "city", a.City) + populate(objectMap, "country", a.Country) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportLocation. +func (a *AzureReachabilityReportLocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "city": + err = unpopulate(val, "City", &a.City) + delete(rawMsg, key) + case "country": + err = unpopulate(val, "Country", &a.Country) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportParameters. +func (a AzureReachabilityReportParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureLocations", a.AzureLocations) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "providerLocation", a.ProviderLocation) + populate(objectMap, "providers", a.Providers) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportParameters. +func (a *AzureReachabilityReportParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureLocations": + err = unpopulate(val, "AzureLocations", &a.AzureLocations) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "providerLocation": + err = unpopulate(val, "ProviderLocation", &a.ProviderLocation) + delete(rawMsg, key) + case "providers": + err = unpopulate(val, "Providers", &a.Providers) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWebCategory. +func (a AzureWebCategory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWebCategory. +func (a *AzureWebCategory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &a.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWebCategoryListResult. +func (a AzureWebCategoryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWebCategoryListResult. +func (a *AzureWebCategoryListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWebCategoryPropertiesFormat. +func (a AzureWebCategoryPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "group", a.Group) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWebCategoryPropertiesFormat. +func (a *AzureWebCategoryPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "group": + err = unpopulate(val, "Group", &a.Group) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BGPCommunity. +func (b BGPCommunity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "communityName", b.CommunityName) + populate(objectMap, "communityPrefixes", b.CommunityPrefixes) + populate(objectMap, "communityValue", b.CommunityValue) + populate(objectMap, "isAuthorizedToUse", b.IsAuthorizedToUse) + populate(objectMap, "serviceGroup", b.ServiceGroup) + populate(objectMap, "serviceSupportedRegion", b.ServiceSupportedRegion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BGPCommunity. +func (b *BGPCommunity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "communityName": + err = unpopulate(val, "CommunityName", &b.CommunityName) + delete(rawMsg, key) + case "communityPrefixes": + err = unpopulate(val, "CommunityPrefixes", &b.CommunityPrefixes) + delete(rawMsg, key) + case "communityValue": + err = unpopulate(val, "CommunityValue", &b.CommunityValue) + delete(rawMsg, key) + case "isAuthorizedToUse": + err = unpopulate(val, "IsAuthorizedToUse", &b.IsAuthorizedToUse) + delete(rawMsg, key) + case "serviceGroup": + err = unpopulate(val, "ServiceGroup", &b.ServiceGroup) + delete(rawMsg, key) + case "serviceSupportedRegion": + err = unpopulate(val, "ServiceSupportedRegion", &b.ServiceSupportedRegion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendAddressInboundNatRulePortMappings. +func (b BackendAddressInboundNatRulePortMappings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inboundNatRulePortMappings", b.InboundNatRulePortMappings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendAddressInboundNatRulePortMappings. +func (b *BackendAddressInboundNatRulePortMappings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inboundNatRulePortMappings": + err = unpopulate(val, "InboundNatRulePortMappings", &b.InboundNatRulePortMappings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendAddressPool. +func (b BackendAddressPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", b.Etag) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendAddressPool. +func (b *BackendAddressPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &b.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackendAddressPoolPropertiesFormat. +func (b BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendIPConfigurations", b.BackendIPConfigurations) + populate(objectMap, "drainPeriodInSeconds", b.DrainPeriodInSeconds) + populate(objectMap, "inboundNatRules", b.InboundNatRules) + populate(objectMap, "loadBalancerBackendAddresses", b.LoadBalancerBackendAddresses) + populate(objectMap, "loadBalancingRules", b.LoadBalancingRules) + populate(objectMap, "location", b.Location) + populate(objectMap, "outboundRule", b.OutboundRule) + populate(objectMap, "outboundRules", b.OutboundRules) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "syncMode", b.SyncMode) + populate(objectMap, "tunnelInterfaces", b.TunnelInterfaces) + populate(objectMap, "virtualNetwork", b.VirtualNetwork) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackendAddressPoolPropertiesFormat. +func (b *BackendAddressPoolPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendIPConfigurations": + err = unpopulate(val, "BackendIPConfigurations", &b.BackendIPConfigurations) + delete(rawMsg, key) + case "drainPeriodInSeconds": + err = unpopulate(val, "DrainPeriodInSeconds", &b.DrainPeriodInSeconds) + delete(rawMsg, key) + case "inboundNatRules": + err = unpopulate(val, "InboundNatRules", &b.InboundNatRules) + delete(rawMsg, key) + case "loadBalancerBackendAddresses": + err = unpopulate(val, "LoadBalancerBackendAddresses", &b.LoadBalancerBackendAddresses) + delete(rawMsg, key) + case "loadBalancingRules": + err = unpopulate(val, "LoadBalancingRules", &b.LoadBalancingRules) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "outboundRule": + err = unpopulate(val, "OutboundRule", &b.OutboundRule) + delete(rawMsg, key) + case "outboundRules": + err = unpopulate(val, "OutboundRules", &b.OutboundRules) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "syncMode": + err = unpopulate(val, "SyncMode", &b.SyncMode) + delete(rawMsg, key) + case "tunnelInterfaces": + err = unpopulate(val, "TunnelInterfaces", &b.TunnelInterfaces) + delete(rawMsg, key) + case "virtualNetwork": + err = unpopulate(val, "VirtualNetwork", &b.VirtualNetwork) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BaseAdminRule. +func (b BaseAdminRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", b.Etag) + populate(objectMap, "id", b.ID) + objectMap["kind"] = b.Kind + populate(objectMap, "name", b.Name) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BaseAdminRule. +func (b *BaseAdminRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &b.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &b.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionActiveSession. +func (b BastionActiveSession) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "protocol", b.Protocol) + populate(objectMap, "resourceType", b.ResourceType) + populate(objectMap, "sessionDurationInMins", b.SessionDurationInMins) + populate(objectMap, "sessionId", b.SessionID) + populateAny(objectMap, "startTime", b.StartTime) + populate(objectMap, "targetHostName", b.TargetHostName) + populate(objectMap, "targetIpAddress", b.TargetIPAddress) + populate(objectMap, "targetResourceGroup", b.TargetResourceGroup) + populate(objectMap, "targetResourceId", b.TargetResourceID) + populate(objectMap, "targetSubscriptionId", b.TargetSubscriptionID) + populate(objectMap, "userName", b.UserName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionActiveSession. +func (b *BastionActiveSession) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "protocol": + err = unpopulate(val, "Protocol", &b.Protocol) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &b.ResourceType) + delete(rawMsg, key) + case "sessionDurationInMins": + err = unpopulate(val, "SessionDurationInMins", &b.SessionDurationInMins) + delete(rawMsg, key) + case "sessionId": + err = unpopulate(val, "SessionID", &b.SessionID) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &b.StartTime) + delete(rawMsg, key) + case "targetHostName": + err = unpopulate(val, "TargetHostName", &b.TargetHostName) + delete(rawMsg, key) + case "targetIpAddress": + err = unpopulate(val, "TargetIPAddress", &b.TargetIPAddress) + delete(rawMsg, key) + case "targetResourceGroup": + err = unpopulate(val, "TargetResourceGroup", &b.TargetResourceGroup) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &b.TargetResourceID) + delete(rawMsg, key) + case "targetSubscriptionId": + err = unpopulate(val, "TargetSubscriptionID", &b.TargetSubscriptionID) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &b.UserName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionActiveSessionListResult. +func (b BastionActiveSessionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionActiveSessionListResult. +func (b *BastionActiveSessionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionHost. +func (b BastionHost) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", b.Etag) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "sku", b.SKU) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + populate(objectMap, "zones", b.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHost. +func (b *BastionHost) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &b.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &b.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &b.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionHostIPConfiguration. +func (b BastionHostIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", b.Etag) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHostIPConfiguration. +func (b *BastionHostIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &b.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionHostIPConfigurationPropertiesFormat. +func (b BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateIPAllocationMethod", b.PrivateIPAllocationMethod) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "publicIPAddress", b.PublicIPAddress) + populate(objectMap, "subnet", b.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHostIPConfigurationPropertiesFormat. +func (b *BastionHostIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateIPAllocationMethod": + err = unpopulate(val, "PrivateIPAllocationMethod", &b.PrivateIPAllocationMethod) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddress": + err = unpopulate(val, "PublicIPAddress", &b.PublicIPAddress) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &b.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionHostListResult. +func (b BastionHostListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHostListResult. +func (b *BastionHostListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionHostPropertiesFormat. +func (b BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dnsName", b.DNSName) + populate(objectMap, "disableCopyPaste", b.DisableCopyPaste) + populate(objectMap, "enableFileCopy", b.EnableFileCopy) + populate(objectMap, "enableIpConnect", b.EnableIPConnect) + populate(objectMap, "enableKerberos", b.EnableKerberos) + populate(objectMap, "enablePrivateOnlyBastion", b.EnablePrivateOnlyBastion) + populate(objectMap, "enableSessionRecording", b.EnableSessionRecording) + populate(objectMap, "enableShareableLink", b.EnableShareableLink) + populate(objectMap, "enableTunneling", b.EnableTunneling) + populate(objectMap, "ipConfigurations", b.IPConfigurations) + populate(objectMap, "networkAcls", b.NetworkACLs) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "scaleUnits", b.ScaleUnits) + populate(objectMap, "virtualNetwork", b.VirtualNetwork) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHostPropertiesFormat. +func (b *BastionHostPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dnsName": + err = unpopulate(val, "DNSName", &b.DNSName) + delete(rawMsg, key) + case "disableCopyPaste": + err = unpopulate(val, "DisableCopyPaste", &b.DisableCopyPaste) + delete(rawMsg, key) + case "enableFileCopy": + err = unpopulate(val, "EnableFileCopy", &b.EnableFileCopy) + delete(rawMsg, key) + case "enableIpConnect": + err = unpopulate(val, "EnableIPConnect", &b.EnableIPConnect) + delete(rawMsg, key) + case "enableKerberos": + err = unpopulate(val, "EnableKerberos", &b.EnableKerberos) + delete(rawMsg, key) + case "enablePrivateOnlyBastion": + err = unpopulate(val, "EnablePrivateOnlyBastion", &b.EnablePrivateOnlyBastion) + delete(rawMsg, key) + case "enableSessionRecording": + err = unpopulate(val, "EnableSessionRecording", &b.EnableSessionRecording) + delete(rawMsg, key) + case "enableShareableLink": + err = unpopulate(val, "EnableShareableLink", &b.EnableShareableLink) + delete(rawMsg, key) + case "enableTunneling": + err = unpopulate(val, "EnableTunneling", &b.EnableTunneling) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &b.IPConfigurations) + delete(rawMsg, key) + case "networkAcls": + err = unpopulate(val, "NetworkACLs", &b.NetworkACLs) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "scaleUnits": + err = unpopulate(val, "ScaleUnits", &b.ScaleUnits) + delete(rawMsg, key) + case "virtualNetwork": + err = unpopulate(val, "VirtualNetwork", &b.VirtualNetwork) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionHostPropertiesFormatNetworkACLs. +func (b BastionHostPropertiesFormatNetworkACLs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipRules", b.IPRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionHostPropertiesFormatNetworkACLs. +func (b *BastionHostPropertiesFormatNetworkACLs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipRules": + err = unpopulate(val, "IPRules", &b.IPRules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionSessionDeleteResult. +func (b BastionSessionDeleteResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionSessionDeleteResult. +func (b *BastionSessionDeleteResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionSessionState. +func (b BastionSessionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", b.Message) + populate(objectMap, "sessionId", b.SessionID) + populate(objectMap, "state", b.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionSessionState. +func (b *BastionSessionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &b.Message) + delete(rawMsg, key) + case "sessionId": + err = unpopulate(val, "SessionID", &b.SessionID) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &b.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionShareableLink. +func (b BastionShareableLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bsl", b.Bsl) + populate(objectMap, "createdAt", b.CreatedAt) + populate(objectMap, "message", b.Message) + populate(objectMap, "vm", b.VM) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionShareableLink. +func (b *BastionShareableLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bsl": + err = unpopulate(val, "Bsl", &b.Bsl) + delete(rawMsg, key) + case "createdAt": + err = unpopulate(val, "CreatedAt", &b.CreatedAt) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &b.Message) + delete(rawMsg, key) + case "vm": + err = unpopulate(val, "VM", &b.VM) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkListRequest. +func (b BastionShareableLinkListRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "vms", b.VMs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionShareableLinkListRequest. +func (b *BastionShareableLinkListRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "vms": + err = unpopulate(val, "VMs", &b.VMs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkListResult. +func (b BastionShareableLinkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionShareableLinkListResult. +func (b *BastionShareableLinkListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkTokenListRequest. +func (b BastionShareableLinkTokenListRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tokens", b.Tokens) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BastionShareableLinkTokenListRequest. +func (b *BastionShareableLinkTokenListRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tokens": + err = unpopulate(val, "Tokens", &b.Tokens) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BgpConnection. +func (b BgpConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", b.Etag) + populate(objectMap, "id", b.ID) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BgpConnection. +func (b *BgpConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &b.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BgpConnectionProperties. +func (b BgpConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionState", b.ConnectionState) + populate(objectMap, "hubVirtualNetworkConnection", b.HubVirtualNetworkConnection) + populate(objectMap, "peerAsn", b.PeerAsn) + populate(objectMap, "peerIp", b.PeerIP) + populate(objectMap, "provisioningState", b.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BgpConnectionProperties. +func (b *BgpConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionState": + err = unpopulate(val, "ConnectionState", &b.ConnectionState) + delete(rawMsg, key) + case "hubVirtualNetworkConnection": + err = unpopulate(val, "HubVirtualNetworkConnection", &b.HubVirtualNetworkConnection) + delete(rawMsg, key) + case "peerAsn": + err = unpopulate(val, "PeerAsn", &b.PeerAsn) + delete(rawMsg, key) + case "peerIp": + err = unpopulate(val, "PeerIP", &b.PeerIP) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BgpPeerStatus. +func (b BgpPeerStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asn", b.Asn) + populate(objectMap, "connectedDuration", b.ConnectedDuration) + populate(objectMap, "localAddress", b.LocalAddress) + populate(objectMap, "messagesReceived", b.MessagesReceived) + populate(objectMap, "messagesSent", b.MessagesSent) + populate(objectMap, "neighbor", b.Neighbor) + populate(objectMap, "routesReceived", b.RoutesReceived) + populate(objectMap, "state", b.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BgpPeerStatus. +func (b *BgpPeerStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asn": + err = unpopulate(val, "Asn", &b.Asn) + delete(rawMsg, key) + case "connectedDuration": + err = unpopulate(val, "ConnectedDuration", &b.ConnectedDuration) + delete(rawMsg, key) + case "localAddress": + err = unpopulate(val, "LocalAddress", &b.LocalAddress) + delete(rawMsg, key) + case "messagesReceived": + err = unpopulate(val, "MessagesReceived", &b.MessagesReceived) + delete(rawMsg, key) + case "messagesSent": + err = unpopulate(val, "MessagesSent", &b.MessagesSent) + delete(rawMsg, key) + case "neighbor": + err = unpopulate(val, "Neighbor", &b.Neighbor) + delete(rawMsg, key) + case "routesReceived": + err = unpopulate(val, "RoutesReceived", &b.RoutesReceived) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &b.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BgpPeerStatusListResult. +func (b BgpPeerStatusListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BgpPeerStatusListResult. +func (b *BgpPeerStatusListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunity. +func (b BgpServiceCommunity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BgpServiceCommunity. +func (b *BgpServiceCommunity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunityListResult. +func (b BgpServiceCommunityListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BgpServiceCommunityListResult. +func (b *BgpServiceCommunityListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunityPropertiesFormat. +func (b BgpServiceCommunityPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bgpCommunities", b.BgpCommunities) + populate(objectMap, "serviceName", b.ServiceName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BgpServiceCommunityPropertiesFormat. +func (b *BgpServiceCommunityPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bgpCommunities": + err = unpopulate(val, "BgpCommunities", &b.BgpCommunities) + delete(rawMsg, key) + case "serviceName": + err = unpopulate(val, "ServiceName", &b.ServiceName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BgpSettings. +func (b BgpSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asn", b.Asn) + populate(objectMap, "bgpPeeringAddress", b.BgpPeeringAddress) + populate(objectMap, "bgpPeeringAddresses", b.BgpPeeringAddresses) + populate(objectMap, "peerWeight", b.PeerWeight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BgpSettings. +func (b *BgpSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asn": + err = unpopulate(val, "Asn", &b.Asn) + delete(rawMsg, key) + case "bgpPeeringAddress": + err = unpopulate(val, "BgpPeeringAddress", &b.BgpPeeringAddress) + delete(rawMsg, key) + case "bgpPeeringAddresses": + err = unpopulate(val, "BgpPeeringAddresses", &b.BgpPeeringAddresses) + delete(rawMsg, key) + case "peerWeight": + err = unpopulate(val, "PeerWeight", &b.PeerWeight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BreakOutCategoryPolicies. +func (b BreakOutCategoryPolicies) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allow", b.Allow) + populate(objectMap, "default", b.Default) + populate(objectMap, "optimize", b.Optimize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BreakOutCategoryPolicies. +func (b *BreakOutCategoryPolicies) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allow": + err = unpopulate(val, "Allow", &b.Allow) + delete(rawMsg, key) + case "default": + err = unpopulate(val, "Default", &b.Default) + delete(rawMsg, key) + case "optimize": + err = unpopulate(val, "Optimize", &b.Optimize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckPrivateLinkServiceVisibilityRequest. +func (c CheckPrivateLinkServiceVisibilityRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateLinkServiceAlias", c.PrivateLinkServiceAlias) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckPrivateLinkServiceVisibilityRequest. +func (c *CheckPrivateLinkServiceVisibilityRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateLinkServiceAlias": + err = unpopulate(val, "PrivateLinkServiceAlias", &c.PrivateLinkServiceAlias) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ChildResource. +func (c ChildResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ChildResource. +func (c *ChildResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &c.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CommonErrorAdditionalInfo. +func (c CommonErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "info", c.Info) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CommonErrorAdditionalInfo. +func (c *CommonErrorAdditionalInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "info": + err = unpopulate(val, "Info", &c.Info) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CommonErrorDetail. +func (c CommonErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", c.AdditionalInfo) + populate(objectMap, "code", c.Code) + populate(objectMap, "details", c.Details) + populate(objectMap, "message", c.Message) + populate(objectMap, "target", c.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CommonErrorDetail. +func (c *CommonErrorDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &c.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &c.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &c.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &c.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CommonErrorResponse. +func (c CommonErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", c.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CommonErrorResponse. +func (c *CommonErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &c.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CommonProxyResource. +func (c CommonProxyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CommonProxyResource. +func (c *CommonProxyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CommonResource. +func (c CommonResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CommonResource. +func (c *CommonResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CommonTrackedResource. +func (c CommonTrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CommonTrackedResource. +func (c *CommonTrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. +func (c Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", c.ClientID) + populate(objectMap, "principalId", c.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. +func (c *Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &c.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &c.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticParameters. +func (c ConfigurationDiagnosticParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "profiles", c.Profiles) + populate(objectMap, "targetResourceId", c.TargetResourceID) + populate(objectMap, "verbosityLevel", c.VerbosityLevel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationDiagnosticParameters. +func (c *ConfigurationDiagnosticParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "profiles": + err = unpopulate(val, "Profiles", &c.Profiles) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &c.TargetResourceID) + delete(rawMsg, key) + case "verbosityLevel": + err = unpopulate(val, "VerbosityLevel", &c.VerbosityLevel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticProfile. +func (c ConfigurationDiagnosticProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destination", c.Destination) + populate(objectMap, "destinationPort", c.DestinationPort) + populate(objectMap, "direction", c.Direction) + populate(objectMap, "protocol", c.Protocol) + populate(objectMap, "source", c.Source) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationDiagnosticProfile. +func (c *ConfigurationDiagnosticProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destination": + err = unpopulate(val, "Destination", &c.Destination) + delete(rawMsg, key) + case "destinationPort": + err = unpopulate(val, "DestinationPort", &c.DestinationPort) + delete(rawMsg, key) + case "direction": + err = unpopulate(val, "Direction", &c.Direction) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &c.Protocol) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &c.Source) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticResponse. +func (c ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "results", c.Results) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationDiagnosticResponse. +func (c *ConfigurationDiagnosticResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "results": + err = unpopulate(val, "Results", &c.Results) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticResult. +func (c ConfigurationDiagnosticResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkSecurityGroupResult", c.NetworkSecurityGroupResult) + populate(objectMap, "profile", c.Profile) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationDiagnosticResult. +func (c *ConfigurationDiagnosticResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkSecurityGroupResult": + err = unpopulate(val, "NetworkSecurityGroupResult", &c.NetworkSecurityGroupResult) + delete(rawMsg, key) + case "profile": + err = unpopulate(val, "Profile", &c.Profile) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationGroup. +func (c ConfigurationGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationGroup. +func (c *ConfigurationGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitor. +func (c ConnectionMonitor) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", c.Location) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitor. +func (c *ConnectionMonitor) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorDestination. +func (c ConnectionMonitorDestination) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", c.Address) + populate(objectMap, "port", c.Port) + populate(objectMap, "resourceId", c.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorDestination. +func (c *ConnectionMonitorDestination) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &c.Address) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &c.Port) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpoint. +func (c ConnectionMonitorEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", c.Address) + populate(objectMap, "coverageLevel", c.CoverageLevel) + populate(objectMap, "filter", c.Filter) + populate(objectMap, "locationDetails", c.LocationDetails) + populate(objectMap, "name", c.Name) + populate(objectMap, "resourceId", c.ResourceID) + populate(objectMap, "scope", c.Scope) + populate(objectMap, "subscriptionId", c.SubscriptionID) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpoint. +func (c *ConnectionMonitorEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &c.Address) + delete(rawMsg, key) + case "coverageLevel": + err = unpopulate(val, "CoverageLevel", &c.CoverageLevel) + delete(rawMsg, key) + case "filter": + err = unpopulate(val, "Filter", &c.Filter) + delete(rawMsg, key) + case "locationDetails": + err = unpopulate(val, "LocationDetails", &c.LocationDetails) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &c.Scope) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &c.SubscriptionID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointFilter. +func (c ConnectionMonitorEndpointFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "items", c.Items) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpointFilter. +func (c *ConnectionMonitorEndpointFilter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "items": + err = unpopulate(val, "Items", &c.Items) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointFilterItem. +func (c ConnectionMonitorEndpointFilterItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", c.Address) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpointFilterItem. +func (c *ConnectionMonitorEndpointFilterItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &c.Address) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointLocationDetails. +func (c ConnectionMonitorEndpointLocationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "region", c.Region) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpointLocationDetails. +func (c *ConnectionMonitorEndpointLocationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "region": + err = unpopulate(val, "Region", &c.Region) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointScope. +func (c ConnectionMonitorEndpointScope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exclude", c.Exclude) + populate(objectMap, "include", c.Include) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpointScope. +func (c *ConnectionMonitorEndpointScope) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exclude": + err = unpopulate(val, "Exclude", &c.Exclude) + delete(rawMsg, key) + case "include": + err = unpopulate(val, "Include", &c.Include) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointScopeItem. +func (c ConnectionMonitorEndpointScopeItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", c.Address) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorEndpointScopeItem. +func (c *ConnectionMonitorEndpointScopeItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &c.Address) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorHTTPConfiguration. +func (c ConnectionMonitorHTTPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "method", c.Method) + populate(objectMap, "path", c.Path) + populate(objectMap, "port", c.Port) + populate(objectMap, "preferHTTPS", c.PreferHTTPS) + populate(objectMap, "requestHeaders", c.RequestHeaders) + populate(objectMap, "validStatusCodeRanges", c.ValidStatusCodeRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorHTTPConfiguration. +func (c *ConnectionMonitorHTTPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "method": + err = unpopulate(val, "Method", &c.Method) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &c.Path) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &c.Port) + delete(rawMsg, key) + case "preferHTTPS": + err = unpopulate(val, "PreferHTTPS", &c.PreferHTTPS) + delete(rawMsg, key) + case "requestHeaders": + err = unpopulate(val, "RequestHeaders", &c.RequestHeaders) + delete(rawMsg, key) + case "validStatusCodeRanges": + err = unpopulate(val, "ValidStatusCodeRanges", &c.ValidStatusCodeRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorIcmpConfiguration. +func (c ConnectionMonitorIcmpConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disableTraceRoute", c.DisableTraceRoute) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorIcmpConfiguration. +func (c *ConnectionMonitorIcmpConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disableTraceRoute": + err = unpopulate(val, "DisableTraceRoute", &c.DisableTraceRoute) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorListResult. +func (c ConnectionMonitorListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorListResult. +func (c *ConnectionMonitorListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorOutput. +func (c ConnectionMonitorOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", c.Type) + populate(objectMap, "workspaceSettings", c.WorkspaceSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorOutput. +func (c *ConnectionMonitorOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "workspaceSettings": + err = unpopulate(val, "WorkspaceSettings", &c.WorkspaceSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorParameters. +func (c ConnectionMonitorParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoStart", c.AutoStart) + populate(objectMap, "destination", c.Destination) + populate(objectMap, "endpoints", c.Endpoints) + populate(objectMap, "monitoringIntervalInSeconds", c.MonitoringIntervalInSeconds) + populate(objectMap, "notes", c.Notes) + populate(objectMap, "outputs", c.Outputs) + populate(objectMap, "source", c.Source) + populate(objectMap, "testConfigurations", c.TestConfigurations) + populate(objectMap, "testGroups", c.TestGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorParameters. +func (c *ConnectionMonitorParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoStart": + err = unpopulate(val, "AutoStart", &c.AutoStart) + delete(rawMsg, key) + case "destination": + err = unpopulate(val, "Destination", &c.Destination) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &c.Endpoints) + delete(rawMsg, key) + case "monitoringIntervalInSeconds": + err = unpopulate(val, "MonitoringIntervalInSeconds", &c.MonitoringIntervalInSeconds) + delete(rawMsg, key) + case "notes": + err = unpopulate(val, "Notes", &c.Notes) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &c.Outputs) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &c.Source) + delete(rawMsg, key) + case "testConfigurations": + err = unpopulate(val, "TestConfigurations", &c.TestConfigurations) + delete(rawMsg, key) + case "testGroups": + err = unpopulate(val, "TestGroups", &c.TestGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorQueryResult. +func (c ConnectionMonitorQueryResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sourceStatus", c.SourceStatus) + populate(objectMap, "states", c.States) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorQueryResult. +func (c *ConnectionMonitorQueryResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sourceStatus": + err = unpopulate(val, "SourceStatus", &c.SourceStatus) + delete(rawMsg, key) + case "states": + err = unpopulate(val, "States", &c.States) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorResult. +func (c ConnectionMonitorResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "id", c.ID) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorResult. +func (c *ConnectionMonitorResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &c.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorResultProperties. +func (c ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoStart", c.AutoStart) + populate(objectMap, "connectionMonitorType", c.ConnectionMonitorType) + populate(objectMap, "destination", c.Destination) + populate(objectMap, "endpoints", c.Endpoints) + populate(objectMap, "monitoringIntervalInSeconds", c.MonitoringIntervalInSeconds) + populate(objectMap, "monitoringStatus", c.MonitoringStatus) + populate(objectMap, "notes", c.Notes) + populate(objectMap, "outputs", c.Outputs) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "source", c.Source) + populateDateTimeRFC3339(objectMap, "startTime", c.StartTime) + populate(objectMap, "testConfigurations", c.TestConfigurations) + populate(objectMap, "testGroups", c.TestGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorResultProperties. +func (c *ConnectionMonitorResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoStart": + err = unpopulate(val, "AutoStart", &c.AutoStart) + delete(rawMsg, key) + case "connectionMonitorType": + err = unpopulate(val, "ConnectionMonitorType", &c.ConnectionMonitorType) + delete(rawMsg, key) + case "destination": + err = unpopulate(val, "Destination", &c.Destination) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &c.Endpoints) + delete(rawMsg, key) + case "monitoringIntervalInSeconds": + err = unpopulate(val, "MonitoringIntervalInSeconds", &c.MonitoringIntervalInSeconds) + delete(rawMsg, key) + case "monitoringStatus": + err = unpopulate(val, "MonitoringStatus", &c.MonitoringStatus) + delete(rawMsg, key) + case "notes": + err = unpopulate(val, "Notes", &c.Notes) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &c.Outputs) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &c.Source) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &c.StartTime) + delete(rawMsg, key) + case "testConfigurations": + err = unpopulate(val, "TestConfigurations", &c.TestConfigurations) + delete(rawMsg, key) + case "testGroups": + err = unpopulate(val, "TestGroups", &c.TestGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorSource. +func (c ConnectionMonitorSource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "port", c.Port) + populate(objectMap, "resourceId", c.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorSource. +func (c *ConnectionMonitorSource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "port": + err = unpopulate(val, "Port", &c.Port) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorSuccessThreshold. +func (c ConnectionMonitorSuccessThreshold) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "checksFailedPercent", c.ChecksFailedPercent) + populate(objectMap, "roundTripTimeMs", c.RoundTripTimeMs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorSuccessThreshold. +func (c *ConnectionMonitorSuccessThreshold) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "checksFailedPercent": + err = unpopulate(val, "ChecksFailedPercent", &c.ChecksFailedPercent) + delete(rawMsg, key) + case "roundTripTimeMs": + err = unpopulate(val, "RoundTripTimeMs", &c.RoundTripTimeMs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTCPConfiguration. +func (c ConnectionMonitorTCPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationPortBehavior", c.DestinationPortBehavior) + populate(objectMap, "disableTraceRoute", c.DisableTraceRoute) + populate(objectMap, "port", c.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorTCPConfiguration. +func (c *ConnectionMonitorTCPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationPortBehavior": + err = unpopulate(val, "DestinationPortBehavior", &c.DestinationPortBehavior) + delete(rawMsg, key) + case "disableTraceRoute": + err = unpopulate(val, "DisableTraceRoute", &c.DisableTraceRoute) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &c.Port) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTestConfiguration. +func (c ConnectionMonitorTestConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "httpConfiguration", c.HTTPConfiguration) + populate(objectMap, "icmpConfiguration", c.IcmpConfiguration) + populate(objectMap, "name", c.Name) + populate(objectMap, "preferredIPVersion", c.PreferredIPVersion) + populate(objectMap, "protocol", c.Protocol) + populate(objectMap, "successThreshold", c.SuccessThreshold) + populate(objectMap, "tcpConfiguration", c.TCPConfiguration) + populate(objectMap, "testFrequencySec", c.TestFrequencySec) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorTestConfiguration. +func (c *ConnectionMonitorTestConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "httpConfiguration": + err = unpopulate(val, "HTTPConfiguration", &c.HTTPConfiguration) + delete(rawMsg, key) + case "icmpConfiguration": + err = unpopulate(val, "IcmpConfiguration", &c.IcmpConfiguration) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "preferredIPVersion": + err = unpopulate(val, "PreferredIPVersion", &c.PreferredIPVersion) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &c.Protocol) + delete(rawMsg, key) + case "successThreshold": + err = unpopulate(val, "SuccessThreshold", &c.SuccessThreshold) + delete(rawMsg, key) + case "tcpConfiguration": + err = unpopulate(val, "TCPConfiguration", &c.TCPConfiguration) + delete(rawMsg, key) + case "testFrequencySec": + err = unpopulate(val, "TestFrequencySec", &c.TestFrequencySec) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTestGroup. +func (c ConnectionMonitorTestGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinations", c.Destinations) + populate(objectMap, "disable", c.Disable) + populate(objectMap, "name", c.Name) + populate(objectMap, "sources", c.Sources) + populate(objectMap, "testConfigurations", c.TestConfigurations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorTestGroup. +func (c *ConnectionMonitorTestGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinations": + err = unpopulate(val, "Destinations", &c.Destinations) + delete(rawMsg, key) + case "disable": + err = unpopulate(val, "Disable", &c.Disable) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "sources": + err = unpopulate(val, "Sources", &c.Sources) + delete(rawMsg, key) + case "testConfigurations": + err = unpopulate(val, "TestConfigurations", &c.TestConfigurations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorWorkspaceSettings. +func (c ConnectionMonitorWorkspaceSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "workspaceResourceId", c.WorkspaceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorWorkspaceSettings. +func (c *ConnectionMonitorWorkspaceSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "workspaceResourceId": + err = unpopulate(val, "WorkspaceResourceID", &c.WorkspaceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionResetSharedKey. +func (c ConnectionResetSharedKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyLength", c.KeyLength) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionResetSharedKey. +func (c *ConnectionResetSharedKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyLength": + err = unpopulate(val, "KeyLength", &c.KeyLength) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionSharedKey. +func (c ConnectionSharedKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionSharedKey. +func (c *ConnectionSharedKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionSharedKeyResult. +func (c ConnectionSharedKeyResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionSharedKeyResult. +func (c *ConnectionSharedKeyResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionSharedKeyResultList. +func (c ConnectionSharedKeyResultList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionSharedKeyResultList. +func (c *ConnectionSharedKeyResultList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionStateSnapshot. +func (c ConnectionStateSnapshot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) + populate(objectMap, "connectionState", c.ConnectionState) + populateDateTimeRFC3339(objectMap, "endTime", c.EndTime) + populate(objectMap, "evaluationState", c.EvaluationState) + populate(objectMap, "hops", c.Hops) + populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) + populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) + populate(objectMap, "probesFailed", c.ProbesFailed) + populate(objectMap, "probesSent", c.ProbesSent) + populateDateTimeRFC3339(objectMap, "startTime", c.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionStateSnapshot. +func (c *ConnectionStateSnapshot) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "avgLatencyInMs": + err = unpopulate(val, "AvgLatencyInMs", &c.AvgLatencyInMs) + delete(rawMsg, key) + case "connectionState": + err = unpopulate(val, "ConnectionState", &c.ConnectionState) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &c.EndTime) + delete(rawMsg, key) + case "evaluationState": + err = unpopulate(val, "EvaluationState", &c.EvaluationState) + delete(rawMsg, key) + case "hops": + err = unpopulate(val, "Hops", &c.Hops) + delete(rawMsg, key) + case "maxLatencyInMs": + err = unpopulate(val, "MaxLatencyInMs", &c.MaxLatencyInMs) + delete(rawMsg, key) + case "minLatencyInMs": + err = unpopulate(val, "MinLatencyInMs", &c.MinLatencyInMs) + delete(rawMsg, key) + case "probesFailed": + err = unpopulate(val, "ProbesFailed", &c.ProbesFailed) + delete(rawMsg, key) + case "probesSent": + err = unpopulate(val, "ProbesSent", &c.ProbesSent) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &c.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityConfiguration. +func (c ConnectivityConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityConfiguration. +func (c *ConnectivityConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &c.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityConfigurationListResult. +func (c ConnectivityConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityConfigurationListResult. +func (c *ConnectivityConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityConfigurationProperties. +func (c ConnectivityConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appliesToGroups", c.AppliesToGroups) + populate(objectMap, "connectivityTopology", c.ConnectivityTopology) + populate(objectMap, "deleteExistingPeering", c.DeleteExistingPeering) + populate(objectMap, "description", c.Description) + populate(objectMap, "hubs", c.Hubs) + populate(objectMap, "isGlobal", c.IsGlobal) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "resourceGuid", c.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityConfigurationProperties. +func (c *ConnectivityConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appliesToGroups": + err = unpopulate(val, "AppliesToGroups", &c.AppliesToGroups) + delete(rawMsg, key) + case "connectivityTopology": + err = unpopulate(val, "ConnectivityTopology", &c.ConnectivityTopology) + delete(rawMsg, key) + case "deleteExistingPeering": + err = unpopulate(val, "DeleteExistingPeering", &c.DeleteExistingPeering) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "hubs": + err = unpopulate(val, "Hubs", &c.Hubs) + delete(rawMsg, key) + case "isGlobal": + err = unpopulate(val, "IsGlobal", &c.IsGlobal) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &c.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityDestination. +func (c ConnectivityDestination) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", c.Address) + populate(objectMap, "port", c.Port) + populate(objectMap, "resourceId", c.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityDestination. +func (c *ConnectivityDestination) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &c.Address) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &c.Port) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityGroupItem. +func (c ConnectivityGroupItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupConnectivity", c.GroupConnectivity) + populate(objectMap, "isGlobal", c.IsGlobal) + populate(objectMap, "networkGroupId", c.NetworkGroupID) + populate(objectMap, "useHubGateway", c.UseHubGateway) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityGroupItem. +func (c *ConnectivityGroupItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupConnectivity": + err = unpopulate(val, "GroupConnectivity", &c.GroupConnectivity) + delete(rawMsg, key) + case "isGlobal": + err = unpopulate(val, "IsGlobal", &c.IsGlobal) + delete(rawMsg, key) + case "networkGroupId": + err = unpopulate(val, "NetworkGroupID", &c.NetworkGroupID) + delete(rawMsg, key) + case "useHubGateway": + err = unpopulate(val, "UseHubGateway", &c.UseHubGateway) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityHop. +func (c ConnectivityHop) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", c.Address) + populate(objectMap, "id", c.ID) + populate(objectMap, "issues", c.Issues) + populate(objectMap, "links", c.Links) + populate(objectMap, "nextHopIds", c.NextHopIDs) + populate(objectMap, "previousHopIds", c.PreviousHopIDs) + populate(objectMap, "previousLinks", c.PreviousLinks) + populate(objectMap, "resourceId", c.ResourceID) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityHop. +func (c *ConnectivityHop) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &c.Address) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "issues": + err = unpopulate(val, "Issues", &c.Issues) + delete(rawMsg, key) + case "links": + err = unpopulate(val, "Links", &c.Links) + delete(rawMsg, key) + case "nextHopIds": + err = unpopulate(val, "NextHopIDs", &c.NextHopIDs) + delete(rawMsg, key) + case "previousHopIds": + err = unpopulate(val, "PreviousHopIDs", &c.PreviousHopIDs) + delete(rawMsg, key) + case "previousLinks": + err = unpopulate(val, "PreviousLinks", &c.PreviousLinks) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityInformation. +func (c ConnectivityInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) + populate(objectMap, "connectionStatus", c.ConnectionStatus) + populate(objectMap, "hops", c.Hops) + populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) + populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) + populate(objectMap, "probesFailed", c.ProbesFailed) + populate(objectMap, "probesSent", c.ProbesSent) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityInformation. +func (c *ConnectivityInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "avgLatencyInMs": + err = unpopulate(val, "AvgLatencyInMs", &c.AvgLatencyInMs) + delete(rawMsg, key) + case "connectionStatus": + err = unpopulate(val, "ConnectionStatus", &c.ConnectionStatus) + delete(rawMsg, key) + case "hops": + err = unpopulate(val, "Hops", &c.Hops) + delete(rawMsg, key) + case "maxLatencyInMs": + err = unpopulate(val, "MaxLatencyInMs", &c.MaxLatencyInMs) + delete(rawMsg, key) + case "minLatencyInMs": + err = unpopulate(val, "MinLatencyInMs", &c.MinLatencyInMs) + delete(rawMsg, key) + case "probesFailed": + err = unpopulate(val, "ProbesFailed", &c.ProbesFailed) + delete(rawMsg, key) + case "probesSent": + err = unpopulate(val, "ProbesSent", &c.ProbesSent) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityIssue. +func (c ConnectivityIssue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "context", c.Context) + populate(objectMap, "origin", c.Origin) + populate(objectMap, "severity", c.Severity) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityIssue. +func (c *ConnectivityIssue) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "context": + err = unpopulate(val, "Context", &c.Context) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &c.Origin) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &c.Severity) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityParameters. +func (c ConnectivityParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destination", c.Destination) + populate(objectMap, "preferredIPVersion", c.PreferredIPVersion) + populate(objectMap, "protocol", c.Protocol) + populate(objectMap, "protocolConfiguration", c.ProtocolConfiguration) + populate(objectMap, "source", c.Source) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityParameters. +func (c *ConnectivityParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destination": + err = unpopulate(val, "Destination", &c.Destination) + delete(rawMsg, key) + case "preferredIPVersion": + err = unpopulate(val, "PreferredIPVersion", &c.PreferredIPVersion) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &c.Protocol) + delete(rawMsg, key) + case "protocolConfiguration": + err = unpopulate(val, "ProtocolConfiguration", &c.ProtocolConfiguration) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &c.Source) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivitySource. +func (c ConnectivitySource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "port", c.Port) + populate(objectMap, "resourceId", c.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivitySource. +func (c *ConnectivitySource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "port": + err = unpopulate(val, "Port", &c.Port) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Container. +func (c Container) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Container. +func (c *Container) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterface. +func (c ContainerNetworkInterface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterface. +func (c *ContainerNetworkInterface) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &c.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceConfiguration. +func (c ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfaceConfiguration. +func (c *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &c.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceConfigurationPropertiesFormat. +func (c ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerNetworkInterfaces", c.ContainerNetworkInterfaces) + populate(objectMap, "ipConfigurations", c.IPConfigurations) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfaceConfigurationPropertiesFormat. +func (c *ContainerNetworkInterfaceConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerNetworkInterfaces": + err = unpopulate(val, "ContainerNetworkInterfaces", &c.ContainerNetworkInterfaces) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &c.IPConfigurations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceIPConfiguration. +func (c ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfaceIPConfiguration. +func (c *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &c.Etag) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceIPConfigurationPropertiesFormat. +func (c ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfaceIPConfigurationPropertiesFormat. +func (c *ContainerNetworkInterfaceIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfacePropertiesFormat. +func (c ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "container", c.Container) + populate(objectMap, "containerNetworkInterfaceConfiguration", c.ContainerNetworkInterfaceConfiguration) + populate(objectMap, "ipConfigurations", c.IPConfigurations) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerNetworkInterfacePropertiesFormat. +func (c *ContainerNetworkInterfacePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "container": + err = unpopulate(val, "Container", &c.Container) + delete(rawMsg, key) + case "containerNetworkInterfaceConfiguration": + err = unpopulate(val, "ContainerNetworkInterfaceConfiguration", &c.ContainerNetworkInterfaceConfiguration) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &c.IPConfigurations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Criterion. +func (c Criterion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asPath", c.AsPath) + populate(objectMap, "community", c.Community) + populate(objectMap, "matchCondition", c.MatchCondition) + populate(objectMap, "routePrefix", c.RoutePrefix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Criterion. +func (c *Criterion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asPath": + err = unpopulate(val, "AsPath", &c.AsPath) + delete(rawMsg, key) + case "community": + err = unpopulate(val, "Community", &c.Community) + delete(rawMsg, key) + case "matchCondition": + err = unpopulate(val, "MatchCondition", &c.MatchCondition) + delete(rawMsg, key) + case "routePrefix": + err = unpopulate(val, "RoutePrefix", &c.RoutePrefix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CrossTenantScopes. +func (c CrossTenantScopes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "managementGroups", c.ManagementGroups) + populate(objectMap, "subscriptions", c.Subscriptions) + populate(objectMap, "tenantId", c.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CrossTenantScopes. +func (c *CrossTenantScopes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "managementGroups": + err = unpopulate(val, "ManagementGroups", &c.ManagementGroups) + delete(rawMsg, key) + case "subscriptions": + err = unpopulate(val, "Subscriptions", &c.Subscriptions) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &c.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDNSConfigPropertiesFormat. +func (c CustomDNSConfigPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fqdn", c.Fqdn) + populate(objectMap, "ipAddresses", c.IPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomDNSConfigPropertiesFormat. +func (c *CustomDNSConfigPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fqdn": + err = unpopulate(val, "Fqdn", &c.Fqdn) + delete(rawMsg, key) + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &c.IPAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefix. +func (c CustomIPPrefix) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "extendedLocation", c.ExtendedLocation) + populate(objectMap, "id", c.ID) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + populate(objectMap, "zones", c.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomIPPrefix. +func (c *CustomIPPrefix) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &c.Etag) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &c.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &c.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefixListResult. +func (c CustomIPPrefixListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomIPPrefixListResult. +func (c *CustomIPPrefixListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefixPropertiesFormat. +func (c CustomIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asn", c.Asn) + populate(objectMap, "authorizationMessage", c.AuthorizationMessage) + populate(objectMap, "childCustomIpPrefixes", c.ChildCustomIPPrefixes) + populate(objectMap, "cidr", c.Cidr) + populate(objectMap, "commissionedState", c.CommissionedState) + populate(objectMap, "customIpPrefixParent", c.CustomIPPrefixParent) + populate(objectMap, "expressRouteAdvertise", c.ExpressRouteAdvertise) + populate(objectMap, "failedReason", c.FailedReason) + populate(objectMap, "geo", c.Geo) + populate(objectMap, "noInternetAdvertise", c.NoInternetAdvertise) + populate(objectMap, "prefixType", c.PrefixType) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "publicIpPrefixes", c.PublicIPPrefixes) + populate(objectMap, "resourceGuid", c.ResourceGUID) + populate(objectMap, "signedMessage", c.SignedMessage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomIPPrefixPropertiesFormat. +func (c *CustomIPPrefixPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asn": + err = unpopulate(val, "Asn", &c.Asn) + delete(rawMsg, key) + case "authorizationMessage": + err = unpopulate(val, "AuthorizationMessage", &c.AuthorizationMessage) + delete(rawMsg, key) + case "childCustomIpPrefixes": + err = unpopulate(val, "ChildCustomIPPrefixes", &c.ChildCustomIPPrefixes) + delete(rawMsg, key) + case "cidr": + err = unpopulate(val, "Cidr", &c.Cidr) + delete(rawMsg, key) + case "commissionedState": + err = unpopulate(val, "CommissionedState", &c.CommissionedState) + delete(rawMsg, key) + case "customIpPrefixParent": + err = unpopulate(val, "CustomIPPrefixParent", &c.CustomIPPrefixParent) + delete(rawMsg, key) + case "expressRouteAdvertise": + err = unpopulate(val, "ExpressRouteAdvertise", &c.ExpressRouteAdvertise) + delete(rawMsg, key) + case "failedReason": + err = unpopulate(val, "FailedReason", &c.FailedReason) + delete(rawMsg, key) + case "geo": + err = unpopulate(val, "Geo", &c.Geo) + delete(rawMsg, key) + case "noInternetAdvertise": + err = unpopulate(val, "NoInternetAdvertise", &c.NoInternetAdvertise) + delete(rawMsg, key) + case "prefixType": + err = unpopulate(val, "PrefixType", &c.PrefixType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "publicIpPrefixes": + err = unpopulate(val, "PublicIPPrefixes", &c.PublicIPPrefixes) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &c.ResourceGUID) + delete(rawMsg, key) + case "signedMessage": + err = unpopulate(val, "SignedMessage", &c.SignedMessage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DNSNameAvailabilityResult. +func (d DNSNameAvailabilityResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "available", d.Available) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DNSNameAvailabilityResult. +func (d *DNSNameAvailabilityResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "available": + err = unpopulate(val, "Available", &d.Available) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DNSSettings. +func (d DNSSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableProxy", d.EnableProxy) + populate(objectMap, "requireProxyForNetworkRules", d.RequireProxyForNetworkRules) + populate(objectMap, "servers", d.Servers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DNSSettings. +func (d *DNSSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableProxy": + err = unpopulate(val, "EnableProxy", &d.EnableProxy) + delete(rawMsg, key) + case "requireProxyForNetworkRules": + err = unpopulate(val, "RequireProxyForNetworkRules", &d.RequireProxyForNetworkRules) + delete(rawMsg, key) + case "servers": + err = unpopulate(val, "Servers", &d.Servers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DdosCustomPolicy. +func (d DdosCustomPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DdosCustomPolicy. +func (d *DdosCustomPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &d.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DdosCustomPolicyPropertiesFormat. +func (d DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "resourceGuid", d.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DdosCustomPolicyPropertiesFormat. +func (d *DdosCustomPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &d.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlan. +func (d DdosProtectionPlan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DdosProtectionPlan. +func (d *DdosProtectionPlan) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &d.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlanListResult. +func (d DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DdosProtectionPlanListResult. +func (d *DdosProtectionPlanListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlanPropertiesFormat. +func (d DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "publicIPAddresses", d.PublicIPAddresses) + populate(objectMap, "resourceGuid", d.ResourceGUID) + populate(objectMap, "virtualNetworks", d.VirtualNetworks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DdosProtectionPlanPropertiesFormat. +func (d *DdosProtectionPlanPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddresses": + err = unpopulate(val, "PublicIPAddresses", &d.PublicIPAddresses) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &d.ResourceGUID) + delete(rawMsg, key) + case "virtualNetworks": + err = unpopulate(val, "VirtualNetworks", &d.VirtualNetworks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DdosSettings. +func (d DdosSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ddosProtectionPlan", d.DdosProtectionPlan) + populate(objectMap, "protectionMode", d.ProtectionMode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DdosSettings. +func (d *DdosSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ddosProtectionPlan": + err = unpopulate(val, "DdosProtectionPlan", &d.DdosProtectionPlan) + delete(rawMsg, key) + case "protectionMode": + err = unpopulate(val, "ProtectionMode", &d.ProtectionMode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultAdminPropertiesFormat. +func (d DefaultAdminPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "access", d.Access) + populate(objectMap, "description", d.Description) + populate(objectMap, "destinationPortRanges", d.DestinationPortRanges) + populate(objectMap, "destinations", d.Destinations) + populate(objectMap, "direction", d.Direction) + populate(objectMap, "flag", d.Flag) + populate(objectMap, "priority", d.Priority) + populate(objectMap, "protocol", d.Protocol) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "resourceGuid", d.ResourceGUID) + populate(objectMap, "sourcePortRanges", d.SourcePortRanges) + populate(objectMap, "sources", d.Sources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultAdminPropertiesFormat. +func (d *DefaultAdminPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "access": + err = unpopulate(val, "Access", &d.Access) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "destinationPortRanges": + err = unpopulate(val, "DestinationPortRanges", &d.DestinationPortRanges) + delete(rawMsg, key) + case "destinations": + err = unpopulate(val, "Destinations", &d.Destinations) + delete(rawMsg, key) + case "direction": + err = unpopulate(val, "Direction", &d.Direction) + delete(rawMsg, key) + case "flag": + err = unpopulate(val, "Flag", &d.Flag) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &d.Priority) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &d.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &d.ResourceGUID) + delete(rawMsg, key) + case "sourcePortRanges": + err = unpopulate(val, "SourcePortRanges", &d.SourcePortRanges) + delete(rawMsg, key) + case "sources": + err = unpopulate(val, "Sources", &d.Sources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultAdminRule. +func (d DefaultAdminRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) + objectMap["kind"] = AdminRuleKindDefault + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultAdminRule. +func (d *DefaultAdminRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &d.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultRuleSetPropertyFormat. +func (d DefaultRuleSetPropertyFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ruleSetType", d.RuleSetType) + populate(objectMap, "ruleSetVersion", d.RuleSetVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultRuleSetPropertyFormat. +func (d *DefaultRuleSetPropertyFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ruleSetType": + err = unpopulate(val, "RuleSetType", &d.RuleSetType) + delete(rawMsg, key) + case "ruleSetVersion": + err = unpopulate(val, "RuleSetVersion", &d.RuleSetVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Delegation. +func (d Delegation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Delegation. +func (d *Delegation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &d.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DelegationProperties. +func (d DelegationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "serviceName", d.ServiceName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DelegationProperties. +func (d *DelegationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "serviceName": + err = unpopulate(val, "ServiceName", &d.ServiceName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeviceProperties. +func (d DeviceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deviceModel", d.DeviceModel) + populate(objectMap, "deviceVendor", d.DeviceVendor) + populate(objectMap, "linkSpeedInMbps", d.LinkSpeedInMbps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeviceProperties. +func (d *DeviceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deviceModel": + err = unpopulate(val, "DeviceModel", &d.DeviceModel) + delete(rawMsg, key) + case "deviceVendor": + err = unpopulate(val, "DeviceVendor", &d.DeviceVendor) + delete(rawMsg, key) + case "linkSpeedInMbps": + err = unpopulate(val, "LinkSpeedInMbps", &d.LinkSpeedInMbps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DhcpOptions. +func (d DhcpOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dnsServers", d.DNSServers) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DhcpOptions. +func (d *DhcpOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dnsServers": + err = unpopulate(val, "DNSServers", &d.DNSServers) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Dimension. +func (d Dimension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "internalName", d.InternalName) + populate(objectMap, "name", d.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Dimension. +func (d *Dimension) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "internalName": + err = unpopulate(val, "InternalName", &d.InternalName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DscpConfiguration. +func (d DscpConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DscpConfiguration. +func (d *DscpConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &d.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DscpConfigurationListResult. +func (d DscpConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DscpConfigurationListResult. +func (d *DscpConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DscpConfigurationPropertiesFormat. +func (d DscpConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "associatedNetworkInterfaces", d.AssociatedNetworkInterfaces) + populate(objectMap, "destinationIpRanges", d.DestinationIPRanges) + populate(objectMap, "destinationPortRanges", d.DestinationPortRanges) + populate(objectMap, "markings", d.Markings) + populate(objectMap, "protocol", d.Protocol) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "qosCollectionId", d.QosCollectionID) + populate(objectMap, "qosDefinitionCollection", d.QosDefinitionCollection) + populate(objectMap, "resourceGuid", d.ResourceGUID) + populate(objectMap, "sourceIpRanges", d.SourceIPRanges) + populate(objectMap, "sourcePortRanges", d.SourcePortRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DscpConfigurationPropertiesFormat. +func (d *DscpConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "associatedNetworkInterfaces": + err = unpopulate(val, "AssociatedNetworkInterfaces", &d.AssociatedNetworkInterfaces) + delete(rawMsg, key) + case "destinationIpRanges": + err = unpopulate(val, "DestinationIPRanges", &d.DestinationIPRanges) + delete(rawMsg, key) + case "destinationPortRanges": + err = unpopulate(val, "DestinationPortRanges", &d.DestinationPortRanges) + delete(rawMsg, key) + case "markings": + err = unpopulate(val, "Markings", &d.Markings) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &d.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "qosCollectionId": + err = unpopulate(val, "QosCollectionID", &d.QosCollectionID) + delete(rawMsg, key) + case "qosDefinitionCollection": + err = unpopulate(val, "QosDefinitionCollection", &d.QosDefinitionCollection) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &d.ResourceGUID) + delete(rawMsg, key) + case "sourceIpRanges": + err = unpopulate(val, "SourceIPRanges", &d.SourceIPRanges) + delete(rawMsg, key) + case "sourcePortRanges": + err = unpopulate(val, "SourcePortRanges", &d.SourcePortRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveBaseSecurityAdminRule. +func (e EffectiveBaseSecurityAdminRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configurationDescription", e.ConfigurationDescription) + populate(objectMap, "id", e.ID) + objectMap["kind"] = e.Kind + populate(objectMap, "ruleCollectionAppliesToGroups", e.RuleCollectionAppliesToGroups) + populate(objectMap, "ruleCollectionDescription", e.RuleCollectionDescription) + populate(objectMap, "ruleGroups", e.RuleGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveBaseSecurityAdminRule. +func (e *EffectiveBaseSecurityAdminRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configurationDescription": + err = unpopulate(val, "ConfigurationDescription", &e.ConfigurationDescription) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "ruleCollectionAppliesToGroups": + err = unpopulate(val, "RuleCollectionAppliesToGroups", &e.RuleCollectionAppliesToGroups) + delete(rawMsg, key) + case "ruleCollectionDescription": + err = unpopulate(val, "RuleCollectionDescription", &e.RuleCollectionDescription) + delete(rawMsg, key) + case "ruleGroups": + err = unpopulate(val, "RuleGroups", &e.RuleGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveConnectivityConfiguration. +func (e EffectiveConnectivityConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configurationGroups", e.ConfigurationGroups) + populate(objectMap, "id", e.ID) + populate(objectMap, "properties", e.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveConnectivityConfiguration. +func (e *EffectiveConnectivityConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configurationGroups": + err = unpopulate(val, "ConfigurationGroups", &e.ConfigurationGroups) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveDefaultSecurityAdminRule. +func (e EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configurationDescription", e.ConfigurationDescription) + populate(objectMap, "id", e.ID) + objectMap["kind"] = EffectiveAdminRuleKindDefault + populate(objectMap, "properties", e.Properties) + populate(objectMap, "ruleCollectionAppliesToGroups", e.RuleCollectionAppliesToGroups) + populate(objectMap, "ruleCollectionDescription", e.RuleCollectionDescription) + populate(objectMap, "ruleGroups", e.RuleGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveDefaultSecurityAdminRule. +func (e *EffectiveDefaultSecurityAdminRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configurationDescription": + err = unpopulate(val, "ConfigurationDescription", &e.ConfigurationDescription) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "ruleCollectionAppliesToGroups": + err = unpopulate(val, "RuleCollectionAppliesToGroups", &e.RuleCollectionAppliesToGroups) + delete(rawMsg, key) + case "ruleCollectionDescription": + err = unpopulate(val, "RuleCollectionDescription", &e.RuleCollectionDescription) + delete(rawMsg, key) + case "ruleGroups": + err = unpopulate(val, "RuleGroups", &e.RuleGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroup. +func (e EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "association", e.Association) + populate(objectMap, "effectiveSecurityRules", e.EffectiveSecurityRules) + populate(objectMap, "networkSecurityGroup", e.NetworkSecurityGroup) + populate(objectMap, "tagMap", e.TagMap) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveNetworkSecurityGroup. +func (e *EffectiveNetworkSecurityGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "association": + err = unpopulate(val, "Association", &e.Association) + delete(rawMsg, key) + case "effectiveSecurityRules": + err = unpopulate(val, "EffectiveSecurityRules", &e.EffectiveSecurityRules) + delete(rawMsg, key) + case "networkSecurityGroup": + err = unpopulate(val, "NetworkSecurityGroup", &e.NetworkSecurityGroup) + delete(rawMsg, key) + case "tagMap": + err = unpopulate(val, "TagMap", &e.TagMap) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroupAssociation. +func (e EffectiveNetworkSecurityGroupAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkInterface", e.NetworkInterface) + populate(objectMap, "networkManager", e.NetworkManager) + populate(objectMap, "subnet", e.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveNetworkSecurityGroupAssociation. +func (e *EffectiveNetworkSecurityGroupAssociation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkInterface": + err = unpopulate(val, "NetworkInterface", &e.NetworkInterface) + delete(rawMsg, key) + case "networkManager": + err = unpopulate(val, "NetworkManager", &e.NetworkManager) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &e.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroupListResult. +func (e EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveNetworkSecurityGroupListResult. +func (e *EffectiveNetworkSecurityGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityRule. +func (e EffectiveNetworkSecurityRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "access", e.Access) + populate(objectMap, "destinationAddressPrefix", e.DestinationAddressPrefix) + populate(objectMap, "destinationAddressPrefixes", e.DestinationAddressPrefixes) + populate(objectMap, "destinationPortRange", e.DestinationPortRange) + populate(objectMap, "destinationPortRanges", e.DestinationPortRanges) + populate(objectMap, "direction", e.Direction) + populate(objectMap, "expandedDestinationAddressPrefix", e.ExpandedDestinationAddressPrefix) + populate(objectMap, "expandedSourceAddressPrefix", e.ExpandedSourceAddressPrefix) + populate(objectMap, "name", e.Name) + populate(objectMap, "priority", e.Priority) + populate(objectMap, "protocol", e.Protocol) + populate(objectMap, "sourceAddressPrefix", e.SourceAddressPrefix) + populate(objectMap, "sourceAddressPrefixes", e.SourceAddressPrefixes) + populate(objectMap, "sourcePortRange", e.SourcePortRange) + populate(objectMap, "sourcePortRanges", e.SourcePortRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveNetworkSecurityRule. +func (e *EffectiveNetworkSecurityRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "access": + err = unpopulate(val, "Access", &e.Access) + delete(rawMsg, key) + case "destinationAddressPrefix": + err = unpopulate(val, "DestinationAddressPrefix", &e.DestinationAddressPrefix) + delete(rawMsg, key) + case "destinationAddressPrefixes": + err = unpopulate(val, "DestinationAddressPrefixes", &e.DestinationAddressPrefixes) + delete(rawMsg, key) + case "destinationPortRange": + err = unpopulate(val, "DestinationPortRange", &e.DestinationPortRange) + delete(rawMsg, key) + case "destinationPortRanges": + err = unpopulate(val, "DestinationPortRanges", &e.DestinationPortRanges) + delete(rawMsg, key) + case "direction": + err = unpopulate(val, "Direction", &e.Direction) + delete(rawMsg, key) + case "expandedDestinationAddressPrefix": + err = unpopulate(val, "ExpandedDestinationAddressPrefix", &e.ExpandedDestinationAddressPrefix) + delete(rawMsg, key) + case "expandedSourceAddressPrefix": + err = unpopulate(val, "ExpandedSourceAddressPrefix", &e.ExpandedSourceAddressPrefix) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &e.Priority) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &e.Protocol) + delete(rawMsg, key) + case "sourceAddressPrefix": + err = unpopulate(val, "SourceAddressPrefix", &e.SourceAddressPrefix) + delete(rawMsg, key) + case "sourceAddressPrefixes": + err = unpopulate(val, "SourceAddressPrefixes", &e.SourceAddressPrefixes) + delete(rawMsg, key) + case "sourcePortRange": + err = unpopulate(val, "SourcePortRange", &e.SourcePortRange) + delete(rawMsg, key) + case "sourcePortRanges": + err = unpopulate(val, "SourcePortRanges", &e.SourcePortRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveRoute. +func (e EffectiveRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefix", e.AddressPrefix) + populate(objectMap, "disableBgpRoutePropagation", e.DisableBgpRoutePropagation) + populate(objectMap, "name", e.Name) + populate(objectMap, "nextHopIpAddress", e.NextHopIPAddress) + populate(objectMap, "nextHopType", e.NextHopType) + populate(objectMap, "source", e.Source) + populate(objectMap, "state", e.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveRoute. +func (e *EffectiveRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &e.AddressPrefix) + delete(rawMsg, key) + case "disableBgpRoutePropagation": + err = unpopulate(val, "DisableBgpRoutePropagation", &e.DisableBgpRoutePropagation) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "nextHopIpAddress": + err = unpopulate(val, "NextHopIPAddress", &e.NextHopIPAddress) + delete(rawMsg, key) + case "nextHopType": + err = unpopulate(val, "NextHopType", &e.NextHopType) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &e.Source) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveRouteListResult. +func (e EffectiveRouteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveRouteListResult. +func (e *EffectiveRouteListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveRouteMapRoute. +func (e EffectiveRouteMapRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asPath", e.AsPath) + populate(objectMap, "bgpCommunities", e.BgpCommunities) + populate(objectMap, "prefix", e.Prefix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveRouteMapRoute. +func (e *EffectiveRouteMapRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asPath": + err = unpopulate(val, "AsPath", &e.AsPath) + delete(rawMsg, key) + case "bgpCommunities": + err = unpopulate(val, "BgpCommunities", &e.BgpCommunities) + delete(rawMsg, key) + case "prefix": + err = unpopulate(val, "Prefix", &e.Prefix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveRouteMapRouteList. +func (e EffectiveRouteMapRouteList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveRouteMapRouteList. +func (e *EffectiveRouteMapRouteList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveRoutesParameters. +func (e EffectiveRoutesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceId", e.ResourceID) + populate(objectMap, "virtualWanResourceType", e.VirtualWanResourceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveRoutesParameters. +func (e *EffectiveRoutesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceId": + err = unpopulate(val, "ResourceID", &e.ResourceID) + delete(rawMsg, key) + case "virtualWanResourceType": + err = unpopulate(val, "VirtualWanResourceType", &e.VirtualWanResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveSecurityAdminRule. +func (e EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configurationDescription", e.ConfigurationDescription) + populate(objectMap, "id", e.ID) + objectMap["kind"] = EffectiveAdminRuleKindCustom + populate(objectMap, "properties", e.Properties) + populate(objectMap, "ruleCollectionAppliesToGroups", e.RuleCollectionAppliesToGroups) + populate(objectMap, "ruleCollectionDescription", e.RuleCollectionDescription) + populate(objectMap, "ruleGroups", e.RuleGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EffectiveSecurityAdminRule. +func (e *EffectiveSecurityAdminRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configurationDescription": + err = unpopulate(val, "ConfigurationDescription", &e.ConfigurationDescription) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &e.Kind) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "ruleCollectionAppliesToGroups": + err = unpopulate(val, "RuleCollectionAppliesToGroups", &e.RuleCollectionAppliesToGroups) + delete(rawMsg, key) + case "ruleCollectionDescription": + err = unpopulate(val, "RuleCollectionDescription", &e.RuleCollectionDescription) + delete(rawMsg, key) + case "ruleGroups": + err = unpopulate(val, "RuleGroups", &e.RuleGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointServiceResult. +func (e EndpointServiceResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointServiceResult. +func (e *EndpointServiceResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointServicesListResult. +func (e EndpointServicesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointServicesListResult. +func (e *EndpointServicesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Error. +func (e Error) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "innerError", e.InnerError) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Error. +func (e *Error) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "innerError": + err = unpopulate(val, "InnerError", &e.InnerError) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorDetails. +func (e ErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetails. +func (e *ErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. +func (e *ErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EvaluatedNetworkSecurityGroup. +func (e EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appliedTo", e.AppliedTo) + populate(objectMap, "matchedRule", e.MatchedRule) + populate(objectMap, "networkSecurityGroupId", e.NetworkSecurityGroupID) + populate(objectMap, "rulesEvaluationResult", e.RulesEvaluationResult) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EvaluatedNetworkSecurityGroup. +func (e *EvaluatedNetworkSecurityGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appliedTo": + err = unpopulate(val, "AppliedTo", &e.AppliedTo) + delete(rawMsg, key) + case "matchedRule": + err = unpopulate(val, "MatchedRule", &e.MatchedRule) + delete(rawMsg, key) + case "networkSecurityGroupId": + err = unpopulate(val, "NetworkSecurityGroupID", &e.NetworkSecurityGroupID) + delete(rawMsg, key) + case "rulesEvaluationResult": + err = unpopulate(val, "RulesEvaluationResult", &e.RulesEvaluationResult) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExceptionEntry. +func (e ExceptionEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exceptionManagedRuleSets", e.ExceptionManagedRuleSets) + populate(objectMap, "matchVariable", e.MatchVariable) + populate(objectMap, "selector", e.Selector) + populate(objectMap, "selectorMatchOperator", e.SelectorMatchOperator) + populate(objectMap, "valueMatchOperator", e.ValueMatchOperator) + populate(objectMap, "values", e.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExceptionEntry. +func (e *ExceptionEntry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exceptionManagedRuleSets": + err = unpopulate(val, "ExceptionManagedRuleSets", &e.ExceptionManagedRuleSets) + delete(rawMsg, key) + case "matchVariable": + err = unpopulate(val, "MatchVariable", &e.MatchVariable) + delete(rawMsg, key) + case "selector": + err = unpopulate(val, "Selector", &e.Selector) + delete(rawMsg, key) + case "selectorMatchOperator": + err = unpopulate(val, "SelectorMatchOperator", &e.SelectorMatchOperator) + delete(rawMsg, key) + case "valueMatchOperator": + err = unpopulate(val, "ValueMatchOperator", &e.ValueMatchOperator) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &e.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRule. +func (e ExclusionManagedRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ruleId", e.RuleID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExclusionManagedRule. +func (e *ExclusionManagedRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ruleId": + err = unpopulate(val, "RuleID", &e.RuleID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRuleGroup. +func (e ExclusionManagedRuleGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ruleGroupName", e.RuleGroupName) + populate(objectMap, "rules", e.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExclusionManagedRuleGroup. +func (e *ExclusionManagedRuleGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ruleGroupName": + err = unpopulate(val, "RuleGroupName", &e.RuleGroupName) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &e.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRuleSet. +func (e ExclusionManagedRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ruleGroups", e.RuleGroups) + populate(objectMap, "ruleSetType", e.RuleSetType) + populate(objectMap, "ruleSetVersion", e.RuleSetVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExclusionManagedRuleSet. +func (e *ExclusionManagedRuleSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ruleGroups": + err = unpopulate(val, "RuleGroups", &e.RuleGroups) + delete(rawMsg, key) + case "ruleSetType": + err = unpopulate(val, "RuleSetType", &e.RuleSetType) + delete(rawMsg, key) + case "ruleSetVersion": + err = unpopulate(val, "RuleSetVersion", &e.RuleSetVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExplicitProxySettings. +func (e ExplicitProxySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableExplicitProxy", e.EnableExplicitProxy) + populate(objectMap, "enablePacFile", e.EnablePacFile) + populate(objectMap, "httpPort", e.HTTPPort) + populate(objectMap, "httpsPort", e.HTTPSPort) + populate(objectMap, "pacFile", e.PacFile) + populate(objectMap, "pacFilePort", e.PacFilePort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExplicitProxySettings. +func (e *ExplicitProxySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableExplicitProxy": + err = unpopulate(val, "EnableExplicitProxy", &e.EnableExplicitProxy) + delete(rawMsg, key) + case "enablePacFile": + err = unpopulate(val, "EnablePacFile", &e.EnablePacFile) + delete(rawMsg, key) + case "httpPort": + err = unpopulate(val, "HTTPPort", &e.HTTPPort) + delete(rawMsg, key) + case "httpsPort": + err = unpopulate(val, "HTTPSPort", &e.HTTPSPort) + delete(rawMsg, key) + case "pacFile": + err = unpopulate(val, "PacFile", &e.PacFile) + delete(rawMsg, key) + case "pacFilePort": + err = unpopulate(val, "PacFilePort", &e.PacFilePort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuit. +func (e ExpressRouteCircuit) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "sku", e.SKU) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuit. +func (e *ExpressRouteCircuit) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &e.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitArpTable. +func (e ExpressRouteCircuitArpTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "age", e.Age) + populate(objectMap, "ipAddress", e.IPAddress) + populate(objectMap, "interface", e.Interface) + populate(objectMap, "macAddress", e.MacAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitArpTable. +func (e *ExpressRouteCircuitArpTable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "age": + err = unpopulate(val, "Age", &e.Age) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &e.IPAddress) + delete(rawMsg, key) + case "interface": + err = unpopulate(val, "Interface", &e.Interface) + delete(rawMsg, key) + case "macAddress": + err = unpopulate(val, "MacAddress", &e.MacAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitAuthorization. +func (e ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitAuthorization. +func (e *ExpressRouteCircuitAuthorization) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnection. +func (e ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitConnection. +func (e *ExpressRouteCircuitConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnectionListResult. +func (e ExpressRouteCircuitConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitConnectionListResult. +func (e *ExpressRouteCircuitConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnectionPropertiesFormat. +func (e ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefix", e.AddressPrefix) + populate(objectMap, "authorizationKey", e.AuthorizationKey) + populate(objectMap, "circuitConnectionStatus", e.CircuitConnectionStatus) + populate(objectMap, "expressRouteCircuitPeering", e.ExpressRouteCircuitPeering) + populate(objectMap, "ipv6CircuitConnectionConfig", e.IPv6CircuitConnectionConfig) + populate(objectMap, "peerExpressRouteCircuitPeering", e.PeerExpressRouteCircuitPeering) + populate(objectMap, "provisioningState", e.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitConnectionPropertiesFormat. +func (e *ExpressRouteCircuitConnectionPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &e.AddressPrefix) + delete(rawMsg, key) + case "authorizationKey": + err = unpopulate(val, "AuthorizationKey", &e.AuthorizationKey) + delete(rawMsg, key) + case "circuitConnectionStatus": + err = unpopulate(val, "CircuitConnectionStatus", &e.CircuitConnectionStatus) + delete(rawMsg, key) + case "expressRouteCircuitPeering": + err = unpopulate(val, "ExpressRouteCircuitPeering", &e.ExpressRouteCircuitPeering) + delete(rawMsg, key) + case "ipv6CircuitConnectionConfig": + err = unpopulate(val, "IPv6CircuitConnectionConfig", &e.IPv6CircuitConnectionConfig) + delete(rawMsg, key) + case "peerExpressRouteCircuitPeering": + err = unpopulate(val, "PeerExpressRouteCircuitPeering", &e.PeerExpressRouteCircuitPeering) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitListResult. +func (e ExpressRouteCircuitListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitListResult. +func (e *ExpressRouteCircuitListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeering. +func (e ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPeering. +func (e *ExpressRouteCircuitPeering) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringConfig. +func (e ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "advertisedCommunities", e.AdvertisedCommunities) + populate(objectMap, "advertisedPublicPrefixes", e.AdvertisedPublicPrefixes) + populate(objectMap, "advertisedPublicPrefixesState", e.AdvertisedPublicPrefixesState) + populate(objectMap, "customerASN", e.CustomerASN) + populate(objectMap, "legacyMode", e.LegacyMode) + populate(objectMap, "routingRegistryName", e.RoutingRegistryName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPeeringConfig. +func (e *ExpressRouteCircuitPeeringConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "advertisedCommunities": + err = unpopulate(val, "AdvertisedCommunities", &e.AdvertisedCommunities) + delete(rawMsg, key) + case "advertisedPublicPrefixes": + err = unpopulate(val, "AdvertisedPublicPrefixes", &e.AdvertisedPublicPrefixes) + delete(rawMsg, key) + case "advertisedPublicPrefixesState": + err = unpopulate(val, "AdvertisedPublicPrefixesState", &e.AdvertisedPublicPrefixesState) + delete(rawMsg, key) + case "customerASN": + err = unpopulate(val, "CustomerASN", &e.CustomerASN) + delete(rawMsg, key) + case "legacyMode": + err = unpopulate(val, "LegacyMode", &e.LegacyMode) + delete(rawMsg, key) + case "routingRegistryName": + err = unpopulate(val, "RoutingRegistryName", &e.RoutingRegistryName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringID. +func (e ExpressRouteCircuitPeeringID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPeeringID. +func (e *ExpressRouteCircuitPeeringID) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringListResult. +func (e ExpressRouteCircuitPeeringListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPeeringListResult. +func (e *ExpressRouteCircuitPeeringListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringPropertiesFormat. +func (e ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureASN", e.AzureASN) + populate(objectMap, "connections", e.Connections) + populate(objectMap, "expressRouteConnection", e.ExpressRouteConnection) + populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) + populate(objectMap, "ipv6PeeringConfig", e.IPv6PeeringConfig) + populate(objectMap, "lastModifiedBy", e.LastModifiedBy) + populate(objectMap, "microsoftPeeringConfig", e.MicrosoftPeeringConfig) + populate(objectMap, "peerASN", e.PeerASN) + populate(objectMap, "peeredConnections", e.PeeredConnections) + populate(objectMap, "peeringType", e.PeeringType) + populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) + populate(objectMap, "primaryPeerAddressPrefix", e.PrimaryPeerAddressPrefix) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "routeFilter", e.RouteFilter) + populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) + populate(objectMap, "secondaryPeerAddressPrefix", e.SecondaryPeerAddressPrefix) + populate(objectMap, "sharedKey", e.SharedKey) + populate(objectMap, "state", e.State) + populate(objectMap, "stats", e.Stats) + populate(objectMap, "vlanId", e.VlanID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPeeringPropertiesFormat. +func (e *ExpressRouteCircuitPeeringPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureASN": + err = unpopulate(val, "AzureASN", &e.AzureASN) + delete(rawMsg, key) + case "connections": + err = unpopulate(val, "Connections", &e.Connections) + delete(rawMsg, key) + case "expressRouteConnection": + err = unpopulate(val, "ExpressRouteConnection", &e.ExpressRouteConnection) + delete(rawMsg, key) + case "gatewayManagerEtag": + err = unpopulate(val, "GatewayManagerEtag", &e.GatewayManagerEtag) + delete(rawMsg, key) + case "ipv6PeeringConfig": + err = unpopulate(val, "IPv6PeeringConfig", &e.IPv6PeeringConfig) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &e.LastModifiedBy) + delete(rawMsg, key) + case "microsoftPeeringConfig": + err = unpopulate(val, "MicrosoftPeeringConfig", &e.MicrosoftPeeringConfig) + delete(rawMsg, key) + case "peerASN": + err = unpopulate(val, "PeerASN", &e.PeerASN) + delete(rawMsg, key) + case "peeredConnections": + err = unpopulate(val, "PeeredConnections", &e.PeeredConnections) + delete(rawMsg, key) + case "peeringType": + err = unpopulate(val, "PeeringType", &e.PeeringType) + delete(rawMsg, key) + case "primaryAzurePort": + err = unpopulate(val, "PrimaryAzurePort", &e.PrimaryAzurePort) + delete(rawMsg, key) + case "primaryPeerAddressPrefix": + err = unpopulate(val, "PrimaryPeerAddressPrefix", &e.PrimaryPeerAddressPrefix) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "routeFilter": + err = unpopulate(val, "RouteFilter", &e.RouteFilter) + delete(rawMsg, key) + case "secondaryAzurePort": + err = unpopulate(val, "SecondaryAzurePort", &e.SecondaryAzurePort) + delete(rawMsg, key) + case "secondaryPeerAddressPrefix": + err = unpopulate(val, "SecondaryPeerAddressPrefix", &e.SecondaryPeerAddressPrefix) + delete(rawMsg, key) + case "sharedKey": + err = unpopulate(val, "SharedKey", &e.SharedKey) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + case "stats": + err = unpopulate(val, "Stats", &e.Stats) + delete(rawMsg, key) + case "vlanId": + err = unpopulate(val, "VlanID", &e.VlanID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPropertiesFormat. +func (e ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowClassicOperations", e.AllowClassicOperations) + populate(objectMap, "authorizationKey", e.AuthorizationKey) + populate(objectMap, "authorizationStatus", e.AuthorizationStatus) + populate(objectMap, "authorizations", e.Authorizations) + populate(objectMap, "bandwidthInGbps", e.BandwidthInGbps) + populate(objectMap, "circuitProvisioningState", e.CircuitProvisioningState) + populate(objectMap, "enableDirectPortRateLimit", e.EnableDirectPortRateLimit) + populate(objectMap, "expressRoutePort", e.ExpressRoutePort) + populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) + populate(objectMap, "globalReachEnabled", e.GlobalReachEnabled) + populate(objectMap, "peerings", e.Peerings) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "serviceKey", e.ServiceKey) + populate(objectMap, "serviceProviderNotes", e.ServiceProviderNotes) + populate(objectMap, "serviceProviderProperties", e.ServiceProviderProperties) + populate(objectMap, "serviceProviderProvisioningState", e.ServiceProviderProvisioningState) + populate(objectMap, "stag", e.Stag) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitPropertiesFormat. +func (e *ExpressRouteCircuitPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowClassicOperations": + err = unpopulate(val, "AllowClassicOperations", &e.AllowClassicOperations) + delete(rawMsg, key) + case "authorizationKey": + err = unpopulate(val, "AuthorizationKey", &e.AuthorizationKey) + delete(rawMsg, key) + case "authorizationStatus": + err = unpopulate(val, "AuthorizationStatus", &e.AuthorizationStatus) + delete(rawMsg, key) + case "authorizations": + err = unpopulate(val, "Authorizations", &e.Authorizations) + delete(rawMsg, key) + case "bandwidthInGbps": + err = unpopulate(val, "BandwidthInGbps", &e.BandwidthInGbps) + delete(rawMsg, key) + case "circuitProvisioningState": + err = unpopulate(val, "CircuitProvisioningState", &e.CircuitProvisioningState) + delete(rawMsg, key) + case "enableDirectPortRateLimit": + err = unpopulate(val, "EnableDirectPortRateLimit", &e.EnableDirectPortRateLimit) + delete(rawMsg, key) + case "expressRoutePort": + err = unpopulate(val, "ExpressRoutePort", &e.ExpressRoutePort) + delete(rawMsg, key) + case "gatewayManagerEtag": + err = unpopulate(val, "GatewayManagerEtag", &e.GatewayManagerEtag) + delete(rawMsg, key) + case "globalReachEnabled": + err = unpopulate(val, "GlobalReachEnabled", &e.GlobalReachEnabled) + delete(rawMsg, key) + case "peerings": + err = unpopulate(val, "Peerings", &e.Peerings) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "serviceKey": + err = unpopulate(val, "ServiceKey", &e.ServiceKey) + delete(rawMsg, key) + case "serviceProviderNotes": + err = unpopulate(val, "ServiceProviderNotes", &e.ServiceProviderNotes) + delete(rawMsg, key) + case "serviceProviderProperties": + err = unpopulate(val, "ServiceProviderProperties", &e.ServiceProviderProperties) + delete(rawMsg, key) + case "serviceProviderProvisioningState": + err = unpopulate(val, "ServiceProviderProvisioningState", &e.ServiceProviderProvisioningState) + delete(rawMsg, key) + case "stag": + err = unpopulate(val, "Stag", &e.Stag) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitReference. +func (e ExpressRouteCircuitReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitReference. +func (e *ExpressRouteCircuitReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitRoutesTable. +func (e ExpressRouteCircuitRoutesTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "locPrf", e.LocPrf) + populate(objectMap, "network", e.Network) + populate(objectMap, "nextHop", e.NextHop) + populate(objectMap, "path", e.Path) + populate(objectMap, "weight", e.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitRoutesTable. +func (e *ExpressRouteCircuitRoutesTable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "locPrf": + err = unpopulate(val, "LocPrf", &e.LocPrf) + delete(rawMsg, key) + case "network": + err = unpopulate(val, "Network", &e.Network) + delete(rawMsg, key) + case "nextHop": + err = unpopulate(val, "NextHop", &e.NextHop) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &e.Path) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &e.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitRoutesTableSummary. +func (e ExpressRouteCircuitRoutesTableSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "as", e.As) + populate(objectMap, "neighbor", e.Neighbor) + populate(objectMap, "statePfxRcd", e.StatePfxRcd) + populate(objectMap, "upDown", e.UpDown) + populate(objectMap, "v", e.V) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitRoutesTableSummary. +func (e *ExpressRouteCircuitRoutesTableSummary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "as": + err = unpopulate(val, "As", &e.As) + delete(rawMsg, key) + case "neighbor": + err = unpopulate(val, "Neighbor", &e.Neighbor) + delete(rawMsg, key) + case "statePfxRcd": + err = unpopulate(val, "StatePfxRcd", &e.StatePfxRcd) + delete(rawMsg, key) + case "upDown": + err = unpopulate(val, "UpDown", &e.UpDown) + delete(rawMsg, key) + case "v": + err = unpopulate(val, "V", &e.V) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitSKU. +func (e ExpressRouteCircuitSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "family", e.Family) + populate(objectMap, "name", e.Name) + populate(objectMap, "tier", e.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitSKU. +func (e *ExpressRouteCircuitSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "family": + err = unpopulate(val, "Family", &e.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &e.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitServiceProviderProperties. +func (e ExpressRouteCircuitServiceProviderProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bandwidthInMbps", e.BandwidthInMbps) + populate(objectMap, "peeringLocation", e.PeeringLocation) + populate(objectMap, "serviceProviderName", e.ServiceProviderName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitServiceProviderProperties. +func (e *ExpressRouteCircuitServiceProviderProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bandwidthInMbps": + err = unpopulate(val, "BandwidthInMbps", &e.BandwidthInMbps) + delete(rawMsg, key) + case "peeringLocation": + err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) + delete(rawMsg, key) + case "serviceProviderName": + err = unpopulate(val, "ServiceProviderName", &e.ServiceProviderName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitStats. +func (e ExpressRouteCircuitStats) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primarybytesIn", e.PrimarybytesIn) + populate(objectMap, "primarybytesOut", e.PrimarybytesOut) + populate(objectMap, "secondarybytesIn", e.SecondarybytesIn) + populate(objectMap, "secondarybytesOut", e.SecondarybytesOut) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitStats. +func (e *ExpressRouteCircuitStats) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primarybytesIn": + err = unpopulate(val, "PrimarybytesIn", &e.PrimarybytesIn) + delete(rawMsg, key) + case "primarybytesOut": + err = unpopulate(val, "PrimarybytesOut", &e.PrimarybytesOut) + delete(rawMsg, key) + case "secondarybytesIn": + err = unpopulate(val, "SecondarybytesIn", &e.SecondarybytesIn) + delete(rawMsg, key) + case "secondarybytesOut": + err = unpopulate(val, "SecondarybytesOut", &e.SecondarybytesOut) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsArpTableListResult. +func (e ExpressRouteCircuitsArpTableListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitsArpTableListResult. +func (e *ExpressRouteCircuitsArpTableListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsRoutesTableListResult. +func (e ExpressRouteCircuitsRoutesTableListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitsRoutesTableListResult. +func (e *ExpressRouteCircuitsRoutesTableListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsRoutesTableSummaryListResult. +func (e ExpressRouteCircuitsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCircuitsRoutesTableSummaryListResult. +func (e *ExpressRouteCircuitsRoutesTableSummaryListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnection. +func (e ExpressRouteConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteConnection. +func (e *ExpressRouteConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionID. +func (e ExpressRouteConnectionID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteConnectionID. +func (e *ExpressRouteConnectionID) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionList. +func (e ExpressRouteConnectionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteConnectionList. +func (e *ExpressRouteConnectionList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionProperties. +func (e ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationKey", e.AuthorizationKey) + populate(objectMap, "enableInternetSecurity", e.EnableInternetSecurity) + populate(objectMap, "enablePrivateLinkFastPath", e.EnablePrivateLinkFastPath) + populate(objectMap, "expressRouteCircuitPeering", e.ExpressRouteCircuitPeering) + populate(objectMap, "expressRouteGatewayBypass", e.ExpressRouteGatewayBypass) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "routingConfiguration", e.RoutingConfiguration) + populate(objectMap, "routingWeight", e.RoutingWeight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteConnectionProperties. +func (e *ExpressRouteConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationKey": + err = unpopulate(val, "AuthorizationKey", &e.AuthorizationKey) + delete(rawMsg, key) + case "enableInternetSecurity": + err = unpopulate(val, "EnableInternetSecurity", &e.EnableInternetSecurity) + delete(rawMsg, key) + case "enablePrivateLinkFastPath": + err = unpopulate(val, "EnablePrivateLinkFastPath", &e.EnablePrivateLinkFastPath) + delete(rawMsg, key) + case "expressRouteCircuitPeering": + err = unpopulate(val, "ExpressRouteCircuitPeering", &e.ExpressRouteCircuitPeering) + delete(rawMsg, key) + case "expressRouteGatewayBypass": + err = unpopulate(val, "ExpressRouteGatewayBypass", &e.ExpressRouteGatewayBypass) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "routingConfiguration": + err = unpopulate(val, "RoutingConfiguration", &e.RoutingConfiguration) + delete(rawMsg, key) + case "routingWeight": + err = unpopulate(val, "RoutingWeight", &e.RoutingWeight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnection. +func (e ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnection. +func (e *ExpressRouteCrossConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionListResult. +func (e ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionListResult. +func (e *ExpressRouteCrossConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeering. +func (e ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionPeering. +func (e *ExpressRouteCrossConnectionPeering) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeeringList. +func (e ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionPeeringList. +func (e *ExpressRouteCrossConnectionPeeringList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeeringProperties. +func (e ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureASN", e.AzureASN) + populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) + populate(objectMap, "ipv6PeeringConfig", e.IPv6PeeringConfig) + populate(objectMap, "lastModifiedBy", e.LastModifiedBy) + populate(objectMap, "microsoftPeeringConfig", e.MicrosoftPeeringConfig) + populate(objectMap, "peerASN", e.PeerASN) + populate(objectMap, "peeringType", e.PeeringType) + populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) + populate(objectMap, "primaryPeerAddressPrefix", e.PrimaryPeerAddressPrefix) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) + populate(objectMap, "secondaryPeerAddressPrefix", e.SecondaryPeerAddressPrefix) + populate(objectMap, "sharedKey", e.SharedKey) + populate(objectMap, "state", e.State) + populate(objectMap, "vlanId", e.VlanID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionPeeringProperties. +func (e *ExpressRouteCrossConnectionPeeringProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureASN": + err = unpopulate(val, "AzureASN", &e.AzureASN) + delete(rawMsg, key) + case "gatewayManagerEtag": + err = unpopulate(val, "GatewayManagerEtag", &e.GatewayManagerEtag) + delete(rawMsg, key) + case "ipv6PeeringConfig": + err = unpopulate(val, "IPv6PeeringConfig", &e.IPv6PeeringConfig) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &e.LastModifiedBy) + delete(rawMsg, key) + case "microsoftPeeringConfig": + err = unpopulate(val, "MicrosoftPeeringConfig", &e.MicrosoftPeeringConfig) + delete(rawMsg, key) + case "peerASN": + err = unpopulate(val, "PeerASN", &e.PeerASN) + delete(rawMsg, key) + case "peeringType": + err = unpopulate(val, "PeeringType", &e.PeeringType) + delete(rawMsg, key) + case "primaryAzurePort": + err = unpopulate(val, "PrimaryAzurePort", &e.PrimaryAzurePort) + delete(rawMsg, key) + case "primaryPeerAddressPrefix": + err = unpopulate(val, "PrimaryPeerAddressPrefix", &e.PrimaryPeerAddressPrefix) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "secondaryAzurePort": + err = unpopulate(val, "SecondaryAzurePort", &e.SecondaryAzurePort) + delete(rawMsg, key) + case "secondaryPeerAddressPrefix": + err = unpopulate(val, "SecondaryPeerAddressPrefix", &e.SecondaryPeerAddressPrefix) + delete(rawMsg, key) + case "sharedKey": + err = unpopulate(val, "SharedKey", &e.SharedKey) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &e.State) + delete(rawMsg, key) + case "vlanId": + err = unpopulate(val, "VlanID", &e.VlanID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionProperties. +func (e ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bandwidthInMbps", e.BandwidthInMbps) + populate(objectMap, "expressRouteCircuit", e.ExpressRouteCircuit) + populate(objectMap, "peeringLocation", e.PeeringLocation) + populate(objectMap, "peerings", e.Peerings) + populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "sTag", e.STag) + populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) + populate(objectMap, "serviceProviderNotes", e.ServiceProviderNotes) + populate(objectMap, "serviceProviderProvisioningState", e.ServiceProviderProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionProperties. +func (e *ExpressRouteCrossConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bandwidthInMbps": + err = unpopulate(val, "BandwidthInMbps", &e.BandwidthInMbps) + delete(rawMsg, key) + case "expressRouteCircuit": + err = unpopulate(val, "ExpressRouteCircuit", &e.ExpressRouteCircuit) + delete(rawMsg, key) + case "peeringLocation": + err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) + delete(rawMsg, key) + case "peerings": + err = unpopulate(val, "Peerings", &e.Peerings) + delete(rawMsg, key) + case "primaryAzurePort": + err = unpopulate(val, "PrimaryAzurePort", &e.PrimaryAzurePort) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "sTag": + err = unpopulate(val, "STag", &e.STag) + delete(rawMsg, key) + case "secondaryAzurePort": + err = unpopulate(val, "SecondaryAzurePort", &e.SecondaryAzurePort) + delete(rawMsg, key) + case "serviceProviderNotes": + err = unpopulate(val, "ServiceProviderNotes", &e.ServiceProviderNotes) + delete(rawMsg, key) + case "serviceProviderProvisioningState": + err = unpopulate(val, "ServiceProviderProvisioningState", &e.ServiceProviderProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionRoutesTableSummary. +func (e ExpressRouteCrossConnectionRoutesTableSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asn", e.Asn) + populate(objectMap, "neighbor", e.Neighbor) + populate(objectMap, "stateOrPrefixesReceived", e.StateOrPrefixesReceived) + populate(objectMap, "upDown", e.UpDown) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionRoutesTableSummary. +func (e *ExpressRouteCrossConnectionRoutesTableSummary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asn": + err = unpopulate(val, "Asn", &e.Asn) + delete(rawMsg, key) + case "neighbor": + err = unpopulate(val, "Neighbor", &e.Neighbor) + delete(rawMsg, key) + case "stateOrPrefixesReceived": + err = unpopulate(val, "StateOrPrefixesReceived", &e.StateOrPrefixesReceived) + delete(rawMsg, key) + case "upDown": + err = unpopulate(val, "UpDown", &e.UpDown) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionsRoutesTableSummaryListResult. +func (e ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteCrossConnectionsRoutesTableSummaryListResult. +func (e *ExpressRouteCrossConnectionsRoutesTableSummaryListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteFailoverCircuitResourceDetails. +func (e ExpressRouteFailoverCircuitResourceDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionName", e.ConnectionName) + populate(objectMap, "name", e.Name) + populate(objectMap, "nrpResourceUri", e.NrpResourceURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteFailoverCircuitResourceDetails. +func (e *ExpressRouteFailoverCircuitResourceDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionName": + err = unpopulate(val, "ConnectionName", &e.ConnectionName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "nrpResourceUri": + err = unpopulate(val, "NrpResourceURI", &e.NrpResourceURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteFailoverConnectionResourceDetails. +func (e ExpressRouteFailoverConnectionResourceDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "lastUpdatedTime", e.LastUpdatedTime) + populate(objectMap, "name", e.Name) + populate(objectMap, "nrpResourceUri", e.NrpResourceURI) + populate(objectMap, "status", e.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteFailoverConnectionResourceDetails. +func (e *ExpressRouteFailoverConnectionResourceDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lastUpdatedTime": + err = unpopulate(val, "LastUpdatedTime", &e.LastUpdatedTime) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "nrpResourceUri": + err = unpopulate(val, "NrpResourceURI", &e.NrpResourceURI) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteFailoverRedundantRoute. +func (e ExpressRouteFailoverRedundantRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "peeringLocations", e.PeeringLocations) + populate(objectMap, "routes", e.Routes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteFailoverRedundantRoute. +func (e *ExpressRouteFailoverRedundantRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "peeringLocations": + err = unpopulate(val, "PeeringLocations", &e.PeeringLocations) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &e.Routes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteFailoverSingleTestDetails. +func (e ExpressRouteFailoverSingleTestDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endTimeUtc", e.EndTimeUTC) + populate(objectMap, "failoverConnectionDetails", e.FailoverConnectionDetails) + populate(objectMap, "nonRedundantRoutes", e.NonRedundantRoutes) + populate(objectMap, "peeringLocation", e.PeeringLocation) + populate(objectMap, "redundantRoutes", e.RedundantRoutes) + populate(objectMap, "startTimeUtc", e.StartTimeUTC) + populate(objectMap, "status", e.Status) + populate(objectMap, "wasSimulationSuccessful", e.WasSimulationSuccessful) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteFailoverSingleTestDetails. +func (e *ExpressRouteFailoverSingleTestDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTimeUtc": + err = unpopulate(val, "EndTimeUTC", &e.EndTimeUTC) + delete(rawMsg, key) + case "failoverConnectionDetails": + err = unpopulate(val, "FailoverConnectionDetails", &e.FailoverConnectionDetails) + delete(rawMsg, key) + case "nonRedundantRoutes": + err = unpopulate(val, "NonRedundantRoutes", &e.NonRedundantRoutes) + delete(rawMsg, key) + case "peeringLocation": + err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) + delete(rawMsg, key) + case "redundantRoutes": + err = unpopulate(val, "RedundantRoutes", &e.RedundantRoutes) + delete(rawMsg, key) + case "startTimeUtc": + err = unpopulate(val, "StartTimeUTC", &e.StartTimeUTC) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + case "wasSimulationSuccessful": + err = unpopulate(val, "WasSimulationSuccessful", &e.WasSimulationSuccessful) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteFailoverStopAPIParameters. +func (e ExpressRouteFailoverStopAPIParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "details", e.Details) + populate(objectMap, "peeringLocation", e.PeeringLocation) + populate(objectMap, "wasSimulationSuccessful", e.WasSimulationSuccessful) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteFailoverStopAPIParameters. +func (e *ExpressRouteFailoverStopAPIParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "peeringLocation": + err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) + delete(rawMsg, key) + case "wasSimulationSuccessful": + err = unpopulate(val, "WasSimulationSuccessful", &e.WasSimulationSuccessful) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteFailoverTestDetails. +func (e ExpressRouteFailoverTestDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "circuits", e.Circuits) + populate(objectMap, "connections", e.Connections) + populate(objectMap, "endTime", e.EndTime) + populate(objectMap, "issues", e.Issues) + populate(objectMap, "peeringLocation", e.PeeringLocation) + populate(objectMap, "startTime", e.StartTime) + populate(objectMap, "status", e.Status) + populate(objectMap, "testGuid", e.TestGUID) + populate(objectMap, "testType", e.TestType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteFailoverTestDetails. +func (e *ExpressRouteFailoverTestDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "circuits": + err = unpopulate(val, "Circuits", &e.Circuits) + delete(rawMsg, key) + case "connections": + err = unpopulate(val, "Connections", &e.Connections) + delete(rawMsg, key) + case "endTime": + err = unpopulate(val, "EndTime", &e.EndTime) + delete(rawMsg, key) + case "issues": + err = unpopulate(val, "Issues", &e.Issues) + delete(rawMsg, key) + case "peeringLocation": + err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &e.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + case "testGuid": + err = unpopulate(val, "TestGUID", &e.TestGUID) + delete(rawMsg, key) + case "testType": + err = unpopulate(val, "TestType", &e.TestType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGateway. +func (e ExpressRouteGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteGateway. +func (e *ExpressRouteGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayList. +func (e ExpressRouteGatewayList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteGatewayList. +func (e *ExpressRouteGatewayList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayProperties. +func (e ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowNonVirtualWanTraffic", e.AllowNonVirtualWanTraffic) + populate(objectMap, "autoScaleConfiguration", e.AutoScaleConfiguration) + populate(objectMap, "expressRouteConnections", e.ExpressRouteConnections) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "virtualHub", e.VirtualHub) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteGatewayProperties. +func (e *ExpressRouteGatewayProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowNonVirtualWanTraffic": + err = unpopulate(val, "AllowNonVirtualWanTraffic", &e.AllowNonVirtualWanTraffic) + delete(rawMsg, key) + case "autoScaleConfiguration": + err = unpopulate(val, "AutoScaleConfiguration", &e.AutoScaleConfiguration) + delete(rawMsg, key) + case "expressRouteConnections": + err = unpopulate(val, "ExpressRouteConnections", &e.ExpressRouteConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "virtualHub": + err = unpopulate(val, "VirtualHub", &e.VirtualHub) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayPropertiesAutoScaleConfiguration. +func (e ExpressRouteGatewayPropertiesAutoScaleConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bounds", e.Bounds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteGatewayPropertiesAutoScaleConfiguration. +func (e *ExpressRouteGatewayPropertiesAutoScaleConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bounds": + err = unpopulate(val, "Bounds", &e.Bounds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds. +func (e ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "max", e.Max) + populate(objectMap, "min", e.Min) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds. +func (e *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "max": + err = unpopulate(val, "Max", &e.Max) + delete(rawMsg, key) + case "min": + err = unpopulate(val, "Min", &e.Min) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteLink. +func (e ExpressRouteLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteLink. +func (e *ExpressRouteLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkListResult. +func (e ExpressRouteLinkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteLinkListResult. +func (e *ExpressRouteLinkListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkMacSecConfig. +func (e ExpressRouteLinkMacSecConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cakSecretIdentifier", e.CakSecretIdentifier) + populate(objectMap, "cipher", e.Cipher) + populate(objectMap, "cknSecretIdentifier", e.CknSecretIdentifier) + populate(objectMap, "sciState", e.SciState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteLinkMacSecConfig. +func (e *ExpressRouteLinkMacSecConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cakSecretIdentifier": + err = unpopulate(val, "CakSecretIdentifier", &e.CakSecretIdentifier) + delete(rawMsg, key) + case "cipher": + err = unpopulate(val, "Cipher", &e.Cipher) + delete(rawMsg, key) + case "cknSecretIdentifier": + err = unpopulate(val, "CknSecretIdentifier", &e.CknSecretIdentifier) + delete(rawMsg, key) + case "sciState": + err = unpopulate(val, "SciState", &e.SciState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkPropertiesFormat. +func (e ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "adminState", e.AdminState) + populate(objectMap, "coloLocation", e.ColoLocation) + populate(objectMap, "connectorType", e.ConnectorType) + populate(objectMap, "interfaceName", e.InterfaceName) + populate(objectMap, "macSecConfig", e.MacSecConfig) + populate(objectMap, "patchPanelId", e.PatchPanelID) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "rackId", e.RackID) + populate(objectMap, "routerName", e.RouterName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteLinkPropertiesFormat. +func (e *ExpressRouteLinkPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adminState": + err = unpopulate(val, "AdminState", &e.AdminState) + delete(rawMsg, key) + case "coloLocation": + err = unpopulate(val, "ColoLocation", &e.ColoLocation) + delete(rawMsg, key) + case "connectorType": + err = unpopulate(val, "ConnectorType", &e.ConnectorType) + delete(rawMsg, key) + case "interfaceName": + err = unpopulate(val, "InterfaceName", &e.InterfaceName) + delete(rawMsg, key) + case "macSecConfig": + err = unpopulate(val, "MacSecConfig", &e.MacSecConfig) + delete(rawMsg, key) + case "patchPanelId": + err = unpopulate(val, "PatchPanelID", &e.PatchPanelID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "rackId": + err = unpopulate(val, "RackID", &e.RackID) + delete(rawMsg, key) + case "routerName": + err = unpopulate(val, "RouterName", &e.RouterName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePort. +func (e ExpressRoutePort) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "identity", e.Identity) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePort. +func (e *ExpressRoutePort) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &e.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortAuthorization. +func (e ExpressRoutePortAuthorization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortAuthorization. +func (e *ExpressRoutePortAuthorization) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortAuthorizationListResult. +func (e ExpressRoutePortAuthorizationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortAuthorizationListResult. +func (e *ExpressRoutePortAuthorizationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortAuthorizationPropertiesFormat. +func (e ExpressRoutePortAuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationKey", e.AuthorizationKey) + populate(objectMap, "authorizationUseStatus", e.AuthorizationUseStatus) + populate(objectMap, "circuitResourceUri", e.CircuitResourceURI) + populate(objectMap, "provisioningState", e.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortAuthorizationPropertiesFormat. +func (e *ExpressRoutePortAuthorizationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationKey": + err = unpopulate(val, "AuthorizationKey", &e.AuthorizationKey) + delete(rawMsg, key) + case "authorizationUseStatus": + err = unpopulate(val, "AuthorizationUseStatus", &e.AuthorizationUseStatus) + delete(rawMsg, key) + case "circuitResourceUri": + err = unpopulate(val, "CircuitResourceURI", &e.CircuitResourceURI) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortListResult. +func (e ExpressRoutePortListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortListResult. +func (e *ExpressRoutePortListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortPropertiesFormat. +func (e ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allocationDate", e.AllocationDate) + populate(objectMap, "bandwidthInGbps", e.BandwidthInGbps) + populate(objectMap, "billingType", e.BillingType) + populate(objectMap, "circuits", e.Circuits) + populate(objectMap, "encapsulation", e.Encapsulation) + populate(objectMap, "etherType", e.EtherType) + populate(objectMap, "links", e.Links) + populate(objectMap, "mtu", e.Mtu) + populate(objectMap, "peeringLocation", e.PeeringLocation) + populate(objectMap, "provisionedBandwidthInGbps", e.ProvisionedBandwidthInGbps) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "resourceGuid", e.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortPropertiesFormat. +func (e *ExpressRoutePortPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allocationDate": + err = unpopulate(val, "AllocationDate", &e.AllocationDate) + delete(rawMsg, key) + case "bandwidthInGbps": + err = unpopulate(val, "BandwidthInGbps", &e.BandwidthInGbps) + delete(rawMsg, key) + case "billingType": + err = unpopulate(val, "BillingType", &e.BillingType) + delete(rawMsg, key) + case "circuits": + err = unpopulate(val, "Circuits", &e.Circuits) + delete(rawMsg, key) + case "encapsulation": + err = unpopulate(val, "Encapsulation", &e.Encapsulation) + delete(rawMsg, key) + case "etherType": + err = unpopulate(val, "EtherType", &e.EtherType) + delete(rawMsg, key) + case "links": + err = unpopulate(val, "Links", &e.Links) + delete(rawMsg, key) + case "mtu": + err = unpopulate(val, "Mtu", &e.Mtu) + delete(rawMsg, key) + case "peeringLocation": + err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) + delete(rawMsg, key) + case "provisionedBandwidthInGbps": + err = unpopulate(val, "ProvisionedBandwidthInGbps", &e.ProvisionedBandwidthInGbps) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &e.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocation. +func (e ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortsLocation. +func (e *ExpressRoutePortsLocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationBandwidths. +func (e ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "offerName", e.OfferName) + populate(objectMap, "valueInGbps", e.ValueInGbps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortsLocationBandwidths. +func (e *ExpressRoutePortsLocationBandwidths) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "offerName": + err = unpopulate(val, "OfferName", &e.OfferName) + delete(rawMsg, key) + case "valueInGbps": + err = unpopulate(val, "ValueInGbps", &e.ValueInGbps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationListResult. +func (e ExpressRoutePortsLocationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortsLocationListResult. +func (e *ExpressRoutePortsLocationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationPropertiesFormat. +func (e ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "address", e.Address) + populate(objectMap, "availableBandwidths", e.AvailableBandwidths) + populate(objectMap, "contact", e.Contact) + populate(objectMap, "provisioningState", e.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRoutePortsLocationPropertiesFormat. +func (e *ExpressRoutePortsLocationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &e.Address) + delete(rawMsg, key) + case "availableBandwidths": + err = unpopulate(val, "AvailableBandwidths", &e.AvailableBandwidths) + delete(rawMsg, key) + case "contact": + err = unpopulate(val, "Contact", &e.Contact) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteProviderPort. +func (e ExpressRouteProviderPort) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteProviderPort. +func (e *ExpressRouteProviderPort) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &e.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteProviderPortListResult. +func (e ExpressRouteProviderPortListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteProviderPortListResult. +func (e *ExpressRouteProviderPortListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteProviderPortProperties. +func (e ExpressRouteProviderPortProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "overprovisionFactor", e.OverprovisionFactor) + populate(objectMap, "peeringLocation", e.PeeringLocation) + populate(objectMap, "portBandwidthInMbps", e.PortBandwidthInMbps) + populate(objectMap, "portPairDescriptor", e.PortPairDescriptor) + populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) + populate(objectMap, "remainingBandwidthInMbps", e.RemainingBandwidthInMbps) + populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) + populate(objectMap, "usedBandwidthInMbps", e.UsedBandwidthInMbps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteProviderPortProperties. +func (e *ExpressRouteProviderPortProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "overprovisionFactor": + err = unpopulate(val, "OverprovisionFactor", &e.OverprovisionFactor) + delete(rawMsg, key) + case "peeringLocation": + err = unpopulate(val, "PeeringLocation", &e.PeeringLocation) + delete(rawMsg, key) + case "portBandwidthInMbps": + err = unpopulate(val, "PortBandwidthInMbps", &e.PortBandwidthInMbps) + delete(rawMsg, key) + case "portPairDescriptor": + err = unpopulate(val, "PortPairDescriptor", &e.PortPairDescriptor) + delete(rawMsg, key) + case "primaryAzurePort": + err = unpopulate(val, "PrimaryAzurePort", &e.PrimaryAzurePort) + delete(rawMsg, key) + case "remainingBandwidthInMbps": + err = unpopulate(val, "RemainingBandwidthInMbps", &e.RemainingBandwidthInMbps) + delete(rawMsg, key) + case "secondaryAzurePort": + err = unpopulate(val, "SecondaryAzurePort", &e.SecondaryAzurePort) + delete(rawMsg, key) + case "usedBandwidthInMbps": + err = unpopulate(val, "UsedBandwidthInMbps", &e.UsedBandwidthInMbps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProvider. +func (e ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteServiceProvider. +func (e *ExpressRouteServiceProvider) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderBandwidthsOffered. +func (e ExpressRouteServiceProviderBandwidthsOffered) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "offerName", e.OfferName) + populate(objectMap, "valueInMbps", e.ValueInMbps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteServiceProviderBandwidthsOffered. +func (e *ExpressRouteServiceProviderBandwidthsOffered) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "offerName": + err = unpopulate(val, "OfferName", &e.OfferName) + delete(rawMsg, key) + case "valueInMbps": + err = unpopulate(val, "ValueInMbps", &e.ValueInMbps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderListResult. +func (e ExpressRouteServiceProviderListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteServiceProviderListResult. +func (e *ExpressRouteServiceProviderListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderPropertiesFormat. +func (e ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bandwidthsOffered", e.BandwidthsOffered) + populate(objectMap, "peeringLocations", e.PeeringLocations) + populate(objectMap, "provisioningState", e.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExpressRouteServiceProviderPropertiesFormat. +func (e *ExpressRouteServiceProviderPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bandwidthsOffered": + err = unpopulate(val, "BandwidthsOffered", &e.BandwidthsOffered) + delete(rawMsg, key) + case "peeringLocations": + err = unpopulate(val, "PeeringLocations", &e.PeeringLocations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. +func (e ExtendedLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", e.Name) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation. +func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverConnectionDetails. +func (f FailoverConnectionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverConnectionName", f.FailoverConnectionName) + populate(objectMap, "failoverLocation", f.FailoverLocation) + populate(objectMap, "isVerified", f.IsVerified) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverConnectionDetails. +func (f *FailoverConnectionDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverConnectionName": + err = unpopulate(val, "FailoverConnectionName", &f.FailoverConnectionName) + delete(rawMsg, key) + case "failoverLocation": + err = unpopulate(val, "FailoverLocation", &f.FailoverLocation) + delete(rawMsg, key) + case "isVerified": + err = unpopulate(val, "IsVerified", &f.IsVerified) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FilterItems. +func (f FilterItems) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "field", f.Field) + populate(objectMap, "values", f.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FilterItems. +func (f *FilterItems) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "field": + err = unpopulate(val, "Field", &f.Field) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &f.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPacketCaptureParameters. +func (f FirewallPacketCaptureParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "durationInSeconds", f.DurationInSeconds) + populate(objectMap, "fileName", f.FileName) + populate(objectMap, "filters", f.Filters) + populate(objectMap, "flags", f.Flags) + populate(objectMap, "numberOfPacketsToCapture", f.NumberOfPacketsToCapture) + populate(objectMap, "protocol", f.Protocol) + populate(objectMap, "sasUrl", f.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPacketCaptureParameters. +func (f *FirewallPacketCaptureParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "durationInSeconds": + err = unpopulate(val, "DurationInSeconds", &f.DurationInSeconds) + delete(rawMsg, key) + case "fileName": + err = unpopulate(val, "FileName", &f.FileName) + delete(rawMsg, key) + case "filters": + err = unpopulate(val, "Filters", &f.Filters) + delete(rawMsg, key) + case "flags": + err = unpopulate(val, "Flags", &f.Flags) + delete(rawMsg, key) + case "numberOfPacketsToCapture": + err = unpopulate(val, "NumberOfPacketsToCapture", &f.NumberOfPacketsToCapture) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &f.Protocol) + delete(rawMsg, key) + case "sasUrl": + err = unpopulate(val, "SasURL", &f.SasURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicy. +func (f FirewallPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", f.Etag) + populate(objectMap, "id", f.ID) + populate(objectMap, "identity", f.Identity) + populate(objectMap, "location", f.Location) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "tags", f.Tags) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicy. +func (f *FirewallPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &f.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &f.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &f.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyCertificateAuthority. +func (f FirewallPolicyCertificateAuthority) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyVaultSecretId", f.KeyVaultSecretID) + populate(objectMap, "name", f.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyCertificateAuthority. +func (f *FirewallPolicyCertificateAuthority) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyVaultSecretId": + err = unpopulate(val, "KeyVaultSecretID", &f.KeyVaultSecretID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyDraft. +func (f FirewallPolicyDraft) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "location", f.Location) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "tags", f.Tags) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyDraft. +func (f *FirewallPolicyDraft) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &f.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyDraftProperties. +func (f FirewallPolicyDraftProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "basePolicy", f.BasePolicy) + populate(objectMap, "dnsSettings", f.DNSSettings) + populate(objectMap, "explicitProxy", f.ExplicitProxy) + populate(objectMap, "insights", f.Insights) + populate(objectMap, "intrusionDetection", f.IntrusionDetection) + populate(objectMap, "sql", f.SQL) + populate(objectMap, "snat", f.Snat) + populate(objectMap, "threatIntelMode", f.ThreatIntelMode) + populate(objectMap, "threatIntelWhitelist", f.ThreatIntelWhitelist) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyDraftProperties. +func (f *FirewallPolicyDraftProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "basePolicy": + err = unpopulate(val, "BasePolicy", &f.BasePolicy) + delete(rawMsg, key) + case "dnsSettings": + err = unpopulate(val, "DNSSettings", &f.DNSSettings) + delete(rawMsg, key) + case "explicitProxy": + err = unpopulate(val, "ExplicitProxy", &f.ExplicitProxy) + delete(rawMsg, key) + case "insights": + err = unpopulate(val, "Insights", &f.Insights) + delete(rawMsg, key) + case "intrusionDetection": + err = unpopulate(val, "IntrusionDetection", &f.IntrusionDetection) + delete(rawMsg, key) + case "sql": + err = unpopulate(val, "SQL", &f.SQL) + delete(rawMsg, key) + case "snat": + err = unpopulate(val, "Snat", &f.Snat) + delete(rawMsg, key) + case "threatIntelMode": + err = unpopulate(val, "ThreatIntelMode", &f.ThreatIntelMode) + delete(rawMsg, key) + case "threatIntelWhitelist": + err = unpopulate(val, "ThreatIntelWhitelist", &f.ThreatIntelWhitelist) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyFilterRuleCollection. +func (f FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", f.Action) + populate(objectMap, "name", f.Name) + populate(objectMap, "priority", f.Priority) + objectMap["ruleCollectionType"] = FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection + populate(objectMap, "rules", f.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyFilterRuleCollection. +func (f *FirewallPolicyFilterRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &f.Action) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &f.Priority) + delete(rawMsg, key) + case "ruleCollectionType": + err = unpopulate(val, "RuleCollectionType", &f.RuleCollectionType) + delete(rawMsg, key) + case "rules": + f.Rules, err = unmarshalFirewallPolicyRuleClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyFilterRuleCollectionAction. +func (f FirewallPolicyFilterRuleCollectionAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyFilterRuleCollectionAction. +func (f *FirewallPolicyFilterRuleCollectionAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyHTTPHeaderToInsert. +func (f FirewallPolicyHTTPHeaderToInsert) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "headerName", f.HeaderName) + populate(objectMap, "headerValue", f.HeaderValue) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyHTTPHeaderToInsert. +func (f *FirewallPolicyHTTPHeaderToInsert) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "headerName": + err = unpopulate(val, "HeaderName", &f.HeaderName) + delete(rawMsg, key) + case "headerValue": + err = unpopulate(val, "HeaderValue", &f.HeaderValue) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyInsights. +func (f FirewallPolicyInsights) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isEnabled", f.IsEnabled) + populate(objectMap, "logAnalyticsResources", f.LogAnalyticsResources) + populate(objectMap, "retentionDays", f.RetentionDays) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyInsights. +func (f *FirewallPolicyInsights) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isEnabled": + err = unpopulate(val, "IsEnabled", &f.IsEnabled) + delete(rawMsg, key) + case "logAnalyticsResources": + err = unpopulate(val, "LogAnalyticsResources", &f.LogAnalyticsResources) + delete(rawMsg, key) + case "retentionDays": + err = unpopulate(val, "RetentionDays", &f.RetentionDays) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetection. +func (f FirewallPolicyIntrusionDetection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configuration", f.Configuration) + populate(objectMap, "mode", f.Mode) + populate(objectMap, "profile", f.Profile) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyIntrusionDetection. +func (f *FirewallPolicyIntrusionDetection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configuration": + err = unpopulate(val, "Configuration", &f.Configuration) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &f.Mode) + delete(rawMsg, key) + case "profile": + err = unpopulate(val, "Profile", &f.Profile) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications. +func (f FirewallPolicyIntrusionDetectionBypassTrafficSpecifications) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", f.Description) + populate(objectMap, "destinationAddresses", f.DestinationAddresses) + populate(objectMap, "destinationIpGroups", f.DestinationIPGroups) + populate(objectMap, "destinationPorts", f.DestinationPorts) + populate(objectMap, "name", f.Name) + populate(objectMap, "protocol", f.Protocol) + populate(objectMap, "sourceAddresses", f.SourceAddresses) + populate(objectMap, "sourceIpGroups", f.SourceIPGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications. +func (f *FirewallPolicyIntrusionDetectionBypassTrafficSpecifications) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &f.Description) + delete(rawMsg, key) + case "destinationAddresses": + err = unpopulate(val, "DestinationAddresses", &f.DestinationAddresses) + delete(rawMsg, key) + case "destinationIpGroups": + err = unpopulate(val, "DestinationIPGroups", &f.DestinationIPGroups) + delete(rawMsg, key) + case "destinationPorts": + err = unpopulate(val, "DestinationPorts", &f.DestinationPorts) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &f.Protocol) + delete(rawMsg, key) + case "sourceAddresses": + err = unpopulate(val, "SourceAddresses", &f.SourceAddresses) + delete(rawMsg, key) + case "sourceIpGroups": + err = unpopulate(val, "SourceIPGroups", &f.SourceIPGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionConfiguration. +func (f FirewallPolicyIntrusionDetectionConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bypassTrafficSettings", f.BypassTrafficSettings) + populate(objectMap, "privateRanges", f.PrivateRanges) + populate(objectMap, "signatureOverrides", f.SignatureOverrides) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyIntrusionDetectionConfiguration. +func (f *FirewallPolicyIntrusionDetectionConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bypassTrafficSettings": + err = unpopulate(val, "BypassTrafficSettings", &f.BypassTrafficSettings) + delete(rawMsg, key) + case "privateRanges": + err = unpopulate(val, "PrivateRanges", &f.PrivateRanges) + delete(rawMsg, key) + case "signatureOverrides": + err = unpopulate(val, "SignatureOverrides", &f.SignatureOverrides) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionSignatureSpecification. +func (f FirewallPolicyIntrusionDetectionSignatureSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "mode", f.Mode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyIntrusionDetectionSignatureSpecification. +func (f *FirewallPolicyIntrusionDetectionSignatureSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &f.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyListResult. +func (f FirewallPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyListResult. +func (f *FirewallPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyLogAnalyticsResources. +func (f FirewallPolicyLogAnalyticsResources) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultWorkspaceId", f.DefaultWorkspaceID) + populate(objectMap, "workspaces", f.Workspaces) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyLogAnalyticsResources. +func (f *FirewallPolicyLogAnalyticsResources) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultWorkspaceId": + err = unpopulate(val, "DefaultWorkspaceID", &f.DefaultWorkspaceID) + delete(rawMsg, key) + case "workspaces": + err = unpopulate(val, "Workspaces", &f.Workspaces) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyLogAnalyticsWorkspace. +func (f FirewallPolicyLogAnalyticsWorkspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "region", f.Region) + populate(objectMap, "workspaceId", f.WorkspaceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyLogAnalyticsWorkspace. +func (f *FirewallPolicyLogAnalyticsWorkspace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "region": + err = unpopulate(val, "Region", &f.Region) + delete(rawMsg, key) + case "workspaceId": + err = unpopulate(val, "WorkspaceID", &f.WorkspaceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyNatRuleCollection. +func (f FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", f.Action) + populate(objectMap, "name", f.Name) + populate(objectMap, "priority", f.Priority) + objectMap["ruleCollectionType"] = FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection + populate(objectMap, "rules", f.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyNatRuleCollection. +func (f *FirewallPolicyNatRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &f.Action) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &f.Priority) + delete(rawMsg, key) + case "ruleCollectionType": + err = unpopulate(val, "RuleCollectionType", &f.RuleCollectionType) + delete(rawMsg, key) + case "rules": + f.Rules, err = unmarshalFirewallPolicyRuleClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyNatRuleCollectionAction. +func (f FirewallPolicyNatRuleCollectionAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyNatRuleCollectionAction. +func (f *FirewallPolicyNatRuleCollectionAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyPropertiesFormat. +func (f FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "basePolicy", f.BasePolicy) + populate(objectMap, "childPolicies", f.ChildPolicies) + populate(objectMap, "dnsSettings", f.DNSSettings) + populate(objectMap, "explicitProxySettings", f.ExplicitProxySettings) + populate(objectMap, "firewalls", f.Firewalls) + populate(objectMap, "insights", f.Insights) + populate(objectMap, "intrusionDetection", f.IntrusionDetection) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "ruleCollectionGroups", f.RuleCollectionGroups) + populate(objectMap, "sku", f.SKU) + populate(objectMap, "sql", f.SQL) + populate(objectMap, "size", f.Size) + populate(objectMap, "snat", f.Snat) + populate(objectMap, "threatIntelMode", f.ThreatIntelMode) + populate(objectMap, "threatIntelWhitelist", f.ThreatIntelWhitelist) + populate(objectMap, "transportSecurity", f.TransportSecurity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyPropertiesFormat. +func (f *FirewallPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "basePolicy": + err = unpopulate(val, "BasePolicy", &f.BasePolicy) + delete(rawMsg, key) + case "childPolicies": + err = unpopulate(val, "ChildPolicies", &f.ChildPolicies) + delete(rawMsg, key) + case "dnsSettings": + err = unpopulate(val, "DNSSettings", &f.DNSSettings) + delete(rawMsg, key) + case "explicitProxySettings": + err = unpopulate(val, "ExplicitProxySettings", &f.ExplicitProxySettings) + delete(rawMsg, key) + case "firewalls": + err = unpopulate(val, "Firewalls", &f.Firewalls) + delete(rawMsg, key) + case "insights": + err = unpopulate(val, "Insights", &f.Insights) + delete(rawMsg, key) + case "intrusionDetection": + err = unpopulate(val, "IntrusionDetection", &f.IntrusionDetection) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) + delete(rawMsg, key) + case "ruleCollectionGroups": + err = unpopulate(val, "RuleCollectionGroups", &f.RuleCollectionGroups) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &f.SKU) + delete(rawMsg, key) + case "sql": + err = unpopulate(val, "SQL", &f.SQL) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &f.Size) + delete(rawMsg, key) + case "snat": + err = unpopulate(val, "Snat", &f.Snat) + delete(rawMsg, key) + case "threatIntelMode": + err = unpopulate(val, "ThreatIntelMode", &f.ThreatIntelMode) + delete(rawMsg, key) + case "threatIntelWhitelist": + err = unpopulate(val, "ThreatIntelWhitelist", &f.ThreatIntelWhitelist) + delete(rawMsg, key) + case "transportSecurity": + err = unpopulate(val, "TransportSecurity", &f.TransportSecurity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRule. +func (f FirewallPolicyRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", f.Description) + populate(objectMap, "name", f.Name) + objectMap["ruleType"] = f.RuleType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRule. +func (f *FirewallPolicyRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &f.Description) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, "RuleType", &f.RuleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleApplicationProtocol. +func (f FirewallPolicyRuleApplicationProtocol) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "port", f.Port) + populate(objectMap, "protocolType", f.ProtocolType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleApplicationProtocol. +func (f *FirewallPolicyRuleApplicationProtocol) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "port": + err = unpopulate(val, "Port", &f.Port) + delete(rawMsg, key) + case "protocolType": + err = unpopulate(val, "ProtocolType", &f.ProtocolType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollection. +func (f FirewallPolicyRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", f.Name) + populate(objectMap, "priority", f.Priority) + objectMap["ruleCollectionType"] = f.RuleCollectionType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollection. +func (f *FirewallPolicyRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &f.Priority) + delete(rawMsg, key) + case "ruleCollectionType": + err = unpopulate(val, "RuleCollectionType", &f.RuleCollectionType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroup. +func (f FirewallPolicyRuleCollectionGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", f.Etag) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollectionGroup. +func (f *FirewallPolicyRuleCollectionGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &f.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupDraft. +func (f FirewallPolicyRuleCollectionGroupDraft) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollectionGroupDraft. +func (f *FirewallPolicyRuleCollectionGroupDraft) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupDraftProperties. +func (f FirewallPolicyRuleCollectionGroupDraftProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "priority", f.Priority) + populate(objectMap, "ruleCollections", f.RuleCollections) + populate(objectMap, "size", f.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollectionGroupDraftProperties. +func (f *FirewallPolicyRuleCollectionGroupDraftProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "priority": + err = unpopulate(val, "Priority", &f.Priority) + delete(rawMsg, key) + case "ruleCollections": + f.RuleCollections, err = unmarshalFirewallPolicyRuleCollectionClassificationArray(val) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &f.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupListResult. +func (f FirewallPolicyRuleCollectionGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollectionGroupListResult. +func (f *FirewallPolicyRuleCollectionGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupProperties. +func (f FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "priority", f.Priority) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "ruleCollections", f.RuleCollections) + populate(objectMap, "size", f.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollectionGroupProperties. +func (f *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "priority": + err = unpopulate(val, "Priority", &f.Priority) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) + delete(rawMsg, key) + case "ruleCollections": + f.RuleCollections, err = unmarshalFirewallPolicyRuleCollectionClassificationArray(val) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &f.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicySKU. +func (f FirewallPolicySKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tier", f.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicySKU. +func (f *FirewallPolicySKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tier": + err = unpopulate(val, "Tier", &f.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicySNAT. +func (f FirewallPolicySNAT) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoLearnPrivateRanges", f.AutoLearnPrivateRanges) + populate(objectMap, "privateRanges", f.PrivateRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicySNAT. +func (f *FirewallPolicySNAT) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoLearnPrivateRanges": + err = unpopulate(val, "AutoLearnPrivateRanges", &f.AutoLearnPrivateRanges) + delete(rawMsg, key) + case "privateRanges": + err = unpopulate(val, "PrivateRanges", &f.PrivateRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicySQL. +func (f FirewallPolicySQL) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowSqlRedirect", f.AllowSQLRedirect) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicySQL. +func (f *FirewallPolicySQL) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowSqlRedirect": + err = unpopulate(val, "AllowSQLRedirect", &f.AllowSQLRedirect) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyThreatIntelWhitelist. +func (f FirewallPolicyThreatIntelWhitelist) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fqdns", f.Fqdns) + populate(objectMap, "ipAddresses", f.IPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyThreatIntelWhitelist. +func (f *FirewallPolicyThreatIntelWhitelist) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fqdns": + err = unpopulate(val, "Fqdns", &f.Fqdns) + delete(rawMsg, key) + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &f.IPAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyTransportSecurity. +func (f FirewallPolicyTransportSecurity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateAuthority", f.CertificateAuthority) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyTransportSecurity. +func (f *FirewallPolicyTransportSecurity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateAuthority": + err = unpopulate(val, "CertificateAuthority", &f.CertificateAuthority) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowLog. +func (f FlowLog) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", f.Etag) + populate(objectMap, "id", f.ID) + populate(objectMap, "identity", f.Identity) + populate(objectMap, "location", f.Location) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "tags", f.Tags) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLog. +func (f *FlowLog) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &f.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &f.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &f.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowLogFormatParameters. +func (f FlowLogFormatParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", f.Type) + populate(objectMap, "version", f.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogFormatParameters. +func (f *FlowLogFormatParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &f.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowLogInformation. +func (f FlowLogInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "flowAnalyticsConfiguration", f.FlowAnalyticsConfiguration) + populate(objectMap, "identity", f.Identity) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "targetResourceId", f.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogInformation. +func (f *FlowLogInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "flowAnalyticsConfiguration": + err = unpopulate(val, "FlowAnalyticsConfiguration", &f.FlowAnalyticsConfiguration) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &f.Identity) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &f.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowLogListResult. +func (f FlowLogListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogListResult. +func (f *FlowLogListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowLogProperties. +func (f FlowLogProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", f.Enabled) + populate(objectMap, "enabledFilteringCriteria", f.EnabledFilteringCriteria) + populate(objectMap, "format", f.Format) + populate(objectMap, "retentionPolicy", f.RetentionPolicy) + populate(objectMap, "storageId", f.StorageID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogProperties. +func (f *FlowLogProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &f.Enabled) + delete(rawMsg, key) + case "enabledFilteringCriteria": + err = unpopulate(val, "EnabledFilteringCriteria", &f.EnabledFilteringCriteria) + delete(rawMsg, key) + case "format": + err = unpopulate(val, "Format", &f.Format) + delete(rawMsg, key) + case "retentionPolicy": + err = unpopulate(val, "RetentionPolicy", &f.RetentionPolicy) + delete(rawMsg, key) + case "storageId": + err = unpopulate(val, "StorageID", &f.StorageID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowLogPropertiesFormat. +func (f FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", f.Enabled) + populate(objectMap, "enabledFilteringCriteria", f.EnabledFilteringCriteria) + populate(objectMap, "flowAnalyticsConfiguration", f.FlowAnalyticsConfiguration) + populate(objectMap, "format", f.Format) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "retentionPolicy", f.RetentionPolicy) + populate(objectMap, "storageId", f.StorageID) + populate(objectMap, "targetResourceGuid", f.TargetResourceGUID) + populate(objectMap, "targetResourceId", f.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogPropertiesFormat. +func (f *FlowLogPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &f.Enabled) + delete(rawMsg, key) + case "enabledFilteringCriteria": + err = unpopulate(val, "EnabledFilteringCriteria", &f.EnabledFilteringCriteria) + delete(rawMsg, key) + case "flowAnalyticsConfiguration": + err = unpopulate(val, "FlowAnalyticsConfiguration", &f.FlowAnalyticsConfiguration) + delete(rawMsg, key) + case "format": + err = unpopulate(val, "Format", &f.Format) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) + delete(rawMsg, key) + case "retentionPolicy": + err = unpopulate(val, "RetentionPolicy", &f.RetentionPolicy) + delete(rawMsg, key) + case "storageId": + err = unpopulate(val, "StorageID", &f.StorageID) + delete(rawMsg, key) + case "targetResourceGuid": + err = unpopulate(val, "TargetResourceGUID", &f.TargetResourceGUID) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &f.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlowLogStatusParameters. +func (f FlowLogStatusParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetResourceId", f.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlowLogStatusParameters. +func (f *FlowLogStatusParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &f.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FrontendIPConfiguration. +func (f FrontendIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", f.Etag) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + populate(objectMap, "zones", f.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FrontendIPConfiguration. +func (f *FrontendIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &f.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &f.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FrontendIPConfigurationPropertiesFormat. +func (f FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gatewayLoadBalancer", f.GatewayLoadBalancer) + populate(objectMap, "inboundNatPools", f.InboundNatPools) + populate(objectMap, "inboundNatRules", f.InboundNatRules) + populate(objectMap, "loadBalancingRules", f.LoadBalancingRules) + populate(objectMap, "outboundRules", f.OutboundRules) + populate(objectMap, "privateIPAddress", f.PrivateIPAddress) + populate(objectMap, "privateIPAddressVersion", f.PrivateIPAddressVersion) + populate(objectMap, "privateIPAllocationMethod", f.PrivateIPAllocationMethod) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "publicIPAddress", f.PublicIPAddress) + populate(objectMap, "publicIPPrefix", f.PublicIPPrefix) + populate(objectMap, "subnet", f.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FrontendIPConfigurationPropertiesFormat. +func (f *FrontendIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "gatewayLoadBalancer": + err = unpopulate(val, "GatewayLoadBalancer", &f.GatewayLoadBalancer) + delete(rawMsg, key) + case "inboundNatPools": + err = unpopulate(val, "InboundNatPools", &f.InboundNatPools) + delete(rawMsg, key) + case "inboundNatRules": + err = unpopulate(val, "InboundNatRules", &f.InboundNatRules) + delete(rawMsg, key) + case "loadBalancingRules": + err = unpopulate(val, "LoadBalancingRules", &f.LoadBalancingRules) + delete(rawMsg, key) + case "outboundRules": + err = unpopulate(val, "OutboundRules", &f.OutboundRules) + delete(rawMsg, key) + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &f.PrivateIPAddress) + delete(rawMsg, key) + case "privateIPAddressVersion": + err = unpopulate(val, "PrivateIPAddressVersion", &f.PrivateIPAddressVersion) + delete(rawMsg, key) + case "privateIPAllocationMethod": + err = unpopulate(val, "PrivateIPAllocationMethod", &f.PrivateIPAllocationMethod) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddress": + err = unpopulate(val, "PublicIPAddress", &f.PublicIPAddress) + delete(rawMsg, key) + case "publicIPPrefix": + err = unpopulate(val, "PublicIPPrefix", &f.PublicIPPrefix) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &f.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayCustomBgpIPAddressIPConfiguration. +func (g GatewayCustomBgpIPAddressIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customBgpIpAddress", g.CustomBgpIPAddress) + populate(objectMap, "ipConfigurationId", g.IPConfigurationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayCustomBgpIPAddressIPConfiguration. +func (g *GatewayCustomBgpIPAddressIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customBgpIpAddress": + err = unpopulate(val, "CustomBgpIPAddress", &g.CustomBgpIPAddress) + delete(rawMsg, key) + case "ipConfigurationId": + err = unpopulate(val, "IPConfigurationID", &g.IPConfigurationID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayLoadBalancerTunnelInterface. +func (g GatewayLoadBalancerTunnelInterface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identifier", g.Identifier) + populate(objectMap, "port", g.Port) + populate(objectMap, "protocol", g.Protocol) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayLoadBalancerTunnelInterface. +func (g *GatewayLoadBalancerTunnelInterface) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identifier": + err = unpopulate(val, "Identifier", &g.Identifier) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &g.Port) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &g.Protocol) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayRoute. +func (g GatewayRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asPath", g.AsPath) + populate(objectMap, "localAddress", g.LocalAddress) + populate(objectMap, "network", g.Network) + populate(objectMap, "nextHop", g.NextHop) + populate(objectMap, "origin", g.Origin) + populate(objectMap, "sourcePeer", g.SourcePeer) + populate(objectMap, "weight", g.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRoute. +func (g *GatewayRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asPath": + err = unpopulate(val, "AsPath", &g.AsPath) + delete(rawMsg, key) + case "localAddress": + err = unpopulate(val, "LocalAddress", &g.LocalAddress) + delete(rawMsg, key) + case "network": + err = unpopulate(val, "Network", &g.Network) + delete(rawMsg, key) + case "nextHop": + err = unpopulate(val, "NextHop", &g.NextHop) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &g.Origin) + delete(rawMsg, key) + case "sourcePeer": + err = unpopulate(val, "SourcePeer", &g.SourcePeer) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &g.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayRouteListResult. +func (g GatewayRouteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayRouteListResult. +func (g *GatewayRouteListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GenerateExpressRoutePortsLOARequest. +func (g GenerateExpressRoutePortsLOARequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customerName", g.CustomerName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GenerateExpressRoutePortsLOARequest. +func (g *GenerateExpressRoutePortsLOARequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customerName": + err = unpopulate(val, "CustomerName", &g.CustomerName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GenerateExpressRoutePortsLOAResult. +func (g GenerateExpressRoutePortsLOAResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "encodedContent", g.EncodedContent) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GenerateExpressRoutePortsLOAResult. +func (g *GenerateExpressRoutePortsLOAResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "encodedContent": + err = unpopulate(val, "EncodedContent", &g.EncodedContent) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetInboundRoutesParameters. +func (g GetInboundRoutesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionType", g.ConnectionType) + populate(objectMap, "resourceUri", g.ResourceURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetInboundRoutesParameters. +func (g *GetInboundRoutesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionType": + err = unpopulate(val, "ConnectionType", &g.ConnectionType) + delete(rawMsg, key) + case "resourceUri": + err = unpopulate(val, "ResourceURI", &g.ResourceURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetOutboundRoutesParameters. +func (g GetOutboundRoutesParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionType", g.ConnectionType) + populate(objectMap, "resourceUri", g.ResourceURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetOutboundRoutesParameters. +func (g *GetOutboundRoutesParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionType": + err = unpopulate(val, "ConnectionType", &g.ConnectionType) + delete(rawMsg, key) + case "resourceUri": + err = unpopulate(val, "ResourceURI", &g.ResourceURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetVPNSitesConfigurationRequest. +func (g GetVPNSitesConfigurationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "outputBlobSasUrl", g.OutputBlobSasURL) + populate(objectMap, "vpnSites", g.VPNSites) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetVPNSitesConfigurationRequest. +func (g *GetVPNSitesConfigurationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "outputBlobSasUrl": + err = unpopulate(val, "OutputBlobSasURL", &g.OutputBlobSasURL) + delete(rawMsg, key) + case "vpnSites": + err = unpopulate(val, "VPNSites", &g.VPNSites) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Group. +func (g Group) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", g.Etag) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "systemData", g.SystemData) + populate(objectMap, "type", g.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Group. +func (g *Group) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &g.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &g.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &g.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &g.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &g.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupByUserSession. +func (g GroupByUserSession) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupByVariables", g.GroupByVariables) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupByUserSession. +func (g *GroupByUserSession) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupByVariables": + err = unpopulate(val, "GroupByVariables", &g.GroupByVariables) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupByVariable. +func (g GroupByVariable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "variableName", g.VariableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupByVariable. +func (g *GroupByVariable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "variableName": + err = unpopulate(val, "VariableName", &g.VariableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupListResult. +func (g GroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupListResult. +func (g *GroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &g.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupProperties. +func (g GroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", g.Description) + populate(objectMap, "memberType", g.MemberType) + populate(objectMap, "provisioningState", g.ProvisioningState) + populate(objectMap, "resourceGuid", g.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupProperties. +func (g *GroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &g.Description) + delete(rawMsg, key) + case "memberType": + err = unpopulate(val, "MemberType", &g.MemberType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &g.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &g.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPConfiguration. +func (h HTTPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "headers", h.Headers) + populate(objectMap, "method", h.Method) + populate(objectMap, "validStatusCodes", h.ValidStatusCodes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPConfiguration. +func (h *HTTPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "headers": + err = unpopulate(val, "Headers", &h.Headers) + delete(rawMsg, key) + case "method": + err = unpopulate(val, "Method", &h.Method) + delete(rawMsg, key) + case "validStatusCodes": + err = unpopulate(val, "ValidStatusCodes", &h.ValidStatusCodes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPHeader. +func (h HTTPHeader) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", h.Name) + populate(objectMap, "value", h.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HTTPHeader. +func (h *HTTPHeader) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &h.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HeaderValueMatcher. +func (h HeaderValueMatcher) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ignoreCase", h.IgnoreCase) + populate(objectMap, "negate", h.Negate) + populate(objectMap, "pattern", h.Pattern) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HeaderValueMatcher. +func (h *HeaderValueMatcher) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ignoreCase": + err = unpopulate(val, "IgnoreCase", &h.IgnoreCase) + delete(rawMsg, key) + case "negate": + err = unpopulate(val, "Negate", &h.Negate) + delete(rawMsg, key) + case "pattern": + err = unpopulate(val, "Pattern", &h.Pattern) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HopLink. +func (h HopLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "context", h.Context) + populate(objectMap, "issues", h.Issues) + populate(objectMap, "linkType", h.LinkType) + populate(objectMap, "nextHopId", h.NextHopID) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "resourceId", h.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HopLink. +func (h *HopLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "context": + err = unpopulate(val, "Context", &h.Context) + delete(rawMsg, key) + case "issues": + err = unpopulate(val, "Issues", &h.Issues) + delete(rawMsg, key) + case "linkType": + err = unpopulate(val, "LinkType", &h.LinkType) + delete(rawMsg, key) + case "nextHopId": + err = unpopulate(val, "NextHopID", &h.NextHopID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &h.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HopLinkProperties. +func (h HopLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "roundTripTimeAvg", h.RoundTripTimeAvg) + populate(objectMap, "roundTripTimeMax", h.RoundTripTimeMax) + populate(objectMap, "roundTripTimeMin", h.RoundTripTimeMin) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HopLinkProperties. +func (h *HopLinkProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "roundTripTimeAvg": + err = unpopulate(val, "RoundTripTimeAvg", &h.RoundTripTimeAvg) + delete(rawMsg, key) + case "roundTripTimeMax": + err = unpopulate(val, "RoundTripTimeMax", &h.RoundTripTimeMax) + delete(rawMsg, key) + case "roundTripTimeMin": + err = unpopulate(val, "RoundTripTimeMin", &h.RoundTripTimeMin) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Hub. +func (h Hub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceId", h.ResourceID) + populate(objectMap, "resourceType", h.ResourceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Hub. +func (h *Hub) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceId": + err = unpopulate(val, "ResourceID", &h.ResourceID) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &h.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HubIPAddresses. +func (h HubIPAddresses) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateIPAddress", h.PrivateIPAddress) + populate(objectMap, "publicIPs", h.PublicIPs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubIPAddresses. +func (h *HubIPAddresses) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &h.PrivateIPAddress) + delete(rawMsg, key) + case "publicIPs": + err = unpopulate(val, "PublicIPs", &h.PublicIPs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HubIPConfiguration. +func (h HubIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", h.Etag) + populate(objectMap, "id", h.ID) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubIPConfiguration. +func (h *HubIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &h.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HubIPConfigurationPropertiesFormat. +func (h HubIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateIPAddress", h.PrivateIPAddress) + populate(objectMap, "privateIPAllocationMethod", h.PrivateIPAllocationMethod) + populate(objectMap, "provisioningState", h.ProvisioningState) + populate(objectMap, "publicIPAddress", h.PublicIPAddress) + populate(objectMap, "subnet", h.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubIPConfigurationPropertiesFormat. +func (h *HubIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &h.PrivateIPAddress) + delete(rawMsg, key) + case "privateIPAllocationMethod": + err = unpopulate(val, "PrivateIPAllocationMethod", &h.PrivateIPAllocationMethod) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &h.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddress": + err = unpopulate(val, "PublicIPAddress", &h.PublicIPAddress) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &h.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HubPublicIPAddresses. +func (h HubPublicIPAddresses) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addresses", h.Addresses) + populate(objectMap, "count", h.Count) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubPublicIPAddresses. +func (h *HubPublicIPAddresses) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addresses": + err = unpopulate(val, "Addresses", &h.Addresses) + delete(rawMsg, key) + case "count": + err = unpopulate(val, "Count", &h.Count) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HubRoute. +func (h HubRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationType", h.DestinationType) + populate(objectMap, "destinations", h.Destinations) + populate(objectMap, "name", h.Name) + populate(objectMap, "nextHop", h.NextHop) + populate(objectMap, "nextHopType", h.NextHopType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubRoute. +func (h *HubRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationType": + err = unpopulate(val, "DestinationType", &h.DestinationType) + delete(rawMsg, key) + case "destinations": + err = unpopulate(val, "Destinations", &h.Destinations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "nextHop": + err = unpopulate(val, "NextHop", &h.NextHop) + delete(rawMsg, key) + case "nextHopType": + err = unpopulate(val, "NextHopType", &h.NextHopType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HubRouteTable. +func (h HubRouteTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", h.Etag) + populate(objectMap, "id", h.ID) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "type", h.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubRouteTable. +func (h *HubRouteTable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &h.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &h.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HubRouteTableProperties. +func (h HubRouteTableProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "associatedConnections", h.AssociatedConnections) + populate(objectMap, "labels", h.Labels) + populate(objectMap, "propagatingConnections", h.PropagatingConnections) + populate(objectMap, "provisioningState", h.ProvisioningState) + populate(objectMap, "routes", h.Routes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubRouteTableProperties. +func (h *HubRouteTableProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "associatedConnections": + err = unpopulate(val, "AssociatedConnections", &h.AssociatedConnections) + delete(rawMsg, key) + case "labels": + err = unpopulate(val, "Labels", &h.Labels) + delete(rawMsg, key) + case "propagatingConnections": + err = unpopulate(val, "PropagatingConnections", &h.PropagatingConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &h.ProvisioningState) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &h.Routes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HubVirtualNetworkConnection. +func (h HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", h.Etag) + populate(objectMap, "id", h.ID) + populate(objectMap, "name", h.Name) + populate(objectMap, "properties", h.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubVirtualNetworkConnection. +func (h *HubVirtualNetworkConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &h.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HubVirtualNetworkConnectionProperties. +func (h HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowHubToRemoteVnetTransit", h.AllowHubToRemoteVnetTransit) + populate(objectMap, "allowRemoteVnetToUseHubVnetGateways", h.AllowRemoteVnetToUseHubVnetGateways) + populate(objectMap, "enableInternetSecurity", h.EnableInternetSecurity) + populate(objectMap, "provisioningState", h.ProvisioningState) + populate(objectMap, "remoteVirtualNetwork", h.RemoteVirtualNetwork) + populate(objectMap, "routingConfiguration", h.RoutingConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HubVirtualNetworkConnectionProperties. +func (h *HubVirtualNetworkConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowHubToRemoteVnetTransit": + err = unpopulate(val, "AllowHubToRemoteVnetTransit", &h.AllowHubToRemoteVnetTransit) + delete(rawMsg, key) + case "allowRemoteVnetToUseHubVnetGateways": + err = unpopulate(val, "AllowRemoteVnetToUseHubVnetGateways", &h.AllowRemoteVnetToUseHubVnetGateways) + delete(rawMsg, key) + case "enableInternetSecurity": + err = unpopulate(val, "EnableInternetSecurity", &h.EnableInternetSecurity) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &h.ProvisioningState) + delete(rawMsg, key) + case "remoteVirtualNetwork": + err = unpopulate(val, "RemoteVirtualNetwork", &h.RemoteVirtualNetwork) + delete(rawMsg, key) + case "routingConfiguration": + err = unpopulate(val, "RoutingConfiguration", &h.RoutingConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IDPSQueryObject. +func (i IDPSQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filters", i.Filters) + populate(objectMap, "orderBy", i.OrderBy) + populate(objectMap, "resultsPerPage", i.ResultsPerPage) + populate(objectMap, "search", i.Search) + populate(objectMap, "skip", i.Skip) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IDPSQueryObject. +func (i *IDPSQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filters": + err = unpopulate(val, "Filters", &i.Filters) + delete(rawMsg, key) + case "orderBy": + err = unpopulate(val, "OrderBy", &i.OrderBy) + delete(rawMsg, key) + case "resultsPerPage": + err = unpopulate(val, "ResultsPerPage", &i.ResultsPerPage) + delete(rawMsg, key) + case "search": + err = unpopulate(val, "Search", &i.Search) + delete(rawMsg, key) + case "skip": + err = unpopulate(val, "Skip", &i.Skip) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPAddressAvailabilityResult. +func (i IPAddressAvailabilityResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "available", i.Available) + populate(objectMap, "availableIPAddresses", i.AvailableIPAddresses) + populate(objectMap, "isPlatformReserved", i.IsPlatformReserved) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPAddressAvailabilityResult. +func (i *IPAddressAvailabilityResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "available": + err = unpopulate(val, "Available", &i.Available) + delete(rawMsg, key) + case "availableIPAddresses": + err = unpopulate(val, "AvailableIPAddresses", &i.AvailableIPAddresses) + delete(rawMsg, key) + case "isPlatformReserved": + err = unpopulate(val, "IsPlatformReserved", &i.IsPlatformReserved) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPAllocation. +func (i IPAllocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPAllocation. +func (i *IPAllocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPAllocationListResult. +func (i IPAllocationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPAllocationListResult. +func (i *IPAllocationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPAllocationPropertiesFormat. +func (i IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allocationTags", i.AllocationTags) + populate(objectMap, "ipamAllocationId", i.IpamAllocationID) + populate(objectMap, "prefix", i.Prefix) + populate(objectMap, "prefixLength", i.PrefixLength) + populate(objectMap, "prefixType", i.PrefixType) + populate(objectMap, "subnet", i.Subnet) + populate(objectMap, "type", i.Type) + populate(objectMap, "virtualNetwork", i.VirtualNetwork) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPAllocationPropertiesFormat. +func (i *IPAllocationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allocationTags": + err = unpopulate(val, "AllocationTags", &i.AllocationTags) + delete(rawMsg, key) + case "ipamAllocationId": + err = unpopulate(val, "IpamAllocationID", &i.IpamAllocationID) + delete(rawMsg, key) + case "prefix": + err = unpopulate(val, "Prefix", &i.Prefix) + delete(rawMsg, key) + case "prefixLength": + err = unpopulate(val, "PrefixLength", &i.PrefixLength) + delete(rawMsg, key) + case "prefixType": + err = unpopulate(val, "PrefixType", &i.PrefixType) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &i.Subnet) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + case "virtualNetwork": + err = unpopulate(val, "VirtualNetwork", &i.VirtualNetwork) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPConfiguration. +func (i IPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfiguration. +func (i *IPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPConfigurationBgpPeeringAddress. +func (i IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customBgpIpAddresses", i.CustomBgpIPAddresses) + populate(objectMap, "defaultBgpIpAddresses", i.DefaultBgpIPAddresses) + populate(objectMap, "ipconfigurationId", i.IPConfigurationID) + populate(objectMap, "tunnelIpAddresses", i.TunnelIPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationBgpPeeringAddress. +func (i *IPConfigurationBgpPeeringAddress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customBgpIpAddresses": + err = unpopulate(val, "CustomBgpIPAddresses", &i.CustomBgpIPAddresses) + delete(rawMsg, key) + case "defaultBgpIpAddresses": + err = unpopulate(val, "DefaultBgpIPAddresses", &i.DefaultBgpIPAddresses) + delete(rawMsg, key) + case "ipconfigurationId": + err = unpopulate(val, "IPConfigurationID", &i.IPConfigurationID) + delete(rawMsg, key) + case "tunnelIpAddresses": + err = unpopulate(val, "TunnelIPAddresses", &i.TunnelIPAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPConfigurationProfile. +func (i IPConfigurationProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationProfile. +func (i *IPConfigurationProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPConfigurationProfilePropertiesFormat. +func (i IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "subnet", i.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationProfilePropertiesFormat. +func (i *IPConfigurationProfilePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &i.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPConfigurationPropertiesFormat. +func (i IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateIPAddress", i.PrivateIPAddress) + populate(objectMap, "privateIPAllocationMethod", i.PrivateIPAllocationMethod) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "publicIPAddress", i.PublicIPAddress) + populate(objectMap, "subnet", i.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigurationPropertiesFormat. +func (i *IPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &i.PrivateIPAddress) + delete(rawMsg, key) + case "privateIPAllocationMethod": + err = unpopulate(val, "PrivateIPAllocationMethod", &i.PrivateIPAllocationMethod) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddress": + err = unpopulate(val, "PublicIPAddress", &i.PublicIPAddress) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &i.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPGroup. +func (i IPGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPGroup. +func (i *IPGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPGroupListResult. +func (i IPGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPGroupListResult. +func (i *IPGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPGroupPropertiesFormat. +func (i IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "firewallPolicies", i.FirewallPolicies) + populate(objectMap, "firewalls", i.Firewalls) + populate(objectMap, "ipAddresses", i.IPAddresses) + populate(objectMap, "provisioningState", i.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPGroupPropertiesFormat. +func (i *IPGroupPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "firewallPolicies": + err = unpopulate(val, "FirewallPolicies", &i.FirewallPolicies) + delete(rawMsg, key) + case "firewalls": + err = unpopulate(val, "Firewalls", &i.Firewalls) + delete(rawMsg, key) + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &i.IPAddresses) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPPrefixesList. +func (i IPPrefixesList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipPrefixes", i.IPPrefixes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPPrefixesList. +func (i *IPPrefixesList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipPrefixes": + err = unpopulate(val, "IPPrefixes", &i.IPPrefixes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPRule. +func (i IPRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefix", i.AddressPrefix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPRule. +func (i *IPRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &i.AddressPrefix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPSecPolicy. +func (i IPSecPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dhGroup", i.DhGroup) + populate(objectMap, "ipsecEncryption", i.IPSecEncryption) + populate(objectMap, "ipsecIntegrity", i.IPSecIntegrity) + populate(objectMap, "ikeEncryption", i.IkeEncryption) + populate(objectMap, "ikeIntegrity", i.IkeIntegrity) + populate(objectMap, "pfsGroup", i.PfsGroup) + populate(objectMap, "saDataSizeKilobytes", i.SaDataSizeKilobytes) + populate(objectMap, "saLifeTimeSeconds", i.SaLifeTimeSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPSecPolicy. +func (i *IPSecPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dhGroup": + err = unpopulate(val, "DhGroup", &i.DhGroup) + delete(rawMsg, key) + case "ipsecEncryption": + err = unpopulate(val, "IPSecEncryption", &i.IPSecEncryption) + delete(rawMsg, key) + case "ipsecIntegrity": + err = unpopulate(val, "IPSecIntegrity", &i.IPSecIntegrity) + delete(rawMsg, key) + case "ikeEncryption": + err = unpopulate(val, "IkeEncryption", &i.IkeEncryption) + delete(rawMsg, key) + case "ikeIntegrity": + err = unpopulate(val, "IkeIntegrity", &i.IkeIntegrity) + delete(rawMsg, key) + case "pfsGroup": + err = unpopulate(val, "PfsGroup", &i.PfsGroup) + delete(rawMsg, key) + case "saDataSizeKilobytes": + err = unpopulate(val, "SaDataSizeKilobytes", &i.SaDataSizeKilobytes) + delete(rawMsg, key) + case "saLifeTimeSeconds": + err = unpopulate(val, "SaLifeTimeSeconds", &i.SaLifeTimeSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPTag. +func (i IPTag) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipTagType", i.IPTagType) + populate(objectMap, "tag", i.Tag) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPTag. +func (i *IPTag) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipTagType": + err = unpopulate(val, "IPTagType", &i.IPTagType) + delete(rawMsg, key) + case "tag": + err = unpopulate(val, "Tag", &i.Tag) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPTraffic. +func (i IPTraffic) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationIps", i.DestinationIPs) + populate(objectMap, "destinationPorts", i.DestinationPorts) + populate(objectMap, "protocols", i.Protocols) + populate(objectMap, "sourceIps", i.SourceIPs) + populate(objectMap, "sourcePorts", i.SourcePorts) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPTraffic. +func (i *IPTraffic) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationIps": + err = unpopulate(val, "DestinationIPs", &i.DestinationIPs) + delete(rawMsg, key) + case "destinationPorts": + err = unpopulate(val, "DestinationPorts", &i.DestinationPorts) + delete(rawMsg, key) + case "protocols": + err = unpopulate(val, "Protocols", &i.Protocols) + delete(rawMsg, key) + case "sourceIps": + err = unpopulate(val, "SourceIPs", &i.SourceIPs) + delete(rawMsg, key) + case "sourcePorts": + err = unpopulate(val, "SourcePorts", &i.SourcePorts) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPv6CircuitConnectionConfig. +func (i IPv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefix", i.AddressPrefix) + populate(objectMap, "circuitConnectionStatus", i.CircuitConnectionStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPv6CircuitConnectionConfig. +func (i *IPv6CircuitConnectionConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &i.AddressPrefix) + delete(rawMsg, key) + case "circuitConnectionStatus": + err = unpopulate(val, "CircuitConnectionStatus", &i.CircuitConnectionStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPv6ExpressRouteCircuitPeeringConfig. +func (i IPv6ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "microsoftPeeringConfig", i.MicrosoftPeeringConfig) + populate(objectMap, "primaryPeerAddressPrefix", i.PrimaryPeerAddressPrefix) + populate(objectMap, "routeFilter", i.RouteFilter) + populate(objectMap, "secondaryPeerAddressPrefix", i.SecondaryPeerAddressPrefix) + populate(objectMap, "state", i.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPv6ExpressRouteCircuitPeeringConfig. +func (i *IPv6ExpressRouteCircuitPeeringConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "microsoftPeeringConfig": + err = unpopulate(val, "MicrosoftPeeringConfig", &i.MicrosoftPeeringConfig) + delete(rawMsg, key) + case "primaryPeerAddressPrefix": + err = unpopulate(val, "PrimaryPeerAddressPrefix", &i.PrimaryPeerAddressPrefix) + delete(rawMsg, key) + case "routeFilter": + err = unpopulate(val, "RouteFilter", &i.RouteFilter) + delete(rawMsg, key) + case "secondaryPeerAddressPrefix": + err = unpopulate(val, "SecondaryPeerAddressPrefix", &i.SecondaryPeerAddressPrefix) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &i.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundNatPool. +func (i InboundNatPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatPool. +func (i *InboundNatPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundNatPoolPropertiesFormat. +func (i InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendPort", i.BackendPort) + populate(objectMap, "enableFloatingIP", i.EnableFloatingIP) + populate(objectMap, "enableTcpReset", i.EnableTCPReset) + populate(objectMap, "frontendIPConfiguration", i.FrontendIPConfiguration) + populate(objectMap, "frontendPortRangeEnd", i.FrontendPortRangeEnd) + populate(objectMap, "frontendPortRangeStart", i.FrontendPortRangeStart) + populate(objectMap, "idleTimeoutInMinutes", i.IdleTimeoutInMinutes) + populate(objectMap, "protocol", i.Protocol) + populate(objectMap, "provisioningState", i.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatPoolPropertiesFormat. +func (i *InboundNatPoolPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendPort": + err = unpopulate(val, "BackendPort", &i.BackendPort) + delete(rawMsg, key) + case "enableFloatingIP": + err = unpopulate(val, "EnableFloatingIP", &i.EnableFloatingIP) + delete(rawMsg, key) + case "enableTcpReset": + err = unpopulate(val, "EnableTCPReset", &i.EnableTCPReset) + delete(rawMsg, key) + case "frontendIPConfiguration": + err = unpopulate(val, "FrontendIPConfiguration", &i.FrontendIPConfiguration) + delete(rawMsg, key) + case "frontendPortRangeEnd": + err = unpopulate(val, "FrontendPortRangeEnd", &i.FrontendPortRangeEnd) + delete(rawMsg, key) + case "frontendPortRangeStart": + err = unpopulate(val, "FrontendPortRangeStart", &i.FrontendPortRangeStart) + delete(rawMsg, key) + case "idleTimeoutInMinutes": + err = unpopulate(val, "IdleTimeoutInMinutes", &i.IdleTimeoutInMinutes) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &i.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundNatRule. +func (i InboundNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatRule. +func (i *InboundNatRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundNatRuleListResult. +func (i InboundNatRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatRuleListResult. +func (i *InboundNatRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundNatRulePortMapping. +func (i InboundNatRulePortMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendPort", i.BackendPort) + populate(objectMap, "frontendPort", i.FrontendPort) + populate(objectMap, "inboundNatRuleName", i.InboundNatRuleName) + populate(objectMap, "protocol", i.Protocol) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatRulePortMapping. +func (i *InboundNatRulePortMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendPort": + err = unpopulate(val, "BackendPort", &i.BackendPort) + delete(rawMsg, key) + case "frontendPort": + err = unpopulate(val, "FrontendPort", &i.FrontendPort) + delete(rawMsg, key) + case "inboundNatRuleName": + err = unpopulate(val, "InboundNatRuleName", &i.InboundNatRuleName) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &i.Protocol) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundNatRulePropertiesFormat. +func (i InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPool", i.BackendAddressPool) + populate(objectMap, "backendIPConfiguration", i.BackendIPConfiguration) + populate(objectMap, "backendPort", i.BackendPort) + populate(objectMap, "enableFloatingIP", i.EnableFloatingIP) + populate(objectMap, "enableTcpReset", i.EnableTCPReset) + populate(objectMap, "frontendIPConfiguration", i.FrontendIPConfiguration) + populate(objectMap, "frontendPort", i.FrontendPort) + populate(objectMap, "frontendPortRangeEnd", i.FrontendPortRangeEnd) + populate(objectMap, "frontendPortRangeStart", i.FrontendPortRangeStart) + populate(objectMap, "idleTimeoutInMinutes", i.IdleTimeoutInMinutes) + populate(objectMap, "protocol", i.Protocol) + populate(objectMap, "provisioningState", i.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundNatRulePropertiesFormat. +func (i *InboundNatRulePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPool": + err = unpopulate(val, "BackendAddressPool", &i.BackendAddressPool) + delete(rawMsg, key) + case "backendIPConfiguration": + err = unpopulate(val, "BackendIPConfiguration", &i.BackendIPConfiguration) + delete(rawMsg, key) + case "backendPort": + err = unpopulate(val, "BackendPort", &i.BackendPort) + delete(rawMsg, key) + case "enableFloatingIP": + err = unpopulate(val, "EnableFloatingIP", &i.EnableFloatingIP) + delete(rawMsg, key) + case "enableTcpReset": + err = unpopulate(val, "EnableTCPReset", &i.EnableTCPReset) + delete(rawMsg, key) + case "frontendIPConfiguration": + err = unpopulate(val, "FrontendIPConfiguration", &i.FrontendIPConfiguration) + delete(rawMsg, key) + case "frontendPort": + err = unpopulate(val, "FrontendPort", &i.FrontendPort) + delete(rawMsg, key) + case "frontendPortRangeEnd": + err = unpopulate(val, "FrontendPortRangeEnd", &i.FrontendPortRangeEnd) + delete(rawMsg, key) + case "frontendPortRangeStart": + err = unpopulate(val, "FrontendPortRangeStart", &i.FrontendPortRangeStart) + delete(rawMsg, key) + case "idleTimeoutInMinutes": + err = unpopulate(val, "IdleTimeoutInMinutes", &i.IdleTimeoutInMinutes) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &i.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundSecurityRule. +func (i InboundSecurityRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundSecurityRule. +func (i *InboundSecurityRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundSecurityRuleProperties. +func (i InboundSecurityRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "ruleType", i.RuleType) + populate(objectMap, "rules", i.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundSecurityRuleProperties. +func (i *InboundSecurityRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, "RuleType", &i.RuleType) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &i.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InboundSecurityRules. +func (i InboundSecurityRules) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appliesOn", i.AppliesOn) + populate(objectMap, "destinationPortRange", i.DestinationPortRange) + populate(objectMap, "destinationPortRanges", i.DestinationPortRanges) + populate(objectMap, "name", i.Name) + populate(objectMap, "protocol", i.Protocol) + populate(objectMap, "sourceAddressPrefix", i.SourceAddressPrefix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InboundSecurityRules. +func (i *InboundSecurityRules) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appliesOn": + err = unpopulate(val, "AppliesOn", &i.AppliesOn) + delete(rawMsg, key) + case "destinationPortRange": + err = unpopulate(val, "DestinationPortRange", &i.DestinationPortRange) + delete(rawMsg, key) + case "destinationPortRanges": + err = unpopulate(val, "DestinationPortRanges", &i.DestinationPortRanges) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &i.Protocol) + delete(rawMsg, key) + case "sourceAddressPrefix": + err = unpopulate(val, "SourceAddressPrefix", &i.SourceAddressPrefix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntentContent. +func (i IntentContent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", i.Description) + populate(objectMap, "destinationResourceId", i.DestinationResourceID) + populate(objectMap, "ipTraffic", i.IPTraffic) + populate(objectMap, "sourceResourceId", i.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntentContent. +func (i *IntentContent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &i.Description) + delete(rawMsg, key) + case "destinationResourceId": + err = unpopulate(val, "DestinationResourceID", &i.DestinationResourceID) + delete(rawMsg, key) + case "ipTraffic": + err = unpopulate(val, "IPTraffic", &i.IPTraffic) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &i.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntentPolicy. +func (i IntentPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntentPolicy. +func (i *IntentPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IntentPolicyConfiguration. +func (i IntentPolicyConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkIntentPolicyName", i.NetworkIntentPolicyName) + populate(objectMap, "sourceNetworkIntentPolicy", i.SourceNetworkIntentPolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IntentPolicyConfiguration. +func (i *IntentPolicyConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkIntentPolicyName": + err = unpopulate(val, "NetworkIntentPolicyName", &i.NetworkIntentPolicyName) + delete(rawMsg, key) + case "sourceNetworkIntentPolicy": + err = unpopulate(val, "SourceNetworkIntentPolicy", &i.SourceNetworkIntentPolicy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Interface. +func (i Interface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "extendedLocation", i.ExtendedLocation) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Interface. +func (i *Interface) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &i.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceAssociation. +func (i InterfaceAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "securityRules", i.SecurityRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceAssociation. +func (i *InterfaceAssociation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "securityRules": + err = unpopulate(val, "SecurityRules", &i.SecurityRules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceDNSSettings. +func (i InterfaceDNSSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appliedDnsServers", i.AppliedDNSServers) + populate(objectMap, "dnsServers", i.DNSServers) + populate(objectMap, "internalDnsNameLabel", i.InternalDNSNameLabel) + populate(objectMap, "internalDomainNameSuffix", i.InternalDomainNameSuffix) + populate(objectMap, "internalFqdn", i.InternalFqdn) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceDNSSettings. +func (i *InterfaceDNSSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appliedDnsServers": + err = unpopulate(val, "AppliedDNSServers", &i.AppliedDNSServers) + delete(rawMsg, key) + case "dnsServers": + err = unpopulate(val, "DNSServers", &i.DNSServers) + delete(rawMsg, key) + case "internalDnsNameLabel": + err = unpopulate(val, "InternalDNSNameLabel", &i.InternalDNSNameLabel) + delete(rawMsg, key) + case "internalDomainNameSuffix": + err = unpopulate(val, "InternalDomainNameSuffix", &i.InternalDomainNameSuffix) + delete(rawMsg, key) + case "internalFqdn": + err = unpopulate(val, "InternalFqdn", &i.InternalFqdn) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfiguration. +func (i InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceIPConfiguration. +func (i *InterfaceIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationListResult. +func (i InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceIPConfigurationListResult. +func (i *InterfaceIPConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationPrivateLinkConnectionProperties. +func (i InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fqdns", i.Fqdns) + populate(objectMap, "groupId", i.GroupID) + populate(objectMap, "requiredMemberName", i.RequiredMemberName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceIPConfigurationPrivateLinkConnectionProperties. +func (i *InterfaceIPConfigurationPrivateLinkConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fqdns": + err = unpopulate(val, "Fqdns", &i.Fqdns) + delete(rawMsg, key) + case "groupId": + err = unpopulate(val, "GroupID", &i.GroupID) + delete(rawMsg, key) + case "requiredMemberName": + err = unpopulate(val, "RequiredMemberName", &i.RequiredMemberName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationPropertiesFormat. +func (i InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationGatewayBackendAddressPools", i.ApplicationGatewayBackendAddressPools) + populate(objectMap, "applicationSecurityGroups", i.ApplicationSecurityGroups) + populate(objectMap, "gatewayLoadBalancer", i.GatewayLoadBalancer) + populate(objectMap, "loadBalancerBackendAddressPools", i.LoadBalancerBackendAddressPools) + populate(objectMap, "loadBalancerInboundNatRules", i.LoadBalancerInboundNatRules) + populate(objectMap, "primary", i.Primary) + populate(objectMap, "privateIPAddress", i.PrivateIPAddress) + populate(objectMap, "privateIPAddressPrefixLength", i.PrivateIPAddressPrefixLength) + populate(objectMap, "privateIPAddressVersion", i.PrivateIPAddressVersion) + populate(objectMap, "privateIPAllocationMethod", i.PrivateIPAllocationMethod) + populate(objectMap, "privateLinkConnectionProperties", i.PrivateLinkConnectionProperties) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "publicIPAddress", i.PublicIPAddress) + populate(objectMap, "subnet", i.Subnet) + populate(objectMap, "virtualNetworkTaps", i.VirtualNetworkTaps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceIPConfigurationPropertiesFormat. +func (i *InterfaceIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationGatewayBackendAddressPools": + err = unpopulate(val, "ApplicationGatewayBackendAddressPools", &i.ApplicationGatewayBackendAddressPools) + delete(rawMsg, key) + case "applicationSecurityGroups": + err = unpopulate(val, "ApplicationSecurityGroups", &i.ApplicationSecurityGroups) + delete(rawMsg, key) + case "gatewayLoadBalancer": + err = unpopulate(val, "GatewayLoadBalancer", &i.GatewayLoadBalancer) + delete(rawMsg, key) + case "loadBalancerBackendAddressPools": + err = unpopulate(val, "LoadBalancerBackendAddressPools", &i.LoadBalancerBackendAddressPools) + delete(rawMsg, key) + case "loadBalancerInboundNatRules": + err = unpopulate(val, "LoadBalancerInboundNatRules", &i.LoadBalancerInboundNatRules) + delete(rawMsg, key) + case "primary": + err = unpopulate(val, "Primary", &i.Primary) + delete(rawMsg, key) + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &i.PrivateIPAddress) + delete(rawMsg, key) + case "privateIPAddressPrefixLength": + err = unpopulate(val, "PrivateIPAddressPrefixLength", &i.PrivateIPAddressPrefixLength) + delete(rawMsg, key) + case "privateIPAddressVersion": + err = unpopulate(val, "PrivateIPAddressVersion", &i.PrivateIPAddressVersion) + delete(rawMsg, key) + case "privateIPAllocationMethod": + err = unpopulate(val, "PrivateIPAllocationMethod", &i.PrivateIPAllocationMethod) + delete(rawMsg, key) + case "privateLinkConnectionProperties": + err = unpopulate(val, "PrivateLinkConnectionProperties", &i.PrivateLinkConnectionProperties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddress": + err = unpopulate(val, "PublicIPAddress", &i.PublicIPAddress) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &i.Subnet) + delete(rawMsg, key) + case "virtualNetworkTaps": + err = unpopulate(val, "VirtualNetworkTaps", &i.VirtualNetworkTaps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceListResult. +func (i InterfaceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceListResult. +func (i *InterfaceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceLoadBalancerListResult. +func (i InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceLoadBalancerListResult. +func (i *InterfaceLoadBalancerListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfacePropertiesFormat. +func (i InterfacePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "auxiliaryMode", i.AuxiliaryMode) + populate(objectMap, "auxiliarySku", i.AuxiliarySKU) + populate(objectMap, "dnsSettings", i.DNSSettings) + populate(objectMap, "defaultOutboundConnectivityEnabled", i.DefaultOutboundConnectivityEnabled) + populate(objectMap, "disableTcpStateTracking", i.DisableTCPStateTracking) + populate(objectMap, "dscpConfiguration", i.DscpConfiguration) + populate(objectMap, "enableAcceleratedNetworking", i.EnableAcceleratedNetworking) + populate(objectMap, "enableIPForwarding", i.EnableIPForwarding) + populate(objectMap, "hostedWorkloads", i.HostedWorkloads) + populate(objectMap, "ipConfigurations", i.IPConfigurations) + populate(objectMap, "macAddress", i.MacAddress) + populate(objectMap, "migrationPhase", i.MigrationPhase) + populate(objectMap, "networkSecurityGroup", i.NetworkSecurityGroup) + populate(objectMap, "nicType", i.NicType) + populate(objectMap, "primary", i.Primary) + populate(objectMap, "privateEndpoint", i.PrivateEndpoint) + populate(objectMap, "privateLinkService", i.PrivateLinkService) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "resourceGuid", i.ResourceGUID) + populate(objectMap, "tapConfigurations", i.TapConfigurations) + populate(objectMap, "virtualMachine", i.VirtualMachine) + populate(objectMap, "vnetEncryptionSupported", i.VnetEncryptionSupported) + populate(objectMap, "workloadType", i.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfacePropertiesFormat. +func (i *InterfacePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "auxiliaryMode": + err = unpopulate(val, "AuxiliaryMode", &i.AuxiliaryMode) + delete(rawMsg, key) + case "auxiliarySku": + err = unpopulate(val, "AuxiliarySKU", &i.AuxiliarySKU) + delete(rawMsg, key) + case "dnsSettings": + err = unpopulate(val, "DNSSettings", &i.DNSSettings) + delete(rawMsg, key) + case "defaultOutboundConnectivityEnabled": + err = unpopulate(val, "DefaultOutboundConnectivityEnabled", &i.DefaultOutboundConnectivityEnabled) + delete(rawMsg, key) + case "disableTcpStateTracking": + err = unpopulate(val, "DisableTCPStateTracking", &i.DisableTCPStateTracking) + delete(rawMsg, key) + case "dscpConfiguration": + err = unpopulate(val, "DscpConfiguration", &i.DscpConfiguration) + delete(rawMsg, key) + case "enableAcceleratedNetworking": + err = unpopulate(val, "EnableAcceleratedNetworking", &i.EnableAcceleratedNetworking) + delete(rawMsg, key) + case "enableIPForwarding": + err = unpopulate(val, "EnableIPForwarding", &i.EnableIPForwarding) + delete(rawMsg, key) + case "hostedWorkloads": + err = unpopulate(val, "HostedWorkloads", &i.HostedWorkloads) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &i.IPConfigurations) + delete(rawMsg, key) + case "macAddress": + err = unpopulate(val, "MacAddress", &i.MacAddress) + delete(rawMsg, key) + case "migrationPhase": + err = unpopulate(val, "MigrationPhase", &i.MigrationPhase) + delete(rawMsg, key) + case "networkSecurityGroup": + err = unpopulate(val, "NetworkSecurityGroup", &i.NetworkSecurityGroup) + delete(rawMsg, key) + case "nicType": + err = unpopulate(val, "NicType", &i.NicType) + delete(rawMsg, key) + case "primary": + err = unpopulate(val, "Primary", &i.Primary) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &i.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkService": + err = unpopulate(val, "PrivateLinkService", &i.PrivateLinkService) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &i.ResourceGUID) + delete(rawMsg, key) + case "tapConfigurations": + err = unpopulate(val, "TapConfigurations", &i.TapConfigurations) + delete(rawMsg, key) + case "virtualMachine": + err = unpopulate(val, "VirtualMachine", &i.VirtualMachine) + delete(rawMsg, key) + case "vnetEncryptionSupported": + err = unpopulate(val, "VnetEncryptionSupported", &i.VnetEncryptionSupported) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &i.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfiguration. +func (i InterfaceTapConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceTapConfiguration. +func (i *InterfaceTapConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &i.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfigurationListResult. +func (i InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceTapConfigurationListResult. +func (i *InterfaceTapConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfigurationPropertiesFormat. +func (i InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "virtualNetworkTap", i.VirtualNetworkTap) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InterfaceTapConfigurationPropertiesFormat. +func (i *InterfaceTapConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "virtualNetworkTap": + err = unpopulate(val, "VirtualNetworkTap", &i.VirtualNetworkTap) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InternetIngressPublicIPsProperties. +func (i InternetIngressPublicIPsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InternetIngressPublicIPsProperties. +func (i *InternetIngressPublicIPsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IpamPool. +func (i IpamPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "systemData", i.SystemData) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IpamPool. +func (i *IpamPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &i.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IpamPoolList. +func (i IpamPoolList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IpamPoolList. +func (i *IpamPoolList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IpamPoolPrefixAllocation. +func (i IpamPoolPrefixAllocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allocatedAddressPrefixes", i.AllocatedAddressPrefixes) + populate(objectMap, "numberOfIpAddresses", i.NumberOfIPAddresses) + populate(objectMap, "pool", i.Pool) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IpamPoolPrefixAllocation. +func (i *IpamPoolPrefixAllocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allocatedAddressPrefixes": + err = unpopulate(val, "AllocatedAddressPrefixes", &i.AllocatedAddressPrefixes) + delete(rawMsg, key) + case "numberOfIpAddresses": + err = unpopulate(val, "NumberOfIPAddresses", &i.NumberOfIPAddresses) + delete(rawMsg, key) + case "pool": + err = unpopulate(val, "Pool", &i.Pool) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IpamPoolPrefixAllocationPool. +func (i IpamPoolPrefixAllocationPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IpamPoolPrefixAllocationPool. +func (i *IpamPoolPrefixAllocationPool) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IpamPoolProperties. +func (i IpamPoolProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", i.AddressPrefixes) + populate(objectMap, "description", i.Description) + populate(objectMap, "displayName", i.DisplayName) + populate(objectMap, "ipAddressType", i.IPAddressType) + populate(objectMap, "parentPoolName", i.ParentPoolName) + populate(objectMap, "provisioningState", i.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IpamPoolProperties. +func (i *IpamPoolProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &i.AddressPrefixes) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &i.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &i.DisplayName) + delete(rawMsg, key) + case "ipAddressType": + err = unpopulate(val, "IPAddressType", &i.IPAddressType) + delete(rawMsg, key) + case "parentPoolName": + err = unpopulate(val, "ParentPoolName", &i.ParentPoolName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IpamPoolUpdate. +func (i IpamPoolUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "tags", i.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IpamPoolUpdate. +func (i *IpamPoolUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IpamPoolUpdateProperties. +func (i IpamPoolUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", i.Description) + populate(objectMap, "displayName", i.DisplayName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IpamPoolUpdateProperties. +func (i *IpamPoolUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &i.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &i.DisplayName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListHubRouteTablesResult. +func (l ListHubRouteTablesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListHubRouteTablesResult. +func (l *ListHubRouteTablesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListHubVirtualNetworkConnectionsResult. +func (l ListHubVirtualNetworkConnectionsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListHubVirtualNetworkConnectionsResult. +func (l *ListHubVirtualNetworkConnectionsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListP2SVPNGatewaysResult. +func (l ListP2SVPNGatewaysResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListP2SVPNGatewaysResult. +func (l *ListP2SVPNGatewaysResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListRouteMapsResult. +func (l ListRouteMapsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListRouteMapsResult. +func (l *ListRouteMapsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListRoutingIntentResult. +func (l ListRoutingIntentResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListRoutingIntentResult. +func (l *ListRoutingIntentResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNConnectionsResult. +func (l ListVPNConnectionsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNConnectionsResult. +func (l *ListVPNConnectionsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNGatewayNatRulesResult. +func (l ListVPNGatewayNatRulesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNGatewayNatRulesResult. +func (l *ListVPNGatewayNatRulesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNGatewaysResult. +func (l ListVPNGatewaysResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNGatewaysResult. +func (l *ListVPNGatewaysResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNServerConfigurationPolicyGroupsResult. +func (l ListVPNServerConfigurationPolicyGroupsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNServerConfigurationPolicyGroupsResult. +func (l *ListVPNServerConfigurationPolicyGroupsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNServerConfigurationsResult. +func (l ListVPNServerConfigurationsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNServerConfigurationsResult. +func (l *ListVPNServerConfigurationsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNSiteLinkConnectionsResult. +func (l ListVPNSiteLinkConnectionsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNSiteLinkConnectionsResult. +func (l *ListVPNSiteLinkConnectionsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNSiteLinksResult. +func (l ListVPNSiteLinksResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNSiteLinksResult. +func (l *ListVPNSiteLinksResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNSitesResult. +func (l ListVPNSitesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVPNSitesResult. +func (l *ListVPNSitesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubBgpConnectionResults. +func (l ListVirtualHubBgpConnectionResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualHubBgpConnectionResults. +func (l *ListVirtualHubBgpConnectionResults) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubIPConfigurationResults. +func (l ListVirtualHubIPConfigurationResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualHubIPConfigurationResults. +func (l *ListVirtualHubIPConfigurationResults) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubRouteTableV2SResult. +func (l ListVirtualHubRouteTableV2SResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualHubRouteTableV2SResult. +func (l *ListVirtualHubRouteTableV2SResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubsResult. +func (l ListVirtualHubsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualHubsResult. +func (l *ListVirtualHubsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualNetworkGatewayNatRulesResult. +func (l ListVirtualNetworkGatewayNatRulesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualNetworkGatewayNatRulesResult. +func (l *ListVirtualNetworkGatewayNatRulesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualWANsResult. +func (l ListVirtualWANsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListVirtualWANsResult. +func (l *ListVirtualWANsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancer. +func (l LoadBalancer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", l.Etag) + populate(objectMap, "extendedLocation", l.ExtendedLocation) + populate(objectMap, "id", l.ID) + populate(objectMap, "location", l.Location) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "sku", l.SKU) + populate(objectMap, "tags", l.Tags) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancer. +func (l *LoadBalancer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &l.Etag) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &l.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &l.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &l.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &l.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddress. +func (l LoadBalancerBackendAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerBackendAddress. +func (l *LoadBalancerBackendAddress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddressPoolListResult. +func (l LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerBackendAddressPoolListResult. +func (l *LoadBalancerBackendAddressPoolListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddressPropertiesFormat. +func (l LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "adminState", l.AdminState) + populate(objectMap, "ipAddress", l.IPAddress) + populate(objectMap, "inboundNatRulesPortMapping", l.InboundNatRulesPortMapping) + populate(objectMap, "loadBalancerFrontendIPConfiguration", l.LoadBalancerFrontendIPConfiguration) + populate(objectMap, "networkInterfaceIPConfiguration", l.NetworkInterfaceIPConfiguration) + populate(objectMap, "subnet", l.Subnet) + populate(objectMap, "virtualNetwork", l.VirtualNetwork) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerBackendAddressPropertiesFormat. +func (l *LoadBalancerBackendAddressPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adminState": + err = unpopulate(val, "AdminState", &l.AdminState) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &l.IPAddress) + delete(rawMsg, key) + case "inboundNatRulesPortMapping": + err = unpopulate(val, "InboundNatRulesPortMapping", &l.InboundNatRulesPortMapping) + delete(rawMsg, key) + case "loadBalancerFrontendIPConfiguration": + err = unpopulate(val, "LoadBalancerFrontendIPConfiguration", &l.LoadBalancerFrontendIPConfiguration) + delete(rawMsg, key) + case "networkInterfaceIPConfiguration": + err = unpopulate(val, "NetworkInterfaceIPConfiguration", &l.NetworkInterfaceIPConfiguration) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &l.Subnet) + delete(rawMsg, key) + case "virtualNetwork": + err = unpopulate(val, "VirtualNetwork", &l.VirtualNetwork) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerFrontendIPConfigurationListResult. +func (l LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerFrontendIPConfigurationListResult. +func (l *LoadBalancerFrontendIPConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerHealthPerRule. +func (l LoadBalancerHealthPerRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "down", l.Down) + populate(objectMap, "loadBalancerBackendAddresses", l.LoadBalancerBackendAddresses) + populate(objectMap, "up", l.Up) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerHealthPerRule. +func (l *LoadBalancerHealthPerRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "down": + err = unpopulate(val, "Down", &l.Down) + delete(rawMsg, key) + case "loadBalancerBackendAddresses": + err = unpopulate(val, "LoadBalancerBackendAddresses", &l.LoadBalancerBackendAddresses) + delete(rawMsg, key) + case "up": + err = unpopulate(val, "Up", &l.Up) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerHealthPerRulePerBackendAddress. +func (l LoadBalancerHealthPerRulePerBackendAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddress", l.IPAddress) + populate(objectMap, "networkInterfaceIPConfigurationId", l.NetworkInterfaceIPConfigurationID) + populate(objectMap, "reason", l.Reason) + populate(objectMap, "state", l.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerHealthPerRulePerBackendAddress. +func (l *LoadBalancerHealthPerRulePerBackendAddress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddress": + err = unpopulate(val, "IPAddress", &l.IPAddress) + delete(rawMsg, key) + case "networkInterfaceIPConfigurationId": + err = unpopulate(val, "NetworkInterfaceIPConfigurationID", &l.NetworkInterfaceIPConfigurationID) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &l.Reason) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &l.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerListResult. +func (l LoadBalancerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerListResult. +func (l *LoadBalancerListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerLoadBalancingRuleListResult. +func (l LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerLoadBalancingRuleListResult. +func (l *LoadBalancerLoadBalancingRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerOutboundRuleListResult. +func (l LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerOutboundRuleListResult. +func (l *LoadBalancerOutboundRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerProbeListResult. +func (l LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerProbeListResult. +func (l *LoadBalancerProbeListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerPropertiesFormat. +func (l LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPools", l.BackendAddressPools) + populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) + populate(objectMap, "inboundNatPools", l.InboundNatPools) + populate(objectMap, "inboundNatRules", l.InboundNatRules) + populate(objectMap, "loadBalancingRules", l.LoadBalancingRules) + populate(objectMap, "outboundRules", l.OutboundRules) + populate(objectMap, "probes", l.Probes) + populate(objectMap, "provisioningState", l.ProvisioningState) + populate(objectMap, "resourceGuid", l.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerPropertiesFormat. +func (l *LoadBalancerPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPools": + err = unpopulate(val, "BackendAddressPools", &l.BackendAddressPools) + delete(rawMsg, key) + case "frontendIPConfigurations": + err = unpopulate(val, "FrontendIPConfigurations", &l.FrontendIPConfigurations) + delete(rawMsg, key) + case "inboundNatPools": + err = unpopulate(val, "InboundNatPools", &l.InboundNatPools) + delete(rawMsg, key) + case "inboundNatRules": + err = unpopulate(val, "InboundNatRules", &l.InboundNatRules) + delete(rawMsg, key) + case "loadBalancingRules": + err = unpopulate(val, "LoadBalancingRules", &l.LoadBalancingRules) + delete(rawMsg, key) + case "outboundRules": + err = unpopulate(val, "OutboundRules", &l.OutboundRules) + delete(rawMsg, key) + case "probes": + err = unpopulate(val, "Probes", &l.Probes) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &l.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerSKU. +func (l LoadBalancerSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", l.Name) + populate(objectMap, "tier", l.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerSKU. +func (l *LoadBalancerSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &l.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequest. +func (l LoadBalancerVipSwapRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerVipSwapRequest. +func (l *LoadBalancerVipSwapRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "frontendIPConfigurations": + err = unpopulate(val, "FrontendIPConfigurations", &l.FrontendIPConfigurations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequestFrontendIPConfiguration. +func (l LoadBalancerVipSwapRequestFrontendIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", l.ID) + populate(objectMap, "properties", l.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerVipSwapRequestFrontendIPConfiguration. +func (l *LoadBalancerVipSwapRequestFrontendIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties. +func (l LoadBalancerVipSwapRequestFrontendIPConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "publicIPAddress", l.PublicIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties. +func (l *LoadBalancerVipSwapRequestFrontendIPConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publicIPAddress": + err = unpopulate(val, "PublicIPAddress", &l.PublicIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancingRule. +func (l LoadBalancingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", l.Etag) + populate(objectMap, "id", l.ID) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingRule. +func (l *LoadBalancingRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &l.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancingRulePropertiesFormat. +func (l LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendAddressPool", l.BackendAddressPool) + populate(objectMap, "backendAddressPools", l.BackendAddressPools) + populate(objectMap, "backendPort", l.BackendPort) + populate(objectMap, "disableOutboundSnat", l.DisableOutboundSnat) + populate(objectMap, "enableFloatingIP", l.EnableFloatingIP) + populate(objectMap, "enableTcpReset", l.EnableTCPReset) + populate(objectMap, "frontendIPConfiguration", l.FrontendIPConfiguration) + populate(objectMap, "frontendPort", l.FrontendPort) + populate(objectMap, "idleTimeoutInMinutes", l.IdleTimeoutInMinutes) + populate(objectMap, "loadDistribution", l.LoadDistribution) + populate(objectMap, "probe", l.Probe) + populate(objectMap, "protocol", l.Protocol) + populate(objectMap, "provisioningState", l.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancingRulePropertiesFormat. +func (l *LoadBalancingRulePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendAddressPool": + err = unpopulate(val, "BackendAddressPool", &l.BackendAddressPool) + delete(rawMsg, key) + case "backendAddressPools": + err = unpopulate(val, "BackendAddressPools", &l.BackendAddressPools) + delete(rawMsg, key) + case "backendPort": + err = unpopulate(val, "BackendPort", &l.BackendPort) + delete(rawMsg, key) + case "disableOutboundSnat": + err = unpopulate(val, "DisableOutboundSnat", &l.DisableOutboundSnat) + delete(rawMsg, key) + case "enableFloatingIP": + err = unpopulate(val, "EnableFloatingIP", &l.EnableFloatingIP) + delete(rawMsg, key) + case "enableTcpReset": + err = unpopulate(val, "EnableTCPReset", &l.EnableTCPReset) + delete(rawMsg, key) + case "frontendIPConfiguration": + err = unpopulate(val, "FrontendIPConfiguration", &l.FrontendIPConfiguration) + delete(rawMsg, key) + case "frontendPort": + err = unpopulate(val, "FrontendPort", &l.FrontendPort) + delete(rawMsg, key) + case "idleTimeoutInMinutes": + err = unpopulate(val, "IdleTimeoutInMinutes", &l.IdleTimeoutInMinutes) + delete(rawMsg, key) + case "loadDistribution": + err = unpopulate(val, "LoadDistribution", &l.LoadDistribution) + delete(rawMsg, key) + case "probe": + err = unpopulate(val, "Probe", &l.Probe) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &l.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LocalNetworkGateway. +func (l LocalNetworkGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", l.Etag) + populate(objectMap, "id", l.ID) + populate(objectMap, "location", l.Location) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "tags", l.Tags) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LocalNetworkGateway. +func (l *LocalNetworkGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &l.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &l.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &l.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LocalNetworkGatewayListResult. +func (l LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LocalNetworkGatewayListResult. +func (l *LocalNetworkGatewayListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LocalNetworkGatewayPropertiesFormat. +func (l LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bgpSettings", l.BgpSettings) + populate(objectMap, "fqdn", l.Fqdn) + populate(objectMap, "gatewayIpAddress", l.GatewayIPAddress) + populate(objectMap, "localNetworkAddressSpace", l.LocalNetworkAddressSpace) + populate(objectMap, "provisioningState", l.ProvisioningState) + populate(objectMap, "resourceGuid", l.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LocalNetworkGatewayPropertiesFormat. +func (l *LocalNetworkGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bgpSettings": + err = unpopulate(val, "BgpSettings", &l.BgpSettings) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &l.Fqdn) + delete(rawMsg, key) + case "gatewayIpAddress": + err = unpopulate(val, "GatewayIPAddress", &l.GatewayIPAddress) + delete(rawMsg, key) + case "localNetworkAddressSpace": + err = unpopulate(val, "LocalNetworkAddressSpace", &l.LocalNetworkAddressSpace) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &l.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", l.BlobDuration) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &l.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupOverride. +func (m ManagedRuleGroupOverride) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ruleGroupName", m.RuleGroupName) + populate(objectMap, "rules", m.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleGroupOverride. +func (m *ManagedRuleGroupOverride) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ruleGroupName": + err = unpopulate(val, "RuleGroupName", &m.RuleGroupName) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &m.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleOverride. +func (m ManagedRuleOverride) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", m.Action) + populate(objectMap, "ruleId", m.RuleID) + populate(objectMap, "sensitivity", m.Sensitivity) + populate(objectMap, "state", m.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleOverride. +func (m *ManagedRuleOverride) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &m.Action) + delete(rawMsg, key) + case "ruleId": + err = unpopulate(val, "RuleID", &m.RuleID) + delete(rawMsg, key) + case "sensitivity": + err = unpopulate(val, "Sensitivity", &m.Sensitivity) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &m.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSet. +func (m ManagedRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ruleGroupOverrides", m.RuleGroupOverrides) + populate(objectMap, "ruleSetType", m.RuleSetType) + populate(objectMap, "ruleSetVersion", m.RuleSetVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRuleSet. +func (m *ManagedRuleSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ruleGroupOverrides": + err = unpopulate(val, "RuleGroupOverrides", &m.RuleGroupOverrides) + delete(rawMsg, key) + case "ruleSetType": + err = unpopulate(val, "RuleSetType", &m.RuleSetType) + delete(rawMsg, key) + case "ruleSetVersion": + err = unpopulate(val, "RuleSetVersion", &m.RuleSetVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRulesDefinition. +func (m ManagedRulesDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exceptions", m.Exceptions) + populate(objectMap, "exclusions", m.Exclusions) + populate(objectMap, "managedRuleSets", m.ManagedRuleSets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRulesDefinition. +func (m *ManagedRulesDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exceptions": + err = unpopulate(val, "Exceptions", &m.Exceptions) + delete(rawMsg, key) + case "exclusions": + err = unpopulate(val, "Exclusions", &m.Exclusions) + delete(rawMsg, key) + case "managedRuleSets": + err = unpopulate(val, "ManagedRuleSets", &m.ManagedRuleSets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Manager. +func (m Manager) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", m.Etag) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Manager. +func (m *Manager) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &m.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerCommit. +func (m ManagerCommit) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "commitId", m.CommitID) + populate(objectMap, "commitType", m.CommitType) + populate(objectMap, "configurationIds", m.ConfigurationIDs) + populate(objectMap, "targetLocations", m.TargetLocations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerCommit. +func (m *ManagerCommit) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "commitId": + err = unpopulate(val, "CommitID", &m.CommitID) + delete(rawMsg, key) + case "commitType": + err = unpopulate(val, "CommitType", &m.CommitType) + delete(rawMsg, key) + case "configurationIds": + err = unpopulate(val, "ConfigurationIDs", &m.ConfigurationIDs) + delete(rawMsg, key) + case "targetLocations": + err = unpopulate(val, "TargetLocations", &m.TargetLocations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerConnection. +func (m ManagerConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", m.Etag) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerConnection. +func (m *ManagerConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &m.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerConnectionListResult. +func (m ManagerConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerConnectionListResult. +func (m *ManagerConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerConnectionProperties. +func (m ManagerConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionState", m.ConnectionState) + populate(objectMap, "description", m.Description) + populate(objectMap, "networkManagerId", m.NetworkManagerID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerConnectionProperties. +func (m *ManagerConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionState": + err = unpopulate(val, "ConnectionState", &m.ConnectionState) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "networkManagerId": + err = unpopulate(val, "NetworkManagerID", &m.NetworkManagerID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerDeploymentStatus. +func (m ManagerDeploymentStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "commitTime", m.CommitTime) + populate(objectMap, "configurationIds", m.ConfigurationIDs) + populate(objectMap, "deploymentStatus", m.DeploymentStatus) + populate(objectMap, "deploymentType", m.DeploymentType) + populate(objectMap, "errorMessage", m.ErrorMessage) + populate(objectMap, "region", m.Region) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerDeploymentStatus. +func (m *ManagerDeploymentStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "commitTime": + err = unpopulateDateTimeRFC3339(val, "CommitTime", &m.CommitTime) + delete(rawMsg, key) + case "configurationIds": + err = unpopulate(val, "ConfigurationIDs", &m.ConfigurationIDs) + delete(rawMsg, key) + case "deploymentStatus": + err = unpopulate(val, "DeploymentStatus", &m.DeploymentStatus) + delete(rawMsg, key) + case "deploymentType": + err = unpopulate(val, "DeploymentType", &m.DeploymentType) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &m.ErrorMessage) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &m.Region) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerDeploymentStatusListResult. +func (m ManagerDeploymentStatusListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "skipToken", m.SkipToken) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerDeploymentStatusListResult. +func (m *ManagerDeploymentStatusListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "skipToken": + err = unpopulate(val, "SkipToken", &m.SkipToken) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerDeploymentStatusParameter. +func (m ManagerDeploymentStatusParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deploymentTypes", m.DeploymentTypes) + populate(objectMap, "regions", m.Regions) + populate(objectMap, "skipToken", m.SkipToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerDeploymentStatusParameter. +func (m *ManagerDeploymentStatusParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deploymentTypes": + err = unpopulate(val, "DeploymentTypes", &m.DeploymentTypes) + delete(rawMsg, key) + case "regions": + err = unpopulate(val, "Regions", &m.Regions) + delete(rawMsg, key) + case "skipToken": + err = unpopulate(val, "SkipToken", &m.SkipToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerEffectiveConnectivityConfigurationListResult. +func (m ManagerEffectiveConnectivityConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "skipToken", m.SkipToken) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerEffectiveConnectivityConfigurationListResult. +func (m *ManagerEffectiveConnectivityConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "skipToken": + err = unpopulate(val, "SkipToken", &m.SkipToken) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerEffectiveSecurityAdminRulesListResult. +func (m ManagerEffectiveSecurityAdminRulesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "skipToken", m.SkipToken) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerEffectiveSecurityAdminRulesListResult. +func (m *ManagerEffectiveSecurityAdminRulesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "skipToken": + err = unpopulate(val, "SkipToken", &m.SkipToken) + delete(rawMsg, key) + case "value": + m.Value, err = unmarshalEffectiveBaseSecurityAdminRuleClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerListResult. +func (m ManagerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerListResult. +func (m *ManagerListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerProperties. +func (m ManagerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + populate(objectMap, "networkManagerScopeAccesses", m.NetworkManagerScopeAccesses) + populate(objectMap, "networkManagerScopes", m.NetworkManagerScopes) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "resourceGuid", m.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerProperties. +func (m *ManagerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "networkManagerScopeAccesses": + err = unpopulate(val, "NetworkManagerScopeAccesses", &m.NetworkManagerScopeAccesses) + delete(rawMsg, key) + case "networkManagerScopes": + err = unpopulate(val, "NetworkManagerScopes", &m.NetworkManagerScopes) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &m.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerPropertiesNetworkManagerScopes. +func (m ManagerPropertiesNetworkManagerScopes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "crossTenantScopes", m.CrossTenantScopes) + populate(objectMap, "managementGroups", m.ManagementGroups) + populate(objectMap, "subscriptions", m.Subscriptions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerPropertiesNetworkManagerScopes. +func (m *ManagerPropertiesNetworkManagerScopes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "crossTenantScopes": + err = unpopulate(val, "CrossTenantScopes", &m.CrossTenantScopes) + delete(rawMsg, key) + case "managementGroups": + err = unpopulate(val, "ManagementGroups", &m.ManagementGroups) + delete(rawMsg, key) + case "subscriptions": + err = unpopulate(val, "Subscriptions", &m.Subscriptions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerRoutingConfiguration. +func (m ManagerRoutingConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", m.Etag) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerRoutingConfiguration. +func (m *ManagerRoutingConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &m.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerRoutingConfigurationListResult. +func (m ManagerRoutingConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerRoutingConfigurationListResult. +func (m *ManagerRoutingConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerRoutingConfigurationPropertiesFormat. +func (m ManagerRoutingConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", m.Description) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "resourceGuid", m.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerRoutingConfigurationPropertiesFormat. +func (m *ManagerRoutingConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &m.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerRoutingGroupItem. +func (m ManagerRoutingGroupItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkGroupId", m.NetworkGroupID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerRoutingGroupItem. +func (m *ManagerRoutingGroupItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkGroupId": + err = unpopulate(val, "NetworkGroupID", &m.NetworkGroupID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagerSecurityGroupItem. +func (m ManagerSecurityGroupItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkGroupId", m.NetworkGroupID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagerSecurityGroupItem. +func (m *ManagerSecurityGroupItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkGroupId": + err = unpopulate(val, "NetworkGroupID", &m.NetworkGroupID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MatchCondition. +func (m MatchCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchValues", m.MatchValues) + populate(objectMap, "matchVariables", m.MatchVariables) + populate(objectMap, "negationConditon", m.NegationConditon) + populate(objectMap, "operator", m.Operator) + populate(objectMap, "transforms", m.Transforms) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MatchCondition. +func (m *MatchCondition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchValues": + err = unpopulate(val, "MatchValues", &m.MatchValues) + delete(rawMsg, key) + case "matchVariables": + err = unpopulate(val, "MatchVariables", &m.MatchVariables) + delete(rawMsg, key) + case "negationConditon": + err = unpopulate(val, "NegationConditon", &m.NegationConditon) + delete(rawMsg, key) + case "operator": + err = unpopulate(val, "Operator", &m.Operator) + delete(rawMsg, key) + case "transforms": + err = unpopulate(val, "Transforms", &m.Transforms) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MatchVariable. +func (m MatchVariable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "selector", m.Selector) + populate(objectMap, "variableName", m.VariableName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MatchVariable. +func (m *MatchVariable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "selector": + err = unpopulate(val, "Selector", &m.Selector) + delete(rawMsg, key) + case "variableName": + err = unpopulate(val, "VariableName", &m.VariableName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MatchedRule. +func (m MatchedRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", m.Action) + populate(objectMap, "ruleName", m.RuleName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MatchedRule. +func (m *MatchedRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &m.Action) + delete(rawMsg, key) + case "ruleName": + err = unpopulate(val, "RuleName", &m.RuleName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "availabilities", m.Availabilities) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "enableRegionalMdmAccount", m.EnableRegionalMdmAccount) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "isInternal", m.IsInternal) + populate(objectMap, "metricFilterPattern", m.MetricFilterPattern) + populate(objectMap, "name", m.Name) + populate(objectMap, "resourceIdDimensionNameOverride", m.ResourceIDDimensionNameOverride) + populate(objectMap, "sourceMdmAccount", m.SourceMdmAccount) + populate(objectMap, "sourceMdmNamespace", m.SourceMdmNamespace) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "availabilities": + err = unpopulate(val, "Availabilities", &m.Availabilities) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "enableRegionalMdmAccount": + err = unpopulate(val, "EnableRegionalMdmAccount", &m.EnableRegionalMdmAccount) + delete(rawMsg, key) + case "fillGapWithZero": + err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) + delete(rawMsg, key) + case "isInternal": + err = unpopulate(val, "IsInternal", &m.IsInternal) + delete(rawMsg, key) + case "metricFilterPattern": + err = unpopulate(val, "MetricFilterPattern", &m.MetricFilterPattern) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "resourceIdDimensionNameOverride": + err = unpopulate(val, "ResourceIDDimensionNameOverride", &m.ResourceIDDimensionNameOverride) + delete(rawMsg, key) + case "sourceMdmAccount": + err = unpopulate(val, "SourceMdmAccount", &m.SourceMdmAccount) + delete(rawMsg, key) + case "sourceMdmNamespace": + err = unpopulate(val, "SourceMdmNamespace", &m.SourceMdmNamespace) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateLoadBalancerToIPBasedRequest. +func (m MigrateLoadBalancerToIPBasedRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "pools", m.Pools) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateLoadBalancerToIPBasedRequest. +func (m *MigrateLoadBalancerToIPBasedRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "pools": + err = unpopulate(val, "Pools", &m.Pools) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigratedPools. +func (m MigratedPools) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "migratedPools", m.MigratedPools) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigratedPools. +func (m *MigratedPools) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "migratedPools": + err = unpopulate(val, "MigratedPools", &m.MigratedPools) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NatGateway. +func (n NatGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", n.Etag) + populate(objectMap, "id", n.ID) + populate(objectMap, "location", n.Location) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "sku", n.SKU) + populate(objectMap, "tags", n.Tags) + populate(objectMap, "type", n.Type) + populate(objectMap, "zones", n.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NatGateway. +func (n *NatGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &n.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &n.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &n.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &n.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &n.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NatGatewayListResult. +func (n NatGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NatGatewayListResult. +func (n *NatGatewayListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &n.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NatGatewayPropertiesFormat. +func (n NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "idleTimeoutInMinutes", n.IdleTimeoutInMinutes) + populate(objectMap, "provisioningState", n.ProvisioningState) + populate(objectMap, "publicIpAddresses", n.PublicIPAddresses) + populate(objectMap, "publicIpPrefixes", n.PublicIPPrefixes) + populate(objectMap, "resourceGuid", n.ResourceGUID) + populate(objectMap, "subnets", n.Subnets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NatGatewayPropertiesFormat. +func (n *NatGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "idleTimeoutInMinutes": + err = unpopulate(val, "IdleTimeoutInMinutes", &n.IdleTimeoutInMinutes) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) + delete(rawMsg, key) + case "publicIpAddresses": + err = unpopulate(val, "PublicIPAddresses", &n.PublicIPAddresses) + delete(rawMsg, key) + case "publicIpPrefixes": + err = unpopulate(val, "PublicIPPrefixes", &n.PublicIPPrefixes) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &n.ResourceGUID) + delete(rawMsg, key) + case "subnets": + err = unpopulate(val, "Subnets", &n.Subnets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NatGatewaySKU. +func (n NatGatewaySKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", n.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NatGatewaySKU. +func (n *NatGatewaySKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NatRule. +func (n NatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", n.Description) + populate(objectMap, "destinationAddresses", n.DestinationAddresses) + populate(objectMap, "destinationPorts", n.DestinationPorts) + populate(objectMap, "ipProtocols", n.IPProtocols) + populate(objectMap, "name", n.Name) + objectMap["ruleType"] = FirewallPolicyRuleTypeNatRule + populate(objectMap, "sourceAddresses", n.SourceAddresses) + populate(objectMap, "sourceIpGroups", n.SourceIPGroups) + populate(objectMap, "translatedAddress", n.TranslatedAddress) + populate(objectMap, "translatedFqdn", n.TranslatedFqdn) + populate(objectMap, "translatedPort", n.TranslatedPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NatRule. +func (n *NatRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &n.Description) + delete(rawMsg, key) + case "destinationAddresses": + err = unpopulate(val, "DestinationAddresses", &n.DestinationAddresses) + delete(rawMsg, key) + case "destinationPorts": + err = unpopulate(val, "DestinationPorts", &n.DestinationPorts) + delete(rawMsg, key) + case "ipProtocols": + err = unpopulate(val, "IPProtocols", &n.IPProtocols) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, "RuleType", &n.RuleType) + delete(rawMsg, key) + case "sourceAddresses": + err = unpopulate(val, "SourceAddresses", &n.SourceAddresses) + delete(rawMsg, key) + case "sourceIpGroups": + err = unpopulate(val, "SourceIPGroups", &n.SourceIPGroups) + delete(rawMsg, key) + case "translatedAddress": + err = unpopulate(val, "TranslatedAddress", &n.TranslatedAddress) + delete(rawMsg, key) + case "translatedFqdn": + err = unpopulate(val, "TranslatedFqdn", &n.TranslatedFqdn) + delete(rawMsg, key) + case "translatedPort": + err = unpopulate(val, "TranslatedPort", &n.TranslatedPort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NatRulePortMapping. +func (n NatRulePortMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backendPort", n.BackendPort) + populate(objectMap, "frontendPort", n.FrontendPort) + populate(objectMap, "inboundNatRuleName", n.InboundNatRuleName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NatRulePortMapping. +func (n *NatRulePortMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backendPort": + err = unpopulate(val, "BackendPort", &n.BackendPort) + delete(rawMsg, key) + case "frontendPort": + err = unpopulate(val, "FrontendPort", &n.FrontendPort) + delete(rawMsg, key) + case "inboundNatRuleName": + err = unpopulate(val, "InboundNatRuleName", &n.InboundNatRuleName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NextHopParameters. +func (n NextHopParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationIPAddress", n.DestinationIPAddress) + populate(objectMap, "sourceIPAddress", n.SourceIPAddress) + populate(objectMap, "targetNicResourceId", n.TargetNicResourceID) + populate(objectMap, "targetResourceId", n.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NextHopParameters. +func (n *NextHopParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationIPAddress": + err = unpopulate(val, "DestinationIPAddress", &n.DestinationIPAddress) + delete(rawMsg, key) + case "sourceIPAddress": + err = unpopulate(val, "SourceIPAddress", &n.SourceIPAddress) + delete(rawMsg, key) + case "targetNicResourceId": + err = unpopulate(val, "TargetNicResourceID", &n.TargetNicResourceID) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &n.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NextHopResult. +func (n NextHopResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextHopIpAddress", n.NextHopIPAddress) + populate(objectMap, "nextHopType", n.NextHopType) + populate(objectMap, "routeTableId", n.RouteTableID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NextHopResult. +func (n *NextHopResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextHopIpAddress": + err = unpopulate(val, "NextHopIPAddress", &n.NextHopIPAddress) + delete(rawMsg, key) + case "nextHopType": + err = unpopulate(val, "NextHopType", &n.NextHopType) + delete(rawMsg, key) + case "routeTableId": + err = unpopulate(val, "RouteTableID", &n.RouteTableID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type O365BreakOutCategoryPolicies. +func (o O365BreakOutCategoryPolicies) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allow", o.Allow) + populate(objectMap, "default", o.Default) + populate(objectMap, "optimize", o.Optimize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type O365BreakOutCategoryPolicies. +func (o *O365BreakOutCategoryPolicies) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allow": + err = unpopulate(val, "Allow", &o.Allow) + delete(rawMsg, key) + case "default": + err = unpopulate(val, "Default", &o.Default) + delete(rawMsg, key) + case "optimize": + err = unpopulate(val, "Optimize", &o.Optimize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type O365PolicyProperties. +func (o O365PolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "breakOutCategories", o.BreakOutCategories) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type O365PolicyProperties. +func (o *O365PolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "breakOutCategories": + err = unpopulate(val, "BreakOutCategories", &o.BreakOutCategories) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Office365PolicyProperties. +func (o Office365PolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "breakOutCategories", o.BreakOutCategories) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Office365PolicyProperties. +func (o *Office365PolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "breakOutCategories": + err = unpopulate(val, "BreakOutCategories", &o.BreakOutCategories) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + populate(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationPropertiesFormat. +func (o OperationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationPropertiesFormat. +func (o *OperationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationPropertiesFormatServiceSpecification. +func (o OperationPropertiesFormatServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", o.LogSpecifications) + populate(objectMap, "metricSpecifications", o.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationPropertiesFormatServiceSpecification. +func (o *OperationPropertiesFormatServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &o.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &o.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OrderBy. +func (o OrderBy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "field", o.Field) + populate(objectMap, "order", o.Order) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OrderBy. +func (o *OrderBy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "field": + err = unpopulate(val, "Field", &o.Field) + delete(rawMsg, key) + case "order": + err = unpopulate(val, "Order", &o.Order) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundRule. +func (o OutboundRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", o.Etag) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundRule. +func (o *OutboundRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &o.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundRulePropertiesFormat. +func (o OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allocatedOutboundPorts", o.AllocatedOutboundPorts) + populate(objectMap, "backendAddressPool", o.BackendAddressPool) + populate(objectMap, "enableTcpReset", o.EnableTCPReset) + populate(objectMap, "frontendIPConfigurations", o.FrontendIPConfigurations) + populate(objectMap, "idleTimeoutInMinutes", o.IdleTimeoutInMinutes) + populate(objectMap, "protocol", o.Protocol) + populate(objectMap, "provisioningState", o.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutboundRulePropertiesFormat. +func (o *OutboundRulePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allocatedOutboundPorts": + err = unpopulate(val, "AllocatedOutboundPorts", &o.AllocatedOutboundPorts) + delete(rawMsg, key) + case "backendAddressPool": + err = unpopulate(val, "BackendAddressPool", &o.BackendAddressPool) + delete(rawMsg, key) + case "enableTcpReset": + err = unpopulate(val, "EnableTCPReset", &o.EnableTCPReset) + delete(rawMsg, key) + case "frontendIPConfigurations": + err = unpopulate(val, "FrontendIPConfigurations", &o.FrontendIPConfigurations) + delete(rawMsg, key) + case "idleTimeoutInMinutes": + err = unpopulate(val, "IdleTimeoutInMinutes", &o.IdleTimeoutInMinutes) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &o.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OwaspCrsExclusionEntry. +func (o OwaspCrsExclusionEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exclusionManagedRuleSets", o.ExclusionManagedRuleSets) + populate(objectMap, "matchVariable", o.MatchVariable) + populate(objectMap, "selector", o.Selector) + populate(objectMap, "selectorMatchOperator", o.SelectorMatchOperator) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OwaspCrsExclusionEntry. +func (o *OwaspCrsExclusionEntry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exclusionManagedRuleSets": + err = unpopulate(val, "ExclusionManagedRuleSets", &o.ExclusionManagedRuleSets) + delete(rawMsg, key) + case "matchVariable": + err = unpopulate(val, "MatchVariable", &o.MatchVariable) + delete(rawMsg, key) + case "selector": + err = unpopulate(val, "Selector", &o.Selector) + delete(rawMsg, key) + case "selectorMatchOperator": + err = unpopulate(val, "SelectorMatchOperator", &o.SelectorMatchOperator) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type P2SConnectionConfiguration. +func (p P2SConnectionConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type P2SConnectionConfiguration. +func (p *P2SConnectionConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type P2SConnectionConfigurationProperties. +func (p P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configurationPolicyGroupAssociations", p.ConfigurationPolicyGroupAssociations) + populate(objectMap, "enableInternetSecurity", p.EnableInternetSecurity) + populate(objectMap, "previousConfigurationPolicyGroupAssociations", p.PreviousConfigurationPolicyGroupAssociations) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "routingConfiguration", p.RoutingConfiguration) + populate(objectMap, "vpnClientAddressPool", p.VPNClientAddressPool) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type P2SConnectionConfigurationProperties. +func (p *P2SConnectionConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "configurationPolicyGroupAssociations": + err = unpopulate(val, "ConfigurationPolicyGroupAssociations", &p.ConfigurationPolicyGroupAssociations) + delete(rawMsg, key) + case "enableInternetSecurity": + err = unpopulate(val, "EnableInternetSecurity", &p.EnableInternetSecurity) + delete(rawMsg, key) + case "previousConfigurationPolicyGroupAssociations": + err = unpopulate(val, "PreviousConfigurationPolicyGroupAssociations", &p.PreviousConfigurationPolicyGroupAssociations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "routingConfiguration": + err = unpopulate(val, "RoutingConfiguration", &p.RoutingConfiguration) + delete(rawMsg, key) + case "vpnClientAddressPool": + err = unpopulate(val, "VPNClientAddressPool", &p.VPNClientAddressPool) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionHealth. +func (p P2SVPNConnectionHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sasUrl", p.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNConnectionHealth. +func (p *P2SVPNConnectionHealth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sasUrl": + err = unpopulate(val, "SasURL", &p.SasURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionHealthRequest. +func (p P2SVPNConnectionHealthRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "outputBlobSasUrl", p.OutputBlobSasURL) + populate(objectMap, "vpnUserNamesFilter", p.VPNUserNamesFilter) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNConnectionHealthRequest. +func (p *P2SVPNConnectionHealthRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "outputBlobSasUrl": + err = unpopulate(val, "OutputBlobSasURL", &p.OutputBlobSasURL) + delete(rawMsg, key) + case "vpnUserNamesFilter": + err = unpopulate(val, "VPNUserNamesFilter", &p.VPNUserNamesFilter) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionRequest. +func (p P2SVPNConnectionRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "vpnConnectionIds", p.VPNConnectionIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNConnectionRequest. +func (p *P2SVPNConnectionRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "vpnConnectionIds": + err = unpopulate(val, "VPNConnectionIDs", &p.VPNConnectionIDs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type P2SVPNGateway. +func (p P2SVPNGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNGateway. +func (p *P2SVPNGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type P2SVPNGatewayProperties. +func (p P2SVPNGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customDnsServers", p.CustomDNSServers) + populate(objectMap, "isRoutingPreferenceInternet", p.IsRoutingPreferenceInternet) + populate(objectMap, "p2SConnectionConfigurations", p.P2SConnectionConfigurations) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "vpnClientConnectionHealth", p.VPNClientConnectionHealth) + populate(objectMap, "vpnGatewayScaleUnit", p.VPNGatewayScaleUnit) + populate(objectMap, "vpnServerConfiguration", p.VPNServerConfiguration) + populate(objectMap, "virtualHub", p.VirtualHub) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNGatewayProperties. +func (p *P2SVPNGatewayProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customDnsServers": + err = unpopulate(val, "CustomDNSServers", &p.CustomDNSServers) + delete(rawMsg, key) + case "isRoutingPreferenceInternet": + err = unpopulate(val, "IsRoutingPreferenceInternet", &p.IsRoutingPreferenceInternet) + delete(rawMsg, key) + case "p2SConnectionConfigurations": + err = unpopulate(val, "P2SConnectionConfigurations", &p.P2SConnectionConfigurations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "vpnClientConnectionHealth": + err = unpopulate(val, "VPNClientConnectionHealth", &p.VPNClientConnectionHealth) + delete(rawMsg, key) + case "vpnGatewayScaleUnit": + err = unpopulate(val, "VPNGatewayScaleUnit", &p.VPNGatewayScaleUnit) + delete(rawMsg, key) + case "vpnServerConfiguration": + err = unpopulate(val, "VPNServerConfiguration", &p.VPNServerConfiguration) + delete(rawMsg, key) + case "virtualHub": + err = unpopulate(val, "VirtualHub", &p.VirtualHub) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type P2SVPNProfileParameters. +func (p P2SVPNProfileParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authenticationMethod", p.AuthenticationMethod) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type P2SVPNProfileParameters. +func (p *P2SVPNProfileParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authenticationMethod": + err = unpopulate(val, "AuthenticationMethod", &p.AuthenticationMethod) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCapture. +func (p PacketCapture) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCapture. +func (p *PacketCapture) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureFilter. +func (p PacketCaptureFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localIPAddress", p.LocalIPAddress) + populate(objectMap, "localPort", p.LocalPort) + populate(objectMap, "protocol", p.Protocol) + populate(objectMap, "remoteIPAddress", p.RemoteIPAddress) + populate(objectMap, "remotePort", p.RemotePort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureFilter. +func (p *PacketCaptureFilter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localIPAddress": + err = unpopulate(val, "LocalIPAddress", &p.LocalIPAddress) + delete(rawMsg, key) + case "localPort": + err = unpopulate(val, "LocalPort", &p.LocalPort) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &p.Protocol) + delete(rawMsg, key) + case "remoteIPAddress": + err = unpopulate(val, "RemoteIPAddress", &p.RemoteIPAddress) + delete(rawMsg, key) + case "remotePort": + err = unpopulate(val, "RemotePort", &p.RemotePort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureListResult. +func (p PacketCaptureListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureListResult. +func (p *PacketCaptureListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureMachineScope. +func (p PacketCaptureMachineScope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "exclude", p.Exclude) + populate(objectMap, "include", p.Include) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureMachineScope. +func (p *PacketCaptureMachineScope) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "exclude": + err = unpopulate(val, "Exclude", &p.Exclude) + delete(rawMsg, key) + case "include": + err = unpopulate(val, "Include", &p.Include) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureParameters. +func (p PacketCaptureParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) + populate(objectMap, "captureSettings", p.CaptureSettings) + populate(objectMap, "continuousCapture", p.ContinuousCapture) + populate(objectMap, "filters", p.Filters) + populate(objectMap, "scope", p.Scope) + populate(objectMap, "storageLocation", p.StorageLocation) + populate(objectMap, "target", p.Target) + populate(objectMap, "targetType", p.TargetType) + populate(objectMap, "timeLimitInSeconds", p.TimeLimitInSeconds) + populate(objectMap, "totalBytesPerSession", p.TotalBytesPerSession) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureParameters. +func (p *PacketCaptureParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bytesToCapturePerPacket": + err = unpopulate(val, "BytesToCapturePerPacket", &p.BytesToCapturePerPacket) + delete(rawMsg, key) + case "captureSettings": + err = unpopulate(val, "CaptureSettings", &p.CaptureSettings) + delete(rawMsg, key) + case "continuousCapture": + err = unpopulate(val, "ContinuousCapture", &p.ContinuousCapture) + delete(rawMsg, key) + case "filters": + err = unpopulate(val, "Filters", &p.Filters) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &p.Scope) + delete(rawMsg, key) + case "storageLocation": + err = unpopulate(val, "StorageLocation", &p.StorageLocation) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &p.Target) + delete(rawMsg, key) + case "targetType": + err = unpopulate(val, "TargetType", &p.TargetType) + delete(rawMsg, key) + case "timeLimitInSeconds": + err = unpopulate(val, "TimeLimitInSeconds", &p.TimeLimitInSeconds) + delete(rawMsg, key) + case "totalBytesPerSession": + err = unpopulate(val, "TotalBytesPerSession", &p.TotalBytesPerSession) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureQueryStatusResult. +func (p PacketCaptureQueryStatusResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "captureStartTime", p.CaptureStartTime) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "packetCaptureError", p.PacketCaptureError) + populate(objectMap, "packetCaptureStatus", p.PacketCaptureStatus) + populate(objectMap, "stopReason", p.StopReason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureQueryStatusResult. +func (p *PacketCaptureQueryStatusResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "captureStartTime": + err = unpopulateDateTimeRFC3339(val, "CaptureStartTime", &p.CaptureStartTime) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "packetCaptureError": + err = unpopulate(val, "PacketCaptureError", &p.PacketCaptureError) + delete(rawMsg, key) + case "packetCaptureStatus": + err = unpopulate(val, "PacketCaptureStatus", &p.PacketCaptureStatus) + delete(rawMsg, key) + case "stopReason": + err = unpopulate(val, "StopReason", &p.StopReason) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureResult. +func (p PacketCaptureResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureResult. +func (p *PacketCaptureResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureResultProperties. +func (p PacketCaptureResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) + populate(objectMap, "captureSettings", p.CaptureSettings) + populate(objectMap, "continuousCapture", p.ContinuousCapture) + populate(objectMap, "filters", p.Filters) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "scope", p.Scope) + populate(objectMap, "storageLocation", p.StorageLocation) + populate(objectMap, "target", p.Target) + populate(objectMap, "targetType", p.TargetType) + populate(objectMap, "timeLimitInSeconds", p.TimeLimitInSeconds) + populate(objectMap, "totalBytesPerSession", p.TotalBytesPerSession) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureResultProperties. +func (p *PacketCaptureResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bytesToCapturePerPacket": + err = unpopulate(val, "BytesToCapturePerPacket", &p.BytesToCapturePerPacket) + delete(rawMsg, key) + case "captureSettings": + err = unpopulate(val, "CaptureSettings", &p.CaptureSettings) + delete(rawMsg, key) + case "continuousCapture": + err = unpopulate(val, "ContinuousCapture", &p.ContinuousCapture) + delete(rawMsg, key) + case "filters": + err = unpopulate(val, "Filters", &p.Filters) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &p.Scope) + delete(rawMsg, key) + case "storageLocation": + err = unpopulate(val, "StorageLocation", &p.StorageLocation) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &p.Target) + delete(rawMsg, key) + case "targetType": + err = unpopulate(val, "TargetType", &p.TargetType) + delete(rawMsg, key) + case "timeLimitInSeconds": + err = unpopulate(val, "TimeLimitInSeconds", &p.TimeLimitInSeconds) + delete(rawMsg, key) + case "totalBytesPerSession": + err = unpopulate(val, "TotalBytesPerSession", &p.TotalBytesPerSession) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureSettings. +func (p PacketCaptureSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fileCount", p.FileCount) + populate(objectMap, "fileSizeInBytes", p.FileSizeInBytes) + populate(objectMap, "sessionTimeLimitInSeconds", p.SessionTimeLimitInSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureSettings. +func (p *PacketCaptureSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fileCount": + err = unpopulate(val, "FileCount", &p.FileCount) + delete(rawMsg, key) + case "fileSizeInBytes": + err = unpopulate(val, "FileSizeInBytes", &p.FileSizeInBytes) + delete(rawMsg, key) + case "sessionTimeLimitInSeconds": + err = unpopulate(val, "SessionTimeLimitInSeconds", &p.SessionTimeLimitInSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureStorageLocation. +func (p PacketCaptureStorageLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filePath", p.FilePath) + populate(objectMap, "localPath", p.LocalPath) + populate(objectMap, "storageId", p.StorageID) + populate(objectMap, "storagePath", p.StoragePath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureStorageLocation. +func (p *PacketCaptureStorageLocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filePath": + err = unpopulate(val, "FilePath", &p.FilePath) + delete(rawMsg, key) + case "localPath": + err = unpopulate(val, "LocalPath", &p.LocalPath) + delete(rawMsg, key) + case "storageId": + err = unpopulate(val, "StorageID", &p.StorageID) + delete(rawMsg, key) + case "storagePath": + err = unpopulate(val, "StoragePath", &p.StoragePath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Parameter. +func (p Parameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asPath", p.AsPath) + populate(objectMap, "community", p.Community) + populate(objectMap, "routePrefix", p.RoutePrefix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Parameter. +func (p *Parameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asPath": + err = unpopulate(val, "AsPath", &p.AsPath) + delete(rawMsg, key) + case "community": + err = unpopulate(val, "Community", &p.Community) + delete(rawMsg, key) + case "routePrefix": + err = unpopulate(val, "RoutePrefix", &p.RoutePrefix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartnerManagedResourceProperties. +func (p PartnerManagedResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "internalLoadBalancerId", p.InternalLoadBalancerID) + populate(objectMap, "standardLoadBalancerId", p.StandardLoadBalancerID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartnerManagedResourceProperties. +func (p *PartnerManagedResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "internalLoadBalancerId": + err = unpopulate(val, "InternalLoadBalancerID", &p.InternalLoadBalancerID) + delete(rawMsg, key) + case "standardLoadBalancerId": + err = unpopulate(val, "StandardLoadBalancerID", &p.StandardLoadBalancerID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PatchObject. +func (p PatchObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PatchObject. +func (p *PatchObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PatchRouteFilter. +func (p PatchRouteFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PatchRouteFilter. +func (p *PatchRouteFilter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PatchRouteFilterRule. +func (p PatchRouteFilterRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PatchRouteFilterRule. +func (p *PatchRouteFilterRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnection. +func (p PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PeerExpressRouteCircuitConnection. +func (p *PeerExpressRouteCircuitConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnectionListResult. +func (p PeerExpressRouteCircuitConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PeerExpressRouteCircuitConnectionListResult. +func (p *PeerExpressRouteCircuitConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnectionPropertiesFormat. +func (p PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefix", p.AddressPrefix) + populate(objectMap, "authResourceGuid", p.AuthResourceGUID) + populate(objectMap, "circuitConnectionStatus", p.CircuitConnectionStatus) + populate(objectMap, "connectionName", p.ConnectionName) + populate(objectMap, "expressRouteCircuitPeering", p.ExpressRouteCircuitPeering) + populate(objectMap, "peerExpressRouteCircuitPeering", p.PeerExpressRouteCircuitPeering) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PeerExpressRouteCircuitConnectionPropertiesFormat. +func (p *PeerExpressRouteCircuitConnectionPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &p.AddressPrefix) + delete(rawMsg, key) + case "authResourceGuid": + err = unpopulate(val, "AuthResourceGUID", &p.AuthResourceGUID) + delete(rawMsg, key) + case "circuitConnectionStatus": + err = unpopulate(val, "CircuitConnectionStatus", &p.CircuitConnectionStatus) + delete(rawMsg, key) + case "connectionName": + err = unpopulate(val, "ConnectionName", &p.ConnectionName) + delete(rawMsg, key) + case "expressRouteCircuitPeering": + err = unpopulate(val, "ExpressRouteCircuitPeering", &p.ExpressRouteCircuitPeering) + delete(rawMsg, key) + case "peerExpressRouteCircuitPeering": + err = unpopulate(val, "PeerExpressRouteCircuitPeering", &p.PeerExpressRouteCircuitPeering) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PeerRoute. +func (p PeerRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asPath", p.AsPath) + populate(objectMap, "localAddress", p.LocalAddress) + populate(objectMap, "network", p.Network) + populate(objectMap, "nextHop", p.NextHop) + populate(objectMap, "origin", p.Origin) + populate(objectMap, "sourcePeer", p.SourcePeer) + populate(objectMap, "weight", p.Weight) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PeerRoute. +func (p *PeerRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asPath": + err = unpopulate(val, "AsPath", &p.AsPath) + delete(rawMsg, key) + case "localAddress": + err = unpopulate(val, "LocalAddress", &p.LocalAddress) + delete(rawMsg, key) + case "network": + err = unpopulate(val, "Network", &p.Network) + delete(rawMsg, key) + case "nextHop": + err = unpopulate(val, "NextHop", &p.NextHop) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &p.Origin) + delete(rawMsg, key) + case "sourcePeer": + err = unpopulate(val, "SourcePeer", &p.SourcePeer) + delete(rawMsg, key) + case "weight": + err = unpopulate(val, "Weight", &p.Weight) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicySettings. +func (p PolicySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customBlockResponseBody", p.CustomBlockResponseBody) + populate(objectMap, "customBlockResponseStatusCode", p.CustomBlockResponseStatusCode) + populate(objectMap, "fileUploadEnforcement", p.FileUploadEnforcement) + populate(objectMap, "fileUploadLimitInMb", p.FileUploadLimitInMb) + populate(objectMap, "jsChallengeCookieExpirationInMins", p.JsChallengeCookieExpirationInMins) + populate(objectMap, "logScrubbing", p.LogScrubbing) + populate(objectMap, "maxRequestBodySizeInKb", p.MaxRequestBodySizeInKb) + populate(objectMap, "mode", p.Mode) + populate(objectMap, "requestBodyCheck", p.RequestBodyCheck) + populate(objectMap, "requestBodyEnforcement", p.RequestBodyEnforcement) + populate(objectMap, "requestBodyInspectLimitInKB", p.RequestBodyInspectLimitInKB) + populate(objectMap, "state", p.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicySettings. +func (p *PolicySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customBlockResponseBody": + err = unpopulate(val, "CustomBlockResponseBody", &p.CustomBlockResponseBody) + delete(rawMsg, key) + case "customBlockResponseStatusCode": + err = unpopulate(val, "CustomBlockResponseStatusCode", &p.CustomBlockResponseStatusCode) + delete(rawMsg, key) + case "fileUploadEnforcement": + err = unpopulate(val, "FileUploadEnforcement", &p.FileUploadEnforcement) + delete(rawMsg, key) + case "fileUploadLimitInMb": + err = unpopulate(val, "FileUploadLimitInMb", &p.FileUploadLimitInMb) + delete(rawMsg, key) + case "jsChallengeCookieExpirationInMins": + err = unpopulate(val, "JsChallengeCookieExpirationInMins", &p.JsChallengeCookieExpirationInMins) + delete(rawMsg, key) + case "logScrubbing": + err = unpopulate(val, "LogScrubbing", &p.LogScrubbing) + delete(rawMsg, key) + case "maxRequestBodySizeInKb": + err = unpopulate(val, "MaxRequestBodySizeInKb", &p.MaxRequestBodySizeInKb) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &p.Mode) + delete(rawMsg, key) + case "requestBodyCheck": + err = unpopulate(val, "RequestBodyCheck", &p.RequestBodyCheck) + delete(rawMsg, key) + case "requestBodyEnforcement": + err = unpopulate(val, "RequestBodyEnforcement", &p.RequestBodyEnforcement) + delete(rawMsg, key) + case "requestBodyInspectLimitInKB": + err = unpopulate(val, "RequestBodyInspectLimitInKB", &p.RequestBodyInspectLimitInKB) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicySettingsLogScrubbing. +func (p PolicySettingsLogScrubbing) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "scrubbingRules", p.ScrubbingRules) + populate(objectMap, "state", p.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicySettingsLogScrubbing. +func (p *PolicySettingsLogScrubbing) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scrubbingRules": + err = unpopulate(val, "ScrubbingRules", &p.ScrubbingRules) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PoolAssociation. +func (p PoolAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", p.AddressPrefixes) + populateDateTimeRFC3339(objectMap, "createdAt", p.CreatedAt) + populate(objectMap, "description", p.Description) + populate(objectMap, "numberOfReservedIPAddresses", p.NumberOfReservedIPAddresses) + populate(objectMap, "poolId", p.PoolID) + populateDateTimeRFC3339(objectMap, "reservationExpiresAt", p.ReservationExpiresAt) + populate(objectMap, "reservedPrefixes", p.ReservedPrefixes) + populate(objectMap, "resourceId", p.ResourceID) + populate(objectMap, "totalNumberOfIPAddresses", p.TotalNumberOfIPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PoolAssociation. +func (p *PoolAssociation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &p.AddressPrefixes) + delete(rawMsg, key) + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &p.CreatedAt) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "numberOfReservedIPAddresses": + err = unpopulate(val, "NumberOfReservedIPAddresses", &p.NumberOfReservedIPAddresses) + delete(rawMsg, key) + case "poolId": + err = unpopulate(val, "PoolID", &p.PoolID) + delete(rawMsg, key) + case "reservationExpiresAt": + err = unpopulateDateTimeRFC3339(val, "ReservationExpiresAt", &p.ReservationExpiresAt) + delete(rawMsg, key) + case "reservedPrefixes": + err = unpopulate(val, "ReservedPrefixes", &p.ReservedPrefixes) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &p.ResourceID) + delete(rawMsg, key) + case "totalNumberOfIPAddresses": + err = unpopulate(val, "TotalNumberOfIPAddresses", &p.TotalNumberOfIPAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PoolAssociationList. +func (p PoolAssociationList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PoolAssociationList. +func (p *PoolAssociationList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PoolUsage. +func (p PoolUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", p.AddressPrefixes) + populate(objectMap, "allocatedAddressPrefixes", p.AllocatedAddressPrefixes) + populate(objectMap, "availableAddressPrefixes", p.AvailableAddressPrefixes) + populate(objectMap, "childPools", p.ChildPools) + populate(objectMap, "numberOfAllocatedIPAddresses", p.NumberOfAllocatedIPAddresses) + populate(objectMap, "numberOfAvailableIPAddresses", p.NumberOfAvailableIPAddresses) + populate(objectMap, "numberOfReservedIPAddresses", p.NumberOfReservedIPAddresses) + populate(objectMap, "reservedAddressPrefixes", p.ReservedAddressPrefixes) + populate(objectMap, "totalNumberOfIPAddresses", p.TotalNumberOfIPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PoolUsage. +func (p *PoolUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &p.AddressPrefixes) + delete(rawMsg, key) + case "allocatedAddressPrefixes": + err = unpopulate(val, "AllocatedAddressPrefixes", &p.AllocatedAddressPrefixes) + delete(rawMsg, key) + case "availableAddressPrefixes": + err = unpopulate(val, "AvailableAddressPrefixes", &p.AvailableAddressPrefixes) + delete(rawMsg, key) + case "childPools": + err = unpopulate(val, "ChildPools", &p.ChildPools) + delete(rawMsg, key) + case "numberOfAllocatedIPAddresses": + err = unpopulate(val, "NumberOfAllocatedIPAddresses", &p.NumberOfAllocatedIPAddresses) + delete(rawMsg, key) + case "numberOfAvailableIPAddresses": + err = unpopulate(val, "NumberOfAvailableIPAddresses", &p.NumberOfAvailableIPAddresses) + delete(rawMsg, key) + case "numberOfReservedIPAddresses": + err = unpopulate(val, "NumberOfReservedIPAddresses", &p.NumberOfReservedIPAddresses) + delete(rawMsg, key) + case "reservedAddressPrefixes": + err = unpopulate(val, "ReservedAddressPrefixes", &p.ReservedAddressPrefixes) + delete(rawMsg, key) + case "totalNumberOfIPAddresses": + err = unpopulate(val, "TotalNumberOfIPAddresses", &p.TotalNumberOfIPAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrepareNetworkPoliciesRequest. +func (p PrepareNetworkPoliciesRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkIntentPolicyConfigurations", p.NetworkIntentPolicyConfigurations) + populate(objectMap, "serviceName", p.ServiceName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrepareNetworkPoliciesRequest. +func (p *PrepareNetworkPoliciesRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkIntentPolicyConfigurations": + err = unpopulate(val, "NetworkIntentPolicyConfigurations", &p.NetworkIntentPolicyConfigurations) + delete(rawMsg, key) + case "serviceName": + err = unpopulate(val, "ServiceName", &p.ServiceName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneConfig. +func (p PrivateDNSZoneConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateDNSZoneConfig. +func (p *PrivateDNSZoneConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroup. +func (p PrivateDNSZoneGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateDNSZoneGroup. +func (p *PrivateDNSZoneGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroupListResult. +func (p PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateDNSZoneGroupListResult. +func (p *PrivateDNSZoneGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroupPropertiesFormat. +func (p PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateDnsZoneConfigs", p.PrivateDNSZoneConfigs) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateDNSZoneGroupPropertiesFormat. +func (p *PrivateDNSZoneGroupPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateDnsZoneConfigs": + err = unpopulate(val, "PrivateDNSZoneConfigs", &p.PrivateDNSZoneConfigs) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZonePropertiesFormat. +func (p PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateDnsZoneId", p.PrivateDNSZoneID) + populate(objectMap, "recordSets", p.RecordSets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateDNSZonePropertiesFormat. +func (p *PrivateDNSZonePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateDnsZoneId": + err = unpopulate(val, "PrivateDNSZoneID", &p.PrivateDNSZoneID) + delete(rawMsg, key) + case "recordSets": + err = unpopulate(val, "RecordSets", &p.RecordSets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. +func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. +func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. +func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "linkIdentifier", p.LinkIdentifier) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateEndpointLocation", p.PrivateEndpointLocation) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "linkIdentifier": + err = unpopulate(val, "LinkIdentifier", &p.LinkIdentifier) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateEndpointLocation": + err = unpopulate(val, "PrivateEndpointLocation", &p.PrivateEndpointLocation) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointIPConfiguration. +func (p PrivateEndpointIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointIPConfiguration. +func (p *PrivateEndpointIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointIPConfigurationProperties. +func (p PrivateEndpointIPConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "memberName", p.MemberName) + populate(objectMap, "privateIPAddress", p.PrivateIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointIPConfigurationProperties. +func (p *PrivateEndpointIPConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "memberName": + err = unpopulate(val, "MemberName", &p.MemberName) + delete(rawMsg, key) + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &p.PrivateIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointListResult. +func (p PrivateEndpointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointListResult. +func (p *PrivateEndpointListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperties. +func (p PrivateEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationSecurityGroups", p.ApplicationSecurityGroups) + populate(objectMap, "customDnsConfigs", p.CustomDNSConfigs) + populate(objectMap, "customNetworkInterfaceName", p.CustomNetworkInterfaceName) + populate(objectMap, "ipConfigurations", p.IPConfigurations) + populate(objectMap, "manualPrivateLinkServiceConnections", p.ManualPrivateLinkServiceConnections) + populate(objectMap, "networkInterfaces", p.NetworkInterfaces) + populate(objectMap, "privateLinkServiceConnections", p.PrivateLinkServiceConnections) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "subnet", p.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointProperties. +func (p *PrivateEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationSecurityGroups": + err = unpopulate(val, "ApplicationSecurityGroups", &p.ApplicationSecurityGroups) + delete(rawMsg, key) + case "customDnsConfigs": + err = unpopulate(val, "CustomDNSConfigs", &p.CustomDNSConfigs) + delete(rawMsg, key) + case "customNetworkInterfaceName": + err = unpopulate(val, "CustomNetworkInterfaceName", &p.CustomNetworkInterfaceName) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &p.IPConfigurations) + delete(rawMsg, key) + case "manualPrivateLinkServiceConnections": + err = unpopulate(val, "ManualPrivateLinkServiceConnections", &p.ManualPrivateLinkServiceConnections) + delete(rawMsg, key) + case "networkInterfaces": + err = unpopulate(val, "NetworkInterfaces", &p.NetworkInterfaces) + delete(rawMsg, key) + case "privateLinkServiceConnections": + err = unpopulate(val, "PrivateLinkServiceConnections", &p.PrivateLinkServiceConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &p.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkService. +func (p PrivateLinkService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkService. +func (p *PrivateLinkService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnection. +func (p PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnection. +func (p *PrivateLinkServiceConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionProperties. +func (p PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupIds", p.GroupIDs) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "privateLinkServiceId", p.PrivateLinkServiceID) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "requestMessage", p.RequestMessage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionProperties. +func (p *PrivateLinkServiceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupIds": + err = unpopulate(val, "GroupIDs", &p.GroupIDs) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "privateLinkServiceId": + err = unpopulate(val, "PrivateLinkServiceID", &p.PrivateLinkServiceID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "requestMessage": + err = unpopulate(val, "RequestMessage", &p.RequestMessage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. +func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. +func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceIPConfiguration. +func (p PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceIPConfiguration. +func (p *PrivateLinkServiceIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceIPConfigurationProperties. +func (p PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primary", p.Primary) + populate(objectMap, "privateIPAddress", p.PrivateIPAddress) + populate(objectMap, "privateIPAddressVersion", p.PrivateIPAddressVersion) + populate(objectMap, "privateIPAllocationMethod", p.PrivateIPAllocationMethod) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "subnet", p.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceIPConfigurationProperties. +func (p *PrivateLinkServiceIPConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primary": + err = unpopulate(val, "Primary", &p.Primary) + delete(rawMsg, key) + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &p.PrivateIPAddress) + delete(rawMsg, key) + case "privateIPAddressVersion": + err = unpopulate(val, "PrivateIPAddressVersion", &p.PrivateIPAddressVersion) + delete(rawMsg, key) + case "privateIPAllocationMethod": + err = unpopulate(val, "PrivateIPAllocationMethod", &p.PrivateIPAllocationMethod) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &p.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceListResult. +func (p PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceListResult. +func (p *PrivateLinkServiceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceProperties. +func (p PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alias", p.Alias) + populate(objectMap, "autoApproval", p.AutoApproval) + populate(objectMap, "destinationIPAddress", p.DestinationIPAddress) + populate(objectMap, "enableProxyProtocol", p.EnableProxyProtocol) + populate(objectMap, "fqdns", p.Fqdns) + populate(objectMap, "ipConfigurations", p.IPConfigurations) + populate(objectMap, "loadBalancerFrontendIpConfigurations", p.LoadBalancerFrontendIPConfigurations) + populate(objectMap, "networkInterfaces", p.NetworkInterfaces) + populate(objectMap, "privateEndpointConnections", p.PrivateEndpointConnections) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "visibility", p.Visibility) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceProperties. +func (p *PrivateLinkServiceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alias": + err = unpopulate(val, "Alias", &p.Alias) + delete(rawMsg, key) + case "autoApproval": + err = unpopulate(val, "AutoApproval", &p.AutoApproval) + delete(rawMsg, key) + case "destinationIPAddress": + err = unpopulate(val, "DestinationIPAddress", &p.DestinationIPAddress) + delete(rawMsg, key) + case "enableProxyProtocol": + err = unpopulate(val, "EnableProxyProtocol", &p.EnableProxyProtocol) + delete(rawMsg, key) + case "fqdns": + err = unpopulate(val, "Fqdns", &p.Fqdns) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &p.IPConfigurations) + delete(rawMsg, key) + case "loadBalancerFrontendIpConfigurations": + err = unpopulate(val, "LoadBalancerFrontendIPConfigurations", &p.LoadBalancerFrontendIPConfigurations) + delete(rawMsg, key) + case "networkInterfaces": + err = unpopulate(val, "NetworkInterfaces", &p.NetworkInterfaces) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &p.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "visibility": + err = unpopulate(val, "Visibility", &p.Visibility) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServicePropertiesAutoApproval. +func (p PrivateLinkServicePropertiesAutoApproval) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "subscriptions", p.Subscriptions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServicePropertiesAutoApproval. +func (p *PrivateLinkServicePropertiesAutoApproval) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "subscriptions": + err = unpopulate(val, "Subscriptions", &p.Subscriptions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServicePropertiesVisibility. +func (p PrivateLinkServicePropertiesVisibility) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "subscriptions", p.Subscriptions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServicePropertiesVisibility. +func (p *PrivateLinkServicePropertiesVisibility) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "subscriptions": + err = unpopulate(val, "Subscriptions", &p.Subscriptions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceVisibility. +func (p PrivateLinkServiceVisibility) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "visible", p.Visible) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceVisibility. +func (p *PrivateLinkServiceVisibility) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "visible": + err = unpopulate(val, "Visible", &p.Visible) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Probe. +func (p Probe) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Probe. +func (p *Probe) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProbePropertiesFormat. +func (p ProbePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "intervalInSeconds", p.IntervalInSeconds) + populate(objectMap, "loadBalancingRules", p.LoadBalancingRules) + populate(objectMap, "noHealthyBackendsBehavior", p.NoHealthyBackendsBehavior) + populate(objectMap, "numberOfProbes", p.NumberOfProbes) + populate(objectMap, "port", p.Port) + populate(objectMap, "probeThreshold", p.ProbeThreshold) + populate(objectMap, "protocol", p.Protocol) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "requestPath", p.RequestPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProbePropertiesFormat. +func (p *ProbePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "intervalInSeconds": + err = unpopulate(val, "IntervalInSeconds", &p.IntervalInSeconds) + delete(rawMsg, key) + case "loadBalancingRules": + err = unpopulate(val, "LoadBalancingRules", &p.LoadBalancingRules) + delete(rawMsg, key) + case "noHealthyBackendsBehavior": + err = unpopulate(val, "NoHealthyBackendsBehavior", &p.NoHealthyBackendsBehavior) + delete(rawMsg, key) + case "numberOfProbes": + err = unpopulate(val, "NumberOfProbes", &p.NumberOfProbes) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &p.Port) + delete(rawMsg, key) + case "probeThreshold": + err = unpopulate(val, "ProbeThreshold", &p.ProbeThreshold) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &p.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "requestPath": + err = unpopulate(val, "RequestPath", &p.RequestPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Profile. +func (p Profile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Profile. +func (p *Profile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProfileListResult. +func (p ProfileListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProfileListResult. +func (p *ProfileListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProfilePropertiesFormat. +func (p ProfilePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerNetworkInterfaceConfigurations", p.ContainerNetworkInterfaceConfigurations) + populate(objectMap, "containerNetworkInterfaces", p.ContainerNetworkInterfaces) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "resourceGuid", p.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProfilePropertiesFormat. +func (p *ProfilePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerNetworkInterfaceConfigurations": + err = unpopulate(val, "ContainerNetworkInterfaceConfigurations", &p.ContainerNetworkInterfaceConfigurations) + delete(rawMsg, key) + case "containerNetworkInterfaces": + err = unpopulate(val, "ContainerNetworkInterfaces", &p.ContainerNetworkInterfaces) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &p.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PropagatedRouteTable. +func (p PropagatedRouteTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ids", p.IDs) + populate(objectMap, "labels", p.Labels) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PropagatedRouteTable. +func (p *PropagatedRouteTable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ids": + err = unpopulate(val, "IDs", &p.IDs) + delete(rawMsg, key) + case "labels": + err = unpopulate(val, "Labels", &p.Labels) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtocolConfiguration. +func (p ProtocolConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "HTTPConfiguration", p.HTTPConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtocolConfiguration. +func (p *ProtocolConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "HTTPConfiguration": + err = unpopulate(val, "HTTPConfiguration", &p.HTTPConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPAddress. +func (p PublicIPAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + populate(objectMap, "zones", p.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddress. +func (p *PublicIPAddress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &p.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressDNSSettings. +func (p PublicIPAddressDNSSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "domainNameLabel", p.DomainNameLabel) + populate(objectMap, "domainNameLabelScope", p.DomainNameLabelScope) + populate(objectMap, "fqdn", p.Fqdn) + populate(objectMap, "reverseFqdn", p.ReverseFqdn) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddressDNSSettings. +func (p *PublicIPAddressDNSSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domainNameLabel": + err = unpopulate(val, "DomainNameLabel", &p.DomainNameLabel) + delete(rawMsg, key) + case "domainNameLabelScope": + err = unpopulate(val, "DomainNameLabelScope", &p.DomainNameLabelScope) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &p.Fqdn) + delete(rawMsg, key) + case "reverseFqdn": + err = unpopulate(val, "ReverseFqdn", &p.ReverseFqdn) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressListResult. +func (p PublicIPAddressListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddressListResult. +func (p *PublicIPAddressListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressPropertiesFormat. +func (p PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dnsSettings", p.DNSSettings) + populate(objectMap, "ddosSettings", p.DdosSettings) + populate(objectMap, "deleteOption", p.DeleteOption) + populate(objectMap, "ipAddress", p.IPAddress) + populate(objectMap, "ipConfiguration", p.IPConfiguration) + populate(objectMap, "ipTags", p.IPTags) + populate(objectMap, "idleTimeoutInMinutes", p.IdleTimeoutInMinutes) + populate(objectMap, "linkedPublicIPAddress", p.LinkedPublicIPAddress) + populate(objectMap, "migrationPhase", p.MigrationPhase) + populate(objectMap, "natGateway", p.NatGateway) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "publicIPAddressVersion", p.PublicIPAddressVersion) + populate(objectMap, "publicIPAllocationMethod", p.PublicIPAllocationMethod) + populate(objectMap, "publicIPPrefix", p.PublicIPPrefix) + populate(objectMap, "resourceGuid", p.ResourceGUID) + populate(objectMap, "servicePublicIPAddress", p.ServicePublicIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddressPropertiesFormat. +func (p *PublicIPAddressPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dnsSettings": + err = unpopulate(val, "DNSSettings", &p.DNSSettings) + delete(rawMsg, key) + case "ddosSettings": + err = unpopulate(val, "DdosSettings", &p.DdosSettings) + delete(rawMsg, key) + case "deleteOption": + err = unpopulate(val, "DeleteOption", &p.DeleteOption) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &p.IPAddress) + delete(rawMsg, key) + case "ipConfiguration": + err = unpopulate(val, "IPConfiguration", &p.IPConfiguration) + delete(rawMsg, key) + case "ipTags": + err = unpopulate(val, "IPTags", &p.IPTags) + delete(rawMsg, key) + case "idleTimeoutInMinutes": + err = unpopulate(val, "IdleTimeoutInMinutes", &p.IdleTimeoutInMinutes) + delete(rawMsg, key) + case "linkedPublicIPAddress": + err = unpopulate(val, "LinkedPublicIPAddress", &p.LinkedPublicIPAddress) + delete(rawMsg, key) + case "migrationPhase": + err = unpopulate(val, "MigrationPhase", &p.MigrationPhase) + delete(rawMsg, key) + case "natGateway": + err = unpopulate(val, "NatGateway", &p.NatGateway) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddressVersion": + err = unpopulate(val, "PublicIPAddressVersion", &p.PublicIPAddressVersion) + delete(rawMsg, key) + case "publicIPAllocationMethod": + err = unpopulate(val, "PublicIPAllocationMethod", &p.PublicIPAllocationMethod) + delete(rawMsg, key) + case "publicIPPrefix": + err = unpopulate(val, "PublicIPPrefix", &p.PublicIPPrefix) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &p.ResourceGUID) + delete(rawMsg, key) + case "servicePublicIPAddress": + err = unpopulate(val, "ServicePublicIPAddress", &p.ServicePublicIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressSKU. +func (p PublicIPAddressSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", p.Name) + populate(objectMap, "tier", p.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddressSKU. +func (p *PublicIPAddressSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &p.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPDdosProtectionStatusResult. +func (p PublicIPDdosProtectionStatusResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ddosProtectionPlanId", p.DdosProtectionPlanID) + populate(objectMap, "isWorkloadProtected", p.IsWorkloadProtected) + populate(objectMap, "publicIpAddress", p.PublicIPAddress) + populate(objectMap, "publicIpAddressId", p.PublicIPAddressID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPDdosProtectionStatusResult. +func (p *PublicIPDdosProtectionStatusResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ddosProtectionPlanId": + err = unpopulate(val, "DdosProtectionPlanID", &p.DdosProtectionPlanID) + delete(rawMsg, key) + case "isWorkloadProtected": + err = unpopulate(val, "IsWorkloadProtected", &p.IsWorkloadProtected) + delete(rawMsg, key) + case "publicIpAddress": + err = unpopulate(val, "PublicIPAddress", &p.PublicIPAddress) + delete(rawMsg, key) + case "publicIpAddressId": + err = unpopulate(val, "PublicIPAddressID", &p.PublicIPAddressID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefix. +func (p PublicIPPrefix) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + populate(objectMap, "zones", p.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPPrefix. +func (p *PublicIPPrefix) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &p.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixListResult. +func (p PublicIPPrefixListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPPrefixListResult. +func (p *PublicIPPrefixListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixPropertiesFormat. +func (p PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customIPPrefix", p.CustomIPPrefix) + populate(objectMap, "ipPrefix", p.IPPrefix) + populate(objectMap, "ipTags", p.IPTags) + populate(objectMap, "loadBalancerFrontendIpConfiguration", p.LoadBalancerFrontendIPConfiguration) + populate(objectMap, "natGateway", p.NatGateway) + populate(objectMap, "prefixLength", p.PrefixLength) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "publicIPAddressVersion", p.PublicIPAddressVersion) + populate(objectMap, "publicIPAddresses", p.PublicIPAddresses) + populate(objectMap, "resourceGuid", p.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPPrefixPropertiesFormat. +func (p *PublicIPPrefixPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customIPPrefix": + err = unpopulate(val, "CustomIPPrefix", &p.CustomIPPrefix) + delete(rawMsg, key) + case "ipPrefix": + err = unpopulate(val, "IPPrefix", &p.IPPrefix) + delete(rawMsg, key) + case "ipTags": + err = unpopulate(val, "IPTags", &p.IPTags) + delete(rawMsg, key) + case "loadBalancerFrontendIpConfiguration": + err = unpopulate(val, "LoadBalancerFrontendIPConfiguration", &p.LoadBalancerFrontendIPConfiguration) + delete(rawMsg, key) + case "natGateway": + err = unpopulate(val, "NatGateway", &p.NatGateway) + delete(rawMsg, key) + case "prefixLength": + err = unpopulate(val, "PrefixLength", &p.PrefixLength) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddressVersion": + err = unpopulate(val, "PublicIPAddressVersion", &p.PublicIPAddressVersion) + delete(rawMsg, key) + case "publicIPAddresses": + err = unpopulate(val, "PublicIPAddresses", &p.PublicIPAddresses) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &p.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixSKU. +func (p PublicIPPrefixSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", p.Name) + populate(objectMap, "tier", p.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPPrefixSKU. +func (p *PublicIPPrefixSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &p.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QosDefinition. +func (q QosDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationIpRanges", q.DestinationIPRanges) + populate(objectMap, "destinationPortRanges", q.DestinationPortRanges) + populate(objectMap, "markings", q.Markings) + populate(objectMap, "protocol", q.Protocol) + populate(objectMap, "sourceIpRanges", q.SourceIPRanges) + populate(objectMap, "sourcePortRanges", q.SourcePortRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QosDefinition. +func (q *QosDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationIpRanges": + err = unpopulate(val, "DestinationIPRanges", &q.DestinationIPRanges) + delete(rawMsg, key) + case "destinationPortRanges": + err = unpopulate(val, "DestinationPortRanges", &q.DestinationPortRanges) + delete(rawMsg, key) + case "markings": + err = unpopulate(val, "Markings", &q.Markings) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &q.Protocol) + delete(rawMsg, key) + case "sourceIpRanges": + err = unpopulate(val, "SourceIPRanges", &q.SourceIPRanges) + delete(rawMsg, key) + case "sourcePortRanges": + err = unpopulate(val, "SourcePortRanges", &q.SourcePortRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QosIPRange. +func (q QosIPRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endIP", q.EndIP) + populate(objectMap, "startIP", q.StartIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QosIPRange. +func (q *QosIPRange) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endIP": + err = unpopulate(val, "EndIP", &q.EndIP) + delete(rawMsg, key) + case "startIP": + err = unpopulate(val, "StartIP", &q.StartIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QosPortRange. +func (q QosPortRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "end", q.End) + populate(objectMap, "start", q.Start) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QosPortRange. +func (q *QosPortRange) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "end": + err = unpopulate(val, "End", &q.End) + delete(rawMsg, key) + case "start": + err = unpopulate(val, "Start", &q.Start) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryInboundNatRulePortMappingRequest. +func (q QueryInboundNatRulePortMappingRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddress", q.IPAddress) + populate(objectMap, "ipConfiguration", q.IPConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryInboundNatRulePortMappingRequest. +func (q *QueryInboundNatRulePortMappingRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddress": + err = unpopulate(val, "IPAddress", &q.IPAddress) + delete(rawMsg, key) + case "ipConfiguration": + err = unpopulate(val, "IPConfiguration", &q.IPConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryRequestOptions. +func (q QueryRequestOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "skipToken", q.SkipToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryRequestOptions. +func (q *QueryRequestOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "skipToken": + err = unpopulate(val, "SkipToken", &q.SkipToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryResults. +func (q QueryResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchingRecordsCount", q.MatchingRecordsCount) + populate(objectMap, "signatures", q.Signatures) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryResults. +func (q *QueryResults) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchingRecordsCount": + err = unpopulate(val, "MatchingRecordsCount", &q.MatchingRecordsCount) + delete(rawMsg, key) + case "signatures": + err = unpopulate(val, "Signatures", &q.Signatures) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QueryTroubleshootingParameters. +func (q QueryTroubleshootingParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetResourceId", q.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueryTroubleshootingParameters. +func (q *QueryTroubleshootingParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &q.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RadiusServer. +func (r RadiusServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "radiusServerAddress", r.RadiusServerAddress) + populate(objectMap, "radiusServerScore", r.RadiusServerScore) + populate(objectMap, "radiusServerSecret", r.RadiusServerSecret) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RadiusServer. +func (r *RadiusServer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "radiusServerAddress": + err = unpopulate(val, "RadiusServerAddress", &r.RadiusServerAddress) + delete(rawMsg, key) + case "radiusServerScore": + err = unpopulate(val, "RadiusServerScore", &r.RadiusServerScore) + delete(rawMsg, key) + case "radiusServerSecret": + err = unpopulate(val, "RadiusServerSecret", &r.RadiusServerSecret) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReachabilityAnalysisIntent. +func (r ReachabilityAnalysisIntent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReachabilityAnalysisIntent. +func (r *ReachabilityAnalysisIntent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReachabilityAnalysisIntentListResult. +func (r ReachabilityAnalysisIntentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReachabilityAnalysisIntentListResult. +func (r *ReachabilityAnalysisIntentListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReachabilityAnalysisIntentProperties. +func (r ReachabilityAnalysisIntentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "destinationResourceId", r.DestinationResourceID) + populate(objectMap, "ipTraffic", r.IPTraffic) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "sourceResourceId", r.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReachabilityAnalysisIntentProperties. +func (r *ReachabilityAnalysisIntentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "destinationResourceId": + err = unpopulate(val, "DestinationResourceID", &r.DestinationResourceID) + delete(rawMsg, key) + case "ipTraffic": + err = unpopulate(val, "IPTraffic", &r.IPTraffic) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &r.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReachabilityAnalysisRun. +func (r ReachabilityAnalysisRun) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReachabilityAnalysisRun. +func (r *ReachabilityAnalysisRun) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReachabilityAnalysisRunListResult. +func (r ReachabilityAnalysisRunListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReachabilityAnalysisRunListResult. +func (r *ReachabilityAnalysisRunListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReachabilityAnalysisRunProperties. +func (r ReachabilityAnalysisRunProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "analysisResult", r.AnalysisResult) + populate(objectMap, "description", r.Description) + populate(objectMap, "errorMessage", r.ErrorMessage) + populate(objectMap, "intentContent", r.IntentContent) + populate(objectMap, "intentId", r.IntentID) + populate(objectMap, "provisioningState", r.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReachabilityAnalysisRunProperties. +func (r *ReachabilityAnalysisRunProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "analysisResult": + err = unpopulate(val, "AnalysisResult", &r.AnalysisResult) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &r.ErrorMessage) + delete(rawMsg, key) + case "intentContent": + err = unpopulate(val, "IntentContent", &r.IntentContent) + delete(rawMsg, key) + case "intentId": + err = unpopulate(val, "IntentID", &r.IntentID) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecordSet. +func (r RecordSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fqdn", r.Fqdn) + populate(objectMap, "ipAddresses", r.IPAddresses) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "recordSetName", r.RecordSetName) + populate(objectMap, "recordType", r.RecordType) + populate(objectMap, "ttl", r.TTL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecordSet. +func (r *RecordSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fqdn": + err = unpopulate(val, "Fqdn", &r.Fqdn) + delete(rawMsg, key) + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &r.IPAddresses) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "recordSetName": + err = unpopulate(val, "RecordSetName", &r.RecordSetName) + delete(rawMsg, key) + case "recordType": + err = unpopulate(val, "RecordType", &r.RecordType) + delete(rawMsg, key) + case "ttl": + err = unpopulate(val, "TTL", &r.TTL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReferencedPublicIPAddress. +func (r ReferencedPublicIPAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReferencedPublicIPAddress. +func (r *ReferencedPublicIPAddress) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceBasics. +func (r ResourceBasics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", r.AddressPrefixes) + populate(objectMap, "resourceId", r.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceBasics. +func (r *ResourceBasics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &r.AddressPrefixes) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &r.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLink. +func (r ResourceNavigationLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNavigationLink. +func (r *ResourceNavigationLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLinkFormat. +func (r ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "link", r.Link) + populate(objectMap, "linkedResourceType", r.LinkedResourceType) + populate(objectMap, "provisioningState", r.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNavigationLinkFormat. +func (r *ResourceNavigationLinkFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "link": + err = unpopulate(val, "Link", &r.Link) + delete(rawMsg, key) + case "linkedResourceType": + err = unpopulate(val, "LinkedResourceType", &r.LinkedResourceType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLinksListResult. +func (r ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceNavigationLinksListResult. +func (r *ResourceNavigationLinksListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSet. +func (r ResourceSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "subscriptions", r.Subscriptions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSet. +func (r *ResourceSet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "subscriptions": + err = unpopulate(val, "Subscriptions", &r.Subscriptions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RetentionPolicyParameters. +func (r RetentionPolicyParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "days", r.Days) + populate(objectMap, "enabled", r.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RetentionPolicyParameters. +func (r *RetentionPolicyParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "days": + err = unpopulate(val, "Days", &r.Days) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &r.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Route. +func (r Route) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Route. +func (r *Route) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilter. +func (r RouteFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilter. +func (r *RouteFilter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilterListResult. +func (r RouteFilterListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilterListResult. +func (r *RouteFilterListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilterPropertiesFormat. +func (r RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipv6Peerings", r.IPv6Peerings) + populate(objectMap, "peerings", r.Peerings) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "rules", r.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilterPropertiesFormat. +func (r *RouteFilterPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipv6Peerings": + err = unpopulate(val, "IPv6Peerings", &r.IPv6Peerings) + delete(rawMsg, key) + case "peerings": + err = unpopulate(val, "Peerings", &r.Peerings) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &r.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilterRule. +func (r RouteFilterRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilterRule. +func (r *RouteFilterRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilterRuleListResult. +func (r RouteFilterRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilterRuleListResult. +func (r *RouteFilterRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilterRulePropertiesFormat. +func (r RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "access", r.Access) + populate(objectMap, "communities", r.Communities) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "routeFilterRuleType", r.RouteFilterRuleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteFilterRulePropertiesFormat. +func (r *RouteFilterRulePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "access": + err = unpopulate(val, "Access", &r.Access) + delete(rawMsg, key) + case "communities": + err = unpopulate(val, "Communities", &r.Communities) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "routeFilterRuleType": + err = unpopulate(val, "RouteFilterRuleType", &r.RouteFilterRuleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteListResult. +func (r RouteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteListResult. +func (r *RouteListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteMap. +func (r RouteMap) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteMap. +func (r *RouteMap) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteMapProperties. +func (r RouteMapProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "associatedInboundConnections", r.AssociatedInboundConnections) + populate(objectMap, "associatedOutboundConnections", r.AssociatedOutboundConnections) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "rules", r.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteMapProperties. +func (r *RouteMapProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "associatedInboundConnections": + err = unpopulate(val, "AssociatedInboundConnections", &r.AssociatedInboundConnections) + delete(rawMsg, key) + case "associatedOutboundConnections": + err = unpopulate(val, "AssociatedOutboundConnections", &r.AssociatedOutboundConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &r.Rules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteMapRule. +func (r RouteMapRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actions", r.Actions) + populate(objectMap, "matchCriteria", r.MatchCriteria) + populate(objectMap, "name", r.Name) + populate(objectMap, "nextStepIfMatched", r.NextStepIfMatched) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteMapRule. +func (r *RouteMapRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actions": + err = unpopulate(val, "Actions", &r.Actions) + delete(rawMsg, key) + case "matchCriteria": + err = unpopulate(val, "MatchCriteria", &r.MatchCriteria) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "nextStepIfMatched": + err = unpopulate(val, "NextStepIfMatched", &r.NextStepIfMatched) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutePropertiesFormat. +func (r RoutePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefix", r.AddressPrefix) + populate(objectMap, "hasBgpOverride", r.HasBgpOverride) + populate(objectMap, "nextHopIpAddress", r.NextHopIPAddress) + populate(objectMap, "nextHopType", r.NextHopType) + populate(objectMap, "provisioningState", r.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutePropertiesFormat. +func (r *RoutePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &r.AddressPrefix) + delete(rawMsg, key) + case "hasBgpOverride": + err = unpopulate(val, "HasBgpOverride", &r.HasBgpOverride) + delete(rawMsg, key) + case "nextHopIpAddress": + err = unpopulate(val, "NextHopIPAddress", &r.NextHopIPAddress) + delete(rawMsg, key) + case "nextHopType": + err = unpopulate(val, "NextHopType", &r.NextHopType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteTable. +func (r RouteTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteTable. +func (r *RouteTable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteTableListResult. +func (r RouteTableListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteTableListResult. +func (r *RouteTableListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RouteTablePropertiesFormat. +func (r RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disableBgpRoutePropagation", r.DisableBgpRoutePropagation) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "resourceGuid", r.ResourceGUID) + populate(objectMap, "routes", r.Routes) + populate(objectMap, "subnets", r.Subnets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RouteTablePropertiesFormat. +func (r *RouteTablePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disableBgpRoutePropagation": + err = unpopulate(val, "DisableBgpRoutePropagation", &r.DisableBgpRoutePropagation) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &r.ResourceGUID) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &r.Routes) + delete(rawMsg, key) + case "subnets": + err = unpopulate(val, "Subnets", &r.Subnets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingConfiguration. +func (r RoutingConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "associatedRouteTable", r.AssociatedRouteTable) + populate(objectMap, "inboundRouteMap", r.InboundRouteMap) + populate(objectMap, "outboundRouteMap", r.OutboundRouteMap) + populate(objectMap, "propagatedRouteTables", r.PropagatedRouteTables) + populate(objectMap, "vnetRoutes", r.VnetRoutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingConfiguration. +func (r *RoutingConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "associatedRouteTable": + err = unpopulate(val, "AssociatedRouteTable", &r.AssociatedRouteTable) + delete(rawMsg, key) + case "inboundRouteMap": + err = unpopulate(val, "InboundRouteMap", &r.InboundRouteMap) + delete(rawMsg, key) + case "outboundRouteMap": + err = unpopulate(val, "OutboundRouteMap", &r.OutboundRouteMap) + delete(rawMsg, key) + case "propagatedRouteTables": + err = unpopulate(val, "PropagatedRouteTables", &r.PropagatedRouteTables) + delete(rawMsg, key) + case "vnetRoutes": + err = unpopulate(val, "VnetRoutes", &r.VnetRoutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingIntent. +func (r RoutingIntent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingIntent. +func (r *RoutingIntent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingIntentProperties. +func (r RoutingIntentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "routingPolicies", r.RoutingPolicies) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingIntentProperties. +func (r *RoutingIntentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "routingPolicies": + err = unpopulate(val, "RoutingPolicies", &r.RoutingPolicies) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingPolicy. +func (r RoutingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinations", r.Destinations) + populate(objectMap, "name", r.Name) + populate(objectMap, "nextHop", r.NextHop) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingPolicy. +func (r *RoutingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinations": + err = unpopulate(val, "Destinations", &r.Destinations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "nextHop": + err = unpopulate(val, "NextHop", &r.NextHop) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingRule. +func (r RoutingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRule. +func (r *RoutingRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingRuleCollection. +func (r RoutingRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleCollection. +func (r *RoutingRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &r.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingRuleCollectionListResult. +func (r RoutingRuleCollectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleCollectionListResult. +func (r *RoutingRuleCollectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingRuleCollectionPropertiesFormat. +func (r RoutingRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appliesTo", r.AppliesTo) + populate(objectMap, "description", r.Description) + populate(objectMap, "disableBgpRoutePropagation", r.DisableBgpRoutePropagation) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "resourceGuid", r.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleCollectionPropertiesFormat. +func (r *RoutingRuleCollectionPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appliesTo": + err = unpopulate(val, "AppliesTo", &r.AppliesTo) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "disableBgpRoutePropagation": + err = unpopulate(val, "DisableBgpRoutePropagation", &r.DisableBgpRoutePropagation) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &r.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingRuleListResult. +func (r RoutingRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleListResult. +func (r *RoutingRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingRuleNextHop. +func (r RoutingRuleNextHop) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextHopAddress", r.NextHopAddress) + populate(objectMap, "nextHopType", r.NextHopType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleNextHop. +func (r *RoutingRuleNextHop) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextHopAddress": + err = unpopulate(val, "NextHopAddress", &r.NextHopAddress) + delete(rawMsg, key) + case "nextHopType": + err = unpopulate(val, "NextHopType", &r.NextHopType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingRulePropertiesFormat. +func (r RoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "destination", r.Destination) + populate(objectMap, "nextHop", r.NextHop) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "resourceGuid", r.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRulePropertiesFormat. +func (r *RoutingRulePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "destination": + err = unpopulate(val, "Destination", &r.Destination) + delete(rawMsg, key) + case "nextHop": + err = unpopulate(val, "NextHop", &r.NextHop) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &r.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingRuleRouteDestination. +func (r RoutingRuleRouteDestination) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationAddress", r.DestinationAddress) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RoutingRuleRouteDestination. +func (r *RoutingRuleRouteDestination) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationAddress": + err = unpopulate(val, "DestinationAddress", &r.DestinationAddress) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Rule. +func (r Rule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "destinationAddresses", r.DestinationAddresses) + populate(objectMap, "destinationFqdns", r.DestinationFqdns) + populate(objectMap, "destinationIpGroups", r.DestinationIPGroups) + populate(objectMap, "destinationPorts", r.DestinationPorts) + populate(objectMap, "ipProtocols", r.IPProtocols) + populate(objectMap, "name", r.Name) + objectMap["ruleType"] = FirewallPolicyRuleTypeNetworkRule + populate(objectMap, "sourceAddresses", r.SourceAddresses) + populate(objectMap, "sourceIpGroups", r.SourceIPGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Rule. +func (r *Rule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "destinationAddresses": + err = unpopulate(val, "DestinationAddresses", &r.DestinationAddresses) + delete(rawMsg, key) + case "destinationFqdns": + err = unpopulate(val, "DestinationFqdns", &r.DestinationFqdns) + delete(rawMsg, key) + case "destinationIpGroups": + err = unpopulate(val, "DestinationIPGroups", &r.DestinationIPGroups) + delete(rawMsg, key) + case "destinationPorts": + err = unpopulate(val, "DestinationPorts", &r.DestinationPorts) + delete(rawMsg, key) + case "ipProtocols": + err = unpopulate(val, "IPProtocols", &r.IPProtocols) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, "RuleType", &r.RuleType) + delete(rawMsg, key) + case "sourceAddresses": + err = unpopulate(val, "SourceAddresses", &r.SourceAddresses) + delete(rawMsg, key) + case "sourceIpGroups": + err = unpopulate(val, "SourceIPGroups", &r.SourceIPGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKU. +func (s SKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. +func (s *SKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScopeConnection. +func (s ScopeConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScopeConnection. +func (s *ScopeConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScopeConnectionListResult. +func (s ScopeConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScopeConnectionListResult. +func (s *ScopeConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScopeConnectionProperties. +func (s ScopeConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionState", s.ConnectionState) + populate(objectMap, "description", s.Description) + populate(objectMap, "resourceId", s.ResourceID) + populate(objectMap, "tenantId", s.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScopeConnectionProperties. +func (s *ScopeConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionState": + err = unpopulate(val, "ConnectionState", &s.ConnectionState) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &s.ResourceID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &s.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityAdminConfiguration. +func (s SecurityAdminConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAdminConfiguration. +func (s *SecurityAdminConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityAdminConfigurationListResult. +func (s SecurityAdminConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAdminConfigurationListResult. +func (s *SecurityAdminConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityAdminConfigurationPropertiesFormat. +func (s SecurityAdminConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applyOnNetworkIntentPolicyBasedServices", s.ApplyOnNetworkIntentPolicyBasedServices) + populate(objectMap, "description", s.Description) + populate(objectMap, "networkGroupAddressSpaceAggregationOption", s.NetworkGroupAddressSpaceAggregationOption) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "resourceGuid", s.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAdminConfigurationPropertiesFormat. +func (s *SecurityAdminConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applyOnNetworkIntentPolicyBasedServices": + err = unpopulate(val, "ApplyOnNetworkIntentPolicyBasedServices", &s.ApplyOnNetworkIntentPolicyBasedServices) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "networkGroupAddressSpaceAggregationOption": + err = unpopulate(val, "NetworkGroupAddressSpaceAggregationOption", &s.NetworkGroupAddressSpaceAggregationOption) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &s.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroup. +func (s SecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroup. +func (s *SecurityGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroupListResult. +func (s SecurityGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupListResult. +func (s *SecurityGroupListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroupNetworkInterface. +func (s SecurityGroupNetworkInterface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "securityRuleAssociations", s.SecurityRuleAssociations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupNetworkInterface. +func (s *SecurityGroupNetworkInterface) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "securityRuleAssociations": + err = unpopulate(val, "SecurityRuleAssociations", &s.SecurityRuleAssociations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroupPropertiesFormat. +func (s SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultSecurityRules", s.DefaultSecurityRules) + populate(objectMap, "flowLogs", s.FlowLogs) + populate(objectMap, "flushConnection", s.FlushConnection) + populate(objectMap, "networkInterfaces", s.NetworkInterfaces) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "resourceGuid", s.ResourceGUID) + populate(objectMap, "securityRules", s.SecurityRules) + populate(objectMap, "subnets", s.Subnets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupPropertiesFormat. +func (s *SecurityGroupPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultSecurityRules": + err = unpopulate(val, "DefaultSecurityRules", &s.DefaultSecurityRules) + delete(rawMsg, key) + case "flowLogs": + err = unpopulate(val, "FlowLogs", &s.FlowLogs) + delete(rawMsg, key) + case "flushConnection": + err = unpopulate(val, "FlushConnection", &s.FlushConnection) + delete(rawMsg, key) + case "networkInterfaces": + err = unpopulate(val, "NetworkInterfaces", &s.NetworkInterfaces) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &s.ResourceGUID) + delete(rawMsg, key) + case "securityRules": + err = unpopulate(val, "SecurityRules", &s.SecurityRules) + delete(rawMsg, key) + case "subnets": + err = unpopulate(val, "Subnets", &s.Subnets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroupResult. +func (s SecurityGroupResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "evaluatedNetworkSecurityGroups", s.EvaluatedNetworkSecurityGroups) + populate(objectMap, "securityRuleAccessResult", s.SecurityRuleAccessResult) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupResult. +func (s *SecurityGroupResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "evaluatedNetworkSecurityGroups": + err = unpopulate(val, "EvaluatedNetworkSecurityGroups", &s.EvaluatedNetworkSecurityGroups) + delete(rawMsg, key) + case "securityRuleAccessResult": + err = unpopulate(val, "SecurityRuleAccessResult", &s.SecurityRuleAccessResult) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroupViewParameters. +func (s SecurityGroupViewParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetResourceId", s.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupViewParameters. +func (s *SecurityGroupViewParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &s.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroupViewResult. +func (s SecurityGroupViewResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkInterfaces", s.NetworkInterfaces) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityGroupViewResult. +func (s *SecurityGroupViewResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkInterfaces": + err = unpopulate(val, "NetworkInterfaces", &s.NetworkInterfaces) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProvider. +func (s SecurityPartnerProvider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPartnerProvider. +func (s *SecurityPartnerProvider) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProviderListResult. +func (s SecurityPartnerProviderListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPartnerProviderListResult. +func (s *SecurityPartnerProviderListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProviderPropertiesFormat. +func (s SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionStatus", s.ConnectionStatus) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "securityProviderName", s.SecurityProviderName) + populate(objectMap, "virtualHub", s.VirtualHub) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPartnerProviderPropertiesFormat. +func (s *SecurityPartnerProviderPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionStatus": + err = unpopulate(val, "ConnectionStatus", &s.ConnectionStatus) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "securityProviderName": + err = unpopulate(val, "SecurityProviderName", &s.SecurityProviderName) + delete(rawMsg, key) + case "virtualHub": + err = unpopulate(val, "VirtualHub", &s.VirtualHub) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityRule. +func (s SecurityRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityRule. +func (s *SecurityRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityRuleAssociations. +func (s SecurityRuleAssociations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultSecurityRules", s.DefaultSecurityRules) + populate(objectMap, "effectiveSecurityRules", s.EffectiveSecurityRules) + populate(objectMap, "networkInterfaceAssociation", s.NetworkInterfaceAssociation) + populate(objectMap, "subnetAssociation", s.SubnetAssociation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityRuleAssociations. +func (s *SecurityRuleAssociations) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultSecurityRules": + err = unpopulate(val, "DefaultSecurityRules", &s.DefaultSecurityRules) + delete(rawMsg, key) + case "effectiveSecurityRules": + err = unpopulate(val, "EffectiveSecurityRules", &s.EffectiveSecurityRules) + delete(rawMsg, key) + case "networkInterfaceAssociation": + err = unpopulate(val, "NetworkInterfaceAssociation", &s.NetworkInterfaceAssociation) + delete(rawMsg, key) + case "subnetAssociation": + err = unpopulate(val, "SubnetAssociation", &s.SubnetAssociation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityRuleListResult. +func (s SecurityRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityRuleListResult. +func (s *SecurityRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityRulePropertiesFormat. +func (s SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "access", s.Access) + populate(objectMap, "description", s.Description) + populate(objectMap, "destinationAddressPrefix", s.DestinationAddressPrefix) + populate(objectMap, "destinationAddressPrefixes", s.DestinationAddressPrefixes) + populate(objectMap, "destinationApplicationSecurityGroups", s.DestinationApplicationSecurityGroups) + populate(objectMap, "destinationPortRange", s.DestinationPortRange) + populate(objectMap, "destinationPortRanges", s.DestinationPortRanges) + populate(objectMap, "direction", s.Direction) + populate(objectMap, "priority", s.Priority) + populate(objectMap, "protocol", s.Protocol) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "sourceAddressPrefix", s.SourceAddressPrefix) + populate(objectMap, "sourceAddressPrefixes", s.SourceAddressPrefixes) + populate(objectMap, "sourceApplicationSecurityGroups", s.SourceApplicationSecurityGroups) + populate(objectMap, "sourcePortRange", s.SourcePortRange) + populate(objectMap, "sourcePortRanges", s.SourcePortRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityRulePropertiesFormat. +func (s *SecurityRulePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "access": + err = unpopulate(val, "Access", &s.Access) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "destinationAddressPrefix": + err = unpopulate(val, "DestinationAddressPrefix", &s.DestinationAddressPrefix) + delete(rawMsg, key) + case "destinationAddressPrefixes": + err = unpopulate(val, "DestinationAddressPrefixes", &s.DestinationAddressPrefixes) + delete(rawMsg, key) + case "destinationApplicationSecurityGroups": + err = unpopulate(val, "DestinationApplicationSecurityGroups", &s.DestinationApplicationSecurityGroups) + delete(rawMsg, key) + case "destinationPortRange": + err = unpopulate(val, "DestinationPortRange", &s.DestinationPortRange) + delete(rawMsg, key) + case "destinationPortRanges": + err = unpopulate(val, "DestinationPortRanges", &s.DestinationPortRanges) + delete(rawMsg, key) + case "direction": + err = unpopulate(val, "Direction", &s.Direction) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &s.Priority) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &s.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "sourceAddressPrefix": + err = unpopulate(val, "SourceAddressPrefix", &s.SourceAddressPrefix) + delete(rawMsg, key) + case "sourceAddressPrefixes": + err = unpopulate(val, "SourceAddressPrefixes", &s.SourceAddressPrefixes) + delete(rawMsg, key) + case "sourceApplicationSecurityGroups": + err = unpopulate(val, "SourceApplicationSecurityGroups", &s.SourceApplicationSecurityGroups) + delete(rawMsg, key) + case "sourcePortRange": + err = unpopulate(val, "SourcePortRange", &s.SourcePortRange) + delete(rawMsg, key) + case "sourcePortRanges": + err = unpopulate(val, "SourcePortRanges", &s.SourcePortRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityRulesEvaluationResult. +func (s SecurityRulesEvaluationResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationMatched", s.DestinationMatched) + populate(objectMap, "destinationPortMatched", s.DestinationPortMatched) + populate(objectMap, "name", s.Name) + populate(objectMap, "protocolMatched", s.ProtocolMatched) + populate(objectMap, "sourceMatched", s.SourceMatched) + populate(objectMap, "sourcePortMatched", s.SourcePortMatched) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityRulesEvaluationResult. +func (s *SecurityRulesEvaluationResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationMatched": + err = unpopulate(val, "DestinationMatched", &s.DestinationMatched) + delete(rawMsg, key) + case "destinationPortMatched": + err = unpopulate(val, "DestinationPortMatched", &s.DestinationPortMatched) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "protocolMatched": + err = unpopulate(val, "ProtocolMatched", &s.ProtocolMatched) + delete(rawMsg, key) + case "sourceMatched": + err = unpopulate(val, "SourceMatched", &s.SourceMatched) + delete(rawMsg, key) + case "sourcePortMatched": + err = unpopulate(val, "SourcePortMatched", &s.SourcePortMatched) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityUserConfiguration. +func (s SecurityUserConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityUserConfiguration. +func (s *SecurityUserConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityUserConfigurationListResult. +func (s SecurityUserConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityUserConfigurationListResult. +func (s *SecurityUserConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityUserConfigurationPropertiesFormat. +func (s SecurityUserConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "resourceGuid", s.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityUserConfigurationPropertiesFormat. +func (s *SecurityUserConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &s.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityUserGroupItem. +func (s SecurityUserGroupItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkGroupId", s.NetworkGroupID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityUserGroupItem. +func (s *SecurityUserGroupItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkGroupId": + err = unpopulate(val, "NetworkGroupID", &s.NetworkGroupID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityUserRule. +func (s SecurityUserRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityUserRule. +func (s *SecurityUserRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityUserRuleCollection. +func (s SecurityUserRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityUserRuleCollection. +func (s *SecurityUserRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityUserRuleCollectionListResult. +func (s SecurityUserRuleCollectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityUserRuleCollectionListResult. +func (s *SecurityUserRuleCollectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityUserRuleCollectionPropertiesFormat. +func (s SecurityUserRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appliesToGroups", s.AppliesToGroups) + populate(objectMap, "description", s.Description) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "resourceGuid", s.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityUserRuleCollectionPropertiesFormat. +func (s *SecurityUserRuleCollectionPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appliesToGroups": + err = unpopulate(val, "AppliesToGroups", &s.AppliesToGroups) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &s.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityUserRuleListResult. +func (s SecurityUserRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityUserRuleListResult. +func (s *SecurityUserRuleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityUserRulePropertiesFormat. +func (s SecurityUserRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "destinationPortRanges", s.DestinationPortRanges) + populate(objectMap, "destinations", s.Destinations) + populate(objectMap, "direction", s.Direction) + populate(objectMap, "protocol", s.Protocol) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "resourceGuid", s.ResourceGUID) + populate(objectMap, "sourcePortRanges", s.SourcePortRanges) + populate(objectMap, "sources", s.Sources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityUserRulePropertiesFormat. +func (s *SecurityUserRulePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "destinationPortRanges": + err = unpopulate(val, "DestinationPortRanges", &s.DestinationPortRanges) + delete(rawMsg, key) + case "destinations": + err = unpopulate(val, "Destinations", &s.Destinations) + delete(rawMsg, key) + case "direction": + err = unpopulate(val, "Direction", &s.Direction) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &s.Protocol) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &s.ResourceGUID) + delete(rawMsg, key) + case "sourcePortRanges": + err = unpopulate(val, "SourcePortRanges", &s.SourcePortRanges) + delete(rawMsg, key) + case "sources": + err = unpopulate(val, "Sources", &s.Sources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLink. +func (s ServiceAssociationLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceAssociationLink. +func (s *ServiceAssociationLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLinkPropertiesFormat. +func (s ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowDelete", s.AllowDelete) + populate(objectMap, "link", s.Link) + populate(objectMap, "linkedResourceType", s.LinkedResourceType) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "provisioningState", s.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceAssociationLinkPropertiesFormat. +func (s *ServiceAssociationLinkPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowDelete": + err = unpopulate(val, "AllowDelete", &s.AllowDelete) + delete(rawMsg, key) + case "link": + err = unpopulate(val, "Link", &s.Link) + delete(rawMsg, key) + case "linkedResourceType": + err = unpopulate(val, "LinkedResourceType", &s.LinkedResourceType) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &s.Locations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLinksListResult. +func (s ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceAssociationLinksListResult. +func (s *ServiceAssociationLinksListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceDelegationPropertiesFormat. +func (s ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actions", s.Actions) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "serviceName", s.ServiceName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceDelegationPropertiesFormat. +func (s *ServiceDelegationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actions": + err = unpopulate(val, "Actions", &s.Actions) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "serviceName": + err = unpopulate(val, "ServiceName", &s.ServiceName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicy. +func (s ServiceEndpointPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicy. +func (s *ServiceEndpointPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &s.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinition. +func (s ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicyDefinition. +func (s *ServiceEndpointPolicyDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinitionListResult. +func (s ServiceEndpointPolicyDefinitionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicyDefinitionListResult. +func (s *ServiceEndpointPolicyDefinitionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinitionPropertiesFormat. +func (s ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "service", s.Service) + populate(objectMap, "serviceResources", s.ServiceResources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicyDefinitionPropertiesFormat. +func (s *ServiceEndpointPolicyDefinitionPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "service": + err = unpopulate(val, "Service", &s.Service) + delete(rawMsg, key) + case "serviceResources": + err = unpopulate(val, "ServiceResources", &s.ServiceResources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyListResult. +func (s ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicyListResult. +func (s *ServiceEndpointPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyPropertiesFormat. +func (s ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contextualServiceEndpointPolicies", s.ContextualServiceEndpointPolicies) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "resourceGuid", s.ResourceGUID) + populate(objectMap, "serviceAlias", s.ServiceAlias) + populate(objectMap, "serviceEndpointPolicyDefinitions", s.ServiceEndpointPolicyDefinitions) + populate(objectMap, "subnets", s.Subnets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPolicyPropertiesFormat. +func (s *ServiceEndpointPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contextualServiceEndpointPolicies": + err = unpopulate(val, "ContextualServiceEndpointPolicies", &s.ContextualServiceEndpointPolicies) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &s.ResourceGUID) + delete(rawMsg, key) + case "serviceAlias": + err = unpopulate(val, "ServiceAlias", &s.ServiceAlias) + delete(rawMsg, key) + case "serviceEndpointPolicyDefinitions": + err = unpopulate(val, "ServiceEndpointPolicyDefinitions", &s.ServiceEndpointPolicyDefinitions) + delete(rawMsg, key) + case "subnets": + err = unpopulate(val, "Subnets", &s.Subnets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPropertiesFormat. +func (s ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "networkIdentifier", s.NetworkIdentifier) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "service", s.Service) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceEndpointPropertiesFormat. +func (s *ServiceEndpointPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "locations": + err = unpopulate(val, "Locations", &s.Locations) + delete(rawMsg, key) + case "networkIdentifier": + err = unpopulate(val, "NetworkIdentifier", &s.NetworkIdentifier) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "service": + err = unpopulate(val, "Service", &s.Service) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceTagInformation. +func (s ServiceTagInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "serviceTagChangeNumber", s.ServiceTagChangeNumber) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTagInformation. +func (s *ServiceTagInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "serviceTagChangeNumber": + err = unpopulate(val, "ServiceTagChangeNumber", &s.ServiceTagChangeNumber) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceTagInformationListResult. +func (s ServiceTagInformationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTagInformationListResult. +func (s *ServiceTagInformationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceTagInformationPropertiesFormat. +func (s ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", s.AddressPrefixes) + populate(objectMap, "changeNumber", s.ChangeNumber) + populate(objectMap, "region", s.Region) + populate(objectMap, "state", s.State) + populate(objectMap, "systemService", s.SystemService) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTagInformationPropertiesFormat. +func (s *ServiceTagInformationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &s.AddressPrefixes) + delete(rawMsg, key) + case "changeNumber": + err = unpopulate(val, "ChangeNumber", &s.ChangeNumber) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &s.Region) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "systemService": + err = unpopulate(val, "SystemService", &s.SystemService) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceTagsListResult. +func (s ServiceTagsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "changeNumber", s.ChangeNumber) + populate(objectMap, "cloud", s.Cloud) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "type", s.Type) + populate(objectMap, "values", s.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceTagsListResult. +func (s *ServiceTagsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "changeNumber": + err = unpopulate(val, "ChangeNumber", &s.ChangeNumber) + delete(rawMsg, key) + case "cloud": + err = unpopulate(val, "Cloud", &s.Cloud) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &s.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SessionIDs. +func (s SessionIDs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sessionIds", s.SessionIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SessionIDs. +func (s *SessionIDs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sessionIds": + err = unpopulate(val, "SessionIDs", &s.SessionIDs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SharedKeyProperties. +func (s SharedKeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "sharedKey", s.SharedKey) + populate(objectMap, "sharedKeyLength", s.SharedKeyLength) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SharedKeyProperties. +func (s *SharedKeyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "sharedKey": + err = unpopulate(val, "SharedKey", &s.SharedKey) + delete(rawMsg, key) + case "sharedKeyLength": + err = unpopulate(val, "SharedKeyLength", &s.SharedKeyLength) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SignatureOverridesFilterValuesQuery. +func (s SignatureOverridesFilterValuesQuery) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filterName", s.FilterName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SignatureOverridesFilterValuesQuery. +func (s *SignatureOverridesFilterValuesQuery) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filterName": + err = unpopulate(val, "FilterName", &s.FilterName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SignatureOverridesFilterValuesResponse. +func (s SignatureOverridesFilterValuesResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filterValues", s.FilterValues) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SignatureOverridesFilterValuesResponse. +func (s *SignatureOverridesFilterValuesResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filterValues": + err = unpopulate(val, "FilterValues", &s.FilterValues) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SignaturesOverrides. +func (s SignaturesOverrides) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SignaturesOverrides. +func (s *SignaturesOverrides) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SignaturesOverridesList. +func (s SignaturesOverridesList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SignaturesOverridesList. +func (s *SignaturesOverridesList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SignaturesOverridesProperties. +func (s SignaturesOverridesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "signatures", s.Signatures) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SignaturesOverridesProperties. +func (s *SignaturesOverridesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "signatures": + err = unpopulate(val, "Signatures", &s.Signatures) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SingleQueryResult. +func (s SingleQueryResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", s.Description) + populate(objectMap, "destinationPorts", s.DestinationPorts) + populate(objectMap, "direction", s.Direction) + populate(objectMap, "group", s.Group) + populate(objectMap, "inheritedFromParentPolicy", s.InheritedFromParentPolicy) + populate(objectMap, "lastUpdated", s.LastUpdated) + populate(objectMap, "mode", s.Mode) + populate(objectMap, "protocol", s.Protocol) + populate(objectMap, "severity", s.Severity) + populate(objectMap, "signatureId", s.SignatureID) + populate(objectMap, "sourcePorts", s.SourcePorts) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SingleQueryResult. +func (s *SingleQueryResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "destinationPorts": + err = unpopulate(val, "DestinationPorts", &s.DestinationPorts) + delete(rawMsg, key) + case "direction": + err = unpopulate(val, "Direction", &s.Direction) + delete(rawMsg, key) + case "group": + err = unpopulate(val, "Group", &s.Group) + delete(rawMsg, key) + case "inheritedFromParentPolicy": + err = unpopulate(val, "InheritedFromParentPolicy", &s.InheritedFromParentPolicy) + delete(rawMsg, key) + case "lastUpdated": + err = unpopulate(val, "LastUpdated", &s.LastUpdated) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &s.Mode) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &s.Protocol) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &s.Severity) + delete(rawMsg, key) + case "signatureId": + err = unpopulate(val, "SignatureID", &s.SignatureID) + delete(rawMsg, key) + case "sourcePorts": + err = unpopulate(val, "SourcePorts", &s.SourcePorts) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticCidr. +func (s StaticCidr) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticCidr. +func (s *StaticCidr) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticCidrList. +func (s StaticCidrList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticCidrList. +func (s *StaticCidrList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticCidrProperties. +func (s StaticCidrProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", s.AddressPrefixes) + populate(objectMap, "description", s.Description) + populate(objectMap, "numberOfIPAddressesToAllocate", s.NumberOfIPAddressesToAllocate) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "totalNumberOfIPAddresses", s.TotalNumberOfIPAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticCidrProperties. +func (s *StaticCidrProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &s.AddressPrefixes) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "numberOfIPAddressesToAllocate": + err = unpopulate(val, "NumberOfIPAddressesToAllocate", &s.NumberOfIPAddressesToAllocate) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "totalNumberOfIPAddresses": + err = unpopulate(val, "TotalNumberOfIPAddresses", &s.TotalNumberOfIPAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticMember. +func (s StaticMember) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticMember. +func (s *StaticMember) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticMemberListResult. +func (s StaticMemberListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticMemberListResult. +func (s *StaticMemberListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticMemberProperties. +func (s StaticMemberProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "region", s.Region) + populate(objectMap, "resourceId", s.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticMemberProperties. +func (s *StaticMemberProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &s.Region) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &s.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticRoute. +func (s StaticRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", s.AddressPrefixes) + populate(objectMap, "name", s.Name) + populate(objectMap, "nextHopIpAddress", s.NextHopIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticRoute. +func (s *StaticRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &s.AddressPrefixes) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "nextHopIpAddress": + err = unpopulate(val, "NextHopIPAddress", &s.NextHopIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StaticRoutesConfig. +func (s StaticRoutesConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "propagateStaticRoutes", s.PropagateStaticRoutes) + populate(objectMap, "vnetLocalRouteOverrideCriteria", s.VnetLocalRouteOverrideCriteria) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StaticRoutesConfig. +func (s *StaticRoutesConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "propagateStaticRoutes": + err = unpopulate(val, "PropagateStaticRoutes", &s.PropagateStaticRoutes) + delete(rawMsg, key) + case "vnetLocalRouteOverrideCriteria": + err = unpopulate(val, "VnetLocalRouteOverrideCriteria", &s.VnetLocalRouteOverrideCriteria) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubResource. +func (s SubResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubResource. +func (s *SubResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Subnet. +func (s Subnet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Subnet. +func (s *Subnet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &s.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubnetAssociation. +func (s SubnetAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "securityRules", s.SecurityRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubnetAssociation. +func (s *SubnetAssociation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "securityRules": + err = unpopulate(val, "SecurityRules", &s.SecurityRules) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubnetListResult. +func (s SubnetListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubnetListResult. +func (s *SubnetListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubnetPropertiesFormat. +func (s SubnetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefix", s.AddressPrefix) + populate(objectMap, "addressPrefixes", s.AddressPrefixes) + populate(objectMap, "applicationGatewayIPConfigurations", s.ApplicationGatewayIPConfigurations) + populate(objectMap, "defaultOutboundAccess", s.DefaultOutboundAccess) + populate(objectMap, "delegations", s.Delegations) + populate(objectMap, "ipAllocations", s.IPAllocations) + populate(objectMap, "ipConfigurationProfiles", s.IPConfigurationProfiles) + populate(objectMap, "ipConfigurations", s.IPConfigurations) + populate(objectMap, "ipamPoolPrefixAllocations", s.IpamPoolPrefixAllocations) + populate(objectMap, "natGateway", s.NatGateway) + populate(objectMap, "networkSecurityGroup", s.NetworkSecurityGroup) + populate(objectMap, "privateEndpointNetworkPolicies", s.PrivateEndpointNetworkPolicies) + populate(objectMap, "privateEndpoints", s.PrivateEndpoints) + populate(objectMap, "privateLinkServiceNetworkPolicies", s.PrivateLinkServiceNetworkPolicies) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "purpose", s.Purpose) + populate(objectMap, "resourceNavigationLinks", s.ResourceNavigationLinks) + populate(objectMap, "routeTable", s.RouteTable) + populate(objectMap, "serviceAssociationLinks", s.ServiceAssociationLinks) + populate(objectMap, "serviceEndpointPolicies", s.ServiceEndpointPolicies) + populate(objectMap, "serviceEndpoints", s.ServiceEndpoints) + populate(objectMap, "sharingScope", s.SharingScope) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubnetPropertiesFormat. +func (s *SubnetPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &s.AddressPrefix) + delete(rawMsg, key) + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &s.AddressPrefixes) + delete(rawMsg, key) + case "applicationGatewayIPConfigurations": + err = unpopulate(val, "ApplicationGatewayIPConfigurations", &s.ApplicationGatewayIPConfigurations) + delete(rawMsg, key) + case "defaultOutboundAccess": + err = unpopulate(val, "DefaultOutboundAccess", &s.DefaultOutboundAccess) + delete(rawMsg, key) + case "delegations": + err = unpopulate(val, "Delegations", &s.Delegations) + delete(rawMsg, key) + case "ipAllocations": + err = unpopulate(val, "IPAllocations", &s.IPAllocations) + delete(rawMsg, key) + case "ipConfigurationProfiles": + err = unpopulate(val, "IPConfigurationProfiles", &s.IPConfigurationProfiles) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &s.IPConfigurations) + delete(rawMsg, key) + case "ipamPoolPrefixAllocations": + err = unpopulate(val, "IpamPoolPrefixAllocations", &s.IpamPoolPrefixAllocations) + delete(rawMsg, key) + case "natGateway": + err = unpopulate(val, "NatGateway", &s.NatGateway) + delete(rawMsg, key) + case "networkSecurityGroup": + err = unpopulate(val, "NetworkSecurityGroup", &s.NetworkSecurityGroup) + delete(rawMsg, key) + case "privateEndpointNetworkPolicies": + err = unpopulate(val, "PrivateEndpointNetworkPolicies", &s.PrivateEndpointNetworkPolicies) + delete(rawMsg, key) + case "privateEndpoints": + err = unpopulate(val, "PrivateEndpoints", &s.PrivateEndpoints) + delete(rawMsg, key) + case "privateLinkServiceNetworkPolicies": + err = unpopulate(val, "PrivateLinkServiceNetworkPolicies", &s.PrivateLinkServiceNetworkPolicies) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "purpose": + err = unpopulate(val, "Purpose", &s.Purpose) + delete(rawMsg, key) + case "resourceNavigationLinks": + err = unpopulate(val, "ResourceNavigationLinks", &s.ResourceNavigationLinks) + delete(rawMsg, key) + case "routeTable": + err = unpopulate(val, "RouteTable", &s.RouteTable) + delete(rawMsg, key) + case "serviceAssociationLinks": + err = unpopulate(val, "ServiceAssociationLinks", &s.ServiceAssociationLinks) + delete(rawMsg, key) + case "serviceEndpointPolicies": + err = unpopulate(val, "ServiceEndpointPolicies", &s.ServiceEndpointPolicies) + delete(rawMsg, key) + case "serviceEndpoints": + err = unpopulate(val, "ServiceEndpoints", &s.ServiceEndpoints) + delete(rawMsg, key) + case "sharingScope": + err = unpopulate(val, "SharingScope", &s.SharingScope) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwapResource. +func (s SwapResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwapResource. +func (s *SwapResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwapResourceListResult. +func (s SwapResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwapResourceListResult. +func (s *SwapResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwapResourceProperties. +func (s SwapResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "slotType", s.SlotType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwapResourceProperties. +func (s *SwapResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "slotType": + err = unpopulate(val, "SlotType", &s.SlotType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TagsObject. +func (t TagsObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tags", t.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TagsObject. +func (t *TagsObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &t.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Topology. +func (t Topology) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdDateTime", t.CreatedDateTime) + populate(objectMap, "id", t.ID) + populateDateTimeRFC3339(objectMap, "lastModified", t.LastModified) + populate(objectMap, "resources", t.Resources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Topology. +func (t *Topology) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdDateTime": + err = unpopulateDateTimeRFC3339(val, "CreatedDateTime", &t.CreatedDateTime) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "lastModified": + err = unpopulateDateTimeRFC3339(val, "LastModified", &t.LastModified) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &t.Resources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopologyAssociation. +func (t TopologyAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "associationType", t.AssociationType) + populate(objectMap, "name", t.Name) + populate(objectMap, "resourceId", t.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopologyAssociation. +func (t *TopologyAssociation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "associationType": + err = unpopulate(val, "AssociationType", &t.AssociationType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &t.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopologyParameters. +func (t TopologyParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetResourceGroupName", t.TargetResourceGroupName) + populate(objectMap, "targetSubnet", t.TargetSubnet) + populate(objectMap, "targetVirtualNetwork", t.TargetVirtualNetwork) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopologyParameters. +func (t *TopologyParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &t.TargetResourceGroupName) + delete(rawMsg, key) + case "targetSubnet": + err = unpopulate(val, "TargetSubnet", &t.TargetSubnet) + delete(rawMsg, key) + case "targetVirtualNetwork": + err = unpopulate(val, "TargetVirtualNetwork", &t.TargetVirtualNetwork) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopologyResource. +func (t TopologyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "associations", t.Associations) + populate(objectMap, "id", t.ID) + populate(objectMap, "location", t.Location) + populate(objectMap, "name", t.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TopologyResource. +func (t *TopologyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "associations": + err = unpopulate(val, "Associations", &t.Associations) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &t.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrafficAnalyticsConfigurationProperties. +func (t TrafficAnalyticsConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", t.Enabled) + populate(objectMap, "trafficAnalyticsInterval", t.TrafficAnalyticsInterval) + populate(objectMap, "workspaceId", t.WorkspaceID) + populate(objectMap, "workspaceRegion", t.WorkspaceRegion) + populate(objectMap, "workspaceResourceId", t.WorkspaceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrafficAnalyticsConfigurationProperties. +func (t *TrafficAnalyticsConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &t.Enabled) + delete(rawMsg, key) + case "trafficAnalyticsInterval": + err = unpopulate(val, "TrafficAnalyticsInterval", &t.TrafficAnalyticsInterval) + delete(rawMsg, key) + case "workspaceId": + err = unpopulate(val, "WorkspaceID", &t.WorkspaceID) + delete(rawMsg, key) + case "workspaceRegion": + err = unpopulate(val, "WorkspaceRegion", &t.WorkspaceRegion) + delete(rawMsg, key) + case "workspaceResourceId": + err = unpopulate(val, "WorkspaceResourceID", &t.WorkspaceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrafficAnalyticsProperties. +func (t TrafficAnalyticsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkWatcherFlowAnalyticsConfiguration", t.NetworkWatcherFlowAnalyticsConfiguration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrafficAnalyticsProperties. +func (t *TrafficAnalyticsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkWatcherFlowAnalyticsConfiguration": + err = unpopulate(val, "NetworkWatcherFlowAnalyticsConfiguration", &t.NetworkWatcherFlowAnalyticsConfiguration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrafficSelectorPolicy. +func (t TrafficSelectorPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localAddressRanges", t.LocalAddressRanges) + populate(objectMap, "remoteAddressRanges", t.RemoteAddressRanges) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrafficSelectorPolicy. +func (t *TrafficSelectorPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localAddressRanges": + err = unpopulate(val, "LocalAddressRanges", &t.LocalAddressRanges) + delete(rawMsg, key) + case "remoteAddressRanges": + err = unpopulate(val, "RemoteAddressRanges", &t.RemoteAddressRanges) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TroubleshootingDetails. +func (t TroubleshootingDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "detail", t.Detail) + populate(objectMap, "id", t.ID) + populate(objectMap, "reasonType", t.ReasonType) + populate(objectMap, "recommendedActions", t.RecommendedActions) + populate(objectMap, "summary", t.Summary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingDetails. +func (t *TroubleshootingDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "detail": + err = unpopulate(val, "Detail", &t.Detail) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "reasonType": + err = unpopulate(val, "ReasonType", &t.ReasonType) + delete(rawMsg, key) + case "recommendedActions": + err = unpopulate(val, "RecommendedActions", &t.RecommendedActions) + delete(rawMsg, key) + case "summary": + err = unpopulate(val, "Summary", &t.Summary) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TroubleshootingParameters. +func (t TroubleshootingParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "targetResourceId", t.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingParameters. +func (t *TroubleshootingParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &t.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TroubleshootingProperties. +func (t TroubleshootingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "storageId", t.StorageID) + populate(objectMap, "storagePath", t.StoragePath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingProperties. +func (t *TroubleshootingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "storageId": + err = unpopulate(val, "StorageID", &t.StorageID) + delete(rawMsg, key) + case "storagePath": + err = unpopulate(val, "StoragePath", &t.StoragePath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TroubleshootingRecommendedActions. +func (t TroubleshootingRecommendedActions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionId", t.ActionID) + populate(objectMap, "actionText", t.ActionText) + populate(objectMap, "actionUri", t.ActionURI) + populate(objectMap, "actionUriText", t.ActionURIText) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingRecommendedActions. +func (t *TroubleshootingRecommendedActions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionId": + err = unpopulate(val, "ActionID", &t.ActionID) + delete(rawMsg, key) + case "actionText": + err = unpopulate(val, "ActionText", &t.ActionText) + delete(rawMsg, key) + case "actionUri": + err = unpopulate(val, "ActionURI", &t.ActionURI) + delete(rawMsg, key) + case "actionUriText": + err = unpopulate(val, "ActionURIText", &t.ActionURIText) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TroubleshootingResult. +func (t TroubleshootingResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", t.Code) + populateDateTimeRFC3339(objectMap, "endTime", t.EndTime) + populate(objectMap, "results", t.Results) + populateDateTimeRFC3339(objectMap, "startTime", t.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingResult. +func (t *TroubleshootingResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &t.Code) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &t.EndTime) + delete(rawMsg, key) + case "results": + err = unpopulate(val, "Results", &t.Results) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &t.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TunnelConnectionHealth. +func (t TunnelConnectionHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionStatus", t.ConnectionStatus) + populate(objectMap, "egressBytesTransferred", t.EgressBytesTransferred) + populate(objectMap, "ingressBytesTransferred", t.IngressBytesTransferred) + populate(objectMap, "lastConnectionEstablishedUtcTime", t.LastConnectionEstablishedUTCTime) + populate(objectMap, "tunnel", t.Tunnel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TunnelConnectionHealth. +func (t *TunnelConnectionHealth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionStatus": + err = unpopulate(val, "ConnectionStatus", &t.ConnectionStatus) + delete(rawMsg, key) + case "egressBytesTransferred": + err = unpopulate(val, "EgressBytesTransferred", &t.EgressBytesTransferred) + delete(rawMsg, key) + case "ingressBytesTransferred": + err = unpopulate(val, "IngressBytesTransferred", &t.IngressBytesTransferred) + delete(rawMsg, key) + case "lastConnectionEstablishedUtcTime": + err = unpopulate(val, "LastConnectionEstablishedUTCTime", &t.LastConnectionEstablishedUTCTime) + delete(rawMsg, key) + case "tunnel": + err = unpopulate(val, "Tunnel", &t.Tunnel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnprepareNetworkPoliciesRequest. +func (u UnprepareNetworkPoliciesRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceName", u.ServiceName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnprepareNetworkPoliciesRequest. +func (u *UnprepareNetworkPoliciesRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceName": + err = unpopulate(val, "ServiceName", &u.ServiceName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Usage. +func (u Usage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", u.CurrentValue) + populate(objectMap, "id", u.ID) + populate(objectMap, "limit", u.Limit) + populate(objectMap, "name", u.Name) + populate(objectMap, "unit", u.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Usage. +func (u *Usage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &u.CurrentValue) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &u.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &u.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageName. +func (u UsageName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", u.LocalizedValue) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageName. +func (u *UsageName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &u.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsagesListResult. +func (u UsagesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsagesListResult. +func (u *UsagesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VM. +func (v VM) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VM. +func (v *VM) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientConfiguration. +func (v VPNClientConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadAudience", v.AADAudience) + populate(objectMap, "aadIssuer", v.AADIssuer) + populate(objectMap, "aadTenant", v.AADTenant) + populate(objectMap, "radiusServerAddress", v.RadiusServerAddress) + populate(objectMap, "radiusServerSecret", v.RadiusServerSecret) + populate(objectMap, "radiusServers", v.RadiusServers) + populate(objectMap, "vpnAuthenticationTypes", v.VPNAuthenticationTypes) + populate(objectMap, "vpnClientAddressPool", v.VPNClientAddressPool) + populate(objectMap, "vpnClientIpsecPolicies", v.VPNClientIPSecPolicies) + populate(objectMap, "vpnClientProtocols", v.VPNClientProtocols) + populate(objectMap, "vpnClientRevokedCertificates", v.VPNClientRevokedCertificates) + populate(objectMap, "vpnClientRootCertificates", v.VPNClientRootCertificates) + populate(objectMap, "vngClientConnectionConfigurations", v.VngClientConnectionConfigurations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientConfiguration. +func (v *VPNClientConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadAudience": + err = unpopulate(val, "AADAudience", &v.AADAudience) + delete(rawMsg, key) + case "aadIssuer": + err = unpopulate(val, "AADIssuer", &v.AADIssuer) + delete(rawMsg, key) + case "aadTenant": + err = unpopulate(val, "AADTenant", &v.AADTenant) + delete(rawMsg, key) + case "radiusServerAddress": + err = unpopulate(val, "RadiusServerAddress", &v.RadiusServerAddress) + delete(rawMsg, key) + case "radiusServerSecret": + err = unpopulate(val, "RadiusServerSecret", &v.RadiusServerSecret) + delete(rawMsg, key) + case "radiusServers": + err = unpopulate(val, "RadiusServers", &v.RadiusServers) + delete(rawMsg, key) + case "vpnAuthenticationTypes": + err = unpopulate(val, "VPNAuthenticationTypes", &v.VPNAuthenticationTypes) + delete(rawMsg, key) + case "vpnClientAddressPool": + err = unpopulate(val, "VPNClientAddressPool", &v.VPNClientAddressPool) + delete(rawMsg, key) + case "vpnClientIpsecPolicies": + err = unpopulate(val, "VPNClientIPSecPolicies", &v.VPNClientIPSecPolicies) + delete(rawMsg, key) + case "vpnClientProtocols": + err = unpopulate(val, "VPNClientProtocols", &v.VPNClientProtocols) + delete(rawMsg, key) + case "vpnClientRevokedCertificates": + err = unpopulate(val, "VPNClientRevokedCertificates", &v.VPNClientRevokedCertificates) + delete(rawMsg, key) + case "vpnClientRootCertificates": + err = unpopulate(val, "VPNClientRootCertificates", &v.VPNClientRootCertificates) + delete(rawMsg, key) + case "vngClientConnectionConfigurations": + err = unpopulate(val, "VngClientConnectionConfigurations", &v.VngClientConnectionConfigurations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealth. +func (v VPNClientConnectionHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allocatedIpAddresses", v.AllocatedIPAddresses) + populate(objectMap, "totalEgressBytesTransferred", v.TotalEgressBytesTransferred) + populate(objectMap, "totalIngressBytesTransferred", v.TotalIngressBytesTransferred) + populate(objectMap, "vpnClientConnectionsCount", v.VPNClientConnectionsCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientConnectionHealth. +func (v *VPNClientConnectionHealth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allocatedIpAddresses": + err = unpopulate(val, "AllocatedIPAddresses", &v.AllocatedIPAddresses) + delete(rawMsg, key) + case "totalEgressBytesTransferred": + err = unpopulate(val, "TotalEgressBytesTransferred", &v.TotalEgressBytesTransferred) + delete(rawMsg, key) + case "totalIngressBytesTransferred": + err = unpopulate(val, "TotalIngressBytesTransferred", &v.TotalIngressBytesTransferred) + delete(rawMsg, key) + case "vpnClientConnectionsCount": + err = unpopulate(val, "VPNClientConnectionsCount", &v.VPNClientConnectionsCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealthDetail. +func (v VPNClientConnectionHealthDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) + populate(objectMap, "egressPacketsTransferred", v.EgressPacketsTransferred) + populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) + populate(objectMap, "ingressPacketsTransferred", v.IngressPacketsTransferred) + populate(objectMap, "maxBandwidth", v.MaxBandwidth) + populate(objectMap, "maxPacketsPerSecond", v.MaxPacketsPerSecond) + populate(objectMap, "privateIpAddress", v.PrivateIPAddress) + populate(objectMap, "publicIpAddress", v.PublicIPAddress) + populate(objectMap, "vpnConnectionDuration", v.VPNConnectionDuration) + populate(objectMap, "vpnConnectionId", v.VPNConnectionID) + populate(objectMap, "vpnConnectionTime", v.VPNConnectionTime) + populate(objectMap, "vpnUserName", v.VPNUserName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientConnectionHealthDetail. +func (v *VPNClientConnectionHealthDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "egressBytesTransferred": + err = unpopulate(val, "EgressBytesTransferred", &v.EgressBytesTransferred) + delete(rawMsg, key) + case "egressPacketsTransferred": + err = unpopulate(val, "EgressPacketsTransferred", &v.EgressPacketsTransferred) + delete(rawMsg, key) + case "ingressBytesTransferred": + err = unpopulate(val, "IngressBytesTransferred", &v.IngressBytesTransferred) + delete(rawMsg, key) + case "ingressPacketsTransferred": + err = unpopulate(val, "IngressPacketsTransferred", &v.IngressPacketsTransferred) + delete(rawMsg, key) + case "maxBandwidth": + err = unpopulate(val, "MaxBandwidth", &v.MaxBandwidth) + delete(rawMsg, key) + case "maxPacketsPerSecond": + err = unpopulate(val, "MaxPacketsPerSecond", &v.MaxPacketsPerSecond) + delete(rawMsg, key) + case "privateIpAddress": + err = unpopulate(val, "PrivateIPAddress", &v.PrivateIPAddress) + delete(rawMsg, key) + case "publicIpAddress": + err = unpopulate(val, "PublicIPAddress", &v.PublicIPAddress) + delete(rawMsg, key) + case "vpnConnectionDuration": + err = unpopulate(val, "VPNConnectionDuration", &v.VPNConnectionDuration) + delete(rawMsg, key) + case "vpnConnectionId": + err = unpopulate(val, "VPNConnectionID", &v.VPNConnectionID) + delete(rawMsg, key) + case "vpnConnectionTime": + err = unpopulate(val, "VPNConnectionTime", &v.VPNConnectionTime) + delete(rawMsg, key) + case "vpnUserName": + err = unpopulate(val, "VPNUserName", &v.VPNUserName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealthDetailListResult. +func (v VPNClientConnectionHealthDetailListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientConnectionHealthDetailListResult. +func (v *VPNClientConnectionHealthDetailListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientIPsecParameters. +func (v VPNClientIPsecParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dhGroup", v.DhGroup) + populate(objectMap, "ipsecEncryption", v.IPSecEncryption) + populate(objectMap, "ipsecIntegrity", v.IPSecIntegrity) + populate(objectMap, "ikeEncryption", v.IkeEncryption) + populate(objectMap, "ikeIntegrity", v.IkeIntegrity) + populate(objectMap, "pfsGroup", v.PfsGroup) + populate(objectMap, "saDataSizeKilobytes", v.SaDataSizeKilobytes) + populate(objectMap, "saLifeTimeSeconds", v.SaLifeTimeSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientIPsecParameters. +func (v *VPNClientIPsecParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dhGroup": + err = unpopulate(val, "DhGroup", &v.DhGroup) + delete(rawMsg, key) + case "ipsecEncryption": + err = unpopulate(val, "IPSecEncryption", &v.IPSecEncryption) + delete(rawMsg, key) + case "ipsecIntegrity": + err = unpopulate(val, "IPSecIntegrity", &v.IPSecIntegrity) + delete(rawMsg, key) + case "ikeEncryption": + err = unpopulate(val, "IkeEncryption", &v.IkeEncryption) + delete(rawMsg, key) + case "ikeIntegrity": + err = unpopulate(val, "IkeIntegrity", &v.IkeIntegrity) + delete(rawMsg, key) + case "pfsGroup": + err = unpopulate(val, "PfsGroup", &v.PfsGroup) + delete(rawMsg, key) + case "saDataSizeKilobytes": + err = unpopulate(val, "SaDataSizeKilobytes", &v.SaDataSizeKilobytes) + delete(rawMsg, key) + case "saLifeTimeSeconds": + err = unpopulate(val, "SaLifeTimeSeconds", &v.SaLifeTimeSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientParameters. +func (v VPNClientParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authenticationMethod", v.AuthenticationMethod) + populate(objectMap, "clientRootCertificates", v.ClientRootCertificates) + populate(objectMap, "processorArchitecture", v.ProcessorArchitecture) + populate(objectMap, "radiusServerAuthCertificate", v.RadiusServerAuthCertificate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientParameters. +func (v *VPNClientParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authenticationMethod": + err = unpopulate(val, "AuthenticationMethod", &v.AuthenticationMethod) + delete(rawMsg, key) + case "clientRootCertificates": + err = unpopulate(val, "ClientRootCertificates", &v.ClientRootCertificates) + delete(rawMsg, key) + case "processorArchitecture": + err = unpopulate(val, "ProcessorArchitecture", &v.ProcessorArchitecture) + delete(rawMsg, key) + case "radiusServerAuthCertificate": + err = unpopulate(val, "RadiusServerAuthCertificate", &v.RadiusServerAuthCertificate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientRevokedCertificate. +func (v VPNClientRevokedCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientRevokedCertificate. +func (v *VPNClientRevokedCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientRevokedCertificatePropertiesFormat. +func (v VPNClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "thumbprint", v.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientRevokedCertificatePropertiesFormat. +func (v *VPNClientRevokedCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &v.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientRootCertificate. +func (v VPNClientRootCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientRootCertificate. +func (v *VPNClientRootCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientRootCertificatePropertiesFormat. +func (v VPNClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "publicCertData", v.PublicCertData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNClientRootCertificatePropertiesFormat. +func (v *VPNClientRootCertificatePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "publicCertData": + err = unpopulate(val, "PublicCertData", &v.PublicCertData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNConnection. +func (v VPNConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnection. +func (v *VPNConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNConnectionPacketCaptureStartParameters. +func (v VPNConnectionPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filterData", v.FilterData) + populate(objectMap, "linkConnectionNames", v.LinkConnectionNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionPacketCaptureStartParameters. +func (v *VPNConnectionPacketCaptureStartParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filterData": + err = unpopulate(val, "FilterData", &v.FilterData) + delete(rawMsg, key) + case "linkConnectionNames": + err = unpopulate(val, "LinkConnectionNames", &v.LinkConnectionNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNConnectionPacketCaptureStopParameters. +func (v VPNConnectionPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "linkConnectionNames", v.LinkConnectionNames) + populate(objectMap, "sasUrl", v.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionPacketCaptureStopParameters. +func (v *VPNConnectionPacketCaptureStopParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "linkConnectionNames": + err = unpopulate(val, "LinkConnectionNames", &v.LinkConnectionNames) + delete(rawMsg, key) + case "sasUrl": + err = unpopulate(val, "SasURL", &v.SasURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNConnectionProperties. +func (v VPNConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionBandwidth", v.ConnectionBandwidth) + populate(objectMap, "connectionStatus", v.ConnectionStatus) + populate(objectMap, "dpdTimeoutSeconds", v.DpdTimeoutSeconds) + populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) + populate(objectMap, "enableBgp", v.EnableBgp) + populate(objectMap, "enableInternetSecurity", v.EnableInternetSecurity) + populate(objectMap, "enableRateLimiting", v.EnableRateLimiting) + populate(objectMap, "ipsecPolicies", v.IPSecPolicies) + populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "remoteVpnSite", v.RemoteVPNSite) + populate(objectMap, "routingConfiguration", v.RoutingConfiguration) + populate(objectMap, "routingWeight", v.RoutingWeight) + populate(objectMap, "sharedKey", v.SharedKey) + populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) + populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) + populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) + populate(objectMap, "vpnConnectionProtocolType", v.VPNConnectionProtocolType) + populate(objectMap, "vpnLinkConnections", v.VPNLinkConnections) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionProperties. +func (v *VPNConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionBandwidth": + err = unpopulate(val, "ConnectionBandwidth", &v.ConnectionBandwidth) + delete(rawMsg, key) + case "connectionStatus": + err = unpopulate(val, "ConnectionStatus", &v.ConnectionStatus) + delete(rawMsg, key) + case "dpdTimeoutSeconds": + err = unpopulate(val, "DpdTimeoutSeconds", &v.DpdTimeoutSeconds) + delete(rawMsg, key) + case "egressBytesTransferred": + err = unpopulate(val, "EgressBytesTransferred", &v.EgressBytesTransferred) + delete(rawMsg, key) + case "enableBgp": + err = unpopulate(val, "EnableBgp", &v.EnableBgp) + delete(rawMsg, key) + case "enableInternetSecurity": + err = unpopulate(val, "EnableInternetSecurity", &v.EnableInternetSecurity) + delete(rawMsg, key) + case "enableRateLimiting": + err = unpopulate(val, "EnableRateLimiting", &v.EnableRateLimiting) + delete(rawMsg, key) + case "ipsecPolicies": + err = unpopulate(val, "IPSecPolicies", &v.IPSecPolicies) + delete(rawMsg, key) + case "ingressBytesTransferred": + err = unpopulate(val, "IngressBytesTransferred", &v.IngressBytesTransferred) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "remoteVpnSite": + err = unpopulate(val, "RemoteVPNSite", &v.RemoteVPNSite) + delete(rawMsg, key) + case "routingConfiguration": + err = unpopulate(val, "RoutingConfiguration", &v.RoutingConfiguration) + delete(rawMsg, key) + case "routingWeight": + err = unpopulate(val, "RoutingWeight", &v.RoutingWeight) + delete(rawMsg, key) + case "sharedKey": + err = unpopulate(val, "SharedKey", &v.SharedKey) + delete(rawMsg, key) + case "trafficSelectorPolicies": + err = unpopulate(val, "TrafficSelectorPolicies", &v.TrafficSelectorPolicies) + delete(rawMsg, key) + case "useLocalAzureIpAddress": + err = unpopulate(val, "UseLocalAzureIPAddress", &v.UseLocalAzureIPAddress) + delete(rawMsg, key) + case "usePolicyBasedTrafficSelectors": + err = unpopulate(val, "UsePolicyBasedTrafficSelectors", &v.UsePolicyBasedTrafficSelectors) + delete(rawMsg, key) + case "vpnConnectionProtocolType": + err = unpopulate(val, "VPNConnectionProtocolType", &v.VPNConnectionProtocolType) + delete(rawMsg, key) + case "vpnLinkConnections": + err = unpopulate(val, "VPNLinkConnections", &v.VPNLinkConnections) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNDeviceScriptParameters. +func (v VPNDeviceScriptParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deviceFamily", v.DeviceFamily) + populate(objectMap, "firmwareVersion", v.FirmwareVersion) + populate(objectMap, "vendor", v.Vendor) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNDeviceScriptParameters. +func (v *VPNDeviceScriptParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deviceFamily": + err = unpopulate(val, "DeviceFamily", &v.DeviceFamily) + delete(rawMsg, key) + case "firmwareVersion": + err = unpopulate(val, "FirmwareVersion", &v.FirmwareVersion) + delete(rawMsg, key) + case "vendor": + err = unpopulate(val, "Vendor", &v.Vendor) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNGateway. +func (v VPNGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGateway. +func (v *VPNGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNGatewayIPConfiguration. +func (v VPNGatewayIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "privateIpAddress", v.PrivateIPAddress) + populate(objectMap, "publicIpAddress", v.PublicIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayIPConfiguration. +func (v *VPNGatewayIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "privateIpAddress": + err = unpopulate(val, "PrivateIPAddress", &v.PrivateIPAddress) + delete(rawMsg, key) + case "publicIpAddress": + err = unpopulate(val, "PublicIPAddress", &v.PublicIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNGatewayNatRule. +func (v VPNGatewayNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayNatRule. +func (v *VPNGatewayNatRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNGatewayNatRuleProperties. +func (v VPNGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "egressVpnSiteLinkConnections", v.EgressVPNSiteLinkConnections) + populate(objectMap, "externalMappings", v.ExternalMappings) + populate(objectMap, "ipConfigurationId", v.IPConfigurationID) + populate(objectMap, "ingressVpnSiteLinkConnections", v.IngressVPNSiteLinkConnections) + populate(objectMap, "internalMappings", v.InternalMappings) + populate(objectMap, "mode", v.Mode) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayNatRuleProperties. +func (v *VPNGatewayNatRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "egressVpnSiteLinkConnections": + err = unpopulate(val, "EgressVPNSiteLinkConnections", &v.EgressVPNSiteLinkConnections) + delete(rawMsg, key) + case "externalMappings": + err = unpopulate(val, "ExternalMappings", &v.ExternalMappings) + delete(rawMsg, key) + case "ipConfigurationId": + err = unpopulate(val, "IPConfigurationID", &v.IPConfigurationID) + delete(rawMsg, key) + case "ingressVpnSiteLinkConnections": + err = unpopulate(val, "IngressVPNSiteLinkConnections", &v.IngressVPNSiteLinkConnections) + delete(rawMsg, key) + case "internalMappings": + err = unpopulate(val, "InternalMappings", &v.InternalMappings) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &v.Mode) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNGatewayPacketCaptureStartParameters. +func (v VPNGatewayPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filterData", v.FilterData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayPacketCaptureStartParameters. +func (v *VPNGatewayPacketCaptureStartParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filterData": + err = unpopulate(val, "FilterData", &v.FilterData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNGatewayPacketCaptureStopParameters. +func (v VPNGatewayPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sasUrl", v.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayPacketCaptureStopParameters. +func (v *VPNGatewayPacketCaptureStopParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sasUrl": + err = unpopulate(val, "SasURL", &v.SasURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNGatewayProperties. +func (v VPNGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bgpSettings", v.BgpSettings) + populate(objectMap, "connections", v.Connections) + populate(objectMap, "enableBgpRouteTranslationForNat", v.EnableBgpRouteTranslationForNat) + populate(objectMap, "ipConfigurations", v.IPConfigurations) + populate(objectMap, "isRoutingPreferenceInternet", v.IsRoutingPreferenceInternet) + populate(objectMap, "natRules", v.NatRules) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "vpnGatewayScaleUnit", v.VPNGatewayScaleUnit) + populate(objectMap, "virtualHub", v.VirtualHub) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewayProperties. +func (v *VPNGatewayProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bgpSettings": + err = unpopulate(val, "BgpSettings", &v.BgpSettings) + delete(rawMsg, key) + case "connections": + err = unpopulate(val, "Connections", &v.Connections) + delete(rawMsg, key) + case "enableBgpRouteTranslationForNat": + err = unpopulate(val, "EnableBgpRouteTranslationForNat", &v.EnableBgpRouteTranslationForNat) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &v.IPConfigurations) + delete(rawMsg, key) + case "isRoutingPreferenceInternet": + err = unpopulate(val, "IsRoutingPreferenceInternet", &v.IsRoutingPreferenceInternet) + delete(rawMsg, key) + case "natRules": + err = unpopulate(val, "NatRules", &v.NatRules) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "vpnGatewayScaleUnit": + err = unpopulate(val, "VPNGatewayScaleUnit", &v.VPNGatewayScaleUnit) + delete(rawMsg, key) + case "virtualHub": + err = unpopulate(val, "VirtualHub", &v.VirtualHub) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNLinkBgpSettings. +func (v VPNLinkBgpSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asn", v.Asn) + populate(objectMap, "bgpPeeringAddress", v.BgpPeeringAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNLinkBgpSettings. +func (v *VPNLinkBgpSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asn": + err = unpopulate(val, "Asn", &v.Asn) + delete(rawMsg, key) + case "bgpPeeringAddress": + err = unpopulate(val, "BgpPeeringAddress", &v.BgpPeeringAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNLinkProviderProperties. +func (v VPNLinkProviderProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "linkProviderName", v.LinkProviderName) + populate(objectMap, "linkSpeedInMbps", v.LinkSpeedInMbps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNLinkProviderProperties. +func (v *VPNLinkProviderProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "linkProviderName": + err = unpopulate(val, "LinkProviderName", &v.LinkProviderName) + delete(rawMsg, key) + case "linkSpeedInMbps": + err = unpopulate(val, "LinkSpeedInMbps", &v.LinkSpeedInMbps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNNatRuleMapping. +func (v VPNNatRuleMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressSpace", v.AddressSpace) + populate(objectMap, "portRange", v.PortRange) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNNatRuleMapping. +func (v *VPNNatRuleMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressSpace": + err = unpopulate(val, "AddressSpace", &v.AddressSpace) + delete(rawMsg, key) + case "portRange": + err = unpopulate(val, "PortRange", &v.PortRange) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNPacketCaptureStartParameters. +func (v VPNPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filterData", v.FilterData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNPacketCaptureStartParameters. +func (v *VPNPacketCaptureStartParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filterData": + err = unpopulate(val, "FilterData", &v.FilterData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNPacketCaptureStopParameters. +func (v VPNPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sasUrl", v.SasURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNPacketCaptureStopParameters. +func (v *VPNPacketCaptureStopParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sasUrl": + err = unpopulate(val, "SasURL", &v.SasURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNProfileResponse. +func (v VPNProfileResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "profileUrl", v.ProfileURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNProfileResponse. +func (v *VPNProfileResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "profileUrl": + err = unpopulate(val, "ProfileURL", &v.ProfileURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigRadiusClientRootCertificate. +func (v VPNServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", v.Name) + populate(objectMap, "thumbprint", v.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigRadiusClientRootCertificate. +func (v *VPNServerConfigRadiusClientRootCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &v.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigRadiusServerRootCertificate. +func (v VPNServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", v.Name) + populate(objectMap, "publicCertData", v.PublicCertData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigRadiusServerRootCertificate. +func (v *VPNServerConfigRadiusServerRootCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "publicCertData": + err = unpopulate(val, "PublicCertData", &v.PublicCertData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigVPNClientRevokedCertificate. +func (v VPNServerConfigVPNClientRevokedCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", v.Name) + populate(objectMap, "thumbprint", v.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigVPNClientRevokedCertificate. +func (v *VPNServerConfigVPNClientRevokedCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &v.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigVPNClientRootCertificate. +func (v VPNServerConfigVPNClientRootCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", v.Name) + populate(objectMap, "publicCertData", v.PublicCertData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigVPNClientRootCertificate. +func (v *VPNServerConfigVPNClientRootCertificate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "publicCertData": + err = unpopulate(val, "PublicCertData", &v.PublicCertData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfiguration. +func (v VPNServerConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfiguration. +func (v *VPNServerConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationPolicyGroup. +func (v VPNServerConfigurationPolicyGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigurationPolicyGroup. +func (v *VPNServerConfigurationPolicyGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationPolicyGroupMember. +func (v VPNServerConfigurationPolicyGroupMember) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributeType", v.AttributeType) + populate(objectMap, "attributeValue", v.AttributeValue) + populate(objectMap, "name", v.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigurationPolicyGroupMember. +func (v *VPNServerConfigurationPolicyGroupMember) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attributeType": + err = unpopulate(val, "AttributeType", &v.AttributeType) + delete(rawMsg, key) + case "attributeValue": + err = unpopulate(val, "AttributeValue", &v.AttributeValue) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationPolicyGroupProperties. +func (v VPNServerConfigurationPolicyGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isDefault", v.IsDefault) + populate(objectMap, "p2SConnectionConfigurations", v.P2SConnectionConfigurations) + populate(objectMap, "policyMembers", v.PolicyMembers) + populate(objectMap, "priority", v.Priority) + populate(objectMap, "provisioningState", v.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigurationPolicyGroupProperties. +func (v *VPNServerConfigurationPolicyGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isDefault": + err = unpopulate(val, "IsDefault", &v.IsDefault) + delete(rawMsg, key) + case "p2SConnectionConfigurations": + err = unpopulate(val, "P2SConnectionConfigurations", &v.P2SConnectionConfigurations) + delete(rawMsg, key) + case "policyMembers": + err = unpopulate(val, "PolicyMembers", &v.PolicyMembers) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &v.Priority) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationProperties. +func (v VPNServerConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadAuthenticationParameters", v.AADAuthenticationParameters) + populate(objectMap, "configurationPolicyGroups", v.ConfigurationPolicyGroups) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "name", v.Name) + populate(objectMap, "p2SVpnGateways", v.P2SVPNGateways) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "radiusClientRootCertificates", v.RadiusClientRootCertificates) + populate(objectMap, "radiusServerAddress", v.RadiusServerAddress) + populate(objectMap, "radiusServerRootCertificates", v.RadiusServerRootCertificates) + populate(objectMap, "radiusServerSecret", v.RadiusServerSecret) + populate(objectMap, "radiusServers", v.RadiusServers) + populate(objectMap, "vpnAuthenticationTypes", v.VPNAuthenticationTypes) + populate(objectMap, "vpnClientIpsecPolicies", v.VPNClientIPSecPolicies) + populate(objectMap, "vpnClientRevokedCertificates", v.VPNClientRevokedCertificates) + populate(objectMap, "vpnClientRootCertificates", v.VPNClientRootCertificates) + populate(objectMap, "vpnProtocols", v.VPNProtocols) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigurationProperties. +func (v *VPNServerConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadAuthenticationParameters": + err = unpopulate(val, "AADAuthenticationParameters", &v.AADAuthenticationParameters) + delete(rawMsg, key) + case "configurationPolicyGroups": + err = unpopulate(val, "ConfigurationPolicyGroups", &v.ConfigurationPolicyGroups) + delete(rawMsg, key) + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "p2SVpnGateways": + err = unpopulate(val, "P2SVPNGateways", &v.P2SVPNGateways) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "radiusClientRootCertificates": + err = unpopulate(val, "RadiusClientRootCertificates", &v.RadiusClientRootCertificates) + delete(rawMsg, key) + case "radiusServerAddress": + err = unpopulate(val, "RadiusServerAddress", &v.RadiusServerAddress) + delete(rawMsg, key) + case "radiusServerRootCertificates": + err = unpopulate(val, "RadiusServerRootCertificates", &v.RadiusServerRootCertificates) + delete(rawMsg, key) + case "radiusServerSecret": + err = unpopulate(val, "RadiusServerSecret", &v.RadiusServerSecret) + delete(rawMsg, key) + case "radiusServers": + err = unpopulate(val, "RadiusServers", &v.RadiusServers) + delete(rawMsg, key) + case "vpnAuthenticationTypes": + err = unpopulate(val, "VPNAuthenticationTypes", &v.VPNAuthenticationTypes) + delete(rawMsg, key) + case "vpnClientIpsecPolicies": + err = unpopulate(val, "VPNClientIPSecPolicies", &v.VPNClientIPSecPolicies) + delete(rawMsg, key) + case "vpnClientRevokedCertificates": + err = unpopulate(val, "VPNClientRevokedCertificates", &v.VPNClientRevokedCertificates) + delete(rawMsg, key) + case "vpnClientRootCertificates": + err = unpopulate(val, "VPNClientRootCertificates", &v.VPNClientRootCertificates) + delete(rawMsg, key) + case "vpnProtocols": + err = unpopulate(val, "VPNProtocols", &v.VPNProtocols) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationsResponse. +func (v VPNServerConfigurationsResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "vpnServerConfigurationResourceIds", v.VPNServerConfigurationResourceIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNServerConfigurationsResponse. +func (v *VPNServerConfigurationsResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "vpnServerConfigurationResourceIds": + err = unpopulate(val, "VPNServerConfigurationResourceIDs", &v.VPNServerConfigurationResourceIDs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNSite. +func (v VPNSite) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSite. +func (v *VPNSite) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNSiteID. +func (v VPNSiteID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "vpnSite", v.VPNSite) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteID. +func (v *VPNSiteID) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "vpnSite": + err = unpopulate(val, "VPNSite", &v.VPNSite) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNSiteLink. +func (v VPNSiteLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteLink. +func (v *VPNSiteLink) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkConnection. +func (v VPNSiteLinkConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteLinkConnection. +func (v *VPNSiteLinkConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkConnectionProperties. +func (v VPNSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "connectionBandwidth", v.ConnectionBandwidth) + populate(objectMap, "connectionStatus", v.ConnectionStatus) + populate(objectMap, "dpdTimeoutSeconds", v.DpdTimeoutSeconds) + populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) + populate(objectMap, "egressNatRules", v.EgressNatRules) + populate(objectMap, "enableBgp", v.EnableBgp) + populate(objectMap, "enableRateLimiting", v.EnableRateLimiting) + populate(objectMap, "ipsecPolicies", v.IPSecPolicies) + populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) + populate(objectMap, "ingressNatRules", v.IngressNatRules) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "routingWeight", v.RoutingWeight) + populate(objectMap, "sharedKey", v.SharedKey) + populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) + populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) + populate(objectMap, "vpnConnectionProtocolType", v.VPNConnectionProtocolType) + populate(objectMap, "vpnGatewayCustomBgpAddresses", v.VPNGatewayCustomBgpAddresses) + populate(objectMap, "vpnLinkConnectionMode", v.VPNLinkConnectionMode) + populate(objectMap, "vpnSiteLink", v.VPNSiteLink) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteLinkConnectionProperties. +func (v *VPNSiteLinkConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "connectionBandwidth": + err = unpopulate(val, "ConnectionBandwidth", &v.ConnectionBandwidth) + delete(rawMsg, key) + case "connectionStatus": + err = unpopulate(val, "ConnectionStatus", &v.ConnectionStatus) + delete(rawMsg, key) + case "dpdTimeoutSeconds": + err = unpopulate(val, "DpdTimeoutSeconds", &v.DpdTimeoutSeconds) + delete(rawMsg, key) + case "egressBytesTransferred": + err = unpopulate(val, "EgressBytesTransferred", &v.EgressBytesTransferred) + delete(rawMsg, key) + case "egressNatRules": + err = unpopulate(val, "EgressNatRules", &v.EgressNatRules) + delete(rawMsg, key) + case "enableBgp": + err = unpopulate(val, "EnableBgp", &v.EnableBgp) + delete(rawMsg, key) + case "enableRateLimiting": + err = unpopulate(val, "EnableRateLimiting", &v.EnableRateLimiting) + delete(rawMsg, key) + case "ipsecPolicies": + err = unpopulate(val, "IPSecPolicies", &v.IPSecPolicies) + delete(rawMsg, key) + case "ingressBytesTransferred": + err = unpopulate(val, "IngressBytesTransferred", &v.IngressBytesTransferred) + delete(rawMsg, key) + case "ingressNatRules": + err = unpopulate(val, "IngressNatRules", &v.IngressNatRules) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "routingWeight": + err = unpopulate(val, "RoutingWeight", &v.RoutingWeight) + delete(rawMsg, key) + case "sharedKey": + err = unpopulate(val, "SharedKey", &v.SharedKey) + delete(rawMsg, key) + case "useLocalAzureIpAddress": + err = unpopulate(val, "UseLocalAzureIPAddress", &v.UseLocalAzureIPAddress) + delete(rawMsg, key) + case "usePolicyBasedTrafficSelectors": + err = unpopulate(val, "UsePolicyBasedTrafficSelectors", &v.UsePolicyBasedTrafficSelectors) + delete(rawMsg, key) + case "vpnConnectionProtocolType": + err = unpopulate(val, "VPNConnectionProtocolType", &v.VPNConnectionProtocolType) + delete(rawMsg, key) + case "vpnGatewayCustomBgpAddresses": + err = unpopulate(val, "VPNGatewayCustomBgpAddresses", &v.VPNGatewayCustomBgpAddresses) + delete(rawMsg, key) + case "vpnLinkConnectionMode": + err = unpopulate(val, "VPNLinkConnectionMode", &v.VPNLinkConnectionMode) + delete(rawMsg, key) + case "vpnSiteLink": + err = unpopulate(val, "VPNSiteLink", &v.VPNSiteLink) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkProperties. +func (v VPNSiteLinkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bgpProperties", v.BgpProperties) + populate(objectMap, "fqdn", v.Fqdn) + populate(objectMap, "ipAddress", v.IPAddress) + populate(objectMap, "linkProperties", v.LinkProperties) + populate(objectMap, "provisioningState", v.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteLinkProperties. +func (v *VPNSiteLinkProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bgpProperties": + err = unpopulate(val, "BgpProperties", &v.BgpProperties) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &v.Fqdn) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &v.IPAddress) + delete(rawMsg, key) + case "linkProperties": + err = unpopulate(val, "LinkProperties", &v.LinkProperties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VPNSiteProperties. +func (v VPNSiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressSpace", v.AddressSpace) + populate(objectMap, "bgpProperties", v.BgpProperties) + populate(objectMap, "deviceProperties", v.DeviceProperties) + populate(objectMap, "ipAddress", v.IPAddress) + populate(objectMap, "isSecuritySite", v.IsSecuritySite) + populate(objectMap, "o365Policy", v.O365Policy) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "siteKey", v.SiteKey) + populate(objectMap, "vpnSiteLinks", v.VPNSiteLinks) + populate(objectMap, "virtualWan", v.VirtualWan) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNSiteProperties. +func (v *VPNSiteProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressSpace": + err = unpopulate(val, "AddressSpace", &v.AddressSpace) + delete(rawMsg, key) + case "bgpProperties": + err = unpopulate(val, "BgpProperties", &v.BgpProperties) + delete(rawMsg, key) + case "deviceProperties": + err = unpopulate(val, "DeviceProperties", &v.DeviceProperties) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &v.IPAddress) + delete(rawMsg, key) + case "isSecuritySite": + err = unpopulate(val, "IsSecuritySite", &v.IsSecuritySite) + delete(rawMsg, key) + case "o365Policy": + err = unpopulate(val, "O365Policy", &v.O365Policy) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "siteKey": + err = unpopulate(val, "SiteKey", &v.SiteKey) + delete(rawMsg, key) + case "vpnSiteLinks": + err = unpopulate(val, "VPNSiteLinks", &v.VPNSiteLinks) + delete(rawMsg, key) + case "virtualWan": + err = unpopulate(val, "VirtualWan", &v.VirtualWan) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VerificationIPFlowParameters. +func (v VerificationIPFlowParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "direction", v.Direction) + populate(objectMap, "localIPAddress", v.LocalIPAddress) + populate(objectMap, "localPort", v.LocalPort) + populate(objectMap, "protocol", v.Protocol) + populate(objectMap, "remoteIPAddress", v.RemoteIPAddress) + populate(objectMap, "remotePort", v.RemotePort) + populate(objectMap, "targetNicResourceId", v.TargetNicResourceID) + populate(objectMap, "targetResourceId", v.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VerificationIPFlowParameters. +func (v *VerificationIPFlowParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "direction": + err = unpopulate(val, "Direction", &v.Direction) + delete(rawMsg, key) + case "localIPAddress": + err = unpopulate(val, "LocalIPAddress", &v.LocalIPAddress) + delete(rawMsg, key) + case "localPort": + err = unpopulate(val, "LocalPort", &v.LocalPort) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &v.Protocol) + delete(rawMsg, key) + case "remoteIPAddress": + err = unpopulate(val, "RemoteIPAddress", &v.RemoteIPAddress) + delete(rawMsg, key) + case "remotePort": + err = unpopulate(val, "RemotePort", &v.RemotePort) + delete(rawMsg, key) + case "targetNicResourceId": + err = unpopulate(val, "TargetNicResourceID", &v.TargetNicResourceID) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &v.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VerificationIPFlowResult. +func (v VerificationIPFlowResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "access", v.Access) + populate(objectMap, "ruleName", v.RuleName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VerificationIPFlowResult. +func (v *VerificationIPFlowResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "access": + err = unpopulate(val, "Access", &v.Access) + delete(rawMsg, key) + case "ruleName": + err = unpopulate(val, "RuleName", &v.RuleName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VerifierWorkspace. +func (v VerifierWorkspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "systemData", v.SystemData) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VerifierWorkspace. +func (v *VerifierWorkspace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &v.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VerifierWorkspaceListResult. +func (v VerifierWorkspaceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VerifierWorkspaceListResult. +func (v *VerifierWorkspaceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VerifierWorkspaceProperties. +func (v VerifierWorkspaceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", v.Description) + populate(objectMap, "provisioningState", v.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VerifierWorkspaceProperties. +func (v *VerifierWorkspaceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &v.Description) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VerifierWorkspaceUpdate. +func (v VerifierWorkspaceUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VerifierWorkspaceUpdate. +func (v *VerifierWorkspaceUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VerifierWorkspaceUpdateProperties. +func (v VerifierWorkspaceUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", v.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VerifierWorkspaceUpdateProperties. +func (v *VerifierWorkspaceUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &v.Description) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualAppliance. +func (v VirtualAppliance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "identity", v.Identity) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualAppliance. +func (v *VirtualAppliance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &v.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceAdditionalNicProperties. +func (v VirtualApplianceAdditionalNicProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hasPublicIp", v.HasPublicIP) + populate(objectMap, "name", v.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceAdditionalNicProperties. +func (v *VirtualApplianceAdditionalNicProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hasPublicIp": + err = unpopulate(val, "HasPublicIP", &v.HasPublicIP) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceConnection. +func (v VirtualApplianceConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceConnection. +func (v *VirtualApplianceConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceConnectionList. +func (v VirtualApplianceConnectionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceConnectionList. +func (v *VirtualApplianceConnectionList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceConnectionProperties. +func (v VirtualApplianceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "asn", v.Asn) + populate(objectMap, "bgpPeerAddress", v.BgpPeerAddress) + populate(objectMap, "enableInternetSecurity", v.EnableInternetSecurity) + populate(objectMap, "name", v.Name) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "routingConfiguration", v.RoutingConfiguration) + populate(objectMap, "tunnelIdentifier", v.TunnelIdentifier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceConnectionProperties. +func (v *VirtualApplianceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "asn": + err = unpopulate(val, "Asn", &v.Asn) + delete(rawMsg, key) + case "bgpPeerAddress": + err = unpopulate(val, "BgpPeerAddress", &v.BgpPeerAddress) + delete(rawMsg, key) + case "enableInternetSecurity": + err = unpopulate(val, "EnableInternetSecurity", &v.EnableInternetSecurity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "routingConfiguration": + err = unpopulate(val, "RoutingConfiguration", &v.RoutingConfiguration) + delete(rawMsg, key) + case "tunnelIdentifier": + err = unpopulate(val, "TunnelIdentifier", &v.TunnelIdentifier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceIPConfiguration. +func (v VirtualApplianceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceIPConfiguration. +func (v *VirtualApplianceIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceIPConfigurationProperties. +func (v VirtualApplianceIPConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primary", v.Primary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceIPConfigurationProperties. +func (v *VirtualApplianceIPConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primary": + err = unpopulate(val, "Primary", &v.Primary) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceInstanceIDs. +func (v VirtualApplianceInstanceIDs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceIds", v.InstanceIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceInstanceIDs. +func (v *VirtualApplianceInstanceIDs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceIds": + err = unpopulate(val, "InstanceIDs", &v.InstanceIDs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceListResult. +func (v VirtualApplianceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceListResult. +func (v *VirtualApplianceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceNetworkInterfaceConfiguration. +func (v VirtualApplianceNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", v.NicType) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceNetworkInterfaceConfiguration. +func (v *VirtualApplianceNetworkInterfaceConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "NicType", &v.NicType) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceNetworkInterfaceConfigurationProperties. +func (v VirtualApplianceNetworkInterfaceConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipConfigurations", v.IPConfigurations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceNetworkInterfaceConfigurationProperties. +func (v *VirtualApplianceNetworkInterfaceConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &v.IPConfigurations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceNicProperties. +func (v VirtualApplianceNicProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceName", v.InstanceName) + populate(objectMap, "name", v.Name) + populate(objectMap, "nicType", v.NicType) + populate(objectMap, "privateIpAddress", v.PrivateIPAddress) + populate(objectMap, "publicIpAddress", v.PublicIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceNicProperties. +func (v *VirtualApplianceNicProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceName": + err = unpopulate(val, "InstanceName", &v.InstanceName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "nicType": + err = unpopulate(val, "NicType", &v.NicType) + delete(rawMsg, key) + case "privateIpAddress": + err = unpopulate(val, "PrivateIPAddress", &v.PrivateIPAddress) + delete(rawMsg, key) + case "publicIpAddress": + err = unpopulate(val, "PublicIPAddress", &v.PublicIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualAppliancePropertiesFormat. +func (v VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalNics", v.AdditionalNics) + populate(objectMap, "addressPrefix", v.AddressPrefix) + populate(objectMap, "bootStrapConfigurationBlobs", v.BootStrapConfigurationBlobs) + populate(objectMap, "cloudInitConfiguration", v.CloudInitConfiguration) + populate(objectMap, "cloudInitConfigurationBlobs", v.CloudInitConfigurationBlobs) + populate(objectMap, "delegation", v.Delegation) + populate(objectMap, "deploymentType", v.DeploymentType) + populate(objectMap, "inboundSecurityRules", v.InboundSecurityRules) + populate(objectMap, "internetIngressPublicIps", v.InternetIngressPublicIPs) + populate(objectMap, "networkProfile", v.NetworkProfile) + populate(objectMap, "nvaSku", v.NvaSKU) + populate(objectMap, "partnerManagedResource", v.PartnerManagedResource) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "sshPublicKey", v.SSHPublicKey) + populate(objectMap, "virtualApplianceAsn", v.VirtualApplianceAsn) + populate(objectMap, "virtualApplianceConnections", v.VirtualApplianceConnections) + populate(objectMap, "virtualApplianceNics", v.VirtualApplianceNics) + populate(objectMap, "virtualApplianceSites", v.VirtualApplianceSites) + populate(objectMap, "virtualHub", v.VirtualHub) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualAppliancePropertiesFormat. +func (v *VirtualAppliancePropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalNics": + err = unpopulate(val, "AdditionalNics", &v.AdditionalNics) + delete(rawMsg, key) + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &v.AddressPrefix) + delete(rawMsg, key) + case "bootStrapConfigurationBlobs": + err = unpopulate(val, "BootStrapConfigurationBlobs", &v.BootStrapConfigurationBlobs) + delete(rawMsg, key) + case "cloudInitConfiguration": + err = unpopulate(val, "CloudInitConfiguration", &v.CloudInitConfiguration) + delete(rawMsg, key) + case "cloudInitConfigurationBlobs": + err = unpopulate(val, "CloudInitConfigurationBlobs", &v.CloudInitConfigurationBlobs) + delete(rawMsg, key) + case "delegation": + err = unpopulate(val, "Delegation", &v.Delegation) + delete(rawMsg, key) + case "deploymentType": + err = unpopulate(val, "DeploymentType", &v.DeploymentType) + delete(rawMsg, key) + case "inboundSecurityRules": + err = unpopulate(val, "InboundSecurityRules", &v.InboundSecurityRules) + delete(rawMsg, key) + case "internetIngressPublicIps": + err = unpopulate(val, "InternetIngressPublicIPs", &v.InternetIngressPublicIPs) + delete(rawMsg, key) + case "networkProfile": + err = unpopulate(val, "NetworkProfile", &v.NetworkProfile) + delete(rawMsg, key) + case "nvaSku": + err = unpopulate(val, "NvaSKU", &v.NvaSKU) + delete(rawMsg, key) + case "partnerManagedResource": + err = unpopulate(val, "PartnerManagedResource", &v.PartnerManagedResource) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "sshPublicKey": + err = unpopulate(val, "SSHPublicKey", &v.SSHPublicKey) + delete(rawMsg, key) + case "virtualApplianceAsn": + err = unpopulate(val, "VirtualApplianceAsn", &v.VirtualApplianceAsn) + delete(rawMsg, key) + case "virtualApplianceConnections": + err = unpopulate(val, "VirtualApplianceConnections", &v.VirtualApplianceConnections) + delete(rawMsg, key) + case "virtualApplianceNics": + err = unpopulate(val, "VirtualApplianceNics", &v.VirtualApplianceNics) + delete(rawMsg, key) + case "virtualApplianceSites": + err = unpopulate(val, "VirtualApplianceSites", &v.VirtualApplianceSites) + delete(rawMsg, key) + case "virtualHub": + err = unpopulate(val, "VirtualHub", &v.VirtualHub) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualAppliancePropertiesFormatNetworkProfile. +func (v VirtualAppliancePropertiesFormatNetworkProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "networkInterfaceConfigurations", v.NetworkInterfaceConfigurations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualAppliancePropertiesFormatNetworkProfile. +func (v *VirtualAppliancePropertiesFormatNetworkProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "networkInterfaceConfigurations": + err = unpopulate(val, "NetworkInterfaceConfigurations", &v.NetworkInterfaceConfigurations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKU. +func (v VirtualApplianceSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSKU. +func (v *VirtualApplianceSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUInstances. +func (v VirtualApplianceSKUInstances) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceCount", v.InstanceCount) + populate(objectMap, "scaleUnit", v.ScaleUnit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSKUInstances. +func (v *VirtualApplianceSKUInstances) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceCount": + err = unpopulate(val, "InstanceCount", &v.InstanceCount) + delete(rawMsg, key) + case "scaleUnit": + err = unpopulate(val, "ScaleUnit", &v.ScaleUnit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUListResult. +func (v VirtualApplianceSKUListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSKUListResult. +func (v *VirtualApplianceSKUListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUProperties. +func (v VirtualApplianceSKUProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bundledScaleUnit", v.BundledScaleUnit) + populate(objectMap, "marketPlaceVersion", v.MarketPlaceVersion) + populate(objectMap, "vendor", v.Vendor) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSKUProperties. +func (v *VirtualApplianceSKUProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bundledScaleUnit": + err = unpopulate(val, "BundledScaleUnit", &v.BundledScaleUnit) + delete(rawMsg, key) + case "marketPlaceVersion": + err = unpopulate(val, "MarketPlaceVersion", &v.MarketPlaceVersion) + delete(rawMsg, key) + case "vendor": + err = unpopulate(val, "Vendor", &v.Vendor) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUPropertiesFormat. +func (v VirtualApplianceSKUPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableScaleUnits", v.AvailableScaleUnits) + populate(objectMap, "availableVersions", v.AvailableVersions) + populate(objectMap, "vendor", v.Vendor) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSKUPropertiesFormat. +func (v *VirtualApplianceSKUPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableScaleUnits": + err = unpopulate(val, "AvailableScaleUnits", &v.AvailableScaleUnits) + delete(rawMsg, key) + case "availableVersions": + err = unpopulate(val, "AvailableVersions", &v.AvailableVersions) + delete(rawMsg, key) + case "vendor": + err = unpopulate(val, "Vendor", &v.Vendor) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSite. +func (v VirtualApplianceSite) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSite. +func (v *VirtualApplianceSite) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSiteListResult. +func (v VirtualApplianceSiteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSiteListResult. +func (v *VirtualApplianceSiteListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSiteProperties. +func (v VirtualApplianceSiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefix", v.AddressPrefix) + populate(objectMap, "o365Policy", v.O365Policy) + populate(objectMap, "provisioningState", v.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualApplianceSiteProperties. +func (v *VirtualApplianceSiteProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &v.AddressPrefix) + delete(rawMsg, key) + case "o365Policy": + err = unpopulate(val, "O365Policy", &v.O365Policy) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHub. +func (v VirtualHub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHub. +func (v *VirtualHub) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &v.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubEffectiveRoute. +func (v VirtualHubEffectiveRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", v.AddressPrefixes) + populate(objectMap, "asPath", v.AsPath) + populate(objectMap, "nextHopType", v.NextHopType) + populate(objectMap, "nextHops", v.NextHops) + populate(objectMap, "routeOrigin", v.RouteOrigin) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubEffectiveRoute. +func (v *VirtualHubEffectiveRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &v.AddressPrefixes) + delete(rawMsg, key) + case "asPath": + err = unpopulate(val, "AsPath", &v.AsPath) + delete(rawMsg, key) + case "nextHopType": + err = unpopulate(val, "NextHopType", &v.NextHopType) + delete(rawMsg, key) + case "nextHops": + err = unpopulate(val, "NextHops", &v.NextHops) + delete(rawMsg, key) + case "routeOrigin": + err = unpopulate(val, "RouteOrigin", &v.RouteOrigin) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubEffectiveRouteList. +func (v VirtualHubEffectiveRouteList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubEffectiveRouteList. +func (v *VirtualHubEffectiveRouteList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubID. +func (v VirtualHubID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubID. +func (v *VirtualHubID) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubProperties. +func (v VirtualHubProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefix", v.AddressPrefix) + populate(objectMap, "allowBranchToBranchTraffic", v.AllowBranchToBranchTraffic) + populate(objectMap, "azureFirewall", v.AzureFirewall) + populate(objectMap, "bgpConnections", v.BgpConnections) + populate(objectMap, "expressRouteGateway", v.ExpressRouteGateway) + populate(objectMap, "hubRoutingPreference", v.HubRoutingPreference) + populate(objectMap, "ipConfigurations", v.IPConfigurations) + populate(objectMap, "p2SVpnGateway", v.P2SVPNGateway) + populate(objectMap, "preferredRoutingGateway", v.PreferredRoutingGateway) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "routeMaps", v.RouteMaps) + populate(objectMap, "routeTable", v.RouteTable) + populate(objectMap, "routingState", v.RoutingState) + populate(objectMap, "sku", v.SKU) + populate(objectMap, "securityPartnerProvider", v.SecurityPartnerProvider) + populate(objectMap, "securityProviderName", v.SecurityProviderName) + populate(objectMap, "vpnGateway", v.VPNGateway) + populate(objectMap, "virtualHubRouteTableV2s", v.VirtualHubRouteTableV2S) + populate(objectMap, "virtualRouterAsn", v.VirtualRouterAsn) + populate(objectMap, "virtualRouterAutoScaleConfiguration", v.VirtualRouterAutoScaleConfiguration) + populate(objectMap, "virtualRouterIps", v.VirtualRouterIPs) + populate(objectMap, "virtualWan", v.VirtualWan) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubProperties. +func (v *VirtualHubProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefix": + err = unpopulate(val, "AddressPrefix", &v.AddressPrefix) + delete(rawMsg, key) + case "allowBranchToBranchTraffic": + err = unpopulate(val, "AllowBranchToBranchTraffic", &v.AllowBranchToBranchTraffic) + delete(rawMsg, key) + case "azureFirewall": + err = unpopulate(val, "AzureFirewall", &v.AzureFirewall) + delete(rawMsg, key) + case "bgpConnections": + err = unpopulate(val, "BgpConnections", &v.BgpConnections) + delete(rawMsg, key) + case "expressRouteGateway": + err = unpopulate(val, "ExpressRouteGateway", &v.ExpressRouteGateway) + delete(rawMsg, key) + case "hubRoutingPreference": + err = unpopulate(val, "HubRoutingPreference", &v.HubRoutingPreference) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &v.IPConfigurations) + delete(rawMsg, key) + case "p2SVpnGateway": + err = unpopulate(val, "P2SVPNGateway", &v.P2SVPNGateway) + delete(rawMsg, key) + case "preferredRoutingGateway": + err = unpopulate(val, "PreferredRoutingGateway", &v.PreferredRoutingGateway) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "routeMaps": + err = unpopulate(val, "RouteMaps", &v.RouteMaps) + delete(rawMsg, key) + case "routeTable": + err = unpopulate(val, "RouteTable", &v.RouteTable) + delete(rawMsg, key) + case "routingState": + err = unpopulate(val, "RoutingState", &v.RoutingState) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &v.SKU) + delete(rawMsg, key) + case "securityPartnerProvider": + err = unpopulate(val, "SecurityPartnerProvider", &v.SecurityPartnerProvider) + delete(rawMsg, key) + case "securityProviderName": + err = unpopulate(val, "SecurityProviderName", &v.SecurityProviderName) + delete(rawMsg, key) + case "vpnGateway": + err = unpopulate(val, "VPNGateway", &v.VPNGateway) + delete(rawMsg, key) + case "virtualHubRouteTableV2s": + err = unpopulate(val, "VirtualHubRouteTableV2S", &v.VirtualHubRouteTableV2S) + delete(rawMsg, key) + case "virtualRouterAsn": + err = unpopulate(val, "VirtualRouterAsn", &v.VirtualRouterAsn) + delete(rawMsg, key) + case "virtualRouterAutoScaleConfiguration": + err = unpopulate(val, "VirtualRouterAutoScaleConfiguration", &v.VirtualRouterAutoScaleConfiguration) + delete(rawMsg, key) + case "virtualRouterIps": + err = unpopulate(val, "VirtualRouterIPs", &v.VirtualRouterIPs) + delete(rawMsg, key) + case "virtualWan": + err = unpopulate(val, "VirtualWan", &v.VirtualWan) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubRoute. +func (v VirtualHubRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressPrefixes", v.AddressPrefixes) + populate(objectMap, "nextHopIpAddress", v.NextHopIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubRoute. +func (v *VirtualHubRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressPrefixes": + err = unpopulate(val, "AddressPrefixes", &v.AddressPrefixes) + delete(rawMsg, key) + case "nextHopIpAddress": + err = unpopulate(val, "NextHopIPAddress", &v.NextHopIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTable. +func (v VirtualHubRouteTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "routes", v.Routes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubRouteTable. +func (v *VirtualHubRouteTable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "routes": + err = unpopulate(val, "Routes", &v.Routes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTableV2. +func (v VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubRouteTableV2. +func (v *VirtualHubRouteTableV2) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTableV2Properties. +func (v VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attachedConnections", v.AttachedConnections) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "routes", v.Routes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubRouteTableV2Properties. +func (v *VirtualHubRouteTableV2Properties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attachedConnections": + err = unpopulate(val, "AttachedConnections", &v.AttachedConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "routes": + err = unpopulate(val, "Routes", &v.Routes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteV2. +func (v VirtualHubRouteV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationType", v.DestinationType) + populate(objectMap, "destinations", v.Destinations) + populate(objectMap, "nextHopType", v.NextHopType) + populate(objectMap, "nextHops", v.NextHops) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubRouteV2. +func (v *VirtualHubRouteV2) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationType": + err = unpopulate(val, "DestinationType", &v.DestinationType) + delete(rawMsg, key) + case "destinations": + err = unpopulate(val, "Destinations", &v.Destinations) + delete(rawMsg, key) + case "nextHopType": + err = unpopulate(val, "NextHopType", &v.NextHopType) + delete(rawMsg, key) + case "nextHops": + err = unpopulate(val, "NextHops", &v.NextHops) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetwork. +func (v VirtualNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "extendedLocation", v.ExtendedLocation) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetwork. +func (v *VirtualNetwork) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &v.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkBgpCommunities. +func (v VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "regionalCommunity", v.RegionalCommunity) + populate(objectMap, "virtualNetworkCommunity", v.VirtualNetworkCommunity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkBgpCommunities. +func (v *VirtualNetworkBgpCommunities) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "regionalCommunity": + err = unpopulate(val, "RegionalCommunity", &v.RegionalCommunity) + delete(rawMsg, key) + case "virtualNetworkCommunity": + err = unpopulate(val, "VirtualNetworkCommunity", &v.VirtualNetworkCommunity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkConnectionGatewayReference. +func (v VirtualNetworkConnectionGatewayReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkConnectionGatewayReference. +func (v *VirtualNetworkConnectionGatewayReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkDdosProtectionStatusResult. +func (v VirtualNetworkDdosProtectionStatusResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkDdosProtectionStatusResult. +func (v *VirtualNetworkDdosProtectionStatusResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkEncryption. +func (v VirtualNetworkEncryption) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", v.Enabled) + populate(objectMap, "enforcement", v.Enforcement) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkEncryption. +func (v *VirtualNetworkEncryption) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &v.Enabled) + delete(rawMsg, key) + case "enforcement": + err = unpopulate(val, "Enforcement", &v.Enforcement) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGateway. +func (v VirtualNetworkGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "extendedLocation", v.ExtendedLocation) + populate(objectMap, "id", v.ID) + populate(objectMap, "identity", v.Identity) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGateway. +func (v *VirtualNetworkGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &v.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &v.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayAutoScaleBounds. +func (v VirtualNetworkGatewayAutoScaleBounds) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "max", v.Max) + populate(objectMap, "min", v.Min) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayAutoScaleBounds. +func (v *VirtualNetworkGatewayAutoScaleBounds) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "max": + err = unpopulate(val, "Max", &v.Max) + delete(rawMsg, key) + case "min": + err = unpopulate(val, "Min", &v.Min) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayAutoScaleConfiguration. +func (v VirtualNetworkGatewayAutoScaleConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bounds", v.Bounds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayAutoScaleConfiguration. +func (v *VirtualNetworkGatewayAutoScaleConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bounds": + err = unpopulate(val, "Bounds", &v.Bounds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnection. +func (v VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnection. +func (v *VirtualNetworkGatewayConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListEntity. +func (v VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionListEntity. +func (v *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListEntityPropertiesFormat. +func (v VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationKey", v.AuthorizationKey) + populate(objectMap, "connectionMode", v.ConnectionMode) + populate(objectMap, "connectionProtocol", v.ConnectionProtocol) + populate(objectMap, "connectionStatus", v.ConnectionStatus) + populate(objectMap, "connectionType", v.ConnectionType) + populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) + populate(objectMap, "enableBgp", v.EnableBgp) + populate(objectMap, "enablePrivateLinkFastPath", v.EnablePrivateLinkFastPath) + populate(objectMap, "expressRouteGatewayBypass", v.ExpressRouteGatewayBypass) + populate(objectMap, "gatewayCustomBgpIpAddresses", v.GatewayCustomBgpIPAddresses) + populate(objectMap, "ipsecPolicies", v.IPSecPolicies) + populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) + populate(objectMap, "localNetworkGateway2", v.LocalNetworkGateway2) + populate(objectMap, "peer", v.Peer) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resourceGuid", v.ResourceGUID) + populate(objectMap, "routingWeight", v.RoutingWeight) + populate(objectMap, "sharedKey", v.SharedKey) + populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) + populate(objectMap, "tunnelConnectionStatus", v.TunnelConnectionStatus) + populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) + populate(objectMap, "virtualNetworkGateway1", v.VirtualNetworkGateway1) + populate(objectMap, "virtualNetworkGateway2", v.VirtualNetworkGateway2) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionListEntityPropertiesFormat. +func (v *VirtualNetworkGatewayConnectionListEntityPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationKey": + err = unpopulate(val, "AuthorizationKey", &v.AuthorizationKey) + delete(rawMsg, key) + case "connectionMode": + err = unpopulate(val, "ConnectionMode", &v.ConnectionMode) + delete(rawMsg, key) + case "connectionProtocol": + err = unpopulate(val, "ConnectionProtocol", &v.ConnectionProtocol) + delete(rawMsg, key) + case "connectionStatus": + err = unpopulate(val, "ConnectionStatus", &v.ConnectionStatus) + delete(rawMsg, key) + case "connectionType": + err = unpopulate(val, "ConnectionType", &v.ConnectionType) + delete(rawMsg, key) + case "egressBytesTransferred": + err = unpopulate(val, "EgressBytesTransferred", &v.EgressBytesTransferred) + delete(rawMsg, key) + case "enableBgp": + err = unpopulate(val, "EnableBgp", &v.EnableBgp) + delete(rawMsg, key) + case "enablePrivateLinkFastPath": + err = unpopulate(val, "EnablePrivateLinkFastPath", &v.EnablePrivateLinkFastPath) + delete(rawMsg, key) + case "expressRouteGatewayBypass": + err = unpopulate(val, "ExpressRouteGatewayBypass", &v.ExpressRouteGatewayBypass) + delete(rawMsg, key) + case "gatewayCustomBgpIpAddresses": + err = unpopulate(val, "GatewayCustomBgpIPAddresses", &v.GatewayCustomBgpIPAddresses) + delete(rawMsg, key) + case "ipsecPolicies": + err = unpopulate(val, "IPSecPolicies", &v.IPSecPolicies) + delete(rawMsg, key) + case "ingressBytesTransferred": + err = unpopulate(val, "IngressBytesTransferred", &v.IngressBytesTransferred) + delete(rawMsg, key) + case "localNetworkGateway2": + err = unpopulate(val, "LocalNetworkGateway2", &v.LocalNetworkGateway2) + delete(rawMsg, key) + case "peer": + err = unpopulate(val, "Peer", &v.Peer) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) + delete(rawMsg, key) + case "routingWeight": + err = unpopulate(val, "RoutingWeight", &v.RoutingWeight) + delete(rawMsg, key) + case "sharedKey": + err = unpopulate(val, "SharedKey", &v.SharedKey) + delete(rawMsg, key) + case "trafficSelectorPolicies": + err = unpopulate(val, "TrafficSelectorPolicies", &v.TrafficSelectorPolicies) + delete(rawMsg, key) + case "tunnelConnectionStatus": + err = unpopulate(val, "TunnelConnectionStatus", &v.TunnelConnectionStatus) + delete(rawMsg, key) + case "usePolicyBasedTrafficSelectors": + err = unpopulate(val, "UsePolicyBasedTrafficSelectors", &v.UsePolicyBasedTrafficSelectors) + delete(rawMsg, key) + case "virtualNetworkGateway1": + err = unpopulate(val, "VirtualNetworkGateway1", &v.VirtualNetworkGateway1) + delete(rawMsg, key) + case "virtualNetworkGateway2": + err = unpopulate(val, "VirtualNetworkGateway2", &v.VirtualNetworkGateway2) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListResult. +func (v VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionListResult. +func (v *VirtualNetworkGatewayConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionPropertiesFormat. +func (v VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizationKey", v.AuthorizationKey) + populate(objectMap, "connectionMode", v.ConnectionMode) + populate(objectMap, "connectionProtocol", v.ConnectionProtocol) + populate(objectMap, "connectionStatus", v.ConnectionStatus) + populate(objectMap, "connectionType", v.ConnectionType) + populate(objectMap, "dpdTimeoutSeconds", v.DpdTimeoutSeconds) + populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) + populate(objectMap, "egressNatRules", v.EgressNatRules) + populate(objectMap, "enableBgp", v.EnableBgp) + populate(objectMap, "enablePrivateLinkFastPath", v.EnablePrivateLinkFastPath) + populate(objectMap, "expressRouteGatewayBypass", v.ExpressRouteGatewayBypass) + populate(objectMap, "gatewayCustomBgpIpAddresses", v.GatewayCustomBgpIPAddresses) + populate(objectMap, "ipsecPolicies", v.IPSecPolicies) + populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) + populate(objectMap, "ingressNatRules", v.IngressNatRules) + populate(objectMap, "localNetworkGateway2", v.LocalNetworkGateway2) + populate(objectMap, "peer", v.Peer) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resourceGuid", v.ResourceGUID) + populate(objectMap, "routingWeight", v.RoutingWeight) + populate(objectMap, "sharedKey", v.SharedKey) + populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) + populate(objectMap, "tunnelConnectionStatus", v.TunnelConnectionStatus) + populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) + populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) + populate(objectMap, "virtualNetworkGateway1", v.VirtualNetworkGateway1) + populate(objectMap, "virtualNetworkGateway2", v.VirtualNetworkGateway2) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionPropertiesFormat. +func (v *VirtualNetworkGatewayConnectionPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizationKey": + err = unpopulate(val, "AuthorizationKey", &v.AuthorizationKey) + delete(rawMsg, key) + case "connectionMode": + err = unpopulate(val, "ConnectionMode", &v.ConnectionMode) + delete(rawMsg, key) + case "connectionProtocol": + err = unpopulate(val, "ConnectionProtocol", &v.ConnectionProtocol) + delete(rawMsg, key) + case "connectionStatus": + err = unpopulate(val, "ConnectionStatus", &v.ConnectionStatus) + delete(rawMsg, key) + case "connectionType": + err = unpopulate(val, "ConnectionType", &v.ConnectionType) + delete(rawMsg, key) + case "dpdTimeoutSeconds": + err = unpopulate(val, "DpdTimeoutSeconds", &v.DpdTimeoutSeconds) + delete(rawMsg, key) + case "egressBytesTransferred": + err = unpopulate(val, "EgressBytesTransferred", &v.EgressBytesTransferred) + delete(rawMsg, key) + case "egressNatRules": + err = unpopulate(val, "EgressNatRules", &v.EgressNatRules) + delete(rawMsg, key) + case "enableBgp": + err = unpopulate(val, "EnableBgp", &v.EnableBgp) + delete(rawMsg, key) + case "enablePrivateLinkFastPath": + err = unpopulate(val, "EnablePrivateLinkFastPath", &v.EnablePrivateLinkFastPath) + delete(rawMsg, key) + case "expressRouteGatewayBypass": + err = unpopulate(val, "ExpressRouteGatewayBypass", &v.ExpressRouteGatewayBypass) + delete(rawMsg, key) + case "gatewayCustomBgpIpAddresses": + err = unpopulate(val, "GatewayCustomBgpIPAddresses", &v.GatewayCustomBgpIPAddresses) + delete(rawMsg, key) + case "ipsecPolicies": + err = unpopulate(val, "IPSecPolicies", &v.IPSecPolicies) + delete(rawMsg, key) + case "ingressBytesTransferred": + err = unpopulate(val, "IngressBytesTransferred", &v.IngressBytesTransferred) + delete(rawMsg, key) + case "ingressNatRules": + err = unpopulate(val, "IngressNatRules", &v.IngressNatRules) + delete(rawMsg, key) + case "localNetworkGateway2": + err = unpopulate(val, "LocalNetworkGateway2", &v.LocalNetworkGateway2) + delete(rawMsg, key) + case "peer": + err = unpopulate(val, "Peer", &v.Peer) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) + delete(rawMsg, key) + case "routingWeight": + err = unpopulate(val, "RoutingWeight", &v.RoutingWeight) + delete(rawMsg, key) + case "sharedKey": + err = unpopulate(val, "SharedKey", &v.SharedKey) + delete(rawMsg, key) + case "trafficSelectorPolicies": + err = unpopulate(val, "TrafficSelectorPolicies", &v.TrafficSelectorPolicies) + delete(rawMsg, key) + case "tunnelConnectionStatus": + err = unpopulate(val, "TunnelConnectionStatus", &v.TunnelConnectionStatus) + delete(rawMsg, key) + case "useLocalAzureIpAddress": + err = unpopulate(val, "UseLocalAzureIPAddress", &v.UseLocalAzureIPAddress) + delete(rawMsg, key) + case "usePolicyBasedTrafficSelectors": + err = unpopulate(val, "UsePolicyBasedTrafficSelectors", &v.UsePolicyBasedTrafficSelectors) + delete(rawMsg, key) + case "virtualNetworkGateway1": + err = unpopulate(val, "VirtualNetworkGateway1", &v.VirtualNetworkGateway1) + delete(rawMsg, key) + case "virtualNetworkGateway2": + err = unpopulate(val, "VirtualNetworkGateway2", &v.VirtualNetworkGateway2) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayIPConfiguration. +func (v VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayIPConfiguration. +func (v *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayIPConfigurationPropertiesFormat. +func (v VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateIPAddress", v.PrivateIPAddress) + populate(objectMap, "privateIPAllocationMethod", v.PrivateIPAllocationMethod) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "publicIPAddress", v.PublicIPAddress) + populate(objectMap, "subnet", v.Subnet) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayIPConfigurationPropertiesFormat. +func (v *VirtualNetworkGatewayIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateIPAddress": + err = unpopulate(val, "PrivateIPAddress", &v.PrivateIPAddress) + delete(rawMsg, key) + case "privateIPAllocationMethod": + err = unpopulate(val, "PrivateIPAllocationMethod", &v.PrivateIPAllocationMethod) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "publicIPAddress": + err = unpopulate(val, "PublicIPAddress", &v.PublicIPAddress) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &v.Subnet) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayListConnectionsResult. +func (v VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayListConnectionsResult. +func (v *VirtualNetworkGatewayListConnectionsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayListResult. +func (v VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayListResult. +func (v *VirtualNetworkGatewayListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayNatRule. +func (v VirtualNetworkGatewayNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayNatRule. +func (v *VirtualNetworkGatewayNatRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayNatRuleProperties. +func (v VirtualNetworkGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "externalMappings", v.ExternalMappings) + populate(objectMap, "ipConfigurationId", v.IPConfigurationID) + populate(objectMap, "internalMappings", v.InternalMappings) + populate(objectMap, "mode", v.Mode) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayNatRuleProperties. +func (v *VirtualNetworkGatewayNatRuleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "externalMappings": + err = unpopulate(val, "ExternalMappings", &v.ExternalMappings) + delete(rawMsg, key) + case "ipConfigurationId": + err = unpopulate(val, "IPConfigurationID", &v.IPConfigurationID) + delete(rawMsg, key) + case "internalMappings": + err = unpopulate(val, "InternalMappings", &v.InternalMappings) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &v.Mode) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPolicyGroup. +func (v VirtualNetworkGatewayPolicyGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayPolicyGroup. +func (v *VirtualNetworkGatewayPolicyGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPolicyGroupMember. +func (v VirtualNetworkGatewayPolicyGroupMember) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributeType", v.AttributeType) + populate(objectMap, "attributeValue", v.AttributeValue) + populate(objectMap, "name", v.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayPolicyGroupMember. +func (v *VirtualNetworkGatewayPolicyGroupMember) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attributeType": + err = unpopulate(val, "AttributeType", &v.AttributeType) + delete(rawMsg, key) + case "attributeValue": + err = unpopulate(val, "AttributeValue", &v.AttributeValue) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPolicyGroupProperties. +func (v VirtualNetworkGatewayPolicyGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isDefault", v.IsDefault) + populate(objectMap, "policyMembers", v.PolicyMembers) + populate(objectMap, "priority", v.Priority) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "vngClientConnectionConfigurations", v.VngClientConnectionConfigurations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayPolicyGroupProperties. +func (v *VirtualNetworkGatewayPolicyGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isDefault": + err = unpopulate(val, "IsDefault", &v.IsDefault) + delete(rawMsg, key) + case "policyMembers": + err = unpopulate(val, "PolicyMembers", &v.PolicyMembers) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &v.Priority) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "vngClientConnectionConfigurations": + err = unpopulate(val, "VngClientConnectionConfigurations", &v.VngClientConnectionConfigurations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPropertiesFormat. +func (v VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeActive", v.Active) + populate(objectMap, "adminState", v.AdminState) + populate(objectMap, "allowRemoteVnetTraffic", v.AllowRemoteVnetTraffic) + populate(objectMap, "allowVirtualWanTraffic", v.AllowVirtualWanTraffic) + populate(objectMap, "autoScaleConfiguration", v.AutoScaleConfiguration) + populate(objectMap, "bgpSettings", v.BgpSettings) + populate(objectMap, "customRoutes", v.CustomRoutes) + populate(objectMap, "disableIPSecReplayProtection", v.DisableIPSecReplayProtection) + populate(objectMap, "enableBgp", v.EnableBgp) + populate(objectMap, "enableBgpRouteTranslationForNat", v.EnableBgpRouteTranslationForNat) + populate(objectMap, "enableDnsForwarding", v.EnableDNSForwarding) + populate(objectMap, "enablePrivateIpAddress", v.EnablePrivateIPAddress) + populate(objectMap, "gatewayDefaultSite", v.GatewayDefaultSite) + populate(objectMap, "gatewayType", v.GatewayType) + populate(objectMap, "ipConfigurations", v.IPConfigurations) + populate(objectMap, "inboundDnsForwardingEndpoint", v.InboundDNSForwardingEndpoint) + populate(objectMap, "natRules", v.NatRules) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resiliencyModel", v.ResiliencyModel) + populate(objectMap, "resourceGuid", v.ResourceGUID) + populate(objectMap, "sku", v.SKU) + populate(objectMap, "vNetExtendedLocationResourceId", v.VNetExtendedLocationResourceID) + populate(objectMap, "vpnClientConfiguration", v.VPNClientConfiguration) + populate(objectMap, "vpnGatewayGeneration", v.VPNGatewayGeneration) + populate(objectMap, "vpnType", v.VPNType) + populate(objectMap, "virtualNetworkGatewayPolicyGroups", v.VirtualNetworkGatewayPolicyGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayPropertiesFormat. +func (v *VirtualNetworkGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeActive": + err = unpopulate(val, "Active", &v.Active) + delete(rawMsg, key) + case "adminState": + err = unpopulate(val, "AdminState", &v.AdminState) + delete(rawMsg, key) + case "allowRemoteVnetTraffic": + err = unpopulate(val, "AllowRemoteVnetTraffic", &v.AllowRemoteVnetTraffic) + delete(rawMsg, key) + case "allowVirtualWanTraffic": + err = unpopulate(val, "AllowVirtualWanTraffic", &v.AllowVirtualWanTraffic) + delete(rawMsg, key) + case "autoScaleConfiguration": + err = unpopulate(val, "AutoScaleConfiguration", &v.AutoScaleConfiguration) + delete(rawMsg, key) + case "bgpSettings": + err = unpopulate(val, "BgpSettings", &v.BgpSettings) + delete(rawMsg, key) + case "customRoutes": + err = unpopulate(val, "CustomRoutes", &v.CustomRoutes) + delete(rawMsg, key) + case "disableIPSecReplayProtection": + err = unpopulate(val, "DisableIPSecReplayProtection", &v.DisableIPSecReplayProtection) + delete(rawMsg, key) + case "enableBgp": + err = unpopulate(val, "EnableBgp", &v.EnableBgp) + delete(rawMsg, key) + case "enableBgpRouteTranslationForNat": + err = unpopulate(val, "EnableBgpRouteTranslationForNat", &v.EnableBgpRouteTranslationForNat) + delete(rawMsg, key) + case "enableDnsForwarding": + err = unpopulate(val, "EnableDNSForwarding", &v.EnableDNSForwarding) + delete(rawMsg, key) + case "enablePrivateIpAddress": + err = unpopulate(val, "EnablePrivateIPAddress", &v.EnablePrivateIPAddress) + delete(rawMsg, key) + case "gatewayDefaultSite": + err = unpopulate(val, "GatewayDefaultSite", &v.GatewayDefaultSite) + delete(rawMsg, key) + case "gatewayType": + err = unpopulate(val, "GatewayType", &v.GatewayType) + delete(rawMsg, key) + case "ipConfigurations": + err = unpopulate(val, "IPConfigurations", &v.IPConfigurations) + delete(rawMsg, key) + case "inboundDnsForwardingEndpoint": + err = unpopulate(val, "InboundDNSForwardingEndpoint", &v.InboundDNSForwardingEndpoint) + delete(rawMsg, key) + case "natRules": + err = unpopulate(val, "NatRules", &v.NatRules) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "resiliencyModel": + err = unpopulate(val, "ResiliencyModel", &v.ResiliencyModel) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &v.SKU) + delete(rawMsg, key) + case "vNetExtendedLocationResourceId": + err = unpopulate(val, "VNetExtendedLocationResourceID", &v.VNetExtendedLocationResourceID) + delete(rawMsg, key) + case "vpnClientConfiguration": + err = unpopulate(val, "VPNClientConfiguration", &v.VPNClientConfiguration) + delete(rawMsg, key) + case "vpnGatewayGeneration": + err = unpopulate(val, "VPNGatewayGeneration", &v.VPNGatewayGeneration) + delete(rawMsg, key) + case "vpnType": + err = unpopulate(val, "VPNType", &v.VPNType) + delete(rawMsg, key) + case "virtualNetworkGatewayPolicyGroups": + err = unpopulate(val, "VirtualNetworkGatewayPolicyGroups", &v.VirtualNetworkGatewayPolicyGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewaySKU. +func (v VirtualNetworkGatewaySKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", v.Capacity) + populate(objectMap, "name", v.Name) + populate(objectMap, "tier", v.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaySKU. +func (v *VirtualNetworkGatewaySKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &v.Capacity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &v.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListResult. +func (v VirtualNetworkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkListResult. +func (v *VirtualNetworkListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListUsageResult. +func (v VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkListUsageResult. +func (v *VirtualNetworkListUsageResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeering. +func (v VirtualNetworkPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPeering. +func (v *VirtualNetworkPeering) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeeringListResult. +func (v VirtualNetworkPeeringListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPeeringListResult. +func (v *VirtualNetworkPeeringListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeeringPropertiesFormat. +func (v VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowForwardedTraffic", v.AllowForwardedTraffic) + populate(objectMap, "allowGatewayTransit", v.AllowGatewayTransit) + populate(objectMap, "allowVirtualNetworkAccess", v.AllowVirtualNetworkAccess) + populate(objectMap, "doNotVerifyRemoteGateways", v.DoNotVerifyRemoteGateways) + populate(objectMap, "enableOnlyIPv6Peering", v.EnableOnlyIPv6Peering) + populate(objectMap, "localAddressSpace", v.LocalAddressSpace) + populate(objectMap, "localSubnetNames", v.LocalSubnetNames) + populate(objectMap, "localVirtualNetworkAddressSpace", v.LocalVirtualNetworkAddressSpace) + populate(objectMap, "peerCompleteVnets", v.PeerCompleteVnets) + populate(objectMap, "peeringState", v.PeeringState) + populate(objectMap, "peeringSyncLevel", v.PeeringSyncLevel) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "remoteAddressSpace", v.RemoteAddressSpace) + populate(objectMap, "remoteBgpCommunities", v.RemoteBgpCommunities) + populate(objectMap, "remoteSubnetNames", v.RemoteSubnetNames) + populate(objectMap, "remoteVirtualNetwork", v.RemoteVirtualNetwork) + populate(objectMap, "remoteVirtualNetworkAddressSpace", v.RemoteVirtualNetworkAddressSpace) + populate(objectMap, "remoteVirtualNetworkEncryption", v.RemoteVirtualNetworkEncryption) + populate(objectMap, "resourceGuid", v.ResourceGUID) + populate(objectMap, "useRemoteGateways", v.UseRemoteGateways) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPeeringPropertiesFormat. +func (v *VirtualNetworkPeeringPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowForwardedTraffic": + err = unpopulate(val, "AllowForwardedTraffic", &v.AllowForwardedTraffic) + delete(rawMsg, key) + case "allowGatewayTransit": + err = unpopulate(val, "AllowGatewayTransit", &v.AllowGatewayTransit) + delete(rawMsg, key) + case "allowVirtualNetworkAccess": + err = unpopulate(val, "AllowVirtualNetworkAccess", &v.AllowVirtualNetworkAccess) + delete(rawMsg, key) + case "doNotVerifyRemoteGateways": + err = unpopulate(val, "DoNotVerifyRemoteGateways", &v.DoNotVerifyRemoteGateways) + delete(rawMsg, key) + case "enableOnlyIPv6Peering": + err = unpopulate(val, "EnableOnlyIPv6Peering", &v.EnableOnlyIPv6Peering) + delete(rawMsg, key) + case "localAddressSpace": + err = unpopulate(val, "LocalAddressSpace", &v.LocalAddressSpace) + delete(rawMsg, key) + case "localSubnetNames": + err = unpopulate(val, "LocalSubnetNames", &v.LocalSubnetNames) + delete(rawMsg, key) + case "localVirtualNetworkAddressSpace": + err = unpopulate(val, "LocalVirtualNetworkAddressSpace", &v.LocalVirtualNetworkAddressSpace) + delete(rawMsg, key) + case "peerCompleteVnets": + err = unpopulate(val, "PeerCompleteVnets", &v.PeerCompleteVnets) + delete(rawMsg, key) + case "peeringState": + err = unpopulate(val, "PeeringState", &v.PeeringState) + delete(rawMsg, key) + case "peeringSyncLevel": + err = unpopulate(val, "PeeringSyncLevel", &v.PeeringSyncLevel) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "remoteAddressSpace": + err = unpopulate(val, "RemoteAddressSpace", &v.RemoteAddressSpace) + delete(rawMsg, key) + case "remoteBgpCommunities": + err = unpopulate(val, "RemoteBgpCommunities", &v.RemoteBgpCommunities) + delete(rawMsg, key) + case "remoteSubnetNames": + err = unpopulate(val, "RemoteSubnetNames", &v.RemoteSubnetNames) + delete(rawMsg, key) + case "remoteVirtualNetwork": + err = unpopulate(val, "RemoteVirtualNetwork", &v.RemoteVirtualNetwork) + delete(rawMsg, key) + case "remoteVirtualNetworkAddressSpace": + err = unpopulate(val, "RemoteVirtualNetworkAddressSpace", &v.RemoteVirtualNetworkAddressSpace) + delete(rawMsg, key) + case "remoteVirtualNetworkEncryption": + err = unpopulate(val, "RemoteVirtualNetworkEncryption", &v.RemoteVirtualNetworkEncryption) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) + delete(rawMsg, key) + case "useRemoteGateways": + err = unpopulate(val, "UseRemoteGateways", &v.UseRemoteGateways) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesFormat. +func (v VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressSpace", v.AddressSpace) + populate(objectMap, "bgpCommunities", v.BgpCommunities) + populate(objectMap, "ddosProtectionPlan", v.DdosProtectionPlan) + populate(objectMap, "dhcpOptions", v.DhcpOptions) + populate(objectMap, "enableDdosProtection", v.EnableDdosProtection) + populate(objectMap, "enableVmProtection", v.EnableVMProtection) + populate(objectMap, "encryption", v.Encryption) + populate(objectMap, "flowLogs", v.FlowLogs) + populate(objectMap, "flowTimeoutInMinutes", v.FlowTimeoutInMinutes) + populate(objectMap, "ipAllocations", v.IPAllocations) + populate(objectMap, "privateEndpointVNetPolicies", v.PrivateEndpointVNetPolicies) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resourceGuid", v.ResourceGUID) + populate(objectMap, "subnets", v.Subnets) + populate(objectMap, "virtualNetworkPeerings", v.VirtualNetworkPeerings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPropertiesFormat. +func (v *VirtualNetworkPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressSpace": + err = unpopulate(val, "AddressSpace", &v.AddressSpace) + delete(rawMsg, key) + case "bgpCommunities": + err = unpopulate(val, "BgpCommunities", &v.BgpCommunities) + delete(rawMsg, key) + case "ddosProtectionPlan": + err = unpopulate(val, "DdosProtectionPlan", &v.DdosProtectionPlan) + delete(rawMsg, key) + case "dhcpOptions": + err = unpopulate(val, "DhcpOptions", &v.DhcpOptions) + delete(rawMsg, key) + case "enableDdosProtection": + err = unpopulate(val, "EnableDdosProtection", &v.EnableDdosProtection) + delete(rawMsg, key) + case "enableVmProtection": + err = unpopulate(val, "EnableVMProtection", &v.EnableVMProtection) + delete(rawMsg, key) + case "encryption": + err = unpopulate(val, "Encryption", &v.Encryption) + delete(rawMsg, key) + case "flowLogs": + err = unpopulate(val, "FlowLogs", &v.FlowLogs) + delete(rawMsg, key) + case "flowTimeoutInMinutes": + err = unpopulate(val, "FlowTimeoutInMinutes", &v.FlowTimeoutInMinutes) + delete(rawMsg, key) + case "ipAllocations": + err = unpopulate(val, "IPAllocations", &v.IPAllocations) + delete(rawMsg, key) + case "privateEndpointVNetPolicies": + err = unpopulate(val, "PrivateEndpointVNetPolicies", &v.PrivateEndpointVNetPolicies) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) + delete(rawMsg, key) + case "subnets": + err = unpopulate(val, "Subnets", &v.Subnets) + delete(rawMsg, key) + case "virtualNetworkPeerings": + err = unpopulate(val, "VirtualNetworkPeerings", &v.VirtualNetworkPeerings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTap. +func (v VirtualNetworkTap) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkTap. +func (v *VirtualNetworkTap) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTapListResult. +func (v VirtualNetworkTapListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkTapListResult. +func (v *VirtualNetworkTapListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTapPropertiesFormat. +func (v VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "destinationLoadBalancerFrontEndIPConfiguration", v.DestinationLoadBalancerFrontEndIPConfiguration) + populate(objectMap, "destinationNetworkInterfaceIPConfiguration", v.DestinationNetworkInterfaceIPConfiguration) + populate(objectMap, "destinationPort", v.DestinationPort) + populate(objectMap, "networkInterfaceTapConfigurations", v.NetworkInterfaceTapConfigurations) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resourceGuid", v.ResourceGUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkTapPropertiesFormat. +func (v *VirtualNetworkTapPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "destinationLoadBalancerFrontEndIPConfiguration": + err = unpopulate(val, "DestinationLoadBalancerFrontEndIPConfiguration", &v.DestinationLoadBalancerFrontEndIPConfiguration) + delete(rawMsg, key) + case "destinationNetworkInterfaceIPConfiguration": + err = unpopulate(val, "DestinationNetworkInterfaceIPConfiguration", &v.DestinationNetworkInterfaceIPConfiguration) + delete(rawMsg, key) + case "destinationPort": + err = unpopulate(val, "DestinationPort", &v.DestinationPort) + delete(rawMsg, key) + case "networkInterfaceTapConfigurations": + err = unpopulate(val, "NetworkInterfaceTapConfigurations", &v.NetworkInterfaceTapConfigurations) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "resourceGuid": + err = unpopulate(val, "ResourceGUID", &v.ResourceGUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkUsage. +func (v VirtualNetworkUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", v.CurrentValue) + populate(objectMap, "id", v.ID) + populate(objectMap, "limit", v.Limit) + populate(objectMap, "name", v.Name) + populate(objectMap, "unit", v.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkUsage. +func (v *VirtualNetworkUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &v.CurrentValue) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &v.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &v.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkUsageName. +func (v VirtualNetworkUsageName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", v.LocalizedValue) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkUsageName. +func (v *VirtualNetworkUsageName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &v.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouter. +func (v VirtualRouter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouter. +func (v *VirtualRouter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouterAutoScaleConfiguration. +func (v VirtualRouterAutoScaleConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "minCapacity", v.MinCapacity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterAutoScaleConfiguration. +func (v *VirtualRouterAutoScaleConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "minCapacity": + err = unpopulate(val, "MinCapacity", &v.MinCapacity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouterListResult. +func (v VirtualRouterListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterListResult. +func (v *VirtualRouterListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeering. +func (v VirtualRouterPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterPeering. +func (v *VirtualRouterPeering) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeeringListResult. +func (v VirtualRouterPeeringListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterPeeringListResult. +func (v *VirtualRouterPeeringListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeeringProperties. +func (v VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "peerAsn", v.PeerAsn) + populate(objectMap, "peerIp", v.PeerIP) + populate(objectMap, "provisioningState", v.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterPeeringProperties. +func (v *VirtualRouterPeeringProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "peerAsn": + err = unpopulate(val, "PeerAsn", &v.PeerAsn) + delete(rawMsg, key) + case "peerIp": + err = unpopulate(val, "PeerIP", &v.PeerIP) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPropertiesFormat. +func (v VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostedGateway", v.HostedGateway) + populate(objectMap, "hostedSubnet", v.HostedSubnet) + populate(objectMap, "peerings", v.Peerings) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "virtualRouterAsn", v.VirtualRouterAsn) + populate(objectMap, "virtualRouterIps", v.VirtualRouterIPs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualRouterPropertiesFormat. +func (v *VirtualRouterPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostedGateway": + err = unpopulate(val, "HostedGateway", &v.HostedGateway) + delete(rawMsg, key) + case "hostedSubnet": + err = unpopulate(val, "HostedSubnet", &v.HostedSubnet) + delete(rawMsg, key) + case "peerings": + err = unpopulate(val, "Peerings", &v.Peerings) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "virtualRouterAsn": + err = unpopulate(val, "VirtualRouterAsn", &v.VirtualRouterAsn) + delete(rawMsg, key) + case "virtualRouterIps": + err = unpopulate(val, "VirtualRouterIPs", &v.VirtualRouterIPs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualWAN. +func (v VirtualWAN) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualWAN. +func (v *VirtualWAN) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &v.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualWanProperties. +func (v VirtualWanProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowBranchToBranchTraffic", v.AllowBranchToBranchTraffic) + populate(objectMap, "allowVnetToVnetTraffic", v.AllowVnetToVnetTraffic) + populate(objectMap, "disableVpnEncryption", v.DisableVPNEncryption) + populate(objectMap, "office365LocalBreakoutCategory", v.Office365LocalBreakoutCategory) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "type", v.Type) + populate(objectMap, "vpnSites", v.VPNSites) + populate(objectMap, "virtualHubs", v.VirtualHubs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualWanProperties. +func (v *VirtualWanProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowBranchToBranchTraffic": + err = unpopulate(val, "AllowBranchToBranchTraffic", &v.AllowBranchToBranchTraffic) + delete(rawMsg, key) + case "allowVnetToVnetTraffic": + err = unpopulate(val, "AllowVnetToVnetTraffic", &v.AllowVnetToVnetTraffic) + delete(rawMsg, key) + case "disableVpnEncryption": + err = unpopulate(val, "DisableVPNEncryption", &v.DisableVPNEncryption) + delete(rawMsg, key) + case "office365LocalBreakoutCategory": + err = unpopulate(val, "Office365LocalBreakoutCategory", &v.Office365LocalBreakoutCategory) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + case "vpnSites": + err = unpopulate(val, "VPNSites", &v.VPNSites) + delete(rawMsg, key) + case "virtualHubs": + err = unpopulate(val, "VirtualHubs", &v.VirtualHubs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualWanSecurityProvider. +func (v VirtualWanSecurityProvider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", v.Name) + populate(objectMap, "type", v.Type) + populate(objectMap, "url", v.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualWanSecurityProvider. +func (v *VirtualWanSecurityProvider) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &v.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualWanSecurityProviders. +func (v VirtualWanSecurityProviders) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "supportedProviders", v.SupportedProviders) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualWanSecurityProviders. +func (v *VirtualWanSecurityProviders) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "supportedProviders": + err = unpopulate(val, "SupportedProviders", &v.SupportedProviders) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualWanVPNProfileParameters. +func (v VirtualWanVPNProfileParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authenticationMethod", v.AuthenticationMethod) + populate(objectMap, "vpnServerConfigurationResourceId", v.VPNServerConfigurationResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualWanVPNProfileParameters. +func (v *VirtualWanVPNProfileParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authenticationMethod": + err = unpopulate(val, "AuthenticationMethod", &v.AuthenticationMethod) + delete(rawMsg, key) + case "vpnServerConfigurationResourceId": + err = unpopulate(val, "VPNServerConfigurationResourceID", &v.VPNServerConfigurationResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VnetRoute. +func (v VnetRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bgpConnections", v.BgpConnections) + populate(objectMap, "staticRoutes", v.StaticRoutes) + populate(objectMap, "staticRoutesConfig", v.StaticRoutesConfig) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VnetRoute. +func (v *VnetRoute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bgpConnections": + err = unpopulate(val, "BgpConnections", &v.BgpConnections) + delete(rawMsg, key) + case "staticRoutes": + err = unpopulate(val, "StaticRoutes", &v.StaticRoutes) + delete(rawMsg, key) + case "staticRoutesConfig": + err = unpopulate(val, "StaticRoutesConfig", &v.StaticRoutesConfig) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VngClientConnectionConfiguration. +func (v VngClientConnectionConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VngClientConnectionConfiguration. +func (v *VngClientConnectionConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &v.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VngClientConnectionConfigurationProperties. +func (v VngClientConnectionConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "vpnClientAddressPool", v.VPNClientAddressPool) + populate(objectMap, "virtualNetworkGatewayPolicyGroups", v.VirtualNetworkGatewayPolicyGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VngClientConnectionConfigurationProperties. +func (v *VngClientConnectionConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "vpnClientAddressPool": + err = unpopulate(val, "VPNClientAddressPool", &v.VPNClientAddressPool) + delete(rawMsg, key) + case "virtualNetworkGatewayPolicyGroups": + err = unpopulate(val, "VirtualNetworkGatewayPolicyGroups", &v.VirtualNetworkGatewayPolicyGroups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Watcher. +func (w Watcher) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", w.Etag) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Watcher. +func (w *Watcher) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &w.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WatcherListResult. +func (w WatcherListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WatcherListResult. +func (w *WatcherListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WatcherPropertiesFormat. +func (w WatcherPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", w.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WatcherPropertiesFormat. +func (w *WatcherPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallCustomRule. +func (w WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", w.Action) + populate(objectMap, "etag", w.Etag) + populate(objectMap, "groupByUserSession", w.GroupByUserSession) + populate(objectMap, "matchConditions", w.MatchConditions) + populate(objectMap, "name", w.Name) + populate(objectMap, "priority", w.Priority) + populate(objectMap, "rateLimitDuration", w.RateLimitDuration) + populate(objectMap, "rateLimitThreshold", w.RateLimitThreshold) + populate(objectMap, "ruleType", w.RuleType) + populate(objectMap, "state", w.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallCustomRule. +func (w *WebApplicationFirewallCustomRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &w.Action) + delete(rawMsg, key) + case "etag": + err = unpopulate(val, "Etag", &w.Etag) + delete(rawMsg, key) + case "groupByUserSession": + err = unpopulate(val, "GroupByUserSession", &w.GroupByUserSession) + delete(rawMsg, key) + case "matchConditions": + err = unpopulate(val, "MatchConditions", &w.MatchConditions) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &w.Priority) + delete(rawMsg, key) + case "rateLimitDuration": + err = unpopulate(val, "RateLimitDuration", &w.RateLimitDuration) + delete(rawMsg, key) + case "rateLimitThreshold": + err = unpopulate(val, "RateLimitThreshold", &w.RateLimitThreshold) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, "RuleType", &w.RuleType) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicy. +func (w WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", w.Etag) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicy. +func (w *WebApplicationFirewallPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "etag": + err = unpopulate(val, "Etag", &w.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyListResult. +func (w WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyListResult. +func (w *WebApplicationFirewallPolicyListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyPropertiesFormat. +func (w WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationGatewayForContainers", w.ApplicationGatewayForContainers) + populate(objectMap, "applicationGateways", w.ApplicationGateways) + populate(objectMap, "customRules", w.CustomRules) + populate(objectMap, "httpListeners", w.HTTPListeners) + populate(objectMap, "managedRules", w.ManagedRules) + populate(objectMap, "pathBasedRules", w.PathBasedRules) + populate(objectMap, "policySettings", w.PolicySettings) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "resourceState", w.ResourceState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallPolicyPropertiesFormat. +func (w *WebApplicationFirewallPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationGatewayForContainers": + err = unpopulate(val, "ApplicationGatewayForContainers", &w.ApplicationGatewayForContainers) + delete(rawMsg, key) + case "applicationGateways": + err = unpopulate(val, "ApplicationGateways", &w.ApplicationGateways) + delete(rawMsg, key) + case "customRules": + err = unpopulate(val, "CustomRules", &w.CustomRules) + delete(rawMsg, key) + case "httpListeners": + err = unpopulate(val, "HTTPListeners", &w.HTTPListeners) + delete(rawMsg, key) + case "managedRules": + err = unpopulate(val, "ManagedRules", &w.ManagedRules) + delete(rawMsg, key) + case "pathBasedRules": + err = unpopulate(val, "PathBasedRules", &w.PathBasedRules) + delete(rawMsg, key) + case "policySettings": + err = unpopulate(val, "PolicySettings", &w.PolicySettings) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "resourceState": + err = unpopulate(val, "ResourceState", &w.ResourceState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallScrubbingRules. +func (w WebApplicationFirewallScrubbingRules) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "matchVariable", w.MatchVariable) + populate(objectMap, "selector", w.Selector) + populate(objectMap, "selectorMatchOperator", w.SelectorMatchOperator) + populate(objectMap, "state", w.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WebApplicationFirewallScrubbingRules. +func (w *WebApplicationFirewallScrubbingRules) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "matchVariable": + err = unpopulate(val, "MatchVariable", &w.MatchVariable) + delete(rawMsg, key) + case "selector": + err = unpopulate(val, "Selector", &w.Selector) + delete(rawMsg, key) + case "selectorMatchOperator": + err = unpopulate(val, "SelectorMatchOperator", &w.SelectorMatchOperator) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &w.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/natgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/natgateways_client.go new file mode 100644 index 00000000..c30b1dfe --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/natgateways_client.go @@ -0,0 +1,450 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// NatGatewaysClient contains the methods for the NatGateways group. +// Don't use this type directly, use NewNatGatewaysClient() instead. +type NatGatewaysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewNatGatewaysClient creates a new instance of NatGatewaysClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewNatGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NatGatewaysClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &NatGatewaysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a nat gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - natGatewayName - The name of the nat gateway. +// - parameters - Parameters supplied to the create or update nat gateway operation. +// - options - NatGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the NatGatewaysClient.BeginCreateOrUpdate +// method. +func (client *NatGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway, options *NatGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[NatGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, natGatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NatGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NatGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a nat gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *NatGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway, options *NatGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "NatGatewaysClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, natGatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *NatGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway, options *NatGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if natGatewayName == "" { + return nil, errors.New("parameter natGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{natGatewayName}", url.PathEscape(natGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified nat gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - natGatewayName - The name of the nat gateway. +// - options - NatGatewaysClientBeginDeleteOptions contains the optional parameters for the NatGatewaysClient.BeginDelete method. +func (client *NatGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientBeginDeleteOptions) (*runtime.Poller[NatGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, natGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NatGatewaysClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NatGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified nat gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *NatGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "NatGatewaysClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, natGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *NatGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if natGatewayName == "" { + return nil, errors.New("parameter natGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{natGatewayName}", url.PathEscape(natGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified nat gateway in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - natGatewayName - The name of the nat gateway. +// - options - NatGatewaysClientGetOptions contains the optional parameters for the NatGatewaysClient.Get method. +func (client *NatGatewaysClient) Get(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientGetOptions) (NatGatewaysClientGetResponse, error) { + var err error + const operationName = "NatGatewaysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, natGatewayName, options) + if err != nil { + return NatGatewaysClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return NatGatewaysClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NatGatewaysClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *NatGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if natGatewayName == "" { + return nil, errors.New("parameter natGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{natGatewayName}", url.PathEscape(natGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *NatGatewaysClient) getHandleResponse(resp *http.Response) (NatGatewaysClientGetResponse, error) { + result := NatGatewaysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NatGateway); err != nil { + return NatGatewaysClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all nat gateways in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.NewListPager method. +func (client *NatGatewaysClient) NewListPager(resourceGroupName string, options *NatGatewaysClientListOptions) *runtime.Pager[NatGatewaysClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[NatGatewaysClientListResponse]{ + More: func(page NatGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *NatGatewaysClientListResponse) (NatGatewaysClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NatGatewaysClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return NatGatewaysClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *NatGatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *NatGatewaysClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *NatGatewaysClient) listHandleResponse(resp *http.Response) (NatGatewaysClientListResponse, error) { + result := NatGatewaysClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NatGatewayListResult); err != nil { + return NatGatewaysClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the Nat Gateways in a subscription. +// +// Generated from API version 2024-05-01 +// - options - NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.NewListAllPager method. +func (client *NatGatewaysClient) NewListAllPager(options *NatGatewaysClientListAllOptions) *runtime.Pager[NatGatewaysClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[NatGatewaysClientListAllResponse]{ + More: func(page NatGatewaysClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *NatGatewaysClientListAllResponse) (NatGatewaysClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NatGatewaysClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return NatGatewaysClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *NatGatewaysClient) listAllCreateRequest(ctx context.Context, options *NatGatewaysClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *NatGatewaysClient) listAllHandleResponse(resp *http.Response) (NatGatewaysClientListAllResponse, error) { + result := NatGatewaysClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NatGatewayListResult); err != nil { + return NatGatewaysClientListAllResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates nat gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - natGatewayName - The name of the nat gateway. +// - parameters - Parameters supplied to update nat gateway tags. +// - options - NatGatewaysClientUpdateTagsOptions contains the optional parameters for the NatGatewaysClient.UpdateTags method. +func (client *NatGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject, options *NatGatewaysClientUpdateTagsOptions) (NatGatewaysClientUpdateTagsResponse, error) { + var err error + const operationName = "NatGatewaysClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, natGatewayName, parameters, options) + if err != nil { + return NatGatewaysClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return NatGatewaysClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NatGatewaysClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *NatGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject, options *NatGatewaysClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if natGatewayName == "" { + return nil, errors.New("parameter natGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{natGatewayName}", url.PathEscape(natGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *NatGatewaysClient) updateTagsHandleResponse(resp *http.Response) (NatGatewaysClientUpdateTagsResponse, error) { + result := NatGatewaysClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NatGateway); err != nil { + return NatGatewaysClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/natrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/natrules_client.go new file mode 100644 index 00000000..f521f352 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/natrules_client.go @@ -0,0 +1,346 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// NatRulesClient contains the methods for the NatRules group. +// Don't use this type directly, use NewNatRulesClient() instead. +type NatRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewNatRulesClient creates a new instance of NatRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NatRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &NatRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - natRuleParameters - Parameters supplied to create or Update a Nat Rule. +// - options - NatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the NatRulesClient.BeginCreateOrUpdate +// method. +func (client *NatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VPNGatewayNatRule, options *NatRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[NatRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, natRuleName, natRuleParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NatRulesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NatRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *NatRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VPNGatewayNatRule, options *NatRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "NatRulesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, natRuleName, natRuleParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *NatRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VPNGatewayNatRule, options *NatRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if natRuleName == "" { + return nil, errors.New("parameter natRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, natRuleParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a nat rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - options - NatRulesClientBeginDeleteOptions contains the optional parameters for the NatRulesClient.BeginDelete method. +func (client *NatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientBeginDeleteOptions) (*runtime.Poller[NatRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, natRuleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[NatRulesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[NatRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a nat rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *NatRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "NatRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, natRuleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *NatRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if natRuleName == "" { + return nil, errors.New("parameter natRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a nat ruleGet. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - options - NatRulesClientGetOptions contains the optional parameters for the NatRulesClient.Get method. +func (client *NatRulesClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientGetOptions) (NatRulesClientGetResponse, error) { + var err error + const operationName = "NatRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, natRuleName, options) + if err != nil { + return NatRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return NatRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return NatRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *NatRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if natRuleName == "" { + return nil, errors.New("parameter natRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *NatRulesClient) getHandleResponse(resp *http.Response) (NatRulesClientGetResponse, error) { + result := NatRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VPNGatewayNatRule); err != nil { + return NatRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListByVPNGatewayPager - Retrieves all nat rules for a particular virtual wan vpn gateway. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.NewListByVPNGatewayPager +// method. +func (client *NatRulesClient) NewListByVPNGatewayPager(resourceGroupName string, gatewayName string, options *NatRulesClientListByVPNGatewayOptions) *runtime.Pager[NatRulesClientListByVPNGatewayResponse] { + return runtime.NewPager(runtime.PagingHandler[NatRulesClientListByVPNGatewayResponse]{ + More: func(page NatRulesClientListByVPNGatewayResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *NatRulesClientListByVPNGatewayResponse) (NatRulesClientListByVPNGatewayResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "NatRulesClient.NewListByVPNGatewayPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) + }, nil) + if err != nil { + return NatRulesClientListByVPNGatewayResponse{}, err + } + return client.listByVPNGatewayHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByVPNGatewayCreateRequest creates the ListByVPNGateway request. +func (client *NatRulesClient) listByVPNGatewayCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *NatRulesClientListByVPNGatewayOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByVPNGatewayHandleResponse handles the ListByVPNGateway response. +func (client *NatRulesClient) listByVPNGatewayHandleResponse(resp *http.Response) (NatRulesClientListByVPNGatewayResponse, error) { + result := NatRulesClientListByVPNGatewayResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNGatewayNatRulesResult); err != nil { + return NatRulesClientListByVPNGatewayResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/operations_client.go new file mode 100644 index 00000000..d331102c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/operations_client.go @@ -0,0 +1,88 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Lists all of the available Network Rest API operations. +// +// Generated from API version 2024-05-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.Network/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/options.go new file mode 100644 index 00000000..d2d0ed5c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/options.go @@ -0,0 +1,4456 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +// AdminRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the AdminRuleCollectionsClient.BeginDelete +// method. +type AdminRuleCollectionsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AdminRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the AdminRuleCollectionsClient.CreateOrUpdate +// method. +type AdminRuleCollectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AdminRuleCollectionsClientGetOptions contains the optional parameters for the AdminRuleCollectionsClient.Get method. +type AdminRuleCollectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AdminRuleCollectionsClientListOptions contains the optional parameters for the AdminRuleCollectionsClient.NewListPager +// method. +type AdminRuleCollectionsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// AdminRulesClientBeginDeleteOptions contains the optional parameters for the AdminRulesClient.BeginDelete method. +type AdminRulesClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AdminRulesClientCreateOrUpdateOptions contains the optional parameters for the AdminRulesClient.CreateOrUpdate method. +type AdminRulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AdminRulesClientGetOptions contains the optional parameters for the AdminRulesClient.Get method. +type AdminRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// AdminRulesClientListOptions contains the optional parameters for the AdminRulesClient.NewListPager method. +type AdminRulesClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete +// method. +type ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate +// method. +type ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewayPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.Get +// method. +type ApplicationGatewayPrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager +// method. +type ApplicationGatewayPrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.NewListPager +// method. +type ApplicationGatewayPrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewayWafDynamicManifestsClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsClient.NewGetPager +// method. +type ApplicationGatewayWafDynamicManifestsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsDefaultClient.Get +// method. +type ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientBeginBackendHealthOnDemandOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealthOnDemand +// method. +type ApplicationGatewaysClientBeginBackendHealthOnDemandOptions struct { + // Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + Expand *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientBeginBackendHealthOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealth +// method. +type ApplicationGatewaysClientBeginBackendHealthOptions struct { + // Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + Expand *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationGatewaysClient.BeginCreateOrUpdate +// method. +type ApplicationGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewaysClient.BeginDelete +// method. +type ApplicationGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientBeginStartOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStart +// method. +type ApplicationGatewaysClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientBeginStopOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStop +// method. +type ApplicationGatewaysClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientGetOptions contains the optional parameters for the ApplicationGatewaysClient.Get method. +type ApplicationGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientGetSSLPredefinedPolicyOptions contains the optional parameters for the ApplicationGatewaysClient.GetSSLPredefinedPolicy +// method. +type ApplicationGatewaysClientGetSSLPredefinedPolicyOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAllPager +// method. +type ApplicationGatewaysClientListAllOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableRequestHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableRequestHeaders +// method. +type ApplicationGatewaysClientListAvailableRequestHeadersOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableResponseHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableResponseHeaders +// method. +type ApplicationGatewaysClientListAvailableResponseHeadersOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableSSLOptionsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLOptions +// method. +type ApplicationGatewaysClientListAvailableSSLOptionsOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager +// method. +type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableServerVariablesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableServerVariables +// method. +type ApplicationGatewaysClientListAvailableServerVariablesOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableWafRuleSetsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableWafRuleSets +// method. +type ApplicationGatewaysClientListAvailableWafRuleSetsOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.NewListPager method. +type ApplicationGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientUpdateTagsOptions contains the optional parameters for the ApplicationGatewaysClient.UpdateTags +// method. +type ApplicationGatewaysClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginCreateOrUpdate +// method. +type ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationSecurityGroupsClientBeginDeleteOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginDelete +// method. +type ApplicationSecurityGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationSecurityGroupsClientGetOptions contains the optional parameters for the ApplicationSecurityGroupsClient.Get +// method. +type ApplicationSecurityGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListAllPager +// method. +type ApplicationSecurityGroupsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListPager +// method. +type ApplicationSecurityGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// ApplicationSecurityGroupsClientUpdateTagsOptions contains the optional parameters for the ApplicationSecurityGroupsClient.UpdateTags +// method. +type ApplicationSecurityGroupsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.NewListPager +// method. +type AvailableDelegationsClientListOptions struct { + // placeholder for future optional parameters +} + +// AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.NewListPager +// method. +type AvailableEndpointServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager +// method. +type AvailablePrivateEndpointTypesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListPager +// method. +type AvailablePrivateEndpointTypesClientListOptions struct { + // placeholder for future optional parameters +} + +// AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.NewListPager +// method. +type AvailableResourceGroupDelegationsClientListOptions struct { + // placeholder for future optional parameters +} + +// AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListByResourceGroupPager +// method. +type AvailableServiceAliasesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListPager +// method. +type AvailableServiceAliasesClientListOptions struct { + // placeholder for future optional parameters +} + +// AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.NewListAllPager +// method. +type AzureFirewallFqdnTagsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// AzureFirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureFirewallsClient.BeginCreateOrUpdate +// method. +type AzureFirewallsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureFirewallsClientBeginDeleteOptions contains the optional parameters for the AzureFirewallsClient.BeginDelete method. +type AzureFirewallsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureFirewallsClientBeginListLearnedPrefixesOptions contains the optional parameters for the AzureFirewallsClient.BeginListLearnedPrefixes +// method. +type AzureFirewallsClientBeginListLearnedPrefixesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureFirewallsClientBeginPacketCaptureOptions contains the optional parameters for the AzureFirewallsClient.BeginPacketCapture +// method. +type AzureFirewallsClientBeginPacketCaptureOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureFirewallsClientBeginUpdateTagsOptions contains the optional parameters for the AzureFirewallsClient.BeginUpdateTags +// method. +type AzureFirewallsClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureFirewallsClientGetOptions contains the optional parameters for the AzureFirewallsClient.Get method. +type AzureFirewallsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.NewListAllPager method. +type AzureFirewallsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.NewListPager method. +type AzureFirewallsClientListOptions struct { + // placeholder for future optional parameters +} + +// BastionHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the BastionHostsClient.BeginCreateOrUpdate +// method. +type BastionHostsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BastionHostsClientBeginDeleteOptions contains the optional parameters for the BastionHostsClient.BeginDelete method. +type BastionHostsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BastionHostsClientBeginUpdateTagsOptions contains the optional parameters for the BastionHostsClient.BeginUpdateTags method. +type BastionHostsClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BastionHostsClientGetOptions contains the optional parameters for the BastionHostsClient.Get method. +type BastionHostsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.NewListByResourceGroupPager +// method. +type BastionHostsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.NewListPager method. +type BastionHostsClientListOptions struct { + // placeholder for future optional parameters +} + +// BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.NewListPager +// method. +type BgpServiceCommunitiesClientListOptions struct { + // placeholder for future optional parameters +} + +// ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginCreateOrUpdate +// method. +type ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigurationPolicyGroupsClientBeginDeleteOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginDelete +// method. +type ConfigurationPolicyGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigurationPolicyGroupsClientGetOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.Get +// method. +type ConfigurationPolicyGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager +// method. +type ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions struct { + // placeholder for future optional parameters +} + +// ConnectionMonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorsClient.BeginCreateOrUpdate +// method. +type ConnectionMonitorsClientBeginCreateOrUpdateOptions struct { + // Value indicating whether connection monitor V1 should be migrated to V2 format. + Migrate *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectionMonitorsClientBeginDeleteOptions contains the optional parameters for the ConnectionMonitorsClient.BeginDelete +// method. +type ConnectionMonitorsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectionMonitorsClientBeginQueryOptions contains the optional parameters for the ConnectionMonitorsClient.BeginQuery +// method. +type ConnectionMonitorsClientBeginQueryOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectionMonitorsClientBeginStartOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStart +// method. +type ConnectionMonitorsClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectionMonitorsClientBeginStopOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStop method. +type ConnectionMonitorsClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectionMonitorsClientGetOptions contains the optional parameters for the ConnectionMonitorsClient.Get method. +type ConnectionMonitorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.NewListPager method. +type ConnectionMonitorsClientListOptions struct { + // placeholder for future optional parameters +} + +// ConnectionMonitorsClientUpdateTagsOptions contains the optional parameters for the ConnectionMonitorsClient.UpdateTags +// method. +type ConnectionMonitorsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ConnectivityConfigurationsClientBeginDeleteOptions contains the optional parameters for the ConnectivityConfigurationsClient.BeginDelete +// method. +type ConnectivityConfigurationsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectivityConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the ConnectivityConfigurationsClient.CreateOrUpdate +// method. +type ConnectivityConfigurationsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectivityConfigurationsClientGetOptions contains the optional parameters for the ConnectivityConfigurationsClient.Get +// method. +type ConnectivityConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectivityConfigurationsClientListOptions contains the optional parameters for the ConnectivityConfigurationsClient.NewListPager +// method. +type ConnectivityConfigurationsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// CustomIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomIPPrefixesClient.BeginCreateOrUpdate +// method. +type CustomIPPrefixesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete method. +type CustomIPPrefixesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomIPPrefixesClientGetOptions contains the optional parameters for the CustomIPPrefixesClient.Get method. +type CustomIPPrefixesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.NewListAllPager method. +type CustomIPPrefixesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.NewListPager method. +type CustomIPPrefixesClientListOptions struct { + // placeholder for future optional parameters +} + +// CustomIPPrefixesClientUpdateTagsOptions contains the optional parameters for the CustomIPPrefixesClient.UpdateTags method. +type CustomIPPrefixesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// DdosCustomPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginCreateOrUpdate +// method. +type DdosCustomPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DdosCustomPoliciesClientBeginDeleteOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginDelete +// method. +type DdosCustomPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DdosCustomPoliciesClientGetOptions contains the optional parameters for the DdosCustomPoliciesClient.Get method. +type DdosCustomPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DdosCustomPoliciesClientUpdateTagsOptions contains the optional parameters for the DdosCustomPoliciesClient.UpdateTags +// method. +type DdosCustomPoliciesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// DdosProtectionPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosProtectionPlansClient.BeginCreateOrUpdate +// method. +type DdosProtectionPlansClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DdosProtectionPlansClientBeginDeleteOptions contains the optional parameters for the DdosProtectionPlansClient.BeginDelete +// method. +type DdosProtectionPlansClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DdosProtectionPlansClientGetOptions contains the optional parameters for the DdosProtectionPlansClient.Get method. +type DdosProtectionPlansClientGetOptions struct { + // placeholder for future optional parameters +} + +// DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.NewListByResourceGroupPager +// method. +type DdosProtectionPlansClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.NewListPager method. +type DdosProtectionPlansClientListOptions struct { + // placeholder for future optional parameters +} + +// DdosProtectionPlansClientUpdateTagsOptions contains the optional parameters for the DdosProtectionPlansClient.UpdateTags +// method. +type DdosProtectionPlansClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// DefaultSecurityRulesClientGetOptions contains the optional parameters for the DefaultSecurityRulesClient.Get method. +type DefaultSecurityRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.NewListPager +// method. +type DefaultSecurityRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// DscpConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscpConfigurationClient.BeginCreateOrUpdate +// method. +type DscpConfigurationClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete +// method. +type DscpConfigurationClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DscpConfigurationClientGetOptions contains the optional parameters for the DscpConfigurationClient.Get method. +type DscpConfigurationClientGetOptions struct { + // placeholder for future optional parameters +} + +// DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.NewListAllPager +// method. +type DscpConfigurationClientListAllOptions struct { + // placeholder for future optional parameters +} + +// DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.NewListPager method. +type DscpConfigurationClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginDelete +// method. +type ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitAuthorizationsClientGetOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.Get +// method. +type ExpressRouteCircuitAuthorizationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.NewListPager +// method. +type ExpressRouteCircuitAuthorizationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginDelete +// method. +type ExpressRouteCircuitConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.Get +// method. +type ExpressRouteCircuitConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.NewListPager +// method. +type ExpressRouteCircuitConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginDelete +// method. +type ExpressRouteCircuitPeeringsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.Get +// method. +type ExpressRouteCircuitPeeringsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.NewListPager +// method. +type ExpressRouteCircuitPeeringsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCircuitsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginDelete +// method. +type ExpressRouteCircuitsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListArpTable +// method. +type ExpressRouteCircuitsClientBeginListArpTableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTable +// method. +type ExpressRouteCircuitsClientBeginListRoutesTableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTableSummary +// method. +type ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitsClientGetOptions contains the optional parameters for the ExpressRouteCircuitsClient.Get method. +type ExpressRouteCircuitsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientGetPeeringStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetPeeringStats +// method. +type ExpressRouteCircuitsClientGetPeeringStatsOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientGetStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetStats +// method. +type ExpressRouteCircuitsClientGetStatsOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListAllPager +// method. +type ExpressRouteCircuitsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListPager +// method. +type ExpressRouteCircuitsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCircuitsClient.UpdateTags +// method. +type ExpressRouteCircuitsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginCreateOrUpdate +// method. +type ExpressRouteConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginDelete +// method. +type ExpressRouteConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteConnectionsClientGetOptions contains the optional parameters for the ExpressRouteConnectionsClient.Get method. +type ExpressRouteConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteConnectionsClientListOptions contains the optional parameters for the ExpressRouteConnectionsClient.List method. +type ExpressRouteConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginDelete +// method. +type ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.Get +// method. +type ExpressRouteCrossConnectionPeeringsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.NewListPager +// method. +type ExpressRouteCrossConnectionPeeringsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListArpTable +// method. +type ExpressRouteCrossConnectionsClientBeginListArpTableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTable +// method. +type ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary +// method. +type ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.Get +// method. +type ExpressRouteCrossConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager +// method. +type ExpressRouteCrossConnectionsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListPager +// method. +type ExpressRouteCrossConnectionsClientListOptions struct { + // The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. + Filter *string +} + +// ExpressRouteCrossConnectionsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.UpdateTags +// method. +type ExpressRouteCrossConnectionsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginCreateOrUpdate +// method. +type ExpressRouteGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteGatewaysClientBeginDeleteOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginDelete +// method. +type ExpressRouteGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginUpdateTags +// method. +type ExpressRouteGatewaysClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteGatewaysClientGetOptions contains the optional parameters for the ExpressRouteGatewaysClient.Get method. +type ExpressRouteGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteGatewaysClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListByResourceGroup +// method. +type ExpressRouteGatewaysClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteGatewaysClientListBySubscriptionOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListBySubscription +// method. +type ExpressRouteGatewaysClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteLinksClientGetOptions contains the optional parameters for the ExpressRouteLinksClient.Get method. +type ExpressRouteLinksClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.NewListPager method. +type ExpressRouteLinksClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate +// method. +type ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRoutePortAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginDelete +// method. +type ExpressRoutePortAuthorizationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRoutePortAuthorizationsClientGetOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.Get +// method. +type ExpressRoutePortAuthorizationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortAuthorizationsClientListOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.NewListPager +// method. +type ExpressRoutePortAuthorizationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortsClient.BeginCreateOrUpdate +// method. +type ExpressRoutePortsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRoutePortsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortsClient.BeginDelete +// method. +type ExpressRoutePortsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRoutePortsClientGenerateLOAOptions contains the optional parameters for the ExpressRoutePortsClient.GenerateLOA +// method. +type ExpressRoutePortsClientGenerateLOAOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsClientGetOptions contains the optional parameters for the ExpressRoutePortsClient.Get method. +type ExpressRoutePortsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.NewListByResourceGroupPager +// method. +type ExpressRoutePortsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.NewListPager method. +type ExpressRoutePortsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsClientUpdateTagsOptions contains the optional parameters for the ExpressRoutePortsClient.UpdateTags method. +type ExpressRoutePortsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsLocationsClientGetOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.Get +// method. +type ExpressRoutePortsLocationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.NewListPager +// method. +type ExpressRoutePortsLocationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteProviderPortsLocationClientListOptions contains the optional parameters for the ExpressRouteProviderPortsLocationClient.List +// method. +type ExpressRouteProviderPortsLocationClientListOptions struct { + // The filter to apply on the operation. For example, you can use $filter=location eq '{state}'. + Filter *string +} + +// ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.NewListPager +// method. +type ExpressRouteServiceProvidersClientListOptions struct { + // placeholder for future optional parameters +} + +// FirewallPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPoliciesClient.BeginCreateOrUpdate +// method. +type FirewallPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the FirewallPoliciesClient.BeginDelete method. +type FirewallPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallPoliciesClientGetOptions contains the optional parameters for the FirewallPoliciesClient.Get method. +type FirewallPoliciesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.NewListAllPager method. +type FirewallPoliciesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.NewListPager method. +type FirewallPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// FirewallPoliciesClientUpdateTagsOptions contains the optional parameters for the FirewallPoliciesClient.UpdateTags method. +type FirewallPoliciesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyDeploymentsClientBeginDeployOptions contains the optional parameters for the FirewallPolicyDeploymentsClient.BeginDeploy +// method. +type FirewallPolicyDeploymentsClientBeginDeployOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallPolicyDraftsClientCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyDraftsClient.CreateOrUpdate +// method. +type FirewallPolicyDraftsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyDraftsClientDeleteOptions contains the optional parameters for the FirewallPolicyDraftsClient.Delete method. +type FirewallPolicyDraftsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyDraftsClientGetOptions contains the optional parameters for the FirewallPolicyDraftsClient.Get method. +type FirewallPolicyDraftsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesClient.List +// method. +type FirewallPolicyIdpsSignaturesClientListOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesFilterValuesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesFilterValuesClient.List +// method. +type FirewallPolicyIdpsSignaturesFilterValuesClientListOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesOverridesClientGetOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Get +// method. +type FirewallPolicyIdpsSignaturesOverridesClientGetOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesOverridesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.List +// method. +type FirewallPolicyIdpsSignaturesOverridesClientListOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesOverridesClientPatchOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Patch +// method. +type FirewallPolicyIdpsSignaturesOverridesClientPatchOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesOverridesClientPutOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Put +// method. +type FirewallPolicyIdpsSignaturesOverridesClientPutOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupDraftsClient.CreateOrUpdate +// method. +type FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyRuleCollectionGroupDraftsClientDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupDraftsClient.Delete +// method. +type FirewallPolicyRuleCollectionGroupDraftsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyRuleCollectionGroupDraftsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupDraftsClient.Get +// method. +type FirewallPolicyRuleCollectionGroupDraftsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate +// method. +type FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginDelete +// method. +type FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallPolicyRuleCollectionGroupsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.Get +// method. +type FirewallPolicyRuleCollectionGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.NewListPager +// method. +type FirewallPolicyRuleCollectionGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// FlowLogsClientBeginCreateOrUpdateOptions contains the optional parameters for the FlowLogsClient.BeginCreateOrUpdate method. +type FlowLogsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FlowLogsClientBeginDeleteOptions contains the optional parameters for the FlowLogsClient.BeginDelete method. +type FlowLogsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FlowLogsClientGetOptions contains the optional parameters for the FlowLogsClient.Get method. +type FlowLogsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.NewListPager method. +type FlowLogsClientListOptions struct { + // placeholder for future optional parameters +} + +// FlowLogsClientUpdateTagsOptions contains the optional parameters for the FlowLogsClient.UpdateTags method. +type FlowLogsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// GroupsClientBeginDeleteOptions contains the optional parameters for the GroupsClient.BeginDelete method. +type GroupsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GroupsClientCreateOrUpdateOptions contains the optional parameters for the GroupsClient.CreateOrUpdate method. +type GroupsClientCreateOrUpdateOptions struct { + // The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value + // to prevent accidentally overwriting concurrent changes. + IfMatch *string +} + +// GroupsClientGetOptions contains the optional parameters for the GroupsClient.Get method. +type GroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// GroupsClientListOptions contains the optional parameters for the GroupsClient.NewListPager method. +type GroupsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// HubRouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the HubRouteTablesClient.BeginCreateOrUpdate +// method. +type HubRouteTablesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// HubRouteTablesClientBeginDeleteOptions contains the optional parameters for the HubRouteTablesClient.BeginDelete method. +type HubRouteTablesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// HubRouteTablesClientGetOptions contains the optional parameters for the HubRouteTablesClient.Get method. +type HubRouteTablesClientGetOptions struct { + // placeholder for future optional parameters +} + +// HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.NewListPager method. +type HubRouteTablesClientListOptions struct { + // placeholder for future optional parameters +} + +// HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate +// method. +type HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// HubVirtualNetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginDelete +// method. +type HubVirtualNetworkConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// HubVirtualNetworkConnectionsClientGetOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.Get +// method. +type HubVirtualNetworkConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.NewListPager +// method. +type HubVirtualNetworkConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// IPAllocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPAllocationsClient.BeginCreateOrUpdate +// method. +type IPAllocationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete method. +type IPAllocationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPAllocationsClientGetOptions contains the optional parameters for the IPAllocationsClient.Get method. +type IPAllocationsClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.NewListByResourceGroupPager +// method. +type IPAllocationsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.NewListPager method. +type IPAllocationsClientListOptions struct { + // placeholder for future optional parameters +} + +// IPAllocationsClientUpdateTagsOptions contains the optional parameters for the IPAllocationsClient.UpdateTags method. +type IPAllocationsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// IPGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPGroupsClient.BeginCreateOrUpdate method. +type IPGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPGroupsClientBeginDeleteOptions contains the optional parameters for the IPGroupsClient.BeginDelete method. +type IPGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPGroupsClientGetOptions contains the optional parameters for the IPGroupsClient.Get method. +type IPGroupsClientGetOptions struct { + // Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups resource. + Expand *string +} + +// IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.NewListByResourceGroupPager +// method. +type IPGroupsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.NewListPager method. +type IPGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// IPGroupsClientUpdateGroupsOptions contains the optional parameters for the IPGroupsClient.UpdateGroups method. +type IPGroupsClientUpdateGroupsOptions struct { + // placeholder for future optional parameters +} + +// InboundNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundNatRulesClient.BeginCreateOrUpdate +// method. +type InboundNatRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InboundNatRulesClientBeginDeleteOptions contains the optional parameters for the InboundNatRulesClient.BeginDelete method. +type InboundNatRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InboundNatRulesClientGetOptions contains the optional parameters for the InboundNatRulesClient.Get method. +type InboundNatRulesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.NewListPager method. +type InboundNatRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// InboundSecurityRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundSecurityRuleClient.BeginCreateOrUpdate +// method. +type InboundSecurityRuleClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InboundSecurityRuleClientGetOptions contains the optional parameters for the InboundSecurityRuleClient.Get method. +type InboundSecurityRuleClientGetOptions struct { + // placeholder for future optional parameters +} + +// InterfaceIPConfigurationsClientGetOptions contains the optional parameters for the InterfaceIPConfigurationsClient.Get +// method. +type InterfaceIPConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.NewListPager +// method. +type InterfaceIPConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.NewListPager +// method. +type InterfaceLoadBalancersClientListOptions struct { + // placeholder for future optional parameters +} + +// InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginCreateOrUpdate +// method. +type InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfaceTapConfigurationsClientBeginDeleteOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginDelete +// method. +type InterfaceTapConfigurationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfaceTapConfigurationsClientGetOptions contains the optional parameters for the InterfaceTapConfigurationsClient.Get +// method. +type InterfaceTapConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.NewListPager +// method. +type InterfaceTapConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfacesClient.BeginCreateOrUpdate +// method. +type InterfacesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfacesClientBeginDeleteOptions contains the optional parameters for the InterfacesClient.BeginDelete method. +type InterfacesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfacesClientBeginGetEffectiveRouteTableOptions contains the optional parameters for the InterfacesClient.BeginGetEffectiveRouteTable +// method. +type InterfacesClientBeginGetEffectiveRouteTableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions contains the optional parameters for the InterfacesClient.BeginListEffectiveNetworkSecurityGroups +// method. +type InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfacesClientGetCloudServiceNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetCloudServiceNetworkInterface +// method. +type InterfacesClientGetCloudServiceNetworkInterfaceOptions struct { + // Expands referenced resources. + Expand *string +} + +// InterfacesClientGetOptions contains the optional parameters for the InterfacesClient.Get method. +type InterfacesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetIPConfiguration +// method. +type InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions struct { + // Expands referenced resources. + Expand *string +} + +// InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetNetworkInterface +// method. +type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions struct { + // Expands referenced resources. + Expand *string +} + +// InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.NewListAllPager method. +type InterfacesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListCloudServiceNetworkInterfacesPager +// method. +type InterfacesClientListCloudServiceNetworkInterfacesOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager +// method. +type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientListOptions contains the optional parameters for the InterfacesClient.NewListPager method. +type InterfacesClientListOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager +// method. +type InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions struct { + // Expands referenced resources. + Expand *string +} + +// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager +// method. +type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager +// method. +type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientUpdateTagsOptions contains the optional parameters for the InterfacesClient.UpdateTags method. +type InterfacesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// IpamPoolsClientBeginCreateOptions contains the optional parameters for the IpamPoolsClient.BeginCreate method. +type IpamPoolsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IpamPoolsClientBeginDeleteOptions contains the optional parameters for the IpamPoolsClient.BeginDelete method. +type IpamPoolsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IpamPoolsClientGetOptions contains the optional parameters for the IpamPoolsClient.Get method. +type IpamPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// IpamPoolsClientGetPoolUsageOptions contains the optional parameters for the IpamPoolsClient.GetPoolUsage method. +type IpamPoolsClientGetPoolUsageOptions struct { + // placeholder for future optional parameters +} + +// IpamPoolsClientListAssociatedResourcesOptions contains the optional parameters for the IpamPoolsClient.NewListAssociatedResourcesPager +// method. +type IpamPoolsClientListAssociatedResourcesOptions struct { + // placeholder for future optional parameters +} + +// IpamPoolsClientListOptions contains the optional parameters for the IpamPoolsClient.NewListPager method. +type IpamPoolsClientListOptions struct { + // Optional num entries to skip. + Skip *int32 + + // Optional skip token. + SkipToken *string + + // Optional key by which to sort. + SortKey *string + + // Optional sort value for pagination. + SortValue *string + + // Optional num entries to show. + Top *int32 +} + +// IpamPoolsClientUpdateOptions contains the optional parameters for the IpamPoolsClient.Update method. +type IpamPoolsClientUpdateOptions struct { + // Pool resource object to update partially. + Body *IpamPoolUpdate +} + +// LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate +// method. +type LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancerBackendAddressPoolsClientBeginDeleteOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginDelete +// method. +type LoadBalancerBackendAddressPoolsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancerBackendAddressPoolsClientGetOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.Get +// method. +type LoadBalancerBackendAddressPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.NewListPager +// method. +type LoadBalancerBackendAddressPoolsClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerFrontendIPConfigurationsClientGetOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.Get +// method. +type LoadBalancerFrontendIPConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.NewListPager +// method. +type LoadBalancerFrontendIPConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerLoadBalancingRulesClientBeginHealthOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.BeginHealth +// method. +type LoadBalancerLoadBalancingRulesClientBeginHealthOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancerLoadBalancingRulesClientGetOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.Get +// method. +type LoadBalancerLoadBalancingRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.NewListPager +// method. +type LoadBalancerLoadBalancingRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.NewListPager +// method. +type LoadBalancerNetworkInterfacesClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerOutboundRulesClientGetOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.Get +// method. +type LoadBalancerOutboundRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.NewListPager +// method. +type LoadBalancerOutboundRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerProbesClientGetOptions contains the optional parameters for the LoadBalancerProbesClient.Get method. +type LoadBalancerProbesClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.NewListPager method. +type LoadBalancerProbesClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancersClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.BeginCreateOrUpdate +// method. +type LoadBalancersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete method. +type LoadBalancersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancersClientBeginListInboundNatRulePortMappingsOptions contains the optional parameters for the LoadBalancersClient.BeginListInboundNatRulePortMappings +// method. +type LoadBalancersClientBeginListInboundNatRulePortMappingsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancersClientBeginSwapPublicIPAddressesOptions contains the optional parameters for the LoadBalancersClient.BeginSwapPublicIPAddresses +// method. +type LoadBalancersClientBeginSwapPublicIPAddressesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. +type LoadBalancersClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.NewListAllPager method. +type LoadBalancersClientListAllOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.NewListPager method. +type LoadBalancersClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancersClientMigrateToIPBasedOptions contains the optional parameters for the LoadBalancersClient.MigrateToIPBased +// method. +type LoadBalancersClientMigrateToIPBasedOptions struct { + // Parameters supplied to the migrateToIpBased Api. + Parameters *MigrateLoadBalancerToIPBasedRequest +} + +// LoadBalancersClientUpdateTagsOptions contains the optional parameters for the LoadBalancersClient.UpdateTags method. +type LoadBalancersClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// LocalNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginCreateOrUpdate +// method. +type LocalNetworkGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LocalNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginDelete +// method. +type LocalNetworkGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LocalNetworkGatewaysClientGetOptions contains the optional parameters for the LocalNetworkGatewaysClient.Get method. +type LocalNetworkGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.NewListPager +// method. +type LocalNetworkGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// LocalNetworkGatewaysClientUpdateTagsOptions contains the optional parameters for the LocalNetworkGatewaysClient.UpdateTags +// method. +type LocalNetworkGatewaysClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientBeginDeleteBastionShareableLinkByTokenOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLinkByToken +// method. +type ManagementClientBeginDeleteBastionShareableLinkByTokenOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagementClientBeginDeleteBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLink +// method. +type ManagementClientBeginDeleteBastionShareableLinkOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions contains the optional parameters for the +// ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile method. +type ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagementClientBeginGetActiveSessionsOptions contains the optional parameters for the ManagementClient.BeginGetActiveSessions +// method. +type ManagementClientBeginGetActiveSessionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagementClientBeginPutBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginPutBastionShareableLink +// method. +type ManagementClientBeginPutBastionShareableLinkOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagementClientCheckDNSNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDNSNameAvailability +// method. +type ManagementClientCheckDNSNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.NewDisconnectActiveSessionsPager +// method. +type ManagementClientDisconnectActiveSessionsOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientExpressRouteProviderPortOptions contains the optional parameters for the ManagementClient.ExpressRouteProviderPort +// method. +type ManagementClientExpressRouteProviderPortOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.NewGetBastionShareableLinkPager +// method. +type ManagementClientGetBastionShareableLinkOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientListActiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListActiveConnectivityConfigurations +// method. +type ManagementClientListActiveConnectivityConfigurationsOptions struct { + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagementClientListActiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListActiveSecurityAdminRules +// method. +type ManagementClientListActiveSecurityAdminRulesOptions struct { + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations +// method. +type ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions struct { + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules +// method. +type ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions struct { + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagementClientSupportedSecurityProvidersOptions contains the optional parameters for the ManagementClient.SupportedSecurityProviders +// method. +type ManagementClientSupportedSecurityProvidersOptions struct { + // placeholder for future optional parameters +} + +// ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate +// method. +type ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagementGroupNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Delete +// method. +type ManagementGroupNetworkManagerConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagementGroupNetworkManagerConnectionsClientGetOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Get +// method. +type ManagementGroupNetworkManagerConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagementGroupNetworkManagerConnectionsClientListOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.NewListPager +// method. +type ManagementGroupNetworkManagerConnectionsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagerCommitsClientBeginPostOptions contains the optional parameters for the ManagerCommitsClient.BeginPost method. +type ManagerCommitsClientBeginPostOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagerDeploymentStatusClientListOptions contains the optional parameters for the ManagerDeploymentStatusClient.List method. +type ManagerDeploymentStatusClientListOptions struct { + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagerRoutingConfigurationsClientBeginDeleteOptions contains the optional parameters for the ManagerRoutingConfigurationsClient.BeginDelete +// method. +type ManagerRoutingConfigurationsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagerRoutingConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the ManagerRoutingConfigurationsClient.CreateOrUpdate +// method. +type ManagerRoutingConfigurationsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagerRoutingConfigurationsClientGetOptions contains the optional parameters for the ManagerRoutingConfigurationsClient.Get +// method. +type ManagerRoutingConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagerRoutingConfigurationsClientListOptions contains the optional parameters for the ManagerRoutingConfigurationsClient.NewListPager +// method. +type ManagerRoutingConfigurationsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagersClientBeginDeleteOptions contains the optional parameters for the ManagersClient.BeginDelete method. +type ManagersClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagersClientCreateOrUpdateOptions contains the optional parameters for the ManagersClient.CreateOrUpdate method. +type ManagersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagersClientGetOptions contains the optional parameters for the ManagersClient.Get method. +type ManagersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagersClientListBySubscriptionOptions contains the optional parameters for the ManagersClient.NewListBySubscriptionPager +// method. +type ManagersClientListBySubscriptionOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagersClientListOptions contains the optional parameters for the ManagersClient.NewListPager method. +type ManagersClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagersClientPatchOptions contains the optional parameters for the ManagersClient.Patch method. +type ManagersClientPatchOptions struct { + // placeholder for future optional parameters +} + +// NatGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the NatGatewaysClient.BeginCreateOrUpdate +// method. +type NatGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NatGatewaysClientBeginDeleteOptions contains the optional parameters for the NatGatewaysClient.BeginDelete method. +type NatGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NatGatewaysClientGetOptions contains the optional parameters for the NatGatewaysClient.Get method. +type NatGatewaysClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.NewListAllPager method. +type NatGatewaysClientListAllOptions struct { + // placeholder for future optional parameters +} + +// NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.NewListPager method. +type NatGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// NatGatewaysClientUpdateTagsOptions contains the optional parameters for the NatGatewaysClient.UpdateTags method. +type NatGatewaysClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// NatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the NatRulesClient.BeginCreateOrUpdate method. +type NatRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NatRulesClientBeginDeleteOptions contains the optional parameters for the NatRulesClient.BeginDelete method. +type NatRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NatRulesClientGetOptions contains the optional parameters for the NatRulesClient.Get method. +type NatRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.NewListByVPNGatewayPager +// method. +type NatRulesClientListByVPNGatewayOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// P2SVPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginCreateOrUpdate +// method. +type P2SVPNGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginDeleteOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDelete method. +type P2SVPNGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections +// method. +type P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGenerateVPNProfile +// method. +type P2SVPNGatewaysClientBeginGenerateVPNProfileOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed +// method. +type P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth +// method. +type P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginResetOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginReset method. +type P2SVPNGatewaysClientBeginResetOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginUpdateTags +// method. +type P2SVPNGatewaysClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientGetOptions contains the optional parameters for the P2SVPNGatewaysClient.Get method. +type P2SVPNGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListByResourceGroupPager +// method. +type P2SVPNGatewaysClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListPager method. +type P2SVPNGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// PacketCapturesClientBeginCreateOptions contains the optional parameters for the PacketCapturesClient.BeginCreate method. +type PacketCapturesClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PacketCapturesClientBeginDeleteOptions contains the optional parameters for the PacketCapturesClient.BeginDelete method. +type PacketCapturesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PacketCapturesClientBeginGetStatusOptions contains the optional parameters for the PacketCapturesClient.BeginGetStatus +// method. +type PacketCapturesClientBeginGetStatusOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PacketCapturesClientBeginStopOptions contains the optional parameters for the PacketCapturesClient.BeginStop method. +type PacketCapturesClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PacketCapturesClientGetOptions contains the optional parameters for the PacketCapturesClient.Get method. +type PacketCapturesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.NewListPager method. +type PacketCapturesClientListOptions struct { + // placeholder for future optional parameters +} + +// PeerExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.Get +// method. +type PeerExpressRouteCircuitConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.NewListPager +// method. +type PeerExpressRouteCircuitConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginCreateOrUpdate +// method. +type PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateDNSZoneGroupsClientBeginDeleteOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginDelete +// method. +type PrivateDNSZoneGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateDNSZoneGroupsClientGetOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.Get method. +type PrivateDNSZoneGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.NewListPager +// method. +type PrivateDNSZoneGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.BeginCreateOrUpdate +// method. +type PrivateEndpointsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete method. +type PrivateEndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. +type PrivateEndpointsClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.NewListBySubscriptionPager +// method. +type PrivateEndpointsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.NewListPager method. +type PrivateEndpointsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions contains the optional parameters +// for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup method. +type PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility +// method. +type PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCreateOrUpdate +// method. +type PrivateLinkServicesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkServicesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDelete +// method. +type PrivateLinkServicesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection +// method. +type PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkServicesClientGetOptions contains the optional parameters for the PrivateLinkServicesClient.Get method. +type PrivateLinkServicesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// PrivateLinkServicesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.GetPrivateEndpointConnection +// method. +type PrivateLinkServicesClientGetPrivateEndpointConnectionOptions struct { + // Expands referenced resources. + Expand *string +} + +// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters for +// the PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager method. +type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager +// method. +type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.NewListBySubscriptionPager +// method. +type PrivateLinkServicesClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPager method. +type PrivateLinkServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager +// method. +type PrivateLinkServicesClientListPrivateEndpointConnectionsOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.UpdatePrivateEndpointConnection +// method. +type PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. +type ProfilesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProfilesClientCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.CreateOrUpdate method. +type ProfilesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. +type ProfilesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.NewListAllPager method. +type ProfilesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method. +type ProfilesClientListOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientUpdateTagsOptions contains the optional parameters for the ProfilesClient.UpdateTags method. +type ProfilesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPAddressesClient.BeginCreateOrUpdate +// method. +type PublicIPAddressesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PublicIPAddressesClientBeginDdosProtectionStatusOptions contains the optional parameters for the PublicIPAddressesClient.BeginDdosProtectionStatus +// method. +type PublicIPAddressesClientBeginDdosProtectionStatusOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PublicIPAddressesClientBeginDeleteOptions contains the optional parameters for the PublicIPAddressesClient.BeginDelete +// method. +type PublicIPAddressesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PublicIPAddressesClientGetCloudServicePublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetCloudServicePublicIPAddress +// method. +type PublicIPAddressesClientGetCloudServicePublicIPAddressOptions struct { + // Expands referenced resources. + Expand *string +} + +// PublicIPAddressesClientGetOptions contains the optional parameters for the PublicIPAddressesClient.Get method. +type PublicIPAddressesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress +// method. +type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions struct { + // Expands referenced resources. + Expand *string +} + +// PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.NewListAllPager +// method. +type PublicIPAddressesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager +// method. +type PublicIPAddressesClientListCloudServicePublicIPAddressesOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager +// method. +type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.NewListPager method. +type PublicIPAddressesClientListOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager +// method. +type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager +// method. +type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientUpdateTagsOptions contains the optional parameters for the PublicIPAddressesClient.UpdateTags method. +type PublicIPAddressesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// PublicIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPPrefixesClient.BeginCreateOrUpdate +// method. +type PublicIPPrefixesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete method. +type PublicIPPrefixesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PublicIPPrefixesClientGetOptions contains the optional parameters for the PublicIPPrefixesClient.Get method. +type PublicIPPrefixesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.NewListAllPager method. +type PublicIPPrefixesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.NewListPager method. +type PublicIPPrefixesClientListOptions struct { + // placeholder for future optional parameters +} + +// PublicIPPrefixesClientUpdateTagsOptions contains the optional parameters for the PublicIPPrefixesClient.UpdateTags method. +type PublicIPPrefixesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ReachabilityAnalysisIntentsClientCreateOptions contains the optional parameters for the ReachabilityAnalysisIntentsClient.Create +// method. +type ReachabilityAnalysisIntentsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ReachabilityAnalysisIntentsClientDeleteOptions contains the optional parameters for the ReachabilityAnalysisIntentsClient.Delete +// method. +type ReachabilityAnalysisIntentsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ReachabilityAnalysisIntentsClientGetOptions contains the optional parameters for the ReachabilityAnalysisIntentsClient.Get +// method. +type ReachabilityAnalysisIntentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReachabilityAnalysisIntentsClientListOptions contains the optional parameters for the ReachabilityAnalysisIntentsClient.NewListPager +// method. +type ReachabilityAnalysisIntentsClientListOptions struct { + // Optional num entries to skip. + Skip *int32 + + // Optional skip token. + SkipToken *string + + // Optional key by which to sort. + SortKey *string + + // Optional sort value for pagination. + SortValue *string + + // Optional num entries to show. + Top *int32 +} + +// ReachabilityAnalysisRunsClientBeginDeleteOptions contains the optional parameters for the ReachabilityAnalysisRunsClient.BeginDelete +// method. +type ReachabilityAnalysisRunsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ReachabilityAnalysisRunsClientCreateOptions contains the optional parameters for the ReachabilityAnalysisRunsClient.Create +// method. +type ReachabilityAnalysisRunsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ReachabilityAnalysisRunsClientGetOptions contains the optional parameters for the ReachabilityAnalysisRunsClient.Get method. +type ReachabilityAnalysisRunsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReachabilityAnalysisRunsClientListOptions contains the optional parameters for the ReachabilityAnalysisRunsClient.NewListPager +// method. +type ReachabilityAnalysisRunsClientListOptions struct { + // Optional num entries to skip. + Skip *int32 + + // Optional skip token. + SkipToken *string + + // Optional key by which to sort. + SortKey *string + + // Optional sort value for pagination. + SortValue *string + + // Optional num entries to show. + Top *int32 +} + +// ResourceNavigationLinksClientListOptions contains the optional parameters for the ResourceNavigationLinksClient.List method. +type ResourceNavigationLinksClientListOptions struct { + // placeholder for future optional parameters +} + +// RouteFilterRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFilterRulesClient.BeginCreateOrUpdate +// method. +type RouteFilterRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteFilterRulesClientBeginDeleteOptions contains the optional parameters for the RouteFilterRulesClient.BeginDelete method. +type RouteFilterRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteFilterRulesClientGetOptions contains the optional parameters for the RouteFilterRulesClient.Get method. +type RouteFilterRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.NewListByRouteFilterPager +// method. +type RouteFilterRulesClientListByRouteFilterOptions struct { + // placeholder for future optional parameters +} + +// RouteFiltersClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFiltersClient.BeginCreateOrUpdate +// method. +type RouteFiltersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteFiltersClientBeginDeleteOptions contains the optional parameters for the RouteFiltersClient.BeginDelete method. +type RouteFiltersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteFiltersClientGetOptions contains the optional parameters for the RouteFiltersClient.Get method. +type RouteFiltersClientGetOptions struct { + // Expands referenced express route bgp peering resources. + Expand *string +} + +// RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.NewListByResourceGroupPager +// method. +type RouteFiltersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.NewListPager method. +type RouteFiltersClientListOptions struct { + // placeholder for future optional parameters +} + +// RouteFiltersClientUpdateTagsOptions contains the optional parameters for the RouteFiltersClient.UpdateTags method. +type RouteFiltersClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// RouteMapsClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteMapsClient.BeginCreateOrUpdate +// method. +type RouteMapsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteMapsClientBeginDeleteOptions contains the optional parameters for the RouteMapsClient.BeginDelete method. +type RouteMapsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteMapsClientGetOptions contains the optional parameters for the RouteMapsClient.Get method. +type RouteMapsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RouteMapsClientListOptions contains the optional parameters for the RouteMapsClient.NewListPager method. +type RouteMapsClientListOptions struct { + // placeholder for future optional parameters +} + +// RouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteTablesClient.BeginCreateOrUpdate +// method. +type RouteTablesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteTablesClientBeginDeleteOptions contains the optional parameters for the RouteTablesClient.BeginDelete method. +type RouteTablesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteTablesClientGetOptions contains the optional parameters for the RouteTablesClient.Get method. +type RouteTablesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.NewListAllPager method. +type RouteTablesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.NewListPager method. +type RouteTablesClientListOptions struct { + // placeholder for future optional parameters +} + +// RouteTablesClientUpdateTagsOptions contains the optional parameters for the RouteTablesClient.UpdateTags method. +type RouteTablesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// RoutesClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutesClient.BeginCreateOrUpdate method. +type RoutesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. +type RoutesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. +type RoutesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RoutesClientListOptions contains the optional parameters for the RoutesClient.NewListPager method. +type RoutesClientListOptions struct { + // placeholder for future optional parameters +} + +// RoutingIntentClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutingIntentClient.BeginCreateOrUpdate +// method. +type RoutingIntentClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutingIntentClientBeginDeleteOptions contains the optional parameters for the RoutingIntentClient.BeginDelete method. +type RoutingIntentClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutingIntentClientGetOptions contains the optional parameters for the RoutingIntentClient.Get method. +type RoutingIntentClientGetOptions struct { + // placeholder for future optional parameters +} + +// RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.NewListPager method. +type RoutingIntentClientListOptions struct { + // placeholder for future optional parameters +} + +// RoutingRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the RoutingRuleCollectionsClient.BeginDelete +// method. +type RoutingRuleCollectionsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutingRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the RoutingRuleCollectionsClient.CreateOrUpdate +// method. +type RoutingRuleCollectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// RoutingRuleCollectionsClientGetOptions contains the optional parameters for the RoutingRuleCollectionsClient.Get method. +type RoutingRuleCollectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RoutingRuleCollectionsClientListOptions contains the optional parameters for the RoutingRuleCollectionsClient.NewListPager +// method. +type RoutingRuleCollectionsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// RoutingRulesClientBeginDeleteOptions contains the optional parameters for the RoutingRulesClient.BeginDelete method. +type RoutingRulesClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutingRulesClientCreateOrUpdateOptions contains the optional parameters for the RoutingRulesClient.CreateOrUpdate method. +type RoutingRulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// RoutingRulesClientGetOptions contains the optional parameters for the RoutingRulesClient.Get method. +type RoutingRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RoutingRulesClientListOptions contains the optional parameters for the RoutingRulesClient.NewListPager method. +type RoutingRulesClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ScopeConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ScopeConnectionsClient.CreateOrUpdate +// method. +type ScopeConnectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ScopeConnectionsClientDeleteOptions contains the optional parameters for the ScopeConnectionsClient.Delete method. +type ScopeConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ScopeConnectionsClientGetOptions contains the optional parameters for the ScopeConnectionsClient.Get method. +type ScopeConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ScopeConnectionsClientListOptions contains the optional parameters for the ScopeConnectionsClient.NewListPager method. +type ScopeConnectionsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// SecurityAdminConfigurationsClientBeginDeleteOptions contains the optional parameters for the SecurityAdminConfigurationsClient.BeginDelete +// method. +type SecurityAdminConfigurationsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityAdminConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the SecurityAdminConfigurationsClient.CreateOrUpdate +// method. +type SecurityAdminConfigurationsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SecurityAdminConfigurationsClientGetOptions contains the optional parameters for the SecurityAdminConfigurationsClient.Get +// method. +type SecurityAdminConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityAdminConfigurationsClientListOptions contains the optional parameters for the SecurityAdminConfigurationsClient.NewListPager +// method. +type SecurityAdminConfigurationsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// SecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityGroupsClient.BeginCreateOrUpdate +// method. +type SecurityGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityGroupsClientBeginDeleteOptions contains the optional parameters for the SecurityGroupsClient.BeginDelete method. +type SecurityGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityGroupsClientGetOptions contains the optional parameters for the SecurityGroupsClient.Get method. +type SecurityGroupsClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.NewListAllPager method. +type SecurityGroupsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.NewListPager method. +type SecurityGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// SecurityGroupsClientUpdateTagsOptions contains the optional parameters for the SecurityGroupsClient.UpdateTags method. +type SecurityGroupsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// SecurityPartnerProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginCreateOrUpdate +// method. +type SecurityPartnerProvidersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityPartnerProvidersClientBeginDeleteOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginDelete +// method. +type SecurityPartnerProvidersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityPartnerProvidersClientGetOptions contains the optional parameters for the SecurityPartnerProvidersClient.Get method. +type SecurityPartnerProvidersClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListByResourceGroupPager +// method. +type SecurityPartnerProvidersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListPager +// method. +type SecurityPartnerProvidersClientListOptions struct { + // placeholder for future optional parameters +} + +// SecurityPartnerProvidersClientUpdateTagsOptions contains the optional parameters for the SecurityPartnerProvidersClient.UpdateTags +// method. +type SecurityPartnerProvidersClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// SecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityRulesClient.BeginCreateOrUpdate +// method. +type SecurityRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityRulesClientBeginDeleteOptions contains the optional parameters for the SecurityRulesClient.BeginDelete method. +type SecurityRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityRulesClientGetOptions contains the optional parameters for the SecurityRulesClient.Get method. +type SecurityRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.NewListPager method. +type SecurityRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// SecurityUserConfigurationsClientBeginDeleteOptions contains the optional parameters for the SecurityUserConfigurationsClient.BeginDelete +// method. +type SecurityUserConfigurationsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityUserConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the SecurityUserConfigurationsClient.CreateOrUpdate +// method. +type SecurityUserConfigurationsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SecurityUserConfigurationsClientGetOptions contains the optional parameters for the SecurityUserConfigurationsClient.Get +// method. +type SecurityUserConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityUserConfigurationsClientListOptions contains the optional parameters for the SecurityUserConfigurationsClient.NewListPager +// method. +type SecurityUserConfigurationsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// SecurityUserRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the SecurityUserRuleCollectionsClient.BeginDelete +// method. +type SecurityUserRuleCollectionsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityUserRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the SecurityUserRuleCollectionsClient.CreateOrUpdate +// method. +type SecurityUserRuleCollectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SecurityUserRuleCollectionsClientGetOptions contains the optional parameters for the SecurityUserRuleCollectionsClient.Get +// method. +type SecurityUserRuleCollectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityUserRuleCollectionsClientListOptions contains the optional parameters for the SecurityUserRuleCollectionsClient.NewListPager +// method. +type SecurityUserRuleCollectionsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// SecurityUserRulesClientBeginDeleteOptions contains the optional parameters for the SecurityUserRulesClient.BeginDelete +// method. +type SecurityUserRulesClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityUserRulesClientCreateOrUpdateOptions contains the optional parameters for the SecurityUserRulesClient.CreateOrUpdate +// method. +type SecurityUserRulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SecurityUserRulesClientGetOptions contains the optional parameters for the SecurityUserRulesClient.Get method. +type SecurityUserRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityUserRulesClientListOptions contains the optional parameters for the SecurityUserRulesClient.NewListPager method. +type SecurityUserRulesClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ServiceAssociationLinksClientListOptions contains the optional parameters for the ServiceAssociationLinksClient.List method. +type ServiceAssociationLinksClientListOptions struct { + // placeholder for future optional parameters +} + +// ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginCreateOrUpdate +// method. +type ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceEndpointPoliciesClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginDelete +// method. +type ServiceEndpointPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceEndpointPoliciesClientGetOptions contains the optional parameters for the ServiceEndpointPoliciesClient.Get method. +type ServiceEndpointPoliciesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListByResourceGroupPager +// method. +type ServiceEndpointPoliciesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListPager +// method. +type ServiceEndpointPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// ServiceEndpointPoliciesClientUpdateTagsOptions contains the optional parameters for the ServiceEndpointPoliciesClient.UpdateTags +// method. +type ServiceEndpointPoliciesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate +// method. +type ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginDelete +// method. +type ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceEndpointPolicyDefinitionsClientGetOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.Get +// method. +type ServiceEndpointPolicyDefinitionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager +// method. +type ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.NewListPager +// method. +type ServiceTagInformationClientListOptions struct { + // Do not return address prefixes for the tag(s). + NoAddressPrefixes *bool + + // Return tag information for a particular tag. + TagName *string +} + +// ServiceTagsClientListOptions contains the optional parameters for the ServiceTagsClient.List method. +type ServiceTagsClientListOptions struct { + // placeholder for future optional parameters +} + +// StaticCidrsClientBeginDeleteOptions contains the optional parameters for the StaticCidrsClient.BeginDelete method. +type StaticCidrsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticCidrsClientCreateOptions contains the optional parameters for the StaticCidrsClient.Create method. +type StaticCidrsClientCreateOptions struct { + // StaticCidr resource object to create/update. + Body *StaticCidr +} + +// StaticCidrsClientGetOptions contains the optional parameters for the StaticCidrsClient.Get method. +type StaticCidrsClientGetOptions struct { + // placeholder for future optional parameters +} + +// StaticCidrsClientListOptions contains the optional parameters for the StaticCidrsClient.NewListPager method. +type StaticCidrsClientListOptions struct { + // Optional num entries to skip. + Skip *int32 + + // Optional skip token. + SkipToken *string + + // Optional key by which to sort. + SortKey *string + + // Optional sort value for pagination. + SortValue *string + + // Optional num entries to show. + Top *int32 +} + +// StaticMembersClientCreateOrUpdateOptions contains the optional parameters for the StaticMembersClient.CreateOrUpdate method. +type StaticMembersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// StaticMembersClientDeleteOptions contains the optional parameters for the StaticMembersClient.Delete method. +type StaticMembersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// StaticMembersClientGetOptions contains the optional parameters for the StaticMembersClient.Get method. +type StaticMembersClientGetOptions struct { + // placeholder for future optional parameters +} + +// StaticMembersClientListOptions contains the optional parameters for the StaticMembersClient.NewListPager method. +type StaticMembersClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// SubnetsClientBeginCreateOrUpdateOptions contains the optional parameters for the SubnetsClient.BeginCreateOrUpdate method. +type SubnetsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SubnetsClientBeginDeleteOptions contains the optional parameters for the SubnetsClient.BeginDelete method. +type SubnetsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SubnetsClientBeginPrepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginPrepareNetworkPolicies +// method. +type SubnetsClientBeginPrepareNetworkPoliciesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SubnetsClientBeginUnprepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginUnprepareNetworkPolicies +// method. +type SubnetsClientBeginUnprepareNetworkPoliciesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SubnetsClientGetOptions contains the optional parameters for the SubnetsClient.Get method. +type SubnetsClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// SubnetsClientListOptions contains the optional parameters for the SubnetsClient.NewListPager method. +type SubnetsClientListOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate +// method. +type SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Delete +// method. +type SubscriptionNetworkManagerConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionNetworkManagerConnectionsClientGetOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Get +// method. +type SubscriptionNetworkManagerConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionNetworkManagerConnectionsClientListOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.NewListPager +// method. +type SubscriptionNetworkManagerConnectionsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. +type UsagesClientListOptions struct { + // placeholder for future optional parameters +} + +// VPNConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNConnectionsClient.BeginCreateOrUpdate +// method. +type VPNConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNConnectionsClientBeginDeleteOptions contains the optional parameters for the VPNConnectionsClient.BeginDelete method. +type VPNConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStartPacketCapture +// method. +type VPNConnectionsClientBeginStartPacketCaptureOptions struct { + // Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. + Parameters *VPNConnectionPacketCaptureStartParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStopPacketCapture +// method. +type VPNConnectionsClientBeginStopPacketCaptureOptions struct { + // Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. + Parameters *VPNConnectionPacketCaptureStopParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNConnectionsClientGetOptions contains the optional parameters for the VPNConnectionsClient.Get method. +type VPNConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.NewListByVPNGatewayPager +// method. +type VPNConnectionsClientListByVPNGatewayOptions struct { + // placeholder for future optional parameters +} + +// VPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNGatewaysClient.BeginCreateOrUpdate +// method. +type VPNGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientBeginDeleteOptions contains the optional parameters for the VPNGatewaysClient.BeginDelete method. +type VPNGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientBeginResetOptions contains the optional parameters for the VPNGatewaysClient.BeginReset method. +type VPNGatewaysClientBeginResetOptions struct { + // VpnGateway ipConfigurationId to specify the gateway instance. + IPConfigurationID *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStartPacketCapture +// method. +type VPNGatewaysClientBeginStartPacketCaptureOptions struct { + // Vpn gateway packet capture parameters supplied to start packet capture on vpn gateway. + Parameters *VPNGatewayPacketCaptureStartParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStopPacketCapture +// method. +type VPNGatewaysClientBeginStopPacketCaptureOptions struct { + // Vpn gateway packet capture parameters supplied to stop packet capture on vpn gateway. + Parameters *VPNGatewayPacketCaptureStopParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VPNGatewaysClient.BeginUpdateTags method. +type VPNGatewaysClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientGetOptions contains the optional parameters for the VPNGatewaysClient.Get method. +type VPNGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.NewListByResourceGroupPager +// method. +type VPNGatewaysClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.NewListPager method. +type VPNGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// VPNLinkConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginGetIkeSas +// method. +type VPNLinkConnectionsClientBeginGetIkeSasOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNLinkConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginResetConnection +// method. +type VPNLinkConnectionsClientBeginResetConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNLinkConnectionsClientBeginSetOrInitDefaultSharedKeyOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginSetOrInitDefaultSharedKey +// method. +type VPNLinkConnectionsClientBeginSetOrInitDefaultSharedKeyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNLinkConnectionsClientGetAllSharedKeysOptions contains the optional parameters for the VPNLinkConnectionsClient.NewGetAllSharedKeysPager +// method. +type VPNLinkConnectionsClientGetAllSharedKeysOptions struct { + // placeholder for future optional parameters +} + +// VPNLinkConnectionsClientGetDefaultSharedKeyOptions contains the optional parameters for the VPNLinkConnectionsClient.GetDefaultSharedKey +// method. +type VPNLinkConnectionsClientGetDefaultSharedKeyOptions struct { + // placeholder for future optional parameters +} + +// VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.NewListByVPNConnectionPager +// method. +type VPNLinkConnectionsClientListByVPNConnectionOptions struct { + // placeholder for future optional parameters +} + +// VPNLinkConnectionsClientListDefaultSharedKeyOptions contains the optional parameters for the VPNLinkConnectionsClient.ListDefaultSharedKey +// method. +type VPNLinkConnectionsClientListDefaultSharedKeyOptions struct { + // placeholder for future optional parameters +} + +// VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions contains the optional parameters for the VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList +// method. +type VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNServerConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginCreateOrUpdate +// method. +type VPNServerConfigurationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNServerConfigurationsClientBeginDeleteOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginDelete +// method. +type VPNServerConfigurationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNServerConfigurationsClientGetOptions contains the optional parameters for the VPNServerConfigurationsClient.Get method. +type VPNServerConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListByResourceGroupPager +// method. +type VPNServerConfigurationsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListPager +// method. +type VPNServerConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// VPNServerConfigurationsClientUpdateTagsOptions contains the optional parameters for the VPNServerConfigurationsClient.UpdateTags +// method. +type VPNServerConfigurationsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VPNSiteLinkConnectionsClientGetOptions contains the optional parameters for the VPNSiteLinkConnectionsClient.Get method. +type VPNSiteLinkConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNSiteLinksClientGetOptions contains the optional parameters for the VPNSiteLinksClient.Get method. +type VPNSiteLinksClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.NewListByVPNSitePager +// method. +type VPNSiteLinksClientListByVPNSiteOptions struct { + // placeholder for future optional parameters +} + +// VPNSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNSitesClient.BeginCreateOrUpdate method. +type VPNSitesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNSitesClientBeginDeleteOptions contains the optional parameters for the VPNSitesClient.BeginDelete method. +type VPNSitesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNSitesClientGetOptions contains the optional parameters for the VPNSitesClient.Get method. +type VPNSitesClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.NewListByResourceGroupPager +// method. +type VPNSitesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.NewListPager method. +type VPNSitesClientListOptions struct { + // placeholder for future optional parameters +} + +// VPNSitesClientUpdateTagsOptions contains the optional parameters for the VPNSitesClient.UpdateTags method. +type VPNSitesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VPNSitesConfigurationClientBeginDownloadOptions contains the optional parameters for the VPNSitesConfigurationClient.BeginDownload +// method. +type VPNSitesConfigurationClientBeginDownloadOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VerifierWorkspacesClientBeginDeleteOptions contains the optional parameters for the VerifierWorkspacesClient.BeginDelete +// method. +type VerifierWorkspacesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VerifierWorkspacesClientCreateOptions contains the optional parameters for the VerifierWorkspacesClient.Create method. +type VerifierWorkspacesClientCreateOptions struct { + // placeholder for future optional parameters +} + +// VerifierWorkspacesClientGetOptions contains the optional parameters for the VerifierWorkspacesClient.Get method. +type VerifierWorkspacesClientGetOptions struct { + // placeholder for future optional parameters +} + +// VerifierWorkspacesClientListOptions contains the optional parameters for the VerifierWorkspacesClient.NewListPager method. +type VerifierWorkspacesClientListOptions struct { + // Optional num entries to skip. + Skip *int32 + + // Optional skip token. + SkipToken *string + + // Optional key by which to sort. + SortKey *string + + // Optional sort value for pagination. + SortValue *string + + // Optional num entries to show. + Top *int32 +} + +// VerifierWorkspacesClientUpdateOptions contains the optional parameters for the VerifierWorkspacesClient.Update method. +type VerifierWorkspacesClientUpdateOptions struct { + // Verifier Workspace object to create/update. + Body *VerifierWorkspaceUpdate +} + +// VipSwapClientBeginCreateOptions contains the optional parameters for the VipSwapClient.BeginCreate method. +type VipSwapClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VipSwapClientGetOptions contains the optional parameters for the VipSwapClient.Get method. +type VipSwapClientGetOptions struct { + // placeholder for future optional parameters +} + +// VipSwapClientListOptions contains the optional parameters for the VipSwapClient.List method. +type VipSwapClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceConnectionsClient.BeginCreateOrUpdate +// method. +type VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualApplianceConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceConnectionsClient.BeginDelete +// method. +type VirtualApplianceConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualApplianceConnectionsClientGetOptions contains the optional parameters for the VirtualApplianceConnectionsClient.Get +// method. +type VirtualApplianceConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceConnectionsClientListOptions contains the optional parameters for the VirtualApplianceConnectionsClient.NewListPager +// method. +type VirtualApplianceConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceSKUsClientGetOptions contains the optional parameters for the VirtualApplianceSKUsClient.Get method. +type VirtualApplianceSKUsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.NewListPager +// method. +type VirtualApplianceSKUsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginCreateOrUpdate +// method. +type VirtualApplianceSitesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualApplianceSitesClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginDelete +// method. +type VirtualApplianceSitesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualApplianceSitesClientGetOptions contains the optional parameters for the VirtualApplianceSitesClient.Get method. +type VirtualApplianceSitesClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.NewListPager +// method. +type VirtualApplianceSitesClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualAppliancesClient.BeginCreateOrUpdate +// method. +type VirtualAppliancesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualAppliancesClientBeginDeleteOptions contains the optional parameters for the VirtualAppliancesClient.BeginDelete +// method. +type VirtualAppliancesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualAppliancesClientBeginRestartOptions contains the optional parameters for the VirtualAppliancesClient.BeginRestart +// method. +type VirtualAppliancesClientBeginRestartOptions struct { + // Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. + NetworkVirtualApplianceInstanceIDs *VirtualApplianceInstanceIDs + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualAppliancesClientGetOptions contains the optional parameters for the VirtualAppliancesClient.Get method. +type VirtualAppliancesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.NewListByResourceGroupPager +// method. +type VirtualAppliancesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.NewListPager method. +type VirtualAppliancesClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualAppliancesClientUpdateTagsOptions contains the optional parameters for the VirtualAppliancesClient.UpdateTags method. +type VirtualAppliancesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginCreateOrUpdate +// method. +type VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubBgpConnectionClientBeginDeleteOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginDelete +// method. +type VirtualHubBgpConnectionClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubBgpConnectionClientGetOptions contains the optional parameters for the VirtualHubBgpConnectionClient.Get method. +type VirtualHubBgpConnectionClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes +// method. +type VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListLearnedRoutes +// method. +type VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.NewListPager +// method. +type VirtualHubBgpConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginCreateOrUpdate +// method. +type VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubIPConfigurationClientBeginDeleteOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginDelete +// method. +type VirtualHubIPConfigurationClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubIPConfigurationClientGetOptions contains the optional parameters for the VirtualHubIPConfigurationClient.Get +// method. +type VirtualHubIPConfigurationClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.NewListPager +// method. +type VirtualHubIPConfigurationClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginCreateOrUpdate +// method. +type VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubRouteTableV2SClientBeginDeleteOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginDelete +// method. +type VirtualHubRouteTableV2SClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubRouteTableV2SClientGetOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.Get method. +type VirtualHubRouteTableV2SClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.NewListPager +// method. +type VirtualHubRouteTableV2SClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubsClient.BeginCreateOrUpdate +// method. +type VirtualHubsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubsClientBeginDeleteOptions contains the optional parameters for the VirtualHubsClient.BeginDelete method. +type VirtualHubsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes +// method. +type VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions struct { + // Parameters supplied to get the effective routes for a specific resource. + EffectiveRoutesParameters *EffectiveRoutesParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubsClientBeginGetInboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetInboundRoutes +// method. +type VirtualHubsClientBeginGetInboundRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubsClientBeginGetOutboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetOutboundRoutes +// method. +type VirtualHubsClientBeginGetOutboundRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubsClientGetOptions contains the optional parameters for the VirtualHubsClient.Get method. +type VirtualHubsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.NewListByResourceGroupPager +// method. +type VirtualHubsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.NewListPager method. +type VirtualHubsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubsClientUpdateTagsOptions contains the optional parameters for the VirtualHubsClient.UpdateTags method. +type VirtualHubsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate +// method. +type VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginDelete +// method. +type VirtualNetworkGatewayConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas +// method. +type VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetConnection +// method. +type VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey +// method. +type VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey +// method. +type VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture +// method. +type VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions struct { + // Virtual network gateway packet capture parameters supplied to start packet capture on gateway connection. + Parameters *VPNPacketCaptureStartParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture +// method. +type VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginUpdateTags +// method. +type VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientGetOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.Get +// method. +type VirtualNetworkGatewayConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.GetSharedKey +// method. +type VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.NewListPager +// method. +type VirtualNetworkGatewayConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate +// method. +type VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayNatRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginDelete +// method. +type VirtualNetworkGatewayNatRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayNatRulesClientGetOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.Get +// method. +type VirtualNetworkGatewayNatRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager +// method. +type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginCreateOrUpdate +// method. +type VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginDelete +// method. +type VirtualNetworkGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions contains the optional parameters +// for the VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections method. +type VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGenerateVPNProfile +// method. +type VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage +// method. +type VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes +// method. +type VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus +// method. +type VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions struct { + // The IP address of the peer to retrieve the status of. + Peer *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetFailoverAllTestDetailsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetFailoverAllTestDetails +// method. +type VirtualNetworkGatewaysClientBeginGetFailoverAllTestDetailsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetFailoverSingleTestDetailsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetFailoverSingleTestDetails +// method. +type VirtualNetworkGatewaysClientBeginGetFailoverSingleTestDetailsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetLearnedRoutes +// method. +type VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL +// method. +type VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth +// method. +type VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters +// method. +type VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginResetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginReset +// method. +type VirtualNetworkGatewaysClientBeginResetOptions struct { + // Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. + GatewayVip *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey +// method. +type VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters +// method. +type VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginStartExpressRouteSiteFailoverSimulationOptions contains the optional parameters for the +// VirtualNetworkGatewaysClient.BeginStartExpressRouteSiteFailoverSimulation method. +type VirtualNetworkGatewaysClientBeginStartExpressRouteSiteFailoverSimulationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStartPacketCapture +// method. +type VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions struct { + // Virtual network gateway packet capture parameters supplied to start packet capture on gateway. + Parameters *VPNPacketCaptureStartParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginStopExpressRouteSiteFailoverSimulationOptions contains the optional parameters for the +// VirtualNetworkGatewaysClient.BeginStopExpressRouteSiteFailoverSimulation method. +type VirtualNetworkGatewaysClientBeginStopExpressRouteSiteFailoverSimulationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStopPacketCapture +// method. +type VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginUpdateTags +// method. +type VirtualNetworkGatewaysClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientGetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.Get method. +type VirtualNetworkGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListConnectionsPager +// method. +type VirtualNetworkGatewaysClientListConnectionsOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListPager +// method. +type VirtualNetworkGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewaysClientSupportedVPNDevicesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.SupportedVPNDevices +// method. +type VirtualNetworkGatewaysClientSupportedVPNDevicesOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions contains the optional parameters for the VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript +// method. +type VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginCreateOrUpdate +// method. +type VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + + // Parameter indicates the intention to sync the peering with the current address space on the remote vNet after it's updated. + SyncRemoteAddressSpace *SyncRemoteAddressSpace +} + +// VirtualNetworkPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginDelete +// method. +type VirtualNetworkPeeringsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkPeeringsClientGetOptions contains the optional parameters for the VirtualNetworkPeeringsClient.Get method. +type VirtualNetworkPeeringsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.NewListPager +// method. +type VirtualNetworkPeeringsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkTapsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginCreateOrUpdate +// method. +type VirtualNetworkTapsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkTapsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginDelete +// method. +type VirtualNetworkTapsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkTapsClientGetOptions contains the optional parameters for the VirtualNetworkTapsClient.Get method. +type VirtualNetworkTapsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListAllPager +// method. +type VirtualNetworkTapsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListByResourceGroupPager +// method. +type VirtualNetworkTapsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkTapsClientUpdateTagsOptions contains the optional parameters for the VirtualNetworkTapsClient.UpdateTags +// method. +type VirtualNetworkTapsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate +// method. +type VirtualNetworksClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method. +type VirtualNetworksClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworksClientBeginListDdosProtectionStatusOptions contains the optional parameters for the VirtualNetworksClient.BeginListDdosProtectionStatus +// method. +type VirtualNetworksClientBeginListDdosProtectionStatusOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + + // The skipToken that is given with nextLink. + SkipToken *string + + // The max number of ip addresses to return. + Top *int32 +} + +// VirtualNetworksClientCheckIPAddressAvailabilityOptions contains the optional parameters for the VirtualNetworksClient.CheckIPAddressAvailability +// method. +type VirtualNetworksClientCheckIPAddressAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. +type VirtualNetworksClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.NewListAllPager method. +type VirtualNetworksClientListAllOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager method. +type VirtualNetworksClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.NewListUsagePager +// method. +type VirtualNetworksClientListUsageOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientUpdateTagsOptions contains the optional parameters for the VirtualNetworksClient.UpdateTags method. +type VirtualNetworksClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VirtualRouterPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginCreateOrUpdate +// method. +type VirtualRouterPeeringsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualRouterPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginDelete +// method. +type VirtualRouterPeeringsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualRouterPeeringsClientGetOptions contains the optional parameters for the VirtualRouterPeeringsClient.Get method. +type VirtualRouterPeeringsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.NewListPager +// method. +type VirtualRouterPeeringsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualRoutersClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRoutersClient.BeginCreateOrUpdate +// method. +type VirtualRoutersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualRoutersClientBeginDeleteOptions contains the optional parameters for the VirtualRoutersClient.BeginDelete method. +type VirtualRoutersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualRoutersClientGetOptions contains the optional parameters for the VirtualRoutersClient.Get method. +type VirtualRoutersClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.NewListByResourceGroupPager +// method. +type VirtualRoutersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.NewListPager method. +type VirtualRoutersClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualWansClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualWansClient.BeginCreateOrUpdate +// method. +type VirtualWansClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualWansClientBeginDeleteOptions contains the optional parameters for the VirtualWansClient.BeginDelete method. +type VirtualWansClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualWansClientGetOptions contains the optional parameters for the VirtualWansClient.Get method. +type VirtualWansClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.NewListByResourceGroupPager +// method. +type VirtualWansClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.NewListPager method. +type VirtualWansClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualWansClientUpdateTagsOptions contains the optional parameters for the VirtualWansClient.UpdateTags method. +type VirtualWansClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientBeginCheckConnectivityOptions contains the optional parameters for the WatchersClient.BeginCheckConnectivity +// method. +type WatchersClientBeginCheckConnectivityOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method. +type WatchersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetAzureReachabilityReportOptions contains the optional parameters for the WatchersClient.BeginGetAzureReachabilityReport +// method. +type WatchersClientBeginGetAzureReachabilityReportOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetFlowLogStatusOptions contains the optional parameters for the WatchersClient.BeginGetFlowLogStatus +// method. +type WatchersClientBeginGetFlowLogStatusOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetNetworkConfigurationDiagnosticOptions contains the optional parameters for the WatchersClient.BeginGetNetworkConfigurationDiagnostic +// method. +type WatchersClientBeginGetNetworkConfigurationDiagnosticOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetNextHopOptions contains the optional parameters for the WatchersClient.BeginGetNextHop method. +type WatchersClientBeginGetNextHopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetTroubleshootingOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshooting +// method. +type WatchersClientBeginGetTroubleshootingOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetTroubleshootingResultOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshootingResult +// method. +type WatchersClientBeginGetTroubleshootingResultOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetVMSecurityRulesOptions contains the optional parameters for the WatchersClient.BeginGetVMSecurityRules +// method. +type WatchersClientBeginGetVMSecurityRulesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginListAvailableProvidersOptions contains the optional parameters for the WatchersClient.BeginListAvailableProviders +// method. +type WatchersClientBeginListAvailableProvidersOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginSetFlowLogConfigurationOptions contains the optional parameters for the WatchersClient.BeginSetFlowLogConfiguration +// method. +type WatchersClientBeginSetFlowLogConfigurationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginVerifyIPFlowOptions contains the optional parameters for the WatchersClient.BeginVerifyIPFlow method. +type WatchersClientBeginVerifyIPFlowOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientCreateOrUpdateOptions contains the optional parameters for the WatchersClient.CreateOrUpdate method. +type WatchersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientGetOptions contains the optional parameters for the WatchersClient.Get method. +type WatchersClientGetOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientGetTopologyOptions contains the optional parameters for the WatchersClient.GetTopology method. +type WatchersClientGetTopologyOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientListAllOptions contains the optional parameters for the WatchersClient.NewListAllPager method. +type WatchersClientListAllOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientListOptions contains the optional parameters for the WatchersClient.NewListPager method. +type WatchersClientListOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientUpdateTagsOptions contains the optional parameters for the WatchersClient.UpdateTags method. +type WatchersClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete +// method. +type WebApplicationFirewallPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebApplicationFirewallPoliciesClientCreateOrUpdateOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.CreateOrUpdate +// method. +type WebApplicationFirewallPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WebApplicationFirewallPoliciesClientGetOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.Get +// method. +type WebApplicationFirewallPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListAllPager +// method. +type WebApplicationFirewallPoliciesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListPager +// method. +type WebApplicationFirewallPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// WebCategoriesClientGetOptions contains the optional parameters for the WebCategoriesClient.Get method. +type WebCategoriesClientGetOptions struct { + // Expands resourceIds back referenced by the azureWebCategory resource. + Expand *string +} + +// WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.NewListBySubscriptionPager +// method. +type WebCategoriesClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/p2svpngateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/p2svpngateways_client.go new file mode 100644 index 00000000..c0d4c7f5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/p2svpngateways_client.go @@ -0,0 +1,865 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// P2SVPNGatewaysClient contains the methods for the P2SVPNGateways group. +// Don't use this type directly, use NewP2SVPNGatewaysClient() instead. +type P2SVPNGatewaysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewP2SVPNGatewaysClient creates a new instance of P2SVPNGatewaysClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewP2SVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*P2SVPNGatewaysClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &P2SVPNGatewaysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - gatewayName - The name of the gateway. +// - p2SVPNGatewayParameters - Parameters supplied to create or Update a virtual wan p2s vpn gateway. +// - options - P2SVPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginCreateOrUpdate +// method. +func (client *P2SVPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters P2SVPNGateway, options *P2SVPNGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[P2SVPNGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *P2SVPNGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters P2SVPNGateway, options *P2SVPNGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "P2SVPNGatewaysClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *P2SVPNGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters P2SVPNGateway, options *P2SVPNGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, p2SVPNGatewayParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a virtual wan p2s vpn gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - gatewayName - The name of the gateway. +// - options - P2SVPNGatewaysClientBeginDeleteOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDelete +// method. +func (client *P2SVPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginDeleteOptions) (*runtime.Poller[P2SVPNGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a virtual wan p2s vpn gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *P2SVPNGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "P2SVPNGatewaysClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *P2SVPNGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDisconnectP2SVPNConnections - Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource +// group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - p2SVPNGatewayName - The name of the P2S Vpn Gateway. +// - request - The parameters are supplied to disconnect p2s vpn connections. +// - options - P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections +// method. +func (client *P2SVPNGatewaysClient) BeginDisconnectP2SVPNConnections(ctx context.Context, resourceGroupName string, p2SVPNGatewayName string, request P2SVPNConnectionRequest, options *P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions) (*runtime.Poller[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.disconnectP2SVPNConnections(ctx, resourceGroupName, p2SVPNGatewayName, request, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DisconnectP2SVPNConnections - Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource +// group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *P2SVPNGatewaysClient) disconnectP2SVPNConnections(ctx context.Context, resourceGroupName string, p2SVPNGatewayName string, request P2SVPNConnectionRequest, options *P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions) (*http.Response, error) { + var err error + const operationName = "P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disconnectP2SVPNConnectionsCreateRequest(ctx, resourceGroupName, p2SVPNGatewayName, request, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// disconnectP2SVPNConnectionsCreateRequest creates the DisconnectP2SVPNConnections request. +func (client *P2SVPNGatewaysClient) disconnectP2SVPNConnectionsCreateRequest(ctx context.Context, resourceGroupName string, p2SVPNGatewayName string, request P2SVPNConnectionRequest, options *P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if p2SVPNGatewayName == "" { + return nil, errors.New("parameter p2SVPNGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{p2sVpnGatewayName}", url.PathEscape(p2SVPNGatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// BeginGenerateVPNProfile - Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the P2SVpnGateway. +// - parameters - Parameters supplied to the generate P2SVpnGateway VPN client package operation. +// - options - P2SVPNGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGenerateVPNProfile +// method. +func (client *P2SVPNGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVPNProfileParameters, options *P2SVPNGatewaysClientBeginGenerateVPNProfileOptions) (*runtime.Poller[P2SVPNGatewaysClientGenerateVPNProfileResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.generateVPNProfile(ctx, resourceGroupName, gatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientGenerateVPNProfileResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientGenerateVPNProfileResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GenerateVPNProfile - Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *P2SVPNGatewaysClient) generateVPNProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVPNProfileParameters, options *P2SVPNGatewaysClientBeginGenerateVPNProfileOptions) (*http.Response, error) { + var err error + const operationName = "P2SVPNGatewaysClient.BeginGenerateVPNProfile" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateVPNProfileCreateRequest(ctx, resourceGroupName, gatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// generateVPNProfileCreateRequest creates the GenerateVPNProfile request. +func (client *P2SVPNGatewaysClient) generateVPNProfileCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVPNProfileParameters, options *P2SVPNGatewaysClientBeginGenerateVPNProfileOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Retrieves the details of a virtual wan p2s vpn gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - gatewayName - The name of the gateway. +// - options - P2SVPNGatewaysClientGetOptions contains the optional parameters for the P2SVPNGatewaysClient.Get method. +func (client *P2SVPNGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientGetOptions) (P2SVPNGatewaysClientGetResponse, error) { + var err error + const operationName = "P2SVPNGatewaysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return P2SVPNGatewaysClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return P2SVPNGatewaysClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return P2SVPNGatewaysClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *P2SVPNGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *P2SVPNGatewaysClient) getHandleResponse(resp *http.Response) (P2SVPNGatewaysClientGetResponse, error) { + result := P2SVPNGatewaysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.P2SVPNGateway); err != nil { + return P2SVPNGatewaysClientGetResponse{}, err + } + return result, nil +} + +// BeginGetP2SVPNConnectionHealth - Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified +// resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the P2SVpnGateway. +// - options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth +// method. +func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions) (*runtime.Poller[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getP2SVPNConnectionHealth(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetP2SVPNConnectionHealth - Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified +// resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions) (*http.Response, error) { + var err error + const operationName = "P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getP2SVPNConnectionHealthCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getP2SVPNConnectionHealthCreateRequest creates the GetP2SVPNConnectionHealth request. +func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginGetP2SVPNConnectionHealthDetailed - Gets the sas url to get the connection health detail of P2S clients of the virtual +// wan P2SVpnGateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the P2SVpnGateway. +// - request - Request parameters supplied to get p2s vpn connections detailed health. +// - options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed +// method. +func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVPNConnectionHealthRequest, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions) (*runtime.Poller[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getP2SVPNConnectionHealthDetailed(ctx, resourceGroupName, gatewayName, request, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetP2SVPNConnectionHealthDetailed - Gets the sas url to get the connection health detail of P2S clients of the virtual +// wan P2SVpnGateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVPNConnectionHealthRequest, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions) (*http.Response, error) { + var err error + const operationName = "P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getP2SVPNConnectionHealthDetailedCreateRequest(ctx, resourceGroupName, gatewayName, request, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getP2SVPNConnectionHealthDetailedCreateRequest creates the GetP2SVPNConnectionHealthDetailed request. +func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthDetailedCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVPNConnectionHealthRequest, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// NewListPager - Lists all the P2SVpnGateways in a subscription. +// +// Generated from API version 2024-05-01 +// - options - P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListPager method. +func (client *P2SVPNGatewaysClient) NewListPager(options *P2SVPNGatewaysClientListOptions) *runtime.Pager[P2SVPNGatewaysClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[P2SVPNGatewaysClientListResponse]{ + More: func(page P2SVPNGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *P2SVPNGatewaysClientListResponse) (P2SVPNGatewaysClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "P2SVPNGatewaysClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return P2SVPNGatewaysClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *P2SVPNGatewaysClient) listCreateRequest(ctx context.Context, options *P2SVPNGatewaysClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *P2SVPNGatewaysClient) listHandleResponse(resp *http.Response) (P2SVPNGatewaysClientListResponse, error) { + result := P2SVPNGatewaysClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListP2SVPNGatewaysResult); err != nil { + return P2SVPNGatewaysClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all the P2SVpnGateways in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - options - P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListByResourceGroupPager +// method. +func (client *P2SVPNGatewaysClient) NewListByResourceGroupPager(resourceGroupName string, options *P2SVPNGatewaysClientListByResourceGroupOptions) *runtime.Pager[P2SVPNGatewaysClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[P2SVPNGatewaysClientListByResourceGroupResponse]{ + More: func(page P2SVPNGatewaysClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *P2SVPNGatewaysClientListByResourceGroupResponse) (P2SVPNGatewaysClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "P2SVPNGatewaysClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return P2SVPNGatewaysClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *P2SVPNGatewaysClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *P2SVPNGatewaysClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *P2SVPNGatewaysClient) listByResourceGroupHandleResponse(resp *http.Response) (P2SVPNGatewaysClientListByResourceGroupResponse, error) { + result := P2SVPNGatewaysClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListP2SVPNGatewaysResult); err != nil { + return P2SVPNGatewaysClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginReset - Resets the primary of the p2s vpn gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - gatewayName - The name of the gateway. +// - options - P2SVPNGatewaysClientBeginResetOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginReset +// method. +func (client *P2SVPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginResetOptions) (*runtime.Poller[P2SVPNGatewaysClientResetResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reset(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientResetResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientResetResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Reset - Resets the primary of the p2s vpn gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *P2SVPNGatewaysClient) reset(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginResetOptions) (*http.Response, error) { + var err error + const operationName = "P2SVPNGatewaysClient.BeginReset" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resetCreateRequest creates the Reset request. +func (client *P2SVPNGatewaysClient) resetCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginResetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginUpdateTags - Updates virtual wan p2s vpn gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - gatewayName - The name of the gateway. +// - p2SVPNGatewayParameters - Parameters supplied to update a virtual wan p2s vpn gateway tags. +// - options - P2SVPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginUpdateTags +// method. +func (client *P2SVPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters TagsObject, options *P2SVPNGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[P2SVPNGatewaysClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[P2SVPNGatewaysClientUpdateTagsResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[P2SVPNGatewaysClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateTags - Updates virtual wan p2s vpn gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *P2SVPNGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters TagsObject, options *P2SVPNGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { + var err error + const operationName = "P2SVPNGatewaysClient.BeginUpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *P2SVPNGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters TagsObject, options *P2SVPNGatewaysClientBeginUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, p2SVPNGatewayParameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/packetcaptures_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/packetcaptures_client.go new file mode 100644 index 00000000..8a09e933 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/packetcaptures_client.go @@ -0,0 +1,511 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PacketCapturesClient contains the methods for the PacketCaptures group. +// Don't use this type directly, use NewPacketCapturesClient() instead. +type PacketCapturesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPacketCapturesClient creates a new instance of PacketCapturesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPacketCapturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PacketCapturesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PacketCapturesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Create and start a packet capture on the specified VM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - packetCaptureName - The name of the packet capture session. +// - parameters - Parameters that define the create packet capture operation. +// - options - PacketCapturesClientBeginCreateOptions contains the optional parameters for the PacketCapturesClient.BeginCreate +// method. +func (client *PacketCapturesClient) BeginCreate(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOptions) (*runtime.Poller[PacketCapturesClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PacketCapturesClientCreateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PacketCapturesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Create and start a packet capture on the specified VM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PacketCapturesClient) create(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "PacketCapturesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *PacketCapturesClient) createCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if packetCaptureName == "" { + return nil, errors.New("parameter packetCaptureName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{packetCaptureName}", url.PathEscape(packetCaptureName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified packet capture session. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - packetCaptureName - The name of the packet capture session. +// - options - PacketCapturesClientBeginDeleteOptions contains the optional parameters for the PacketCapturesClient.BeginDelete +// method. +func (client *PacketCapturesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (*runtime.Poller[PacketCapturesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PacketCapturesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PacketCapturesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified packet capture session. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PacketCapturesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PacketCapturesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PacketCapturesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if packetCaptureName == "" { + return nil, errors.New("parameter packetCaptureName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{packetCaptureName}", url.PathEscape(packetCaptureName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a packet capture session by name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - packetCaptureName - The name of the packet capture session. +// - options - PacketCapturesClientGetOptions contains the optional parameters for the PacketCapturesClient.Get method. +func (client *PacketCapturesClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientGetOptions) (PacketCapturesClientGetResponse, error) { + var err error + const operationName = "PacketCapturesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) + if err != nil { + return PacketCapturesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PacketCapturesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PacketCapturesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PacketCapturesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if packetCaptureName == "" { + return nil, errors.New("parameter packetCaptureName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{packetCaptureName}", url.PathEscape(packetCaptureName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PacketCapturesClient) getHandleResponse(resp *http.Response) (PacketCapturesClientGetResponse, error) { + result := PacketCapturesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PacketCaptureResult); err != nil { + return PacketCapturesClientGetResponse{}, err + } + return result, nil +} + +// BeginGetStatus - Query the status of a running packet capture session. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the Network Watcher resource. +// - packetCaptureName - The name given to the packet capture session. +// - options - PacketCapturesClientBeginGetStatusOptions contains the optional parameters for the PacketCapturesClient.BeginGetStatus +// method. +func (client *PacketCapturesClient) BeginGetStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginGetStatusOptions) (*runtime.Poller[PacketCapturesClientGetStatusResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getStatus(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PacketCapturesClientGetStatusResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PacketCapturesClientGetStatusResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetStatus - Query the status of a running packet capture session. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PacketCapturesClient) getStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginGetStatusOptions) (*http.Response, error) { + var err error + const operationName = "PacketCapturesClient.BeginGetStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getStatusCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getStatusCreateRequest creates the GetStatus request. +func (client *PacketCapturesClient) getStatusCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginGetStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if packetCaptureName == "" { + return nil, errors.New("parameter packetCaptureName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{packetCaptureName}", url.PathEscape(packetCaptureName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListPager - Lists all packet capture sessions within the specified resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the Network Watcher resource. +// - options - PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.NewListPager method. +func (client *PacketCapturesClient) NewListPager(resourceGroupName string, networkWatcherName string, options *PacketCapturesClientListOptions) *runtime.Pager[PacketCapturesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PacketCapturesClientListResponse]{ + More: func(page PacketCapturesClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *PacketCapturesClientListResponse) (PacketCapturesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PacketCapturesClient.NewListPager") + req, err := client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) + if err != nil { + return PacketCapturesClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PacketCapturesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PacketCapturesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PacketCapturesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, options *PacketCapturesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PacketCapturesClient) listHandleResponse(resp *http.Response) (PacketCapturesClientListResponse, error) { + result := PacketCapturesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PacketCaptureListResult); err != nil { + return PacketCapturesClientListResponse{}, err + } + return result, nil +} + +// BeginStop - Stops a specified packet capture session. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - packetCaptureName - The name of the packet capture session. +// - options - PacketCapturesClientBeginStopOptions contains the optional parameters for the PacketCapturesClient.BeginStop +// method. +func (client *PacketCapturesClient) BeginStop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (*runtime.Poller[PacketCapturesClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PacketCapturesClientStopResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PacketCapturesClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Stop - Stops a specified packet capture session. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PacketCapturesClient) stop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "PacketCapturesClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopCreateRequest creates the Stop request. +func (client *PacketCapturesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if packetCaptureName == "" { + return nil, errors.New("parameter packetCaptureName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{packetCaptureName}", url.PathEscape(packetCaptureName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/peerexpressroutecircuitconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/peerexpressroutecircuitconnections_client.go new file mode 100644 index 00000000..d9877b7e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/peerexpressroutecircuitconnections_client.go @@ -0,0 +1,190 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PeerExpressRouteCircuitConnectionsClient contains the methods for the PeerExpressRouteCircuitConnections group. +// Don't use this type directly, use NewPeerExpressRouteCircuitConnectionsClient() instead. +type PeerExpressRouteCircuitConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPeerExpressRouteCircuitConnectionsClient creates a new instance of PeerExpressRouteCircuitConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PeerExpressRouteCircuitConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PeerExpressRouteCircuitConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - connectionName - The name of the peer express route circuit connection. +// - options - PeerExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.Get +// method. +func (client *PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *PeerExpressRouteCircuitConnectionsClientGetOptions) (PeerExpressRouteCircuitConnectionsClientGetResponse, error) { + var err error + const operationName = "PeerExpressRouteCircuitConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) + if err != nil { + return PeerExpressRouteCircuitConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PeerExpressRouteCircuitConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PeerExpressRouteCircuitConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PeerExpressRouteCircuitConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *PeerExpressRouteCircuitConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PeerExpressRouteCircuitConnectionsClient) getHandleResponse(resp *http.Response) (PeerExpressRouteCircuitConnectionsClientGetResponse, error) { + result := PeerExpressRouteCircuitConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PeerExpressRouteCircuitConnection); err != nil { + return PeerExpressRouteCircuitConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all global reach peer connections associated with a private peering in an express route circuit. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the circuit. +// - peeringName - The name of the peering. +// - options - PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.NewListPager +// method. +func (client *PeerExpressRouteCircuitConnectionsClient) NewListPager(resourceGroupName string, circuitName string, peeringName string, options *PeerExpressRouteCircuitConnectionsClientListOptions) *runtime.Pager[PeerExpressRouteCircuitConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PeerExpressRouteCircuitConnectionsClientListResponse]{ + More: func(page PeerExpressRouteCircuitConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PeerExpressRouteCircuitConnectionsClientListResponse) (PeerExpressRouteCircuitConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PeerExpressRouteCircuitConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) + }, nil) + if err != nil { + return PeerExpressRouteCircuitConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PeerExpressRouteCircuitConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *PeerExpressRouteCircuitConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if circuitName == "" { + return nil, errors.New("parameter circuitName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{circuitName}", url.PathEscape(circuitName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PeerExpressRouteCircuitConnectionsClient) listHandleResponse(resp *http.Response) (PeerExpressRouteCircuitConnectionsClientListResponse, error) { + result := PeerExpressRouteCircuitConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PeerExpressRouteCircuitConnectionListResult); err != nil { + return PeerExpressRouteCircuitConnectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/polymorphic_helpers.go new file mode 100644 index 00000000..9895db93 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/polymorphic_helpers.go @@ -0,0 +1,223 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import "encoding/json" + +func unmarshalActiveBaseSecurityAdminRuleClassification(rawMsg json.RawMessage) (ActiveBaseSecurityAdminRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ActiveBaseSecurityAdminRuleClassification + switch m["kind"] { + case string(EffectiveAdminRuleKindCustom): + b = &ActiveSecurityAdminRule{} + case string(EffectiveAdminRuleKindDefault): + b = &ActiveDefaultSecurityAdminRule{} + default: + b = &ActiveBaseSecurityAdminRule{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalActiveBaseSecurityAdminRuleClassificationArray(rawMsg json.RawMessage) ([]ActiveBaseSecurityAdminRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]ActiveBaseSecurityAdminRuleClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalActiveBaseSecurityAdminRuleClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalBaseAdminRuleClassification(rawMsg json.RawMessage) (BaseAdminRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BaseAdminRuleClassification + switch m["kind"] { + case string(AdminRuleKindCustom): + b = &AdminRule{} + case string(AdminRuleKindDefault): + b = &DefaultAdminRule{} + default: + b = &BaseAdminRule{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalBaseAdminRuleClassificationArray(rawMsg json.RawMessage) ([]BaseAdminRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]BaseAdminRuleClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalBaseAdminRuleClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalEffectiveBaseSecurityAdminRuleClassification(rawMsg json.RawMessage) (EffectiveBaseSecurityAdminRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b EffectiveBaseSecurityAdminRuleClassification + switch m["kind"] { + case string(EffectiveAdminRuleKindCustom): + b = &EffectiveSecurityAdminRule{} + case string(EffectiveAdminRuleKindDefault): + b = &EffectiveDefaultSecurityAdminRule{} + default: + b = &EffectiveBaseSecurityAdminRule{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalEffectiveBaseSecurityAdminRuleClassificationArray(rawMsg json.RawMessage) ([]EffectiveBaseSecurityAdminRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]EffectiveBaseSecurityAdminRuleClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalEffectiveBaseSecurityAdminRuleClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalFirewallPolicyRuleClassification(rawMsg json.RawMessage) (FirewallPolicyRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b FirewallPolicyRuleClassification + switch m["ruleType"] { + case string(FirewallPolicyRuleTypeApplicationRule): + b = &ApplicationRule{} + case string(FirewallPolicyRuleTypeNatRule): + b = &NatRule{} + case string(FirewallPolicyRuleTypeNetworkRule): + b = &Rule{} + default: + b = &FirewallPolicyRule{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalFirewallPolicyRuleClassificationArray(rawMsg json.RawMessage) ([]FirewallPolicyRuleClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]FirewallPolicyRuleClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalFirewallPolicyRuleClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalFirewallPolicyRuleCollectionClassification(rawMsg json.RawMessage) (FirewallPolicyRuleCollectionClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b FirewallPolicyRuleCollectionClassification + switch m["ruleCollectionType"] { + case string(FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection): + b = &FirewallPolicyFilterRuleCollection{} + case string(FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection): + b = &FirewallPolicyNatRuleCollection{} + default: + b = &FirewallPolicyRuleCollection{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalFirewallPolicyRuleCollectionClassificationArray(rawMsg json.RawMessage) ([]FirewallPolicyRuleCollectionClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]FirewallPolicyRuleCollectionClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalFirewallPolicyRuleCollectionClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/privatednszonegroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/privatednszonegroups_client.go new file mode 100644 index 00000000..ae477806 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/privatednszonegroups_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PrivateDNSZoneGroupsClient contains the methods for the PrivateDNSZoneGroups group. +// Don't use this type directly, use NewPrivateDNSZoneGroupsClient() instead. +type PrivateDNSZoneGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateDNSZoneGroupsClient creates a new instance of PrivateDNSZoneGroupsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateDNSZoneGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateDNSZoneGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateDNSZoneGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a private dns zone group in the specified private endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - privateDNSZoneGroupName - The name of the private dns zone group. +// - parameters - Parameters supplied to the create or update private dns zone group operation. +// - options - PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginCreateOrUpdate +// method. +func (client *PrivateDNSZoneGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup, options *PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateDNSZoneGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateDNSZoneGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateDNSZoneGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a private dns zone group in the specified private endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateDNSZoneGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup, options *PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PrivateDNSZoneGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PrivateDNSZoneGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup, options *PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if privateEndpointName == "" { + return nil, errors.New("parameter privateEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) + if privateDNSZoneGroupName == "" { + return nil, errors.New("parameter privateDNSZoneGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateDnsZoneGroupName}", url.PathEscape(privateDNSZoneGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified private dns zone group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - privateDNSZoneGroupName - The name of the private dns zone group. +// - options - PrivateDNSZoneGroupsClientBeginDeleteOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginDelete +// method. +func (client *PrivateDNSZoneGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientBeginDeleteOptions) (*runtime.Poller[PrivateDNSZoneGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateDNSZoneGroupsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateDNSZoneGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified private dns zone group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateDNSZoneGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrivateDNSZoneGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PrivateDNSZoneGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if privateEndpointName == "" { + return nil, errors.New("parameter privateEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) + if privateDNSZoneGroupName == "" { + return nil, errors.New("parameter privateDNSZoneGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateDnsZoneGroupName}", url.PathEscape(privateDNSZoneGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the private dns zone group resource by specified private dns zone group name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - privateDNSZoneGroupName - The name of the private dns zone group. +// - options - PrivateDNSZoneGroupsClientGetOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.Get +// method. +func (client *PrivateDNSZoneGroupsClient) Get(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientGetOptions) (PrivateDNSZoneGroupsClientGetResponse, error) { + var err error + const operationName = "PrivateDNSZoneGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) + if err != nil { + return PrivateDNSZoneGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateDNSZoneGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateDNSZoneGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PrivateDNSZoneGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if privateEndpointName == "" { + return nil, errors.New("parameter privateEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) + if privateDNSZoneGroupName == "" { + return nil, errors.New("parameter privateDNSZoneGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateDnsZoneGroupName}", url.PathEscape(privateDNSZoneGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PrivateDNSZoneGroupsClient) getHandleResponse(resp *http.Response) (PrivateDNSZoneGroupsClientGetResponse, error) { + result := PrivateDNSZoneGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateDNSZoneGroup); err != nil { + return PrivateDNSZoneGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all private dns zone groups in a private endpoint. +// +// Generated from API version 2024-05-01 +// - privateEndpointName - The name of the private endpoint. +// - resourceGroupName - The name of the resource group. +// - options - PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.NewListPager +// method. +func (client *PrivateDNSZoneGroupsClient) NewListPager(privateEndpointName string, resourceGroupName string, options *PrivateDNSZoneGroupsClientListOptions) *runtime.Pager[PrivateDNSZoneGroupsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateDNSZoneGroupsClientListResponse]{ + More: func(page PrivateDNSZoneGroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateDNSZoneGroupsClientListResponse) (PrivateDNSZoneGroupsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateDNSZoneGroupsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, privateEndpointName, resourceGroupName, options) + }, nil) + if err != nil { + return PrivateDNSZoneGroupsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PrivateDNSZoneGroupsClient) listCreateRequest(ctx context.Context, privateEndpointName string, resourceGroupName string, options *PrivateDNSZoneGroupsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups" + if privateEndpointName == "" { + return nil, errors.New("parameter privateEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PrivateDNSZoneGroupsClient) listHandleResponse(resp *http.Response) (PrivateDNSZoneGroupsClientListResponse, error) { + result := PrivateDNSZoneGroupsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateDNSZoneGroupListResult); err != nil { + return PrivateDNSZoneGroupsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/privateendpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/privateendpoints_client.go new file mode 100644 index 00000000..3484c42b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/privateendpoints_client.go @@ -0,0 +1,385 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PrivateEndpointsClient contains the methods for the PrivateEndpoints group. +// Don't use this type directly, use NewPrivateEndpointsClient() instead. +type PrivateEndpointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateEndpointsClient creates a new instance of PrivateEndpointsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateEndpointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates an private endpoint in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - parameters - Parameters supplied to the create or update private endpoint operation. +// - options - PrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.BeginCreateOrUpdate +// method. +func (client *PrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint, options *PrivateEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, privateEndpointName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an private endpoint in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint, options *PrivateEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, privateEndpointName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PrivateEndpointsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint, options *PrivateEndpointsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if privateEndpointName == "" { + return nil, errors.New("parameter privateEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified private endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - options - PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete +// method. +func (client *PrivateEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, privateEndpointName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified private endpoint. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, privateEndpointName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PrivateEndpointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if privateEndpointName == "" { + return nil, errors.New("parameter privateEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified private endpoint by resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - options - PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. +func (client *PrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientGetOptions) (PrivateEndpointsClientGetResponse, error) { + var err error + const operationName = "PrivateEndpointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, privateEndpointName, options) + if err != nil { + return PrivateEndpointsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PrivateEndpointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if privateEndpointName == "" { + return nil, errors.New("parameter privateEndpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointName}", url.PathEscape(privateEndpointName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PrivateEndpointsClient) getHandleResponse(resp *http.Response) (PrivateEndpointsClientGetResponse, error) { + result := PrivateEndpointsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpoint); err != nil { + return PrivateEndpointsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all private endpoints in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.NewListPager +// method. +func (client *PrivateEndpointsClient) NewListPager(resourceGroupName string, options *PrivateEndpointsClientListOptions) *runtime.Pager[PrivateEndpointsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateEndpointsClientListResponse]{ + More: func(page PrivateEndpointsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateEndpointsClientListResponse) (PrivateEndpointsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return PrivateEndpointsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PrivateEndpointsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *PrivateEndpointsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PrivateEndpointsClient) listHandleResponse(resp *http.Response) (PrivateEndpointsClientListResponse, error) { + result := PrivateEndpointsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointListResult); err != nil { + return PrivateEndpointsClientListResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - Gets all private endpoints in a subscription. +// +// Generated from API version 2024-05-01 +// - options - PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.NewListBySubscriptionPager +// method. +func (client *PrivateEndpointsClient) NewListBySubscriptionPager(options *PrivateEndpointsClientListBySubscriptionOptions) *runtime.Pager[PrivateEndpointsClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateEndpointsClientListBySubscriptionResponse]{ + More: func(page PrivateEndpointsClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateEndpointsClientListBySubscriptionResponse) (PrivateEndpointsClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateEndpointsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return PrivateEndpointsClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *PrivateEndpointsClient) listBySubscriptionCreateRequest(ctx context.Context, options *PrivateEndpointsClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *PrivateEndpointsClient) listBySubscriptionHandleResponse(resp *http.Response) (PrivateEndpointsClientListBySubscriptionResponse, error) { + result := PrivateEndpointsClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointListResult); err != nil { + return PrivateEndpointsClientListBySubscriptionResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/privatelinkservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/privatelinkservices_client.go new file mode 100644 index 00000000..fcde434e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/privatelinkservices_client.go @@ -0,0 +1,966 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PrivateLinkServicesClient contains the methods for the PrivateLinkServices group. +// Don't use this type directly, use NewPrivateLinkServicesClient() instead. +type PrivateLinkServicesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateLinkServicesClient creates a new instance of PrivateLinkServicesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateLinkServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkServicesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateLinkServicesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCheckPrivateLinkServiceVisibility - Checks whether the subscription is visible to private link service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - location - The location of the domain name. +// - parameters - The request body of CheckPrivateLinkService API call. +// - options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the +// PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility method. +func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions) (*runtime.Poller[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.checkPrivateLinkServiceVisibility(ctx, location, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CheckPrivateLinkServiceVisibility - Checks whether the subscription is visible to private link service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions) (*http.Response, error) { + var err error + const operationName = "PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkPrivateLinkServiceVisibilityCreateRequest(ctx, location, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// checkPrivateLinkServiceVisibilityCreateRequest creates the CheckPrivateLinkServiceVisibility request. +func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityCreateRequest(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginCheckPrivateLinkServiceVisibilityByResourceGroup - Checks whether the subscription is visible to private link service +// in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - location - The location of the domain name. +// - resourceGroupName - The name of the resource group. +// - parameters - The request body of CheckPrivateLinkService API call. +// - options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions contains the optional parameters +// for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup method. +func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions) (*runtime.Poller[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.checkPrivateLinkServiceVisibilityByResourceGroup(ctx, location, resourceGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CheckPrivateLinkServiceVisibilityByResourceGroup - Checks whether the subscription is visible to private link service in +// the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions) (*http.Response, error) { + var err error + const operationName = "PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkPrivateLinkServiceVisibilityByResourceGroupCreateRequest(ctx, location, resourceGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// checkPrivateLinkServiceVisibilityByResourceGroupCreateRequest creates the CheckPrivateLinkServiceVisibilityByResourceGroup request. +func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityByResourceGroupCreateRequest(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreateOrUpdate - Creates or updates an private link service in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - parameters - Parameters supplied to the create or update private link service operation. +// - options - PrivateLinkServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCreateOrUpdate +// method. +func (client *PrivateLinkServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService, options *PrivateLinkServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateLinkServicesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkServicesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkServicesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates an private link service in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateLinkServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService, options *PrivateLinkServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PrivateLinkServicesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PrivateLinkServicesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService, options *PrivateLinkServicesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified private link service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - options - PrivateLinkServicesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDelete +// method. +func (client *PrivateLinkServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientBeginDeleteOptions) (*runtime.Poller[PrivateLinkServicesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkServicesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkServicesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified private link service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateLinkServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrivateLinkServicesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PrivateLinkServicesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDeletePrivateEndpointConnection - Delete private end point connection for a private link service in a subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - peConnectionName - The name of the private end point connection. +// - options - PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the +// PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection method. +func (client *PrivateLinkServicesClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) (*runtime.Poller[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, serviceName, peConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DeletePrivateEndpointConnection - Delete private end point connection for a private link service in a subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PrivateLinkServicesClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, serviceName, peConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. +func (client *PrivateLinkServicesClient) deletePrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if peConnectionName == "" { + return nil, errors.New("parameter peConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peConnectionName}", url.PathEscape(peConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified private link service by resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - options - PrivateLinkServicesClientGetOptions contains the optional parameters for the PrivateLinkServicesClient.Get method. +func (client *PrivateLinkServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientGetOptions) (PrivateLinkServicesClientGetResponse, error) { + var err error + const operationName = "PrivateLinkServicesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) + if err != nil { + return PrivateLinkServicesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateLinkServicesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkServicesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PrivateLinkServicesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PrivateLinkServicesClient) getHandleResponse(resp *http.Response) (PrivateLinkServicesClientGetResponse, error) { + result := PrivateLinkServicesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkService); err != nil { + return PrivateLinkServicesClientGetResponse{}, err + } + return result, nil +} + +// GetPrivateEndpointConnection - Get the specific private end point connection by specific private link service in the resource +// group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - peConnectionName - The name of the private end point connection. +// - options - PrivateLinkServicesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.GetPrivateEndpointConnection +// method. +func (client *PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientGetPrivateEndpointConnectionOptions) (PrivateLinkServicesClientGetPrivateEndpointConnectionResponse, error) { + var err error + const operationName = "PrivateLinkServicesClient.GetPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, serviceName, peConnectionName, options) + if err != nil { + return PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{}, err + } + resp, err := client.getPrivateEndpointConnectionHandleResponse(httpResp) + return resp, err +} + +// getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. +func (client *PrivateLinkServicesClient) getPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientGetPrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if peConnectionName == "" { + return nil, errors.New("parameter peConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peConnectionName}", url.PathEscape(peConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getPrivateEndpointConnectionHandleResponse handles the GetPrivateEndpointConnection response. +func (client *PrivateLinkServicesClient) getPrivateEndpointConnectionHandleResponse(resp *http.Response) (PrivateLinkServicesClientGetPrivateEndpointConnectionResponse, error) { + result := PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { + return PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all private link services in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPager +// method. +func (client *PrivateLinkServicesClient) NewListPager(resourceGroupName string, options *PrivateLinkServicesClientListOptions) *runtime.Pager[PrivateLinkServicesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListResponse]{ + More: func(page PrivateLinkServicesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListResponse) (PrivateLinkServicesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkServicesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return PrivateLinkServicesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PrivateLinkServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *PrivateLinkServicesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PrivateLinkServicesClient) listHandleResponse(resp *http.Response) (PrivateLinkServicesClientListResponse, error) { + result := PrivateLinkServicesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkServiceListResult); err != nil { + return PrivateLinkServicesClientListResponse{}, err + } + return result, nil +} + +// NewListAutoApprovedPrivateLinkServicesPager - Returns all of the private link service ids that can be linked to a Private +// Endpoint with auto approved in this subscription in this region. +// +// Generated from API version 2024-05-01 +// - location - The location of the domain name. +// - options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the +// PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager method. +func (client *PrivateLinkServicesClient) NewListAutoApprovedPrivateLinkServicesPager(location string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions) *runtime.Pager[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse]{ + More: func(page PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAutoApprovedPrivateLinkServicesCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, err + } + return client.listAutoApprovedPrivateLinkServicesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAutoApprovedPrivateLinkServicesCreateRequest creates the ListAutoApprovedPrivateLinkServices request. +func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesCreateRequest(ctx context.Context, location string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAutoApprovedPrivateLinkServicesHandleResponse handles the ListAutoApprovedPrivateLinkServices response. +func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesHandleResponse(resp *http.Response) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse, error) { + result := PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AutoApprovedPrivateLinkServicesResult); err != nil { + return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, err + } + return result, nil +} + +// NewListAutoApprovedPrivateLinkServicesByResourceGroupPager - Returns all of the private link service ids that can be linked +// to a Private Endpoint with auto approved in this subscription in this region. +// +// Generated from API version 2024-05-01 +// - location - The location of the domain name. +// - resourceGroupName - The name of the resource group. +// - options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters +// for the PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager method. +func (client *PrivateLinkServicesClient) NewListAutoApprovedPrivateLinkServicesByResourceGroupPager(location string, resourceGroupName string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions) *runtime.Pager[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse]{ + More: func(page PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) + }, nil) + if err != nil { + return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, err + } + return client.listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest creates the ListAutoApprovedPrivateLinkServicesByResourceGroup request. +func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest(ctx context.Context, location string, resourceGroupName string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse handles the ListAutoApprovedPrivateLinkServicesByResourceGroup response. +func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse(resp *http.Response) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse, error) { + result := PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AutoApprovedPrivateLinkServicesResult); err != nil { + return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - Gets all private link service in a subscription. +// +// Generated from API version 2024-05-01 +// - options - PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.NewListBySubscriptionPager +// method. +func (client *PrivateLinkServicesClient) NewListBySubscriptionPager(options *PrivateLinkServicesClientListBySubscriptionOptions) *runtime.Pager[PrivateLinkServicesClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListBySubscriptionResponse]{ + More: func(page PrivateLinkServicesClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListBySubscriptionResponse) (PrivateLinkServicesClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkServicesClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return PrivateLinkServicesClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *PrivateLinkServicesClient) listBySubscriptionCreateRequest(ctx context.Context, options *PrivateLinkServicesClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *PrivateLinkServicesClient) listBySubscriptionHandleResponse(resp *http.Response) (PrivateLinkServicesClientListBySubscriptionResponse, error) { + result := PrivateLinkServicesClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkServiceListResult); err != nil { + return PrivateLinkServicesClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// NewListPrivateEndpointConnectionsPager - Gets all private end point connections for a specific private link service. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - options - PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager +// method. +func (client *PrivateLinkServicesClient) NewListPrivateEndpointConnectionsPager(resourceGroupName string, serviceName string, options *PrivateLinkServicesClientListPrivateEndpointConnectionsOptions) *runtime.Pager[PrivateLinkServicesClientListPrivateEndpointConnectionsResponse] { + return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListPrivateEndpointConnectionsResponse]{ + More: func(page PrivateLinkServicesClientListPrivateEndpointConnectionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListPrivateEndpointConnectionsResponse) (PrivateLinkServicesClientListPrivateEndpointConnectionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPrivateEndpointConnectionsCreateRequest(ctx, resourceGroupName, serviceName, options) + }, nil) + if err != nil { + return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, err + } + return client.listPrivateEndpointConnectionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listPrivateEndpointConnectionsCreateRequest creates the ListPrivateEndpointConnections request. +func (client *PrivateLinkServicesClient) listPrivateEndpointConnectionsCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientListPrivateEndpointConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listPrivateEndpointConnectionsHandleResponse handles the ListPrivateEndpointConnections response. +func (client *PrivateLinkServicesClient) listPrivateEndpointConnectionsHandleResponse(resp *http.Response) (PrivateLinkServicesClientListPrivateEndpointConnectionsResponse, error) { + result := PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResult); err != nil { + return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, err + } + return result, nil +} + +// UpdatePrivateEndpointConnection - Approve or reject private end point connection for a private link service in a subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - peConnectionName - The name of the private end point connection. +// - parameters - Parameters supplied to approve or reject the private end point connection. +// - options - PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.UpdatePrivateEndpointConnection +// method. +func (client *PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection, options *PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions) (PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse, error) { + var err error + const operationName = "PrivateLinkServicesClient.UpdatePrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updatePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, serviceName, peConnectionName, parameters, options) + if err != nil { + return PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{}, err + } + resp, err := client.updatePrivateEndpointConnectionHandleResponse(httpResp) + return resp, err +} + +// updatePrivateEndpointConnectionCreateRequest creates the UpdatePrivateEndpointConnection request. +func (client *PrivateLinkServicesClient) updatePrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection, options *PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceName == "" { + return nil, errors.New("parameter serviceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceName}", url.PathEscape(serviceName)) + if peConnectionName == "" { + return nil, errors.New("parameter peConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peConnectionName}", url.PathEscape(peConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updatePrivateEndpointConnectionHandleResponse handles the UpdatePrivateEndpointConnection response. +func (client *PrivateLinkServicesClient) updatePrivateEndpointConnectionHandleResponse(resp *http.Response) (PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse, error) { + result := PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { + return PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/profiles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/profiles_client.go new file mode 100644 index 00000000..734324a3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/profiles_client.go @@ -0,0 +1,437 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProfilesClient contains the methods for the NetworkProfiles group. +// Don't use this type directly, use NewProfilesClient() instead. +type ProfilesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProfilesClient creates a new instance of ProfilesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProfilesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProfilesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a network profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkProfileName - The name of the network profile. +// - parameters - Parameters supplied to the create or update network profile operation. +// - options - ProfilesClientCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.CreateOrUpdate method. +func (client *ProfilesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile, options *ProfilesClientCreateOrUpdateOptions) (ProfilesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProfilesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkProfileName, parameters, options) + if err != nil { + return ProfilesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProfilesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ProfilesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ProfilesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile, options *ProfilesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkProfileName == "" { + return nil, errors.New("parameter networkProfileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkProfileName}", url.PathEscape(networkProfileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ProfilesClient) createOrUpdateHandleResponse(resp *http.Response) (ProfilesClientCreateOrUpdateResponse, error) { + result := ProfilesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { + return ProfilesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes the specified network profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkProfileName - The name of the NetworkProfile. +// - options - ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. +func (client *ProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientBeginDeleteOptions) (*runtime.Poller[ProfilesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkProfileName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProfilesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProfilesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified network profile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ProfilesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ProfilesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkProfileName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ProfilesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkProfileName == "" { + return nil, errors.New("parameter networkProfileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkProfileName}", url.PathEscape(networkProfileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified network profile in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkProfileName - The name of the public IP prefix. +// - options - ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. +func (client *ProfilesClient) Get(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientGetOptions) (ProfilesClientGetResponse, error) { + var err error + const operationName = "ProfilesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkProfileName, options) + if err != nil { + return ProfilesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProfilesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProfilesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProfilesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkProfileName == "" { + return nil, errors.New("parameter networkProfileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkProfileName}", url.PathEscape(networkProfileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProfilesClient) getHandleResponse(resp *http.Response) (ProfilesClientGetResponse, error) { + result := ProfilesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { + return ProfilesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all network profiles in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method. +func (client *ProfilesClient) NewListPager(resourceGroupName string, options *ProfilesClientListOptions) *runtime.Pager[ProfilesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ProfilesClientListResponse]{ + More: func(page ProfilesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProfilesClientListResponse) (ProfilesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProfilesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ProfilesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ProfilesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *ProfilesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ProfilesClient) listHandleResponse(resp *http.Response) (ProfilesClientListResponse, error) { + result := ProfilesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProfileListResult); err != nil { + return ProfilesClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the network profiles in a subscription. +// +// Generated from API version 2024-05-01 +// - options - ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.NewListAllPager method. +func (client *ProfilesClient) NewListAllPager(options *ProfilesClientListAllOptions) *runtime.Pager[ProfilesClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[ProfilesClientListAllResponse]{ + More: func(page ProfilesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProfilesClientListAllResponse) (ProfilesClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProfilesClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return ProfilesClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *ProfilesClient) listAllCreateRequest(ctx context.Context, options *ProfilesClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *ProfilesClient) listAllHandleResponse(resp *http.Response) (ProfilesClientListAllResponse, error) { + result := ProfilesClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProfileListResult); err != nil { + return ProfilesClientListAllResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates network profile tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkProfileName - The name of the network profile. +// - parameters - Parameters supplied to update network profile tags. +// - options - ProfilesClientUpdateTagsOptions contains the optional parameters for the ProfilesClient.UpdateTags method. +func (client *ProfilesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject, options *ProfilesClientUpdateTagsOptions) (ProfilesClientUpdateTagsResponse, error) { + var err error + const operationName = "ProfilesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkProfileName, parameters, options) + if err != nil { + return ProfilesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProfilesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProfilesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *ProfilesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject, options *ProfilesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkProfileName == "" { + return nil, errors.New("parameter networkProfileName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkProfileName}", url.PathEscape(networkProfileName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *ProfilesClient) updateTagsHandleResponse(resp *http.Response) (ProfilesClientUpdateTagsResponse, error) { + result := ProfilesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { + return ProfilesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/publicipaddresses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/publicipaddresses_client.go new file mode 100644 index 00000000..e1ba5dbc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/publicipaddresses_client.go @@ -0,0 +1,1000 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PublicIPAddressesClient contains the methods for the PublicIPAddresses group. +// Don't use this type directly, use NewPublicIPAddressesClient() instead. +type PublicIPAddressesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPublicIPAddressesClient creates a new instance of PublicIPAddressesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPublicIPAddressesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PublicIPAddressesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PublicIPAddressesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a static or dynamic public IP address. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - publicIPAddressName - The name of the public IP address. +// - parameters - Parameters supplied to the create or update public IP address operation. +// - options - PublicIPAddressesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPAddressesClient.BeginCreateOrUpdate +// method. +func (client *PublicIPAddressesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, options *PublicIPAddressesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PublicIPAddressesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PublicIPAddressesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PublicIPAddressesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a static or dynamic public IP address. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PublicIPAddressesClient) createOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, options *PublicIPAddressesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PublicIPAddressesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, publicIPAddressName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PublicIPAddressesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, options *PublicIPAddressesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if publicIPAddressName == "" { + return nil, errors.New("parameter publicIPAddressName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDdosProtectionStatus - Gets the Ddos Protection Status of a Public IP Address +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - publicIPAddressName - The name of the public IP address. +// - options - PublicIPAddressesClientBeginDdosProtectionStatusOptions contains the optional parameters for the PublicIPAddressesClient.BeginDdosProtectionStatus +// method. +func (client *PublicIPAddressesClient) BeginDdosProtectionStatus(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDdosProtectionStatusOptions) (*runtime.Poller[PublicIPAddressesClientDdosProtectionStatusResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.ddosProtectionStatus(ctx, resourceGroupName, publicIPAddressName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PublicIPAddressesClientDdosProtectionStatusResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PublicIPAddressesClientDdosProtectionStatusResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DdosProtectionStatus - Gets the Ddos Protection Status of a Public IP Address +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PublicIPAddressesClient) ddosProtectionStatus(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDdosProtectionStatusOptions) (*http.Response, error) { + var err error + const operationName = "PublicIPAddressesClient.BeginDdosProtectionStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.ddosProtectionStatusCreateRequest(ctx, resourceGroupName, publicIPAddressName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// ddosProtectionStatusCreateRequest creates the DdosProtectionStatus request. +func (client *PublicIPAddressesClient) ddosProtectionStatusCreateRequest(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDdosProtectionStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}/ddosProtectionStatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if publicIPAddressName == "" { + return nil, errors.New("parameter publicIPAddressName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDelete - Deletes the specified public IP address. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - publicIPAddressName - The name of the public IP address. +// - options - PublicIPAddressesClientBeginDeleteOptions contains the optional parameters for the PublicIPAddressesClient.BeginDelete +// method. +func (client *PublicIPAddressesClient) BeginDelete(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDeleteOptions) (*runtime.Poller[PublicIPAddressesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, publicIPAddressName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PublicIPAddressesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PublicIPAddressesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified public IP address. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PublicIPAddressesClient) deleteOperation(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PublicIPAddressesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, publicIPAddressName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PublicIPAddressesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if publicIPAddressName == "" { + return nil, errors.New("parameter publicIPAddressName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified public IP address in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - publicIPAddressName - The name of the public IP address. +// - options - PublicIPAddressesClientGetOptions contains the optional parameters for the PublicIPAddressesClient.Get method. +func (client *PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientGetOptions) (PublicIPAddressesClientGetResponse, error) { + var err error + const operationName = "PublicIPAddressesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, publicIPAddressName, options) + if err != nil { + return PublicIPAddressesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PublicIPAddressesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PublicIPAddressesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PublicIPAddressesClient) getCreateRequest(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if publicIPAddressName == "" { + return nil, errors.New("parameter publicIPAddressName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PublicIPAddressesClient) getHandleResponse(resp *http.Response) (PublicIPAddressesClientGetResponse, error) { + result := PublicIPAddressesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { + return PublicIPAddressesClientGetResponse{}, err + } + return result, nil +} + +// GetCloudServicePublicIPAddress - Get the specified public IP address in a cloud service. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - roleInstanceName - The role instance name. +// - networkInterfaceName - The name of the network interface. +// - ipConfigurationName - The name of the IP configuration. +// - publicIPAddressName - The name of the public IP Address. +// - options - PublicIPAddressesClientGetCloudServicePublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetCloudServicePublicIPAddress +// method. +func (client *PublicIPAddressesClient) GetCloudServicePublicIPAddress(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, publicIPAddressName string, options *PublicIPAddressesClientGetCloudServicePublicIPAddressOptions) (PublicIPAddressesClientGetCloudServicePublicIPAddressResponse, error) { + var err error + const operationName = "PublicIPAddressesClient.GetCloudServicePublicIPAddress" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCloudServicePublicIPAddressCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, ipConfigurationName, publicIPAddressName, options) + if err != nil { + return PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{}, err + } + resp, err := client.getCloudServicePublicIPAddressHandleResponse(httpResp) + return resp, err +} + +// getCloudServicePublicIPAddressCreateRequest creates the GetCloudServicePublicIPAddress request. +func (client *PublicIPAddressesClient) getCloudServicePublicIPAddressCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, publicIPAddressName string, options *PublicIPAddressesClientGetCloudServicePublicIPAddressOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cloudServiceName == "" { + return nil, errors.New("parameter cloudServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) + if roleInstanceName == "" { + return nil, errors.New("parameter roleInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if ipConfigurationName == "" { + return nil, errors.New("parameter ipConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) + if publicIPAddressName == "" { + return nil, errors.New("parameter publicIPAddressName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getCloudServicePublicIPAddressHandleResponse handles the GetCloudServicePublicIPAddress response. +func (client *PublicIPAddressesClient) getCloudServicePublicIPAddressHandleResponse(resp *http.Response) (PublicIPAddressesClientGetCloudServicePublicIPAddressResponse, error) { + result := PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { + return PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{}, err + } + return result, nil +} + +// GetVirtualMachineScaleSetPublicIPAddress - Get the specified public IP address in a virtual machine scale set. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2018-10-01 +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - networkInterfaceName - The name of the network interface. +// - ipConfigurationName - The name of the IP configuration. +// - publicIPAddressName - The name of the public IP Address. +// - options - PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions contains the optional parameters for the +// PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress method. +func (client *PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, publicIPAddressName string, options *PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions) (PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse, error) { + var err error + const operationName = "PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVirtualMachineScaleSetPublicIPAddressCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIPAddressName, options) + if err != nil { + return PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{}, err + } + resp, err := client.getVirtualMachineScaleSetPublicIPAddressHandleResponse(httpResp) + return resp, err +} + +// getVirtualMachineScaleSetPublicIPAddressCreateRequest creates the GetVirtualMachineScaleSetPublicIPAddress request. +func (client *PublicIPAddressesClient) getVirtualMachineScaleSetPublicIPAddressCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, publicIPAddressName string, options *PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualMachineScaleSetName == "" { + return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) + if virtualmachineIndex == "" { + return nil, errors.New("parameter virtualmachineIndex cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if ipConfigurationName == "" { + return nil, errors.New("parameter ipConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) + if publicIPAddressName == "" { + return nil, errors.New("parameter publicIPAddressName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2018-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVirtualMachineScaleSetPublicIPAddressHandleResponse handles the GetVirtualMachineScaleSetPublicIPAddress response. +func (client *PublicIPAddressesClient) getVirtualMachineScaleSetPublicIPAddressHandleResponse(resp *http.Response) (PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse, error) { + result := PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { + return PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all public IP addresses in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.NewListPager +// method. +func (client *PublicIPAddressesClient) NewListPager(resourceGroupName string, options *PublicIPAddressesClientListOptions) *runtime.Pager[PublicIPAddressesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListResponse]{ + More: func(page PublicIPAddressesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListResponse) (PublicIPAddressesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return PublicIPAddressesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PublicIPAddressesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *PublicIPAddressesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PublicIPAddressesClient) listHandleResponse(resp *http.Response) (PublicIPAddressesClientListResponse, error) { + result := PublicIPAddressesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { + return PublicIPAddressesClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the public IP addresses in a subscription. +// +// Generated from API version 2024-05-01 +// - options - PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.NewListAllPager +// method. +func (client *PublicIPAddressesClient) NewListAllPager(options *PublicIPAddressesClientListAllOptions) *runtime.Pager[PublicIPAddressesClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListAllResponse]{ + More: func(page PublicIPAddressesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListAllResponse) (PublicIPAddressesClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return PublicIPAddressesClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *PublicIPAddressesClient) listAllCreateRequest(ctx context.Context, options *PublicIPAddressesClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *PublicIPAddressesClient) listAllHandleResponse(resp *http.Response) (PublicIPAddressesClientListAllResponse, error) { + result := PublicIPAddressesClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { + return PublicIPAddressesClientListAllResponse{}, err + } + return result, nil +} + +// NewListCloudServicePublicIPAddressesPager - Gets information about all public IP addresses on a cloud service level. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - options - PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager +// method. +func (client *PublicIPAddressesClient) NewListCloudServicePublicIPAddressesPager(resourceGroupName string, cloudServiceName string, options *PublicIPAddressesClientListCloudServicePublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListCloudServicePublicIPAddressesResponse] { + return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListCloudServicePublicIPAddressesResponse]{ + More: func(page PublicIPAddressesClientListCloudServicePublicIPAddressesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListCloudServicePublicIPAddressesResponse) (PublicIPAddressesClientListCloudServicePublicIPAddressesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCloudServicePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) + }, nil) + if err != nil { + return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, err + } + return client.listCloudServicePublicIPAddressesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCloudServicePublicIPAddressesCreateRequest creates the ListCloudServicePublicIPAddresses request. +func (client *PublicIPAddressesClient) listCloudServicePublicIPAddressesCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *PublicIPAddressesClientListCloudServicePublicIPAddressesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cloudServiceName == "" { + return nil, errors.New("parameter cloudServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCloudServicePublicIPAddressesHandleResponse handles the ListCloudServicePublicIPAddresses response. +func (client *PublicIPAddressesClient) listCloudServicePublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListCloudServicePublicIPAddressesResponse, error) { + result := PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { + return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, err + } + return result, nil +} + +// NewListCloudServiceRoleInstancePublicIPAddressesPager - Gets information about all public IP addresses in a role instance +// IP configuration in a cloud service. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - roleInstanceName - The name of role instance. +// - networkInterfaceName - The network interface name. +// - ipConfigurationName - The IP configuration name. +// - options - PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters +// for the PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager method. +func (client *PublicIPAddressesClient) NewListCloudServiceRoleInstancePublicIPAddressesPager(resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse] { + return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse]{ + More: func(page PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse) (PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCloudServiceRoleInstancePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, ipConfigurationName, options) + }, nil) + if err != nil { + return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, err + } + return client.listCloudServiceRoleInstancePublicIPAddressesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCloudServiceRoleInstancePublicIPAddressesCreateRequest creates the ListCloudServiceRoleInstancePublicIPAddresses request. +func (client *PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddressesCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cloudServiceName == "" { + return nil, errors.New("parameter cloudServiceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName)) + if roleInstanceName == "" { + return nil, errors.New("parameter roleInstanceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if ipConfigurationName == "" { + return nil, errors.New("parameter ipConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listCloudServiceRoleInstancePublicIPAddressesHandleResponse handles the ListCloudServiceRoleInstancePublicIPAddresses response. +func (client *PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse, error) { + result := PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { + return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, err + } + return result, nil +} + +// NewListVirtualMachineScaleSetPublicIPAddressesPager - Gets information about all public IP addresses on a virtual machine +// scale set level. +// +// Generated from API version 2018-10-01 +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - options - PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for +// the PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager method. +func (client *PublicIPAddressesClient) NewListVirtualMachineScaleSetPublicIPAddressesPager(resourceGroupName string, virtualMachineScaleSetName string, options *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse] { + return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse]{ + More: func(page PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse) (PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachineScaleSetPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) + }, nil) + if err != nil { + return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, err + } + return client.listVirtualMachineScaleSetPublicIPAddressesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listVirtualMachineScaleSetPublicIPAddressesCreateRequest creates the ListVirtualMachineScaleSetPublicIPAddresses request. +func (client *PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddressesCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, options *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualMachineScaleSetName == "" { + return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2018-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVirtualMachineScaleSetPublicIPAddressesHandleResponse handles the ListVirtualMachineScaleSetPublicIPAddresses response. +func (client *PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse, error) { + result := PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { + return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, err + } + return result, nil +} + +// NewListVirtualMachineScaleSetVMPublicIPAddressesPager - Gets information about all public IP addresses in a virtual machine +// IP configuration in a virtual machine scale set. +// +// Generated from API version 2018-10-01 +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - networkInterfaceName - The network interface name. +// - ipConfigurationName - The IP configuration name. +// - options - PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters +// for the PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager method. +func (client *PublicIPAddressesClient) NewListVirtualMachineScaleSetVMPublicIPAddressesPager(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse] { + return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse]{ + More: func(page PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse) (PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, options) + }, nil) + if err != nil { + return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, err + } + return client.listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest creates the ListVirtualMachineScaleSetVMPublicIPAddresses request. +func (client *PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualMachineScaleSetName == "" { + return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName)) + if virtualmachineIndex == "" { + return nil, errors.New("parameter virtualmachineIndex cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualmachineIndex}", url.PathEscape(virtualmachineIndex)) + if networkInterfaceName == "" { + return nil, errors.New("parameter networkInterfaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkInterfaceName}", url.PathEscape(networkInterfaceName)) + if ipConfigurationName == "" { + return nil, errors.New("parameter ipConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipConfigurationName}", url.PathEscape(ipConfigurationName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2018-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse handles the ListVirtualMachineScaleSetVMPublicIPAddresses response. +func (client *PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse, error) { + result := PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { + return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates public IP address tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - publicIPAddressName - The name of the public IP address. +// - parameters - Parameters supplied to update public IP address tags. +// - options - PublicIPAddressesClientUpdateTagsOptions contains the optional parameters for the PublicIPAddressesClient.UpdateTags +// method. +func (client *PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject, options *PublicIPAddressesClientUpdateTagsOptions) (PublicIPAddressesClientUpdateTagsResponse, error) { + var err error + const operationName = "PublicIPAddressesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, publicIPAddressName, parameters, options) + if err != nil { + return PublicIPAddressesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PublicIPAddressesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PublicIPAddressesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *PublicIPAddressesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject, options *PublicIPAddressesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if publicIPAddressName == "" { + return nil, errors.New("parameter publicIPAddressName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpAddressName}", url.PathEscape(publicIPAddressName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *PublicIPAddressesClient) updateTagsHandleResponse(resp *http.Response) (PublicIPAddressesClientUpdateTagsResponse, error) { + result := PublicIPAddressesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { + return PublicIPAddressesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/publicipprefixes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/publicipprefixes_client.go new file mode 100644 index 00000000..14115bb1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/publicipprefixes_client.go @@ -0,0 +1,454 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PublicIPPrefixesClient contains the methods for the PublicIPPrefixes group. +// Don't use this type directly, use NewPublicIPPrefixesClient() instead. +type PublicIPPrefixesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPublicIPPrefixesClient creates a new instance of PublicIPPrefixesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPublicIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PublicIPPrefixesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PublicIPPrefixesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a static or dynamic public IP prefix. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - publicIPPrefixName - The name of the public IP prefix. +// - parameters - Parameters supplied to the create or update public IP prefix operation. +// - options - PublicIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPPrefixesClient.BeginCreateOrUpdate +// method. +func (client *PublicIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix, options *PublicIPPrefixesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PublicIPPrefixesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, publicIPPrefixName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PublicIPPrefixesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PublicIPPrefixesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a static or dynamic public IP prefix. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PublicIPPrefixesClient) createOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix, options *PublicIPPrefixesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PublicIPPrefixesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, publicIPPrefixName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *PublicIPPrefixesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix, options *PublicIPPrefixesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if publicIPPrefixName == "" { + return nil, errors.New("parameter publicIPPrefixName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpPrefixName}", url.PathEscape(publicIPPrefixName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified public IP prefix. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - publicIPPrefixName - The name of the PublicIpPrefix. +// - options - PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete +// method. +func (client *PublicIPPrefixesClient) BeginDelete(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientBeginDeleteOptions) (*runtime.Poller[PublicIPPrefixesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, publicIPPrefixName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PublicIPPrefixesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PublicIPPrefixesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified public IP prefix. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *PublicIPPrefixesClient) deleteOperation(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PublicIPPrefixesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, publicIPPrefixName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PublicIPPrefixesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if publicIPPrefixName == "" { + return nil, errors.New("parameter publicIPPrefixName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpPrefixName}", url.PathEscape(publicIPPrefixName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified public IP prefix in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - publicIPPrefixName - The name of the public IP prefix. +// - options - PublicIPPrefixesClientGetOptions contains the optional parameters for the PublicIPPrefixesClient.Get method. +func (client *PublicIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientGetOptions) (PublicIPPrefixesClientGetResponse, error) { + var err error + const operationName = "PublicIPPrefixesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, publicIPPrefixName, options) + if err != nil { + return PublicIPPrefixesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PublicIPPrefixesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PublicIPPrefixesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PublicIPPrefixesClient) getCreateRequest(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if publicIPPrefixName == "" { + return nil, errors.New("parameter publicIPPrefixName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpPrefixName}", url.PathEscape(publicIPPrefixName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PublicIPPrefixesClient) getHandleResponse(resp *http.Response) (PublicIPPrefixesClientGetResponse, error) { + result := PublicIPPrefixesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefix); err != nil { + return PublicIPPrefixesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all public IP prefixes in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.NewListPager +// method. +func (client *PublicIPPrefixesClient) NewListPager(resourceGroupName string, options *PublicIPPrefixesClientListOptions) *runtime.Pager[PublicIPPrefixesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[PublicIPPrefixesClientListResponse]{ + More: func(page PublicIPPrefixesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PublicIPPrefixesClientListResponse) (PublicIPPrefixesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPPrefixesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return PublicIPPrefixesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *PublicIPPrefixesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *PublicIPPrefixesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *PublicIPPrefixesClient) listHandleResponse(resp *http.Response) (PublicIPPrefixesClientListResponse, error) { + result := PublicIPPrefixesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefixListResult); err != nil { + return PublicIPPrefixesClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the public IP prefixes in a subscription. +// +// Generated from API version 2024-05-01 +// - options - PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.NewListAllPager +// method. +func (client *PublicIPPrefixesClient) NewListAllPager(options *PublicIPPrefixesClientListAllOptions) *runtime.Pager[PublicIPPrefixesClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[PublicIPPrefixesClientListAllResponse]{ + More: func(page PublicIPPrefixesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *PublicIPPrefixesClientListAllResponse) (PublicIPPrefixesClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PublicIPPrefixesClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return PublicIPPrefixesClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *PublicIPPrefixesClient) listAllCreateRequest(ctx context.Context, options *PublicIPPrefixesClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *PublicIPPrefixesClient) listAllHandleResponse(resp *http.Response) (PublicIPPrefixesClientListAllResponse, error) { + result := PublicIPPrefixesClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefixListResult); err != nil { + return PublicIPPrefixesClientListAllResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates public IP prefix tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - publicIPPrefixName - The name of the public IP prefix. +// - parameters - Parameters supplied to update public IP prefix tags. +// - options - PublicIPPrefixesClientUpdateTagsOptions contains the optional parameters for the PublicIPPrefixesClient.UpdateTags +// method. +func (client *PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject, options *PublicIPPrefixesClientUpdateTagsOptions) (PublicIPPrefixesClientUpdateTagsResponse, error) { + var err error + const operationName = "PublicIPPrefixesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, publicIPPrefixName, parameters, options) + if err != nil { + return PublicIPPrefixesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PublicIPPrefixesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PublicIPPrefixesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *PublicIPPrefixesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject, options *PublicIPPrefixesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if publicIPPrefixName == "" { + return nil, errors.New("parameter publicIPPrefixName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{publicIpPrefixName}", url.PathEscape(publicIPPrefixName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *PublicIPPrefixesClient) updateTagsHandleResponse(resp *http.Response) (PublicIPPrefixesClientUpdateTagsResponse, error) { + result := PublicIPPrefixesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefix); err != nil { + return PublicIPPrefixesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/reachabilityanalysisintents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/reachabilityanalysisintents_client.go new file mode 100644 index 00000000..1bce960b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/reachabilityanalysisintents_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ReachabilityAnalysisIntentsClient contains the methods for the ReachabilityAnalysisIntents group. +// Don't use this type directly, use NewReachabilityAnalysisIntentsClient() instead. +type ReachabilityAnalysisIntentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReachabilityAnalysisIntentsClient creates a new instance of ReachabilityAnalysisIntentsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReachabilityAnalysisIntentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReachabilityAnalysisIntentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReachabilityAnalysisIntentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Create - Creates Reachability Analysis Intent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - reachabilityAnalysisIntentName - Reachability Analysis Intent name. +// - body - Reachability Analysis Intent object to create/update. +// - options - ReachabilityAnalysisIntentsClientCreateOptions contains the optional parameters for the ReachabilityAnalysisIntentsClient.Create +// method. +func (client *ReachabilityAnalysisIntentsClient) Create(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisIntentName string, body ReachabilityAnalysisIntent, options *ReachabilityAnalysisIntentsClientCreateOptions) (ReachabilityAnalysisIntentsClientCreateResponse, error) { + var err error + const operationName = "ReachabilityAnalysisIntentsClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, reachabilityAnalysisIntentName, body, options) + if err != nil { + return ReachabilityAnalysisIntentsClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReachabilityAnalysisIntentsClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ReachabilityAnalysisIntentsClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *ReachabilityAnalysisIntentsClient) createCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisIntentName string, body ReachabilityAnalysisIntent, options *ReachabilityAnalysisIntentsClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if reachabilityAnalysisIntentName == "" { + return nil, errors.New("parameter reachabilityAnalysisIntentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{reachabilityAnalysisIntentName}", url.PathEscape(reachabilityAnalysisIntentName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *ReachabilityAnalysisIntentsClient) createHandleResponse(resp *http.Response) (ReachabilityAnalysisIntentsClientCreateResponse, error) { + result := ReachabilityAnalysisIntentsClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReachabilityAnalysisIntent); err != nil { + return ReachabilityAnalysisIntentsClientCreateResponse{}, err + } + return result, nil +} + +// Delete - Deletes Reachability Analysis Intent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - reachabilityAnalysisIntentName - Reachability Analysis Intent name. +// - options - ReachabilityAnalysisIntentsClientDeleteOptions contains the optional parameters for the ReachabilityAnalysisIntentsClient.Delete +// method. +func (client *ReachabilityAnalysisIntentsClient) Delete(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisIntentName string, options *ReachabilityAnalysisIntentsClientDeleteOptions) (ReachabilityAnalysisIntentsClientDeleteResponse, error) { + var err error + const operationName = "ReachabilityAnalysisIntentsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, reachabilityAnalysisIntentName, options) + if err != nil { + return ReachabilityAnalysisIntentsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReachabilityAnalysisIntentsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ReachabilityAnalysisIntentsClientDeleteResponse{}, err + } + return ReachabilityAnalysisIntentsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReachabilityAnalysisIntentsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisIntentName string, options *ReachabilityAnalysisIntentsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if reachabilityAnalysisIntentName == "" { + return nil, errors.New("parameter reachabilityAnalysisIntentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{reachabilityAnalysisIntentName}", url.PathEscape(reachabilityAnalysisIntentName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the Reachability Analysis Intent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - reachabilityAnalysisIntentName - Reachability Analysis Intent name. +// - options - ReachabilityAnalysisIntentsClientGetOptions contains the optional parameters for the ReachabilityAnalysisIntentsClient.Get +// method. +func (client *ReachabilityAnalysisIntentsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisIntentName string, options *ReachabilityAnalysisIntentsClientGetOptions) (ReachabilityAnalysisIntentsClientGetResponse, error) { + var err error + const operationName = "ReachabilityAnalysisIntentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, reachabilityAnalysisIntentName, options) + if err != nil { + return ReachabilityAnalysisIntentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReachabilityAnalysisIntentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReachabilityAnalysisIntentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReachabilityAnalysisIntentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisIntentName string, options *ReachabilityAnalysisIntentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents/{reachabilityAnalysisIntentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if reachabilityAnalysisIntentName == "" { + return nil, errors.New("parameter reachabilityAnalysisIntentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{reachabilityAnalysisIntentName}", url.PathEscape(reachabilityAnalysisIntentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReachabilityAnalysisIntentsClient) getHandleResponse(resp *http.Response) (ReachabilityAnalysisIntentsClientGetResponse, error) { + result := ReachabilityAnalysisIntentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReachabilityAnalysisIntent); err != nil { + return ReachabilityAnalysisIntentsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets list of Reachability Analysis Intents . +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - options - ReachabilityAnalysisIntentsClientListOptions contains the optional parameters for the ReachabilityAnalysisIntentsClient.NewListPager +// method. +func (client *ReachabilityAnalysisIntentsClient) NewListPager(resourceGroupName string, networkManagerName string, workspaceName string, options *ReachabilityAnalysisIntentsClientListOptions) *runtime.Pager[ReachabilityAnalysisIntentsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReachabilityAnalysisIntentsClientListResponse]{ + More: func(page ReachabilityAnalysisIntentsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReachabilityAnalysisIntentsClientListResponse) (ReachabilityAnalysisIntentsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReachabilityAnalysisIntentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, options) + }, nil) + if err != nil { + return ReachabilityAnalysisIntentsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReachabilityAnalysisIntentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, options *ReachabilityAnalysisIntentsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisIntents" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Skip != nil { + reqQP.Set("skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + if options != nil && options.SortKey != nil { + reqQP.Set("sortKey", *options.SortKey) + } + if options != nil && options.SortValue != nil { + reqQP.Set("sortValue", *options.SortValue) + } + if options != nil && options.Top != nil { + reqQP.Set("top", strconv.FormatInt(int64(*options.Top), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReachabilityAnalysisIntentsClient) listHandleResponse(resp *http.Response) (ReachabilityAnalysisIntentsClientListResponse, error) { + result := ReachabilityAnalysisIntentsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReachabilityAnalysisIntentListResult); err != nil { + return ReachabilityAnalysisIntentsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/reachabilityanalysisruns_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/reachabilityanalysisruns_client.go new file mode 100644 index 00000000..cb4cc839 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/reachabilityanalysisruns_client.go @@ -0,0 +1,372 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ReachabilityAnalysisRunsClient contains the methods for the ReachabilityAnalysisRuns group. +// Don't use this type directly, use NewReachabilityAnalysisRunsClient() instead. +type ReachabilityAnalysisRunsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReachabilityAnalysisRunsClient creates a new instance of ReachabilityAnalysisRunsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReachabilityAnalysisRunsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReachabilityAnalysisRunsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReachabilityAnalysisRunsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Create - Creates Reachability Analysis Runs. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - reachabilityAnalysisRunName - Reachability Analysis Run name. +// - body - Analysis Run resource object to create/update. +// - options - ReachabilityAnalysisRunsClientCreateOptions contains the optional parameters for the ReachabilityAnalysisRunsClient.Create +// method. +func (client *ReachabilityAnalysisRunsClient) Create(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisRunName string, body ReachabilityAnalysisRun, options *ReachabilityAnalysisRunsClientCreateOptions) (ReachabilityAnalysisRunsClientCreateResponse, error) { + var err error + const operationName = "ReachabilityAnalysisRunsClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, reachabilityAnalysisRunName, body, options) + if err != nil { + return ReachabilityAnalysisRunsClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReachabilityAnalysisRunsClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ReachabilityAnalysisRunsClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *ReachabilityAnalysisRunsClient) createCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisRunName string, body ReachabilityAnalysisRun, options *ReachabilityAnalysisRunsClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if reachabilityAnalysisRunName == "" { + return nil, errors.New("parameter reachabilityAnalysisRunName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{reachabilityAnalysisRunName}", url.PathEscape(reachabilityAnalysisRunName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *ReachabilityAnalysisRunsClient) createHandleResponse(resp *http.Response) (ReachabilityAnalysisRunsClientCreateResponse, error) { + result := ReachabilityAnalysisRunsClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReachabilityAnalysisRun); err != nil { + return ReachabilityAnalysisRunsClientCreateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes Reachability Analysis Run. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - reachabilityAnalysisRunName - Reachability Analysis Run name. +// - options - ReachabilityAnalysisRunsClientBeginDeleteOptions contains the optional parameters for the ReachabilityAnalysisRunsClient.BeginDelete +// method. +func (client *ReachabilityAnalysisRunsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisRunName string, options *ReachabilityAnalysisRunsClientBeginDeleteOptions) (*runtime.Poller[ReachabilityAnalysisRunsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, workspaceName, reachabilityAnalysisRunName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReachabilityAnalysisRunsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReachabilityAnalysisRunsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes Reachability Analysis Run. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ReachabilityAnalysisRunsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisRunName string, options *ReachabilityAnalysisRunsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReachabilityAnalysisRunsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, reachabilityAnalysisRunName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReachabilityAnalysisRunsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisRunName string, options *ReachabilityAnalysisRunsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if reachabilityAnalysisRunName == "" { + return nil, errors.New("parameter reachabilityAnalysisRunName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{reachabilityAnalysisRunName}", url.PathEscape(reachabilityAnalysisRunName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets Reachability Analysis Run. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - reachabilityAnalysisRunName - Reachability Analysis Run name. +// - options - ReachabilityAnalysisRunsClientGetOptions contains the optional parameters for the ReachabilityAnalysisRunsClient.Get +// method. +func (client *ReachabilityAnalysisRunsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisRunName string, options *ReachabilityAnalysisRunsClientGetOptions) (ReachabilityAnalysisRunsClientGetResponse, error) { + var err error + const operationName = "ReachabilityAnalysisRunsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, reachabilityAnalysisRunName, options) + if err != nil { + return ReachabilityAnalysisRunsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReachabilityAnalysisRunsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReachabilityAnalysisRunsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReachabilityAnalysisRunsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, reachabilityAnalysisRunName string, options *ReachabilityAnalysisRunsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns/{reachabilityAnalysisRunName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if reachabilityAnalysisRunName == "" { + return nil, errors.New("parameter reachabilityAnalysisRunName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{reachabilityAnalysisRunName}", url.PathEscape(reachabilityAnalysisRunName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReachabilityAnalysisRunsClient) getHandleResponse(resp *http.Response) (ReachabilityAnalysisRunsClientGetResponse, error) { + result := ReachabilityAnalysisRunsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReachabilityAnalysisRun); err != nil { + return ReachabilityAnalysisRunsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets list of Reachability Analysis Runs. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - options - ReachabilityAnalysisRunsClientListOptions contains the optional parameters for the ReachabilityAnalysisRunsClient.NewListPager +// method. +func (client *ReachabilityAnalysisRunsClient) NewListPager(resourceGroupName string, networkManagerName string, workspaceName string, options *ReachabilityAnalysisRunsClientListOptions) *runtime.Pager[ReachabilityAnalysisRunsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReachabilityAnalysisRunsClientListResponse]{ + More: func(page ReachabilityAnalysisRunsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReachabilityAnalysisRunsClientListResponse) (ReachabilityAnalysisRunsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReachabilityAnalysisRunsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, options) + }, nil) + if err != nil { + return ReachabilityAnalysisRunsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReachabilityAnalysisRunsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, options *ReachabilityAnalysisRunsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}/reachabilityAnalysisRuns" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Skip != nil { + reqQP.Set("skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + if options != nil && options.SortKey != nil { + reqQP.Set("sortKey", *options.SortKey) + } + if options != nil && options.SortValue != nil { + reqQP.Set("sortValue", *options.SortValue) + } + if options != nil && options.Top != nil { + reqQP.Set("top", strconv.FormatInt(int64(*options.Top), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReachabilityAnalysisRunsClient) listHandleResponse(resp *http.Response) (ReachabilityAnalysisRunsClientListResponse, error) { + result := ReachabilityAnalysisRunsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReachabilityAnalysisRunListResult); err != nil { + return ReachabilityAnalysisRunsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/resourcenavigationlinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/resourcenavigationlinks_client.go new file mode 100644 index 00000000..5ffadc70 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/resourcenavigationlinks_client.go @@ -0,0 +1,115 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ResourceNavigationLinksClient contains the methods for the ResourceNavigationLinks group. +// Don't use this type directly, use NewResourceNavigationLinksClient() instead. +type ResourceNavigationLinksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewResourceNavigationLinksClient creates a new instance of ResourceNavigationLinksClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewResourceNavigationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceNavigationLinksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ResourceNavigationLinksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// List - Gets a list of resource navigation links for a subnet. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - options - ResourceNavigationLinksClientListOptions contains the optional parameters for the ResourceNavigationLinksClient.List +// method. +func (client *ResourceNavigationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *ResourceNavigationLinksClientListOptions) (ResourceNavigationLinksClientListResponse, error) { + var err error + const operationName = "ResourceNavigationLinksClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) + if err != nil { + return ResourceNavigationLinksClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceNavigationLinksClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceNavigationLinksClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *ResourceNavigationLinksClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *ResourceNavigationLinksClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if subnetName == "" { + return nil, errors.New("parameter subnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ResourceNavigationLinksClient) listHandleResponse(resp *http.Response) (ResourceNavigationLinksClientListResponse, error) { + result := ResourceNavigationLinksClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceNavigationLinksListResult); err != nil { + return ResourceNavigationLinksClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/responses.go new file mode 100644 index 00000000..2ff4a923 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/responses.go @@ -0,0 +1,4139 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import "encoding/json" + +// AdminRuleCollectionsClientCreateOrUpdateResponse contains the response from method AdminRuleCollectionsClient.CreateOrUpdate. +type AdminRuleCollectionsClientCreateOrUpdateResponse struct { + // Defines the admin rule collection. + AdminRuleCollection +} + +// AdminRuleCollectionsClientDeleteResponse contains the response from method AdminRuleCollectionsClient.BeginDelete. +type AdminRuleCollectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// AdminRuleCollectionsClientGetResponse contains the response from method AdminRuleCollectionsClient.Get. +type AdminRuleCollectionsClientGetResponse struct { + // Defines the admin rule collection. + AdminRuleCollection +} + +// AdminRuleCollectionsClientListResponse contains the response from method AdminRuleCollectionsClient.NewListPager. +type AdminRuleCollectionsClientListResponse struct { + // Security admin configuration rule collection list result. + AdminRuleCollectionListResult +} + +// AdminRulesClientCreateOrUpdateResponse contains the response from method AdminRulesClient.CreateOrUpdate. +type AdminRulesClientCreateOrUpdateResponse struct { + // Network base admin rule. + BaseAdminRuleClassification +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRulesClientCreateOrUpdateResponse. +func (a *AdminRulesClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalBaseAdminRuleClassification(data) + if err != nil { + return err + } + a.BaseAdminRuleClassification = res + return nil +} + +// AdminRulesClientDeleteResponse contains the response from method AdminRulesClient.BeginDelete. +type AdminRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// AdminRulesClientGetResponse contains the response from method AdminRulesClient.Get. +type AdminRulesClientGetResponse struct { + // Network base admin rule. + BaseAdminRuleClassification +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AdminRulesClientGetResponse. +func (a *AdminRulesClientGetResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalBaseAdminRuleClassification(data) + if err != nil { + return err + } + a.BaseAdminRuleClassification = res + return nil +} + +// AdminRulesClientListResponse contains the response from method AdminRulesClient.NewListPager. +type AdminRulesClientListResponse struct { + // security configuration admin rule list result. + AdminRuleListResult +} + +// ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete. +type ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// ApplicationGatewayPrivateEndpointConnectionsClientGetResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Get. +type ApplicationGatewayPrivateEndpointConnectionsClientGetResponse struct { + // Private Endpoint connection on an application gateway. + ApplicationGatewayPrivateEndpointConnection +} + +// ApplicationGatewayPrivateEndpointConnectionsClientListResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager. +type ApplicationGatewayPrivateEndpointConnectionsClientListResponse struct { + // Response for ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections for + // an application gateway. + ApplicationGatewayPrivateEndpointConnectionListResult +} + +// ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate. +type ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse struct { + // Private Endpoint connection on an application gateway. + ApplicationGatewayPrivateEndpointConnection +} + +// ApplicationGatewayPrivateLinkResourcesClientListResponse contains the response from method ApplicationGatewayPrivateLinkResourcesClient.NewListPager. +type ApplicationGatewayPrivateLinkResourcesClientListResponse struct { + // Response for ListApplicationGatewayPrivateLinkResources API service call. Gets all private link resources for an application + // gateway. + ApplicationGatewayPrivateLinkResourceListResult +} + +// ApplicationGatewayWafDynamicManifestsClientGetResponse contains the response from method ApplicationGatewayWafDynamicManifestsClient.NewGetPager. +type ApplicationGatewayWafDynamicManifestsClientGetResponse struct { + // Response for ApplicationGatewayWafDynamicManifests API service call. + ApplicationGatewayWafDynamicManifestResultList +} + +// ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse contains the response from method ApplicationGatewayWafDynamicManifestsDefaultClient.Get. +type ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse struct { + // Response for ApplicationGatewayWafDynamicManifest API service call. + ApplicationGatewayWafDynamicManifestResult +} + +// ApplicationGatewaysClientBackendHealthOnDemandResponse contains the response from method ApplicationGatewaysClient.BeginBackendHealthOnDemand. +type ApplicationGatewaysClientBackendHealthOnDemandResponse struct { + // Result of on demand test probe. + ApplicationGatewayBackendHealthOnDemand +} + +// ApplicationGatewaysClientBackendHealthResponse contains the response from method ApplicationGatewaysClient.BeginBackendHealth. +type ApplicationGatewaysClientBackendHealthResponse struct { + // Response for ApplicationGatewayBackendHealth API service call. + ApplicationGatewayBackendHealth +} + +// ApplicationGatewaysClientCreateOrUpdateResponse contains the response from method ApplicationGatewaysClient.BeginCreateOrUpdate. +type ApplicationGatewaysClientCreateOrUpdateResponse struct { + // Application gateway resource. + ApplicationGateway +} + +// ApplicationGatewaysClientDeleteResponse contains the response from method ApplicationGatewaysClient.BeginDelete. +type ApplicationGatewaysClientDeleteResponse struct { + // placeholder for future response values +} + +// ApplicationGatewaysClientGetResponse contains the response from method ApplicationGatewaysClient.Get. +type ApplicationGatewaysClientGetResponse struct { + // Application gateway resource. + ApplicationGateway +} + +// ApplicationGatewaysClientGetSSLPredefinedPolicyResponse contains the response from method ApplicationGatewaysClient.GetSSLPredefinedPolicy. +type ApplicationGatewaysClientGetSSLPredefinedPolicyResponse struct { + // An Ssl predefined policy. + ApplicationGatewaySSLPredefinedPolicy +} + +// ApplicationGatewaysClientListAllResponse contains the response from method ApplicationGatewaysClient.NewListAllPager. +type ApplicationGatewaysClientListAllResponse struct { + // Response for ListApplicationGateways API service call. + ApplicationGatewayListResult +} + +// ApplicationGatewaysClientListAvailableRequestHeadersResponse contains the response from method ApplicationGatewaysClient.ListAvailableRequestHeaders. +type ApplicationGatewaysClientListAvailableRequestHeadersResponse struct { + // Response for ApplicationGatewayAvailableRequestHeaders API service call. + StringArray []*string +} + +// ApplicationGatewaysClientListAvailableResponseHeadersResponse contains the response from method ApplicationGatewaysClient.ListAvailableResponseHeaders. +type ApplicationGatewaysClientListAvailableResponseHeadersResponse struct { + // Response for ApplicationGatewayAvailableResponseHeaders API service call. + StringArray []*string +} + +// ApplicationGatewaysClientListAvailableSSLOptionsResponse contains the response from method ApplicationGatewaysClient.ListAvailableSSLOptions. +type ApplicationGatewaysClientListAvailableSSLOptionsResponse struct { + // Response for ApplicationGatewayAvailableSslOptions API service call. + ApplicationGatewayAvailableSSLOptions +} + +// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse contains the response from method ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager. +type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse struct { + // Response for ApplicationGatewayAvailableSslOptions API service call. + ApplicationGatewayAvailableSSLPredefinedPolicies +} + +// ApplicationGatewaysClientListAvailableServerVariablesResponse contains the response from method ApplicationGatewaysClient.ListAvailableServerVariables. +type ApplicationGatewaysClientListAvailableServerVariablesResponse struct { + // Response for ApplicationGatewayAvailableServerVariables API service call. + StringArray []*string +} + +// ApplicationGatewaysClientListAvailableWafRuleSetsResponse contains the response from method ApplicationGatewaysClient.ListAvailableWafRuleSets. +type ApplicationGatewaysClientListAvailableWafRuleSetsResponse struct { + // Response for ApplicationGatewayAvailableWafRuleSets API service call. + ApplicationGatewayAvailableWafRuleSetsResult +} + +// ApplicationGatewaysClientListResponse contains the response from method ApplicationGatewaysClient.NewListPager. +type ApplicationGatewaysClientListResponse struct { + // Response for ListApplicationGateways API service call. + ApplicationGatewayListResult +} + +// ApplicationGatewaysClientStartResponse contains the response from method ApplicationGatewaysClient.BeginStart. +type ApplicationGatewaysClientStartResponse struct { + // placeholder for future response values +} + +// ApplicationGatewaysClientStopResponse contains the response from method ApplicationGatewaysClient.BeginStop. +type ApplicationGatewaysClientStopResponse struct { + // placeholder for future response values +} + +// ApplicationGatewaysClientUpdateTagsResponse contains the response from method ApplicationGatewaysClient.UpdateTags. +type ApplicationGatewaysClientUpdateTagsResponse struct { + // Application gateway resource. + ApplicationGateway +} + +// ApplicationSecurityGroupsClientCreateOrUpdateResponse contains the response from method ApplicationSecurityGroupsClient.BeginCreateOrUpdate. +type ApplicationSecurityGroupsClientCreateOrUpdateResponse struct { + // An application security group in a resource group. + ApplicationSecurityGroup +} + +// ApplicationSecurityGroupsClientDeleteResponse contains the response from method ApplicationSecurityGroupsClient.BeginDelete. +type ApplicationSecurityGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// ApplicationSecurityGroupsClientGetResponse contains the response from method ApplicationSecurityGroupsClient.Get. +type ApplicationSecurityGroupsClientGetResponse struct { + // An application security group in a resource group. + ApplicationSecurityGroup +} + +// ApplicationSecurityGroupsClientListAllResponse contains the response from method ApplicationSecurityGroupsClient.NewListAllPager. +type ApplicationSecurityGroupsClientListAllResponse struct { + // A list of application security groups. + ApplicationSecurityGroupListResult +} + +// ApplicationSecurityGroupsClientListResponse contains the response from method ApplicationSecurityGroupsClient.NewListPager. +type ApplicationSecurityGroupsClientListResponse struct { + // A list of application security groups. + ApplicationSecurityGroupListResult +} + +// ApplicationSecurityGroupsClientUpdateTagsResponse contains the response from method ApplicationSecurityGroupsClient.UpdateTags. +type ApplicationSecurityGroupsClientUpdateTagsResponse struct { + // An application security group in a resource group. + ApplicationSecurityGroup +} + +// AvailableDelegationsClientListResponse contains the response from method AvailableDelegationsClient.NewListPager. +type AvailableDelegationsClientListResponse struct { + // An array of available delegations. + AvailableDelegationsResult +} + +// AvailableEndpointServicesClientListResponse contains the response from method AvailableEndpointServicesClient.NewListPager. +type AvailableEndpointServicesClientListResponse struct { + // Response for the ListAvailableEndpointServices API service call. + EndpointServicesListResult +} + +// AvailablePrivateEndpointTypesClientListByResourceGroupResponse contains the response from method AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager. +type AvailablePrivateEndpointTypesClientListByResourceGroupResponse struct { + // An array of available PrivateEndpoint types. + AvailablePrivateEndpointTypesResult +} + +// AvailablePrivateEndpointTypesClientListResponse contains the response from method AvailablePrivateEndpointTypesClient.NewListPager. +type AvailablePrivateEndpointTypesClientListResponse struct { + // An array of available PrivateEndpoint types. + AvailablePrivateEndpointTypesResult +} + +// AvailableResourceGroupDelegationsClientListResponse contains the response from method AvailableResourceGroupDelegationsClient.NewListPager. +type AvailableResourceGroupDelegationsClientListResponse struct { + // An array of available delegations. + AvailableDelegationsResult +} + +// AvailableServiceAliasesClientListByResourceGroupResponse contains the response from method AvailableServiceAliasesClient.NewListByResourceGroupPager. +type AvailableServiceAliasesClientListByResourceGroupResponse struct { + // An array of available service aliases. + AvailableServiceAliasesResult +} + +// AvailableServiceAliasesClientListResponse contains the response from method AvailableServiceAliasesClient.NewListPager. +type AvailableServiceAliasesClientListResponse struct { + // An array of available service aliases. + AvailableServiceAliasesResult +} + +// AzureFirewallFqdnTagsClientListAllResponse contains the response from method AzureFirewallFqdnTagsClient.NewListAllPager. +type AzureFirewallFqdnTagsClientListAllResponse struct { + // Response for ListAzureFirewallFqdnTags API service call. + AzureFirewallFqdnTagListResult +} + +// AzureFirewallsClientCreateOrUpdateResponse contains the response from method AzureFirewallsClient.BeginCreateOrUpdate. +type AzureFirewallsClientCreateOrUpdateResponse struct { + // Azure Firewall resource. + AzureFirewall +} + +// AzureFirewallsClientDeleteResponse contains the response from method AzureFirewallsClient.BeginDelete. +type AzureFirewallsClientDeleteResponse struct { + // placeholder for future response values +} + +// AzureFirewallsClientGetResponse contains the response from method AzureFirewallsClient.Get. +type AzureFirewallsClientGetResponse struct { + // Azure Firewall resource. + AzureFirewall +} + +// AzureFirewallsClientListAllResponse contains the response from method AzureFirewallsClient.NewListAllPager. +type AzureFirewallsClientListAllResponse struct { + // Response for ListAzureFirewalls API service call. + AzureFirewallListResult +} + +// AzureFirewallsClientListLearnedPrefixesResponse contains the response from method AzureFirewallsClient.BeginListLearnedPrefixes. +type AzureFirewallsClientListLearnedPrefixesResponse struct { + // List of SNAT IP Prefixes learnt by firewall to not SNAT + IPPrefixesList +} + +// AzureFirewallsClientListResponse contains the response from method AzureFirewallsClient.NewListPager. +type AzureFirewallsClientListResponse struct { + // Response for ListAzureFirewalls API service call. + AzureFirewallListResult +} + +// AzureFirewallsClientPacketCaptureResponse contains the response from method AzureFirewallsClient.BeginPacketCapture. +type AzureFirewallsClientPacketCaptureResponse struct { + // placeholder for future response values +} + +// AzureFirewallsClientUpdateTagsResponse contains the response from method AzureFirewallsClient.BeginUpdateTags. +type AzureFirewallsClientUpdateTagsResponse struct { + // Azure Firewall resource. + AzureFirewall +} + +// BastionHostsClientCreateOrUpdateResponse contains the response from method BastionHostsClient.BeginCreateOrUpdate. +type BastionHostsClientCreateOrUpdateResponse struct { + // Bastion Host resource. + BastionHost +} + +// BastionHostsClientDeleteResponse contains the response from method BastionHostsClient.BeginDelete. +type BastionHostsClientDeleteResponse struct { + // placeholder for future response values +} + +// BastionHostsClientGetResponse contains the response from method BastionHostsClient.Get. +type BastionHostsClientGetResponse struct { + // Bastion Host resource. + BastionHost +} + +// BastionHostsClientListByResourceGroupResponse contains the response from method BastionHostsClient.NewListByResourceGroupPager. +type BastionHostsClientListByResourceGroupResponse struct { + // Response for ListBastionHosts API service call. + BastionHostListResult +} + +// BastionHostsClientListResponse contains the response from method BastionHostsClient.NewListPager. +type BastionHostsClientListResponse struct { + // Response for ListBastionHosts API service call. + BastionHostListResult +} + +// BastionHostsClientUpdateTagsResponse contains the response from method BastionHostsClient.BeginUpdateTags. +type BastionHostsClientUpdateTagsResponse struct { + // Bastion Host resource. + BastionHost +} + +// BgpServiceCommunitiesClientListResponse contains the response from method BgpServiceCommunitiesClient.NewListPager. +type BgpServiceCommunitiesClientListResponse struct { + // Response for the ListServiceCommunity API service call. + BgpServiceCommunityListResult +} + +// ConfigurationPolicyGroupsClientCreateOrUpdateResponse contains the response from method ConfigurationPolicyGroupsClient.BeginCreateOrUpdate. +type ConfigurationPolicyGroupsClientCreateOrUpdateResponse struct { + // VpnServerConfigurationPolicyGroup Resource. + VPNServerConfigurationPolicyGroup +} + +// ConfigurationPolicyGroupsClientDeleteResponse contains the response from method ConfigurationPolicyGroupsClient.BeginDelete. +type ConfigurationPolicyGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// ConfigurationPolicyGroupsClientGetResponse contains the response from method ConfigurationPolicyGroupsClient.Get. +type ConfigurationPolicyGroupsClientGetResponse struct { + // VpnServerConfigurationPolicyGroup Resource. + VPNServerConfigurationPolicyGroup +} + +// ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse contains the response from method ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager. +type ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse struct { + // Result of the request to list VpnServerConfigurationPolicyGroups. It contains a list of VpnServerConfigurationPolicyGroups + // and a URL nextLink to get the next set of results. + ListVPNServerConfigurationPolicyGroupsResult +} + +// ConnectionMonitorsClientCreateOrUpdateResponse contains the response from method ConnectionMonitorsClient.BeginCreateOrUpdate. +type ConnectionMonitorsClientCreateOrUpdateResponse struct { + // Information about the connection monitor. + ConnectionMonitorResult +} + +// ConnectionMonitorsClientDeleteResponse contains the response from method ConnectionMonitorsClient.BeginDelete. +type ConnectionMonitorsClientDeleteResponse struct { + // placeholder for future response values +} + +// ConnectionMonitorsClientGetResponse contains the response from method ConnectionMonitorsClient.Get. +type ConnectionMonitorsClientGetResponse struct { + // Information about the connection monitor. + ConnectionMonitorResult +} + +// ConnectionMonitorsClientListResponse contains the response from method ConnectionMonitorsClient.NewListPager. +type ConnectionMonitorsClientListResponse struct { + // List of connection monitors. + ConnectionMonitorListResult +} + +// ConnectionMonitorsClientQueryResponse contains the response from method ConnectionMonitorsClient.BeginQuery. +type ConnectionMonitorsClientQueryResponse struct { + // List of connection states snapshots. + ConnectionMonitorQueryResult +} + +// ConnectionMonitorsClientStartResponse contains the response from method ConnectionMonitorsClient.BeginStart. +type ConnectionMonitorsClientStartResponse struct { + // placeholder for future response values +} + +// ConnectionMonitorsClientStopResponse contains the response from method ConnectionMonitorsClient.BeginStop. +type ConnectionMonitorsClientStopResponse struct { + // placeholder for future response values +} + +// ConnectionMonitorsClientUpdateTagsResponse contains the response from method ConnectionMonitorsClient.UpdateTags. +type ConnectionMonitorsClientUpdateTagsResponse struct { + // Information about the connection monitor. + ConnectionMonitorResult +} + +// ConnectivityConfigurationsClientCreateOrUpdateResponse contains the response from method ConnectivityConfigurationsClient.CreateOrUpdate. +type ConnectivityConfigurationsClientCreateOrUpdateResponse struct { + // The network manager connectivity configuration resource + ConnectivityConfiguration +} + +// ConnectivityConfigurationsClientDeleteResponse contains the response from method ConnectivityConfigurationsClient.BeginDelete. +type ConnectivityConfigurationsClientDeleteResponse struct { + // placeholder for future response values +} + +// ConnectivityConfigurationsClientGetResponse contains the response from method ConnectivityConfigurationsClient.Get. +type ConnectivityConfigurationsClientGetResponse struct { + // The network manager connectivity configuration resource + ConnectivityConfiguration +} + +// ConnectivityConfigurationsClientListResponse contains the response from method ConnectivityConfigurationsClient.NewListPager. +type ConnectivityConfigurationsClientListResponse struct { + // Result of the request to list network manager connectivity configurations. It contains a list of configurations and a link + // to get the next set of results. + ConnectivityConfigurationListResult +} + +// CustomIPPrefixesClientCreateOrUpdateResponse contains the response from method CustomIPPrefixesClient.BeginCreateOrUpdate. +type CustomIPPrefixesClientCreateOrUpdateResponse struct { + // Custom IP prefix resource. + CustomIPPrefix +} + +// CustomIPPrefixesClientDeleteResponse contains the response from method CustomIPPrefixesClient.BeginDelete. +type CustomIPPrefixesClientDeleteResponse struct { + // placeholder for future response values +} + +// CustomIPPrefixesClientGetResponse contains the response from method CustomIPPrefixesClient.Get. +type CustomIPPrefixesClientGetResponse struct { + // Custom IP prefix resource. + CustomIPPrefix +} + +// CustomIPPrefixesClientListAllResponse contains the response from method CustomIPPrefixesClient.NewListAllPager. +type CustomIPPrefixesClientListAllResponse struct { + // Response for ListCustomIpPrefixes API service call. + CustomIPPrefixListResult +} + +// CustomIPPrefixesClientListResponse contains the response from method CustomIPPrefixesClient.NewListPager. +type CustomIPPrefixesClientListResponse struct { + // Response for ListCustomIpPrefixes API service call. + CustomIPPrefixListResult +} + +// CustomIPPrefixesClientUpdateTagsResponse contains the response from method CustomIPPrefixesClient.UpdateTags. +type CustomIPPrefixesClientUpdateTagsResponse struct { + // Custom IP prefix resource. + CustomIPPrefix +} + +// DdosCustomPoliciesClientCreateOrUpdateResponse contains the response from method DdosCustomPoliciesClient.BeginCreateOrUpdate. +type DdosCustomPoliciesClientCreateOrUpdateResponse struct { + // A DDoS custom policy in a resource group. + DdosCustomPolicy +} + +// DdosCustomPoliciesClientDeleteResponse contains the response from method DdosCustomPoliciesClient.BeginDelete. +type DdosCustomPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// DdosCustomPoliciesClientGetResponse contains the response from method DdosCustomPoliciesClient.Get. +type DdosCustomPoliciesClientGetResponse struct { + // A DDoS custom policy in a resource group. + DdosCustomPolicy +} + +// DdosCustomPoliciesClientUpdateTagsResponse contains the response from method DdosCustomPoliciesClient.UpdateTags. +type DdosCustomPoliciesClientUpdateTagsResponse struct { + // A DDoS custom policy in a resource group. + DdosCustomPolicy +} + +// DdosProtectionPlansClientCreateOrUpdateResponse contains the response from method DdosProtectionPlansClient.BeginCreateOrUpdate. +type DdosProtectionPlansClientCreateOrUpdateResponse struct { + // A DDoS protection plan in a resource group. + DdosProtectionPlan +} + +// DdosProtectionPlansClientDeleteResponse contains the response from method DdosProtectionPlansClient.BeginDelete. +type DdosProtectionPlansClientDeleteResponse struct { + // placeholder for future response values +} + +// DdosProtectionPlansClientGetResponse contains the response from method DdosProtectionPlansClient.Get. +type DdosProtectionPlansClientGetResponse struct { + // A DDoS protection plan in a resource group. + DdosProtectionPlan +} + +// DdosProtectionPlansClientListByResourceGroupResponse contains the response from method DdosProtectionPlansClient.NewListByResourceGroupPager. +type DdosProtectionPlansClientListByResourceGroupResponse struct { + // A list of DDoS protection plans. + DdosProtectionPlanListResult +} + +// DdosProtectionPlansClientListResponse contains the response from method DdosProtectionPlansClient.NewListPager. +type DdosProtectionPlansClientListResponse struct { + // A list of DDoS protection plans. + DdosProtectionPlanListResult +} + +// DdosProtectionPlansClientUpdateTagsResponse contains the response from method DdosProtectionPlansClient.UpdateTags. +type DdosProtectionPlansClientUpdateTagsResponse struct { + // A DDoS protection plan in a resource group. + DdosProtectionPlan +} + +// DefaultSecurityRulesClientGetResponse contains the response from method DefaultSecurityRulesClient.Get. +type DefaultSecurityRulesClientGetResponse struct { + // Network security rule. + SecurityRule +} + +// DefaultSecurityRulesClientListResponse contains the response from method DefaultSecurityRulesClient.NewListPager. +type DefaultSecurityRulesClientListResponse struct { + // Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. + SecurityRuleListResult +} + +// DscpConfigurationClientCreateOrUpdateResponse contains the response from method DscpConfigurationClient.BeginCreateOrUpdate. +type DscpConfigurationClientCreateOrUpdateResponse struct { + // Differentiated Services Code Point configuration for any given network interface + DscpConfiguration +} + +// DscpConfigurationClientDeleteResponse contains the response from method DscpConfigurationClient.BeginDelete. +type DscpConfigurationClientDeleteResponse struct { + // placeholder for future response values +} + +// DscpConfigurationClientGetResponse contains the response from method DscpConfigurationClient.Get. +type DscpConfigurationClientGetResponse struct { + // Differentiated Services Code Point configuration for any given network interface + DscpConfiguration +} + +// DscpConfigurationClientListAllResponse contains the response from method DscpConfigurationClient.NewListAllPager. +type DscpConfigurationClientListAllResponse struct { + // Response for the DscpConfigurationList API service call. + DscpConfigurationListResult +} + +// DscpConfigurationClientListResponse contains the response from method DscpConfigurationClient.NewListPager. +type DscpConfigurationClientListResponse struct { + // Response for the DscpConfigurationList API service call. + DscpConfigurationListResult +} + +// ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate. +type ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse struct { + // Authorization in an ExpressRouteCircuit resource. + ExpressRouteCircuitAuthorization +} + +// ExpressRouteCircuitAuthorizationsClientDeleteResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.BeginDelete. +type ExpressRouteCircuitAuthorizationsClientDeleteResponse struct { + // placeholder for future response values +} + +// ExpressRouteCircuitAuthorizationsClientGetResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.Get. +type ExpressRouteCircuitAuthorizationsClientGetResponse struct { + // Authorization in an ExpressRouteCircuit resource. + ExpressRouteCircuitAuthorization +} + +// ExpressRouteCircuitAuthorizationsClientListResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.NewListPager. +type ExpressRouteCircuitAuthorizationsClientListResponse struct { + // Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. + AuthorizationListResult +} + +// ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate. +type ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse struct { + // Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + ExpressRouteCircuitConnection +} + +// ExpressRouteCircuitConnectionsClientDeleteResponse contains the response from method ExpressRouteCircuitConnectionsClient.BeginDelete. +type ExpressRouteCircuitConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// ExpressRouteCircuitConnectionsClientGetResponse contains the response from method ExpressRouteCircuitConnectionsClient.Get. +type ExpressRouteCircuitConnectionsClientGetResponse struct { + // Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + ExpressRouteCircuitConnection +} + +// ExpressRouteCircuitConnectionsClientListResponse contains the response from method ExpressRouteCircuitConnectionsClient.NewListPager. +type ExpressRouteCircuitConnectionsClientListResponse struct { + // Response for ListConnections API service call retrieves all global reach connections that belongs to a Private Peering + // for an ExpressRouteCircuit. + ExpressRouteCircuitConnectionListResult +} + +// ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate. +type ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse struct { + // Peering in an ExpressRouteCircuit resource. + ExpressRouteCircuitPeering +} + +// ExpressRouteCircuitPeeringsClientDeleteResponse contains the response from method ExpressRouteCircuitPeeringsClient.BeginDelete. +type ExpressRouteCircuitPeeringsClientDeleteResponse struct { + // placeholder for future response values +} + +// ExpressRouteCircuitPeeringsClientGetResponse contains the response from method ExpressRouteCircuitPeeringsClient.Get. +type ExpressRouteCircuitPeeringsClientGetResponse struct { + // Peering in an ExpressRouteCircuit resource. + ExpressRouteCircuitPeering +} + +// ExpressRouteCircuitPeeringsClientListResponse contains the response from method ExpressRouteCircuitPeeringsClient.NewListPager. +type ExpressRouteCircuitPeeringsClientListResponse struct { + // Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. + ExpressRouteCircuitPeeringListResult +} + +// ExpressRouteCircuitsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitsClient.BeginCreateOrUpdate. +type ExpressRouteCircuitsClientCreateOrUpdateResponse struct { + // ExpressRouteCircuit resource. + ExpressRouteCircuit +} + +// ExpressRouteCircuitsClientDeleteResponse contains the response from method ExpressRouteCircuitsClient.BeginDelete. +type ExpressRouteCircuitsClientDeleteResponse struct { + // placeholder for future response values +} + +// ExpressRouteCircuitsClientGetPeeringStatsResponse contains the response from method ExpressRouteCircuitsClient.GetPeeringStats. +type ExpressRouteCircuitsClientGetPeeringStatsResponse struct { + // Contains stats associated with the peering. + ExpressRouteCircuitStats +} + +// ExpressRouteCircuitsClientGetResponse contains the response from method ExpressRouteCircuitsClient.Get. +type ExpressRouteCircuitsClientGetResponse struct { + // ExpressRouteCircuit resource. + ExpressRouteCircuit +} + +// ExpressRouteCircuitsClientGetStatsResponse contains the response from method ExpressRouteCircuitsClient.GetStats. +type ExpressRouteCircuitsClientGetStatsResponse struct { + // Contains stats associated with the peering. + ExpressRouteCircuitStats +} + +// ExpressRouteCircuitsClientListAllResponse contains the response from method ExpressRouteCircuitsClient.NewListAllPager. +type ExpressRouteCircuitsClientListAllResponse struct { + // Response for ListExpressRouteCircuit API service call. + ExpressRouteCircuitListResult +} + +// ExpressRouteCircuitsClientListArpTableResponse contains the response from method ExpressRouteCircuitsClient.BeginListArpTable. +type ExpressRouteCircuitsClientListArpTableResponse struct { + // Response for ListArpTable associated with the Express Route Circuits API. + ExpressRouteCircuitsArpTableListResult +} + +// ExpressRouteCircuitsClientListResponse contains the response from method ExpressRouteCircuitsClient.NewListPager. +type ExpressRouteCircuitsClientListResponse struct { + // Response for ListExpressRouteCircuit API service call. + ExpressRouteCircuitListResult +} + +// ExpressRouteCircuitsClientListRoutesTableResponse contains the response from method ExpressRouteCircuitsClient.BeginListRoutesTable. +type ExpressRouteCircuitsClientListRoutesTableResponse struct { + // Response for ListRoutesTable associated with the Express Route Circuits API. + ExpressRouteCircuitsRoutesTableListResult +} + +// ExpressRouteCircuitsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCircuitsClient.BeginListRoutesTableSummary. +type ExpressRouteCircuitsClientListRoutesTableSummaryResponse struct { + // Response for ListRoutesTable associated with the Express Route Circuits API. + ExpressRouteCircuitsRoutesTableSummaryListResult +} + +// ExpressRouteCircuitsClientUpdateTagsResponse contains the response from method ExpressRouteCircuitsClient.UpdateTags. +type ExpressRouteCircuitsClientUpdateTagsResponse struct { + // ExpressRouteCircuit resource. + ExpressRouteCircuit +} + +// ExpressRouteConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteConnectionsClient.BeginCreateOrUpdate. +type ExpressRouteConnectionsClientCreateOrUpdateResponse struct { + // ExpressRouteConnection resource. + ExpressRouteConnection +} + +// ExpressRouteConnectionsClientDeleteResponse contains the response from method ExpressRouteConnectionsClient.BeginDelete. +type ExpressRouteConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// ExpressRouteConnectionsClientGetResponse contains the response from method ExpressRouteConnectionsClient.Get. +type ExpressRouteConnectionsClientGetResponse struct { + // ExpressRouteConnection resource. + ExpressRouteConnection +} + +// ExpressRouteConnectionsClientListResponse contains the response from method ExpressRouteConnectionsClient.List. +type ExpressRouteConnectionsClientListResponse struct { + // ExpressRouteConnection list. + ExpressRouteConnectionList +} + +// ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate. +type ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse struct { + // Peering in an ExpressRoute Cross Connection resource. + ExpressRouteCrossConnectionPeering +} + +// ExpressRouteCrossConnectionPeeringsClientDeleteResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.BeginDelete. +type ExpressRouteCrossConnectionPeeringsClientDeleteResponse struct { + // placeholder for future response values +} + +// ExpressRouteCrossConnectionPeeringsClientGetResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.Get. +type ExpressRouteCrossConnectionPeeringsClientGetResponse struct { + // Peering in an ExpressRoute Cross Connection resource. + ExpressRouteCrossConnectionPeering +} + +// ExpressRouteCrossConnectionPeeringsClientListResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.NewListPager. +type ExpressRouteCrossConnectionPeeringsClientListResponse struct { + // Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCrossConnection. + ExpressRouteCrossConnectionPeeringList +} + +// ExpressRouteCrossConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate. +type ExpressRouteCrossConnectionsClientCreateOrUpdateResponse struct { + // ExpressRouteCrossConnection resource. + ExpressRouteCrossConnection +} + +// ExpressRouteCrossConnectionsClientGetResponse contains the response from method ExpressRouteCrossConnectionsClient.Get. +type ExpressRouteCrossConnectionsClientGetResponse struct { + // ExpressRouteCrossConnection resource. + ExpressRouteCrossConnection +} + +// ExpressRouteCrossConnectionsClientListArpTableResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginListArpTable. +type ExpressRouteCrossConnectionsClientListArpTableResponse struct { + // Response for ListArpTable associated with the Express Route Circuits API. + ExpressRouteCircuitsArpTableListResult +} + +// ExpressRouteCrossConnectionsClientListByResourceGroupResponse contains the response from method ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager. +type ExpressRouteCrossConnectionsClientListByResourceGroupResponse struct { + // Response for ListExpressRouteCrossConnection API service call. + ExpressRouteCrossConnectionListResult +} + +// ExpressRouteCrossConnectionsClientListResponse contains the response from method ExpressRouteCrossConnectionsClient.NewListPager. +type ExpressRouteCrossConnectionsClientListResponse struct { + // Response for ListExpressRouteCrossConnection API service call. + ExpressRouteCrossConnectionListResult +} + +// ExpressRouteCrossConnectionsClientListRoutesTableResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginListRoutesTable. +type ExpressRouteCrossConnectionsClientListRoutesTableResponse struct { + // Response for ListRoutesTable associated with the Express Route Circuits API. + ExpressRouteCircuitsRoutesTableListResult +} + +// ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary. +type ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse struct { + // Response for ListRoutesTable associated with the Express Route Cross Connections. + ExpressRouteCrossConnectionsRoutesTableSummaryListResult +} + +// ExpressRouteCrossConnectionsClientUpdateTagsResponse contains the response from method ExpressRouteCrossConnectionsClient.UpdateTags. +type ExpressRouteCrossConnectionsClientUpdateTagsResponse struct { + // ExpressRouteCrossConnection resource. + ExpressRouteCrossConnection +} + +// ExpressRouteGatewaysClientCreateOrUpdateResponse contains the response from method ExpressRouteGatewaysClient.BeginCreateOrUpdate. +type ExpressRouteGatewaysClientCreateOrUpdateResponse struct { + // ExpressRoute gateway resource. + ExpressRouteGateway +} + +// ExpressRouteGatewaysClientDeleteResponse contains the response from method ExpressRouteGatewaysClient.BeginDelete. +type ExpressRouteGatewaysClientDeleteResponse struct { + // placeholder for future response values +} + +// ExpressRouteGatewaysClientGetResponse contains the response from method ExpressRouteGatewaysClient.Get. +type ExpressRouteGatewaysClientGetResponse struct { + // ExpressRoute gateway resource. + ExpressRouteGateway +} + +// ExpressRouteGatewaysClientListByResourceGroupResponse contains the response from method ExpressRouteGatewaysClient.ListByResourceGroup. +type ExpressRouteGatewaysClientListByResourceGroupResponse struct { + // List of ExpressRoute gateways. + ExpressRouteGatewayList +} + +// ExpressRouteGatewaysClientListBySubscriptionResponse contains the response from method ExpressRouteGatewaysClient.ListBySubscription. +type ExpressRouteGatewaysClientListBySubscriptionResponse struct { + // List of ExpressRoute gateways. + ExpressRouteGatewayList +} + +// ExpressRouteGatewaysClientUpdateTagsResponse contains the response from method ExpressRouteGatewaysClient.BeginUpdateTags. +type ExpressRouteGatewaysClientUpdateTagsResponse struct { + // ExpressRoute gateway resource. + ExpressRouteGateway +} + +// ExpressRouteLinksClientGetResponse contains the response from method ExpressRouteLinksClient.Get. +type ExpressRouteLinksClientGetResponse struct { + // ExpressRouteLink child resource definition. + ExpressRouteLink +} + +// ExpressRouteLinksClientListResponse contains the response from method ExpressRouteLinksClient.NewListPager. +type ExpressRouteLinksClientListResponse struct { + // Response for ListExpressRouteLinks API service call. + ExpressRouteLinkListResult +} + +// ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate. +type ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse struct { + // ExpressRoutePort Authorization resource definition. + ExpressRoutePortAuthorization +} + +// ExpressRoutePortAuthorizationsClientDeleteResponse contains the response from method ExpressRoutePortAuthorizationsClient.BeginDelete. +type ExpressRoutePortAuthorizationsClientDeleteResponse struct { + // placeholder for future response values +} + +// ExpressRoutePortAuthorizationsClientGetResponse contains the response from method ExpressRoutePortAuthorizationsClient.Get. +type ExpressRoutePortAuthorizationsClientGetResponse struct { + // ExpressRoutePort Authorization resource definition. + ExpressRoutePortAuthorization +} + +// ExpressRoutePortAuthorizationsClientListResponse contains the response from method ExpressRoutePortAuthorizationsClient.NewListPager. +type ExpressRoutePortAuthorizationsClientListResponse struct { + // Response for ListExpressRoutePortAuthorizations API service call. + ExpressRoutePortAuthorizationListResult +} + +// ExpressRoutePortsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortsClient.BeginCreateOrUpdate. +type ExpressRoutePortsClientCreateOrUpdateResponse struct { + // ExpressRoutePort resource definition. + ExpressRoutePort +} + +// ExpressRoutePortsClientDeleteResponse contains the response from method ExpressRoutePortsClient.BeginDelete. +type ExpressRoutePortsClientDeleteResponse struct { + // placeholder for future response values +} + +// ExpressRoutePortsClientGenerateLOAResponse contains the response from method ExpressRoutePortsClient.GenerateLOA. +type ExpressRoutePortsClientGenerateLOAResponse struct { + // Response for GenerateExpressRoutePortsLOA API service call. + GenerateExpressRoutePortsLOAResult +} + +// ExpressRoutePortsClientGetResponse contains the response from method ExpressRoutePortsClient.Get. +type ExpressRoutePortsClientGetResponse struct { + // ExpressRoutePort resource definition. + ExpressRoutePort +} + +// ExpressRoutePortsClientListByResourceGroupResponse contains the response from method ExpressRoutePortsClient.NewListByResourceGroupPager. +type ExpressRoutePortsClientListByResourceGroupResponse struct { + // Response for ListExpressRoutePorts API service call. + ExpressRoutePortListResult +} + +// ExpressRoutePortsClientListResponse contains the response from method ExpressRoutePortsClient.NewListPager. +type ExpressRoutePortsClientListResponse struct { + // Response for ListExpressRoutePorts API service call. + ExpressRoutePortListResult +} + +// ExpressRoutePortsClientUpdateTagsResponse contains the response from method ExpressRoutePortsClient.UpdateTags. +type ExpressRoutePortsClientUpdateTagsResponse struct { + // ExpressRoutePort resource definition. + ExpressRoutePort +} + +// ExpressRoutePortsLocationsClientGetResponse contains the response from method ExpressRoutePortsLocationsClient.Get. +type ExpressRoutePortsLocationsClientGetResponse struct { + // Definition of the ExpressRoutePorts peering location resource. + ExpressRoutePortsLocation +} + +// ExpressRoutePortsLocationsClientListResponse contains the response from method ExpressRoutePortsLocationsClient.NewListPager. +type ExpressRoutePortsLocationsClientListResponse struct { + // Response for ListExpressRoutePortsLocations API service call. + ExpressRoutePortsLocationListResult +} + +// ExpressRouteProviderPortsLocationClientListResponse contains the response from method ExpressRouteProviderPortsLocationClient.List. +type ExpressRouteProviderPortsLocationClientListResponse struct { + // Response for ListExpressRouteProviderPort API service call. + ExpressRouteProviderPortListResult +} + +// ExpressRouteServiceProvidersClientListResponse contains the response from method ExpressRouteServiceProvidersClient.NewListPager. +type ExpressRouteServiceProvidersClientListResponse struct { + // Response for the ListExpressRouteServiceProvider API service call. + ExpressRouteServiceProviderListResult +} + +// FirewallPoliciesClientCreateOrUpdateResponse contains the response from method FirewallPoliciesClient.BeginCreateOrUpdate. +type FirewallPoliciesClientCreateOrUpdateResponse struct { + // FirewallPolicy Resource. + FirewallPolicy +} + +// FirewallPoliciesClientDeleteResponse contains the response from method FirewallPoliciesClient.BeginDelete. +type FirewallPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// FirewallPoliciesClientGetResponse contains the response from method FirewallPoliciesClient.Get. +type FirewallPoliciesClientGetResponse struct { + // FirewallPolicy Resource. + FirewallPolicy +} + +// FirewallPoliciesClientListAllResponse contains the response from method FirewallPoliciesClient.NewListAllPager. +type FirewallPoliciesClientListAllResponse struct { + // Response for ListFirewallPolicies API service call. + FirewallPolicyListResult +} + +// FirewallPoliciesClientListResponse contains the response from method FirewallPoliciesClient.NewListPager. +type FirewallPoliciesClientListResponse struct { + // Response for ListFirewallPolicies API service call. + FirewallPolicyListResult +} + +// FirewallPoliciesClientUpdateTagsResponse contains the response from method FirewallPoliciesClient.UpdateTags. +type FirewallPoliciesClientUpdateTagsResponse struct { + // FirewallPolicy Resource. + FirewallPolicy +} + +// FirewallPolicyDeploymentsClientDeployResponse contains the response from method FirewallPolicyDeploymentsClient.BeginDeploy. +type FirewallPolicyDeploymentsClientDeployResponse struct { + // placeholder for future response values +} + +// FirewallPolicyDraftsClientCreateOrUpdateResponse contains the response from method FirewallPolicyDraftsClient.CreateOrUpdate. +type FirewallPolicyDraftsClientCreateOrUpdateResponse struct { + // FirewallPolicy Resource. + FirewallPolicyDraft +} + +// FirewallPolicyDraftsClientDeleteResponse contains the response from method FirewallPolicyDraftsClient.Delete. +type FirewallPolicyDraftsClientDeleteResponse struct { + // placeholder for future response values +} + +// FirewallPolicyDraftsClientGetResponse contains the response from method FirewallPolicyDraftsClient.Get. +type FirewallPolicyDraftsClientGetResponse struct { + // FirewallPolicy Resource. + FirewallPolicyDraft +} + +// FirewallPolicyIdpsSignaturesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesClient.List. +type FirewallPolicyIdpsSignaturesClientListResponse struct { + // Query result + QueryResults +} + +// FirewallPolicyIdpsSignaturesFilterValuesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesFilterValuesClient.List. +type FirewallPolicyIdpsSignaturesFilterValuesClientListResponse struct { + // Describes the list of all possible values for a specific filter value + SignatureOverridesFilterValuesResponse +} + +// FirewallPolicyIdpsSignaturesOverridesClientGetResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Get. +type FirewallPolicyIdpsSignaturesOverridesClientGetResponse struct { + // Contains all specific policy signatures overrides for the IDPS + SignaturesOverrides +} + +// FirewallPolicyIdpsSignaturesOverridesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.List. +type FirewallPolicyIdpsSignaturesOverridesClientListResponse struct { + // Describes an object containing an array with a single item + SignaturesOverridesList +} + +// FirewallPolicyIdpsSignaturesOverridesClientPatchResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Patch. +type FirewallPolicyIdpsSignaturesOverridesClientPatchResponse struct { + // Contains all specific policy signatures overrides for the IDPS + SignaturesOverrides +} + +// FirewallPolicyIdpsSignaturesOverridesClientPutResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Put. +type FirewallPolicyIdpsSignaturesOverridesClientPutResponse struct { + // Contains all specific policy signatures overrides for the IDPS + SignaturesOverrides +} + +// FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateResponse contains the response from method FirewallPolicyRuleCollectionGroupDraftsClient.CreateOrUpdate. +type FirewallPolicyRuleCollectionGroupDraftsClientCreateOrUpdateResponse struct { + // Rule Collection Group resource. + FirewallPolicyRuleCollectionGroupDraft +} + +// FirewallPolicyRuleCollectionGroupDraftsClientDeleteResponse contains the response from method FirewallPolicyRuleCollectionGroupDraftsClient.Delete. +type FirewallPolicyRuleCollectionGroupDraftsClientDeleteResponse struct { + // placeholder for future response values +} + +// FirewallPolicyRuleCollectionGroupDraftsClientGetResponse contains the response from method FirewallPolicyRuleCollectionGroupDraftsClient.Get. +type FirewallPolicyRuleCollectionGroupDraftsClientGetResponse struct { + // Rule Collection Group resource. + FirewallPolicyRuleCollectionGroupDraft +} + +// FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate. +type FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse struct { + // Rule Collection Group resource. + FirewallPolicyRuleCollectionGroup +} + +// FirewallPolicyRuleCollectionGroupsClientDeleteResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.BeginDelete. +type FirewallPolicyRuleCollectionGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// FirewallPolicyRuleCollectionGroupsClientGetResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.Get. +type FirewallPolicyRuleCollectionGroupsClientGetResponse struct { + // Rule Collection Group resource. + FirewallPolicyRuleCollectionGroup +} + +// FirewallPolicyRuleCollectionGroupsClientListResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.NewListPager. +type FirewallPolicyRuleCollectionGroupsClientListResponse struct { + // Response for ListFirewallPolicyRuleCollectionGroups API service call. + FirewallPolicyRuleCollectionGroupListResult +} + +// FlowLogsClientCreateOrUpdateResponse contains the response from method FlowLogsClient.BeginCreateOrUpdate. +type FlowLogsClientCreateOrUpdateResponse struct { + // A flow log resource. + FlowLog +} + +// FlowLogsClientDeleteResponse contains the response from method FlowLogsClient.BeginDelete. +type FlowLogsClientDeleteResponse struct { + // placeholder for future response values +} + +// FlowLogsClientGetResponse contains the response from method FlowLogsClient.Get. +type FlowLogsClientGetResponse struct { + // A flow log resource. + FlowLog +} + +// FlowLogsClientListResponse contains the response from method FlowLogsClient.NewListPager. +type FlowLogsClientListResponse struct { + // List of flow logs. + FlowLogListResult +} + +// FlowLogsClientUpdateTagsResponse contains the response from method FlowLogsClient.UpdateTags. +type FlowLogsClientUpdateTagsResponse struct { + // A flow log resource. + FlowLog +} + +// GroupsClientCreateOrUpdateResponse contains the response from method GroupsClient.CreateOrUpdate. +type GroupsClientCreateOrUpdateResponse struct { + // The network group resource + Group + + // ETag contains the information returned from the ETag header response. + ETag *string +} + +// GroupsClientDeleteResponse contains the response from method GroupsClient.BeginDelete. +type GroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// GroupsClientGetResponse contains the response from method GroupsClient.Get. +type GroupsClientGetResponse struct { + // The network group resource + Group +} + +// GroupsClientListResponse contains the response from method GroupsClient.NewListPager. +type GroupsClientListResponse struct { + // Result of the request to list NetworkGroup. It contains a list of groups and a URL link to get the next set of results. + GroupListResult +} + +// HubRouteTablesClientCreateOrUpdateResponse contains the response from method HubRouteTablesClient.BeginCreateOrUpdate. +type HubRouteTablesClientCreateOrUpdateResponse struct { + // RouteTable resource in a virtual hub. + HubRouteTable +} + +// HubRouteTablesClientDeleteResponse contains the response from method HubRouteTablesClient.BeginDelete. +type HubRouteTablesClientDeleteResponse struct { + // placeholder for future response values +} + +// HubRouteTablesClientGetResponse contains the response from method HubRouteTablesClient.Get. +type HubRouteTablesClientGetResponse struct { + // RouteTable resource in a virtual hub. + HubRouteTable +} + +// HubRouteTablesClientListResponse contains the response from method HubRouteTablesClient.NewListPager. +type HubRouteTablesClientListResponse struct { + // List of RouteTables and a URL nextLink to get the next set of results. + ListHubRouteTablesResult +} + +// HubVirtualNetworkConnectionsClientCreateOrUpdateResponse contains the response from method HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate. +type HubVirtualNetworkConnectionsClientCreateOrUpdateResponse struct { + // HubVirtualNetworkConnection Resource. + HubVirtualNetworkConnection +} + +// HubVirtualNetworkConnectionsClientDeleteResponse contains the response from method HubVirtualNetworkConnectionsClient.BeginDelete. +type HubVirtualNetworkConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// HubVirtualNetworkConnectionsClientGetResponse contains the response from method HubVirtualNetworkConnectionsClient.Get. +type HubVirtualNetworkConnectionsClientGetResponse struct { + // HubVirtualNetworkConnection Resource. + HubVirtualNetworkConnection +} + +// HubVirtualNetworkConnectionsClientListResponse contains the response from method HubVirtualNetworkConnectionsClient.NewListPager. +type HubVirtualNetworkConnectionsClientListResponse struct { + // List of HubVirtualNetworkConnections and a URL nextLink to get the next set of results. + ListHubVirtualNetworkConnectionsResult +} + +// IPAllocationsClientCreateOrUpdateResponse contains the response from method IPAllocationsClient.BeginCreateOrUpdate. +type IPAllocationsClientCreateOrUpdateResponse struct { + // IpAllocation resource. + IPAllocation +} + +// IPAllocationsClientDeleteResponse contains the response from method IPAllocationsClient.BeginDelete. +type IPAllocationsClientDeleteResponse struct { + // placeholder for future response values +} + +// IPAllocationsClientGetResponse contains the response from method IPAllocationsClient.Get. +type IPAllocationsClientGetResponse struct { + // IpAllocation resource. + IPAllocation +} + +// IPAllocationsClientListByResourceGroupResponse contains the response from method IPAllocationsClient.NewListByResourceGroupPager. +type IPAllocationsClientListByResourceGroupResponse struct { + // Response for the ListIpAllocations API service call. + IPAllocationListResult +} + +// IPAllocationsClientListResponse contains the response from method IPAllocationsClient.NewListPager. +type IPAllocationsClientListResponse struct { + // Response for the ListIpAllocations API service call. + IPAllocationListResult +} + +// IPAllocationsClientUpdateTagsResponse contains the response from method IPAllocationsClient.UpdateTags. +type IPAllocationsClientUpdateTagsResponse struct { + // IpAllocation resource. + IPAllocation +} + +// IPGroupsClientCreateOrUpdateResponse contains the response from method IPGroupsClient.BeginCreateOrUpdate. +type IPGroupsClientCreateOrUpdateResponse struct { + // The IpGroups resource information. + IPGroup +} + +// IPGroupsClientDeleteResponse contains the response from method IPGroupsClient.BeginDelete. +type IPGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// IPGroupsClientGetResponse contains the response from method IPGroupsClient.Get. +type IPGroupsClientGetResponse struct { + // The IpGroups resource information. + IPGroup +} + +// IPGroupsClientListByResourceGroupResponse contains the response from method IPGroupsClient.NewListByResourceGroupPager. +type IPGroupsClientListByResourceGroupResponse struct { + // Response for the ListIpGroups API service call. + IPGroupListResult +} + +// IPGroupsClientListResponse contains the response from method IPGroupsClient.NewListPager. +type IPGroupsClientListResponse struct { + // Response for the ListIpGroups API service call. + IPGroupListResult +} + +// IPGroupsClientUpdateGroupsResponse contains the response from method IPGroupsClient.UpdateGroups. +type IPGroupsClientUpdateGroupsResponse struct { + // The IpGroups resource information. + IPGroup +} + +// InboundNatRulesClientCreateOrUpdateResponse contains the response from method InboundNatRulesClient.BeginCreateOrUpdate. +type InboundNatRulesClientCreateOrUpdateResponse struct { + // Inbound NAT rule of the load balancer. + InboundNatRule +} + +// InboundNatRulesClientDeleteResponse contains the response from method InboundNatRulesClient.BeginDelete. +type InboundNatRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// InboundNatRulesClientGetResponse contains the response from method InboundNatRulesClient.Get. +type InboundNatRulesClientGetResponse struct { + // Inbound NAT rule of the load balancer. + InboundNatRule +} + +// InboundNatRulesClientListResponse contains the response from method InboundNatRulesClient.NewListPager. +type InboundNatRulesClientListResponse struct { + // Response for ListInboundNatRule API service call. + InboundNatRuleListResult +} + +// InboundSecurityRuleClientCreateOrUpdateResponse contains the response from method InboundSecurityRuleClient.BeginCreateOrUpdate. +type InboundSecurityRuleClientCreateOrUpdateResponse struct { + // NVA Inbound Security Rule resource. + InboundSecurityRule +} + +// InboundSecurityRuleClientGetResponse contains the response from method InboundSecurityRuleClient.Get. +type InboundSecurityRuleClientGetResponse struct { + // NVA Inbound Security Rule resource. + InboundSecurityRule +} + +// InterfaceIPConfigurationsClientGetResponse contains the response from method InterfaceIPConfigurationsClient.Get. +type InterfaceIPConfigurationsClientGetResponse struct { + // IPConfiguration in a network interface. + InterfaceIPConfiguration +} + +// InterfaceIPConfigurationsClientListResponse contains the response from method InterfaceIPConfigurationsClient.NewListPager. +type InterfaceIPConfigurationsClientListResponse struct { + // Response for list ip configurations API service call. + InterfaceIPConfigurationListResult +} + +// InterfaceLoadBalancersClientListResponse contains the response from method InterfaceLoadBalancersClient.NewListPager. +type InterfaceLoadBalancersClientListResponse struct { + // Response for list ip configurations API service call. + InterfaceLoadBalancerListResult +} + +// InterfaceTapConfigurationsClientCreateOrUpdateResponse contains the response from method InterfaceTapConfigurationsClient.BeginCreateOrUpdate. +type InterfaceTapConfigurationsClientCreateOrUpdateResponse struct { + // Tap configuration in a Network Interface. + InterfaceTapConfiguration +} + +// InterfaceTapConfigurationsClientDeleteResponse contains the response from method InterfaceTapConfigurationsClient.BeginDelete. +type InterfaceTapConfigurationsClientDeleteResponse struct { + // placeholder for future response values +} + +// InterfaceTapConfigurationsClientGetResponse contains the response from method InterfaceTapConfigurationsClient.Get. +type InterfaceTapConfigurationsClientGetResponse struct { + // Tap configuration in a Network Interface. + InterfaceTapConfiguration +} + +// InterfaceTapConfigurationsClientListResponse contains the response from method InterfaceTapConfigurationsClient.NewListPager. +type InterfaceTapConfigurationsClientListResponse struct { + // Response for list tap configurations API service call. + InterfaceTapConfigurationListResult +} + +// InterfacesClientCreateOrUpdateResponse contains the response from method InterfacesClient.BeginCreateOrUpdate. +type InterfacesClientCreateOrUpdateResponse struct { + // A network interface in a resource group. + Interface +} + +// InterfacesClientDeleteResponse contains the response from method InterfacesClient.BeginDelete. +type InterfacesClientDeleteResponse struct { + // placeholder for future response values +} + +// InterfacesClientGetCloudServiceNetworkInterfaceResponse contains the response from method InterfacesClient.GetCloudServiceNetworkInterface. +type InterfacesClientGetCloudServiceNetworkInterfaceResponse struct { + // A network interface in a resource group. + Interface +} + +// InterfacesClientGetEffectiveRouteTableResponse contains the response from method InterfacesClient.BeginGetEffectiveRouteTable. +type InterfacesClientGetEffectiveRouteTableResponse struct { + // Response for list effective route API service call. + EffectiveRouteListResult +} + +// InterfacesClientGetResponse contains the response from method InterfacesClient.Get. +type InterfacesClientGetResponse struct { + // A network interface in a resource group. + Interface +} + +// InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse contains the response from method InterfacesClient.GetVirtualMachineScaleSetIPConfiguration. +type InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse struct { + // IPConfiguration in a network interface. + InterfaceIPConfiguration +} + +// InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse contains the response from method InterfacesClient.GetVirtualMachineScaleSetNetworkInterface. +type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse struct { + // A network interface in a resource group. + Interface +} + +// InterfacesClientListAllResponse contains the response from method InterfacesClient.NewListAllPager. +type InterfacesClientListAllResponse struct { + // Response for the ListNetworkInterface API service call. + InterfaceListResult +} + +// InterfacesClientListCloudServiceNetworkInterfacesResponse contains the response from method InterfacesClient.NewListCloudServiceNetworkInterfacesPager. +type InterfacesClientListCloudServiceNetworkInterfacesResponse struct { + // Response for the ListNetworkInterface API service call. + InterfaceListResult +} + +// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse contains the response from method InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager. +type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse struct { + // Response for the ListNetworkInterface API service call. + InterfaceListResult +} + +// InterfacesClientListEffectiveNetworkSecurityGroupsResponse contains the response from method InterfacesClient.BeginListEffectiveNetworkSecurityGroups. +type InterfacesClientListEffectiveNetworkSecurityGroupsResponse struct { + // Response for list effective network security groups API service call. + EffectiveNetworkSecurityGroupListResult +} + +// InterfacesClientListResponse contains the response from method InterfacesClient.NewListPager. +type InterfacesClientListResponse struct { + // Response for the ListNetworkInterface API service call. + InterfaceListResult +} + +// InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse contains the response from method InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager. +type InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse struct { + // Response for list ip configurations API service call. + InterfaceIPConfigurationListResult +} + +// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse contains the response from method InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager. +type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse struct { + // Response for the ListNetworkInterface API service call. + InterfaceListResult +} + +// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse contains the response from method InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager. +type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse struct { + // Response for the ListNetworkInterface API service call. + InterfaceListResult +} + +// InterfacesClientUpdateTagsResponse contains the response from method InterfacesClient.UpdateTags. +type InterfacesClientUpdateTagsResponse struct { + // A network interface in a resource group. + Interface +} + +// IpamPoolsClientCreateResponse contains the response from method IpamPoolsClient.BeginCreate. +type IpamPoolsClientCreateResponse struct { + // Instance of Pool resource. + IpamPool +} + +// IpamPoolsClientDeleteResponse contains the response from method IpamPoolsClient.BeginDelete. +type IpamPoolsClientDeleteResponse struct { + // placeholder for future response values +} + +// IpamPoolsClientGetPoolUsageResponse contains the response from method IpamPoolsClient.GetPoolUsage. +type IpamPoolsClientGetPoolUsageResponse struct { + // IpamPool usage information. + PoolUsage +} + +// IpamPoolsClientGetResponse contains the response from method IpamPoolsClient.Get. +type IpamPoolsClientGetResponse struct { + // Instance of Pool resource. + IpamPool +} + +// IpamPoolsClientListAssociatedResourcesResponse contains the response from method IpamPoolsClient.NewListAssociatedResourcesPager. +type IpamPoolsClientListAssociatedResourcesResponse struct { + // List of PoolAssociation + PoolAssociationList +} + +// IpamPoolsClientListResponse contains the response from method IpamPoolsClient.NewListPager. +type IpamPoolsClientListResponse struct { + // List of IpamPool + IpamPoolList +} + +// IpamPoolsClientUpdateResponse contains the response from method IpamPoolsClient.Update. +type IpamPoolsClientUpdateResponse struct { + // Instance of Pool resource. + IpamPool +} + +// LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse contains the response from method LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate. +type LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse struct { + // Pool of backend IP addresses. + BackendAddressPool +} + +// LoadBalancerBackendAddressPoolsClientDeleteResponse contains the response from method LoadBalancerBackendAddressPoolsClient.BeginDelete. +type LoadBalancerBackendAddressPoolsClientDeleteResponse struct { + // placeholder for future response values +} + +// LoadBalancerBackendAddressPoolsClientGetResponse contains the response from method LoadBalancerBackendAddressPoolsClient.Get. +type LoadBalancerBackendAddressPoolsClientGetResponse struct { + // Pool of backend IP addresses. + BackendAddressPool +} + +// LoadBalancerBackendAddressPoolsClientListResponse contains the response from method LoadBalancerBackendAddressPoolsClient.NewListPager. +type LoadBalancerBackendAddressPoolsClientListResponse struct { + // Response for ListBackendAddressPool API service call. + LoadBalancerBackendAddressPoolListResult +} + +// LoadBalancerFrontendIPConfigurationsClientGetResponse contains the response from method LoadBalancerFrontendIPConfigurationsClient.Get. +type LoadBalancerFrontendIPConfigurationsClientGetResponse struct { + // Frontend IP address of the load balancer. + FrontendIPConfiguration +} + +// LoadBalancerFrontendIPConfigurationsClientListResponse contains the response from method LoadBalancerFrontendIPConfigurationsClient.NewListPager. +type LoadBalancerFrontendIPConfigurationsClientListResponse struct { + // Response for ListFrontendIPConfiguration API service call. + LoadBalancerFrontendIPConfigurationListResult +} + +// LoadBalancerLoadBalancingRulesClientGetResponse contains the response from method LoadBalancerLoadBalancingRulesClient.Get. +type LoadBalancerLoadBalancingRulesClientGetResponse struct { + // A load balancing rule for a load balancer. + LoadBalancingRule +} + +// LoadBalancerLoadBalancingRulesClientHealthResponse contains the response from method LoadBalancerLoadBalancingRulesClient.BeginHealth. +type LoadBalancerLoadBalancingRulesClientHealthResponse struct { + // The response for a Health API. + LoadBalancerHealthPerRule +} + +// LoadBalancerLoadBalancingRulesClientListResponse contains the response from method LoadBalancerLoadBalancingRulesClient.NewListPager. +type LoadBalancerLoadBalancingRulesClientListResponse struct { + // Response for ListLoadBalancingRule API service call. + LoadBalancerLoadBalancingRuleListResult +} + +// LoadBalancerNetworkInterfacesClientListResponse contains the response from method LoadBalancerNetworkInterfacesClient.NewListPager. +type LoadBalancerNetworkInterfacesClientListResponse struct { + // Response for the ListNetworkInterface API service call. + InterfaceListResult +} + +// LoadBalancerOutboundRulesClientGetResponse contains the response from method LoadBalancerOutboundRulesClient.Get. +type LoadBalancerOutboundRulesClientGetResponse struct { + // Outbound rule of the load balancer. + OutboundRule +} + +// LoadBalancerOutboundRulesClientListResponse contains the response from method LoadBalancerOutboundRulesClient.NewListPager. +type LoadBalancerOutboundRulesClientListResponse struct { + // Response for ListOutboundRule API service call. + LoadBalancerOutboundRuleListResult +} + +// LoadBalancerProbesClientGetResponse contains the response from method LoadBalancerProbesClient.Get. +type LoadBalancerProbesClientGetResponse struct { + // A load balancer probe. + Probe +} + +// LoadBalancerProbesClientListResponse contains the response from method LoadBalancerProbesClient.NewListPager. +type LoadBalancerProbesClientListResponse struct { + // Response for ListProbe API service call. + LoadBalancerProbeListResult +} + +// LoadBalancersClientCreateOrUpdateResponse contains the response from method LoadBalancersClient.BeginCreateOrUpdate. +type LoadBalancersClientCreateOrUpdateResponse struct { + // LoadBalancer resource. + LoadBalancer +} + +// LoadBalancersClientDeleteResponse contains the response from method LoadBalancersClient.BeginDelete. +type LoadBalancersClientDeleteResponse struct { + // placeholder for future response values +} + +// LoadBalancersClientGetResponse contains the response from method LoadBalancersClient.Get. +type LoadBalancersClientGetResponse struct { + // LoadBalancer resource. + LoadBalancer +} + +// LoadBalancersClientListAllResponse contains the response from method LoadBalancersClient.NewListAllPager. +type LoadBalancersClientListAllResponse struct { + // Response for ListLoadBalancers API service call. + LoadBalancerListResult +} + +// LoadBalancersClientListInboundNatRulePortMappingsResponse contains the response from method LoadBalancersClient.BeginListInboundNatRulePortMappings. +type LoadBalancersClientListInboundNatRulePortMappingsResponse struct { + // The response for a QueryInboundNatRulePortMapping API. + BackendAddressInboundNatRulePortMappings +} + +// LoadBalancersClientListResponse contains the response from method LoadBalancersClient.NewListPager. +type LoadBalancersClientListResponse struct { + // Response for ListLoadBalancers API service call. + LoadBalancerListResult +} + +// LoadBalancersClientMigrateToIPBasedResponse contains the response from method LoadBalancersClient.MigrateToIPBased. +type LoadBalancersClientMigrateToIPBasedResponse struct { + // The response for a migrateToIpBased API. + MigratedPools +} + +// LoadBalancersClientSwapPublicIPAddressesResponse contains the response from method LoadBalancersClient.BeginSwapPublicIPAddresses. +type LoadBalancersClientSwapPublicIPAddressesResponse struct { + // placeholder for future response values +} + +// LoadBalancersClientUpdateTagsResponse contains the response from method LoadBalancersClient.UpdateTags. +type LoadBalancersClientUpdateTagsResponse struct { + // LoadBalancer resource. + LoadBalancer +} + +// LocalNetworkGatewaysClientCreateOrUpdateResponse contains the response from method LocalNetworkGatewaysClient.BeginCreateOrUpdate. +type LocalNetworkGatewaysClientCreateOrUpdateResponse struct { + // A common class for general resource information. + LocalNetworkGateway +} + +// LocalNetworkGatewaysClientDeleteResponse contains the response from method LocalNetworkGatewaysClient.BeginDelete. +type LocalNetworkGatewaysClientDeleteResponse struct { + // placeholder for future response values +} + +// LocalNetworkGatewaysClientGetResponse contains the response from method LocalNetworkGatewaysClient.Get. +type LocalNetworkGatewaysClientGetResponse struct { + // A common class for general resource information. + LocalNetworkGateway +} + +// LocalNetworkGatewaysClientListResponse contains the response from method LocalNetworkGatewaysClient.NewListPager. +type LocalNetworkGatewaysClientListResponse struct { + // Response for ListLocalNetworkGateways API service call. + LocalNetworkGatewayListResult +} + +// LocalNetworkGatewaysClientUpdateTagsResponse contains the response from method LocalNetworkGatewaysClient.UpdateTags. +type LocalNetworkGatewaysClientUpdateTagsResponse struct { + // A common class for general resource information. + LocalNetworkGateway +} + +// ManagementClientCheckDNSNameAvailabilityResponse contains the response from method ManagementClient.CheckDNSNameAvailability. +type ManagementClientCheckDNSNameAvailabilityResponse struct { + // Response for the CheckDnsNameAvailability API service call. + DNSNameAvailabilityResult +} + +// ManagementClientDeleteBastionShareableLinkByTokenResponse contains the response from method ManagementClient.BeginDeleteBastionShareableLinkByToken. +type ManagementClientDeleteBastionShareableLinkByTokenResponse struct { + // placeholder for future response values +} + +// ManagementClientDeleteBastionShareableLinkResponse contains the response from method ManagementClient.BeginDeleteBastionShareableLink. +type ManagementClientDeleteBastionShareableLinkResponse struct { + // placeholder for future response values +} + +// ManagementClientDisconnectActiveSessionsResponse contains the response from method ManagementClient.NewDisconnectActiveSessionsPager. +type ManagementClientDisconnectActiveSessionsResponse struct { + // Response for DisconnectActiveSessions. + BastionSessionDeleteResult +} + +// ManagementClientExpressRouteProviderPortResponse contains the response from method ManagementClient.ExpressRouteProviderPort. +type ManagementClientExpressRouteProviderPortResponse struct { + // ExpressRouteProviderPort resource. + ExpressRouteProviderPort +} + +// ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse contains the response from method ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile. +type ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse struct { + // Vpn Profile Response for package generation. + VPNProfileResponse +} + +// ManagementClientGetActiveSessionsResponse contains the response from method ManagementClient.BeginGetActiveSessions. +type ManagementClientGetActiveSessionsResponse struct { + // Response for GetActiveSessions. + BastionActiveSessionListResult +} + +// ManagementClientGetBastionShareableLinkResponse contains the response from method ManagementClient.NewGetBastionShareableLinkPager. +type ManagementClientGetBastionShareableLinkResponse struct { + // Response for all the Bastion Shareable Link endpoints. + BastionShareableLinkListResult +} + +// ManagementClientListActiveConnectivityConfigurationsResponse contains the response from method ManagementClient.ListActiveConnectivityConfigurations. +type ManagementClientListActiveConnectivityConfigurationsResponse struct { + // Result of the request to list active connectivity configurations. It contains a list of active connectivity configurations + // and a skiptoken to get the next set of results. + ActiveConnectivityConfigurationsListResult +} + +// ManagementClientListActiveSecurityAdminRulesResponse contains the response from method ManagementClient.ListActiveSecurityAdminRules. +type ManagementClientListActiveSecurityAdminRulesResponse struct { + // Result of the request to list active security admin rules. It contains a list of active security admin rules and a skiptoken + // to get the next set of results. + ActiveSecurityAdminRulesListResult +} + +// ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse contains the response from method ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations. +type ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse struct { + // Result of the request to list networkManagerEffectiveConnectivityConfiguration. It contains a list of groups and a skiptoken + // to get the next set of results. + ManagerEffectiveConnectivityConfigurationListResult +} + +// ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse contains the response from method ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules. +type ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse struct { + // Result of the request to list networkManagerEffectiveSecurityAdminRules. It contains a list of groups and a skiptoken to + // get the next set of results. + ManagerEffectiveSecurityAdminRulesListResult +} + +// ManagementClientPutBastionShareableLinkResponse contains the response from method ManagementClient.BeginPutBastionShareableLink. +type ManagementClientPutBastionShareableLinkResponse struct { + // Response for all the Bastion Shareable Link endpoints. + BastionShareableLinkListResult +} + +// ManagementClientSupportedSecurityProvidersResponse contains the response from method ManagementClient.SupportedSecurityProviders. +type ManagementClientSupportedSecurityProvidersResponse struct { + // Collection of SecurityProviders. + VirtualWanSecurityProviders +} + +// ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate. +type ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse struct { + // The Network Manager Connection resource + ManagerConnection +} + +// ManagementGroupNetworkManagerConnectionsClientDeleteResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.Delete. +type ManagementGroupNetworkManagerConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagementGroupNetworkManagerConnectionsClientGetResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.Get. +type ManagementGroupNetworkManagerConnectionsClientGetResponse struct { + // The Network Manager Connection resource + ManagerConnection +} + +// ManagementGroupNetworkManagerConnectionsClientListResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.NewListPager. +type ManagementGroupNetworkManagerConnectionsClientListResponse struct { + // List of network manager connections. + ManagerConnectionListResult +} + +// ManagerCommitsClientPostResponse contains the response from method ManagerCommitsClient.BeginPost. +type ManagerCommitsClientPostResponse struct { + // Network Manager Commit. + ManagerCommit +} + +// ManagerDeploymentStatusClientListResponse contains the response from method ManagerDeploymentStatusClient.List. +type ManagerDeploymentStatusClientListResponse struct { + // A list of Network Manager Deployment Status + ManagerDeploymentStatusListResult +} + +// ManagerRoutingConfigurationsClientCreateOrUpdateResponse contains the response from method ManagerRoutingConfigurationsClient.CreateOrUpdate. +type ManagerRoutingConfigurationsClientCreateOrUpdateResponse struct { + // Defines the routing configuration + ManagerRoutingConfiguration +} + +// ManagerRoutingConfigurationsClientDeleteResponse contains the response from method ManagerRoutingConfigurationsClient.BeginDelete. +type ManagerRoutingConfigurationsClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagerRoutingConfigurationsClientGetResponse contains the response from method ManagerRoutingConfigurationsClient.Get. +type ManagerRoutingConfigurationsClientGetResponse struct { + // Defines the routing configuration + ManagerRoutingConfiguration +} + +// ManagerRoutingConfigurationsClientListResponse contains the response from method ManagerRoutingConfigurationsClient.NewListPager. +type ManagerRoutingConfigurationsClientListResponse struct { + // A list of network manager routing configurations + ManagerRoutingConfigurationListResult +} + +// ManagersClientCreateOrUpdateResponse contains the response from method ManagersClient.CreateOrUpdate. +type ManagersClientCreateOrUpdateResponse struct { + // The Managed Network resource + Manager +} + +// ManagersClientDeleteResponse contains the response from method ManagersClient.BeginDelete. +type ManagersClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagersClientGetResponse contains the response from method ManagersClient.Get. +type ManagersClientGetResponse struct { + // The Managed Network resource + Manager +} + +// ManagersClientListBySubscriptionResponse contains the response from method ManagersClient.NewListBySubscriptionPager. +type ManagersClientListBySubscriptionResponse struct { + // Result of the request to list NetworkManager. It contains a list of network managers and a URL link to get the next set + // of results. + ManagerListResult +} + +// ManagersClientListResponse contains the response from method ManagersClient.NewListPager. +type ManagersClientListResponse struct { + // Result of the request to list NetworkManager. It contains a list of network managers and a URL link to get the next set + // of results. + ManagerListResult +} + +// ManagersClientPatchResponse contains the response from method ManagersClient.Patch. +type ManagersClientPatchResponse struct { + // The Managed Network resource + Manager +} + +// NatGatewaysClientCreateOrUpdateResponse contains the response from method NatGatewaysClient.BeginCreateOrUpdate. +type NatGatewaysClientCreateOrUpdateResponse struct { + // Nat Gateway resource. + NatGateway +} + +// NatGatewaysClientDeleteResponse contains the response from method NatGatewaysClient.BeginDelete. +type NatGatewaysClientDeleteResponse struct { + // placeholder for future response values +} + +// NatGatewaysClientGetResponse contains the response from method NatGatewaysClient.Get. +type NatGatewaysClientGetResponse struct { + // Nat Gateway resource. + NatGateway +} + +// NatGatewaysClientListAllResponse contains the response from method NatGatewaysClient.NewListAllPager. +type NatGatewaysClientListAllResponse struct { + // Response for ListNatGateways API service call. + NatGatewayListResult +} + +// NatGatewaysClientListResponse contains the response from method NatGatewaysClient.NewListPager. +type NatGatewaysClientListResponse struct { + // Response for ListNatGateways API service call. + NatGatewayListResult +} + +// NatGatewaysClientUpdateTagsResponse contains the response from method NatGatewaysClient.UpdateTags. +type NatGatewaysClientUpdateTagsResponse struct { + // Nat Gateway resource. + NatGateway +} + +// NatRulesClientCreateOrUpdateResponse contains the response from method NatRulesClient.BeginCreateOrUpdate. +type NatRulesClientCreateOrUpdateResponse struct { + // VpnGatewayNatRule Resource. + VPNGatewayNatRule +} + +// NatRulesClientDeleteResponse contains the response from method NatRulesClient.BeginDelete. +type NatRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// NatRulesClientGetResponse contains the response from method NatRulesClient.Get. +type NatRulesClientGetResponse struct { + // VpnGatewayNatRule Resource. + VPNGatewayNatRule +} + +// NatRulesClientListByVPNGatewayResponse contains the response from method NatRulesClient.NewListByVPNGatewayPager. +type NatRulesClientListByVPNGatewayResponse struct { + // Result of the request to list all nat rules to a virtual wan vpn gateway. It contains a list of Nat rules and a URL nextLink + // to get the next set of results. + ListVPNGatewayNatRulesResult +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of + // results. + OperationListResult +} + +// P2SVPNGatewaysClientCreateOrUpdateResponse contains the response from method P2SVPNGatewaysClient.BeginCreateOrUpdate. +type P2SVPNGatewaysClientCreateOrUpdateResponse struct { + // P2SVpnGateway Resource. + P2SVPNGateway +} + +// P2SVPNGatewaysClientDeleteResponse contains the response from method P2SVPNGatewaysClient.BeginDelete. +type P2SVPNGatewaysClientDeleteResponse struct { + // placeholder for future response values +} + +// P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse contains the response from method P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections. +type P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse struct { + // placeholder for future response values +} + +// P2SVPNGatewaysClientGenerateVPNProfileResponse contains the response from method P2SVPNGatewaysClient.BeginGenerateVPNProfile. +type P2SVPNGatewaysClientGenerateVPNProfileResponse struct { + // Vpn Profile Response for package generation. + VPNProfileResponse +} + +// P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse contains the response from method P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed. +type P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse struct { + // P2S Vpn connection detailed health written to sas url. + P2SVPNConnectionHealth +} + +// P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse contains the response from method P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth. +type P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse struct { + // P2SVpnGateway Resource. + P2SVPNGateway +} + +// P2SVPNGatewaysClientGetResponse contains the response from method P2SVPNGatewaysClient.Get. +type P2SVPNGatewaysClientGetResponse struct { + // P2SVpnGateway Resource. + P2SVPNGateway +} + +// P2SVPNGatewaysClientListByResourceGroupResponse contains the response from method P2SVPNGatewaysClient.NewListByResourceGroupPager. +type P2SVPNGatewaysClientListByResourceGroupResponse struct { + // Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL nextLink to get the next set + // of results. + ListP2SVPNGatewaysResult +} + +// P2SVPNGatewaysClientListResponse contains the response from method P2SVPNGatewaysClient.NewListPager. +type P2SVPNGatewaysClientListResponse struct { + // Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL nextLink to get the next set + // of results. + ListP2SVPNGatewaysResult +} + +// P2SVPNGatewaysClientResetResponse contains the response from method P2SVPNGatewaysClient.BeginReset. +type P2SVPNGatewaysClientResetResponse struct { + // P2SVpnGateway Resource. + P2SVPNGateway +} + +// P2SVPNGatewaysClientUpdateTagsResponse contains the response from method P2SVPNGatewaysClient.BeginUpdateTags. +type P2SVPNGatewaysClientUpdateTagsResponse struct { + // P2SVpnGateway Resource. + P2SVPNGateway +} + +// PacketCapturesClientCreateResponse contains the response from method PacketCapturesClient.BeginCreate. +type PacketCapturesClientCreateResponse struct { + // Information about packet capture session. + PacketCaptureResult +} + +// PacketCapturesClientDeleteResponse contains the response from method PacketCapturesClient.BeginDelete. +type PacketCapturesClientDeleteResponse struct { + // placeholder for future response values +} + +// PacketCapturesClientGetResponse contains the response from method PacketCapturesClient.Get. +type PacketCapturesClientGetResponse struct { + // Information about packet capture session. + PacketCaptureResult +} + +// PacketCapturesClientGetStatusResponse contains the response from method PacketCapturesClient.BeginGetStatus. +type PacketCapturesClientGetStatusResponse struct { + // Status of packet capture session. + PacketCaptureQueryStatusResult +} + +// PacketCapturesClientListResponse contains the response from method PacketCapturesClient.NewListPager. +type PacketCapturesClientListResponse struct { + // List of packet capture sessions. + PacketCaptureListResult +} + +// PacketCapturesClientStopResponse contains the response from method PacketCapturesClient.BeginStop. +type PacketCapturesClientStopResponse struct { + // placeholder for future response values +} + +// PeerExpressRouteCircuitConnectionsClientGetResponse contains the response from method PeerExpressRouteCircuitConnectionsClient.Get. +type PeerExpressRouteCircuitConnectionsClientGetResponse struct { + // Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + PeerExpressRouteCircuitConnection +} + +// PeerExpressRouteCircuitConnectionsClientListResponse contains the response from method PeerExpressRouteCircuitConnectionsClient.NewListPager. +type PeerExpressRouteCircuitConnectionsClientListResponse struct { + // Response for ListPeeredConnections API service call retrieves all global reach peer circuit connections that belongs to + // a Private Peering for an ExpressRouteCircuit. + PeerExpressRouteCircuitConnectionListResult +} + +// PrivateDNSZoneGroupsClientCreateOrUpdateResponse contains the response from method PrivateDNSZoneGroupsClient.BeginCreateOrUpdate. +type PrivateDNSZoneGroupsClientCreateOrUpdateResponse struct { + // Private dns zone group resource. + PrivateDNSZoneGroup +} + +// PrivateDNSZoneGroupsClientDeleteResponse contains the response from method PrivateDNSZoneGroupsClient.BeginDelete. +type PrivateDNSZoneGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// PrivateDNSZoneGroupsClientGetResponse contains the response from method PrivateDNSZoneGroupsClient.Get. +type PrivateDNSZoneGroupsClientGetResponse struct { + // Private dns zone group resource. + PrivateDNSZoneGroup +} + +// PrivateDNSZoneGroupsClientListResponse contains the response from method PrivateDNSZoneGroupsClient.NewListPager. +type PrivateDNSZoneGroupsClientListResponse struct { + // Response for the ListPrivateDnsZoneGroups API service call. + PrivateDNSZoneGroupListResult +} + +// PrivateEndpointsClientCreateOrUpdateResponse contains the response from method PrivateEndpointsClient.BeginCreateOrUpdate. +type PrivateEndpointsClientCreateOrUpdateResponse struct { + // Private endpoint resource. + PrivateEndpoint +} + +// PrivateEndpointsClientDeleteResponse contains the response from method PrivateEndpointsClient.BeginDelete. +type PrivateEndpointsClientDeleteResponse struct { + // placeholder for future response values +} + +// PrivateEndpointsClientGetResponse contains the response from method PrivateEndpointsClient.Get. +type PrivateEndpointsClientGetResponse struct { + // Private endpoint resource. + PrivateEndpoint +} + +// PrivateEndpointsClientListBySubscriptionResponse contains the response from method PrivateEndpointsClient.NewListBySubscriptionPager. +type PrivateEndpointsClientListBySubscriptionResponse struct { + // Response for the ListPrivateEndpoints API service call. + PrivateEndpointListResult +} + +// PrivateEndpointsClientListResponse contains the response from method PrivateEndpointsClient.NewListPager. +type PrivateEndpointsClientListResponse struct { + // Response for the ListPrivateEndpoints API service call. + PrivateEndpointListResult +} + +// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse contains the response from method PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup. +type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse struct { + // Response for the CheckPrivateLinkServiceVisibility API service call. + PrivateLinkServiceVisibility +} + +// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse contains the response from method PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility. +type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse struct { + // Response for the CheckPrivateLinkServiceVisibility API service call. + PrivateLinkServiceVisibility +} + +// PrivateLinkServicesClientCreateOrUpdateResponse contains the response from method PrivateLinkServicesClient.BeginCreateOrUpdate. +type PrivateLinkServicesClientCreateOrUpdateResponse struct { + // Private link service resource. + PrivateLinkService +} + +// PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection. +type PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse struct { + // placeholder for future response values +} + +// PrivateLinkServicesClientDeleteResponse contains the response from method PrivateLinkServicesClient.BeginDelete. +type PrivateLinkServicesClientDeleteResponse struct { + // placeholder for future response values +} + +// PrivateLinkServicesClientGetPrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.GetPrivateEndpointConnection. +type PrivateLinkServicesClientGetPrivateEndpointConnectionResponse struct { + // PrivateEndpointConnection resource. + PrivateEndpointConnection +} + +// PrivateLinkServicesClientGetResponse contains the response from method PrivateLinkServicesClient.Get. +type PrivateLinkServicesClientGetResponse struct { + // Private link service resource. + PrivateLinkService +} + +// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse contains the response from method PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager. +type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse struct { + // An array of private link service id that can be linked to a private end point with auto approved. + AutoApprovedPrivateLinkServicesResult +} + +// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse contains the response from method PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager. +type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse struct { + // An array of private link service id that can be linked to a private end point with auto approved. + AutoApprovedPrivateLinkServicesResult +} + +// PrivateLinkServicesClientListBySubscriptionResponse contains the response from method PrivateLinkServicesClient.NewListBySubscriptionPager. +type PrivateLinkServicesClientListBySubscriptionResponse struct { + // Response for the ListPrivateLinkService API service call. + PrivateLinkServiceListResult +} + +// PrivateLinkServicesClientListPrivateEndpointConnectionsResponse contains the response from method PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager. +type PrivateLinkServicesClientListPrivateEndpointConnectionsResponse struct { + // Response for the ListPrivateEndpointConnection API service call. + PrivateEndpointConnectionListResult +} + +// PrivateLinkServicesClientListResponse contains the response from method PrivateLinkServicesClient.NewListPager. +type PrivateLinkServicesClientListResponse struct { + // Response for the ListPrivateLinkService API service call. + PrivateLinkServiceListResult +} + +// PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.UpdatePrivateEndpointConnection. +type PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse struct { + // PrivateEndpointConnection resource. + PrivateEndpointConnection +} + +// ProfilesClientCreateOrUpdateResponse contains the response from method ProfilesClient.CreateOrUpdate. +type ProfilesClientCreateOrUpdateResponse struct { + // Network profile resource. + Profile +} + +// ProfilesClientDeleteResponse contains the response from method ProfilesClient.BeginDelete. +type ProfilesClientDeleteResponse struct { + // placeholder for future response values +} + +// ProfilesClientGetResponse contains the response from method ProfilesClient.Get. +type ProfilesClientGetResponse struct { + // Network profile resource. + Profile +} + +// ProfilesClientListAllResponse contains the response from method ProfilesClient.NewListAllPager. +type ProfilesClientListAllResponse struct { + // Response for ListNetworkProfiles API service call. + ProfileListResult +} + +// ProfilesClientListResponse contains the response from method ProfilesClient.NewListPager. +type ProfilesClientListResponse struct { + // Response for ListNetworkProfiles API service call. + ProfileListResult +} + +// ProfilesClientUpdateTagsResponse contains the response from method ProfilesClient.UpdateTags. +type ProfilesClientUpdateTagsResponse struct { + // Network profile resource. + Profile +} + +// PublicIPAddressesClientCreateOrUpdateResponse contains the response from method PublicIPAddressesClient.BeginCreateOrUpdate. +type PublicIPAddressesClientCreateOrUpdateResponse struct { + // Public IP address resource. + PublicIPAddress +} + +// PublicIPAddressesClientDdosProtectionStatusResponse contains the response from method PublicIPAddressesClient.BeginDdosProtectionStatus. +type PublicIPAddressesClientDdosProtectionStatusResponse struct { + // Response for GetPublicIpAddressDdosProtectionStatusOperation API service call. + PublicIPDdosProtectionStatusResult +} + +// PublicIPAddressesClientDeleteResponse contains the response from method PublicIPAddressesClient.BeginDelete. +type PublicIPAddressesClientDeleteResponse struct { + // placeholder for future response values +} + +// PublicIPAddressesClientGetCloudServicePublicIPAddressResponse contains the response from method PublicIPAddressesClient.GetCloudServicePublicIPAddress. +type PublicIPAddressesClientGetCloudServicePublicIPAddressResponse struct { + // Public IP address resource. + PublicIPAddress +} + +// PublicIPAddressesClientGetResponse contains the response from method PublicIPAddressesClient.Get. +type PublicIPAddressesClientGetResponse struct { + // Public IP address resource. + PublicIPAddress +} + +// PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse contains the response from method PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress. +type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse struct { + // Public IP address resource. + PublicIPAddress +} + +// PublicIPAddressesClientListAllResponse contains the response from method PublicIPAddressesClient.NewListAllPager. +type PublicIPAddressesClientListAllResponse struct { + // Response for ListPublicIpAddresses API service call. + PublicIPAddressListResult +} + +// PublicIPAddressesClientListCloudServicePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager. +type PublicIPAddressesClientListCloudServicePublicIPAddressesResponse struct { + // Response for ListPublicIpAddresses API service call. + PublicIPAddressListResult +} + +// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager. +type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse struct { + // Response for ListPublicIpAddresses API service call. + PublicIPAddressListResult +} + +// PublicIPAddressesClientListResponse contains the response from method PublicIPAddressesClient.NewListPager. +type PublicIPAddressesClientListResponse struct { + // Response for ListPublicIpAddresses API service call. + PublicIPAddressListResult +} + +// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager. +type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse struct { + // Response for ListPublicIpAddresses API service call. + PublicIPAddressListResult +} + +// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager. +type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse struct { + // Response for ListPublicIpAddresses API service call. + PublicIPAddressListResult +} + +// PublicIPAddressesClientUpdateTagsResponse contains the response from method PublicIPAddressesClient.UpdateTags. +type PublicIPAddressesClientUpdateTagsResponse struct { + // Public IP address resource. + PublicIPAddress +} + +// PublicIPPrefixesClientCreateOrUpdateResponse contains the response from method PublicIPPrefixesClient.BeginCreateOrUpdate. +type PublicIPPrefixesClientCreateOrUpdateResponse struct { + // Public IP prefix resource. + PublicIPPrefix +} + +// PublicIPPrefixesClientDeleteResponse contains the response from method PublicIPPrefixesClient.BeginDelete. +type PublicIPPrefixesClientDeleteResponse struct { + // placeholder for future response values +} + +// PublicIPPrefixesClientGetResponse contains the response from method PublicIPPrefixesClient.Get. +type PublicIPPrefixesClientGetResponse struct { + // Public IP prefix resource. + PublicIPPrefix +} + +// PublicIPPrefixesClientListAllResponse contains the response from method PublicIPPrefixesClient.NewListAllPager. +type PublicIPPrefixesClientListAllResponse struct { + // Response for ListPublicIpPrefixes API service call. + PublicIPPrefixListResult +} + +// PublicIPPrefixesClientListResponse contains the response from method PublicIPPrefixesClient.NewListPager. +type PublicIPPrefixesClientListResponse struct { + // Response for ListPublicIpPrefixes API service call. + PublicIPPrefixListResult +} + +// PublicIPPrefixesClientUpdateTagsResponse contains the response from method PublicIPPrefixesClient.UpdateTags. +type PublicIPPrefixesClientUpdateTagsResponse struct { + // Public IP prefix resource. + PublicIPPrefix +} + +// ReachabilityAnalysisIntentsClientCreateResponse contains the response from method ReachabilityAnalysisIntentsClient.Create. +type ReachabilityAnalysisIntentsClientCreateResponse struct { + // Configuration information or intent on which to do the analysis on. + ReachabilityAnalysisIntent +} + +// ReachabilityAnalysisIntentsClientDeleteResponse contains the response from method ReachabilityAnalysisIntentsClient.Delete. +type ReachabilityAnalysisIntentsClientDeleteResponse struct { + // placeholder for future response values +} + +// ReachabilityAnalysisIntentsClientGetResponse contains the response from method ReachabilityAnalysisIntentsClient.Get. +type ReachabilityAnalysisIntentsClientGetResponse struct { + // Configuration information or intent on which to do the analysis on. + ReachabilityAnalysisIntent +} + +// ReachabilityAnalysisIntentsClientListResponse contains the response from method ReachabilityAnalysisIntentsClient.NewListPager. +type ReachabilityAnalysisIntentsClientListResponse struct { + // A list of Reachability Analysis Intents. + ReachabilityAnalysisIntentListResult +} + +// ReachabilityAnalysisRunsClientCreateResponse contains the response from method ReachabilityAnalysisRunsClient.Create. +type ReachabilityAnalysisRunsClientCreateResponse struct { + // Configuration information for analysis run. + ReachabilityAnalysisRun +} + +// ReachabilityAnalysisRunsClientDeleteResponse contains the response from method ReachabilityAnalysisRunsClient.BeginDelete. +type ReachabilityAnalysisRunsClientDeleteResponse struct { + // placeholder for future response values +} + +// ReachabilityAnalysisRunsClientGetResponse contains the response from method ReachabilityAnalysisRunsClient.Get. +type ReachabilityAnalysisRunsClientGetResponse struct { + // Configuration information for analysis run. + ReachabilityAnalysisRun +} + +// ReachabilityAnalysisRunsClientListResponse contains the response from method ReachabilityAnalysisRunsClient.NewListPager. +type ReachabilityAnalysisRunsClientListResponse struct { + // A list of Reachability Analysis Run + ReachabilityAnalysisRunListResult +} + +// ResourceNavigationLinksClientListResponse contains the response from method ResourceNavigationLinksClient.List. +type ResourceNavigationLinksClientListResponse struct { + // Response for ResourceNavigationLinks_List operation. + ResourceNavigationLinksListResult +} + +// RouteFilterRulesClientCreateOrUpdateResponse contains the response from method RouteFilterRulesClient.BeginCreateOrUpdate. +type RouteFilterRulesClientCreateOrUpdateResponse struct { + // Route Filter Rule Resource. + RouteFilterRule +} + +// RouteFilterRulesClientDeleteResponse contains the response from method RouteFilterRulesClient.BeginDelete. +type RouteFilterRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// RouteFilterRulesClientGetResponse contains the response from method RouteFilterRulesClient.Get. +type RouteFilterRulesClientGetResponse struct { + // Route Filter Rule Resource. + RouteFilterRule +} + +// RouteFilterRulesClientListByRouteFilterResponse contains the response from method RouteFilterRulesClient.NewListByRouteFilterPager. +type RouteFilterRulesClientListByRouteFilterResponse struct { + // Response for the ListRouteFilterRules API service call. + RouteFilterRuleListResult +} + +// RouteFiltersClientCreateOrUpdateResponse contains the response from method RouteFiltersClient.BeginCreateOrUpdate. +type RouteFiltersClientCreateOrUpdateResponse struct { + // Route Filter Resource. + RouteFilter +} + +// RouteFiltersClientDeleteResponse contains the response from method RouteFiltersClient.BeginDelete. +type RouteFiltersClientDeleteResponse struct { + // placeholder for future response values +} + +// RouteFiltersClientGetResponse contains the response from method RouteFiltersClient.Get. +type RouteFiltersClientGetResponse struct { + // Route Filter Resource. + RouteFilter +} + +// RouteFiltersClientListByResourceGroupResponse contains the response from method RouteFiltersClient.NewListByResourceGroupPager. +type RouteFiltersClientListByResourceGroupResponse struct { + // Response for the ListRouteFilters API service call. + RouteFilterListResult +} + +// RouteFiltersClientListResponse contains the response from method RouteFiltersClient.NewListPager. +type RouteFiltersClientListResponse struct { + // Response for the ListRouteFilters API service call. + RouteFilterListResult +} + +// RouteFiltersClientUpdateTagsResponse contains the response from method RouteFiltersClient.UpdateTags. +type RouteFiltersClientUpdateTagsResponse struct { + // Route Filter Resource. + RouteFilter +} + +// RouteMapsClientCreateOrUpdateResponse contains the response from method RouteMapsClient.BeginCreateOrUpdate. +type RouteMapsClientCreateOrUpdateResponse struct { + // The RouteMap child resource of a Virtual hub. + RouteMap +} + +// RouteMapsClientDeleteResponse contains the response from method RouteMapsClient.BeginDelete. +type RouteMapsClientDeleteResponse struct { + // placeholder for future response values +} + +// RouteMapsClientGetResponse contains the response from method RouteMapsClient.Get. +type RouteMapsClientGetResponse struct { + // The RouteMap child resource of a Virtual hub. + RouteMap +} + +// RouteMapsClientListResponse contains the response from method RouteMapsClient.NewListPager. +type RouteMapsClientListResponse struct { + // List of RouteMaps and a URL nextLink to get the next set of results. + ListRouteMapsResult +} + +// RouteTablesClientCreateOrUpdateResponse contains the response from method RouteTablesClient.BeginCreateOrUpdate. +type RouteTablesClientCreateOrUpdateResponse struct { + // Route table resource. + RouteTable +} + +// RouteTablesClientDeleteResponse contains the response from method RouteTablesClient.BeginDelete. +type RouteTablesClientDeleteResponse struct { + // placeholder for future response values +} + +// RouteTablesClientGetResponse contains the response from method RouteTablesClient.Get. +type RouteTablesClientGetResponse struct { + // Route table resource. + RouteTable +} + +// RouteTablesClientListAllResponse contains the response from method RouteTablesClient.NewListAllPager. +type RouteTablesClientListAllResponse struct { + // Response for the ListRouteTable API service call. + RouteTableListResult +} + +// RouteTablesClientListResponse contains the response from method RouteTablesClient.NewListPager. +type RouteTablesClientListResponse struct { + // Response for the ListRouteTable API service call. + RouteTableListResult +} + +// RouteTablesClientUpdateTagsResponse contains the response from method RouteTablesClient.UpdateTags. +type RouteTablesClientUpdateTagsResponse struct { + // Route table resource. + RouteTable +} + +// RoutesClientCreateOrUpdateResponse contains the response from method RoutesClient.BeginCreateOrUpdate. +type RoutesClientCreateOrUpdateResponse struct { + // Route resource. + Route +} + +// RoutesClientDeleteResponse contains the response from method RoutesClient.BeginDelete. +type RoutesClientDeleteResponse struct { + // placeholder for future response values +} + +// RoutesClientGetResponse contains the response from method RoutesClient.Get. +type RoutesClientGetResponse struct { + // Route resource. + Route +} + +// RoutesClientListResponse contains the response from method RoutesClient.NewListPager. +type RoutesClientListResponse struct { + // Response for the ListRoute API service call. + RouteListResult +} + +// RoutingIntentClientCreateOrUpdateResponse contains the response from method RoutingIntentClient.BeginCreateOrUpdate. +type RoutingIntentClientCreateOrUpdateResponse struct { + // The routing intent child resource of a Virtual hub. + RoutingIntent +} + +// RoutingIntentClientDeleteResponse contains the response from method RoutingIntentClient.BeginDelete. +type RoutingIntentClientDeleteResponse struct { + // placeholder for future response values +} + +// RoutingIntentClientGetResponse contains the response from method RoutingIntentClient.Get. +type RoutingIntentClientGetResponse struct { + // The routing intent child resource of a Virtual hub. + RoutingIntent +} + +// RoutingIntentClientListResponse contains the response from method RoutingIntentClient.NewListPager. +type RoutingIntentClientListResponse struct { + // List of the routing intent result and a URL nextLink to get the next set of results. + ListRoutingIntentResult +} + +// RoutingRuleCollectionsClientCreateOrUpdateResponse contains the response from method RoutingRuleCollectionsClient.CreateOrUpdate. +type RoutingRuleCollectionsClientCreateOrUpdateResponse struct { + // Defines the routing rule collection. + RoutingRuleCollection +} + +// RoutingRuleCollectionsClientDeleteResponse contains the response from method RoutingRuleCollectionsClient.BeginDelete. +type RoutingRuleCollectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RoutingRuleCollectionsClientGetResponse contains the response from method RoutingRuleCollectionsClient.Get. +type RoutingRuleCollectionsClientGetResponse struct { + // Defines the routing rule collection. + RoutingRuleCollection +} + +// RoutingRuleCollectionsClientListResponse contains the response from method RoutingRuleCollectionsClient.NewListPager. +type RoutingRuleCollectionsClientListResponse struct { + // Routing configuration rule collection list result. + RoutingRuleCollectionListResult +} + +// RoutingRulesClientCreateOrUpdateResponse contains the response from method RoutingRulesClient.CreateOrUpdate. +type RoutingRulesClientCreateOrUpdateResponse struct { + // Network routing rule. + RoutingRule +} + +// RoutingRulesClientDeleteResponse contains the response from method RoutingRulesClient.BeginDelete. +type RoutingRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// RoutingRulesClientGetResponse contains the response from method RoutingRulesClient.Get. +type RoutingRulesClientGetResponse struct { + // Network routing rule. + RoutingRule +} + +// RoutingRulesClientListResponse contains the response from method RoutingRulesClient.NewListPager. +type RoutingRulesClientListResponse struct { + // Routing configuration rule list result. + RoutingRuleListResult +} + +// ScopeConnectionsClientCreateOrUpdateResponse contains the response from method ScopeConnectionsClient.CreateOrUpdate. +type ScopeConnectionsClientCreateOrUpdateResponse struct { + // The Scope Connections resource + ScopeConnection +} + +// ScopeConnectionsClientDeleteResponse contains the response from method ScopeConnectionsClient.Delete. +type ScopeConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// ScopeConnectionsClientGetResponse contains the response from method ScopeConnectionsClient.Get. +type ScopeConnectionsClientGetResponse struct { + // The Scope Connections resource + ScopeConnection +} + +// ScopeConnectionsClientListResponse contains the response from method ScopeConnectionsClient.NewListPager. +type ScopeConnectionsClientListResponse struct { + // List of scope connections. + ScopeConnectionListResult +} + +// SecurityAdminConfigurationsClientCreateOrUpdateResponse contains the response from method SecurityAdminConfigurationsClient.CreateOrUpdate. +type SecurityAdminConfigurationsClientCreateOrUpdateResponse struct { + // Defines the security admin configuration + SecurityAdminConfiguration +} + +// SecurityAdminConfigurationsClientDeleteResponse contains the response from method SecurityAdminConfigurationsClient.BeginDelete. +type SecurityAdminConfigurationsClientDeleteResponse struct { + // placeholder for future response values +} + +// SecurityAdminConfigurationsClientGetResponse contains the response from method SecurityAdminConfigurationsClient.Get. +type SecurityAdminConfigurationsClientGetResponse struct { + // Defines the security admin configuration + SecurityAdminConfiguration +} + +// SecurityAdminConfigurationsClientListResponse contains the response from method SecurityAdminConfigurationsClient.NewListPager. +type SecurityAdminConfigurationsClientListResponse struct { + // A list of network manager security admin configurations + SecurityAdminConfigurationListResult +} + +// SecurityGroupsClientCreateOrUpdateResponse contains the response from method SecurityGroupsClient.BeginCreateOrUpdate. +type SecurityGroupsClientCreateOrUpdateResponse struct { + // NetworkSecurityGroup resource. + SecurityGroup +} + +// SecurityGroupsClientDeleteResponse contains the response from method SecurityGroupsClient.BeginDelete. +type SecurityGroupsClientDeleteResponse struct { + // placeholder for future response values +} + +// SecurityGroupsClientGetResponse contains the response from method SecurityGroupsClient.Get. +type SecurityGroupsClientGetResponse struct { + // NetworkSecurityGroup resource. + SecurityGroup +} + +// SecurityGroupsClientListAllResponse contains the response from method SecurityGroupsClient.NewListAllPager. +type SecurityGroupsClientListAllResponse struct { + // Response for ListNetworkSecurityGroups API service call. + SecurityGroupListResult +} + +// SecurityGroupsClientListResponse contains the response from method SecurityGroupsClient.NewListPager. +type SecurityGroupsClientListResponse struct { + // Response for ListNetworkSecurityGroups API service call. + SecurityGroupListResult +} + +// SecurityGroupsClientUpdateTagsResponse contains the response from method SecurityGroupsClient.UpdateTags. +type SecurityGroupsClientUpdateTagsResponse struct { + // NetworkSecurityGroup resource. + SecurityGroup +} + +// SecurityPartnerProvidersClientCreateOrUpdateResponse contains the response from method SecurityPartnerProvidersClient.BeginCreateOrUpdate. +type SecurityPartnerProvidersClientCreateOrUpdateResponse struct { + // Security Partner Provider resource. + SecurityPartnerProvider +} + +// SecurityPartnerProvidersClientDeleteResponse contains the response from method SecurityPartnerProvidersClient.BeginDelete. +type SecurityPartnerProvidersClientDeleteResponse struct { + // placeholder for future response values +} + +// SecurityPartnerProvidersClientGetResponse contains the response from method SecurityPartnerProvidersClient.Get. +type SecurityPartnerProvidersClientGetResponse struct { + // Security Partner Provider resource. + SecurityPartnerProvider +} + +// SecurityPartnerProvidersClientListByResourceGroupResponse contains the response from method SecurityPartnerProvidersClient.NewListByResourceGroupPager. +type SecurityPartnerProvidersClientListByResourceGroupResponse struct { + // Response for ListSecurityPartnerProviders API service call. + SecurityPartnerProviderListResult +} + +// SecurityPartnerProvidersClientListResponse contains the response from method SecurityPartnerProvidersClient.NewListPager. +type SecurityPartnerProvidersClientListResponse struct { + // Response for ListSecurityPartnerProviders API service call. + SecurityPartnerProviderListResult +} + +// SecurityPartnerProvidersClientUpdateTagsResponse contains the response from method SecurityPartnerProvidersClient.UpdateTags. +type SecurityPartnerProvidersClientUpdateTagsResponse struct { + // Security Partner Provider resource. + SecurityPartnerProvider +} + +// SecurityRulesClientCreateOrUpdateResponse contains the response from method SecurityRulesClient.BeginCreateOrUpdate. +type SecurityRulesClientCreateOrUpdateResponse struct { + // Network security rule. + SecurityRule +} + +// SecurityRulesClientDeleteResponse contains the response from method SecurityRulesClient.BeginDelete. +type SecurityRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// SecurityRulesClientGetResponse contains the response from method SecurityRulesClient.Get. +type SecurityRulesClientGetResponse struct { + // Network security rule. + SecurityRule +} + +// SecurityRulesClientListResponse contains the response from method SecurityRulesClient.NewListPager. +type SecurityRulesClientListResponse struct { + // Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. + SecurityRuleListResult +} + +// SecurityUserConfigurationsClientCreateOrUpdateResponse contains the response from method SecurityUserConfigurationsClient.CreateOrUpdate. +type SecurityUserConfigurationsClientCreateOrUpdateResponse struct { + // Defines the security user configuration + SecurityUserConfiguration +} + +// SecurityUserConfigurationsClientDeleteResponse contains the response from method SecurityUserConfigurationsClient.BeginDelete. +type SecurityUserConfigurationsClientDeleteResponse struct { + // placeholder for future response values +} + +// SecurityUserConfigurationsClientGetResponse contains the response from method SecurityUserConfigurationsClient.Get. +type SecurityUserConfigurationsClientGetResponse struct { + // Defines the security user configuration + SecurityUserConfiguration +} + +// SecurityUserConfigurationsClientListResponse contains the response from method SecurityUserConfigurationsClient.NewListPager. +type SecurityUserConfigurationsClientListResponse struct { + // A list of network manager security user configurations + SecurityUserConfigurationListResult +} + +// SecurityUserRuleCollectionsClientCreateOrUpdateResponse contains the response from method SecurityUserRuleCollectionsClient.CreateOrUpdate. +type SecurityUserRuleCollectionsClientCreateOrUpdateResponse struct { + // Defines the security user rule collection. + SecurityUserRuleCollection +} + +// SecurityUserRuleCollectionsClientDeleteResponse contains the response from method SecurityUserRuleCollectionsClient.BeginDelete. +type SecurityUserRuleCollectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// SecurityUserRuleCollectionsClientGetResponse contains the response from method SecurityUserRuleCollectionsClient.Get. +type SecurityUserRuleCollectionsClientGetResponse struct { + // Defines the security user rule collection. + SecurityUserRuleCollection +} + +// SecurityUserRuleCollectionsClientListResponse contains the response from method SecurityUserRuleCollectionsClient.NewListPager. +type SecurityUserRuleCollectionsClientListResponse struct { + // Security user configuration rule collection list result. + SecurityUserRuleCollectionListResult +} + +// SecurityUserRulesClientCreateOrUpdateResponse contains the response from method SecurityUserRulesClient.CreateOrUpdate. +type SecurityUserRulesClientCreateOrUpdateResponse struct { + // Network security user rule. + SecurityUserRule +} + +// SecurityUserRulesClientDeleteResponse contains the response from method SecurityUserRulesClient.BeginDelete. +type SecurityUserRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// SecurityUserRulesClientGetResponse contains the response from method SecurityUserRulesClient.Get. +type SecurityUserRulesClientGetResponse struct { + // Network security user rule. + SecurityUserRule +} + +// SecurityUserRulesClientListResponse contains the response from method SecurityUserRulesClient.NewListPager. +type SecurityUserRulesClientListResponse struct { + // security user rule list result. + SecurityUserRuleListResult +} + +// ServiceAssociationLinksClientListResponse contains the response from method ServiceAssociationLinksClient.List. +type ServiceAssociationLinksClientListResponse struct { + // Response for ServiceAssociationLinks_List operation. + ServiceAssociationLinksListResult +} + +// ServiceEndpointPoliciesClientCreateOrUpdateResponse contains the response from method ServiceEndpointPoliciesClient.BeginCreateOrUpdate. +type ServiceEndpointPoliciesClientCreateOrUpdateResponse struct { + // Service End point policy resource. + ServiceEndpointPolicy +} + +// ServiceEndpointPoliciesClientDeleteResponse contains the response from method ServiceEndpointPoliciesClient.BeginDelete. +type ServiceEndpointPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// ServiceEndpointPoliciesClientGetResponse contains the response from method ServiceEndpointPoliciesClient.Get. +type ServiceEndpointPoliciesClientGetResponse struct { + // Service End point policy resource. + ServiceEndpointPolicy +} + +// ServiceEndpointPoliciesClientListByResourceGroupResponse contains the response from method ServiceEndpointPoliciesClient.NewListByResourceGroupPager. +type ServiceEndpointPoliciesClientListByResourceGroupResponse struct { + // Response for ListServiceEndpointPolicies API service call. + ServiceEndpointPolicyListResult +} + +// ServiceEndpointPoliciesClientListResponse contains the response from method ServiceEndpointPoliciesClient.NewListPager. +type ServiceEndpointPoliciesClientListResponse struct { + // Response for ListServiceEndpointPolicies API service call. + ServiceEndpointPolicyListResult +} + +// ServiceEndpointPoliciesClientUpdateTagsResponse contains the response from method ServiceEndpointPoliciesClient.UpdateTags. +type ServiceEndpointPoliciesClientUpdateTagsResponse struct { + // Service End point policy resource. + ServiceEndpointPolicy +} + +// ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate. +type ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse struct { + // Service Endpoint policy definitions. + ServiceEndpointPolicyDefinition +} + +// ServiceEndpointPolicyDefinitionsClientDeleteResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.BeginDelete. +type ServiceEndpointPolicyDefinitionsClientDeleteResponse struct { + // placeholder for future response values +} + +// ServiceEndpointPolicyDefinitionsClientGetResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.Get. +type ServiceEndpointPolicyDefinitionsClientGetResponse struct { + // Service Endpoint policy definitions. + ServiceEndpointPolicyDefinition +} + +// ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager. +type ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse struct { + // Response for ListServiceEndpointPolicyDefinition API service call. Retrieves all service endpoint policy definition that + // belongs to a service endpoint policy. + ServiceEndpointPolicyDefinitionListResult +} + +// ServiceTagInformationClientListResponse contains the response from method ServiceTagInformationClient.NewListPager. +type ServiceTagInformationClientListResponse struct { + // Response for Get ServiceTagInformation API service call. Retrieves the list of service tag information resources. + ServiceTagInformationListResult +} + +// ServiceTagsClientListResponse contains the response from method ServiceTagsClient.List. +type ServiceTagsClientListResponse struct { + // Response for the ListServiceTags API service call. + ServiceTagsListResult +} + +// StaticCidrsClientCreateResponse contains the response from method StaticCidrsClient.Create. +type StaticCidrsClientCreateResponse struct { + // Instance of StaticCidr resource. + StaticCidr +} + +// StaticCidrsClientDeleteResponse contains the response from method StaticCidrsClient.BeginDelete. +type StaticCidrsClientDeleteResponse struct { + // placeholder for future response values +} + +// StaticCidrsClientGetResponse contains the response from method StaticCidrsClient.Get. +type StaticCidrsClientGetResponse struct { + // Instance of StaticCidr resource. + StaticCidr +} + +// StaticCidrsClientListResponse contains the response from method StaticCidrsClient.NewListPager. +type StaticCidrsClientListResponse struct { + // List of StaticCidr + StaticCidrList +} + +// StaticMembersClientCreateOrUpdateResponse contains the response from method StaticMembersClient.CreateOrUpdate. +type StaticMembersClientCreateOrUpdateResponse struct { + // StaticMember Item. + StaticMember +} + +// StaticMembersClientDeleteResponse contains the response from method StaticMembersClient.Delete. +type StaticMembersClientDeleteResponse struct { + // placeholder for future response values +} + +// StaticMembersClientGetResponse contains the response from method StaticMembersClient.Get. +type StaticMembersClientGetResponse struct { + // StaticMember Item. + StaticMember +} + +// StaticMembersClientListResponse contains the response from method StaticMembersClient.NewListPager. +type StaticMembersClientListResponse struct { + // Result of the request to list StaticMember. It contains a list of groups and a URL link to get the next set of results. + StaticMemberListResult +} + +// SubnetsClientCreateOrUpdateResponse contains the response from method SubnetsClient.BeginCreateOrUpdate. +type SubnetsClientCreateOrUpdateResponse struct { + // Subnet in a virtual network resource. + Subnet +} + +// SubnetsClientDeleteResponse contains the response from method SubnetsClient.BeginDelete. +type SubnetsClientDeleteResponse struct { + // placeholder for future response values +} + +// SubnetsClientGetResponse contains the response from method SubnetsClient.Get. +type SubnetsClientGetResponse struct { + // Subnet in a virtual network resource. + Subnet +} + +// SubnetsClientListResponse contains the response from method SubnetsClient.NewListPager. +type SubnetsClientListResponse struct { + // Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. + SubnetListResult +} + +// SubnetsClientPrepareNetworkPoliciesResponse contains the response from method SubnetsClient.BeginPrepareNetworkPolicies. +type SubnetsClientPrepareNetworkPoliciesResponse struct { + // placeholder for future response values +} + +// SubnetsClientUnprepareNetworkPoliciesResponse contains the response from method SubnetsClient.BeginUnprepareNetworkPolicies. +type SubnetsClientUnprepareNetworkPoliciesResponse struct { + // placeholder for future response values +} + +// SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate. +type SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse struct { + // The Network Manager Connection resource + ManagerConnection +} + +// SubscriptionNetworkManagerConnectionsClientDeleteResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.Delete. +type SubscriptionNetworkManagerConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// SubscriptionNetworkManagerConnectionsClientGetResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.Get. +type SubscriptionNetworkManagerConnectionsClientGetResponse struct { + // The Network Manager Connection resource + ManagerConnection +} + +// SubscriptionNetworkManagerConnectionsClientListResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.NewListPager. +type SubscriptionNetworkManagerConnectionsClientListResponse struct { + // List of network manager connections. + ManagerConnectionListResult +} + +// UsagesClientListResponse contains the response from method UsagesClient.NewListPager. +type UsagesClientListResponse struct { + // The list usages operation response. + UsagesListResult +} + +// VPNConnectionsClientCreateOrUpdateResponse contains the response from method VPNConnectionsClient.BeginCreateOrUpdate. +type VPNConnectionsClientCreateOrUpdateResponse struct { + // VpnConnection Resource. + VPNConnection +} + +// VPNConnectionsClientDeleteResponse contains the response from method VPNConnectionsClient.BeginDelete. +type VPNConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// VPNConnectionsClientGetResponse contains the response from method VPNConnectionsClient.Get. +type VPNConnectionsClientGetResponse struct { + // VpnConnection Resource. + VPNConnection +} + +// VPNConnectionsClientListByVPNGatewayResponse contains the response from method VPNConnectionsClient.NewListByVPNGatewayPager. +type VPNConnectionsClientListByVPNGatewayResponse struct { + // Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and + // a URL nextLink to get the next set of results. + ListVPNConnectionsResult +} + +// VPNConnectionsClientStartPacketCaptureResponse contains the response from method VPNConnectionsClient.BeginStartPacketCapture. +type VPNConnectionsClientStartPacketCaptureResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionsClientStartPacketCaptureResponse. +func (v *VPNConnectionsClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VPNConnectionsClientStopPacketCaptureResponse contains the response from method VPNConnectionsClient.BeginStopPacketCapture. +type VPNConnectionsClientStopPacketCaptureResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionsClientStopPacketCaptureResponse. +func (v *VPNConnectionsClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VPNGatewaysClientCreateOrUpdateResponse contains the response from method VPNGatewaysClient.BeginCreateOrUpdate. +type VPNGatewaysClientCreateOrUpdateResponse struct { + // VpnGateway Resource. + VPNGateway +} + +// VPNGatewaysClientDeleteResponse contains the response from method VPNGatewaysClient.BeginDelete. +type VPNGatewaysClientDeleteResponse struct { + // placeholder for future response values +} + +// VPNGatewaysClientGetResponse contains the response from method VPNGatewaysClient.Get. +type VPNGatewaysClientGetResponse struct { + // VpnGateway Resource. + VPNGateway +} + +// VPNGatewaysClientListByResourceGroupResponse contains the response from method VPNGatewaysClient.NewListByResourceGroupPager. +type VPNGatewaysClientListByResourceGroupResponse struct { + // Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink to get the next set of + // results. + ListVPNGatewaysResult +} + +// VPNGatewaysClientListResponse contains the response from method VPNGatewaysClient.NewListPager. +type VPNGatewaysClientListResponse struct { + // Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink to get the next set of + // results. + ListVPNGatewaysResult +} + +// VPNGatewaysClientResetResponse contains the response from method VPNGatewaysClient.BeginReset. +type VPNGatewaysClientResetResponse struct { + // VpnGateway Resource. + VPNGateway +} + +// VPNGatewaysClientStartPacketCaptureResponse contains the response from method VPNGatewaysClient.BeginStartPacketCapture. +type VPNGatewaysClientStartPacketCaptureResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewaysClientStartPacketCaptureResponse. +func (v *VPNGatewaysClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VPNGatewaysClientStopPacketCaptureResponse contains the response from method VPNGatewaysClient.BeginStopPacketCapture. +type VPNGatewaysClientStopPacketCaptureResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewaysClientStopPacketCaptureResponse. +func (v *VPNGatewaysClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VPNGatewaysClientUpdateTagsResponse contains the response from method VPNGatewaysClient.BeginUpdateTags. +type VPNGatewaysClientUpdateTagsResponse struct { + // VpnGateway Resource. + VPNGateway +} + +// VPNLinkConnectionsClientGetAllSharedKeysResponse contains the response from method VPNLinkConnectionsClient.NewGetAllSharedKeysPager. +type VPNLinkConnectionsClientGetAllSharedKeysResponse struct { + // The list of shared keys for the vpn link connection. It should only contain one shared key for each vpn link connection. + ConnectionSharedKeyResultList +} + +// VPNLinkConnectionsClientGetDefaultSharedKeyResponse contains the response from method VPNLinkConnectionsClient.GetDefaultSharedKey. +type VPNLinkConnectionsClientGetDefaultSharedKeyResponse struct { + // SharedKey Resource . + ConnectionSharedKeyResult +} + +// VPNLinkConnectionsClientGetIkeSasResponse contains the response from method VPNLinkConnectionsClient.BeginGetIkeSas. +type VPNLinkConnectionsClientGetIkeSasResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNLinkConnectionsClientGetIkeSasResponse. +func (v *VPNLinkConnectionsClientGetIkeSasResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VPNLinkConnectionsClientListByVPNConnectionResponse contains the response from method VPNLinkConnectionsClient.NewListByVPNConnectionPager. +type VPNLinkConnectionsClientListByVPNConnectionResponse struct { + // Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and + // a URL nextLink to get the next set of results. + ListVPNSiteLinkConnectionsResult +} + +// VPNLinkConnectionsClientListDefaultSharedKeyResponse contains the response from method VPNLinkConnectionsClient.ListDefaultSharedKey. +type VPNLinkConnectionsClientListDefaultSharedKeyResponse struct { + // SharedKey Resource . + ConnectionSharedKeyResult +} + +// VPNLinkConnectionsClientResetConnectionResponse contains the response from method VPNLinkConnectionsClient.BeginResetConnection. +type VPNLinkConnectionsClientResetConnectionResponse struct { + // placeholder for future response values +} + +// VPNLinkConnectionsClientSetOrInitDefaultSharedKeyResponse contains the response from method VPNLinkConnectionsClient.BeginSetOrInitDefaultSharedKey. +type VPNLinkConnectionsClientSetOrInitDefaultSharedKeyResponse struct { + // SharedKey Resource . + ConnectionSharedKeyResult +} + +// VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse contains the response from method VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList. +type VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse struct { + // VpnServerConfigurations list associated with VirtualWan Response. + VPNServerConfigurationsResponse +} + +// VPNServerConfigurationsClientCreateOrUpdateResponse contains the response from method VPNServerConfigurationsClient.BeginCreateOrUpdate. +type VPNServerConfigurationsClientCreateOrUpdateResponse struct { + // VpnServerConfiguration Resource. + VPNServerConfiguration +} + +// VPNServerConfigurationsClientDeleteResponse contains the response from method VPNServerConfigurationsClient.BeginDelete. +type VPNServerConfigurationsClientDeleteResponse struct { + // placeholder for future response values +} + +// VPNServerConfigurationsClientGetResponse contains the response from method VPNServerConfigurationsClient.Get. +type VPNServerConfigurationsClientGetResponse struct { + // VpnServerConfiguration Resource. + VPNServerConfiguration +} + +// VPNServerConfigurationsClientListByResourceGroupResponse contains the response from method VPNServerConfigurationsClient.NewListByResourceGroupPager. +type VPNServerConfigurationsClientListByResourceGroupResponse struct { + // Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations and a URL nextLink + // to get the next set of results. + ListVPNServerConfigurationsResult +} + +// VPNServerConfigurationsClientListResponse contains the response from method VPNServerConfigurationsClient.NewListPager. +type VPNServerConfigurationsClientListResponse struct { + // Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations and a URL nextLink + // to get the next set of results. + ListVPNServerConfigurationsResult +} + +// VPNServerConfigurationsClientUpdateTagsResponse contains the response from method VPNServerConfigurationsClient.UpdateTags. +type VPNServerConfigurationsClientUpdateTagsResponse struct { + // VpnServerConfiguration Resource. + VPNServerConfiguration +} + +// VPNSiteLinkConnectionsClientGetResponse contains the response from method VPNSiteLinkConnectionsClient.Get. +type VPNSiteLinkConnectionsClientGetResponse struct { + // VpnSiteLinkConnection Resource. + VPNSiteLinkConnection +} + +// VPNSiteLinksClientGetResponse contains the response from method VPNSiteLinksClient.Get. +type VPNSiteLinksClientGetResponse struct { + // VpnSiteLink Resource. + VPNSiteLink +} + +// VPNSiteLinksClientListByVPNSiteResponse contains the response from method VPNSiteLinksClient.NewListByVPNSitePager. +type VPNSiteLinksClientListByVPNSiteResponse struct { + // Result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks and a URL nextLink to get the next set of + // results. + ListVPNSiteLinksResult +} + +// VPNSitesClientCreateOrUpdateResponse contains the response from method VPNSitesClient.BeginCreateOrUpdate. +type VPNSitesClientCreateOrUpdateResponse struct { + // VpnSite Resource. + VPNSite +} + +// VPNSitesClientDeleteResponse contains the response from method VPNSitesClient.BeginDelete. +type VPNSitesClientDeleteResponse struct { + // placeholder for future response values +} + +// VPNSitesClientGetResponse contains the response from method VPNSitesClient.Get. +type VPNSitesClientGetResponse struct { + // VpnSite Resource. + VPNSite +} + +// VPNSitesClientListByResourceGroupResponse contains the response from method VPNSitesClient.NewListByResourceGroupPager. +type VPNSitesClientListByResourceGroupResponse struct { + // Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the next set of results. + ListVPNSitesResult +} + +// VPNSitesClientListResponse contains the response from method VPNSitesClient.NewListPager. +type VPNSitesClientListResponse struct { + // Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the next set of results. + ListVPNSitesResult +} + +// VPNSitesClientUpdateTagsResponse contains the response from method VPNSitesClient.UpdateTags. +type VPNSitesClientUpdateTagsResponse struct { + // VpnSite Resource. + VPNSite +} + +// VPNSitesConfigurationClientDownloadResponse contains the response from method VPNSitesConfigurationClient.BeginDownload. +type VPNSitesConfigurationClientDownloadResponse struct { + // placeholder for future response values +} + +// VerifierWorkspacesClientCreateResponse contains the response from method VerifierWorkspacesClient.Create. +type VerifierWorkspacesClientCreateResponse struct { + // Instance of Verifier Workspace. + VerifierWorkspace +} + +// VerifierWorkspacesClientDeleteResponse contains the response from method VerifierWorkspacesClient.BeginDelete. +type VerifierWorkspacesClientDeleteResponse struct { + // placeholder for future response values +} + +// VerifierWorkspacesClientGetResponse contains the response from method VerifierWorkspacesClient.Get. +type VerifierWorkspacesClientGetResponse struct { + // Instance of Verifier Workspace. + VerifierWorkspace +} + +// VerifierWorkspacesClientListResponse contains the response from method VerifierWorkspacesClient.NewListPager. +type VerifierWorkspacesClientListResponse struct { + // A list of Verifier Workspace + VerifierWorkspaceListResult +} + +// VerifierWorkspacesClientUpdateResponse contains the response from method VerifierWorkspacesClient.Update. +type VerifierWorkspacesClientUpdateResponse struct { + // Instance of Verifier Workspace. + VerifierWorkspace +} + +// VipSwapClientCreateResponse contains the response from method VipSwapClient.BeginCreate. +type VipSwapClientCreateResponse struct { + // placeholder for future response values +} + +// VipSwapClientGetResponse contains the response from method VipSwapClient.Get. +type VipSwapClientGetResponse struct { + // SwapResource to represent slot type on the specified cloud service. + SwapResource +} + +// VipSwapClientListResponse contains the response from method VipSwapClient.List. +type VipSwapClientListResponse struct { + // SwapResource List with single entry to represent slot type on the specified cloud service. + SwapResourceListResult +} + +// VirtualApplianceConnectionsClientCreateOrUpdateResponse contains the response from method VirtualApplianceConnectionsClient.BeginCreateOrUpdate. +type VirtualApplianceConnectionsClientCreateOrUpdateResponse struct { + // NetworkVirtualApplianceConnection resource. + VirtualApplianceConnection +} + +// VirtualApplianceConnectionsClientDeleteResponse contains the response from method VirtualApplianceConnectionsClient.BeginDelete. +type VirtualApplianceConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualApplianceConnectionsClientGetResponse contains the response from method VirtualApplianceConnectionsClient.Get. +type VirtualApplianceConnectionsClientGetResponse struct { + // NetworkVirtualApplianceConnection resource. + VirtualApplianceConnection +} + +// VirtualApplianceConnectionsClientListResponse contains the response from method VirtualApplianceConnectionsClient.NewListPager. +type VirtualApplianceConnectionsClientListResponse struct { + // NetworkVirtualApplianceConnection list. + VirtualApplianceConnectionList +} + +// VirtualApplianceSKUsClientGetResponse contains the response from method VirtualApplianceSKUsClient.Get. +type VirtualApplianceSKUsClientGetResponse struct { + // Definition of the NetworkVirtualApplianceSkus resource. + VirtualApplianceSKU +} + +// VirtualApplianceSKUsClientListResponse contains the response from method VirtualApplianceSKUsClient.NewListPager. +type VirtualApplianceSKUsClientListResponse struct { + // Response for ListNetworkVirtualApplianceSkus API service call. + VirtualApplianceSKUListResult +} + +// VirtualApplianceSitesClientCreateOrUpdateResponse contains the response from method VirtualApplianceSitesClient.BeginCreateOrUpdate. +type VirtualApplianceSitesClientCreateOrUpdateResponse struct { + // Virtual Appliance Site resource. + VirtualApplianceSite +} + +// VirtualApplianceSitesClientDeleteResponse contains the response from method VirtualApplianceSitesClient.BeginDelete. +type VirtualApplianceSitesClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualApplianceSitesClientGetResponse contains the response from method VirtualApplianceSitesClient.Get. +type VirtualApplianceSitesClientGetResponse struct { + // Virtual Appliance Site resource. + VirtualApplianceSite +} + +// VirtualApplianceSitesClientListResponse contains the response from method VirtualApplianceSitesClient.NewListPager. +type VirtualApplianceSitesClientListResponse struct { + // Response for ListNetworkVirtualApplianceSites API service call. + VirtualApplianceSiteListResult +} + +// VirtualAppliancesClientCreateOrUpdateResponse contains the response from method VirtualAppliancesClient.BeginCreateOrUpdate. +type VirtualAppliancesClientCreateOrUpdateResponse struct { + // NetworkVirtualAppliance Resource. + VirtualAppliance +} + +// VirtualAppliancesClientDeleteResponse contains the response from method VirtualAppliancesClient.BeginDelete. +type VirtualAppliancesClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualAppliancesClientGetResponse contains the response from method VirtualAppliancesClient.Get. +type VirtualAppliancesClientGetResponse struct { + // NetworkVirtualAppliance Resource. + VirtualAppliance +} + +// VirtualAppliancesClientListByResourceGroupResponse contains the response from method VirtualAppliancesClient.NewListByResourceGroupPager. +type VirtualAppliancesClientListByResourceGroupResponse struct { + // Response for ListNetworkVirtualAppliances API service call. + VirtualApplianceListResult +} + +// VirtualAppliancesClientListResponse contains the response from method VirtualAppliancesClient.NewListPager. +type VirtualAppliancesClientListResponse struct { + // Response for ListNetworkVirtualAppliances API service call. + VirtualApplianceListResult +} + +// VirtualAppliancesClientRestartResponse contains the response from method VirtualAppliancesClient.BeginRestart. +type VirtualAppliancesClientRestartResponse struct { + // Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. + VirtualApplianceInstanceIDs +} + +// VirtualAppliancesClientUpdateTagsResponse contains the response from method VirtualAppliancesClient.UpdateTags. +type VirtualAppliancesClientUpdateTagsResponse struct { + // NetworkVirtualAppliance Resource. + VirtualAppliance +} + +// VirtualHubBgpConnectionClientCreateOrUpdateResponse contains the response from method VirtualHubBgpConnectionClient.BeginCreateOrUpdate. +type VirtualHubBgpConnectionClientCreateOrUpdateResponse struct { + // Virtual Appliance Site resource. + BgpConnection +} + +// VirtualHubBgpConnectionClientDeleteResponse contains the response from method VirtualHubBgpConnectionClient.BeginDelete. +type VirtualHubBgpConnectionClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualHubBgpConnectionClientGetResponse contains the response from method VirtualHubBgpConnectionClient.Get. +type VirtualHubBgpConnectionClientGetResponse struct { + // Virtual Appliance Site resource. + BgpConnection +} + +// VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse contains the response from method VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes. +type VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse struct { + // Map from virtual router instance to list of peer routes. + Value map[string][]*PeerRoute +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse. +func (v *VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualHubBgpConnectionsClientListLearnedRoutesResponse contains the response from method VirtualHubBgpConnectionsClient.BeginListLearnedRoutes. +type VirtualHubBgpConnectionsClientListLearnedRoutesResponse struct { + // Map from virtual router instance to list of peer routes. + Value map[string][]*PeerRoute +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHubBgpConnectionsClientListLearnedRoutesResponse. +func (v *VirtualHubBgpConnectionsClientListLearnedRoutesResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualHubBgpConnectionsClientListResponse contains the response from method VirtualHubBgpConnectionsClient.NewListPager. +type VirtualHubBgpConnectionsClientListResponse struct { + // VirtualHubBgpConnections list. + ListVirtualHubBgpConnectionResults +} + +// VirtualHubIPConfigurationClientCreateOrUpdateResponse contains the response from method VirtualHubIPConfigurationClient.BeginCreateOrUpdate. +type VirtualHubIPConfigurationClientCreateOrUpdateResponse struct { + // IpConfigurations. + HubIPConfiguration +} + +// VirtualHubIPConfigurationClientDeleteResponse contains the response from method VirtualHubIPConfigurationClient.BeginDelete. +type VirtualHubIPConfigurationClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualHubIPConfigurationClientGetResponse contains the response from method VirtualHubIPConfigurationClient.Get. +type VirtualHubIPConfigurationClientGetResponse struct { + // IpConfigurations. + HubIPConfiguration +} + +// VirtualHubIPConfigurationClientListResponse contains the response from method VirtualHubIPConfigurationClient.NewListPager. +type VirtualHubIPConfigurationClientListResponse struct { + // VirtualHubIpConfigurations list. + ListVirtualHubIPConfigurationResults +} + +// VirtualHubRouteTableV2SClientCreateOrUpdateResponse contains the response from method VirtualHubRouteTableV2SClient.BeginCreateOrUpdate. +type VirtualHubRouteTableV2SClientCreateOrUpdateResponse struct { + // VirtualHubRouteTableV2 Resource. + VirtualHubRouteTableV2 +} + +// VirtualHubRouteTableV2SClientDeleteResponse contains the response from method VirtualHubRouteTableV2SClient.BeginDelete. +type VirtualHubRouteTableV2SClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualHubRouteTableV2SClientGetResponse contains the response from method VirtualHubRouteTableV2SClient.Get. +type VirtualHubRouteTableV2SClientGetResponse struct { + // VirtualHubRouteTableV2 Resource. + VirtualHubRouteTableV2 +} + +// VirtualHubRouteTableV2SClientListResponse contains the response from method VirtualHubRouteTableV2SClient.NewListPager. +type VirtualHubRouteTableV2SClientListResponse struct { + // List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. + ListVirtualHubRouteTableV2SResult +} + +// VirtualHubsClientCreateOrUpdateResponse contains the response from method VirtualHubsClient.BeginCreateOrUpdate. +type VirtualHubsClientCreateOrUpdateResponse struct { + // VirtualHub Resource. + VirtualHub +} + +// VirtualHubsClientDeleteResponse contains the response from method VirtualHubsClient.BeginDelete. +type VirtualHubsClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualHubsClientGetEffectiveVirtualHubRoutesResponse contains the response from method VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes. +type VirtualHubsClientGetEffectiveVirtualHubRoutesResponse struct { + // EffectiveRoutes List. + VirtualHubEffectiveRouteList +} + +// VirtualHubsClientGetInboundRoutesResponse contains the response from method VirtualHubsClient.BeginGetInboundRoutes. +type VirtualHubsClientGetInboundRoutesResponse struct { + // EffectiveRouteMapRoute List. + EffectiveRouteMapRouteList +} + +// VirtualHubsClientGetOutboundRoutesResponse contains the response from method VirtualHubsClient.BeginGetOutboundRoutes. +type VirtualHubsClientGetOutboundRoutesResponse struct { + // EffectiveRouteMapRoute List. + EffectiveRouteMapRouteList +} + +// VirtualHubsClientGetResponse contains the response from method VirtualHubsClient.Get. +type VirtualHubsClientGetResponse struct { + // VirtualHub Resource. + VirtualHub +} + +// VirtualHubsClientListByResourceGroupResponse contains the response from method VirtualHubsClient.NewListByResourceGroupPager. +type VirtualHubsClientListByResourceGroupResponse struct { + // Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of + // results. + ListVirtualHubsResult +} + +// VirtualHubsClientListResponse contains the response from method VirtualHubsClient.NewListPager. +type VirtualHubsClientListResponse struct { + // Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of + // results. + ListVirtualHubsResult +} + +// VirtualHubsClientUpdateTagsResponse contains the response from method VirtualHubsClient.UpdateTags. +type VirtualHubsClientUpdateTagsResponse struct { + // VirtualHub Resource. + VirtualHub +} + +// VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate. +type VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse struct { + // A common class for general resource information. + VirtualNetworkGatewayConnection +} + +// VirtualNetworkGatewayConnectionsClientDeleteResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginDelete. +type VirtualNetworkGatewayConnectionsClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualNetworkGatewayConnectionsClientGetIkeSasResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas. +type VirtualNetworkGatewayConnectionsClientGetIkeSasResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionsClientGetIkeSasResponse. +func (v *VirtualNetworkGatewayConnectionsClientGetIkeSasResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualNetworkGatewayConnectionsClientGetResponse contains the response from method VirtualNetworkGatewayConnectionsClient.Get. +type VirtualNetworkGatewayConnectionsClientGetResponse struct { + // A common class for general resource information. + VirtualNetworkGatewayConnection +} + +// VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.GetSharedKey. +type VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse struct { + // Response for GetConnectionSharedKey API service call. + ConnectionSharedKey +} + +// VirtualNetworkGatewayConnectionsClientListResponse contains the response from method VirtualNetworkGatewayConnectionsClient.NewListPager. +type VirtualNetworkGatewayConnectionsClientListResponse struct { + // Response for the ListVirtualNetworkGatewayConnections API service call. + VirtualNetworkGatewayConnectionListResult +} + +// VirtualNetworkGatewayConnectionsClientResetConnectionResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginResetConnection. +type VirtualNetworkGatewayConnectionsClientResetConnectionResponse struct { + // placeholder for future response values +} + +// VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey. +type VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse struct { + // The virtual network connection reset shared key. + ConnectionResetSharedKey +} + +// VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey. +type VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse struct { + // Response for GetConnectionSharedKey API service call. + ConnectionSharedKey +} + +// VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture. +type VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse. +func (v *VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture. +type VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse. +func (v *VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualNetworkGatewayConnectionsClientUpdateTagsResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginUpdateTags. +type VirtualNetworkGatewayConnectionsClientUpdateTagsResponse struct { + // A common class for general resource information. + VirtualNetworkGatewayConnection +} + +// VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate. +type VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse struct { + // VirtualNetworkGatewayNatRule Resource. + VirtualNetworkGatewayNatRule +} + +// VirtualNetworkGatewayNatRulesClientDeleteResponse contains the response from method VirtualNetworkGatewayNatRulesClient.BeginDelete. +type VirtualNetworkGatewayNatRulesClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualNetworkGatewayNatRulesClientGetResponse contains the response from method VirtualNetworkGatewayNatRulesClient.Get. +type VirtualNetworkGatewayNatRulesClientGetResponse struct { + // VirtualNetworkGatewayNatRule Resource. + VirtualNetworkGatewayNatRule +} + +// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse contains the response from method VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager. +type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse struct { + // Result of the request to list all nat rules to a virtual network gateway. It contains a list of Nat rules and a URL nextLink + // to get the next set of results. + ListVirtualNetworkGatewayNatRulesResult +} + +// VirtualNetworkGatewaysClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewaysClient.BeginCreateOrUpdate. +type VirtualNetworkGatewaysClientCreateOrUpdateResponse struct { + // A common class for general resource information. + VirtualNetworkGateway +} + +// VirtualNetworkGatewaysClientDeleteResponse contains the response from method VirtualNetworkGatewaysClient.BeginDelete. +type VirtualNetworkGatewaysClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections. +type VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse struct { + // placeholder for future response values +} + +// VirtualNetworkGatewaysClientGenerateVPNProfileResponse contains the response from method VirtualNetworkGatewaysClient.BeginGenerateVPNProfile. +type VirtualNetworkGatewaysClientGenerateVPNProfileResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGenerateVPNProfileResponse. +func (v *VirtualNetworkGatewaysClientGenerateVPNProfileResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse contains the response from method VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage. +type VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse. +func (v *VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes. +type VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse struct { + // List of virtual network gateway routes. + GatewayRouteListResult +} + +// VirtualNetworkGatewaysClientGetBgpPeerStatusResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus. +type VirtualNetworkGatewaysClientGetBgpPeerStatusResponse struct { + // Response for list BGP peer status API service call. + BgpPeerStatusListResult +} + +// VirtualNetworkGatewaysClientGetFailoverAllTestDetailsResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetFailoverAllTestDetails. +type VirtualNetworkGatewaysClientGetFailoverAllTestDetailsResponse struct { + // Gateway Failover All Test Details + ExpressRouteFailoverTestDetailsArray []*ExpressRouteFailoverTestDetails +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGetFailoverAllTestDetailsResponse. +func (v *VirtualNetworkGatewaysClientGetFailoverAllTestDetailsResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.ExpressRouteFailoverTestDetailsArray) +} + +// VirtualNetworkGatewaysClientGetFailoverSingleTestDetailsResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetFailoverSingleTestDetails. +type VirtualNetworkGatewaysClientGetFailoverSingleTestDetailsResponse struct { + // Gateway Failover Single Test Details Object + ExpressRouteFailoverSingleTestDetailsArray []*ExpressRouteFailoverSingleTestDetails +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGetFailoverSingleTestDetailsResponse. +func (v *VirtualNetworkGatewaysClientGetFailoverSingleTestDetailsResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.ExpressRouteFailoverSingleTestDetailsArray) +} + +// VirtualNetworkGatewaysClientGetLearnedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetLearnedRoutes. +type VirtualNetworkGatewaysClientGetLearnedRoutesResponse struct { + // List of virtual network gateway routes. + GatewayRouteListResult +} + +// VirtualNetworkGatewaysClientGetResponse contains the response from method VirtualNetworkGatewaysClient.Get. +type VirtualNetworkGatewaysClientGetResponse struct { + // A common class for general resource information. + VirtualNetworkGateway +} + +// VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL. +type VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse. +func (v *VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth. +type VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse struct { + // List of virtual network gateway vpn client connection health. + VPNClientConnectionHealthDetailListResult +} + +// VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters. +type VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse struct { + // An IPSec parameters for a virtual network gateway P2S connection. + VPNClientIPsecParameters +} + +// VirtualNetworkGatewaysClientListConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.NewListConnectionsPager. +type VirtualNetworkGatewaysClientListConnectionsResponse struct { + // Response for the VirtualNetworkGatewayListConnections API service call. + VirtualNetworkGatewayListConnectionsResult +} + +// VirtualNetworkGatewaysClientListResponse contains the response from method VirtualNetworkGatewaysClient.NewListPager. +type VirtualNetworkGatewaysClientListResponse struct { + // Response for the ListVirtualNetworkGateways API service call. + VirtualNetworkGatewayListResult +} + +// VirtualNetworkGatewaysClientResetResponse contains the response from method VirtualNetworkGatewaysClient.BeginReset. +type VirtualNetworkGatewaysClientResetResponse struct { + // A common class for general resource information. + VirtualNetworkGateway +} + +// VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse contains the response from method VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey. +type VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse struct { + // placeholder for future response values +} + +// VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters. +type VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse struct { + // An IPSec parameters for a virtual network gateway P2S connection. + VPNClientIPsecParameters +} + +// VirtualNetworkGatewaysClientStartExpressRouteSiteFailoverSimulationResponse contains the response from method VirtualNetworkGatewaysClient.BeginStartExpressRouteSiteFailoverSimulation. +type VirtualNetworkGatewaysClientStartExpressRouteSiteFailoverSimulationResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientStartExpressRouteSiteFailoverSimulationResponse. +func (v *VirtualNetworkGatewaysClientStartExpressRouteSiteFailoverSimulationResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualNetworkGatewaysClientStartPacketCaptureResponse contains the response from method VirtualNetworkGatewaysClient.BeginStartPacketCapture. +type VirtualNetworkGatewaysClientStartPacketCaptureResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientStartPacketCaptureResponse. +func (v *VirtualNetworkGatewaysClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualNetworkGatewaysClientStopExpressRouteSiteFailoverSimulationResponse contains the response from method VirtualNetworkGatewaysClient.BeginStopExpressRouteSiteFailoverSimulation. +type VirtualNetworkGatewaysClientStopExpressRouteSiteFailoverSimulationResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientStopExpressRouteSiteFailoverSimulationResponse. +func (v *VirtualNetworkGatewaysClientStopExpressRouteSiteFailoverSimulationResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualNetworkGatewaysClientStopPacketCaptureResponse contains the response from method VirtualNetworkGatewaysClient.BeginStopPacketCapture. +type VirtualNetworkGatewaysClientStopPacketCaptureResponse struct { + Value *string +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientStopPacketCaptureResponse. +func (v *VirtualNetworkGatewaysClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) +} + +// VirtualNetworkGatewaysClientSupportedVPNDevicesResponse contains the response from method VirtualNetworkGatewaysClient.SupportedVPNDevices. +type VirtualNetworkGatewaysClientSupportedVPNDevicesResponse struct { + Value *string +} + +// VirtualNetworkGatewaysClientUpdateTagsResponse contains the response from method VirtualNetworkGatewaysClient.BeginUpdateTags. +type VirtualNetworkGatewaysClientUpdateTagsResponse struct { + // A common class for general resource information. + VirtualNetworkGateway +} + +// VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse contains the response from method VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript. +type VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse struct { + Value *string +} + +// VirtualNetworkPeeringsClientCreateOrUpdateResponse contains the response from method VirtualNetworkPeeringsClient.BeginCreateOrUpdate. +type VirtualNetworkPeeringsClientCreateOrUpdateResponse struct { + // Peerings in a virtual network resource. + VirtualNetworkPeering +} + +// VirtualNetworkPeeringsClientDeleteResponse contains the response from method VirtualNetworkPeeringsClient.BeginDelete. +type VirtualNetworkPeeringsClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualNetworkPeeringsClientGetResponse contains the response from method VirtualNetworkPeeringsClient.Get. +type VirtualNetworkPeeringsClientGetResponse struct { + // Peerings in a virtual network resource. + VirtualNetworkPeering +} + +// VirtualNetworkPeeringsClientListResponse contains the response from method VirtualNetworkPeeringsClient.NewListPager. +type VirtualNetworkPeeringsClientListResponse struct { + // Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. + VirtualNetworkPeeringListResult +} + +// VirtualNetworkTapsClientCreateOrUpdateResponse contains the response from method VirtualNetworkTapsClient.BeginCreateOrUpdate. +type VirtualNetworkTapsClientCreateOrUpdateResponse struct { + // Virtual Network Tap resource. + VirtualNetworkTap +} + +// VirtualNetworkTapsClientDeleteResponse contains the response from method VirtualNetworkTapsClient.BeginDelete. +type VirtualNetworkTapsClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualNetworkTapsClientGetResponse contains the response from method VirtualNetworkTapsClient.Get. +type VirtualNetworkTapsClientGetResponse struct { + // Virtual Network Tap resource. + VirtualNetworkTap +} + +// VirtualNetworkTapsClientListAllResponse contains the response from method VirtualNetworkTapsClient.NewListAllPager. +type VirtualNetworkTapsClientListAllResponse struct { + // Response for ListVirtualNetworkTap API service call. + VirtualNetworkTapListResult +} + +// VirtualNetworkTapsClientListByResourceGroupResponse contains the response from method VirtualNetworkTapsClient.NewListByResourceGroupPager. +type VirtualNetworkTapsClientListByResourceGroupResponse struct { + // Response for ListVirtualNetworkTap API service call. + VirtualNetworkTapListResult +} + +// VirtualNetworkTapsClientUpdateTagsResponse contains the response from method VirtualNetworkTapsClient.UpdateTags. +type VirtualNetworkTapsClientUpdateTagsResponse struct { + // Virtual Network Tap resource. + VirtualNetworkTap +} + +// VirtualNetworksClientCheckIPAddressAvailabilityResponse contains the response from method VirtualNetworksClient.CheckIPAddressAvailability. +type VirtualNetworksClientCheckIPAddressAvailabilityResponse struct { + // Response for CheckIPAddressAvailability API service call. + IPAddressAvailabilityResult +} + +// VirtualNetworksClientCreateOrUpdateResponse contains the response from method VirtualNetworksClient.BeginCreateOrUpdate. +type VirtualNetworksClientCreateOrUpdateResponse struct { + // Virtual Network resource. + VirtualNetwork +} + +// VirtualNetworksClientDeleteResponse contains the response from method VirtualNetworksClient.BeginDelete. +type VirtualNetworksClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualNetworksClientGetResponse contains the response from method VirtualNetworksClient.Get. +type VirtualNetworksClientGetResponse struct { + // Virtual Network resource. + VirtualNetwork +} + +// VirtualNetworksClientListAllResponse contains the response from method VirtualNetworksClient.NewListAllPager. +type VirtualNetworksClientListAllResponse struct { + // Response for the ListVirtualNetworks API service call. + VirtualNetworkListResult +} + +// VirtualNetworksClientListDdosProtectionStatusResponse contains the response from method VirtualNetworksClient.BeginListDdosProtectionStatus. +type VirtualNetworksClientListDdosProtectionStatusResponse struct { + // Response for GetVirtualNetworkDdosProtectionStatusOperation. + VirtualNetworkDdosProtectionStatusResult +} + +// VirtualNetworksClientListResponse contains the response from method VirtualNetworksClient.NewListPager. +type VirtualNetworksClientListResponse struct { + // Response for the ListVirtualNetworks API service call. + VirtualNetworkListResult +} + +// VirtualNetworksClientListUsageResponse contains the response from method VirtualNetworksClient.NewListUsagePager. +type VirtualNetworksClientListUsageResponse struct { + // Response for the virtual networks GetUsage API service call. + VirtualNetworkListUsageResult +} + +// VirtualNetworksClientUpdateTagsResponse contains the response from method VirtualNetworksClient.UpdateTags. +type VirtualNetworksClientUpdateTagsResponse struct { + // Virtual Network resource. + VirtualNetwork +} + +// VirtualRouterPeeringsClientCreateOrUpdateResponse contains the response from method VirtualRouterPeeringsClient.BeginCreateOrUpdate. +type VirtualRouterPeeringsClientCreateOrUpdateResponse struct { + // Virtual Router Peering resource. + VirtualRouterPeering +} + +// VirtualRouterPeeringsClientDeleteResponse contains the response from method VirtualRouterPeeringsClient.BeginDelete. +type VirtualRouterPeeringsClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualRouterPeeringsClientGetResponse contains the response from method VirtualRouterPeeringsClient.Get. +type VirtualRouterPeeringsClientGetResponse struct { + // Virtual Router Peering resource. + VirtualRouterPeering +} + +// VirtualRouterPeeringsClientListResponse contains the response from method VirtualRouterPeeringsClient.NewListPager. +type VirtualRouterPeeringsClientListResponse struct { + // Response for ListVirtualRouterPeerings API service call. + VirtualRouterPeeringListResult +} + +// VirtualRoutersClientCreateOrUpdateResponse contains the response from method VirtualRoutersClient.BeginCreateOrUpdate. +type VirtualRoutersClientCreateOrUpdateResponse struct { + // VirtualRouter Resource. + VirtualRouter +} + +// VirtualRoutersClientDeleteResponse contains the response from method VirtualRoutersClient.BeginDelete. +type VirtualRoutersClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualRoutersClientGetResponse contains the response from method VirtualRoutersClient.Get. +type VirtualRoutersClientGetResponse struct { + // VirtualRouter Resource. + VirtualRouter +} + +// VirtualRoutersClientListByResourceGroupResponse contains the response from method VirtualRoutersClient.NewListByResourceGroupPager. +type VirtualRoutersClientListByResourceGroupResponse struct { + // Response for ListVirtualRouters API service call. + VirtualRouterListResult +} + +// VirtualRoutersClientListResponse contains the response from method VirtualRoutersClient.NewListPager. +type VirtualRoutersClientListResponse struct { + // Response for ListVirtualRouters API service call. + VirtualRouterListResult +} + +// VirtualWansClientCreateOrUpdateResponse contains the response from method VirtualWansClient.BeginCreateOrUpdate. +type VirtualWansClientCreateOrUpdateResponse struct { + // VirtualWAN Resource. + VirtualWAN +} + +// VirtualWansClientDeleteResponse contains the response from method VirtualWansClient.BeginDelete. +type VirtualWansClientDeleteResponse struct { + // placeholder for future response values +} + +// VirtualWansClientGetResponse contains the response from method VirtualWansClient.Get. +type VirtualWansClientGetResponse struct { + // VirtualWAN Resource. + VirtualWAN +} + +// VirtualWansClientListByResourceGroupResponse contains the response from method VirtualWansClient.NewListByResourceGroupPager. +type VirtualWansClientListByResourceGroupResponse struct { + // Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink to get the next set of + // results. + ListVirtualWANsResult +} + +// VirtualWansClientListResponse contains the response from method VirtualWansClient.NewListPager. +type VirtualWansClientListResponse struct { + // Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink to get the next set of + // results. + ListVirtualWANsResult +} + +// VirtualWansClientUpdateTagsResponse contains the response from method VirtualWansClient.UpdateTags. +type VirtualWansClientUpdateTagsResponse struct { + // VirtualWAN Resource. + VirtualWAN +} + +// WatchersClientCheckConnectivityResponse contains the response from method WatchersClient.BeginCheckConnectivity. +type WatchersClientCheckConnectivityResponse struct { + // Information on the connectivity status. + ConnectivityInformation +} + +// WatchersClientCreateOrUpdateResponse contains the response from method WatchersClient.CreateOrUpdate. +type WatchersClientCreateOrUpdateResponse struct { + // Network watcher in a resource group. + Watcher +} + +// WatchersClientDeleteResponse contains the response from method WatchersClient.BeginDelete. +type WatchersClientDeleteResponse struct { + // placeholder for future response values +} + +// WatchersClientGetAzureReachabilityReportResponse contains the response from method WatchersClient.BeginGetAzureReachabilityReport. +type WatchersClientGetAzureReachabilityReportResponse struct { + // Azure reachability report details. + AzureReachabilityReport +} + +// WatchersClientGetFlowLogStatusResponse contains the response from method WatchersClient.BeginGetFlowLogStatus. +type WatchersClientGetFlowLogStatusResponse struct { + // Information on the configuration of flow log and traffic analytics (optional) . + FlowLogInformation +} + +// WatchersClientGetNetworkConfigurationDiagnosticResponse contains the response from method WatchersClient.BeginGetNetworkConfigurationDiagnostic. +type WatchersClientGetNetworkConfigurationDiagnosticResponse struct { + // Results of network configuration diagnostic on the target resource. + ConfigurationDiagnosticResponse +} + +// WatchersClientGetNextHopResponse contains the response from method WatchersClient.BeginGetNextHop. +type WatchersClientGetNextHopResponse struct { + // The information about next hop from the specified VM. + NextHopResult +} + +// WatchersClientGetResponse contains the response from method WatchersClient.Get. +type WatchersClientGetResponse struct { + // Network watcher in a resource group. + Watcher +} + +// WatchersClientGetTopologyResponse contains the response from method WatchersClient.GetTopology. +type WatchersClientGetTopologyResponse struct { + // Topology of the specified resource group. + Topology +} + +// WatchersClientGetTroubleshootingResponse contains the response from method WatchersClient.BeginGetTroubleshooting. +type WatchersClientGetTroubleshootingResponse struct { + // Troubleshooting information gained from specified resource. + TroubleshootingResult +} + +// WatchersClientGetTroubleshootingResultResponse contains the response from method WatchersClient.BeginGetTroubleshootingResult. +type WatchersClientGetTroubleshootingResultResponse struct { + // Troubleshooting information gained from specified resource. + TroubleshootingResult +} + +// WatchersClientGetVMSecurityRulesResponse contains the response from method WatchersClient.BeginGetVMSecurityRules. +type WatchersClientGetVMSecurityRulesResponse struct { + // The information about security rules applied to the specified VM. + SecurityGroupViewResult +} + +// WatchersClientListAllResponse contains the response from method WatchersClient.NewListAllPager. +type WatchersClientListAllResponse struct { + // Response for ListNetworkWatchers API service call. + WatcherListResult +} + +// WatchersClientListAvailableProvidersResponse contains the response from method WatchersClient.BeginListAvailableProviders. +type WatchersClientListAvailableProvidersResponse struct { + // List of available countries with details. + AvailableProvidersList +} + +// WatchersClientListResponse contains the response from method WatchersClient.NewListPager. +type WatchersClientListResponse struct { + // Response for ListNetworkWatchers API service call. + WatcherListResult +} + +// WatchersClientSetFlowLogConfigurationResponse contains the response from method WatchersClient.BeginSetFlowLogConfiguration. +type WatchersClientSetFlowLogConfigurationResponse struct { + // Information on the configuration of flow log and traffic analytics (optional) . + FlowLogInformation +} + +// WatchersClientUpdateTagsResponse contains the response from method WatchersClient.UpdateTags. +type WatchersClientUpdateTagsResponse struct { + // Network watcher in a resource group. + Watcher +} + +// WatchersClientVerifyIPFlowResponse contains the response from method WatchersClient.BeginVerifyIPFlow. +type WatchersClientVerifyIPFlowResponse struct { + // Results of IP flow verification on the target resource. + VerificationIPFlowResult +} + +// WebApplicationFirewallPoliciesClientCreateOrUpdateResponse contains the response from method WebApplicationFirewallPoliciesClient.CreateOrUpdate. +type WebApplicationFirewallPoliciesClientCreateOrUpdateResponse struct { + // Defines web application firewall policy. + WebApplicationFirewallPolicy +} + +// WebApplicationFirewallPoliciesClientDeleteResponse contains the response from method WebApplicationFirewallPoliciesClient.BeginDelete. +type WebApplicationFirewallPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// WebApplicationFirewallPoliciesClientGetResponse contains the response from method WebApplicationFirewallPoliciesClient.Get. +type WebApplicationFirewallPoliciesClientGetResponse struct { + // Defines web application firewall policy. + WebApplicationFirewallPolicy +} + +// WebApplicationFirewallPoliciesClientListAllResponse contains the response from method WebApplicationFirewallPoliciesClient.NewListAllPager. +type WebApplicationFirewallPoliciesClientListAllResponse struct { + // Result of the request to list WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects + // and a URL link to get the next set of results. + WebApplicationFirewallPolicyListResult +} + +// WebApplicationFirewallPoliciesClientListResponse contains the response from method WebApplicationFirewallPoliciesClient.NewListPager. +type WebApplicationFirewallPoliciesClientListResponse struct { + // Result of the request to list WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects + // and a URL link to get the next set of results. + WebApplicationFirewallPolicyListResult +} + +// WebCategoriesClientGetResponse contains the response from method WebCategoriesClient.Get. +type WebCategoriesClientGetResponse struct { + // Azure Web Category Resource. + AzureWebCategory +} + +// WebCategoriesClientListBySubscriptionResponse contains the response from method WebCategoriesClient.NewListBySubscriptionPager. +type WebCategoriesClientListBySubscriptionResponse struct { + // Response for ListAzureWebCategories API service call. + AzureWebCategoryListResult +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routefilterrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routefilterrules_client.go new file mode 100644 index 00000000..ba54a5e0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routefilterrules_client.go @@ -0,0 +1,347 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RouteFilterRulesClient contains the methods for the RouteFilterRules group. +// Don't use this type directly, use NewRouteFilterRulesClient() instead. +type RouteFilterRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRouteFilterRulesClient creates a new instance of RouteFilterRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRouteFilterRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteFilterRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RouteFilterRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a route in the specified route filter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - ruleName - The name of the route filter rule. +// - routeFilterRuleParameters - Parameters supplied to the create or update route filter rule operation. +// - options - RouteFilterRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFilterRulesClient.BeginCreateOrUpdate +// method. +func (client *RouteFilterRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, options *RouteFilterRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteFilterRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteFilterRulesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteFilterRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a route in the specified route filter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RouteFilterRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, options *RouteFilterRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RouteFilterRulesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RouteFilterRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, options *RouteFilterRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeFilterName == "" { + return nil, errors.New("parameter routeFilterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, routeFilterRuleParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified rule from a route filter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - ruleName - The name of the rule. +// - options - RouteFilterRulesClientBeginDeleteOptions contains the optional parameters for the RouteFilterRulesClient.BeginDelete +// method. +func (client *RouteFilterRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientBeginDeleteOptions) (*runtime.Poller[RouteFilterRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, routeFilterName, ruleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteFilterRulesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteFilterRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified rule from a route filter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RouteFilterRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RouteFilterRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeFilterName, ruleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RouteFilterRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeFilterName == "" { + return nil, errors.New("parameter routeFilterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified rule from a route filter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - ruleName - The name of the rule. +// - options - RouteFilterRulesClientGetOptions contains the optional parameters for the RouteFilterRulesClient.Get method. +func (client *RouteFilterRulesClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientGetOptions) (RouteFilterRulesClientGetResponse, error) { + var err error + const operationName = "RouteFilterRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, routeFilterName, ruleName, options) + if err != nil { + return RouteFilterRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RouteFilterRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RouteFilterRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RouteFilterRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeFilterName == "" { + return nil, errors.New("parameter routeFilterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RouteFilterRulesClient) getHandleResponse(resp *http.Response) (RouteFilterRulesClientGetResponse, error) { + result := RouteFilterRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterRule); err != nil { + return RouteFilterRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListByRouteFilterPager - Gets all RouteFilterRules in a route filter. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - options - RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.NewListByRouteFilterPager +// method. +func (client *RouteFilterRulesClient) NewListByRouteFilterPager(resourceGroupName string, routeFilterName string, options *RouteFilterRulesClientListByRouteFilterOptions) *runtime.Pager[RouteFilterRulesClientListByRouteFilterResponse] { + return runtime.NewPager(runtime.PagingHandler[RouteFilterRulesClientListByRouteFilterResponse]{ + More: func(page RouteFilterRulesClientListByRouteFilterResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RouteFilterRulesClientListByRouteFilterResponse) (RouteFilterRulesClientListByRouteFilterResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteFilterRulesClient.NewListByRouteFilterPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByRouteFilterCreateRequest(ctx, resourceGroupName, routeFilterName, options) + }, nil) + if err != nil { + return RouteFilterRulesClientListByRouteFilterResponse{}, err + } + return client.listByRouteFilterHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByRouteFilterCreateRequest creates the ListByRouteFilter request. +func (client *RouteFilterRulesClient) listByRouteFilterCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFilterRulesClientListByRouteFilterOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeFilterName == "" { + return nil, errors.New("parameter routeFilterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByRouteFilterHandleResponse handles the ListByRouteFilter response. +func (client *RouteFilterRulesClient) listByRouteFilterHandleResponse(resp *http.Response) (RouteFilterRulesClientListByRouteFilterResponse, error) { + result := RouteFilterRulesClientListByRouteFilterResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterRuleListResult); err != nil { + return RouteFilterRulesClientListByRouteFilterResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routefilters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routefilters_client.go new file mode 100644 index 00000000..02c564a7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routefilters_client.go @@ -0,0 +1,452 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RouteFiltersClient contains the methods for the RouteFilters group. +// Don't use this type directly, use NewRouteFiltersClient() instead. +type RouteFiltersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRouteFiltersClient creates a new instance of RouteFiltersClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRouteFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteFiltersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RouteFiltersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a route filter in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - routeFilterParameters - Parameters supplied to the create or update route filter operation. +// - options - RouteFiltersClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFiltersClient.BeginCreateOrUpdate +// method. +func (client *RouteFiltersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, options *RouteFiltersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteFiltersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, routeFilterName, routeFilterParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteFiltersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteFiltersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a route filter in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RouteFiltersClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, options *RouteFiltersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RouteFiltersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeFilterName, routeFilterParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RouteFiltersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, options *RouteFiltersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeFilterName == "" { + return nil, errors.New("parameter routeFilterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, routeFilterParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified route filter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - options - RouteFiltersClientBeginDeleteOptions contains the optional parameters for the RouteFiltersClient.BeginDelete +// method. +func (client *RouteFiltersClient) BeginDelete(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientBeginDeleteOptions) (*runtime.Poller[RouteFiltersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, routeFilterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteFiltersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteFiltersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified route filter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RouteFiltersClient) deleteOperation(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RouteFiltersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeFilterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RouteFiltersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeFilterName == "" { + return nil, errors.New("parameter routeFilterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified route filter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - options - RouteFiltersClientGetOptions contains the optional parameters for the RouteFiltersClient.Get method. +func (client *RouteFiltersClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientGetOptions) (RouteFiltersClientGetResponse, error) { + var err error + const operationName = "RouteFiltersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, routeFilterName, options) + if err != nil { + return RouteFiltersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RouteFiltersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RouteFiltersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RouteFiltersClient) getCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeFilterName == "" { + return nil, errors.New("parameter routeFilterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RouteFiltersClient) getHandleResponse(resp *http.Response) (RouteFiltersClientGetResponse, error) { + result := RouteFiltersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilter); err != nil { + return RouteFiltersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all route filters in a subscription. +// +// Generated from API version 2024-05-01 +// - options - RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.NewListPager method. +func (client *RouteFiltersClient) NewListPager(options *RouteFiltersClientListOptions) *runtime.Pager[RouteFiltersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RouteFiltersClientListResponse]{ + More: func(page RouteFiltersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RouteFiltersClientListResponse) (RouteFiltersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteFiltersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return RouteFiltersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RouteFiltersClient) listCreateRequest(ctx context.Context, options *RouteFiltersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RouteFiltersClient) listHandleResponse(resp *http.Response) (RouteFiltersClientListResponse, error) { + result := RouteFiltersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterListResult); err != nil { + return RouteFiltersClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets all route filters in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.NewListByResourceGroupPager +// method. +func (client *RouteFiltersClient) NewListByResourceGroupPager(resourceGroupName string, options *RouteFiltersClientListByResourceGroupOptions) *runtime.Pager[RouteFiltersClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[RouteFiltersClientListByResourceGroupResponse]{ + More: func(page RouteFiltersClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RouteFiltersClientListByResourceGroupResponse) (RouteFiltersClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteFiltersClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return RouteFiltersClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *RouteFiltersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *RouteFiltersClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *RouteFiltersClient) listByResourceGroupHandleResponse(resp *http.Response) (RouteFiltersClientListByResourceGroupResponse, error) { + result := RouteFiltersClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterListResult); err != nil { + return RouteFiltersClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates tags of a route filter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - parameters - Parameters supplied to update route filter tags. +// - options - RouteFiltersClientUpdateTagsOptions contains the optional parameters for the RouteFiltersClient.UpdateTags method. +func (client *RouteFiltersClient) UpdateTags(ctx context.Context, resourceGroupName string, routeFilterName string, parameters TagsObject, options *RouteFiltersClientUpdateTagsOptions) (RouteFiltersClientUpdateTagsResponse, error) { + var err error + const operationName = "RouteFiltersClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, routeFilterName, parameters, options) + if err != nil { + return RouteFiltersClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RouteFiltersClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RouteFiltersClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *RouteFiltersClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, routeFilterName string, parameters TagsObject, options *RouteFiltersClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeFilterName == "" { + return nil, errors.New("parameter routeFilterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeFilterName}", url.PathEscape(routeFilterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *RouteFiltersClient) updateTagsHandleResponse(resp *http.Response) (RouteFiltersClientUpdateTagsResponse, error) { + result := RouteFiltersClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilter); err != nil { + return RouteFiltersClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routemaps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routemaps_client.go new file mode 100644 index 00000000..95ae4730 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routemaps_client.go @@ -0,0 +1,345 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RouteMapsClient contains the methods for the RouteMaps group. +// Don't use this type directly, use NewRouteMapsClient() instead. +type RouteMapsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRouteMapsClient creates a new instance of RouteMapsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRouteMapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteMapsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RouteMapsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a RouteMap if it doesn't exist else updates the existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the RouteMap's resource group. +// - virtualHubName - The name of the VirtualHub containing the RouteMap. +// - routeMapName - The name of the RouteMap. +// - routeMapParameters - Parameters supplied to create or update a RouteMap. +// - options - RouteMapsClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteMapsClient.BeginCreateOrUpdate +// method. +func (client *RouteMapsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, routeMapParameters RouteMap, options *RouteMapsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteMapsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeMapName, routeMapParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteMapsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteMapsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a RouteMap if it doesn't exist else updates the existing one. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RouteMapsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, routeMapParameters RouteMap, options *RouteMapsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RouteMapsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routeMapName, routeMapParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RouteMapsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, routeMapParameters RouteMap, options *RouteMapsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routeMapName == "" { + return nil, errors.New("parameter routeMapName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeMapName}", url.PathEscape(routeMapName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, routeMapParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a RouteMap. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the RouteMap's resource group. +// - virtualHubName - The name of the VirtualHub containing the RouteMap. +// - routeMapName - The name of the RouteMap. +// - options - RouteMapsClientBeginDeleteOptions contains the optional parameters for the RouteMapsClient.BeginDelete method. +func (client *RouteMapsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, options *RouteMapsClientBeginDeleteOptions) (*runtime.Poller[RouteMapsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeMapName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteMapsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteMapsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a RouteMap. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RouteMapsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, options *RouteMapsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RouteMapsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routeMapName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RouteMapsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, options *RouteMapsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routeMapName == "" { + return nil, errors.New("parameter routeMapName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeMapName}", url.PathEscape(routeMapName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a RouteMap. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the RouteMap's resource group. +// - virtualHubName - The name of the VirtualHub containing the RouteMap. +// - routeMapName - The name of the RouteMap. +// - options - RouteMapsClientGetOptions contains the optional parameters for the RouteMapsClient.Get method. +func (client *RouteMapsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, options *RouteMapsClientGetOptions) (RouteMapsClientGetResponse, error) { + var err error + const operationName = "RouteMapsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routeMapName, options) + if err != nil { + return RouteMapsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RouteMapsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RouteMapsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RouteMapsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, options *RouteMapsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps/{routeMapName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routeMapName == "" { + return nil, errors.New("parameter routeMapName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeMapName}", url.PathEscape(routeMapName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RouteMapsClient) getHandleResponse(resp *http.Response) (RouteMapsClientGetResponse, error) { + result := RouteMapsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteMap); err != nil { + return RouteMapsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Retrieves the details of all RouteMaps. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the RouteMap's resource group'. +// - virtualHubName - The name of the VirtualHub containing the RouteMap. +// - options - RouteMapsClientListOptions contains the optional parameters for the RouteMapsClient.NewListPager method. +func (client *RouteMapsClient) NewListPager(resourceGroupName string, virtualHubName string, options *RouteMapsClientListOptions) *runtime.Pager[RouteMapsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RouteMapsClientListResponse]{ + More: func(page RouteMapsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RouteMapsClientListResponse) (RouteMapsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteMapsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) + if err != nil { + return RouteMapsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RouteMapsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *RouteMapsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeMaps" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RouteMapsClient) listHandleResponse(resp *http.Response) (RouteMapsClientListResponse, error) { + result := RouteMapsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListRouteMapsResult); err != nil { + return RouteMapsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routes_client.go new file mode 100644 index 00000000..c36ccd11 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routes_client.go @@ -0,0 +1,345 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RoutesClient contains the methods for the Routes group. +// Don't use this type directly, use NewRoutesClient() instead. +type RoutesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRoutesClient creates a new instance of RoutesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RoutesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a route in the specified route table. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - routeName - The name of the route. +// - routeParameters - Parameters supplied to the create or update route operation. +// - options - RoutesClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutesClient.BeginCreateOrUpdate +// method. +func (client *RoutesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route, options *RoutesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RoutesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, routeTableName, routeName, routeParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a route in the specified route table. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RoutesClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route, options *RoutesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RoutesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeTableName, routeName, routeParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RoutesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route, options *RoutesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, routeParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified route from a route table. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - routeName - The name of the route. +// - options - RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. +func (client *RoutesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientBeginDeleteOptions) (*runtime.Poller[RoutesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, routeTableName, routeName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified route from a route table. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RoutesClient) deleteOperation(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RoutesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeTableName, routeName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RoutesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified route from a route table. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - routeName - The name of the route. +// - options - RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. +func (client *RoutesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientGetOptions) (RoutesClientGetResponse, error) { + var err error + const operationName = "RoutesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, routeTableName, routeName, options) + if err != nil { + return RoutesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RoutesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RoutesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RoutesClient) getCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + if routeName == "" { + return nil, errors.New("parameter routeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeName}", url.PathEscape(routeName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RoutesClient) getHandleResponse(resp *http.Response) (RoutesClientGetResponse, error) { + result := RoutesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Route); err != nil { + return RoutesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all routes in a route table. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - options - RoutesClientListOptions contains the optional parameters for the RoutesClient.NewListPager method. +func (client *RoutesClient) NewListPager(resourceGroupName string, routeTableName string, options *RoutesClientListOptions) *runtime.Pager[RoutesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RoutesClientListResponse]{ + More: func(page RoutesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RoutesClientListResponse) (RoutesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RoutesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, routeTableName, options) + }, nil) + if err != nil { + return RoutesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RoutesClient) listCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, options *RoutesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RoutesClient) listHandleResponse(resp *http.Response) (RoutesClientListResponse, error) { + result := RoutesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteListResult); err != nil { + return RoutesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routetables_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routetables_client.go new file mode 100644 index 00000000..c1f4a9cb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routetables_client.go @@ -0,0 +1,450 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RouteTablesClient contains the methods for the RouteTables group. +// Don't use this type directly, use NewRouteTablesClient() instead. +type RouteTablesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRouteTablesClient creates a new instance of RouteTablesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteTablesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RouteTablesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or updates a route table in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - parameters - Parameters supplied to the create or update route table operation. +// - options - RouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteTablesClient.BeginCreateOrUpdate +// method. +func (client *RouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable, options *RouteTablesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteTablesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, routeTableName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteTablesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteTablesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or updates a route table in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RouteTablesClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable, options *RouteTablesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RouteTablesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeTableName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RouteTablesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable, options *RouteTablesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified route table. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - options - RouteTablesClientBeginDeleteOptions contains the optional parameters for the RouteTablesClient.BeginDelete method. +func (client *RouteTablesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientBeginDeleteOptions) (*runtime.Poller[RouteTablesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, routeTableName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RouteTablesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RouteTablesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified route table. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RouteTablesClient) deleteOperation(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RouteTablesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeTableName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RouteTablesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified route table. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - options - RouteTablesClientGetOptions contains the optional parameters for the RouteTablesClient.Get method. +func (client *RouteTablesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientGetOptions) (RouteTablesClientGetResponse, error) { + var err error + const operationName = "RouteTablesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, routeTableName, options) + if err != nil { + return RouteTablesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RouteTablesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RouteTablesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RouteTablesClient) getCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RouteTablesClient) getHandleResponse(resp *http.Response) (RouteTablesClientGetResponse, error) { + result := RouteTablesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteTable); err != nil { + return RouteTablesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all route tables in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.NewListPager method. +func (client *RouteTablesClient) NewListPager(resourceGroupName string, options *RouteTablesClientListOptions) *runtime.Pager[RouteTablesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RouteTablesClientListResponse]{ + More: func(page RouteTablesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RouteTablesClientListResponse) (RouteTablesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteTablesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return RouteTablesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RouteTablesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *RouteTablesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RouteTablesClient) listHandleResponse(resp *http.Response) (RouteTablesClientListResponse, error) { + result := RouteTablesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteTableListResult); err != nil { + return RouteTablesClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all route tables in a subscription. +// +// Generated from API version 2024-05-01 +// - options - RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.NewListAllPager method. +func (client *RouteTablesClient) NewListAllPager(options *RouteTablesClientListAllOptions) *runtime.Pager[RouteTablesClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[RouteTablesClientListAllResponse]{ + More: func(page RouteTablesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RouteTablesClientListAllResponse) (RouteTablesClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RouteTablesClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return RouteTablesClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *RouteTablesClient) listAllCreateRequest(ctx context.Context, options *RouteTablesClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *RouteTablesClient) listAllHandleResponse(resp *http.Response) (RouteTablesClientListAllResponse, error) { + result := RouteTablesClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteTableListResult); err != nil { + return RouteTablesClientListAllResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates a route table tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - parameters - Parameters supplied to update route table tags. +// - options - RouteTablesClientUpdateTagsOptions contains the optional parameters for the RouteTablesClient.UpdateTags method. +func (client *RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject, options *RouteTablesClientUpdateTagsOptions) (RouteTablesClientUpdateTagsResponse, error) { + var err error + const operationName = "RouteTablesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, routeTableName, parameters, options) + if err != nil { + return RouteTablesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RouteTablesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RouteTablesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *RouteTablesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject, options *RouteTablesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *RouteTablesClient) updateTagsHandleResponse(resp *http.Response) (RouteTablesClientUpdateTagsResponse, error) { + result := RouteTablesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RouteTable); err != nil { + return RouteTablesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routingintent_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routingintent_client.go new file mode 100644 index 00000000..7b91c238 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routingintent_client.go @@ -0,0 +1,346 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RoutingIntentClient contains the methods for the RoutingIntent group. +// Don't use this type directly, use NewRoutingIntentClient() instead. +type RoutingIntentClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRoutingIntentClient creates a new instance of RoutingIntentClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRoutingIntentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutingIntentClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RoutingIntentClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the RoutingIntent. +// - virtualHubName - The name of the VirtualHub. +// - routingIntentName - The name of the per VirtualHub singleton Routing Intent resource. +// - routingIntentParameters - Parameters supplied to create or update RoutingIntent. +// - options - RoutingIntentClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutingIntentClient.BeginCreateOrUpdate +// method. +func (client *RoutingIntentClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent, options *RoutingIntentClientBeginCreateOrUpdateOptions) (*runtime.Poller[RoutingIntentClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutingIntentClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutingIntentClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RoutingIntentClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent, options *RoutingIntentClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "RoutingIntentClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RoutingIntentClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent, options *RoutingIntentClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routingIntentName == "" { + return nil, errors.New("parameter routingIntentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routingIntentName}", url.PathEscape(routingIntentName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, routingIntentParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a RoutingIntent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the RoutingIntent. +// - virtualHubName - The name of the VirtualHub. +// - routingIntentName - The name of the RoutingIntent. +// - options - RoutingIntentClientBeginDeleteOptions contains the optional parameters for the RoutingIntentClient.BeginDelete +// method. +func (client *RoutingIntentClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientBeginDeleteOptions) (*runtime.Poller[RoutingIntentClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routingIntentName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutingIntentClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutingIntentClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a RoutingIntent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RoutingIntentClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RoutingIntentClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routingIntentName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RoutingIntentClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routingIntentName == "" { + return nil, errors.New("parameter routingIntentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routingIntentName}", url.PathEscape(routingIntentName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a RoutingIntent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the RoutingIntent. +// - virtualHubName - The name of the VirtualHub. +// - routingIntentName - The name of the RoutingIntent. +// - options - RoutingIntentClientGetOptions contains the optional parameters for the RoutingIntentClient.Get method. +func (client *RoutingIntentClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientGetOptions) (RoutingIntentClientGetResponse, error) { + var err error + const operationName = "RoutingIntentClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routingIntentName, options) + if err != nil { + return RoutingIntentClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RoutingIntentClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RoutingIntentClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RoutingIntentClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routingIntentName == "" { + return nil, errors.New("parameter routingIntentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routingIntentName}", url.PathEscape(routingIntentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RoutingIntentClient) getHandleResponse(resp *http.Response) (RoutingIntentClientGetResponse, error) { + result := RoutingIntentClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RoutingIntent); err != nil { + return RoutingIntentClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Retrieves the details of all RoutingIntent child resources of the VirtualHub. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.NewListPager method. +func (client *RoutingIntentClient) NewListPager(resourceGroupName string, virtualHubName string, options *RoutingIntentClientListOptions) *runtime.Pager[RoutingIntentClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RoutingIntentClientListResponse]{ + More: func(page RoutingIntentClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RoutingIntentClientListResponse) (RoutingIntentClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RoutingIntentClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) + if err != nil { + return RoutingIntentClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RoutingIntentClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *RoutingIntentClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RoutingIntentClient) listHandleResponse(resp *http.Response) (RoutingIntentClientListResponse, error) { + result := RoutingIntentClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListRoutingIntentResult); err != nil { + return RoutingIntentClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routingrulecollections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routingrulecollections_client.go new file mode 100644 index 00000000..ec582769 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routingrulecollections_client.go @@ -0,0 +1,366 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RoutingRuleCollectionsClient contains the methods for the RoutingRuleCollections group. +// Don't use this type directly, use NewRoutingRuleCollectionsClient() instead. +type RoutingRuleCollectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRoutingRuleCollectionsClient creates a new instance of RoutingRuleCollectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRoutingRuleCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutingRuleCollectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RoutingRuleCollectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a routing rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - ruleCollectionName - The name of the network manager routing Configuration rule collection. +// - ruleCollection - The Rule Collection to create or update +// - options - RoutingRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the RoutingRuleCollectionsClient.CreateOrUpdate +// method. +func (client *RoutingRuleCollectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleCollection RoutingRuleCollection, options *RoutingRuleCollectionsClientCreateOrUpdateOptions) (RoutingRuleCollectionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "RoutingRuleCollectionsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleCollection, options) + if err != nil { + return RoutingRuleCollectionsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RoutingRuleCollectionsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return RoutingRuleCollectionsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RoutingRuleCollectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleCollection RoutingRuleCollection, options *RoutingRuleCollectionsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, ruleCollection); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *RoutingRuleCollectionsClient) createOrUpdateHandleResponse(resp *http.Response) (RoutingRuleCollectionsClientCreateOrUpdateResponse, error) { + result := RoutingRuleCollectionsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RoutingRuleCollection); err != nil { + return RoutingRuleCollectionsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes an routing rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - ruleCollectionName - The name of the network manager routing Configuration rule collection. +// - options - RoutingRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the RoutingRuleCollectionsClient.BeginDelete +// method. +func (client *RoutingRuleCollectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *RoutingRuleCollectionsClientBeginDeleteOptions) (*runtime.Poller[RoutingRuleCollectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutingRuleCollectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutingRuleCollectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an routing rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RoutingRuleCollectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *RoutingRuleCollectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RoutingRuleCollectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RoutingRuleCollectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *RoutingRuleCollectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a network manager routing configuration rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - ruleCollectionName - The name of the network manager routing Configuration rule collection. +// - options - RoutingRuleCollectionsClientGetOptions contains the optional parameters for the RoutingRuleCollectionsClient.Get +// method. +func (client *RoutingRuleCollectionsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *RoutingRuleCollectionsClientGetOptions) (RoutingRuleCollectionsClientGetResponse, error) { + var err error + const operationName = "RoutingRuleCollectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + if err != nil { + return RoutingRuleCollectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RoutingRuleCollectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RoutingRuleCollectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RoutingRuleCollectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *RoutingRuleCollectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RoutingRuleCollectionsClient) getHandleResponse(resp *http.Response) (RoutingRuleCollectionsClientGetResponse, error) { + result := RoutingRuleCollectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RoutingRuleCollection); err != nil { + return RoutingRuleCollectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the rule collections in a routing configuration, in a paginated format. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - options - RoutingRuleCollectionsClientListOptions contains the optional parameters for the RoutingRuleCollectionsClient.NewListPager +// method. +func (client *RoutingRuleCollectionsClient) NewListPager(resourceGroupName string, networkManagerName string, configurationName string, options *RoutingRuleCollectionsClientListOptions) *runtime.Pager[RoutingRuleCollectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RoutingRuleCollectionsClientListResponse]{ + More: func(page RoutingRuleCollectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RoutingRuleCollectionsClientListResponse) (RoutingRuleCollectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RoutingRuleCollectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + }, nil) + if err != nil { + return RoutingRuleCollectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RoutingRuleCollectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *RoutingRuleCollectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RoutingRuleCollectionsClient) listHandleResponse(resp *http.Response) (RoutingRuleCollectionsClientListResponse, error) { + result := RoutingRuleCollectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RoutingRuleCollectionListResult); err != nil { + return RoutingRuleCollectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routingrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routingrules_client.go new file mode 100644 index 00000000..5db1470a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/routingrules_client.go @@ -0,0 +1,384 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RoutingRulesClient contains the methods for the RoutingRules group. +// Don't use this type directly, use NewRoutingRulesClient() instead. +type RoutingRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRoutingRulesClient creates a new instance of RoutingRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRoutingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutingRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RoutingRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates an routing rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - ruleCollectionName - The name of the network manager routing Configuration rule collection. +// - ruleName - The name of the rule. +// - routingRule - The routing rule to create or update +// - options - RoutingRulesClientCreateOrUpdateOptions contains the optional parameters for the RoutingRulesClient.CreateOrUpdate +// method. +func (client *RoutingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, routingRule RoutingRule, options *RoutingRulesClientCreateOrUpdateOptions) (RoutingRulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "RoutingRulesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, routingRule, options) + if err != nil { + return RoutingRulesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RoutingRulesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return RoutingRulesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RoutingRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, routingRule RoutingRule, options *RoutingRulesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, routingRule); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *RoutingRulesClient) createOrUpdateHandleResponse(resp *http.Response) (RoutingRulesClientCreateOrUpdateResponse, error) { + result := RoutingRulesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RoutingRule); err != nil { + return RoutingRulesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes a routing rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - ruleCollectionName - The name of the network manager routing Configuration rule collection. +// - ruleName - The name of the rule. +// - options - RoutingRulesClientBeginDeleteOptions contains the optional parameters for the RoutingRulesClient.BeginDelete +// method. +func (client *RoutingRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *RoutingRulesClientBeginDeleteOptions) (*runtime.Poller[RoutingRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RoutingRulesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RoutingRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a routing rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *RoutingRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *RoutingRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "RoutingRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RoutingRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *RoutingRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a network manager routing configuration routing rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - ruleCollectionName - The name of the network manager routing Configuration rule collection. +// - ruleName - The name of the rule. +// - options - RoutingRulesClientGetOptions contains the optional parameters for the RoutingRulesClient.Get method. +func (client *RoutingRulesClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *RoutingRulesClientGetOptions) (RoutingRulesClientGetResponse, error) { + var err error + const operationName = "RoutingRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) + if err != nil { + return RoutingRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RoutingRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RoutingRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RoutingRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *RoutingRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RoutingRulesClient) getHandleResponse(resp *http.Response) (RoutingRulesClientGetResponse, error) { + result := RoutingRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RoutingRule); err != nil { + return RoutingRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all network manager routing configuration routing rules. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Routing Configuration. +// - ruleCollectionName - The name of the network manager routing Configuration rule collection. +// - options - RoutingRulesClientListOptions contains the optional parameters for the RoutingRulesClient.NewListPager method. +func (client *RoutingRulesClient) NewListPager(resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *RoutingRulesClientListOptions) *runtime.Pager[RoutingRulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RoutingRulesClientListResponse]{ + More: func(page RoutingRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RoutingRulesClientListResponse) (RoutingRulesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RoutingRulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + }, nil) + if err != nil { + return RoutingRulesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RoutingRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *RoutingRulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/routingConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RoutingRulesClient) listHandleResponse(resp *http.Response) (RoutingRulesClientListResponse, error) { + result := RoutingRulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RoutingRuleListResult); err != nil { + return RoutingRulesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/scopeconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/scopeconnections_client.go new file mode 100644 index 00000000..95db6b1b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/scopeconnections_client.go @@ -0,0 +1,319 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ScopeConnectionsClient contains the methods for the ScopeConnections group. +// Don't use this type directly, use NewScopeConnectionsClient() instead. +type ScopeConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewScopeConnectionsClient creates a new instance of ScopeConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewScopeConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ScopeConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates scope connection from Network Manager +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - scopeConnectionName - Name for the cross-tenant connection. +// - parameters - Scope connection to be created/updated. +// - options - ScopeConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ScopeConnectionsClient.CreateOrUpdate +// method. +func (client *ScopeConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, parameters ScopeConnection, options *ScopeConnectionsClientCreateOrUpdateOptions) (ScopeConnectionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ScopeConnectionsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, scopeConnectionName, parameters, options) + if err != nil { + return ScopeConnectionsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScopeConnectionsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ScopeConnectionsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ScopeConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, parameters ScopeConnection, options *ScopeConnectionsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if scopeConnectionName == "" { + return nil, errors.New("parameter scopeConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scopeConnectionName}", url.PathEscape(scopeConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ScopeConnectionsClient) createOrUpdateHandleResponse(resp *http.Response) (ScopeConnectionsClientCreateOrUpdateResponse, error) { + result := ScopeConnectionsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScopeConnection); err != nil { + return ScopeConnectionsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete the pending scope connection created by this network manager. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - scopeConnectionName - Name for the cross-tenant connection. +// - options - ScopeConnectionsClientDeleteOptions contains the optional parameters for the ScopeConnectionsClient.Delete method. +func (client *ScopeConnectionsClient) Delete(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, options *ScopeConnectionsClientDeleteOptions) (ScopeConnectionsClientDeleteResponse, error) { + var err error + const operationName = "ScopeConnectionsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, scopeConnectionName, options) + if err != nil { + return ScopeConnectionsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScopeConnectionsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ScopeConnectionsClientDeleteResponse{}, err + } + return ScopeConnectionsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ScopeConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, options *ScopeConnectionsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if scopeConnectionName == "" { + return nil, errors.New("parameter scopeConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scopeConnectionName}", url.PathEscape(scopeConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get specified scope connection created by this Network Manager. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - scopeConnectionName - Name for the cross-tenant connection. +// - options - ScopeConnectionsClientGetOptions contains the optional parameters for the ScopeConnectionsClient.Get method. +func (client *ScopeConnectionsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, options *ScopeConnectionsClientGetOptions) (ScopeConnectionsClientGetResponse, error) { + var err error + const operationName = "ScopeConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, scopeConnectionName, options) + if err != nil { + return ScopeConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ScopeConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ScopeConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ScopeConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, options *ScopeConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections/{scopeConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if scopeConnectionName == "" { + return nil, errors.New("parameter scopeConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scopeConnectionName}", url.PathEscape(scopeConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ScopeConnectionsClient) getHandleResponse(resp *http.Response) (ScopeConnectionsClientGetResponse, error) { + result := ScopeConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScopeConnection); err != nil { + return ScopeConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all scope connections created by this network manager. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - ScopeConnectionsClientListOptions contains the optional parameters for the ScopeConnectionsClient.NewListPager +// method. +func (client *ScopeConnectionsClient) NewListPager(resourceGroupName string, networkManagerName string, options *ScopeConnectionsClientListOptions) *runtime.Pager[ScopeConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ScopeConnectionsClientListResponse]{ + More: func(page ScopeConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ScopeConnectionsClientListResponse) (ScopeConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ScopeConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) + if err != nil { + return ScopeConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ScopeConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *ScopeConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/scopeConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ScopeConnectionsClient) listHandleResponse(resp *http.Response) (ScopeConnectionsClientListResponse, error) { + result := ScopeConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScopeConnectionListResult); err != nil { + return ScopeConnectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityadminconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityadminconfigurations_client.go new file mode 100644 index 00000000..68e69278 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityadminconfigurations_client.go @@ -0,0 +1,346 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// SecurityAdminConfigurationsClient contains the methods for the SecurityAdminConfigurations group. +// Don't use this type directly, use NewSecurityAdminConfigurationsClient() instead. +type SecurityAdminConfigurationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSecurityAdminConfigurationsClient creates a new instance of SecurityAdminConfigurationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSecurityAdminConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityAdminConfigurationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SecurityAdminConfigurationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a network manager security admin configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - securityAdminConfiguration - The security admin configuration to create or update +// - options - SecurityAdminConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the SecurityAdminConfigurationsClient.CreateOrUpdate +// method. +func (client *SecurityAdminConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, securityAdminConfiguration SecurityAdminConfiguration, options *SecurityAdminConfigurationsClientCreateOrUpdateOptions) (SecurityAdminConfigurationsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SecurityAdminConfigurationsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, securityAdminConfiguration, options) + if err != nil { + return SecurityAdminConfigurationsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityAdminConfigurationsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SecurityAdminConfigurationsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SecurityAdminConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, securityAdminConfiguration SecurityAdminConfiguration, options *SecurityAdminConfigurationsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, securityAdminConfiguration); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *SecurityAdminConfigurationsClient) createOrUpdateHandleResponse(resp *http.Response) (SecurityAdminConfigurationsClientCreateOrUpdateResponse, error) { + result := SecurityAdminConfigurationsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityAdminConfiguration); err != nil { + return SecurityAdminConfigurationsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes a network manager security admin configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - options - SecurityAdminConfigurationsClientBeginDeleteOptions contains the optional parameters for the SecurityAdminConfigurationsClient.BeginDelete +// method. +func (client *SecurityAdminConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientBeginDeleteOptions) (*runtime.Poller[SecurityAdminConfigurationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityAdminConfigurationsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityAdminConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a network manager security admin configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SecurityAdminConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SecurityAdminConfigurationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SecurityAdminConfigurationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves a network manager security admin configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - options - SecurityAdminConfigurationsClientGetOptions contains the optional parameters for the SecurityAdminConfigurationsClient.Get +// method. +func (client *SecurityAdminConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientGetOptions) (SecurityAdminConfigurationsClientGetResponse, error) { + var err error + const operationName = "SecurityAdminConfigurationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return SecurityAdminConfigurationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityAdminConfigurationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityAdminConfigurationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SecurityAdminConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SecurityAdminConfigurationsClient) getHandleResponse(resp *http.Response) (SecurityAdminConfigurationsClientGetResponse, error) { + result := SecurityAdminConfigurationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityAdminConfiguration); err != nil { + return SecurityAdminConfigurationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the network manager security admin configurations in a network manager, in a paginated format. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - SecurityAdminConfigurationsClientListOptions contains the optional parameters for the SecurityAdminConfigurationsClient.NewListPager +// method. +func (client *SecurityAdminConfigurationsClient) NewListPager(resourceGroupName string, networkManagerName string, options *SecurityAdminConfigurationsClientListOptions) *runtime.Pager[SecurityAdminConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SecurityAdminConfigurationsClientListResponse]{ + More: func(page SecurityAdminConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SecurityAdminConfigurationsClientListResponse) (SecurityAdminConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityAdminConfigurationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) + if err != nil { + return SecurityAdminConfigurationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SecurityAdminConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *SecurityAdminConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SecurityAdminConfigurationsClient) listHandleResponse(resp *http.Response) (SecurityAdminConfigurationsClientListResponse, error) { + result := SecurityAdminConfigurationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityAdminConfigurationListResult); err != nil { + return SecurityAdminConfigurationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securitygroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securitygroups_client.go new file mode 100644 index 00000000..e231d3ab --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securitygroups_client.go @@ -0,0 +1,453 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SecurityGroupsClient contains the methods for the NetworkSecurityGroups group. +// Don't use this type directly, use NewSecurityGroupsClient() instead. +type SecurityGroupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSecurityGroupsClient creates a new instance of SecurityGroupsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityGroupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SecurityGroupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a network security group in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - parameters - Parameters supplied to the create or update network security group operation. +// - options - SecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityGroupsClient.BeginCreateOrUpdate +// method. +func (client *SecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, options *SecurityGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SecurityGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityGroupsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a network security group in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SecurityGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, options *SecurityGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SecurityGroupsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SecurityGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, options *SecurityGroupsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkSecurityGroupName == "" { + return nil, errors.New("parameter networkSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified network security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - options - SecurityGroupsClientBeginDeleteOptions contains the optional parameters for the SecurityGroupsClient.BeginDelete +// method. +func (client *SecurityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientBeginDeleteOptions) (*runtime.Poller[SecurityGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkSecurityGroupName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityGroupsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityGroupsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified network security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SecurityGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SecurityGroupsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SecurityGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkSecurityGroupName == "" { + return nil, errors.New("parameter networkSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified network security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - options - SecurityGroupsClientGetOptions contains the optional parameters for the SecurityGroupsClient.Get method. +func (client *SecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientGetOptions) (SecurityGroupsClientGetResponse, error) { + var err error + const operationName = "SecurityGroupsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) + if err != nil { + return SecurityGroupsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityGroupsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityGroupsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SecurityGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkSecurityGroupName == "" { + return nil, errors.New("parameter networkSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SecurityGroupsClient) getHandleResponse(resp *http.Response) (SecurityGroupsClientGetResponse, error) { + result := SecurityGroupsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroup); err != nil { + return SecurityGroupsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all network security groups in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.NewListPager method. +func (client *SecurityGroupsClient) NewListPager(resourceGroupName string, options *SecurityGroupsClientListOptions) *runtime.Pager[SecurityGroupsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SecurityGroupsClientListResponse]{ + More: func(page SecurityGroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SecurityGroupsClientListResponse) (SecurityGroupsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityGroupsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return SecurityGroupsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SecurityGroupsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *SecurityGroupsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SecurityGroupsClient) listHandleResponse(resp *http.Response) (SecurityGroupsClientListResponse, error) { + result := SecurityGroupsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroupListResult); err != nil { + return SecurityGroupsClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all network security groups in a subscription. +// +// Generated from API version 2024-05-01 +// - options - SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.NewListAllPager +// method. +func (client *SecurityGroupsClient) NewListAllPager(options *SecurityGroupsClientListAllOptions) *runtime.Pager[SecurityGroupsClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[SecurityGroupsClientListAllResponse]{ + More: func(page SecurityGroupsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SecurityGroupsClientListAllResponse) (SecurityGroupsClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityGroupsClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return SecurityGroupsClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *SecurityGroupsClient) listAllCreateRequest(ctx context.Context, options *SecurityGroupsClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *SecurityGroupsClient) listAllHandleResponse(resp *http.Response) (SecurityGroupsClientListAllResponse, error) { + result := SecurityGroupsClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroupListResult); err != nil { + return SecurityGroupsClientListAllResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates a network security group tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - parameters - Parameters supplied to update network security group tags. +// - options - SecurityGroupsClientUpdateTagsOptions contains the optional parameters for the SecurityGroupsClient.UpdateTags +// method. +func (client *SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject, options *SecurityGroupsClientUpdateTagsOptions) (SecurityGroupsClientUpdateTagsResponse, error) { + var err error + const operationName = "SecurityGroupsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) + if err != nil { + return SecurityGroupsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityGroupsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityGroupsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *SecurityGroupsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject, options *SecurityGroupsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkSecurityGroupName == "" { + return nil, errors.New("parameter networkSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *SecurityGroupsClient) updateTagsHandleResponse(resp *http.Response) (SecurityGroupsClientUpdateTagsResponse, error) { + result := SecurityGroupsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroup); err != nil { + return SecurityGroupsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securitypartnerproviders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securitypartnerproviders_client.go new file mode 100644 index 00000000..ce869517 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securitypartnerproviders_client.go @@ -0,0 +1,452 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SecurityPartnerProvidersClient contains the methods for the SecurityPartnerProviders group. +// Don't use this type directly, use NewSecurityPartnerProvidersClient() instead. +type SecurityPartnerProvidersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSecurityPartnerProvidersClient creates a new instance of SecurityPartnerProvidersClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSecurityPartnerProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityPartnerProvidersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SecurityPartnerProvidersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified Security Partner Provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - securityPartnerProviderName - The name of the Security Partner Provider. +// - parameters - Parameters supplied to the create or update Security Partner Provider operation. +// - options - SecurityPartnerProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginCreateOrUpdate +// method. +func (client *SecurityPartnerProvidersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider, options *SecurityPartnerProvidersClientBeginCreateOrUpdateOptions) (*runtime.Poller[SecurityPartnerProvidersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityPartnerProvidersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityPartnerProvidersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified Security Partner Provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SecurityPartnerProvidersClient) createOrUpdate(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider, options *SecurityPartnerProvidersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SecurityPartnerProvidersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SecurityPartnerProvidersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider, options *SecurityPartnerProvidersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if securityPartnerProviderName == "" { + return nil, errors.New("parameter securityPartnerProviderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityPartnerProviderName}", url.PathEscape(securityPartnerProviderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified Security Partner Provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - securityPartnerProviderName - The name of the Security Partner Provider. +// - options - SecurityPartnerProvidersClientBeginDeleteOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginDelete +// method. +func (client *SecurityPartnerProvidersClient) BeginDelete(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientBeginDeleteOptions) (*runtime.Poller[SecurityPartnerProvidersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, securityPartnerProviderName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityPartnerProvidersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityPartnerProvidersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified Security Partner Provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SecurityPartnerProvidersClient) deleteOperation(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SecurityPartnerProvidersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SecurityPartnerProvidersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if securityPartnerProviderName == "" { + return nil, errors.New("parameter securityPartnerProviderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityPartnerProviderName}", url.PathEscape(securityPartnerProviderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Security Partner Provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - securityPartnerProviderName - The name of the Security Partner Provider. +// - options - SecurityPartnerProvidersClientGetOptions contains the optional parameters for the SecurityPartnerProvidersClient.Get +// method. +func (client *SecurityPartnerProvidersClient) Get(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientGetOptions) (SecurityPartnerProvidersClientGetResponse, error) { + var err error + const operationName = "SecurityPartnerProvidersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, options) + if err != nil { + return SecurityPartnerProvidersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityPartnerProvidersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityPartnerProvidersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SecurityPartnerProvidersClient) getCreateRequest(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if securityPartnerProviderName == "" { + return nil, errors.New("parameter securityPartnerProviderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityPartnerProviderName}", url.PathEscape(securityPartnerProviderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SecurityPartnerProvidersClient) getHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientGetResponse, error) { + result := SecurityPartnerProvidersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProvider); err != nil { + return SecurityPartnerProvidersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the Security Partner Providers in a subscription. +// +// Generated from API version 2024-05-01 +// - options - SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListPager +// method. +func (client *SecurityPartnerProvidersClient) NewListPager(options *SecurityPartnerProvidersClientListOptions) *runtime.Pager[SecurityPartnerProvidersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SecurityPartnerProvidersClientListResponse]{ + More: func(page SecurityPartnerProvidersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SecurityPartnerProvidersClientListResponse) (SecurityPartnerProvidersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityPartnerProvidersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return SecurityPartnerProvidersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SecurityPartnerProvidersClient) listCreateRequest(ctx context.Context, options *SecurityPartnerProvidersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/securityPartnerProviders" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SecurityPartnerProvidersClient) listHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientListResponse, error) { + result := SecurityPartnerProvidersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProviderListResult); err != nil { + return SecurityPartnerProvidersClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all Security Partner Providers in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListByResourceGroupPager +// method. +func (client *SecurityPartnerProvidersClient) NewListByResourceGroupPager(resourceGroupName string, options *SecurityPartnerProvidersClientListByResourceGroupOptions) *runtime.Pager[SecurityPartnerProvidersClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[SecurityPartnerProvidersClientListByResourceGroupResponse]{ + More: func(page SecurityPartnerProvidersClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SecurityPartnerProvidersClientListByResourceGroupResponse) (SecurityPartnerProvidersClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityPartnerProvidersClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return SecurityPartnerProvidersClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *SecurityPartnerProvidersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *SecurityPartnerProvidersClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *SecurityPartnerProvidersClient) listByResourceGroupHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientListByResourceGroupResponse, error) { + result := SecurityPartnerProvidersClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProviderListResult); err != nil { + return SecurityPartnerProvidersClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates tags of a Security Partner Provider resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - securityPartnerProviderName - The name of the Security Partner Provider. +// - parameters - Parameters supplied to update Security Partner Provider tags. +// - options - SecurityPartnerProvidersClientUpdateTagsOptions contains the optional parameters for the SecurityPartnerProvidersClient.UpdateTags +// method. +func (client *SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters TagsObject, options *SecurityPartnerProvidersClientUpdateTagsOptions) (SecurityPartnerProvidersClientUpdateTagsResponse, error) { + var err error + const operationName = "SecurityPartnerProvidersClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) + if err != nil { + return SecurityPartnerProvidersClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityPartnerProvidersClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityPartnerProvidersClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *SecurityPartnerProvidersClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters TagsObject, options *SecurityPartnerProvidersClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if securityPartnerProviderName == "" { + return nil, errors.New("parameter securityPartnerProviderName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityPartnerProviderName}", url.PathEscape(securityPartnerProviderName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *SecurityPartnerProvidersClient) updateTagsHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientUpdateTagsResponse, error) { + result := SecurityPartnerProvidersClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProvider); err != nil { + return SecurityPartnerProvidersClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityrules_client.go new file mode 100644 index 00000000..293e80d8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityrules_client.go @@ -0,0 +1,346 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SecurityRulesClient contains the methods for the SecurityRules group. +// Don't use this type directly, use NewSecurityRulesClient() instead. +type SecurityRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSecurityRulesClient creates a new instance of SecurityRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SecurityRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a security rule in the specified network security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - securityRuleName - The name of the security rule. +// - securityRuleParameters - Parameters supplied to the create or update network security rule operation. +// - options - SecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityRulesClient.BeginCreateOrUpdate +// method. +func (client *SecurityRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, options *SecurityRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SecurityRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityRulesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a security rule in the specified network security group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SecurityRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, options *SecurityRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SecurityRulesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SecurityRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, options *SecurityRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkSecurityGroupName == "" { + return nil, errors.New("parameter networkSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) + if securityRuleName == "" { + return nil, errors.New("parameter securityRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityRuleName}", url.PathEscape(securityRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, securityRuleParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified network security rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - securityRuleName - The name of the security rule. +// - options - SecurityRulesClientBeginDeleteOptions contains the optional parameters for the SecurityRulesClient.BeginDelete +// method. +func (client *SecurityRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientBeginDeleteOptions) (*runtime.Poller[SecurityRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityRulesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified network security rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SecurityRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SecurityRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SecurityRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkSecurityGroupName == "" { + return nil, errors.New("parameter networkSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) + if securityRuleName == "" { + return nil, errors.New("parameter securityRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityRuleName}", url.PathEscape(securityRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the specified network security rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - securityRuleName - The name of the security rule. +// - options - SecurityRulesClientGetOptions contains the optional parameters for the SecurityRulesClient.Get method. +func (client *SecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientGetOptions) (SecurityRulesClientGetResponse, error) { + var err error + const operationName = "SecurityRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) + if err != nil { + return SecurityRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SecurityRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkSecurityGroupName == "" { + return nil, errors.New("parameter networkSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) + if securityRuleName == "" { + return nil, errors.New("parameter securityRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{securityRuleName}", url.PathEscape(securityRuleName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SecurityRulesClient) getHandleResponse(resp *http.Response) (SecurityRulesClientGetResponse, error) { + result := SecurityRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRule); err != nil { + return SecurityRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all security rules in a network security group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - options - SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.NewListPager method. +func (client *SecurityRulesClient) NewListPager(resourceGroupName string, networkSecurityGroupName string, options *SecurityRulesClientListOptions) *runtime.Pager[SecurityRulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SecurityRulesClientListResponse]{ + More: func(page SecurityRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SecurityRulesClientListResponse) (SecurityRulesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityRulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) + }, nil) + if err != nil { + return SecurityRulesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SecurityRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityRulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkSecurityGroupName == "" { + return nil, errors.New("parameter networkSecurityGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkSecurityGroupName}", url.PathEscape(networkSecurityGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SecurityRulesClient) listHandleResponse(resp *http.Response) (SecurityRulesClientListResponse, error) { + result := SecurityRulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRuleListResult); err != nil { + return SecurityRulesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityuserconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityuserconfigurations_client.go new file mode 100644 index 00000000..35bff0c5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityuserconfigurations_client.go @@ -0,0 +1,346 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// SecurityUserConfigurationsClient contains the methods for the SecurityUserConfigurations group. +// Don't use this type directly, use NewSecurityUserConfigurationsClient() instead. +type SecurityUserConfigurationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSecurityUserConfigurationsClient creates a new instance of SecurityUserConfigurationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSecurityUserConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityUserConfigurationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SecurityUserConfigurationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a network manager security user configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - securityUserConfiguration - The security user configuration to create or update +// - options - SecurityUserConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the SecurityUserConfigurationsClient.CreateOrUpdate +// method. +func (client *SecurityUserConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, securityUserConfiguration SecurityUserConfiguration, options *SecurityUserConfigurationsClientCreateOrUpdateOptions) (SecurityUserConfigurationsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SecurityUserConfigurationsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, securityUserConfiguration, options) + if err != nil { + return SecurityUserConfigurationsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityUserConfigurationsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SecurityUserConfigurationsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SecurityUserConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, securityUserConfiguration SecurityUserConfiguration, options *SecurityUserConfigurationsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, securityUserConfiguration); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *SecurityUserConfigurationsClient) createOrUpdateHandleResponse(resp *http.Response) (SecurityUserConfigurationsClientCreateOrUpdateResponse, error) { + result := SecurityUserConfigurationsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityUserConfiguration); err != nil { + return SecurityUserConfigurationsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes a network manager security user configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - options - SecurityUserConfigurationsClientBeginDeleteOptions contains the optional parameters for the SecurityUserConfigurationsClient.BeginDelete +// method. +func (client *SecurityUserConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityUserConfigurationsClientBeginDeleteOptions) (*runtime.Poller[SecurityUserConfigurationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityUserConfigurationsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityUserConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a network manager security user configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SecurityUserConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityUserConfigurationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SecurityUserConfigurationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SecurityUserConfigurationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityUserConfigurationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves a network manager security user configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - options - SecurityUserConfigurationsClientGetOptions contains the optional parameters for the SecurityUserConfigurationsClient.Get +// method. +func (client *SecurityUserConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityUserConfigurationsClientGetOptions) (SecurityUserConfigurationsClientGetResponse, error) { + var err error + const operationName = "SecurityUserConfigurationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + if err != nil { + return SecurityUserConfigurationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityUserConfigurationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityUserConfigurationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SecurityUserConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityUserConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SecurityUserConfigurationsClient) getHandleResponse(resp *http.Response) (SecurityUserConfigurationsClientGetResponse, error) { + result := SecurityUserConfigurationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityUserConfiguration); err != nil { + return SecurityUserConfigurationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the network manager security user configurations in a network manager, in a paginated format. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - options - SecurityUserConfigurationsClientListOptions contains the optional parameters for the SecurityUserConfigurationsClient.NewListPager +// method. +func (client *SecurityUserConfigurationsClient) NewListPager(resourceGroupName string, networkManagerName string, options *SecurityUserConfigurationsClientListOptions) *runtime.Pager[SecurityUserConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SecurityUserConfigurationsClientListResponse]{ + More: func(page SecurityUserConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SecurityUserConfigurationsClientListResponse) (SecurityUserConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityUserConfigurationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) + if err != nil { + return SecurityUserConfigurationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SecurityUserConfigurationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *SecurityUserConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SecurityUserConfigurationsClient) listHandleResponse(resp *http.Response) (SecurityUserConfigurationsClientListResponse, error) { + result := SecurityUserConfigurationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityUserConfigurationListResult); err != nil { + return SecurityUserConfigurationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityuserrulecollections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityuserrulecollections_client.go new file mode 100644 index 00000000..fb839eb3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityuserrulecollections_client.go @@ -0,0 +1,366 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// SecurityUserRuleCollectionsClient contains the methods for the SecurityUserRuleCollections group. +// Don't use this type directly, use NewSecurityUserRuleCollectionsClient() instead. +type SecurityUserRuleCollectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSecurityUserRuleCollectionsClient creates a new instance of SecurityUserRuleCollectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSecurityUserRuleCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityUserRuleCollectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SecurityUserRuleCollectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a security user rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - securityUserRuleCollection - The Security User Rule Collection to create or update +// - options - SecurityUserRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the SecurityUserRuleCollectionsClient.CreateOrUpdate +// method. +func (client *SecurityUserRuleCollectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, securityUserRuleCollection SecurityUserRuleCollection, options *SecurityUserRuleCollectionsClientCreateOrUpdateOptions) (SecurityUserRuleCollectionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SecurityUserRuleCollectionsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, securityUserRuleCollection, options) + if err != nil { + return SecurityUserRuleCollectionsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityUserRuleCollectionsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SecurityUserRuleCollectionsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SecurityUserRuleCollectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, securityUserRuleCollection SecurityUserRuleCollection, options *SecurityUserRuleCollectionsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, securityUserRuleCollection); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *SecurityUserRuleCollectionsClient) createOrUpdateHandleResponse(resp *http.Response) (SecurityUserRuleCollectionsClientCreateOrUpdateResponse, error) { + result := SecurityUserRuleCollectionsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityUserRuleCollection); err != nil { + return SecurityUserRuleCollectionsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes a Security User Rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - options - SecurityUserRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the SecurityUserRuleCollectionsClient.BeginDelete +// method. +func (client *SecurityUserRuleCollectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *SecurityUserRuleCollectionsClientBeginDeleteOptions) (*runtime.Poller[SecurityUserRuleCollectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityUserRuleCollectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityUserRuleCollectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a Security User Rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SecurityUserRuleCollectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *SecurityUserRuleCollectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SecurityUserRuleCollectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SecurityUserRuleCollectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *SecurityUserRuleCollectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a network manager security user configuration rule collection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - options - SecurityUserRuleCollectionsClientGetOptions contains the optional parameters for the SecurityUserRuleCollectionsClient.Get +// method. +func (client *SecurityUserRuleCollectionsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *SecurityUserRuleCollectionsClientGetOptions) (SecurityUserRuleCollectionsClientGetResponse, error) { + var err error + const operationName = "SecurityUserRuleCollectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + if err != nil { + return SecurityUserRuleCollectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityUserRuleCollectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityUserRuleCollectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SecurityUserRuleCollectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *SecurityUserRuleCollectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SecurityUserRuleCollectionsClient) getHandleResponse(resp *http.Response) (SecurityUserRuleCollectionsClientGetResponse, error) { + result := SecurityUserRuleCollectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityUserRuleCollection); err != nil { + return SecurityUserRuleCollectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the security user rule collections in a security configuration, in a paginated format. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - options - SecurityUserRuleCollectionsClientListOptions contains the optional parameters for the SecurityUserRuleCollectionsClient.NewListPager +// method. +func (client *SecurityUserRuleCollectionsClient) NewListPager(resourceGroupName string, networkManagerName string, configurationName string, options *SecurityUserRuleCollectionsClientListOptions) *runtime.Pager[SecurityUserRuleCollectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SecurityUserRuleCollectionsClientListResponse]{ + More: func(page SecurityUserRuleCollectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SecurityUserRuleCollectionsClientListResponse) (SecurityUserRuleCollectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityUserRuleCollectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) + }, nil) + if err != nil { + return SecurityUserRuleCollectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SecurityUserRuleCollectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityUserRuleCollectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SecurityUserRuleCollectionsClient) listHandleResponse(resp *http.Response) (SecurityUserRuleCollectionsClientListResponse, error) { + result := SecurityUserRuleCollectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityUserRuleCollectionListResult); err != nil { + return SecurityUserRuleCollectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityuserrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityuserrules_client.go new file mode 100644 index 00000000..723deeff --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/securityuserrules_client.go @@ -0,0 +1,385 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// SecurityUserRulesClient contains the methods for the SecurityUserRules group. +// Don't use this type directly, use NewSecurityUserRulesClient() instead. +type SecurityUserRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSecurityUserRulesClient creates a new instance of SecurityUserRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSecurityUserRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityUserRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SecurityUserRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a security user rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleName - The name of the rule. +// - securityUserRule - The security user rule to create or update +// - options - SecurityUserRulesClientCreateOrUpdateOptions contains the optional parameters for the SecurityUserRulesClient.CreateOrUpdate +// method. +func (client *SecurityUserRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, securityUserRule SecurityUserRule, options *SecurityUserRulesClientCreateOrUpdateOptions) (SecurityUserRulesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SecurityUserRulesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, securityUserRule, options) + if err != nil { + return SecurityUserRulesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityUserRulesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SecurityUserRulesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SecurityUserRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, securityUserRule SecurityUserRule, options *SecurityUserRulesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, securityUserRule); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *SecurityUserRulesClient) createOrUpdateHandleResponse(resp *http.Response) (SecurityUserRulesClientCreateOrUpdateResponse, error) { + result := SecurityUserRulesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityUserRule); err != nil { + return SecurityUserRulesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes a security user rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleName - The name of the rule. +// - options - SecurityUserRulesClientBeginDeleteOptions contains the optional parameters for the SecurityUserRulesClient.BeginDelete +// method. +func (client *SecurityUserRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *SecurityUserRulesClientBeginDeleteOptions) (*runtime.Poller[SecurityUserRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SecurityUserRulesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SecurityUserRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a security user rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SecurityUserRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *SecurityUserRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SecurityUserRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SecurityUserRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *SecurityUserRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Force != nil { + reqQP.Set("force", strconv.FormatBool(*options.Force)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a security user rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleName - The name of the rule. +// - options - SecurityUserRulesClientGetOptions contains the optional parameters for the SecurityUserRulesClient.Get method. +func (client *SecurityUserRulesClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *SecurityUserRulesClientGetOptions) (SecurityUserRulesClientGetResponse, error) { + var err error + const operationName = "SecurityUserRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) + if err != nil { + return SecurityUserRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityUserRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityUserRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SecurityUserRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *SecurityUserRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + if ruleName == "" { + return nil, errors.New("parameter ruleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleName}", url.PathEscape(ruleName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SecurityUserRulesClient) getHandleResponse(resp *http.Response) (SecurityUserRulesClientGetResponse, error) { + result := SecurityUserRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityUserRule); err != nil { + return SecurityUserRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all Security User Rules in a rule collection. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - options - SecurityUserRulesClientListOptions contains the optional parameters for the SecurityUserRulesClient.NewListPager +// method. +func (client *SecurityUserRulesClient) NewListPager(resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *SecurityUserRulesClientListOptions) *runtime.Pager[SecurityUserRulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SecurityUserRulesClientListResponse]{ + More: func(page SecurityUserRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SecurityUserRulesClientListResponse) (SecurityUserRulesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SecurityUserRulesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) + }, nil) + if err != nil { + return SecurityUserRulesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SecurityUserRulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *SecurityUserRulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if configurationName == "" { + return nil, errors.New("parameter configurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{configurationName}", url.PathEscape(configurationName)) + if ruleCollectionName == "" { + return nil, errors.New("parameter ruleCollectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ruleCollectionName}", url.PathEscape(ruleCollectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SecurityUserRulesClient) listHandleResponse(resp *http.Response) (SecurityUserRulesClientListResponse, error) { + result := SecurityUserRulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SecurityUserRuleListResult); err != nil { + return SecurityUserRulesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/serviceassociationlinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/serviceassociationlinks_client.go new file mode 100644 index 00000000..88ec5657 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/serviceassociationlinks_client.go @@ -0,0 +1,115 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServiceAssociationLinksClient contains the methods for the ServiceAssociationLinks group. +// Don't use this type directly, use NewServiceAssociationLinksClient() instead. +type ServiceAssociationLinksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServiceAssociationLinksClient creates a new instance of ServiceAssociationLinksClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServiceAssociationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceAssociationLinksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServiceAssociationLinksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// List - Gets a list of service association links for a subnet. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - options - ServiceAssociationLinksClientListOptions contains the optional parameters for the ServiceAssociationLinksClient.List +// method. +func (client *ServiceAssociationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *ServiceAssociationLinksClientListOptions) (ServiceAssociationLinksClientListResponse, error) { + var err error + const operationName = "ServiceAssociationLinksClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) + if err != nil { + return ServiceAssociationLinksClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceAssociationLinksClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceAssociationLinksClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *ServiceAssociationLinksClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *ServiceAssociationLinksClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if subnetName == "" { + return nil, errors.New("parameter subnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ServiceAssociationLinksClient) listHandleResponse(resp *http.Response) (ServiceAssociationLinksClientListResponse, error) { + result := ServiceAssociationLinksClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceAssociationLinksListResult); err != nil { + return ServiceAssociationLinksClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/serviceendpointpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/serviceendpointpolicies_client.go new file mode 100644 index 00000000..7191e5fc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/serviceendpointpolicies_client.go @@ -0,0 +1,455 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServiceEndpointPoliciesClient contains the methods for the ServiceEndpointPolicies group. +// Don't use this type directly, use NewServiceEndpointPoliciesClient() instead. +type ServiceEndpointPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServiceEndpointPoliciesClient creates a new instance of ServiceEndpointPoliciesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServiceEndpointPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceEndpointPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServiceEndpointPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a service Endpoint Policies. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy. +// - parameters - Parameters supplied to the create or update service endpoint policy operation. +// - options - ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginCreateOrUpdate +// method. +func (client *ServiceEndpointPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy, options *ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceEndpointPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceEndpointPoliciesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceEndpointPoliciesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a service Endpoint Policies. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceEndpointPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy, options *ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServiceEndpointPoliciesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServiceEndpointPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy, options *ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceEndpointPolicyName == "" { + return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified service endpoint policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy. +// - options - ServiceEndpointPoliciesClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginDelete +// method. +func (client *ServiceEndpointPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientBeginDeleteOptions) (*runtime.Poller[ServiceEndpointPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceEndpointPolicyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceEndpointPoliciesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceEndpointPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified service endpoint policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceEndpointPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServiceEndpointPoliciesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServiceEndpointPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceEndpointPolicyName == "" { + return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified service Endpoint Policies in a specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy. +// - options - ServiceEndpointPoliciesClientGetOptions contains the optional parameters for the ServiceEndpointPoliciesClient.Get +// method. +func (client *ServiceEndpointPoliciesClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientGetOptions) (ServiceEndpointPoliciesClientGetResponse, error) { + var err error + const operationName = "ServiceEndpointPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) + if err != nil { + return ServiceEndpointPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceEndpointPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceEndpointPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServiceEndpointPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceEndpointPolicyName == "" { + return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServiceEndpointPoliciesClient) getHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientGetResponse, error) { + result := ServiceEndpointPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicy); err != nil { + return ServiceEndpointPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the service endpoint policies in a subscription. +// +// Generated from API version 2024-05-01 +// - options - ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListPager +// method. +func (client *ServiceEndpointPoliciesClient) NewListPager(options *ServiceEndpointPoliciesClientListOptions) *runtime.Pager[ServiceEndpointPoliciesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ServiceEndpointPoliciesClientListResponse]{ + More: func(page ServiceEndpointPoliciesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServiceEndpointPoliciesClientListResponse) (ServiceEndpointPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceEndpointPoliciesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return ServiceEndpointPoliciesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ServiceEndpointPoliciesClient) listCreateRequest(ctx context.Context, options *ServiceEndpointPoliciesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ServiceEndpointPoliciesClient) listHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientListResponse, error) { + result := ServiceEndpointPoliciesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyListResult); err != nil { + return ServiceEndpointPoliciesClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets all service endpoint Policies in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListByResourceGroupPager +// method. +func (client *ServiceEndpointPoliciesClient) NewListByResourceGroupPager(resourceGroupName string, options *ServiceEndpointPoliciesClientListByResourceGroupOptions) *runtime.Pager[ServiceEndpointPoliciesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ServiceEndpointPoliciesClientListByResourceGroupResponse]{ + More: func(page ServiceEndpointPoliciesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServiceEndpointPoliciesClientListByResourceGroupResponse) (ServiceEndpointPoliciesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceEndpointPoliciesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ServiceEndpointPoliciesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ServiceEndpointPoliciesClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ServiceEndpointPoliciesClient) listByResourceGroupHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientListByResourceGroupResponse, error) { + result := ServiceEndpointPoliciesClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyListResult); err != nil { + return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates tags of a service endpoint policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy. +// - parameters - Parameters supplied to update service endpoint policy tags. +// - options - ServiceEndpointPoliciesClientUpdateTagsOptions contains the optional parameters for the ServiceEndpointPoliciesClient.UpdateTags +// method. +func (client *ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject, options *ServiceEndpointPoliciesClientUpdateTagsOptions) (ServiceEndpointPoliciesClientUpdateTagsResponse, error) { + var err error + const operationName = "ServiceEndpointPoliciesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) + if err != nil { + return ServiceEndpointPoliciesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceEndpointPoliciesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceEndpointPoliciesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *ServiceEndpointPoliciesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject, options *ServiceEndpointPoliciesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceEndpointPolicyName == "" { + return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *ServiceEndpointPoliciesClient) updateTagsHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientUpdateTagsResponse, error) { + result := ServiceEndpointPoliciesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicy); err != nil { + return ServiceEndpointPoliciesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/serviceendpointpolicydefinitions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/serviceendpointpolicydefinitions_client.go new file mode 100644 index 00000000..6ebb5ac8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/serviceendpointpolicydefinitions_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServiceEndpointPolicyDefinitionsClient contains the methods for the ServiceEndpointPolicyDefinitions group. +// Don't use this type directly, use NewServiceEndpointPolicyDefinitionsClient() instead. +type ServiceEndpointPolicyDefinitionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServiceEndpointPolicyDefinitionsClient creates a new instance of ServiceEndpointPolicyDefinitionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceEndpointPolicyDefinitionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServiceEndpointPolicyDefinitionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a service endpoint policy definition in the specified service endpoint policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy. +// - serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition name. +// - serviceEndpointPolicyDefinitions - Parameters supplied to the create or update service endpoint policy operation. +// - options - ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate +// method. +func (client *ServiceEndpointPolicyDefinitionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition, options *ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a service endpoint policy definition in the specified service endpoint policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceEndpointPolicyDefinitionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition, options *ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ServiceEndpointPolicyDefinitionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition, options *ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceEndpointPolicyName == "" { + return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) + if serviceEndpointPolicyDefinitionName == "" { + return nil, errors.New("parameter serviceEndpointPolicyDefinitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyDefinitionName}", url.PathEscape(serviceEndpointPolicyDefinitionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, serviceEndpointPolicyDefinitions); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified ServiceEndpoint policy definitions. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the Service Endpoint Policy. +// - serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition. +// - options - ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginDelete +// method. +func (client *ServiceEndpointPolicyDefinitionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions) (*runtime.Poller[ServiceEndpointPolicyDefinitionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ServiceEndpointPolicyDefinitionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ServiceEndpointPolicyDefinitionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified ServiceEndpoint policy definitions. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *ServiceEndpointPolicyDefinitionsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ServiceEndpointPolicyDefinitionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ServiceEndpointPolicyDefinitionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceEndpointPolicyName == "" { + return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) + if serviceEndpointPolicyDefinitionName == "" { + return nil, errors.New("parameter serviceEndpointPolicyDefinitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyDefinitionName}", url.PathEscape(serviceEndpointPolicyDefinitionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get the specified service endpoint policy definitions from service endpoint policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy name. +// - serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition name. +// - options - ServiceEndpointPolicyDefinitionsClientGetOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.Get +// method. +func (client *ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientGetOptions) (ServiceEndpointPolicyDefinitionsClientGetResponse, error) { + var err error + const operationName = "ServiceEndpointPolicyDefinitionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) + if err != nil { + return ServiceEndpointPolicyDefinitionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceEndpointPolicyDefinitionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceEndpointPolicyDefinitionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ServiceEndpointPolicyDefinitionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceEndpointPolicyName == "" { + return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) + if serviceEndpointPolicyDefinitionName == "" { + return nil, errors.New("parameter serviceEndpointPolicyDefinitionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyDefinitionName}", url.PathEscape(serviceEndpointPolicyDefinitionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ServiceEndpointPolicyDefinitionsClient) getHandleResponse(resp *http.Response) (ServiceEndpointPolicyDefinitionsClientGetResponse, error) { + result := ServiceEndpointPolicyDefinitionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyDefinition); err != nil { + return ServiceEndpointPolicyDefinitionsClientGetResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets all service endpoint policy definitions in a service end point policy. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy name. +// - options - ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager +// method. +func (client *ServiceEndpointPolicyDefinitionsClient) NewListByResourceGroupPager(resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions) *runtime.Pager[ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse]{ + More: func(page ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse) (ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) + }, nil) + if err != nil { + return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ServiceEndpointPolicyDefinitionsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if serviceEndpointPolicyName == "" { + return nil, errors.New("parameter serviceEndpointPolicyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{serviceEndpointPolicyName}", url.PathEscape(serviceEndpointPolicyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ServiceEndpointPolicyDefinitionsClient) listByResourceGroupHandleResponse(resp *http.Response) (ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse, error) { + result := ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyDefinitionListResult); err != nil { + return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/servicetaginformation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/servicetaginformation_client.go new file mode 100644 index 00000000..f1ec9af1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/servicetaginformation_client.go @@ -0,0 +1,114 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// ServiceTagInformationClient contains the methods for the ServiceTagInformation group. +// Don't use this type directly, use NewServiceTagInformationClient() instead. +type ServiceTagInformationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServiceTagInformationClient creates a new instance of ServiceTagInformationClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServiceTagInformationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceTagInformationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServiceTagInformationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets a list of service tag information resources with pagination. +// +// Generated from API version 2024-05-01 +// - location - The location that will be used as a reference for cloud (not as a filter based on location, you will get the +// list of service tags with prefix details across all regions but limited to the cloud that +// your subscription belongs to). +// - options - ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.NewListPager +// method. +func (client *ServiceTagInformationClient) NewListPager(location string, options *ServiceTagInformationClientListOptions) *runtime.Pager[ServiceTagInformationClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ServiceTagInformationClientListResponse]{ + More: func(page ServiceTagInformationClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ServiceTagInformationClientListResponse) (ServiceTagInformationClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ServiceTagInformationClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return ServiceTagInformationClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ServiceTagInformationClient) listCreateRequest(ctx context.Context, location string, options *ServiceTagInformationClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.NoAddressPrefixes != nil { + reqQP.Set("noAddressPrefixes", strconv.FormatBool(*options.NoAddressPrefixes)) + } + if options != nil && options.TagName != nil { + reqQP.Set("tagName", *options.TagName) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ServiceTagInformationClient) listHandleResponse(resp *http.Response) (ServiceTagInformationClientListResponse, error) { + result := ServiceTagInformationClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceTagInformationListResult); err != nil { + return ServiceTagInformationClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/servicetags_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/servicetags_client.go new file mode 100644 index 00000000..0cabf867 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/servicetags_client.go @@ -0,0 +1,106 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ServiceTagsClient contains the methods for the ServiceTags group. +// Don't use this type directly, use NewServiceTagsClient() instead. +type ServiceTagsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewServiceTagsClient creates a new instance of ServiceTagsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewServiceTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceTagsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ServiceTagsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// List - Gets a list of service tag information resources. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - location - The location that will be used as a reference for version (not as a filter based on location, you will get the +// list of service tags with prefix details across all regions but limited to the cloud that +// your subscription belongs to). +// - options - ServiceTagsClientListOptions contains the optional parameters for the ServiceTagsClient.List method. +func (client *ServiceTagsClient) List(ctx context.Context, location string, options *ServiceTagsClientListOptions) (ServiceTagsClientListResponse, error) { + var err error + const operationName = "ServiceTagsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, location, options) + if err != nil { + return ServiceTagsClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ServiceTagsClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ServiceTagsClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *ServiceTagsClient) listCreateRequest(ctx context.Context, location string, options *ServiceTagsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ServiceTagsClient) listHandleResponse(resp *http.Response) (ServiceTagsClientListResponse, error) { + result := ServiceTagsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ServiceTagsListResult); err != nil { + return ServiceTagsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/staticcidrs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/staticcidrs_client.go new file mode 100644 index 00000000..edaf2fac --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/staticcidrs_client.go @@ -0,0 +1,370 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// StaticCidrsClient contains the methods for the StaticCidrs group. +// Don't use this type directly, use NewStaticCidrsClient() instead. +type StaticCidrsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewStaticCidrsClient creates a new instance of StaticCidrsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewStaticCidrsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StaticCidrsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &StaticCidrsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Create - Creates/Updates the Static CIDR resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - poolName - IP Address Manager Pool resource name. +// - staticCidrName - Static Cidr allocation name. +// - options - StaticCidrsClientCreateOptions contains the optional parameters for the StaticCidrsClient.Create method. +func (client *StaticCidrsClient) Create(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, staticCidrName string, options *StaticCidrsClientCreateOptions) (StaticCidrsClientCreateResponse, error) { + var err error + const operationName = "StaticCidrsClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, networkManagerName, poolName, staticCidrName, options) + if err != nil { + return StaticCidrsClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticCidrsClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return StaticCidrsClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *StaticCidrsClient) createCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, staticCidrName string, options *StaticCidrsClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if staticCidrName == "" { + return nil, errors.New("parameter staticCidrName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{staticCidrName}", url.PathEscape(staticCidrName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *StaticCidrsClient) createHandleResponse(resp *http.Response) (StaticCidrsClientCreateResponse, error) { + result := StaticCidrsClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticCidr); err != nil { + return StaticCidrsClientCreateResponse{}, err + } + return result, nil +} + +// BeginDelete - Delete the Static CIDR resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - poolName - Pool resource name. +// - staticCidrName - StaticCidr resource name to delete. +// - options - StaticCidrsClientBeginDeleteOptions contains the optional parameters for the StaticCidrsClient.BeginDelete method. +func (client *StaticCidrsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, staticCidrName string, options *StaticCidrsClientBeginDeleteOptions) (*runtime.Poller[StaticCidrsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, poolName, staticCidrName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticCidrsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticCidrsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete the Static CIDR resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *StaticCidrsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, staticCidrName string, options *StaticCidrsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "StaticCidrsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, poolName, staticCidrName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *StaticCidrsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, staticCidrName string, options *StaticCidrsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if staticCidrName == "" { + return nil, errors.New("parameter staticCidrName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{staticCidrName}", url.PathEscape(staticCidrName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specific Static CIDR resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - poolName - Pool resource name. +// - staticCidrName - StaticCidr resource name to retrieve. +// - options - StaticCidrsClientGetOptions contains the optional parameters for the StaticCidrsClient.Get method. +func (client *StaticCidrsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, staticCidrName string, options *StaticCidrsClientGetOptions) (StaticCidrsClientGetResponse, error) { + var err error + const operationName = "StaticCidrsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, poolName, staticCidrName, options) + if err != nil { + return StaticCidrsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticCidrsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticCidrsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *StaticCidrsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, staticCidrName string, options *StaticCidrsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs/{staticCidrName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + if staticCidrName == "" { + return nil, errors.New("parameter staticCidrName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{staticCidrName}", url.PathEscape(staticCidrName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *StaticCidrsClient) getHandleResponse(resp *http.Response) (StaticCidrsClientGetResponse, error) { + result := StaticCidrsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticCidr); err != nil { + return StaticCidrsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets list of Static CIDR resources at Network Manager level. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - poolName - Pool resource name. +// - options - StaticCidrsClientListOptions contains the optional parameters for the StaticCidrsClient.NewListPager method. +func (client *StaticCidrsClient) NewListPager(resourceGroupName string, networkManagerName string, poolName string, options *StaticCidrsClientListOptions) *runtime.Pager[StaticCidrsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticCidrsClientListResponse]{ + More: func(page StaticCidrsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticCidrsClientListResponse) (StaticCidrsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticCidrsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, poolName, options) + }, nil) + if err != nil { + return StaticCidrsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *StaticCidrsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, poolName string, options *StaticCidrsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/ipamPools/{poolName}/staticCidrs" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if poolName == "" { + return nil, errors.New("parameter poolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{poolName}", url.PathEscape(poolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Skip != nil { + reqQP.Set("skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + if options != nil && options.SortKey != nil { + reqQP.Set("sortKey", *options.SortKey) + } + if options != nil && options.SortValue != nil { + reqQP.Set("sortValue", *options.SortValue) + } + if options != nil && options.Top != nil { + reqQP.Set("top", strconv.FormatInt(int64(*options.Top), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *StaticCidrsClient) listHandleResponse(resp *http.Response) (StaticCidrsClientListResponse, error) { + result := StaticCidrsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticCidrList); err != nil { + return StaticCidrsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/staticmembers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/staticmembers_client.go new file mode 100644 index 00000000..2679ade1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/staticmembers_client.go @@ -0,0 +1,338 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// StaticMembersClient contains the methods for the StaticMembers group. +// Don't use this type directly, use NewStaticMembersClient() instead. +type StaticMembersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewStaticMembersClient creates a new instance of StaticMembersClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewStaticMembersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StaticMembersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &StaticMembersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a static member. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - staticMemberName - The name of the static member. +// - parameters - Parameters supplied to the specify the static member to create +// - options - StaticMembersClientCreateOrUpdateOptions contains the optional parameters for the StaticMembersClient.CreateOrUpdate +// method. +func (client *StaticMembersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, parameters StaticMember, options *StaticMembersClientCreateOrUpdateOptions) (StaticMembersClientCreateOrUpdateResponse, error) { + var err error + const operationName = "StaticMembersClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, staticMemberName, parameters, options) + if err != nil { + return StaticMembersClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticMembersClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return StaticMembersClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *StaticMembersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, parameters StaticMember, options *StaticMembersClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if networkGroupName == "" { + return nil, errors.New("parameter networkGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) + if staticMemberName == "" { + return nil, errors.New("parameter staticMemberName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{staticMemberName}", url.PathEscape(staticMemberName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *StaticMembersClient) createOrUpdateHandleResponse(resp *http.Response) (StaticMembersClientCreateOrUpdateResponse, error) { + result := StaticMembersClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticMember); err != nil { + return StaticMembersClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes a static member. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - staticMemberName - The name of the static member. +// - options - StaticMembersClientDeleteOptions contains the optional parameters for the StaticMembersClient.Delete method. +func (client *StaticMembersClient) Delete(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, options *StaticMembersClientDeleteOptions) (StaticMembersClientDeleteResponse, error) { + var err error + const operationName = "StaticMembersClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, staticMemberName, options) + if err != nil { + return StaticMembersClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticMembersClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticMembersClientDeleteResponse{}, err + } + return StaticMembersClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *StaticMembersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, options *StaticMembersClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if networkGroupName == "" { + return nil, errors.New("parameter networkGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) + if staticMemberName == "" { + return nil, errors.New("parameter staticMemberName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{staticMemberName}", url.PathEscape(staticMemberName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified static member. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - staticMemberName - The name of the static member. +// - options - StaticMembersClientGetOptions contains the optional parameters for the StaticMembersClient.Get method. +func (client *StaticMembersClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, options *StaticMembersClientGetOptions) (StaticMembersClientGetResponse, error) { + var err error + const operationName = "StaticMembersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, staticMemberName, options) + if err != nil { + return StaticMembersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StaticMembersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticMembersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *StaticMembersClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, options *StaticMembersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers/{staticMemberName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if networkGroupName == "" { + return nil, errors.New("parameter networkGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) + if staticMemberName == "" { + return nil, errors.New("parameter staticMemberName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{staticMemberName}", url.PathEscape(staticMemberName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *StaticMembersClient) getHandleResponse(resp *http.Response) (StaticMembersClientGetResponse, error) { + result := StaticMembersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticMember); err != nil { + return StaticMembersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the specified static member. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - options - StaticMembersClientListOptions contains the optional parameters for the StaticMembersClient.NewListPager method. +func (client *StaticMembersClient) NewListPager(resourceGroupName string, networkManagerName string, networkGroupName string, options *StaticMembersClientListOptions) *runtime.Pager[StaticMembersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[StaticMembersClientListResponse]{ + More: func(page StaticMembersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StaticMembersClientListResponse) (StaticMembersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticMembersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, options) + }, nil) + if err != nil { + return StaticMembersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *StaticMembersClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *StaticMembersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/staticMembers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if networkGroupName == "" { + return nil, errors.New("parameter networkGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkGroupName}", url.PathEscape(networkGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *StaticMembersClient) listHandleResponse(resp *http.Response) (StaticMembersClientListResponse, error) { + result := StaticMembersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StaticMemberListResult); err != nil { + return StaticMembersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/subnets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/subnets_client.go new file mode 100644 index 00000000..c2a1e303 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/subnets_client.go @@ -0,0 +1,520 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SubnetsClient contains the methods for the Subnets group. +// Don't use this type directly, use NewSubnetsClient() instead. +type SubnetsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSubnetsClient creates a new instance of SubnetsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSubnetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubnetsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SubnetsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a subnet in the specified virtual network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - subnetParameters - Parameters supplied to the create or update subnet operation. +// - options - SubnetsClientBeginCreateOrUpdateOptions contains the optional parameters for the SubnetsClient.BeginCreateOrUpdate +// method. +func (client *SubnetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, options *SubnetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SubnetsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubnetsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubnetsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a subnet in the specified virtual network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SubnetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, options *SubnetsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "SubnetsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SubnetsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, options *SubnetsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if subnetName == "" { + return nil, errors.New("parameter subnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, subnetParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified subnet. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - options - SubnetsClientBeginDeleteOptions contains the optional parameters for the SubnetsClient.BeginDelete method. +func (client *SubnetsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientBeginDeleteOptions) (*runtime.Poller[SubnetsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, subnetName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubnetsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubnetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified subnet. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SubnetsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "SubnetsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SubnetsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if subnetName == "" { + return nil, errors.New("parameter subnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified subnet by virtual network and resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - options - SubnetsClientGetOptions contains the optional parameters for the SubnetsClient.Get method. +func (client *SubnetsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientGetOptions) (SubnetsClientGetResponse, error) { + var err error + const operationName = "SubnetsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) + if err != nil { + return SubnetsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SubnetsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SubnetsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SubnetsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if subnetName == "" { + return nil, errors.New("parameter subnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SubnetsClient) getHandleResponse(resp *http.Response) (SubnetsClientGetResponse, error) { + result := SubnetsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Subnet); err != nil { + return SubnetsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all subnets in a virtual network. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - SubnetsClientListOptions contains the optional parameters for the SubnetsClient.NewListPager method. +func (client *SubnetsClient) NewListPager(resourceGroupName string, virtualNetworkName string, options *SubnetsClientListOptions) *runtime.Pager[SubnetsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SubnetsClientListResponse]{ + More: func(page SubnetsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SubnetsClientListResponse) (SubnetsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SubnetsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + }, nil) + if err != nil { + return SubnetsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SubnetsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *SubnetsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SubnetsClient) listHandleResponse(resp *http.Response) (SubnetsClientListResponse, error) { + result := SubnetsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SubnetListResult); err != nil { + return SubnetsClientListResponse{}, err + } + return result, nil +} + +// BeginPrepareNetworkPolicies - Prepares a subnet by applying network intent policies. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - prepareNetworkPoliciesRequestParameters - Parameters supplied to prepare subnet by applying network intent policies. +// - options - SubnetsClientBeginPrepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginPrepareNetworkPolicies +// method. +func (client *SubnetsClient) BeginPrepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest, options *SubnetsClientBeginPrepareNetworkPoliciesOptions) (*runtime.Poller[SubnetsClientPrepareNetworkPoliciesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.prepareNetworkPolicies(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubnetsClientPrepareNetworkPoliciesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubnetsClientPrepareNetworkPoliciesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PrepareNetworkPolicies - Prepares a subnet by applying network intent policies. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SubnetsClient) prepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest, options *SubnetsClientBeginPrepareNetworkPoliciesOptions) (*http.Response, error) { + var err error + const operationName = "SubnetsClient.BeginPrepareNetworkPolicies" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.prepareNetworkPoliciesCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// prepareNetworkPoliciesCreateRequest creates the PrepareNetworkPolicies request. +func (client *SubnetsClient) prepareNetworkPoliciesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest, options *SubnetsClientBeginPrepareNetworkPoliciesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if subnetName == "" { + return nil, errors.New("parameter subnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, prepareNetworkPoliciesRequestParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginUnprepareNetworkPolicies - Unprepares a subnet by removing network intent policies. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - unprepareNetworkPoliciesRequestParameters - Parameters supplied to unprepare subnet to remove network intent policies. +// - options - SubnetsClientBeginUnprepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginUnprepareNetworkPolicies +// method. +func (client *SubnetsClient) BeginUnprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest, options *SubnetsClientBeginUnprepareNetworkPoliciesOptions) (*runtime.Poller[SubnetsClientUnprepareNetworkPoliciesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.unprepareNetworkPolicies(ctx, resourceGroupName, virtualNetworkName, subnetName, unprepareNetworkPoliciesRequestParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SubnetsClientUnprepareNetworkPoliciesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SubnetsClientUnprepareNetworkPoliciesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UnprepareNetworkPolicies - Unprepares a subnet by removing network intent policies. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *SubnetsClient) unprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest, options *SubnetsClientBeginUnprepareNetworkPoliciesOptions) (*http.Response, error) { + var err error + const operationName = "SubnetsClient.BeginUnprepareNetworkPolicies" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.unprepareNetworkPoliciesCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, unprepareNetworkPoliciesRequestParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// unprepareNetworkPoliciesCreateRequest creates the UnprepareNetworkPolicies request. +func (client *SubnetsClient) unprepareNetworkPoliciesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest, options *SubnetsClientBeginUnprepareNetworkPoliciesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if subnetName == "" { + return nil, errors.New("parameter subnetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subnetName}", url.PathEscape(subnetName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, unprepareNetworkPoliciesRequestParameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/subscriptionnetworkmanagerconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/subscriptionnetworkmanagerconnections_client.go new file mode 100644 index 00000000..17cddc29 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/subscriptionnetworkmanagerconnections_client.go @@ -0,0 +1,281 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// SubscriptionNetworkManagerConnectionsClient contains the methods for the SubscriptionNetworkManagerConnections group. +// Don't use this type directly, use NewSubscriptionNetworkManagerConnectionsClient() instead. +type SubscriptionNetworkManagerConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSubscriptionNetworkManagerConnectionsClient creates a new instance of SubscriptionNetworkManagerConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSubscriptionNetworkManagerConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionNetworkManagerConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SubscriptionNetworkManagerConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create a network manager connection on this subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - networkManagerConnectionName - Name for the network manager connection. +// - parameters - Network manager connection to be created/updated. +// - options - SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate +// method. +func (client *SubscriptionNetworkManagerConnectionsClient) CreateOrUpdate(ctx context.Context, networkManagerConnectionName string, parameters ManagerConnection, options *SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions) (SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, networkManagerConnectionName, parameters, options) + if err != nil { + return SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SubscriptionNetworkManagerConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, networkManagerConnectionName string, parameters ManagerConnection, options *SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if networkManagerConnectionName == "" { + return nil, errors.New("parameter networkManagerConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *SubscriptionNetworkManagerConnectionsClient) createOrUpdateHandleResponse(resp *http.Response) (SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse, error) { + result := SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnection); err != nil { + return SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete specified connection created by this subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - networkManagerConnectionName - Name for the network manager connection. +// - options - SubscriptionNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Delete +// method. +func (client *SubscriptionNetworkManagerConnectionsClient) Delete(ctx context.Context, networkManagerConnectionName string, options *SubscriptionNetworkManagerConnectionsClientDeleteOptions) (SubscriptionNetworkManagerConnectionsClientDeleteResponse, error) { + var err error + const operationName = "SubscriptionNetworkManagerConnectionsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, networkManagerConnectionName, options) + if err != nil { + return SubscriptionNetworkManagerConnectionsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SubscriptionNetworkManagerConnectionsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return SubscriptionNetworkManagerConnectionsClientDeleteResponse{}, err + } + return SubscriptionNetworkManagerConnectionsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SubscriptionNetworkManagerConnectionsClient) deleteCreateRequest(ctx context.Context, networkManagerConnectionName string, options *SubscriptionNetworkManagerConnectionsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if networkManagerConnectionName == "" { + return nil, errors.New("parameter networkManagerConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a specified connection created by this subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - networkManagerConnectionName - Name for the network manager connection. +// - options - SubscriptionNetworkManagerConnectionsClientGetOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Get +// method. +func (client *SubscriptionNetworkManagerConnectionsClient) Get(ctx context.Context, networkManagerConnectionName string, options *SubscriptionNetworkManagerConnectionsClientGetOptions) (SubscriptionNetworkManagerConnectionsClientGetResponse, error) { + var err error + const operationName = "SubscriptionNetworkManagerConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, networkManagerConnectionName, options) + if err != nil { + return SubscriptionNetworkManagerConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SubscriptionNetworkManagerConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SubscriptionNetworkManagerConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SubscriptionNetworkManagerConnectionsClient) getCreateRequest(ctx context.Context, networkManagerConnectionName string, options *SubscriptionNetworkManagerConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if networkManagerConnectionName == "" { + return nil, errors.New("parameter networkManagerConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerConnectionName}", url.PathEscape(networkManagerConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SubscriptionNetworkManagerConnectionsClient) getHandleResponse(resp *http.Response) (SubscriptionNetworkManagerConnectionsClientGetResponse, error) { + result := SubscriptionNetworkManagerConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnection); err != nil { + return SubscriptionNetworkManagerConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all network manager connections created by this subscription. +// +// Generated from API version 2024-05-01 +// - options - SubscriptionNetworkManagerConnectionsClientListOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.NewListPager +// method. +func (client *SubscriptionNetworkManagerConnectionsClient) NewListPager(options *SubscriptionNetworkManagerConnectionsClientListOptions) *runtime.Pager[SubscriptionNetworkManagerConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SubscriptionNetworkManagerConnectionsClientListResponse]{ + More: func(page SubscriptionNetworkManagerConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SubscriptionNetworkManagerConnectionsClientListResponse) (SubscriptionNetworkManagerConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SubscriptionNetworkManagerConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return SubscriptionNetworkManagerConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SubscriptionNetworkManagerConnectionsClient) listCreateRequest(ctx context.Context, options *SubscriptionNetworkManagerConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SubscriptionNetworkManagerConnectionsClient) listHandleResponse(resp *http.Response) (SubscriptionNetworkManagerConnectionsClientListResponse, error) { + result := SubscriptionNetworkManagerConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagerConnectionListResult); err != nil { + return SubscriptionNetworkManagerConnectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/time_rfc3339.go new file mode 100644 index 00000000..562771d6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/time_rfc3339.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/usages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/usages_client.go new file mode 100644 index 00000000..83fc19a2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/usages_client.go @@ -0,0 +1,104 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// UsagesClient contains the methods for the Usages group. +// Don't use this type directly, use NewUsagesClient() instead. +type UsagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewUsagesClient creates a new instance of UsagesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &UsagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - List network usages for a subscription. +// +// Generated from API version 2024-05-01 +// - location - The location where resource usage is queried. +// - options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. +func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[UsagesClientListResponse]{ + More: func(page UsagesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *UsagesClientListResponse) (UsagesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UsagesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return UsagesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *UsagesClient) listCreateRequest(ctx context.Context, location string, options *UsagesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *UsagesClient) listHandleResponse(resp *http.Response) (UsagesClientListResponse, error) { + result := UsagesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UsagesListResult); err != nil { + return UsagesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/verifierworkspaces_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/verifierworkspaces_client.go new file mode 100644 index 00000000..e79397af --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/verifierworkspaces_client.go @@ -0,0 +1,427 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// VerifierWorkspacesClient contains the methods for the VerifierWorkspaces group. +// Don't use this type directly, use NewVerifierWorkspacesClient() instead. +type VerifierWorkspacesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVerifierWorkspacesClient creates a new instance of VerifierWorkspacesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVerifierWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VerifierWorkspacesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VerifierWorkspacesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Create - Creates Verifier Workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - body - Verifier Workspace object to create/update. +// - options - VerifierWorkspacesClientCreateOptions contains the optional parameters for the VerifierWorkspacesClient.Create +// method. +func (client *VerifierWorkspacesClient) Create(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, body VerifierWorkspace, options *VerifierWorkspacesClientCreateOptions) (VerifierWorkspacesClientCreateResponse, error) { + var err error + const operationName = "VerifierWorkspacesClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, body, options) + if err != nil { + return VerifierWorkspacesClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VerifierWorkspacesClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return VerifierWorkspacesClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *VerifierWorkspacesClient) createCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, body VerifierWorkspace, options *VerifierWorkspacesClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, body); err != nil { + return nil, err + } + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *VerifierWorkspacesClient) createHandleResponse(resp *http.Response) (VerifierWorkspacesClientCreateResponse, error) { + result := VerifierWorkspacesClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VerifierWorkspace); err != nil { + return VerifierWorkspacesClientCreateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes Verifier Workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - options - VerifierWorkspacesClientBeginDeleteOptions contains the optional parameters for the VerifierWorkspacesClient.BeginDelete +// method. +func (client *VerifierWorkspacesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, options *VerifierWorkspacesClientBeginDeleteOptions) (*runtime.Poller[VerifierWorkspacesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, workspaceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VerifierWorkspacesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VerifierWorkspacesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes Verifier Workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VerifierWorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, options *VerifierWorkspacesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VerifierWorkspacesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VerifierWorkspacesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, options *VerifierWorkspacesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets Verifier Workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - options - VerifierWorkspacesClientGetOptions contains the optional parameters for the VerifierWorkspacesClient.Get method. +func (client *VerifierWorkspacesClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, options *VerifierWorkspacesClientGetOptions) (VerifierWorkspacesClientGetResponse, error) { + var err error + const operationName = "VerifierWorkspacesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, options) + if err != nil { + return VerifierWorkspacesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VerifierWorkspacesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VerifierWorkspacesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VerifierWorkspacesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, options *VerifierWorkspacesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VerifierWorkspacesClient) getHandleResponse(resp *http.Response) (VerifierWorkspacesClientGetResponse, error) { + result := VerifierWorkspacesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VerifierWorkspace); err != nil { + return VerifierWorkspacesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets list of Verifier Workspaces. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - VerifierWorkspacesClientListOptions contains the optional parameters for the VerifierWorkspacesClient.NewListPager +// method. +func (client *VerifierWorkspacesClient) NewListPager(resourceGroupName string, networkManagerName string, options *VerifierWorkspacesClientListOptions) *runtime.Pager[VerifierWorkspacesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VerifierWorkspacesClientListResponse]{ + More: func(page VerifierWorkspacesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VerifierWorkspacesClientListResponse) (VerifierWorkspacesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VerifierWorkspacesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkManagerName, options) + }, nil) + if err != nil { + return VerifierWorkspacesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VerifierWorkspacesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, options *VerifierWorkspacesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Skip != nil { + reqQP.Set("skip", strconv.FormatInt(int64(*options.Skip), 10)) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + if options != nil && options.SortKey != nil { + reqQP.Set("sortKey", *options.SortKey) + } + if options != nil && options.SortValue != nil { + reqQP.Set("sortValue", *options.SortValue) + } + if options != nil && options.Top != nil { + reqQP.Set("top", strconv.FormatInt(int64(*options.Top), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VerifierWorkspacesClient) listHandleResponse(resp *http.Response) (VerifierWorkspacesClientListResponse, error) { + result := VerifierWorkspacesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VerifierWorkspaceListResult); err != nil { + return VerifierWorkspacesClientListResponse{}, err + } + return result, nil +} + +// Update - Updates Verifier Workspace. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - workspaceName - Workspace name. +// - options - VerifierWorkspacesClientUpdateOptions contains the optional parameters for the VerifierWorkspacesClient.Update +// method. +func (client *VerifierWorkspacesClient) Update(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, options *VerifierWorkspacesClientUpdateOptions) (VerifierWorkspacesClientUpdateResponse, error) { + var err error + const operationName = "VerifierWorkspacesClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, networkManagerName, workspaceName, options) + if err != nil { + return VerifierWorkspacesClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VerifierWorkspacesClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VerifierWorkspacesClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *VerifierWorkspacesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, networkManagerName string, workspaceName string, options *VerifierWorkspacesClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/verifierWorkspaces/{workspaceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkManagerName == "" { + return nil, errors.New("parameter networkManagerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkManagerName}", url.PathEscape(networkManagerName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Body != nil { + if err := runtime.MarshalAsJSON(req, *options.Body); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *VerifierWorkspacesClient) updateHandleResponse(resp *http.Response) (VerifierWorkspacesClientUpdateResponse, error) { + result := VerifierWorkspacesClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VerifierWorkspace); err != nil { + return VerifierWorkspacesClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vipswap_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vipswap_client.go new file mode 100644 index 00000000..22f2fc39 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vipswap_client.go @@ -0,0 +1,256 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VipSwapClient contains the methods for the VipSwap group. +// Don't use this type directly, use NewVipSwapClient() instead. +type VipSwapClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVipSwapClient creates a new instance of VipSwapClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVipSwapClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VipSwapClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VipSwapClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Performs vip swap operation on swappable cloud services. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - groupName - The name of the resource group. +// - resourceName - The name of the cloud service. +// - parameters - SwapResource object where slot type should be the target slot after vip swap for the specified cloud service. +// - options - VipSwapClientBeginCreateOptions contains the optional parameters for the VipSwapClient.BeginCreate method. +func (client *VipSwapClient) BeginCreate(ctx context.Context, groupName string, resourceName string, parameters SwapResource, options *VipSwapClientBeginCreateOptions) (*runtime.Poller[VipSwapClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, groupName, resourceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VipSwapClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VipSwapClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Performs vip swap operation on swappable cloud services. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VipSwapClient) create(ctx context.Context, groupName string, resourceName string, parameters SwapResource, options *VipSwapClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "VipSwapClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, groupName, resourceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *VipSwapClient) createCreateRequest(ctx context.Context, groupName string, resourceName string, parameters SwapResource, options *VipSwapClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/cloudServices/{resourceName}/providers/Microsoft.Network/cloudServiceSlots/{singletonResource}" + if groupName == "" { + return nil, errors.New("parameter groupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupName}", url.PathEscape(groupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + urlPath = strings.ReplaceAll(urlPath, "{singletonResource}", url.PathEscape("swap")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service +// can either be Staging or Production +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - groupName - The name of the resource group. +// - resourceName - The name of the cloud service. +// - options - VipSwapClientGetOptions contains the optional parameters for the VipSwapClient.Get method. +func (client *VipSwapClient) Get(ctx context.Context, groupName string, resourceName string, options *VipSwapClientGetOptions) (VipSwapClientGetResponse, error) { + var err error + const operationName = "VipSwapClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, groupName, resourceName, options) + if err != nil { + return VipSwapClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VipSwapClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VipSwapClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VipSwapClient) getCreateRequest(ctx context.Context, groupName string, resourceName string, options *VipSwapClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/cloudServices/{resourceName}/providers/Microsoft.Network/cloudServiceSlots/{singletonResource}" + if groupName == "" { + return nil, errors.New("parameter groupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupName}", url.PathEscape(groupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + urlPath = strings.ReplaceAll(urlPath, "{singletonResource}", url.PathEscape("swap")) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VipSwapClient) getHandleResponse(resp *http.Response) (VipSwapClientGetResponse, error) { + result := VipSwapClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SwapResource); err != nil { + return VipSwapClientGetResponse{}, err + } + return result, nil +} + +// List - Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a +// cloud service can either be Staging or Production +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - groupName - The name of the resource group. +// - resourceName - The name of the cloud service. +// - options - VipSwapClientListOptions contains the optional parameters for the VipSwapClient.List method. +func (client *VipSwapClient) List(ctx context.Context, groupName string, resourceName string, options *VipSwapClientListOptions) (VipSwapClientListResponse, error) { + var err error + const operationName = "VipSwapClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, groupName, resourceName, options) + if err != nil { + return VipSwapClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VipSwapClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VipSwapClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *VipSwapClient) listCreateRequest(ctx context.Context, groupName string, resourceName string, options *VipSwapClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Compute/cloudServices/{resourceName}/providers/Microsoft.Network/cloudServiceSlots" + if groupName == "" { + return nil, errors.New("parameter groupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{groupName}", url.PathEscape(groupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VipSwapClient) listHandleResponse(resp *http.Response) (VipSwapClientListResponse, error) { + result := VipSwapClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SwapResourceListResult); err != nil { + return VipSwapClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualapplianceconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualapplianceconnections_client.go new file mode 100644 index 00000000..eaec923d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualapplianceconnections_client.go @@ -0,0 +1,349 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualApplianceConnectionsClient contains the methods for the NetworkVirtualApplianceConnections group. +// Don't use this type directly, use NewVirtualApplianceConnectionsClient() instead. +type VirtualApplianceConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualApplianceConnectionsClient creates a new instance of VirtualApplianceConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualApplianceConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualApplianceConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing +// NVA connection' +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - connectionName - The name of the NVA connection. +// - networkVirtualApplianceConnectionParameters - Parameters supplied in an NetworkVirtualApplianceConnection PUT operation. +// - options - VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceConnectionsClient.BeginCreateOrUpdate +// method. +func (client *VirtualApplianceConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, connectionName string, networkVirtualApplianceConnectionParameters VirtualApplianceConnection, options *VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualApplianceConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, connectionName, networkVirtualApplianceConnectionParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualApplianceConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualApplianceConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a connection to Network Virtual Appliance, if it doesn't exist else updates the existing NVA connection' +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualApplianceConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, connectionName string, networkVirtualApplianceConnectionParameters VirtualApplianceConnection, options *VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualApplianceConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, connectionName, networkVirtualApplianceConnectionParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualApplianceConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, connectionName string, networkVirtualApplianceConnectionParameters VirtualApplianceConnection, options *VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, networkVirtualApplianceConnectionParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a NVA connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - connectionName - The name of the NVA connection. +// - options - VirtualApplianceConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceConnectionsClient.BeginDelete +// method. +func (client *VirtualApplianceConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, connectionName string, options *VirtualApplianceConnectionsClientBeginDeleteOptions) (*runtime.Poller[VirtualApplianceConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, connectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualApplianceConnectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualApplianceConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a NVA connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualApplianceConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, connectionName string, options *VirtualApplianceConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualApplianceConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, connectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualApplianceConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, connectionName string, options *VirtualApplianceConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of specified NVA connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - connectionName - The name of the NVA connection. +// - options - VirtualApplianceConnectionsClientGetOptions contains the optional parameters for the VirtualApplianceConnectionsClient.Get +// method. +func (client *VirtualApplianceConnectionsClient) Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, connectionName string, options *VirtualApplianceConnectionsClientGetOptions) (VirtualApplianceConnectionsClientGetResponse, error) { + var err error + const operationName = "VirtualApplianceConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, connectionName, options) + if err != nil { + return VirtualApplianceConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualApplianceConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualApplianceConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualApplianceConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, connectionName string, options *VirtualApplianceConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualApplianceConnectionsClient) getHandleResponse(resp *http.Response) (VirtualApplianceConnectionsClientGetResponse, error) { + result := VirtualApplianceConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceConnection); err != nil { + return VirtualApplianceConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists NetworkVirtualApplianceConnections under the NVA. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - options - VirtualApplianceConnectionsClientListOptions contains the optional parameters for the VirtualApplianceConnectionsClient.NewListPager +// method. +func (client *VirtualApplianceConnectionsClient) NewListPager(resourceGroupName string, networkVirtualApplianceName string, options *VirtualApplianceConnectionsClientListOptions) *runtime.Pager[VirtualApplianceConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualApplianceConnectionsClientListResponse]{ + More: func(page VirtualApplianceConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualApplianceConnectionsClientListResponse) (VirtualApplianceConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualApplianceConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) + }, nil) + if err != nil { + return VirtualApplianceConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualApplianceConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualApplianceConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/networkVirtualApplianceConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualApplianceConnectionsClient) listHandleResponse(resp *http.Response) (VirtualApplianceConnectionsClientListResponse, error) { + result := VirtualApplianceConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceConnectionList); err != nil { + return VirtualApplianceConnectionsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualappliances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualappliances_client.go new file mode 100644 index 00000000..980e7add --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualappliances_client.go @@ -0,0 +1,537 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualAppliancesClient contains the methods for the NetworkVirtualAppliances group. +// Don't use this type directly, use NewVirtualAppliancesClient() instead. +type VirtualAppliancesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualAppliancesClient creates a new instance of VirtualAppliancesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualAppliancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualAppliancesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualAppliancesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of Network Virtual Appliance. +// - parameters - Parameters supplied to the create or update Network Virtual Appliance. +// - options - VirtualAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualAppliancesClient.BeginCreateOrUpdate +// method. +func (client *VirtualAppliancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance, options *VirtualAppliancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualAppliancesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualAppliancesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualAppliancesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified Network Virtual Appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualAppliancesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance, options *VirtualAppliancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualAppliancesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualAppliancesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance, options *VirtualAppliancesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified Network Virtual Appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of Network Virtual Appliance. +// - options - VirtualAppliancesClientBeginDeleteOptions contains the optional parameters for the VirtualAppliancesClient.BeginDelete +// method. +func (client *VirtualAppliancesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginDeleteOptions) (*runtime.Poller[VirtualAppliancesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualAppliancesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualAppliancesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified Network Virtual Appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualAppliancesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualAppliancesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualAppliancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Network Virtual Appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of Network Virtual Appliance. +// - options - VirtualAppliancesClientGetOptions contains the optional parameters for the VirtualAppliancesClient.Get method. +func (client *VirtualAppliancesClient) Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientGetOptions) (VirtualAppliancesClientGetResponse, error) { + var err error + const operationName = "VirtualAppliancesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) + if err != nil { + return VirtualAppliancesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualAppliancesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualAppliancesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualAppliancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualAppliancesClient) getHandleResponse(resp *http.Response) (VirtualAppliancesClientGetResponse, error) { + result := VirtualAppliancesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualAppliance); err != nil { + return VirtualAppliancesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all Network Virtual Appliances in a subscription. +// +// Generated from API version 2024-05-01 +// - options - VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.NewListPager +// method. +func (client *VirtualAppliancesClient) NewListPager(options *VirtualAppliancesClientListOptions) *runtime.Pager[VirtualAppliancesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualAppliancesClientListResponse]{ + More: func(page VirtualAppliancesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualAppliancesClientListResponse) (VirtualAppliancesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualAppliancesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return VirtualAppliancesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualAppliancesClient) listCreateRequest(ctx context.Context, options *VirtualAppliancesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualAppliancesClient) listHandleResponse(resp *http.Response) (VirtualAppliancesClientListResponse, error) { + result := VirtualAppliancesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceListResult); err != nil { + return VirtualAppliancesClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all Network Virtual Appliances in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.NewListByResourceGroupPager +// method. +func (client *VirtualAppliancesClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualAppliancesClientListByResourceGroupOptions) *runtime.Pager[VirtualAppliancesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualAppliancesClientListByResourceGroupResponse]{ + More: func(page VirtualAppliancesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualAppliancesClientListByResourceGroupResponse) (VirtualAppliancesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualAppliancesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VirtualAppliancesClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *VirtualAppliancesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualAppliancesClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *VirtualAppliancesClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualAppliancesClientListByResourceGroupResponse, error) { + result := VirtualAppliancesClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceListResult); err != nil { + return VirtualAppliancesClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginRestart - Restarts one or more VMs belonging to the specified Network Virtual Appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of Network Virtual Appliance. +// - options - VirtualAppliancesClientBeginRestartOptions contains the optional parameters for the VirtualAppliancesClient.BeginRestart +// method. +func (client *VirtualAppliancesClient) BeginRestart(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginRestartOptions) (*runtime.Poller[VirtualAppliancesClientRestartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restart(ctx, resourceGroupName, networkVirtualApplianceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualAppliancesClientRestartResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualAppliancesClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Restart - Restarts one or more VMs belonging to the specified Network Virtual Appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualAppliancesClient) restart(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginRestartOptions) (*http.Response, error) { + var err error + const operationName = "VirtualAppliancesClient.BeginRestart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restartCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restartCreateRequest creates the Restart request. +func (client *VirtualAppliancesClient) restartCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginRestartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/restart" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.NetworkVirtualApplianceInstanceIDs != nil { + if err := runtime.MarshalAsJSON(req, *options.NetworkVirtualApplianceInstanceIDs); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// UpdateTags - Updates a Network Virtual Appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of Network Virtual Appliance. +// - networkVirtualApplianceName - The name of Network Virtual Appliance being updated. +// - parameters - Parameters supplied to Update Network Virtual Appliance Tags. +// - options - VirtualAppliancesClientUpdateTagsOptions contains the optional parameters for the VirtualAppliancesClient.UpdateTags +// method. +func (client *VirtualAppliancesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters TagsObject, options *VirtualAppliancesClientUpdateTagsOptions) (VirtualAppliancesClientUpdateTagsResponse, error) { + var err error + const operationName = "VirtualAppliancesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) + if err != nil { + return VirtualAppliancesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualAppliancesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualAppliancesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *VirtualAppliancesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters TagsObject, options *VirtualAppliancesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *VirtualAppliancesClient) updateTagsHandleResponse(resp *http.Response) (VirtualAppliancesClientUpdateTagsResponse, error) { + result := VirtualAppliancesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualAppliance); err != nil { + return VirtualAppliancesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualappliancesites_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualappliancesites_client.go new file mode 100644 index 00000000..df655b09 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualappliancesites_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualApplianceSitesClient contains the methods for the VirtualApplianceSites group. +// Don't use this type directly, use NewVirtualApplianceSitesClient() instead. +type VirtualApplianceSitesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualApplianceSitesClient creates a new instance of VirtualApplianceSitesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualApplianceSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceSitesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualApplianceSitesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance Site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - siteName - The name of the site. +// - parameters - Parameters supplied to the create or update Network Virtual Appliance Site operation. +// - options - VirtualApplianceSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginCreateOrUpdate +// method. +func (client *VirtualApplianceSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite, options *VirtualApplianceSitesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualApplianceSitesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, siteName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualApplianceSitesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualApplianceSitesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified Network Virtual Appliance Site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualApplianceSitesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite, options *VirtualApplianceSitesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualApplianceSitesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, siteName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualApplianceSitesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite, options *VirtualApplianceSitesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified site from a Virtual Appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - siteName - The name of the site. +// - options - VirtualApplianceSitesClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginDelete +// method. +func (client *VirtualApplianceSitesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientBeginDeleteOptions) (*runtime.Poller[VirtualApplianceSitesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualApplianceSitesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualApplianceSitesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified site from a Virtual Appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualApplianceSitesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualApplianceSitesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualApplianceSitesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Virtual Appliance Site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - siteName - The name of the site. +// - options - VirtualApplianceSitesClientGetOptions contains the optional parameters for the VirtualApplianceSitesClient.Get +// method. +func (client *VirtualApplianceSitesClient) Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientGetOptions) (VirtualApplianceSitesClientGetResponse, error) { + var err error + const operationName = "VirtualApplianceSitesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) + if err != nil { + return VirtualApplianceSitesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualApplianceSitesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualApplianceSitesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualApplianceSitesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if siteName == "" { + return nil, errors.New("parameter siteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualApplianceSitesClient) getHandleResponse(resp *http.Response) (VirtualApplianceSitesClientGetResponse, error) { + result := VirtualApplianceSitesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSite); err != nil { + return VirtualApplianceSitesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - options - VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.NewListPager +// method. +func (client *VirtualApplianceSitesClient) NewListPager(resourceGroupName string, networkVirtualApplianceName string, options *VirtualApplianceSitesClientListOptions) *runtime.Pager[VirtualApplianceSitesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualApplianceSitesClientListResponse]{ + More: func(page VirtualApplianceSitesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualApplianceSitesClientListResponse) (VirtualApplianceSitesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualApplianceSitesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) + }, nil) + if err != nil { + return VirtualApplianceSitesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualApplianceSitesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualApplianceSitesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkVirtualApplianceName == "" { + return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualApplianceSitesClient) listHandleResponse(resp *http.Response) (VirtualApplianceSitesClientListResponse, error) { + result := VirtualApplianceSitesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSiteListResult); err != nil { + return VirtualApplianceSitesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualapplianceskus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualapplianceskus_client.go new file mode 100644 index 00000000..eda4bf2c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualapplianceskus_client.go @@ -0,0 +1,160 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualApplianceSKUsClient contains the methods for the VirtualApplianceSKUs group. +// Don't use this type directly, use NewVirtualApplianceSKUsClient() instead. +type VirtualApplianceSKUsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualApplianceSKUsClient creates a new instance of VirtualApplianceSKUsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualApplianceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceSKUsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualApplianceSKUsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Retrieves a single available sku for network virtual appliance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - skuName - Name of the Sku. +// - options - VirtualApplianceSKUsClientGetOptions contains the optional parameters for the VirtualApplianceSKUsClient.Get +// method. +func (client *VirtualApplianceSKUsClient) Get(ctx context.Context, skuName string, options *VirtualApplianceSKUsClientGetOptions) (VirtualApplianceSKUsClientGetResponse, error) { + var err error + const operationName = "VirtualApplianceSKUsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, skuName, options) + if err != nil { + return VirtualApplianceSKUsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualApplianceSKUsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualApplianceSKUsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualApplianceSKUsClient) getCreateRequest(ctx context.Context, skuName string, options *VirtualApplianceSKUsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if skuName == "" { + return nil, errors.New("parameter skuName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{skuName}", url.PathEscape(skuName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualApplianceSKUsClient) getHandleResponse(resp *http.Response) (VirtualApplianceSKUsClientGetResponse, error) { + result := VirtualApplianceSKUsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSKU); err != nil { + return VirtualApplianceSKUsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List all SKUs available for a virtual appliance. +// +// Generated from API version 2024-05-01 +// - options - VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.NewListPager +// method. +func (client *VirtualApplianceSKUsClient) NewListPager(options *VirtualApplianceSKUsClientListOptions) *runtime.Pager[VirtualApplianceSKUsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualApplianceSKUsClientListResponse]{ + More: func(page VirtualApplianceSKUsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualApplianceSKUsClientListResponse) (VirtualApplianceSKUsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualApplianceSKUsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return VirtualApplianceSKUsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualApplianceSKUsClient) listCreateRequest(ctx context.Context, options *VirtualApplianceSKUsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualApplianceSKUsClient) listHandleResponse(resp *http.Response) (VirtualApplianceSKUsClientListResponse, error) { + result := VirtualApplianceSKUsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSKUListResult); err != nil { + return VirtualApplianceSKUsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubbgpconnection_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubbgpconnection_client.go new file mode 100644 index 00000000..d9a2826d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubbgpconnection_client.go @@ -0,0 +1,283 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualHubBgpConnectionClient contains the methods for the VirtualHubBgpConnection group. +// Don't use this type directly, use NewVirtualHubBgpConnectionClient() instead. +type VirtualHubBgpConnectionClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualHubBgpConnectionClient creates a new instance of VirtualHubBgpConnectionClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualHubBgpConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubBgpConnectionClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualHubBgpConnectionClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the connection. +// - parameters - Parameters of Bgp connection. +// - options - VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginCreateOrUpdate +// method. +func (client *VirtualHubBgpConnectionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection, options *VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubBgpConnectionClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, connectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubBgpConnectionClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubBgpConnectionClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubBgpConnectionClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection, options *VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubBgpConnectionClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualHubBgpConnectionClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection, options *VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a VirtualHubBgpConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHubBgpConnection. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the connection. +// - options - VirtualHubBgpConnectionClientBeginDeleteOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginDelete +// method. +func (client *VirtualHubBgpConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientBeginDeleteOptions) (*runtime.Poller[VirtualHubBgpConnectionClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, connectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubBgpConnectionClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubBgpConnectionClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a VirtualHubBgpConnection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubBgpConnectionClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubBgpConnectionClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualHubBgpConnectionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a Virtual Hub Bgp Connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the connection. +// - options - VirtualHubBgpConnectionClientGetOptions contains the optional parameters for the VirtualHubBgpConnectionClient.Get +// method. +func (client *VirtualHubBgpConnectionClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientGetOptions) (VirtualHubBgpConnectionClientGetResponse, error) { + var err error + const operationName = "VirtualHubBgpConnectionClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) + if err != nil { + return VirtualHubBgpConnectionClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualHubBgpConnectionClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualHubBgpConnectionClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualHubBgpConnectionClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualHubBgpConnectionClient) getHandleResponse(resp *http.Response) (VirtualHubBgpConnectionClientGetResponse, error) { + result := VirtualHubBgpConnectionClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BgpConnection); err != nil { + return VirtualHubBgpConnectionClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubbgpconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubbgpconnections_client.go new file mode 100644 index 00000000..fb9a530f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubbgpconnections_client.go @@ -0,0 +1,274 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualHubBgpConnectionsClient contains the methods for the VirtualHubBgpConnections group. +// Don't use this type directly, use NewVirtualHubBgpConnectionsClient() instead. +type VirtualHubBgpConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualHubBgpConnectionsClient creates a new instance of VirtualHubBgpConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualHubBgpConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubBgpConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualHubBgpConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Retrieves the details of all VirtualHubBgpConnections. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.NewListPager +// method. +func (client *VirtualHubBgpConnectionsClient) NewListPager(resourceGroupName string, virtualHubName string, options *VirtualHubBgpConnectionsClientListOptions) *runtime.Pager[VirtualHubBgpConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualHubBgpConnectionsClientListResponse]{ + More: func(page VirtualHubBgpConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualHubBgpConnectionsClientListResponse) (VirtualHubBgpConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualHubBgpConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) + if err != nil { + return VirtualHubBgpConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualHubBgpConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubBgpConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualHubBgpConnectionsClient) listHandleResponse(resp *http.Response) (VirtualHubBgpConnectionsClientListResponse, error) { + result := VirtualHubBgpConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubBgpConnectionResults); err != nil { + return VirtualHubBgpConnectionsClientListResponse{}, err + } + return result, nil +} + +// BeginListAdvertisedRoutes - Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - hubName - The name of the virtual hub. +// - connectionName - The name of the virtual hub bgp connection. +// - options - VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes +// method. +func (client *VirtualHubBgpConnectionsClient) BeginListAdvertisedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions) (*runtime.Poller[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listAdvertisedRoutes(ctx, resourceGroupName, hubName, connectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListAdvertisedRoutes - Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubBgpConnectionsClient) listAdvertisedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listAdvertisedRoutesCreateRequest(ctx, resourceGroupName, hubName, connectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listAdvertisedRoutesCreateRequest creates the ListAdvertisedRoutes request. +func (client *VirtualHubBgpConnectionsClient) listAdvertisedRoutesCreateRequest(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hubName == "" { + return nil, errors.New("parameter hubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hubName}", url.PathEscape(hubName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginListLearnedRoutes - Retrieves a list of routes the virtual hub bgp connection has learned. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - hubName - The name of the virtual hub. +// - connectionName - The name of the virtual hub bgp connection. +// - options - VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListLearnedRoutes +// method. +func (client *VirtualHubBgpConnectionsClient) BeginListLearnedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions) (*runtime.Poller[VirtualHubBgpConnectionsClientListLearnedRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listLearnedRoutes(ctx, resourceGroupName, hubName, connectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubBgpConnectionsClientListLearnedRoutesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubBgpConnectionsClientListLearnedRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListLearnedRoutes - Retrieves a list of routes the virtual hub bgp connection has learned. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubBgpConnectionsClient) listLearnedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubBgpConnectionsClient.BeginListLearnedRoutes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listLearnedRoutesCreateRequest(ctx, resourceGroupName, hubName, connectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listLearnedRoutesCreateRequest creates the ListLearnedRoutes request. +func (client *VirtualHubBgpConnectionsClient) listLearnedRoutesCreateRequest(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if hubName == "" { + return nil, errors.New("parameter hubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{hubName}", url.PathEscape(hubName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubipconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubipconfiguration_client.go new file mode 100644 index 00000000..3883354c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubipconfiguration_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualHubIPConfigurationClient contains the methods for the VirtualHubIPConfiguration group. +// Don't use this type directly, use NewVirtualHubIPConfigurationClient() instead. +type VirtualHubIPConfigurationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualHubIPConfigurationClient creates a new instance of VirtualHubIPConfigurationClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualHubIPConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubIPConfigurationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualHubIPConfigurationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - ipConfigName - The name of the ipconfig. +// - parameters - Hub Ip Configuration parameters. +// - options - VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginCreateOrUpdate +// method. +func (client *VirtualHubIPConfigurationClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, parameters HubIPConfiguration, options *VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubIPConfigurationClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, ipConfigName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubIPConfigurationClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubIPConfigurationClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubIPConfigurationClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, parameters HubIPConfiguration, options *VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubIPConfigurationClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, ipConfigName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualHubIPConfigurationClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, parameters HubIPConfiguration, options *VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if ipConfigName == "" { + return nil, errors.New("parameter ipConfigName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipConfigName}", url.PathEscape(ipConfigName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a VirtualHubIpConfiguration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHubBgpConnection. +// - virtualHubName - The name of the VirtualHub. +// - ipConfigName - The name of the ipconfig. +// - options - VirtualHubIPConfigurationClientBeginDeleteOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginDelete +// method. +func (client *VirtualHubIPConfigurationClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientBeginDeleteOptions) (*runtime.Poller[VirtualHubIPConfigurationClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, ipConfigName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubIPConfigurationClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubIPConfigurationClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a VirtualHubIpConfiguration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubIPConfigurationClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubIPConfigurationClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, ipConfigName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualHubIPConfigurationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if ipConfigName == "" { + return nil, errors.New("parameter ipConfigName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipConfigName}", url.PathEscape(ipConfigName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a Virtual Hub Ip configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - ipConfigName - The name of the ipconfig. +// - options - VirtualHubIPConfigurationClientGetOptions contains the optional parameters for the VirtualHubIPConfigurationClient.Get +// method. +func (client *VirtualHubIPConfigurationClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientGetOptions) (VirtualHubIPConfigurationClientGetResponse, error) { + var err error + const operationName = "VirtualHubIPConfigurationClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, ipConfigName, options) + if err != nil { + return VirtualHubIPConfigurationClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualHubIPConfigurationClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualHubIPConfigurationClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualHubIPConfigurationClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if ipConfigName == "" { + return nil, errors.New("parameter ipConfigName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{ipConfigName}", url.PathEscape(ipConfigName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualHubIPConfigurationClient) getHandleResponse(resp *http.Response) (VirtualHubIPConfigurationClientGetResponse, error) { + result := VirtualHubIPConfigurationClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.HubIPConfiguration); err != nil { + return VirtualHubIPConfigurationClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Retrieves the details of all VirtualHubIpConfigurations. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.NewListPager +// method. +func (client *VirtualHubIPConfigurationClient) NewListPager(resourceGroupName string, virtualHubName string, options *VirtualHubIPConfigurationClientListOptions) *runtime.Pager[VirtualHubIPConfigurationClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualHubIPConfigurationClientListResponse]{ + More: func(page VirtualHubIPConfigurationClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualHubIPConfigurationClientListResponse) (VirtualHubIPConfigurationClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualHubIPConfigurationClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) + if err != nil { + return VirtualHubIPConfigurationClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualHubIPConfigurationClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubIPConfigurationClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualHubIPConfigurationClient) listHandleResponse(resp *http.Response) (VirtualHubIPConfigurationClientListResponse, error) { + result := VirtualHubIPConfigurationClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubIPConfigurationResults); err != nil { + return VirtualHubIPConfigurationClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubroutetablev2s_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubroutetablev2s_client.go new file mode 100644 index 00000000..4db2ee78 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubroutetablev2s_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualHubRouteTableV2SClient contains the methods for the VirtualHubRouteTableV2S group. +// Don't use this type directly, use NewVirtualHubRouteTableV2SClient() instead. +type VirtualHubRouteTableV2SClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualHubRouteTableV2SClient creates a new instance of VirtualHubRouteTableV2SClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualHubRouteTableV2SClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubRouteTableV2SClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualHubRouteTableV2SClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the VirtualHubRouteTableV2. +// - virtualHubRouteTableV2Parameters - Parameters supplied to create or update VirtualHubRouteTableV2. +// - options - VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginCreateOrUpdate +// method. +func (client *VirtualHubRouteTableV2SClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2, options *VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubRouteTableV2SClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubRouteTableV2SClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubRouteTableV2SClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubRouteTableV2SClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2, options *VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubRouteTableV2SClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualHubRouteTableV2SClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2, options *VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, virtualHubRouteTableV2Parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a VirtualHubRouteTableV2. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHubRouteTableV2. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the VirtualHubRouteTableV2. +// - options - VirtualHubRouteTableV2SClientBeginDeleteOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginDelete +// method. +func (client *VirtualHubRouteTableV2SClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientBeginDeleteOptions) (*runtime.Poller[VirtualHubRouteTableV2SClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeTableName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubRouteTableV2SClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubRouteTableV2SClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a VirtualHubRouteTableV2. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubRouteTableV2SClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubRouteTableV2SClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualHubRouteTableV2SClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a VirtualHubRouteTableV2. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHubRouteTableV2. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the VirtualHubRouteTableV2. +// - options - VirtualHubRouteTableV2SClientGetOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.Get +// method. +func (client *VirtualHubRouteTableV2SClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientGetOptions) (VirtualHubRouteTableV2SClientGetResponse, error) { + var err error + const operationName = "VirtualHubRouteTableV2SClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) + if err != nil { + return VirtualHubRouteTableV2SClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualHubRouteTableV2SClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualHubRouteTableV2SClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualHubRouteTableV2SClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + if routeTableName == "" { + return nil, errors.New("parameter routeTableName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualHubRouteTableV2SClient) getHandleResponse(resp *http.Response) (VirtualHubRouteTableV2SClientGetResponse, error) { + result := VirtualHubRouteTableV2SClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualHubRouteTableV2); err != nil { + return VirtualHubRouteTableV2SClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Retrieves the details of all VirtualHubRouteTableV2s. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.NewListPager +// method. +func (client *VirtualHubRouteTableV2SClient) NewListPager(resourceGroupName string, virtualHubName string, options *VirtualHubRouteTableV2SClientListOptions) *runtime.Pager[VirtualHubRouteTableV2SClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualHubRouteTableV2SClientListResponse]{ + More: func(page VirtualHubRouteTableV2SClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualHubRouteTableV2SClientListResponse) (VirtualHubRouteTableV2SClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualHubRouteTableV2SClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + }, nil) + if err != nil { + return VirtualHubRouteTableV2SClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualHubRouteTableV2SClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubRouteTableV2SClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualHubRouteTableV2SClient) listHandleResponse(resp *http.Response) (VirtualHubRouteTableV2SClientListResponse, error) { + result := VirtualHubRouteTableV2SClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubRouteTableV2SResult); err != nil { + return VirtualHubRouteTableV2SClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubs_client.go new file mode 100644 index 00000000..d9fb4e8c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualhubs_client.go @@ -0,0 +1,695 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualHubsClient contains the methods for the VirtualHubs group. +// Don't use this type directly, use NewVirtualHubsClient() instead. +type VirtualHubsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualHubsClient creates a new instance of VirtualHubsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualHubsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - virtualHubParameters - Parameters supplied to create or update VirtualHub. +// - options - VirtualHubsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubsClient.BeginCreateOrUpdate +// method. +func (client *VirtualHubsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub, options *VirtualHubsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub, options *VirtualHubsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualHubsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub, options *VirtualHubsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, virtualHubParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a VirtualHub. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubsClientBeginDeleteOptions contains the optional parameters for the VirtualHubsClient.BeginDelete method. +func (client *VirtualHubsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginDeleteOptions) (*runtime.Poller[VirtualHubsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a VirtualHub. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualHubsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a VirtualHub. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubsClientGetOptions contains the optional parameters for the VirtualHubsClient.Get method. +func (client *VirtualHubsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientGetOptions) (VirtualHubsClientGetResponse, error) { + var err error + const operationName = "VirtualHubsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, options) + if err != nil { + return VirtualHubsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualHubsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualHubsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualHubsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualHubsClient) getHandleResponse(resp *http.Response) (VirtualHubsClientGetResponse, error) { + result := VirtualHubsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualHub); err != nil { + return VirtualHubsClientGetResponse{}, err + } + return result, nil +} + +// BeginGetEffectiveVirtualHubRoutes - Gets the effective routes configured for the Virtual Hub resource or the specified +// resource . +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes +// method. +func (client *VirtualHubsClient) BeginGetEffectiveVirtualHubRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions) (*runtime.Poller[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getEffectiveVirtualHubRoutes(ctx, resourceGroupName, virtualHubName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetEffectiveVirtualHubRoutes - Gets the effective routes configured for the Virtual Hub resource or the specified resource +// . +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubsClient) getEffectiveVirtualHubRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getEffectiveVirtualHubRoutesCreateRequest(ctx, resourceGroupName, virtualHubName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getEffectiveVirtualHubRoutesCreateRequest creates the GetEffectiveVirtualHubRoutes request. +func (client *VirtualHubsClient) getEffectiveVirtualHubRoutesCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.EffectiveRoutesParameters != nil { + if err := runtime.MarshalAsJSON(req, *options.EffectiveRoutesParameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginGetInboundRoutes - Gets the inbound routes configured for the Virtual Hub on a particular connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - getInboundRoutesParameters - Parameters supplied to get the inbound routes for a connection resource. +// - options - VirtualHubsClientBeginGetInboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetInboundRoutes +// method. +func (client *VirtualHubsClient) BeginGetInboundRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, getInboundRoutesParameters GetInboundRoutesParameters, options *VirtualHubsClientBeginGetInboundRoutesOptions) (*runtime.Poller[VirtualHubsClientGetInboundRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getInboundRoutes(ctx, resourceGroupName, virtualHubName, getInboundRoutesParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubsClientGetInboundRoutesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubsClientGetInboundRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetInboundRoutes - Gets the inbound routes configured for the Virtual Hub on a particular connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubsClient) getInboundRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, getInboundRoutesParameters GetInboundRoutesParameters, options *VirtualHubsClientBeginGetInboundRoutesOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubsClient.BeginGetInboundRoutes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getInboundRoutesCreateRequest(ctx, resourceGroupName, virtualHubName, getInboundRoutesParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getInboundRoutesCreateRequest creates the GetInboundRoutes request. +func (client *VirtualHubsClient) getInboundRoutesCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, getInboundRoutesParameters GetInboundRoutesParameters, options *VirtualHubsClientBeginGetInboundRoutesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/inboundRoutes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, getInboundRoutesParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginGetOutboundRoutes - Gets the outbound routes configured for the Virtual Hub on a particular connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - getOutboundRoutesParameters - Parameters supplied to get the outbound routes for a connection resource. +// - options - VirtualHubsClientBeginGetOutboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetOutboundRoutes +// method. +func (client *VirtualHubsClient) BeginGetOutboundRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, getOutboundRoutesParameters GetOutboundRoutesParameters, options *VirtualHubsClientBeginGetOutboundRoutesOptions) (*runtime.Poller[VirtualHubsClientGetOutboundRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getOutboundRoutes(ctx, resourceGroupName, virtualHubName, getOutboundRoutesParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualHubsClientGetOutboundRoutesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualHubsClientGetOutboundRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetOutboundRoutes - Gets the outbound routes configured for the Virtual Hub on a particular connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualHubsClient) getOutboundRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, getOutboundRoutesParameters GetOutboundRoutesParameters, options *VirtualHubsClientBeginGetOutboundRoutesOptions) (*http.Response, error) { + var err error + const operationName = "VirtualHubsClient.BeginGetOutboundRoutes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getOutboundRoutesCreateRequest(ctx, resourceGroupName, virtualHubName, getOutboundRoutesParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getOutboundRoutesCreateRequest creates the GetOutboundRoutes request. +func (client *VirtualHubsClient) getOutboundRoutesCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, getOutboundRoutesParameters GetOutboundRoutesParameters, options *VirtualHubsClientBeginGetOutboundRoutesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/outboundRoutes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, getOutboundRoutesParameters); err != nil { + return nil, err + } + return req, nil +} + +// NewListPager - Lists all the VirtualHubs in a subscription. +// +// Generated from API version 2024-05-01 +// - options - VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.NewListPager method. +func (client *VirtualHubsClient) NewListPager(options *VirtualHubsClientListOptions) *runtime.Pager[VirtualHubsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualHubsClientListResponse]{ + More: func(page VirtualHubsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualHubsClientListResponse) (VirtualHubsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualHubsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return VirtualHubsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualHubsClient) listCreateRequest(ctx context.Context, options *VirtualHubsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualHubsClient) listHandleResponse(resp *http.Response) (VirtualHubsClientListResponse, error) { + result := VirtualHubsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubsResult); err != nil { + return VirtualHubsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all the VirtualHubs in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - options - VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.NewListByResourceGroupPager +// method. +func (client *VirtualHubsClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualHubsClientListByResourceGroupOptions) *runtime.Pager[VirtualHubsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualHubsClientListByResourceGroupResponse]{ + More: func(page VirtualHubsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualHubsClientListByResourceGroupResponse) (VirtualHubsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualHubsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VirtualHubsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *VirtualHubsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualHubsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *VirtualHubsClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualHubsClientListByResourceGroupResponse, error) { + result := VirtualHubsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubsResult); err != nil { + return VirtualHubsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates VirtualHub tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - virtualHubParameters - Parameters supplied to update VirtualHub tags. +// - options - VirtualHubsClientUpdateTagsOptions contains the optional parameters for the VirtualHubsClient.UpdateTags method. +func (client *VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject, options *VirtualHubsClientUpdateTagsOptions) (VirtualHubsClientUpdateTagsResponse, error) { + var err error + const operationName = "VirtualHubsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) + if err != nil { + return VirtualHubsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualHubsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualHubsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *VirtualHubsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject, options *VirtualHubsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualHubName == "" { + return nil, errors.New("parameter virtualHubName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, virtualHubParameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *VirtualHubsClient) updateTagsHandleResponse(resp *http.Response) (VirtualHubsClientUpdateTagsResponse, error) { + result := VirtualHubsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualHub); err != nil { + return VirtualHubsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkgatewayconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkgatewayconnections_client.go new file mode 100644 index 00000000..d91656df --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkgatewayconnections_client.go @@ -0,0 +1,966 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualNetworkGatewayConnectionsClient contains the methods for the VirtualNetworkGatewayConnections group. +// Don't use this type directly, use NewVirtualNetworkGatewayConnectionsClient() instead. +type VirtualNetworkGatewayConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualNetworkGatewayConnectionsClient creates a new instance of VirtualNetworkGatewayConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewayConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualNetworkGatewayConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a virtual network gateway connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. +// - parameters - Parameters supplied to the create or update virtual network gateway connection operation. +// - options - VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate +// method. +func (client *VirtualNetworkGatewayConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, options *VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a virtual network gateway connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, options *VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualNetworkGatewayConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, options *VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified virtual network Gateway connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. +// - options - VirtualNetworkGatewayConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginDelete +// method. +func (client *VirtualNetworkGatewayConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified virtual network Gateway connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualNetworkGatewayConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified virtual network gateway connection by resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. +// - options - VirtualNetworkGatewayConnectionsClientGetOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.Get +// method. +func (client *VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientGetOptions) (VirtualNetworkGatewayConnectionsClientGetResponse, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return VirtualNetworkGatewayConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworkGatewayConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworkGatewayConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualNetworkGatewayConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualNetworkGatewayConnectionsClient) getHandleResponse(resp *http.Response) (VirtualNetworkGatewayConnectionsClientGetResponse, error) { + result := VirtualNetworkGatewayConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayConnection); err != nil { + return VirtualNetworkGatewayConnectionsClientGetResponse{}, err + } + return result, nil +} + +// BeginGetIkeSas - Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. +// - options - VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas +// method. +func (client *VirtualNetworkGatewayConnectionsClient) BeginGetIkeSas(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getIkeSas(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetIkeSas - Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayConnectionsClient) getIkeSas(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getIkeSasCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getIkeSasCreateRequest creates the GetIkeSas request. +func (client *VirtualNetworkGatewayConnectionsClient) getIkeSasCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetSharedKey - The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual +// network gateway connection shared key through Network resource provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The virtual network gateway connection shared key name. +// - options - VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.GetSharedKey +// method. +func (client *VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions) (VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.GetSharedKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{}, err + } + resp, err := client.getSharedKeyHandleResponse(httpResp) + return resp, err +} + +// getSharedKeyCreateRequest creates the GetSharedKey request. +func (client *VirtualNetworkGatewayConnectionsClient) getSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getSharedKeyHandleResponse handles the GetSharedKey response. +func (client *VirtualNetworkGatewayConnectionsClient) getSharedKeyHandleResponse(resp *http.Response) (VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse, error) { + result := VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionSharedKey); err != nil { + return VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{}, err + } + return result, nil +} + +// NewListPager - The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections +// created. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.NewListPager +// method. +func (client *VirtualNetworkGatewayConnectionsClient) NewListPager(resourceGroupName string, options *VirtualNetworkGatewayConnectionsClientListOptions) *runtime.Pager[VirtualNetworkGatewayConnectionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewayConnectionsClientListResponse]{ + More: func(page VirtualNetworkGatewayConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworkGatewayConnectionsClientListResponse) (VirtualNetworkGatewayConnectionsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkGatewayConnectionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VirtualNetworkGatewayConnectionsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualNetworkGatewayConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualNetworkGatewayConnectionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualNetworkGatewayConnectionsClient) listHandleResponse(resp *http.Response) (VirtualNetworkGatewayConnectionsClientListResponse, error) { + result := VirtualNetworkGatewayConnectionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayConnectionListResult); err != nil { + return VirtualNetworkGatewayConnectionsClientListResponse{}, err + } + return result, nil +} + +// BeginResetConnection - Resets the virtual network gateway connection specified. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. +// - options - VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetConnection +// method. +func (client *VirtualNetworkGatewayConnectionsClient) BeginResetConnection(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientResetConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resetConnection(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientResetConnectionResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientResetConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResetConnection - Resets the virtual network gateway connection specified. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayConnectionsClient) resetConnection(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.BeginResetConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetConnectionCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resetConnectionCreateRequest creates the ResetConnection request. +func (client *VirtualNetworkGatewayConnectionsClient) resetConnectionCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginResetSharedKey - The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection +// shared key for passed virtual network gateway connection in the specified resource group +// through Network resource provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The virtual network gateway connection reset shared key Name. +// - parameters - Parameters supplied to the begin reset virtual network gateway connection shared key operation through network +// resource provider. +// - options - VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey +// method. +func (client *VirtualNetworkGatewayConnectionsClient) BeginResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resetSharedKey(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResetSharedKey - The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection +// shared key for passed virtual network gateway connection in the specified resource group +// through Network resource provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayConnectionsClient) resetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resetSharedKeyCreateRequest creates the ResetSharedKey request. +func (client *VirtualNetworkGatewayConnectionsClient) resetSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginSetSharedKey - The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection +// shared key for passed virtual network gateway connection in the specified resource group through +// Network resource provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The virtual network gateway connection name. +// - parameters - Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork +// resource provider. +// - options - VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey +// method. +func (client *VirtualNetworkGatewayConnectionsClient) BeginSetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.setSharedKey(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SetSharedKey - The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared +// key for passed virtual network gateway connection in the specified resource group through +// Network resource provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayConnectionsClient) setSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.setSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// setSharedKeyCreateRequest creates the SetSharedKey request. +func (client *VirtualNetworkGatewayConnectionsClient) setSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginStartPacketCapture - Starts packet capture on virtual network gateway connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. +// - options - VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the +// VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture method. +func (client *VirtualNetworkGatewayConnectionsClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartPacketCapture - Starts packet capture on virtual network gateway connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayConnectionsClient) startPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startPacketCaptureCreateRequest creates the StartPacketCapture request. +func (client *VirtualNetworkGatewayConnectionsClient) startPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginStopPacketCapture - Stops packet capture on virtual network gateway connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. +// - parameters - Virtual network gateway packet capture parameters supplied to stop packet capture on gateway connection. +// - options - VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the +// VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture method. +func (client *VirtualNetworkGatewayConnectionsClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StopPacketCapture - Stops packet capture on virtual network gateway connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayConnectionsClient) stopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopPacketCaptureCreateRequest creates the StopPacketCapture request. +func (client *VirtualNetworkGatewayConnectionsClient) stopPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdateTags - Updates a virtual network gateway connection tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. +// - parameters - Parameters supplied to update virtual network gateway connection tags. +// - options - VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginUpdateTags +// method. +func (client *VirtualNetworkGatewayConnectionsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject, options *VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateTags - Updates a virtual network gateway connection tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayConnectionsClient) updateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject, options *VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayConnectionsClient.BeginUpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *VirtualNetworkGatewayConnectionsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject, options *VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkgatewaynatrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkgatewaynatrules_client.go new file mode 100644 index 00000000..4253dd3a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkgatewaynatrules_client.go @@ -0,0 +1,350 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualNetworkGatewayNatRulesClient contains the methods for the VirtualNetworkGatewayNatRules group. +// Don't use this type directly, use NewVirtualNetworkGatewayNatRulesClient() instead. +type VirtualNetworkGatewayNatRulesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualNetworkGatewayNatRulesClient creates a new instance of VirtualNetworkGatewayNatRulesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualNetworkGatewayNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewayNatRulesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualNetworkGatewayNatRulesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing +// nat rules. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the Virtual Network Gateway. +// - virtualNetworkGatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - natRuleParameters - Parameters supplied to create or Update a Nat Rule. +// - options - VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate +// method. +func (client *VirtualNetworkGatewayNatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule, options *VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing +// nat rules. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayNatRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule, options *VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualNetworkGatewayNatRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule, options *VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if natRuleName == "" { + return nil, errors.New("parameter natRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, natRuleParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a nat rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the Virtual Network Gateway. +// - virtualNetworkGatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - options - VirtualNetworkGatewayNatRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginDelete +// method. +func (client *VirtualNetworkGatewayNatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkGatewayNatRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewayNatRulesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewayNatRulesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a nat rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewayNatRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewayNatRulesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualNetworkGatewayNatRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if natRuleName == "" { + return nil, errors.New("parameter natRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a nat rule. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the Virtual Network Gateway. +// - virtualNetworkGatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - options - VirtualNetworkGatewayNatRulesClientGetOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.Get +// method. +func (client *VirtualNetworkGatewayNatRulesClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientGetOptions) (VirtualNetworkGatewayNatRulesClientGetResponse, error) { + var err error + const operationName = "VirtualNetworkGatewayNatRulesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) + if err != nil { + return VirtualNetworkGatewayNatRulesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworkGatewayNatRulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworkGatewayNatRulesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualNetworkGatewayNatRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if natRuleName == "" { + return nil, errors.New("parameter natRuleName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualNetworkGatewayNatRulesClient) getHandleResponse(resp *http.Response) (VirtualNetworkGatewayNatRulesClientGetResponse, error) { + result := VirtualNetworkGatewayNatRulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayNatRule); err != nil { + return VirtualNetworkGatewayNatRulesClientGetResponse{}, err + } + return result, nil +} + +// NewListByVirtualNetworkGatewayPager - Retrieves all nat rules for a particular virtual network gateway. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the virtual network gateway. +// - virtualNetworkGatewayName - The name of the gateway. +// - options - VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the +// VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager method. +func (client *VirtualNetworkGatewayNatRulesClient) NewListByVirtualNetworkGatewayPager(resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions) *runtime.Pager[VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse]{ + More: func(page VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse) (VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVirtualNetworkGatewayCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + }, nil) + if err != nil { + return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, err + } + return client.listByVirtualNetworkGatewayHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByVirtualNetworkGatewayCreateRequest creates the ListByVirtualNetworkGateway request. +func (client *VirtualNetworkGatewayNatRulesClient) listByVirtualNetworkGatewayCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByVirtualNetworkGatewayHandleResponse handles the ListByVirtualNetworkGateway response. +func (client *VirtualNetworkGatewayNatRulesClient) listByVirtualNetworkGatewayHandleResponse(resp *http.Response) (VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse, error) { + result := VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualNetworkGatewayNatRulesResult); err != nil { + return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkgateways_client.go new file mode 100644 index 00000000..2238f933 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkgateways_client.go @@ -0,0 +1,2074 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// VirtualNetworkGatewaysClient contains the methods for the VirtualNetworkGateways group. +// Don't use this type directly, use NewVirtualNetworkGatewaysClient() instead. +type VirtualNetworkGatewaysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualNetworkGatewaysClient creates a new instance of VirtualNetworkGatewaysClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewaysClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualNetworkGatewaysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a virtual network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - parameters - Parameters supplied to create or update virtual network gateway operation. +// - options - VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginCreateOrUpdate +// method. +func (client *VirtualNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, options *VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a virtual network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, options *VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualNetworkGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, options *VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified virtual network gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginDelete +// method. +func (client *VirtualNetworkGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified virtual network gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualNetworkGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDisconnectVirtualNetworkGatewayVPNConnections - Disconnect vpn connections of virtual network gateway in the specified +// resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - request - The parameters are supplied to disconnect vpn connections. +// - options - VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions contains the optional parameters +// for the VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections method. +func (client *VirtualNetworkGatewaysClient) BeginDisconnectVirtualNetworkGatewayVPNConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVPNConnectionRequest, options *VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions) (*runtime.Poller[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.disconnectVirtualNetworkGatewayVPNConnections(ctx, resourceGroupName, virtualNetworkGatewayName, request, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DisconnectVirtualNetworkGatewayVPNConnections - Disconnect vpn connections of virtual network gateway in the specified +// resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) disconnectVirtualNetworkGatewayVPNConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVPNConnectionRequest, options *VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.disconnectVirtualNetworkGatewayVPNConnectionsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, request, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// disconnectVirtualNetworkGatewayVPNConnectionsCreateRequest creates the DisconnectVirtualNetworkGatewayVPNConnections request. +func (client *VirtualNetworkGatewaysClient) disconnectVirtualNetworkGatewayVPNConnectionsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVPNConnectionRequest, options *VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// BeginGenerateVPNProfile - Generates VPN profile for P2S client of the virtual network gateway in the specified resource +// group. Used for IKEV2 and radius based authentication. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - parameters - Parameters supplied to the generate virtual network gateway VPN client package operation. +// - options - VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGenerateVPNProfile +// method. +func (client *VirtualNetworkGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGenerateVPNProfileResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.generateVPNProfile(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGenerateVPNProfileResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGenerateVPNProfileResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GenerateVPNProfile - Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. +// Used for IKEV2 and radius based authentication. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) generateVPNProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginGenerateVPNProfile" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generateVPNProfileCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// generateVPNProfileCreateRequest creates the GenerateVPNProfile request. +func (client *VirtualNetworkGatewaysClient) generateVPNProfileCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginGeneratevpnclientpackage - Generates VPN client package for P2S client of the virtual network gateway in the specified +// resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - parameters - Parameters supplied to the generate virtual network gateway VPN client package operation. +// - options - VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage +// method. +func (client *VirtualNetworkGatewaysClient) BeginGeneratevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.generatevpnclientpackage(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Generatevpnclientpackage - Generates VPN client package for P2S client of the virtual network gateway in the specified +// resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.generatevpnclientpackageCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// generatevpnclientpackageCreateRequest creates the Generatevpnclientpackage request. +func (client *VirtualNetworkGatewaysClient) generatevpnclientpackageCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets the specified virtual network gateway by resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientGetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.Get +// method. +func (client *VirtualNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientGetOptions) (VirtualNetworkGatewaysClientGetResponse, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return VirtualNetworkGatewaysClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworkGatewaysClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworkGatewaysClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualNetworkGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualNetworkGatewaysClient) getHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientGetResponse, error) { + result := VirtualNetworkGatewaysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGateway); err != nil { + return VirtualNetworkGatewaysClientGetResponse{}, err + } + return result, nil +} + +// BeginGetAdvertisedRoutes - This operation retrieves a list of routes the virtual network gateway is advertising to the +// specified peer. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - peer - The IP address of the peer. +// - options - VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes +// method. +func (client *VirtualNetworkGatewaysClient) BeginGetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string, options *VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getAdvertisedRoutes(ctx, resourceGroupName, virtualNetworkGatewayName, peer, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetAdvertisedRoutes - This operation retrieves a list of routes the virtual network gateway is advertising to the specified +// peer. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) getAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string, options *VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAdvertisedRoutesCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, peer, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getAdvertisedRoutesCreateRequest creates the GetAdvertisedRoutes request. +func (client *VirtualNetworkGatewaysClient) getAdvertisedRoutesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string, options *VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + reqQP.Set("peer", peer) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginGetBgpPeerStatus - The GetBgpPeerStatus operation retrieves the status of all BGP peers. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus +// method. +func (client *VirtualNetworkGatewaysClient) BeginGetBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getBgpPeerStatus(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetBgpPeerStatus - The GetBgpPeerStatus operation retrieves the status of all BGP peers. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) getBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getBgpPeerStatusCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getBgpPeerStatusCreateRequest creates the GetBgpPeerStatus request. +func (client *VirtualNetworkGatewaysClient) getBgpPeerStatusCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.Peer != nil { + reqQP.Set("peer", *options.Peer) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginGetFailoverAllTestDetails - This operation retrieves the details of all the failover tests performed on the gateway +// for different peering locations +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - typeParam - The type of failover test +// - fetchLatest - Fetch only the latest tests for each peering location +// - options - VirtualNetworkGatewaysClientBeginGetFailoverAllTestDetailsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetFailoverAllTestDetails +// method. +func (client *VirtualNetworkGatewaysClient) BeginGetFailoverAllTestDetails(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, typeParam string, fetchLatest bool, options *VirtualNetworkGatewaysClientBeginGetFailoverAllTestDetailsOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetFailoverAllTestDetailsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getFailoverAllTestDetails(ctx, resourceGroupName, virtualNetworkGatewayName, typeParam, fetchLatest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetFailoverAllTestDetailsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetFailoverAllTestDetailsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetFailoverAllTestDetails - This operation retrieves the details of all the failover tests performed on the gateway for +// different peering locations +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) getFailoverAllTestDetails(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, typeParam string, fetchLatest bool, options *VirtualNetworkGatewaysClientBeginGetFailoverAllTestDetailsOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginGetFailoverAllTestDetails" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getFailoverAllTestDetailsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, typeParam, fetchLatest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getFailoverAllTestDetailsCreateRequest creates the GetFailoverAllTestDetails request. +func (client *VirtualNetworkGatewaysClient) getFailoverAllTestDetailsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, typeParam string, fetchLatest bool, options *VirtualNetworkGatewaysClientBeginGetFailoverAllTestDetailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverAllTestsDetails" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + reqQP.Set("fetchLatest", strconv.FormatBool(fetchLatest)) + reqQP.Set("type", typeParam) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginGetFailoverSingleTestDetails - This operation retrieves the details of a particular failover test performed on the +// gateway based on the test Guid +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - peeringLocation - Peering location of the test +// - failoverTestID - The unique Guid value which identifies the test +// - options - VirtualNetworkGatewaysClientBeginGetFailoverSingleTestDetailsOptions contains the optional parameters for the +// VirtualNetworkGatewaysClient.BeginGetFailoverSingleTestDetails method. +func (client *VirtualNetworkGatewaysClient) BeginGetFailoverSingleTestDetails(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peeringLocation string, failoverTestID string, options *VirtualNetworkGatewaysClientBeginGetFailoverSingleTestDetailsOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetFailoverSingleTestDetailsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getFailoverSingleTestDetails(ctx, resourceGroupName, virtualNetworkGatewayName, peeringLocation, failoverTestID, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetFailoverSingleTestDetailsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetFailoverSingleTestDetailsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetFailoverSingleTestDetails - This operation retrieves the details of a particular failover test performed on the gateway +// based on the test Guid +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) getFailoverSingleTestDetails(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peeringLocation string, failoverTestID string, options *VirtualNetworkGatewaysClientBeginGetFailoverSingleTestDetailsOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginGetFailoverSingleTestDetails" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getFailoverSingleTestDetailsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, peeringLocation, failoverTestID, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getFailoverSingleTestDetailsCreateRequest creates the GetFailoverSingleTestDetails request. +func (client *VirtualNetworkGatewaysClient) getFailoverSingleTestDetailsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peeringLocation string, failoverTestID string, options *VirtualNetworkGatewaysClientBeginGetFailoverSingleTestDetailsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getFailoverSingleTestDetails" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + reqQP.Set("failoverTestId", failoverTestID) + reqQP.Set("peeringLocation", peeringLocation) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginGetLearnedRoutes - This operation retrieves a list of routes the virtual network gateway has learned, including routes +// learned from BGP peers. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetLearnedRoutes +// method. +func (client *VirtualNetworkGatewaysClient) BeginGetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetLearnedRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getLearnedRoutes(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetLearnedRoutesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetLearnedRoutesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetLearnedRoutes - This operation retrieves a list of routes the virtual network gateway has learned, including routes +// learned from BGP peers. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) getLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginGetLearnedRoutes" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getLearnedRoutesCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getLearnedRoutesCreateRequest creates the GetLearnedRoutes request. +func (client *VirtualNetworkGatewaysClient) getLearnedRoutesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginGetVPNProfilePackageURL - Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified +// resource group. The profile needs to be generated first using generateVpnProfile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL +// method. +func (client *VirtualNetworkGatewaysClient) BeginGetVPNProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getVPNProfilePackageURL(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetVPNProfilePackageURL - Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified +// resource group. The profile needs to be generated first using generateVpnProfile. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) getVPNProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVPNProfilePackageURLCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getVPNProfilePackageURLCreateRequest creates the GetVPNProfilePackageURL request. +func (client *VirtualNetworkGatewaysClient) getVPNProfilePackageURLCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginGetVpnclientConnectionHealth - Get VPN client connection health detail per P2S client connection of the virtual network +// gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the +// VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth method. +func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getVpnclientConnectionHealth(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetVpnclientConnectionHealth - Get VPN client connection health detail per P2S client connection of the virtual network +// gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) getVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVpnclientConnectionHealthCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getVpnclientConnectionHealthCreateRequest creates the GetVpnclientConnectionHealth request. +func (client *VirtualNetworkGatewaysClient) getVpnclientConnectionHealthCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginGetVpnclientIPSecParameters - The Get VpnclientIpsecParameters operation retrieves information about the vpnclient +// ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource +// provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The virtual network gateway name. +// - options - VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the +// VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters method. +func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getVpnclientIPSecParameters(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetVpnclientIPSecParameters - The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec +// policy for P2S client of virtual network gateway in the specified resource group through Network resource +// provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) getVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVpnclientIPSecParametersCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getVpnclientIPSecParametersCreateRequest creates the GetVpnclientIPSecParameters request. +func (client *VirtualNetworkGatewaysClient) getVpnclientIPSecParametersCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListPager - Gets all virtual network gateways by resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListPager +// method. +func (client *VirtualNetworkGatewaysClient) NewListPager(resourceGroupName string, options *VirtualNetworkGatewaysClientListOptions) *runtime.Pager[VirtualNetworkGatewaysClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewaysClientListResponse]{ + More: func(page VirtualNetworkGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworkGatewaysClientListResponse) (VirtualNetworkGatewaysClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkGatewaysClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VirtualNetworkGatewaysClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualNetworkGatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualNetworkGatewaysClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualNetworkGatewaysClient) listHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientListResponse, error) { + result := VirtualNetworkGatewaysClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayListResult); err != nil { + return VirtualNetworkGatewaysClientListResponse{}, err + } + return result, nil +} + +// NewListConnectionsPager - Gets all the connections in a virtual network gateway. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListConnectionsPager +// method. +func (client *VirtualNetworkGatewaysClient) NewListConnectionsPager(resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientListConnectionsOptions) *runtime.Pager[VirtualNetworkGatewaysClientListConnectionsResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewaysClientListConnectionsResponse]{ + More: func(page VirtualNetworkGatewaysClientListConnectionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworkGatewaysClientListConnectionsResponse) (VirtualNetworkGatewaysClientListConnectionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkGatewaysClient.NewListConnectionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listConnectionsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + }, nil) + if err != nil { + return VirtualNetworkGatewaysClientListConnectionsResponse{}, err + } + return client.listConnectionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listConnectionsCreateRequest creates the ListConnections request. +func (client *VirtualNetworkGatewaysClient) listConnectionsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientListConnectionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listConnectionsHandleResponse handles the ListConnections response. +func (client *VirtualNetworkGatewaysClient) listConnectionsHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientListConnectionsResponse, error) { + result := VirtualNetworkGatewaysClientListConnectionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayListConnectionsResult); err != nil { + return VirtualNetworkGatewaysClientListConnectionsResponse{}, err + } + return result, nil +} + +// BeginReset - Resets the primary of the virtual network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginResetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginReset +// method. +func (client *VirtualNetworkGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetOptions) (*runtime.Poller[VirtualNetworkGatewaysClientResetResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reset(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientResetResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientResetResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Reset - Resets the primary of the virtual network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginReset" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resetCreateRequest creates the Reset request. +func (client *VirtualNetworkGatewaysClient) resetCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.GatewayVip != nil { + reqQP.Set("gatewayVip", *options.GatewayVip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginResetVPNClientSharedKey - Resets the VPN client shared key of the virtual network gateway in the specified resource +// group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey +// method. +func (client *VirtualNetworkGatewaysClient) BeginResetVPNClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions) (*runtime.Poller[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resetVPNClientSharedKey(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResetVPNClientSharedKey - Resets the VPN client shared key of the virtual network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) resetVPNClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetVPNClientSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resetVPNClientSharedKeyCreateRequest creates the ResetVPNClientSharedKey request. +func (client *VirtualNetworkGatewaysClient) resetVPNClientSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginSetVpnclientIPSecParameters - The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client +// of virtual network gateway in the specified resource group through Network resource provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - vpnclientIPSecParams - Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client +// operation through Network resource provider. +// - options - VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions contains the optional parameters for the +// VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters method. +func (client *VirtualNetworkGatewaysClient) BeginSetVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIPSecParams VPNClientIPsecParameters, options *VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions) (*runtime.Poller[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.setVpnclientIPSecParameters(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIPSecParams, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SetVpnclientIPSecParameters - The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client +// of virtual network gateway in the specified resource group through Network resource provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) setVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIPSecParams VPNClientIPsecParameters, options *VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.setVpnclientIPSecParametersCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIPSecParams, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// setVpnclientIPSecParametersCreateRequest creates the SetVpnclientIPSecParameters request. +func (client *VirtualNetworkGatewaysClient) setVpnclientIPSecParametersCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIPSecParams VPNClientIPsecParameters, options *VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vpnclientIPSecParams); err != nil { + return nil, err + } + return req, nil +} + +// BeginStartExpressRouteSiteFailoverSimulation - This operation starts failover simulation on the gateway for the specified +// peering location +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - peeringLocation - Peering location of the test +// - options - VirtualNetworkGatewaysClientBeginStartExpressRouteSiteFailoverSimulationOptions contains the optional parameters +// for the VirtualNetworkGatewaysClient.BeginStartExpressRouteSiteFailoverSimulation method. +func (client *VirtualNetworkGatewaysClient) BeginStartExpressRouteSiteFailoverSimulation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peeringLocation string, options *VirtualNetworkGatewaysClientBeginStartExpressRouteSiteFailoverSimulationOptions) (*runtime.Poller[VirtualNetworkGatewaysClientStartExpressRouteSiteFailoverSimulationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startExpressRouteSiteFailoverSimulation(ctx, resourceGroupName, virtualNetworkGatewayName, peeringLocation, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientStartExpressRouteSiteFailoverSimulationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientStartExpressRouteSiteFailoverSimulationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartExpressRouteSiteFailoverSimulation - This operation starts failover simulation on the gateway for the specified peering +// location +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) startExpressRouteSiteFailoverSimulation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peeringLocation string, options *VirtualNetworkGatewaysClientBeginStartExpressRouteSiteFailoverSimulationOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginStartExpressRouteSiteFailoverSimulation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startExpressRouteSiteFailoverSimulationCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, peeringLocation, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startExpressRouteSiteFailoverSimulationCreateRequest creates the StartExpressRouteSiteFailoverSimulation request. +func (client *VirtualNetworkGatewaysClient) startExpressRouteSiteFailoverSimulationCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peeringLocation string, options *VirtualNetworkGatewaysClientBeginStartExpressRouteSiteFailoverSimulationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startSiteFailoverTest" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + reqQP.Set("peeringLocation", peeringLocation) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStartPacketCapture - Starts packet capture on virtual network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStartPacketCapture +// method. +func (client *VirtualNetworkGatewaysClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewaysClientStartPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientStartPacketCaptureResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientStartPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartPacketCapture - Starts packet capture on virtual network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) startPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginStartPacketCapture" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startPacketCaptureCreateRequest creates the StartPacketCapture request. +func (client *VirtualNetworkGatewaysClient) startPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginStopExpressRouteSiteFailoverSimulation - This operation stops failover simulation on the gateway for the specified +// peering location +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - stopParameters - Virtual network gateway stop simulation parameters supplied to stop failover simulation on gateway. +// - options - VirtualNetworkGatewaysClientBeginStopExpressRouteSiteFailoverSimulationOptions contains the optional parameters +// for the VirtualNetworkGatewaysClient.BeginStopExpressRouteSiteFailoverSimulation method. +func (client *VirtualNetworkGatewaysClient) BeginStopExpressRouteSiteFailoverSimulation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, stopParameters ExpressRouteFailoverStopAPIParameters, options *VirtualNetworkGatewaysClientBeginStopExpressRouteSiteFailoverSimulationOptions) (*runtime.Poller[VirtualNetworkGatewaysClientStopExpressRouteSiteFailoverSimulationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopExpressRouteSiteFailoverSimulation(ctx, resourceGroupName, virtualNetworkGatewayName, stopParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientStopExpressRouteSiteFailoverSimulationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientStopExpressRouteSiteFailoverSimulationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StopExpressRouteSiteFailoverSimulation - This operation stops failover simulation on the gateway for the specified peering +// location +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) stopExpressRouteSiteFailoverSimulation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, stopParameters ExpressRouteFailoverStopAPIParameters, options *VirtualNetworkGatewaysClientBeginStopExpressRouteSiteFailoverSimulationOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginStopExpressRouteSiteFailoverSimulation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopExpressRouteSiteFailoverSimulationCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, stopParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopExpressRouteSiteFailoverSimulationCreateRequest creates the StopExpressRouteSiteFailoverSimulation request. +func (client *VirtualNetworkGatewaysClient) stopExpressRouteSiteFailoverSimulationCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, stopParameters ExpressRouteFailoverStopAPIParameters, options *VirtualNetworkGatewaysClientBeginStopExpressRouteSiteFailoverSimulationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopSiteFailoverTest" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, stopParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginStopPacketCapture - Stops packet capture on virtual network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - parameters - Virtual network gateway packet capture parameters supplied to stop packet capture on gateway. +// - options - VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStopPacketCapture +// method. +func (client *VirtualNetworkGatewaysClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewaysClientStopPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientStopPacketCaptureResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientStopPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StopPacketCapture - Stops packet capture on virtual network gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) stopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginStopPacketCapture" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopPacketCaptureCreateRequest creates the StopPacketCapture request. +func (client *VirtualNetworkGatewaysClient) stopPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// SupportedVPNDevices - Gets a xml format representation for supported vpn devices. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientSupportedVPNDevicesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.SupportedVPNDevices +// method. +func (client *VirtualNetworkGatewaysClient) SupportedVPNDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientSupportedVPNDevicesOptions) (VirtualNetworkGatewaysClientSupportedVPNDevicesResponse, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.SupportedVPNDevices" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.supportedVPNDevicesCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{}, err + } + resp, err := client.supportedVPNDevicesHandleResponse(httpResp) + return resp, err +} + +// supportedVPNDevicesCreateRequest creates the SupportedVPNDevices request. +func (client *VirtualNetworkGatewaysClient) supportedVPNDevicesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientSupportedVPNDevicesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// supportedVPNDevicesHandleResponse handles the SupportedVPNDevices response. +func (client *VirtualNetworkGatewaysClient) supportedVPNDevicesHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientSupportedVPNDevicesResponse, error) { + result := VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { + return VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{}, err + } + return result, nil +} + +// BeginUpdateTags - Updates a virtual network gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - parameters - Parameters supplied to update virtual network gateway tags. +// - options - VirtualNetworkGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginUpdateTags +// method. +func (client *VirtualNetworkGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject, options *VirtualNetworkGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[VirtualNetworkGatewaysClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkGatewaysClientUpdateTagsResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkGatewaysClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateTags - Updates a virtual network gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject, options *VirtualNetworkGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.BeginUpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *VirtualNetworkGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject, options *VirtualNetworkGatewaysClientBeginUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayName == "" { + return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// VPNDeviceConfigurationScript - Gets a xml format representation for vpn device configuration script. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection for which the configuration script +// is generated. +// - parameters - Parameters supplied to the generate vpn device script operation. +// - options - VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions contains the optional parameters for the VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript +// method. +func (client *VirtualNetworkGatewaysClient) VPNDeviceConfigurationScript(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNDeviceScriptParameters, options *VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions) (VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse, error) { + var err error + const operationName = "VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.vpnDeviceConfigurationScriptCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{}, err + } + resp, err := client.vpnDeviceConfigurationScriptHandleResponse(httpResp) + return resp, err +} + +// vpnDeviceConfigurationScriptCreateRequest creates the VPNDeviceConfigurationScript request. +func (client *VirtualNetworkGatewaysClient) vpnDeviceConfigurationScriptCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNDeviceScriptParameters, options *VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkGatewayConnectionName == "" { + return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// vpnDeviceConfigurationScriptHandleResponse handles the VPNDeviceConfigurationScript response. +func (client *VirtualNetworkGatewaysClient) vpnDeviceConfigurationScriptHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse, error) { + result := VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { + return VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkpeerings_client.go new file mode 100644 index 00000000..0e4b2016 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworkpeerings_client.go @@ -0,0 +1,351 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualNetworkPeeringsClient contains the methods for the VirtualNetworkPeerings group. +// Don't use this type directly, use NewVirtualNetworkPeeringsClient() instead. +type VirtualNetworkPeeringsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualNetworkPeeringsClient creates a new instance of VirtualNetworkPeeringsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualNetworkPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkPeeringsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualNetworkPeeringsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a peering in the specified virtual network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - virtualNetworkPeeringName - The name of the peering. +// - virtualNetworkPeeringParameters - Parameters supplied to the create or update virtual network peering operation. +// - options - VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginCreateOrUpdate +// method. +func (client *VirtualNetworkPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkPeeringsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkPeeringsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkPeeringsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a peering in the specified virtual network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkPeeringsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualNetworkPeeringsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if virtualNetworkPeeringName == "" { + return nil, errors.New("parameter virtualNetworkPeeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkPeeringName}", url.PathEscape(virtualNetworkPeeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.SyncRemoteAddressSpace != nil { + reqQP.Set("syncRemoteAddressSpace", string(*options.SyncRemoteAddressSpace)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, virtualNetworkPeeringParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified virtual network peering. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - virtualNetworkPeeringName - The name of the virtual network peering. +// - options - VirtualNetworkPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginDelete +// method. +func (client *VirtualNetworkPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkPeeringsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkPeeringsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkPeeringsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified virtual network peering. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkPeeringsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualNetworkPeeringsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if virtualNetworkPeeringName == "" { + return nil, errors.New("parameter virtualNetworkPeeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkPeeringName}", url.PathEscape(virtualNetworkPeeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified virtual network peering. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - virtualNetworkPeeringName - The name of the virtual network peering. +// - options - VirtualNetworkPeeringsClientGetOptions contains the optional parameters for the VirtualNetworkPeeringsClient.Get +// method. +func (client *VirtualNetworkPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientGetOptions) (VirtualNetworkPeeringsClientGetResponse, error) { + var err error + const operationName = "VirtualNetworkPeeringsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) + if err != nil { + return VirtualNetworkPeeringsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworkPeeringsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworkPeeringsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualNetworkPeeringsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if virtualNetworkPeeringName == "" { + return nil, errors.New("parameter virtualNetworkPeeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkPeeringName}", url.PathEscape(virtualNetworkPeeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualNetworkPeeringsClient) getHandleResponse(resp *http.Response) (VirtualNetworkPeeringsClientGetResponse, error) { + result := VirtualNetworkPeeringsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkPeering); err != nil { + return VirtualNetworkPeeringsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all virtual network peerings in a virtual network. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.NewListPager +// method. +func (client *VirtualNetworkPeeringsClient) NewListPager(resourceGroupName string, virtualNetworkName string, options *VirtualNetworkPeeringsClientListOptions) *runtime.Pager[VirtualNetworkPeeringsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworkPeeringsClientListResponse]{ + More: func(page VirtualNetworkPeeringsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworkPeeringsClientListResponse) (VirtualNetworkPeeringsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkPeeringsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + }, nil) + if err != nil { + return VirtualNetworkPeeringsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualNetworkPeeringsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworkPeeringsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualNetworkPeeringsClient) listHandleResponse(resp *http.Response) (VirtualNetworkPeeringsClientListResponse, error) { + result := VirtualNetworkPeeringsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkPeeringListResult); err != nil { + return VirtualNetworkPeeringsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworks_client.go new file mode 100644 index 00000000..57152d4a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworks_client.go @@ -0,0 +1,695 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// VirtualNetworksClient contains the methods for the VirtualNetworks group. +// Don't use this type directly, use NewVirtualNetworksClient() instead. +type VirtualNetworksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualNetworksClient creates a new instance of VirtualNetworksClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualNetworksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckIPAddressAvailability - Checks whether a private IP address is available for use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - ipAddress - The private IP address to be verified. +// - options - VirtualNetworksClientCheckIPAddressAvailabilityOptions contains the optional parameters for the VirtualNetworksClient.CheckIPAddressAvailability +// method. +func (client *VirtualNetworksClient) CheckIPAddressAvailability(ctx context.Context, resourceGroupName string, virtualNetworkName string, ipAddress string, options *VirtualNetworksClientCheckIPAddressAvailabilityOptions) (VirtualNetworksClientCheckIPAddressAvailabilityResponse, error) { + var err error + const operationName = "VirtualNetworksClient.CheckIPAddressAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkIPAddressAvailabilityCreateRequest(ctx, resourceGroupName, virtualNetworkName, ipAddress, options) + if err != nil { + return VirtualNetworksClientCheckIPAddressAvailabilityResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworksClientCheckIPAddressAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworksClientCheckIPAddressAvailabilityResponse{}, err + } + resp, err := client.checkIPAddressAvailabilityHandleResponse(httpResp) + return resp, err +} + +// checkIPAddressAvailabilityCreateRequest creates the CheckIPAddressAvailability request. +func (client *VirtualNetworksClient) checkIPAddressAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, ipAddress string, options *VirtualNetworksClientCheckIPAddressAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + reqQP.Set("ipAddress", ipAddress) + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// checkIPAddressAvailabilityHandleResponse handles the CheckIPAddressAvailability response. +func (client *VirtualNetworksClient) checkIPAddressAvailabilityHandleResponse(resp *http.Response) (VirtualNetworksClientCheckIPAddressAvailabilityResponse, error) { + result := VirtualNetworksClientCheckIPAddressAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.IPAddressAvailabilityResult); err != nil { + return VirtualNetworksClientCheckIPAddressAvailabilityResponse{}, err + } + return result, nil +} + +// BeginCreateOrUpdate - Creates or updates a virtual network in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - parameters - Parameters supplied to the create or update virtual network operation. +// - options - VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate +// method. +func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworksClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworksClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworksClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a virtual network in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworksClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualNetworksClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified virtual network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete +// method. +func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworksClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworksClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworksClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified virtual network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworksClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualNetworksClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified virtual network by resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. +func (client *VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientGetOptions) (VirtualNetworksClientGetResponse, error) { + var err error + const operationName = "VirtualNetworksClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + if err != nil { + return VirtualNetworksClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworksClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworksClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualNetworksClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualNetworksClient) getHandleResponse(resp *http.Response) (VirtualNetworksClientGetResponse, error) { + result := VirtualNetworksClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetwork); err != nil { + return VirtualNetworksClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all virtual networks in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager +// method. +func (client *VirtualNetworksClient) NewListPager(resourceGroupName string, options *VirtualNetworksClientListOptions) *runtime.Pager[VirtualNetworksClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListResponse]{ + More: func(page VirtualNetworksClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworksClientListResponse) (VirtualNetworksClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworksClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VirtualNetworksClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualNetworksClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualNetworksClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualNetworksClient) listHandleResponse(resp *http.Response) (VirtualNetworksClientListResponse, error) { + result := VirtualNetworksClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkListResult); err != nil { + return VirtualNetworksClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all virtual networks in a subscription. +// +// Generated from API version 2024-05-01 +// - options - VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.NewListAllPager +// method. +func (client *VirtualNetworksClient) NewListAllPager(options *VirtualNetworksClientListAllOptions) *runtime.Pager[VirtualNetworksClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListAllResponse]{ + More: func(page VirtualNetworksClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworksClientListAllResponse) (VirtualNetworksClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworksClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return VirtualNetworksClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *VirtualNetworksClient) listAllCreateRequest(ctx context.Context, options *VirtualNetworksClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *VirtualNetworksClient) listAllHandleResponse(resp *http.Response) (VirtualNetworksClientListAllResponse, error) { + result := VirtualNetworksClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkListResult); err != nil { + return VirtualNetworksClientListAllResponse{}, err + } + return result, nil +} + +// BeginListDdosProtectionStatus - Gets the Ddos Protection Status of all IP Addresses under the Virtual Network +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - VirtualNetworksClientBeginListDdosProtectionStatusOptions contains the optional parameters for the VirtualNetworksClient.BeginListDdosProtectionStatus +// method. +func (client *VirtualNetworksClient) BeginListDdosProtectionStatus(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginListDdosProtectionStatusOptions) (*runtime.Poller[*runtime.Pager[VirtualNetworksClientListDdosProtectionStatusResponse]], error) { + pager := runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListDdosProtectionStatusResponse]{ + More: func(page VirtualNetworksClientListDdosProtectionStatusResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworksClientListDdosProtectionStatusResponse) (VirtualNetworksClientListDdosProtectionStatusResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworksClient.BeginListDdosProtectionStatus") + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDdosProtectionStatusCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + }, nil) + if err != nil { + return VirtualNetworksClientListDdosProtectionStatusResponse{}, err + } + return client.listDdosProtectionStatusHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) + if options == nil || options.ResumeToken == "" { + resp, err := client.listDdosProtectionStatus(ctx, resourceGroupName, virtualNetworkName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[VirtualNetworksClientListDdosProtectionStatusResponse]]{ + FinalStateVia: runtime.FinalStateViaLocation, + Response: &pager, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[VirtualNetworksClientListDdosProtectionStatusResponse]]{ + Response: &pager, + Tracer: client.internal.Tracer(), + }) + } +} + +// ListDdosProtectionStatus - Gets the Ddos Protection Status of all IP Addresses under the Virtual Network +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworksClient) listDdosProtectionStatus(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginListDdosProtectionStatusOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworksClient.BeginListDdosProtectionStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listDdosProtectionStatusCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listDdosProtectionStatusCreateRequest creates the ListDdosProtectionStatus request. +func (client *VirtualNetworksClient) listDdosProtectionStatusCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginListDdosProtectionStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/ddosProtectionStatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + if options != nil && options.Top != nil { + reqQP.Set("top", strconv.FormatInt(int64(*options.Top), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listDdosProtectionStatusHandleResponse handles the ListDdosProtectionStatus response. +func (client *VirtualNetworksClient) listDdosProtectionStatusHandleResponse(resp *http.Response) (VirtualNetworksClientListDdosProtectionStatusResponse, error) { + result := VirtualNetworksClientListDdosProtectionStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkDdosProtectionStatusResult); err != nil { + return VirtualNetworksClientListDdosProtectionStatusResponse{}, err + } + return result, nil +} + +// NewListUsagePager - Lists usage stats. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.NewListUsagePager +// method. +func (client *VirtualNetworksClient) NewListUsagePager(resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientListUsageOptions) *runtime.Pager[VirtualNetworksClientListUsageResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListUsageResponse]{ + More: func(page VirtualNetworksClientListUsageResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworksClientListUsageResponse) (VirtualNetworksClientListUsageResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworksClient.NewListUsagePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listUsageCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + }, nil) + if err != nil { + return VirtualNetworksClientListUsageResponse{}, err + } + return client.listUsageHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listUsageCreateRequest creates the ListUsage request. +func (client *VirtualNetworksClient) listUsageCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientListUsageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listUsageHandleResponse handles the ListUsage response. +func (client *VirtualNetworksClient) listUsageHandleResponse(resp *http.Response) (VirtualNetworksClientListUsageResponse, error) { + result := VirtualNetworksClientListUsageResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkListUsageResult); err != nil { + return VirtualNetworksClientListUsageResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates a virtual network tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - parameters - Parameters supplied to update virtual network tags. +// - options - VirtualNetworksClientUpdateTagsOptions contains the optional parameters for the VirtualNetworksClient.UpdateTags +// method. +func (client *VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject, options *VirtualNetworksClientUpdateTagsOptions) (VirtualNetworksClientUpdateTagsResponse, error) { + var err error + const operationName = "VirtualNetworksClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) + if err != nil { + return VirtualNetworksClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworksClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworksClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *VirtualNetworksClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject, options *VirtualNetworksClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualNetworkName == "" { + return nil, errors.New("parameter virtualNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *VirtualNetworksClient) updateTagsHandleResponse(resp *http.Response) (VirtualNetworksClientUpdateTagsResponse, error) { + result := VirtualNetworksClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetwork); err != nil { + return VirtualNetworksClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworktaps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworktaps_client.go new file mode 100644 index 00000000..744f363a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualnetworktaps_client.go @@ -0,0 +1,451 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualNetworkTapsClient contains the methods for the VirtualNetworkTaps group. +// Don't use this type directly, use NewVirtualNetworkTapsClient() instead. +type VirtualNetworkTapsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualNetworkTapsClient creates a new instance of VirtualNetworkTapsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualNetworkTapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkTapsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualNetworkTapsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a Virtual Network Tap. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - tapName - The name of the virtual network tap. +// - parameters - Parameters supplied to the create or update virtual network tap operation. +// - options - VirtualNetworkTapsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginCreateOrUpdate +// method. +func (client *VirtualNetworkTapsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap, options *VirtualNetworkTapsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkTapsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, tapName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkTapsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkTapsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates a Virtual Network Tap. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkTapsClient) createOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap, options *VirtualNetworkTapsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkTapsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, tapName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualNetworkTapsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap, options *VirtualNetworkTapsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if tapName == "" { + return nil, errors.New("parameter tapName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tapName}", url.PathEscape(tapName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified virtual network tap. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - tapName - The name of the virtual network tap. +// - options - VirtualNetworkTapsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginDelete +// method. +func (client *VirtualNetworkTapsClient) BeginDelete(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkTapsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, tapName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualNetworkTapsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualNetworkTapsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified virtual network tap. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualNetworkTapsClient) deleteOperation(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualNetworkTapsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, tapName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualNetworkTapsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if tapName == "" { + return nil, errors.New("parameter tapName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tapName}", url.PathEscape(tapName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets information about the specified virtual network tap. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - tapName - The name of virtual network tap. +// - options - VirtualNetworkTapsClientGetOptions contains the optional parameters for the VirtualNetworkTapsClient.Get method. +func (client *VirtualNetworkTapsClient) Get(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientGetOptions) (VirtualNetworkTapsClientGetResponse, error) { + var err error + const operationName = "VirtualNetworkTapsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, tapName, options) + if err != nil { + return VirtualNetworkTapsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworkTapsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworkTapsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualNetworkTapsClient) getCreateRequest(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if tapName == "" { + return nil, errors.New("parameter tapName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tapName}", url.PathEscape(tapName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualNetworkTapsClient) getHandleResponse(resp *http.Response) (VirtualNetworkTapsClientGetResponse, error) { + result := VirtualNetworkTapsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTap); err != nil { + return VirtualNetworkTapsClientGetResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the VirtualNetworkTaps in a subscription. +// +// Generated from API version 2024-05-01 +// - options - VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListAllPager +// method. +func (client *VirtualNetworkTapsClient) NewListAllPager(options *VirtualNetworkTapsClientListAllOptions) *runtime.Pager[VirtualNetworkTapsClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworkTapsClientListAllResponse]{ + More: func(page VirtualNetworkTapsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworkTapsClientListAllResponse) (VirtualNetworkTapsClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkTapsClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return VirtualNetworkTapsClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *VirtualNetworkTapsClient) listAllCreateRequest(ctx context.Context, options *VirtualNetworkTapsClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *VirtualNetworkTapsClient) listAllHandleResponse(resp *http.Response) (VirtualNetworkTapsClientListAllResponse, error) { + result := VirtualNetworkTapsClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTapListResult); err != nil { + return VirtualNetworkTapsClientListAllResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Gets all the VirtualNetworkTaps in a subscription. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListByResourceGroupPager +// method. +func (client *VirtualNetworkTapsClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualNetworkTapsClientListByResourceGroupOptions) *runtime.Pager[VirtualNetworkTapsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualNetworkTapsClientListByResourceGroupResponse]{ + More: func(page VirtualNetworkTapsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualNetworkTapsClientListByResourceGroupResponse) (VirtualNetworkTapsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualNetworkTapsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VirtualNetworkTapsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *VirtualNetworkTapsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualNetworkTapsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *VirtualNetworkTapsClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualNetworkTapsClientListByResourceGroupResponse, error) { + result := VirtualNetworkTapsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTapListResult); err != nil { + return VirtualNetworkTapsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates an VirtualNetworkTap tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - tapName - The name of the tap. +// - tapParameters - Parameters supplied to update VirtualNetworkTap tags. +// - options - VirtualNetworkTapsClientUpdateTagsOptions contains the optional parameters for the VirtualNetworkTapsClient.UpdateTags +// method. +func (client *VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject, options *VirtualNetworkTapsClientUpdateTagsOptions) (VirtualNetworkTapsClientUpdateTagsResponse, error) { + var err error + const operationName = "VirtualNetworkTapsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, tapName, tapParameters, options) + if err != nil { + return VirtualNetworkTapsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualNetworkTapsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualNetworkTapsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *VirtualNetworkTapsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject, options *VirtualNetworkTapsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if tapName == "" { + return nil, errors.New("parameter tapName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{tapName}", url.PathEscape(tapName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, tapParameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *VirtualNetworkTapsClient) updateTagsHandleResponse(resp *http.Response) (VirtualNetworkTapsClientUpdateTagsResponse, error) { + result := VirtualNetworkTapsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTap); err != nil { + return VirtualNetworkTapsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualrouterpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualrouterpeerings_client.go new file mode 100644 index 00000000..70a28996 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualrouterpeerings_client.go @@ -0,0 +1,348 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualRouterPeeringsClient contains the methods for the VirtualRouterPeerings group. +// Don't use this type directly, use NewVirtualRouterPeeringsClient() instead. +type VirtualRouterPeeringsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualRouterPeeringsClient creates a new instance of VirtualRouterPeeringsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualRouterPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualRouterPeeringsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualRouterPeeringsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified Virtual Router Peering. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - peeringName - The name of the Virtual Router Peering. +// - parameters - Parameters supplied to the create or update Virtual Router Peering operation. +// - options - VirtualRouterPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginCreateOrUpdate +// method. +func (client *VirtualRouterPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering, options *VirtualRouterPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualRouterPeeringsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualRouterName, peeringName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualRouterPeeringsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualRouterPeeringsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified Virtual Router Peering. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualRouterPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering, options *VirtualRouterPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualRouterPeeringsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualRouterName, peeringName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualRouterPeeringsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering, options *VirtualRouterPeeringsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualRouterName == "" { + return nil, errors.New("parameter virtualRouterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified peering from a Virtual Router. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - peeringName - The name of the peering. +// - options - VirtualRouterPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginDelete +// method. +func (client *VirtualRouterPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientBeginDeleteOptions) (*runtime.Poller[VirtualRouterPeeringsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualRouterName, peeringName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualRouterPeeringsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualRouterPeeringsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified peering from a Virtual Router. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualRouterPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualRouterPeeringsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualRouterName, peeringName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualRouterPeeringsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualRouterName == "" { + return nil, errors.New("parameter virtualRouterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Virtual Router Peering. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - peeringName - The name of the Virtual Router Peering. +// - options - VirtualRouterPeeringsClientGetOptions contains the optional parameters for the VirtualRouterPeeringsClient.Get +// method. +func (client *VirtualRouterPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientGetOptions) (VirtualRouterPeeringsClientGetResponse, error) { + var err error + const operationName = "VirtualRouterPeeringsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualRouterName, peeringName, options) + if err != nil { + return VirtualRouterPeeringsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualRouterPeeringsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualRouterPeeringsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualRouterPeeringsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualRouterName == "" { + return nil, errors.New("parameter virtualRouterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) + if peeringName == "" { + return nil, errors.New("parameter peeringName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualRouterPeeringsClient) getHandleResponse(resp *http.Response) (VirtualRouterPeeringsClientGetResponse, error) { + result := VirtualRouterPeeringsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterPeering); err != nil { + return VirtualRouterPeeringsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all Virtual Router Peerings in a Virtual Router resource. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - options - VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.NewListPager +// method. +func (client *VirtualRouterPeeringsClient) NewListPager(resourceGroupName string, virtualRouterName string, options *VirtualRouterPeeringsClientListOptions) *runtime.Pager[VirtualRouterPeeringsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualRouterPeeringsClientListResponse]{ + More: func(page VirtualRouterPeeringsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualRouterPeeringsClientListResponse) (VirtualRouterPeeringsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualRouterPeeringsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, virtualRouterName, options) + }, nil) + if err != nil { + return VirtualRouterPeeringsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualRouterPeeringsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRouterPeeringsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualRouterName == "" { + return nil, errors.New("parameter virtualRouterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualRouterPeeringsClient) listHandleResponse(resp *http.Response) (VirtualRouterPeeringsClientListResponse, error) { + result := VirtualRouterPeeringsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterPeeringListResult); err != nil { + return VirtualRouterPeeringsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualrouters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualrouters_client.go new file mode 100644 index 00000000..2535e97a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualrouters_client.go @@ -0,0 +1,384 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualRoutersClient contains the methods for the VirtualRouters group. +// Don't use this type directly, use NewVirtualRoutersClient() instead. +type VirtualRoutersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualRoutersClient creates a new instance of VirtualRoutersClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualRoutersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualRoutersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualRoutersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates the specified Virtual Router. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - parameters - Parameters supplied to the create or update Virtual Router. +// - options - VirtualRoutersClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRoutersClient.BeginCreateOrUpdate +// method. +func (client *VirtualRoutersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter, options *VirtualRoutersClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualRoutersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualRouterName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualRoutersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualRoutersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates or updates the specified Virtual Router. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualRoutersClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter, options *VirtualRoutersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualRoutersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualRouterName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualRoutersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter, options *VirtualRoutersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualRouterName == "" { + return nil, errors.New("parameter virtualRouterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes the specified Virtual Router. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - options - VirtualRoutersClientBeginDeleteOptions contains the optional parameters for the VirtualRoutersClient.BeginDelete +// method. +func (client *VirtualRoutersClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientBeginDeleteOptions) (*runtime.Poller[VirtualRoutersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualRouterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualRoutersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualRoutersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified Virtual Router. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualRoutersClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualRoutersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualRouterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualRoutersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualRouterName == "" { + return nil, errors.New("parameter virtualRouterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified Virtual Router. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - options - VirtualRoutersClientGetOptions contains the optional parameters for the VirtualRoutersClient.Get method. +func (client *VirtualRoutersClient) Get(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientGetOptions) (VirtualRoutersClientGetResponse, error) { + var err error + const operationName = "VirtualRoutersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualRouterName, options) + if err != nil { + return VirtualRoutersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualRoutersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualRoutersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualRoutersClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualRouterName == "" { + return nil, errors.New("parameter virtualRouterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualRoutersClient) getHandleResponse(resp *http.Response) (VirtualRoutersClientGetResponse, error) { + result := VirtualRoutersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouter); err != nil { + return VirtualRoutersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets all the Virtual Routers in a subscription. +// +// Generated from API version 2024-05-01 +// - options - VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.NewListPager method. +func (client *VirtualRoutersClient) NewListPager(options *VirtualRoutersClientListOptions) *runtime.Pager[VirtualRoutersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualRoutersClientListResponse]{ + More: func(page VirtualRoutersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualRoutersClientListResponse) (VirtualRoutersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualRoutersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return VirtualRoutersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualRoutersClient) listCreateRequest(ctx context.Context, options *VirtualRoutersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualRoutersClient) listHandleResponse(resp *http.Response) (VirtualRoutersClientListResponse, error) { + result := VirtualRoutersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterListResult); err != nil { + return VirtualRoutersClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all Virtual Routers in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.NewListByResourceGroupPager +// method. +func (client *VirtualRoutersClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualRoutersClientListByResourceGroupOptions) *runtime.Pager[VirtualRoutersClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualRoutersClientListByResourceGroupResponse]{ + More: func(page VirtualRoutersClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualRoutersClientListByResourceGroupResponse) (VirtualRoutersClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualRoutersClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VirtualRoutersClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *VirtualRoutersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualRoutersClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *VirtualRoutersClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualRoutersClientListByResourceGroupResponse, error) { + result := VirtualRoutersClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterListResult); err != nil { + return VirtualRoutersClientListByResourceGroupResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualwans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualwans_client.go new file mode 100644 index 00000000..29ea1f77 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/virtualwans_client.go @@ -0,0 +1,448 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VirtualWansClient contains the methods for the VirtualWans group. +// Don't use this type directly, use NewVirtualWansClient() instead. +type VirtualWansClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVirtualWansClient creates a new instance of VirtualWansClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVirtualWansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualWansClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VirtualWansClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualWan. +// - virtualWANName - The name of the VirtualWAN being created or updated. +// - wanParameters - Parameters supplied to create or update VirtualWAN. +// - options - VirtualWansClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualWansClient.BeginCreateOrUpdate +// method. +func (client *VirtualWansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters VirtualWAN, options *VirtualWansClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualWansClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualWANName, wanParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualWansClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualWansClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualWansClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters VirtualWAN, options *VirtualWansClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VirtualWansClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualWANName, wanParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VirtualWansClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters VirtualWAN, options *VirtualWansClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualWANName == "" { + return nil, errors.New("parameter virtualWANName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{VirtualWANName}", url.PathEscape(virtualWANName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, wanParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a VirtualWAN. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualWan. +// - virtualWANName - The name of the VirtualWAN being deleted. +// - options - VirtualWansClientBeginDeleteOptions contains the optional parameters for the VirtualWansClient.BeginDelete method. +func (client *VirtualWansClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientBeginDeleteOptions) (*runtime.Poller[VirtualWansClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualWANName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualWansClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualWansClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a VirtualWAN. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VirtualWansClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VirtualWansClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualWANName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VirtualWansClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualWANName == "" { + return nil, errors.New("parameter virtualWANName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{VirtualWANName}", url.PathEscape(virtualWANName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a VirtualWAN. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualWan. +// - virtualWANName - The name of the VirtualWAN being retrieved. +// - options - VirtualWansClientGetOptions contains the optional parameters for the VirtualWansClient.Get method. +func (client *VirtualWansClient) Get(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientGetOptions) (VirtualWansClientGetResponse, error) { + var err error + const operationName = "VirtualWansClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualWANName, options) + if err != nil { + return VirtualWansClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualWansClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualWansClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VirtualWansClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualWANName == "" { + return nil, errors.New("parameter virtualWANName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{VirtualWANName}", url.PathEscape(virtualWANName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VirtualWansClient) getHandleResponse(resp *http.Response) (VirtualWansClientGetResponse, error) { + result := VirtualWansClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualWAN); err != nil { + return VirtualWansClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the VirtualWANs in a subscription. +// +// Generated from API version 2024-05-01 +// - options - VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.NewListPager method. +func (client *VirtualWansClient) NewListPager(options *VirtualWansClientListOptions) *runtime.Pager[VirtualWansClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualWansClientListResponse]{ + More: func(page VirtualWansClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualWansClientListResponse) (VirtualWansClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualWansClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return VirtualWansClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VirtualWansClient) listCreateRequest(ctx context.Context, options *VirtualWansClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VirtualWansClient) listHandleResponse(resp *http.Response) (VirtualWansClientListResponse, error) { + result := VirtualWansClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualWANsResult); err != nil { + return VirtualWansClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all the VirtualWANs in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualWan. +// - options - VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.NewListByResourceGroupPager +// method. +func (client *VirtualWansClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualWansClientListByResourceGroupOptions) *runtime.Pager[VirtualWansClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[VirtualWansClientListByResourceGroupResponse]{ + More: func(page VirtualWansClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VirtualWansClientListByResourceGroupResponse) (VirtualWansClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualWansClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VirtualWansClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *VirtualWansClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualWansClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *VirtualWansClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualWansClientListByResourceGroupResponse, error) { + result := VirtualWansClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualWANsResult); err != nil { + return VirtualWansClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates a VirtualWAN tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VirtualWan. +// - virtualWANName - The name of the VirtualWAN being updated. +// - wanParameters - Parameters supplied to Update VirtualWAN tags. +// - options - VirtualWansClientUpdateTagsOptions contains the optional parameters for the VirtualWansClient.UpdateTags method. +func (client *VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters TagsObject, options *VirtualWansClientUpdateTagsOptions) (VirtualWansClientUpdateTagsResponse, error) { + var err error + const operationName = "VirtualWansClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualWANName, wanParameters, options) + if err != nil { + return VirtualWansClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VirtualWansClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VirtualWansClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *VirtualWansClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters TagsObject, options *VirtualWansClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualWANName == "" { + return nil, errors.New("parameter virtualWANName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{VirtualWANName}", url.PathEscape(virtualWANName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, wanParameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *VirtualWansClient) updateTagsHandleResponse(resp *http.Response) (VirtualWansClientUpdateTagsResponse, error) { + result := VirtualWansClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VirtualWAN); err != nil { + return VirtualWansClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnconnections_client.go new file mode 100644 index 00000000..dd743c92 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnconnections_client.go @@ -0,0 +1,524 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VPNConnectionsClient contains the methods for the VPNConnections group. +// Don't use this type directly, use NewVPNConnectionsClient() instead. +type VPNConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVPNConnectionsClient creates a new instance of VPNConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVPNConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VPNConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing +// connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the connection. +// - vpnConnectionParameters - Parameters supplied to create or Update a VPN Connection. +// - options - VPNConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNConnectionsClient.BeginCreateOrUpdate +// method. +func (client *VPNConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VPNConnection, options *VPNConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNConnectionsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VPNConnection, options *VPNConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VPNConnectionsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VPNConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VPNConnection, options *VPNConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vpnConnectionParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a vpn connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the connection. +// - options - VPNConnectionsClientBeginDeleteOptions contains the optional parameters for the VPNConnectionsClient.BeginDelete +// method. +func (client *VPNConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientBeginDeleteOptions) (*runtime.Poller[VPNConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, connectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNConnectionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNConnectionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a vpn connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VPNConnectionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VPNConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a vpn connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - options - VPNConnectionsClientGetOptions contains the optional parameters for the VPNConnectionsClient.Get method. +func (client *VPNConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientGetOptions) (VPNConnectionsClientGetResponse, error) { + var err error + const operationName = "VPNConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) + if err != nil { + return VPNConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VPNConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VPNConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VPNConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VPNConnectionsClient) getHandleResponse(resp *http.Response) (VPNConnectionsClientGetResponse, error) { + result := VPNConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VPNConnection); err != nil { + return VPNConnectionsClientGetResponse{}, err + } + return result, nil +} + +// NewListByVPNGatewayPager - Retrieves all vpn connections for a particular virtual wan vpn gateway. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.NewListByVPNGatewayPager +// method. +func (client *VPNConnectionsClient) NewListByVPNGatewayPager(resourceGroupName string, gatewayName string, options *VPNConnectionsClientListByVPNGatewayOptions) *runtime.Pager[VPNConnectionsClientListByVPNGatewayResponse] { + return runtime.NewPager(runtime.PagingHandler[VPNConnectionsClientListByVPNGatewayResponse]{ + More: func(page VPNConnectionsClientListByVPNGatewayResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VPNConnectionsClientListByVPNGatewayResponse) (VPNConnectionsClientListByVPNGatewayResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNConnectionsClient.NewListByVPNGatewayPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) + }, nil) + if err != nil { + return VPNConnectionsClientListByVPNGatewayResponse{}, err + } + return client.listByVPNGatewayHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByVPNGatewayCreateRequest creates the ListByVPNGateway request. +func (client *VPNConnectionsClient) listByVPNGatewayCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNConnectionsClientListByVPNGatewayOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByVPNGatewayHandleResponse handles the ListByVPNGateway response. +func (client *VPNConnectionsClient) listByVPNGatewayHandleResponse(resp *http.Response) (VPNConnectionsClientListByVPNGatewayResponse, error) { + result := VPNConnectionsClientListByVPNGatewayResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNConnectionsResult); err != nil { + return VPNConnectionsClientListByVPNGatewayResponse{}, err + } + return result, nil +} + +// BeginStartPacketCapture - Starts packet capture on Vpn connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - vpnConnectionName - The name of the vpn connection. +// - options - VPNConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStartPacketCapture +// method. +func (client *VPNConnectionsClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStartPacketCaptureOptions) (*runtime.Poller[VPNConnectionsClientStartPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startPacketCapture(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNConnectionsClientStartPacketCaptureResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNConnectionsClientStartPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartPacketCapture - Starts packet capture on Vpn connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNConnectionsClient) startPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStartPacketCaptureOptions) (*http.Response, error) { + var err error + const operationName = "VPNConnectionsClient.BeginStartPacketCapture" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startPacketCaptureCreateRequest creates the StartPacketCapture request. +func (client *VPNConnectionsClient) startPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStartPacketCaptureOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if vpnConnectionName == "" { + return nil, errors.New("parameter vpnConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnConnectionName}", url.PathEscape(vpnConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginStopPacketCapture - Stops packet capture on Vpn connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - vpnConnectionName - The name of the vpn connection. +// - options - VPNConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStopPacketCapture +// method. +func (client *VPNConnectionsClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStopPacketCaptureOptions) (*runtime.Poller[VPNConnectionsClientStopPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopPacketCapture(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNConnectionsClientStopPacketCaptureResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNConnectionsClientStopPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StopPacketCapture - Stops packet capture on Vpn connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNConnectionsClient) stopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStopPacketCaptureOptions) (*http.Response, error) { + var err error + const operationName = "VPNConnectionsClient.BeginStopPacketCapture" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopPacketCaptureCreateRequest creates the StopPacketCapture request. +func (client *VPNConnectionsClient) stopPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStopPacketCaptureOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if vpnConnectionName == "" { + return nil, errors.New("parameter vpnConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnConnectionName}", url.PathEscape(vpnConnectionName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpngateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpngateways_client.go new file mode 100644 index 00000000..85462547 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpngateways_client.go @@ -0,0 +1,706 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VPNGatewaysClient contains the methods for the VPNGateways group. +// Don't use this type directly, use NewVPNGatewaysClient() instead. +type VPNGatewaysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVPNGatewaysClient creates a new instance of VPNGatewaysClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNGatewaysClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VPNGatewaysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - vpnGatewayParameters - Parameters supplied to create or Update a virtual wan vpn gateway. +// - options - VPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNGatewaysClient.BeginCreateOrUpdate +// method. +func (client *VPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VPNGateway, options *VPNGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VPNGateway, options *VPNGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VPNGatewaysClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VPNGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VPNGateway, options *VPNGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vpnGatewayParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a virtual wan vpn gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNGatewaysClientBeginDeleteOptions contains the optional parameters for the VPNGatewaysClient.BeginDelete method. +func (client *VPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginDeleteOptions) (*runtime.Poller[VPNGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a virtual wan vpn gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VPNGatewaysClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VPNGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a virtual wan vpn gateway. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNGatewaysClientGetOptions contains the optional parameters for the VPNGatewaysClient.Get method. +func (client *VPNGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientGetOptions) (VPNGatewaysClientGetResponse, error) { + var err error + const operationName = "VPNGatewaysClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return VPNGatewaysClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VPNGatewaysClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VPNGatewaysClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VPNGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VPNGatewaysClient) getHandleResponse(resp *http.Response) (VPNGatewaysClientGetResponse, error) { + result := VPNGatewaysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VPNGateway); err != nil { + return VPNGatewaysClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the VpnGateways in a subscription. +// +// Generated from API version 2024-05-01 +// - options - VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.NewListPager method. +func (client *VPNGatewaysClient) NewListPager(options *VPNGatewaysClientListOptions) *runtime.Pager[VPNGatewaysClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VPNGatewaysClientListResponse]{ + More: func(page VPNGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VPNGatewaysClientListResponse) (VPNGatewaysClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNGatewaysClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return VPNGatewaysClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VPNGatewaysClient) listCreateRequest(ctx context.Context, options *VPNGatewaysClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VPNGatewaysClient) listHandleResponse(resp *http.Response) (VPNGatewaysClientListResponse, error) { + result := VPNGatewaysClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNGatewaysResult); err != nil { + return VPNGatewaysClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all the VpnGateways in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - options - VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.NewListByResourceGroupPager +// method. +func (client *VPNGatewaysClient) NewListByResourceGroupPager(resourceGroupName string, options *VPNGatewaysClientListByResourceGroupOptions) *runtime.Pager[VPNGatewaysClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[VPNGatewaysClientListByResourceGroupResponse]{ + More: func(page VPNGatewaysClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VPNGatewaysClientListByResourceGroupResponse) (VPNGatewaysClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNGatewaysClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VPNGatewaysClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *VPNGatewaysClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VPNGatewaysClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *VPNGatewaysClient) listByResourceGroupHandleResponse(resp *http.Response) (VPNGatewaysClientListByResourceGroupResponse, error) { + result := VPNGatewaysClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNGatewaysResult); err != nil { + return VPNGatewaysClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginReset - Resets the primary of the vpn gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNGatewaysClientBeginResetOptions contains the optional parameters for the VPNGatewaysClient.BeginReset method. +func (client *VPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginResetOptions) (*runtime.Poller[VPNGatewaysClientResetResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reset(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientResetResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientResetResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Reset - Resets the primary of the vpn gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNGatewaysClient) reset(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginResetOptions) (*http.Response, error) { + var err error + const operationName = "VPNGatewaysClient.BeginReset" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resetCreateRequest creates the Reset request. +func (client *VPNGatewaysClient) resetCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginResetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + if options != nil && options.IPConfigurationID != nil { + reqQP.Set("ipConfigurationId", *options.IPConfigurationID) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStartPacketCapture - Starts packet capture on vpn gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStartPacketCapture +// method. +func (client *VPNGatewaysClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStartPacketCaptureOptions) (*runtime.Poller[VPNGatewaysClientStartPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startPacketCapture(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientStartPacketCaptureResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientStartPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartPacketCapture - Starts packet capture on vpn gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNGatewaysClient) startPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStartPacketCaptureOptions) (*http.Response, error) { + var err error + const operationName = "VPNGatewaysClient.BeginStartPacketCapture" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startPacketCaptureCreateRequest creates the StartPacketCapture request. +func (client *VPNGatewaysClient) startPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStartPacketCaptureOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginStopPacketCapture - Stops packet capture on vpn gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStopPacketCapture +// method. +func (client *VPNGatewaysClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStopPacketCaptureOptions) (*runtime.Poller[VPNGatewaysClientStopPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopPacketCapture(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientStopPacketCaptureResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientStopPacketCaptureResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StopPacketCapture - Stops packet capture on vpn gateway in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNGatewaysClient) stopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStopPacketCaptureOptions) (*http.Response, error) { + var err error + const operationName = "VPNGatewaysClient.BeginStopPacketCapture" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopPacketCaptureCreateRequest creates the StopPacketCapture request. +func (client *VPNGatewaysClient) stopPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStopPacketCaptureOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginUpdateTags - Updates virtual wan vpn gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - vpnGatewayParameters - Parameters supplied to update a virtual wan vpn gateway tags. +// - options - VPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VPNGatewaysClient.BeginUpdateTags +// method. +func (client *VPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject, options *VPNGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[VPNGatewaysClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNGatewaysClientUpdateTagsResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNGatewaysClientUpdateTagsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateTags - Updates virtual wan vpn gateway tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject, options *VPNGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { + var err error + const operationName = "VPNGatewaysClient.BeginUpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *VPNGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject, options *VPNGatewaysClientBeginUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vpnGatewayParameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnlinkconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnlinkconnections_client.go new file mode 100644 index 00000000..64b3adf1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnlinkconnections_client.go @@ -0,0 +1,609 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VPNLinkConnectionsClient contains the methods for the VPNLinkConnections group. +// Don't use this type directly, use NewVPNLinkConnectionsClient() instead. +type VPNLinkConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVPNLinkConnectionsClient creates a new instance of VPNLinkConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVPNLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNLinkConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VPNLinkConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewGetAllSharedKeysPager - Lists all shared keys of VpnLink connection specified. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - linkConnectionName - The name of the vpn link connection. +// - options - VPNLinkConnectionsClientGetAllSharedKeysOptions contains the optional parameters for the VPNLinkConnectionsClient.NewGetAllSharedKeysPager +// method. +func (client *VPNLinkConnectionsClient) NewGetAllSharedKeysPager(resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientGetAllSharedKeysOptions) *runtime.Pager[VPNLinkConnectionsClientGetAllSharedKeysResponse] { + return runtime.NewPager(runtime.PagingHandler[VPNLinkConnectionsClientGetAllSharedKeysResponse]{ + More: func(page VPNLinkConnectionsClientGetAllSharedKeysResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VPNLinkConnectionsClientGetAllSharedKeysResponse) (VPNLinkConnectionsClientGetAllSharedKeysResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNLinkConnectionsClient.NewGetAllSharedKeysPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAllSharedKeysCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) + }, nil) + if err != nil { + return VPNLinkConnectionsClientGetAllSharedKeysResponse{}, err + } + return client.getAllSharedKeysHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getAllSharedKeysCreateRequest creates the GetAllSharedKeys request. +func (client *VPNLinkConnectionsClient) getAllSharedKeysCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientGetAllSharedKeysOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if linkConnectionName == "" { + return nil, errors.New("parameter linkConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkConnectionName}", url.PathEscape(linkConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getAllSharedKeysHandleResponse handles the GetAllSharedKeys response. +func (client *VPNLinkConnectionsClient) getAllSharedKeysHandleResponse(resp *http.Response) (VPNLinkConnectionsClientGetAllSharedKeysResponse, error) { + result := VPNLinkConnectionsClientGetAllSharedKeysResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionSharedKeyResultList); err != nil { + return VPNLinkConnectionsClientGetAllSharedKeysResponse{}, err + } + return result, nil +} + +// GetDefaultSharedKey - Gets the shared key of VpnLink connection specified. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - linkConnectionName - The name of the vpn link connection. +// - options - VPNLinkConnectionsClientGetDefaultSharedKeyOptions contains the optional parameters for the VPNLinkConnectionsClient.GetDefaultSharedKey +// method. +func (client *VPNLinkConnectionsClient) GetDefaultSharedKey(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientGetDefaultSharedKeyOptions) (VPNLinkConnectionsClientGetDefaultSharedKeyResponse, error) { + var err error + const operationName = "VPNLinkConnectionsClient.GetDefaultSharedKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getDefaultSharedKeyCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) + if err != nil { + return VPNLinkConnectionsClientGetDefaultSharedKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VPNLinkConnectionsClientGetDefaultSharedKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VPNLinkConnectionsClientGetDefaultSharedKeyResponse{}, err + } + resp, err := client.getDefaultSharedKeyHandleResponse(httpResp) + return resp, err +} + +// getDefaultSharedKeyCreateRequest creates the GetDefaultSharedKey request. +func (client *VPNLinkConnectionsClient) getDefaultSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientGetDefaultSharedKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if linkConnectionName == "" { + return nil, errors.New("parameter linkConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkConnectionName}", url.PathEscape(linkConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getDefaultSharedKeyHandleResponse handles the GetDefaultSharedKey response. +func (client *VPNLinkConnectionsClient) getDefaultSharedKeyHandleResponse(resp *http.Response) (VPNLinkConnectionsClientGetDefaultSharedKeyResponse, error) { + result := VPNLinkConnectionsClientGetDefaultSharedKeyResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionSharedKeyResult); err != nil { + return VPNLinkConnectionsClientGetDefaultSharedKeyResponse{}, err + } + return result, nil +} + +// BeginGetIkeSas - Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - linkConnectionName - The name of the vpn link connection. +// - options - VPNLinkConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginGetIkeSas +// method. +func (client *VPNLinkConnectionsClient) BeginGetIkeSas(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginGetIkeSasOptions) (*runtime.Poller[VPNLinkConnectionsClientGetIkeSasResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getIkeSas(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNLinkConnectionsClientGetIkeSasResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNLinkConnectionsClientGetIkeSasResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetIkeSas - Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNLinkConnectionsClient) getIkeSas(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginGetIkeSasOptions) (*http.Response, error) { + var err error + const operationName = "VPNLinkConnectionsClient.BeginGetIkeSas" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getIkeSasCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getIkeSasCreateRequest creates the GetIkeSas request. +func (client *VPNLinkConnectionsClient) getIkeSasCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginGetIkeSasOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if linkConnectionName == "" { + return nil, errors.New("parameter linkConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkConnectionName}", url.PathEscape(linkConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// NewListByVPNConnectionPager - Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the vpn gateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - options - VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.NewListByVPNConnectionPager +// method. +func (client *VPNLinkConnectionsClient) NewListByVPNConnectionPager(resourceGroupName string, gatewayName string, connectionName string, options *VPNLinkConnectionsClientListByVPNConnectionOptions) *runtime.Pager[VPNLinkConnectionsClientListByVPNConnectionResponse] { + return runtime.NewPager(runtime.PagingHandler[VPNLinkConnectionsClientListByVPNConnectionResponse]{ + More: func(page VPNLinkConnectionsClientListByVPNConnectionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VPNLinkConnectionsClientListByVPNConnectionResponse) (VPNLinkConnectionsClientListByVPNConnectionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNLinkConnectionsClient.NewListByVPNConnectionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVPNConnectionCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) + }, nil) + if err != nil { + return VPNLinkConnectionsClientListByVPNConnectionResponse{}, err + } + return client.listByVPNConnectionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByVPNConnectionCreateRequest creates the ListByVPNConnection request. +func (client *VPNLinkConnectionsClient) listByVPNConnectionCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNLinkConnectionsClientListByVPNConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByVPNConnectionHandleResponse handles the ListByVPNConnection response. +func (client *VPNLinkConnectionsClient) listByVPNConnectionHandleResponse(resp *http.Response) (VPNLinkConnectionsClientListByVPNConnectionResponse, error) { + result := VPNLinkConnectionsClientListByVPNConnectionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSiteLinkConnectionsResult); err != nil { + return VPNLinkConnectionsClientListByVPNConnectionResponse{}, err + } + return result, nil +} + +// ListDefaultSharedKey - Gets the value of the shared key of VpnLink connection specified. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - linkConnectionName - The name of the vpn link connection. +// - options - VPNLinkConnectionsClientListDefaultSharedKeyOptions contains the optional parameters for the VPNLinkConnectionsClient.ListDefaultSharedKey +// method. +func (client *VPNLinkConnectionsClient) ListDefaultSharedKey(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientListDefaultSharedKeyOptions) (VPNLinkConnectionsClientListDefaultSharedKeyResponse, error) { + var err error + const operationName = "VPNLinkConnectionsClient.ListDefaultSharedKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listDefaultSharedKeyCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) + if err != nil { + return VPNLinkConnectionsClientListDefaultSharedKeyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VPNLinkConnectionsClientListDefaultSharedKeyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VPNLinkConnectionsClientListDefaultSharedKeyResponse{}, err + } + resp, err := client.listDefaultSharedKeyHandleResponse(httpResp) + return resp, err +} + +// listDefaultSharedKeyCreateRequest creates the ListDefaultSharedKey request. +func (client *VPNLinkConnectionsClient) listDefaultSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientListDefaultSharedKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default/listSharedKey" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if linkConnectionName == "" { + return nil, errors.New("parameter linkConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkConnectionName}", url.PathEscape(linkConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listDefaultSharedKeyHandleResponse handles the ListDefaultSharedKey response. +func (client *VPNLinkConnectionsClient) listDefaultSharedKeyHandleResponse(resp *http.Response) (VPNLinkConnectionsClientListDefaultSharedKeyResponse, error) { + result := VPNLinkConnectionsClientListDefaultSharedKeyResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionSharedKeyResult); err != nil { + return VPNLinkConnectionsClientListDefaultSharedKeyResponse{}, err + } + return result, nil +} + +// BeginResetConnection - Resets the VpnLink connection specified. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - linkConnectionName - The name of the vpn link connection. +// - options - VPNLinkConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginResetConnection +// method. +func (client *VPNLinkConnectionsClient) BeginResetConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginResetConnectionOptions) (*runtime.Poller[VPNLinkConnectionsClientResetConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resetConnection(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNLinkConnectionsClientResetConnectionResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNLinkConnectionsClientResetConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResetConnection - Resets the VpnLink connection specified. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNLinkConnectionsClient) resetConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginResetConnectionOptions) (*http.Response, error) { + var err error + const operationName = "VPNLinkConnectionsClient.BeginResetConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resetConnectionCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resetConnectionCreateRequest creates the ResetConnection request. +func (client *VPNLinkConnectionsClient) resetConnectionCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginResetConnectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if linkConnectionName == "" { + return nil, errors.New("parameter linkConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkConnectionName}", url.PathEscape(linkConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginSetOrInitDefaultSharedKey - Sets or auto generates the shared key based on the user input. If users give a shared +// key value, it does the set operation. If key length is given, the operation creates a random key of the +// pre-defined length. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the connection. +// - linkConnectionName - The name of the vpn link connection. +// - connectionSharedKeyParameters - Parameters supplied to set or auto generate the shared key for the vpn link connection. +// - options - VPNLinkConnectionsClientBeginSetOrInitDefaultSharedKeyOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginSetOrInitDefaultSharedKey +// method. +func (client *VPNLinkConnectionsClient) BeginSetOrInitDefaultSharedKey(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, connectionSharedKeyParameters ConnectionSharedKeyResult, options *VPNLinkConnectionsClientBeginSetOrInitDefaultSharedKeyOptions) (*runtime.Poller[VPNLinkConnectionsClientSetOrInitDefaultSharedKeyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.setOrInitDefaultSharedKey(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, connectionSharedKeyParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNLinkConnectionsClientSetOrInitDefaultSharedKeyResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNLinkConnectionsClientSetOrInitDefaultSharedKeyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SetOrInitDefaultSharedKey - Sets or auto generates the shared key based on the user input. If users give a shared key value, +// it does the set operation. If key length is given, the operation creates a random key of the +// pre-defined length. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNLinkConnectionsClient) setOrInitDefaultSharedKey(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, connectionSharedKeyParameters ConnectionSharedKeyResult, options *VPNLinkConnectionsClientBeginSetOrInitDefaultSharedKeyOptions) (*http.Response, error) { + var err error + const operationName = "VPNLinkConnectionsClient.BeginSetOrInitDefaultSharedKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.setOrInitDefaultSharedKeyCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, connectionSharedKeyParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// setOrInitDefaultSharedKeyCreateRequest creates the SetOrInitDefaultSharedKey request. +func (client *VPNLinkConnectionsClient) setOrInitDefaultSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, connectionSharedKeyParameters ConnectionSharedKeyResult, options *VPNLinkConnectionsClientBeginSetOrInitDefaultSharedKeyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if linkConnectionName == "" { + return nil, errors.New("parameter linkConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkConnectionName}", url.PathEscape(linkConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, connectionSharedKeyParameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnserverconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnserverconfigurations_client.go new file mode 100644 index 00000000..f5eb3c6a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnserverconfigurations_client.go @@ -0,0 +1,452 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VPNServerConfigurationsClient contains the methods for the VPNServerConfigurations group. +// Don't use this type directly, use NewVPNServerConfigurationsClient() instead. +type VPNServerConfigurationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVPNServerConfigurationsClient creates a new instance of VPNServerConfigurationsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVPNServerConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNServerConfigurationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VPNServerConfigurationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration being created or updated. +// - vpnServerConfigurationParameters - Parameters supplied to create or update VpnServerConfiguration. +// - options - VPNServerConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginCreateOrUpdate +// method. +func (client *VPNServerConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VPNServerConfiguration, options *VPNServerConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNServerConfigurationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNServerConfigurationsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNServerConfigurationsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNServerConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VPNServerConfiguration, options *VPNServerConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VPNServerConfigurationsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VPNServerConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VPNServerConfiguration, options *VPNServerConfigurationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnServerConfigurationName == "" { + return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vpnServerConfigurationParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a VpnServerConfiguration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration being deleted. +// - options - VPNServerConfigurationsClientBeginDeleteOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginDelete +// method. +func (client *VPNServerConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientBeginDeleteOptions) (*runtime.Poller[VPNServerConfigurationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, vpnServerConfigurationName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNServerConfigurationsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNServerConfigurationsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a VpnServerConfiguration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNServerConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VPNServerConfigurationsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VPNServerConfigurationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnServerConfigurationName == "" { + return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a VpnServerConfiguration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration being retrieved. +// - options - VPNServerConfigurationsClientGetOptions contains the optional parameters for the VPNServerConfigurationsClient.Get +// method. +func (client *VPNServerConfigurationsClient) Get(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientGetOptions) (VPNServerConfigurationsClientGetResponse, error) { + var err error + const operationName = "VPNServerConfigurationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, options) + if err != nil { + return VPNServerConfigurationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VPNServerConfigurationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VPNServerConfigurationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VPNServerConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnServerConfigurationName == "" { + return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VPNServerConfigurationsClient) getHandleResponse(resp *http.Response) (VPNServerConfigurationsClientGetResponse, error) { + result := VPNServerConfigurationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VPNServerConfiguration); err != nil { + return VPNServerConfigurationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the VpnServerConfigurations in a subscription. +// +// Generated from API version 2024-05-01 +// - options - VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListPager +// method. +func (client *VPNServerConfigurationsClient) NewListPager(options *VPNServerConfigurationsClientListOptions) *runtime.Pager[VPNServerConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VPNServerConfigurationsClientListResponse]{ + More: func(page VPNServerConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VPNServerConfigurationsClientListResponse) (VPNServerConfigurationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNServerConfigurationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return VPNServerConfigurationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VPNServerConfigurationsClient) listCreateRequest(ctx context.Context, options *VPNServerConfigurationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VPNServerConfigurationsClient) listHandleResponse(resp *http.Response) (VPNServerConfigurationsClientListResponse, error) { + result := VPNServerConfigurationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNServerConfigurationsResult); err != nil { + return VPNServerConfigurationsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all the vpnServerConfigurations in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - options - VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListByResourceGroupPager +// method. +func (client *VPNServerConfigurationsClient) NewListByResourceGroupPager(resourceGroupName string, options *VPNServerConfigurationsClientListByResourceGroupOptions) *runtime.Pager[VPNServerConfigurationsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[VPNServerConfigurationsClientListByResourceGroupResponse]{ + More: func(page VPNServerConfigurationsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VPNServerConfigurationsClientListByResourceGroupResponse) (VPNServerConfigurationsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNServerConfigurationsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VPNServerConfigurationsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *VPNServerConfigurationsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VPNServerConfigurationsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *VPNServerConfigurationsClient) listByResourceGroupHandleResponse(resp *http.Response) (VPNServerConfigurationsClientListByResourceGroupResponse, error) { + result := VPNServerConfigurationsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNServerConfigurationsResult); err != nil { + return VPNServerConfigurationsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates VpnServerConfiguration tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration being updated. +// - vpnServerConfigurationParameters - Parameters supplied to update VpnServerConfiguration tags. +// - options - VPNServerConfigurationsClientUpdateTagsOptions contains the optional parameters for the VPNServerConfigurationsClient.UpdateTags +// method. +func (client *VPNServerConfigurationsClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters TagsObject, options *VPNServerConfigurationsClientUpdateTagsOptions) (VPNServerConfigurationsClientUpdateTagsResponse, error) { + var err error + const operationName = "VPNServerConfigurationsClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) + if err != nil { + return VPNServerConfigurationsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VPNServerConfigurationsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VPNServerConfigurationsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *VPNServerConfigurationsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters TagsObject, options *VPNServerConfigurationsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnServerConfigurationName == "" { + return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vpnServerConfigurationParameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *VPNServerConfigurationsClient) updateTagsHandleResponse(resp *http.Response) (VPNServerConfigurationsClientUpdateTagsResponse, error) { + result := VPNServerConfigurationsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VPNServerConfiguration); err != nil { + return VPNServerConfigurationsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnserverconfigurationsassociatedwithvirtualwan_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnserverconfigurationsassociatedwithvirtualwan_client.go new file mode 100644 index 00000000..b862307b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnserverconfigurationsassociatedwithvirtualwan_client.go @@ -0,0 +1,122 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VPNServerConfigurationsAssociatedWithVirtualWanClient contains the methods for the VPNServerConfigurationsAssociatedWithVirtualWan group. +// Don't use this type directly, use NewVPNServerConfigurationsAssociatedWithVirtualWanClient() instead. +type VPNServerConfigurationsAssociatedWithVirtualWanClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVPNServerConfigurationsAssociatedWithVirtualWanClient creates a new instance of VPNServerConfigurationsAssociatedWithVirtualWanClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVPNServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNServerConfigurationsAssociatedWithVirtualWanClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VPNServerConfigurationsAssociatedWithVirtualWanClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginList - Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name. +// - virtualWANName - The name of the VirtualWAN whose associated VpnServerConfigurations is needed. +// - options - VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions contains the optional parameters for the +// VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList method. +func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) BeginList(ctx context.Context, resourceGroupName string, virtualWANName string, options *VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions) (*runtime.Poller[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listOperation(ctx, resourceGroupName, virtualWANName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// List - Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) listOperation(ctx context.Context, resourceGroupName string, virtualWANName string, options *VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions) (*http.Response, error) { + var err error + const operationName = "VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, resourceGroupName, virtualWANName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listCreateRequest creates the List request. +func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, options *VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualWANName == "" { + return nil, errors.New("parameter virtualWANName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualWANName}", url.PathEscape(virtualWANName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsitelinkconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsitelinkconnections_client.go new file mode 100644 index 00000000..7adeae48 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsitelinkconnections_client.go @@ -0,0 +1,120 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VPNSiteLinkConnectionsClient contains the methods for the VPNSiteLinkConnections group. +// Don't use this type directly, use NewVPNSiteLinkConnectionsClient() instead. +type VPNSiteLinkConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVPNSiteLinkConnectionsClient creates a new instance of VPNSiteLinkConnectionsClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVPNSiteLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSiteLinkConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VPNSiteLinkConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Retrieves the details of a vpn site link connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - linkConnectionName - The name of the vpn connection. +// - options - VPNSiteLinkConnectionsClientGetOptions contains the optional parameters for the VPNSiteLinkConnectionsClient.Get +// method. +func (client *VPNSiteLinkConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNSiteLinkConnectionsClientGetOptions) (VPNSiteLinkConnectionsClientGetResponse, error) { + var err error + const operationName = "VPNSiteLinkConnectionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) + if err != nil { + return VPNSiteLinkConnectionsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VPNSiteLinkConnectionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VPNSiteLinkConnectionsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VPNSiteLinkConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNSiteLinkConnectionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if gatewayName == "" { + return nil, errors.New("parameter gatewayName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) + if connectionName == "" { + return nil, errors.New("parameter connectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) + if linkConnectionName == "" { + return nil, errors.New("parameter linkConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{linkConnectionName}", url.PathEscape(linkConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VPNSiteLinkConnectionsClient) getHandleResponse(resp *http.Response) (VPNSiteLinkConnectionsClientGetResponse, error) { + result := VPNSiteLinkConnectionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VPNSiteLinkConnection); err != nil { + return VPNSiteLinkConnectionsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsitelinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsitelinks_client.go new file mode 100644 index 00000000..5e6c048c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsitelinks_client.go @@ -0,0 +1,179 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VPNSiteLinksClient contains the methods for the VPNSiteLinks group. +// Don't use this type directly, use NewVPNSiteLinksClient() instead. +type VPNSiteLinksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVPNSiteLinksClient creates a new instance of VPNSiteLinksClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVPNSiteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSiteLinksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VPNSiteLinksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Retrieves the details of a VPN site link. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite. +// - vpnSiteLinkName - The name of the VpnSiteLink being retrieved. +// - options - VPNSiteLinksClientGetOptions contains the optional parameters for the VPNSiteLinksClient.Get method. +func (client *VPNSiteLinksClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string, options *VPNSiteLinksClientGetOptions) (VPNSiteLinksClientGetResponse, error) { + var err error + const operationName = "VPNSiteLinksClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vpnSiteName, vpnSiteLinkName, options) + if err != nil { + return VPNSiteLinksClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VPNSiteLinksClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VPNSiteLinksClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VPNSiteLinksClient) getCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string, options *VPNSiteLinksClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnSiteName == "" { + return nil, errors.New("parameter vpnSiteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) + if vpnSiteLinkName == "" { + return nil, errors.New("parameter vpnSiteLinkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnSiteLinkName}", url.PathEscape(vpnSiteLinkName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VPNSiteLinksClient) getHandleResponse(resp *http.Response) (VPNSiteLinksClientGetResponse, error) { + result := VPNSiteLinksClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VPNSiteLink); err != nil { + return VPNSiteLinksClientGetResponse{}, err + } + return result, nil +} + +// NewListByVPNSitePager - Lists all the vpnSiteLinks in a resource group for a vpn site. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite. +// - options - VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.NewListByVPNSitePager +// method. +func (client *VPNSiteLinksClient) NewListByVPNSitePager(resourceGroupName string, vpnSiteName string, options *VPNSiteLinksClientListByVPNSiteOptions) *runtime.Pager[VPNSiteLinksClientListByVPNSiteResponse] { + return runtime.NewPager(runtime.PagingHandler[VPNSiteLinksClientListByVPNSiteResponse]{ + More: func(page VPNSiteLinksClientListByVPNSiteResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VPNSiteLinksClientListByVPNSiteResponse) (VPNSiteLinksClientListByVPNSiteResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNSiteLinksClient.NewListByVPNSitePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByVPNSiteCreateRequest(ctx, resourceGroupName, vpnSiteName, options) + }, nil) + if err != nil { + return VPNSiteLinksClientListByVPNSiteResponse{}, err + } + return client.listByVPNSiteHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByVPNSiteCreateRequest creates the ListByVPNSite request. +func (client *VPNSiteLinksClient) listByVPNSiteCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSiteLinksClientListByVPNSiteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnSiteName == "" { + return nil, errors.New("parameter vpnSiteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByVPNSiteHandleResponse handles the ListByVPNSite response. +func (client *VPNSiteLinksClient) listByVPNSiteHandleResponse(resp *http.Response) (VPNSiteLinksClientListByVPNSiteResponse, error) { + result := VPNSiteLinksClientListByVPNSiteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSiteLinksResult); err != nil { + return VPNSiteLinksClientListByVPNSiteResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsites_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsites_client.go new file mode 100644 index 00000000..fb6ef260 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsites_client.go @@ -0,0 +1,448 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VPNSitesClient contains the methods for the VPNSites group. +// Don't use this type directly, use NewVPNSitesClient() instead. +type VPNSitesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVPNSitesClient creates a new instance of VPNSitesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVPNSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSitesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VPNSitesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite being created or updated. +// - vpnSiteParameters - Parameters supplied to create or update VpnSite. +// - options - VPNSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNSitesClient.BeginCreateOrUpdate +// method. +func (client *VPNSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VPNSite, options *VPNSitesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNSitesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNSitesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNSitesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNSitesClient) createOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VPNSite, options *VPNSitesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "VPNSitesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *VPNSitesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VPNSite, options *VPNSitesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnSiteName == "" { + return nil, errors.New("parameter vpnSiteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vpnSiteParameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Deletes a VpnSite. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite being deleted. +// - options - VPNSitesClientBeginDeleteOptions contains the optional parameters for the VPNSitesClient.BeginDelete method. +func (client *VPNSitesClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientBeginDeleteOptions) (*runtime.Poller[VPNSitesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, vpnSiteName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNSitesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNSitesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes a VpnSite. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNSitesClient) deleteOperation(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "VPNSitesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, vpnSiteName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *VPNSitesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnSiteName == "" { + return nil, errors.New("parameter vpnSiteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieves the details of a VPN site. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite being retrieved. +// - options - VPNSitesClientGetOptions contains the optional parameters for the VPNSitesClient.Get method. +func (client *VPNSitesClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientGetOptions) (VPNSitesClientGetResponse, error) { + var err error + const operationName = "VPNSitesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vpnSiteName, options) + if err != nil { + return VPNSitesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VPNSitesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VPNSitesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *VPNSitesClient) getCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnSiteName == "" { + return nil, errors.New("parameter vpnSiteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *VPNSitesClient) getHandleResponse(resp *http.Response) (VPNSitesClientGetResponse, error) { + result := VPNSitesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VPNSite); err != nil { + return VPNSitesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all the VpnSites in a subscription. +// +// Generated from API version 2024-05-01 +// - options - VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.NewListPager method. +func (client *VPNSitesClient) NewListPager(options *VPNSitesClientListOptions) *runtime.Pager[VPNSitesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[VPNSitesClientListResponse]{ + More: func(page VPNSitesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VPNSitesClientListResponse) (VPNSitesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNSitesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return VPNSitesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *VPNSitesClient) listCreateRequest(ctx context.Context, options *VPNSitesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *VPNSitesClient) listHandleResponse(resp *http.Response) (VPNSitesClientListResponse, error) { + result := VPNSitesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSitesResult); err != nil { + return VPNSitesClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists all the vpnSites in a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnSite. +// - options - VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.NewListByResourceGroupPager +// method. +func (client *VPNSitesClient) NewListByResourceGroupPager(resourceGroupName string, options *VPNSitesClientListByResourceGroupOptions) *runtime.Pager[VPNSitesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[VPNSitesClientListByResourceGroupResponse]{ + More: func(page VPNSitesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *VPNSitesClientListByResourceGroupResponse) (VPNSitesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VPNSitesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return VPNSitesClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *VPNSitesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VPNSitesClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *VPNSitesClient) listByResourceGroupHandleResponse(resp *http.Response) (VPNSitesClientListByResourceGroupResponse, error) { + result := VPNSitesClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSitesResult); err != nil { + return VPNSitesClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates VpnSite tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite being updated. +// - vpnSiteParameters - Parameters supplied to update VpnSite tags. +// - options - VPNSitesClientUpdateTagsOptions contains the optional parameters for the VPNSitesClient.UpdateTags method. +func (client *VPNSitesClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject, options *VPNSitesClientUpdateTagsOptions) (VPNSitesClientUpdateTagsResponse, error) { + var err error + const operationName = "VPNSitesClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) + if err != nil { + return VPNSitesClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return VPNSitesClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VPNSitesClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *VPNSitesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject, options *VPNSitesClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vpnSiteName == "" { + return nil, errors.New("parameter vpnSiteName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, vpnSiteParameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *VPNSitesClient) updateTagsHandleResponse(resp *http.Response) (VPNSitesClientUpdateTagsResponse, error) { + result := VPNSitesClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VPNSite); err != nil { + return VPNSitesClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsitesconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsitesconfiguration_client.go new file mode 100644 index 00000000..188692f1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/vpnsitesconfiguration_client.go @@ -0,0 +1,126 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// VPNSitesConfigurationClient contains the methods for the VPNSitesConfiguration group. +// Don't use this type directly, use NewVPNSitesConfigurationClient() instead. +type VPNSitesConfigurationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewVPNSitesConfigurationClient creates a new instance of VPNSitesConfigurationClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewVPNSitesConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSitesConfigurationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &VPNSitesConfigurationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginDownload - Gives the sas-url to download the configurations for vpn-sites in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The resource group name. +// - virtualWANName - The name of the VirtualWAN for which configuration of all vpn-sites is needed. +// - request - Parameters supplied to download vpn-sites configuration. +// - options - VPNSitesConfigurationClientBeginDownloadOptions contains the optional parameters for the VPNSitesConfigurationClient.BeginDownload +// method. +func (client *VPNSitesConfigurationClient) BeginDownload(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVPNSitesConfigurationRequest, options *VPNSitesConfigurationClientBeginDownloadOptions) (*runtime.Poller[VPNSitesConfigurationClientDownloadResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.download(ctx, resourceGroupName, virtualWANName, request, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VPNSitesConfigurationClientDownloadResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VPNSitesConfigurationClientDownloadResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Download - Gives the sas-url to download the configurations for vpn-sites in a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *VPNSitesConfigurationClient) download(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVPNSitesConfigurationRequest, options *VPNSitesConfigurationClientBeginDownloadOptions) (*http.Response, error) { + var err error + const operationName = "VPNSitesConfigurationClient.BeginDownload" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.downloadCreateRequest(ctx, resourceGroupName, virtualWANName, request, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// downloadCreateRequest creates the Download request. +func (client *VPNSitesConfigurationClient) downloadCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVPNSitesConfigurationRequest, options *VPNSitesConfigurationClientBeginDownloadOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if virtualWANName == "" { + return nil, errors.New("parameter virtualWANName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualWANName}", url.PathEscape(virtualWANName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/watchers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/watchers_client.go new file mode 100644 index 00000000..a3629610 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/watchers_client.go @@ -0,0 +1,1409 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WatchersClient contains the methods for the NetworkWatchers group. +// Don't use this type directly, use NewWatchersClient() instead. +type WatchersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWatchersClient creates a new instance of WatchersClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWatchersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WatchersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WatchersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCheckConnectivity - Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given +// endpoint including another VM or an arbitrary remote server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the network watcher resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that determine how the connectivity check will be performed. +// - options - WatchersClientBeginCheckConnectivityOptions contains the optional parameters for the WatchersClient.BeginCheckConnectivity +// method. +func (client *WatchersClient) BeginCheckConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, options *WatchersClientBeginCheckConnectivityOptions) (*runtime.Poller[WatchersClientCheckConnectivityResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.checkConnectivity(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientCheckConnectivityResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientCheckConnectivityResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CheckConnectivity - Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given +// endpoint including another VM or an arbitrary remote server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) checkConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, options *WatchersClientBeginCheckConnectivityOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginCheckConnectivity" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkConnectivityCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// checkConnectivityCreateRequest creates the CheckConnectivity request. +func (client *WatchersClient) checkConnectivityCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, options *WatchersClientBeginCheckConnectivityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// CreateOrUpdate - Creates or updates a network watcher in the specified resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters that define the network watcher resource. +// - options - WatchersClientCreateOrUpdateOptions contains the optional parameters for the WatchersClient.CreateOrUpdate method. +func (client *WatchersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher, options *WatchersClientCreateOrUpdateOptions) (WatchersClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WatchersClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return WatchersClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WatchersClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WatchersClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WatchersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher, options *WatchersClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WatchersClient) createOrUpdateHandleResponse(resp *http.Response) (WatchersClientCreateOrUpdateResponse, error) { + result := WatchersClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Watcher); err != nil { + return WatchersClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes the specified network watcher resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - options - WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method. +func (client *WatchersClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientBeginDeleteOptions) (*runtime.Poller[WatchersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes the specified network watcher resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WatchersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the specified network watcher by resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - options - WatchersClientGetOptions contains the optional parameters for the WatchersClient.Get method. +func (client *WatchersClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientGetOptions) (WatchersClientGetResponse, error) { + var err error + const operationName = "WatchersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, options) + if err != nil { + return WatchersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WatchersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatchersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WatchersClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WatchersClient) getHandleResponse(resp *http.Response) (WatchersClientGetResponse, error) { + result := WatchersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Watcher); err != nil { + return WatchersClientGetResponse{}, err + } + return result, nil +} + +// BeginGetAzureReachabilityReport - NOTE: This feature is currently in preview and still being tested for stability. Gets +// the relative latency score for internet service providers from a specified location to Azure regions. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the network watcher resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that determine Azure reachability report configuration. +// - options - WatchersClientBeginGetAzureReachabilityReportOptions contains the optional parameters for the WatchersClient.BeginGetAzureReachabilityReport +// method. +func (client *WatchersClient) BeginGetAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, options *WatchersClientBeginGetAzureReachabilityReportOptions) (*runtime.Poller[WatchersClientGetAzureReachabilityReportResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getAzureReachabilityReport(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetAzureReachabilityReportResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetAzureReachabilityReportResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetAzureReachabilityReport - NOTE: This feature is currently in preview and still being tested for stability. Gets the +// relative latency score for internet service providers from a specified location to Azure regions. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) getAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, options *WatchersClientBeginGetAzureReachabilityReportOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginGetAzureReachabilityReport" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getAzureReachabilityReportCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getAzureReachabilityReportCreateRequest creates the GetAzureReachabilityReport request. +func (client *WatchersClient) getAzureReachabilityReportCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, options *WatchersClientBeginGetAzureReachabilityReportOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginGetFlowLogStatus - Queries status of flow log and traffic analytics (optional) on a specified resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the network watcher resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that define a resource to query flow log and traffic analytics (optional) status. +// - options - WatchersClientBeginGetFlowLogStatusOptions contains the optional parameters for the WatchersClient.BeginGetFlowLogStatus +// method. +func (client *WatchersClient) BeginGetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, options *WatchersClientBeginGetFlowLogStatusOptions) (*runtime.Poller[WatchersClientGetFlowLogStatusResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getFlowLogStatus(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetFlowLogStatusResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetFlowLogStatusResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetFlowLogStatus - Queries status of flow log and traffic analytics (optional) on a specified resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) getFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, options *WatchersClientBeginGetFlowLogStatusOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginGetFlowLogStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getFlowLogStatusCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getFlowLogStatusCreateRequest creates the GetFlowLogStatus request. +func (client *WatchersClient) getFlowLogStatusCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, options *WatchersClientBeginGetFlowLogStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginGetNetworkConfigurationDiagnostic - Gets Network Configuration Diagnostic data to help customers understand and debug +// network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and +// the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. +// The API returns whether traffic was allowed or denied, the rules evaluated for +// the specified flow and the evaluation results. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters to get network configuration diagnostic. +// - options - WatchersClientBeginGetNetworkConfigurationDiagnosticOptions contains the optional parameters for the WatchersClient.BeginGetNetworkConfigurationDiagnostic +// method. +func (client *WatchersClient) BeginGetNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters, options *WatchersClientBeginGetNetworkConfigurationDiagnosticOptions) (*runtime.Poller[WatchersClientGetNetworkConfigurationDiagnosticResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getNetworkConfigurationDiagnostic(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetNetworkConfigurationDiagnosticResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetNetworkConfigurationDiagnosticResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetNetworkConfigurationDiagnostic - Gets Network Configuration Diagnostic data to help customers understand and debug network +// behavior. It provides detailed information on what security rules were applied to a specified traffic flow and +// the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. +// The API returns whether traffic was allowed or denied, the rules evaluated for +// the specified flow and the evaluation results. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) getNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters, options *WatchersClientBeginGetNetworkConfigurationDiagnosticOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginGetNetworkConfigurationDiagnostic" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getNetworkConfigurationDiagnosticCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getNetworkConfigurationDiagnosticCreateRequest creates the GetNetworkConfigurationDiagnostic request. +func (client *WatchersClient) getNetworkConfigurationDiagnosticCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters, options *WatchersClientBeginGetNetworkConfigurationDiagnosticOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginGetNextHop - Gets the next hop from the specified VM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters that define the source and destination endpoint. +// - options - WatchersClientBeginGetNextHopOptions contains the optional parameters for the WatchersClient.BeginGetNextHop +// method. +func (client *WatchersClient) BeginGetNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters, options *WatchersClientBeginGetNextHopOptions) (*runtime.Poller[WatchersClientGetNextHopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getNextHop(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetNextHopResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetNextHopResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetNextHop - Gets the next hop from the specified VM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) getNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters, options *WatchersClientBeginGetNextHopOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginGetNextHop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getNextHopCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getNextHopCreateRequest creates the GetNextHop request. +func (client *WatchersClient) getNextHopCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters, options *WatchersClientBeginGetNextHopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// GetTopology - Gets the current network topology by resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters that define the representation of topology. +// - options - WatchersClientGetTopologyOptions contains the optional parameters for the WatchersClient.GetTopology method. +func (client *WatchersClient) GetTopology(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters, options *WatchersClientGetTopologyOptions) (WatchersClientGetTopologyResponse, error) { + var err error + const operationName = "WatchersClient.GetTopology" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getTopologyCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return WatchersClientGetTopologyResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WatchersClientGetTopologyResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatchersClientGetTopologyResponse{}, err + } + resp, err := client.getTopologyHandleResponse(httpResp) + return resp, err +} + +// getTopologyCreateRequest creates the GetTopology request. +func (client *WatchersClient) getTopologyCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters, options *WatchersClientGetTopologyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// getTopologyHandleResponse handles the GetTopology response. +func (client *WatchersClient) getTopologyHandleResponse(resp *http.Response) (WatchersClientGetTopologyResponse, error) { + result := WatchersClientGetTopologyResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Topology); err != nil { + return WatchersClientGetTopologyResponse{}, err + } + return result, nil +} + +// BeginGetTroubleshooting - Initiate troubleshooting on a specified resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that define the resource to troubleshoot. +// - options - WatchersClientBeginGetTroubleshootingOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshooting +// method. +func (client *WatchersClient) BeginGetTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingOptions) (*runtime.Poller[WatchersClientGetTroubleshootingResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getTroubleshooting(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetTroubleshootingResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetTroubleshootingResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetTroubleshooting - Initiate troubleshooting on a specified resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) getTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginGetTroubleshooting" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getTroubleshootingCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getTroubleshootingCreateRequest creates the GetTroubleshooting request. +func (client *WatchersClient) getTroubleshootingCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginGetTroubleshootingResult - Get the last completed troubleshooting result on a specified resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that define the resource to query the troubleshooting result. +// - options - WatchersClientBeginGetTroubleshootingResultOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshootingResult +// method. +func (client *WatchersClient) BeginGetTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingResultOptions) (*runtime.Poller[WatchersClientGetTroubleshootingResultResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getTroubleshootingResult(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetTroubleshootingResultResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetTroubleshootingResultResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetTroubleshootingResult - Get the last completed troubleshooting result on a specified resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) getTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingResultOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginGetTroubleshootingResult" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getTroubleshootingResultCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getTroubleshootingResultCreateRequest creates the GetTroubleshootingResult request. +func (client *WatchersClient) getTroubleshootingResultCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingResultOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginGetVMSecurityRules - Gets the configured and effective security group rules on the specified VM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters that define the VM to check security groups for. +// - options - WatchersClientBeginGetVMSecurityRulesOptions contains the optional parameters for the WatchersClient.BeginGetVMSecurityRules +// method. +func (client *WatchersClient) BeginGetVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, options *WatchersClientBeginGetVMSecurityRulesOptions) (*runtime.Poller[WatchersClientGetVMSecurityRulesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getVMSecurityRules(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientGetVMSecurityRulesResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientGetVMSecurityRulesResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// GetVMSecurityRules - Gets the configured and effective security group rules on the specified VM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) getVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, options *WatchersClientBeginGetVMSecurityRulesOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginGetVMSecurityRules" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getVMSecurityRulesCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// getVMSecurityRulesCreateRequest creates the GetVMSecurityRules request. +func (client *WatchersClient) getVMSecurityRulesCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, options *WatchersClientBeginGetVMSecurityRulesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// NewListPager - Gets all network watchers by resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - WatchersClientListOptions contains the optional parameters for the WatchersClient.NewListPager method. +func (client *WatchersClient) NewListPager(resourceGroupName string, options *WatchersClientListOptions) *runtime.Pager[WatchersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WatchersClientListResponse]{ + More: func(page WatchersClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *WatchersClientListResponse) (WatchersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WatchersClient.NewListPager") + req, err := client.listCreateRequest(ctx, resourceGroupName, options) + if err != nil { + return WatchersClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WatchersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WatchersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WatchersClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *WatchersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WatchersClient) listHandleResponse(resp *http.Response) (WatchersClientListResponse, error) { + result := WatchersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WatcherListResult); err != nil { + return WatchersClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all network watchers by subscription. +// +// Generated from API version 2024-05-01 +// - options - WatchersClientListAllOptions contains the optional parameters for the WatchersClient.NewListAllPager method. +func (client *WatchersClient) NewListAllPager(options *WatchersClientListAllOptions) *runtime.Pager[WatchersClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[WatchersClientListAllResponse]{ + More: func(page WatchersClientListAllResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *WatchersClientListAllResponse) (WatchersClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WatchersClient.NewListAllPager") + req, err := client.listAllCreateRequest(ctx, options) + if err != nil { + return WatchersClientListAllResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WatchersClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WatchersClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *WatchersClient) listAllCreateRequest(ctx context.Context, options *WatchersClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *WatchersClient) listAllHandleResponse(resp *http.Response) (WatchersClientListAllResponse, error) { + result := WatchersClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WatcherListResult); err != nil { + return WatchersClientListAllResponse{}, err + } + return result, nil +} + +// BeginListAvailableProviders - NOTE: This feature is currently in preview and still being tested for stability. Lists all +// available internet service providers for a specified Azure region. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the network watcher resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that scope the list of available providers. +// - options - WatchersClientBeginListAvailableProvidersOptions contains the optional parameters for the WatchersClient.BeginListAvailableProviders +// method. +func (client *WatchersClient) BeginListAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, options *WatchersClientBeginListAvailableProvidersOptions) (*runtime.Poller[WatchersClientListAvailableProvidersResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listAvailableProviders(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientListAvailableProvidersResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientListAvailableProvidersResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ListAvailableProviders - NOTE: This feature is currently in preview and still being tested for stability. Lists all available +// internet service providers for a specified Azure region. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) listAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, options *WatchersClientBeginListAvailableProvidersOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginListAvailableProviders" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listAvailableProvidersCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// listAvailableProvidersCreateRequest creates the ListAvailableProviders request. +func (client *WatchersClient) listAvailableProvidersCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, options *WatchersClientBeginListAvailableProvidersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginSetFlowLogConfiguration - Configures flow log and traffic analytics (optional) on a specified resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the network watcher resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that define the configuration of flow log. +// - options - WatchersClientBeginSetFlowLogConfigurationOptions contains the optional parameters for the WatchersClient.BeginSetFlowLogConfiguration +// method. +func (client *WatchersClient) BeginSetFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, options *WatchersClientBeginSetFlowLogConfigurationOptions) (*runtime.Poller[WatchersClientSetFlowLogConfigurationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.setFlowLogConfiguration(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientSetFlowLogConfigurationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientSetFlowLogConfigurationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SetFlowLogConfiguration - Configures flow log and traffic analytics (optional) on a specified resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) setFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, options *WatchersClientBeginSetFlowLogConfigurationOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginSetFlowLogConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.setFlowLogConfigurationCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// setFlowLogConfigurationCreateRequest creates the SetFlowLogConfiguration request. +func (client *WatchersClient) setFlowLogConfigurationCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, options *WatchersClientBeginSetFlowLogConfigurationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// UpdateTags - Updates a network watcher tags. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters supplied to update network watcher tags. +// - options - WatchersClientUpdateTagsOptions contains the optional parameters for the WatchersClient.UpdateTags method. +func (client *WatchersClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject, options *WatchersClientUpdateTagsOptions) (WatchersClientUpdateTagsResponse, error) { + var err error + const operationName = "WatchersClient.UpdateTags" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return WatchersClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WatchersClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WatchersClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *WatchersClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject, options *WatchersClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *WatchersClient) updateTagsHandleResponse(resp *http.Response) (WatchersClientUpdateTagsResponse, error) { + result := WatchersClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Watcher); err != nil { + return WatchersClientUpdateTagsResponse{}, err + } + return result, nil +} + +// BeginVerifyIPFlow - Verify IP flow from the specified VM to a location given the currently configured NSG rules. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters that define the IP flow to be verified. +// - options - WatchersClientBeginVerifyIPFlowOptions contains the optional parameters for the WatchersClient.BeginVerifyIPFlow +// method. +func (client *WatchersClient) BeginVerifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, options *WatchersClientBeginVerifyIPFlowOptions) (*runtime.Poller[WatchersClientVerifyIPFlowResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.verifyIPFlow(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WatchersClientVerifyIPFlowResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WatchersClientVerifyIPFlowResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// VerifyIPFlow - Verify IP flow from the specified VM to a location given the currently configured NSG rules. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WatchersClient) verifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, options *WatchersClientBeginVerifyIPFlowOptions) (*http.Response, error) { + var err error + const operationName = "WatchersClient.BeginVerifyIPFlow" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.verifyIPFlowCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// verifyIPFlowCreateRequest creates the VerifyIPFlow request. +func (client *WatchersClient) verifyIPFlowCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, options *WatchersClientBeginVerifyIPFlowOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if networkWatcherName == "" { + return nil, errors.New("parameter networkWatcherName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/webapplicationfirewallpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/webapplicationfirewallpolicies_client.go new file mode 100644 index 00000000..d4d5049a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/webapplicationfirewallpolicies_client.go @@ -0,0 +1,371 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WebApplicationFirewallPoliciesClient contains the methods for the WebApplicationFirewallPolicies group. +// Don't use this type directly, use NewWebApplicationFirewallPoliciesClient() instead. +type WebApplicationFirewallPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWebApplicationFirewallPoliciesClient creates a new instance of WebApplicationFirewallPoliciesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWebApplicationFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebApplicationFirewallPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WebApplicationFirewallPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or update policy with specified rule set name within a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - policyName - The name of the policy. +// - parameters - Policy to be created. +// - options - WebApplicationFirewallPoliciesClientCreateOrUpdateOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.CreateOrUpdate +// method. +func (client *WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy, options *WebApplicationFirewallPoliciesClientCreateOrUpdateOptions) (WebApplicationFirewallPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "WebApplicationFirewallPoliciesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, policyName, parameters, options) + if err != nil { + return WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *WebApplicationFirewallPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy, options *WebApplicationFirewallPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *WebApplicationFirewallPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientCreateOrUpdateResponse, error) { + result := WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicy); err != nil { + return WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes Policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - policyName - The name of the policy. +// - options - WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete +// method. +func (client *WebApplicationFirewallPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientBeginDeleteOptions) (*runtime.Poller[WebApplicationFirewallPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, policyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebApplicationFirewallPoliciesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebApplicationFirewallPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes Policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +func (client *WebApplicationFirewallPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "WebApplicationFirewallPoliciesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, policyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *WebApplicationFirewallPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Retrieve protection policy with specified name within a resource group. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - policyName - The name of the policy. +// - options - WebApplicationFirewallPoliciesClientGetOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.Get +// method. +func (client *WebApplicationFirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientGetOptions) (WebApplicationFirewallPoliciesClientGetResponse, error) { + var err error + const operationName = "WebApplicationFirewallPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, policyName, options) + if err != nil { + return WebApplicationFirewallPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebApplicationFirewallPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebApplicationFirewallPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WebApplicationFirewallPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WebApplicationFirewallPoliciesClient) getHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientGetResponse, error) { + result := WebApplicationFirewallPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicy); err != nil { + return WebApplicationFirewallPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all of the protection policies within a resource group. +// +// Generated from API version 2024-05-01 +// - resourceGroupName - The name of the resource group. +// - options - WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListPager +// method. +func (client *WebApplicationFirewallPoliciesClient) NewListPager(resourceGroupName string, options *WebApplicationFirewallPoliciesClientListOptions) *runtime.Pager[WebApplicationFirewallPoliciesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[WebApplicationFirewallPoliciesClientListResponse]{ + More: func(page WebApplicationFirewallPoliciesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebApplicationFirewallPoliciesClientListResponse) (WebApplicationFirewallPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebApplicationFirewallPoliciesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return WebApplicationFirewallPoliciesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *WebApplicationFirewallPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *WebApplicationFirewallPoliciesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *WebApplicationFirewallPoliciesClient) listHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientListResponse, error) { + result := WebApplicationFirewallPoliciesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicyListResult); err != nil { + return WebApplicationFirewallPoliciesClientListResponse{}, err + } + return result, nil +} + +// NewListAllPager - Gets all the WAF policies in a subscription. +// +// Generated from API version 2024-05-01 +// - options - WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListAllPager +// method. +func (client *WebApplicationFirewallPoliciesClient) NewListAllPager(options *WebApplicationFirewallPoliciesClientListAllOptions) *runtime.Pager[WebApplicationFirewallPoliciesClientListAllResponse] { + return runtime.NewPager(runtime.PagingHandler[WebApplicationFirewallPoliciesClientListAllResponse]{ + More: func(page WebApplicationFirewallPoliciesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebApplicationFirewallPoliciesClientListAllResponse) (WebApplicationFirewallPoliciesClientListAllResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebApplicationFirewallPoliciesClient.NewListAllPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAllCreateRequest(ctx, options) + }, nil) + if err != nil { + return WebApplicationFirewallPoliciesClientListAllResponse{}, err + } + return client.listAllHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAllCreateRequest creates the ListAll request. +func (client *WebApplicationFirewallPoliciesClient) listAllCreateRequest(ctx context.Context, options *WebApplicationFirewallPoliciesClientListAllOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAllHandleResponse handles the ListAll response. +func (client *WebApplicationFirewallPoliciesClient) listAllHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientListAllResponse, error) { + result := WebApplicationFirewallPoliciesClientListAllResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicyListResult); err != nil { + return WebApplicationFirewallPoliciesClientListAllResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/webcategories_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/webcategories_client.go new file mode 100644 index 00000000..dfeb408b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6/webcategories_client.go @@ -0,0 +1,162 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// WebCategoriesClient contains the methods for the WebCategories group. +// Don't use this type directly, use NewWebCategoriesClient() instead. +type WebCategoriesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewWebCategoriesClient creates a new instance of WebCategoriesClient with the specified values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewWebCategoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebCategoriesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &WebCategoriesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the specified Azure Web Category. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-05-01 +// - name - The name of the azureWebCategory. +// - options - WebCategoriesClientGetOptions contains the optional parameters for the WebCategoriesClient.Get method. +func (client *WebCategoriesClient) Get(ctx context.Context, name string, options *WebCategoriesClientGetOptions) (WebCategoriesClientGetResponse, error) { + var err error + const operationName = "WebCategoriesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, name, options) + if err != nil { + return WebCategoriesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return WebCategoriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebCategoriesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *WebCategoriesClient) getCreateRequest(ctx context.Context, name string, options *WebCategoriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories/{name}" + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Expand != nil { + reqQP.Set("$expand", *options.Expand) + } + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *WebCategoriesClient) getHandleResponse(resp *http.Response) (WebCategoriesClientGetResponse, error) { + result := WebCategoriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureWebCategory); err != nil { + return WebCategoriesClientGetResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - Gets all the Azure Web Categories in a subscription. +// +// Generated from API version 2024-05-01 +// - options - WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.NewListBySubscriptionPager +// method. +func (client *WebCategoriesClient) NewListBySubscriptionPager(options *WebCategoriesClientListBySubscriptionOptions) *runtime.Pager[WebCategoriesClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[WebCategoriesClientListBySubscriptionResponse]{ + More: func(page WebCategoriesClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebCategoriesClientListBySubscriptionResponse) (WebCategoriesClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebCategoriesClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return WebCategoriesClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *WebCategoriesClient) listBySubscriptionCreateRequest(ctx context.Context, options *WebCategoriesClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-05-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *WebCategoriesClient) listBySubscriptionHandleResponse(resp *http.Response) (WebCategoriesClientListBySubscriptionResponse, error) { + result := WebCategoriesClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureWebCategoryListResult); err != nil { + return WebCategoriesClientListBySubscriptionResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualappliances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualappliances_client.go deleted file mode 100644 index 9850bb7c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualappliances_client.go +++ /dev/null @@ -1,429 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualAppliancesClient contains the methods for the NetworkVirtualAppliances group. -// Don't use this type directly, use NewVirtualAppliancesClient() instead. -type VirtualAppliancesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualAppliancesClient creates a new instance of VirtualAppliancesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualAppliancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualAppliancesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualAppliancesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of Network Virtual Appliance. -// parameters - Parameters supplied to the create or update Network Virtual Appliance. -// options - VirtualAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualAppliancesClient.BeginCreateOrUpdate -// method. -func (client *VirtualAppliancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance, options *VirtualAppliancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualAppliancesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualAppliancesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualAppliancesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified Network Virtual Appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualAppliancesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance, options *VirtualAppliancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualAppliancesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance, options *VirtualAppliancesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkVirtualApplianceName == "" { - return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified Network Virtual Appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of Network Virtual Appliance. -// options - VirtualAppliancesClientBeginDeleteOptions contains the optional parameters for the VirtualAppliancesClient.BeginDelete -// method. -func (client *VirtualAppliancesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginDeleteOptions) (*runtime.Poller[VirtualAppliancesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualAppliancesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualAppliancesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified Network Virtual Appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualAppliancesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualAppliancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkVirtualApplianceName == "" { - return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Network Virtual Appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of Network Virtual Appliance. -// options - VirtualAppliancesClientGetOptions contains the optional parameters for the VirtualAppliancesClient.Get method. -func (client *VirtualAppliancesClient) Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientGetOptions) (VirtualAppliancesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) - if err != nil { - return VirtualAppliancesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualAppliancesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualAppliancesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualAppliancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkVirtualApplianceName == "" { - return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualAppliancesClient) getHandleResponse(resp *http.Response) (VirtualAppliancesClientGetResponse, error) { - result := VirtualAppliancesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualAppliance); err != nil { - return VirtualAppliancesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all Network Virtual Appliances in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.List method. -func (client *VirtualAppliancesClient) NewListPager(options *VirtualAppliancesClientListOptions) *runtime.Pager[VirtualAppliancesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualAppliancesClientListResponse]{ - More: func(page VirtualAppliancesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualAppliancesClientListResponse) (VirtualAppliancesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualAppliancesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualAppliancesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualAppliancesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualAppliancesClient) listCreateRequest(ctx context.Context, options *VirtualAppliancesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualAppliancesClient) listHandleResponse(resp *http.Response) (VirtualAppliancesClientListResponse, error) { - result := VirtualAppliancesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceListResult); err != nil { - return VirtualAppliancesClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all Network Virtual Appliances in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.ListByResourceGroup -// method. -func (client *VirtualAppliancesClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualAppliancesClientListByResourceGroupOptions) *runtime.Pager[VirtualAppliancesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualAppliancesClientListByResourceGroupResponse]{ - More: func(page VirtualAppliancesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualAppliancesClientListByResourceGroupResponse) (VirtualAppliancesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualAppliancesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualAppliancesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualAppliancesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *VirtualAppliancesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualAppliancesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *VirtualAppliancesClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualAppliancesClientListByResourceGroupResponse, error) { - result := VirtualAppliancesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceListResult); err != nil { - return VirtualAppliancesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates a Network Virtual Appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of Network Virtual Appliance. -// networkVirtualApplianceName - The name of Network Virtual Appliance being updated. -// parameters - Parameters supplied to Update Network Virtual Appliance Tags. -// options - VirtualAppliancesClientUpdateTagsOptions contains the optional parameters for the VirtualAppliancesClient.UpdateTags -// method. -func (client *VirtualAppliancesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters TagsObject, options *VirtualAppliancesClientUpdateTagsOptions) (VirtualAppliancesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) - if err != nil { - return VirtualAppliancesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualAppliancesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualAppliancesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *VirtualAppliancesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters TagsObject, options *VirtualAppliancesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkVirtualApplianceName == "" { - return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *VirtualAppliancesClient) updateTagsHandleResponse(resp *http.Response) (VirtualAppliancesClientUpdateTagsResponse, error) { - result := VirtualAppliancesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualAppliance); err != nil { - return VirtualAppliancesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualappliancesites_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualappliancesites_client.go deleted file mode 100644 index 77988982..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualappliancesites_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualApplianceSitesClient contains the methods for the VirtualApplianceSites group. -// Don't use this type directly, use NewVirtualApplianceSitesClient() instead. -type VirtualApplianceSitesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualApplianceSitesClient creates a new instance of VirtualApplianceSitesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualApplianceSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceSitesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualApplianceSitesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance Site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of the Network Virtual Appliance. -// siteName - The name of the site. -// parameters - Parameters supplied to the create or update Network Virtual Appliance Site operation. -// options - VirtualApplianceSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginCreateOrUpdate -// method. -func (client *VirtualApplianceSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite, options *VirtualApplianceSitesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualApplianceSitesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, siteName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualApplianceSitesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualApplianceSitesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified Network Virtual Appliance Site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualApplianceSitesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite, options *VirtualApplianceSitesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, siteName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualApplianceSitesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite, options *VirtualApplianceSitesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkVirtualApplianceName == "" { - return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified site from a Virtual Appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of the Network Virtual Appliance. -// siteName - The name of the site. -// options - VirtualApplianceSitesClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginDelete -// method. -func (client *VirtualApplianceSitesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientBeginDeleteOptions) (*runtime.Poller[VirtualApplianceSitesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualApplianceSitesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualApplianceSitesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified site from a Virtual Appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualApplianceSitesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualApplianceSitesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkVirtualApplianceName == "" { - return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Virtual Appliance Site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of the Network Virtual Appliance. -// siteName - The name of the site. -// options - VirtualApplianceSitesClientGetOptions contains the optional parameters for the VirtualApplianceSitesClient.Get -// method. -func (client *VirtualApplianceSitesClient) Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientGetOptions) (VirtualApplianceSitesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) - if err != nil { - return VirtualApplianceSitesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualApplianceSitesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualApplianceSitesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualApplianceSitesClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkVirtualApplianceName == "" { - return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) - if siteName == "" { - return nil, errors.New("parameter siteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{siteName}", url.PathEscape(siteName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualApplianceSitesClient) getHandleResponse(resp *http.Response) (VirtualApplianceSitesClientGetResponse, error) { - result := VirtualApplianceSitesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSite); err != nil { - return VirtualApplianceSitesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of the Network Virtual Appliance. -// options - VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.List -// method. -func (client *VirtualApplianceSitesClient) NewListPager(resourceGroupName string, networkVirtualApplianceName string, options *VirtualApplianceSitesClientListOptions) *runtime.Pager[VirtualApplianceSitesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualApplianceSitesClientListResponse]{ - More: func(page VirtualApplianceSitesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualApplianceSitesClientListResponse) (VirtualApplianceSitesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualApplianceSitesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualApplianceSitesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualApplianceSitesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualApplianceSitesClient) listCreateRequest(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualApplianceSitesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkVirtualApplianceName == "" { - return nil, errors.New("parameter networkVirtualApplianceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkVirtualApplianceName}", url.PathEscape(networkVirtualApplianceName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualApplianceSitesClient) listHandleResponse(resp *http.Response) (VirtualApplianceSitesClientListResponse, error) { - result := VirtualApplianceSitesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSiteListResult); err != nil { - return VirtualApplianceSitesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualapplianceskus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualapplianceskus_client.go deleted file mode 100644 index 36cbd79b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualapplianceskus_client.go +++ /dev/null @@ -1,169 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualApplianceSKUsClient contains the methods for the VirtualApplianceSKUs group. -// Don't use this type directly, use NewVirtualApplianceSKUsClient() instead. -type VirtualApplianceSKUsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualApplianceSKUsClient creates a new instance of VirtualApplianceSKUsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualApplianceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceSKUsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualApplianceSKUsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Retrieves a single available sku for network virtual appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// skuName - Name of the Sku. -// options - VirtualApplianceSKUsClientGetOptions contains the optional parameters for the VirtualApplianceSKUsClient.Get -// method. -func (client *VirtualApplianceSKUsClient) Get(ctx context.Context, skuName string, options *VirtualApplianceSKUsClientGetOptions) (VirtualApplianceSKUsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, skuName, options) - if err != nil { - return VirtualApplianceSKUsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualApplianceSKUsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualApplianceSKUsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualApplianceSKUsClient) getCreateRequest(ctx context.Context, skuName string, options *VirtualApplianceSKUsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if skuName == "" { - return nil, errors.New("parameter skuName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{skuName}", url.PathEscape(skuName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualApplianceSKUsClient) getHandleResponse(resp *http.Response) (VirtualApplianceSKUsClientGetResponse, error) { - result := VirtualApplianceSKUsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSKU); err != nil { - return VirtualApplianceSKUsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - List all SKUs available for a virtual appliance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.List -// method. -func (client *VirtualApplianceSKUsClient) NewListPager(options *VirtualApplianceSKUsClientListOptions) *runtime.Pager[VirtualApplianceSKUsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualApplianceSKUsClientListResponse]{ - More: func(page VirtualApplianceSKUsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualApplianceSKUsClientListResponse) (VirtualApplianceSKUsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualApplianceSKUsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualApplianceSKUsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualApplianceSKUsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualApplianceSKUsClient) listCreateRequest(ctx context.Context, options *VirtualApplianceSKUsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualApplianceSKUsClient) listHandleResponse(resp *http.Response) (VirtualApplianceSKUsClientListResponse, error) { - result := VirtualApplianceSKUsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSKUListResult); err != nil { - return VirtualApplianceSKUsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnection_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnection_client.go deleted file mode 100644 index 799f6d69..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnection_client.go +++ /dev/null @@ -1,260 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualHubBgpConnectionClient contains the methods for the VirtualHubBgpConnection group. -// Don't use this type directly, use NewVirtualHubBgpConnectionClient() instead. -type VirtualHubBgpConnectionClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualHubBgpConnectionClient creates a new instance of VirtualHubBgpConnectionClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualHubBgpConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubBgpConnectionClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualHubBgpConnectionClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the connection. -// parameters - Parameters of Bgp connection. -// options - VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginCreateOrUpdate -// method. -func (client *VirtualHubBgpConnectionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection, options *VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubBgpConnectionClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, connectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubBgpConnectionClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubBgpConnectionClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubBgpConnectionClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection, options *VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualHubBgpConnectionClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection, options *VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes a VirtualHubBgpConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHubBgpConnection. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the connection. -// options - VirtualHubBgpConnectionClientBeginDeleteOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginDelete -// method. -func (client *VirtualHubBgpConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientBeginDeleteOptions) (*runtime.Poller[VirtualHubBgpConnectionClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, connectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubBgpConnectionClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubBgpConnectionClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a VirtualHubBgpConnection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubBgpConnectionClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualHubBgpConnectionClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a Virtual Hub Bgp Connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the connection. -// options - VirtualHubBgpConnectionClientGetOptions contains the optional parameters for the VirtualHubBgpConnectionClient.Get -// method. -func (client *VirtualHubBgpConnectionClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientGetOptions) (VirtualHubBgpConnectionClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) - if err != nil { - return VirtualHubBgpConnectionClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualHubBgpConnectionClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubBgpConnectionClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualHubBgpConnectionClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualHubBgpConnectionClient) getHandleResponse(resp *http.Response) (VirtualHubBgpConnectionClientGetResponse, error) { - result := VirtualHubBgpConnectionClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BgpConnection); err != nil { - return VirtualHubBgpConnectionClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnections_client.go deleted file mode 100644 index a3b73a19..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnections_client.go +++ /dev/null @@ -1,267 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualHubBgpConnectionsClient contains the methods for the VirtualHubBgpConnections group. -// Don't use this type directly, use NewVirtualHubBgpConnectionsClient() instead. -type VirtualHubBgpConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualHubBgpConnectionsClient creates a new instance of VirtualHubBgpConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualHubBgpConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubBgpConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualHubBgpConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Retrieves the details of all VirtualHubBgpConnections. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.List -// method. -func (client *VirtualHubBgpConnectionsClient) NewListPager(resourceGroupName string, virtualHubName string, options *VirtualHubBgpConnectionsClientListOptions) *runtime.Pager[VirtualHubBgpConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualHubBgpConnectionsClientListResponse]{ - More: func(page VirtualHubBgpConnectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualHubBgpConnectionsClientListResponse) (VirtualHubBgpConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualHubBgpConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualHubBgpConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubBgpConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualHubBgpConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubBgpConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualHubBgpConnectionsClient) listHandleResponse(resp *http.Response) (VirtualHubBgpConnectionsClientListResponse, error) { - result := VirtualHubBgpConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubBgpConnectionResults); err != nil { - return VirtualHubBgpConnectionsClientListResponse{}, err - } - return result, nil -} - -// BeginListAdvertisedRoutes - Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// hubName - The name of the virtual hub. -// connectionName - The name of the virtual hub bgp connection. -// options - VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes -// method. -func (client *VirtualHubBgpConnectionsClient) BeginListAdvertisedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions) (*runtime.Poller[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listAdvertisedRoutes(ctx, resourceGroupName, hubName, connectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListAdvertisedRoutes - Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubBgpConnectionsClient) listAdvertisedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions) (*http.Response, error) { - req, err := client.listAdvertisedRoutesCreateRequest(ctx, resourceGroupName, hubName, connectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listAdvertisedRoutesCreateRequest creates the ListAdvertisedRoutes request. -func (client *VirtualHubBgpConnectionsClient) listAdvertisedRoutesCreateRequest(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hubName == "" { - return nil, errors.New("parameter hubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hubName}", url.PathEscape(hubName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginListLearnedRoutes - Retrieves a list of routes the virtual hub bgp connection has learned. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// hubName - The name of the virtual hub. -// connectionName - The name of the virtual hub bgp connection. -// options - VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListLearnedRoutes -// method. -func (client *VirtualHubBgpConnectionsClient) BeginListLearnedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions) (*runtime.Poller[VirtualHubBgpConnectionsClientListLearnedRoutesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listLearnedRoutes(ctx, resourceGroupName, hubName, connectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubBgpConnectionsClientListLearnedRoutesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubBgpConnectionsClientListLearnedRoutesResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListLearnedRoutes - Retrieves a list of routes the virtual hub bgp connection has learned. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubBgpConnectionsClient) listLearnedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions) (*http.Response, error) { - req, err := client.listLearnedRoutesCreateRequest(ctx, resourceGroupName, hubName, connectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listLearnedRoutesCreateRequest creates the ListLearnedRoutes request. -func (client *VirtualHubBgpConnectionsClient) listLearnedRoutesCreateRequest(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if hubName == "" { - return nil, errors.New("parameter hubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{hubName}", url.PathEscape(hubName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubipconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubipconfiguration_client.go deleted file mode 100644 index 071fbf12..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubipconfiguration_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualHubIPConfigurationClient contains the methods for the VirtualHubIPConfiguration group. -// Don't use this type directly, use NewVirtualHubIPConfigurationClient() instead. -type VirtualHubIPConfigurationClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualHubIPConfigurationClient creates a new instance of VirtualHubIPConfigurationClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualHubIPConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubIPConfigurationClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualHubIPConfigurationClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// ipConfigName - The name of the ipconfig. -// parameters - Hub Ip Configuration parameters. -// options - VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginCreateOrUpdate -// method. -func (client *VirtualHubIPConfigurationClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, parameters HubIPConfiguration, options *VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubIPConfigurationClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, ipConfigName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubIPConfigurationClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubIPConfigurationClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubIPConfigurationClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, parameters HubIPConfiguration, options *VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, ipConfigName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualHubIPConfigurationClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, parameters HubIPConfiguration, options *VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if ipConfigName == "" { - return nil, errors.New("parameter ipConfigName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipConfigName}", url.PathEscape(ipConfigName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes a VirtualHubIpConfiguration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHubBgpConnection. -// virtualHubName - The name of the VirtualHub. -// ipConfigName - The name of the ipconfig. -// options - VirtualHubIPConfigurationClientBeginDeleteOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginDelete -// method. -func (client *VirtualHubIPConfigurationClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientBeginDeleteOptions) (*runtime.Poller[VirtualHubIPConfigurationClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, ipConfigName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubIPConfigurationClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubIPConfigurationClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a VirtualHubIpConfiguration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubIPConfigurationClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, ipConfigName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualHubIPConfigurationClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if ipConfigName == "" { - return nil, errors.New("parameter ipConfigName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipConfigName}", url.PathEscape(ipConfigName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a Virtual Hub Ip configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// ipConfigName - The name of the ipconfig. -// options - VirtualHubIPConfigurationClientGetOptions contains the optional parameters for the VirtualHubIPConfigurationClient.Get -// method. -func (client *VirtualHubIPConfigurationClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientGetOptions) (VirtualHubIPConfigurationClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, ipConfigName, options) - if err != nil { - return VirtualHubIPConfigurationClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualHubIPConfigurationClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubIPConfigurationClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualHubIPConfigurationClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if ipConfigName == "" { - return nil, errors.New("parameter ipConfigName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{ipConfigName}", url.PathEscape(ipConfigName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualHubIPConfigurationClient) getHandleResponse(resp *http.Response) (VirtualHubIPConfigurationClientGetResponse, error) { - result := VirtualHubIPConfigurationClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.HubIPConfiguration); err != nil { - return VirtualHubIPConfigurationClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Retrieves the details of all VirtualHubIpConfigurations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.List -// method. -func (client *VirtualHubIPConfigurationClient) NewListPager(resourceGroupName string, virtualHubName string, options *VirtualHubIPConfigurationClientListOptions) *runtime.Pager[VirtualHubIPConfigurationClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualHubIPConfigurationClientListResponse]{ - More: func(page VirtualHubIPConfigurationClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualHubIPConfigurationClientListResponse) (VirtualHubIPConfigurationClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualHubIPConfigurationClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualHubIPConfigurationClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubIPConfigurationClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualHubIPConfigurationClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubIPConfigurationClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualHubIPConfigurationClient) listHandleResponse(resp *http.Response) (VirtualHubIPConfigurationClientListResponse, error) { - result := VirtualHubIPConfigurationClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubIPConfigurationResults); err != nil { - return VirtualHubIPConfigurationClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubroutetablev2s_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubroutetablev2s_client.go deleted file mode 100644 index 7d160561..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubroutetablev2s_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualHubRouteTableV2SClient contains the methods for the VirtualHubRouteTableV2S group. -// Don't use this type directly, use NewVirtualHubRouteTableV2SClient() instead. -type VirtualHubRouteTableV2SClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualHubRouteTableV2SClient creates a new instance of VirtualHubRouteTableV2SClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualHubRouteTableV2SClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubRouteTableV2SClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualHubRouteTableV2SClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the VirtualHubRouteTableV2. -// virtualHubRouteTableV2Parameters - Parameters supplied to create or update VirtualHubRouteTableV2. -// options - VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginCreateOrUpdate -// method. -func (client *VirtualHubRouteTableV2SClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2, options *VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubRouteTableV2SClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubRouteTableV2SClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubRouteTableV2SClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubRouteTableV2SClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2, options *VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualHubRouteTableV2SClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2, options *VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, virtualHubRouteTableV2Parameters) -} - -// BeginDelete - Deletes a VirtualHubRouteTableV2. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHubRouteTableV2. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the VirtualHubRouteTableV2. -// options - VirtualHubRouteTableV2SClientBeginDeleteOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginDelete -// method. -func (client *VirtualHubRouteTableV2SClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientBeginDeleteOptions) (*runtime.Poller[VirtualHubRouteTableV2SClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeTableName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubRouteTableV2SClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubRouteTableV2SClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a VirtualHubRouteTableV2. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubRouteTableV2SClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualHubRouteTableV2SClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a VirtualHubRouteTableV2. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHubRouteTableV2. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the VirtualHubRouteTableV2. -// options - VirtualHubRouteTableV2SClientGetOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.Get -// method. -func (client *VirtualHubRouteTableV2SClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientGetOptions) (VirtualHubRouteTableV2SClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) - if err != nil { - return VirtualHubRouteTableV2SClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualHubRouteTableV2SClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubRouteTableV2SClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualHubRouteTableV2SClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - if routeTableName == "" { - return nil, errors.New("parameter routeTableName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{routeTableName}", url.PathEscape(routeTableName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualHubRouteTableV2SClient) getHandleResponse(resp *http.Response) (VirtualHubRouteTableV2SClientGetResponse, error) { - result := VirtualHubRouteTableV2SClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualHubRouteTableV2); err != nil { - return VirtualHubRouteTableV2SClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Retrieves the details of all VirtualHubRouteTableV2s. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.List -// method. -func (client *VirtualHubRouteTableV2SClient) NewListPager(resourceGroupName string, virtualHubName string, options *VirtualHubRouteTableV2SClientListOptions) *runtime.Pager[VirtualHubRouteTableV2SClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualHubRouteTableV2SClientListResponse]{ - More: func(page VirtualHubRouteTableV2SClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualHubRouteTableV2SClientListResponse) (VirtualHubRouteTableV2SClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualHubRouteTableV2SClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualHubRouteTableV2SClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubRouteTableV2SClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualHubRouteTableV2SClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubRouteTableV2SClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualHubRouteTableV2SClient) listHandleResponse(resp *http.Response) (VirtualHubRouteTableV2SClientListResponse, error) { - result := VirtualHubRouteTableV2SClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubRouteTableV2SResult); err != nil { - return VirtualHubRouteTableV2SClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubs_client.go deleted file mode 100644 index 58b6b7d4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualhubs_client.go +++ /dev/null @@ -1,494 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualHubsClient contains the methods for the VirtualHubs group. -// Don't use this type directly, use NewVirtualHubsClient() instead. -type VirtualHubsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualHubsClient creates a new instance of VirtualHubsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualHubsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// virtualHubParameters - Parameters supplied to create or update VirtualHub. -// options - VirtualHubsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubsClient.BeginCreateOrUpdate -// method. -func (client *VirtualHubsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub, options *VirtualHubsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub, options *VirtualHubsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualHubsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub, options *VirtualHubsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, virtualHubParameters) -} - -// BeginDelete - Deletes a VirtualHub. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubsClientBeginDeleteOptions contains the optional parameters for the VirtualHubsClient.BeginDelete method. -func (client *VirtualHubsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginDeleteOptions) (*runtime.Poller[VirtualHubsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a VirtualHub. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualHubsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a VirtualHub. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubsClientGetOptions contains the optional parameters for the VirtualHubsClient.Get method. -func (client *VirtualHubsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientGetOptions) (VirtualHubsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, options) - if err != nil { - return VirtualHubsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualHubsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualHubsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualHubsClient) getHandleResponse(resp *http.Response) (VirtualHubsClientGetResponse, error) { - result := VirtualHubsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualHub); err != nil { - return VirtualHubsClientGetResponse{}, err - } - return result, nil -} - -// BeginGetEffectiveVirtualHubRoutes - Gets the effective routes configured for the Virtual Hub resource or the specified -// resource . -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes -// method. -func (client *VirtualHubsClient) BeginGetEffectiveVirtualHubRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions) (*runtime.Poller[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getEffectiveVirtualHubRoutes(ctx, resourceGroupName, virtualHubName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetEffectiveVirtualHubRoutes - Gets the effective routes configured for the Virtual Hub resource or the specified resource -// . -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualHubsClient) getEffectiveVirtualHubRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions) (*http.Response, error) { - req, err := client.getEffectiveVirtualHubRoutesCreateRequest(ctx, resourceGroupName, virtualHubName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getEffectiveVirtualHubRoutesCreateRequest creates the GetEffectiveVirtualHubRoutes request. -func (client *VirtualHubsClient) getEffectiveVirtualHubRoutesCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.EffectiveRoutesParameters != nil { - return req, runtime.MarshalAsJSON(req, *options.EffectiveRoutesParameters) - } - return req, nil -} - -// NewListPager - Lists all the VirtualHubs in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.List method. -func (client *VirtualHubsClient) NewListPager(options *VirtualHubsClientListOptions) *runtime.Pager[VirtualHubsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualHubsClientListResponse]{ - More: func(page VirtualHubsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualHubsClientListResponse) (VirtualHubsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualHubsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualHubsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualHubsClient) listCreateRequest(ctx context.Context, options *VirtualHubsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualHubsClient) listHandleResponse(resp *http.Response) (VirtualHubsClientListResponse, error) { - result := VirtualHubsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubsResult); err != nil { - return VirtualHubsClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all the VirtualHubs in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// options - VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.ListByResourceGroup -// method. -func (client *VirtualHubsClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualHubsClientListByResourceGroupOptions) *runtime.Pager[VirtualHubsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualHubsClientListByResourceGroupResponse]{ - More: func(page VirtualHubsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualHubsClientListByResourceGroupResponse) (VirtualHubsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualHubsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualHubsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *VirtualHubsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualHubsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *VirtualHubsClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualHubsClientListByResourceGroupResponse, error) { - result := VirtualHubsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubsResult); err != nil { - return VirtualHubsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates VirtualHub tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// virtualHubParameters - Parameters supplied to update VirtualHub tags. -// options - VirtualHubsClientUpdateTagsOptions contains the optional parameters for the VirtualHubsClient.UpdateTags method. -func (client *VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject, options *VirtualHubsClientUpdateTagsOptions) (VirtualHubsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) - if err != nil { - return VirtualHubsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualHubsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualHubsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *VirtualHubsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject, options *VirtualHubsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualHubName == "" { - return nil, errors.New("parameter virtualHubName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualHubName}", url.PathEscape(virtualHubName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, virtualHubParameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *VirtualHubsClient) updateTagsHandleResponse(resp *http.Response) (VirtualHubsClientUpdateTagsResponse, error) { - result := VirtualHubsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualHub); err != nil { - return VirtualHubsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewayconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewayconnections_client.go deleted file mode 100644 index 905f01bf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewayconnections_client.go +++ /dev/null @@ -1,841 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualNetworkGatewayConnectionsClient contains the methods for the VirtualNetworkGatewayConnections group. -// Don't use this type directly, use NewVirtualNetworkGatewayConnectionsClient() instead. -type VirtualNetworkGatewayConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualNetworkGatewayConnectionsClient creates a new instance of VirtualNetworkGatewayConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewayConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualNetworkGatewayConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a virtual network gateway connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. -// parameters - Parameters supplied to the create or update virtual network gateway connection operation. -// options - VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate -// method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, options *VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a virtual network gateway connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, options *VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualNetworkGatewayConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, options *VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified virtual network Gateway connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. -// options - VirtualNetworkGatewayConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginDelete -// method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified virtual network Gateway connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualNetworkGatewayConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified virtual network gateway connection by resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. -// options - VirtualNetworkGatewayConnectionsClientGetOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.Get -// method. -func (client *VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientGetOptions) (VirtualNetworkGatewayConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkGatewayConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewayConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualNetworkGatewayConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualNetworkGatewayConnectionsClient) getHandleResponse(resp *http.Response) (VirtualNetworkGatewayConnectionsClientGetResponse, error) { - result := VirtualNetworkGatewayConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayConnection); err != nil { - return VirtualNetworkGatewayConnectionsClientGetResponse{}, err - } - return result, nil -} - -// BeginGetIkeSas - Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. -// options - VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas -// method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginGetIkeSas(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getIkeSas(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetIkeSas - Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayConnectionsClient) getIkeSas(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions) (*http.Response, error) { - req, err := client.getIkeSasCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getIkeSasCreateRequest creates the GetIkeSas request. -func (client *VirtualNetworkGatewayConnectionsClient) getIkeSasCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// GetSharedKey - The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual -// network gateway connection shared key through Network resource provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The virtual network gateway connection shared key name. -// options - VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.GetSharedKey -// method. -func (client *VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions) (VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse, error) { - req, err := client.getSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{}, runtime.NewResponseError(resp) - } - return client.getSharedKeyHandleResponse(resp) -} - -// getSharedKeyCreateRequest creates the GetSharedKey request. -func (client *VirtualNetworkGatewayConnectionsClient) getSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSharedKeyHandleResponse handles the GetSharedKey response. -func (client *VirtualNetworkGatewayConnectionsClient) getSharedKeyHandleResponse(resp *http.Response) (VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse, error) { - result := VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionSharedKey); err != nil { - return VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{}, err - } - return result, nil -} - -// NewListPager - The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections -// created. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.List -// method. -func (client *VirtualNetworkGatewayConnectionsClient) NewListPager(resourceGroupName string, options *VirtualNetworkGatewayConnectionsClientListOptions) *runtime.Pager[VirtualNetworkGatewayConnectionsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewayConnectionsClientListResponse]{ - More: func(page VirtualNetworkGatewayConnectionsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualNetworkGatewayConnectionsClientListResponse) (VirtualNetworkGatewayConnectionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkGatewayConnectionsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkGatewayConnectionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewayConnectionsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualNetworkGatewayConnectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualNetworkGatewayConnectionsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualNetworkGatewayConnectionsClient) listHandleResponse(resp *http.Response) (VirtualNetworkGatewayConnectionsClientListResponse, error) { - result := VirtualNetworkGatewayConnectionsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayConnectionListResult); err != nil { - return VirtualNetworkGatewayConnectionsClientListResponse{}, err - } - return result, nil -} - -// BeginResetConnection - Resets the virtual network gateway connection specified. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. -// options - VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetConnection -// method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginResetConnection(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientResetConnectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resetConnection(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientResetConnectionResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientResetConnectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// ResetConnection - Resets the virtual network gateway connection specified. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayConnectionsClient) resetConnection(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions) (*http.Response, error) { - req, err := client.resetConnectionCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resetConnectionCreateRequest creates the ResetConnection request. -func (client *VirtualNetworkGatewayConnectionsClient) resetConnectionCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginResetSharedKey - The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection -// shared key for passed virtual network gateway connection in the specified resource group -// through Network resource provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The virtual network gateway connection reset shared key Name. -// parameters - Parameters supplied to the begin reset virtual network gateway connection shared key operation through network -// resource provider. -// options - VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey -// method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resetSharedKey(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse](options.ResumeToken, client.pl, nil) - } -} - -// ResetSharedKey - The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection -// shared key for passed virtual network gateway connection in the specified resource group -// through Network resource provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayConnectionsClient) resetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions) (*http.Response, error) { - req, err := client.resetSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resetSharedKeyCreateRequest creates the ResetSharedKey request. -func (client *VirtualNetworkGatewayConnectionsClient) resetSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginSetSharedKey - The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection -// shared key for passed virtual network gateway connection in the specified resource group through -// Network resource provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The virtual network gateway connection name. -// parameters - Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork -// resource provider. -// options - VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey -// method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginSetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.setSharedKey(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse](options.ResumeToken, client.pl, nil) - } -} - -// SetSharedKey - The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared -// key for passed virtual network gateway connection in the specified resource group through -// Network resource provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayConnectionsClient) setSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions) (*http.Response, error) { - req, err := client.setSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// setSharedKeyCreateRequest creates the SetSharedKey request. -func (client *VirtualNetworkGatewayConnectionsClient) setSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginStartPacketCapture - Starts packet capture on virtual network gateway connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. -// options - VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the -// VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.startPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse](options.ResumeToken, client.pl, nil) - } -} - -// StartPacketCapture - Starts packet capture on virtual network gateway connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayConnectionsClient) startPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions) (*http.Response, error) { - req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startPacketCaptureCreateRequest creates the StartPacketCapture request. -func (client *VirtualNetworkGatewayConnectionsClient) startPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) - } - return req, nil -} - -// BeginStopPacketCapture - Stops packet capture on virtual network gateway connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. -// parameters - Virtual network gateway packet capture parameters supplied to stop packet capture on gateway connection. -// options - VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the -// VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stopPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse](options.ResumeToken, client.pl, nil) - } -} - -// StopPacketCapture - Stops packet capture on virtual network gateway connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayConnectionsClient) stopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions) (*http.Response, error) { - req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopPacketCaptureCreateRequest creates the StopPacketCapture request. -func (client *VirtualNetworkGatewayConnectionsClient) stopPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginUpdateTags - Updates a virtual network gateway connection tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. -// parameters - Parameters supplied to update virtual network gateway connection tags. -// options - VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginUpdateTags -// method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject, options *VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updateTags(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdateTags - Updates a virtual network gateway connection tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayConnectionsClient) updateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject, options *VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions) (*http.Response, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *VirtualNetworkGatewayConnectionsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject, options *VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewaynatrules_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewaynatrules_client.go deleted file mode 100644 index dfc2aaab..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewaynatrules_client.go +++ /dev/null @@ -1,332 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualNetworkGatewayNatRulesClient contains the methods for the VirtualNetworkGatewayNatRules group. -// Don't use this type directly, use NewVirtualNetworkGatewayNatRulesClient() instead. -type VirtualNetworkGatewayNatRulesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualNetworkGatewayNatRulesClient creates a new instance of VirtualNetworkGatewayNatRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualNetworkGatewayNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewayNatRulesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualNetworkGatewayNatRulesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing -// nat rules. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the Virtual Network Gateway. -// virtualNetworkGatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// natRuleParameters - Parameters supplied to create or Update a Nat Rule. -// options - VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate -// method. -func (client *VirtualNetworkGatewayNatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule, options *VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing -// nat rules. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayNatRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule, options *VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualNetworkGatewayNatRulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule, options *VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if natRuleName == "" { - return nil, errors.New("parameter natRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, natRuleParameters) -} - -// BeginDelete - Deletes a nat rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the Virtual Network Gateway. -// virtualNetworkGatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// options - VirtualNetworkGatewayNatRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginDelete -// method. -func (client *VirtualNetworkGatewayNatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkGatewayNatRulesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewayNatRulesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewayNatRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a nat rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewayNatRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualNetworkGatewayNatRulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if natRuleName == "" { - return nil, errors.New("parameter natRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a nat rule. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the Virtual Network Gateway. -// virtualNetworkGatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// options - VirtualNetworkGatewayNatRulesClientGetOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.Get -// method. -func (client *VirtualNetworkGatewayNatRulesClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientGetOptions) (VirtualNetworkGatewayNatRulesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) - if err != nil { - return VirtualNetworkGatewayNatRulesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkGatewayNatRulesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewayNatRulesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualNetworkGatewayNatRulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if natRuleName == "" { - return nil, errors.New("parameter natRuleName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{natRuleName}", url.PathEscape(natRuleName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualNetworkGatewayNatRulesClient) getHandleResponse(resp *http.Response) (VirtualNetworkGatewayNatRulesClientGetResponse, error) { - result := VirtualNetworkGatewayNatRulesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayNatRule); err != nil { - return VirtualNetworkGatewayNatRulesClientGetResponse{}, err - } - return result, nil -} - -// NewListByVirtualNetworkGatewayPager - Retrieves all nat rules for a particular virtual network gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the virtual network gateway. -// virtualNetworkGatewayName - The name of the gateway. -// options - VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the -// VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway method. -func (client *VirtualNetworkGatewayNatRulesClient) NewListByVirtualNetworkGatewayPager(resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions) *runtime.Pager[VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse]{ - More: func(page VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse) (VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVirtualNetworkGatewayCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, runtime.NewResponseError(resp) - } - return client.listByVirtualNetworkGatewayHandleResponse(resp) - }, - }) -} - -// listByVirtualNetworkGatewayCreateRequest creates the ListByVirtualNetworkGateway request. -func (client *VirtualNetworkGatewayNatRulesClient) listByVirtualNetworkGatewayCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByVirtualNetworkGatewayHandleResponse handles the ListByVirtualNetworkGateway response. -func (client *VirtualNetworkGatewayNatRulesClient) listByVirtualNetworkGatewayHandleResponse(resp *http.Response) (VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse, error) { - result := VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualNetworkGatewayNatRulesResult); err != nil { - return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkgateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkgateways_client.go deleted file mode 100644 index 6151cdd7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkgateways_client.go +++ /dev/null @@ -1,1510 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualNetworkGatewaysClient contains the methods for the VirtualNetworkGateways group. -// Don't use this type directly, use NewVirtualNetworkGatewaysClient() instead. -type VirtualNetworkGatewaysClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualNetworkGatewaysClient creates a new instance of VirtualNetworkGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewaysClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualNetworkGatewaysClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a virtual network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// parameters - Parameters supplied to create or update virtual network gateway operation. -// options - VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginCreateOrUpdate -// method. -func (client *VirtualNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, options *VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkGatewaysClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a virtual network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, options *VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualNetworkGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, options *VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified virtual network gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginDelete -// method. -func (client *VirtualNetworkGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkGatewaysClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified virtual network gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualNetworkGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDisconnectVirtualNetworkGatewayVPNConnections - Disconnect vpn connections of virtual network gateway in the specified -// resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// request - The parameters are supplied to disconnect vpn connections. -// options - VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions contains the optional parameters -// for the VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections method. -func (client *VirtualNetworkGatewaysClient) BeginDisconnectVirtualNetworkGatewayVPNConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVPNConnectionRequest, options *VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions) (*runtime.Poller[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.disconnectVirtualNetworkGatewayVPNConnections(ctx, resourceGroupName, virtualNetworkGatewayName, request, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse](options.ResumeToken, client.pl, nil) - } -} - -// DisconnectVirtualNetworkGatewayVPNConnections - Disconnect vpn connections of virtual network gateway in the specified -// resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) disconnectVirtualNetworkGatewayVPNConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVPNConnectionRequest, options *VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions) (*http.Response, error) { - req, err := client.disconnectVirtualNetworkGatewayVPNConnectionsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, request, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// disconnectVirtualNetworkGatewayVPNConnectionsCreateRequest creates the DisconnectVirtualNetworkGatewayVPNConnections request. -func (client *VirtualNetworkGatewaysClient) disconnectVirtualNetworkGatewayVPNConnectionsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVPNConnectionRequest, options *VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// BeginGenerateVPNProfile - Generates VPN profile for P2S client of the virtual network gateway in the specified resource -// group. Used for IKEV2 and radius based authentication. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// parameters - Parameters supplied to the generate virtual network gateway VPN client package operation. -// options - VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGenerateVPNProfile -// method. -func (client *VirtualNetworkGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGenerateVPNProfileResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.generateVPNProfile(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGenerateVPNProfileResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGenerateVPNProfileResponse](options.ResumeToken, client.pl, nil) - } -} - -// GenerateVPNProfile - Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. -// Used for IKEV2 and radius based authentication. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) generateVPNProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions) (*http.Response, error) { - req, err := client.generateVPNProfileCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// generateVPNProfileCreateRequest creates the GenerateVPNProfile request. -func (client *VirtualNetworkGatewaysClient) generateVPNProfileCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginGeneratevpnclientpackage - Generates VPN client package for P2S client of the virtual network gateway in the specified -// resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// parameters - Parameters supplied to the generate virtual network gateway VPN client package operation. -// options - VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage -// method. -func (client *VirtualNetworkGatewaysClient) BeginGeneratevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.generatevpnclientpackage(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse](options.ResumeToken, client.pl, nil) - } -} - -// Generatevpnclientpackage - Generates VPN client package for P2S client of the virtual network gateway in the specified -// resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions) (*http.Response, error) { - req, err := client.generatevpnclientpackageCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// generatevpnclientpackageCreateRequest creates the Generatevpnclientpackage request. -func (client *VirtualNetworkGatewaysClient) generatevpnclientpackageCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// Get - Gets the specified virtual network gateway by resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientGetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.Get -// method. -func (client *VirtualNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientGetOptions) (VirtualNetworkGatewaysClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkGatewaysClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewaysClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualNetworkGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualNetworkGatewaysClient) getHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientGetResponse, error) { - result := VirtualNetworkGatewaysClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGateway); err != nil { - return VirtualNetworkGatewaysClientGetResponse{}, err - } - return result, nil -} - -// BeginGetAdvertisedRoutes - This operation retrieves a list of routes the virtual network gateway is advertising to the -// specified peer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// peer - The IP address of the peer. -// options - VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes -// method. -func (client *VirtualNetworkGatewaysClient) BeginGetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string, options *VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getAdvertisedRoutes(ctx, resourceGroupName, virtualNetworkGatewayName, peer, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetAdvertisedRoutes - This operation retrieves a list of routes the virtual network gateway is advertising to the specified -// peer. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) getAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string, options *VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions) (*http.Response, error) { - req, err := client.getAdvertisedRoutesCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, peer, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getAdvertisedRoutesCreateRequest creates the GetAdvertisedRoutes request. -func (client *VirtualNetworkGatewaysClient) getAdvertisedRoutesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string, options *VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("peer", peer) - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginGetBgpPeerStatus - The GetBgpPeerStatus operation retrieves the status of all BGP peers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus -// method. -func (client *VirtualNetworkGatewaysClient) BeginGetBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getBgpPeerStatus(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetBgpPeerStatus - The GetBgpPeerStatus operation retrieves the status of all BGP peers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) getBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions) (*http.Response, error) { - req, err := client.getBgpPeerStatusCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getBgpPeerStatusCreateRequest creates the GetBgpPeerStatus request. -func (client *VirtualNetworkGatewaysClient) getBgpPeerStatusCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.Peer != nil { - reqQP.Set("peer", *options.Peer) - } - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginGetLearnedRoutes - This operation retrieves a list of routes the virtual network gateway has learned, including routes -// learned from BGP peers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetLearnedRoutes -// method. -func (client *VirtualNetworkGatewaysClient) BeginGetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetLearnedRoutesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getLearnedRoutes(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetLearnedRoutesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetLearnedRoutesResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetLearnedRoutes - This operation retrieves a list of routes the virtual network gateway has learned, including routes -// learned from BGP peers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) getLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions) (*http.Response, error) { - req, err := client.getLearnedRoutesCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getLearnedRoutesCreateRequest creates the GetLearnedRoutes request. -func (client *VirtualNetworkGatewaysClient) getLearnedRoutesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginGetVPNProfilePackageURL - Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified -// resource group. The profile needs to be generated first using generateVpnProfile. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL -// method. -func (client *VirtualNetworkGatewaysClient) BeginGetVPNProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getVPNProfilePackageURL(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetVPNProfilePackageURL - Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified -// resource group. The profile needs to be generated first using generateVpnProfile. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) getVPNProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions) (*http.Response, error) { - req, err := client.getVPNProfilePackageURLCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getVPNProfilePackageURLCreateRequest creates the GetVPNProfilePackageURL request. -func (client *VirtualNetworkGatewaysClient) getVPNProfilePackageURLCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginGetVpnclientConnectionHealth - Get VPN client connection health detail per P2S client connection of the virtual network -// gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the -// VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth method. -func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getVpnclientConnectionHealth(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetVpnclientConnectionHealth - Get VPN client connection health detail per P2S client connection of the virtual network -// gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) getVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions) (*http.Response, error) { - req, err := client.getVpnclientConnectionHealthCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getVpnclientConnectionHealthCreateRequest creates the GetVpnclientConnectionHealth request. -func (client *VirtualNetworkGatewaysClient) getVpnclientConnectionHealthCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginGetVpnclientIPSecParameters - The Get VpnclientIpsecParameters operation retrieves information about the vpnclient -// ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource -// provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The virtual network gateway name. -// options - VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the -// VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters method. -func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getVpnclientIPSecParameters(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetVpnclientIPSecParameters - The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec -// policy for P2S client of virtual network gateway in the specified resource group through Network resource -// provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) getVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions) (*http.Response, error) { - req, err := client.getVpnclientIPSecParametersCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getVpnclientIPSecParametersCreateRequest creates the GetVpnclientIPSecParameters request. -func (client *VirtualNetworkGatewaysClient) getVpnclientIPSecParametersCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// NewListPager - Gets all virtual network gateways by resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.List -// method. -func (client *VirtualNetworkGatewaysClient) NewListPager(resourceGroupName string, options *VirtualNetworkGatewaysClientListOptions) *runtime.Pager[VirtualNetworkGatewaysClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewaysClientListResponse]{ - More: func(page VirtualNetworkGatewaysClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualNetworkGatewaysClientListResponse) (VirtualNetworkGatewaysClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkGatewaysClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkGatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualNetworkGatewaysClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualNetworkGatewaysClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualNetworkGatewaysClient) listHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientListResponse, error) { - result := VirtualNetworkGatewaysClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayListResult); err != nil { - return VirtualNetworkGatewaysClientListResponse{}, err - } - return result, nil -} - -// NewListConnectionsPager - Gets all the connections in a virtual network gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.ListConnections -// method. -func (client *VirtualNetworkGatewaysClient) NewListConnectionsPager(resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientListConnectionsOptions) *runtime.Pager[VirtualNetworkGatewaysClientListConnectionsResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewaysClientListConnectionsResponse]{ - More: func(page VirtualNetworkGatewaysClientListConnectionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualNetworkGatewaysClientListConnectionsResponse) (VirtualNetworkGatewaysClientListConnectionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listConnectionsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkGatewaysClientListConnectionsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkGatewaysClientListConnectionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewaysClientListConnectionsResponse{}, runtime.NewResponseError(resp) - } - return client.listConnectionsHandleResponse(resp) - }, - }) -} - -// listConnectionsCreateRequest creates the ListConnections request. -func (client *VirtualNetworkGatewaysClient) listConnectionsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientListConnectionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listConnectionsHandleResponse handles the ListConnections response. -func (client *VirtualNetworkGatewaysClient) listConnectionsHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientListConnectionsResponse, error) { - result := VirtualNetworkGatewaysClientListConnectionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayListConnectionsResult); err != nil { - return VirtualNetworkGatewaysClientListConnectionsResponse{}, err - } - return result, nil -} - -// BeginReset - Resets the primary of the virtual network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginResetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginReset -// method. -func (client *VirtualNetworkGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetOptions) (*runtime.Poller[VirtualNetworkGatewaysClientResetResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.reset(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientResetResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientResetResponse](options.ResumeToken, client.pl, nil) - } -} - -// Reset - Resets the primary of the virtual network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetOptions) (*http.Response, error) { - req, err := client.resetCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resetCreateRequest creates the Reset request. -func (client *VirtualNetworkGatewaysClient) resetCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.GatewayVip != nil { - reqQP.Set("gatewayVip", *options.GatewayVip) - } - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginResetVPNClientSharedKey - Resets the VPN client shared key of the virtual network gateway in the specified resource -// group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey -// method. -func (client *VirtualNetworkGatewaysClient) BeginResetVPNClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions) (*runtime.Poller[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resetVPNClientSharedKey(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse](options.ResumeToken, client.pl, nil) - } -} - -// ResetVPNClientSharedKey - Resets the VPN client shared key of the virtual network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) resetVPNClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions) (*http.Response, error) { - req, err := client.resetVPNClientSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resetVPNClientSharedKeyCreateRequest creates the ResetVPNClientSharedKey request. -func (client *VirtualNetworkGatewaysClient) resetVPNClientSharedKeyCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginSetVpnclientIPSecParameters - The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client -// of virtual network gateway in the specified resource group through Network resource provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// vpnclientIPSecParams - Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client -// operation through Network resource provider. -// options - VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions contains the optional parameters for the -// VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters method. -func (client *VirtualNetworkGatewaysClient) BeginSetVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIPSecParams VPNClientIPsecParameters, options *VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions) (*runtime.Poller[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.setVpnclientIPSecParameters(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIPSecParams, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse](options.ResumeToken, client.pl, nil) - } -} - -// SetVpnclientIPSecParameters - The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client -// of virtual network gateway in the specified resource group through Network resource provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) setVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIPSecParams VPNClientIPsecParameters, options *VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions) (*http.Response, error) { - req, err := client.setVpnclientIPSecParametersCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIPSecParams, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// setVpnclientIPSecParametersCreateRequest creates the SetVpnclientIPSecParameters request. -func (client *VirtualNetworkGatewaysClient) setVpnclientIPSecParametersCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIPSecParams VPNClientIPsecParameters, options *VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vpnclientIPSecParams) -} - -// BeginStartPacketCapture - Starts packet capture on virtual network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStartPacketCapture -// method. -func (client *VirtualNetworkGatewaysClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewaysClientStartPacketCaptureResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.startPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientStartPacketCaptureResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientStartPacketCaptureResponse](options.ResumeToken, client.pl, nil) - } -} - -// StartPacketCapture - Starts packet capture on virtual network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) startPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions) (*http.Response, error) { - req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startPacketCaptureCreateRequest creates the StartPacketCapture request. -func (client *VirtualNetworkGatewaysClient) startPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) - } - return req, nil -} - -// BeginStopPacketCapture - Stops packet capture on virtual network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// parameters - Virtual network gateway packet capture parameters supplied to stop packet capture on gateway. -// options - VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStopPacketCapture -// method. -func (client *VirtualNetworkGatewaysClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewaysClientStopPacketCaptureResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stopPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientStopPacketCaptureResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientStopPacketCaptureResponse](options.ResumeToken, client.pl, nil) - } -} - -// StopPacketCapture - Stops packet capture on virtual network gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) stopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions) (*http.Response, error) { - req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopPacketCaptureCreateRequest creates the StopPacketCapture request. -func (client *VirtualNetworkGatewaysClient) stopPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// SupportedVPNDevices - Gets a xml format representation for supported vpn devices. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientSupportedVPNDevicesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.SupportedVPNDevices -// method. -func (client *VirtualNetworkGatewaysClient) SupportedVPNDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientSupportedVPNDevicesOptions) (VirtualNetworkGatewaysClientSupportedVPNDevicesResponse, error) { - req, err := client.supportedVPNDevicesCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{}, runtime.NewResponseError(resp) - } - return client.supportedVPNDevicesHandleResponse(resp) -} - -// supportedVPNDevicesCreateRequest creates the SupportedVPNDevices request. -func (client *VirtualNetworkGatewaysClient) supportedVPNDevicesCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientSupportedVPNDevicesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// supportedVPNDevicesHandleResponse handles the SupportedVPNDevices response. -func (client *VirtualNetworkGatewaysClient) supportedVPNDevicesHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientSupportedVPNDevicesResponse, error) { - result := VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { - return VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{}, err - } - return result, nil -} - -// BeginUpdateTags - Updates a virtual network gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// parameters - Parameters supplied to update virtual network gateway tags. -// options - VirtualNetworkGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginUpdateTags -// method. -func (client *VirtualNetworkGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject, options *VirtualNetworkGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[VirtualNetworkGatewaysClientUpdateTagsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updateTags(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkGatewaysClientUpdateTagsResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdateTags - Updates a virtual network gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject, options *VirtualNetworkGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *VirtualNetworkGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject, options *VirtualNetworkGatewaysClientBeginUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayName == "" { - return nil, errors.New("parameter virtualNetworkGatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayName}", url.PathEscape(virtualNetworkGatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// VPNDeviceConfigurationScript - Gets a xml format representation for vpn device configuration script. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection for which the configuration script -// is generated. -// parameters - Parameters supplied to the generate vpn device script operation. -// options - VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions contains the optional parameters for the VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript -// method. -func (client *VirtualNetworkGatewaysClient) VPNDeviceConfigurationScript(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNDeviceScriptParameters, options *VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions) (VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse, error) { - req, err := client.vpnDeviceConfigurationScriptCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{}, runtime.NewResponseError(resp) - } - return client.vpnDeviceConfigurationScriptHandleResponse(resp) -} - -// vpnDeviceConfigurationScriptCreateRequest creates the VPNDeviceConfigurationScript request. -func (client *VirtualNetworkGatewaysClient) vpnDeviceConfigurationScriptCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNDeviceScriptParameters, options *VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkGatewayConnectionName == "" { - return nil, errors.New("parameter virtualNetworkGatewayConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkGatewayConnectionName}", url.PathEscape(virtualNetworkGatewayConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// vpnDeviceConfigurationScriptHandleResponse handles the VPNDeviceConfigurationScript response. -func (client *VirtualNetworkGatewaysClient) vpnDeviceConfigurationScriptHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse, error) { - result := VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { - return VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkpeerings_client.go deleted file mode 100644 index 07c38169..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworkpeerings_client.go +++ /dev/null @@ -1,333 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualNetworkPeeringsClient contains the methods for the VirtualNetworkPeerings group. -// Don't use this type directly, use NewVirtualNetworkPeeringsClient() instead. -type VirtualNetworkPeeringsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualNetworkPeeringsClient creates a new instance of VirtualNetworkPeeringsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualNetworkPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkPeeringsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualNetworkPeeringsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a peering in the specified virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// virtualNetworkPeeringName - The name of the peering. -// virtualNetworkPeeringParameters - Parameters supplied to the create or update virtual network peering operation. -// options - VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginCreateOrUpdate -// method. -func (client *VirtualNetworkPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkPeeringsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkPeeringsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a peering in the specified virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualNetworkPeeringsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if virtualNetworkPeeringName == "" { - return nil, errors.New("parameter virtualNetworkPeeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkPeeringName}", url.PathEscape(virtualNetworkPeeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - if options != nil && options.SyncRemoteAddressSpace != nil { - reqQP.Set("syncRemoteAddressSpace", string(*options.SyncRemoteAddressSpace)) - } - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, virtualNetworkPeeringParameters) -} - -// BeginDelete - Deletes the specified virtual network peering. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// virtualNetworkPeeringName - The name of the virtual network peering. -// options - VirtualNetworkPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginDelete -// method. -func (client *VirtualNetworkPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkPeeringsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkPeeringsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkPeeringsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified virtual network peering. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualNetworkPeeringsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if virtualNetworkPeeringName == "" { - return nil, errors.New("parameter virtualNetworkPeeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkPeeringName}", url.PathEscape(virtualNetworkPeeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified virtual network peering. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// virtualNetworkPeeringName - The name of the virtual network peering. -// options - VirtualNetworkPeeringsClientGetOptions contains the optional parameters for the VirtualNetworkPeeringsClient.Get -// method. -func (client *VirtualNetworkPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientGetOptions) (VirtualNetworkPeeringsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) - if err != nil { - return VirtualNetworkPeeringsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkPeeringsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkPeeringsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualNetworkPeeringsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if virtualNetworkPeeringName == "" { - return nil, errors.New("parameter virtualNetworkPeeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkPeeringName}", url.PathEscape(virtualNetworkPeeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualNetworkPeeringsClient) getHandleResponse(resp *http.Response) (VirtualNetworkPeeringsClientGetResponse, error) { - result := VirtualNetworkPeeringsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkPeering); err != nil { - return VirtualNetworkPeeringsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all virtual network peerings in a virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.List -// method. -func (client *VirtualNetworkPeeringsClient) NewListPager(resourceGroupName string, virtualNetworkName string, options *VirtualNetworkPeeringsClientListOptions) *runtime.Pager[VirtualNetworkPeeringsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualNetworkPeeringsClientListResponse]{ - More: func(page VirtualNetworkPeeringsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualNetworkPeeringsClientListResponse) (VirtualNetworkPeeringsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkPeeringsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkPeeringsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkPeeringsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualNetworkPeeringsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworkPeeringsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualNetworkPeeringsClient) listHandleResponse(resp *http.Response) (VirtualNetworkPeeringsClientListResponse, error) { - result := VirtualNetworkPeeringsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkPeeringListResult); err != nil { - return VirtualNetworkPeeringsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworks_client.go deleted file mode 100644 index 1a24f8e2..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworks_client.go +++ /dev/null @@ -1,557 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualNetworksClient contains the methods for the VirtualNetworks group. -// Don't use this type directly, use NewVirtualNetworksClient() instead. -type VirtualNetworksClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualNetworksClient creates a new instance of VirtualNetworksClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworksClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualNetworksClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CheckIPAddressAvailability - Checks whether a private IP address is available for use. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// ipAddress - The private IP address to be verified. -// options - VirtualNetworksClientCheckIPAddressAvailabilityOptions contains the optional parameters for the VirtualNetworksClient.CheckIPAddressAvailability -// method. -func (client *VirtualNetworksClient) CheckIPAddressAvailability(ctx context.Context, resourceGroupName string, virtualNetworkName string, ipAddress string, options *VirtualNetworksClientCheckIPAddressAvailabilityOptions) (VirtualNetworksClientCheckIPAddressAvailabilityResponse, error) { - req, err := client.checkIPAddressAvailabilityCreateRequest(ctx, resourceGroupName, virtualNetworkName, ipAddress, options) - if err != nil { - return VirtualNetworksClientCheckIPAddressAvailabilityResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworksClientCheckIPAddressAvailabilityResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientCheckIPAddressAvailabilityResponse{}, runtime.NewResponseError(resp) - } - return client.checkIPAddressAvailabilityHandleResponse(resp) -} - -// checkIPAddressAvailabilityCreateRequest creates the CheckIPAddressAvailability request. -func (client *VirtualNetworksClient) checkIPAddressAvailabilityCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, ipAddress string, options *VirtualNetworksClientCheckIPAddressAvailabilityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("ipAddress", ipAddress) - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// checkIPAddressAvailabilityHandleResponse handles the CheckIPAddressAvailability response. -func (client *VirtualNetworksClient) checkIPAddressAvailabilityHandleResponse(resp *http.Response) (VirtualNetworksClientCheckIPAddressAvailabilityResponse, error) { - result := VirtualNetworksClientCheckIPAddressAvailabilityResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IPAddressAvailabilityResult); err != nil { - return VirtualNetworksClientCheckIPAddressAvailabilityResponse{}, err - } - return result, nil -} - -// BeginCreateOrUpdate - Creates or updates a virtual network in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// parameters - Parameters supplied to the create or update virtual network operation. -// options - VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate -// method. -func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworksClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworksClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworksClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a virtual network in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualNetworksClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete -// method. -func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworksClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworksClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworksClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified virtual network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualNetworksClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified virtual network by resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. -func (client *VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientGetOptions) (VirtualNetworksClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) - if err != nil { - return VirtualNetworksClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworksClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualNetworksClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualNetworksClient) getHandleResponse(resp *http.Response) (VirtualNetworksClientGetResponse, error) { - result := VirtualNetworksClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetwork); err != nil { - return VirtualNetworksClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all virtual networks in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.List method. -func (client *VirtualNetworksClient) NewListPager(resourceGroupName string, options *VirtualNetworksClientListOptions) *runtime.Pager[VirtualNetworksClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListResponse]{ - More: func(page VirtualNetworksClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualNetworksClientListResponse) (VirtualNetworksClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworksClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworksClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualNetworksClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualNetworksClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualNetworksClient) listHandleResponse(resp *http.Response) (VirtualNetworksClientListResponse, error) { - result := VirtualNetworksClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkListResult); err != nil { - return VirtualNetworksClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all virtual networks in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.ListAll method. -func (client *VirtualNetworksClient) NewListAllPager(options *VirtualNetworksClientListAllOptions) *runtime.Pager[VirtualNetworksClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListAllResponse]{ - More: func(page VirtualNetworksClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualNetworksClientListAllResponse) (VirtualNetworksClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworksClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworksClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *VirtualNetworksClient) listAllCreateRequest(ctx context.Context, options *VirtualNetworksClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *VirtualNetworksClient) listAllHandleResponse(resp *http.Response) (VirtualNetworksClientListAllResponse, error) { - result := VirtualNetworksClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkListResult); err != nil { - return VirtualNetworksClientListAllResponse{}, err - } - return result, nil -} - -// NewListUsagePager - Lists usage stats. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.ListUsage -// method. -func (client *VirtualNetworksClient) NewListUsagePager(resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientListUsageOptions) *runtime.Pager[VirtualNetworksClientListUsageResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListUsageResponse]{ - More: func(page VirtualNetworksClientListUsageResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualNetworksClientListUsageResponse) (VirtualNetworksClientListUsageResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listUsageCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworksClientListUsageResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworksClientListUsageResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientListUsageResponse{}, runtime.NewResponseError(resp) - } - return client.listUsageHandleResponse(resp) - }, - }) -} - -// listUsageCreateRequest creates the ListUsage request. -func (client *VirtualNetworksClient) listUsageCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientListUsageOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listUsageHandleResponse handles the ListUsage response. -func (client *VirtualNetworksClient) listUsageHandleResponse(resp *http.Response) (VirtualNetworksClientListUsageResponse, error) { - result := VirtualNetworksClientListUsageResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkListUsageResult); err != nil { - return VirtualNetworksClientListUsageResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates a virtual network tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// parameters - Parameters supplied to update virtual network tags. -// options - VirtualNetworksClientUpdateTagsOptions contains the optional parameters for the VirtualNetworksClient.UpdateTags -// method. -func (client *VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject, options *VirtualNetworksClientUpdateTagsOptions) (VirtualNetworksClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) - if err != nil { - return VirtualNetworksClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworksClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworksClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *VirtualNetworksClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject, options *VirtualNetworksClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualNetworkName == "" { - return nil, errors.New("parameter virtualNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualNetworkName}", url.PathEscape(virtualNetworkName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *VirtualNetworksClient) updateTagsHandleResponse(resp *http.Response) (VirtualNetworksClientUpdateTagsResponse, error) { - result := VirtualNetworksClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetwork); err != nil { - return VirtualNetworksClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworktaps_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworktaps_client.go deleted file mode 100644 index 48f47abf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualnetworktaps_client.go +++ /dev/null @@ -1,427 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualNetworkTapsClient contains the methods for the VirtualNetworkTaps group. -// Don't use this type directly, use NewVirtualNetworkTapsClient() instead. -type VirtualNetworkTapsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualNetworkTapsClient creates a new instance of VirtualNetworkTapsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualNetworkTapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkTapsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualNetworkTapsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates a Virtual Network Tap. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// tapName - The name of the virtual network tap. -// parameters - Parameters supplied to the create or update virtual network tap operation. -// options - VirtualNetworkTapsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginCreateOrUpdate -// method. -func (client *VirtualNetworkTapsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap, options *VirtualNetworkTapsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkTapsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, tapName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkTapsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkTapsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates a Virtual Network Tap. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkTapsClient) createOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap, options *VirtualNetworkTapsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, tapName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualNetworkTapsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap, options *VirtualNetworkTapsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if tapName == "" { - return nil, errors.New("parameter tapName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{tapName}", url.PathEscape(tapName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified virtual network tap. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// tapName - The name of the virtual network tap. -// options - VirtualNetworkTapsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginDelete -// method. -func (client *VirtualNetworkTapsClient) BeginDelete(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkTapsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, tapName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualNetworkTapsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualNetworkTapsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified virtual network tap. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualNetworkTapsClient) deleteOperation(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, tapName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualNetworkTapsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if tapName == "" { - return nil, errors.New("parameter tapName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{tapName}", url.PathEscape(tapName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets information about the specified virtual network tap. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// tapName - The name of virtual network tap. -// options - VirtualNetworkTapsClientGetOptions contains the optional parameters for the VirtualNetworkTapsClient.Get method. -func (client *VirtualNetworkTapsClient) Get(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientGetOptions) (VirtualNetworkTapsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, tapName, options) - if err != nil { - return VirtualNetworkTapsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkTapsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkTapsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualNetworkTapsClient) getCreateRequest(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if tapName == "" { - return nil, errors.New("parameter tapName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{tapName}", url.PathEscape(tapName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualNetworkTapsClient) getHandleResponse(resp *http.Response) (VirtualNetworkTapsClientGetResponse, error) { - result := VirtualNetworkTapsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTap); err != nil { - return VirtualNetworkTapsClientGetResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the VirtualNetworkTaps in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.ListAll -// method. -func (client *VirtualNetworkTapsClient) NewListAllPager(options *VirtualNetworkTapsClientListAllOptions) *runtime.Pager[VirtualNetworkTapsClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualNetworkTapsClientListAllResponse]{ - More: func(page VirtualNetworkTapsClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualNetworkTapsClientListAllResponse) (VirtualNetworkTapsClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkTapsClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkTapsClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkTapsClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *VirtualNetworkTapsClient) listAllCreateRequest(ctx context.Context, options *VirtualNetworkTapsClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *VirtualNetworkTapsClient) listAllHandleResponse(resp *http.Response) (VirtualNetworkTapsClientListAllResponse, error) { - result := VirtualNetworkTapsClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTapListResult); err != nil { - return VirtualNetworkTapsClientListAllResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Gets all the VirtualNetworkTaps in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.ListByResourceGroup -// method. -func (client *VirtualNetworkTapsClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualNetworkTapsClientListByResourceGroupOptions) *runtime.Pager[VirtualNetworkTapsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualNetworkTapsClientListByResourceGroupResponse]{ - More: func(page VirtualNetworkTapsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualNetworkTapsClientListByResourceGroupResponse) (VirtualNetworkTapsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualNetworkTapsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkTapsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkTapsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *VirtualNetworkTapsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualNetworkTapsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *VirtualNetworkTapsClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualNetworkTapsClientListByResourceGroupResponse, error) { - result := VirtualNetworkTapsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTapListResult); err != nil { - return VirtualNetworkTapsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates an VirtualNetworkTap tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// tapName - The name of the tap. -// tapParameters - Parameters supplied to update VirtualNetworkTap tags. -// options - VirtualNetworkTapsClientUpdateTagsOptions contains the optional parameters for the VirtualNetworkTapsClient.UpdateTags -// method. -func (client *VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject, options *VirtualNetworkTapsClientUpdateTagsOptions) (VirtualNetworkTapsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, tapName, tapParameters, options) - if err != nil { - return VirtualNetworkTapsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualNetworkTapsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualNetworkTapsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *VirtualNetworkTapsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject, options *VirtualNetworkTapsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if tapName == "" { - return nil, errors.New("parameter tapName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{tapName}", url.PathEscape(tapName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, tapParameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *VirtualNetworkTapsClient) updateTagsHandleResponse(resp *http.Response) (VirtualNetworkTapsClientUpdateTagsResponse, error) { - result := VirtualNetworkTapsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTap); err != nil { - return VirtualNetworkTapsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualrouterpeerings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualrouterpeerings_client.go deleted file mode 100644 index ce4d8b06..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualrouterpeerings_client.go +++ /dev/null @@ -1,330 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualRouterPeeringsClient contains the methods for the VirtualRouterPeerings group. -// Don't use this type directly, use NewVirtualRouterPeeringsClient() instead. -type VirtualRouterPeeringsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualRouterPeeringsClient creates a new instance of VirtualRouterPeeringsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualRouterPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualRouterPeeringsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualRouterPeeringsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified Virtual Router Peering. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// peeringName - The name of the Virtual Router Peering. -// parameters - Parameters supplied to the create or update Virtual Router Peering operation. -// options - VirtualRouterPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginCreateOrUpdate -// method. -func (client *VirtualRouterPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering, options *VirtualRouterPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualRouterPeeringsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualRouterName, peeringName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualRouterPeeringsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualRouterPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified Virtual Router Peering. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualRouterPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering, options *VirtualRouterPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualRouterName, peeringName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualRouterPeeringsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering, options *VirtualRouterPeeringsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualRouterName == "" { - return nil, errors.New("parameter virtualRouterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified peering from a Virtual Router. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// peeringName - The name of the peering. -// options - VirtualRouterPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginDelete -// method. -func (client *VirtualRouterPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientBeginDeleteOptions) (*runtime.Poller[VirtualRouterPeeringsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualRouterName, peeringName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualRouterPeeringsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualRouterPeeringsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified peering from a Virtual Router. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualRouterPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualRouterName, peeringName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualRouterPeeringsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualRouterName == "" { - return nil, errors.New("parameter virtualRouterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Virtual Router Peering. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// peeringName - The name of the Virtual Router Peering. -// options - VirtualRouterPeeringsClientGetOptions contains the optional parameters for the VirtualRouterPeeringsClient.Get -// method. -func (client *VirtualRouterPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientGetOptions) (VirtualRouterPeeringsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualRouterName, peeringName, options) - if err != nil { - return VirtualRouterPeeringsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualRouterPeeringsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualRouterPeeringsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualRouterPeeringsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualRouterName == "" { - return nil, errors.New("parameter virtualRouterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) - if peeringName == "" { - return nil, errors.New("parameter peeringName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{peeringName}", url.PathEscape(peeringName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualRouterPeeringsClient) getHandleResponse(resp *http.Response) (VirtualRouterPeeringsClientGetResponse, error) { - result := VirtualRouterPeeringsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterPeering); err != nil { - return VirtualRouterPeeringsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all Virtual Router Peerings in a Virtual Router resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// options - VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.List -// method. -func (client *VirtualRouterPeeringsClient) NewListPager(resourceGroupName string, virtualRouterName string, options *VirtualRouterPeeringsClientListOptions) *runtime.Pager[VirtualRouterPeeringsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualRouterPeeringsClientListResponse]{ - More: func(page VirtualRouterPeeringsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualRouterPeeringsClientListResponse) (VirtualRouterPeeringsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, virtualRouterName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualRouterPeeringsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualRouterPeeringsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualRouterPeeringsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualRouterPeeringsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRouterPeeringsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualRouterName == "" { - return nil, errors.New("parameter virtualRouterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualRouterPeeringsClient) listHandleResponse(resp *http.Response) (VirtualRouterPeeringsClientListResponse, error) { - result := VirtualRouterPeeringsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterPeeringListResult); err != nil { - return VirtualRouterPeeringsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualrouters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualrouters_client.go deleted file mode 100644 index fd9765d7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualrouters_client.go +++ /dev/null @@ -1,371 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualRoutersClient contains the methods for the VirtualRouters group. -// Don't use this type directly, use NewVirtualRoutersClient() instead. -type VirtualRoutersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualRoutersClient creates a new instance of VirtualRoutersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualRoutersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualRoutersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualRoutersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the specified Virtual Router. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// parameters - Parameters supplied to the create or update Virtual Router. -// options - VirtualRoutersClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRoutersClient.BeginCreateOrUpdate -// method. -func (client *VirtualRoutersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter, options *VirtualRoutersClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualRoutersClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualRouterName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualRoutersClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualRoutersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates or updates the specified Virtual Router. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualRoutersClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter, options *VirtualRoutersClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualRouterName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualRoutersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter, options *VirtualRoutersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualRouterName == "" { - return nil, errors.New("parameter virtualRouterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginDelete - Deletes the specified Virtual Router. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// options - VirtualRoutersClientBeginDeleteOptions contains the optional parameters for the VirtualRoutersClient.BeginDelete -// method. -func (client *VirtualRoutersClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientBeginDeleteOptions) (*runtime.Poller[VirtualRoutersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualRouterName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualRoutersClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualRoutersClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified Virtual Router. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualRoutersClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualRouterName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualRoutersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualRouterName == "" { - return nil, errors.New("parameter virtualRouterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Virtual Router. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// options - VirtualRoutersClientGetOptions contains the optional parameters for the VirtualRoutersClient.Get method. -func (client *VirtualRoutersClient) Get(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientGetOptions) (VirtualRoutersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualRouterName, options) - if err != nil { - return VirtualRoutersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualRoutersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualRoutersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualRoutersClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualRouterName == "" { - return nil, errors.New("parameter virtualRouterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualRouterName}", url.PathEscape(virtualRouterName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualRoutersClient) getHandleResponse(resp *http.Response) (VirtualRoutersClientGetResponse, error) { - result := VirtualRoutersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouter); err != nil { - return VirtualRoutersClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets all the Virtual Routers in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.List method. -func (client *VirtualRoutersClient) NewListPager(options *VirtualRoutersClientListOptions) *runtime.Pager[VirtualRoutersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualRoutersClientListResponse]{ - More: func(page VirtualRoutersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualRoutersClientListResponse) (VirtualRoutersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualRoutersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualRoutersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualRoutersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualRoutersClient) listCreateRequest(ctx context.Context, options *VirtualRoutersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualRoutersClient) listHandleResponse(resp *http.Response) (VirtualRoutersClientListResponse, error) { - result := VirtualRoutersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterListResult); err != nil { - return VirtualRoutersClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all Virtual Routers in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.ListByResourceGroup -// method. -func (client *VirtualRoutersClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualRoutersClientListByResourceGroupOptions) *runtime.Pager[VirtualRoutersClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualRoutersClientListByResourceGroupResponse]{ - More: func(page VirtualRoutersClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualRoutersClientListByResourceGroupResponse) (VirtualRoutersClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualRoutersClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualRoutersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualRoutersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *VirtualRoutersClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualRoutersClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *VirtualRoutersClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualRoutersClientListByResourceGroupResponse, error) { - result := VirtualRoutersClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterListResult); err != nil { - return VirtualRoutersClientListByResourceGroupResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualwans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualwans_client.go deleted file mode 100644 index 5afdc12b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/virtualwans_client.go +++ /dev/null @@ -1,424 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VirtualWansClient contains the methods for the VirtualWans group. -// Don't use this type directly, use NewVirtualWansClient() instead. -type VirtualWansClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVirtualWansClient creates a new instance of VirtualWansClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVirtualWansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualWansClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VirtualWansClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualWan. -// virtualWANName - The name of the VirtualWAN being created or updated. -// wanParameters - Parameters supplied to create or update VirtualWAN. -// options - VirtualWansClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualWansClient.BeginCreateOrUpdate -// method. -func (client *VirtualWansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters VirtualWAN, options *VirtualWansClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualWansClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualWANName, wanParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualWansClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualWansClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualWansClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters VirtualWAN, options *VirtualWansClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualWANName, wanParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VirtualWansClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters VirtualWAN, options *VirtualWansClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualWANName == "" { - return nil, errors.New("parameter virtualWANName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{VirtualWANName}", url.PathEscape(virtualWANName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, wanParameters) -} - -// BeginDelete - Deletes a VirtualWAN. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualWan. -// virtualWANName - The name of the VirtualWAN being deleted. -// options - VirtualWansClientBeginDeleteOptions contains the optional parameters for the VirtualWansClient.BeginDelete method. -func (client *VirtualWansClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientBeginDeleteOptions) (*runtime.Poller[VirtualWansClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualWANName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VirtualWansClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VirtualWansClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a VirtualWAN. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VirtualWansClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualWANName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VirtualWansClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualWANName == "" { - return nil, errors.New("parameter virtualWANName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{VirtualWANName}", url.PathEscape(virtualWANName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a VirtualWAN. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualWan. -// virtualWANName - The name of the VirtualWAN being retrieved. -// options - VirtualWansClientGetOptions contains the optional parameters for the VirtualWansClient.Get method. -func (client *VirtualWansClient) Get(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientGetOptions) (VirtualWansClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, virtualWANName, options) - if err != nil { - return VirtualWansClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualWansClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualWansClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VirtualWansClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualWANName == "" { - return nil, errors.New("parameter virtualWANName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{VirtualWANName}", url.PathEscape(virtualWANName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VirtualWansClient) getHandleResponse(resp *http.Response) (VirtualWansClientGetResponse, error) { - result := VirtualWansClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualWAN); err != nil { - return VirtualWansClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all the VirtualWANs in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.List method. -func (client *VirtualWansClient) NewListPager(options *VirtualWansClientListOptions) *runtime.Pager[VirtualWansClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualWansClientListResponse]{ - More: func(page VirtualWansClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualWansClientListResponse) (VirtualWansClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualWansClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualWansClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualWansClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VirtualWansClient) listCreateRequest(ctx context.Context, options *VirtualWansClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VirtualWansClient) listHandleResponse(resp *http.Response) (VirtualWansClientListResponse, error) { - result := VirtualWansClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualWANsResult); err != nil { - return VirtualWansClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all the VirtualWANs in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualWan. -// options - VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.ListByResourceGroup -// method. -func (client *VirtualWansClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualWansClientListByResourceGroupOptions) *runtime.Pager[VirtualWansClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[VirtualWansClientListByResourceGroupResponse]{ - More: func(page VirtualWansClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VirtualWansClientListByResourceGroupResponse) (VirtualWansClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VirtualWansClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualWansClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualWansClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *VirtualWansClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualWansClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *VirtualWansClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualWansClientListByResourceGroupResponse, error) { - result := VirtualWansClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualWANsResult); err != nil { - return VirtualWansClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates a VirtualWAN tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VirtualWan. -// virtualWANName - The name of the VirtualWAN being updated. -// wanParameters - Parameters supplied to Update VirtualWAN tags. -// options - VirtualWansClientUpdateTagsOptions contains the optional parameters for the VirtualWansClient.UpdateTags method. -func (client *VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters TagsObject, options *VirtualWansClientUpdateTagsOptions) (VirtualWansClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualWANName, wanParameters, options) - if err != nil { - return VirtualWansClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VirtualWansClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VirtualWansClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *VirtualWansClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters TagsObject, options *VirtualWansClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualWANName == "" { - return nil, errors.New("parameter virtualWANName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{VirtualWANName}", url.PathEscape(virtualWANName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, wanParameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *VirtualWansClient) updateTagsHandleResponse(resp *http.Response) (VirtualWansClientUpdateTagsResponse, error) { - result := VirtualWansClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VirtualWAN); err != nil { - return VirtualWansClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnconnections_client.go deleted file mode 100644 index c11d4487..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnconnections_client.go +++ /dev/null @@ -1,476 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VPNConnectionsClient contains the methods for the VPNConnections group. -// Don't use this type directly, use NewVPNConnectionsClient() instead. -type VPNConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVPNConnectionsClient creates a new instance of VPNConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVPNConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VPNConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing -// connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// connectionName - The name of the connection. -// vpnConnectionParameters - Parameters supplied to create or Update a VPN Connection. -// options - VPNConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNConnectionsClient.BeginCreateOrUpdate -// method. -func (client *VPNConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VPNConnection, options *VPNConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNConnectionsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNConnectionsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VPNConnection, options *VPNConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VPNConnectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VPNConnection, options *VPNConnectionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vpnConnectionParameters) -} - -// BeginDelete - Deletes a vpn connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// connectionName - The name of the connection. -// options - VPNConnectionsClientBeginDeleteOptions contains the optional parameters for the VPNConnectionsClient.BeginDelete -// method. -func (client *VPNConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientBeginDeleteOptions) (*runtime.Poller[VPNConnectionsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, connectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNConnectionsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a vpn connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VPNConnectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a vpn connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// connectionName - The name of the vpn connection. -// options - VPNConnectionsClientGetOptions contains the optional parameters for the VPNConnectionsClient.Get method. -func (client *VPNConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientGetOptions) (VPNConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) - if err != nil { - return VPNConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VPNConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VPNConnectionsClient) getHandleResponse(resp *http.Response) (VPNConnectionsClientGetResponse, error) { - result := VPNConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VPNConnection); err != nil { - return VPNConnectionsClientGetResponse{}, err - } - return result, nil -} - -// NewListByVPNGatewayPager - Retrieves all vpn connections for a particular virtual wan vpn gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.ListByVPNGateway -// method. -func (client *VPNConnectionsClient) NewListByVPNGatewayPager(resourceGroupName string, gatewayName string, options *VPNConnectionsClientListByVPNGatewayOptions) *runtime.Pager[VPNConnectionsClientListByVPNGatewayResponse] { - return runtime.NewPager(runtime.PagingHandler[VPNConnectionsClientListByVPNGatewayResponse]{ - More: func(page VPNConnectionsClientListByVPNGatewayResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VPNConnectionsClientListByVPNGatewayResponse) (VPNConnectionsClientListByVPNGatewayResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNConnectionsClientListByVPNGatewayResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNConnectionsClientListByVPNGatewayResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNConnectionsClientListByVPNGatewayResponse{}, runtime.NewResponseError(resp) - } - return client.listByVPNGatewayHandleResponse(resp) - }, - }) -} - -// listByVPNGatewayCreateRequest creates the ListByVPNGateway request. -func (client *VPNConnectionsClient) listByVPNGatewayCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNConnectionsClientListByVPNGatewayOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByVPNGatewayHandleResponse handles the ListByVPNGateway response. -func (client *VPNConnectionsClient) listByVPNGatewayHandleResponse(resp *http.Response) (VPNConnectionsClientListByVPNGatewayResponse, error) { - result := VPNConnectionsClientListByVPNGatewayResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNConnectionsResult); err != nil { - return VPNConnectionsClientListByVPNGatewayResponse{}, err - } - return result, nil -} - -// BeginStartPacketCapture - Starts packet capture on Vpn connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the gateway. -// vpnConnectionName - The name of the vpn connection. -// options - VPNConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStartPacketCapture -// method. -func (client *VPNConnectionsClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStartPacketCaptureOptions) (*runtime.Poller[VPNConnectionsClientStartPacketCaptureResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.startPacketCapture(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNConnectionsClientStartPacketCaptureResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNConnectionsClientStartPacketCaptureResponse](options.ResumeToken, client.pl, nil) - } -} - -// StartPacketCapture - Starts packet capture on Vpn connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNConnectionsClient) startPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStartPacketCaptureOptions) (*http.Response, error) { - req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startPacketCaptureCreateRequest creates the StartPacketCapture request. -func (client *VPNConnectionsClient) startPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStartPacketCaptureOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if vpnConnectionName == "" { - return nil, errors.New("parameter vpnConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnConnectionName}", url.PathEscape(vpnConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) - } - return req, nil -} - -// BeginStopPacketCapture - Stops packet capture on Vpn connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the gateway. -// vpnConnectionName - The name of the vpn connection. -// options - VPNConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStopPacketCapture -// method. -func (client *VPNConnectionsClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStopPacketCaptureOptions) (*runtime.Poller[VPNConnectionsClientStopPacketCaptureResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stopPacketCapture(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNConnectionsClientStopPacketCaptureResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNConnectionsClientStopPacketCaptureResponse](options.ResumeToken, client.pl, nil) - } -} - -// StopPacketCapture - Stops packet capture on Vpn connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNConnectionsClient) stopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStopPacketCaptureOptions) (*http.Response, error) { - req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopPacketCaptureCreateRequest creates the StopPacketCapture request. -func (client *VPNConnectionsClient) stopPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStopPacketCaptureOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if vpnConnectionName == "" { - return nil, errors.New("parameter vpnConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnConnectionName}", url.PathEscape(vpnConnectionName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) - } - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpngateways_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpngateways_client.go deleted file mode 100644 index 7496203c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpngateways_client.go +++ /dev/null @@ -1,633 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VPNGatewaysClient contains the methods for the VPNGateways group. -// Don't use this type directly, use NewVPNGatewaysClient() instead. -type VPNGatewaysClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVPNGatewaysClient creates a new instance of VPNGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNGatewaysClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VPNGatewaysClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// vpnGatewayParameters - Parameters supplied to create or Update a virtual wan vpn gateway. -// options - VPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNGatewaysClient.BeginCreateOrUpdate -// method. -func (client *VPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VPNGateway, options *VPNGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNGatewaysClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNGatewaysClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VPNGateway, options *VPNGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VPNGatewaysClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VPNGateway, options *VPNGatewaysClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vpnGatewayParameters) -} - -// BeginDelete - Deletes a virtual wan vpn gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNGatewaysClientBeginDeleteOptions contains the optional parameters for the VPNGatewaysClient.BeginDelete method. -func (client *VPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginDeleteOptions) (*runtime.Poller[VPNGatewaysClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNGatewaysClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a virtual wan vpn gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VPNGatewaysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a virtual wan vpn gateway. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNGatewaysClientGetOptions contains the optional parameters for the VPNGatewaysClient.Get method. -func (client *VPNGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientGetOptions) (VPNGatewaysClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return VPNGatewaysClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNGatewaysClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNGatewaysClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VPNGatewaysClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VPNGatewaysClient) getHandleResponse(resp *http.Response) (VPNGatewaysClientGetResponse, error) { - result := VPNGatewaysClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VPNGateway); err != nil { - return VPNGatewaysClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all the VpnGateways in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.List method. -func (client *VPNGatewaysClient) NewListPager(options *VPNGatewaysClientListOptions) *runtime.Pager[VPNGatewaysClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VPNGatewaysClientListResponse]{ - More: func(page VPNGatewaysClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VPNGatewaysClientListResponse) (VPNGatewaysClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNGatewaysClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNGatewaysClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNGatewaysClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VPNGatewaysClient) listCreateRequest(ctx context.Context, options *VPNGatewaysClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VPNGatewaysClient) listHandleResponse(resp *http.Response) (VPNGatewaysClientListResponse, error) { - result := VPNGatewaysClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNGatewaysResult); err != nil { - return VPNGatewaysClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all the VpnGateways in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// options - VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.ListByResourceGroup -// method. -func (client *VPNGatewaysClient) NewListByResourceGroupPager(resourceGroupName string, options *VPNGatewaysClientListByResourceGroupOptions) *runtime.Pager[VPNGatewaysClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[VPNGatewaysClientListByResourceGroupResponse]{ - More: func(page VPNGatewaysClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VPNGatewaysClientListByResourceGroupResponse) (VPNGatewaysClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNGatewaysClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNGatewaysClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNGatewaysClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *VPNGatewaysClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VPNGatewaysClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *VPNGatewaysClient) listByResourceGroupHandleResponse(resp *http.Response) (VPNGatewaysClientListByResourceGroupResponse, error) { - result := VPNGatewaysClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNGatewaysResult); err != nil { - return VPNGatewaysClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// BeginReset - Resets the primary of the vpn gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNGatewaysClientBeginResetOptions contains the optional parameters for the VPNGatewaysClient.BeginReset method. -func (client *VPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginResetOptions) (*runtime.Poller[VPNGatewaysClientResetResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.reset(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNGatewaysClientResetResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientResetResponse](options.ResumeToken, client.pl, nil) - } -} - -// Reset - Resets the primary of the vpn gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNGatewaysClient) reset(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginResetOptions) (*http.Response, error) { - req, err := client.resetCreateRequest(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resetCreateRequest creates the Reset request. -func (client *VPNGatewaysClient) resetCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginResetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStartPacketCapture - Starts packet capture on vpn gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStartPacketCapture -// method. -func (client *VPNGatewaysClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStartPacketCaptureOptions) (*runtime.Poller[VPNGatewaysClientStartPacketCaptureResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.startPacketCapture(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNGatewaysClientStartPacketCaptureResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientStartPacketCaptureResponse](options.ResumeToken, client.pl, nil) - } -} - -// StartPacketCapture - Starts packet capture on vpn gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNGatewaysClient) startPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStartPacketCaptureOptions) (*http.Response, error) { - req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startPacketCaptureCreateRequest creates the StartPacketCapture request. -func (client *VPNGatewaysClient) startPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStartPacketCaptureOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) - } - return req, nil -} - -// BeginStopPacketCapture - Stops packet capture on vpn gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStopPacketCapture -// method. -func (client *VPNGatewaysClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStopPacketCaptureOptions) (*runtime.Poller[VPNGatewaysClientStopPacketCaptureResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stopPacketCapture(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNGatewaysClientStopPacketCaptureResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientStopPacketCaptureResponse](options.ResumeToken, client.pl, nil) - } -} - -// StopPacketCapture - Stops packet capture on vpn gateway in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNGatewaysClient) stopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStopPacketCaptureOptions) (*http.Response, error) { - req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopPacketCaptureCreateRequest creates the StopPacketCapture request. -func (client *VPNGatewaysClient) stopPacketCaptureCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStopPacketCaptureOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) - } - return req, nil -} - -// BeginUpdateTags - Updates virtual wan vpn gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// vpnGatewayParameters - Parameters supplied to update a virtual wan vpn gateway tags. -// options - VPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VPNGatewaysClient.BeginUpdateTags -// method. -func (client *VPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject, options *VPNGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[VPNGatewaysClientUpdateTagsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updateTags(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNGatewaysClientUpdateTagsResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNGatewaysClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdateTags - Updates virtual wan vpn gateway tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject, options *VPNGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *VPNGatewaysClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject, options *VPNGatewaysClientBeginUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vpnGatewayParameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnlinkconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnlinkconnections_client.go deleted file mode 100644 index b1f0a90a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnlinkconnections_client.go +++ /dev/null @@ -1,282 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VPNLinkConnectionsClient contains the methods for the VPNLinkConnections group. -// Don't use this type directly, use NewVPNLinkConnectionsClient() instead. -type VPNLinkConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVPNLinkConnectionsClient creates a new instance of VPNLinkConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVPNLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNLinkConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VPNLinkConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginGetIkeSas - Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the gateway. -// connectionName - The name of the vpn connection. -// linkConnectionName - The name of the vpn link connection. -// options - VPNLinkConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginGetIkeSas -// method. -func (client *VPNLinkConnectionsClient) BeginGetIkeSas(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginGetIkeSasOptions) (*runtime.Poller[VPNLinkConnectionsClientGetIkeSasResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getIkeSas(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNLinkConnectionsClientGetIkeSasResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNLinkConnectionsClientGetIkeSasResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetIkeSas - Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNLinkConnectionsClient) getIkeSas(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginGetIkeSasOptions) (*http.Response, error) { - req, err := client.getIkeSasCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getIkeSasCreateRequest creates the GetIkeSas request. -func (client *VPNLinkConnectionsClient) getIkeSasCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginGetIkeSasOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if linkConnectionName == "" { - return nil, errors.New("parameter linkConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{linkConnectionName}", url.PathEscape(linkConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// NewListByVPNConnectionPager - Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the vpn gateway. -// gatewayName - The name of the gateway. -// connectionName - The name of the vpn connection. -// options - VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.ListByVPNConnection -// method. -func (client *VPNLinkConnectionsClient) NewListByVPNConnectionPager(resourceGroupName string, gatewayName string, connectionName string, options *VPNLinkConnectionsClientListByVPNConnectionOptions) *runtime.Pager[VPNLinkConnectionsClientListByVPNConnectionResponse] { - return runtime.NewPager(runtime.PagingHandler[VPNLinkConnectionsClientListByVPNConnectionResponse]{ - More: func(page VPNLinkConnectionsClientListByVPNConnectionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VPNLinkConnectionsClientListByVPNConnectionResponse) (VPNLinkConnectionsClientListByVPNConnectionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVPNConnectionCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNLinkConnectionsClientListByVPNConnectionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNLinkConnectionsClientListByVPNConnectionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNLinkConnectionsClientListByVPNConnectionResponse{}, runtime.NewResponseError(resp) - } - return client.listByVPNConnectionHandleResponse(resp) - }, - }) -} - -// listByVPNConnectionCreateRequest creates the ListByVPNConnection request. -func (client *VPNLinkConnectionsClient) listByVPNConnectionCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNLinkConnectionsClientListByVPNConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByVPNConnectionHandleResponse handles the ListByVPNConnection response. -func (client *VPNLinkConnectionsClient) listByVPNConnectionHandleResponse(resp *http.Response) (VPNLinkConnectionsClientListByVPNConnectionResponse, error) { - result := VPNLinkConnectionsClientListByVPNConnectionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSiteLinkConnectionsResult); err != nil { - return VPNLinkConnectionsClientListByVPNConnectionResponse{}, err - } - return result, nil -} - -// BeginResetConnection - Resets the VpnLink connection specified. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the gateway. -// connectionName - The name of the vpn connection. -// linkConnectionName - The name of the vpn link connection. -// options - VPNLinkConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginResetConnection -// method. -func (client *VPNLinkConnectionsClient) BeginResetConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginResetConnectionOptions) (*runtime.Poller[VPNLinkConnectionsClientResetConnectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resetConnection(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNLinkConnectionsClientResetConnectionResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNLinkConnectionsClientResetConnectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// ResetConnection - Resets the VpnLink connection specified. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNLinkConnectionsClient) resetConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginResetConnectionOptions) (*http.Response, error) { - req, err := client.resetConnectionCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resetConnectionCreateRequest creates the ResetConnection request. -func (client *VPNLinkConnectionsClient) resetConnectionCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginResetConnectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if linkConnectionName == "" { - return nil, errors.New("parameter linkConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{linkConnectionName}", url.PathEscape(linkConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnserverconfigurations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnserverconfigurations_client.go deleted file mode 100644 index 56daac3d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnserverconfigurations_client.go +++ /dev/null @@ -1,428 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VPNServerConfigurationsClient contains the methods for the VPNServerConfigurations group. -// Don't use this type directly, use NewVPNServerConfigurationsClient() instead. -type VPNServerConfigurationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVPNServerConfigurationsClient creates a new instance of VPNServerConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVPNServerConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNServerConfigurationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VPNServerConfigurationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration being created or updated. -// vpnServerConfigurationParameters - Parameters supplied to create or update VpnServerConfiguration. -// options - VPNServerConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginCreateOrUpdate -// method. -func (client *VPNServerConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VPNServerConfiguration, options *VPNServerConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNServerConfigurationsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNServerConfigurationsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNServerConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNServerConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VPNServerConfiguration, options *VPNServerConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VPNServerConfigurationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VPNServerConfiguration, options *VPNServerConfigurationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnServerConfigurationName == "" { - return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vpnServerConfigurationParameters) -} - -// BeginDelete - Deletes a VpnServerConfiguration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration being deleted. -// options - VPNServerConfigurationsClientBeginDeleteOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginDelete -// method. -func (client *VPNServerConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientBeginDeleteOptions) (*runtime.Poller[VPNServerConfigurationsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, vpnServerConfigurationName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNServerConfigurationsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNServerConfigurationsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a VpnServerConfiguration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNServerConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VPNServerConfigurationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnServerConfigurationName == "" { - return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a VpnServerConfiguration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration being retrieved. -// options - VPNServerConfigurationsClientGetOptions contains the optional parameters for the VPNServerConfigurationsClient.Get -// method. -func (client *VPNServerConfigurationsClient) Get(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientGetOptions) (VPNServerConfigurationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, options) - if err != nil { - return VPNServerConfigurationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNServerConfigurationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNServerConfigurationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VPNServerConfigurationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnServerConfigurationName == "" { - return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VPNServerConfigurationsClient) getHandleResponse(resp *http.Response) (VPNServerConfigurationsClientGetResponse, error) { - result := VPNServerConfigurationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VPNServerConfiguration); err != nil { - return VPNServerConfigurationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all the VpnServerConfigurations in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.List -// method. -func (client *VPNServerConfigurationsClient) NewListPager(options *VPNServerConfigurationsClientListOptions) *runtime.Pager[VPNServerConfigurationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VPNServerConfigurationsClientListResponse]{ - More: func(page VPNServerConfigurationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VPNServerConfigurationsClientListResponse) (VPNServerConfigurationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNServerConfigurationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNServerConfigurationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNServerConfigurationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VPNServerConfigurationsClient) listCreateRequest(ctx context.Context, options *VPNServerConfigurationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VPNServerConfigurationsClient) listHandleResponse(resp *http.Response) (VPNServerConfigurationsClientListResponse, error) { - result := VPNServerConfigurationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNServerConfigurationsResult); err != nil { - return VPNServerConfigurationsClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all the vpnServerConfigurations in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// options - VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.ListByResourceGroup -// method. -func (client *VPNServerConfigurationsClient) NewListByResourceGroupPager(resourceGroupName string, options *VPNServerConfigurationsClientListByResourceGroupOptions) *runtime.Pager[VPNServerConfigurationsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[VPNServerConfigurationsClientListByResourceGroupResponse]{ - More: func(page VPNServerConfigurationsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VPNServerConfigurationsClientListByResourceGroupResponse) (VPNServerConfigurationsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNServerConfigurationsClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNServerConfigurationsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNServerConfigurationsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *VPNServerConfigurationsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VPNServerConfigurationsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *VPNServerConfigurationsClient) listByResourceGroupHandleResponse(resp *http.Response) (VPNServerConfigurationsClientListByResourceGroupResponse, error) { - result := VPNServerConfigurationsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNServerConfigurationsResult); err != nil { - return VPNServerConfigurationsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates VpnServerConfiguration tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration being updated. -// vpnServerConfigurationParameters - Parameters supplied to update VpnServerConfiguration tags. -// options - VPNServerConfigurationsClientUpdateTagsOptions contains the optional parameters for the VPNServerConfigurationsClient.UpdateTags -// method. -func (client *VPNServerConfigurationsClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters TagsObject, options *VPNServerConfigurationsClientUpdateTagsOptions) (VPNServerConfigurationsClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) - if err != nil { - return VPNServerConfigurationsClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNServerConfigurationsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNServerConfigurationsClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *VPNServerConfigurationsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters TagsObject, options *VPNServerConfigurationsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnServerConfigurationName == "" { - return nil, errors.New("parameter vpnServerConfigurationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnServerConfigurationName}", url.PathEscape(vpnServerConfigurationName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vpnServerConfigurationParameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *VPNServerConfigurationsClient) updateTagsHandleResponse(resp *http.Response) (VPNServerConfigurationsClientUpdateTagsResponse, error) { - result := VPNServerConfigurationsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VPNServerConfiguration); err != nil { - return VPNServerConfigurationsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnserverconfigurationsassociatedwithvirtualwan_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnserverconfigurationsassociatedwithvirtualwan_client.go deleted file mode 100644 index 6c05d6a4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnserverconfigurationsassociatedwithvirtualwan_client.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VPNServerConfigurationsAssociatedWithVirtualWanClient contains the methods for the VPNServerConfigurationsAssociatedWithVirtualWan group. -// Don't use this type directly, use NewVPNServerConfigurationsAssociatedWithVirtualWanClient() instead. -type VPNServerConfigurationsAssociatedWithVirtualWanClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVPNServerConfigurationsAssociatedWithVirtualWanClient creates a new instance of VPNServerConfigurationsAssociatedWithVirtualWanClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVPNServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNServerConfigurationsAssociatedWithVirtualWanClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VPNServerConfigurationsAssociatedWithVirtualWanClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginList - Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name. -// virtualWANName - The name of the VirtualWAN whose associated VpnServerConfigurations is needed. -// options - VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions contains the optional parameters for the -// VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList method. -func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) BeginList(ctx context.Context, resourceGroupName string, virtualWANName string, options *VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions) (*runtime.Poller[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listOperation(ctx, resourceGroupName, virtualWANName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse](options.ResumeToken, client.pl, nil) - } -} - -// List - Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) listOperation(ctx context.Context, resourceGroupName string, virtualWANName string, options *VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions) (*http.Response, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, virtualWANName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listCreateRequest creates the List request. -func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, options *VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualWANName == "" { - return nil, errors.New("parameter virtualWANName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualWANName}", url.PathEscape(virtualWANName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsitelinkconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsitelinkconnections_client.go deleted file mode 100644 index 8d19bda4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsitelinkconnections_client.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VPNSiteLinkConnectionsClient contains the methods for the VPNSiteLinkConnections group. -// Don't use this type directly, use NewVPNSiteLinkConnectionsClient() instead. -type VPNSiteLinkConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVPNSiteLinkConnectionsClient creates a new instance of VPNSiteLinkConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVPNSiteLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSiteLinkConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VPNSiteLinkConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Retrieves the details of a vpn site link connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// connectionName - The name of the vpn connection. -// linkConnectionName - The name of the vpn connection. -// options - VPNSiteLinkConnectionsClientGetOptions contains the optional parameters for the VPNSiteLinkConnectionsClient.Get -// method. -func (client *VPNSiteLinkConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNSiteLinkConnectionsClientGetOptions) (VPNSiteLinkConnectionsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) - if err != nil { - return VPNSiteLinkConnectionsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNSiteLinkConnectionsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNSiteLinkConnectionsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VPNSiteLinkConnectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNSiteLinkConnectionsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if gatewayName == "" { - return nil, errors.New("parameter gatewayName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{gatewayName}", url.PathEscape(gatewayName)) - if connectionName == "" { - return nil, errors.New("parameter connectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{connectionName}", url.PathEscape(connectionName)) - if linkConnectionName == "" { - return nil, errors.New("parameter linkConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{linkConnectionName}", url.PathEscape(linkConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VPNSiteLinkConnectionsClient) getHandleResponse(resp *http.Response) (VPNSiteLinkConnectionsClientGetResponse, error) { - result := VPNSiteLinkConnectionsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VPNSiteLinkConnection); err != nil { - return VPNSiteLinkConnectionsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsitelinks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsitelinks_client.go deleted file mode 100644 index d6598e14..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsitelinks_client.go +++ /dev/null @@ -1,188 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VPNSiteLinksClient contains the methods for the VPNSiteLinks group. -// Don't use this type directly, use NewVPNSiteLinksClient() instead. -type VPNSiteLinksClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVPNSiteLinksClient creates a new instance of VPNSiteLinksClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVPNSiteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSiteLinksClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VPNSiteLinksClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Retrieves the details of a VPN site link. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite. -// vpnSiteLinkName - The name of the VpnSiteLink being retrieved. -// options - VPNSiteLinksClientGetOptions contains the optional parameters for the VPNSiteLinksClient.Get method. -func (client *VPNSiteLinksClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string, options *VPNSiteLinksClientGetOptions) (VPNSiteLinksClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vpnSiteName, vpnSiteLinkName, options) - if err != nil { - return VPNSiteLinksClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNSiteLinksClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNSiteLinksClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VPNSiteLinksClient) getCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string, options *VPNSiteLinksClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnSiteName == "" { - return nil, errors.New("parameter vpnSiteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) - if vpnSiteLinkName == "" { - return nil, errors.New("parameter vpnSiteLinkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnSiteLinkName}", url.PathEscape(vpnSiteLinkName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VPNSiteLinksClient) getHandleResponse(resp *http.Response) (VPNSiteLinksClientGetResponse, error) { - result := VPNSiteLinksClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VPNSiteLink); err != nil { - return VPNSiteLinksClientGetResponse{}, err - } - return result, nil -} - -// NewListByVPNSitePager - Lists all the vpnSiteLinks in a resource group for a vpn site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite. -// options - VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.ListByVPNSite -// method. -func (client *VPNSiteLinksClient) NewListByVPNSitePager(resourceGroupName string, vpnSiteName string, options *VPNSiteLinksClientListByVPNSiteOptions) *runtime.Pager[VPNSiteLinksClientListByVPNSiteResponse] { - return runtime.NewPager(runtime.PagingHandler[VPNSiteLinksClientListByVPNSiteResponse]{ - More: func(page VPNSiteLinksClientListByVPNSiteResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VPNSiteLinksClientListByVPNSiteResponse) (VPNSiteLinksClientListByVPNSiteResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByVPNSiteCreateRequest(ctx, resourceGroupName, vpnSiteName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNSiteLinksClientListByVPNSiteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNSiteLinksClientListByVPNSiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNSiteLinksClientListByVPNSiteResponse{}, runtime.NewResponseError(resp) - } - return client.listByVPNSiteHandleResponse(resp) - }, - }) -} - -// listByVPNSiteCreateRequest creates the ListByVPNSite request. -func (client *VPNSiteLinksClient) listByVPNSiteCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSiteLinksClientListByVPNSiteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnSiteName == "" { - return nil, errors.New("parameter vpnSiteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByVPNSiteHandleResponse handles the ListByVPNSite response. -func (client *VPNSiteLinksClient) listByVPNSiteHandleResponse(resp *http.Response) (VPNSiteLinksClientListByVPNSiteResponse, error) { - result := VPNSiteLinksClientListByVPNSiteResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSiteLinksResult); err != nil { - return VPNSiteLinksClientListByVPNSiteResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsites_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsites_client.go deleted file mode 100644 index daf1039b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsites_client.go +++ /dev/null @@ -1,424 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VPNSitesClient contains the methods for the VPNSites group. -// Don't use this type directly, use NewVPNSitesClient() instead. -type VPNSitesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVPNSitesClient creates a new instance of VPNSitesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVPNSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSitesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VPNSitesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite being created or updated. -// vpnSiteParameters - Parameters supplied to create or update VpnSite. -// options - VPNSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNSitesClient.BeginCreateOrUpdate -// method. -func (client *VPNSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VPNSite, options *VPNSitesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNSitesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNSitesClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNSitesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNSitesClient) createOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VPNSite, options *VPNSitesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *VPNSitesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VPNSite, options *VPNSitesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnSiteName == "" { - return nil, errors.New("parameter vpnSiteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vpnSiteParameters) -} - -// BeginDelete - Deletes a VpnSite. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite being deleted. -// options - VPNSitesClientBeginDeleteOptions contains the optional parameters for the VPNSitesClient.BeginDelete method. -func (client *VPNSitesClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientBeginDeleteOptions) (*runtime.Poller[VPNSitesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, vpnSiteName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNSitesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNSitesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes a VpnSite. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNSitesClient) deleteOperation(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, vpnSiteName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *VPNSitesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnSiteName == "" { - return nil, errors.New("parameter vpnSiteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieves the details of a VPN site. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite being retrieved. -// options - VPNSitesClientGetOptions contains the optional parameters for the VPNSitesClient.Get method. -func (client *VPNSitesClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientGetOptions) (VPNSitesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, vpnSiteName, options) - if err != nil { - return VPNSitesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNSitesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNSitesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *VPNSitesClient) getCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnSiteName == "" { - return nil, errors.New("parameter vpnSiteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *VPNSitesClient) getHandleResponse(resp *http.Response) (VPNSitesClientGetResponse, error) { - result := VPNSitesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VPNSite); err != nil { - return VPNSitesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all the VpnSites in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.List method. -func (client *VPNSitesClient) NewListPager(options *VPNSitesClientListOptions) *runtime.Pager[VPNSitesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[VPNSitesClientListResponse]{ - More: func(page VPNSitesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VPNSitesClientListResponse) (VPNSitesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNSitesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNSitesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNSitesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *VPNSitesClient) listCreateRequest(ctx context.Context, options *VPNSitesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *VPNSitesClient) listHandleResponse(resp *http.Response) (VPNSitesClientListResponse, error) { - result := VPNSitesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSitesResult); err != nil { - return VPNSitesClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists all the vpnSites in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnSite. -// options - VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.ListByResourceGroup -// method. -func (client *VPNSitesClient) NewListByResourceGroupPager(resourceGroupName string, options *VPNSitesClientListByResourceGroupOptions) *runtime.Pager[VPNSitesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[VPNSitesClientListByResourceGroupResponse]{ - More: func(page VPNSitesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *VPNSitesClientListByResourceGroupResponse) (VPNSitesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return VPNSitesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNSitesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNSitesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *VPNSitesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *VPNSitesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *VPNSitesClient) listByResourceGroupHandleResponse(resp *http.Response) (VPNSitesClientListByResourceGroupResponse, error) { - result := VPNSitesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSitesResult); err != nil { - return VPNSitesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates VpnSite tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite being updated. -// vpnSiteParameters - Parameters supplied to update VpnSite tags. -// options - VPNSitesClientUpdateTagsOptions contains the optional parameters for the VPNSitesClient.UpdateTags method. -func (client *VPNSitesClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject, options *VPNSitesClientUpdateTagsOptions) (VPNSitesClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) - if err != nil { - return VPNSitesClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return VPNSitesClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VPNSitesClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *VPNSitesClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject, options *VPNSitesClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if vpnSiteName == "" { - return nil, errors.New("parameter vpnSiteName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vpnSiteName}", url.PathEscape(vpnSiteName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vpnSiteParameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *VPNSitesClient) updateTagsHandleResponse(resp *http.Response) (VPNSitesClientUpdateTagsResponse, error) { - result := VPNSitesClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VPNSite); err != nil { - return VPNSitesClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsitesconfiguration_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsitesconfiguration_client.go deleted file mode 100644 index c8e233a5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/vpnsitesconfiguration_client.go +++ /dev/null @@ -1,123 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// VPNSitesConfigurationClient contains the methods for the VPNSitesConfiguration group. -// Don't use this type directly, use NewVPNSitesConfigurationClient() instead. -type VPNSitesConfigurationClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewVPNSitesConfigurationClient creates a new instance of VPNSitesConfigurationClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewVPNSitesConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSitesConfigurationClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &VPNSitesConfigurationClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginDownload - Gives the sas-url to download the configurations for vpn-sites in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The resource group name. -// virtualWANName - The name of the VirtualWAN for which configuration of all vpn-sites is needed. -// request - Parameters supplied to download vpn-sites configuration. -// options - VPNSitesConfigurationClientBeginDownloadOptions contains the optional parameters for the VPNSitesConfigurationClient.BeginDownload -// method. -func (client *VPNSitesConfigurationClient) BeginDownload(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVPNSitesConfigurationRequest, options *VPNSitesConfigurationClientBeginDownloadOptions) (*runtime.Poller[VPNSitesConfigurationClientDownloadResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.download(ctx, resourceGroupName, virtualWANName, request, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[VPNSitesConfigurationClientDownloadResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[VPNSitesConfigurationClientDownloadResponse](options.ResumeToken, client.pl, nil) - } -} - -// Download - Gives the sas-url to download the configurations for vpn-sites in a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *VPNSitesConfigurationClient) download(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVPNSitesConfigurationRequest, options *VPNSitesConfigurationClientBeginDownloadOptions) (*http.Response, error) { - req, err := client.downloadCreateRequest(ctx, resourceGroupName, virtualWANName, request, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// downloadCreateRequest creates the Download request. -func (client *VPNSitesConfigurationClient) downloadCreateRequest(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVPNSitesConfigurationRequest, options *VPNSitesConfigurationClientBeginDownloadOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if virtualWANName == "" { - return nil, errors.New("parameter virtualWANName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualWANName}", url.PathEscape(virtualWANName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/watchers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/watchers_client.go deleted file mode 100644 index 0aaaa605..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/watchers_client.go +++ /dev/null @@ -1,1199 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// WatchersClient contains the methods for the NetworkWatchers group. -// Don't use this type directly, use NewWatchersClient() instead. -type WatchersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewWatchersClient creates a new instance of WatchersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewWatchersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WatchersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &WatchersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCheckConnectivity - Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given -// endpoint including another VM or an arbitrary remote server. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the network watcher resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that determine how the connectivity check will be performed. -// options - WatchersClientBeginCheckConnectivityOptions contains the optional parameters for the WatchersClient.BeginCheckConnectivity -// method. -func (client *WatchersClient) BeginCheckConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, options *WatchersClientBeginCheckConnectivityOptions) (*runtime.Poller[WatchersClientCheckConnectivityResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.checkConnectivity(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientCheckConnectivityResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientCheckConnectivityResponse](options.ResumeToken, client.pl, nil) - } -} - -// CheckConnectivity - Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given -// endpoint including another VM or an arbitrary remote server. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) checkConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, options *WatchersClientBeginCheckConnectivityOptions) (*http.Response, error) { - req, err := client.checkConnectivityCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// checkConnectivityCreateRequest creates the CheckConnectivity request. -func (client *WatchersClient) checkConnectivityCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, options *WatchersClientBeginCheckConnectivityOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// CreateOrUpdate - Creates or updates a network watcher in the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters that define the network watcher resource. -// options - WatchersClientCreateOrUpdateOptions contains the optional parameters for the WatchersClient.CreateOrUpdate method. -func (client *WatchersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher, options *WatchersClientCreateOrUpdateOptions) (WatchersClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WatchersClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WatchersClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *WatchersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher, options *WatchersClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *WatchersClient) createOrUpdateHandleResponse(resp *http.Response) (WatchersClientCreateOrUpdateResponse, error) { - result := WatchersClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Watcher); err != nil { - return WatchersClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes the specified network watcher resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// options - WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method. -func (client *WatchersClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientBeginDeleteOptions) (*runtime.Poller[WatchersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes the specified network watcher resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *WatchersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified network watcher by resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// options - WatchersClientGetOptions contains the optional parameters for the WatchersClient.Get method. -func (client *WatchersClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientGetOptions) (WatchersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, options) - if err != nil { - return WatchersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WatchersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *WatchersClient) getCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *WatchersClient) getHandleResponse(resp *http.Response) (WatchersClientGetResponse, error) { - result := WatchersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Watcher); err != nil { - return WatchersClientGetResponse{}, err - } - return result, nil -} - -// BeginGetAzureReachabilityReport - NOTE: This feature is currently in preview and still being tested for stability. Gets -// the relative latency score for internet service providers from a specified location to Azure regions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the network watcher resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that determine Azure reachability report configuration. -// options - WatchersClientBeginGetAzureReachabilityReportOptions contains the optional parameters for the WatchersClient.BeginGetAzureReachabilityReport -// method. -func (client *WatchersClient) BeginGetAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, options *WatchersClientBeginGetAzureReachabilityReportOptions) (*runtime.Poller[WatchersClientGetAzureReachabilityReportResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getAzureReachabilityReport(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientGetAzureReachabilityReportResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetAzureReachabilityReportResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetAzureReachabilityReport - NOTE: This feature is currently in preview and still being tested for stability. Gets the -// relative latency score for internet service providers from a specified location to Azure regions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) getAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, options *WatchersClientBeginGetAzureReachabilityReportOptions) (*http.Response, error) { - req, err := client.getAzureReachabilityReportCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getAzureReachabilityReportCreateRequest creates the GetAzureReachabilityReport request. -func (client *WatchersClient) getAzureReachabilityReportCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, options *WatchersClientBeginGetAzureReachabilityReportOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginGetFlowLogStatus - Queries status of flow log and traffic analytics (optional) on a specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the network watcher resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that define a resource to query flow log and traffic analytics (optional) status. -// options - WatchersClientBeginGetFlowLogStatusOptions contains the optional parameters for the WatchersClient.BeginGetFlowLogStatus -// method. -func (client *WatchersClient) BeginGetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, options *WatchersClientBeginGetFlowLogStatusOptions) (*runtime.Poller[WatchersClientGetFlowLogStatusResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getFlowLogStatus(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientGetFlowLogStatusResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetFlowLogStatusResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetFlowLogStatus - Queries status of flow log and traffic analytics (optional) on a specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) getFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, options *WatchersClientBeginGetFlowLogStatusOptions) (*http.Response, error) { - req, err := client.getFlowLogStatusCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getFlowLogStatusCreateRequest creates the GetFlowLogStatus request. -func (client *WatchersClient) getFlowLogStatusCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, options *WatchersClientBeginGetFlowLogStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginGetNetworkConfigurationDiagnostic - Gets Network Configuration Diagnostic data to help customers understand and debug -// network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and -// the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. -// The API returns whether traffic was allowed or denied, the rules evaluated for -// the specified flow and the evaluation results. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters to get network configuration diagnostic. -// options - WatchersClientBeginGetNetworkConfigurationDiagnosticOptions contains the optional parameters for the WatchersClient.BeginGetNetworkConfigurationDiagnostic -// method. -func (client *WatchersClient) BeginGetNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters, options *WatchersClientBeginGetNetworkConfigurationDiagnosticOptions) (*runtime.Poller[WatchersClientGetNetworkConfigurationDiagnosticResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getNetworkConfigurationDiagnostic(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientGetNetworkConfigurationDiagnosticResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetNetworkConfigurationDiagnosticResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetNetworkConfigurationDiagnostic - Gets Network Configuration Diagnostic data to help customers understand and debug network -// behavior. It provides detailed information on what security rules were applied to a specified traffic flow and -// the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. -// The API returns whether traffic was allowed or denied, the rules evaluated for -// the specified flow and the evaluation results. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) getNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters, options *WatchersClientBeginGetNetworkConfigurationDiagnosticOptions) (*http.Response, error) { - req, err := client.getNetworkConfigurationDiagnosticCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getNetworkConfigurationDiagnosticCreateRequest creates the GetNetworkConfigurationDiagnostic request. -func (client *WatchersClient) getNetworkConfigurationDiagnosticCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters, options *WatchersClientBeginGetNetworkConfigurationDiagnosticOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginGetNextHop - Gets the next hop from the specified VM. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters that define the source and destination endpoint. -// options - WatchersClientBeginGetNextHopOptions contains the optional parameters for the WatchersClient.BeginGetNextHop -// method. -func (client *WatchersClient) BeginGetNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters, options *WatchersClientBeginGetNextHopOptions) (*runtime.Poller[WatchersClientGetNextHopResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getNextHop(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientGetNextHopResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetNextHopResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetNextHop - Gets the next hop from the specified VM. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) getNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters, options *WatchersClientBeginGetNextHopOptions) (*http.Response, error) { - req, err := client.getNextHopCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getNextHopCreateRequest creates the GetNextHop request. -func (client *WatchersClient) getNextHopCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters, options *WatchersClientBeginGetNextHopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// GetTopology - Gets the current network topology by resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters that define the representation of topology. -// options - WatchersClientGetTopologyOptions contains the optional parameters for the WatchersClient.GetTopology method. -func (client *WatchersClient) GetTopology(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters, options *WatchersClientGetTopologyOptions) (WatchersClientGetTopologyResponse, error) { - req, err := client.getTopologyCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientGetTopologyResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WatchersClientGetTopologyResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchersClientGetTopologyResponse{}, runtime.NewResponseError(resp) - } - return client.getTopologyHandleResponse(resp) -} - -// getTopologyCreateRequest creates the GetTopology request. -func (client *WatchersClient) getTopologyCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters, options *WatchersClientGetTopologyOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// getTopologyHandleResponse handles the GetTopology response. -func (client *WatchersClient) getTopologyHandleResponse(resp *http.Response) (WatchersClientGetTopologyResponse, error) { - result := WatchersClientGetTopologyResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Topology); err != nil { - return WatchersClientGetTopologyResponse{}, err - } - return result, nil -} - -// BeginGetTroubleshooting - Initiate troubleshooting on a specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that define the resource to troubleshoot. -// options - WatchersClientBeginGetTroubleshootingOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshooting -// method. -func (client *WatchersClient) BeginGetTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingOptions) (*runtime.Poller[WatchersClientGetTroubleshootingResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getTroubleshooting(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientGetTroubleshootingResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetTroubleshootingResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetTroubleshooting - Initiate troubleshooting on a specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) getTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingOptions) (*http.Response, error) { - req, err := client.getTroubleshootingCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getTroubleshootingCreateRequest creates the GetTroubleshooting request. -func (client *WatchersClient) getTroubleshootingCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginGetTroubleshootingResult - Get the last completed troubleshooting result on a specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that define the resource to query the troubleshooting result. -// options - WatchersClientBeginGetTroubleshootingResultOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshootingResult -// method. -func (client *WatchersClient) BeginGetTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingResultOptions) (*runtime.Poller[WatchersClientGetTroubleshootingResultResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getTroubleshootingResult(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientGetTroubleshootingResultResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetTroubleshootingResultResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetTroubleshootingResult - Get the last completed troubleshooting result on a specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) getTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingResultOptions) (*http.Response, error) { - req, err := client.getTroubleshootingResultCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getTroubleshootingResultCreateRequest creates the GetTroubleshootingResult request. -func (client *WatchersClient) getTroubleshootingResultCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingResultOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginGetVMSecurityRules - Gets the configured and effective security group rules on the specified VM. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters that define the VM to check security groups for. -// options - WatchersClientBeginGetVMSecurityRulesOptions contains the optional parameters for the WatchersClient.BeginGetVMSecurityRules -// method. -func (client *WatchersClient) BeginGetVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, options *WatchersClientBeginGetVMSecurityRulesOptions) (*runtime.Poller[WatchersClientGetVMSecurityRulesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.getVMSecurityRules(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientGetVMSecurityRulesResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientGetVMSecurityRulesResponse](options.ResumeToken, client.pl, nil) - } -} - -// GetVMSecurityRules - Gets the configured and effective security group rules on the specified VM. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) getVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, options *WatchersClientBeginGetVMSecurityRulesOptions) (*http.Response, error) { - req, err := client.getVMSecurityRulesCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// getVMSecurityRulesCreateRequest creates the GetVMSecurityRules request. -func (client *WatchersClient) getVMSecurityRulesCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, options *WatchersClientBeginGetVMSecurityRulesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// NewListPager - Gets all network watchers by resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - WatchersClientListOptions contains the optional parameters for the WatchersClient.List method. -func (client *WatchersClient) NewListPager(resourceGroupName string, options *WatchersClientListOptions) *runtime.Pager[WatchersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[WatchersClientListResponse]{ - More: func(page WatchersClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *WatchersClientListResponse) (WatchersClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, options) - if err != nil { - return WatchersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WatchersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *WatchersClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *WatchersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *WatchersClient) listHandleResponse(resp *http.Response) (WatchersClientListResponse, error) { - result := WatchersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WatcherListResult); err != nil { - return WatchersClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all network watchers by subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - WatchersClientListAllOptions contains the optional parameters for the WatchersClient.ListAll method. -func (client *WatchersClient) NewListAllPager(options *WatchersClientListAllOptions) *runtime.Pager[WatchersClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[WatchersClientListAllResponse]{ - More: func(page WatchersClientListAllResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *WatchersClientListAllResponse) (WatchersClientListAllResponse, error) { - req, err := client.listAllCreateRequest(ctx, options) - if err != nil { - return WatchersClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WatchersClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchersClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *WatchersClient) listAllCreateRequest(ctx context.Context, options *WatchersClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *WatchersClient) listAllHandleResponse(resp *http.Response) (WatchersClientListAllResponse, error) { - result := WatchersClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WatcherListResult); err != nil { - return WatchersClientListAllResponse{}, err - } - return result, nil -} - -// BeginListAvailableProviders - NOTE: This feature is currently in preview and still being tested for stability. Lists all -// available internet service providers for a specified Azure region. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the network watcher resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that scope the list of available providers. -// options - WatchersClientBeginListAvailableProvidersOptions contains the optional parameters for the WatchersClient.BeginListAvailableProviders -// method. -func (client *WatchersClient) BeginListAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, options *WatchersClientBeginListAvailableProvidersOptions) (*runtime.Poller[WatchersClientListAvailableProvidersResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.listAvailableProviders(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientListAvailableProvidersResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientListAvailableProvidersResponse](options.ResumeToken, client.pl, nil) - } -} - -// ListAvailableProviders - NOTE: This feature is currently in preview and still being tested for stability. Lists all available -// internet service providers for a specified Azure region. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) listAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, options *WatchersClientBeginListAvailableProvidersOptions) (*http.Response, error) { - req, err := client.listAvailableProvidersCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// listAvailableProvidersCreateRequest creates the ListAvailableProviders request. -func (client *WatchersClient) listAvailableProvidersCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, options *WatchersClientBeginListAvailableProvidersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginSetFlowLogConfiguration - Configures flow log and traffic analytics (optional) on a specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the network watcher resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that define the configuration of flow log. -// options - WatchersClientBeginSetFlowLogConfigurationOptions contains the optional parameters for the WatchersClient.BeginSetFlowLogConfiguration -// method. -func (client *WatchersClient) BeginSetFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, options *WatchersClientBeginSetFlowLogConfigurationOptions) (*runtime.Poller[WatchersClientSetFlowLogConfigurationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.setFlowLogConfiguration(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientSetFlowLogConfigurationResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientSetFlowLogConfigurationResponse](options.ResumeToken, client.pl, nil) - } -} - -// SetFlowLogConfiguration - Configures flow log and traffic analytics (optional) on a specified resource. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) setFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, options *WatchersClientBeginSetFlowLogConfigurationOptions) (*http.Response, error) { - req, err := client.setFlowLogConfigurationCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// setFlowLogConfigurationCreateRequest creates the SetFlowLogConfiguration request. -func (client *WatchersClient) setFlowLogConfigurationCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, options *WatchersClientBeginSetFlowLogConfigurationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// UpdateTags - Updates a network watcher tags. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters supplied to update network watcher tags. -// options - WatchersClientUpdateTagsOptions contains the optional parameters for the WatchersClient.UpdateTags method. -func (client *WatchersClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject, options *WatchersClientUpdateTagsOptions) (WatchersClientUpdateTagsResponse, error) { - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientUpdateTagsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WatchersClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchersClientUpdateTagsResponse{}, runtime.NewResponseError(resp) - } - return client.updateTagsHandleResponse(resp) -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *WatchersClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject, options *WatchersClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *WatchersClient) updateTagsHandleResponse(resp *http.Response) (WatchersClientUpdateTagsResponse, error) { - result := WatchersClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Watcher); err != nil { - return WatchersClientUpdateTagsResponse{}, err - } - return result, nil -} - -// BeginVerifyIPFlow - Verify IP flow from the specified VM to a location given the currently configured NSG rules. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters that define the IP flow to be verified. -// options - WatchersClientBeginVerifyIPFlowOptions contains the optional parameters for the WatchersClient.BeginVerifyIPFlow -// method. -func (client *WatchersClient) BeginVerifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, options *WatchersClientBeginVerifyIPFlowOptions) (*runtime.Poller[WatchersClientVerifyIPFlowResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.verifyIPFlow(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WatchersClientVerifyIPFlowResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WatchersClientVerifyIPFlowResponse](options.ResumeToken, client.pl, nil) - } -} - -// VerifyIPFlow - Verify IP flow from the specified VM to a location given the currently configured NSG rules. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WatchersClient) verifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, options *WatchersClientBeginVerifyIPFlowOptions) (*http.Response, error) { - req, err := client.verifyIPFlowCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// verifyIPFlowCreateRequest creates the VerifyIPFlow request. -func (client *WatchersClient) verifyIPFlowCreateRequest(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, options *WatchersClientBeginVerifyIPFlowOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if networkWatcherName == "" { - return nil, errors.New("parameter networkWatcherName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkWatcherName}", url.PathEscape(networkWatcherName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/webapplicationfirewallpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/webapplicationfirewallpolicies_client.go deleted file mode 100644 index af4a7cf5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/webapplicationfirewallpolicies_client.go +++ /dev/null @@ -1,362 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// WebApplicationFirewallPoliciesClient contains the methods for the WebApplicationFirewallPolicies group. -// Don't use this type directly, use NewWebApplicationFirewallPoliciesClient() instead. -type WebApplicationFirewallPoliciesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewWebApplicationFirewallPoliciesClient creates a new instance of WebApplicationFirewallPoliciesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewWebApplicationFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebApplicationFirewallPoliciesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &WebApplicationFirewallPoliciesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or update policy with specified rule set name within a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// policyName - The name of the policy. -// parameters - Policy to be created. -// options - WebApplicationFirewallPoliciesClientCreateOrUpdateOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.CreateOrUpdate -// method. -func (client *WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy, options *WebApplicationFirewallPoliciesClientCreateOrUpdateOptions) (WebApplicationFirewallPoliciesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, policyName, parameters, options) - if err != nil { - return WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *WebApplicationFirewallPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy, options *WebApplicationFirewallPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *WebApplicationFirewallPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientCreateOrUpdateResponse, error) { - result := WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicy); err != nil { - return WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes Policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// policyName - The name of the policy. -// options - WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete -// method. -func (client *WebApplicationFirewallPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientBeginDeleteOptions) (*runtime.Poller[WebApplicationFirewallPoliciesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, policyName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[WebApplicationFirewallPoliciesClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[WebApplicationFirewallPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes Policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *WebApplicationFirewallPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, policyName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *WebApplicationFirewallPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Retrieve protection policy with specified name within a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// policyName - The name of the policy. -// options - WebApplicationFirewallPoliciesClientGetOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.Get -// method. -func (client *WebApplicationFirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientGetOptions) (WebApplicationFirewallPoliciesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, policyName, options) - if err != nil { - return WebApplicationFirewallPoliciesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebApplicationFirewallPoliciesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebApplicationFirewallPoliciesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *WebApplicationFirewallPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *WebApplicationFirewallPoliciesClient) getHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientGetResponse, error) { - result := WebApplicationFirewallPoliciesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicy); err != nil { - return WebApplicationFirewallPoliciesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all of the protection policies within a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - The name of the resource group. -// options - WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.List -// method. -func (client *WebApplicationFirewallPoliciesClient) NewListPager(resourceGroupName string, options *WebApplicationFirewallPoliciesClientListOptions) *runtime.Pager[WebApplicationFirewallPoliciesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[WebApplicationFirewallPoliciesClientListResponse]{ - More: func(page WebApplicationFirewallPoliciesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebApplicationFirewallPoliciesClientListResponse) (WebApplicationFirewallPoliciesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebApplicationFirewallPoliciesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebApplicationFirewallPoliciesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebApplicationFirewallPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *WebApplicationFirewallPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *WebApplicationFirewallPoliciesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *WebApplicationFirewallPoliciesClient) listHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientListResponse, error) { - result := WebApplicationFirewallPoliciesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicyListResult); err != nil { - return WebApplicationFirewallPoliciesClientListResponse{}, err - } - return result, nil -} - -// NewListAllPager - Gets all the WAF policies in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.ListAll -// method. -func (client *WebApplicationFirewallPoliciesClient) NewListAllPager(options *WebApplicationFirewallPoliciesClientListAllOptions) *runtime.Pager[WebApplicationFirewallPoliciesClientListAllResponse] { - return runtime.NewPager(runtime.PagingHandler[WebApplicationFirewallPoliciesClientListAllResponse]{ - More: func(page WebApplicationFirewallPoliciesClientListAllResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebApplicationFirewallPoliciesClientListAllResponse) (WebApplicationFirewallPoliciesClientListAllResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAllCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebApplicationFirewallPoliciesClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebApplicationFirewallPoliciesClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebApplicationFirewallPoliciesClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) - }, - }) -} - -// listAllCreateRequest creates the ListAll request. -func (client *WebApplicationFirewallPoliciesClient) listAllCreateRequest(ctx context.Context, options *WebApplicationFirewallPoliciesClientListAllOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listAllHandleResponse handles the ListAll response. -func (client *WebApplicationFirewallPoliciesClient) listAllHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientListAllResponse, error) { - result := WebApplicationFirewallPoliciesClientListAllResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicyListResult); err != nil { - return WebApplicationFirewallPoliciesClientListAllResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/webcategories_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/webcategories_client.go deleted file mode 100644 index 6392afc4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/webcategories_client.go +++ /dev/null @@ -1,171 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armnetwork - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// WebCategoriesClient contains the methods for the WebCategories group. -// Don't use this type directly, use NewWebCategoriesClient() instead. -type WebCategoriesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewWebCategoriesClient creates a new instance of WebCategoriesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewWebCategoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebCategoriesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &WebCategoriesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the specified Azure Web Category. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// name - The name of the azureWebCategory. -// options - WebCategoriesClientGetOptions contains the optional parameters for the WebCategoriesClient.Get method. -func (client *WebCategoriesClient) Get(ctx context.Context, name string, options *WebCategoriesClientGetOptions) (WebCategoriesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, name, options) - if err != nil { - return WebCategoriesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebCategoriesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebCategoriesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *WebCategoriesClient) getCreateRequest(ctx context.Context, name string, options *WebCategoriesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories/{name}" - if name == "" { - return nil, errors.New("parameter name cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Expand != nil { - reqQP.Set("$expand", *options.Expand) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *WebCategoriesClient) getHandleResponse(resp *http.Response) (WebCategoriesClientGetResponse, error) { - result := WebCategoriesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureWebCategory); err != nil { - return WebCategoriesClientGetResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Gets all the Azure Web Categories in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.ListBySubscription -// method. -func (client *WebCategoriesClient) NewListBySubscriptionPager(options *WebCategoriesClientListBySubscriptionOptions) *runtime.Pager[WebCategoriesClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[WebCategoriesClientListBySubscriptionResponse]{ - More: func(page WebCategoriesClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *WebCategoriesClientListBySubscriptionResponse) (WebCategoriesClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebCategoriesClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WebCategoriesClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebCategoriesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *WebCategoriesClient) listBySubscriptionCreateRequest(ctx context.Context, options *WebCategoriesClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *WebCategoriesClient) listBySubscriptionHandleResponse(resp *http.Response) (WebCategoriesClientListBySubscriptionResponse, error) { - result := WebCategoriesClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureWebCategoryListResult); err != nil { - return WebCategoriesClientListBySubscriptionResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/CHANGELOG.md deleted file mode 100644 index 3b5a45f9..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/CHANGELOG.md +++ /dev/null @@ -1,2877 +0,0 @@ -# Release History - -## 1.0.0 (2022-05-17) -### Breaking Changes - -- Function `*ResourceGuardProxyClient.Put` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceGuardProxyClientPutOptions)` to `(context.Context, string, string, string, ResourceGuardProxyBaseResource, *ResourceGuardProxyClientPutOptions)` -- Function `*PrivateEndpointConnectionClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionClientDeleteResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionClientDeleteResponse], error)` -- Function `*PrivateEndpointConnectionClient.BeginPut` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionClientPutResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionClientPutResponse], error)` -- Function `*Client.BeginBMSTriggerDataMove` return value(s) have been changed from `(*armruntime.Poller[ClientBMSTriggerDataMoveResponse], error)` to `(*runtime.Poller[ClientBMSTriggerDataMoveResponse], error)` -- Function `*ValidateOperationClient.BeginTrigger` return value(s) have been changed from `(*armruntime.Poller[ValidateOperationClientTriggerResponse], error)` to `(*runtime.Poller[ValidateOperationClientTriggerResponse], error)` -- Function `*Client.BeginMoveRecoveryPoint` return value(s) have been changed from `(*armruntime.Poller[ClientMoveRecoveryPointResponse], error)` to `(*runtime.Poller[ClientMoveRecoveryPointResponse], error)` -- Function `*ProtectionPoliciesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ProtectionPoliciesClientDeleteResponse], error)` to `(*runtime.Poller[ProtectionPoliciesClientDeleteResponse], error)` -- Function `*Client.BeginBMSPrepareDataMove` return value(s) have been changed from `(*armruntime.Poller[ClientBMSPrepareDataMoveResponse], error)` to `(*runtime.Poller[ClientBMSPrepareDataMoveResponse], error)` -- Function `*RestoresClient.BeginTrigger` return value(s) have been changed from `(*armruntime.Poller[RestoresClientTriggerResponse], error)` to `(*runtime.Poller[RestoresClientTriggerResponse], error)` -- Const `TieringModeTierRecommended` has been removed -- Const `TieringModeInvalid` has been removed -- Const `TieringModeTierAfter` has been removed -- Const `TieringModeDoNotTier` has been removed -- Function `BackupManagementUsage.MarshalJSON` has been removed -- Function `PrepareDataMoveResponse.MarshalJSON` has been removed -- Function `BackupManagementUsageList.MarshalJSON` has been removed -- Function `ProtectionPolicyResourceList.MarshalJSON` has been removed -- Function `OperationWorkerResponse.MarshalJSON` has been removed -- Function `BMSRPQueryObject.MarshalJSON` has been removed -- Function `WorkloadItemResourceList.MarshalJSON` has been removed -- Function `OperationStatusProvisionILRExtendedInfo.MarshalJSON` has been removed -- Function `CloudErrorBody.MarshalJSON` has been removed -- Function `OperationStatus.MarshalJSON` has been removed -- Function `OperationResultInfo.MarshalJSON` has been removed -- Function `ClientDiscoveryForServiceSpecification.MarshalJSON` has been removed -- Function `OperationStatusJobsExtendedInfo.MarshalJSON` has been removed -- Function `WorkloadProtectableItemResourceList.MarshalJSON` has been removed -- Function `JobResourceList.MarshalJSON` has been removed -- Function `ResourceGuardProxyBaseResourceList.MarshalJSON` has been removed -- Function `NewErrorResponseError.MarshalJSON` has been removed -- Function `JobQueryObject.MarshalJSON` has been removed -- Function `ProtectableContainerResourceList.MarshalJSON` has been removed -- Function `RecoveryPointResourceList.MarshalJSON` has been removed -- Function `ProtectionContainerResourceList.MarshalJSON` has been removed -- Function `ValidateOperationResponse.MarshalJSON` has been removed -- Function `BackupEngineBaseResourceList.MarshalJSON` has been removed -- Function `OperationResultInfoBaseResource.MarshalJSON` has been removed -- Function `OperationStatusJobExtendedInfo.MarshalJSON` has been removed -- Function `ProtectedItemResourceList.MarshalJSON` has been removed -- Function `InstantItemRecoveryTarget.MarshalJSON` has been removed -- Function `OperationStatusValidateOperationExtendedInfo.MarshalJSON` has been removed -- Function `ExportJobsOperationResultInfo.MarshalJSON` has been removed -- Function `PossibleTieringModeValues` has been removed -- Function `ClientDiscoveryResponse.MarshalJSON` has been removed -- Function `ProtectionIntentResourceList.MarshalJSON` has been removed -- Struct `TieringPolicy` has been removed -- Field `TieringPolicy` of struct `AzureIaaSVMProtectionPolicy` has been removed -- Field `NewestRecoveryPointInArchive` of struct `AzureVMWorkloadProtectedItemExtendedInfo` has been removed -- Field `OldestRecoveryPointInArchive` of struct `AzureVMWorkloadProtectedItemExtendedInfo` has been removed -- Field `OldestRecoveryPointInVault` of struct `AzureVMWorkloadProtectedItemExtendedInfo` has been removed -- Field `NewestRecoveryPointInArchive` of struct `AzureIaaSVMProtectedItemExtendedInfo` has been removed -- Field `OldestRecoveryPointInArchive` of struct `AzureIaaSVMProtectedItemExtendedInfo` has been removed -- Field `OldestRecoveryPointInVault` of struct `AzureIaaSVMProtectedItemExtendedInfo` has been removed -- Field `TieringPolicy` of struct `SubProtectionPolicy` has been removed - - -## 0.5.0 (2022-04-18) -### Breaking Changes - -- Function `*RecoveryPointsRecommendedForMoveClient.List` has been removed -- Function `*ProtectableContainersClient.List` has been removed -- Function `*BackupProtectionIntentClient.List` has been removed -- Function `*BackupWorkloadItemsClient.List` has been removed -- Function `*BackupUsageSummariesClient.List` has been removed -- Function `*RecoveryPointsClient.List` has been removed -- Function `*BackupProtectedItemsClient.List` has been removed -- Function `*BackupProtectionContainersClient.List` has been removed -- Function `*BackupProtectableItemsClient.List` has been removed -- Function `*BackupJobsClient.List` has been removed -- Function `*BackupPoliciesClient.List` has been removed -- Function `*ResourceGuardProxiesClient.Get` has been removed -- Function `*OperationsClient.List` has been removed -- Function `*BackupEnginesClient.List` has been removed - -### Features Added - -- New function `*BackupUsageSummariesClient.NewListPager(string, string, *BackupUsageSummariesClientListOptions) *runtime.Pager[BackupUsageSummariesClientListResponse]` -- New function `*BackupProtectionIntentClient.NewListPager(string, string, *BackupProtectionIntentClientListOptions) *runtime.Pager[BackupProtectionIntentClientListResponse]` -- New function `*OperationsClient.NewListPager(*OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]` -- New function `*BackupProtectableItemsClient.NewListPager(string, string, *BackupProtectableItemsClientListOptions) *runtime.Pager[BackupProtectableItemsClientListResponse]` -- New function `*BackupProtectionContainersClient.NewListPager(string, string, *BackupProtectionContainersClientListOptions) *runtime.Pager[BackupProtectionContainersClientListResponse]` -- New function `*RecoveryPointsRecommendedForMoveClient.NewListPager(string, string, string, string, string, ListRecoveryPointsRecommendedForMoveRequest, *RecoveryPointsRecommendedForMoveClientListOptions) *runtime.Pager[RecoveryPointsRecommendedForMoveClientListResponse]` -- New function `*BackupProtectedItemsClient.NewListPager(string, string, *BackupProtectedItemsClientListOptions) *runtime.Pager[BackupProtectedItemsClientListResponse]` -- New function `*ProtectableContainersClient.NewListPager(string, string, string, *ProtectableContainersClientListOptions) *runtime.Pager[ProtectableContainersClientListResponse]` -- New function `*ResourceGuardProxiesClient.NewGetPager(string, string, *ResourceGuardProxiesClientGetOptions) *runtime.Pager[ResourceGuardProxiesClientGetResponse]` -- New function `*RecoveryPointsClient.NewListPager(string, string, string, string, string, *RecoveryPointsClientListOptions) *runtime.Pager[RecoveryPointsClientListResponse]` -- New function `*BackupEnginesClient.NewListPager(string, string, *BackupEnginesClientListOptions) *runtime.Pager[BackupEnginesClientListResponse]` -- New function `*BackupPoliciesClient.NewListPager(string, string, *BackupPoliciesClientListOptions) *runtime.Pager[BackupPoliciesClientListResponse]` -- New function `*BackupWorkloadItemsClient.NewListPager(string, string, string, string, *BackupWorkloadItemsClientListOptions) *runtime.Pager[BackupWorkloadItemsClientListResponse]` -- New function `*BackupJobsClient.NewListPager(string, string, *BackupJobsClientListOptions) *runtime.Pager[BackupJobsClientListResponse]` - - -## 0.4.0 (2022-04-12) -### Breaking Changes - -- Function `*RestoresClient.BeginTrigger` return value(s) have been changed from `(RestoresClientTriggerPollerResponse, error)` to `(*armruntime.Poller[RestoresClientTriggerResponse], error)` -- Function `NewClient` return value(s) have been changed from `(*Client)` to `(*Client, error)` -- Function `*BackupProtectedItemsClient.List` return value(s) have been changed from `(*BackupProtectedItemsClientListPager)` to `(*runtime.Pager[BackupProtectedItemsClientListResponse])` -- Function `NewValidateOperationClient` return value(s) have been changed from `(*ValidateOperationClient)` to `(*ValidateOperationClient, error)` -- Function `*BackupEnginesClient.List` return value(s) have been changed from `(*BackupEnginesClientListPager)` to `(*runtime.Pager[BackupEnginesClientListResponse])` -- Function `*ResourceGuardProxiesClient.Get` return value(s) have been changed from `(*ResourceGuardProxiesClientGetPager)` to `(*runtime.Pager[ResourceGuardProxiesClientGetResponse])` -- Function `NewBackupProtectedItemsClient` return value(s) have been changed from `(*BackupProtectedItemsClient)` to `(*BackupProtectedItemsClient, error)` -- Function `*BackupProtectableItemsClient.List` return value(s) have been changed from `(*BackupProtectableItemsClientListPager)` to `(*runtime.Pager[BackupProtectableItemsClientListResponse])` -- Function `NewBackupsClient` return value(s) have been changed from `(*BackupsClient)` to `(*BackupsClient, error)` -- Function `NewBackupProtectionIntentClient` return value(s) have been changed from `(*BackupProtectionIntentClient)` to `(*BackupProtectionIntentClient, error)` -- Function `NewResourceGuardProxiesClient` return value(s) have been changed from `(*ResourceGuardProxiesClient)` to `(*ResourceGuardProxiesClient, error)` -- Function `NewBackupWorkloadItemsClient` return value(s) have been changed from `(*BackupWorkloadItemsClient)` to `(*BackupWorkloadItemsClient, error)` -- Function `*BackupUsageSummariesClient.List` parameter(s) have been changed from `(context.Context, string, string, *BackupUsageSummariesClientListOptions)` to `(string, string, *BackupUsageSummariesClientListOptions)` -- Function `*BackupUsageSummariesClient.List` return value(s) have been changed from `(BackupUsageSummariesClientListResponse, error)` to `(*runtime.Pager[BackupUsageSummariesClientListResponse])` -- Function `*RecoveryPointsRecommendedForMoveClient.List` return value(s) have been changed from `(*RecoveryPointsRecommendedForMoveClientListPager)` to `(*runtime.Pager[RecoveryPointsRecommendedForMoveClientListResponse])` -- Function `*Client.BeginBMSTriggerDataMove` return value(s) have been changed from `(ClientBMSTriggerDataMovePollerResponse, error)` to `(*armruntime.Poller[ClientBMSTriggerDataMoveResponse], error)` -- Function `*Client.BeginBMSPrepareDataMove` return value(s) have been changed from `(ClientBMSPrepareDataMovePollerResponse, error)` to `(*armruntime.Poller[ClientBMSPrepareDataMoveResponse], error)` -- Function `NewProtectionIntentClient` return value(s) have been changed from `(*ProtectionIntentClient)` to `(*ProtectionIntentClient, error)` -- Function `NewBackupResourceVaultConfigsClient` return value(s) have been changed from `(*BackupResourceVaultConfigsClient)` to `(*BackupResourceVaultConfigsClient, error)` -- Function `NewFeatureSupportClient` return value(s) have been changed from `(*FeatureSupportClient)` to `(*FeatureSupportClient, error)` -- Function `NewBackupUsageSummariesClient` return value(s) have been changed from `(*BackupUsageSummariesClient)` to `(*BackupUsageSummariesClient, error)` -- Function `*BackupWorkloadItemsClient.List` return value(s) have been changed from `(*BackupWorkloadItemsClientListPager)` to `(*runtime.Pager[BackupWorkloadItemsClientListResponse])` -- Function `NewBackupStatusClient` return value(s) have been changed from `(*BackupStatusClient)` to `(*BackupStatusClient, error)` -- Function `NewPrivateEndpointClient` return value(s) have been changed from `(*PrivateEndpointClient)` to `(*PrivateEndpointClient, error)` -- Function `NewJobDetailsClient` return value(s) have been changed from `(*JobDetailsClient)` to `(*JobDetailsClient, error)` -- Function `NewJobsClient` return value(s) have been changed from `(*JobsClient)` to `(*JobsClient, error)` -- Function `NewProtectedItemOperationStatusesClient` return value(s) have been changed from `(*ProtectedItemOperationStatusesClient)` to `(*ProtectedItemOperationStatusesClient, error)` -- Function `NewOperationsClient` return value(s) have been changed from `(*OperationsClient)` to `(*OperationsClient, error)` -- Function `NewBackupProtectableItemsClient` return value(s) have been changed from `(*BackupProtectableItemsClient)` to `(*BackupProtectableItemsClient, error)` -- Function `NewOperationClient` return value(s) have been changed from `(*OperationClient)` to `(*OperationClient, error)` -- Function `*PrivateEndpointConnectionClient.BeginDelete` return value(s) have been changed from `(PrivateEndpointConnectionClientDeletePollerResponse, error)` to `(*armruntime.Poller[PrivateEndpointConnectionClientDeleteResponse], error)` -- Function `NewItemLevelRecoveryConnectionsClient` return value(s) have been changed from `(*ItemLevelRecoveryConnectionsClient)` to `(*ItemLevelRecoveryConnectionsClient, error)` -- Function `NewBackupResourceEncryptionConfigsClient` return value(s) have been changed from `(*BackupResourceEncryptionConfigsClient)` to `(*BackupResourceEncryptionConfigsClient, error)` -- Function `NewValidateOperationStatusesClient` return value(s) have been changed from `(*ValidateOperationStatusesClient)` to `(*ValidateOperationStatusesClient, error)` -- Function `NewRestoresClient` return value(s) have been changed from `(*RestoresClient)` to `(*RestoresClient, error)` -- Function `NewProtectedItemsClient` return value(s) have been changed from `(*ProtectedItemsClient)` to `(*ProtectedItemsClient, error)` -- Function `NewSecurityPINsClient` return value(s) have been changed from `(*SecurityPINsClient)` to `(*SecurityPINsClient, error)` -- Function `NewProtectableContainersClient` return value(s) have been changed from `(*ProtectableContainersClient)` to `(*ProtectableContainersClient, error)` -- Function `*BackupJobsClient.List` return value(s) have been changed from `(*BackupJobsClientListPager)` to `(*runtime.Pager[BackupJobsClientListResponse])` -- Function `NewProtectionPolicyOperationStatusesClient` return value(s) have been changed from `(*ProtectionPolicyOperationStatusesClient)` to `(*ProtectionPolicyOperationStatusesClient, error)` -- Function `NewJobOperationResultsClient` return value(s) have been changed from `(*JobOperationResultsClient)` to `(*JobOperationResultsClient, error)` -- Function `NewBackupEnginesClient` return value(s) have been changed from `(*BackupEnginesClient)` to `(*BackupEnginesClient, error)` -- Function `*BackupPoliciesClient.List` return value(s) have been changed from `(*BackupPoliciesClientListPager)` to `(*runtime.Pager[BackupPoliciesClientListResponse])` -- Function `NewProtectionContainersClient` return value(s) have been changed from `(*ProtectionContainersClient)` to `(*ProtectionContainersClient, error)` -- Function `*ProtectionPoliciesClient.BeginDelete` return value(s) have been changed from `(ProtectionPoliciesClientDeletePollerResponse, error)` to `(*armruntime.Poller[ProtectionPoliciesClientDeleteResponse], error)` -- Function `NewResourceGuardProxyClient` return value(s) have been changed from `(*ResourceGuardProxyClient)` to `(*ResourceGuardProxyClient, error)` -- Function `NewProtectedItemOperationResultsClient` return value(s) have been changed from `(*ProtectedItemOperationResultsClient)` to `(*ProtectedItemOperationResultsClient, error)` -- Function `NewBackupResourceStorageConfigsNonCRRClient` return value(s) have been changed from `(*BackupResourceStorageConfigsNonCRRClient)` to `(*BackupResourceStorageConfigsNonCRRClient, error)` -- Function `NewValidateOperationResultsClient` return value(s) have been changed from `(*ValidateOperationResultsClient)` to `(*ValidateOperationResultsClient, error)` -- Function `*RecoveryPointsClient.List` return value(s) have been changed from `(*RecoveryPointsClientListPager)` to `(*runtime.Pager[RecoveryPointsClientListResponse])` -- Function `NewProtectionContainerRefreshOperationResultsClient` return value(s) have been changed from `(*ProtectionContainerRefreshOperationResultsClient)` to `(*ProtectionContainerRefreshOperationResultsClient, error)` -- Function `NewBMSPrepareDataMoveOperationResultClient` return value(s) have been changed from `(*BMSPrepareDataMoveOperationResultClient)` to `(*BMSPrepareDataMoveOperationResultClient, error)` -- Function `NewProtectionPolicyOperationResultsClient` return value(s) have been changed from `(*ProtectionPolicyOperationResultsClient)` to `(*ProtectionPolicyOperationResultsClient, error)` -- Function `*BackupProtectionIntentClient.List` return value(s) have been changed from `(*BackupProtectionIntentClientListPager)` to `(*runtime.Pager[BackupProtectionIntentClientListResponse])` -- Function `NewExportJobsOperationResultsClient` return value(s) have been changed from `(*ExportJobsOperationResultsClient)` to `(*ExportJobsOperationResultsClient, error)` -- Function `NewBackupProtectionContainersClient` return value(s) have been changed from `(*BackupProtectionContainersClient)` to `(*BackupProtectionContainersClient, error)` -- Function `*ProtectableContainersClient.List` return value(s) have been changed from `(*ProtectableContainersClientListPager)` to `(*runtime.Pager[ProtectableContainersClientListResponse])` -- Function `NewProtectionPoliciesClient` return value(s) have been changed from `(*ProtectionPoliciesClient)` to `(*ProtectionPoliciesClient, error)` -- Function `NewProtectionContainerOperationResultsClient` return value(s) have been changed from `(*ProtectionContainerOperationResultsClient)` to `(*ProtectionContainerOperationResultsClient, error)` -- Function `NewBackupOperationResultsClient` return value(s) have been changed from `(*BackupOperationResultsClient)` to `(*BackupOperationResultsClient, error)` -- Function `NewRecoveryPointsRecommendedForMoveClient` return value(s) have been changed from `(*RecoveryPointsRecommendedForMoveClient)` to `(*RecoveryPointsRecommendedForMoveClient, error)` -- Function `NewJobCancellationsClient` return value(s) have been changed from `(*JobCancellationsClient)` to `(*JobCancellationsClient, error)` -- Function `*ValidateOperationClient.BeginTrigger` return value(s) have been changed from `(ValidateOperationClientTriggerPollerResponse, error)` to `(*armruntime.Poller[ValidateOperationClientTriggerResponse], error)` -- Function `*Client.BeginMoveRecoveryPoint` return value(s) have been changed from `(ClientMoveRecoveryPointPollerResponse, error)` to `(*armruntime.Poller[ClientMoveRecoveryPointResponse], error)` -- Function `NewPrivateEndpointConnectionClient` return value(s) have been changed from `(*PrivateEndpointConnectionClient)` to `(*PrivateEndpointConnectionClient, error)` -- Function `NewRecoveryPointsClient` return value(s) have been changed from `(*RecoveryPointsClient)` to `(*RecoveryPointsClient, error)` -- Function `NewBackupJobsClient` return value(s) have been changed from `(*BackupJobsClient)` to `(*BackupJobsClient, error)` -- Function `*BackupProtectionContainersClient.List` return value(s) have been changed from `(*BackupProtectionContainersClientListPager)` to `(*runtime.Pager[BackupProtectionContainersClientListResponse])` -- Function `NewBackupOperationStatusesClient` return value(s) have been changed from `(*BackupOperationStatusesClient)` to `(*BackupOperationStatusesClient, error)` -- Function `*PrivateEndpointConnectionClient.BeginPut` return value(s) have been changed from `(PrivateEndpointConnectionClientPutPollerResponse, error)` to `(*armruntime.Poller[PrivateEndpointConnectionClientPutResponse], error)` -- Function `NewBackupPoliciesClient` return value(s) have been changed from `(*BackupPoliciesClient)` to `(*BackupPoliciesClient, error)` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsClientListPager)` to `(*runtime.Pager[OperationsClientListResponse])` -- Function `*BackupProtectableItemsClientListPager.NextPage` has been removed -- Function `*ProtectionPoliciesClientDeletePoller.Poll` has been removed -- Function `*BackupProtectableItemsClientListPager.Err` has been removed -- Function `FabricName.ToPtr` has been removed -- Function `OperationStatusValues.ToPtr` has been removed -- Function `*PrivateEndpointConnectionClientPutPollerResponse.Resume` has been removed -- Function `*ClientBMSTriggerDataMovePoller.FinalResponse` has been removed -- Function `*BMSPrepareDataMoveOperationResultClientGetResult.UnmarshalJSON` has been removed -- Function `JobOperationType.ToPtr` has been removed -- Function `ValidateOperationClientTriggerPollerResponse.PollUntilDone` has been removed -- Function `*ValidateOperationClientTriggerPoller.ResumeToken` has been removed -- Function `*ProtectionPoliciesClientDeletePoller.Done` has been removed -- Function `*BackupProtectionIntentClientListPager.NextPage` has been removed -- Function `*ResourceGuardProxiesClientGetPager.PageResponse` has been removed -- Function `EncryptionAtRestType.ToPtr` has been removed -- Function `StorageType.ToPtr` has been removed -- Function `*ClientBMSPrepareDataMovePollerResponse.Resume` has been removed -- Function `*RecoveryPointsClientListPager.NextPage` has been removed -- Function `ProtectedItemState.ToPtr` has been removed -- Function `*BackupJobsClientListPager.NextPage` has been removed -- Function `*ValidateOperationClientTriggerPoller.Done` has been removed -- Function `*RecoveryPointsClientListPager.Err` has been removed -- Function `RehydrationPriority.ToPtr` has been removed -- Function `DataSourceType.ToPtr` has been removed -- Function `*BackupEnginesClientListPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionClientDeletePoller.FinalResponse` has been removed -- Function `*PrivateEndpointConnectionClientDeletePollerResponse.Resume` has been removed -- Function `*BackupProtectedItemsClientListPager.Err` has been removed -- Function `*BackupWorkloadItemsClientListPager.NextPage` has been removed -- Function `InquiryStatus.ToPtr` has been removed -- Function `*ProtectionPoliciesClientDeletePoller.ResumeToken` has been removed -- Function `ProvisioningState.ToPtr` has been removed -- Function `LastUpdateStatus.ToPtr` has been removed -- Function `BackupItemType.ToPtr` has been removed -- Function `ResourceHealthStatus.ToPtr` has been removed -- Function `*ProtectionPoliciesClientDeletePoller.FinalResponse` has been removed -- Function `InfrastructureEncryptionState.ToPtr` has been removed -- Function `*BackupPoliciesClientListPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionClientPutPoller.Done` has been removed -- Function `*ProtectableContainersClientListPager.NextPage` has been removed -- Function `CreateMode.ToPtr` has been removed -- Function `*ProtectionPoliciesClientDeletePollerResponse.Resume` has been removed -- Function `*PrivateEndpointConnectionClientPutPoller.FinalResponse` has been removed -- Function `*RecoveryPointsRecommendedForMoveClientListPager.Err` has been removed -- Function `*RecoveryPointsClientListPager.PageResponse` has been removed -- Function `*ClientMoveRecoveryPointPoller.ResumeToken` has been removed -- Function `*ClientBMSPrepareDataMovePoller.FinalResponse` has been removed -- Function `XcoolState.ToPtr` has been removed -- Function `Type.ToPtr` has been removed -- Function `*OperationsClientListPager.PageResponse` has been removed -- Function `*ClientBMSTriggerDataMovePoller.Done` has been removed -- Function `DedupState.ToPtr` has been removed -- Function `EnhancedSecurityState.ToPtr` has been removed -- Function `*PrivateEndpointConnectionClientDeletePoller.Done` has been removed -- Function `*ClientBMSPrepareDataMovePoller.Poll` has been removed -- Function `*ResourceGuardProxiesClientGetPager.Err` has been removed -- Function `PrivateEndpointConnectionStatus.ToPtr` has been removed -- Function `*RecoveryPointsRecommendedForMoveClientListPager.NextPage` has been removed -- Function `*RestoresClientTriggerPoller.Poll` has been removed -- Function `*BackupPoliciesClientListPager.Err` has been removed -- Function `SupportStatus.ToPtr` has been removed -- Function `*BackupProtectionIntentClientListPager.Err` has been removed -- Function `ScheduleRunType.ToPtr` has been removed -- Function `HealthStatus.ToPtr` has been removed -- Function `PrivateEndpointConnectionClientDeletePollerResponse.PollUntilDone` has been removed -- Function `ProtectionState.ToPtr` has been removed -- Function `IntentItemType.ToPtr` has been removed -- Function `OperationType.ToPtr` has been removed -- Function `*ClientMoveRecoveryPointPollerResponse.Resume` has been removed -- Function `*BackupProtectionContainersClientListPager.NextPage` has been removed -- Function `*ValidateOperationClientTriggerPoller.Poll` has been removed -- Function `*ValidateOperationClientTriggerPoller.FinalResponse` has been removed -- Function `*BackupProtectionIntentClientListPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionClientPutPoller.Poll` has been removed -- Function `DayOfWeek.ToPtr` has been removed -- Function `RetentionScheduleFormat.ToPtr` has been removed -- Function `RestoresClientTriggerPollerResponse.PollUntilDone` has been removed -- Function `*RestoresClientTriggerPoller.FinalResponse` has been removed -- Function `WorkloadType.ToPtr` has been removed -- Function `LastBackupStatus.ToPtr` has been removed -- Function `*BackupWorkloadItemsClientListPager.PageResponse` has been removed -- Function `SoftDeleteFeatureState.ToPtr` has been removed -- Function `*OperationsClientListPager.NextPage` has been removed -- Function `RecoveryType.ToPtr` has been removed -- Function `HTTPStatusCode.ToPtr` has been removed -- Function `ClientMoveRecoveryPointPollerResponse.PollUntilDone` has been removed -- Function `*BackupEnginesClientListPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionClientDeletePoller.ResumeToken` has been removed -- Function `*BackupProtectableItemsClientListPager.PageResponse` has been removed -- Function `PrivateEndpointConnectionClientPutPollerResponse.PollUntilDone` has been removed -- Function `StorageTypeState.ToPtr` has been removed -- Function `WorkloadItemType.ToPtr` has been removed -- Function `*ClientBMSTriggerDataMovePoller.ResumeToken` has been removed -- Function `MabServerType.ToPtr` has been removed -- Function `*PrivateEndpointConnectionClientPutPoller.ResumeToken` has been removed -- Function `*BackupProtectedItemsClientListPager.PageResponse` has been removed -- Function `PolicyType.ToPtr` has been removed -- Function `RecoveryMode.ToPtr` has been removed -- Function `UsagesUnit.ToPtr` has been removed -- Function `*BackupJobsClientListPager.PageResponse` has been removed -- Function `RecoveryPointTierType.ToPtr` has been removed -- Function `*BackupWorkloadItemsClientListPager.Err` has been removed -- Function `*ClientBMSPrepareDataMovePoller.ResumeToken` has been removed -- Function `RetentionDurationType.ToPtr` has been removed -- Function `ClientBMSPrepareDataMovePollerResponse.PollUntilDone` has been removed -- Function `*ClientMoveRecoveryPointPoller.Done` has been removed -- Function `CopyOptions.ToPtr` has been removed -- Function `HealthState.ToPtr` has been removed -- Function `*BackupProtectionContainersClientListPager.PageResponse` has been removed -- Function `ProtectionPoliciesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*RestoresClientTriggerPollerResponse.Resume` has been removed -- Function `SQLDataDirectoryType.ToPtr` has been removed -- Function `BackupType.ToPtr` has been removed -- Function `*BackupJobsClientListPager.Err` has been removed -- Function `*BackupProtectionContainersClientListPager.Err` has been removed -- Function `ContainerType.ToPtr` has been removed -- Function `*ClientBMSTriggerDataMovePollerResponse.Resume` has been removed -- Function `JobStatus.ToPtr` has been removed -- Function `*PrivateEndpointConnectionClientDeletePoller.Poll` has been removed -- Function `*OperationsClientListPager.Err` has been removed -- Function `BackupEngineType.ToPtr` has been removed -- Function `ClientBMSTriggerDataMovePollerResponse.PollUntilDone` has been removed -- Function `*ClientBMSTriggerDataMovePoller.Poll` has been removed -- Function `MonthOfYear.ToPtr` has been removed -- Function `*BackupEnginesClientListPager.Err` has been removed -- Function `OverwriteOptions.ToPtr` has been removed -- Function `*ResourceGuardProxiesClientGetPager.NextPage` has been removed -- Function `*RestoresClientTriggerPoller.ResumeToken` has been removed -- Function `AzureFileShareType.ToPtr` has been removed -- Function `ProtectionIntentItemType.ToPtr` has been removed -- Function `*ClientBMSPrepareDataMovePoller.Done` has been removed -- Function `ProtectionStatus.ToPtr` has been removed -- Function `*ClientMoveRecoveryPointPoller.Poll` has been removed -- Function `*ClientMoveRecoveryPointPoller.FinalResponse` has been removed -- Function `ValidationStatus.ToPtr` has been removed -- Function `RestorePointQueryType.ToPtr` has been removed -- Function `*ValidateOperationClientTriggerPollerResponse.Resume` has been removed -- Function `RecoveryPointTierStatus.ToPtr` has been removed -- Function `*RecoveryPointsRecommendedForMoveClientListPager.PageResponse` has been removed -- Function `DataMoveLevel.ToPtr` has been removed -- Function `WeekOfMonth.ToPtr` has been removed -- Function `BackupManagementType.ToPtr` has been removed -- Function `RestoreRequestType.ToPtr` has been removed -- Function `RestorePointType.ToPtr` has been removed -- Function `*BackupProtectedItemsClientListPager.NextPage` has been removed -- Function `ProtectedItemHealthStatus.ToPtr` has been removed -- Function `*ProtectableContainersClientListPager.Err` has been removed -- Function `*BackupPoliciesClientListPager.PageResponse` has been removed -- Function `AcquireStorageAccountLock.ToPtr` has been removed -- Function `*ProtectableContainersClientListPager.PageResponse` has been removed -- Function `*RestoresClientTriggerPoller.Done` has been removed -- Function `IAASVMPolicyType.ToPtr` has been removed -- Function `JobSupportedAction.ToPtr` has been removed -- Struct `BMSPrepareDataMoveOperationResultClientGetResult` has been removed -- Struct `BackupEnginesClientGetResult` has been removed -- Struct `BackupEnginesClientListPager` has been removed -- Struct `BackupEnginesClientListResult` has been removed -- Struct `BackupJobsClientListPager` has been removed -- Struct `BackupJobsClientListResult` has been removed -- Struct `BackupOperationStatusesClientGetResult` has been removed -- Struct `BackupPoliciesClientListPager` has been removed -- Struct `BackupPoliciesClientListResult` has been removed -- Struct `BackupProtectableItemsClientListPager` has been removed -- Struct `BackupProtectableItemsClientListResult` has been removed -- Struct `BackupProtectedItemsClientListPager` has been removed -- Struct `BackupProtectedItemsClientListResult` has been removed -- Struct `BackupProtectionContainersClientListPager` has been removed -- Struct `BackupProtectionContainersClientListResult` has been removed -- Struct `BackupProtectionIntentClientListPager` has been removed -- Struct `BackupProtectionIntentClientListResult` has been removed -- Struct `BackupResourceEncryptionConfigsClientGetResult` has been removed -- Struct `BackupResourceStorageConfigsNonCRRClientGetResult` has been removed -- Struct `BackupResourceStorageConfigsNonCRRClientUpdateResult` has been removed -- Struct `BackupResourceVaultConfigsClientGetResult` has been removed -- Struct `BackupResourceVaultConfigsClientPutResult` has been removed -- Struct `BackupResourceVaultConfigsClientUpdateResult` has been removed -- Struct `BackupStatusClientGetResult` has been removed -- Struct `BackupUsageSummariesClientListResult` has been removed -- Struct `BackupWorkloadItemsClientListPager` has been removed -- Struct `BackupWorkloadItemsClientListResult` has been removed -- Struct `ClientBMSPrepareDataMovePoller` has been removed -- Struct `ClientBMSPrepareDataMovePollerResponse` has been removed -- Struct `ClientBMSTriggerDataMovePoller` has been removed -- Struct `ClientBMSTriggerDataMovePollerResponse` has been removed -- Struct `ClientGetOperationStatusResult` has been removed -- Struct `ClientMoveRecoveryPointPoller` has been removed -- Struct `ClientMoveRecoveryPointPollerResponse` has been removed -- Struct `ExportJobsOperationResultsClientGetResult` has been removed -- Struct `FeatureSupportClientValidateResult` has been removed -- Struct `JobDetailsClientGetResult` has been removed -- Struct `OperationClientValidateResult` has been removed -- Struct `OperationsClientListPager` has been removed -- Struct `OperationsClientListResult` has been removed -- Struct `PrivateEndpointClientGetOperationStatusResult` has been removed -- Struct `PrivateEndpointConnectionClientDeletePoller` has been removed -- Struct `PrivateEndpointConnectionClientDeletePollerResponse` has been removed -- Struct `PrivateEndpointConnectionClientGetResult` has been removed -- Struct `PrivateEndpointConnectionClientPutPoller` has been removed -- Struct `PrivateEndpointConnectionClientPutPollerResponse` has been removed -- Struct `PrivateEndpointConnectionClientPutResult` has been removed -- Struct `ProtectableContainersClientListPager` has been removed -- Struct `ProtectableContainersClientListResult` has been removed -- Struct `ProtectedItemOperationResultsClientGetResult` has been removed -- Struct `ProtectedItemOperationStatusesClientGetResult` has been removed -- Struct `ProtectedItemsClientCreateOrUpdateResult` has been removed -- Struct `ProtectedItemsClientGetResult` has been removed -- Struct `ProtectionContainerOperationResultsClientGetResult` has been removed -- Struct `ProtectionContainersClientGetResult` has been removed -- Struct `ProtectionContainersClientRegisterResult` has been removed -- Struct `ProtectionIntentClientCreateOrUpdateResult` has been removed -- Struct `ProtectionIntentClientGetResult` has been removed -- Struct `ProtectionIntentClientValidateResult` has been removed -- Struct `ProtectionPoliciesClientCreateOrUpdateResult` has been removed -- Struct `ProtectionPoliciesClientDeletePoller` has been removed -- Struct `ProtectionPoliciesClientDeletePollerResponse` has been removed -- Struct `ProtectionPoliciesClientGetResult` has been removed -- Struct `ProtectionPolicyOperationResultsClientGetResult` has been removed -- Struct `ProtectionPolicyOperationStatusesClientGetResult` has been removed -- Struct `RecoveryPointsClientGetResult` has been removed -- Struct `RecoveryPointsClientListPager` has been removed -- Struct `RecoveryPointsClientListResult` has been removed -- Struct `RecoveryPointsRecommendedForMoveClientListPager` has been removed -- Struct `RecoveryPointsRecommendedForMoveClientListResult` has been removed -- Struct `ResourceGuardProxiesClientGetPager` has been removed -- Struct `ResourceGuardProxiesClientGetResult` has been removed -- Struct `ResourceGuardProxyClientGetResult` has been removed -- Struct `ResourceGuardProxyClientPutResult` has been removed -- Struct `ResourceGuardProxyClientUnlockDeleteResult` has been removed -- Struct `RestoresClientTriggerPoller` has been removed -- Struct `RestoresClientTriggerPollerResponse` has been removed -- Struct `SecurityPINsClientGetResult` has been removed -- Struct `ValidateOperationClientTriggerPoller` has been removed -- Struct `ValidateOperationClientTriggerPollerResponse` has been removed -- Struct `ValidateOperationResultsClientGetResult` has been removed -- Struct `ValidateOperationStatusesClientGetResult` has been removed -- Field `RawResponse` of struct `ItemLevelRecoveryConnectionsClientRevokeResponse` has been removed -- Field `ProtectionIntentClientValidateResult` of struct `ProtectionIntentClientValidateResponse` has been removed -- Field `RawResponse` of struct `ProtectionIntentClientValidateResponse` has been removed -- Field `PrivateEndpointConnectionClientPutResult` of struct `PrivateEndpointConnectionClientPutResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionClientPutResponse` has been removed -- Field `ResourceGuardProxiesClientGetResult` of struct `ResourceGuardProxiesClientGetResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardProxiesClientGetResponse` has been removed -- Field `ProtectedItemsClientCreateOrUpdateResult` of struct `ProtectedItemsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ProtectedItemsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ProtectionContainerRefreshOperationResultsClientGetResponse` has been removed -- Field `RawResponse` of struct `ClientMoveRecoveryPointResponse` has been removed -- Field `RawResponse` of struct `BackupResourceStorageConfigsNonCRRClientPatchResponse` has been removed -- Field `RawResponse` of struct `BackupResourceEncryptionConfigsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ProtectionIntentClientDeleteResponse` has been removed -- Field `RawResponse` of struct `JobsClientExportResponse` has been removed -- Field `ProtectionPolicyOperationStatusesClientGetResult` of struct `ProtectionPolicyOperationStatusesClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectionPolicyOperationStatusesClientGetResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionClientDeleteResponse` has been removed -- Field `RawResponse` of struct `ProtectionPoliciesClientDeleteResponse` has been removed -- Field `SecurityPINsClientGetResult` of struct `SecurityPINsClientGetResponse` has been removed -- Field `RawResponse` of struct `SecurityPINsClientGetResponse` has been removed -- Field `ProtectionContainersClientGetResult` of struct `ProtectionContainersClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectionContainersClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectionContainersClientUnregisterResponse` has been removed -- Field `BackupJobsClientListResult` of struct `BackupJobsClientListResponse` has been removed -- Field `RawResponse` of struct `BackupJobsClientListResponse` has been removed -- Field `RawResponse` of struct `JobCancellationsClientTriggerResponse` has been removed -- Field `JobDetailsClientGetResult` of struct `JobDetailsClientGetResponse` has been removed -- Field `RawResponse` of struct `JobDetailsClientGetResponse` has been removed -- Field `BackupProtectionIntentClientListResult` of struct `BackupProtectionIntentClientListResponse` has been removed -- Field `RawResponse` of struct `BackupProtectionIntentClientListResponse` has been removed -- Field `RawResponse` of struct `ProtectionContainersClientRefreshResponse` has been removed -- Field `ProtectedItemsClientGetResult` of struct `ProtectedItemsClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectedItemsClientGetResponse` has been removed -- Field `RawResponse` of struct `ClientBMSPrepareDataMoveResponse` has been removed -- Field `ResourceGuardProxyClientPutResult` of struct `ResourceGuardProxyClientPutResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardProxyClientPutResponse` has been removed -- Field `BackupUsageSummariesClientListResult` of struct `BackupUsageSummariesClientListResponse` has been removed -- Field `RawResponse` of struct `BackupUsageSummariesClientListResponse` has been removed -- Field `ExportJobsOperationResultsClientGetResult` of struct `ExportJobsOperationResultsClientGetResponse` has been removed -- Field `RawResponse` of struct `ExportJobsOperationResultsClientGetResponse` has been removed -- Field `ProtectionPoliciesClientGetResult` of struct `ProtectionPoliciesClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectionPoliciesClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupOperationResultsClientGetResponse` has been removed -- Field `ProtectionContainersClientRegisterResult` of struct `ProtectionContainersClientRegisterResponse` has been removed -- Field `RawResponse` of struct `ProtectionContainersClientRegisterResponse` has been removed -- Field `ClientGetOperationStatusResult` of struct `ClientGetOperationStatusResponse` has been removed -- Field `RawResponse` of struct `ClientGetOperationStatusResponse` has been removed -- Field `BackupEnginesClientListResult` of struct `BackupEnginesClientListResponse` has been removed -- Field `RawResponse` of struct `BackupEnginesClientListResponse` has been removed -- Field `ProtectionPolicyOperationResultsClientGetResult` of struct `ProtectionPolicyOperationResultsClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectionPolicyOperationResultsClientGetResponse` has been removed -- Field `FeatureSupportClientValidateResult` of struct `FeatureSupportClientValidateResponse` has been removed -- Field `RawResponse` of struct `FeatureSupportClientValidateResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardProxyClientDeleteResponse` has been removed -- Field `PrivateEndpointClientGetOperationStatusResult` of struct `PrivateEndpointClientGetOperationStatusResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointClientGetOperationStatusResponse` has been removed -- Field `RecoveryPointsRecommendedForMoveClientListResult` of struct `RecoveryPointsRecommendedForMoveClientListResponse` has been removed -- Field `RawResponse` of struct `RecoveryPointsRecommendedForMoveClientListResponse` has been removed -- Field `OperationsClientListResult` of struct `OperationsClientListResponse` has been removed -- Field `RawResponse` of struct `OperationsClientListResponse` has been removed -- Field `ProtectionPoliciesClientCreateOrUpdateResult` of struct `ProtectionPoliciesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ProtectionPoliciesClientCreateOrUpdateResponse` has been removed -- Field `BackupResourceEncryptionConfigsClientGetResult` of struct `BackupResourceEncryptionConfigsClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupResourceEncryptionConfigsClientGetResponse` has been removed -- Field `RawResponse` of struct `RestoresClientTriggerResponse` has been removed -- Field `RawResponse` of struct `JobOperationResultsClientGetResponse` has been removed -- Field `RecoveryPointsClientGetResult` of struct `RecoveryPointsClientGetResponse` has been removed -- Field `RawResponse` of struct `RecoveryPointsClientGetResponse` has been removed -- Field `ProtectionContainerOperationResultsClientGetResult` of struct `ProtectionContainerOperationResultsClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectionContainerOperationResultsClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectionContainersClientInquireResponse` has been removed -- Field `ProtectedItemOperationStatusesClientGetResult` of struct `ProtectedItemOperationStatusesClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectedItemOperationStatusesClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectedItemsClientDeleteResponse` has been removed -- Field `ProtectionIntentClientCreateOrUpdateResult` of struct `ProtectionIntentClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ProtectionIntentClientCreateOrUpdateResponse` has been removed -- Field `ProtectableContainersClientListResult` of struct `ProtectableContainersClientListResponse` has been removed -- Field `RawResponse` of struct `ProtectableContainersClientListResponse` has been removed -- Field `BackupStatusClientGetResult` of struct `BackupStatusClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupStatusClientGetResponse` has been removed -- Field `ResourceGuardProxyClientUnlockDeleteResult` of struct `ResourceGuardProxyClientUnlockDeleteResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardProxyClientUnlockDeleteResponse` has been removed -- Field `RecoveryPointsClientListResult` of struct `RecoveryPointsClientListResponse` has been removed -- Field `RawResponse` of struct `RecoveryPointsClientListResponse` has been removed -- Field `PrivateEndpointConnectionClientGetResult` of struct `PrivateEndpointConnectionClientGetResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupsClientTriggerResponse` has been removed -- Field `ResourceGuardProxyClientGetResult` of struct `ResourceGuardProxyClientGetResponse` has been removed -- Field `RawResponse` of struct `ResourceGuardProxyClientGetResponse` has been removed -- Field `ProtectedItemOperationResultsClientGetResult` of struct `ProtectedItemOperationResultsClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectedItemOperationResultsClientGetResponse` has been removed -- Field `RawResponse` of struct `ItemLevelRecoveryConnectionsClientProvisionResponse` has been removed -- Field `BackupProtectedItemsClientListResult` of struct `BackupProtectedItemsClientListResponse` has been removed -- Field `RawResponse` of struct `BackupProtectedItemsClientListResponse` has been removed -- Field `BackupPoliciesClientListResult` of struct `BackupPoliciesClientListResponse` has been removed -- Field `RawResponse` of struct `BackupPoliciesClientListResponse` has been removed -- Field `BackupOperationStatusesClientGetResult` of struct `BackupOperationStatusesClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupOperationStatusesClientGetResponse` has been removed -- Field `BackupResourceVaultConfigsClientUpdateResult` of struct `BackupResourceVaultConfigsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `BackupResourceVaultConfigsClientUpdateResponse` has been removed -- Field `ValidateOperationStatusesClientGetResult` of struct `ValidateOperationStatusesClientGetResponse` has been removed -- Field `RawResponse` of struct `ValidateOperationStatusesClientGetResponse` has been removed -- Field `ValidateOperationResultsClientGetResult` of struct `ValidateOperationResultsClientGetResponse` has been removed -- Field `RawResponse` of struct `ValidateOperationResultsClientGetResponse` has been removed -- Field `BackupResourceStorageConfigsNonCRRClientGetResult` of struct `BackupResourceStorageConfigsNonCRRClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupResourceStorageConfigsNonCRRClientGetResponse` has been removed -- Field `BackupProtectionContainersClientListResult` of struct `BackupProtectionContainersClientListResponse` has been removed -- Field `RawResponse` of struct `BackupProtectionContainersClientListResponse` has been removed -- Field `RawResponse` of struct `ClientBMSTriggerDataMoveResponse` has been removed -- Field `BackupResourceStorageConfigsNonCRRClientUpdateResult` of struct `BackupResourceStorageConfigsNonCRRClientUpdateResponse` has been removed -- Field `RawResponse` of struct `BackupResourceStorageConfigsNonCRRClientUpdateResponse` has been removed -- Field `OperationClientValidateResult` of struct `OperationClientValidateResponse` has been removed -- Field `RawResponse` of struct `OperationClientValidateResponse` has been removed -- Field `BackupResourceVaultConfigsClientGetResult` of struct `BackupResourceVaultConfigsClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupResourceVaultConfigsClientGetResponse` has been removed -- Field `ProtectionIntentClientGetResult` of struct `ProtectionIntentClientGetResponse` has been removed -- Field `RawResponse` of struct `ProtectionIntentClientGetResponse` has been removed -- Field `BackupEnginesClientGetResult` of struct `BackupEnginesClientGetResponse` has been removed -- Field `RawResponse` of struct `BackupEnginesClientGetResponse` has been removed -- Field `BackupResourceVaultConfigsClientPutResult` of struct `BackupResourceVaultConfigsClientPutResponse` has been removed -- Field `RawResponse` of struct `BackupResourceVaultConfigsClientPutResponse` has been removed -- Field `BMSPrepareDataMoveOperationResultClientGetResult` of struct `BMSPrepareDataMoveOperationResultClientGetResponse` has been removed -- Field `RawResponse` of struct `BMSPrepareDataMoveOperationResultClientGetResponse` has been removed -- Field `BackupWorkloadItemsClientListResult` of struct `BackupWorkloadItemsClientListResponse` has been removed -- Field `RawResponse` of struct `BackupWorkloadItemsClientListResponse` has been removed -- Field `BackupProtectableItemsClientListResult` of struct `BackupProtectableItemsClientListResponse` has been removed -- Field `RawResponse` of struct `BackupProtectableItemsClientListResponse` has been removed -- Field `RawResponse` of struct `ValidateOperationClientTriggerResponse` has been removed - -### Features Added - -- New const `TieringModeTierAfter` -- New const `TieringModeDoNotTier` -- New const `TieringModeInvalid` -- New const `TieringModeTierRecommended` -- New function `*JobQueryObject.UnmarshalJSON([]byte) error` -- New function `*BMSRPQueryObject.UnmarshalJSON([]byte) error` -- New function `*BMSPrepareDataMoveOperationResultClientGetResponse.UnmarshalJSON([]byte) error` -- New function `CloudErrorBody.MarshalJSON() ([]byte, error)` -- New function `PossibleTieringModeValues() []TieringMode` -- New function `BMSRPQueryObject.MarshalJSON() ([]byte, error)` -- New function `JobQueryObject.MarshalJSON() ([]byte, error)` -- New function `NewErrorResponseError.MarshalJSON() ([]byte, error)` -- New struct `BMSBackupEngineQueryObject` -- New struct `BMSBackupEnginesQueryObject` -- New struct `BMSBackupSummariesQueryObject` -- New struct `BMSContainerQueryObject` -- New struct `BMSContainersInquiryQueryObject` -- New struct `BMSPOQueryObject` -- New struct `BMSRPQueryObject` -- New struct `BMSRefreshContainersQueryObject` -- New struct `BMSWorkloadItemQueryObject` -- New struct `CloudError` -- New struct `CloudErrorBody` -- New struct `ErrorAdditionalInfo` -- New struct `GetProtectedItemQueryObject` -- New struct `JobQueryObject` -- New struct `NewErrorResponse` -- New struct `NewErrorResponseError` -- New struct `ProtectedItemQueryObject` -- New struct `ProtectionIntentQueryObject` -- New struct `ProtectionPolicyQueryObject` -- New struct `TieringPolicy` -- New anonymous field `ProtectionContainerResource` in struct `ProtectionContainerOperationResultsClientGetResponse` -- New anonymous field `ProtectionPolicyResource` in struct `ProtectionPoliciesClientGetResponse` -- New anonymous field `BackupEngineBaseResource` in struct `BackupEnginesClientGetResponse` -- New anonymous field `RecoveryPointResourceList` in struct `RecoveryPointsClientListResponse` -- New anonymous field `ProtectedItemResourceList` in struct `BackupProtectedItemsClientListResponse` -- New anonymous field `ValidateOperationsResponse` in struct `OperationClientValidateResponse` -- New anonymous field `OperationStatus` in struct `ProtectionPolicyOperationStatusesClientGetResponse` -- New anonymous field `JobResource` in struct `JobDetailsClientGetResponse` -- New anonymous field `ResourceGuardProxyBaseResource` in struct `ResourceGuardProxyClientGetResponse` -- New anonymous field `ResourceGuardProxyBaseResource` in struct `ResourceGuardProxyClientPutResponse` -- New anonymous field `ProtectedItemResource` in struct `ProtectedItemOperationResultsClientGetResponse` -- New anonymous field `PrivateEndpointConnectionResource` in struct `PrivateEndpointConnectionClientGetResponse` -- New anonymous field `AzureVMResourceFeatureSupportResponse` in struct `FeatureSupportClientValidateResponse` -- New anonymous field `WorkloadProtectableItemResourceList` in struct `BackupProtectableItemsClientListResponse` -- New anonymous field `BackupResourceConfigResource` in struct `BackupResourceStorageConfigsNonCRRClientUpdateResponse` -- New anonymous field `ClientDiscoveryResponse` in struct `OperationsClientListResponse` -- New anonymous field `ProtectionPolicyResourceList` in struct `BackupPoliciesClientListResponse` -- New field `ResumeToken` in struct `PrivateEndpointConnectionClientBeginDeleteOptions` -- New anonymous field `ProtectionPolicyResource` in struct `ProtectionPoliciesClientCreateOrUpdateResponse` -- New anonymous field `ProtectionContainerResource` in struct `ProtectionContainersClientGetResponse` -- New anonymous field `OperationStatus` in struct `ValidateOperationStatusesClientGetResponse` -- New anonymous field `BackupResourceVaultConfigResource` in struct `BackupResourceVaultConfigsClientGetResponse` -- New field `ResumeToken` in struct `ProtectionPoliciesClientBeginDeleteOptions` -- New anonymous field `RecoveryPointResourceList` in struct `RecoveryPointsRecommendedForMoveClientListResponse` -- New field `TieringPolicy` in struct `SubProtectionPolicy` -- New anonymous field `JobResourceList` in struct `BackupJobsClientListResponse` -- New field `TieringPolicy` in struct `AzureIaaSVMProtectionPolicy` -- New anonymous field `UnlockDeleteResponse` in struct `ResourceGuardProxyClientUnlockDeleteResponse` -- New anonymous field `OperationStatus` in struct `PrivateEndpointClientGetOperationStatusResponse` -- New anonymous field `OperationResultInfoBaseResource` in struct `ExportJobsOperationResultsClientGetResponse` -- New anonymous field `BackupResourceEncryptionConfigExtendedResource` in struct `BackupResourceEncryptionConfigsClientGetResponse` -- New anonymous field `ValidateOperationsResponse` in struct `ValidateOperationResultsClientGetResponse` -- New anonymous field `ProtectableContainerResourceList` in struct `ProtectableContainersClientListResponse` -- New anonymous field `TokenInformation` in struct `SecurityPINsClientGetResponse` -- New anonymous field `BackupStatusResponse` in struct `BackupStatusClientGetResponse` -- New anonymous field `ProtectionContainerResourceList` in struct `BackupProtectionContainersClientListResponse` -- New anonymous field `PreValidateEnableBackupResponse` in struct `ProtectionIntentClientValidateResponse` -- New anonymous field `ResourceGuardProxyBaseResourceList` in struct `ResourceGuardProxiesClientGetResponse` -- New field `ResumeToken` in struct `ClientBeginBMSTriggerDataMoveOptions` -- New anonymous field `ProtectionContainerResource` in struct `ProtectionContainersClientRegisterResponse` -- New anonymous field `ProtectionPolicyResource` in struct `ProtectionPolicyOperationResultsClientGetResponse` -- New field `ResumeToken` in struct `ClientBeginMoveRecoveryPointOptions` -- New anonymous field `BackupResourceConfigResource` in struct `BackupResourceStorageConfigsNonCRRClientGetResponse` -- New anonymous field `BackupResourceVaultConfigResource` in struct `BackupResourceVaultConfigsClientUpdateResponse` -- New anonymous field `PrivateEndpointConnectionResource` in struct `PrivateEndpointConnectionClientPutResponse` -- New anonymous field `ProtectionIntentResourceList` in struct `BackupProtectionIntentClientListResponse` -- New anonymous field `OperationStatus` in struct `BackupOperationStatusesClientGetResponse` -- New anonymous field `VaultStorageConfigOperationResultResponseClassification` in struct `BMSPrepareDataMoveOperationResultClientGetResponse` -- New field `ResumeToken` in struct `ClientBeginBMSPrepareDataMoveOptions` -- New anonymous field `BackupResourceVaultConfigResource` in struct `BackupResourceVaultConfigsClientPutResponse` -- New field `ResumeToken` in struct `ValidateOperationClientBeginTriggerOptions` -- New field `ResumeToken` in struct `PrivateEndpointConnectionClientBeginPutOptions` -- New anonymous field `ProtectionIntentResource` in struct `ProtectionIntentClientCreateOrUpdateResponse` -- New anonymous field `ProtectionIntentResource` in struct `ProtectionIntentClientGetResponse` -- New anonymous field `BackupEngineBaseResourceList` in struct `BackupEnginesClientListResponse` -- New anonymous field `OperationStatus` in struct `ProtectedItemOperationStatusesClientGetResponse` -- New anonymous field `ProtectedItemResource` in struct `ProtectedItemsClientCreateOrUpdateResponse` -- New anonymous field `RecoveryPointResource` in struct `RecoveryPointsClientGetResponse` -- New field `OldestRecoveryPointInVault` in struct `AzureVMWorkloadProtectedItemExtendedInfo` -- New field `NewestRecoveryPointInArchive` in struct `AzureVMWorkloadProtectedItemExtendedInfo` -- New field `OldestRecoveryPointInArchive` in struct `AzureVMWorkloadProtectedItemExtendedInfo` -- New anonymous field `ProtectedItemResource` in struct `ProtectedItemsClientGetResponse` -- New field `NewestRecoveryPointInArchive` in struct `AzureIaaSVMProtectedItemExtendedInfo` -- New field `OldestRecoveryPointInArchive` in struct `AzureIaaSVMProtectedItemExtendedInfo` -- New field `OldestRecoveryPointInVault` in struct `AzureIaaSVMProtectedItemExtendedInfo` -- New anonymous field `OperationStatus` in struct `ClientGetOperationStatusResponse` -- New anonymous field `WorkloadItemResourceList` in struct `BackupWorkloadItemsClientListResponse` -- New anonymous field `BackupManagementUsageList` in struct `BackupUsageSummariesClientListResponse` -- New field `ResumeToken` in struct `RestoresClientBeginTriggerOptions` - - -## 0.3.1 (2022-02-22) - -### Other Changes - -- Remove the go_mod_tidy_hack.go file. - -## 0.3.0 (2022-02-15) -### Breaking Changes - -- Function `CloudErrorBody.MarshalJSON` has been removed -- Function `NewErrorResponseError.MarshalJSON` has been removed -- Function `JobQueryObject.MarshalJSON` has been removed -- Function `BMSRPQueryObject.MarshalJSON` has been removed -- Function `*JobQueryObject.UnmarshalJSON` has been removed -- Function `*BMSRPQueryObject.UnmarshalJSON` has been removed -- Struct `BMSBackupEngineQueryObject` has been removed -- Struct `BMSBackupEnginesQueryObject` has been removed -- Struct `BMSBackupSummariesQueryObject` has been removed -- Struct `BMSContainerQueryObject` has been removed -- Struct `BMSContainersInquiryQueryObject` has been removed -- Struct `BMSPOQueryObject` has been removed -- Struct `BMSRPQueryObject` has been removed -- Struct `BMSRefreshContainersQueryObject` has been removed -- Struct `BMSWorkloadItemQueryObject` has been removed -- Struct `CloudError` has been removed -- Struct `CloudErrorBody` has been removed -- Struct `ErrorAdditionalInfo` has been removed -- Struct `GetProtectedItemQueryObject` has been removed -- Struct `JobQueryObject` has been removed -- Struct `NewErrorResponse` has been removed -- Struct `NewErrorResponseError` has been removed -- Struct `ProtectedItemQueryObject` has been removed -- Struct `ProtectionIntentQueryObject` has been removed -- Struct `ProtectionPolicyQueryObject` has been removed - -### Features Added - -- New const `ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent` -- New const `ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent` -- New const `ContainerTypeMicrosoftComputeVirtualMachines` -- New const `IAASVMPolicyTypeV2` -- New const `ContainerTypeMicrosoftClassicComputeVirtualMachines` -- New const `IAASVMPolicyTypeInvalid` -- New const `ContainerTypeAzureWorkloadContainer` -- New const `IAASVMPolicyTypeV1` -- New function `*SimpleSchedulePolicyV2.GetSchedulePolicy() *SchedulePolicy` -- New function `PossibleIAASVMPolicyTypeValues() []IAASVMPolicyType` -- New function `DailySchedule.MarshalJSON() ([]byte, error)` -- New function `SimpleSchedulePolicyV2.MarshalJSON() ([]byte, error)` -- New function `WeeklySchedule.MarshalJSON() ([]byte, error)` -- New function `*SimpleSchedulePolicyV2.UnmarshalJSON([]byte) error` -- New function `IAASVMPolicyType.ToPtr() *IAASVMPolicyType` -- New struct `DailySchedule` -- New struct `SimpleSchedulePolicyV2` -- New struct `WeeklySchedule` -- New field `PolicyType` in struct `AzureIaaSVMProtectionPolicy` - - -## 0.2.0 (2022-01-13) -### Breaking Changes - -- Function `*ProtectionIntentClient.Validate` parameter(s) have been changed from `(context.Context, string, PreValidateEnableBackupRequest, *ProtectionIntentValidateOptions)` to `(context.Context, string, PreValidateEnableBackupRequest, *ProtectionIntentClientValidateOptions)` -- Function `*ProtectionIntentClient.Validate` return value(s) have been changed from `(ProtectionIntentValidateResponse, error)` to `(ProtectionIntentClientValidateResponse, error)` -- Function `*ProtectionPolicyOperationResultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *ProtectionPolicyOperationResultsGetOptions)` to `(context.Context, string, string, string, string, *ProtectionPolicyOperationResultsClientGetOptions)` -- Function `*ProtectionPolicyOperationResultsClient.Get` return value(s) have been changed from `(ProtectionPolicyOperationResultsGetResponse, error)` to `(ProtectionPolicyOperationResultsClientGetResponse, error)` -- Function `*BackupPoliciesClient.List` parameter(s) have been changed from `(string, string, *BackupPoliciesListOptions)` to `(string, string, *BackupPoliciesClientListOptions)` -- Function `*BackupPoliciesClient.List` return value(s) have been changed from `(*BackupPoliciesListPager)` to `(*BackupPoliciesClientListPager)` -- Function `*BackupUsageSummariesClient.List` parameter(s) have been changed from `(context.Context, string, string, *BackupUsageSummariesListOptions)` to `(context.Context, string, string, *BackupUsageSummariesClientListOptions)` -- Function `*BackupUsageSummariesClient.List` return value(s) have been changed from `(BackupUsageSummariesListResponse, error)` to `(BackupUsageSummariesClientListResponse, error)` -- Function `*FeatureSupportClient.Validate` parameter(s) have been changed from `(context.Context, string, FeatureSupportRequestClassification, *FeatureSupportValidateOptions)` to `(context.Context, string, FeatureSupportRequestClassification, *FeatureSupportClientValidateOptions)` -- Function `*FeatureSupportClient.Validate` return value(s) have been changed from `(FeatureSupportValidateResponse, error)` to `(FeatureSupportClientValidateResponse, error)` -- Function `*SecurityPINsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *SecurityPINsGetOptions)` to `(context.Context, string, string, *SecurityPINsClientGetOptions)` -- Function `*SecurityPINsClient.Get` return value(s) have been changed from `(SecurityPINsGetResponse, error)` to `(SecurityPINsClientGetResponse, error)` -- Function `*PrivateEndpointClient.GetOperationStatus` parameter(s) have been changed from `(context.Context, string, string, string, string, *PrivateEndpointGetOperationStatusOptions)` to `(context.Context, string, string, string, string, *PrivateEndpointClientGetOperationStatusOptions)` -- Function `*PrivateEndpointClient.GetOperationStatus` return value(s) have been changed from `(PrivateEndpointGetOperationStatusResponse, error)` to `(PrivateEndpointClientGetOperationStatusResponse, error)` -- Function `*BackupProtectionIntentClient.List` parameter(s) have been changed from `(string, string, *BackupProtectionIntentListOptions)` to `(string, string, *BackupProtectionIntentClientListOptions)` -- Function `*BackupProtectionIntentClient.List` return value(s) have been changed from `(*BackupProtectionIntentListPager)` to `(*BackupProtectionIntentClientListPager)` -- Function `*BackupsClient.Trigger` parameter(s) have been changed from `(context.Context, string, string, string, string, string, BackupRequestResource, *BackupsTriggerOptions)` to `(context.Context, string, string, string, string, string, BackupRequestResource, *BackupsClientTriggerOptions)` -- Function `*BackupsClient.Trigger` return value(s) have been changed from `(BackupsTriggerResponse, error)` to `(BackupsClientTriggerResponse, error)` -- Function `*BackupResourceVaultConfigsClient.Put` parameter(s) have been changed from `(context.Context, string, string, BackupResourceVaultConfigResource, *BackupResourceVaultConfigsPutOptions)` to `(context.Context, string, string, BackupResourceVaultConfigResource, *BackupResourceVaultConfigsClientPutOptions)` -- Function `*BackupResourceVaultConfigsClient.Put` return value(s) have been changed from `(BackupResourceVaultConfigsPutResponse, error)` to `(BackupResourceVaultConfigsClientPutResponse, error)` -- Function `*ProtectedItemOperationStatusesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, string, string, *ProtectedItemOperationStatusesGetOptions)` to `(context.Context, string, string, string, string, string, string, *ProtectedItemOperationStatusesClientGetOptions)` -- Function `*ProtectedItemOperationStatusesClient.Get` return value(s) have been changed from `(ProtectedItemOperationStatusesGetResponse, error)` to `(ProtectedItemOperationStatusesClientGetResponse, error)` -- Function `*ProtectionPoliciesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *ProtectionPoliciesBeginDeleteOptions)` to `(context.Context, string, string, string, *ProtectionPoliciesClientBeginDeleteOptions)` -- Function `*ProtectionPoliciesClient.BeginDelete` return value(s) have been changed from `(ProtectionPoliciesDeletePollerResponse, error)` to `(ProtectionPoliciesClientDeletePollerResponse, error)` -- Function `*RecoveryPointsClient.List` parameter(s) have been changed from `(string, string, string, string, string, *RecoveryPointsListOptions)` to `(string, string, string, string, string, *RecoveryPointsClientListOptions)` -- Function `*RecoveryPointsClient.List` return value(s) have been changed from `(*RecoveryPointsListPager)` to `(*RecoveryPointsClientListPager)` -- Function `*RecoveryPointsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, string, string, *RecoveryPointsGetOptions)` to `(context.Context, string, string, string, string, string, string, *RecoveryPointsClientGetOptions)` -- Function `*RecoveryPointsClient.Get` return value(s) have been changed from `(RecoveryPointsGetResponse, error)` to `(RecoveryPointsClientGetResponse, error)` -- Function `*RecoveryPointsRecommendedForMoveClient.List` parameter(s) have been changed from `(string, string, string, string, string, ListRecoveryPointsRecommendedForMoveRequest, *RecoveryPointsRecommendedForMoveListOptions)` to `(string, string, string, string, string, ListRecoveryPointsRecommendedForMoveRequest, *RecoveryPointsRecommendedForMoveClientListOptions)` -- Function `*RecoveryPointsRecommendedForMoveClient.List` return value(s) have been changed from `(*RecoveryPointsRecommendedForMoveListPager)` to `(*RecoveryPointsRecommendedForMoveClientListPager)` -- Function `*BMSPrepareDataMoveOperationResultClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *BMSPrepareDataMoveOperationResultGetOptions)` to `(context.Context, string, string, string, *BMSPrepareDataMoveOperationResultClientGetOptions)` -- Function `*BMSPrepareDataMoveOperationResultClient.Get` return value(s) have been changed from `(BMSPrepareDataMoveOperationResultGetResponse, error)` to `(BMSPrepareDataMoveOperationResultClientGetResponse, error)` -- Function `*RestoresClient.BeginTrigger` parameter(s) have been changed from `(context.Context, string, string, string, string, string, string, RestoreRequestResource, *RestoresBeginTriggerOptions)` to `(context.Context, string, string, string, string, string, string, RestoreRequestResource, *RestoresClientBeginTriggerOptions)` -- Function `*RestoresClient.BeginTrigger` return value(s) have been changed from `(RestoresTriggerPollerResponse, error)` to `(RestoresClientTriggerPollerResponse, error)` -- Function `*JobOperationResultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *JobOperationResultsGetOptions)` to `(context.Context, string, string, string, string, *JobOperationResultsClientGetOptions)` -- Function `*JobOperationResultsClient.Get` return value(s) have been changed from `(JobOperationResultsGetResponse, error)` to `(JobOperationResultsClientGetResponse, error)` -- Function `*BackupWorkloadItemsClient.List` parameter(s) have been changed from `(string, string, string, string, *BackupWorkloadItemsListOptions)` to `(string, string, string, string, *BackupWorkloadItemsClientListOptions)` -- Function `*BackupWorkloadItemsClient.List` return value(s) have been changed from `(*BackupWorkloadItemsListPager)` to `(*BackupWorkloadItemsClientListPager)` -- Function `*BackupResourceStorageConfigsNonCRRClient.Update` parameter(s) have been changed from `(context.Context, string, string, BackupResourceConfigResource, *BackupResourceStorageConfigsNonCRRUpdateOptions)` to `(context.Context, string, string, BackupResourceConfigResource, *BackupResourceStorageConfigsNonCRRClientUpdateOptions)` -- Function `*BackupResourceStorageConfigsNonCRRClient.Update` return value(s) have been changed from `(BackupResourceStorageConfigsNonCRRUpdateResponse, error)` to `(BackupResourceStorageConfigsNonCRRClientUpdateResponse, error)` -- Function `*ProtectionIntentClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *ProtectionIntentGetOptions)` to `(context.Context, string, string, string, string, *ProtectionIntentClientGetOptions)` -- Function `*ProtectionIntentClient.Get` return value(s) have been changed from `(ProtectionIntentGetResponse, error)` to `(ProtectionIntentClientGetResponse, error)` -- Function `*ProtectionContainersClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *ProtectionContainersGetOptions)` to `(context.Context, string, string, string, string, *ProtectionContainersClientGetOptions)` -- Function `*ProtectionContainersClient.Get` return value(s) have been changed from `(ProtectionContainersGetResponse, error)` to `(ProtectionContainersClientGetResponse, error)` -- Function `*ProtectedItemsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *ProtectedItemsDeleteOptions)` to `(context.Context, string, string, string, string, string, *ProtectedItemsClientDeleteOptions)` -- Function `*ProtectedItemsClient.Delete` return value(s) have been changed from `(ProtectedItemsDeleteResponse, error)` to `(ProtectedItemsClientDeleteResponse, error)` -- Function `*ProtectionContainersClient.Unregister` parameter(s) have been changed from `(context.Context, string, string, string, string, *ProtectionContainersUnregisterOptions)` to `(context.Context, string, string, string, string, *ProtectionContainersClientUnregisterOptions)` -- Function `*ProtectionContainersClient.Unregister` return value(s) have been changed from `(ProtectionContainersUnregisterResponse, error)` to `(ProtectionContainersClientUnregisterResponse, error)` -- Function `*PrivateEndpointConnectionClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionBeginDeleteOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionClientBeginDeleteOptions)` -- Function `*PrivateEndpointConnectionClient.BeginDelete` return value(s) have been changed from `(PrivateEndpointConnectionDeletePollerResponse, error)` to `(PrivateEndpointConnectionClientDeletePollerResponse, error)` -- Function `*BackupResourceStorageConfigsNonCRRClient.Patch` parameter(s) have been changed from `(context.Context, string, string, BackupResourceConfigResource, *BackupResourceStorageConfigsNonCRRPatchOptions)` to `(context.Context, string, string, BackupResourceConfigResource, *BackupResourceStorageConfigsNonCRRClientPatchOptions)` -- Function `*BackupResourceStorageConfigsNonCRRClient.Patch` return value(s) have been changed from `(BackupResourceStorageConfigsNonCRRPatchResponse, error)` to `(BackupResourceStorageConfigsNonCRRClientPatchResponse, error)` -- Function `*PrivateEndpointConnectionClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionGetOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionClientGetOptions)` -- Function `*PrivateEndpointConnectionClient.Get` return value(s) have been changed from `(PrivateEndpointConnectionGetResponse, error)` to `(PrivateEndpointConnectionClientGetResponse, error)` -- Function `*ProtectionPoliciesClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, ProtectionPolicyResource, *ProtectionPoliciesCreateOrUpdateOptions)` to `(context.Context, string, string, string, ProtectionPolicyResource, *ProtectionPoliciesClientCreateOrUpdateOptions)` -- Function `*ProtectionPoliciesClient.CreateOrUpdate` return value(s) have been changed from `(ProtectionPoliciesCreateOrUpdateResponse, error)` to `(ProtectionPoliciesClientCreateOrUpdateResponse, error)` -- Function `*ResourceGuardProxyClient.UnlockDelete` parameter(s) have been changed from `(context.Context, string, string, string, UnlockDeleteRequest, *ResourceGuardProxyUnlockDeleteOptions)` to `(context.Context, string, string, string, UnlockDeleteRequest, *ResourceGuardProxyClientUnlockDeleteOptions)` -- Function `*ResourceGuardProxyClient.UnlockDelete` return value(s) have been changed from `(ResourceGuardProxyUnlockDeleteResponse, error)` to `(ResourceGuardProxyClientUnlockDeleteResponse, error)` -- Function `*ProtectionPolicyOperationStatusesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *ProtectionPolicyOperationStatusesGetOptions)` to `(context.Context, string, string, string, string, *ProtectionPolicyOperationStatusesClientGetOptions)` -- Function `*ProtectionPolicyOperationStatusesClient.Get` return value(s) have been changed from `(ProtectionPolicyOperationStatusesGetResponse, error)` to `(ProtectionPolicyOperationStatusesClientGetResponse, error)` -- Function `*JobDetailsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *JobDetailsGetOptions)` to `(context.Context, string, string, string, *JobDetailsClientGetOptions)` -- Function `*JobDetailsClient.Get` return value(s) have been changed from `(JobDetailsGetResponse, error)` to `(JobDetailsClientGetResponse, error)` -- Function `*OperationClient.Validate` parameter(s) have been changed from `(context.Context, string, string, ValidateOperationRequestClassification, *OperationValidateOptions)` to `(context.Context, string, string, ValidateOperationRequestClassification, *OperationClientValidateOptions)` -- Function `*OperationClient.Validate` return value(s) have been changed from `(OperationValidateResponse, error)` to `(OperationClientValidateResponse, error)` -- Function `*ProtectedItemsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, string, ProtectedItemResource, *ProtectedItemsCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, string, ProtectedItemResource, *ProtectedItemsClientCreateOrUpdateOptions)` -- Function `*ProtectedItemsClient.CreateOrUpdate` return value(s) have been changed from `(ProtectedItemsCreateOrUpdateResponse, error)` to `(ProtectedItemsClientCreateOrUpdateResponse, error)` -- Function `*BackupEnginesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *BackupEnginesGetOptions)` to `(context.Context, string, string, string, *BackupEnginesClientGetOptions)` -- Function `*BackupEnginesClient.Get` return value(s) have been changed from `(BackupEnginesGetResponse, error)` to `(BackupEnginesClientGetResponse, error)` -- Function `*ExportJobsOperationResultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ExportJobsOperationResultsGetOptions)` to `(context.Context, string, string, string, *ExportJobsOperationResultsClientGetOptions)` -- Function `*ExportJobsOperationResultsClient.Get` return value(s) have been changed from `(ExportJobsOperationResultsGetResponse, error)` to `(ExportJobsOperationResultsClientGetResponse, error)` -- Function `*ItemLevelRecoveryConnectionsClient.Provision` parameter(s) have been changed from `(context.Context, string, string, string, string, string, string, ILRRequestResource, *ItemLevelRecoveryConnectionsProvisionOptions)` to `(context.Context, string, string, string, string, string, string, ILRRequestResource, *ItemLevelRecoveryConnectionsClientProvisionOptions)` -- Function `*ItemLevelRecoveryConnectionsClient.Provision` return value(s) have been changed from `(ItemLevelRecoveryConnectionsProvisionResponse, error)` to `(ItemLevelRecoveryConnectionsClientProvisionResponse, error)` -- Function `*BackupProtectionContainersClient.List` parameter(s) have been changed from `(string, string, *BackupProtectionContainersListOptions)` to `(string, string, *BackupProtectionContainersClientListOptions)` -- Function `*BackupProtectionContainersClient.List` return value(s) have been changed from `(*BackupProtectionContainersListPager)` to `(*BackupProtectionContainersClientListPager)` -- Function `*BackupResourceVaultConfigsClient.Update` parameter(s) have been changed from `(context.Context, string, string, BackupResourceVaultConfigResource, *BackupResourceVaultConfigsUpdateOptions)` to `(context.Context, string, string, BackupResourceVaultConfigResource, *BackupResourceVaultConfigsClientUpdateOptions)` -- Function `*BackupResourceVaultConfigsClient.Update` return value(s) have been changed from `(BackupResourceVaultConfigsUpdateResponse, error)` to `(BackupResourceVaultConfigsClientUpdateResponse, error)` -- Function `*BackupProtectableItemsClient.List` parameter(s) have been changed from `(string, string, *BackupProtectableItemsListOptions)` to `(string, string, *BackupProtectableItemsClientListOptions)` -- Function `*BackupProtectableItemsClient.List` return value(s) have been changed from `(*BackupProtectableItemsListPager)` to `(*BackupProtectableItemsClientListPager)` -- Function `*ProtectableContainersClient.List` parameter(s) have been changed from `(string, string, string, *ProtectableContainersListOptions)` to `(string, string, string, *ProtectableContainersClientListOptions)` -- Function `*ProtectableContainersClient.List` return value(s) have been changed from `(*ProtectableContainersListPager)` to `(*ProtectableContainersClientListPager)` -- Function `*BackupResourceStorageConfigsNonCRRClient.Get` parameter(s) have been changed from `(context.Context, string, string, *BackupResourceStorageConfigsNonCRRGetOptions)` to `(context.Context, string, string, *BackupResourceStorageConfigsNonCRRClientGetOptions)` -- Function `*BackupResourceStorageConfigsNonCRRClient.Get` return value(s) have been changed from `(BackupResourceStorageConfigsNonCRRGetResponse, error)` to `(BackupResourceStorageConfigsNonCRRClientGetResponse, error)` -- Function `*BackupStatusClient.Get` parameter(s) have been changed from `(context.Context, string, BackupStatusRequest, *BackupStatusGetOptions)` to `(context.Context, string, BackupStatusRequest, *BackupStatusClientGetOptions)` -- Function `*BackupStatusClient.Get` return value(s) have been changed from `(BackupStatusGetResponse, error)` to `(BackupStatusClientGetResponse, error)` -- Function `*ResourceGuardProxiesClient.Get` parameter(s) have been changed from `(string, string, *ResourceGuardProxiesGetOptions)` to `(string, string, *ResourceGuardProxiesClientGetOptions)` -- Function `*ResourceGuardProxiesClient.Get` return value(s) have been changed from `(*ResourceGuardProxiesGetPager)` to `(*ResourceGuardProxiesClientGetPager)` -- Function `*BackupProtectedItemsClient.List` parameter(s) have been changed from `(string, string, *BackupProtectedItemsListOptions)` to `(string, string, *BackupProtectedItemsClientListOptions)` -- Function `*BackupProtectedItemsClient.List` return value(s) have been changed from `(*BackupProtectedItemsListPager)` to `(*BackupProtectedItemsClientListPager)` -- Function `*JobCancellationsClient.Trigger` parameter(s) have been changed from `(context.Context, string, string, string, *JobCancellationsTriggerOptions)` to `(context.Context, string, string, string, *JobCancellationsClientTriggerOptions)` -- Function `*JobCancellationsClient.Trigger` return value(s) have been changed from `(JobCancellationsTriggerResponse, error)` to `(JobCancellationsClientTriggerResponse, error)` -- Function `*ProtectionIntentClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, ProtectionIntentResource, *ProtectionIntentCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, ProtectionIntentResource, *ProtectionIntentClientCreateOrUpdateOptions)` -- Function `*ProtectionIntentClient.CreateOrUpdate` return value(s) have been changed from `(ProtectionIntentCreateOrUpdateResponse, error)` to `(ProtectionIntentClientCreateOrUpdateResponse, error)` -- Function `*BackupOperationStatusesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *BackupOperationStatusesGetOptions)` to `(context.Context, string, string, string, *BackupOperationStatusesClientGetOptions)` -- Function `*BackupOperationStatusesClient.Get` return value(s) have been changed from `(BackupOperationStatusesGetResponse, error)` to `(BackupOperationStatusesClientGetResponse, error)` -- Function `*ProtectionContainerRefreshOperationResultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *ProtectionContainerRefreshOperationResultsGetOptions)` to `(context.Context, string, string, string, string, *ProtectionContainerRefreshOperationResultsClientGetOptions)` -- Function `*ProtectionContainerRefreshOperationResultsClient.Get` return value(s) have been changed from `(ProtectionContainerRefreshOperationResultsGetResponse, error)` to `(ProtectionContainerRefreshOperationResultsClientGetResponse, error)` -- Function `*JobsClient.Export` parameter(s) have been changed from `(context.Context, string, string, *JobsExportOptions)` to `(context.Context, string, string, *JobsClientExportOptions)` -- Function `*JobsClient.Export` return value(s) have been changed from `(JobsExportResponse, error)` to `(JobsClientExportResponse, error)` -- Function `*BackupResourceEncryptionConfigsClient.Update` parameter(s) have been changed from `(context.Context, string, string, BackupResourceEncryptionConfigResource, *BackupResourceEncryptionConfigsUpdateOptions)` to `(context.Context, string, string, BackupResourceEncryptionConfigResource, *BackupResourceEncryptionConfigsClientUpdateOptions)` -- Function `*BackupResourceEncryptionConfigsClient.Update` return value(s) have been changed from `(BackupResourceEncryptionConfigsUpdateResponse, error)` to `(BackupResourceEncryptionConfigsClientUpdateResponse, error)` -- Function `*ResourceGuardProxyClient.Put` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceGuardProxyPutOptions)` to `(context.Context, string, string, string, *ResourceGuardProxyClientPutOptions)` -- Function `*ResourceGuardProxyClient.Put` return value(s) have been changed from `(ResourceGuardProxyPutResponse, error)` to `(ResourceGuardProxyClientPutResponse, error)` -- Function `*BackupResourceVaultConfigsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *BackupResourceVaultConfigsGetOptions)` to `(context.Context, string, string, *BackupResourceVaultConfigsClientGetOptions)` -- Function `*BackupResourceVaultConfigsClient.Get` return value(s) have been changed from `(BackupResourceVaultConfigsGetResponse, error)` to `(BackupResourceVaultConfigsClientGetResponse, error)` -- Function `*BackupEnginesClient.List` parameter(s) have been changed from `(string, string, *BackupEnginesListOptions)` to `(string, string, *BackupEnginesClientListOptions)` -- Function `*BackupEnginesClient.List` return value(s) have been changed from `(*BackupEnginesListPager)` to `(*BackupEnginesClientListPager)` -- Function `*ResourceGuardProxyClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceGuardProxyGetOptions)` to `(context.Context, string, string, string, *ResourceGuardProxyClientGetOptions)` -- Function `*ResourceGuardProxyClient.Get` return value(s) have been changed from `(ResourceGuardProxyGetResponse, error)` to `(ResourceGuardProxyClientGetResponse, error)` -- Function `*PrivateEndpointConnectionClient.BeginPut` parameter(s) have been changed from `(context.Context, string, string, string, PrivateEndpointConnectionResource, *PrivateEndpointConnectionBeginPutOptions)` to `(context.Context, string, string, string, PrivateEndpointConnectionResource, *PrivateEndpointConnectionClientBeginPutOptions)` -- Function `*PrivateEndpointConnectionClient.BeginPut` return value(s) have been changed from `(PrivateEndpointConnectionPutPollerResponse, error)` to `(PrivateEndpointConnectionClientPutPollerResponse, error)` -- Function `*BackupOperationResultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *BackupOperationResultsGetOptions)` to `(context.Context, string, string, string, *BackupOperationResultsClientGetOptions)` -- Function `*BackupOperationResultsClient.Get` return value(s) have been changed from `(BackupOperationResultsGetResponse, error)` to `(BackupOperationResultsClientGetResponse, error)` -- Function `*ProtectionPoliciesClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ProtectionPoliciesGetOptions)` to `(context.Context, string, string, string, *ProtectionPoliciesClientGetOptions)` -- Function `*ProtectionPoliciesClient.Get` return value(s) have been changed from `(ProtectionPoliciesGetResponse, error)` to `(ProtectionPoliciesClientGetResponse, error)` -- Function `*ProtectedItemOperationResultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, string, string, *ProtectedItemOperationResultsGetOptions)` to `(context.Context, string, string, string, string, string, string, *ProtectedItemOperationResultsClientGetOptions)` -- Function `*ProtectedItemOperationResultsClient.Get` return value(s) have been changed from `(ProtectedItemOperationResultsGetResponse, error)` to `(ProtectedItemOperationResultsClientGetResponse, error)` -- Function `*ProtectionContainerOperationResultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *ProtectionContainerOperationResultsGetOptions)` to `(context.Context, string, string, string, string, string, *ProtectionContainerOperationResultsClientGetOptions)` -- Function `*ProtectionContainerOperationResultsClient.Get` return value(s) have been changed from `(ProtectionContainerOperationResultsGetResponse, error)` to `(ProtectionContainerOperationResultsClientGetResponse, error)` -- Function `*BackupJobsClient.List` parameter(s) have been changed from `(string, string, *BackupJobsListOptions)` to `(string, string, *BackupJobsClientListOptions)` -- Function `*BackupJobsClient.List` return value(s) have been changed from `(*BackupJobsListPager)` to `(*BackupJobsClientListPager)` -- Function `*ResourceGuardProxyClient.Delete` parameter(s) have been changed from `(context.Context, string, string, string, *ResourceGuardProxyDeleteOptions)` to `(context.Context, string, string, string, *ResourceGuardProxyClientDeleteOptions)` -- Function `*ResourceGuardProxyClient.Delete` return value(s) have been changed from `(ResourceGuardProxyDeleteResponse, error)` to `(ResourceGuardProxyClientDeleteResponse, error)` -- Function `*OperationsClient.List` parameter(s) have been changed from `(*OperationsListOptions)` to `(*OperationsClientListOptions)` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsListPager)` to `(*OperationsClientListPager)` -- Function `*BackupResourceEncryptionConfigsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *BackupResourceEncryptionConfigsGetOptions)` to `(context.Context, string, string, *BackupResourceEncryptionConfigsClientGetOptions)` -- Function `*BackupResourceEncryptionConfigsClient.Get` return value(s) have been changed from `(BackupResourceEncryptionConfigsGetResponse, error)` to `(BackupResourceEncryptionConfigsClientGetResponse, error)` -- Function `*ProtectionContainersClient.Inquire` parameter(s) have been changed from `(context.Context, string, string, string, string, *ProtectionContainersInquireOptions)` to `(context.Context, string, string, string, string, *ProtectionContainersClientInquireOptions)` -- Function `*ProtectionContainersClient.Inquire` return value(s) have been changed from `(ProtectionContainersInquireResponse, error)` to `(ProtectionContainersClientInquireResponse, error)` -- Function `*ItemLevelRecoveryConnectionsClient.Revoke` parameter(s) have been changed from `(context.Context, string, string, string, string, string, string, *ItemLevelRecoveryConnectionsRevokeOptions)` to `(context.Context, string, string, string, string, string, string, *ItemLevelRecoveryConnectionsClientRevokeOptions)` -- Function `*ItemLevelRecoveryConnectionsClient.Revoke` return value(s) have been changed from `(ItemLevelRecoveryConnectionsRevokeResponse, error)` to `(ItemLevelRecoveryConnectionsClientRevokeResponse, error)` -- Function `*ProtectionIntentClient.Delete` parameter(s) have been changed from `(context.Context, string, string, string, string, *ProtectionIntentDeleteOptions)` to `(context.Context, string, string, string, string, *ProtectionIntentClientDeleteOptions)` -- Function `*ProtectionIntentClient.Delete` return value(s) have been changed from `(ProtectionIntentDeleteResponse, error)` to `(ProtectionIntentClientDeleteResponse, error)` -- Function `*ProtectedItemsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, string, *ProtectedItemsGetOptions)` to `(context.Context, string, string, string, string, string, *ProtectedItemsClientGetOptions)` -- Function `*ProtectedItemsClient.Get` return value(s) have been changed from `(ProtectedItemsGetResponse, error)` to `(ProtectedItemsClientGetResponse, error)` -- Function `*ProtectionContainersClient.Register` parameter(s) have been changed from `(context.Context, string, string, string, string, ProtectionContainerResource, *ProtectionContainersRegisterOptions)` to `(context.Context, string, string, string, string, ProtectionContainerResource, *ProtectionContainersClientRegisterOptions)` -- Function `*ProtectionContainersClient.Register` return value(s) have been changed from `(ProtectionContainersRegisterResponse, error)` to `(ProtectionContainersClientRegisterResponse, error)` -- Function `*ProtectionContainersClient.Refresh` parameter(s) have been changed from `(context.Context, string, string, string, *ProtectionContainersRefreshOptions)` to `(context.Context, string, string, string, *ProtectionContainersClientRefreshOptions)` -- Function `*ProtectionContainersClient.Refresh` return value(s) have been changed from `(ProtectionContainersRefreshResponse, error)` to `(ProtectionContainersClientRefreshResponse, error)` -- Type of `IaasVMRecoveryPoint.RecoveryPointTierDetails` has been changed from `[]*RecoveryPointTierInformation` to `[]*RecoveryPointTierInformationV2` -- Type of `AzureWorkloadRecoveryPoint.RecoveryPointTierDetails` has been changed from `[]*RecoveryPointTierInformation` to `[]*RecoveryPointTierInformationV2` -- Type of `ProtectionIntent.ProtectionIntentItemType` has been changed from `*string` to `*ProtectionIntentItemType` -- Function `*RecoveryPointsRecommendedForMoveListPager.Err` has been removed -- Function `*BackupProtectedItemsListPager.NextPage` has been removed -- Function `*RestoresTriggerPoller.Poll` has been removed -- Function `*BackupPoliciesListPager.NextPage` has been removed -- Function `*RecoveryServicesBackupClientBMSPrepareDataMovePoller.FinalResponse` has been removed -- Function `*BackupProtectedItemsListPager.PageResponse` has been removed -- Function `*OperationsListPager.Err` has been removed -- Function `*RecoveryServicesBackupClientBMSPrepareDataMovePollerResponse.Resume` has been removed -- Function `*OperationsListPager.PageResponse` has been removed -- Function `*BackupJobsListPager.PageResponse` has been removed -- Function `*RestoresTriggerPoller.Done` has been removed -- Function `*FeatureSupportRequest.UnmarshalJSON` has been removed -- Function `PrivateEndpointConnectionDeletePollerResponse.PollUntilDone` has been removed -- Function `*RecoveryServicesBackupClientBMSTriggerDataMovePoller.FinalResponse` has been removed -- Function `*RecoveryPointsRecommendedForMoveListPager.NextPage` has been removed -- Function `*BackupWorkloadItemsListPager.Err` has been removed -- Function `*PrivateEndpointConnectionPutPoller.Done` has been removed -- Function `*ILRRequest.UnmarshalJSON` has been removed -- Function `*BackupJobsListPager.NextPage` has been removed -- Function `*BackupWorkloadItemsListPager.PageResponse` has been removed -- Function `*BackupProtectionIntentListPager.Err` has been removed -- Function `*ProtectableContainersListPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionPutPoller.ResumeToken` has been removed -- Function `*ProtectableContainersListPager.Err` has been removed -- Function `*PrivateEndpointConnectionDeletePollerResponse.Resume` has been removed -- Function `*ProtectionPoliciesDeletePollerResponse.Resume` has been removed -- Function `*RecoveryServicesBackupClientMoveRecoveryPointPoller.ResumeToken` has been removed -- Function `*PrivateEndpointConnectionPutPoller.FinalResponse` has been removed -- Function `*ProtectionPoliciesDeletePoller.FinalResponse` has been removed -- Function `*RecoveryServicesBackupClientBMSTriggerDataMovePollerResponse.Resume` has been removed -- Function `*BackupProtectableItemsListPager.PageResponse` has been removed -- Function `*ValidateOperationRequest.UnmarshalJSON` has been removed -- Function `*PrivateEndpointConnectionDeletePoller.Poll` has been removed -- Function `*PrivateEndpointConnectionDeletePoller.ResumeToken` has been removed -- Function `*BackupRequest.UnmarshalJSON` has been removed -- Function `*ProtectionContainer.UnmarshalJSON` has been removed -- Function `NewRecoveryServicesBackupClient` has been removed -- Function `*RecoveryPointsListPager.PageResponse` has been removed -- Function `*RecoveryPoint.UnmarshalJSON` has been removed -- Function `*RecoveryPointsListPager.Err` has been removed -- Function `*BackupPoliciesListPager.PageResponse` has been removed -- Function `*RecoveryServicesBackupClientMoveRecoveryPointPoller.Done` has been removed -- Function `*WorkloadItem.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClientBMSPrepareDataMovePoller.ResumeToken` has been removed -- Function `*ProtectionPoliciesDeletePoller.Poll` has been removed -- Function `*BackupJobsListPager.Err` has been removed -- Function `*RetentionPolicy.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClientBMSTriggerDataMovePoller.ResumeToken` has been removed -- Function `*ProtectionPoliciesDeletePoller.Done` has been removed -- Function `*BackupEngineBase.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClientMoveRecoveryPointPoller.Poll` has been removed -- Function `*VaultStorageConfigOperationResultResponse.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClientMoveRecoveryPointPollerResponse.Resume` has been removed -- Function `*BackupProtectionIntentListPager.NextPage` has been removed -- Function `*BMSPrepareDataMoveOperationResultGetResult.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClient.BeginBMSPrepareDataMove` has been removed -- Function `*BackupProtectableItemsListPager.NextPage` has been removed -- Function `*BackupEnginesListPager.NextPage` has been removed -- Function `*BackupProtectableItemsListPager.Err` has been removed -- Function `*PrivateEndpointConnectionDeletePoller.Done` has been removed -- Function `*ResourceGuardProxiesGetPager.PageResponse` has been removed -- Function `*OperationsListPager.NextPage` has been removed -- Function `RecoveryServicesBackupClientBMSPrepareDataMovePollerResponse.PollUntilDone` has been removed -- Function `*Resource.UnmarshalJSON` has been removed -- Function `*BackupResourceConfigResource.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClientBMSPrepareDataMovePoller.Done` has been removed -- Function `*RestoresTriggerPoller.FinalResponse` has been removed -- Function `*BackupProtectionContainersListPager.Err` has been removed -- Function `*RecoveryServicesBackupClient.BeginBMSTriggerDataMove` has been removed -- Function `*RecoveryServicesBackupClientBMSTriggerDataMovePoller.Done` has been removed -- Function `*ProtectableContainersListPager.NextPage` has been removed -- Function `*RestoresTriggerPoller.ResumeToken` has been removed -- Function `NewErrorResponse.Error` has been removed -- Function `*WorkloadProtectableItem.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClient.GetOperationStatus` has been removed -- Function `*BackupResourceEncryptionConfigResource.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClientBMSTriggerDataMovePoller.Poll` has been removed -- Function `*SchedulePolicy.UnmarshalJSON` has been removed -- Function `*BackupProtectedItemsListPager.Err` has been removed -- Function `*BackupProtectionIntentListPager.PageResponse` has been removed -- Function `*BackupWorkloadItemsListPager.NextPage` has been removed -- Function `*ProtectionPoliciesDeletePoller.ResumeToken` has been removed -- Function `*PrivateEndpointConnectionResource.UnmarshalJSON` has been removed -- Function `*OperationWorkerResponse.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClientBMSPrepareDataMovePoller.Poll` has been removed -- Function `*RecoveryPointsListPager.NextPage` has been removed -- Function `*ProtectionPolicy.UnmarshalJSON` has been removed -- Function `RecoveryServicesBackupClientBMSTriggerDataMovePollerResponse.PollUntilDone` has been removed -- Function `ProtectionPoliciesDeletePollerResponse.PollUntilDone` has been removed -- Function `*PrivateEndpointConnectionPutPollerResponse.Resume` has been removed -- Function `*PrivateEndpointConnectionPutPoller.Poll` has been removed -- Function `*BackupProtectionContainersListPager.NextPage` has been removed -- Function `*BackupResourceEncryptionConfigExtendedResource.UnmarshalJSON` has been removed -- Function `*PrivateEndpointConnectionDeletePoller.FinalResponse` has been removed -- Function `*BackupPoliciesListPager.Err` has been removed -- Function `PrivateEndpointConnectionPutPollerResponse.PollUntilDone` has been removed -- Function `ResourceList.MarshalJSON` has been removed -- Function `*ResourceGuardProxyBaseResource.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClient.BeginMoveRecoveryPoint` has been removed -- Function `*BackupResourceVaultConfigResource.UnmarshalJSON` has been removed -- Function `*RestoresTriggerPollerResponse.Resume` has been removed -- Function `*ResourceGuardProxiesGetPager.Err` has been removed -- Function `*OperationResultInfoBase.UnmarshalJSON` has been removed -- Function `*RecoveryServicesBackupClientMoveRecoveryPointPoller.FinalResponse` has been removed -- Function `CloudError.Error` has been removed -- Function `*OperationStatusExtendedInfo.UnmarshalJSON` has been removed -- Function `*BackupProtectionContainersListPager.PageResponse` has been removed -- Function `*RecoveryPointsRecommendedForMoveListPager.PageResponse` has been removed -- Function `*ResourceGuardProxiesGetPager.NextPage` has been removed -- Function `*BackupEnginesListPager.Err` has been removed -- Function `*RestoreRequest.UnmarshalJSON` has been removed -- Function `*ProtectableContainer.UnmarshalJSON` has been removed -- Function `RecoveryServicesBackupClientMoveRecoveryPointPollerResponse.PollUntilDone` has been removed -- Function `*ProtectionIntent.UnmarshalJSON` has been removed -- Function `*BackupEnginesListPager.PageResponse` has been removed -- Function `RestoresTriggerPollerResponse.PollUntilDone` has been removed -- Struct `BMSPrepareDataMoveOperationResultGetOptions` has been removed -- Struct `BMSPrepareDataMoveOperationResultGetResponse` has been removed -- Struct `BMSPrepareDataMoveOperationResultGetResult` has been removed -- Struct `BackupEnginesGetOptions` has been removed -- Struct `BackupEnginesGetResponse` has been removed -- Struct `BackupEnginesGetResult` has been removed -- Struct `BackupEnginesListOptions` has been removed -- Struct `BackupEnginesListPager` has been removed -- Struct `BackupEnginesListResponse` has been removed -- Struct `BackupEnginesListResult` has been removed -- Struct `BackupJobsListOptions` has been removed -- Struct `BackupJobsListPager` has been removed -- Struct `BackupJobsListResponse` has been removed -- Struct `BackupJobsListResult` has been removed -- Struct `BackupOperationResultsGetOptions` has been removed -- Struct `BackupOperationResultsGetResponse` has been removed -- Struct `BackupOperationStatusesGetOptions` has been removed -- Struct `BackupOperationStatusesGetResponse` has been removed -- Struct `BackupOperationStatusesGetResult` has been removed -- Struct `BackupPoliciesListOptions` has been removed -- Struct `BackupPoliciesListPager` has been removed -- Struct `BackupPoliciesListResponse` has been removed -- Struct `BackupPoliciesListResult` has been removed -- Struct `BackupProtectableItemsListOptions` has been removed -- Struct `BackupProtectableItemsListPager` has been removed -- Struct `BackupProtectableItemsListResponse` has been removed -- Struct `BackupProtectableItemsListResult` has been removed -- Struct `BackupProtectedItemsListOptions` has been removed -- Struct `BackupProtectedItemsListPager` has been removed -- Struct `BackupProtectedItemsListResponse` has been removed -- Struct `BackupProtectedItemsListResult` has been removed -- Struct `BackupProtectionContainersListOptions` has been removed -- Struct `BackupProtectionContainersListPager` has been removed -- Struct `BackupProtectionContainersListResponse` has been removed -- Struct `BackupProtectionContainersListResult` has been removed -- Struct `BackupProtectionIntentListOptions` has been removed -- Struct `BackupProtectionIntentListPager` has been removed -- Struct `BackupProtectionIntentListResponse` has been removed -- Struct `BackupProtectionIntentListResult` has been removed -- Struct `BackupResourceEncryptionConfigsGetOptions` has been removed -- Struct `BackupResourceEncryptionConfigsGetResponse` has been removed -- Struct `BackupResourceEncryptionConfigsGetResult` has been removed -- Struct `BackupResourceEncryptionConfigsUpdateOptions` has been removed -- Struct `BackupResourceEncryptionConfigsUpdateResponse` has been removed -- Struct `BackupResourceStorageConfigsNonCRRGetOptions` has been removed -- Struct `BackupResourceStorageConfigsNonCRRGetResponse` has been removed -- Struct `BackupResourceStorageConfigsNonCRRGetResult` has been removed -- Struct `BackupResourceStorageConfigsNonCRRPatchOptions` has been removed -- Struct `BackupResourceStorageConfigsNonCRRPatchResponse` has been removed -- Struct `BackupResourceStorageConfigsNonCRRUpdateOptions` has been removed -- Struct `BackupResourceStorageConfigsNonCRRUpdateResponse` has been removed -- Struct `BackupResourceStorageConfigsNonCRRUpdateResult` has been removed -- Struct `BackupResourceVaultConfigsGetOptions` has been removed -- Struct `BackupResourceVaultConfigsGetResponse` has been removed -- Struct `BackupResourceVaultConfigsGetResult` has been removed -- Struct `BackupResourceVaultConfigsPutOptions` has been removed -- Struct `BackupResourceVaultConfigsPutResponse` has been removed -- Struct `BackupResourceVaultConfigsPutResult` has been removed -- Struct `BackupResourceVaultConfigsUpdateOptions` has been removed -- Struct `BackupResourceVaultConfigsUpdateResponse` has been removed -- Struct `BackupResourceVaultConfigsUpdateResult` has been removed -- Struct `BackupStatusGetOptions` has been removed -- Struct `BackupStatusGetResponse` has been removed -- Struct `BackupStatusGetResult` has been removed -- Struct `BackupUsageSummariesListOptions` has been removed -- Struct `BackupUsageSummariesListResponse` has been removed -- Struct `BackupUsageSummariesListResult` has been removed -- Struct `BackupWorkloadItemsListOptions` has been removed -- Struct `BackupWorkloadItemsListPager` has been removed -- Struct `BackupWorkloadItemsListResponse` has been removed -- Struct `BackupWorkloadItemsListResult` has been removed -- Struct `BackupsTriggerOptions` has been removed -- Struct `BackupsTriggerResponse` has been removed -- Struct `ExportJobsOperationResultsGetOptions` has been removed -- Struct `ExportJobsOperationResultsGetResponse` has been removed -- Struct `ExportJobsOperationResultsGetResult` has been removed -- Struct `FeatureSupportValidateOptions` has been removed -- Struct `FeatureSupportValidateResponse` has been removed -- Struct `FeatureSupportValidateResult` has been removed -- Struct `ItemLevelRecoveryConnectionsProvisionOptions` has been removed -- Struct `ItemLevelRecoveryConnectionsProvisionResponse` has been removed -- Struct `ItemLevelRecoveryConnectionsRevokeOptions` has been removed -- Struct `ItemLevelRecoveryConnectionsRevokeResponse` has been removed -- Struct `JobCancellationsTriggerOptions` has been removed -- Struct `JobCancellationsTriggerResponse` has been removed -- Struct `JobDetailsGetOptions` has been removed -- Struct `JobDetailsGetResponse` has been removed -- Struct `JobDetailsGetResult` has been removed -- Struct `JobOperationResultsGetOptions` has been removed -- Struct `JobOperationResultsGetResponse` has been removed -- Struct `JobsExportOptions` has been removed -- Struct `JobsExportResponse` has been removed -- Struct `OperationValidateOptions` has been removed -- Struct `OperationValidateResponse` has been removed -- Struct `OperationValidateResult` has been removed -- Struct `OperationsListOptions` has been removed -- Struct `OperationsListPager` has been removed -- Struct `OperationsListResponse` has been removed -- Struct `OperationsListResult` has been removed -- Struct `PrivateEndpointConnectionBeginDeleteOptions` has been removed -- Struct `PrivateEndpointConnectionBeginPutOptions` has been removed -- Struct `PrivateEndpointConnectionDeletePoller` has been removed -- Struct `PrivateEndpointConnectionDeletePollerResponse` has been removed -- Struct `PrivateEndpointConnectionDeleteResponse` has been removed -- Struct `PrivateEndpointConnectionGetOptions` has been removed -- Struct `PrivateEndpointConnectionGetResponse` has been removed -- Struct `PrivateEndpointConnectionGetResult` has been removed -- Struct `PrivateEndpointConnectionPutPoller` has been removed -- Struct `PrivateEndpointConnectionPutPollerResponse` has been removed -- Struct `PrivateEndpointConnectionPutResponse` has been removed -- Struct `PrivateEndpointConnectionPutResult` has been removed -- Struct `PrivateEndpointGetOperationStatusOptions` has been removed -- Struct `PrivateEndpointGetOperationStatusResponse` has been removed -- Struct `PrivateEndpointGetOperationStatusResult` has been removed -- Struct `ProtectableContainersListOptions` has been removed -- Struct `ProtectableContainersListPager` has been removed -- Struct `ProtectableContainersListResponse` has been removed -- Struct `ProtectableContainersListResult` has been removed -- Struct `ProtectedItemOperationResultsGetOptions` has been removed -- Struct `ProtectedItemOperationResultsGetResponse` has been removed -- Struct `ProtectedItemOperationResultsGetResult` has been removed -- Struct `ProtectedItemOperationStatusesGetOptions` has been removed -- Struct `ProtectedItemOperationStatusesGetResponse` has been removed -- Struct `ProtectedItemOperationStatusesGetResult` has been removed -- Struct `ProtectedItemsCreateOrUpdateOptions` has been removed -- Struct `ProtectedItemsCreateOrUpdateResponse` has been removed -- Struct `ProtectedItemsCreateOrUpdateResult` has been removed -- Struct `ProtectedItemsDeleteOptions` has been removed -- Struct `ProtectedItemsDeleteResponse` has been removed -- Struct `ProtectedItemsGetOptions` has been removed -- Struct `ProtectedItemsGetResponse` has been removed -- Struct `ProtectedItemsGetResult` has been removed -- Struct `ProtectionContainerOperationResultsGetOptions` has been removed -- Struct `ProtectionContainerOperationResultsGetResponse` has been removed -- Struct `ProtectionContainerOperationResultsGetResult` has been removed -- Struct `ProtectionContainerRefreshOperationResultsGetOptions` has been removed -- Struct `ProtectionContainerRefreshOperationResultsGetResponse` has been removed -- Struct `ProtectionContainersGetOptions` has been removed -- Struct `ProtectionContainersGetResponse` has been removed -- Struct `ProtectionContainersGetResult` has been removed -- Struct `ProtectionContainersInquireOptions` has been removed -- Struct `ProtectionContainersInquireResponse` has been removed -- Struct `ProtectionContainersRefreshOptions` has been removed -- Struct `ProtectionContainersRefreshResponse` has been removed -- Struct `ProtectionContainersRegisterOptions` has been removed -- Struct `ProtectionContainersRegisterResponse` has been removed -- Struct `ProtectionContainersRegisterResult` has been removed -- Struct `ProtectionContainersUnregisterOptions` has been removed -- Struct `ProtectionContainersUnregisterResponse` has been removed -- Struct `ProtectionIntentCreateOrUpdateOptions` has been removed -- Struct `ProtectionIntentCreateOrUpdateResponse` has been removed -- Struct `ProtectionIntentCreateOrUpdateResult` has been removed -- Struct `ProtectionIntentDeleteOptions` has been removed -- Struct `ProtectionIntentDeleteResponse` has been removed -- Struct `ProtectionIntentGetOptions` has been removed -- Struct `ProtectionIntentGetResponse` has been removed -- Struct `ProtectionIntentGetResult` has been removed -- Struct `ProtectionIntentValidateOptions` has been removed -- Struct `ProtectionIntentValidateResponse` has been removed -- Struct `ProtectionIntentValidateResult` has been removed -- Struct `ProtectionPoliciesBeginDeleteOptions` has been removed -- Struct `ProtectionPoliciesCreateOrUpdateOptions` has been removed -- Struct `ProtectionPoliciesCreateOrUpdateResponse` has been removed -- Struct `ProtectionPoliciesCreateOrUpdateResult` has been removed -- Struct `ProtectionPoliciesDeletePoller` has been removed -- Struct `ProtectionPoliciesDeletePollerResponse` has been removed -- Struct `ProtectionPoliciesDeleteResponse` has been removed -- Struct `ProtectionPoliciesGetOptions` has been removed -- Struct `ProtectionPoliciesGetResponse` has been removed -- Struct `ProtectionPoliciesGetResult` has been removed -- Struct `ProtectionPolicyOperationResultsGetOptions` has been removed -- Struct `ProtectionPolicyOperationResultsGetResponse` has been removed -- Struct `ProtectionPolicyOperationResultsGetResult` has been removed -- Struct `ProtectionPolicyOperationStatusesGetOptions` has been removed -- Struct `ProtectionPolicyOperationStatusesGetResponse` has been removed -- Struct `ProtectionPolicyOperationStatusesGetResult` has been removed -- Struct `RecoveryPointsGetOptions` has been removed -- Struct `RecoveryPointsGetResponse` has been removed -- Struct `RecoveryPointsGetResult` has been removed -- Struct `RecoveryPointsListOptions` has been removed -- Struct `RecoveryPointsListPager` has been removed -- Struct `RecoveryPointsListResponse` has been removed -- Struct `RecoveryPointsListResult` has been removed -- Struct `RecoveryPointsRecommendedForMoveListOptions` has been removed -- Struct `RecoveryPointsRecommendedForMoveListPager` has been removed -- Struct `RecoveryPointsRecommendedForMoveListResponse` has been removed -- Struct `RecoveryPointsRecommendedForMoveListResult` has been removed -- Struct `RecoveryServicesBackupClient` has been removed -- Struct `RecoveryServicesBackupClientBMSPrepareDataMovePoller` has been removed -- Struct `RecoveryServicesBackupClientBMSPrepareDataMovePollerResponse` has been removed -- Struct `RecoveryServicesBackupClientBMSPrepareDataMoveResponse` has been removed -- Struct `RecoveryServicesBackupClientBMSTriggerDataMovePoller` has been removed -- Struct `RecoveryServicesBackupClientBMSTriggerDataMovePollerResponse` has been removed -- Struct `RecoveryServicesBackupClientBMSTriggerDataMoveResponse` has been removed -- Struct `RecoveryServicesBackupClientBeginBMSPrepareDataMoveOptions` has been removed -- Struct `RecoveryServicesBackupClientBeginBMSTriggerDataMoveOptions` has been removed -- Struct `RecoveryServicesBackupClientBeginMoveRecoveryPointOptions` has been removed -- Struct `RecoveryServicesBackupClientGetOperationStatusOptions` has been removed -- Struct `RecoveryServicesBackupClientGetOperationStatusResponse` has been removed -- Struct `RecoveryServicesBackupClientGetOperationStatusResult` has been removed -- Struct `RecoveryServicesBackupClientMoveRecoveryPointPoller` has been removed -- Struct `RecoveryServicesBackupClientMoveRecoveryPointPollerResponse` has been removed -- Struct `RecoveryServicesBackupClientMoveRecoveryPointResponse` has been removed -- Struct `ResourceGuardProxiesGetOptions` has been removed -- Struct `ResourceGuardProxiesGetPager` has been removed -- Struct `ResourceGuardProxiesGetResponse` has been removed -- Struct `ResourceGuardProxiesGetResult` has been removed -- Struct `ResourceGuardProxyDeleteOptions` has been removed -- Struct `ResourceGuardProxyDeleteResponse` has been removed -- Struct `ResourceGuardProxyGetOptions` has been removed -- Struct `ResourceGuardProxyGetResponse` has been removed -- Struct `ResourceGuardProxyGetResult` has been removed -- Struct `ResourceGuardProxyPutOptions` has been removed -- Struct `ResourceGuardProxyPutResponse` has been removed -- Struct `ResourceGuardProxyPutResult` has been removed -- Struct `ResourceGuardProxyUnlockDeleteOptions` has been removed -- Struct `ResourceGuardProxyUnlockDeleteResponse` has been removed -- Struct `ResourceGuardProxyUnlockDeleteResult` has been removed -- Struct `RestoresBeginTriggerOptions` has been removed -- Struct `RestoresTriggerPoller` has been removed -- Struct `RestoresTriggerPollerResponse` has been removed -- Struct `RestoresTriggerResponse` has been removed -- Struct `SecurityPINsGetOptions` has been removed -- Struct `SecurityPINsGetResponse` has been removed -- Struct `SecurityPINsGetResult` has been removed -- Field `RecoveryPoint` of struct `AzureWorkloadRecoveryPoint` has been removed -- Field `AzureIaaSVMProtectedItem` of struct `AzureIaaSClassicComputeVMProtectedItem` has been removed -- Field `Job` of struct `DpmJob` has been removed -- Field `WorkloadProtectableItem` of struct `AzureFileShareProtectableItem` has been removed -- Field `SchedulePolicy` of struct `LogSchedulePolicy` has been removed -- Field `RecoveryPoint` of struct `IaasVMRecoveryPoint` has been removed -- Field `AzureVMWorkloadItem` of struct `AzureVMWorkloadSAPAseSystemWorkloadItem` has been removed -- Field `Resource` of struct `RecoveryPointResource` has been removed -- Field `ProtectableContainer` of struct `AzureVMAppContainerProtectableContainer` has been removed -- Field `Resource` of struct `PrivateEndpointConnectionResource` has been removed -- Field `OperationResultInfoBase` of struct `OperationResultInfo` has been removed -- Field `AzureWorkloadRecoveryPoint` of struct `AzureWorkloadSAPHanaRecoveryPoint` has been removed -- Field `IaaSVMProtectableItem` of struct `AzureIaaSComputeVMProtectableItem` has been removed -- Field `OperationStatusExtendedInfo` of struct `OperationStatusJobExtendedInfo` has been removed -- Field `ILRRequest` of struct `AzureFileShareProvisionILRRequest` has been removed -- Field `ProtectionPolicy` of struct `AzureSQLProtectionPolicy` has been removed -- Field `Resource` of struct `ProtectionContainerResource` has been removed -- Field `ProtectedItem` of struct `DPMProtectedItem` has been removed -- Field `ProtectionContainer` of struct `AzureSQLContainer` has been removed -- Field `InnerError` of struct `CloudError` has been removed -- Field `RecoveryPoint` of struct `GenericRecoveryPoint` has been removed -- Field `AzureVMWorkloadProtectableItem` of struct `AzureVMWorkloadSQLDatabaseProtectableItem` has been removed -- Field `Resource` of struct `ProtectionIntentResource` has been removed -- Field `SchedulePolicy` of struct `LongTermSchedulePolicy` has been removed -- Field `AzureVMWorkloadProtectableItem` of struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` has been removed -- Field `ProtectionPolicy` of struct `AzureVMWorkloadProtectionPolicy` has been removed -- Field `ProtectionContainer` of struct `IaaSVMContainer` has been removed -- Field `Job` of struct `AzureIaaSVMJob` has been removed -- Field `AzureVMWorkloadProtectableItem` of struct `AzureVMWorkloadSAPAseSystemProtectableItem` has been removed -- Field `BackupResourceEncryptionConfig` of struct `BackupResourceEncryptionConfigExtended` has been removed -- Field `ResourceHealthDetails` of struct `AzureIaaSVMHealthDetails` has been removed -- Field `BackupEngineBase` of struct `AzureBackupServerEngine` has been removed -- Field `Job` of struct `MabJob` has been removed -- Field `IaaSVMProtectableItem` of struct `AzureIaaSClassicComputeVMProtectableItem` has been removed -- Field `Resource` of struct `BackupEngineBaseResource` has been removed -- Field `FeatureSupportRequest` of struct `AzureVMResourceFeatureSupportRequest` has been removed -- Field `ResourceList` of struct `WorkloadItemResourceList` has been removed -- Field `DpmContainer` of struct `AzureBackupServerContainer` has been removed -- Field `IaaSVMContainer` of struct `AzureIaaSComputeVMContainer` has been removed -- Field `AzureWorkloadRecoveryPoint` of struct `AzureWorkloadPointInTimeRecoveryPoint` has been removed -- Field `Resource` of struct `WorkloadItemResource` has been removed -- Field `ProtectionContainer` of struct `AzureWorkloadContainer` has been removed -- Field `AzureVMWorkloadProtectedItem` of struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` has been removed -- Field `ProtectionIntent` of struct `AzureRecoveryServiceVaultProtectionIntent` has been removed -- Field `RetentionPolicy` of struct `LongTermRetentionPolicy` has been removed -- Field `VaultStorageConfigOperationResultResponse` of struct `PrepareDataMoveResponse` has been removed -- Field `AzureWorkloadRecoveryPoint` of struct `AzureWorkloadSQLRecoveryPoint` has been removed -- Field `ResourceList` of struct `ProtectableContainerResourceList` has been removed -- Field `Resource` of struct `JobResource` has been removed -- Field `Resource` of struct `BackupResourceVaultConfigResource` has been removed -- Field `Resource` of struct `ProtectionPolicyResource` has been removed -- Field `BackupRequest` of struct `AzureWorkloadBackupRequest` has been removed -- Field `WorkloadItem` of struct `AzureVMWorkloadItem` has been removed -- Field `AzureWorkloadSQLRestoreRequest` of struct `AzureWorkloadSQLPointInTimeRestoreRequest` has been removed -- Field `AzureWorkloadSQLPointInTimeRestoreRequest` of struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` has been removed -- Field `ILRRequest` of struct `IaasVMILRRegistrationRequest` has been removed -- Field `ResourceList` of struct `JobResourceList` has been removed -- Field `ProtectionContainer` of struct `GenericContainer` has been removed -- Field `OperationWorkerResponse` of struct `OperationResultInfoBaseResource` has been removed -- Field `WorkloadProtectableItem` of struct `IaaSVMProtectableItem` has been removed -- Field `Resource` of struct `BackupResourceEncryptionConfigResource` has been removed -- Field `AzureWorkloadSQLRecoveryPoint` of struct `AzureWorkloadSQLPointInTimeRecoveryPoint` has been removed -- Field `ResourceList` of struct `ProtectionContainerResourceList` has been removed -- Field `AzureWorkloadRestoreRequest` of struct `AzureWorkloadPointInTimeRestoreRequest` has been removed -- Field `Resource` of struct `BackupResourceEncryptionConfigExtendedResource` has been removed -- Field `ResourceList` of struct `ProtectionPolicyResourceList` has been removed -- Field `ProtectedItem` of struct `MabFileFolderProtectedItem` has been removed -- Field `ProtectableContainer` of struct `AzureStorageProtectableContainer` has been removed -- Field `Job` of struct `AzureWorkloadJob` has been removed -- Field `RestoreRequest` of struct `AzureWorkloadRestoreRequest` has been removed -- Field `Resource` of struct `ILRRequestResource` has been removed -- Field `Resource` of struct `BackupResourceConfigResource` has been removed -- Field `RecoveryPoint` of struct `AzureFileShareRecoveryPoint` has been removed -- Field `AzureVMWorkloadProtectableItem` of struct `AzureVMWorkloadSQLInstanceProtectableItem` has been removed -- Field `ProtectedItem` of struct `AzureIaaSVMProtectedItem` has been removed -- Field `InnerError` of struct `NewErrorResponse` has been removed -- Field `ProtectedItem` of struct `GenericProtectedItem` has been removed -- Field `AzureWorkloadPointInTimeRecoveryPoint` of struct `AzureWorkloadSAPHanaPointInTimeRecoveryPoint` has been removed -- Field `ProtectionPolicy` of struct `MabProtectionPolicy` has been removed -- Field `AzureWorkloadContainer` of struct `AzureVMAppContainerProtectionContainer` has been removed -- Field `OperationStatusExtendedInfo` of struct `OperationStatusJobsExtendedInfo` has been removed -- Field `AzureWorkloadSAPHanaRestoreRequest` of struct `AzureWorkloadSAPHanaPointInTimeRestoreRequest` has been removed -- Field `WorkloadProtectableItem` of struct `AzureVMWorkloadProtectableItem` has been removed -- Field `AzureWorkloadSAPHanaRestoreRequest` of struct `AzureWorkloadSAPHanaRestoreWithRehydrateRequest` has been removed -- Field `AzureRecoveryServiceVaultProtectionIntent` of struct `AzureWorkloadAutoProtectionIntent` has been removed -- Field `ProtectionContainer` of struct `AzureStorageContainer` has been removed -- Field `RetentionPolicy` of struct `SimpleRetentionPolicy` has been removed -- Field `IaasVMRestoreRequest` of struct `IaasVMRestoreWithRehydrationRequest` has been removed -- Field `AzureWorkloadSQLRestoreRequest` of struct `AzureWorkloadSQLRestoreWithRehydrateRequest` has been removed -- Field `AzureVMWorkloadItem` of struct `AzureVMWorkloadSQLInstanceWorkloadItem` has been removed -- Field `ProtectedItem` of struct `AzureSQLProtectedItem` has been removed -- Field `Resource` of struct `RestoreRequestResource` has been removed -- Field `OperationResultInfoBase` of struct `ExportJobsOperationResultInfo` has been removed -- Field `ProtectedItem` of struct `AzureFileshareProtectedItem` has been removed -- Field `FeatureSupportRequest` of struct `AzureBackupGoalFeatureSupportRequest` has been removed -- Field `RestoreRequest` of struct `IaasVMRestoreRequest` has been removed -- Field `Resource` of struct `ProtectedItemResource` has been removed -- Field `BackupEngineBase` of struct `DpmBackupEngine` has been removed -- Field `Job` of struct `AzureStorageJob` has been removed -- Field `AzureWorkloadAutoProtectionIntent` of struct `AzureWorkloadSQLAutoProtectionIntent` has been removed -- Field `ResourceList` of struct `ResourceGuardProxyBaseResourceList` has been removed -- Field `ProtectionPolicy` of struct `AzureFileShareProtectionPolicy` has been removed -- Field `ProtectionPolicy` of struct `GenericProtectionPolicy` has been removed -- Field `AzureVMWorkloadItem` of struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` has been removed -- Field `ProtectionContainer` of struct `DpmContainer` has been removed -- Field `ProtectionIntent` of struct `AzureResourceProtectionIntent` has been removed -- Field `ResourceList` of struct `ProtectionIntentResourceList` has been removed -- Field `ValidateOperationRequest` of struct `ValidateRestoreOperationRequest` has been removed -- Field `AzureWorkloadContainer` of struct `AzureSQLAGWorkloadContainerProtectionContainer` has been removed -- Field `AzureVMWorkloadProtectedItem` of struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` has been removed -- Field `IaaSVMContainer` of struct `AzureIaaSClassicComputeVMContainer` has been removed -- Field `ProtectionPolicy` of struct `AzureIaaSVMProtectionPolicy` has been removed -- Field `SchedulePolicy` of struct `SimpleSchedulePolicy` has been removed -- Field `ResourceList` of struct `RecoveryPointResourceList` has been removed -- Field `AzureVMWorkloadProtectableItem` of struct `AzureVMWorkloadSAPHanaSystemProtectableItem` has been removed -- Field `AzureVMWorkloadProtectableItem` of struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` has been removed -- Field `AzureVMWorkloadItem` of struct `AzureVMWorkloadSQLDatabaseWorkloadItem` has been removed -- Field `Resource` of struct `ResourceGuardProxyBaseResource` has been removed -- Field `RestoreRequest` of struct `AzureFileShareRestoreRequest` has been removed -- Field `AzureVMWorkloadItem` of struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` has been removed -- Field `Job` of struct `VaultJob` has been removed -- Field `AzureWorkloadRestoreRequest` of struct `AzureWorkloadSQLRestoreRequest` has been removed -- Field `ResourceList` of struct `WorkloadProtectableItemResourceList` has been removed -- Field `ValidateRestoreOperationRequest` of struct `ValidateIaasVMRestoreOperationRequest` has been removed -- Field `BackupRequest` of struct `IaasVMBackupRequest` has been removed -- Field `ResourceList` of struct `ProtectedItemResourceList` has been removed -- Field `Resource` of struct `BackupRequestResource` has been removed -- Field `AzureVMWorkloadProtectedItem` of struct `AzureVMWorkloadSQLDatabaseProtectedItem` has been removed -- Field `Resource` of struct `WorkloadProtectableItemResource` has been removed -- Field `ResourceList` of struct `BackupEngineBaseResourceList` has been removed -- Field `Resource` of struct `ProtectableContainerResource` has been removed -- Field `ProtectedItem` of struct `AzureVMWorkloadProtectedItem` has been removed -- Field `AzureWorkloadRestoreRequest` of struct `AzureWorkloadSAPHanaRestoreRequest` has been removed -- Field `AzureWorkloadSAPHanaPointInTimeRestoreRequest` of struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` has been removed -- Field `OperationStatusExtendedInfo` of struct `OperationStatusProvisionILRExtendedInfo` has been removed -- Field `AzureIaaSVMProtectedItem` of struct `AzureIaaSComputeVMProtectedItem` has been removed -- Field `AzureVMWorkloadItem` of struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` has been removed -- Field `ProtectionContainer` of struct `MabContainer` has been removed -- Field `BackupRequest` of struct `AzureFileShareBackupRequest` has been removed - -### Features Added - -- New const `DedupStateDisabled` -- New const `ProtectionIntentItemTypeRecoveryServiceVaultItem` -- New const `XcoolStateInvalid` -- New const `ScheduleRunTypeHourly` -- New const `ProtectionIntentItemTypeAzureResourceItem` -- New const `XcoolStateEnabled` -- New const `AcquireStorageAccountLockNotAcquire` -- New const `AcquireStorageAccountLockAcquire` -- New const `ProtectionIntentItemTypeInvalid` -- New const `DedupStateEnabled` -- New const `ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent` -- New const `XcoolStateDisabled` -- New const `DedupStateInvalid` -- New function `*ProtectionPoliciesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*LongTermRetentionPolicy.GetRetentionPolicy() *RetentionPolicy` -- New function `*DpmJob.GetJob() *Job` -- New function `*ValidateOperationClientTriggerPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ProtectionPoliciesClientDeletePoller.ResumeToken() (string, error)` -- New function `*RestoresClientTriggerPoller.ResumeToken() (string, error)` -- New function `*AzureIaaSClassicComputeVMContainer.GetProtectionContainer() *ProtectionContainer` -- New function `*AzureWorkloadSQLRestoreWithRehydrateRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` -- New function `*AzureVMWorkloadSAPHanaSystemProtectableItem.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` -- New function `*GenericProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*AzureWorkloadSQLPointInTimeRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` -- New function `*BackupProtectableItemsClientListPager.PageResponse() BackupProtectableItemsClientListResponse` -- New function `*BackupProtectionContainersClientListPager.Err() error` -- New function `*ProtectableContainersClientListPager.NextPage(context.Context) bool` -- New function `AzureRecoveryServiceVaultProtectionIntent.MarshalJSON() ([]byte, error)` -- New function `*AzureResourceProtectionIntent.GetProtectionIntent() *ProtectionIntent` -- New function `*ResourceGuardProxiesClientGetPager.NextPage(context.Context) bool` -- New function `PossibleAcquireStorageAccountLockValues() []AcquireStorageAccountLock` -- New function `*Client.BeginMoveRecoveryPoint(context.Context, string, string, string, string, string, string, MoveRPAcrossTiersRequest, *ClientBeginMoveRecoveryPointOptions) (ClientMoveRecoveryPointPollerResponse, error)` -- New function `*AzureWorkloadSQLAutoProtectionIntent.GetProtectionIntent() *ProtectionIntent` -- New function `*AzureVMResourceFeatureSupportRequest.GetFeatureSupportRequest() *FeatureSupportRequest` -- New function `*PrivateEndpointConnectionClientDeletePoller.ResumeToken() (string, error)` -- New function `*RecoveryPointsRecommendedForMoveClientListPager.NextPage(context.Context) bool` -- New function `DedupState.ToPtr() *DedupState` -- New function `*AzureVMAppContainerProtectableContainer.GetProtectableContainer() *ProtectableContainer` -- New function `*ValidateRestoreOperationRequest.GetValidateOperationRequest() *ValidateOperationRequest` -- New function `*AzureIaaSClassicComputeVMProtectableItem.GetIaaSVMProtectableItem() *IaaSVMProtectableItem` -- New function `*AzureVMWorkloadProtectionPolicy.GetProtectionPolicy() *ProtectionPolicy` -- New function `*AzureVMWorkloadSAPAseDatabaseWorkloadItem.GetAzureVMWorkloadItem() *AzureVMWorkloadItem` -- New function `*IaaSVMContainer.GetProtectionContainer() *ProtectionContainer` -- New function `*AzureIaaSClassicComputeVMProtectableItem.UnmarshalJSON([]byte) error` -- New function `*AzureWorkloadSAPHanaPointInTimeRestoreRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` -- New function `*PrivateEndpointConnectionClientDeletePollerResponse.Resume(context.Context, *PrivateEndpointConnectionClient, string) error` -- New function `*AzureVMWorkloadSQLAvailabilityGroupProtectableItem.UnmarshalJSON([]byte) error` -- New function `HourlySchedule.MarshalJSON() ([]byte, error)` -- New function `*ValidateIaasVMRestoreOperationRequest.UnmarshalJSON([]byte) error` -- New function `*ValidateOperationResultsClient.Get(context.Context, string, string, string, *ValidateOperationResultsClientGetOptions) (ValidateOperationResultsClientGetResponse, error)` -- New function `AzureIaaSVMJobV2.MarshalJSON() ([]byte, error)` -- New function `*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` -- New function `*AzureIaaSComputeVMContainer.GetProtectionContainer() *ProtectionContainer` -- New function `*AzureWorkloadSAPHanaRestoreWithRehydrateRequest.GetRestoreRequest() *RestoreRequest` -- New function `*ClientBMSTriggerDataMovePoller.Poll(context.Context) (*http.Response, error)` -- New function `*AzureVMWorkloadSQLInstanceWorkloadItem.GetAzureVMWorkloadItem() *AzureVMWorkloadItem` -- New function `*AzureWorkloadBackupRequest.GetBackupRequest() *BackupRequest` -- New function `PossibleXcoolStateValues() []XcoolState` -- New function `*RestoresClientTriggerPoller.Done() bool` -- New function `ProtectedItem.MarshalJSON() ([]byte, error)` -- New function `*AzureBackupServerContainer.GetProtectionContainer() *ProtectionContainer` -- New function `*IaasVMRestoreWithRehydrationRequest.GetRestoreRequest() *RestoreRequest` -- New function `*BackupPoliciesClientListPager.Err() error` -- New function `*AzureIaaSComputeVMContainer.GetIaaSVMContainer() *IaaSVMContainer` -- New function `*AzureWorkloadAutoProtectionIntent.GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent` -- New function `NewValidateOperationResultsClient(string, azcore.TokenCredential, *arm.ClientOptions) *ValidateOperationResultsClient` -- New function `ProtectionPolicy.MarshalJSON() ([]byte, error)` -- New function `*ClientBMSPrepareDataMovePoller.Poll(context.Context) (*http.Response, error)` -- New function `*AzureIaaSComputeVMProtectableItem.GetIaaSVMProtectableItem() *IaaSVMProtectableItem` -- New function `*AzureWorkloadSQLPointInTimeRestoreRequest.GetRestoreRequest() *RestoreRequest` -- New function `*AzureIaaSVMProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.GetRestoreRequest() *RestoreRequest` -- New function `*LongTermSchedulePolicy.UnmarshalJSON([]byte) error` -- New function `*ClientBMSTriggerDataMovePollerResponse.Resume(context.Context, *Client, string) error` -- New function `XcoolState.ToPtr() *XcoolState` -- New function `*ClientBMSTriggerDataMovePoller.ResumeToken() (string, error)` -- New function `*AzureVMWorkloadSAPAseSystemWorkloadItem.GetAzureVMWorkloadItem() *AzureVMWorkloadItem` -- New function `*AzureVMWorkloadSQLInstanceWorkloadItem.GetWorkloadItem() *WorkloadItem` -- New function `*IaasVMILRRegistrationRequest.GetILRRequest() *ILRRequest` -- New function `*VaultJob.GetJob() *Job` -- New function `*MabProtectionPolicy.GetProtectionPolicy() *ProtectionPolicy` -- New function `*ClientMoveRecoveryPointPoller.ResumeToken() (string, error)` -- New function `*AzureSQLContainer.GetProtectionContainer() *ProtectionContainer` -- New function `*LogSchedulePolicy.GetSchedulePolicy() *SchedulePolicy` -- New function `*AzureVMWorkloadSQLDatabaseProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `ClientMoveRecoveryPointPollerResponse.PollUntilDone(context.Context, time.Duration) (ClientMoveRecoveryPointResponse, error)` -- New function `*AzureVMWorkloadSAPHanaDatabaseWorkloadItem.GetAzureVMWorkloadItem() *AzureVMWorkloadItem` -- New function `*AzureWorkloadSQLAutoProtectionIntent.GetAzureWorkloadAutoProtectionIntent() *AzureWorkloadAutoProtectionIntent` -- New function `*AzureVMWorkloadSAPHanaSystemWorkloadItem.GetAzureVMWorkloadItem() *AzureVMWorkloadItem` -- New function `*AzureSQLContainer.UnmarshalJSON([]byte) error` -- New function `*RecoveryPointsRecommendedForMoveClientListPager.PageResponse() RecoveryPointsRecommendedForMoveClientListResponse` -- New function `*SimpleRetentionPolicy.GetRetentionPolicy() *RetentionPolicy` -- New function `*AzureWorkloadAutoProtectionIntent.UnmarshalJSON([]byte) error` -- New function `*AzureVMWorkloadSAPAseDatabaseProtectedItem.UnmarshalJSON([]byte) error` -- New function `*AzureWorkloadSAPHanaRestoreWithRehydrateRequest.GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest` -- New function `*AzureWorkloadSAPHanaPointInTimeRestoreRequest.GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest` -- New function `*AzureBackupGoalFeatureSupportRequest.UnmarshalJSON([]byte) error` -- New function `*AzureWorkloadRestoreRequest.GetRestoreRequest() *RestoreRequest` -- New function `*AzureIaaSComputeVMProtectableItem.UnmarshalJSON([]byte) error` -- New function `*BackupEnginesClientListPager.NextPage(context.Context) bool` -- New function `*AzureVMWorkloadSAPAseDatabaseProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*ProtectionPoliciesClientDeletePoller.Done() bool` -- New function `*HourlySchedule.UnmarshalJSON([]byte) error` -- New function `*AzureWorkloadSAPHanaPointInTimeRecoveryPoint.GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint` -- New function `*PrivateEndpointConnectionClientPutPoller.FinalResponse(context.Context) (PrivateEndpointConnectionClientPutResponse, error)` -- New function `*ClientBMSPrepareDataMovePoller.FinalResponse(context.Context) (ClientBMSPrepareDataMoveResponse, error)` -- New function `*BackupProtectedItemsClientListPager.PageResponse() BackupProtectedItemsClientListResponse` -- New function `AzureWorkloadContainerAutoProtectionIntent.MarshalJSON() ([]byte, error)` -- New function `*AzureWorkloadSQLPointInTimeRecoveryPoint.GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint` -- New function `*AzureWorkloadSAPHanaRecoveryPoint.UnmarshalJSON([]byte) error` -- New function `*AzureVMAppContainerProtectionContainer.GetProtectionContainer() *ProtectionContainer` -- New function `ValidateOperationClientTriggerPollerResponse.PollUntilDone(context.Context, time.Duration) (ValidateOperationClientTriggerResponse, error)` -- New function `*AzureWorkloadSAPHanaRestoreRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` -- New function `*AzureWorkloadSAPHanaRecoveryPoint.GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint` -- New function `*PrivateEndpointConnectionClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*AzureWorkloadSQLRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` -- New function `*OperationStatusValidateOperationExtendedInfo.UnmarshalJSON([]byte) error` -- New function `*AzureWorkloadPointInTimeRestoreRequest.GetRestoreRequest() *RestoreRequest` -- New function `*AzureSQLProtectionPolicy.GetProtectionPolicy() *ProtectionPolicy` -- New function `*PrivateEndpointConnectionClientPutPoller.ResumeToken() (string, error)` -- New function `OperationStatusValidateOperationExtendedInfo.MarshalJSON() ([]byte, error)` -- New function `*ClientMoveRecoveryPointPollerResponse.Resume(context.Context, *Client, string) error` -- New function `*AzureVMWorkloadSAPHanaSystemProtectableItem.UnmarshalJSON([]byte) error` -- New function `*ValidateOperationStatusesClient.Get(context.Context, string, string, string, *ValidateOperationStatusesClientGetOptions) (ValidateOperationStatusesClientGetResponse, error)` -- New function `*AzureVMWorkloadSQLAvailabilityGroupProtectableItem.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` -- New function `*BackupWorkloadItemsClientListPager.PageResponse() BackupWorkloadItemsClientListResponse` -- New function `*RecoveryPointsClientListPager.Err() error` -- New function `*AzureIaaSVMJobV2.GetJob() *Job` -- New function `*AzureFileShareRestoreRequest.GetRestoreRequest() *RestoreRequest` -- New function `*DpmBackupEngine.UnmarshalJSON([]byte) error` -- New function `*PrepareDataMoveResponse.GetVaultStorageConfigOperationResultResponse() *VaultStorageConfigOperationResultResponse` -- New function `NewValidateOperationStatusesClient(string, azcore.TokenCredential, *arm.ClientOptions) *ValidateOperationStatusesClient` -- New function `NewValidateOperationClient(string, azcore.TokenCredential, *arm.ClientOptions) *ValidateOperationClient` -- New function `*AzureIaaSComputeVMProtectedItem.GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem` -- New function `*ClientMoveRecoveryPointPoller.Poll(context.Context) (*http.Response, error)` -- New function `*AzureWorkloadContainerAutoProtectionIntent.UnmarshalJSON([]byte) error` -- New function `*AzureIaaSComputeVMProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `*AzureIaaSComputeVMContainer.UnmarshalJSON([]byte) error` -- New function `*AzureVMWorkloadSAPHanaDatabaseProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `*ClientBMSTriggerDataMovePoller.FinalResponse(context.Context) (ClientBMSTriggerDataMoveResponse, error)` -- New function `*ProtectionPoliciesClientDeletePollerResponse.Resume(context.Context, *ProtectionPoliciesClient, string) error` -- New function `*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.GetRestoreRequest() *RestoreRequest` -- New function `*AzureWorkloadSAPHanaRestoreRequest.GetRestoreRequest() *RestoreRequest` -- New function `*AzureWorkloadRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` -- New function `*BackupJobsClientListPager.NextPage(context.Context) bool` -- New function `*OperationResultInfo.GetOperationResultInfoBase() *OperationResultInfoBase` -- New function `*AzureVMWorkloadSQLInstanceProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `*IaaSVMProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `*DpmContainer.GetProtectionContainer() *ProtectionContainer` -- New function `*AzureWorkloadSAPHanaPointInTimeRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` -- New function `*OperationsClientListPager.NextPage(context.Context) bool` -- New function `*ValidateOperationClientTriggerPoller.ResumeToken() (string, error)` -- New function `*SimpleSchedulePolicy.GetSchedulePolicy() *SchedulePolicy` -- New function `*Client.BeginBMSTriggerDataMove(context.Context, string, string, TriggerDataMoveRequest, *ClientBeginBMSTriggerDataMoveOptions) (ClientBMSTriggerDataMovePollerResponse, error)` -- New function `*ProtectionPoliciesClientDeletePoller.FinalResponse(context.Context) (ProtectionPoliciesClientDeleteResponse, error)` -- New function `ClientBMSTriggerDataMovePollerResponse.PollUntilDone(context.Context, time.Duration) (ClientBMSTriggerDataMoveResponse, error)` -- New function `*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() *AzureWorkloadSAPHanaPointInTimeRestoreRequest` -- New function `*AzureVMWorkloadSQLDatabaseWorkloadItem.GetWorkloadItem() *WorkloadItem` -- New function `*ClientMoveRecoveryPointPoller.FinalResponse(context.Context) (ClientMoveRecoveryPointResponse, error)` -- New function `*AzureWorkloadSQLRestoreWithRehydrateRequest.GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest` -- New function `*GenericContainer.GetProtectionContainer() *ProtectionContainer` -- New function `*AzureFileShareRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` -- New function `*BackupProtectionIntentClientListPager.Err() error` -- New function `*AzureVMWorkloadSQLDatabaseProtectedItem.UnmarshalJSON([]byte) error` -- New function `*AzureVMWorkloadSAPHanaDatabaseProtectableItem.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` -- New function `*DPMProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*AzureStorageJob.GetJob() *Job` -- New function `AcquireStorageAccountLock.ToPtr() *AcquireStorageAccountLock` -- New function `*AzureRecoveryServiceVaultProtectionIntent.GetProtectionIntent() *ProtectionIntent` -- New function `*IaasVMRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` -- New function `*AzureVMWorkloadProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*AzureVMAppContainerProtectableContainer.UnmarshalJSON([]byte) error` -- New function `*AzureWorkloadSQLRestoreRequest.GetRestoreRequest() *RestoreRequest` -- New function `*ValidateOperationClientTriggerPoller.FinalResponse(context.Context) (ValidateOperationClientTriggerResponse, error)` -- New function `*AzureWorkloadPointInTimeRecoveryPoint.GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint` -- New function `*BackupProtectableItemsClientListPager.Err() error` -- New function `*AzureWorkloadPointInTimeRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` -- New function `*AzureFileShareBackupRequest.GetBackupRequest() *BackupRequest` -- New function `*BackupProtectionIntentClientListPager.NextPage(context.Context) bool` -- New function `*AzureVMWorkloadSAPHanaDatabaseWorkloadItem.UnmarshalJSON([]byte) error` -- New function `ProtectionPoliciesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (ProtectionPoliciesClientDeleteResponse, error)` -- New function `*AzureStorageProtectableContainer.UnmarshalJSON([]byte) error` -- New function `*AzureVMWorkloadSAPAseSystemWorkloadItem.UnmarshalJSON([]byte) error` -- New function `*BackupWorkloadItemsClientListPager.NextPage(context.Context) bool` -- New function `*AzureSQLAGWorkloadContainerProtectionContainer.GetAzureWorkloadContainer() *AzureWorkloadContainer` -- New function `*AzureWorkloadSAPHanaPointInTimeRestoreRequest.GetRestoreRequest() *RestoreRequest` -- New function `*AzureIaaSComputeVMProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `Job.MarshalJSON() ([]byte, error)` -- New function `*AzureSQLAGWorkloadContainerProtectionContainer.UnmarshalJSON([]byte) error` -- New function `*AzureVMWorkloadSAPAseDatabaseWorkloadItem.UnmarshalJSON([]byte) error` -- New function `*GenericRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` -- New function `*BackupEnginesClientListPager.PageResponse() BackupEnginesClientListResponse` -- New function `*AzureWorkloadSQLRestoreRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` -- New function `*AzureWorkloadContainerAutoProtectionIntent.GetProtectionIntent() *ProtectionIntent` -- New function `NewClient(string, azcore.TokenCredential, *arm.ClientOptions) *Client` -- New function `*OperationsClientListPager.Err() error` -- New function `*AzureIaaSClassicComputeVMProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*RecoveryPointsClientListPager.NextPage(context.Context) bool` -- New function `*ValidateOperationClientTriggerPollerResponse.Resume(context.Context, *ValidateOperationClient, string) error` -- New function `*ProtectableContainersClientListPager.Err() error` -- New function `*OperationStatusJobsExtendedInfo.GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo` -- New function `PrivateEndpointConnectionClientPutPollerResponse.PollUntilDone(context.Context, time.Duration) (PrivateEndpointConnectionClientPutResponse, error)` -- New function `*ClientBMSPrepareDataMovePoller.ResumeToken() (string, error)` -- New function `*RecoveryPointsRecommendedForMoveClientListPager.Err() error` -- New function `*AzureFileShareProtectionPolicy.GetProtectionPolicy() *ProtectionPolicy` -- New function `*ClientBMSPrepareDataMovePollerResponse.Resume(context.Context, *Client, string) error` -- New function `*ValidateOperationClientTriggerPoller.Done() bool` -- New function `*ResourceGuardProxiesClientGetPager.PageResponse() ResourceGuardProxiesClientGetResponse` -- New function `*AzureVMWorkloadSAPHanaSystemProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `*BackupWorkloadItemsClientListPager.Err() error` -- New function `PossibleProtectionIntentItemTypeValues() []ProtectionIntentItemType` -- New function `*RecoveryPointsClientListPager.PageResponse() RecoveryPointsClientListResponse` -- New function `*RestoresClientTriggerPollerResponse.Resume(context.Context, *RestoresClient, string) error` -- New function `*PrivateEndpointConnectionClientPutPoller.Done() bool` -- New function `*AzureVMWorkloadSAPAseDatabaseWorkloadItem.GetWorkloadItem() *WorkloadItem` -- New function `*AzureStorageContainer.GetProtectionContainer() *ProtectionContainer` -- New function `RecoveryPointTierInformationV2.MarshalJSON() ([]byte, error)` -- New function `*BackupProtectionIntentClientListPager.PageResponse() BackupProtectionIntentClientListResponse` -- New function `*AzureVMWorkloadSQLDatabaseWorkloadItem.GetAzureVMWorkloadItem() *AzureVMWorkloadItem` -- New function `*AzureIaaSVMProtectionPolicy.GetProtectionPolicy() *ProtectionPolicy` -- New function `*AzureWorkloadSAPHanaRestoreRequest.UnmarshalJSON([]byte) error` -- New function `*AzureWorkloadSQLPointInTimeRecoveryPoint.GetAzureWorkloadSQLRecoveryPoint() *AzureWorkloadSQLRecoveryPoint` -- New function `*AzureWorkloadSAPHanaPointInTimeRecoveryPoint.GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint` -- New function `*OperationsClientListPager.PageResponse() OperationsClientListResponse` -- New function `AzureWorkloadRecoveryPoint.MarshalJSON() ([]byte, error)` -- New function `*AzureVMWorkloadSQLDatabaseProtectableItem.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` -- New function `*AzureWorkloadSQLRecoveryPoint.GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint` -- New function `*AzureVMAppContainerProtectionContainer.UnmarshalJSON([]byte) error` -- New function `*AzureBackupServerContainer.UnmarshalJSON([]byte) error` -- New function `*AzureBackupServerContainer.GetDpmContainer() *DpmContainer` -- New function `ClientBMSPrepareDataMovePollerResponse.PollUntilDone(context.Context, time.Duration) (ClientBMSPrepareDataMoveResponse, error)` -- New function `*AzureBackupGoalFeatureSupportRequest.GetFeatureSupportRequest() *FeatureSupportRequest` -- New function `*MabContainer.GetProtectionContainer() *ProtectionContainer` -- New function `*BackupJobsClientListPager.Err() error` -- New function `*AzureFileShareProvisionILRRequest.GetILRRequest() *ILRRequest` -- New function `*BackupProtectedItemsClientListPager.Err() error` -- New function `*OperationStatusProvisionILRExtendedInfo.GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo` -- New function `*AzureIaaSVMJob.GetJob() *Job` -- New function `*ExportJobsOperationResultInfo.GetOperationResultInfoBase() *OperationResultInfoBase` -- New function `*AzureVMWorkloadSAPHanaDatabaseProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*AzureWorkloadSAPHanaPointInTimeRecoveryPoint.UnmarshalJSON([]byte) error` -- New function `*AzureIaaSClassicComputeVMContainer.UnmarshalJSON([]byte) error` -- New function `*AzureIaaSClassicComputeVMProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `AzureIaaSVMHealthDetails.MarshalJSON() ([]byte, error)` -- New function `*AzureVMWorkloadSAPHanaSystemWorkloadItem.GetWorkloadItem() *WorkloadItem` -- New function `*RestoresClientTriggerPoller.FinalResponse(context.Context) (RestoresClientTriggerResponse, error)` -- New function `*BackupPoliciesClientListPager.PageResponse() BackupPoliciesClientListResponse` -- New function `PossibleDedupStateValues() []DedupState` -- New function `*BackupProtectedItemsClientListPager.NextPage(context.Context) bool` -- New function `*PrivateEndpointConnectionClientDeletePoller.FinalResponse(context.Context) (PrivateEndpointConnectionClientDeleteResponse, error)` -- New function `*AzureIaaSClassicComputeVMProtectedItem.UnmarshalJSON([]byte) error` -- New function `*BackupJobsClientListPager.PageResponse() BackupJobsClientListResponse` -- New function `AzureWorkloadSQLRestoreRequest.MarshalJSON() ([]byte, error)` -- New function `*AzureVMWorkloadSAPHanaDatabaseProtectableItem.UnmarshalJSON([]byte) error` -- New function `*RestoresClientTriggerPoller.Poll(context.Context) (*http.Response, error)` -- New function `*BackupProtectionContainersClientListPager.NextPage(context.Context) bool` -- New function `*AzureIaaSVMJobV2.UnmarshalJSON([]byte) error` -- New function `*AzureSQLAGWorkloadContainerProtectionContainer.GetProtectionContainer() *ProtectionContainer` -- New function `*IaasVMBackupRequest.GetBackupRequest() *BackupRequest` -- New function `PrivateEndpointConnectionClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (PrivateEndpointConnectionClientDeleteResponse, error)` -- New function `*IaasVMRestoreWithRehydrationRequest.GetIaasVMRestoreRequest() *IaasVMRestoreRequest` -- New function `*AzureVMWorkloadSQLAvailabilityGroupProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `*AzureWorkloadAutoProtectionIntent.GetProtectionIntent() *ProtectionIntent` -- New function `*AzureRecoveryServiceVaultProtectionIntent.UnmarshalJSON([]byte) error` -- New function `*AzureVMWorkloadSAPHanaDatabaseProtectedItem.UnmarshalJSON([]byte) error` -- New function `*ProtectableContainersClientListPager.PageResponse() ProtectableContainersClientListResponse` -- New function `*AzureVMWorkloadSAPAseSystemWorkloadItem.GetWorkloadItem() *WorkloadItem` -- New function `*AzureVMWorkloadSQLInstanceProtectableItem.UnmarshalJSON([]byte) error` -- New function `*AzureVMWorkloadSQLDatabaseWorkloadItem.UnmarshalJSON([]byte) error` -- New function `*AzureVMWorkloadSQLDatabaseProtectableItem.UnmarshalJSON([]byte) error` -- New function `*LongTermSchedulePolicy.GetSchedulePolicy() *SchedulePolicy` -- New function `*ValidateIaasVMRestoreOperationRequest.GetValidateOperationRequest() *ValidateOperationRequest` -- New function `*AzureIaaSClassicComputeVMProtectedItem.GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem` -- New function `*AzureVMWorkloadSAPAseSystemProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `*AzureVMWorkloadSAPHanaDatabaseWorkloadItem.GetWorkloadItem() *WorkloadItem` -- New function `*AzureWorkloadSAPHanaRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` -- New function `RestoresClientTriggerPollerResponse.PollUntilDone(context.Context, time.Duration) (RestoresClientTriggerResponse, error)` -- New function `*AzureVMWorkloadSQLDatabaseProtectedItem.GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem` -- New function `*AzureWorkloadContainer.GetProtectionContainer() *ProtectionContainer` -- New function `*AzureVMWorkloadSAPHanaDatabaseProtectedItem.GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem` -- New function `*AzureBackupServerEngine.GetBackupEngineBase() *BackupEngineBase` -- New function `*MabFileFolderProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*Client.GetOperationStatus(context.Context, string, string, string, *ClientGetOperationStatusOptions) (ClientGetOperationStatusResponse, error)` -- New function `*AzureVMWorkloadSAPAseDatabaseProtectedItem.GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem` -- New function `*ResourceGuardProxiesClientGetPager.Err() error` -- New function `*MabJob.GetJob() *Job` -- New function `AzureWorkloadSAPHanaRestoreRequest.MarshalJSON() ([]byte, error)` -- New function `*ClientBMSTriggerDataMovePoller.Done() bool` -- New function `*AzureIaaSComputeVMProtectedItem.UnmarshalJSON([]byte) error` -- New function `*GenericProtectionPolicy.GetProtectionPolicy() *ProtectionPolicy` -- New function `*BackupProtectableItemsClientListPager.NextPage(context.Context) bool` -- New function `*ClientMoveRecoveryPointPoller.Done() bool` -- New function `*PrivateEndpointConnectionClientPutPoller.Poll(context.Context) (*http.Response, error)` -- New function `*AzureVMWorkloadSAPHanaSystemWorkloadItem.UnmarshalJSON([]byte) error` -- New function `*ValidateOperationClient.BeginTrigger(context.Context, string, string, ValidateOperationRequestClassification, *ValidateOperationClientBeginTriggerOptions) (ValidateOperationClientTriggerPollerResponse, error)` -- New function `*AzureVMWorkloadSQLInstanceProtectableItem.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` -- New function `*AzureVMAppContainerProtectionContainer.GetAzureWorkloadContainer() *AzureWorkloadContainer` -- New function `*BackupEnginesClientListPager.Err() error` -- New function `*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest` -- New function `*AzureVMWorkloadItem.GetWorkloadItem() *WorkloadItem` -- New function `*BackupPoliciesClientListPager.NextPage(context.Context) bool` -- New function `*Client.BeginBMSPrepareDataMove(context.Context, string, string, PrepareDataMoveRequest, *ClientBeginBMSPrepareDataMoveOptions) (ClientBMSPrepareDataMovePollerResponse, error)` -- New function `*AzureWorkloadSQLPointInTimeRestoreRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` -- New function `ProtectionIntentItemType.ToPtr() *ProtectionIntentItemType` -- New function `*PrivateEndpointConnectionClientDeletePoller.Done() bool` -- New function `*AzureWorkloadSQLRestoreWithRehydrateRequest.GetRestoreRequest() *RestoreRequest` -- New function `*AzureVMWorkloadProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `*PrivateEndpointConnectionClientPutPollerResponse.Resume(context.Context, *PrivateEndpointConnectionClient, string) error` -- New function `*AzureVMWorkloadSAPAseSystemProtectableItem.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` -- New function `*ValidateIaasVMRestoreOperationRequest.GetValidateRestoreOperationRequest() *ValidateRestoreOperationRequest` -- New function `*AzureWorkloadSQLPointInTimeRestoreRequest.GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest` -- New function `*AzureStorageProtectableContainer.GetProtectableContainer() *ProtectableContainer` -- New function `*AzureIaaSClassicComputeVMContainer.GetIaaSVMContainer() *IaaSVMContainer` -- New function `*OperationStatusJobExtendedInfo.GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo` -- New function `*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.GetAzureWorkloadSQLPointInTimeRestoreRequest() *AzureWorkloadSQLPointInTimeRestoreRequest` -- New function `AzureWorkloadRestoreRequest.MarshalJSON() ([]byte, error)` -- New function `*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` -- New function `*AzureWorkloadSAPHanaRestoreWithRehydrateRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` -- New function `*AzureWorkloadSQLAutoProtectionIntent.GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent` -- New function `*BackupProtectionContainersClientListPager.PageResponse() BackupProtectionContainersClientListResponse` -- New function `*OperationStatusValidateOperationExtendedInfo.GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo` -- New function `*ClientBMSPrepareDataMovePoller.Done() bool` -- New function `*DpmBackupEngine.GetBackupEngineBase() *BackupEngineBase` -- New function `*AzureSQLProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*AzureWorkloadJob.GetJob() *Job` -- New function `*AzureWorkloadPointInTimeRestoreRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` -- New function `*BMSPrepareDataMoveOperationResultClientGetResult.UnmarshalJSON([]byte) error` -- New function `*AzureFileShareProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` -- New function `*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest.GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest` -- New function `*AzureBackupServerEngine.UnmarshalJSON([]byte) error` -- New function `*AzureFileshareProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*IaasVMRestoreRequest.GetRestoreRequest() *RestoreRequest` -- New function `*AzureVMWorkloadSQLDatabaseProtectedItem.GetProtectedItem() *ProtectedItem` -- New function `*AzureVMWorkloadSAPAseSystemProtectableItem.UnmarshalJSON([]byte) error` -- New struct `AzureIaaSVMJobV2` -- New struct `AzureWorkloadContainerAutoProtectionIntent` -- New struct `BMSPrepareDataMoveOperationResultClientGetOptions` -- New struct `BMSPrepareDataMoveOperationResultClientGetResponse` -- New struct `BMSPrepareDataMoveOperationResultClientGetResult` -- New struct `BackupEnginesClientGetOptions` -- New struct `BackupEnginesClientGetResponse` -- New struct `BackupEnginesClientGetResult` -- New struct `BackupEnginesClientListOptions` -- New struct `BackupEnginesClientListPager` -- New struct `BackupEnginesClientListResponse` -- New struct `BackupEnginesClientListResult` -- New struct `BackupJobsClientListOptions` -- New struct `BackupJobsClientListPager` -- New struct `BackupJobsClientListResponse` -- New struct `BackupJobsClientListResult` -- New struct `BackupOperationResultsClientGetOptions` -- New struct `BackupOperationResultsClientGetResponse` -- New struct `BackupOperationStatusesClientGetOptions` -- New struct `BackupOperationStatusesClientGetResponse` -- New struct `BackupOperationStatusesClientGetResult` -- New struct `BackupPoliciesClientListOptions` -- New struct `BackupPoliciesClientListPager` -- New struct `BackupPoliciesClientListResponse` -- New struct `BackupPoliciesClientListResult` -- New struct `BackupProtectableItemsClientListOptions` -- New struct `BackupProtectableItemsClientListPager` -- New struct `BackupProtectableItemsClientListResponse` -- New struct `BackupProtectableItemsClientListResult` -- New struct `BackupProtectedItemsClientListOptions` -- New struct `BackupProtectedItemsClientListPager` -- New struct `BackupProtectedItemsClientListResponse` -- New struct `BackupProtectedItemsClientListResult` -- New struct `BackupProtectionContainersClientListOptions` -- New struct `BackupProtectionContainersClientListPager` -- New struct `BackupProtectionContainersClientListResponse` -- New struct `BackupProtectionContainersClientListResult` -- New struct `BackupProtectionIntentClientListOptions` -- New struct `BackupProtectionIntentClientListPager` -- New struct `BackupProtectionIntentClientListResponse` -- New struct `BackupProtectionIntentClientListResult` -- New struct `BackupResourceEncryptionConfigsClientGetOptions` -- New struct `BackupResourceEncryptionConfigsClientGetResponse` -- New struct `BackupResourceEncryptionConfigsClientGetResult` -- New struct `BackupResourceEncryptionConfigsClientUpdateOptions` -- New struct `BackupResourceEncryptionConfigsClientUpdateResponse` -- New struct `BackupResourceStorageConfigsNonCRRClientGetOptions` -- New struct `BackupResourceStorageConfigsNonCRRClientGetResponse` -- New struct `BackupResourceStorageConfigsNonCRRClientGetResult` -- New struct `BackupResourceStorageConfigsNonCRRClientPatchOptions` -- New struct `BackupResourceStorageConfigsNonCRRClientPatchResponse` -- New struct `BackupResourceStorageConfigsNonCRRClientUpdateOptions` -- New struct `BackupResourceStorageConfigsNonCRRClientUpdateResponse` -- New struct `BackupResourceStorageConfigsNonCRRClientUpdateResult` -- New struct `BackupResourceVaultConfigsClientGetOptions` -- New struct `BackupResourceVaultConfigsClientGetResponse` -- New struct `BackupResourceVaultConfigsClientGetResult` -- New struct `BackupResourceVaultConfigsClientPutOptions` -- New struct `BackupResourceVaultConfigsClientPutResponse` -- New struct `BackupResourceVaultConfigsClientPutResult` -- New struct `BackupResourceVaultConfigsClientUpdateOptions` -- New struct `BackupResourceVaultConfigsClientUpdateResponse` -- New struct `BackupResourceVaultConfigsClientUpdateResult` -- New struct `BackupStatusClientGetOptions` -- New struct `BackupStatusClientGetResponse` -- New struct `BackupStatusClientGetResult` -- New struct `BackupUsageSummariesClientListOptions` -- New struct `BackupUsageSummariesClientListResponse` -- New struct `BackupUsageSummariesClientListResult` -- New struct `BackupWorkloadItemsClientListOptions` -- New struct `BackupWorkloadItemsClientListPager` -- New struct `BackupWorkloadItemsClientListResponse` -- New struct `BackupWorkloadItemsClientListResult` -- New struct `BackupsClientTriggerOptions` -- New struct `BackupsClientTriggerResponse` -- New struct `Client` -- New struct `ClientBMSPrepareDataMovePoller` -- New struct `ClientBMSPrepareDataMovePollerResponse` -- New struct `ClientBMSPrepareDataMoveResponse` -- New struct `ClientBMSTriggerDataMovePoller` -- New struct `ClientBMSTriggerDataMovePollerResponse` -- New struct `ClientBMSTriggerDataMoveResponse` -- New struct `ClientBeginBMSPrepareDataMoveOptions` -- New struct `ClientBeginBMSTriggerDataMoveOptions` -- New struct `ClientBeginMoveRecoveryPointOptions` -- New struct `ClientGetOperationStatusOptions` -- New struct `ClientGetOperationStatusResponse` -- New struct `ClientGetOperationStatusResult` -- New struct `ClientMoveRecoveryPointPoller` -- New struct `ClientMoveRecoveryPointPollerResponse` -- New struct `ClientMoveRecoveryPointResponse` -- New struct `ExportJobsOperationResultsClientGetOptions` -- New struct `ExportJobsOperationResultsClientGetResponse` -- New struct `ExportJobsOperationResultsClientGetResult` -- New struct `FeatureSupportClientValidateOptions` -- New struct `FeatureSupportClientValidateResponse` -- New struct `FeatureSupportClientValidateResult` -- New struct `HourlySchedule` -- New struct `IdentityBasedRestoreDetails` -- New struct `ItemLevelRecoveryConnectionsClientProvisionOptions` -- New struct `ItemLevelRecoveryConnectionsClientProvisionResponse` -- New struct `ItemLevelRecoveryConnectionsClientRevokeOptions` -- New struct `ItemLevelRecoveryConnectionsClientRevokeResponse` -- New struct `JobCancellationsClientTriggerOptions` -- New struct `JobCancellationsClientTriggerResponse` -- New struct `JobDetailsClientGetOptions` -- New struct `JobDetailsClientGetResponse` -- New struct `JobDetailsClientGetResult` -- New struct `JobOperationResultsClientGetOptions` -- New struct `JobOperationResultsClientGetResponse` -- New struct `JobsClientExportOptions` -- New struct `JobsClientExportResponse` -- New struct `OperationClientValidateOptions` -- New struct `OperationClientValidateResponse` -- New struct `OperationClientValidateResult` -- New struct `OperationStatusValidateOperationExtendedInfo` -- New struct `OperationsClientListOptions` -- New struct `OperationsClientListPager` -- New struct `OperationsClientListResponse` -- New struct `OperationsClientListResult` -- New struct `PrivateEndpointClientGetOperationStatusOptions` -- New struct `PrivateEndpointClientGetOperationStatusResponse` -- New struct `PrivateEndpointClientGetOperationStatusResult` -- New struct `PrivateEndpointConnectionClientBeginDeleteOptions` -- New struct `PrivateEndpointConnectionClientBeginPutOptions` -- New struct `PrivateEndpointConnectionClientDeletePoller` -- New struct `PrivateEndpointConnectionClientDeletePollerResponse` -- New struct `PrivateEndpointConnectionClientDeleteResponse` -- New struct `PrivateEndpointConnectionClientGetOptions` -- New struct `PrivateEndpointConnectionClientGetResponse` -- New struct `PrivateEndpointConnectionClientGetResult` -- New struct `PrivateEndpointConnectionClientPutPoller` -- New struct `PrivateEndpointConnectionClientPutPollerResponse` -- New struct `PrivateEndpointConnectionClientPutResponse` -- New struct `PrivateEndpointConnectionClientPutResult` -- New struct `ProtectableContainersClientListOptions` -- New struct `ProtectableContainersClientListPager` -- New struct `ProtectableContainersClientListResponse` -- New struct `ProtectableContainersClientListResult` -- New struct `ProtectedItemOperationResultsClientGetOptions` -- New struct `ProtectedItemOperationResultsClientGetResponse` -- New struct `ProtectedItemOperationResultsClientGetResult` -- New struct `ProtectedItemOperationStatusesClientGetOptions` -- New struct `ProtectedItemOperationStatusesClientGetResponse` -- New struct `ProtectedItemOperationStatusesClientGetResult` -- New struct `ProtectedItemsClientCreateOrUpdateOptions` -- New struct `ProtectedItemsClientCreateOrUpdateResponse` -- New struct `ProtectedItemsClientCreateOrUpdateResult` -- New struct `ProtectedItemsClientDeleteOptions` -- New struct `ProtectedItemsClientDeleteResponse` -- New struct `ProtectedItemsClientGetOptions` -- New struct `ProtectedItemsClientGetResponse` -- New struct `ProtectedItemsClientGetResult` -- New struct `ProtectionContainerOperationResultsClientGetOptions` -- New struct `ProtectionContainerOperationResultsClientGetResponse` -- New struct `ProtectionContainerOperationResultsClientGetResult` -- New struct `ProtectionContainerRefreshOperationResultsClientGetOptions` -- New struct `ProtectionContainerRefreshOperationResultsClientGetResponse` -- New struct `ProtectionContainersClientGetOptions` -- New struct `ProtectionContainersClientGetResponse` -- New struct `ProtectionContainersClientGetResult` -- New struct `ProtectionContainersClientInquireOptions` -- New struct `ProtectionContainersClientInquireResponse` -- New struct `ProtectionContainersClientRefreshOptions` -- New struct `ProtectionContainersClientRefreshResponse` -- New struct `ProtectionContainersClientRegisterOptions` -- New struct `ProtectionContainersClientRegisterResponse` -- New struct `ProtectionContainersClientRegisterResult` -- New struct `ProtectionContainersClientUnregisterOptions` -- New struct `ProtectionContainersClientUnregisterResponse` -- New struct `ProtectionIntentClientCreateOrUpdateOptions` -- New struct `ProtectionIntentClientCreateOrUpdateResponse` -- New struct `ProtectionIntentClientCreateOrUpdateResult` -- New struct `ProtectionIntentClientDeleteOptions` -- New struct `ProtectionIntentClientDeleteResponse` -- New struct `ProtectionIntentClientGetOptions` -- New struct `ProtectionIntentClientGetResponse` -- New struct `ProtectionIntentClientGetResult` -- New struct `ProtectionIntentClientValidateOptions` -- New struct `ProtectionIntentClientValidateResponse` -- New struct `ProtectionIntentClientValidateResult` -- New struct `ProtectionPoliciesClientBeginDeleteOptions` -- New struct `ProtectionPoliciesClientCreateOrUpdateOptions` -- New struct `ProtectionPoliciesClientCreateOrUpdateResponse` -- New struct `ProtectionPoliciesClientCreateOrUpdateResult` -- New struct `ProtectionPoliciesClientDeletePoller` -- New struct `ProtectionPoliciesClientDeletePollerResponse` -- New struct `ProtectionPoliciesClientDeleteResponse` -- New struct `ProtectionPoliciesClientGetOptions` -- New struct `ProtectionPoliciesClientGetResponse` -- New struct `ProtectionPoliciesClientGetResult` -- New struct `ProtectionPolicyOperationResultsClientGetOptions` -- New struct `ProtectionPolicyOperationResultsClientGetResponse` -- New struct `ProtectionPolicyOperationResultsClientGetResult` -- New struct `ProtectionPolicyOperationStatusesClientGetOptions` -- New struct `ProtectionPolicyOperationStatusesClientGetResponse` -- New struct `ProtectionPolicyOperationStatusesClientGetResult` -- New struct `RecoveryPointTierInformationV2` -- New struct `RecoveryPointsClientGetOptions` -- New struct `RecoveryPointsClientGetResponse` -- New struct `RecoveryPointsClientGetResult` -- New struct `RecoveryPointsClientListOptions` -- New struct `RecoveryPointsClientListPager` -- New struct `RecoveryPointsClientListResponse` -- New struct `RecoveryPointsClientListResult` -- New struct `RecoveryPointsRecommendedForMoveClientListOptions` -- New struct `RecoveryPointsRecommendedForMoveClientListPager` -- New struct `RecoveryPointsRecommendedForMoveClientListResponse` -- New struct `RecoveryPointsRecommendedForMoveClientListResult` -- New struct `ResourceGuardProxiesClientGetOptions` -- New struct `ResourceGuardProxiesClientGetPager` -- New struct `ResourceGuardProxiesClientGetResponse` -- New struct `ResourceGuardProxiesClientGetResult` -- New struct `ResourceGuardProxyClientDeleteOptions` -- New struct `ResourceGuardProxyClientDeleteResponse` -- New struct `ResourceGuardProxyClientGetOptions` -- New struct `ResourceGuardProxyClientGetResponse` -- New struct `ResourceGuardProxyClientGetResult` -- New struct `ResourceGuardProxyClientPutOptions` -- New struct `ResourceGuardProxyClientPutResponse` -- New struct `ResourceGuardProxyClientPutResult` -- New struct `ResourceGuardProxyClientUnlockDeleteOptions` -- New struct `ResourceGuardProxyClientUnlockDeleteResponse` -- New struct `ResourceGuardProxyClientUnlockDeleteResult` -- New struct `RestoresClientBeginTriggerOptions` -- New struct `RestoresClientTriggerPoller` -- New struct `RestoresClientTriggerPollerResponse` -- New struct `RestoresClientTriggerResponse` -- New struct `SecurityPINsClientGetOptions` -- New struct `SecurityPINsClientGetResponse` -- New struct `SecurityPINsClientGetResult` -- New struct `ValidateOperationClient` -- New struct `ValidateOperationClientBeginTriggerOptions` -- New struct `ValidateOperationClientTriggerPoller` -- New struct `ValidateOperationClientTriggerPollerResponse` -- New struct `ValidateOperationClientTriggerResponse` -- New struct `ValidateOperationResultsClient` -- New struct `ValidateOperationResultsClientGetOptions` -- New struct `ValidateOperationResultsClientGetResponse` -- New struct `ValidateOperationResultsClientGetResult` -- New struct `ValidateOperationStatusesClient` -- New struct `ValidateOperationStatusesClientGetOptions` -- New struct `ValidateOperationStatusesClientGetResponse` -- New struct `ValidateOperationStatusesClientGetResult` -- New field `ETag` in struct `ProtectionIntentResource` -- New field `Location` in struct `ProtectionIntentResource` -- New field `Tags` in struct `ProtectionIntentResource` -- New field `ID` in struct `ProtectionIntentResource` -- New field `Name` in struct `ProtectionIntentResource` -- New field `Type` in struct `ProtectionIntentResource` -- New field `Error` in struct `NewErrorResponse` -- New field `TargetInfo` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` -- New field `IsNonRecoverable` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` -- New field `PropertyBag` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` -- New field `TargetVirtualMachineID` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` -- New field `ObjectType` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` -- New field `AlternateDirectoryPaths` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` -- New field `SourceResourceID` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` -- New field `RecoveryMode` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` -- New field `RecoveryType` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` -- New field `ShouldUseAlternateTargetLocation` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` -- New field `ParentName` in struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` -- New field `SubWorkloadItemCount` in struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` -- New field `WorkloadItemType` in struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` -- New field `ServerName` in struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSAPHanaDatabaseWorkloadItem` -- New field `ObjectType` in struct `AzureWorkloadRecoveryPoint` -- New field `FriendlyName` in struct `AzureWorkloadContainer` -- New field `HealthStatus` in struct `AzureWorkloadContainer` -- New field `ProtectableObjectType` in struct `AzureWorkloadContainer` -- New field `BackupManagementType` in struct `AzureWorkloadContainer` -- New field `RegistrationStatus` in struct `AzureWorkloadContainer` -- New field `ContainerType` in struct `AzureWorkloadContainer` -- New field `ProtectionState` in struct `IaaSVMProtectableItem` -- New field `ResourceGroup` in struct `IaaSVMProtectableItem` -- New field `VirtualMachineVersion` in struct `IaaSVMProtectableItem` -- New field `WorkloadType` in struct `IaaSVMProtectableItem` -- New field `ProtectableItemType` in struct `IaaSVMProtectableItem` -- New field `BackupManagementType` in struct `IaaSVMProtectableItem` -- New field `FriendlyName` in struct `IaaSVMProtectableItem` -- New field `DpmServers` in struct `AzureBackupServerContainer` -- New field `RegistrationStatus` in struct `AzureBackupServerContainer` -- New field `ContainerID` in struct `AzureBackupServerContainer` -- New field `ExtendedInfo` in struct `AzureBackupServerContainer` -- New field `HealthStatus` in struct `AzureBackupServerContainer` -- New field `DpmAgentVersion` in struct `AzureBackupServerContainer` -- New field `ProtectedItemCount` in struct `AzureBackupServerContainer` -- New field `UpgradeAvailable` in struct `AzureBackupServerContainer` -- New field `FriendlyName` in struct `AzureBackupServerContainer` -- New field `ContainerType` in struct `AzureBackupServerContainer` -- New field `ProtectableObjectType` in struct `AzureBackupServerContainer` -- New field `CanReRegister` in struct `AzureBackupServerContainer` -- New field `BackupManagementType` in struct `AzureBackupServerContainer` -- New field `ProtectionStatus` in struct `AzureBackupServerContainer` -- New field `FeatureType` in struct `AzureVMResourceFeatureSupportRequest` -- New field `ProtectionState` in struct `AzureWorkloadSQLAutoProtectionIntent` -- New field `SourceResourceID` in struct `AzureWorkloadSQLAutoProtectionIntent` -- New field `ProtectionIntentItemType` in struct `AzureWorkloadSQLAutoProtectionIntent` -- New field `BackupManagementType` in struct `AzureWorkloadSQLAutoProtectionIntent` -- New field `ItemID` in struct `AzureWorkloadSQLAutoProtectionIntent` -- New field `PolicyID` in struct `AzureWorkloadSQLAutoProtectionIntent` -- New field `BackupManagementType` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `PolicyID` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ProtectedItemHealthStatus` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `LastRecoveryPoint` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `CreateMode` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `SourceResourceID` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ServerName` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `IsRehydrate` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ParentType` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ExtendedInfo` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `IsArchiveEnabled` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ProtectionStatus` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `LastBackupErrorDetail` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ProtectedItemType` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `PolicyName` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `BackupSetName` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ContainerName` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `LastBackupStatus` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `KpisHealths` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `LastBackupTime` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ParentName` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `ProtectedItemDataSourceID` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` -- New field `HealthStatus` in struct `IaaSVMContainer` -- New field `ProtectableObjectType` in struct `IaaSVMContainer` -- New field `BackupManagementType` in struct `IaaSVMContainer` -- New field `FriendlyName` in struct `IaaSVMContainer` -- New field `ContainerType` in struct `IaaSVMContainer` -- New field `RegistrationStatus` in struct `IaaSVMContainer` -- New field `Tags` in struct `ProtectionContainerResource` -- New field `ID` in struct `ProtectionContainerResource` -- New field `Name` in struct `ProtectionContainerResource` -- New field `Type` in struct `ProtectionContainerResource` -- New field `ETag` in struct `ProtectionContainerResource` -- New field `Location` in struct `ProtectionContainerResource` -- New field `TargetInfo` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `TargetVirtualMachineID` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `ObjectType` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `AlternateDirectoryPaths` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `PointInTime` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `RecoveryMode` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `RecoveryType` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `ShouldUseAlternateTargetLocation` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `SourceResourceID` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `IsNonRecoverable` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `PropertyBag` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` -- New field `BackupManagementType` in struct `MabProtectionPolicy` -- New field `ProtectedItemsCount` in struct `MabProtectionPolicy` -- New field `ResourceGuardOperationRequests` in struct `MabProtectionPolicy` -- New field `NextLink` in struct `RecoveryPointResourceList` -- New field `ProtectableContainerType` in struct `AzureStorageProtectableContainer` -- New field `BackupManagementType` in struct `AzureStorageProtectableContainer` -- New field `ContainerID` in struct `AzureStorageProtectableContainer` -- New field `FriendlyName` in struct `AzureStorageProtectableContainer` -- New field `HealthStatus` in struct `AzureStorageProtectableContainer` -- New field `ProtectableItemType` in struct `AzureIaaSClassicComputeVMProtectableItem` -- New field `BackupManagementType` in struct `AzureIaaSClassicComputeVMProtectableItem` -- New field `FriendlyName` in struct `AzureIaaSClassicComputeVMProtectableItem` -- New field `ProtectionState` in struct `AzureIaaSClassicComputeVMProtectableItem` -- New field `ResourceGroup` in struct `AzureIaaSClassicComputeVMProtectableItem` -- New field `VirtualMachineID` in struct `AzureIaaSClassicComputeVMProtectableItem` -- New field `VirtualMachineVersion` in struct `AzureIaaSClassicComputeVMProtectableItem` -- New field `WorkloadType` in struct `AzureIaaSClassicComputeVMProtectableItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadProtectionPolicy` -- New field `ProtectedItemsCount` in struct `AzureVMWorkloadProtectionPolicy` -- New field `ResourceGuardOperationRequests` in struct `AzureVMWorkloadProtectionPolicy` -- New field `SchedulePolicyType` in struct `LongTermSchedulePolicy` -- New field `NextLink` in struct `ProtectionContainerResourceList` -- New field `TargetInfo` in struct `AzureWorkloadPointInTimeRestoreRequest` -- New field `TargetVirtualMachineID` in struct `AzureWorkloadPointInTimeRestoreRequest` -- New field `ObjectType` in struct `AzureWorkloadPointInTimeRestoreRequest` -- New field `PropertyBag` in struct `AzureWorkloadPointInTimeRestoreRequest` -- New field `RecoveryMode` in struct `AzureWorkloadPointInTimeRestoreRequest` -- New field `RecoveryType` in struct `AzureWorkloadPointInTimeRestoreRequest` -- New field `SourceResourceID` in struct `AzureWorkloadPointInTimeRestoreRequest` -- New field `Operation` in struct `VaultJob` -- New field `ActivityID` in struct `VaultJob` -- New field `EndTime` in struct `VaultJob` -- New field `StartTime` in struct `VaultJob` -- New field `Status` in struct `VaultJob` -- New field `JobType` in struct `VaultJob` -- New field `BackupManagementType` in struct `VaultJob` -- New field `EntityFriendlyName` in struct `VaultJob` -- New field `ObjectType` in struct `ValidateIaasVMRestoreOperationRequest` -- New field `RestoreRequest` in struct `ValidateIaasVMRestoreOperationRequest` -- New field `BackupManagementType` in struct `GenericContainer` -- New field `FriendlyName` in struct `GenericContainer` -- New field `HealthStatus` in struct `GenericContainer` -- New field `ProtectableObjectType` in struct `GenericContainer` -- New field `RegistrationStatus` in struct `GenericContainer` -- New field `ContainerType` in struct `GenericContainer` -- New field `HealthStatus` in struct `AzureStorageContainer` -- New field `ProtectableObjectType` in struct `AzureStorageContainer` -- New field `RegistrationStatus` in struct `AzureStorageContainer` -- New field `ContainerType` in struct `AzureStorageContainer` -- New field `BackupManagementType` in struct `AzureStorageContainer` -- New field `FriendlyName` in struct `AzureStorageContainer` -- New field `AcquireStorageAccountLock` in struct `AzureStorageContainer` -- New field `Tags` in struct `ProtectedItemResource` -- New field `ID` in struct `ProtectedItemResource` -- New field `Name` in struct `ProtectedItemResource` -- New field `Type` in struct `ProtectedItemResource` -- New field `ETag` in struct `ProtectedItemResource` -- New field `Location` in struct `ProtectedItemResource` -- New field `PropertyBag` in struct `AzureWorkloadSAPHanaRestoreWithRehydrateRequest` -- New field `RecoveryMode` in struct `AzureWorkloadSAPHanaRestoreWithRehydrateRequest` -- New field `RecoveryType` in struct `AzureWorkloadSAPHanaRestoreWithRehydrateRequest` -- New field `SourceResourceID` in struct `AzureWorkloadSAPHanaRestoreWithRehydrateRequest` -- New field `TargetInfo` in struct `AzureWorkloadSAPHanaRestoreWithRehydrateRequest` -- New field `TargetVirtualMachineID` in struct `AzureWorkloadSAPHanaRestoreWithRehydrateRequest` -- New field `ObjectType` in struct `AzureWorkloadSAPHanaRestoreWithRehydrateRequest` -- New field `Headers` in struct `OperationResultInfoBaseResource` -- New field `StatusCode` in struct `OperationResultInfoBaseResource` -- New field `ParentName` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `Prebackupvalidation` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `ProtectableItemType` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `ParentUniqueName` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `IsAutoProtected` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `ServerName` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `Subprotectableitemcount` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` -- New field `ObjectType` in struct `AzureFileShareProvisionILRRequest` -- New field `ObjectType` in struct `IaasVMRecoveryPoint` -- New field `NextLink` in struct `ProtectableContainerResourceList` -- New field `ProtectableContainerType` in struct `AzureVMAppContainerProtectableContainer` -- New field `BackupManagementType` in struct `AzureVMAppContainerProtectableContainer` -- New field `ContainerID` in struct `AzureVMAppContainerProtectableContainer` -- New field `FriendlyName` in struct `AzureVMAppContainerProtectableContainer` -- New field `HealthStatus` in struct `AzureVMAppContainerProtectableContainer` -- New field `Name` in struct `RecoveryPointResource` -- New field `Type` in struct `RecoveryPointResource` -- New field `ETag` in struct `RecoveryPointResource` -- New field `Location` in struct `RecoveryPointResource` -- New field `Tags` in struct `RecoveryPointResource` -- New field `ID` in struct `RecoveryPointResource` -- New field `ProtectionState` in struct `AzureFileShareProtectableItem` -- New field `WorkloadType` in struct `AzureFileShareProtectableItem` -- New field `ProtectableItemType` in struct `AzureFileShareProtectableItem` -- New field `BackupManagementType` in struct `AzureFileShareProtectableItem` -- New field `FriendlyName` in struct `AzureFileShareProtectableItem` -- New field `Type` in struct `WorkloadProtectableItemResource` -- New field `ETag` in struct `WorkloadProtectableItemResource` -- New field `Location` in struct `WorkloadProtectableItemResource` -- New field `Tags` in struct `WorkloadProtectableItemResource` -- New field `ID` in struct `WorkloadProtectableItemResource` -- New field `Name` in struct `WorkloadProtectableItemResource` -- New field `ProtectedItemHealthStatus` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `LastBackupTime` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `PolicyName` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `PolicyID` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `BackupSetName` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ProtectedItemDataSourceID` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ParentType` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `CreateMode` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ProtectionStatus` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `IsRehydrate` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `LastBackupErrorDetail` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `LastRecoveryPoint` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ProtectedItemType` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ServerName` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ExtendedInfo` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `SourceResourceID` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `LastBackupStatus` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `IsArchiveEnabled` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `KpisHealths` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ParentName` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ContainerName` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` -- New field `ObjectType` in struct `AzureWorkloadSQLPointInTimeRecoveryPoint` -- New field `ExtendedInfo` in struct `AzureWorkloadSQLPointInTimeRecoveryPoint` -- New field `RecoveryPointMoveReadinessInfo` in struct `AzureWorkloadSQLPointInTimeRecoveryPoint` -- New field `RecoveryPointTierDetails` in struct `AzureWorkloadSQLPointInTimeRecoveryPoint` -- New field `RecoveryPointTimeInUTC` in struct `AzureWorkloadSQLPointInTimeRecoveryPoint` -- New field `Type` in struct `AzureWorkloadSQLPointInTimeRecoveryPoint` -- New field `HealthStatus` in struct `DpmContainer` -- New field `BackupManagementType` in struct `DpmContainer` -- New field `FriendlyName` in struct `DpmContainer` -- New field `ContainerType` in struct `DpmContainer` -- New field `RegistrationStatus` in struct `DpmContainer` -- New field `ProtectableObjectType` in struct `DpmContainer` -- New field `PolicyID` in struct `AzureRecoveryServiceVaultProtectionIntent` -- New field `ProtectionState` in struct `AzureRecoveryServiceVaultProtectionIntent` -- New field `SourceResourceID` in struct `AzureRecoveryServiceVaultProtectionIntent` -- New field `ProtectionIntentItemType` in struct `AzureRecoveryServiceVaultProtectionIntent` -- New field `BackupManagementType` in struct `AzureRecoveryServiceVaultProtectionIntent` -- New field `ItemID` in struct `AzureRecoveryServiceVaultProtectionIntent` -- New field `ID` in struct `JobResource` -- New field `Name` in struct `JobResource` -- New field `Type` in struct `JobResource` -- New field `ETag` in struct `JobResource` -- New field `Location` in struct `JobResource` -- New field `Tags` in struct `JobResource` -- New field `SchedulePolicyType` in struct `LogSchedulePolicy` -- New field `BackupManagementType` in struct `AzureWorkloadAutoProtectionIntent` -- New field `ItemID` in struct `AzureWorkloadAutoProtectionIntent` -- New field `PolicyID` in struct `AzureWorkloadAutoProtectionIntent` -- New field `ProtectionState` in struct `AzureWorkloadAutoProtectionIntent` -- New field `SourceResourceID` in struct `AzureWorkloadAutoProtectionIntent` -- New field `ProtectionIntentItemType` in struct `AzureWorkloadAutoProtectionIntent` -- New field `NextLink` in struct `ResourceGuardProxyBaseResourceList` -- New field `ObjectType` in struct `OperationStatusProvisionILRExtendedInfo` -- New field `WorkloadType` in struct `MabFileFolderProtectedItem` -- New field `PolicyID` in struct `MabFileFolderProtectedItem` -- New field `BackupSetName` in struct `MabFileFolderProtectedItem` -- New field `ProtectedItemType` in struct `MabFileFolderProtectedItem` -- New field `PolicyName` in struct `MabFileFolderProtectedItem` -- New field `BackupManagementType` in struct `MabFileFolderProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `MabFileFolderProtectedItem` -- New field `IsRehydrate` in struct `MabFileFolderProtectedItem` -- New field `CreateMode` in struct `MabFileFolderProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `MabFileFolderProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `MabFileFolderProtectedItem` -- New field `LastRecoveryPoint` in struct `MabFileFolderProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `MabFileFolderProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `MabFileFolderProtectedItem` -- New field `SourceResourceID` in struct `MabFileFolderProtectedItem` -- New field `IsArchiveEnabled` in struct `MabFileFolderProtectedItem` -- New field `ContainerName` in struct `MabFileFolderProtectedItem` -- New field `ETag` in struct `WorkloadItemResource` -- New field `Location` in struct `WorkloadItemResource` -- New field `Tags` in struct `WorkloadItemResource` -- New field `ID` in struct `WorkloadItemResource` -- New field `Name` in struct `WorkloadItemResource` -- New field `Type` in struct `WorkloadItemResource` -- New field `IsAutoProtected` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `Prebackupvalidation` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `ProtectableItemType` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `ParentName` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `ParentUniqueName` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `ServerName` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `Subprotectableitemcount` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` -- New field `HealthStatus` in struct `AzureIaaSComputeVMProtectedItem` -- New field `ExtendedProperties` in struct `AzureIaaSComputeVMProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `AzureIaaSComputeVMProtectedItem` -- New field `ProtectedItemType` in struct `AzureIaaSComputeVMProtectedItem` -- New field `LastRecoveryPoint` in struct `AzureIaaSComputeVMProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `AzureIaaSComputeVMProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `AzureIaaSComputeVMProtectedItem` -- New field `HealthDetails` in struct `AzureIaaSComputeVMProtectedItem` -- New field `VirtualMachineID` in struct `AzureIaaSComputeVMProtectedItem` -- New field `LastBackupTime` in struct `AzureIaaSComputeVMProtectedItem` -- New field `PolicyID` in struct `AzureIaaSComputeVMProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `AzureIaaSComputeVMProtectedItem` -- New field `LastBackupStatus` in struct `AzureIaaSComputeVMProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `AzureIaaSComputeVMProtectedItem` -- New field `ProtectionStatus` in struct `AzureIaaSComputeVMProtectedItem` -- New field `BackupSetName` in struct `AzureIaaSComputeVMProtectedItem` -- New field `PolicyName` in struct `AzureIaaSComputeVMProtectedItem` -- New field `FriendlyName` in struct `AzureIaaSComputeVMProtectedItem` -- New field `WorkloadType` in struct `AzureIaaSComputeVMProtectedItem` -- New field `ContainerName` in struct `AzureIaaSComputeVMProtectedItem` -- New field `IsRehydrate` in struct `AzureIaaSComputeVMProtectedItem` -- New field `KpisHealths` in struct `AzureIaaSComputeVMProtectedItem` -- New field `ExtendedInfo` in struct `AzureIaaSComputeVMProtectedItem` -- New field `BackupManagementType` in struct `AzureIaaSComputeVMProtectedItem` -- New field `ProtectedItemDataID` in struct `AzureIaaSComputeVMProtectedItem` -- New field `ProtectionState` in struct `AzureIaaSComputeVMProtectedItem` -- New field `SourceResourceID` in struct `AzureIaaSComputeVMProtectedItem` -- New field `IsArchiveEnabled` in struct `AzureIaaSComputeVMProtectedItem` -- New field `CreateMode` in struct `AzureIaaSComputeVMProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `AzureFileshareProtectedItem` -- New field `PolicyName` in struct `AzureFileshareProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `AzureFileshareProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `AzureFileshareProtectedItem` -- New field `IsArchiveEnabled` in struct `AzureFileshareProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `AzureFileshareProtectedItem` -- New field `IsRehydrate` in struct `AzureFileshareProtectedItem` -- New field `PolicyID` in struct `AzureFileshareProtectedItem` -- New field `LastRecoveryPoint` in struct `AzureFileshareProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `AzureFileshareProtectedItem` -- New field `ProtectedItemType` in struct `AzureFileshareProtectedItem` -- New field `ContainerName` in struct `AzureFileshareProtectedItem` -- New field `WorkloadType` in struct `AzureFileshareProtectedItem` -- New field `BackupManagementType` in struct `AzureFileshareProtectedItem` -- New field `CreateMode` in struct `AzureFileshareProtectedItem` -- New field `SourceResourceID` in struct `AzureFileshareProtectedItem` -- New field `BackupSetName` in struct `AzureFileshareProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `AzureSQLProtectionPolicy` -- New field `BackupManagementType` in struct `AzureSQLProtectionPolicy` -- New field `ProtectedItemsCount` in struct `AzureSQLProtectionPolicy` -- New field `DeferredDeleteTimeInUTC` in struct `AzureSQLProtectedItem` -- New field `LastRecoveryPoint` in struct `AzureSQLProtectedItem` -- New field `PolicyID` in struct `AzureSQLProtectedItem` -- New field `ContainerName` in struct `AzureSQLProtectedItem` -- New field `WorkloadType` in struct `AzureSQLProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `AzureSQLProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `AzureSQLProtectedItem` -- New field `CreateMode` in struct `AzureSQLProtectedItem` -- New field `IsArchiveEnabled` in struct `AzureSQLProtectedItem` -- New field `BackupManagementType` in struct `AzureSQLProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `AzureSQLProtectedItem` -- New field `ProtectedItemType` in struct `AzureSQLProtectedItem` -- New field `BackupSetName` in struct `AzureSQLProtectedItem` -- New field `PolicyName` in struct `AzureSQLProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `AzureSQLProtectedItem` -- New field `IsRehydrate` in struct `AzureSQLProtectedItem` -- New field `SourceResourceID` in struct `AzureSQLProtectedItem` -- New field `Type` in struct `AzureWorkloadPointInTimeRecoveryPoint` -- New field `ObjectType` in struct `AzureWorkloadPointInTimeRecoveryPoint` -- New field `RecoveryPointMoveReadinessInfo` in struct `AzureWorkloadPointInTimeRecoveryPoint` -- New field `RecoveryPointTierDetails` in struct `AzureWorkloadPointInTimeRecoveryPoint` -- New field `RecoveryPointTimeInUTC` in struct `AzureWorkloadPointInTimeRecoveryPoint` -- New field `BackupManagementType` in struct `AzureIaaSVMProtectionPolicy` -- New field `ProtectedItemsCount` in struct `AzureIaaSVMProtectionPolicy` -- New field `ResourceGuardOperationRequests` in struct `AzureIaaSVMProtectionPolicy` -- New field `Location` in struct `PrivateEndpointConnectionResource` -- New field `Tags` in struct `PrivateEndpointConnectionResource` -- New field `ID` in struct `PrivateEndpointConnectionResource` -- New field `Name` in struct `PrivateEndpointConnectionResource` -- New field `Type` in struct `PrivateEndpointConnectionResource` -- New field `ETag` in struct `PrivateEndpointConnectionResource` -- New field `FeatureType` in struct `AzureBackupGoalFeatureSupportRequest` -- New field `Type` in struct `ProtectableContainerResource` -- New field `ETag` in struct `ProtectableContainerResource` -- New field `Location` in struct `ProtectableContainerResource` -- New field `Tags` in struct `ProtectableContainerResource` -- New field `ID` in struct `ProtectableContainerResource` -- New field `Name` in struct `ProtectableContainerResource` -- New field `RecoveryMode` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` -- New field `RecoveryType` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` -- New field `ShouldUseAlternateTargetLocation` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` -- New field `SourceResourceID` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` -- New field `AlternateDirectoryPaths` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` -- New field `PropertyBag` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` -- New field `ObjectType` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` -- New field `IsNonRecoverable` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` -- New field `TargetVirtualMachineID` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` -- New field `TargetInfo` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` -- New field `IsUserTriggered` in struct `AzureStorageJob` -- New field `BackupManagementType` in struct `AzureStorageJob` -- New field `ActivityID` in struct `AzureStorageJob` -- New field `Operation` in struct `AzureStorageJob` -- New field `JobType` in struct `AzureStorageJob` -- New field `EndTime` in struct `AzureStorageJob` -- New field `Status` in struct `AzureStorageJob` -- New field `EntityFriendlyName` in struct `AzureStorageJob` -- New field `StartTime` in struct `AzureStorageJob` -- New field `NextLink` in struct `WorkloadItemResourceList` -- New field `Location` in struct `ProtectionPolicyResource` -- New field `Tags` in struct `ProtectionPolicyResource` -- New field `ID` in struct `ProtectionPolicyResource` -- New field `Name` in struct `ProtectionPolicyResource` -- New field `Type` in struct `ProtectionPolicyResource` -- New field `ETag` in struct `ProtectionPolicyResource` -- New field `VirtualMachineID` in struct `AzureIaaSComputeVMContainer` -- New field `VirtualMachineVersion` in struct `AzureIaaSComputeVMContainer` -- New field `FriendlyName` in struct `AzureIaaSComputeVMContainer` -- New field `ContainerType` in struct `AzureIaaSComputeVMContainer` -- New field `HealthStatus` in struct `AzureIaaSComputeVMContainer` -- New field `ResourceGroup` in struct `AzureIaaSComputeVMContainer` -- New field `ProtectableObjectType` in struct `AzureIaaSComputeVMContainer` -- New field `RegistrationStatus` in struct `AzureIaaSComputeVMContainer` -- New field `BackupManagementType` in struct `AzureIaaSComputeVMContainer` -- New field `ObjectType` in struct `PrepareDataMoveResponse` -- New field `NextLink` in struct `WorkloadProtectableItemResourceList` -- New field `RecoveryPointTimeInUTC` in struct `AzureWorkloadSAPHanaPointInTimeRecoveryPoint` -- New field `TimeRanges` in struct `AzureWorkloadSAPHanaPointInTimeRecoveryPoint` -- New field `Type` in struct `AzureWorkloadSAPHanaPointInTimeRecoveryPoint` -- New field `ObjectType` in struct `AzureWorkloadSAPHanaPointInTimeRecoveryPoint` -- New field `RecoveryPointMoveReadinessInfo` in struct `AzureWorkloadSAPHanaPointInTimeRecoveryPoint` -- New field `RecoveryPointTierDetails` in struct `AzureWorkloadSAPHanaPointInTimeRecoveryPoint` -- New field `RecoveryType` in struct `AzureWorkloadSAPHanaRestoreRequest` -- New field `SourceResourceID` in struct `AzureWorkloadSAPHanaRestoreRequest` -- New field `TargetInfo` in struct `AzureWorkloadSAPHanaRestoreRequest` -- New field `TargetVirtualMachineID` in struct `AzureWorkloadSAPHanaRestoreRequest` -- New field `ObjectType` in struct `AzureWorkloadSAPHanaRestoreRequest` -- New field `PropertyBag` in struct `AzureWorkloadSAPHanaRestoreRequest` -- New field `RecoveryMode` in struct `AzureWorkloadSAPHanaRestoreRequest` -- New field `PropertyBag` in struct `AzureWorkloadSAPHanaPointInTimeRestoreRequest` -- New field `RecoveryMode` in struct `AzureWorkloadSAPHanaPointInTimeRestoreRequest` -- New field `RecoveryType` in struct `AzureWorkloadSAPHanaPointInTimeRestoreRequest` -- New field `SourceResourceID` in struct `AzureWorkloadSAPHanaPointInTimeRestoreRequest` -- New field `TargetInfo` in struct `AzureWorkloadSAPHanaPointInTimeRestoreRequest` -- New field `TargetVirtualMachineID` in struct `AzureWorkloadSAPHanaPointInTimeRestoreRequest` -- New field `ObjectType` in struct `AzureWorkloadSAPHanaPointInTimeRestoreRequest` -- New field `ProtectableObjectType` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `SourceResourceID` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `ContainerType` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `HealthStatus` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `RegistrationStatus` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `ExtendedInfo` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `LastUpdatedTime` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `WorkloadType` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `FriendlyName` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `OperationType` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `BackupManagementType` in struct `AzureSQLAGWorkloadContainerProtectionContainer` -- New field `IsAutoProtected` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `ServerName` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `ParentUniqueName` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `Prebackupvalidation` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `Subprotectableitemcount` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `ProtectableItemType` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `ParentName` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSQLInstanceWorkloadItem` -- New field `WorkloadItemType` in struct `AzureVMWorkloadSQLInstanceWorkloadItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSQLInstanceWorkloadItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSQLInstanceWorkloadItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSQLInstanceWorkloadItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSQLInstanceWorkloadItem` -- New field `ParentName` in struct `AzureVMWorkloadSQLInstanceWorkloadItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSQLInstanceWorkloadItem` -- New field `ServerName` in struct `AzureVMWorkloadSQLInstanceWorkloadItem` -- New field `SubWorkloadItemCount` in struct `AzureVMWorkloadSQLInstanceWorkloadItem` -- New field `VirtualMachineVersion` in struct `AzureIaaSComputeVMProtectableItem` -- New field `WorkloadType` in struct `AzureIaaSComputeVMProtectableItem` -- New field `ProtectableItemType` in struct `AzureIaaSComputeVMProtectableItem` -- New field `BackupManagementType` in struct `AzureIaaSComputeVMProtectableItem` -- New field `FriendlyName` in struct `AzureIaaSComputeVMProtectableItem` -- New field `ProtectionState` in struct `AzureIaaSComputeVMProtectableItem` -- New field `ResourceGroup` in struct `AzureIaaSComputeVMProtectableItem` -- New field `VirtualMachineID` in struct `AzureIaaSComputeVMProtectableItem` -- New field `ContainerType` in struct `AzureIaaSClassicComputeVMContainer` -- New field `RegistrationStatus` in struct `AzureIaaSClassicComputeVMContainer` -- New field `VirtualMachineID` in struct `AzureIaaSClassicComputeVMContainer` -- New field `BackupManagementType` in struct `AzureIaaSClassicComputeVMContainer` -- New field `HealthStatus` in struct `AzureIaaSClassicComputeVMContainer` -- New field `VirtualMachineVersion` in struct `AzureIaaSClassicComputeVMContainer` -- New field `FriendlyName` in struct `AzureIaaSClassicComputeVMContainer` -- New field `ProtectableObjectType` in struct `AzureIaaSClassicComputeVMContainer` -- New field `ResourceGroup` in struct `AzureIaaSClassicComputeVMContainer` -- New field `ProtectableObjectType` in struct `ProtectionContainer` -- New field `ObjectType` in struct `OperationStatusJobsExtendedInfo` -- New field `BackupManagementType` in struct `AzureFileShareProtectionPolicy` -- New field `ProtectedItemsCount` in struct `AzureFileShareProtectionPolicy` -- New field `ResourceGuardOperationRequests` in struct `AzureFileShareProtectionPolicy` -- New field `WorkloadItemType` in struct `AzureVMWorkloadItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadItem` -- New field `FriendlyName` in struct `AzureVMWorkloadItem` -- New field `ProtectionState` in struct `AzureVMWorkloadItem` -- New field `WorkloadType` in struct `AzureVMWorkloadItem` -- New field `ObjectType` in struct `AzureWorkloadBackupRequest` -- New field `ProtectionState` in struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` -- New field `WorkloadItemType` in struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` -- New field `SubWorkloadItemCount` in struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` -- New field `ServerName` in struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` -- New field `ParentName` in struct `AzureVMWorkloadSAPHanaSystemWorkloadItem` -- New field `NextLink` in struct `BackupEngineBaseResourceList` -- New field `ContainerType` in struct `MabContainer` -- New field `HealthStatus` in struct `MabContainer` -- New field `ProtectableObjectType` in struct `MabContainer` -- New field `BackupManagementType` in struct `MabContainer` -- New field `FriendlyName` in struct `MabContainer` -- New field `RegistrationStatus` in struct `MabContainer` -- New field `Operation` in struct `AzureWorkloadJob` -- New field `Status` in struct `AzureWorkloadJob` -- New field `EndTime` in struct `AzureWorkloadJob` -- New field `EntityFriendlyName` in struct `AzureWorkloadJob` -- New field `StartTime` in struct `AzureWorkloadJob` -- New field `JobType` in struct `AzureWorkloadJob` -- New field `ActivityID` in struct `AzureWorkloadJob` -- New field `BackupManagementType` in struct `AzureWorkloadJob` -- New field `SchedulePolicyType` in struct `SimpleSchedulePolicy` -- New field `HourlySchedule` in struct `SimpleSchedulePolicy` -- New field `BackupManagementType` in struct `AzureResourceProtectionIntent` -- New field `ItemID` in struct `AzureResourceProtectionIntent` -- New field `PolicyID` in struct `AzureResourceProtectionIntent` -- New field `ProtectionState` in struct `AzureResourceProtectionIntent` -- New field `SourceResourceID` in struct `AzureResourceProtectionIntent` -- New field `ProtectionIntentItemType` in struct `AzureResourceProtectionIntent` -- New field `BackupManagementType` in struct `AzureVMWorkloadSQLDatabaseWorkloadItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSQLDatabaseWorkloadItem` -- New field `ParentName` in struct `AzureVMWorkloadSQLDatabaseWorkloadItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSQLDatabaseWorkloadItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSQLDatabaseWorkloadItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSQLDatabaseWorkloadItem` -- New field `ServerName` in struct `AzureVMWorkloadSQLDatabaseWorkloadItem` -- New field `SubWorkloadItemCount` in struct `AzureVMWorkloadSQLDatabaseWorkloadItem` -- New field `WorkloadItemType` in struct `AzureVMWorkloadSQLDatabaseWorkloadItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSQLDatabaseWorkloadItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `AzureVMWorkloadProtectedItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadProtectedItem` -- New field `ContainerName` in struct `AzureVMWorkloadProtectedItem` -- New field `LastRecoveryPoint` in struct `AzureVMWorkloadProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `AzureVMWorkloadProtectedItem` -- New field `WorkloadType` in struct `AzureVMWorkloadProtectedItem` -- New field `PolicyName` in struct `AzureVMWorkloadProtectedItem` -- New field `ProtectedItemType` in struct `AzureVMWorkloadProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `AzureVMWorkloadProtectedItem` -- New field `SourceResourceID` in struct `AzureVMWorkloadProtectedItem` -- New field `IsRehydrate` in struct `AzureVMWorkloadProtectedItem` -- New field `BackupSetName` in struct `AzureVMWorkloadProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `AzureVMWorkloadProtectedItem` -- New field `IsArchiveEnabled` in struct `AzureVMWorkloadProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `AzureVMWorkloadProtectedItem` -- New field `PolicyID` in struct `AzureVMWorkloadProtectedItem` -- New field `CreateMode` in struct `AzureVMWorkloadProtectedItem` -- New field `ID` in struct `BackupRequestResource` -- New field `Name` in struct `BackupRequestResource` -- New field `Type` in struct `BackupRequestResource` -- New field `ETag` in struct `BackupRequestResource` -- New field `Location` in struct `BackupRequestResource` -- New field `Tags` in struct `BackupRequestResource` -- New field `IsSoftDeleteFeatureStateEditable` in struct `BackupResourceVaultConfig` -- New field `ResourceGuardOperationRequests` in struct `AzureIaaSVMProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `AzureIaaSVMProtectedItem` -- New field `PolicyID` in struct `AzureIaaSVMProtectedItem` -- New field `CreateMode` in struct `AzureIaaSVMProtectedItem` -- New field `WorkloadType` in struct `AzureIaaSVMProtectedItem` -- New field `BackupManagementType` in struct `AzureIaaSVMProtectedItem` -- New field `PolicyName` in struct `AzureIaaSVMProtectedItem` -- New field `ProtectedItemType` in struct `AzureIaaSVMProtectedItem` -- New field `IsRehydrate` in struct `AzureIaaSVMProtectedItem` -- New field `IsArchiveEnabled` in struct `AzureIaaSVMProtectedItem` -- New field `ContainerName` in struct `AzureIaaSVMProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `AzureIaaSVMProtectedItem` -- New field `SourceResourceID` in struct `AzureIaaSVMProtectedItem` -- New field `BackupSetName` in struct `AzureIaaSVMProtectedItem` -- New field `LastRecoveryPoint` in struct `AzureIaaSVMProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `AzureIaaSVMProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `AzureIaaSVMProtectedItem` -- New field `ParentUniqueName` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `Prebackupvalidation` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `ServerName` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `ProtectableItemType` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `IsAutoProtected` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `Subprotectableitemcount` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `ParentName` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` -- New field `NextLink` in struct `ProtectionIntentResourceList` -- New field `BackupManagementType` in struct `MabJob` -- New field `EntityFriendlyName` in struct `MabJob` -- New field `EndTime` in struct `MabJob` -- New field `Status` in struct `MabJob` -- New field `JobType` in struct `MabJob` -- New field `StartTime` in struct `MabJob` -- New field `Operation` in struct `MabJob` -- New field `ActivityID` in struct `MabJob` -- New field `LinuxVMApplicationName` in struct `ExtendedProperties` -- New field `KeyURI` in struct `BackupResourceEncryptionConfigExtended` -- New field `LastUpdateStatus` in struct `BackupResourceEncryptionConfigExtended` -- New field `SubscriptionID` in struct `BackupResourceEncryptionConfigExtended` -- New field `EncryptionAtRestType` in struct `BackupResourceEncryptionConfigExtended` -- New field `InfrastructureEncryptionState` in struct `BackupResourceEncryptionConfigExtended` -- New field `BackupManagementType` in struct `AzureVMWorkloadProtectableItem` -- New field `ProtectionState` in struct `AzureVMWorkloadProtectableItem` -- New field `ProtectableItemType` in struct `AzureVMWorkloadProtectableItem` -- New field `FriendlyName` in struct `AzureVMWorkloadProtectableItem` -- New field `WorkloadType` in struct `AzureVMWorkloadProtectableItem` -- New field `TargetInfo` in struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` -- New field `PointInTime` in struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` -- New field `PropertyBag` in struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` -- New field `RecoveryMode` in struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` -- New field `SourceResourceID` in struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` -- New field `TargetVirtualMachineID` in struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` -- New field `ObjectType` in struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` -- New field `RecoveryType` in struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` -- New field `Tags` in struct `BackupResourceConfigResource` -- New field `ID` in struct `BackupResourceConfigResource` -- New field `Name` in struct `BackupResourceConfigResource` -- New field `Type` in struct `BackupResourceConfigResource` -- New field `ETag` in struct `BackupResourceConfigResource` -- New field `Location` in struct `BackupResourceConfigResource` -- New field `ID` in struct `BackupResourceEncryptionConfigResource` -- New field `Name` in struct `BackupResourceEncryptionConfigResource` -- New field `Type` in struct `BackupResourceEncryptionConfigResource` -- New field `ETag` in struct `BackupResourceEncryptionConfigResource` -- New field `Location` in struct `BackupResourceEncryptionConfigResource` -- New field `Tags` in struct `BackupResourceEncryptionConfigResource` -- New field `ObjectType` in struct `OperationStatusJobExtendedInfo` -- New field `EndTime` in struct `DpmJob` -- New field `EntityFriendlyName` in struct `DpmJob` -- New field `JobType` in struct `DpmJob` -- New field `BackupManagementType` in struct `DpmJob` -- New field `ActivityID` in struct `DpmJob` -- New field `Operation` in struct `DpmJob` -- New field `StartTime` in struct `DpmJob` -- New field `Status` in struct `DpmJob` -- New field `ObjectType` in struct `AzureFileShareRecoveryPoint` -- New field `RetentionPolicyType` in struct `LongTermRetentionPolicy` -- New field `XcoolState` in struct `BackupResourceConfig` -- New field `DedupState` in struct `BackupResourceConfig` -- New field `NextLink` in struct `ProtectionPolicyResourceList` -- New field `Location` in struct `BackupResourceVaultConfigResource` -- New field `Tags` in struct `BackupResourceVaultConfigResource` -- New field `ID` in struct `BackupResourceVaultConfigResource` -- New field `Name` in struct `BackupResourceVaultConfigResource` -- New field `Type` in struct `BackupResourceVaultConfigResource` -- New field `ETag` in struct `BackupResourceVaultConfigResource` -- New field `BackupManagementType` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `ParentName` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `IsAutoProtected` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `Subprotectableitemcount` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `ProtectableItemType` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `ParentUniqueName` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `ServerName` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `Prebackupvalidation` in struct `AzureVMWorkloadSQLInstanceProtectableItem` -- New field `ContainerName` in struct `AzureIaaSVMJob` -- New field `Status` in struct `AzureIaaSVMJob` -- New field `IsUserTriggered` in struct `AzureIaaSVMJob` -- New field `StartTime` in struct `AzureIaaSVMJob` -- New field `JobType` in struct `AzureIaaSVMJob` -- New field `Operation` in struct `AzureIaaSVMJob` -- New field `ActivityID` in struct `AzureIaaSVMJob` -- New field `EndTime` in struct `AzureIaaSVMJob` -- New field `EntityFriendlyName` in struct `AzureIaaSVMJob` -- New field `BackupManagementType` in struct `AzureIaaSVMJob` -- New field `ObjectType` in struct `IaasVMRestoreRequest` -- New field `IdentityBasedRestoreDetails` in struct `IaasVMRestoreRequest` -- New field `RegistrationStatus` in struct `AzureSQLContainer` -- New field `ContainerType` in struct `AzureSQLContainer` -- New field `BackupManagementType` in struct `AzureSQLContainer` -- New field `FriendlyName` in struct `AzureSQLContainer` -- New field `HealthStatus` in struct `AzureSQLContainer` -- New field `ProtectableObjectType` in struct `AzureSQLContainer` -- New field `RegistrationStatus` in struct `AzureVMAppContainerProtectionContainer` -- New field `SourceResourceID` in struct `AzureVMAppContainerProtectionContainer` -- New field `BackupManagementType` in struct `AzureVMAppContainerProtectionContainer` -- New field `ExtendedInfo` in struct `AzureVMAppContainerProtectionContainer` -- New field `LastUpdatedTime` in struct `AzureVMAppContainerProtectionContainer` -- New field `ProtectableObjectType` in struct `AzureVMAppContainerProtectionContainer` -- New field `HealthStatus` in struct `AzureVMAppContainerProtectionContainer` -- New field `OperationType` in struct `AzureVMAppContainerProtectionContainer` -- New field `ContainerType` in struct `AzureVMAppContainerProtectionContainer` -- New field `FriendlyName` in struct `AzureVMAppContainerProtectionContainer` -- New field `WorkloadType` in struct `AzureVMAppContainerProtectionContainer` -- New field `RetentionPolicyType` in struct `SimpleRetentionPolicy` -- New field `RecoveryPointMoveReadinessInfo` in struct `AzureWorkloadSAPHanaRecoveryPoint` -- New field `RecoveryPointTierDetails` in struct `AzureWorkloadSAPHanaRecoveryPoint` -- New field `RecoveryPointTimeInUTC` in struct `AzureWorkloadSAPHanaRecoveryPoint` -- New field `Type` in struct `AzureWorkloadSAPHanaRecoveryPoint` -- New field `ObjectType` in struct `AzureWorkloadSAPHanaRecoveryPoint` -- New field `ObjectType` in struct `AzureFileShareRestoreRequest` -- New field `Title` in struct `AzureIaaSVMHealthDetails` -- New field `Code` in struct `AzureIaaSVMHealthDetails` -- New field `Message` in struct `AzureIaaSVMHealthDetails` -- New field `Recommendations` in struct `AzureIaaSVMHealthDetails` -- New field `ContainerName` in struct `DPMProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `DPMProtectedItem` -- New field `WorkloadType` in struct `DPMProtectedItem` -- New field `SourceResourceID` in struct `DPMProtectedItem` -- New field `ProtectedItemType` in struct `DPMProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `DPMProtectedItem` -- New field `PolicyID` in struct `DPMProtectedItem` -- New field `BackupSetName` in struct `DPMProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `DPMProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `DPMProtectedItem` -- New field `BackupManagementType` in struct `DPMProtectedItem` -- New field `IsRehydrate` in struct `DPMProtectedItem` -- New field `CreateMode` in struct `DPMProtectedItem` -- New field `IsArchiveEnabled` in struct `DPMProtectedItem` -- New field `LastRecoveryPoint` in struct `DPMProtectedItem` -- New field `PolicyName` in struct `DPMProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `DPMProtectedItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `IsAutoProtected` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `ParentName` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `ParentUniqueName` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `ProtectableItemType` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `Prebackupvalidation` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `Subprotectableitemcount` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `ServerName` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` -- New field `ETag` in struct `RestoreRequestResource` -- New field `Location` in struct `RestoreRequestResource` -- New field `Tags` in struct `RestoreRequestResource` -- New field `ID` in struct `RestoreRequestResource` -- New field `Name` in struct `RestoreRequestResource` -- New field `Type` in struct `RestoreRequestResource` -- New field `TargetVirtualMachineID` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `RestoreDiskLunList` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `ObjectType` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `AffinityGroup` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `SourceResourceID` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `TargetResourceGroupID` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `RecoveryPointID` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `DiskEncryptionSetID` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `EncryptionDetails` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `IdentityInfo` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `OriginalStorageAccountOption` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `TargetDomainNameID` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `RestoreWithManagedDisks` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `VirtualNetworkID` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `Region` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `RecoveryType` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `Zones` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `SubnetID` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `CreateNewCloudService` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `IdentityBasedRestoreDetails` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `StorageAccountID` in struct `IaasVMRestoreWithRehydrationRequest` -- New field `ObjectType` in struct `IaasVMILRRegistrationRequest` -- New field `ID` in struct `BackupEngineBaseResource` -- New field `Name` in struct `BackupEngineBaseResource` -- New field `Type` in struct `BackupEngineBaseResource` -- New field `ETag` in struct `BackupEngineBaseResource` -- New field `Location` in struct `BackupEngineBaseResource` -- New field `Tags` in struct `BackupEngineBaseResource` -- New field `Type` in struct `ILRRequestResource` -- New field `ETag` in struct `ILRRequestResource` -- New field `Location` in struct `ILRRequestResource` -- New field `Tags` in struct `ILRRequestResource` -- New field `ID` in struct `ILRRequestResource` -- New field `Name` in struct `ILRRequestResource` -- New field `ObjectType` in struct `GenericRecoveryPoint` -- New field `ObjectType` in struct `ValidateRestoreOperationRequest` -- New field `ObjectType` in struct `AzureFileShareBackupRequest` -- New field `ObjectType` in struct `ExportJobsOperationResultInfo` -- New field `RecoveryPointTierDetails` in struct `AzureWorkloadSQLRecoveryPoint` -- New field `RecoveryPointTimeInUTC` in struct `AzureWorkloadSQLRecoveryPoint` -- New field `Type` in struct `AzureWorkloadSQLRecoveryPoint` -- New field `ObjectType` in struct `AzureWorkloadSQLRecoveryPoint` -- New field `RecoveryPointMoveReadinessInfo` in struct `AzureWorkloadSQLRecoveryPoint` -- New field `Tags` in struct `BackupResourceEncryptionConfigExtendedResource` -- New field `ID` in struct `BackupResourceEncryptionConfigExtendedResource` -- New field `Name` in struct `BackupResourceEncryptionConfigExtendedResource` -- New field `Type` in struct `BackupResourceEncryptionConfigExtendedResource` -- New field `ETag` in struct `BackupResourceEncryptionConfigExtendedResource` -- New field `Location` in struct `BackupResourceEncryptionConfigExtendedResource` -- New field `NextLink` in struct `ProtectedItemResourceList` -- New field `ServerName` in struct `AzureVMWorkloadSAPAseSystemWorkloadItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSAPAseSystemWorkloadItem` -- New field `WorkloadItemType` in struct `AzureVMWorkloadSAPAseSystemWorkloadItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSAPAseSystemWorkloadItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSAPAseSystemWorkloadItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSAPAseSystemWorkloadItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSAPAseSystemWorkloadItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSAPAseSystemWorkloadItem` -- New field `ParentName` in struct `AzureVMWorkloadSAPAseSystemWorkloadItem` -- New field `SubWorkloadItemCount` in struct `AzureVMWorkloadSAPAseSystemWorkloadItem` -- New field `ObjectType` in struct `AzureWorkloadRestoreRequest` -- New field `ObjectType` in struct `IaasVMBackupRequest` -- New field `RecoveryModel` in struct `AzureVMWorkloadProtectedItemExtendedInfo` -- New field `PolicyName` in struct `ProtectedItem` -- New field `IsArchiveEnabled` in struct `ProtectedItem` -- New field `IsRehydrate` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `ProtectionState` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `KpisHealths` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `LastRecoveryPoint` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `IsArchiveEnabled` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `WorkloadType` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `ProtectedItemType` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `ExtendedProperties` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `ExtendedInfo` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `BackupSetName` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `ProtectedItemDataID` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `ContainerName` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `HealthStatus` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `PolicyID` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `PolicyName` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `VirtualMachineID` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `FriendlyName` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `SourceResourceID` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `ProtectionStatus` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `LastBackupTime` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `BackupManagementType` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `LastBackupStatus` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `CreateMode` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `HealthDetails` in struct `AzureIaaSClassicComputeVMProtectedItem` -- New field `IsRehydrate` in struct `GenericProtectedItem` -- New field `PolicyID` in struct `GenericProtectedItem` -- New field `SourceResourceID` in struct `GenericProtectedItem` -- New field `ContainerName` in struct `GenericProtectedItem` -- New field `IsArchiveEnabled` in struct `GenericProtectedItem` -- New field `PolicyName` in struct `GenericProtectedItem` -- New field `WorkloadType` in struct `GenericProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `GenericProtectedItem` -- New field `ProtectedItemType` in struct `GenericProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `GenericProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `GenericProtectedItem` -- New field `BackupSetName` in struct `GenericProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `GenericProtectedItem` -- New field `LastRecoveryPoint` in struct `GenericProtectedItem` -- New field `CreateMode` in struct `GenericProtectedItem` -- New field `BackupManagementType` in struct `GenericProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `GenericProtectedItem` -- New field `Error` in struct `CloudError` -- New field `NextLink` in struct `JobResourceList` -- New field `PolicyID` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `BackupSetName` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ExtendedInfo` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ProtectionStatus` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ProtectedItemHealthStatus` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ParentType` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ServerName` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `LastRecoveryPoint` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ParentName` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `IsDeferredDeleteScheduleUpcoming` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `KpisHealths` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `LastBackupStatus` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ResourceGuardOperationRequests` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `IsArchiveEnabled` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `DeferredDeleteTimeRemaining` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ProtectedItemType` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ContainerName` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `DeferredDeleteTimeInUTC` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `LastBackupErrorDetail` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `IsScheduledForDeferredDelete` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `ProtectedItemDataSourceID` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `CreateMode` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `IsRehydrate` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `PolicyName` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `SourceResourceID` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `LastBackupTime` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` -- New field `IsDpmUpgradeAvailable` in struct `AzureBackupServerEngine` -- New field `CanReRegister` in struct `AzureBackupServerEngine` -- New field `BackupEngineID` in struct `AzureBackupServerEngine` -- New field `FriendlyName` in struct `AzureBackupServerEngine` -- New field `IsAzureBackupAgentUpgradeAvailable` in struct `AzureBackupServerEngine` -- New field `BackupEngineState` in struct `AzureBackupServerEngine` -- New field `BackupManagementType` in struct `AzureBackupServerEngine` -- New field `RegistrationStatus` in struct `AzureBackupServerEngine` -- New field `ExtendedInfo` in struct `AzureBackupServerEngine` -- New field `DpmVersion` in struct `AzureBackupServerEngine` -- New field `HealthStatus` in struct `AzureBackupServerEngine` -- New field `BackupEngineType` in struct `AzureBackupServerEngine` -- New field `AzureBackupAgentVersion` in struct `AzureBackupServerEngine` -- New field `ParentName` in struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` -- New field `Subinquireditemcount` in struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` -- New field `WorkloadType` in struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` -- New field `ServerName` in struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` -- New field `IsAutoProtectable` in struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` -- New field `ProtectionState` in struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` -- New field `WorkloadItemType` in struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` -- New field `SubWorkloadItemCount` in struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` -- New field `BackupManagementType` in struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` -- New field `FriendlyName` in struct `AzureVMWorkloadSAPAseDatabaseWorkloadItem` -- New field `FriendlyName` in struct `DpmBackupEngine` -- New field `RegistrationStatus` in struct `DpmBackupEngine` -- New field `IsAzureBackupAgentUpgradeAvailable` in struct `DpmBackupEngine` -- New field `AzureBackupAgentVersion` in struct `DpmBackupEngine` -- New field `BackupManagementType` in struct `DpmBackupEngine` -- New field `IsDpmUpgradeAvailable` in struct `DpmBackupEngine` -- New field `BackupEngineState` in struct `DpmBackupEngine` -- New field `DpmVersion` in struct `DpmBackupEngine` -- New field `HealthStatus` in struct `DpmBackupEngine` -- New field `CanReRegister` in struct `DpmBackupEngine` -- New field `ExtendedInfo` in struct `DpmBackupEngine` -- New field `BackupEngineType` in struct `DpmBackupEngine` -- New field `BackupEngineID` in struct `DpmBackupEngine` -- New field `Type` in struct `ResourceGuardProxyBaseResource` -- New field `ETag` in struct `ResourceGuardProxyBaseResource` -- New field `Location` in struct `ResourceGuardProxyBaseResource` -- New field `Tags` in struct `ResourceGuardProxyBaseResource` -- New field `ID` in struct `ResourceGuardProxyBaseResource` -- New field `Name` in struct `ResourceGuardProxyBaseResource` -- New field `ResourceGuardOperationRequests` in struct `GenericProtectionPolicy` -- New field `BackupManagementType` in struct `GenericProtectionPolicy` -- New field `ProtectedItemsCount` in struct `GenericProtectionPolicy` -- New field `ObjectType` in struct `OperationResultInfo` -- New field `ObjectType` in struct `AzureWorkloadSQLRestoreRequest` -- New field `RecoveryMode` in struct `AzureWorkloadSQLRestoreRequest` -- New field `RecoveryType` in struct `AzureWorkloadSQLRestoreRequest` -- New field `SourceResourceID` in struct `AzureWorkloadSQLRestoreRequest` -- New field `TargetInfo` in struct `AzureWorkloadSQLRestoreRequest` -- New field `TargetVirtualMachineID` in struct `AzureWorkloadSQLRestoreRequest` -- New field `PropertyBag` in struct `AzureWorkloadSQLRestoreRequest` - - -## 0.1.0 (2021-12-22) - -- Init release. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/README.md deleted file mode 100644 index 94070f40..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Azure Recovery Services Backup Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup) - -The `armrecoveryservicesbackup` module provides operations for working with Azure Recovery Services Backup. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Recovery Services Backup module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Recovery Services Backup. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure Recovery Services Backup modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armrecoveryservicesbackup.NewClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armrecoveryservicesbackup.NewClient(, cred, &options) -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Recovery Services Backup` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/autorest.md deleted file mode 100644 index affdb203..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/autorest.md +++ /dev/null @@ -1,12 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/recoveryservicesbackup/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/recoveryservicesbackup/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/build.go deleted file mode 100644 index 1ac31bce..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/recoveryservices/armrecoveryservicesbackup - -package armrecoveryservicesbackup diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/ci.yml deleted file mode 100644 index 2ebad9d3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/recoveryservices/armrecoveryservicesbackup' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/CHANGELOG.md new file mode 100644 index 00000000..700ad709 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/CHANGELOG.md @@ -0,0 +1,303 @@ +# Release History + +## 4.2.0 (2025-04-24) +### Features Added + +- New value `OperationTypeRehydrate` added to enum type `OperationType` +- New function `*AzureVMWorkloadSAPAseDatabaseProtectableItem.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` +- New function `*AzureVMWorkloadSAPAseDatabaseProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` +- New function `*AzureWorkloadSAPAsePointInTimeRecoveryPoint.GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint` +- New function `*AzureWorkloadSAPAsePointInTimeRecoveryPoint.GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint` +- New function `*AzureWorkloadSAPAsePointInTimeRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` +- New function `*AzureWorkloadSAPAsePointInTimeRestoreRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` +- New function `*AzureWorkloadSAPAsePointInTimeRestoreRequest.GetAzureWorkloadSAPAseRestoreRequest() *AzureWorkloadSAPAseRestoreRequest` +- New function `*AzureWorkloadSAPAsePointInTimeRestoreRequest.GetRestoreRequest() *RestoreRequest` +- New function `*AzureWorkloadSAPAseRecoveryPoint.GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint` +- New function `*AzureWorkloadSAPAseRecoveryPoint.GetRecoveryPoint() *RecoveryPoint` +- New function `*AzureWorkloadSAPAseRestoreRequest.GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest` +- New function `*AzureWorkloadSAPAseRestoreRequest.GetAzureWorkloadSAPAseRestoreRequest() *AzureWorkloadSAPAseRestoreRequest` +- New function `*AzureWorkloadSAPAseRestoreRequest.GetRestoreRequest() *RestoreRequest` +- New struct `AzureVMWorkloadSAPAseDatabaseProtectableItem` +- New struct `AzureWorkloadSAPAsePointInTimeRecoveryPoint` +- New struct `AzureWorkloadSAPAsePointInTimeRestoreRequest` +- New struct `AzureWorkloadSAPAseRecoveryPoint` +- New field `RecoveryPointTierDetails` in struct `AzureFileShareRecoveryPoint` +- New field `PolicyType` in struct `AzureIaaSClassicComputeVMProtectedItem` +- New field `PolicyType` in struct `AzureIaaSComputeVMProtectedItem` +- New field `PolicyType` in struct `AzureIaaSVMProtectedItem` +- New field `OperationType` in struct `AzureStorageContainer` + + +## 4.1.0 (2024-05-24) +### Features Added + +- New enum type `IaasVMSnapshotConsistencyType` with values `IaasVMSnapshotConsistencyTypeOnlyCrashConsistent` +- New field `ResourceGuardOperationRequests` in struct `AzureFileShareRestoreRequest` +- New field `SnapshotConsistencyType` in struct `AzureIaaSVMProtectionPolicy` +- New field `ResourceGuardOperationRequests` in struct `AzureWorkloadPointInTimeRestoreRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureWorkloadRestoreRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureWorkloadSAPHanaPointInTimeRestoreRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureWorkloadSAPHanaRestoreRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureWorkloadSAPHanaRestoreWithRehydrateRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureWorkloadSQLRestoreRequest` +- New field `ResourceGuardOperationRequests` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` +- New field `XMSAuthorizationAuxiliary` in struct `BackupResourceVaultConfigsClientPutOptions` +- New field `XMSAuthorizationAuxiliary` in struct `BackupResourceVaultConfigsClientUpdateOptions` +- New field `ResourceGuardOperationRequests` in struct `IaasVMRestoreRequest` +- New field `ResourceGuardOperationRequests` in struct `IaasVMRestoreWithRehydrationRequest` +- New field `XMSAuthorizationAuxiliary` in struct `ProtectedItemsClientCreateOrUpdateOptions` +- New field `XMSAuthorizationAuxiliary` in struct `ProtectionPoliciesClientCreateOrUpdateOptions` +- New field `ResourceGuardOperationRequests` in struct `RestoreRequest` +- New field `XMSAuthorizationAuxiliary` in struct `RestoresClientBeginTriggerOptions` +- New field `XMSAuthorizationAuxiliary` in struct `SecurityPINsClientGetOptions` + + +## 4.0.0 (2023-12-08) +### Breaking Changes + +- Function `*OperationClient.Validate` parameter(s) have been changed from `(context.Context, string, string, ValidateOperationRequestClassification, *OperationClientValidateOptions)` to `(context.Context, string, string, ValidateOperationRequestResource, *OperationClientValidateOptions)` +- Function `*ValidateOperationClient.BeginTrigger` parameter(s) have been changed from `(context.Context, string, string, ValidateOperationRequestClassification, *ValidateOperationClientBeginTriggerOptions)` to `(context.Context, string, string, ValidateOperationRequestResource, *ValidateOperationClientBeginTriggerOptions)` +- Operation `*ProtectionContainersClient.Register` has been changed to LRO, use `*ProtectionContainersClient.BeginRegister` instead. + +### Features Added + +- New value `RecoveryModeRecoveryUsingSnapshot`, `RecoveryModeSnapshotAttach`, `RecoveryModeSnapshotAttachAndRecover` added to enum type `RecoveryMode` +- New function `*ClientFactory.NewFetchTieringCostClient() *FetchTieringCostClient` +- New function `*ClientFactory.NewGetTieringCostOperationResultClient() *GetTieringCostOperationResultClient` +- New function `*ClientFactory.NewTieringCostOperationStatusClient() *TieringCostOperationStatusClient` +- New function `NewFetchTieringCostClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FetchTieringCostClient, error)` +- New function `*FetchTieringCostClient.BeginPost(context.Context, string, string, FetchTieringCostInfoRequestClassification, *FetchTieringCostClientBeginPostOptions) (*runtime.Poller[FetchTieringCostClientPostResponse], error)` +- New function `*FetchTieringCostInfoForRehydrationRequest.GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest` +- New function `*FetchTieringCostInfoRequest.GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest` +- New function `*FetchTieringCostSavingsInfoForPolicyRequest.GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest` +- New function `*FetchTieringCostSavingsInfoForProtectedItemRequest.GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest` +- New function `*FetchTieringCostSavingsInfoForVaultRequest.GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest` +- New function `NewGetTieringCostOperationResultClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GetTieringCostOperationResultClient, error)` +- New function `*GetTieringCostOperationResultClient.Get(context.Context, string, string, string, *GetTieringCostOperationResultClientGetOptions) (GetTieringCostOperationResultClientGetResponse, error)` +- New function `*TieringCostInfo.GetTieringCostInfo() *TieringCostInfo` +- New function `NewTieringCostOperationStatusClient(string, azcore.TokenCredential, *arm.ClientOptions) (*TieringCostOperationStatusClient, error)` +- New function `*TieringCostOperationStatusClient.Get(context.Context, string, string, string, *TieringCostOperationStatusClientGetOptions) (TieringCostOperationStatusClientGetResponse, error)` +- New function `*TieringCostRehydrationInfo.GetTieringCostInfo() *TieringCostInfo` +- New function `*TieringCostSavingInfo.GetTieringCostInfo() *TieringCostInfo` +- New struct `FetchTieringCostInfoForRehydrationRequest` +- New struct `FetchTieringCostSavingsInfoForPolicyRequest` +- New struct `FetchTieringCostSavingsInfoForProtectedItemRequest` +- New struct `FetchTieringCostSavingsInfoForVaultRequest` +- New struct `SnapshotBackupAdditionalDetails` +- New struct `SnapshotRestoreParameters` +- New struct `TieringCostRehydrationInfo` +- New struct `TieringCostSavingInfo` +- New struct `UserAssignedIdentityProperties` +- New struct `UserAssignedManagedIdentityDetails` +- New struct `ValidateOperationRequestResource` +- New struct `VaultRetentionPolicy` +- New field `VaultRetentionPolicy` in struct `AzureFileShareProtectionPolicy` +- New field `VaultID` in struct `AzureFileshareProtectedItem` +- New field `VaultID` in struct `AzureIaaSClassicComputeVMProtectedItem` +- New field `VaultID` in struct `AzureIaaSComputeVMProtectedItem` +- New field `VaultID` in struct `AzureIaaSVMProtectedItem` +- New field `VaultID` in struct `AzureSQLProtectedItem` +- New field `VaultID` in struct `AzureVMWorkloadProtectedItem` +- New field `VaultID` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` +- New field `VaultID` in struct `AzureVMWorkloadSAPHanaDBInstanceProtectedItem` +- New field `VaultID` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` +- New field `VaultID` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` +- New field `SnapshotRestoreParameters`, `TargetResourceGroupName`, `UserAssignedManagedIdentityDetails` in struct `AzureWorkloadPointInTimeRestoreRequest` +- New field `SnapshotRestoreParameters`, `TargetResourceGroupName`, `UserAssignedManagedIdentityDetails` in struct `AzureWorkloadRestoreRequest` +- New field `SnapshotRestoreParameters`, `TargetResourceGroupName`, `UserAssignedManagedIdentityDetails` in struct `AzureWorkloadSAPHanaPointInTimeRestoreRequest` +- New field `SnapshotRestoreParameters`, `TargetResourceGroupName`, `UserAssignedManagedIdentityDetails` in struct `AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest` +- New field `SnapshotRestoreParameters`, `TargetResourceGroupName`, `UserAssignedManagedIdentityDetails` in struct `AzureWorkloadSAPHanaRestoreRequest` +- New field `SnapshotRestoreParameters`, `TargetResourceGroupName`, `UserAssignedManagedIdentityDetails` in struct `AzureWorkloadSAPHanaRestoreWithRehydrateRequest` +- New field `SnapshotRestoreParameters`, `TargetResourceGroupName`, `UserAssignedManagedIdentityDetails` in struct `AzureWorkloadSQLPointInTimeRestoreRequest` +- New field `SnapshotRestoreParameters`, `TargetResourceGroupName`, `UserAssignedManagedIdentityDetails` in struct `AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest` +- New field `SnapshotRestoreParameters`, `TargetResourceGroupName`, `UserAssignedManagedIdentityDetails` in struct `AzureWorkloadSQLRestoreRequest` +- New field `SnapshotRestoreParameters`, `TargetResourceGroupName`, `UserAssignedManagedIdentityDetails` in struct `AzureWorkloadSQLRestoreWithRehydrateRequest` +- New field `VaultID` in struct `DPMProtectedItem` +- New field `VaultID` in struct `GenericProtectedItem` +- New field `ExtendedLocation` in struct `IaasVMRecoveryPoint` +- New field `VaultID` in struct `MabFileFolderProtectedItem` +- New field `VaultID` in struct `ProtectedItem` +- New field `SnapshotBackupAdditionalDetails` in struct `SubProtectionPolicy` + + +## 3.1.0 (2023-11-30) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 3.0.0 (2023-09-22) +### Breaking Changes + +- Function `*AzureVMWorkloadSAPHanaHSR.GetAzureVMWorkloadProtectableItem` has been removed +- Function `*AzureVMWorkloadSAPHanaHSR.GetWorkloadProtectableItem` has been removed +- Struct `AzureVMWorkloadSAPHanaHSR` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureFileshareProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureIaaSClassicComputeVMProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureIaaSComputeVMProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureIaaSVMProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureSQLProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureVMWorkloadProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureVMWorkloadSAPHanaDBInstanceProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `AzureVMWorkloadSQLDatabaseProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `DPMProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `GenericProtectedItem` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `MabFileFolderProtectedItem` has been removed +- Field `ActionRequired` of struct `PrivateLinkServiceConnectionState` has been removed +- Field `SoftDeleteRetentionPeriod` of struct `ProtectedItem` has been removed + +### Features Added + +- New value `SoftDeleteFeatureStateAlwaysON` added to enum type `SoftDeleteFeatureState` +- New enum type `VaultSubResourceType` with values `VaultSubResourceTypeAzureBackup`, `VaultSubResourceTypeAzureBackupSecondary`, `VaultSubResourceTypeAzureSiteRecovery` +- New function `*AzureVMWorkloadSAPHanaHSRProtectableItem.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` +- New function `*AzureVMWorkloadSAPHanaHSRProtectableItem.GetWorkloadProtectableItem() *WorkloadProtectableItem` +- New struct `AzureVMWorkloadSAPHanaHSRProtectableItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `AzureFileshareProtectedItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `AzureIaaSClassicComputeVMProtectedItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `AzureIaaSComputeVMProtectedItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `AzureIaaSVMProtectedItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `AzureSQLProtectedItem` +- New field `NodesList`, `SoftDeleteRetentionPeriodInDays` in struct `AzureVMWorkloadProtectedItem` +- New field `NodesList`, `SoftDeleteRetentionPeriodInDays` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSAPAseSystemProtectableItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSAPHanaDBInstance` +- New field `NodesList`, `SoftDeleteRetentionPeriodInDays` in struct `AzureVMWorkloadSAPHanaDBInstanceProtectedItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSAPHanaDatabaseProtectableItem` +- New field `NodesList`, `SoftDeleteRetentionPeriodInDays` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSAPHanaSystemProtectableItem` +- New field `IsProtectable`, `NodesList` in struct `AzureVMWorkloadSQLAvailabilityGroupProtectableItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSQLDatabaseProtectableItem` +- New field `NodesList`, `SoftDeleteRetentionPeriodInDays` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` +- New field `IsProtectable` in struct `AzureVMWorkloadSQLInstanceProtectableItem` +- New field `SoftDeleteRetentionPeriodInDays` in struct `BackupResourceVaultConfig` +- New field `AcquireStorageAccountLock`, `ProtectedItemsCount` in struct `BackupStatusResponse` +- New field `SoftDeleteRetentionPeriodInDays` in struct `DPMProtectedItem` +- New field `SourceResourceID` in struct `DistributedNodesInfo` +- New field `SoftDeleteRetentionPeriodInDays` in struct `GenericProtectedItem` +- New field `ProtectableItemCount` in struct `InquiryValidation` +- New field `SoftDeleteRetentionPeriodInDays` in struct `MabFileFolderProtectedItem` +- New field `GroupIDs` in struct `PrivateEndpointConnection` +- New field `ActionsRequired` in struct `PrivateLinkServiceConnectionState` +- New field `SoftDeleteRetentionPeriodInDays` in struct `ProtectedItem` + + +## 2.1.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + + +## 2.1.0 (2023-03-24) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module +- New enum type `TargetDiskNetworkAccessOption` with values `TargetDiskNetworkAccessOptionEnablePrivateAccessForAllDisks`, `TargetDiskNetworkAccessOptionEnablePublicAccessForAllDisks`, `TargetDiskNetworkAccessOptionSameAsOnSourceDisks` +- New struct `ExtendedLocation` +- New struct `SecuredVMDetails` +- New struct `TargetDiskNetworkAccessSettings` +- New field `IncludeSoftDeletedRP` in struct `BMSRPQueryObject` +- New field `IsPrivateAccessEnabledOnAnyDisk` in struct `IaasVMRecoveryPoint` +- New field `SecurityType` in struct `IaasVMRecoveryPoint` +- New field `ExtendedLocation` in struct `IaasVMRestoreRequest` +- New field `SecuredVMDetails` in struct `IaasVMRestoreRequest` +- New field `TargetDiskNetworkAccessSettings` in struct `IaasVMRestoreRequest` +- New field `ExtendedLocation` in struct `IaasVMRestoreWithRehydrationRequest` +- New field `SecuredVMDetails` in struct `IaasVMRestoreWithRehydrationRequest` +- New field `TargetDiskNetworkAccessSettings` in struct `IaasVMRestoreWithRehydrationRequest` +- New field `IsSoftDeleted` in struct `RecoveryPointProperties` + + +## 2.0.0 (2023-01-19) +### Breaking Changes + +- Type of `AzureBackupServerContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `AzureIaaSClassicComputeVMContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `AzureIaaSComputeVMContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `AzureSQLAGWorkloadContainerProtectionContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `AzureSQLContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `AzureStorageContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `AzureStorageProtectableContainer.ProtectableContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `AzureVMAppContainerProtectableContainer.ProtectableContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `AzureVMAppContainerProtectionContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `AzureWorkloadContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `DpmContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `GenericContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `IaaSVMContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `MabContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `ProtectableContainer.ProtectableContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Type of `ProtectionContainer.ContainerType` has been changed from `*ContainerType` to `*ProtectableContainerType` +- Const `ContainerTypeAzureWorkloadContainer`, `ContainerTypeMicrosoftClassicComputeVirtualMachines`, `ContainerTypeMicrosoftComputeVirtualMachines` from type alias `ContainerType` has been removed + +### Features Added + +- New value `BackupItemTypeSAPHanaDBInstance` added to type alias `BackupItemType` +- New value `BackupTypeSnapshotCopyOnlyFull`, `BackupTypeSnapshotFull` added to type alias `BackupType` +- New value `ContainerTypeHanaHSRContainer` added to type alias `ContainerType` +- New value `DataSourceTypeSAPHanaDBInstance` added to type alias `DataSourceType` +- New value `PolicyTypeSnapshotCopyOnlyFull`, `PolicyTypeSnapshotFull` added to type alias `PolicyType` +- New value `ProtectedItemStateBackupsSuspended` added to type alias `ProtectedItemState` +- New value `ProtectionStateBackupsSuspended` added to type alias `ProtectionState` +- New value `RestorePointQueryTypeSnapshotCopyOnlyFull`, `RestorePointQueryTypeSnapshotFull` added to type alias `RestorePointQueryType` +- New value `RestorePointTypeSnapshotCopyOnlyFull`, `RestorePointTypeSnapshotFull` added to type alias `RestorePointType` +- New value `WorkloadItemTypeSAPHanaDBInstance` added to type alias `WorkloadItemType` +- New value `WorkloadTypeSAPHanaDBInstance` added to type alias `WorkloadType` +- New type alias `ProtectableContainerType` with values `ProtectableContainerTypeAzureBackupServerContainer`, `ProtectableContainerTypeAzureSQLContainer`, `ProtectableContainerTypeAzureWorkloadContainer`, `ProtectableContainerTypeCluster`, `ProtectableContainerTypeDPMContainer`, `ProtectableContainerTypeGenericContainer`, `ProtectableContainerTypeIaasVMContainer`, `ProtectableContainerTypeIaasVMServiceContainer`, `ProtectableContainerTypeInvalid`, `ProtectableContainerTypeMABContainer`, `ProtectableContainerTypeMicrosoftClassicComputeVirtualMachines`, `ProtectableContainerTypeMicrosoftComputeVirtualMachines`, `ProtectableContainerTypeSQLAGWorkLoadContainer`, `ProtectableContainerTypeStorageContainer`, `ProtectableContainerTypeUnknown`, `ProtectableContainerTypeVCenter`, `ProtectableContainerTypeVMAppContainer`, `ProtectableContainerTypeWindows` +- New type alias `TieringMode` with values `TieringModeDoNotTier`, `TieringModeInvalid`, `TieringModeTierAfter`, `TieringModeTierRecommended` +- New function `*AzureVMWorkloadSAPHanaDBInstance.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` +- New function `*AzureVMWorkloadSAPHanaDBInstance.GetWorkloadProtectableItem() *WorkloadProtectableItem` +- New function `*AzureVMWorkloadSAPHanaDBInstanceProtectedItem.GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem` +- New function `*AzureVMWorkloadSAPHanaDBInstanceProtectedItem.GetProtectedItem() *ProtectedItem` +- New function `*AzureVMWorkloadSAPHanaHSR.GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem` +- New function `*AzureVMWorkloadSAPHanaHSR.GetWorkloadProtectableItem() *WorkloadProtectableItem` +- New function `NewDeletedProtectionContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*DeletedProtectionContainersClient, error)` +- New function `*DeletedProtectionContainersClient.NewListPager(string, string, *DeletedProtectionContainersClientListOptions) *runtime.Pager[DeletedProtectionContainersClientListResponse]` +- New struct `AzureVMWorkloadSAPHanaDBInstance` +- New struct `AzureVMWorkloadSAPHanaDBInstanceProtectedItem` +- New struct `AzureVMWorkloadSAPHanaHSR` +- New struct `DeletedProtectionContainersClient` +- New struct `DeletedProtectionContainersClientListResponse` +- New struct `RecoveryPointProperties` +- New struct `TieringPolicy` +- New field `RecoveryPointProperties` in struct `AzureFileShareRecoveryPoint` +- New field `SoftDeleteRetentionPeriod` in struct `AzureFileshareProtectedItem` +- New field `SoftDeleteRetentionPeriod` in struct `AzureIaaSClassicComputeVMProtectedItem` +- New field `SoftDeleteRetentionPeriod` in struct `AzureIaaSComputeVMProtectedItem` +- New field `SoftDeleteRetentionPeriod` in struct `AzureIaaSVMProtectedItem` +- New field `NewestRecoveryPointInArchive` in struct `AzureIaaSVMProtectedItemExtendedInfo` +- New field `OldestRecoveryPointInArchive` in struct `AzureIaaSVMProtectedItemExtendedInfo` +- New field `OldestRecoveryPointInVault` in struct `AzureIaaSVMProtectedItemExtendedInfo` +- New field `TieringPolicy` in struct `AzureIaaSVMProtectionPolicy` +- New field `SoftDeleteRetentionPeriod` in struct `AzureSQLProtectedItem` +- New field `NewestRecoveryPointInArchive` in struct `AzureVMWorkloadProtectedItemExtendedInfo` +- New field `OldestRecoveryPointInArchive` in struct `AzureVMWorkloadProtectedItemExtendedInfo` +- New field `OldestRecoveryPointInVault` in struct `AzureVMWorkloadProtectedItemExtendedInfo` +- New field `SoftDeleteRetentionPeriod` in struct `AzureVMWorkloadSAPAseDatabaseProtectedItem` +- New field `SoftDeleteRetentionPeriod` in struct `AzureVMWorkloadSAPHanaDatabaseProtectedItem` +- New field `SoftDeleteRetentionPeriod` in struct `AzureVMWorkloadSQLDatabaseProtectedItem` +- New field `RecoveryPointProperties` in struct `AzureWorkloadPointInTimeRecoveryPoint` +- New field `RecoveryPointProperties` in struct `AzureWorkloadRecoveryPoint` +- New field `RecoveryPointProperties` in struct `AzureWorkloadSAPHanaPointInTimeRecoveryPoint` +- New field `RecoveryPointProperties` in struct `AzureWorkloadSAPHanaRecoveryPoint` +- New field `RecoveryPointProperties` in struct `AzureWorkloadSQLPointInTimeRecoveryPoint` +- New field `RecoveryPointProperties` in struct `AzureWorkloadSQLRecoveryPoint` +- New field `SoftDeleteRetentionPeriod` in struct `DPMProtectedItem` +- New field `SoftDeleteRetentionPeriod` in struct `GenericProtectedItem` +- New field `RecoveryPointProperties` in struct `GenericRecoveryPoint` +- New field `RecoveryPointProperties` in struct `IaasVMRecoveryPoint` +- New field `SoftDeleteRetentionPeriod` in struct `MabFileFolderProtectedItem` +- New field `TieringPolicy` in struct `SubProtectionPolicy` + + +## 1.0.0 (2022-05-17) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/README.md new file mode 100644 index 00000000..9acac8fc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/README.md @@ -0,0 +1,90 @@ +# Azure Recovery Services Backup Module for Go + +The `armrecoveryservicesbackup` module provides operations for working with Azure Recovery Services Backup. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- [Supported](https://aka.ms/azsdk/go/supported-versions) version of Go (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Recovery Services Backup module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Recovery Services Backup. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Recovery Services Backup module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armrecoveryservicesbackup.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armrecoveryservicesbackup.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewBMSPrepareDataMoveOperationResultClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Recovery Services Backup` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/autorest.md new file mode 100644 index 00000000..441e7069 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/148c3b0b44f7789ced94859992493fafd0072f83/specification/recoveryservicesbackup/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/148c3b0b44f7789ced94859992493fafd0072f83/specification/recoveryservicesbackup/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 4.2.0 +tag: package-2025-02-01 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupengines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupengines_client.go new file mode 100644 index 00000000..92eafc04 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupengines_client.go @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupEnginesClient contains the methods for the BackupEngines group. +// Don't use this type directly, use NewBackupEnginesClient() instead. +type BackupEnginesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupEnginesClient creates a new instance of BackupEnginesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupEnginesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupEnginesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupEnginesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Returns backup management server registered to Recovery Services Vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - backupEngineName - Name of the backup management server. +// - options - BackupEnginesClientGetOptions contains the optional parameters for the BackupEnginesClient.Get method. +func (client *BackupEnginesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, options *BackupEnginesClientGetOptions) (BackupEnginesClientGetResponse, error) { + var err error + const operationName = "BackupEnginesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, backupEngineName, options) + if err != nil { + return BackupEnginesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupEnginesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupEnginesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupEnginesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, options *BackupEnginesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if backupEngineName == "" { + return nil, errors.New("parameter backupEngineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{backupEngineName}", url.PathEscape(backupEngineName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupEnginesClient) getHandleResponse(resp *http.Response) (BackupEnginesClientGetResponse, error) { + result := BackupEnginesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupEngineBaseResource); err != nil { + return BackupEnginesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupEnginesClientListOptions contains the optional parameters for the BackupEnginesClient.NewListPager method. +func (client *BackupEnginesClient) NewListPager(vaultName string, resourceGroupName string, options *BackupEnginesClientListOptions) *runtime.Pager[BackupEnginesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupEnginesClientListResponse]{ + More: func(page BackupEnginesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupEnginesClientListResponse) (BackupEnginesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupEnginesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, options) + }, nil) + if err != nil { + return BackupEnginesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupEnginesClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupEnginesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupEnginesClient) listHandleResponse(resp *http.Response) (BackupEnginesClientListResponse, error) { + result := BackupEnginesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupEngineBaseResourceList); err != nil { + return BackupEnginesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupjobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupjobs_client.go new file mode 100644 index 00000000..627376b9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupjobs_client.go @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupJobsClient contains the methods for the BackupJobs group. +// Don't use this type directly, use NewBackupJobsClient() instead. +type BackupJobsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupJobsClient creates a new instance of BackupJobsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupJobsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupJobsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Provides a pageable list of jobs. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupJobsClientListOptions contains the optional parameters for the BackupJobsClient.NewListPager method. +func (client *BackupJobsClient) NewListPager(vaultName string, resourceGroupName string, options *BackupJobsClientListOptions) *runtime.Pager[BackupJobsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupJobsClientListResponse]{ + More: func(page BackupJobsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupJobsClientListResponse) (BackupJobsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupJobsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, options) + }, nil) + if err != nil { + return BackupJobsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupJobsClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupJobsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupJobsClient) listHandleResponse(resp *http.Response) (BackupJobsClientListResponse, error) { + result := BackupJobsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobResourceList); err != nil { + return BackupJobsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupoperationresults_client.go new file mode 100644 index 00000000..74ae809b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupoperationresults_client.go @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupOperationResultsClient contains the methods for the BackupOperationResults group. +// Don't use this type directly, use NewBackupOperationResultsClient() instead. +type BackupOperationResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupOperationResultsClient creates a new instance of BackupOperationResultsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupOperationResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupOperationResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the +// status code in the response would be Accepted. It will continue to be in this state +// till it reaches completion. On successful completion, the status code will be OK. This method expects OperationID as an +// argument. OperationID is part of the Location header of the operation response. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - operationID - OperationID which represents the operation. +// - options - BackupOperationResultsClientGetOptions contains the optional parameters for the BackupOperationResultsClient.Get +// method. +func (client *BackupOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BackupOperationResultsClientGetOptions) (BackupOperationResultsClientGetResponse, error) { + var err error + const operationName = "BackupOperationResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) + if err != nil { + return BackupOperationResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupOperationResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BackupOperationResultsClientGetResponse{}, err + } + return BackupOperationResultsClientGetResponse{}, nil +} + +// getCreateRequest creates the Get request. +func (client *BackupOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, _ *BackupOperationResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupoperationstatuses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupoperationstatuses_client.go new file mode 100644 index 00000000..b819e644 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupoperationstatuses_client.go @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupOperationStatusesClient contains the methods for the BackupOperationStatuses group. +// Don't use this type directly, use NewBackupOperationStatusesClient() instead. +type BackupOperationStatusesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupOperationStatusesClient creates a new instance of BackupOperationStatusesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupOperationStatusesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupOperationStatusesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed +// or failed. You can refer to the OperationStatus enum for all the possible states of an +// operation. Some operations create jobs. This method returns the list of jobs when the operation is complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - operationID - OperationID which represents the operation. +// - options - BackupOperationStatusesClientGetOptions contains the optional parameters for the BackupOperationStatusesClient.Get +// method. +func (client *BackupOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BackupOperationStatusesClientGetOptions) (BackupOperationStatusesClientGetResponse, error) { + var err error + const operationName = "BackupOperationStatusesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) + if err != nil { + return BackupOperationStatusesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupOperationStatusesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupOperationStatusesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupOperationStatusesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, _ *BackupOperationStatusesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupOperationStatusesClient) getHandleResponse(resp *http.Response) (BackupOperationStatusesClientGetResponse, error) { + result := BackupOperationStatusesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { + return BackupOperationStatusesClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backuppolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backuppolicies_client.go new file mode 100644 index 00000000..f7e25baf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backuppolicies_client.go @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupPoliciesClient contains the methods for the BackupPolicies group. +// Don't use this type directly, use NewBackupPoliciesClient() instead. +type BackupPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupPoliciesClient creates a new instance of BackupPoliciesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to +// fetch scoped results. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.NewListPager method. +func (client *BackupPoliciesClient) NewListPager(vaultName string, resourceGroupName string, options *BackupPoliciesClientListOptions) *runtime.Pager[BackupPoliciesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupPoliciesClientListResponse]{ + More: func(page BackupPoliciesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupPoliciesClientListResponse) (BackupPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupPoliciesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, options) + }, nil) + if err != nil { + return BackupPoliciesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupPoliciesClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupPoliciesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupPoliciesClient) listHandleResponse(resp *http.Response) (BackupPoliciesClientListResponse, error) { + result := BackupPoliciesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionPolicyResourceList); err != nil { + return BackupPoliciesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotectableitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotectableitems_client.go new file mode 100644 index 00000000..35fdcb2f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotectableitems_client.go @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupProtectableItemsClient contains the methods for the BackupProtectableItems group. +// Don't use this type directly, use NewBackupProtectableItemsClient() instead. +type BackupProtectableItemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupProtectableItemsClient creates a new instance of BackupProtectableItemsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupProtectableItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupProtectableItemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupProtectableItemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Provides a pageable list of protectable objects within your subscription according to the query filter and +// the pagination parameters. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupProtectableItemsClientListOptions contains the optional parameters for the BackupProtectableItemsClient.NewListPager +// method. +func (client *BackupProtectableItemsClient) NewListPager(vaultName string, resourceGroupName string, options *BackupProtectableItemsClientListOptions) *runtime.Pager[BackupProtectableItemsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupProtectableItemsClientListResponse]{ + More: func(page BackupProtectableItemsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupProtectableItemsClientListResponse) (BackupProtectableItemsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupProtectableItemsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, options) + }, nil) + if err != nil { + return BackupProtectableItemsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupProtectableItemsClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupProtectableItemsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupProtectableItemsClient) listHandleResponse(resp *http.Response) (BackupProtectableItemsClientListResponse, error) { + result := BackupProtectableItemsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkloadProtectableItemResourceList); err != nil { + return BackupProtectableItemsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotecteditems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotecteditems_client.go new file mode 100644 index 00000000..efbc09f5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotecteditems_client.go @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupProtectedItemsClient contains the methods for the BackupProtectedItems group. +// Don't use this type directly, use NewBackupProtectedItemsClient() instead. +type BackupProtectedItemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupProtectedItemsClient creates a new instance of BackupProtectedItemsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupProtectedItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupProtectedItemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupProtectedItemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Provides a pageable list of all items that are backed up within a vault. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupProtectedItemsClientListOptions contains the optional parameters for the BackupProtectedItemsClient.NewListPager +// method. +func (client *BackupProtectedItemsClient) NewListPager(vaultName string, resourceGroupName string, options *BackupProtectedItemsClientListOptions) *runtime.Pager[BackupProtectedItemsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupProtectedItemsClientListResponse]{ + More: func(page BackupProtectedItemsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupProtectedItemsClientListResponse) (BackupProtectedItemsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupProtectedItemsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, options) + }, nil) + if err != nil { + return BackupProtectedItemsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupProtectedItemsClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupProtectedItemsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupProtectedItemsClient) listHandleResponse(resp *http.Response) (BackupProtectedItemsClientListResponse, error) { + result := BackupProtectedItemsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectedItemResourceList); err != nil { + return BackupProtectedItemsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotectioncontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotectioncontainers_client.go new file mode 100644 index 00000000..3cc40105 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotectioncontainers_client.go @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupProtectionContainersClient contains the methods for the BackupProtectionContainers group. +// Don't use this type directly, use NewBackupProtectionContainersClient() instead. +type BackupProtectionContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupProtectionContainersClient creates a new instance of BackupProtectionContainersClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupProtectionContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupProtectionContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupProtectionContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Lists the containers registered to Recovery Services Vault. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupProtectionContainersClientListOptions contains the optional parameters for the BackupProtectionContainersClient.NewListPager +// method. +func (client *BackupProtectionContainersClient) NewListPager(vaultName string, resourceGroupName string, options *BackupProtectionContainersClientListOptions) *runtime.Pager[BackupProtectionContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupProtectionContainersClientListResponse]{ + More: func(page BackupProtectionContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupProtectionContainersClientListResponse) (BackupProtectionContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupProtectionContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, options) + }, nil) + if err != nil { + return BackupProtectionContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupProtectionContainersClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupProtectionContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupProtectionContainersClient) listHandleResponse(resp *http.Response) (BackupProtectionContainersClientListResponse, error) { + result := BackupProtectionContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerResourceList); err != nil { + return BackupProtectionContainersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotectionintent_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotectionintent_client.go new file mode 100644 index 00000000..fe0f8a29 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupprotectionintent_client.go @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupProtectionIntentClient contains the methods for the BackupProtectionIntent group. +// Don't use this type directly, use NewBackupProtectionIntentClient() instead. +type BackupProtectionIntentClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupProtectionIntentClient creates a new instance of BackupProtectionIntentClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupProtectionIntentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupProtectionIntentClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupProtectionIntentClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Provides a pageable list of all intents that are present within a vault. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupProtectionIntentClientListOptions contains the optional parameters for the BackupProtectionIntentClient.NewListPager +// method. +func (client *BackupProtectionIntentClient) NewListPager(vaultName string, resourceGroupName string, options *BackupProtectionIntentClientListOptions) *runtime.Pager[BackupProtectionIntentClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupProtectionIntentClientListResponse]{ + More: func(page BackupProtectionIntentClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupProtectionIntentClientListResponse) (BackupProtectionIntentClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupProtectionIntentClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, options) + }, nil) + if err != nil { + return BackupProtectionIntentClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupProtectionIntentClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupProtectionIntentClientListOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupProtectionIntentClient) listHandleResponse(resp *http.Response) (BackupProtectionIntentClientListResponse, error) { + result := BackupProtectionIntentClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionIntentResourceList); err != nil { + return BackupProtectionIntentClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupresourceencryptionconfigs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupresourceencryptionconfigs_client.go new file mode 100644 index 00000000..30e6f3a0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupresourceencryptionconfigs_client.go @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupResourceEncryptionConfigsClient contains the methods for the BackupResourceEncryptionConfigs group. +// Don't use this type directly, use NewBackupResourceEncryptionConfigsClient() instead. +type BackupResourceEncryptionConfigsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupResourceEncryptionConfigsClient creates a new instance of BackupResourceEncryptionConfigsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupResourceEncryptionConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupResourceEncryptionConfigsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupResourceEncryptionConfigsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches Vault Encryption config. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupResourceEncryptionConfigsClientGetOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Get +// method. +func (client *BackupResourceEncryptionConfigsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceEncryptionConfigsClientGetOptions) (BackupResourceEncryptionConfigsClientGetResponse, error) { + var err error + const operationName = "BackupResourceEncryptionConfigsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) + if err != nil { + return BackupResourceEncryptionConfigsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupResourceEncryptionConfigsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceEncryptionConfigsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupResourceEncryptionConfigsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, _ *BackupResourceEncryptionConfigsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupResourceEncryptionConfigsClient) getHandleResponse(resp *http.Response) (BackupResourceEncryptionConfigsClientGetResponse, error) { + result := BackupResourceEncryptionConfigsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceEncryptionConfigExtendedResource); err != nil { + return BackupResourceEncryptionConfigsClientGetResponse{}, err + } + return result, nil +} + +// Update - Updates Vault encryption config. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - Vault encryption input config request +// - options - BackupResourceEncryptionConfigsClientUpdateOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Update +// method. +func (client *BackupResourceEncryptionConfigsClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceEncryptionConfigResource, options *BackupResourceEncryptionConfigsClientUpdateOptions) (BackupResourceEncryptionConfigsClientUpdateResponse, error) { + var err error + const operationName = "BackupResourceEncryptionConfigsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return BackupResourceEncryptionConfigsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupResourceEncryptionConfigsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceEncryptionConfigsClientUpdateResponse{}, err + } + return BackupResourceEncryptionConfigsClientUpdateResponse{}, nil +} + +// updateCreateRequest creates the Update request. +func (client *BackupResourceEncryptionConfigsClient) updateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceEncryptionConfigResource, _ *BackupResourceEncryptionConfigsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupresourcestorageconfigsnoncrr_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupresourcestorageconfigsnoncrr_client.go new file mode 100644 index 00000000..af555984 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupresourcestorageconfigsnoncrr_client.go @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupResourceStorageConfigsNonCRRClient contains the methods for the BackupResourceStorageConfigsNonCRR group. +// Don't use this type directly, use NewBackupResourceStorageConfigsNonCRRClient() instead. +type BackupResourceStorageConfigsNonCRRClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupResourceStorageConfigsNonCRRClient creates a new instance of BackupResourceStorageConfigsNonCRRClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupResourceStorageConfigsNonCRRClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupResourceStorageConfigsNonCRRClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupResourceStorageConfigsNonCRRClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches resource storage config. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupResourceStorageConfigsNonCRRClientGetOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Get +// method. +func (client *BackupResourceStorageConfigsNonCRRClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceStorageConfigsNonCRRClientGetOptions) (BackupResourceStorageConfigsNonCRRClientGetResponse, error) { + var err error + const operationName = "BackupResourceStorageConfigsNonCRRClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) + if err != nil { + return BackupResourceStorageConfigsNonCRRClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupResourceStorageConfigsNonCRRClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceStorageConfigsNonCRRClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupResourceStorageConfigsNonCRRClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, _ *BackupResourceStorageConfigsNonCRRClientGetOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupResourceStorageConfigsNonCRRClient) getHandleResponse(resp *http.Response) (BackupResourceStorageConfigsNonCRRClientGetResponse, error) { + result := BackupResourceStorageConfigsNonCRRClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceConfigResource); err != nil { + return BackupResourceStorageConfigsNonCRRClientGetResponse{}, err + } + return result, nil +} + +// Patch - Updates vault storage model type. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - Vault storage config request +// - options - BackupResourceStorageConfigsNonCRRClientPatchOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Patch +// method. +func (client *BackupResourceStorageConfigsNonCRRClient) Patch(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceConfigResource, options *BackupResourceStorageConfigsNonCRRClientPatchOptions) (BackupResourceStorageConfigsNonCRRClientPatchResponse, error) { + var err error + const operationName = "BackupResourceStorageConfigsNonCRRClient.Patch" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.patchCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, err + } + return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, nil +} + +// patchCreateRequest creates the Patch request. +func (client *BackupResourceStorageConfigsNonCRRClient) patchCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceConfigResource, _ *BackupResourceStorageConfigsNonCRRClientPatchOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Update - Updates vault storage model type. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - Vault storage config request +// - options - BackupResourceStorageConfigsNonCRRClientUpdateOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Update +// method. +func (client *BackupResourceStorageConfigsNonCRRClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceConfigResource, options *BackupResourceStorageConfigsNonCRRClientUpdateOptions) (BackupResourceStorageConfigsNonCRRClientUpdateResponse, error) { + var err error + const operationName = "BackupResourceStorageConfigsNonCRRClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *BackupResourceStorageConfigsNonCRRClient) updateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceConfigResource, _ *BackupResourceStorageConfigsNonCRRClientUpdateOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *BackupResourceStorageConfigsNonCRRClient) updateHandleResponse(resp *http.Response) (BackupResourceStorageConfigsNonCRRClientUpdateResponse, error) { + result := BackupResourceStorageConfigsNonCRRClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceConfigResource); err != nil { + return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupresourcevaultconfigs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupresourcevaultconfigs_client.go new file mode 100644 index 00000000..551fa94a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupresourcevaultconfigs_client.go @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupResourceVaultConfigsClient contains the methods for the BackupResourceVaultConfigs group. +// Don't use this type directly, use NewBackupResourceVaultConfigsClient() instead. +type BackupResourceVaultConfigsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupResourceVaultConfigsClient creates a new instance of BackupResourceVaultConfigsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupResourceVaultConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupResourceVaultConfigsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupResourceVaultConfigsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches resource vault config. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupResourceVaultConfigsClientGetOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Get +// method. +func (client *BackupResourceVaultConfigsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceVaultConfigsClientGetOptions) (BackupResourceVaultConfigsClientGetResponse, error) { + var err error + const operationName = "BackupResourceVaultConfigsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) + if err != nil { + return BackupResourceVaultConfigsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupResourceVaultConfigsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceVaultConfigsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupResourceVaultConfigsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, _ *BackupResourceVaultConfigsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupResourceVaultConfigsClient) getHandleResponse(resp *http.Response) (BackupResourceVaultConfigsClientGetResponse, error) { + result := BackupResourceVaultConfigsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceVaultConfigResource); err != nil { + return BackupResourceVaultConfigsClientGetResponse{}, err + } + return result, nil +} + +// Put - Updates vault security config. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - resource config request +// - options - BackupResourceVaultConfigsClientPutOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Put +// method. +func (client *BackupResourceVaultConfigsClient) Put(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource, options *BackupResourceVaultConfigsClientPutOptions) (BackupResourceVaultConfigsClientPutResponse, error) { + var err error + const operationName = "BackupResourceVaultConfigsClient.Put" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.putCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return BackupResourceVaultConfigsClientPutResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupResourceVaultConfigsClientPutResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceVaultConfigsClientPutResponse{}, err + } + resp, err := client.putHandleResponse(httpResp) + return resp, err +} + +// putCreateRequest creates the Put request. +func (client *BackupResourceVaultConfigsClient) putCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource, options *BackupResourceVaultConfigsClientPutOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// putHandleResponse handles the Put response. +func (client *BackupResourceVaultConfigsClient) putHandleResponse(resp *http.Response) (BackupResourceVaultConfigsClientPutResponse, error) { + result := BackupResourceVaultConfigsClientPutResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceVaultConfigResource); err != nil { + return BackupResourceVaultConfigsClientPutResponse{}, err + } + return result, nil +} + +// Update - Updates vault security config. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - resource config request +// - options - BackupResourceVaultConfigsClientUpdateOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Update +// method. +func (client *BackupResourceVaultConfigsClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource, options *BackupResourceVaultConfigsClientUpdateOptions) (BackupResourceVaultConfigsClientUpdateResponse, error) { + var err error + const operationName = "BackupResourceVaultConfigsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return BackupResourceVaultConfigsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupResourceVaultConfigsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupResourceVaultConfigsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *BackupResourceVaultConfigsClient) updateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource, options *BackupResourceVaultConfigsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *BackupResourceVaultConfigsClient) updateHandleResponse(resp *http.Response) (BackupResourceVaultConfigsClientUpdateResponse, error) { + result := BackupResourceVaultConfigsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceVaultConfigResource); err != nil { + return BackupResourceVaultConfigsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backups_client.go new file mode 100644 index 00000000..eee368f5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backups_client.go @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupsClient contains the methods for the Backups group. +// Don't use this type directly, use NewBackupsClient() instead. +type BackupsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupsClient creates a new instance of BackupsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Trigger - Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the operation, +// call GetProtectedItemOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backup item. +// - containerName - Container name associated with the backup item. +// - protectedItemName - Backup item for which backup needs to be triggered. +// - parameters - resource backup request +// - options - BackupsClientTriggerOptions contains the optional parameters for the BackupsClient.Trigger method. +func (client *BackupsClient) Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters BackupRequestResource, options *BackupsClientTriggerOptions) (BackupsClientTriggerResponse, error) { + var err error + const operationName = "BackupsClient.Trigger" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, options) + if err != nil { + return BackupsClientTriggerResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupsClientTriggerResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return BackupsClientTriggerResponse{}, err + } + return BackupsClientTriggerResponse{}, nil +} + +// triggerCreateRequest creates the Trigger request. +func (client *BackupsClient) triggerCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters BackupRequestResource, _ *BackupsClientTriggerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupstatus_client.go new file mode 100644 index 00000000..e6a2bd06 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupstatus_client.go @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupStatusClient contains the methods for the BackupStatus group. +// Don't use this type directly, use NewBackupStatusClient() instead. +type BackupStatusClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupStatusClient creates a new instance of BackupStatusClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupStatusClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupStatusClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get the container backup status +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - azureRegion - Azure region to hit Api +// - parameters - Container Backup Status Request +// - options - BackupStatusClientGetOptions contains the optional parameters for the BackupStatusClient.Get method. +func (client *BackupStatusClient) Get(ctx context.Context, azureRegion string, parameters BackupStatusRequest, options *BackupStatusClientGetOptions) (BackupStatusClientGetResponse, error) { + var err error + const operationName = "BackupStatusClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, azureRegion, parameters, options) + if err != nil { + return BackupStatusClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupStatusClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return BackupStatusClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BackupStatusClient) getCreateRequest(ctx context.Context, azureRegion string, parameters BackupStatusRequest, _ *BackupStatusClientGetOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus" + if azureRegion == "" { + return nil, errors.New("parameter azureRegion cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{azureRegion}", url.PathEscape(azureRegion)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BackupStatusClient) getHandleResponse(resp *http.Response) (BackupStatusClientGetResponse, error) { + result := BackupStatusClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupStatusResponse); err != nil { + return BackupStatusClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupusagesummaries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupusagesummaries_client.go new file mode 100644 index 00000000..20ce3943 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupusagesummaries_client.go @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupUsageSummariesClient contains the methods for the BackupUsageSummaries group. +// Don't use this type directly, use NewBackupUsageSummariesClient() instead. +type BackupUsageSummariesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupUsageSummariesClient creates a new instance of BackupUsageSummariesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupUsageSummariesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupUsageSummariesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupUsageSummariesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Fetches the backup management usage summaries of the vault. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BackupUsageSummariesClientListOptions contains the optional parameters for the BackupUsageSummariesClient.NewListPager +// method. +func (client *BackupUsageSummariesClient) NewListPager(vaultName string, resourceGroupName string, options *BackupUsageSummariesClientListOptions) *runtime.Pager[BackupUsageSummariesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupUsageSummariesClientListResponse]{ + More: func(page BackupUsageSummariesClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *BackupUsageSummariesClientListResponse) (BackupUsageSummariesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupUsageSummariesClient.NewListPager") + req, err := client.listCreateRequest(ctx, vaultName, resourceGroupName, options) + if err != nil { + return BackupUsageSummariesClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BackupUsageSummariesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return BackupUsageSummariesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupUsageSummariesClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupUsageSummariesClientListOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupUsageSummariesClient) listHandleResponse(resp *http.Response) (BackupUsageSummariesClientListResponse, error) { + result := BackupUsageSummariesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.BackupManagementUsageList); err != nil { + return BackupUsageSummariesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupworkloaditems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupworkloaditems_client.go new file mode 100644 index 00000000..093bf7b2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/backupworkloaditems_client.go @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BackupWorkloadItemsClient contains the methods for the BackupWorkloadItems group. +// Don't use this type directly, use NewBackupWorkloadItemsClient() instead. +type BackupWorkloadItemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBackupWorkloadItemsClient creates a new instance of BackupWorkloadItemsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBackupWorkloadItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupWorkloadItemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BackupWorkloadItemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Provides a pageable list of workload item of a specific container according to the query filter and the +// pagination parameters. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the container. +// - containerName - Name of the container. +// - options - BackupWorkloadItemsClientListOptions contains the optional parameters for the BackupWorkloadItemsClient.NewListPager +// method. +func (client *BackupWorkloadItemsClient) NewListPager(vaultName string, resourceGroupName string, fabricName string, containerName string, options *BackupWorkloadItemsClientListOptions) *runtime.Pager[BackupWorkloadItemsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[BackupWorkloadItemsClientListResponse]{ + More: func(page BackupWorkloadItemsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *BackupWorkloadItemsClientListResponse) (BackupWorkloadItemsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "BackupWorkloadItemsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) + }, nil) + if err != nil { + return BackupWorkloadItemsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *BackupWorkloadItemsClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *BackupWorkloadItemsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *BackupWorkloadItemsClient) listHandleResponse(resp *http.Response) (BackupWorkloadItemsClientListResponse, error) { + result := BackupWorkloadItemsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.WorkloadItemResourceList); err != nil { + return BackupWorkloadItemsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/bmspreparedatamoveoperationresult_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/bmspreparedatamoveoperationresult_client.go new file mode 100644 index 00000000..86728bd8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/bmspreparedatamoveoperationresult_client.go @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// BMSPrepareDataMoveOperationResultClient contains the methods for the BMSPrepareDataMoveOperationResult group. +// Don't use this type directly, use NewBMSPrepareDataMoveOperationResultClient() instead. +type BMSPrepareDataMoveOperationResultClient struct { + internal *arm.Client + subscriptionID string +} + +// NewBMSPrepareDataMoveOperationResultClient creates a new instance of BMSPrepareDataMoveOperationResultClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewBMSPrepareDataMoveOperationResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BMSPrepareDataMoveOperationResultClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &BMSPrepareDataMoveOperationResultClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches Operation Result for Prepare Data Move +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - BMSPrepareDataMoveOperationResultClientGetOptions contains the optional parameters for the BMSPrepareDataMoveOperationResultClient.Get +// method. +func (client *BMSPrepareDataMoveOperationResultClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BMSPrepareDataMoveOperationResultClientGetOptions) (BMSPrepareDataMoveOperationResultClientGetResponse, error) { + var err error + const operationName = "BMSPrepareDataMoveOperationResultClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) + if err != nil { + return BMSPrepareDataMoveOperationResultClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return BMSPrepareDataMoveOperationResultClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return BMSPrepareDataMoveOperationResultClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *BMSPrepareDataMoveOperationResultClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, _ *BMSPrepareDataMoveOperationResultClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationResults/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *BMSPrepareDataMoveOperationResultClient) getHandleResponse(resp *http.Response) (BMSPrepareDataMoveOperationResultClientGetResponse, error) { + result := BMSPrepareDataMoveOperationResultClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { + return BMSPrepareDataMoveOperationResultClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/build.go new file mode 100644 index 00000000..f0a4eff5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/recoveryservices/armrecoveryservicesbackup + +package armrecoveryservicesbackup diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/ci.yml new file mode 100644 index 00000000..366d5724 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/ci.yml @@ -0,0 +1,27 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + ServiceDirectory: 'resourcemanager/recoveryservices/armrecoveryservicesbackup' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/client.go new file mode 100644 index 00000000..9804ab43 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/client.go @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// Client contains the methods for the RecoveryServicesBackupClient group. +// Don't use this type directly, use NewClient() instead. +type Client struct { + internal *arm.Client + subscriptionID string +} + +// NewClient creates a new instance of Client with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &Client{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginBMSPrepareDataMove - Prepares source vault for Data Move operation +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - Prepare data move request +// - options - ClientBeginBMSPrepareDataMoveOptions contains the optional parameters for the Client.BeginBMSPrepareDataMove +// method. +func (client *Client) BeginBMSPrepareDataMove(ctx context.Context, vaultName string, resourceGroupName string, parameters PrepareDataMoveRequest, options *ClientBeginBMSPrepareDataMoveOptions) (*runtime.Poller[ClientBMSPrepareDataMoveResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.bMSPrepareDataMove(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientBMSPrepareDataMoveResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientBMSPrepareDataMoveResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// BMSPrepareDataMove - Prepares source vault for Data Move operation +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +func (client *Client) bMSPrepareDataMove(ctx context.Context, vaultName string, resourceGroupName string, parameters PrepareDataMoveRequest, options *ClientBeginBMSPrepareDataMoveOptions) (*http.Response, error) { + var err error + const operationName = "Client.BeginBMSPrepareDataMove" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.bmsPrepareDataMoveCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// bmsPrepareDataMoveCreateRequest creates the BMSPrepareDataMove request. +func (client *Client) bmsPrepareDataMoveCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters PrepareDataMoveRequest, _ *ClientBeginBMSPrepareDataMoveOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// BeginBMSTriggerDataMove - Triggers Data Move Operation on target vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - Trigger data move request +// - options - ClientBeginBMSTriggerDataMoveOptions contains the optional parameters for the Client.BeginBMSTriggerDataMove +// method. +func (client *Client) BeginBMSTriggerDataMove(ctx context.Context, vaultName string, resourceGroupName string, parameters TriggerDataMoveRequest, options *ClientBeginBMSTriggerDataMoveOptions) (*runtime.Poller[ClientBMSTriggerDataMoveResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.bMSTriggerDataMove(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientBMSTriggerDataMoveResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientBMSTriggerDataMoveResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// BMSTriggerDataMove - Triggers Data Move Operation on target vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +func (client *Client) bMSTriggerDataMove(ctx context.Context, vaultName string, resourceGroupName string, parameters TriggerDataMoveRequest, options *ClientBeginBMSTriggerDataMoveOptions) (*http.Response, error) { + var err error + const operationName = "Client.BeginBMSTriggerDataMove" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.bmsTriggerDataMoveCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// bmsTriggerDataMoveCreateRequest creates the BMSTriggerDataMove request. +func (client *Client) bmsTriggerDataMoveCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters TriggerDataMoveRequest, _ *ClientBeginBMSTriggerDataMoveOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// GetOperationStatus - Fetches operation status for data move operation on vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - ClientGetOperationStatusOptions contains the optional parameters for the Client.GetOperationStatus method. +func (client *Client) GetOperationStatus(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ClientGetOperationStatusOptions) (ClientGetOperationStatusResponse, error) { + var err error + const operationName = "Client.GetOperationStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getOperationStatusCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) + if err != nil { + return ClientGetOperationStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientGetOperationStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientGetOperationStatusResponse{}, err + } + resp, err := client.getOperationStatusHandleResponse(httpResp) + return resp, err +} + +// getOperationStatusCreateRequest creates the GetOperationStatus request. +func (client *Client) getOperationStatusCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, _ *ClientGetOperationStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getOperationStatusHandleResponse handles the GetOperationStatus response. +func (client *Client) getOperationStatusHandleResponse(resp *http.Response) (ClientGetOperationStatusResponse, error) { + result := ClientGetOperationStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { + return ClientGetOperationStatusResponse{}, err + } + return result, nil +} + +// BeginMoveRecoveryPoint - Move recovery point from one datastore to another store. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - Move Resource Across Tiers Request +// - options - ClientBeginMoveRecoveryPointOptions contains the optional parameters for the Client.BeginMoveRecoveryPoint method. +func (client *Client) BeginMoveRecoveryPoint(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters MoveRPAcrossTiersRequest, options *ClientBeginMoveRecoveryPointOptions) (*runtime.Poller[ClientMoveRecoveryPointResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.moveRecoveryPoint(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientMoveRecoveryPointResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientMoveRecoveryPointResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// MoveRecoveryPoint - Move recovery point from one datastore to another store. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +func (client *Client) moveRecoveryPoint(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters MoveRPAcrossTiersRequest, options *ClientBeginMoveRecoveryPointOptions) (*http.Response, error) { + var err error + const operationName = "Client.BeginMoveRecoveryPoint" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.moveRecoveryPointCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// moveRecoveryPointCreateRequest creates the MoveRecoveryPoint request. +func (client *Client) moveRecoveryPointCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters MoveRPAcrossTiersRequest, _ *ClientBeginMoveRecoveryPointOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + if recoveryPointID == "" { + return nil, errors.New("parameter recoveryPointID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/client_factory.go new file mode 100644 index 00000000..2f99d2c6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/client_factory.go @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewBMSPrepareDataMoveOperationResultClient creates a new instance of BMSPrepareDataMoveOperationResultClient. +func (c *ClientFactory) NewBMSPrepareDataMoveOperationResultClient() *BMSPrepareDataMoveOperationResultClient { + return &BMSPrepareDataMoveOperationResultClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupEnginesClient creates a new instance of BackupEnginesClient. +func (c *ClientFactory) NewBackupEnginesClient() *BackupEnginesClient { + return &BackupEnginesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupJobsClient creates a new instance of BackupJobsClient. +func (c *ClientFactory) NewBackupJobsClient() *BackupJobsClient { + return &BackupJobsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupOperationResultsClient creates a new instance of BackupOperationResultsClient. +func (c *ClientFactory) NewBackupOperationResultsClient() *BackupOperationResultsClient { + return &BackupOperationResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupOperationStatusesClient creates a new instance of BackupOperationStatusesClient. +func (c *ClientFactory) NewBackupOperationStatusesClient() *BackupOperationStatusesClient { + return &BackupOperationStatusesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupPoliciesClient creates a new instance of BackupPoliciesClient. +func (c *ClientFactory) NewBackupPoliciesClient() *BackupPoliciesClient { + return &BackupPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupProtectableItemsClient creates a new instance of BackupProtectableItemsClient. +func (c *ClientFactory) NewBackupProtectableItemsClient() *BackupProtectableItemsClient { + return &BackupProtectableItemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupProtectedItemsClient creates a new instance of BackupProtectedItemsClient. +func (c *ClientFactory) NewBackupProtectedItemsClient() *BackupProtectedItemsClient { + return &BackupProtectedItemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupProtectionContainersClient creates a new instance of BackupProtectionContainersClient. +func (c *ClientFactory) NewBackupProtectionContainersClient() *BackupProtectionContainersClient { + return &BackupProtectionContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupProtectionIntentClient creates a new instance of BackupProtectionIntentClient. +func (c *ClientFactory) NewBackupProtectionIntentClient() *BackupProtectionIntentClient { + return &BackupProtectionIntentClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupResourceEncryptionConfigsClient creates a new instance of BackupResourceEncryptionConfigsClient. +func (c *ClientFactory) NewBackupResourceEncryptionConfigsClient() *BackupResourceEncryptionConfigsClient { + return &BackupResourceEncryptionConfigsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupResourceStorageConfigsNonCRRClient creates a new instance of BackupResourceStorageConfigsNonCRRClient. +func (c *ClientFactory) NewBackupResourceStorageConfigsNonCRRClient() *BackupResourceStorageConfigsNonCRRClient { + return &BackupResourceStorageConfigsNonCRRClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupResourceVaultConfigsClient creates a new instance of BackupResourceVaultConfigsClient. +func (c *ClientFactory) NewBackupResourceVaultConfigsClient() *BackupResourceVaultConfigsClient { + return &BackupResourceVaultConfigsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupStatusClient creates a new instance of BackupStatusClient. +func (c *ClientFactory) NewBackupStatusClient() *BackupStatusClient { + return &BackupStatusClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupUsageSummariesClient creates a new instance of BackupUsageSummariesClient. +func (c *ClientFactory) NewBackupUsageSummariesClient() *BackupUsageSummariesClient { + return &BackupUsageSummariesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupWorkloadItemsClient creates a new instance of BackupWorkloadItemsClient. +func (c *ClientFactory) NewBackupWorkloadItemsClient() *BackupWorkloadItemsClient { + return &BackupWorkloadItemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewBackupsClient creates a new instance of BackupsClient. +func (c *ClientFactory) NewBackupsClient() *BackupsClient { + return &BackupsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewClient creates a new instance of Client. +func (c *ClientFactory) NewClient() *Client { + return &Client{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewDeletedProtectionContainersClient creates a new instance of DeletedProtectionContainersClient. +func (c *ClientFactory) NewDeletedProtectionContainersClient() *DeletedProtectionContainersClient { + return &DeletedProtectionContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewExportJobsOperationResultsClient creates a new instance of ExportJobsOperationResultsClient. +func (c *ClientFactory) NewExportJobsOperationResultsClient() *ExportJobsOperationResultsClient { + return &ExportJobsOperationResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFeatureSupportClient creates a new instance of FeatureSupportClient. +func (c *ClientFactory) NewFeatureSupportClient() *FeatureSupportClient { + return &FeatureSupportClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewFetchTieringCostClient creates a new instance of FetchTieringCostClient. +func (c *ClientFactory) NewFetchTieringCostClient() *FetchTieringCostClient { + return &FetchTieringCostClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewGetTieringCostOperationResultClient creates a new instance of GetTieringCostOperationResultClient. +func (c *ClientFactory) NewGetTieringCostOperationResultClient() *GetTieringCostOperationResultClient { + return &GetTieringCostOperationResultClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewItemLevelRecoveryConnectionsClient creates a new instance of ItemLevelRecoveryConnectionsClient. +func (c *ClientFactory) NewItemLevelRecoveryConnectionsClient() *ItemLevelRecoveryConnectionsClient { + return &ItemLevelRecoveryConnectionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewJobCancellationsClient creates a new instance of JobCancellationsClient. +func (c *ClientFactory) NewJobCancellationsClient() *JobCancellationsClient { + return &JobCancellationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewJobDetailsClient creates a new instance of JobDetailsClient. +func (c *ClientFactory) NewJobDetailsClient() *JobDetailsClient { + return &JobDetailsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewJobOperationResultsClient creates a new instance of JobOperationResultsClient. +func (c *ClientFactory) NewJobOperationResultsClient() *JobOperationResultsClient { + return &JobOperationResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewJobsClient creates a new instance of JobsClient. +func (c *ClientFactory) NewJobsClient() *JobsClient { + return &JobsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationClient creates a new instance of OperationClient. +func (c *ClientFactory) NewOperationClient() *OperationClient { + return &OperationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewPrivateEndpointClient creates a new instance of PrivateEndpointClient. +func (c *ClientFactory) NewPrivateEndpointClient() *PrivateEndpointClient { + return &PrivateEndpointClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient. +func (c *ClientFactory) NewPrivateEndpointConnectionClient() *PrivateEndpointConnectionClient { + return &PrivateEndpointConnectionClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectableContainersClient creates a new instance of ProtectableContainersClient. +func (c *ClientFactory) NewProtectableContainersClient() *ProtectableContainersClient { + return &ProtectableContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectedItemOperationResultsClient creates a new instance of ProtectedItemOperationResultsClient. +func (c *ClientFactory) NewProtectedItemOperationResultsClient() *ProtectedItemOperationResultsClient { + return &ProtectedItemOperationResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectedItemOperationStatusesClient creates a new instance of ProtectedItemOperationStatusesClient. +func (c *ClientFactory) NewProtectedItemOperationStatusesClient() *ProtectedItemOperationStatusesClient { + return &ProtectedItemOperationStatusesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectedItemsClient creates a new instance of ProtectedItemsClient. +func (c *ClientFactory) NewProtectedItemsClient() *ProtectedItemsClient { + return &ProtectedItemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectionContainerOperationResultsClient creates a new instance of ProtectionContainerOperationResultsClient. +func (c *ClientFactory) NewProtectionContainerOperationResultsClient() *ProtectionContainerOperationResultsClient { + return &ProtectionContainerOperationResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectionContainerRefreshOperationResultsClient creates a new instance of ProtectionContainerRefreshOperationResultsClient. +func (c *ClientFactory) NewProtectionContainerRefreshOperationResultsClient() *ProtectionContainerRefreshOperationResultsClient { + return &ProtectionContainerRefreshOperationResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectionContainersClient creates a new instance of ProtectionContainersClient. +func (c *ClientFactory) NewProtectionContainersClient() *ProtectionContainersClient { + return &ProtectionContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectionIntentClient creates a new instance of ProtectionIntentClient. +func (c *ClientFactory) NewProtectionIntentClient() *ProtectionIntentClient { + return &ProtectionIntentClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectionPoliciesClient creates a new instance of ProtectionPoliciesClient. +func (c *ClientFactory) NewProtectionPoliciesClient() *ProtectionPoliciesClient { + return &ProtectionPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectionPolicyOperationResultsClient creates a new instance of ProtectionPolicyOperationResultsClient. +func (c *ClientFactory) NewProtectionPolicyOperationResultsClient() *ProtectionPolicyOperationResultsClient { + return &ProtectionPolicyOperationResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewProtectionPolicyOperationStatusesClient creates a new instance of ProtectionPolicyOperationStatusesClient. +func (c *ClientFactory) NewProtectionPolicyOperationStatusesClient() *ProtectionPolicyOperationStatusesClient { + return &ProtectionPolicyOperationStatusesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRecoveryPointsClient creates a new instance of RecoveryPointsClient. +func (c *ClientFactory) NewRecoveryPointsClient() *RecoveryPointsClient { + return &RecoveryPointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRecoveryPointsRecommendedForMoveClient creates a new instance of RecoveryPointsRecommendedForMoveClient. +func (c *ClientFactory) NewRecoveryPointsRecommendedForMoveClient() *RecoveryPointsRecommendedForMoveClient { + return &RecoveryPointsRecommendedForMoveClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewResourceGuardProxiesClient creates a new instance of ResourceGuardProxiesClient. +func (c *ClientFactory) NewResourceGuardProxiesClient() *ResourceGuardProxiesClient { + return &ResourceGuardProxiesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewResourceGuardProxyClient creates a new instance of ResourceGuardProxyClient. +func (c *ClientFactory) NewResourceGuardProxyClient() *ResourceGuardProxyClient { + return &ResourceGuardProxyClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRestoresClient creates a new instance of RestoresClient. +func (c *ClientFactory) NewRestoresClient() *RestoresClient { + return &RestoresClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSecurityPINsClient creates a new instance of SecurityPINsClient. +func (c *ClientFactory) NewSecurityPINsClient() *SecurityPINsClient { + return &SecurityPINsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTieringCostOperationStatusClient creates a new instance of TieringCostOperationStatusClient. +func (c *ClientFactory) NewTieringCostOperationStatusClient() *TieringCostOperationStatusClient { + return &TieringCostOperationStatusClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewValidateOperationClient creates a new instance of ValidateOperationClient. +func (c *ClientFactory) NewValidateOperationClient() *ValidateOperationClient { + return &ValidateOperationClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewValidateOperationResultsClient creates a new instance of ValidateOperationResultsClient. +func (c *ClientFactory) NewValidateOperationResultsClient() *ValidateOperationResultsClient { + return &ValidateOperationResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewValidateOperationStatusesClient creates a new instance of ValidateOperationStatusesClient. +func (c *ClientFactory) NewValidateOperationStatusesClient() *ValidateOperationStatusesClient { + return &ValidateOperationStatusesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/constants.go new file mode 100644 index 00000000..7bc98755 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/constants.go @@ -0,0 +1,1731 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup" + moduleVersion = "v4.2.0" +) + +// AcquireStorageAccountLock - Whether storage account lock is to be acquired for this container or not. +type AcquireStorageAccountLock string + +const ( + AcquireStorageAccountLockAcquire AcquireStorageAccountLock = "Acquire" + AcquireStorageAccountLockNotAcquire AcquireStorageAccountLock = "NotAcquire" +) + +// PossibleAcquireStorageAccountLockValues returns the possible values for the AcquireStorageAccountLock const type. +func PossibleAcquireStorageAccountLockValues() []AcquireStorageAccountLock { + return []AcquireStorageAccountLock{ + AcquireStorageAccountLockAcquire, + AcquireStorageAccountLockNotAcquire, + } +} + +// AzureFileShareType - File Share type XSync or XSMB. +type AzureFileShareType string + +const ( + AzureFileShareTypeInvalid AzureFileShareType = "Invalid" + AzureFileShareTypeXSMB AzureFileShareType = "XSMB" + AzureFileShareTypeXSync AzureFileShareType = "XSync" +) + +// PossibleAzureFileShareTypeValues returns the possible values for the AzureFileShareType const type. +func PossibleAzureFileShareTypeValues() []AzureFileShareType { + return []AzureFileShareType{ + AzureFileShareTypeInvalid, + AzureFileShareTypeXSMB, + AzureFileShareTypeXSync, + } +} + +// BackupEngineType - Type of the backup engine. +type BackupEngineType string + +const ( + BackupEngineTypeAzureBackupServerEngine BackupEngineType = "AzureBackupServerEngine" + BackupEngineTypeDpmBackupEngine BackupEngineType = "DpmBackupEngine" + BackupEngineTypeInvalid BackupEngineType = "Invalid" +) + +// PossibleBackupEngineTypeValues returns the possible values for the BackupEngineType const type. +func PossibleBackupEngineTypeValues() []BackupEngineType { + return []BackupEngineType{ + BackupEngineTypeAzureBackupServerEngine, + BackupEngineTypeDpmBackupEngine, + BackupEngineTypeInvalid, + } +} + +// BackupItemType - Type of backup items associated with this container. +type BackupItemType string + +const ( + BackupItemTypeAzureFileShare BackupItemType = "AzureFileShare" + BackupItemTypeAzureSQLDb BackupItemType = "AzureSqlDb" + BackupItemTypeClient BackupItemType = "Client" + BackupItemTypeExchange BackupItemType = "Exchange" + BackupItemTypeFileFolder BackupItemType = "FileFolder" + BackupItemTypeGenericDataSource BackupItemType = "GenericDataSource" + BackupItemTypeInvalid BackupItemType = "Invalid" + BackupItemTypeSAPAseDatabase BackupItemType = "SAPAseDatabase" + BackupItemTypeSAPHanaDBInstance BackupItemType = "SAPHanaDBInstance" + BackupItemTypeSAPHanaDatabase BackupItemType = "SAPHanaDatabase" + BackupItemTypeSQLDB BackupItemType = "SQLDB" + BackupItemTypeSQLDataBase BackupItemType = "SQLDataBase" + BackupItemTypeSharepoint BackupItemType = "Sharepoint" + BackupItemTypeSystemState BackupItemType = "SystemState" + BackupItemTypeVM BackupItemType = "VM" + BackupItemTypeVMwareVM BackupItemType = "VMwareVM" +) + +// PossibleBackupItemTypeValues returns the possible values for the BackupItemType const type. +func PossibleBackupItemTypeValues() []BackupItemType { + return []BackupItemType{ + BackupItemTypeAzureFileShare, + BackupItemTypeAzureSQLDb, + BackupItemTypeClient, + BackupItemTypeExchange, + BackupItemTypeFileFolder, + BackupItemTypeGenericDataSource, + BackupItemTypeInvalid, + BackupItemTypeSAPAseDatabase, + BackupItemTypeSAPHanaDBInstance, + BackupItemTypeSAPHanaDatabase, + BackupItemTypeSQLDB, + BackupItemTypeSQLDataBase, + BackupItemTypeSharepoint, + BackupItemTypeSystemState, + BackupItemTypeVM, + BackupItemTypeVMwareVM, + } +} + +// BackupManagementType - Backup management type to execute the current job. +type BackupManagementType string + +const ( + BackupManagementTypeAzureBackupServer BackupManagementType = "AzureBackupServer" + BackupManagementTypeAzureIaasVM BackupManagementType = "AzureIaasVM" + BackupManagementTypeAzureSQL BackupManagementType = "AzureSql" + BackupManagementTypeAzureStorage BackupManagementType = "AzureStorage" + BackupManagementTypeAzureWorkload BackupManagementType = "AzureWorkload" + BackupManagementTypeDPM BackupManagementType = "DPM" + BackupManagementTypeDefaultBackup BackupManagementType = "DefaultBackup" + BackupManagementTypeInvalid BackupManagementType = "Invalid" + BackupManagementTypeMAB BackupManagementType = "MAB" +) + +// PossibleBackupManagementTypeValues returns the possible values for the BackupManagementType const type. +func PossibleBackupManagementTypeValues() []BackupManagementType { + return []BackupManagementType{ + BackupManagementTypeAzureBackupServer, + BackupManagementTypeAzureIaasVM, + BackupManagementTypeAzureSQL, + BackupManagementTypeAzureStorage, + BackupManagementTypeAzureWorkload, + BackupManagementTypeDPM, + BackupManagementTypeDefaultBackup, + BackupManagementTypeInvalid, + BackupManagementTypeMAB, + } +} + +// BackupType - Type of backup, viz. Full, Differential, Log or CopyOnlyFull +type BackupType string + +const ( + BackupTypeCopyOnlyFull BackupType = "CopyOnlyFull" + BackupTypeDifferential BackupType = "Differential" + BackupTypeFull BackupType = "Full" + BackupTypeIncremental BackupType = "Incremental" + BackupTypeInvalid BackupType = "Invalid" + BackupTypeLog BackupType = "Log" + BackupTypeSnapshotCopyOnlyFull BackupType = "SnapshotCopyOnlyFull" + BackupTypeSnapshotFull BackupType = "SnapshotFull" +) + +// PossibleBackupTypeValues returns the possible values for the BackupType const type. +func PossibleBackupTypeValues() []BackupType { + return []BackupType{ + BackupTypeCopyOnlyFull, + BackupTypeDifferential, + BackupTypeFull, + BackupTypeIncremental, + BackupTypeInvalid, + BackupTypeLog, + BackupTypeSnapshotCopyOnlyFull, + BackupTypeSnapshotFull, + } +} + +// ContainerType - Type of container for filter +type ContainerType string + +const ( + ContainerTypeAzureBackupServerContainer ContainerType = "AzureBackupServerContainer" + ContainerTypeAzureSQLContainer ContainerType = "AzureSqlContainer" + ContainerTypeCluster ContainerType = "Cluster" + ContainerTypeDPMContainer ContainerType = "DPMContainer" + ContainerTypeGenericContainer ContainerType = "GenericContainer" + ContainerTypeHanaHSRContainer ContainerType = "HanaHSRContainer" + ContainerTypeIaasVMContainer ContainerType = "IaasVMContainer" + ContainerTypeIaasVMServiceContainer ContainerType = "IaasVMServiceContainer" + ContainerTypeInvalid ContainerType = "Invalid" + ContainerTypeMABContainer ContainerType = "MABContainer" + ContainerTypeSQLAGWorkLoadContainer ContainerType = "SQLAGWorkLoadContainer" + ContainerTypeStorageContainer ContainerType = "StorageContainer" + ContainerTypeUnknown ContainerType = "Unknown" + ContainerTypeVCenter ContainerType = "VCenter" + ContainerTypeVMAppContainer ContainerType = "VMAppContainer" + ContainerTypeWindows ContainerType = "Windows" +) + +// PossibleContainerTypeValues returns the possible values for the ContainerType const type. +func PossibleContainerTypeValues() []ContainerType { + return []ContainerType{ + ContainerTypeAzureBackupServerContainer, + ContainerTypeAzureSQLContainer, + ContainerTypeCluster, + ContainerTypeDPMContainer, + ContainerTypeGenericContainer, + ContainerTypeHanaHSRContainer, + ContainerTypeIaasVMContainer, + ContainerTypeIaasVMServiceContainer, + ContainerTypeInvalid, + ContainerTypeMABContainer, + ContainerTypeSQLAGWorkLoadContainer, + ContainerTypeStorageContainer, + ContainerTypeUnknown, + ContainerTypeVCenter, + ContainerTypeVMAppContainer, + ContainerTypeWindows, + } +} + +// CopyOptions - Options to resolve copy conflicts. +type CopyOptions string + +const ( + CopyOptionsCreateCopy CopyOptions = "CreateCopy" + CopyOptionsFailOnConflict CopyOptions = "FailOnConflict" + CopyOptionsInvalid CopyOptions = "Invalid" + CopyOptionsOverwrite CopyOptions = "Overwrite" + CopyOptionsSkip CopyOptions = "Skip" +) + +// PossibleCopyOptionsValues returns the possible values for the CopyOptions const type. +func PossibleCopyOptionsValues() []CopyOptions { + return []CopyOptions{ + CopyOptionsCreateCopy, + CopyOptionsFailOnConflict, + CopyOptionsInvalid, + CopyOptionsOverwrite, + CopyOptionsSkip, + } +} + +// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. +type CreateMode string + +const ( + CreateModeDefault CreateMode = "Default" + CreateModeInvalid CreateMode = "Invalid" + CreateModeRecover CreateMode = "Recover" +) + +// PossibleCreateModeValues returns the possible values for the CreateMode const type. +func PossibleCreateModeValues() []CreateMode { + return []CreateMode{ + CreateModeDefault, + CreateModeInvalid, + CreateModeRecover, + } +} + +// DataMoveLevel - DataMove Level +type DataMoveLevel string + +const ( + DataMoveLevelContainer DataMoveLevel = "Container" + DataMoveLevelInvalid DataMoveLevel = "Invalid" + DataMoveLevelVault DataMoveLevel = "Vault" +) + +// PossibleDataMoveLevelValues returns the possible values for the DataMoveLevel const type. +func PossibleDataMoveLevelValues() []DataMoveLevel { + return []DataMoveLevel{ + DataMoveLevelContainer, + DataMoveLevelInvalid, + DataMoveLevelVault, + } +} + +// DataSourceType - Type of workload this item represents. +type DataSourceType string + +const ( + DataSourceTypeAzureFileShare DataSourceType = "AzureFileShare" + DataSourceTypeAzureSQLDb DataSourceType = "AzureSqlDb" + DataSourceTypeClient DataSourceType = "Client" + DataSourceTypeExchange DataSourceType = "Exchange" + DataSourceTypeFileFolder DataSourceType = "FileFolder" + DataSourceTypeGenericDataSource DataSourceType = "GenericDataSource" + DataSourceTypeInvalid DataSourceType = "Invalid" + DataSourceTypeSAPAseDatabase DataSourceType = "SAPAseDatabase" + DataSourceTypeSAPHanaDBInstance DataSourceType = "SAPHanaDBInstance" + DataSourceTypeSAPHanaDatabase DataSourceType = "SAPHanaDatabase" + DataSourceTypeSQLDB DataSourceType = "SQLDB" + DataSourceTypeSQLDataBase DataSourceType = "SQLDataBase" + DataSourceTypeSharepoint DataSourceType = "Sharepoint" + DataSourceTypeSystemState DataSourceType = "SystemState" + DataSourceTypeVM DataSourceType = "VM" + DataSourceTypeVMwareVM DataSourceType = "VMwareVM" +) + +// PossibleDataSourceTypeValues returns the possible values for the DataSourceType const type. +func PossibleDataSourceTypeValues() []DataSourceType { + return []DataSourceType{ + DataSourceTypeAzureFileShare, + DataSourceTypeAzureSQLDb, + DataSourceTypeClient, + DataSourceTypeExchange, + DataSourceTypeFileFolder, + DataSourceTypeGenericDataSource, + DataSourceTypeInvalid, + DataSourceTypeSAPAseDatabase, + DataSourceTypeSAPHanaDBInstance, + DataSourceTypeSAPHanaDatabase, + DataSourceTypeSQLDB, + DataSourceTypeSQLDataBase, + DataSourceTypeSharepoint, + DataSourceTypeSystemState, + DataSourceTypeVM, + DataSourceTypeVMwareVM, + } +} + +type DayOfWeek string + +const ( + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{ + DayOfWeekFriday, + DayOfWeekMonday, + DayOfWeekSaturday, + DayOfWeekSunday, + DayOfWeekThursday, + DayOfWeekTuesday, + DayOfWeekWednesday, + } +} + +// DedupState - Vault Dedup state +type DedupState string + +const ( + DedupStateDisabled DedupState = "Disabled" + DedupStateEnabled DedupState = "Enabled" + DedupStateInvalid DedupState = "Invalid" +) + +// PossibleDedupStateValues returns the possible values for the DedupState const type. +func PossibleDedupStateValues() []DedupState { + return []DedupState{ + DedupStateDisabled, + DedupStateEnabled, + DedupStateInvalid, + } +} + +// EncryptionAtRestType - Encryption At Rest Type +type EncryptionAtRestType string + +const ( + EncryptionAtRestTypeCustomerManaged EncryptionAtRestType = "CustomerManaged" + EncryptionAtRestTypeInvalid EncryptionAtRestType = "Invalid" + EncryptionAtRestTypeMicrosoftManaged EncryptionAtRestType = "MicrosoftManaged" +) + +// PossibleEncryptionAtRestTypeValues returns the possible values for the EncryptionAtRestType const type. +func PossibleEncryptionAtRestTypeValues() []EncryptionAtRestType { + return []EncryptionAtRestType{ + EncryptionAtRestTypeCustomerManaged, + EncryptionAtRestTypeInvalid, + EncryptionAtRestTypeMicrosoftManaged, + } +} + +// EnhancedSecurityState - Enabled or Disabled. +type EnhancedSecurityState string + +const ( + EnhancedSecurityStateDisabled EnhancedSecurityState = "Disabled" + EnhancedSecurityStateEnabled EnhancedSecurityState = "Enabled" + EnhancedSecurityStateInvalid EnhancedSecurityState = "Invalid" +) + +// PossibleEnhancedSecurityStateValues returns the possible values for the EnhancedSecurityState const type. +func PossibleEnhancedSecurityStateValues() []EnhancedSecurityState { + return []EnhancedSecurityState{ + EnhancedSecurityStateDisabled, + EnhancedSecurityStateEnabled, + EnhancedSecurityStateInvalid, + } +} + +// FabricName - Specifies the fabric name - Azure or AD +type FabricName string + +const ( + FabricNameAzure FabricName = "Azure" + FabricNameInvalid FabricName = "Invalid" +) + +// PossibleFabricNameValues returns the possible values for the FabricName const type. +func PossibleFabricNameValues() []FabricName { + return []FabricName{ + FabricNameAzure, + FabricNameInvalid, + } +} + +// HTTPStatusCode - HTTP Status Code of the operation. +type HTTPStatusCode string + +const ( + HTTPStatusCodeAccepted HTTPStatusCode = "Accepted" + HTTPStatusCodeAmbiguous HTTPStatusCode = "Ambiguous" + HTTPStatusCodeBadGateway HTTPStatusCode = "BadGateway" + HTTPStatusCodeBadRequest HTTPStatusCode = "BadRequest" + HTTPStatusCodeConflict HTTPStatusCode = "Conflict" + HTTPStatusCodeContinue HTTPStatusCode = "Continue" + HTTPStatusCodeCreated HTTPStatusCode = "Created" + HTTPStatusCodeExpectationFailed HTTPStatusCode = "ExpectationFailed" + HTTPStatusCodeForbidden HTTPStatusCode = "Forbidden" + HTTPStatusCodeFound HTTPStatusCode = "Found" + HTTPStatusCodeGatewayTimeout HTTPStatusCode = "GatewayTimeout" + HTTPStatusCodeGone HTTPStatusCode = "Gone" + HTTPStatusCodeHTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported" + HTTPStatusCodeInternalServerError HTTPStatusCode = "InternalServerError" + HTTPStatusCodeLengthRequired HTTPStatusCode = "LengthRequired" + HTTPStatusCodeMethodNotAllowed HTTPStatusCode = "MethodNotAllowed" + HTTPStatusCodeMoved HTTPStatusCode = "Moved" + HTTPStatusCodeMovedPermanently HTTPStatusCode = "MovedPermanently" + HTTPStatusCodeMultipleChoices HTTPStatusCode = "MultipleChoices" + HTTPStatusCodeNoContent HTTPStatusCode = "NoContent" + HTTPStatusCodeNonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation" + HTTPStatusCodeNotAcceptable HTTPStatusCode = "NotAcceptable" + HTTPStatusCodeNotFound HTTPStatusCode = "NotFound" + HTTPStatusCodeNotImplemented HTTPStatusCode = "NotImplemented" + HTTPStatusCodeNotModified HTTPStatusCode = "NotModified" + HTTPStatusCodeOK HTTPStatusCode = "OK" + HTTPStatusCodePartialContent HTTPStatusCode = "PartialContent" + HTTPStatusCodePaymentRequired HTTPStatusCode = "PaymentRequired" + HTTPStatusCodePreconditionFailed HTTPStatusCode = "PreconditionFailed" + HTTPStatusCodeProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired" + HTTPStatusCodeRedirect HTTPStatusCode = "Redirect" + HTTPStatusCodeRedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb" + HTTPStatusCodeRedirectMethod HTTPStatusCode = "RedirectMethod" + HTTPStatusCodeRequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge" + HTTPStatusCodeRequestTimeout HTTPStatusCode = "RequestTimeout" + HTTPStatusCodeRequestURITooLong HTTPStatusCode = "RequestUriTooLong" + HTTPStatusCodeRequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable" + HTTPStatusCodeResetContent HTTPStatusCode = "ResetContent" + HTTPStatusCodeSeeOther HTTPStatusCode = "SeeOther" + HTTPStatusCodeServiceUnavailable HTTPStatusCode = "ServiceUnavailable" + HTTPStatusCodeSwitchingProtocols HTTPStatusCode = "SwitchingProtocols" + HTTPStatusCodeTemporaryRedirect HTTPStatusCode = "TemporaryRedirect" + HTTPStatusCodeUnauthorized HTTPStatusCode = "Unauthorized" + HTTPStatusCodeUnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType" + HTTPStatusCodeUnused HTTPStatusCode = "Unused" + HTTPStatusCodeUpgradeRequired HTTPStatusCode = "UpgradeRequired" + HTTPStatusCodeUseProxy HTTPStatusCode = "UseProxy" +) + +// PossibleHTTPStatusCodeValues returns the possible values for the HTTPStatusCode const type. +func PossibleHTTPStatusCodeValues() []HTTPStatusCode { + return []HTTPStatusCode{ + HTTPStatusCodeAccepted, + HTTPStatusCodeAmbiguous, + HTTPStatusCodeBadGateway, + HTTPStatusCodeBadRequest, + HTTPStatusCodeConflict, + HTTPStatusCodeContinue, + HTTPStatusCodeCreated, + HTTPStatusCodeExpectationFailed, + HTTPStatusCodeForbidden, + HTTPStatusCodeFound, + HTTPStatusCodeGatewayTimeout, + HTTPStatusCodeGone, + HTTPStatusCodeHTTPVersionNotSupported, + HTTPStatusCodeInternalServerError, + HTTPStatusCodeLengthRequired, + HTTPStatusCodeMethodNotAllowed, + HTTPStatusCodeMoved, + HTTPStatusCodeMovedPermanently, + HTTPStatusCodeMultipleChoices, + HTTPStatusCodeNoContent, + HTTPStatusCodeNonAuthoritativeInformation, + HTTPStatusCodeNotAcceptable, + HTTPStatusCodeNotFound, + HTTPStatusCodeNotImplemented, + HTTPStatusCodeNotModified, + HTTPStatusCodeOK, + HTTPStatusCodePartialContent, + HTTPStatusCodePaymentRequired, + HTTPStatusCodePreconditionFailed, + HTTPStatusCodeProxyAuthenticationRequired, + HTTPStatusCodeRedirect, + HTTPStatusCodeRedirectKeepVerb, + HTTPStatusCodeRedirectMethod, + HTTPStatusCodeRequestEntityTooLarge, + HTTPStatusCodeRequestTimeout, + HTTPStatusCodeRequestURITooLong, + HTTPStatusCodeRequestedRangeNotSatisfiable, + HTTPStatusCodeResetContent, + HTTPStatusCodeSeeOther, + HTTPStatusCodeServiceUnavailable, + HTTPStatusCodeSwitchingProtocols, + HTTPStatusCodeTemporaryRedirect, + HTTPStatusCodeUnauthorized, + HTTPStatusCodeUnsupportedMediaType, + HTTPStatusCodeUnused, + HTTPStatusCodeUpgradeRequired, + HTTPStatusCodeUseProxy, + } +} + +// HealthState - Health State for the backed up item. +type HealthState string + +const ( + HealthStateActionRequired HealthState = "ActionRequired" + HealthStateActionSuggested HealthState = "ActionSuggested" + HealthStateInvalid HealthState = "Invalid" + HealthStatePassed HealthState = "Passed" +) + +// PossibleHealthStateValues returns the possible values for the HealthState const type. +func PossibleHealthStateValues() []HealthState { + return []HealthState{ + HealthStateActionRequired, + HealthStateActionSuggested, + HealthStateInvalid, + HealthStatePassed, + } +} + +// HealthStatus - Health status of protected item. +type HealthStatus string + +const ( + HealthStatusActionRequired HealthStatus = "ActionRequired" + HealthStatusActionSuggested HealthStatus = "ActionSuggested" + HealthStatusInvalid HealthStatus = "Invalid" + HealthStatusPassed HealthStatus = "Passed" +) + +// PossibleHealthStatusValues returns the possible values for the HealthStatus const type. +func PossibleHealthStatusValues() []HealthStatus { + return []HealthStatus{ + HealthStatusActionRequired, + HealthStatusActionSuggested, + HealthStatusInvalid, + HealthStatusPassed, + } +} + +type IAASVMPolicyType string + +const ( + IAASVMPolicyTypeInvalid IAASVMPolicyType = "Invalid" + IAASVMPolicyTypeV1 IAASVMPolicyType = "V1" + IAASVMPolicyTypeV2 IAASVMPolicyType = "V2" +) + +// PossibleIAASVMPolicyTypeValues returns the possible values for the IAASVMPolicyType const type. +func PossibleIAASVMPolicyTypeValues() []IAASVMPolicyType { + return []IAASVMPolicyType{ + IAASVMPolicyTypeInvalid, + IAASVMPolicyTypeV1, + IAASVMPolicyTypeV2, + } +} + +type IaasVMSnapshotConsistencyType string + +const ( + IaasVMSnapshotConsistencyTypeOnlyCrashConsistent IaasVMSnapshotConsistencyType = "OnlyCrashConsistent" +) + +// PossibleIaasVMSnapshotConsistencyTypeValues returns the possible values for the IaasVMSnapshotConsistencyType const type. +func PossibleIaasVMSnapshotConsistencyTypeValues() []IaasVMSnapshotConsistencyType { + return []IaasVMSnapshotConsistencyType{ + IaasVMSnapshotConsistencyTypeOnlyCrashConsistent, + } +} + +type InfrastructureEncryptionState string + +const ( + InfrastructureEncryptionStateDisabled InfrastructureEncryptionState = "Disabled" + InfrastructureEncryptionStateEnabled InfrastructureEncryptionState = "Enabled" + InfrastructureEncryptionStateInvalid InfrastructureEncryptionState = "Invalid" +) + +// PossibleInfrastructureEncryptionStateValues returns the possible values for the InfrastructureEncryptionState const type. +func PossibleInfrastructureEncryptionStateValues() []InfrastructureEncryptionState { + return []InfrastructureEncryptionState{ + InfrastructureEncryptionStateDisabled, + InfrastructureEncryptionStateEnabled, + InfrastructureEncryptionStateInvalid, + } +} + +// InquiryStatus - Status of protectable item, i.e. InProgress,Succeeded,Failed +type InquiryStatus string + +const ( + InquiryStatusFailed InquiryStatus = "Failed" + InquiryStatusInvalid InquiryStatus = "Invalid" + InquiryStatusSuccess InquiryStatus = "Success" +) + +// PossibleInquiryStatusValues returns the possible values for the InquiryStatus const type. +func PossibleInquiryStatusValues() []InquiryStatus { + return []InquiryStatus{ + InquiryStatusFailed, + InquiryStatusInvalid, + InquiryStatusSuccess, + } +} + +// IntentItemType - Type of workload this item represents +type IntentItemType string + +const ( + IntentItemTypeInvalid IntentItemType = "Invalid" + IntentItemTypeSQLAvailabilityGroupContainer IntentItemType = "SQLAvailabilityGroupContainer" + IntentItemTypeSQLInstance IntentItemType = "SQLInstance" +) + +// PossibleIntentItemTypeValues returns the possible values for the IntentItemType const type. +func PossibleIntentItemTypeValues() []IntentItemType { + return []IntentItemType{ + IntentItemTypeInvalid, + IntentItemTypeSQLAvailabilityGroupContainer, + IntentItemTypeSQLInstance, + } +} + +// JobOperationType - Type of operation. +type JobOperationType string + +const ( + JobOperationTypeBackup JobOperationType = "Backup" + JobOperationTypeConfigureBackup JobOperationType = "ConfigureBackup" + JobOperationTypeCrossRegionRestore JobOperationType = "CrossRegionRestore" + JobOperationTypeDeleteBackupData JobOperationType = "DeleteBackupData" + JobOperationTypeDisableBackup JobOperationType = "DisableBackup" + JobOperationTypeInvalid JobOperationType = "Invalid" + JobOperationTypeRegister JobOperationType = "Register" + JobOperationTypeRestore JobOperationType = "Restore" + JobOperationTypeUnRegister JobOperationType = "UnRegister" + JobOperationTypeUndelete JobOperationType = "Undelete" + JobOperationTypeUpdateCustomerManagedKey JobOperationType = "UpdateCustomerManagedKey" +) + +// PossibleJobOperationTypeValues returns the possible values for the JobOperationType const type. +func PossibleJobOperationTypeValues() []JobOperationType { + return []JobOperationType{ + JobOperationTypeBackup, + JobOperationTypeConfigureBackup, + JobOperationTypeCrossRegionRestore, + JobOperationTypeDeleteBackupData, + JobOperationTypeDisableBackup, + JobOperationTypeInvalid, + JobOperationTypeRegister, + JobOperationTypeRestore, + JobOperationTypeUnRegister, + JobOperationTypeUndelete, + JobOperationTypeUpdateCustomerManagedKey, + } +} + +// JobStatus - Status of the job. +type JobStatus string + +const ( + JobStatusCancelled JobStatus = "Cancelled" + JobStatusCancelling JobStatus = "Cancelling" + JobStatusCompleted JobStatus = "Completed" + JobStatusCompletedWithWarnings JobStatus = "CompletedWithWarnings" + JobStatusFailed JobStatus = "Failed" + JobStatusInProgress JobStatus = "InProgress" + JobStatusInvalid JobStatus = "Invalid" +) + +// PossibleJobStatusValues returns the possible values for the JobStatus const type. +func PossibleJobStatusValues() []JobStatus { + return []JobStatus{ + JobStatusCancelled, + JobStatusCancelling, + JobStatusCompleted, + JobStatusCompletedWithWarnings, + JobStatusFailed, + JobStatusInProgress, + JobStatusInvalid, + } +} + +type JobSupportedAction string + +const ( + JobSupportedActionCancellable JobSupportedAction = "Cancellable" + JobSupportedActionInvalid JobSupportedAction = "Invalid" + JobSupportedActionRetriable JobSupportedAction = "Retriable" +) + +// PossibleJobSupportedActionValues returns the possible values for the JobSupportedAction const type. +func PossibleJobSupportedActionValues() []JobSupportedAction { + return []JobSupportedAction{ + JobSupportedActionCancellable, + JobSupportedActionInvalid, + JobSupportedActionRetriable, + } +} + +// LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. +type LastBackupStatus string + +const ( + LastBackupStatusHealthy LastBackupStatus = "Healthy" + LastBackupStatusIRPending LastBackupStatus = "IRPending" + LastBackupStatusInvalid LastBackupStatus = "Invalid" + LastBackupStatusUnhealthy LastBackupStatus = "Unhealthy" +) + +// PossibleLastBackupStatusValues returns the possible values for the LastBackupStatus const type. +func PossibleLastBackupStatusValues() []LastBackupStatus { + return []LastBackupStatus{ + LastBackupStatusHealthy, + LastBackupStatusIRPending, + LastBackupStatusInvalid, + LastBackupStatusUnhealthy, + } +} + +type LastUpdateStatus string + +const ( + LastUpdateStatusFailed LastUpdateStatus = "Failed" + LastUpdateStatusFirstInitialization LastUpdateStatus = "FirstInitialization" + LastUpdateStatusInitialized LastUpdateStatus = "Initialized" + LastUpdateStatusInvalid LastUpdateStatus = "Invalid" + LastUpdateStatusNotEnabled LastUpdateStatus = "NotEnabled" + LastUpdateStatusPartiallyFailed LastUpdateStatus = "PartiallyFailed" + LastUpdateStatusPartiallySucceeded LastUpdateStatus = "PartiallySucceeded" + LastUpdateStatusSucceeded LastUpdateStatus = "Succeeded" +) + +// PossibleLastUpdateStatusValues returns the possible values for the LastUpdateStatus const type. +func PossibleLastUpdateStatusValues() []LastUpdateStatus { + return []LastUpdateStatus{ + LastUpdateStatusFailed, + LastUpdateStatusFirstInitialization, + LastUpdateStatusInitialized, + LastUpdateStatusInvalid, + LastUpdateStatusNotEnabled, + LastUpdateStatusPartiallyFailed, + LastUpdateStatusPartiallySucceeded, + LastUpdateStatusSucceeded, + } +} + +// MabServerType - Server type of MAB container. +type MabServerType string + +const ( + MabServerTypeAzureBackupServerContainer MabServerType = "AzureBackupServerContainer" + MabServerTypeAzureSQLContainer MabServerType = "AzureSqlContainer" + MabServerTypeCluster MabServerType = "Cluster" + MabServerTypeDPMContainer MabServerType = "DPMContainer" + MabServerTypeGenericContainer MabServerType = "GenericContainer" + MabServerTypeIaasVMContainer MabServerType = "IaasVMContainer" + MabServerTypeIaasVMServiceContainer MabServerType = "IaasVMServiceContainer" + MabServerTypeInvalid MabServerType = "Invalid" + MabServerTypeMABContainer MabServerType = "MABContainer" + MabServerTypeSQLAGWorkLoadContainer MabServerType = "SQLAGWorkLoadContainer" + MabServerTypeStorageContainer MabServerType = "StorageContainer" + MabServerTypeUnknown MabServerType = "Unknown" + MabServerTypeVCenter MabServerType = "VCenter" + MabServerTypeVMAppContainer MabServerType = "VMAppContainer" + MabServerTypeWindows MabServerType = "Windows" +) + +// PossibleMabServerTypeValues returns the possible values for the MabServerType const type. +func PossibleMabServerTypeValues() []MabServerType { + return []MabServerType{ + MabServerTypeAzureBackupServerContainer, + MabServerTypeAzureSQLContainer, + MabServerTypeCluster, + MabServerTypeDPMContainer, + MabServerTypeGenericContainer, + MabServerTypeIaasVMContainer, + MabServerTypeIaasVMServiceContainer, + MabServerTypeInvalid, + MabServerTypeMABContainer, + MabServerTypeSQLAGWorkLoadContainer, + MabServerTypeStorageContainer, + MabServerTypeUnknown, + MabServerTypeVCenter, + MabServerTypeVMAppContainer, + MabServerTypeWindows, + } +} + +type MonthOfYear string + +const ( + MonthOfYearApril MonthOfYear = "April" + MonthOfYearAugust MonthOfYear = "August" + MonthOfYearDecember MonthOfYear = "December" + MonthOfYearFebruary MonthOfYear = "February" + MonthOfYearInvalid MonthOfYear = "Invalid" + MonthOfYearJanuary MonthOfYear = "January" + MonthOfYearJuly MonthOfYear = "July" + MonthOfYearJune MonthOfYear = "June" + MonthOfYearMarch MonthOfYear = "March" + MonthOfYearMay MonthOfYear = "May" + MonthOfYearNovember MonthOfYear = "November" + MonthOfYearOctober MonthOfYear = "October" + MonthOfYearSeptember MonthOfYear = "September" +) + +// PossibleMonthOfYearValues returns the possible values for the MonthOfYear const type. +func PossibleMonthOfYearValues() []MonthOfYear { + return []MonthOfYear{ + MonthOfYearApril, + MonthOfYearAugust, + MonthOfYearDecember, + MonthOfYearFebruary, + MonthOfYearInvalid, + MonthOfYearJanuary, + MonthOfYearJuly, + MonthOfYearJune, + MonthOfYearMarch, + MonthOfYearMay, + MonthOfYearNovember, + MonthOfYearOctober, + MonthOfYearSeptember, + } +} + +// OperationStatusValues - Operation status. +type OperationStatusValues string + +const ( + OperationStatusValuesCanceled OperationStatusValues = "Canceled" + OperationStatusValuesFailed OperationStatusValues = "Failed" + OperationStatusValuesInProgress OperationStatusValues = "InProgress" + OperationStatusValuesInvalid OperationStatusValues = "Invalid" + OperationStatusValuesSucceeded OperationStatusValues = "Succeeded" +) + +// PossibleOperationStatusValuesValues returns the possible values for the OperationStatusValues const type. +func PossibleOperationStatusValuesValues() []OperationStatusValues { + return []OperationStatusValues{ + OperationStatusValuesCanceled, + OperationStatusValuesFailed, + OperationStatusValuesInProgress, + OperationStatusValuesInvalid, + OperationStatusValuesSucceeded, + } +} + +// OperationType - Re-Do Operation +type OperationType string + +const ( + OperationTypeInvalid OperationType = "Invalid" + OperationTypeRegister OperationType = "Register" + OperationTypeRehydrate OperationType = "Rehydrate" + OperationTypeReregister OperationType = "Reregister" +) + +// PossibleOperationTypeValues returns the possible values for the OperationType const type. +func PossibleOperationTypeValues() []OperationType { + return []OperationType{ + OperationTypeInvalid, + OperationTypeRegister, + OperationTypeRehydrate, + OperationTypeReregister, + } +} + +// OverwriteOptions - Can Overwrite if Target DataBase already exists +type OverwriteOptions string + +const ( + OverwriteOptionsFailOnConflict OverwriteOptions = "FailOnConflict" + OverwriteOptionsInvalid OverwriteOptions = "Invalid" + OverwriteOptionsOverwrite OverwriteOptions = "Overwrite" +) + +// PossibleOverwriteOptionsValues returns the possible values for the OverwriteOptions const type. +func PossibleOverwriteOptionsValues() []OverwriteOptions { + return []OverwriteOptions{ + OverwriteOptionsFailOnConflict, + OverwriteOptionsInvalid, + OverwriteOptionsOverwrite, + } +} + +// PolicyType - Type of backup policy type +type PolicyType string + +const ( + PolicyTypeCopyOnlyFull PolicyType = "CopyOnlyFull" + PolicyTypeDifferential PolicyType = "Differential" + PolicyTypeFull PolicyType = "Full" + PolicyTypeIncremental PolicyType = "Incremental" + PolicyTypeInvalid PolicyType = "Invalid" + PolicyTypeLog PolicyType = "Log" + PolicyTypeSnapshotCopyOnlyFull PolicyType = "SnapshotCopyOnlyFull" + PolicyTypeSnapshotFull PolicyType = "SnapshotFull" +) + +// PossiblePolicyTypeValues returns the possible values for the PolicyType const type. +func PossiblePolicyTypeValues() []PolicyType { + return []PolicyType{ + PolicyTypeCopyOnlyFull, + PolicyTypeDifferential, + PolicyTypeFull, + PolicyTypeIncremental, + PolicyTypeInvalid, + PolicyTypeLog, + PolicyTypeSnapshotCopyOnlyFull, + PolicyTypeSnapshotFull, + } +} + +// PrivateEndpointConnectionStatus - Gets or sets the status +type PrivateEndpointConnectionStatus string + +const ( + PrivateEndpointConnectionStatusApproved PrivateEndpointConnectionStatus = "Approved" + PrivateEndpointConnectionStatusDisconnected PrivateEndpointConnectionStatus = "Disconnected" + PrivateEndpointConnectionStatusPending PrivateEndpointConnectionStatus = "Pending" + PrivateEndpointConnectionStatusRejected PrivateEndpointConnectionStatus = "Rejected" +) + +// PossiblePrivateEndpointConnectionStatusValues returns the possible values for the PrivateEndpointConnectionStatus const type. +func PossiblePrivateEndpointConnectionStatusValues() []PrivateEndpointConnectionStatus { + return []PrivateEndpointConnectionStatus{ + PrivateEndpointConnectionStatusApproved, + PrivateEndpointConnectionStatusDisconnected, + PrivateEndpointConnectionStatusPending, + PrivateEndpointConnectionStatusRejected, + } +} + +// ProtectableContainerType - Type of the container. The value of this property for +// 1. Compute Azure VM is Microsoft.Compute/virtualMachines +// 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines +type ProtectableContainerType string + +const ( + ProtectableContainerTypeAzureBackupServerContainer ProtectableContainerType = "AzureBackupServerContainer" + ProtectableContainerTypeAzureSQLContainer ProtectableContainerType = "AzureSqlContainer" + ProtectableContainerTypeAzureWorkloadContainer ProtectableContainerType = "AzureWorkloadContainer" + ProtectableContainerTypeCluster ProtectableContainerType = "Cluster" + ProtectableContainerTypeDPMContainer ProtectableContainerType = "DPMContainer" + ProtectableContainerTypeGenericContainer ProtectableContainerType = "GenericContainer" + ProtectableContainerTypeIaasVMContainer ProtectableContainerType = "IaasVMContainer" + ProtectableContainerTypeIaasVMServiceContainer ProtectableContainerType = "IaasVMServiceContainer" + ProtectableContainerTypeInvalid ProtectableContainerType = "Invalid" + ProtectableContainerTypeMABContainer ProtectableContainerType = "MABContainer" + ProtectableContainerTypeMicrosoftClassicComputeVirtualMachines ProtectableContainerType = "Microsoft.ClassicCompute/virtualMachines" + ProtectableContainerTypeMicrosoftComputeVirtualMachines ProtectableContainerType = "Microsoft.Compute/virtualMachines" + ProtectableContainerTypeSQLAGWorkLoadContainer ProtectableContainerType = "SQLAGWorkLoadContainer" + ProtectableContainerTypeStorageContainer ProtectableContainerType = "StorageContainer" + ProtectableContainerTypeUnknown ProtectableContainerType = "Unknown" + ProtectableContainerTypeVCenter ProtectableContainerType = "VCenter" + ProtectableContainerTypeVMAppContainer ProtectableContainerType = "VMAppContainer" + ProtectableContainerTypeWindows ProtectableContainerType = "Windows" +) + +// PossibleProtectableContainerTypeValues returns the possible values for the ProtectableContainerType const type. +func PossibleProtectableContainerTypeValues() []ProtectableContainerType { + return []ProtectableContainerType{ + ProtectableContainerTypeAzureBackupServerContainer, + ProtectableContainerTypeAzureSQLContainer, + ProtectableContainerTypeAzureWorkloadContainer, + ProtectableContainerTypeCluster, + ProtectableContainerTypeDPMContainer, + ProtectableContainerTypeGenericContainer, + ProtectableContainerTypeIaasVMContainer, + ProtectableContainerTypeIaasVMServiceContainer, + ProtectableContainerTypeInvalid, + ProtectableContainerTypeMABContainer, + ProtectableContainerTypeMicrosoftClassicComputeVirtualMachines, + ProtectableContainerTypeMicrosoftComputeVirtualMachines, + ProtectableContainerTypeSQLAGWorkLoadContainer, + ProtectableContainerTypeStorageContainer, + ProtectableContainerTypeUnknown, + ProtectableContainerTypeVCenter, + ProtectableContainerTypeVMAppContainer, + ProtectableContainerTypeWindows, + } +} + +// ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received +type ProtectedItemHealthStatus string + +const ( + ProtectedItemHealthStatusHealthy ProtectedItemHealthStatus = "Healthy" + ProtectedItemHealthStatusIRPending ProtectedItemHealthStatus = "IRPending" + ProtectedItemHealthStatusInvalid ProtectedItemHealthStatus = "Invalid" + ProtectedItemHealthStatusNotReachable ProtectedItemHealthStatus = "NotReachable" + ProtectedItemHealthStatusUnhealthy ProtectedItemHealthStatus = "Unhealthy" +) + +// PossibleProtectedItemHealthStatusValues returns the possible values for the ProtectedItemHealthStatus const type. +func PossibleProtectedItemHealthStatusValues() []ProtectedItemHealthStatus { + return []ProtectedItemHealthStatus{ + ProtectedItemHealthStatusHealthy, + ProtectedItemHealthStatusIRPending, + ProtectedItemHealthStatusInvalid, + ProtectedItemHealthStatusNotReachable, + ProtectedItemHealthStatusUnhealthy, + } +} + +// ProtectedItemState - Backup state of the backed up item. +type ProtectedItemState string + +const ( + ProtectedItemStateBackupsSuspended ProtectedItemState = "BackupsSuspended" + ProtectedItemStateIRPending ProtectedItemState = "IRPending" + ProtectedItemStateInvalid ProtectedItemState = "Invalid" + ProtectedItemStateProtected ProtectedItemState = "Protected" + ProtectedItemStateProtectionError ProtectedItemState = "ProtectionError" + ProtectedItemStateProtectionPaused ProtectedItemState = "ProtectionPaused" + ProtectedItemStateProtectionStopped ProtectedItemState = "ProtectionStopped" +) + +// PossibleProtectedItemStateValues returns the possible values for the ProtectedItemState const type. +func PossibleProtectedItemStateValues() []ProtectedItemState { + return []ProtectedItemState{ + ProtectedItemStateBackupsSuspended, + ProtectedItemStateIRPending, + ProtectedItemStateInvalid, + ProtectedItemStateProtected, + ProtectedItemStateProtectionError, + ProtectedItemStateProtectionPaused, + ProtectedItemStateProtectionStopped, + } +} + +// ProtectionIntentItemType - backup protectionIntent type. +type ProtectionIntentItemType string + +const ( + ProtectionIntentItemTypeAzureResourceItem ProtectionIntentItemType = "AzureResourceItem" + ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadAutoProtectionIntent" + ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadContainerAutoProtectionIntent" + ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadSQLAutoProtectionIntent" + ProtectionIntentItemTypeInvalid ProtectionIntentItemType = "Invalid" + ProtectionIntentItemTypeRecoveryServiceVaultItem ProtectionIntentItemType = "RecoveryServiceVaultItem" +) + +// PossibleProtectionIntentItemTypeValues returns the possible values for the ProtectionIntentItemType const type. +func PossibleProtectionIntentItemTypeValues() []ProtectionIntentItemType { + return []ProtectionIntentItemType{ + ProtectionIntentItemTypeAzureResourceItem, + ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent, + ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent, + ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent, + ProtectionIntentItemTypeInvalid, + ProtectionIntentItemTypeRecoveryServiceVaultItem, + } +} + +// ProtectionState - Backup state of this backup item. +type ProtectionState string + +const ( + ProtectionStateBackupsSuspended ProtectionState = "BackupsSuspended" + ProtectionStateIRPending ProtectionState = "IRPending" + ProtectionStateInvalid ProtectionState = "Invalid" + ProtectionStateProtected ProtectionState = "Protected" + ProtectionStateProtectionError ProtectionState = "ProtectionError" + ProtectionStateProtectionPaused ProtectionState = "ProtectionPaused" + ProtectionStateProtectionStopped ProtectionState = "ProtectionStopped" +) + +// PossibleProtectionStateValues returns the possible values for the ProtectionState const type. +func PossibleProtectionStateValues() []ProtectionState { + return []ProtectionState{ + ProtectionStateBackupsSuspended, + ProtectionStateIRPending, + ProtectionStateInvalid, + ProtectionStateProtected, + ProtectionStateProtectionError, + ProtectionStateProtectionPaused, + ProtectionStateProtectionStopped, + } +} + +// ProtectionStatus - Specifies whether the container is registered or not +type ProtectionStatus string + +const ( + ProtectionStatusInvalid ProtectionStatus = "Invalid" + ProtectionStatusNotProtected ProtectionStatus = "NotProtected" + ProtectionStatusProtected ProtectionStatus = "Protected" + ProtectionStatusProtecting ProtectionStatus = "Protecting" + ProtectionStatusProtectionFailed ProtectionStatus = "ProtectionFailed" +) + +// PossibleProtectionStatusValues returns the possible values for the ProtectionStatus const type. +func PossibleProtectionStatusValues() []ProtectionStatus { + return []ProtectionStatus{ + ProtectionStatusInvalid, + ProtectionStatusNotProtected, + ProtectionStatusProtected, + ProtectionStatusProtecting, + ProtectionStatusProtectionFailed, + } +} + +// ProvisioningState - Gets or sets provisioning state of the private endpoint connection +type ProvisioningState string + +const ( + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStatePending ProvisioningState = "Pending" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateDeleting, + ProvisioningStateFailed, + ProvisioningStatePending, + ProvisioningStateSucceeded, + } +} + +// RecoveryMode - Defines whether the current recovery mode is file restore or database restore +type RecoveryMode string + +const ( + RecoveryModeFileRecovery RecoveryMode = "FileRecovery" + RecoveryModeInvalid RecoveryMode = "Invalid" + RecoveryModeRecoveryUsingSnapshot RecoveryMode = "RecoveryUsingSnapshot" + RecoveryModeSnapshotAttach RecoveryMode = "SnapshotAttach" + RecoveryModeSnapshotAttachAndRecover RecoveryMode = "SnapshotAttachAndRecover" + RecoveryModeWorkloadRecovery RecoveryMode = "WorkloadRecovery" +) + +// PossibleRecoveryModeValues returns the possible values for the RecoveryMode const type. +func PossibleRecoveryModeValues() []RecoveryMode { + return []RecoveryMode{ + RecoveryModeFileRecovery, + RecoveryModeInvalid, + RecoveryModeRecoveryUsingSnapshot, + RecoveryModeSnapshotAttach, + RecoveryModeSnapshotAttachAndRecover, + RecoveryModeWorkloadRecovery, + } +} + +// RecoveryPointTierStatus - Recovery point tier status. +type RecoveryPointTierStatus string + +const ( + RecoveryPointTierStatusDeleted RecoveryPointTierStatus = "Deleted" + RecoveryPointTierStatusDisabled RecoveryPointTierStatus = "Disabled" + RecoveryPointTierStatusInvalid RecoveryPointTierStatus = "Invalid" + RecoveryPointTierStatusRehydrated RecoveryPointTierStatus = "Rehydrated" + RecoveryPointTierStatusValid RecoveryPointTierStatus = "Valid" +) + +// PossibleRecoveryPointTierStatusValues returns the possible values for the RecoveryPointTierStatus const type. +func PossibleRecoveryPointTierStatusValues() []RecoveryPointTierStatus { + return []RecoveryPointTierStatus{ + RecoveryPointTierStatusDeleted, + RecoveryPointTierStatusDisabled, + RecoveryPointTierStatusInvalid, + RecoveryPointTierStatusRehydrated, + RecoveryPointTierStatusValid, + } +} + +// RecoveryPointTierType - Recovery point tier type. +type RecoveryPointTierType string + +const ( + RecoveryPointTierTypeArchivedRP RecoveryPointTierType = "ArchivedRP" + RecoveryPointTierTypeHardenedRP RecoveryPointTierType = "HardenedRP" + RecoveryPointTierTypeInstantRP RecoveryPointTierType = "InstantRP" + RecoveryPointTierTypeInvalid RecoveryPointTierType = "Invalid" +) + +// PossibleRecoveryPointTierTypeValues returns the possible values for the RecoveryPointTierType const type. +func PossibleRecoveryPointTierTypeValues() []RecoveryPointTierType { + return []RecoveryPointTierType{ + RecoveryPointTierTypeArchivedRP, + RecoveryPointTierTypeHardenedRP, + RecoveryPointTierTypeInstantRP, + RecoveryPointTierTypeInvalid, + } +} + +// RecoveryType - Type of this recovery. +type RecoveryType string + +const ( + RecoveryTypeAlternateLocation RecoveryType = "AlternateLocation" + RecoveryTypeInvalid RecoveryType = "Invalid" + RecoveryTypeOffline RecoveryType = "Offline" + RecoveryTypeOriginalLocation RecoveryType = "OriginalLocation" + RecoveryTypeRestoreDisks RecoveryType = "RestoreDisks" +) + +// PossibleRecoveryTypeValues returns the possible values for the RecoveryType const type. +func PossibleRecoveryTypeValues() []RecoveryType { + return []RecoveryType{ + RecoveryTypeAlternateLocation, + RecoveryTypeInvalid, + RecoveryTypeOffline, + RecoveryTypeOriginalLocation, + RecoveryTypeRestoreDisks, + } +} + +// RehydrationPriority - Rehydration Priority +type RehydrationPriority string + +const ( + RehydrationPriorityHigh RehydrationPriority = "High" + RehydrationPriorityStandard RehydrationPriority = "Standard" +) + +// PossibleRehydrationPriorityValues returns the possible values for the RehydrationPriority const type. +func PossibleRehydrationPriorityValues() []RehydrationPriority { + return []RehydrationPriority{ + RehydrationPriorityHigh, + RehydrationPriorityStandard, + } +} + +// ResourceHealthStatus - Resource Health Status +type ResourceHealthStatus string + +const ( + ResourceHealthStatusHealthy ResourceHealthStatus = "Healthy" + ResourceHealthStatusInvalid ResourceHealthStatus = "Invalid" + ResourceHealthStatusPersistentDegraded ResourceHealthStatus = "PersistentDegraded" + ResourceHealthStatusPersistentUnhealthy ResourceHealthStatus = "PersistentUnhealthy" + ResourceHealthStatusTransientDegraded ResourceHealthStatus = "TransientDegraded" + ResourceHealthStatusTransientUnhealthy ResourceHealthStatus = "TransientUnhealthy" +) + +// PossibleResourceHealthStatusValues returns the possible values for the ResourceHealthStatus const type. +func PossibleResourceHealthStatusValues() []ResourceHealthStatus { + return []ResourceHealthStatus{ + ResourceHealthStatusHealthy, + ResourceHealthStatusInvalid, + ResourceHealthStatusPersistentDegraded, + ResourceHealthStatusPersistentUnhealthy, + ResourceHealthStatusTransientDegraded, + ResourceHealthStatusTransientUnhealthy, + } +} + +// RestorePointQueryType - RestorePoint type +type RestorePointQueryType string + +const ( + RestorePointQueryTypeAll RestorePointQueryType = "All" + RestorePointQueryTypeDifferential RestorePointQueryType = "Differential" + RestorePointQueryTypeFull RestorePointQueryType = "Full" + RestorePointQueryTypeFullAndDifferential RestorePointQueryType = "FullAndDifferential" + RestorePointQueryTypeIncremental RestorePointQueryType = "Incremental" + RestorePointQueryTypeInvalid RestorePointQueryType = "Invalid" + RestorePointQueryTypeLog RestorePointQueryType = "Log" + RestorePointQueryTypeSnapshotCopyOnlyFull RestorePointQueryType = "SnapshotCopyOnlyFull" + RestorePointQueryTypeSnapshotFull RestorePointQueryType = "SnapshotFull" +) + +// PossibleRestorePointQueryTypeValues returns the possible values for the RestorePointQueryType const type. +func PossibleRestorePointQueryTypeValues() []RestorePointQueryType { + return []RestorePointQueryType{ + RestorePointQueryTypeAll, + RestorePointQueryTypeDifferential, + RestorePointQueryTypeFull, + RestorePointQueryTypeFullAndDifferential, + RestorePointQueryTypeIncremental, + RestorePointQueryTypeInvalid, + RestorePointQueryTypeLog, + RestorePointQueryTypeSnapshotCopyOnlyFull, + RestorePointQueryTypeSnapshotFull, + } +} + +// RestorePointType - Type of restore point +type RestorePointType string + +const ( + RestorePointTypeDifferential RestorePointType = "Differential" + RestorePointTypeFull RestorePointType = "Full" + RestorePointTypeIncremental RestorePointType = "Incremental" + RestorePointTypeInvalid RestorePointType = "Invalid" + RestorePointTypeLog RestorePointType = "Log" + RestorePointTypeSnapshotCopyOnlyFull RestorePointType = "SnapshotCopyOnlyFull" + RestorePointTypeSnapshotFull RestorePointType = "SnapshotFull" +) + +// PossibleRestorePointTypeValues returns the possible values for the RestorePointType const type. +func PossibleRestorePointTypeValues() []RestorePointType { + return []RestorePointType{ + RestorePointTypeDifferential, + RestorePointTypeFull, + RestorePointTypeIncremental, + RestorePointTypeInvalid, + RestorePointTypeLog, + RestorePointTypeSnapshotCopyOnlyFull, + RestorePointTypeSnapshotFull, + } +} + +// RestoreRequestType - Restore Type (FullShareRestore or ItemLevelRestore) +type RestoreRequestType string + +const ( + RestoreRequestTypeFullShareRestore RestoreRequestType = "FullShareRestore" + RestoreRequestTypeInvalid RestoreRequestType = "Invalid" + RestoreRequestTypeItemLevelRestore RestoreRequestType = "ItemLevelRestore" +) + +// PossibleRestoreRequestTypeValues returns the possible values for the RestoreRequestType const type. +func PossibleRestoreRequestTypeValues() []RestoreRequestType { + return []RestoreRequestType{ + RestoreRequestTypeFullShareRestore, + RestoreRequestTypeInvalid, + RestoreRequestTypeItemLevelRestore, + } +} + +// RetentionDurationType - Retention duration type of retention policy. +type RetentionDurationType string + +const ( + RetentionDurationTypeDays RetentionDurationType = "Days" + RetentionDurationTypeInvalid RetentionDurationType = "Invalid" + RetentionDurationTypeMonths RetentionDurationType = "Months" + RetentionDurationTypeWeeks RetentionDurationType = "Weeks" + RetentionDurationTypeYears RetentionDurationType = "Years" +) + +// PossibleRetentionDurationTypeValues returns the possible values for the RetentionDurationType const type. +func PossibleRetentionDurationTypeValues() []RetentionDurationType { + return []RetentionDurationType{ + RetentionDurationTypeDays, + RetentionDurationTypeInvalid, + RetentionDurationTypeMonths, + RetentionDurationTypeWeeks, + RetentionDurationTypeYears, + } +} + +// RetentionScheduleFormat - Retention schedule format type for monthly retention policy. +type RetentionScheduleFormat string + +const ( + RetentionScheduleFormatDaily RetentionScheduleFormat = "Daily" + RetentionScheduleFormatInvalid RetentionScheduleFormat = "Invalid" + RetentionScheduleFormatWeekly RetentionScheduleFormat = "Weekly" +) + +// PossibleRetentionScheduleFormatValues returns the possible values for the RetentionScheduleFormat const type. +func PossibleRetentionScheduleFormatValues() []RetentionScheduleFormat { + return []RetentionScheduleFormat{ + RetentionScheduleFormatDaily, + RetentionScheduleFormatInvalid, + RetentionScheduleFormatWeekly, + } +} + +// SQLDataDirectoryType - Type of data directory mapping +type SQLDataDirectoryType string + +const ( + SQLDataDirectoryTypeData SQLDataDirectoryType = "Data" + SQLDataDirectoryTypeInvalid SQLDataDirectoryType = "Invalid" + SQLDataDirectoryTypeLog SQLDataDirectoryType = "Log" +) + +// PossibleSQLDataDirectoryTypeValues returns the possible values for the SQLDataDirectoryType const type. +func PossibleSQLDataDirectoryTypeValues() []SQLDataDirectoryType { + return []SQLDataDirectoryType{ + SQLDataDirectoryTypeData, + SQLDataDirectoryTypeInvalid, + SQLDataDirectoryTypeLog, + } +} + +// ScheduleRunType - Frequency of the schedule operation of this policy. +type ScheduleRunType string + +const ( + ScheduleRunTypeDaily ScheduleRunType = "Daily" + ScheduleRunTypeHourly ScheduleRunType = "Hourly" + ScheduleRunTypeInvalid ScheduleRunType = "Invalid" + ScheduleRunTypeWeekly ScheduleRunType = "Weekly" +) + +// PossibleScheduleRunTypeValues returns the possible values for the ScheduleRunType const type. +func PossibleScheduleRunTypeValues() []ScheduleRunType { + return []ScheduleRunType{ + ScheduleRunTypeDaily, + ScheduleRunTypeHourly, + ScheduleRunTypeInvalid, + ScheduleRunTypeWeekly, + } +} + +// SoftDeleteFeatureState - Soft Delete feature state +type SoftDeleteFeatureState string + +const ( + SoftDeleteFeatureStateAlwaysON SoftDeleteFeatureState = "AlwaysON" + SoftDeleteFeatureStateDisabled SoftDeleteFeatureState = "Disabled" + SoftDeleteFeatureStateEnabled SoftDeleteFeatureState = "Enabled" + SoftDeleteFeatureStateInvalid SoftDeleteFeatureState = "Invalid" +) + +// PossibleSoftDeleteFeatureStateValues returns the possible values for the SoftDeleteFeatureState const type. +func PossibleSoftDeleteFeatureStateValues() []SoftDeleteFeatureState { + return []SoftDeleteFeatureState{ + SoftDeleteFeatureStateAlwaysON, + SoftDeleteFeatureStateDisabled, + SoftDeleteFeatureStateEnabled, + SoftDeleteFeatureStateInvalid, + } +} + +// StorageType - Storage type +type StorageType string + +const ( + StorageTypeGeoRedundant StorageType = "GeoRedundant" + StorageTypeInvalid StorageType = "Invalid" + StorageTypeLocallyRedundant StorageType = "LocallyRedundant" + StorageTypeReadAccessGeoZoneRedundant StorageType = "ReadAccessGeoZoneRedundant" + StorageTypeZoneRedundant StorageType = "ZoneRedundant" +) + +// PossibleStorageTypeValues returns the possible values for the StorageType const type. +func PossibleStorageTypeValues() []StorageType { + return []StorageType{ + StorageTypeGeoRedundant, + StorageTypeInvalid, + StorageTypeLocallyRedundant, + StorageTypeReadAccessGeoZoneRedundant, + StorageTypeZoneRedundant, + } +} + +// StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always +// Locked. +type StorageTypeState string + +const ( + StorageTypeStateInvalid StorageTypeState = "Invalid" + StorageTypeStateLocked StorageTypeState = "Locked" + StorageTypeStateUnlocked StorageTypeState = "Unlocked" +) + +// PossibleStorageTypeStateValues returns the possible values for the StorageTypeState const type. +func PossibleStorageTypeStateValues() []StorageTypeState { + return []StorageTypeState{ + StorageTypeStateInvalid, + StorageTypeStateLocked, + StorageTypeStateUnlocked, + } +} + +// SupportStatus - Support status of feature +type SupportStatus string + +const ( + SupportStatusDefaultOFF SupportStatus = "DefaultOFF" + SupportStatusDefaultON SupportStatus = "DefaultON" + SupportStatusInvalid SupportStatus = "Invalid" + SupportStatusNotSupported SupportStatus = "NotSupported" + SupportStatusSupported SupportStatus = "Supported" +) + +// PossibleSupportStatusValues returns the possible values for the SupportStatus const type. +func PossibleSupportStatusValues() []SupportStatus { + return []SupportStatus{ + SupportStatusDefaultOFF, + SupportStatusDefaultON, + SupportStatusInvalid, + SupportStatusNotSupported, + SupportStatusSupported, + } +} + +// TargetDiskNetworkAccessOption - Network access settings to be used for restored disks +type TargetDiskNetworkAccessOption string + +const ( + TargetDiskNetworkAccessOptionEnablePrivateAccessForAllDisks TargetDiskNetworkAccessOption = "EnablePrivateAccessForAllDisks" + TargetDiskNetworkAccessOptionEnablePublicAccessForAllDisks TargetDiskNetworkAccessOption = "EnablePublicAccessForAllDisks" + TargetDiskNetworkAccessOptionSameAsOnSourceDisks TargetDiskNetworkAccessOption = "SameAsOnSourceDisks" +) + +// PossibleTargetDiskNetworkAccessOptionValues returns the possible values for the TargetDiskNetworkAccessOption const type. +func PossibleTargetDiskNetworkAccessOptionValues() []TargetDiskNetworkAccessOption { + return []TargetDiskNetworkAccessOption{ + TargetDiskNetworkAccessOptionEnablePrivateAccessForAllDisks, + TargetDiskNetworkAccessOptionEnablePublicAccessForAllDisks, + TargetDiskNetworkAccessOptionSameAsOnSourceDisks, + } +} + +// TieringMode - Tiering Mode to control automatic tiering of recovery points. Supported values are: +// 1. TierRecommended: Tier all recovery points recommended to be tiered +// 2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below. +// 3. DoNotTier: Do not tier any recovery points +type TieringMode string + +const ( + TieringModeDoNotTier TieringMode = "DoNotTier" + TieringModeInvalid TieringMode = "Invalid" + TieringModeTierAfter TieringMode = "TierAfter" + TieringModeTierRecommended TieringMode = "TierRecommended" +) + +// PossibleTieringModeValues returns the possible values for the TieringMode const type. +func PossibleTieringModeValues() []TieringMode { + return []TieringMode{ + TieringModeDoNotTier, + TieringModeInvalid, + TieringModeTierAfter, + TieringModeTierRecommended, + } +} + +// Type - Backup management type for this container. +type Type string + +const ( + TypeBackupProtectedItemCountSummary Type = "BackupProtectedItemCountSummary" + TypeBackupProtectionContainerCountSummary Type = "BackupProtectionContainerCountSummary" + TypeInvalid Type = "Invalid" +) + +// PossibleTypeValues returns the possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{ + TypeBackupProtectedItemCountSummary, + TypeBackupProtectionContainerCountSummary, + TypeInvalid, + } +} + +// UsagesUnit - Unit of the usage. +type UsagesUnit string + +const ( + UsagesUnitBytes UsagesUnit = "Bytes" + UsagesUnitBytesPerSecond UsagesUnit = "BytesPerSecond" + UsagesUnitCount UsagesUnit = "Count" + UsagesUnitCountPerSecond UsagesUnit = "CountPerSecond" + UsagesUnitPercent UsagesUnit = "Percent" + UsagesUnitSeconds UsagesUnit = "Seconds" +) + +// PossibleUsagesUnitValues returns the possible values for the UsagesUnit const type. +func PossibleUsagesUnitValues() []UsagesUnit { + return []UsagesUnit{ + UsagesUnitBytes, + UsagesUnitBytesPerSecond, + UsagesUnitCount, + UsagesUnitCountPerSecond, + UsagesUnitPercent, + UsagesUnitSeconds, + } +} + +// ValidationStatus - Validation Status +type ValidationStatus string + +const ( + ValidationStatusFailed ValidationStatus = "Failed" + ValidationStatusInvalid ValidationStatus = "Invalid" + ValidationStatusSucceeded ValidationStatus = "Succeeded" +) + +// PossibleValidationStatusValues returns the possible values for the ValidationStatus const type. +func PossibleValidationStatusValues() []ValidationStatus { + return []ValidationStatus{ + ValidationStatusFailed, + ValidationStatusInvalid, + ValidationStatusSucceeded, + } +} + +// VaultSubResourceType - GroupId for the PrivateEndpointConnection - AzureBackup, AzureBackup_secondary or AzureSiteRecovery +type VaultSubResourceType string + +const ( + VaultSubResourceTypeAzureBackup VaultSubResourceType = "AzureBackup" + VaultSubResourceTypeAzureBackupSecondary VaultSubResourceType = "AzureBackup_secondary" + VaultSubResourceTypeAzureSiteRecovery VaultSubResourceType = "AzureSiteRecovery" +) + +// PossibleVaultSubResourceTypeValues returns the possible values for the VaultSubResourceType const type. +func PossibleVaultSubResourceTypeValues() []VaultSubResourceType { + return []VaultSubResourceType{ + VaultSubResourceTypeAzureBackup, + VaultSubResourceTypeAzureBackupSecondary, + VaultSubResourceTypeAzureSiteRecovery, + } +} + +type WeekOfMonth string + +const ( + WeekOfMonthFirst WeekOfMonth = "First" + WeekOfMonthFourth WeekOfMonth = "Fourth" + WeekOfMonthInvalid WeekOfMonth = "Invalid" + WeekOfMonthLast WeekOfMonth = "Last" + WeekOfMonthSecond WeekOfMonth = "Second" + WeekOfMonthThird WeekOfMonth = "Third" +) + +// PossibleWeekOfMonthValues returns the possible values for the WeekOfMonth const type. +func PossibleWeekOfMonthValues() []WeekOfMonth { + return []WeekOfMonth{ + WeekOfMonthFirst, + WeekOfMonthFourth, + WeekOfMonthInvalid, + WeekOfMonthLast, + WeekOfMonthSecond, + WeekOfMonthThird, + } +} + +// WorkloadItemType - Workload item type of the item for which intent is to be set +type WorkloadItemType string + +const ( + WorkloadItemTypeInvalid WorkloadItemType = "Invalid" + WorkloadItemTypeSAPAseDatabase WorkloadItemType = "SAPAseDatabase" + WorkloadItemTypeSAPAseSystem WorkloadItemType = "SAPAseSystem" + WorkloadItemTypeSAPHanaDBInstance WorkloadItemType = "SAPHanaDBInstance" + WorkloadItemTypeSAPHanaDatabase WorkloadItemType = "SAPHanaDatabase" + WorkloadItemTypeSAPHanaSystem WorkloadItemType = "SAPHanaSystem" + WorkloadItemTypeSQLDataBase WorkloadItemType = "SQLDataBase" + WorkloadItemTypeSQLInstance WorkloadItemType = "SQLInstance" +) + +// PossibleWorkloadItemTypeValues returns the possible values for the WorkloadItemType const type. +func PossibleWorkloadItemTypeValues() []WorkloadItemType { + return []WorkloadItemType{ + WorkloadItemTypeInvalid, + WorkloadItemTypeSAPAseDatabase, + WorkloadItemTypeSAPAseSystem, + WorkloadItemTypeSAPHanaDBInstance, + WorkloadItemTypeSAPHanaDatabase, + WorkloadItemTypeSAPHanaSystem, + WorkloadItemTypeSQLDataBase, + WorkloadItemTypeSQLInstance, + } +} + +// WorkloadType - Type of workload for the backup management +type WorkloadType string + +const ( + WorkloadTypeAzureFileShare WorkloadType = "AzureFileShare" + WorkloadTypeAzureSQLDb WorkloadType = "AzureSqlDb" + WorkloadTypeClient WorkloadType = "Client" + WorkloadTypeExchange WorkloadType = "Exchange" + WorkloadTypeFileFolder WorkloadType = "FileFolder" + WorkloadTypeGenericDataSource WorkloadType = "GenericDataSource" + WorkloadTypeInvalid WorkloadType = "Invalid" + WorkloadTypeSAPAseDatabase WorkloadType = "SAPAseDatabase" + WorkloadTypeSAPHanaDBInstance WorkloadType = "SAPHanaDBInstance" + WorkloadTypeSAPHanaDatabase WorkloadType = "SAPHanaDatabase" + WorkloadTypeSQLDB WorkloadType = "SQLDB" + WorkloadTypeSQLDataBase WorkloadType = "SQLDataBase" + WorkloadTypeSharepoint WorkloadType = "Sharepoint" + WorkloadTypeSystemState WorkloadType = "SystemState" + WorkloadTypeVM WorkloadType = "VM" + WorkloadTypeVMwareVM WorkloadType = "VMwareVM" +) + +// PossibleWorkloadTypeValues returns the possible values for the WorkloadType const type. +func PossibleWorkloadTypeValues() []WorkloadType { + return []WorkloadType{ + WorkloadTypeAzureFileShare, + WorkloadTypeAzureSQLDb, + WorkloadTypeClient, + WorkloadTypeExchange, + WorkloadTypeFileFolder, + WorkloadTypeGenericDataSource, + WorkloadTypeInvalid, + WorkloadTypeSAPAseDatabase, + WorkloadTypeSAPHanaDBInstance, + WorkloadTypeSAPHanaDatabase, + WorkloadTypeSQLDB, + WorkloadTypeSQLDataBase, + WorkloadTypeSharepoint, + WorkloadTypeSystemState, + WorkloadTypeVM, + WorkloadTypeVMwareVM, + } +} + +// XcoolState - Vault x-cool state +type XcoolState string + +const ( + XcoolStateDisabled XcoolState = "Disabled" + XcoolStateEnabled XcoolState = "Enabled" + XcoolStateInvalid XcoolState = "Invalid" +) + +// PossibleXcoolStateValues returns the possible values for the XcoolState const type. +func PossibleXcoolStateValues() []XcoolState { + return []XcoolState{ + XcoolStateDisabled, + XcoolStateEnabled, + XcoolStateInvalid, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/deletedprotectioncontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/deletedprotectioncontainers_client.go new file mode 100644 index 00000000..f363e931 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/deletedprotectioncontainers_client.go @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// DeletedProtectionContainersClient contains the methods for the DeletedProtectionContainers group. +// Don't use this type directly, use NewDeletedProtectionContainersClient() instead. +type DeletedProtectionContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewDeletedProtectionContainersClient creates a new instance of DeletedProtectionContainersClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewDeletedProtectionContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedProtectionContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &DeletedProtectionContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Lists the soft deleted containers registered to Recovery Services Vault. +// +// Generated from API version 2025-02-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - vaultName - The name of the recovery services vault. +// - options - DeletedProtectionContainersClientListOptions contains the optional parameters for the DeletedProtectionContainersClient.NewListPager +// method. +func (client *DeletedProtectionContainersClient) NewListPager(resourceGroupName string, vaultName string, options *DeletedProtectionContainersClientListOptions) *runtime.Pager[DeletedProtectionContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[DeletedProtectionContainersClientListResponse]{ + More: func(page DeletedProtectionContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *DeletedProtectionContainersClientListResponse) (DeletedProtectionContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedProtectionContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, vaultName, options) + }, nil) + if err != nil { + return DeletedProtectionContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *DeletedProtectionContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, options *DeletedProtectionContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupDeletedProtectionContainers" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *DeletedProtectionContainersClient) listHandleResponse(resp *http.Response) (DeletedProtectionContainersClientListResponse, error) { + result := DeletedProtectionContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerResourceList); err != nil { + return DeletedProtectionContainersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/exportjobsoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/exportjobsoperationresults_client.go new file mode 100644 index 00000000..19b56a77 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/exportjobsoperationresults_client.go @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExportJobsOperationResultsClient contains the methods for the ExportJobsOperationResults group. +// Don't use this type directly, use NewExportJobsOperationResultsClient() instead. +type ExportJobsOperationResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewExportJobsOperationResultsClient creates a new instance of ExportJobsOperationResultsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewExportJobsOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportJobsOperationResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ExportJobsOperationResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also +// contains URL of a Blob and a SAS key to access the same. The blob contains exported +// jobs in JSON serialized format. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - operationID - OperationID which represents the export job. +// - options - ExportJobsOperationResultsClientGetOptions contains the optional parameters for the ExportJobsOperationResultsClient.Get +// method. +func (client *ExportJobsOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ExportJobsOperationResultsClientGetOptions) (ExportJobsOperationResultsClientGetResponse, error) { + var err error + const operationName = "ExportJobsOperationResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) + if err != nil { + return ExportJobsOperationResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ExportJobsOperationResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ExportJobsOperationResultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ExportJobsOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, _ *ExportJobsOperationResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ExportJobsOperationResultsClient) getHandleResponse(resp *http.Response) (ExportJobsOperationResultsClientGetResponse, error) { + result := ExportJobsOperationResultsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationResultInfoBaseResource); err != nil { + return ExportJobsOperationResultsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/featuresupport_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/featuresupport_client.go new file mode 100644 index 00000000..1b44bf13 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/featuresupport_client.go @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FeatureSupportClient contains the methods for the FeatureSupport group. +// Don't use this type directly, use NewFeatureSupportClient() instead. +type FeatureSupportClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFeatureSupportClient creates a new instance of FeatureSupportClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFeatureSupportClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeatureSupportClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FeatureSupportClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Validate - It will validate if given feature with resource properties is supported in service +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - azureRegion - Azure region to hit Api +// - parameters - Feature support request object +// - options - FeatureSupportClientValidateOptions contains the optional parameters for the FeatureSupportClient.Validate method. +func (client *FeatureSupportClient) Validate(ctx context.Context, azureRegion string, parameters FeatureSupportRequestClassification, options *FeatureSupportClientValidateOptions) (FeatureSupportClientValidateResponse, error) { + var err error + const operationName = "FeatureSupportClient.Validate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCreateRequest(ctx, azureRegion, parameters, options) + if err != nil { + return FeatureSupportClientValidateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return FeatureSupportClientValidateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return FeatureSupportClientValidateResponse{}, err + } + resp, err := client.validateHandleResponse(httpResp) + return resp, err +} + +// validateCreateRequest creates the Validate request. +func (client *FeatureSupportClient) validateCreateRequest(ctx context.Context, azureRegion string, parameters FeatureSupportRequestClassification, _ *FeatureSupportClientValidateOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures" + if azureRegion == "" { + return nil, errors.New("parameter azureRegion cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{azureRegion}", url.PathEscape(azureRegion)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// validateHandleResponse handles the Validate response. +func (client *FeatureSupportClient) validateHandleResponse(resp *http.Response) (FeatureSupportClientValidateResponse, error) { + result := FeatureSupportClientValidateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AzureVMResourceFeatureSupportResponse); err != nil { + return FeatureSupportClientValidateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/fetchtieringcost_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/fetchtieringcost_client.go new file mode 100644 index 00000000..9eb80fc9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/fetchtieringcost_client.go @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// FetchTieringCostClient contains the methods for the FetchTieringCost group. +// Don't use this type directly, use NewFetchTieringCostClient() instead. +type FetchTieringCostClient struct { + internal *arm.Client + subscriptionID string +} + +// NewFetchTieringCostClient creates a new instance of FetchTieringCostClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewFetchTieringCostClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FetchTieringCostClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &FetchTieringCostClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginPost - Provides the details of the tiering related sizes and cost. Status of the operation can be fetched using GetTieringCostOperationStatus +// API and result using GetTieringCostOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - vaultName - The name of the recovery services vault. +// - parameters - Fetch Tiering Cost Request +// - options - FetchTieringCostClientBeginPostOptions contains the optional parameters for the FetchTieringCostClient.BeginPost +// method. +func (client *FetchTieringCostClient) BeginPost(ctx context.Context, resourceGroupName string, vaultName string, parameters FetchTieringCostInfoRequestClassification, options *FetchTieringCostClientBeginPostOptions) (*runtime.Poller[FetchTieringCostClientPostResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.post(ctx, resourceGroupName, vaultName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[FetchTieringCostClientPostResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[FetchTieringCostClientPostResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Post - Provides the details of the tiering related sizes and cost. Status of the operation can be fetched using GetTieringCostOperationStatus +// API and result using GetTieringCostOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +func (client *FetchTieringCostClient) post(ctx context.Context, resourceGroupName string, vaultName string, parameters FetchTieringCostInfoRequestClassification, options *FetchTieringCostClientBeginPostOptions) (*http.Response, error) { + var err error + const operationName = "FetchTieringCostClient.BeginPost" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.postCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// postCreateRequest creates the Post request. +func (client *FetchTieringCostClient) postCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, parameters FetchTieringCostInfoRequestClassification, _ *FetchTieringCostClientBeginPostOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/fetchTieringCost" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/gettieringcostoperationresult_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/gettieringcostoperationresult_client.go new file mode 100644 index 00000000..4993dd3e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/gettieringcostoperationresult_client.go @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GetTieringCostOperationResultClient contains the methods for the GetTieringCostOperationResult group. +// Don't use this type directly, use NewGetTieringCostOperationResultClient() instead. +type GetTieringCostOperationResultClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGetTieringCostOperationResultClient creates a new instance of GetTieringCostOperationResultClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGetTieringCostOperationResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GetTieringCostOperationResultClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GetTieringCostOperationResultClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the result of async operation for tiering cost +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - vaultName - The name of the recovery services vault. +// - options - GetTieringCostOperationResultClientGetOptions contains the optional parameters for the GetTieringCostOperationResultClient.Get +// method. +func (client *GetTieringCostOperationResultClient) Get(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *GetTieringCostOperationResultClientGetOptions) (GetTieringCostOperationResultClientGetResponse, error) { + var err error + const operationName = "GetTieringCostOperationResultClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, operationID, options) + if err != nil { + return GetTieringCostOperationResultClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return GetTieringCostOperationResultClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GetTieringCostOperationResultClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *GetTieringCostOperationResultClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, operationID string, _ *GetTieringCostOperationResultClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/operationResults/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *GetTieringCostOperationResultClient) getHandleResponse(resp *http.Response) (GetTieringCostOperationResultClientGetResponse, error) { + result := GetTieringCostOperationResultClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { + return GetTieringCostOperationResultClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/interfaces.go new file mode 100644 index 00000000..4dde1e77 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/interfaces.go @@ -0,0 +1,448 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +// AzureIaaSVMProtectedItemClassification provides polymorphic access to related types. +// Call the interface's GetAzureIaaSVMProtectedItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureIaaSClassicComputeVMProtectedItem, *AzureIaaSComputeVMProtectedItem, *AzureIaaSVMProtectedItem +type AzureIaaSVMProtectedItemClassification interface { + ProtectedItemClassification + // GetAzureIaaSVMProtectedItem returns the AzureIaaSVMProtectedItem content of the underlying type. + GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem +} + +// AzureRecoveryServiceVaultProtectionIntentClassification provides polymorphic access to related types. +// Call the interface's GetAzureRecoveryServiceVaultProtectionIntent() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureRecoveryServiceVaultProtectionIntent, *AzureWorkloadAutoProtectionIntent, *AzureWorkloadSQLAutoProtectionIntent +type AzureRecoveryServiceVaultProtectionIntentClassification interface { + ProtectionIntentClassification + // GetAzureRecoveryServiceVaultProtectionIntent returns the AzureRecoveryServiceVaultProtectionIntent content of the underlying type. + GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent +} + +// AzureVMWorkloadItemClassification provides polymorphic access to related types. +// Call the interface's GetAzureVMWorkloadItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureVMWorkloadItem, *AzureVMWorkloadSAPAseDatabaseWorkloadItem, *AzureVMWorkloadSAPAseSystemWorkloadItem, *AzureVMWorkloadSAPHanaDatabaseWorkloadItem, +// - *AzureVMWorkloadSAPHanaSystemWorkloadItem, *AzureVMWorkloadSQLDatabaseWorkloadItem, *AzureVMWorkloadSQLInstanceWorkloadItem +type AzureVMWorkloadItemClassification interface { + WorkloadItemClassification + // GetAzureVMWorkloadItem returns the AzureVMWorkloadItem content of the underlying type. + GetAzureVMWorkloadItem() *AzureVMWorkloadItem +} + +// AzureVMWorkloadProtectableItemClassification provides polymorphic access to related types. +// Call the interface's GetAzureVMWorkloadProtectableItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureVMWorkloadProtectableItem, *AzureVMWorkloadSAPAseDatabaseProtectableItem, *AzureVMWorkloadSAPAseSystemProtectableItem, +// - *AzureVMWorkloadSAPHanaDBInstance, *AzureVMWorkloadSAPHanaDatabaseProtectableItem, *AzureVMWorkloadSAPHanaHSRProtectableItem, +// - *AzureVMWorkloadSAPHanaSystemProtectableItem, *AzureVMWorkloadSQLAvailabilityGroupProtectableItem, *AzureVMWorkloadSQLDatabaseProtectableItem, +// - *AzureVMWorkloadSQLInstanceProtectableItem +type AzureVMWorkloadProtectableItemClassification interface { + WorkloadProtectableItemClassification + // GetAzureVMWorkloadProtectableItem returns the AzureVMWorkloadProtectableItem content of the underlying type. + GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem +} + +// AzureVMWorkloadProtectedItemClassification provides polymorphic access to related types. +// Call the interface's GetAzureVMWorkloadProtectedItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureVMWorkloadProtectedItem, *AzureVMWorkloadSAPAseDatabaseProtectedItem, *AzureVMWorkloadSAPHanaDBInstanceProtectedItem, +// - *AzureVMWorkloadSAPHanaDatabaseProtectedItem, *AzureVMWorkloadSQLDatabaseProtectedItem +type AzureVMWorkloadProtectedItemClassification interface { + ProtectedItemClassification + // GetAzureVMWorkloadProtectedItem returns the AzureVMWorkloadProtectedItem content of the underlying type. + GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem +} + +// AzureWorkloadAutoProtectionIntentClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadAutoProtectionIntent() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadAutoProtectionIntent, *AzureWorkloadSQLAutoProtectionIntent +type AzureWorkloadAutoProtectionIntentClassification interface { + AzureRecoveryServiceVaultProtectionIntentClassification + // GetAzureWorkloadAutoProtectionIntent returns the AzureWorkloadAutoProtectionIntent content of the underlying type. + GetAzureWorkloadAutoProtectionIntent() *AzureWorkloadAutoProtectionIntent +} + +// AzureWorkloadContainerClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadContainer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureSQLAGWorkloadContainerProtectionContainer, *AzureVMAppContainerProtectionContainer, *AzureWorkloadContainer +type AzureWorkloadContainerClassification interface { + ProtectionContainerClassification + // GetAzureWorkloadContainer returns the AzureWorkloadContainer content of the underlying type. + GetAzureWorkloadContainer() *AzureWorkloadContainer +} + +// AzureWorkloadPointInTimeRecoveryPointClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadPointInTimeRecoveryPoint() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadSAPAsePointInTimeRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint +type AzureWorkloadPointInTimeRecoveryPointClassification interface { + AzureWorkloadRecoveryPointClassification + // GetAzureWorkloadPointInTimeRecoveryPoint returns the AzureWorkloadPointInTimeRecoveryPoint content of the underlying type. + GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint +} + +// AzureWorkloadRecoveryPointClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadRecoveryPoint() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadRecoveryPoint, *AzureWorkloadSAPAsePointInTimeRecoveryPoint, *AzureWorkloadSAPAseRecoveryPoint, +// - *AzureWorkloadSAPHanaPointInTimeRecoveryPoint, *AzureWorkloadSAPHanaRecoveryPoint, *AzureWorkloadSQLPointInTimeRecoveryPoint, +// - *AzureWorkloadSQLRecoveryPoint +type AzureWorkloadRecoveryPointClassification interface { + RecoveryPointClassification + // GetAzureWorkloadRecoveryPoint returns the AzureWorkloadRecoveryPoint content of the underlying type. + GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint +} + +// AzureWorkloadRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadPointInTimeRestoreRequest, *AzureWorkloadRestoreRequest, *AzureWorkloadSAPAsePointInTimeRestoreRequest, +// - *AzureWorkloadSAPAseRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, +// - *AzureWorkloadSAPHanaRestoreRequest, *AzureWorkloadSAPHanaRestoreWithRehydrateRequest, *AzureWorkloadSQLPointInTimeRestoreRequest, +// - *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, *AzureWorkloadSQLRestoreWithRehydrateRequest +type AzureWorkloadRestoreRequestClassification interface { + RestoreRequestClassification + // GetAzureWorkloadRestoreRequest returns the AzureWorkloadRestoreRequest content of the underlying type. + GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest +} + +// AzureWorkloadSAPAseRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSAPAseRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSAPAsePointInTimeRestoreRequest, *AzureWorkloadSAPAseRestoreRequest +type AzureWorkloadSAPAseRestoreRequestClassification interface { + AzureWorkloadRestoreRequestClassification + // GetAzureWorkloadSAPAseRestoreRequest returns the AzureWorkloadSAPAseRestoreRequest content of the underlying type. + GetAzureWorkloadSAPAseRestoreRequest() *AzureWorkloadSAPAseRestoreRequest +} + +// AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSAPHanaPointInTimeRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest +type AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification interface { + AzureWorkloadSAPHanaRestoreRequestClassification + // GetAzureWorkloadSAPHanaPointInTimeRestoreRequest returns the AzureWorkloadSAPHanaPointInTimeRestoreRequest content of the underlying type. + GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() *AzureWorkloadSAPHanaPointInTimeRestoreRequest +} + +// AzureWorkloadSAPHanaRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSAPHanaRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSAPHanaPointInTimeRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSAPHanaRestoreRequest, +// - *AzureWorkloadSAPHanaRestoreWithRehydrateRequest +type AzureWorkloadSAPHanaRestoreRequestClassification interface { + AzureWorkloadRestoreRequestClassification + // GetAzureWorkloadSAPHanaRestoreRequest returns the AzureWorkloadSAPHanaRestoreRequest content of the underlying type. + GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest +} + +// AzureWorkloadSQLPointInTimeRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSQLPointInTimeRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest +type AzureWorkloadSQLPointInTimeRestoreRequestClassification interface { + AzureWorkloadSQLRestoreRequestClassification + // GetAzureWorkloadSQLPointInTimeRestoreRequest returns the AzureWorkloadSQLPointInTimeRestoreRequest content of the underlying type. + GetAzureWorkloadSQLPointInTimeRestoreRequest() *AzureWorkloadSQLPointInTimeRestoreRequest +} + +// AzureWorkloadSQLRecoveryPointClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSQLRecoveryPoint() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint +type AzureWorkloadSQLRecoveryPointClassification interface { + AzureWorkloadRecoveryPointClassification + // GetAzureWorkloadSQLRecoveryPoint returns the AzureWorkloadSQLRecoveryPoint content of the underlying type. + GetAzureWorkloadSQLRecoveryPoint() *AzureWorkloadSQLRecoveryPoint +} + +// AzureWorkloadSQLRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetAzureWorkloadSQLRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, +// - *AzureWorkloadSQLRestoreWithRehydrateRequest +type AzureWorkloadSQLRestoreRequestClassification interface { + AzureWorkloadRestoreRequestClassification + // GetAzureWorkloadSQLRestoreRequest returns the AzureWorkloadSQLRestoreRequest content of the underlying type. + GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest +} + +// BackupEngineBaseClassification provides polymorphic access to related types. +// Call the interface's GetBackupEngineBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupServerEngine, *BackupEngineBase, *DpmBackupEngine +type BackupEngineBaseClassification interface { + // GetBackupEngineBase returns the BackupEngineBase content of the underlying type. + GetBackupEngineBase() *BackupEngineBase +} + +// BackupRequestClassification provides polymorphic access to related types. +// Call the interface's GetBackupRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareBackupRequest, *AzureWorkloadBackupRequest, *BackupRequest, *IaasVMBackupRequest +type BackupRequestClassification interface { + // GetBackupRequest returns the BackupRequest content of the underlying type. + GetBackupRequest() *BackupRequest +} + +// DpmContainerClassification provides polymorphic access to related types. +// Call the interface's GetDpmContainer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupServerContainer, *DpmContainer +type DpmContainerClassification interface { + ProtectionContainerClassification + // GetDpmContainer returns the DpmContainer content of the underlying type. + GetDpmContainer() *DpmContainer +} + +// FeatureSupportRequestClassification provides polymorphic access to related types. +// Call the interface's GetFeatureSupportRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupGoalFeatureSupportRequest, *AzureVMResourceFeatureSupportRequest, *FeatureSupportRequest +type FeatureSupportRequestClassification interface { + // GetFeatureSupportRequest returns the FeatureSupportRequest content of the underlying type. + GetFeatureSupportRequest() *FeatureSupportRequest +} + +// FetchTieringCostInfoRequestClassification provides polymorphic access to related types. +// Call the interface's GetFetchTieringCostInfoRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *FetchTieringCostInfoForRehydrationRequest, *FetchTieringCostInfoRequest, *FetchTieringCostSavingsInfoForPolicyRequest, +// - *FetchTieringCostSavingsInfoForProtectedItemRequest, *FetchTieringCostSavingsInfoForVaultRequest +type FetchTieringCostInfoRequestClassification interface { + // GetFetchTieringCostInfoRequest returns the FetchTieringCostInfoRequest content of the underlying type. + GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest +} + +// ILRRequestClassification provides polymorphic access to related types. +// Call the interface's GetILRRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareProvisionILRRequest, *ILRRequest, *IaasVMILRRegistrationRequest +type ILRRequestClassification interface { + // GetILRRequest returns the ILRRequest content of the underlying type. + GetILRRequest() *ILRRequest +} + +// IaaSVMContainerClassification provides polymorphic access to related types. +// Call the interface's GetIaaSVMContainer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureIaaSClassicComputeVMContainer, *AzureIaaSComputeVMContainer, *IaaSVMContainer +type IaaSVMContainerClassification interface { + ProtectionContainerClassification + // GetIaaSVMContainer returns the IaaSVMContainer content of the underlying type. + GetIaaSVMContainer() *IaaSVMContainer +} + +// IaaSVMProtectableItemClassification provides polymorphic access to related types. +// Call the interface's GetIaaSVMProtectableItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureIaaSClassicComputeVMProtectableItem, *AzureIaaSComputeVMProtectableItem, *IaaSVMProtectableItem +type IaaSVMProtectableItemClassification interface { + WorkloadProtectableItemClassification + // GetIaaSVMProtectableItem returns the IaaSVMProtectableItem content of the underlying type. + GetIaaSVMProtectableItem() *IaaSVMProtectableItem +} + +// IaasVMRestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetIaasVMRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *IaasVMRestoreRequest, *IaasVMRestoreWithRehydrationRequest +type IaasVMRestoreRequestClassification interface { + RestoreRequestClassification + // GetIaasVMRestoreRequest returns the IaasVMRestoreRequest content of the underlying type. + GetIaasVMRestoreRequest() *IaasVMRestoreRequest +} + +// JobClassification provides polymorphic access to related types. +// Call the interface's GetJob() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureIaaSVMJob, *AzureIaaSVMJobV2, *AzureStorageJob, *AzureWorkloadJob, *DpmJob, *Job, *MabJob, *VaultJob +type JobClassification interface { + // GetJob returns the Job content of the underlying type. + GetJob() *Job +} + +// OperationResultInfoBaseClassification provides polymorphic access to related types. +// Call the interface's GetOperationResultInfoBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ExportJobsOperationResultInfo, *OperationResultInfo, *OperationResultInfoBase +type OperationResultInfoBaseClassification interface { + // GetOperationResultInfoBase returns the OperationResultInfoBase content of the underlying type. + GetOperationResultInfoBase() *OperationResultInfoBase +} + +// OperationStatusExtendedInfoClassification provides polymorphic access to related types. +// Call the interface's GetOperationStatusExtendedInfo() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *OperationStatusExtendedInfo, *OperationStatusJobExtendedInfo, *OperationStatusJobsExtendedInfo, *OperationStatusProvisionILRExtendedInfo, +// - *OperationStatusValidateOperationExtendedInfo +type OperationStatusExtendedInfoClassification interface { + // GetOperationStatusExtendedInfo returns the OperationStatusExtendedInfo content of the underlying type. + GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo +} + +// ProtectableContainerClassification provides polymorphic access to related types. +// Call the interface's GetProtectableContainer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureStorageProtectableContainer, *AzureVMAppContainerProtectableContainer, *ProtectableContainer +type ProtectableContainerClassification interface { + // GetProtectableContainer returns the ProtectableContainer content of the underlying type. + GetProtectableContainer() *ProtectableContainer +} + +// ProtectedItemClassification provides polymorphic access to related types. +// Call the interface's GetProtectedItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileshareProtectedItem, *AzureIaaSClassicComputeVMProtectedItem, *AzureIaaSComputeVMProtectedItem, *AzureIaaSVMProtectedItem, +// - *AzureSQLProtectedItem, *AzureVMWorkloadProtectedItem, *AzureVMWorkloadSAPAseDatabaseProtectedItem, *AzureVMWorkloadSAPHanaDBInstanceProtectedItem, +// - *AzureVMWorkloadSAPHanaDatabaseProtectedItem, *AzureVMWorkloadSQLDatabaseProtectedItem, *DPMProtectedItem, *GenericProtectedItem, +// - *MabFileFolderProtectedItem, *ProtectedItem +type ProtectedItemClassification interface { + // GetProtectedItem returns the ProtectedItem content of the underlying type. + GetProtectedItem() *ProtectedItem +} + +// ProtectionContainerClassification provides polymorphic access to related types. +// Call the interface's GetProtectionContainer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureBackupServerContainer, *AzureIaaSClassicComputeVMContainer, *AzureIaaSComputeVMContainer, *AzureSQLAGWorkloadContainerProtectionContainer, +// - *AzureSQLContainer, *AzureStorageContainer, *AzureVMAppContainerProtectionContainer, *AzureWorkloadContainer, *DpmContainer, +// - *GenericContainer, *IaaSVMContainer, *MabContainer, *ProtectionContainer +type ProtectionContainerClassification interface { + // GetProtectionContainer returns the ProtectionContainer content of the underlying type. + GetProtectionContainer() *ProtectionContainer +} + +// ProtectionIntentClassification provides polymorphic access to related types. +// Call the interface's GetProtectionIntent() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureRecoveryServiceVaultProtectionIntent, *AzureResourceProtectionIntent, *AzureWorkloadAutoProtectionIntent, *AzureWorkloadContainerAutoProtectionIntent, +// - *AzureWorkloadSQLAutoProtectionIntent, *ProtectionIntent +type ProtectionIntentClassification interface { + // GetProtectionIntent returns the ProtectionIntent content of the underlying type. + GetProtectionIntent() *ProtectionIntent +} + +// ProtectionPolicyClassification provides polymorphic access to related types. +// Call the interface's GetProtectionPolicy() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareProtectionPolicy, *AzureIaaSVMProtectionPolicy, *AzureSQLProtectionPolicy, *AzureVMWorkloadProtectionPolicy, +// - *GenericProtectionPolicy, *MabProtectionPolicy, *ProtectionPolicy +type ProtectionPolicyClassification interface { + // GetProtectionPolicy returns the ProtectionPolicy content of the underlying type. + GetProtectionPolicy() *ProtectionPolicy +} + +// RecoveryPointClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryPoint() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareRecoveryPoint, *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadRecoveryPoint, *AzureWorkloadSAPAsePointInTimeRecoveryPoint, +// - *AzureWorkloadSAPAseRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint, *AzureWorkloadSAPHanaRecoveryPoint, +// - *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint, *GenericRecoveryPoint, *IaasVMRecoveryPoint, +// - *RecoveryPoint +type RecoveryPointClassification interface { + // GetRecoveryPoint returns the RecoveryPoint content of the underlying type. + GetRecoveryPoint() *RecoveryPoint +} + +// RestoreRequestClassification provides polymorphic access to related types. +// Call the interface's GetRestoreRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareRestoreRequest, *AzureWorkloadPointInTimeRestoreRequest, *AzureWorkloadRestoreRequest, *AzureWorkloadSAPAsePointInTimeRestoreRequest, +// - *AzureWorkloadSAPAseRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, +// - *AzureWorkloadSAPHanaRestoreRequest, *AzureWorkloadSAPHanaRestoreWithRehydrateRequest, *AzureWorkloadSQLPointInTimeRestoreRequest, +// - *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, *AzureWorkloadSQLRestoreWithRehydrateRequest, +// - *IaasVMRestoreRequest, *IaasVMRestoreWithRehydrationRequest, *RestoreRequest +type RestoreRequestClassification interface { + // GetRestoreRequest returns the RestoreRequest content of the underlying type. + GetRestoreRequest() *RestoreRequest +} + +// RetentionPolicyClassification provides polymorphic access to related types. +// Call the interface's GetRetentionPolicy() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *LongTermRetentionPolicy, *RetentionPolicy, *SimpleRetentionPolicy +type RetentionPolicyClassification interface { + // GetRetentionPolicy returns the RetentionPolicy content of the underlying type. + GetRetentionPolicy() *RetentionPolicy +} + +// SchedulePolicyClassification provides polymorphic access to related types. +// Call the interface's GetSchedulePolicy() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *LogSchedulePolicy, *LongTermSchedulePolicy, *SchedulePolicy, *SimpleSchedulePolicy, *SimpleSchedulePolicyV2 +type SchedulePolicyClassification interface { + // GetSchedulePolicy returns the SchedulePolicy content of the underlying type. + GetSchedulePolicy() *SchedulePolicy +} + +// TieringCostInfoClassification provides polymorphic access to related types. +// Call the interface's GetTieringCostInfo() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *TieringCostInfo, *TieringCostRehydrationInfo, *TieringCostSavingInfo +type TieringCostInfoClassification interface { + // GetTieringCostInfo returns the TieringCostInfo content of the underlying type. + GetTieringCostInfo() *TieringCostInfo +} + +// ValidateOperationRequestClassification provides polymorphic access to related types. +// Call the interface's GetValidateOperationRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ValidateIaasVMRestoreOperationRequest, *ValidateOperationRequest, *ValidateRestoreOperationRequest +type ValidateOperationRequestClassification interface { + // GetValidateOperationRequest returns the ValidateOperationRequest content of the underlying type. + GetValidateOperationRequest() *ValidateOperationRequest +} + +// ValidateRestoreOperationRequestClassification provides polymorphic access to related types. +// Call the interface's GetValidateRestoreOperationRequest() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ValidateIaasVMRestoreOperationRequest, *ValidateRestoreOperationRequest +type ValidateRestoreOperationRequestClassification interface { + ValidateOperationRequestClassification + // GetValidateRestoreOperationRequest returns the ValidateRestoreOperationRequest content of the underlying type. + GetValidateRestoreOperationRequest() *ValidateRestoreOperationRequest +} + +// VaultStorageConfigOperationResultResponseClassification provides polymorphic access to related types. +// Call the interface's GetVaultStorageConfigOperationResultResponse() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *PrepareDataMoveResponse, *VaultStorageConfigOperationResultResponse +type VaultStorageConfigOperationResultResponseClassification interface { + // GetVaultStorageConfigOperationResultResponse returns the VaultStorageConfigOperationResultResponse content of the underlying type. + GetVaultStorageConfigOperationResultResponse() *VaultStorageConfigOperationResultResponse +} + +// WorkloadItemClassification provides polymorphic access to related types. +// Call the interface's GetWorkloadItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureVMWorkloadItem, *AzureVMWorkloadSAPAseDatabaseWorkloadItem, *AzureVMWorkloadSAPAseSystemWorkloadItem, *AzureVMWorkloadSAPHanaDatabaseWorkloadItem, +// - *AzureVMWorkloadSAPHanaSystemWorkloadItem, *AzureVMWorkloadSQLDatabaseWorkloadItem, *AzureVMWorkloadSQLInstanceWorkloadItem, +// - *WorkloadItem +type WorkloadItemClassification interface { + // GetWorkloadItem returns the WorkloadItem content of the underlying type. + GetWorkloadItem() *WorkloadItem +} + +// WorkloadProtectableItemClassification provides polymorphic access to related types. +// Call the interface's GetWorkloadProtectableItem() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFileShareProtectableItem, *AzureIaaSClassicComputeVMProtectableItem, *AzureIaaSComputeVMProtectableItem, *AzureVMWorkloadProtectableItem, +// - *AzureVMWorkloadSAPAseDatabaseProtectableItem, *AzureVMWorkloadSAPAseSystemProtectableItem, *AzureVMWorkloadSAPHanaDBInstance, +// - *AzureVMWorkloadSAPHanaDatabaseProtectableItem, *AzureVMWorkloadSAPHanaHSRProtectableItem, *AzureVMWorkloadSAPHanaSystemProtectableItem, +// - *AzureVMWorkloadSQLAvailabilityGroupProtectableItem, *AzureVMWorkloadSQLDatabaseProtectableItem, *AzureVMWorkloadSQLInstanceProtectableItem, +// - *IaaSVMProtectableItem, *WorkloadProtectableItem +type WorkloadProtectableItemClassification interface { + // GetWorkloadProtectableItem returns the WorkloadProtectableItem content of the underlying type. + GetWorkloadProtectableItem() *WorkloadProtectableItem +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/itemlevelrecoveryconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/itemlevelrecoveryconnections_client.go new file mode 100644 index 00000000..70d995c1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/itemlevelrecoveryconnections_client.go @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ItemLevelRecoveryConnectionsClient contains the methods for the ItemLevelRecoveryConnections group. +// Don't use this type directly, use NewItemLevelRecoveryConnectionsClient() instead. +type ItemLevelRecoveryConnectionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewItemLevelRecoveryConnectionsClient creates a new instance of ItemLevelRecoveryConnectionsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewItemLevelRecoveryConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ItemLevelRecoveryConnectionsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ItemLevelRecoveryConnectionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Provision - Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file +// explorer displaying all the recoverable files and folders. This is an asynchronous +// operation. To know the status of provisioning, call GetProtectedItemOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backed up items. +// - containerName - Container name associated with the backed up items. +// - protectedItemName - Backed up item name whose files/folders are to be restored. +// - recoveryPointID - Recovery point ID which represents backed up data. iSCSI connection will be provisioned for this backed +// up data. +// - parameters - resource ILR request +// - options - ItemLevelRecoveryConnectionsClientProvisionOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Provision +// method. +func (client *ItemLevelRecoveryConnectionsClient) Provision(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource, options *ItemLevelRecoveryConnectionsClientProvisionOptions) (ItemLevelRecoveryConnectionsClientProvisionResponse, error) { + var err error + const operationName = "ItemLevelRecoveryConnectionsClient.Provision" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.provisionCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) + if err != nil { + return ItemLevelRecoveryConnectionsClientProvisionResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ItemLevelRecoveryConnectionsClientProvisionResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ItemLevelRecoveryConnectionsClientProvisionResponse{}, err + } + return ItemLevelRecoveryConnectionsClientProvisionResponse{}, nil +} + +// provisionCreateRequest creates the Provision request. +func (client *ItemLevelRecoveryConnectionsClient) provisionCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource, _ *ItemLevelRecoveryConnectionsClientProvisionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + if recoveryPointID == "" { + return nil, errors.New("parameter recoveryPointID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Revoke - Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer +// displaying all recoverable files and folders. This is an asynchronous operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backed up items. +// - containerName - Container name associated with the backed up items. +// - protectedItemName - Backed up item name whose files/folders are to be restored. +// - recoveryPointID - Recovery point ID which represents backed up data. iSCSI connection will be revoked for this backed up +// data. +// - options - ItemLevelRecoveryConnectionsClientRevokeOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Revoke +// method. +func (client *ItemLevelRecoveryConnectionsClient) Revoke(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, options *ItemLevelRecoveryConnectionsClientRevokeOptions) (ItemLevelRecoveryConnectionsClientRevokeResponse, error) { + var err error + const operationName = "ItemLevelRecoveryConnectionsClient.Revoke" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.revokeCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, options) + if err != nil { + return ItemLevelRecoveryConnectionsClientRevokeResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ItemLevelRecoveryConnectionsClientRevokeResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ItemLevelRecoveryConnectionsClientRevokeResponse{}, err + } + return ItemLevelRecoveryConnectionsClientRevokeResponse{}, nil +} + +// revokeCreateRequest creates the Revoke request. +func (client *ItemLevelRecoveryConnectionsClient) revokeCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, _ *ItemLevelRecoveryConnectionsClientRevokeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + if recoveryPointID == "" { + return nil, errors.New("parameter recoveryPointID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/jobcancellations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/jobcancellations_client.go new file mode 100644 index 00000000..89e81ac2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/jobcancellations_client.go @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// JobCancellationsClient contains the methods for the JobCancellations group. +// Don't use this type directly, use NewJobCancellationsClient() instead. +type JobCancellationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobCancellationsClient creates a new instance of JobCancellationsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobCancellationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobCancellationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobCancellationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Trigger - Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call GetCancelOperationResult +// API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - jobName - Name of the job to cancel. +// - options - JobCancellationsClientTriggerOptions contains the optional parameters for the JobCancellationsClient.Trigger +// method. +func (client *JobCancellationsClient) Trigger(ctx context.Context, vaultName string, resourceGroupName string, jobName string, options *JobCancellationsClientTriggerOptions) (JobCancellationsClientTriggerResponse, error) { + var err error + const operationName = "JobCancellationsClient.Trigger" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, jobName, options) + if err != nil { + return JobCancellationsClientTriggerResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobCancellationsClientTriggerResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return JobCancellationsClientTriggerResponse{}, err + } + return JobCancellationsClientTriggerResponse{}, nil +} + +// triggerCreateRequest creates the Trigger request. +func (client *JobCancellationsClient) triggerCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, jobName string, _ *JobCancellationsClientTriggerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/jobdetails_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/jobdetails_client.go new file mode 100644 index 00000000..870b3a9d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/jobdetails_client.go @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// JobDetailsClient contains the methods for the JobDetails group. +// Don't use this type directly, use NewJobDetailsClient() instead. +type JobDetailsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobDetailsClient creates a new instance of JobDetailsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobDetailsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobDetailsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobDetailsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets extended information associated with the job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - jobName - Name of the job whose details are to be fetched. +// - options - JobDetailsClientGetOptions contains the optional parameters for the JobDetailsClient.Get method. +func (client *JobDetailsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string, options *JobDetailsClientGetOptions) (JobDetailsClientGetResponse, error) { + var err error + const operationName = "JobDetailsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, jobName, options) + if err != nil { + return JobDetailsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobDetailsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobDetailsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *JobDetailsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, jobName string, _ *JobDetailsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *JobDetailsClient) getHandleResponse(resp *http.Response) (JobDetailsClientGetResponse, error) { + result := JobDetailsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobResource); err != nil { + return JobDetailsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/joboperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/joboperationresults_client.go new file mode 100644 index 00000000..9a7cd267 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/joboperationresults_client.go @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// JobOperationResultsClient contains the methods for the JobOperationResults group. +// Don't use this type directly, use NewJobOperationResultsClient() instead. +type JobOperationResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobOperationResultsClient creates a new instance of JobOperationResultsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobOperationResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobOperationResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches the result of any operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - jobName - Job name whose operation result has to be fetched. +// - operationID - OperationID which represents the operation whose result has to be fetched. +// - options - JobOperationResultsClientGetOptions contains the optional parameters for the JobOperationResultsClient.Get method. +func (client *JobOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string, operationID string, options *JobOperationResultsClientGetOptions) (JobOperationResultsClientGetResponse, error) { + var err error + const operationName = "JobOperationResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, jobName, operationID, options) + if err != nil { + return JobOperationResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobOperationResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return JobOperationResultsClientGetResponse{}, err + } + return JobOperationResultsClientGetResponse{}, nil +} + +// getCreateRequest creates the Get request. +func (client *JobOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, jobName string, operationID string, _ *JobOperationResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/jobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/jobs_client.go new file mode 100644 index 00000000..cc76636f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/jobs_client.go @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// JobsClient contains the methods for the Jobs group. +// Don't use this type directly, use NewJobsClient() instead. +type JobsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewJobsClient creates a new instance of JobsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &JobsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Export - Triggers export of jobs specified by filters and returns an OperationID to track. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - JobsClientExportOptions contains the optional parameters for the JobsClient.Export method. +func (client *JobsClient) Export(ctx context.Context, vaultName string, resourceGroupName string, options *JobsClientExportOptions) (JobsClientExportResponse, error) { + var err error + const operationName = "JobsClient.Export" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.exportCreateRequest(ctx, vaultName, resourceGroupName, options) + if err != nil { + return JobsClientExportResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return JobsClientExportResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return JobsClientExportResponse{}, err + } + return JobsClientExportResponse{}, nil +} + +// exportCreateRequest creates the Export request. +func (client *JobsClient) exportCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *JobsClientExportOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/models.go new file mode 100644 index 00000000..af7300ca --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/models.go @@ -0,0 +1,9965 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import "time" + +// AzureBackupGoalFeatureSupportRequest - Azure backup goal feature specific request. +type AzureBackupGoalFeatureSupportRequest struct { + // REQUIRED; backup support feature type. + FeatureType *string +} + +// GetFeatureSupportRequest implements the FeatureSupportRequestClassification interface for type AzureBackupGoalFeatureSupportRequest. +func (a *AzureBackupGoalFeatureSupportRequest) GetFeatureSupportRequest() *FeatureSupportRequest { + return &FeatureSupportRequest{ + FeatureType: a.FeatureType, + } +} + +// AzureBackupServerContainer - AzureBackupServer (DPMVenus) workload-specific protection container. +type AzureBackupServerContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Specifies whether the container is re-registrable. + CanReRegister *bool + + // ID of container. + ContainerID *string + + // Backup engine Agent version + DpmAgentVersion *string + + // List of BackupEngines protecting the container + DpmServers []*string + + // Extended Info of the container. + ExtendedInfo *DPMContainerExtendedInfo + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Number of protected items in the BackupEngine + ProtectedItemCount *int64 + + // Protection status of the container. + ProtectionStatus *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string + + // To check if upgrade available + UpgradeAvailable *bool +} + +// GetDpmContainer implements the DpmContainerClassification interface for type AzureBackupServerContainer. +func (a *AzureBackupServerContainer) GetDpmContainer() *DpmContainer { + return &DpmContainer{ + BackupManagementType: a.BackupManagementType, + CanReRegister: a.CanReRegister, + ContainerID: a.ContainerID, + ContainerType: a.ContainerType, + DpmAgentVersion: a.DpmAgentVersion, + DpmServers: a.DpmServers, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + ProtectedItemCount: a.ProtectedItemCount, + ProtectionStatus: a.ProtectionStatus, + RegistrationStatus: a.RegistrationStatus, + UpgradeAvailable: a.UpgradeAvailable, + } +} + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureBackupServerContainer. +func (a *AzureBackupServerContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + } +} + +// AzureBackupServerEngine - Backup engine type when Azure Backup Server is used to manage the backups. +type AzureBackupServerEngine struct { + // REQUIRED; Type of the backup engine. + BackupEngineType *BackupEngineType + + // Backup agent version + AzureBackupAgentVersion *string + + // ID of the backup engine. + BackupEngineID *string + + // Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string + + // Type of backup management for the backup engine. + BackupManagementType *BackupManagementType + + // Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool + + // Backup engine version + DpmVersion *string + + // Extended info of the backupengine + ExtendedInfo *BackupEngineExtendedInfo + + // Friendly name of the backup engine. + FriendlyName *string + + // Backup status of the backup engine. + HealthStatus *string + + // To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool + + // To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool + + // Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string +} + +// GetBackupEngineBase implements the BackupEngineBaseClassification interface for type AzureBackupServerEngine. +func (a *AzureBackupServerEngine) GetBackupEngineBase() *BackupEngineBase { + return &BackupEngineBase{ + AzureBackupAgentVersion: a.AzureBackupAgentVersion, + BackupEngineID: a.BackupEngineID, + BackupEngineState: a.BackupEngineState, + BackupEngineType: a.BackupEngineType, + BackupManagementType: a.BackupManagementType, + CanReRegister: a.CanReRegister, + DpmVersion: a.DpmVersion, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: a.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: a.IsDpmUpgradeAvailable, + RegistrationStatus: a.RegistrationStatus, + } +} + +// AzureFileShareBackupRequest - AzureFileShare workload-specific backup request. +type AzureFileShareBackupRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *time.Time +} + +// GetBackupRequest implements the BackupRequestClassification interface for type AzureFileShareBackupRequest. +func (a *AzureFileShareBackupRequest) GetBackupRequest() *BackupRequest { + return &BackupRequest{ + ObjectType: a.ObjectType, + } +} + +// AzureFileShareProtectableItem - Protectable item for Azure Fileshare workloads. +type AzureFileShareProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // File Share type XSync or XSMB. + AzureFileShareType *AzureFileShareType + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. + ParentContainerFabricID *string + + // Friendly name of container to which this protectable item belongs. + ParentContainerFriendlyName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Type of workload for the backup management + WorkloadType *string +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureFileShareProtectableItem. +func (a *AzureFileShareProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureFileShareProtectionPolicy - AzureStorage backup policy. +type AzureFileShareProtectionPolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + BackupManagementType *string + + // Number of items associated with this policy. + ProtectedItemsCount *int32 + + // ResourceGuard Operation Requests + ResourceGuardOperationRequests []*string + + // Retention policy with the details on backup copy retention ranges. + RetentionPolicy RetentionPolicyClassification + + // Backup schedule specified as part of backup policy. + SchedulePolicy SchedulePolicyClassification + + // TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string + + // Retention policy with the details on hardened backup copy retention ranges. + VaultRetentionPolicy *VaultRetentionPolicy + + // Type of workload for the backup management + WorkLoadType *WorkloadType +} + +// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureFileShareProtectionPolicy. +func (a *AzureFileShareProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { + return &ProtectionPolicy{ + BackupManagementType: a.BackupManagementType, + ProtectedItemsCount: a.ProtectedItemsCount, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureFileShareProvisionILRRequest - Update snapshot Uri with the correct friendly Name of the source Azure file share. +type AzureFileShareProvisionILRRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Recovery point ID. + RecoveryPointID *string + + // Source Storage account ARM Id + SourceResourceID *string +} + +// GetILRRequest implements the ILRRequestClassification interface for type AzureFileShareProvisionILRRequest. +func (a *AzureFileShareProvisionILRRequest) GetILRRequest() *ILRRequest { + return &ILRRequest{ + ObjectType: a.ObjectType, + } +} + +// AzureFileShareRecoveryPoint - Azure File Share workload specific backup copy. +type AzureFileShareRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Contains Url to the snapshot of fileshare, if applicable + FileShareSnapshotURI *string + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Contains recovery point size + RecoveryPointSizeInGB *int32 + + // Recovery point tier information. + RecoveryPointTierDetails []*RecoveryPointTierInformation + + // Time at which this backup copy was created. + RecoveryPointTime *time.Time + + // Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. + RecoveryPointType *string +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureFileShareRecoveryPoint. +func (a *AzureFileShareRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: a.ObjectType, + } +} + +// AzureFileShareRestoreRequest - AzureFileShare Restore Request +type AzureFileShareRestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Options to resolve copy conflicts. + CopyOptions *CopyOptions + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // List of Source Files/Folders(which need to recover) and TargetFolderPath details + RestoreFileSpecs []*RestoreFileSpecs + + // Restore Type (FullShareRestore or ItemLevelRestore) + RestoreRequestType *RestoreRequestType + + // Source storage account ARM Id + SourceResourceID *string + + // Target File Share Details + TargetDetails *TargetAFSRestoreInfo +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureFileShareRestoreRequest. +func (a *AzureFileShareRestoreRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureFileshareProtectedItem - Azure File Share workload-specific backup item. +type AzureFileshareProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information with this backup item. + ExtendedInfo *AzureFileshareProtectedItemExtendedInfo + + // Friendly name of the fileshare represented by this backup item. + FriendlyName *string + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Health details of different KPIs + KpisHealths map[string]*KPIResourceHealthDetails + + // Last backup operation status. Possible values: Healthy, Unhealthy. + LastBackupStatus *string + + // Timestamp of the last backup operation on this backup item. + LastBackupTime *time.Time + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Backup state of this backup item. + ProtectionState *ProtectionState + + // Backup status of this backup item. + ProtectionStatus *string + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type AzureFileshareProtectedItem. +func (a *AzureFileshareProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// AzureFileshareProtectedItemExtendedInfo - Additional information about Azure File Share backup item. +type AzureFileshareProtectedItemExtendedInfo struct { + // The oldest backup copy available for this item in the service. + OldestRecoveryPoint *time.Time + + // Indicates consistency of policy object and policy applied to this backup item. + PolicyState *string + + // Number of available backup copies associated with this backup item. + RecoveryPointCount *int32 + + // READ-ONLY; Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, + // Deleted} + ResourceState *string + + // READ-ONLY; The resource state sync time for this backup item. + ResourceStateSyncTime *time.Time +} + +// AzureIaaSClassicComputeVMContainer - IaaS VM workload-specific backup item representing a classic virtual machine. +type AzureIaaSClassicComputeVMContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string + + // Resource group name of Recovery Services Vault. + ResourceGroup *string + + // Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string + + // Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string +} + +// GetIaaSVMContainer implements the IaaSVMContainerClassification interface for type AzureIaaSClassicComputeVMContainer. +func (a *AzureIaaSClassicComputeVMContainer) GetIaaSVMContainer() *IaaSVMContainer { + return &IaaSVMContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + ResourceGroup: a.ResourceGroup, + VirtualMachineID: a.VirtualMachineID, + VirtualMachineVersion: a.VirtualMachineVersion, + } +} + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureIaaSClassicComputeVMContainer. +func (a *AzureIaaSClassicComputeVMContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + } +} + +// AzureIaaSClassicComputeVMProtectableItem - IaaS VM workload-specific backup item representing the Classic Compute VM. +type AzureIaaSClassicComputeVMProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Resource group name of Recovery Services Vault. + ResourceGroup *string + + // Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string + + // Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string + + // Type of workload for the backup management + WorkloadType *string +} + +// GetIaaSVMProtectableItem implements the IaaSVMProtectableItemClassification interface for type AzureIaaSClassicComputeVMProtectableItem. +func (a *AzureIaaSClassicComputeVMProtectableItem) GetIaaSVMProtectableItem() *IaaSVMProtectableItem { + return &IaaSVMProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ResourceGroup: a.ResourceGroup, + VirtualMachineID: a.VirtualMachineID, + VirtualMachineVersion: a.VirtualMachineVersion, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureIaaSClassicComputeVMProtectableItem. +func (a *AzureIaaSClassicComputeVMProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureIaaSClassicComputeVMProtectedItem - IaaS VM workload-specific backup item representing the Classic Compute VM. +type AzureIaaSClassicComputeVMProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information for this backup item. + ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo + + // Extended Properties for Azure IaasVM Backup. + ExtendedProperties *ExtendedProperties + + // Health details on this backup item. + HealthDetails []*AzureIaaSVMHealthDetails + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Health details of different KPIs + KpisHealths map[string]*KPIResourceHealthDetails + + // Last backup operation status. + LastBackupStatus *string + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Backup state of this backup item. + ProtectionState *ProtectionState + + // Backup status of this backup item. + ProtectionStatus *string + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; Friendly name of the VM represented by this backup item. + FriendlyName *string + + // READ-ONLY; Health status of protected item. + HealthStatus *HealthStatus + + // READ-ONLY; Timestamp of the last backup operation on this backup item. + LastBackupTime *time.Time + + // READ-ONLY; Type of the policy used for protection + PolicyType *string + + // READ-ONLY; Data ID of the protected item. + ProtectedItemDataID *string + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Fully qualified ARM ID of the virtual machine represented by this item. + VirtualMachineID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetAzureIaaSVMProtectedItem implements the AzureIaaSVMProtectedItemClassification interface for type AzureIaaSClassicComputeVMProtectedItem. +func (a *AzureIaaSClassicComputeVMProtectedItem) GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem { + return &AzureIaaSVMProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + ExtendedProperties: a.ExtendedProperties, + FriendlyName: a.FriendlyName, + HealthDetails: a.HealthDetails, + HealthStatus: a.HealthStatus, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + PolicyType: a.PolicyType, + ProtectedItemDataID: a.ProtectedItemDataID, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + VirtualMachineID: a.VirtualMachineID, + WorkloadType: a.WorkloadType, + } +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type AzureIaaSClassicComputeVMProtectedItem. +func (a *AzureIaaSClassicComputeVMProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// AzureIaaSComputeVMContainer - IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. +type AzureIaaSComputeVMContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string + + // Resource group name of Recovery Services Vault. + ResourceGroup *string + + // Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string + + // Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string +} + +// GetIaaSVMContainer implements the IaaSVMContainerClassification interface for type AzureIaaSComputeVMContainer. +func (a *AzureIaaSComputeVMContainer) GetIaaSVMContainer() *IaaSVMContainer { + return &IaaSVMContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + ResourceGroup: a.ResourceGroup, + VirtualMachineID: a.VirtualMachineID, + VirtualMachineVersion: a.VirtualMachineVersion, + } +} + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureIaaSComputeVMContainer. +func (a *AzureIaaSComputeVMContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + } +} + +// AzureIaaSComputeVMProtectableItem - IaaS VM workload-specific backup item representing the Azure Resource Manager VM. +type AzureIaaSComputeVMProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Resource group name of Recovery Services Vault. + ResourceGroup *string + + // Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string + + // Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string + + // Type of workload for the backup management + WorkloadType *string +} + +// GetIaaSVMProtectableItem implements the IaaSVMProtectableItemClassification interface for type AzureIaaSComputeVMProtectableItem. +func (a *AzureIaaSComputeVMProtectableItem) GetIaaSVMProtectableItem() *IaaSVMProtectableItem { + return &IaaSVMProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ResourceGroup: a.ResourceGroup, + VirtualMachineID: a.VirtualMachineID, + VirtualMachineVersion: a.VirtualMachineVersion, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureIaaSComputeVMProtectableItem. +func (a *AzureIaaSComputeVMProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureIaaSComputeVMProtectedItem - IaaS VM workload-specific backup item representing the Azure Resource Manager VM. +type AzureIaaSComputeVMProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information for this backup item. + ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo + + // Extended Properties for Azure IaasVM Backup. + ExtendedProperties *ExtendedProperties + + // Health details on this backup item. + HealthDetails []*AzureIaaSVMHealthDetails + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Health details of different KPIs + KpisHealths map[string]*KPIResourceHealthDetails + + // Last backup operation status. + LastBackupStatus *string + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Backup state of this backup item. + ProtectionState *ProtectionState + + // Backup status of this backup item. + ProtectionStatus *string + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; Friendly name of the VM represented by this backup item. + FriendlyName *string + + // READ-ONLY; Health status of protected item. + HealthStatus *HealthStatus + + // READ-ONLY; Timestamp of the last backup operation on this backup item. + LastBackupTime *time.Time + + // READ-ONLY; Type of the policy used for protection + PolicyType *string + + // READ-ONLY; Data ID of the protected item. + ProtectedItemDataID *string + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Fully qualified ARM ID of the virtual machine represented by this item. + VirtualMachineID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetAzureIaaSVMProtectedItem implements the AzureIaaSVMProtectedItemClassification interface for type AzureIaaSComputeVMProtectedItem. +func (a *AzureIaaSComputeVMProtectedItem) GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem { + return &AzureIaaSVMProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + ExtendedProperties: a.ExtendedProperties, + FriendlyName: a.FriendlyName, + HealthDetails: a.HealthDetails, + HealthStatus: a.HealthStatus, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + PolicyType: a.PolicyType, + ProtectedItemDataID: a.ProtectedItemDataID, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + VirtualMachineID: a.VirtualMachineID, + WorkloadType: a.WorkloadType, + } +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type AzureIaaSComputeVMProtectedItem. +func (a *AzureIaaSComputeVMProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// AzureIaaSVMErrorInfo - Azure IaaS VM workload-specific error information. +type AzureIaaSVMErrorInfo struct { + // READ-ONLY; Error code. + ErrorCode *int32 + + // READ-ONLY; Localized error string. + ErrorString *string + + // READ-ONLY; Title: Typically, the entity that the error pertains to. + ErrorTitle *string + + // READ-ONLY; List of localized recommendations for above error code. + Recommendations []*string +} + +// AzureIaaSVMHealthDetails - Azure IaaS VM workload-specific Health Details. +type AzureIaaSVMHealthDetails struct { + // READ-ONLY; Health Code + Code *int32 + + // READ-ONLY; Health Message + Message *string + + // READ-ONLY; Health Recommended Actions + Recommendations []*string + + // READ-ONLY; Health Title + Title *string +} + +// AzureIaaSVMJob - Azure IaaS VM workload-specific job object. +type AzureIaaSVMJob struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + JobType *string + + // Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo []*JobSupportedAction + + // ActivityId of job. + ActivityID *string + + // Backup management type to execute the current job. + BackupManagementType *BackupManagementType + + // Container name of the entity on which the current job is executing. + ContainerName *string + + // Time elapsed during the execution of this job. + Duration *string + + // The end time. + EndTime *time.Time + + // Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string + + // Error details on execution of this job. + ErrorDetails []*AzureIaaSVMErrorInfo + + // Additional information for this job. + ExtendedInfo *AzureIaaSVMJobExtendedInfo + + // Indicated that whether the job is adhoc(true) or scheduled(false) + IsUserTriggered *bool + + // The operation name. + Operation *string + + // The start time. + StartTime *time.Time + + // Job status. + Status *string + + // Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string +} + +// GetJob implements the JobClassification interface for type AzureIaaSVMJob. +func (a *AzureIaaSVMJob) GetJob() *Job { + return &Job{ + ActivityID: a.ActivityID, + BackupManagementType: a.BackupManagementType, + EndTime: a.EndTime, + EntityFriendlyName: a.EntityFriendlyName, + JobType: a.JobType, + Operation: a.Operation, + StartTime: a.StartTime, + Status: a.Status, + } +} + +// AzureIaaSVMJobExtendedInfo - Azure IaaS VM workload-specific additional information for job. +type AzureIaaSVMJobExtendedInfo struct { + // Non localized error message on job execution. + DynamicErrorMessage *string + + // Time remaining for execution of this job. + EstimatedRemainingDuration *string + + // Job internal properties. + InternalPropertyBag map[string]*string + + // Indicates progress of the job. Null if it has not started or completed. + ProgressPercentage *float64 + + // Job properties. + PropertyBag map[string]*string + + // List of tasks associated with this job. + TasksList []*AzureIaaSVMJobTaskDetails +} + +// AzureIaaSVMJobTaskDetails - Azure IaaS VM workload-specific job task details. +type AzureIaaSVMJobTaskDetails struct { + // Time elapsed for task. + Duration *string + + // The end time. + EndTime *time.Time + + // The instanceId. + InstanceID *string + + // Progress of the task. + ProgressPercentage *float64 + + // The start time. + StartTime *time.Time + + // The status. + Status *string + + // Details about execution of the task. eg: number of bytes transferred etc + TaskExecutionDetails *string + + // The task display name. + TaskID *string +} + +// AzureIaaSVMJobV2 - Azure IaaS VM workload-specific job object. +type AzureIaaSVMJobV2 struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + JobType *string + + // Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo []*JobSupportedAction + + // ActivityId of job. + ActivityID *string + + // Backup management type to execute the current job. + BackupManagementType *BackupManagementType + + // Container name of the entity on which the current job is executing. + ContainerName *string + + // Time elapsed during the execution of this job. + Duration *string + + // The end time. + EndTime *time.Time + + // Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string + + // Error details on execution of this job. + ErrorDetails []*AzureIaaSVMErrorInfo + + // Additional information for this job. + ExtendedInfo *AzureIaaSVMJobExtendedInfo + + // The operation name. + Operation *string + + // The start time. + StartTime *time.Time + + // Job status. + Status *string + + // Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string +} + +// GetJob implements the JobClassification interface for type AzureIaaSVMJobV2. +func (a *AzureIaaSVMJobV2) GetJob() *Job { + return &Job{ + ActivityID: a.ActivityID, + BackupManagementType: a.BackupManagementType, + EndTime: a.EndTime, + EntityFriendlyName: a.EntityFriendlyName, + JobType: a.JobType, + Operation: a.Operation, + StartTime: a.StartTime, + Status: a.Status, + } +} + +// AzureIaaSVMProtectedItem - IaaS VM workload-specific backup item. +type AzureIaaSVMProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information for this backup item. + ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo + + // Extended Properties for Azure IaasVM Backup. + ExtendedProperties *ExtendedProperties + + // Health details on this backup item. + HealthDetails []*AzureIaaSVMHealthDetails + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Health details of different KPIs + KpisHealths map[string]*KPIResourceHealthDetails + + // Last backup operation status. + LastBackupStatus *string + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Backup state of this backup item. + ProtectionState *ProtectionState + + // Backup status of this backup item. + ProtectionStatus *string + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; Friendly name of the VM represented by this backup item. + FriendlyName *string + + // READ-ONLY; Health status of protected item. + HealthStatus *HealthStatus + + // READ-ONLY; Timestamp of the last backup operation on this backup item. + LastBackupTime *time.Time + + // READ-ONLY; Type of the policy used for protection + PolicyType *string + + // READ-ONLY; Data ID of the protected item. + ProtectedItemDataID *string + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Fully qualified ARM ID of the virtual machine represented by this item. + VirtualMachineID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetAzureIaaSVMProtectedItem implements the AzureIaaSVMProtectedItemClassification interface for type AzureIaaSVMProtectedItem. +func (a *AzureIaaSVMProtectedItem) GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem { return a } + +// GetProtectedItem implements the ProtectedItemClassification interface for type AzureIaaSVMProtectedItem. +func (a *AzureIaaSVMProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// AzureIaaSVMProtectedItemExtendedInfo - Additional information on Azure IaaS VM specific backup item. +type AzureIaaSVMProtectedItemExtendedInfo struct { + // The latest backup copy available for this backup item in archive tier + NewestRecoveryPointInArchive *time.Time + + // The oldest backup copy available for this backup item across all tiers. + OldestRecoveryPoint *time.Time + + // The oldest backup copy available for this backup item in archive tier + OldestRecoveryPointInArchive *time.Time + + // The oldest backup copy available for this backup item in vault tier + OldestRecoveryPointInVault *time.Time + + // Specifies if backup policy associated with the backup item is inconsistent. + PolicyInconsistent *bool + + // Number of backup copies available for this backup item. + RecoveryPointCount *int32 +} + +// AzureIaaSVMProtectionPolicy - IaaS VM workload-specific backup policy. +type AzureIaaSVMProtectionPolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + BackupManagementType *string + InstantRPDetails *InstantRPAdditionalDetails + + // Instant RP retention policy range in days + InstantRpRetentionRangeInDays *int32 + PolicyType *IAASVMPolicyType + + // Number of items associated with this policy. + ProtectedItemsCount *int32 + + // ResourceGuard Operation Requests + ResourceGuardOperationRequests []*string + + // Retention policy with the details on backup copy retention ranges. + RetentionPolicy RetentionPolicyClassification + + // Backup schedule specified as part of backup policy. + SchedulePolicy SchedulePolicyClassification + SnapshotConsistencyType *IaasVMSnapshotConsistencyType + + // Tiering policy to automatically move RPs to another tier Key is Target Tier, defined in RecoveryPointTierType enum. Tiering + // policy specifies the criteria to move RP to the target tier. + TieringPolicy map[string]*TieringPolicy + + // TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string +} + +// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureIaaSVMProtectionPolicy. +func (a *AzureIaaSVMProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { + return &ProtectionPolicy{ + BackupManagementType: a.BackupManagementType, + ProtectedItemsCount: a.ProtectedItemsCount, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureRecoveryServiceVaultProtectionIntent - Azure Recovery Services Vault specific protection intent item. +type AzureRecoveryServiceVaultProtectionIntent struct { + // REQUIRED; backup protectionIntent type. + ProtectionIntentItemType *ProtectionIntentItemType + + // Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Backup state of this backup item. + ProtectionState *ProtectionStatus + + // ARM ID of the resource to be backed up. + SourceResourceID *string +} + +// GetAzureRecoveryServiceVaultProtectionIntent implements the AzureRecoveryServiceVaultProtectionIntentClassification interface +// for type AzureRecoveryServiceVaultProtectionIntent. +func (a *AzureRecoveryServiceVaultProtectionIntent) GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent { + return a +} + +// GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureRecoveryServiceVaultProtectionIntent. +func (a *AzureRecoveryServiceVaultProtectionIntent) GetProtectionIntent() *ProtectionIntent { + return &ProtectionIntent{ + BackupManagementType: a.BackupManagementType, + ItemID: a.ItemID, + PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, + ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, + } +} + +// AzureResourceProtectionIntent - IaaS VM specific backup protection intent item. +type AzureResourceProtectionIntent struct { + // REQUIRED; backup protectionIntent type. + ProtectionIntentItemType *ProtectionIntentItemType + + // Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // Friendly name of the VM represented by this backup item. + FriendlyName *string + + // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Backup state of this backup item. + ProtectionState *ProtectionStatus + + // ARM ID of the resource to be backed up. + SourceResourceID *string +} + +// GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureResourceProtectionIntent. +func (a *AzureResourceProtectionIntent) GetProtectionIntent() *ProtectionIntent { + return &ProtectionIntent{ + BackupManagementType: a.BackupManagementType, + ItemID: a.ItemID, + PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, + ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, + } +} + +// AzureSQLAGWorkloadContainerProtectionContainer - Container for SQL workloads under SQL Availability Group. +type AzureSQLAGWorkloadContainerProtectionContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Time stamp when this container was updated. + LastUpdatedTime *time.Time + + // Re-Do Operation + OperationType *OperationType + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string + + // ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string + + // Workload type for which registration was sent. + WorkloadType *WorkloadType +} + +// GetAzureWorkloadContainer implements the AzureWorkloadContainerClassification interface for type AzureSQLAGWorkloadContainerProtectionContainer. +func (a *AzureSQLAGWorkloadContainerProtectionContainer) GetAzureWorkloadContainer() *AzureWorkloadContainer { + return &AzureWorkloadContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + LastUpdatedTime: a.LastUpdatedTime, + OperationType: a.OperationType, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, + } +} + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureSQLAGWorkloadContainerProtectionContainer. +func (a *AzureSQLAGWorkloadContainerProtectionContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + } +} + +// AzureSQLContainer - Azure Sql workload-specific container. +type AzureSQLContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string +} + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureSQLContainer. +func (a *AzureSQLContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + } +} + +// AzureSQLProtectedItem - Azure SQL workload-specific backup item. +type AzureSQLProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information for this backup item. + ExtendedInfo *AzureSQLProtectedItemExtendedInfo + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. + ProtectedItemDataID *string + + // Backup state of the backed up item. + ProtectionState *ProtectedItemState + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type AzureSQLProtectedItem. +func (a *AzureSQLProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// AzureSQLProtectedItemExtendedInfo - Additional information on Azure Sql specific protected item. +type AzureSQLProtectedItemExtendedInfo struct { + // The oldest backup copy available for this item in the service. + OldestRecoveryPoint *time.Time + + // State of the backup policy associated with this backup item. + PolicyState *string + + // Number of available backup copies associated with this backup item. + RecoveryPointCount *int32 +} + +// AzureSQLProtectionPolicy - Azure SQL workload-specific backup policy. +type AzureSQLProtectionPolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + BackupManagementType *string + + // Number of items associated with this policy. + ProtectedItemsCount *int32 + + // ResourceGuard Operation Requests + ResourceGuardOperationRequests []*string + + // Retention policy details. + RetentionPolicy RetentionPolicyClassification +} + +// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureSQLProtectionPolicy. +func (a *AzureSQLProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { + return &ProtectionPolicy{ + BackupManagementType: a.BackupManagementType, + ProtectedItemsCount: a.ProtectedItemsCount, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureStorageContainer - Azure Storage Account workload-specific container. +type AzureStorageContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Whether storage account lock is to be acquired for this container or not. + AcquireStorageAccountLock *AcquireStorageAccountLock + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Re-Do Operation + OperationType *OperationType + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Number of items backed up in this container. + ProtectedItemCount *int64 + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string + + // Resource group name of Recovery Services Vault. + ResourceGroup *string + + // Fully qualified ARM url. + SourceResourceID *string + + // Storage account version. + StorageAccountVersion *string +} + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureStorageContainer. +func (a *AzureStorageContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + } +} + +// AzureStorageErrorInfo - Azure storage specific error information +type AzureStorageErrorInfo struct { + // Error code. + ErrorCode *int32 + + // Localized error string. + ErrorString *string + + // List of localized recommendations for above error code. + Recommendations []*string +} + +// AzureStorageJob - Azure storage specific job. +type AzureStorageJob struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + JobType *string + + // Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo []*JobSupportedAction + + // ActivityId of job. + ActivityID *string + + // Backup management type to execute the current job. + BackupManagementType *BackupManagementType + + // Time elapsed during the execution of this job. + Duration *string + + // The end time. + EndTime *time.Time + + // Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string + + // Error details on execution of this job. + ErrorDetails []*AzureStorageErrorInfo + + // Additional information about the job. + ExtendedInfo *AzureStorageJobExtendedInfo + + // Indicated that whether the job is adhoc(true) or scheduled(false) + IsUserTriggered *bool + + // The operation name. + Operation *string + + // The start time. + StartTime *time.Time + + // Job status. + Status *string + + // Specifies friendly name of the storage account. + StorageAccountName *string + + // Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. + StorageAccountVersion *string +} + +// GetJob implements the JobClassification interface for type AzureStorageJob. +func (a *AzureStorageJob) GetJob() *Job { + return &Job{ + ActivityID: a.ActivityID, + BackupManagementType: a.BackupManagementType, + EndTime: a.EndTime, + EntityFriendlyName: a.EntityFriendlyName, + JobType: a.JobType, + Operation: a.Operation, + StartTime: a.StartTime, + Status: a.Status, + } +} + +// AzureStorageJobExtendedInfo - Azure Storage workload-specific additional information for job. +type AzureStorageJobExtendedInfo struct { + // Non localized error message on job execution. + DynamicErrorMessage *string + + // Job properties. + PropertyBag map[string]*string + + // List of tasks for this job + TasksList []*AzureStorageJobTaskDetails +} + +// AzureStorageJobTaskDetails - Azure storage workload specific job task details. +type AzureStorageJobTaskDetails struct { + // The status. + Status *string + + // The task display name. + TaskID *string +} + +// AzureStorageProtectableContainer - Azure Storage-specific protectable containers +type AzureStorageProtectableContainer struct { + // REQUIRED; Type of the container. The value of this property for + // 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + ProtectableContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Fabric Id of the container such as ARM Id. + ContainerID *string + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string +} + +// GetProtectableContainer implements the ProtectableContainerClassification interface for type AzureStorageProtectableContainer. +func (a *AzureStorageProtectableContainer) GetProtectableContainer() *ProtectableContainer { + return &ProtectableContainer{ + BackupManagementType: a.BackupManagementType, + ContainerID: a.ContainerID, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableContainerType: a.ProtectableContainerType, + } +} + +// AzureVMAppContainerProtectableContainer - Azure workload-specific container +type AzureVMAppContainerProtectableContainer struct { + // REQUIRED; Type of the container. The value of this property for + // 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + ProtectableContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Fabric Id of the container such as ARM Id. + ContainerID *string + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string +} + +// GetProtectableContainer implements the ProtectableContainerClassification interface for type AzureVMAppContainerProtectableContainer. +func (a *AzureVMAppContainerProtectableContainer) GetProtectableContainer() *ProtectableContainer { + return &ProtectableContainer{ + BackupManagementType: a.BackupManagementType, + ContainerID: a.ContainerID, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableContainerType: a.ProtectableContainerType, + } +} + +// AzureVMAppContainerProtectionContainer - Container for SQL workloads under Azure Virtual Machines. +type AzureVMAppContainerProtectionContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Time stamp when this container was updated. + LastUpdatedTime *time.Time + + // Re-Do Operation + OperationType *OperationType + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string + + // ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string + + // Workload type for which registration was sent. + WorkloadType *WorkloadType +} + +// GetAzureWorkloadContainer implements the AzureWorkloadContainerClassification interface for type AzureVMAppContainerProtectionContainer. +func (a *AzureVMAppContainerProtectionContainer) GetAzureWorkloadContainer() *AzureWorkloadContainer { + return &AzureWorkloadContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + LastUpdatedTime: a.LastUpdatedTime, + OperationType: a.OperationType, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + SourceResourceID: a.SourceResourceID, + WorkloadType: a.WorkloadType, + } +} + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureVMAppContainerProtectionContainer. +func (a *AzureVMAppContainerProtectionContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + } +} + +// AzureVMResourceFeatureSupportRequest - AzureResource(IaaS VM) Specific feature support request +type AzureVMResourceFeatureSupportRequest struct { + // REQUIRED; backup support feature type. + FeatureType *string + + // SKUs (Premium/Managed etc) in case of IaasVM + VMSKU *string + + // Size of the resource: VM size(A/D series etc) in case of IaasVM + VMSize *string +} + +// GetFeatureSupportRequest implements the FeatureSupportRequestClassification interface for type AzureVMResourceFeatureSupportRequest. +func (a *AzureVMResourceFeatureSupportRequest) GetFeatureSupportRequest() *FeatureSupportRequest { + return &FeatureSupportRequest{ + FeatureType: a.FeatureType, + } +} + +// AzureVMResourceFeatureSupportResponse - Response for feature support requests for Azure IaasVm +type AzureVMResourceFeatureSupportResponse struct { + // Support status of feature + SupportStatus *SupportStatus +} + +// AzureVMWorkloadItem - Azure VM workload-specific workload item. +type AzureVMWorkloadItem struct { + // REQUIRED; Type of the backup item. + WorkloadItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if workload item is auto-protectable + IsAutoProtectable *bool + + // Name for instance or AG + ParentName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadItem. +func (a *AzureVMWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { return a } + +// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadItem. +func (a *AzureVMWorkloadItem) GetWorkloadItem() *WorkloadItem { + return &WorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadProtectableItem - Azure VM workload-specific protectable item. +type AzureVMWorkloadProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if protectable item is auto-protectable + IsAutoProtectable *bool + + // Indicates if protectable item is auto-protected + IsAutoProtected *bool + + // Indicates if item is protectable + IsProtectable *bool + + // Name for instance or AG + ParentName *string + + // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where + // the parent would be either Instance or a SQL AG. + ParentUniqueName *string + + // Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadProtectableItem. +func (a *AzureVMWorkloadProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { + return a +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadProtectableItem. +func (a *AzureVMWorkloadProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadProtectedItem - Azure VM workload-specific protected item. +type AzureVMWorkloadProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Health details of different KPIs + KpisHealths map[string]*KPIResourceHealthDetails + + // Error details in last backup + LastBackupErrorDetail *ErrorDetail + + // Last backup operation status. Possible values: Healthy, Unhealthy. + LastBackupStatus *LastBackupStatus + + // Timestamp of the last backup operation on this backup item. + LastBackupTime *time.Time + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + + // Parent name of the DB such as Instance or Availability Group. + ParentName *string + + // Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Data ID of the protected item. + ProtectedItemDataSourceID *string + + // Health status of the backup item, evaluated based on last heartbeat received + ProtectedItemHealthStatus *ProtectedItemHealthStatus + + // Backup state of this backup item. + ProtectionState *ProtectionState + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Host/Cluster Name for instance or AG + ServerName *string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; Friendly name of the DB represented by this backup item. + FriendlyName *string + + // READ-ONLY; Backup status of this backup item. + ProtectionStatus *string + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadProtectedItem. +func (a *AzureVMWorkloadProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { + return a +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadProtectedItem. +func (a *AzureVMWorkloadProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadProtectedItemExtendedInfo - Additional information on Azure Workload for SQL specific backup item. +type AzureVMWorkloadProtectedItemExtendedInfo struct { + // The latest backup copy available for this backup item in archive tier + NewestRecoveryPointInArchive *time.Time + + // The oldest backup copy available for this backup item across all tiers. + OldestRecoveryPoint *time.Time + + // The oldest backup copy available for this backup item in archive tier + OldestRecoveryPointInArchive *time.Time + + // The oldest backup copy available for this backup item in vault tier + OldestRecoveryPointInVault *time.Time + + // Indicates consistency of policy object and policy applied to this backup item. + PolicyState *string + + // Indicates consistency of policy object and policy applied to this backup item. + RecoveryModel *string + + // Number of backup copies available for this backup item. + RecoveryPointCount *int32 +} + +// AzureVMWorkloadProtectionPolicy - Azure VM (Mercury) workload-specific backup policy. +type AzureVMWorkloadProtectionPolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + BackupManagementType *string + + // Fix the policy inconsistency + MakePolicyConsistent *bool + + // Number of items associated with this policy. + ProtectedItemsCount *int32 + + // ResourceGuard Operation Requests + ResourceGuardOperationRequests []*string + + // Common settings for the backup management + Settings *Settings + + // List of sub-protection policies which includes schedule and retention + SubProtectionPolicy []*SubProtectionPolicy + + // Type of workload for the backup management + WorkLoadType *WorkloadType +} + +// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureVMWorkloadProtectionPolicy. +func (a *AzureVMWorkloadProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { + return &ProtectionPolicy{ + BackupManagementType: a.BackupManagementType, + ProtectedItemsCount: a.ProtectedItemsCount, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureVMWorkloadSAPAseDatabaseProtectableItem - Azure VM workload-specific protectable item representing SAP ASE Database. +type AzureVMWorkloadSAPAseDatabaseProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if protectable item is auto-protectable + IsAutoProtectable *bool + + // Indicates if protectable item is auto-protected + IsAutoProtected *bool + + // Indicates if item is protectable + IsProtectable *bool + + // Name for instance or AG + ParentName *string + + // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where + // the parent would be either Instance or a SQL AG. + ParentUniqueName *string + + // Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPAseDatabaseProtectableItem. +func (a *AzureVMWorkloadSAPAseDatabaseProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { + return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, + ParentName: a.ParentName, + ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + Subinquireditemcount: a.Subinquireditemcount, + Subprotectableitemcount: a.Subprotectableitemcount, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPAseDatabaseProtectableItem. +func (a *AzureVMWorkloadSAPAseDatabaseProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPAseDatabaseProtectedItem - Azure VM workload-specific protected item representing SAP ASE Database. +type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Health details of different KPIs + KpisHealths map[string]*KPIResourceHealthDetails + + // Error details in last backup + LastBackupErrorDetail *ErrorDetail + + // Last backup operation status. Possible values: Healthy, Unhealthy. + LastBackupStatus *LastBackupStatus + + // Timestamp of the last backup operation on this backup item. + LastBackupTime *time.Time + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + + // Parent name of the DB such as Instance or Availability Group. + ParentName *string + + // Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Data ID of the protected item. + ProtectedItemDataSourceID *string + + // Health status of the backup item, evaluated based on last heartbeat received + ProtectedItemHealthStatus *ProtectedItemHealthStatus + + // Backup state of this backup item. + ProtectionState *ProtectionState + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Host/Cluster Name for instance or AG + ServerName *string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; Friendly name of the DB represented by this backup item. + FriendlyName *string + + // READ-ONLY; Backup status of this backup item. + ProtectionStatus *string + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (a *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { + return &AzureVMWorkloadProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupErrorDetail: a.LastBackupErrorDetail, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + NodesList: a.NodesList, + ParentName: a.ParentName, + ParentType: a.ParentType, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, + ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ServerName: a.ServerName, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (a *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPAseDatabaseWorkloadItem - Azure VM workload-specific workload item representing SAP ASE Database. +type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { + // REQUIRED; Type of the backup item. + WorkloadItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if workload item is auto-protectable + IsAutoProtectable *bool + + // Name for instance or AG + ParentName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (a *AzureVMWorkloadSAPAseDatabaseWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { + return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + ParentName: a.ParentName, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + SubWorkloadItemCount: a.SubWorkloadItemCount, + Subinquireditemcount: a.Subinquireditemcount, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (a *AzureVMWorkloadSAPAseDatabaseWorkloadItem) GetWorkloadItem() *WorkloadItem { + return &WorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPAseSystemProtectableItem - Azure VM workload-specific protectable item representing SAP ASE System. +type AzureVMWorkloadSAPAseSystemProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if protectable item is auto-protectable + IsAutoProtectable *bool + + // Indicates if protectable item is auto-protected + IsAutoProtected *bool + + // Indicates if item is protectable + IsProtectable *bool + + // Name for instance or AG + ParentName *string + + // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where + // the parent would be either Instance or a SQL AG. + ParentUniqueName *string + + // Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPAseSystemProtectableItem. +func (a *AzureVMWorkloadSAPAseSystemProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { + return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, + ParentName: a.ParentName, + ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + Subinquireditemcount: a.Subinquireditemcount, + Subprotectableitemcount: a.Subprotectableitemcount, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPAseSystemProtectableItem. +func (a *AzureVMWorkloadSAPAseSystemProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPAseSystemWorkloadItem - Azure VM workload-specific workload item representing SAP ASE System. +type AzureVMWorkloadSAPAseSystemWorkloadItem struct { + // REQUIRED; Type of the backup item. + WorkloadItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if workload item is auto-protectable + IsAutoProtectable *bool + + // Name for instance or AG + ParentName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPAseSystemWorkloadItem. +func (a *AzureVMWorkloadSAPAseSystemWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { + return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + ParentName: a.ParentName, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + SubWorkloadItemCount: a.SubWorkloadItemCount, + Subinquireditemcount: a.Subinquireditemcount, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSAPAseSystemWorkloadItem. +func (a *AzureVMWorkloadSAPAseSystemWorkloadItem) GetWorkloadItem() *WorkloadItem { + return &WorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPHanaDBInstance - Azure VM workload-specific protectable item representing SAP HANA Dbinstance. +type AzureVMWorkloadSAPHanaDBInstance struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if protectable item is auto-protectable + IsAutoProtectable *bool + + // Indicates if protectable item is auto-protected + IsAutoProtected *bool + + // Indicates if item is protectable + IsProtectable *bool + + // Name for instance or AG + ParentName *string + + // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where + // the parent would be either Instance or a SQL AG. + ParentUniqueName *string + + // Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaDBInstance. +func (a *AzureVMWorkloadSAPHanaDBInstance) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { + return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, + ParentName: a.ParentName, + ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + Subinquireditemcount: a.Subinquireditemcount, + Subprotectableitemcount: a.Subprotectableitemcount, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaDBInstance. +func (a *AzureVMWorkloadSAPHanaDBInstance) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPHanaDBInstanceProtectedItem - Azure VM workload-specific protected item representing SAP HANA DBInstance. +type AzureVMWorkloadSAPHanaDBInstanceProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Health details of different KPIs + KpisHealths map[string]*KPIResourceHealthDetails + + // Error details in last backup + LastBackupErrorDetail *ErrorDetail + + // Last backup operation status. Possible values: Healthy, Unhealthy. + LastBackupStatus *LastBackupStatus + + // Timestamp of the last backup operation on this backup item. + LastBackupTime *time.Time + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + + // Parent name of the DB such as Instance or Availability Group. + ParentName *string + + // Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Data ID of the protected item. + ProtectedItemDataSourceID *string + + // Health status of the backup item, evaluated based on last heartbeat received + ProtectedItemHealthStatus *ProtectedItemHealthStatus + + // Backup state of this backup item. + ProtectionState *ProtectionState + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Host/Cluster Name for instance or AG + ServerName *string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; Friendly name of the DB represented by this backup item. + FriendlyName *string + + // READ-ONLY; Backup status of this backup item. + ProtectionStatus *string + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSAPHanaDBInstanceProtectedItem. +func (a *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { + return &AzureVMWorkloadProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupErrorDetail: a.LastBackupErrorDetail, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + NodesList: a.NodesList, + ParentName: a.ParentName, + ParentType: a.ParentType, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, + ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ServerName: a.ServerName, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSAPHanaDBInstanceProtectedItem. +func (a *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPHanaDatabaseProtectableItem - Azure VM workload-specific protectable item representing SAP HANA Database. +type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if protectable item is auto-protectable + IsAutoProtectable *bool + + // Indicates if protectable item is auto-protected + IsAutoProtected *bool + + // Indicates if item is protectable + IsProtectable *bool + + // Name for instance or AG + ParentName *string + + // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where + // the parent would be either Instance or a SQL AG. + ParentUniqueName *string + + // Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (a *AzureVMWorkloadSAPHanaDatabaseProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { + return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, + ParentName: a.ParentName, + ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + Subinquireditemcount: a.Subinquireditemcount, + Subprotectableitemcount: a.Subprotectableitemcount, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (a *AzureVMWorkloadSAPHanaDatabaseProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPHanaDatabaseProtectedItem - Azure VM workload-specific protected item representing SAP HANA Database. +type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Health details of different KPIs + KpisHealths map[string]*KPIResourceHealthDetails + + // Error details in last backup + LastBackupErrorDetail *ErrorDetail + + // Last backup operation status. Possible values: Healthy, Unhealthy. + LastBackupStatus *LastBackupStatus + + // Timestamp of the last backup operation on this backup item. + LastBackupTime *time.Time + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + + // Parent name of the DB such as Instance or Availability Group. + ParentName *string + + // Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Data ID of the protected item. + ProtectedItemDataSourceID *string + + // Health status of the backup item, evaluated based on last heartbeat received + ProtectedItemHealthStatus *ProtectedItemHealthStatus + + // Backup state of this backup item. + ProtectionState *ProtectionState + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Host/Cluster Name for instance or AG + ServerName *string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; Friendly name of the DB represented by this backup item. + FriendlyName *string + + // READ-ONLY; Backup status of this backup item. + ProtectionStatus *string + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (a *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { + return &AzureVMWorkloadProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupErrorDetail: a.LastBackupErrorDetail, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + NodesList: a.NodesList, + ParentName: a.ParentName, + ParentType: a.ParentType, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, + ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ServerName: a.ServerName, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (a *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPHanaDatabaseWorkloadItem - Azure VM workload-specific workload item representing SAP HANA Database. +type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { + // REQUIRED; Type of the backup item. + WorkloadItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if workload item is auto-protectable + IsAutoProtectable *bool + + // Name for instance or AG + ParentName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (a *AzureVMWorkloadSAPHanaDatabaseWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { + return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + ParentName: a.ParentName, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + SubWorkloadItemCount: a.SubWorkloadItemCount, + Subinquireditemcount: a.Subinquireditemcount, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (a *AzureVMWorkloadSAPHanaDatabaseWorkloadItem) GetWorkloadItem() *WorkloadItem { + return &WorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPHanaHSRProtectableItem - Azure VM workload-specific protectable item representing HANA HSR. +type AzureVMWorkloadSAPHanaHSRProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if protectable item is auto-protectable + IsAutoProtectable *bool + + // Indicates if protectable item is auto-protected + IsAutoProtected *bool + + // Indicates if item is protectable + IsProtectable *bool + + // Name for instance or AG + ParentName *string + + // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where + // the parent would be either Instance or a SQL AG. + ParentUniqueName *string + + // Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaHSRProtectableItem. +func (a *AzureVMWorkloadSAPHanaHSRProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { + return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, + ParentName: a.ParentName, + ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + Subinquireditemcount: a.Subinquireditemcount, + Subprotectableitemcount: a.Subprotectableitemcount, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaHSRProtectableItem. +func (a *AzureVMWorkloadSAPHanaHSRProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPHanaSystemProtectableItem - Azure VM workload-specific protectable item representing SAP HANA System. +type AzureVMWorkloadSAPHanaSystemProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if protectable item is auto-protectable + IsAutoProtectable *bool + + // Indicates if protectable item is auto-protected + IsAutoProtected *bool + + // Indicates if item is protectable + IsProtectable *bool + + // Name for instance or AG + ParentName *string + + // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where + // the parent would be either Instance or a SQL AG. + ParentUniqueName *string + + // Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaSystemProtectableItem. +func (a *AzureVMWorkloadSAPHanaSystemProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { + return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, + ParentName: a.ParentName, + ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + Subinquireditemcount: a.Subinquireditemcount, + Subprotectableitemcount: a.Subprotectableitemcount, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaSystemProtectableItem. +func (a *AzureVMWorkloadSAPHanaSystemProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSAPHanaSystemWorkloadItem - Azure VM workload-specific workload item representing SAP HANA System. +type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { + // REQUIRED; Type of the backup item. + WorkloadItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if workload item is auto-protectable + IsAutoProtectable *bool + + // Name for instance or AG + ParentName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (a *AzureVMWorkloadSAPHanaSystemWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { + return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + ParentName: a.ParentName, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + SubWorkloadItemCount: a.SubWorkloadItemCount, + Subinquireditemcount: a.Subinquireditemcount, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (a *AzureVMWorkloadSAPHanaSystemWorkloadItem) GetWorkloadItem() *WorkloadItem { + return &WorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSQLAvailabilityGroupProtectableItem - Azure VM workload-specific protectable item representing SQL Availability +// Group. +type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if protectable item is auto-protectable + IsAutoProtectable *bool + + // Indicates if protectable item is auto-protected + IsAutoProtected *bool + + // Indicates if item is protectable + IsProtectable *bool + + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + + // Name for instance or AG + ParentName *string + + // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where + // the parent would be either Instance or a SQL AG. + ParentUniqueName *string + + // Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (a *AzureVMWorkloadSQLAvailabilityGroupProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { + return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, + ParentName: a.ParentName, + ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + Subinquireditemcount: a.Subinquireditemcount, + Subprotectableitemcount: a.Subprotectableitemcount, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (a *AzureVMWorkloadSQLAvailabilityGroupProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSQLDatabaseProtectableItem - Azure VM workload-specific protectable item representing SQL Database. +type AzureVMWorkloadSQLDatabaseProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if protectable item is auto-protectable + IsAutoProtectable *bool + + // Indicates if protectable item is auto-protected + IsAutoProtected *bool + + // Indicates if item is protectable + IsProtectable *bool + + // Name for instance or AG + ParentName *string + + // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where + // the parent would be either Instance or a SQL AG. + ParentUniqueName *string + + // Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectableItem. +func (a *AzureVMWorkloadSQLDatabaseProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { + return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, + ParentName: a.ParentName, + ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + Subinquireditemcount: a.Subinquireditemcount, + Subprotectableitemcount: a.Subprotectableitemcount, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectableItem. +func (a *AzureVMWorkloadSQLDatabaseProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSQLDatabaseProtectedItem - Azure VM workload-specific protected item representing SQL Database. +type AzureVMWorkloadSQLDatabaseProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Health details of different KPIs + KpisHealths map[string]*KPIResourceHealthDetails + + // Error details in last backup + LastBackupErrorDetail *ErrorDetail + + // Last backup operation status. Possible values: Healthy, Unhealthy. + LastBackupStatus *LastBackupStatus + + // Timestamp of the last backup operation on this backup item. + LastBackupTime *time.Time + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo + + // Parent name of the DB such as Instance or Availability Group. + ParentName *string + + // Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Data ID of the protected item. + ProtectedItemDataSourceID *string + + // Health status of the backup item, evaluated based on last heartbeat received + ProtectedItemHealthStatus *ProtectedItemHealthStatus + + // Backup state of this backup item. + ProtectionState *ProtectionState + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Host/Cluster Name for instance or AG + ServerName *string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; Friendly name of the DB represented by this backup item. + FriendlyName *string + + // READ-ONLY; Backup status of this backup item. + ProtectionStatus *string + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectedItem. +func (a *AzureVMWorkloadSQLDatabaseProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { + return &AzureVMWorkloadProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + ExtendedInfo: a.ExtendedInfo, + FriendlyName: a.FriendlyName, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + KpisHealths: a.KpisHealths, + LastBackupErrorDetail: a.LastBackupErrorDetail, + LastBackupStatus: a.LastBackupStatus, + LastBackupTime: a.LastBackupTime, + LastRecoveryPoint: a.LastRecoveryPoint, + NodesList: a.NodesList, + ParentName: a.ParentName, + ParentType: a.ParentType, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, + ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, + ProtectedItemType: a.ProtectedItemType, + ProtectionState: a.ProtectionState, + ProtectionStatus: a.ProtectionStatus, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ServerName: a.ServerName, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectedItem. +func (a *AzureVMWorkloadSQLDatabaseProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: a.BackupManagementType, + BackupSetName: a.BackupSetName, + ContainerName: a.ContainerName, + CreateMode: a.CreateMode, + DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, + IsArchiveEnabled: a.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: a.IsRehydrate, + IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, + LastRecoveryPoint: a.LastRecoveryPoint, + PolicyID: a.PolicyID, + PolicyName: a.PolicyName, + ProtectedItemType: a.ProtectedItemType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: a.SoftDeleteRetentionPeriodInDays, + SourceResourceID: a.SourceResourceID, + VaultID: a.VaultID, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSQLDatabaseWorkloadItem - Azure VM workload-specific workload item representing SQL Database. +type AzureVMWorkloadSQLDatabaseWorkloadItem struct { + // REQUIRED; Type of the backup item. + WorkloadItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if workload item is auto-protectable + IsAutoProtectable *bool + + // Name for instance or AG + ParentName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSQLDatabaseWorkloadItem. +func (a *AzureVMWorkloadSQLDatabaseWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { + return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + ParentName: a.ParentName, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + SubWorkloadItemCount: a.SubWorkloadItemCount, + Subinquireditemcount: a.Subinquireditemcount, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSQLDatabaseWorkloadItem. +func (a *AzureVMWorkloadSQLDatabaseWorkloadItem) GetWorkloadItem() *WorkloadItem { + return &WorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSQLInstanceProtectableItem - Azure VM workload-specific protectable item representing SQL Instance. +type AzureVMWorkloadSQLInstanceProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if protectable item is auto-protectable + IsAutoProtectable *bool + + // Indicates if protectable item is auto-protected + IsAutoProtected *bool + + // Indicates if item is protectable + IsProtectable *bool + + // Name for instance or AG + ParentName *string + + // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where + // the parent would be either Instance or a SQL AG. + ParentUniqueName *string + + // Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLInstanceProtectableItem. +func (a *AzureVMWorkloadSQLInstanceProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { + return &AzureVMWorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + IsAutoProtected: a.IsAutoProtected, + IsProtectable: a.IsProtectable, + ParentName: a.ParentName, + ParentUniqueName: a.ParentUniqueName, + Prebackupvalidation: a.Prebackupvalidation, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + Subinquireditemcount: a.Subinquireditemcount, + Subprotectableitemcount: a.Subprotectableitemcount, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLInstanceProtectableItem. +func (a *AzureVMWorkloadSQLInstanceProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectableItemType: a.ProtectableItemType, + ProtectionState: a.ProtectionState, + WorkloadType: a.WorkloadType, + } +} + +// AzureVMWorkloadSQLInstanceWorkloadItem - Azure VM workload-specific workload item representing SQL Instance. +type AzureVMWorkloadSQLInstanceWorkloadItem struct { + // REQUIRED; Type of the backup item. + WorkloadItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Data Directory Paths for default directories + DataDirectoryPaths []*SQLDataDirectory + + // Friendly name of the backup item. + FriendlyName *string + + // Indicates if workload item is auto-protectable + IsAutoProtectable *bool + + // Name for instance or AG + ParentName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Host/Cluster Name for instance or AG + ServerName *string + + // For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 + + // For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 + + // Type of workload for the backup management + WorkloadType *string +} + +// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSQLInstanceWorkloadItem. +func (a *AzureVMWorkloadSQLInstanceWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { + return &AzureVMWorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + IsAutoProtectable: a.IsAutoProtectable, + ParentName: a.ParentName, + ProtectionState: a.ProtectionState, + ServerName: a.ServerName, + SubWorkloadItemCount: a.SubWorkloadItemCount, + Subinquireditemcount: a.Subinquireditemcount, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSQLInstanceWorkloadItem. +func (a *AzureVMWorkloadSQLInstanceWorkloadItem) GetWorkloadItem() *WorkloadItem { + return &WorkloadItem{ + BackupManagementType: a.BackupManagementType, + FriendlyName: a.FriendlyName, + ProtectionState: a.ProtectionState, + WorkloadItemType: a.WorkloadItemType, + WorkloadType: a.WorkloadType, + } +} + +// AzureWorkloadAutoProtectionIntent - Azure Recovery Services Vault specific protection intent item. +type AzureWorkloadAutoProtectionIntent struct { + // REQUIRED; backup protectionIntent type. + ProtectionIntentItemType *ProtectionIntentItemType + + // Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Backup state of this backup item. + ProtectionState *ProtectionStatus + + // ARM ID of the resource to be backed up. + SourceResourceID *string +} + +// GetAzureRecoveryServiceVaultProtectionIntent implements the AzureRecoveryServiceVaultProtectionIntentClassification interface +// for type AzureWorkloadAutoProtectionIntent. +func (a *AzureWorkloadAutoProtectionIntent) GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent { + return &AzureRecoveryServiceVaultProtectionIntent{ + BackupManagementType: a.BackupManagementType, + ItemID: a.ItemID, + PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, + ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, + } +} + +// GetAzureWorkloadAutoProtectionIntent implements the AzureWorkloadAutoProtectionIntentClassification interface for type +// AzureWorkloadAutoProtectionIntent. +func (a *AzureWorkloadAutoProtectionIntent) GetAzureWorkloadAutoProtectionIntent() *AzureWorkloadAutoProtectionIntent { + return a +} + +// GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureWorkloadAutoProtectionIntent. +func (a *AzureWorkloadAutoProtectionIntent) GetProtectionIntent() *ProtectionIntent { + return &ProtectionIntent{ + BackupManagementType: a.BackupManagementType, + ItemID: a.ItemID, + PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, + ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, + } +} + +// AzureWorkloadBackupRequest - AzureWorkload workload-specific backup request. +type AzureWorkloadBackupRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Type of backup, viz. Full, Differential, Log or CopyOnlyFull + BackupType *BackupType + + // Bool for Compression setting + EnableCompression *bool + + // Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *time.Time +} + +// GetBackupRequest implements the BackupRequestClassification interface for type AzureWorkloadBackupRequest. +func (a *AzureWorkloadBackupRequest) GetBackupRequest() *BackupRequest { + return &BackupRequest{ + ObjectType: a.ObjectType, + } +} + +// AzureWorkloadContainer - Container for the workloads running inside Azure Compute or Classic Compute. +type AzureWorkloadContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Time stamp when this container was updated. + LastUpdatedTime *time.Time + + // Re-Do Operation + OperationType *OperationType + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string + + // ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string + + // Workload type for which registration was sent. + WorkloadType *WorkloadType +} + +// GetAzureWorkloadContainer implements the AzureWorkloadContainerClassification interface for type AzureWorkloadContainer. +func (a *AzureWorkloadContainer) GetAzureWorkloadContainer() *AzureWorkloadContainer { return a } + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureWorkloadContainer. +func (a *AzureWorkloadContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: a.BackupManagementType, + ContainerType: a.ContainerType, + FriendlyName: a.FriendlyName, + HealthStatus: a.HealthStatus, + ProtectableObjectType: a.ProtectableObjectType, + RegistrationStatus: a.RegistrationStatus, + } +} + +// AzureWorkloadContainerAutoProtectionIntent - Azure workload specific protection intent item. +type AzureWorkloadContainerAutoProtectionIntent struct { + // REQUIRED; backup protectionIntent type. + ProtectionIntentItemType *ProtectionIntentItemType + + // Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Backup state of this backup item. + ProtectionState *ProtectionStatus + + // ARM ID of the resource to be backed up. + SourceResourceID *string +} + +// GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureWorkloadContainerAutoProtectionIntent. +func (a *AzureWorkloadContainerAutoProtectionIntent) GetProtectionIntent() *ProtectionIntent { + return &ProtectionIntent{ + BackupManagementType: a.BackupManagementType, + ItemID: a.ItemID, + PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, + ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, + } +} + +// AzureWorkloadContainerExtendedInfo - Extended information of the container. +type AzureWorkloadContainerExtendedInfo struct { + // Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + HostServerName *string + + // Inquiry Status for the container. + InquiryInfo *InquiryInfo + + // List of the nodes in case of distributed container. + NodesList []*DistributedNodesInfo +} + +// AzureWorkloadErrorInfo - Azure storage specific error information +type AzureWorkloadErrorInfo struct { + // Additional details for above error code. + AdditionalDetails *string + + // Error code. + ErrorCode *int32 + + // Localized error string. + ErrorString *string + + // Title: Typically, the entity that the error pertains to. + ErrorTitle *string + + // List of localized recommendations for above error code. + Recommendations []*string +} + +// AzureWorkloadJob - Azure storage specific job. +type AzureWorkloadJob struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + JobType *string + + // Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo []*JobSupportedAction + + // ActivityId of job. + ActivityID *string + + // Backup management type to execute the current job. + BackupManagementType *BackupManagementType + + // Time elapsed during the execution of this job. + Duration *string + + // The end time. + EndTime *time.Time + + // Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string + + // Error details on execution of this job. + ErrorDetails []*AzureWorkloadErrorInfo + + // Additional information about the job. + ExtendedInfo *AzureWorkloadJobExtendedInfo + + // The operation name. + Operation *string + + // The start time. + StartTime *time.Time + + // Job status. + Status *string + + // Workload type of the job + WorkloadType *string +} + +// GetJob implements the JobClassification interface for type AzureWorkloadJob. +func (a *AzureWorkloadJob) GetJob() *Job { + return &Job{ + ActivityID: a.ActivityID, + BackupManagementType: a.BackupManagementType, + EndTime: a.EndTime, + EntityFriendlyName: a.EntityFriendlyName, + JobType: a.JobType, + Operation: a.Operation, + StartTime: a.StartTime, + Status: a.Status, + } +} + +// AzureWorkloadJobExtendedInfo - Azure VM workload-specific additional information for job. +type AzureWorkloadJobExtendedInfo struct { + // Non localized error message on job execution. + DynamicErrorMessage *string + + // Job properties. + PropertyBag map[string]*string + + // List of tasks for this job + TasksList []*AzureWorkloadJobTaskDetails +} + +// AzureWorkloadJobTaskDetails - Azure VM workload specific job task details. +type AzureWorkloadJobTaskDetails struct { + // The status. + Status *string + + // The task display name. + TaskID *string +} + +// AzureWorkloadPointInTimeRecoveryPoint - Recovery point specific to PointInTime +type AzureWorkloadPointInTimeRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Eligibility of RP to be moved to another tier + RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Recovery point tier information. + RecoveryPointTierDetails []*RecoveryPointTierInformationV2 + + // UTC time at which recovery point was created + RecoveryPointTimeInUTC *time.Time + + // List of log ranges + TimeRanges []*PointInTimeRange + + // Type of restore point + Type *RestorePointType +} + +// GetAzureWorkloadPointInTimeRecoveryPoint implements the AzureWorkloadPointInTimeRecoveryPointClassification interface for +// type AzureWorkloadPointInTimeRecoveryPoint. +func (a *AzureWorkloadPointInTimeRecoveryPoint) GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint { + return a +} + +// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadPointInTimeRecoveryPoint. +func (a *AzureWorkloadPointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { + return &AzureWorkloadRecoveryPoint{ + ObjectType: a.ObjectType, + RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, + RecoveryPointProperties: a.RecoveryPointProperties, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, + } +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadPointInTimeRecoveryPoint. +func (a *AzureWorkloadPointInTimeRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: a.ObjectType, + } +} + +// AzureWorkloadPointInTimeRestoreRequest - AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore +type AzureWorkloadPointInTimeRestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // PointInTime value + PointInTime *time.Time + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadPointInTimeRestoreRequest. +func (a *AzureWorkloadPointInTimeRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadPointInTimeRestoreRequest. +func (a *AzureWorkloadPointInTimeRestoreRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadRecoveryPoint - Workload specific recovery point, specifically encapsulates full/diff recovery point +type AzureWorkloadRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Eligibility of RP to be moved to another tier + RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Recovery point tier information. + RecoveryPointTierDetails []*RecoveryPointTierInformationV2 + + // UTC time at which recovery point was created + RecoveryPointTimeInUTC *time.Time + + // Type of restore point + Type *RestorePointType +} + +// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadRecoveryPoint. +func (a *AzureWorkloadRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { + return a +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadRecoveryPoint. +func (a *AzureWorkloadRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: a.ObjectType, + } +} + +// AzureWorkloadRestoreRequest - AzureWorkload-specific restore. +type AzureWorkloadRestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadRestoreRequest. +func (a *AzureWorkloadRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return a +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadRestoreRequest. +func (a *AzureWorkloadRestoreRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadSAPAsePointInTimeRecoveryPoint - Recovery point specific to PointInTime in SAPAse +type AzureWorkloadSAPAsePointInTimeRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Eligibility of RP to be moved to another tier + RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Recovery point tier information. + RecoveryPointTierDetails []*RecoveryPointTierInformationV2 + + // UTC time at which recovery point was created + RecoveryPointTimeInUTC *time.Time + + // List of log ranges + TimeRanges []*PointInTimeRange + + // Type of restore point + Type *RestorePointType +} + +// GetAzureWorkloadPointInTimeRecoveryPoint implements the AzureWorkloadPointInTimeRecoveryPointClassification interface for +// type AzureWorkloadSAPAsePointInTimeRecoveryPoint. +func (a *AzureWorkloadSAPAsePointInTimeRecoveryPoint) GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint { + return &AzureWorkloadPointInTimeRecoveryPoint{ + ObjectType: a.ObjectType, + RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, + RecoveryPointProperties: a.RecoveryPointProperties, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + TimeRanges: a.TimeRanges, + Type: a.Type, + } +} + +// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSAPAsePointInTimeRecoveryPoint. +func (a *AzureWorkloadSAPAsePointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { + return &AzureWorkloadRecoveryPoint{ + ObjectType: a.ObjectType, + RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, + RecoveryPointProperties: a.RecoveryPointProperties, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, + } +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadSAPAsePointInTimeRecoveryPoint. +func (a *AzureWorkloadSAPAsePointInTimeRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: a.ObjectType, + } +} + +// AzureWorkloadSAPAsePointInTimeRestoreRequest - AzureWorkload SAP Ase-specific restore. Specifically for PointInTime/Log +// restore +type AzureWorkloadSAPAsePointInTimeRestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // PointInTime value + PointInTime *time.Time + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPAsePointInTimeRestoreRequest. +func (a *AzureWorkloadSAPAsePointInTimeRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSAPAseRestoreRequest implements the AzureWorkloadSAPAseRestoreRequestClassification interface for type +// AzureWorkloadSAPAsePointInTimeRestoreRequest. +func (a *AzureWorkloadSAPAsePointInTimeRestoreRequest) GetAzureWorkloadSAPAseRestoreRequest() *AzureWorkloadSAPAseRestoreRequest { + return &AzureWorkloadSAPAseRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSAPAsePointInTimeRestoreRequest. +func (a *AzureWorkloadSAPAsePointInTimeRestoreRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadSAPAseRecoveryPoint - SAPAse specific recoverypoint, specifically encapsulates full/diff recoverypoints +type AzureWorkloadSAPAseRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Eligibility of RP to be moved to another tier + RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Recovery point tier information. + RecoveryPointTierDetails []*RecoveryPointTierInformationV2 + + // UTC time at which recovery point was created + RecoveryPointTimeInUTC *time.Time + + // Type of restore point + Type *RestorePointType +} + +// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSAPAseRecoveryPoint. +func (a *AzureWorkloadSAPAseRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { + return &AzureWorkloadRecoveryPoint{ + ObjectType: a.ObjectType, + RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, + RecoveryPointProperties: a.RecoveryPointProperties, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, + } +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadSAPAseRecoveryPoint. +func (a *AzureWorkloadSAPAseRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: a.ObjectType, + } +} + +// AzureWorkloadSAPAseRestoreRequest - AzureWorkload SAP Ase-specific restore. +type AzureWorkloadSAPAseRestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPAseRestoreRequest. +func (a *AzureWorkloadSAPAseRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSAPAseRestoreRequest implements the AzureWorkloadSAPAseRestoreRequestClassification interface for type +// AzureWorkloadSAPAseRestoreRequest. +func (a *AzureWorkloadSAPAseRestoreRequest) GetAzureWorkloadSAPAseRestoreRequest() *AzureWorkloadSAPAseRestoreRequest { + return a +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSAPAseRestoreRequest. +func (a *AzureWorkloadSAPAseRestoreRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadSAPHanaPointInTimeRecoveryPoint - Recovery point specific to PointInTime in SAPHana +type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Eligibility of RP to be moved to another tier + RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Recovery point tier information. + RecoveryPointTierDetails []*RecoveryPointTierInformationV2 + + // UTC time at which recovery point was created + RecoveryPointTimeInUTC *time.Time + + // List of log ranges + TimeRanges []*PointInTimeRange + + // Type of restore point + Type *RestorePointType +} + +// GetAzureWorkloadPointInTimeRecoveryPoint implements the AzureWorkloadPointInTimeRecoveryPointClassification interface for +// type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint { + return &AzureWorkloadPointInTimeRecoveryPoint{ + ObjectType: a.ObjectType, + RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, + RecoveryPointProperties: a.RecoveryPointProperties, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + TimeRanges: a.TimeRanges, + Type: a.Type, + } +} + +// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { + return &AzureWorkloadRecoveryPoint{ + ObjectType: a.ObjectType, + RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, + RecoveryPointProperties: a.RecoveryPointProperties, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, + } +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: a.ObjectType, + } +} + +// AzureWorkloadSAPHanaPointInTimeRestoreRequest - AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log +// restore +type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // PointInTime value + PointInTime *time.Time + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSAPHanaPointInTimeRestoreRequest implements the AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification +// interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() *AzureWorkloadSAPHanaPointInTimeRestoreRequest { + return a +} + +// GetAzureWorkloadSAPHanaRestoreRequest implements the AzureWorkloadSAPHanaRestoreRequestClassification interface for type +// AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { + return &AzureWorkloadSAPHanaRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest - AzureWorkload SAP Hana-specific restore with integrated rehydration +// of recovery point. +type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // PointInTime value + PointInTime *time.Time + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // RP Rehydration Info + RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. +func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSAPHanaPointInTimeRestoreRequest implements the AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification +// interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. +func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() *AzureWorkloadSAPHanaPointInTimeRestoreRequest { + return &AzureWorkloadSAPHanaPointInTimeRestoreRequest{ + ObjectType: a.ObjectType, + PointInTime: a.PointInTime, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSAPHanaRestoreRequest implements the AzureWorkloadSAPHanaRestoreRequestClassification interface for type +// AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. +func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { + return &AzureWorkloadSAPHanaRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. +func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadSAPHanaRecoveryPoint - SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints +type AzureWorkloadSAPHanaRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Eligibility of RP to be moved to another tier + RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Recovery point tier information. + RecoveryPointTierDetails []*RecoveryPointTierInformationV2 + + // UTC time at which recovery point was created + RecoveryPointTimeInUTC *time.Time + + // Type of restore point + Type *RestorePointType +} + +// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSAPHanaRecoveryPoint. +func (a *AzureWorkloadSAPHanaRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { + return &AzureWorkloadRecoveryPoint{ + ObjectType: a.ObjectType, + RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, + RecoveryPointProperties: a.RecoveryPointProperties, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, + } +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadSAPHanaRecoveryPoint. +func (a *AzureWorkloadSAPHanaRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: a.ObjectType, + } +} + +// AzureWorkloadSAPHanaRestoreRequest - AzureWorkload SAP Hana-specific restore. +type AzureWorkloadSAPHanaRestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaRestoreRequest. +func (a *AzureWorkloadSAPHanaRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSAPHanaRestoreRequest implements the AzureWorkloadSAPHanaRestoreRequestClassification interface for type +// AzureWorkloadSAPHanaRestoreRequest. +func (a *AzureWorkloadSAPHanaRestoreRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { + return a +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSAPHanaRestoreRequest. +func (a *AzureWorkloadSAPHanaRestoreRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadSAPHanaRestoreWithRehydrateRequest - AzureWorkload SAP Hana-specific restore with integrated rehydration of +// recovery point. +type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // RP Rehydration Info + RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaRestoreWithRehydrateRequest. +func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSAPHanaRestoreRequest implements the AzureWorkloadSAPHanaRestoreRequestClassification interface for type +// AzureWorkloadSAPHanaRestoreWithRehydrateRequest. +func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { + return &AzureWorkloadSAPHanaRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSAPHanaRestoreWithRehydrateRequest. +func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadSQLAutoProtectionIntent - Azure Workload SQL Auto Protection intent item. +type AzureWorkloadSQLAutoProtectionIntent struct { + // REQUIRED; backup protectionIntent type. + ProtectionIntentItemType *ProtectionIntentItemType + + // Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Backup state of this backup item. + ProtectionState *ProtectionStatus + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // Workload item type of the item for which intent is to be set + WorkloadItemType *WorkloadItemType +} + +// GetAzureRecoveryServiceVaultProtectionIntent implements the AzureRecoveryServiceVaultProtectionIntentClassification interface +// for type AzureWorkloadSQLAutoProtectionIntent. +func (a *AzureWorkloadSQLAutoProtectionIntent) GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent { + return &AzureRecoveryServiceVaultProtectionIntent{ + BackupManagementType: a.BackupManagementType, + ItemID: a.ItemID, + PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, + ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, + } +} + +// GetAzureWorkloadAutoProtectionIntent implements the AzureWorkloadAutoProtectionIntentClassification interface for type +// AzureWorkloadSQLAutoProtectionIntent. +func (a *AzureWorkloadSQLAutoProtectionIntent) GetAzureWorkloadAutoProtectionIntent() *AzureWorkloadAutoProtectionIntent { + return &AzureWorkloadAutoProtectionIntent{ + BackupManagementType: a.BackupManagementType, + ItemID: a.ItemID, + PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, + ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, + } +} + +// GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureWorkloadSQLAutoProtectionIntent. +func (a *AzureWorkloadSQLAutoProtectionIntent) GetProtectionIntent() *ProtectionIntent { + return &ProtectionIntent{ + BackupManagementType: a.BackupManagementType, + ItemID: a.ItemID, + PolicyID: a.PolicyID, + ProtectionIntentItemType: a.ProtectionIntentItemType, + ProtectionState: a.ProtectionState, + SourceResourceID: a.SourceResourceID, + } +} + +// AzureWorkloadSQLPointInTimeRecoveryPoint - Recovery point specific to PointInTime +type AzureWorkloadSQLPointInTimeRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Extended Info that provides data directory details. Will be populated in two cases: When a specific recovery point is accessed + // using GetRecoveryPoint Or when ListRecoveryPoints is called for Log RP + // only with ExtendedInfo query filter + ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo + + // Eligibility of RP to be moved to another tier + RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Recovery point tier information. + RecoveryPointTierDetails []*RecoveryPointTierInformationV2 + + // UTC time at which recovery point was created + RecoveryPointTimeInUTC *time.Time + + // List of log ranges + TimeRanges []*PointInTimeRange + + // Type of restore point + Type *RestorePointType +} + +// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. +func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { + return &AzureWorkloadRecoveryPoint{ + ObjectType: a.ObjectType, + RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, + RecoveryPointProperties: a.RecoveryPointProperties, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, + } +} + +// GetAzureWorkloadSQLRecoveryPoint implements the AzureWorkloadSQLRecoveryPointClassification interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. +func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) GetAzureWorkloadSQLRecoveryPoint() *AzureWorkloadSQLRecoveryPoint { + return &AzureWorkloadSQLRecoveryPoint{ + ExtendedInfo: a.ExtendedInfo, + ObjectType: a.ObjectType, + RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, + RecoveryPointProperties: a.RecoveryPointProperties, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, + } +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. +func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: a.ObjectType, + } +} + +// AzureWorkloadSQLPointInTimeRestoreRequest - AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore +type AzureWorkloadSQLPointInTimeRestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Data directory details + AlternateDirectoryPaths []*SQLDataDirectoryMapping + + // SQL specific property where user can chose to set no-recovery when restore operation is tried + IsNonRecoverable *bool + + // PointInTime value + PointInTime *time.Time + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Default option set to true. If this is set to false, alternate data directory must be provided + ShouldUseAlternateTargetLocation *bool + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreRequest. +func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSQLPointInTimeRestoreRequest implements the AzureWorkloadSQLPointInTimeRestoreRequestClassification interface +// for type AzureWorkloadSQLPointInTimeRestoreRequest. +func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetAzureWorkloadSQLPointInTimeRestoreRequest() *AzureWorkloadSQLPointInTimeRestoreRequest { + return a +} + +// GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreRequest. +func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { + return &AzureWorkloadSQLRestoreRequest{ + AlternateDirectoryPaths: a.AlternateDirectoryPaths, + IsNonRecoverable: a.IsNonRecoverable, + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreRequest. +func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest - AzureWorkload SQL-specific restore with integrated rehydration +// of recovery point. +type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Data directory details + AlternateDirectoryPaths []*SQLDataDirectoryMapping + + // SQL specific property where user can chose to set no-recovery when restore operation is tried + IsNonRecoverable *bool + + // PointInTime value + PointInTime *time.Time + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // RP Rehydration Info + RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Default option set to true. If this is set to false, alternate data directory must be provided + ShouldUseAlternateTargetLocation *bool + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. +func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSQLPointInTimeRestoreRequest implements the AzureWorkloadSQLPointInTimeRestoreRequestClassification interface +// for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. +func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSQLPointInTimeRestoreRequest() *AzureWorkloadSQLPointInTimeRestoreRequest { + return &AzureWorkloadSQLPointInTimeRestoreRequest{ + AlternateDirectoryPaths: a.AlternateDirectoryPaths, + IsNonRecoverable: a.IsNonRecoverable, + ObjectType: a.ObjectType, + PointInTime: a.PointInTime, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. +func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { + return &AzureWorkloadSQLRestoreRequest{ + AlternateDirectoryPaths: a.AlternateDirectoryPaths, + IsNonRecoverable: a.IsNonRecoverable, + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. +func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadSQLRecoveryPoint - SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with +// extended info +type AzureWorkloadSQLRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Extended Info that provides data directory details. Will be populated in two cases: When a specific recovery point is accessed + // using GetRecoveryPoint Or when ListRecoveryPoints is called for Log RP + // only with ExtendedInfo query filter + ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo + + // Eligibility of RP to be moved to another tier + RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Recovery point tier information. + RecoveryPointTierDetails []*RecoveryPointTierInformationV2 + + // UTC time at which recovery point was created + RecoveryPointTimeInUTC *time.Time + + // Type of restore point + Type *RestorePointType +} + +// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSQLRecoveryPoint. +func (a *AzureWorkloadSQLRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { + return &AzureWorkloadRecoveryPoint{ + ObjectType: a.ObjectType, + RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, + RecoveryPointProperties: a.RecoveryPointProperties, + RecoveryPointTierDetails: a.RecoveryPointTierDetails, + RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, + Type: a.Type, + } +} + +// GetAzureWorkloadSQLRecoveryPoint implements the AzureWorkloadSQLRecoveryPointClassification interface for type AzureWorkloadSQLRecoveryPoint. +func (a *AzureWorkloadSQLRecoveryPoint) GetAzureWorkloadSQLRecoveryPoint() *AzureWorkloadSQLRecoveryPoint { + return a +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadSQLRecoveryPoint. +func (a *AzureWorkloadSQLRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: a.ObjectType, + } +} + +// AzureWorkloadSQLRecoveryPointExtendedInfo - Extended info class details +type AzureWorkloadSQLRecoveryPointExtendedInfo struct { + // List of data directory paths during restore operation. + DataDirectoryPaths []*SQLDataDirectory + + // UTC time at which data directory info was captured + DataDirectoryTimeInUTC *time.Time +} + +// AzureWorkloadSQLRestoreRequest - AzureWorkload SQL -specific restore. Specifically for full/diff restore +type AzureWorkloadSQLRestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Data directory details + AlternateDirectoryPaths []*SQLDataDirectoryMapping + + // SQL specific property where user can chose to set no-recovery when restore operation is tried + IsNonRecoverable *bool + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Default option set to true. If this is set to false, alternate data directory must be provided + ShouldUseAlternateTargetLocation *bool + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLRestoreRequest. +func (a *AzureWorkloadSQLRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLRestoreRequest. +func (a *AzureWorkloadSQLRestoreRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { + return a +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSQLRestoreRequest. +func (a *AzureWorkloadSQLRestoreRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// AzureWorkloadSQLRestoreWithRehydrateRequest - AzureWorkload SQL-specific restore with integrated rehydration of recovery +// point +type AzureWorkloadSQLRestoreWithRehydrateRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Data directory details + AlternateDirectoryPaths []*SQLDataDirectoryMapping + + // SQL specific property where user can chose to set no-recovery when restore operation is tried + IsNonRecoverable *bool + + // Workload specific property bag. + PropertyBag map[string]*string + + // Defines whether the current recovery mode is file restore or database restore + RecoveryMode *RecoveryMode + + // RP Rehydration Info + RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo + + // Type of this recovery. + RecoveryType *RecoveryType + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Default option set to true. If this is set to false, alternate data directory must be provided + ShouldUseAlternateTargetLocation *bool + + // Additional details for snapshot recovery Currently used for snapshot for SAP Hana. + SnapshotRestoreParameters *SnapshotRestoreParameters + + // Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string + + // Details of target database + TargetInfo *TargetRestoreInfo + + // Defines the Resource group of the Target VM + TargetResourceGroupName *string + + // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // User Assigned managed identity details Currently used for snapshot. + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. +func (a *AzureWorkloadSQLRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { + return &AzureWorkloadRestoreRequest{ + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. +func (a *AzureWorkloadSQLRestoreWithRehydrateRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { + return &AzureWorkloadSQLRestoreRequest{ + AlternateDirectoryPaths: a.AlternateDirectoryPaths, + IsNonRecoverable: a.IsNonRecoverable, + ObjectType: a.ObjectType, + PropertyBag: a.PropertyBag, + RecoveryMode: a.RecoveryMode, + RecoveryType: a.RecoveryType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, + SnapshotRestoreParameters: a.SnapshotRestoreParameters, + SourceResourceID: a.SourceResourceID, + TargetInfo: a.TargetInfo, + TargetResourceGroupName: a.TargetResourceGroupName, + TargetVirtualMachineID: a.TargetVirtualMachineID, + UserAssignedManagedIdentityDetails: a.UserAssignedManagedIdentityDetails, + } +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. +func (a *AzureWorkloadSQLRestoreWithRehydrateRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: a.ObjectType, + ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, + } +} + +// BEKDetails - BEK is bitlocker encryption key. +type BEKDetails struct { + // BEK data. + SecretData *string + + // Secret is BEK. + SecretURL *string + + // ID of the Key Vault where this Secret is stored. + SecretVaultID *string +} + +// BMSBackupEngineQueryObject - Query parameters to fetch list of backup engines. +type BMSBackupEngineQueryObject struct { + // attribute to add extended info + Expand *string +} + +// BMSBackupEnginesQueryObject - Query parameters to fetch list of backup engines. +type BMSBackupEnginesQueryObject struct { + // Backup management type for the backup engine. + BackupManagementType *BackupManagementType + + // Attribute to add extended info. + Expand *string + + // Friendly name of the backup engine. + FriendlyName *string +} + +// BMSBackupSummariesQueryObject - Query parameters to fetch backup summaries. +type BMSBackupSummariesQueryObject struct { + // Backup management type for this container. + Type *Type +} + +// BMSContainerQueryObject - The query filters that can be used with the list containers API. +type BMSContainerQueryObject struct { + // REQUIRED; Backup management type for this container. + BackupManagementType *BackupManagementType + + // Backup engine name + BackupEngineName *string + + // Type of container for filter + ContainerType *ContainerType + + // Fabric name for filter + FabricName *string + + // Friendly name of this container. + FriendlyName *string + + // Status of registration of this container with the Recovery Services Vault. + Status *string +} + +// BMSContainersInquiryQueryObject - The query filters that can be used with the inquire container API. +type BMSContainersInquiryQueryObject struct { + // Backup management type for this container. + BackupManagementType *BackupManagementType + + // Workload type for this container. + WorkloadType *WorkloadType +} + +// BMSPOQueryObject - Filters to list items that can be backed up. +type BMSPOQueryObject struct { + // Backup management type. + BackupManagementType *BackupManagementType + + // Full name of the container whose Protectable Objects should be returned. + ContainerName *string + + // Friendly name. + FriendlyName *string + + // Backup status query parameter. + Status *string + + // Workload type + WorkloadType *WorkloadType +} + +// BMSRPQueryObject - Filters to list backup copies. +type BMSRPQueryObject struct { + // Backup copies created before this time. + EndDate *time.Time + + // In Get Recovery Point, it tells whether extended information about recovery point is asked. + ExtendedInfo *bool + + // Flag to indicate whether Soft Deleted RPs should be included/excluded from result. + IncludeSoftDeletedRP *bool + + // Whether the RP can be moved to another tier + MoveReadyRPOnly *bool + + // RestorePoint type + RestorePointQueryType *RestorePointQueryType + + // Backup copies created after this time. + StartDate *time.Time +} + +// BMSRefreshContainersQueryObject - The query filters that can be used with the refresh container API. +type BMSRefreshContainersQueryObject struct { + // Backup management type for this container. + BackupManagementType *BackupManagementType +} + +// BMSWorkloadItemQueryObject - Filters to list items that can be backed up. +type BMSWorkloadItemQueryObject struct { + // Backup management type. + BackupManagementType *BackupManagementType + + // Backup status query parameter. + ProtectionStatus *ProtectionStatus + + // Workload Item type + WorkloadItemType *WorkloadItemType + + // Workload type + WorkloadType *WorkloadType +} + +// BackupEngineBase - The base backup engine class. All workload specific backup engines derive from this class. +type BackupEngineBase struct { + // REQUIRED; Type of the backup engine. + BackupEngineType *BackupEngineType + + // Backup agent version + AzureBackupAgentVersion *string + + // ID of the backup engine. + BackupEngineID *string + + // Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string + + // Type of backup management for the backup engine. + BackupManagementType *BackupManagementType + + // Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool + + // Backup engine version + DpmVersion *string + + // Extended info of the backupengine + ExtendedInfo *BackupEngineExtendedInfo + + // Friendly name of the backup engine. + FriendlyName *string + + // Backup status of the backup engine. + HealthStatus *string + + // To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool + + // To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool + + // Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string +} + +// GetBackupEngineBase implements the BackupEngineBaseClassification interface for type BackupEngineBase. +func (b *BackupEngineBase) GetBackupEngineBase() *BackupEngineBase { return b } + +// BackupEngineBaseResource - The base backup engine class. All workload specific backup engines derive from this class. +type BackupEngineBaseResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // BackupEngineBaseResource properties + Properties BackupEngineBaseClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// BackupEngineBaseResourceList - List of BackupEngineBase resources +type BackupEngineBaseResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*BackupEngineBaseResource +} + +// BackupEngineExtendedInfo - Additional information on backup engine. +type BackupEngineExtendedInfo struct { + // Disk space currently available in the backup engine. + AvailableDiskSpace *float64 + + // Protected instances in the backup engine. + AzureProtectedInstances *int32 + + // Database name of backup engine. + DatabaseName *string + + // Number of disks in the backup engine. + DiskCount *int32 + + // Number of protected items in the backup engine. + ProtectedItemsCount *int32 + + // Number of protected servers in the backup engine. + ProtectedServersCount *int32 + + // Last refresh time in the backup engine. + RefreshedAt *time.Time + + // Disk space used in the backup engine. + UsedDiskSpace *float64 +} + +// BackupManagementUsage - Backup management usages of a vault. +type BackupManagementUsage struct { + // Current value of usage. + CurrentValue *int64 + + // Limit of usage. + Limit *int64 + + // Name of usage. + Name *NameInfo + + // Next reset time of usage. + NextResetTime *time.Time + + // Quota period of usage. + QuotaPeriod *string + + // Unit of the usage. + Unit *UsagesUnit +} + +// BackupManagementUsageList - Backup management usage for vault. +type BackupManagementUsageList struct { + // The list of backup management usages for the given vault. + Value []*BackupManagementUsage +} + +// BackupRequest - Base class for backup request. Workload-specific backup requests are derived from this class. +type BackupRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string +} + +// GetBackupRequest implements the BackupRequestClassification interface for type BackupRequest. +func (b *BackupRequest) GetBackupRequest() *BackupRequest { return b } + +// BackupRequestResource - Base class for backup request. Workload-specific backup requests are derived from this class. +type BackupRequestResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // BackupRequestResource properties + Properties BackupRequestClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// BackupResourceConfig - The resource storage details. +type BackupResourceConfig struct { + // Opt in details of Cross Region Restore feature. + CrossRegionRestoreFlag *bool + + // Vault Dedup state + DedupState *DedupState + + // Storage type + StorageModelType *StorageType + + // Storage type. + StorageType *StorageType + + // Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + StorageTypeState *StorageTypeState + + // Vault x-cool state + XcoolState *XcoolState +} + +// BackupResourceConfigResource - The resource storage details. +type BackupResourceConfigResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // BackupResourceConfigResource properties + Properties *BackupResourceConfig + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +type BackupResourceEncryptionConfig struct { + // Encryption At Rest Type + EncryptionAtRestType *EncryptionAtRestType + InfrastructureEncryptionState *InfrastructureEncryptionState + + // Key Vault Key URI + KeyURI *string + LastUpdateStatus *LastUpdateStatus + + // Key Vault Subscription Id + SubscriptionID *string +} + +type BackupResourceEncryptionConfigExtended struct { + // Encryption At Rest Type + EncryptionAtRestType *EncryptionAtRestType + InfrastructureEncryptionState *InfrastructureEncryptionState + + // Key Vault Key URI + KeyURI *string + LastUpdateStatus *LastUpdateStatus + + // Key Vault Subscription Id + SubscriptionID *string + + // bool to indicate whether to use system Assigned Identity or not + UseSystemAssignedIdentity *bool + + // User Assigned Identity Id + UserAssignedIdentity *string +} + +type BackupResourceEncryptionConfigExtendedResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // BackupResourceEncryptionConfigExtendedResource properties + Properties *BackupResourceEncryptionConfigExtended + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +type BackupResourceEncryptionConfigResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // BackupResourceEncryptionConfigResource properties + Properties *BackupResourceEncryptionConfig + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// BackupResourceVaultConfig - Backup resource vault config details. +type BackupResourceVaultConfig struct { + // Enabled or Disabled. + EnhancedSecurityState *EnhancedSecurityState + + // This flag is no longer in use. Please use 'softDeleteFeatureState' to set the soft delete state for the vault + IsSoftDeleteFeatureStateEditable *bool + + // ResourceGuard Operation Requests + ResourceGuardOperationRequests []*string + + // Soft Delete feature state + SoftDeleteFeatureState *SoftDeleteFeatureState + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // Storage type. + StorageModelType *StorageType + + // Storage type. + StorageType *StorageType + + // Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. + StorageTypeState *StorageTypeState +} + +// BackupResourceVaultConfigResource - Backup resource vault config details. +type BackupResourceVaultConfigResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // BackupResourceVaultConfigResource properties + Properties *BackupResourceVaultConfig + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// BackupStatusRequest - BackupStatus request. +type BackupStatusRequest struct { + // Protectable Item Logical Name + PoLogicalName *string + + // Entire ARM resource id of the resource + ResourceID *string + + // Container Type - VM, SQLPaaS, DPM, AzureFileShare… + ResourceType *DataSourceType +} + +// BackupStatusResponse - BackupStatus response. +type BackupStatusResponse struct { + // Specifies whether the storage account lock has been acquired or not + AcquireStorageAccountLock *AcquireStorageAccountLock + + // Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. + ContainerName *string + + // ErrorCode in case of intent failed + ErrorCode *string + + // ErrorMessage in case of intent failed. + ErrorMessage *string + + // Specifies the fabric name - Azure or AD + FabricName *FabricName + + // Specifies the policy name which is used for protection + PolicyName *string + + // Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. + ProtectedItemName *string + + // Number of protected items + ProtectedItemsCount *int32 + + // Specifies whether the container is registered or not + ProtectionStatus *ProtectionStatus + + // Container registration status + RegistrationStatus *string + + // Specifies the arm resource id of the vault + VaultID *string +} + +// ClientDiscoveryDisplay - Localized display information of an operation. +type ClientDiscoveryDisplay struct { + // Description of the operation having details of what operation is about. + Description *string + + // Operations Name itself. + Operation *string + + // Name of the provider for display purposes + Provider *string + + // ResourceType for which this Operation can be performed. + Resource *string +} + +// ClientDiscoveryForLogSpecification - Class to represent shoebox log specification in json client discovery. +type ClientDiscoveryForLogSpecification struct { + // blob duration of shoebox log specification + BlobDuration *string + + // Localized display name + DisplayName *string + + // Name for shoebox log specification. + Name *string +} + +// ClientDiscoveryForProperties - Class to represent shoebox properties in json client discovery. +type ClientDiscoveryForProperties struct { + // Operation properties. + ServiceSpecification *ClientDiscoveryForServiceSpecification +} + +// ClientDiscoveryForServiceSpecification - Class to represent shoebox service specification in json client discovery. +type ClientDiscoveryForServiceSpecification struct { + // List of log specifications of this operation. + LogSpecifications []*ClientDiscoveryForLogSpecification +} + +// ClientDiscoveryResponse - Operations List response which contains list of available APIs. +type ClientDiscoveryResponse struct { + // Link to the next chunk of Response. + NextLink *string + + // List of available operations. + Value []*ClientDiscoveryValueForSingleAPI +} + +// ClientDiscoveryValueForSingleAPI - Available operation details. +type ClientDiscoveryValueForSingleAPI struct { + // Contains the localized display information for this particular operation + Display *ClientDiscoveryDisplay + + // Name of the Operation. + Name *string + + // The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX + Origin *string + + // ShoeBox properties for the given operation. + Properties *ClientDiscoveryForProperties +} + +// ClientScriptForConnect - Client script details for file / folder restore. +type ClientScriptForConnect struct { + // OS type - Windows, Linux etc. for which this file / folder restore client script works. + OSType *string + + // File content of the client script for file / folder restore. + ScriptContent *string + + // File extension of the client script for file / folder restore - .ps1 , .sh , etc. + ScriptExtension *string + + // Mandatory suffix that should be added to the name of script that is given for download to user. If its null or empty then + // , ignore it. + ScriptNameSuffix *string + + // URL of Executable from where to source the content. If this is not null then ScriptContent should not be used + URL *string +} + +// ContainerIdentityInfo - Container identity information +type ContainerIdentityInfo struct { + // Protection container identity - AAD Tenant + AADTenantID *string + + // Protection container identity - Audience + Audience *string + + // Protection container identity - AAD Service Principal + ServicePrincipalClientID *string + + // Unique name of the container + UniqueName *string +} + +// DPMContainerExtendedInfo - Additional information of the DPMContainer. +type DPMContainerExtendedInfo struct { + // Last refresh time of the DPMContainer. + LastRefreshedAt *time.Time +} + +// DPMProtectedItem - Additional information on Backup engine specific backup item. +type DPMProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Backup Management server protecting this backup item + BackupEngineName *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Extended info of the backup item. + ExtendedInfo *DPMProtectedItemExtendedInfo + + // Friendly name of the managed item + FriendlyName *string + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Protection state of the backup engine + ProtectionState *ProtectedItemState + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type DPMProtectedItem. +func (d *DPMProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: d.BackupManagementType, + BackupSetName: d.BackupSetName, + ContainerName: d.ContainerName, + CreateMode: d.CreateMode, + DeferredDeleteTimeInUTC: d.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: d.DeferredDeleteTimeRemaining, + IsArchiveEnabled: d.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: d.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: d.IsRehydrate, + IsScheduledForDeferredDelete: d.IsScheduledForDeferredDelete, + LastRecoveryPoint: d.LastRecoveryPoint, + PolicyID: d.PolicyID, + PolicyName: d.PolicyName, + ProtectedItemType: d.ProtectedItemType, + ResourceGuardOperationRequests: d.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: d.SoftDeleteRetentionPeriodInDays, + SourceResourceID: d.SourceResourceID, + VaultID: d.VaultID, + WorkloadType: d.WorkloadType, + } +} + +// DPMProtectedItemExtendedInfo - Additional information of DPM Protected item. +type DPMProtectedItemExtendedInfo struct { + // Used Disk storage in bytes. + DiskStorageUsedInBytes *string + + // To check if backup item is collocated. + IsCollocated *bool + + // To check if backup item is cloud protected. + IsPresentOnCloud *bool + + // Last backup status information on backup item. + LastBackupStatus *string + + // Last refresh time on backup item. + LastRefreshedAt *time.Time + + // Oldest cloud recovery point time. + OldestRecoveryPoint *time.Time + + // latest disk recovery point time. + OnPremiseLatestRecoveryPoint *time.Time + + // Oldest disk recovery point time. + OnPremiseOldestRecoveryPoint *time.Time + + // disk recovery point count. + OnPremiseRecoveryPointCount *int32 + + // Attribute to provide information on various DBs. + ProtectableObjectLoadPath map[string]*string + + // To check if backup item is disk protected. + Protected *bool + + // Protection group name of the backup item. + ProtectionGroupName *string + + // cloud recovery point count. + RecoveryPointCount *int32 + + // total Disk storage in bytes. + TotalDiskStorageSizeInBytes *string +} + +// DailyRetentionFormat - Daily retention format. +type DailyRetentionFormat struct { + // List of days of the month. + DaysOfTheMonth []*Day +} + +// DailyRetentionSchedule - Daily retention schedule. +type DailyRetentionSchedule struct { + // Retention duration of retention Policy. + RetentionDuration *RetentionDuration + + // Retention times of retention policy. + RetentionTimes []*time.Time +} + +type DailySchedule struct { + // List of times of day this schedule has to be run. + ScheduleRunTimes []*time.Time +} + +// Day of the week. +type Day struct { + // Date of the month + Date *int32 + + // Whether Date is last date of month + IsLast *bool +} + +type DiskExclusionProperties struct { + // List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + DiskLunList []*int32 + + // Flag to indicate whether DiskLunList is to be included/ excluded from backup. + IsInclusionList *bool +} + +// DiskInformation - Disk information +type DiskInformation struct { + Lun *int32 + Name *string +} + +// DistributedNodesInfo - This is used to represent the various nodes of the distributed container. +type DistributedNodesInfo struct { + // Error Details if the Status is non-success. + ErrorDetail *ErrorDetail + + // Name of the node under a distributed container. + NodeName *string + + // ARM resource id of the node + SourceResourceID *string + + // Status of this Node. Failed | Succeeded + Status *string +} + +// DpmBackupEngine - Data Protection Manager (DPM) specific backup engine. +type DpmBackupEngine struct { + // REQUIRED; Type of the backup engine. + BackupEngineType *BackupEngineType + + // Backup agent version + AzureBackupAgentVersion *string + + // ID of the backup engine. + BackupEngineID *string + + // Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string + + // Type of backup management for the backup engine. + BackupManagementType *BackupManagementType + + // Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool + + // Backup engine version + DpmVersion *string + + // Extended info of the backupengine + ExtendedInfo *BackupEngineExtendedInfo + + // Friendly name of the backup engine. + FriendlyName *string + + // Backup status of the backup engine. + HealthStatus *string + + // To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool + + // To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool + + // Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string +} + +// GetBackupEngineBase implements the BackupEngineBaseClassification interface for type DpmBackupEngine. +func (d *DpmBackupEngine) GetBackupEngineBase() *BackupEngineBase { + return &BackupEngineBase{ + AzureBackupAgentVersion: d.AzureBackupAgentVersion, + BackupEngineID: d.BackupEngineID, + BackupEngineState: d.BackupEngineState, + BackupEngineType: d.BackupEngineType, + BackupManagementType: d.BackupManagementType, + CanReRegister: d.CanReRegister, + DpmVersion: d.DpmVersion, + ExtendedInfo: d.ExtendedInfo, + FriendlyName: d.FriendlyName, + HealthStatus: d.HealthStatus, + IsAzureBackupAgentUpgradeAvailable: d.IsAzureBackupAgentUpgradeAvailable, + IsDpmUpgradeAvailable: d.IsDpmUpgradeAvailable, + RegistrationStatus: d.RegistrationStatus, + } +} + +// DpmContainer - DPM workload-specific protection container. +type DpmContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Specifies whether the container is re-registrable. + CanReRegister *bool + + // ID of container. + ContainerID *string + + // Backup engine Agent version + DpmAgentVersion *string + + // List of BackupEngines protecting the container + DpmServers []*string + + // Extended Info of the container. + ExtendedInfo *DPMContainerExtendedInfo + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Number of protected items in the BackupEngine + ProtectedItemCount *int64 + + // Protection status of the container. + ProtectionStatus *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string + + // To check if upgrade available + UpgradeAvailable *bool +} + +// GetDpmContainer implements the DpmContainerClassification interface for type DpmContainer. +func (d *DpmContainer) GetDpmContainer() *DpmContainer { return d } + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type DpmContainer. +func (d *DpmContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: d.BackupManagementType, + ContainerType: d.ContainerType, + FriendlyName: d.FriendlyName, + HealthStatus: d.HealthStatus, + ProtectableObjectType: d.ProtectableObjectType, + RegistrationStatus: d.RegistrationStatus, + } +} + +// DpmErrorInfo - DPM workload-specific error information. +type DpmErrorInfo struct { + // Localized error string. + ErrorString *string + + // List of localized recommendations for above error code. + Recommendations []*string +} + +// DpmJob - DPM workload-specific job object. +type DpmJob struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + JobType *string + + // The state/actions applicable on this job like cancel/retry. + ActionsInfo []*JobSupportedAction + + // ActivityId of job. + ActivityID *string + + // Backup management type to execute the current job. + BackupManagementType *BackupManagementType + + // Name of cluster/server protecting current backup item, if any. + ContainerName *string + + // Type of container. + ContainerType *string + + // DPM server name managing the backup item or backup job. + DpmServerName *string + + // Time elapsed for job. + Duration *string + + // The end time. + EndTime *time.Time + + // Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string + + // The errors. + ErrorDetails []*DpmErrorInfo + + // Additional information for this job. + ExtendedInfo *DpmJobExtendedInfo + + // The operation name. + Operation *string + + // The start time. + StartTime *time.Time + + // Job status. + Status *string + + // Type of backup item. + WorkloadType *string +} + +// GetJob implements the JobClassification interface for type DpmJob. +func (d *DpmJob) GetJob() *Job { + return &Job{ + ActivityID: d.ActivityID, + BackupManagementType: d.BackupManagementType, + EndTime: d.EndTime, + EntityFriendlyName: d.EntityFriendlyName, + JobType: d.JobType, + Operation: d.Operation, + StartTime: d.StartTime, + Status: d.Status, + } +} + +// DpmJobExtendedInfo - Additional information on the DPM workload-specific job. +type DpmJobExtendedInfo struct { + // Non localized error message on job execution. + DynamicErrorMessage *string + + // The job properties. + PropertyBag map[string]*string + + // List of tasks associated with this job. + TasksList []*DpmJobTaskDetails +} + +// DpmJobTaskDetails - DPM workload-specific job task details. +type DpmJobTaskDetails struct { + // Time elapsed for task. + Duration *string + + // The end time. + EndTime *time.Time + + // The start time. + StartTime *time.Time + + // The status. + Status *string + + // The task display name. + TaskID *string +} + +// EncryptionDetails - Details needed if the VM was encrypted at the time of backup. +type EncryptionDetails struct { + // Identifies whether this backup copy represents an encrypted VM at the time of backup. + EncryptionEnabled *bool + + // Key Url. + KekURL *string + + // ID of Key Vault where KEK is stored. + KekVaultID *string + + // Secret Url. + SecretKeyURL *string + + // ID of Key Vault where Secret is stored. + SecretKeyVaultID *string +} + +// ErrorAdditionalInfo - The resource management error additional info. +type ErrorAdditionalInfo struct { + // READ-ONLY; The additional info. + Info any + + // READ-ONLY; The additional info type. + Type *string +} + +// ErrorDetail - Error Detail class which encapsulates Code, Message and Recommendations. +type ErrorDetail struct { + // READ-ONLY; Error code. + Code *string + + // READ-ONLY; Error Message related to the Code. + Message *string + + // READ-ONLY; List of recommendation strings. + Recommendations []*string +} + +// ExportJobsOperationResultInfo - This class is used to send blob details after exporting jobs. +type ExportJobsOperationResultInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // SAS key to access the blob. It expires in 15 mins. + BlobSasKey *string + + // URL of the blob into which the serialized string of list of jobs is exported. + BlobURL *string + + // SAS key to access the blob. It expires in 15 mins. + ExcelFileBlobSasKey *string + + // URL of the blob into which the ExcelFile is uploaded. + ExcelFileBlobURL *string +} + +// GetOperationResultInfoBase implements the OperationResultInfoBaseClassification interface for type ExportJobsOperationResultInfo. +func (e *ExportJobsOperationResultInfo) GetOperationResultInfoBase() *OperationResultInfoBase { + return &OperationResultInfoBase{ + ObjectType: e.ObjectType, + } +} + +// ExtendedLocation - The extended location of Recovery point where VM was present. +type ExtendedLocation struct { + // Name of the extended location. + Name *string + + // Type of the extended location. Possible values include: 'EdgeZone' + Type *string +} + +// ExtendedProperties - Extended Properties for Azure IaasVM Backup. +type ExtendedProperties struct { + // Extended Properties for Disk Exclusion. + DiskExclusionProperties *DiskExclusionProperties + + // Linux VM name + LinuxVMApplicationName *string +} + +// FeatureSupportRequest - Base class for feature request +type FeatureSupportRequest struct { + // REQUIRED; backup support feature type. + FeatureType *string +} + +// GetFeatureSupportRequest implements the FeatureSupportRequestClassification interface for type FeatureSupportRequest. +func (f *FeatureSupportRequest) GetFeatureSupportRequest() *FeatureSupportRequest { return f } + +// FetchTieringCostInfoForRehydrationRequest - Request parameters for fetching cost info of rehydration +type FetchTieringCostInfoForRehydrationRequest struct { + // REQUIRED; Name of the protected item container + ContainerName *string + + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // REQUIRED; Name of the protectedItemName + ProtectedItemName *string + + // REQUIRED; ID of the backup copy for rehydration cost info needs to be fetched. + RecoveryPointID *string + + // REQUIRED; Rehydration Priority + RehydrationPriority *RehydrationPriority + + // REQUIRED; Source tier for the request + SourceTierType *RecoveryPointTierType + + // REQUIRED; target tier for the request + TargetTierType *RecoveryPointTierType +} + +// GetFetchTieringCostInfoRequest implements the FetchTieringCostInfoRequestClassification interface for type FetchTieringCostInfoForRehydrationRequest. +func (f *FetchTieringCostInfoForRehydrationRequest) GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest { + return &FetchTieringCostInfoRequest{ + ObjectType: f.ObjectType, + SourceTierType: f.SourceTierType, + TargetTierType: f.TargetTierType, + } +} + +// FetchTieringCostInfoRequest - Base class for tiering cost request. Specific cost request types are derived from this class. +type FetchTieringCostInfoRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // REQUIRED; Source tier for the request + SourceTierType *RecoveryPointTierType + + // REQUIRED; target tier for the request + TargetTierType *RecoveryPointTierType +} + +// GetFetchTieringCostInfoRequest implements the FetchTieringCostInfoRequestClassification interface for type FetchTieringCostInfoRequest. +func (f *FetchTieringCostInfoRequest) GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest { + return f +} + +// FetchTieringCostSavingsInfoForPolicyRequest - Request parameters for tiering cost info for policy +type FetchTieringCostSavingsInfoForPolicyRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // REQUIRED; Name of the backup policy for which the cost savings information is requested + PolicyName *string + + // REQUIRED; Source tier for the request + SourceTierType *RecoveryPointTierType + + // REQUIRED; target tier for the request + TargetTierType *RecoveryPointTierType +} + +// GetFetchTieringCostInfoRequest implements the FetchTieringCostInfoRequestClassification interface for type FetchTieringCostSavingsInfoForPolicyRequest. +func (f *FetchTieringCostSavingsInfoForPolicyRequest) GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest { + return &FetchTieringCostInfoRequest{ + ObjectType: f.ObjectType, + SourceTierType: f.SourceTierType, + TargetTierType: f.TargetTierType, + } +} + +// FetchTieringCostSavingsInfoForProtectedItemRequest - Request parameters for tiering cost info for protected item +type FetchTieringCostSavingsInfoForProtectedItemRequest struct { + // REQUIRED; Name of the protected item container + ContainerName *string + + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // REQUIRED; Name of the protectedItemName + ProtectedItemName *string + + // REQUIRED; Source tier for the request + SourceTierType *RecoveryPointTierType + + // REQUIRED; target tier for the request + TargetTierType *RecoveryPointTierType +} + +// GetFetchTieringCostInfoRequest implements the FetchTieringCostInfoRequestClassification interface for type FetchTieringCostSavingsInfoForProtectedItemRequest. +func (f *FetchTieringCostSavingsInfoForProtectedItemRequest) GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest { + return &FetchTieringCostInfoRequest{ + ObjectType: f.ObjectType, + SourceTierType: f.SourceTierType, + TargetTierType: f.TargetTierType, + } +} + +// FetchTieringCostSavingsInfoForVaultRequest - Request parameters for tiering cost info for vault +type FetchTieringCostSavingsInfoForVaultRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // REQUIRED; Source tier for the request + SourceTierType *RecoveryPointTierType + + // REQUIRED; target tier for the request + TargetTierType *RecoveryPointTierType +} + +// GetFetchTieringCostInfoRequest implements the FetchTieringCostInfoRequestClassification interface for type FetchTieringCostSavingsInfoForVaultRequest. +func (f *FetchTieringCostSavingsInfoForVaultRequest) GetFetchTieringCostInfoRequest() *FetchTieringCostInfoRequest { + return &FetchTieringCostInfoRequest{ + ObjectType: f.ObjectType, + SourceTierType: f.SourceTierType, + TargetTierType: f.TargetTierType, + } +} + +// GenericContainer - Base class for generic container of backup items +type GenericContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Extended information (not returned in List container API calls) + ExtendedInformation *GenericContainerExtendedInfo + + // Name of the container's fabric + FabricName *string + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string +} + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type GenericContainer. +func (g *GenericContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: g.BackupManagementType, + ContainerType: g.ContainerType, + FriendlyName: g.FriendlyName, + HealthStatus: g.HealthStatus, + ProtectableObjectType: g.ProtectableObjectType, + RegistrationStatus: g.RegistrationStatus, + } +} + +// GenericContainerExtendedInfo - Container extended information +type GenericContainerExtendedInfo struct { + // Container identity information + ContainerIdentityInfo *ContainerIdentityInfo + + // Public key of container cert + RawCertData *string + + // Azure Backup Service Endpoints for the container + ServiceEndpoints map[string]*string +} + +// GenericProtectedItem - Base class for backup items. +type GenericProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Name of this backup item's fabric. + FabricName *string + + // Friendly name of the container. + FriendlyName *string + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Indicates consistency of policy object and policy applied to this backup item. + PolicyState *string + + // Data Plane Service ID of the protected item. + ProtectedItemID *int64 + + // Backup state of this backup item. + ProtectionState *ProtectionState + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // Loosely coupled (type, value) associations (example - parent of a protected item) + SourceAssociations map[string]*string + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type GenericProtectedItem. +func (g *GenericProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: g.BackupManagementType, + BackupSetName: g.BackupSetName, + ContainerName: g.ContainerName, + CreateMode: g.CreateMode, + DeferredDeleteTimeInUTC: g.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: g.DeferredDeleteTimeRemaining, + IsArchiveEnabled: g.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: g.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: g.IsRehydrate, + IsScheduledForDeferredDelete: g.IsScheduledForDeferredDelete, + LastRecoveryPoint: g.LastRecoveryPoint, + PolicyID: g.PolicyID, + PolicyName: g.PolicyName, + ProtectedItemType: g.ProtectedItemType, + ResourceGuardOperationRequests: g.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: g.SoftDeleteRetentionPeriodInDays, + SourceResourceID: g.SourceResourceID, + VaultID: g.VaultID, + WorkloadType: g.WorkloadType, + } +} + +// GenericProtectionPolicy - Azure VM (Mercury) workload-specific backup policy. +type GenericProtectionPolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + BackupManagementType *string + + // Name of this policy's fabric. + FabricName *string + + // Number of items associated with this policy. + ProtectedItemsCount *int32 + + // ResourceGuard Operation Requests + ResourceGuardOperationRequests []*string + + // List of sub-protection policies which includes schedule and retention + SubProtectionPolicy []*SubProtectionPolicy + + // TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string +} + +// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type GenericProtectionPolicy. +func (g *GenericProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { + return &ProtectionPolicy{ + BackupManagementType: g.BackupManagementType, + ProtectedItemsCount: g.ProtectedItemsCount, + ResourceGuardOperationRequests: g.ResourceGuardOperationRequests, + } +} + +// GenericRecoveryPoint - Generic backup copy. +type GenericRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Friendly name of the backup copy. + FriendlyName *string + + // Additional information associated with this backup copy. + RecoveryPointAdditionalInfo *string + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Time at which this backup copy was created. + RecoveryPointTime *time.Time + + // Type of the backup copy. + RecoveryPointType *string +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type GenericRecoveryPoint. +func (g *GenericRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: g.ObjectType, + } +} + +// GetProtectedItemQueryObject - Filters to list backup items. +type GetProtectedItemQueryObject struct { + // Specifies if the additional information should be provided for this item. + Expand *string +} + +type HourlySchedule struct { + // Interval at which backup needs to be triggered. For hourly the value can be 4/6/8/12 + Interval *int32 + + // To specify duration of the backup window + ScheduleWindowDuration *int32 + + // To specify start time of the backup window + ScheduleWindowStartTime *time.Time +} + +// ILRRequest - Parameters to Provision ILR API. +type ILRRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string +} + +// GetILRRequest implements the ILRRequestClassification interface for type ILRRequest. +func (i *ILRRequest) GetILRRequest() *ILRRequest { return i } + +// ILRRequestResource - Parameters to Provision ILR API. +type ILRRequestResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // ILRRequestResource properties + Properties ILRRequestClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// IaaSVMContainer - IaaS VM workload-specific container. +type IaaSVMContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string + + // Resource group name of Recovery Services Vault. + ResourceGroup *string + + // Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string + + // Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string +} + +// GetIaaSVMContainer implements the IaaSVMContainerClassification interface for type IaaSVMContainer. +func (i *IaaSVMContainer) GetIaaSVMContainer() *IaaSVMContainer { return i } + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type IaaSVMContainer. +func (i *IaaSVMContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: i.BackupManagementType, + ContainerType: i.ContainerType, + FriendlyName: i.FriendlyName, + HealthStatus: i.HealthStatus, + ProtectableObjectType: i.ProtectableObjectType, + RegistrationStatus: i.RegistrationStatus, + } +} + +// IaaSVMProtectableItem - IaaS VM workload-specific backup item. +type IaaSVMProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Resource group name of Recovery Services Vault. + ResourceGroup *string + + // Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string + + // Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string + + // Type of workload for the backup management + WorkloadType *string +} + +// GetIaaSVMProtectableItem implements the IaaSVMProtectableItemClassification interface for type IaaSVMProtectableItem. +func (i *IaaSVMProtectableItem) GetIaaSVMProtectableItem() *IaaSVMProtectableItem { return i } + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type IaaSVMProtectableItem. +func (i *IaaSVMProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { + return &WorkloadProtectableItem{ + BackupManagementType: i.BackupManagementType, + FriendlyName: i.FriendlyName, + ProtectableItemType: i.ProtectableItemType, + ProtectionState: i.ProtectionState, + WorkloadType: i.WorkloadType, + } +} + +// IaasVMBackupRequest - IaaS VM workload-specific backup request. +type IaasVMBackupRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *time.Time +} + +// GetBackupRequest implements the BackupRequestClassification interface for type IaasVMBackupRequest. +func (i *IaasVMBackupRequest) GetBackupRequest() *BackupRequest { + return &BackupRequest{ + ObjectType: i.ObjectType, + } +} + +// IaasVMILRRegistrationRequest - Restore files/folders from a backup copy of IaaS VM. +type IaasVMILRRegistrationRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // iSCSI initiator name. + InitiatorName *string + + // ID of the IaaS VM backup copy from where the files/folders have to be restored. + RecoveryPointID *string + + // Whether to renew existing registration with the iSCSI server. + RenewExistingRegistration *bool + + // Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. + VirtualMachineID *string +} + +// GetILRRequest implements the ILRRequestClassification interface for type IaasVMILRRegistrationRequest. +func (i *IaasVMILRRegistrationRequest) GetILRRequest() *ILRRequest { + return &ILRRequest{ + ObjectType: i.ObjectType, + } +} + +// IaasVMRecoveryPoint - IaaS VM workload specific backup copy. +type IaasVMRecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Extended location of the VM recovery point, should be null if VM is in public cloud + ExtendedLocation *ExtendedLocation + + // Is the session to recover items from this backup copy still active. + IsInstantIlrSessionActive *bool + + // Whether VM is with Managed Disks + IsManagedVirtualMachine *bool + + // This flag denotes if any of the disks in the VM are using Private access network setting + IsPrivateAccessEnabledOnAnyDisk *bool + + // Identifies whether the VM was encrypted when the backup copy is created. + IsSourceVMEncrypted *bool + + // Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. + KeyAndSecret *KeyAndSecretDetails + + // OS type + OSType *string + + // Original Storage Account Option + OriginalStorageAccountOption *bool + + // Additional information associated with this backup copy. + RecoveryPointAdditionalInfo *string + + // Disk configuration + RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration + + // Eligibility of RP to be moved to another tier + RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo + + // Properties of Recovery Point + RecoveryPointProperties *RecoveryPointProperties + + // Recovery point tier information. + RecoveryPointTierDetails []*RecoveryPointTierInformationV2 + + // Time at which this backup copy was created. + RecoveryPointTime *time.Time + + // Type of the backup copy. + RecoveryPointType *string + + // Security Type of the Disk + SecurityType *string + + // Storage type of the VM whose backup copy is created. + SourceVMStorageType *string + + // Virtual Machine Size + VirtualMachineSize *string + + // Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms + Zones []*string +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type IaasVMRecoveryPoint. +func (i *IaasVMRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { + return &RecoveryPoint{ + ObjectType: i.ObjectType, + } +} + +// IaasVMRestoreRequest - IaaS VM workload-specific restore. +type IaasVMRestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. + AffinityGroup *string + + // Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same cloud service + // as it was at the time of backup. + CreateNewCloudService *bool + + // DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key. + DiskEncryptionSetID *string + + // Details needed if the VM was encrypted at the time of backup. + EncryptionDetails *EncryptionDetails + + // Target extended location where the VM should be restored, should be null if restore is to be done in public cloud + ExtendedLocation *ExtendedLocation + + // IaaS VM workload specific restore details for restores using managed identity. + IdentityBasedRestoreDetails *IdentityBasedRestoreDetails + + // Managed Identity information required to access customer storage account. + IdentityInfo *IdentityInfo + + // Original Storage Account Option + OriginalStorageAccountOption *bool + + // ID of the backup copy to be recovered. + RecoveryPointID *string + + // Type of this recovery. + RecoveryType *RecoveryType + + // Region in which the virtual machine is restored. + Region *string + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // List of Disk LUNs for partial restore + RestoreDiskLunList []*int32 + + // Flag to denote of an Unmanaged disk VM should be restored with Managed disks. + RestoreWithManagedDisks *bool + + // Stores Secured VM Details + SecuredVMDetails *SecuredVMDetails + + // Fully qualified ARM ID of the VM which is being recovered. + SourceResourceID *string + + // Fully qualified ARM ID of the storage account to which the VM has to be restored. + StorageAccountID *string + + // Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be {VnetID}/Subnet/{SubnetName} + // and, for the Azure Resource Manager VMs it would be ARM resource ID used to + // represent the subnet. + SubnetID *string + + // Specifies target network access settings for disks of VM to be restored, + TargetDiskNetworkAccessSettings *TargetDiskNetworkAccessSettings + + // Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic Virtual + // Machines. + TargetDomainNameID *string + + // This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. For e.g. + // /subscriptions/{subId}/resourcegroups/{rg} + TargetResourceGroupID *string + + // This is the complete ARM Id of the VM that will be created. For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // This is the virtual network Id of the vnet that will be attached to the virtual machine. User will be validated for join + // action permissions in the linked access. + VirtualNetworkID *string + + // Target zone where the VM and its disks should be restored. + Zones []*string +} + +// GetIaasVMRestoreRequest implements the IaasVMRestoreRequestClassification interface for type IaasVMRestoreRequest. +func (i *IaasVMRestoreRequest) GetIaasVMRestoreRequest() *IaasVMRestoreRequest { return i } + +// GetRestoreRequest implements the RestoreRequestClassification interface for type IaasVMRestoreRequest. +func (i *IaasVMRestoreRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: i.ObjectType, + ResourceGuardOperationRequests: i.ResourceGuardOperationRequests, + } +} + +// IaasVMRestoreWithRehydrationRequest - IaaS VM workload-specific restore with integrated rehydration of recovery point. +type IaasVMRestoreWithRehydrationRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. + AffinityGroup *string + + // Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same cloud service + // as it was at the time of backup. + CreateNewCloudService *bool + + // DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key. + DiskEncryptionSetID *string + + // Details needed if the VM was encrypted at the time of backup. + EncryptionDetails *EncryptionDetails + + // Target extended location where the VM should be restored, should be null if restore is to be done in public cloud + ExtendedLocation *ExtendedLocation + + // IaaS VM workload specific restore details for restores using managed identity. + IdentityBasedRestoreDetails *IdentityBasedRestoreDetails + + // Managed Identity information required to access customer storage account. + IdentityInfo *IdentityInfo + + // Original Storage Account Option + OriginalStorageAccountOption *bool + + // ID of the backup copy to be recovered. + RecoveryPointID *string + + // RP Rehydration Info + RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo + + // Type of this recovery. + RecoveryType *RecoveryType + + // Region in which the virtual machine is restored. + Region *string + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // List of Disk LUNs for partial restore + RestoreDiskLunList []*int32 + + // Flag to denote of an Unmanaged disk VM should be restored with Managed disks. + RestoreWithManagedDisks *bool + + // Stores Secured VM Details + SecuredVMDetails *SecuredVMDetails + + // Fully qualified ARM ID of the VM which is being recovered. + SourceResourceID *string + + // Fully qualified ARM ID of the storage account to which the VM has to be restored. + StorageAccountID *string + + // Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be {VnetID}/Subnet/{SubnetName} + // and, for the Azure Resource Manager VMs it would be ARM resource ID used to + // represent the subnet. + SubnetID *string + + // Specifies target network access settings for disks of VM to be restored, + TargetDiskNetworkAccessSettings *TargetDiskNetworkAccessSettings + + // Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic Virtual + // Machines. + TargetDomainNameID *string + + // This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. For e.g. + // /subscriptions/{subId}/resourcegroups/{rg} + TargetResourceGroupID *string + + // This is the complete ARM Id of the VM that will be created. For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string + + // This is the virtual network Id of the vnet that will be attached to the virtual machine. User will be validated for join + // action permissions in the linked access. + VirtualNetworkID *string + + // Target zone where the VM and its disks should be restored. + Zones []*string +} + +// GetIaasVMRestoreRequest implements the IaasVMRestoreRequestClassification interface for type IaasVMRestoreWithRehydrationRequest. +func (i *IaasVMRestoreWithRehydrationRequest) GetIaasVMRestoreRequest() *IaasVMRestoreRequest { + return &IaasVMRestoreRequest{ + AffinityGroup: i.AffinityGroup, + CreateNewCloudService: i.CreateNewCloudService, + DiskEncryptionSetID: i.DiskEncryptionSetID, + EncryptionDetails: i.EncryptionDetails, + ExtendedLocation: i.ExtendedLocation, + IdentityBasedRestoreDetails: i.IdentityBasedRestoreDetails, + IdentityInfo: i.IdentityInfo, + ObjectType: i.ObjectType, + OriginalStorageAccountOption: i.OriginalStorageAccountOption, + RecoveryPointID: i.RecoveryPointID, + RecoveryType: i.RecoveryType, + Region: i.Region, + ResourceGuardOperationRequests: i.ResourceGuardOperationRequests, + RestoreDiskLunList: i.RestoreDiskLunList, + RestoreWithManagedDisks: i.RestoreWithManagedDisks, + SecuredVMDetails: i.SecuredVMDetails, + SourceResourceID: i.SourceResourceID, + StorageAccountID: i.StorageAccountID, + SubnetID: i.SubnetID, + TargetDiskNetworkAccessSettings: i.TargetDiskNetworkAccessSettings, + TargetDomainNameID: i.TargetDomainNameID, + TargetResourceGroupID: i.TargetResourceGroupID, + TargetVirtualMachineID: i.TargetVirtualMachineID, + VirtualNetworkID: i.VirtualNetworkID, + Zones: i.Zones, + } +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type IaasVMRestoreWithRehydrationRequest. +func (i *IaasVMRestoreWithRehydrationRequest) GetRestoreRequest() *RestoreRequest { + return &RestoreRequest{ + ObjectType: i.ObjectType, + ResourceGuardOperationRequests: i.ResourceGuardOperationRequests, + } +} + +// IdentityBasedRestoreDetails - IaaS VM workload specific restore details for restores using managed identity +type IdentityBasedRestoreDetails struct { + // Gets the class type. + ObjectType *string + + // Fully qualified ARM ID of the target storage account. + TargetStorageAccountID *string +} + +// IdentityInfo - Encapsulates Managed Identity related information +type IdentityInfo struct { + // To differentiate if the managed identity is system assigned or user assigned + IsSystemAssignedIdentity *bool + + // Managed Identity Resource Id Optional: Might not be required in the case of system assigned managed identity + ManagedIdentityResourceID *string +} + +// InquiryInfo - Details about inquired protectable items under a given container. +type InquiryInfo struct { + // Error Details if the Status is non-success. + ErrorDetail *ErrorDetail + + // Inquiry Details which will have workload specific details. For e.g. - For SQL and oracle this will contain different details. + InquiryDetails []*WorkloadInquiryDetails + + // Inquiry Status for this container such as InProgress | Failed | Succeeded + Status *string +} + +// InquiryValidation - Validation for inquired protectable items under a given container. +type InquiryValidation struct { + // Error Detail in case the status is non-success. + ErrorDetail *ErrorDetail + + // Status for the Inquiry Validation. + Status *string + + // READ-ONLY; Error Additional Detail in case the status is non-success. + AdditionalDetail *string + + // READ-ONLY; Dictionary to store the count of ProtectableItems with key POType. + ProtectableItemCount any +} + +// InstantItemRecoveryTarget - Target details for file / folder restore. +type InstantItemRecoveryTarget struct { + // List of client scripts. + ClientScripts []*ClientScriptForConnect +} + +type InstantRPAdditionalDetails struct { + AzureBackupRGNamePrefix *string + AzureBackupRGNameSuffix *string +} + +// Job - Defines workload agnostic properties for a job. +type Job struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + JobType *string + + // ActivityId of job. + ActivityID *string + + // Backup management type to execute the current job. + BackupManagementType *BackupManagementType + + // The end time. + EndTime *time.Time + + // Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string + + // The operation name. + Operation *string + + // The start time. + StartTime *time.Time + + // Job status. + Status *string +} + +// GetJob implements the JobClassification interface for type Job. +func (j *Job) GetJob() *Job { return j } + +// JobQueryObject - Filters to list the jobs. +type JobQueryObject struct { + // Type of backup management for the job. + BackupManagementType *BackupManagementType + + // Job has ended at this time. Value is in UTC. + EndTime *time.Time + + // JobID represents the job uniquely. + JobID *string + + // Type of operation. + Operation *JobOperationType + + // Job has started at this time. Value is in UTC. + StartTime *time.Time + + // Status of the job. + Status *JobStatus +} + +// JobResource - Defines workload agnostic properties for a job. +type JobResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // JobResource properties + Properties JobClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// JobResourceList - List of Job resources +type JobResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*JobResource +} + +// KEKDetails - KEK is encryption key for BEK. +type KEKDetails struct { + // KEK data. + KeyBackupData *string + + // Key is KEK. + KeyURL *string + + // Key Vault ID where this Key is stored. + KeyVaultID *string +} + +// KPIResourceHealthDetails - KPI Resource Health Details +type KPIResourceHealthDetails struct { + // Resource Health Status + ResourceHealthDetails []*ResourceHealthDetails + + // Resource Health Status + ResourceHealthStatus *ResourceHealthStatus +} + +// KeyAndSecretDetails - BEK is bitlocker key. KEK is encryption key for BEK If the VM was encrypted then we will store following +// details : +// 1. Secret(BEK) - Url + Backup Data + vaultId. +// 2. Key(KEK) - Url + Backup Data + vaultId. +// 3. EncryptionMechanism BEK and KEK can potentially have different vault ids. +type KeyAndSecretDetails struct { + // BEK is bitlocker encryption key. + BekDetails *BEKDetails + + // Encryption mechanism: None/ SinglePass/ DoublePass + EncryptionMechanism *string + + // KEK is encryption key for BEK. + KekDetails *KEKDetails +} + +// ListRecoveryPointsRecommendedForMoveRequest Request +type ListRecoveryPointsRecommendedForMoveRequest struct { + // List of Recovery Points excluded from Move + ExcludedRPList []*string + + // Gets the class type. + ObjectType *string +} + +// LogSchedulePolicy - Log policy schedule. +type LogSchedulePolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + SchedulePolicyType *string + + // Frequency of the log schedule operation of this policy in minutes. + ScheduleFrequencyInMins *int32 +} + +// GetSchedulePolicy implements the SchedulePolicyClassification interface for type LogSchedulePolicy. +func (l *LogSchedulePolicy) GetSchedulePolicy() *SchedulePolicy { + return &SchedulePolicy{ + SchedulePolicyType: l.SchedulePolicyType, + } +} + +// LongTermRetentionPolicy - Long term retention policy. +type LongTermRetentionPolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + RetentionPolicyType *string + + // Daily retention schedule of the protection policy. + DailySchedule *DailyRetentionSchedule + + // Monthly retention schedule of the protection policy. + MonthlySchedule *MonthlyRetentionSchedule + + // Weekly retention schedule of the protection policy. + WeeklySchedule *WeeklyRetentionSchedule + + // Yearly retention schedule of the protection policy. + YearlySchedule *YearlyRetentionSchedule +} + +// GetRetentionPolicy implements the RetentionPolicyClassification interface for type LongTermRetentionPolicy. +func (l *LongTermRetentionPolicy) GetRetentionPolicy() *RetentionPolicy { + return &RetentionPolicy{ + RetentionPolicyType: l.RetentionPolicyType, + } +} + +// LongTermSchedulePolicy - Long term policy schedule. +type LongTermSchedulePolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + SchedulePolicyType *string +} + +// GetSchedulePolicy implements the SchedulePolicyClassification interface for type LongTermSchedulePolicy. +func (l *LongTermSchedulePolicy) GetSchedulePolicy() *SchedulePolicy { + return &SchedulePolicy{ + SchedulePolicyType: l.SchedulePolicyType, + } +} + +// MABContainerHealthDetails - MAB workload-specific Health Details. +type MABContainerHealthDetails struct { + // Health Code + Code *int32 + + // Health Message + Message *string + + // Health Recommended Actions + Recommendations []*string + + // Health Title + Title *string +} + +// MabContainer - Container with items backed up using MAB backup engine. +type MabContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Agent version of this container. + AgentVersion *string + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Can the container be registered one more time. + CanReRegister *bool + + // Health state of mab container. + ContainerHealthState *string + + // ContainerID represents the container. + ContainerID *int64 + + // Additional information for this container + ExtendedInfo *MabContainerExtendedInfo + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Health details on this mab container. + MabContainerHealthDetails []*MABContainerHealthDetails + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Number of items backed up in this container. + ProtectedItemCount *int64 + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string +} + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type MabContainer. +func (m *MabContainer) GetProtectionContainer() *ProtectionContainer { + return &ProtectionContainer{ + BackupManagementType: m.BackupManagementType, + ContainerType: m.ContainerType, + FriendlyName: m.FriendlyName, + HealthStatus: m.HealthStatus, + ProtectableObjectType: m.ProtectableObjectType, + RegistrationStatus: m.RegistrationStatus, + } +} + +// MabContainerExtendedInfo - Additional information of the container. +type MabContainerExtendedInfo struct { + // Type of backup items associated with this container. + BackupItemType *BackupItemType + + // List of backup items associated with this container. + BackupItems []*string + + // Latest backup status of this container. + LastBackupStatus *string + + // Time stamp when this container was refreshed. + LastRefreshedAt *time.Time + + // Backup policy associated with this container. + PolicyName *string +} + +// MabErrorInfo - MAB workload-specific error information. +type MabErrorInfo struct { + // READ-ONLY; Localized error string. + ErrorString *string + + // READ-ONLY; List of localized recommendations. + Recommendations []*string +} + +// MabFileFolderProtectedItem - MAB workload-specific backup item. +type MabFileFolderProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Name of the computer associated with this backup item. + ComputerName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Sync time for deferred deletion in UTC + DeferredDeleteSyncTimeInUTC *int64 + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Additional information with this backup item. + ExtendedInfo *MabFileFolderProtectedItemExtendedInfo + + // Friendly name of this backup item. + FriendlyName *string + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Status of last backup operation. + LastBackupStatus *string + + // Timestamp of the last backup operation on this backup item. + LastBackupTime *time.Time + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // Protected, ProtectionStopped, IRPending or ProtectionError + ProtectionState *string + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type MabFileFolderProtectedItem. +func (m *MabFileFolderProtectedItem) GetProtectedItem() *ProtectedItem { + return &ProtectedItem{ + BackupManagementType: m.BackupManagementType, + BackupSetName: m.BackupSetName, + ContainerName: m.ContainerName, + CreateMode: m.CreateMode, + DeferredDeleteTimeInUTC: m.DeferredDeleteTimeInUTC, + DeferredDeleteTimeRemaining: m.DeferredDeleteTimeRemaining, + IsArchiveEnabled: m.IsArchiveEnabled, + IsDeferredDeleteScheduleUpcoming: m.IsDeferredDeleteScheduleUpcoming, + IsRehydrate: m.IsRehydrate, + IsScheduledForDeferredDelete: m.IsScheduledForDeferredDelete, + LastRecoveryPoint: m.LastRecoveryPoint, + PolicyID: m.PolicyID, + PolicyName: m.PolicyName, + ProtectedItemType: m.ProtectedItemType, + ResourceGuardOperationRequests: m.ResourceGuardOperationRequests, + SoftDeleteRetentionPeriodInDays: m.SoftDeleteRetentionPeriodInDays, + SourceResourceID: m.SourceResourceID, + VaultID: m.VaultID, + WorkloadType: m.WorkloadType, + } +} + +// MabFileFolderProtectedItemExtendedInfo - Additional information on the backed up item. +type MabFileFolderProtectedItemExtendedInfo struct { + // Last time when the agent data synced to service. + LastRefreshedAt *time.Time + + // The oldest backup copy available. + OldestRecoveryPoint *time.Time + + // Number of backup copies associated with the backup item. + RecoveryPointCount *int32 +} + +// MabJob - MAB workload-specific job. +type MabJob struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + JobType *string + + // The state/actions applicable on jobs like cancel/retry. + ActionsInfo []*JobSupportedAction + + // ActivityId of job. + ActivityID *string + + // Backup management type to execute the current job. + BackupManagementType *BackupManagementType + + // Time taken by job to run. + Duration *string + + // The end time. + EndTime *time.Time + + // Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string + + // The errors. + ErrorDetails []*MabErrorInfo + + // Additional information on the job. + ExtendedInfo *MabJobExtendedInfo + + // Name of server protecting the DS. + MabServerName *string + + // Server type of MAB container. + MabServerType *MabServerType + + // The operation name. + Operation *string + + // The start time. + StartTime *time.Time + + // Job status. + Status *string + + // Workload type of backup item. + WorkloadType *WorkloadType +} + +// GetJob implements the JobClassification interface for type MabJob. +func (m *MabJob) GetJob() *Job { + return &Job{ + ActivityID: m.ActivityID, + BackupManagementType: m.BackupManagementType, + EndTime: m.EndTime, + EntityFriendlyName: m.EntityFriendlyName, + JobType: m.JobType, + Operation: m.Operation, + StartTime: m.StartTime, + Status: m.Status, + } +} + +// MabJobExtendedInfo - Additional information for the MAB workload-specific job. +type MabJobExtendedInfo struct { + // Non localized error message specific to this job. + DynamicErrorMessage *string + + // The job properties. + PropertyBag map[string]*string + + // List of tasks for this job. + TasksList []*MabJobTaskDetails +} + +// MabJobTaskDetails - MAB workload-specific job task details. +type MabJobTaskDetails struct { + // Time elapsed for task. + Duration *string + + // The end time. + EndTime *time.Time + + // The start time. + StartTime *time.Time + + // The status. + Status *string + + // The task display name. + TaskID *string +} + +// MabProtectionPolicy - Mab container-specific backup policy. +type MabProtectionPolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + BackupManagementType *string + + // Number of items associated with this policy. + ProtectedItemsCount *int32 + + // ResourceGuard Operation Requests + ResourceGuardOperationRequests []*string + + // Retention policy details. + RetentionPolicy RetentionPolicyClassification + + // Backup schedule of backup policy. + SchedulePolicy SchedulePolicyClassification +} + +// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type MabProtectionPolicy. +func (m *MabProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { + return &ProtectionPolicy{ + BackupManagementType: m.BackupManagementType, + ProtectedItemsCount: m.ProtectedItemsCount, + ResourceGuardOperationRequests: m.ResourceGuardOperationRequests, + } +} + +// MonthlyRetentionSchedule - Monthly retention schedule. +type MonthlyRetentionSchedule struct { + // Retention duration of retention Policy. + RetentionDuration *RetentionDuration + + // Daily retention format for monthly retention policy. + RetentionScheduleDaily *DailyRetentionFormat + + // Retention schedule format type for monthly retention policy. + RetentionScheduleFormatType *RetentionScheduleFormat + + // Weekly retention format for monthly retention policy. + RetentionScheduleWeekly *WeeklyRetentionFormat + + // Retention times of retention policy. + RetentionTimes []*time.Time +} + +type MoveRPAcrossTiersRequest struct { + // Gets the class type. + ObjectType *string + + // Source tier from where RP needs to be moved + SourceTierType *RecoveryPointTierType + + // Target tier where RP needs to be moved + TargetTierType *RecoveryPointTierType +} + +// NameInfo - The name of usage. +type NameInfo struct { + // Localized value of usage. + LocalizedValue *string + + // Value of usage. + Value *string +} + +// NewErrorResponse - The resource management error response. +type NewErrorResponse struct { + // The error object. + Error *NewErrorResponseError +} + +// NewErrorResponseError - The error object. +type NewErrorResponseError struct { + // READ-ONLY; The error additional info. + AdditionalInfo []*ErrorAdditionalInfo + + // READ-ONLY; The error code. + Code *string + + // READ-ONLY; The error details. + Details []*NewErrorResponse + + // READ-ONLY; The error message. + Message *string + + // READ-ONLY; The error target. + Target *string +} + +// OperationResultInfo - Operation result info. +type OperationResultInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // List of jobs created by this operation. + JobList []*string +} + +// GetOperationResultInfoBase implements the OperationResultInfoBaseClassification interface for type OperationResultInfo. +func (o *OperationResultInfo) GetOperationResultInfoBase() *OperationResultInfoBase { + return &OperationResultInfoBase{ + ObjectType: o.ObjectType, + } +} + +// OperationResultInfoBase - Base class for operation result info. +type OperationResultInfoBase struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string +} + +// GetOperationResultInfoBase implements the OperationResultInfoBaseClassification interface for type OperationResultInfoBase. +func (o *OperationResultInfoBase) GetOperationResultInfoBase() *OperationResultInfoBase { return o } + +// OperationResultInfoBaseResource - Base class for operation result info. +type OperationResultInfoBaseResource struct { + // HTTP headers associated with this operation. + Headers map[string][]*string + + // OperationResultInfoBaseResource operation + Operation OperationResultInfoBaseClassification + + // HTTP Status Code of the operation. + StatusCode *HTTPStatusCode +} + +// OperationStatus - Operation status. +type OperationStatus struct { + // Operation end time. Format: ISO-8601. + EndTime *time.Time + + // Error information related to this operation. + Error *OperationStatusError + + // ID of the operation. + ID *string + + // Name of the operation. + Name *string + + // Additional information associated with this operation. + Properties OperationStatusExtendedInfoClassification + + // Operation start time. Format: ISO-8601. + StartTime *time.Time + + // Operation status. + Status *OperationStatusValues +} + +// OperationStatusError - Error information associated with operation status call. +type OperationStatusError struct { + // Error code of the operation failure. + Code *string + + // Error message displayed if the operation failure. + Message *string +} + +// OperationStatusExtendedInfo - Base class for additional information of operation status. +type OperationStatusExtendedInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string +} + +// GetOperationStatusExtendedInfo implements the OperationStatusExtendedInfoClassification interface for type OperationStatusExtendedInfo. +func (o *OperationStatusExtendedInfo) GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo { + return o +} + +// OperationStatusJobExtendedInfo - Operation status job extended info. +type OperationStatusJobExtendedInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // ID of the job created for this protected item. + JobID *string +} + +// GetOperationStatusExtendedInfo implements the OperationStatusExtendedInfoClassification interface for type OperationStatusJobExtendedInfo. +func (o *OperationStatusJobExtendedInfo) GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo { + return &OperationStatusExtendedInfo{ + ObjectType: o.ObjectType, + } +} + +// OperationStatusJobsExtendedInfo - Operation status extended info for list of jobs. +type OperationStatusJobsExtendedInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Stores all the failed jobs along with the corresponding error codes. + FailedJobsError map[string]*string + + // IDs of the jobs created for the protected item. + JobIDs []*string +} + +// GetOperationStatusExtendedInfo implements the OperationStatusExtendedInfoClassification interface for type OperationStatusJobsExtendedInfo. +func (o *OperationStatusJobsExtendedInfo) GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo { + return &OperationStatusExtendedInfo{ + ObjectType: o.ObjectType, + } +} + +// OperationStatusProvisionILRExtendedInfo - Operation status extended info for ILR provision action. +type OperationStatusProvisionILRExtendedInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Target details for file / folder restore. + RecoveryTarget *InstantItemRecoveryTarget +} + +// GetOperationStatusExtendedInfo implements the OperationStatusExtendedInfoClassification interface for type OperationStatusProvisionILRExtendedInfo. +func (o *OperationStatusProvisionILRExtendedInfo) GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo { + return &OperationStatusExtendedInfo{ + ObjectType: o.ObjectType, + } +} + +// OperationStatusValidateOperationExtendedInfo - Operation status extended info for ValidateOperation action. +type OperationStatusValidateOperationExtendedInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Gets the validation operation response + ValidateOperationResponse *ValidateOperationResponse +} + +// GetOperationStatusExtendedInfo implements the OperationStatusExtendedInfoClassification interface for type OperationStatusValidateOperationExtendedInfo. +func (o *OperationStatusValidateOperationExtendedInfo) GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo { + return &OperationStatusExtendedInfo{ + ObjectType: o.ObjectType, + } +} + +// OperationWorkerResponse - This is the base class for operation result responses. +type OperationWorkerResponse struct { + // HTTP headers associated with this operation. + Headers map[string][]*string + + // HTTP Status Code of the operation. + StatusCode *HTTPStatusCode +} + +// PointInTimeRange - Provides details for log ranges +type PointInTimeRange struct { + // End time of the time range for log recovery. + EndTime *time.Time + + // Start time of the time range for log recovery. + StartTime *time.Time +} + +// PreBackupValidation - Pre-backup validation for Azure VM Workload provider. +type PreBackupValidation struct { + // Error code of protectable item + Code *string + + // Message corresponding to the error code for the protectable item + Message *string + + // Status of protectable item, i.e. InProgress,Succeeded,Failed + Status *InquiryStatus +} + +// PreValidateEnableBackupRequest - Contract to validate if backup can be enabled on the given resource in a given vault and +// given configuration. It will validate followings +// 1. Vault capacity +// 2. VM is already protected +// 3. Any VM related configuration passed in properties. +type PreValidateEnableBackupRequest struct { + // Configuration of VM if any needs to be validated like OS type etc + Properties *string + + // ARM Virtual Machine Id + ResourceID *string + + // ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc + ResourceType *DataSourceType + + // ARM id of the Recovery Services Vault + VaultID *string +} + +// PreValidateEnableBackupResponse - Response contract for enable backup validation request +type PreValidateEnableBackupResponse struct { + // Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required for + // portal + ContainerName *string + + // Response error code + ErrorCode *string + + // Response error message + ErrorMessage *string + + // Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal + ProtectedItemName *string + + // Recommended action for user + Recommendation *string + + // Validation Status + Status *ValidationStatus +} + +// PrepareDataMoveRequest - Prepare DataMove Request +type PrepareDataMoveRequest struct { + // REQUIRED; DataMove Level + DataMoveLevel *DataMoveLevel + + // REQUIRED; Target Region + TargetRegion *string + + // REQUIRED; ARM Id of target vault + TargetResourceID *string + + // Ignore the artifacts which are already moved. + IgnoreMoved *bool + + // Source Container ArmIds This needs to be populated only if DataMoveLevel is set to container + SourceContainerArmIDs []*string +} + +// PrepareDataMoveResponse - Prepare DataMove Response +type PrepareDataMoveResponse struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Co-relationId for move operation + CorrelationID *string + + // Source Vault Properties + SourceVaultProperties map[string]*string +} + +// GetVaultStorageConfigOperationResultResponse implements the VaultStorageConfigOperationResultResponseClassification interface +// for type PrepareDataMoveResponse. +func (p *PrepareDataMoveResponse) GetVaultStorageConfigOperationResultResponse() *VaultStorageConfigOperationResultResponse { + return &VaultStorageConfigOperationResultResponse{ + ObjectType: p.ObjectType, + } +} + +// PrivateEndpoint - The Private Endpoint network resource that is linked to the Private Endpoint connection +type PrivateEndpoint struct { + // Gets or sets id + ID *string +} + +// PrivateEndpointConnection - Private Endpoint Connection Response Properties +type PrivateEndpointConnection struct { + // Group Ids for the Private Endpoint + GroupIDs []*VaultSubResourceType + + // Gets or sets private endpoint associated with the private endpoint connection + PrivateEndpoint *PrivateEndpoint + + // Gets or sets private link service connection state + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState + + // Gets or sets provisioning state of the private endpoint connection + ProvisioningState *ProvisioningState +} + +// PrivateEndpointConnectionResource - Private Endpoint Connection Response Properties +type PrivateEndpointConnectionResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // PrivateEndpointConnectionResource properties + Properties *PrivateEndpointConnection + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// PrivateLinkServiceConnectionState - Private Link Service Connection State +type PrivateLinkServiceConnectionState struct { + // Gets or sets actions required + ActionsRequired *string + + // Gets or sets description + Description *string + + // Gets or sets the status + Status *PrivateEndpointConnectionStatus +} + +// ProtectableContainer - Protectable Container Class. +type ProtectableContainer struct { + // REQUIRED; Type of the container. The value of this property for + // 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines + ProtectableContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Fabric Id of the container such as ARM Id. + ContainerID *string + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string +} + +// GetProtectableContainer implements the ProtectableContainerClassification interface for type ProtectableContainer. +func (p *ProtectableContainer) GetProtectableContainer() *ProtectableContainer { return p } + +// ProtectableContainerResource - Protectable Container Class. +type ProtectableContainerResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // ProtectableContainerResource properties + Properties ProtectableContainerClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// ProtectableContainerResourceList - List of ProtectableContainer resources +type ProtectableContainerResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*ProtectableContainerResource +} + +// ProtectedItem - Base class for backup items. +type ProtectedItem struct { + // REQUIRED; backup item type. + ProtectedItemType *string + + // Name of the backup set the backup item belongs to + BackupSetName *string + + // Unique name of container + ContainerName *string + + // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + CreateMode *CreateMode + + // Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *time.Time + + // Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string + + // Flag to identify whether datasource is protected in archive + IsArchiveEnabled *bool + + // Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool + + // Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool + + // Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool + + // Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *time.Time + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Name of the policy used for protection + PolicyName *string + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string + + // Soft delete retention period in days + SoftDeleteRetentionPeriodInDays *int32 + + // ARM ID of the resource to be backed up. + SourceResourceID *string + + // READ-ONLY; Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // READ-ONLY; ID of the vault which protects this item + VaultID *string + + // READ-ONLY; Type of workload this item represents. + WorkloadType *DataSourceType +} + +// GetProtectedItem implements the ProtectedItemClassification interface for type ProtectedItem. +func (p *ProtectedItem) GetProtectedItem() *ProtectedItem { return p } + +// ProtectedItemQueryObject - Filters to list backup items. +type ProtectedItemQueryObject struct { + // Backup Engine name + BackupEngineName *string + + // Backup management type for the backed up item. + BackupManagementType *BackupManagementType + + // Name of the backup set. + BackupSetName *string + + // Name of the container. + ContainerName *string + + // Name of the fabric. + FabricName *string + + // Friendly name of protected item + FriendlyName *string + + // Health State for the backed up item. + HealthState *HealthState + + // Type of workload this item represents. + ItemType *DataSourceType + + // Backup policy name associated with the backup item. + PolicyName *string +} + +// ProtectedItemResource - Base class for backup items. +type ProtectedItemResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // ProtectedItemResource properties + Properties ProtectedItemClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// ProtectedItemResourceList - List of ProtectedItem resources +type ProtectedItemResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*ProtectedItemResource +} + +// ProtectionContainer - Base class for container with backup items. Containers with specific workloads are derived from this +// class. +type ProtectionContainer struct { + // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines + // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows + // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. + // 6. Azure workload Backup is VMAppContainer + ContainerType *ProtectableContainerType + + // Type of backup management for the container. + BackupManagementType *BackupManagementType + + // Friendly name of the container. + FriendlyName *string + + // Status of health of the container. + HealthStatus *string + + // Type of the protectable object associated with this container + ProtectableObjectType *string + + // Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string +} + +// GetProtectionContainer implements the ProtectionContainerClassification interface for type ProtectionContainer. +func (p *ProtectionContainer) GetProtectionContainer() *ProtectionContainer { return p } + +// ProtectionContainerResource - Base class for container with backup items. Containers with specific workloads are derived +// from this class. +type ProtectionContainerResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // ProtectionContainerResource properties + Properties ProtectionContainerClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// ProtectionContainerResourceList - List of ProtectionContainer resources +type ProtectionContainerResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*ProtectionContainerResource +} + +// ProtectionIntent - Base class for backup ProtectionIntent. +type ProtectionIntent struct { + // REQUIRED; backup protectionIntent type. + ProtectionIntentItemType *ProtectionIntentItemType + + // Type of backup management for the backed up item. + BackupManagementType *BackupManagementType + + // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string + + // ID of the backup policy with which this item is backed up. + PolicyID *string + + // Backup state of this backup item. + ProtectionState *ProtectionStatus + + // ARM ID of the resource to be backed up. + SourceResourceID *string +} + +// GetProtectionIntent implements the ProtectionIntentClassification interface for type ProtectionIntent. +func (p *ProtectionIntent) GetProtectionIntent() *ProtectionIntent { return p } + +// ProtectionIntentQueryObject - Filters to list protection intent. +type ProtectionIntentQueryObject struct { + // Backup management type for the backed up item + BackupManagementType *BackupManagementType + + // Item name of the intent + ItemName *string + + // Type of workload this item represents + ItemType *IntentItemType + + // Parent name of the intent + ParentName *string +} + +// ProtectionIntentResource - Base class for backup ProtectionIntent. +type ProtectionIntentResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // ProtectionIntentResource properties + Properties ProtectionIntentClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// ProtectionIntentResourceList - List of ProtectionIntent resources +type ProtectionIntentResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*ProtectionIntentResource +} + +// ProtectionPolicy - Base class for backup policy. Workload-specific backup policies are derived from this class. +type ProtectionPolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + BackupManagementType *string + + // Number of items associated with this policy. + ProtectedItemsCount *int32 + + // ResourceGuard Operation Requests + ResourceGuardOperationRequests []*string +} + +// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type ProtectionPolicy. +func (p *ProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { return p } + +// ProtectionPolicyQueryObject - Filters the list backup policies API. +type ProtectionPolicyQueryObject struct { + // Backup management type for the backup policy. + BackupManagementType *BackupManagementType + + // Fabric name for filter + FabricName *string + + // Workload type for the backup policy. + WorkloadType *WorkloadType +} + +// ProtectionPolicyResource - Base class for backup policy. Workload-specific backup policies are derived from this class. +type ProtectionPolicyResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // ProtectionPolicyResource properties + Properties ProtectionPolicyClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// ProtectionPolicyResourceList - List of ProtectionPolicy resources +type ProtectionPolicyResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*ProtectionPolicyResource +} + +// RecoveryPoint - Base class for backup copies. Workload-specific backup copies are derived from this class. +type RecoveryPoint struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string +} + +// GetRecoveryPoint implements the RecoveryPointClassification interface for type RecoveryPoint. +func (r *RecoveryPoint) GetRecoveryPoint() *RecoveryPoint { return r } + +// RecoveryPointDiskConfiguration - Disk configuration +type RecoveryPointDiskConfiguration struct { + // Information of disks excluded from backup + ExcludedDiskList []*DiskInformation + + // Information of disks included in backup + IncludedDiskList []*DiskInformation + + // Number of disks attached to the VM + NumberOfDisksAttachedToVM *int32 + + // Number of disks included in backup + NumberOfDisksIncludedInBackup *int32 +} + +type RecoveryPointMoveReadinessInfo struct { + AdditionalInfo *string + IsReadyForMove *bool +} + +// RecoveryPointProperties - Properties of Recovery Point +type RecoveryPointProperties struct { + // Expiry time of Recovery Point in UTC. + ExpiryTime *string + + // Bool to indicate whether RP is in soft delete state or not + IsSoftDeleted *bool + + // Rule name tagged on Recovery Point that governs life cycle + RuleName *string +} + +// RecoveryPointRehydrationInfo - RP Rehydration Info +type RecoveryPointRehydrationInfo struct { + // Rehydration Priority + RehydrationPriority *RehydrationPriority + + // How long the rehydrated RP should be kept Should be ISO8601 Duration format e.g. "P7D" + RehydrationRetentionDuration *string +} + +// RecoveryPointResource - Base class for backup copies. Workload-specific backup copies are derived from this class. +type RecoveryPointResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // RecoveryPointResource properties + Properties RecoveryPointClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// RecoveryPointResourceList - List of RecoveryPoint resources +type RecoveryPointResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*RecoveryPointResource +} + +// RecoveryPointTierInformation - Recovery point tier information. +type RecoveryPointTierInformation struct { + // Recovery point tier status. + ExtendedInfo map[string]*string + + // Recovery point tier status. + Status *RecoveryPointTierStatus + + // Recovery point tier type. + Type *RecoveryPointTierType +} + +// RecoveryPointTierInformationV2 - RecoveryPoint Tier Information V2 +type RecoveryPointTierInformationV2 struct { + // Recovery point tier status. + ExtendedInfo map[string]*string + + // Recovery point tier status. + Status *RecoveryPointTierStatus + + // Recovery point tier type. + Type *RecoveryPointTierType +} + +// Resource - ARM Resource. +type Resource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +type ResourceGuardOperationDetail struct { + DefaultResourceRequest *string + VaultCriticalOperation *string +} + +type ResourceGuardProxyBase struct { + // REQUIRED + ResourceGuardResourceID *string + Description *string + LastUpdatedTime *string + ResourceGuardOperationDetails []*ResourceGuardOperationDetail +} + +type ResourceGuardProxyBaseResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // ResourceGuardProxyBaseResource properties + Properties *ResourceGuardProxyBase + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// ResourceGuardProxyBaseResourceList - List of ResourceGuardProxyBase resources +type ResourceGuardProxyBaseResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*ResourceGuardProxyBaseResource +} + +// ResourceHealthDetails - Health Details for backup items. +type ResourceHealthDetails struct { + // READ-ONLY; Health Code + Code *int32 + + // READ-ONLY; Health Message + Message *string + + // READ-ONLY; Health Recommended Actions + Recommendations []*string + + // READ-ONLY; Health Title + Title *string +} + +// ResourceList - Base for all lists of resources. +type ResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string +} + +// RestoreFileSpecs - Restore file specs like file path, type and target folder path info. +type RestoreFileSpecs struct { + // Indicates what the Path variable stands for + FileSpecType *string + + // Source File/Folder path + Path *string + + // Destination folder path in target FileShare + TargetFolderPath *string +} + +// RestoreRequest - Base class for restore request. Workload-specific restore requests are derived from this class. +type RestoreRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // ResourceGuardOperationRequests on which LAC check will be performed + ResourceGuardOperationRequests []*string +} + +// GetRestoreRequest implements the RestoreRequestClassification interface for type RestoreRequest. +func (r *RestoreRequest) GetRestoreRequest() *RestoreRequest { return r } + +// RestoreRequestResource - Base class for restore request. Workload-specific restore requests are derived from this class. +type RestoreRequestResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // RestoreRequestResource properties + Properties RestoreRequestClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// RetentionDuration - Retention duration. +type RetentionDuration struct { + // Count of duration types. Retention duration is obtained by the counting the duration type Count times. For example, when + // Count = 3 and DurationType = Weeks, retention duration will be three weeks. + Count *int32 + + // Retention duration type of retention policy. + DurationType *RetentionDurationType +} + +// RetentionPolicy - Base class for retention policy. +type RetentionPolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + RetentionPolicyType *string +} + +// GetRetentionPolicy implements the RetentionPolicyClassification interface for type RetentionPolicy. +func (r *RetentionPolicy) GetRetentionPolicy() *RetentionPolicy { return r } + +// SQLDataDirectory info +type SQLDataDirectory struct { + // Logical name of the file + LogicalName *string + + // File path + Path *string + + // Type of data directory mapping + Type *SQLDataDirectoryType +} + +// SQLDataDirectoryMapping - Encapsulates information regarding data directory +type SQLDataDirectoryMapping struct { + // Type of data directory mapping + MappingType *SQLDataDirectoryType + + // Restore source logical name path + SourceLogicalName *string + + // Restore source path + SourcePath *string + + // Target path + TargetPath *string +} + +// SchedulePolicy - Base class for backup schedule. +type SchedulePolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + SchedulePolicyType *string +} + +// GetSchedulePolicy implements the SchedulePolicyClassification interface for type SchedulePolicy. +func (s *SchedulePolicy) GetSchedulePolicy() *SchedulePolicy { return s } + +// SecuredVMDetails - Restore request parameters for Secured VMs +type SecuredVMDetails struct { + // Gets or Sets Disk Encryption Set Id for Secured VM OS Disk + SecuredVMOsDiskEncryptionSetID *string +} + +// SecurityPinBase - Base class for get security pin request body +type SecurityPinBase struct { + // ResourceGuard Operation Requests + ResourceGuardOperationRequests []*string +} + +// Settings - Common settings field for backup management +type Settings struct { + // Workload compression flag. This has been added so that 'isSqlCompression' will be deprecated once clients upgrade to consider + // this flag. + IsCompression *bool + + // SQL compression flag + Issqlcompression *bool + + // TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string +} + +// SimpleRetentionPolicy - Simple policy retention. +type SimpleRetentionPolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + RetentionPolicyType *string + + // Retention duration of the protection policy. + RetentionDuration *RetentionDuration +} + +// GetRetentionPolicy implements the RetentionPolicyClassification interface for type SimpleRetentionPolicy. +func (s *SimpleRetentionPolicy) GetRetentionPolicy() *RetentionPolicy { + return &RetentionPolicy{ + RetentionPolicyType: s.RetentionPolicyType, + } +} + +// SimpleSchedulePolicy - Simple policy schedule. +type SimpleSchedulePolicy struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + SchedulePolicyType *string + + // Hourly Schedule of this Policy + HourlySchedule *HourlySchedule + + // List of days of week this schedule has to be run. + ScheduleRunDays []*DayOfWeek + + // Frequency of the schedule operation of this policy. + ScheduleRunFrequency *ScheduleRunType + + // List of times of day this schedule has to be run. + ScheduleRunTimes []*time.Time + + // At every number weeks this schedule has to be run. + ScheduleWeeklyFrequency *int32 +} + +// GetSchedulePolicy implements the SchedulePolicyClassification interface for type SimpleSchedulePolicy. +func (s *SimpleSchedulePolicy) GetSchedulePolicy() *SchedulePolicy { + return &SchedulePolicy{ + SchedulePolicyType: s.SchedulePolicyType, + } +} + +// SimpleSchedulePolicyV2 - The V2 policy schedule for IaaS that supports hourly backups. +type SimpleSchedulePolicyV2 struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + SchedulePolicyType *string + + // Daily schedule of this policy + DailySchedule *DailySchedule + + // hourly schedule of this policy + HourlySchedule *HourlySchedule + + // Frequency of the schedule operation of this policy. + ScheduleRunFrequency *ScheduleRunType + + // Weekly schedule of this policy + WeeklySchedule *WeeklySchedule +} + +// GetSchedulePolicy implements the SchedulePolicyClassification interface for type SimpleSchedulePolicyV2. +func (s *SimpleSchedulePolicyV2) GetSchedulePolicy() *SchedulePolicy { + return &SchedulePolicy{ + SchedulePolicyType: s.SchedulePolicyType, + } +} + +// SnapshotBackupAdditionalDetails - Snapshot Backup related fields for WorkloadType SaPHanaSystem +type SnapshotBackupAdditionalDetails struct { + InstantRPDetails *string + InstantRpRetentionRangeInDays *int32 + + // User assigned managed identity details + UserAssignedManagedIdentityDetails *UserAssignedManagedIdentityDetails +} + +// SnapshotRestoreParameters - Encapsulates information regarding snapshot recovery for SAP Hana +type SnapshotRestoreParameters struct { + LogPointInTimeForDBRecovery *string + SkipAttachAndMount *bool +} + +// SubProtectionPolicy - Sub-protection policy which includes schedule and retention +type SubProtectionPolicy struct { + // Type of backup policy type + PolicyType *PolicyType + + // Retention policy with the details on backup copy retention ranges. + RetentionPolicy RetentionPolicyClassification + + // Backup schedule specified as part of backup policy. + SchedulePolicy SchedulePolicyClassification + + // Snapshot Backup related fields for WorkloadType SaPHanaSystem + SnapshotBackupAdditionalDetails *SnapshotBackupAdditionalDetails + + // Tiering policy to automatically move RPs to another tier. Key is Target Tier, defined in RecoveryPointTierType enum. Tiering + // policy specifies the criteria to move RP to the target tier. + TieringPolicy map[string]*TieringPolicy +} + +// TargetAFSRestoreInfo - Target Azure File Share Info. +type TargetAFSRestoreInfo struct { + // File share name + Name *string + + // Target file share resource ARM ID + TargetResourceID *string +} + +// TargetDiskNetworkAccessSettings - Specifies target network access settings for disks of VM to be restored. +type TargetDiskNetworkAccessSettings struct { + // Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew + TargetDiskAccessID *string + + // Network access settings to be used for restored disks + TargetDiskNetworkAccessOption *TargetDiskNetworkAccessOption +} + +// TargetRestoreInfo - Details about target workload during restore operation. +type TargetRestoreInfo struct { + // Resource Id name of the container in which Target DataBase resides + ContainerID *string + + // Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + DatabaseName *string + + // Can Overwrite if Target DataBase already exists + OverwriteOption *OverwriteOptions + + // Target directory location for restore as files. + TargetDirectoryForFileRestore *string +} + +// TieringCostInfo - Base class for tiering cost response +type TieringCostInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string +} + +// GetTieringCostInfo implements the TieringCostInfoClassification interface for type TieringCostInfo. +func (t *TieringCostInfo) GetTieringCostInfo() *TieringCostInfo { return t } + +// TieringCostRehydrationInfo - Response parameters for tiering cost info for rehydration +type TieringCostRehydrationInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // REQUIRED; Rehydration size in bytes + RehydrationSizeInBytes *int64 + + // REQUIRED; Source tier to target tier rehydration cost per GB per month + RetailRehydrationCostPerGBPerMonth *float64 +} + +// GetTieringCostInfo implements the TieringCostInfoClassification interface for type TieringCostRehydrationInfo. +func (t *TieringCostRehydrationInfo) GetTieringCostInfo() *TieringCostInfo { + return &TieringCostInfo{ + ObjectType: t.ObjectType, + } +} + +// TieringCostSavingInfo - Response parameters for tiering cost info for savings +type TieringCostSavingInfo struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // REQUIRED; Source tier retail cost per GB per month + RetailSourceTierCostPerGBPerMonth *float64 + + // REQUIRED; Target tier retail cost per GB per month + RetailTargetTierCostPerGBPerMonth *float64 + + // REQUIRED; Source tier size reduction in bytes after moving all the recommended backup points to target tier + SourceTierSizeReductionInBytes *int64 + + // REQUIRED; Target tier size increase in bytes after moving all the recommended backup points to target tier + TargetTierSizeIncreaseInBytes *int64 +} + +// GetTieringCostInfo implements the TieringCostInfoClassification interface for type TieringCostSavingInfo. +func (t *TieringCostSavingInfo) GetTieringCostInfo() *TieringCostInfo { + return &TieringCostInfo{ + ObjectType: t.ObjectType, + } +} + +// TieringPolicy - Tiering Policy for a target tier. If the policy is not specified for a given target tier, service retains +// the existing configured tiering policy for that tier +type TieringPolicy struct { + // Number of days/weeks/months/years to retain backups in current tier before tiering. Used only if TieringMode is set to + // TierAfter + Duration *int32 + + // Retention duration type: days/weeks/months/years Used only if TieringMode is set to TierAfter + DurationType *RetentionDurationType + + // Tiering Mode to control automatic tiering of recovery points. Supported values are: + // 1. TierRecommended: Tier all recovery points recommended to be tiered + // 2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below. + // 3. DoNotTier: Do not tier any recovery points + TieringMode *TieringMode +} + +// TokenInformation - The token information details. +type TokenInformation struct { + // Expiry time of token. + ExpiryTimeInUTCTicks *int64 + + // Security PIN + SecurityPIN *string + + // Token value. + Token *string +} + +// TriggerDataMoveRequest - Trigger DataMove Request +type TriggerDataMoveRequest struct { + // REQUIRED; Correlation Id + CorrelationID *string + + // REQUIRED; DataMove Level + DataMoveLevel *DataMoveLevel + + // REQUIRED; Source Region + SourceRegion *string + + // REQUIRED; ARM Id of source vault + SourceResourceID *string + + // Pause GC + PauseGC *bool + + // Source Container ArmIds + SourceContainerArmIDs []*string +} + +// UnlockDeleteRequest - Request body of unlock delete API. +type UnlockDeleteRequest struct { + ResourceGuardOperationRequests []*string + ResourceToBeDeleted *string +} + +// UnlockDeleteResponse - Response of Unlock Delete API. +type UnlockDeleteResponse struct { + // This is the time when unlock delete privileges will get expired. + UnlockDeleteExpiryTime *string +} + +// UserAssignedIdentityProperties - User assigned managed identity properties +type UserAssignedIdentityProperties struct { + // The client ID of the assigned identity. + ClientID *string + + // The principal ID of the assigned identity. + PrincipalID *string +} + +// UserAssignedManagedIdentityDetails - User assigned managed identity details +type UserAssignedManagedIdentityDetails struct { + // The ARM id of the assigned identity. + IdentityArmID *string + + // The name of the assigned identity. + IdentityName *string + + // User assigned managed identity properties + UserAssignedIdentityProperties *UserAssignedIdentityProperties +} + +// ValidateIaasVMRestoreOperationRequest - AzureRestoreValidation request. +type ValidateIaasVMRestoreOperationRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Sets restore request to be validated + RestoreRequest RestoreRequestClassification +} + +// GetValidateOperationRequest implements the ValidateOperationRequestClassification interface for type ValidateIaasVMRestoreOperationRequest. +func (v *ValidateIaasVMRestoreOperationRequest) GetValidateOperationRequest() *ValidateOperationRequest { + return &ValidateOperationRequest{ + ObjectType: v.ObjectType, + } +} + +// GetValidateRestoreOperationRequest implements the ValidateRestoreOperationRequestClassification interface for type ValidateIaasVMRestoreOperationRequest. +func (v *ValidateIaasVMRestoreOperationRequest) GetValidateRestoreOperationRequest() *ValidateRestoreOperationRequest { + return &ValidateRestoreOperationRequest{ + ObjectType: v.ObjectType, + RestoreRequest: v.RestoreRequest, + } +} + +// ValidateOperationRequest - Base class for validate operation request. +type ValidateOperationRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string +} + +// GetValidateOperationRequest implements the ValidateOperationRequestClassification interface for type ValidateOperationRequest. +func (v *ValidateOperationRequest) GetValidateOperationRequest() *ValidateOperationRequest { return v } + +// ValidateOperationRequestResource - Base class for validate operation request. +type ValidateOperationRequestResource struct { + // REQUIRED; Recovery point ID. + ID *string + + // REQUIRED; ValidateOperationRequestResource properties + Properties ValidateOperationRequestClassification +} + +// ValidateOperationResponse - Base class for validate operation response. +type ValidateOperationResponse struct { + // Gets the validation result + ValidationResults []*ErrorDetail +} + +type ValidateOperationsResponse struct { + // Base class for validate operation response. + ValidateOperationResponse *ValidateOperationResponse +} + +// ValidateRestoreOperationRequest - AzureRestoreValidation request. +type ValidateRestoreOperationRequest struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string + + // Sets restore request to be validated + RestoreRequest RestoreRequestClassification +} + +// GetValidateOperationRequest implements the ValidateOperationRequestClassification interface for type ValidateRestoreOperationRequest. +func (v *ValidateRestoreOperationRequest) GetValidateOperationRequest() *ValidateOperationRequest { + return &ValidateOperationRequest{ + ObjectType: v.ObjectType, + } +} + +// GetValidateRestoreOperationRequest implements the ValidateRestoreOperationRequestClassification interface for type ValidateRestoreOperationRequest. +func (v *ValidateRestoreOperationRequest) GetValidateRestoreOperationRequest() *ValidateRestoreOperationRequest { + return v +} + +// VaultJob - Vault level Job +type VaultJob struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + JobType *string + + // Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo []*JobSupportedAction + + // ActivityId of job. + ActivityID *string + + // Backup management type to execute the current job. + BackupManagementType *BackupManagementType + + // Time elapsed during the execution of this job. + Duration *string + + // The end time. + EndTime *time.Time + + // Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string + + // Error details on execution of this job. + ErrorDetails []*VaultJobErrorInfo + + // Additional information about the job. + ExtendedInfo *VaultJobExtendedInfo + + // The operation name. + Operation *string + + // The start time. + StartTime *time.Time + + // Job status. + Status *string +} + +// GetJob implements the JobClassification interface for type VaultJob. +func (v *VaultJob) GetJob() *Job { + return &Job{ + ActivityID: v.ActivityID, + BackupManagementType: v.BackupManagementType, + EndTime: v.EndTime, + EntityFriendlyName: v.EntityFriendlyName, + JobType: v.JobType, + Operation: v.Operation, + StartTime: v.StartTime, + Status: v.Status, + } +} + +// VaultJobErrorInfo - Vault Job specific error information +type VaultJobErrorInfo struct { + // Error code. + ErrorCode *int32 + + // Localized error string. + ErrorString *string + + // List of localized recommendations for above error code. + Recommendations []*string +} + +// VaultJobExtendedInfo - Vault Job for CMK - has CMK specific info. +type VaultJobExtendedInfo struct { + // Job properties. + PropertyBag map[string]*string +} + +// VaultRetentionPolicy - Vault retention policy for AzureFileShare +type VaultRetentionPolicy struct { + // REQUIRED + SnapshotRetentionInDays *int32 + + // REQUIRED; Base class for retention policy. + VaultRetention RetentionPolicyClassification +} + +// VaultStorageConfigOperationResultResponse - Operation result response for Vault Storage Config +type VaultStorageConfigOperationResultResponse struct { + // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + ObjectType *string +} + +// GetVaultStorageConfigOperationResultResponse implements the VaultStorageConfigOperationResultResponseClassification interface +// for type VaultStorageConfigOperationResultResponse. +func (v *VaultStorageConfigOperationResultResponse) GetVaultStorageConfigOperationResultResponse() *VaultStorageConfigOperationResultResponse { + return v +} + +// WeeklyRetentionFormat - Weekly retention format. +type WeeklyRetentionFormat struct { + // List of days of the week. + DaysOfTheWeek []*DayOfWeek + + // List of weeks of month. + WeeksOfTheMonth []*WeekOfMonth +} + +// WeeklyRetentionSchedule - Weekly retention schedule. +type WeeklyRetentionSchedule struct { + // List of days of week for weekly retention policy. + DaysOfTheWeek []*DayOfWeek + + // Retention duration of retention Policy. + RetentionDuration *RetentionDuration + + // Retention times of retention policy. + RetentionTimes []*time.Time +} + +type WeeklySchedule struct { + ScheduleRunDays []*DayOfWeek + + // List of times of day this schedule has to be run. + ScheduleRunTimes []*time.Time +} + +// WorkloadInquiryDetails - Details of an inquired protectable item. +type WorkloadInquiryDetails struct { + // Inquiry validation such as permissions and other backup validations. + InquiryValidation *InquiryValidation + + // Contains the protectable item Count inside this Container. + ItemCount *int64 + + // Type of the Workload such as SQL, Oracle etc. + Type *string +} + +// WorkloadItem - Base class for backup item. Workload-specific backup items are derived from this class. +type WorkloadItem struct { + // REQUIRED; Type of the backup item. + WorkloadItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Type of workload for the backup management + WorkloadType *string +} + +// GetWorkloadItem implements the WorkloadItemClassification interface for type WorkloadItem. +func (w *WorkloadItem) GetWorkloadItem() *WorkloadItem { return w } + +// WorkloadItemResource - Base class for backup item. Workload-specific backup items are derived from this class. +type WorkloadItemResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // WorkloadItemResource properties + Properties WorkloadItemClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// WorkloadItemResourceList - List of WorkloadItem resources +type WorkloadItemResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*WorkloadItemResource +} + +// WorkloadProtectableItem - Base class for backup item. Workload-specific backup items are derived from this class. +type WorkloadProtectableItem struct { + // REQUIRED; Type of the backup item. + ProtectableItemType *string + + // Type of backup management to backup an item. + BackupManagementType *string + + // Friendly name of the backup item. + FriendlyName *string + + // State of the back up item. + ProtectionState *ProtectionStatus + + // Type of workload for the backup management + WorkloadType *string +} + +// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type WorkloadProtectableItem. +func (w *WorkloadProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return w } + +// WorkloadProtectableItemResource - Base class for backup item. Workload-specific backup items are derived from this class. +type WorkloadProtectableItemResource struct { + // Optional ETag. + ETag *string + + // Resource location. + Location *string + + // WorkloadProtectableItemResource properties + Properties WorkloadProtectableItemClassification + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource Id represents the complete path to the resource. + ID *string + + // READ-ONLY; Resource name associated with the resource. + Name *string + + // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… + Type *string +} + +// WorkloadProtectableItemResourceList - List of WorkloadProtectableItem resources +type WorkloadProtectableItemResourceList struct { + // The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use ListNext() + // to fetch the next page if the total number of resources exceeds 200. + NextLink *string + + // List of resources. + Value []*WorkloadProtectableItemResource +} + +// YearlyRetentionSchedule - Yearly retention schedule. +type YearlyRetentionSchedule struct { + // List of months of year of yearly retention policy. + MonthsOfYear []*MonthOfYear + + // Retention duration of retention Policy. + RetentionDuration *RetentionDuration + + // Daily retention format for yearly retention policy. + RetentionScheduleDaily *DailyRetentionFormat + + // Retention schedule format for yearly retention policy. + RetentionScheduleFormatType *RetentionScheduleFormat + + // Weekly retention format for yearly retention policy. + RetentionScheduleWeekly *WeeklyRetentionFormat + + // Retention times of retention policy. + RetentionTimes []*time.Time +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/models_serde.go new file mode 100644 index 00000000..3ec0b782 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/models_serde.go @@ -0,0 +1,15687 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "time" +) + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupGoalFeatureSupportRequest. +func (a AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["featureType"] = "AzureBackupGoals" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupGoalFeatureSupportRequest. +func (a *AzureBackupGoalFeatureSupportRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featureType": + err = unpopulate(val, "FeatureType", &a.FeatureType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupServerContainer. +func (a AzureBackupServerContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "canReRegister", a.CanReRegister) + populate(objectMap, "containerId", a.ContainerID) + objectMap["containerType"] = ProtectableContainerTypeAzureBackupServerContainer + populate(objectMap, "dpmAgentVersion", a.DpmAgentVersion) + populate(objectMap, "dpmServers", a.DpmServers) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + populate(objectMap, "protectableObjectType", a.ProtectableObjectType) + populate(objectMap, "protectedItemCount", a.ProtectedItemCount) + populate(objectMap, "protectionStatus", a.ProtectionStatus) + populate(objectMap, "registrationStatus", a.RegistrationStatus) + populate(objectMap, "upgradeAvailable", a.UpgradeAvailable) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupServerContainer. +func (a *AzureBackupServerContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "canReRegister": + err = unpopulate(val, "CanReRegister", &a.CanReRegister) + delete(rawMsg, key) + case "containerId": + err = unpopulate(val, "ContainerID", &a.ContainerID) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &a.ContainerType) + delete(rawMsg, key) + case "dpmAgentVersion": + err = unpopulate(val, "DpmAgentVersion", &a.DpmAgentVersion) + delete(rawMsg, key) + case "dpmServers": + err = unpopulate(val, "DpmServers", &a.DpmServers) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) + delete(rawMsg, key) + case "protectedItemCount": + err = unpopulate(val, "ProtectedItemCount", &a.ProtectedItemCount) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) + delete(rawMsg, key) + case "upgradeAvailable": + err = unpopulate(val, "UpgradeAvailable", &a.UpgradeAvailable) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBackupServerEngine. +func (a AzureBackupServerEngine) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureBackupAgentVersion", a.AzureBackupAgentVersion) + populate(objectMap, "backupEngineId", a.BackupEngineID) + populate(objectMap, "backupEngineState", a.BackupEngineState) + objectMap["backupEngineType"] = BackupEngineTypeAzureBackupServerEngine + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "canReRegister", a.CanReRegister) + populate(objectMap, "dpmVersion", a.DpmVersion) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + populate(objectMap, "isAzureBackupAgentUpgradeAvailable", a.IsAzureBackupAgentUpgradeAvailable) + populate(objectMap, "isDpmUpgradeAvailable", a.IsDpmUpgradeAvailable) + populate(objectMap, "registrationStatus", a.RegistrationStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupServerEngine. +func (a *AzureBackupServerEngine) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureBackupAgentVersion": + err = unpopulate(val, "AzureBackupAgentVersion", &a.AzureBackupAgentVersion) + delete(rawMsg, key) + case "backupEngineId": + err = unpopulate(val, "BackupEngineID", &a.BackupEngineID) + delete(rawMsg, key) + case "backupEngineState": + err = unpopulate(val, "BackupEngineState", &a.BackupEngineState) + delete(rawMsg, key) + case "backupEngineType": + err = unpopulate(val, "BackupEngineType", &a.BackupEngineType) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "canReRegister": + err = unpopulate(val, "CanReRegister", &a.CanReRegister) + delete(rawMsg, key) + case "dpmVersion": + err = unpopulate(val, "DpmVersion", &a.DpmVersion) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "isAzureBackupAgentUpgradeAvailable": + err = unpopulate(val, "IsAzureBackupAgentUpgradeAvailable", &a.IsAzureBackupAgentUpgradeAvailable) + delete(rawMsg, key) + case "isDpmUpgradeAvailable": + err = unpopulate(val, "IsDpmUpgradeAvailable", &a.IsDpmUpgradeAvailable) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFileShareBackupRequest. +func (a AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureFileShareBackupRequest" + populateDateTimeRFC3339(objectMap, "recoveryPointExpiryTimeInUTC", a.RecoveryPointExpiryTimeInUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareBackupRequest. +func (a *AzureFileShareBackupRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointExpiryTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointExpiryTimeInUTC", &a.RecoveryPointExpiryTimeInUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFileShareProtectableItem. +func (a AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureFileShareType", a.AzureFileShareType) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "parentContainerFabricId", a.ParentContainerFabricID) + populate(objectMap, "parentContainerFriendlyName", a.ParentContainerFriendlyName) + objectMap["protectableItemType"] = "AzureFileShare" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareProtectableItem. +func (a *AzureFileShareProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureFileShareType": + err = unpopulate(val, "AzureFileShareType", &a.AzureFileShareType) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "parentContainerFabricId": + err = unpopulate(val, "ParentContainerFabricID", &a.ParentContainerFabricID) + delete(rawMsg, key) + case "parentContainerFriendlyName": + err = unpopulate(val, "ParentContainerFriendlyName", &a.ParentContainerFriendlyName) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFileShareProtectionPolicy. +func (a AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["backupManagementType"] = "AzureStorage" + populate(objectMap, "protectedItemsCount", a.ProtectedItemsCount) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "retentionPolicy", a.RetentionPolicy) + populate(objectMap, "schedulePolicy", a.SchedulePolicy) + populate(objectMap, "timeZone", a.TimeZone) + populate(objectMap, "vaultRetentionPolicy", a.VaultRetentionPolicy) + populate(objectMap, "workLoadType", a.WorkLoadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareProtectionPolicy. +func (a *AzureFileShareProtectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "protectedItemsCount": + err = unpopulate(val, "ProtectedItemsCount", &a.ProtectedItemsCount) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "retentionPolicy": + a.RetentionPolicy, err = unmarshalRetentionPolicyClassification(val) + delete(rawMsg, key) + case "schedulePolicy": + a.SchedulePolicy, err = unmarshalSchedulePolicyClassification(val) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &a.TimeZone) + delete(rawMsg, key) + case "vaultRetentionPolicy": + err = unpopulate(val, "VaultRetentionPolicy", &a.VaultRetentionPolicy) + delete(rawMsg, key) + case "workLoadType": + err = unpopulate(val, "WorkLoadType", &a.WorkLoadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFileShareProvisionILRRequest. +func (a AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureFileShareProvisionILRRequest" + populate(objectMap, "recoveryPointId", a.RecoveryPointID) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareProvisionILRRequest. +func (a *AzureFileShareProvisionILRRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFileShareRecoveryPoint. +func (a AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fileShareSnapshotUri", a.FileShareSnapshotURI) + objectMap["objectType"] = "AzureFileShareRecoveryPoint" + populate(objectMap, "recoveryPointProperties", a.RecoveryPointProperties) + populate(objectMap, "recoveryPointSizeInGB", a.RecoveryPointSizeInGB) + populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTime", a.RecoveryPointTime) + populate(objectMap, "recoveryPointType", a.RecoveryPointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareRecoveryPoint. +func (a *AzureFileShareRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fileShareSnapshotUri": + err = unpopulate(val, "FileShareSnapshotURI", &a.FileShareSnapshotURI) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &a.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointSizeInGB": + err = unpopulate(val, "RecoveryPointSizeInGB", &a.RecoveryPointSizeInGB) + delete(rawMsg, key) + case "recoveryPointTierDetails": + err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) + delete(rawMsg, key) + case "recoveryPointTime": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTime", &a.RecoveryPointTime) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &a.RecoveryPointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFileShareRestoreRequest. +func (a AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "copyOptions", a.CopyOptions) + objectMap["objectType"] = "AzureFileShareRestoreRequest" + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "restoreFileSpecs", a.RestoreFileSpecs) + populate(objectMap, "restoreRequestType", a.RestoreRequestType) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetDetails", a.TargetDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareRestoreRequest. +func (a *AzureFileShareRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "copyOptions": + err = unpopulate(val, "CopyOptions", &a.CopyOptions) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "restoreFileSpecs": + err = unpopulate(val, "RestoreFileSpecs", &a.RestoreFileSpecs) + delete(rawMsg, key) + case "restoreRequestType": + err = unpopulate(val, "RestoreRequestType", &a.RestoreRequestType) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetDetails": + err = unpopulate(val, "TargetDetails", &a.TargetDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFileshareProtectedItem. +func (a AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "backupSetName", a.BackupSetName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "createMode", a.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", a.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) + populate(objectMap, "kpisHealths", a.KpisHealths) + populate(objectMap, "lastBackupStatus", a.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + objectMap["protectedItemType"] = "AzureFileShareProtectedItem" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "protectionStatus", a.ProtectionStatus) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "vaultId", a.VaultID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileshareProtectedItem. +func (a *AzureFileshareProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &a.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &a.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "kpisHealths": + err = unpopulate(val, "KpisHealths", &a.KpisHealths) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) + delete(rawMsg, key) + case "lastBackupTime": + err = unpopulateDateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &a.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFileshareProtectedItemExtendedInfo. +func (a AzureFileshareProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "oldestRecoveryPoint", a.OldestRecoveryPoint) + populate(objectMap, "policyState", a.PolicyState) + populate(objectMap, "recoveryPointCount", a.RecoveryPointCount) + populate(objectMap, "resourceState", a.ResourceState) + populateDateTimeRFC3339(objectMap, "resourceStateSyncTime", a.ResourceStateSyncTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileshareProtectedItemExtendedInfo. +func (a *AzureFileshareProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "oldestRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "OldestRecoveryPoint", &a.OldestRecoveryPoint) + delete(rawMsg, key) + case "policyState": + err = unpopulate(val, "PolicyState", &a.PolicyState) + delete(rawMsg, key) + case "recoveryPointCount": + err = unpopulate(val, "RecoveryPointCount", &a.RecoveryPointCount) + delete(rawMsg, key) + case "resourceState": + err = unpopulate(val, "ResourceState", &a.ResourceState) + delete(rawMsg, key) + case "resourceStateSyncTime": + err = unpopulateDateTimeRFC3339(val, "ResourceStateSyncTime", &a.ResourceStateSyncTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSClassicComputeVMContainer. +func (a AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + objectMap["containerType"] = ProtectableContainerTypeMicrosoftClassicComputeVirtualMachines + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + populate(objectMap, "protectableObjectType", a.ProtectableObjectType) + populate(objectMap, "registrationStatus", a.RegistrationStatus) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "virtualMachineId", a.VirtualMachineID) + populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSClassicComputeVMContainer. +func (a *AzureIaaSClassicComputeVMContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &a.ContainerType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) + delete(rawMsg, key) + case "virtualMachineVersion": + err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSClassicComputeVMProtectableItem. +func (a AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + objectMap["protectableItemType"] = "Microsoft.ClassicCompute/virtualMachines" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "virtualMachineId", a.VirtualMachineID) + populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSClassicComputeVMProtectableItem. +func (a *AzureIaaSClassicComputeVMProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) + delete(rawMsg, key) + case "virtualMachineVersion": + err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSClassicComputeVMProtectedItem. +func (a AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "backupSetName", a.BackupSetName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "createMode", a.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "extendedProperties", a.ExtendedProperties) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthDetails", a.HealthDetails) + populate(objectMap, "healthStatus", a.HealthStatus) + populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", a.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) + populate(objectMap, "kpisHealths", a.KpisHealths) + populate(objectMap, "lastBackupStatus", a.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "policyType", a.PolicyType) + populate(objectMap, "protectedItemDataId", a.ProtectedItemDataID) + objectMap["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "protectionStatus", a.ProtectionStatus) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "vaultId", a.VaultID) + populate(objectMap, "virtualMachineId", a.VirtualMachineID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSClassicComputeVMProtectedItem. +func (a *AzureIaaSClassicComputeVMProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &a.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &a.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "extendedProperties": + err = unpopulate(val, "ExtendedProperties", &a.ExtendedProperties) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthDetails": + err = unpopulate(val, "HealthDetails", &a.HealthDetails) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "kpisHealths": + err = unpopulate(val, "KpisHealths", &a.KpisHealths) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) + delete(rawMsg, key) + case "lastBackupTime": + err = unpopulateDateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "policyType": + err = unpopulate(val, "PolicyType", &a.PolicyType) + delete(rawMsg, key) + case "protectedItemDataId": + err = unpopulate(val, "ProtectedItemDataID", &a.ProtectedItemDataID) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &a.VaultID) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSComputeVMContainer. +func (a AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + objectMap["containerType"] = ProtectableContainerTypeMicrosoftComputeVirtualMachines + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + populate(objectMap, "protectableObjectType", a.ProtectableObjectType) + populate(objectMap, "registrationStatus", a.RegistrationStatus) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "virtualMachineId", a.VirtualMachineID) + populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSComputeVMContainer. +func (a *AzureIaaSComputeVMContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &a.ContainerType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) + delete(rawMsg, key) + case "virtualMachineVersion": + err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSComputeVMProtectableItem. +func (a AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + objectMap["protectableItemType"] = "Microsoft.Compute/virtualMachines" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "virtualMachineId", a.VirtualMachineID) + populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSComputeVMProtectableItem. +func (a *AzureIaaSComputeVMProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) + delete(rawMsg, key) + case "virtualMachineVersion": + err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSComputeVMProtectedItem. +func (a AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "backupSetName", a.BackupSetName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "createMode", a.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "extendedProperties", a.ExtendedProperties) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthDetails", a.HealthDetails) + populate(objectMap, "healthStatus", a.HealthStatus) + populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", a.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) + populate(objectMap, "kpisHealths", a.KpisHealths) + populate(objectMap, "lastBackupStatus", a.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "policyType", a.PolicyType) + populate(objectMap, "protectedItemDataId", a.ProtectedItemDataID) + objectMap["protectedItemType"] = "Microsoft.Compute/virtualMachines" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "protectionStatus", a.ProtectionStatus) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "vaultId", a.VaultID) + populate(objectMap, "virtualMachineId", a.VirtualMachineID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSComputeVMProtectedItem. +func (a *AzureIaaSComputeVMProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &a.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &a.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "extendedProperties": + err = unpopulate(val, "ExtendedProperties", &a.ExtendedProperties) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthDetails": + err = unpopulate(val, "HealthDetails", &a.HealthDetails) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "kpisHealths": + err = unpopulate(val, "KpisHealths", &a.KpisHealths) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) + delete(rawMsg, key) + case "lastBackupTime": + err = unpopulateDateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "policyType": + err = unpopulate(val, "PolicyType", &a.PolicyType) + delete(rawMsg, key) + case "protectedItemDataId": + err = unpopulate(val, "ProtectedItemDataID", &a.ProtectedItemDataID) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &a.VaultID) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMErrorInfo. +func (a AzureIaaSVMErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", a.ErrorCode) + populate(objectMap, "errorString", a.ErrorString) + populate(objectMap, "errorTitle", a.ErrorTitle) + populate(objectMap, "recommendations", a.Recommendations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMErrorInfo. +func (a *AzureIaaSVMErrorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &a.ErrorCode) + delete(rawMsg, key) + case "errorString": + err = unpopulate(val, "ErrorString", &a.ErrorString) + delete(rawMsg, key) + case "errorTitle": + err = unpopulate(val, "ErrorTitle", &a.ErrorTitle) + delete(rawMsg, key) + case "recommendations": + err = unpopulate(val, "Recommendations", &a.Recommendations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMHealthDetails. +func (a AzureIaaSVMHealthDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", a.Code) + populate(objectMap, "message", a.Message) + populate(objectMap, "recommendations", a.Recommendations) + populate(objectMap, "title", a.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMHealthDetails. +func (a *AzureIaaSVMHealthDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &a.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &a.Message) + delete(rawMsg, key) + case "recommendations": + err = unpopulate(val, "Recommendations", &a.Recommendations) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &a.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMJob. +func (a AzureIaaSVMJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsInfo", a.ActionsInfo) + populate(objectMap, "activityId", a.ActivityID) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "duration", a.Duration) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "entityFriendlyName", a.EntityFriendlyName) + populate(objectMap, "errorDetails", a.ErrorDetails) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "isUserTriggered", a.IsUserTriggered) + objectMap["jobType"] = "AzureIaaSVMJob" + populate(objectMap, "operation", a.Operation) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) + populate(objectMap, "status", a.Status) + populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMJob. +func (a *AzureIaaSVMJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsInfo": + err = unpopulate(val, "ActionsInfo", &a.ActionsInfo) + delete(rawMsg, key) + case "activityId": + err = unpopulate(val, "ActivityID", &a.ActivityID) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &a.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "entityFriendlyName": + err = unpopulate(val, "EntityFriendlyName", &a.EntityFriendlyName) + delete(rawMsg, key) + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "isUserTriggered": + err = unpopulate(val, "IsUserTriggered", &a.IsUserTriggered) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &a.JobType) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &a.Operation) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "virtualMachineVersion": + err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMJobExtendedInfo. +func (a AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dynamicErrorMessage", a.DynamicErrorMessage) + populate(objectMap, "estimatedRemainingDuration", a.EstimatedRemainingDuration) + populate(objectMap, "internalPropertyBag", a.InternalPropertyBag) + populate(objectMap, "progressPercentage", a.ProgressPercentage) + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "tasksList", a.TasksList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMJobExtendedInfo. +func (a *AzureIaaSVMJobExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dynamicErrorMessage": + err = unpopulate(val, "DynamicErrorMessage", &a.DynamicErrorMessage) + delete(rawMsg, key) + case "estimatedRemainingDuration": + err = unpopulate(val, "EstimatedRemainingDuration", &a.EstimatedRemainingDuration) + delete(rawMsg, key) + case "internalPropertyBag": + err = unpopulate(val, "InternalPropertyBag", &a.InternalPropertyBag) + delete(rawMsg, key) + case "progressPercentage": + err = unpopulate(val, "ProgressPercentage", &a.ProgressPercentage) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "tasksList": + err = unpopulate(val, "TasksList", &a.TasksList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMJobTaskDetails. +func (a AzureIaaSVMJobTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "duration", a.Duration) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "instanceId", a.InstanceID) + populate(objectMap, "progressPercentage", a.ProgressPercentage) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) + populate(objectMap, "status", a.Status) + populate(objectMap, "taskExecutionDetails", a.TaskExecutionDetails) + populate(objectMap, "taskId", a.TaskID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMJobTaskDetails. +func (a *AzureIaaSVMJobTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "duration": + err = unpopulate(val, "Duration", &a.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "instanceId": + err = unpopulate(val, "InstanceID", &a.InstanceID) + delete(rawMsg, key) + case "progressPercentage": + err = unpopulate(val, "ProgressPercentage", &a.ProgressPercentage) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "taskExecutionDetails": + err = unpopulate(val, "TaskExecutionDetails", &a.TaskExecutionDetails) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &a.TaskID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMJobV2. +func (a AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsInfo", a.ActionsInfo) + populate(objectMap, "activityId", a.ActivityID) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "duration", a.Duration) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "entityFriendlyName", a.EntityFriendlyName) + populate(objectMap, "errorDetails", a.ErrorDetails) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + objectMap["jobType"] = "AzureIaaSVMJobV2" + populate(objectMap, "operation", a.Operation) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) + populate(objectMap, "status", a.Status) + populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMJobV2. +func (a *AzureIaaSVMJobV2) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsInfo": + err = unpopulate(val, "ActionsInfo", &a.ActionsInfo) + delete(rawMsg, key) + case "activityId": + err = unpopulate(val, "ActivityID", &a.ActivityID) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &a.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "entityFriendlyName": + err = unpopulate(val, "EntityFriendlyName", &a.EntityFriendlyName) + delete(rawMsg, key) + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &a.JobType) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &a.Operation) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "virtualMachineVersion": + err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMProtectedItem. +func (a AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "backupSetName", a.BackupSetName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "createMode", a.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "extendedProperties", a.ExtendedProperties) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthDetails", a.HealthDetails) + populate(objectMap, "healthStatus", a.HealthStatus) + populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", a.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) + populate(objectMap, "kpisHealths", a.KpisHealths) + populate(objectMap, "lastBackupStatus", a.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "policyType", a.PolicyType) + populate(objectMap, "protectedItemDataId", a.ProtectedItemDataID) + objectMap["protectedItemType"] = "AzureIaaSVMProtectedItem" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "protectionStatus", a.ProtectionStatus) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "vaultId", a.VaultID) + populate(objectMap, "virtualMachineId", a.VirtualMachineID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMProtectedItem. +func (a *AzureIaaSVMProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &a.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &a.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "extendedProperties": + err = unpopulate(val, "ExtendedProperties", &a.ExtendedProperties) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthDetails": + err = unpopulate(val, "HealthDetails", &a.HealthDetails) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "kpisHealths": + err = unpopulate(val, "KpisHealths", &a.KpisHealths) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) + delete(rawMsg, key) + case "lastBackupTime": + err = unpopulateDateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "policyType": + err = unpopulate(val, "PolicyType", &a.PolicyType) + delete(rawMsg, key) + case "protectedItemDataId": + err = unpopulate(val, "ProtectedItemDataID", &a.ProtectedItemDataID) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &a.VaultID) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMProtectedItemExtendedInfo. +func (a AzureIaaSVMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "newestRecoveryPointInArchive", a.NewestRecoveryPointInArchive) + populateDateTimeRFC3339(objectMap, "oldestRecoveryPoint", a.OldestRecoveryPoint) + populateDateTimeRFC3339(objectMap, "oldestRecoveryPointInArchive", a.OldestRecoveryPointInArchive) + populateDateTimeRFC3339(objectMap, "oldestRecoveryPointInVault", a.OldestRecoveryPointInVault) + populate(objectMap, "policyInconsistent", a.PolicyInconsistent) + populate(objectMap, "recoveryPointCount", a.RecoveryPointCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMProtectedItemExtendedInfo. +func (a *AzureIaaSVMProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "newestRecoveryPointInArchive": + err = unpopulateDateTimeRFC3339(val, "NewestRecoveryPointInArchive", &a.NewestRecoveryPointInArchive) + delete(rawMsg, key) + case "oldestRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "OldestRecoveryPoint", &a.OldestRecoveryPoint) + delete(rawMsg, key) + case "oldestRecoveryPointInArchive": + err = unpopulateDateTimeRFC3339(val, "OldestRecoveryPointInArchive", &a.OldestRecoveryPointInArchive) + delete(rawMsg, key) + case "oldestRecoveryPointInVault": + err = unpopulateDateTimeRFC3339(val, "OldestRecoveryPointInVault", &a.OldestRecoveryPointInVault) + delete(rawMsg, key) + case "policyInconsistent": + err = unpopulate(val, "PolicyInconsistent", &a.PolicyInconsistent) + delete(rawMsg, key) + case "recoveryPointCount": + err = unpopulate(val, "RecoveryPointCount", &a.RecoveryPointCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMProtectionPolicy. +func (a AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["backupManagementType"] = "AzureIaasVM" + populate(objectMap, "instantRPDetails", a.InstantRPDetails) + populate(objectMap, "instantRpRetentionRangeInDays", a.InstantRpRetentionRangeInDays) + populate(objectMap, "policyType", a.PolicyType) + populate(objectMap, "protectedItemsCount", a.ProtectedItemsCount) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "retentionPolicy", a.RetentionPolicy) + populate(objectMap, "schedulePolicy", a.SchedulePolicy) + populate(objectMap, "snapshotConsistencyType", a.SnapshotConsistencyType) + populate(objectMap, "tieringPolicy", a.TieringPolicy) + populate(objectMap, "timeZone", a.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMProtectionPolicy. +func (a *AzureIaaSVMProtectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "instantRPDetails": + err = unpopulate(val, "InstantRPDetails", &a.InstantRPDetails) + delete(rawMsg, key) + case "instantRpRetentionRangeInDays": + err = unpopulate(val, "InstantRpRetentionRangeInDays", &a.InstantRpRetentionRangeInDays) + delete(rawMsg, key) + case "policyType": + err = unpopulate(val, "PolicyType", &a.PolicyType) + delete(rawMsg, key) + case "protectedItemsCount": + err = unpopulate(val, "ProtectedItemsCount", &a.ProtectedItemsCount) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "retentionPolicy": + a.RetentionPolicy, err = unmarshalRetentionPolicyClassification(val) + delete(rawMsg, key) + case "schedulePolicy": + a.SchedulePolicy, err = unmarshalSchedulePolicyClassification(val) + delete(rawMsg, key) + case "snapshotConsistencyType": + err = unpopulate(val, "SnapshotConsistencyType", &a.SnapshotConsistencyType) + delete(rawMsg, key) + case "tieringPolicy": + err = unpopulate(val, "TieringPolicy", &a.TieringPolicy) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &a.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureRecoveryServiceVaultProtectionIntent. +func (a AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "itemId", a.ItemID) + populate(objectMap, "policyId", a.PolicyID) + objectMap["protectionIntentItemType"] = ProtectionIntentItemTypeRecoveryServiceVaultItem + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureRecoveryServiceVaultProtectionIntent. +func (a *AzureRecoveryServiceVaultProtectionIntent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "itemId": + err = unpopulate(val, "ItemID", &a.ItemID) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "protectionIntentItemType": + err = unpopulate(val, "ProtectionIntentItemType", &a.ProtectionIntentItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureResourceProtectionIntent. +func (a AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "itemId", a.ItemID) + populate(objectMap, "policyId", a.PolicyID) + objectMap["protectionIntentItemType"] = ProtectionIntentItemTypeAzureResourceItem + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceProtectionIntent. +func (a *AzureResourceProtectionIntent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "itemId": + err = unpopulate(val, "ItemID", &a.ItemID) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "protectionIntentItemType": + err = unpopulate(val, "ProtectionIntentItemType", &a.ProtectionIntentItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureSQLAGWorkloadContainerProtectionContainer. +func (a AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + objectMap["containerType"] = ProtectableContainerTypeSQLAGWorkLoadContainer + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + populateDateTimeRFC3339(objectMap, "lastUpdatedTime", a.LastUpdatedTime) + populate(objectMap, "operationType", a.OperationType) + populate(objectMap, "protectableObjectType", a.ProtectableObjectType) + populate(objectMap, "registrationStatus", a.RegistrationStatus) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSQLAGWorkloadContainerProtectionContainer. +func (a *AzureSQLAGWorkloadContainerProtectionContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &a.ContainerType) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "lastUpdatedTime": + err = unpopulateDateTimeRFC3339(val, "LastUpdatedTime", &a.LastUpdatedTime) + delete(rawMsg, key) + case "operationType": + err = unpopulate(val, "OperationType", &a.OperationType) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureSQLContainer. +func (a AzureSQLContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + objectMap["containerType"] = ProtectableContainerTypeAzureSQLContainer + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + populate(objectMap, "protectableObjectType", a.ProtectableObjectType) + populate(objectMap, "registrationStatus", a.RegistrationStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSQLContainer. +func (a *AzureSQLContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &a.ContainerType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureSQLProtectedItem. +func (a AzureSQLProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "backupSetName", a.BackupSetName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "createMode", a.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", a.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "protectedItemDataId", a.ProtectedItemDataID) + objectMap["protectedItemType"] = "Microsoft.Sql/servers/databases" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "vaultId", a.VaultID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSQLProtectedItem. +func (a *AzureSQLProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &a.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &a.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "protectedItemDataId": + err = unpopulate(val, "ProtectedItemDataID", &a.ProtectedItemDataID) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &a.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureSQLProtectedItemExtendedInfo. +func (a AzureSQLProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "oldestRecoveryPoint", a.OldestRecoveryPoint) + populate(objectMap, "policyState", a.PolicyState) + populate(objectMap, "recoveryPointCount", a.RecoveryPointCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSQLProtectedItemExtendedInfo. +func (a *AzureSQLProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "oldestRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "OldestRecoveryPoint", &a.OldestRecoveryPoint) + delete(rawMsg, key) + case "policyState": + err = unpopulate(val, "PolicyState", &a.PolicyState) + delete(rawMsg, key) + case "recoveryPointCount": + err = unpopulate(val, "RecoveryPointCount", &a.RecoveryPointCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureSQLProtectionPolicy. +func (a AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["backupManagementType"] = "AzureSql" + populate(objectMap, "protectedItemsCount", a.ProtectedItemsCount) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "retentionPolicy", a.RetentionPolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSQLProtectionPolicy. +func (a *AzureSQLProtectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "protectedItemsCount": + err = unpopulate(val, "ProtectedItemsCount", &a.ProtectedItemsCount) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "retentionPolicy": + a.RetentionPolicy, err = unmarshalRetentionPolicyClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageContainer. +func (a AzureStorageContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "acquireStorageAccountLock", a.AcquireStorageAccountLock) + populate(objectMap, "backupManagementType", a.BackupManagementType) + objectMap["containerType"] = ProtectableContainerTypeStorageContainer + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + populate(objectMap, "operationType", a.OperationType) + populate(objectMap, "protectableObjectType", a.ProtectableObjectType) + populate(objectMap, "protectedItemCount", a.ProtectedItemCount) + populate(objectMap, "registrationStatus", a.RegistrationStatus) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "storageAccountVersion", a.StorageAccountVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageContainer. +func (a *AzureStorageContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acquireStorageAccountLock": + err = unpopulate(val, "AcquireStorageAccountLock", &a.AcquireStorageAccountLock) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &a.ContainerType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "operationType": + err = unpopulate(val, "OperationType", &a.OperationType) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) + delete(rawMsg, key) + case "protectedItemCount": + err = unpopulate(val, "ProtectedItemCount", &a.ProtectedItemCount) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "storageAccountVersion": + err = unpopulate(val, "StorageAccountVersion", &a.StorageAccountVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageErrorInfo. +func (a AzureStorageErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", a.ErrorCode) + populate(objectMap, "errorString", a.ErrorString) + populate(objectMap, "recommendations", a.Recommendations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageErrorInfo. +func (a *AzureStorageErrorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &a.ErrorCode) + delete(rawMsg, key) + case "errorString": + err = unpopulate(val, "ErrorString", &a.ErrorString) + delete(rawMsg, key) + case "recommendations": + err = unpopulate(val, "Recommendations", &a.Recommendations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageJob. +func (a AzureStorageJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsInfo", a.ActionsInfo) + populate(objectMap, "activityId", a.ActivityID) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "duration", a.Duration) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "entityFriendlyName", a.EntityFriendlyName) + populate(objectMap, "errorDetails", a.ErrorDetails) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "isUserTriggered", a.IsUserTriggered) + objectMap["jobType"] = "AzureStorageJob" + populate(objectMap, "operation", a.Operation) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) + populate(objectMap, "status", a.Status) + populate(objectMap, "storageAccountName", a.StorageAccountName) + populate(objectMap, "storageAccountVersion", a.StorageAccountVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageJob. +func (a *AzureStorageJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsInfo": + err = unpopulate(val, "ActionsInfo", &a.ActionsInfo) + delete(rawMsg, key) + case "activityId": + err = unpopulate(val, "ActivityID", &a.ActivityID) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &a.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "entityFriendlyName": + err = unpopulate(val, "EntityFriendlyName", &a.EntityFriendlyName) + delete(rawMsg, key) + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "isUserTriggered": + err = unpopulate(val, "IsUserTriggered", &a.IsUserTriggered) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &a.JobType) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &a.Operation) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "storageAccountName": + err = unpopulate(val, "StorageAccountName", &a.StorageAccountName) + delete(rawMsg, key) + case "storageAccountVersion": + err = unpopulate(val, "StorageAccountVersion", &a.StorageAccountVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageJobExtendedInfo. +func (a AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dynamicErrorMessage", a.DynamicErrorMessage) + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "tasksList", a.TasksList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageJobExtendedInfo. +func (a *AzureStorageJobExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dynamicErrorMessage": + err = unpopulate(val, "DynamicErrorMessage", &a.DynamicErrorMessage) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "tasksList": + err = unpopulate(val, "TasksList", &a.TasksList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageJobTaskDetails. +func (a AzureStorageJobTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "status", a.Status) + populate(objectMap, "taskId", a.TaskID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageJobTaskDetails. +func (a *AzureStorageJobTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &a.TaskID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageProtectableContainer. +func (a AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "containerId", a.ContainerID) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + objectMap["protectableContainerType"] = ProtectableContainerTypeStorageContainer + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageProtectableContainer. +func (a *AzureStorageProtectableContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerId": + err = unpopulate(val, "ContainerID", &a.ContainerID) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "protectableContainerType": + err = unpopulate(val, "ProtectableContainerType", &a.ProtectableContainerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMAppContainerProtectableContainer. +func (a AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "containerId", a.ContainerID) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + objectMap["protectableContainerType"] = ProtectableContainerTypeVMAppContainer + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMAppContainerProtectableContainer. +func (a *AzureVMAppContainerProtectableContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerId": + err = unpopulate(val, "ContainerID", &a.ContainerID) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "protectableContainerType": + err = unpopulate(val, "ProtectableContainerType", &a.ProtectableContainerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMAppContainerProtectionContainer. +func (a AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + objectMap["containerType"] = ProtectableContainerTypeVMAppContainer + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + populateDateTimeRFC3339(objectMap, "lastUpdatedTime", a.LastUpdatedTime) + populate(objectMap, "operationType", a.OperationType) + populate(objectMap, "protectableObjectType", a.ProtectableObjectType) + populate(objectMap, "registrationStatus", a.RegistrationStatus) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMAppContainerProtectionContainer. +func (a *AzureVMAppContainerProtectionContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &a.ContainerType) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "lastUpdatedTime": + err = unpopulateDateTimeRFC3339(val, "LastUpdatedTime", &a.LastUpdatedTime) + delete(rawMsg, key) + case "operationType": + err = unpopulate(val, "OperationType", &a.OperationType) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMResourceFeatureSupportRequest. +func (a AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["featureType"] = "AzureVMResourceBackup" + populate(objectMap, "vmSku", a.VMSKU) + populate(objectMap, "vmSize", a.VMSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMResourceFeatureSupportRequest. +func (a *AzureVMResourceFeatureSupportRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featureType": + err = unpopulate(val, "FeatureType", &a.FeatureType) + delete(rawMsg, key) + case "vmSku": + err = unpopulate(val, "VMSKU", &a.VMSKU) + delete(rawMsg, key) + case "vmSize": + err = unpopulate(val, "VMSize", &a.VMSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMResourceFeatureSupportResponse. +func (a AzureVMResourceFeatureSupportResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "supportStatus", a.SupportStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMResourceFeatureSupportResponse. +func (a *AzureVMResourceFeatureSupportResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "supportStatus": + err = unpopulate(val, "SupportStatus", &a.SupportStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadItem. +func (a AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + objectMap["workloadItemType"] = "AzureVmWorkloadItem" + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadItem. +func (a *AzureVMWorkloadItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subWorkloadItemCount": + err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "workloadItemType": + err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadProtectableItem. +func (a AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentUniqueName", a.ParentUniqueName) + populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) + objectMap["protectableItemType"] = "AzureVmWorkloadProtectableItem" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadProtectableItem. +func (a *AzureVMWorkloadProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "isAutoProtected": + err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) + delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentUniqueName": + err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) + delete(rawMsg, key) + case "prebackupvalidation": + err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "subprotectableitemcount": + err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadProtectedItem. +func (a AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "backupSetName", a.BackupSetName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "createMode", a.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", a.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) + populate(objectMap, "kpisHealths", a.KpisHealths) + populate(objectMap, "lastBackupErrorDetail", a.LastBackupErrorDetail) + populate(objectMap, "lastBackupStatus", a.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "nodesList", a.NodesList) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentType", a.ParentType) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "protectedItemDataSourceId", a.ProtectedItemDataSourceID) + populate(objectMap, "protectedItemHealthStatus", a.ProtectedItemHealthStatus) + objectMap["protectedItemType"] = "AzureVmWorkloadProtectedItem" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "protectionStatus", a.ProtectionStatus) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "vaultId", a.VaultID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadProtectedItem. +func (a *AzureVMWorkloadProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &a.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &a.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "kpisHealths": + err = unpopulate(val, "KpisHealths", &a.KpisHealths) + delete(rawMsg, key) + case "lastBackupErrorDetail": + err = unpopulate(val, "LastBackupErrorDetail", &a.LastBackupErrorDetail) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) + delete(rawMsg, key) + case "lastBackupTime": + err = unpopulateDateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) + delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentType": + err = unpopulate(val, "ParentType", &a.ParentType) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "protectedItemDataSourceId": + err = unpopulate(val, "ProtectedItemDataSourceID", &a.ProtectedItemDataSourceID) + delete(rawMsg, key) + case "protectedItemHealthStatus": + err = unpopulate(val, "ProtectedItemHealthStatus", &a.ProtectedItemHealthStatus) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &a.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadProtectedItemExtendedInfo. +func (a AzureVMWorkloadProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "newestRecoveryPointInArchive", a.NewestRecoveryPointInArchive) + populateDateTimeRFC3339(objectMap, "oldestRecoveryPoint", a.OldestRecoveryPoint) + populateDateTimeRFC3339(objectMap, "oldestRecoveryPointInArchive", a.OldestRecoveryPointInArchive) + populateDateTimeRFC3339(objectMap, "oldestRecoveryPointInVault", a.OldestRecoveryPointInVault) + populate(objectMap, "policyState", a.PolicyState) + populate(objectMap, "recoveryModel", a.RecoveryModel) + populate(objectMap, "recoveryPointCount", a.RecoveryPointCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadProtectedItemExtendedInfo. +func (a *AzureVMWorkloadProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "newestRecoveryPointInArchive": + err = unpopulateDateTimeRFC3339(val, "NewestRecoveryPointInArchive", &a.NewestRecoveryPointInArchive) + delete(rawMsg, key) + case "oldestRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "OldestRecoveryPoint", &a.OldestRecoveryPoint) + delete(rawMsg, key) + case "oldestRecoveryPointInArchive": + err = unpopulateDateTimeRFC3339(val, "OldestRecoveryPointInArchive", &a.OldestRecoveryPointInArchive) + delete(rawMsg, key) + case "oldestRecoveryPointInVault": + err = unpopulateDateTimeRFC3339(val, "OldestRecoveryPointInVault", &a.OldestRecoveryPointInVault) + delete(rawMsg, key) + case "policyState": + err = unpopulate(val, "PolicyState", &a.PolicyState) + delete(rawMsg, key) + case "recoveryModel": + err = unpopulate(val, "RecoveryModel", &a.RecoveryModel) + delete(rawMsg, key) + case "recoveryPointCount": + err = unpopulate(val, "RecoveryPointCount", &a.RecoveryPointCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadProtectionPolicy. +func (a AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["backupManagementType"] = "AzureWorkload" + populate(objectMap, "makePolicyConsistent", a.MakePolicyConsistent) + populate(objectMap, "protectedItemsCount", a.ProtectedItemsCount) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "settings", a.Settings) + populate(objectMap, "subProtectionPolicy", a.SubProtectionPolicy) + populate(objectMap, "workLoadType", a.WorkLoadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadProtectionPolicy. +func (a *AzureVMWorkloadProtectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "makePolicyConsistent": + err = unpopulate(val, "MakePolicyConsistent", &a.MakePolicyConsistent) + delete(rawMsg, key) + case "protectedItemsCount": + err = unpopulate(val, "ProtectedItemsCount", &a.ProtectedItemsCount) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &a.Settings) + delete(rawMsg, key) + case "subProtectionPolicy": + err = unpopulate(val, "SubProtectionPolicy", &a.SubProtectionPolicy) + delete(rawMsg, key) + case "workLoadType": + err = unpopulate(val, "WorkLoadType", &a.WorkLoadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPAseDatabaseProtectableItem. +func (a AzureVMWorkloadSAPAseDatabaseProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentUniqueName", a.ParentUniqueName) + populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) + objectMap["protectableItemType"] = "SAPAseDatabase" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPAseDatabaseProtectableItem. +func (a *AzureVMWorkloadSAPAseDatabaseProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "isAutoProtected": + err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) + delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentUniqueName": + err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) + delete(rawMsg, key) + case "prebackupvalidation": + err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "subprotectableitemcount": + err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (a AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "backupSetName", a.BackupSetName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "createMode", a.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", a.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) + populate(objectMap, "kpisHealths", a.KpisHealths) + populate(objectMap, "lastBackupErrorDetail", a.LastBackupErrorDetail) + populate(objectMap, "lastBackupStatus", a.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "nodesList", a.NodesList) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentType", a.ParentType) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "protectedItemDataSourceId", a.ProtectedItemDataSourceID) + populate(objectMap, "protectedItemHealthStatus", a.ProtectedItemHealthStatus) + objectMap["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "protectionStatus", a.ProtectionStatus) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "vaultId", a.VaultID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (a *AzureVMWorkloadSAPAseDatabaseProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &a.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &a.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "kpisHealths": + err = unpopulate(val, "KpisHealths", &a.KpisHealths) + delete(rawMsg, key) + case "lastBackupErrorDetail": + err = unpopulate(val, "LastBackupErrorDetail", &a.LastBackupErrorDetail) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) + delete(rawMsg, key) + case "lastBackupTime": + err = unpopulateDateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) + delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentType": + err = unpopulate(val, "ParentType", &a.ParentType) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "protectedItemDataSourceId": + err = unpopulate(val, "ProtectedItemDataSourceID", &a.ProtectedItemDataSourceID) + delete(rawMsg, key) + case "protectedItemHealthStatus": + err = unpopulate(val, "ProtectedItemHealthStatus", &a.ProtectedItemHealthStatus) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &a.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (a AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + objectMap["workloadItemType"] = "SAPAseDatabase" + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (a *AzureVMWorkloadSAPAseDatabaseWorkloadItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subWorkloadItemCount": + err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "workloadItemType": + err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPAseSystemProtectableItem. +func (a AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentUniqueName", a.ParentUniqueName) + populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) + objectMap["protectableItemType"] = "SAPAseSystem" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPAseSystemProtectableItem. +func (a *AzureVMWorkloadSAPAseSystemProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "isAutoProtected": + err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) + delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentUniqueName": + err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) + delete(rawMsg, key) + case "prebackupvalidation": + err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "subprotectableitemcount": + err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPAseSystemWorkloadItem. +func (a AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + objectMap["workloadItemType"] = "SAPAseSystem" + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPAseSystemWorkloadItem. +func (a *AzureVMWorkloadSAPAseSystemWorkloadItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subWorkloadItemCount": + err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "workloadItemType": + err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaDBInstance. +func (a AzureVMWorkloadSAPHanaDBInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentUniqueName", a.ParentUniqueName) + populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) + objectMap["protectableItemType"] = "SAPHanaDBInstance" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaDBInstance. +func (a *AzureVMWorkloadSAPHanaDBInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "isAutoProtected": + err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) + delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentUniqueName": + err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) + delete(rawMsg, key) + case "prebackupvalidation": + err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "subprotectableitemcount": + err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaDBInstanceProtectedItem. +func (a AzureVMWorkloadSAPHanaDBInstanceProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "backupSetName", a.BackupSetName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "createMode", a.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", a.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) + populate(objectMap, "kpisHealths", a.KpisHealths) + populate(objectMap, "lastBackupErrorDetail", a.LastBackupErrorDetail) + populate(objectMap, "lastBackupStatus", a.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "nodesList", a.NodesList) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentType", a.ParentType) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "protectedItemDataSourceId", a.ProtectedItemDataSourceID) + populate(objectMap, "protectedItemHealthStatus", a.ProtectedItemHealthStatus) + objectMap["protectedItemType"] = "AzureVmWorkloadSAPHanaDBInstance" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "protectionStatus", a.ProtectionStatus) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "vaultId", a.VaultID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaDBInstanceProtectedItem. +func (a *AzureVMWorkloadSAPHanaDBInstanceProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &a.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &a.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "kpisHealths": + err = unpopulate(val, "KpisHealths", &a.KpisHealths) + delete(rawMsg, key) + case "lastBackupErrorDetail": + err = unpopulate(val, "LastBackupErrorDetail", &a.LastBackupErrorDetail) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) + delete(rawMsg, key) + case "lastBackupTime": + err = unpopulateDateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) + delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentType": + err = unpopulate(val, "ParentType", &a.ParentType) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "protectedItemDataSourceId": + err = unpopulate(val, "ProtectedItemDataSourceID", &a.ProtectedItemDataSourceID) + delete(rawMsg, key) + case "protectedItemHealthStatus": + err = unpopulate(val, "ProtectedItemHealthStatus", &a.ProtectedItemHealthStatus) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &a.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (a AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentUniqueName", a.ParentUniqueName) + populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) + objectMap["protectableItemType"] = "SAPHanaDatabase" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (a *AzureVMWorkloadSAPHanaDatabaseProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "isAutoProtected": + err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) + delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentUniqueName": + err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) + delete(rawMsg, key) + case "prebackupvalidation": + err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "subprotectableitemcount": + err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (a AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "backupSetName", a.BackupSetName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "createMode", a.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", a.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) + populate(objectMap, "kpisHealths", a.KpisHealths) + populate(objectMap, "lastBackupErrorDetail", a.LastBackupErrorDetail) + populate(objectMap, "lastBackupStatus", a.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "nodesList", a.NodesList) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentType", a.ParentType) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "protectedItemDataSourceId", a.ProtectedItemDataSourceID) + populate(objectMap, "protectedItemHealthStatus", a.ProtectedItemHealthStatus) + objectMap["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "protectionStatus", a.ProtectionStatus) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "vaultId", a.VaultID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (a *AzureVMWorkloadSAPHanaDatabaseProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &a.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &a.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "kpisHealths": + err = unpopulate(val, "KpisHealths", &a.KpisHealths) + delete(rawMsg, key) + case "lastBackupErrorDetail": + err = unpopulate(val, "LastBackupErrorDetail", &a.LastBackupErrorDetail) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) + delete(rawMsg, key) + case "lastBackupTime": + err = unpopulateDateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) + delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentType": + err = unpopulate(val, "ParentType", &a.ParentType) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "protectedItemDataSourceId": + err = unpopulate(val, "ProtectedItemDataSourceID", &a.ProtectedItemDataSourceID) + delete(rawMsg, key) + case "protectedItemHealthStatus": + err = unpopulate(val, "ProtectedItemHealthStatus", &a.ProtectedItemHealthStatus) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &a.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (a AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + objectMap["workloadItemType"] = "SAPHanaDatabase" + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (a *AzureVMWorkloadSAPHanaDatabaseWorkloadItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subWorkloadItemCount": + err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "workloadItemType": + err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaHSRProtectableItem. +func (a AzureVMWorkloadSAPHanaHSRProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentUniqueName", a.ParentUniqueName) + populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) + objectMap["protectableItemType"] = "HanaHSRContainer" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaHSRProtectableItem. +func (a *AzureVMWorkloadSAPHanaHSRProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "isAutoProtected": + err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) + delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentUniqueName": + err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) + delete(rawMsg, key) + case "prebackupvalidation": + err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "subprotectableitemcount": + err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaSystemProtectableItem. +func (a AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentUniqueName", a.ParentUniqueName) + populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) + objectMap["protectableItemType"] = "SAPHanaSystem" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaSystemProtectableItem. +func (a *AzureVMWorkloadSAPHanaSystemProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "isAutoProtected": + err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) + delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentUniqueName": + err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) + delete(rawMsg, key) + case "prebackupvalidation": + err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "subprotectableitemcount": + err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (a AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + objectMap["workloadItemType"] = "SAPHanaSystem" + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (a *AzureVMWorkloadSAPHanaSystemWorkloadItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subWorkloadItemCount": + err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "workloadItemType": + err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (a AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "nodesList", a.NodesList) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentUniqueName", a.ParentUniqueName) + populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) + objectMap["protectableItemType"] = "SQLAvailabilityGroupContainer" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (a *AzureVMWorkloadSQLAvailabilityGroupProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "isAutoProtected": + err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) + delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentUniqueName": + err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) + delete(rawMsg, key) + case "prebackupvalidation": + err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "subprotectableitemcount": + err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLDatabaseProtectableItem. +func (a AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentUniqueName", a.ParentUniqueName) + populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) + objectMap["protectableItemType"] = "SQLDataBase" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLDatabaseProtectableItem. +func (a *AzureVMWorkloadSQLDatabaseProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "isAutoProtected": + err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) + delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentUniqueName": + err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) + delete(rawMsg, key) + case "prebackupvalidation": + err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "subprotectableitemcount": + err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLDatabaseProtectedItem. +func (a AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "backupSetName", a.BackupSetName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "createMode", a.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", a.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) + populate(objectMap, "kpisHealths", a.KpisHealths) + populate(objectMap, "lastBackupErrorDetail", a.LastBackupErrorDetail) + populate(objectMap, "lastBackupStatus", a.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) + populate(objectMap, "nodesList", a.NodesList) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentType", a.ParentType) + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "protectedItemDataSourceId", a.ProtectedItemDataSourceID) + populate(objectMap, "protectedItemHealthStatus", a.ProtectedItemHealthStatus) + objectMap["protectedItemType"] = "AzureVmWorkloadSQLDatabase" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "protectionStatus", a.ProtectionStatus) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "softDeleteRetentionPeriodInDays", a.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "vaultId", a.VaultID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLDatabaseProtectedItem. +func (a *AzureVMWorkloadSQLDatabaseProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &a.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &a.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "kpisHealths": + err = unpopulate(val, "KpisHealths", &a.KpisHealths) + delete(rawMsg, key) + case "lastBackupErrorDetail": + err = unpopulate(val, "LastBackupErrorDetail", &a.LastBackupErrorDetail) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) + delete(rawMsg, key) + case "lastBackupTime": + err = unpopulateDateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) + delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentType": + err = unpopulate(val, "ParentType", &a.ParentType) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &a.PolicyName) + delete(rawMsg, key) + case "protectedItemDataSourceId": + err = unpopulate(val, "ProtectedItemDataSourceID", &a.ProtectedItemDataSourceID) + delete(rawMsg, key) + case "protectedItemHealthStatus": + err = unpopulate(val, "ProtectedItemHealthStatus", &a.ProtectedItemHealthStatus) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &a.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &a.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLDatabaseWorkloadItem. +func (a AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + objectMap["workloadItemType"] = "SQLDataBase" + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLDatabaseWorkloadItem. +func (a *AzureVMWorkloadSQLDatabaseWorkloadItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subWorkloadItemCount": + err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "workloadItemType": + err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLInstanceProtectableItem. +func (a AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "isAutoProtected", a.IsAutoProtected) + populate(objectMap, "isProtectable", a.IsProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "parentUniqueName", a.ParentUniqueName) + populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) + objectMap["protectableItemType"] = "SQLInstance" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLInstanceProtectableItem. +func (a *AzureVMWorkloadSQLInstanceProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "isAutoProtected": + err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) + delete(rawMsg, key) + case "isProtectable": + err = unpopulate(val, "IsProtectable", &a.IsProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "parentUniqueName": + err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) + delete(rawMsg, key) + case "prebackupvalidation": + err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "subprotectableitemcount": + err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLInstanceWorkloadItem. +func (a AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "dataDirectoryPaths", a.DataDirectoryPaths) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) + populate(objectMap, "parentName", a.ParentName) + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "serverName", a.ServerName) + populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) + populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) + objectMap["workloadItemType"] = "SQLInstance" + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLInstanceWorkloadItem. +func (a *AzureVMWorkloadSQLInstanceWorkloadItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "dataDirectoryPaths": + err = unpopulate(val, "DataDirectoryPaths", &a.DataDirectoryPaths) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "isAutoProtectable": + err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &a.ParentName) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "serverName": + err = unpopulate(val, "ServerName", &a.ServerName) + delete(rawMsg, key) + case "subWorkloadItemCount": + err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) + delete(rawMsg, key) + case "subinquireditemcount": + err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) + delete(rawMsg, key) + case "workloadItemType": + err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadAutoProtectionIntent. +func (a AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "itemId", a.ItemID) + populate(objectMap, "policyId", a.PolicyID) + objectMap["protectionIntentItemType"] = "ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadAutoProtectionIntent. +func (a *AzureWorkloadAutoProtectionIntent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "itemId": + err = unpopulate(val, "ItemID", &a.ItemID) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "protectionIntentItemType": + err = unpopulate(val, "ProtectionIntentItemType", &a.ProtectionIntentItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadBackupRequest. +func (a AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupType", a.BackupType) + populate(objectMap, "enableCompression", a.EnableCompression) + objectMap["objectType"] = "AzureWorkloadBackupRequest" + populateDateTimeRFC3339(objectMap, "recoveryPointExpiryTimeInUTC", a.RecoveryPointExpiryTimeInUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadBackupRequest. +func (a *AzureWorkloadBackupRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupType": + err = unpopulate(val, "BackupType", &a.BackupType) + delete(rawMsg, key) + case "enableCompression": + err = unpopulate(val, "EnableCompression", &a.EnableCompression) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointExpiryTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointExpiryTimeInUTC", &a.RecoveryPointExpiryTimeInUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadContainer. +func (a AzureWorkloadContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + objectMap["containerType"] = ProtectableContainerTypeAzureWorkloadContainer + populate(objectMap, "extendedInfo", a.ExtendedInfo) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "healthStatus", a.HealthStatus) + populateDateTimeRFC3339(objectMap, "lastUpdatedTime", a.LastUpdatedTime) + populate(objectMap, "operationType", a.OperationType) + populate(objectMap, "protectableObjectType", a.ProtectableObjectType) + populate(objectMap, "registrationStatus", a.RegistrationStatus) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadContainer. +func (a *AzureWorkloadContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &a.ContainerType) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &a.HealthStatus) + delete(rawMsg, key) + case "lastUpdatedTime": + err = unpopulateDateTimeRFC3339(val, "LastUpdatedTime", &a.LastUpdatedTime) + delete(rawMsg, key) + case "operationType": + err = unpopulate(val, "OperationType", &a.OperationType) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadContainerAutoProtectionIntent. +func (a AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "itemId", a.ItemID) + populate(objectMap, "policyId", a.PolicyID) + objectMap["protectionIntentItemType"] = ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadContainerAutoProtectionIntent. +func (a *AzureWorkloadContainerAutoProtectionIntent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "itemId": + err = unpopulate(val, "ItemID", &a.ItemID) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "protectionIntentItemType": + err = unpopulate(val, "ProtectionIntentItemType", &a.ProtectionIntentItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadContainerExtendedInfo. +func (a AzureWorkloadContainerExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostServerName", a.HostServerName) + populate(objectMap, "inquiryInfo", a.InquiryInfo) + populate(objectMap, "nodesList", a.NodesList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadContainerExtendedInfo. +func (a *AzureWorkloadContainerExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostServerName": + err = unpopulate(val, "HostServerName", &a.HostServerName) + delete(rawMsg, key) + case "inquiryInfo": + err = unpopulate(val, "InquiryInfo", &a.InquiryInfo) + delete(rawMsg, key) + case "nodesList": + err = unpopulate(val, "NodesList", &a.NodesList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadErrorInfo. +func (a AzureWorkloadErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalDetails", a.AdditionalDetails) + populate(objectMap, "errorCode", a.ErrorCode) + populate(objectMap, "errorString", a.ErrorString) + populate(objectMap, "errorTitle", a.ErrorTitle) + populate(objectMap, "recommendations", a.Recommendations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadErrorInfo. +func (a *AzureWorkloadErrorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalDetails": + err = unpopulate(val, "AdditionalDetails", &a.AdditionalDetails) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &a.ErrorCode) + delete(rawMsg, key) + case "errorString": + err = unpopulate(val, "ErrorString", &a.ErrorString) + delete(rawMsg, key) + case "errorTitle": + err = unpopulate(val, "ErrorTitle", &a.ErrorTitle) + delete(rawMsg, key) + case "recommendations": + err = unpopulate(val, "Recommendations", &a.Recommendations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadJob. +func (a AzureWorkloadJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsInfo", a.ActionsInfo) + populate(objectMap, "activityId", a.ActivityID) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "duration", a.Duration) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "entityFriendlyName", a.EntityFriendlyName) + populate(objectMap, "errorDetails", a.ErrorDetails) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + objectMap["jobType"] = "AzureWorkloadJob" + populate(objectMap, "operation", a.Operation) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) + populate(objectMap, "status", a.Status) + populate(objectMap, "workloadType", a.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadJob. +func (a *AzureWorkloadJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsInfo": + err = unpopulate(val, "ActionsInfo", &a.ActionsInfo) + delete(rawMsg, key) + case "activityId": + err = unpopulate(val, "ActivityID", &a.ActivityID) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &a.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "entityFriendlyName": + err = unpopulate(val, "EntityFriendlyName", &a.EntityFriendlyName) + delete(rawMsg, key) + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &a.JobType) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &a.Operation) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &a.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadJobExtendedInfo. +func (a AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dynamicErrorMessage", a.DynamicErrorMessage) + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "tasksList", a.TasksList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadJobExtendedInfo. +func (a *AzureWorkloadJobExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dynamicErrorMessage": + err = unpopulate(val, "DynamicErrorMessage", &a.DynamicErrorMessage) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "tasksList": + err = unpopulate(val, "TasksList", &a.TasksList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadJobTaskDetails. +func (a AzureWorkloadJobTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "status", a.Status) + populate(objectMap, "taskId", a.TaskID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadJobTaskDetails. +func (a *AzureWorkloadJobTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &a.TaskID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadPointInTimeRecoveryPoint. +func (a AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" + populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) + populate(objectMap, "recoveryPointProperties", a.RecoveryPointProperties) + populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) + populate(objectMap, "timeRanges", a.TimeRanges) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadPointInTimeRecoveryPoint. +func (a *AzureWorkloadPointInTimeRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointMoveReadinessInfo": + err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &a.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointTierDetails": + err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) + delete(rawMsg, key) + case "recoveryPointTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) + delete(rawMsg, key) + case "timeRanges": + err = unpopulate(val, "TimeRanges", &a.TimeRanges) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadPointInTimeRestoreRequest. +func (a AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" + populateDateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadPointInTimeRestoreRequest. +func (a *AzureWorkloadPointInTimeRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "pointInTime": + err = unpopulateDateTimeRFC3339(val, "PointInTime", &a.PointInTime) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadRecoveryPoint. +func (a AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadRecoveryPoint" + populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) + populate(objectMap, "recoveryPointProperties", a.RecoveryPointProperties) + populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadRecoveryPoint. +func (a *AzureWorkloadRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointMoveReadinessInfo": + err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &a.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointTierDetails": + err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) + delete(rawMsg, key) + case "recoveryPointTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadRestoreRequest. +func (a AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadRestoreRequest" + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadRestoreRequest. +func (a *AzureWorkloadRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPAsePointInTimeRecoveryPoint. +func (a AzureWorkloadSAPAsePointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadSAPAsePointInTimeRecoveryPoint" + populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) + populate(objectMap, "recoveryPointProperties", a.RecoveryPointProperties) + populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) + populate(objectMap, "timeRanges", a.TimeRanges) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPAsePointInTimeRecoveryPoint. +func (a *AzureWorkloadSAPAsePointInTimeRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointMoveReadinessInfo": + err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &a.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointTierDetails": + err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) + delete(rawMsg, key) + case "recoveryPointTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) + delete(rawMsg, key) + case "timeRanges": + err = unpopulate(val, "TimeRanges", &a.TimeRanges) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPAsePointInTimeRestoreRequest. +func (a AzureWorkloadSAPAsePointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadSAPAsePointInTimeRestoreRequest" + populateDateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPAsePointInTimeRestoreRequest. +func (a *AzureWorkloadSAPAsePointInTimeRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "pointInTime": + err = unpopulateDateTimeRFC3339(val, "PointInTime", &a.PointInTime) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPAseRecoveryPoint. +func (a AzureWorkloadSAPAseRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadSAPAseRecoveryPoint" + populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) + populate(objectMap, "recoveryPointProperties", a.RecoveryPointProperties) + populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPAseRecoveryPoint. +func (a *AzureWorkloadSAPAseRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointMoveReadinessInfo": + err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &a.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointTierDetails": + err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) + delete(rawMsg, key) + case "recoveryPointTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPAseRestoreRequest. +func (a AzureWorkloadSAPAseRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadSAPAseRestoreRequest" + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPAseRestoreRequest. +func (a *AzureWorkloadSAPAseRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (a AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" + populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) + populate(objectMap, "recoveryPointProperties", a.RecoveryPointProperties) + populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) + populate(objectMap, "timeRanges", a.TimeRanges) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointMoveReadinessInfo": + err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &a.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointTierDetails": + err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) + delete(rawMsg, key) + case "recoveryPointTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) + delete(rawMsg, key) + case "timeRanges": + err = unpopulate(val, "TimeRanges", &a.TimeRanges) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (a AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" + populateDateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "pointInTime": + err = unpopulateDateTimeRFC3339(val, "PointInTime", &a.PointInTime) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. +func (a AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" + populateDateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryPointRehydrationInfo", a.RecoveryPointRehydrationInfo) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. +func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "pointInTime": + err = unpopulateDateTimeRFC3339(val, "PointInTime", &a.PointInTime) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryPointRehydrationInfo": + err = unpopulate(val, "RecoveryPointRehydrationInfo", &a.RecoveryPointRehydrationInfo) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaRecoveryPoint. +func (a AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" + populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) + populate(objectMap, "recoveryPointProperties", a.RecoveryPointProperties) + populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaRecoveryPoint. +func (a *AzureWorkloadSAPHanaRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointMoveReadinessInfo": + err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &a.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointTierDetails": + err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) + delete(rawMsg, key) + case "recoveryPointTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaRestoreRequest. +func (a AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaRestoreRequest. +func (a *AzureWorkloadSAPHanaRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaRestoreWithRehydrateRequest. +func (a AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryPointRehydrationInfo", a.RecoveryPointRehydrationInfo) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaRestoreWithRehydrateRequest. +func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryPointRehydrationInfo": + err = unpopulate(val, "RecoveryPointRehydrationInfo", &a.RecoveryPointRehydrationInfo) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLAutoProtectionIntent. +func (a AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", a.BackupManagementType) + populate(objectMap, "itemId", a.ItemID) + populate(objectMap, "policyId", a.PolicyID) + objectMap["protectionIntentItemType"] = "ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent" + populate(objectMap, "protectionState", a.ProtectionState) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "workloadItemType", a.WorkloadItemType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLAutoProtectionIntent. +func (a *AzureWorkloadSQLAutoProtectionIntent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) + delete(rawMsg, key) + case "itemId": + err = unpopulate(val, "ItemID", &a.ItemID) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "protectionIntentItemType": + err = unpopulate(val, "ProtectionIntentItemType", &a.ProtectionIntentItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &a.ProtectionState) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "workloadItemType": + err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. +func (a AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + objectMap["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" + populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) + populate(objectMap, "recoveryPointProperties", a.RecoveryPointProperties) + populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) + populate(objectMap, "timeRanges", a.TimeRanges) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. +func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointMoveReadinessInfo": + err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &a.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointTierDetails": + err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) + delete(rawMsg, key) + case "recoveryPointTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) + delete(rawMsg, key) + case "timeRanges": + err = unpopulate(val, "TimeRanges", &a.TimeRanges) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLPointInTimeRestoreRequest. +func (a AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alternateDirectoryPaths", a.AlternateDirectoryPaths) + populate(objectMap, "isNonRecoverable", a.IsNonRecoverable) + objectMap["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" + populateDateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "shouldUseAlternateTargetLocation", a.ShouldUseAlternateTargetLocation) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLPointInTimeRestoreRequest. +func (a *AzureWorkloadSQLPointInTimeRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alternateDirectoryPaths": + err = unpopulate(val, "AlternateDirectoryPaths", &a.AlternateDirectoryPaths) + delete(rawMsg, key) + case "isNonRecoverable": + err = unpopulate(val, "IsNonRecoverable", &a.IsNonRecoverable) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "pointInTime": + err = unpopulateDateTimeRFC3339(val, "PointInTime", &a.PointInTime) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "shouldUseAlternateTargetLocation": + err = unpopulate(val, "ShouldUseAlternateTargetLocation", &a.ShouldUseAlternateTargetLocation) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. +func (a AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alternateDirectoryPaths", a.AlternateDirectoryPaths) + populate(objectMap, "isNonRecoverable", a.IsNonRecoverable) + objectMap["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" + populateDateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryPointRehydrationInfo", a.RecoveryPointRehydrationInfo) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "shouldUseAlternateTargetLocation", a.ShouldUseAlternateTargetLocation) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. +func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alternateDirectoryPaths": + err = unpopulate(val, "AlternateDirectoryPaths", &a.AlternateDirectoryPaths) + delete(rawMsg, key) + case "isNonRecoverable": + err = unpopulate(val, "IsNonRecoverable", &a.IsNonRecoverable) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "pointInTime": + err = unpopulateDateTimeRFC3339(val, "PointInTime", &a.PointInTime) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryPointRehydrationInfo": + err = unpopulate(val, "RecoveryPointRehydrationInfo", &a.RecoveryPointRehydrationInfo) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "shouldUseAlternateTargetLocation": + err = unpopulate(val, "ShouldUseAlternateTargetLocation", &a.ShouldUseAlternateTargetLocation) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLRecoveryPoint. +func (a AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedInfo", a.ExtendedInfo) + objectMap["objectType"] = "AzureWorkloadSQLRecoveryPoint" + populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) + populate(objectMap, "recoveryPointProperties", a.RecoveryPointProperties) + populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLRecoveryPoint. +func (a *AzureWorkloadSQLRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "recoveryPointMoveReadinessInfo": + err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &a.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointTierDetails": + err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) + delete(rawMsg, key) + case "recoveryPointTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLRecoveryPointExtendedInfo. +func (a AzureWorkloadSQLRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataDirectoryPaths", a.DataDirectoryPaths) + populateDateTimeRFC3339(objectMap, "dataDirectoryTimeInUTC", a.DataDirectoryTimeInUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLRecoveryPointExtendedInfo. +func (a *AzureWorkloadSQLRecoveryPointExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataDirectoryPaths": + err = unpopulate(val, "DataDirectoryPaths", &a.DataDirectoryPaths) + delete(rawMsg, key) + case "dataDirectoryTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DataDirectoryTimeInUTC", &a.DataDirectoryTimeInUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLRestoreRequest. +func (a AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alternateDirectoryPaths", a.AlternateDirectoryPaths) + populate(objectMap, "isNonRecoverable", a.IsNonRecoverable) + objectMap["objectType"] = "AzureWorkloadSQLRestoreRequest" + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "shouldUseAlternateTargetLocation", a.ShouldUseAlternateTargetLocation) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLRestoreRequest. +func (a *AzureWorkloadSQLRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alternateDirectoryPaths": + err = unpopulate(val, "AlternateDirectoryPaths", &a.AlternateDirectoryPaths) + delete(rawMsg, key) + case "isNonRecoverable": + err = unpopulate(val, "IsNonRecoverable", &a.IsNonRecoverable) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "shouldUseAlternateTargetLocation": + err = unpopulate(val, "ShouldUseAlternateTargetLocation", &a.ShouldUseAlternateTargetLocation) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. +func (a AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "alternateDirectoryPaths", a.AlternateDirectoryPaths) + populate(objectMap, "isNonRecoverable", a.IsNonRecoverable) + objectMap["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" + populate(objectMap, "propertyBag", a.PropertyBag) + populate(objectMap, "recoveryMode", a.RecoveryMode) + populate(objectMap, "recoveryPointRehydrationInfo", a.RecoveryPointRehydrationInfo) + populate(objectMap, "recoveryType", a.RecoveryType) + populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) + populate(objectMap, "shouldUseAlternateTargetLocation", a.ShouldUseAlternateTargetLocation) + populate(objectMap, "snapshotRestoreParameters", a.SnapshotRestoreParameters) + populate(objectMap, "sourceResourceId", a.SourceResourceID) + populate(objectMap, "targetInfo", a.TargetInfo) + populate(objectMap, "targetResourceGroupName", a.TargetResourceGroupName) + populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) + populate(objectMap, "userAssignedManagedIdentityDetails", a.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. +func (a *AzureWorkloadSQLRestoreWithRehydrateRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "alternateDirectoryPaths": + err = unpopulate(val, "AlternateDirectoryPaths", &a.AlternateDirectoryPaths) + delete(rawMsg, key) + case "isNonRecoverable": + err = unpopulate(val, "IsNonRecoverable", &a.IsNonRecoverable) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &a.ObjectType) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "recoveryMode": + err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) + delete(rawMsg, key) + case "recoveryPointRehydrationInfo": + err = unpopulate(val, "RecoveryPointRehydrationInfo", &a.RecoveryPointRehydrationInfo) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &a.RecoveryType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "shouldUseAlternateTargetLocation": + err = unpopulate(val, "ShouldUseAlternateTargetLocation", &a.ShouldUseAlternateTargetLocation) + delete(rawMsg, key) + case "snapshotRestoreParameters": + err = unpopulate(val, "SnapshotRestoreParameters", &a.SnapshotRestoreParameters) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) + delete(rawMsg, key) + case "targetInfo": + err = unpopulate(val, "TargetInfo", &a.TargetInfo) + delete(rawMsg, key) + case "targetResourceGroupName": + err = unpopulate(val, "TargetResourceGroupName", &a.TargetResourceGroupName) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &a.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BEKDetails. +func (b BEKDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "secretData", b.SecretData) + populate(objectMap, "secretUrl", b.SecretURL) + populate(objectMap, "secretVaultId", b.SecretVaultID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BEKDetails. +func (b *BEKDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "secretData": + err = unpopulate(val, "SecretData", &b.SecretData) + delete(rawMsg, key) + case "secretUrl": + err = unpopulate(val, "SecretURL", &b.SecretURL) + delete(rawMsg, key) + case "secretVaultId": + err = unpopulate(val, "SecretVaultID", &b.SecretVaultID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BMSBackupEngineQueryObject. +func (b BMSBackupEngineQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expand", b.Expand) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BMSBackupEngineQueryObject. +func (b *BMSBackupEngineQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expand": + err = unpopulate(val, "Expand", &b.Expand) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BMSBackupEnginesQueryObject. +func (b BMSBackupEnginesQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", b.BackupManagementType) + populate(objectMap, "expand", b.Expand) + populate(objectMap, "friendlyName", b.FriendlyName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BMSBackupEnginesQueryObject. +func (b *BMSBackupEnginesQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &b.BackupManagementType) + delete(rawMsg, key) + case "expand": + err = unpopulate(val, "Expand", &b.Expand) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &b.FriendlyName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BMSBackupSummariesQueryObject. +func (b BMSBackupSummariesQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BMSBackupSummariesQueryObject. +func (b *BMSBackupSummariesQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BMSContainerQueryObject. +func (b BMSContainerQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupEngineName", b.BackupEngineName) + populate(objectMap, "backupManagementType", b.BackupManagementType) + populate(objectMap, "containerType", b.ContainerType) + populate(objectMap, "fabricName", b.FabricName) + populate(objectMap, "friendlyName", b.FriendlyName) + populate(objectMap, "status", b.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BMSContainerQueryObject. +func (b *BMSContainerQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupEngineName": + err = unpopulate(val, "BackupEngineName", &b.BackupEngineName) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &b.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &b.ContainerType) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &b.FabricName) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &b.FriendlyName) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &b.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BMSContainersInquiryQueryObject. +func (b BMSContainersInquiryQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", b.BackupManagementType) + populate(objectMap, "workloadType", b.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BMSContainersInquiryQueryObject. +func (b *BMSContainersInquiryQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &b.BackupManagementType) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &b.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BMSPOQueryObject. +func (b BMSPOQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", b.BackupManagementType) + populate(objectMap, "containerName", b.ContainerName) + populate(objectMap, "friendlyName", b.FriendlyName) + populate(objectMap, "status", b.Status) + populate(objectMap, "workloadType", b.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BMSPOQueryObject. +func (b *BMSPOQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &b.BackupManagementType) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &b.ContainerName) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &b.FriendlyName) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &b.Status) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &b.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BMSRPQueryObject. +func (b BMSRPQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endDate", b.EndDate) + populate(objectMap, "extendedInfo", b.ExtendedInfo) + populate(objectMap, "includeSoftDeletedRP", b.IncludeSoftDeletedRP) + populate(objectMap, "moveReadyRPOnly", b.MoveReadyRPOnly) + populate(objectMap, "restorePointQueryType", b.RestorePointQueryType) + populateDateTimeRFC3339(objectMap, "startDate", b.StartDate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BMSRPQueryObject. +func (b *BMSRPQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endDate": + err = unpopulateDateTimeRFC3339(val, "EndDate", &b.EndDate) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &b.ExtendedInfo) + delete(rawMsg, key) + case "includeSoftDeletedRP": + err = unpopulate(val, "IncludeSoftDeletedRP", &b.IncludeSoftDeletedRP) + delete(rawMsg, key) + case "moveReadyRPOnly": + err = unpopulate(val, "MoveReadyRPOnly", &b.MoveReadyRPOnly) + delete(rawMsg, key) + case "restorePointQueryType": + err = unpopulate(val, "RestorePointQueryType", &b.RestorePointQueryType) + delete(rawMsg, key) + case "startDate": + err = unpopulateDateTimeRFC3339(val, "StartDate", &b.StartDate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BMSRefreshContainersQueryObject. +func (b BMSRefreshContainersQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", b.BackupManagementType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BMSRefreshContainersQueryObject. +func (b *BMSRefreshContainersQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &b.BackupManagementType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BMSWorkloadItemQueryObject. +func (b BMSWorkloadItemQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", b.BackupManagementType) + populate(objectMap, "protectionStatus", b.ProtectionStatus) + populate(objectMap, "workloadItemType", b.WorkloadItemType) + populate(objectMap, "workloadType", b.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BMSWorkloadItemQueryObject. +func (b *BMSWorkloadItemQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &b.BackupManagementType) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &b.ProtectionStatus) + delete(rawMsg, key) + case "workloadItemType": + err = unpopulate(val, "WorkloadItemType", &b.WorkloadItemType) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &b.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupEngineBase. +func (b BackupEngineBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureBackupAgentVersion", b.AzureBackupAgentVersion) + populate(objectMap, "backupEngineId", b.BackupEngineID) + populate(objectMap, "backupEngineState", b.BackupEngineState) + objectMap["backupEngineType"] = b.BackupEngineType + populate(objectMap, "backupManagementType", b.BackupManagementType) + populate(objectMap, "canReRegister", b.CanReRegister) + populate(objectMap, "dpmVersion", b.DpmVersion) + populate(objectMap, "extendedInfo", b.ExtendedInfo) + populate(objectMap, "friendlyName", b.FriendlyName) + populate(objectMap, "healthStatus", b.HealthStatus) + populate(objectMap, "isAzureBackupAgentUpgradeAvailable", b.IsAzureBackupAgentUpgradeAvailable) + populate(objectMap, "isDpmUpgradeAvailable", b.IsDpmUpgradeAvailable) + populate(objectMap, "registrationStatus", b.RegistrationStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupEngineBase. +func (b *BackupEngineBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureBackupAgentVersion": + err = unpopulate(val, "AzureBackupAgentVersion", &b.AzureBackupAgentVersion) + delete(rawMsg, key) + case "backupEngineId": + err = unpopulate(val, "BackupEngineID", &b.BackupEngineID) + delete(rawMsg, key) + case "backupEngineState": + err = unpopulate(val, "BackupEngineState", &b.BackupEngineState) + delete(rawMsg, key) + case "backupEngineType": + err = unpopulate(val, "BackupEngineType", &b.BackupEngineType) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &b.BackupManagementType) + delete(rawMsg, key) + case "canReRegister": + err = unpopulate(val, "CanReRegister", &b.CanReRegister) + delete(rawMsg, key) + case "dpmVersion": + err = unpopulate(val, "DpmVersion", &b.DpmVersion) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &b.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &b.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &b.HealthStatus) + delete(rawMsg, key) + case "isAzureBackupAgentUpgradeAvailable": + err = unpopulate(val, "IsAzureBackupAgentUpgradeAvailable", &b.IsAzureBackupAgentUpgradeAvailable) + delete(rawMsg, key) + case "isDpmUpgradeAvailable": + err = unpopulate(val, "IsDpmUpgradeAvailable", &b.IsDpmUpgradeAvailable) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &b.RegistrationStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupEngineBaseResource. +func (b BackupEngineBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", b.ETag) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupEngineBaseResource. +func (b *BackupEngineBaseResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &b.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + b.Properties, err = unmarshalBackupEngineBaseClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupEngineBaseResourceList. +func (b BackupEngineBaseResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupEngineBaseResourceList. +func (b *BackupEngineBaseResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupEngineExtendedInfo. +func (b BackupEngineExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableDiskSpace", b.AvailableDiskSpace) + populate(objectMap, "azureProtectedInstances", b.AzureProtectedInstances) + populate(objectMap, "databaseName", b.DatabaseName) + populate(objectMap, "diskCount", b.DiskCount) + populate(objectMap, "protectedItemsCount", b.ProtectedItemsCount) + populate(objectMap, "protectedServersCount", b.ProtectedServersCount) + populateDateTimeRFC3339(objectMap, "refreshedAt", b.RefreshedAt) + populate(objectMap, "usedDiskSpace", b.UsedDiskSpace) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupEngineExtendedInfo. +func (b *BackupEngineExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableDiskSpace": + err = unpopulate(val, "AvailableDiskSpace", &b.AvailableDiskSpace) + delete(rawMsg, key) + case "azureProtectedInstances": + err = unpopulate(val, "AzureProtectedInstances", &b.AzureProtectedInstances) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &b.DatabaseName) + delete(rawMsg, key) + case "diskCount": + err = unpopulate(val, "DiskCount", &b.DiskCount) + delete(rawMsg, key) + case "protectedItemsCount": + err = unpopulate(val, "ProtectedItemsCount", &b.ProtectedItemsCount) + delete(rawMsg, key) + case "protectedServersCount": + err = unpopulate(val, "ProtectedServersCount", &b.ProtectedServersCount) + delete(rawMsg, key) + case "refreshedAt": + err = unpopulateDateTimeRFC3339(val, "RefreshedAt", &b.RefreshedAt) + delete(rawMsg, key) + case "usedDiskSpace": + err = unpopulate(val, "UsedDiskSpace", &b.UsedDiskSpace) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupManagementUsage. +func (b BackupManagementUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", b.CurrentValue) + populate(objectMap, "limit", b.Limit) + populate(objectMap, "name", b.Name) + populateDateTimeRFC3339(objectMap, "nextResetTime", b.NextResetTime) + populate(objectMap, "quotaPeriod", b.QuotaPeriod) + populate(objectMap, "unit", b.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupManagementUsage. +func (b *BackupManagementUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &b.CurrentValue) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &b.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "nextResetTime": + err = unpopulateDateTimeRFC3339(val, "NextResetTime", &b.NextResetTime) + delete(rawMsg, key) + case "quotaPeriod": + err = unpopulate(val, "QuotaPeriod", &b.QuotaPeriod) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &b.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupManagementUsageList. +func (b BackupManagementUsageList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupManagementUsageList. +func (b *BackupManagementUsageList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupRequest. +func (b BackupRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = b.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupRequest. +func (b *BackupRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &b.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupRequestResource. +func (b BackupRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", b.ETag) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupRequestResource. +func (b *BackupRequestResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &b.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + b.Properties, err = unmarshalBackupRequestClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupResourceConfig. +func (b BackupResourceConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "crossRegionRestoreFlag", b.CrossRegionRestoreFlag) + populate(objectMap, "dedupState", b.DedupState) + populate(objectMap, "storageModelType", b.StorageModelType) + populate(objectMap, "storageType", b.StorageType) + populate(objectMap, "storageTypeState", b.StorageTypeState) + populate(objectMap, "xcoolState", b.XcoolState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupResourceConfig. +func (b *BackupResourceConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "crossRegionRestoreFlag": + err = unpopulate(val, "CrossRegionRestoreFlag", &b.CrossRegionRestoreFlag) + delete(rawMsg, key) + case "dedupState": + err = unpopulate(val, "DedupState", &b.DedupState) + delete(rawMsg, key) + case "storageModelType": + err = unpopulate(val, "StorageModelType", &b.StorageModelType) + delete(rawMsg, key) + case "storageType": + err = unpopulate(val, "StorageType", &b.StorageType) + delete(rawMsg, key) + case "storageTypeState": + err = unpopulate(val, "StorageTypeState", &b.StorageTypeState) + delete(rawMsg, key) + case "xcoolState": + err = unpopulate(val, "XcoolState", &b.XcoolState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupResourceConfigResource. +func (b BackupResourceConfigResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", b.ETag) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupResourceConfigResource. +func (b *BackupResourceConfigResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &b.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupResourceEncryptionConfig. +func (b BackupResourceEncryptionConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "encryptionAtRestType", b.EncryptionAtRestType) + populate(objectMap, "infrastructureEncryptionState", b.InfrastructureEncryptionState) + populate(objectMap, "keyUri", b.KeyURI) + populate(objectMap, "lastUpdateStatus", b.LastUpdateStatus) + populate(objectMap, "subscriptionId", b.SubscriptionID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupResourceEncryptionConfig. +func (b *BackupResourceEncryptionConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "encryptionAtRestType": + err = unpopulate(val, "EncryptionAtRestType", &b.EncryptionAtRestType) + delete(rawMsg, key) + case "infrastructureEncryptionState": + err = unpopulate(val, "InfrastructureEncryptionState", &b.InfrastructureEncryptionState) + delete(rawMsg, key) + case "keyUri": + err = unpopulate(val, "KeyURI", &b.KeyURI) + delete(rawMsg, key) + case "lastUpdateStatus": + err = unpopulate(val, "LastUpdateStatus", &b.LastUpdateStatus) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &b.SubscriptionID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupResourceEncryptionConfigExtended. +func (b BackupResourceEncryptionConfigExtended) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "encryptionAtRestType", b.EncryptionAtRestType) + populate(objectMap, "infrastructureEncryptionState", b.InfrastructureEncryptionState) + populate(objectMap, "keyUri", b.KeyURI) + populate(objectMap, "lastUpdateStatus", b.LastUpdateStatus) + populate(objectMap, "subscriptionId", b.SubscriptionID) + populate(objectMap, "useSystemAssignedIdentity", b.UseSystemAssignedIdentity) + populate(objectMap, "userAssignedIdentity", b.UserAssignedIdentity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupResourceEncryptionConfigExtended. +func (b *BackupResourceEncryptionConfigExtended) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "encryptionAtRestType": + err = unpopulate(val, "EncryptionAtRestType", &b.EncryptionAtRestType) + delete(rawMsg, key) + case "infrastructureEncryptionState": + err = unpopulate(val, "InfrastructureEncryptionState", &b.InfrastructureEncryptionState) + delete(rawMsg, key) + case "keyUri": + err = unpopulate(val, "KeyURI", &b.KeyURI) + delete(rawMsg, key) + case "lastUpdateStatus": + err = unpopulate(val, "LastUpdateStatus", &b.LastUpdateStatus) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &b.SubscriptionID) + delete(rawMsg, key) + case "useSystemAssignedIdentity": + err = unpopulate(val, "UseSystemAssignedIdentity", &b.UseSystemAssignedIdentity) + delete(rawMsg, key) + case "userAssignedIdentity": + err = unpopulate(val, "UserAssignedIdentity", &b.UserAssignedIdentity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupResourceEncryptionConfigExtendedResource. +func (b BackupResourceEncryptionConfigExtendedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", b.ETag) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupResourceEncryptionConfigExtendedResource. +func (b *BackupResourceEncryptionConfigExtendedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &b.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupResourceEncryptionConfigResource. +func (b BackupResourceEncryptionConfigResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", b.ETag) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupResourceEncryptionConfigResource. +func (b *BackupResourceEncryptionConfigResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &b.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupResourceVaultConfig. +func (b BackupResourceVaultConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enhancedSecurityState", b.EnhancedSecurityState) + populate(objectMap, "isSoftDeleteFeatureStateEditable", b.IsSoftDeleteFeatureStateEditable) + populate(objectMap, "resourceGuardOperationRequests", b.ResourceGuardOperationRequests) + populate(objectMap, "softDeleteFeatureState", b.SoftDeleteFeatureState) + populate(objectMap, "softDeleteRetentionPeriodInDays", b.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "storageModelType", b.StorageModelType) + populate(objectMap, "storageType", b.StorageType) + populate(objectMap, "storageTypeState", b.StorageTypeState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupResourceVaultConfig. +func (b *BackupResourceVaultConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enhancedSecurityState": + err = unpopulate(val, "EnhancedSecurityState", &b.EnhancedSecurityState) + delete(rawMsg, key) + case "isSoftDeleteFeatureStateEditable": + err = unpopulate(val, "IsSoftDeleteFeatureStateEditable", &b.IsSoftDeleteFeatureStateEditable) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &b.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "softDeleteFeatureState": + err = unpopulate(val, "SoftDeleteFeatureState", &b.SoftDeleteFeatureState) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &b.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "storageModelType": + err = unpopulate(val, "StorageModelType", &b.StorageModelType) + delete(rawMsg, key) + case "storageType": + err = unpopulate(val, "StorageType", &b.StorageType) + delete(rawMsg, key) + case "storageTypeState": + err = unpopulate(val, "StorageTypeState", &b.StorageTypeState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupResourceVaultConfigResource. +func (b BackupResourceVaultConfigResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", b.ETag) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupResourceVaultConfigResource. +func (b *BackupResourceVaultConfigResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &b.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupStatusRequest. +func (b BackupStatusRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "poLogicalName", b.PoLogicalName) + populate(objectMap, "resourceId", b.ResourceID) + populate(objectMap, "resourceType", b.ResourceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupStatusRequest. +func (b *BackupStatusRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "poLogicalName": + err = unpopulate(val, "PoLogicalName", &b.PoLogicalName) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &b.ResourceID) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &b.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BackupStatusResponse. +func (b BackupStatusResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "acquireStorageAccountLock", b.AcquireStorageAccountLock) + populate(objectMap, "containerName", b.ContainerName) + populate(objectMap, "errorCode", b.ErrorCode) + populate(objectMap, "errorMessage", b.ErrorMessage) + populate(objectMap, "fabricName", b.FabricName) + populate(objectMap, "policyName", b.PolicyName) + populate(objectMap, "protectedItemName", b.ProtectedItemName) + populate(objectMap, "protectedItemsCount", b.ProtectedItemsCount) + populate(objectMap, "protectionStatus", b.ProtectionStatus) + populate(objectMap, "registrationStatus", b.RegistrationStatus) + populate(objectMap, "vaultId", b.VaultID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BackupStatusResponse. +func (b *BackupStatusResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acquireStorageAccountLock": + err = unpopulate(val, "AcquireStorageAccountLock", &b.AcquireStorageAccountLock) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &b.ContainerName) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &b.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &b.ErrorMessage) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &b.FabricName) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &b.PolicyName) + delete(rawMsg, key) + case "protectedItemName": + err = unpopulate(val, "ProtectedItemName", &b.ProtectedItemName) + delete(rawMsg, key) + case "protectedItemsCount": + err = unpopulate(val, "ProtectedItemsCount", &b.ProtectedItemsCount) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &b.ProtectionStatus) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &b.RegistrationStatus) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &b.VaultID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryDisplay. +func (c ClientDiscoveryDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", c.Description) + populate(objectMap, "operation", c.Operation) + populate(objectMap, "provider", c.Provider) + populate(objectMap, "resource", c.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryDisplay. +func (c *ClientDiscoveryDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &c.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &c.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &c.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryForLogSpecification. +func (c ClientDiscoveryForLogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", c.BlobDuration) + populate(objectMap, "displayName", c.DisplayName) + populate(objectMap, "name", c.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryForLogSpecification. +func (c *ClientDiscoveryForLogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobDuration": + err = unpopulate(val, "BlobDuration", &c.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &c.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryForProperties. +func (c ClientDiscoveryForProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", c.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryForProperties. +func (c *ClientDiscoveryForProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &c.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryForServiceSpecification. +func (c ClientDiscoveryForServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", c.LogSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryForServiceSpecification. +func (c *ClientDiscoveryForServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &c.LogSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryResponse. +func (c ClientDiscoveryResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryResponse. +func (c *ClientDiscoveryResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryValueForSingleAPI. +func (c ClientDiscoveryValueForSingleAPI) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", c.Display) + populate(objectMap, "name", c.Name) + populate(objectMap, "origin", c.Origin) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryValueForSingleAPI. +func (c *ClientDiscoveryValueForSingleAPI) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &c.Display) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &c.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClientScriptForConnect. +func (c ClientScriptForConnect) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "osType", c.OSType) + populate(objectMap, "scriptContent", c.ScriptContent) + populate(objectMap, "scriptExtension", c.ScriptExtension) + populate(objectMap, "scriptNameSuffix", c.ScriptNameSuffix) + populate(objectMap, "url", c.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientScriptForConnect. +func (c *ClientScriptForConnect) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "osType": + err = unpopulate(val, "OSType", &c.OSType) + delete(rawMsg, key) + case "scriptContent": + err = unpopulate(val, "ScriptContent", &c.ScriptContent) + delete(rawMsg, key) + case "scriptExtension": + err = unpopulate(val, "ScriptExtension", &c.ScriptExtension) + delete(rawMsg, key) + case "scriptNameSuffix": + err = unpopulate(val, "ScriptNameSuffix", &c.ScriptNameSuffix) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &c.URL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerIdentityInfo. +func (c ContainerIdentityInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadTenantId", c.AADTenantID) + populate(objectMap, "audience", c.Audience) + populate(objectMap, "servicePrincipalClientId", c.ServicePrincipalClientID) + populate(objectMap, "uniqueName", c.UniqueName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerIdentityInfo. +func (c *ContainerIdentityInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadTenantId": + err = unpopulate(val, "AADTenantID", &c.AADTenantID) + delete(rawMsg, key) + case "audience": + err = unpopulate(val, "Audience", &c.Audience) + delete(rawMsg, key) + case "servicePrincipalClientId": + err = unpopulate(val, "ServicePrincipalClientID", &c.ServicePrincipalClientID) + delete(rawMsg, key) + case "uniqueName": + err = unpopulate(val, "UniqueName", &c.UniqueName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DPMContainerExtendedInfo. +func (d DPMContainerExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "lastRefreshedAt", d.LastRefreshedAt) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DPMContainerExtendedInfo. +func (d *DPMContainerExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lastRefreshedAt": + err = unpopulateDateTimeRFC3339(val, "LastRefreshedAt", &d.LastRefreshedAt) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DPMProtectedItem. +func (d DPMProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupEngineName", d.BackupEngineName) + populate(objectMap, "backupManagementType", d.BackupManagementType) + populate(objectMap, "backupSetName", d.BackupSetName) + populate(objectMap, "containerName", d.ContainerName) + populate(objectMap, "createMode", d.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", d.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", d.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", d.ExtendedInfo) + populate(objectMap, "friendlyName", d.FriendlyName) + populate(objectMap, "isArchiveEnabled", d.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", d.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", d.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", d.IsScheduledForDeferredDelete) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", d.LastRecoveryPoint) + populate(objectMap, "policyId", d.PolicyID) + populate(objectMap, "policyName", d.PolicyName) + objectMap["protectedItemType"] = "DPMProtectedItem" + populate(objectMap, "protectionState", d.ProtectionState) + populate(objectMap, "resourceGuardOperationRequests", d.ResourceGuardOperationRequests) + populate(objectMap, "softDeleteRetentionPeriodInDays", d.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", d.SourceResourceID) + populate(objectMap, "vaultId", d.VaultID) + populate(objectMap, "workloadType", d.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DPMProtectedItem. +func (d *DPMProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupEngineName": + err = unpopulate(val, "BackupEngineName", &d.BackupEngineName) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &d.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &d.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &d.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &d.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &d.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &d.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &d.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &d.FriendlyName) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &d.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &d.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &d.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &d.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &d.LastRecoveryPoint) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &d.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &d.PolicyName) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &d.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &d.ProtectionState) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &d.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &d.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &d.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &d.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &d.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DPMProtectedItemExtendedInfo. +func (d DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskStorageUsedInBytes", d.DiskStorageUsedInBytes) + populate(objectMap, "isCollocated", d.IsCollocated) + populate(objectMap, "isPresentOnCloud", d.IsPresentOnCloud) + populate(objectMap, "lastBackupStatus", d.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastRefreshedAt", d.LastRefreshedAt) + populateDateTimeRFC3339(objectMap, "oldestRecoveryPoint", d.OldestRecoveryPoint) + populateDateTimeRFC3339(objectMap, "onPremiseLatestRecoveryPoint", d.OnPremiseLatestRecoveryPoint) + populateDateTimeRFC3339(objectMap, "onPremiseOldestRecoveryPoint", d.OnPremiseOldestRecoveryPoint) + populate(objectMap, "onPremiseRecoveryPointCount", d.OnPremiseRecoveryPointCount) + populate(objectMap, "protectableObjectLoadPath", d.ProtectableObjectLoadPath) + populate(objectMap, "protected", d.Protected) + populate(objectMap, "protectionGroupName", d.ProtectionGroupName) + populate(objectMap, "recoveryPointCount", d.RecoveryPointCount) + populate(objectMap, "totalDiskStorageSizeInBytes", d.TotalDiskStorageSizeInBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DPMProtectedItemExtendedInfo. +func (d *DPMProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskStorageUsedInBytes": + err = unpopulate(val, "DiskStorageUsedInBytes", &d.DiskStorageUsedInBytes) + delete(rawMsg, key) + case "isCollocated": + err = unpopulate(val, "IsCollocated", &d.IsCollocated) + delete(rawMsg, key) + case "isPresentOnCloud": + err = unpopulate(val, "IsPresentOnCloud", &d.IsPresentOnCloud) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &d.LastBackupStatus) + delete(rawMsg, key) + case "lastRefreshedAt": + err = unpopulateDateTimeRFC3339(val, "LastRefreshedAt", &d.LastRefreshedAt) + delete(rawMsg, key) + case "oldestRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "OldestRecoveryPoint", &d.OldestRecoveryPoint) + delete(rawMsg, key) + case "onPremiseLatestRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "OnPremiseLatestRecoveryPoint", &d.OnPremiseLatestRecoveryPoint) + delete(rawMsg, key) + case "onPremiseOldestRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "OnPremiseOldestRecoveryPoint", &d.OnPremiseOldestRecoveryPoint) + delete(rawMsg, key) + case "onPremiseRecoveryPointCount": + err = unpopulate(val, "OnPremiseRecoveryPointCount", &d.OnPremiseRecoveryPointCount) + delete(rawMsg, key) + case "protectableObjectLoadPath": + err = unpopulate(val, "ProtectableObjectLoadPath", &d.ProtectableObjectLoadPath) + delete(rawMsg, key) + case "protected": + err = unpopulate(val, "Protected", &d.Protected) + delete(rawMsg, key) + case "protectionGroupName": + err = unpopulate(val, "ProtectionGroupName", &d.ProtectionGroupName) + delete(rawMsg, key) + case "recoveryPointCount": + err = unpopulate(val, "RecoveryPointCount", &d.RecoveryPointCount) + delete(rawMsg, key) + case "totalDiskStorageSizeInBytes": + err = unpopulate(val, "TotalDiskStorageSizeInBytes", &d.TotalDiskStorageSizeInBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DailyRetentionFormat. +func (d DailyRetentionFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "daysOfTheMonth", d.DaysOfTheMonth) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DailyRetentionFormat. +func (d *DailyRetentionFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "daysOfTheMonth": + err = unpopulate(val, "DaysOfTheMonth", &d.DaysOfTheMonth) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DailyRetentionSchedule. +func (d DailyRetentionSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "retentionDuration", d.RetentionDuration) + aux := make([]*dateTimeRFC3339, len(d.RetentionTimes), len(d.RetentionTimes)) + for i := 0; i < len(d.RetentionTimes); i++ { + aux[i] = (*dateTimeRFC3339)(d.RetentionTimes[i]) + } + populate(objectMap, "retentionTimes", aux) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DailyRetentionSchedule. +func (d *DailyRetentionSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "retentionDuration": + err = unpopulate(val, "RetentionDuration", &d.RetentionDuration) + delete(rawMsg, key) + case "retentionTimes": + var aux []*dateTimeRFC3339 + err = unpopulate(val, "RetentionTimes", &aux) + for _, au := range aux { + d.RetentionTimes = append(d.RetentionTimes, (*time.Time)(au)) + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DailySchedule. +func (d DailySchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + aux := make([]*dateTimeRFC3339, len(d.ScheduleRunTimes), len(d.ScheduleRunTimes)) + for i := 0; i < len(d.ScheduleRunTimes); i++ { + aux[i] = (*dateTimeRFC3339)(d.ScheduleRunTimes[i]) + } + populate(objectMap, "scheduleRunTimes", aux) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DailySchedule. +func (d *DailySchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scheduleRunTimes": + var aux []*dateTimeRFC3339 + err = unpopulate(val, "ScheduleRunTimes", &aux) + for _, au := range aux { + d.ScheduleRunTimes = append(d.ScheduleRunTimes, (*time.Time)(au)) + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Day. +func (d Day) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "date", d.Date) + populate(objectMap, "isLast", d.IsLast) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Day. +func (d *Day) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "date": + err = unpopulate(val, "Date", &d.Date) + delete(rawMsg, key) + case "isLast": + err = unpopulate(val, "IsLast", &d.IsLast) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiskExclusionProperties. +func (d DiskExclusionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskLunList", d.DiskLunList) + populate(objectMap, "isInclusionList", d.IsInclusionList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiskExclusionProperties. +func (d *DiskExclusionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskLunList": + err = unpopulate(val, "DiskLunList", &d.DiskLunList) + delete(rawMsg, key) + case "isInclusionList": + err = unpopulate(val, "IsInclusionList", &d.IsInclusionList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiskInformation. +func (d DiskInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "lun", d.Lun) + populate(objectMap, "name", d.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiskInformation. +func (d *DiskInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lun": + err = unpopulate(val, "Lun", &d.Lun) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DistributedNodesInfo. +func (d DistributedNodesInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorDetail", d.ErrorDetail) + populate(objectMap, "nodeName", d.NodeName) + populate(objectMap, "sourceResourceId", d.SourceResourceID) + populate(objectMap, "status", d.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DistributedNodesInfo. +func (d *DistributedNodesInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorDetail": + err = unpopulate(val, "ErrorDetail", &d.ErrorDetail) + delete(rawMsg, key) + case "nodeName": + err = unpopulate(val, "NodeName", &d.NodeName) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &d.SourceResourceID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DpmBackupEngine. +func (d DpmBackupEngine) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureBackupAgentVersion", d.AzureBackupAgentVersion) + populate(objectMap, "backupEngineId", d.BackupEngineID) + populate(objectMap, "backupEngineState", d.BackupEngineState) + objectMap["backupEngineType"] = BackupEngineTypeDpmBackupEngine + populate(objectMap, "backupManagementType", d.BackupManagementType) + populate(objectMap, "canReRegister", d.CanReRegister) + populate(objectMap, "dpmVersion", d.DpmVersion) + populate(objectMap, "extendedInfo", d.ExtendedInfo) + populate(objectMap, "friendlyName", d.FriendlyName) + populate(objectMap, "healthStatus", d.HealthStatus) + populate(objectMap, "isAzureBackupAgentUpgradeAvailable", d.IsAzureBackupAgentUpgradeAvailable) + populate(objectMap, "isDpmUpgradeAvailable", d.IsDpmUpgradeAvailable) + populate(objectMap, "registrationStatus", d.RegistrationStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DpmBackupEngine. +func (d *DpmBackupEngine) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureBackupAgentVersion": + err = unpopulate(val, "AzureBackupAgentVersion", &d.AzureBackupAgentVersion) + delete(rawMsg, key) + case "backupEngineId": + err = unpopulate(val, "BackupEngineID", &d.BackupEngineID) + delete(rawMsg, key) + case "backupEngineState": + err = unpopulate(val, "BackupEngineState", &d.BackupEngineState) + delete(rawMsg, key) + case "backupEngineType": + err = unpopulate(val, "BackupEngineType", &d.BackupEngineType) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &d.BackupManagementType) + delete(rawMsg, key) + case "canReRegister": + err = unpopulate(val, "CanReRegister", &d.CanReRegister) + delete(rawMsg, key) + case "dpmVersion": + err = unpopulate(val, "DpmVersion", &d.DpmVersion) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &d.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &d.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &d.HealthStatus) + delete(rawMsg, key) + case "isAzureBackupAgentUpgradeAvailable": + err = unpopulate(val, "IsAzureBackupAgentUpgradeAvailable", &d.IsAzureBackupAgentUpgradeAvailable) + delete(rawMsg, key) + case "isDpmUpgradeAvailable": + err = unpopulate(val, "IsDpmUpgradeAvailable", &d.IsDpmUpgradeAvailable) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DpmContainer. +func (d DpmContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", d.BackupManagementType) + populate(objectMap, "canReRegister", d.CanReRegister) + populate(objectMap, "containerId", d.ContainerID) + objectMap["containerType"] = ProtectableContainerTypeDPMContainer + populate(objectMap, "dpmAgentVersion", d.DpmAgentVersion) + populate(objectMap, "dpmServers", d.DpmServers) + populate(objectMap, "extendedInfo", d.ExtendedInfo) + populate(objectMap, "friendlyName", d.FriendlyName) + populate(objectMap, "healthStatus", d.HealthStatus) + populate(objectMap, "protectableObjectType", d.ProtectableObjectType) + populate(objectMap, "protectedItemCount", d.ProtectedItemCount) + populate(objectMap, "protectionStatus", d.ProtectionStatus) + populate(objectMap, "registrationStatus", d.RegistrationStatus) + populate(objectMap, "upgradeAvailable", d.UpgradeAvailable) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DpmContainer. +func (d *DpmContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &d.BackupManagementType) + delete(rawMsg, key) + case "canReRegister": + err = unpopulate(val, "CanReRegister", &d.CanReRegister) + delete(rawMsg, key) + case "containerId": + err = unpopulate(val, "ContainerID", &d.ContainerID) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &d.ContainerType) + delete(rawMsg, key) + case "dpmAgentVersion": + err = unpopulate(val, "DpmAgentVersion", &d.DpmAgentVersion) + delete(rawMsg, key) + case "dpmServers": + err = unpopulate(val, "DpmServers", &d.DpmServers) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &d.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &d.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &d.HealthStatus) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &d.ProtectableObjectType) + delete(rawMsg, key) + case "protectedItemCount": + err = unpopulate(val, "ProtectedItemCount", &d.ProtectedItemCount) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &d.ProtectionStatus) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) + delete(rawMsg, key) + case "upgradeAvailable": + err = unpopulate(val, "UpgradeAvailable", &d.UpgradeAvailable) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DpmErrorInfo. +func (d DpmErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorString", d.ErrorString) + populate(objectMap, "recommendations", d.Recommendations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DpmErrorInfo. +func (d *DpmErrorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorString": + err = unpopulate(val, "ErrorString", &d.ErrorString) + delete(rawMsg, key) + case "recommendations": + err = unpopulate(val, "Recommendations", &d.Recommendations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DpmJob. +func (d DpmJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsInfo", d.ActionsInfo) + populate(objectMap, "activityId", d.ActivityID) + populate(objectMap, "backupManagementType", d.BackupManagementType) + populate(objectMap, "containerName", d.ContainerName) + populate(objectMap, "containerType", d.ContainerType) + populate(objectMap, "dpmServerName", d.DpmServerName) + populate(objectMap, "duration", d.Duration) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) + populate(objectMap, "entityFriendlyName", d.EntityFriendlyName) + populate(objectMap, "errorDetails", d.ErrorDetails) + populate(objectMap, "extendedInfo", d.ExtendedInfo) + objectMap["jobType"] = "DpmJob" + populate(objectMap, "operation", d.Operation) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) + populate(objectMap, "status", d.Status) + populate(objectMap, "workloadType", d.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DpmJob. +func (d *DpmJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsInfo": + err = unpopulate(val, "ActionsInfo", &d.ActionsInfo) + delete(rawMsg, key) + case "activityId": + err = unpopulate(val, "ActivityID", &d.ActivityID) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &d.BackupManagementType) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &d.ContainerName) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &d.ContainerType) + delete(rawMsg, key) + case "dpmServerName": + err = unpopulate(val, "DpmServerName", &d.DpmServerName) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &d.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) + delete(rawMsg, key) + case "entityFriendlyName": + err = unpopulate(val, "EntityFriendlyName", &d.EntityFriendlyName) + delete(rawMsg, key) + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &d.ErrorDetails) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &d.ExtendedInfo) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &d.JobType) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &d.Operation) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &d.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DpmJobExtendedInfo. +func (d DpmJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dynamicErrorMessage", d.DynamicErrorMessage) + populate(objectMap, "propertyBag", d.PropertyBag) + populate(objectMap, "tasksList", d.TasksList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DpmJobExtendedInfo. +func (d *DpmJobExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dynamicErrorMessage": + err = unpopulate(val, "DynamicErrorMessage", &d.DynamicErrorMessage) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &d.PropertyBag) + delete(rawMsg, key) + case "tasksList": + err = unpopulate(val, "TasksList", &d.TasksList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DpmJobTaskDetails. +func (d DpmJobTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "duration", d.Duration) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) + populate(objectMap, "status", d.Status) + populate(objectMap, "taskId", d.TaskID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DpmJobTaskDetails. +func (d *DpmJobTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "duration": + err = unpopulate(val, "Duration", &d.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &d.Status) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &d.TaskID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionDetails. +func (e EncryptionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "encryptionEnabled", e.EncryptionEnabled) + populate(objectMap, "kekUrl", e.KekURL) + populate(objectMap, "kekVaultId", e.KekVaultID) + populate(objectMap, "secretKeyUrl", e.SecretKeyURL) + populate(objectMap, "secretKeyVaultId", e.SecretKeyVaultID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionDetails. +func (e *EncryptionDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "encryptionEnabled": + err = unpopulate(val, "EncryptionEnabled", &e.EncryptionEnabled) + delete(rawMsg, key) + case "kekUrl": + err = unpopulate(val, "KekURL", &e.KekURL) + delete(rawMsg, key) + case "kekVaultId": + err = unpopulate(val, "KekVaultID", &e.KekVaultID) + delete(rawMsg, key) + case "secretKeyUrl": + err = unpopulate(val, "SecretKeyURL", &e.SecretKeyURL) + delete(rawMsg, key) + case "secretKeyVaultId": + err = unpopulate(val, "SecretKeyVaultID", &e.SecretKeyVaultID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. +func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "info", e.Info) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. +func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "info": + err = unpopulate(val, "Info", &e.Info) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. +func (e ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + populate(objectMap, "message", e.Message) + populate(objectMap, "recommendations", e.Recommendations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. +func (e *ErrorDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "recommendations": + err = unpopulate(val, "Recommendations", &e.Recommendations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExportJobsOperationResultInfo. +func (e ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobSasKey", e.BlobSasKey) + populate(objectMap, "blobUrl", e.BlobURL) + populate(objectMap, "excelFileBlobSasKey", e.ExcelFileBlobSasKey) + populate(objectMap, "excelFileBlobUrl", e.ExcelFileBlobURL) + objectMap["objectType"] = "ExportJobsOperationResultInfo" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExportJobsOperationResultInfo. +func (e *ExportJobsOperationResultInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobSasKey": + err = unpopulate(val, "BlobSasKey", &e.BlobSasKey) + delete(rawMsg, key) + case "blobUrl": + err = unpopulate(val, "BlobURL", &e.BlobURL) + delete(rawMsg, key) + case "excelFileBlobSasKey": + err = unpopulate(val, "ExcelFileBlobSasKey", &e.ExcelFileBlobSasKey) + delete(rawMsg, key) + case "excelFileBlobUrl": + err = unpopulate(val, "ExcelFileBlobURL", &e.ExcelFileBlobURL) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &e.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. +func (e ExtendedLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", e.Name) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation. +func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedProperties. +func (e ExtendedProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskExclusionProperties", e.DiskExclusionProperties) + populate(objectMap, "linuxVmApplicationName", e.LinuxVMApplicationName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedProperties. +func (e *ExtendedProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskExclusionProperties": + err = unpopulate(val, "DiskExclusionProperties", &e.DiskExclusionProperties) + delete(rawMsg, key) + case "linuxVmApplicationName": + err = unpopulate(val, "LinuxVMApplicationName", &e.LinuxVMApplicationName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeatureSupportRequest. +func (f FeatureSupportRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["featureType"] = f.FeatureType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureSupportRequest. +func (f *FeatureSupportRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featureType": + err = unpopulate(val, "FeatureType", &f.FeatureType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FetchTieringCostInfoForRehydrationRequest. +func (f FetchTieringCostInfoForRehydrationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerName", f.ContainerName) + objectMap["objectType"] = "FetchTieringCostInfoForRehydrationRequest" + populate(objectMap, "protectedItemName", f.ProtectedItemName) + populate(objectMap, "recoveryPointId", f.RecoveryPointID) + populate(objectMap, "rehydrationPriority", f.RehydrationPriority) + populate(objectMap, "sourceTierType", f.SourceTierType) + populate(objectMap, "targetTierType", f.TargetTierType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FetchTieringCostInfoForRehydrationRequest. +func (f *FetchTieringCostInfoForRehydrationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &f.ContainerName) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &f.ObjectType) + delete(rawMsg, key) + case "protectedItemName": + err = unpopulate(val, "ProtectedItemName", &f.ProtectedItemName) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &f.RecoveryPointID) + delete(rawMsg, key) + case "rehydrationPriority": + err = unpopulate(val, "RehydrationPriority", &f.RehydrationPriority) + delete(rawMsg, key) + case "sourceTierType": + err = unpopulate(val, "SourceTierType", &f.SourceTierType) + delete(rawMsg, key) + case "targetTierType": + err = unpopulate(val, "TargetTierType", &f.TargetTierType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FetchTieringCostInfoRequest. +func (f FetchTieringCostInfoRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = f.ObjectType + populate(objectMap, "sourceTierType", f.SourceTierType) + populate(objectMap, "targetTierType", f.TargetTierType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FetchTieringCostInfoRequest. +func (f *FetchTieringCostInfoRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &f.ObjectType) + delete(rawMsg, key) + case "sourceTierType": + err = unpopulate(val, "SourceTierType", &f.SourceTierType) + delete(rawMsg, key) + case "targetTierType": + err = unpopulate(val, "TargetTierType", &f.TargetTierType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FetchTieringCostSavingsInfoForPolicyRequest. +func (f FetchTieringCostSavingsInfoForPolicyRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "FetchTieringCostSavingsInfoForPolicyRequest" + populate(objectMap, "policyName", f.PolicyName) + populate(objectMap, "sourceTierType", f.SourceTierType) + populate(objectMap, "targetTierType", f.TargetTierType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FetchTieringCostSavingsInfoForPolicyRequest. +func (f *FetchTieringCostSavingsInfoForPolicyRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &f.ObjectType) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &f.PolicyName) + delete(rawMsg, key) + case "sourceTierType": + err = unpopulate(val, "SourceTierType", &f.SourceTierType) + delete(rawMsg, key) + case "targetTierType": + err = unpopulate(val, "TargetTierType", &f.TargetTierType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FetchTieringCostSavingsInfoForProtectedItemRequest. +func (f FetchTieringCostSavingsInfoForProtectedItemRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerName", f.ContainerName) + objectMap["objectType"] = "FetchTieringCostSavingsInfoForProtectedItemRequest" + populate(objectMap, "protectedItemName", f.ProtectedItemName) + populate(objectMap, "sourceTierType", f.SourceTierType) + populate(objectMap, "targetTierType", f.TargetTierType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FetchTieringCostSavingsInfoForProtectedItemRequest. +func (f *FetchTieringCostSavingsInfoForProtectedItemRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &f.ContainerName) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &f.ObjectType) + delete(rawMsg, key) + case "protectedItemName": + err = unpopulate(val, "ProtectedItemName", &f.ProtectedItemName) + delete(rawMsg, key) + case "sourceTierType": + err = unpopulate(val, "SourceTierType", &f.SourceTierType) + delete(rawMsg, key) + case "targetTierType": + err = unpopulate(val, "TargetTierType", &f.TargetTierType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FetchTieringCostSavingsInfoForVaultRequest. +func (f FetchTieringCostSavingsInfoForVaultRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "FetchTieringCostSavingsInfoForVaultRequest" + populate(objectMap, "sourceTierType", f.SourceTierType) + populate(objectMap, "targetTierType", f.TargetTierType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FetchTieringCostSavingsInfoForVaultRequest. +func (f *FetchTieringCostSavingsInfoForVaultRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &f.ObjectType) + delete(rawMsg, key) + case "sourceTierType": + err = unpopulate(val, "SourceTierType", &f.SourceTierType) + delete(rawMsg, key) + case "targetTierType": + err = unpopulate(val, "TargetTierType", &f.TargetTierType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GenericContainer. +func (g GenericContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", g.BackupManagementType) + objectMap["containerType"] = ProtectableContainerTypeGenericContainer + populate(objectMap, "extendedInformation", g.ExtendedInformation) + populate(objectMap, "fabricName", g.FabricName) + populate(objectMap, "friendlyName", g.FriendlyName) + populate(objectMap, "healthStatus", g.HealthStatus) + populate(objectMap, "protectableObjectType", g.ProtectableObjectType) + populate(objectMap, "registrationStatus", g.RegistrationStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GenericContainer. +func (g *GenericContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &g.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &g.ContainerType) + delete(rawMsg, key) + case "extendedInformation": + err = unpopulate(val, "ExtendedInformation", &g.ExtendedInformation) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &g.FabricName) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &g.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &g.HealthStatus) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &g.ProtectableObjectType) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &g.RegistrationStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GenericContainerExtendedInfo. +func (g GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerIdentityInfo", g.ContainerIdentityInfo) + populate(objectMap, "rawCertData", g.RawCertData) + populate(objectMap, "serviceEndpoints", g.ServiceEndpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GenericContainerExtendedInfo. +func (g *GenericContainerExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerIdentityInfo": + err = unpopulate(val, "ContainerIdentityInfo", &g.ContainerIdentityInfo) + delete(rawMsg, key) + case "rawCertData": + err = unpopulate(val, "RawCertData", &g.RawCertData) + delete(rawMsg, key) + case "serviceEndpoints": + err = unpopulate(val, "ServiceEndpoints", &g.ServiceEndpoints) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GenericProtectedItem. +func (g GenericProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", g.BackupManagementType) + populate(objectMap, "backupSetName", g.BackupSetName) + populate(objectMap, "containerName", g.ContainerName) + populate(objectMap, "createMode", g.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", g.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", g.DeferredDeleteTimeRemaining) + populate(objectMap, "fabricName", g.FabricName) + populate(objectMap, "friendlyName", g.FriendlyName) + populate(objectMap, "isArchiveEnabled", g.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", g.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", g.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", g.IsScheduledForDeferredDelete) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", g.LastRecoveryPoint) + populate(objectMap, "policyId", g.PolicyID) + populate(objectMap, "policyName", g.PolicyName) + populate(objectMap, "policyState", g.PolicyState) + populate(objectMap, "protectedItemId", g.ProtectedItemID) + objectMap["protectedItemType"] = "GenericProtectedItem" + populate(objectMap, "protectionState", g.ProtectionState) + populate(objectMap, "resourceGuardOperationRequests", g.ResourceGuardOperationRequests) + populate(objectMap, "softDeleteRetentionPeriodInDays", g.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceAssociations", g.SourceAssociations) + populate(objectMap, "sourceResourceId", g.SourceResourceID) + populate(objectMap, "vaultId", g.VaultID) + populate(objectMap, "workloadType", g.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GenericProtectedItem. +func (g *GenericProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &g.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &g.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &g.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &g.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &g.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &g.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &g.FabricName) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &g.FriendlyName) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &g.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &g.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &g.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &g.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &g.LastRecoveryPoint) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &g.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &g.PolicyName) + delete(rawMsg, key) + case "policyState": + err = unpopulate(val, "PolicyState", &g.PolicyState) + delete(rawMsg, key) + case "protectedItemId": + err = unpopulate(val, "ProtectedItemID", &g.ProtectedItemID) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &g.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &g.ProtectionState) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &g.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &g.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceAssociations": + err = unpopulate(val, "SourceAssociations", &g.SourceAssociations) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &g.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &g.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &g.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GenericProtectionPolicy. +func (g GenericProtectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["backupManagementType"] = "GenericProtectionPolicy" + populate(objectMap, "fabricName", g.FabricName) + populate(objectMap, "protectedItemsCount", g.ProtectedItemsCount) + populate(objectMap, "resourceGuardOperationRequests", g.ResourceGuardOperationRequests) + populate(objectMap, "subProtectionPolicy", g.SubProtectionPolicy) + populate(objectMap, "timeZone", g.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GenericProtectionPolicy. +func (g *GenericProtectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &g.BackupManagementType) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &g.FabricName) + delete(rawMsg, key) + case "protectedItemsCount": + err = unpopulate(val, "ProtectedItemsCount", &g.ProtectedItemsCount) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &g.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "subProtectionPolicy": + err = unpopulate(val, "SubProtectionPolicy", &g.SubProtectionPolicy) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &g.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GenericRecoveryPoint. +func (g GenericRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "friendlyName", g.FriendlyName) + objectMap["objectType"] = "GenericRecoveryPoint" + populate(objectMap, "recoveryPointAdditionalInfo", g.RecoveryPointAdditionalInfo) + populate(objectMap, "recoveryPointProperties", g.RecoveryPointProperties) + populateDateTimeRFC3339(objectMap, "recoveryPointTime", g.RecoveryPointTime) + populate(objectMap, "recoveryPointType", g.RecoveryPointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GenericRecoveryPoint. +func (g *GenericRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "friendlyName": + err = unpopulate(val, "FriendlyName", &g.FriendlyName) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &g.ObjectType) + delete(rawMsg, key) + case "recoveryPointAdditionalInfo": + err = unpopulate(val, "RecoveryPointAdditionalInfo", &g.RecoveryPointAdditionalInfo) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &g.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointTime": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTime", &g.RecoveryPointTime) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &g.RecoveryPointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GetProtectedItemQueryObject. +func (g GetProtectedItemQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expand", g.Expand) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetProtectedItemQueryObject. +func (g *GetProtectedItemQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expand": + err = unpopulate(val, "Expand", &g.Expand) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HourlySchedule. +func (h HourlySchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "interval", h.Interval) + populate(objectMap, "scheduleWindowDuration", h.ScheduleWindowDuration) + populateDateTimeRFC3339(objectMap, "scheduleWindowStartTime", h.ScheduleWindowStartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HourlySchedule. +func (h *HourlySchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "interval": + err = unpopulate(val, "Interval", &h.Interval) + delete(rawMsg, key) + case "scheduleWindowDuration": + err = unpopulate(val, "ScheduleWindowDuration", &h.ScheduleWindowDuration) + delete(rawMsg, key) + case "scheduleWindowStartTime": + err = unpopulateDateTimeRFC3339(val, "ScheduleWindowStartTime", &h.ScheduleWindowStartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ILRRequest. +func (i ILRRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = i.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ILRRequest. +func (i *ILRRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ILRRequestResource. +func (i ILRRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", i.ETag) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ILRRequestResource. +func (i *ILRRequestResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &i.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + i.Properties, err = unmarshalILRRequestClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IaaSVMContainer. +func (i IaaSVMContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", i.BackupManagementType) + objectMap["containerType"] = ProtectableContainerTypeIaasVMContainer + populate(objectMap, "friendlyName", i.FriendlyName) + populate(objectMap, "healthStatus", i.HealthStatus) + populate(objectMap, "protectableObjectType", i.ProtectableObjectType) + populate(objectMap, "registrationStatus", i.RegistrationStatus) + populate(objectMap, "resourceGroup", i.ResourceGroup) + populate(objectMap, "virtualMachineId", i.VirtualMachineID) + populate(objectMap, "virtualMachineVersion", i.VirtualMachineVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IaaSVMContainer. +func (i *IaaSVMContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &i.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &i.ContainerType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &i.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &i.HealthStatus) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &i.ProtectableObjectType) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &i.RegistrationStatus) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &i.ResourceGroup) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &i.VirtualMachineID) + delete(rawMsg, key) + case "virtualMachineVersion": + err = unpopulate(val, "VirtualMachineVersion", &i.VirtualMachineVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IaaSVMProtectableItem. +func (i IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", i.BackupManagementType) + populate(objectMap, "friendlyName", i.FriendlyName) + objectMap["protectableItemType"] = "IaaSVMProtectableItem" + populate(objectMap, "protectionState", i.ProtectionState) + populate(objectMap, "resourceGroup", i.ResourceGroup) + populate(objectMap, "virtualMachineId", i.VirtualMachineID) + populate(objectMap, "virtualMachineVersion", i.VirtualMachineVersion) + populate(objectMap, "workloadType", i.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IaaSVMProtectableItem. +func (i *IaaSVMProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &i.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &i.FriendlyName) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &i.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &i.ProtectionState) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &i.ResourceGroup) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &i.VirtualMachineID) + delete(rawMsg, key) + case "virtualMachineVersion": + err = unpopulate(val, "VirtualMachineVersion", &i.VirtualMachineVersion) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &i.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IaasVMBackupRequest. +func (i IaasVMBackupRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "IaasVMBackupRequest" + populateDateTimeRFC3339(objectMap, "recoveryPointExpiryTimeInUTC", i.RecoveryPointExpiryTimeInUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IaasVMBackupRequest. +func (i *IaasVMBackupRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + case "recoveryPointExpiryTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointExpiryTimeInUTC", &i.RecoveryPointExpiryTimeInUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IaasVMILRRegistrationRequest. +func (i IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "initiatorName", i.InitiatorName) + objectMap["objectType"] = "IaasVMILRRegistrationRequest" + populate(objectMap, "recoveryPointId", i.RecoveryPointID) + populate(objectMap, "renewExistingRegistration", i.RenewExistingRegistration) + populate(objectMap, "virtualMachineId", i.VirtualMachineID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IaasVMILRRegistrationRequest. +func (i *IaasVMILRRegistrationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "initiatorName": + err = unpopulate(val, "InitiatorName", &i.InitiatorName) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) + delete(rawMsg, key) + case "renewExistingRegistration": + err = unpopulate(val, "RenewExistingRegistration", &i.RenewExistingRegistration) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &i.VirtualMachineID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IaasVMRecoveryPoint. +func (i IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedLocation", i.ExtendedLocation) + populate(objectMap, "isInstantIlrSessionActive", i.IsInstantIlrSessionActive) + populate(objectMap, "isManagedVirtualMachine", i.IsManagedVirtualMachine) + populate(objectMap, "isPrivateAccessEnabledOnAnyDisk", i.IsPrivateAccessEnabledOnAnyDisk) + populate(objectMap, "isSourceVMEncrypted", i.IsSourceVMEncrypted) + populate(objectMap, "keyAndSecret", i.KeyAndSecret) + populate(objectMap, "osType", i.OSType) + objectMap["objectType"] = "IaasVMRecoveryPoint" + populate(objectMap, "originalStorageAccountOption", i.OriginalStorageAccountOption) + populate(objectMap, "recoveryPointAdditionalInfo", i.RecoveryPointAdditionalInfo) + populate(objectMap, "recoveryPointDiskConfiguration", i.RecoveryPointDiskConfiguration) + populate(objectMap, "recoveryPointMoveReadinessInfo", i.RecoveryPointMoveReadinessInfo) + populate(objectMap, "recoveryPointProperties", i.RecoveryPointProperties) + populate(objectMap, "recoveryPointTierDetails", i.RecoveryPointTierDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTime", i.RecoveryPointTime) + populate(objectMap, "recoveryPointType", i.RecoveryPointType) + populate(objectMap, "securityType", i.SecurityType) + populate(objectMap, "sourceVMStorageType", i.SourceVMStorageType) + populate(objectMap, "virtualMachineSize", i.VirtualMachineSize) + populate(objectMap, "zones", i.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IaasVMRecoveryPoint. +func (i *IaasVMRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &i.ExtendedLocation) + delete(rawMsg, key) + case "isInstantIlrSessionActive": + err = unpopulate(val, "IsInstantIlrSessionActive", &i.IsInstantIlrSessionActive) + delete(rawMsg, key) + case "isManagedVirtualMachine": + err = unpopulate(val, "IsManagedVirtualMachine", &i.IsManagedVirtualMachine) + delete(rawMsg, key) + case "isPrivateAccessEnabledOnAnyDisk": + err = unpopulate(val, "IsPrivateAccessEnabledOnAnyDisk", &i.IsPrivateAccessEnabledOnAnyDisk) + delete(rawMsg, key) + case "isSourceVMEncrypted": + err = unpopulate(val, "IsSourceVMEncrypted", &i.IsSourceVMEncrypted) + delete(rawMsg, key) + case "keyAndSecret": + err = unpopulate(val, "KeyAndSecret", &i.KeyAndSecret) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &i.OSType) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + case "originalStorageAccountOption": + err = unpopulate(val, "OriginalStorageAccountOption", &i.OriginalStorageAccountOption) + delete(rawMsg, key) + case "recoveryPointAdditionalInfo": + err = unpopulate(val, "RecoveryPointAdditionalInfo", &i.RecoveryPointAdditionalInfo) + delete(rawMsg, key) + case "recoveryPointDiskConfiguration": + err = unpopulate(val, "RecoveryPointDiskConfiguration", &i.RecoveryPointDiskConfiguration) + delete(rawMsg, key) + case "recoveryPointMoveReadinessInfo": + err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &i.RecoveryPointMoveReadinessInfo) + delete(rawMsg, key) + case "recoveryPointProperties": + err = unpopulate(val, "RecoveryPointProperties", &i.RecoveryPointProperties) + delete(rawMsg, key) + case "recoveryPointTierDetails": + err = unpopulate(val, "RecoveryPointTierDetails", &i.RecoveryPointTierDetails) + delete(rawMsg, key) + case "recoveryPointTime": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTime", &i.RecoveryPointTime) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &i.RecoveryPointType) + delete(rawMsg, key) + case "securityType": + err = unpopulate(val, "SecurityType", &i.SecurityType) + delete(rawMsg, key) + case "sourceVMStorageType": + err = unpopulate(val, "SourceVMStorageType", &i.SourceVMStorageType) + delete(rawMsg, key) + case "virtualMachineSize": + err = unpopulate(val, "VirtualMachineSize", &i.VirtualMachineSize) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &i.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IaasVMRestoreRequest. +func (i IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affinityGroup", i.AffinityGroup) + populate(objectMap, "createNewCloudService", i.CreateNewCloudService) + populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) + populate(objectMap, "encryptionDetails", i.EncryptionDetails) + populate(objectMap, "extendedLocation", i.ExtendedLocation) + populate(objectMap, "identityBasedRestoreDetails", i.IdentityBasedRestoreDetails) + populate(objectMap, "identityInfo", i.IdentityInfo) + objectMap["objectType"] = "IaasVMRestoreRequest" + populate(objectMap, "originalStorageAccountOption", i.OriginalStorageAccountOption) + populate(objectMap, "recoveryPointId", i.RecoveryPointID) + populate(objectMap, "recoveryType", i.RecoveryType) + populate(objectMap, "region", i.Region) + populate(objectMap, "resourceGuardOperationRequests", i.ResourceGuardOperationRequests) + populate(objectMap, "restoreDiskLunList", i.RestoreDiskLunList) + populate(objectMap, "restoreWithManagedDisks", i.RestoreWithManagedDisks) + populate(objectMap, "securedVMDetails", i.SecuredVMDetails) + populate(objectMap, "sourceResourceId", i.SourceResourceID) + populate(objectMap, "storageAccountId", i.StorageAccountID) + populate(objectMap, "subnetId", i.SubnetID) + populate(objectMap, "targetDiskNetworkAccessSettings", i.TargetDiskNetworkAccessSettings) + populate(objectMap, "targetDomainNameId", i.TargetDomainNameID) + populate(objectMap, "targetResourceGroupId", i.TargetResourceGroupID) + populate(objectMap, "targetVirtualMachineId", i.TargetVirtualMachineID) + populate(objectMap, "virtualNetworkId", i.VirtualNetworkID) + populate(objectMap, "zones", i.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IaasVMRestoreRequest. +func (i *IaasVMRestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affinityGroup": + err = unpopulate(val, "AffinityGroup", &i.AffinityGroup) + delete(rawMsg, key) + case "createNewCloudService": + err = unpopulate(val, "CreateNewCloudService", &i.CreateNewCloudService) + delete(rawMsg, key) + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) + delete(rawMsg, key) + case "encryptionDetails": + err = unpopulate(val, "EncryptionDetails", &i.EncryptionDetails) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &i.ExtendedLocation) + delete(rawMsg, key) + case "identityBasedRestoreDetails": + err = unpopulate(val, "IdentityBasedRestoreDetails", &i.IdentityBasedRestoreDetails) + delete(rawMsg, key) + case "identityInfo": + err = unpopulate(val, "IdentityInfo", &i.IdentityInfo) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + case "originalStorageAccountOption": + err = unpopulate(val, "OriginalStorageAccountOption", &i.OriginalStorageAccountOption) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &i.RecoveryType) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &i.Region) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &i.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "restoreDiskLunList": + err = unpopulate(val, "RestoreDiskLunList", &i.RestoreDiskLunList) + delete(rawMsg, key) + case "restoreWithManagedDisks": + err = unpopulate(val, "RestoreWithManagedDisks", &i.RestoreWithManagedDisks) + delete(rawMsg, key) + case "securedVMDetails": + err = unpopulate(val, "SecuredVMDetails", &i.SecuredVMDetails) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &i.SourceResourceID) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &i.StorageAccountID) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &i.SubnetID) + delete(rawMsg, key) + case "targetDiskNetworkAccessSettings": + err = unpopulate(val, "TargetDiskNetworkAccessSettings", &i.TargetDiskNetworkAccessSettings) + delete(rawMsg, key) + case "targetDomainNameId": + err = unpopulate(val, "TargetDomainNameID", &i.TargetDomainNameID) + delete(rawMsg, key) + case "targetResourceGroupId": + err = unpopulate(val, "TargetResourceGroupID", &i.TargetResourceGroupID) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &i.TargetVirtualMachineID) + delete(rawMsg, key) + case "virtualNetworkId": + err = unpopulate(val, "VirtualNetworkID", &i.VirtualNetworkID) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &i.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IaasVMRestoreWithRehydrationRequest. +func (i IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affinityGroup", i.AffinityGroup) + populate(objectMap, "createNewCloudService", i.CreateNewCloudService) + populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) + populate(objectMap, "encryptionDetails", i.EncryptionDetails) + populate(objectMap, "extendedLocation", i.ExtendedLocation) + populate(objectMap, "identityBasedRestoreDetails", i.IdentityBasedRestoreDetails) + populate(objectMap, "identityInfo", i.IdentityInfo) + objectMap["objectType"] = "IaasVMRestoreWithRehydrationRequest" + populate(objectMap, "originalStorageAccountOption", i.OriginalStorageAccountOption) + populate(objectMap, "recoveryPointId", i.RecoveryPointID) + populate(objectMap, "recoveryPointRehydrationInfo", i.RecoveryPointRehydrationInfo) + populate(objectMap, "recoveryType", i.RecoveryType) + populate(objectMap, "region", i.Region) + populate(objectMap, "resourceGuardOperationRequests", i.ResourceGuardOperationRequests) + populate(objectMap, "restoreDiskLunList", i.RestoreDiskLunList) + populate(objectMap, "restoreWithManagedDisks", i.RestoreWithManagedDisks) + populate(objectMap, "securedVMDetails", i.SecuredVMDetails) + populate(objectMap, "sourceResourceId", i.SourceResourceID) + populate(objectMap, "storageAccountId", i.StorageAccountID) + populate(objectMap, "subnetId", i.SubnetID) + populate(objectMap, "targetDiskNetworkAccessSettings", i.TargetDiskNetworkAccessSettings) + populate(objectMap, "targetDomainNameId", i.TargetDomainNameID) + populate(objectMap, "targetResourceGroupId", i.TargetResourceGroupID) + populate(objectMap, "targetVirtualMachineId", i.TargetVirtualMachineID) + populate(objectMap, "virtualNetworkId", i.VirtualNetworkID) + populate(objectMap, "zones", i.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IaasVMRestoreWithRehydrationRequest. +func (i *IaasVMRestoreWithRehydrationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affinityGroup": + err = unpopulate(val, "AffinityGroup", &i.AffinityGroup) + delete(rawMsg, key) + case "createNewCloudService": + err = unpopulate(val, "CreateNewCloudService", &i.CreateNewCloudService) + delete(rawMsg, key) + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) + delete(rawMsg, key) + case "encryptionDetails": + err = unpopulate(val, "EncryptionDetails", &i.EncryptionDetails) + delete(rawMsg, key) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &i.ExtendedLocation) + delete(rawMsg, key) + case "identityBasedRestoreDetails": + err = unpopulate(val, "IdentityBasedRestoreDetails", &i.IdentityBasedRestoreDetails) + delete(rawMsg, key) + case "identityInfo": + err = unpopulate(val, "IdentityInfo", &i.IdentityInfo) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + case "originalStorageAccountOption": + err = unpopulate(val, "OriginalStorageAccountOption", &i.OriginalStorageAccountOption) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) + delete(rawMsg, key) + case "recoveryPointRehydrationInfo": + err = unpopulate(val, "RecoveryPointRehydrationInfo", &i.RecoveryPointRehydrationInfo) + delete(rawMsg, key) + case "recoveryType": + err = unpopulate(val, "RecoveryType", &i.RecoveryType) + delete(rawMsg, key) + case "region": + err = unpopulate(val, "Region", &i.Region) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &i.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "restoreDiskLunList": + err = unpopulate(val, "RestoreDiskLunList", &i.RestoreDiskLunList) + delete(rawMsg, key) + case "restoreWithManagedDisks": + err = unpopulate(val, "RestoreWithManagedDisks", &i.RestoreWithManagedDisks) + delete(rawMsg, key) + case "securedVMDetails": + err = unpopulate(val, "SecuredVMDetails", &i.SecuredVMDetails) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &i.SourceResourceID) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &i.StorageAccountID) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &i.SubnetID) + delete(rawMsg, key) + case "targetDiskNetworkAccessSettings": + err = unpopulate(val, "TargetDiskNetworkAccessSettings", &i.TargetDiskNetworkAccessSettings) + delete(rawMsg, key) + case "targetDomainNameId": + err = unpopulate(val, "TargetDomainNameID", &i.TargetDomainNameID) + delete(rawMsg, key) + case "targetResourceGroupId": + err = unpopulate(val, "TargetResourceGroupID", &i.TargetResourceGroupID) + delete(rawMsg, key) + case "targetVirtualMachineId": + err = unpopulate(val, "TargetVirtualMachineID", &i.TargetVirtualMachineID) + delete(rawMsg, key) + case "virtualNetworkId": + err = unpopulate(val, "VirtualNetworkID", &i.VirtualNetworkID) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &i.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityBasedRestoreDetails. +func (i IdentityBasedRestoreDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "objectType", i.ObjectType) + populate(objectMap, "targetStorageAccountId", i.TargetStorageAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityBasedRestoreDetails. +func (i *IdentityBasedRestoreDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &i.ObjectType) + delete(rawMsg, key) + case "targetStorageAccountId": + err = unpopulate(val, "TargetStorageAccountID", &i.TargetStorageAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityInfo. +func (i IdentityInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isSystemAssignedIdentity", i.IsSystemAssignedIdentity) + populate(objectMap, "managedIdentityResourceId", i.ManagedIdentityResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityInfo. +func (i *IdentityInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isSystemAssignedIdentity": + err = unpopulate(val, "IsSystemAssignedIdentity", &i.IsSystemAssignedIdentity) + delete(rawMsg, key) + case "managedIdentityResourceId": + err = unpopulate(val, "ManagedIdentityResourceID", &i.ManagedIdentityResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InquiryInfo. +func (i InquiryInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorDetail", i.ErrorDetail) + populate(objectMap, "inquiryDetails", i.InquiryDetails) + populate(objectMap, "status", i.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InquiryInfo. +func (i *InquiryInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorDetail": + err = unpopulate(val, "ErrorDetail", &i.ErrorDetail) + delete(rawMsg, key) + case "inquiryDetails": + err = unpopulate(val, "InquiryDetails", &i.InquiryDetails) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InquiryValidation. +func (i InquiryValidation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalDetail", i.AdditionalDetail) + populate(objectMap, "errorDetail", i.ErrorDetail) + populateAny(objectMap, "protectableItemCount", i.ProtectableItemCount) + populate(objectMap, "status", i.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InquiryValidation. +func (i *InquiryValidation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalDetail": + err = unpopulate(val, "AdditionalDetail", &i.AdditionalDetail) + delete(rawMsg, key) + case "errorDetail": + err = unpopulate(val, "ErrorDetail", &i.ErrorDetail) + delete(rawMsg, key) + case "protectableItemCount": + err = unpopulate(val, "ProtectableItemCount", &i.ProtectableItemCount) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstantItemRecoveryTarget. +func (i InstantItemRecoveryTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientScripts", i.ClientScripts) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstantItemRecoveryTarget. +func (i *InstantItemRecoveryTarget) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientScripts": + err = unpopulate(val, "ClientScripts", &i.ClientScripts) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstantRPAdditionalDetails. +func (i InstantRPAdditionalDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureBackupRGNamePrefix", i.AzureBackupRGNamePrefix) + populate(objectMap, "azureBackupRGNameSuffix", i.AzureBackupRGNameSuffix) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstantRPAdditionalDetails. +func (i *InstantRPAdditionalDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureBackupRGNamePrefix": + err = unpopulate(val, "AzureBackupRGNamePrefix", &i.AzureBackupRGNamePrefix) + delete(rawMsg, key) + case "azureBackupRGNameSuffix": + err = unpopulate(val, "AzureBackupRGNameSuffix", &i.AzureBackupRGNameSuffix) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Job. +func (j Job) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activityId", j.ActivityID) + populate(objectMap, "backupManagementType", j.BackupManagementType) + populateDateTimeRFC3339(objectMap, "endTime", j.EndTime) + populate(objectMap, "entityFriendlyName", j.EntityFriendlyName) + objectMap["jobType"] = j.JobType + populate(objectMap, "operation", j.Operation) + populateDateTimeRFC3339(objectMap, "startTime", j.StartTime) + populate(objectMap, "status", j.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Job. +func (j *Job) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activityId": + err = unpopulate(val, "ActivityID", &j.ActivityID) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &j.BackupManagementType) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &j.EndTime) + delete(rawMsg, key) + case "entityFriendlyName": + err = unpopulate(val, "EntityFriendlyName", &j.EntityFriendlyName) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &j.JobType) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &j.Operation) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &j.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &j.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobQueryObject. +func (j JobQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", j.BackupManagementType) + populateDateTimeRFC3339(objectMap, "endTime", j.EndTime) + populate(objectMap, "jobId", j.JobID) + populate(objectMap, "operation", j.Operation) + populateDateTimeRFC3339(objectMap, "startTime", j.StartTime) + populate(objectMap, "status", j.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobQueryObject. +func (j *JobQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &j.BackupManagementType) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &j.EndTime) + delete(rawMsg, key) + case "jobId": + err = unpopulate(val, "JobID", &j.JobID) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &j.Operation) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &j.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &j.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobResource. +func (j JobResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", j.ETag) + populate(objectMap, "id", j.ID) + populate(objectMap, "location", j.Location) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "tags", j.Tags) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobResource. +func (j *JobResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &j.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &j.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + j.Properties, err = unmarshalJobClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &j.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobResourceList. +func (j JobResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobResourceList. +func (j *JobResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KEKDetails. +func (k KEKDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyBackupData", k.KeyBackupData) + populate(objectMap, "keyUrl", k.KeyURL) + populate(objectMap, "keyVaultId", k.KeyVaultID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KEKDetails. +func (k *KEKDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyBackupData": + err = unpopulate(val, "KeyBackupData", &k.KeyBackupData) + delete(rawMsg, key) + case "keyUrl": + err = unpopulate(val, "KeyURL", &k.KeyURL) + delete(rawMsg, key) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &k.KeyVaultID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KPIResourceHealthDetails. +func (k KPIResourceHealthDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceHealthDetails", k.ResourceHealthDetails) + populate(objectMap, "resourceHealthStatus", k.ResourceHealthStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KPIResourceHealthDetails. +func (k *KPIResourceHealthDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceHealthDetails": + err = unpopulate(val, "ResourceHealthDetails", &k.ResourceHealthDetails) + delete(rawMsg, key) + case "resourceHealthStatus": + err = unpopulate(val, "ResourceHealthStatus", &k.ResourceHealthStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyAndSecretDetails. +func (k KeyAndSecretDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bekDetails", k.BekDetails) + populate(objectMap, "encryptionMechanism", k.EncryptionMechanism) + populate(objectMap, "kekDetails", k.KekDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyAndSecretDetails. +func (k *KeyAndSecretDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bekDetails": + err = unpopulate(val, "BekDetails", &k.BekDetails) + delete(rawMsg, key) + case "encryptionMechanism": + err = unpopulate(val, "EncryptionMechanism", &k.EncryptionMechanism) + delete(rawMsg, key) + case "kekDetails": + err = unpopulate(val, "KekDetails", &k.KekDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListRecoveryPointsRecommendedForMoveRequest. +func (l ListRecoveryPointsRecommendedForMoveRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "excludedRPList", l.ExcludedRPList) + populate(objectMap, "objectType", l.ObjectType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListRecoveryPointsRecommendedForMoveRequest. +func (l *ListRecoveryPointsRecommendedForMoveRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "excludedRPList": + err = unpopulate(val, "ExcludedRPList", &l.ExcludedRPList) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &l.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSchedulePolicy. +func (l LogSchedulePolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "scheduleFrequencyInMins", l.ScheduleFrequencyInMins) + objectMap["schedulePolicyType"] = "LogSchedulePolicy" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSchedulePolicy. +func (l *LogSchedulePolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scheduleFrequencyInMins": + err = unpopulate(val, "ScheduleFrequencyInMins", &l.ScheduleFrequencyInMins) + delete(rawMsg, key) + case "schedulePolicyType": + err = unpopulate(val, "SchedulePolicyType", &l.SchedulePolicyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LongTermRetentionPolicy. +func (l LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dailySchedule", l.DailySchedule) + populate(objectMap, "monthlySchedule", l.MonthlySchedule) + objectMap["retentionPolicyType"] = "LongTermRetentionPolicy" + populate(objectMap, "weeklySchedule", l.WeeklySchedule) + populate(objectMap, "yearlySchedule", l.YearlySchedule) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionPolicy. +func (l *LongTermRetentionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dailySchedule": + err = unpopulate(val, "DailySchedule", &l.DailySchedule) + delete(rawMsg, key) + case "monthlySchedule": + err = unpopulate(val, "MonthlySchedule", &l.MonthlySchedule) + delete(rawMsg, key) + case "retentionPolicyType": + err = unpopulate(val, "RetentionPolicyType", &l.RetentionPolicyType) + delete(rawMsg, key) + case "weeklySchedule": + err = unpopulate(val, "WeeklySchedule", &l.WeeklySchedule) + delete(rawMsg, key) + case "yearlySchedule": + err = unpopulate(val, "YearlySchedule", &l.YearlySchedule) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LongTermSchedulePolicy. +func (l LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["schedulePolicyType"] = "LongTermSchedulePolicy" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermSchedulePolicy. +func (l *LongTermSchedulePolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "schedulePolicyType": + err = unpopulate(val, "SchedulePolicyType", &l.SchedulePolicyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MABContainerHealthDetails. +func (m MABContainerHealthDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", m.Code) + populate(objectMap, "message", m.Message) + populate(objectMap, "recommendations", m.Recommendations) + populate(objectMap, "title", m.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MABContainerHealthDetails. +func (m *MABContainerHealthDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &m.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &m.Message) + delete(rawMsg, key) + case "recommendations": + err = unpopulate(val, "Recommendations", &m.Recommendations) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &m.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MabContainer. +func (m MabContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentVersion", m.AgentVersion) + populate(objectMap, "backupManagementType", m.BackupManagementType) + populate(objectMap, "canReRegister", m.CanReRegister) + populate(objectMap, "containerHealthState", m.ContainerHealthState) + populate(objectMap, "containerId", m.ContainerID) + objectMap["containerType"] = ProtectableContainerTypeWindows + populate(objectMap, "extendedInfo", m.ExtendedInfo) + populate(objectMap, "friendlyName", m.FriendlyName) + populate(objectMap, "healthStatus", m.HealthStatus) + populate(objectMap, "mabContainerHealthDetails", m.MabContainerHealthDetails) + populate(objectMap, "protectableObjectType", m.ProtectableObjectType) + populate(objectMap, "protectedItemCount", m.ProtectedItemCount) + populate(objectMap, "registrationStatus", m.RegistrationStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MabContainer. +func (m *MabContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentVersion": + err = unpopulate(val, "AgentVersion", &m.AgentVersion) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &m.BackupManagementType) + delete(rawMsg, key) + case "canReRegister": + err = unpopulate(val, "CanReRegister", &m.CanReRegister) + delete(rawMsg, key) + case "containerHealthState": + err = unpopulate(val, "ContainerHealthState", &m.ContainerHealthState) + delete(rawMsg, key) + case "containerId": + err = unpopulate(val, "ContainerID", &m.ContainerID) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &m.ContainerType) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &m.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &m.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &m.HealthStatus) + delete(rawMsg, key) + case "mabContainerHealthDetails": + err = unpopulate(val, "MabContainerHealthDetails", &m.MabContainerHealthDetails) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &m.ProtectableObjectType) + delete(rawMsg, key) + case "protectedItemCount": + err = unpopulate(val, "ProtectedItemCount", &m.ProtectedItemCount) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &m.RegistrationStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MabContainerExtendedInfo. +func (m MabContainerExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupItemType", m.BackupItemType) + populate(objectMap, "backupItems", m.BackupItems) + populate(objectMap, "lastBackupStatus", m.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastRefreshedAt", m.LastRefreshedAt) + populate(objectMap, "policyName", m.PolicyName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MabContainerExtendedInfo. +func (m *MabContainerExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupItemType": + err = unpopulate(val, "BackupItemType", &m.BackupItemType) + delete(rawMsg, key) + case "backupItems": + err = unpopulate(val, "BackupItems", &m.BackupItems) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &m.LastBackupStatus) + delete(rawMsg, key) + case "lastRefreshedAt": + err = unpopulateDateTimeRFC3339(val, "LastRefreshedAt", &m.LastRefreshedAt) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &m.PolicyName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MabErrorInfo. +func (m MabErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorString", m.ErrorString) + populate(objectMap, "recommendations", m.Recommendations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MabErrorInfo. +func (m *MabErrorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorString": + err = unpopulate(val, "ErrorString", &m.ErrorString) + delete(rawMsg, key) + case "recommendations": + err = unpopulate(val, "Recommendations", &m.Recommendations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MabFileFolderProtectedItem. +func (m MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", m.BackupManagementType) + populate(objectMap, "backupSetName", m.BackupSetName) + populate(objectMap, "computerName", m.ComputerName) + populate(objectMap, "containerName", m.ContainerName) + populate(objectMap, "createMode", m.CreateMode) + populate(objectMap, "deferredDeleteSyncTimeInUTC", m.DeferredDeleteSyncTimeInUTC) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", m.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", m.DeferredDeleteTimeRemaining) + populate(objectMap, "extendedInfo", m.ExtendedInfo) + populate(objectMap, "friendlyName", m.FriendlyName) + populate(objectMap, "isArchiveEnabled", m.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", m.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", m.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", m.IsScheduledForDeferredDelete) + populate(objectMap, "lastBackupStatus", m.LastBackupStatus) + populateDateTimeRFC3339(objectMap, "lastBackupTime", m.LastBackupTime) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", m.LastRecoveryPoint) + populate(objectMap, "policyId", m.PolicyID) + populate(objectMap, "policyName", m.PolicyName) + objectMap["protectedItemType"] = "MabFileFolderProtectedItem" + populate(objectMap, "protectionState", m.ProtectionState) + populate(objectMap, "resourceGuardOperationRequests", m.ResourceGuardOperationRequests) + populate(objectMap, "softDeleteRetentionPeriodInDays", m.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", m.SourceResourceID) + populate(objectMap, "vaultId", m.VaultID) + populate(objectMap, "workloadType", m.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MabFileFolderProtectedItem. +func (m *MabFileFolderProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &m.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &m.BackupSetName) + delete(rawMsg, key) + case "computerName": + err = unpopulate(val, "ComputerName", &m.ComputerName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &m.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &m.CreateMode) + delete(rawMsg, key) + case "deferredDeleteSyncTimeInUTC": + err = unpopulate(val, "DeferredDeleteSyncTimeInUTC", &m.DeferredDeleteSyncTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &m.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &m.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &m.ExtendedInfo) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &m.FriendlyName) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &m.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &m.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &m.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &m.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "lastBackupStatus": + err = unpopulate(val, "LastBackupStatus", &m.LastBackupStatus) + delete(rawMsg, key) + case "lastBackupTime": + err = unpopulateDateTimeRFC3339(val, "LastBackupTime", &m.LastBackupTime) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &m.LastRecoveryPoint) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &m.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &m.PolicyName) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &m.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &m.ProtectionState) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &m.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &m.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &m.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &m.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &m.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MabFileFolderProtectedItemExtendedInfo. +func (m MabFileFolderProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "lastRefreshedAt", m.LastRefreshedAt) + populateDateTimeRFC3339(objectMap, "oldestRecoveryPoint", m.OldestRecoveryPoint) + populate(objectMap, "recoveryPointCount", m.RecoveryPointCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MabFileFolderProtectedItemExtendedInfo. +func (m *MabFileFolderProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "lastRefreshedAt": + err = unpopulateDateTimeRFC3339(val, "LastRefreshedAt", &m.LastRefreshedAt) + delete(rawMsg, key) + case "oldestRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "OldestRecoveryPoint", &m.OldestRecoveryPoint) + delete(rawMsg, key) + case "recoveryPointCount": + err = unpopulate(val, "RecoveryPointCount", &m.RecoveryPointCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MabJob. +func (m MabJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsInfo", m.ActionsInfo) + populate(objectMap, "activityId", m.ActivityID) + populate(objectMap, "backupManagementType", m.BackupManagementType) + populate(objectMap, "duration", m.Duration) + populateDateTimeRFC3339(objectMap, "endTime", m.EndTime) + populate(objectMap, "entityFriendlyName", m.EntityFriendlyName) + populate(objectMap, "errorDetails", m.ErrorDetails) + populate(objectMap, "extendedInfo", m.ExtendedInfo) + objectMap["jobType"] = "MabJob" + populate(objectMap, "mabServerName", m.MabServerName) + populate(objectMap, "mabServerType", m.MabServerType) + populate(objectMap, "operation", m.Operation) + populateDateTimeRFC3339(objectMap, "startTime", m.StartTime) + populate(objectMap, "status", m.Status) + populate(objectMap, "workloadType", m.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MabJob. +func (m *MabJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsInfo": + err = unpopulate(val, "ActionsInfo", &m.ActionsInfo) + delete(rawMsg, key) + case "activityId": + err = unpopulate(val, "ActivityID", &m.ActivityID) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &m.BackupManagementType) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &m.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &m.EndTime) + delete(rawMsg, key) + case "entityFriendlyName": + err = unpopulate(val, "EntityFriendlyName", &m.EntityFriendlyName) + delete(rawMsg, key) + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &m.ErrorDetails) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &m.ExtendedInfo) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &m.JobType) + delete(rawMsg, key) + case "mabServerName": + err = unpopulate(val, "MabServerName", &m.MabServerName) + delete(rawMsg, key) + case "mabServerType": + err = unpopulate(val, "MabServerType", &m.MabServerType) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &m.Operation) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &m.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &m.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MabJobExtendedInfo. +func (m MabJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dynamicErrorMessage", m.DynamicErrorMessage) + populate(objectMap, "propertyBag", m.PropertyBag) + populate(objectMap, "tasksList", m.TasksList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MabJobExtendedInfo. +func (m *MabJobExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dynamicErrorMessage": + err = unpopulate(val, "DynamicErrorMessage", &m.DynamicErrorMessage) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &m.PropertyBag) + delete(rawMsg, key) + case "tasksList": + err = unpopulate(val, "TasksList", &m.TasksList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MabJobTaskDetails. +func (m MabJobTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "duration", m.Duration) + populateDateTimeRFC3339(objectMap, "endTime", m.EndTime) + populateDateTimeRFC3339(objectMap, "startTime", m.StartTime) + populate(objectMap, "status", m.Status) + populate(objectMap, "taskId", m.TaskID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MabJobTaskDetails. +func (m *MabJobTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "duration": + err = unpopulate(val, "Duration", &m.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &m.EndTime) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &m.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &m.TaskID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MabProtectionPolicy. +func (m MabProtectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["backupManagementType"] = "MAB" + populate(objectMap, "protectedItemsCount", m.ProtectedItemsCount) + populate(objectMap, "resourceGuardOperationRequests", m.ResourceGuardOperationRequests) + populate(objectMap, "retentionPolicy", m.RetentionPolicy) + populate(objectMap, "schedulePolicy", m.SchedulePolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MabProtectionPolicy. +func (m *MabProtectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &m.BackupManagementType) + delete(rawMsg, key) + case "protectedItemsCount": + err = unpopulate(val, "ProtectedItemsCount", &m.ProtectedItemsCount) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &m.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "retentionPolicy": + m.RetentionPolicy, err = unmarshalRetentionPolicyClassification(val) + delete(rawMsg, key) + case "schedulePolicy": + m.SchedulePolicy, err = unmarshalSchedulePolicyClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MonthlyRetentionSchedule. +func (m MonthlyRetentionSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "retentionDuration", m.RetentionDuration) + populate(objectMap, "retentionScheduleDaily", m.RetentionScheduleDaily) + populate(objectMap, "retentionScheduleFormatType", m.RetentionScheduleFormatType) + populate(objectMap, "retentionScheduleWeekly", m.RetentionScheduleWeekly) + aux := make([]*dateTimeRFC3339, len(m.RetentionTimes), len(m.RetentionTimes)) + for i := 0; i < len(m.RetentionTimes); i++ { + aux[i] = (*dateTimeRFC3339)(m.RetentionTimes[i]) + } + populate(objectMap, "retentionTimes", aux) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MonthlyRetentionSchedule. +func (m *MonthlyRetentionSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "retentionDuration": + err = unpopulate(val, "RetentionDuration", &m.RetentionDuration) + delete(rawMsg, key) + case "retentionScheduleDaily": + err = unpopulate(val, "RetentionScheduleDaily", &m.RetentionScheduleDaily) + delete(rawMsg, key) + case "retentionScheduleFormatType": + err = unpopulate(val, "RetentionScheduleFormatType", &m.RetentionScheduleFormatType) + delete(rawMsg, key) + case "retentionScheduleWeekly": + err = unpopulate(val, "RetentionScheduleWeekly", &m.RetentionScheduleWeekly) + delete(rawMsg, key) + case "retentionTimes": + var aux []*dateTimeRFC3339 + err = unpopulate(val, "RetentionTimes", &aux) + for _, au := range aux { + m.RetentionTimes = append(m.RetentionTimes, (*time.Time)(au)) + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MoveRPAcrossTiersRequest. +func (m MoveRPAcrossTiersRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "objectType", m.ObjectType) + populate(objectMap, "sourceTierType", m.SourceTierType) + populate(objectMap, "targetTierType", m.TargetTierType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MoveRPAcrossTiersRequest. +func (m *MoveRPAcrossTiersRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &m.ObjectType) + delete(rawMsg, key) + case "sourceTierType": + err = unpopulate(val, "SourceTierType", &m.SourceTierType) + delete(rawMsg, key) + case "targetTierType": + err = unpopulate(val, "TargetTierType", &m.TargetTierType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NameInfo. +func (n NameInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", n.LocalizedValue) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NameInfo. +func (n *NameInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &n.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NewErrorResponse. +func (n NewErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", n.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NewErrorResponse. +func (n *NewErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &n.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NewErrorResponseError. +func (n NewErrorResponseError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", n.AdditionalInfo) + populate(objectMap, "code", n.Code) + populate(objectMap, "details", n.Details) + populate(objectMap, "message", n.Message) + populate(objectMap, "target", n.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NewErrorResponseError. +func (n *NewErrorResponseError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &n.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &n.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &n.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &n.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &n.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultInfo. +func (o OperationResultInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobList", o.JobList) + objectMap["objectType"] = "OperationResultInfo" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultInfo. +func (o *OperationResultInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobList": + err = unpopulate(val, "JobList", &o.JobList) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &o.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultInfoBase. +func (o OperationResultInfoBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = o.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultInfoBase. +func (o *OperationResultInfoBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &o.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationResultInfoBaseResource. +func (o OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "headers", o.Headers) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "statusCode", o.StatusCode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultInfoBaseResource. +func (o *OperationResultInfoBaseResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "headers": + err = unpopulate(val, "Headers", &o.Headers) + delete(rawMsg, key) + case "operation": + o.Operation, err = unmarshalOperationResultInfoBaseClassification(val) + delete(rawMsg, key) + case "statusCode": + err = unpopulate(val, "StatusCode", &o.StatusCode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationStatus. +func (o OperationStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) + populate(objectMap, "error", o.Error) + populate(objectMap, "id", o.ID) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) + populate(objectMap, "status", o.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatus. +func (o *OperationStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &o.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + o.Properties, err = unmarshalOperationStatusExtendedInfoClassification(val) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &o.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationStatusError. +func (o OperationStatusError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", o.Code) + populate(objectMap, "message", o.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusError. +func (o *OperationStatusError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &o.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &o.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationStatusExtendedInfo. +func (o OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = o.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusExtendedInfo. +func (o *OperationStatusExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &o.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationStatusJobExtendedInfo. +func (o OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobId", o.JobID) + objectMap["objectType"] = "OperationStatusJobExtendedInfo" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusJobExtendedInfo. +func (o *OperationStatusJobExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobId": + err = unpopulate(val, "JobID", &o.JobID) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &o.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationStatusJobsExtendedInfo. +func (o OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failedJobsError", o.FailedJobsError) + populate(objectMap, "jobIds", o.JobIDs) + objectMap["objectType"] = "OperationStatusJobsExtendedInfo" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusJobsExtendedInfo. +func (o *OperationStatusJobsExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failedJobsError": + err = unpopulate(val, "FailedJobsError", &o.FailedJobsError) + delete(rawMsg, key) + case "jobIds": + err = unpopulate(val, "JobIDs", &o.JobIDs) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &o.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationStatusProvisionILRExtendedInfo. +func (o OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "OperationStatusProvisionILRExtendedInfo" + populate(objectMap, "recoveryTarget", o.RecoveryTarget) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusProvisionILRExtendedInfo. +func (o *OperationStatusProvisionILRExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &o.ObjectType) + delete(rawMsg, key) + case "recoveryTarget": + err = unpopulate(val, "RecoveryTarget", &o.RecoveryTarget) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationStatusValidateOperationExtendedInfo. +func (o OperationStatusValidateOperationExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "OperationStatusValidateOperationExtendedInfo" + populate(objectMap, "validateOperationResponse", o.ValidateOperationResponse) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusValidateOperationExtendedInfo. +func (o *OperationStatusValidateOperationExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &o.ObjectType) + delete(rawMsg, key) + case "validateOperationResponse": + err = unpopulate(val, "ValidateOperationResponse", &o.ValidateOperationResponse) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationWorkerResponse. +func (o OperationWorkerResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "headers", o.Headers) + populate(objectMap, "statusCode", o.StatusCode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationWorkerResponse. +func (o *OperationWorkerResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "headers": + err = unpopulate(val, "Headers", &o.Headers) + delete(rawMsg, key) + case "statusCode": + err = unpopulate(val, "StatusCode", &o.StatusCode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PointInTimeRange. +func (p PointInTimeRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "endTime", p.EndTime) + populateDateTimeRFC3339(objectMap, "startTime", p.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PointInTimeRange. +func (p *PointInTimeRange) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &p.EndTime) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &p.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PreBackupValidation. +func (p PreBackupValidation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", p.Code) + populate(objectMap, "message", p.Message) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PreBackupValidation. +func (p *PreBackupValidation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &p.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &p.Message) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PreValidateEnableBackupRequest. +func (p PreValidateEnableBackupRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "resourceId", p.ResourceID) + populate(objectMap, "resourceType", p.ResourceType) + populate(objectMap, "vaultId", p.VaultID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PreValidateEnableBackupRequest. +func (p *PreValidateEnableBackupRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &p.ResourceID) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &p.ResourceType) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &p.VaultID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PreValidateEnableBackupResponse. +func (p PreValidateEnableBackupResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerName", p.ContainerName) + populate(objectMap, "errorCode", p.ErrorCode) + populate(objectMap, "errorMessage", p.ErrorMessage) + populate(objectMap, "protectedItemName", p.ProtectedItemName) + populate(objectMap, "recommendation", p.Recommendation) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PreValidateEnableBackupResponse. +func (p *PreValidateEnableBackupResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &p.ContainerName) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &p.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &p.ErrorMessage) + delete(rawMsg, key) + case "protectedItemName": + err = unpopulate(val, "ProtectedItemName", &p.ProtectedItemName) + delete(rawMsg, key) + case "recommendation": + err = unpopulate(val, "Recommendation", &p.Recommendation) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrepareDataMoveRequest. +func (p PrepareDataMoveRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataMoveLevel", p.DataMoveLevel) + populate(objectMap, "ignoreMoved", p.IgnoreMoved) + populate(objectMap, "sourceContainerArmIds", p.SourceContainerArmIDs) + populate(objectMap, "targetRegion", p.TargetRegion) + populate(objectMap, "targetResourceId", p.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrepareDataMoveRequest. +func (p *PrepareDataMoveRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataMoveLevel": + err = unpopulate(val, "DataMoveLevel", &p.DataMoveLevel) + delete(rawMsg, key) + case "ignoreMoved": + err = unpopulate(val, "IgnoreMoved", &p.IgnoreMoved) + delete(rawMsg, key) + case "sourceContainerArmIds": + err = unpopulate(val, "SourceContainerArmIDs", &p.SourceContainerArmIDs) + delete(rawMsg, key) + case "targetRegion": + err = unpopulate(val, "TargetRegion", &p.TargetRegion) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &p.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrepareDataMoveResponse. +func (p PrepareDataMoveResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "correlationId", p.CorrelationID) + objectMap["objectType"] = "PrepareDataMoveResponse" + populate(objectMap, "sourceVaultProperties", p.SourceVaultProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrepareDataMoveResponse. +func (p *PrepareDataMoveResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "correlationId": + err = unpopulate(val, "CorrelationID", &p.CorrelationID) + delete(rawMsg, key) + case "objectType": + err = unpopulate(val, "ObjectType", &p.ObjectType) + delete(rawMsg, key) + case "sourceVaultProperties": + err = unpopulate(val, "SourceVaultProperties", &p.SourceVaultProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. +func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupIds", p.GroupIDs) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupIds": + err = unpopulate(val, "GroupIDs", &p.GroupIDs) + delete(rawMsg, key) + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionResource. +func (p PrivateEndpointConnectionResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", p.ETag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionResource. +func (p *PrivateEndpointConnectionResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &p.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. +func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. +func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectableContainer. +func (p ProtectableContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", p.BackupManagementType) + populate(objectMap, "containerId", p.ContainerID) + populate(objectMap, "friendlyName", p.FriendlyName) + populate(objectMap, "healthStatus", p.HealthStatus) + objectMap["protectableContainerType"] = p.ProtectableContainerType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableContainer. +func (p *ProtectableContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &p.BackupManagementType) + delete(rawMsg, key) + case "containerId": + err = unpopulate(val, "ContainerID", &p.ContainerID) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &p.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &p.HealthStatus) + delete(rawMsg, key) + case "protectableContainerType": + err = unpopulate(val, "ProtectableContainerType", &p.ProtectableContainerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectableContainerResource. +func (p ProtectableContainerResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", p.ETag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableContainerResource. +func (p *ProtectableContainerResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &p.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + p.Properties, err = unmarshalProtectableContainerClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectableContainerResourceList. +func (p ProtectableContainerResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableContainerResourceList. +func (p *ProtectableContainerResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectedItem. +func (p ProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", p.BackupManagementType) + populate(objectMap, "backupSetName", p.BackupSetName) + populate(objectMap, "containerName", p.ContainerName) + populate(objectMap, "createMode", p.CreateMode) + populateDateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", p.DeferredDeleteTimeInUTC) + populate(objectMap, "deferredDeleteTimeRemaining", p.DeferredDeleteTimeRemaining) + populate(objectMap, "isArchiveEnabled", p.IsArchiveEnabled) + populate(objectMap, "isDeferredDeleteScheduleUpcoming", p.IsDeferredDeleteScheduleUpcoming) + populate(objectMap, "isRehydrate", p.IsRehydrate) + populate(objectMap, "isScheduledForDeferredDelete", p.IsScheduledForDeferredDelete) + populateDateTimeRFC3339(objectMap, "lastRecoveryPoint", p.LastRecoveryPoint) + populate(objectMap, "policyId", p.PolicyID) + populate(objectMap, "policyName", p.PolicyName) + objectMap["protectedItemType"] = p.ProtectedItemType + populate(objectMap, "resourceGuardOperationRequests", p.ResourceGuardOperationRequests) + populate(objectMap, "softDeleteRetentionPeriodInDays", p.SoftDeleteRetentionPeriodInDays) + populate(objectMap, "sourceResourceId", p.SourceResourceID) + populate(objectMap, "vaultId", p.VaultID) + populate(objectMap, "workloadType", p.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedItem. +func (p *ProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &p.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &p.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &p.ContainerName) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &p.CreateMode) + delete(rawMsg, key) + case "deferredDeleteTimeInUTC": + err = unpopulateDateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &p.DeferredDeleteTimeInUTC) + delete(rawMsg, key) + case "deferredDeleteTimeRemaining": + err = unpopulate(val, "DeferredDeleteTimeRemaining", &p.DeferredDeleteTimeRemaining) + delete(rawMsg, key) + case "isArchiveEnabled": + err = unpopulate(val, "IsArchiveEnabled", &p.IsArchiveEnabled) + delete(rawMsg, key) + case "isDeferredDeleteScheduleUpcoming": + err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &p.IsDeferredDeleteScheduleUpcoming) + delete(rawMsg, key) + case "isRehydrate": + err = unpopulate(val, "IsRehydrate", &p.IsRehydrate) + delete(rawMsg, key) + case "isScheduledForDeferredDelete": + err = unpopulate(val, "IsScheduledForDeferredDelete", &p.IsScheduledForDeferredDelete) + delete(rawMsg, key) + case "lastRecoveryPoint": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPoint", &p.LastRecoveryPoint) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &p.PolicyID) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &p.PolicyName) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &p.ProtectedItemType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &p.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "softDeleteRetentionPeriodInDays": + err = unpopulate(val, "SoftDeleteRetentionPeriodInDays", &p.SoftDeleteRetentionPeriodInDays) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &p.SourceResourceID) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &p.VaultID) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &p.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectedItemQueryObject. +func (p ProtectedItemQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupEngineName", p.BackupEngineName) + populate(objectMap, "backupManagementType", p.BackupManagementType) + populate(objectMap, "backupSetName", p.BackupSetName) + populate(objectMap, "containerName", p.ContainerName) + populate(objectMap, "fabricName", p.FabricName) + populate(objectMap, "friendlyName", p.FriendlyName) + populate(objectMap, "healthState", p.HealthState) + populate(objectMap, "itemType", p.ItemType) + populate(objectMap, "policyName", p.PolicyName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedItemQueryObject. +func (p *ProtectedItemQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupEngineName": + err = unpopulate(val, "BackupEngineName", &p.BackupEngineName) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &p.BackupManagementType) + delete(rawMsg, key) + case "backupSetName": + err = unpopulate(val, "BackupSetName", &p.BackupSetName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &p.ContainerName) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &p.FabricName) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &p.FriendlyName) + delete(rawMsg, key) + case "healthState": + err = unpopulate(val, "HealthState", &p.HealthState) + delete(rawMsg, key) + case "itemType": + err = unpopulate(val, "ItemType", &p.ItemType) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &p.PolicyName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectedItemResource. +func (p ProtectedItemResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", p.ETag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedItemResource. +func (p *ProtectedItemResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &p.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + p.Properties, err = unmarshalProtectedItemClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectedItemResourceList. +func (p ProtectedItemResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedItemResourceList. +func (p *ProtectedItemResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainer. +func (p ProtectionContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", p.BackupManagementType) + objectMap["containerType"] = p.ContainerType + populate(objectMap, "friendlyName", p.FriendlyName) + populate(objectMap, "healthStatus", p.HealthStatus) + populate(objectMap, "protectableObjectType", p.ProtectableObjectType) + populate(objectMap, "registrationStatus", p.RegistrationStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainer. +func (p *ProtectionContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &p.BackupManagementType) + delete(rawMsg, key) + case "containerType": + err = unpopulate(val, "ContainerType", &p.ContainerType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &p.FriendlyName) + delete(rawMsg, key) + case "healthStatus": + err = unpopulate(val, "HealthStatus", &p.HealthStatus) + delete(rawMsg, key) + case "protectableObjectType": + err = unpopulate(val, "ProtectableObjectType", &p.ProtectableObjectType) + delete(rawMsg, key) + case "registrationStatus": + err = unpopulate(val, "RegistrationStatus", &p.RegistrationStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerResource. +func (p ProtectionContainerResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", p.ETag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerResource. +func (p *ProtectionContainerResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &p.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + p.Properties, err = unmarshalProtectionContainerClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerResourceList. +func (p ProtectionContainerResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerResourceList. +func (p *ProtectionContainerResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionIntent. +func (p ProtectionIntent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", p.BackupManagementType) + populate(objectMap, "itemId", p.ItemID) + populate(objectMap, "policyId", p.PolicyID) + objectMap["protectionIntentItemType"] = p.ProtectionIntentItemType + populate(objectMap, "protectionState", p.ProtectionState) + populate(objectMap, "sourceResourceId", p.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionIntent. +func (p *ProtectionIntent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &p.BackupManagementType) + delete(rawMsg, key) + case "itemId": + err = unpopulate(val, "ItemID", &p.ItemID) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &p.PolicyID) + delete(rawMsg, key) + case "protectionIntentItemType": + err = unpopulate(val, "ProtectionIntentItemType", &p.ProtectionIntentItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &p.ProtectionState) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &p.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionIntentQueryObject. +func (p ProtectionIntentQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", p.BackupManagementType) + populate(objectMap, "itemName", p.ItemName) + populate(objectMap, "itemType", p.ItemType) + populate(objectMap, "parentName", p.ParentName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionIntentQueryObject. +func (p *ProtectionIntentQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &p.BackupManagementType) + delete(rawMsg, key) + case "itemName": + err = unpopulate(val, "ItemName", &p.ItemName) + delete(rawMsg, key) + case "itemType": + err = unpopulate(val, "ItemType", &p.ItemType) + delete(rawMsg, key) + case "parentName": + err = unpopulate(val, "ParentName", &p.ParentName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionIntentResource. +func (p ProtectionIntentResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", p.ETag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionIntentResource. +func (p *ProtectionIntentResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &p.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + p.Properties, err = unmarshalProtectionIntentClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionIntentResourceList. +func (p ProtectionIntentResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionIntentResourceList. +func (p *ProtectionIntentResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionPolicy. +func (p ProtectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["backupManagementType"] = p.BackupManagementType + populate(objectMap, "protectedItemsCount", p.ProtectedItemsCount) + populate(objectMap, "resourceGuardOperationRequests", p.ResourceGuardOperationRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionPolicy. +func (p *ProtectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &p.BackupManagementType) + delete(rawMsg, key) + case "protectedItemsCount": + err = unpopulate(val, "ProtectedItemsCount", &p.ProtectedItemsCount) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &p.ResourceGuardOperationRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionPolicyQueryObject. +func (p ProtectionPolicyQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", p.BackupManagementType) + populate(objectMap, "fabricName", p.FabricName) + populate(objectMap, "workloadType", p.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionPolicyQueryObject. +func (p *ProtectionPolicyQueryObject) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &p.BackupManagementType) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &p.FabricName) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &p.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionPolicyResource. +func (p ProtectionPolicyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", p.ETag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionPolicyResource. +func (p *ProtectionPolicyResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &p.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + p.Properties, err = unmarshalProtectionPolicyClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionPolicyResourceList. +func (p ProtectionPolicyResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionPolicyResourceList. +func (p *ProtectionPolicyResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPoint. +func (r RecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = r.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPoint. +func (r *RecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &r.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointDiskConfiguration. +func (r RecoveryPointDiskConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "excludedDiskList", r.ExcludedDiskList) + populate(objectMap, "includedDiskList", r.IncludedDiskList) + populate(objectMap, "numberOfDisksAttachedToVm", r.NumberOfDisksAttachedToVM) + populate(objectMap, "numberOfDisksIncludedInBackup", r.NumberOfDisksIncludedInBackup) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointDiskConfiguration. +func (r *RecoveryPointDiskConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "excludedDiskList": + err = unpopulate(val, "ExcludedDiskList", &r.ExcludedDiskList) + delete(rawMsg, key) + case "includedDiskList": + err = unpopulate(val, "IncludedDiskList", &r.IncludedDiskList) + delete(rawMsg, key) + case "numberOfDisksAttachedToVm": + err = unpopulate(val, "NumberOfDisksAttachedToVM", &r.NumberOfDisksAttachedToVM) + delete(rawMsg, key) + case "numberOfDisksIncludedInBackup": + err = unpopulate(val, "NumberOfDisksIncludedInBackup", &r.NumberOfDisksIncludedInBackup) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointMoveReadinessInfo. +func (r RecoveryPointMoveReadinessInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", r.AdditionalInfo) + populate(objectMap, "isReadyForMove", r.IsReadyForMove) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointMoveReadinessInfo. +func (r *RecoveryPointMoveReadinessInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &r.AdditionalInfo) + delete(rawMsg, key) + case "isReadyForMove": + err = unpopulate(val, "IsReadyForMove", &r.IsReadyForMove) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointProperties. +func (r RecoveryPointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expiryTime", r.ExpiryTime) + populate(objectMap, "isSoftDeleted", r.IsSoftDeleted) + populate(objectMap, "ruleName", r.RuleName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointProperties. +func (r *RecoveryPointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiryTime": + err = unpopulate(val, "ExpiryTime", &r.ExpiryTime) + delete(rawMsg, key) + case "isSoftDeleted": + err = unpopulate(val, "IsSoftDeleted", &r.IsSoftDeleted) + delete(rawMsg, key) + case "ruleName": + err = unpopulate(val, "RuleName", &r.RuleName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointRehydrationInfo. +func (r RecoveryPointRehydrationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "rehydrationPriority", r.RehydrationPriority) + populate(objectMap, "rehydrationRetentionDuration", r.RehydrationRetentionDuration) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointRehydrationInfo. +func (r *RecoveryPointRehydrationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "rehydrationPriority": + err = unpopulate(val, "RehydrationPriority", &r.RehydrationPriority) + delete(rawMsg, key) + case "rehydrationRetentionDuration": + err = unpopulate(val, "RehydrationRetentionDuration", &r.RehydrationRetentionDuration) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointResource. +func (r RecoveryPointResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", r.ETag) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointResource. +func (r *RecoveryPointResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &r.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + r.Properties, err = unmarshalRecoveryPointClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointResourceList. +func (r RecoveryPointResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointResourceList. +func (r *RecoveryPointResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointTierInformation. +func (r RecoveryPointTierInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedInfo", r.ExtendedInfo) + populate(objectMap, "status", r.Status) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointTierInformation. +func (r *RecoveryPointTierInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &r.ExtendedInfo) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &r.Status) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointTierInformationV2. +func (r RecoveryPointTierInformationV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedInfo", r.ExtendedInfo) + populate(objectMap, "status", r.Status) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointTierInformationV2. +func (r *RecoveryPointTierInformationV2) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &r.ExtendedInfo) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &r.Status) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", r.ETag) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &r.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardOperationDetail. +func (r ResourceGuardOperationDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "defaultResourceRequest", r.DefaultResourceRequest) + populate(objectMap, "vaultCriticalOperation", r.VaultCriticalOperation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardOperationDetail. +func (r *ResourceGuardOperationDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultResourceRequest": + err = unpopulate(val, "DefaultResourceRequest", &r.DefaultResourceRequest) + delete(rawMsg, key) + case "vaultCriticalOperation": + err = unpopulate(val, "VaultCriticalOperation", &r.VaultCriticalOperation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardProxyBase. +func (r ResourceGuardProxyBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "lastUpdatedTime", r.LastUpdatedTime) + populate(objectMap, "resourceGuardOperationDetails", r.ResourceGuardOperationDetails) + populate(objectMap, "resourceGuardResourceId", r.ResourceGuardResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardProxyBase. +func (r *ResourceGuardProxyBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "lastUpdatedTime": + err = unpopulate(val, "LastUpdatedTime", &r.LastUpdatedTime) + delete(rawMsg, key) + case "resourceGuardOperationDetails": + err = unpopulate(val, "ResourceGuardOperationDetails", &r.ResourceGuardOperationDetails) + delete(rawMsg, key) + case "resourceGuardResourceId": + err = unpopulate(val, "ResourceGuardResourceID", &r.ResourceGuardResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardProxyBaseResource. +func (r ResourceGuardProxyBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", r.ETag) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardProxyBaseResource. +func (r *ResourceGuardProxyBaseResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &r.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceGuardProxyBaseResourceList. +func (r ResourceGuardProxyBaseResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceGuardProxyBaseResourceList. +func (r *ResourceGuardProxyBaseResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceHealthDetails. +func (r ResourceHealthDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", r.Code) + populate(objectMap, "message", r.Message) + populate(objectMap, "recommendations", r.Recommendations) + populate(objectMap, "title", r.Title) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHealthDetails. +func (r *ResourceHealthDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &r.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &r.Message) + delete(rawMsg, key) + case "recommendations": + err = unpopulate(val, "Recommendations", &r.Recommendations) + delete(rawMsg, key) + case "title": + err = unpopulate(val, "Title", &r.Title) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceList. +func (r ResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceList. +func (r *ResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestoreFileSpecs. +func (r RestoreFileSpecs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fileSpecType", r.FileSpecType) + populate(objectMap, "path", r.Path) + populate(objectMap, "targetFolderPath", r.TargetFolderPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreFileSpecs. +func (r *RestoreFileSpecs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fileSpecType": + err = unpopulate(val, "FileSpecType", &r.FileSpecType) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &r.Path) + delete(rawMsg, key) + case "targetFolderPath": + err = unpopulate(val, "TargetFolderPath", &r.TargetFolderPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestoreRequest. +func (r RestoreRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = r.ObjectType + populate(objectMap, "resourceGuardOperationRequests", r.ResourceGuardOperationRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreRequest. +func (r *RestoreRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &r.ObjectType) + delete(rawMsg, key) + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &r.ResourceGuardOperationRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RestoreRequestResource. +func (r RestoreRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", r.ETag) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreRequestResource. +func (r *RestoreRequestResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &r.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + r.Properties, err = unmarshalRestoreRequestClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RetentionDuration. +func (r RetentionDuration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", r.Count) + populate(objectMap, "durationType", r.DurationType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RetentionDuration. +func (r *RetentionDuration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &r.Count) + delete(rawMsg, key) + case "durationType": + err = unpopulate(val, "DurationType", &r.DurationType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RetentionPolicy. +func (r RetentionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["retentionPolicyType"] = r.RetentionPolicyType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RetentionPolicy. +func (r *RetentionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "retentionPolicyType": + err = unpopulate(val, "RetentionPolicyType", &r.RetentionPolicyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLDataDirectory. +func (s SQLDataDirectory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logicalName", s.LogicalName) + populate(objectMap, "path", s.Path) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLDataDirectory. +func (s *SQLDataDirectory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logicalName": + err = unpopulate(val, "LogicalName", &s.LogicalName) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SQLDataDirectoryMapping. +func (s SQLDataDirectoryMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "mappingType", s.MappingType) + populate(objectMap, "sourceLogicalName", s.SourceLogicalName) + populate(objectMap, "sourcePath", s.SourcePath) + populate(objectMap, "targetPath", s.TargetPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SQLDataDirectoryMapping. +func (s *SQLDataDirectoryMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mappingType": + err = unpopulate(val, "MappingType", &s.MappingType) + delete(rawMsg, key) + case "sourceLogicalName": + err = unpopulate(val, "SourceLogicalName", &s.SourceLogicalName) + delete(rawMsg, key) + case "sourcePath": + err = unpopulate(val, "SourcePath", &s.SourcePath) + delete(rawMsg, key) + case "targetPath": + err = unpopulate(val, "TargetPath", &s.TargetPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SchedulePolicy. +func (s SchedulePolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["schedulePolicyType"] = s.SchedulePolicyType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SchedulePolicy. +func (s *SchedulePolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "schedulePolicyType": + err = unpopulate(val, "SchedulePolicyType", &s.SchedulePolicyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecuredVMDetails. +func (s SecuredVMDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "securedVMOsDiskEncryptionSetId", s.SecuredVMOsDiskEncryptionSetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecuredVMDetails. +func (s *SecuredVMDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "securedVMOsDiskEncryptionSetId": + err = unpopulate(val, "SecuredVMOsDiskEncryptionSetID", &s.SecuredVMOsDiskEncryptionSetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPinBase. +func (s SecurityPinBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceGuardOperationRequests", s.ResourceGuardOperationRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPinBase. +func (s *SecurityPinBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &s.ResourceGuardOperationRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Settings. +func (s Settings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isCompression", s.IsCompression) + populate(objectMap, "issqlcompression", s.Issqlcompression) + populate(objectMap, "timeZone", s.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Settings. +func (s *Settings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isCompression": + err = unpopulate(val, "IsCompression", &s.IsCompression) + delete(rawMsg, key) + case "issqlcompression": + err = unpopulate(val, "Issqlcompression", &s.Issqlcompression) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &s.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SimpleRetentionPolicy. +func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "retentionDuration", s.RetentionDuration) + objectMap["retentionPolicyType"] = "SimpleRetentionPolicy" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SimpleRetentionPolicy. +func (s *SimpleRetentionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "retentionDuration": + err = unpopulate(val, "RetentionDuration", &s.RetentionDuration) + delete(rawMsg, key) + case "retentionPolicyType": + err = unpopulate(val, "RetentionPolicyType", &s.RetentionPolicyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SimpleSchedulePolicy. +func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hourlySchedule", s.HourlySchedule) + objectMap["schedulePolicyType"] = "SimpleSchedulePolicy" + populate(objectMap, "scheduleRunDays", s.ScheduleRunDays) + populate(objectMap, "scheduleRunFrequency", s.ScheduleRunFrequency) + aux := make([]*dateTimeRFC3339, len(s.ScheduleRunTimes), len(s.ScheduleRunTimes)) + for i := 0; i < len(s.ScheduleRunTimes); i++ { + aux[i] = (*dateTimeRFC3339)(s.ScheduleRunTimes[i]) + } + populate(objectMap, "scheduleRunTimes", aux) + populate(objectMap, "scheduleWeeklyFrequency", s.ScheduleWeeklyFrequency) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SimpleSchedulePolicy. +func (s *SimpleSchedulePolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hourlySchedule": + err = unpopulate(val, "HourlySchedule", &s.HourlySchedule) + delete(rawMsg, key) + case "schedulePolicyType": + err = unpopulate(val, "SchedulePolicyType", &s.SchedulePolicyType) + delete(rawMsg, key) + case "scheduleRunDays": + err = unpopulate(val, "ScheduleRunDays", &s.ScheduleRunDays) + delete(rawMsg, key) + case "scheduleRunFrequency": + err = unpopulate(val, "ScheduleRunFrequency", &s.ScheduleRunFrequency) + delete(rawMsg, key) + case "scheduleRunTimes": + var aux []*dateTimeRFC3339 + err = unpopulate(val, "ScheduleRunTimes", &aux) + for _, au := range aux { + s.ScheduleRunTimes = append(s.ScheduleRunTimes, (*time.Time)(au)) + } + delete(rawMsg, key) + case "scheduleWeeklyFrequency": + err = unpopulate(val, "ScheduleWeeklyFrequency", &s.ScheduleWeeklyFrequency) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SimpleSchedulePolicyV2. +func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dailySchedule", s.DailySchedule) + populate(objectMap, "hourlySchedule", s.HourlySchedule) + objectMap["schedulePolicyType"] = "SimpleSchedulePolicyV2" + populate(objectMap, "scheduleRunFrequency", s.ScheduleRunFrequency) + populate(objectMap, "weeklySchedule", s.WeeklySchedule) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SimpleSchedulePolicyV2. +func (s *SimpleSchedulePolicyV2) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dailySchedule": + err = unpopulate(val, "DailySchedule", &s.DailySchedule) + delete(rawMsg, key) + case "hourlySchedule": + err = unpopulate(val, "HourlySchedule", &s.HourlySchedule) + delete(rawMsg, key) + case "schedulePolicyType": + err = unpopulate(val, "SchedulePolicyType", &s.SchedulePolicyType) + delete(rawMsg, key) + case "scheduleRunFrequency": + err = unpopulate(val, "ScheduleRunFrequency", &s.ScheduleRunFrequency) + delete(rawMsg, key) + case "weeklySchedule": + err = unpopulate(val, "WeeklySchedule", &s.WeeklySchedule) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotBackupAdditionalDetails. +func (s SnapshotBackupAdditionalDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instantRPDetails", s.InstantRPDetails) + populate(objectMap, "instantRpRetentionRangeInDays", s.InstantRpRetentionRangeInDays) + populate(objectMap, "userAssignedManagedIdentityDetails", s.UserAssignedManagedIdentityDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotBackupAdditionalDetails. +func (s *SnapshotBackupAdditionalDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instantRPDetails": + err = unpopulate(val, "InstantRPDetails", &s.InstantRPDetails) + delete(rawMsg, key) + case "instantRpRetentionRangeInDays": + err = unpopulate(val, "InstantRpRetentionRangeInDays", &s.InstantRpRetentionRangeInDays) + delete(rawMsg, key) + case "userAssignedManagedIdentityDetails": + err = unpopulate(val, "UserAssignedManagedIdentityDetails", &s.UserAssignedManagedIdentityDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SnapshotRestoreParameters. +func (s SnapshotRestoreParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logPointInTimeForDBRecovery", s.LogPointInTimeForDBRecovery) + populate(objectMap, "skipAttachAndMount", s.SkipAttachAndMount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotRestoreParameters. +func (s *SnapshotRestoreParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logPointInTimeForDBRecovery": + err = unpopulate(val, "LogPointInTimeForDBRecovery", &s.LogPointInTimeForDBRecovery) + delete(rawMsg, key) + case "skipAttachAndMount": + err = unpopulate(val, "SkipAttachAndMount", &s.SkipAttachAndMount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SubProtectionPolicy. +func (s SubProtectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "policyType", s.PolicyType) + populate(objectMap, "retentionPolicy", s.RetentionPolicy) + populate(objectMap, "schedulePolicy", s.SchedulePolicy) + populate(objectMap, "snapshotBackupAdditionalDetails", s.SnapshotBackupAdditionalDetails) + populate(objectMap, "tieringPolicy", s.TieringPolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SubProtectionPolicy. +func (s *SubProtectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "policyType": + err = unpopulate(val, "PolicyType", &s.PolicyType) + delete(rawMsg, key) + case "retentionPolicy": + s.RetentionPolicy, err = unmarshalRetentionPolicyClassification(val) + delete(rawMsg, key) + case "schedulePolicy": + s.SchedulePolicy, err = unmarshalSchedulePolicyClassification(val) + delete(rawMsg, key) + case "snapshotBackupAdditionalDetails": + err = unpopulate(val, "SnapshotBackupAdditionalDetails", &s.SnapshotBackupAdditionalDetails) + delete(rawMsg, key) + case "tieringPolicy": + err = unpopulate(val, "TieringPolicy", &s.TieringPolicy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetAFSRestoreInfo. +func (t TargetAFSRestoreInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", t.Name) + populate(objectMap, "targetResourceId", t.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetAFSRestoreInfo. +func (t *TargetAFSRestoreInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &t.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetDiskNetworkAccessSettings. +func (t TargetDiskNetworkAccessSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetDiskAccessId", t.TargetDiskAccessID) + populate(objectMap, "targetDiskNetworkAccessOption", t.TargetDiskNetworkAccessOption) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetDiskNetworkAccessSettings. +func (t *TargetDiskNetworkAccessSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetDiskAccessId": + err = unpopulate(val, "TargetDiskAccessID", &t.TargetDiskAccessID) + delete(rawMsg, key) + case "targetDiskNetworkAccessOption": + err = unpopulate(val, "TargetDiskNetworkAccessOption", &t.TargetDiskNetworkAccessOption) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetRestoreInfo. +func (t TargetRestoreInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerId", t.ContainerID) + populate(objectMap, "databaseName", t.DatabaseName) + populate(objectMap, "overwriteOption", t.OverwriteOption) + populate(objectMap, "targetDirectoryForFileRestore", t.TargetDirectoryForFileRestore) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetRestoreInfo. +func (t *TargetRestoreInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerId": + err = unpopulate(val, "ContainerID", &t.ContainerID) + delete(rawMsg, key) + case "databaseName": + err = unpopulate(val, "DatabaseName", &t.DatabaseName) + delete(rawMsg, key) + case "overwriteOption": + err = unpopulate(val, "OverwriteOption", &t.OverwriteOption) + delete(rawMsg, key) + case "targetDirectoryForFileRestore": + err = unpopulate(val, "TargetDirectoryForFileRestore", &t.TargetDirectoryForFileRestore) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TieringCostInfo. +func (t TieringCostInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = t.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TieringCostInfo. +func (t *TieringCostInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &t.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TieringCostRehydrationInfo. +func (t TieringCostRehydrationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "TieringCostRehydrationInfo" + populate(objectMap, "rehydrationSizeInBytes", t.RehydrationSizeInBytes) + populate(objectMap, "retailRehydrationCostPerGBPerMonth", t.RetailRehydrationCostPerGBPerMonth) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TieringCostRehydrationInfo. +func (t *TieringCostRehydrationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &t.ObjectType) + delete(rawMsg, key) + case "rehydrationSizeInBytes": + err = unpopulate(val, "RehydrationSizeInBytes", &t.RehydrationSizeInBytes) + delete(rawMsg, key) + case "retailRehydrationCostPerGBPerMonth": + err = unpopulate(val, "RetailRehydrationCostPerGBPerMonth", &t.RetailRehydrationCostPerGBPerMonth) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TieringCostSavingInfo. +func (t TieringCostSavingInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "TieringCostSavingInfo" + populate(objectMap, "retailSourceTierCostPerGBPerMonth", t.RetailSourceTierCostPerGBPerMonth) + populate(objectMap, "retailTargetTierCostPerGBPerMonth", t.RetailTargetTierCostPerGBPerMonth) + populate(objectMap, "sourceTierSizeReductionInBytes", t.SourceTierSizeReductionInBytes) + populate(objectMap, "targetTierSizeIncreaseInBytes", t.TargetTierSizeIncreaseInBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TieringCostSavingInfo. +func (t *TieringCostSavingInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &t.ObjectType) + delete(rawMsg, key) + case "retailSourceTierCostPerGBPerMonth": + err = unpopulate(val, "RetailSourceTierCostPerGBPerMonth", &t.RetailSourceTierCostPerGBPerMonth) + delete(rawMsg, key) + case "retailTargetTierCostPerGBPerMonth": + err = unpopulate(val, "RetailTargetTierCostPerGBPerMonth", &t.RetailTargetTierCostPerGBPerMonth) + delete(rawMsg, key) + case "sourceTierSizeReductionInBytes": + err = unpopulate(val, "SourceTierSizeReductionInBytes", &t.SourceTierSizeReductionInBytes) + delete(rawMsg, key) + case "targetTierSizeIncreaseInBytes": + err = unpopulate(val, "TargetTierSizeIncreaseInBytes", &t.TargetTierSizeIncreaseInBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TieringPolicy. +func (t TieringPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "duration", t.Duration) + populate(objectMap, "durationType", t.DurationType) + populate(objectMap, "tieringMode", t.TieringMode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TieringPolicy. +func (t *TieringPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "duration": + err = unpopulate(val, "Duration", &t.Duration) + delete(rawMsg, key) + case "durationType": + err = unpopulate(val, "DurationType", &t.DurationType) + delete(rawMsg, key) + case "tieringMode": + err = unpopulate(val, "TieringMode", &t.TieringMode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TokenInformation. +func (t TokenInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "expiryTimeInUtcTicks", t.ExpiryTimeInUTCTicks) + populate(objectMap, "securityPIN", t.SecurityPIN) + populate(objectMap, "token", t.Token) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TokenInformation. +func (t *TokenInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiryTimeInUtcTicks": + err = unpopulate(val, "ExpiryTimeInUTCTicks", &t.ExpiryTimeInUTCTicks) + delete(rawMsg, key) + case "securityPIN": + err = unpopulate(val, "SecurityPIN", &t.SecurityPIN) + delete(rawMsg, key) + case "token": + err = unpopulate(val, "Token", &t.Token) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggerDataMoveRequest. +func (t TriggerDataMoveRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "correlationId", t.CorrelationID) + populate(objectMap, "dataMoveLevel", t.DataMoveLevel) + populate(objectMap, "pauseGC", t.PauseGC) + populate(objectMap, "sourceContainerArmIds", t.SourceContainerArmIDs) + populate(objectMap, "sourceRegion", t.SourceRegion) + populate(objectMap, "sourceResourceId", t.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggerDataMoveRequest. +func (t *TriggerDataMoveRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "correlationId": + err = unpopulate(val, "CorrelationID", &t.CorrelationID) + delete(rawMsg, key) + case "dataMoveLevel": + err = unpopulate(val, "DataMoveLevel", &t.DataMoveLevel) + delete(rawMsg, key) + case "pauseGC": + err = unpopulate(val, "PauseGC", &t.PauseGC) + delete(rawMsg, key) + case "sourceContainerArmIds": + err = unpopulate(val, "SourceContainerArmIDs", &t.SourceContainerArmIDs) + delete(rawMsg, key) + case "sourceRegion": + err = unpopulate(val, "SourceRegion", &t.SourceRegion) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &t.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnlockDeleteRequest. +func (u UnlockDeleteRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceGuardOperationRequests", u.ResourceGuardOperationRequests) + populate(objectMap, "resourceToBeDeleted", u.ResourceToBeDeleted) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnlockDeleteRequest. +func (u *UnlockDeleteRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceGuardOperationRequests": + err = unpopulate(val, "ResourceGuardOperationRequests", &u.ResourceGuardOperationRequests) + delete(rawMsg, key) + case "resourceToBeDeleted": + err = unpopulate(val, "ResourceToBeDeleted", &u.ResourceToBeDeleted) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnlockDeleteResponse. +func (u UnlockDeleteResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "unlockDeleteExpiryTime", u.UnlockDeleteExpiryTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnlockDeleteResponse. +func (u *UnlockDeleteResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "unlockDeleteExpiryTime": + err = unpopulate(val, "UnlockDeleteExpiryTime", &u.UnlockDeleteExpiryTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentityProperties. +func (u UserAssignedIdentityProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentityProperties. +func (u *UserAssignedIdentityProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedManagedIdentityDetails. +func (u UserAssignedManagedIdentityDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identityArmId", u.IdentityArmID) + populate(objectMap, "identityName", u.IdentityName) + populate(objectMap, "userAssignedIdentityProperties", u.UserAssignedIdentityProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedManagedIdentityDetails. +func (u *UserAssignedManagedIdentityDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityArmId": + err = unpopulate(val, "IdentityArmID", &u.IdentityArmID) + delete(rawMsg, key) + case "identityName": + err = unpopulate(val, "IdentityName", &u.IdentityName) + delete(rawMsg, key) + case "userAssignedIdentityProperties": + err = unpopulate(val, "UserAssignedIdentityProperties", &u.UserAssignedIdentityProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateIaasVMRestoreOperationRequest. +func (v ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "ValidateIaasVMRestoreOperationRequest" + populate(objectMap, "restoreRequest", v.RestoreRequest) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateIaasVMRestoreOperationRequest. +func (v *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &v.ObjectType) + delete(rawMsg, key) + case "restoreRequest": + v.RestoreRequest, err = unmarshalRestoreRequestClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateOperationRequest. +func (v ValidateOperationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = v.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateOperationRequest. +func (v *ValidateOperationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &v.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateOperationRequestResource. +func (v ValidateOperationRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateOperationRequestResource. +func (v *ValidateOperationRequestResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "properties": + v.Properties, err = unmarshalValidateOperationRequestClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateOperationResponse. +func (v ValidateOperationResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "validationResults", v.ValidationResults) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateOperationResponse. +func (v *ValidateOperationResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "validationResults": + err = unpopulate(val, "ValidationResults", &v.ValidationResults) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateOperationsResponse. +func (v ValidateOperationsResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "validateOperationResponse", v.ValidateOperationResponse) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateOperationsResponse. +func (v *ValidateOperationsResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "validateOperationResponse": + err = unpopulate(val, "ValidateOperationResponse", &v.ValidateOperationResponse) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ValidateRestoreOperationRequest. +func (v ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = "ValidateRestoreOperationRequest" + populate(objectMap, "restoreRequest", v.RestoreRequest) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateRestoreOperationRequest. +func (v *ValidateRestoreOperationRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &v.ObjectType) + delete(rawMsg, key) + case "restoreRequest": + v.RestoreRequest, err = unmarshalRestoreRequestClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultJob. +func (v VaultJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsInfo", v.ActionsInfo) + populate(objectMap, "activityId", v.ActivityID) + populate(objectMap, "backupManagementType", v.BackupManagementType) + populate(objectMap, "duration", v.Duration) + populateDateTimeRFC3339(objectMap, "endTime", v.EndTime) + populate(objectMap, "entityFriendlyName", v.EntityFriendlyName) + populate(objectMap, "errorDetails", v.ErrorDetails) + populate(objectMap, "extendedInfo", v.ExtendedInfo) + objectMap["jobType"] = "VaultJob" + populate(objectMap, "operation", v.Operation) + populateDateTimeRFC3339(objectMap, "startTime", v.StartTime) + populate(objectMap, "status", v.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultJob. +func (v *VaultJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsInfo": + err = unpopulate(val, "ActionsInfo", &v.ActionsInfo) + delete(rawMsg, key) + case "activityId": + err = unpopulate(val, "ActivityID", &v.ActivityID) + delete(rawMsg, key) + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &v.BackupManagementType) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &v.Duration) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &v.EndTime) + delete(rawMsg, key) + case "entityFriendlyName": + err = unpopulate(val, "EntityFriendlyName", &v.EntityFriendlyName) + delete(rawMsg, key) + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &v.ErrorDetails) + delete(rawMsg, key) + case "extendedInfo": + err = unpopulate(val, "ExtendedInfo", &v.ExtendedInfo) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &v.JobType) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &v.Operation) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &v.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &v.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultJobErrorInfo. +func (v VaultJobErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", v.ErrorCode) + populate(objectMap, "errorString", v.ErrorString) + populate(objectMap, "recommendations", v.Recommendations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultJobErrorInfo. +func (v *VaultJobErrorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &v.ErrorCode) + delete(rawMsg, key) + case "errorString": + err = unpopulate(val, "ErrorString", &v.ErrorString) + delete(rawMsg, key) + case "recommendations": + err = unpopulate(val, "Recommendations", &v.Recommendations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultJobExtendedInfo. +func (v VaultJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "propertyBag", v.PropertyBag) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultJobExtendedInfo. +func (v *VaultJobExtendedInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "propertyBag": + err = unpopulate(val, "PropertyBag", &v.PropertyBag) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultRetentionPolicy. +func (v VaultRetentionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "snapshotRetentionInDays", v.SnapshotRetentionInDays) + populate(objectMap, "vaultRetention", v.VaultRetention) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultRetentionPolicy. +func (v *VaultRetentionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "snapshotRetentionInDays": + err = unpopulate(val, "SnapshotRetentionInDays", &v.SnapshotRetentionInDays) + delete(rawMsg, key) + case "vaultRetention": + v.VaultRetention, err = unmarshalRetentionPolicyClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultStorageConfigOperationResultResponse. +func (v VaultStorageConfigOperationResultResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["objectType"] = v.ObjectType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultStorageConfigOperationResultResponse. +func (v *VaultStorageConfigOperationResultResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectType": + err = unpopulate(val, "ObjectType", &v.ObjectType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WeeklyRetentionFormat. +func (w WeeklyRetentionFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "daysOfTheWeek", w.DaysOfTheWeek) + populate(objectMap, "weeksOfTheMonth", w.WeeksOfTheMonth) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WeeklyRetentionFormat. +func (w *WeeklyRetentionFormat) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "daysOfTheWeek": + err = unpopulate(val, "DaysOfTheWeek", &w.DaysOfTheWeek) + delete(rawMsg, key) + case "weeksOfTheMonth": + err = unpopulate(val, "WeeksOfTheMonth", &w.WeeksOfTheMonth) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WeeklyRetentionSchedule. +func (w WeeklyRetentionSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "daysOfTheWeek", w.DaysOfTheWeek) + populate(objectMap, "retentionDuration", w.RetentionDuration) + aux := make([]*dateTimeRFC3339, len(w.RetentionTimes), len(w.RetentionTimes)) + for i := 0; i < len(w.RetentionTimes); i++ { + aux[i] = (*dateTimeRFC3339)(w.RetentionTimes[i]) + } + populate(objectMap, "retentionTimes", aux) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WeeklyRetentionSchedule. +func (w *WeeklyRetentionSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "daysOfTheWeek": + err = unpopulate(val, "DaysOfTheWeek", &w.DaysOfTheWeek) + delete(rawMsg, key) + case "retentionDuration": + err = unpopulate(val, "RetentionDuration", &w.RetentionDuration) + delete(rawMsg, key) + case "retentionTimes": + var aux []*dateTimeRFC3339 + err = unpopulate(val, "RetentionTimes", &aux) + for _, au := range aux { + w.RetentionTimes = append(w.RetentionTimes, (*time.Time)(au)) + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WeeklySchedule. +func (w WeeklySchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "scheduleRunDays", w.ScheduleRunDays) + aux := make([]*dateTimeRFC3339, len(w.ScheduleRunTimes), len(w.ScheduleRunTimes)) + for i := 0; i < len(w.ScheduleRunTimes); i++ { + aux[i] = (*dateTimeRFC3339)(w.ScheduleRunTimes[i]) + } + populate(objectMap, "scheduleRunTimes", aux) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WeeklySchedule. +func (w *WeeklySchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scheduleRunDays": + err = unpopulate(val, "ScheduleRunDays", &w.ScheduleRunDays) + delete(rawMsg, key) + case "scheduleRunTimes": + var aux []*dateTimeRFC3339 + err = unpopulate(val, "ScheduleRunTimes", &aux) + for _, au := range aux { + w.ScheduleRunTimes = append(w.ScheduleRunTimes, (*time.Time)(au)) + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadInquiryDetails. +func (w WorkloadInquiryDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inquiryValidation", w.InquiryValidation) + populate(objectMap, "itemCount", w.ItemCount) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadInquiryDetails. +func (w *WorkloadInquiryDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inquiryValidation": + err = unpopulate(val, "InquiryValidation", &w.InquiryValidation) + delete(rawMsg, key) + case "itemCount": + err = unpopulate(val, "ItemCount", &w.ItemCount) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadItem. +func (w WorkloadItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", w.BackupManagementType) + populate(objectMap, "friendlyName", w.FriendlyName) + populate(objectMap, "protectionState", w.ProtectionState) + objectMap["workloadItemType"] = w.WorkloadItemType + populate(objectMap, "workloadType", w.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadItem. +func (w *WorkloadItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &w.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &w.FriendlyName) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &w.ProtectionState) + delete(rawMsg, key) + case "workloadItemType": + err = unpopulate(val, "WorkloadItemType", &w.WorkloadItemType) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &w.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadItemResource. +func (w WorkloadItemResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", w.ETag) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadItemResource. +func (w *WorkloadItemResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &w.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + w.Properties, err = unmarshalWorkloadItemClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadItemResourceList. +func (w WorkloadItemResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadItemResourceList. +func (w *WorkloadItemResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadProtectableItem. +func (w WorkloadProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "backupManagementType", w.BackupManagementType) + populate(objectMap, "friendlyName", w.FriendlyName) + objectMap["protectableItemType"] = w.ProtectableItemType + populate(objectMap, "protectionState", w.ProtectionState) + populate(objectMap, "workloadType", w.WorkloadType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadProtectableItem. +func (w *WorkloadProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "backupManagementType": + err = unpopulate(val, "BackupManagementType", &w.BackupManagementType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &w.FriendlyName) + delete(rawMsg, key) + case "protectableItemType": + err = unpopulate(val, "ProtectableItemType", &w.ProtectableItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &w.ProtectionState) + delete(rawMsg, key) + case "workloadType": + err = unpopulate(val, "WorkloadType", &w.WorkloadType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadProtectableItemResource. +func (w WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "eTag", w.ETag) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadProtectableItemResource. +func (w *WorkloadProtectableItemResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "eTag": + err = unpopulate(val, "ETag", &w.ETag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + w.Properties, err = unmarshalWorkloadProtectableItemClassification(val) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkloadProtectableItemResourceList. +func (w WorkloadProtectableItemResourceList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadProtectableItemResourceList. +func (w *WorkloadProtectableItemResourceList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type YearlyRetentionSchedule. +func (y YearlyRetentionSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "monthsOfYear", y.MonthsOfYear) + populate(objectMap, "retentionDuration", y.RetentionDuration) + populate(objectMap, "retentionScheduleDaily", y.RetentionScheduleDaily) + populate(objectMap, "retentionScheduleFormatType", y.RetentionScheduleFormatType) + populate(objectMap, "retentionScheduleWeekly", y.RetentionScheduleWeekly) + aux := make([]*dateTimeRFC3339, len(y.RetentionTimes), len(y.RetentionTimes)) + for i := 0; i < len(y.RetentionTimes); i++ { + aux[i] = (*dateTimeRFC3339)(y.RetentionTimes[i]) + } + populate(objectMap, "retentionTimes", aux) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type YearlyRetentionSchedule. +func (y *YearlyRetentionSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", y, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "monthsOfYear": + err = unpopulate(val, "MonthsOfYear", &y.MonthsOfYear) + delete(rawMsg, key) + case "retentionDuration": + err = unpopulate(val, "RetentionDuration", &y.RetentionDuration) + delete(rawMsg, key) + case "retentionScheduleDaily": + err = unpopulate(val, "RetentionScheduleDaily", &y.RetentionScheduleDaily) + delete(rawMsg, key) + case "retentionScheduleFormatType": + err = unpopulate(val, "RetentionScheduleFormatType", &y.RetentionScheduleFormatType) + delete(rawMsg, key) + case "retentionScheduleWeekly": + err = unpopulate(val, "RetentionScheduleWeekly", &y.RetentionScheduleWeekly) + delete(rawMsg, key) + case "retentionTimes": + var aux []*dateTimeRFC3339 + err = unpopulate(val, "RetentionTimes", &aux) + for _, au := range aux { + y.RetentionTimes = append(y.RetentionTimes, (*time.Time)(au)) + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", y, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/operation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/operation_client.go new file mode 100644 index 00000000..27e7bb32 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/operation_client.go @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// OperationClient contains the methods for the Operation group. +// Don't use this type directly, use NewOperationClient() instead. +type OperationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationClient creates a new instance of OperationClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Validate - Validate operation for specified backed up item. This is a synchronous operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - resource validate operation request +// - options - OperationClientValidateOptions contains the optional parameters for the OperationClient.Validate method. +func (client *OperationClient) Validate(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestResource, options *OperationClientValidateOptions) (OperationClientValidateResponse, error) { + var err error + const operationName = "OperationClient.Validate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return OperationClientValidateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return OperationClientValidateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return OperationClientValidateResponse{}, err + } + resp, err := client.validateHandleResponse(httpResp) + return resp, err +} + +// validateCreateRequest creates the Validate request. +func (client *OperationClient) validateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestResource, _ *OperationClientValidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// validateHandleResponse handles the Validate response. +func (client *OperationClient) validateHandleResponse(resp *http.Response) (OperationClientValidateResponse, error) { + result := OperationClientValidateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ValidateOperationsResponse); err != nil { + return OperationClientValidateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/operations_client.go new file mode 100644 index 00000000..67a89ca5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/operations_client.go @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Returns the list of available operations. +// +// Generated from API version 2025-02-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.RecoveryServices/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ClientDiscoveryResponse); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/options.go new file mode 100644 index 00000000..eedbbbac --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/options.go @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +// BMSPrepareDataMoveOperationResultClientGetOptions contains the optional parameters for the BMSPrepareDataMoveOperationResultClient.Get +// method. +type BMSPrepareDataMoveOperationResultClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupEnginesClientGetOptions contains the optional parameters for the BackupEnginesClient.Get method. +type BackupEnginesClientGetOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupEnginesClientListOptions contains the optional parameters for the BackupEnginesClient.NewListPager method. +type BackupEnginesClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupJobsClientListOptions contains the optional parameters for the BackupJobsClient.NewListPager method. +type BackupJobsClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupOperationResultsClientGetOptions contains the optional parameters for the BackupOperationResultsClient.Get method. +type BackupOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupOperationStatusesClientGetOptions contains the optional parameters for the BackupOperationStatusesClient.Get method. +type BackupOperationStatusesClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.NewListPager method. +type BackupPoliciesClientListOptions struct { + // OData filter options. + Filter *string +} + +// BackupProtectableItemsClientListOptions contains the optional parameters for the BackupProtectableItemsClient.NewListPager +// method. +type BackupProtectableItemsClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupProtectedItemsClientListOptions contains the optional parameters for the BackupProtectedItemsClient.NewListPager +// method. +type BackupProtectedItemsClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupProtectionContainersClientListOptions contains the optional parameters for the BackupProtectionContainersClient.NewListPager +// method. +type BackupProtectionContainersClientListOptions struct { + // OData filter options. + Filter *string +} + +// BackupProtectionIntentClientListOptions contains the optional parameters for the BackupProtectionIntentClient.NewListPager +// method. +type BackupProtectionIntentClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupResourceEncryptionConfigsClientGetOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Get +// method. +type BackupResourceEncryptionConfigsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceEncryptionConfigsClientUpdateOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Update +// method. +type BackupResourceEncryptionConfigsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceStorageConfigsNonCRRClientGetOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Get +// method. +type BackupResourceStorageConfigsNonCRRClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceStorageConfigsNonCRRClientPatchOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Patch +// method. +type BackupResourceStorageConfigsNonCRRClientPatchOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceStorageConfigsNonCRRClientUpdateOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Update +// method. +type BackupResourceStorageConfigsNonCRRClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceVaultConfigsClientGetOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Get +// method. +type BackupResourceVaultConfigsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupResourceVaultConfigsClientPutOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Put +// method. +type BackupResourceVaultConfigsClientPutOptions struct { + XMSAuthorizationAuxiliary *string +} + +// BackupResourceVaultConfigsClientUpdateOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Update +// method. +type BackupResourceVaultConfigsClientUpdateOptions struct { + XMSAuthorizationAuxiliary *string +} + +// BackupStatusClientGetOptions contains the optional parameters for the BackupStatusClient.Get method. +type BackupStatusClientGetOptions struct { + // placeholder for future optional parameters +} + +// BackupUsageSummariesClientListOptions contains the optional parameters for the BackupUsageSummariesClient.NewListPager +// method. +type BackupUsageSummariesClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupWorkloadItemsClientListOptions contains the optional parameters for the BackupWorkloadItemsClient.NewListPager method. +type BackupWorkloadItemsClientListOptions struct { + // OData filter options. + Filter *string + + // skipToken Filter. + SkipToken *string +} + +// BackupsClientTriggerOptions contains the optional parameters for the BackupsClient.Trigger method. +type BackupsClientTriggerOptions struct { + // placeholder for future optional parameters +} + +// ClientBeginBMSPrepareDataMoveOptions contains the optional parameters for the Client.BeginBMSPrepareDataMove method. +type ClientBeginBMSPrepareDataMoveOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ClientBeginBMSTriggerDataMoveOptions contains the optional parameters for the Client.BeginBMSTriggerDataMove method. +type ClientBeginBMSTriggerDataMoveOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ClientBeginMoveRecoveryPointOptions contains the optional parameters for the Client.BeginMoveRecoveryPoint method. +type ClientBeginMoveRecoveryPointOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ClientGetOperationStatusOptions contains the optional parameters for the Client.GetOperationStatus method. +type ClientGetOperationStatusOptions struct { + // placeholder for future optional parameters +} + +// DeletedProtectionContainersClientListOptions contains the optional parameters for the DeletedProtectionContainersClient.NewListPager +// method. +type DeletedProtectionContainersClientListOptions struct { + // OData filter options. + Filter *string +} + +// ExportJobsOperationResultsClientGetOptions contains the optional parameters for the ExportJobsOperationResultsClient.Get +// method. +type ExportJobsOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FeatureSupportClientValidateOptions contains the optional parameters for the FeatureSupportClient.Validate method. +type FeatureSupportClientValidateOptions struct { + // placeholder for future optional parameters +} + +// FetchTieringCostClientBeginPostOptions contains the optional parameters for the FetchTieringCostClient.BeginPost method. +type FetchTieringCostClientBeginPostOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// GetTieringCostOperationResultClientGetOptions contains the optional parameters for the GetTieringCostOperationResultClient.Get +// method. +type GetTieringCostOperationResultClientGetOptions struct { + // placeholder for future optional parameters +} + +// ItemLevelRecoveryConnectionsClientProvisionOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Provision +// method. +type ItemLevelRecoveryConnectionsClientProvisionOptions struct { + // placeholder for future optional parameters +} + +// ItemLevelRecoveryConnectionsClientRevokeOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Revoke +// method. +type ItemLevelRecoveryConnectionsClientRevokeOptions struct { + // placeholder for future optional parameters +} + +// JobCancellationsClientTriggerOptions contains the optional parameters for the JobCancellationsClient.Trigger method. +type JobCancellationsClientTriggerOptions struct { + // placeholder for future optional parameters +} + +// JobDetailsClientGetOptions contains the optional parameters for the JobDetailsClient.Get method. +type JobDetailsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobOperationResultsClientGetOptions contains the optional parameters for the JobOperationResultsClient.Get method. +type JobOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobsClientExportOptions contains the optional parameters for the JobsClient.Export method. +type JobsClientExportOptions struct { + // OData filter options. + Filter *string +} + +// OperationClientValidateOptions contains the optional parameters for the OperationClient.Validate method. +type OperationClientValidateOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointClientGetOperationStatusOptions contains the optional parameters for the PrivateEndpointClient.GetOperationStatus +// method. +type PrivateEndpointClientGetOperationStatusOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete +// method. +type PrivateEndpointConnectionClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionClientBeginPutOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginPut +// method. +type PrivateEndpointConnectionClientBeginPutOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionClientGetOptions contains the optional parameters for the PrivateEndpointConnectionClient.Get +// method. +type PrivateEndpointConnectionClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectableContainersClientListOptions contains the optional parameters for the ProtectableContainersClient.NewListPager +// method. +type ProtectableContainersClientListOptions struct { + // OData filter options. + Filter *string +} + +// ProtectedItemOperationResultsClientGetOptions contains the optional parameters for the ProtectedItemOperationResultsClient.Get +// method. +type ProtectedItemOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectedItemOperationStatusesClientGetOptions contains the optional parameters for the ProtectedItemOperationStatusesClient.Get +// method. +type ProtectedItemOperationStatusesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectedItemsClientCreateOrUpdateOptions contains the optional parameters for the ProtectedItemsClient.CreateOrUpdate +// method. +type ProtectedItemsClientCreateOrUpdateOptions struct { + XMSAuthorizationAuxiliary *string +} + +// ProtectedItemsClientDeleteOptions contains the optional parameters for the ProtectedItemsClient.Delete method. +type ProtectedItemsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProtectedItemsClientGetOptions contains the optional parameters for the ProtectedItemsClient.Get method. +type ProtectedItemsClientGetOptions struct { + // OData filter options. + Filter *string +} + +// ProtectionContainerOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerOperationResultsClient.Get +// method. +type ProtectionContainerOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionContainerRefreshOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerRefreshOperationResultsClient.Get +// method. +type ProtectionContainerRefreshOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionContainersClientBeginRegisterOptions contains the optional parameters for the ProtectionContainersClient.BeginRegister +// method. +type ProtectionContainersClientBeginRegisterOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ProtectionContainersClientGetOptions contains the optional parameters for the ProtectionContainersClient.Get method. +type ProtectionContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionContainersClientInquireOptions contains the optional parameters for the ProtectionContainersClient.Inquire method. +type ProtectionContainersClientInquireOptions struct { + // OData filter options. + Filter *string +} + +// ProtectionContainersClientRefreshOptions contains the optional parameters for the ProtectionContainersClient.Refresh method. +type ProtectionContainersClientRefreshOptions struct { + // OData filter options. + Filter *string +} + +// ProtectionContainersClientUnregisterOptions contains the optional parameters for the ProtectionContainersClient.Unregister +// method. +type ProtectionContainersClientUnregisterOptions struct { + // placeholder for future optional parameters +} + +// ProtectionIntentClientCreateOrUpdateOptions contains the optional parameters for the ProtectionIntentClient.CreateOrUpdate +// method. +type ProtectionIntentClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProtectionIntentClientDeleteOptions contains the optional parameters for the ProtectionIntentClient.Delete method. +type ProtectionIntentClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ProtectionIntentClientGetOptions contains the optional parameters for the ProtectionIntentClient.Get method. +type ProtectionIntentClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionIntentClientValidateOptions contains the optional parameters for the ProtectionIntentClient.Validate method. +type ProtectionIntentClientValidateOptions struct { + // placeholder for future optional parameters +} + +// ProtectionPoliciesClientBeginDeleteOptions contains the optional parameters for the ProtectionPoliciesClient.BeginDelete +// method. +type ProtectionPoliciesClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ProtectionPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ProtectionPoliciesClient.CreateOrUpdate +// method. +type ProtectionPoliciesClientCreateOrUpdateOptions struct { + XMSAuthorizationAuxiliary *string +} + +// ProtectionPoliciesClientGetOptions contains the optional parameters for the ProtectionPoliciesClient.Get method. +type ProtectionPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionPolicyOperationResultsClientGetOptions contains the optional parameters for the ProtectionPolicyOperationResultsClient.Get +// method. +type ProtectionPolicyOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProtectionPolicyOperationStatusesClientGetOptions contains the optional parameters for the ProtectionPolicyOperationStatusesClient.Get +// method. +type ProtectionPolicyOperationStatusesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. +type RecoveryPointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.NewListPager method. +type RecoveryPointsClientListOptions struct { + // OData filter options. + Filter *string +} + +// RecoveryPointsRecommendedForMoveClientListOptions contains the optional parameters for the RecoveryPointsRecommendedForMoveClient.NewListPager +// method. +type RecoveryPointsRecommendedForMoveClientListOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardProxiesClientGetOptions contains the optional parameters for the ResourceGuardProxiesClient.NewGetPager method. +type ResourceGuardProxiesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardProxyClientDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.Delete method. +type ResourceGuardProxyClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardProxyClientGetOptions contains the optional parameters for the ResourceGuardProxyClient.Get method. +type ResourceGuardProxyClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardProxyClientPutOptions contains the optional parameters for the ResourceGuardProxyClient.Put method. +type ResourceGuardProxyClientPutOptions struct { + // placeholder for future optional parameters +} + +// ResourceGuardProxyClientUnlockDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.UnlockDelete +// method. +type ResourceGuardProxyClientUnlockDeleteOptions struct { + // placeholder for future optional parameters +} + +// RestoresClientBeginTriggerOptions contains the optional parameters for the RestoresClient.BeginTrigger method. +type RestoresClientBeginTriggerOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string + XMSAuthorizationAuxiliary *string +} + +// SecurityPINsClientGetOptions contains the optional parameters for the SecurityPINsClient.Get method. +type SecurityPINsClientGetOptions struct { + // security pin request + Parameters *SecurityPinBase + XMSAuthorizationAuxiliary *string +} + +// TieringCostOperationStatusClientGetOptions contains the optional parameters for the TieringCostOperationStatusClient.Get +// method. +type TieringCostOperationStatusClientGetOptions struct { + // placeholder for future optional parameters +} + +// ValidateOperationClientBeginTriggerOptions contains the optional parameters for the ValidateOperationClient.BeginTrigger +// method. +type ValidateOperationClientBeginTriggerOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ValidateOperationResultsClientGetOptions contains the optional parameters for the ValidateOperationResultsClient.Get method. +type ValidateOperationResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ValidateOperationStatusesClientGetOptions contains the optional parameters for the ValidateOperationStatusesClient.Get +// method. +type ValidateOperationStatusesClientGetOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/polymorphic_helpers.go new file mode 100644 index 00000000..180bdf60 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/polymorphic_helpers.go @@ -0,0 +1,620 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import "encoding/json" + +func unmarshalBackupEngineBaseClassification(rawMsg json.RawMessage) (BackupEngineBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BackupEngineBaseClassification + switch m["backupEngineType"] { + case string(BackupEngineTypeAzureBackupServerEngine): + b = &AzureBackupServerEngine{} + case string(BackupEngineTypeDpmBackupEngine): + b = &DpmBackupEngine{} + default: + b = &BackupEngineBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalBackupRequestClassification(rawMsg json.RawMessage) (BackupRequestClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BackupRequestClassification + switch m["objectType"] { + case "AzureFileShareBackupRequest": + b = &AzureFileShareBackupRequest{} + case "AzureWorkloadBackupRequest": + b = &AzureWorkloadBackupRequest{} + case "IaasVMBackupRequest": + b = &IaasVMBackupRequest{} + default: + b = &BackupRequest{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalILRRequestClassification(rawMsg json.RawMessage) (ILRRequestClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ILRRequestClassification + switch m["objectType"] { + case "AzureFileShareProvisionILRRequest": + b = &AzureFileShareProvisionILRRequest{} + case "IaasVMILRRegistrationRequest": + b = &IaasVMILRRegistrationRequest{} + default: + b = &ILRRequest{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalJobClassification(rawMsg json.RawMessage) (JobClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b JobClassification + switch m["jobType"] { + case "AzureIaaSVMJob": + b = &AzureIaaSVMJob{} + case "AzureIaaSVMJobV2": + b = &AzureIaaSVMJobV2{} + case "AzureStorageJob": + b = &AzureStorageJob{} + case "AzureWorkloadJob": + b = &AzureWorkloadJob{} + case "DpmJob": + b = &DpmJob{} + case "MabJob": + b = &MabJob{} + case "VaultJob": + b = &VaultJob{} + default: + b = &Job{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalOperationResultInfoBaseClassification(rawMsg json.RawMessage) (OperationResultInfoBaseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b OperationResultInfoBaseClassification + switch m["objectType"] { + case "ExportJobsOperationResultInfo": + b = &ExportJobsOperationResultInfo{} + case "OperationResultInfo": + b = &OperationResultInfo{} + default: + b = &OperationResultInfoBase{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalOperationStatusExtendedInfoClassification(rawMsg json.RawMessage) (OperationStatusExtendedInfoClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b OperationStatusExtendedInfoClassification + switch m["objectType"] { + case "OperationStatusJobExtendedInfo": + b = &OperationStatusJobExtendedInfo{} + case "OperationStatusJobsExtendedInfo": + b = &OperationStatusJobsExtendedInfo{} + case "OperationStatusProvisionILRExtendedInfo": + b = &OperationStatusProvisionILRExtendedInfo{} + case "OperationStatusValidateOperationExtendedInfo": + b = &OperationStatusValidateOperationExtendedInfo{} + default: + b = &OperationStatusExtendedInfo{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalProtectableContainerClassification(rawMsg json.RawMessage) (ProtectableContainerClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ProtectableContainerClassification + switch m["protectableContainerType"] { + case string(ProtectableContainerTypeStorageContainer): + b = &AzureStorageProtectableContainer{} + case string(ProtectableContainerTypeVMAppContainer): + b = &AzureVMAppContainerProtectableContainer{} + default: + b = &ProtectableContainer{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalProtectedItemClassification(rawMsg json.RawMessage) (ProtectedItemClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ProtectedItemClassification + switch m["protectedItemType"] { + case "AzureFileShareProtectedItem": + b = &AzureFileshareProtectedItem{} + case "AzureIaaSVMProtectedItem": + b = &AzureIaaSVMProtectedItem{} + case "AzureVmWorkloadProtectedItem": + b = &AzureVMWorkloadProtectedItem{} + case "AzureVmWorkloadSAPAseDatabase": + b = &AzureVMWorkloadSAPAseDatabaseProtectedItem{} + case "AzureVmWorkloadSAPHanaDBInstance": + b = &AzureVMWorkloadSAPHanaDBInstanceProtectedItem{} + case "AzureVmWorkloadSAPHanaDatabase": + b = &AzureVMWorkloadSAPHanaDatabaseProtectedItem{} + case "AzureVmWorkloadSQLDatabase": + b = &AzureVMWorkloadSQLDatabaseProtectedItem{} + case "DPMProtectedItem": + b = &DPMProtectedItem{} + case "GenericProtectedItem": + b = &GenericProtectedItem{} + case "MabFileFolderProtectedItem": + b = &MabFileFolderProtectedItem{} + case "Microsoft.ClassicCompute/virtualMachines": + b = &AzureIaaSClassicComputeVMProtectedItem{} + case "Microsoft.Compute/virtualMachines": + b = &AzureIaaSComputeVMProtectedItem{} + case "Microsoft.Sql/servers/databases": + b = &AzureSQLProtectedItem{} + default: + b = &ProtectedItem{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalProtectionContainerClassification(rawMsg json.RawMessage) (ProtectionContainerClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ProtectionContainerClassification + switch m["containerType"] { + case string(ProtectableContainerTypeAzureBackupServerContainer): + b = &AzureBackupServerContainer{} + case string(ProtectableContainerTypeAzureSQLContainer): + b = &AzureSQLContainer{} + case string(ProtectableContainerTypeAzureWorkloadContainer): + b = &AzureWorkloadContainer{} + case string(ProtectableContainerTypeDPMContainer): + b = &DpmContainer{} + case string(ProtectableContainerTypeGenericContainer): + b = &GenericContainer{} + case string(ProtectableContainerTypeIaasVMContainer): + b = &IaaSVMContainer{} + case string(ProtectableContainerTypeMicrosoftClassicComputeVirtualMachines): + b = &AzureIaaSClassicComputeVMContainer{} + case string(ProtectableContainerTypeMicrosoftComputeVirtualMachines): + b = &AzureIaaSComputeVMContainer{} + case string(ProtectableContainerTypeSQLAGWorkLoadContainer): + b = &AzureSQLAGWorkloadContainerProtectionContainer{} + case string(ProtectableContainerTypeStorageContainer): + b = &AzureStorageContainer{} + case string(ProtectableContainerTypeVMAppContainer): + b = &AzureVMAppContainerProtectionContainer{} + case string(ProtectableContainerTypeWindows): + b = &MabContainer{} + default: + b = &ProtectionContainer{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalProtectionIntentClassification(rawMsg json.RawMessage) (ProtectionIntentClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ProtectionIntentClassification + switch m["protectionIntentItemType"] { + case "ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent": + b = &AzureWorkloadAutoProtectionIntent{} + case "ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent": + b = &AzureWorkloadSQLAutoProtectionIntent{} + case string(ProtectionIntentItemTypeAzureResourceItem): + b = &AzureResourceProtectionIntent{} + case string(ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent): + b = &AzureWorkloadContainerAutoProtectionIntent{} + case string(ProtectionIntentItemTypeRecoveryServiceVaultItem): + b = &AzureRecoveryServiceVaultProtectionIntent{} + default: + b = &ProtectionIntent{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalProtectionPolicyClassification(rawMsg json.RawMessage) (ProtectionPolicyClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ProtectionPolicyClassification + switch m["backupManagementType"] { + case "AzureIaasVM": + b = &AzureIaaSVMProtectionPolicy{} + case "AzureSql": + b = &AzureSQLProtectionPolicy{} + case "AzureStorage": + b = &AzureFileShareProtectionPolicy{} + case "AzureWorkload": + b = &AzureVMWorkloadProtectionPolicy{} + case "GenericProtectionPolicy": + b = &GenericProtectionPolicy{} + case "MAB": + b = &MabProtectionPolicy{} + default: + b = &ProtectionPolicy{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRecoveryPointClassification(rawMsg json.RawMessage) (RecoveryPointClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RecoveryPointClassification + switch m["objectType"] { + case "AzureFileShareRecoveryPoint": + b = &AzureFileShareRecoveryPoint{} + case "AzureWorkloadPointInTimeRecoveryPoint": + b = &AzureWorkloadPointInTimeRecoveryPoint{} + case "AzureWorkloadRecoveryPoint": + b = &AzureWorkloadRecoveryPoint{} + case "AzureWorkloadSAPAsePointInTimeRecoveryPoint": + b = &AzureWorkloadSAPAsePointInTimeRecoveryPoint{} + case "AzureWorkloadSAPAseRecoveryPoint": + b = &AzureWorkloadSAPAseRecoveryPoint{} + case "AzureWorkloadSAPHanaPointInTimeRecoveryPoint": + b = &AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} + case "AzureWorkloadSAPHanaRecoveryPoint": + b = &AzureWorkloadSAPHanaRecoveryPoint{} + case "AzureWorkloadSQLPointInTimeRecoveryPoint": + b = &AzureWorkloadSQLPointInTimeRecoveryPoint{} + case "AzureWorkloadSQLRecoveryPoint": + b = &AzureWorkloadSQLRecoveryPoint{} + case "GenericRecoveryPoint": + b = &GenericRecoveryPoint{} + case "IaasVMRecoveryPoint": + b = &IaasVMRecoveryPoint{} + default: + b = &RecoveryPoint{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRestoreRequestClassification(rawMsg json.RawMessage) (RestoreRequestClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RestoreRequestClassification + switch m["objectType"] { + case "AzureFileShareRestoreRequest": + b = &AzureFileShareRestoreRequest{} + case "AzureWorkloadPointInTimeRestoreRequest": + b = &AzureWorkloadPointInTimeRestoreRequest{} + case "AzureWorkloadRestoreRequest": + b = &AzureWorkloadRestoreRequest{} + case "AzureWorkloadSAPAsePointInTimeRestoreRequest": + b = &AzureWorkloadSAPAsePointInTimeRestoreRequest{} + case "AzureWorkloadSAPAseRestoreRequest": + b = &AzureWorkloadSAPAseRestoreRequest{} + case "AzureWorkloadSAPHanaPointInTimeRestoreRequest": + b = &AzureWorkloadSAPHanaPointInTimeRestoreRequest{} + case "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest": + b = &AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} + case "AzureWorkloadSAPHanaRestoreRequest": + b = &AzureWorkloadSAPHanaRestoreRequest{} + case "AzureWorkloadSAPHanaRestoreWithRehydrateRequest": + b = &AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} + case "AzureWorkloadSQLPointInTimeRestoreRequest": + b = &AzureWorkloadSQLPointInTimeRestoreRequest{} + case "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest": + b = &AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} + case "AzureWorkloadSQLRestoreRequest": + b = &AzureWorkloadSQLRestoreRequest{} + case "AzureWorkloadSQLRestoreWithRehydrateRequest": + b = &AzureWorkloadSQLRestoreWithRehydrateRequest{} + case "IaasVMRestoreRequest": + b = &IaasVMRestoreRequest{} + case "IaasVMRestoreWithRehydrationRequest": + b = &IaasVMRestoreWithRehydrationRequest{} + default: + b = &RestoreRequest{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRetentionPolicyClassification(rawMsg json.RawMessage) (RetentionPolicyClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RetentionPolicyClassification + switch m["retentionPolicyType"] { + case "LongTermRetentionPolicy": + b = &LongTermRetentionPolicy{} + case "SimpleRetentionPolicy": + b = &SimpleRetentionPolicy{} + default: + b = &RetentionPolicy{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalSchedulePolicyClassification(rawMsg json.RawMessage) (SchedulePolicyClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SchedulePolicyClassification + switch m["schedulePolicyType"] { + case "LogSchedulePolicy": + b = &LogSchedulePolicy{} + case "LongTermSchedulePolicy": + b = &LongTermSchedulePolicy{} + case "SimpleSchedulePolicy": + b = &SimpleSchedulePolicy{} + case "SimpleSchedulePolicyV2": + b = &SimpleSchedulePolicyV2{} + default: + b = &SchedulePolicy{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalTieringCostInfoClassification(rawMsg json.RawMessage) (TieringCostInfoClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b TieringCostInfoClassification + switch m["objectType"] { + case "TieringCostRehydrationInfo": + b = &TieringCostRehydrationInfo{} + case "TieringCostSavingInfo": + b = &TieringCostSavingInfo{} + default: + b = &TieringCostInfo{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalValidateOperationRequestClassification(rawMsg json.RawMessage) (ValidateOperationRequestClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ValidateOperationRequestClassification + switch m["objectType"] { + case "ValidateIaasVMRestoreOperationRequest": + b = &ValidateIaasVMRestoreOperationRequest{} + case "ValidateRestoreOperationRequest": + b = &ValidateRestoreOperationRequest{} + default: + b = &ValidateOperationRequest{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalVaultStorageConfigOperationResultResponseClassification(rawMsg json.RawMessage) (VaultStorageConfigOperationResultResponseClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b VaultStorageConfigOperationResultResponseClassification + switch m["objectType"] { + case "PrepareDataMoveResponse": + b = &PrepareDataMoveResponse{} + default: + b = &VaultStorageConfigOperationResultResponse{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalWorkloadItemClassification(rawMsg json.RawMessage) (WorkloadItemClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b WorkloadItemClassification + switch m["workloadItemType"] { + case "AzureVmWorkloadItem": + b = &AzureVMWorkloadItem{} + case "SAPAseDatabase": + b = &AzureVMWorkloadSAPAseDatabaseWorkloadItem{} + case "SAPAseSystem": + b = &AzureVMWorkloadSAPAseSystemWorkloadItem{} + case "SAPHanaDatabase": + b = &AzureVMWorkloadSAPHanaDatabaseWorkloadItem{} + case "SAPHanaSystem": + b = &AzureVMWorkloadSAPHanaSystemWorkloadItem{} + case "SQLDataBase": + b = &AzureVMWorkloadSQLDatabaseWorkloadItem{} + case "SQLInstance": + b = &AzureVMWorkloadSQLInstanceWorkloadItem{} + default: + b = &WorkloadItem{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalWorkloadProtectableItemClassification(rawMsg json.RawMessage) (WorkloadProtectableItemClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b WorkloadProtectableItemClassification + switch m["protectableItemType"] { + case "AzureFileShare": + b = &AzureFileShareProtectableItem{} + case "AzureVmWorkloadProtectableItem": + b = &AzureVMWorkloadProtectableItem{} + case "HanaHSRContainer": + b = &AzureVMWorkloadSAPHanaHSRProtectableItem{} + case "IaaSVMProtectableItem": + b = &IaaSVMProtectableItem{} + case "Microsoft.ClassicCompute/virtualMachines": + b = &AzureIaaSClassicComputeVMProtectableItem{} + case "Microsoft.Compute/virtualMachines": + b = &AzureIaaSComputeVMProtectableItem{} + case "SAPAseDatabase": + b = &AzureVMWorkloadSAPAseDatabaseProtectableItem{} + case "SAPAseSystem": + b = &AzureVMWorkloadSAPAseSystemProtectableItem{} + case "SAPHanaDBInstance": + b = &AzureVMWorkloadSAPHanaDBInstance{} + case "SAPHanaDatabase": + b = &AzureVMWorkloadSAPHanaDatabaseProtectableItem{} + case "SAPHanaSystem": + b = &AzureVMWorkloadSAPHanaSystemProtectableItem{} + case "SQLAvailabilityGroupContainer": + b = &AzureVMWorkloadSQLAvailabilityGroupProtectableItem{} + case "SQLDataBase": + b = &AzureVMWorkloadSQLDatabaseProtectableItem{} + case "SQLInstance": + b = &AzureVMWorkloadSQLInstanceProtectableItem{} + default: + b = &WorkloadProtectableItem{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/privateendpoint_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/privateendpoint_client.go new file mode 100644 index 00000000..796f6661 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/privateendpoint_client.go @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PrivateEndpointClient contains the methods for the PrivateEndpoint group. +// Don't use this type directly, use NewPrivateEndpointClient() instead. +type PrivateEndpointClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateEndpointClient creates a new instance of PrivateEndpointClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateEndpointClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateEndpointClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// GetOperationStatus - Gets the operation status for a private endpoint connection. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - operationID - Operation id +// - options - PrivateEndpointClientGetOperationStatusOptions contains the optional parameters for the PrivateEndpointClient.GetOperationStatus +// method. +func (client *PrivateEndpointClient) GetOperationStatus(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, operationID string, options *PrivateEndpointClientGetOperationStatusOptions) (PrivateEndpointClientGetOperationStatusResponse, error) { + var err error + const operationName = "PrivateEndpointClient.GetOperationStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getOperationStatusCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, operationID, options) + if err != nil { + return PrivateEndpointClientGetOperationStatusResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointClientGetOperationStatusResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointClientGetOperationStatusResponse{}, err + } + resp, err := client.getOperationStatusHandleResponse(httpResp) + return resp, err +} + +// getOperationStatusCreateRequest creates the GetOperationStatus request. +func (client *PrivateEndpointClient) getOperationStatusCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, operationID string, _ *PrivateEndpointClientGetOperationStatusOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getOperationStatusHandleResponse handles the GetOperationStatus response. +func (client *PrivateEndpointClient) getOperationStatusHandleResponse(resp *http.Response) (PrivateEndpointClientGetOperationStatusResponse, error) { + result := PrivateEndpointClientGetOperationStatusResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { + return PrivateEndpointClientGetOperationStatusResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/privateendpointconnection_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/privateendpointconnection_client.go new file mode 100644 index 00000000..3d92370a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/privateendpointconnection_client.go @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// PrivateEndpointConnectionClient contains the methods for the PrivateEndpointConnection group. +// Don't use this type directly, use NewPrivateEndpointConnectionClient() instead. +type PrivateEndpointConnectionClient struct { + internal *arm.Client + subscriptionID string +} + +// NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewPrivateEndpointConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &PrivateEndpointConnectionClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginDelete - Delete Private Endpoint requests. This call is made by Backup Admin. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - options - PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete +// method. +func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete Private Endpoint requests. This call is made by Backup Admin. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +func (client *PrivateEndpointConnectionClient) deleteOperation(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointConnectionClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *PrivateEndpointConnectionClient) deleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, _ *PrivateEndpointConnectionClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get Private Endpoint Connection. This call is made by Backup Admin. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - options - PrivateEndpointConnectionClientGetOptions contains the optional parameters for the PrivateEndpointConnectionClient.Get +// method. +func (client *PrivateEndpointConnectionClient) Get(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientGetOptions) (PrivateEndpointConnectionClientGetResponse, error) { + var err error + const operationName = "PrivateEndpointConnectionClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, options) + if err != nil { + return PrivateEndpointConnectionClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return PrivateEndpointConnectionClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *PrivateEndpointConnectionClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, _ *PrivateEndpointConnectionClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *PrivateEndpointConnectionClient) getHandleResponse(resp *http.Response) (PrivateEndpointConnectionClientGetResponse, error) { + result := PrivateEndpointConnectionClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionResource); err != nil { + return PrivateEndpointConnectionClientGetResponse{}, err + } + return result, nil +} + +// BeginPut - Approve or Reject Private Endpoint requests. This call is made by Backup Admin. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - privateEndpointConnectionName - The name of the private endpoint connection. +// - parameters - Request body for operation +// - options - PrivateEndpointConnectionClientBeginPutOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginPut +// method. +func (client *PrivateEndpointConnectionClient) BeginPut(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, parameters PrivateEndpointConnectionResource, options *PrivateEndpointConnectionClientBeginPutOptions) (*runtime.Poller[PrivateEndpointConnectionClientPutResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.put(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PrivateEndpointConnectionClientPutResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PrivateEndpointConnectionClientPutResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Put - Approve or Reject Private Endpoint requests. This call is made by Backup Admin. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +func (client *PrivateEndpointConnectionClient) put(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, parameters PrivateEndpointConnectionResource, options *PrivateEndpointConnectionClientBeginPutOptions) (*http.Response, error) { + var err error + const operationName = "PrivateEndpointConnectionClient.BeginPut" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.putCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// putCreateRequest creates the Put request. +func (client *PrivateEndpointConnectionClient) putCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, parameters PrivateEndpointConnectionResource, _ *PrivateEndpointConnectionClientBeginPutOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if privateEndpointConnectionName == "" { + return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectablecontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectablecontainers_client.go new file mode 100644 index 00000000..5ee7a765 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectablecontainers_client.go @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectableContainersClient contains the methods for the ProtectableContainers group. +// Don't use this type directly, use NewProtectableContainersClient() instead. +type ProtectableContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectableContainersClient creates a new instance of ProtectableContainersClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectableContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectableContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectableContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Lists the containers that can be registered to Recovery Services Vault. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - ProtectableContainersClientListOptions contains the optional parameters for the ProtectableContainersClient.NewListPager +// method. +func (client *ProtectableContainersClient) NewListPager(vaultName string, resourceGroupName string, fabricName string, options *ProtectableContainersClientListOptions) *runtime.Pager[ProtectableContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ProtectableContainersClientListResponse]{ + More: func(page ProtectableContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ProtectableContainersClientListResponse) (ProtectableContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProtectableContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, fabricName, options) + }, nil) + if err != nil { + return ProtectableContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ProtectableContainersClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, options *ProtectableContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ProtectableContainersClient) listHandleResponse(resp *http.Response) (ProtectableContainersClientListResponse, error) { + result := ProtectableContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectableContainerResourceList); err != nil { + return ProtectableContainersClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protecteditemoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protecteditemoperationresults_client.go new file mode 100644 index 00000000..a744a0c8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protecteditemoperationresults_client.go @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectedItemOperationResultsClient contains the methods for the ProtectedItemOperationResults group. +// Don't use this type directly, use NewProtectedItemOperationResultsClient() instead. +type ProtectedItemOperationResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectedItemOperationResultsClient creates a new instance of ProtectedItemOperationResultsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectedItemOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectedItemOperationResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectedItemOperationResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches the result of any operation on the backup item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backup item. +// - containerName - Container name associated with the backup item. +// - protectedItemName - Backup item name whose details are to be fetched. +// - operationID - OperationID which represents the operation whose result needs to be fetched. +// - options - ProtectedItemOperationResultsClientGetOptions contains the optional parameters for the ProtectedItemOperationResultsClient.Get +// method. +func (client *ProtectedItemOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string, options *ProtectedItemOperationResultsClientGetOptions) (ProtectedItemOperationResultsClientGetResponse, error) { + var err error + const operationName = "ProtectedItemOperationResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID, options) + if err != nil { + return ProtectedItemOperationResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectedItemOperationResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectedItemOperationResultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProtectedItemOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string, _ *ProtectedItemOperationResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProtectedItemOperationResultsClient) getHandleResponse(resp *http.Response) (ProtectedItemOperationResultsClientGetResponse, error) { + result := ProtectedItemOperationResultsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectedItemResource); err != nil { + return ProtectedItemOperationResultsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protecteditemoperationstatuses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protecteditemoperationstatuses_client.go new file mode 100644 index 00000000..e2d4e4af --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protecteditemoperationstatuses_client.go @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectedItemOperationStatusesClient contains the methods for the ProtectedItemOperationStatuses group. +// Don't use this type directly, use NewProtectedItemOperationStatusesClient() instead. +type ProtectedItemOperationStatusesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectedItemOperationStatusesClient creates a new instance of ProtectedItemOperationStatusesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectedItemOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectedItemOperationStatusesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectedItemOperationStatusesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed +// or failed. You can refer to the OperationStatus enum for all the possible states of +// the operation. Some operations create jobs. This method returns the list of jobs associated with the operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backup item. +// - containerName - Container name associated with the backup item. +// - protectedItemName - Backup item name whose details are to be fetched. +// - operationID - OperationID represents the operation whose status needs to be fetched. +// - options - ProtectedItemOperationStatusesClientGetOptions contains the optional parameters for the ProtectedItemOperationStatusesClient.Get +// method. +func (client *ProtectedItemOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string, options *ProtectedItemOperationStatusesClientGetOptions) (ProtectedItemOperationStatusesClientGetResponse, error) { + var err error + const operationName = "ProtectedItemOperationStatusesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID, options) + if err != nil { + return ProtectedItemOperationStatusesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectedItemOperationStatusesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectedItemOperationStatusesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProtectedItemOperationStatusesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string, _ *ProtectedItemOperationStatusesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProtectedItemOperationStatusesClient) getHandleResponse(resp *http.Response) (ProtectedItemOperationStatusesClientGetResponse, error) { + result := ProtectedItemOperationStatusesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { + return ProtectedItemOperationStatusesClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protecteditems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protecteditems_client.go new file mode 100644 index 00000000..9172ec2f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protecteditems_client.go @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectedItemsClient contains the methods for the ProtectedItems group. +// Don't use this type directly, use NewProtectedItemsClient() instead. +type ProtectedItemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectedItemsClient creates a new instance of ProtectedItemsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectedItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectedItemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectedItemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Enables backup of an item or to modifies the backup policy information of an already backed up item. This +// is an asynchronous operation. To know the status of the operation, call the +// GetItemOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backup item. +// - containerName - Container name associated with the backup item. +// - protectedItemName - Item name to be backed up. +// - parameters - resource backed up item +// - options - ProtectedItemsClientCreateOrUpdateOptions contains the optional parameters for the ProtectedItemsClient.CreateOrUpdate +// method. +func (client *ProtectedItemsClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ProtectedItemResource, options *ProtectedItemsClientCreateOrUpdateOptions) (ProtectedItemsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProtectedItemsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, options) + if err != nil { + return ProtectedItemsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectedItemsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ProtectedItemsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ProtectedItemsClient) createOrUpdateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ProtectedItemResource, options *ProtectedItemsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ProtectedItemsClient) createOrUpdateHandleResponse(resp *http.Response) (ProtectedItemsClientCreateOrUpdateResponse, error) { + result := ProtectedItemsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectedItemResource); err != nil { + return ProtectedItemsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of +// the request, call the GetItemOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backed up item. +// - containerName - Container name associated with the backed up item. +// - protectedItemName - Backed up item to be deleted. +// - options - ProtectedItemsClientDeleteOptions contains the optional parameters for the ProtectedItemsClient.Delete method. +func (client *ProtectedItemsClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *ProtectedItemsClientDeleteOptions) (ProtectedItemsClientDeleteResponse, error) { + var err error + const operationName = "ProtectedItemsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, options) + if err != nil { + return ProtectedItemsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectedItemsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectedItemsClientDeleteResponse{}, err + } + return ProtectedItemsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ProtectedItemsClient) deleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, _ *ProtectedItemsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, +// call the GetItemOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backed up item. +// - containerName - Container name associated with the backed up item. +// - protectedItemName - Backed up item name whose details are to be fetched. +// - options - ProtectedItemsClientGetOptions contains the optional parameters for the ProtectedItemsClient.Get method. +func (client *ProtectedItemsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *ProtectedItemsClientGetOptions) (ProtectedItemsClientGetResponse, error) { + var err error + const operationName = "ProtectedItemsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, options) + if err != nil { + return ProtectedItemsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectedItemsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectedItemsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProtectedItemsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *ProtectedItemsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProtectedItemsClient) getHandleResponse(resp *http.Response) (ProtectedItemsClientGetResponse, error) { + result := ProtectedItemsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectedItemResource); err != nil { + return ProtectedItemsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectioncontaineroperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectioncontaineroperationresults_client.go new file mode 100644 index 00000000..08a44d33 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectioncontaineroperationresults_client.go @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectionContainerOperationResultsClient contains the methods for the ProtectionContainerOperationResults group. +// Don't use this type directly, use NewProtectionContainerOperationResultsClient() instead. +type ProtectionContainerOperationResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectionContainerOperationResultsClient creates a new instance of ProtectionContainerOperationResultsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectionContainerOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionContainerOperationResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectionContainerOperationResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches the result of any operation on the container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the container. +// - containerName - Container name whose information should be fetched. +// - operationID - Operation ID which represents the operation whose result needs to be fetched. +// - options - ProtectionContainerOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerOperationResultsClient.Get +// method. +func (client *ProtectionContainerOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string, options *ProtectionContainerOperationResultsClientGetOptions) (ProtectionContainerOperationResultsClientGetResponse, error) { + var err error + const operationName = "ProtectionContainerOperationResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, operationID, options) + if err != nil { + return ProtectionContainerOperationResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionContainerOperationResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainerOperationResultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProtectionContainerOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string, _ *ProtectionContainerOperationResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProtectionContainerOperationResultsClient) getHandleResponse(resp *http.Response) (ProtectionContainerOperationResultsClientGetResponse, error) { + result := ProtectionContainerOperationResultsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerResource); err != nil { + return ProtectionContainerOperationResultsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectioncontainerrefreshoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectioncontainerrefreshoperationresults_client.go new file mode 100644 index 00000000..b4c3b7d2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectioncontainerrefreshoperationresults_client.go @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectionContainerRefreshOperationResultsClient contains the methods for the ProtectionContainerRefreshOperationResults +// group. +// Don't use this type directly, use NewProtectionContainerRefreshOperationResultsClient() instead. +type ProtectionContainerRefreshOperationResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectionContainerRefreshOperationResultsClient creates a new instance of ProtectionContainerRefreshOperationResultsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionContainerRefreshOperationResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectionContainerRefreshOperationResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Provides the result of the refresh operation triggered by the BeginRefresh operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the container. +// - operationID - Operation ID associated with the operation whose result needs to be fetched. +// - options - ProtectionContainerRefreshOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerRefreshOperationResultsClient.Get +// method. +func (client *ProtectionContainerRefreshOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string, options *ProtectionContainerRefreshOperationResultsClientGetOptions) (ProtectionContainerRefreshOperationResultsClientGetResponse, error) { + var err error + const operationName = "ProtectionContainerRefreshOperationResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, operationID, options) + if err != nil { + return ProtectionContainerRefreshOperationResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionContainerRefreshOperationResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainerRefreshOperationResultsClientGetResponse{}, err + } + return ProtectionContainerRefreshOperationResultsClientGetResponse{}, nil +} + +// getCreateRequest creates the Get request. +func (client *ProtectionContainerRefreshOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string, _ *ProtectionContainerRefreshOperationResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectioncontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectioncontainers_client.go new file mode 100644 index 00000000..7e909fcb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectioncontainers_client.go @@ -0,0 +1,408 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectionContainersClient contains the methods for the ProtectionContainers group. +// Don't use this type directly, use NewProtectionContainersClient() instead. +type ProtectionContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectionContainersClient creates a new instance of ProtectionContainersClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectionContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectionContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets details of the specific container registered to your Recovery Services Vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Name of the fabric where the container belongs. +// - containerName - Name of the container whose details need to be fetched. +// - options - ProtectionContainersClientGetOptions contains the optional parameters for the ProtectionContainersClient.Get +// method. +func (client *ProtectionContainersClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientGetOptions) (ProtectionContainersClientGetResponse, error) { + var err error + const operationName = "ProtectionContainersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) + if err != nil { + return ProtectionContainersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProtectionContainersClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, _ *ProtectionContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProtectionContainersClient) getHandleResponse(resp *http.Response) (ProtectionContainersClientGetResponse, error) { + result := ProtectionContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerResource); err != nil { + return ProtectionContainersClientGetResponse{}, err + } + return result, nil +} + +// Inquire - This is an async operation and the results should be tracked using location header or Azure-async-url. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric Name associated with the container. +// - containerName - Name of the container in which inquiry needs to be triggered. +// - options - ProtectionContainersClientInquireOptions contains the optional parameters for the ProtectionContainersClient.Inquire +// method. +func (client *ProtectionContainersClient) Inquire(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientInquireOptions) (ProtectionContainersClientInquireResponse, error) { + var err error + const operationName = "ProtectionContainersClient.Inquire" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.inquireCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) + if err != nil { + return ProtectionContainersClientInquireResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionContainersClientInquireResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainersClientInquireResponse{}, err + } + return ProtectionContainersClientInquireResponse{}, nil +} + +// inquireCreateRequest creates the Inquire request. +func (client *ProtectionContainersClient) inquireCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientInquireOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Refresh - Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an +// asynchronous operation. To know the status of the operation, call +// GetRefreshOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated the container. +// - options - ProtectionContainersClientRefreshOptions contains the optional parameters for the ProtectionContainersClient.Refresh +// method. +func (client *ProtectionContainersClient) Refresh(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, options *ProtectionContainersClientRefreshOptions) (ProtectionContainersClientRefreshResponse, error) { + var err error + const operationName = "ProtectionContainersClient.Refresh" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.refreshCreateRequest(ctx, vaultName, resourceGroupName, fabricName, options) + if err != nil { + return ProtectionContainersClientRefreshResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionContainersClientRefreshResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainersClientRefreshResponse{}, err + } + return ProtectionContainersClientRefreshResponse{}, nil +} + +// refreshCreateRequest creates the Refresh request. +func (client *ProtectionContainersClient) refreshCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, options *ProtectionContainersClientRefreshOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginRegister - Registers the container with Recovery Services vault. This is an asynchronous operation. To track the operation +// status, use location header to call get latest status of the operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the container. +// - containerName - Name of the container to be registered. +// - parameters - Request body for operation +// - options - ProtectionContainersClientBeginRegisterOptions contains the optional parameters for the ProtectionContainersClient.BeginRegister +// method. +func (client *ProtectionContainersClient) BeginRegister(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters ProtectionContainerResource, options *ProtectionContainersClientBeginRegisterOptions) (*runtime.Poller[ProtectionContainersClientRegisterResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.register(ctx, vaultName, resourceGroupName, fabricName, containerName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProtectionContainersClientRegisterResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProtectionContainersClientRegisterResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Register - Registers the container with Recovery Services vault. This is an asynchronous operation. To track the operation +// status, use location header to call get latest status of the operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +func (client *ProtectionContainersClient) register(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters ProtectionContainerResource, options *ProtectionContainersClientBeginRegisterOptions) (*http.Response, error) { + var err error + const operationName = "ProtectionContainersClient.BeginRegister" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.registerCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// registerCreateRequest creates the Register request. +func (client *ProtectionContainersClient) registerCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters ProtectionContainerResource, _ *ProtectionContainersClientBeginRegisterOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// Unregister - Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine +// whether the backend service has finished processing the request, call Get Container +// Operation Result API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Name of the fabric where the container belongs. +// - containerName - Name of the container which needs to be unregistered from the Recovery Services Vault. +// - options - ProtectionContainersClientUnregisterOptions contains the optional parameters for the ProtectionContainersClient.Unregister +// method. +func (client *ProtectionContainersClient) Unregister(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientUnregisterOptions) (ProtectionContainersClientUnregisterResponse, error) { + var err error + const operationName = "ProtectionContainersClient.Unregister" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.unregisterCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) + if err != nil { + return ProtectionContainersClientUnregisterResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionContainersClientUnregisterResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectionContainersClientUnregisterResponse{}, err + } + return ProtectionContainersClientUnregisterResponse{}, nil +} + +// unregisterCreateRequest creates the Unregister request. +func (client *ProtectionContainersClient) unregisterCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, _ *ProtectionContainersClientUnregisterOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionintent_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionintent_client.go new file mode 100644 index 00000000..1a5be3d9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionintent_client.go @@ -0,0 +1,325 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectionIntentClient contains the methods for the ProtectionIntent group. +// Don't use this type directly, use NewProtectionIntentClient() instead. +type ProtectionIntentClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectionIntentClient creates a new instance of ProtectionIntentClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectionIntentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionIntentClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectionIntentClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create Intent for Enabling backup of an item. This is a synchronous operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backup item. +// - intentObjectName - Intent object name. +// - parameters - resource backed up item +// - options - ProtectionIntentClientCreateOrUpdateOptions contains the optional parameters for the ProtectionIntentClient.CreateOrUpdate +// method. +func (client *ProtectionIntentClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters ProtectionIntentResource, options *ProtectionIntentClientCreateOrUpdateOptions) (ProtectionIntentClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProtectionIntentClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, parameters, options) + if err != nil { + return ProtectionIntentClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionIntentClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionIntentClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ProtectionIntentClient) createOrUpdateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters ProtectionIntentResource, _ *ProtectionIntentClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if intentObjectName == "" { + return nil, errors.New("parameter intentObjectName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{intentObjectName}", url.PathEscape(intentObjectName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ProtectionIntentClient) createOrUpdateHandleResponse(resp *http.Response) (ProtectionIntentClientCreateOrUpdateResponse, error) { + result := ProtectionIntentClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionIntentResource); err != nil { + return ProtectionIntentClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Used to remove intent from an item +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the intent. +// - intentObjectName - Intent to be deleted. +// - options - ProtectionIntentClientDeleteOptions contains the optional parameters for the ProtectionIntentClient.Delete method. +func (client *ProtectionIntentClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, options *ProtectionIntentClientDeleteOptions) (ProtectionIntentClientDeleteResponse, error) { + var err error + const operationName = "ProtectionIntentClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, options) + if err != nil { + return ProtectionIntentClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionIntentClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ProtectionIntentClientDeleteResponse{}, err + } + return ProtectionIntentClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ProtectionIntentClient) deleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, _ *ProtectionIntentClientDeleteOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if intentObjectName == "" { + return nil, errors.New("parameter intentObjectName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{intentObjectName}", url.PathEscape(intentObjectName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the +// operation, call the GetItemOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backed up item. +// - intentObjectName - Backed up item name whose details are to be fetched. +// - options - ProtectionIntentClientGetOptions contains the optional parameters for the ProtectionIntentClient.Get method. +func (client *ProtectionIntentClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, options *ProtectionIntentClientGetOptions) (ProtectionIntentClientGetResponse, error) { + var err error + const operationName = "ProtectionIntentClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, options) + if err != nil { + return ProtectionIntentClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionIntentClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionIntentClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProtectionIntentClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, _ *ProtectionIntentClientGetOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if intentObjectName == "" { + return nil, errors.New("parameter intentObjectName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{intentObjectName}", url.PathEscape(intentObjectName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProtectionIntentClient) getHandleResponse(resp *http.Response) (ProtectionIntentClientGetResponse, error) { + result := ProtectionIntentClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionIntentResource); err != nil { + return ProtectionIntentClientGetResponse{}, err + } + return result, nil +} + +// Validate - It will validate followings +// 1. Vault capacity +// 2. VM is already protected +// 3. Any VM related configuration passed in properties. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - azureRegion - Azure region to hit Api +// - parameters - Enable backup validation request on Virtual Machine +// - options - ProtectionIntentClientValidateOptions contains the optional parameters for the ProtectionIntentClient.Validate +// method. +func (client *ProtectionIntentClient) Validate(ctx context.Context, azureRegion string, parameters PreValidateEnableBackupRequest, options *ProtectionIntentClientValidateOptions) (ProtectionIntentClientValidateResponse, error) { + var err error + const operationName = "ProtectionIntentClient.Validate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.validateCreateRequest(ctx, azureRegion, parameters, options) + if err != nil { + return ProtectionIntentClientValidateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionIntentClientValidateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionIntentClientValidateResponse{}, err + } + resp, err := client.validateHandleResponse(httpResp) + return resp, err +} + +// validateCreateRequest creates the Validate request. +func (client *ProtectionIntentClient) validateCreateRequest(ctx context.Context, azureRegion string, parameters PreValidateEnableBackupRequest, _ *ProtectionIntentClientValidateOptions) (*policy.Request, error) { + urlPath := "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection" + if azureRegion == "" { + return nil, errors.New("parameter azureRegion cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{azureRegion}", url.PathEscape(azureRegion)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// validateHandleResponse handles the Validate response. +func (client *ProtectionIntentClient) validateHandleResponse(resp *http.Response) (ProtectionIntentClientValidateResponse, error) { + result := ProtectionIntentClientValidateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PreValidateEnableBackupResponse); err != nil { + return ProtectionIntentClientValidateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionpolicies_client.go new file mode 100644 index 00000000..21e9959a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionpolicies_client.go @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectionPoliciesClient contains the methods for the ProtectionPolicies group. +// Don't use this type directly, use NewProtectionPoliciesClient() instead. +type ProtectionPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectionPoliciesClient creates a new instance of ProtectionPoliciesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectionPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be +// fetched using GetPolicyOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - policyName - Backup policy to be created. +// - parameters - resource backup policy +// - options - ProtectionPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ProtectionPoliciesClient.CreateOrUpdate +// method. +func (client *ProtectionPoliciesClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource, options *ProtectionPoliciesClientCreateOrUpdateOptions) (ProtectionPoliciesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProtectionPoliciesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, vaultName, resourceGroupName, policyName, parameters, options) + if err != nil { + return ProtectionPoliciesClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionPoliciesClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ProtectionPoliciesClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ProtectionPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource, options *ProtectionPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ProtectionPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (ProtectionPoliciesClientCreateOrUpdateResponse, error) { + result := ProtectionPoliciesClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionPolicyResource); err != nil { + return ProtectionPoliciesClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status +// of the operation can be fetched using GetProtectionPolicyOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - policyName - Backup policy to be deleted. +// - options - ProtectionPoliciesClientBeginDeleteOptions contains the optional parameters for the ProtectionPoliciesClient.BeginDelete +// method. +func (client *ProtectionPoliciesClient) BeginDelete(ctx context.Context, vaultName string, resourceGroupName string, policyName string, options *ProtectionPoliciesClientBeginDeleteOptions) (*runtime.Poller[ProtectionPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, vaultName, resourceGroupName, policyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProtectionPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProtectionPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of +// the operation can be fetched using GetProtectionPolicyOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +func (client *ProtectionPoliciesClient) deleteOperation(ctx context.Context, vaultName string, resourceGroupName string, policyName string, options *ProtectionPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ProtectionPoliciesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, policyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ProtectionPoliciesClient) deleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, policyName string, _ *ProtectionPoliciesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous operation. +// Status of the operation can be fetched using GetPolicyOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - policyName - Backup policy information to be fetched. +// - options - ProtectionPoliciesClientGetOptions contains the optional parameters for the ProtectionPoliciesClient.Get method. +func (client *ProtectionPoliciesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, options *ProtectionPoliciesClientGetOptions) (ProtectionPoliciesClientGetResponse, error) { + var err error + const operationName = "ProtectionPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, policyName, options) + if err != nil { + return ProtectionPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProtectionPoliciesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, policyName string, _ *ProtectionPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProtectionPoliciesClient) getHandleResponse(resp *http.Response) (ProtectionPoliciesClientGetResponse, error) { + result := ProtectionPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionPolicyResource); err != nil { + return ProtectionPoliciesClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionpolicyoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionpolicyoperationresults_client.go new file mode 100644 index 00000000..5e685c50 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionpolicyoperationresults_client.go @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectionPolicyOperationResultsClient contains the methods for the ProtectionPolicyOperationResults group. +// Don't use this type directly, use NewProtectionPolicyOperationResultsClient() instead. +type ProtectionPolicyOperationResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectionPolicyOperationResultsClient creates a new instance of ProtectionPolicyOperationResultsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectionPolicyOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionPolicyOperationResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectionPolicyOperationResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Provides the result of an operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - policyName - Backup policy name whose operation's result needs to be fetched. +// - operationID - Operation ID which represents the operation whose result needs to be fetched. +// - options - ProtectionPolicyOperationResultsClientGetOptions contains the optional parameters for the ProtectionPolicyOperationResultsClient.Get +// method. +func (client *ProtectionPolicyOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string, options *ProtectionPolicyOperationResultsClientGetOptions) (ProtectionPolicyOperationResultsClientGetResponse, error) { + var err error + const operationName = "ProtectionPolicyOperationResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, policyName, operationID, options) + if err != nil { + return ProtectionPolicyOperationResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionPolicyOperationResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionPolicyOperationResultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProtectionPolicyOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string, _ *ProtectionPolicyOperationResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProtectionPolicyOperationResultsClient) getHandleResponse(resp *http.Response) (ProtectionPolicyOperationResultsClientGetResponse, error) { + result := ProtectionPolicyOperationResultsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionPolicyResource); err != nil { + return ProtectionPolicyOperationResultsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionpolicyoperationstatuses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionpolicyoperationstatuses_client.go new file mode 100644 index 00000000..dd405231 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/protectionpolicyoperationstatuses_client.go @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ProtectionPolicyOperationStatusesClient contains the methods for the ProtectionPolicyOperationStatuses group. +// Don't use this type directly, use NewProtectionPolicyOperationStatusesClient() instead. +type ProtectionPolicyOperationStatusesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewProtectionPolicyOperationStatusesClient creates a new instance of ProtectionPolicyOperationStatusesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewProtectionPolicyOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionPolicyOperationStatusesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ProtectionPolicyOperationStatusesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed +// or failed. You can refer to the Operation Status enum for all the possible states of +// an operation. Some operations create jobs. This method returns the list of jobs associated with operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - policyName - Backup policy name whose operation's status needs to be fetched. +// - operationID - Operation ID which represents an operation whose status needs to be fetched. +// - options - ProtectionPolicyOperationStatusesClientGetOptions contains the optional parameters for the ProtectionPolicyOperationStatusesClient.Get +// method. +func (client *ProtectionPolicyOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string, options *ProtectionPolicyOperationStatusesClientGetOptions) (ProtectionPolicyOperationStatusesClientGetResponse, error) { + var err error + const operationName = "ProtectionPolicyOperationStatusesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, policyName, operationID, options) + if err != nil { + return ProtectionPolicyOperationStatusesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProtectionPolicyOperationStatusesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProtectionPolicyOperationStatusesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ProtectionPolicyOperationStatusesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string, _ *ProtectionPolicyOperationStatusesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ProtectionPolicyOperationStatusesClient) getHandleResponse(resp *http.Response) (ProtectionPolicyOperationStatusesClientGetResponse, error) { + result := ProtectionPolicyOperationStatusesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { + return ProtectionPolicyOperationStatusesClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/recoverypoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/recoverypoints_client.go new file mode 100644 index 00000000..b70f08a5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/recoverypoints_client.go @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RecoveryPointsClient contains the methods for the RecoveryPoints group. +// Don't use this type directly, use NewRecoveryPointsClient() instead. +type RecoveryPointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRecoveryPointsClient creates a new instance of RecoveryPointsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRecoveryPointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoveryPointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RecoveryPointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. +// To know the status of the operation, call the GetProtectedItemOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with backed up item. +// - containerName - Container name associated with backed up item. +// - protectedItemName - Backed up item name whose backup data needs to be fetched. +// - recoveryPointID - RecoveryPointID represents the backed up data to be fetched. +// - options - RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. +func (client *RecoveryPointsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (RecoveryPointsClientGetResponse, error) { + var err error + const operationName = "RecoveryPointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, options) + if err != nil { + return RecoveryPointsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecoveryPointsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecoveryPointsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RecoveryPointsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, _ *RecoveryPointsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + if recoveryPointID == "" { + return nil, errors.New("parameter recoveryPointID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RecoveryPointsClient) getHandleResponse(resp *http.Response) (RecoveryPointsClientGetResponse, error) { + result := RecoveryPointsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPointResource); err != nil { + return RecoveryPointsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the backup copies for the backed up item. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backed up item. +// - containerName - Container name associated with the backed up item. +// - protectedItemName - Backed up item whose backup copies are to be fetched. +// - options - RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.NewListPager method. +func (client *RecoveryPointsClient) NewListPager(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *RecoveryPointsClientListOptions) *runtime.Pager[RecoveryPointsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RecoveryPointsClientListResponse]{ + More: func(page RecoveryPointsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RecoveryPointsClientListResponse) (RecoveryPointsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecoveryPointsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, options) + }, nil) + if err != nil { + return RecoveryPointsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RecoveryPointsClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *RecoveryPointsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RecoveryPointsClient) listHandleResponse(resp *http.Response) (RecoveryPointsClientListResponse, error) { + result := RecoveryPointsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPointResourceList); err != nil { + return RecoveryPointsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/recoverypointsrecommendedformove_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/recoverypointsrecommendedformove_client.go new file mode 100644 index 00000000..9369c5d6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/recoverypointsrecommendedformove_client.go @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RecoveryPointsRecommendedForMoveClient contains the methods for the RecoveryPointsRecommendedForMove group. +// Don't use this type directly, use NewRecoveryPointsRecommendedForMoveClient() instead. +type RecoveryPointsRecommendedForMoveClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRecoveryPointsRecommendedForMoveClient creates a new instance of RecoveryPointsRecommendedForMoveClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRecoveryPointsRecommendedForMoveClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoveryPointsRecommendedForMoveClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RecoveryPointsRecommendedForMoveClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Lists the recovery points recommended for move to another tier +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - List Recovery points Recommended for Move Request +// - options - RecoveryPointsRecommendedForMoveClientListOptions contains the optional parameters for the RecoveryPointsRecommendedForMoveClient.NewListPager +// method. +func (client *RecoveryPointsRecommendedForMoveClient) NewListPager(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ListRecoveryPointsRecommendedForMoveRequest, options *RecoveryPointsRecommendedForMoveClientListOptions) *runtime.Pager[RecoveryPointsRecommendedForMoveClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RecoveryPointsRecommendedForMoveClientListResponse]{ + More: func(page RecoveryPointsRecommendedForMoveClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RecoveryPointsRecommendedForMoveClientListResponse) (RecoveryPointsRecommendedForMoveClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecoveryPointsRecommendedForMoveClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, options) + }, nil) + if err != nil { + return RecoveryPointsRecommendedForMoveClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *RecoveryPointsRecommendedForMoveClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ListRecoveryPointsRecommendedForMoveRequest, _ *RecoveryPointsRecommendedForMoveClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RecoveryPointsRecommendedForMoveClient) listHandleResponse(resp *http.Response) (RecoveryPointsRecommendedForMoveClientListResponse, error) { + result := RecoveryPointsRecommendedForMoveClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPointResourceList); err != nil { + return RecoveryPointsRecommendedForMoveClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/resourceguardproxies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/resourceguardproxies_client.go new file mode 100644 index 00000000..fc16020b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/resourceguardproxies_client.go @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ResourceGuardProxiesClient contains the methods for the ResourceGuardProxies group. +// Don't use this type directly, use NewResourceGuardProxiesClient() instead. +type ResourceGuardProxiesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewResourceGuardProxiesClient creates a new instance of ResourceGuardProxiesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewResourceGuardProxiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceGuardProxiesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ResourceGuardProxiesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewGetPager - List the ResourceGuardProxies under vault +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - ResourceGuardProxiesClientGetOptions contains the optional parameters for the ResourceGuardProxiesClient.NewGetPager +// method. +func (client *ResourceGuardProxiesClient) NewGetPager(vaultName string, resourceGroupName string, options *ResourceGuardProxiesClientGetOptions) *runtime.Pager[ResourceGuardProxiesClientGetResponse] { + return runtime.NewPager(runtime.PagingHandler[ResourceGuardProxiesClientGetResponse]{ + More: func(page ResourceGuardProxiesClientGetResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ResourceGuardProxiesClientGetResponse) (ResourceGuardProxiesClientGetResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceGuardProxiesClient.NewGetPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getCreateRequest(ctx, vaultName, resourceGroupName, options) + }, nil) + if err != nil { + return ResourceGuardProxiesClientGetResponse{}, err + } + return client.getHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// getCreateRequest creates the Get request. +func (client *ResourceGuardProxiesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, _ *ResourceGuardProxiesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ResourceGuardProxiesClient) getHandleResponse(resp *http.Response) (ResourceGuardProxiesClientGetResponse, error) { + result := ResourceGuardProxiesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardProxyBaseResourceList); err != nil { + return ResourceGuardProxiesClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/resourceguardproxy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/resourceguardproxy_client.go new file mode 100644 index 00000000..0f0033bd --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/resourceguardproxy_client.go @@ -0,0 +1,313 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ResourceGuardProxyClient contains the methods for the ResourceGuardProxy group. +// Don't use this type directly, use NewResourceGuardProxyClient() instead. +type ResourceGuardProxyClient struct { + internal *arm.Client + subscriptionID string +} + +// NewResourceGuardProxyClient creates a new instance of ResourceGuardProxyClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewResourceGuardProxyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceGuardProxyClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ResourceGuardProxyClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Delete - Delete ResourceGuardProxy under vault +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - ResourceGuardProxyClientDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.Delete +// method. +func (client *ResourceGuardProxyClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, options *ResourceGuardProxyClientDeleteOptions) (ResourceGuardProxyClientDeleteResponse, error) { + var err error + const operationName = "ResourceGuardProxyClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, options) + if err != nil { + return ResourceGuardProxyClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardProxyClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardProxyClientDeleteResponse{}, err + } + return ResourceGuardProxyClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ResourceGuardProxyClient) deleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, _ *ResourceGuardProxyClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardProxyName == "" { + return nil, errors.New("parameter resourceGuardProxyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns ResourceGuardProxy under vault and with the name referenced in request +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - ResourceGuardProxyClientGetOptions contains the optional parameters for the ResourceGuardProxyClient.Get method. +func (client *ResourceGuardProxyClient) Get(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, options *ResourceGuardProxyClientGetOptions) (ResourceGuardProxyClientGetResponse, error) { + var err error + const operationName = "ResourceGuardProxyClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, options) + if err != nil { + return ResourceGuardProxyClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardProxyClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardProxyClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ResourceGuardProxyClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, _ *ResourceGuardProxyClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardProxyName == "" { + return nil, errors.New("parameter resourceGuardProxyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ResourceGuardProxyClient) getHandleResponse(resp *http.Response) (ResourceGuardProxyClientGetResponse, error) { + result := ResourceGuardProxyClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardProxyBaseResource); err != nil { + return ResourceGuardProxyClientGetResponse{}, err + } + return result, nil +} + +// Put - Add or Update ResourceGuardProxy under vault Secures vault critical operations +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - Request body for operation +// - options - ResourceGuardProxyClientPutOptions contains the optional parameters for the ResourceGuardProxyClient.Put method. +func (client *ResourceGuardProxyClient) Put(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, parameters ResourceGuardProxyBaseResource, options *ResourceGuardProxyClientPutOptions) (ResourceGuardProxyClientPutResponse, error) { + var err error + const operationName = "ResourceGuardProxyClient.Put" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.putCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, parameters, options) + if err != nil { + return ResourceGuardProxyClientPutResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardProxyClientPutResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardProxyClientPutResponse{}, err + } + resp, err := client.putHandleResponse(httpResp) + return resp, err +} + +// putCreateRequest creates the Put request. +func (client *ResourceGuardProxyClient) putCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, parameters ResourceGuardProxyBaseResource, _ *ResourceGuardProxyClientPutOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardProxyName == "" { + return nil, errors.New("parameter resourceGuardProxyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// putHandleResponse handles the Put response. +func (client *ResourceGuardProxyClient) putHandleResponse(resp *http.Response) (ResourceGuardProxyClientPutResponse, error) { + result := ResourceGuardProxyClientPutResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardProxyBaseResource); err != nil { + return ResourceGuardProxyClientPutResponse{}, err + } + return result, nil +} + +// UnlockDelete - Secures delete ResourceGuardProxy operations. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - Request body for operation +// - options - ResourceGuardProxyClientUnlockDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.UnlockDelete +// method. +func (client *ResourceGuardProxyClient) UnlockDelete(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, parameters UnlockDeleteRequest, options *ResourceGuardProxyClientUnlockDeleteOptions) (ResourceGuardProxyClientUnlockDeleteResponse, error) { + var err error + const operationName = "ResourceGuardProxyClient.UnlockDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.unlockDeleteCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, parameters, options) + if err != nil { + return ResourceGuardProxyClientUnlockDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ResourceGuardProxyClientUnlockDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceGuardProxyClientUnlockDeleteResponse{}, err + } + resp, err := client.unlockDeleteHandleResponse(httpResp) + return resp, err +} + +// unlockDeleteCreateRequest creates the UnlockDelete request. +func (client *ResourceGuardProxyClient) unlockDeleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, parameters UnlockDeleteRequest, _ *ResourceGuardProxyClientUnlockDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGuardProxyName == "" { + return nil, errors.New("parameter resourceGuardProxyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// unlockDeleteHandleResponse handles the UnlockDelete response. +func (client *ResourceGuardProxyClient) unlockDeleteHandleResponse(resp *http.Response) (ResourceGuardProxyClientUnlockDeleteResponse, error) { + result := ResourceGuardProxyClientUnlockDeleteResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UnlockDeleteResponse); err != nil { + return ResourceGuardProxyClientUnlockDeleteResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/responses.go new file mode 100644 index 00000000..aa989394 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/responses.go @@ -0,0 +1,458 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +// BMSPrepareDataMoveOperationResultClientGetResponse contains the response from method BMSPrepareDataMoveOperationResultClient.Get. +type BMSPrepareDataMoveOperationResultClientGetResponse struct { + // Operation result response for Vault Storage Config + VaultStorageConfigOperationResultResponseClassification +} + +// BackupEnginesClientGetResponse contains the response from method BackupEnginesClient.Get. +type BackupEnginesClientGetResponse struct { + // The base backup engine class. All workload specific backup engines derive from this class. + BackupEngineBaseResource +} + +// BackupEnginesClientListResponse contains the response from method BackupEnginesClient.NewListPager. +type BackupEnginesClientListResponse struct { + // List of BackupEngineBase resources + BackupEngineBaseResourceList +} + +// BackupJobsClientListResponse contains the response from method BackupJobsClient.NewListPager. +type BackupJobsClientListResponse struct { + // List of Job resources + JobResourceList +} + +// BackupOperationResultsClientGetResponse contains the response from method BackupOperationResultsClient.Get. +type BackupOperationResultsClientGetResponse struct { + // placeholder for future response values +} + +// BackupOperationStatusesClientGetResponse contains the response from method BackupOperationStatusesClient.Get. +type BackupOperationStatusesClientGetResponse struct { + // Operation status. + OperationStatus +} + +// BackupPoliciesClientListResponse contains the response from method BackupPoliciesClient.NewListPager. +type BackupPoliciesClientListResponse struct { + // List of ProtectionPolicy resources + ProtectionPolicyResourceList +} + +// BackupProtectableItemsClientListResponse contains the response from method BackupProtectableItemsClient.NewListPager. +type BackupProtectableItemsClientListResponse struct { + // List of WorkloadProtectableItem resources + WorkloadProtectableItemResourceList +} + +// BackupProtectedItemsClientListResponse contains the response from method BackupProtectedItemsClient.NewListPager. +type BackupProtectedItemsClientListResponse struct { + // List of ProtectedItem resources + ProtectedItemResourceList +} + +// BackupProtectionContainersClientListResponse contains the response from method BackupProtectionContainersClient.NewListPager. +type BackupProtectionContainersClientListResponse struct { + // List of ProtectionContainer resources + ProtectionContainerResourceList +} + +// BackupProtectionIntentClientListResponse contains the response from method BackupProtectionIntentClient.NewListPager. +type BackupProtectionIntentClientListResponse struct { + // List of ProtectionIntent resources + ProtectionIntentResourceList +} + +// BackupResourceEncryptionConfigsClientGetResponse contains the response from method BackupResourceEncryptionConfigsClient.Get. +type BackupResourceEncryptionConfigsClientGetResponse struct { + BackupResourceEncryptionConfigExtendedResource +} + +// BackupResourceEncryptionConfigsClientUpdateResponse contains the response from method BackupResourceEncryptionConfigsClient.Update. +type BackupResourceEncryptionConfigsClientUpdateResponse struct { + // placeholder for future response values +} + +// BackupResourceStorageConfigsNonCRRClientGetResponse contains the response from method BackupResourceStorageConfigsNonCRRClient.Get. +type BackupResourceStorageConfigsNonCRRClientGetResponse struct { + // The resource storage details. + BackupResourceConfigResource +} + +// BackupResourceStorageConfigsNonCRRClientPatchResponse contains the response from method BackupResourceStorageConfigsNonCRRClient.Patch. +type BackupResourceStorageConfigsNonCRRClientPatchResponse struct { + // placeholder for future response values +} + +// BackupResourceStorageConfigsNonCRRClientUpdateResponse contains the response from method BackupResourceStorageConfigsNonCRRClient.Update. +type BackupResourceStorageConfigsNonCRRClientUpdateResponse struct { + // The resource storage details. + BackupResourceConfigResource +} + +// BackupResourceVaultConfigsClientGetResponse contains the response from method BackupResourceVaultConfigsClient.Get. +type BackupResourceVaultConfigsClientGetResponse struct { + // Backup resource vault config details. + BackupResourceVaultConfigResource +} + +// BackupResourceVaultConfigsClientPutResponse contains the response from method BackupResourceVaultConfigsClient.Put. +type BackupResourceVaultConfigsClientPutResponse struct { + // Backup resource vault config details. + BackupResourceVaultConfigResource +} + +// BackupResourceVaultConfigsClientUpdateResponse contains the response from method BackupResourceVaultConfigsClient.Update. +type BackupResourceVaultConfigsClientUpdateResponse struct { + // Backup resource vault config details. + BackupResourceVaultConfigResource +} + +// BackupStatusClientGetResponse contains the response from method BackupStatusClient.Get. +type BackupStatusClientGetResponse struct { + // BackupStatus response. + BackupStatusResponse +} + +// BackupUsageSummariesClientListResponse contains the response from method BackupUsageSummariesClient.NewListPager. +type BackupUsageSummariesClientListResponse struct { + // Backup management usage for vault. + BackupManagementUsageList +} + +// BackupWorkloadItemsClientListResponse contains the response from method BackupWorkloadItemsClient.NewListPager. +type BackupWorkloadItemsClientListResponse struct { + // List of WorkloadItem resources + WorkloadItemResourceList +} + +// BackupsClientTriggerResponse contains the response from method BackupsClient.Trigger. +type BackupsClientTriggerResponse struct { + // placeholder for future response values +} + +// ClientBMSPrepareDataMoveResponse contains the response from method Client.BeginBMSPrepareDataMove. +type ClientBMSPrepareDataMoveResponse struct { + // placeholder for future response values +} + +// ClientBMSTriggerDataMoveResponse contains the response from method Client.BeginBMSTriggerDataMove. +type ClientBMSTriggerDataMoveResponse struct { + // placeholder for future response values +} + +// ClientGetOperationStatusResponse contains the response from method Client.GetOperationStatus. +type ClientGetOperationStatusResponse struct { + // Operation status. + OperationStatus +} + +// ClientMoveRecoveryPointResponse contains the response from method Client.BeginMoveRecoveryPoint. +type ClientMoveRecoveryPointResponse struct { + // placeholder for future response values +} + +// DeletedProtectionContainersClientListResponse contains the response from method DeletedProtectionContainersClient.NewListPager. +type DeletedProtectionContainersClientListResponse struct { + // List of ProtectionContainer resources + ProtectionContainerResourceList +} + +// ExportJobsOperationResultsClientGetResponse contains the response from method ExportJobsOperationResultsClient.Get. +type ExportJobsOperationResultsClientGetResponse struct { + // Base class for operation result info. + OperationResultInfoBaseResource +} + +// FeatureSupportClientValidateResponse contains the response from method FeatureSupportClient.Validate. +type FeatureSupportClientValidateResponse struct { + // Response for feature support requests for Azure IaasVm + AzureVMResourceFeatureSupportResponse +} + +// FetchTieringCostClientPostResponse contains the response from method FetchTieringCostClient.BeginPost. +type FetchTieringCostClientPostResponse struct { + // Base class for tiering cost response + TieringCostInfoClassification +} + +// GetTieringCostOperationResultClientGetResponse contains the response from method GetTieringCostOperationResultClient.Get. +type GetTieringCostOperationResultClientGetResponse struct { + // Base class for tiering cost response + TieringCostInfoClassification +} + +// ItemLevelRecoveryConnectionsClientProvisionResponse contains the response from method ItemLevelRecoveryConnectionsClient.Provision. +type ItemLevelRecoveryConnectionsClientProvisionResponse struct { + // placeholder for future response values +} + +// ItemLevelRecoveryConnectionsClientRevokeResponse contains the response from method ItemLevelRecoveryConnectionsClient.Revoke. +type ItemLevelRecoveryConnectionsClientRevokeResponse struct { + // placeholder for future response values +} + +// JobCancellationsClientTriggerResponse contains the response from method JobCancellationsClient.Trigger. +type JobCancellationsClientTriggerResponse struct { + // placeholder for future response values +} + +// JobDetailsClientGetResponse contains the response from method JobDetailsClient.Get. +type JobDetailsClientGetResponse struct { + // Defines workload agnostic properties for a job. + JobResource +} + +// JobOperationResultsClientGetResponse contains the response from method JobOperationResultsClient.Get. +type JobOperationResultsClientGetResponse struct { + // placeholder for future response values +} + +// JobsClientExportResponse contains the response from method JobsClient.Export. +type JobsClientExportResponse struct { + // placeholder for future response values +} + +// OperationClientValidateResponse contains the response from method OperationClient.Validate. +type OperationClientValidateResponse struct { + ValidateOperationsResponse +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Operations List response which contains list of available APIs. + ClientDiscoveryResponse +} + +// PrivateEndpointClientGetOperationStatusResponse contains the response from method PrivateEndpointClient.GetOperationStatus. +type PrivateEndpointClientGetOperationStatusResponse struct { + // Operation status. + OperationStatus +} + +// PrivateEndpointConnectionClientDeleteResponse contains the response from method PrivateEndpointConnectionClient.BeginDelete. +type PrivateEndpointConnectionClientDeleteResponse struct { + // placeholder for future response values +} + +// PrivateEndpointConnectionClientGetResponse contains the response from method PrivateEndpointConnectionClient.Get. +type PrivateEndpointConnectionClientGetResponse struct { + // Private Endpoint Connection Response Properties + PrivateEndpointConnectionResource +} + +// PrivateEndpointConnectionClientPutResponse contains the response from method PrivateEndpointConnectionClient.BeginPut. +type PrivateEndpointConnectionClientPutResponse struct { + // Private Endpoint Connection Response Properties + PrivateEndpointConnectionResource +} + +// ProtectableContainersClientListResponse contains the response from method ProtectableContainersClient.NewListPager. +type ProtectableContainersClientListResponse struct { + // List of ProtectableContainer resources + ProtectableContainerResourceList +} + +// ProtectedItemOperationResultsClientGetResponse contains the response from method ProtectedItemOperationResultsClient.Get. +type ProtectedItemOperationResultsClientGetResponse struct { + // Base class for backup items. + ProtectedItemResource +} + +// ProtectedItemOperationStatusesClientGetResponse contains the response from method ProtectedItemOperationStatusesClient.Get. +type ProtectedItemOperationStatusesClientGetResponse struct { + // Operation status. + OperationStatus +} + +// ProtectedItemsClientCreateOrUpdateResponse contains the response from method ProtectedItemsClient.CreateOrUpdate. +type ProtectedItemsClientCreateOrUpdateResponse struct { + // Base class for backup items. + ProtectedItemResource +} + +// ProtectedItemsClientDeleteResponse contains the response from method ProtectedItemsClient.Delete. +type ProtectedItemsClientDeleteResponse struct { + // placeholder for future response values +} + +// ProtectedItemsClientGetResponse contains the response from method ProtectedItemsClient.Get. +type ProtectedItemsClientGetResponse struct { + // Base class for backup items. + ProtectedItemResource +} + +// ProtectionContainerOperationResultsClientGetResponse contains the response from method ProtectionContainerOperationResultsClient.Get. +type ProtectionContainerOperationResultsClientGetResponse struct { + // Base class for container with backup items. Containers with specific workloads are derived from this class. + ProtectionContainerResource +} + +// ProtectionContainerRefreshOperationResultsClientGetResponse contains the response from method ProtectionContainerRefreshOperationResultsClient.Get. +type ProtectionContainerRefreshOperationResultsClientGetResponse struct { + // placeholder for future response values +} + +// ProtectionContainersClientGetResponse contains the response from method ProtectionContainersClient.Get. +type ProtectionContainersClientGetResponse struct { + // Base class for container with backup items. Containers with specific workloads are derived from this class. + ProtectionContainerResource +} + +// ProtectionContainersClientInquireResponse contains the response from method ProtectionContainersClient.Inquire. +type ProtectionContainersClientInquireResponse struct { + // placeholder for future response values +} + +// ProtectionContainersClientRefreshResponse contains the response from method ProtectionContainersClient.Refresh. +type ProtectionContainersClientRefreshResponse struct { + // placeholder for future response values +} + +// ProtectionContainersClientRegisterResponse contains the response from method ProtectionContainersClient.BeginRegister. +type ProtectionContainersClientRegisterResponse struct { + // Base class for container with backup items. Containers with specific workloads are derived from this class. + ProtectionContainerResource +} + +// ProtectionContainersClientUnregisterResponse contains the response from method ProtectionContainersClient.Unregister. +type ProtectionContainersClientUnregisterResponse struct { + // placeholder for future response values +} + +// ProtectionIntentClientCreateOrUpdateResponse contains the response from method ProtectionIntentClient.CreateOrUpdate. +type ProtectionIntentClientCreateOrUpdateResponse struct { + // Base class for backup ProtectionIntent. + ProtectionIntentResource +} + +// ProtectionIntentClientDeleteResponse contains the response from method ProtectionIntentClient.Delete. +type ProtectionIntentClientDeleteResponse struct { + // placeholder for future response values +} + +// ProtectionIntentClientGetResponse contains the response from method ProtectionIntentClient.Get. +type ProtectionIntentClientGetResponse struct { + // Base class for backup ProtectionIntent. + ProtectionIntentResource +} + +// ProtectionIntentClientValidateResponse contains the response from method ProtectionIntentClient.Validate. +type ProtectionIntentClientValidateResponse struct { + // Response contract for enable backup validation request + PreValidateEnableBackupResponse +} + +// ProtectionPoliciesClientCreateOrUpdateResponse contains the response from method ProtectionPoliciesClient.CreateOrUpdate. +type ProtectionPoliciesClientCreateOrUpdateResponse struct { + // Base class for backup policy. Workload-specific backup policies are derived from this class. + ProtectionPolicyResource +} + +// ProtectionPoliciesClientDeleteResponse contains the response from method ProtectionPoliciesClient.BeginDelete. +type ProtectionPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// ProtectionPoliciesClientGetResponse contains the response from method ProtectionPoliciesClient.Get. +type ProtectionPoliciesClientGetResponse struct { + // Base class for backup policy. Workload-specific backup policies are derived from this class. + ProtectionPolicyResource +} + +// ProtectionPolicyOperationResultsClientGetResponse contains the response from method ProtectionPolicyOperationResultsClient.Get. +type ProtectionPolicyOperationResultsClientGetResponse struct { + // Base class for backup policy. Workload-specific backup policies are derived from this class. + ProtectionPolicyResource +} + +// ProtectionPolicyOperationStatusesClientGetResponse contains the response from method ProtectionPolicyOperationStatusesClient.Get. +type ProtectionPolicyOperationStatusesClientGetResponse struct { + // Operation status. + OperationStatus +} + +// RecoveryPointsClientGetResponse contains the response from method RecoveryPointsClient.Get. +type RecoveryPointsClientGetResponse struct { + // Base class for backup copies. Workload-specific backup copies are derived from this class. + RecoveryPointResource +} + +// RecoveryPointsClientListResponse contains the response from method RecoveryPointsClient.NewListPager. +type RecoveryPointsClientListResponse struct { + // List of RecoveryPoint resources + RecoveryPointResourceList +} + +// RecoveryPointsRecommendedForMoveClientListResponse contains the response from method RecoveryPointsRecommendedForMoveClient.NewListPager. +type RecoveryPointsRecommendedForMoveClientListResponse struct { + // List of RecoveryPoint resources + RecoveryPointResourceList +} + +// ResourceGuardProxiesClientGetResponse contains the response from method ResourceGuardProxiesClient.NewGetPager. +type ResourceGuardProxiesClientGetResponse struct { + // List of ResourceGuardProxyBase resources + ResourceGuardProxyBaseResourceList +} + +// ResourceGuardProxyClientDeleteResponse contains the response from method ResourceGuardProxyClient.Delete. +type ResourceGuardProxyClientDeleteResponse struct { + // placeholder for future response values +} + +// ResourceGuardProxyClientGetResponse contains the response from method ResourceGuardProxyClient.Get. +type ResourceGuardProxyClientGetResponse struct { + ResourceGuardProxyBaseResource +} + +// ResourceGuardProxyClientPutResponse contains the response from method ResourceGuardProxyClient.Put. +type ResourceGuardProxyClientPutResponse struct { + ResourceGuardProxyBaseResource +} + +// ResourceGuardProxyClientUnlockDeleteResponse contains the response from method ResourceGuardProxyClient.UnlockDelete. +type ResourceGuardProxyClientUnlockDeleteResponse struct { + // Response of Unlock Delete API. + UnlockDeleteResponse +} + +// RestoresClientTriggerResponse contains the response from method RestoresClient.BeginTrigger. +type RestoresClientTriggerResponse struct { + // placeholder for future response values +} + +// SecurityPINsClientGetResponse contains the response from method SecurityPINsClient.Get. +type SecurityPINsClientGetResponse struct { + // The token information details. + TokenInformation +} + +// TieringCostOperationStatusClientGetResponse contains the response from method TieringCostOperationStatusClient.Get. +type TieringCostOperationStatusClientGetResponse struct { + // Operation status. + OperationStatus +} + +// ValidateOperationClientTriggerResponse contains the response from method ValidateOperationClient.BeginTrigger. +type ValidateOperationClientTriggerResponse struct { + // placeholder for future response values +} + +// ValidateOperationResultsClientGetResponse contains the response from method ValidateOperationResultsClient.Get. +type ValidateOperationResultsClientGetResponse struct { + ValidateOperationsResponse +} + +// ValidateOperationStatusesClientGetResponse contains the response from method ValidateOperationStatusesClient.Get. +type ValidateOperationStatusesClientGetResponse struct { + // Operation status. + OperationStatus +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/responses_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/responses_serde.go new file mode 100644 index 00000000..8807534e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/responses_serde.go @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import "encoding/json" + +// UnmarshalJSON implements the json.Unmarshaller interface for type BMSPrepareDataMoveOperationResultClientGetResponse. +func (b *BMSPrepareDataMoveOperationResultClientGetResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalVaultStorageConfigOperationResultResponseClassification(data) + if err != nil { + return err + } + b.VaultStorageConfigOperationResultResponseClassification = res + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FetchTieringCostClientPostResponse. +func (f FetchTieringCostClientPostResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(f.TieringCostInfoClassification) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FetchTieringCostClientPostResponse. +func (f *FetchTieringCostClientPostResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalTieringCostInfoClassification(data) + if err != nil { + return err + } + f.TieringCostInfoClassification = res + return nil +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetTieringCostOperationResultClientGetResponse. +func (g *GetTieringCostOperationResultClientGetResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalTieringCostInfoClassification(data) + if err != nil { + return err + } + g.TieringCostInfoClassification = res + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/restores_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/restores_client.go new file mode 100644 index 00000000..10ea9bf9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/restores_client.go @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RestoresClient contains the methods for the Restores group. +// Don't use this type directly, use NewRestoresClient() instead. +type RestoresClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRestoresClient creates a new instance of RestoresClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRestoresClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestoresClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RestoresClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginTrigger - Restores the specified backed up data. This is an asynchronous operation. To know the status of this API +// call, use GetProtectedItemOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - fabricName - Fabric name associated with the backed up items. +// - containerName - Container name associated with the backed up items. +// - protectedItemName - Backed up item to be restored. +// - recoveryPointID - Recovery point ID which represents the backed up data to be restored. +// - parameters - resource restore request +// - options - RestoresClientBeginTriggerOptions contains the optional parameters for the RestoresClient.BeginTrigger method. +func (client *RestoresClient) BeginTrigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource, options *RestoresClientBeginTriggerOptions) (*runtime.Poller[RestoresClientTriggerResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.trigger(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RestoresClientTriggerResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RestoresClientTriggerResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Trigger - Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, +// use GetProtectedItemOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +func (client *RestoresClient) trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource, options *RestoresClientBeginTriggerOptions) (*http.Response, error) { + var err error + const operationName = "RestoresClient.BeginTrigger" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// triggerCreateRequest creates the Trigger request. +func (client *RestoresClient) triggerCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource, options *RestoresClientBeginTriggerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if containerName == "" { + return nil, errors.New("parameter containerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) + if protectedItemName == "" { + return nil, errors.New("parameter protectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) + if recoveryPointID == "" { + return nil, errors.New("parameter recoveryPointID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/securitypins_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/securitypins_client.go new file mode 100644 index 00000000..74b55823 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/securitypins_client.go @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SecurityPINsClient contains the methods for the SecurityPINs group. +// Don't use this type directly, use NewSecurityPINsClient() instead. +type SecurityPINsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSecurityPINsClient creates a new instance of SecurityPINsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSecurityPINsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityPINsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SecurityPINsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get the security PIN. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - SecurityPINsClientGetOptions contains the optional parameters for the SecurityPINsClient.Get method. +func (client *SecurityPINsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *SecurityPINsClientGetOptions) (SecurityPINsClientGetResponse, error) { + var err error + const operationName = "SecurityPINsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) + if err != nil { + return SecurityPINsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SecurityPINsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecurityPINsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SecurityPINsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *SecurityPINsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.XMSAuthorizationAuxiliary != nil { + req.Raw().Header["x-ms-authorization-auxiliary"] = []string{*options.XMSAuthorizationAuxiliary} + } + if options != nil && options.Parameters != nil { + if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SecurityPINsClient) getHandleResponse(resp *http.Response) (SecurityPINsClientGetResponse, error) { + result := SecurityPINsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TokenInformation); err != nil { + return SecurityPINsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/tieringcostoperationstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/tieringcostoperationstatus_client.go new file mode 100644 index 00000000..4375eb94 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/tieringcostoperationstatus_client.go @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// TieringCostOperationStatusClient contains the methods for the TieringCostOperationStatus group. +// Don't use this type directly, use NewTieringCostOperationStatusClient() instead. +type TieringCostOperationStatusClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTieringCostOperationStatusClient creates a new instance of TieringCostOperationStatusClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTieringCostOperationStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TieringCostOperationStatusClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TieringCostOperationStatusClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the status of async operations of tiering cost +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - vaultName - The name of the recovery services vault. +// - options - TieringCostOperationStatusClientGetOptions contains the optional parameters for the TieringCostOperationStatusClient.Get +// method. +func (client *TieringCostOperationStatusClient) Get(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *TieringCostOperationStatusClientGetOptions) (TieringCostOperationStatusClientGetResponse, error) { + var err error + const operationName = "TieringCostOperationStatusClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, operationID, options) + if err != nil { + return TieringCostOperationStatusClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TieringCostOperationStatusClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TieringCostOperationStatusClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *TieringCostOperationStatusClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, operationID string, _ *TieringCostOperationStatusClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/operationsStatus/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *TieringCostOperationStatusClient) getHandleResponse(resp *http.Response) (TieringCostOperationStatusClientGetResponse, error) { + result := TieringCostOperationStatusClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { + return TieringCostOperationStatusClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/time_rfc3339.go new file mode 100644 index 00000000..b05a4293 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/time_rfc3339.go @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + if len(data) == 0 { + return nil + } + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/validateoperation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/validateoperation_client.go new file mode 100644 index 00000000..251007b3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/validateoperation_client.go @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ValidateOperationClient contains the methods for the ValidateOperation group. +// Don't use this type directly, use NewValidateOperationClient() instead. +type ValidateOperationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewValidateOperationClient creates a new instance of ValidateOperationClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewValidateOperationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ValidateOperationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ValidateOperationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginTrigger - Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking +// headers which can be tracked using GetValidateOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - parameters - resource validate operation request +// - options - ValidateOperationClientBeginTriggerOptions contains the optional parameters for the ValidateOperationClient.BeginTrigger +// method. +func (client *ValidateOperationClient) BeginTrigger(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestResource, options *ValidateOperationClientBeginTriggerOptions) (*runtime.Poller[ValidateOperationClientTriggerResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.trigger(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ValidateOperationClientTriggerResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ValidateOperationClientTriggerResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Trigger - Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers +// which can be tracked using GetValidateOperationResult API. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +func (client *ValidateOperationClient) trigger(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestResource, options *ValidateOperationClientBeginTriggerOptions) (*http.Response, error) { + var err error + const operationName = "ValidateOperationClient.BeginTrigger" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// triggerCreateRequest creates the Trigger request. +func (client *ValidateOperationClient) triggerCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestResource, _ *ValidateOperationClientBeginTriggerOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/validateoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/validateoperationresults_client.go new file mode 100644 index 00000000..70314e68 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/validateoperationresults_client.go @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ValidateOperationResultsClient contains the methods for the ValidateOperationResults group. +// Don't use this type directly, use NewValidateOperationResultsClient() instead. +type ValidateOperationResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewValidateOperationResultsClient creates a new instance of ValidateOperationResultsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewValidateOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ValidateOperationResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ValidateOperationResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches the result of a triggered validate operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - operationID - OperationID which represents the operation whose result needs to be fetched. +// - options - ValidateOperationResultsClientGetOptions contains the optional parameters for the ValidateOperationResultsClient.Get +// method. +func (client *ValidateOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ValidateOperationResultsClientGetOptions) (ValidateOperationResultsClientGetResponse, error) { + var err error + const operationName = "ValidateOperationResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) + if err != nil { + return ValidateOperationResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ValidateOperationResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return ValidateOperationResultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ValidateOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, _ *ValidateOperationResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationResults/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ValidateOperationResultsClient) getHandleResponse(resp *http.Response) (ValidateOperationResultsClientGetResponse, error) { + result := ValidateOperationResultsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ValidateOperationsResponse); err != nil { + return ValidateOperationResultsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/validateoperationstatuses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/validateoperationstatuses_client.go new file mode 100644 index 00000000..53413a6a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4/validateoperationstatuses_client.go @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicesbackup + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ValidateOperationStatusesClient contains the methods for the ValidateOperationStatuses group. +// Don't use this type directly, use NewValidateOperationStatusesClient() instead. +type ValidateOperationStatusesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewValidateOperationStatusesClient creates a new instance of ValidateOperationStatusesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewValidateOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ValidateOperationStatusesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ValidateOperationStatusesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Fetches the status of a triggered validate operation. The status can be in progress, completed or failed. You can +// refer to the OperationStatus enum for all the possible states of the operation. If +// operation has completed, this method returns the list of errors obtained while validating the operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-02-01 +// - vaultName - The name of the recovery services vault. +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - operationID - OperationID represents the operation whose status needs to be fetched. +// - options - ValidateOperationStatusesClientGetOptions contains the optional parameters for the ValidateOperationStatusesClient.Get +// method. +func (client *ValidateOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ValidateOperationStatusesClientGetOptions) (ValidateOperationStatusesClientGetResponse, error) { + var err error + const operationName = "ValidateOperationStatusesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) + if err != nil { + return ValidateOperationStatusesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ValidateOperationStatusesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ValidateOperationStatusesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ValidateOperationStatusesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, _ *ValidateOperationStatusesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationsStatuses/{operationId}" + if vaultName == "" { + return nil, errors.New("parameter vaultName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ValidateOperationStatusesClient) getHandleResponse(resp *http.Response) (ValidateOperationStatusesClientGetResponse, error) { + result := ValidateOperationStatusesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { + return ValidateOperationStatusesClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupengines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupengines_client.go deleted file mode 100644 index 825be418..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupengines_client.go +++ /dev/null @@ -1,197 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupEnginesClient contains the methods for the BackupEngines group. -// Don't use this type directly, use NewBackupEnginesClient() instead. -type BackupEnginesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupEnginesClient creates a new instance of BackupEnginesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupEnginesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupEnginesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupEnginesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Returns backup management server registered to Recovery Services Vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// backupEngineName - Name of the backup management server. -// options - BackupEnginesClientGetOptions contains the optional parameters for the BackupEnginesClient.Get method. -func (client *BackupEnginesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, options *BackupEnginesClientGetOptions) (BackupEnginesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, backupEngineName, options) - if err != nil { - return BackupEnginesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupEnginesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupEnginesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupEnginesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, options *BackupEnginesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if backupEngineName == "" { - return nil, errors.New("parameter backupEngineName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{backupEngineName}", url.PathEscape(backupEngineName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupEnginesClient) getHandleResponse(resp *http.Response) (BackupEnginesClientGetResponse, error) { - result := BackupEnginesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupEngineBaseResource); err != nil { - return BackupEnginesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupEnginesClientListOptions contains the optional parameters for the BackupEnginesClient.List method. -func (client *BackupEnginesClient) NewListPager(vaultName string, resourceGroupName string, options *BackupEnginesClientListOptions) *runtime.Pager[BackupEnginesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupEnginesClientListResponse]{ - More: func(page BackupEnginesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupEnginesClientListResponse) (BackupEnginesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupEnginesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupEnginesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupEnginesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupEnginesClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupEnginesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupEnginesClient) listHandleResponse(resp *http.Response) (BackupEnginesClientListResponse, error) { - result := BackupEnginesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupEngineBaseResourceList); err != nil { - return BackupEnginesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupjobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupjobs_client.go deleted file mode 100644 index ad52f1dd..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupjobs_client.go +++ /dev/null @@ -1,130 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupJobsClient contains the methods for the BackupJobs group. -// Don't use this type directly, use NewBackupJobsClient() instead. -type BackupJobsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupJobsClient creates a new instance of BackupJobsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupJobsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupJobsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Provides a pageable list of jobs. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupJobsClientListOptions contains the optional parameters for the BackupJobsClient.List method. -func (client *BackupJobsClient) NewListPager(vaultName string, resourceGroupName string, options *BackupJobsClientListOptions) *runtime.Pager[BackupJobsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupJobsClientListResponse]{ - More: func(page BackupJobsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupJobsClientListResponse) (BackupJobsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupJobsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupJobsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupJobsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupJobsClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupJobsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupJobsClient) listHandleResponse(resp *http.Response) (BackupJobsClientListResponse, error) { - result := BackupJobsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.JobResourceList); err != nil { - return BackupJobsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupoperationresults_client.go deleted file mode 100644 index bf532720..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupoperationresults_client.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupOperationResultsClient contains the methods for the BackupOperationResults group. -// Don't use this type directly, use NewBackupOperationResultsClient() instead. -type BackupOperationResultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupOperationResultsClient creates a new instance of BackupOperationResultsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupOperationResultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupOperationResultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the -// status code in the response would be Accepted. It will continue to be in this state -// till it reaches completion. On successful completion, the status code will be OK. This method expects OperationID as an -// argument. OperationID is part of the Location header of the operation response. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// operationID - OperationID which represents the operation. -// options - BackupOperationResultsClientGetOptions contains the optional parameters for the BackupOperationResultsClient.Get -// method. -func (client *BackupOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BackupOperationResultsClientGetOptions) (BackupOperationResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) - if err != nil { - return BackupOperationResultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupOperationResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return BackupOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return BackupOperationResultsClientGetResponse{}, nil -} - -// getCreateRequest creates the Get request. -func (client *BackupOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BackupOperationResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupoperationstatuses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupoperationstatuses_client.go deleted file mode 100644 index e3e5bdd2..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupoperationstatuses_client.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupOperationStatusesClient contains the methods for the BackupOperationStatuses group. -// Don't use this type directly, use NewBackupOperationStatusesClient() instead. -type BackupOperationStatusesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupOperationStatusesClient creates a new instance of BackupOperationStatusesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupOperationStatusesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupOperationStatusesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed -// or failed. You can refer to the OperationStatus enum for all the possible states of an -// operation. Some operations create jobs. This method returns the list of jobs when the operation is complete. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// operationID - OperationID which represents the operation. -// options - BackupOperationStatusesClientGetOptions contains the optional parameters for the BackupOperationStatusesClient.Get -// method. -func (client *BackupOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BackupOperationStatusesClientGetOptions) (BackupOperationStatusesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) - if err != nil { - return BackupOperationStatusesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupOperationStatusesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupOperationStatusesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupOperationStatusesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BackupOperationStatusesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupOperationStatusesClient) getHandleResponse(resp *http.Response) (BackupOperationStatusesClientGetResponse, error) { - result := BackupOperationStatusesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { - return BackupOperationStatusesClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backuppolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backuppolicies_client.go deleted file mode 100644 index fa66d230..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backuppolicies_client.go +++ /dev/null @@ -1,128 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupPoliciesClient contains the methods for the BackupPolicies group. -// Don't use this type directly, use NewBackupPoliciesClient() instead. -type BackupPoliciesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupPoliciesClient creates a new instance of BackupPoliciesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupPoliciesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupPoliciesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to -// fetch scoped results. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.List method. -func (client *BackupPoliciesClient) NewListPager(vaultName string, resourceGroupName string, options *BackupPoliciesClientListOptions) *runtime.Pager[BackupPoliciesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupPoliciesClientListResponse]{ - More: func(page BackupPoliciesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupPoliciesClientListResponse) (BackupPoliciesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupPoliciesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupPoliciesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupPoliciesClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupPoliciesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupPoliciesClient) listHandleResponse(resp *http.Response) (BackupPoliciesClientListResponse, error) { - result := BackupPoliciesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionPolicyResourceList); err != nil { - return BackupPoliciesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotectableitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotectableitems_client.go deleted file mode 100644 index 0c65e5dd..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotectableitems_client.go +++ /dev/null @@ -1,132 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupProtectableItemsClient contains the methods for the BackupProtectableItems group. -// Don't use this type directly, use NewBackupProtectableItemsClient() instead. -type BackupProtectableItemsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupProtectableItemsClient creates a new instance of BackupProtectableItemsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupProtectableItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupProtectableItemsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupProtectableItemsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Provides a pageable list of protectable objects within your subscription according to the query filter and -// the pagination parameters. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupProtectableItemsClientListOptions contains the optional parameters for the BackupProtectableItemsClient.List -// method. -func (client *BackupProtectableItemsClient) NewListPager(vaultName string, resourceGroupName string, options *BackupProtectableItemsClientListOptions) *runtime.Pager[BackupProtectableItemsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupProtectableItemsClientListResponse]{ - More: func(page BackupProtectableItemsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupProtectableItemsClientListResponse) (BackupProtectableItemsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupProtectableItemsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupProtectableItemsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupProtectableItemsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupProtectableItemsClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupProtectableItemsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupProtectableItemsClient) listHandleResponse(resp *http.Response) (BackupProtectableItemsClientListResponse, error) { - result := BackupProtectableItemsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkloadProtectableItemResourceList); err != nil { - return BackupProtectableItemsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotecteditems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotecteditems_client.go deleted file mode 100644 index 415d0499..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotecteditems_client.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupProtectedItemsClient contains the methods for the BackupProtectedItems group. -// Don't use this type directly, use NewBackupProtectedItemsClient() instead. -type BackupProtectedItemsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupProtectedItemsClient creates a new instance of BackupProtectedItemsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupProtectedItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupProtectedItemsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupProtectedItemsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Provides a pageable list of all items that are backed up within a vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupProtectedItemsClientListOptions contains the optional parameters for the BackupProtectedItemsClient.List -// method. -func (client *BackupProtectedItemsClient) NewListPager(vaultName string, resourceGroupName string, options *BackupProtectedItemsClientListOptions) *runtime.Pager[BackupProtectedItemsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupProtectedItemsClientListResponse]{ - More: func(page BackupProtectedItemsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupProtectedItemsClientListResponse) (BackupProtectedItemsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupProtectedItemsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupProtectedItemsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupProtectedItemsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupProtectedItemsClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupProtectedItemsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupProtectedItemsClient) listHandleResponse(resp *http.Response) (BackupProtectedItemsClientListResponse, error) { - result := BackupProtectedItemsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectedItemResourceList); err != nil { - return BackupProtectedItemsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotectioncontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotectioncontainers_client.go deleted file mode 100644 index a9a7079b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotectioncontainers_client.go +++ /dev/null @@ -1,128 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupProtectionContainersClient contains the methods for the BackupProtectionContainers group. -// Don't use this type directly, use NewBackupProtectionContainersClient() instead. -type BackupProtectionContainersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupProtectionContainersClient creates a new instance of BackupProtectionContainersClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupProtectionContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupProtectionContainersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupProtectionContainersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists the containers registered to Recovery Services Vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupProtectionContainersClientListOptions contains the optional parameters for the BackupProtectionContainersClient.List -// method. -func (client *BackupProtectionContainersClient) NewListPager(vaultName string, resourceGroupName string, options *BackupProtectionContainersClientListOptions) *runtime.Pager[BackupProtectionContainersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupProtectionContainersClientListResponse]{ - More: func(page BackupProtectionContainersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupProtectionContainersClientListResponse) (BackupProtectionContainersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupProtectionContainersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupProtectionContainersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupProtectionContainersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupProtectionContainersClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupProtectionContainersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupProtectionContainersClient) listHandleResponse(resp *http.Response) (BackupProtectionContainersClientListResponse, error) { - result := BackupProtectionContainersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerResourceList); err != nil { - return BackupProtectionContainersClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotectionintent_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotectionintent_client.go deleted file mode 100644 index 582e6baf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupprotectionintent_client.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupProtectionIntentClient contains the methods for the BackupProtectionIntent group. -// Don't use this type directly, use NewBackupProtectionIntentClient() instead. -type BackupProtectionIntentClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupProtectionIntentClient creates a new instance of BackupProtectionIntentClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupProtectionIntentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupProtectionIntentClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupProtectionIntentClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Provides a pageable list of all intents that are present within a vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupProtectionIntentClientListOptions contains the optional parameters for the BackupProtectionIntentClient.List -// method. -func (client *BackupProtectionIntentClient) NewListPager(vaultName string, resourceGroupName string, options *BackupProtectionIntentClientListOptions) *runtime.Pager[BackupProtectionIntentClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupProtectionIntentClientListResponse]{ - More: func(page BackupProtectionIntentClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupProtectionIntentClientListResponse) (BackupProtectionIntentClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupProtectionIntentClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupProtectionIntentClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupProtectionIntentClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupProtectionIntentClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupProtectionIntentClientListOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupProtectionIntentClient) listHandleResponse(resp *http.Response) (BackupProtectionIntentClientListResponse, error) { - result := BackupProtectionIntentClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionIntentResourceList); err != nil { - return BackupProtectionIntentClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupresourceencryptionconfigs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupresourceencryptionconfigs_client.go deleted file mode 100644 index 0ae6a750..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupresourceencryptionconfigs_client.go +++ /dev/null @@ -1,161 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupResourceEncryptionConfigsClient contains the methods for the BackupResourceEncryptionConfigs group. -// Don't use this type directly, use NewBackupResourceEncryptionConfigsClient() instead. -type BackupResourceEncryptionConfigsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupResourceEncryptionConfigsClient creates a new instance of BackupResourceEncryptionConfigsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupResourceEncryptionConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupResourceEncryptionConfigsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupResourceEncryptionConfigsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches Vault Encryption config. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupResourceEncryptionConfigsClientGetOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Get -// method. -func (client *BackupResourceEncryptionConfigsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceEncryptionConfigsClientGetOptions) (BackupResourceEncryptionConfigsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) - if err != nil { - return BackupResourceEncryptionConfigsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupResourceEncryptionConfigsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceEncryptionConfigsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupResourceEncryptionConfigsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceEncryptionConfigsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupResourceEncryptionConfigsClient) getHandleResponse(resp *http.Response) (BackupResourceEncryptionConfigsClientGetResponse, error) { - result := BackupResourceEncryptionConfigsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceEncryptionConfigExtendedResource); err != nil { - return BackupResourceEncryptionConfigsClientGetResponse{}, err - } - return result, nil -} - -// Update - Updates Vault encryption config. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - Vault encryption input config request -// options - BackupResourceEncryptionConfigsClientUpdateOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Update -// method. -func (client *BackupResourceEncryptionConfigsClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceEncryptionConfigResource, options *BackupResourceEncryptionConfigsClientUpdateOptions) (BackupResourceEncryptionConfigsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return BackupResourceEncryptionConfigsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupResourceEncryptionConfigsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceEncryptionConfigsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return BackupResourceEncryptionConfigsClientUpdateResponse{}, nil -} - -// updateCreateRequest creates the Update request. -func (client *BackupResourceEncryptionConfigsClient) updateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceEncryptionConfigResource, options *BackupResourceEncryptionConfigsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupresourcestorageconfigsnoncrr_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupresourcestorageconfigsnoncrr_client.go deleted file mode 100644 index b6d27619..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupresourcestorageconfigsnoncrr_client.go +++ /dev/null @@ -1,219 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupResourceStorageConfigsNonCRRClient contains the methods for the BackupResourceStorageConfigsNonCRR group. -// Don't use this type directly, use NewBackupResourceStorageConfigsNonCRRClient() instead. -type BackupResourceStorageConfigsNonCRRClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupResourceStorageConfigsNonCRRClient creates a new instance of BackupResourceStorageConfigsNonCRRClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupResourceStorageConfigsNonCRRClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupResourceStorageConfigsNonCRRClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupResourceStorageConfigsNonCRRClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches resource storage config. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupResourceStorageConfigsNonCRRClientGetOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Get -// method. -func (client *BackupResourceStorageConfigsNonCRRClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceStorageConfigsNonCRRClientGetOptions) (BackupResourceStorageConfigsNonCRRClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) - if err != nil { - return BackupResourceStorageConfigsNonCRRClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupResourceStorageConfigsNonCRRClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceStorageConfigsNonCRRClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupResourceStorageConfigsNonCRRClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceStorageConfigsNonCRRClientGetOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupResourceStorageConfigsNonCRRClient) getHandleResponse(resp *http.Response) (BackupResourceStorageConfigsNonCRRClientGetResponse, error) { - result := BackupResourceStorageConfigsNonCRRClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceConfigResource); err != nil { - return BackupResourceStorageConfigsNonCRRClientGetResponse{}, err - } - return result, nil -} - -// Patch - Updates vault storage model type. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - Vault storage config request -// options - BackupResourceStorageConfigsNonCRRClientPatchOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Patch -// method. -func (client *BackupResourceStorageConfigsNonCRRClient) Patch(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceConfigResource, options *BackupResourceStorageConfigsNonCRRClientPatchOptions) (BackupResourceStorageConfigsNonCRRClientPatchResponse, error) { - req, err := client.patchCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, runtime.NewResponseError(resp) - } - return BackupResourceStorageConfigsNonCRRClientPatchResponse{}, nil -} - -// patchCreateRequest creates the Patch request. -func (client *BackupResourceStorageConfigsNonCRRClient) patchCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceConfigResource, options *BackupResourceStorageConfigsNonCRRClientPatchOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// Update - Updates vault storage model type. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - Vault storage config request -// options - BackupResourceStorageConfigsNonCRRClientUpdateOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Update -// method. -func (client *BackupResourceStorageConfigsNonCRRClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceConfigResource, options *BackupResourceStorageConfigsNonCRRClientUpdateOptions) (BackupResourceStorageConfigsNonCRRClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *BackupResourceStorageConfigsNonCRRClient) updateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceConfigResource, options *BackupResourceStorageConfigsNonCRRClientUpdateOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateHandleResponse handles the Update response. -func (client *BackupResourceStorageConfigsNonCRRClient) updateHandleResponse(resp *http.Response) (BackupResourceStorageConfigsNonCRRClientUpdateResponse, error) { - result := BackupResourceStorageConfigsNonCRRClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceConfigResource); err != nil { - return BackupResourceStorageConfigsNonCRRClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupresourcevaultconfigs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupresourcevaultconfigs_client.go deleted file mode 100644 index 4f64a754..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupresourcevaultconfigs_client.go +++ /dev/null @@ -1,228 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupResourceVaultConfigsClient contains the methods for the BackupResourceVaultConfigs group. -// Don't use this type directly, use NewBackupResourceVaultConfigsClient() instead. -type BackupResourceVaultConfigsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupResourceVaultConfigsClient creates a new instance of BackupResourceVaultConfigsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupResourceVaultConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupResourceVaultConfigsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupResourceVaultConfigsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches resource vault config. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupResourceVaultConfigsClientGetOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Get -// method. -func (client *BackupResourceVaultConfigsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceVaultConfigsClientGetOptions) (BackupResourceVaultConfigsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) - if err != nil { - return BackupResourceVaultConfigsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupResourceVaultConfigsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceVaultConfigsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupResourceVaultConfigsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupResourceVaultConfigsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BackupResourceVaultConfigsClient) getHandleResponse(resp *http.Response) (BackupResourceVaultConfigsClientGetResponse, error) { - result := BackupResourceVaultConfigsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceVaultConfigResource); err != nil { - return BackupResourceVaultConfigsClientGetResponse{}, err - } - return result, nil -} - -// Put - Updates vault security config. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - resource config request -// options - BackupResourceVaultConfigsClientPutOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Put -// method. -func (client *BackupResourceVaultConfigsClient) Put(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource, options *BackupResourceVaultConfigsClientPutOptions) (BackupResourceVaultConfigsClientPutResponse, error) { - req, err := client.putCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return BackupResourceVaultConfigsClientPutResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupResourceVaultConfigsClientPutResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceVaultConfigsClientPutResponse{}, runtime.NewResponseError(resp) - } - return client.putHandleResponse(resp) -} - -// putCreateRequest creates the Put request. -func (client *BackupResourceVaultConfigsClient) putCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource, options *BackupResourceVaultConfigsClientPutOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// putHandleResponse handles the Put response. -func (client *BackupResourceVaultConfigsClient) putHandleResponse(resp *http.Response) (BackupResourceVaultConfigsClientPutResponse, error) { - result := BackupResourceVaultConfigsClientPutResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceVaultConfigResource); err != nil { - return BackupResourceVaultConfigsClientPutResponse{}, err - } - return result, nil -} - -// Update - Updates vault security config. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - resource config request -// options - BackupResourceVaultConfigsClientUpdateOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Update -// method. -func (client *BackupResourceVaultConfigsClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource, options *BackupResourceVaultConfigsClientUpdateOptions) (BackupResourceVaultConfigsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return BackupResourceVaultConfigsClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupResourceVaultConfigsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupResourceVaultConfigsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *BackupResourceVaultConfigsClient) updateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource, options *BackupResourceVaultConfigsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// updateHandleResponse handles the Update response. -func (client *BackupResourceVaultConfigsClient) updateHandleResponse(resp *http.Response) (BackupResourceVaultConfigsClientUpdateResponse, error) { - result := BackupResourceVaultConfigsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupResourceVaultConfigResource); err != nil { - return BackupResourceVaultConfigsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backups_client.go deleted file mode 100644 index 194221a6..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backups_client.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupsClient contains the methods for the Backups group. -// Don't use this type directly, use NewBackupsClient() instead. -type BackupsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupsClient creates a new instance of BackupsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Trigger - Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the operation, -// call GetProtectedItemOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backup item. -// containerName - Container name associated with the backup item. -// protectedItemName - Backup item for which backup needs to be triggered. -// parameters - resource backup request -// options - BackupsClientTriggerOptions contains the optional parameters for the BackupsClient.Trigger method. -func (client *BackupsClient) Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters BackupRequestResource, options *BackupsClientTriggerOptions) (BackupsClientTriggerResponse, error) { - req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, options) - if err != nil { - return BackupsClientTriggerResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupsClientTriggerResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return BackupsClientTriggerResponse{}, runtime.NewResponseError(resp) - } - return BackupsClientTriggerResponse{}, nil -} - -// triggerCreateRequest creates the Trigger request. -func (client *BackupsClient) triggerCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters BackupRequestResource, options *BackupsClientTriggerOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupstatus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupstatus_client.go deleted file mode 100644 index d786048d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupstatus_client.go +++ /dev/null @@ -1,107 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupStatusClient contains the methods for the BackupStatus group. -// Don't use this type directly, use NewBackupStatusClient() instead. -type BackupStatusClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupStatusClient creates a new instance of BackupStatusClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupStatusClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupStatusClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get the container backup status -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// azureRegion - Azure region to hit Api -// parameters - Container Backup Status Request -// options - BackupStatusClientGetOptions contains the optional parameters for the BackupStatusClient.Get method. -func (client *BackupStatusClient) Get(ctx context.Context, azureRegion string, parameters BackupStatusRequest, options *BackupStatusClientGetOptions) (BackupStatusClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, azureRegion, parameters, options) - if err != nil { - return BackupStatusClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupStatusClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupStatusClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BackupStatusClient) getCreateRequest(ctx context.Context, azureRegion string, parameters BackupStatusRequest, options *BackupStatusClientGetOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus" - if azureRegion == "" { - return nil, errors.New("parameter azureRegion cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{azureRegion}", url.PathEscape(azureRegion)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// getHandleResponse handles the Get response. -func (client *BackupStatusClient) getHandleResponse(resp *http.Response) (BackupStatusClientGetResponse, error) { - result := BackupStatusClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupStatusResponse); err != nil { - return BackupStatusClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupusagesummaries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupusagesummaries_client.go deleted file mode 100644 index 9f3539ae..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupusagesummaries_client.go +++ /dev/null @@ -1,125 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupUsageSummariesClient contains the methods for the BackupUsageSummaries group. -// Don't use this type directly, use NewBackupUsageSummariesClient() instead. -type BackupUsageSummariesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupUsageSummariesClient creates a new instance of BackupUsageSummariesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupUsageSummariesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupUsageSummariesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupUsageSummariesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Fetches the backup management usage summaries of the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BackupUsageSummariesClientListOptions contains the optional parameters for the BackupUsageSummariesClient.List -// method. -func (client *BackupUsageSummariesClient) NewListPager(vaultName string, resourceGroupName string, options *BackupUsageSummariesClientListOptions) *runtime.Pager[BackupUsageSummariesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupUsageSummariesClientListResponse]{ - More: func(page BackupUsageSummariesClientListResponse) bool { - return false - }, - Fetcher: func(ctx context.Context, page *BackupUsageSummariesClientListResponse) (BackupUsageSummariesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, vaultName, resourceGroupName, options) - if err != nil { - return BackupUsageSummariesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupUsageSummariesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupUsageSummariesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupUsageSummariesClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *BackupUsageSummariesClientListOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupUsageSummariesClient) listHandleResponse(resp *http.Response) (BackupUsageSummariesClientListResponse, error) { - result := BackupUsageSummariesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.BackupManagementUsageList); err != nil { - return BackupUsageSummariesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupworkloaditems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupworkloaditems_client.go deleted file mode 100644 index a2b087c3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_backupworkloaditems_client.go +++ /dev/null @@ -1,142 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BackupWorkloadItemsClient contains the methods for the BackupWorkloadItems group. -// Don't use this type directly, use NewBackupWorkloadItemsClient() instead. -type BackupWorkloadItemsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBackupWorkloadItemsClient creates a new instance of BackupWorkloadItemsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBackupWorkloadItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupWorkloadItemsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BackupWorkloadItemsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Provides a pageable list of workload item of a specific container according to the query filter and the -// pagination parameters. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the container. -// containerName - Name of the container. -// options - BackupWorkloadItemsClientListOptions contains the optional parameters for the BackupWorkloadItemsClient.List -// method. -func (client *BackupWorkloadItemsClient) NewListPager(vaultName string, resourceGroupName string, fabricName string, containerName string, options *BackupWorkloadItemsClientListOptions) *runtime.Pager[BackupWorkloadItemsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[BackupWorkloadItemsClientListResponse]{ - More: func(page BackupWorkloadItemsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *BackupWorkloadItemsClientListResponse) (BackupWorkloadItemsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return BackupWorkloadItemsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BackupWorkloadItemsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return BackupWorkloadItemsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *BackupWorkloadItemsClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *BackupWorkloadItemsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *BackupWorkloadItemsClient) listHandleResponse(resp *http.Response) (BackupWorkloadItemsClientListResponse, error) { - result := BackupWorkloadItemsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.WorkloadItemResourceList); err != nil { - return BackupWorkloadItemsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_bmspreparedatamoveoperationresult_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_bmspreparedatamoveoperationresult_client.go deleted file mode 100644 index b1a99b47..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_bmspreparedatamoveoperationresult_client.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// BMSPrepareDataMoveOperationResultClient contains the methods for the BMSPrepareDataMoveOperationResult group. -// Don't use this type directly, use NewBMSPrepareDataMoveOperationResultClient() instead. -type BMSPrepareDataMoveOperationResultClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewBMSPrepareDataMoveOperationResultClient creates a new instance of BMSPrepareDataMoveOperationResultClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewBMSPrepareDataMoveOperationResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BMSPrepareDataMoveOperationResultClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &BMSPrepareDataMoveOperationResultClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches Operation Result for Prepare Data Move -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - BMSPrepareDataMoveOperationResultClientGetOptions contains the optional parameters for the BMSPrepareDataMoveOperationResultClient.Get -// method. -func (client *BMSPrepareDataMoveOperationResultClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BMSPrepareDataMoveOperationResultClientGetOptions) (BMSPrepareDataMoveOperationResultClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) - if err != nil { - return BMSPrepareDataMoveOperationResultClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return BMSPrepareDataMoveOperationResultClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return BMSPrepareDataMoveOperationResultClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *BMSPrepareDataMoveOperationResultClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *BMSPrepareDataMoveOperationResultClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationResults/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *BMSPrepareDataMoveOperationResultClient) getHandleResponse(resp *http.Response) (BMSPrepareDataMoveOperationResultClientGetResponse, error) { - result := BMSPrepareDataMoveOperationResultClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { - return BMSPrepareDataMoveOperationResultClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_client.go deleted file mode 100644 index 23c8b035..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_client.go +++ /dev/null @@ -1,322 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// Client contains the methods for the RecoveryServicesBackupClient group. -// Don't use this type directly, use NewClient() instead. -type Client struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewClient creates a new instance of Client with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &Client{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginBMSPrepareDataMove - Prepares source vault for Data Move operation -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - Prepare data move request -// options - ClientBeginBMSPrepareDataMoveOptions contains the optional parameters for the Client.BeginBMSPrepareDataMove -// method. -func (client *Client) BeginBMSPrepareDataMove(ctx context.Context, vaultName string, resourceGroupName string, parameters PrepareDataMoveRequest, options *ClientBeginBMSPrepareDataMoveOptions) (*runtime.Poller[ClientBMSPrepareDataMoveResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.bMSPrepareDataMove(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClientBMSPrepareDataMoveResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ClientBMSPrepareDataMoveResponse](options.ResumeToken, client.pl, nil) - } -} - -// BMSPrepareDataMove - Prepares source vault for Data Move operation -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -func (client *Client) bMSPrepareDataMove(ctx context.Context, vaultName string, resourceGroupName string, parameters PrepareDataMoveRequest, options *ClientBeginBMSPrepareDataMoveOptions) (*http.Response, error) { - req, err := client.bmsPrepareDataMoveCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// bmsPrepareDataMoveCreateRequest creates the BMSPrepareDataMove request. -func (client *Client) bmsPrepareDataMoveCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters PrepareDataMoveRequest, options *ClientBeginBMSPrepareDataMoveOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// BeginBMSTriggerDataMove - Triggers Data Move Operation on target vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - Trigger data move request -// options - ClientBeginBMSTriggerDataMoveOptions contains the optional parameters for the Client.BeginBMSTriggerDataMove -// method. -func (client *Client) BeginBMSTriggerDataMove(ctx context.Context, vaultName string, resourceGroupName string, parameters TriggerDataMoveRequest, options *ClientBeginBMSTriggerDataMoveOptions) (*runtime.Poller[ClientBMSTriggerDataMoveResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.bMSTriggerDataMove(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClientBMSTriggerDataMoveResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ClientBMSTriggerDataMoveResponse](options.ResumeToken, client.pl, nil) - } -} - -// BMSTriggerDataMove - Triggers Data Move Operation on target vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -func (client *Client) bMSTriggerDataMove(ctx context.Context, vaultName string, resourceGroupName string, parameters TriggerDataMoveRequest, options *ClientBeginBMSTriggerDataMoveOptions) (*http.Response, error) { - req, err := client.bmsTriggerDataMoveCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// bmsTriggerDataMoveCreateRequest creates the BMSTriggerDataMove request. -func (client *Client) bmsTriggerDataMoveCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters TriggerDataMoveRequest, options *ClientBeginBMSTriggerDataMoveOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// GetOperationStatus - Fetches operation status for data move operation on vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - ClientGetOperationStatusOptions contains the optional parameters for the Client.GetOperationStatus method. -func (client *Client) GetOperationStatus(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ClientGetOperationStatusOptions) (ClientGetOperationStatusResponse, error) { - req, err := client.getOperationStatusCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) - if err != nil { - return ClientGetOperationStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ClientGetOperationStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientGetOperationStatusResponse{}, runtime.NewResponseError(resp) - } - return client.getOperationStatusHandleResponse(resp) -} - -// getOperationStatusCreateRequest creates the GetOperationStatus request. -func (client *Client) getOperationStatusCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ClientGetOperationStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getOperationStatusHandleResponse handles the GetOperationStatus response. -func (client *Client) getOperationStatusHandleResponse(resp *http.Response) (ClientGetOperationStatusResponse, error) { - result := ClientGetOperationStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { - return ClientGetOperationStatusResponse{}, err - } - return result, nil -} - -// BeginMoveRecoveryPoint - Move recovery point from one datastore to another store. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - Move Resource Across Tiers Request -// options - ClientBeginMoveRecoveryPointOptions contains the optional parameters for the Client.BeginMoveRecoveryPoint method. -func (client *Client) BeginMoveRecoveryPoint(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters MoveRPAcrossTiersRequest, options *ClientBeginMoveRecoveryPointOptions) (*runtime.Poller[ClientMoveRecoveryPointResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.moveRecoveryPoint(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClientMoveRecoveryPointResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ClientMoveRecoveryPointResponse](options.ResumeToken, client.pl, nil) - } -} - -// MoveRecoveryPoint - Move recovery point from one datastore to another store. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -func (client *Client) moveRecoveryPoint(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters MoveRPAcrossTiersRequest, options *ClientBeginMoveRecoveryPointOptions) (*http.Response, error) { - req, err := client.moveRecoveryPointCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// moveRecoveryPointCreateRequest creates the MoveRecoveryPoint request. -func (client *Client) moveRecoveryPointCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters MoveRPAcrossTiersRequest, options *ClientBeginMoveRecoveryPointOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - if recoveryPointID == "" { - return nil, errors.New("parameter recoveryPointID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_constants.go deleted file mode 100644 index afb26f63..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_constants.go +++ /dev/null @@ -1,1578 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -const ( - moduleName = "armrecoveryservicesbackup" - moduleVersion = "v1.0.0" -) - -// AcquireStorageAccountLock - Whether storage account lock is to be acquired for this container or not. -type AcquireStorageAccountLock string - -const ( - AcquireStorageAccountLockAcquire AcquireStorageAccountLock = "Acquire" - AcquireStorageAccountLockNotAcquire AcquireStorageAccountLock = "NotAcquire" -) - -// PossibleAcquireStorageAccountLockValues returns the possible values for the AcquireStorageAccountLock const type. -func PossibleAcquireStorageAccountLockValues() []AcquireStorageAccountLock { - return []AcquireStorageAccountLock{ - AcquireStorageAccountLockAcquire, - AcquireStorageAccountLockNotAcquire, - } -} - -// AzureFileShareType - File Share type XSync or XSMB. -type AzureFileShareType string - -const ( - AzureFileShareTypeInvalid AzureFileShareType = "Invalid" - AzureFileShareTypeXSMB AzureFileShareType = "XSMB" - AzureFileShareTypeXSync AzureFileShareType = "XSync" -) - -// PossibleAzureFileShareTypeValues returns the possible values for the AzureFileShareType const type. -func PossibleAzureFileShareTypeValues() []AzureFileShareType { - return []AzureFileShareType{ - AzureFileShareTypeInvalid, - AzureFileShareTypeXSMB, - AzureFileShareTypeXSync, - } -} - -// BackupEngineType - Type of the backup engine. -type BackupEngineType string - -const ( - BackupEngineTypeAzureBackupServerEngine BackupEngineType = "AzureBackupServerEngine" - BackupEngineTypeDpmBackupEngine BackupEngineType = "DpmBackupEngine" - BackupEngineTypeInvalid BackupEngineType = "Invalid" -) - -// PossibleBackupEngineTypeValues returns the possible values for the BackupEngineType const type. -func PossibleBackupEngineTypeValues() []BackupEngineType { - return []BackupEngineType{ - BackupEngineTypeAzureBackupServerEngine, - BackupEngineTypeDpmBackupEngine, - BackupEngineTypeInvalid, - } -} - -// BackupItemType - Type of backup items associated with this container. -type BackupItemType string - -const ( - BackupItemTypeAzureFileShare BackupItemType = "AzureFileShare" - BackupItemTypeAzureSQLDb BackupItemType = "AzureSqlDb" - BackupItemTypeClient BackupItemType = "Client" - BackupItemTypeExchange BackupItemType = "Exchange" - BackupItemTypeFileFolder BackupItemType = "FileFolder" - BackupItemTypeGenericDataSource BackupItemType = "GenericDataSource" - BackupItemTypeInvalid BackupItemType = "Invalid" - BackupItemTypeSAPAseDatabase BackupItemType = "SAPAseDatabase" - BackupItemTypeSAPHanaDatabase BackupItemType = "SAPHanaDatabase" - BackupItemTypeSQLDB BackupItemType = "SQLDB" - BackupItemTypeSQLDataBase BackupItemType = "SQLDataBase" - BackupItemTypeSharepoint BackupItemType = "Sharepoint" - BackupItemTypeSystemState BackupItemType = "SystemState" - BackupItemTypeVM BackupItemType = "VM" - BackupItemTypeVMwareVM BackupItemType = "VMwareVM" -) - -// PossibleBackupItemTypeValues returns the possible values for the BackupItemType const type. -func PossibleBackupItemTypeValues() []BackupItemType { - return []BackupItemType{ - BackupItemTypeAzureFileShare, - BackupItemTypeAzureSQLDb, - BackupItemTypeClient, - BackupItemTypeExchange, - BackupItemTypeFileFolder, - BackupItemTypeGenericDataSource, - BackupItemTypeInvalid, - BackupItemTypeSAPAseDatabase, - BackupItemTypeSAPHanaDatabase, - BackupItemTypeSQLDB, - BackupItemTypeSQLDataBase, - BackupItemTypeSharepoint, - BackupItemTypeSystemState, - BackupItemTypeVM, - BackupItemTypeVMwareVM, - } -} - -// BackupManagementType - Backup management type to execute the current job. -type BackupManagementType string - -const ( - BackupManagementTypeAzureBackupServer BackupManagementType = "AzureBackupServer" - BackupManagementTypeAzureIaasVM BackupManagementType = "AzureIaasVM" - BackupManagementTypeAzureSQL BackupManagementType = "AzureSql" - BackupManagementTypeAzureStorage BackupManagementType = "AzureStorage" - BackupManagementTypeAzureWorkload BackupManagementType = "AzureWorkload" - BackupManagementTypeDPM BackupManagementType = "DPM" - BackupManagementTypeDefaultBackup BackupManagementType = "DefaultBackup" - BackupManagementTypeInvalid BackupManagementType = "Invalid" - BackupManagementTypeMAB BackupManagementType = "MAB" -) - -// PossibleBackupManagementTypeValues returns the possible values for the BackupManagementType const type. -func PossibleBackupManagementTypeValues() []BackupManagementType { - return []BackupManagementType{ - BackupManagementTypeAzureBackupServer, - BackupManagementTypeAzureIaasVM, - BackupManagementTypeAzureSQL, - BackupManagementTypeAzureStorage, - BackupManagementTypeAzureWorkload, - BackupManagementTypeDPM, - BackupManagementTypeDefaultBackup, - BackupManagementTypeInvalid, - BackupManagementTypeMAB, - } -} - -// BackupType - Type of backup, viz. Full, Differential, Log or CopyOnlyFull -type BackupType string - -const ( - BackupTypeCopyOnlyFull BackupType = "CopyOnlyFull" - BackupTypeDifferential BackupType = "Differential" - BackupTypeFull BackupType = "Full" - BackupTypeIncremental BackupType = "Incremental" - BackupTypeInvalid BackupType = "Invalid" - BackupTypeLog BackupType = "Log" -) - -// PossibleBackupTypeValues returns the possible values for the BackupType const type. -func PossibleBackupTypeValues() []BackupType { - return []BackupType{ - BackupTypeCopyOnlyFull, - BackupTypeDifferential, - BackupTypeFull, - BackupTypeIncremental, - BackupTypeInvalid, - BackupTypeLog, - } -} - -// ContainerType - Type of container for filter -type ContainerType string - -const ( - ContainerTypeAzureBackupServerContainer ContainerType = "AzureBackupServerContainer" - ContainerTypeAzureSQLContainer ContainerType = "AzureSqlContainer" - ContainerTypeAzureWorkloadContainer ContainerType = "AzureWorkloadContainer" - ContainerTypeCluster ContainerType = "Cluster" - ContainerTypeDPMContainer ContainerType = "DPMContainer" - ContainerTypeGenericContainer ContainerType = "GenericContainer" - ContainerTypeIaasVMContainer ContainerType = "IaasVMContainer" - ContainerTypeIaasVMServiceContainer ContainerType = "IaasVMServiceContainer" - ContainerTypeInvalid ContainerType = "Invalid" - ContainerTypeMABContainer ContainerType = "MABContainer" - ContainerTypeMicrosoftClassicComputeVirtualMachines ContainerType = "Microsoft.ClassicCompute/virtualMachines" - ContainerTypeMicrosoftComputeVirtualMachines ContainerType = "Microsoft.Compute/virtualMachines" - ContainerTypeSQLAGWorkLoadContainer ContainerType = "SQLAGWorkLoadContainer" - ContainerTypeStorageContainer ContainerType = "StorageContainer" - ContainerTypeUnknown ContainerType = "Unknown" - ContainerTypeVCenter ContainerType = "VCenter" - ContainerTypeVMAppContainer ContainerType = "VMAppContainer" - ContainerTypeWindows ContainerType = "Windows" -) - -// PossibleContainerTypeValues returns the possible values for the ContainerType const type. -func PossibleContainerTypeValues() []ContainerType { - return []ContainerType{ - ContainerTypeAzureBackupServerContainer, - ContainerTypeAzureSQLContainer, - ContainerTypeAzureWorkloadContainer, - ContainerTypeCluster, - ContainerTypeDPMContainer, - ContainerTypeGenericContainer, - ContainerTypeIaasVMContainer, - ContainerTypeIaasVMServiceContainer, - ContainerTypeInvalid, - ContainerTypeMABContainer, - ContainerTypeMicrosoftClassicComputeVirtualMachines, - ContainerTypeMicrosoftComputeVirtualMachines, - ContainerTypeSQLAGWorkLoadContainer, - ContainerTypeStorageContainer, - ContainerTypeUnknown, - ContainerTypeVCenter, - ContainerTypeVMAppContainer, - ContainerTypeWindows, - } -} - -// CopyOptions - Options to resolve copy conflicts. -type CopyOptions string - -const ( - CopyOptionsCreateCopy CopyOptions = "CreateCopy" - CopyOptionsFailOnConflict CopyOptions = "FailOnConflict" - CopyOptionsInvalid CopyOptions = "Invalid" - CopyOptionsOverwrite CopyOptions = "Overwrite" - CopyOptionsSkip CopyOptions = "Skip" -) - -// PossibleCopyOptionsValues returns the possible values for the CopyOptions const type. -func PossibleCopyOptionsValues() []CopyOptions { - return []CopyOptions{ - CopyOptionsCreateCopy, - CopyOptionsFailOnConflict, - CopyOptionsInvalid, - CopyOptionsOverwrite, - CopyOptionsSkip, - } -} - -// CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. -type CreateMode string - -const ( - CreateModeDefault CreateMode = "Default" - CreateModeInvalid CreateMode = "Invalid" - CreateModeRecover CreateMode = "Recover" -) - -// PossibleCreateModeValues returns the possible values for the CreateMode const type. -func PossibleCreateModeValues() []CreateMode { - return []CreateMode{ - CreateModeDefault, - CreateModeInvalid, - CreateModeRecover, - } -} - -// DataMoveLevel - DataMove Level -type DataMoveLevel string - -const ( - DataMoveLevelContainer DataMoveLevel = "Container" - DataMoveLevelInvalid DataMoveLevel = "Invalid" - DataMoveLevelVault DataMoveLevel = "Vault" -) - -// PossibleDataMoveLevelValues returns the possible values for the DataMoveLevel const type. -func PossibleDataMoveLevelValues() []DataMoveLevel { - return []DataMoveLevel{ - DataMoveLevelContainer, - DataMoveLevelInvalid, - DataMoveLevelVault, - } -} - -// DataSourceType - Type of workload this item represents. -type DataSourceType string - -const ( - DataSourceTypeAzureFileShare DataSourceType = "AzureFileShare" - DataSourceTypeAzureSQLDb DataSourceType = "AzureSqlDb" - DataSourceTypeClient DataSourceType = "Client" - DataSourceTypeExchange DataSourceType = "Exchange" - DataSourceTypeFileFolder DataSourceType = "FileFolder" - DataSourceTypeGenericDataSource DataSourceType = "GenericDataSource" - DataSourceTypeInvalid DataSourceType = "Invalid" - DataSourceTypeSAPAseDatabase DataSourceType = "SAPAseDatabase" - DataSourceTypeSAPHanaDatabase DataSourceType = "SAPHanaDatabase" - DataSourceTypeSQLDB DataSourceType = "SQLDB" - DataSourceTypeSQLDataBase DataSourceType = "SQLDataBase" - DataSourceTypeSharepoint DataSourceType = "Sharepoint" - DataSourceTypeSystemState DataSourceType = "SystemState" - DataSourceTypeVM DataSourceType = "VM" - DataSourceTypeVMwareVM DataSourceType = "VMwareVM" -) - -// PossibleDataSourceTypeValues returns the possible values for the DataSourceType const type. -func PossibleDataSourceTypeValues() []DataSourceType { - return []DataSourceType{ - DataSourceTypeAzureFileShare, - DataSourceTypeAzureSQLDb, - DataSourceTypeClient, - DataSourceTypeExchange, - DataSourceTypeFileFolder, - DataSourceTypeGenericDataSource, - DataSourceTypeInvalid, - DataSourceTypeSAPAseDatabase, - DataSourceTypeSAPHanaDatabase, - DataSourceTypeSQLDB, - DataSourceTypeSQLDataBase, - DataSourceTypeSharepoint, - DataSourceTypeSystemState, - DataSourceTypeVM, - DataSourceTypeVMwareVM, - } -} - -type DayOfWeek string - -const ( - DayOfWeekSunday DayOfWeek = "Sunday" - DayOfWeekMonday DayOfWeek = "Monday" - DayOfWeekTuesday DayOfWeek = "Tuesday" - DayOfWeekWednesday DayOfWeek = "Wednesday" - DayOfWeekThursday DayOfWeek = "Thursday" - DayOfWeekFriday DayOfWeek = "Friday" - DayOfWeekSaturday DayOfWeek = "Saturday" -) - -// PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. -func PossibleDayOfWeekValues() []DayOfWeek { - return []DayOfWeek{ - DayOfWeekSunday, - DayOfWeekMonday, - DayOfWeekTuesday, - DayOfWeekWednesday, - DayOfWeekThursday, - DayOfWeekFriday, - DayOfWeekSaturday, - } -} - -// DedupState - Vault Dedup state -type DedupState string - -const ( - DedupStateDisabled DedupState = "Disabled" - DedupStateEnabled DedupState = "Enabled" - DedupStateInvalid DedupState = "Invalid" -) - -// PossibleDedupStateValues returns the possible values for the DedupState const type. -func PossibleDedupStateValues() []DedupState { - return []DedupState{ - DedupStateDisabled, - DedupStateEnabled, - DedupStateInvalid, - } -} - -// EncryptionAtRestType - Encryption At Rest Type -type EncryptionAtRestType string - -const ( - EncryptionAtRestTypeCustomerManaged EncryptionAtRestType = "CustomerManaged" - EncryptionAtRestTypeInvalid EncryptionAtRestType = "Invalid" - EncryptionAtRestTypeMicrosoftManaged EncryptionAtRestType = "MicrosoftManaged" -) - -// PossibleEncryptionAtRestTypeValues returns the possible values for the EncryptionAtRestType const type. -func PossibleEncryptionAtRestTypeValues() []EncryptionAtRestType { - return []EncryptionAtRestType{ - EncryptionAtRestTypeCustomerManaged, - EncryptionAtRestTypeInvalid, - EncryptionAtRestTypeMicrosoftManaged, - } -} - -// EnhancedSecurityState - Enabled or Disabled. -type EnhancedSecurityState string - -const ( - EnhancedSecurityStateDisabled EnhancedSecurityState = "Disabled" - EnhancedSecurityStateEnabled EnhancedSecurityState = "Enabled" - EnhancedSecurityStateInvalid EnhancedSecurityState = "Invalid" -) - -// PossibleEnhancedSecurityStateValues returns the possible values for the EnhancedSecurityState const type. -func PossibleEnhancedSecurityStateValues() []EnhancedSecurityState { - return []EnhancedSecurityState{ - EnhancedSecurityStateDisabled, - EnhancedSecurityStateEnabled, - EnhancedSecurityStateInvalid, - } -} - -// FabricName - Specifies the fabric name - Azure or AD -type FabricName string - -const ( - FabricNameAzure FabricName = "Azure" - FabricNameInvalid FabricName = "Invalid" -) - -// PossibleFabricNameValues returns the possible values for the FabricName const type. -func PossibleFabricNameValues() []FabricName { - return []FabricName{ - FabricNameAzure, - FabricNameInvalid, - } -} - -// HTTPStatusCode - HTTP Status Code of the operation. -type HTTPStatusCode string - -const ( - HTTPStatusCodeContinue HTTPStatusCode = "Continue" - HTTPStatusCodeSwitchingProtocols HTTPStatusCode = "SwitchingProtocols" - HTTPStatusCodeOK HTTPStatusCode = "OK" - HTTPStatusCodeCreated HTTPStatusCode = "Created" - HTTPStatusCodeAccepted HTTPStatusCode = "Accepted" - HTTPStatusCodeNonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation" - HTTPStatusCodeNoContent HTTPStatusCode = "NoContent" - HTTPStatusCodeResetContent HTTPStatusCode = "ResetContent" - HTTPStatusCodePartialContent HTTPStatusCode = "PartialContent" - HTTPStatusCodeMultipleChoices HTTPStatusCode = "MultipleChoices" - HTTPStatusCodeAmbiguous HTTPStatusCode = "Ambiguous" - HTTPStatusCodeMovedPermanently HTTPStatusCode = "MovedPermanently" - HTTPStatusCodeMoved HTTPStatusCode = "Moved" - HTTPStatusCodeFound HTTPStatusCode = "Found" - HTTPStatusCodeRedirect HTTPStatusCode = "Redirect" - HTTPStatusCodeSeeOther HTTPStatusCode = "SeeOther" - HTTPStatusCodeRedirectMethod HTTPStatusCode = "RedirectMethod" - HTTPStatusCodeNotModified HTTPStatusCode = "NotModified" - HTTPStatusCodeUseProxy HTTPStatusCode = "UseProxy" - HTTPStatusCodeUnused HTTPStatusCode = "Unused" - HTTPStatusCodeTemporaryRedirect HTTPStatusCode = "TemporaryRedirect" - HTTPStatusCodeRedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb" - HTTPStatusCodeBadRequest HTTPStatusCode = "BadRequest" - HTTPStatusCodeUnauthorized HTTPStatusCode = "Unauthorized" - HTTPStatusCodePaymentRequired HTTPStatusCode = "PaymentRequired" - HTTPStatusCodeForbidden HTTPStatusCode = "Forbidden" - HTTPStatusCodeNotFound HTTPStatusCode = "NotFound" - HTTPStatusCodeMethodNotAllowed HTTPStatusCode = "MethodNotAllowed" - HTTPStatusCodeNotAcceptable HTTPStatusCode = "NotAcceptable" - HTTPStatusCodeProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired" - HTTPStatusCodeRequestTimeout HTTPStatusCode = "RequestTimeout" - HTTPStatusCodeConflict HTTPStatusCode = "Conflict" - HTTPStatusCodeGone HTTPStatusCode = "Gone" - HTTPStatusCodeLengthRequired HTTPStatusCode = "LengthRequired" - HTTPStatusCodePreconditionFailed HTTPStatusCode = "PreconditionFailed" - HTTPStatusCodeRequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge" - HTTPStatusCodeRequestURITooLong HTTPStatusCode = "RequestUriTooLong" - HTTPStatusCodeUnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType" - HTTPStatusCodeRequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable" - HTTPStatusCodeExpectationFailed HTTPStatusCode = "ExpectationFailed" - HTTPStatusCodeUpgradeRequired HTTPStatusCode = "UpgradeRequired" - HTTPStatusCodeInternalServerError HTTPStatusCode = "InternalServerError" - HTTPStatusCodeNotImplemented HTTPStatusCode = "NotImplemented" - HTTPStatusCodeBadGateway HTTPStatusCode = "BadGateway" - HTTPStatusCodeServiceUnavailable HTTPStatusCode = "ServiceUnavailable" - HTTPStatusCodeGatewayTimeout HTTPStatusCode = "GatewayTimeout" - HTTPStatusCodeHTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported" -) - -// PossibleHTTPStatusCodeValues returns the possible values for the HTTPStatusCode const type. -func PossibleHTTPStatusCodeValues() []HTTPStatusCode { - return []HTTPStatusCode{ - HTTPStatusCodeContinue, - HTTPStatusCodeSwitchingProtocols, - HTTPStatusCodeOK, - HTTPStatusCodeCreated, - HTTPStatusCodeAccepted, - HTTPStatusCodeNonAuthoritativeInformation, - HTTPStatusCodeNoContent, - HTTPStatusCodeResetContent, - HTTPStatusCodePartialContent, - HTTPStatusCodeMultipleChoices, - HTTPStatusCodeAmbiguous, - HTTPStatusCodeMovedPermanently, - HTTPStatusCodeMoved, - HTTPStatusCodeFound, - HTTPStatusCodeRedirect, - HTTPStatusCodeSeeOther, - HTTPStatusCodeRedirectMethod, - HTTPStatusCodeNotModified, - HTTPStatusCodeUseProxy, - HTTPStatusCodeUnused, - HTTPStatusCodeTemporaryRedirect, - HTTPStatusCodeRedirectKeepVerb, - HTTPStatusCodeBadRequest, - HTTPStatusCodeUnauthorized, - HTTPStatusCodePaymentRequired, - HTTPStatusCodeForbidden, - HTTPStatusCodeNotFound, - HTTPStatusCodeMethodNotAllowed, - HTTPStatusCodeNotAcceptable, - HTTPStatusCodeProxyAuthenticationRequired, - HTTPStatusCodeRequestTimeout, - HTTPStatusCodeConflict, - HTTPStatusCodeGone, - HTTPStatusCodeLengthRequired, - HTTPStatusCodePreconditionFailed, - HTTPStatusCodeRequestEntityTooLarge, - HTTPStatusCodeRequestURITooLong, - HTTPStatusCodeUnsupportedMediaType, - HTTPStatusCodeRequestedRangeNotSatisfiable, - HTTPStatusCodeExpectationFailed, - HTTPStatusCodeUpgradeRequired, - HTTPStatusCodeInternalServerError, - HTTPStatusCodeNotImplemented, - HTTPStatusCodeBadGateway, - HTTPStatusCodeServiceUnavailable, - HTTPStatusCodeGatewayTimeout, - HTTPStatusCodeHTTPVersionNotSupported, - } -} - -// HealthState - Health State for the backed up item. -type HealthState string - -const ( - HealthStateActionRequired HealthState = "ActionRequired" - HealthStateActionSuggested HealthState = "ActionSuggested" - HealthStateInvalid HealthState = "Invalid" - HealthStatePassed HealthState = "Passed" -) - -// PossibleHealthStateValues returns the possible values for the HealthState const type. -func PossibleHealthStateValues() []HealthState { - return []HealthState{ - HealthStateActionRequired, - HealthStateActionSuggested, - HealthStateInvalid, - HealthStatePassed, - } -} - -// HealthStatus - Health status of protected item. -type HealthStatus string - -const ( - HealthStatusActionRequired HealthStatus = "ActionRequired" - HealthStatusActionSuggested HealthStatus = "ActionSuggested" - HealthStatusInvalid HealthStatus = "Invalid" - HealthStatusPassed HealthStatus = "Passed" -) - -// PossibleHealthStatusValues returns the possible values for the HealthStatus const type. -func PossibleHealthStatusValues() []HealthStatus { - return []HealthStatus{ - HealthStatusActionRequired, - HealthStatusActionSuggested, - HealthStatusInvalid, - HealthStatusPassed, - } -} - -type IAASVMPolicyType string - -const ( - IAASVMPolicyTypeInvalid IAASVMPolicyType = "Invalid" - IAASVMPolicyTypeV1 IAASVMPolicyType = "V1" - IAASVMPolicyTypeV2 IAASVMPolicyType = "V2" -) - -// PossibleIAASVMPolicyTypeValues returns the possible values for the IAASVMPolicyType const type. -func PossibleIAASVMPolicyTypeValues() []IAASVMPolicyType { - return []IAASVMPolicyType{ - IAASVMPolicyTypeInvalid, - IAASVMPolicyTypeV1, - IAASVMPolicyTypeV2, - } -} - -type InfrastructureEncryptionState string - -const ( - InfrastructureEncryptionStateDisabled InfrastructureEncryptionState = "Disabled" - InfrastructureEncryptionStateEnabled InfrastructureEncryptionState = "Enabled" - InfrastructureEncryptionStateInvalid InfrastructureEncryptionState = "Invalid" -) - -// PossibleInfrastructureEncryptionStateValues returns the possible values for the InfrastructureEncryptionState const type. -func PossibleInfrastructureEncryptionStateValues() []InfrastructureEncryptionState { - return []InfrastructureEncryptionState{ - InfrastructureEncryptionStateDisabled, - InfrastructureEncryptionStateEnabled, - InfrastructureEncryptionStateInvalid, - } -} - -// InquiryStatus - Status of protectable item, i.e. InProgress,Succeeded,Failed -type InquiryStatus string - -const ( - InquiryStatusFailed InquiryStatus = "Failed" - InquiryStatusInvalid InquiryStatus = "Invalid" - InquiryStatusSuccess InquiryStatus = "Success" -) - -// PossibleInquiryStatusValues returns the possible values for the InquiryStatus const type. -func PossibleInquiryStatusValues() []InquiryStatus { - return []InquiryStatus{ - InquiryStatusFailed, - InquiryStatusInvalid, - InquiryStatusSuccess, - } -} - -// IntentItemType - Type of workload this item represents -type IntentItemType string - -const ( - IntentItemTypeInvalid IntentItemType = "Invalid" - IntentItemTypeSQLAvailabilityGroupContainer IntentItemType = "SQLAvailabilityGroupContainer" - IntentItemTypeSQLInstance IntentItemType = "SQLInstance" -) - -// PossibleIntentItemTypeValues returns the possible values for the IntentItemType const type. -func PossibleIntentItemTypeValues() []IntentItemType { - return []IntentItemType{ - IntentItemTypeInvalid, - IntentItemTypeSQLAvailabilityGroupContainer, - IntentItemTypeSQLInstance, - } -} - -// JobOperationType - Type of operation. -type JobOperationType string - -const ( - JobOperationTypeBackup JobOperationType = "Backup" - JobOperationTypeConfigureBackup JobOperationType = "ConfigureBackup" - JobOperationTypeCrossRegionRestore JobOperationType = "CrossRegionRestore" - JobOperationTypeDeleteBackupData JobOperationType = "DeleteBackupData" - JobOperationTypeDisableBackup JobOperationType = "DisableBackup" - JobOperationTypeInvalid JobOperationType = "Invalid" - JobOperationTypeRegister JobOperationType = "Register" - JobOperationTypeRestore JobOperationType = "Restore" - JobOperationTypeUnRegister JobOperationType = "UnRegister" - JobOperationTypeUndelete JobOperationType = "Undelete" - JobOperationTypeUpdateCustomerManagedKey JobOperationType = "UpdateCustomerManagedKey" -) - -// PossibleJobOperationTypeValues returns the possible values for the JobOperationType const type. -func PossibleJobOperationTypeValues() []JobOperationType { - return []JobOperationType{ - JobOperationTypeBackup, - JobOperationTypeConfigureBackup, - JobOperationTypeCrossRegionRestore, - JobOperationTypeDeleteBackupData, - JobOperationTypeDisableBackup, - JobOperationTypeInvalid, - JobOperationTypeRegister, - JobOperationTypeRestore, - JobOperationTypeUnRegister, - JobOperationTypeUndelete, - JobOperationTypeUpdateCustomerManagedKey, - } -} - -// JobStatus - Status of the job. -type JobStatus string - -const ( - JobStatusCancelled JobStatus = "Cancelled" - JobStatusCancelling JobStatus = "Cancelling" - JobStatusCompleted JobStatus = "Completed" - JobStatusCompletedWithWarnings JobStatus = "CompletedWithWarnings" - JobStatusFailed JobStatus = "Failed" - JobStatusInProgress JobStatus = "InProgress" - JobStatusInvalid JobStatus = "Invalid" -) - -// PossibleJobStatusValues returns the possible values for the JobStatus const type. -func PossibleJobStatusValues() []JobStatus { - return []JobStatus{ - JobStatusCancelled, - JobStatusCancelling, - JobStatusCompleted, - JobStatusCompletedWithWarnings, - JobStatusFailed, - JobStatusInProgress, - JobStatusInvalid, - } -} - -type JobSupportedAction string - -const ( - JobSupportedActionInvalid JobSupportedAction = "Invalid" - JobSupportedActionCancellable JobSupportedAction = "Cancellable" - JobSupportedActionRetriable JobSupportedAction = "Retriable" -) - -// PossibleJobSupportedActionValues returns the possible values for the JobSupportedAction const type. -func PossibleJobSupportedActionValues() []JobSupportedAction { - return []JobSupportedAction{ - JobSupportedActionInvalid, - JobSupportedActionCancellable, - JobSupportedActionRetriable, - } -} - -// LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. -type LastBackupStatus string - -const ( - LastBackupStatusHealthy LastBackupStatus = "Healthy" - LastBackupStatusIRPending LastBackupStatus = "IRPending" - LastBackupStatusInvalid LastBackupStatus = "Invalid" - LastBackupStatusUnhealthy LastBackupStatus = "Unhealthy" -) - -// PossibleLastBackupStatusValues returns the possible values for the LastBackupStatus const type. -func PossibleLastBackupStatusValues() []LastBackupStatus { - return []LastBackupStatus{ - LastBackupStatusHealthy, - LastBackupStatusIRPending, - LastBackupStatusInvalid, - LastBackupStatusUnhealthy, - } -} - -type LastUpdateStatus string - -const ( - LastUpdateStatusFailed LastUpdateStatus = "Failed" - LastUpdateStatusFirstInitialization LastUpdateStatus = "FirstInitialization" - LastUpdateStatusInitialized LastUpdateStatus = "Initialized" - LastUpdateStatusInvalid LastUpdateStatus = "Invalid" - LastUpdateStatusNotEnabled LastUpdateStatus = "NotEnabled" - LastUpdateStatusPartiallyFailed LastUpdateStatus = "PartiallyFailed" - LastUpdateStatusPartiallySucceeded LastUpdateStatus = "PartiallySucceeded" - LastUpdateStatusSucceeded LastUpdateStatus = "Succeeded" -) - -// PossibleLastUpdateStatusValues returns the possible values for the LastUpdateStatus const type. -func PossibleLastUpdateStatusValues() []LastUpdateStatus { - return []LastUpdateStatus{ - LastUpdateStatusFailed, - LastUpdateStatusFirstInitialization, - LastUpdateStatusInitialized, - LastUpdateStatusInvalid, - LastUpdateStatusNotEnabled, - LastUpdateStatusPartiallyFailed, - LastUpdateStatusPartiallySucceeded, - LastUpdateStatusSucceeded, - } -} - -// MabServerType - Server type of MAB container. -type MabServerType string - -const ( - MabServerTypeAzureBackupServerContainer MabServerType = "AzureBackupServerContainer" - MabServerTypeAzureSQLContainer MabServerType = "AzureSqlContainer" - MabServerTypeCluster MabServerType = "Cluster" - MabServerTypeDPMContainer MabServerType = "DPMContainer" - MabServerTypeGenericContainer MabServerType = "GenericContainer" - MabServerTypeIaasVMContainer MabServerType = "IaasVMContainer" - MabServerTypeIaasVMServiceContainer MabServerType = "IaasVMServiceContainer" - MabServerTypeInvalid MabServerType = "Invalid" - MabServerTypeMABContainer MabServerType = "MABContainer" - MabServerTypeSQLAGWorkLoadContainer MabServerType = "SQLAGWorkLoadContainer" - MabServerTypeStorageContainer MabServerType = "StorageContainer" - MabServerTypeUnknown MabServerType = "Unknown" - MabServerTypeVCenter MabServerType = "VCenter" - MabServerTypeVMAppContainer MabServerType = "VMAppContainer" - MabServerTypeWindows MabServerType = "Windows" -) - -// PossibleMabServerTypeValues returns the possible values for the MabServerType const type. -func PossibleMabServerTypeValues() []MabServerType { - return []MabServerType{ - MabServerTypeAzureBackupServerContainer, - MabServerTypeAzureSQLContainer, - MabServerTypeCluster, - MabServerTypeDPMContainer, - MabServerTypeGenericContainer, - MabServerTypeIaasVMContainer, - MabServerTypeIaasVMServiceContainer, - MabServerTypeInvalid, - MabServerTypeMABContainer, - MabServerTypeSQLAGWorkLoadContainer, - MabServerTypeStorageContainer, - MabServerTypeUnknown, - MabServerTypeVCenter, - MabServerTypeVMAppContainer, - MabServerTypeWindows, - } -} - -type MonthOfYear string - -const ( - MonthOfYearInvalid MonthOfYear = "Invalid" - MonthOfYearJanuary MonthOfYear = "January" - MonthOfYearFebruary MonthOfYear = "February" - MonthOfYearMarch MonthOfYear = "March" - MonthOfYearApril MonthOfYear = "April" - MonthOfYearMay MonthOfYear = "May" - MonthOfYearJune MonthOfYear = "June" - MonthOfYearJuly MonthOfYear = "July" - MonthOfYearAugust MonthOfYear = "August" - MonthOfYearSeptember MonthOfYear = "September" - MonthOfYearOctober MonthOfYear = "October" - MonthOfYearNovember MonthOfYear = "November" - MonthOfYearDecember MonthOfYear = "December" -) - -// PossibleMonthOfYearValues returns the possible values for the MonthOfYear const type. -func PossibleMonthOfYearValues() []MonthOfYear { - return []MonthOfYear{ - MonthOfYearInvalid, - MonthOfYearJanuary, - MonthOfYearFebruary, - MonthOfYearMarch, - MonthOfYearApril, - MonthOfYearMay, - MonthOfYearJune, - MonthOfYearJuly, - MonthOfYearAugust, - MonthOfYearSeptember, - MonthOfYearOctober, - MonthOfYearNovember, - MonthOfYearDecember, - } -} - -// OperationStatusValues - Operation status. -type OperationStatusValues string - -const ( - OperationStatusValuesCanceled OperationStatusValues = "Canceled" - OperationStatusValuesFailed OperationStatusValues = "Failed" - OperationStatusValuesInProgress OperationStatusValues = "InProgress" - OperationStatusValuesInvalid OperationStatusValues = "Invalid" - OperationStatusValuesSucceeded OperationStatusValues = "Succeeded" -) - -// PossibleOperationStatusValuesValues returns the possible values for the OperationStatusValues const type. -func PossibleOperationStatusValuesValues() []OperationStatusValues { - return []OperationStatusValues{ - OperationStatusValuesCanceled, - OperationStatusValuesFailed, - OperationStatusValuesInProgress, - OperationStatusValuesInvalid, - OperationStatusValuesSucceeded, - } -} - -// OperationType - Re-Do Operation -type OperationType string - -const ( - OperationTypeInvalid OperationType = "Invalid" - OperationTypeRegister OperationType = "Register" - OperationTypeReregister OperationType = "Reregister" -) - -// PossibleOperationTypeValues returns the possible values for the OperationType const type. -func PossibleOperationTypeValues() []OperationType { - return []OperationType{ - OperationTypeInvalid, - OperationTypeRegister, - OperationTypeReregister, - } -} - -// OverwriteOptions - Can Overwrite if Target DataBase already exists -type OverwriteOptions string - -const ( - OverwriteOptionsFailOnConflict OverwriteOptions = "FailOnConflict" - OverwriteOptionsInvalid OverwriteOptions = "Invalid" - OverwriteOptionsOverwrite OverwriteOptions = "Overwrite" -) - -// PossibleOverwriteOptionsValues returns the possible values for the OverwriteOptions const type. -func PossibleOverwriteOptionsValues() []OverwriteOptions { - return []OverwriteOptions{ - OverwriteOptionsFailOnConflict, - OverwriteOptionsInvalid, - OverwriteOptionsOverwrite, - } -} - -// PolicyType - Type of backup policy type -type PolicyType string - -const ( - PolicyTypeCopyOnlyFull PolicyType = "CopyOnlyFull" - PolicyTypeDifferential PolicyType = "Differential" - PolicyTypeFull PolicyType = "Full" - PolicyTypeIncremental PolicyType = "Incremental" - PolicyTypeInvalid PolicyType = "Invalid" - PolicyTypeLog PolicyType = "Log" -) - -// PossiblePolicyTypeValues returns the possible values for the PolicyType const type. -func PossiblePolicyTypeValues() []PolicyType { - return []PolicyType{ - PolicyTypeCopyOnlyFull, - PolicyTypeDifferential, - PolicyTypeFull, - PolicyTypeIncremental, - PolicyTypeInvalid, - PolicyTypeLog, - } -} - -// PrivateEndpointConnectionStatus - Gets or sets the status -type PrivateEndpointConnectionStatus string - -const ( - PrivateEndpointConnectionStatusApproved PrivateEndpointConnectionStatus = "Approved" - PrivateEndpointConnectionStatusDisconnected PrivateEndpointConnectionStatus = "Disconnected" - PrivateEndpointConnectionStatusPending PrivateEndpointConnectionStatus = "Pending" - PrivateEndpointConnectionStatusRejected PrivateEndpointConnectionStatus = "Rejected" -) - -// PossiblePrivateEndpointConnectionStatusValues returns the possible values for the PrivateEndpointConnectionStatus const type. -func PossiblePrivateEndpointConnectionStatusValues() []PrivateEndpointConnectionStatus { - return []PrivateEndpointConnectionStatus{ - PrivateEndpointConnectionStatusApproved, - PrivateEndpointConnectionStatusDisconnected, - PrivateEndpointConnectionStatusPending, - PrivateEndpointConnectionStatusRejected, - } -} - -// ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received -type ProtectedItemHealthStatus string - -const ( - ProtectedItemHealthStatusHealthy ProtectedItemHealthStatus = "Healthy" - ProtectedItemHealthStatusIRPending ProtectedItemHealthStatus = "IRPending" - ProtectedItemHealthStatusInvalid ProtectedItemHealthStatus = "Invalid" - ProtectedItemHealthStatusNotReachable ProtectedItemHealthStatus = "NotReachable" - ProtectedItemHealthStatusUnhealthy ProtectedItemHealthStatus = "Unhealthy" -) - -// PossibleProtectedItemHealthStatusValues returns the possible values for the ProtectedItemHealthStatus const type. -func PossibleProtectedItemHealthStatusValues() []ProtectedItemHealthStatus { - return []ProtectedItemHealthStatus{ - ProtectedItemHealthStatusHealthy, - ProtectedItemHealthStatusIRPending, - ProtectedItemHealthStatusInvalid, - ProtectedItemHealthStatusNotReachable, - ProtectedItemHealthStatusUnhealthy, - } -} - -// ProtectedItemState - Backup state of the backed up item. -type ProtectedItemState string - -const ( - ProtectedItemStateIRPending ProtectedItemState = "IRPending" - ProtectedItemStateInvalid ProtectedItemState = "Invalid" - ProtectedItemStateProtected ProtectedItemState = "Protected" - ProtectedItemStateProtectionError ProtectedItemState = "ProtectionError" - ProtectedItemStateProtectionPaused ProtectedItemState = "ProtectionPaused" - ProtectedItemStateProtectionStopped ProtectedItemState = "ProtectionStopped" -) - -// PossibleProtectedItemStateValues returns the possible values for the ProtectedItemState const type. -func PossibleProtectedItemStateValues() []ProtectedItemState { - return []ProtectedItemState{ - ProtectedItemStateIRPending, - ProtectedItemStateInvalid, - ProtectedItemStateProtected, - ProtectedItemStateProtectionError, - ProtectedItemStateProtectionPaused, - ProtectedItemStateProtectionStopped, - } -} - -// ProtectionIntentItemType - backup protectionIntent type. -type ProtectionIntentItemType string - -const ( - ProtectionIntentItemTypeAzureResourceItem ProtectionIntentItemType = "AzureResourceItem" - ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadAutoProtectionIntent" - ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadContainerAutoProtectionIntent" - ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadSQLAutoProtectionIntent" - ProtectionIntentItemTypeInvalid ProtectionIntentItemType = "Invalid" - ProtectionIntentItemTypeRecoveryServiceVaultItem ProtectionIntentItemType = "RecoveryServiceVaultItem" -) - -// PossibleProtectionIntentItemTypeValues returns the possible values for the ProtectionIntentItemType const type. -func PossibleProtectionIntentItemTypeValues() []ProtectionIntentItemType { - return []ProtectionIntentItemType{ - ProtectionIntentItemTypeAzureResourceItem, - ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent, - ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent, - ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent, - ProtectionIntentItemTypeInvalid, - ProtectionIntentItemTypeRecoveryServiceVaultItem, - } -} - -// ProtectionState - Backup state of this backup item. -type ProtectionState string - -const ( - ProtectionStateIRPending ProtectionState = "IRPending" - ProtectionStateInvalid ProtectionState = "Invalid" - ProtectionStateProtected ProtectionState = "Protected" - ProtectionStateProtectionError ProtectionState = "ProtectionError" - ProtectionStateProtectionPaused ProtectionState = "ProtectionPaused" - ProtectionStateProtectionStopped ProtectionState = "ProtectionStopped" -) - -// PossibleProtectionStateValues returns the possible values for the ProtectionState const type. -func PossibleProtectionStateValues() []ProtectionState { - return []ProtectionState{ - ProtectionStateIRPending, - ProtectionStateInvalid, - ProtectionStateProtected, - ProtectionStateProtectionError, - ProtectionStateProtectionPaused, - ProtectionStateProtectionStopped, - } -} - -// ProtectionStatus - Specifies whether the container is registered or not -type ProtectionStatus string - -const ( - ProtectionStatusInvalid ProtectionStatus = "Invalid" - ProtectionStatusNotProtected ProtectionStatus = "NotProtected" - ProtectionStatusProtected ProtectionStatus = "Protected" - ProtectionStatusProtecting ProtectionStatus = "Protecting" - ProtectionStatusProtectionFailed ProtectionStatus = "ProtectionFailed" -) - -// PossibleProtectionStatusValues returns the possible values for the ProtectionStatus const type. -func PossibleProtectionStatusValues() []ProtectionStatus { - return []ProtectionStatus{ - ProtectionStatusInvalid, - ProtectionStatusNotProtected, - ProtectionStatusProtected, - ProtectionStatusProtecting, - ProtectionStatusProtectionFailed, - } -} - -// ProvisioningState - Gets or sets provisioning state of the private endpoint connection -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStatePending ProvisioningState = "Pending" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateDeleting, - ProvisioningStateFailed, - ProvisioningStatePending, - ProvisioningStateSucceeded, - } -} - -// RecoveryMode - Defines whether the current recovery mode is file restore or database restore -type RecoveryMode string - -const ( - RecoveryModeFileRecovery RecoveryMode = "FileRecovery" - RecoveryModeInvalid RecoveryMode = "Invalid" - RecoveryModeWorkloadRecovery RecoveryMode = "WorkloadRecovery" -) - -// PossibleRecoveryModeValues returns the possible values for the RecoveryMode const type. -func PossibleRecoveryModeValues() []RecoveryMode { - return []RecoveryMode{ - RecoveryModeFileRecovery, - RecoveryModeInvalid, - RecoveryModeWorkloadRecovery, - } -} - -// RecoveryPointTierStatus - Recovery point tier status. -type RecoveryPointTierStatus string - -const ( - RecoveryPointTierStatusInvalid RecoveryPointTierStatus = "Invalid" - RecoveryPointTierStatusValid RecoveryPointTierStatus = "Valid" - RecoveryPointTierStatusDisabled RecoveryPointTierStatus = "Disabled" - RecoveryPointTierStatusDeleted RecoveryPointTierStatus = "Deleted" - RecoveryPointTierStatusRehydrated RecoveryPointTierStatus = "Rehydrated" -) - -// PossibleRecoveryPointTierStatusValues returns the possible values for the RecoveryPointTierStatus const type. -func PossibleRecoveryPointTierStatusValues() []RecoveryPointTierStatus { - return []RecoveryPointTierStatus{ - RecoveryPointTierStatusInvalid, - RecoveryPointTierStatusValid, - RecoveryPointTierStatusDisabled, - RecoveryPointTierStatusDeleted, - RecoveryPointTierStatusRehydrated, - } -} - -// RecoveryPointTierType - Recovery point tier type. -type RecoveryPointTierType string - -const ( - RecoveryPointTierTypeInvalid RecoveryPointTierType = "Invalid" - RecoveryPointTierTypeInstantRP RecoveryPointTierType = "InstantRP" - RecoveryPointTierTypeHardenedRP RecoveryPointTierType = "HardenedRP" - RecoveryPointTierTypeArchivedRP RecoveryPointTierType = "ArchivedRP" -) - -// PossibleRecoveryPointTierTypeValues returns the possible values for the RecoveryPointTierType const type. -func PossibleRecoveryPointTierTypeValues() []RecoveryPointTierType { - return []RecoveryPointTierType{ - RecoveryPointTierTypeInvalid, - RecoveryPointTierTypeInstantRP, - RecoveryPointTierTypeHardenedRP, - RecoveryPointTierTypeArchivedRP, - } -} - -// RecoveryType - Type of this recovery. -type RecoveryType string - -const ( - RecoveryTypeAlternateLocation RecoveryType = "AlternateLocation" - RecoveryTypeInvalid RecoveryType = "Invalid" - RecoveryTypeOffline RecoveryType = "Offline" - RecoveryTypeOriginalLocation RecoveryType = "OriginalLocation" - RecoveryTypeRestoreDisks RecoveryType = "RestoreDisks" -) - -// PossibleRecoveryTypeValues returns the possible values for the RecoveryType const type. -func PossibleRecoveryTypeValues() []RecoveryType { - return []RecoveryType{ - RecoveryTypeAlternateLocation, - RecoveryTypeInvalid, - RecoveryTypeOffline, - RecoveryTypeOriginalLocation, - RecoveryTypeRestoreDisks, - } -} - -// RehydrationPriority - Rehydration Priority -type RehydrationPriority string - -const ( - RehydrationPriorityHigh RehydrationPriority = "High" - RehydrationPriorityStandard RehydrationPriority = "Standard" -) - -// PossibleRehydrationPriorityValues returns the possible values for the RehydrationPriority const type. -func PossibleRehydrationPriorityValues() []RehydrationPriority { - return []RehydrationPriority{ - RehydrationPriorityHigh, - RehydrationPriorityStandard, - } -} - -// ResourceHealthStatus - Resource Health Status -type ResourceHealthStatus string - -const ( - ResourceHealthStatusHealthy ResourceHealthStatus = "Healthy" - ResourceHealthStatusInvalid ResourceHealthStatus = "Invalid" - ResourceHealthStatusPersistentDegraded ResourceHealthStatus = "PersistentDegraded" - ResourceHealthStatusPersistentUnhealthy ResourceHealthStatus = "PersistentUnhealthy" - ResourceHealthStatusTransientDegraded ResourceHealthStatus = "TransientDegraded" - ResourceHealthStatusTransientUnhealthy ResourceHealthStatus = "TransientUnhealthy" -) - -// PossibleResourceHealthStatusValues returns the possible values for the ResourceHealthStatus const type. -func PossibleResourceHealthStatusValues() []ResourceHealthStatus { - return []ResourceHealthStatus{ - ResourceHealthStatusHealthy, - ResourceHealthStatusInvalid, - ResourceHealthStatusPersistentDegraded, - ResourceHealthStatusPersistentUnhealthy, - ResourceHealthStatusTransientDegraded, - ResourceHealthStatusTransientUnhealthy, - } -} - -// RestorePointQueryType - RestorePoint type -type RestorePointQueryType string - -const ( - RestorePointQueryTypeAll RestorePointQueryType = "All" - RestorePointQueryTypeDifferential RestorePointQueryType = "Differential" - RestorePointQueryTypeFull RestorePointQueryType = "Full" - RestorePointQueryTypeFullAndDifferential RestorePointQueryType = "FullAndDifferential" - RestorePointQueryTypeIncremental RestorePointQueryType = "Incremental" - RestorePointQueryTypeInvalid RestorePointQueryType = "Invalid" - RestorePointQueryTypeLog RestorePointQueryType = "Log" -) - -// PossibleRestorePointQueryTypeValues returns the possible values for the RestorePointQueryType const type. -func PossibleRestorePointQueryTypeValues() []RestorePointQueryType { - return []RestorePointQueryType{ - RestorePointQueryTypeAll, - RestorePointQueryTypeDifferential, - RestorePointQueryTypeFull, - RestorePointQueryTypeFullAndDifferential, - RestorePointQueryTypeIncremental, - RestorePointQueryTypeInvalid, - RestorePointQueryTypeLog, - } -} - -// RestorePointType - Type of restore point -type RestorePointType string - -const ( - RestorePointTypeDifferential RestorePointType = "Differential" - RestorePointTypeFull RestorePointType = "Full" - RestorePointTypeIncremental RestorePointType = "Incremental" - RestorePointTypeInvalid RestorePointType = "Invalid" - RestorePointTypeLog RestorePointType = "Log" -) - -// PossibleRestorePointTypeValues returns the possible values for the RestorePointType const type. -func PossibleRestorePointTypeValues() []RestorePointType { - return []RestorePointType{ - RestorePointTypeDifferential, - RestorePointTypeFull, - RestorePointTypeIncremental, - RestorePointTypeInvalid, - RestorePointTypeLog, - } -} - -// RestoreRequestType - Restore Type (FullShareRestore or ItemLevelRestore) -type RestoreRequestType string - -const ( - RestoreRequestTypeFullShareRestore RestoreRequestType = "FullShareRestore" - RestoreRequestTypeInvalid RestoreRequestType = "Invalid" - RestoreRequestTypeItemLevelRestore RestoreRequestType = "ItemLevelRestore" -) - -// PossibleRestoreRequestTypeValues returns the possible values for the RestoreRequestType const type. -func PossibleRestoreRequestTypeValues() []RestoreRequestType { - return []RestoreRequestType{ - RestoreRequestTypeFullShareRestore, - RestoreRequestTypeInvalid, - RestoreRequestTypeItemLevelRestore, - } -} - -// RetentionDurationType - Retention duration type of retention policy. -type RetentionDurationType string - -const ( - RetentionDurationTypeDays RetentionDurationType = "Days" - RetentionDurationTypeInvalid RetentionDurationType = "Invalid" - RetentionDurationTypeMonths RetentionDurationType = "Months" - RetentionDurationTypeWeeks RetentionDurationType = "Weeks" - RetentionDurationTypeYears RetentionDurationType = "Years" -) - -// PossibleRetentionDurationTypeValues returns the possible values for the RetentionDurationType const type. -func PossibleRetentionDurationTypeValues() []RetentionDurationType { - return []RetentionDurationType{ - RetentionDurationTypeDays, - RetentionDurationTypeInvalid, - RetentionDurationTypeMonths, - RetentionDurationTypeWeeks, - RetentionDurationTypeYears, - } -} - -// RetentionScheduleFormat - Retention schedule format type for monthly retention policy. -type RetentionScheduleFormat string - -const ( - RetentionScheduleFormatDaily RetentionScheduleFormat = "Daily" - RetentionScheduleFormatInvalid RetentionScheduleFormat = "Invalid" - RetentionScheduleFormatWeekly RetentionScheduleFormat = "Weekly" -) - -// PossibleRetentionScheduleFormatValues returns the possible values for the RetentionScheduleFormat const type. -func PossibleRetentionScheduleFormatValues() []RetentionScheduleFormat { - return []RetentionScheduleFormat{ - RetentionScheduleFormatDaily, - RetentionScheduleFormatInvalid, - RetentionScheduleFormatWeekly, - } -} - -// SQLDataDirectoryType - Type of data directory mapping -type SQLDataDirectoryType string - -const ( - SQLDataDirectoryTypeData SQLDataDirectoryType = "Data" - SQLDataDirectoryTypeInvalid SQLDataDirectoryType = "Invalid" - SQLDataDirectoryTypeLog SQLDataDirectoryType = "Log" -) - -// PossibleSQLDataDirectoryTypeValues returns the possible values for the SQLDataDirectoryType const type. -func PossibleSQLDataDirectoryTypeValues() []SQLDataDirectoryType { - return []SQLDataDirectoryType{ - SQLDataDirectoryTypeData, - SQLDataDirectoryTypeInvalid, - SQLDataDirectoryTypeLog, - } -} - -// ScheduleRunType - Frequency of the schedule operation of this policy. -type ScheduleRunType string - -const ( - ScheduleRunTypeDaily ScheduleRunType = "Daily" - ScheduleRunTypeHourly ScheduleRunType = "Hourly" - ScheduleRunTypeInvalid ScheduleRunType = "Invalid" - ScheduleRunTypeWeekly ScheduleRunType = "Weekly" -) - -// PossibleScheduleRunTypeValues returns the possible values for the ScheduleRunType const type. -func PossibleScheduleRunTypeValues() []ScheduleRunType { - return []ScheduleRunType{ - ScheduleRunTypeDaily, - ScheduleRunTypeHourly, - ScheduleRunTypeInvalid, - ScheduleRunTypeWeekly, - } -} - -// SoftDeleteFeatureState - Soft Delete feature state -type SoftDeleteFeatureState string - -const ( - SoftDeleteFeatureStateDisabled SoftDeleteFeatureState = "Disabled" - SoftDeleteFeatureStateEnabled SoftDeleteFeatureState = "Enabled" - SoftDeleteFeatureStateInvalid SoftDeleteFeatureState = "Invalid" -) - -// PossibleSoftDeleteFeatureStateValues returns the possible values for the SoftDeleteFeatureState const type. -func PossibleSoftDeleteFeatureStateValues() []SoftDeleteFeatureState { - return []SoftDeleteFeatureState{ - SoftDeleteFeatureStateDisabled, - SoftDeleteFeatureStateEnabled, - SoftDeleteFeatureStateInvalid, - } -} - -// StorageType - Storage type -type StorageType string - -const ( - StorageTypeGeoRedundant StorageType = "GeoRedundant" - StorageTypeInvalid StorageType = "Invalid" - StorageTypeLocallyRedundant StorageType = "LocallyRedundant" - StorageTypeReadAccessGeoZoneRedundant StorageType = "ReadAccessGeoZoneRedundant" - StorageTypeZoneRedundant StorageType = "ZoneRedundant" -) - -// PossibleStorageTypeValues returns the possible values for the StorageType const type. -func PossibleStorageTypeValues() []StorageType { - return []StorageType{ - StorageTypeGeoRedundant, - StorageTypeInvalid, - StorageTypeLocallyRedundant, - StorageTypeReadAccessGeoZoneRedundant, - StorageTypeZoneRedundant, - } -} - -// StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always -// Locked. -type StorageTypeState string - -const ( - StorageTypeStateInvalid StorageTypeState = "Invalid" - StorageTypeStateLocked StorageTypeState = "Locked" - StorageTypeStateUnlocked StorageTypeState = "Unlocked" -) - -// PossibleStorageTypeStateValues returns the possible values for the StorageTypeState const type. -func PossibleStorageTypeStateValues() []StorageTypeState { - return []StorageTypeState{ - StorageTypeStateInvalid, - StorageTypeStateLocked, - StorageTypeStateUnlocked, - } -} - -// SupportStatus - Support status of feature -type SupportStatus string - -const ( - SupportStatusDefaultOFF SupportStatus = "DefaultOFF" - SupportStatusDefaultON SupportStatus = "DefaultON" - SupportStatusInvalid SupportStatus = "Invalid" - SupportStatusNotSupported SupportStatus = "NotSupported" - SupportStatusSupported SupportStatus = "Supported" -) - -// PossibleSupportStatusValues returns the possible values for the SupportStatus const type. -func PossibleSupportStatusValues() []SupportStatus { - return []SupportStatus{ - SupportStatusDefaultOFF, - SupportStatusDefaultON, - SupportStatusInvalid, - SupportStatusNotSupported, - SupportStatusSupported, - } -} - -// Type - Backup management type for this container. -type Type string - -const ( - TypeBackupProtectedItemCountSummary Type = "BackupProtectedItemCountSummary" - TypeBackupProtectionContainerCountSummary Type = "BackupProtectionContainerCountSummary" - TypeInvalid Type = "Invalid" -) - -// PossibleTypeValues returns the possible values for the Type const type. -func PossibleTypeValues() []Type { - return []Type{ - TypeBackupProtectedItemCountSummary, - TypeBackupProtectionContainerCountSummary, - TypeInvalid, - } -} - -// UsagesUnit - Unit of the usage. -type UsagesUnit string - -const ( - UsagesUnitBytes UsagesUnit = "Bytes" - UsagesUnitBytesPerSecond UsagesUnit = "BytesPerSecond" - UsagesUnitCount UsagesUnit = "Count" - UsagesUnitCountPerSecond UsagesUnit = "CountPerSecond" - UsagesUnitPercent UsagesUnit = "Percent" - UsagesUnitSeconds UsagesUnit = "Seconds" -) - -// PossibleUsagesUnitValues returns the possible values for the UsagesUnit const type. -func PossibleUsagesUnitValues() []UsagesUnit { - return []UsagesUnit{ - UsagesUnitBytes, - UsagesUnitBytesPerSecond, - UsagesUnitCount, - UsagesUnitCountPerSecond, - UsagesUnitPercent, - UsagesUnitSeconds, - } -} - -// ValidationStatus - Validation Status -type ValidationStatus string - -const ( - ValidationStatusFailed ValidationStatus = "Failed" - ValidationStatusInvalid ValidationStatus = "Invalid" - ValidationStatusSucceeded ValidationStatus = "Succeeded" -) - -// PossibleValidationStatusValues returns the possible values for the ValidationStatus const type. -func PossibleValidationStatusValues() []ValidationStatus { - return []ValidationStatus{ - ValidationStatusFailed, - ValidationStatusInvalid, - ValidationStatusSucceeded, - } -} - -type WeekOfMonth string - -const ( - WeekOfMonthFirst WeekOfMonth = "First" - WeekOfMonthSecond WeekOfMonth = "Second" - WeekOfMonthThird WeekOfMonth = "Third" - WeekOfMonthFourth WeekOfMonth = "Fourth" - WeekOfMonthLast WeekOfMonth = "Last" - WeekOfMonthInvalid WeekOfMonth = "Invalid" -) - -// PossibleWeekOfMonthValues returns the possible values for the WeekOfMonth const type. -func PossibleWeekOfMonthValues() []WeekOfMonth { - return []WeekOfMonth{ - WeekOfMonthFirst, - WeekOfMonthSecond, - WeekOfMonthThird, - WeekOfMonthFourth, - WeekOfMonthLast, - WeekOfMonthInvalid, - } -} - -// WorkloadItemType - Workload item type of the item for which intent is to be set -type WorkloadItemType string - -const ( - WorkloadItemTypeInvalid WorkloadItemType = "Invalid" - WorkloadItemTypeSAPAseDatabase WorkloadItemType = "SAPAseDatabase" - WorkloadItemTypeSAPAseSystem WorkloadItemType = "SAPAseSystem" - WorkloadItemTypeSAPHanaDatabase WorkloadItemType = "SAPHanaDatabase" - WorkloadItemTypeSAPHanaSystem WorkloadItemType = "SAPHanaSystem" - WorkloadItemTypeSQLDataBase WorkloadItemType = "SQLDataBase" - WorkloadItemTypeSQLInstance WorkloadItemType = "SQLInstance" -) - -// PossibleWorkloadItemTypeValues returns the possible values for the WorkloadItemType const type. -func PossibleWorkloadItemTypeValues() []WorkloadItemType { - return []WorkloadItemType{ - WorkloadItemTypeInvalid, - WorkloadItemTypeSAPAseDatabase, - WorkloadItemTypeSAPAseSystem, - WorkloadItemTypeSAPHanaDatabase, - WorkloadItemTypeSAPHanaSystem, - WorkloadItemTypeSQLDataBase, - WorkloadItemTypeSQLInstance, - } -} - -// WorkloadType - Type of workload for the backup management -type WorkloadType string - -const ( - WorkloadTypeAzureFileShare WorkloadType = "AzureFileShare" - WorkloadTypeAzureSQLDb WorkloadType = "AzureSqlDb" - WorkloadTypeClient WorkloadType = "Client" - WorkloadTypeExchange WorkloadType = "Exchange" - WorkloadTypeFileFolder WorkloadType = "FileFolder" - WorkloadTypeGenericDataSource WorkloadType = "GenericDataSource" - WorkloadTypeInvalid WorkloadType = "Invalid" - WorkloadTypeSAPAseDatabase WorkloadType = "SAPAseDatabase" - WorkloadTypeSAPHanaDatabase WorkloadType = "SAPHanaDatabase" - WorkloadTypeSQLDB WorkloadType = "SQLDB" - WorkloadTypeSQLDataBase WorkloadType = "SQLDataBase" - WorkloadTypeSharepoint WorkloadType = "Sharepoint" - WorkloadTypeSystemState WorkloadType = "SystemState" - WorkloadTypeVM WorkloadType = "VM" - WorkloadTypeVMwareVM WorkloadType = "VMwareVM" -) - -// PossibleWorkloadTypeValues returns the possible values for the WorkloadType const type. -func PossibleWorkloadTypeValues() []WorkloadType { - return []WorkloadType{ - WorkloadTypeAzureFileShare, - WorkloadTypeAzureSQLDb, - WorkloadTypeClient, - WorkloadTypeExchange, - WorkloadTypeFileFolder, - WorkloadTypeGenericDataSource, - WorkloadTypeInvalid, - WorkloadTypeSAPAseDatabase, - WorkloadTypeSAPHanaDatabase, - WorkloadTypeSQLDB, - WorkloadTypeSQLDataBase, - WorkloadTypeSharepoint, - WorkloadTypeSystemState, - WorkloadTypeVM, - WorkloadTypeVMwareVM, - } -} - -// XcoolState - Vault x-cool state -type XcoolState string - -const ( - XcoolStateDisabled XcoolState = "Disabled" - XcoolStateEnabled XcoolState = "Enabled" - XcoolStateInvalid XcoolState = "Invalid" -) - -// PossibleXcoolStateValues returns the possible values for the XcoolState const type. -func PossibleXcoolStateValues() []XcoolState { - return []XcoolState{ - XcoolStateDisabled, - XcoolStateEnabled, - XcoolStateInvalid, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_exportjobsoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_exportjobsoperationresults_client.go deleted file mode 100644 index dad3d239..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_exportjobsoperationresults_client.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ExportJobsOperationResultsClient contains the methods for the ExportJobsOperationResults group. -// Don't use this type directly, use NewExportJobsOperationResultsClient() instead. -type ExportJobsOperationResultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewExportJobsOperationResultsClient creates a new instance of ExportJobsOperationResultsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewExportJobsOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportJobsOperationResultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ExportJobsOperationResultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also -// contains URL of a Blob and a SAS key to access the same. The blob contains exported -// jobs in JSON serialized format. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// operationID - OperationID which represents the export job. -// options - ExportJobsOperationResultsClientGetOptions contains the optional parameters for the ExportJobsOperationResultsClient.Get -// method. -func (client *ExportJobsOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ExportJobsOperationResultsClientGetOptions) (ExportJobsOperationResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) - if err != nil { - return ExportJobsOperationResultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ExportJobsOperationResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ExportJobsOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ExportJobsOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ExportJobsOperationResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ExportJobsOperationResultsClient) getHandleResponse(resp *http.Response) (ExportJobsOperationResultsClientGetResponse, error) { - result := ExportJobsOperationResultsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationResultInfoBaseResource); err != nil { - return ExportJobsOperationResultsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_featuresupport_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_featuresupport_client.go deleted file mode 100644 index e7b20213..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_featuresupport_client.go +++ /dev/null @@ -1,107 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// FeatureSupportClient contains the methods for the FeatureSupport group. -// Don't use this type directly, use NewFeatureSupportClient() instead. -type FeatureSupportClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewFeatureSupportClient creates a new instance of FeatureSupportClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewFeatureSupportClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeatureSupportClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &FeatureSupportClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Validate - It will validate if given feature with resource properties is supported in service -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// azureRegion - Azure region to hit Api -// parameters - Feature support request object -// options - FeatureSupportClientValidateOptions contains the optional parameters for the FeatureSupportClient.Validate method. -func (client *FeatureSupportClient) Validate(ctx context.Context, azureRegion string, parameters FeatureSupportRequestClassification, options *FeatureSupportClientValidateOptions) (FeatureSupportClientValidateResponse, error) { - req, err := client.validateCreateRequest(ctx, azureRegion, parameters, options) - if err != nil { - return FeatureSupportClientValidateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return FeatureSupportClientValidateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return FeatureSupportClientValidateResponse{}, runtime.NewResponseError(resp) - } - return client.validateHandleResponse(resp) -} - -// validateCreateRequest creates the Validate request. -func (client *FeatureSupportClient) validateCreateRequest(ctx context.Context, azureRegion string, parameters FeatureSupportRequestClassification, options *FeatureSupportClientValidateOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures" - if azureRegion == "" { - return nil, errors.New("parameter azureRegion cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{azureRegion}", url.PathEscape(azureRegion)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// validateHandleResponse handles the Validate response. -func (client *FeatureSupportClient) validateHandleResponse(resp *http.Response) (FeatureSupportClientValidateResponse, error) { - result := FeatureSupportClientValidateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AzureVMResourceFeatureSupportResponse); err != nil { - return FeatureSupportClientValidateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_itemlevelrecoveryconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_itemlevelrecoveryconnections_client.go deleted file mode 100644 index 56909706..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_itemlevelrecoveryconnections_client.go +++ /dev/null @@ -1,197 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ItemLevelRecoveryConnectionsClient contains the methods for the ItemLevelRecoveryConnections group. -// Don't use this type directly, use NewItemLevelRecoveryConnectionsClient() instead. -type ItemLevelRecoveryConnectionsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewItemLevelRecoveryConnectionsClient creates a new instance of ItemLevelRecoveryConnectionsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewItemLevelRecoveryConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ItemLevelRecoveryConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ItemLevelRecoveryConnectionsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Provision - Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file -// explorer displaying all the recoverable files and folders. This is an asynchronous -// operation. To know the status of provisioning, call GetProtectedItemOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backed up items. -// containerName - Container name associated with the backed up items. -// protectedItemName - Backed up item name whose files/folders are to be restored. -// recoveryPointID - Recovery point ID which represents backed up data. iSCSI connection will be provisioned for this backed -// up data. -// parameters - resource ILR request -// options - ItemLevelRecoveryConnectionsClientProvisionOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Provision -// method. -func (client *ItemLevelRecoveryConnectionsClient) Provision(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource, options *ItemLevelRecoveryConnectionsClientProvisionOptions) (ItemLevelRecoveryConnectionsClientProvisionResponse, error) { - req, err := client.provisionCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) - if err != nil { - return ItemLevelRecoveryConnectionsClientProvisionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ItemLevelRecoveryConnectionsClientProvisionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return ItemLevelRecoveryConnectionsClientProvisionResponse{}, runtime.NewResponseError(resp) - } - return ItemLevelRecoveryConnectionsClientProvisionResponse{}, nil -} - -// provisionCreateRequest creates the Provision request. -func (client *ItemLevelRecoveryConnectionsClient) provisionCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource, options *ItemLevelRecoveryConnectionsClientProvisionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - if recoveryPointID == "" { - return nil, errors.New("parameter recoveryPointID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// Revoke - Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer -// displaying all recoverable files and folders. This is an asynchronous operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backed up items. -// containerName - Container name associated with the backed up items. -// protectedItemName - Backed up item name whose files/folders are to be restored. -// recoveryPointID - Recovery point ID which represents backed up data. iSCSI connection will be revoked for this backed up -// data. -// options - ItemLevelRecoveryConnectionsClientRevokeOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Revoke -// method. -func (client *ItemLevelRecoveryConnectionsClient) Revoke(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, options *ItemLevelRecoveryConnectionsClientRevokeOptions) (ItemLevelRecoveryConnectionsClientRevokeResponse, error) { - req, err := client.revokeCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, options) - if err != nil { - return ItemLevelRecoveryConnectionsClientRevokeResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ItemLevelRecoveryConnectionsClientRevokeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return ItemLevelRecoveryConnectionsClientRevokeResponse{}, runtime.NewResponseError(resp) - } - return ItemLevelRecoveryConnectionsClientRevokeResponse{}, nil -} - -// revokeCreateRequest creates the Revoke request. -func (client *ItemLevelRecoveryConnectionsClient) revokeCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, options *ItemLevelRecoveryConnectionsClientRevokeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - if recoveryPointID == "" { - return nil, errors.New("parameter recoveryPointID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_jobcancellations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_jobcancellations_client.go deleted file mode 100644 index e36715be..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_jobcancellations_client.go +++ /dev/null @@ -1,109 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// JobCancellationsClient contains the methods for the JobCancellations group. -// Don't use this type directly, use NewJobCancellationsClient() instead. -type JobCancellationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewJobCancellationsClient creates a new instance of JobCancellationsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewJobCancellationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobCancellationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &JobCancellationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Trigger - Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call GetCancelOperationResult -// API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// jobName - Name of the job to cancel. -// options - JobCancellationsClientTriggerOptions contains the optional parameters for the JobCancellationsClient.Trigger -// method. -func (client *JobCancellationsClient) Trigger(ctx context.Context, vaultName string, resourceGroupName string, jobName string, options *JobCancellationsClientTriggerOptions) (JobCancellationsClientTriggerResponse, error) { - req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, jobName, options) - if err != nil { - return JobCancellationsClientTriggerResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return JobCancellationsClientTriggerResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return JobCancellationsClientTriggerResponse{}, runtime.NewResponseError(resp) - } - return JobCancellationsClientTriggerResponse{}, nil -} - -// triggerCreateRequest creates the Trigger request. -func (client *JobCancellationsClient) triggerCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, jobName string, options *JobCancellationsClientTriggerOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_jobdetails_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_jobdetails_client.go deleted file mode 100644 index fca7ee5f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_jobdetails_client.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// JobDetailsClient contains the methods for the JobDetails group. -// Don't use this type directly, use NewJobDetailsClient() instead. -type JobDetailsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewJobDetailsClient creates a new instance of JobDetailsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewJobDetailsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobDetailsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &JobDetailsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets extended information associated with the job. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// jobName - Name of the job whose details are to be fetched. -// options - JobDetailsClientGetOptions contains the optional parameters for the JobDetailsClient.Get method. -func (client *JobDetailsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string, options *JobDetailsClientGetOptions) (JobDetailsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, jobName, options) - if err != nil { - return JobDetailsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return JobDetailsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobDetailsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *JobDetailsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, jobName string, options *JobDetailsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *JobDetailsClient) getHandleResponse(resp *http.Response) (JobDetailsClientGetResponse, error) { - result := JobDetailsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.JobResource); err != nil { - return JobDetailsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_joboperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_joboperationresults_client.go deleted file mode 100644 index f800d79f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_joboperationresults_client.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// JobOperationResultsClient contains the methods for the JobOperationResults group. -// Don't use this type directly, use NewJobOperationResultsClient() instead. -type JobOperationResultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewJobOperationResultsClient creates a new instance of JobOperationResultsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewJobOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobOperationResultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &JobOperationResultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches the result of any operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// jobName - Job name whose operation result has to be fetched. -// operationID - OperationID which represents the operation whose result has to be fetched. -// options - JobOperationResultsClientGetOptions contains the optional parameters for the JobOperationResultsClient.Get method. -func (client *JobOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string, operationID string, options *JobOperationResultsClientGetOptions) (JobOperationResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, jobName, operationID, options) - if err != nil { - return JobOperationResultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return JobOperationResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return JobOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return JobOperationResultsClientGetResponse{}, nil -} - -// getCreateRequest creates the Get request. -func (client *JobOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, jobName string, operationID string, options *JobOperationResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_jobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_jobs_client.go deleted file mode 100644 index 308a1fd5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_jobs_client.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// JobsClient contains the methods for the Jobs group. -// Don't use this type directly, use NewJobsClient() instead. -type JobsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewJobsClient creates a new instance of JobsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &JobsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Export - Triggers export of jobs specified by filters and returns an OperationID to track. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - JobsClientExportOptions contains the optional parameters for the JobsClient.Export method. -func (client *JobsClient) Export(ctx context.Context, vaultName string, resourceGroupName string, options *JobsClientExportOptions) (JobsClientExportResponse, error) { - req, err := client.exportCreateRequest(ctx, vaultName, resourceGroupName, options) - if err != nil { - return JobsClientExportResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return JobsClientExportResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return JobsClientExportResponse{}, runtime.NewResponseError(resp) - } - return JobsClientExportResponse{}, nil -} - -// exportCreateRequest creates the Export request. -func (client *JobsClient) exportCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *JobsClientExportOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_models.go deleted file mode 100644 index da736214..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_models.go +++ /dev/null @@ -1,9408 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import "time" - -// AzureBackupGoalFeatureSupportRequest - Azure backup goal feature specific request. -type AzureBackupGoalFeatureSupportRequest struct { - // REQUIRED; backup support feature type. - FeatureType *string `json:"featureType,omitempty"` -} - -// GetFeatureSupportRequest implements the FeatureSupportRequestClassification interface for type AzureBackupGoalFeatureSupportRequest. -func (a *AzureBackupGoalFeatureSupportRequest) GetFeatureSupportRequest() *FeatureSupportRequest { - return &FeatureSupportRequest{ - FeatureType: a.FeatureType, - } -} - -// AzureBackupServerContainer - AzureBackupServer (DPMVenus) workload-specific protection container. -type AzureBackupServerContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Specifies whether the container is re-registrable. - CanReRegister *bool `json:"canReRegister,omitempty"` - - // ID of container. - ContainerID *string `json:"containerId,omitempty"` - - // Backup engine Agent version - DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` - - // List of BackupEngines protecting the container - DpmServers []*string `json:"dpmServers,omitempty"` - - // Extended Info of the container. - ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Number of protected items in the BackupEngine - ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` - - // Protection status of the container. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - - // To check if upgrade available - UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` -} - -// GetDpmContainer implements the DpmContainerClassification interface for type AzureBackupServerContainer. -func (a *AzureBackupServerContainer) GetDpmContainer() *DpmContainer { - return &DpmContainer{ - CanReRegister: a.CanReRegister, - ContainerID: a.ContainerID, - ProtectedItemCount: a.ProtectedItemCount, - DpmAgentVersion: a.DpmAgentVersion, - DpmServers: a.DpmServers, - UpgradeAvailable: a.UpgradeAvailable, - ProtectionStatus: a.ProtectionStatus, - ExtendedInfo: a.ExtendedInfo, - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureBackupServerContainer. -func (a *AzureBackupServerContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// AzureBackupServerEngine - Backup engine type when Azure Backup Server is used to manage the backups. -type AzureBackupServerEngine struct { - // REQUIRED; Type of the backup engine. - BackupEngineType *BackupEngineType `json:"backupEngineType,omitempty"` - - // Backup agent version - AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` - - // ID of the backup engine. - BackupEngineID *string `json:"backupEngineId,omitempty"` - - // Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} - BackupEngineState *string `json:"backupEngineState,omitempty"` - - // Type of backup management for the backup engine. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Flag indicating if the backup engine be registered, once already registered. - CanReRegister *bool `json:"canReRegister,omitempty"` - - // Backup engine version - DpmVersion *string `json:"dpmVersion,omitempty"` - - // Extended info of the backupengine - ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the backup engine. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Backup status of the backup engine. - HealthStatus *string `json:"healthStatus,omitempty"` - - // To check if backup agent upgrade available - IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` - - // To check if backup engine upgrade available - IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` - - // Registration status of the backup engine with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` -} - -// GetBackupEngineBase implements the BackupEngineBaseClassification interface for type AzureBackupServerEngine. -func (a *AzureBackupServerEngine) GetBackupEngineBase() *BackupEngineBase { - return &BackupEngineBase{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - BackupEngineState: a.BackupEngineState, - HealthStatus: a.HealthStatus, - BackupEngineType: a.BackupEngineType, - CanReRegister: a.CanReRegister, - BackupEngineID: a.BackupEngineID, - DpmVersion: a.DpmVersion, - AzureBackupAgentVersion: a.AzureBackupAgentVersion, - IsAzureBackupAgentUpgradeAvailable: a.IsAzureBackupAgentUpgradeAvailable, - IsDpmUpgradeAvailable: a.IsDpmUpgradeAvailable, - ExtendedInfo: a.ExtendedInfo, - } -} - -// AzureFileShareBackupRequest - AzureFileShare workload-specific backup request. -type AzureFileShareBackupRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Backup copy will expire after the time specified (UTC). - RecoveryPointExpiryTimeInUTC *time.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` -} - -// GetBackupRequest implements the BackupRequestClassification interface for type AzureFileShareBackupRequest. -func (a *AzureFileShareBackupRequest) GetBackupRequest() *BackupRequest { - return &BackupRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureFileShareProtectableItem - Protectable item for Azure Fileshare workloads. -type AzureFileShareProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // File Share type XSync or XSMB. - AzureFileShareType *AzureFileShareType `json:"azureFileShareType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. - ParentContainerFabricID *string `json:"parentContainerFabricId,omitempty"` - - // Friendly name of container to which this protectable item belongs. - ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureFileShareProtectableItem. -func (a *AzureFileShareProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureFileShareProtectionPolicy - AzureStorage backup policy. -type AzureFileShareProtectionPolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - - // ResourceGuard Operation Requests - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Retention policy with the details on backup copy retention ranges. - RetentionPolicy RetentionPolicyClassification `json:"retentionPolicy,omitempty"` - - // Backup schedule specified as part of backup policy. - SchedulePolicy SchedulePolicyClassification `json:"schedulePolicy,omitempty"` - - // TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - TimeZone *string `json:"timeZone,omitempty"` - - // Type of workload for the backup management - WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` -} - -// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureFileShareProtectionPolicy. -func (a *AzureFileShareProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { - return &ProtectionPolicy{ - ProtectedItemsCount: a.ProtectedItemsCount, - BackupManagementType: a.BackupManagementType, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - } -} - -// AzureFileShareProvisionILRRequest - Update snapshot Uri with the correct friendly Name of the source Azure file share. -type AzureFileShareProvisionILRRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Recovery point ID. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // Source Storage account ARM Id - SourceResourceID *string `json:"sourceResourceId,omitempty"` -} - -// GetILRRequest implements the ILRRequestClassification interface for type AzureFileShareProvisionILRRequest. -func (a *AzureFileShareProvisionILRRequest) GetILRRequest() *ILRRequest { - return &ILRRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureFileShareRecoveryPoint - Azure File Share workload specific backup copy. -type AzureFileShareRecoveryPoint struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Contains Url to the snapshot of fileshare, if applicable - FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"` - - // Contains recovery point size - RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"` - - // Time at which this backup copy was created. - RecoveryPointTime *time.Time `json:"recoveryPointTime,omitempty"` - - // Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. - RecoveryPointType *string `json:"recoveryPointType,omitempty"` -} - -// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureFileShareRecoveryPoint. -func (a *AzureFileShareRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { - return &RecoveryPoint{ - ObjectType: a.ObjectType, - } -} - -// AzureFileShareRestoreRequest - AzureFileShare Restore Request -type AzureFileShareRestoreRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Options to resolve copy conflicts. - CopyOptions *CopyOptions `json:"copyOptions,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // List of Source Files/Folders(which need to recover) and TargetFolderPath details - RestoreFileSpecs []*RestoreFileSpecs `json:"restoreFileSpecs,omitempty"` - - // Restore Type (FullShareRestore or ItemLevelRestore) - RestoreRequestType *RestoreRequestType `json:"restoreRequestType,omitempty"` - - // Source storage account ARM Id - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Target File Share Details - TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureFileShareRestoreRequest. -func (a *AzureFileShareRestoreRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureFileshareProtectedItem - Azure File Share workload-specific backup item. -type AzureFileshareProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Additional information with this backup item. - ExtendedInfo *AzureFileshareProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the fileshare represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Health details of different KPIs - KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths,omitempty"` - - // Last backup operation status. Possible values: Healthy, Unhealthy. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - - // Timestamp of the last backup operation on this backup item. - LastBackupTime *time.Time `json:"lastBackupTime,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionState `json:"protectionState,omitempty"` - - // Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type AzureFileshareProtectedItem. -func (a *AzureFileshareProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// AzureFileshareProtectedItemExtendedInfo - Additional information about Azure File Share backup item. -type AzureFileshareProtectedItemExtendedInfo struct { - // The oldest backup copy available for this item in the service. - OldestRecoveryPoint *time.Time `json:"oldestRecoveryPoint,omitempty"` - - // Indicates consistency of policy object and policy applied to this backup item. - PolicyState *string `json:"policyState,omitempty"` - - // Number of available backup copies associated with this backup item. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` - - // READ-ONLY; Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, - // Deleted} - ResourceState *string `json:"resourceState,omitempty" azure:"ro"` - - // READ-ONLY; The resource state sync time for this backup item. - ResourceStateSyncTime *time.Time `json:"resourceStateSyncTime,omitempty" azure:"ro"` -} - -// AzureIaaSClassicComputeVMContainer - IaaS VM workload-specific backup item representing a classic virtual machine. -type AzureIaaSClassicComputeVMContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - - // Resource group name of Recovery Services Vault. - ResourceGroup *string `json:"resourceGroup,omitempty"` - - // Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - - // Specifies whether the container represents a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` -} - -// GetIaaSVMContainer implements the IaaSVMContainerClassification interface for type AzureIaaSClassicComputeVMContainer. -func (a *AzureIaaSClassicComputeVMContainer) GetIaaSVMContainer() *IaaSVMContainer { - return &IaaSVMContainer{ - VirtualMachineID: a.VirtualMachineID, - VirtualMachineVersion: a.VirtualMachineVersion, - ResourceGroup: a.ResourceGroup, - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureIaaSClassicComputeVMContainer. -func (a *AzureIaaSClassicComputeVMContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// AzureIaaSClassicComputeVMProtectableItem - IaaS VM workload-specific backup item representing the Classic Compute VM. -type AzureIaaSClassicComputeVMProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Resource group name of Recovery Services Vault. - ResourceGroup *string `json:"resourceGroup,omitempty"` - - // Fully qualified ARM ID of the virtual machine. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - - // Specifies whether the container represents a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetIaaSVMProtectableItem implements the IaaSVMProtectableItemClassification interface for type AzureIaaSClassicComputeVMProtectableItem. -func (a *AzureIaaSClassicComputeVMProtectableItem) GetIaaSVMProtectableItem() *IaaSVMProtectableItem { - return &IaaSVMProtectableItem{ - VirtualMachineID: a.VirtualMachineID, - VirtualMachineVersion: a.VirtualMachineVersion, - ResourceGroup: a.ResourceGroup, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureIaaSClassicComputeVMProtectableItem. -func (a *AzureIaaSClassicComputeVMProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureIaaSClassicComputeVMProtectedItem - IaaS VM workload-specific backup item representing the Classic Compute VM. -type AzureIaaSClassicComputeVMProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Additional information for this backup item. - ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Extended Properties for Azure IaasVM Backup. - ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` - - // Friendly name of the VM represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Health details on this backup item. - HealthDetails []*AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` - - // Health status of protected item. - HealthStatus *HealthStatus `json:"healthStatus,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Health details of different KPIs - KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths,omitempty"` - - // Last backup operation status. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - - // Timestamp of the last backup operation on this backup item. - LastBackupTime *time.Time `json:"lastBackupTime,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Data ID of the protected item. - ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionState `json:"protectionState,omitempty"` - - // Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Fully qualified ARM ID of the virtual machine represented by this item. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetAzureIaaSVMProtectedItem implements the AzureIaaSVMProtectedItemClassification interface for type AzureIaaSClassicComputeVMProtectedItem. -func (a *AzureIaaSClassicComputeVMProtectedItem) GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem { - return &AzureIaaSVMProtectedItem{ - FriendlyName: a.FriendlyName, - VirtualMachineID: a.VirtualMachineID, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - HealthStatus: a.HealthStatus, - HealthDetails: a.HealthDetails, - KpisHealths: a.KpisHealths, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - ProtectedItemDataID: a.ProtectedItemDataID, - ExtendedInfo: a.ExtendedInfo, - ExtendedProperties: a.ExtendedProperties, - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type AzureIaaSClassicComputeVMProtectedItem. -func (a *AzureIaaSClassicComputeVMProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// AzureIaaSComputeVMContainer - IaaS VM workload-specific backup item representing an Azure Resource Manager virtual machine. -type AzureIaaSComputeVMContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - - // Resource group name of Recovery Services Vault. - ResourceGroup *string `json:"resourceGroup,omitempty"` - - // Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - - // Specifies whether the container represents a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` -} - -// GetIaaSVMContainer implements the IaaSVMContainerClassification interface for type AzureIaaSComputeVMContainer. -func (a *AzureIaaSComputeVMContainer) GetIaaSVMContainer() *IaaSVMContainer { - return &IaaSVMContainer{ - VirtualMachineID: a.VirtualMachineID, - VirtualMachineVersion: a.VirtualMachineVersion, - ResourceGroup: a.ResourceGroup, - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureIaaSComputeVMContainer. -func (a *AzureIaaSComputeVMContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// AzureIaaSComputeVMProtectableItem - IaaS VM workload-specific backup item representing the Azure Resource Manager VM. -type AzureIaaSComputeVMProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Resource group name of Recovery Services Vault. - ResourceGroup *string `json:"resourceGroup,omitempty"` - - // Fully qualified ARM ID of the virtual machine. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - - // Specifies whether the container represents a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetIaaSVMProtectableItem implements the IaaSVMProtectableItemClassification interface for type AzureIaaSComputeVMProtectableItem. -func (a *AzureIaaSComputeVMProtectableItem) GetIaaSVMProtectableItem() *IaaSVMProtectableItem { - return &IaaSVMProtectableItem{ - VirtualMachineID: a.VirtualMachineID, - VirtualMachineVersion: a.VirtualMachineVersion, - ResourceGroup: a.ResourceGroup, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureIaaSComputeVMProtectableItem. -func (a *AzureIaaSComputeVMProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureIaaSComputeVMProtectedItem - IaaS VM workload-specific backup item representing the Azure Resource Manager VM. -type AzureIaaSComputeVMProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Additional information for this backup item. - ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Extended Properties for Azure IaasVM Backup. - ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` - - // Friendly name of the VM represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Health details on this backup item. - HealthDetails []*AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` - - // Health status of protected item. - HealthStatus *HealthStatus `json:"healthStatus,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Health details of different KPIs - KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths,omitempty"` - - // Last backup operation status. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - - // Timestamp of the last backup operation on this backup item. - LastBackupTime *time.Time `json:"lastBackupTime,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Data ID of the protected item. - ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionState `json:"protectionState,omitempty"` - - // Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Fully qualified ARM ID of the virtual machine represented by this item. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetAzureIaaSVMProtectedItem implements the AzureIaaSVMProtectedItemClassification interface for type AzureIaaSComputeVMProtectedItem. -func (a *AzureIaaSComputeVMProtectedItem) GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem { - return &AzureIaaSVMProtectedItem{ - FriendlyName: a.FriendlyName, - VirtualMachineID: a.VirtualMachineID, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - HealthStatus: a.HealthStatus, - HealthDetails: a.HealthDetails, - KpisHealths: a.KpisHealths, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - ProtectedItemDataID: a.ProtectedItemDataID, - ExtendedInfo: a.ExtendedInfo, - ExtendedProperties: a.ExtendedProperties, - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type AzureIaaSComputeVMProtectedItem. -func (a *AzureIaaSComputeVMProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// AzureIaaSVMErrorInfo - Azure IaaS VM workload-specific error information. -type AzureIaaSVMErrorInfo struct { - // READ-ONLY; Error code. - ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"` - - // READ-ONLY; Localized error string. - ErrorString *string `json:"errorString,omitempty" azure:"ro"` - - // READ-ONLY; Title: Typically, the entity that the error pertains to. - ErrorTitle *string `json:"errorTitle,omitempty" azure:"ro"` - - // READ-ONLY; List of localized recommendations for above error code. - Recommendations []*string `json:"recommendations,omitempty" azure:"ro"` -} - -// AzureIaaSVMHealthDetails - Azure IaaS VM workload-specific Health Details. -type AzureIaaSVMHealthDetails struct { - // READ-ONLY; Health Code - Code *int32 `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; Health Message - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; Health Recommended Actions - Recommendations []*string `json:"recommendations,omitempty" azure:"ro"` - - // READ-ONLY; Health Title - Title *string `json:"title,omitempty" azure:"ro"` -} - -// AzureIaaSVMJob - Azure IaaS VM workload-specific job object. -type AzureIaaSVMJob struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - JobType *string `json:"jobType,omitempty"` - - // Gets or sets the state/actions applicable on this job like cancel/retry. - ActionsInfo []*JobSupportedAction `json:"actionsInfo,omitempty"` - - // ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - - // Backup management type to execute the current job. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Container name of the entity on which the current job is executing. - ContainerName *string `json:"containerName,omitempty"` - - // Time elapsed during the execution of this job. - Duration *string `json:"duration,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - - // Error details on execution of this job. - ErrorDetails []*AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"` - - // Additional information for this job. - ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"` - - // Indicated that whether the job is adhoc(true) or scheduled(false) - IsUserTriggered *bool `json:"isUserTriggered,omitempty"` - - // The operation name. - Operation *string `json:"operation,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // Job status. - Status *string `json:"status,omitempty"` - - // Specifies whether the backup item is a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` -} - -// GetJob implements the JobClassification interface for type AzureIaaSVMJob. -func (a *AzureIaaSVMJob) GetJob() *Job { - return &Job{ - EntityFriendlyName: a.EntityFriendlyName, - BackupManagementType: a.BackupManagementType, - Operation: a.Operation, - Status: a.Status, - StartTime: a.StartTime, - EndTime: a.EndTime, - ActivityID: a.ActivityID, - JobType: a.JobType, - } -} - -// AzureIaaSVMJobExtendedInfo - Azure IaaS VM workload-specific additional information for job. -type AzureIaaSVMJobExtendedInfo struct { - // Non localized error message on job execution. - DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` - - // Time remaining for execution of this job. - EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"` - - // Job internal properties. - InternalPropertyBag map[string]*string `json:"internalPropertyBag,omitempty"` - - // Indicates progress of the job. Null if it has not started or completed. - ProgressPercentage *float64 `json:"progressPercentage,omitempty"` - - // Job properties. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // List of tasks associated with this job. - TasksList []*AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"` -} - -// AzureIaaSVMJobTaskDetails - Azure IaaS VM workload-specific job task details. -type AzureIaaSVMJobTaskDetails struct { - // Time elapsed for task. - Duration *string `json:"duration,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // The instanceId. - InstanceID *string `json:"instanceId,omitempty"` - - // Progress of the task. - ProgressPercentage *float64 `json:"progressPercentage,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // The status. - Status *string `json:"status,omitempty"` - - // Details about execution of the task. eg: number of bytes transferred etc - TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"` - - // The task display name. - TaskID *string `json:"taskId,omitempty"` -} - -// AzureIaaSVMJobV2 - Azure IaaS VM workload-specific job object. -type AzureIaaSVMJobV2 struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - JobType *string `json:"jobType,omitempty"` - - // Gets or sets the state/actions applicable on this job like cancel/retry. - ActionsInfo []*JobSupportedAction `json:"actionsInfo,omitempty"` - - // ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - - // Backup management type to execute the current job. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Container name of the entity on which the current job is executing. - ContainerName *string `json:"containerName,omitempty"` - - // Time elapsed during the execution of this job. - Duration *string `json:"duration,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - - // Error details on execution of this job. - ErrorDetails []*AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"` - - // Additional information for this job. - ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"` - - // The operation name. - Operation *string `json:"operation,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // Job status. - Status *string `json:"status,omitempty"` - - // Specifies whether the backup item is a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` -} - -// GetJob implements the JobClassification interface for type AzureIaaSVMJobV2. -func (a *AzureIaaSVMJobV2) GetJob() *Job { - return &Job{ - EntityFriendlyName: a.EntityFriendlyName, - BackupManagementType: a.BackupManagementType, - Operation: a.Operation, - Status: a.Status, - StartTime: a.StartTime, - EndTime: a.EndTime, - ActivityID: a.ActivityID, - JobType: a.JobType, - } -} - -// AzureIaaSVMProtectedItemClassification provides polymorphic access to related types. -// Call the interface's GetAzureIaaSVMProtectedItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureIaaSClassicComputeVMProtectedItem, *AzureIaaSComputeVMProtectedItem, *AzureIaaSVMProtectedItem -type AzureIaaSVMProtectedItemClassification interface { - ProtectedItemClassification - // GetAzureIaaSVMProtectedItem returns the AzureIaaSVMProtectedItem content of the underlying type. - GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem -} - -// AzureIaaSVMProtectedItem - IaaS VM workload-specific backup item. -type AzureIaaSVMProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Additional information for this backup item. - ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Extended Properties for Azure IaasVM Backup. - ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` - - // Friendly name of the VM represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Health details on this backup item. - HealthDetails []*AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` - - // Health status of protected item. - HealthStatus *HealthStatus `json:"healthStatus,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Health details of different KPIs - KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths,omitempty"` - - // Last backup operation status. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - - // Timestamp of the last backup operation on this backup item. - LastBackupTime *time.Time `json:"lastBackupTime,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Data ID of the protected item. - ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionState `json:"protectionState,omitempty"` - - // Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Fully qualified ARM ID of the virtual machine represented by this item. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetAzureIaaSVMProtectedItem implements the AzureIaaSVMProtectedItemClassification interface for type AzureIaaSVMProtectedItem. -func (a *AzureIaaSVMProtectedItem) GetAzureIaaSVMProtectedItem() *AzureIaaSVMProtectedItem { return a } - -// GetProtectedItem implements the ProtectedItemClassification interface for type AzureIaaSVMProtectedItem. -func (a *AzureIaaSVMProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// AzureIaaSVMProtectedItemExtendedInfo - Additional information on Azure IaaS VM specific backup item. -type AzureIaaSVMProtectedItemExtendedInfo struct { - // The oldest backup copy available for this backup item. - OldestRecoveryPoint *time.Time `json:"oldestRecoveryPoint,omitempty"` - - // Specifies if backup policy associated with the backup item is inconsistent. - PolicyInconsistent *bool `json:"policyInconsistent,omitempty"` - - // Number of backup copies available for this backup item. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` -} - -// AzureIaaSVMProtectionPolicy - IaaS VM workload-specific backup policy. -type AzureIaaSVMProtectionPolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - BackupManagementType *string `json:"backupManagementType,omitempty"` - InstantRPDetails *InstantRPAdditionalDetails `json:"instantRPDetails,omitempty"` - - // Instant RP retention policy range in days - InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"` - PolicyType *IAASVMPolicyType `json:"policyType,omitempty"` - - // Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - - // ResourceGuard Operation Requests - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Retention policy with the details on backup copy retention ranges. - RetentionPolicy RetentionPolicyClassification `json:"retentionPolicy,omitempty"` - - // Backup schedule specified as part of backup policy. - SchedulePolicy SchedulePolicyClassification `json:"schedulePolicy,omitempty"` - - // TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - TimeZone *string `json:"timeZone,omitempty"` -} - -// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureIaaSVMProtectionPolicy. -func (a *AzureIaaSVMProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { - return &ProtectionPolicy{ - ProtectedItemsCount: a.ProtectedItemsCount, - BackupManagementType: a.BackupManagementType, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - } -} - -// AzureRecoveryServiceVaultProtectionIntentClassification provides polymorphic access to related types. -// Call the interface's GetAzureRecoveryServiceVaultProtectionIntent() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureRecoveryServiceVaultProtectionIntent, *AzureWorkloadAutoProtectionIntent, *AzureWorkloadSQLAutoProtectionIntent -type AzureRecoveryServiceVaultProtectionIntentClassification interface { - ProtectionIntentClassification - // GetAzureRecoveryServiceVaultProtectionIntent returns the AzureRecoveryServiceVaultProtectionIntent content of the underlying type. - GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent -} - -// AzureRecoveryServiceVaultProtectionIntent - Azure Recovery Services Vault specific protection intent item. -type AzureRecoveryServiceVaultProtectionIntent struct { - // REQUIRED; backup protectionIntent type. - ProtectionIntentItemType *ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` -} - -// GetAzureRecoveryServiceVaultProtectionIntent implements the AzureRecoveryServiceVaultProtectionIntentClassification interface -// for type AzureRecoveryServiceVaultProtectionIntent. -func (a *AzureRecoveryServiceVaultProtectionIntent) GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent { - return a -} - -// GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureRecoveryServiceVaultProtectionIntent. -func (a *AzureRecoveryServiceVaultProtectionIntent) GetProtectionIntent() *ProtectionIntent { - return &ProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, - BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, - ItemID: a.ItemID, - PolicyID: a.PolicyID, - ProtectionState: a.ProtectionState, - } -} - -// AzureResourceProtectionIntent - IaaS VM specific backup protection intent item. -type AzureResourceProtectionIntent struct { - // REQUIRED; backup protectionIntent type. - ProtectionIntentItemType *ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Friendly name of the VM represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` -} - -// GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureResourceProtectionIntent. -func (a *AzureResourceProtectionIntent) GetProtectionIntent() *ProtectionIntent { - return &ProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, - BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, - ItemID: a.ItemID, - PolicyID: a.PolicyID, - ProtectionState: a.ProtectionState, - } -} - -// AzureSQLAGWorkloadContainerProtectionContainer - Container for SQL workloads under SQL Availability Group. -type AzureSQLAGWorkloadContainerProtectionContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Additional details of a workload container. - ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Time stamp when this container was updated. - LastUpdatedTime *time.Time `json:"lastUpdatedTime,omitempty"` - - // Re-Do Operation - OperationType *OperationType `json:"operationType,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - - // ARM ID of the virtual machine represented by this Azure Workload Container - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Workload type for which registration was sent. - WorkloadType *WorkloadType `json:"workloadType,omitempty"` -} - -// GetAzureWorkloadContainer implements the AzureWorkloadContainerClassification interface for type AzureSQLAGWorkloadContainerProtectionContainer. -func (a *AzureSQLAGWorkloadContainerProtectionContainer) GetAzureWorkloadContainer() *AzureWorkloadContainer { - return &AzureWorkloadContainer{ - SourceResourceID: a.SourceResourceID, - LastUpdatedTime: a.LastUpdatedTime, - ExtendedInfo: a.ExtendedInfo, - WorkloadType: a.WorkloadType, - OperationType: a.OperationType, - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureSQLAGWorkloadContainerProtectionContainer. -func (a *AzureSQLAGWorkloadContainerProtectionContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// AzureSQLContainer - Azure Sql workload-specific container. -type AzureSQLContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` -} - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureSQLContainer. -func (a *AzureSQLContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// AzureSQLProtectedItem - Azure SQL workload-specific backup item. -type AzureSQLProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Additional information for this backup item. - ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. - ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` - - // Backup state of the backed up item. - ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type AzureSQLProtectedItem. -func (a *AzureSQLProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// AzureSQLProtectedItemExtendedInfo - Additional information on Azure Sql specific protected item. -type AzureSQLProtectedItemExtendedInfo struct { - // The oldest backup copy available for this item in the service. - OldestRecoveryPoint *time.Time `json:"oldestRecoveryPoint,omitempty"` - - // State of the backup policy associated with this backup item. - PolicyState *string `json:"policyState,omitempty"` - - // Number of available backup copies associated with this backup item. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` -} - -// AzureSQLProtectionPolicy - Azure SQL workload-specific backup policy. -type AzureSQLProtectionPolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - - // ResourceGuard Operation Requests - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Retention policy details. - RetentionPolicy RetentionPolicyClassification `json:"retentionPolicy,omitempty"` -} - -// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureSQLProtectionPolicy. -func (a *AzureSQLProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { - return &ProtectionPolicy{ - ProtectedItemsCount: a.ProtectedItemsCount, - BackupManagementType: a.BackupManagementType, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - } -} - -// AzureStorageContainer - Azure Storage Account workload-specific container. -type AzureStorageContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Whether storage account lock is to be acquired for this container or not. - AcquireStorageAccountLock *AcquireStorageAccountLock `json:"acquireStorageAccountLock,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Number of items backed up in this container. - ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - - // Resource group name of Recovery Services Vault. - ResourceGroup *string `json:"resourceGroup,omitempty"` - - // Fully qualified ARM url. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Storage account version. - StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` -} - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureStorageContainer. -func (a *AzureStorageContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// AzureStorageErrorInfo - Azure storage specific error information -type AzureStorageErrorInfo struct { - // Error code. - ErrorCode *int32 `json:"errorCode,omitempty"` - - // Localized error string. - ErrorString *string `json:"errorString,omitempty"` - - // List of localized recommendations for above error code. - Recommendations []*string `json:"recommendations,omitempty"` -} - -// AzureStorageJob - Azure storage specific job. -type AzureStorageJob struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - JobType *string `json:"jobType,omitempty"` - - // Gets or sets the state/actions applicable on this job like cancel/retry. - ActionsInfo []*JobSupportedAction `json:"actionsInfo,omitempty"` - - // ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - - // Backup management type to execute the current job. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Time elapsed during the execution of this job. - Duration *string `json:"duration,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - - // Error details on execution of this job. - ErrorDetails []*AzureStorageErrorInfo `json:"errorDetails,omitempty"` - - // Additional information about the job. - ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"` - - // Indicated that whether the job is adhoc(true) or scheduled(false) - IsUserTriggered *bool `json:"isUserTriggered,omitempty"` - - // The operation name. - Operation *string `json:"operation,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // Job status. - Status *string `json:"status,omitempty"` - - // Specifies friendly name of the storage account. - StorageAccountName *string `json:"storageAccountName,omitempty"` - - // Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. - StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` -} - -// GetJob implements the JobClassification interface for type AzureStorageJob. -func (a *AzureStorageJob) GetJob() *Job { - return &Job{ - EntityFriendlyName: a.EntityFriendlyName, - BackupManagementType: a.BackupManagementType, - Operation: a.Operation, - Status: a.Status, - StartTime: a.StartTime, - EndTime: a.EndTime, - ActivityID: a.ActivityID, - JobType: a.JobType, - } -} - -// AzureStorageJobExtendedInfo - Azure Storage workload-specific additional information for job. -type AzureStorageJobExtendedInfo struct { - // Non localized error message on job execution. - DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` - - // Job properties. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // List of tasks for this job - TasksList []*AzureStorageJobTaskDetails `json:"tasksList,omitempty"` -} - -// AzureStorageJobTaskDetails - Azure storage workload specific job task details. -type AzureStorageJobTaskDetails struct { - // The status. - Status *string `json:"status,omitempty"` - - // The task display name. - TaskID *string `json:"taskId,omitempty"` -} - -// AzureStorageProtectableContainer - Azure Storage-specific protectable containers -type AzureStorageProtectableContainer struct { - // REQUIRED; Type of the container. The value of this property for - // 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines - ProtectableContainerType *ContainerType `json:"protectableContainerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Fabric Id of the container such as ARM Id. - ContainerID *string `json:"containerId,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` -} - -// GetProtectableContainer implements the ProtectableContainerClassification interface for type AzureStorageProtectableContainer. -func (a *AzureStorageProtectableContainer) GetProtectableContainer() *ProtectableContainer { - return &ProtectableContainer{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - ProtectableContainerType: a.ProtectableContainerType, - HealthStatus: a.HealthStatus, - ContainerID: a.ContainerID, - } -} - -// AzureVMAppContainerProtectableContainer - Azure workload-specific container -type AzureVMAppContainerProtectableContainer struct { - // REQUIRED; Type of the container. The value of this property for - // 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines - ProtectableContainerType *ContainerType `json:"protectableContainerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Fabric Id of the container such as ARM Id. - ContainerID *string `json:"containerId,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` -} - -// GetProtectableContainer implements the ProtectableContainerClassification interface for type AzureVMAppContainerProtectableContainer. -func (a *AzureVMAppContainerProtectableContainer) GetProtectableContainer() *ProtectableContainer { - return &ProtectableContainer{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - ProtectableContainerType: a.ProtectableContainerType, - HealthStatus: a.HealthStatus, - ContainerID: a.ContainerID, - } -} - -// AzureVMAppContainerProtectionContainer - Container for SQL workloads under Azure Virtual Machines. -type AzureVMAppContainerProtectionContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Additional details of a workload container. - ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Time stamp when this container was updated. - LastUpdatedTime *time.Time `json:"lastUpdatedTime,omitempty"` - - // Re-Do Operation - OperationType *OperationType `json:"operationType,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - - // ARM ID of the virtual machine represented by this Azure Workload Container - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Workload type for which registration was sent. - WorkloadType *WorkloadType `json:"workloadType,omitempty"` -} - -// GetAzureWorkloadContainer implements the AzureWorkloadContainerClassification interface for type AzureVMAppContainerProtectionContainer. -func (a *AzureVMAppContainerProtectionContainer) GetAzureWorkloadContainer() *AzureWorkloadContainer { - return &AzureWorkloadContainer{ - SourceResourceID: a.SourceResourceID, - LastUpdatedTime: a.LastUpdatedTime, - ExtendedInfo: a.ExtendedInfo, - WorkloadType: a.WorkloadType, - OperationType: a.OperationType, - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureVMAppContainerProtectionContainer. -func (a *AzureVMAppContainerProtectionContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// AzureVMResourceFeatureSupportRequest - AzureResource(IaaS VM) Specific feature support request -type AzureVMResourceFeatureSupportRequest struct { - // REQUIRED; backup support feature type. - FeatureType *string `json:"featureType,omitempty"` - - // SKUs (Premium/Managed etc) in case of IaasVM - VMSKU *string `json:"vmSku,omitempty"` - - // Size of the resource: VM size(A/D series etc) in case of IaasVM - VMSize *string `json:"vmSize,omitempty"` -} - -// GetFeatureSupportRequest implements the FeatureSupportRequestClassification interface for type AzureVMResourceFeatureSupportRequest. -func (a *AzureVMResourceFeatureSupportRequest) GetFeatureSupportRequest() *FeatureSupportRequest { - return &FeatureSupportRequest{ - FeatureType: a.FeatureType, - } -} - -// AzureVMResourceFeatureSupportResponse - Response for feature support requests for Azure IaasVm -type AzureVMResourceFeatureSupportResponse struct { - // Support status of feature - SupportStatus *SupportStatus `json:"supportStatus,omitempty"` -} - -// AzureVMWorkloadItemClassification provides polymorphic access to related types. -// Call the interface's GetAzureVMWorkloadItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureVMWorkloadItem, *AzureVMWorkloadSAPAseDatabaseWorkloadItem, *AzureVMWorkloadSAPAseSystemWorkloadItem, *AzureVMWorkloadSAPHanaDatabaseWorkloadItem, -// - *AzureVMWorkloadSAPHanaSystemWorkloadItem, *AzureVMWorkloadSQLDatabaseWorkloadItem, *AzureVMWorkloadSQLInstanceWorkloadItem -type AzureVMWorkloadItemClassification interface { - WorkloadItemClassification - // GetAzureVMWorkloadItem returns the AzureVMWorkloadItem content of the underlying type. - GetAzureVMWorkloadItem() *AzureVMWorkloadItem -} - -// AzureVMWorkloadItem - Azure VM workload-specific workload item. -type AzureVMWorkloadItem struct { - // REQUIRED; Type of the backup item. - WorkloadItemType *string `json:"workloadItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadItem. -func (a *AzureVMWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { return a } - -// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadItem. -func (a *AzureVMWorkloadItem) GetWorkloadItem() *WorkloadItem { - return &WorkloadItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadProtectableItemClassification provides polymorphic access to related types. -// Call the interface's GetAzureVMWorkloadProtectableItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureVMWorkloadProtectableItem, *AzureVMWorkloadSAPAseSystemProtectableItem, *AzureVMWorkloadSAPHanaDatabaseProtectableItem, -// - *AzureVMWorkloadSAPHanaSystemProtectableItem, *AzureVMWorkloadSQLAvailabilityGroupProtectableItem, *AzureVMWorkloadSQLDatabaseProtectableItem, -// - *AzureVMWorkloadSQLInstanceProtectableItem -type AzureVMWorkloadProtectableItemClassification interface { - WorkloadProtectableItemClassification - // GetAzureVMWorkloadProtectableItem returns the AzureVMWorkloadProtectableItem content of the underlying type. - GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem -} - -// AzureVMWorkloadProtectableItem - Azure VM workload-specific protectable item. -type AzureVMWorkloadProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where - // the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - - // Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadProtectableItem. -func (a *AzureVMWorkloadProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { - return a -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadProtectableItem. -func (a *AzureVMWorkloadProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadProtectedItemClassification provides polymorphic access to related types. -// Call the interface's GetAzureVMWorkloadProtectedItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureVMWorkloadProtectedItem, *AzureVMWorkloadSAPAseDatabaseProtectedItem, *AzureVMWorkloadSAPHanaDatabaseProtectedItem, -// - *AzureVMWorkloadSQLDatabaseProtectedItem -type AzureVMWorkloadProtectedItemClassification interface { - ProtectedItemClassification - // GetAzureVMWorkloadProtectedItem returns the AzureVMWorkloadProtectedItem content of the underlying type. - GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem -} - -// AzureVMWorkloadProtectedItem - Azure VM workload-specific protected item. -type AzureVMWorkloadProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Additional information for this backup item. - ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the DB represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Health details of different KPIs - KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths,omitempty"` - - // Error details in last backup - LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` - - // Last backup operation status. Possible values: Healthy, Unhealthy. - LastBackupStatus *LastBackupStatus `json:"lastBackupStatus,omitempty"` - - // Timestamp of the last backup operation on this backup item. - LastBackupTime *time.Time `json:"lastBackupTime,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // Parent name of the DB such as Instance or Availability Group. - ParentName *string `json:"parentName,omitempty"` - - // Parent type of protected item, example: for a DB, standalone server or distributed - ParentType *string `json:"parentType,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Data ID of the protected item. - ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` - - // Health status of the backup item, evaluated based on last heartbeat received - ProtectedItemHealthStatus *ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionState `json:"protectionState,omitempty"` - - // Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadProtectedItem. -func (a *AzureVMWorkloadProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { - return a -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadProtectedItem. -func (a *AzureVMWorkloadProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// AzureVMWorkloadProtectedItemExtendedInfo - Additional information on Azure Workload for SQL specific backup item. -type AzureVMWorkloadProtectedItemExtendedInfo struct { - // The oldest backup copy available for this backup item. - OldestRecoveryPoint *time.Time `json:"oldestRecoveryPoint,omitempty"` - - // Indicates consistency of policy object and policy applied to this backup item. - PolicyState *string `json:"policyState,omitempty"` - - // Indicates consistency of policy object and policy applied to this backup item. - RecoveryModel *string `json:"recoveryModel,omitempty"` - - // Number of backup copies available for this backup item. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` -} - -// AzureVMWorkloadProtectionPolicy - Azure VM (Mercury) workload-specific backup policy. -type AzureVMWorkloadProtectionPolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Fix the policy inconsistency - MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"` - - // Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - - // ResourceGuard Operation Requests - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Common settings for the backup management - Settings *Settings `json:"settings,omitempty"` - - // List of sub-protection policies which includes schedule and retention - SubProtectionPolicy []*SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` - - // Type of workload for the backup management - WorkLoadType *WorkloadType `json:"workLoadType,omitempty"` -} - -// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type AzureVMWorkloadProtectionPolicy. -func (a *AzureVMWorkloadProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { - return &ProtectionPolicy{ - ProtectedItemsCount: a.ProtectedItemsCount, - BackupManagementType: a.BackupManagementType, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - } -} - -// AzureVMWorkloadSAPAseDatabaseProtectedItem - Azure VM workload-specific protected item representing SAP ASE Database. -type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Additional information for this backup item. - ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the DB represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Health details of different KPIs - KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths,omitempty"` - - // Error details in last backup - LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` - - // Last backup operation status. Possible values: Healthy, Unhealthy. - LastBackupStatus *LastBackupStatus `json:"lastBackupStatus,omitempty"` - - // Timestamp of the last backup operation on this backup item. - LastBackupTime *time.Time `json:"lastBackupTime,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // Parent name of the DB such as Instance or Availability Group. - ParentName *string `json:"parentName,omitempty"` - - // Parent type of protected item, example: for a DB, standalone server or distributed - ParentType *string `json:"parentType,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Data ID of the protected item. - ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` - - // Health status of the backup item, evaluated based on last heartbeat received - ProtectedItemHealthStatus *ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionState `json:"protectionState,omitempty"` - - // Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (a *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { - return &AzureVMWorkloadProtectedItem{ - FriendlyName: a.FriendlyName, - ServerName: a.ServerName, - ParentName: a.ParentName, - ParentType: a.ParentType, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - LastBackupErrorDetail: a.LastBackupErrorDetail, - ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, - ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, - ExtendedInfo: a.ExtendedInfo, - KpisHealths: a.KpisHealths, - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (a *AzureVMWorkloadSAPAseDatabaseProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// AzureVMWorkloadSAPAseDatabaseWorkloadItem - Azure VM workload-specific workload item representing SAP ASE Database. -type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { - // REQUIRED; Type of the backup item. - WorkloadItemType *string `json:"workloadItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (a *AzureVMWorkloadSAPAseDatabaseWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { - return &AzureVMWorkloadItem{ - ParentName: a.ParentName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, - SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (a *AzureVMWorkloadSAPAseDatabaseWorkloadItem) GetWorkloadItem() *WorkloadItem { - return &WorkloadItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSAPAseSystemProtectableItem - Azure VM workload-specific protectable item representing SAP ASE System. -type AzureVMWorkloadSAPAseSystemProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where - // the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - - // Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPAseSystemProtectableItem. -func (a *AzureVMWorkloadSAPAseSystemProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { - return &AzureVMWorkloadProtectableItem{ - ParentName: a.ParentName, - ParentUniqueName: a.ParentUniqueName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, - Subinquireditemcount: a.Subinquireditemcount, - Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPAseSystemProtectableItem. -func (a *AzureVMWorkloadSAPAseSystemProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSAPAseSystemWorkloadItem - Azure VM workload-specific workload item representing SAP ASE System. -type AzureVMWorkloadSAPAseSystemWorkloadItem struct { - // REQUIRED; Type of the backup item. - WorkloadItemType *string `json:"workloadItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPAseSystemWorkloadItem. -func (a *AzureVMWorkloadSAPAseSystemWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { - return &AzureVMWorkloadItem{ - ParentName: a.ParentName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, - SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSAPAseSystemWorkloadItem. -func (a *AzureVMWorkloadSAPAseSystemWorkloadItem) GetWorkloadItem() *WorkloadItem { - return &WorkloadItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSAPHanaDatabaseProtectableItem - Azure VM workload-specific protectable item representing SAP HANA Database. -type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where - // the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - - // Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (a *AzureVMWorkloadSAPHanaDatabaseProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { - return &AzureVMWorkloadProtectableItem{ - ParentName: a.ParentName, - ParentUniqueName: a.ParentUniqueName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, - Subinquireditemcount: a.Subinquireditemcount, - Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (a *AzureVMWorkloadSAPHanaDatabaseProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSAPHanaDatabaseProtectedItem - Azure VM workload-specific protected item representing SAP HANA Database. -type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Additional information for this backup item. - ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the DB represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Health details of different KPIs - KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths,omitempty"` - - // Error details in last backup - LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` - - // Last backup operation status. Possible values: Healthy, Unhealthy. - LastBackupStatus *LastBackupStatus `json:"lastBackupStatus,omitempty"` - - // Timestamp of the last backup operation on this backup item. - LastBackupTime *time.Time `json:"lastBackupTime,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // Parent name of the DB such as Instance or Availability Group. - ParentName *string `json:"parentName,omitempty"` - - // Parent type of protected item, example: for a DB, standalone server or distributed - ParentType *string `json:"parentType,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Data ID of the protected item. - ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` - - // Health status of the backup item, evaluated based on last heartbeat received - ProtectedItemHealthStatus *ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionState `json:"protectionState,omitempty"` - - // Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (a *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { - return &AzureVMWorkloadProtectedItem{ - FriendlyName: a.FriendlyName, - ServerName: a.ServerName, - ParentName: a.ParentName, - ParentType: a.ParentType, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - LastBackupErrorDetail: a.LastBackupErrorDetail, - ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, - ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, - ExtendedInfo: a.ExtendedInfo, - KpisHealths: a.KpisHealths, - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (a *AzureVMWorkloadSAPHanaDatabaseProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// AzureVMWorkloadSAPHanaDatabaseWorkloadItem - Azure VM workload-specific workload item representing SAP HANA Database. -type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { - // REQUIRED; Type of the backup item. - WorkloadItemType *string `json:"workloadItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (a *AzureVMWorkloadSAPHanaDatabaseWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { - return &AzureVMWorkloadItem{ - ParentName: a.ParentName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, - SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (a *AzureVMWorkloadSAPHanaDatabaseWorkloadItem) GetWorkloadItem() *WorkloadItem { - return &WorkloadItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSAPHanaSystemProtectableItem - Azure VM workload-specific protectable item representing SAP HANA System. -type AzureVMWorkloadSAPHanaSystemProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where - // the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - - // Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaSystemProtectableItem. -func (a *AzureVMWorkloadSAPHanaSystemProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { - return &AzureVMWorkloadProtectableItem{ - ParentName: a.ParentName, - ParentUniqueName: a.ParentUniqueName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, - Subinquireditemcount: a.Subinquireditemcount, - Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSAPHanaSystemProtectableItem. -func (a *AzureVMWorkloadSAPHanaSystemProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSAPHanaSystemWorkloadItem - Azure VM workload-specific workload item representing SAP HANA System. -type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { - // REQUIRED; Type of the backup item. - WorkloadItemType *string `json:"workloadItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (a *AzureVMWorkloadSAPHanaSystemWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { - return &AzureVMWorkloadItem{ - ParentName: a.ParentName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, - SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (a *AzureVMWorkloadSAPHanaSystemWorkloadItem) GetWorkloadItem() *WorkloadItem { - return &WorkloadItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSQLAvailabilityGroupProtectableItem - Azure VM workload-specific protectable item representing SQL Availability -// Group. -type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where - // the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - - // Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (a *AzureVMWorkloadSQLAvailabilityGroupProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { - return &AzureVMWorkloadProtectableItem{ - ParentName: a.ParentName, - ParentUniqueName: a.ParentUniqueName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, - Subinquireditemcount: a.Subinquireditemcount, - Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (a *AzureVMWorkloadSQLAvailabilityGroupProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSQLDatabaseProtectableItem - Azure VM workload-specific protectable item representing SQL Database. -type AzureVMWorkloadSQLDatabaseProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where - // the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - - // Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectableItem. -func (a *AzureVMWorkloadSQLDatabaseProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { - return &AzureVMWorkloadProtectableItem{ - ParentName: a.ParentName, - ParentUniqueName: a.ParentUniqueName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, - Subinquireditemcount: a.Subinquireditemcount, - Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectableItem. -func (a *AzureVMWorkloadSQLDatabaseProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSQLDatabaseProtectedItem - Azure VM workload-specific protected item representing SQL Database. -type AzureVMWorkloadSQLDatabaseProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Additional information for this backup item. - ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the DB represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Health details of different KPIs - KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths,omitempty"` - - // Error details in last backup - LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` - - // Last backup operation status. Possible values: Healthy, Unhealthy. - LastBackupStatus *LastBackupStatus `json:"lastBackupStatus,omitempty"` - - // Timestamp of the last backup operation on this backup item. - LastBackupTime *time.Time `json:"lastBackupTime,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // Parent name of the DB such as Instance or Availability Group. - ParentName *string `json:"parentName,omitempty"` - - // Parent type of protected item, example: for a DB, standalone server or distributed - ParentType *string `json:"parentType,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Data ID of the protected item. - ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` - - // Health status of the backup item, evaluated based on last heartbeat received - ProtectedItemHealthStatus *ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionState `json:"protectionState,omitempty"` - - // Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectedItem implements the AzureVMWorkloadProtectedItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectedItem. -func (a *AzureVMWorkloadSQLDatabaseProtectedItem) GetAzureVMWorkloadProtectedItem() *AzureVMWorkloadProtectedItem { - return &AzureVMWorkloadProtectedItem{ - FriendlyName: a.FriendlyName, - ServerName: a.ServerName, - ParentName: a.ParentName, - ParentType: a.ParentType, - ProtectionStatus: a.ProtectionStatus, - ProtectionState: a.ProtectionState, - LastBackupStatus: a.LastBackupStatus, - LastBackupTime: a.LastBackupTime, - LastBackupErrorDetail: a.LastBackupErrorDetail, - ProtectedItemDataSourceID: a.ProtectedItemDataSourceID, - ProtectedItemHealthStatus: a.ProtectedItemHealthStatus, - ExtendedInfo: a.ExtendedInfo, - KpisHealths: a.KpisHealths, - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type AzureVMWorkloadSQLDatabaseProtectedItem. -func (a *AzureVMWorkloadSQLDatabaseProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: a.ProtectedItemType, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ContainerName: a.ContainerName, - SourceResourceID: a.SourceResourceID, - PolicyID: a.PolicyID, - LastRecoveryPoint: a.LastRecoveryPoint, - BackupSetName: a.BackupSetName, - CreateMode: a.CreateMode, - DeferredDeleteTimeInUTC: a.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: a.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: a.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: a.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: a.IsRehydrate, - ResourceGuardOperationRequests: a.ResourceGuardOperationRequests, - IsArchiveEnabled: a.IsArchiveEnabled, - PolicyName: a.PolicyName, - } -} - -// AzureVMWorkloadSQLDatabaseWorkloadItem - Azure VM workload-specific workload item representing SQL Database. -type AzureVMWorkloadSQLDatabaseWorkloadItem struct { - // REQUIRED; Type of the backup item. - WorkloadItemType *string `json:"workloadItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSQLDatabaseWorkloadItem. -func (a *AzureVMWorkloadSQLDatabaseWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { - return &AzureVMWorkloadItem{ - ParentName: a.ParentName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, - SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSQLDatabaseWorkloadItem. -func (a *AzureVMWorkloadSQLDatabaseWorkloadItem) GetWorkloadItem() *WorkloadItem { - return &WorkloadItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSQLInstanceProtectableItem - Azure VM workload-specific protectable item representing SQL Instance. -type AzureVMWorkloadSQLInstanceProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // Parent Unique Name is added to provide the service formatted URI Name of the Parent Only Applicable for data bases where - // the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - - // Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadProtectableItem implements the AzureVMWorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLInstanceProtectableItem. -func (a *AzureVMWorkloadSQLInstanceProtectableItem) GetAzureVMWorkloadProtectableItem() *AzureVMWorkloadProtectableItem { - return &AzureVMWorkloadProtectableItem{ - ParentName: a.ParentName, - ParentUniqueName: a.ParentUniqueName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - IsAutoProtected: a.IsAutoProtected, - Subinquireditemcount: a.Subinquireditemcount, - Subprotectableitemcount: a.Subprotectableitemcount, - Prebackupvalidation: a.Prebackupvalidation, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type AzureVMWorkloadSQLInstanceProtectableItem. -func (a *AzureVMWorkloadSQLInstanceProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - ProtectableItemType: a.ProtectableItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureVMWorkloadSQLInstanceWorkloadItem - Azure VM workload-specific workload item representing SQL Instance. -type AzureVMWorkloadSQLInstanceWorkloadItem struct { - // REQUIRED; Type of the backup item. - WorkloadItemType *string `json:"workloadItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Data Directory Paths for default directories - DataDirectoryPaths []*SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - - // Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - - // For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - - // For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetAzureVMWorkloadItem implements the AzureVMWorkloadItemClassification interface for type AzureVMWorkloadSQLInstanceWorkloadItem. -func (a *AzureVMWorkloadSQLInstanceWorkloadItem) GetAzureVMWorkloadItem() *AzureVMWorkloadItem { - return &AzureVMWorkloadItem{ - ParentName: a.ParentName, - ServerName: a.ServerName, - IsAutoProtectable: a.IsAutoProtectable, - Subinquireditemcount: a.Subinquireditemcount, - SubWorkloadItemCount: a.SubWorkloadItemCount, - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// GetWorkloadItem implements the WorkloadItemClassification interface for type AzureVMWorkloadSQLInstanceWorkloadItem. -func (a *AzureVMWorkloadSQLInstanceWorkloadItem) GetWorkloadItem() *WorkloadItem { - return &WorkloadItem{ - BackupManagementType: a.BackupManagementType, - WorkloadType: a.WorkloadType, - WorkloadItemType: a.WorkloadItemType, - FriendlyName: a.FriendlyName, - ProtectionState: a.ProtectionState, - } -} - -// AzureWorkloadAutoProtectionIntentClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadAutoProtectionIntent() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadAutoProtectionIntent, *AzureWorkloadSQLAutoProtectionIntent -type AzureWorkloadAutoProtectionIntentClassification interface { - AzureRecoveryServiceVaultProtectionIntentClassification - // GetAzureWorkloadAutoProtectionIntent returns the AzureWorkloadAutoProtectionIntent content of the underlying type. - GetAzureWorkloadAutoProtectionIntent() *AzureWorkloadAutoProtectionIntent -} - -// AzureWorkloadAutoProtectionIntent - Azure Recovery Services Vault specific protection intent item. -type AzureWorkloadAutoProtectionIntent struct { - // REQUIRED; backup protectionIntent type. - ProtectionIntentItemType *ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` -} - -// GetAzureRecoveryServiceVaultProtectionIntent implements the AzureRecoveryServiceVaultProtectionIntentClassification interface -// for type AzureWorkloadAutoProtectionIntent. -func (a *AzureWorkloadAutoProtectionIntent) GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent { - return &AzureRecoveryServiceVaultProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, - BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, - ItemID: a.ItemID, - PolicyID: a.PolicyID, - ProtectionState: a.ProtectionState, - } -} - -// GetAzureWorkloadAutoProtectionIntent implements the AzureWorkloadAutoProtectionIntentClassification interface for type -// AzureWorkloadAutoProtectionIntent. -func (a *AzureWorkloadAutoProtectionIntent) GetAzureWorkloadAutoProtectionIntent() *AzureWorkloadAutoProtectionIntent { - return a -} - -// GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureWorkloadAutoProtectionIntent. -func (a *AzureWorkloadAutoProtectionIntent) GetProtectionIntent() *ProtectionIntent { - return &ProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, - BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, - ItemID: a.ItemID, - PolicyID: a.PolicyID, - ProtectionState: a.ProtectionState, - } -} - -// AzureWorkloadBackupRequest - AzureWorkload workload-specific backup request. -type AzureWorkloadBackupRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Type of backup, viz. Full, Differential, Log or CopyOnlyFull - BackupType *BackupType `json:"backupType,omitempty"` - - // Bool for Compression setting - EnableCompression *bool `json:"enableCompression,omitempty"` - - // Backup copy will expire after the time specified (UTC). - RecoveryPointExpiryTimeInUTC *time.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` -} - -// GetBackupRequest implements the BackupRequestClassification interface for type AzureWorkloadBackupRequest. -func (a *AzureWorkloadBackupRequest) GetBackupRequest() *BackupRequest { - return &BackupRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadContainerClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadContainer() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureSQLAGWorkloadContainerProtectionContainer, *AzureVMAppContainerProtectionContainer, *AzureWorkloadContainer -type AzureWorkloadContainerClassification interface { - ProtectionContainerClassification - // GetAzureWorkloadContainer returns the AzureWorkloadContainer content of the underlying type. - GetAzureWorkloadContainer() *AzureWorkloadContainer -} - -// AzureWorkloadContainer - Container for the workloads running inside Azure Compute or Classic Compute. -type AzureWorkloadContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Additional details of a workload container. - ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Time stamp when this container was updated. - LastUpdatedTime *time.Time `json:"lastUpdatedTime,omitempty"` - - // Re-Do Operation - OperationType *OperationType `json:"operationType,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - - // ARM ID of the virtual machine represented by this Azure Workload Container - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Workload type for which registration was sent. - WorkloadType *WorkloadType `json:"workloadType,omitempty"` -} - -// GetAzureWorkloadContainer implements the AzureWorkloadContainerClassification interface for type AzureWorkloadContainer. -func (a *AzureWorkloadContainer) GetAzureWorkloadContainer() *AzureWorkloadContainer { return a } - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type AzureWorkloadContainer. -func (a *AzureWorkloadContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: a.FriendlyName, - BackupManagementType: a.BackupManagementType, - RegistrationStatus: a.RegistrationStatus, - HealthStatus: a.HealthStatus, - ContainerType: a.ContainerType, - ProtectableObjectType: a.ProtectableObjectType, - } -} - -// AzureWorkloadContainerAutoProtectionIntent - Azure workload specific protection intent item. -type AzureWorkloadContainerAutoProtectionIntent struct { - // REQUIRED; backup protectionIntent type. - ProtectionIntentItemType *ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` -} - -// GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureWorkloadContainerAutoProtectionIntent. -func (a *AzureWorkloadContainerAutoProtectionIntent) GetProtectionIntent() *ProtectionIntent { - return &ProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, - BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, - ItemID: a.ItemID, - PolicyID: a.PolicyID, - ProtectionState: a.ProtectionState, - } -} - -// AzureWorkloadContainerExtendedInfo - Extended information of the container. -type AzureWorkloadContainerExtendedInfo struct { - // Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. - HostServerName *string `json:"hostServerName,omitempty"` - - // Inquiry Status for the container. - InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"` - - // List of the nodes in case of distributed container. - NodesList []*DistributedNodesInfo `json:"nodesList,omitempty"` -} - -// AzureWorkloadErrorInfo - Azure storage specific error information -type AzureWorkloadErrorInfo struct { - // Additional details for above error code. - AdditionalDetails *string `json:"additionalDetails,omitempty"` - - // Error code. - ErrorCode *int32 `json:"errorCode,omitempty"` - - // Localized error string. - ErrorString *string `json:"errorString,omitempty"` - - // Title: Typically, the entity that the error pertains to. - ErrorTitle *string `json:"errorTitle,omitempty"` - - // List of localized recommendations for above error code. - Recommendations []*string `json:"recommendations,omitempty"` -} - -// AzureWorkloadJob - Azure storage specific job. -type AzureWorkloadJob struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - JobType *string `json:"jobType,omitempty"` - - // Gets or sets the state/actions applicable on this job like cancel/retry. - ActionsInfo []*JobSupportedAction `json:"actionsInfo,omitempty"` - - // ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - - // Backup management type to execute the current job. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Time elapsed during the execution of this job. - Duration *string `json:"duration,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - - // Error details on execution of this job. - ErrorDetails []*AzureWorkloadErrorInfo `json:"errorDetails,omitempty"` - - // Additional information about the job. - ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"` - - // The operation name. - Operation *string `json:"operation,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // Job status. - Status *string `json:"status,omitempty"` - - // Workload type of the job - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetJob implements the JobClassification interface for type AzureWorkloadJob. -func (a *AzureWorkloadJob) GetJob() *Job { - return &Job{ - EntityFriendlyName: a.EntityFriendlyName, - BackupManagementType: a.BackupManagementType, - Operation: a.Operation, - Status: a.Status, - StartTime: a.StartTime, - EndTime: a.EndTime, - ActivityID: a.ActivityID, - JobType: a.JobType, - } -} - -// AzureWorkloadJobExtendedInfo - Azure VM workload-specific additional information for job. -type AzureWorkloadJobExtendedInfo struct { - // Non localized error message on job execution. - DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` - - // Job properties. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // List of tasks for this job - TasksList []*AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"` -} - -// AzureWorkloadJobTaskDetails - Azure VM workload specific job task details. -type AzureWorkloadJobTaskDetails struct { - // The status. - Status *string `json:"status,omitempty"` - - // The task display name. - TaskID *string `json:"taskId,omitempty"` -} - -// AzureWorkloadPointInTimeRecoveryPointClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadPointInTimeRecoveryPoint() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint -type AzureWorkloadPointInTimeRecoveryPointClassification interface { - AzureWorkloadRecoveryPointClassification - // GetAzureWorkloadPointInTimeRecoveryPoint returns the AzureWorkloadPointInTimeRecoveryPoint content of the underlying type. - GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint -} - -// AzureWorkloadPointInTimeRecoveryPoint - Recovery point specific to PointInTime -type AzureWorkloadPointInTimeRecoveryPoint struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Eligibility of RP to be moved to another tier - RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo,omitempty"` - - // Recovery point tier information. - RecoveryPointTierDetails []*RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"` - - // UTC time at which recovery point was created - RecoveryPointTimeInUTC *time.Time `json:"recoveryPointTimeInUTC,omitempty"` - - // List of log ranges - TimeRanges []*PointInTimeRange `json:"timeRanges,omitempty"` - - // Type of restore point - Type *RestorePointType `json:"type,omitempty"` -} - -// GetAzureWorkloadPointInTimeRecoveryPoint implements the AzureWorkloadPointInTimeRecoveryPointClassification interface for -// type AzureWorkloadPointInTimeRecoveryPoint. -func (a *AzureWorkloadPointInTimeRecoveryPoint) GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint { - return a -} - -// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadPointInTimeRecoveryPoint. -func (a *AzureWorkloadPointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { - return &AzureWorkloadRecoveryPoint{ - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, - RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, - ObjectType: a.ObjectType, - } -} - -// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadPointInTimeRecoveryPoint. -func (a *AzureWorkloadPointInTimeRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { - return &RecoveryPoint{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadPointInTimeRestoreRequest - AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore -type AzureWorkloadPointInTimeRestoreRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // PointInTime value - PointInTime *time.Time `json:"pointInTime,omitempty"` - - // Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // Defines whether the current recovery mode is file restore or database restore - RecoveryMode *RecoveryMode `json:"recoveryMode,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - - // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` -} - -// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadPointInTimeRestoreRequest. -func (a *AzureWorkloadPointInTimeRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { - return &AzureWorkloadRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadPointInTimeRestoreRequest. -func (a *AzureWorkloadPointInTimeRestoreRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadRecoveryPointClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadRecoveryPoint() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint, *AzureWorkloadSAPHanaRecoveryPoint, -// - *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint -type AzureWorkloadRecoveryPointClassification interface { - RecoveryPointClassification - // GetAzureWorkloadRecoveryPoint returns the AzureWorkloadRecoveryPoint content of the underlying type. - GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint -} - -// AzureWorkloadRecoveryPoint - Workload specific recovery point, specifically encapsulates full/diff recovery point -type AzureWorkloadRecoveryPoint struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Eligibility of RP to be moved to another tier - RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo,omitempty"` - - // Recovery point tier information. - RecoveryPointTierDetails []*RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"` - - // UTC time at which recovery point was created - RecoveryPointTimeInUTC *time.Time `json:"recoveryPointTimeInUTC,omitempty"` - - // Type of restore point - Type *RestorePointType `json:"type,omitempty"` -} - -// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadRecoveryPoint. -func (a *AzureWorkloadRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { - return a -} - -// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadRecoveryPoint. -func (a *AzureWorkloadRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { - return &RecoveryPoint{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadPointInTimeRestoreRequest, *AzureWorkloadRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreRequest, -// - *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSAPHanaRestoreRequest, *AzureWorkloadSAPHanaRestoreWithRehydrateRequest, -// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, -// - *AzureWorkloadSQLRestoreWithRehydrateRequest -type AzureWorkloadRestoreRequestClassification interface { - RestoreRequestClassification - // GetAzureWorkloadRestoreRequest returns the AzureWorkloadRestoreRequest content of the underlying type. - GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest -} - -// AzureWorkloadRestoreRequest - AzureWorkload-specific restore. -type AzureWorkloadRestoreRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // Defines whether the current recovery mode is file restore or database restore - RecoveryMode *RecoveryMode `json:"recoveryMode,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - - // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` -} - -// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadRestoreRequest. -func (a *AzureWorkloadRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { - return a -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadRestoreRequest. -func (a *AzureWorkloadRestoreRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSAPHanaPointInTimeRecoveryPoint - Recovery point specific to PointInTime in SAPHana -type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Eligibility of RP to be moved to another tier - RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo,omitempty"` - - // Recovery point tier information. - RecoveryPointTierDetails []*RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"` - - // UTC time at which recovery point was created - RecoveryPointTimeInUTC *time.Time `json:"recoveryPointTimeInUTC,omitempty"` - - // List of log ranges - TimeRanges []*PointInTimeRange `json:"timeRanges,omitempty"` - - // Type of restore point - Type *RestorePointType `json:"type,omitempty"` -} - -// GetAzureWorkloadPointInTimeRecoveryPoint implements the AzureWorkloadPointInTimeRecoveryPointClassification interface for -// type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) GetAzureWorkloadPointInTimeRecoveryPoint() *AzureWorkloadPointInTimeRecoveryPoint { - return &AzureWorkloadPointInTimeRecoveryPoint{ - TimeRanges: a.TimeRanges, - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, - RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { - return &AzureWorkloadRecoveryPoint{ - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, - RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, - ObjectType: a.ObjectType, - } -} - -// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { - return &RecoveryPoint{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadSAPHanaPointInTimeRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest -type AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification interface { - AzureWorkloadSAPHanaRestoreRequestClassification - // GetAzureWorkloadSAPHanaPointInTimeRestoreRequest returns the AzureWorkloadSAPHanaPointInTimeRestoreRequest content of the underlying type. - GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() *AzureWorkloadSAPHanaPointInTimeRestoreRequest -} - -// AzureWorkloadSAPHanaPointInTimeRestoreRequest - AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log -// restore -type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // PointInTime value - PointInTime *time.Time `json:"pointInTime,omitempty"` - - // Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // Defines whether the current recovery mode is file restore or database restore - RecoveryMode *RecoveryMode `json:"recoveryMode,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - - // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` -} - -// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { - return &AzureWorkloadRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSAPHanaPointInTimeRestoreRequest implements the AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification -// interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() *AzureWorkloadSAPHanaPointInTimeRestoreRequest { - return a -} - -// GetAzureWorkloadSAPHanaRestoreRequest implements the AzureWorkloadSAPHanaRestoreRequestClassification interface for type -// AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { - return &AzureWorkloadSAPHanaRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest - AzureWorkload SAP Hana-specific restore with integrated rehydration -// of recovery point. -type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // PointInTime value - PointInTime *time.Time `json:"pointInTime,omitempty"` - - // Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // Defines whether the current recovery mode is file restore or database restore - RecoveryMode *RecoveryMode `json:"recoveryMode,omitempty"` - - // RP Rehydration Info - RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - - // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` -} - -// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. -func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { - return &AzureWorkloadRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSAPHanaPointInTimeRestoreRequest implements the AzureWorkloadSAPHanaPointInTimeRestoreRequestClassification -// interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. -func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSAPHanaPointInTimeRestoreRequest() *AzureWorkloadSAPHanaPointInTimeRestoreRequest { - return &AzureWorkloadSAPHanaPointInTimeRestoreRequest{ - PointInTime: a.PointInTime, - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSAPHanaRestoreRequest implements the AzureWorkloadSAPHanaRestoreRequestClassification interface for type -// AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. -func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { - return &AzureWorkloadSAPHanaRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. -func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSAPHanaRecoveryPoint - SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints -type AzureWorkloadSAPHanaRecoveryPoint struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Eligibility of RP to be moved to another tier - RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo,omitempty"` - - // Recovery point tier information. - RecoveryPointTierDetails []*RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"` - - // UTC time at which recovery point was created - RecoveryPointTimeInUTC *time.Time `json:"recoveryPointTimeInUTC,omitempty"` - - // Type of restore point - Type *RestorePointType `json:"type,omitempty"` -} - -// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSAPHanaRecoveryPoint. -func (a *AzureWorkloadSAPHanaRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { - return &AzureWorkloadRecoveryPoint{ - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, - RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, - ObjectType: a.ObjectType, - } -} - -// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadSAPHanaRecoveryPoint. -func (a *AzureWorkloadSAPHanaRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { - return &RecoveryPoint{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSAPHanaRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadSAPHanaRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadSAPHanaPointInTimeRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSAPHanaRestoreRequest, -// - *AzureWorkloadSAPHanaRestoreWithRehydrateRequest -type AzureWorkloadSAPHanaRestoreRequestClassification interface { - AzureWorkloadRestoreRequestClassification - // GetAzureWorkloadSAPHanaRestoreRequest returns the AzureWorkloadSAPHanaRestoreRequest content of the underlying type. - GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest -} - -// AzureWorkloadSAPHanaRestoreRequest - AzureWorkload SAP Hana-specific restore. -type AzureWorkloadSAPHanaRestoreRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // Defines whether the current recovery mode is file restore or database restore - RecoveryMode *RecoveryMode `json:"recoveryMode,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - - // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` -} - -// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaRestoreRequest. -func (a *AzureWorkloadSAPHanaRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { - return &AzureWorkloadRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSAPHanaRestoreRequest implements the AzureWorkloadSAPHanaRestoreRequestClassification interface for type -// AzureWorkloadSAPHanaRestoreRequest. -func (a *AzureWorkloadSAPHanaRestoreRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { - return a -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSAPHanaRestoreRequest. -func (a *AzureWorkloadSAPHanaRestoreRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSAPHanaRestoreWithRehydrateRequest - AzureWorkload SAP Hana-specific restore with integrated rehydration of -// recovery point. -type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // Defines whether the current recovery mode is file restore or database restore - RecoveryMode *RecoveryMode `json:"recoveryMode,omitempty"` - - // RP Rehydration Info - RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - - // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` -} - -// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSAPHanaRestoreWithRehydrateRequest. -func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { - return &AzureWorkloadRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSAPHanaRestoreRequest implements the AzureWorkloadSAPHanaRestoreRequestClassification interface for type -// AzureWorkloadSAPHanaRestoreWithRehydrateRequest. -func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) GetAzureWorkloadSAPHanaRestoreRequest() *AzureWorkloadSAPHanaRestoreRequest { - return &AzureWorkloadSAPHanaRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSAPHanaRestoreWithRehydrateRequest. -func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSQLAutoProtectionIntent - Azure Workload SQL Auto Protection intent item. -type AzureWorkloadSQLAutoProtectionIntent struct { - // REQUIRED; backup protectionIntent type. - ProtectionIntentItemType *ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Workload item type of the item for which intent is to be set - WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` -} - -// GetAzureRecoveryServiceVaultProtectionIntent implements the AzureRecoveryServiceVaultProtectionIntentClassification interface -// for type AzureWorkloadSQLAutoProtectionIntent. -func (a *AzureWorkloadSQLAutoProtectionIntent) GetAzureRecoveryServiceVaultProtectionIntent() *AzureRecoveryServiceVaultProtectionIntent { - return &AzureRecoveryServiceVaultProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, - BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, - ItemID: a.ItemID, - PolicyID: a.PolicyID, - ProtectionState: a.ProtectionState, - } -} - -// GetAzureWorkloadAutoProtectionIntent implements the AzureWorkloadAutoProtectionIntentClassification interface for type -// AzureWorkloadSQLAutoProtectionIntent. -func (a *AzureWorkloadSQLAutoProtectionIntent) GetAzureWorkloadAutoProtectionIntent() *AzureWorkloadAutoProtectionIntent { - return &AzureWorkloadAutoProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, - BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, - ItemID: a.ItemID, - PolicyID: a.PolicyID, - ProtectionState: a.ProtectionState, - } -} - -// GetProtectionIntent implements the ProtectionIntentClassification interface for type AzureWorkloadSQLAutoProtectionIntent. -func (a *AzureWorkloadSQLAutoProtectionIntent) GetProtectionIntent() *ProtectionIntent { - return &ProtectionIntent{ - ProtectionIntentItemType: a.ProtectionIntentItemType, - BackupManagementType: a.BackupManagementType, - SourceResourceID: a.SourceResourceID, - ItemID: a.ItemID, - PolicyID: a.PolicyID, - ProtectionState: a.ProtectionState, - } -} - -// AzureWorkloadSQLPointInTimeRecoveryPoint - Recovery point specific to PointInTime -type AzureWorkloadSQLPointInTimeRecoveryPoint struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Extended Info that provides data directory details. Will be populated in two cases: When a specific recovery point is accessed - // using GetRecoveryPoint Or when ListRecoveryPoints is called for Log RP - // only with ExtendedInfo query filter - ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` - - // Eligibility of RP to be moved to another tier - RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo,omitempty"` - - // Recovery point tier information. - RecoveryPointTierDetails []*RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"` - - // UTC time at which recovery point was created - RecoveryPointTimeInUTC *time.Time `json:"recoveryPointTimeInUTC,omitempty"` - - // List of log ranges - TimeRanges []*PointInTimeRange `json:"timeRanges,omitempty"` - - // Type of restore point - Type *RestorePointType `json:"type,omitempty"` -} - -// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. -func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { - return &AzureWorkloadRecoveryPoint{ - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, - RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSQLRecoveryPoint implements the AzureWorkloadSQLRecoveryPointClassification interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. -func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) GetAzureWorkloadSQLRecoveryPoint() *AzureWorkloadSQLRecoveryPoint { - return &AzureWorkloadSQLRecoveryPoint{ - ExtendedInfo: a.ExtendedInfo, - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, - RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, - ObjectType: a.ObjectType, - } -} - -// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. -func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { - return &RecoveryPoint{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSQLPointInTimeRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadSQLPointInTimeRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest -type AzureWorkloadSQLPointInTimeRestoreRequestClassification interface { - AzureWorkloadSQLRestoreRequestClassification - // GetAzureWorkloadSQLPointInTimeRestoreRequest returns the AzureWorkloadSQLPointInTimeRestoreRequest content of the underlying type. - GetAzureWorkloadSQLPointInTimeRestoreRequest() *AzureWorkloadSQLPointInTimeRestoreRequest -} - -// AzureWorkloadSQLPointInTimeRestoreRequest - AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore -type AzureWorkloadSQLPointInTimeRestoreRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Data directory details - AlternateDirectoryPaths []*SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` - - // SQL specific property where user can chose to set no-recovery when restore operation is tried - IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` - - // PointInTime value - PointInTime *time.Time `json:"pointInTime,omitempty"` - - // Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // Defines whether the current recovery mode is file restore or database restore - RecoveryMode *RecoveryMode `json:"recoveryMode,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Default option set to true. If this is set to false, alternate data directory must be provided - ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` - - // Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - - // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` -} - -// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreRequest. -func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { - return &AzureWorkloadRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSQLPointInTimeRestoreRequest implements the AzureWorkloadSQLPointInTimeRestoreRequestClassification interface -// for type AzureWorkloadSQLPointInTimeRestoreRequest. -func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetAzureWorkloadSQLPointInTimeRestoreRequest() *AzureWorkloadSQLPointInTimeRestoreRequest { - return a -} - -// GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreRequest. -func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { - return &AzureWorkloadSQLRestoreRequest{ - ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, - IsNonRecoverable: a.IsNonRecoverable, - AlternateDirectoryPaths: a.AlternateDirectoryPaths, - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreRequest. -func (a *AzureWorkloadSQLPointInTimeRestoreRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest - AzureWorkload SQL-specific restore with integrated rehydration -// of recovery point. -type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Data directory details - AlternateDirectoryPaths []*SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` - - // SQL specific property where user can chose to set no-recovery when restore operation is tried - IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` - - // PointInTime value - PointInTime *time.Time `json:"pointInTime,omitempty"` - - // Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // Defines whether the current recovery mode is file restore or database restore - RecoveryMode *RecoveryMode `json:"recoveryMode,omitempty"` - - // RP Rehydration Info - RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Default option set to true. If this is set to false, alternate data directory must be provided - ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` - - // Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - - // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` -} - -// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. -func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { - return &AzureWorkloadRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSQLPointInTimeRestoreRequest implements the AzureWorkloadSQLPointInTimeRestoreRequestClassification interface -// for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. -func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSQLPointInTimeRestoreRequest() *AzureWorkloadSQLPointInTimeRestoreRequest { - return &AzureWorkloadSQLPointInTimeRestoreRequest{ - PointInTime: a.PointInTime, - ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, - IsNonRecoverable: a.IsNonRecoverable, - AlternateDirectoryPaths: a.AlternateDirectoryPaths, - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. -func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { - return &AzureWorkloadSQLRestoreRequest{ - ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, - IsNonRecoverable: a.IsNonRecoverable, - AlternateDirectoryPaths: a.AlternateDirectoryPaths, - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. -func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSQLRecoveryPointClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadSQLRecoveryPoint() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint -type AzureWorkloadSQLRecoveryPointClassification interface { - AzureWorkloadRecoveryPointClassification - // GetAzureWorkloadSQLRecoveryPoint returns the AzureWorkloadSQLRecoveryPoint content of the underlying type. - GetAzureWorkloadSQLRecoveryPoint() *AzureWorkloadSQLRecoveryPoint -} - -// AzureWorkloadSQLRecoveryPoint - SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with -// extended info -type AzureWorkloadSQLRecoveryPoint struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Extended Info that provides data directory details. Will be populated in two cases: When a specific recovery point is accessed - // using GetRecoveryPoint Or when ListRecoveryPoints is called for Log RP - // only with ExtendedInfo query filter - ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` - - // Eligibility of RP to be moved to another tier - RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo,omitempty"` - - // Recovery point tier information. - RecoveryPointTierDetails []*RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"` - - // UTC time at which recovery point was created - RecoveryPointTimeInUTC *time.Time `json:"recoveryPointTimeInUTC,omitempty"` - - // Type of restore point - Type *RestorePointType `json:"type,omitempty"` -} - -// GetAzureWorkloadRecoveryPoint implements the AzureWorkloadRecoveryPointClassification interface for type AzureWorkloadSQLRecoveryPoint. -func (a *AzureWorkloadSQLRecoveryPoint) GetAzureWorkloadRecoveryPoint() *AzureWorkloadRecoveryPoint { - return &AzureWorkloadRecoveryPoint{ - RecoveryPointTimeInUTC: a.RecoveryPointTimeInUTC, - Type: a.Type, - RecoveryPointTierDetails: a.RecoveryPointTierDetails, - RecoveryPointMoveReadinessInfo: a.RecoveryPointMoveReadinessInfo, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSQLRecoveryPoint implements the AzureWorkloadSQLRecoveryPointClassification interface for type AzureWorkloadSQLRecoveryPoint. -func (a *AzureWorkloadSQLRecoveryPoint) GetAzureWorkloadSQLRecoveryPoint() *AzureWorkloadSQLRecoveryPoint { - return a -} - -// GetRecoveryPoint implements the RecoveryPointClassification interface for type AzureWorkloadSQLRecoveryPoint. -func (a *AzureWorkloadSQLRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { - return &RecoveryPoint{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSQLRecoveryPointExtendedInfo - Extended info class details -type AzureWorkloadSQLRecoveryPointExtendedInfo struct { - // List of data directory paths during restore operation. - DataDirectoryPaths []*SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` - - // UTC time at which data directory info was captured - DataDirectoryTimeInUTC *time.Time `json:"dataDirectoryTimeInUTC,omitempty"` -} - -// AzureWorkloadSQLRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetAzureWorkloadSQLRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, -// - *AzureWorkloadSQLRestoreWithRehydrateRequest -type AzureWorkloadSQLRestoreRequestClassification interface { - AzureWorkloadRestoreRequestClassification - // GetAzureWorkloadSQLRestoreRequest returns the AzureWorkloadSQLRestoreRequest content of the underlying type. - GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest -} - -// AzureWorkloadSQLRestoreRequest - AzureWorkload SQL -specific restore. Specifically for full/diff restore -type AzureWorkloadSQLRestoreRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Data directory details - AlternateDirectoryPaths []*SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` - - // SQL specific property where user can chose to set no-recovery when restore operation is tried - IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` - - // Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // Defines whether the current recovery mode is file restore or database restore - RecoveryMode *RecoveryMode `json:"recoveryMode,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Default option set to true. If this is set to false, alternate data directory must be provided - ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` - - // Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - - // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` -} - -// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLRestoreRequest. -func (a *AzureWorkloadSQLRestoreRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { - return &AzureWorkloadRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLRestoreRequest. -func (a *AzureWorkloadSQLRestoreRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { - return a -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSQLRestoreRequest. -func (a *AzureWorkloadSQLRestoreRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// AzureWorkloadSQLRestoreWithRehydrateRequest - AzureWorkload SQL-specific restore with integrated rehydration of recovery -// point -type AzureWorkloadSQLRestoreWithRehydrateRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Data directory details - AlternateDirectoryPaths []*SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` - - // SQL specific property where user can chose to set no-recovery when restore operation is tried - IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` - - // Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // Defines whether the current recovery mode is file restore or database restore - RecoveryMode *RecoveryMode `json:"recoveryMode,omitempty"` - - // RP Rehydration Info - RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Default option set to true. If this is set to false, alternate data directory must be provided - ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` - - // Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - - // This is the complete ARM Id of the target VM For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` -} - -// GetAzureWorkloadRestoreRequest implements the AzureWorkloadRestoreRequestClassification interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. -func (a *AzureWorkloadSQLRestoreWithRehydrateRequest) GetAzureWorkloadRestoreRequest() *AzureWorkloadRestoreRequest { - return &AzureWorkloadRestoreRequest{ - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetAzureWorkloadSQLRestoreRequest implements the AzureWorkloadSQLRestoreRequestClassification interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. -func (a *AzureWorkloadSQLRestoreWithRehydrateRequest) GetAzureWorkloadSQLRestoreRequest() *AzureWorkloadSQLRestoreRequest { - return &AzureWorkloadSQLRestoreRequest{ - ShouldUseAlternateTargetLocation: a.ShouldUseAlternateTargetLocation, - IsNonRecoverable: a.IsNonRecoverable, - AlternateDirectoryPaths: a.AlternateDirectoryPaths, - RecoveryType: a.RecoveryType, - SourceResourceID: a.SourceResourceID, - PropertyBag: a.PropertyBag, - TargetInfo: a.TargetInfo, - RecoveryMode: a.RecoveryMode, - TargetVirtualMachineID: a.TargetVirtualMachineID, - ObjectType: a.ObjectType, - } -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. -func (a *AzureWorkloadSQLRestoreWithRehydrateRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: a.ObjectType, - } -} - -// BEKDetails - BEK is bitlocker encryption key. -type BEKDetails struct { - // BEK data. - SecretData *string `json:"secretData,omitempty"` - - // Secret is BEK. - SecretURL *string `json:"secretUrl,omitempty"` - - // ID of the Key Vault where this Secret is stored. - SecretVaultID *string `json:"secretVaultId,omitempty"` -} - -// BMSBackupEngineQueryObject - Query parameters to fetch list of backup engines. -type BMSBackupEngineQueryObject struct { - // attribute to add extended info - Expand *string `json:"expand,omitempty"` -} - -// BMSBackupEnginesQueryObject - Query parameters to fetch list of backup engines. -type BMSBackupEnginesQueryObject struct { - // Backup management type for the backup engine. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Attribute to add extended info. - Expand *string `json:"expand,omitempty"` - - // Friendly name of the backup engine. - FriendlyName *string `json:"friendlyName,omitempty"` -} - -// BMSBackupSummariesQueryObject - Query parameters to fetch backup summaries. -type BMSBackupSummariesQueryObject struct { - // Backup management type for this container. - Type *Type `json:"type,omitempty"` -} - -// BMSContainerQueryObject - The query filters that can be used with the list containers API. -type BMSContainerQueryObject struct { - // REQUIRED; Backup management type for this container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Backup engine name - BackupEngineName *string `json:"backupEngineName,omitempty"` - - // Type of container for filter - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Fabric name for filter - FabricName *string `json:"fabricName,omitempty"` - - // Friendly name of this container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of registration of this container with the Recovery Services Vault. - Status *string `json:"status,omitempty"` -} - -// BMSContainersInquiryQueryObject - The query filters that can be used with the inquire container API. -type BMSContainersInquiryQueryObject struct { - // Backup management type for this container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Workload type for this container. - WorkloadType *WorkloadType `json:"workloadType,omitempty"` -} - -// BMSPOQueryObject - Filters to list items that can be backed up. -type BMSPOQueryObject struct { - // Backup management type. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Full name of the container whose Protectable Objects should be returned. - ContainerName *string `json:"containerName,omitempty"` - - // Friendly name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Backup status query parameter. - Status *string `json:"status,omitempty"` - - // Workload type - WorkloadType *WorkloadType `json:"workloadType,omitempty"` -} - -// BMSPrepareDataMoveOperationResultClientGetOptions contains the optional parameters for the BMSPrepareDataMoveOperationResultClient.Get -// method. -type BMSPrepareDataMoveOperationResultClientGetOptions struct { - // placeholder for future optional parameters -} - -// BMSRPQueryObject - Filters to list backup copies. -type BMSRPQueryObject struct { - // Backup copies created before this time. - EndDate *time.Time `json:"endDate,omitempty"` - - // In Get Recovery Point, it tells whether extended information about recovery point is asked. - ExtendedInfo *bool `json:"extendedInfo,omitempty"` - - // Whether the RP can be moved to another tier - MoveReadyRPOnly *bool `json:"moveReadyRPOnly,omitempty"` - - // RestorePoint type - RestorePointQueryType *RestorePointQueryType `json:"restorePointQueryType,omitempty"` - - // Backup copies created after this time. - StartDate *time.Time `json:"startDate,omitempty"` -} - -// BMSRefreshContainersQueryObject - The query filters that can be used with the refresh container API. -type BMSRefreshContainersQueryObject struct { - // Backup management type for this container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` -} - -// BMSWorkloadItemQueryObject - Filters to list items that can be backed up. -type BMSWorkloadItemQueryObject struct { - // Backup management type. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Backup status query parameter. - ProtectionStatus *ProtectionStatus `json:"protectionStatus,omitempty"` - - // Workload Item type - WorkloadItemType *WorkloadItemType `json:"workloadItemType,omitempty"` - - // Workload type - WorkloadType *WorkloadType `json:"workloadType,omitempty"` -} - -// BackupEngineBaseClassification provides polymorphic access to related types. -// Call the interface's GetBackupEngineBase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupServerEngine, *BackupEngineBase, *DpmBackupEngine -type BackupEngineBaseClassification interface { - // GetBackupEngineBase returns the BackupEngineBase content of the underlying type. - GetBackupEngineBase() *BackupEngineBase -} - -// BackupEngineBase - The base backup engine class. All workload specific backup engines derive from this class. -type BackupEngineBase struct { - // REQUIRED; Type of the backup engine. - BackupEngineType *BackupEngineType `json:"backupEngineType,omitempty"` - - // Backup agent version - AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` - - // ID of the backup engine. - BackupEngineID *string `json:"backupEngineId,omitempty"` - - // Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} - BackupEngineState *string `json:"backupEngineState,omitempty"` - - // Type of backup management for the backup engine. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Flag indicating if the backup engine be registered, once already registered. - CanReRegister *bool `json:"canReRegister,omitempty"` - - // Backup engine version - DpmVersion *string `json:"dpmVersion,omitempty"` - - // Extended info of the backupengine - ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the backup engine. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Backup status of the backup engine. - HealthStatus *string `json:"healthStatus,omitempty"` - - // To check if backup agent upgrade available - IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` - - // To check if backup engine upgrade available - IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` - - // Registration status of the backup engine with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` -} - -// GetBackupEngineBase implements the BackupEngineBaseClassification interface for type BackupEngineBase. -func (b *BackupEngineBase) GetBackupEngineBase() *BackupEngineBase { return b } - -// BackupEngineBaseResource - The base backup engine class. All workload specific backup engines derive from this class. -type BackupEngineBaseResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // BackupEngineBaseResource properties - Properties BackupEngineBaseClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupEngineBaseResourceList - List of BackupEngineBase resources -type BackupEngineBaseResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*BackupEngineBaseResource `json:"value,omitempty"` -} - -// BackupEngineExtendedInfo - Additional information on backup engine. -type BackupEngineExtendedInfo struct { - // Disk space currently available in the backup engine. - AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"` - - // Protected instances in the backup engine. - AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"` - - // Database name of backup engine. - DatabaseName *string `json:"databaseName,omitempty"` - - // Number of disks in the backup engine. - DiskCount *int32 `json:"diskCount,omitempty"` - - // Number of protected items in the backup engine. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - - // Number of protected servers in the backup engine. - ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"` - - // Last refresh time in the backup engine. - RefreshedAt *time.Time `json:"refreshedAt,omitempty"` - - // Disk space used in the backup engine. - UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"` -} - -// BackupEnginesClientGetOptions contains the optional parameters for the BackupEnginesClient.Get method. -type BackupEnginesClientGetOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupEnginesClientListOptions contains the optional parameters for the BackupEnginesClient.List method. -type BackupEnginesClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupJobsClientListOptions contains the optional parameters for the BackupJobsClient.List method. -type BackupJobsClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupManagementUsage - Backup management usages of a vault. -type BackupManagementUsage struct { - // Current value of usage. - CurrentValue *int64 `json:"currentValue,omitempty"` - - // Limit of usage. - Limit *int64 `json:"limit,omitempty"` - - // Name of usage. - Name *NameInfo `json:"name,omitempty"` - - // Next reset time of usage. - NextResetTime *time.Time `json:"nextResetTime,omitempty"` - - // Quota period of usage. - QuotaPeriod *string `json:"quotaPeriod,omitempty"` - - // Unit of the usage. - Unit *UsagesUnit `json:"unit,omitempty"` -} - -// BackupManagementUsageList - Backup management usage for vault. -type BackupManagementUsageList struct { - // The list of backup management usages for the given vault. - Value []*BackupManagementUsage `json:"value,omitempty"` -} - -// BackupOperationResultsClientGetOptions contains the optional parameters for the BackupOperationResultsClient.Get method. -type BackupOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupOperationStatusesClientGetOptions contains the optional parameters for the BackupOperationStatusesClient.Get method. -type BackupOperationStatusesClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupPoliciesClientListOptions contains the optional parameters for the BackupPoliciesClient.List method. -type BackupPoliciesClientListOptions struct { - // OData filter options. - Filter *string -} - -// BackupProtectableItemsClientListOptions contains the optional parameters for the BackupProtectableItemsClient.List method. -type BackupProtectableItemsClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupProtectedItemsClientListOptions contains the optional parameters for the BackupProtectedItemsClient.List method. -type BackupProtectedItemsClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupProtectionContainersClientListOptions contains the optional parameters for the BackupProtectionContainersClient.List -// method. -type BackupProtectionContainersClientListOptions struct { - // OData filter options. - Filter *string -} - -// BackupProtectionIntentClientListOptions contains the optional parameters for the BackupProtectionIntentClient.List method. -type BackupProtectionIntentClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupRequestClassification provides polymorphic access to related types. -// Call the interface's GetBackupRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareBackupRequest, *AzureWorkloadBackupRequest, *BackupRequest, *IaasVMBackupRequest -type BackupRequestClassification interface { - // GetBackupRequest returns the BackupRequest content of the underlying type. - GetBackupRequest() *BackupRequest -} - -// BackupRequest - Base class for backup request. Workload-specific backup requests are derived from this class. -type BackupRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` -} - -// GetBackupRequest implements the BackupRequestClassification interface for type BackupRequest. -func (b *BackupRequest) GetBackupRequest() *BackupRequest { return b } - -// BackupRequestResource - Base class for backup request. Workload-specific backup requests are derived from this class. -type BackupRequestResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // BackupRequestResource properties - Properties BackupRequestClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupResourceConfig - The resource storage details. -type BackupResourceConfig struct { - // Opt in details of Cross Region Restore feature. - CrossRegionRestoreFlag *bool `json:"crossRegionRestoreFlag,omitempty"` - - // Vault Dedup state - DedupState *DedupState `json:"dedupState,omitempty"` - - // Storage type - StorageModelType *StorageType `json:"storageModelType,omitempty"` - - // Storage type. - StorageType *StorageType `json:"storageType,omitempty"` - - // Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. - StorageTypeState *StorageTypeState `json:"storageTypeState,omitempty"` - - // Vault x-cool state - XcoolState *XcoolState `json:"xcoolState,omitempty"` -} - -// BackupResourceConfigResource - The resource storage details. -type BackupResourceConfigResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // BackupResourceConfigResource properties - Properties *BackupResourceConfig `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -type BackupResourceEncryptionConfig struct { - // Encryption At Rest Type - EncryptionAtRestType *EncryptionAtRestType `json:"encryptionAtRestType,omitempty"` - InfrastructureEncryptionState *InfrastructureEncryptionState `json:"infrastructureEncryptionState,omitempty"` - - // Key Vault Key URI - KeyURI *string `json:"keyUri,omitempty"` - LastUpdateStatus *LastUpdateStatus `json:"lastUpdateStatus,omitempty"` - - // Key Vault Subscription Id - SubscriptionID *string `json:"subscriptionId,omitempty"` -} - -type BackupResourceEncryptionConfigExtended struct { - // Encryption At Rest Type - EncryptionAtRestType *EncryptionAtRestType `json:"encryptionAtRestType,omitempty"` - InfrastructureEncryptionState *InfrastructureEncryptionState `json:"infrastructureEncryptionState,omitempty"` - - // Key Vault Key URI - KeyURI *string `json:"keyUri,omitempty"` - LastUpdateStatus *LastUpdateStatus `json:"lastUpdateStatus,omitempty"` - - // Key Vault Subscription Id - SubscriptionID *string `json:"subscriptionId,omitempty"` - - // bool to indicate whether to use system Assigned Identity or not - UseSystemAssignedIdentity *bool `json:"useSystemAssignedIdentity,omitempty"` - - // User Assigned Identity Id - UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` -} - -type BackupResourceEncryptionConfigExtendedResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // BackupResourceEncryptionConfigExtendedResource properties - Properties *BackupResourceEncryptionConfigExtended `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -type BackupResourceEncryptionConfigResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // BackupResourceEncryptionConfigResource properties - Properties *BackupResourceEncryptionConfig `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupResourceEncryptionConfigsClientGetOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Get -// method. -type BackupResourceEncryptionConfigsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceEncryptionConfigsClientUpdateOptions contains the optional parameters for the BackupResourceEncryptionConfigsClient.Update -// method. -type BackupResourceEncryptionConfigsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceStorageConfigsNonCRRClientGetOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Get -// method. -type BackupResourceStorageConfigsNonCRRClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceStorageConfigsNonCRRClientPatchOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Patch -// method. -type BackupResourceStorageConfigsNonCRRClientPatchOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceStorageConfigsNonCRRClientUpdateOptions contains the optional parameters for the BackupResourceStorageConfigsNonCRRClient.Update -// method. -type BackupResourceStorageConfigsNonCRRClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceVaultConfig - Backup resource vault config details. -type BackupResourceVaultConfig struct { - // Enabled or Disabled. - EnhancedSecurityState *EnhancedSecurityState `json:"enhancedSecurityState,omitempty"` - - // Is soft delete feature state editable - IsSoftDeleteFeatureStateEditable *bool `json:"isSoftDeleteFeatureStateEditable,omitempty"` - - // ResourceGuard Operation Requests - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Soft Delete feature state - SoftDeleteFeatureState *SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"` - - // Storage type. - StorageModelType *StorageType `json:"storageModelType,omitempty"` - - // Storage type. - StorageType *StorageType `json:"storageType,omitempty"` - - // Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. - StorageTypeState *StorageTypeState `json:"storageTypeState,omitempty"` -} - -// BackupResourceVaultConfigResource - Backup resource vault config details. -type BackupResourceVaultConfigResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // BackupResourceVaultConfigResource properties - Properties *BackupResourceVaultConfig `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// BackupResourceVaultConfigsClientGetOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Get -// method. -type BackupResourceVaultConfigsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceVaultConfigsClientPutOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Put -// method. -type BackupResourceVaultConfigsClientPutOptions struct { - // placeholder for future optional parameters -} - -// BackupResourceVaultConfigsClientUpdateOptions contains the optional parameters for the BackupResourceVaultConfigsClient.Update -// method. -type BackupResourceVaultConfigsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// BackupStatusClientGetOptions contains the optional parameters for the BackupStatusClient.Get method. -type BackupStatusClientGetOptions struct { - // placeholder for future optional parameters -} - -// BackupStatusRequest - BackupStatus request. -type BackupStatusRequest struct { - // Protectable Item Logical Name - PoLogicalName *string `json:"poLogicalName,omitempty"` - - // Entire ARM resource id of the resource - ResourceID *string `json:"resourceId,omitempty"` - - // Container Type - VM, SQLPaaS, DPM, AzureFileShare… - ResourceType *DataSourceType `json:"resourceType,omitempty"` -} - -// BackupStatusResponse - BackupStatus response. -type BackupStatusResponse struct { - // Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. - ContainerName *string `json:"containerName,omitempty"` - - // ErrorCode in case of intent failed - ErrorCode *string `json:"errorCode,omitempty"` - - // ErrorMessage in case of intent failed. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the fabric name - Azure or AD - FabricName *FabricName `json:"fabricName,omitempty"` - - // Specifies the policy name which is used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. - ProtectedItemName *string `json:"protectedItemName,omitempty"` - - // Specifies whether the container is registered or not - ProtectionStatus *ProtectionStatus `json:"protectionStatus,omitempty"` - - // Container registration status - RegistrationStatus *string `json:"registrationStatus,omitempty"` - - // Specifies the arm resource id of the vault - VaultID *string `json:"vaultId,omitempty"` -} - -// BackupUsageSummariesClientListOptions contains the optional parameters for the BackupUsageSummariesClient.List method. -type BackupUsageSummariesClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupWorkloadItemsClientListOptions contains the optional parameters for the BackupWorkloadItemsClient.List method. -type BackupWorkloadItemsClientListOptions struct { - // OData filter options. - Filter *string - // skipToken Filter. - SkipToken *string -} - -// BackupsClientTriggerOptions contains the optional parameters for the BackupsClient.Trigger method. -type BackupsClientTriggerOptions struct { - // placeholder for future optional parameters -} - -// ClientBeginBMSPrepareDataMoveOptions contains the optional parameters for the Client.BeginBMSPrepareDataMove method. -type ClientBeginBMSPrepareDataMoveOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginBMSTriggerDataMoveOptions contains the optional parameters for the Client.BeginBMSTriggerDataMove method. -type ClientBeginBMSTriggerDataMoveOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginMoveRecoveryPointOptions contains the optional parameters for the Client.BeginMoveRecoveryPoint method. -type ClientBeginMoveRecoveryPointOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientDiscoveryDisplay - Localized display information of an operation. -type ClientDiscoveryDisplay struct { - // Description of the operation having details of what operation is about. - Description *string `json:"description,omitempty"` - - // Operations Name itself. - Operation *string `json:"operation,omitempty"` - - // Name of the provider for display purposes - Provider *string `json:"provider,omitempty"` - - // ResourceType for which this Operation can be performed. - Resource *string `json:"resource,omitempty"` -} - -// ClientDiscoveryForLogSpecification - Class to represent shoebox log specification in json client discovery. -type ClientDiscoveryForLogSpecification struct { - // blob duration of shoebox log specification - BlobDuration *string `json:"blobDuration,omitempty"` - - // Localized display name - DisplayName *string `json:"displayName,omitempty"` - - // Name for shoebox log specification. - Name *string `json:"name,omitempty"` -} - -// ClientDiscoveryForProperties - Class to represent shoebox properties in json client discovery. -type ClientDiscoveryForProperties struct { - // Operation properties. - ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// ClientDiscoveryForServiceSpecification - Class to represent shoebox service specification in json client discovery. -type ClientDiscoveryForServiceSpecification struct { - // List of log specifications of this operation. - LogSpecifications []*ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` -} - -// ClientDiscoveryResponse - Operations List response which contains list of available APIs. -type ClientDiscoveryResponse struct { - // Link to the next chunk of Response. - NextLink *string `json:"nextLink,omitempty"` - - // List of available operations. - Value []*ClientDiscoveryValueForSingleAPI `json:"value,omitempty"` -} - -// ClientDiscoveryValueForSingleAPI - Available operation details. -type ClientDiscoveryValueForSingleAPI struct { - // Contains the localized display information for this particular operation - Display *ClientDiscoveryDisplay `json:"display,omitempty"` - - // Name of the Operation. - Name *string `json:"name,omitempty"` - - // The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX - Origin *string `json:"origin,omitempty"` - - // ShoeBox properties for the given operation. - Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` -} - -// ClientGetOperationStatusOptions contains the optional parameters for the Client.GetOperationStatus method. -type ClientGetOperationStatusOptions struct { - // placeholder for future optional parameters -} - -// ClientScriptForConnect - Client script details for file / folder restore. -type ClientScriptForConnect struct { - // OS type - Windows, Linux etc. for which this file / folder restore client script works. - OSType *string `json:"osType,omitempty"` - - // File content of the client script for file / folder restore. - ScriptContent *string `json:"scriptContent,omitempty"` - - // File extension of the client script for file / folder restore - .ps1 , .sh , etc. - ScriptExtension *string `json:"scriptExtension,omitempty"` - - // Mandatory suffix that should be added to the name of script that is given for download to user. If its null or empty then - // , ignore it. - ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"` - - // URL of Executable from where to source the content. If this is not null then ScriptContent should not be used - URL *string `json:"url,omitempty"` -} - -// CloudError - An error response from the Container Instance service. -type CloudError struct { - // The error object. - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorBody - An error response from the Container Instance service. -type CloudErrorBody struct { - // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` - - // READ-ONLY; An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; A list of additional details about the error. - Details []*CloudErrorBody `json:"details,omitempty" azure:"ro"` - - // READ-ONLY; A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty" azure:"ro"` -} - -// ContainerIdentityInfo - Container identity information -type ContainerIdentityInfo struct { - // Protection container identity - AAD Tenant - AADTenantID *string `json:"aadTenantId,omitempty"` - - // Protection container identity - Audience - Audience *string `json:"audience,omitempty"` - - // Protection container identity - AAD Service Principal - ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"` - - // Unique name of the container - UniqueName *string `json:"uniqueName,omitempty"` -} - -// DPMContainerExtendedInfo - Additional information of the DPMContainer. -type DPMContainerExtendedInfo struct { - // Last refresh time of the DPMContainer. - LastRefreshedAt *time.Time `json:"lastRefreshedAt,omitempty"` -} - -// DPMProtectedItem - Additional information on Backup engine specific backup item. -type DPMProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Backup Management server protecting this backup item - BackupEngineName *string `json:"backupEngineName,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Extended info of the backup item. - ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the managed item - FriendlyName *string `json:"friendlyName,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Protection state of the backup engine - ProtectionState *ProtectedItemState `json:"protectionState,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type DPMProtectedItem. -func (d *DPMProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: d.ProtectedItemType, - BackupManagementType: d.BackupManagementType, - WorkloadType: d.WorkloadType, - ContainerName: d.ContainerName, - SourceResourceID: d.SourceResourceID, - PolicyID: d.PolicyID, - LastRecoveryPoint: d.LastRecoveryPoint, - BackupSetName: d.BackupSetName, - CreateMode: d.CreateMode, - DeferredDeleteTimeInUTC: d.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: d.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: d.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: d.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: d.IsRehydrate, - ResourceGuardOperationRequests: d.ResourceGuardOperationRequests, - IsArchiveEnabled: d.IsArchiveEnabled, - PolicyName: d.PolicyName, - } -} - -// DPMProtectedItemExtendedInfo - Additional information of DPM Protected item. -type DPMProtectedItemExtendedInfo struct { - // Used Disk storage in bytes. - DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"` - - // To check if backup item is collocated. - IsCollocated *bool `json:"isCollocated,omitempty"` - - // To check if backup item is cloud protected. - IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"` - - // Last backup status information on backup item. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - - // Last refresh time on backup item. - LastRefreshedAt *time.Time `json:"lastRefreshedAt,omitempty"` - - // Oldest cloud recovery point time. - OldestRecoveryPoint *time.Time `json:"oldestRecoveryPoint,omitempty"` - - // latest disk recovery point time. - OnPremiseLatestRecoveryPoint *time.Time `json:"onPremiseLatestRecoveryPoint,omitempty"` - - // Oldest disk recovery point time. - OnPremiseOldestRecoveryPoint *time.Time `json:"onPremiseOldestRecoveryPoint,omitempty"` - - // disk recovery point count. - OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"` - - // Attribute to provide information on various DBs. - ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath,omitempty"` - - // To check if backup item is disk protected. - Protected *bool `json:"protected,omitempty"` - - // Protection group name of the backup item. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - - // cloud recovery point count. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` - - // total Disk storage in bytes. - TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"` -} - -// DailyRetentionFormat - Daily retention format. -type DailyRetentionFormat struct { - // List of days of the month. - DaysOfTheMonth []*Day `json:"daysOfTheMonth,omitempty"` -} - -// DailyRetentionSchedule - Daily retention schedule. -type DailyRetentionSchedule struct { - // Retention duration of retention Policy. - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` - - // Retention times of retention policy. - RetentionTimes []*time.Time `json:"retentionTimes,omitempty"` -} - -type DailySchedule struct { - // List of times of day this schedule has to be run. - ScheduleRunTimes []*time.Time `json:"scheduleRunTimes,omitempty"` -} - -// Day of the week. -type Day struct { - // Date of the month - Date *int32 `json:"date,omitempty"` - - // Whether Date is last date of month - IsLast *bool `json:"isLast,omitempty"` -} - -type DiskExclusionProperties struct { - // List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. - DiskLunList []*int32 `json:"diskLunList,omitempty"` - - // Flag to indicate whether DiskLunList is to be included/ excluded from backup. - IsInclusionList *bool `json:"isInclusionList,omitempty"` -} - -// DiskInformation - Disk information -type DiskInformation struct { - Lun *int32 `json:"lun,omitempty"` - Name *string `json:"name,omitempty"` -} - -// DistributedNodesInfo - This is used to represent the various nodes of the distributed container. -type DistributedNodesInfo struct { - // Error Details if the Status is non-success. - ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` - - // Name of the node under a distributed container. - NodeName *string `json:"nodeName,omitempty"` - - // Status of this Node. Failed | Succeeded - Status *string `json:"status,omitempty"` -} - -// DpmBackupEngine - Data Protection Manager (DPM) specific backup engine. -type DpmBackupEngine struct { - // REQUIRED; Type of the backup engine. - BackupEngineType *BackupEngineType `json:"backupEngineType,omitempty"` - - // Backup agent version - AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` - - // ID of the backup engine. - BackupEngineID *string `json:"backupEngineId,omitempty"` - - // Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} - BackupEngineState *string `json:"backupEngineState,omitempty"` - - // Type of backup management for the backup engine. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Flag indicating if the backup engine be registered, once already registered. - CanReRegister *bool `json:"canReRegister,omitempty"` - - // Backup engine version - DpmVersion *string `json:"dpmVersion,omitempty"` - - // Extended info of the backupengine - ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the backup engine. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Backup status of the backup engine. - HealthStatus *string `json:"healthStatus,omitempty"` - - // To check if backup agent upgrade available - IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` - - // To check if backup engine upgrade available - IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` - - // Registration status of the backup engine with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` -} - -// GetBackupEngineBase implements the BackupEngineBaseClassification interface for type DpmBackupEngine. -func (d *DpmBackupEngine) GetBackupEngineBase() *BackupEngineBase { - return &BackupEngineBase{ - FriendlyName: d.FriendlyName, - BackupManagementType: d.BackupManagementType, - RegistrationStatus: d.RegistrationStatus, - BackupEngineState: d.BackupEngineState, - HealthStatus: d.HealthStatus, - BackupEngineType: d.BackupEngineType, - CanReRegister: d.CanReRegister, - BackupEngineID: d.BackupEngineID, - DpmVersion: d.DpmVersion, - AzureBackupAgentVersion: d.AzureBackupAgentVersion, - IsAzureBackupAgentUpgradeAvailable: d.IsAzureBackupAgentUpgradeAvailable, - IsDpmUpgradeAvailable: d.IsDpmUpgradeAvailable, - ExtendedInfo: d.ExtendedInfo, - } -} - -// DpmContainerClassification provides polymorphic access to related types. -// Call the interface's GetDpmContainer() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupServerContainer, *DpmContainer -type DpmContainerClassification interface { - ProtectionContainerClassification - // GetDpmContainer returns the DpmContainer content of the underlying type. - GetDpmContainer() *DpmContainer -} - -// DpmContainer - DPM workload-specific protection container. -type DpmContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Specifies whether the container is re-registrable. - CanReRegister *bool `json:"canReRegister,omitempty"` - - // ID of container. - ContainerID *string `json:"containerId,omitempty"` - - // Backup engine Agent version - DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` - - // List of BackupEngines protecting the container - DpmServers []*string `json:"dpmServers,omitempty"` - - // Extended Info of the container. - ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Number of protected items in the BackupEngine - ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` - - // Protection status of the container. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - - // To check if upgrade available - UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` -} - -// GetDpmContainer implements the DpmContainerClassification interface for type DpmContainer. -func (d *DpmContainer) GetDpmContainer() *DpmContainer { return d } - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type DpmContainer. -func (d *DpmContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: d.FriendlyName, - BackupManagementType: d.BackupManagementType, - RegistrationStatus: d.RegistrationStatus, - HealthStatus: d.HealthStatus, - ContainerType: d.ContainerType, - ProtectableObjectType: d.ProtectableObjectType, - } -} - -// DpmErrorInfo - DPM workload-specific error information. -type DpmErrorInfo struct { - // Localized error string. - ErrorString *string `json:"errorString,omitempty"` - - // List of localized recommendations for above error code. - Recommendations []*string `json:"recommendations,omitempty"` -} - -// DpmJob - DPM workload-specific job object. -type DpmJob struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - JobType *string `json:"jobType,omitempty"` - - // The state/actions applicable on this job like cancel/retry. - ActionsInfo []*JobSupportedAction `json:"actionsInfo,omitempty"` - - // ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - - // Backup management type to execute the current job. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of cluster/server protecting current backup item, if any. - ContainerName *string `json:"containerName,omitempty"` - - // Type of container. - ContainerType *string `json:"containerType,omitempty"` - - // DPM server name managing the backup item or backup job. - DpmServerName *string `json:"dpmServerName,omitempty"` - - // Time elapsed for job. - Duration *string `json:"duration,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - - // The errors. - ErrorDetails []*DpmErrorInfo `json:"errorDetails,omitempty"` - - // Additional information for this job. - ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"` - - // The operation name. - Operation *string `json:"operation,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // Job status. - Status *string `json:"status,omitempty"` - - // Type of backup item. - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetJob implements the JobClassification interface for type DpmJob. -func (d *DpmJob) GetJob() *Job { - return &Job{ - EntityFriendlyName: d.EntityFriendlyName, - BackupManagementType: d.BackupManagementType, - Operation: d.Operation, - Status: d.Status, - StartTime: d.StartTime, - EndTime: d.EndTime, - ActivityID: d.ActivityID, - JobType: d.JobType, - } -} - -// DpmJobExtendedInfo - Additional information on the DPM workload-specific job. -type DpmJobExtendedInfo struct { - // Non localized error message on job execution. - DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` - - // The job properties. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // List of tasks associated with this job. - TasksList []*DpmJobTaskDetails `json:"tasksList,omitempty"` -} - -// DpmJobTaskDetails - DPM workload-specific job task details. -type DpmJobTaskDetails struct { - // Time elapsed for task. - Duration *string `json:"duration,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // The status. - Status *string `json:"status,omitempty"` - - // The task display name. - TaskID *string `json:"taskId,omitempty"` -} - -// EncryptionDetails - Details needed if the VM was encrypted at the time of backup. -type EncryptionDetails struct { - // Identifies whether this backup copy represents an encrypted VM at the time of backup. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - - // Key Url. - KekURL *string `json:"kekUrl,omitempty"` - - // ID of Key Vault where KEK is stored. - KekVaultID *string `json:"kekVaultId,omitempty"` - - // Secret Url. - SecretKeyURL *string `json:"secretKeyUrl,omitempty"` - - // ID of Key Vault where Secret is stored. - SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"` -} - -// ErrorAdditionalInfo - The resource management error additional info. -type ErrorAdditionalInfo struct { - // READ-ONLY; The additional info. - Info interface{} `json:"info,omitempty" azure:"ro"` - - // READ-ONLY; The additional info type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ErrorDetail - Error Detail class which encapsulates Code, Message and Recommendations. -type ErrorDetail struct { - // READ-ONLY; Error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; Error Message related to the Code. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; List of recommendation strings. - Recommendations []*string `json:"recommendations,omitempty" azure:"ro"` -} - -// ExportJobsOperationResultInfo - This class is used to send blob details after exporting jobs. -type ExportJobsOperationResultInfo struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // SAS key to access the blob. It expires in 15 mins. - BlobSasKey *string `json:"blobSasKey,omitempty"` - - // URL of the blob into which the serialized string of list of jobs is exported. - BlobURL *string `json:"blobUrl,omitempty"` - - // SAS key to access the blob. It expires in 15 mins. - ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"` - - // URL of the blob into which the ExcelFile is uploaded. - ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"` -} - -// GetOperationResultInfoBase implements the OperationResultInfoBaseClassification interface for type ExportJobsOperationResultInfo. -func (e *ExportJobsOperationResultInfo) GetOperationResultInfoBase() *OperationResultInfoBase { - return &OperationResultInfoBase{ - ObjectType: e.ObjectType, - } -} - -// ExportJobsOperationResultsClientGetOptions contains the optional parameters for the ExportJobsOperationResultsClient.Get -// method. -type ExportJobsOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExtendedProperties - Extended Properties for Azure IaasVM Backup. -type ExtendedProperties struct { - // Extended Properties for Disk Exclusion. - DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"` - - // Linux VM name - LinuxVMApplicationName *string `json:"linuxVmApplicationName,omitempty"` -} - -// FeatureSupportClientValidateOptions contains the optional parameters for the FeatureSupportClient.Validate method. -type FeatureSupportClientValidateOptions struct { - // placeholder for future optional parameters -} - -// FeatureSupportRequestClassification provides polymorphic access to related types. -// Call the interface's GetFeatureSupportRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupGoalFeatureSupportRequest, *AzureVMResourceFeatureSupportRequest, *FeatureSupportRequest -type FeatureSupportRequestClassification interface { - // GetFeatureSupportRequest returns the FeatureSupportRequest content of the underlying type. - GetFeatureSupportRequest() *FeatureSupportRequest -} - -// FeatureSupportRequest - Base class for feature request -type FeatureSupportRequest struct { - // REQUIRED; backup support feature type. - FeatureType *string `json:"featureType,omitempty"` -} - -// GetFeatureSupportRequest implements the FeatureSupportRequestClassification interface for type FeatureSupportRequest. -func (f *FeatureSupportRequest) GetFeatureSupportRequest() *FeatureSupportRequest { return f } - -// GenericContainer - Base class for generic container of backup items -type GenericContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Extended information (not returned in List container API calls) - ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"` - - // Name of the container's fabric - FabricName *string `json:"fabricName,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` -} - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type GenericContainer. -func (g *GenericContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: g.FriendlyName, - BackupManagementType: g.BackupManagementType, - RegistrationStatus: g.RegistrationStatus, - HealthStatus: g.HealthStatus, - ContainerType: g.ContainerType, - ProtectableObjectType: g.ProtectableObjectType, - } -} - -// GenericContainerExtendedInfo - Container extended information -type GenericContainerExtendedInfo struct { - // Container identity information - ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"` - - // Public key of container cert - RawCertData *string `json:"rawCertData,omitempty"` - - // Azure Backup Service Endpoints for the container - ServiceEndpoints map[string]*string `json:"serviceEndpoints,omitempty"` -} - -// GenericProtectedItem - Base class for backup items. -type GenericProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Name of this backup item's fabric. - FabricName *string `json:"fabricName,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Indicates consistency of policy object and policy applied to this backup item. - PolicyState *string `json:"policyState,omitempty"` - - // Data Plane Service ID of the protected item. - ProtectedItemID *int64 `json:"protectedItemId,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionState `json:"protectionState,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Loosely coupled (type, value) associations (example - parent of a protected item) - SourceAssociations map[string]*string `json:"sourceAssociations,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type GenericProtectedItem. -func (g *GenericProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: g.ProtectedItemType, - BackupManagementType: g.BackupManagementType, - WorkloadType: g.WorkloadType, - ContainerName: g.ContainerName, - SourceResourceID: g.SourceResourceID, - PolicyID: g.PolicyID, - LastRecoveryPoint: g.LastRecoveryPoint, - BackupSetName: g.BackupSetName, - CreateMode: g.CreateMode, - DeferredDeleteTimeInUTC: g.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: g.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: g.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: g.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: g.IsRehydrate, - ResourceGuardOperationRequests: g.ResourceGuardOperationRequests, - IsArchiveEnabled: g.IsArchiveEnabled, - PolicyName: g.PolicyName, - } -} - -// GenericProtectionPolicy - Azure VM (Mercury) workload-specific backup policy. -type GenericProtectionPolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Name of this policy's fabric. - FabricName *string `json:"fabricName,omitempty"` - - // Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - - // ResourceGuard Operation Requests - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // List of sub-protection policies which includes schedule and retention - SubProtectionPolicy []*SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` - - // TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - TimeZone *string `json:"timeZone,omitempty"` -} - -// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type GenericProtectionPolicy. -func (g *GenericProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { - return &ProtectionPolicy{ - ProtectedItemsCount: g.ProtectedItemsCount, - BackupManagementType: g.BackupManagementType, - ResourceGuardOperationRequests: g.ResourceGuardOperationRequests, - } -} - -// GenericRecoveryPoint - Generic backup copy. -type GenericRecoveryPoint struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Friendly name of the backup copy. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Additional information associated with this backup copy. - RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` - - // Time at which this backup copy was created. - RecoveryPointTime *time.Time `json:"recoveryPointTime,omitempty"` - - // Type of the backup copy. - RecoveryPointType *string `json:"recoveryPointType,omitempty"` -} - -// GetRecoveryPoint implements the RecoveryPointClassification interface for type GenericRecoveryPoint. -func (g *GenericRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { - return &RecoveryPoint{ - ObjectType: g.ObjectType, - } -} - -// GetProtectedItemQueryObject - Filters to list backup items. -type GetProtectedItemQueryObject struct { - // Specifies if the additional information should be provided for this item. - Expand *string `json:"expand,omitempty"` -} - -type HourlySchedule struct { - // Interval at which backup needs to be triggered. For hourly the value can be 4/6/8/12 - Interval *int32 `json:"interval,omitempty"` - - // To specify duration of the backup window - ScheduleWindowDuration *int32 `json:"scheduleWindowDuration,omitempty"` - - // To specify start time of the backup window - ScheduleWindowStartTime *time.Time `json:"scheduleWindowStartTime,omitempty"` -} - -// ILRRequestClassification provides polymorphic access to related types. -// Call the interface's GetILRRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareProvisionILRRequest, *ILRRequest, *IaasVMILRRegistrationRequest -type ILRRequestClassification interface { - // GetILRRequest returns the ILRRequest content of the underlying type. - GetILRRequest() *ILRRequest -} - -// ILRRequest - Parameters to Provision ILR API. -type ILRRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` -} - -// GetILRRequest implements the ILRRequestClassification interface for type ILRRequest. -func (i *ILRRequest) GetILRRequest() *ILRRequest { return i } - -// ILRRequestResource - Parameters to Provision ILR API. -type ILRRequestResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // ILRRequestResource properties - Properties ILRRequestClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// IaaSVMContainerClassification provides polymorphic access to related types. -// Call the interface's GetIaaSVMContainer() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureIaaSClassicComputeVMContainer, *AzureIaaSComputeVMContainer, *IaaSVMContainer -type IaaSVMContainerClassification interface { - ProtectionContainerClassification - // GetIaaSVMContainer returns the IaaSVMContainer content of the underlying type. - GetIaaSVMContainer() *IaaSVMContainer -} - -// IaaSVMContainer - IaaS VM workload-specific container. -type IaaSVMContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - - // Resource group name of Recovery Services Vault. - ResourceGroup *string `json:"resourceGroup,omitempty"` - - // Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - - // Specifies whether the container represents a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` -} - -// GetIaaSVMContainer implements the IaaSVMContainerClassification interface for type IaaSVMContainer. -func (i *IaaSVMContainer) GetIaaSVMContainer() *IaaSVMContainer { return i } - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type IaaSVMContainer. -func (i *IaaSVMContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: i.FriendlyName, - BackupManagementType: i.BackupManagementType, - RegistrationStatus: i.RegistrationStatus, - HealthStatus: i.HealthStatus, - ContainerType: i.ContainerType, - ProtectableObjectType: i.ProtectableObjectType, - } -} - -// IaaSVMProtectableItemClassification provides polymorphic access to related types. -// Call the interface's GetIaaSVMProtectableItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureIaaSClassicComputeVMProtectableItem, *AzureIaaSComputeVMProtectableItem, *IaaSVMProtectableItem -type IaaSVMProtectableItemClassification interface { - WorkloadProtectableItemClassification - // GetIaaSVMProtectableItem returns the IaaSVMProtectableItem content of the underlying type. - GetIaaSVMProtectableItem() *IaaSVMProtectableItem -} - -// IaaSVMProtectableItem - IaaS VM workload-specific backup item. -type IaaSVMProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Resource group name of Recovery Services Vault. - ResourceGroup *string `json:"resourceGroup,omitempty"` - - // Fully qualified ARM ID of the virtual machine. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - - // Specifies whether the container represents a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetIaaSVMProtectableItem implements the IaaSVMProtectableItemClassification interface for type IaaSVMProtectableItem. -func (i *IaaSVMProtectableItem) GetIaaSVMProtectableItem() *IaaSVMProtectableItem { return i } - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type IaaSVMProtectableItem. -func (i *IaaSVMProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { - return &WorkloadProtectableItem{ - BackupManagementType: i.BackupManagementType, - WorkloadType: i.WorkloadType, - ProtectableItemType: i.ProtectableItemType, - FriendlyName: i.FriendlyName, - ProtectionState: i.ProtectionState, - } -} - -// IaasVMBackupRequest - IaaS VM workload-specific backup request. -type IaasVMBackupRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Backup copy will expire after the time specified (UTC). - RecoveryPointExpiryTimeInUTC *time.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` -} - -// GetBackupRequest implements the BackupRequestClassification interface for type IaasVMBackupRequest. -func (i *IaasVMBackupRequest) GetBackupRequest() *BackupRequest { - return &BackupRequest{ - ObjectType: i.ObjectType, - } -} - -// IaasVMILRRegistrationRequest - Restore files/folders from a backup copy of IaaS VM. -type IaasVMILRRegistrationRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // iSCSI initiator name. - InitiatorName *string `json:"initiatorName,omitempty"` - - // ID of the IaaS VM backup copy from where the files/folders have to be restored. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // Whether to renew existing registration with the iSCSI server. - RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"` - - // Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` -} - -// GetILRRequest implements the ILRRequestClassification interface for type IaasVMILRRegistrationRequest. -func (i *IaasVMILRRegistrationRequest) GetILRRequest() *ILRRequest { - return &ILRRequest{ - ObjectType: i.ObjectType, - } -} - -// IaasVMRecoveryPoint - IaaS VM workload specific backup copy. -type IaasVMRecoveryPoint struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Is the session to recover items from this backup copy still active. - IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"` - - // Whether VM is with Managed Disks - IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"` - - // Identifies whether the VM was encrypted when the backup copy is created. - IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"` - - // Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. - KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"` - - // OS type - OSType *string `json:"osType,omitempty"` - - // Original Storage Account Option - OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` - - // Additional information associated with this backup copy. - RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` - - // Disk configuration - RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"` - - // Eligibility of RP to be moved to another tier - RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo,omitempty"` - - // Recovery point tier information. - RecoveryPointTierDetails []*RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"` - - // Time at which this backup copy was created. - RecoveryPointTime *time.Time `json:"recoveryPointTime,omitempty"` - - // Type of the backup copy. - RecoveryPointType *string `json:"recoveryPointType,omitempty"` - - // Storage type of the VM whose backup copy is created. - SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"` - - // Virtual Machine Size - VirtualMachineSize *string `json:"virtualMachineSize,omitempty"` - - // Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms - Zones []*string `json:"zones,omitempty"` -} - -// GetRecoveryPoint implements the RecoveryPointClassification interface for type IaasVMRecoveryPoint. -func (i *IaasVMRecoveryPoint) GetRecoveryPoint() *RecoveryPoint { - return &RecoveryPoint{ - ObjectType: i.ObjectType, - } -} - -// IaasVMRestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetIaasVMRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *IaasVMRestoreRequest, *IaasVMRestoreWithRehydrationRequest -type IaasVMRestoreRequestClassification interface { - RestoreRequestClassification - // GetIaasVMRestoreRequest returns the IaasVMRestoreRequest content of the underlying type. - GetIaasVMRestoreRequest() *IaasVMRestoreRequest -} - -// IaasVMRestoreRequest - IaaS VM workload-specific restore. -type IaasVMRestoreRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. - AffinityGroup *string `json:"affinityGroup,omitempty"` - - // Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same cloud service - // as it was at the time of backup. - CreateNewCloudService *bool `json:"createNewCloudService,omitempty"` - - // DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - - // Details needed if the VM was encrypted at the time of backup. - EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` - - // IaaS VM workload specific restore details for restores using managed identity. - IdentityBasedRestoreDetails *IdentityBasedRestoreDetails `json:"identityBasedRestoreDetails,omitempty"` - - // Managed Identity information required to access customer storage account. - IdentityInfo *IdentityInfo `json:"identityInfo,omitempty"` - - // Original Storage Account Option - OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` - - // ID of the backup copy to be recovered. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Region in which the virtual machine is restored. - Region *string `json:"region,omitempty"` - - // List of Disk LUNs for partial restore - RestoreDiskLunList []*int32 `json:"restoreDiskLunList,omitempty"` - - // Flag to denote of an Unmanaged disk VM should be restored with Managed disks. - RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"` - - // Fully qualified ARM ID of the VM which is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Fully qualified ARM ID of the storage account to which the VM has to be restored. - StorageAccountID *string `json:"storageAccountId,omitempty"` - - // Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be {VnetID}/Subnet/{SubnetName} - // and, for the Azure Resource Manager VMs it would be ARM resource ID used to - // represent the subnet. - SubnetID *string `json:"subnetId,omitempty"` - - // Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic Virtual - // Machines. - TargetDomainNameID *string `json:"targetDomainNameId,omitempty"` - - // This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. For e.g. - // /subscriptions/{subId}/resourcegroups/{rg} - TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` - - // This is the complete ARM Id of the VM that will be created. For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` - - // This is the virtual network Id of the vnet that will be attached to the virtual machine. User will be validated for join - // action permissions in the linked access. - VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` - - // Target zone where the VM and its disks should be restored. - Zones []*string `json:"zones,omitempty"` -} - -// GetIaasVMRestoreRequest implements the IaasVMRestoreRequestClassification interface for type IaasVMRestoreRequest. -func (i *IaasVMRestoreRequest) GetIaasVMRestoreRequest() *IaasVMRestoreRequest { return i } - -// GetRestoreRequest implements the RestoreRequestClassification interface for type IaasVMRestoreRequest. -func (i *IaasVMRestoreRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: i.ObjectType, - } -} - -// IaasVMRestoreWithRehydrationRequest - IaaS VM workload-specific restore with integrated rehydration of recovery point. -type IaasVMRestoreWithRehydrationRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. - AffinityGroup *string `json:"affinityGroup,omitempty"` - - // Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same cloud service - // as it was at the time of backup. - CreateNewCloudService *bool `json:"createNewCloudService,omitempty"` - - // DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - - // Details needed if the VM was encrypted at the time of backup. - EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` - - // IaaS VM workload specific restore details for restores using managed identity. - IdentityBasedRestoreDetails *IdentityBasedRestoreDetails `json:"identityBasedRestoreDetails,omitempty"` - - // Managed Identity information required to access customer storage account. - IdentityInfo *IdentityInfo `json:"identityInfo,omitempty"` - - // Original Storage Account Option - OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` - - // ID of the backup copy to be recovered. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // RP Rehydration Info - RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"` - - // Type of this recovery. - RecoveryType *RecoveryType `json:"recoveryType,omitempty"` - - // Region in which the virtual machine is restored. - Region *string `json:"region,omitempty"` - - // List of Disk LUNs for partial restore - RestoreDiskLunList []*int32 `json:"restoreDiskLunList,omitempty"` - - // Flag to denote of an Unmanaged disk VM should be restored with Managed disks. - RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"` - - // Fully qualified ARM ID of the VM which is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Fully qualified ARM ID of the storage account to which the VM has to be restored. - StorageAccountID *string `json:"storageAccountId,omitempty"` - - // Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be {VnetID}/Subnet/{SubnetName} - // and, for the Azure Resource Manager VMs it would be ARM resource ID used to - // represent the subnet. - SubnetID *string `json:"subnetId,omitempty"` - - // Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic Virtual - // Machines. - TargetDomainNameID *string `json:"targetDomainNameId,omitempty"` - - // This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. For e.g. - // /subscriptions/{subId}/resourcegroups/{rg} - TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` - - // This is the complete ARM Id of the VM that will be created. For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` - - // This is the virtual network Id of the vnet that will be attached to the virtual machine. User will be validated for join - // action permissions in the linked access. - VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` - - // Target zone where the VM and its disks should be restored. - Zones []*string `json:"zones,omitempty"` -} - -// GetIaasVMRestoreRequest implements the IaasVMRestoreRequestClassification interface for type IaasVMRestoreWithRehydrationRequest. -func (i *IaasVMRestoreWithRehydrationRequest) GetIaasVMRestoreRequest() *IaasVMRestoreRequest { - return &IaasVMRestoreRequest{ - RecoveryPointID: i.RecoveryPointID, - RecoveryType: i.RecoveryType, - SourceResourceID: i.SourceResourceID, - TargetVirtualMachineID: i.TargetVirtualMachineID, - TargetResourceGroupID: i.TargetResourceGroupID, - StorageAccountID: i.StorageAccountID, - VirtualNetworkID: i.VirtualNetworkID, - SubnetID: i.SubnetID, - TargetDomainNameID: i.TargetDomainNameID, - Region: i.Region, - AffinityGroup: i.AffinityGroup, - CreateNewCloudService: i.CreateNewCloudService, - OriginalStorageAccountOption: i.OriginalStorageAccountOption, - EncryptionDetails: i.EncryptionDetails, - RestoreDiskLunList: i.RestoreDiskLunList, - RestoreWithManagedDisks: i.RestoreWithManagedDisks, - DiskEncryptionSetID: i.DiskEncryptionSetID, - Zones: i.Zones, - IdentityInfo: i.IdentityInfo, - IdentityBasedRestoreDetails: i.IdentityBasedRestoreDetails, - ObjectType: i.ObjectType, - } -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type IaasVMRestoreWithRehydrationRequest. -func (i *IaasVMRestoreWithRehydrationRequest) GetRestoreRequest() *RestoreRequest { - return &RestoreRequest{ - ObjectType: i.ObjectType, - } -} - -// IdentityBasedRestoreDetails - IaaS VM workload specific restore details for restores using managed identity -type IdentityBasedRestoreDetails struct { - // Gets the class type. - ObjectType *string `json:"objectType,omitempty"` - - // Fully qualified ARM ID of the target storage account. - TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"` -} - -// IdentityInfo - Encapsulates Managed Identity related information -type IdentityInfo struct { - // To differentiate if the managed identity is system assigned or user assigned - IsSystemAssignedIdentity *bool `json:"isSystemAssignedIdentity,omitempty"` - - // Managed Identity Resource Id Optional: Might not be required in the case of system assigned managed identity - ManagedIdentityResourceID *string `json:"managedIdentityResourceId,omitempty"` -} - -// InquiryInfo - Details about inquired protectable items under a given container. -type InquiryInfo struct { - // Error Details if the Status is non-success. - ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` - - // Inquiry Details which will have workload specific details. For e.g. - For SQL and oracle this will contain different details. - InquiryDetails []*WorkloadInquiryDetails `json:"inquiryDetails,omitempty"` - - // Inquiry Status for this container such as InProgress | Failed | Succeeded - Status *string `json:"status,omitempty"` -} - -// InquiryValidation - Validation for inquired protectable items under a given container. -type InquiryValidation struct { - // Error Detail in case the status is non-success. - ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` - - // Status for the Inquiry Validation. - Status *string `json:"status,omitempty"` - - // READ-ONLY; Error Additional Detail in case the status is non-success. - AdditionalDetail *string `json:"additionalDetail,omitempty" azure:"ro"` -} - -// InstantItemRecoveryTarget - Target details for file / folder restore. -type InstantItemRecoveryTarget struct { - // List of client scripts. - ClientScripts []*ClientScriptForConnect `json:"clientScripts,omitempty"` -} - -type InstantRPAdditionalDetails struct { - AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"` - AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"` -} - -// ItemLevelRecoveryConnectionsClientProvisionOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Provision -// method. -type ItemLevelRecoveryConnectionsClientProvisionOptions struct { - // placeholder for future optional parameters -} - -// ItemLevelRecoveryConnectionsClientRevokeOptions contains the optional parameters for the ItemLevelRecoveryConnectionsClient.Revoke -// method. -type ItemLevelRecoveryConnectionsClientRevokeOptions struct { - // placeholder for future optional parameters -} - -// JobClassification provides polymorphic access to related types. -// Call the interface's GetJob() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureIaaSVMJob, *AzureIaaSVMJobV2, *AzureStorageJob, *AzureWorkloadJob, *DpmJob, *Job, *MabJob, *VaultJob -type JobClassification interface { - // GetJob returns the Job content of the underlying type. - GetJob() *Job -} - -// Job - Defines workload agnostic properties for a job. -type Job struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - JobType *string `json:"jobType,omitempty"` - - // ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - - // Backup management type to execute the current job. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - - // The operation name. - Operation *string `json:"operation,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // Job status. - Status *string `json:"status,omitempty"` -} - -// GetJob implements the JobClassification interface for type Job. -func (j *Job) GetJob() *Job { return j } - -// JobCancellationsClientTriggerOptions contains the optional parameters for the JobCancellationsClient.Trigger method. -type JobCancellationsClientTriggerOptions struct { - // placeholder for future optional parameters -} - -// JobDetailsClientGetOptions contains the optional parameters for the JobDetailsClient.Get method. -type JobDetailsClientGetOptions struct { - // placeholder for future optional parameters -} - -// JobOperationResultsClientGetOptions contains the optional parameters for the JobOperationResultsClient.Get method. -type JobOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// JobQueryObject - Filters to list the jobs. -type JobQueryObject struct { - // Type of backup management for the job. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Job has ended at this time. Value is in UTC. - EndTime *time.Time `json:"endTime,omitempty"` - - // JobID represents the job uniquely. - JobID *string `json:"jobId,omitempty"` - - // Type of operation. - Operation *JobOperationType `json:"operation,omitempty"` - - // Job has started at this time. Value is in UTC. - StartTime *time.Time `json:"startTime,omitempty"` - - // Status of the job. - Status *JobStatus `json:"status,omitempty"` -} - -// JobResource - Defines workload agnostic properties for a job. -type JobResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // JobResource properties - Properties JobClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// JobResourceList - List of Job resources -type JobResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*JobResource `json:"value,omitempty"` -} - -// JobsClientExportOptions contains the optional parameters for the JobsClient.Export method. -type JobsClientExportOptions struct { - // OData filter options. - Filter *string -} - -// KEKDetails - KEK is encryption key for BEK. -type KEKDetails struct { - // KEK data. - KeyBackupData *string `json:"keyBackupData,omitempty"` - - // Key is KEK. - KeyURL *string `json:"keyUrl,omitempty"` - - // Key Vault ID where this Key is stored. - KeyVaultID *string `json:"keyVaultId,omitempty"` -} - -// KPIResourceHealthDetails - KPI Resource Health Details -type KPIResourceHealthDetails struct { - // Resource Health Status - ResourceHealthDetails []*ResourceHealthDetails `json:"resourceHealthDetails,omitempty"` - - // Resource Health Status - ResourceHealthStatus *ResourceHealthStatus `json:"resourceHealthStatus,omitempty"` -} - -// KeyAndSecretDetails - BEK is bitlocker key. KEK is encryption key for BEK If the VM was encrypted then we will store following -// details : -// 1. Secret(BEK) - Url + Backup Data + vaultId. -// 2. Key(KEK) - Url + Backup Data + vaultId. -// 3. EncryptionMechanism BEK and KEK can potentially have different vault ids. -type KeyAndSecretDetails struct { - // BEK is bitlocker encryption key. - BekDetails *BEKDetails `json:"bekDetails,omitempty"` - - // Encryption mechanism: None/ SinglePass/ DoublePass - EncryptionMechanism *string `json:"encryptionMechanism,omitempty"` - - // KEK is encryption key for BEK. - KekDetails *KEKDetails `json:"kekDetails,omitempty"` -} - -// ListRecoveryPointsRecommendedForMoveRequest Request -type ListRecoveryPointsRecommendedForMoveRequest struct { - // List of Recovery Points excluded from Move - ExcludedRPList []*string `json:"excludedRPList,omitempty"` - - // Gets the class type. - ObjectType *string `json:"objectType,omitempty"` -} - -// LogSchedulePolicy - Log policy schedule. -type LogSchedulePolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - SchedulePolicyType *string `json:"schedulePolicyType,omitempty"` - - // Frequency of the log schedule operation of this policy in minutes. - ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"` -} - -// GetSchedulePolicy implements the SchedulePolicyClassification interface for type LogSchedulePolicy. -func (l *LogSchedulePolicy) GetSchedulePolicy() *SchedulePolicy { - return &SchedulePolicy{ - SchedulePolicyType: l.SchedulePolicyType, - } -} - -// LongTermRetentionPolicy - Long term retention policy. -type LongTermRetentionPolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - RetentionPolicyType *string `json:"retentionPolicyType,omitempty"` - - // Daily retention schedule of the protection policy. - DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"` - - // Monthly retention schedule of the protection policy. - MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"` - - // Weekly retention schedule of the protection policy. - WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"` - - // Yearly retention schedule of the protection policy. - YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` -} - -// GetRetentionPolicy implements the RetentionPolicyClassification interface for type LongTermRetentionPolicy. -func (l *LongTermRetentionPolicy) GetRetentionPolicy() *RetentionPolicy { - return &RetentionPolicy{ - RetentionPolicyType: l.RetentionPolicyType, - } -} - -// LongTermSchedulePolicy - Long term policy schedule. -type LongTermSchedulePolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - SchedulePolicyType *string `json:"schedulePolicyType,omitempty"` -} - -// GetSchedulePolicy implements the SchedulePolicyClassification interface for type LongTermSchedulePolicy. -func (l *LongTermSchedulePolicy) GetSchedulePolicy() *SchedulePolicy { - return &SchedulePolicy{ - SchedulePolicyType: l.SchedulePolicyType, - } -} - -// MABContainerHealthDetails - MAB workload-specific Health Details. -type MABContainerHealthDetails struct { - // Health Code - Code *int32 `json:"code,omitempty"` - - // Health Message - Message *string `json:"message,omitempty"` - - // Health Recommended Actions - Recommendations []*string `json:"recommendations,omitempty"` - - // Health Title - Title *string `json:"title,omitempty"` -} - -// MabContainer - Container with items backed up using MAB backup engine. -type MabContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Agent version of this container. - AgentVersion *string `json:"agentVersion,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Can the container be registered one more time. - CanReRegister *bool `json:"canReRegister,omitempty"` - - // Health state of mab container. - ContainerHealthState *string `json:"containerHealthState,omitempty"` - - // ContainerID represents the container. - ContainerID *int64 `json:"containerId,omitempty"` - - // Additional information for this container - ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Health details on this mab container. - MabContainerHealthDetails []*MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Number of items backed up in this container. - ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` -} - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type MabContainer. -func (m *MabContainer) GetProtectionContainer() *ProtectionContainer { - return &ProtectionContainer{ - FriendlyName: m.FriendlyName, - BackupManagementType: m.BackupManagementType, - RegistrationStatus: m.RegistrationStatus, - HealthStatus: m.HealthStatus, - ContainerType: m.ContainerType, - ProtectableObjectType: m.ProtectableObjectType, - } -} - -// MabContainerExtendedInfo - Additional information of the container. -type MabContainerExtendedInfo struct { - // Type of backup items associated with this container. - BackupItemType *BackupItemType `json:"backupItemType,omitempty"` - - // List of backup items associated with this container. - BackupItems []*string `json:"backupItems,omitempty"` - - // Latest backup status of this container. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - - // Time stamp when this container was refreshed. - LastRefreshedAt *time.Time `json:"lastRefreshedAt,omitempty"` - - // Backup policy associated with this container. - PolicyName *string `json:"policyName,omitempty"` -} - -// MabErrorInfo - MAB workload-specific error information. -type MabErrorInfo struct { - // READ-ONLY; Localized error string. - ErrorString *string `json:"errorString,omitempty" azure:"ro"` - - // READ-ONLY; List of localized recommendations. - Recommendations []*string `json:"recommendations,omitempty" azure:"ro"` -} - -// MabFileFolderProtectedItem - MAB workload-specific backup item. -type MabFileFolderProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Name of the computer associated with this backup item. - ComputerName *string `json:"computerName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Sync time for deferred deletion in UTC - DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Additional information with this backup item. - ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - - // Friendly name of this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Status of last backup operation. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - - // Timestamp of the last backup operation on this backup item. - LastBackupTime *time.Time `json:"lastBackupTime,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // Protected, ProtectionStopped, IRPending or ProtectionError - ProtectionState *string `json:"protectionState,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type MabFileFolderProtectedItem. -func (m *MabFileFolderProtectedItem) GetProtectedItem() *ProtectedItem { - return &ProtectedItem{ - ProtectedItemType: m.ProtectedItemType, - BackupManagementType: m.BackupManagementType, - WorkloadType: m.WorkloadType, - ContainerName: m.ContainerName, - SourceResourceID: m.SourceResourceID, - PolicyID: m.PolicyID, - LastRecoveryPoint: m.LastRecoveryPoint, - BackupSetName: m.BackupSetName, - CreateMode: m.CreateMode, - DeferredDeleteTimeInUTC: m.DeferredDeleteTimeInUTC, - IsScheduledForDeferredDelete: m.IsScheduledForDeferredDelete, - DeferredDeleteTimeRemaining: m.DeferredDeleteTimeRemaining, - IsDeferredDeleteScheduleUpcoming: m.IsDeferredDeleteScheduleUpcoming, - IsRehydrate: m.IsRehydrate, - ResourceGuardOperationRequests: m.ResourceGuardOperationRequests, - IsArchiveEnabled: m.IsArchiveEnabled, - PolicyName: m.PolicyName, - } -} - -// MabFileFolderProtectedItemExtendedInfo - Additional information on the backed up item. -type MabFileFolderProtectedItemExtendedInfo struct { - // Last time when the agent data synced to service. - LastRefreshedAt *time.Time `json:"lastRefreshedAt,omitempty"` - - // The oldest backup copy available. - OldestRecoveryPoint *time.Time `json:"oldestRecoveryPoint,omitempty"` - - // Number of backup copies associated with the backup item. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` -} - -// MabJob - MAB workload-specific job. -type MabJob struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - JobType *string `json:"jobType,omitempty"` - - // The state/actions applicable on jobs like cancel/retry. - ActionsInfo []*JobSupportedAction `json:"actionsInfo,omitempty"` - - // ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - - // Backup management type to execute the current job. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Time taken by job to run. - Duration *string `json:"duration,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - - // The errors. - ErrorDetails []*MabErrorInfo `json:"errorDetails,omitempty"` - - // Additional information on the job. - ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"` - - // Name of server protecting the DS. - MabServerName *string `json:"mabServerName,omitempty"` - - // Server type of MAB container. - MabServerType *MabServerType `json:"mabServerType,omitempty"` - - // The operation name. - Operation *string `json:"operation,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // Job status. - Status *string `json:"status,omitempty"` - - // Workload type of backup item. - WorkloadType *WorkloadType `json:"workloadType,omitempty"` -} - -// GetJob implements the JobClassification interface for type MabJob. -func (m *MabJob) GetJob() *Job { - return &Job{ - EntityFriendlyName: m.EntityFriendlyName, - BackupManagementType: m.BackupManagementType, - Operation: m.Operation, - Status: m.Status, - StartTime: m.StartTime, - EndTime: m.EndTime, - ActivityID: m.ActivityID, - JobType: m.JobType, - } -} - -// MabJobExtendedInfo - Additional information for the MAB workload-specific job. -type MabJobExtendedInfo struct { - // Non localized error message specific to this job. - DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` - - // The job properties. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` - - // List of tasks for this job. - TasksList []*MabJobTaskDetails `json:"tasksList,omitempty"` -} - -// MabJobTaskDetails - MAB workload-specific job task details. -type MabJobTaskDetails struct { - // Time elapsed for task. - Duration *string `json:"duration,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // The status. - Status *string `json:"status,omitempty"` - - // The task display name. - TaskID *string `json:"taskId,omitempty"` -} - -// MabProtectionPolicy - Mab container-specific backup policy. -type MabProtectionPolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - - // ResourceGuard Operation Requests - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // Retention policy details. - RetentionPolicy RetentionPolicyClassification `json:"retentionPolicy,omitempty"` - - // Backup schedule of backup policy. - SchedulePolicy SchedulePolicyClassification `json:"schedulePolicy,omitempty"` -} - -// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type MabProtectionPolicy. -func (m *MabProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { - return &ProtectionPolicy{ - ProtectedItemsCount: m.ProtectedItemsCount, - BackupManagementType: m.BackupManagementType, - ResourceGuardOperationRequests: m.ResourceGuardOperationRequests, - } -} - -// MonthlyRetentionSchedule - Monthly retention schedule. -type MonthlyRetentionSchedule struct { - // Retention duration of retention Policy. - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` - - // Daily retention format for monthly retention policy. - RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` - - // Retention schedule format type for monthly retention policy. - RetentionScheduleFormatType *RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` - - // Weekly retention format for monthly retention policy. - RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` - - // Retention times of retention policy. - RetentionTimes []*time.Time `json:"retentionTimes,omitempty"` -} - -type MoveRPAcrossTiersRequest struct { - // Gets the class type. - ObjectType *string `json:"objectType,omitempty"` - - // Source tier from where RP needs to be moved - SourceTierType *RecoveryPointTierType `json:"sourceTierType,omitempty"` - - // Target tier where RP needs to be moved - TargetTierType *RecoveryPointTierType `json:"targetTierType,omitempty"` -} - -// NameInfo - The name of usage. -type NameInfo struct { - // Localized value of usage. - LocalizedValue *string `json:"localizedValue,omitempty"` - - // Value of usage. - Value *string `json:"value,omitempty"` -} - -// NewErrorResponse - The resource management error response. -type NewErrorResponse struct { - // The error object. - Error *NewErrorResponseError `json:"error,omitempty"` -} - -// NewErrorResponseError - The error object. -type NewErrorResponseError struct { - // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` - - // READ-ONLY; The error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; The error details. - Details []*NewErrorResponse `json:"details,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; The error target. - Target *string `json:"target,omitempty" azure:"ro"` -} - -// OperationClientValidateOptions contains the optional parameters for the OperationClient.Validate method. -type OperationClientValidateOptions struct { - // placeholder for future optional parameters -} - -// OperationResultInfo - Operation result info. -type OperationResultInfo struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // List of jobs created by this operation. - JobList []*string `json:"jobList,omitempty"` -} - -// GetOperationResultInfoBase implements the OperationResultInfoBaseClassification interface for type OperationResultInfo. -func (o *OperationResultInfo) GetOperationResultInfoBase() *OperationResultInfoBase { - return &OperationResultInfoBase{ - ObjectType: o.ObjectType, - } -} - -// OperationResultInfoBaseClassification provides polymorphic access to related types. -// Call the interface's GetOperationResultInfoBase() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ExportJobsOperationResultInfo, *OperationResultInfo, *OperationResultInfoBase -type OperationResultInfoBaseClassification interface { - // GetOperationResultInfoBase returns the OperationResultInfoBase content of the underlying type. - GetOperationResultInfoBase() *OperationResultInfoBase -} - -// OperationResultInfoBase - Base class for operation result info. -type OperationResultInfoBase struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` -} - -// GetOperationResultInfoBase implements the OperationResultInfoBaseClassification interface for type OperationResultInfoBase. -func (o *OperationResultInfoBase) GetOperationResultInfoBase() *OperationResultInfoBase { return o } - -// OperationResultInfoBaseResource - Base class for operation result info. -type OperationResultInfoBaseResource struct { - // HTTP headers associated with this operation. - Headers map[string][]*string `json:"headers,omitempty"` - - // OperationResultInfoBaseResource operation - Operation OperationResultInfoBaseClassification `json:"operation,omitempty"` - - // HTTP Status Code of the operation. - StatusCode *HTTPStatusCode `json:"statusCode,omitempty"` -} - -// OperationStatus - Operation status. -type OperationStatus struct { - // Operation end time. Format: ISO-8601. - EndTime *time.Time `json:"endTime,omitempty"` - - // Error information related to this operation. - Error *OperationStatusError `json:"error,omitempty"` - - // ID of the operation. - ID *string `json:"id,omitempty"` - - // Name of the operation. - Name *string `json:"name,omitempty"` - - // Additional information associated with this operation. - Properties OperationStatusExtendedInfoClassification `json:"properties,omitempty"` - - // Operation start time. Format: ISO-8601. - StartTime *time.Time `json:"startTime,omitempty"` - - // Operation status. - Status *OperationStatusValues `json:"status,omitempty"` -} - -// OperationStatusError - Error information associated with operation status call. -type OperationStatusError struct { - // Error code of the operation failure. - Code *string `json:"code,omitempty"` - - // Error message displayed if the operation failure. - Message *string `json:"message,omitempty"` -} - -// OperationStatusExtendedInfoClassification provides polymorphic access to related types. -// Call the interface's GetOperationStatusExtendedInfo() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *OperationStatusExtendedInfo, *OperationStatusJobExtendedInfo, *OperationStatusJobsExtendedInfo, *OperationStatusProvisionILRExtendedInfo, -// - *OperationStatusValidateOperationExtendedInfo -type OperationStatusExtendedInfoClassification interface { - // GetOperationStatusExtendedInfo returns the OperationStatusExtendedInfo content of the underlying type. - GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo -} - -// OperationStatusExtendedInfo - Base class for additional information of operation status. -type OperationStatusExtendedInfo struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` -} - -// GetOperationStatusExtendedInfo implements the OperationStatusExtendedInfoClassification interface for type OperationStatusExtendedInfo. -func (o *OperationStatusExtendedInfo) GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo { - return o -} - -// OperationStatusJobExtendedInfo - Operation status job extended info. -type OperationStatusJobExtendedInfo struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // ID of the job created for this protected item. - JobID *string `json:"jobId,omitempty"` -} - -// GetOperationStatusExtendedInfo implements the OperationStatusExtendedInfoClassification interface for type OperationStatusJobExtendedInfo. -func (o *OperationStatusJobExtendedInfo) GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo { - return &OperationStatusExtendedInfo{ - ObjectType: o.ObjectType, - } -} - -// OperationStatusJobsExtendedInfo - Operation status extended info for list of jobs. -type OperationStatusJobsExtendedInfo struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Stores all the failed jobs along with the corresponding error codes. - FailedJobsError map[string]*string `json:"failedJobsError,omitempty"` - - // IDs of the jobs created for the protected item. - JobIDs []*string `json:"jobIds,omitempty"` -} - -// GetOperationStatusExtendedInfo implements the OperationStatusExtendedInfoClassification interface for type OperationStatusJobsExtendedInfo. -func (o *OperationStatusJobsExtendedInfo) GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo { - return &OperationStatusExtendedInfo{ - ObjectType: o.ObjectType, - } -} - -// OperationStatusProvisionILRExtendedInfo - Operation status extended info for ILR provision action. -type OperationStatusProvisionILRExtendedInfo struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Target details for file / folder restore. - RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"` -} - -// GetOperationStatusExtendedInfo implements the OperationStatusExtendedInfoClassification interface for type OperationStatusProvisionILRExtendedInfo. -func (o *OperationStatusProvisionILRExtendedInfo) GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo { - return &OperationStatusExtendedInfo{ - ObjectType: o.ObjectType, - } -} - -// OperationStatusValidateOperationExtendedInfo - Operation status extended info for ValidateOperation action. -type OperationStatusValidateOperationExtendedInfo struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Gets the validation operation response - ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"` -} - -// GetOperationStatusExtendedInfo implements the OperationStatusExtendedInfoClassification interface for type OperationStatusValidateOperationExtendedInfo. -func (o *OperationStatusValidateOperationExtendedInfo) GetOperationStatusExtendedInfo() *OperationStatusExtendedInfo { - return &OperationStatusExtendedInfo{ - ObjectType: o.ObjectType, - } -} - -// OperationWorkerResponse - This is the base class for operation result responses. -type OperationWorkerResponse struct { - // HTTP headers associated with this operation. - Headers map[string][]*string `json:"headers,omitempty"` - - // HTTP Status Code of the operation. - StatusCode *HTTPStatusCode `json:"statusCode,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// PointInTimeRange - Provides details for log ranges -type PointInTimeRange struct { - // End time of the time range for log recovery. - EndTime *time.Time `json:"endTime,omitempty"` - - // Start time of the time range for log recovery. - StartTime *time.Time `json:"startTime,omitempty"` -} - -// PreBackupValidation - Pre-backup validation for Azure VM Workload provider. -type PreBackupValidation struct { - // Error code of protectable item - Code *string `json:"code,omitempty"` - - // Message corresponding to the error code for the protectable item - Message *string `json:"message,omitempty"` - - // Status of protectable item, i.e. InProgress,Succeeded,Failed - Status *InquiryStatus `json:"status,omitempty"` -} - -// PreValidateEnableBackupRequest - Contract to validate if backup can be enabled on the given resource in a given vault and -// given configuration. It will validate followings -// 1. Vault capacity -// 2. VM is already protected -// 3. Any VM related configuration passed in properties. -type PreValidateEnableBackupRequest struct { - // Configuration of VM if any needs to be validated like OS type etc - Properties *string `json:"properties,omitempty"` - - // ARM Virtual Machine Id - ResourceID *string `json:"resourceId,omitempty"` - - // ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc - ResourceType *DataSourceType `json:"resourceType,omitempty"` - - // ARM id of the Recovery Services Vault - VaultID *string `json:"vaultId,omitempty"` -} - -// PreValidateEnableBackupResponse - Response contract for enable backup validation request -type PreValidateEnableBackupResponse struct { - // Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required for - // portal - ContainerName *string `json:"containerName,omitempty"` - - // Response error code - ErrorCode *string `json:"errorCode,omitempty"` - - // Response error message - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal - ProtectedItemName *string `json:"protectedItemName,omitempty"` - - // Recommended action for user - Recommendation *string `json:"recommendation,omitempty"` - - // Validation Status - Status *ValidationStatus `json:"status,omitempty"` -} - -// PrepareDataMoveRequest - Prepare DataMove Request -type PrepareDataMoveRequest struct { - // REQUIRED; DataMove Level - DataMoveLevel *DataMoveLevel `json:"dataMoveLevel,omitempty"` - - // REQUIRED; Target Region - TargetRegion *string `json:"targetRegion,omitempty"` - - // REQUIRED; ARM Id of target vault - TargetResourceID *string `json:"targetResourceId,omitempty"` - - // Ignore the artifacts which are already moved. - IgnoreMoved *bool `json:"ignoreMoved,omitempty"` - - // Source Container ArmIds This needs to be populated only if DataMoveLevel is set to container - SourceContainerArmIDs []*string `json:"sourceContainerArmIds,omitempty"` -} - -// PrepareDataMoveResponse - Prepare DataMove Response -type PrepareDataMoveResponse struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Co-relationId for move operation - CorrelationID *string `json:"correlationId,omitempty"` - - // Source Vault Properties - SourceVaultProperties map[string]*string `json:"sourceVaultProperties,omitempty"` -} - -// GetVaultStorageConfigOperationResultResponse implements the VaultStorageConfigOperationResultResponseClassification interface -// for type PrepareDataMoveResponse. -func (p *PrepareDataMoveResponse) GetVaultStorageConfigOperationResultResponse() *VaultStorageConfigOperationResultResponse { - return &VaultStorageConfigOperationResultResponse{ - ObjectType: p.ObjectType, - } -} - -// PrivateEndpoint - The Private Endpoint network resource that is linked to the Private Endpoint connection -type PrivateEndpoint struct { - // Gets or sets id - ID *string `json:"id,omitempty"` -} - -// PrivateEndpointClientGetOperationStatusOptions contains the optional parameters for the PrivateEndpointClient.GetOperationStatus -// method. -type PrivateEndpointClientGetOperationStatusOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnection - Private Endpoint Connection Response Properties -type PrivateEndpointConnection struct { - // Gets or sets private endpoint associated with the private endpoint connection - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - - // Gets or sets private link service connection state - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - - // Gets or sets provisioning state of the private endpoint connection - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} - -// PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete -// method. -type PrivateEndpointConnectionClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionClientBeginPutOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginPut -// method. -type PrivateEndpointConnectionClientBeginPutOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionClientGetOptions contains the optional parameters for the PrivateEndpointConnectionClient.Get -// method. -type PrivateEndpointConnectionClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionResource - Private Endpoint Connection Response Properties -type PrivateEndpointConnectionResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // PrivateEndpointConnectionResource properties - Properties *PrivateEndpointConnection `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PrivateLinkServiceConnectionState - Private Link Service Connection State -type PrivateLinkServiceConnectionState struct { - // Gets or sets actions required - ActionRequired *string `json:"actionRequired,omitempty"` - - // Gets or sets description - Description *string `json:"description,omitempty"` - - // Gets or sets the status - Status *PrivateEndpointConnectionStatus `json:"status,omitempty"` -} - -// ProtectableContainerClassification provides polymorphic access to related types. -// Call the interface's GetProtectableContainer() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureStorageProtectableContainer, *AzureVMAppContainerProtectableContainer, *ProtectableContainer -type ProtectableContainerClassification interface { - // GetProtectableContainer returns the ProtectableContainer content of the underlying type. - GetProtectableContainer() *ProtectableContainer -} - -// ProtectableContainer - Protectable Container Class. -type ProtectableContainer struct { - // REQUIRED; Type of the container. The value of this property for - // 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines - ProtectableContainerType *ContainerType `json:"protectableContainerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Fabric Id of the container such as ARM Id. - ContainerID *string `json:"containerId,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` -} - -// GetProtectableContainer implements the ProtectableContainerClassification interface for type ProtectableContainer. -func (p *ProtectableContainer) GetProtectableContainer() *ProtectableContainer { return p } - -// ProtectableContainerResource - Protectable Container Class. -type ProtectableContainerResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // ProtectableContainerResource properties - Properties ProtectableContainerClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProtectableContainerResourceList - List of ProtectableContainer resources -type ProtectableContainerResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*ProtectableContainerResource `json:"value,omitempty"` -} - -// ProtectableContainersClientListOptions contains the optional parameters for the ProtectableContainersClient.List method. -type ProtectableContainersClientListOptions struct { - // OData filter options. - Filter *string -} - -// ProtectedItemClassification provides polymorphic access to related types. -// Call the interface's GetProtectedItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileshareProtectedItem, *AzureIaaSClassicComputeVMProtectedItem, *AzureIaaSComputeVMProtectedItem, *AzureIaaSVMProtectedItem, -// - *AzureSQLProtectedItem, *AzureVMWorkloadProtectedItem, *AzureVMWorkloadSAPAseDatabaseProtectedItem, *AzureVMWorkloadSAPHanaDatabaseProtectedItem, -// - *AzureVMWorkloadSQLDatabaseProtectedItem, *DPMProtectedItem, *GenericProtectedItem, *MabFileFolderProtectedItem, *ProtectedItem -type ProtectedItemClassification interface { - // GetProtectedItem returns the ProtectedItem content of the underlying type. - GetProtectedItem() *ProtectedItem -} - -// ProtectedItem - Base class for backup items. -type ProtectedItem struct { - // REQUIRED; backup item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - - // Unique name of container - ContainerName *string `json:"containerName,omitempty"` - - // Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - CreateMode *CreateMode `json:"createMode,omitempty"` - - // Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *time.Time `json:"deferredDeleteTimeInUTC,omitempty"` - - // Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - - // Flag to identify whether datasource is protected in archive - IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"` - - // Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - - // Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - - // Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - - // Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *time.Time `json:"lastRecoveryPoint,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Name of the policy used for protection - PolicyName *string `json:"policyName,omitempty"` - - // ResourceGuardOperationRequests on which LAC check will be performed - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Type of workload this item represents. - WorkloadType *DataSourceType `json:"workloadType,omitempty"` -} - -// GetProtectedItem implements the ProtectedItemClassification interface for type ProtectedItem. -func (p *ProtectedItem) GetProtectedItem() *ProtectedItem { return p } - -// ProtectedItemOperationResultsClientGetOptions contains the optional parameters for the ProtectedItemOperationResultsClient.Get -// method. -type ProtectedItemOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectedItemOperationStatusesClientGetOptions contains the optional parameters for the ProtectedItemOperationStatusesClient.Get -// method. -type ProtectedItemOperationStatusesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectedItemQueryObject - Filters to list backup items. -type ProtectedItemQueryObject struct { - // Backup Engine name - BackupEngineName *string `json:"backupEngineName,omitempty"` - - // Backup management type for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Name of the backup set. - BackupSetName *string `json:"backupSetName,omitempty"` - - // Name of the container. - ContainerName *string `json:"containerName,omitempty"` - - // Name of the fabric. - FabricName *string `json:"fabricName,omitempty"` - - // Friendly name of protected item - FriendlyName *string `json:"friendlyName,omitempty"` - - // Health State for the backed up item. - HealthState *HealthState `json:"healthState,omitempty"` - - // Type of workload this item represents. - ItemType *DataSourceType `json:"itemType,omitempty"` - - // Backup policy name associated with the backup item. - PolicyName *string `json:"policyName,omitempty"` -} - -// ProtectedItemResource - Base class for backup items. -type ProtectedItemResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // ProtectedItemResource properties - Properties ProtectedItemClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProtectedItemResourceList - List of ProtectedItem resources -type ProtectedItemResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*ProtectedItemResource `json:"value,omitempty"` -} - -// ProtectedItemsClientCreateOrUpdateOptions contains the optional parameters for the ProtectedItemsClient.CreateOrUpdate -// method. -type ProtectedItemsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProtectedItemsClientDeleteOptions contains the optional parameters for the ProtectedItemsClient.Delete method. -type ProtectedItemsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ProtectedItemsClientGetOptions contains the optional parameters for the ProtectedItemsClient.Get method. -type ProtectedItemsClientGetOptions struct { - // OData filter options. - Filter *string -} - -// ProtectionContainerClassification provides polymorphic access to related types. -// Call the interface's GetProtectionContainer() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureBackupServerContainer, *AzureIaaSClassicComputeVMContainer, *AzureIaaSComputeVMContainer, *AzureSQLAGWorkloadContainerProtectionContainer, -// - *AzureSQLContainer, *AzureStorageContainer, *AzureVMAppContainerProtectionContainer, *AzureWorkloadContainer, *DpmContainer, -// - *GenericContainer, *IaaSVMContainer, *MabContainer, *ProtectionContainer -type ProtectionContainerClassification interface { - // GetProtectionContainer returns the ProtectionContainer content of the underlying type. - GetProtectionContainer() *ProtectionContainer -} - -// ProtectionContainer - Base class for container with backup items. Containers with specific workloads are derived from this -// class. -type ProtectionContainer struct { - // REQUIRED; Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines - // 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows - // machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. - // 6. Azure workload Backup is VMAppContainer - ContainerType *ContainerType `json:"containerType,omitempty"` - - // Type of backup management for the container. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - - // Type of the protectable object associated with this container - ProtectableObjectType *string `json:"protectableObjectType,omitempty"` - - // Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` -} - -// GetProtectionContainer implements the ProtectionContainerClassification interface for type ProtectionContainer. -func (p *ProtectionContainer) GetProtectionContainer() *ProtectionContainer { return p } - -// ProtectionContainerOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerOperationResultsClient.Get -// method. -type ProtectionContainerOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionContainerRefreshOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerRefreshOperationResultsClient.Get -// method. -type ProtectionContainerRefreshOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionContainerResource - Base class for container with backup items. Containers with specific workloads are derived -// from this class. -type ProtectionContainerResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // ProtectionContainerResource properties - Properties ProtectionContainerClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProtectionContainerResourceList - List of ProtectionContainer resources -type ProtectionContainerResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*ProtectionContainerResource `json:"value,omitempty"` -} - -// ProtectionContainersClientGetOptions contains the optional parameters for the ProtectionContainersClient.Get method. -type ProtectionContainersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionContainersClientInquireOptions contains the optional parameters for the ProtectionContainersClient.Inquire method. -type ProtectionContainersClientInquireOptions struct { - // OData filter options. - Filter *string -} - -// ProtectionContainersClientRefreshOptions contains the optional parameters for the ProtectionContainersClient.Refresh method. -type ProtectionContainersClientRefreshOptions struct { - // OData filter options. - Filter *string -} - -// ProtectionContainersClientRegisterOptions contains the optional parameters for the ProtectionContainersClient.Register -// method. -type ProtectionContainersClientRegisterOptions struct { - // placeholder for future optional parameters -} - -// ProtectionContainersClientUnregisterOptions contains the optional parameters for the ProtectionContainersClient.Unregister -// method. -type ProtectionContainersClientUnregisterOptions struct { - // placeholder for future optional parameters -} - -// ProtectionIntentClassification provides polymorphic access to related types. -// Call the interface's GetProtectionIntent() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureRecoveryServiceVaultProtectionIntent, *AzureResourceProtectionIntent, *AzureWorkloadAutoProtectionIntent, *AzureWorkloadContainerAutoProtectionIntent, -// - *AzureWorkloadSQLAutoProtectionIntent, *ProtectionIntent -type ProtectionIntentClassification interface { - // GetProtectionIntent returns the ProtectionIntent content of the underlying type. - GetProtectionIntent() *ProtectionIntent -} - -// ProtectionIntent - Base class for backup ProtectionIntent. -type ProtectionIntent struct { - // REQUIRED; backup protectionIntent type. - ProtectionIntentItemType *ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` - - // Type of backup management for the backed up item. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - - // ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - - // Backup state of this backup item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` -} - -// GetProtectionIntent implements the ProtectionIntentClassification interface for type ProtectionIntent. -func (p *ProtectionIntent) GetProtectionIntent() *ProtectionIntent { return p } - -// ProtectionIntentClientCreateOrUpdateOptions contains the optional parameters for the ProtectionIntentClient.CreateOrUpdate -// method. -type ProtectionIntentClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProtectionIntentClientDeleteOptions contains the optional parameters for the ProtectionIntentClient.Delete method. -type ProtectionIntentClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ProtectionIntentClientGetOptions contains the optional parameters for the ProtectionIntentClient.Get method. -type ProtectionIntentClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionIntentClientValidateOptions contains the optional parameters for the ProtectionIntentClient.Validate method. -type ProtectionIntentClientValidateOptions struct { - // placeholder for future optional parameters -} - -// ProtectionIntentQueryObject - Filters to list protection intent. -type ProtectionIntentQueryObject struct { - // Backup management type for the backed up item - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Item name of the intent - ItemName *string `json:"itemName,omitempty"` - - // Type of workload this item represents - ItemType *IntentItemType `json:"itemType,omitempty"` - - // Parent name of the intent - ParentName *string `json:"parentName,omitempty"` -} - -// ProtectionIntentResource - Base class for backup ProtectionIntent. -type ProtectionIntentResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // ProtectionIntentResource properties - Properties ProtectionIntentClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProtectionIntentResourceList - List of ProtectionIntent resources -type ProtectionIntentResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*ProtectionIntentResource `json:"value,omitempty"` -} - -// ProtectionPoliciesClientBeginDeleteOptions contains the optional parameters for the ProtectionPoliciesClient.BeginDelete -// method. -type ProtectionPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ProtectionPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ProtectionPoliciesClient.CreateOrUpdate -// method. -type ProtectionPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProtectionPoliciesClientGetOptions contains the optional parameters for the ProtectionPoliciesClient.Get method. -type ProtectionPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionPolicyClassification provides polymorphic access to related types. -// Call the interface's GetProtectionPolicy() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareProtectionPolicy, *AzureIaaSVMProtectionPolicy, *AzureSQLProtectionPolicy, *AzureVMWorkloadProtectionPolicy, -// - *GenericProtectionPolicy, *MabProtectionPolicy, *ProtectionPolicy -type ProtectionPolicyClassification interface { - // GetProtectionPolicy returns the ProtectionPolicy content of the underlying type. - GetProtectionPolicy() *ProtectionPolicy -} - -// ProtectionPolicy - Base class for backup policy. Workload-specific backup policies are derived from this class. -type ProtectionPolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - - // ResourceGuard Operation Requests - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` -} - -// GetProtectionPolicy implements the ProtectionPolicyClassification interface for type ProtectionPolicy. -func (p *ProtectionPolicy) GetProtectionPolicy() *ProtectionPolicy { return p } - -// ProtectionPolicyOperationResultsClientGetOptions contains the optional parameters for the ProtectionPolicyOperationResultsClient.Get -// method. -type ProtectionPolicyOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionPolicyOperationStatusesClientGetOptions contains the optional parameters for the ProtectionPolicyOperationStatusesClient.Get -// method. -type ProtectionPolicyOperationStatusesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProtectionPolicyQueryObject - Filters the list backup policies API. -type ProtectionPolicyQueryObject struct { - // Backup management type for the backup policy. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Fabric name for filter - FabricName *string `json:"fabricName,omitempty"` - - // Workload type for the backup policy. - WorkloadType *WorkloadType `json:"workloadType,omitempty"` -} - -// ProtectionPolicyResource - Base class for backup policy. Workload-specific backup policies are derived from this class. -type ProtectionPolicyResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // ProtectionPolicyResource properties - Properties ProtectionPolicyClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProtectionPolicyResourceList - List of ProtectionPolicy resources -type ProtectionPolicyResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*ProtectionPolicyResource `json:"value,omitempty"` -} - -// RecoveryPointClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryPoint() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareRecoveryPoint, *AzureWorkloadPointInTimeRecoveryPoint, *AzureWorkloadRecoveryPoint, *AzureWorkloadSAPHanaPointInTimeRecoveryPoint, -// - *AzureWorkloadSAPHanaRecoveryPoint, *AzureWorkloadSQLPointInTimeRecoveryPoint, *AzureWorkloadSQLRecoveryPoint, *GenericRecoveryPoint, -// - *IaasVMRecoveryPoint, *RecoveryPoint -type RecoveryPointClassification interface { - // GetRecoveryPoint returns the RecoveryPoint content of the underlying type. - GetRecoveryPoint() *RecoveryPoint -} - -// RecoveryPoint - Base class for backup copies. Workload-specific backup copies are derived from this class. -type RecoveryPoint struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` -} - -// GetRecoveryPoint implements the RecoveryPointClassification interface for type RecoveryPoint. -func (r *RecoveryPoint) GetRecoveryPoint() *RecoveryPoint { return r } - -// RecoveryPointDiskConfiguration - Disk configuration -type RecoveryPointDiskConfiguration struct { - // Information of disks excluded from backup - ExcludedDiskList []*DiskInformation `json:"excludedDiskList,omitempty"` - - // Information of disks included in backup - IncludedDiskList []*DiskInformation `json:"includedDiskList,omitempty"` - - // Number of disks attached to the VM - NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"` - - // Number of disks included in backup - NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"` -} - -type RecoveryPointMoveReadinessInfo struct { - AdditionalInfo *string `json:"additionalInfo,omitempty"` - IsReadyForMove *bool `json:"isReadyForMove,omitempty"` -} - -// RecoveryPointRehydrationInfo - RP Rehydration Info -type RecoveryPointRehydrationInfo struct { - // Rehydration Priority - RehydrationPriority *RehydrationPriority `json:"rehydrationPriority,omitempty"` - - // How long the rehydrated RP should be kept Should be ISO8601 Duration format e.g. "P7D" - RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"` -} - -// RecoveryPointResource - Base class for backup copies. Workload-specific backup copies are derived from this class. -type RecoveryPointResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // RecoveryPointResource properties - Properties RecoveryPointClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RecoveryPointResourceList - List of RecoveryPoint resources -type RecoveryPointResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*RecoveryPointResource `json:"value,omitempty"` -} - -// RecoveryPointTierInformation - Recovery point tier information. -type RecoveryPointTierInformation struct { - // Recovery point tier status. - ExtendedInfo map[string]*string `json:"extendedInfo,omitempty"` - - // Recovery point tier status. - Status *RecoveryPointTierStatus `json:"status,omitempty"` - - // Recovery point tier type. - Type *RecoveryPointTierType `json:"type,omitempty"` -} - -// RecoveryPointTierInformationV2 - RecoveryPoint Tier Information V2 -type RecoveryPointTierInformationV2 struct { - // Recovery point tier status. - ExtendedInfo map[string]*string `json:"extendedInfo,omitempty"` - - // Recovery point tier status. - Status *RecoveryPointTierStatus `json:"status,omitempty"` - - // Recovery point tier type. - Type *RecoveryPointTierType `json:"type,omitempty"` -} - -// RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. -type RecoveryPointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.List method. -type RecoveryPointsClientListOptions struct { - // OData filter options. - Filter *string -} - -// RecoveryPointsRecommendedForMoveClientListOptions contains the optional parameters for the RecoveryPointsRecommendedForMoveClient.List -// method. -type RecoveryPointsRecommendedForMoveClientListOptions struct { - // placeholder for future optional parameters -} - -// Resource - ARM Resource. -type Resource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -type ResourceGuardOperationDetail struct { - DefaultResourceRequest *string `json:"defaultResourceRequest,omitempty"` - VaultCriticalOperation *string `json:"vaultCriticalOperation,omitempty"` -} - -// ResourceGuardProxiesClientGetOptions contains the optional parameters for the ResourceGuardProxiesClient.Get method. -type ResourceGuardProxiesClientGetOptions struct { - // placeholder for future optional parameters -} - -type ResourceGuardProxyBase struct { - Description *string `json:"description,omitempty"` - LastUpdatedTime *string `json:"lastUpdatedTime,omitempty"` - ResourceGuardOperationDetails []*ResourceGuardOperationDetail `json:"resourceGuardOperationDetails,omitempty"` - ResourceGuardResourceID *string `json:"resourceGuardResourceId,omitempty"` -} - -type ResourceGuardProxyBaseResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // ResourceGuardProxyBaseResource properties - Properties *ResourceGuardProxyBase `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceGuardProxyBaseResourceList - List of ResourceGuardProxyBase resources -type ResourceGuardProxyBaseResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*ResourceGuardProxyBaseResource `json:"value,omitempty"` -} - -// ResourceGuardProxyClientDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.Delete method. -type ResourceGuardProxyClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardProxyClientGetOptions contains the optional parameters for the ResourceGuardProxyClient.Get method. -type ResourceGuardProxyClientGetOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardProxyClientPutOptions contains the optional parameters for the ResourceGuardProxyClient.Put method. -type ResourceGuardProxyClientPutOptions struct { - // placeholder for future optional parameters -} - -// ResourceGuardProxyClientUnlockDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.UnlockDelete -// method. -type ResourceGuardProxyClientUnlockDeleteOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthDetails - Health Details for backup items. -type ResourceHealthDetails struct { - // READ-ONLY; Health Code - Code *int32 `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; Health Message - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; Health Recommended Actions - Recommendations []*string `json:"recommendations,omitempty" azure:"ro"` - - // READ-ONLY; Health Title - Title *string `json:"title,omitempty" azure:"ro"` -} - -// ResourceList - Base for all lists of resources. -type ResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -// RestoreFileSpecs - Restore file specs like file path, type and target folder path info. -type RestoreFileSpecs struct { - // Indicates what the Path variable stands for - FileSpecType *string `json:"fileSpecType,omitempty"` - - // Source File/Folder path - Path *string `json:"path,omitempty"` - - // Destination folder path in target FileShare - TargetFolderPath *string `json:"targetFolderPath,omitempty"` -} - -// RestoreRequestClassification provides polymorphic access to related types. -// Call the interface's GetRestoreRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareRestoreRequest, *AzureWorkloadPointInTimeRestoreRequest, *AzureWorkloadRestoreRequest, *AzureWorkloadSAPHanaPointInTimeRestoreRequest, -// - *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSAPHanaRestoreRequest, *AzureWorkloadSAPHanaRestoreWithRehydrateRequest, -// - *AzureWorkloadSQLPointInTimeRestoreRequest, *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, *AzureWorkloadSQLRestoreRequest, -// - *AzureWorkloadSQLRestoreWithRehydrateRequest, *IaasVMRestoreRequest, *IaasVMRestoreWithRehydrationRequest, *RestoreRequest -type RestoreRequestClassification interface { - // GetRestoreRequest returns the RestoreRequest content of the underlying type. - GetRestoreRequest() *RestoreRequest -} - -// RestoreRequest - Base class for restore request. Workload-specific restore requests are derived from this class. -type RestoreRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` -} - -// GetRestoreRequest implements the RestoreRequestClassification interface for type RestoreRequest. -func (r *RestoreRequest) GetRestoreRequest() *RestoreRequest { return r } - -// RestoreRequestResource - Base class for restore request. Workload-specific restore requests are derived from this class. -type RestoreRequestResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // RestoreRequestResource properties - Properties RestoreRequestClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RestoresClientBeginTriggerOptions contains the optional parameters for the RestoresClient.BeginTrigger method. -type RestoresClientBeginTriggerOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RetentionDuration - Retention duration. -type RetentionDuration struct { - // Count of duration types. Retention duration is obtained by the counting the duration type Count times. For example, when - // Count = 3 and DurationType = Weeks, retention duration will be three weeks. - Count *int32 `json:"count,omitempty"` - - // Retention duration type of retention policy. - DurationType *RetentionDurationType `json:"durationType,omitempty"` -} - -// RetentionPolicyClassification provides polymorphic access to related types. -// Call the interface's GetRetentionPolicy() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *LongTermRetentionPolicy, *RetentionPolicy, *SimpleRetentionPolicy -type RetentionPolicyClassification interface { - // GetRetentionPolicy returns the RetentionPolicy content of the underlying type. - GetRetentionPolicy() *RetentionPolicy -} - -// RetentionPolicy - Base class for retention policy. -type RetentionPolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - RetentionPolicyType *string `json:"retentionPolicyType,omitempty"` -} - -// GetRetentionPolicy implements the RetentionPolicyClassification interface for type RetentionPolicy. -func (r *RetentionPolicy) GetRetentionPolicy() *RetentionPolicy { return r } - -// SQLDataDirectory info -type SQLDataDirectory struct { - // Logical name of the file - LogicalName *string `json:"logicalName,omitempty"` - - // File path - Path *string `json:"path,omitempty"` - - // Type of data directory mapping - Type *SQLDataDirectoryType `json:"type,omitempty"` -} - -// SQLDataDirectoryMapping - Encapsulates information regarding data directory -type SQLDataDirectoryMapping struct { - // Type of data directory mapping - MappingType *SQLDataDirectoryType `json:"mappingType,omitempty"` - - // Restore source logical name path - SourceLogicalName *string `json:"sourceLogicalName,omitempty"` - - // Restore source path - SourcePath *string `json:"sourcePath,omitempty"` - - // Target path - TargetPath *string `json:"targetPath,omitempty"` -} - -// SchedulePolicyClassification provides polymorphic access to related types. -// Call the interface's GetSchedulePolicy() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *LogSchedulePolicy, *LongTermSchedulePolicy, *SchedulePolicy, *SimpleSchedulePolicy, *SimpleSchedulePolicyV2 -type SchedulePolicyClassification interface { - // GetSchedulePolicy returns the SchedulePolicy content of the underlying type. - GetSchedulePolicy() *SchedulePolicy -} - -// SchedulePolicy - Base class for backup schedule. -type SchedulePolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - SchedulePolicyType *string `json:"schedulePolicyType,omitempty"` -} - -// GetSchedulePolicy implements the SchedulePolicyClassification interface for type SchedulePolicy. -func (s *SchedulePolicy) GetSchedulePolicy() *SchedulePolicy { return s } - -// SecurityPINsClientGetOptions contains the optional parameters for the SecurityPINsClient.Get method. -type SecurityPINsClientGetOptions struct { - // security pin request - Parameters *SecurityPinBase -} - -// SecurityPinBase - Base class for get security pin request body -type SecurityPinBase struct { - // ResourceGuard Operation Requests - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` -} - -// Settings - Common settings field for backup management -type Settings struct { - // Workload compression flag. This has been added so that 'isSqlCompression' will be deprecated once clients upgrade to consider - // this flag. - IsCompression *bool `json:"isCompression,omitempty"` - - // SQL compression flag - Issqlcompression *bool `json:"issqlcompression,omitempty"` - - // TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - TimeZone *string `json:"timeZone,omitempty"` -} - -// SimpleRetentionPolicy - Simple policy retention. -type SimpleRetentionPolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - RetentionPolicyType *string `json:"retentionPolicyType,omitempty"` - - // Retention duration of the protection policy. - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` -} - -// GetRetentionPolicy implements the RetentionPolicyClassification interface for type SimpleRetentionPolicy. -func (s *SimpleRetentionPolicy) GetRetentionPolicy() *RetentionPolicy { - return &RetentionPolicy{ - RetentionPolicyType: s.RetentionPolicyType, - } -} - -// SimpleSchedulePolicy - Simple policy schedule. -type SimpleSchedulePolicy struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - SchedulePolicyType *string `json:"schedulePolicyType,omitempty"` - - // Hourly Schedule of this Policy - HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"` - - // List of days of week this schedule has to be run. - ScheduleRunDays []*DayOfWeek `json:"scheduleRunDays,omitempty"` - - // Frequency of the schedule operation of this policy. - ScheduleRunFrequency *ScheduleRunType `json:"scheduleRunFrequency,omitempty"` - - // List of times of day this schedule has to be run. - ScheduleRunTimes []*time.Time `json:"scheduleRunTimes,omitempty"` - - // At every number weeks this schedule has to be run. - ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"` -} - -// GetSchedulePolicy implements the SchedulePolicyClassification interface for type SimpleSchedulePolicy. -func (s *SimpleSchedulePolicy) GetSchedulePolicy() *SchedulePolicy { - return &SchedulePolicy{ - SchedulePolicyType: s.SchedulePolicyType, - } -} - -// SimpleSchedulePolicyV2 - The V2 policy schedule for IaaS that supports hourly backups. -type SimpleSchedulePolicyV2 struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - SchedulePolicyType *string `json:"schedulePolicyType,omitempty"` - - // Daily schedule of this policy - DailySchedule *DailySchedule `json:"dailySchedule,omitempty"` - - // hourly schedule of this policy - HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"` - - // Frequency of the schedule operation of this policy. - ScheduleRunFrequency *ScheduleRunType `json:"scheduleRunFrequency,omitempty"` - - // Weekly schedule of this policy - WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"` -} - -// GetSchedulePolicy implements the SchedulePolicyClassification interface for type SimpleSchedulePolicyV2. -func (s *SimpleSchedulePolicyV2) GetSchedulePolicy() *SchedulePolicy { - return &SchedulePolicy{ - SchedulePolicyType: s.SchedulePolicyType, - } -} - -// SubProtectionPolicy - Sub-protection policy which includes schedule and retention -type SubProtectionPolicy struct { - // Type of backup policy type - PolicyType *PolicyType `json:"policyType,omitempty"` - - // Retention policy with the details on backup copy retention ranges. - RetentionPolicy RetentionPolicyClassification `json:"retentionPolicy,omitempty"` - - // Backup schedule specified as part of backup policy. - SchedulePolicy SchedulePolicyClassification `json:"schedulePolicy,omitempty"` -} - -// TargetAFSRestoreInfo - Target Azure File Share Info. -type TargetAFSRestoreInfo struct { - // File share name - Name *string `json:"name,omitempty"` - - // Target file share resource ARM ID - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// TargetRestoreInfo - Details about target workload during restore operation. -type TargetRestoreInfo struct { - // Resource Id name of the container in which Target DataBase resides - ContainerID *string `json:"containerId,omitempty"` - - // Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana - DatabaseName *string `json:"databaseName,omitempty"` - - // Can Overwrite if Target DataBase already exists - OverwriteOption *OverwriteOptions `json:"overwriteOption,omitempty"` - - // Target directory location for restore as files. - TargetDirectoryForFileRestore *string `json:"targetDirectoryForFileRestore,omitempty"` -} - -// TokenInformation - The token information details. -type TokenInformation struct { - // Expiry time of token. - ExpiryTimeInUTCTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"` - - // Security PIN - SecurityPIN *string `json:"securityPIN,omitempty"` - - // Token value. - Token *string `json:"token,omitempty"` -} - -// TriggerDataMoveRequest - Trigger DataMove Request -type TriggerDataMoveRequest struct { - // REQUIRED; Correlation Id - CorrelationID *string `json:"correlationId,omitempty"` - - // REQUIRED; DataMove Level - DataMoveLevel *DataMoveLevel `json:"dataMoveLevel,omitempty"` - - // REQUIRED; Source Region - SourceRegion *string `json:"sourceRegion,omitempty"` - - // REQUIRED; ARM Id of source vault - SourceResourceID *string `json:"sourceResourceId,omitempty"` - - // Pause GC - PauseGC *bool `json:"pauseGC,omitempty"` - - // Source Container ArmIds - SourceContainerArmIDs []*string `json:"sourceContainerArmIds,omitempty"` -} - -// UnlockDeleteRequest - Request body of unlock delete API. -type UnlockDeleteRequest struct { - ResourceGuardOperationRequests []*string `json:"resourceGuardOperationRequests,omitempty"` - ResourceToBeDeleted *string `json:"resourceToBeDeleted,omitempty"` -} - -// UnlockDeleteResponse - Response of Unlock Delete API. -type UnlockDeleteResponse struct { - // This is the time when unlock delete privileges will get expired. - UnlockDeleteExpiryTime *string `json:"unlockDeleteExpiryTime,omitempty"` -} - -// ValidateIaasVMRestoreOperationRequest - AzureRestoreValidation request. -type ValidateIaasVMRestoreOperationRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Sets restore request to be validated - RestoreRequest RestoreRequestClassification `json:"restoreRequest,omitempty"` -} - -// GetValidateOperationRequest implements the ValidateOperationRequestClassification interface for type ValidateIaasVMRestoreOperationRequest. -func (v *ValidateIaasVMRestoreOperationRequest) GetValidateOperationRequest() *ValidateOperationRequest { - return &ValidateOperationRequest{ - ObjectType: v.ObjectType, - } -} - -// GetValidateRestoreOperationRequest implements the ValidateRestoreOperationRequestClassification interface for type ValidateIaasVMRestoreOperationRequest. -func (v *ValidateIaasVMRestoreOperationRequest) GetValidateRestoreOperationRequest() *ValidateRestoreOperationRequest { - return &ValidateRestoreOperationRequest{ - RestoreRequest: v.RestoreRequest, - ObjectType: v.ObjectType, - } -} - -// ValidateOperationClientBeginTriggerOptions contains the optional parameters for the ValidateOperationClient.BeginTrigger -// method. -type ValidateOperationClientBeginTriggerOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ValidateOperationRequestClassification provides polymorphic access to related types. -// Call the interface's GetValidateOperationRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ValidateIaasVMRestoreOperationRequest, *ValidateOperationRequest, *ValidateRestoreOperationRequest -type ValidateOperationRequestClassification interface { - // GetValidateOperationRequest returns the ValidateOperationRequest content of the underlying type. - GetValidateOperationRequest() *ValidateOperationRequest -} - -// ValidateOperationRequest - Base class for validate operation request. -type ValidateOperationRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` -} - -// GetValidateOperationRequest implements the ValidateOperationRequestClassification interface for type ValidateOperationRequest. -func (v *ValidateOperationRequest) GetValidateOperationRequest() *ValidateOperationRequest { return v } - -// ValidateOperationResponse - Base class for validate operation response. -type ValidateOperationResponse struct { - // Gets the validation result - ValidationResults []*ErrorDetail `json:"validationResults,omitempty"` -} - -// ValidateOperationResultsClientGetOptions contains the optional parameters for the ValidateOperationResultsClient.Get method. -type ValidateOperationResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ValidateOperationStatusesClientGetOptions contains the optional parameters for the ValidateOperationStatusesClient.Get -// method. -type ValidateOperationStatusesClientGetOptions struct { - // placeholder for future optional parameters -} - -type ValidateOperationsResponse struct { - // Base class for validate operation response. - ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"` -} - -// ValidateRestoreOperationRequestClassification provides polymorphic access to related types. -// Call the interface's GetValidateRestoreOperationRequest() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ValidateIaasVMRestoreOperationRequest, *ValidateRestoreOperationRequest -type ValidateRestoreOperationRequestClassification interface { - ValidateOperationRequestClassification - // GetValidateRestoreOperationRequest returns the ValidateRestoreOperationRequest content of the underlying type. - GetValidateRestoreOperationRequest() *ValidateRestoreOperationRequest -} - -// ValidateRestoreOperationRequest - AzureRestoreValidation request. -type ValidateRestoreOperationRequest struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` - - // Sets restore request to be validated - RestoreRequest RestoreRequestClassification `json:"restoreRequest,omitempty"` -} - -// GetValidateOperationRequest implements the ValidateOperationRequestClassification interface for type ValidateRestoreOperationRequest. -func (v *ValidateRestoreOperationRequest) GetValidateOperationRequest() *ValidateOperationRequest { - return &ValidateOperationRequest{ - ObjectType: v.ObjectType, - } -} - -// GetValidateRestoreOperationRequest implements the ValidateRestoreOperationRequestClassification interface for type ValidateRestoreOperationRequest. -func (v *ValidateRestoreOperationRequest) GetValidateRestoreOperationRequest() *ValidateRestoreOperationRequest { - return v -} - -// VaultJob - Vault level Job -type VaultJob struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - JobType *string `json:"jobType,omitempty"` - - // Gets or sets the state/actions applicable on this job like cancel/retry. - ActionsInfo []*JobSupportedAction `json:"actionsInfo,omitempty"` - - // ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - - // Backup management type to execute the current job. - BackupManagementType *BackupManagementType `json:"backupManagementType,omitempty"` - - // Time elapsed during the execution of this job. - Duration *string `json:"duration,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - - // Error details on execution of this job. - ErrorDetails []*VaultJobErrorInfo `json:"errorDetails,omitempty"` - - // Additional information about the job. - ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"` - - // The operation name. - Operation *string `json:"operation,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // Job status. - Status *string `json:"status,omitempty"` -} - -// GetJob implements the JobClassification interface for type VaultJob. -func (v *VaultJob) GetJob() *Job { - return &Job{ - EntityFriendlyName: v.EntityFriendlyName, - BackupManagementType: v.BackupManagementType, - Operation: v.Operation, - Status: v.Status, - StartTime: v.StartTime, - EndTime: v.EndTime, - ActivityID: v.ActivityID, - JobType: v.JobType, - } -} - -// VaultJobErrorInfo - Vault Job specific error information -type VaultJobErrorInfo struct { - // Error code. - ErrorCode *int32 `json:"errorCode,omitempty"` - - // Localized error string. - ErrorString *string `json:"errorString,omitempty"` - - // List of localized recommendations for above error code. - Recommendations []*string `json:"recommendations,omitempty"` -} - -// VaultJobExtendedInfo - Vault Job for CMK - has CMK specific info. -type VaultJobExtendedInfo struct { - // Job properties. - PropertyBag map[string]*string `json:"propertyBag,omitempty"` -} - -// VaultStorageConfigOperationResultResponseClassification provides polymorphic access to related types. -// Call the interface's GetVaultStorageConfigOperationResultResponse() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *PrepareDataMoveResponse, *VaultStorageConfigOperationResultResponse -type VaultStorageConfigOperationResultResponseClassification interface { - // GetVaultStorageConfigOperationResultResponse returns the VaultStorageConfigOperationResultResponse content of the underlying type. - GetVaultStorageConfigOperationResultResponse() *VaultStorageConfigOperationResultResponse -} - -// VaultStorageConfigOperationResultResponse - Operation result response for Vault Storage Config -type VaultStorageConfigOperationResultResponse struct { - // REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - ObjectType *string `json:"objectType,omitempty"` -} - -// GetVaultStorageConfigOperationResultResponse implements the VaultStorageConfigOperationResultResponseClassification interface -// for type VaultStorageConfigOperationResultResponse. -func (v *VaultStorageConfigOperationResultResponse) GetVaultStorageConfigOperationResultResponse() *VaultStorageConfigOperationResultResponse { - return v -} - -// WeeklyRetentionFormat - Weekly retention format. -type WeeklyRetentionFormat struct { - // List of days of the week. - DaysOfTheWeek []*DayOfWeek `json:"daysOfTheWeek,omitempty"` - - // List of weeks of month. - WeeksOfTheMonth []*WeekOfMonth `json:"weeksOfTheMonth,omitempty"` -} - -// WeeklyRetentionSchedule - Weekly retention schedule. -type WeeklyRetentionSchedule struct { - // List of days of week for weekly retention policy. - DaysOfTheWeek []*DayOfWeek `json:"daysOfTheWeek,omitempty"` - - // Retention duration of retention Policy. - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` - - // Retention times of retention policy. - RetentionTimes []*time.Time `json:"retentionTimes,omitempty"` -} - -type WeeklySchedule struct { - ScheduleRunDays []*DayOfWeek `json:"scheduleRunDays,omitempty"` - - // List of times of day this schedule has to be run. - ScheduleRunTimes []*time.Time `json:"scheduleRunTimes,omitempty"` -} - -// WorkloadInquiryDetails - Details of an inquired protectable item. -type WorkloadInquiryDetails struct { - // Inquiry validation such as permissions and other backup validations. - InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"` - - // Contains the protectable item Count inside this Container. - ItemCount *int64 `json:"itemCount,omitempty"` - - // Type of the Workload such as SQL, Oracle etc. - Type *string `json:"type,omitempty"` -} - -// WorkloadItemClassification provides polymorphic access to related types. -// Call the interface's GetWorkloadItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureVMWorkloadItem, *AzureVMWorkloadSAPAseDatabaseWorkloadItem, *AzureVMWorkloadSAPAseSystemWorkloadItem, *AzureVMWorkloadSAPHanaDatabaseWorkloadItem, -// - *AzureVMWorkloadSAPHanaSystemWorkloadItem, *AzureVMWorkloadSQLDatabaseWorkloadItem, *AzureVMWorkloadSQLInstanceWorkloadItem, -// - *WorkloadItem -type WorkloadItemClassification interface { - // GetWorkloadItem returns the WorkloadItem content of the underlying type. - GetWorkloadItem() *WorkloadItem -} - -// WorkloadItem - Base class for backup item. Workload-specific backup items are derived from this class. -type WorkloadItem struct { - // REQUIRED; Type of the backup item. - WorkloadItemType *string `json:"workloadItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetWorkloadItem implements the WorkloadItemClassification interface for type WorkloadItem. -func (w *WorkloadItem) GetWorkloadItem() *WorkloadItem { return w } - -// WorkloadItemResource - Base class for backup item. Workload-specific backup items are derived from this class. -type WorkloadItemResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // WorkloadItemResource properties - Properties WorkloadItemClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WorkloadItemResourceList - List of WorkloadItem resources -type WorkloadItemResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*WorkloadItemResource `json:"value,omitempty"` -} - -// WorkloadProtectableItemClassification provides polymorphic access to related types. -// Call the interface's GetWorkloadProtectableItem() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFileShareProtectableItem, *AzureIaaSClassicComputeVMProtectableItem, *AzureIaaSComputeVMProtectableItem, *AzureVMWorkloadProtectableItem, -// - *AzureVMWorkloadSAPAseSystemProtectableItem, *AzureVMWorkloadSAPHanaDatabaseProtectableItem, *AzureVMWorkloadSAPHanaSystemProtectableItem, -// - *AzureVMWorkloadSQLAvailabilityGroupProtectableItem, *AzureVMWorkloadSQLDatabaseProtectableItem, *AzureVMWorkloadSQLInstanceProtectableItem, -// - *IaaSVMProtectableItem, *WorkloadProtectableItem -type WorkloadProtectableItemClassification interface { - // GetWorkloadProtectableItem returns the WorkloadProtectableItem content of the underlying type. - GetWorkloadProtectableItem() *WorkloadProtectableItem -} - -// WorkloadProtectableItem - Base class for backup item. Workload-specific backup items are derived from this class. -type WorkloadProtectableItem struct { - // REQUIRED; Type of the backup item. - ProtectableItemType *string `json:"protectableItemType,omitempty"` - - // Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - - // Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - - // State of the back up item. - ProtectionState *ProtectionStatus `json:"protectionState,omitempty"` - - // Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` -} - -// GetWorkloadProtectableItem implements the WorkloadProtectableItemClassification interface for type WorkloadProtectableItem. -func (w *WorkloadProtectableItem) GetWorkloadProtectableItem() *WorkloadProtectableItem { return w } - -// WorkloadProtectableItemResource - Base class for backup item. Workload-specific backup items are derived from this class. -type WorkloadProtectableItemResource struct { - // Optional ETag. - ETag *string `json:"eTag,omitempty"` - - // Resource location. - Location *string `json:"location,omitempty"` - - // WorkloadProtectableItemResource properties - Properties WorkloadProtectableItemClassification `json:"properties,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/… - Type *string `json:"type,omitempty" azure:"ro"` -} - -// WorkloadProtectableItemResourceList - List of WorkloadProtectableItem resources -type WorkloadProtectableItemResourceList struct { - // The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` - - // List of resources. - Value []*WorkloadProtectableItemResource `json:"value,omitempty"` -} - -// YearlyRetentionSchedule - Yearly retention schedule. -type YearlyRetentionSchedule struct { - // List of months of year of yearly retention policy. - MonthsOfYear []*MonthOfYear `json:"monthsOfYear,omitempty"` - - // Retention duration of retention Policy. - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` - - // Daily retention format for yearly retention policy. - RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` - - // Retention schedule format for yearly retention policy. - RetentionScheduleFormatType *RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` - - // Weekly retention format for yearly retention policy. - RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` - - // Retention times of retention policy. - RetentionTimes []*time.Time `json:"retentionTimes,omitempty"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_models_serde.go deleted file mode 100644 index 316f9689..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_models_serde.go +++ /dev/null @@ -1,9033 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "time" -) - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupGoalFeatureSupportRequest. -func (a AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["featureType"] = "AzureBackupGoals" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupGoalFeatureSupportRequest. -func (a *AzureBackupGoalFeatureSupportRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "featureType": - err = unpopulate(val, "FeatureType", &a.FeatureType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupServerContainer. -func (a AzureBackupServerContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "canReRegister", a.CanReRegister) - populate(objectMap, "containerId", a.ContainerID) - objectMap["containerType"] = ContainerTypeAzureBackupServerContainer - populate(objectMap, "dpmAgentVersion", a.DpmAgentVersion) - populate(objectMap, "dpmServers", a.DpmServers) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - populate(objectMap, "protectableObjectType", a.ProtectableObjectType) - populate(objectMap, "protectedItemCount", a.ProtectedItemCount) - populate(objectMap, "protectionStatus", a.ProtectionStatus) - populate(objectMap, "registrationStatus", a.RegistrationStatus) - populate(objectMap, "upgradeAvailable", a.UpgradeAvailable) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupServerContainer. -func (a *AzureBackupServerContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "canReRegister": - err = unpopulate(val, "CanReRegister", &a.CanReRegister) - delete(rawMsg, key) - case "containerId": - err = unpopulate(val, "ContainerID", &a.ContainerID) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &a.ContainerType) - delete(rawMsg, key) - case "dpmAgentVersion": - err = unpopulate(val, "DpmAgentVersion", &a.DpmAgentVersion) - delete(rawMsg, key) - case "dpmServers": - err = unpopulate(val, "DpmServers", &a.DpmServers) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) - delete(rawMsg, key) - case "protectedItemCount": - err = unpopulate(val, "ProtectedItemCount", &a.ProtectedItemCount) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) - delete(rawMsg, key) - case "upgradeAvailable": - err = unpopulate(val, "UpgradeAvailable", &a.UpgradeAvailable) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBackupServerEngine. -func (a AzureBackupServerEngine) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureBackupAgentVersion", a.AzureBackupAgentVersion) - populate(objectMap, "backupEngineId", a.BackupEngineID) - populate(objectMap, "backupEngineState", a.BackupEngineState) - objectMap["backupEngineType"] = BackupEngineTypeAzureBackupServerEngine - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "canReRegister", a.CanReRegister) - populate(objectMap, "dpmVersion", a.DpmVersion) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - populate(objectMap, "isAzureBackupAgentUpgradeAvailable", a.IsAzureBackupAgentUpgradeAvailable) - populate(objectMap, "isDpmUpgradeAvailable", a.IsDpmUpgradeAvailable) - populate(objectMap, "registrationStatus", a.RegistrationStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBackupServerEngine. -func (a *AzureBackupServerEngine) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureBackupAgentVersion": - err = unpopulate(val, "AzureBackupAgentVersion", &a.AzureBackupAgentVersion) - delete(rawMsg, key) - case "backupEngineId": - err = unpopulate(val, "BackupEngineID", &a.BackupEngineID) - delete(rawMsg, key) - case "backupEngineState": - err = unpopulate(val, "BackupEngineState", &a.BackupEngineState) - delete(rawMsg, key) - case "backupEngineType": - err = unpopulate(val, "BackupEngineType", &a.BackupEngineType) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "canReRegister": - err = unpopulate(val, "CanReRegister", &a.CanReRegister) - delete(rawMsg, key) - case "dpmVersion": - err = unpopulate(val, "DpmVersion", &a.DpmVersion) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "isAzureBackupAgentUpgradeAvailable": - err = unpopulate(val, "IsAzureBackupAgentUpgradeAvailable", &a.IsAzureBackupAgentUpgradeAvailable) - delete(rawMsg, key) - case "isDpmUpgradeAvailable": - err = unpopulate(val, "IsDpmUpgradeAvailable", &a.IsDpmUpgradeAvailable) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileShareBackupRequest. -func (a AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureFileShareBackupRequest" - populateTimeRFC3339(objectMap, "recoveryPointExpiryTimeInUTC", a.RecoveryPointExpiryTimeInUTC) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareBackupRequest. -func (a *AzureFileShareBackupRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointExpiryTimeInUTC": - err = unpopulateTimeRFC3339(val, "RecoveryPointExpiryTimeInUTC", &a.RecoveryPointExpiryTimeInUTC) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileShareProtectableItem. -func (a AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureFileShareType", a.AzureFileShareType) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "parentContainerFabricId", a.ParentContainerFabricID) - populate(objectMap, "parentContainerFriendlyName", a.ParentContainerFriendlyName) - objectMap["protectableItemType"] = "AzureFileShare" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareProtectableItem. -func (a *AzureFileShareProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureFileShareType": - err = unpopulate(val, "AzureFileShareType", &a.AzureFileShareType) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "parentContainerFabricId": - err = unpopulate(val, "ParentContainerFabricID", &a.ParentContainerFabricID) - delete(rawMsg, key) - case "parentContainerFriendlyName": - err = unpopulate(val, "ParentContainerFriendlyName", &a.ParentContainerFriendlyName) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileShareProtectionPolicy. -func (a AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["backupManagementType"] = "AzureStorage" - populate(objectMap, "protectedItemsCount", a.ProtectedItemsCount) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "retentionPolicy", a.RetentionPolicy) - populate(objectMap, "schedulePolicy", a.SchedulePolicy) - populate(objectMap, "timeZone", a.TimeZone) - populate(objectMap, "workLoadType", a.WorkLoadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareProtectionPolicy. -func (a *AzureFileShareProtectionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "protectedItemsCount": - err = unpopulate(val, "ProtectedItemsCount", &a.ProtectedItemsCount) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "retentionPolicy": - a.RetentionPolicy, err = unmarshalRetentionPolicyClassification(val) - delete(rawMsg, key) - case "schedulePolicy": - a.SchedulePolicy, err = unmarshalSchedulePolicyClassification(val) - delete(rawMsg, key) - case "timeZone": - err = unpopulate(val, "TimeZone", &a.TimeZone) - delete(rawMsg, key) - case "workLoadType": - err = unpopulate(val, "WorkLoadType", &a.WorkLoadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileShareProvisionILRRequest. -func (a AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureFileShareProvisionILRRequest" - populate(objectMap, "recoveryPointId", a.RecoveryPointID) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareProvisionILRRequest. -func (a *AzureFileShareProvisionILRRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileShareRecoveryPoint. -func (a AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fileShareSnapshotUri", a.FileShareSnapshotURI) - objectMap["objectType"] = "AzureFileShareRecoveryPoint" - populate(objectMap, "recoveryPointSizeInGB", a.RecoveryPointSizeInGB) - populateTimeRFC3339(objectMap, "recoveryPointTime", a.RecoveryPointTime) - populate(objectMap, "recoveryPointType", a.RecoveryPointType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareRecoveryPoint. -func (a *AzureFileShareRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fileShareSnapshotUri": - err = unpopulate(val, "FileShareSnapshotURI", &a.FileShareSnapshotURI) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointSizeInGB": - err = unpopulate(val, "RecoveryPointSizeInGB", &a.RecoveryPointSizeInGB) - delete(rawMsg, key) - case "recoveryPointTime": - err = unpopulateTimeRFC3339(val, "RecoveryPointTime", &a.RecoveryPointTime) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &a.RecoveryPointType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileShareRestoreRequest. -func (a AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "copyOptions", a.CopyOptions) - objectMap["objectType"] = "AzureFileShareRestoreRequest" - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "restoreFileSpecs", a.RestoreFileSpecs) - populate(objectMap, "restoreRequestType", a.RestoreRequestType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetDetails", a.TargetDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileShareRestoreRequest. -func (a *AzureFileShareRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "copyOptions": - err = unpopulate(val, "CopyOptions", &a.CopyOptions) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "restoreFileSpecs": - err = unpopulate(val, "RestoreFileSpecs", &a.RestoreFileSpecs) - delete(rawMsg, key) - case "restoreRequestType": - err = unpopulate(val, "RestoreRequestType", &a.RestoreRequestType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetDetails": - err = unpopulate(val, "TargetDetails", &a.TargetDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileshareProtectedItem. -func (a AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "backupSetName", a.BackupSetName) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "createMode", a.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", a.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) - populate(objectMap, "kpisHealths", a.KpisHealths) - populate(objectMap, "lastBackupStatus", a.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "policyName", a.PolicyName) - objectMap["protectedItemType"] = "AzureFileShareProtectedItem" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "protectionStatus", a.ProtectionStatus) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileshareProtectedItem. -func (a *AzureFileshareProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &a.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &a.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "kpisHealths": - err = unpopulate(val, "KpisHealths", &a.KpisHealths) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) - delete(rawMsg, key) - case "lastBackupTime": - err = unpopulateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileshareProtectedItemExtendedInfo. -func (a AzureFileshareProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "oldestRecoveryPoint", a.OldestRecoveryPoint) - populate(objectMap, "policyState", a.PolicyState) - populate(objectMap, "recoveryPointCount", a.RecoveryPointCount) - populate(objectMap, "resourceState", a.ResourceState) - populateTimeRFC3339(objectMap, "resourceStateSyncTime", a.ResourceStateSyncTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileshareProtectedItemExtendedInfo. -func (a *AzureFileshareProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "oldestRecoveryPoint": - err = unpopulateTimeRFC3339(val, "OldestRecoveryPoint", &a.OldestRecoveryPoint) - delete(rawMsg, key) - case "policyState": - err = unpopulate(val, "PolicyState", &a.PolicyState) - delete(rawMsg, key) - case "recoveryPointCount": - err = unpopulate(val, "RecoveryPointCount", &a.RecoveryPointCount) - delete(rawMsg, key) - case "resourceState": - err = unpopulate(val, "ResourceState", &a.ResourceState) - delete(rawMsg, key) - case "resourceStateSyncTime": - err = unpopulateTimeRFC3339(val, "ResourceStateSyncTime", &a.ResourceStateSyncTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSClassicComputeVMContainer. -func (a AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - objectMap["containerType"] = ContainerTypeMicrosoftClassicComputeVirtualMachines - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - populate(objectMap, "protectableObjectType", a.ProtectableObjectType) - populate(objectMap, "registrationStatus", a.RegistrationStatus) - populate(objectMap, "resourceGroup", a.ResourceGroup) - populate(objectMap, "virtualMachineId", a.VirtualMachineID) - populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSClassicComputeVMContainer. -func (a *AzureIaaSClassicComputeVMContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &a.ContainerType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) - delete(rawMsg, key) - case "virtualMachineVersion": - err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSClassicComputeVMProtectableItem. -func (a AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - objectMap["protectableItemType"] = "Microsoft.ClassicCompute/virtualMachines" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "resourceGroup", a.ResourceGroup) - populate(objectMap, "virtualMachineId", a.VirtualMachineID) - populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSClassicComputeVMProtectableItem. -func (a *AzureIaaSClassicComputeVMProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) - delete(rawMsg, key) - case "virtualMachineVersion": - err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSClassicComputeVMProtectedItem. -func (a AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "backupSetName", a.BackupSetName) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "createMode", a.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "extendedProperties", a.ExtendedProperties) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthDetails", a.HealthDetails) - populate(objectMap, "healthStatus", a.HealthStatus) - populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", a.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) - populate(objectMap, "kpisHealths", a.KpisHealths) - populate(objectMap, "lastBackupStatus", a.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "protectedItemDataId", a.ProtectedItemDataID) - objectMap["protectedItemType"] = "Microsoft.ClassicCompute/virtualMachines" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "protectionStatus", a.ProtectionStatus) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "virtualMachineId", a.VirtualMachineID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSClassicComputeVMProtectedItem. -func (a *AzureIaaSClassicComputeVMProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &a.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &a.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "extendedProperties": - err = unpopulate(val, "ExtendedProperties", &a.ExtendedProperties) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthDetails": - err = unpopulate(val, "HealthDetails", &a.HealthDetails) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "kpisHealths": - err = unpopulate(val, "KpisHealths", &a.KpisHealths) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) - delete(rawMsg, key) - case "lastBackupTime": - err = unpopulateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "protectedItemDataId": - err = unpopulate(val, "ProtectedItemDataID", &a.ProtectedItemDataID) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSComputeVMContainer. -func (a AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - objectMap["containerType"] = ContainerTypeMicrosoftComputeVirtualMachines - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - populate(objectMap, "protectableObjectType", a.ProtectableObjectType) - populate(objectMap, "registrationStatus", a.RegistrationStatus) - populate(objectMap, "resourceGroup", a.ResourceGroup) - populate(objectMap, "virtualMachineId", a.VirtualMachineID) - populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSComputeVMContainer. -func (a *AzureIaaSComputeVMContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &a.ContainerType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) - delete(rawMsg, key) - case "virtualMachineVersion": - err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSComputeVMProtectableItem. -func (a AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - objectMap["protectableItemType"] = "Microsoft.Compute/virtualMachines" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "resourceGroup", a.ResourceGroup) - populate(objectMap, "virtualMachineId", a.VirtualMachineID) - populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSComputeVMProtectableItem. -func (a *AzureIaaSComputeVMProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) - delete(rawMsg, key) - case "virtualMachineVersion": - err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSComputeVMProtectedItem. -func (a AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "backupSetName", a.BackupSetName) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "createMode", a.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "extendedProperties", a.ExtendedProperties) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthDetails", a.HealthDetails) - populate(objectMap, "healthStatus", a.HealthStatus) - populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", a.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) - populate(objectMap, "kpisHealths", a.KpisHealths) - populate(objectMap, "lastBackupStatus", a.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "protectedItemDataId", a.ProtectedItemDataID) - objectMap["protectedItemType"] = "Microsoft.Compute/virtualMachines" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "protectionStatus", a.ProtectionStatus) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "virtualMachineId", a.VirtualMachineID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSComputeVMProtectedItem. -func (a *AzureIaaSComputeVMProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &a.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &a.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "extendedProperties": - err = unpopulate(val, "ExtendedProperties", &a.ExtendedProperties) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthDetails": - err = unpopulate(val, "HealthDetails", &a.HealthDetails) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "kpisHealths": - err = unpopulate(val, "KpisHealths", &a.KpisHealths) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) - delete(rawMsg, key) - case "lastBackupTime": - err = unpopulateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "protectedItemDataId": - err = unpopulate(val, "ProtectedItemDataID", &a.ProtectedItemDataID) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMErrorInfo. -func (a AzureIaaSVMErrorInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorCode", a.ErrorCode) - populate(objectMap, "errorString", a.ErrorString) - populate(objectMap, "errorTitle", a.ErrorTitle) - populate(objectMap, "recommendations", a.Recommendations) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMHealthDetails. -func (a AzureIaaSVMHealthDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", a.Code) - populate(objectMap, "message", a.Message) - populate(objectMap, "recommendations", a.Recommendations) - populate(objectMap, "title", a.Title) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMJob. -func (a AzureIaaSVMJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionsInfo", a.ActionsInfo) - populate(objectMap, "activityId", a.ActivityID) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "duration", a.Duration) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "entityFriendlyName", a.EntityFriendlyName) - populate(objectMap, "errorDetails", a.ErrorDetails) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "isUserTriggered", a.IsUserTriggered) - objectMap["jobType"] = "AzureIaaSVMJob" - populate(objectMap, "operation", a.Operation) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - populate(objectMap, "status", a.Status) - populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMJob. -func (a *AzureIaaSVMJob) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionsInfo": - err = unpopulate(val, "ActionsInfo", &a.ActionsInfo) - delete(rawMsg, key) - case "activityId": - err = unpopulate(val, "ActivityID", &a.ActivityID) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "duration": - err = unpopulate(val, "Duration", &a.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) - delete(rawMsg, key) - case "entityFriendlyName": - err = unpopulate(val, "EntityFriendlyName", &a.EntityFriendlyName) - delete(rawMsg, key) - case "errorDetails": - err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "isUserTriggered": - err = unpopulate(val, "IsUserTriggered", &a.IsUserTriggered) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &a.JobType) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &a.Operation) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) - delete(rawMsg, key) - case "virtualMachineVersion": - err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMJobExtendedInfo. -func (a AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dynamicErrorMessage", a.DynamicErrorMessage) - populate(objectMap, "estimatedRemainingDuration", a.EstimatedRemainingDuration) - populate(objectMap, "internalPropertyBag", a.InternalPropertyBag) - populate(objectMap, "progressPercentage", a.ProgressPercentage) - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "tasksList", a.TasksList) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMJobTaskDetails. -func (a AzureIaaSVMJobTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "duration", a.Duration) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "instanceId", a.InstanceID) - populate(objectMap, "progressPercentage", a.ProgressPercentage) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - populate(objectMap, "status", a.Status) - populate(objectMap, "taskExecutionDetails", a.TaskExecutionDetails) - populate(objectMap, "taskId", a.TaskID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMJobTaskDetails. -func (a *AzureIaaSVMJobTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "duration": - err = unpopulate(val, "Duration", &a.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) - delete(rawMsg, key) - case "instanceId": - err = unpopulate(val, "InstanceID", &a.InstanceID) - delete(rawMsg, key) - case "progressPercentage": - err = unpopulate(val, "ProgressPercentage", &a.ProgressPercentage) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) - delete(rawMsg, key) - case "taskExecutionDetails": - err = unpopulate(val, "TaskExecutionDetails", &a.TaskExecutionDetails) - delete(rawMsg, key) - case "taskId": - err = unpopulate(val, "TaskID", &a.TaskID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMJobV2. -func (a AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionsInfo", a.ActionsInfo) - populate(objectMap, "activityId", a.ActivityID) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "duration", a.Duration) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "entityFriendlyName", a.EntityFriendlyName) - populate(objectMap, "errorDetails", a.ErrorDetails) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - objectMap["jobType"] = "AzureIaaSVMJobV2" - populate(objectMap, "operation", a.Operation) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - populate(objectMap, "status", a.Status) - populate(objectMap, "virtualMachineVersion", a.VirtualMachineVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMJobV2. -func (a *AzureIaaSVMJobV2) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionsInfo": - err = unpopulate(val, "ActionsInfo", &a.ActionsInfo) - delete(rawMsg, key) - case "activityId": - err = unpopulate(val, "ActivityID", &a.ActivityID) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "duration": - err = unpopulate(val, "Duration", &a.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) - delete(rawMsg, key) - case "entityFriendlyName": - err = unpopulate(val, "EntityFriendlyName", &a.EntityFriendlyName) - delete(rawMsg, key) - case "errorDetails": - err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &a.JobType) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &a.Operation) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) - delete(rawMsg, key) - case "virtualMachineVersion": - err = unpopulate(val, "VirtualMachineVersion", &a.VirtualMachineVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMProtectedItem. -func (a AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "backupSetName", a.BackupSetName) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "createMode", a.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "extendedProperties", a.ExtendedProperties) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthDetails", a.HealthDetails) - populate(objectMap, "healthStatus", a.HealthStatus) - populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", a.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) - populate(objectMap, "kpisHealths", a.KpisHealths) - populate(objectMap, "lastBackupStatus", a.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "protectedItemDataId", a.ProtectedItemDataID) - objectMap["protectedItemType"] = "AzureIaaSVMProtectedItem" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "protectionStatus", a.ProtectionStatus) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "virtualMachineId", a.VirtualMachineID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMProtectedItem. -func (a *AzureIaaSVMProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &a.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &a.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "extendedProperties": - err = unpopulate(val, "ExtendedProperties", &a.ExtendedProperties) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthDetails": - err = unpopulate(val, "HealthDetails", &a.HealthDetails) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "kpisHealths": - err = unpopulate(val, "KpisHealths", &a.KpisHealths) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) - delete(rawMsg, key) - case "lastBackupTime": - err = unpopulateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "protectedItemDataId": - err = unpopulate(val, "ProtectedItemDataID", &a.ProtectedItemDataID) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &a.VirtualMachineID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMProtectedItemExtendedInfo. -func (a AzureIaaSVMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "oldestRecoveryPoint", a.OldestRecoveryPoint) - populate(objectMap, "policyInconsistent", a.PolicyInconsistent) - populate(objectMap, "recoveryPointCount", a.RecoveryPointCount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMProtectedItemExtendedInfo. -func (a *AzureIaaSVMProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "oldestRecoveryPoint": - err = unpopulateTimeRFC3339(val, "OldestRecoveryPoint", &a.OldestRecoveryPoint) - delete(rawMsg, key) - case "policyInconsistent": - err = unpopulate(val, "PolicyInconsistent", &a.PolicyInconsistent) - delete(rawMsg, key) - case "recoveryPointCount": - err = unpopulate(val, "RecoveryPointCount", &a.RecoveryPointCount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureIaaSVMProtectionPolicy. -func (a AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["backupManagementType"] = "AzureIaasVM" - populate(objectMap, "instantRPDetails", a.InstantRPDetails) - populate(objectMap, "instantRpRetentionRangeInDays", a.InstantRpRetentionRangeInDays) - populate(objectMap, "policyType", a.PolicyType) - populate(objectMap, "protectedItemsCount", a.ProtectedItemsCount) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "retentionPolicy", a.RetentionPolicy) - populate(objectMap, "schedulePolicy", a.SchedulePolicy) - populate(objectMap, "timeZone", a.TimeZone) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureIaaSVMProtectionPolicy. -func (a *AzureIaaSVMProtectionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "instantRPDetails": - err = unpopulate(val, "InstantRPDetails", &a.InstantRPDetails) - delete(rawMsg, key) - case "instantRpRetentionRangeInDays": - err = unpopulate(val, "InstantRpRetentionRangeInDays", &a.InstantRpRetentionRangeInDays) - delete(rawMsg, key) - case "policyType": - err = unpopulate(val, "PolicyType", &a.PolicyType) - delete(rawMsg, key) - case "protectedItemsCount": - err = unpopulate(val, "ProtectedItemsCount", &a.ProtectedItemsCount) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "retentionPolicy": - a.RetentionPolicy, err = unmarshalRetentionPolicyClassification(val) - delete(rawMsg, key) - case "schedulePolicy": - a.SchedulePolicy, err = unmarshalSchedulePolicyClassification(val) - delete(rawMsg, key) - case "timeZone": - err = unpopulate(val, "TimeZone", &a.TimeZone) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureRecoveryServiceVaultProtectionIntent. -func (a AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "itemId", a.ItemID) - populate(objectMap, "policyId", a.PolicyID) - objectMap["protectionIntentItemType"] = ProtectionIntentItemTypeRecoveryServiceVaultItem - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureRecoveryServiceVaultProtectionIntent. -func (a *AzureRecoveryServiceVaultProtectionIntent) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "itemId": - err = unpopulate(val, "ItemID", &a.ItemID) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "protectionIntentItemType": - err = unpopulate(val, "ProtectionIntentItemType", &a.ProtectionIntentItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureResourceProtectionIntent. -func (a AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "itemId", a.ItemID) - populate(objectMap, "policyId", a.PolicyID) - objectMap["protectionIntentItemType"] = ProtectionIntentItemTypeAzureResourceItem - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceProtectionIntent. -func (a *AzureResourceProtectionIntent) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "itemId": - err = unpopulate(val, "ItemID", &a.ItemID) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "protectionIntentItemType": - err = unpopulate(val, "ProtectionIntentItemType", &a.ProtectionIntentItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureSQLAGWorkloadContainerProtectionContainer. -func (a AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - objectMap["containerType"] = ContainerTypeSQLAGWorkLoadContainer - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - populateTimeRFC3339(objectMap, "lastUpdatedTime", a.LastUpdatedTime) - populate(objectMap, "operationType", a.OperationType) - populate(objectMap, "protectableObjectType", a.ProtectableObjectType) - populate(objectMap, "registrationStatus", a.RegistrationStatus) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSQLAGWorkloadContainerProtectionContainer. -func (a *AzureSQLAGWorkloadContainerProtectionContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &a.ContainerType) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "lastUpdatedTime": - err = unpopulateTimeRFC3339(val, "LastUpdatedTime", &a.LastUpdatedTime) - delete(rawMsg, key) - case "operationType": - err = unpopulate(val, "OperationType", &a.OperationType) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureSQLContainer. -func (a AzureSQLContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - objectMap["containerType"] = ContainerTypeAzureSQLContainer - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - populate(objectMap, "protectableObjectType", a.ProtectableObjectType) - populate(objectMap, "registrationStatus", a.RegistrationStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSQLContainer. -func (a *AzureSQLContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &a.ContainerType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureSQLProtectedItem. -func (a AzureSQLProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "backupSetName", a.BackupSetName) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "createMode", a.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", a.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "protectedItemDataId", a.ProtectedItemDataID) - objectMap["protectedItemType"] = "Microsoft.Sql/servers/databases" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSQLProtectedItem. -func (a *AzureSQLProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &a.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &a.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "protectedItemDataId": - err = unpopulate(val, "ProtectedItemDataID", &a.ProtectedItemDataID) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureSQLProtectedItemExtendedInfo. -func (a AzureSQLProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "oldestRecoveryPoint", a.OldestRecoveryPoint) - populate(objectMap, "policyState", a.PolicyState) - populate(objectMap, "recoveryPointCount", a.RecoveryPointCount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSQLProtectedItemExtendedInfo. -func (a *AzureSQLProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "oldestRecoveryPoint": - err = unpopulateTimeRFC3339(val, "OldestRecoveryPoint", &a.OldestRecoveryPoint) - delete(rawMsg, key) - case "policyState": - err = unpopulate(val, "PolicyState", &a.PolicyState) - delete(rawMsg, key) - case "recoveryPointCount": - err = unpopulate(val, "RecoveryPointCount", &a.RecoveryPointCount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureSQLProtectionPolicy. -func (a AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["backupManagementType"] = "AzureSql" - populate(objectMap, "protectedItemsCount", a.ProtectedItemsCount) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "retentionPolicy", a.RetentionPolicy) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureSQLProtectionPolicy. -func (a *AzureSQLProtectionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "protectedItemsCount": - err = unpopulate(val, "ProtectedItemsCount", &a.ProtectedItemsCount) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "retentionPolicy": - a.RetentionPolicy, err = unmarshalRetentionPolicyClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureStorageContainer. -func (a AzureStorageContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "acquireStorageAccountLock", a.AcquireStorageAccountLock) - populate(objectMap, "backupManagementType", a.BackupManagementType) - objectMap["containerType"] = ContainerTypeStorageContainer - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - populate(objectMap, "protectableObjectType", a.ProtectableObjectType) - populate(objectMap, "protectedItemCount", a.ProtectedItemCount) - populate(objectMap, "registrationStatus", a.RegistrationStatus) - populate(objectMap, "resourceGroup", a.ResourceGroup) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "storageAccountVersion", a.StorageAccountVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageContainer. -func (a *AzureStorageContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "acquireStorageAccountLock": - err = unpopulate(val, "AcquireStorageAccountLock", &a.AcquireStorageAccountLock) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &a.ContainerType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) - delete(rawMsg, key) - case "protectedItemCount": - err = unpopulate(val, "ProtectedItemCount", &a.ProtectedItemCount) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "storageAccountVersion": - err = unpopulate(val, "StorageAccountVersion", &a.StorageAccountVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureStorageErrorInfo. -func (a AzureStorageErrorInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorCode", a.ErrorCode) - populate(objectMap, "errorString", a.ErrorString) - populate(objectMap, "recommendations", a.Recommendations) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureStorageJob. -func (a AzureStorageJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionsInfo", a.ActionsInfo) - populate(objectMap, "activityId", a.ActivityID) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "duration", a.Duration) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "entityFriendlyName", a.EntityFriendlyName) - populate(objectMap, "errorDetails", a.ErrorDetails) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "isUserTriggered", a.IsUserTriggered) - objectMap["jobType"] = "AzureStorageJob" - populate(objectMap, "operation", a.Operation) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - populate(objectMap, "status", a.Status) - populate(objectMap, "storageAccountName", a.StorageAccountName) - populate(objectMap, "storageAccountVersion", a.StorageAccountVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageJob. -func (a *AzureStorageJob) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionsInfo": - err = unpopulate(val, "ActionsInfo", &a.ActionsInfo) - delete(rawMsg, key) - case "activityId": - err = unpopulate(val, "ActivityID", &a.ActivityID) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "duration": - err = unpopulate(val, "Duration", &a.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) - delete(rawMsg, key) - case "entityFriendlyName": - err = unpopulate(val, "EntityFriendlyName", &a.EntityFriendlyName) - delete(rawMsg, key) - case "errorDetails": - err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "isUserTriggered": - err = unpopulate(val, "IsUserTriggered", &a.IsUserTriggered) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &a.JobType) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &a.Operation) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) - delete(rawMsg, key) - case "storageAccountName": - err = unpopulate(val, "StorageAccountName", &a.StorageAccountName) - delete(rawMsg, key) - case "storageAccountVersion": - err = unpopulate(val, "StorageAccountVersion", &a.StorageAccountVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureStorageJobExtendedInfo. -func (a AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dynamicErrorMessage", a.DynamicErrorMessage) - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "tasksList", a.TasksList) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureStorageProtectableContainer. -func (a AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "containerId", a.ContainerID) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - objectMap["protectableContainerType"] = ContainerTypeStorageContainer - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageProtectableContainer. -func (a *AzureStorageProtectableContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerId": - err = unpopulate(val, "ContainerID", &a.ContainerID) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "protectableContainerType": - err = unpopulate(val, "ProtectableContainerType", &a.ProtectableContainerType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMAppContainerProtectableContainer. -func (a AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "containerId", a.ContainerID) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - objectMap["protectableContainerType"] = ContainerTypeVMAppContainer - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMAppContainerProtectableContainer. -func (a *AzureVMAppContainerProtectableContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerId": - err = unpopulate(val, "ContainerID", &a.ContainerID) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "protectableContainerType": - err = unpopulate(val, "ProtectableContainerType", &a.ProtectableContainerType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMAppContainerProtectionContainer. -func (a AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - objectMap["containerType"] = ContainerTypeVMAppContainer - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - populateTimeRFC3339(objectMap, "lastUpdatedTime", a.LastUpdatedTime) - populate(objectMap, "operationType", a.OperationType) - populate(objectMap, "protectableObjectType", a.ProtectableObjectType) - populate(objectMap, "registrationStatus", a.RegistrationStatus) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMAppContainerProtectionContainer. -func (a *AzureVMAppContainerProtectionContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &a.ContainerType) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "lastUpdatedTime": - err = unpopulateTimeRFC3339(val, "LastUpdatedTime", &a.LastUpdatedTime) - delete(rawMsg, key) - case "operationType": - err = unpopulate(val, "OperationType", &a.OperationType) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMResourceFeatureSupportRequest. -func (a AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["featureType"] = "AzureVMResourceBackup" - populate(objectMap, "vmSku", a.VMSKU) - populate(objectMap, "vmSize", a.VMSize) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMResourceFeatureSupportRequest. -func (a *AzureVMResourceFeatureSupportRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "featureType": - err = unpopulate(val, "FeatureType", &a.FeatureType) - delete(rawMsg, key) - case "vmSku": - err = unpopulate(val, "VMSKU", &a.VMSKU) - delete(rawMsg, key) - case "vmSize": - err = unpopulate(val, "VMSize", &a.VMSize) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadItem. -func (a AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - objectMap["workloadItemType"] = "AzureVmWorkloadItem" - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadItem. -func (a *AzureVMWorkloadItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subWorkloadItemCount": - err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "workloadItemType": - err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadProtectableItem. -func (a AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "isAutoProtected", a.IsAutoProtected) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentUniqueName", a.ParentUniqueName) - populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) - objectMap["protectableItemType"] = "AzureVmWorkloadProtectableItem" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadProtectableItem. -func (a *AzureVMWorkloadProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "isAutoProtected": - err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentUniqueName": - err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) - delete(rawMsg, key) - case "prebackupvalidation": - err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "subprotectableitemcount": - err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadProtectedItem. -func (a AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "backupSetName", a.BackupSetName) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "createMode", a.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", a.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) - populate(objectMap, "kpisHealths", a.KpisHealths) - populate(objectMap, "lastBackupErrorDetail", a.LastBackupErrorDetail) - populate(objectMap, "lastBackupStatus", a.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentType", a.ParentType) - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "protectedItemDataSourceId", a.ProtectedItemDataSourceID) - populate(objectMap, "protectedItemHealthStatus", a.ProtectedItemHealthStatus) - objectMap["protectedItemType"] = "AzureVmWorkloadProtectedItem" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "protectionStatus", a.ProtectionStatus) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadProtectedItem. -func (a *AzureVMWorkloadProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &a.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &a.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "kpisHealths": - err = unpopulate(val, "KpisHealths", &a.KpisHealths) - delete(rawMsg, key) - case "lastBackupErrorDetail": - err = unpopulate(val, "LastBackupErrorDetail", &a.LastBackupErrorDetail) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) - delete(rawMsg, key) - case "lastBackupTime": - err = unpopulateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentType": - err = unpopulate(val, "ParentType", &a.ParentType) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "protectedItemDataSourceId": - err = unpopulate(val, "ProtectedItemDataSourceID", &a.ProtectedItemDataSourceID) - delete(rawMsg, key) - case "protectedItemHealthStatus": - err = unpopulate(val, "ProtectedItemHealthStatus", &a.ProtectedItemHealthStatus) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadProtectedItemExtendedInfo. -func (a AzureVMWorkloadProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "oldestRecoveryPoint", a.OldestRecoveryPoint) - populate(objectMap, "policyState", a.PolicyState) - populate(objectMap, "recoveryModel", a.RecoveryModel) - populate(objectMap, "recoveryPointCount", a.RecoveryPointCount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadProtectedItemExtendedInfo. -func (a *AzureVMWorkloadProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "oldestRecoveryPoint": - err = unpopulateTimeRFC3339(val, "OldestRecoveryPoint", &a.OldestRecoveryPoint) - delete(rawMsg, key) - case "policyState": - err = unpopulate(val, "PolicyState", &a.PolicyState) - delete(rawMsg, key) - case "recoveryModel": - err = unpopulate(val, "RecoveryModel", &a.RecoveryModel) - delete(rawMsg, key) - case "recoveryPointCount": - err = unpopulate(val, "RecoveryPointCount", &a.RecoveryPointCount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadProtectionPolicy. -func (a AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["backupManagementType"] = "AzureWorkload" - populate(objectMap, "makePolicyConsistent", a.MakePolicyConsistent) - populate(objectMap, "protectedItemsCount", a.ProtectedItemsCount) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "settings", a.Settings) - populate(objectMap, "subProtectionPolicy", a.SubProtectionPolicy) - populate(objectMap, "workLoadType", a.WorkLoadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadProtectionPolicy. -func (a *AzureVMWorkloadProtectionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "makePolicyConsistent": - err = unpopulate(val, "MakePolicyConsistent", &a.MakePolicyConsistent) - delete(rawMsg, key) - case "protectedItemsCount": - err = unpopulate(val, "ProtectedItemsCount", &a.ProtectedItemsCount) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "settings": - err = unpopulate(val, "Settings", &a.Settings) - delete(rawMsg, key) - case "subProtectionPolicy": - err = unpopulate(val, "SubProtectionPolicy", &a.SubProtectionPolicy) - delete(rawMsg, key) - case "workLoadType": - err = unpopulate(val, "WorkLoadType", &a.WorkLoadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (a AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "backupSetName", a.BackupSetName) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "createMode", a.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", a.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) - populate(objectMap, "kpisHealths", a.KpisHealths) - populate(objectMap, "lastBackupErrorDetail", a.LastBackupErrorDetail) - populate(objectMap, "lastBackupStatus", a.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentType", a.ParentType) - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "protectedItemDataSourceId", a.ProtectedItemDataSourceID) - populate(objectMap, "protectedItemHealthStatus", a.ProtectedItemHealthStatus) - objectMap["protectedItemType"] = "AzureVmWorkloadSAPAseDatabase" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "protectionStatus", a.ProtectionStatus) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (a *AzureVMWorkloadSAPAseDatabaseProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &a.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &a.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "kpisHealths": - err = unpopulate(val, "KpisHealths", &a.KpisHealths) - delete(rawMsg, key) - case "lastBackupErrorDetail": - err = unpopulate(val, "LastBackupErrorDetail", &a.LastBackupErrorDetail) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) - delete(rawMsg, key) - case "lastBackupTime": - err = unpopulateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentType": - err = unpopulate(val, "ParentType", &a.ParentType) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "protectedItemDataSourceId": - err = unpopulate(val, "ProtectedItemDataSourceID", &a.ProtectedItemDataSourceID) - delete(rawMsg, key) - case "protectedItemHealthStatus": - err = unpopulate(val, "ProtectedItemHealthStatus", &a.ProtectedItemHealthStatus) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (a AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - objectMap["workloadItemType"] = "SAPAseDatabase" - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (a *AzureVMWorkloadSAPAseDatabaseWorkloadItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subWorkloadItemCount": - err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "workloadItemType": - err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPAseSystemProtectableItem. -func (a AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "isAutoProtected", a.IsAutoProtected) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentUniqueName", a.ParentUniqueName) - populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) - objectMap["protectableItemType"] = "SAPAseSystem" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPAseSystemProtectableItem. -func (a *AzureVMWorkloadSAPAseSystemProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "isAutoProtected": - err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentUniqueName": - err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) - delete(rawMsg, key) - case "prebackupvalidation": - err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "subprotectableitemcount": - err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPAseSystemWorkloadItem. -func (a AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - objectMap["workloadItemType"] = "SAPAseSystem" - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPAseSystemWorkloadItem. -func (a *AzureVMWorkloadSAPAseSystemWorkloadItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subWorkloadItemCount": - err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "workloadItemType": - err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (a AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "isAutoProtected", a.IsAutoProtected) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentUniqueName", a.ParentUniqueName) - populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) - objectMap["protectableItemType"] = "SAPHanaDatabase" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (a *AzureVMWorkloadSAPHanaDatabaseProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "isAutoProtected": - err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentUniqueName": - err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) - delete(rawMsg, key) - case "prebackupvalidation": - err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "subprotectableitemcount": - err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (a AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "backupSetName", a.BackupSetName) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "createMode", a.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", a.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) - populate(objectMap, "kpisHealths", a.KpisHealths) - populate(objectMap, "lastBackupErrorDetail", a.LastBackupErrorDetail) - populate(objectMap, "lastBackupStatus", a.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentType", a.ParentType) - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "protectedItemDataSourceId", a.ProtectedItemDataSourceID) - populate(objectMap, "protectedItemHealthStatus", a.ProtectedItemHealthStatus) - objectMap["protectedItemType"] = "AzureVmWorkloadSAPHanaDatabase" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "protectionStatus", a.ProtectionStatus) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (a *AzureVMWorkloadSAPHanaDatabaseProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &a.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &a.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "kpisHealths": - err = unpopulate(val, "KpisHealths", &a.KpisHealths) - delete(rawMsg, key) - case "lastBackupErrorDetail": - err = unpopulate(val, "LastBackupErrorDetail", &a.LastBackupErrorDetail) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) - delete(rawMsg, key) - case "lastBackupTime": - err = unpopulateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentType": - err = unpopulate(val, "ParentType", &a.ParentType) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "protectedItemDataSourceId": - err = unpopulate(val, "ProtectedItemDataSourceID", &a.ProtectedItemDataSourceID) - delete(rawMsg, key) - case "protectedItemHealthStatus": - err = unpopulate(val, "ProtectedItemHealthStatus", &a.ProtectedItemHealthStatus) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (a AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - objectMap["workloadItemType"] = "SAPHanaDatabase" - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (a *AzureVMWorkloadSAPHanaDatabaseWorkloadItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subWorkloadItemCount": - err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "workloadItemType": - err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaSystemProtectableItem. -func (a AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "isAutoProtected", a.IsAutoProtected) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentUniqueName", a.ParentUniqueName) - populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) - objectMap["protectableItemType"] = "SAPHanaSystem" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaSystemProtectableItem. -func (a *AzureVMWorkloadSAPHanaSystemProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "isAutoProtected": - err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentUniqueName": - err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) - delete(rawMsg, key) - case "prebackupvalidation": - err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "subprotectableitemcount": - err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (a AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - objectMap["workloadItemType"] = "SAPHanaSystem" - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (a *AzureVMWorkloadSAPHanaSystemWorkloadItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subWorkloadItemCount": - err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "workloadItemType": - err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (a AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "isAutoProtected", a.IsAutoProtected) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentUniqueName", a.ParentUniqueName) - populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) - objectMap["protectableItemType"] = "SQLAvailabilityGroupContainer" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (a *AzureVMWorkloadSQLAvailabilityGroupProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "isAutoProtected": - err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentUniqueName": - err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) - delete(rawMsg, key) - case "prebackupvalidation": - err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "subprotectableitemcount": - err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLDatabaseProtectableItem. -func (a AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "isAutoProtected", a.IsAutoProtected) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentUniqueName", a.ParentUniqueName) - populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) - objectMap["protectableItemType"] = "SQLDataBase" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLDatabaseProtectableItem. -func (a *AzureVMWorkloadSQLDatabaseProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "isAutoProtected": - err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentUniqueName": - err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) - delete(rawMsg, key) - case "prebackupvalidation": - err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "subprotectableitemcount": - err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLDatabaseProtectedItem. -func (a AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "backupSetName", a.BackupSetName) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "createMode", a.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", a.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", a.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isArchiveEnabled", a.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", a.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", a.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", a.IsScheduledForDeferredDelete) - populate(objectMap, "kpisHealths", a.KpisHealths) - populate(objectMap, "lastBackupErrorDetail", a.LastBackupErrorDetail) - populate(objectMap, "lastBackupStatus", a.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastBackupTime", a.LastBackupTime) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", a.LastRecoveryPoint) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentType", a.ParentType) - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "protectedItemDataSourceId", a.ProtectedItemDataSourceID) - populate(objectMap, "protectedItemHealthStatus", a.ProtectedItemHealthStatus) - objectMap["protectedItemType"] = "AzureVmWorkloadSQLDatabase" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "protectionStatus", a.ProtectionStatus) - populate(objectMap, "resourceGuardOperationRequests", a.ResourceGuardOperationRequests) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLDatabaseProtectedItem. -func (a *AzureVMWorkloadSQLDatabaseProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &a.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &a.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &a.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &a.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &a.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &a.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &a.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &a.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "kpisHealths": - err = unpopulate(val, "KpisHealths", &a.KpisHealths) - delete(rawMsg, key) - case "lastBackupErrorDetail": - err = unpopulate(val, "LastBackupErrorDetail", &a.LastBackupErrorDetail) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &a.LastBackupStatus) - delete(rawMsg, key) - case "lastBackupTime": - err = unpopulateTimeRFC3339(val, "LastBackupTime", &a.LastBackupTime) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &a.LastRecoveryPoint) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentType": - err = unpopulate(val, "ParentType", &a.ParentType) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &a.PolicyName) - delete(rawMsg, key) - case "protectedItemDataSourceId": - err = unpopulate(val, "ProtectedItemDataSourceID", &a.ProtectedItemDataSourceID) - delete(rawMsg, key) - case "protectedItemHealthStatus": - err = unpopulate(val, "ProtectedItemHealthStatus", &a.ProtectedItemHealthStatus) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &a.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &a.ProtectionStatus) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &a.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLDatabaseWorkloadItem. -func (a AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - objectMap["workloadItemType"] = "SQLDataBase" - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLDatabaseWorkloadItem. -func (a *AzureVMWorkloadSQLDatabaseWorkloadItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subWorkloadItemCount": - err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "workloadItemType": - err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLInstanceProtectableItem. -func (a AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "isAutoProtected", a.IsAutoProtected) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "parentUniqueName", a.ParentUniqueName) - populate(objectMap, "prebackupvalidation", a.Prebackupvalidation) - objectMap["protectableItemType"] = "SQLInstance" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - populate(objectMap, "subprotectableitemcount", a.Subprotectableitemcount) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLInstanceProtectableItem. -func (a *AzureVMWorkloadSQLInstanceProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "isAutoProtected": - err = unpopulate(val, "IsAutoProtected", &a.IsAutoProtected) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "parentUniqueName": - err = unpopulate(val, "ParentUniqueName", &a.ParentUniqueName) - delete(rawMsg, key) - case "prebackupvalidation": - err = unpopulate(val, "Prebackupvalidation", &a.Prebackupvalidation) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &a.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "subprotectableitemcount": - err = unpopulate(val, "Subprotectableitemcount", &a.Subprotectableitemcount) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMWorkloadSQLInstanceWorkloadItem. -func (a AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "dataDirectoryPaths", a.DataDirectoryPaths) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "isAutoProtectable", a.IsAutoProtectable) - populate(objectMap, "parentName", a.ParentName) - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "serverName", a.ServerName) - populate(objectMap, "subWorkloadItemCount", a.SubWorkloadItemCount) - populate(objectMap, "subinquireditemcount", a.Subinquireditemcount) - objectMap["workloadItemType"] = "SQLInstance" - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMWorkloadSQLInstanceWorkloadItem. -func (a *AzureVMWorkloadSQLInstanceWorkloadItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "dataDirectoryPaths": - err = unpopulate(val, "DataDirectoryPaths", &a.DataDirectoryPaths) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "isAutoProtectable": - err = unpopulate(val, "IsAutoProtectable", &a.IsAutoProtectable) - delete(rawMsg, key) - case "parentName": - err = unpopulate(val, "ParentName", &a.ParentName) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "serverName": - err = unpopulate(val, "ServerName", &a.ServerName) - delete(rawMsg, key) - case "subWorkloadItemCount": - err = unpopulate(val, "SubWorkloadItemCount", &a.SubWorkloadItemCount) - delete(rawMsg, key) - case "subinquireditemcount": - err = unpopulate(val, "Subinquireditemcount", &a.Subinquireditemcount) - delete(rawMsg, key) - case "workloadItemType": - err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadAutoProtectionIntent. -func (a AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "itemId", a.ItemID) - populate(objectMap, "policyId", a.PolicyID) - objectMap["protectionIntentItemType"] = "ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadAutoProtectionIntent. -func (a *AzureWorkloadAutoProtectionIntent) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "itemId": - err = unpopulate(val, "ItemID", &a.ItemID) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "protectionIntentItemType": - err = unpopulate(val, "ProtectionIntentItemType", &a.ProtectionIntentItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadBackupRequest. -func (a AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupType", a.BackupType) - populate(objectMap, "enableCompression", a.EnableCompression) - objectMap["objectType"] = "AzureWorkloadBackupRequest" - populateTimeRFC3339(objectMap, "recoveryPointExpiryTimeInUTC", a.RecoveryPointExpiryTimeInUTC) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadBackupRequest. -func (a *AzureWorkloadBackupRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupType": - err = unpopulate(val, "BackupType", &a.BackupType) - delete(rawMsg, key) - case "enableCompression": - err = unpopulate(val, "EnableCompression", &a.EnableCompression) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointExpiryTimeInUTC": - err = unpopulateTimeRFC3339(val, "RecoveryPointExpiryTimeInUTC", &a.RecoveryPointExpiryTimeInUTC) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadContainer. -func (a AzureWorkloadContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - objectMap["containerType"] = ContainerTypeAzureWorkloadContainer - populate(objectMap, "extendedInfo", a.ExtendedInfo) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "healthStatus", a.HealthStatus) - populateTimeRFC3339(objectMap, "lastUpdatedTime", a.LastUpdatedTime) - populate(objectMap, "operationType", a.OperationType) - populate(objectMap, "protectableObjectType", a.ProtectableObjectType) - populate(objectMap, "registrationStatus", a.RegistrationStatus) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadContainer. -func (a *AzureWorkloadContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &a.ContainerType) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &a.HealthStatus) - delete(rawMsg, key) - case "lastUpdatedTime": - err = unpopulateTimeRFC3339(val, "LastUpdatedTime", &a.LastUpdatedTime) - delete(rawMsg, key) - case "operationType": - err = unpopulate(val, "OperationType", &a.OperationType) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &a.ProtectableObjectType) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &a.RegistrationStatus) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadContainerAutoProtectionIntent. -func (a AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "itemId", a.ItemID) - populate(objectMap, "policyId", a.PolicyID) - objectMap["protectionIntentItemType"] = ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadContainerAutoProtectionIntent. -func (a *AzureWorkloadContainerAutoProtectionIntent) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "itemId": - err = unpopulate(val, "ItemID", &a.ItemID) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "protectionIntentItemType": - err = unpopulate(val, "ProtectionIntentItemType", &a.ProtectionIntentItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadContainerExtendedInfo. -func (a AzureWorkloadContainerExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hostServerName", a.HostServerName) - populate(objectMap, "inquiryInfo", a.InquiryInfo) - populate(objectMap, "nodesList", a.NodesList) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadErrorInfo. -func (a AzureWorkloadErrorInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "additionalDetails", a.AdditionalDetails) - populate(objectMap, "errorCode", a.ErrorCode) - populate(objectMap, "errorString", a.ErrorString) - populate(objectMap, "errorTitle", a.ErrorTitle) - populate(objectMap, "recommendations", a.Recommendations) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadJob. -func (a AzureWorkloadJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionsInfo", a.ActionsInfo) - populate(objectMap, "activityId", a.ActivityID) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "duration", a.Duration) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "entityFriendlyName", a.EntityFriendlyName) - populate(objectMap, "errorDetails", a.ErrorDetails) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - objectMap["jobType"] = "AzureWorkloadJob" - populate(objectMap, "operation", a.Operation) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - populate(objectMap, "status", a.Status) - populate(objectMap, "workloadType", a.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadJob. -func (a *AzureWorkloadJob) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionsInfo": - err = unpopulate(val, "ActionsInfo", &a.ActionsInfo) - delete(rawMsg, key) - case "activityId": - err = unpopulate(val, "ActivityID", &a.ActivityID) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "duration": - err = unpopulate(val, "Duration", &a.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) - delete(rawMsg, key) - case "entityFriendlyName": - err = unpopulate(val, "EntityFriendlyName", &a.EntityFriendlyName) - delete(rawMsg, key) - case "errorDetails": - err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &a.JobType) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &a.Operation) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &a.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadJobExtendedInfo. -func (a AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dynamicErrorMessage", a.DynamicErrorMessage) - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "tasksList", a.TasksList) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadPointInTimeRecoveryPoint. -func (a AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureWorkloadPointInTimeRecoveryPoint" - populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) - populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) - populateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) - populate(objectMap, "timeRanges", a.TimeRanges) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadPointInTimeRecoveryPoint. -func (a *AzureWorkloadPointInTimeRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointMoveReadinessInfo": - err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) - delete(rawMsg, key) - case "recoveryPointTierDetails": - err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) - delete(rawMsg, key) - case "recoveryPointTimeInUTC": - err = unpopulateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) - delete(rawMsg, key) - case "timeRanges": - err = unpopulate(val, "TimeRanges", &a.TimeRanges) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadPointInTimeRestoreRequest. -func (a AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureWorkloadPointInTimeRestoreRequest" - populateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "recoveryMode", a.RecoveryMode) - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetInfo", a.TargetInfo) - populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadPointInTimeRestoreRequest. -func (a *AzureWorkloadPointInTimeRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "pointInTime": - err = unpopulateTimeRFC3339(val, "PointInTime", &a.PointInTime) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "recoveryMode": - err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetInfo": - err = unpopulate(val, "TargetInfo", &a.TargetInfo) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadRecoveryPoint. -func (a AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureWorkloadRecoveryPoint" - populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) - populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) - populateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadRecoveryPoint. -func (a *AzureWorkloadRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointMoveReadinessInfo": - err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) - delete(rawMsg, key) - case "recoveryPointTierDetails": - err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) - delete(rawMsg, key) - case "recoveryPointTimeInUTC": - err = unpopulateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadRestoreRequest. -func (a AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureWorkloadRestoreRequest" - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "recoveryMode", a.RecoveryMode) - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetInfo", a.TargetInfo) - populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadRestoreRequest. -func (a *AzureWorkloadRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "recoveryMode": - err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetInfo": - err = unpopulate(val, "TargetInfo", &a.TargetInfo) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (a AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" - populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) - populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) - populateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) - populate(objectMap, "timeRanges", a.TimeRanges) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (a *AzureWorkloadSAPHanaPointInTimeRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointMoveReadinessInfo": - err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) - delete(rawMsg, key) - case "recoveryPointTierDetails": - err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) - delete(rawMsg, key) - case "recoveryPointTimeInUTC": - err = unpopulateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) - delete(rawMsg, key) - case "timeRanges": - err = unpopulate(val, "TimeRanges", &a.TimeRanges) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (a AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" - populateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "recoveryMode", a.RecoveryMode) - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetInfo", a.TargetInfo) - populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (a *AzureWorkloadSAPHanaPointInTimeRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "pointInTime": - err = unpopulateTimeRFC3339(val, "PointInTime", &a.PointInTime) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "recoveryMode": - err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetInfo": - err = unpopulate(val, "TargetInfo", &a.TargetInfo) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. -func (a AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest" - populateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "recoveryMode", a.RecoveryMode) - populate(objectMap, "recoveryPointRehydrationInfo", a.RecoveryPointRehydrationInfo) - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetInfo", a.TargetInfo) - populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest. -func (a *AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "pointInTime": - err = unpopulateTimeRFC3339(val, "PointInTime", &a.PointInTime) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "recoveryMode": - err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) - delete(rawMsg, key) - case "recoveryPointRehydrationInfo": - err = unpopulate(val, "RecoveryPointRehydrationInfo", &a.RecoveryPointRehydrationInfo) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetInfo": - err = unpopulate(val, "TargetInfo", &a.TargetInfo) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaRecoveryPoint. -func (a AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureWorkloadSAPHanaRecoveryPoint" - populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) - populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) - populateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaRecoveryPoint. -func (a *AzureWorkloadSAPHanaRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointMoveReadinessInfo": - err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) - delete(rawMsg, key) - case "recoveryPointTierDetails": - err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) - delete(rawMsg, key) - case "recoveryPointTimeInUTC": - err = unpopulateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaRestoreRequest. -func (a AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureWorkloadSAPHanaRestoreRequest" - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "recoveryMode", a.RecoveryMode) - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetInfo", a.TargetInfo) - populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaRestoreRequest. -func (a *AzureWorkloadSAPHanaRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "recoveryMode": - err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetInfo": - err = unpopulate(val, "TargetInfo", &a.TargetInfo) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSAPHanaRestoreWithRehydrateRequest. -func (a AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "AzureWorkloadSAPHanaRestoreWithRehydrateRequest" - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "recoveryMode", a.RecoveryMode) - populate(objectMap, "recoveryPointRehydrationInfo", a.RecoveryPointRehydrationInfo) - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetInfo", a.TargetInfo) - populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSAPHanaRestoreWithRehydrateRequest. -func (a *AzureWorkloadSAPHanaRestoreWithRehydrateRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "recoveryMode": - err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) - delete(rawMsg, key) - case "recoveryPointRehydrationInfo": - err = unpopulate(val, "RecoveryPointRehydrationInfo", &a.RecoveryPointRehydrationInfo) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetInfo": - err = unpopulate(val, "TargetInfo", &a.TargetInfo) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLAutoProtectionIntent. -func (a AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", a.BackupManagementType) - populate(objectMap, "itemId", a.ItemID) - populate(objectMap, "policyId", a.PolicyID) - objectMap["protectionIntentItemType"] = "ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent" - populate(objectMap, "protectionState", a.ProtectionState) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "workloadItemType", a.WorkloadItemType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLAutoProtectionIntent. -func (a *AzureWorkloadSQLAutoProtectionIntent) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &a.BackupManagementType) - delete(rawMsg, key) - case "itemId": - err = unpopulate(val, "ItemID", &a.ItemID) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "protectionIntentItemType": - err = unpopulate(val, "ProtectionIntentItemType", &a.ProtectionIntentItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &a.ProtectionState) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "workloadItemType": - err = unpopulate(val, "WorkloadItemType", &a.WorkloadItemType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. -func (a AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - objectMap["objectType"] = "AzureWorkloadSQLPointInTimeRecoveryPoint" - populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) - populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) - populateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) - populate(objectMap, "timeRanges", a.TimeRanges) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLPointInTimeRecoveryPoint. -func (a *AzureWorkloadSQLPointInTimeRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointMoveReadinessInfo": - err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) - delete(rawMsg, key) - case "recoveryPointTierDetails": - err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) - delete(rawMsg, key) - case "recoveryPointTimeInUTC": - err = unpopulateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) - delete(rawMsg, key) - case "timeRanges": - err = unpopulate(val, "TimeRanges", &a.TimeRanges) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLPointInTimeRestoreRequest. -func (a AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "alternateDirectoryPaths", a.AlternateDirectoryPaths) - populate(objectMap, "isNonRecoverable", a.IsNonRecoverable) - objectMap["objectType"] = "AzureWorkloadSQLPointInTimeRestoreRequest" - populateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "recoveryMode", a.RecoveryMode) - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "shouldUseAlternateTargetLocation", a.ShouldUseAlternateTargetLocation) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetInfo", a.TargetInfo) - populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLPointInTimeRestoreRequest. -func (a *AzureWorkloadSQLPointInTimeRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "alternateDirectoryPaths": - err = unpopulate(val, "AlternateDirectoryPaths", &a.AlternateDirectoryPaths) - delete(rawMsg, key) - case "isNonRecoverable": - err = unpopulate(val, "IsNonRecoverable", &a.IsNonRecoverable) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "pointInTime": - err = unpopulateTimeRFC3339(val, "PointInTime", &a.PointInTime) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "recoveryMode": - err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "shouldUseAlternateTargetLocation": - err = unpopulate(val, "ShouldUseAlternateTargetLocation", &a.ShouldUseAlternateTargetLocation) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetInfo": - err = unpopulate(val, "TargetInfo", &a.TargetInfo) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. -func (a AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "alternateDirectoryPaths", a.AlternateDirectoryPaths) - populate(objectMap, "isNonRecoverable", a.IsNonRecoverable) - objectMap["objectType"] = "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest" - populateTimeRFC3339(objectMap, "pointInTime", a.PointInTime) - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "recoveryMode", a.RecoveryMode) - populate(objectMap, "recoveryPointRehydrationInfo", a.RecoveryPointRehydrationInfo) - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "shouldUseAlternateTargetLocation", a.ShouldUseAlternateTargetLocation) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetInfo", a.TargetInfo) - populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest. -func (a *AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "alternateDirectoryPaths": - err = unpopulate(val, "AlternateDirectoryPaths", &a.AlternateDirectoryPaths) - delete(rawMsg, key) - case "isNonRecoverable": - err = unpopulate(val, "IsNonRecoverable", &a.IsNonRecoverable) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "pointInTime": - err = unpopulateTimeRFC3339(val, "PointInTime", &a.PointInTime) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "recoveryMode": - err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) - delete(rawMsg, key) - case "recoveryPointRehydrationInfo": - err = unpopulate(val, "RecoveryPointRehydrationInfo", &a.RecoveryPointRehydrationInfo) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "shouldUseAlternateTargetLocation": - err = unpopulate(val, "ShouldUseAlternateTargetLocation", &a.ShouldUseAlternateTargetLocation) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetInfo": - err = unpopulate(val, "TargetInfo", &a.TargetInfo) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLRecoveryPoint. -func (a AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extendedInfo", a.ExtendedInfo) - objectMap["objectType"] = "AzureWorkloadSQLRecoveryPoint" - populate(objectMap, "recoveryPointMoveReadinessInfo", a.RecoveryPointMoveReadinessInfo) - populate(objectMap, "recoveryPointTierDetails", a.RecoveryPointTierDetails) - populateTimeRFC3339(objectMap, "recoveryPointTimeInUTC", a.RecoveryPointTimeInUTC) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLRecoveryPoint. -func (a *AzureWorkloadSQLRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &a.ExtendedInfo) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "recoveryPointMoveReadinessInfo": - err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &a.RecoveryPointMoveReadinessInfo) - delete(rawMsg, key) - case "recoveryPointTierDetails": - err = unpopulate(val, "RecoveryPointTierDetails", &a.RecoveryPointTierDetails) - delete(rawMsg, key) - case "recoveryPointTimeInUTC": - err = unpopulateTimeRFC3339(val, "RecoveryPointTimeInUTC", &a.RecoveryPointTimeInUTC) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLRecoveryPointExtendedInfo. -func (a AzureWorkloadSQLRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataDirectoryPaths", a.DataDirectoryPaths) - populateTimeRFC3339(objectMap, "dataDirectoryTimeInUTC", a.DataDirectoryTimeInUTC) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLRecoveryPointExtendedInfo. -func (a *AzureWorkloadSQLRecoveryPointExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataDirectoryPaths": - err = unpopulate(val, "DataDirectoryPaths", &a.DataDirectoryPaths) - delete(rawMsg, key) - case "dataDirectoryTimeInUTC": - err = unpopulateTimeRFC3339(val, "DataDirectoryTimeInUTC", &a.DataDirectoryTimeInUTC) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLRestoreRequest. -func (a AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "alternateDirectoryPaths", a.AlternateDirectoryPaths) - populate(objectMap, "isNonRecoverable", a.IsNonRecoverable) - objectMap["objectType"] = "AzureWorkloadSQLRestoreRequest" - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "recoveryMode", a.RecoveryMode) - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "shouldUseAlternateTargetLocation", a.ShouldUseAlternateTargetLocation) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetInfo", a.TargetInfo) - populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLRestoreRequest. -func (a *AzureWorkloadSQLRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "alternateDirectoryPaths": - err = unpopulate(val, "AlternateDirectoryPaths", &a.AlternateDirectoryPaths) - delete(rawMsg, key) - case "isNonRecoverable": - err = unpopulate(val, "IsNonRecoverable", &a.IsNonRecoverable) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "recoveryMode": - err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "shouldUseAlternateTargetLocation": - err = unpopulate(val, "ShouldUseAlternateTargetLocation", &a.ShouldUseAlternateTargetLocation) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetInfo": - err = unpopulate(val, "TargetInfo", &a.TargetInfo) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. -func (a AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "alternateDirectoryPaths", a.AlternateDirectoryPaths) - populate(objectMap, "isNonRecoverable", a.IsNonRecoverable) - objectMap["objectType"] = "AzureWorkloadSQLRestoreWithRehydrateRequest" - populate(objectMap, "propertyBag", a.PropertyBag) - populate(objectMap, "recoveryMode", a.RecoveryMode) - populate(objectMap, "recoveryPointRehydrationInfo", a.RecoveryPointRehydrationInfo) - populate(objectMap, "recoveryType", a.RecoveryType) - populate(objectMap, "shouldUseAlternateTargetLocation", a.ShouldUseAlternateTargetLocation) - populate(objectMap, "sourceResourceId", a.SourceResourceID) - populate(objectMap, "targetInfo", a.TargetInfo) - populate(objectMap, "targetVirtualMachineId", a.TargetVirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureWorkloadSQLRestoreWithRehydrateRequest. -func (a *AzureWorkloadSQLRestoreWithRehydrateRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "alternateDirectoryPaths": - err = unpopulate(val, "AlternateDirectoryPaths", &a.AlternateDirectoryPaths) - delete(rawMsg, key) - case "isNonRecoverable": - err = unpopulate(val, "IsNonRecoverable", &a.IsNonRecoverable) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &a.ObjectType) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "recoveryMode": - err = unpopulate(val, "RecoveryMode", &a.RecoveryMode) - delete(rawMsg, key) - case "recoveryPointRehydrationInfo": - err = unpopulate(val, "RecoveryPointRehydrationInfo", &a.RecoveryPointRehydrationInfo) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &a.RecoveryType) - delete(rawMsg, key) - case "shouldUseAlternateTargetLocation": - err = unpopulate(val, "ShouldUseAlternateTargetLocation", &a.ShouldUseAlternateTargetLocation) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &a.SourceResourceID) - delete(rawMsg, key) - case "targetInfo": - err = unpopulate(val, "TargetInfo", &a.TargetInfo) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &a.TargetVirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BMSRPQueryObject. -func (b *BMSRPQueryObject) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endDate": - err = unpopulateTimeRFC3339(val, "EndDate", &b.EndDate) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &b.ExtendedInfo) - delete(rawMsg, key) - case "moveReadyRPOnly": - err = unpopulate(val, "MoveReadyRPOnly", &b.MoveReadyRPOnly) - delete(rawMsg, key) - case "restorePointQueryType": - err = unpopulate(val, "RestorePointQueryType", &b.RestorePointQueryType) - delete(rawMsg, key) - case "startDate": - err = unpopulateTimeRFC3339(val, "StartDate", &b.StartDate) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackupEngineBaseResource. -func (b BackupEngineBaseResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", b.ETag) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupEngineBaseResource. -func (b *BackupEngineBaseResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &b.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &b.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - b.Properties, err = unmarshalBackupEngineBaseClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &b.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackupEngineExtendedInfo. -func (b BackupEngineExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "availableDiskSpace", b.AvailableDiskSpace) - populate(objectMap, "azureProtectedInstances", b.AzureProtectedInstances) - populate(objectMap, "databaseName", b.DatabaseName) - populate(objectMap, "diskCount", b.DiskCount) - populate(objectMap, "protectedItemsCount", b.ProtectedItemsCount) - populate(objectMap, "protectedServersCount", b.ProtectedServersCount) - populateTimeRFC3339(objectMap, "refreshedAt", b.RefreshedAt) - populate(objectMap, "usedDiskSpace", b.UsedDiskSpace) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupEngineExtendedInfo. -func (b *BackupEngineExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "availableDiskSpace": - err = unpopulate(val, "AvailableDiskSpace", &b.AvailableDiskSpace) - delete(rawMsg, key) - case "azureProtectedInstances": - err = unpopulate(val, "AzureProtectedInstances", &b.AzureProtectedInstances) - delete(rawMsg, key) - case "databaseName": - err = unpopulate(val, "DatabaseName", &b.DatabaseName) - delete(rawMsg, key) - case "diskCount": - err = unpopulate(val, "DiskCount", &b.DiskCount) - delete(rawMsg, key) - case "protectedItemsCount": - err = unpopulate(val, "ProtectedItemsCount", &b.ProtectedItemsCount) - delete(rawMsg, key) - case "protectedServersCount": - err = unpopulate(val, "ProtectedServersCount", &b.ProtectedServersCount) - delete(rawMsg, key) - case "refreshedAt": - err = unpopulateTimeRFC3339(val, "RefreshedAt", &b.RefreshedAt) - delete(rawMsg, key) - case "usedDiskSpace": - err = unpopulate(val, "UsedDiskSpace", &b.UsedDiskSpace) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupManagementUsage. -func (b *BackupManagementUsage) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentValue": - err = unpopulate(val, "CurrentValue", &b.CurrentValue) - delete(rawMsg, key) - case "limit": - err = unpopulate(val, "Limit", &b.Limit) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &b.NextResetTime) - delete(rawMsg, key) - case "quotaPeriod": - err = unpopulate(val, "QuotaPeriod", &b.QuotaPeriod) - delete(rawMsg, key) - case "unit": - err = unpopulate(val, "Unit", &b.Unit) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackupRequestResource. -func (b BackupRequestResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", b.ETag) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BackupRequestResource. -func (b *BackupRequestResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &b.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &b.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &b.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &b.Name) - delete(rawMsg, key) - case "properties": - b.Properties, err = unmarshalBackupRequestClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &b.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &b.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BackupResourceConfigResource. -func (b BackupResourceConfigResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", b.ETag) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupResourceEncryptionConfigExtendedResource. -func (b BackupResourceEncryptionConfigExtendedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", b.ETag) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupResourceEncryptionConfigResource. -func (b BackupResourceEncryptionConfigResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", b.ETag) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupResourceVaultConfig. -func (b BackupResourceVaultConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enhancedSecurityState", b.EnhancedSecurityState) - populate(objectMap, "isSoftDeleteFeatureStateEditable", b.IsSoftDeleteFeatureStateEditable) - populate(objectMap, "resourceGuardOperationRequests", b.ResourceGuardOperationRequests) - populate(objectMap, "softDeleteFeatureState", b.SoftDeleteFeatureState) - populate(objectMap, "storageModelType", b.StorageModelType) - populate(objectMap, "storageType", b.StorageType) - populate(objectMap, "storageTypeState", b.StorageTypeState) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BackupResourceVaultConfigResource. -func (b BackupResourceVaultConfigResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", b.ETag) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DPMContainerExtendedInfo. -func (d DPMContainerExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "lastRefreshedAt", d.LastRefreshedAt) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DPMContainerExtendedInfo. -func (d *DPMContainerExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "lastRefreshedAt": - err = unpopulateTimeRFC3339(val, "LastRefreshedAt", &d.LastRefreshedAt) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DPMProtectedItem. -func (d DPMProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupEngineName", d.BackupEngineName) - populate(objectMap, "backupManagementType", d.BackupManagementType) - populate(objectMap, "backupSetName", d.BackupSetName) - populate(objectMap, "containerName", d.ContainerName) - populate(objectMap, "createMode", d.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", d.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", d.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", d.ExtendedInfo) - populate(objectMap, "friendlyName", d.FriendlyName) - populate(objectMap, "isArchiveEnabled", d.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", d.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", d.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", d.IsScheduledForDeferredDelete) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", d.LastRecoveryPoint) - populate(objectMap, "policyId", d.PolicyID) - populate(objectMap, "policyName", d.PolicyName) - objectMap["protectedItemType"] = "DPMProtectedItem" - populate(objectMap, "protectionState", d.ProtectionState) - populate(objectMap, "resourceGuardOperationRequests", d.ResourceGuardOperationRequests) - populate(objectMap, "sourceResourceId", d.SourceResourceID) - populate(objectMap, "workloadType", d.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DPMProtectedItem. -func (d *DPMProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupEngineName": - err = unpopulate(val, "BackupEngineName", &d.BackupEngineName) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &d.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &d.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &d.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &d.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &d.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &d.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &d.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &d.FriendlyName) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &d.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &d.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &d.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &d.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &d.LastRecoveryPoint) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &d.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &d.PolicyName) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &d.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &d.ProtectionState) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &d.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &d.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &d.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DPMProtectedItemExtendedInfo. -func (d DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskStorageUsedInBytes", d.DiskStorageUsedInBytes) - populate(objectMap, "isCollocated", d.IsCollocated) - populate(objectMap, "isPresentOnCloud", d.IsPresentOnCloud) - populate(objectMap, "lastBackupStatus", d.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastRefreshedAt", d.LastRefreshedAt) - populateTimeRFC3339(objectMap, "oldestRecoveryPoint", d.OldestRecoveryPoint) - populateTimeRFC3339(objectMap, "onPremiseLatestRecoveryPoint", d.OnPremiseLatestRecoveryPoint) - populateTimeRFC3339(objectMap, "onPremiseOldestRecoveryPoint", d.OnPremiseOldestRecoveryPoint) - populate(objectMap, "onPremiseRecoveryPointCount", d.OnPremiseRecoveryPointCount) - populate(objectMap, "protectableObjectLoadPath", d.ProtectableObjectLoadPath) - populate(objectMap, "protected", d.Protected) - populate(objectMap, "protectionGroupName", d.ProtectionGroupName) - populate(objectMap, "recoveryPointCount", d.RecoveryPointCount) - populate(objectMap, "totalDiskStorageSizeInBytes", d.TotalDiskStorageSizeInBytes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DPMProtectedItemExtendedInfo. -func (d *DPMProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskStorageUsedInBytes": - err = unpopulate(val, "DiskStorageUsedInBytes", &d.DiskStorageUsedInBytes) - delete(rawMsg, key) - case "isCollocated": - err = unpopulate(val, "IsCollocated", &d.IsCollocated) - delete(rawMsg, key) - case "isPresentOnCloud": - err = unpopulate(val, "IsPresentOnCloud", &d.IsPresentOnCloud) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &d.LastBackupStatus) - delete(rawMsg, key) - case "lastRefreshedAt": - err = unpopulateTimeRFC3339(val, "LastRefreshedAt", &d.LastRefreshedAt) - delete(rawMsg, key) - case "oldestRecoveryPoint": - err = unpopulateTimeRFC3339(val, "OldestRecoveryPoint", &d.OldestRecoveryPoint) - delete(rawMsg, key) - case "onPremiseLatestRecoveryPoint": - err = unpopulateTimeRFC3339(val, "OnPremiseLatestRecoveryPoint", &d.OnPremiseLatestRecoveryPoint) - delete(rawMsg, key) - case "onPremiseOldestRecoveryPoint": - err = unpopulateTimeRFC3339(val, "OnPremiseOldestRecoveryPoint", &d.OnPremiseOldestRecoveryPoint) - delete(rawMsg, key) - case "onPremiseRecoveryPointCount": - err = unpopulate(val, "OnPremiseRecoveryPointCount", &d.OnPremiseRecoveryPointCount) - delete(rawMsg, key) - case "protectableObjectLoadPath": - err = unpopulate(val, "ProtectableObjectLoadPath", &d.ProtectableObjectLoadPath) - delete(rawMsg, key) - case "protected": - err = unpopulate(val, "Protected", &d.Protected) - delete(rawMsg, key) - case "protectionGroupName": - err = unpopulate(val, "ProtectionGroupName", &d.ProtectionGroupName) - delete(rawMsg, key) - case "recoveryPointCount": - err = unpopulate(val, "RecoveryPointCount", &d.RecoveryPointCount) - delete(rawMsg, key) - case "totalDiskStorageSizeInBytes": - err = unpopulate(val, "TotalDiskStorageSizeInBytes", &d.TotalDiskStorageSizeInBytes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DailyRetentionFormat. -func (d DailyRetentionFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "daysOfTheMonth", d.DaysOfTheMonth) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DailyRetentionSchedule. -func (d DailyRetentionSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "retentionDuration", d.RetentionDuration) - aux := make([]*timeRFC3339, len(d.RetentionTimes), len(d.RetentionTimes)) - for i := 0; i < len(d.RetentionTimes); i++ { - aux[i] = (*timeRFC3339)(d.RetentionTimes[i]) - } - populate(objectMap, "retentionTimes", aux) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DailySchedule. -func (d DailySchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - aux := make([]*timeRFC3339, len(d.ScheduleRunTimes), len(d.ScheduleRunTimes)) - for i := 0; i < len(d.ScheduleRunTimes); i++ { - aux[i] = (*timeRFC3339)(d.ScheduleRunTimes[i]) - } - populate(objectMap, "scheduleRunTimes", aux) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DiskExclusionProperties. -func (d DiskExclusionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskLunList", d.DiskLunList) - populate(objectMap, "isInclusionList", d.IsInclusionList) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DpmBackupEngine. -func (d DpmBackupEngine) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureBackupAgentVersion", d.AzureBackupAgentVersion) - populate(objectMap, "backupEngineId", d.BackupEngineID) - populate(objectMap, "backupEngineState", d.BackupEngineState) - objectMap["backupEngineType"] = BackupEngineTypeDpmBackupEngine - populate(objectMap, "backupManagementType", d.BackupManagementType) - populate(objectMap, "canReRegister", d.CanReRegister) - populate(objectMap, "dpmVersion", d.DpmVersion) - populate(objectMap, "extendedInfo", d.ExtendedInfo) - populate(objectMap, "friendlyName", d.FriendlyName) - populate(objectMap, "healthStatus", d.HealthStatus) - populate(objectMap, "isAzureBackupAgentUpgradeAvailable", d.IsAzureBackupAgentUpgradeAvailable) - populate(objectMap, "isDpmUpgradeAvailable", d.IsDpmUpgradeAvailable) - populate(objectMap, "registrationStatus", d.RegistrationStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DpmBackupEngine. -func (d *DpmBackupEngine) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureBackupAgentVersion": - err = unpopulate(val, "AzureBackupAgentVersion", &d.AzureBackupAgentVersion) - delete(rawMsg, key) - case "backupEngineId": - err = unpopulate(val, "BackupEngineID", &d.BackupEngineID) - delete(rawMsg, key) - case "backupEngineState": - err = unpopulate(val, "BackupEngineState", &d.BackupEngineState) - delete(rawMsg, key) - case "backupEngineType": - err = unpopulate(val, "BackupEngineType", &d.BackupEngineType) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &d.BackupManagementType) - delete(rawMsg, key) - case "canReRegister": - err = unpopulate(val, "CanReRegister", &d.CanReRegister) - delete(rawMsg, key) - case "dpmVersion": - err = unpopulate(val, "DpmVersion", &d.DpmVersion) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &d.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &d.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &d.HealthStatus) - delete(rawMsg, key) - case "isAzureBackupAgentUpgradeAvailable": - err = unpopulate(val, "IsAzureBackupAgentUpgradeAvailable", &d.IsAzureBackupAgentUpgradeAvailable) - delete(rawMsg, key) - case "isDpmUpgradeAvailable": - err = unpopulate(val, "IsDpmUpgradeAvailable", &d.IsDpmUpgradeAvailable) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DpmContainer. -func (d DpmContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", d.BackupManagementType) - populate(objectMap, "canReRegister", d.CanReRegister) - populate(objectMap, "containerId", d.ContainerID) - objectMap["containerType"] = ContainerTypeDPMContainer - populate(objectMap, "dpmAgentVersion", d.DpmAgentVersion) - populate(objectMap, "dpmServers", d.DpmServers) - populate(objectMap, "extendedInfo", d.ExtendedInfo) - populate(objectMap, "friendlyName", d.FriendlyName) - populate(objectMap, "healthStatus", d.HealthStatus) - populate(objectMap, "protectableObjectType", d.ProtectableObjectType) - populate(objectMap, "protectedItemCount", d.ProtectedItemCount) - populate(objectMap, "protectionStatus", d.ProtectionStatus) - populate(objectMap, "registrationStatus", d.RegistrationStatus) - populate(objectMap, "upgradeAvailable", d.UpgradeAvailable) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DpmContainer. -func (d *DpmContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &d.BackupManagementType) - delete(rawMsg, key) - case "canReRegister": - err = unpopulate(val, "CanReRegister", &d.CanReRegister) - delete(rawMsg, key) - case "containerId": - err = unpopulate(val, "ContainerID", &d.ContainerID) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &d.ContainerType) - delete(rawMsg, key) - case "dpmAgentVersion": - err = unpopulate(val, "DpmAgentVersion", &d.DpmAgentVersion) - delete(rawMsg, key) - case "dpmServers": - err = unpopulate(val, "DpmServers", &d.DpmServers) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &d.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &d.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &d.HealthStatus) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &d.ProtectableObjectType) - delete(rawMsg, key) - case "protectedItemCount": - err = unpopulate(val, "ProtectedItemCount", &d.ProtectedItemCount) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &d.ProtectionStatus) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &d.RegistrationStatus) - delete(rawMsg, key) - case "upgradeAvailable": - err = unpopulate(val, "UpgradeAvailable", &d.UpgradeAvailable) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DpmErrorInfo. -func (d DpmErrorInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorString", d.ErrorString) - populate(objectMap, "recommendations", d.Recommendations) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DpmJob. -func (d DpmJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionsInfo", d.ActionsInfo) - populate(objectMap, "activityId", d.ActivityID) - populate(objectMap, "backupManagementType", d.BackupManagementType) - populate(objectMap, "containerName", d.ContainerName) - populate(objectMap, "containerType", d.ContainerType) - populate(objectMap, "dpmServerName", d.DpmServerName) - populate(objectMap, "duration", d.Duration) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) - populate(objectMap, "entityFriendlyName", d.EntityFriendlyName) - populate(objectMap, "errorDetails", d.ErrorDetails) - populate(objectMap, "extendedInfo", d.ExtendedInfo) - objectMap["jobType"] = "DpmJob" - populate(objectMap, "operation", d.Operation) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) - populate(objectMap, "status", d.Status) - populate(objectMap, "workloadType", d.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DpmJob. -func (d *DpmJob) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionsInfo": - err = unpopulate(val, "ActionsInfo", &d.ActionsInfo) - delete(rawMsg, key) - case "activityId": - err = unpopulate(val, "ActivityID", &d.ActivityID) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &d.BackupManagementType) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &d.ContainerName) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &d.ContainerType) - delete(rawMsg, key) - case "dpmServerName": - err = unpopulate(val, "DpmServerName", &d.DpmServerName) - delete(rawMsg, key) - case "duration": - err = unpopulate(val, "Duration", &d.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) - delete(rawMsg, key) - case "entityFriendlyName": - err = unpopulate(val, "EntityFriendlyName", &d.EntityFriendlyName) - delete(rawMsg, key) - case "errorDetails": - err = unpopulate(val, "ErrorDetails", &d.ErrorDetails) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &d.ExtendedInfo) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &d.JobType) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &d.Operation) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &d.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DpmJobExtendedInfo. -func (d DpmJobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dynamicErrorMessage", d.DynamicErrorMessage) - populate(objectMap, "propertyBag", d.PropertyBag) - populate(objectMap, "tasksList", d.TasksList) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DpmJobTaskDetails. -func (d DpmJobTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "duration", d.Duration) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) - populate(objectMap, "status", d.Status) - populate(objectMap, "taskId", d.TaskID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DpmJobTaskDetails. -func (d *DpmJobTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "duration": - err = unpopulate(val, "Duration", &d.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &d.Status) - delete(rawMsg, key) - case "taskId": - err = unpopulate(val, "TaskID", &d.TaskID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. -func (e ErrorDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", e.Code) - populate(objectMap, "message", e.Message) - populate(objectMap, "recommendations", e.Recommendations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExportJobsOperationResultInfo. -func (e *ExportJobsOperationResultInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blobSasKey": - err = unpopulate(val, "BlobSasKey", &e.BlobSasKey) - delete(rawMsg, key) - case "blobUrl": - err = unpopulate(val, "BlobURL", &e.BlobURL) - delete(rawMsg, key) - case "excelFileBlobSasKey": - err = unpopulate(val, "ExcelFileBlobSasKey", &e.ExcelFileBlobSasKey) - delete(rawMsg, key) - case "excelFileBlobUrl": - err = unpopulate(val, "ExcelFileBlobURL", &e.ExcelFileBlobURL) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &e.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GenericContainer. -func (g GenericContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", g.BackupManagementType) - objectMap["containerType"] = ContainerTypeGenericContainer - populate(objectMap, "extendedInformation", g.ExtendedInformation) - populate(objectMap, "fabricName", g.FabricName) - populate(objectMap, "friendlyName", g.FriendlyName) - populate(objectMap, "healthStatus", g.HealthStatus) - populate(objectMap, "protectableObjectType", g.ProtectableObjectType) - populate(objectMap, "registrationStatus", g.RegistrationStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GenericContainer. -func (g *GenericContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &g.BackupManagementType) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &g.ContainerType) - delete(rawMsg, key) - case "extendedInformation": - err = unpopulate(val, "ExtendedInformation", &g.ExtendedInformation) - delete(rawMsg, key) - case "fabricName": - err = unpopulate(val, "FabricName", &g.FabricName) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &g.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &g.HealthStatus) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &g.ProtectableObjectType) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &g.RegistrationStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GenericContainerExtendedInfo. -func (g GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerIdentityInfo", g.ContainerIdentityInfo) - populate(objectMap, "rawCertData", g.RawCertData) - populate(objectMap, "serviceEndpoints", g.ServiceEndpoints) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type GenericProtectedItem. -func (g GenericProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", g.BackupManagementType) - populate(objectMap, "backupSetName", g.BackupSetName) - populate(objectMap, "containerName", g.ContainerName) - populate(objectMap, "createMode", g.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", g.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", g.DeferredDeleteTimeRemaining) - populate(objectMap, "fabricName", g.FabricName) - populate(objectMap, "friendlyName", g.FriendlyName) - populate(objectMap, "isArchiveEnabled", g.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", g.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", g.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", g.IsScheduledForDeferredDelete) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", g.LastRecoveryPoint) - populate(objectMap, "policyId", g.PolicyID) - populate(objectMap, "policyName", g.PolicyName) - populate(objectMap, "policyState", g.PolicyState) - populate(objectMap, "protectedItemId", g.ProtectedItemID) - objectMap["protectedItemType"] = "GenericProtectedItem" - populate(objectMap, "protectionState", g.ProtectionState) - populate(objectMap, "resourceGuardOperationRequests", g.ResourceGuardOperationRequests) - populate(objectMap, "sourceAssociations", g.SourceAssociations) - populate(objectMap, "sourceResourceId", g.SourceResourceID) - populate(objectMap, "workloadType", g.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GenericProtectedItem. -func (g *GenericProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &g.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &g.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &g.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &g.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &g.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &g.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "fabricName": - err = unpopulate(val, "FabricName", &g.FabricName) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &g.FriendlyName) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &g.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &g.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &g.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &g.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &g.LastRecoveryPoint) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &g.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &g.PolicyName) - delete(rawMsg, key) - case "policyState": - err = unpopulate(val, "PolicyState", &g.PolicyState) - delete(rawMsg, key) - case "protectedItemId": - err = unpopulate(val, "ProtectedItemID", &g.ProtectedItemID) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &g.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &g.ProtectionState) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &g.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "sourceAssociations": - err = unpopulate(val, "SourceAssociations", &g.SourceAssociations) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &g.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &g.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GenericProtectionPolicy. -func (g GenericProtectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["backupManagementType"] = "GenericProtectionPolicy" - populate(objectMap, "fabricName", g.FabricName) - populate(objectMap, "protectedItemsCount", g.ProtectedItemsCount) - populate(objectMap, "resourceGuardOperationRequests", g.ResourceGuardOperationRequests) - populate(objectMap, "subProtectionPolicy", g.SubProtectionPolicy) - populate(objectMap, "timeZone", g.TimeZone) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GenericProtectionPolicy. -func (g *GenericProtectionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &g.BackupManagementType) - delete(rawMsg, key) - case "fabricName": - err = unpopulate(val, "FabricName", &g.FabricName) - delete(rawMsg, key) - case "protectedItemsCount": - err = unpopulate(val, "ProtectedItemsCount", &g.ProtectedItemsCount) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &g.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "subProtectionPolicy": - err = unpopulate(val, "SubProtectionPolicy", &g.SubProtectionPolicy) - delete(rawMsg, key) - case "timeZone": - err = unpopulate(val, "TimeZone", &g.TimeZone) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GenericRecoveryPoint. -func (g GenericRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "friendlyName", g.FriendlyName) - objectMap["objectType"] = "GenericRecoveryPoint" - populate(objectMap, "recoveryPointAdditionalInfo", g.RecoveryPointAdditionalInfo) - populateTimeRFC3339(objectMap, "recoveryPointTime", g.RecoveryPointTime) - populate(objectMap, "recoveryPointType", g.RecoveryPointType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GenericRecoveryPoint. -func (g *GenericRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "friendlyName": - err = unpopulate(val, "FriendlyName", &g.FriendlyName) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &g.ObjectType) - delete(rawMsg, key) - case "recoveryPointAdditionalInfo": - err = unpopulate(val, "RecoveryPointAdditionalInfo", &g.RecoveryPointAdditionalInfo) - delete(rawMsg, key) - case "recoveryPointTime": - err = unpopulateTimeRFC3339(val, "RecoveryPointTime", &g.RecoveryPointTime) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &g.RecoveryPointType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HourlySchedule. -func (h HourlySchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "interval", h.Interval) - populate(objectMap, "scheduleWindowDuration", h.ScheduleWindowDuration) - populateTimeRFC3339(objectMap, "scheduleWindowStartTime", h.ScheduleWindowStartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HourlySchedule. -func (h *HourlySchedule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "interval": - err = unpopulate(val, "Interval", &h.Interval) - delete(rawMsg, key) - case "scheduleWindowDuration": - err = unpopulate(val, "ScheduleWindowDuration", &h.ScheduleWindowDuration) - delete(rawMsg, key) - case "scheduleWindowStartTime": - err = unpopulateTimeRFC3339(val, "ScheduleWindowStartTime", &h.ScheduleWindowStartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ILRRequestResource. -func (i ILRRequestResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", i.ETag) - populate(objectMap, "id", i.ID) - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "tags", i.Tags) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ILRRequestResource. -func (i *ILRRequestResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &i.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &i.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "properties": - i.Properties, err = unmarshalILRRequestClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &i.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IaaSVMContainer. -func (i IaaSVMContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", i.BackupManagementType) - objectMap["containerType"] = ContainerTypeIaasVMContainer - populate(objectMap, "friendlyName", i.FriendlyName) - populate(objectMap, "healthStatus", i.HealthStatus) - populate(objectMap, "protectableObjectType", i.ProtectableObjectType) - populate(objectMap, "registrationStatus", i.RegistrationStatus) - populate(objectMap, "resourceGroup", i.ResourceGroup) - populate(objectMap, "virtualMachineId", i.VirtualMachineID) - populate(objectMap, "virtualMachineVersion", i.VirtualMachineVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IaaSVMContainer. -func (i *IaaSVMContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &i.BackupManagementType) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &i.ContainerType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &i.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &i.HealthStatus) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &i.ProtectableObjectType) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &i.RegistrationStatus) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &i.ResourceGroup) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &i.VirtualMachineID) - delete(rawMsg, key) - case "virtualMachineVersion": - err = unpopulate(val, "VirtualMachineVersion", &i.VirtualMachineVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IaaSVMProtectableItem. -func (i IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", i.BackupManagementType) - populate(objectMap, "friendlyName", i.FriendlyName) - objectMap["protectableItemType"] = "IaaSVMProtectableItem" - populate(objectMap, "protectionState", i.ProtectionState) - populate(objectMap, "resourceGroup", i.ResourceGroup) - populate(objectMap, "virtualMachineId", i.VirtualMachineID) - populate(objectMap, "virtualMachineVersion", i.VirtualMachineVersion) - populate(objectMap, "workloadType", i.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IaaSVMProtectableItem. -func (i *IaaSVMProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &i.BackupManagementType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &i.FriendlyName) - delete(rawMsg, key) - case "protectableItemType": - err = unpopulate(val, "ProtectableItemType", &i.ProtectableItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &i.ProtectionState) - delete(rawMsg, key) - case "resourceGroup": - err = unpopulate(val, "ResourceGroup", &i.ResourceGroup) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &i.VirtualMachineID) - delete(rawMsg, key) - case "virtualMachineVersion": - err = unpopulate(val, "VirtualMachineVersion", &i.VirtualMachineVersion) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &i.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IaasVMBackupRequest. -func (i IaasVMBackupRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "IaasVMBackupRequest" - populateTimeRFC3339(objectMap, "recoveryPointExpiryTimeInUTC", i.RecoveryPointExpiryTimeInUTC) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IaasVMBackupRequest. -func (i *IaasVMBackupRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &i.ObjectType) - delete(rawMsg, key) - case "recoveryPointExpiryTimeInUTC": - err = unpopulateTimeRFC3339(val, "RecoveryPointExpiryTimeInUTC", &i.RecoveryPointExpiryTimeInUTC) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IaasVMILRRegistrationRequest. -func (i IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "initiatorName", i.InitiatorName) - objectMap["objectType"] = "IaasVMILRRegistrationRequest" - populate(objectMap, "recoveryPointId", i.RecoveryPointID) - populate(objectMap, "renewExistingRegistration", i.RenewExistingRegistration) - populate(objectMap, "virtualMachineId", i.VirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IaasVMILRRegistrationRequest. -func (i *IaasVMILRRegistrationRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "initiatorName": - err = unpopulate(val, "InitiatorName", &i.InitiatorName) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &i.ObjectType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) - delete(rawMsg, key) - case "renewExistingRegistration": - err = unpopulate(val, "RenewExistingRegistration", &i.RenewExistingRegistration) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &i.VirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IaasVMRecoveryPoint. -func (i IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isInstantIlrSessionActive", i.IsInstantIlrSessionActive) - populate(objectMap, "isManagedVirtualMachine", i.IsManagedVirtualMachine) - populate(objectMap, "isSourceVMEncrypted", i.IsSourceVMEncrypted) - populate(objectMap, "keyAndSecret", i.KeyAndSecret) - populate(objectMap, "osType", i.OSType) - objectMap["objectType"] = "IaasVMRecoveryPoint" - populate(objectMap, "originalStorageAccountOption", i.OriginalStorageAccountOption) - populate(objectMap, "recoveryPointAdditionalInfo", i.RecoveryPointAdditionalInfo) - populate(objectMap, "recoveryPointDiskConfiguration", i.RecoveryPointDiskConfiguration) - populate(objectMap, "recoveryPointMoveReadinessInfo", i.RecoveryPointMoveReadinessInfo) - populate(objectMap, "recoveryPointTierDetails", i.RecoveryPointTierDetails) - populateTimeRFC3339(objectMap, "recoveryPointTime", i.RecoveryPointTime) - populate(objectMap, "recoveryPointType", i.RecoveryPointType) - populate(objectMap, "sourceVMStorageType", i.SourceVMStorageType) - populate(objectMap, "virtualMachineSize", i.VirtualMachineSize) - populate(objectMap, "zones", i.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IaasVMRecoveryPoint. -func (i *IaasVMRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isInstantIlrSessionActive": - err = unpopulate(val, "IsInstantIlrSessionActive", &i.IsInstantIlrSessionActive) - delete(rawMsg, key) - case "isManagedVirtualMachine": - err = unpopulate(val, "IsManagedVirtualMachine", &i.IsManagedVirtualMachine) - delete(rawMsg, key) - case "isSourceVMEncrypted": - err = unpopulate(val, "IsSourceVMEncrypted", &i.IsSourceVMEncrypted) - delete(rawMsg, key) - case "keyAndSecret": - err = unpopulate(val, "KeyAndSecret", &i.KeyAndSecret) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &i.OSType) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &i.ObjectType) - delete(rawMsg, key) - case "originalStorageAccountOption": - err = unpopulate(val, "OriginalStorageAccountOption", &i.OriginalStorageAccountOption) - delete(rawMsg, key) - case "recoveryPointAdditionalInfo": - err = unpopulate(val, "RecoveryPointAdditionalInfo", &i.RecoveryPointAdditionalInfo) - delete(rawMsg, key) - case "recoveryPointDiskConfiguration": - err = unpopulate(val, "RecoveryPointDiskConfiguration", &i.RecoveryPointDiskConfiguration) - delete(rawMsg, key) - case "recoveryPointMoveReadinessInfo": - err = unpopulate(val, "RecoveryPointMoveReadinessInfo", &i.RecoveryPointMoveReadinessInfo) - delete(rawMsg, key) - case "recoveryPointTierDetails": - err = unpopulate(val, "RecoveryPointTierDetails", &i.RecoveryPointTierDetails) - delete(rawMsg, key) - case "recoveryPointTime": - err = unpopulateTimeRFC3339(val, "RecoveryPointTime", &i.RecoveryPointTime) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &i.RecoveryPointType) - delete(rawMsg, key) - case "sourceVMStorageType": - err = unpopulate(val, "SourceVMStorageType", &i.SourceVMStorageType) - delete(rawMsg, key) - case "virtualMachineSize": - err = unpopulate(val, "VirtualMachineSize", &i.VirtualMachineSize) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &i.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IaasVMRestoreRequest. -func (i IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affinityGroup", i.AffinityGroup) - populate(objectMap, "createNewCloudService", i.CreateNewCloudService) - populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) - populate(objectMap, "encryptionDetails", i.EncryptionDetails) - populate(objectMap, "identityBasedRestoreDetails", i.IdentityBasedRestoreDetails) - populate(objectMap, "identityInfo", i.IdentityInfo) - objectMap["objectType"] = "IaasVMRestoreRequest" - populate(objectMap, "originalStorageAccountOption", i.OriginalStorageAccountOption) - populate(objectMap, "recoveryPointId", i.RecoveryPointID) - populate(objectMap, "recoveryType", i.RecoveryType) - populate(objectMap, "region", i.Region) - populate(objectMap, "restoreDiskLunList", i.RestoreDiskLunList) - populate(objectMap, "restoreWithManagedDisks", i.RestoreWithManagedDisks) - populate(objectMap, "sourceResourceId", i.SourceResourceID) - populate(objectMap, "storageAccountId", i.StorageAccountID) - populate(objectMap, "subnetId", i.SubnetID) - populate(objectMap, "targetDomainNameId", i.TargetDomainNameID) - populate(objectMap, "targetResourceGroupId", i.TargetResourceGroupID) - populate(objectMap, "targetVirtualMachineId", i.TargetVirtualMachineID) - populate(objectMap, "virtualNetworkId", i.VirtualNetworkID) - populate(objectMap, "zones", i.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IaasVMRestoreRequest. -func (i *IaasVMRestoreRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affinityGroup": - err = unpopulate(val, "AffinityGroup", &i.AffinityGroup) - delete(rawMsg, key) - case "createNewCloudService": - err = unpopulate(val, "CreateNewCloudService", &i.CreateNewCloudService) - delete(rawMsg, key) - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) - delete(rawMsg, key) - case "encryptionDetails": - err = unpopulate(val, "EncryptionDetails", &i.EncryptionDetails) - delete(rawMsg, key) - case "identityBasedRestoreDetails": - err = unpopulate(val, "IdentityBasedRestoreDetails", &i.IdentityBasedRestoreDetails) - delete(rawMsg, key) - case "identityInfo": - err = unpopulate(val, "IdentityInfo", &i.IdentityInfo) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &i.ObjectType) - delete(rawMsg, key) - case "originalStorageAccountOption": - err = unpopulate(val, "OriginalStorageAccountOption", &i.OriginalStorageAccountOption) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &i.RecoveryType) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &i.Region) - delete(rawMsg, key) - case "restoreDiskLunList": - err = unpopulate(val, "RestoreDiskLunList", &i.RestoreDiskLunList) - delete(rawMsg, key) - case "restoreWithManagedDisks": - err = unpopulate(val, "RestoreWithManagedDisks", &i.RestoreWithManagedDisks) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &i.SourceResourceID) - delete(rawMsg, key) - case "storageAccountId": - err = unpopulate(val, "StorageAccountID", &i.StorageAccountID) - delete(rawMsg, key) - case "subnetId": - err = unpopulate(val, "SubnetID", &i.SubnetID) - delete(rawMsg, key) - case "targetDomainNameId": - err = unpopulate(val, "TargetDomainNameID", &i.TargetDomainNameID) - delete(rawMsg, key) - case "targetResourceGroupId": - err = unpopulate(val, "TargetResourceGroupID", &i.TargetResourceGroupID) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &i.TargetVirtualMachineID) - delete(rawMsg, key) - case "virtualNetworkId": - err = unpopulate(val, "VirtualNetworkID", &i.VirtualNetworkID) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &i.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IaasVMRestoreWithRehydrationRequest. -func (i IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affinityGroup", i.AffinityGroup) - populate(objectMap, "createNewCloudService", i.CreateNewCloudService) - populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) - populate(objectMap, "encryptionDetails", i.EncryptionDetails) - populate(objectMap, "identityBasedRestoreDetails", i.IdentityBasedRestoreDetails) - populate(objectMap, "identityInfo", i.IdentityInfo) - objectMap["objectType"] = "IaasVMRestoreWithRehydrationRequest" - populate(objectMap, "originalStorageAccountOption", i.OriginalStorageAccountOption) - populate(objectMap, "recoveryPointId", i.RecoveryPointID) - populate(objectMap, "recoveryPointRehydrationInfo", i.RecoveryPointRehydrationInfo) - populate(objectMap, "recoveryType", i.RecoveryType) - populate(objectMap, "region", i.Region) - populate(objectMap, "restoreDiskLunList", i.RestoreDiskLunList) - populate(objectMap, "restoreWithManagedDisks", i.RestoreWithManagedDisks) - populate(objectMap, "sourceResourceId", i.SourceResourceID) - populate(objectMap, "storageAccountId", i.StorageAccountID) - populate(objectMap, "subnetId", i.SubnetID) - populate(objectMap, "targetDomainNameId", i.TargetDomainNameID) - populate(objectMap, "targetResourceGroupId", i.TargetResourceGroupID) - populate(objectMap, "targetVirtualMachineId", i.TargetVirtualMachineID) - populate(objectMap, "virtualNetworkId", i.VirtualNetworkID) - populate(objectMap, "zones", i.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IaasVMRestoreWithRehydrationRequest. -func (i *IaasVMRestoreWithRehydrationRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affinityGroup": - err = unpopulate(val, "AffinityGroup", &i.AffinityGroup) - delete(rawMsg, key) - case "createNewCloudService": - err = unpopulate(val, "CreateNewCloudService", &i.CreateNewCloudService) - delete(rawMsg, key) - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) - delete(rawMsg, key) - case "encryptionDetails": - err = unpopulate(val, "EncryptionDetails", &i.EncryptionDetails) - delete(rawMsg, key) - case "identityBasedRestoreDetails": - err = unpopulate(val, "IdentityBasedRestoreDetails", &i.IdentityBasedRestoreDetails) - delete(rawMsg, key) - case "identityInfo": - err = unpopulate(val, "IdentityInfo", &i.IdentityInfo) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &i.ObjectType) - delete(rawMsg, key) - case "originalStorageAccountOption": - err = unpopulate(val, "OriginalStorageAccountOption", &i.OriginalStorageAccountOption) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) - delete(rawMsg, key) - case "recoveryPointRehydrationInfo": - err = unpopulate(val, "RecoveryPointRehydrationInfo", &i.RecoveryPointRehydrationInfo) - delete(rawMsg, key) - case "recoveryType": - err = unpopulate(val, "RecoveryType", &i.RecoveryType) - delete(rawMsg, key) - case "region": - err = unpopulate(val, "Region", &i.Region) - delete(rawMsg, key) - case "restoreDiskLunList": - err = unpopulate(val, "RestoreDiskLunList", &i.RestoreDiskLunList) - delete(rawMsg, key) - case "restoreWithManagedDisks": - err = unpopulate(val, "RestoreWithManagedDisks", &i.RestoreWithManagedDisks) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &i.SourceResourceID) - delete(rawMsg, key) - case "storageAccountId": - err = unpopulate(val, "StorageAccountID", &i.StorageAccountID) - delete(rawMsg, key) - case "subnetId": - err = unpopulate(val, "SubnetID", &i.SubnetID) - delete(rawMsg, key) - case "targetDomainNameId": - err = unpopulate(val, "TargetDomainNameID", &i.TargetDomainNameID) - delete(rawMsg, key) - case "targetResourceGroupId": - err = unpopulate(val, "TargetResourceGroupID", &i.TargetResourceGroupID) - delete(rawMsg, key) - case "targetVirtualMachineId": - err = unpopulate(val, "TargetVirtualMachineID", &i.TargetVirtualMachineID) - delete(rawMsg, key) - case "virtualNetworkId": - err = unpopulate(val, "VirtualNetworkID", &i.VirtualNetworkID) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &i.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InquiryInfo. -func (i InquiryInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorDetail", i.ErrorDetail) - populate(objectMap, "inquiryDetails", i.InquiryDetails) - populate(objectMap, "status", i.Status) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Job. -func (j Job) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activityId", j.ActivityID) - populate(objectMap, "backupManagementType", j.BackupManagementType) - populateTimeRFC3339(objectMap, "endTime", j.EndTime) - populate(objectMap, "entityFriendlyName", j.EntityFriendlyName) - objectMap["jobType"] = j.JobType - populate(objectMap, "operation", j.Operation) - populateTimeRFC3339(objectMap, "startTime", j.StartTime) - populate(objectMap, "status", j.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Job. -func (j *Job) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activityId": - err = unpopulate(val, "ActivityID", &j.ActivityID) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &j.BackupManagementType) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &j.EndTime) - delete(rawMsg, key) - case "entityFriendlyName": - err = unpopulate(val, "EntityFriendlyName", &j.EntityFriendlyName) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &j.JobType) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &j.Operation) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &j.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &j.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobQueryObject. -func (j *JobQueryObject) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &j.BackupManagementType) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &j.EndTime) - delete(rawMsg, key) - case "jobId": - err = unpopulate(val, "JobID", &j.JobID) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &j.Operation) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &j.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &j.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobResource. -func (j JobResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", j.ETag) - populate(objectMap, "id", j.ID) - populate(objectMap, "location", j.Location) - populate(objectMap, "name", j.Name) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "tags", j.Tags) - populate(objectMap, "type", j.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobResource. -func (j *JobResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &j.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &j.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &j.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &j.Name) - delete(rawMsg, key) - case "properties": - j.Properties, err = unmarshalJobClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &j.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &j.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KPIResourceHealthDetails. -func (k KPIResourceHealthDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "resourceHealthDetails", k.ResourceHealthDetails) - populate(objectMap, "resourceHealthStatus", k.ResourceHealthStatus) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ListRecoveryPointsRecommendedForMoveRequest. -func (l ListRecoveryPointsRecommendedForMoveRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "excludedRPList", l.ExcludedRPList) - populate(objectMap, "objectType", l.ObjectType) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LogSchedulePolicy. -func (l LogSchedulePolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "scheduleFrequencyInMins", l.ScheduleFrequencyInMins) - objectMap["schedulePolicyType"] = "LogSchedulePolicy" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LogSchedulePolicy. -func (l *LogSchedulePolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "scheduleFrequencyInMins": - err = unpopulate(val, "ScheduleFrequencyInMins", &l.ScheduleFrequencyInMins) - delete(rawMsg, key) - case "schedulePolicyType": - err = unpopulate(val, "SchedulePolicyType", &l.SchedulePolicyType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LongTermRetentionPolicy. -func (l LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dailySchedule", l.DailySchedule) - populate(objectMap, "monthlySchedule", l.MonthlySchedule) - objectMap["retentionPolicyType"] = "LongTermRetentionPolicy" - populate(objectMap, "weeklySchedule", l.WeeklySchedule) - populate(objectMap, "yearlySchedule", l.YearlySchedule) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionPolicy. -func (l *LongTermRetentionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dailySchedule": - err = unpopulate(val, "DailySchedule", &l.DailySchedule) - delete(rawMsg, key) - case "monthlySchedule": - err = unpopulate(val, "MonthlySchedule", &l.MonthlySchedule) - delete(rawMsg, key) - case "retentionPolicyType": - err = unpopulate(val, "RetentionPolicyType", &l.RetentionPolicyType) - delete(rawMsg, key) - case "weeklySchedule": - err = unpopulate(val, "WeeklySchedule", &l.WeeklySchedule) - delete(rawMsg, key) - case "yearlySchedule": - err = unpopulate(val, "YearlySchedule", &l.YearlySchedule) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LongTermSchedulePolicy. -func (l LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["schedulePolicyType"] = "LongTermSchedulePolicy" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LongTermSchedulePolicy. -func (l *LongTermSchedulePolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "schedulePolicyType": - err = unpopulate(val, "SchedulePolicyType", &l.SchedulePolicyType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MABContainerHealthDetails. -func (m MABContainerHealthDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", m.Code) - populate(objectMap, "message", m.Message) - populate(objectMap, "recommendations", m.Recommendations) - populate(objectMap, "title", m.Title) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MabContainer. -func (m MabContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentVersion", m.AgentVersion) - populate(objectMap, "backupManagementType", m.BackupManagementType) - populate(objectMap, "canReRegister", m.CanReRegister) - populate(objectMap, "containerHealthState", m.ContainerHealthState) - populate(objectMap, "containerId", m.ContainerID) - objectMap["containerType"] = ContainerTypeWindows - populate(objectMap, "extendedInfo", m.ExtendedInfo) - populate(objectMap, "friendlyName", m.FriendlyName) - populate(objectMap, "healthStatus", m.HealthStatus) - populate(objectMap, "mabContainerHealthDetails", m.MabContainerHealthDetails) - populate(objectMap, "protectableObjectType", m.ProtectableObjectType) - populate(objectMap, "protectedItemCount", m.ProtectedItemCount) - populate(objectMap, "registrationStatus", m.RegistrationStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MabContainer. -func (m *MabContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentVersion": - err = unpopulate(val, "AgentVersion", &m.AgentVersion) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &m.BackupManagementType) - delete(rawMsg, key) - case "canReRegister": - err = unpopulate(val, "CanReRegister", &m.CanReRegister) - delete(rawMsg, key) - case "containerHealthState": - err = unpopulate(val, "ContainerHealthState", &m.ContainerHealthState) - delete(rawMsg, key) - case "containerId": - err = unpopulate(val, "ContainerID", &m.ContainerID) - delete(rawMsg, key) - case "containerType": - err = unpopulate(val, "ContainerType", &m.ContainerType) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &m.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &m.FriendlyName) - delete(rawMsg, key) - case "healthStatus": - err = unpopulate(val, "HealthStatus", &m.HealthStatus) - delete(rawMsg, key) - case "mabContainerHealthDetails": - err = unpopulate(val, "MabContainerHealthDetails", &m.MabContainerHealthDetails) - delete(rawMsg, key) - case "protectableObjectType": - err = unpopulate(val, "ProtectableObjectType", &m.ProtectableObjectType) - delete(rawMsg, key) - case "protectedItemCount": - err = unpopulate(val, "ProtectedItemCount", &m.ProtectedItemCount) - delete(rawMsg, key) - case "registrationStatus": - err = unpopulate(val, "RegistrationStatus", &m.RegistrationStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MabContainerExtendedInfo. -func (m MabContainerExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupItemType", m.BackupItemType) - populate(objectMap, "backupItems", m.BackupItems) - populate(objectMap, "lastBackupStatus", m.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastRefreshedAt", m.LastRefreshedAt) - populate(objectMap, "policyName", m.PolicyName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MabContainerExtendedInfo. -func (m *MabContainerExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupItemType": - err = unpopulate(val, "BackupItemType", &m.BackupItemType) - delete(rawMsg, key) - case "backupItems": - err = unpopulate(val, "BackupItems", &m.BackupItems) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &m.LastBackupStatus) - delete(rawMsg, key) - case "lastRefreshedAt": - err = unpopulateTimeRFC3339(val, "LastRefreshedAt", &m.LastRefreshedAt) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &m.PolicyName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MabErrorInfo. -func (m MabErrorInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorString", m.ErrorString) - populate(objectMap, "recommendations", m.Recommendations) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MabFileFolderProtectedItem. -func (m MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", m.BackupManagementType) - populate(objectMap, "backupSetName", m.BackupSetName) - populate(objectMap, "computerName", m.ComputerName) - populate(objectMap, "containerName", m.ContainerName) - populate(objectMap, "createMode", m.CreateMode) - populate(objectMap, "deferredDeleteSyncTimeInUTC", m.DeferredDeleteSyncTimeInUTC) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", m.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", m.DeferredDeleteTimeRemaining) - populate(objectMap, "extendedInfo", m.ExtendedInfo) - populate(objectMap, "friendlyName", m.FriendlyName) - populate(objectMap, "isArchiveEnabled", m.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", m.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", m.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", m.IsScheduledForDeferredDelete) - populate(objectMap, "lastBackupStatus", m.LastBackupStatus) - populateTimeRFC3339(objectMap, "lastBackupTime", m.LastBackupTime) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", m.LastRecoveryPoint) - populate(objectMap, "policyId", m.PolicyID) - populate(objectMap, "policyName", m.PolicyName) - objectMap["protectedItemType"] = "MabFileFolderProtectedItem" - populate(objectMap, "protectionState", m.ProtectionState) - populate(objectMap, "resourceGuardOperationRequests", m.ResourceGuardOperationRequests) - populate(objectMap, "sourceResourceId", m.SourceResourceID) - populate(objectMap, "workloadType", m.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MabFileFolderProtectedItem. -func (m *MabFileFolderProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &m.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &m.BackupSetName) - delete(rawMsg, key) - case "computerName": - err = unpopulate(val, "ComputerName", &m.ComputerName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &m.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &m.CreateMode) - delete(rawMsg, key) - case "deferredDeleteSyncTimeInUTC": - err = unpopulate(val, "DeferredDeleteSyncTimeInUTC", &m.DeferredDeleteSyncTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &m.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &m.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &m.ExtendedInfo) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &m.FriendlyName) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &m.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &m.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &m.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &m.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "lastBackupStatus": - err = unpopulate(val, "LastBackupStatus", &m.LastBackupStatus) - delete(rawMsg, key) - case "lastBackupTime": - err = unpopulateTimeRFC3339(val, "LastBackupTime", &m.LastBackupTime) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &m.LastRecoveryPoint) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &m.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &m.PolicyName) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &m.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &m.ProtectionState) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &m.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &m.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &m.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MabFileFolderProtectedItemExtendedInfo. -func (m MabFileFolderProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "lastRefreshedAt", m.LastRefreshedAt) - populateTimeRFC3339(objectMap, "oldestRecoveryPoint", m.OldestRecoveryPoint) - populate(objectMap, "recoveryPointCount", m.RecoveryPointCount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MabFileFolderProtectedItemExtendedInfo. -func (m *MabFileFolderProtectedItemExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "lastRefreshedAt": - err = unpopulateTimeRFC3339(val, "LastRefreshedAt", &m.LastRefreshedAt) - delete(rawMsg, key) - case "oldestRecoveryPoint": - err = unpopulateTimeRFC3339(val, "OldestRecoveryPoint", &m.OldestRecoveryPoint) - delete(rawMsg, key) - case "recoveryPointCount": - err = unpopulate(val, "RecoveryPointCount", &m.RecoveryPointCount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MabJob. -func (m MabJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionsInfo", m.ActionsInfo) - populate(objectMap, "activityId", m.ActivityID) - populate(objectMap, "backupManagementType", m.BackupManagementType) - populate(objectMap, "duration", m.Duration) - populateTimeRFC3339(objectMap, "endTime", m.EndTime) - populate(objectMap, "entityFriendlyName", m.EntityFriendlyName) - populate(objectMap, "errorDetails", m.ErrorDetails) - populate(objectMap, "extendedInfo", m.ExtendedInfo) - objectMap["jobType"] = "MabJob" - populate(objectMap, "mabServerName", m.MabServerName) - populate(objectMap, "mabServerType", m.MabServerType) - populate(objectMap, "operation", m.Operation) - populateTimeRFC3339(objectMap, "startTime", m.StartTime) - populate(objectMap, "status", m.Status) - populate(objectMap, "workloadType", m.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MabJob. -func (m *MabJob) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionsInfo": - err = unpopulate(val, "ActionsInfo", &m.ActionsInfo) - delete(rawMsg, key) - case "activityId": - err = unpopulate(val, "ActivityID", &m.ActivityID) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &m.BackupManagementType) - delete(rawMsg, key) - case "duration": - err = unpopulate(val, "Duration", &m.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &m.EndTime) - delete(rawMsg, key) - case "entityFriendlyName": - err = unpopulate(val, "EntityFriendlyName", &m.EntityFriendlyName) - delete(rawMsg, key) - case "errorDetails": - err = unpopulate(val, "ErrorDetails", &m.ErrorDetails) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &m.ExtendedInfo) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &m.JobType) - delete(rawMsg, key) - case "mabServerName": - err = unpopulate(val, "MabServerName", &m.MabServerName) - delete(rawMsg, key) - case "mabServerType": - err = unpopulate(val, "MabServerType", &m.MabServerType) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &m.Operation) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &m.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &m.Status) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &m.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MabJobExtendedInfo. -func (m MabJobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dynamicErrorMessage", m.DynamicErrorMessage) - populate(objectMap, "propertyBag", m.PropertyBag) - populate(objectMap, "tasksList", m.TasksList) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MabJobTaskDetails. -func (m MabJobTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "duration", m.Duration) - populateTimeRFC3339(objectMap, "endTime", m.EndTime) - populateTimeRFC3339(objectMap, "startTime", m.StartTime) - populate(objectMap, "status", m.Status) - populate(objectMap, "taskId", m.TaskID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MabJobTaskDetails. -func (m *MabJobTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "duration": - err = unpopulate(val, "Duration", &m.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &m.EndTime) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &m.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &m.Status) - delete(rawMsg, key) - case "taskId": - err = unpopulate(val, "TaskID", &m.TaskID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MabProtectionPolicy. -func (m MabProtectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["backupManagementType"] = "MAB" - populate(objectMap, "protectedItemsCount", m.ProtectedItemsCount) - populate(objectMap, "resourceGuardOperationRequests", m.ResourceGuardOperationRequests) - populate(objectMap, "retentionPolicy", m.RetentionPolicy) - populate(objectMap, "schedulePolicy", m.SchedulePolicy) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MabProtectionPolicy. -func (m *MabProtectionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &m.BackupManagementType) - delete(rawMsg, key) - case "protectedItemsCount": - err = unpopulate(val, "ProtectedItemsCount", &m.ProtectedItemsCount) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &m.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "retentionPolicy": - m.RetentionPolicy, err = unmarshalRetentionPolicyClassification(val) - delete(rawMsg, key) - case "schedulePolicy": - m.SchedulePolicy, err = unmarshalSchedulePolicyClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MonthlyRetentionSchedule. -func (m MonthlyRetentionSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "retentionDuration", m.RetentionDuration) - populate(objectMap, "retentionScheduleDaily", m.RetentionScheduleDaily) - populate(objectMap, "retentionScheduleFormatType", m.RetentionScheduleFormatType) - populate(objectMap, "retentionScheduleWeekly", m.RetentionScheduleWeekly) - aux := make([]*timeRFC3339, len(m.RetentionTimes), len(m.RetentionTimes)) - for i := 0; i < len(m.RetentionTimes); i++ { - aux[i] = (*timeRFC3339)(m.RetentionTimes[i]) - } - populate(objectMap, "retentionTimes", aux) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultInfo. -func (o *OperationResultInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobList": - err = unpopulate(val, "JobList", &o.JobList) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &o.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationResultInfoBaseResource. -func (o *OperationResultInfoBaseResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "headers": - err = unpopulate(val, "Headers", &o.Headers) - delete(rawMsg, key) - case "operation": - o.Operation, err = unmarshalOperationResultInfoBaseClassification(val) - delete(rawMsg, key) - case "statusCode": - err = unpopulate(val, "StatusCode", &o.StatusCode) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatus. -func (o *OperationStatus) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &o.Error) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - o.Properties, err = unmarshalOperationStatusExtendedInfoClassification(val) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &o.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusJobExtendedInfo. -func (o *OperationStatusJobExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobId": - err = unpopulate(val, "JobID", &o.JobID) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &o.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusJobsExtendedInfo. -func (o *OperationStatusJobsExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failedJobsError": - err = unpopulate(val, "FailedJobsError", &o.FailedJobsError) - delete(rawMsg, key) - case "jobIds": - err = unpopulate(val, "JobIDs", &o.JobIDs) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &o.ObjectType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusProvisionILRExtendedInfo. -func (o *OperationStatusProvisionILRExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &o.ObjectType) - delete(rawMsg, key) - case "recoveryTarget": - err = unpopulate(val, "RecoveryTarget", &o.RecoveryTarget) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusValidateOperationExtendedInfo. -func (o *OperationStatusValidateOperationExtendedInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &o.ObjectType) - delete(rawMsg, key) - case "validateOperationResponse": - err = unpopulate(val, "ValidateOperationResponse", &o.ValidateOperationResponse) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PointInTimeRange. -func (p PointInTimeRange) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "endTime", p.EndTime) - populateTimeRFC3339(objectMap, "startTime", p.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PointInTimeRange. -func (p *PointInTimeRange) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &p.EndTime) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrepareDataMoveRequest. -func (p PrepareDataMoveRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataMoveLevel", p.DataMoveLevel) - populate(objectMap, "ignoreMoved", p.IgnoreMoved) - populate(objectMap, "sourceContainerArmIds", p.SourceContainerArmIDs) - populate(objectMap, "targetRegion", p.TargetRegion) - populate(objectMap, "targetResourceId", p.TargetResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PrepareDataMoveResponse. -func (p *PrepareDataMoveResponse) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "correlationId": - err = unpopulate(val, "CorrelationID", &p.CorrelationID) - delete(rawMsg, key) - case "objectType": - err = unpopulate(val, "ObjectType", &p.ObjectType) - delete(rawMsg, key) - case "sourceVaultProperties": - err = unpopulate(val, "SourceVaultProperties", &p.SourceVaultProperties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionResource. -func (p PrivateEndpointConnectionResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", p.ETag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectableContainerResource. -func (p ProtectableContainerResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", p.ETag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableContainerResource. -func (p *ProtectableContainerResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &p.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - p.Properties, err = unmarshalProtectableContainerClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectedItem. -func (p ProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backupManagementType", p.BackupManagementType) - populate(objectMap, "backupSetName", p.BackupSetName) - populate(objectMap, "containerName", p.ContainerName) - populate(objectMap, "createMode", p.CreateMode) - populateTimeRFC3339(objectMap, "deferredDeleteTimeInUTC", p.DeferredDeleteTimeInUTC) - populate(objectMap, "deferredDeleteTimeRemaining", p.DeferredDeleteTimeRemaining) - populate(objectMap, "isArchiveEnabled", p.IsArchiveEnabled) - populate(objectMap, "isDeferredDeleteScheduleUpcoming", p.IsDeferredDeleteScheduleUpcoming) - populate(objectMap, "isRehydrate", p.IsRehydrate) - populate(objectMap, "isScheduledForDeferredDelete", p.IsScheduledForDeferredDelete) - populateTimeRFC3339(objectMap, "lastRecoveryPoint", p.LastRecoveryPoint) - populate(objectMap, "policyId", p.PolicyID) - populate(objectMap, "policyName", p.PolicyName) - objectMap["protectedItemType"] = p.ProtectedItemType - populate(objectMap, "resourceGuardOperationRequests", p.ResourceGuardOperationRequests) - populate(objectMap, "sourceResourceId", p.SourceResourceID) - populate(objectMap, "workloadType", p.WorkloadType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedItem. -func (p *ProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &p.BackupManagementType) - delete(rawMsg, key) - case "backupSetName": - err = unpopulate(val, "BackupSetName", &p.BackupSetName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &p.ContainerName) - delete(rawMsg, key) - case "createMode": - err = unpopulate(val, "CreateMode", &p.CreateMode) - delete(rawMsg, key) - case "deferredDeleteTimeInUTC": - err = unpopulateTimeRFC3339(val, "DeferredDeleteTimeInUTC", &p.DeferredDeleteTimeInUTC) - delete(rawMsg, key) - case "deferredDeleteTimeRemaining": - err = unpopulate(val, "DeferredDeleteTimeRemaining", &p.DeferredDeleteTimeRemaining) - delete(rawMsg, key) - case "isArchiveEnabled": - err = unpopulate(val, "IsArchiveEnabled", &p.IsArchiveEnabled) - delete(rawMsg, key) - case "isDeferredDeleteScheduleUpcoming": - err = unpopulate(val, "IsDeferredDeleteScheduleUpcoming", &p.IsDeferredDeleteScheduleUpcoming) - delete(rawMsg, key) - case "isRehydrate": - err = unpopulate(val, "IsRehydrate", &p.IsRehydrate) - delete(rawMsg, key) - case "isScheduledForDeferredDelete": - err = unpopulate(val, "IsScheduledForDeferredDelete", &p.IsScheduledForDeferredDelete) - delete(rawMsg, key) - case "lastRecoveryPoint": - err = unpopulateTimeRFC3339(val, "LastRecoveryPoint", &p.LastRecoveryPoint) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &p.PolicyID) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &p.PolicyName) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &p.ProtectedItemType) - delete(rawMsg, key) - case "resourceGuardOperationRequests": - err = unpopulate(val, "ResourceGuardOperationRequests", &p.ResourceGuardOperationRequests) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &p.SourceResourceID) - delete(rawMsg, key) - case "workloadType": - err = unpopulate(val, "WorkloadType", &p.WorkloadType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectedItemResource. -func (p ProtectedItemResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", p.ETag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedItemResource. -func (p *ProtectedItemResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &p.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - p.Properties, err = unmarshalProtectedItemClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerResource. -func (p ProtectionContainerResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", p.ETag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerResource. -func (p *ProtectionContainerResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &p.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - p.Properties, err = unmarshalProtectionContainerClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionIntentResource. -func (p ProtectionIntentResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", p.ETag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionIntentResource. -func (p *ProtectionIntentResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &p.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - p.Properties, err = unmarshalProtectionIntentClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionPolicy. -func (p ProtectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["backupManagementType"] = p.BackupManagementType - populate(objectMap, "protectedItemsCount", p.ProtectedItemsCount) - populate(objectMap, "resourceGuardOperationRequests", p.ResourceGuardOperationRequests) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionPolicyResource. -func (p ProtectionPolicyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", p.ETag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionPolicyResource. -func (p *ProtectionPolicyResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &p.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - p.Properties, err = unmarshalProtectionPolicyClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPointDiskConfiguration. -func (r RecoveryPointDiskConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "excludedDiskList", r.ExcludedDiskList) - populate(objectMap, "includedDiskList", r.IncludedDiskList) - populate(objectMap, "numberOfDisksAttachedToVm", r.NumberOfDisksAttachedToVM) - populate(objectMap, "numberOfDisksIncludedInBackup", r.NumberOfDisksIncludedInBackup) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPointResource. -func (r RecoveryPointResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", r.ETag) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointResource. -func (r *RecoveryPointResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &r.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - r.Properties, err = unmarshalRecoveryPointClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &r.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPointTierInformation. -func (r RecoveryPointTierInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extendedInfo", r.ExtendedInfo) - populate(objectMap, "status", r.Status) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPointTierInformationV2. -func (r RecoveryPointTierInformationV2) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "extendedInfo", r.ExtendedInfo) - populate(objectMap, "status", r.Status) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", r.ETag) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceGuardProxyBase. -func (r ResourceGuardProxyBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", r.Description) - populate(objectMap, "lastUpdatedTime", r.LastUpdatedTime) - populate(objectMap, "resourceGuardOperationDetails", r.ResourceGuardOperationDetails) - populate(objectMap, "resourceGuardResourceId", r.ResourceGuardResourceID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceGuardProxyBaseResource. -func (r ResourceGuardProxyBaseResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", r.ETag) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceHealthDetails. -func (r ResourceHealthDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", r.Code) - populate(objectMap, "message", r.Message) - populate(objectMap, "recommendations", r.Recommendations) - populate(objectMap, "title", r.Title) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RestoreRequestResource. -func (r RestoreRequestResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", r.ETag) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RestoreRequestResource. -func (r *RestoreRequestResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &r.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - r.Properties, err = unmarshalRestoreRequestClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &r.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SecurityPinBase. -func (s SecurityPinBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "resourceGuardOperationRequests", s.ResourceGuardOperationRequests) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SimpleRetentionPolicy. -func (s SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "retentionDuration", s.RetentionDuration) - objectMap["retentionPolicyType"] = "SimpleRetentionPolicy" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SimpleRetentionPolicy. -func (s *SimpleRetentionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "retentionDuration": - err = unpopulate(val, "RetentionDuration", &s.RetentionDuration) - delete(rawMsg, key) - case "retentionPolicyType": - err = unpopulate(val, "RetentionPolicyType", &s.RetentionPolicyType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SimpleSchedulePolicy. -func (s SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hourlySchedule", s.HourlySchedule) - objectMap["schedulePolicyType"] = "SimpleSchedulePolicy" - populate(objectMap, "scheduleRunDays", s.ScheduleRunDays) - populate(objectMap, "scheduleRunFrequency", s.ScheduleRunFrequency) - aux := make([]*timeRFC3339, len(s.ScheduleRunTimes), len(s.ScheduleRunTimes)) - for i := 0; i < len(s.ScheduleRunTimes); i++ { - aux[i] = (*timeRFC3339)(s.ScheduleRunTimes[i]) - } - populate(objectMap, "scheduleRunTimes", aux) - populate(objectMap, "scheduleWeeklyFrequency", s.ScheduleWeeklyFrequency) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SimpleSchedulePolicy. -func (s *SimpleSchedulePolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "hourlySchedule": - err = unpopulate(val, "HourlySchedule", &s.HourlySchedule) - delete(rawMsg, key) - case "schedulePolicyType": - err = unpopulate(val, "SchedulePolicyType", &s.SchedulePolicyType) - delete(rawMsg, key) - case "scheduleRunDays": - err = unpopulate(val, "ScheduleRunDays", &s.ScheduleRunDays) - delete(rawMsg, key) - case "scheduleRunFrequency": - err = unpopulate(val, "ScheduleRunFrequency", &s.ScheduleRunFrequency) - delete(rawMsg, key) - case "scheduleRunTimes": - var aux []*timeRFC3339 - err = unpopulate(val, "ScheduleRunTimes", &aux) - for _, au := range aux { - s.ScheduleRunTimes = append(s.ScheduleRunTimes, (*time.Time)(au)) - } - delete(rawMsg, key) - case "scheduleWeeklyFrequency": - err = unpopulate(val, "ScheduleWeeklyFrequency", &s.ScheduleWeeklyFrequency) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SimpleSchedulePolicyV2. -func (s SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dailySchedule", s.DailySchedule) - populate(objectMap, "hourlySchedule", s.HourlySchedule) - objectMap["schedulePolicyType"] = "SimpleSchedulePolicyV2" - populate(objectMap, "scheduleRunFrequency", s.ScheduleRunFrequency) - populate(objectMap, "weeklySchedule", s.WeeklySchedule) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SimpleSchedulePolicyV2. -func (s *SimpleSchedulePolicyV2) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dailySchedule": - err = unpopulate(val, "DailySchedule", &s.DailySchedule) - delete(rawMsg, key) - case "hourlySchedule": - err = unpopulate(val, "HourlySchedule", &s.HourlySchedule) - delete(rawMsg, key) - case "schedulePolicyType": - err = unpopulate(val, "SchedulePolicyType", &s.SchedulePolicyType) - delete(rawMsg, key) - case "scheduleRunFrequency": - err = unpopulate(val, "ScheduleRunFrequency", &s.ScheduleRunFrequency) - delete(rawMsg, key) - case "weeklySchedule": - err = unpopulate(val, "WeeklySchedule", &s.WeeklySchedule) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SubProtectionPolicy. -func (s SubProtectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "policyType", s.PolicyType) - populate(objectMap, "retentionPolicy", s.RetentionPolicy) - populate(objectMap, "schedulePolicy", s.SchedulePolicy) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SubProtectionPolicy. -func (s *SubProtectionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "policyType": - err = unpopulate(val, "PolicyType", &s.PolicyType) - delete(rawMsg, key) - case "retentionPolicy": - s.RetentionPolicy, err = unmarshalRetentionPolicyClassification(val) - delete(rawMsg, key) - case "schedulePolicy": - s.SchedulePolicy, err = unmarshalSchedulePolicyClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TriggerDataMoveRequest. -func (t TriggerDataMoveRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "correlationId", t.CorrelationID) - populate(objectMap, "dataMoveLevel", t.DataMoveLevel) - populate(objectMap, "pauseGC", t.PauseGC) - populate(objectMap, "sourceContainerArmIds", t.SourceContainerArmIDs) - populate(objectMap, "sourceRegion", t.SourceRegion) - populate(objectMap, "sourceResourceId", t.SourceResourceID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type UnlockDeleteRequest. -func (u UnlockDeleteRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "resourceGuardOperationRequests", u.ResourceGuardOperationRequests) - populate(objectMap, "resourceToBeDeleted", u.ResourceToBeDeleted) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ValidateIaasVMRestoreOperationRequest. -func (v ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "ValidateIaasVMRestoreOperationRequest" - populate(objectMap, "restoreRequest", v.RestoreRequest) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateIaasVMRestoreOperationRequest. -func (v *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &v.ObjectType) - delete(rawMsg, key) - case "restoreRequest": - v.RestoreRequest, err = unmarshalRestoreRequestClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ValidateRestoreOperationRequest. -func (v ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["objectType"] = "ValidateRestoreOperationRequest" - populate(objectMap, "restoreRequest", v.RestoreRequest) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ValidateRestoreOperationRequest. -func (v *ValidateRestoreOperationRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "objectType": - err = unpopulate(val, "ObjectType", &v.ObjectType) - delete(rawMsg, key) - case "restoreRequest": - v.RestoreRequest, err = unmarshalRestoreRequestClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VaultJob. -func (v VaultJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionsInfo", v.ActionsInfo) - populate(objectMap, "activityId", v.ActivityID) - populate(objectMap, "backupManagementType", v.BackupManagementType) - populate(objectMap, "duration", v.Duration) - populateTimeRFC3339(objectMap, "endTime", v.EndTime) - populate(objectMap, "entityFriendlyName", v.EntityFriendlyName) - populate(objectMap, "errorDetails", v.ErrorDetails) - populate(objectMap, "extendedInfo", v.ExtendedInfo) - objectMap["jobType"] = "VaultJob" - populate(objectMap, "operation", v.Operation) - populateTimeRFC3339(objectMap, "startTime", v.StartTime) - populate(objectMap, "status", v.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VaultJob. -func (v *VaultJob) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionsInfo": - err = unpopulate(val, "ActionsInfo", &v.ActionsInfo) - delete(rawMsg, key) - case "activityId": - err = unpopulate(val, "ActivityID", &v.ActivityID) - delete(rawMsg, key) - case "backupManagementType": - err = unpopulate(val, "BackupManagementType", &v.BackupManagementType) - delete(rawMsg, key) - case "duration": - err = unpopulate(val, "Duration", &v.Duration) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &v.EndTime) - delete(rawMsg, key) - case "entityFriendlyName": - err = unpopulate(val, "EntityFriendlyName", &v.EntityFriendlyName) - delete(rawMsg, key) - case "errorDetails": - err = unpopulate(val, "ErrorDetails", &v.ErrorDetails) - delete(rawMsg, key) - case "extendedInfo": - err = unpopulate(val, "ExtendedInfo", &v.ExtendedInfo) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &v.JobType) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &v.Operation) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &v.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &v.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VaultJobErrorInfo. -func (v VaultJobErrorInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorCode", v.ErrorCode) - populate(objectMap, "errorString", v.ErrorString) - populate(objectMap, "recommendations", v.Recommendations) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VaultJobExtendedInfo. -func (v VaultJobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "propertyBag", v.PropertyBag) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WeeklyRetentionFormat. -func (w WeeklyRetentionFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "daysOfTheWeek", w.DaysOfTheWeek) - populate(objectMap, "weeksOfTheMonth", w.WeeksOfTheMonth) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WeeklyRetentionSchedule. -func (w WeeklyRetentionSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "daysOfTheWeek", w.DaysOfTheWeek) - populate(objectMap, "retentionDuration", w.RetentionDuration) - aux := make([]*timeRFC3339, len(w.RetentionTimes), len(w.RetentionTimes)) - for i := 0; i < len(w.RetentionTimes); i++ { - aux[i] = (*timeRFC3339)(w.RetentionTimes[i]) - } - populate(objectMap, "retentionTimes", aux) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WeeklySchedule. -func (w WeeklySchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "scheduleRunDays", w.ScheduleRunDays) - aux := make([]*timeRFC3339, len(w.ScheduleRunTimes), len(w.ScheduleRunTimes)) - for i := 0; i < len(w.ScheduleRunTimes); i++ { - aux[i] = (*timeRFC3339)(w.ScheduleRunTimes[i]) - } - populate(objectMap, "scheduleRunTimes", aux) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkloadItemResource. -func (w WorkloadItemResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", w.ETag) - populate(objectMap, "id", w.ID) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadItemResource. -func (w *WorkloadItemResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &w.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &w.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &w.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "properties": - w.Properties, err = unmarshalWorkloadItemClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &w.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkloadProtectableItemResource. -func (w WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "eTag", w.ETag) - populate(objectMap, "id", w.ID) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadProtectableItemResource. -func (w *WorkloadProtectableItemResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "eTag": - err = unpopulate(val, "ETag", &w.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &w.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &w.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "properties": - w.Properties, err = unmarshalWorkloadProtectableItemClassification(val) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &w.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type YearlyRetentionSchedule. -func (y YearlyRetentionSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "monthsOfYear", y.MonthsOfYear) - populate(objectMap, "retentionDuration", y.RetentionDuration) - populate(objectMap, "retentionScheduleDaily", y.RetentionScheduleDaily) - populate(objectMap, "retentionScheduleFormatType", y.RetentionScheduleFormatType) - populate(objectMap, "retentionScheduleWeekly", y.RetentionScheduleWeekly) - aux := make([]*timeRFC3339, len(y.RetentionTimes), len(y.RetentionTimes)) - for i := 0; i < len(y.RetentionTimes); i++ { - aux[i] = (*timeRFC3339)(y.RetentionTimes[i]) - } - populate(objectMap, "retentionTimes", aux) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_operation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_operation_client.go deleted file mode 100644 index 0bd94c75..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_operation_client.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// OperationClient contains the methods for the Operation group. -// Don't use this type directly, use NewOperationClient() instead. -type OperationClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewOperationClient creates a new instance of OperationClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Validate - Validate operation for specified backed up item. This is a synchronous operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - resource validate operation request -// options - OperationClientValidateOptions contains the optional parameters for the OperationClient.Validate method. -func (client *OperationClient) Validate(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestClassification, options *OperationClientValidateOptions) (OperationClientValidateResponse, error) { - req, err := client.validateCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return OperationClientValidateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationClientValidateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationClientValidateResponse{}, runtime.NewResponseError(resp) - } - return client.validateHandleResponse(resp) -} - -// validateCreateRequest creates the Validate request. -func (client *OperationClient) validateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestClassification, options *OperationClientValidateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// validateHandleResponse handles the Validate response. -func (client *OperationClient) validateHandleResponse(resp *http.Response) (OperationClientValidateResponse, error) { - result := OperationClientValidateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ValidateOperationsResponse); err != nil { - return OperationClientValidateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_operations_client.go deleted file mode 100644 index a931c0fa..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_operations_client.go +++ /dev/null @@ -1,104 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - host string - pl runtime.Pipeline -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Returns the list of available operations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.RecoveryServices/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ClientDiscoveryResponse); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_polymorphic_helpers.go deleted file mode 100644 index 2a4d745e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_polymorphic_helpers.go +++ /dev/null @@ -1,507 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import "encoding/json" - -func unmarshalBackupEngineBaseClassification(rawMsg json.RawMessage) (BackupEngineBaseClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b BackupEngineBaseClassification - switch m["backupEngineType"] { - case string(BackupEngineTypeAzureBackupServerEngine): - b = &AzureBackupServerEngine{} - case string(BackupEngineTypeDpmBackupEngine): - b = &DpmBackupEngine{} - default: - b = &BackupEngineBase{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalBackupRequestClassification(rawMsg json.RawMessage) (BackupRequestClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b BackupRequestClassification - switch m["objectType"] { - case "AzureFileShareBackupRequest": - b = &AzureFileShareBackupRequest{} - case "AzureWorkloadBackupRequest": - b = &AzureWorkloadBackupRequest{} - case "IaasVMBackupRequest": - b = &IaasVMBackupRequest{} - default: - b = &BackupRequest{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalILRRequestClassification(rawMsg json.RawMessage) (ILRRequestClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ILRRequestClassification - switch m["objectType"] { - case "AzureFileShareProvisionILRRequest": - b = &AzureFileShareProvisionILRRequest{} - case "IaasVMILRRegistrationRequest": - b = &IaasVMILRRegistrationRequest{} - default: - b = &ILRRequest{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalJobClassification(rawMsg json.RawMessage) (JobClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b JobClassification - switch m["jobType"] { - case "AzureIaaSVMJob": - b = &AzureIaaSVMJob{} - case "AzureIaaSVMJobV2": - b = &AzureIaaSVMJobV2{} - case "AzureStorageJob": - b = &AzureStorageJob{} - case "AzureWorkloadJob": - b = &AzureWorkloadJob{} - case "DpmJob": - b = &DpmJob{} - case "MabJob": - b = &MabJob{} - case "VaultJob": - b = &VaultJob{} - default: - b = &Job{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalOperationResultInfoBaseClassification(rawMsg json.RawMessage) (OperationResultInfoBaseClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b OperationResultInfoBaseClassification - switch m["objectType"] { - case "ExportJobsOperationResultInfo": - b = &ExportJobsOperationResultInfo{} - case "OperationResultInfo": - b = &OperationResultInfo{} - default: - b = &OperationResultInfoBase{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalOperationStatusExtendedInfoClassification(rawMsg json.RawMessage) (OperationStatusExtendedInfoClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b OperationStatusExtendedInfoClassification - switch m["objectType"] { - case "OperationStatusJobExtendedInfo": - b = &OperationStatusJobExtendedInfo{} - case "OperationStatusJobsExtendedInfo": - b = &OperationStatusJobsExtendedInfo{} - case "OperationStatusProvisionILRExtendedInfo": - b = &OperationStatusProvisionILRExtendedInfo{} - case "OperationStatusValidateOperationExtendedInfo": - b = &OperationStatusValidateOperationExtendedInfo{} - default: - b = &OperationStatusExtendedInfo{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalProtectableContainerClassification(rawMsg json.RawMessage) (ProtectableContainerClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ProtectableContainerClassification - switch m["protectableContainerType"] { - case string(ContainerTypeStorageContainer): - b = &AzureStorageProtectableContainer{} - case string(ContainerTypeVMAppContainer): - b = &AzureVMAppContainerProtectableContainer{} - default: - b = &ProtectableContainer{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalProtectedItemClassification(rawMsg json.RawMessage) (ProtectedItemClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ProtectedItemClassification - switch m["protectedItemType"] { - case "AzureFileShareProtectedItem": - b = &AzureFileshareProtectedItem{} - case "AzureIaaSVMProtectedItem": - b = &AzureIaaSVMProtectedItem{} - case "AzureVmWorkloadProtectedItem": - b = &AzureVMWorkloadProtectedItem{} - case "AzureVmWorkloadSAPAseDatabase": - b = &AzureVMWorkloadSAPAseDatabaseProtectedItem{} - case "AzureVmWorkloadSAPHanaDatabase": - b = &AzureVMWorkloadSAPHanaDatabaseProtectedItem{} - case "AzureVmWorkloadSQLDatabase": - b = &AzureVMWorkloadSQLDatabaseProtectedItem{} - case "DPMProtectedItem": - b = &DPMProtectedItem{} - case "GenericProtectedItem": - b = &GenericProtectedItem{} - case "MabFileFolderProtectedItem": - b = &MabFileFolderProtectedItem{} - case "Microsoft.ClassicCompute/virtualMachines": - b = &AzureIaaSClassicComputeVMProtectedItem{} - case "Microsoft.Compute/virtualMachines": - b = &AzureIaaSComputeVMProtectedItem{} - case "Microsoft.Sql/servers/databases": - b = &AzureSQLProtectedItem{} - default: - b = &ProtectedItem{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalProtectionContainerClassification(rawMsg json.RawMessage) (ProtectionContainerClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ProtectionContainerClassification - switch m["containerType"] { - case string(ContainerTypeAzureBackupServerContainer): - b = &AzureBackupServerContainer{} - case string(ContainerTypeAzureSQLContainer): - b = &AzureSQLContainer{} - case string(ContainerTypeAzureWorkloadContainer): - b = &AzureWorkloadContainer{} - case string(ContainerTypeDPMContainer): - b = &DpmContainer{} - case string(ContainerTypeGenericContainer): - b = &GenericContainer{} - case string(ContainerTypeIaasVMContainer): - b = &IaaSVMContainer{} - case string(ContainerTypeMicrosoftClassicComputeVirtualMachines): - b = &AzureIaaSClassicComputeVMContainer{} - case string(ContainerTypeMicrosoftComputeVirtualMachines): - b = &AzureIaaSComputeVMContainer{} - case string(ContainerTypeSQLAGWorkLoadContainer): - b = &AzureSQLAGWorkloadContainerProtectionContainer{} - case string(ContainerTypeStorageContainer): - b = &AzureStorageContainer{} - case string(ContainerTypeVMAppContainer): - b = &AzureVMAppContainerProtectionContainer{} - case string(ContainerTypeWindows): - b = &MabContainer{} - default: - b = &ProtectionContainer{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalProtectionIntentClassification(rawMsg json.RawMessage) (ProtectionIntentClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ProtectionIntentClassification - switch m["protectionIntentItemType"] { - case string(ProtectionIntentItemTypeAzureResourceItem): - b = &AzureResourceProtectionIntent{} - case "ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent": - b = &AzureWorkloadAutoProtectionIntent{} - case string(ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent): - b = &AzureWorkloadContainerAutoProtectionIntent{} - case "ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent": - b = &AzureWorkloadSQLAutoProtectionIntent{} - case string(ProtectionIntentItemTypeRecoveryServiceVaultItem): - b = &AzureRecoveryServiceVaultProtectionIntent{} - default: - b = &ProtectionIntent{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalProtectionPolicyClassification(rawMsg json.RawMessage) (ProtectionPolicyClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ProtectionPolicyClassification - switch m["backupManagementType"] { - case "AzureIaasVM": - b = &AzureIaaSVMProtectionPolicy{} - case "AzureSql": - b = &AzureSQLProtectionPolicy{} - case "AzureStorage": - b = &AzureFileShareProtectionPolicy{} - case "AzureWorkload": - b = &AzureVMWorkloadProtectionPolicy{} - case "GenericProtectionPolicy": - b = &GenericProtectionPolicy{} - case "MAB": - b = &MabProtectionPolicy{} - default: - b = &ProtectionPolicy{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRecoveryPointClassification(rawMsg json.RawMessage) (RecoveryPointClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RecoveryPointClassification - switch m["objectType"] { - case "AzureFileShareRecoveryPoint": - b = &AzureFileShareRecoveryPoint{} - case "AzureWorkloadPointInTimeRecoveryPoint": - b = &AzureWorkloadPointInTimeRecoveryPoint{} - case "AzureWorkloadRecoveryPoint": - b = &AzureWorkloadRecoveryPoint{} - case "AzureWorkloadSAPHanaPointInTimeRecoveryPoint": - b = &AzureWorkloadSAPHanaPointInTimeRecoveryPoint{} - case "AzureWorkloadSAPHanaRecoveryPoint": - b = &AzureWorkloadSAPHanaRecoveryPoint{} - case "AzureWorkloadSQLPointInTimeRecoveryPoint": - b = &AzureWorkloadSQLPointInTimeRecoveryPoint{} - case "AzureWorkloadSQLRecoveryPoint": - b = &AzureWorkloadSQLRecoveryPoint{} - case "GenericRecoveryPoint": - b = &GenericRecoveryPoint{} - case "IaasVMRecoveryPoint": - b = &IaasVMRecoveryPoint{} - default: - b = &RecoveryPoint{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRestoreRequestClassification(rawMsg json.RawMessage) (RestoreRequestClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RestoreRequestClassification - switch m["objectType"] { - case "AzureFileShareRestoreRequest": - b = &AzureFileShareRestoreRequest{} - case "AzureWorkloadPointInTimeRestoreRequest": - b = &AzureWorkloadPointInTimeRestoreRequest{} - case "AzureWorkloadRestoreRequest": - b = &AzureWorkloadRestoreRequest{} - case "AzureWorkloadSAPHanaPointInTimeRestoreRequest": - b = &AzureWorkloadSAPHanaPointInTimeRestoreRequest{} - case "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest": - b = &AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest{} - case "AzureWorkloadSAPHanaRestoreRequest": - b = &AzureWorkloadSAPHanaRestoreRequest{} - case "AzureWorkloadSAPHanaRestoreWithRehydrateRequest": - b = &AzureWorkloadSAPHanaRestoreWithRehydrateRequest{} - case "AzureWorkloadSQLPointInTimeRestoreRequest": - b = &AzureWorkloadSQLPointInTimeRestoreRequest{} - case "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest": - b = &AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest{} - case "AzureWorkloadSQLRestoreRequest": - b = &AzureWorkloadSQLRestoreRequest{} - case "AzureWorkloadSQLRestoreWithRehydrateRequest": - b = &AzureWorkloadSQLRestoreWithRehydrateRequest{} - case "IaasVMRestoreRequest": - b = &IaasVMRestoreRequest{} - case "IaasVMRestoreWithRehydrationRequest": - b = &IaasVMRestoreWithRehydrationRequest{} - default: - b = &RestoreRequest{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRetentionPolicyClassification(rawMsg json.RawMessage) (RetentionPolicyClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RetentionPolicyClassification - switch m["retentionPolicyType"] { - case "LongTermRetentionPolicy": - b = &LongTermRetentionPolicy{} - case "SimpleRetentionPolicy": - b = &SimpleRetentionPolicy{} - default: - b = &RetentionPolicy{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalSchedulePolicyClassification(rawMsg json.RawMessage) (SchedulePolicyClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b SchedulePolicyClassification - switch m["schedulePolicyType"] { - case "LogSchedulePolicy": - b = &LogSchedulePolicy{} - case "LongTermSchedulePolicy": - b = &LongTermSchedulePolicy{} - case "SimpleSchedulePolicy": - b = &SimpleSchedulePolicy{} - case "SimpleSchedulePolicyV2": - b = &SimpleSchedulePolicyV2{} - default: - b = &SchedulePolicy{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalVaultStorageConfigOperationResultResponseClassification(rawMsg json.RawMessage) (VaultStorageConfigOperationResultResponseClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b VaultStorageConfigOperationResultResponseClassification - switch m["objectType"] { - case "PrepareDataMoveResponse": - b = &PrepareDataMoveResponse{} - default: - b = &VaultStorageConfigOperationResultResponse{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalWorkloadItemClassification(rawMsg json.RawMessage) (WorkloadItemClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b WorkloadItemClassification - switch m["workloadItemType"] { - case "AzureVmWorkloadItem": - b = &AzureVMWorkloadItem{} - case "SAPAseDatabase": - b = &AzureVMWorkloadSAPAseDatabaseWorkloadItem{} - case "SAPAseSystem": - b = &AzureVMWorkloadSAPAseSystemWorkloadItem{} - case "SAPHanaDatabase": - b = &AzureVMWorkloadSAPHanaDatabaseWorkloadItem{} - case "SAPHanaSystem": - b = &AzureVMWorkloadSAPHanaSystemWorkloadItem{} - case "SQLDataBase": - b = &AzureVMWorkloadSQLDatabaseWorkloadItem{} - case "SQLInstance": - b = &AzureVMWorkloadSQLInstanceWorkloadItem{} - default: - b = &WorkloadItem{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalWorkloadProtectableItemClassification(rawMsg json.RawMessage) (WorkloadProtectableItemClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b WorkloadProtectableItemClassification - switch m["protectableItemType"] { - case "AzureFileShare": - b = &AzureFileShareProtectableItem{} - case "AzureVmWorkloadProtectableItem": - b = &AzureVMWorkloadProtectableItem{} - case "IaaSVMProtectableItem": - b = &IaaSVMProtectableItem{} - case "Microsoft.ClassicCompute/virtualMachines": - b = &AzureIaaSClassicComputeVMProtectableItem{} - case "Microsoft.Compute/virtualMachines": - b = &AzureIaaSComputeVMProtectableItem{} - case "SAPAseSystem": - b = &AzureVMWorkloadSAPAseSystemProtectableItem{} - case "SAPHanaDatabase": - b = &AzureVMWorkloadSAPHanaDatabaseProtectableItem{} - case "SAPHanaSystem": - b = &AzureVMWorkloadSAPHanaSystemProtectableItem{} - case "SQLAvailabilityGroupContainer": - b = &AzureVMWorkloadSQLAvailabilityGroupProtectableItem{} - case "SQLDataBase": - b = &AzureVMWorkloadSQLDatabaseProtectableItem{} - case "SQLInstance": - b = &AzureVMWorkloadSQLInstanceProtectableItem{} - default: - b = &WorkloadProtectableItem{} - } - return b, json.Unmarshal(rawMsg, b) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_privateendpoint_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_privateendpoint_client.go deleted file mode 100644 index dfff28f1..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_privateendpoint_client.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateEndpointClient contains the methods for the PrivateEndpoint group. -// Don't use this type directly, use NewPrivateEndpointClient() instead. -type PrivateEndpointClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPrivateEndpointClient creates a new instance of PrivateEndpointClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPrivateEndpointClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PrivateEndpointClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// GetOperationStatus - Gets the operation status for a private endpoint connection. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// privateEndpointConnectionName - The name of the private endpoint connection. -// operationID - Operation id -// options - PrivateEndpointClientGetOperationStatusOptions contains the optional parameters for the PrivateEndpointClient.GetOperationStatus -// method. -func (client *PrivateEndpointClient) GetOperationStatus(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, operationID string, options *PrivateEndpointClientGetOperationStatusOptions) (PrivateEndpointClientGetOperationStatusResponse, error) { - req, err := client.getOperationStatusCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, operationID, options) - if err != nil { - return PrivateEndpointClientGetOperationStatusResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateEndpointClientGetOperationStatusResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointClientGetOperationStatusResponse{}, runtime.NewResponseError(resp) - } - return client.getOperationStatusHandleResponse(resp) -} - -// getOperationStatusCreateRequest creates the GetOperationStatus request. -func (client *PrivateEndpointClient) getOperationStatusCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, operationID string, options *PrivateEndpointClientGetOperationStatusOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getOperationStatusHandleResponse handles the GetOperationStatus response. -func (client *PrivateEndpointClient) getOperationStatusHandleResponse(resp *http.Response) (PrivateEndpointClientGetOperationStatusResponse, error) { - result := PrivateEndpointClientGetOperationStatusResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { - return PrivateEndpointClientGetOperationStatusResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_privateendpointconnection_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_privateendpointconnection_client.go deleted file mode 100644 index c2c4e85e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_privateendpointconnection_client.go +++ /dev/null @@ -1,254 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// PrivateEndpointConnectionClient contains the methods for the PrivateEndpointConnection group. -// Don't use this type directly, use NewPrivateEndpointConnectionClient() instead. -type PrivateEndpointConnectionClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewPrivateEndpointConnectionClient creates a new instance of PrivateEndpointConnectionClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewPrivateEndpointConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &PrivateEndpointConnectionClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginDelete - Delete Private Endpoint requests. This call is made by Backup Admin. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// privateEndpointConnectionName - The name of the private endpoint connection. -// options - PrivateEndpointConnectionClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginDelete -// method. -func (client *PrivateEndpointConnectionClient) BeginDelete(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateEndpointConnectionClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete Private Endpoint requests. This call is made by Backup Admin. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -func (client *PrivateEndpointConnectionClient) deleteOperation(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *PrivateEndpointConnectionClient) deleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Get Private Endpoint Connection. This call is made by Backup Admin. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// privateEndpointConnectionName - The name of the private endpoint connection. -// options - PrivateEndpointConnectionClientGetOptions contains the optional parameters for the PrivateEndpointConnectionClient.Get -// method. -func (client *PrivateEndpointConnectionClient) Get(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientGetOptions) (PrivateEndpointConnectionClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, options) - if err != nil { - return PrivateEndpointConnectionClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PrivateEndpointConnectionClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *PrivateEndpointConnectionClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *PrivateEndpointConnectionClient) getHandleResponse(resp *http.Response) (PrivateEndpointConnectionClientGetResponse, error) { - result := PrivateEndpointConnectionClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionResource); err != nil { - return PrivateEndpointConnectionClientGetResponse{}, err - } - return result, nil -} - -// BeginPut - Approve or Reject Private Endpoint requests. This call is made by Backup Admin. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// privateEndpointConnectionName - The name of the private endpoint connection. -// parameters - Request body for operation -// options - PrivateEndpointConnectionClientBeginPutOptions contains the optional parameters for the PrivateEndpointConnectionClient.BeginPut -// method. -func (client *PrivateEndpointConnectionClient) BeginPut(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, parameters PrivateEndpointConnectionResource, options *PrivateEndpointConnectionClientBeginPutOptions) (*runtime.Poller[PrivateEndpointConnectionClientPutResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.put(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[PrivateEndpointConnectionClientPutResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionClientPutResponse](options.ResumeToken, client.pl, nil) - } -} - -// Put - Approve or Reject Private Endpoint requests. This call is made by Backup Admin. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -func (client *PrivateEndpointConnectionClient) put(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, parameters PrivateEndpointConnectionResource, options *PrivateEndpointConnectionClientBeginPutOptions) (*http.Response, error) { - req, err := client.putCreateRequest(ctx, vaultName, resourceGroupName, privateEndpointConnectionName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// putCreateRequest creates the Put request. -func (client *PrivateEndpointConnectionClient) putCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, privateEndpointConnectionName string, parameters PrivateEndpointConnectionResource, options *PrivateEndpointConnectionClientBeginPutOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if privateEndpointConnectionName == "" { - return nil, errors.New("parameter privateEndpointConnectionName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectablecontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectablecontainers_client.go deleted file mode 100644 index b26e6ab0..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectablecontainers_client.go +++ /dev/null @@ -1,132 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectableContainersClient contains the methods for the ProtectableContainers group. -// Don't use this type directly, use NewProtectableContainersClient() instead. -type ProtectableContainersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectableContainersClient creates a new instance of ProtectableContainersClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectableContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectableContainersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectableContainersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists the containers that can be registered to Recovery Services Vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - ProtectableContainersClientListOptions contains the optional parameters for the ProtectableContainersClient.List -// method. -func (client *ProtectableContainersClient) NewListPager(vaultName string, resourceGroupName string, fabricName string, options *ProtectableContainersClientListOptions) *runtime.Pager[ProtectableContainersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ProtectableContainersClientListResponse]{ - More: func(page ProtectableContainersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ProtectableContainersClientListResponse) (ProtectableContainersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, fabricName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProtectableContainersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectableContainersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectableContainersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ProtectableContainersClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, options *ProtectableContainersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ProtectableContainersClient) listHandleResponse(resp *http.Response) (ProtectableContainersClientListResponse, error) { - result := ProtectableContainersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectableContainerResourceList); err != nil { - return ProtectableContainersClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protecteditemoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protecteditemoperationresults_client.go deleted file mode 100644 index 20e83697..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protecteditemoperationresults_client.go +++ /dev/null @@ -1,132 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectedItemOperationResultsClient contains the methods for the ProtectedItemOperationResults group. -// Don't use this type directly, use NewProtectedItemOperationResultsClient() instead. -type ProtectedItemOperationResultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectedItemOperationResultsClient creates a new instance of ProtectedItemOperationResultsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectedItemOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectedItemOperationResultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectedItemOperationResultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches the result of any operation on the backup item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backup item. -// containerName - Container name associated with the backup item. -// protectedItemName - Backup item name whose details are to be fetched. -// operationID - OperationID which represents the operation whose result needs to be fetched. -// options - ProtectedItemOperationResultsClientGetOptions contains the optional parameters for the ProtectedItemOperationResultsClient.Get -// method. -func (client *ProtectedItemOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string, options *ProtectedItemOperationResultsClientGetOptions) (ProtectedItemOperationResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID, options) - if err != nil { - return ProtectedItemOperationResultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectedItemOperationResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return ProtectedItemOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProtectedItemOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string, options *ProtectedItemOperationResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProtectedItemOperationResultsClient) getHandleResponse(resp *http.Response) (ProtectedItemOperationResultsClientGetResponse, error) { - result := ProtectedItemOperationResultsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectedItemResource); err != nil { - return ProtectedItemOperationResultsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protecteditemoperationstatuses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protecteditemoperationstatuses_client.go deleted file mode 100644 index 78a841e8..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protecteditemoperationstatuses_client.go +++ /dev/null @@ -1,134 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectedItemOperationStatusesClient contains the methods for the ProtectedItemOperationStatuses group. -// Don't use this type directly, use NewProtectedItemOperationStatusesClient() instead. -type ProtectedItemOperationStatusesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectedItemOperationStatusesClient creates a new instance of ProtectedItemOperationStatusesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectedItemOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectedItemOperationStatusesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectedItemOperationStatusesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed -// or failed. You can refer to the OperationStatus enum for all the possible states of -// the operation. Some operations create jobs. This method returns the list of jobs associated with the operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backup item. -// containerName - Container name associated with the backup item. -// protectedItemName - Backup item name whose details are to be fetched. -// operationID - OperationID represents the operation whose status needs to be fetched. -// options - ProtectedItemOperationStatusesClientGetOptions contains the optional parameters for the ProtectedItemOperationStatusesClient.Get -// method. -func (client *ProtectedItemOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string, options *ProtectedItemOperationStatusesClientGetOptions) (ProtectedItemOperationStatusesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID, options) - if err != nil { - return ProtectedItemOperationStatusesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectedItemOperationStatusesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectedItemOperationStatusesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProtectedItemOperationStatusesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string, options *ProtectedItemOperationStatusesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProtectedItemOperationStatusesClient) getHandleResponse(resp *http.Response) (ProtectedItemOperationStatusesClientGetResponse, error) { - result := ProtectedItemOperationStatusesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { - return ProtectedItemOperationStatusesClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protecteditems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protecteditems_client.go deleted file mode 100644 index 2169380f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protecteditems_client.go +++ /dev/null @@ -1,268 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectedItemsClient contains the methods for the ProtectedItems group. -// Don't use this type directly, use NewProtectedItemsClient() instead. -type ProtectedItemsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectedItemsClient creates a new instance of ProtectedItemsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectedItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectedItemsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectedItemsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Enables backup of an item or to modifies the backup policy information of an already backed up item. This -// is an asynchronous operation. To know the status of the operation, call the -// GetItemOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backup item. -// containerName - Container name associated with the backup item. -// protectedItemName - Item name to be backed up. -// parameters - resource backed up item -// options - ProtectedItemsClientCreateOrUpdateOptions contains the optional parameters for the ProtectedItemsClient.CreateOrUpdate -// method. -func (client *ProtectedItemsClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ProtectedItemResource, options *ProtectedItemsClientCreateOrUpdateOptions) (ProtectedItemsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, options) - if err != nil { - return ProtectedItemsClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectedItemsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ProtectedItemsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ProtectedItemsClient) createOrUpdateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ProtectedItemResource, options *ProtectedItemsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ProtectedItemsClient) createOrUpdateHandleResponse(resp *http.Response) (ProtectedItemsClientCreateOrUpdateResponse, error) { - result := ProtectedItemsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectedItemResource); err != nil { - return ProtectedItemsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of -// the request, call the GetItemOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backed up item. -// containerName - Container name associated with the backed up item. -// protectedItemName - Backed up item to be deleted. -// options - ProtectedItemsClientDeleteOptions contains the optional parameters for the ProtectedItemsClient.Delete method. -func (client *ProtectedItemsClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *ProtectedItemsClientDeleteOptions) (ProtectedItemsClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, options) - if err != nil { - return ProtectedItemsClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectedItemsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return ProtectedItemsClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ProtectedItemsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ProtectedItemsClient) deleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *ProtectedItemsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, -// call the GetItemOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backed up item. -// containerName - Container name associated with the backed up item. -// protectedItemName - Backed up item name whose details are to be fetched. -// options - ProtectedItemsClientGetOptions contains the optional parameters for the ProtectedItemsClient.Get method. -func (client *ProtectedItemsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *ProtectedItemsClientGetOptions) (ProtectedItemsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, options) - if err != nil { - return ProtectedItemsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectedItemsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectedItemsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProtectedItemsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *ProtectedItemsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProtectedItemsClient) getHandleResponse(resp *http.Response) (ProtectedItemsClientGetResponse, error) { - result := ProtectedItemsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectedItemResource); err != nil { - return ProtectedItemsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectioncontaineroperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectioncontaineroperationresults_client.go deleted file mode 100644 index 4d8f3a44..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectioncontaineroperationresults_client.go +++ /dev/null @@ -1,127 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectionContainerOperationResultsClient contains the methods for the ProtectionContainerOperationResults group. -// Don't use this type directly, use NewProtectionContainerOperationResultsClient() instead. -type ProtectionContainerOperationResultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectionContainerOperationResultsClient creates a new instance of ProtectionContainerOperationResultsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectionContainerOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionContainerOperationResultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectionContainerOperationResultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches the result of any operation on the container. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the container. -// containerName - Container name whose information should be fetched. -// operationID - Operation ID which represents the operation whose result needs to be fetched. -// options - ProtectionContainerOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerOperationResultsClient.Get -// method. -func (client *ProtectionContainerOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string, options *ProtectionContainerOperationResultsClientGetOptions) (ProtectionContainerOperationResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, operationID, options) - if err != nil { - return ProtectionContainerOperationResultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionContainerOperationResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return ProtectionContainerOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProtectionContainerOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string, options *ProtectionContainerOperationResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProtectionContainerOperationResultsClient) getHandleResponse(resp *http.Response) (ProtectionContainerOperationResultsClientGetResponse, error) { - result := ProtectionContainerOperationResultsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerResource); err != nil { - return ProtectionContainerOperationResultsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectioncontainerrefreshoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectioncontainerrefreshoperationresults_client.go deleted file mode 100644 index 66c262c5..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectioncontainerrefreshoperationresults_client.go +++ /dev/null @@ -1,113 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectionContainerRefreshOperationResultsClient contains the methods for the ProtectionContainerRefreshOperationResults group. -// Don't use this type directly, use NewProtectionContainerRefreshOperationResultsClient() instead. -type ProtectionContainerRefreshOperationResultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectionContainerRefreshOperationResultsClient creates a new instance of ProtectionContainerRefreshOperationResultsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionContainerRefreshOperationResultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectionContainerRefreshOperationResultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Provides the result of the refresh operation triggered by the BeginRefresh operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the container. -// operationID - Operation ID associated with the operation whose result needs to be fetched. -// options - ProtectionContainerRefreshOperationResultsClientGetOptions contains the optional parameters for the ProtectionContainerRefreshOperationResultsClient.Get -// method. -func (client *ProtectionContainerRefreshOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string, options *ProtectionContainerRefreshOperationResultsClientGetOptions) (ProtectionContainerRefreshOperationResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, operationID, options) - if err != nil { - return ProtectionContainerRefreshOperationResultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionContainerRefreshOperationResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return ProtectionContainerRefreshOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return ProtectionContainerRefreshOperationResultsClientGetResponse{}, nil -} - -// getCreateRequest creates the Get request. -func (client *ProtectionContainerRefreshOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string, options *ProtectionContainerRefreshOperationResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectioncontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectioncontainers_client.go deleted file mode 100644 index 653d17ff..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectioncontainers_client.go +++ /dev/null @@ -1,370 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectionContainersClient contains the methods for the ProtectionContainers group. -// Don't use this type directly, use NewProtectionContainersClient() instead. -type ProtectionContainersClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectionContainersClient creates a new instance of ProtectionContainersClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectionContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionContainersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectionContainersClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets details of the specific container registered to your Recovery Services Vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Name of the fabric where the container belongs. -// containerName - Name of the container whose details need to be fetched. -// options - ProtectionContainersClientGetOptions contains the optional parameters for the ProtectionContainersClient.Get -// method. -func (client *ProtectionContainersClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientGetOptions) (ProtectionContainersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) - if err != nil { - return ProtectionContainersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionContainersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionContainersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProtectionContainersClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProtectionContainersClient) getHandleResponse(resp *http.Response) (ProtectionContainersClientGetResponse, error) { - result := ProtectionContainersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerResource); err != nil { - return ProtectionContainersClientGetResponse{}, err - } - return result, nil -} - -// Inquire - This is an async operation and the results should be tracked using location header or Azure-async-url. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric Name associated with the container. -// containerName - Name of the container in which inquiry needs to be triggered. -// options - ProtectionContainersClientInquireOptions contains the optional parameters for the ProtectionContainersClient.Inquire -// method. -func (client *ProtectionContainersClient) Inquire(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientInquireOptions) (ProtectionContainersClientInquireResponse, error) { - req, err := client.inquireCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) - if err != nil { - return ProtectionContainersClientInquireResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionContainersClientInquireResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return ProtectionContainersClientInquireResponse{}, runtime.NewResponseError(resp) - } - return ProtectionContainersClientInquireResponse{}, nil -} - -// inquireCreateRequest creates the Inquire request. -func (client *ProtectionContainersClient) inquireCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientInquireOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Refresh - Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an -// asynchronous operation. To know the status of the operation, call -// GetRefreshOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated the container. -// options - ProtectionContainersClientRefreshOptions contains the optional parameters for the ProtectionContainersClient.Refresh -// method. -func (client *ProtectionContainersClient) Refresh(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, options *ProtectionContainersClientRefreshOptions) (ProtectionContainersClientRefreshResponse, error) { - req, err := client.refreshCreateRequest(ctx, vaultName, resourceGroupName, fabricName, options) - if err != nil { - return ProtectionContainersClientRefreshResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionContainersClientRefreshResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return ProtectionContainersClientRefreshResponse{}, runtime.NewResponseError(resp) - } - return ProtectionContainersClientRefreshResponse{}, nil -} - -// refreshCreateRequest creates the Refresh request. -func (client *ProtectionContainersClient) refreshCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, options *ProtectionContainersClientRefreshOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Register - Registers the container with Recovery Services vault. This is an asynchronous operation. To track the operation -// status, use location header to call get latest status of the operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the container. -// containerName - Name of the container to be registered. -// parameters - Request body for operation -// options - ProtectionContainersClientRegisterOptions contains the optional parameters for the ProtectionContainersClient.Register -// method. -func (client *ProtectionContainersClient) Register(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters ProtectionContainerResource, options *ProtectionContainersClientRegisterOptions) (ProtectionContainersClientRegisterResponse, error) { - req, err := client.registerCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, parameters, options) - if err != nil { - return ProtectionContainersClientRegisterResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionContainersClientRegisterResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ProtectionContainersClientRegisterResponse{}, runtime.NewResponseError(resp) - } - return client.registerHandleResponse(resp) -} - -// registerCreateRequest creates the Register request. -func (client *ProtectionContainersClient) registerCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters ProtectionContainerResource, options *ProtectionContainersClientRegisterOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// registerHandleResponse handles the Register response. -func (client *ProtectionContainersClient) registerHandleResponse(resp *http.Response) (ProtectionContainersClientRegisterResponse, error) { - result := ProtectionContainersClientRegisterResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerResource); err != nil { - return ProtectionContainersClientRegisterResponse{}, err - } - return result, nil -} - -// Unregister - Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To determine -// whether the backend service has finished processing the request, call Get Container -// Operation Result API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Name of the fabric where the container belongs. -// containerName - Name of the container which needs to be unregistered from the Recovery Services Vault. -// options - ProtectionContainersClientUnregisterOptions contains the optional parameters for the ProtectionContainersClient.Unregister -// method. -func (client *ProtectionContainersClient) Unregister(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientUnregisterOptions) (ProtectionContainersClientUnregisterResponse, error) { - req, err := client.unregisterCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, options) - if err != nil { - return ProtectionContainersClientUnregisterResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionContainersClientUnregisterResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return ProtectionContainersClientUnregisterResponse{}, runtime.NewResponseError(resp) - } - return ProtectionContainersClientUnregisterResponse{}, nil -} - -// unregisterCreateRequest creates the Unregister request. -func (client *ProtectionContainersClient) unregisterCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, options *ProtectionContainersClientUnregisterOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionintent_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionintent_client.go deleted file mode 100644 index 0ce8720d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionintent_client.go +++ /dev/null @@ -1,302 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectionIntentClient contains the methods for the ProtectionIntent group. -// Don't use this type directly, use NewProtectionIntentClient() instead. -type ProtectionIntentClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectionIntentClient creates a new instance of ProtectionIntentClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectionIntentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionIntentClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectionIntentClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Create Intent for Enabling backup of an item. This is a synchronous operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backup item. -// intentObjectName - Intent object name. -// parameters - resource backed up item -// options - ProtectionIntentClientCreateOrUpdateOptions contains the optional parameters for the ProtectionIntentClient.CreateOrUpdate -// method. -func (client *ProtectionIntentClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters ProtectionIntentResource, options *ProtectionIntentClientCreateOrUpdateOptions) (ProtectionIntentClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, parameters, options) - if err != nil { - return ProtectionIntentClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionIntentClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionIntentClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ProtectionIntentClient) createOrUpdateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters ProtectionIntentResource, options *ProtectionIntentClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if intentObjectName == "" { - return nil, errors.New("parameter intentObjectName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{intentObjectName}", url.PathEscape(intentObjectName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ProtectionIntentClient) createOrUpdateHandleResponse(resp *http.Response) (ProtectionIntentClientCreateOrUpdateResponse, error) { - result := ProtectionIntentClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionIntentResource); err != nil { - return ProtectionIntentClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Used to remove intent from an item -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the intent. -// intentObjectName - Intent to be deleted. -// options - ProtectionIntentClientDeleteOptions contains the optional parameters for the ProtectionIntentClient.Delete method. -func (client *ProtectionIntentClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, options *ProtectionIntentClientDeleteOptions) (ProtectionIntentClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, options) - if err != nil { - return ProtectionIntentClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionIntentClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return ProtectionIntentClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ProtectionIntentClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ProtectionIntentClient) deleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, options *ProtectionIntentClientDeleteOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if intentObjectName == "" { - return nil, errors.New("parameter intentObjectName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{intentObjectName}", url.PathEscape(intentObjectName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the -// operation, call the GetItemOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backed up item. -// intentObjectName - Backed up item name whose details are to be fetched. -// options - ProtectionIntentClientGetOptions contains the optional parameters for the ProtectionIntentClient.Get method. -func (client *ProtectionIntentClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, options *ProtectionIntentClientGetOptions) (ProtectionIntentClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, options) - if err != nil { - return ProtectionIntentClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionIntentClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionIntentClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProtectionIntentClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, options *ProtectionIntentClientGetOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if intentObjectName == "" { - return nil, errors.New("parameter intentObjectName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{intentObjectName}", url.PathEscape(intentObjectName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProtectionIntentClient) getHandleResponse(resp *http.Response) (ProtectionIntentClientGetResponse, error) { - result := ProtectionIntentClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionIntentResource); err != nil { - return ProtectionIntentClientGetResponse{}, err - } - return result, nil -} - -// Validate - It will validate followings -// 1. Vault capacity -// 2. VM is already protected -// 3. Any VM related configuration passed in properties. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// azureRegion - Azure region to hit Api -// parameters - Enable backup validation request on Virtual Machine -// options - ProtectionIntentClientValidateOptions contains the optional parameters for the ProtectionIntentClient.Validate -// method. -func (client *ProtectionIntentClient) Validate(ctx context.Context, azureRegion string, parameters PreValidateEnableBackupRequest, options *ProtectionIntentClientValidateOptions) (ProtectionIntentClientValidateResponse, error) { - req, err := client.validateCreateRequest(ctx, azureRegion, parameters, options) - if err != nil { - return ProtectionIntentClientValidateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionIntentClientValidateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionIntentClientValidateResponse{}, runtime.NewResponseError(resp) - } - return client.validateHandleResponse(resp) -} - -// validateCreateRequest creates the Validate request. -func (client *ProtectionIntentClient) validateCreateRequest(ctx context.Context, azureRegion string, parameters PreValidateEnableBackupRequest, options *ProtectionIntentClientValidateOptions) (*policy.Request, error) { - urlPath := "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection" - if azureRegion == "" { - return nil, errors.New("parameter azureRegion cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{azureRegion}", url.PathEscape(azureRegion)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// validateHandleResponse handles the Validate response. -func (client *ProtectionIntentClient) validateHandleResponse(resp *http.Response) (ProtectionIntentClientValidateResponse, error) { - result := ProtectionIntentClientValidateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PreValidateEnableBackupResponse); err != nil { - return ProtectionIntentClientValidateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionpolicies_client.go deleted file mode 100644 index e9685fc0..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionpolicies_client.go +++ /dev/null @@ -1,251 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectionPoliciesClient contains the methods for the ProtectionPolicies group. -// Don't use this type directly, use NewProtectionPoliciesClient() instead. -type ProtectionPoliciesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectionPoliciesClient creates a new instance of ProtectionPoliciesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionPoliciesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectionPoliciesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// CreateOrUpdate - Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be -// fetched using GetPolicyOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// policyName - Backup policy to be created. -// parameters - resource backup policy -// options - ProtectionPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ProtectionPoliciesClient.CreateOrUpdate -// method. -func (client *ProtectionPoliciesClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource, options *ProtectionPoliciesClientCreateOrUpdateOptions) (ProtectionPoliciesClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, vaultName, resourceGroupName, policyName, parameters, options) - if err != nil { - return ProtectionPoliciesClientCreateOrUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionPoliciesClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ProtectionPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ProtectionPoliciesClient) createOrUpdateCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource, options *ProtectionPoliciesClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ProtectionPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (ProtectionPoliciesClientCreateOrUpdateResponse, error) { - result := ProtectionPoliciesClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionPolicyResource); err != nil { - return ProtectionPoliciesClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status -// of the operation can be fetched using GetProtectionPolicyOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// policyName - Backup policy to be deleted. -// options - ProtectionPoliciesClientBeginDeleteOptions contains the optional parameters for the ProtectionPoliciesClient.BeginDelete -// method. -func (client *ProtectionPoliciesClient) BeginDelete(ctx context.Context, vaultName string, resourceGroupName string, policyName string, options *ProtectionPoliciesClientBeginDeleteOptions) (*runtime.Poller[ProtectionPoliciesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, vaultName, resourceGroupName, policyName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ProtectionPoliciesClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ProtectionPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of -// the operation can be fetched using GetProtectionPolicyOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -func (client *ProtectionPoliciesClient) deleteOperation(ctx context.Context, vaultName string, resourceGroupName string, policyName string, options *ProtectionPoliciesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, policyName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ProtectionPoliciesClient) deleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, policyName string, options *ProtectionPoliciesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous operation. -// Status of the operation can be fetched using GetPolicyOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// policyName - Backup policy information to be fetched. -// options - ProtectionPoliciesClientGetOptions contains the optional parameters for the ProtectionPoliciesClient.Get method. -func (client *ProtectionPoliciesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, options *ProtectionPoliciesClientGetOptions) (ProtectionPoliciesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, policyName, options) - if err != nil { - return ProtectionPoliciesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionPoliciesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionPoliciesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProtectionPoliciesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, policyName string, options *ProtectionPoliciesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProtectionPoliciesClient) getHandleResponse(resp *http.Response) (ProtectionPoliciesClientGetResponse, error) { - result := ProtectionPoliciesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionPolicyResource); err != nil { - return ProtectionPoliciesClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionpolicyoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionpolicyoperationresults_client.go deleted file mode 100644 index d56626c6..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionpolicyoperationresults_client.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectionPolicyOperationResultsClient contains the methods for the ProtectionPolicyOperationResults group. -// Don't use this type directly, use NewProtectionPolicyOperationResultsClient() instead. -type ProtectionPolicyOperationResultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectionPolicyOperationResultsClient creates a new instance of ProtectionPolicyOperationResultsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectionPolicyOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionPolicyOperationResultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectionPolicyOperationResultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Provides the result of an operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// policyName - Backup policy name whose operation's result needs to be fetched. -// operationID - Operation ID which represents the operation whose result needs to be fetched. -// options - ProtectionPolicyOperationResultsClientGetOptions contains the optional parameters for the ProtectionPolicyOperationResultsClient.Get -// method. -func (client *ProtectionPolicyOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string, options *ProtectionPolicyOperationResultsClientGetOptions) (ProtectionPolicyOperationResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, policyName, operationID, options) - if err != nil { - return ProtectionPolicyOperationResultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionPolicyOperationResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionPolicyOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProtectionPolicyOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string, options *ProtectionPolicyOperationResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProtectionPolicyOperationResultsClient) getHandleResponse(resp *http.Response) (ProtectionPolicyOperationResultsClientGetResponse, error) { - result := ProtectionPolicyOperationResultsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionPolicyResource); err != nil { - return ProtectionPolicyOperationResultsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionpolicyoperationstatuses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionpolicyoperationstatuses_client.go deleted file mode 100644 index b5ceb9e6..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_protectionpolicyoperationstatuses_client.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ProtectionPolicyOperationStatusesClient contains the methods for the ProtectionPolicyOperationStatuses group. -// Don't use this type directly, use NewProtectionPolicyOperationStatusesClient() instead. -type ProtectionPolicyOperationStatusesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewProtectionPolicyOperationStatusesClient creates a new instance of ProtectionPolicyOperationStatusesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewProtectionPolicyOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProtectionPolicyOperationStatusesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ProtectionPolicyOperationStatusesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed -// or failed. You can refer to the Operation Status enum for all the possible states of -// an operation. Some operations create jobs. This method returns the list of jobs associated with operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// policyName - Backup policy name whose operation's status needs to be fetched. -// operationID - Operation ID which represents an operation whose status needs to be fetched. -// options - ProtectionPolicyOperationStatusesClientGetOptions contains the optional parameters for the ProtectionPolicyOperationStatusesClient.Get -// method. -func (client *ProtectionPolicyOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string, options *ProtectionPolicyOperationStatusesClientGetOptions) (ProtectionPolicyOperationStatusesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, policyName, operationID, options) - if err != nil { - return ProtectionPolicyOperationStatusesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ProtectionPolicyOperationStatusesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProtectionPolicyOperationStatusesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ProtectionPolicyOperationStatusesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string, options *ProtectionPolicyOperationStatusesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ProtectionPolicyOperationStatusesClient) getHandleResponse(resp *http.Response) (ProtectionPolicyOperationStatusesClientGetResponse, error) { - result := ProtectionPolicyOperationStatusesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { - return ProtectionPolicyOperationStatusesClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_recoverypoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_recoverypoints_client.go deleted file mode 100644 index 0cd4c825..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_recoverypoints_client.go +++ /dev/null @@ -1,219 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RecoveryPointsClient contains the methods for the RecoveryPoints group. -// Don't use this type directly, use NewRecoveryPointsClient() instead. -type RecoveryPointsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRecoveryPointsClient creates a new instance of RecoveryPointsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRecoveryPointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoveryPointsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RecoveryPointsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous operation. -// To know the status of the operation, call the GetProtectedItemOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with backed up item. -// containerName - Container name associated with backed up item. -// protectedItemName - Backed up item name whose backup data needs to be fetched. -// recoveryPointID - RecoveryPointID represents the backed up data to be fetched. -// options - RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. -func (client *RecoveryPointsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (RecoveryPointsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, options) - if err != nil { - return RecoveryPointsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecoveryPointsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecoveryPointsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *RecoveryPointsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - if recoveryPointID == "" { - return nil, errors.New("parameter recoveryPointID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *RecoveryPointsClient) getHandleResponse(resp *http.Response) (RecoveryPointsClientGetResponse, error) { - result := RecoveryPointsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPointResource); err != nil { - return RecoveryPointsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the backup copies for the backed up item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backed up item. -// containerName - Container name associated with the backed up item. -// protectedItemName - Backed up item whose backup copies are to be fetched. -// options - RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.List method. -func (client *RecoveryPointsClient) NewListPager(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *RecoveryPointsClientListOptions) *runtime.Pager[RecoveryPointsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[RecoveryPointsClientListResponse]{ - More: func(page RecoveryPointsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RecoveryPointsClientListResponse) (RecoveryPointsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RecoveryPointsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecoveryPointsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecoveryPointsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *RecoveryPointsClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, options *RecoveryPointsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *RecoveryPointsClient) listHandleResponse(resp *http.Response) (RecoveryPointsClientListResponse, error) { - result := RecoveryPointsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPointResourceList); err != nil { - return RecoveryPointsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_recoverypointsrecommendedformove_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_recoverypointsrecommendedformove_client.go deleted file mode 100644 index 9bb18d31..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_recoverypointsrecommendedformove_client.go +++ /dev/null @@ -1,138 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RecoveryPointsRecommendedForMoveClient contains the methods for the RecoveryPointsRecommendedForMove group. -// Don't use this type directly, use NewRecoveryPointsRecommendedForMoveClient() instead. -type RecoveryPointsRecommendedForMoveClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRecoveryPointsRecommendedForMoveClient creates a new instance of RecoveryPointsRecommendedForMoveClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRecoveryPointsRecommendedForMoveClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoveryPointsRecommendedForMoveClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RecoveryPointsRecommendedForMoveClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists the recovery points recommended for move to another tier -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - List Recovery points Recommended for Move Request -// options - RecoveryPointsRecommendedForMoveClientListOptions contains the optional parameters for the RecoveryPointsRecommendedForMoveClient.List -// method. -func (client *RecoveryPointsRecommendedForMoveClient) NewListPager(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ListRecoveryPointsRecommendedForMoveRequest, options *RecoveryPointsRecommendedForMoveClientListOptions) *runtime.Pager[RecoveryPointsRecommendedForMoveClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[RecoveryPointsRecommendedForMoveClientListResponse]{ - More: func(page RecoveryPointsRecommendedForMoveClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RecoveryPointsRecommendedForMoveClientListResponse) (RecoveryPointsRecommendedForMoveClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RecoveryPointsRecommendedForMoveClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecoveryPointsRecommendedForMoveClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecoveryPointsRecommendedForMoveClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *RecoveryPointsRecommendedForMoveClient) listCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ListRecoveryPointsRecommendedForMoveRequest, options *RecoveryPointsRecommendedForMoveClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// listHandleResponse handles the List response. -func (client *RecoveryPointsRecommendedForMoveClient) listHandleResponse(resp *http.Response) (RecoveryPointsRecommendedForMoveClientListResponse, error) { - result := RecoveryPointsRecommendedForMoveClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPointResourceList); err != nil { - return RecoveryPointsRecommendedForMoveClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_resourceguardproxies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_resourceguardproxies_client.go deleted file mode 100644 index af406e23..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_resourceguardproxies_client.go +++ /dev/null @@ -1,125 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ResourceGuardProxiesClient contains the methods for the ResourceGuardProxies group. -// Don't use this type directly, use NewResourceGuardProxiesClient() instead. -type ResourceGuardProxiesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewResourceGuardProxiesClient creates a new instance of ResourceGuardProxiesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewResourceGuardProxiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceGuardProxiesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ResourceGuardProxiesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewGetPager - List the ResourceGuardProxies under vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - ResourceGuardProxiesClientGetOptions contains the optional parameters for the ResourceGuardProxiesClient.Get -// method. -func (client *ResourceGuardProxiesClient) NewGetPager(vaultName string, resourceGroupName string, options *ResourceGuardProxiesClientGetOptions) *runtime.Pager[ResourceGuardProxiesClientGetResponse] { - return runtime.NewPager(runtime.PagingHandler[ResourceGuardProxiesClientGetResponse]{ - More: func(page ResourceGuardProxiesClientGetResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ResourceGuardProxiesClientGetResponse) (ResourceGuardProxiesClientGetResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getCreateRequest(ctx, vaultName, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceGuardProxiesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardProxiesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardProxiesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) - }, - }) -} - -// getCreateRequest creates the Get request. -func (client *ResourceGuardProxiesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *ResourceGuardProxiesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ResourceGuardProxiesClient) getHandleResponse(resp *http.Response) (ResourceGuardProxiesClientGetResponse, error) { - result := ResourceGuardProxiesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardProxyBaseResourceList); err != nil { - return ResourceGuardProxiesClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_resourceguardproxy_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_resourceguardproxy_client.go deleted file mode 100644 index b6485eb7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_resourceguardproxy_client.go +++ /dev/null @@ -1,290 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ResourceGuardProxyClient contains the methods for the ResourceGuardProxy group. -// Don't use this type directly, use NewResourceGuardProxyClient() instead. -type ResourceGuardProxyClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewResourceGuardProxyClient creates a new instance of ResourceGuardProxyClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewResourceGuardProxyClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceGuardProxyClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ResourceGuardProxyClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Delete - Delete ResourceGuardProxy under vault -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - ResourceGuardProxyClientDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.Delete -// method. -func (client *ResourceGuardProxyClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, options *ResourceGuardProxyClientDeleteOptions) (ResourceGuardProxyClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, options) - if err != nil { - return ResourceGuardProxyClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardProxyClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ResourceGuardProxyClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ResourceGuardProxyClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ResourceGuardProxyClient) deleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, options *ResourceGuardProxyClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardProxyName == "" { - return nil, errors.New("parameter resourceGuardProxyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Returns ResourceGuardProxy under vault and with the name referenced in request -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - ResourceGuardProxyClientGetOptions contains the optional parameters for the ResourceGuardProxyClient.Get method. -func (client *ResourceGuardProxyClient) Get(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, options *ResourceGuardProxyClientGetOptions) (ResourceGuardProxyClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, options) - if err != nil { - return ResourceGuardProxyClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardProxyClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardProxyClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ResourceGuardProxyClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, options *ResourceGuardProxyClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardProxyName == "" { - return nil, errors.New("parameter resourceGuardProxyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ResourceGuardProxyClient) getHandleResponse(resp *http.Response) (ResourceGuardProxyClientGetResponse, error) { - result := ResourceGuardProxyClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardProxyBaseResource); err != nil { - return ResourceGuardProxyClientGetResponse{}, err - } - return result, nil -} - -// Put - Add or Update ResourceGuardProxy under vault Secures vault critical operations -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - Request body for operation -// options - ResourceGuardProxyClientPutOptions contains the optional parameters for the ResourceGuardProxyClient.Put method. -func (client *ResourceGuardProxyClient) Put(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, parameters ResourceGuardProxyBaseResource, options *ResourceGuardProxyClientPutOptions) (ResourceGuardProxyClientPutResponse, error) { - req, err := client.putCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, parameters, options) - if err != nil { - return ResourceGuardProxyClientPutResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardProxyClientPutResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardProxyClientPutResponse{}, runtime.NewResponseError(resp) - } - return client.putHandleResponse(resp) -} - -// putCreateRequest creates the Put request. -func (client *ResourceGuardProxyClient) putCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, parameters ResourceGuardProxyBaseResource, options *ResourceGuardProxyClientPutOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardProxyName == "" { - return nil, errors.New("parameter resourceGuardProxyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// putHandleResponse handles the Put response. -func (client *ResourceGuardProxyClient) putHandleResponse(resp *http.Response) (ResourceGuardProxyClientPutResponse, error) { - result := ResourceGuardProxyClientPutResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceGuardProxyBaseResource); err != nil { - return ResourceGuardProxyClientPutResponse{}, err - } - return result, nil -} - -// UnlockDelete - Secures delete ResourceGuardProxy operations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - Request body for operation -// options - ResourceGuardProxyClientUnlockDeleteOptions contains the optional parameters for the ResourceGuardProxyClient.UnlockDelete -// method. -func (client *ResourceGuardProxyClient) UnlockDelete(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, parameters UnlockDeleteRequest, options *ResourceGuardProxyClientUnlockDeleteOptions) (ResourceGuardProxyClientUnlockDeleteResponse, error) { - req, err := client.unlockDeleteCreateRequest(ctx, vaultName, resourceGroupName, resourceGuardProxyName, parameters, options) - if err != nil { - return ResourceGuardProxyClientUnlockDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ResourceGuardProxyClientUnlockDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceGuardProxyClientUnlockDeleteResponse{}, runtime.NewResponseError(resp) - } - return client.unlockDeleteHandleResponse(resp) -} - -// unlockDeleteCreateRequest creates the UnlockDelete request. -func (client *ResourceGuardProxyClient) unlockDeleteCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, resourceGuardProxyName string, parameters UnlockDeleteRequest, options *ResourceGuardProxyClientUnlockDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGuardProxyName == "" { - return nil, errors.New("parameter resourceGuardProxyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGuardProxyName}", url.PathEscape(resourceGuardProxyName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} - -// unlockDeleteHandleResponse handles the UnlockDelete response. -func (client *ResourceGuardProxyClient) unlockDeleteHandleResponse(resp *http.Response) (ResourceGuardProxyClientUnlockDeleteResponse, error) { - result := ResourceGuardProxyClientUnlockDeleteResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UnlockDeleteResponse); err != nil { - return ResourceGuardProxyClientUnlockDeleteResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_response_types.go deleted file mode 100644 index 503e61ea..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_response_types.go +++ /dev/null @@ -1,399 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -// BMSPrepareDataMoveOperationResultClientGetResponse contains the response from method BMSPrepareDataMoveOperationResultClient.Get. -type BMSPrepareDataMoveOperationResultClientGetResponse struct { - VaultStorageConfigOperationResultResponseClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BMSPrepareDataMoveOperationResultClientGetResponse. -func (b *BMSPrepareDataMoveOperationResultClientGetResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalVaultStorageConfigOperationResultResponseClassification(data) - if err != nil { - return err - } - b.VaultStorageConfigOperationResultResponseClassification = res - return nil -} - -// BackupEnginesClientGetResponse contains the response from method BackupEnginesClient.Get. -type BackupEnginesClientGetResponse struct { - BackupEngineBaseResource -} - -// BackupEnginesClientListResponse contains the response from method BackupEnginesClient.List. -type BackupEnginesClientListResponse struct { - BackupEngineBaseResourceList -} - -// BackupJobsClientListResponse contains the response from method BackupJobsClient.List. -type BackupJobsClientListResponse struct { - JobResourceList -} - -// BackupOperationResultsClientGetResponse contains the response from method BackupOperationResultsClient.Get. -type BackupOperationResultsClientGetResponse struct { - // placeholder for future response values -} - -// BackupOperationStatusesClientGetResponse contains the response from method BackupOperationStatusesClient.Get. -type BackupOperationStatusesClientGetResponse struct { - OperationStatus -} - -// BackupPoliciesClientListResponse contains the response from method BackupPoliciesClient.List. -type BackupPoliciesClientListResponse struct { - ProtectionPolicyResourceList -} - -// BackupProtectableItemsClientListResponse contains the response from method BackupProtectableItemsClient.List. -type BackupProtectableItemsClientListResponse struct { - WorkloadProtectableItemResourceList -} - -// BackupProtectedItemsClientListResponse contains the response from method BackupProtectedItemsClient.List. -type BackupProtectedItemsClientListResponse struct { - ProtectedItemResourceList -} - -// BackupProtectionContainersClientListResponse contains the response from method BackupProtectionContainersClient.List. -type BackupProtectionContainersClientListResponse struct { - ProtectionContainerResourceList -} - -// BackupProtectionIntentClientListResponse contains the response from method BackupProtectionIntentClient.List. -type BackupProtectionIntentClientListResponse struct { - ProtectionIntentResourceList -} - -// BackupResourceEncryptionConfigsClientGetResponse contains the response from method BackupResourceEncryptionConfigsClient.Get. -type BackupResourceEncryptionConfigsClientGetResponse struct { - BackupResourceEncryptionConfigExtendedResource -} - -// BackupResourceEncryptionConfigsClientUpdateResponse contains the response from method BackupResourceEncryptionConfigsClient.Update. -type BackupResourceEncryptionConfigsClientUpdateResponse struct { - // placeholder for future response values -} - -// BackupResourceStorageConfigsNonCRRClientGetResponse contains the response from method BackupResourceStorageConfigsNonCRRClient.Get. -type BackupResourceStorageConfigsNonCRRClientGetResponse struct { - BackupResourceConfigResource -} - -// BackupResourceStorageConfigsNonCRRClientPatchResponse contains the response from method BackupResourceStorageConfigsNonCRRClient.Patch. -type BackupResourceStorageConfigsNonCRRClientPatchResponse struct { - // placeholder for future response values -} - -// BackupResourceStorageConfigsNonCRRClientUpdateResponse contains the response from method BackupResourceStorageConfigsNonCRRClient.Update. -type BackupResourceStorageConfigsNonCRRClientUpdateResponse struct { - BackupResourceConfigResource -} - -// BackupResourceVaultConfigsClientGetResponse contains the response from method BackupResourceVaultConfigsClient.Get. -type BackupResourceVaultConfigsClientGetResponse struct { - BackupResourceVaultConfigResource -} - -// BackupResourceVaultConfigsClientPutResponse contains the response from method BackupResourceVaultConfigsClient.Put. -type BackupResourceVaultConfigsClientPutResponse struct { - BackupResourceVaultConfigResource -} - -// BackupResourceVaultConfigsClientUpdateResponse contains the response from method BackupResourceVaultConfigsClient.Update. -type BackupResourceVaultConfigsClientUpdateResponse struct { - BackupResourceVaultConfigResource -} - -// BackupStatusClientGetResponse contains the response from method BackupStatusClient.Get. -type BackupStatusClientGetResponse struct { - BackupStatusResponse -} - -// BackupUsageSummariesClientListResponse contains the response from method BackupUsageSummariesClient.List. -type BackupUsageSummariesClientListResponse struct { - BackupManagementUsageList -} - -// BackupWorkloadItemsClientListResponse contains the response from method BackupWorkloadItemsClient.List. -type BackupWorkloadItemsClientListResponse struct { - WorkloadItemResourceList -} - -// BackupsClientTriggerResponse contains the response from method BackupsClient.Trigger. -type BackupsClientTriggerResponse struct { - // placeholder for future response values -} - -// ClientBMSPrepareDataMoveResponse contains the response from method Client.BMSPrepareDataMove. -type ClientBMSPrepareDataMoveResponse struct { - // placeholder for future response values -} - -// ClientBMSTriggerDataMoveResponse contains the response from method Client.BMSTriggerDataMove. -type ClientBMSTriggerDataMoveResponse struct { - // placeholder for future response values -} - -// ClientGetOperationStatusResponse contains the response from method Client.GetOperationStatus. -type ClientGetOperationStatusResponse struct { - OperationStatus -} - -// ClientMoveRecoveryPointResponse contains the response from method Client.MoveRecoveryPoint. -type ClientMoveRecoveryPointResponse struct { - // placeholder for future response values -} - -// ExportJobsOperationResultsClientGetResponse contains the response from method ExportJobsOperationResultsClient.Get. -type ExportJobsOperationResultsClientGetResponse struct { - OperationResultInfoBaseResource -} - -// FeatureSupportClientValidateResponse contains the response from method FeatureSupportClient.Validate. -type FeatureSupportClientValidateResponse struct { - AzureVMResourceFeatureSupportResponse -} - -// ItemLevelRecoveryConnectionsClientProvisionResponse contains the response from method ItemLevelRecoveryConnectionsClient.Provision. -type ItemLevelRecoveryConnectionsClientProvisionResponse struct { - // placeholder for future response values -} - -// ItemLevelRecoveryConnectionsClientRevokeResponse contains the response from method ItemLevelRecoveryConnectionsClient.Revoke. -type ItemLevelRecoveryConnectionsClientRevokeResponse struct { - // placeholder for future response values -} - -// JobCancellationsClientTriggerResponse contains the response from method JobCancellationsClient.Trigger. -type JobCancellationsClientTriggerResponse struct { - // placeholder for future response values -} - -// JobDetailsClientGetResponse contains the response from method JobDetailsClient.Get. -type JobDetailsClientGetResponse struct { - JobResource -} - -// JobOperationResultsClientGetResponse contains the response from method JobOperationResultsClient.Get. -type JobOperationResultsClientGetResponse struct { - // placeholder for future response values -} - -// JobsClientExportResponse contains the response from method JobsClient.Export. -type JobsClientExportResponse struct { - // placeholder for future response values -} - -// OperationClientValidateResponse contains the response from method OperationClient.Validate. -type OperationClientValidateResponse struct { - ValidateOperationsResponse -} - -// OperationsClientListResponse contains the response from method OperationsClient.List. -type OperationsClientListResponse struct { - ClientDiscoveryResponse -} - -// PrivateEndpointClientGetOperationStatusResponse contains the response from method PrivateEndpointClient.GetOperationStatus. -type PrivateEndpointClientGetOperationStatusResponse struct { - OperationStatus -} - -// PrivateEndpointConnectionClientDeleteResponse contains the response from method PrivateEndpointConnectionClient.Delete. -type PrivateEndpointConnectionClientDeleteResponse struct { - // placeholder for future response values -} - -// PrivateEndpointConnectionClientGetResponse contains the response from method PrivateEndpointConnectionClient.Get. -type PrivateEndpointConnectionClientGetResponse struct { - PrivateEndpointConnectionResource -} - -// PrivateEndpointConnectionClientPutResponse contains the response from method PrivateEndpointConnectionClient.Put. -type PrivateEndpointConnectionClientPutResponse struct { - PrivateEndpointConnectionResource -} - -// ProtectableContainersClientListResponse contains the response from method ProtectableContainersClient.List. -type ProtectableContainersClientListResponse struct { - ProtectableContainerResourceList -} - -// ProtectedItemOperationResultsClientGetResponse contains the response from method ProtectedItemOperationResultsClient.Get. -type ProtectedItemOperationResultsClientGetResponse struct { - ProtectedItemResource -} - -// ProtectedItemOperationStatusesClientGetResponse contains the response from method ProtectedItemOperationStatusesClient.Get. -type ProtectedItemOperationStatusesClientGetResponse struct { - OperationStatus -} - -// ProtectedItemsClientCreateOrUpdateResponse contains the response from method ProtectedItemsClient.CreateOrUpdate. -type ProtectedItemsClientCreateOrUpdateResponse struct { - ProtectedItemResource -} - -// ProtectedItemsClientDeleteResponse contains the response from method ProtectedItemsClient.Delete. -type ProtectedItemsClientDeleteResponse struct { - // placeholder for future response values -} - -// ProtectedItemsClientGetResponse contains the response from method ProtectedItemsClient.Get. -type ProtectedItemsClientGetResponse struct { - ProtectedItemResource -} - -// ProtectionContainerOperationResultsClientGetResponse contains the response from method ProtectionContainerOperationResultsClient.Get. -type ProtectionContainerOperationResultsClientGetResponse struct { - ProtectionContainerResource -} - -// ProtectionContainerRefreshOperationResultsClientGetResponse contains the response from method ProtectionContainerRefreshOperationResultsClient.Get. -type ProtectionContainerRefreshOperationResultsClientGetResponse struct { - // placeholder for future response values -} - -// ProtectionContainersClientGetResponse contains the response from method ProtectionContainersClient.Get. -type ProtectionContainersClientGetResponse struct { - ProtectionContainerResource -} - -// ProtectionContainersClientInquireResponse contains the response from method ProtectionContainersClient.Inquire. -type ProtectionContainersClientInquireResponse struct { - // placeholder for future response values -} - -// ProtectionContainersClientRefreshResponse contains the response from method ProtectionContainersClient.Refresh. -type ProtectionContainersClientRefreshResponse struct { - // placeholder for future response values -} - -// ProtectionContainersClientRegisterResponse contains the response from method ProtectionContainersClient.Register. -type ProtectionContainersClientRegisterResponse struct { - ProtectionContainerResource -} - -// ProtectionContainersClientUnregisterResponse contains the response from method ProtectionContainersClient.Unregister. -type ProtectionContainersClientUnregisterResponse struct { - // placeholder for future response values -} - -// ProtectionIntentClientCreateOrUpdateResponse contains the response from method ProtectionIntentClient.CreateOrUpdate. -type ProtectionIntentClientCreateOrUpdateResponse struct { - ProtectionIntentResource -} - -// ProtectionIntentClientDeleteResponse contains the response from method ProtectionIntentClient.Delete. -type ProtectionIntentClientDeleteResponse struct { - // placeholder for future response values -} - -// ProtectionIntentClientGetResponse contains the response from method ProtectionIntentClient.Get. -type ProtectionIntentClientGetResponse struct { - ProtectionIntentResource -} - -// ProtectionIntentClientValidateResponse contains the response from method ProtectionIntentClient.Validate. -type ProtectionIntentClientValidateResponse struct { - PreValidateEnableBackupResponse -} - -// ProtectionPoliciesClientCreateOrUpdateResponse contains the response from method ProtectionPoliciesClient.CreateOrUpdate. -type ProtectionPoliciesClientCreateOrUpdateResponse struct { - ProtectionPolicyResource -} - -// ProtectionPoliciesClientDeleteResponse contains the response from method ProtectionPoliciesClient.Delete. -type ProtectionPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// ProtectionPoliciesClientGetResponse contains the response from method ProtectionPoliciesClient.Get. -type ProtectionPoliciesClientGetResponse struct { - ProtectionPolicyResource -} - -// ProtectionPolicyOperationResultsClientGetResponse contains the response from method ProtectionPolicyOperationResultsClient.Get. -type ProtectionPolicyOperationResultsClientGetResponse struct { - ProtectionPolicyResource -} - -// ProtectionPolicyOperationStatusesClientGetResponse contains the response from method ProtectionPolicyOperationStatusesClient.Get. -type ProtectionPolicyOperationStatusesClientGetResponse struct { - OperationStatus -} - -// RecoveryPointsClientGetResponse contains the response from method RecoveryPointsClient.Get. -type RecoveryPointsClientGetResponse struct { - RecoveryPointResource -} - -// RecoveryPointsClientListResponse contains the response from method RecoveryPointsClient.List. -type RecoveryPointsClientListResponse struct { - RecoveryPointResourceList -} - -// RecoveryPointsRecommendedForMoveClientListResponse contains the response from method RecoveryPointsRecommendedForMoveClient.List. -type RecoveryPointsRecommendedForMoveClientListResponse struct { - RecoveryPointResourceList -} - -// ResourceGuardProxiesClientGetResponse contains the response from method ResourceGuardProxiesClient.Get. -type ResourceGuardProxiesClientGetResponse struct { - ResourceGuardProxyBaseResourceList -} - -// ResourceGuardProxyClientDeleteResponse contains the response from method ResourceGuardProxyClient.Delete. -type ResourceGuardProxyClientDeleteResponse struct { - // placeholder for future response values -} - -// ResourceGuardProxyClientGetResponse contains the response from method ResourceGuardProxyClient.Get. -type ResourceGuardProxyClientGetResponse struct { - ResourceGuardProxyBaseResource -} - -// ResourceGuardProxyClientPutResponse contains the response from method ResourceGuardProxyClient.Put. -type ResourceGuardProxyClientPutResponse struct { - ResourceGuardProxyBaseResource -} - -// ResourceGuardProxyClientUnlockDeleteResponse contains the response from method ResourceGuardProxyClient.UnlockDelete. -type ResourceGuardProxyClientUnlockDeleteResponse struct { - UnlockDeleteResponse -} - -// RestoresClientTriggerResponse contains the response from method RestoresClient.Trigger. -type RestoresClientTriggerResponse struct { - // placeholder for future response values -} - -// SecurityPINsClientGetResponse contains the response from method SecurityPINsClient.Get. -type SecurityPINsClientGetResponse struct { - TokenInformation -} - -// ValidateOperationClientTriggerResponse contains the response from method ValidateOperationClient.Trigger. -type ValidateOperationClientTriggerResponse struct { - // placeholder for future response values -} - -// ValidateOperationResultsClientGetResponse contains the response from method ValidateOperationResultsClient.Get. -type ValidateOperationResultsClientGetResponse struct { - ValidateOperationsResponse -} - -// ValidateOperationStatusesClientGetResponse contains the response from method ValidateOperationStatusesClient.Get. -type ValidateOperationStatusesClientGetResponse struct { - OperationStatus -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_restores_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_restores_client.go deleted file mode 100644 index 10c057c7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_restores_client.go +++ /dev/null @@ -1,140 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RestoresClient contains the methods for the Restores group. -// Don't use this type directly, use NewRestoresClient() instead. -type RestoresClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewRestoresClient creates a new instance of RestoresClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRestoresClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestoresClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RestoresClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginTrigger - Restores the specified backed up data. This is an asynchronous operation. To know the status of this API -// call, use GetProtectedItemOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// fabricName - Fabric name associated with the backed up items. -// containerName - Container name associated with the backed up items. -// protectedItemName - Backed up item to be restored. -// recoveryPointID - Recovery point ID which represents the backed up data to be restored. -// parameters - resource restore request -// options - RestoresClientBeginTriggerOptions contains the optional parameters for the RestoresClient.BeginTrigger method. -func (client *RestoresClient) BeginTrigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource, options *RestoresClientBeginTriggerOptions) (*runtime.Poller[RestoresClientTriggerResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.trigger(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[RestoresClientTriggerResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[RestoresClientTriggerResponse](options.ResumeToken, client.pl, nil) - } -} - -// Trigger - Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, -// use GetProtectedItemOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -func (client *RestoresClient) trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource, options *RestoresClientBeginTriggerOptions) (*http.Response, error) { - req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// triggerCreateRequest creates the Trigger request. -func (client *RestoresClient) triggerCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource, options *RestoresClientBeginTriggerOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if containerName == "" { - return nil, errors.New("parameter containerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{containerName}", url.PathEscape(containerName)) - if protectedItemName == "" { - return nil, errors.New("parameter protectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectedItemName}", url.PathEscape(protectedItemName)) - if recoveryPointID == "" { - return nil, errors.New("parameter recoveryPointID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_securitypins_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_securitypins_client.go deleted file mode 100644 index d7387339..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_securitypins_client.go +++ /dev/null @@ -1,114 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SecurityPINsClient contains the methods for the SecurityPINs group. -// Don't use this type directly, use NewSecurityPINsClient() instead. -type SecurityPINsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSecurityPINsClient creates a new instance of SecurityPINsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSecurityPINsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityPINsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SecurityPINsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get the security PIN. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// options - SecurityPINsClientGetOptions contains the optional parameters for the SecurityPINsClient.Get method. -func (client *SecurityPINsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, options *SecurityPINsClientGetOptions) (SecurityPINsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, options) - if err != nil { - return SecurityPINsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SecurityPINsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecurityPINsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SecurityPINsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, options *SecurityPINsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Parameters != nil { - return req, runtime.MarshalAsJSON(req, *options.Parameters) - } - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SecurityPINsClient) getHandleResponse(resp *http.Response) (SecurityPINsClientGetResponse, error) { - result := SecurityPINsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TokenInformation); err != nil { - return SecurityPINsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_time_rfc3339.go deleted file mode 100644 index 53a33e13..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_time_rfc3339.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_validateoperation_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_validateoperation_client.go deleted file mode 100644 index 265a6743..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_validateoperation_client.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ValidateOperationClient contains the methods for the ValidateOperation group. -// Don't use this type directly, use NewValidateOperationClient() instead. -type ValidateOperationClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewValidateOperationClient creates a new instance of ValidateOperationClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewValidateOperationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ValidateOperationClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ValidateOperationClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginTrigger - Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking -// headers which can be tracked using GetValidateOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// parameters - resource validate operation request -// options - ValidateOperationClientBeginTriggerOptions contains the optional parameters for the ValidateOperationClient.BeginTrigger -// method. -func (client *ValidateOperationClient) BeginTrigger(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestClassification, options *ValidateOperationClientBeginTriggerOptions) (*runtime.Poller[ValidateOperationClientTriggerResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.trigger(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ValidateOperationClientTriggerResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ValidateOperationClientTriggerResponse](options.ResumeToken, client.pl, nil) - } -} - -// Trigger - Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking headers -// which can be tracked using GetValidateOperationResult API. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -func (client *ValidateOperationClient) trigger(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestClassification, options *ValidateOperationClientBeginTriggerOptions) (*http.Response, error) { - req, err := client.triggerCreateRequest(ctx, vaultName, resourceGroupName, parameters, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// triggerCreateRequest creates the Trigger request. -func (client *ValidateOperationClient) triggerCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, parameters ValidateOperationRequestClassification, options *ValidateOperationClientBeginTriggerOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_validateoperationresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_validateoperationresults_client.go deleted file mode 100644 index 49eb6924..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_validateoperationresults_client.go +++ /dev/null @@ -1,117 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ValidateOperationResultsClient contains the methods for the ValidateOperationResults group. -// Don't use this type directly, use NewValidateOperationResultsClient() instead. -type ValidateOperationResultsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewValidateOperationResultsClient creates a new instance of ValidateOperationResultsClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewValidateOperationResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ValidateOperationResultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ValidateOperationResultsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches the result of a triggered validate operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// operationID - OperationID which represents the operation whose result needs to be fetched. -// options - ValidateOperationResultsClientGetOptions contains the optional parameters for the ValidateOperationResultsClient.Get -// method. -func (client *ValidateOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ValidateOperationResultsClientGetOptions) (ValidateOperationResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) - if err != nil { - return ValidateOperationResultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ValidateOperationResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return ValidateOperationResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ValidateOperationResultsClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ValidateOperationResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationResults/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ValidateOperationResultsClient) getHandleResponse(resp *http.Response) (ValidateOperationResultsClientGetResponse, error) { - result := ValidateOperationResultsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ValidateOperationsResponse); err != nil { - return ValidateOperationResultsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_validateoperationstatuses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_validateoperationstatuses_client.go deleted file mode 100644 index f4f2d5ba..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/zz_generated_validateoperationstatuses_client.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armrecoveryservicesbackup - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ValidateOperationStatusesClient contains the methods for the ValidateOperationStatuses group. -// Don't use this type directly, use NewValidateOperationStatusesClient() instead. -type ValidateOperationStatusesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewValidateOperationStatusesClient creates a new instance of ValidateOperationStatusesClient with the specified values. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewValidateOperationStatusesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ValidateOperationStatusesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ValidateOperationStatusesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Fetches the status of a triggered validate operation. The status can be in progress, completed or failed. You can -// refer to the OperationStatus enum for all the possible states of the operation. If -// operation has completed, this method returns the list of errors obtained while validating the operation. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-02-01 -// vaultName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// operationID - OperationID represents the operation whose status needs to be fetched. -// options - ValidateOperationStatusesClientGetOptions contains the optional parameters for the ValidateOperationStatusesClient.Get -// method. -func (client *ValidateOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ValidateOperationStatusesClientGetOptions) (ValidateOperationStatusesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultName, resourceGroupName, operationID, options) - if err != nil { - return ValidateOperationStatusesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ValidateOperationStatusesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ValidateOperationStatusesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ValidateOperationStatusesClient) getCreateRequest(ctx context.Context, vaultName string, resourceGroupName string, operationID string, options *ValidateOperationStatusesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationsStatuses/{operationId}" - if vaultName == "" { - return nil, errors.New("parameter vaultName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-02-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ValidateOperationStatusesClient) getHandleResponse(resp *http.Response) (ValidateOperationStatusesClientGetResponse, error) { - result := ValidateOperationStatusesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatus); err != nil { - return ValidateOperationStatusesClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/CHANGELOG.md deleted file mode 100644 index cd02d5a9..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/CHANGELOG.md +++ /dev/null @@ -1,48 +0,0 @@ -# Release History - -## 1.1.0 (2022-12-23) -### Features Added - -- New value `MigrationItemOperationPauseReplication`, `MigrationItemOperationResumeReplication` added to type alias `MigrationItemOperation` -- New value `MigrationStateMigrationCompletedWithInformation`, `MigrationStateMigrationPartiallySucceeded`, `MigrationStateProtectionSuspended`, `MigrationStateResumeInProgress`, `MigrationStateResumeInitiated`, `MigrationStateSuspendingProtection` added to type alias `MigrationState` -- New value `TestMigrationStateTestMigrationCompletedWithInformation`, `TestMigrationStateTestMigrationPartiallySucceeded` added to type alias `TestMigrationState` -- New function `*ReplicationMigrationItemsClient.BeginPauseReplication(context.Context, string, string, string, PauseReplicationInput, *ReplicationMigrationItemsClientBeginPauseReplicationOptions) (*runtime.Poller[ReplicationMigrationItemsClientPauseReplicationResponse], error)` -- New function `*ReplicationMigrationItemsClient.BeginResumeReplication(context.Context, string, string, string, ResumeReplicationInput, *ReplicationMigrationItemsClientBeginResumeReplicationOptions) (*runtime.Poller[ReplicationMigrationItemsClientResumeReplicationResponse], error)` -- New function `*ResumeReplicationProviderSpecificInput.GetResumeReplicationProviderSpecificInput() *ResumeReplicationProviderSpecificInput` -- New function `*VMwareCbtResumeReplicationInput.GetResumeReplicationProviderSpecificInput() *ResumeReplicationProviderSpecificInput` -- New struct `A2AExtendedLocationDetails` -- New struct `CriticalJobHistoryDetails` -- New struct `PauseReplicationInput` -- New struct `PauseReplicationInputProperties` -- New struct `ReplicationMigrationItemsClientPauseReplicationResponse` -- New struct `ReplicationMigrationItemsClientResumeReplicationResponse` -- New struct `ResumeReplicationInput` -- New struct `ResumeReplicationInputProperties` -- New struct `VMwareCbtResumeReplicationInput` -- New field `ExtendedLocations` in struct `AzureFabricSpecificDetails` -- New field `SeedBlobURI` in struct `InMageRcmProtectedDiskDetails` -- New field `StorageAccountID` in struct `InMageRcmReplicationDetails` -- New field `CriticalJobHistory` in struct `MigrationItemProperties` -- New field `LastMigrationStatus` in struct `MigrationItemProperties` -- New field `LastMigrationTime` in struct `MigrationItemProperties` -- New field `RecoveryServicesProviderID` in struct `MigrationItemProperties` -- New field `ReplicationStatus` in struct `MigrationItemProperties` -- New field `PrimaryExtendedLocation` in struct `RecoveryPlanA2ADetails` -- New field `RecoveryExtendedLocation` in struct `RecoveryPlanA2ADetails` -- New field `PerformSQLBulkRegistration` in struct `VMwareCbtEnableMigrationInput` -- New field `ResumeProgressPercentage` in struct `VMwareCbtMigrationDetails` -- New field `ResumeRetryCount` in struct `VMwareCbtMigrationDetails` -- New field `StorageAccountID` in struct `VMwareCbtMigrationDetails` -- New field `TestNetworkID` in struct `VMwareCbtMigrationDetails` -- New field `SeedBlobURI` in struct `VMwareCbtProtectedDiskDetails` -- New field `TargetBlobURI` in struct `VMwareCbtProtectedDiskDetails` -- New field `RoleSizeToNicCountMap` in struct `VMwareCbtProtectionContainerMappingDetails` - - -## 1.0.0 (2022-05-17) - -The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. - -To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). - -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/README.md deleted file mode 100644 index 789ca077..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Azure Recovery Services Site Recovery Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery) - -The `armrecoveryservicessiterecovery` module provides operations for working with Azure Recovery Services Site Recovery. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Recovery Services Site Recovery module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Recovery Services Site Recovery. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure Recovery Services Site Recovery modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armrecoveryservicessiterecovery.NewReplicationAppliancesClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armrecoveryservicessiterecovery.NewReplicationAppliancesClient(, cred, &options) -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Recovery Services Site Recovery` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/autorest.md deleted file mode 100644 index f49e0bd7..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/autorest.md +++ /dev/null @@ -1,12 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/e99a45d498a1c7fadc18229ecba5d84a471a8771/specification/recoveryservicessiterecovery/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/e99a45d498a1c7fadc18229ecba5d84a471a8771/specification/recoveryservicessiterecovery/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0 -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/build.go deleted file mode 100644 index a2ac6791..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/recoveryservices/armrecoveryservicessiterecovery - -package armrecoveryservicessiterecovery diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/ci.yml deleted file mode 100644 index 4063b55a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/recoveryservices/armrecoveryservicessiterecovery' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/constants.go deleted file mode 100644 index 539f1855..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/constants.go +++ /dev/null @@ -1,974 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -const ( - moduleName = "armrecoveryservicessiterecovery" - moduleVersion = "v1.1.0" -) - -// A2ARecoveryAvailabilityType - The recovery availability type of the virtual machine. -type A2ARecoveryAvailabilityType string - -const ( - A2ARecoveryAvailabilityTypeAvailabilitySet A2ARecoveryAvailabilityType = "AvailabilitySet" - A2ARecoveryAvailabilityTypeAvailabilityZone A2ARecoveryAvailabilityType = "AvailabilityZone" - A2ARecoveryAvailabilityTypeSingle A2ARecoveryAvailabilityType = "Single" -) - -// PossibleA2ARecoveryAvailabilityTypeValues returns the possible values for the A2ARecoveryAvailabilityType const type. -func PossibleA2ARecoveryAvailabilityTypeValues() []A2ARecoveryAvailabilityType { - return []A2ARecoveryAvailabilityType{ - A2ARecoveryAvailabilityTypeAvailabilitySet, - A2ARecoveryAvailabilityTypeAvailabilityZone, - A2ARecoveryAvailabilityTypeSingle, - } -} - -// A2ARpRecoveryPointType - The recovery point type. -type A2ARpRecoveryPointType string - -const ( - A2ARpRecoveryPointTypeLatest A2ARpRecoveryPointType = "Latest" - A2ARpRecoveryPointTypeLatestApplicationConsistent A2ARpRecoveryPointType = "LatestApplicationConsistent" - A2ARpRecoveryPointTypeLatestCrashConsistent A2ARpRecoveryPointType = "LatestCrashConsistent" - A2ARpRecoveryPointTypeLatestProcessed A2ARpRecoveryPointType = "LatestProcessed" -) - -// PossibleA2ARpRecoveryPointTypeValues returns the possible values for the A2ARpRecoveryPointType const type. -func PossibleA2ARpRecoveryPointTypeValues() []A2ARpRecoveryPointType { - return []A2ARpRecoveryPointType{ - A2ARpRecoveryPointTypeLatest, - A2ARpRecoveryPointTypeLatestApplicationConsistent, - A2ARpRecoveryPointTypeLatestCrashConsistent, - A2ARpRecoveryPointTypeLatestProcessed, - } -} - -// AgentAutoUpdateStatus - A value indicating whether the auto update is enabled. -type AgentAutoUpdateStatus string - -const ( - AgentAutoUpdateStatusDisabled AgentAutoUpdateStatus = "Disabled" - AgentAutoUpdateStatusEnabled AgentAutoUpdateStatus = "Enabled" -) - -// PossibleAgentAutoUpdateStatusValues returns the possible values for the AgentAutoUpdateStatus const type. -func PossibleAgentAutoUpdateStatusValues() []AgentAutoUpdateStatus { - return []AgentAutoUpdateStatus{ - AgentAutoUpdateStatusDisabled, - AgentAutoUpdateStatusEnabled, - } -} - -type AgentUpgradeBlockedReason string - -const ( - AgentUpgradeBlockedReasonAgentNoHeartbeat AgentUpgradeBlockedReason = "AgentNoHeartbeat" - AgentUpgradeBlockedReasonAlreadyOnLatestVersion AgentUpgradeBlockedReason = "AlreadyOnLatestVersion" - AgentUpgradeBlockedReasonDistroIsNotReported AgentUpgradeBlockedReason = "DistroIsNotReported" - AgentUpgradeBlockedReasonDistroNotSupportedForUpgrade AgentUpgradeBlockedReason = "DistroNotSupportedForUpgrade" - AgentUpgradeBlockedReasonIncompatibleApplianceVersion AgentUpgradeBlockedReason = "IncompatibleApplianceVersion" - AgentUpgradeBlockedReasonInvalidAgentVersion AgentUpgradeBlockedReason = "InvalidAgentVersion" - AgentUpgradeBlockedReasonInvalidDriverVersion AgentUpgradeBlockedReason = "InvalidDriverVersion" - AgentUpgradeBlockedReasonMissingUpgradePath AgentUpgradeBlockedReason = "MissingUpgradePath" - AgentUpgradeBlockedReasonNotProtected AgentUpgradeBlockedReason = "NotProtected" - AgentUpgradeBlockedReasonProcessServerNoHeartbeat AgentUpgradeBlockedReason = "ProcessServerNoHeartbeat" - AgentUpgradeBlockedReasonRcmProxyNoHeartbeat AgentUpgradeBlockedReason = "RcmProxyNoHeartbeat" - AgentUpgradeBlockedReasonRebootRequired AgentUpgradeBlockedReason = "RebootRequired" - AgentUpgradeBlockedReasonUnknown AgentUpgradeBlockedReason = "Unknown" - AgentUpgradeBlockedReasonUnsupportedProtectionScenario AgentUpgradeBlockedReason = "UnsupportedProtectionScenario" -) - -// PossibleAgentUpgradeBlockedReasonValues returns the possible values for the AgentUpgradeBlockedReason const type. -func PossibleAgentUpgradeBlockedReasonValues() []AgentUpgradeBlockedReason { - return []AgentUpgradeBlockedReason{ - AgentUpgradeBlockedReasonAgentNoHeartbeat, - AgentUpgradeBlockedReasonAlreadyOnLatestVersion, - AgentUpgradeBlockedReasonDistroIsNotReported, - AgentUpgradeBlockedReasonDistroNotSupportedForUpgrade, - AgentUpgradeBlockedReasonIncompatibleApplianceVersion, - AgentUpgradeBlockedReasonInvalidAgentVersion, - AgentUpgradeBlockedReasonInvalidDriverVersion, - AgentUpgradeBlockedReasonMissingUpgradePath, - AgentUpgradeBlockedReasonNotProtected, - AgentUpgradeBlockedReasonProcessServerNoHeartbeat, - AgentUpgradeBlockedReasonRcmProxyNoHeartbeat, - AgentUpgradeBlockedReasonRebootRequired, - AgentUpgradeBlockedReasonUnknown, - AgentUpgradeBlockedReasonUnsupportedProtectionScenario, - } -} - -// AgentVersionStatus - A value indicating whether security update required. -type AgentVersionStatus string - -const ( - AgentVersionStatusDeprecated AgentVersionStatus = "Deprecated" - AgentVersionStatusNotSupported AgentVersionStatus = "NotSupported" - AgentVersionStatusSecurityUpdateRequired AgentVersionStatus = "SecurityUpdateRequired" - AgentVersionStatusSupported AgentVersionStatus = "Supported" - AgentVersionStatusUpdateRequired AgentVersionStatus = "UpdateRequired" -) - -// PossibleAgentVersionStatusValues returns the possible values for the AgentVersionStatus const type. -func PossibleAgentVersionStatusValues() []AgentVersionStatus { - return []AgentVersionStatus{ - AgentVersionStatusDeprecated, - AgentVersionStatusNotSupported, - AgentVersionStatusSecurityUpdateRequired, - AgentVersionStatusSupported, - AgentVersionStatusUpdateRequired, - } -} - -// AlternateLocationRecoveryOption - The ALR option. -type AlternateLocationRecoveryOption string - -const ( - AlternateLocationRecoveryOptionCreateVMIfNotFound AlternateLocationRecoveryOption = "CreateVmIfNotFound" - AlternateLocationRecoveryOptionNoAction AlternateLocationRecoveryOption = "NoAction" -) - -// PossibleAlternateLocationRecoveryOptionValues returns the possible values for the AlternateLocationRecoveryOption const type. -func PossibleAlternateLocationRecoveryOptionValues() []AlternateLocationRecoveryOption { - return []AlternateLocationRecoveryOption{ - AlternateLocationRecoveryOptionCreateVMIfNotFound, - AlternateLocationRecoveryOptionNoAction, - } -} - -// AutoProtectionOfDataDisk - A value indicating whether the auto protection is enabled. -type AutoProtectionOfDataDisk string - -const ( - AutoProtectionOfDataDiskDisabled AutoProtectionOfDataDisk = "Disabled" - AutoProtectionOfDataDiskEnabled AutoProtectionOfDataDisk = "Enabled" -) - -// PossibleAutoProtectionOfDataDiskValues returns the possible values for the AutoProtectionOfDataDisk const type. -func PossibleAutoProtectionOfDataDiskValues() []AutoProtectionOfDataDisk { - return []AutoProtectionOfDataDisk{ - AutoProtectionOfDataDiskDisabled, - AutoProtectionOfDataDiskEnabled, - } -} - -// AutomationAccountAuthenticationType - A value indicating the type authentication to use for automation Account. -type AutomationAccountAuthenticationType string - -const ( - AutomationAccountAuthenticationTypeRunAsAccount AutomationAccountAuthenticationType = "RunAsAccount" - AutomationAccountAuthenticationTypeSystemAssignedIdentity AutomationAccountAuthenticationType = "SystemAssignedIdentity" -) - -// PossibleAutomationAccountAuthenticationTypeValues returns the possible values for the AutomationAccountAuthenticationType const type. -func PossibleAutomationAccountAuthenticationTypeValues() []AutomationAccountAuthenticationType { - return []AutomationAccountAuthenticationType{ - AutomationAccountAuthenticationTypeRunAsAccount, - AutomationAccountAuthenticationTypeSystemAssignedIdentity, - } -} - -// DataSyncStatus - The data sync option. -type DataSyncStatus string - -const ( - DataSyncStatusForDownTime DataSyncStatus = "ForDownTime" - DataSyncStatusForSynchronization DataSyncStatus = "ForSynchronization" -) - -// PossibleDataSyncStatusValues returns the possible values for the DataSyncStatus const type. -func PossibleDataSyncStatusValues() []DataSyncStatus { - return []DataSyncStatus{ - DataSyncStatusForDownTime, - DataSyncStatusForSynchronization, - } -} - -// DisableProtectionReason - Disable protection reason. It can have values NotSpecified/MigrationComplete. -type DisableProtectionReason string - -const ( - DisableProtectionReasonMigrationComplete DisableProtectionReason = "MigrationComplete" - DisableProtectionReasonNotSpecified DisableProtectionReason = "NotSpecified" -) - -// PossibleDisableProtectionReasonValues returns the possible values for the DisableProtectionReason const type. -func PossibleDisableProtectionReasonValues() []DisableProtectionReason { - return []DisableProtectionReason{ - DisableProtectionReasonMigrationComplete, - DisableProtectionReasonNotSpecified, - } -} - -// DiskAccountType - The DiskType. -type DiskAccountType string - -const ( - DiskAccountTypePremiumLRS DiskAccountType = "Premium_LRS" - DiskAccountTypeStandardLRS DiskAccountType = "Standard_LRS" - DiskAccountTypeStandardSSDLRS DiskAccountType = "StandardSSD_LRS" -) - -// PossibleDiskAccountTypeValues returns the possible values for the DiskAccountType const type. -func PossibleDiskAccountTypeValues() []DiskAccountType { - return []DiskAccountType{ - DiskAccountTypePremiumLRS, - DiskAccountTypeStandardLRS, - DiskAccountTypeStandardSSDLRS, - } -} - -// DiskReplicationProgressHealth - The progress health. -type DiskReplicationProgressHealth string - -const ( - DiskReplicationProgressHealthInProgress DiskReplicationProgressHealth = "InProgress" - DiskReplicationProgressHealthNoProgress DiskReplicationProgressHealth = "NoProgress" - DiskReplicationProgressHealthNone DiskReplicationProgressHealth = "None" - DiskReplicationProgressHealthQueued DiskReplicationProgressHealth = "Queued" - DiskReplicationProgressHealthSlowProgress DiskReplicationProgressHealth = "SlowProgress" -) - -// PossibleDiskReplicationProgressHealthValues returns the possible values for the DiskReplicationProgressHealth const type. -func PossibleDiskReplicationProgressHealthValues() []DiskReplicationProgressHealth { - return []DiskReplicationProgressHealth{ - DiskReplicationProgressHealthInProgress, - DiskReplicationProgressHealthNoProgress, - DiskReplicationProgressHealthNone, - DiskReplicationProgressHealthQueued, - DiskReplicationProgressHealthSlowProgress, - } -} - -// EthernetAddressType - The source IP address type. -type EthernetAddressType string - -const ( - EthernetAddressTypeDynamic EthernetAddressType = "Dynamic" - EthernetAddressTypeStatic EthernetAddressType = "Static" -) - -// PossibleEthernetAddressTypeValues returns the possible values for the EthernetAddressType const type. -func PossibleEthernetAddressTypeValues() []EthernetAddressType { - return []EthernetAddressType{ - EthernetAddressTypeDynamic, - EthernetAddressTypeStatic, - } -} - -// ExportJobOutputSerializationType - The output type of the jobs. -type ExportJobOutputSerializationType string - -const ( - ExportJobOutputSerializationTypeExcel ExportJobOutputSerializationType = "Excel" - ExportJobOutputSerializationTypeJSON ExportJobOutputSerializationType = "Json" - ExportJobOutputSerializationTypeXML ExportJobOutputSerializationType = "Xml" -) - -// PossibleExportJobOutputSerializationTypeValues returns the possible values for the ExportJobOutputSerializationType const type. -func PossibleExportJobOutputSerializationTypeValues() []ExportJobOutputSerializationType { - return []ExportJobOutputSerializationType{ - ExportJobOutputSerializationTypeExcel, - ExportJobOutputSerializationTypeJSON, - ExportJobOutputSerializationTypeXML, - } -} - -// ExtendedLocationType - The extended location type. -type ExtendedLocationType string - -const ( - ExtendedLocationTypeEdgeZone ExtendedLocationType = "EdgeZone" -) - -// PossibleExtendedLocationTypeValues returns the possible values for the ExtendedLocationType const type. -func PossibleExtendedLocationTypeValues() []ExtendedLocationType { - return []ExtendedLocationType{ - ExtendedLocationTypeEdgeZone, - } -} - -// FailoverDeploymentModel - The failover deployment model. -type FailoverDeploymentModel string - -const ( - FailoverDeploymentModelClassic FailoverDeploymentModel = "Classic" - FailoverDeploymentModelNotApplicable FailoverDeploymentModel = "NotApplicable" - FailoverDeploymentModelResourceManager FailoverDeploymentModel = "ResourceManager" -) - -// PossibleFailoverDeploymentModelValues returns the possible values for the FailoverDeploymentModel const type. -func PossibleFailoverDeploymentModelValues() []FailoverDeploymentModel { - return []FailoverDeploymentModel{ - FailoverDeploymentModelClassic, - FailoverDeploymentModelNotApplicable, - FailoverDeploymentModelResourceManager, - } -} - -// HealthErrorCategory - The category of the health error. -type HealthErrorCategory string - -const ( - HealthErrorCategoryAgentAutoUpdateArtifactDeleted HealthErrorCategory = "AgentAutoUpdateArtifactDeleted" - HealthErrorCategoryAgentAutoUpdateInfra HealthErrorCategory = "AgentAutoUpdateInfra" - HealthErrorCategoryAgentAutoUpdateRunAsAccount HealthErrorCategory = "AgentAutoUpdateRunAsAccount" - HealthErrorCategoryAgentAutoUpdateRunAsAccountExpired HealthErrorCategory = "AgentAutoUpdateRunAsAccountExpired" - HealthErrorCategoryAgentAutoUpdateRunAsAccountExpiry HealthErrorCategory = "AgentAutoUpdateRunAsAccountExpiry" - HealthErrorCategoryConfiguration HealthErrorCategory = "Configuration" - HealthErrorCategoryFabricInfrastructure HealthErrorCategory = "FabricInfrastructure" - HealthErrorCategoryNone HealthErrorCategory = "None" - HealthErrorCategoryReplication HealthErrorCategory = "Replication" - HealthErrorCategoryTestFailover HealthErrorCategory = "TestFailover" - HealthErrorCategoryVersionExpiry HealthErrorCategory = "VersionExpiry" -) - -// PossibleHealthErrorCategoryValues returns the possible values for the HealthErrorCategory const type. -func PossibleHealthErrorCategoryValues() []HealthErrorCategory { - return []HealthErrorCategory{ - HealthErrorCategoryAgentAutoUpdateArtifactDeleted, - HealthErrorCategoryAgentAutoUpdateInfra, - HealthErrorCategoryAgentAutoUpdateRunAsAccount, - HealthErrorCategoryAgentAutoUpdateRunAsAccountExpired, - HealthErrorCategoryAgentAutoUpdateRunAsAccountExpiry, - HealthErrorCategoryConfiguration, - HealthErrorCategoryFabricInfrastructure, - HealthErrorCategoryNone, - HealthErrorCategoryReplication, - HealthErrorCategoryTestFailover, - HealthErrorCategoryVersionExpiry, - } -} - -// HealthErrorCustomerResolvability - Value indicating whether the health error is customer resolvable. -type HealthErrorCustomerResolvability string - -const ( - HealthErrorCustomerResolvabilityAllowed HealthErrorCustomerResolvability = "Allowed" - HealthErrorCustomerResolvabilityNotAllowed HealthErrorCustomerResolvability = "NotAllowed" -) - -// PossibleHealthErrorCustomerResolvabilityValues returns the possible values for the HealthErrorCustomerResolvability const type. -func PossibleHealthErrorCustomerResolvabilityValues() []HealthErrorCustomerResolvability { - return []HealthErrorCustomerResolvability{ - HealthErrorCustomerResolvabilityAllowed, - HealthErrorCustomerResolvabilityNotAllowed, - } -} - -// HyperVReplicaAzureRpRecoveryPointType - The recovery point type. -type HyperVReplicaAzureRpRecoveryPointType string - -const ( - HyperVReplicaAzureRpRecoveryPointTypeLatest HyperVReplicaAzureRpRecoveryPointType = "Latest" - HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent HyperVReplicaAzureRpRecoveryPointType = "LatestApplicationConsistent" - HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed HyperVReplicaAzureRpRecoveryPointType = "LatestProcessed" -) - -// PossibleHyperVReplicaAzureRpRecoveryPointTypeValues returns the possible values for the HyperVReplicaAzureRpRecoveryPointType const type. -func PossibleHyperVReplicaAzureRpRecoveryPointTypeValues() []HyperVReplicaAzureRpRecoveryPointType { - return []HyperVReplicaAzureRpRecoveryPointType{ - HyperVReplicaAzureRpRecoveryPointTypeLatest, - HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent, - HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed, - } -} - -// InMageRcmFailbackRecoveryPointType - The recovery point type. -type InMageRcmFailbackRecoveryPointType string - -const ( - InMageRcmFailbackRecoveryPointTypeApplicationConsistent InMageRcmFailbackRecoveryPointType = "ApplicationConsistent" - InMageRcmFailbackRecoveryPointTypeCrashConsistent InMageRcmFailbackRecoveryPointType = "CrashConsistent" -) - -// PossibleInMageRcmFailbackRecoveryPointTypeValues returns the possible values for the InMageRcmFailbackRecoveryPointType const type. -func PossibleInMageRcmFailbackRecoveryPointTypeValues() []InMageRcmFailbackRecoveryPointType { - return []InMageRcmFailbackRecoveryPointType{ - InMageRcmFailbackRecoveryPointTypeApplicationConsistent, - InMageRcmFailbackRecoveryPointTypeCrashConsistent, - } -} - -// InMageV2RpRecoveryPointType - The recovery point type. -type InMageV2RpRecoveryPointType string - -const ( - InMageV2RpRecoveryPointTypeLatest InMageV2RpRecoveryPointType = "Latest" - InMageV2RpRecoveryPointTypeLatestApplicationConsistent InMageV2RpRecoveryPointType = "LatestApplicationConsistent" - InMageV2RpRecoveryPointTypeLatestCrashConsistent InMageV2RpRecoveryPointType = "LatestCrashConsistent" - InMageV2RpRecoveryPointTypeLatestProcessed InMageV2RpRecoveryPointType = "LatestProcessed" -) - -// PossibleInMageV2RpRecoveryPointTypeValues returns the possible values for the InMageV2RpRecoveryPointType const type. -func PossibleInMageV2RpRecoveryPointTypeValues() []InMageV2RpRecoveryPointType { - return []InMageV2RpRecoveryPointType{ - InMageV2RpRecoveryPointTypeLatest, - InMageV2RpRecoveryPointTypeLatestApplicationConsistent, - InMageV2RpRecoveryPointTypeLatestCrashConsistent, - InMageV2RpRecoveryPointTypeLatestProcessed, - } -} - -// LicenseType - License type. -type LicenseType string - -const ( - LicenseTypeNoLicenseType LicenseType = "NoLicenseType" - LicenseTypeNotSpecified LicenseType = "NotSpecified" - LicenseTypeWindowsServer LicenseType = "WindowsServer" -) - -// PossibleLicenseTypeValues returns the possible values for the LicenseType const type. -func PossibleLicenseTypeValues() []LicenseType { - return []LicenseType{ - LicenseTypeNoLicenseType, - LicenseTypeNotSpecified, - LicenseTypeWindowsServer, - } -} - -type MigrationItemOperation string - -const ( - MigrationItemOperationDisableMigration MigrationItemOperation = "DisableMigration" - MigrationItemOperationMigrate MigrationItemOperation = "Migrate" - MigrationItemOperationPauseReplication MigrationItemOperation = "PauseReplication" - MigrationItemOperationResumeReplication MigrationItemOperation = "ResumeReplication" - MigrationItemOperationStartResync MigrationItemOperation = "StartResync" - MigrationItemOperationTestMigrate MigrationItemOperation = "TestMigrate" - MigrationItemOperationTestMigrateCleanup MigrationItemOperation = "TestMigrateCleanup" -) - -// PossibleMigrationItemOperationValues returns the possible values for the MigrationItemOperation const type. -func PossibleMigrationItemOperationValues() []MigrationItemOperation { - return []MigrationItemOperation{ - MigrationItemOperationDisableMigration, - MigrationItemOperationMigrate, - MigrationItemOperationPauseReplication, - MigrationItemOperationResumeReplication, - MigrationItemOperationStartResync, - MigrationItemOperationTestMigrate, - MigrationItemOperationTestMigrateCleanup, - } -} - -// MigrationRecoveryPointType - The recovery point type. -type MigrationRecoveryPointType string - -const ( - MigrationRecoveryPointTypeApplicationConsistent MigrationRecoveryPointType = "ApplicationConsistent" - MigrationRecoveryPointTypeCrashConsistent MigrationRecoveryPointType = "CrashConsistent" - MigrationRecoveryPointTypeNotSpecified MigrationRecoveryPointType = "NotSpecified" -) - -// PossibleMigrationRecoveryPointTypeValues returns the possible values for the MigrationRecoveryPointType const type. -func PossibleMigrationRecoveryPointTypeValues() []MigrationRecoveryPointType { - return []MigrationRecoveryPointType{ - MigrationRecoveryPointTypeApplicationConsistent, - MigrationRecoveryPointTypeCrashConsistent, - MigrationRecoveryPointTypeNotSpecified, - } -} - -// MigrationState - The migration status. -type MigrationState string - -const ( - MigrationStateDisableMigrationFailed MigrationState = "DisableMigrationFailed" - MigrationStateDisableMigrationInProgress MigrationState = "DisableMigrationInProgress" - MigrationStateEnableMigrationFailed MigrationState = "EnableMigrationFailed" - MigrationStateEnableMigrationInProgress MigrationState = "EnableMigrationInProgress" - MigrationStateInitialSeedingFailed MigrationState = "InitialSeedingFailed" - MigrationStateInitialSeedingInProgress MigrationState = "InitialSeedingInProgress" - MigrationStateMigrationCompletedWithInformation MigrationState = "MigrationCompletedWithInformation" - MigrationStateMigrationFailed MigrationState = "MigrationFailed" - MigrationStateMigrationInProgress MigrationState = "MigrationInProgress" - MigrationStateMigrationPartiallySucceeded MigrationState = "MigrationPartiallySucceeded" - MigrationStateMigrationSucceeded MigrationState = "MigrationSucceeded" - MigrationStateNone MigrationState = "None" - MigrationStateProtectionSuspended MigrationState = "ProtectionSuspended" - MigrationStateReplicating MigrationState = "Replicating" - MigrationStateResumeInProgress MigrationState = "ResumeInProgress" - MigrationStateResumeInitiated MigrationState = "ResumeInitiated" - MigrationStateSuspendingProtection MigrationState = "SuspendingProtection" -) - -// PossibleMigrationStateValues returns the possible values for the MigrationState const type. -func PossibleMigrationStateValues() []MigrationState { - return []MigrationState{ - MigrationStateDisableMigrationFailed, - MigrationStateDisableMigrationInProgress, - MigrationStateEnableMigrationFailed, - MigrationStateEnableMigrationInProgress, - MigrationStateInitialSeedingFailed, - MigrationStateInitialSeedingInProgress, - MigrationStateMigrationCompletedWithInformation, - MigrationStateMigrationFailed, - MigrationStateMigrationInProgress, - MigrationStateMigrationPartiallySucceeded, - MigrationStateMigrationSucceeded, - MigrationStateNone, - MigrationStateProtectionSuspended, - MigrationStateReplicating, - MigrationStateResumeInProgress, - MigrationStateResumeInitiated, - MigrationStateSuspendingProtection, - } -} - -// MobilityAgentUpgradeState - The agent auto upgrade state. -type MobilityAgentUpgradeState string - -const ( - MobilityAgentUpgradeStateCommit MobilityAgentUpgradeState = "Commit" - MobilityAgentUpgradeStateCompleted MobilityAgentUpgradeState = "Completed" - MobilityAgentUpgradeStateNone MobilityAgentUpgradeState = "None" - MobilityAgentUpgradeStateStarted MobilityAgentUpgradeState = "Started" -) - -// PossibleMobilityAgentUpgradeStateValues returns the possible values for the MobilityAgentUpgradeState const type. -func PossibleMobilityAgentUpgradeStateValues() []MobilityAgentUpgradeState { - return []MobilityAgentUpgradeState{ - MobilityAgentUpgradeStateCommit, - MobilityAgentUpgradeStateCompleted, - MobilityAgentUpgradeStateNone, - MobilityAgentUpgradeStateStarted, - } -} - -// MultiVMGroupCreateOption - Whether Multi VM group is auto created or specified by user. -type MultiVMGroupCreateOption string - -const ( - MultiVMGroupCreateOptionAutoCreated MultiVMGroupCreateOption = "AutoCreated" - MultiVMGroupCreateOptionUserSpecified MultiVMGroupCreateOption = "UserSpecified" -) - -// PossibleMultiVMGroupCreateOptionValues returns the possible values for the MultiVMGroupCreateOption const type. -func PossibleMultiVMGroupCreateOptionValues() []MultiVMGroupCreateOption { - return []MultiVMGroupCreateOption{ - MultiVMGroupCreateOptionAutoCreated, - MultiVMGroupCreateOptionUserSpecified, - } -} - -// MultiVMSyncPointOption - A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. -type MultiVMSyncPointOption string - -const ( - MultiVMSyncPointOptionUseMultiVMSyncRecoveryPoint MultiVMSyncPointOption = "UseMultiVmSyncRecoveryPoint" - MultiVMSyncPointOptionUsePerVMRecoveryPoint MultiVMSyncPointOption = "UsePerVmRecoveryPoint" -) - -// PossibleMultiVMSyncPointOptionValues returns the possible values for the MultiVMSyncPointOption const type. -func PossibleMultiVMSyncPointOptionValues() []MultiVMSyncPointOption { - return []MultiVMSyncPointOption{ - MultiVMSyncPointOptionUseMultiVMSyncRecoveryPoint, - MultiVMSyncPointOptionUsePerVMRecoveryPoint, - } -} - -// PlannedFailoverStatus - The last planned failover status. -type PlannedFailoverStatus string - -const ( - PlannedFailoverStatusCancelled PlannedFailoverStatus = "Cancelled" - PlannedFailoverStatusFailed PlannedFailoverStatus = "Failed" - PlannedFailoverStatusSucceeded PlannedFailoverStatus = "Succeeded" - PlannedFailoverStatusUnknown PlannedFailoverStatus = "Unknown" -) - -// PossiblePlannedFailoverStatusValues returns the possible values for the PlannedFailoverStatus const type. -func PossiblePlannedFailoverStatusValues() []PlannedFailoverStatus { - return []PlannedFailoverStatus{ - PlannedFailoverStatusCancelled, - PlannedFailoverStatusFailed, - PlannedFailoverStatusSucceeded, - PlannedFailoverStatusUnknown, - } -} - -type PossibleOperationsDirections string - -const ( - PossibleOperationsDirectionsPrimaryToRecovery PossibleOperationsDirections = "PrimaryToRecovery" - PossibleOperationsDirectionsRecoveryToPrimary PossibleOperationsDirections = "RecoveryToPrimary" -) - -// PossiblePossibleOperationsDirectionsValues returns the possible values for the PossibleOperationsDirections const type. -func PossiblePossibleOperationsDirectionsValues() []PossibleOperationsDirections { - return []PossibleOperationsDirections{ - PossibleOperationsDirectionsPrimaryToRecovery, - PossibleOperationsDirectionsRecoveryToPrimary, - } -} - -// PresenceStatus - A value indicating whether the VM has a physical disk attached. String value of SrsDataContract.PresenceStatus -// enum. -type PresenceStatus string - -const ( - PresenceStatusNotPresent PresenceStatus = "NotPresent" - PresenceStatusPresent PresenceStatus = "Present" - PresenceStatusUnknown PresenceStatus = "Unknown" -) - -// PossiblePresenceStatusValues returns the possible values for the PresenceStatus const type. -func PossiblePresenceStatusValues() []PresenceStatus { - return []PresenceStatus{ - PresenceStatusNotPresent, - PresenceStatusPresent, - PresenceStatusUnknown, - } -} - -// ProtectionHealth - The health. -type ProtectionHealth string - -const ( - ProtectionHealthCritical ProtectionHealth = "Critical" - ProtectionHealthNone ProtectionHealth = "None" - ProtectionHealthNormal ProtectionHealth = "Normal" - ProtectionHealthWarning ProtectionHealth = "Warning" -) - -// PossibleProtectionHealthValues returns the possible values for the ProtectionHealth const type. -func PossibleProtectionHealthValues() []ProtectionHealth { - return []ProtectionHealth{ - ProtectionHealthCritical, - ProtectionHealthNone, - ProtectionHealthNormal, - ProtectionHealthWarning, - } -} - -// RcmComponentStatus - The throughput status. -type RcmComponentStatus string - -const ( - RcmComponentStatusCritical RcmComponentStatus = "Critical" - RcmComponentStatusHealthy RcmComponentStatus = "Healthy" - RcmComponentStatusUnknown RcmComponentStatus = "Unknown" - RcmComponentStatusWarning RcmComponentStatus = "Warning" -) - -// PossibleRcmComponentStatusValues returns the possible values for the RcmComponentStatus const type. -func PossibleRcmComponentStatusValues() []RcmComponentStatus { - return []RcmComponentStatus{ - RcmComponentStatusCritical, - RcmComponentStatusHealthy, - RcmComponentStatusUnknown, - RcmComponentStatusWarning, - } -} - -// RecoveryPlanActionLocation - The fabric location. -type RecoveryPlanActionLocation string - -const ( - RecoveryPlanActionLocationPrimary RecoveryPlanActionLocation = "Primary" - RecoveryPlanActionLocationRecovery RecoveryPlanActionLocation = "Recovery" -) - -// PossibleRecoveryPlanActionLocationValues returns the possible values for the RecoveryPlanActionLocation const type. -func PossibleRecoveryPlanActionLocationValues() []RecoveryPlanActionLocation { - return []RecoveryPlanActionLocation{ - RecoveryPlanActionLocationPrimary, - RecoveryPlanActionLocationRecovery, - } -} - -// RecoveryPlanGroupType - The group type. -type RecoveryPlanGroupType string - -const ( - RecoveryPlanGroupTypeBoot RecoveryPlanGroupType = "Boot" - RecoveryPlanGroupTypeFailover RecoveryPlanGroupType = "Failover" - RecoveryPlanGroupTypeShutdown RecoveryPlanGroupType = "Shutdown" -) - -// PossibleRecoveryPlanGroupTypeValues returns the possible values for the RecoveryPlanGroupType const type. -func PossibleRecoveryPlanGroupTypeValues() []RecoveryPlanGroupType { - return []RecoveryPlanGroupType{ - RecoveryPlanGroupTypeBoot, - RecoveryPlanGroupTypeFailover, - RecoveryPlanGroupTypeShutdown, - } -} - -// RecoveryPlanPointType - The recovery point type. -type RecoveryPlanPointType string - -const ( - RecoveryPlanPointTypeLatest RecoveryPlanPointType = "Latest" - RecoveryPlanPointTypeLatestApplicationConsistent RecoveryPlanPointType = "LatestApplicationConsistent" - RecoveryPlanPointTypeLatestCrashConsistent RecoveryPlanPointType = "LatestCrashConsistent" - RecoveryPlanPointTypeLatestProcessed RecoveryPlanPointType = "LatestProcessed" -) - -// PossibleRecoveryPlanPointTypeValues returns the possible values for the RecoveryPlanPointType const type. -func PossibleRecoveryPlanPointTypeValues() []RecoveryPlanPointType { - return []RecoveryPlanPointType{ - RecoveryPlanPointTypeLatest, - RecoveryPlanPointTypeLatestApplicationConsistent, - RecoveryPlanPointTypeLatestCrashConsistent, - RecoveryPlanPointTypeLatestProcessed, - } -} - -// RecoveryPointSyncType - A value indicating whether the recovery point is multi VM consistent. -type RecoveryPointSyncType string - -const ( - RecoveryPointSyncTypeMultiVMSyncRecoveryPoint RecoveryPointSyncType = "MultiVmSyncRecoveryPoint" - RecoveryPointSyncTypePerVMRecoveryPoint RecoveryPointSyncType = "PerVmRecoveryPoint" -) - -// PossibleRecoveryPointSyncTypeValues returns the possible values for the RecoveryPointSyncType const type. -func PossibleRecoveryPointSyncTypeValues() []RecoveryPointSyncType { - return []RecoveryPointSyncType{ - RecoveryPointSyncTypeMultiVMSyncRecoveryPoint, - RecoveryPointSyncTypePerVMRecoveryPoint, - } -} - -// RecoveryPointType - The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery -// point provided by RecoveryPointId will be used. In the other two cases, recovery point id will -// be ignored. -type RecoveryPointType string - -const ( - RecoveryPointTypeCustom RecoveryPointType = "Custom" - RecoveryPointTypeLatestTag RecoveryPointType = "LatestTag" - RecoveryPointTypeLatestTime RecoveryPointType = "LatestTime" -) - -// PossibleRecoveryPointTypeValues returns the possible values for the RecoveryPointType const type. -func PossibleRecoveryPointTypeValues() []RecoveryPointType { - return []RecoveryPointType{ - RecoveryPointTypeCustom, - RecoveryPointTypeLatestTag, - RecoveryPointTypeLatestTime, - } -} - -type ReplicationProtectedItemOperation string - -const ( - ReplicationProtectedItemOperationCancelFailover ReplicationProtectedItemOperation = "CancelFailover" - ReplicationProtectedItemOperationChangePit ReplicationProtectedItemOperation = "ChangePit" - ReplicationProtectedItemOperationCommit ReplicationProtectedItemOperation = "Commit" - ReplicationProtectedItemOperationCompleteMigration ReplicationProtectedItemOperation = "CompleteMigration" - ReplicationProtectedItemOperationDisableProtection ReplicationProtectedItemOperation = "DisableProtection" - ReplicationProtectedItemOperationFailback ReplicationProtectedItemOperation = "Failback" - ReplicationProtectedItemOperationFinalizeFailback ReplicationProtectedItemOperation = "FinalizeFailback" - ReplicationProtectedItemOperationPlannedFailover ReplicationProtectedItemOperation = "PlannedFailover" - ReplicationProtectedItemOperationRepairReplication ReplicationProtectedItemOperation = "RepairReplication" - ReplicationProtectedItemOperationReverseReplicate ReplicationProtectedItemOperation = "ReverseReplicate" - ReplicationProtectedItemOperationSwitchProtection ReplicationProtectedItemOperation = "SwitchProtection" - ReplicationProtectedItemOperationTestFailover ReplicationProtectedItemOperation = "TestFailover" - ReplicationProtectedItemOperationTestFailoverCleanup ReplicationProtectedItemOperation = "TestFailoverCleanup" - ReplicationProtectedItemOperationUnplannedFailover ReplicationProtectedItemOperation = "UnplannedFailover" -) - -// PossibleReplicationProtectedItemOperationValues returns the possible values for the ReplicationProtectedItemOperation const type. -func PossibleReplicationProtectedItemOperationValues() []ReplicationProtectedItemOperation { - return []ReplicationProtectedItemOperation{ - ReplicationProtectedItemOperationCancelFailover, - ReplicationProtectedItemOperationChangePit, - ReplicationProtectedItemOperationCommit, - ReplicationProtectedItemOperationCompleteMigration, - ReplicationProtectedItemOperationDisableProtection, - ReplicationProtectedItemOperationFailback, - ReplicationProtectedItemOperationFinalizeFailback, - ReplicationProtectedItemOperationPlannedFailover, - ReplicationProtectedItemOperationRepairReplication, - ReplicationProtectedItemOperationReverseReplicate, - ReplicationProtectedItemOperationSwitchProtection, - ReplicationProtectedItemOperationTestFailover, - ReplicationProtectedItemOperationTestFailoverCleanup, - ReplicationProtectedItemOperationUnplannedFailover, - } -} - -// ResyncState - The resync state. -type ResyncState string - -const ( - ResyncStateNone ResyncState = "None" - ResyncStatePreparedForResynchronization ResyncState = "PreparedForResynchronization" - ResyncStateStartedResynchronization ResyncState = "StartedResynchronization" -) - -// PossibleResyncStateValues returns the possible values for the ResyncState const type. -func PossibleResyncStateValues() []ResyncState { - return []ResyncState{ - ResyncStateNone, - ResyncStatePreparedForResynchronization, - ResyncStateStartedResynchronization, - } -} - -// RpInMageRecoveryPointType - The recovery point type. -type RpInMageRecoveryPointType string - -const ( - RpInMageRecoveryPointTypeCustom RpInMageRecoveryPointType = "Custom" - RpInMageRecoveryPointTypeLatestTag RpInMageRecoveryPointType = "LatestTag" - RpInMageRecoveryPointTypeLatestTime RpInMageRecoveryPointType = "LatestTime" -) - -// PossibleRpInMageRecoveryPointTypeValues returns the possible values for the RpInMageRecoveryPointType const type. -func PossibleRpInMageRecoveryPointTypeValues() []RpInMageRecoveryPointType { - return []RpInMageRecoveryPointType{ - RpInMageRecoveryPointTypeCustom, - RpInMageRecoveryPointTypeLatestTag, - RpInMageRecoveryPointTypeLatestTime, - } -} - -// SQLServerLicenseType - The SQL Server license type. -type SQLServerLicenseType string - -const ( - SQLServerLicenseTypeAHUB SQLServerLicenseType = "AHUB" - SQLServerLicenseTypeNoLicenseType SQLServerLicenseType = "NoLicenseType" - SQLServerLicenseTypeNotSpecified SQLServerLicenseType = "NotSpecified" - SQLServerLicenseTypePAYG SQLServerLicenseType = "PAYG" -) - -// PossibleSQLServerLicenseTypeValues returns the possible values for the SQLServerLicenseType const type. -func PossibleSQLServerLicenseTypeValues() []SQLServerLicenseType { - return []SQLServerLicenseType{ - SQLServerLicenseTypeAHUB, - SQLServerLicenseTypeNoLicenseType, - SQLServerLicenseTypeNotSpecified, - SQLServerLicenseTypePAYG, - } -} - -// SetMultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. -type SetMultiVMSyncStatus string - -const ( - SetMultiVMSyncStatusDisable SetMultiVMSyncStatus = "Disable" - SetMultiVMSyncStatusEnable SetMultiVMSyncStatus = "Enable" -) - -// PossibleSetMultiVMSyncStatusValues returns the possible values for the SetMultiVMSyncStatus const type. -func PossibleSetMultiVMSyncStatusValues() []SetMultiVMSyncStatus { - return []SetMultiVMSyncStatus{ - SetMultiVMSyncStatusDisable, - SetMultiVMSyncStatusEnable, - } -} - -// Severity - Severity of error. -type Severity string - -const ( - SeverityError Severity = "Error" - SeverityInfo Severity = "Info" - SeverityNONE Severity = "NONE" - SeverityWarning Severity = "Warning" -) - -// PossibleSeverityValues returns the possible values for the Severity const type. -func PossibleSeverityValues() []Severity { - return []Severity{ - SeverityError, - SeverityInfo, - SeverityNONE, - SeverityWarning, - } -} - -// SourceSiteOperations - A value indicating whether source site operations are required. -type SourceSiteOperations string - -const ( - SourceSiteOperationsNotRequired SourceSiteOperations = "NotRequired" - SourceSiteOperationsRequired SourceSiteOperations = "Required" -) - -// PossibleSourceSiteOperationsValues returns the possible values for the SourceSiteOperations const type. -func PossibleSourceSiteOperationsValues() []SourceSiteOperations { - return []SourceSiteOperations{ - SourceSiteOperationsNotRequired, - SourceSiteOperationsRequired, - } -} - -// TestMigrationState - The test migrate state. -type TestMigrationState string - -const ( - TestMigrationStateNone TestMigrationState = "None" - TestMigrationStateTestMigrationCleanupInProgress TestMigrationState = "TestMigrationCleanupInProgress" - TestMigrationStateTestMigrationCompletedWithInformation TestMigrationState = "TestMigrationCompletedWithInformation" - TestMigrationStateTestMigrationFailed TestMigrationState = "TestMigrationFailed" - TestMigrationStateTestMigrationInProgress TestMigrationState = "TestMigrationInProgress" - TestMigrationStateTestMigrationPartiallySucceeded TestMigrationState = "TestMigrationPartiallySucceeded" - TestMigrationStateTestMigrationSucceeded TestMigrationState = "TestMigrationSucceeded" -) - -// PossibleTestMigrationStateValues returns the possible values for the TestMigrationState const type. -func PossibleTestMigrationStateValues() []TestMigrationState { - return []TestMigrationState{ - TestMigrationStateNone, - TestMigrationStateTestMigrationCleanupInProgress, - TestMigrationStateTestMigrationCompletedWithInformation, - TestMigrationStateTestMigrationFailed, - TestMigrationStateTestMigrationInProgress, - TestMigrationStateTestMigrationPartiallySucceeded, - TestMigrationStateTestMigrationSucceeded, - } -} - -// VMEncryptionType - The encryption type of the VM. -type VMEncryptionType string - -const ( - VMEncryptionTypeNotEncrypted VMEncryptionType = "NotEncrypted" - VMEncryptionTypeOnePassEncrypted VMEncryptionType = "OnePassEncrypted" - VMEncryptionTypeTwoPassEncrypted VMEncryptionType = "TwoPassEncrypted" -) - -// PossibleVMEncryptionTypeValues returns the possible values for the VMEncryptionType const type. -func PossibleVMEncryptionTypeValues() []VMEncryptionType { - return []VMEncryptionType{ - VMEncryptionTypeNotEncrypted, - VMEncryptionTypeOnePassEncrypted, - VMEncryptionTypeTwoPassEncrypted, - } -} - -// VMReplicationProgressHealth - The initial replication progress health. -type VMReplicationProgressHealth string - -const ( - VMReplicationProgressHealthInProgress VMReplicationProgressHealth = "InProgress" - VMReplicationProgressHealthNoProgress VMReplicationProgressHealth = "NoProgress" - VMReplicationProgressHealthNone VMReplicationProgressHealth = "None" - VMReplicationProgressHealthSlowProgress VMReplicationProgressHealth = "SlowProgress" -) - -// PossibleVMReplicationProgressHealthValues returns the possible values for the VMReplicationProgressHealth const type. -func PossibleVMReplicationProgressHealthValues() []VMReplicationProgressHealth { - return []VMReplicationProgressHealth{ - VMReplicationProgressHealthInProgress, - VMReplicationProgressHealthNoProgress, - VMReplicationProgressHealthNone, - VMReplicationProgressHealthSlowProgress, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/migrationrecoverypoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/migrationrecoverypoints_client.go deleted file mode 100644 index fbb0984f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/migrationrecoverypoints_client.go +++ /dev/null @@ -1,219 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// MigrationRecoveryPointsClient contains the methods for the MigrationRecoveryPoints group. -// Don't use this type directly, use NewMigrationRecoveryPointsClient() instead. -type MigrationRecoveryPointsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewMigrationRecoveryPointsClient creates a new instance of MigrationRecoveryPointsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewMigrationRecoveryPointsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MigrationRecoveryPointsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &MigrationRecoveryPointsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets a recovery point for a migration item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric unique name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// migrationRecoveryPointName - The migration recovery point name. -// options - MigrationRecoveryPointsClientGetOptions contains the optional parameters for the MigrationRecoveryPointsClient.Get -// method. -func (client *MigrationRecoveryPointsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrationRecoveryPointName string, options *MigrationRecoveryPointsClientGetOptions) (MigrationRecoveryPointsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, migrationRecoveryPointName, options) - if err != nil { - return MigrationRecoveryPointsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MigrationRecoveryPointsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MigrationRecoveryPointsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *MigrationRecoveryPointsClient) getCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrationRecoveryPointName string, options *MigrationRecoveryPointsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrationRecoveryPoints/{migrationRecoveryPointName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - if migrationRecoveryPointName == "" { - return nil, errors.New("parameter migrationRecoveryPointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationRecoveryPointName}", url.PathEscape(migrationRecoveryPointName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *MigrationRecoveryPointsClient) getHandleResponse(resp *http.Response) (MigrationRecoveryPointsClientGetResponse, error) { - result := MigrationRecoveryPointsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MigrationRecoveryPoint); err != nil { - return MigrationRecoveryPointsClientGetResponse{}, err - } - return result, nil -} - -// NewListByReplicationMigrationItemsPager - Gets the recovery points for a migration item. -// Generated from API version 2022-10-01 -// fabricName - Fabric unique name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// options - MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions contains the optional parameters for the -// MigrationRecoveryPointsClient.ListByReplicationMigrationItems method. -func (client *MigrationRecoveryPointsClient) NewListByReplicationMigrationItemsPager(fabricName string, protectionContainerName string, migrationItemName string, options *MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions) *runtime.Pager[MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse] { - return runtime.NewPager(runtime.PagingHandler[MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse]{ - More: func(page MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse) (MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationMigrationItemsCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationMigrationItemsHandleResponse(resp) - }, - }) -} - -// listByReplicationMigrationItemsCreateRequest creates the ListByReplicationMigrationItems request. -func (client *MigrationRecoveryPointsClient) listByReplicationMigrationItemsCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, options *MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrationRecoveryPoints" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationMigrationItemsHandleResponse handles the ListByReplicationMigrationItems response. -func (client *MigrationRecoveryPointsClient) listByReplicationMigrationItemsHandleResponse(resp *http.Response) (MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse, error) { - result := MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MigrationRecoveryPointCollection); err != nil { - return MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/models.go deleted file mode 100644 index ef27a946..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/models.go +++ /dev/null @@ -1,12538 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import "time" - -// A2AAddDisksInput - A2A add disk(s) input. -type A2AAddDisksInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The list of vm disk details. - VMDisks []*A2AVMDiskInputDetails `json:"vmDisks,omitempty"` - - // The list of vm managed disk details. - VMManagedDisks []*A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` -} - -// GetAddDisksProviderSpecificInput implements the AddDisksProviderSpecificInputClassification interface for type A2AAddDisksInput. -func (a *A2AAddDisksInput) GetAddDisksProviderSpecificInput() *AddDisksProviderSpecificInput { - return &AddDisksProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2AApplyRecoveryPointInput - ApplyRecoveryPoint input specific to A2A provider. -type A2AApplyRecoveryPointInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface -// for type A2AApplyRecoveryPointInput. -func (a *A2AApplyRecoveryPointInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { - return &ApplyRecoveryPointProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2AContainerCreationInput - A2A cloud creation input. -type A2AContainerCreationInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetReplicationProviderSpecificContainerCreationInput implements the ReplicationProviderSpecificContainerCreationInputClassification -// interface for type A2AContainerCreationInput. -func (a *A2AContainerCreationInput) GetReplicationProviderSpecificContainerCreationInput() *ReplicationProviderSpecificContainerCreationInput { - return &ReplicationProviderSpecificContainerCreationInput{ - InstanceType: a.InstanceType, - } -} - -// A2AContainerMappingInput - A2A container mapping input. -type A2AContainerMappingInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating whether the auto update is enabled. - AgentAutoUpdateStatus *AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` - - // The automation account arm id. - AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` - - // A value indicating the type authentication to use for automation Account. - AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` -} - -// GetReplicationProviderSpecificContainerMappingInput implements the ReplicationProviderSpecificContainerMappingInputClassification -// interface for type A2AContainerMappingInput. -func (a *A2AContainerMappingInput) GetReplicationProviderSpecificContainerMappingInput() *ReplicationProviderSpecificContainerMappingInput { - return &ReplicationProviderSpecificContainerMappingInput{ - InstanceType: a.InstanceType, - } -} - -// A2ACreateProtectionIntentInput - A2A create protection intent input. -type A2ACreateProtectionIntentInput struct { - // REQUIRED; The fabric specific object Id of the virtual machine. - FabricObjectID *string `json:"fabricObjectId,omitempty"` - - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The primary location for the virtual machine. - PrimaryLocation *string `json:"primaryLocation,omitempty"` - - // REQUIRED; The recovery availability type of the virtual machine. - RecoveryAvailabilityType *A2ARecoveryAvailabilityType `json:"recoveryAvailabilityType,omitempty"` - - // REQUIRED; The recovery location for the virtual machine. - RecoveryLocation *string `json:"recoveryLocation,omitempty"` - - // REQUIRED; The recovery resource group Id. Valid for V2 scenarios. - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - - // REQUIRED; The recovery subscription Id of the virtual machine. - RecoverySubscriptionID *string `json:"recoverySubscriptionId,omitempty"` - - // A value indicating whether the auto update is enabled. - AgentAutoUpdateStatus *AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` - - // A value indicating whether the auto protection is enabled. - AutoProtectionOfDataDisk *AutoProtectionOfDataDisk `json:"autoProtectionOfDataDisk,omitempty"` - - // The automation account arm id. - AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` - - // A value indicating the authentication type for automation account. The default value is "RunAsAccount". - AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` - - // The recovery disk encryption information (for two pass flows). - DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` - - // The multi vm group id. - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - - // The multi vm group name. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - - // The primary staging storage account input. - PrimaryStagingStorageAccountCustomInput StorageAccountCustomDetailsClassification `json:"primaryStagingStorageAccountCustomInput,omitempty"` - - // The protection profile custom inputs. - ProtectionProfileCustomInput ProtectionProfileCustomDetailsClassification `json:"protectionProfileCustomInput,omitempty"` - - // The recovery availability set input. - RecoveryAvailabilitySetCustomInput RecoveryAvailabilitySetCustomDetailsClassification `json:"recoveryAvailabilitySetCustomInput,omitempty"` - - // The recovery availability zone. - RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` - - // The boot diagnostic storage account. - RecoveryBootDiagStorageAccount StorageAccountCustomDetailsClassification `json:"recoveryBootDiagStorageAccount,omitempty"` - - // The recovery proximity placement group custom input. - RecoveryProximityPlacementGroupCustomInput RecoveryProximityPlacementGroupCustomDetailsClassification `json:"recoveryProximityPlacementGroupCustomInput,omitempty"` - - // The recovery virtual network input. - RecoveryVirtualNetworkCustomInput RecoveryVirtualNetworkCustomDetailsClassification `json:"recoveryVirtualNetworkCustomInput,omitempty"` - - // The list of vm disk inputs. - VMDisks []*A2AProtectionIntentDiskInputDetails `json:"vmDisks,omitempty"` - - // The list of vm managed disk inputs. - VMManagedDisks []*A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` -} - -// GetCreateProtectionIntentProviderSpecificDetails implements the CreateProtectionIntentProviderSpecificDetailsClassification -// interface for type A2ACreateProtectionIntentInput. -func (a *A2ACreateProtectionIntentInput) GetCreateProtectionIntentProviderSpecificDetails() *CreateProtectionIntentProviderSpecificDetails { - return &CreateProtectionIntentProviderSpecificDetails{ - InstanceType: a.InstanceType, - } -} - -// A2ACrossClusterMigrationApplyRecoveryPointInput - ApplyRecoveryPoint input specific to A2ACrossClusterMigration provider. -type A2ACrossClusterMigrationApplyRecoveryPointInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface -// for type A2ACrossClusterMigrationApplyRecoveryPointInput. -func (a *A2ACrossClusterMigrationApplyRecoveryPointInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { - return &ApplyRecoveryPointProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2ACrossClusterMigrationContainerCreationInput - A2ACrossClusterMigration cloud creation input. -type A2ACrossClusterMigrationContainerCreationInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetReplicationProviderSpecificContainerCreationInput implements the ReplicationProviderSpecificContainerCreationInputClassification -// interface for type A2ACrossClusterMigrationContainerCreationInput. -func (a *A2ACrossClusterMigrationContainerCreationInput) GetReplicationProviderSpecificContainerCreationInput() *ReplicationProviderSpecificContainerCreationInput { - return &ReplicationProviderSpecificContainerCreationInput{ - InstanceType: a.InstanceType, - } -} - -// A2ACrossClusterMigrationEnableProtectionInput - A2A Cross-Cluster Migration enable protection input. -type A2ACrossClusterMigrationEnableProtectionInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The fabric specific object Id of the virtual machine. - FabricObjectID *string `json:"fabricObjectId,omitempty"` - - // The recovery container Id. - RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` -} - -// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for -// type A2ACrossClusterMigrationEnableProtectionInput. -func (a *A2ACrossClusterMigrationEnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { - return &EnableProtectionProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2ACrossClusterMigrationPolicyCreationInput - A2A Cross-Cluster Migration Policy creation input. -type A2ACrossClusterMigrationPolicyCreationInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type A2ACrossClusterMigrationPolicyCreationInput. -func (a *A2ACrossClusterMigrationPolicyCreationInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return &PolicyProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2ACrossClusterMigrationReplicationDetails - A2A provider specific settings. -type A2ACrossClusterMigrationReplicationDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // The fabric specific object Id of the virtual machine. - FabricObjectID *string `json:"fabricObjectId,omitempty"` - - // An id associated with the PE that survives actions like switch protection which change the backing PE/CPE objects internally.The - // lifecycle id gets carried forward to have a link/continuity in being - // able to have an Id that denotes the "same" protected item even though other internal Ids/ARM Id might be changing. - LifecycleID *string `json:"lifecycleId,omitempty"` - - // The type of operating system. - OSType *string `json:"osType,omitempty"` - - // Primary fabric location. - PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` - - // The protection state for the vm. - VMProtectionState *string `json:"vmProtectionState,omitempty"` - - // The protection state description for the vm. - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// A2ACrossClusterMigrationReplicationDetails. -func (a *A2ACrossClusterMigrationReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return &ReplicationProviderSpecificSettings{ - InstanceType: a.InstanceType, - } -} - -// A2AEnableProtectionInput - A2A enable protection input. -type A2AEnableProtectionInput struct { - // REQUIRED; The fabric specific object Id of the virtual machine. - FabricObjectID *string `json:"fabricObjectId,omitempty"` - - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The recovery disk encryption information (for two pass flows). - DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` - - // The multi vm group id. - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - - // The multi vm group name. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - - // The recovery availability set Id. - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - - // The recovery availability zone. - RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` - - // The recovery Azure virtual network ARM id. - RecoveryAzureNetworkID *string `json:"recoveryAzureNetworkId,omitempty"` - - // The boot diagnostic storage account. - RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` - - // The recovery capacity reservation group Id. - RecoveryCapacityReservationGroupID *string `json:"recoveryCapacityReservationGroupId,omitempty"` - - // The recovery cloud service Id. Valid for V1 scenarios. - RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` - - // The recovery container Id. - RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` - - // The recovery extended location. - RecoveryExtendedLocation *ExtendedLocation `json:"recoveryExtendedLocation,omitempty"` - - // The recovery proximity placement group Id. - RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"` - - // The recovery resource group Id. Valid for V2 scenarios. - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - - // The recovery subnet name. - RecoverySubnetName *string `json:"recoverySubnetName,omitempty"` - - // The virtual machine scale set Id. - RecoveryVirtualMachineScaleSetID *string `json:"recoveryVirtualMachineScaleSetId,omitempty"` - - // The list of vm disk details. - VMDisks []*A2AVMDiskInputDetails `json:"vmDisks,omitempty"` - - // The list of vm managed disk details. - VMManagedDisks []*A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` -} - -// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for -// type A2AEnableProtectionInput. -func (a *A2AEnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { - return &EnableProtectionProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2AEventDetails - Model class for event details of a A2A event. -type A2AEventDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The fabric location. - FabricLocation *string `json:"fabricLocation,omitempty"` - - // Fabric arm name. - FabricName *string `json:"fabricName,omitempty"` - - // The azure vm arm id. - FabricObjectID *string `json:"fabricObjectId,omitempty"` - - // The protected item arm name. - ProtectedItemName *string `json:"protectedItemName,omitempty"` - - // Remote fabric location. - RemoteFabricLocation *string `json:"remoteFabricLocation,omitempty"` - - // Remote fabric arm name. - RemoteFabricName *string `json:"remoteFabricName,omitempty"` -} - -// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type A2AEventDetails. -func (a *A2AEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { - return &EventProviderSpecificDetails{ - InstanceType: a.InstanceType, - } -} - -// A2AExtendedLocationDetails - ExtendedLocation details data. -type A2AExtendedLocationDetails struct { - // The primary ExtendedLocation. - PrimaryExtendedLocation *ExtendedLocation `json:"primaryExtendedLocation,omitempty"` - - // The recovery ExtendedLocation. - RecoveryExtendedLocation *ExtendedLocation `json:"recoveryExtendedLocation,omitempty"` -} - -// A2APolicyCreationInput - A2A Policy creation input. -type A2APolicyCreationInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. - MultiVMSyncStatus *SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` - - // The app consistent snapshot frequency (in minutes). - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency (in minutes). - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` -} - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type A2APolicyCreationInput. -func (a *A2APolicyCreationInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return &PolicyProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2APolicyDetails - A2A specific policy details. -type A2APolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The app consistent snapshot frequency in minutes. - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency in minutes. - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - - // A value indicating whether multi-VM sync has to be enabled. - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - - // The recovery point threshold in minutes. - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type A2APolicyDetails. -func (a *A2APolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: a.InstanceType, - } -} - -// A2AProtectedDiskDetails - A2A protected disk details. -type A2AProtectedDiskDetails struct { - // The disk level operations list. - AllowedDiskLevelOperation []*string `json:"allowedDiskLevelOperation,omitempty"` - - // The data pending at source virtual machine in MB. - DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"` - - // The data pending for replication in MB at staging account. - DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"` - - // The KeyVault resource id for secret (BEK). - DekKeyVaultArmID *string `json:"dekKeyVaultArmId,omitempty"` - - // The disk capacity in bytes. - DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` - - // The disk name. - DiskName *string `json:"diskName,omitempty"` - - // The disk state. - DiskState *string `json:"diskState,omitempty"` - - // The type of disk. - DiskType *string `json:"diskType,omitempty"` - - // The disk uri. - DiskURI *string `json:"diskUri,omitempty"` - - // The failover name for the managed disk. - FailoverDiskName *string `json:"failoverDiskName,omitempty"` - - // A value indicating whether vm has encrypted os disk or not. - IsDiskEncrypted *bool `json:"isDiskEncrypted,omitempty"` - - // A value indicating whether disk key got encrypted or not. - IsDiskKeyEncrypted *bool `json:"isDiskKeyEncrypted,omitempty"` - - // The KeyVault resource id for key (KEK). - KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"` - - // The key URL / identifier (KEK). - KeyIdentifier *string `json:"keyIdentifier,omitempty"` - - // The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. - MonitoringJobType *string `json:"monitoringJobType,omitempty"` - - // The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. - MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` - - // The primary disk storage account. - PrimaryDiskAzureStorageAccountID *string `json:"primaryDiskAzureStorageAccountId,omitempty"` - - // The primary staging storage account. - PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` - - // The recovery disk storage account. - RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"` - - // Recovery disk uri. - RecoveryDiskURI *string `json:"recoveryDiskUri,omitempty"` - - // A value indicating whether resync is required for this disk. - ResyncRequired *bool `json:"resyncRequired,omitempty"` - - // The secret URL / identifier (BEK). - SecretIdentifier *string `json:"secretIdentifier,omitempty"` - - // The test failover name for the managed disk. - TfoDiskName *string `json:"tfoDiskName,omitempty"` -} - -// A2AProtectedManagedDiskDetails - A2A protected managed disk details. -type A2AProtectedManagedDiskDetails struct { - // The disk level operations list. - AllowedDiskLevelOperation []*string `json:"allowedDiskLevelOperation,omitempty"` - - // The data pending at source virtual machine in MB. - DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"` - - // The data pending for replication in MB at staging account. - DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"` - - // The KeyVault resource id for secret (BEK). - DekKeyVaultArmID *string `json:"dekKeyVaultArmId,omitempty"` - - // The disk capacity in bytes. - DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` - - // The managed disk Arm id. - DiskID *string `json:"diskId,omitempty"` - - // The disk name. - DiskName *string `json:"diskName,omitempty"` - - // The disk state. - DiskState *string `json:"diskState,omitempty"` - - // The type of disk. - DiskType *string `json:"diskType,omitempty"` - - // The failover name for the managed disk. - FailoverDiskName *string `json:"failoverDiskName,omitempty"` - - // A value indicating whether vm has encrypted os disk or not. - IsDiskEncrypted *bool `json:"isDiskEncrypted,omitempty"` - - // A value indicating whether disk key got encrypted or not. - IsDiskKeyEncrypted *bool `json:"isDiskKeyEncrypted,omitempty"` - - // The KeyVault resource id for key (KEK). - KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"` - - // The key URL / identifier (KEK). - KeyIdentifier *string `json:"keyIdentifier,omitempty"` - - // The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. - MonitoringJobType *string `json:"monitoringJobType,omitempty"` - - // The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. - MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` - - // The primary disk encryption set Id. - PrimaryDiskEncryptionSetID *string `json:"primaryDiskEncryptionSetId,omitempty"` - - // The primary staging storage account. - PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` - - // The recovery disk encryption set Id. - RecoveryDiskEncryptionSetID *string `json:"recoveryDiskEncryptionSetId,omitempty"` - - // Recovery original target disk Arm Id. - RecoveryOrignalTargetDiskID *string `json:"recoveryOrignalTargetDiskId,omitempty"` - - // The replica disk type. Its an optional value and will be same as source disk type if not user provided. - RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` - - // Recovery replica disk Arm Id. - RecoveryReplicaDiskID *string `json:"recoveryReplicaDiskId,omitempty"` - - // The recovery disk resource group Arm Id. - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - - // The target disk type after failover. Its an optional value and will be same as source disk type if not user provided. - RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"` - - // Recovery target disk Arm Id. - RecoveryTargetDiskID *string `json:"recoveryTargetDiskId,omitempty"` - - // A value indicating whether resync is required for this disk. - ResyncRequired *bool `json:"resyncRequired,omitempty"` - - // The secret URL / identifier (BEK). - SecretIdentifier *string `json:"secretIdentifier,omitempty"` - - // The test failover name for the managed disk. - TfoDiskName *string `json:"tfoDiskName,omitempty"` -} - -// A2AProtectionContainerMappingDetails - A2A provider specific settings. -type A2AProtectionContainerMappingDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating whether the auto update is enabled. - AgentAutoUpdateStatus *AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` - - // The automation account arm id. - AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` - - // A value indicating the type authentication to use for automation Account. - AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` - - // The job schedule arm name. - JobScheduleName *string `json:"jobScheduleName,omitempty"` - - // The schedule arm name. - ScheduleName *string `json:"scheduleName,omitempty"` -} - -// GetProtectionContainerMappingProviderSpecificDetails implements the ProtectionContainerMappingProviderSpecificDetailsClassification -// interface for type A2AProtectionContainerMappingDetails. -func (a *A2AProtectionContainerMappingDetails) GetProtectionContainerMappingProviderSpecificDetails() *ProtectionContainerMappingProviderSpecificDetails { - return &ProtectionContainerMappingProviderSpecificDetails{ - InstanceType: a.InstanceType, - } -} - -// A2AProtectionIntentDiskInputDetails - Azure VM unmanaged disk input details. -type A2AProtectionIntentDiskInputDetails struct { - // REQUIRED; The disk Uri. - DiskURI *string `json:"diskUri,omitempty"` - - // The primary staging storage account input. - PrimaryStagingStorageAccountCustomInput StorageAccountCustomDetailsClassification `json:"primaryStagingStorageAccountCustomInput,omitempty"` - - // The recovery VHD storage account input. - RecoveryAzureStorageAccountCustomInput StorageAccountCustomDetailsClassification `json:"recoveryAzureStorageAccountCustomInput,omitempty"` -} - -// A2AProtectionIntentManagedDiskInputDetails - Azure VM managed disk input details. -type A2AProtectionIntentManagedDiskInputDetails struct { - // REQUIRED; The disk Id. - DiskID *string `json:"diskId,omitempty"` - - // The recovery disk encryption information (for one / single pass flows). - DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` - - // The primary staging storage account input. - PrimaryStagingStorageAccountCustomInput StorageAccountCustomDetailsClassification `json:"primaryStagingStorageAccountCustomInput,omitempty"` - - // The recovery disk encryption set Id. - RecoveryDiskEncryptionSetID *string `json:"recoveryDiskEncryptionSetId,omitempty"` - - // The replica disk type. Its an optional value and will be same as source disk type if not user provided. - RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` - - // The recovery resource group input. - RecoveryResourceGroupCustomInput RecoveryResourceGroupCustomDetailsClassification `json:"recoveryResourceGroupCustomInput,omitempty"` - - // The target disk type after failover. Its an optional value and will be same as source disk type if not user provided. - RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"` -} - -// A2ARecoveryPointDetails - A2A provider specific recovery point details. -type A2ARecoveryPointDetails struct { - // REQUIRED; Gets the provider type. - InstanceType *string `json:"instanceType,omitempty"` - - // List of disk ids representing a recovery point. - Disks []*string `json:"disks,omitempty"` - - // A value indicating whether the recovery point is multi VM consistent. - RecoveryPointSyncType *RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` -} - -// GetProviderSpecificRecoveryPointDetails implements the ProviderSpecificRecoveryPointDetailsClassification interface for -// type A2ARecoveryPointDetails. -func (a *A2ARecoveryPointDetails) GetProviderSpecificRecoveryPointDetails() *ProviderSpecificRecoveryPointDetails { - return &ProviderSpecificRecoveryPointDetails{ - InstanceType: a.InstanceType, - } -} - -// A2ARemoveDisksInput - A2A remove disk(s) input. -type A2ARemoveDisksInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The list of vm disk vhd URIs. - VMDisksUris []*string `json:"vmDisksUris,omitempty"` - - // The list of vm managed disk Ids. - VMManagedDisksIDs []*string `json:"vmManagedDisksIds,omitempty"` -} - -// GetRemoveDisksProviderSpecificInput implements the RemoveDisksProviderSpecificInputClassification interface for type A2ARemoveDisksInput. -func (a *A2ARemoveDisksInput) GetRemoveDisksProviderSpecificInput() *RemoveDisksProviderSpecificInput { - return &RemoveDisksProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2AReplicationDetails - A2A provider specific settings. -type A2AReplicationDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // Agent expiry date. - AgentExpiryDate *time.Time `json:"agentExpiryDate,omitempty"` - - // The agent version. - AgentVersion *string `json:"agentVersion,omitempty"` - - // A value indicating whether the auto protection is enabled. - AutoProtectionOfDataDisk *AutoProtectionOfDataDisk `json:"autoProtectionOfDataDisk,omitempty"` - - // The fabric specific object Id of the virtual machine. - FabricObjectID *string `json:"fabricObjectId,omitempty"` - - // The initial primary extended location. - InitialPrimaryExtendedLocation *ExtendedLocation `json:"initialPrimaryExtendedLocation,omitempty"` - - // The initial recovery extended location. - InitialRecoveryExtendedLocation *ExtendedLocation `json:"initialRecoveryExtendedLocation,omitempty"` - - // A value indicating whether agent certificate update is required. - IsReplicationAgentCertificateUpdateRequired *bool `json:"isReplicationAgentCertificateUpdateRequired,omitempty"` - - // A value indicating whether replication agent update is required. - IsReplicationAgentUpdateRequired *bool `json:"isReplicationAgentUpdateRequired,omitempty"` - - // The last heartbeat received from the source server. - LastHeartbeat *time.Time `json:"lastHeartbeat,omitempty"` - - // The time (in UTC) when the last RPO value was calculated by Protection Service. - LastRpoCalculatedTime *time.Time `json:"lastRpoCalculatedTime,omitempty"` - - // An id associated with the PE that survives actions like switch protection which change the backing PE/CPE objects internally.The - // lifecycle id gets carried forward to have a link/continuity in being - // able to have an Id that denotes the "same" protected item even though other internal Ids/ARM Id might be changing. - LifecycleID *string `json:"lifecycleId,omitempty"` - - // The management Id. - ManagementID *string `json:"managementId,omitempty"` - - // The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. - MonitoringJobType *string `json:"monitoringJobType,omitempty"` - - // The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. - MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` - - // Whether Multi VM group is auto created or specified by user. - MultiVMGroupCreateOption *MultiVMGroupCreateOption `json:"multiVmGroupCreateOption,omitempty"` - - // The multi vm group Id. - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - - // The multi vm group name. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - - // The type of operating system. - OSType *string `json:"osType,omitempty"` - - // The primary availability zone. - PrimaryAvailabilityZone *string `json:"primaryAvailabilityZone,omitempty"` - - // The primary Extended Location. - PrimaryExtendedLocation *ExtendedLocation `json:"primaryExtendedLocation,omitempty"` - - // Primary fabric location. - PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` - - // The list of protected disks. - ProtectedDisks []*A2AProtectedDiskDetails `json:"protectedDisks,omitempty"` - - // The list of protected managed disks. - ProtectedManagedDisks []*A2AProtectedManagedDiskDetails `json:"protectedManagedDisks,omitempty"` - - // The recovery availability set. - RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"` - - // The recovery availability zone. - RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` - - // The recovery resource group. - RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` - - // The name of recovery virtual machine. - RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` - - // The size of recovery virtual machine. - RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` - - // The recovery boot diagnostic storage account Arm Id. - RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` - - // The recovery capacity reservation group Id. - RecoveryCapacityReservationGroupID *string `json:"recoveryCapacityReservationGroupId,omitempty"` - - // The recovery cloud service. - RecoveryCloudService *string `json:"recoveryCloudService,omitempty"` - - // The recovery Extended Location. - RecoveryExtendedLocation *ExtendedLocation `json:"recoveryExtendedLocation,omitempty"` - - // The recovery fabric location. - RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` - - // The recovery fabric object Id. - RecoveryFabricObjectID *string `json:"recoveryFabricObjectId,omitempty"` - - // The recovery proximity placement group Id. - RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"` - - // The recovery virtual machine scale set id. - RecoveryVirtualMachineScaleSetID *string `json:"recoveryVirtualMachineScaleSetId,omitempty"` - - // The last RPO value in seconds. - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - - // The recovery virtual network. - SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` - - // The test failover virtual network. - SelectedTfoAzureNetworkID *string `json:"selectedTfoAzureNetworkId,omitempty"` - - // The test failover fabric object Id. - TestFailoverRecoveryFabricObjectID *string `json:"testFailoverRecoveryFabricObjectId,omitempty"` - - // The test failover vm name. - TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` - - // The list of unprotected disks. - UnprotectedDisks []*A2AUnprotectedDiskDetails `json:"unprotectedDisks,omitempty"` - - // The virtual machine nic details. - VMNics []*VMNicDetails `json:"vmNics,omitempty"` - - // The protection state for the vm. - VMProtectionState *string `json:"vmProtectionState,omitempty"` - - // The protection state description for the vm. - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - - // The synced configuration details. - VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` - - // READ-ONLY; Agent certificate expiry date. - AgentCertificateExpiryDate *time.Time `json:"agentCertificateExpiryDate,omitempty" azure:"ro"` - - // READ-ONLY; The initial primary fabric location. - InitialPrimaryFabricLocation *string `json:"initialPrimaryFabricLocation,omitempty" azure:"ro"` - - // READ-ONLY; The initial primary availability zone. - InitialPrimaryZone *string `json:"initialPrimaryZone,omitempty" azure:"ro"` - - // READ-ONLY; The initial recovery fabric location. - InitialRecoveryFabricLocation *string `json:"initialRecoveryFabricLocation,omitempty" azure:"ro"` - - // READ-ONLY; The initial recovery availability zone. - InitialRecoveryZone *string `json:"initialRecoveryZone,omitempty" azure:"ro"` - - // READ-ONLY; The recovery azure generation. - RecoveryAzureGeneration *string `json:"recoveryAzureGeneration,omitempty" azure:"ro"` - - // READ-ONLY; The encryption type of the VM. - VMEncryptionType *VMEncryptionType `json:"vmEncryptionType,omitempty" azure:"ro"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// A2AReplicationDetails. -func (a *A2AReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return &ReplicationProviderSpecificSettings{ - InstanceType: a.InstanceType, - } -} - -// A2AReplicationIntentDetails - A2A provider specific settings. -type A2AReplicationIntentDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The recovery availability type of the virtual machine. - RecoveryAvailabilityType *string `json:"recoveryAvailabilityType,omitempty"` - - // A value indicating whether the auto update is enabled. - AgentAutoUpdateStatus *AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` - - // A value indicating whether the auto protection is enabled. - AutoProtectionOfDataDisk *AutoProtectionOfDataDisk `json:"autoProtectionOfDataDisk,omitempty"` - - // The automation account arm id. - AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` - - // A value indicating the type authentication to use for automation Account. - AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` - - // The recovery disk encryption information (for two pass flows). - DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` - - // The fabric specific object Id of the virtual machine. - FabricObjectID *string `json:"fabricObjectId,omitempty"` - - // The multi vm group id. - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - - // The multi vm group name. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - - // The primary location for the virtual machine. - PrimaryLocation *string `json:"primaryLocation,omitempty"` - - // The primary staging storage account details. - PrimaryStagingStorageAccount StorageAccountCustomDetailsClassification `json:"primaryStagingStorageAccount,omitempty"` - - // The protection profile custom details. - ProtectionProfile ProtectionProfileCustomDetailsClassification `json:"protectionProfile,omitempty"` - - // The recovery availability set details. - RecoveryAvailabilitySet RecoveryAvailabilitySetCustomDetailsClassification `json:"recoveryAvailabilitySet,omitempty"` - - // The recovery availability zone. - RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` - - // The boot diagnostic storage account. - RecoveryBootDiagStorageAccount StorageAccountCustomDetailsClassification `json:"recoveryBootDiagStorageAccount,omitempty"` - - // The recovery location for the virtual machine. - RecoveryLocation *string `json:"recoveryLocation,omitempty"` - - // The recovery proximity placement group custom details. - RecoveryProximityPlacementGroup RecoveryProximityPlacementGroupCustomDetailsClassification `json:"recoveryProximityPlacementGroup,omitempty"` - - // The recovery resource group id. - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - - // The recovery subscription Id of the virtual machine. - RecoverySubscriptionID *string `json:"recoverySubscriptionId,omitempty"` - - // The recovery virtual network details. - RecoveryVirtualNetwork RecoveryVirtualNetworkCustomDetailsClassification `json:"recoveryVirtualNetwork,omitempty"` - - // The list of vm disk details. - VMDisks []*A2AProtectionIntentDiskInputDetails `json:"vmDisks,omitempty"` - - // The list of vm managed disk details. - VMManagedDisks []*A2AProtectionIntentManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` -} - -// GetReplicationProtectionIntentProviderSpecificSettings implements the ReplicationProtectionIntentProviderSpecificSettingsClassification -// interface for type A2AReplicationIntentDetails. -func (a *A2AReplicationIntentDetails) GetReplicationProtectionIntentProviderSpecificSettings() *ReplicationProtectionIntentProviderSpecificSettings { - return &ReplicationProtectionIntentProviderSpecificSettings{ - InstanceType: a.InstanceType, - } -} - -// A2AReprotectInput - Azure specific reprotect input. -type A2AReprotectInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The Policy Id. - PolicyID *string `json:"policyId,omitempty"` - - // The recovery availability set. - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - - // The recovery cloud service Id. Valid for V1 scenarios. - RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` - - // The recovery container Id. - RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` - - // The recovery resource group Id. Valid for V2 scenarios. - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - - // The list of vm disk details. - VMDisks []*A2AVMDiskInputDetails `json:"vmDisks,omitempty"` -} - -// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface -// for type A2AReprotectInput. -func (a *A2AReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { - return &ReverseReplicationProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2ASwitchProtectionInput - A2A specific switch protection input. -type A2ASwitchProtectionInput struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // The recovery disk encryption information. - DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` - - // The Policy Id. - PolicyID *string `json:"policyId,omitempty"` - - // The recovery availability set. - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - - // The recovery availability zone. - RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` - - // The boot diagnostic storage account. - RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` - - // The recovery capacity reservation group Id. - RecoveryCapacityReservationGroupID *string `json:"recoveryCapacityReservationGroupId,omitempty"` - - // The recovery cloud service Id. Valid for V1 scenarios. - RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` - - // The recovery container Id. - RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` - - // The recovery proximity placement group Id. - RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"` - - // The recovery resource group Id. Valid for V2 scenarios. - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - - // The virtual machine scale set id. - RecoveryVirtualMachineScaleSetID *string `json:"recoveryVirtualMachineScaleSetId,omitempty"` - - // The list of vm disk details. - VMDisks []*A2AVMDiskInputDetails `json:"vmDisks,omitempty"` - - // The list of vm managed disk details. - VMManagedDisks []*A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` -} - -// GetSwitchProtectionProviderSpecificInput implements the SwitchProtectionProviderSpecificInputClassification interface for -// type A2ASwitchProtectionInput. -func (a *A2ASwitchProtectionInput) GetSwitchProtectionProviderSpecificInput() *SwitchProtectionProviderSpecificInput { - return &SwitchProtectionProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2ATestFailoverInput - A2A provider specific input for test failover. -type A2ATestFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating whether to use recovery cloud service for TFO or not. - CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` - - // The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null - // should be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` -} - -// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type -// A2ATestFailoverInput. -func (a *A2ATestFailoverInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { - return &TestFailoverProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2AUnplannedFailoverInput - A2A provider specific input for unplanned failover. -type A2AUnplannedFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating whether to use recovery cloud service for failover or not. - CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` - - // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should - // be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` -} - -// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface -// for type A2AUnplannedFailoverInput. -func (a *A2AUnplannedFailoverInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { - return &UnplannedFailoverProviderSpecificInput{ - InstanceType: a.InstanceType, - } -} - -// A2AUnprotectedDiskDetails - A2A unprotected disk details. -type A2AUnprotectedDiskDetails struct { - // A value indicating whether the disk auto protection is enabled. - DiskAutoProtectionStatus *AutoProtectionOfDataDisk `json:"diskAutoProtectionStatus,omitempty"` - - // The source lun Id for the data disk. - DiskLunID *int32 `json:"diskLunId,omitempty"` -} - -// A2AUpdateContainerMappingInput - A2A update protection container mapping. -type A2AUpdateContainerMappingInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating whether the auto update is enabled. - AgentAutoUpdateStatus *AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` - - // The automation account arm id. - AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` - - // A value indicating the type authentication to use for automation Account. - AutomationAccountAuthenticationType *AutomationAccountAuthenticationType `json:"automationAccountAuthenticationType,omitempty"` -} - -// GetReplicationProviderSpecificUpdateContainerMappingInput implements the ReplicationProviderSpecificUpdateContainerMappingInputClassification -// interface for type A2AUpdateContainerMappingInput. -func (a *A2AUpdateContainerMappingInput) GetReplicationProviderSpecificUpdateContainerMappingInput() *ReplicationProviderSpecificUpdateContainerMappingInput { - return &ReplicationProviderSpecificUpdateContainerMappingInput{ - InstanceType: a.InstanceType, - } -} - -// A2AUpdateReplicationProtectedItemInput - InMage Azure V2 input to update replication protected item. -type A2AUpdateReplicationProtectedItemInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The recovery os disk encryption information. - DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` - - // Managed disk update details. - ManagedDiskUpdateDetails []*A2AVMManagedDiskUpdateDetails `json:"managedDiskUpdateDetails,omitempty"` - - // The boot diagnostic storage account. - RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` - - // The recovery capacity reservation group Id. - RecoveryCapacityReservationGroupID *string `json:"recoveryCapacityReservationGroupId,omitempty"` - - // The target cloud service ARM Id (for V1). - RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` - - // The recovery proximity placement group Id. - RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"` - - // The target resource group ARM Id (for V2). - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - - // The recovery virtual machine scale set Id. - RecoveryVirtualMachineScaleSetID *string `json:"recoveryVirtualMachineScaleSetId,omitempty"` - - // The user given name for Test Failover VM. - TfoAzureVMName *string `json:"tfoAzureVMName,omitempty"` -} - -// GetUpdateReplicationProtectedItemProviderInput implements the UpdateReplicationProtectedItemProviderInputClassification -// interface for type A2AUpdateReplicationProtectedItemInput. -func (a *A2AUpdateReplicationProtectedItemInput) GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput { - return &UpdateReplicationProtectedItemProviderInput{ - InstanceType: a.InstanceType, - } -} - -// A2AVMDiskInputDetails - A2A disk input details. -type A2AVMDiskInputDetails struct { - // REQUIRED; The disk Uri. - DiskURI *string `json:"diskUri,omitempty"` - - // REQUIRED; The primary staging storage account Id. - PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` - - // REQUIRED; The recovery VHD storage account Id. - RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"` -} - -// A2AVMManagedDiskInputDetails - A2A managed disk input details. -type A2AVMManagedDiskInputDetails struct { - // REQUIRED; The disk Id. - DiskID *string `json:"diskId,omitempty"` - - // REQUIRED; The primary staging storage account Arm Id. - PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` - - // REQUIRED; The target resource group Arm Id. - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - - // The recovery disk encryption information (for one / single pass flows). - DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` - - // The recovery disk encryption set Id. - RecoveryDiskEncryptionSetID *string `json:"recoveryDiskEncryptionSetId,omitempty"` - - // The replica disk type. Its an optional value and will be same as source disk type if not user provided. - RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` - - // The target disk type after failover. Its an optional value and will be same as source disk type if not user provided. - RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"` -} - -// A2AVMManagedDiskUpdateDetails - A2A Vm managed disk update details. -type A2AVMManagedDiskUpdateDetails struct { - // The recovery os disk encryption information. - DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` - - // The disk Id. - DiskID *string `json:"diskId,omitempty"` - - // The target disk name for unplanned failover operation. - FailoverDiskName *string `json:"failoverDiskName,omitempty"` - - // The replica disk type before failover. - RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` - - // The target disk type before failover. - RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"` - - // The target disk name for test failover operation. - TfoDiskName *string `json:"tfoDiskName,omitempty"` -} - -// A2AZoneDetails - Zone details data. -type A2AZoneDetails struct { - // Source zone info. - Source *string `json:"source,omitempty"` - - // The target zone info. - Target *string `json:"target,omitempty"` -} - -// ASRTask - Task of the Job. -type ASRTask struct { - // The state/actions applicable on this task. - AllowedActions []*string `json:"allowedActions,omitempty"` - - // The custom task details based on the task type. - CustomDetails TaskTypeDetailsClassification `json:"customDetails,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // The task error details. - Errors []*JobErrorDetails `json:"errors,omitempty"` - - // The name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The custom task details based on the task type, if the task type is GroupTaskDetails or one of the types derived from it. - GroupTaskCustomDetails GroupTaskDetailsClassification `json:"groupTaskCustomDetails,omitempty"` - - // The unique Task name. - Name *string `json:"name,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // The State. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. - State *string `json:"state,omitempty"` - - // The description of the task state. For example - For Succeeded state, description can be Completed, PartiallySucceeded, - // CompletedWithInformation or Skipped. - StateDescription *string `json:"stateDescription,omitempty"` - - // The Id. - TaskID *string `json:"taskId,omitempty"` - - // The type of task. Details in CustomDetails property depend on this type. - TaskType *string `json:"taskType,omitempty"` -} - -// AddDisksInput - Input for add disk(s) operation. -type AddDisksInput struct { - // Add disks input properties. - Properties *AddDisksInputProperties `json:"properties,omitempty"` -} - -// AddDisksInputProperties - Add Disks input properties. -type AddDisksInputProperties struct { - // REQUIRED; The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. - // For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure - // provider, it can be null. - ProviderSpecificDetails AddDisksProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// AddDisksProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetAddDisksProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AAddDisksInput, *AddDisksProviderSpecificInput -type AddDisksProviderSpecificInputClassification interface { - // GetAddDisksProviderSpecificInput returns the AddDisksProviderSpecificInput content of the underlying type. - GetAddDisksProviderSpecificInput() *AddDisksProviderSpecificInput -} - -// AddDisksProviderSpecificInput - Add Disks provider specific input. -type AddDisksProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetAddDisksProviderSpecificInput implements the AddDisksProviderSpecificInputClassification interface for type AddDisksProviderSpecificInput. -func (a *AddDisksProviderSpecificInput) GetAddDisksProviderSpecificInput() *AddDisksProviderSpecificInput { - return a -} - -// AddRecoveryServicesProviderInput - Input required to add a provider. -type AddRecoveryServicesProviderInput struct { - // REQUIRED; The properties of an add provider request. - Properties *AddRecoveryServicesProviderInputProperties `json:"properties,omitempty"` -} - -// AddRecoveryServicesProviderInputProperties - The properties of an add provider request. -type AddRecoveryServicesProviderInputProperties struct { - // REQUIRED; The identity provider input for DRA authentication. - AuthenticationIdentityInput *IdentityProviderInput `json:"authenticationIdentityInput,omitempty"` - - // REQUIRED; The name of the machine where the provider is getting added. - MachineName *string `json:"machineName,omitempty"` - - // REQUIRED; The identity provider input for resource access. - ResourceAccessIdentityInput *IdentityProviderInput `json:"resourceAccessIdentityInput,omitempty"` - - // The Bios Id of the machine. - BiosID *string `json:"biosId,omitempty"` - - // The identity provider input for data plane authentication. - DataPlaneAuthenticationIdentityInput *IdentityProviderInput `json:"dataPlaneAuthenticationIdentityInput,omitempty"` - - // The Id of the machine where the provider is getting added. - MachineID *string `json:"machineId,omitempty"` -} - -// AddVCenterRequest - Input required to add vCenter. -type AddVCenterRequest struct { - // The properties of an add vCenter request. - Properties *AddVCenterRequestProperties `json:"properties,omitempty"` -} - -// AddVCenterRequestProperties - The properties of an add vCenter request. -type AddVCenterRequestProperties struct { - // The friendly name of the vCenter. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The IP address of the vCenter to be discovered. - IPAddress *string `json:"ipAddress,omitempty"` - - // The port number for discovery. - Port *string `json:"port,omitempty"` - - // The process server Id from where the discovery is orchestrated. - ProcessServerID *string `json:"processServerId,omitempty"` - - // The account Id which has privileges to discover the vCenter. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` -} - -// AgentDetails - Agent details. -type AgentDetails struct { - // READ-ONLY; The Id of the agent running on the server. - AgentID *string `json:"agentId,omitempty" azure:"ro"` - - // READ-ONLY; The machine BIOS Id. - BiosID *string `json:"biosId,omitempty" azure:"ro"` - - // READ-ONLY; The disks. - Disks []*AgentDiskDetails `json:"disks,omitempty" azure:"ro"` - - // READ-ONLY; The machine FQDN. - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - - // READ-ONLY; The Id of the machine to which the agent is registered. - MachineID *string `json:"machineId,omitempty" azure:"ro"` -} - -// AgentDiskDetails - Agent disk details. -type AgentDiskDetails struct { - // READ-ONLY; The disk capacity in bytes. - CapacityInBytes *int64 `json:"capacityInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The disk Id. - DiskID *string `json:"diskId,omitempty" azure:"ro"` - - // READ-ONLY; The disk name. - DiskName *string `json:"diskName,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether the disk is the OS disk. - IsOSDisk *string `json:"isOSDisk,omitempty" azure:"ro"` - - // READ-ONLY; The lun of disk. - LunID *int32 `json:"lunId,omitempty" azure:"ro"` -} - -// Alert - Implements the Alert class. -type Alert struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // Alert related data. - Properties *AlertProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// AlertCollection - Collection of alerts. -type AlertCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The list of alerts. - Value []*Alert `json:"value,omitempty"` -} - -// AlertProperties - The properties of an alert. -type AlertProperties struct { - // The custom email address for sending emails. - CustomEmailAddresses []*string `json:"customEmailAddresses,omitempty"` - - // The locale for the email notification. - Locale *string `json:"locale,omitempty"` - - // A value indicating whether to send email to subscription administrator. - SendToOwners *string `json:"sendToOwners,omitempty"` -} - -// ApplianceCollection - Collection of appliance details. -type ApplianceCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The appliance details. - Value []*ReplicationAppliance `json:"value,omitempty"` -} - -// ApplianceQueryParameter - Query parameter to get appliance. -type ApplianceQueryParameter struct { - // The providerType to be used for fetching appliance details. - ProviderType *string `json:"providerType,omitempty"` -} - -// ApplianceSpecificDetailsClassification provides polymorphic access to related types. -// Call the interface's GetApplianceSpecificDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ApplianceSpecificDetails, *InMageRcmApplianceSpecificDetails -type ApplianceSpecificDetailsClassification interface { - // GetApplianceSpecificDetails returns the ApplianceSpecificDetails content of the underlying type. - GetApplianceSpecificDetails() *ApplianceSpecificDetails -} - -// ApplianceSpecificDetails - Appliance specific details. -type ApplianceSpecificDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetApplianceSpecificDetails implements the ApplianceSpecificDetailsClassification interface for type ApplianceSpecificDetails. -func (a *ApplianceSpecificDetails) GetApplianceSpecificDetails() *ApplianceSpecificDetails { return a } - -// ApplyRecoveryPointInput - Input to apply recovery point. -type ApplyRecoveryPointInput struct { - // REQUIRED; The input properties to apply recovery point. - Properties *ApplyRecoveryPointInputProperties `json:"properties,omitempty"` -} - -// ApplyRecoveryPointInputProperties - Input properties to apply recovery point. -type ApplyRecoveryPointInputProperties struct { - // REQUIRED; Provider specific input for applying recovery point. - ProviderSpecificDetails ApplyRecoveryPointProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` - - // The recovery point Id. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` -} - -// ApplyRecoveryPointProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetApplyRecoveryPointProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AApplyRecoveryPointInput, *A2ACrossClusterMigrationApplyRecoveryPointInput, *ApplyRecoveryPointProviderSpecificInput, -// - *HyperVReplicaAzureApplyRecoveryPointInput, *InMageAzureV2ApplyRecoveryPointInput, *InMageRcmApplyRecoveryPointInput -type ApplyRecoveryPointProviderSpecificInputClassification interface { - // GetApplyRecoveryPointProviderSpecificInput returns the ApplyRecoveryPointProviderSpecificInput content of the underlying type. - GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput -} - -// ApplyRecoveryPointProviderSpecificInput - Provider specific input for apply recovery point. -type ApplyRecoveryPointProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface -// for type ApplyRecoveryPointProviderSpecificInput. -func (a *ApplyRecoveryPointProviderSpecificInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { - return a -} - -// AsrJobDetails - This class represents job details based on specific job type. -type AsrJobDetails struct { - // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). - InstanceType *string `json:"instanceType,omitempty"` - - // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow - // object details. - AffectedObjectDetails map[string]*string `json:"affectedObjectDetails,omitempty"` -} - -// GetJobDetails implements the JobDetailsClassification interface for type AsrJobDetails. -func (a *AsrJobDetails) GetJobDetails() *JobDetails { - return &JobDetails{ - InstanceType: a.InstanceType, - AffectedObjectDetails: a.AffectedObjectDetails, - } -} - -// AutomationRunbookTaskDetails - This class represents the task details for an automation runbook. -type AutomationRunbookTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // The automation account name of the runbook. - AccountName *string `json:"accountName,omitempty"` - - // The cloud service of the automation runbook account. - CloudServiceName *string `json:"cloudServiceName,omitempty"` - - // A value indicating whether it is a primary side script or not. - IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` - - // The job Id of the runbook execution. - JobID *string `json:"jobId,omitempty"` - - // The execution output of the runbook. - JobOutput *string `json:"jobOutput,omitempty"` - - // The recovery plan task name. - Name *string `json:"name,omitempty"` - - // The runbook Id. - RunbookID *string `json:"runbookId,omitempty"` - - // The runbook name. - RunbookName *string `json:"runbookName,omitempty"` - - // The subscription Id of the automation runbook account. - SubscriptionID *string `json:"subscriptionId,omitempty"` -} - -// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type AutomationRunbookTaskDetails. -func (a *AutomationRunbookTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { - return &TaskTypeDetails{ - InstanceType: a.InstanceType, - } -} - -// AzureFabricCreationInput - Fabric provider specific settings. -type AzureFabricCreationInput struct { - // REQUIRED; Gets the class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The Location. - Location *string `json:"location,omitempty"` -} - -// GetFabricSpecificCreationInput implements the FabricSpecificCreationInputClassification interface for type AzureFabricCreationInput. -func (a *AzureFabricCreationInput) GetFabricSpecificCreationInput() *FabricSpecificCreationInput { - return &FabricSpecificCreationInput{ - InstanceType: a.InstanceType, - } -} - -// AzureFabricSpecificDetails - Azure Fabric Specific Details. -type AzureFabricSpecificDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The container Ids for the Azure fabric. - ContainerIDs []*string `json:"containerIds,omitempty"` - - // The ExtendedLocations. - ExtendedLocations []*A2AExtendedLocationDetails `json:"extendedLocations,omitempty"` - - // The Location for the Azure fabric. - Location *string `json:"location,omitempty"` - - // The zones. - Zones []*A2AZoneDetails `json:"zones,omitempty"` -} - -// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type AzureFabricSpecificDetails. -func (a *AzureFabricSpecificDetails) GetFabricSpecificDetails() *FabricSpecificDetails { - return &FabricSpecificDetails{ - InstanceType: a.InstanceType, - } -} - -// AzureToAzureCreateNetworkMappingInput - Create network mappings input properties/behavior specific to Azure to Azure Network -// mapping. -type AzureToAzureCreateNetworkMappingInput struct { - // REQUIRED; The instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The primary azure vnet Id. - PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` -} - -// GetFabricSpecificCreateNetworkMappingInput implements the FabricSpecificCreateNetworkMappingInputClassification interface -// for type AzureToAzureCreateNetworkMappingInput. -func (a *AzureToAzureCreateNetworkMappingInput) GetFabricSpecificCreateNetworkMappingInput() *FabricSpecificCreateNetworkMappingInput { - return &FabricSpecificCreateNetworkMappingInput{ - InstanceType: a.InstanceType, - } -} - -// AzureToAzureNetworkMappingSettings - A2A Network Mapping fabric specific settings. -type AzureToAzureNetworkMappingSettings struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // The primary fabric location. - PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` - - // The recovery fabric location. - RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` -} - -// GetNetworkMappingFabricSpecificSettings implements the NetworkMappingFabricSpecificSettingsClassification interface for -// type AzureToAzureNetworkMappingSettings. -func (a *AzureToAzureNetworkMappingSettings) GetNetworkMappingFabricSpecificSettings() *NetworkMappingFabricSpecificSettings { - return &NetworkMappingFabricSpecificSettings{ - InstanceType: a.InstanceType, - } -} - -// AzureToAzureUpdateNetworkMappingInput - Updates network mappings input. -type AzureToAzureUpdateNetworkMappingInput struct { - // REQUIRED; The instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // The primary azure vnet Id. - PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` -} - -// GetFabricSpecificUpdateNetworkMappingInput implements the FabricSpecificUpdateNetworkMappingInputClassification interface -// for type AzureToAzureUpdateNetworkMappingInput. -func (a *AzureToAzureUpdateNetworkMappingInput) GetFabricSpecificUpdateNetworkMappingInput() *FabricSpecificUpdateNetworkMappingInput { - return &FabricSpecificUpdateNetworkMappingInput{ - InstanceType: a.InstanceType, - } -} - -// AzureToAzureVMSyncedConfigDetails - Azure to Azure VM synced configuration details. -type AzureToAzureVMSyncedConfigDetails struct { - // The Azure VM input endpoints. - InputEndpoints []*InputEndpoint `json:"inputEndpoints,omitempty"` - - // The Azure VM tags. - Tags map[string]*string `json:"tags,omitempty"` -} - -// AzureVMDiskDetails - Disk details for E2A provider. -type AzureVMDiskDetails struct { - // The custom target Azure disk name. - CustomTargetDiskName *string `json:"customTargetDiskName,omitempty"` - - // The DiskEncryptionSet ARM ID. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - - // The disk resource id. - DiskID *string `json:"diskId,omitempty"` - - // Ordinal\LunId of the disk for the Azure VM. - LunID *string `json:"lunId,omitempty"` - - // Max side in MB. - MaxSizeMB *string `json:"maxSizeMB,omitempty"` - - // Blob uri of the Azure disk. - TargetDiskLocation *string `json:"targetDiskLocation,omitempty"` - - // The target Azure disk name. - TargetDiskName *string `json:"targetDiskName,omitempty"` - - // The VHD id. - VhdID *string `json:"vhdId,omitempty"` - - // VHD name. - VhdName *string `json:"vhdName,omitempty"` - - // VHD type. - VhdType *string `json:"vhdType,omitempty"` -} - -// ComputeSizeErrorDetails - Represents the error used to indicate why the target compute size is not applicable. -type ComputeSizeErrorDetails struct { - // The error message. - Message *string `json:"message,omitempty"` - - // The severity of the error. - Severity *string `json:"severity,omitempty"` -} - -// ConfigurationSettingsClassification provides polymorphic access to related types. -// Call the interface's GetConfigurationSettings() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ConfigurationSettings, *HyperVVirtualMachineDetails, *ReplicationGroupDetails, *VMwareVirtualMachineDetails, *VmmVirtualMachineDetails -type ConfigurationSettingsClassification interface { - // GetConfigurationSettings returns the ConfigurationSettings content of the underlying type. - GetConfigurationSettings() *ConfigurationSettings -} - -// ConfigurationSettings - Replication provider specific settings. -type ConfigurationSettings struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetConfigurationSettings implements the ConfigurationSettingsClassification interface for type ConfigurationSettings. -func (c *ConfigurationSettings) GetConfigurationSettings() *ConfigurationSettings { return c } - -// ConfigureAlertRequest - Request to configure alerts for the system. -type ConfigureAlertRequest struct { - // The properties of a configure alert request. - Properties *ConfigureAlertRequestProperties `json:"properties,omitempty"` -} - -// ConfigureAlertRequestProperties - Properties of a configure alert request. -type ConfigureAlertRequestProperties struct { - // The custom email address for sending emails. - CustomEmailAddresses []*string `json:"customEmailAddresses,omitempty"` - - // The locale for the email notification. - Locale *string `json:"locale,omitempty"` - - // A value indicating whether to send email to subscription administrator. - SendToOwners *string `json:"sendToOwners,omitempty"` -} - -// ConsistencyCheckTaskDetails - This class contains monitoring details of all the inconsistent Protected Entities in Vmm. -type ConsistencyCheckTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // The list of inconsistent Vm details. - VMDetails []*InconsistentVMDetails `json:"vmDetails,omitempty"` -} - -// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type ConsistencyCheckTaskDetails. -func (c *ConsistencyCheckTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { - return &TaskTypeDetails{ - InstanceType: c.InstanceType, - } -} - -// CreateNetworkMappingInput - Create network mappings input. -type CreateNetworkMappingInput struct { - // REQUIRED; Input properties for creating network mapping. - Properties *CreateNetworkMappingInputProperties `json:"properties,omitempty"` -} - -// CreateNetworkMappingInputProperties - Common input details for network mapping operation. -type CreateNetworkMappingInputProperties struct { - // REQUIRED; Recovery network Id. - RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` - - // Fabric specific input properties. - FabricSpecificDetails FabricSpecificCreateNetworkMappingInputClassification `json:"fabricSpecificDetails,omitempty"` - - // Recovery fabric Name. - RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` -} - -// CreatePolicyInput - Protection Policy input. -type CreatePolicyInput struct { - // Policy creation properties. - Properties *CreatePolicyInputProperties `json:"properties,omitempty"` -} - -// CreatePolicyInputProperties - Policy creation properties. -type CreatePolicyInputProperties struct { - // The ReplicationProviderSettings. - ProviderSpecificInput PolicyProviderSpecificInputClassification `json:"providerSpecificInput,omitempty"` -} - -// CreateProtectionContainerInput - Create protection container input. -type CreateProtectionContainerInput struct { - // Create protection container input properties. - Properties *CreateProtectionContainerInputProperties `json:"properties,omitempty"` -} - -// CreateProtectionContainerInputProperties - Create protection container input properties. -type CreateProtectionContainerInputProperties struct { - // Provider specific inputs for container creation. - ProviderSpecificInput []ReplicationProviderSpecificContainerCreationInputClassification `json:"providerSpecificInput,omitempty"` -} - -// CreateProtectionContainerMappingInput - Configure pairing input. -type CreateProtectionContainerMappingInput struct { - // Configure protection input properties. - Properties *CreateProtectionContainerMappingInputProperties `json:"properties,omitempty"` -} - -// CreateProtectionContainerMappingInputProperties - Configure pairing input properties. -type CreateProtectionContainerMappingInputProperties struct { - // Applicable policy. - PolicyID *string `json:"policyId,omitempty"` - - // Provider specific input for pairing. - ProviderSpecificInput ReplicationProviderSpecificContainerMappingInputClassification `json:"providerSpecificInput,omitempty"` - - // The target unique protection container name. - TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"` -} - -// CreateProtectionIntentInput - Create protection intent input. -type CreateProtectionIntentInput struct { - // Create protection intent input properties. - Properties *CreateProtectionIntentProperties `json:"properties,omitempty"` -} - -// CreateProtectionIntentProperties - Create protection intent input properties. -type CreateProtectionIntentProperties struct { - // The ReplicationProviderInput. For A2A provider, it will be A2ACreateProtectionIntentInput object. - ProviderSpecificDetails CreateProtectionIntentProviderSpecificDetailsClassification `json:"providerSpecificDetails,omitempty"` -} - -// CreateProtectionIntentProviderSpecificDetailsClassification provides polymorphic access to related types. -// Call the interface's GetCreateProtectionIntentProviderSpecificDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2ACreateProtectionIntentInput, *CreateProtectionIntentProviderSpecificDetails -type CreateProtectionIntentProviderSpecificDetailsClassification interface { - // GetCreateProtectionIntentProviderSpecificDetails returns the CreateProtectionIntentProviderSpecificDetails content of the underlying type. - GetCreateProtectionIntentProviderSpecificDetails() *CreateProtectionIntentProviderSpecificDetails -} - -// CreateProtectionIntentProviderSpecificDetails - Create protection intent provider specific input. -type CreateProtectionIntentProviderSpecificDetails struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetCreateProtectionIntentProviderSpecificDetails implements the CreateProtectionIntentProviderSpecificDetailsClassification -// interface for type CreateProtectionIntentProviderSpecificDetails. -func (c *CreateProtectionIntentProviderSpecificDetails) GetCreateProtectionIntentProviderSpecificDetails() *CreateProtectionIntentProviderSpecificDetails { - return c -} - -// CreateRecoveryPlanInput - Create recovery plan input class. -type CreateRecoveryPlanInput struct { - // REQUIRED; Recovery plan creation properties. - Properties *CreateRecoveryPlanInputProperties `json:"properties,omitempty"` -} - -// CreateRecoveryPlanInputProperties - Recovery plan creation properties. -type CreateRecoveryPlanInputProperties struct { - // REQUIRED; The recovery plan groups. - Groups []*RecoveryPlanGroup `json:"groups,omitempty"` - - // REQUIRED; The primary fabric Id. - PrimaryFabricID *string `json:"primaryFabricId,omitempty"` - - // REQUIRED; The recovery fabric Id. - RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` - - // The failover deployment model. - FailoverDeploymentModel *FailoverDeploymentModel `json:"failoverDeploymentModel,omitempty"` - - // The provider specific input. - ProviderSpecificInput []RecoveryPlanProviderSpecificInputClassification `json:"providerSpecificInput,omitempty"` -} - -// CriticalJobHistoryDetails - Critical past job details of the migration item. -type CriticalJobHistoryDetails struct { - // READ-ONLY; The ARM Id of the job being executed. - JobID *string `json:"jobId,omitempty" azure:"ro"` - - // READ-ONLY; The job name. - JobName *string `json:"jobName,omitempty" azure:"ro"` - - // READ-ONLY; The job state. - JobStatus *string `json:"jobStatus,omitempty" azure:"ro"` - - // READ-ONLY; The start time of the job. - StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` -} - -// CurrentJobDetails - Current job details of the migration item. -type CurrentJobDetails struct { - // READ-ONLY; The ARM Id of the job being executed. - JobID *string `json:"jobId,omitempty" azure:"ro"` - - // READ-ONLY; The job name. - JobName *string `json:"jobName,omitempty" azure:"ro"` - - // READ-ONLY; The start time of the job. - StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` -} - -// CurrentScenarioDetails - Current scenario details of the protected entity. -type CurrentScenarioDetails struct { - // ARM Id of the job being executed. - JobID *string `json:"jobId,omitempty"` - - // Scenario name. - ScenarioName *string `json:"scenarioName,omitempty"` - - // Start time of the workflow. - StartTime *time.Time `json:"startTime,omitempty"` -} - -// DataStore - The datastore details of the MT. -type DataStore struct { - // The capacity of data store in GBs. - Capacity *string `json:"capacity,omitempty"` - - // The free space of data store in GBs. - FreeSpace *string `json:"freeSpace,omitempty"` - - // The symbolic name of data store. - SymbolicName *string `json:"symbolicName,omitempty"` - - // The type of data store. - Type *string `json:"type,omitempty"` - - // The uuid of data store. - UUID *string `json:"uuid,omitempty"` -} - -// DisableProtectionInput - Disable protection input. -type DisableProtectionInput struct { - // REQUIRED; Disable protection input properties. - Properties *DisableProtectionInputProperties `json:"properties,omitempty"` -} - -// DisableProtectionInputProperties - Disable protection input properties. -type DisableProtectionInputProperties struct { - // Disable protection reason. It can have values NotSpecified/MigrationComplete. - DisableProtectionReason *DisableProtectionReason `json:"disableProtectionReason,omitempty"` - - // Replication provider specific input. - ReplicationProviderInput DisableProtectionProviderSpecificInputClassification `json:"replicationProviderInput,omitempty"` -} - -// DisableProtectionProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetDisableProtectionProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *DisableProtectionProviderSpecificInput, *InMageDisableProtectionProviderSpecificInput -type DisableProtectionProviderSpecificInputClassification interface { - // GetDisableProtectionProviderSpecificInput returns the DisableProtectionProviderSpecificInput content of the underlying type. - GetDisableProtectionProviderSpecificInput() *DisableProtectionProviderSpecificInput -} - -// DisableProtectionProviderSpecificInput - Disable protection provider specific input. -type DisableProtectionProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetDisableProtectionProviderSpecificInput implements the DisableProtectionProviderSpecificInputClassification interface -// for type DisableProtectionProviderSpecificInput. -func (d *DisableProtectionProviderSpecificInput) GetDisableProtectionProviderSpecificInput() *DisableProtectionProviderSpecificInput { - return d -} - -// DiscoverProtectableItemRequest - Request to add a physical machine as a protectable item in a container. -type DiscoverProtectableItemRequest struct { - // The properties of a discover protectable item request. - Properties *DiscoverProtectableItemRequestProperties `json:"properties,omitempty"` -} - -// DiscoverProtectableItemRequestProperties - Discover protectable item properties. -type DiscoverProtectableItemRequestProperties struct { - // The friendly name of the physical machine. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The IP address of the physical machine to be discovered. - IPAddress *string `json:"ipAddress,omitempty"` - - // The OS type on the physical machine. - OSType *string `json:"osType,omitempty"` -} - -// DiskDetails - Onprem disk details data. -type DiskDetails struct { - // The hard disk max size in MB. - MaxSizeMB *int64 `json:"maxSizeMB,omitempty"` - - // The VHD Id. - VhdID *string `json:"vhdId,omitempty"` - - // The VHD name. - VhdName *string `json:"vhdName,omitempty"` - - // The type of the volume. - VhdType *string `json:"vhdType,omitempty"` -} - -// DiskEncryptionInfo - Recovery disk encryption info (BEK and KEK). -type DiskEncryptionInfo struct { - // The recovery KeyVault reference for secret. - DiskEncryptionKeyInfo *DiskEncryptionKeyInfo `json:"diskEncryptionKeyInfo,omitempty"` - - // The recovery KeyVault reference for key. - KeyEncryptionKeyInfo *KeyEncryptionKeyInfo `json:"keyEncryptionKeyInfo,omitempty"` -} - -// DiskEncryptionKeyInfo - Disk Encryption Key Information (BitLocker Encryption Key (BEK) on Windows). -type DiskEncryptionKeyInfo struct { - // The KeyVault resource ARM id for secret. - KeyVaultResourceArmID *string `json:"keyVaultResourceArmId,omitempty"` - - // The secret url / identifier. - SecretIdentifier *string `json:"secretIdentifier,omitempty"` -} - -// DiskVolumeDetails - Volume details. -type DiskVolumeDetails struct { - // The volume label. - Label *string `json:"label,omitempty"` - - // The volume name. - Name *string `json:"name,omitempty"` -} - -// Display - Contains the localized display information for this particular operation / action. These value will be used by -// several clients for (1) custom role definitions for RBAC; (2) complex query filters for -// the event service; and (3) audit history / records for management operations. -type Display struct { - // The description. The localized friendly description for the operation, as it should be shown to the user. It should be - // thorough, yet concise - it will be used in tool tips and detailed views. - // Prescriptive guidance for namespaces: Read any 'display.provider' resource Create or Update any 'display.provider' resource - // Delete any 'display.provider' resource Perform any other action on any - // 'display.provider' resource Prescriptive guidance for namespaces: Read any 'display.resource' Create or Update any 'display.resource' - // Delete any 'display.resource' 'ActionName' any - // 'display.resources'. - Description *string `json:"description,omitempty"` - - // The operation. The localized friendly name for the operation, as it should be shown to the user. It should be concise (to - // fit in drop downs) but clear (i.e. self-documenting). It should use Title - // Casing. Prescriptive guidance: Read Create or Update Delete 'ActionName'. - Operation *string `json:"operation,omitempty"` - - // The provider. The localized friendly form of the resource provider name - it is expected to also include the publisher/company - // responsible. It should use Title Casing and begin with "Microsoft" for - // 1st party services. e.g. "Microsoft Monitoring Insights" or "Microsoft Compute.". - Provider *string `json:"provider,omitempty"` - - // The resource. The localized friendly form of the resource related to this action/operation - it should match the public - // documentation for the resource provider. It should use Title Casing. This value - // should be unique for a particular URL type (e.g. nested types should not reuse their parent's display.resource field). - // e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual Machine VM - // Sizes" or "Scheduler Jobs". - Resource *string `json:"resource,omitempty"` -} - -// DraDetails - DRA details. -type DraDetails struct { - // READ-ONLY; The DRA Bios Id. - BiosID *string `json:"biosId,omitempty" azure:"ro"` - - // READ-ONLY; The count of protected items which are protected in forward direction. - ForwardProtectedItemCount *int32 `json:"forwardProtectedItemCount,omitempty" azure:"ro"` - - // READ-ONLY; The health. - Health *ProtectionHealth `json:"health,omitempty" azure:"ro"` - - // READ-ONLY; The health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty" azure:"ro"` - - // READ-ONLY; The DRA Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The last heartbeat received from the DRA. - LastHeartbeatUTC *time.Time `json:"lastHeartbeatUtc,omitempty" azure:"ro"` - - // READ-ONLY; The DRA name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The count of protected items which are protected in reverse direction. - ReverseProtectedItemCount *int32 `json:"reverseProtectedItemCount,omitempty" azure:"ro"` - - // READ-ONLY; The version. - Version *string `json:"version,omitempty" azure:"ro"` -} - -// EnableMigrationInput - Enable migration input. -type EnableMigrationInput struct { - // REQUIRED; Enable migration input properties. - Properties *EnableMigrationInputProperties `json:"properties,omitempty"` -} - -// EnableMigrationInputProperties - Enable migration input properties. -type EnableMigrationInputProperties struct { - // REQUIRED; The policy Id. - PolicyID *string `json:"policyId,omitempty"` - - // REQUIRED; The provider specific details. - ProviderSpecificDetails EnableMigrationProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// EnableMigrationProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetEnableMigrationProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EnableMigrationProviderSpecificInput, *VMwareCbtEnableMigrationInput -type EnableMigrationProviderSpecificInputClassification interface { - // GetEnableMigrationProviderSpecificInput returns the EnableMigrationProviderSpecificInput content of the underlying type. - GetEnableMigrationProviderSpecificInput() *EnableMigrationProviderSpecificInput -} - -// EnableMigrationProviderSpecificInput - Enable migration provider specific input. -type EnableMigrationProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetEnableMigrationProviderSpecificInput implements the EnableMigrationProviderSpecificInputClassification interface for -// type EnableMigrationProviderSpecificInput. -func (e *EnableMigrationProviderSpecificInput) GetEnableMigrationProviderSpecificInput() *EnableMigrationProviderSpecificInput { - return e -} - -// EnableProtectionInput - Enable protection input. -type EnableProtectionInput struct { - // Enable protection input properties. - Properties *EnableProtectionInputProperties `json:"properties,omitempty"` -} - -// EnableProtectionInputProperties - Enable protection input properties. -type EnableProtectionInputProperties struct { - // The Policy Id. - PolicyID *string `json:"policyId,omitempty"` - - // The protectable item Id. - ProtectableItemID *string `json:"protectableItemId,omitempty"` - - // The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, - // it will be SanEnableProtectionInput object. For HyperVReplicaAzure - // provider, it can be null. - ProviderSpecificDetails EnableProtectionProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// EnableProtectionProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetEnableProtectionProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2ACrossClusterMigrationEnableProtectionInput, *A2AEnableProtectionInput, *EnableProtectionProviderSpecificInput, *HyperVReplicaAzureEnableProtectionInput, -// - *InMageAzureV2EnableProtectionInput, *InMageEnableProtectionInput, *InMageRcmEnableProtectionInput -type EnableProtectionProviderSpecificInputClassification interface { - // GetEnableProtectionProviderSpecificInput returns the EnableProtectionProviderSpecificInput content of the underlying type. - GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput -} - -// EnableProtectionProviderSpecificInput - Enable protection provider specific input. -type EnableProtectionProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for -// type EnableProtectionProviderSpecificInput. -func (e *EnableProtectionProviderSpecificInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { - return e -} - -// EncryptionDetails - Encryption details for the fabric. -type EncryptionDetails struct { - // The key encryption key certificate expiry date. - KekCertExpiryDate *time.Time `json:"kekCertExpiryDate,omitempty"` - - // The key encryption key certificate thumbprint. - KekCertThumbprint *string `json:"kekCertThumbprint,omitempty"` - - // The key encryption key state for the Vmm. - KekState *string `json:"kekState,omitempty"` -} - -// Event - Implements the Event class. -type Event struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // Event related data. - Properties *EventProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// EventCollection - Collection of fabric details. -type EventCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The list of events. - Value []*Event `json:"value,omitempty"` -} - -// EventProperties - The properties of a monitoring event. -type EventProperties struct { - // The affected object correlationId for the event. - AffectedObjectCorrelationID *string `json:"affectedObjectCorrelationId,omitempty"` - - // The friendly name of the source of the event on which it is raised (for example, VM, VMM etc). - AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` - - // The event name. - Description *string `json:"description,omitempty"` - - // The Id of the monitoring event. - EventCode *string `json:"eventCode,omitempty"` - - // The event specific settings. - EventSpecificDetails EventSpecificDetailsClassification `json:"eventSpecificDetails,omitempty"` - - // The type of the event. for example: VM Health, Server Health, Job Failure etc. - EventType *string `json:"eventType,omitempty"` - - // The ARM ID of the fabric. - FabricID *string `json:"fabricId,omitempty"` - - // The list of errors / warnings capturing details associated with the issue(s). - HealthErrors []*HealthError `json:"healthErrors,omitempty"` - - // The provider specific settings. - ProviderSpecificDetails EventProviderSpecificDetailsClassification `json:"providerSpecificDetails,omitempty"` - - // The severity of the event. - Severity *string `json:"severity,omitempty"` - - // The time of occurrence of the event. - TimeOfOccurrence *time.Time `json:"timeOfOccurrence,omitempty"` -} - -// EventProviderSpecificDetailsClassification provides polymorphic access to related types. -// Call the interface's GetEventProviderSpecificDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AEventDetails, *EventProviderSpecificDetails, *HyperVReplica2012EventDetails, *HyperVReplica2012R2EventDetails, *HyperVReplicaAzureEventDetails, -// - *HyperVReplicaBaseEventDetails, *InMageAzureV2EventDetails, *InMageRcmEventDetails, *InMageRcmFailbackEventDetails, *VMwareCbtEventDetails -type EventProviderSpecificDetailsClassification interface { - // GetEventProviderSpecificDetails returns the EventProviderSpecificDetails content of the underlying type. - GetEventProviderSpecificDetails() *EventProviderSpecificDetails -} - -// EventProviderSpecificDetails - Model class for provider specific details for an event. -type EventProviderSpecificDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type EventProviderSpecificDetails. -func (e *EventProviderSpecificDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { - return e -} - -// EventQueryParameter - Implements the event query parameter. -type EventQueryParameter struct { - // The affected object correlationId for the events to be queried. - AffectedObjectCorrelationID *string `json:"affectedObjectCorrelationId,omitempty"` - - // The affected object name of the events to be queried. - AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` - - // The end time of the time range within which the events are to be queried. - EndTime *time.Time `json:"endTime,omitempty"` - - // The source id of the events to be queried. - EventCode *string `json:"eventCode,omitempty"` - - // The type of the events to be queried. - EventType *string `json:"eventType,omitempty"` - - // The affected object server id of the events to be queried. - FabricName *string `json:"fabricName,omitempty"` - - // The severity of the events to be queried. - Severity *string `json:"severity,omitempty"` - - // The start time of the time range within which the events are to be queried. - StartTime *time.Time `json:"startTime,omitempty"` -} - -// EventSpecificDetailsClassification provides polymorphic access to related types. -// Call the interface's GetEventSpecificDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EventSpecificDetails, *JobStatusEventDetails -type EventSpecificDetailsClassification interface { - // GetEventSpecificDetails returns the EventSpecificDetails content of the underlying type. - GetEventSpecificDetails() *EventSpecificDetails -} - -// EventSpecificDetails - Model class for event specific details for an event. -type EventSpecificDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetEventSpecificDetails implements the EventSpecificDetailsClassification interface for type EventSpecificDetails. -func (e *EventSpecificDetails) GetEventSpecificDetails() *EventSpecificDetails { return e } - -// ExistingProtectionProfile - Existing storage account input. -type ExistingProtectionProfile struct { - // REQUIRED; The protection profile Arm Id. Throw error, if resource does not exists. - ProtectionProfileID *string `json:"protectionProfileId,omitempty"` - - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` -} - -// GetProtectionProfileCustomDetails implements the ProtectionProfileCustomDetailsClassification interface for type ExistingProtectionProfile. -func (e *ExistingProtectionProfile) GetProtectionProfileCustomDetails() *ProtectionProfileCustomDetails { - return &ProtectionProfileCustomDetails{ - ResourceType: e.ResourceType, - } -} - -// ExistingRecoveryAvailabilitySet - Existing recovery availability set input. -type ExistingRecoveryAvailabilitySet struct { - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` - - // The recovery availability set Id. Will throw error, if resource does not exist. - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` -} - -// GetRecoveryAvailabilitySetCustomDetails implements the RecoveryAvailabilitySetCustomDetailsClassification interface for -// type ExistingRecoveryAvailabilitySet. -func (e *ExistingRecoveryAvailabilitySet) GetRecoveryAvailabilitySetCustomDetails() *RecoveryAvailabilitySetCustomDetails { - return &RecoveryAvailabilitySetCustomDetails{ - ResourceType: e.ResourceType, - } -} - -// ExistingRecoveryProximityPlacementGroup - Existing recovery proximity placement group input. -type ExistingRecoveryProximityPlacementGroup struct { - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` - - // The recovery proximity placement group Id. Will throw error, if resource does not exist. - RecoveryProximityPlacementGroupID *string `json:"recoveryProximityPlacementGroupId,omitempty"` -} - -// GetRecoveryProximityPlacementGroupCustomDetails implements the RecoveryProximityPlacementGroupCustomDetailsClassification -// interface for type ExistingRecoveryProximityPlacementGroup. -func (e *ExistingRecoveryProximityPlacementGroup) GetRecoveryProximityPlacementGroupCustomDetails() *RecoveryProximityPlacementGroupCustomDetails { - return &RecoveryProximityPlacementGroupCustomDetails{ - ResourceType: e.ResourceType, - } -} - -// ExistingRecoveryResourceGroup - Existing recovery resource group input. -type ExistingRecoveryResourceGroup struct { - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` - - // The recovery resource group Id. Valid for V2 scenarios. - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` -} - -// GetRecoveryResourceGroupCustomDetails implements the RecoveryResourceGroupCustomDetailsClassification interface for type -// ExistingRecoveryResourceGroup. -func (e *ExistingRecoveryResourceGroup) GetRecoveryResourceGroupCustomDetails() *RecoveryResourceGroupCustomDetails { - return &RecoveryResourceGroupCustomDetails{ - ResourceType: e.ResourceType, - } -} - -// ExistingRecoveryVirtualNetwork - Existing recovery virtual network input. -type ExistingRecoveryVirtualNetwork struct { - // REQUIRED; The recovery virtual network Id. Will throw error, if resource does not exist. - RecoveryVirtualNetworkID *string `json:"recoveryVirtualNetworkId,omitempty"` - - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` - - // The recovery subnet name. - RecoverySubnetName *string `json:"recoverySubnetName,omitempty"` -} - -// GetRecoveryVirtualNetworkCustomDetails implements the RecoveryVirtualNetworkCustomDetailsClassification interface for type -// ExistingRecoveryVirtualNetwork. -func (e *ExistingRecoveryVirtualNetwork) GetRecoveryVirtualNetworkCustomDetails() *RecoveryVirtualNetworkCustomDetails { - return &RecoveryVirtualNetworkCustomDetails{ - ResourceType: e.ResourceType, - } -} - -// ExistingStorageAccount - Existing storage account input. -type ExistingStorageAccount struct { - // REQUIRED; The storage account Arm Id. Throw error, if resource does not exists. - AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"` - - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` -} - -// GetStorageAccountCustomDetails implements the StorageAccountCustomDetailsClassification interface for type ExistingStorageAccount. -func (e *ExistingStorageAccount) GetStorageAccountCustomDetails() *StorageAccountCustomDetails { - return &StorageAccountCustomDetails{ - ResourceType: e.ResourceType, - } -} - -// ExportJobDetails - This class represents details for export jobs workflow. -type ExportJobDetails struct { - // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). - InstanceType *string `json:"instanceType,omitempty"` - - // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow - // object details. - AffectedObjectDetails map[string]*string `json:"affectedObjectDetails,omitempty"` - - // BlobUri of the exported jobs. - BlobURI *string `json:"blobUri,omitempty"` - - // The sas token to access blob. - SasToken *string `json:"sasToken,omitempty"` -} - -// GetJobDetails implements the JobDetailsClassification interface for type ExportJobDetails. -func (e *ExportJobDetails) GetJobDetails() *JobDetails { - return &JobDetails{ - InstanceType: e.InstanceType, - AffectedObjectDetails: e.AffectedObjectDetails, - } -} - -// ExtendedLocation - Extended location of the resource. -type ExtendedLocation struct { - // REQUIRED; The name of the extended location. - Name *string `json:"name,omitempty"` - - // REQUIRED; The extended location type. - Type *ExtendedLocationType `json:"type,omitempty"` -} - -// Fabric definition. -type Fabric struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // Fabric related data. - Properties *FabricProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// FabricCollection - Collection of fabric details. -type FabricCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The fabric details. - Value []*Fabric `json:"value,omitempty"` -} - -// FabricCreationInput - Site details provided during the time of site creation. -type FabricCreationInput struct { - // Fabric creation input. - Properties *FabricCreationInputProperties `json:"properties,omitempty"` -} - -// FabricCreationInputProperties - Properties of site details provided during the time of site creation. -type FabricCreationInputProperties struct { - // Fabric provider specific creation input. - CustomDetails FabricSpecificCreationInputClassification `json:"customDetails,omitempty"` -} - -// FabricProperties - Fabric properties. -type FabricProperties struct { - // BCDR state of the fabric. - BcdrState *string `json:"bcdrState,omitempty"` - - // Fabric specific settings. - CustomDetails FabricSpecificDetailsClassification `json:"customDetails,omitempty"` - - // Encryption details for the fabric. - EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` - - // Friendly name of the fabric. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Health of fabric. - Health *string `json:"health,omitempty"` - - // Fabric health error details. - HealthErrorDetails []*HealthError `json:"healthErrorDetails,omitempty"` - - // Dra Registration Id. - InternalIdentifier *string `json:"internalIdentifier,omitempty"` - - // Rollover encryption details for the fabric. - RolloverEncryptionDetails *EncryptionDetails `json:"rolloverEncryptionDetails,omitempty"` -} - -// FabricQueryParameter - Query parameter to get fabric. -type FabricQueryParameter struct { - // The BIOS Id to be used for fetching agent details. - BiosID *string `json:"biosId,omitempty"` - - // The type of the discovered machine to be used for fetching agent details. - DiscoveryType *string `json:"discoveryType,omitempty"` - - // A value indicating whether the agent details are to be fetched. - FetchAgentDetails *string `json:"fetchAgentDetails,omitempty"` - - // The FQDN to be used for fetching agent details. - Fqdn *string `json:"fqdn,omitempty"` - - // The OS type to be used for fetching agent details. - OSType *string `json:"osType,omitempty"` - - // A value indicating whether the zone to zone mappings are to be returned. - ZoneToZoneMappings *string `json:"zoneToZoneMappings,omitempty"` -} - -// FabricReplicationGroupTaskDetails - This class represents the fabric replication group task details. -type FabricReplicationGroupTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // The job entity. - JobTask *JobEntity `json:"jobTask,omitempty"` - - // The skipped reason. - SkippedReason *string `json:"skippedReason,omitempty"` - - // The skipped reason string. - SkippedReasonString *string `json:"skippedReasonString,omitempty"` -} - -// GetJobTaskDetails implements the JobTaskDetailsClassification interface for type FabricReplicationGroupTaskDetails. -func (f *FabricReplicationGroupTaskDetails) GetJobTaskDetails() *JobTaskDetails { - return &JobTaskDetails{ - JobTask: f.JobTask, - InstanceType: f.InstanceType, - } -} - -// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type FabricReplicationGroupTaskDetails. -func (f *FabricReplicationGroupTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { - return &TaskTypeDetails{ - InstanceType: f.InstanceType, - } -} - -// FabricSpecificCreateNetworkMappingInputClassification provides polymorphic access to related types. -// Call the interface's GetFabricSpecificCreateNetworkMappingInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureToAzureCreateNetworkMappingInput, *FabricSpecificCreateNetworkMappingInput, *VmmToAzureCreateNetworkMappingInput, -// - *VmmToVmmCreateNetworkMappingInput -type FabricSpecificCreateNetworkMappingInputClassification interface { - // GetFabricSpecificCreateNetworkMappingInput returns the FabricSpecificCreateNetworkMappingInput content of the underlying type. - GetFabricSpecificCreateNetworkMappingInput() *FabricSpecificCreateNetworkMappingInput -} - -// FabricSpecificCreateNetworkMappingInput - Input details specific to fabrics during Network Mapping. -type FabricSpecificCreateNetworkMappingInput struct { - // REQUIRED; The instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetFabricSpecificCreateNetworkMappingInput implements the FabricSpecificCreateNetworkMappingInputClassification interface -// for type FabricSpecificCreateNetworkMappingInput. -func (f *FabricSpecificCreateNetworkMappingInput) GetFabricSpecificCreateNetworkMappingInput() *FabricSpecificCreateNetworkMappingInput { - return f -} - -// FabricSpecificCreationInputClassification provides polymorphic access to related types. -// Call the interface's GetFabricSpecificCreationInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFabricCreationInput, *FabricSpecificCreationInput, *InMageRcmFabricCreationInput, *VMwareV2FabricCreationInput -type FabricSpecificCreationInputClassification interface { - // GetFabricSpecificCreationInput returns the FabricSpecificCreationInput content of the underlying type. - GetFabricSpecificCreationInput() *FabricSpecificCreationInput -} - -// FabricSpecificCreationInput - Fabric provider specific settings. -type FabricSpecificCreationInput struct { - // REQUIRED; Gets the class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetFabricSpecificCreationInput implements the FabricSpecificCreationInputClassification interface for type FabricSpecificCreationInput. -func (f *FabricSpecificCreationInput) GetFabricSpecificCreationInput() *FabricSpecificCreationInput { - return f -} - -// FabricSpecificDetailsClassification provides polymorphic access to related types. -// Call the interface's GetFabricSpecificDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureFabricSpecificDetails, *FabricSpecificDetails, *HyperVSiteDetails, *InMageRcmFabricSpecificDetails, *VMwareDetails, -// - *VMwareV2FabricSpecificDetails, *VmmDetails -type FabricSpecificDetailsClassification interface { - // GetFabricSpecificDetails returns the FabricSpecificDetails content of the underlying type. - GetFabricSpecificDetails() *FabricSpecificDetails -} - -// FabricSpecificDetails - Fabric specific details. -type FabricSpecificDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type FabricSpecificDetails. -func (f *FabricSpecificDetails) GetFabricSpecificDetails() *FabricSpecificDetails { return f } - -// FabricSpecificUpdateNetworkMappingInputClassification provides polymorphic access to related types. -// Call the interface's GetFabricSpecificUpdateNetworkMappingInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureToAzureUpdateNetworkMappingInput, *FabricSpecificUpdateNetworkMappingInput, *VmmToAzureUpdateNetworkMappingInput, -// - *VmmToVmmUpdateNetworkMappingInput -type FabricSpecificUpdateNetworkMappingInputClassification interface { - // GetFabricSpecificUpdateNetworkMappingInput returns the FabricSpecificUpdateNetworkMappingInput content of the underlying type. - GetFabricSpecificUpdateNetworkMappingInput() *FabricSpecificUpdateNetworkMappingInput -} - -// FabricSpecificUpdateNetworkMappingInput - Input details specific to fabrics during Network Mapping. -type FabricSpecificUpdateNetworkMappingInput struct { - // REQUIRED; The instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetFabricSpecificUpdateNetworkMappingInput implements the FabricSpecificUpdateNetworkMappingInputClassification interface -// for type FabricSpecificUpdateNetworkMappingInput. -func (f *FabricSpecificUpdateNetworkMappingInput) GetFabricSpecificUpdateNetworkMappingInput() *FabricSpecificUpdateNetworkMappingInput { - return f -} - -// FailoverJobDetails - This class represents the details for a failover job. -type FailoverJobDetails struct { - // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). - InstanceType *string `json:"instanceType,omitempty"` - - // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow - // object details. - AffectedObjectDetails map[string]*string `json:"affectedObjectDetails,omitempty"` - - // The test VM details. - ProtectedItemDetails []*FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` -} - -// GetJobDetails implements the JobDetailsClassification interface for type FailoverJobDetails. -func (f *FailoverJobDetails) GetJobDetails() *JobDetails { - return &JobDetails{ - InstanceType: f.InstanceType, - AffectedObjectDetails: f.AffectedObjectDetails, - } -} - -// FailoverProcessServerRequest - Request to failover a process server. -type FailoverProcessServerRequest struct { - // The properties of the PS Failover request. - Properties *FailoverProcessServerRequestProperties `json:"properties,omitempty"` -} - -// FailoverProcessServerRequestProperties - The properties of the Failover Process Server request. -type FailoverProcessServerRequestProperties struct { - // The container identifier. - ContainerName *string `json:"containerName,omitempty"` - - // The source process server. - SourceProcessServerID *string `json:"sourceProcessServerId,omitempty"` - - // The new process server. - TargetProcessServerID *string `json:"targetProcessServerId,omitempty"` - - // A value for failover type. It can be systemlevel/serverlevel. - UpdateType *string `json:"updateType,omitempty"` - - // The VMS to migrate. - VMsToMigrate []*string `json:"vmsToMigrate,omitempty"` -} - -// FailoverReplicationProtectedItemDetails - Failover details for a replication protected item. -type FailoverReplicationProtectedItemDetails struct { - // The friendly name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The name. - Name *string `json:"name,omitempty"` - - // The network connection status. - NetworkConnectionStatus *string `json:"networkConnectionStatus,omitempty"` - - // The network friendly name. - NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` - - // The recovery point Id. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // The recovery point time. - RecoveryPointTime *time.Time `json:"recoveryPointTime,omitempty"` - - // The network subnet. - Subnet *string `json:"subnet,omitempty"` - - // The test Vm friendly name. - TestVMFriendlyName *string `json:"testVmFriendlyName,omitempty"` - - // The test Vm name. - TestVMName *string `json:"testVmName,omitempty"` -} - -// GroupTaskDetailsClassification provides polymorphic access to related types. -// Call the interface's GetGroupTaskDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *GroupTaskDetails, *InlineWorkflowTaskDetails, *RecoveryPlanGroupTaskDetails, *RecoveryPlanShutdownGroupTaskDetails -type GroupTaskDetailsClassification interface { - // GetGroupTaskDetails returns the GroupTaskDetails content of the underlying type. - GetGroupTaskDetails() *GroupTaskDetails -} - -// GroupTaskDetails - This class represents the group task details when parent child relationship exists in the drill down. -type GroupTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // The child tasks. - ChildTasks []*ASRTask `json:"childTasks,omitempty"` -} - -// GetGroupTaskDetails implements the GroupTaskDetailsClassification interface for type GroupTaskDetails. -func (g *GroupTaskDetails) GetGroupTaskDetails() *GroupTaskDetails { return g } - -// HealthError - Health Error. -type HealthError struct { - // Error creation time (UTC). - CreationTimeUTC *time.Time `json:"creationTimeUtc,omitempty"` - - // Value indicating whether the health error is customer resolvable. - CustomerResolvability *HealthErrorCustomerResolvability `json:"customerResolvability,omitempty"` - - // ID of the entity. - EntityID *string `json:"entityId,omitempty"` - - // Category of error. - ErrorCategory *string `json:"errorCategory,omitempty"` - - // Error code. - ErrorCode *string `json:"errorCode,omitempty"` - - // The health error unique id. - ErrorID *string `json:"errorId,omitempty"` - - // Level of error. - ErrorLevel *string `json:"errorLevel,omitempty"` - - // Error message. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Source of error. - ErrorSource *string `json:"errorSource,omitempty"` - - // Type of error. - ErrorType *string `json:"errorType,omitempty"` - - // The inner health errors. HealthError having a list of HealthError as child errors is problematic. InnerHealthError is used - // because this will prevent an infinite loop of structures when Hydra tries to - // auto-generate the contract. We are exposing the related health errors as inner health errors and all API consumers can - // utilize this in the same fashion as Exception -> InnerException. - InnerHealthErrors []*InnerHealthError `json:"innerHealthErrors,omitempty"` - - // Possible causes of error. - PossibleCauses *string `json:"possibleCauses,omitempty"` - - // Recommended action to resolve error. - RecommendedAction *string `json:"recommendedAction,omitempty"` - - // DRA error message. - RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"` - - // Summary message of the entity. - SummaryMessage *string `json:"summaryMessage,omitempty"` -} - -// HealthErrorSummary - class to define the summary of the health error details. -type HealthErrorSummary struct { - // The list of affected resource correlation Ids. This can be used to uniquely identify the count of items affected by a specific - // category and severity as well as count of item affected by an specific - // issue. - AffectedResourceCorrelationIDs []*string `json:"affectedResourceCorrelationIds,omitempty"` - - // The sub type of any subcomponent within the ARM resource that this might be applicable. Value remains null if not applicable. - AffectedResourceSubtype *string `json:"affectedResourceSubtype,omitempty"` - - // The type of affected ARM resource. - AffectedResourceType *string `json:"affectedResourceType,omitempty"` - - // The category of the health error. - Category *HealthErrorCategory `json:"category,omitempty"` - - // Severity of error. - Severity *Severity `json:"severity,omitempty"` - - // The code of the health error. - SummaryCode *string `json:"summaryCode,omitempty"` - - // The summary message of the health error. - SummaryMessage *string `json:"summaryMessage,omitempty"` -} - -// HyperVHostDetails - Hyper-V host details. -type HyperVHostDetails struct { - // READ-ONLY; The Hyper-V host Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The Mars agent version. - MarsAgentVersion *string `json:"marsAgentVersion,omitempty" azure:"ro"` - - // READ-ONLY; The Hyper-V host name. - Name *string `json:"name,omitempty" azure:"ro"` -} - -// HyperVReplica2012EventDetails - Model class for event details of a HyperVReplica E2E event. -type HyperVReplica2012EventDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The container friendly name. - ContainerName *string `json:"containerName,omitempty"` - - // The fabric friendly name. - FabricName *string `json:"fabricName,omitempty"` - - // The remote container name. - RemoteContainerName *string `json:"remoteContainerName,omitempty"` - - // The remote fabric name. - RemoteFabricName *string `json:"remoteFabricName,omitempty"` -} - -// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type HyperVReplica2012EventDetails. -func (h *HyperVReplica2012EventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { - return &EventProviderSpecificDetails{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplica2012R2EventDetails - Model class for event details of a HyperVReplica blue E2E event. -type HyperVReplica2012R2EventDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The container friendly name. - ContainerName *string `json:"containerName,omitempty"` - - // The fabric friendly name. - FabricName *string `json:"fabricName,omitempty"` - - // The remote container name. - RemoteContainerName *string `json:"remoteContainerName,omitempty"` - - // The remote fabric name. - RemoteFabricName *string `json:"remoteFabricName,omitempty"` -} - -// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type HyperVReplica2012R2EventDetails. -func (h *HyperVReplica2012R2EventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { - return &EventProviderSpecificDetails{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzureApplyRecoveryPointInput - ApplyRecoveryPoint input specific to HyperVReplicaAzure provider. -type HyperVReplicaAzureApplyRecoveryPointInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The primary kek certificate pfx. - PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` - - // The secondary kek certificate pfx. - SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` -} - -// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface -// for type HyperVReplicaAzureApplyRecoveryPointInput. -func (h *HyperVReplicaAzureApplyRecoveryPointInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { - return &ApplyRecoveryPointProviderSpecificInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzureDiskInputDetails - Disk input details. -type HyperVReplicaAzureDiskInputDetails struct { - // The DiskEncryptionSet ARM ID. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - - // The DiskId. - DiskID *string `json:"diskId,omitempty"` - - // The DiskType. - DiskType *DiskAccountType `json:"diskType,omitempty"` - - // The LogStorageAccountId. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` -} - -// HyperVReplicaAzureEnableProtectionInput - HyperVReplicaAzure specific enable protection input. -type HyperVReplicaAzureEnableProtectionInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The DiskEncryptionSet ARM Id. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - - // The DiskType. - DiskType *DiskAccountType `json:"diskType,omitempty"` - - // The list of VHD Ids of disks to be protected. - DisksToInclude []*string `json:"disksToInclude,omitempty"` - - // The disks to include list for managed disks. - DisksToIncludeForManagedDisks []*HyperVReplicaAzureDiskInputDetails `json:"disksToIncludeForManagedDisks,omitempty"` - - // The selected option to enable RDP\SSH on target vm after failover. String value of SrsDataContract.EnableRDPOnTargetOption - // enum. - EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` - - // The Hyper-V host VM Id. - HvHostVMID *string `json:"hvHostVmId,omitempty"` - - // License type. - LicenseType *LicenseType `json:"licenseType,omitempty"` - - // The storage account to be used for logging during replication. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - - // The OS type associated with VM. - OSType *string `json:"osType,omitempty"` - - // The SQL Server license type. - SQLServerLicenseType *SQLServerLicenseType `json:"sqlServerLicenseType,omitempty"` - - // The tags for the seed managed disks. - SeedManagedDiskTags map[string]*string `json:"seedManagedDiskTags,omitempty"` - - // The target availability set ARM Id for resource manager deployment. - TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The selected target Azure network Id. - TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` - - // The selected target Azure subnet Id. - TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` - - // The Id of the target resource group (for classic deployment) in which the failover VM is to be created. - TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` - - // The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. - TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` - - // The target azure VM Name. - TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` - - // The tags for the target managed disks. - TargetManagedDiskTags map[string]*string `json:"targetManagedDiskTags,omitempty"` - - // The tags for the target NICs. - TargetNicTags map[string]*string `json:"targetNicTags,omitempty"` - - // The proximity placement group ARM Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The storage account Id. - TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"` - - // The target VM size. - TargetVMSize *string `json:"targetVmSize,omitempty"` - - // The target VM tags. - TargetVMTags map[string]*string `json:"targetVmTags,omitempty"` - - // A value indicating whether managed disks should be used during failover. - UseManagedDisks *string `json:"useManagedDisks,omitempty"` - - // A value indicating whether managed disks should be used during replication. - UseManagedDisksForReplication *string `json:"useManagedDisksForReplication,omitempty"` - - // The VM Name. - VMName *string `json:"vmName,omitempty"` - - // The OS disk VHD id associated with VM. - VhdID *string `json:"vhdId,omitempty"` -} - -// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for -// type HyperVReplicaAzureEnableProtectionInput. -func (h *HyperVReplicaAzureEnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { - return &EnableProtectionProviderSpecificInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzureEventDetails - Model class for event details of a HyperVReplica E2A event. -type HyperVReplicaAzureEventDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The container friendly name. - ContainerName *string `json:"containerName,omitempty"` - - // The fabric friendly name. - FabricName *string `json:"fabricName,omitempty"` - - // The remote container name. - RemoteContainerName *string `json:"remoteContainerName,omitempty"` -} - -// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type HyperVReplicaAzureEventDetails. -func (h *HyperVReplicaAzureEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { - return &EventProviderSpecificDetails{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzureFailbackProviderInput - HyperVReplicaAzureFailback specific planned failover input. -type HyperVReplicaAzureFailbackProviderInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // Data sync option. - DataSyncOption *string `json:"dataSyncOption,omitempty"` - - // Provider Id for alternate location. - ProviderIDForAlternateRecovery *string `json:"providerIdForAlternateRecovery,omitempty"` - - // ALR options to create alternate recovery. - RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` -} - -// GetPlannedFailoverProviderSpecificFailoverInput implements the PlannedFailoverProviderSpecificFailoverInputClassification -// interface for type HyperVReplicaAzureFailbackProviderInput. -func (h *HyperVReplicaAzureFailbackProviderInput) GetPlannedFailoverProviderSpecificFailoverInput() *PlannedFailoverProviderSpecificFailoverInput { - return &PlannedFailoverProviderSpecificFailoverInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzureManagedDiskDetails - Hyper-V Managed disk details. -type HyperVReplicaAzureManagedDiskDetails struct { - // The disk encryption set ARM Id. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - - // The disk Id. - DiskID *string `json:"diskId,omitempty"` - - // The replica disk type. - ReplicaDiskType *string `json:"replicaDiskType,omitempty"` - - // Seed managed disk Id. - SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty"` -} - -// HyperVReplicaAzurePlannedFailoverProviderInput - HyperVReplicaAzure specific planned failover input. -type HyperVReplicaAzurePlannedFailoverProviderInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // Primary kek certificate pfx. - PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` - - // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should - // be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // Secondary kek certificate pfx. - SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` -} - -// GetPlannedFailoverProviderSpecificFailoverInput implements the PlannedFailoverProviderSpecificFailoverInputClassification -// interface for type HyperVReplicaAzurePlannedFailoverProviderInput. -func (h *HyperVReplicaAzurePlannedFailoverProviderInput) GetPlannedFailoverProviderSpecificFailoverInput() *PlannedFailoverProviderSpecificFailoverInput { - return &PlannedFailoverProviderSpecificFailoverInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzurePolicyDetails - Hyper-V Replica Azure specific protection profile details. -type HyperVReplicaAzurePolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The active storage account Id. - ActiveStorageAccountID *string `json:"activeStorageAccountId,omitempty"` - - // The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - - // A value indicating whether encryption is enabled for virtual machines in this cloud. - Encryption *string `json:"encryption,omitempty"` - - // The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - - // The duration (in hours) to which point the recovery history needs to be maintained. - RecoveryPointHistoryDurationInHours *int32 `json:"recoveryPointHistoryDurationInHours,omitempty"` - - // The replication interval. - ReplicationInterval *int32 `json:"replicationInterval,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type HyperVReplicaAzurePolicyDetails. -func (h *HyperVReplicaAzurePolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzurePolicyInput - Hyper-V Replica Azure specific input for creating a protection profile. -type HyperVReplicaAzurePolicyInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - - // The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - - // The duration (in hours) to which point the recovery history needs to be maintained. - RecoveryPointHistoryDuration *int32 `json:"recoveryPointHistoryDuration,omitempty"` - - // The replication interval. - ReplicationInterval *int32 `json:"replicationInterval,omitempty"` - - // The list of storage accounts to which the VMs in the primary cloud can replicate to. - StorageAccounts []*string `json:"storageAccounts,omitempty"` -} - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type HyperVReplicaAzurePolicyInput. -func (h *HyperVReplicaAzurePolicyInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return &PolicyProviderSpecificInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzureReplicationDetails - Hyper V Replica Azure provider specific settings. -type HyperVReplicaAzureReplicationDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // Azure VM Disk details. - AzureVMDiskDetails []*AzureVMDiskDetails `json:"azureVmDiskDetails,omitempty"` - - // The selected option to enable RDP\SSH on target vm after failover. String value of SrsDataContract.EnableRDPOnTargetOption - // enum. - EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` - - // The encryption info. - Encryption *string `json:"encryption,omitempty"` - - // Initial replication details. - InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` - - // The Last replication time. - LastReplicatedTime *time.Time `json:"lastReplicatedTime,omitempty"` - - // The last RPO calculated time. - LastRpoCalculatedTime *time.Time `json:"lastRpoCalculatedTime,omitempty"` - - // License Type of the VM to be used. - LicenseType *string `json:"licenseType,omitempty"` - - // The operating system info. - OSDetails *OSDetails `json:"oSDetails,omitempty"` - - // The list of protected managed disks. - ProtectedManagedDisks []*HyperVReplicaAzureManagedDiskDetails `json:"protectedManagedDisks,omitempty"` - - // The recovery availability set Id. - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - - // The ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided - // during enable protection. - RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` - - // The target resource group Id. - RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` - - // The recovery Azure storage account. - RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` - - // Recovery Azure given name. - RecoveryAzureVMName *string `json:"recoveryAzureVmName,omitempty"` - - // The Recovery Azure VM size. - RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` - - // Last RPO value. - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - - // The SQL Server license type. - SQLServerLicenseType *string `json:"sqlServerLicenseType,omitempty"` - - // The tags for the seed managed disks. - SeedManagedDiskTags map[string]*string `json:"seedManagedDiskTags,omitempty"` - - // The selected recovery azure network Id. - SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` - - // The selected source nic Id which will be used as the primary nic during failover. - SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"` - - // The CPU count of the VM on the primary side. - SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"` - - // The RAM size of the VM on the primary side. - SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The tags for the target managed disks. - TargetManagedDiskTags map[string]*string `json:"targetManagedDiskTags,omitempty"` - - // The tags for the target NICs. - TargetNicTags map[string]*string `json:"targetNicTags,omitempty"` - - // The target proximity placement group Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The target VM tags. - TargetVMTags map[string]*string `json:"targetVmTags,omitempty"` - - // A value indicating whether managed disks should be used during failover. - UseManagedDisks *string `json:"useManagedDisks,omitempty"` - - // The virtual machine Id. - VMID *string `json:"vmId,omitempty"` - - // The PE Network details. - VMNics []*VMNicDetails `json:"vmNics,omitempty"` - - // The protection state for the vm. - VMProtectionState *string `json:"vmProtectionState,omitempty"` - - // The protection state description for the vm. - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - - // READ-ONLY; The last recovery point received time. - LastRecoveryPointReceived *time.Time `json:"lastRecoveryPointReceived,omitempty" azure:"ro"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// HyperVReplicaAzureReplicationDetails. -func (h *HyperVReplicaAzureReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return &ReplicationProviderSpecificSettings{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzureReprotectInput - Azure specific reprotect input. -type HyperVReplicaAzureReprotectInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The Hyper-V host Vm Id. - HvHostVMID *string `json:"hvHostVmId,omitempty"` - - // The storage account to be used for logging during replication. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - - // The OS type associated with vm. - OSType *string `json:"osType,omitempty"` - - // The storage account name. - StorageAccountID *string `json:"storageAccountId,omitempty"` - - // The OS disk VHD id associated with vm. - VHDID *string `json:"vHDId,omitempty"` - - // The Vm Name. - VMName *string `json:"vmName,omitempty"` -} - -// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface -// for type HyperVReplicaAzureReprotectInput. -func (h *HyperVReplicaAzureReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { - return &ReverseReplicationProviderSpecificInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzureTestFailoverInput - HvrA provider specific input for test failover. -type HyperVReplicaAzureTestFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // Primary kek certificate pfx. - PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` - - // The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null - // should be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // Secondary kek certificate pfx. - SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` -} - -// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type -// HyperVReplicaAzureTestFailoverInput. -func (h *HyperVReplicaAzureTestFailoverInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { - return &TestFailoverProviderSpecificInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzureUnplannedFailoverInput - HvrA provider specific input for unplanned failover. -type HyperVReplicaAzureUnplannedFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // Primary kek certificate pfx. - PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` - - // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should - // be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // Secondary kek certificate pfx. - SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` -} - -// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface -// for type HyperVReplicaAzureUnplannedFailoverInput. -func (h *HyperVReplicaAzureUnplannedFailoverInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { - return &UnplannedFailoverProviderSpecificInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaAzureUpdateReplicationProtectedItemInput - HyperV replica Azure input to update replication protected item. -type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The dictionary of disk resource Id to disk encryption set ARM Id. - DiskIDToDiskEncryptionMap map[string]*string `json:"diskIdToDiskEncryptionMap,omitempty"` - - // The recovery Azure resource group Id for classic deployment. - RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` - - // The recovery Azure resource group Id for resource manager deployment. - RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` - - // The SQL Server license type. - SQLServerLicenseType *SQLServerLicenseType `json:"sqlServerLicenseType,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The tags for the target managed disks. - TargetManagedDiskTags map[string]*string `json:"targetManagedDiskTags,omitempty"` - - // The tags for the target NICs. - TargetNicTags map[string]*string `json:"targetNicTags,omitempty"` - - // The target proximity placement group Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The target VM tags. - TargetVMTags map[string]*string `json:"targetVmTags,omitempty"` - - // A value indicating whether managed disks should be used during failover. - UseManagedDisks *string `json:"useManagedDisks,omitempty"` - - // The list of disk update properties. - VMDisks []*UpdateDiskInput `json:"vmDisks,omitempty"` -} - -// GetUpdateReplicationProtectedItemProviderInput implements the UpdateReplicationProtectedItemProviderInputClassification -// interface for type HyperVReplicaAzureUpdateReplicationProtectedItemInput. -func (h *HyperVReplicaAzureUpdateReplicationProtectedItemInput) GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput { - return &UpdateReplicationProtectedItemProviderInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaBaseEventDetails - Abstract model class for event details of a HyperVReplica E2E event. -type HyperVReplicaBaseEventDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The container friendly name. - ContainerName *string `json:"containerName,omitempty"` - - // The fabric friendly name. - FabricName *string `json:"fabricName,omitempty"` - - // The remote container name. - RemoteContainerName *string `json:"remoteContainerName,omitempty"` - - // The remote fabric name. - RemoteFabricName *string `json:"remoteFabricName,omitempty"` -} - -// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type HyperVReplicaBaseEventDetails. -func (h *HyperVReplicaBaseEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { - return &EventProviderSpecificDetails{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaBasePolicyDetails - Base class for HyperVReplica policy details. -type HyperVReplicaBasePolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating the authentication type. - AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` - - // A value indicating the application consistent frequency. - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - - // A value indicating whether compression has to be enabled. - Compression *string `json:"compression,omitempty"` - - // A value indicating whether IR is online. - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - - // A value indicating the offline IR export path. - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - - // A value indicating the offline IR import path. - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - - // A value indicating the online IR start time. - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - - // A value indicating the number of recovery points. - RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` - - // A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud. - ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` - - // A value indicating the recovery HTTPS port. - ReplicationPort *int32 `json:"replicationPort,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type HyperVReplicaBasePolicyDetails. -func (h *HyperVReplicaBasePolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaBaseReplicationDetails - Hyper V replica provider specific settings base class. -type HyperVReplicaBaseReplicationDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // Initial replication details. - InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` - - // The Last replication time. - LastReplicatedTime *time.Time `json:"lastReplicatedTime,omitempty"` - - // VM disk details. - VMDiskDetails []*DiskDetails `json:"vMDiskDetails,omitempty"` - - // The virtual machine Id. - VMID *string `json:"vmId,omitempty"` - - // The PE Network details. - VMNics []*VMNicDetails `json:"vmNics,omitempty"` - - // The protection state for the vm. - VMProtectionState *string `json:"vmProtectionState,omitempty"` - - // The protection state description for the vm. - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// HyperVReplicaBaseReplicationDetails. -func (h *HyperVReplicaBaseReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return &ReplicationProviderSpecificSettings{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaBluePolicyDetails - Hyper-V Replica Blue specific protection profile details. -type HyperVReplicaBluePolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating the authentication type. - AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` - - // A value indicating the application consistent frequency. - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - - // A value indicating whether compression has to be enabled. - Compression *string `json:"compression,omitempty"` - - // A value indicating whether IR is online. - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - - // A value indicating the offline IR export path. - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - - // A value indicating the offline IR import path. - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - - // A value indicating the online IR start time. - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - - // A value indicating the number of recovery points. - RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` - - // A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud - ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` - - // A value indicating the replication interval. - ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` - - // A value indicating the recovery HTTPS port. - ReplicationPort *int32 `json:"replicationPort,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type HyperVReplicaBluePolicyDetails. -func (h *HyperVReplicaBluePolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaBluePolicyInput - HyperV Replica Blue policy input. -type HyperVReplicaBluePolicyInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating the authentication type. - AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` - - // A value indicating the application consistent frequency. - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - - // A value indicating whether compression has to be enabled. - Compression *string `json:"compression,omitempty"` - - // A value indicating whether IR is online. - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - - // A value indicating the offline IR export path. - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - - // A value indicating the offline IR import path. - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - - // A value indicating the online IR start time. - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - - // A value indicating the number of recovery points. - RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` - - // A value indicating whether the VM has to be auto deleted. - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - - // A value indicating the replication interval. - ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` - - // A value indicating the recovery HTTPS port. - ReplicationPort *int32 `json:"replicationPort,omitempty"` -} - -// GetHyperVReplicaPolicyInput implements the HyperVReplicaPolicyInputClassification interface for type HyperVReplicaBluePolicyInput. -func (h *HyperVReplicaBluePolicyInput) GetHyperVReplicaPolicyInput() *HyperVReplicaPolicyInput { - return &HyperVReplicaPolicyInput{ - RecoveryPoints: h.RecoveryPoints, - ApplicationConsistentSnapshotFrequencyInHours: h.ApplicationConsistentSnapshotFrequencyInHours, - Compression: h.Compression, - InitialReplicationMethod: h.InitialReplicationMethod, - OnlineReplicationStartTime: h.OnlineReplicationStartTime, - OfflineReplicationImportPath: h.OfflineReplicationImportPath, - OfflineReplicationExportPath: h.OfflineReplicationExportPath, - ReplicationPort: h.ReplicationPort, - AllowedAuthenticationType: h.AllowedAuthenticationType, - ReplicaDeletion: h.ReplicaDeletion, - InstanceType: h.InstanceType, - } -} - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type HyperVReplicaBluePolicyInput. -func (h *HyperVReplicaBluePolicyInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return &PolicyProviderSpecificInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaBlueReplicationDetails - HyperV replica 2012 R2 (Blue) replication details. -type HyperVReplicaBlueReplicationDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // Initial replication details. - InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` - - // The Last replication time. - LastReplicatedTime *time.Time `json:"lastReplicatedTime,omitempty"` - - // VM disk details. - VMDiskDetails []*DiskDetails `json:"vMDiskDetails,omitempty"` - - // The virtual machine Id. - VMID *string `json:"vmId,omitempty"` - - // The PE Network details. - VMNics []*VMNicDetails `json:"vmNics,omitempty"` - - // The protection state for the vm. - VMProtectionState *string `json:"vmProtectionState,omitempty"` - - // The protection state description for the vm. - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// HyperVReplicaBlueReplicationDetails. -func (h *HyperVReplicaBlueReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return &ReplicationProviderSpecificSettings{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaPolicyDetails - Hyper-V Replica Blue specific protection profile details. -type HyperVReplicaPolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating the authentication type. - AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` - - // A value indicating the application consistent frequency. - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - - // A value indicating whether compression has to be enabled. - Compression *string `json:"compression,omitempty"` - - // A value indicating whether IR is online. - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - - // A value indicating the offline IR export path. - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - - // A value indicating the offline IR import path. - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - - // A value indicating the online IR start time. - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - - // A value indicating the number of recovery points. - RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` - - // A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud - ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` - - // A value indicating the recovery HTTPS port. - ReplicationPort *int32 `json:"replicationPort,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type HyperVReplicaPolicyDetails. -func (h *HyperVReplicaPolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaPolicyInputClassification provides polymorphic access to related types. -// Call the interface's GetHyperVReplicaPolicyInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *HyperVReplicaBluePolicyInput, *HyperVReplicaPolicyInput -type HyperVReplicaPolicyInputClassification interface { - PolicyProviderSpecificInputClassification - // GetHyperVReplicaPolicyInput returns the HyperVReplicaPolicyInput content of the underlying type. - GetHyperVReplicaPolicyInput() *HyperVReplicaPolicyInput -} - -// HyperVReplicaPolicyInput - Hyper-V Replica specific policy Input. -type HyperVReplicaPolicyInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating the authentication type. - AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` - - // A value indicating the application consistent frequency. - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - - // A value indicating whether compression has to be enabled. - Compression *string `json:"compression,omitempty"` - - // A value indicating whether IR is online. - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - - // A value indicating the offline IR export path. - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - - // A value indicating the offline IR import path. - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - - // A value indicating the online IR start time. - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - - // A value indicating the number of recovery points. - RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` - - // A value indicating whether the VM has to be auto deleted. - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` - - // A value indicating the recovery HTTPS port. - ReplicationPort *int32 `json:"replicationPort,omitempty"` -} - -// GetHyperVReplicaPolicyInput implements the HyperVReplicaPolicyInputClassification interface for type HyperVReplicaPolicyInput. -func (h *HyperVReplicaPolicyInput) GetHyperVReplicaPolicyInput() *HyperVReplicaPolicyInput { return h } - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type HyperVReplicaPolicyInput. -func (h *HyperVReplicaPolicyInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return &PolicyProviderSpecificInput{ - InstanceType: h.InstanceType, - } -} - -// HyperVReplicaReplicationDetails - HyperV replica 2012 replication details. -type HyperVReplicaReplicationDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // Initial replication details. - InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` - - // The Last replication time. - LastReplicatedTime *time.Time `json:"lastReplicatedTime,omitempty"` - - // VM disk details. - VMDiskDetails []*DiskDetails `json:"vMDiskDetails,omitempty"` - - // The virtual machine Id. - VMID *string `json:"vmId,omitempty"` - - // The PE Network details. - VMNics []*VMNicDetails `json:"vmNics,omitempty"` - - // The protection state for the vm. - VMProtectionState *string `json:"vmProtectionState,omitempty"` - - // The protection state description for the vm. - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// HyperVReplicaReplicationDetails. -func (h *HyperVReplicaReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return &ReplicationProviderSpecificSettings{ - InstanceType: h.InstanceType, - } -} - -// HyperVSiteDetails - HyperVSite fabric specific details. -type HyperVSiteDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The list of Hyper-V hosts associated with the fabric. - HyperVHosts []*HyperVHostDetails `json:"hyperVHosts,omitempty"` -} - -// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type HyperVSiteDetails. -func (h *HyperVSiteDetails) GetFabricSpecificDetails() *FabricSpecificDetails { - return &FabricSpecificDetails{ - InstanceType: h.InstanceType, - } -} - -// HyperVVirtualMachineDetailsClassification provides polymorphic access to related types. -// Call the interface's GetHyperVVirtualMachineDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *HyperVVirtualMachineDetails, *VmmVirtualMachineDetails -type HyperVVirtualMachineDetailsClassification interface { - ConfigurationSettingsClassification - // GetHyperVVirtualMachineDetails returns the HyperVVirtualMachineDetails content of the underlying type. - GetHyperVVirtualMachineDetails() *HyperVVirtualMachineDetails -} - -// HyperVVirtualMachineDetails - Single Host fabric provider specific VM settings. -type HyperVVirtualMachineDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The Last successful failover time. - DiskDetails []*DiskDetails `json:"diskDetails,omitempty"` - - // The id of the object in fabric. - Generation *string `json:"generation,omitempty"` - - // A value indicating whether the VM has a fibre channel adapter attached. String value of SrsDataContract.PresenceStatus - // enum. - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - - // A value indicating whether the VM has a physical disk attached. String value of SrsDataContract.PresenceStatus enum. - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - - // A value indicating whether the VM has a shared VHD attached. String value of SrsDataContract.PresenceStatus enum. - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - - // The Id of the hyper-v host in fabric. - HyperVHostID *string `json:"hyperVHostId,omitempty"` - - // The Last replication time. - OSDetails *OSDetails `json:"osDetails,omitempty"` - - // The source id of the object. - SourceItemID *string `json:"sourceItemId,omitempty"` -} - -// GetConfigurationSettings implements the ConfigurationSettingsClassification interface for type HyperVVirtualMachineDetails. -func (h *HyperVVirtualMachineDetails) GetConfigurationSettings() *ConfigurationSettings { - return &ConfigurationSettings{ - InstanceType: h.InstanceType, - } -} - -// GetHyperVVirtualMachineDetails implements the HyperVVirtualMachineDetailsClassification interface for type HyperVVirtualMachineDetails. -func (h *HyperVVirtualMachineDetails) GetHyperVVirtualMachineDetails() *HyperVVirtualMachineDetails { - return h -} - -type IPConfigDetails struct { - IPAddressType *string `json:"ipAddressType,omitempty"` - IsPrimary *bool `json:"isPrimary,omitempty"` - IsSeletedForFailover *bool `json:"isSeletedForFailover,omitempty"` - Name *string `json:"name,omitempty"` - RecoveryIPAddressType *string `json:"recoveryIPAddressType,omitempty"` - RecoveryLBBackendAddressPoolIDs []*string `json:"recoveryLBBackendAddressPoolIds,omitempty"` - RecoveryPublicIPAddressID *string `json:"recoveryPublicIPAddressId,omitempty"` - RecoveryStaticIPAddress *string `json:"recoveryStaticIPAddress,omitempty"` - RecoverySubnetName *string `json:"recoverySubnetName,omitempty"` - StaticIPAddress *string `json:"staticIPAddress,omitempty"` - SubnetName *string `json:"subnetName,omitempty"` - TfoLBBackendAddressPoolIDs []*string `json:"tfoLBBackendAddressPoolIds,omitempty"` - TfoPublicIPAddressID *string `json:"tfoPublicIPAddressId,omitempty"` - TfoStaticIPAddress *string `json:"tfoStaticIPAddress,omitempty"` - TfoSubnetName *string `json:"tfoSubnetName,omitempty"` -} - -type IPConfigInputDetails struct { - IPConfigName *string `json:"ipConfigName,omitempty"` - IsPrimary *bool `json:"isPrimary,omitempty"` - IsSeletedForFailover *bool `json:"isSeletedForFailover,omitempty"` - RecoveryLBBackendAddressPoolIDs []*string `json:"recoveryLBBackendAddressPoolIds,omitempty"` - RecoveryPublicIPAddressID *string `json:"recoveryPublicIPAddressId,omitempty"` - RecoveryStaticIPAddress *string `json:"recoveryStaticIPAddress,omitempty"` - RecoverySubnetName *string `json:"recoverySubnetName,omitempty"` - TfoLBBackendAddressPoolIDs []*string `json:"tfoLBBackendAddressPoolIds,omitempty"` - TfoPublicIPAddressID *string `json:"tfoPublicIPAddressId,omitempty"` - TfoStaticIPAddress *string `json:"tfoStaticIPAddress,omitempty"` - TfoSubnetName *string `json:"tfoSubnetName,omitempty"` -} - -// IdentityProviderDetails - Identity provider details. -type IdentityProviderDetails struct { - // The base authority for Azure Active Directory authentication. - AADAuthority *string `json:"aadAuthority,omitempty"` - - // The application/client Id for the service principal with which the on-premise management/data plane components would communicate - // with our Azure services. - ApplicationID *string `json:"applicationId,omitempty"` - - // The intended Audience of the service principal with which the on-premise management/data plane components would communicate - // with our Azure services. - Audience *string `json:"audience,omitempty"` - - // The object Id of the service principal with which the on-premise management/data plane components would communicate with - // our Azure services. - ObjectID *string `json:"objectId,omitempty"` - - // The tenant Id for the service principal with which the on-premise management/data plane components would communicate with - // our Azure services. - TenantID *string `json:"tenantId,omitempty"` -} - -// IdentityProviderInput - Identity provider input. -type IdentityProviderInput struct { - // REQUIRED; The base authority for Azure Active Directory authentication. - AADAuthority *string `json:"aadAuthority,omitempty"` - - // REQUIRED; The application/client Id for the service principal with which the on-premise management/data plane components - // would communicate with our Azure services. - ApplicationID *string `json:"applicationId,omitempty"` - - // REQUIRED; The intended Audience of the service principal with which the on-premise management/data plane components would - // communicate with our Azure services. - Audience *string `json:"audience,omitempty"` - - // REQUIRED; The object Id of the service principal with which the on-premise management/data plane components would communicate - // with our Azure services. - ObjectID *string `json:"objectId,omitempty"` - - // REQUIRED; The tenant Id for the service principal with which the on-premise management/data plane components would communicate - // with our Azure services. - TenantID *string `json:"tenantId,omitempty"` -} - -// InMageAgentDetails - The details of the InMage agent. -type InMageAgentDetails struct { - // Agent expiry date. - AgentExpiryDate *time.Time `json:"agentExpiryDate,omitempty"` - - // A value indicating whether installed agent needs to be updated. - AgentUpdateStatus *string `json:"agentUpdateStatus,omitempty"` - - // The agent version. - AgentVersion *string `json:"agentVersion,omitempty"` - - // A value indicating whether reboot is required after update is applied. - PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"` -} - -// InMageAzureV2ApplyRecoveryPointInput - ApplyRecoveryPoint input specific to InMageAzureV2 provider. -type InMageAzureV2ApplyRecoveryPointInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface -// for type InMageAzureV2ApplyRecoveryPointInput. -func (i *InMageAzureV2ApplyRecoveryPointInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { - return &ApplyRecoveryPointProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2DiskInputDetails - Disk input details. -type InMageAzureV2DiskInputDetails struct { - // The DiskEncryptionSet ARM ID. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - - // The DiskId. - DiskID *string `json:"diskId,omitempty"` - - // The DiskType. - DiskType *DiskAccountType `json:"diskType,omitempty"` - - // The LogStorageAccountId. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` -} - -// InMageAzureV2EnableProtectionInput - VMware Azure specific enable protection input. -type InMageAzureV2EnableProtectionInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The DiskEncryptionSet ARM Id. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - - // The DiskType. - DiskType *DiskAccountType `json:"diskType,omitempty"` - - // The disks to include list. - DisksToInclude []*InMageAzureV2DiskInputDetails `json:"disksToInclude,omitempty"` - - // The selected option to enable RDP\SSH on target VM after failover. String value of SrsDataContract.EnableRDPOnTargetOption - // enum. - EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` - - // License type. - LicenseType *LicenseType `json:"licenseType,omitempty"` - - // The storage account to be used for logging during replication. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - - // The Master target Id. - MasterTargetID *string `json:"masterTargetId,omitempty"` - - // The multi VM group Id. - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - - // The multi VM group name. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - - // The Process Server Id. - ProcessServerID *string `json:"processServerId,omitempty"` - - // The CS account Id. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` - - // The SQL Server license type. - SQLServerLicenseType *SQLServerLicenseType `json:"sqlServerLicenseType,omitempty"` - - // The tags for the seed managed disks. - SeedManagedDiskTags map[string]*string `json:"seedManagedDiskTags,omitempty"` - - // The storage account Id. - StorageAccountID *string `json:"storageAccountId,omitempty"` - - // The target availability set ARM Id for resource manager deployment. - TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The selected target Azure network Id. - TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` - - // The selected target Azure subnet Id. - TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` - - // The Id of the target resource group (for classic deployment) in which the failover VM is to be created. - TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` - - // The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. - TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` - - // The target azure VM Name. - TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` - - // The tags for the target managed disks. - TargetManagedDiskTags map[string]*string `json:"targetManagedDiskTags,omitempty"` - - // The tags for the target NICs. - TargetNicTags map[string]*string `json:"targetNicTags,omitempty"` - - // The proximity placement group ARM Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The target VM size. - TargetVMSize *string `json:"targetVmSize,omitempty"` - - // The target VM tags. - TargetVMTags map[string]*string `json:"targetVmTags,omitempty"` -} - -// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for -// type InMageAzureV2EnableProtectionInput. -func (i *InMageAzureV2EnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { - return &EnableProtectionProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2EventDetails - Model class for event details of a VMwareAzureV2 event. -type InMageAzureV2EventDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // InMage Event Category. - Category *string `json:"category,omitempty"` - - // InMage Event Component. - Component *string `json:"component,omitempty"` - - // Corrective Action string for the event. - CorrectiveAction *string `json:"correctiveAction,omitempty"` - - // InMage Event Details. - Details *string `json:"details,omitempty"` - - // InMage Event type. Takes one of the values of InMageDataContract.InMageMonitoringEventType. - EventType *string `json:"eventType,omitempty"` - - // VMware Site name. - SiteName *string `json:"siteName,omitempty"` - - // InMage Event Summary. - Summary *string `json:"summary,omitempty"` -} - -// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type InMageAzureV2EventDetails. -func (i *InMageAzureV2EventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { - return &EventProviderSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2ManagedDiskDetails - InMageAzureV2 Managed disk details. -type InMageAzureV2ManagedDiskDetails struct { - // The DiskEncryptionSet ARM ID. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - - // The disk id. - DiskID *string `json:"diskId,omitempty"` - - // The replica disk type. - ReplicaDiskType *string `json:"replicaDiskType,omitempty"` - - // Seed managed disk Id. - SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty"` - - // The target disk name. - TargetDiskName *string `json:"targetDiskName,omitempty"` -} - -// InMageAzureV2PolicyDetails - InMage Azure v2 specific protection profile details. -type InMageAzureV2PolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The app consistent snapshot frequency in minutes. - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency in minutes. - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - - // A value indicating whether multi-VM sync has to be enabled. - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - - // The recovery point threshold in minutes. - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type InMageAzureV2PolicyDetails. -func (i *InMageAzureV2PolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2PolicyInput - VMWare Azure specific policy Input. -type InMageAzureV2PolicyInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. - MultiVMSyncStatus *SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` - - // The app consistent snapshot frequency (in minutes). - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency (in minutes). - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - - // The recovery point threshold in minutes. - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type InMageAzureV2PolicyInput. -func (i *InMageAzureV2PolicyInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return &PolicyProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2ProtectedDiskDetails - InMageAzureV2 protected disk details. -type InMageAzureV2ProtectedDiskDetails struct { - // The disk capacity in bytes. - DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` - - // The disk id. - DiskID *string `json:"diskId,omitempty"` - - // The disk name. - DiskName *string `json:"diskName,omitempty"` - - // A value indicating whether disk is resized. - DiskResized *string `json:"diskResized,omitempty"` - - // The disk file system capacity in bytes. - FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` - - // The health error code for the disk. - HealthErrorCode *string `json:"healthErrorCode,omitempty"` - - // The last RPO calculated time. - LastRpoCalculatedTime *time.Time `json:"lastRpoCalculatedTime,omitempty"` - - // The Progress Health. - ProgressHealth *string `json:"progressHealth,omitempty"` - - // The Progress Status. - ProgressStatus *string `json:"progressStatus,omitempty"` - - // The protection stage. - ProtectionStage *string `json:"protectionStage,omitempty"` - - // The PS data transit in MB. - PsDataInMegaBytes *float64 `json:"psDataInMegaBytes,omitempty"` - - // The resync duration in seconds. - ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` - - // The resync last 15 minutes transferred bytes. - ResyncLast15MinutesTransferredBytes *int64 `json:"resyncLast15MinutesTransferredBytes,omitempty"` - - // The last data transfer time in UTC. - ResyncLastDataTransferTimeUTC *time.Time `json:"resyncLastDataTransferTimeUTC,omitempty"` - - // The resync processed bytes. - ResyncProcessedBytes *int64 `json:"resyncProcessedBytes,omitempty"` - - // The resync progress percentage. - ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` - - // A value indicating whether resync is required for this disk. - ResyncRequired *string `json:"resyncRequired,omitempty"` - - // The resync start time. - ResyncStartTime *time.Time `json:"resyncStartTime,omitempty"` - - // The resync total transferred bytes. - ResyncTotalTransferredBytes *int64 `json:"resyncTotalTransferredBytes,omitempty"` - - // The RPO in seconds. - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - - // The seconds to take for switch provider. - SecondsToTakeSwitchProvider *int64 `json:"secondsToTakeSwitchProvider,omitempty"` - - // The source data transit in MB. - SourceDataInMegaBytes *float64 `json:"sourceDataInMegaBytes,omitempty"` - - // The target data transit in MB. - TargetDataInMegaBytes *float64 `json:"targetDataInMegaBytes,omitempty"` -} - -// InMageAzureV2RecoveryPointDetails - InMage Azure V2 provider specific recovery point details. -type InMageAzureV2RecoveryPointDetails struct { - // REQUIRED; Gets the provider type. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating whether the recovery point is multi VM consistent. - IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` -} - -// GetProviderSpecificRecoveryPointDetails implements the ProviderSpecificRecoveryPointDetailsClassification interface for -// type InMageAzureV2RecoveryPointDetails. -func (i *InMageAzureV2RecoveryPointDetails) GetProviderSpecificRecoveryPointDetails() *ProviderSpecificRecoveryPointDetails { - return &ProviderSpecificRecoveryPointDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2ReplicationDetails - InMageAzureV2 provider specific settings. -type InMageAzureV2ReplicationDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // Agent expiry date. - AgentExpiryDate *time.Time `json:"agentExpiryDate,omitempty"` - - // The agent version. - AgentVersion *string `json:"agentVersion,omitempty"` - - // Azure VM Disk details. - AzureVMDiskDetails []*AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` - - // The target generation for this protected item. - AzureVMGeneration *string `json:"azureVmGeneration,omitempty"` - - // The compressed data change rate in MB. - CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` - - // The datastores of the on-premise machine. Value can be list of strings that contain datastore names. - Datastores []*string `json:"datastores,omitempty"` - - // A value indicating the discovery type of the machine. Value can be vCenter or physical. - DiscoveryType *string `json:"discoveryType,omitempty"` - - // A value indicating whether any disk is resized for this VM. - DiskResized *string `json:"diskResized,omitempty"` - - // The selected option to enable RDP\SSH on target vm after failover. String value of SrsDataContract.EnableRDPOnTargetOption - // enum. - EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` - - // The firmware type of this protected item. - FirmwareType *string `json:"firmwareType,omitempty"` - - // The source IP address. - IPAddress *string `json:"ipAddress,omitempty"` - - // The infrastructure VM Id. - InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` - - // A value indicating whether additional IR stats are available or not. - IsAdditionalStatsAvailable *bool `json:"isAdditionalStatsAvailable,omitempty"` - - // A value indicating whether installed agent needs to be updated. - IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"` - - // A value indicating whether the source server requires a restart after update. - IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"` - - // The last heartbeat received from the source server. - LastHeartbeat *time.Time `json:"lastHeartbeat,omitempty"` - - // The last RPO calculated time. - LastRpoCalculatedTime *time.Time `json:"lastRpoCalculatedTime,omitempty"` - - // The last update time received from on-prem components. - LastUpdateReceivedTime *time.Time `json:"lastUpdateReceivedTime,omitempty"` - - // License Type of the VM to be used. - LicenseType *string `json:"licenseType,omitempty"` - - // The master target Id. - MasterTargetID *string `json:"masterTargetId,omitempty"` - - // The multi vm group Id. - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - - // The multi vm group name. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - - // A value indicating whether multi vm sync is enabled or disabled. - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` - - // The id of the disk containing the OS. - OSDiskID *string `json:"osDiskId,omitempty"` - - // The type of the OS on the VM. - OSType *string `json:"osType,omitempty"` - - // The OS Version of the protected item. - OSVersion *string `json:"osVersion,omitempty"` - - // The process server Id. - ProcessServerID *string `json:"processServerId,omitempty"` - - // The process server name. - ProcessServerName *string `json:"processServerName,omitempty"` - - // The list of protected disks. - ProtectedDisks []*InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"` - - // The list of protected managed disks. - ProtectedManagedDisks []*InMageAzureV2ManagedDiskDetails `json:"protectedManagedDisks,omitempty"` - - // The protection stage. - ProtectionStage *string `json:"protectionStage,omitempty"` - - // The recovery availability set Id. - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - - // The ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided - // during enable protection. - RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` - - // The target resource group Id. - RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` - - // The recovery Azure storage account. - RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` - - // Recovery Azure given name. - RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` - - // The Recovery Azure VM size. - RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` - - // The replica id of the protected item. - ReplicaID *string `json:"replicaId,omitempty"` - - // The resync progress percentage. - ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` - - // The RPO in seconds. - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - - // The SQL Server license type. - SQLServerLicenseType *string `json:"sqlServerLicenseType,omitempty"` - - // The tags for the seed managed disks. - SeedManagedDiskTags map[string]*string `json:"seedManagedDiskTags,omitempty"` - - // The selected recovery azure network Id. - SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` - - // The selected source nic Id which will be used as the primary nic during failover. - SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"` - - // The test failover virtual network. - SelectedTfoAzureNetworkID *string `json:"selectedTfoAzureNetworkId,omitempty"` - - // The CPU count of the VM on the primary side. - SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"` - - // The RAM size of the VM on the primary side. - SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"` - - // The switch provider blocking error information. - SwitchProviderBlockingErrorDetails []*InMageAzureV2SwitchProviderBlockingErrorDetails `json:"switchProviderBlockingErrorDetails,omitempty"` - - // The switch provider blocking error information. - SwitchProviderDetails *InMageAzureV2SwitchProviderDetails `json:"switchProviderDetails,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The tags for the target managed disks. - TargetManagedDiskTags map[string]*string `json:"targetManagedDiskTags,omitempty"` - - // The tags for the target NICs. - TargetNicTags map[string]*string `json:"targetNicTags,omitempty"` - - // The target proximity placement group Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The ARM Id of the target Azure VM. This value will be null until the VM is failed over. Only after failure it will be populated - // with the ARM Id of the Azure VM. - TargetVMID *string `json:"targetVmId,omitempty"` - - // The target VM tags. - TargetVMTags map[string]*string `json:"targetVmTags,omitempty"` - - // The total transferred data in bytes. - TotalDataTransferred *int64 `json:"totalDataTransferred,omitempty"` - - // The progress health. - TotalProgressHealth *string `json:"totalProgressHealth,omitempty"` - - // The uncompressed data change rate in MB. - UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` - - // A value indicating whether managed disks should be used during failover. - UseManagedDisks *string `json:"useManagedDisks,omitempty"` - - // The vCenter infrastructure Id. - VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` - - // The virtual machine Id. - VMID *string `json:"vmId,omitempty"` - - // The PE Network details. - VMNics []*VMNicDetails `json:"vmNics,omitempty"` - - // The protection state for the vm. - VMProtectionState *string `json:"vmProtectionState,omitempty"` - - // The protection state description for the vm. - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - - // The validation errors of the on-premise machine Value can be list of validation errors. - ValidationErrors []*HealthError `json:"validationErrors,omitempty"` - - // The OS disk VHD name. - VhdName *string `json:"vhdName,omitempty"` - - // READ-ONLY; The last recovery point received time. - LastRecoveryPointReceived *time.Time `json:"lastRecoveryPointReceived,omitempty" azure:"ro"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// InMageAzureV2ReplicationDetails. -func (i *InMageAzureV2ReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return &ReplicationProviderSpecificSettings{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2ReprotectInput - InMageAzureV2 specific provider input. -type InMageAzureV2ReprotectInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The disks to include list. - DisksToInclude []*string `json:"disksToInclude,omitempty"` - - // The storage account to be used for logging during replication. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - - // The Master target Id. - MasterTargetID *string `json:"masterTargetId,omitempty"` - - // The Policy Id. - PolicyID *string `json:"policyId,omitempty"` - - // The Process Server Id. - ProcessServerID *string `json:"processServerId,omitempty"` - - // The CS account Id. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` - - // The storage account id. - StorageAccountID *string `json:"storageAccountId,omitempty"` -} - -// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface -// for type InMageAzureV2ReprotectInput. -func (i *InMageAzureV2ReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { - return &ReverseReplicationProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2SwitchProviderBlockingErrorDetails - InMageAzureV2 switch provider blocking error details. -type InMageAzureV2SwitchProviderBlockingErrorDetails struct { - // READ-ONLY; The error code. - ErrorCode *string `json:"errorCode,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` - - // READ-ONLY; The error message parameters. - ErrorMessageParameters map[string]*string `json:"errorMessageParameters,omitempty" azure:"ro"` - - // READ-ONLY; The error tags. - ErrorTags map[string]*string `json:"errorTags,omitempty" azure:"ro"` - - // READ-ONLY; The possible causes. - PossibleCauses *string `json:"possibleCauses,omitempty" azure:"ro"` - - // READ-ONLY; The recommended action. - RecommendedAction *string `json:"recommendedAction,omitempty" azure:"ro"` -} - -// InMageAzureV2SwitchProviderDetails - InMageAzureV2 switch provider details. -type InMageAzureV2SwitchProviderDetails struct { - // READ-ONLY; The target appliance Id. - TargetApplianceID *string `json:"targetApplianceId,omitempty" azure:"ro"` - - // READ-ONLY; The target fabric Id. - TargetFabricID *string `json:"targetFabricId,omitempty" azure:"ro"` - - // READ-ONLY; The target resource Id. - TargetResourceID *string `json:"targetResourceId,omitempty" azure:"ro"` - - // READ-ONLY; The target vault Id. - TargetVaultID *string `json:"targetVaultId,omitempty" azure:"ro"` -} - -// InMageAzureV2SwitchProviderInput - Provider specific input for InMageAzureV2 switch provider. -type InMageAzureV2SwitchProviderInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The target appliance Id. - TargetApplianceID *string `json:"targetApplianceID,omitempty"` - - // REQUIRED; The target fabric Id. - TargetFabricID *string `json:"targetFabricID,omitempty"` - - // REQUIRED; The target vault Id. - TargetVaultID *string `json:"targetVaultID,omitempty"` -} - -// GetSwitchProviderSpecificInput implements the SwitchProviderSpecificInputClassification interface for type InMageAzureV2SwitchProviderInput. -func (i *InMageAzureV2SwitchProviderInput) GetSwitchProviderSpecificInput() *SwitchProviderSpecificInput { - return &SwitchProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2TestFailoverInput - InMageAzureV2 provider specific input for test failover. -type InMageAzureV2TestFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null - // should be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` -} - -// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type -// InMageAzureV2TestFailoverInput. -func (i *InMageAzureV2TestFailoverInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { - return &TestFailoverProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2UnplannedFailoverInput - InMageAzureV2 provider specific input for unplanned failover. -type InMageAzureV2UnplannedFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should - // be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` -} - -// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface -// for type InMageAzureV2UnplannedFailoverInput. -func (i *InMageAzureV2UnplannedFailoverInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { - return &UnplannedFailoverProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageAzureV2UpdateReplicationProtectedItemInput - InMage Azure V2 input to update replication protected item. -type InMageAzureV2UpdateReplicationProtectedItemInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The recovery Azure resource group Id for classic deployment. - RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` - - // The recovery Azure resource group Id for resource manager deployment. - RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` - - // The SQL Server license type. - SQLServerLicenseType *SQLServerLicenseType `json:"sqlServerLicenseType,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The tags for the target managed disks. - TargetManagedDiskTags map[string]*string `json:"targetManagedDiskTags,omitempty"` - - // The tags for the target NICs. - TargetNicTags map[string]*string `json:"targetNicTags,omitempty"` - - // The target proximity placement group Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The target VM tags. - TargetVMTags map[string]*string `json:"targetVmTags,omitempty"` - - // A value indicating whether managed disks should be used during failover. - UseManagedDisks *string `json:"useManagedDisks,omitempty"` - - // The list of disk update properties. - VMDisks []*UpdateDiskInput `json:"vmDisks,omitempty"` -} - -// GetUpdateReplicationProtectedItemProviderInput implements the UpdateReplicationProtectedItemProviderInputClassification -// interface for type InMageAzureV2UpdateReplicationProtectedItemInput. -func (i *InMageAzureV2UpdateReplicationProtectedItemInput) GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput { - return &UpdateReplicationProtectedItemProviderInput{ - InstanceType: i.InstanceType, - } -} - -// InMageBasePolicyDetails - Base class for the policies of providers using InMage replication. -type InMageBasePolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The app consistent snapshot frequency in minutes. - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // A value indicating whether multi-VM sync has to be enabled. - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - - // The recovery point threshold in minutes. - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type InMageBasePolicyDetails. -func (i *InMageBasePolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageDisableProtectionProviderSpecificInput - InMage disable protection provider specific input. -type InMageDisableProtectionProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating whether the replica VM should be destroyed or retained. Values from Delete and Retain. - ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` -} - -// GetDisableProtectionProviderSpecificInput implements the DisableProtectionProviderSpecificInputClassification interface -// for type InMageDisableProtectionProviderSpecificInput. -func (i *InMageDisableProtectionProviderSpecificInput) GetDisableProtectionProviderSpecificInput() *DisableProtectionProviderSpecificInput { - return &DisableProtectionProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageDiskDetails - VMware/Physical specific Disk Details. -type InMageDiskDetails struct { - // Whether disk is dynamic disk or basic disk. - DiskConfiguration *string `json:"diskConfiguration,omitempty"` - - // The disk Id. - DiskID *string `json:"diskId,omitempty"` - - // The disk name. - DiskName *string `json:"diskName,omitempty"` - - // The disk size in MB. - DiskSizeInMB *string `json:"diskSizeInMB,omitempty"` - - // Whether disk is system disk or data disk. - DiskType *string `json:"diskType,omitempty"` - - // Volumes of the disk. - VolumeList []*DiskVolumeDetails `json:"volumeList,omitempty"` -} - -// InMageDiskExclusionInput - DiskExclusionInput when doing enable protection of virtual machine in InMage provider. -type InMageDiskExclusionInput struct { - // The guest disk signature based option for disk exclusion. - DiskSignatureOptions []*InMageDiskSignatureExclusionOptions `json:"diskSignatureOptions,omitempty"` - - // The volume label based option for disk exclusion. - VolumeOptions []*InMageVolumeExclusionOptions `json:"volumeOptions,omitempty"` -} - -// InMageDiskSignatureExclusionOptions - Guest disk signature based disk exclusion option when doing enable protection of -// virtual machine in InMage provider. -type InMageDiskSignatureExclusionOptions struct { - // The guest signature of disk to be excluded from replication. - DiskSignature *string `json:"diskSignature,omitempty"` -} - -// InMageEnableProtectionInput - VMware Azure specific enable protection input. -type InMageEnableProtectionInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The Master Target Id. - MasterTargetID *string `json:"masterTargetId,omitempty"` - - // REQUIRED; The multi VM group Id. - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - - // REQUIRED; The multi VM group name. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - - // REQUIRED; The Process Server Id. - ProcessServerID *string `json:"processServerId,omitempty"` - - // REQUIRED; The retention drive to use on the MT. - RetentionDrive *string `json:"retentionDrive,omitempty"` - - // The target datastore name. - DatastoreName *string `json:"datastoreName,omitempty"` - - // The enable disk exclusion input. - DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` - - // The disks to include list. - DisksToInclude []*string `json:"disksToInclude,omitempty"` - - // The CS account Id. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` - - // The VM Name. - VMFriendlyName *string `json:"vmFriendlyName,omitempty"` -} - -// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for -// type InMageEnableProtectionInput. -func (i *InMageEnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { - return &EnableProtectionProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageFabricSwitchProviderBlockingErrorDetails - InMageFabric switch provider blocking error details. -type InMageFabricSwitchProviderBlockingErrorDetails struct { - // READ-ONLY; The error code. - ErrorCode *string `json:"errorCode,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` - - // READ-ONLY; The error message parameters. - ErrorMessageParameters map[string]*string `json:"errorMessageParameters,omitempty" azure:"ro"` - - // READ-ONLY; The error tags. - ErrorTags map[string]*string `json:"errorTags,omitempty" azure:"ro"` - - // READ-ONLY; The possible causes. - PossibleCauses *string `json:"possibleCauses,omitempty" azure:"ro"` - - // READ-ONLY; The recommended action. - RecommendedAction *string `json:"recommendedAction,omitempty" azure:"ro"` -} - -// InMagePolicyDetails - InMage specific protection profile details. -type InMagePolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The app consistent snapshot frequency in minutes. - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // A value indicating whether multi-VM sync has to be enabled. - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - - // The recovery point threshold in minutes. - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type InMagePolicyDetails. -func (i *InMagePolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMagePolicyInput - VMWare Azure specific protection profile Input. -type InMagePolicyInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. - MultiVMSyncStatus *SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` - - // The app consistent snapshot frequency (in minutes). - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - - // The recovery point threshold in minutes. - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type InMagePolicyInput. -func (i *InMagePolicyInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return &PolicyProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageProtectedDiskDetails - InMage protected disk details. -type InMageProtectedDiskDetails struct { - // The disk capacity in bytes. - DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` - - // The disk id. - DiskID *string `json:"diskId,omitempty"` - - // The disk name. - DiskName *string `json:"diskName,omitempty"` - - // A value indicating whether disk is resized. - DiskResized *string `json:"diskResized,omitempty"` - - // The file system capacity in bytes. - FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` - - // The health error code for the disk. - HealthErrorCode *string `json:"healthErrorCode,omitempty"` - - // The last RPO calculated time. - LastRpoCalculatedTime *time.Time `json:"lastRpoCalculatedTime,omitempty"` - - // The Progress Health. - ProgressHealth *string `json:"progressHealth,omitempty"` - - // The Progress Status. - ProgressStatus *string `json:"progressStatus,omitempty"` - - // The protection stage. - ProtectionStage *string `json:"protectionStage,omitempty"` - - // The PS data transit in MB. - PsDataInMB *float64 `json:"psDataInMB,omitempty"` - - // The resync duration in seconds. - ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` - - // The resync last 15 minutes transferred bytes. - ResyncLast15MinutesTransferredBytes *int64 `json:"resyncLast15MinutesTransferredBytes,omitempty"` - - // The last data transfer time in UTC. - ResyncLastDataTransferTimeUTC *time.Time `json:"resyncLastDataTransferTimeUTC,omitempty"` - - // The resync processed bytes. - ResyncProcessedBytes *int64 `json:"resyncProcessedBytes,omitempty"` - - // The resync progress percentage. - ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` - - // A value indicating whether resync is required for this disk. - ResyncRequired *string `json:"resyncRequired,omitempty"` - - // The resync start time. - ResyncStartTime *time.Time `json:"resyncStartTime,omitempty"` - - // The resync total transferred bytes. - ResyncTotalTransferredBytes *int64 `json:"resyncTotalTransferredBytes,omitempty"` - - // The RPO in seconds. - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - - // The source data transit in MB. - SourceDataInMB *float64 `json:"sourceDataInMB,omitempty"` - - // The target data transit in MB. - TargetDataInMB *float64 `json:"targetDataInMB,omitempty"` -} - -// InMageRcmAgentUpgradeBlockingErrorDetails - InMageRcm source agent upgrade blocking error details. -type InMageRcmAgentUpgradeBlockingErrorDetails struct { - // READ-ONLY; The error code. - ErrorCode *string `json:"errorCode,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` - - // READ-ONLY; The error message parameters. - ErrorMessageParameters map[string]*string `json:"errorMessageParameters,omitempty" azure:"ro"` - - // READ-ONLY; The error tags. - ErrorTags map[string]*string `json:"errorTags,omitempty" azure:"ro"` - - // READ-ONLY; The possible causes. - PossibleCauses *string `json:"possibleCauses,omitempty" azure:"ro"` - - // READ-ONLY; The recommended action. - RecommendedAction *string `json:"recommendedAction,omitempty" azure:"ro"` -} - -// InMageRcmApplianceDetails - InMageRcm appliance details. -type InMageRcmApplianceDetails struct { - // READ-ONLY; The DRA. - Dra *DraDetails `json:"dra,omitempty" azure:"ro"` - - // READ-ONLY; The fabric ARM Id. - FabricArmID *string `json:"fabricArmId,omitempty" azure:"ro"` - - // READ-ONLY; The appliance Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The Mars agent. - MarsAgent *MarsAgentDetails `json:"marsAgent,omitempty" azure:"ro"` - - // READ-ONLY; The appliance name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The process server. - ProcessServer *ProcessServerDetails `json:"processServer,omitempty" azure:"ro"` - - // READ-ONLY; The push installer. - PushInstaller *PushInstallerDetails `json:"pushInstaller,omitempty" azure:"ro"` - - // READ-ONLY; The of RCM proxy. - RcmProxy *RcmProxyDetails `json:"rcmProxy,omitempty" azure:"ro"` - - // READ-ONLY; The replication agent. - ReplicationAgent *ReplicationAgentDetails `json:"replicationAgent,omitempty" azure:"ro"` - - // READ-ONLY; The reprotect agent. - ReprotectAgent *ReprotectAgentDetails `json:"reprotectAgent,omitempty" azure:"ro"` - - // READ-ONLY; The switch provider blocking error information. - SwitchProviderBlockingErrorDetails []*InMageRcmFabricSwitchProviderBlockingErrorDetails `json:"switchProviderBlockingErrorDetails,omitempty" azure:"ro"` -} - -// InMageRcmApplianceSpecificDetails - InMageRcm appliance specific details. -type InMageRcmApplianceSpecificDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // READ-ONLY; The list of appliances. - Appliances []*InMageRcmApplianceDetails `json:"appliances,omitempty" azure:"ro"` -} - -// GetApplianceSpecificDetails implements the ApplianceSpecificDetailsClassification interface for type InMageRcmApplianceSpecificDetails. -func (i *InMageRcmApplianceSpecificDetails) GetApplianceSpecificDetails() *ApplianceSpecificDetails { - return &ApplianceSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmApplyRecoveryPointInput - ApplyRecoveryPoint input specific to InMageRcm provider. -type InMageRcmApplyRecoveryPointInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The recovery point Id. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` -} - -// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface -// for type InMageRcmApplyRecoveryPointInput. -func (i *InMageRcmApplyRecoveryPointInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { - return &ApplyRecoveryPointProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmDiscoveredProtectedVMDetails - InMageRcm discovered protected VM details. -type InMageRcmDiscoveredProtectedVMDetails struct { - // READ-ONLY; The SDS created timestamp. - CreatedTimestamp *time.Time `json:"createdTimestamp,omitempty" azure:"ro"` - - // READ-ONLY; The list of datastores. - Datastores []*string `json:"datastores,omitempty" azure:"ro"` - - // READ-ONLY; The list of IP addresses. - IPAddresses []*string `json:"ipAddresses,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether the VM is deleted. - IsDeleted *bool `json:"isDeleted,omitempty" azure:"ro"` - - // READ-ONLY; The last time when SDS information discovered in SRS. - LastDiscoveryTimeInUTC *time.Time `json:"lastDiscoveryTimeInUtc,omitempty" azure:"ro"` - - // READ-ONLY; The VM's OS name. - OSName *string `json:"osName,omitempty" azure:"ro"` - - // READ-ONLY; The VM power status. - PowerStatus *string `json:"powerStatus,omitempty" azure:"ro"` - - // READ-ONLY; The SDS updated timestamp. - UpdatedTimestamp *time.Time `json:"updatedTimestamp,omitempty" azure:"ro"` - - // READ-ONLY; The VCenter fqdn. - VCenterFqdn *string `json:"vCenterFqdn,omitempty" azure:"ro"` - - // READ-ONLY; The VCenter Id. - VCenterID *string `json:"vCenterId,omitempty" azure:"ro"` - - // READ-ONLY; The VM fqdn. - VMFqdn *string `json:"vmFqdn,omitempty" azure:"ro"` - - // READ-ONLY; The VMware tools status. - VmwareToolsStatus *string `json:"vmwareToolsStatus,omitempty" azure:"ro"` -} - -// InMageRcmDiskInput - InMageRcm disk input. -type InMageRcmDiskInput struct { - // REQUIRED; The disk Id. - DiskID *string `json:"diskId,omitempty"` - - // REQUIRED; The disk type. - DiskType *DiskAccountType `json:"diskType,omitempty"` - - // REQUIRED; The log storage account ARM Id. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - - // The DiskEncryptionSet ARM Id. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` -} - -// InMageRcmDisksDefaultInput - InMageRcm disk input. -type InMageRcmDisksDefaultInput struct { - // REQUIRED; The disk type. - DiskType *DiskAccountType `json:"diskType,omitempty"` - - // REQUIRED; The log storage account ARM Id. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - - // The DiskEncryptionSet ARM Id. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` -} - -// InMageRcmEnableProtectionInput - InMageRcm specific enable protection input. -type InMageRcmEnableProtectionInput struct { - // REQUIRED; The ARM Id of discovered machine. - FabricDiscoveryMachineID *string `json:"fabricDiscoveryMachineId,omitempty"` - - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The process server Id. - ProcessServerID *string `json:"processServerId,omitempty"` - - // REQUIRED; The target resource group ARM Id. - TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` - - // The default disk input. - DisksDefault *InMageRcmDisksDefaultInput `json:"disksDefault,omitempty"` - - // The disks to include list. - DisksToInclude []*InMageRcmDiskInput `json:"disksToInclude,omitempty"` - - // The license type. - LicenseType *LicenseType `json:"licenseType,omitempty"` - - // The multi VM group name. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - - // The run-as account Id. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` - - // The target availability set ARM Id. - TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The target boot diagnostics storage account ARM Id. - TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` - - // The selected target network ARM Id. - TargetNetworkID *string `json:"targetNetworkId,omitempty"` - - // The target proximity placement group Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The selected target subnet name. - TargetSubnetName *string `json:"targetSubnetName,omitempty"` - - // The target VM name. - TargetVMName *string `json:"targetVmName,omitempty"` - - // The target VM size. - TargetVMSize *string `json:"targetVmSize,omitempty"` - - // The selected test network ARM Id. - TestNetworkID *string `json:"testNetworkId,omitempty"` - - // The selected test subnet name. - TestSubnetName *string `json:"testSubnetName,omitempty"` -} - -// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for -// type InMageRcmEnableProtectionInput. -func (i *InMageRcmEnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { - return &EnableProtectionProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmEventDetails - Event details for InMageRcm provider. -type InMageRcmEventDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // READ-ONLY; The appliance name. - ApplianceName *string `json:"applianceName,omitempty" azure:"ro"` - - // READ-ONLY; The component display name. - ComponentDisplayName *string `json:"componentDisplayName,omitempty" azure:"ro"` - - // READ-ONLY; The fabric name. - FabricName *string `json:"fabricName,omitempty" azure:"ro"` - - // READ-ONLY; The job Id. - JobID *string `json:"jobId,omitempty" azure:"ro"` - - // READ-ONLY; The latest agent version. - LatestAgentVersion *string `json:"latestAgentVersion,omitempty" azure:"ro"` - - // READ-ONLY; The protected item name. - ProtectedItemName *string `json:"protectedItemName,omitempty" azure:"ro"` - - // READ-ONLY; The server type. - ServerType *string `json:"serverType,omitempty" azure:"ro"` - - // READ-ONLY; The protected item name. - VMName *string `json:"vmName,omitempty" azure:"ro"` -} - -// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type InMageRcmEventDetails. -func (i *InMageRcmEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { - return &EventProviderSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmFabricCreationInput - InMageRcm fabric provider specific settings. -type InMageRcmFabricCreationInput struct { - // REQUIRED; Gets the class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The ARM Id of the physical site. - PhysicalSiteID *string `json:"physicalSiteId,omitempty"` - - // REQUIRED; The identity provider input for source agent authentication. - SourceAgentIdentity *IdentityProviderInput `json:"sourceAgentIdentity,omitempty"` - - // REQUIRED; The ARM Id of the VMware site. - VmwareSiteID *string `json:"vmwareSiteId,omitempty"` -} - -// GetFabricSpecificCreationInput implements the FabricSpecificCreationInputClassification interface for type InMageRcmFabricCreationInput. -func (i *InMageRcmFabricCreationInput) GetFabricSpecificCreationInput() *FabricSpecificCreationInput { - return &FabricSpecificCreationInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmFabricSpecificDetails - InMageRcm fabric specific details. -type InMageRcmFabricSpecificDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The source agent identity details. - SourceAgentIdentityDetails *IdentityProviderDetails `json:"sourceAgentIdentityDetails,omitempty"` - - // READ-ONLY; The list of agent details. - AgentDetails []*AgentDetails `json:"agentDetails,omitempty" azure:"ro"` - - // READ-ONLY; The control plane Uri. - ControlPlaneURI *string `json:"controlPlaneUri,omitempty" azure:"ro"` - - // READ-ONLY; The data plane Uri. - DataPlaneURI *string `json:"dataPlaneUri,omitempty" azure:"ro"` - - // READ-ONLY; The list of DRAs. - Dras []*DraDetails `json:"dras,omitempty" azure:"ro"` - - // READ-ONLY; The list of Mars agents. - MarsAgents []*MarsAgentDetails `json:"marsAgents,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of the physical site. - PhysicalSiteID *string `json:"physicalSiteId,omitempty" azure:"ro"` - - // READ-ONLY; The list of process servers. - ProcessServers []*ProcessServerDetails `json:"processServers,omitempty" azure:"ro"` - - // READ-ONLY; The list of push installers. - PushInstallers []*PushInstallerDetails `json:"pushInstallers,omitempty" azure:"ro"` - - // READ-ONLY; The list of RCM proxies. - RcmProxies []*RcmProxyDetails `json:"rcmProxies,omitempty" azure:"ro"` - - // READ-ONLY; The list of replication agents. - ReplicationAgents []*ReplicationAgentDetails `json:"replicationAgents,omitempty" azure:"ro"` - - // READ-ONLY; The list of reprotect agents. - ReprotectAgents []*ReprotectAgentDetails `json:"reprotectAgents,omitempty" azure:"ro"` - - // READ-ONLY; The service container Id. - ServiceContainerID *string `json:"serviceContainerId,omitempty" azure:"ro"` - - // READ-ONLY; The service endpoint. - ServiceEndpoint *string `json:"serviceEndpoint,omitempty" azure:"ro"` - - // READ-ONLY; The service resource Id. - ServiceResourceID *string `json:"serviceResourceId,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of the VMware site. - VmwareSiteID *string `json:"vmwareSiteId,omitempty" azure:"ro"` -} - -// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type InMageRcmFabricSpecificDetails. -func (i *InMageRcmFabricSpecificDetails) GetFabricSpecificDetails() *FabricSpecificDetails { - return &FabricSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmFabricSwitchProviderBlockingErrorDetails - InMageRcmFabric switch provider blocking error details. -type InMageRcmFabricSwitchProviderBlockingErrorDetails struct { - // READ-ONLY; The error code. - ErrorCode *string `json:"errorCode,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` - - // READ-ONLY; The error message parameters. - ErrorMessageParameters map[string]*string `json:"errorMessageParameters,omitempty" azure:"ro"` - - // READ-ONLY; The error tags. - ErrorTags map[string]*string `json:"errorTags,omitempty" azure:"ro"` - - // READ-ONLY; The possible causes. - PossibleCauses *string `json:"possibleCauses,omitempty" azure:"ro"` - - // READ-ONLY; The recommended action. - RecommendedAction *string `json:"recommendedAction,omitempty" azure:"ro"` -} - -// InMageRcmFailbackDiscoveredProtectedVMDetails - InMageRcmFailback discovered VM details. -type InMageRcmFailbackDiscoveredProtectedVMDetails struct { - // READ-ONLY; The SDS created timestamp. - CreatedTimestamp *time.Time `json:"createdTimestamp,omitempty" azure:"ro"` - - // READ-ONLY; The list of datastores. - Datastores []*string `json:"datastores,omitempty" azure:"ro"` - - // READ-ONLY; The list of IP addresses. - IPAddresses []*string `json:"ipAddresses,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether the VM is deleted. - IsDeleted *bool `json:"isDeleted,omitempty" azure:"ro"` - - // READ-ONLY; The last time when SDS information discovered in SRS. - LastDiscoveryTimeInUTC *time.Time `json:"lastDiscoveryTimeInUtc,omitempty" azure:"ro"` - - // READ-ONLY; The VM's OS name. - OSName *string `json:"osName,omitempty" azure:"ro"` - - // READ-ONLY; The VM power status. - PowerStatus *string `json:"powerStatus,omitempty" azure:"ro"` - - // READ-ONLY; The SDS updated timestamp. - UpdatedTimestamp *time.Time `json:"updatedTimestamp,omitempty" azure:"ro"` - - // READ-ONLY; The VCenter fqdn. - VCenterFqdn *string `json:"vCenterFqdn,omitempty" azure:"ro"` - - // READ-ONLY; The VCenter Id. - VCenterID *string `json:"vCenterId,omitempty" azure:"ro"` - - // READ-ONLY; The VM fqdn. - VMFqdn *string `json:"vmFqdn,omitempty" azure:"ro"` - - // READ-ONLY; The VMware tools status. - VmwareToolsStatus *string `json:"vmwareToolsStatus,omitempty" azure:"ro"` -} - -// InMageRcmFailbackEventDetails - Event details for InMageRcmFailback provider. -type InMageRcmFailbackEventDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // READ-ONLY; The appliance name. - ApplianceName *string `json:"applianceName,omitempty" azure:"ro"` - - // READ-ONLY; The component display name. - ComponentDisplayName *string `json:"componentDisplayName,omitempty" azure:"ro"` - - // READ-ONLY; The protected item name. - ProtectedItemName *string `json:"protectedItemName,omitempty" azure:"ro"` - - // READ-ONLY; The server type. - ServerType *string `json:"serverType,omitempty" azure:"ro"` - - // READ-ONLY; The protected item name. - VMName *string `json:"vmName,omitempty" azure:"ro"` -} - -// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type InMageRcmFailbackEventDetails. -func (i *InMageRcmFailbackEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { - return &EventProviderSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmFailbackMobilityAgentDetails - InMageRcmFailback mobility agent details. -type InMageRcmFailbackMobilityAgentDetails struct { - // READ-ONLY; The agent version expiry date. - AgentVersionExpiryDate *time.Time `json:"agentVersionExpiryDate,omitempty" azure:"ro"` - - // READ-ONLY; The driver version. - DriverVersion *string `json:"driverVersion,omitempty" azure:"ro"` - - // READ-ONLY; The driver version expiry date. - DriverVersionExpiryDate *time.Time `json:"driverVersionExpiryDate,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether agent is upgradeable or not. - IsUpgradeable *string `json:"isUpgradeable,omitempty" azure:"ro"` - - // READ-ONLY; The time of the last heartbeat received from the agent. - LastHeartbeatUTC *time.Time `json:"lastHeartbeatUtc,omitempty" azure:"ro"` - - // READ-ONLY; The latest upgradeable version available without reboot. - LatestUpgradableVersionWithoutReboot *string `json:"latestUpgradableVersionWithoutReboot,omitempty" azure:"ro"` - - // READ-ONLY; The latest agent version available. - LatestVersion *string `json:"latestVersion,omitempty" azure:"ro"` - - // READ-ONLY; The whether update is possible or not. - ReasonsBlockingUpgrade []*AgentUpgradeBlockedReason `json:"reasonsBlockingUpgrade,omitempty" azure:"ro"` - - // READ-ONLY; The agent version. - Version *string `json:"version,omitempty" azure:"ro"` -} - -// InMageRcmFailbackNicDetails - InMageRcmFailback NIC details. -type InMageRcmFailbackNicDetails struct { - // READ-ONLY; The adapter type. - AdapterType *string `json:"adapterType,omitempty" azure:"ro"` - - // READ-ONLY; The mac address. - MacAddress *string `json:"macAddress,omitempty" azure:"ro"` - - // READ-ONLY; The network name. - NetworkName *string `json:"networkName,omitempty" azure:"ro"` - - // READ-ONLY; The IP address. - SourceIPAddress *string `json:"sourceIpAddress,omitempty" azure:"ro"` -} - -// InMageRcmFailbackPlannedFailoverProviderInput - Provider specific input for InMageRcmFailback failover. -type InMageRcmFailbackPlannedFailoverProviderInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The recovery point type. - RecoveryPointType *InMageRcmFailbackRecoveryPointType `json:"recoveryPointType,omitempty"` -} - -// GetPlannedFailoverProviderSpecificFailoverInput implements the PlannedFailoverProviderSpecificFailoverInputClassification -// interface for type InMageRcmFailbackPlannedFailoverProviderInput. -func (i *InMageRcmFailbackPlannedFailoverProviderInput) GetPlannedFailoverProviderSpecificFailoverInput() *PlannedFailoverProviderSpecificFailoverInput { - return &PlannedFailoverProviderSpecificFailoverInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmFailbackPolicyCreationInput - InMageRcmFailback policy creation input. -type InMageRcmFailbackPolicyCreationInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The app consistent snapshot frequency (in minutes). - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency (in minutes). - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type InMageRcmFailbackPolicyCreationInput. -func (i *InMageRcmFailbackPolicyCreationInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return &PolicyProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmFailbackPolicyDetails - InMageRcm failback specific policy details. -type InMageRcmFailbackPolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The app consistent snapshot frequency in minutes. - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency in minutes. - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type InMageRcmFailbackPolicyDetails. -func (i *InMageRcmFailbackPolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmFailbackProtectedDiskDetails - InMageRcmFailback protected disk details. -type InMageRcmFailbackProtectedDiskDetails struct { - // The initial replication details. - IrDetails *InMageRcmFailbackSyncDetails `json:"irDetails,omitempty"` - - // The resync details. - ResyncDetails *InMageRcmFailbackSyncDetails `json:"resyncDetails,omitempty"` - - // READ-ONLY; The disk capacity in bytes. - CapacityInBytes *int64 `json:"capacityInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The data pending at source agent in MB. - DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty" azure:"ro"` - - // READ-ONLY; The data pending in log data store in MB. - DataPendingInLogDataStoreInMB *float64 `json:"dataPendingInLogDataStoreInMB,omitempty" azure:"ro"` - - // READ-ONLY; The disk Id (reported by source agent). - DiskID *string `json:"diskId,omitempty" azure:"ro"` - - // READ-ONLY; The disk name. - DiskName *string `json:"diskName,omitempty" azure:"ro"` - - // READ-ONLY; The disk Uuid (reported by vCenter). - DiskUUID *string `json:"diskUuid,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether initial replication is complete or not. - IsInitialReplicationComplete *string `json:"isInitialReplicationComplete,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether the disk is the OS disk. - IsOSDisk *string `json:"isOSDisk,omitempty" azure:"ro"` - - // READ-ONLY; The last sync time. - LastSyncTime *time.Time `json:"lastSyncTime,omitempty" azure:"ro"` -} - -// InMageRcmFailbackReplicationDetails - InMageRcmFailback provider specific details. -type InMageRcmFailbackReplicationDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // The discovered VM information. - DiscoveredVMDetails *InMageRcmFailbackDiscoveredProtectedVMDetails `json:"discoveredVmDetails,omitempty"` - - // The mobility agent information. - MobilityAgentDetails *InMageRcmFailbackMobilityAgentDetails `json:"mobilityAgentDetails,omitempty"` - - // The list of protected disks. - ProtectedDisks []*InMageRcmFailbackProtectedDiskDetails `json:"protectedDisks,omitempty"` - - // The network details. - VMNics []*InMageRcmFailbackNicDetails `json:"vmNics,omitempty"` - - // READ-ONLY; The ARM Id of the azure VM. - AzureVirtualMachineID *string `json:"azureVirtualMachineId,omitempty" azure:"ro"` - - // READ-ONLY; The initial replication processed bytes. This includes sum of total bytes transferred and matched bytes on all - // selected disks in source VM. - InitialReplicationProcessedBytes *int64 `json:"initialReplicationProcessedBytes,omitempty" azure:"ro"` - - // READ-ONLY; The initial replication progress health. - InitialReplicationProgressHealth *VMReplicationProgressHealth `json:"initialReplicationProgressHealth,omitempty" azure:"ro"` - - // READ-ONLY; The initial replication progress percentage. - InitialReplicationProgressPercentage *int32 `json:"initialReplicationProgressPercentage,omitempty" azure:"ro"` - - // READ-ONLY; The initial replication transferred bytes from source VM to target for all selected disks on source VM. - InitialReplicationTransferredBytes *int64 `json:"initialReplicationTransferredBytes,omitempty" azure:"ro"` - - // READ-ONLY; The virtual machine internal identifier. - InternalIdentifier *string `json:"internalIdentifier,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether agent registration was successful after failover. - IsAgentRegistrationSuccessfulAfterFailover *bool `json:"isAgentRegistrationSuccessfulAfterFailover,omitempty" azure:"ro"` - - // READ-ONLY; The last planned failover start time. - LastPlannedFailoverStartTime *time.Time `json:"lastPlannedFailoverStartTime,omitempty" azure:"ro"` - - // READ-ONLY; The last planned failover status. - LastPlannedFailoverStatus *PlannedFailoverStatus `json:"lastPlannedFailoverStatus,omitempty" azure:"ro"` - - // READ-ONLY; The policy friendly name used by the forward replication. - LastUsedPolicyFriendlyName *string `json:"lastUsedPolicyFriendlyName,omitempty" azure:"ro"` - - // READ-ONLY; The policy Id used by the forward replication. - LastUsedPolicyID *string `json:"lastUsedPolicyId,omitempty" azure:"ro"` - - // READ-ONLY; The log storage account ARM Id. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty" azure:"ro"` - - // READ-ONLY; The multi VM group name. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty" azure:"ro"` - - // READ-ONLY; The type of the OS on the VM. - OSType *string `json:"osType,omitempty" azure:"ro"` - - // READ-ONLY; The reprotect agent Id. - ReprotectAgentID *string `json:"reprotectAgentId,omitempty" azure:"ro"` - - // READ-ONLY; The reprotect agent name. - ReprotectAgentName *string `json:"reprotectAgentName,omitempty" azure:"ro"` - - // READ-ONLY; The resync processed bytes. This includes sum of total bytes transferred and matched bytes on all selected disks - // in source VM. - ResyncProcessedBytes *int64 `json:"resyncProcessedBytes,omitempty" azure:"ro"` - - // READ-ONLY; The resync progress health. - ResyncProgressHealth *VMReplicationProgressHealth `json:"resyncProgressHealth,omitempty" azure:"ro"` - - // READ-ONLY; The resync progress percentage. - ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether resync is required. - ResyncRequired *string `json:"resyncRequired,omitempty" azure:"ro"` - - // READ-ONLY; The resync state. - ResyncState *ResyncState `json:"resyncState,omitempty" azure:"ro"` - - // READ-ONLY; The resync transferred bytes from source VM to target for all selected disks on source VM. - ResyncTransferredBytes *int64 `json:"resyncTransferredBytes,omitempty" azure:"ro"` - - // READ-ONLY; The target datastore name. - TargetDataStoreName *string `json:"targetDataStoreName,omitempty" azure:"ro"` - - // READ-ONLY; The target VM name. - TargetVMName *string `json:"targetVmName,omitempty" azure:"ro"` - - // READ-ONLY; The target vCenter Id. - TargetvCenterID *string `json:"targetvCenterId,omitempty" azure:"ro"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// InMageRcmFailbackReplicationDetails. -func (i *InMageRcmFailbackReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return &ReplicationProviderSpecificSettings{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmFailbackReprotectInput - InMageRcmFailback specific provider input. -type InMageRcmFailbackReprotectInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The Policy Id. - PolicyID *string `json:"policyId,omitempty"` - - // REQUIRED; The process server Id. - ProcessServerID *string `json:"processServerId,omitempty"` - - // The run as account Id. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` -} - -// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface -// for type InMageRcmFailbackReprotectInput. -func (i *InMageRcmFailbackReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { - return &ReverseReplicationProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmFailbackSyncDetails - InMageRcmFailback disk level sync details. -type InMageRcmFailbackSyncDetails struct { - // READ-ONLY; The bytes transferred in last 15 minutes from source VM to target. - Last15MinutesTransferredBytes *int64 `json:"last15MinutesTransferredBytes,omitempty" azure:"ro"` - - // READ-ONLY; The time of the last data transfer from source VM to target. - LastDataTransferTimeUTC *string `json:"lastDataTransferTimeUtc,omitempty" azure:"ro"` - - // READ-ONLY; The last refresh time. - LastRefreshTime *string `json:"lastRefreshTime,omitempty" azure:"ro"` - - // READ-ONLY; The total processed bytes. This includes bytes that are transferred from source VM to target and matched bytes. - ProcessedBytes *int64 `json:"processedBytes,omitempty" azure:"ro"` - - // READ-ONLY; The progress health. - ProgressHealth *DiskReplicationProgressHealth `json:"progressHealth,omitempty" azure:"ro"` - - // READ-ONLY; Progress in percentage. Progress percentage is calculated based on processed bytes. - ProgressPercentage *int32 `json:"progressPercentage,omitempty" azure:"ro"` - - // READ-ONLY; The start time. - StartTime *string `json:"startTime,omitempty" azure:"ro"` - - // READ-ONLY; The transferred bytes from source VM to azure for the disk. - TransferredBytes *int64 `json:"transferredBytes,omitempty" azure:"ro"` -} - -// InMageRcmLastAgentUpgradeErrorDetails - InMageRcm last source agent upgrade error details. -type InMageRcmLastAgentUpgradeErrorDetails struct { - // READ-ONLY; The error code. - ErrorCode *string `json:"errorCode,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` - - // READ-ONLY; The error message parameters. - ErrorMessageParameters map[string]*string `json:"errorMessageParameters,omitempty" azure:"ro"` - - // READ-ONLY; The error tags. - ErrorTags map[string]*string `json:"errorTags,omitempty" azure:"ro"` - - // READ-ONLY; The possible causes. - PossibleCauses *string `json:"possibleCauses,omitempty" azure:"ro"` - - // READ-ONLY; The recommended action. - RecommendedAction *string `json:"recommendedAction,omitempty" azure:"ro"` -} - -// InMageRcmMobilityAgentDetails - InMageRcm mobility agent details. -type InMageRcmMobilityAgentDetails struct { - // READ-ONLY; The agent version expiry date. - AgentVersionExpiryDate *time.Time `json:"agentVersionExpiryDate,omitempty" azure:"ro"` - - // READ-ONLY; The driver version. - DriverVersion *string `json:"driverVersion,omitempty" azure:"ro"` - - // READ-ONLY; The driver version expiry date. - DriverVersionExpiryDate *time.Time `json:"driverVersionExpiryDate,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether agent is upgradeable or not. - IsUpgradeable *string `json:"isUpgradeable,omitempty" azure:"ro"` - - // READ-ONLY; The time of the last heartbeat received from the agent. - LastHeartbeatUTC *time.Time `json:"lastHeartbeatUtc,omitempty" azure:"ro"` - - // READ-ONLY; The latest agent version release date. - LatestAgentReleaseDate *string `json:"latestAgentReleaseDate,omitempty" azure:"ro"` - - // READ-ONLY; The latest upgradeable version available without reboot. - LatestUpgradableVersionWithoutReboot *string `json:"latestUpgradableVersionWithoutReboot,omitempty" azure:"ro"` - - // READ-ONLY; The latest agent version available. - LatestVersion *string `json:"latestVersion,omitempty" azure:"ro"` - - // READ-ONLY; The whether update is possible or not. - ReasonsBlockingUpgrade []*AgentUpgradeBlockedReason `json:"reasonsBlockingUpgrade,omitempty" azure:"ro"` - - // READ-ONLY; The agent version. - Version *string `json:"version,omitempty" azure:"ro"` -} - -// InMageRcmNicDetails - InMageRcm NIC details. -type InMageRcmNicDetails struct { - // A value indicating whether this is the primary NIC. - IsPrimaryNic *string `json:"isPrimaryNic,omitempty"` - - // A value indicating whether this NIC is selected for failover. - IsSelectedForFailover *string `json:"isSelectedForFailover,omitempty"` - - // The target IP address. - TargetIPAddress *string `json:"targetIPAddress,omitempty"` - - // The target IP address type. - TargetIPAddressType *EthernetAddressType `json:"targetIPAddressType,omitempty"` - - // Target subnet name. - TargetSubnetName *string `json:"targetSubnetName,omitempty"` - - // The test IP address. - TestIPAddress *string `json:"testIPAddress,omitempty"` - - // The test IP address type. - TestIPAddressType *EthernetAddressType `json:"testIPAddressType,omitempty"` - - // Test subnet name. - TestSubnetName *string `json:"testSubnetName,omitempty"` - - // READ-ONLY; The NIC Id. - NicID *string `json:"nicId,omitempty" azure:"ro"` - - // READ-ONLY; The source IP address. - SourceIPAddress *string `json:"sourceIPAddress,omitempty" azure:"ro"` - - // READ-ONLY; The source IP address type. - SourceIPAddressType *EthernetAddressType `json:"sourceIPAddressType,omitempty" azure:"ro"` - - // READ-ONLY; Source network Id. - SourceNetworkID *string `json:"sourceNetworkId,omitempty" azure:"ro"` - - // READ-ONLY; Source subnet name. - SourceSubnetName *string `json:"sourceSubnetName,omitempty" azure:"ro"` -} - -// InMageRcmNicInput - InMageRcm NIC input. -type InMageRcmNicInput struct { - // REQUIRED; A value indicating whether this is the primary NIC. - IsPrimaryNic *string `json:"isPrimaryNic,omitempty"` - - // REQUIRED; The NIC Id. - NicID *string `json:"nicId,omitempty"` - - // A value indicating whether this NIC is selected for failover. - IsSelectedForFailover *string `json:"isSelectedForFailover,omitempty"` - - // The target static IP address. - TargetStaticIPAddress *string `json:"targetStaticIPAddress,omitempty"` - - // Target subnet name. - TargetSubnetName *string `json:"targetSubnetName,omitempty"` - - // The test static IP address. - TestStaticIPAddress *string `json:"testStaticIPAddress,omitempty"` - - // The test subnet name. - TestSubnetName *string `json:"testSubnetName,omitempty"` -} - -// InMageRcmPolicyCreationInput - InMageRcm policy creation input. -type InMageRcmPolicyCreationInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The app consistent snapshot frequency (in minutes). - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency (in minutes). - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - - // A value indicating whether multi-VM sync has to be enabled. - EnableMultiVMSync *string `json:"enableMultiVmSync,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type InMageRcmPolicyCreationInput. -func (i *InMageRcmPolicyCreationInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return &PolicyProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmPolicyDetails - InMageRcm specific policy details. -type InMageRcmPolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The app consistent snapshot frequency in minutes. - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency in minutes. - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - - // A value indicating whether multi-VM sync has to be enabled. - EnableMultiVMSync *string `json:"enableMultiVmSync,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type InMageRcmPolicyDetails. -func (i *InMageRcmPolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmProtectedDiskDetails - InMageRcm protected disk details. -type InMageRcmProtectedDiskDetails struct { - // The disk type. - DiskType *DiskAccountType `json:"diskType,omitempty"` - - // The initial replication details. - IrDetails *InMageRcmSyncDetails `json:"irDetails,omitempty"` - - // The resync details. - ResyncDetails *InMageRcmSyncDetails `json:"resyncDetails,omitempty"` - - // READ-ONLY; The disk capacity in bytes. - CapacityInBytes *int64 `json:"capacityInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The data pending at source agent in MB. - DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty" azure:"ro"` - - // READ-ONLY; The data pending in log data store in MB. - DataPendingInLogDataStoreInMB *float64 `json:"dataPendingInLogDataStoreInMB,omitempty" azure:"ro"` - - // READ-ONLY; The DiskEncryptionSet ARM Id. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty" azure:"ro"` - - // READ-ONLY; The disk Id. - DiskID *string `json:"diskId,omitempty" azure:"ro"` - - // READ-ONLY; The disk name. - DiskName *string `json:"diskName,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether initial replication is complete or not. - IsInitialReplicationComplete *string `json:"isInitialReplicationComplete,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether the disk is the OS disk. - IsOSDisk *string `json:"isOSDisk,omitempty" azure:"ro"` - - // READ-ONLY; The log storage account ARM Id. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty" azure:"ro"` - - // READ-ONLY; The uri of the seed blob. - SeedBlobURI *string `json:"seedBlobUri,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of the seed managed disk. - SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of the target managed disk. - TargetManagedDiskID *string `json:"targetManagedDiskId,omitempty" azure:"ro"` -} - -// InMageRcmProtectionContainerMappingDetails - InMageRcm provider specific container mapping details. -type InMageRcmProtectionContainerMappingDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // READ-ONLY; A value indicating whether the flag for enable agent auto upgrade. - EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty" azure:"ro"` -} - -// GetProtectionContainerMappingProviderSpecificDetails implements the ProtectionContainerMappingProviderSpecificDetailsClassification -// interface for type InMageRcmProtectionContainerMappingDetails. -func (i *InMageRcmProtectionContainerMappingDetails) GetProtectionContainerMappingProviderSpecificDetails() *ProtectionContainerMappingProviderSpecificDetails { - return &ProtectionContainerMappingProviderSpecificDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmRecoveryPointDetails - InMageRcm provider specific recovery point details. -type InMageRcmRecoveryPointDetails struct { - // REQUIRED; Gets the provider type. - InstanceType *string `json:"instanceType,omitempty"` - - // READ-ONLY; A value indicating whether the recovery point is multi VM consistent. - IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty" azure:"ro"` -} - -// GetProviderSpecificRecoveryPointDetails implements the ProviderSpecificRecoveryPointDetailsClassification interface for -// type InMageRcmRecoveryPointDetails. -func (i *InMageRcmRecoveryPointDetails) GetProviderSpecificRecoveryPointDetails() *ProviderSpecificRecoveryPointDetails { - return &ProviderSpecificRecoveryPointDetails{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmReplicationDetails - InMageRcm provider specific details. -type InMageRcmReplicationDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // The agent upgrade blocking error information. - AgentUpgradeBlockingErrorDetails []*InMageRcmAgentUpgradeBlockingErrorDetails `json:"agentUpgradeBlockingErrorDetails,omitempty"` - - // The discovered VM details. - DiscoveredVMDetails *InMageRcmDiscoveredProtectedVMDetails `json:"discoveredVmDetails,omitempty"` - - // The last agent upgrade error information. - LastAgentUpgradeErrorDetails []*InMageRcmLastAgentUpgradeErrorDetails `json:"lastAgentUpgradeErrorDetails,omitempty"` - - // License Type of the VM to be used. - LicenseType *string `json:"licenseType,omitempty"` - - // The mobility agent information. - MobilityAgentDetails *InMageRcmMobilityAgentDetails `json:"mobilityAgentDetails,omitempty"` - - // The list of protected disks. - ProtectedDisks []*InMageRcmProtectedDiskDetails `json:"protectedDisks,omitempty"` - - // The target availability set Id. - TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The target boot diagnostics storage account ARM Id. - TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` - - // The target location. - TargetLocation *string `json:"targetLocation,omitempty"` - - // The target network Id. - TargetNetworkID *string `json:"targetNetworkId,omitempty"` - - // The target proximity placement group Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The target resource group Id. - TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` - - // Target VM name. - TargetVMName *string `json:"targetVmName,omitempty"` - - // The target VM size. - TargetVMSize *string `json:"targetVmSize,omitempty"` - - // The test network Id. - TestNetworkID *string `json:"testNetworkId,omitempty"` - - // The network details. - VMNics []*InMageRcmNicDetails `json:"vmNics,omitempty"` - - // READ-ONLY; The agent version to which last agent upgrade was attempted. - AgentUpgradeAttemptToVersion *string `json:"agentUpgradeAttemptToVersion,omitempty" azure:"ro"` - - // READ-ONLY; The agent upgrade job Id. - AgentUpgradeJobID *string `json:"agentUpgradeJobId,omitempty" azure:"ro"` - - // READ-ONLY; The agent auto upgrade state. - AgentUpgradeState *MobilityAgentUpgradeState `json:"agentUpgradeState,omitempty" azure:"ro"` - - // READ-ONLY; The allocated memory in MB. - AllocatedMemoryInMB *float64 `json:"allocatedMemoryInMB,omitempty" azure:"ro"` - - // READ-ONLY; The type of the discovered VM. - DiscoveryType *string `json:"discoveryType,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of the discovered VM. - FabricDiscoveryMachineID *string `json:"fabricDiscoveryMachineId,omitempty" azure:"ro"` - - // READ-ONLY; The recovery point Id to which the VM was failed over. - FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty" azure:"ro"` - - // READ-ONLY; The firmware type. - FirmwareType *string `json:"firmwareType,omitempty" azure:"ro"` - - // READ-ONLY; The initial replication processed bytes. This includes sum of total bytes transferred and matched bytes on all - // selected disks in source VM. - InitialReplicationProcessedBytes *int64 `json:"initialReplicationProcessedBytes,omitempty" azure:"ro"` - - // READ-ONLY; The initial replication progress health. - InitialReplicationProgressHealth *VMReplicationProgressHealth `json:"initialReplicationProgressHealth,omitempty" azure:"ro"` - - // READ-ONLY; The initial replication progress percentage. This is calculated based on total bytes processed for all disks - // in the source VM. - InitialReplicationProgressPercentage *int32 `json:"initialReplicationProgressPercentage,omitempty" azure:"ro"` - - // READ-ONLY; The initial replication transferred bytes from source VM to azure for all selected disks on source VM. - InitialReplicationTransferredBytes *int64 `json:"initialReplicationTransferredBytes,omitempty" azure:"ro"` - - // READ-ONLY; The virtual machine internal identifier. - InternalIdentifier *string `json:"internalIdentifier,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether agent registration was successful after failover. - IsAgentRegistrationSuccessfulAfterFailover *bool `json:"isAgentRegistrationSuccessfulAfterFailover,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether last agent upgrade was successful or not. - IsLastUpgradeSuccessful *string `json:"isLastUpgradeSuccessful,omitempty" azure:"ro"` - - // READ-ONLY; The last agent upgrade type. - LastAgentUpgradeType *string `json:"lastAgentUpgradeType,omitempty" azure:"ro"` - - // READ-ONLY; The last recovery point Id. - LastRecoveryPointID *string `json:"lastRecoveryPointId,omitempty" azure:"ro"` - - // READ-ONLY; The last recovery point received time. - LastRecoveryPointReceived *time.Time `json:"lastRecoveryPointReceived,omitempty" azure:"ro"` - - // READ-ONLY; The last recovery point objective calculated time. - LastRpoCalculatedTime *time.Time `json:"lastRpoCalculatedTime,omitempty" azure:"ro"` - - // READ-ONLY; The last recovery point objective value. - LastRpoInSeconds *int64 `json:"lastRpoInSeconds,omitempty" azure:"ro"` - - // READ-ONLY; The multi VM group name. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty" azure:"ro"` - - // READ-ONLY; The type of the OS on the VM. - OSType *string `json:"osType,omitempty" azure:"ro"` - - // READ-ONLY; The IP address of the primary network interface. - PrimaryNicIPAddress *string `json:"primaryNicIpAddress,omitempty" azure:"ro"` - - // READ-ONLY; The process server Id. - ProcessServerID *string `json:"processServerId,omitempty" azure:"ro"` - - // READ-ONLY; The process server name. - ProcessServerName *string `json:"processServerName,omitempty" azure:"ro"` - - // READ-ONLY; The processor core count. - ProcessorCoreCount *int32 `json:"processorCoreCount,omitempty" azure:"ro"` - - // READ-ONLY; The resync processed bytes. This includes sum of total bytes transferred and matched bytes on all selected disks - // in source VM. - ResyncProcessedBytes *int64 `json:"resyncProcessedBytes,omitempty" azure:"ro"` - - // READ-ONLY; The resync progress health. - ResyncProgressHealth *VMReplicationProgressHealth `json:"resyncProgressHealth,omitempty" azure:"ro"` - - // READ-ONLY; The resync progress percentage. This is calculated based on total bytes processed for all disks in the source - // VM. - ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether resync is required. - ResyncRequired *string `json:"resyncRequired,omitempty" azure:"ro"` - - // READ-ONLY; The resync state. - ResyncState *ResyncState `json:"resyncState,omitempty" azure:"ro"` - - // READ-ONLY; The resync transferred bytes from source VM to azure for all selected disks on source VM. - ResyncTransferredBytes *int64 `json:"resyncTransferredBytes,omitempty" azure:"ro"` - - // READ-ONLY; The run-as account Id. - RunAsAccountID *string `json:"runAsAccountId,omitempty" azure:"ro"` - - // READ-ONLY; The replication storage account ARM Id. This is applicable only for the blob based replication test hook. - StorageAccountID *string `json:"storageAccountId,omitempty" azure:"ro"` - - // READ-ONLY; The target generation. - TargetGeneration *string `json:"targetGeneration,omitempty" azure:"ro"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// InMageRcmReplicationDetails. -func (i *InMageRcmReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return &ReplicationProviderSpecificSettings{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmReprotectInput - InMageRcm specific provider input. -type InMageRcmReprotectInput struct { - // REQUIRED; The target datastore name. - DatastoreName *string `json:"datastoreName,omitempty"` - - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The log storage account ARM Id. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - - // REQUIRED; The reprotect agent Id. - ReprotectAgentID *string `json:"reprotectAgentId,omitempty"` - - // The Policy Id. - PolicyID *string `json:"policyId,omitempty"` -} - -// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface -// for type InMageRcmReprotectInput. -func (i *InMageRcmReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { - return &ReverseReplicationProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmSyncDetails - InMageRcm disk level sync details. -type InMageRcmSyncDetails struct { - // READ-ONLY; The bytes transferred in last 15 minutes from source VM to azure. - Last15MinutesTransferredBytes *int64 `json:"last15MinutesTransferredBytes,omitempty" azure:"ro"` - - // READ-ONLY; The time of the last data transfer from source VM to azure. - LastDataTransferTimeUTC *string `json:"lastDataTransferTimeUtc,omitempty" azure:"ro"` - - // READ-ONLY; The last refresh time. - LastRefreshTime *string `json:"lastRefreshTime,omitempty" azure:"ro"` - - // READ-ONLY; The total processed bytes. This includes bytes that are transferred from source VM to azure and matched bytes. - ProcessedBytes *int64 `json:"processedBytes,omitempty" azure:"ro"` - - // READ-ONLY; The progress health. - ProgressHealth *DiskReplicationProgressHealth `json:"progressHealth,omitempty" azure:"ro"` - - // READ-ONLY; Progress in percentage. Progress percentage is calculated based on processed bytes. - ProgressPercentage *int32 `json:"progressPercentage,omitempty" azure:"ro"` - - // READ-ONLY; The start time. - StartTime *string `json:"startTime,omitempty" azure:"ro"` - - // READ-ONLY; The transferred bytes from source VM to azure for the disk. - TransferredBytes *int64 `json:"transferredBytes,omitempty" azure:"ro"` -} - -// InMageRcmTestFailoverInput - InMageRcm provider specific input for test failover. -type InMageRcmTestFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The test network Id. - NetworkID *string `json:"networkId,omitempty"` - - // The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null - // should be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` -} - -// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type -// InMageRcmTestFailoverInput. -func (i *InMageRcmTestFailoverInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { - return &TestFailoverProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmUnplannedFailoverInput - InMageRcm provider specific input for unplanned failover. -type InMageRcmUnplannedFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; A value indicating whether VM is to be shutdown. - PerformShutdown *string `json:"performShutdown,omitempty"` - - // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should - // be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` -} - -// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface -// for type InMageRcmUnplannedFailoverInput. -func (i *InMageRcmUnplannedFailoverInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { - return &UnplannedFailoverProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmUpdateApplianceForReplicationProtectedItemInput - InMageRcm provider specific input to update appliance for replication -// protected item. -type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The run as account Id. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` -} - -// GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput implements the UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification -// interface for type InMageRcmUpdateApplianceForReplicationProtectedItemInput. -func (i *InMageRcmUpdateApplianceForReplicationProtectedItemInput) GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput() *UpdateApplianceForReplicationProtectedItemProviderSpecificInput { - return &UpdateApplianceForReplicationProtectedItemProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmUpdateContainerMappingInput - InMageRcm update protection container mapping. -type InMageRcmUpdateContainerMappingInput struct { - // REQUIRED; A value indicating whether agent auto upgrade has to be enabled. - EnableAgentAutoUpgrade *string `json:"enableAgentAutoUpgrade,omitempty"` - - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetReplicationProviderSpecificUpdateContainerMappingInput implements the ReplicationProviderSpecificUpdateContainerMappingInputClassification -// interface for type InMageRcmUpdateContainerMappingInput. -func (i *InMageRcmUpdateContainerMappingInput) GetReplicationProviderSpecificUpdateContainerMappingInput() *ReplicationProviderSpecificUpdateContainerMappingInput { - return &ReplicationProviderSpecificUpdateContainerMappingInput{ - InstanceType: i.InstanceType, - } -} - -// InMageRcmUpdateReplicationProtectedItemInput - InMageRcm provider specific input to update replication protected item. -type InMageRcmUpdateReplicationProtectedItemInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The license type. - LicenseType *LicenseType `json:"licenseType,omitempty"` - - // The target availability set ARM Id. - TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The target boot diagnostics storage account ARM Id. - TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` - - // The target network ARM Id. - TargetNetworkID *string `json:"targetNetworkId,omitempty"` - - // The target proximity placement group Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The target resource group ARM Id. - TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` - - // The target VM name. - TargetVMName *string `json:"targetVmName,omitempty"` - - // The target VM size. - TargetVMSize *string `json:"targetVmSize,omitempty"` - - // The test network ARM Id. - TestNetworkID *string `json:"testNetworkId,omitempty"` - - // The list of NIC details. - VMNics []*InMageRcmNicInput `json:"vmNics,omitempty"` -} - -// GetUpdateReplicationProtectedItemProviderInput implements the UpdateReplicationProtectedItemProviderInputClassification -// interface for type InMageRcmUpdateReplicationProtectedItemInput. -func (i *InMageRcmUpdateReplicationProtectedItemInput) GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput { - return &UpdateReplicationProtectedItemProviderInput{ - InstanceType: i.InstanceType, - } -} - -// InMageReplicationDetails - InMage provider specific settings. -type InMageReplicationDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // The active location of the VM. If the VM is being protected from Azure, this field will take values from { Azure, OnPrem - // }. If the VM is being protected between two data-centers, this field will be - // OnPrem always. - ActiveSiteType *string `json:"activeSiteType,omitempty"` - - // The agent details. - AgentDetails *InMageAgentDetails `json:"agentDetails,omitempty"` - - // A value indicating the underlying Azure storage account. If the VM is not running in Azure, this value shall be set to - // null. - AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"` - - // The compressed data change rate in MB. - CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` - - // The collection of Consistency points. - ConsistencyPoints map[string]*time.Time `json:"consistencyPoints,omitempty"` - - // The datastores of the on-premise machine Value can be list of strings that contain datastore names. - Datastores []*string `json:"datastores,omitempty"` - - // A value indicating the discovery type of the machine. - DiscoveryType *string `json:"discoveryType,omitempty"` - - // A value indicating whether any disk is resized for this VM. - DiskResized *string `json:"diskResized,omitempty"` - - // The source IP address. - IPAddress *string `json:"ipAddress,omitempty"` - - // The infrastructure VM Id. - InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` - - // A value indicating whether additional IR stats are available or not. - IsAdditionalStatsAvailable *bool `json:"isAdditionalStatsAvailable,omitempty"` - - // The last heartbeat received from the source server. - LastHeartbeat *time.Time `json:"lastHeartbeat,omitempty"` - - // The last RPO calculated time. - LastRpoCalculatedTime *time.Time `json:"lastRpoCalculatedTime,omitempty"` - - // The last update time received from on-prem components. - LastUpdateReceivedTime *time.Time `json:"lastUpdateReceivedTime,omitempty"` - - // The master target Id. - MasterTargetID *string `json:"masterTargetId,omitempty"` - - // The multi vm group Id, if any. - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - - // The multi vm group name, if any. - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - - // A value indicating whether the multi vm sync is enabled or disabled. - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` - - // The OS details. - OSDetails *OSDiskDetails `json:"osDetails,omitempty"` - - // The OS Version of the protected item. - OSVersion *string `json:"osVersion,omitempty"` - - // The process server Id. - ProcessServerID *string `json:"processServerId,omitempty"` - - // The list of protected disks. - ProtectedDisks []*InMageProtectedDiskDetails `json:"protectedDisks,omitempty"` - - // The protection stage. - ProtectionStage *string `json:"protectionStage,omitempty"` - - // A value indicating whether the source server requires a restart after update. - RebootAfterUpdateStatus *string `json:"rebootAfterUpdateStatus,omitempty"` - - // The replica id of the protected item. - ReplicaID *string `json:"replicaId,omitempty"` - - // The resync details of the machine. - ResyncDetails *InitialReplicationDetails `json:"resyncDetails,omitempty"` - - // The retention window end time. - RetentionWindowEnd *time.Time `json:"retentionWindowEnd,omitempty"` - - // The retention window start time. - RetentionWindowStart *time.Time `json:"retentionWindowStart,omitempty"` - - // The RPO in seconds. - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - - // The CPU count of the VM on the primary side. - SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"` - - // The RAM size of the VM on the primary side. - SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"` - - // The total transferred data in bytes. - TotalDataTransferred *int64 `json:"totalDataTransferred,omitempty"` - - // The progress health. - TotalProgressHealth *string `json:"totalProgressHealth,omitempty"` - - // The uncompressed data change rate in MB. - UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` - - // The vCenter infrastructure Id. - VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` - - // The virtual machine Id. - VMID *string `json:"vmId,omitempty"` - - // The PE Network details. - VMNics []*VMNicDetails `json:"vmNics,omitempty"` - - // The protection state for the vm. - VMProtectionState *string `json:"vmProtectionState,omitempty"` - - // The protection state description for the vm. - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - - // The validation errors of the on-premise machine Value can be list of validation errors. - ValidationErrors []*HealthError `json:"validationErrors,omitempty"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// InMageReplicationDetails. -func (i *InMageReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return &ReplicationProviderSpecificSettings{ - InstanceType: i.InstanceType, - } -} - -// InMageReprotectInput - InMageAzureV2 specific provider input. -type InMageReprotectInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The Master Target Id. - MasterTargetID *string `json:"masterTargetId,omitempty"` - - // REQUIRED; The Process Server Id. - ProcessServerID *string `json:"processServerId,omitempty"` - - // REQUIRED; The Policy Id. - ProfileID *string `json:"profileId,omitempty"` - - // REQUIRED; The retention drive to use on the MT. - RetentionDrive *string `json:"retentionDrive,omitempty"` - - // The target datastore name. - DatastoreName *string `json:"datastoreName,omitempty"` - - // The enable disk exclusion input. - DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` - - // The disks to include list. - DisksToInclude []*string `json:"disksToInclude,omitempty"` - - // The CS account Id. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` -} - -// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface -// for type InMageReprotectInput. -func (i *InMageReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { - return &ReverseReplicationProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageTestFailoverInput - Provider specific input for InMage test failover. -type InMageTestFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null - // should be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided - // by RecoveryPointId will be used. In the other two cases, recovery point id will - // be ignored. - RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` -} - -// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type -// InMageTestFailoverInput. -func (i *InMageTestFailoverInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { - return &TestFailoverProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageUnplannedFailoverInput - Provider specific input for InMage unplanned failover. -type InMageUnplannedFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should - // be passed. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided - // by RecoveryPointId will be used. In the other two cases, recovery point id will - // be ignored. - RecoveryPointType *RecoveryPointType `json:"recoveryPointType,omitempty"` -} - -// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface -// for type InMageUnplannedFailoverInput. -func (i *InMageUnplannedFailoverInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { - return &UnplannedFailoverProviderSpecificInput{ - InstanceType: i.InstanceType, - } -} - -// InMageVolumeExclusionOptions - Guest disk signature based disk exclusion option when doing enable protection of virtual -// machine in InMage provider. -type InMageVolumeExclusionOptions struct { - // The value indicating whether to exclude multi volume disk or not. If a disk has multiple volumes and one of the volume - // has label matching with VolumeLabel this disk will be excluded from replication - // if OnlyExcludeIfSingleVolume is false. - OnlyExcludeIfSingleVolume *string `json:"onlyExcludeIfSingleVolume,omitempty"` - - // The volume label. The disk having any volume with this label will be excluded from replication. - VolumeLabel *string `json:"volumeLabel,omitempty"` -} - -// InconsistentVMDetails - This class stores the monitoring details for consistency check of inconsistent Protected Entity. -type InconsistentVMDetails struct { - // The Cloud name. - CloudName *string `json:"cloudName,omitempty"` - - // The list of details regarding state of the Protected Entity in SRS and On prem. - Details []*string `json:"details,omitempty"` - - // The list of error ids. - ErrorIDs []*string `json:"errorIds,omitempty"` - - // The Vm name. - VMName *string `json:"vmName,omitempty"` -} - -// InitialReplicationDetails - Initial replication details. -type InitialReplicationDetails struct { - // The initial replication progress percentage. - InitialReplicationProgressPercentage *string `json:"initialReplicationProgressPercentage,omitempty"` - - // Initial replication type. - InitialReplicationType *string `json:"initialReplicationType,omitempty"` -} - -// InlineWorkflowTaskDetails - This class represents the inline workflow task details. -type InlineWorkflowTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // The child tasks. - ChildTasks []*ASRTask `json:"childTasks,omitempty"` - - // The list of child workflow ids. - WorkflowIDs []*string `json:"workflowIds,omitempty"` -} - -// GetGroupTaskDetails implements the GroupTaskDetailsClassification interface for type InlineWorkflowTaskDetails. -func (i *InlineWorkflowTaskDetails) GetGroupTaskDetails() *GroupTaskDetails { - return &GroupTaskDetails{ - InstanceType: i.InstanceType, - ChildTasks: i.ChildTasks, - } -} - -// InnerHealthError - Implements InnerHealthError class. HealthError object has a list of InnerHealthErrors as child errors. -// InnerHealthError is used because this will prevent an infinite loop of structures when Hydra -// tries to auto-generate the contract. We are exposing the related health errors as inner health errors and all API consumers -// can utilize this in the same fashion as Exception -> InnerException. -type InnerHealthError struct { - // Error creation time (UTC). - CreationTimeUTC *time.Time `json:"creationTimeUtc,omitempty"` - - // Value indicating whether the health error is customer resolvable. - CustomerResolvability *HealthErrorCustomerResolvability `json:"customerResolvability,omitempty"` - - // ID of the entity. - EntityID *string `json:"entityId,omitempty"` - - // Category of error. - ErrorCategory *string `json:"errorCategory,omitempty"` - - // Error code. - ErrorCode *string `json:"errorCode,omitempty"` - - // The health error unique id. - ErrorID *string `json:"errorId,omitempty"` - - // Level of error. - ErrorLevel *string `json:"errorLevel,omitempty"` - - // Error message. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Source of error. - ErrorSource *string `json:"errorSource,omitempty"` - - // Type of error. - ErrorType *string `json:"errorType,omitempty"` - - // Possible causes of error. - PossibleCauses *string `json:"possibleCauses,omitempty"` - - // Recommended action to resolve error. - RecommendedAction *string `json:"recommendedAction,omitempty"` - - // DRA error message. - RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"` - - // Summary message of the entity. - SummaryMessage *string `json:"summaryMessage,omitempty"` -} - -type InputEndpoint struct { - EndpointName *string `json:"endpointName,omitempty"` - PrivatePort *int32 `json:"privatePort,omitempty"` - Protocol *string `json:"protocol,omitempty"` - PublicPort *int32 `json:"publicPort,omitempty"` -} - -// Job details. -type Job struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The custom data. - Properties *JobProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// JobCollection - Collection of jobs. -type JobCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The list of jobs. - Value []*Job `json:"value,omitempty"` -} - -// JobDetailsClassification provides polymorphic access to related types. -// Call the interface's GetJobDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AsrJobDetails, *ExportJobDetails, *FailoverJobDetails, *JobDetails, *SwitchProtectionJobDetails, *TestFailoverJobDetails -type JobDetailsClassification interface { - // GetJobDetails returns the JobDetails content of the underlying type. - GetJobDetails() *JobDetails -} - -// JobDetails - Job details based on specific job type. -type JobDetails struct { - // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). - InstanceType *string `json:"instanceType,omitempty"` - - // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow - // object details. - AffectedObjectDetails map[string]*string `json:"affectedObjectDetails,omitempty"` -} - -// GetJobDetails implements the JobDetailsClassification interface for type JobDetails. -func (j *JobDetails) GetJobDetails() *JobDetails { return j } - -// JobEntity - This class contains the minimal job details required to navigate to the desired drill down. -type JobEntity struct { - // The job display name. - JobFriendlyName *string `json:"jobFriendlyName,omitempty"` - - // The job id. - JobID *string `json:"jobId,omitempty"` - - // The job name. Enum type ScenarioName. - JobScenarioName *string `json:"jobScenarioName,omitempty"` - - // The workflow affected object type. - TargetInstanceType *string `json:"targetInstanceType,omitempty"` - - // The object id. - TargetObjectID *string `json:"targetObjectId,omitempty"` - - // The object name. - TargetObjectName *string `json:"targetObjectName,omitempty"` -} - -// JobErrorDetails - This class contains the error details per object. -type JobErrorDetails struct { - // The creation time of job error. - CreationTime *time.Time `json:"creationTime,omitempty"` - - // Error level of error. - ErrorLevel *string `json:"errorLevel,omitempty"` - - // The Provider error details. - ProviderErrorDetails *ProviderError `json:"providerErrorDetails,omitempty"` - - // The Service error details. - ServiceErrorDetails *ServiceError `json:"serviceErrorDetails,omitempty"` - - // The Id of the task. - TaskID *string `json:"taskId,omitempty"` -} - -// JobProperties - Job custom data details. -type JobProperties struct { - // The activity id. - ActivityID *string `json:"activityId,omitempty"` - - // The Allowed action the job. - AllowedActions []*string `json:"allowedActions,omitempty"` - - // The custom job details like test failover job details. - CustomDetails JobDetailsClassification `json:"customDetails,omitempty"` - - // The end time. - EndTime *time.Time `json:"endTime,omitempty"` - - // The errors. - Errors []*JobErrorDetails `json:"errors,omitempty"` - - // The DisplayName. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The ScenarioName. - ScenarioName *string `json:"scenarioName,omitempty"` - - // The start time. - StartTime *time.Time `json:"startTime,omitempty"` - - // The status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. - State *string `json:"state,omitempty"` - - // The description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, - // CompletedWithInformation or Skipped. - StateDescription *string `json:"stateDescription,omitempty"` - - // The type of the affected object which is of Microsoft.Azure.SiteRecovery.V20151110.AffectedObjectType class. - TargetInstanceType *string `json:"targetInstanceType,omitempty"` - - // The affected Object Id. - TargetObjectID *string `json:"targetObjectId,omitempty"` - - // The name of the affected object. - TargetObjectName *string `json:"targetObjectName,omitempty"` - - // The tasks. - Tasks []*ASRTask `json:"tasks,omitempty"` -} - -// JobQueryParameter - Query parameter to enumerate jobs. -type JobQueryParameter struct { - // The type of objects. - AffectedObjectTypes *string `json:"affectedObjectTypes,omitempty"` - - // Date time to get jobs upto. - EndTime *string `json:"endTime,omitempty"` - - // The Id of the fabric to search jobs under. - FabricID *string `json:"fabricId,omitempty"` - - // The job Name. - JobName *string `json:"jobName,omitempty"` - - // The output type of the jobs. - JobOutputType *ExportJobOutputSerializationType `json:"jobOutputType,omitempty"` - - // The states of the job to be filtered can be in. - JobStatus *string `json:"jobStatus,omitempty"` - - // Date time to get jobs from. - StartTime *string `json:"startTime,omitempty"` - - // The timezone offset for the location of the request (in minutes). - TimezoneOffset *float64 `json:"timezoneOffset,omitempty"` -} - -// JobStatusEventDetails - Model class for event details of a job status event. -type JobStatusEventDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // AffectedObjectType for the event. - AffectedObjectType *string `json:"affectedObjectType,omitempty"` - - // JobName for the Event. - JobFriendlyName *string `json:"jobFriendlyName,omitempty"` - - // Job arm id for the event. - JobID *string `json:"jobId,omitempty"` - - // JobStatus for the Event. - JobStatus *string `json:"jobStatus,omitempty"` -} - -// GetEventSpecificDetails implements the EventSpecificDetailsClassification interface for type JobStatusEventDetails. -func (j *JobStatusEventDetails) GetEventSpecificDetails() *EventSpecificDetails { - return &EventSpecificDetails{ - InstanceType: j.InstanceType, - } -} - -// JobTaskDetailsClassification provides polymorphic access to related types. -// Call the interface's GetJobTaskDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *FabricReplicationGroupTaskDetails, *JobTaskDetails, *VirtualMachineTaskDetails -type JobTaskDetailsClassification interface { - TaskTypeDetailsClassification - // GetJobTaskDetails returns the JobTaskDetails content of the underlying type. - GetJobTaskDetails() *JobTaskDetails -} - -// JobTaskDetails - This class represents a task which is actually a workflow so that one can navigate to its individual drill -// down. -type JobTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // The job entity. - JobTask *JobEntity `json:"jobTask,omitempty"` -} - -// GetJobTaskDetails implements the JobTaskDetailsClassification interface for type JobTaskDetails. -func (j *JobTaskDetails) GetJobTaskDetails() *JobTaskDetails { return j } - -// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type JobTaskDetails. -func (j *JobTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { - return &TaskTypeDetails{ - InstanceType: j.InstanceType, - } -} - -// KeyEncryptionKeyInfo - Key Encryption Key (KEK) information. -type KeyEncryptionKeyInfo struct { - // The key URL / identifier. - KeyIdentifier *string `json:"keyIdentifier,omitempty"` - - // The KeyVault resource ARM Id for key. - KeyVaultResourceArmID *string `json:"keyVaultResourceArmId,omitempty"` -} - -// LogicalNetwork - Logical network data model. -type LogicalNetwork struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The Logical Network Properties. - Properties *LogicalNetworkProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// LogicalNetworkCollection - List of logical networks. -type LogicalNetworkCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The Logical Networks list details. - Value []*LogicalNetwork `json:"value,omitempty"` -} - -// LogicalNetworkProperties - Logical Network Properties. -type LogicalNetworkProperties struct { - // The Friendly Name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // A value indicating whether logical network definitions are isolated. - LogicalNetworkDefinitionsStatus *string `json:"logicalNetworkDefinitionsStatus,omitempty"` - - // A value indicating whether logical network is used as private test network by test failover. - LogicalNetworkUsage *string `json:"logicalNetworkUsage,omitempty"` - - // A value indicating whether Network Virtualization is enabled for the logical network. - NetworkVirtualizationStatus *string `json:"networkVirtualizationStatus,omitempty"` -} - -// ManualActionTaskDetails - This class represents the manual action task details. -type ManualActionTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // The instructions. - Instructions *string `json:"instructions,omitempty"` - - // The name. - Name *string `json:"name,omitempty"` - - // The observation. - Observation *string `json:"observation,omitempty"` -} - -// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type ManualActionTaskDetails. -func (m *ManualActionTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { - return &TaskTypeDetails{ - InstanceType: m.InstanceType, - } -} - -// MarsAgentDetails - Mars agent details. -type MarsAgentDetails struct { - // READ-ONLY; The Mars agent Bios Id. - BiosID *string `json:"biosId,omitempty" azure:"ro"` - - // READ-ONLY; The fabric object Id. - FabricObjectID *string `json:"fabricObjectId,omitempty" azure:"ro"` - - // READ-ONLY; The Mars agent Fqdn. - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - - // READ-ONLY; The health of the Mars agent. - Health *ProtectionHealth `json:"health,omitempty" azure:"ro"` - - // READ-ONLY; The health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty" azure:"ro"` - - // READ-ONLY; The Mars agent Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The last heartbeat received from the Mars agent. - LastHeartbeatUTC *time.Time `json:"lastHeartbeatUtc,omitempty" azure:"ro"` - - // READ-ONLY; The Mars agent name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The version. - Version *string `json:"version,omitempty" azure:"ro"` -} - -// MasterTargetServer - Details of a Master Target Server. -type MasterTargetServer struct { - // Agent expiry date. - AgentExpiryDate *time.Time `json:"agentExpiryDate,omitempty"` - - // The version of the scout component on the server. - AgentVersion *string `json:"agentVersion,omitempty"` - - // Agent version details. - AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"` - - // The list of data stores in the fabric. - DataStores []*DataStore `json:"dataStores,omitempty"` - - // Disk count of the master target. - DiskCount *int32 `json:"diskCount,omitempty"` - - // Health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty"` - - // The server Id. - ID *string `json:"id,omitempty"` - - // The IP address of the server. - IPAddress *string `json:"ipAddress,omitempty"` - - // The last heartbeat received from the server. - LastHeartbeat *time.Time `json:"lastHeartbeat,omitempty"` - - // MARS agent expiry date. - MarsAgentExpiryDate *time.Time `json:"marsAgentExpiryDate,omitempty"` - - // MARS agent version. - MarsAgentVersion *string `json:"marsAgentVersion,omitempty"` - - // Mars agent version details. - MarsAgentVersionDetails *VersionDetails `json:"marsAgentVersionDetails,omitempty"` - - // The server name. - Name *string `json:"name,omitempty"` - - // The OS type of the server. - OSType *string `json:"osType,omitempty"` - - // OS Version of the master target. - OSVersion *string `json:"osVersion,omitempty"` - - // The retention volumes of Master target Server. - RetentionVolumes []*RetentionVolume `json:"retentionVolumes,omitempty"` - - // Validation errors. - ValidationErrors []*HealthError `json:"validationErrors,omitempty"` - - // Version status. - VersionStatus *string `json:"versionStatus,omitempty"` -} - -// MigrateInput - Input for migrate. -type MigrateInput struct { - // REQUIRED; Migrate input properties. - Properties *MigrateInputProperties `json:"properties,omitempty"` -} - -// MigrateInputProperties - Migrate input properties. -type MigrateInputProperties struct { - // REQUIRED; The provider specific details. - ProviderSpecificDetails MigrateProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// MigrateProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetMigrateProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *MigrateProviderSpecificInput, *VMwareCbtMigrateInput -type MigrateProviderSpecificInputClassification interface { - // GetMigrateProviderSpecificInput returns the MigrateProviderSpecificInput content of the underlying type. - GetMigrateProviderSpecificInput() *MigrateProviderSpecificInput -} - -// MigrateProviderSpecificInput - Migrate provider specific input. -type MigrateProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetMigrateProviderSpecificInput implements the MigrateProviderSpecificInputClassification interface for type MigrateProviderSpecificInput. -func (m *MigrateProviderSpecificInput) GetMigrateProviderSpecificInput() *MigrateProviderSpecificInput { - return m -} - -// MigrationItem - Migration item. -type MigrationItem struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The migration item properties. - Properties *MigrationItemProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MigrationItemCollection - Migration item collection. -type MigrationItemCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The list of migration items. - Value []*MigrationItem `json:"value,omitempty"` -} - -// MigrationItemProperties - Migration item properties. -type MigrationItemProperties struct { - // The migration provider custom settings. - ProviderSpecificDetails MigrationProviderSpecificSettingsClassification `json:"providerSpecificDetails,omitempty"` - - // READ-ONLY; The allowed operations on the migration item based on the current migration state of the item. - AllowedOperations []*MigrationItemOperation `json:"allowedOperations,omitempty" azure:"ro"` - - // READ-ONLY; The critical past job details. - CriticalJobHistory []*CriticalJobHistoryDetails `json:"criticalJobHistory,omitempty" azure:"ro"` - - // READ-ONLY; The current job details. - CurrentJob *CurrentJobDetails `json:"currentJob,omitempty" azure:"ro"` - - // READ-ONLY; The correlation Id for events associated with this migration item. - EventCorrelationID *string `json:"eventCorrelationId,omitempty" azure:"ro"` - - // READ-ONLY; The consolidated health. - Health *ProtectionHealth `json:"health,omitempty" azure:"ro"` - - // READ-ONLY; The list of health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty" azure:"ro"` - - // READ-ONLY; The status of the last migration. - LastMigrationStatus *string `json:"lastMigrationStatus,omitempty" azure:"ro"` - - // READ-ONLY; The last migration time. - LastMigrationTime *time.Time `json:"lastMigrationTime,omitempty" azure:"ro"` - - // READ-ONLY; The status of the last test migration. - LastTestMigrationStatus *string `json:"lastTestMigrationStatus,omitempty" azure:"ro"` - - // READ-ONLY; The last test migration time. - LastTestMigrationTime *time.Time `json:"lastTestMigrationTime,omitempty" azure:"ro"` - - // READ-ONLY; The on-premise virtual machine name. - MachineName *string `json:"machineName,omitempty" azure:"ro"` - - // READ-ONLY; The migration status. - MigrationState *MigrationState `json:"migrationState,omitempty" azure:"ro"` - - // READ-ONLY; The migration state description. - MigrationStateDescription *string `json:"migrationStateDescription,omitempty" azure:"ro"` - - // READ-ONLY; The name of policy governing this item. - PolicyFriendlyName *string `json:"policyFriendlyName,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of policy governing this item. - PolicyID *string `json:"policyId,omitempty" azure:"ro"` - - // READ-ONLY; The recovery services provider ARM Id. - RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty" azure:"ro"` - - // READ-ONLY; The replication status. - ReplicationStatus *string `json:"replicationStatus,omitempty" azure:"ro"` - - // READ-ONLY; The test migrate state. - TestMigrateState *TestMigrationState `json:"testMigrateState,omitempty" azure:"ro"` - - // READ-ONLY; The test migrate state description. - TestMigrateStateDescription *string `json:"testMigrateStateDescription,omitempty" azure:"ro"` -} - -// MigrationItemsQueryParameter - Query parameter to enumerate migration items. -type MigrationItemsQueryParameter struct { - // The replication provider type. - InstanceType *string `json:"instanceType,omitempty"` - - // The source container name filter. - SourceContainerName *string `json:"sourceContainerName,omitempty"` - - // The source fabric name filter. - SourceFabricName *string `json:"sourceFabricName,omitempty"` -} - -// MigrationProviderSpecificSettingsClassification provides polymorphic access to related types. -// Call the interface's GetMigrationProviderSpecificSettings() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *MigrationProviderSpecificSettings, *VMwareCbtMigrationDetails -type MigrationProviderSpecificSettingsClassification interface { - // GetMigrationProviderSpecificSettings returns the MigrationProviderSpecificSettings content of the underlying type. - GetMigrationProviderSpecificSettings() *MigrationProviderSpecificSettings -} - -// MigrationProviderSpecificSettings - Migration provider specific settings. -type MigrationProviderSpecificSettings struct { - // REQUIRED; Gets the instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetMigrationProviderSpecificSettings implements the MigrationProviderSpecificSettingsClassification interface for type -// MigrationProviderSpecificSettings. -func (m *MigrationProviderSpecificSettings) GetMigrationProviderSpecificSettings() *MigrationProviderSpecificSettings { - return m -} - -// MigrationRecoveryPoint - Recovery point for a migration item. -type MigrationRecoveryPoint struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // Recovery point properties. - Properties *MigrationRecoveryPointProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// MigrationRecoveryPointCollection - Collection of migration recovery points. -type MigrationRecoveryPointCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The migration recovery point details. - Value []*MigrationRecoveryPoint `json:"value,omitempty"` -} - -// MigrationRecoveryPointProperties - Migration item recovery point properties. -type MigrationRecoveryPointProperties struct { - // READ-ONLY; The recovery point time. - RecoveryPointTime *time.Time `json:"recoveryPointTime,omitempty" azure:"ro"` - - // READ-ONLY; The recovery point type. - RecoveryPointType *MigrationRecoveryPointType `json:"recoveryPointType,omitempty" azure:"ro"` -} - -// MigrationRecoveryPointsClientGetOptions contains the optional parameters for the MigrationRecoveryPointsClient.Get method. -type MigrationRecoveryPointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions contains the optional parameters for the MigrationRecoveryPointsClient.ListByReplicationMigrationItems -// method. -type MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions struct { - // placeholder for future optional parameters -} - -// MobilityServiceUpdate - The Mobility Service update details. -type MobilityServiceUpdate struct { - // The OS type. - OSType *string `json:"osType,omitempty"` - - // The reboot status of the update - whether it is required or not. - RebootStatus *string `json:"rebootStatus,omitempty"` - - // The version of the latest update. - Version *string `json:"version,omitempty"` -} - -// Network model. -type Network struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The Network Properties. - Properties *NetworkProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// NetworkCollection - List of networks. -type NetworkCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The Networks list details. - Value []*Network `json:"value,omitempty"` -} - -// NetworkMapping - Network Mapping model. Ideally it should have been possible to inherit this class from prev version in -// InheritedModels as long as there is no difference in structure or method signature. Since there -// were no base Models for certain fields and methods viz NetworkMappingProperties and Load with required return type, the -// class has been introduced in its entirety with references to base models to -// facilitate extensions in subsequent versions. -type NetworkMapping struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The Network Mapping Properties. - Properties *NetworkMappingProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// NetworkMappingCollection - List of network mappings. As with NetworkMapping, it should be possible to reuse a prev version -// of this class. It doesn't seem likely this class could be anything more than a slightly bespoke -// collection of NetworkMapping. Hence it makes sense to override Load with Base.NetworkMapping instead of existing CurrentVersion.NetworkMapping. -type NetworkMappingCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The Network Mappings list. - Value []*NetworkMapping `json:"value,omitempty"` -} - -// NetworkMappingFabricSpecificSettingsClassification provides polymorphic access to related types. -// Call the interface's GetNetworkMappingFabricSpecificSettings() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureToAzureNetworkMappingSettings, *NetworkMappingFabricSpecificSettings, *VmmToAzureNetworkMappingSettings, *VmmToVmmNetworkMappingSettings -type NetworkMappingFabricSpecificSettingsClassification interface { - // GetNetworkMappingFabricSpecificSettings returns the NetworkMappingFabricSpecificSettings content of the underlying type. - GetNetworkMappingFabricSpecificSettings() *NetworkMappingFabricSpecificSettings -} - -// NetworkMappingFabricSpecificSettings - Network Mapping fabric specific settings. -type NetworkMappingFabricSpecificSettings struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetNetworkMappingFabricSpecificSettings implements the NetworkMappingFabricSpecificSettingsClassification interface for -// type NetworkMappingFabricSpecificSettings. -func (n *NetworkMappingFabricSpecificSettings) GetNetworkMappingFabricSpecificSettings() *NetworkMappingFabricSpecificSettings { - return n -} - -// NetworkMappingProperties - Network Mapping Properties. -type NetworkMappingProperties struct { - // The fabric specific settings. - FabricSpecificSettings NetworkMappingFabricSpecificSettingsClassification `json:"fabricSpecificSettings,omitempty"` - - // The primary fabric friendly name. - PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` - - // The primary network friendly name. - PrimaryNetworkFriendlyName *string `json:"primaryNetworkFriendlyName,omitempty"` - - // The primary network id for network mapping. - PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` - - // The recovery fabric ARM id. - RecoveryFabricArmID *string `json:"recoveryFabricArmId,omitempty"` - - // The recovery fabric friendly name. - RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` - - // The recovery network friendly name. - RecoveryNetworkFriendlyName *string `json:"recoveryNetworkFriendlyName,omitempty"` - - // The recovery network id for network mapping. - RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` - - // The pairing state for network mapping. - State *string `json:"state,omitempty"` -} - -// NetworkProperties - Network Properties. -type NetworkProperties struct { - // The Fabric Type. - FabricType *string `json:"fabricType,omitempty"` - - // The Friendly Name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The Network Type. - NetworkType *string `json:"networkType,omitempty"` - - // The List of subnets. - Subnets []*Subnet `json:"subnets,omitempty"` -} - -// NewProtectionProfile - New Protection profile input. -type NewProtectionProfile struct { - // REQUIRED; A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. - MultiVMSyncStatus *SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` - - // REQUIRED; The protection profile input. - PolicyName *string `json:"policyName,omitempty"` - - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` - - // The app consistent snapshot frequency (in minutes). - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency (in minutes). - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` -} - -// GetProtectionProfileCustomDetails implements the ProtectionProfileCustomDetailsClassification interface for type NewProtectionProfile. -func (n *NewProtectionProfile) GetProtectionProfileCustomDetails() *ProtectionProfileCustomDetails { - return &ProtectionProfileCustomDetails{ - ResourceType: n.ResourceType, - } -} - -// NewRecoveryVirtualNetwork - Recovery virtual network input to create new virtual network from given source network. -type NewRecoveryVirtualNetwork struct { - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` - - // The recovery virtual network name. - RecoveryVirtualNetworkName *string `json:"recoveryVirtualNetworkName,omitempty"` - - // The name of the resource group to be used to create the recovery virtual network. If absent, target network would be created - // in the same resource group as target VM. - RecoveryVirtualNetworkResourceGroupName *string `json:"recoveryVirtualNetworkResourceGroupName,omitempty"` -} - -// GetRecoveryVirtualNetworkCustomDetails implements the RecoveryVirtualNetworkCustomDetailsClassification interface for type -// NewRecoveryVirtualNetwork. -func (n *NewRecoveryVirtualNetwork) GetRecoveryVirtualNetworkCustomDetails() *RecoveryVirtualNetworkCustomDetails { - return &RecoveryVirtualNetworkCustomDetails{ - ResourceType: n.ResourceType, - } -} - -// OSDetails - Disk Details. -type OSDetails struct { - // The OSEdition. - OSEdition *string `json:"osEdition,omitempty"` - - // The OS Major Version. - OSMajorVersion *string `json:"oSMajorVersion,omitempty"` - - // The OS Minor Version. - OSMinorVersion *string `json:"oSMinorVersion,omitempty"` - - // VM Disk details. - OSType *string `json:"osType,omitempty"` - - // The OS Version. - OSVersion *string `json:"oSVersion,omitempty"` - - // Product type. - ProductType *string `json:"productType,omitempty"` -} - -// OSDiskDetails - Details of the OS Disk. -type OSDiskDetails struct { - // The type of the OS on the VM. - OSType *string `json:"osType,omitempty"` - - // The id of the disk containing the OS. - OSVhdID *string `json:"osVhdId,omitempty"` - - // The OS disk VHD name. - VhdName *string `json:"vhdName,omitempty"` -} - -// OSVersionWrapper - Wrapper model for OSVersion to include version and service pack info. -type OSVersionWrapper struct { - // The service pack. - ServicePack *string `json:"servicePack,omitempty"` - - // The version. - Version *string `json:"version,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// OperationsDiscovery - Operations discovery class. -type OperationsDiscovery struct { - // Object type. - Display *Display `json:"display,omitempty"` - - // Name of the API. The name of the operation being performed on this particular object. It should match the action name that - // appears in RBAC / the event service. Examples of operations include: * - // Microsoft.Compute/virtualMachine/capture/action * Microsoft.Compute/virtualMachine/restart/action * Microsoft.Compute/virtualMachine/write - // * Microsoft.Compute/virtualMachine/read * - // Microsoft.Compute/virtualMachine/delete Each action should include, in order: (1) Resource Provider Namespace (2) Type - // hierarchy for which the action applies (e.g. server/databases for a SQL Azure - // database) (3) Read, Write, Action or Delete indicating which type applies. If it is a PUT/PATCH on a collection or named - // value, Write should be used. If it is a GET, Read should be used. If it is a - // DELETE, Delete should be used. If it is a POST, Action should be used. As a note: all resource providers would need to - // include the "{Resource Provider Namespace}/register/action" operation in their - // response. This API is used to register for their service, and should include details about the operation (e.g. a localized - // name for the resource provider + any special considerations like PII - // release). - Name *string `json:"name,omitempty"` - - // Origin. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs - // UX. Default value is "user,system". - Origin *string `json:"origin,omitempty"` - - // Properties. Reserved for future use. - Properties interface{} `json:"properties,omitempty"` -} - -// OperationsDiscoveryCollection - Collection of ClientDiscovery details. -type OperationsDiscoveryCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The ClientDiscovery details. - Value []*OperationsDiscovery `json:"value,omitempty"` -} - -// PauseReplicationInput - Pause replication input. -type PauseReplicationInput struct { - // REQUIRED; Pause replication input properties. - Properties *PauseReplicationInputProperties `json:"properties,omitempty"` -} - -// PauseReplicationInputProperties - Pause replication input properties. -type PauseReplicationInputProperties struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// PlannedFailoverInput - Input definition for planned failover. -type PlannedFailoverInput struct { - // Planned failover input properties. - Properties *PlannedFailoverInputProperties `json:"properties,omitempty"` -} - -// PlannedFailoverInputProperties - Input definition for planned failover input properties. -type PlannedFailoverInputProperties struct { - // Failover direction. - FailoverDirection *string `json:"failoverDirection,omitempty"` - - // Provider specific settings. - ProviderSpecificDetails PlannedFailoverProviderSpecificFailoverInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// PlannedFailoverProviderSpecificFailoverInputClassification provides polymorphic access to related types. -// Call the interface's GetPlannedFailoverProviderSpecificFailoverInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *HyperVReplicaAzureFailbackProviderInput, *HyperVReplicaAzurePlannedFailoverProviderInput, *InMageRcmFailbackPlannedFailoverProviderInput, -// - *PlannedFailoverProviderSpecificFailoverInput -type PlannedFailoverProviderSpecificFailoverInputClassification interface { - // GetPlannedFailoverProviderSpecificFailoverInput returns the PlannedFailoverProviderSpecificFailoverInput content of the underlying type. - GetPlannedFailoverProviderSpecificFailoverInput() *PlannedFailoverProviderSpecificFailoverInput -} - -// PlannedFailoverProviderSpecificFailoverInput - Provider specific failover input. -type PlannedFailoverProviderSpecificFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetPlannedFailoverProviderSpecificFailoverInput implements the PlannedFailoverProviderSpecificFailoverInputClassification -// interface for type PlannedFailoverProviderSpecificFailoverInput. -func (p *PlannedFailoverProviderSpecificFailoverInput) GetPlannedFailoverProviderSpecificFailoverInput() *PlannedFailoverProviderSpecificFailoverInput { - return p -} - -// Policy - Protection profile details. -type Policy struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The custom data. - Properties *PolicyProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// PolicyCollection - Protection Profile Collection details. -type PolicyCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The policy details. - Value []*Policy `json:"value,omitempty"` -} - -// PolicyProperties - Protection profile custom data details. -type PolicyProperties struct { - // The FriendlyName. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The ReplicationChannelSetting. - ProviderSpecificDetails PolicyProviderSpecificDetailsClassification `json:"providerSpecificDetails,omitempty"` -} - -// PolicyProviderSpecificDetailsClassification provides polymorphic access to related types. -// Call the interface's GetPolicyProviderSpecificDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2APolicyDetails, *HyperVReplicaAzurePolicyDetails, *HyperVReplicaBasePolicyDetails, *HyperVReplicaBluePolicyDetails, -// - *HyperVReplicaPolicyDetails, *InMageAzureV2PolicyDetails, *InMageBasePolicyDetails, *InMagePolicyDetails, *InMageRcmFailbackPolicyDetails, -// - *InMageRcmPolicyDetails, *PolicyProviderSpecificDetails, *VmwareCbtPolicyDetails -type PolicyProviderSpecificDetailsClassification interface { - // GetPolicyProviderSpecificDetails returns the PolicyProviderSpecificDetails content of the underlying type. - GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails -} - -// PolicyProviderSpecificDetails - Base class for Provider specific details for policies. -type PolicyProviderSpecificDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type PolicyProviderSpecificDetails. -func (p *PolicyProviderSpecificDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return p -} - -// PolicyProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetPolicyProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2ACrossClusterMigrationPolicyCreationInput, *A2APolicyCreationInput, *HyperVReplicaAzurePolicyInput, *HyperVReplicaBluePolicyInput, -// - *HyperVReplicaPolicyInput, *InMageAzureV2PolicyInput, *InMagePolicyInput, *InMageRcmFailbackPolicyCreationInput, *InMageRcmPolicyCreationInput, -// - *PolicyProviderSpecificInput, *VMwareCbtPolicyCreationInput -type PolicyProviderSpecificInputClassification interface { - // GetPolicyProviderSpecificInput returns the PolicyProviderSpecificInput content of the underlying type. - GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput -} - -// PolicyProviderSpecificInput - Base class for provider specific input. -type PolicyProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type PolicyProviderSpecificInput. -func (p *PolicyProviderSpecificInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return p -} - -// ProcessServer - Details of the Process Server. -type ProcessServer struct { - // Agent expiry date. - AgentExpiryDate *time.Time `json:"agentExpiryDate,omitempty"` - - // The version of the scout component on the server. - AgentVersion *string `json:"agentVersion,omitempty"` - - // The agent version details. - AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"` - - // The available memory. - AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"` - - // The available space. - AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"` - - // The percentage of the CPU load. - CPULoad *string `json:"cpuLoad,omitempty"` - - // The CPU load status. - CPULoadStatus *string `json:"cpuLoadStatus,omitempty"` - - // The Process Server's friendly name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // Health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty"` - - // The agent generated Id. - HostID *string `json:"hostId,omitempty"` - - // The Process Server Id. - ID *string `json:"id,omitempty"` - - // The IP address of the server. - IPAddress *string `json:"ipAddress,omitempty"` - - // The last heartbeat received from the server. - LastHeartbeat *time.Time `json:"lastHeartbeat,omitempty"` - - // The servers configured with this PS. - MachineCount *string `json:"machineCount,omitempty"` - - // The memory usage status. - MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"` - - // The list of the mobility service updates available on the Process Server. - MobilityServiceUpdates []*MobilityServiceUpdate `json:"mobilityServiceUpdates,omitempty"` - - // The OS type of the server. - OSType *string `json:"osType,omitempty"` - - // OS Version of the process server. Note: This will get populated if user has CS version greater than 9.12.0.0. - OSVersion *string `json:"osVersion,omitempty"` - - // The PS service status. - PsServiceStatus *string `json:"psServiceStatus,omitempty"` - - // The number of replication pairs configured in this PS. - ReplicationPairCount *string `json:"replicationPairCount,omitempty"` - - // The PS SSL cert expiry date. - SSLCertExpiryDate *time.Time `json:"sslCertExpiryDate,omitempty"` - - // CS SSL cert expiry date. - SSLCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` - - // The space usage status. - SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"` - - // The percentage of the system load. - SystemLoad *string `json:"systemLoad,omitempty"` - - // The system load status. - SystemLoadStatus *string `json:"systemLoadStatus,omitempty"` - - // The total memory. - TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"` - - // The total space. - TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"` - - // Version status. - VersionStatus *string `json:"versionStatus,omitempty"` - - // READ-ONLY; The health of Process Server. - Health *ProtectionHealth `json:"health,omitempty" azure:"ro"` - - // READ-ONLY; The MARS communication status. - MarsCommunicationStatus *string `json:"marsCommunicationStatus,omitempty" azure:"ro"` - - // READ-ONLY; The MARS registration status. - MarsRegistrationStatus *string `json:"marsRegistrationStatus,omitempty" azure:"ro"` - - // READ-ONLY; The process server stats refresh time. - PsStatsRefreshTime *time.Time `json:"psStatsRefreshTime,omitempty" azure:"ro"` - - // READ-ONLY; The throughput in bytes. - ThroughputInBytes *int64 `json:"throughputInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The throughput in MBps. - ThroughputInMBps *int64 `json:"throughputInMBps,omitempty" azure:"ro"` - - // READ-ONLY; The throughput status. - ThroughputStatus *string `json:"throughputStatus,omitempty" azure:"ro"` - - // READ-ONLY; The uploading pending data in bytes. - ThroughputUploadPendingDataInBytes *int64 `json:"throughputUploadPendingDataInBytes,omitempty" azure:"ro"` -} - -// ProcessServerDetails - Process server details. -type ProcessServerDetails struct { - // READ-ONLY; The available memory. - AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The available disk space. - AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The process server Bios Id. - BiosID *string `json:"biosId,omitempty" azure:"ro"` - - // READ-ONLY; The disk usage status. - DiskUsageStatus *RcmComponentStatus `json:"diskUsageStatus,omitempty" azure:"ro"` - - // READ-ONLY; The fabric object Id. - FabricObjectID *string `json:"fabricObjectId,omitempty" azure:"ro"` - - // READ-ONLY; The process server Fqdn. - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - - // READ-ONLY; The free disk space percentage. - FreeSpacePercentage *float64 `json:"freeSpacePercentage,omitempty" azure:"ro"` - - // READ-ONLY; The health of the process server. - Health *ProtectionHealth `json:"health,omitempty" azure:"ro"` - - // READ-ONLY; The health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty" azure:"ro"` - - // READ-ONLY; The historic health of the process server based on the health in last 24 hours. - HistoricHealth *ProtectionHealth `json:"historicHealth,omitempty" azure:"ro"` - - // READ-ONLY; The process server Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The list of IP addresses for communicating with the RCM component. - IPAddresses []*string `json:"ipAddresses,omitempty" azure:"ro"` - - // READ-ONLY; The last heartbeat received from the process server. - LastHeartbeatUTC *time.Time `json:"lastHeartbeatUtc,omitempty" azure:"ro"` - - // READ-ONLY; The memory usage percentage. - MemoryUsagePercentage *float64 `json:"memoryUsagePercentage,omitempty" azure:"ro"` - - // READ-ONLY; The memory usage status. - MemoryUsageStatus *RcmComponentStatus `json:"memoryUsageStatus,omitempty" azure:"ro"` - - // READ-ONLY; The process server name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The processor usage percentage. - ProcessorUsagePercentage *float64 `json:"processorUsagePercentage,omitempty" azure:"ro"` - - // READ-ONLY; The processor usage status. - ProcessorUsageStatus *RcmComponentStatus `json:"processorUsageStatus,omitempty" azure:"ro"` - - // READ-ONLY; The protected item count. - ProtectedItemCount *int32 `json:"protectedItemCount,omitempty" azure:"ro"` - - // READ-ONLY; The system load. - SystemLoad *int64 `json:"systemLoad,omitempty" azure:"ro"` - - // READ-ONLY; The system load status. - SystemLoadStatus *RcmComponentStatus `json:"systemLoadStatus,omitempty" azure:"ro"` - - // READ-ONLY; The throughput in bytes. - ThroughputInBytes *int64 `json:"throughputInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The throughput status. - ThroughputStatus *RcmComponentStatus `json:"throughputStatus,omitempty" azure:"ro"` - - // READ-ONLY; The uploading pending data in bytes. - ThroughputUploadPendingDataInBytes *int64 `json:"throughputUploadPendingDataInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The total memory. - TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The total disk space. - TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The used memory. - UsedMemoryInBytes *int64 `json:"usedMemoryInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The used disk space. - UsedSpaceInBytes *int64 `json:"usedSpaceInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The version. - Version *string `json:"version,omitempty" azure:"ro"` -} - -// ProtectableItem - Replication protected item. -type ProtectableItem struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The custom data. - Properties *ProtectableItemProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProtectableItemCollection - Protectable item collection. -type ProtectableItemCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The Protectable item details. - Value []*ProtectableItem `json:"value,omitempty"` -} - -// ProtectableItemProperties - Replication protected item custom data details. -type ProtectableItemProperties struct { - // The Replication provider custom settings. - CustomDetails ConfigurationSettingsClassification `json:"customDetails,omitempty"` - - // The name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The Current protection readiness errors. - ProtectionReadinessErrors []*string `json:"protectionReadinessErrors,omitempty"` - - // The protection status. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - - // The recovery provider ARM Id. - RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` - - // The ARM resource of protected items. - ReplicationProtectedItemID *string `json:"replicationProtectedItemId,omitempty"` - - // The list of replication providers supported for the protectable item. - SupportedReplicationProviders []*string `json:"supportedReplicationProviders,omitempty"` -} - -// ProtectableItemQueryParameter - Query parameter to enumerate Protectable items. -type ProtectableItemQueryParameter struct { - // State of the Protectable item query filter. - State *string `json:"state,omitempty"` -} - -// ProtectedItemsQueryParameter - Query parameter to enumerate protected items. -type ProtectedItemsQueryParameter struct { - // The fabric object Id filter. - FabricObjectID *string `json:"fabricObjectId,omitempty"` - - // The replication provider type. - InstanceType *string `json:"instanceType,omitempty"` - - // Whether Multi VM group is auto created or specified by user. - MultiVMGroupCreateOption *MultiVMGroupCreateOption `json:"multiVmGroupCreateOption,omitempty"` - - // The process server Id filter. - ProcessServerID *string `json:"processServerId,omitempty"` - - // The recovery plan filter. - RecoveryPlanName *string `json:"recoveryPlanName,omitempty"` - - // The source fabric location filter. - SourceFabricLocation *string `json:"sourceFabricLocation,omitempty"` - - // The source fabric name filter. - SourceFabricName *string `json:"sourceFabricName,omitempty"` - - // The vCenter name filter. - VCenterName *string `json:"vCenterName,omitempty"` -} - -// ProtectionContainer - Protection container details. -type ProtectionContainer struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The custom data. - Properties *ProtectionContainerProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProtectionContainerCollection - Protection Container collection. -type ProtectionContainerCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The Protection Container details. - Value []*ProtectionContainer `json:"value,omitempty"` -} - -// ProtectionContainerFabricSpecificDetails - Base class for fabric specific details of container. -type ProtectionContainerFabricSpecificDetails struct { - // READ-ONLY; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty" azure:"ro"` -} - -// ProtectionContainerMapping - Protection container mapping object. -type ProtectionContainerMapping struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The custom data. - Properties *ProtectionContainerMappingProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ProtectionContainerMappingCollection - Protection container mapping collection class. -type ProtectionContainerMappingCollection struct { - // Link to fetch rest of the data. - NextLink *string `json:"nextLink,omitempty"` - - // List of container mappings. - Value []*ProtectionContainerMapping `json:"value,omitempty"` -} - -// ProtectionContainerMappingProperties - Protection container mapping properties. -type ProtectionContainerMappingProperties struct { - // Health of pairing. - Health *string `json:"health,omitempty"` - - // Health error. - HealthErrorDetails []*HealthError `json:"healthErrorDetails,omitempty"` - - // Friendly name of replication policy. - PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` - - // Policy ARM Id. - PolicyID *string `json:"policyId,omitempty"` - - // Provider specific provider details. - ProviderSpecificDetails ProtectionContainerMappingProviderSpecificDetailsClassification `json:"providerSpecificDetails,omitempty"` - - // Friendly name of source fabric. - SourceFabricFriendlyName *string `json:"sourceFabricFriendlyName,omitempty"` - - // Friendly name of source protection container. - SourceProtectionContainerFriendlyName *string `json:"sourceProtectionContainerFriendlyName,omitempty"` - - // Association Status. - State *string `json:"state,omitempty"` - - // Friendly name of target fabric. - TargetFabricFriendlyName *string `json:"targetFabricFriendlyName,omitempty"` - - // Friendly name of paired container. - TargetProtectionContainerFriendlyName *string `json:"targetProtectionContainerFriendlyName,omitempty"` - - // Paired protection container ARM ID. - TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"` -} - -// ProtectionContainerMappingProviderSpecificDetailsClassification provides polymorphic access to related types. -// Call the interface's GetProtectionContainerMappingProviderSpecificDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AProtectionContainerMappingDetails, *InMageRcmProtectionContainerMappingDetails, *ProtectionContainerMappingProviderSpecificDetails, -// - *VMwareCbtProtectionContainerMappingDetails -type ProtectionContainerMappingProviderSpecificDetailsClassification interface { - // GetProtectionContainerMappingProviderSpecificDetails returns the ProtectionContainerMappingProviderSpecificDetails content of the underlying type. - GetProtectionContainerMappingProviderSpecificDetails() *ProtectionContainerMappingProviderSpecificDetails -} - -// ProtectionContainerMappingProviderSpecificDetails - Container mapping provider specific details. -type ProtectionContainerMappingProviderSpecificDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetProtectionContainerMappingProviderSpecificDetails implements the ProtectionContainerMappingProviderSpecificDetailsClassification -// interface for type ProtectionContainerMappingProviderSpecificDetails. -func (p *ProtectionContainerMappingProviderSpecificDetails) GetProtectionContainerMappingProviderSpecificDetails() *ProtectionContainerMappingProviderSpecificDetails { - return p -} - -// ProtectionContainerProperties - Protection profile custom data details. -type ProtectionContainerProperties struct { - // Fabric friendly name. - FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"` - - // Fabric specific details. - FabricSpecificDetails *ProtectionContainerFabricSpecificDetails `json:"fabricSpecificDetails,omitempty"` - - // The fabric type. - FabricType *string `json:"fabricType,omitempty"` - - // The name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The pairing status of this cloud. - PairingStatus *string `json:"pairingStatus,omitempty"` - - // Number of protected PEs. - ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` - - // The role of this cloud. - Role *string `json:"role,omitempty"` -} - -// ProtectionProfileCustomDetailsClassification provides polymorphic access to related types. -// Call the interface's GetProtectionProfileCustomDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ExistingProtectionProfile, *NewProtectionProfile, *ProtectionProfileCustomDetails -type ProtectionProfileCustomDetailsClassification interface { - // GetProtectionProfileCustomDetails returns the ProtectionProfileCustomDetails content of the underlying type. - GetProtectionProfileCustomDetails() *ProtectionProfileCustomDetails -} - -// ProtectionProfileCustomDetails - Protection Profile custom input. -type ProtectionProfileCustomDetails struct { - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` -} - -// GetProtectionProfileCustomDetails implements the ProtectionProfileCustomDetailsClassification interface for type ProtectionProfileCustomDetails. -func (p *ProtectionProfileCustomDetails) GetProtectionProfileCustomDetails() *ProtectionProfileCustomDetails { - return p -} - -// ProviderError - This class contains the error details per object. -type ProviderError struct { - // The Error code. - ErrorCode *int32 `json:"errorCode,omitempty"` - - // The Provider error Id. - ErrorID *string `json:"errorId,omitempty"` - - // The Error message. - ErrorMessage *string `json:"errorMessage,omitempty"` - - // The possible causes for the error. - PossibleCauses *string `json:"possibleCauses,omitempty"` - - // The recommended action to resolve the error. - RecommendedAction *string `json:"recommendedAction,omitempty"` -} - -// ProviderSpecificRecoveryPointDetailsClassification provides polymorphic access to related types. -// Call the interface's GetProviderSpecificRecoveryPointDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2ARecoveryPointDetails, *InMageAzureV2RecoveryPointDetails, *InMageRcmRecoveryPointDetails, *ProviderSpecificRecoveryPointDetails -type ProviderSpecificRecoveryPointDetailsClassification interface { - // GetProviderSpecificRecoveryPointDetails returns the ProviderSpecificRecoveryPointDetails content of the underlying type. - GetProviderSpecificRecoveryPointDetails() *ProviderSpecificRecoveryPointDetails -} - -// ProviderSpecificRecoveryPointDetails - Replication provider specific recovery point details. -type ProviderSpecificRecoveryPointDetails struct { - // REQUIRED; Gets the provider type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetProviderSpecificRecoveryPointDetails implements the ProviderSpecificRecoveryPointDetailsClassification interface for -// type ProviderSpecificRecoveryPointDetails. -func (p *ProviderSpecificRecoveryPointDetails) GetProviderSpecificRecoveryPointDetails() *ProviderSpecificRecoveryPointDetails { - return p -} - -// PushInstallerDetails - Push installer details. -type PushInstallerDetails struct { - // READ-ONLY; The push installer Bios Id. - BiosID *string `json:"biosId,omitempty" azure:"ro"` - - // READ-ONLY; The fabric object Id. - FabricObjectID *string `json:"fabricObjectId,omitempty" azure:"ro"` - - // READ-ONLY; The push installer Fqdn. - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - - // READ-ONLY; The health of the push installer. - Health *ProtectionHealth `json:"health,omitempty" azure:"ro"` - - // READ-ONLY; The health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty" azure:"ro"` - - // READ-ONLY; The push installer Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The last heartbeat received from the push installer. - LastHeartbeatUTC *time.Time `json:"lastHeartbeatUtc,omitempty" azure:"ro"` - - // READ-ONLY; The push installer name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The version. - Version *string `json:"version,omitempty" azure:"ro"` -} - -// RcmProxyDetails - RCM proxy details. -type RcmProxyDetails struct { - // READ-ONLY; The RCM proxy Bios Id. - BiosID *string `json:"biosId,omitempty" azure:"ro"` - - // READ-ONLY; The client authentication type. - ClientAuthenticationType *string `json:"clientAuthenticationType,omitempty" azure:"ro"` - - // READ-ONLY; The fabric object Id. - FabricObjectID *string `json:"fabricObjectId,omitempty" azure:"ro"` - - // READ-ONLY; The RCM proxy Fqdn. - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - - // READ-ONLY; The health of the RCM proxy. - Health *ProtectionHealth `json:"health,omitempty" azure:"ro"` - - // READ-ONLY; The health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty" azure:"ro"` - - // READ-ONLY; The RCM proxy Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The last heartbeat received from the RCM proxy. - LastHeartbeatUTC *time.Time `json:"lastHeartbeatUtc,omitempty" azure:"ro"` - - // READ-ONLY; The RCM proxy name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The version. - Version *string `json:"version,omitempty" azure:"ro"` -} - -// RecoveryAvailabilitySetCustomDetailsClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryAvailabilitySetCustomDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ExistingRecoveryAvailabilitySet, *RecoveryAvailabilitySetCustomDetails -type RecoveryAvailabilitySetCustomDetailsClassification interface { - // GetRecoveryAvailabilitySetCustomDetails returns the RecoveryAvailabilitySetCustomDetails content of the underlying type. - GetRecoveryAvailabilitySetCustomDetails() *RecoveryAvailabilitySetCustomDetails -} - -// RecoveryAvailabilitySetCustomDetails - Recovery Availability Set custom input. -type RecoveryAvailabilitySetCustomDetails struct { - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` -} - -// GetRecoveryAvailabilitySetCustomDetails implements the RecoveryAvailabilitySetCustomDetailsClassification interface for -// type RecoveryAvailabilitySetCustomDetails. -func (r *RecoveryAvailabilitySetCustomDetails) GetRecoveryAvailabilitySetCustomDetails() *RecoveryAvailabilitySetCustomDetails { - return r -} - -// RecoveryPlan - Recovery plan details. -type RecoveryPlan struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The custom details. - Properties *RecoveryPlanProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RecoveryPlanA2ADetails - Recovery plan A2A specific details. -type RecoveryPlanA2ADetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // The primary extended location. - PrimaryExtendedLocation *ExtendedLocation `json:"primaryExtendedLocation,omitempty"` - - // The primary zone. - PrimaryZone *string `json:"primaryZone,omitempty"` - - // The recovery extended location. - RecoveryExtendedLocation *ExtendedLocation `json:"recoveryExtendedLocation,omitempty"` - - // The recovery zone. - RecoveryZone *string `json:"recoveryZone,omitempty"` -} - -// GetRecoveryPlanProviderSpecificDetails implements the RecoveryPlanProviderSpecificDetailsClassification interface for type -// RecoveryPlanA2ADetails. -func (r *RecoveryPlanA2ADetails) GetRecoveryPlanProviderSpecificDetails() *RecoveryPlanProviderSpecificDetails { - return &RecoveryPlanProviderSpecificDetails{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanA2AFailoverInput - Recovery plan A2A failover input. -type RecoveryPlanA2AFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The recovery point type. - RecoveryPointType *A2ARpRecoveryPointType `json:"recoveryPointType,omitempty"` - - // A value indicating whether to use recovery cloud service for TFO or not. - CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` - - // A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. - MultiVMSyncPointOption *MultiVMSyncPointOption `json:"multiVmSyncPointOption,omitempty"` -} - -// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface -// for type RecoveryPlanA2AFailoverInput. -func (r *RecoveryPlanA2AFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { - return &RecoveryPlanProviderSpecificFailoverInput{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanA2AInput - Recovery plan A2A input. -type RecoveryPlanA2AInput struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // The primary extended location. - PrimaryExtendedLocation *ExtendedLocation `json:"primaryExtendedLocation,omitempty"` - - // The primary zone. - PrimaryZone *string `json:"primaryZone,omitempty"` - - // The recovery extended location. - RecoveryExtendedLocation *ExtendedLocation `json:"recoveryExtendedLocation,omitempty"` - - // The recovery zone. - RecoveryZone *string `json:"recoveryZone,omitempty"` -} - -// GetRecoveryPlanProviderSpecificInput implements the RecoveryPlanProviderSpecificInputClassification interface for type -// RecoveryPlanA2AInput. -func (r *RecoveryPlanA2AInput) GetRecoveryPlanProviderSpecificInput() *RecoveryPlanProviderSpecificInput { - return &RecoveryPlanProviderSpecificInput{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanAction - Recovery plan action details. -type RecoveryPlanAction struct { - // REQUIRED; The action name. - ActionName *string `json:"actionName,omitempty"` - - // REQUIRED; The custom details. - CustomDetails RecoveryPlanActionDetailsClassification `json:"customDetails,omitempty"` - - // REQUIRED; The list of failover directions. - FailoverDirections []*PossibleOperationsDirections `json:"failoverDirections,omitempty"` - - // REQUIRED; The list of failover types. - FailoverTypes []*ReplicationProtectedItemOperation `json:"failoverTypes,omitempty"` -} - -// RecoveryPlanActionDetailsClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryPlanActionDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *RecoveryPlanActionDetails, *RecoveryPlanAutomationRunbookActionDetails, *RecoveryPlanManualActionDetails, *RecoveryPlanScriptActionDetails -type RecoveryPlanActionDetailsClassification interface { - // GetRecoveryPlanActionDetails returns the RecoveryPlanActionDetails content of the underlying type. - GetRecoveryPlanActionDetails() *RecoveryPlanActionDetails -} - -// RecoveryPlanActionDetails - Recovery plan action custom details. -type RecoveryPlanActionDetails struct { - // REQUIRED; Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetRecoveryPlanActionDetails implements the RecoveryPlanActionDetailsClassification interface for type RecoveryPlanActionDetails. -func (r *RecoveryPlanActionDetails) GetRecoveryPlanActionDetails() *RecoveryPlanActionDetails { - return r -} - -// RecoveryPlanAutomationRunbookActionDetails - Recovery plan Automation runbook action details. -type RecoveryPlanAutomationRunbookActionDetails struct { - // REQUIRED; The fabric location. - FabricLocation *RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` - - // REQUIRED; Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). - InstanceType *string `json:"instanceType,omitempty"` - - // The runbook ARM Id. - RunbookID *string `json:"runbookId,omitempty"` - - // The runbook timeout. - Timeout *string `json:"timeout,omitempty"` -} - -// GetRecoveryPlanActionDetails implements the RecoveryPlanActionDetailsClassification interface for type RecoveryPlanAutomationRunbookActionDetails. -func (r *RecoveryPlanAutomationRunbookActionDetails) GetRecoveryPlanActionDetails() *RecoveryPlanActionDetails { - return &RecoveryPlanActionDetails{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanCollection - Recovery plan collection details. -type RecoveryPlanCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The list of recovery plans. - Value []*RecoveryPlan `json:"value,omitempty"` -} - -// RecoveryPlanGroup - Recovery plan group details. -type RecoveryPlanGroup struct { - // REQUIRED; The group type. - GroupType *RecoveryPlanGroupType `json:"groupType,omitempty"` - - // The end group actions. - EndGroupActions []*RecoveryPlanAction `json:"endGroupActions,omitempty"` - - // The list of protected items. - ReplicationProtectedItems []*RecoveryPlanProtectedItem `json:"replicationProtectedItems,omitempty"` - - // The start group actions. - StartGroupActions []*RecoveryPlanAction `json:"startGroupActions,omitempty"` -} - -// RecoveryPlanGroupTaskDetailsClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryPlanGroupTaskDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *RecoveryPlanGroupTaskDetails, *RecoveryPlanShutdownGroupTaskDetails -type RecoveryPlanGroupTaskDetailsClassification interface { - GroupTaskDetailsClassification - // GetRecoveryPlanGroupTaskDetails returns the RecoveryPlanGroupTaskDetails content of the underlying type. - GetRecoveryPlanGroupTaskDetails() *RecoveryPlanGroupTaskDetails -} - -// RecoveryPlanGroupTaskDetails - This class represents the recovery plan group task. -type RecoveryPlanGroupTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // The child tasks. - ChildTasks []*ASRTask `json:"childTasks,omitempty"` - - // The group identifier. - GroupID *string `json:"groupId,omitempty"` - - // The name. - Name *string `json:"name,omitempty"` - - // The group type. - RpGroupType *string `json:"rpGroupType,omitempty"` -} - -// GetGroupTaskDetails implements the GroupTaskDetailsClassification interface for type RecoveryPlanGroupTaskDetails. -func (r *RecoveryPlanGroupTaskDetails) GetGroupTaskDetails() *GroupTaskDetails { - return &GroupTaskDetails{ - InstanceType: r.InstanceType, - ChildTasks: r.ChildTasks, - } -} - -// GetRecoveryPlanGroupTaskDetails implements the RecoveryPlanGroupTaskDetailsClassification interface for type RecoveryPlanGroupTaskDetails. -func (r *RecoveryPlanGroupTaskDetails) GetRecoveryPlanGroupTaskDetails() *RecoveryPlanGroupTaskDetails { - return r -} - -// RecoveryPlanHyperVReplicaAzureFailbackInput - Recovery plan HVR Azure failback input. -type RecoveryPlanHyperVReplicaAzureFailbackInput struct { - // REQUIRED; The data sync option. - DataSyncOption *DataSyncStatus `json:"dataSyncOption,omitempty"` - - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The ALR option. - RecoveryVMCreationOption *AlternateLocationRecoveryOption `json:"recoveryVmCreationOption,omitempty"` -} - -// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface -// for type RecoveryPlanHyperVReplicaAzureFailbackInput. -func (r *RecoveryPlanHyperVReplicaAzureFailbackInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { - return &RecoveryPlanProviderSpecificFailoverInput{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanHyperVReplicaAzureFailoverInput - Recovery plan HVR Azure failover input. -type RecoveryPlanHyperVReplicaAzureFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The primary KEK certificate PFX. - PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` - - // The recovery point type. - RecoveryPointType *HyperVReplicaAzureRpRecoveryPointType `json:"recoveryPointType,omitempty"` - - // The secondary KEK certificate PFX. - SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` -} - -// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface -// for type RecoveryPlanHyperVReplicaAzureFailoverInput. -func (r *RecoveryPlanHyperVReplicaAzureFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { - return &RecoveryPlanProviderSpecificFailoverInput{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanInMageAzureV2FailoverInput - Recovery plan InMageAzureV2 failover input. -type RecoveryPlanInMageAzureV2FailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The recovery point type. - RecoveryPointType *InMageV2RpRecoveryPointType `json:"recoveryPointType,omitempty"` - - // A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. - UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` -} - -// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface -// for type RecoveryPlanInMageAzureV2FailoverInput. -func (r *RecoveryPlanInMageAzureV2FailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { - return &RecoveryPlanProviderSpecificFailoverInput{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanInMageFailoverInput - Recovery plan InMage failover input. -type RecoveryPlanInMageFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The recovery point type. - RecoveryPointType *RpInMageRecoveryPointType `json:"recoveryPointType,omitempty"` -} - -// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface -// for type RecoveryPlanInMageFailoverInput. -func (r *RecoveryPlanInMageFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { - return &RecoveryPlanProviderSpecificFailoverInput{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanInMageRcmFailbackFailoverInput - Recovery plan InMageRcmFailback failover input. -type RecoveryPlanInMageRcmFailbackFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The recovery point type. - RecoveryPointType *InMageRcmFailbackRecoveryPointType `json:"recoveryPointType,omitempty"` - - // A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. - UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` -} - -// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface -// for type RecoveryPlanInMageRcmFailbackFailoverInput. -func (r *RecoveryPlanInMageRcmFailbackFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { - return &RecoveryPlanProviderSpecificFailoverInput{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanInMageRcmFailoverInput - Recovery plan InMageRcm failover input. -type RecoveryPlanInMageRcmFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The recovery point type. - RecoveryPointType *RecoveryPlanPointType `json:"recoveryPointType,omitempty"` - - // A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. - UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` -} - -// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface -// for type RecoveryPlanInMageRcmFailoverInput. -func (r *RecoveryPlanInMageRcmFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { - return &RecoveryPlanProviderSpecificFailoverInput{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanManualActionDetails - Recovery plan manual action details. -type RecoveryPlanManualActionDetails struct { - // REQUIRED; Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). - InstanceType *string `json:"instanceType,omitempty"` - - // The manual action description. - Description *string `json:"description,omitempty"` -} - -// GetRecoveryPlanActionDetails implements the RecoveryPlanActionDetailsClassification interface for type RecoveryPlanManualActionDetails. -func (r *RecoveryPlanManualActionDetails) GetRecoveryPlanActionDetails() *RecoveryPlanActionDetails { - return &RecoveryPlanActionDetails{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanPlannedFailoverInput - Recovery plan planned failover input. -type RecoveryPlanPlannedFailoverInput struct { - // REQUIRED; The recovery plan planned failover input properties. - Properties *RecoveryPlanPlannedFailoverInputProperties `json:"properties,omitempty"` -} - -// RecoveryPlanPlannedFailoverInputProperties - Recovery plan planned failover input properties. -type RecoveryPlanPlannedFailoverInputProperties struct { - // REQUIRED; The failover direction. - FailoverDirection *PossibleOperationsDirections `json:"failoverDirection,omitempty"` - - // The provider specific properties. - ProviderSpecificDetails []RecoveryPlanProviderSpecificFailoverInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// RecoveryPlanProperties - Recovery plan properties. -type RecoveryPlanProperties struct { - // The list of allowed operations. - AllowedOperations []*string `json:"allowedOperations,omitempty"` - - // The current scenario details. - CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` - - // The recovery plan status. - CurrentScenarioStatus *string `json:"currentScenarioStatus,omitempty"` - - // The recovery plan status description. - CurrentScenarioStatusDescription *string `json:"currentScenarioStatusDescription,omitempty"` - - // The failover deployment model. - FailoverDeploymentModel *string `json:"failoverDeploymentModel,omitempty"` - - // The friendly name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The recovery plan groups. - Groups []*RecoveryPlanGroup `json:"groups,omitempty"` - - // The start time of the last planned failover. - LastPlannedFailoverTime *time.Time `json:"lastPlannedFailoverTime,omitempty"` - - // The start time of the last test failover. - LastTestFailoverTime *time.Time `json:"lastTestFailoverTime,omitempty"` - - // The start time of the last unplanned failover. - LastUnplannedFailoverTime *time.Time `json:"lastUnplannedFailoverTime,omitempty"` - - // The primary fabric friendly name. - PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` - - // The primary fabric Id. - PrimaryFabricID *string `json:"primaryFabricId,omitempty"` - - // The provider id and provider specific details. - ProviderSpecificDetails []RecoveryPlanProviderSpecificDetailsClassification `json:"providerSpecificDetails,omitempty"` - - // The recovery fabric friendly name. - RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` - - // The recovery fabric Id. - RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` - - // The list of replication providers. - ReplicationProviders []*string `json:"replicationProviders,omitempty"` -} - -// RecoveryPlanProtectedItem - Recovery plan protected item. -type RecoveryPlanProtectedItem struct { - // The ARM Id of the recovery plan protected item. - ID *string `json:"id,omitempty"` - - // The virtual machine Id. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` -} - -// RecoveryPlanProviderSpecificDetailsClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryPlanProviderSpecificDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *RecoveryPlanA2ADetails, *RecoveryPlanProviderSpecificDetails -type RecoveryPlanProviderSpecificDetailsClassification interface { - // GetRecoveryPlanProviderSpecificDetails returns the RecoveryPlanProviderSpecificDetails content of the underlying type. - GetRecoveryPlanProviderSpecificDetails() *RecoveryPlanProviderSpecificDetails -} - -// RecoveryPlanProviderSpecificDetails - Recovery plan provider specific details. -type RecoveryPlanProviderSpecificDetails struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetRecoveryPlanProviderSpecificDetails implements the RecoveryPlanProviderSpecificDetailsClassification interface for type -// RecoveryPlanProviderSpecificDetails. -func (r *RecoveryPlanProviderSpecificDetails) GetRecoveryPlanProviderSpecificDetails() *RecoveryPlanProviderSpecificDetails { - return r -} - -// RecoveryPlanProviderSpecificFailoverInputClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryPlanProviderSpecificFailoverInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *RecoveryPlanA2AFailoverInput, *RecoveryPlanHyperVReplicaAzureFailbackInput, *RecoveryPlanHyperVReplicaAzureFailoverInput, -// - *RecoveryPlanInMageAzureV2FailoverInput, *RecoveryPlanInMageFailoverInput, *RecoveryPlanInMageRcmFailbackFailoverInput, -// - *RecoveryPlanInMageRcmFailoverInput, *RecoveryPlanProviderSpecificFailoverInput -type RecoveryPlanProviderSpecificFailoverInputClassification interface { - // GetRecoveryPlanProviderSpecificFailoverInput returns the RecoveryPlanProviderSpecificFailoverInput content of the underlying type. - GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput -} - -// RecoveryPlanProviderSpecificFailoverInput - Recovery plan provider specific failover input. -type RecoveryPlanProviderSpecificFailoverInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface -// for type RecoveryPlanProviderSpecificFailoverInput. -func (r *RecoveryPlanProviderSpecificFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { - return r -} - -// RecoveryPlanProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryPlanProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *RecoveryPlanA2AInput, *RecoveryPlanProviderSpecificInput -type RecoveryPlanProviderSpecificInputClassification interface { - // GetRecoveryPlanProviderSpecificInput returns the RecoveryPlanProviderSpecificInput content of the underlying type. - GetRecoveryPlanProviderSpecificInput() *RecoveryPlanProviderSpecificInput -} - -// RecoveryPlanProviderSpecificInput - Recovery plan provider specific input base class. -type RecoveryPlanProviderSpecificInput struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetRecoveryPlanProviderSpecificInput implements the RecoveryPlanProviderSpecificInputClassification interface for type -// RecoveryPlanProviderSpecificInput. -func (r *RecoveryPlanProviderSpecificInput) GetRecoveryPlanProviderSpecificInput() *RecoveryPlanProviderSpecificInput { - return r -} - -// RecoveryPlanScriptActionDetails - Recovery plan script action details. -type RecoveryPlanScriptActionDetails struct { - // REQUIRED; The fabric location. - FabricLocation *RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` - - // REQUIRED; Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The script path. - Path *string `json:"path,omitempty"` - - // The script timeout. - Timeout *string `json:"timeout,omitempty"` -} - -// GetRecoveryPlanActionDetails implements the RecoveryPlanActionDetailsClassification interface for type RecoveryPlanScriptActionDetails. -func (r *RecoveryPlanScriptActionDetails) GetRecoveryPlanActionDetails() *RecoveryPlanActionDetails { - return &RecoveryPlanActionDetails{ - InstanceType: r.InstanceType, - } -} - -// RecoveryPlanShutdownGroupTaskDetails - This class represents the recovery plan shutdown group task details. -type RecoveryPlanShutdownGroupTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // The child tasks. - ChildTasks []*ASRTask `json:"childTasks,omitempty"` - - // The group identifier. - GroupID *string `json:"groupId,omitempty"` - - // The name. - Name *string `json:"name,omitempty"` - - // The group type. - RpGroupType *string `json:"rpGroupType,omitempty"` -} - -// GetGroupTaskDetails implements the GroupTaskDetailsClassification interface for type RecoveryPlanShutdownGroupTaskDetails. -func (r *RecoveryPlanShutdownGroupTaskDetails) GetGroupTaskDetails() *GroupTaskDetails { - return &GroupTaskDetails{ - InstanceType: r.InstanceType, - ChildTasks: r.ChildTasks, - } -} - -// GetRecoveryPlanGroupTaskDetails implements the RecoveryPlanGroupTaskDetailsClassification interface for type RecoveryPlanShutdownGroupTaskDetails. -func (r *RecoveryPlanShutdownGroupTaskDetails) GetRecoveryPlanGroupTaskDetails() *RecoveryPlanGroupTaskDetails { - return &RecoveryPlanGroupTaskDetails{ - Name: r.Name, - GroupID: r.GroupID, - RpGroupType: r.RpGroupType, - InstanceType: r.InstanceType, - ChildTasks: r.ChildTasks, - } -} - -// RecoveryPlanTestFailoverCleanupInput - Recovery plan test failover cleanup input. -type RecoveryPlanTestFailoverCleanupInput struct { - // REQUIRED; The recovery plan test failover cleanup input properties. - Properties *RecoveryPlanTestFailoverCleanupInputProperties `json:"properties,omitempty"` -} - -// RecoveryPlanTestFailoverCleanupInputProperties - Recovery plan test failover cleanup input properties. -type RecoveryPlanTestFailoverCleanupInputProperties struct { - // The test failover cleanup comments. - Comments *string `json:"comments,omitempty"` -} - -// RecoveryPlanTestFailoverInput - Recovery plan test failover input. -type RecoveryPlanTestFailoverInput struct { - // REQUIRED; The recovery plan test failover input properties. - Properties *RecoveryPlanTestFailoverInputProperties `json:"properties,omitempty"` -} - -// RecoveryPlanTestFailoverInputProperties - Recovery plan test failover input properties. -type RecoveryPlanTestFailoverInputProperties struct { - // REQUIRED; The failover direction. - FailoverDirection *PossibleOperationsDirections `json:"failoverDirection,omitempty"` - - // REQUIRED; The network type to be used for test failover. - NetworkType *string `json:"networkType,omitempty"` - - // The Id of the network to be used for test failover. - NetworkID *string `json:"networkId,omitempty"` - - // The provider specific properties. - ProviderSpecificDetails []RecoveryPlanProviderSpecificFailoverInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// RecoveryPlanUnplannedFailoverInput - Recovery plan unplanned failover input. -type RecoveryPlanUnplannedFailoverInput struct { - // REQUIRED; The recovery plan unplanned failover input properties. - Properties *RecoveryPlanUnplannedFailoverInputProperties `json:"properties,omitempty"` -} - -// RecoveryPlanUnplannedFailoverInputProperties - Recovery plan unplanned failover input properties. -type RecoveryPlanUnplannedFailoverInputProperties struct { - // REQUIRED; The failover direction. - FailoverDirection *PossibleOperationsDirections `json:"failoverDirection,omitempty"` - - // REQUIRED; A value indicating whether source site operations are required. - SourceSiteOperations *SourceSiteOperations `json:"sourceSiteOperations,omitempty"` - - // The provider specific properties. - ProviderSpecificDetails []RecoveryPlanProviderSpecificFailoverInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// RecoveryPoint - Recovery point. -type RecoveryPoint struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The recovery point properties. - Properties *RecoveryPointProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RecoveryPointCollection - Collection of recovery point details. -type RecoveryPointCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The recovery point details. - Value []*RecoveryPoint `json:"value,omitempty"` -} - -// RecoveryPointProperties - Recovery point properties. -type RecoveryPointProperties struct { - // The provider specific details for the recovery point. - ProviderSpecificDetails ProviderSpecificRecoveryPointDetailsClassification `json:"providerSpecificDetails,omitempty"` - - // The recovery point time. - RecoveryPointTime *time.Time `json:"recoveryPointTime,omitempty"` - - // The recovery point type: ApplicationConsistent, CrashConsistent. - RecoveryPointType *string `json:"recoveryPointType,omitempty"` -} - -// RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. -type RecoveryPointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// RecoveryPointsClientListByReplicationProtectedItemsOptions contains the optional parameters for the RecoveryPointsClient.ListByReplicationProtectedItems -// method. -type RecoveryPointsClientListByReplicationProtectedItemsOptions struct { - // placeholder for future optional parameters -} - -// RecoveryProximityPlacementGroupCustomDetailsClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryProximityPlacementGroupCustomDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ExistingRecoveryProximityPlacementGroup, *RecoveryProximityPlacementGroupCustomDetails -type RecoveryProximityPlacementGroupCustomDetailsClassification interface { - // GetRecoveryProximityPlacementGroupCustomDetails returns the RecoveryProximityPlacementGroupCustomDetails content of the underlying type. - GetRecoveryProximityPlacementGroupCustomDetails() *RecoveryProximityPlacementGroupCustomDetails -} - -// RecoveryProximityPlacementGroupCustomDetails - Recovery Proximity placement group custom input. -type RecoveryProximityPlacementGroupCustomDetails struct { - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` -} - -// GetRecoveryProximityPlacementGroupCustomDetails implements the RecoveryProximityPlacementGroupCustomDetailsClassification -// interface for type RecoveryProximityPlacementGroupCustomDetails. -func (r *RecoveryProximityPlacementGroupCustomDetails) GetRecoveryProximityPlacementGroupCustomDetails() *RecoveryProximityPlacementGroupCustomDetails { - return r -} - -// RecoveryResourceGroupCustomDetailsClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryResourceGroupCustomDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ExistingRecoveryResourceGroup, *RecoveryResourceGroupCustomDetails -type RecoveryResourceGroupCustomDetailsClassification interface { - // GetRecoveryResourceGroupCustomDetails returns the RecoveryResourceGroupCustomDetails content of the underlying type. - GetRecoveryResourceGroupCustomDetails() *RecoveryResourceGroupCustomDetails -} - -// RecoveryResourceGroupCustomDetails - Recovery Resource Group custom input. -type RecoveryResourceGroupCustomDetails struct { - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` -} - -// GetRecoveryResourceGroupCustomDetails implements the RecoveryResourceGroupCustomDetailsClassification interface for type -// RecoveryResourceGroupCustomDetails. -func (r *RecoveryResourceGroupCustomDetails) GetRecoveryResourceGroupCustomDetails() *RecoveryResourceGroupCustomDetails { - return r -} - -// RecoveryServicesProvider - Provider details. -type RecoveryServicesProvider struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // Provider properties. - Properties *RecoveryServicesProviderProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// RecoveryServicesProviderCollection - Collection of providers. -type RecoveryServicesProviderCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The Servers details. - Value []*RecoveryServicesProvider `json:"value,omitempty"` -} - -// RecoveryServicesProviderProperties - Recovery services provider properties. -type RecoveryServicesProviderProperties struct { - // The scenarios allowed on this provider. - AllowedScenarios []*string `json:"allowedScenarios,omitempty"` - - // The authentication identity details. - AuthenticationIdentityDetails *IdentityProviderDetails `json:"authenticationIdentityDetails,omitempty"` - - // The Bios Id. - BiosID *string `json:"biosId,omitempty"` - - // A value indicating whether DRA is responsive. - ConnectionStatus *string `json:"connectionStatus,omitempty"` - - // The data plane authentication identity details. - DataPlaneAuthenticationIdentityDetails *IdentityProviderDetails `json:"dataPlaneAuthenticationIdentityDetails,omitempty"` - - // The DRA Id. - DraIdentifier *string `json:"draIdentifier,omitempty"` - - // The fabric friendly name. - FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"` - - // Type of the site. - FabricType *string `json:"fabricType,omitempty"` - - // Friendly name of the DRA. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The recovery services provider health error details. - HealthErrorDetails []*HealthError `json:"healthErrorDetails,omitempty"` - - // Time when last heartbeat was sent by the DRA. - LastHeartBeat *time.Time `json:"lastHeartBeat,omitempty"` - - // The machine Id. - MachineID *string `json:"machineId,omitempty"` - - // The machine name. - MachineName *string `json:"machineName,omitempty"` - - // Number of protected VMs currently managed by the DRA. - ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` - - // The provider version. - ProviderVersion *string `json:"providerVersion,omitempty"` - - // The provider version details. - ProviderVersionDetails *VersionDetails `json:"providerVersionDetails,omitempty"` - - // Expiry date of the version. - ProviderVersionExpiryDate *time.Time `json:"providerVersionExpiryDate,omitempty"` - - // DRA version status. - ProviderVersionState *string `json:"providerVersionState,omitempty"` - - // The resource access identity details. - ResourceAccessIdentityDetails *IdentityProviderDetails `json:"resourceAccessIdentityDetails,omitempty"` - - // The fabric provider. - ServerVersion *string `json:"serverVersion,omitempty"` -} - -// RecoveryVirtualNetworkCustomDetailsClassification provides polymorphic access to related types. -// Call the interface's GetRecoveryVirtualNetworkCustomDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ExistingRecoveryVirtualNetwork, *NewRecoveryVirtualNetwork, *RecoveryVirtualNetworkCustomDetails -type RecoveryVirtualNetworkCustomDetailsClassification interface { - // GetRecoveryVirtualNetworkCustomDetails returns the RecoveryVirtualNetworkCustomDetails content of the underlying type. - GetRecoveryVirtualNetworkCustomDetails() *RecoveryVirtualNetworkCustomDetails -} - -// RecoveryVirtualNetworkCustomDetails - Recovery Virtual network custom input. -type RecoveryVirtualNetworkCustomDetails struct { - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` -} - -// GetRecoveryVirtualNetworkCustomDetails implements the RecoveryVirtualNetworkCustomDetailsClassification interface for type -// RecoveryVirtualNetworkCustomDetails. -func (r *RecoveryVirtualNetworkCustomDetails) GetRecoveryVirtualNetworkCustomDetails() *RecoveryVirtualNetworkCustomDetails { - return r -} - -// RemoveDisksInput - Input for remove disk(s) operation. -type RemoveDisksInput struct { - // Remove disk input properties. - Properties *RemoveDisksInputProperties `json:"properties,omitempty"` -} - -// RemoveDisksInputProperties - Remove Disk input properties. -type RemoveDisksInputProperties struct { - // The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, - // it will be SanEnableProtectionInput object. For HyperVReplicaAzure - // provider, it can be null. - ProviderSpecificDetails RemoveDisksProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// RemoveDisksProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetRemoveDisksProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2ARemoveDisksInput, *RemoveDisksProviderSpecificInput -type RemoveDisksProviderSpecificInputClassification interface { - // GetRemoveDisksProviderSpecificInput returns the RemoveDisksProviderSpecificInput content of the underlying type. - GetRemoveDisksProviderSpecificInput() *RemoveDisksProviderSpecificInput -} - -// RemoveDisksProviderSpecificInput - Remove Disk provider specific input. -type RemoveDisksProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetRemoveDisksProviderSpecificInput implements the RemoveDisksProviderSpecificInputClassification interface for type RemoveDisksProviderSpecificInput. -func (r *RemoveDisksProviderSpecificInput) GetRemoveDisksProviderSpecificInput() *RemoveDisksProviderSpecificInput { - return r -} - -// RemoveProtectionContainerMappingInput - Container unpairing input. -type RemoveProtectionContainerMappingInput struct { - // Configure protection input properties. - Properties *RemoveProtectionContainerMappingInputProperties `json:"properties,omitempty"` -} - -// RemoveProtectionContainerMappingInputProperties - Unpairing input properties. -type RemoveProtectionContainerMappingInputProperties struct { - // Provider specific input for unpairing. - ProviderSpecificInput *ReplicationProviderContainerUnmappingInput `json:"providerSpecificInput,omitempty"` -} - -// RenewCertificateInput - Certificate renewal input. -type RenewCertificateInput struct { - // Renew certificate input properties. - Properties *RenewCertificateInputProperties `json:"properties,omitempty"` -} - -// RenewCertificateInputProperties - Renew Certificate input properties. -type RenewCertificateInputProperties struct { - // Renew certificate type. - RenewCertificateType *string `json:"renewCertificateType,omitempty"` -} - -// ReplicationAgentDetails - Replication agent details. -type ReplicationAgentDetails struct { - // READ-ONLY; The replication agent Bios Id. - BiosID *string `json:"biosId,omitempty" azure:"ro"` - - // READ-ONLY; The fabric object Id. - FabricObjectID *string `json:"fabricObjectId,omitempty" azure:"ro"` - - // READ-ONLY; The replication agent Fqdn. - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - - // READ-ONLY; The health of the replication agent. - Health *ProtectionHealth `json:"health,omitempty" azure:"ro"` - - // READ-ONLY; The health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty" azure:"ro"` - - // READ-ONLY; The replication agent Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The last heartbeat received from the replication agent. - LastHeartbeatUTC *time.Time `json:"lastHeartbeatUtc,omitempty" azure:"ro"` - - // READ-ONLY; The replication agent name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The version. - Version *string `json:"version,omitempty" azure:"ro"` -} - -// ReplicationAlertSettingsClientCreateOptions contains the optional parameters for the ReplicationAlertSettingsClient.Create -// method. -type ReplicationAlertSettingsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// ReplicationAlertSettingsClientGetOptions contains the optional parameters for the ReplicationAlertSettingsClient.Get method. -type ReplicationAlertSettingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationAlertSettingsClientListOptions contains the optional parameters for the ReplicationAlertSettingsClient.List -// method. -type ReplicationAlertSettingsClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationAppliance - Replication appliance definition. -type ReplicationAppliance struct { - // Appliance related data. - Properties *ReplicationApplianceProperties `json:"properties,omitempty"` -} - -// ReplicationApplianceProperties - Replication appliance properties. -type ReplicationApplianceProperties struct { - // Provider specific settings. - ProviderSpecificDetails ApplianceSpecificDetailsClassification `json:"providerSpecificDetails,omitempty"` -} - -// ReplicationAppliancesClientListOptions contains the optional parameters for the ReplicationAppliancesClient.List method. -type ReplicationAppliancesClientListOptions struct { - // OData filter options. - Filter *string -} - -// ReplicationEligibilityResults - Replication eligibility results response model. -type ReplicationEligibilityResults struct { - // READ-ONLY; Gets Unique ARM identifier for this object. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Gets the name of this object. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Gets properties model for replication eligibility results API. - Properties *ReplicationEligibilityResultsProperties `json:"properties,omitempty" azure:"ro"` - - // READ-ONLY; Gets the object type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ReplicationEligibilityResultsClientGetOptions contains the optional parameters for the ReplicationEligibilityResultsClient.Get -// method. -type ReplicationEligibilityResultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationEligibilityResultsClientListOptions contains the optional parameters for the ReplicationEligibilityResultsClient.List -// method. -type ReplicationEligibilityResultsClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationEligibilityResultsCollection - Replication eligibility results collection response model. -type ReplicationEligibilityResultsCollection struct { - // The replication eligibility results details. - Value []*ReplicationEligibilityResults `json:"value,omitempty"` -} - -// ReplicationEligibilityResultsErrorInfo - Error model that can be exposed to the user. -type ReplicationEligibilityResultsErrorInfo struct { - // The error code. - Code *string `json:"code,omitempty"` - - // The error message. - Message *string `json:"message,omitempty"` - - // The possible causes. - PossibleCauses *string `json:"possibleCauses,omitempty"` - - // The recommended action. - RecommendedAction *string `json:"recommendedAction,omitempty"` - - // READ-ONLY; The error status. - Status *string `json:"status,omitempty" azure:"ro"` -} - -// ReplicationEligibilityResultsProperties - Properties model for replication eligibility results API. -type ReplicationEligibilityResultsProperties struct { - // The error details. - Errors []*ReplicationEligibilityResultsErrorInfo `json:"errors,omitempty"` - - // READ-ONLY; The client request Id. - ClientRequestID *string `json:"clientRequestId,omitempty" azure:"ro"` -} - -// ReplicationEventsClientGetOptions contains the optional parameters for the ReplicationEventsClient.Get method. -type ReplicationEventsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationEventsClientListOptions contains the optional parameters for the ReplicationEventsClient.List method. -type ReplicationEventsClientListOptions struct { - // OData filter options. - Filter *string -} - -// ReplicationFabricsClientBeginCheckConsistencyOptions contains the optional parameters for the ReplicationFabricsClient.BeginCheckConsistency -// method. -type ReplicationFabricsClientBeginCheckConsistencyOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationFabricsClientBeginCreateOptions contains the optional parameters for the ReplicationFabricsClient.BeginCreate -// method. -type ReplicationFabricsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationFabricsClientBeginDeleteOptions contains the optional parameters for the ReplicationFabricsClient.BeginDelete -// method. -type ReplicationFabricsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationFabricsClientBeginMigrateToAADOptions contains the optional parameters for the ReplicationFabricsClient.BeginMigrateToAAD -// method. -type ReplicationFabricsClientBeginMigrateToAADOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationFabricsClientBeginPurgeOptions contains the optional parameters for the ReplicationFabricsClient.BeginPurge -// method. -type ReplicationFabricsClientBeginPurgeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationFabricsClientBeginReassociateGatewayOptions contains the optional parameters for the ReplicationFabricsClient.BeginReassociateGateway -// method. -type ReplicationFabricsClientBeginReassociateGatewayOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationFabricsClientBeginRenewCertificateOptions contains the optional parameters for the ReplicationFabricsClient.BeginRenewCertificate -// method. -type ReplicationFabricsClientBeginRenewCertificateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationFabricsClientGetOptions contains the optional parameters for the ReplicationFabricsClient.Get method. -type ReplicationFabricsClientGetOptions struct { - // OData filter options. - Filter *string -} - -// ReplicationFabricsClientListOptions contains the optional parameters for the ReplicationFabricsClient.List method. -type ReplicationFabricsClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationGroupDetails - Replication group details. This will be used in case of San. -type ReplicationGroupDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetConfigurationSettings implements the ConfigurationSettingsClassification interface for type ReplicationGroupDetails. -func (r *ReplicationGroupDetails) GetConfigurationSettings() *ConfigurationSettings { - return &ConfigurationSettings{ - InstanceType: r.InstanceType, - } -} - -// ReplicationJobsClientBeginCancelOptions contains the optional parameters for the ReplicationJobsClient.BeginCancel method. -type ReplicationJobsClientBeginCancelOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationJobsClientBeginExportOptions contains the optional parameters for the ReplicationJobsClient.BeginExport method. -type ReplicationJobsClientBeginExportOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationJobsClientBeginRestartOptions contains the optional parameters for the ReplicationJobsClient.BeginRestart method. -type ReplicationJobsClientBeginRestartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationJobsClientBeginResumeOptions contains the optional parameters for the ReplicationJobsClient.BeginResume method. -type ReplicationJobsClientBeginResumeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationJobsClientGetOptions contains the optional parameters for the ReplicationJobsClient.Get method. -type ReplicationJobsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationJobsClientListOptions contains the optional parameters for the ReplicationJobsClient.List method. -type ReplicationJobsClientListOptions struct { - // OData filter options. - Filter *string -} - -// ReplicationLogicalNetworksClientGetOptions contains the optional parameters for the ReplicationLogicalNetworksClient.Get -// method. -type ReplicationLogicalNetworksClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationLogicalNetworksClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationLogicalNetworksClient.ListByReplicationFabrics -// method. -type ReplicationLogicalNetworksClientListByReplicationFabricsOptions struct { - // placeholder for future optional parameters -} - -// ReplicationMigrationItemsClientBeginCreateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginCreate -// method. -type ReplicationMigrationItemsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationMigrationItemsClientBeginDeleteOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginDelete -// method. -type ReplicationMigrationItemsClientBeginDeleteOptions struct { - // The delete option. - DeleteOption *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationMigrationItemsClientBeginMigrateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginMigrate -// method. -type ReplicationMigrationItemsClientBeginMigrateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationMigrationItemsClientBeginPauseReplicationOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginPauseReplication -// method. -type ReplicationMigrationItemsClientBeginPauseReplicationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationMigrationItemsClientBeginResumeReplicationOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginResumeReplication -// method. -type ReplicationMigrationItemsClientBeginResumeReplicationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationMigrationItemsClientBeginResyncOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginResync -// method. -type ReplicationMigrationItemsClientBeginResyncOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginTestMigrateCleanup -// method. -type ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationMigrationItemsClientBeginTestMigrateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginTestMigrate -// method. -type ReplicationMigrationItemsClientBeginTestMigrateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationMigrationItemsClientBeginUpdateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginUpdate -// method. -type ReplicationMigrationItemsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationMigrationItemsClientGetOptions contains the optional parameters for the ReplicationMigrationItemsClient.Get -// method. -type ReplicationMigrationItemsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions contains the optional parameters for the ReplicationMigrationItemsClient.ListByReplicationProtectionContainers -// method. -type ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions struct { - // OData filter options. - Filter *string - // The pagination token. - SkipToken *string - // The page size. - TakeToken *string -} - -// ReplicationMigrationItemsClientListOptions contains the optional parameters for the ReplicationMigrationItemsClient.List -// method. -type ReplicationMigrationItemsClientListOptions struct { - // OData filter options. - Filter *string - // The pagination token. - SkipToken *string - // The page size. - TakeToken *string -} - -// ReplicationNetworkMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginCreate -// method. -type ReplicationNetworkMappingsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationNetworkMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginDelete -// method. -type ReplicationNetworkMappingsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationNetworkMappingsClientBeginUpdateOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginUpdate -// method. -type ReplicationNetworkMappingsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationNetworkMappingsClientGetOptions contains the optional parameters for the ReplicationNetworkMappingsClient.Get -// method. -type ReplicationNetworkMappingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationNetworkMappingsClientListByReplicationNetworksOptions contains the optional parameters for the ReplicationNetworkMappingsClient.ListByReplicationNetworks -// method. -type ReplicationNetworkMappingsClientListByReplicationNetworksOptions struct { - // placeholder for future optional parameters -} - -// ReplicationNetworkMappingsClientListOptions contains the optional parameters for the ReplicationNetworkMappingsClient.List -// method. -type ReplicationNetworkMappingsClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationNetworksClientGetOptions contains the optional parameters for the ReplicationNetworksClient.Get method. -type ReplicationNetworksClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationNetworksClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationNetworksClient.ListByReplicationFabrics -// method. -type ReplicationNetworksClientListByReplicationFabricsOptions struct { - // placeholder for future optional parameters -} - -// ReplicationNetworksClientListOptions contains the optional parameters for the ReplicationNetworksClient.List method. -type ReplicationNetworksClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationPoliciesClientBeginCreateOptions contains the optional parameters for the ReplicationPoliciesClient.BeginCreate -// method. -type ReplicationPoliciesClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationPoliciesClientBeginDeleteOptions contains the optional parameters for the ReplicationPoliciesClient.BeginDelete -// method. -type ReplicationPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationPoliciesClientBeginUpdateOptions contains the optional parameters for the ReplicationPoliciesClient.BeginUpdate -// method. -type ReplicationPoliciesClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationPoliciesClientGetOptions contains the optional parameters for the ReplicationPoliciesClient.Get method. -type ReplicationPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationPoliciesClientListOptions contains the optional parameters for the ReplicationPoliciesClient.List method. -type ReplicationPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectableItemsClientGetOptions contains the optional parameters for the ReplicationProtectableItemsClient.Get -// method. -type ReplicationProtectableItemsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions contains the optional parameters for the -// ReplicationProtectableItemsClient.ListByReplicationProtectionContainers method. -type ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions struct { - // OData filter options. - Filter *string - // skipToken OData query parameter. - SkipToken *string - // take OData query parameter. - Take *string -} - -// ReplicationProtectedItem - Replication protected item. -type ReplicationProtectedItem struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The custom data. - Properties *ReplicationProtectedItemProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ReplicationProtectedItemCollection - Replication protected item collection. -type ReplicationProtectedItemCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The Replication protected item details. - Value []*ReplicationProtectedItem `json:"value,omitempty"` -} - -// ReplicationProtectedItemProperties - Replication protected item custom data details. -type ReplicationProtectedItemProperties struct { - // The Current active location of the PE. - ActiveLocation *string `json:"activeLocation,omitempty"` - - // The allowed operations on the Replication protected item. - AllowedOperations []*string `json:"allowedOperations,omitempty"` - - // The current scenario. - CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` - - // The correlation Id for events associated with this protected item. - EventCorrelationID *string `json:"eventCorrelationId,omitempty"` - - // The consolidated failover health for the VM. - FailoverHealth *string `json:"failoverHealth,omitempty"` - - // The recovery point ARM Id to which the Vm was failed over. - FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty"` - - // The name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // List of health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty"` - - // The Last successful failover time. - LastSuccessfulFailoverTime *time.Time `json:"lastSuccessfulFailoverTime,omitempty"` - - // The Last successful test failover time. - LastSuccessfulTestFailoverTime *time.Time `json:"lastSuccessfulTestFailoverTime,omitempty"` - - // The name of Policy governing this PE. - PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` - - // The ID of Policy governing this PE. - PolicyID *string `json:"policyId,omitempty"` - - // The friendly name of the primary fabric. - PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` - - // The fabric provider of the primary fabric. - PrimaryFabricProvider *string `json:"primaryFabricProvider,omitempty"` - - // The name of primary protection container friendly name. - PrimaryProtectionContainerFriendlyName *string `json:"primaryProtectionContainerFriendlyName,omitempty"` - - // The protected item ARM Id. - ProtectableItemID *string `json:"protectableItemId,omitempty"` - - // The type of protected item type. - ProtectedItemType *string `json:"protectedItemType,omitempty"` - - // The protection status. - ProtectionState *string `json:"protectionState,omitempty"` - - // The protection state description. - ProtectionStateDescription *string `json:"protectionStateDescription,omitempty"` - - // The Replication provider custom settings. - ProviderSpecificDetails ReplicationProviderSpecificSettingsClassification `json:"providerSpecificDetails,omitempty"` - - // The recovery container Id. - RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` - - // The friendly name of recovery fabric. - RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` - - // The Arm Id of recovery fabric. - RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` - - // The name of recovery container friendly name. - RecoveryProtectionContainerFriendlyName *string `json:"recoveryProtectionContainerFriendlyName,omitempty"` - - // The recovery provider ARM Id. - RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` - - // The consolidated protection health for the VM taking any issues with SRS as well as all the replication units associated - // with the VM's replication group into account. This is a string representation - // of the ProtectionHealth enumeration. - ReplicationHealth *string `json:"replicationHealth,omitempty"` - - // The switch provider state. - SwitchProviderState *string `json:"switchProviderState,omitempty"` - - // The switch provider state description. - SwitchProviderStateDescription *string `json:"switchProviderStateDescription,omitempty"` - - // The Test failover state. - TestFailoverState *string `json:"testFailoverState,omitempty"` - - // The Test failover state description. - TestFailoverStateDescription *string `json:"testFailoverStateDescription,omitempty"` -} - -// ReplicationProtectedItemsClientBeginAddDisksOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginAddDisks -// method. -type ReplicationProtectedItemsClientBeginAddDisksOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginApplyRecoveryPoint -// method. -type ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginCreateOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginCreate -// method. -type ReplicationProtectedItemsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginDelete -// method. -type ReplicationProtectedItemsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginFailoverCancelOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginFailoverCancel -// method. -type ReplicationProtectedItemsClientBeginFailoverCancelOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginFailoverCommitOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginFailoverCommit -// method. -type ReplicationProtectedItemsClientBeginFailoverCommitOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginPlannedFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginPlannedFailover -// method. -type ReplicationProtectedItemsClientBeginPlannedFailoverOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginPurgeOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginPurge -// method. -type ReplicationProtectedItemsClientBeginPurgeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginRemoveDisksOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginRemoveDisks -// method. -type ReplicationProtectedItemsClientBeginRemoveDisksOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginRepairReplicationOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginRepairReplication -// method. -type ReplicationProtectedItemsClientBeginRepairReplicationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginReprotectOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginReprotect -// method. -type ReplicationProtectedItemsClientBeginReprotectOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginResolveHealthErrors -// method. -type ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginSwitchProviderOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginSwitchProvider -// method. -type ReplicationProtectedItemsClientBeginSwitchProviderOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginTestFailoverCleanup -// method. -type ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginTestFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginTestFailover -// method. -type ReplicationProtectedItemsClientBeginTestFailoverOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginUnplannedFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUnplannedFailover -// method. -type ReplicationProtectedItemsClientBeginUnplannedFailoverOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginUpdateApplianceOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdateAppliance -// method. -type ReplicationProtectedItemsClientBeginUpdateApplianceOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdateMobilityService -// method. -type ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientBeginUpdateOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdate -// method. -type ReplicationProtectedItemsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectedItemsClientGetOptions contains the optional parameters for the ReplicationProtectedItemsClient.Get -// method. -type ReplicationProtectedItemsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions contains the optional parameters for the ReplicationProtectedItemsClient.ListByReplicationProtectionContainers -// method. -type ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectedItemsClientListOptions contains the optional parameters for the ReplicationProtectedItemsClient.List -// method. -type ReplicationProtectedItemsClientListOptions struct { - // OData filter options. - Filter *string - // The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. - SkipToken *string -} - -// ReplicationProtectionContainerMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginCreate -// method. -type ReplicationProtectionContainerMappingsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectionContainerMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginDelete -// method. -type ReplicationProtectionContainerMappingsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectionContainerMappingsClientBeginPurgeOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginPurge -// method. -type ReplicationProtectionContainerMappingsClientBeginPurgeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectionContainerMappingsClientBeginUpdateOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginUpdate -// method. -type ReplicationProtectionContainerMappingsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectionContainerMappingsClientGetOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.Get -// method. -type ReplicationProtectionContainerMappingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions contains the optional parameters -// for the ReplicationProtectionContainerMappingsClient.ListByReplicationProtectionContainers method. -type ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectionContainerMappingsClientListOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.List -// method. -type ReplicationProtectionContainerMappingsClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectionContainersClientBeginCreateOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginCreate -// method. -type ReplicationProtectionContainersClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectionContainersClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginDelete -// method. -type ReplicationProtectionContainersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginDiscoverProtectableItem -// method. -type ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectionContainersClientBeginSwitchProtectionOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginSwitchProtection -// method. -type ReplicationProtectionContainersClientBeginSwitchProtectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationProtectionContainersClientGetOptions contains the optional parameters for the ReplicationProtectionContainersClient.Get -// method. -type ReplicationProtectionContainersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectionContainersClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationProtectionContainersClient.ListByReplicationFabrics -// method. -type ReplicationProtectionContainersClientListByReplicationFabricsOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectionContainersClientListOptions contains the optional parameters for the ReplicationProtectionContainersClient.List -// method. -type ReplicationProtectionContainersClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectionIntent - Replication protection intent. -type ReplicationProtectionIntent struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The custom data. - Properties *ReplicationProtectionIntentProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ReplicationProtectionIntentCollection - Replication protection intent objects collection. -type ReplicationProtectionIntentCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The Replication protection intent details. - Value []*ReplicationProtectionIntent `json:"value,omitempty"` -} - -// ReplicationProtectionIntentProperties - Replication protection intent custom data details. -type ReplicationProtectionIntentProperties struct { - // The name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The Replication provider custom settings. - ProviderSpecificDetails ReplicationProtectionIntentProviderSpecificSettingsClassification `json:"providerSpecificDetails,omitempty"` - - // READ-ONLY; The creation time in UTC. - CreationTimeUTC *string `json:"creationTimeUTC,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether the intent object is active. - IsActive *bool `json:"isActive,omitempty" azure:"ro"` - - // READ-ONLY; The job Id. - JobID *string `json:"jobId,omitempty" azure:"ro"` - - // READ-ONLY; The job state. - JobState *string `json:"jobState,omitempty" azure:"ro"` -} - -// ReplicationProtectionIntentProviderSpecificSettingsClassification provides polymorphic access to related types. -// Call the interface's GetReplicationProtectionIntentProviderSpecificSettings() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AReplicationIntentDetails, *ReplicationProtectionIntentProviderSpecificSettings -type ReplicationProtectionIntentProviderSpecificSettingsClassification interface { - // GetReplicationProtectionIntentProviderSpecificSettings returns the ReplicationProtectionIntentProviderSpecificSettings content of the underlying type. - GetReplicationProtectionIntentProviderSpecificSettings() *ReplicationProtectionIntentProviderSpecificSettings -} - -// ReplicationProtectionIntentProviderSpecificSettings - Replication provider specific settings. -type ReplicationProtectionIntentProviderSpecificSettings struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetReplicationProtectionIntentProviderSpecificSettings implements the ReplicationProtectionIntentProviderSpecificSettingsClassification -// interface for type ReplicationProtectionIntentProviderSpecificSettings. -func (r *ReplicationProtectionIntentProviderSpecificSettings) GetReplicationProtectionIntentProviderSpecificSettings() *ReplicationProtectionIntentProviderSpecificSettings { - return r -} - -// ReplicationProtectionIntentsClientCreateOptions contains the optional parameters for the ReplicationProtectionIntentsClient.Create -// method. -type ReplicationProtectionIntentsClientCreateOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectionIntentsClientGetOptions contains the optional parameters for the ReplicationProtectionIntentsClient.Get -// method. -type ReplicationProtectionIntentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationProtectionIntentsClientListOptions contains the optional parameters for the ReplicationProtectionIntentsClient.List -// method. -type ReplicationProtectionIntentsClientListOptions struct { - // The pagination token. - SkipToken *string - // The page size. - TakeToken *string -} - -// ReplicationProviderContainerUnmappingInput - Provider specific input for unpairing operations. -type ReplicationProviderContainerUnmappingInput struct { - // The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// ReplicationProviderSpecificContainerCreationInputClassification provides polymorphic access to related types. -// Call the interface's GetReplicationProviderSpecificContainerCreationInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AContainerCreationInput, *A2ACrossClusterMigrationContainerCreationInput, *ReplicationProviderSpecificContainerCreationInput, -// - *VMwareCbtContainerCreationInput -type ReplicationProviderSpecificContainerCreationInputClassification interface { - // GetReplicationProviderSpecificContainerCreationInput returns the ReplicationProviderSpecificContainerCreationInput content of the underlying type. - GetReplicationProviderSpecificContainerCreationInput() *ReplicationProviderSpecificContainerCreationInput -} - -// ReplicationProviderSpecificContainerCreationInput - Provider specific input for container creation operation. -type ReplicationProviderSpecificContainerCreationInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetReplicationProviderSpecificContainerCreationInput implements the ReplicationProviderSpecificContainerCreationInputClassification -// interface for type ReplicationProviderSpecificContainerCreationInput. -func (r *ReplicationProviderSpecificContainerCreationInput) GetReplicationProviderSpecificContainerCreationInput() *ReplicationProviderSpecificContainerCreationInput { - return r -} - -// ReplicationProviderSpecificContainerMappingInputClassification provides polymorphic access to related types. -// Call the interface's GetReplicationProviderSpecificContainerMappingInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AContainerMappingInput, *ReplicationProviderSpecificContainerMappingInput, *VMwareCbtContainerMappingInput -type ReplicationProviderSpecificContainerMappingInputClassification interface { - // GetReplicationProviderSpecificContainerMappingInput returns the ReplicationProviderSpecificContainerMappingInput content of the underlying type. - GetReplicationProviderSpecificContainerMappingInput() *ReplicationProviderSpecificContainerMappingInput -} - -// ReplicationProviderSpecificContainerMappingInput - Provider specific input for pairing operations. -type ReplicationProviderSpecificContainerMappingInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetReplicationProviderSpecificContainerMappingInput implements the ReplicationProviderSpecificContainerMappingInputClassification -// interface for type ReplicationProviderSpecificContainerMappingInput. -func (r *ReplicationProviderSpecificContainerMappingInput) GetReplicationProviderSpecificContainerMappingInput() *ReplicationProviderSpecificContainerMappingInput { - return r -} - -// ReplicationProviderSpecificSettingsClassification provides polymorphic access to related types. -// Call the interface's GetReplicationProviderSpecificSettings() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2ACrossClusterMigrationReplicationDetails, *A2AReplicationDetails, *HyperVReplicaAzureReplicationDetails, *HyperVReplicaBaseReplicationDetails, -// - *HyperVReplicaBlueReplicationDetails, *HyperVReplicaReplicationDetails, *InMageAzureV2ReplicationDetails, *InMageRcmFailbackReplicationDetails, -// - *InMageRcmReplicationDetails, *InMageReplicationDetails, *ReplicationProviderSpecificSettings -type ReplicationProviderSpecificSettingsClassification interface { - // GetReplicationProviderSpecificSettings returns the ReplicationProviderSpecificSettings content of the underlying type. - GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings -} - -// ReplicationProviderSpecificSettings - Replication provider specific settings. -type ReplicationProviderSpecificSettings struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type -// ReplicationProviderSpecificSettings. -func (r *ReplicationProviderSpecificSettings) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { - return r -} - -// ReplicationProviderSpecificUpdateContainerMappingInputClassification provides polymorphic access to related types. -// Call the interface's GetReplicationProviderSpecificUpdateContainerMappingInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AUpdateContainerMappingInput, *InMageRcmUpdateContainerMappingInput, *ReplicationProviderSpecificUpdateContainerMappingInput -type ReplicationProviderSpecificUpdateContainerMappingInputClassification interface { - // GetReplicationProviderSpecificUpdateContainerMappingInput returns the ReplicationProviderSpecificUpdateContainerMappingInput content of the underlying type. - GetReplicationProviderSpecificUpdateContainerMappingInput() *ReplicationProviderSpecificUpdateContainerMappingInput -} - -// ReplicationProviderSpecificUpdateContainerMappingInput - Provider specific input for update pairing operations. -type ReplicationProviderSpecificUpdateContainerMappingInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetReplicationProviderSpecificUpdateContainerMappingInput implements the ReplicationProviderSpecificUpdateContainerMappingInputClassification -// interface for type ReplicationProviderSpecificUpdateContainerMappingInput. -func (r *ReplicationProviderSpecificUpdateContainerMappingInput) GetReplicationProviderSpecificUpdateContainerMappingInput() *ReplicationProviderSpecificUpdateContainerMappingInput { - return r -} - -// ReplicationRecoveryPlansClientBeginCreateOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginCreate -// method. -type ReplicationRecoveryPlansClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryPlansClientBeginDeleteOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginDelete -// method. -type ReplicationRecoveryPlansClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryPlansClientBeginFailoverCancelOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginFailoverCancel -// method. -type ReplicationRecoveryPlansClientBeginFailoverCancelOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryPlansClientBeginFailoverCommitOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginFailoverCommit -// method. -type ReplicationRecoveryPlansClientBeginFailoverCommitOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryPlansClientBeginPlannedFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginPlannedFailover -// method. -type ReplicationRecoveryPlansClientBeginPlannedFailoverOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryPlansClientBeginReprotectOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginReprotect -// method. -type ReplicationRecoveryPlansClientBeginReprotectOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginTestFailoverCleanup -// method. -type ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryPlansClientBeginTestFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginTestFailover -// method. -type ReplicationRecoveryPlansClientBeginTestFailoverOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginUnplannedFailover -// method. -type ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryPlansClientBeginUpdateOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginUpdate -// method. -type ReplicationRecoveryPlansClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryPlansClientGetOptions contains the optional parameters for the ReplicationRecoveryPlansClient.Get method. -type ReplicationRecoveryPlansClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationRecoveryPlansClientListOptions contains the optional parameters for the ReplicationRecoveryPlansClient.List -// method. -type ReplicationRecoveryPlansClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationRecoveryServicesProvidersClientBeginCreateOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginCreate -// method. -type ReplicationRecoveryServicesProvidersClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryServicesProvidersClientBeginDeleteOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginDelete -// method. -type ReplicationRecoveryServicesProvidersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryServicesProvidersClientBeginPurgeOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginPurge -// method. -type ReplicationRecoveryServicesProvidersClientBeginPurgeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginRefreshProvider -// method. -type ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationRecoveryServicesProvidersClientGetOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.Get -// method. -type ReplicationRecoveryServicesProvidersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.ListByReplicationFabrics -// method. -type ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions struct { - // placeholder for future optional parameters -} - -// ReplicationRecoveryServicesProvidersClientListOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.List -// method. -type ReplicationRecoveryServicesProvidersClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationStorageClassificationMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.BeginCreate -// method. -type ReplicationStorageClassificationMappingsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationStorageClassificationMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.BeginDelete -// method. -type ReplicationStorageClassificationMappingsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationStorageClassificationMappingsClientGetOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.Get -// method. -type ReplicationStorageClassificationMappingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions contains the optional parameters -// for the ReplicationStorageClassificationMappingsClient.ListByReplicationStorageClassifications method. -type ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions struct { - // placeholder for future optional parameters -} - -// ReplicationStorageClassificationMappingsClientListOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.List -// method. -type ReplicationStorageClassificationMappingsClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationStorageClassificationsClientGetOptions contains the optional parameters for the ReplicationStorageClassificationsClient.Get -// method. -type ReplicationStorageClassificationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationStorageClassificationsClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationStorageClassificationsClient.ListByReplicationFabrics -// method. -type ReplicationStorageClassificationsClientListByReplicationFabricsOptions struct { - // placeholder for future optional parameters -} - -// ReplicationStorageClassificationsClientListOptions contains the optional parameters for the ReplicationStorageClassificationsClient.List -// method. -type ReplicationStorageClassificationsClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationVaultHealthClientBeginRefreshOptions contains the optional parameters for the ReplicationVaultHealthClient.BeginRefresh -// method. -type ReplicationVaultHealthClientBeginRefreshOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationVaultHealthClientGetOptions contains the optional parameters for the ReplicationVaultHealthClient.Get method. -type ReplicationVaultHealthClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationVaultSettingClientBeginCreateOptions contains the optional parameters for the ReplicationVaultSettingClient.BeginCreate -// method. -type ReplicationVaultSettingClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationVaultSettingClientGetOptions contains the optional parameters for the ReplicationVaultSettingClient.Get method. -type ReplicationVaultSettingClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationVaultSettingClientListOptions contains the optional parameters for the ReplicationVaultSettingClient.List method. -type ReplicationVaultSettingClientListOptions struct { - // placeholder for future optional parameters -} - -// ReplicationvCentersClientBeginCreateOptions contains the optional parameters for the ReplicationvCentersClient.BeginCreate -// method. -type ReplicationvCentersClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationvCentersClientBeginDeleteOptions contains the optional parameters for the ReplicationvCentersClient.BeginDelete -// method. -type ReplicationvCentersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationvCentersClientBeginUpdateOptions contains the optional parameters for the ReplicationvCentersClient.BeginUpdate -// method. -type ReplicationvCentersClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ReplicationvCentersClientGetOptions contains the optional parameters for the ReplicationvCentersClient.Get method. -type ReplicationvCentersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ReplicationvCentersClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationvCentersClient.ListByReplicationFabrics -// method. -type ReplicationvCentersClientListByReplicationFabricsOptions struct { - // placeholder for future optional parameters -} - -// ReplicationvCentersClientListOptions contains the optional parameters for the ReplicationvCentersClient.List method. -type ReplicationvCentersClientListOptions struct { - // placeholder for future optional parameters -} - -// ReprotectAgentDetails - Reprotect agent details. -type ReprotectAgentDetails struct { - // READ-ONLY; The list of accessible datastores fetched from discovery. - AccessibleDatastores []*string `json:"accessibleDatastores,omitempty" azure:"ro"` - - // READ-ONLY; The reprotect agent Bios Id. - BiosID *string `json:"biosId,omitempty" azure:"ro"` - - // READ-ONLY; The fabric object Id. - FabricObjectID *string `json:"fabricObjectId,omitempty" azure:"ro"` - - // READ-ONLY; The reprotect agent Fqdn. - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` - - // READ-ONLY; The health of the reprotect agent. - Health *ProtectionHealth `json:"health,omitempty" azure:"ro"` - - // READ-ONLY; The health errors. - HealthErrors []*HealthError `json:"healthErrors,omitempty" azure:"ro"` - - // READ-ONLY; The reprotect agent Id. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The last time when SDS information discovered in SRS. - LastDiscoveryInUTC *time.Time `json:"lastDiscoveryInUtc,omitempty" azure:"ro"` - - // READ-ONLY; The last heartbeat received from the reprotect agent. - LastHeartbeatUTC *time.Time `json:"lastHeartbeatUtc,omitempty" azure:"ro"` - - // READ-ONLY; The reprotect agent name. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The protected item count. - ProtectedItemCount *int32 `json:"protectedItemCount,omitempty" azure:"ro"` - - // READ-ONLY; The Vcenter Id. - VcenterID *string `json:"vcenterId,omitempty" azure:"ro"` - - // READ-ONLY; The version. - Version *string `json:"version,omitempty" azure:"ro"` -} - -// ResolveHealthError - Resolve health errors input properties. -type ResolveHealthError struct { - // Health error id. - HealthErrorID *string `json:"healthErrorId,omitempty"` -} - -// ResolveHealthInput - Resolve health input. -type ResolveHealthInput struct { - // Disable resolve health input properties. - Properties *ResolveHealthInputProperties `json:"properties,omitempty"` -} - -// ResolveHealthInputProperties - Resolve health input properties. -type ResolveHealthInputProperties struct { - // Health errors. - HealthErrors []*ResolveHealthError `json:"healthErrors,omitempty"` -} - -// Resource - Azure resource. -type Resource struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ResourceHealthSummary - Base class to define the health summary of the resources contained under an Arm resource. -type ResourceHealthSummary struct { - // The categorized resource counts. - CategorizedResourceCounts map[string]*int32 `json:"categorizedResourceCounts,omitempty"` - - // The list of summary of health errors across the resources under the container. - Issues []*HealthErrorSummary `json:"issues,omitempty"` - - // The count of total resources under the container. - ResourceCount *int32 `json:"resourceCount,omitempty"` -} - -// ResumeJobParams - Resume job params. -type ResumeJobParams struct { - // Resume job properties. - Properties *ResumeJobParamsProperties `json:"properties,omitempty"` -} - -// ResumeJobParamsProperties - Resume job properties. -type ResumeJobParamsProperties struct { - // Resume job comments. - Comments *string `json:"comments,omitempty"` -} - -// ResumeReplicationInput - Resume replication input. -type ResumeReplicationInput struct { - // REQUIRED; Resume replication input properties. - Properties *ResumeReplicationInputProperties `json:"properties,omitempty"` -} - -// ResumeReplicationInputProperties - Resume replication input properties. -type ResumeReplicationInputProperties struct { - // REQUIRED; The provider specific input for resume replication. - ProviderSpecificDetails ResumeReplicationProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// ResumeReplicationProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetResumeReplicationProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ResumeReplicationProviderSpecificInput, *VMwareCbtResumeReplicationInput -type ResumeReplicationProviderSpecificInputClassification interface { - // GetResumeReplicationProviderSpecificInput returns the ResumeReplicationProviderSpecificInput content of the underlying type. - GetResumeReplicationProviderSpecificInput() *ResumeReplicationProviderSpecificInput -} - -// ResumeReplicationProviderSpecificInput - Resume replication provider specific input. -type ResumeReplicationProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetResumeReplicationProviderSpecificInput implements the ResumeReplicationProviderSpecificInputClassification interface -// for type ResumeReplicationProviderSpecificInput. -func (r *ResumeReplicationProviderSpecificInput) GetResumeReplicationProviderSpecificInput() *ResumeReplicationProviderSpecificInput { - return r -} - -// ResyncInput - Resync input. -type ResyncInput struct { - // REQUIRED; Resync input properties. - Properties *ResyncInputProperties `json:"properties,omitempty"` -} - -// ResyncInputProperties - Resync input properties. -type ResyncInputProperties struct { - // REQUIRED; The provider specific details. - ProviderSpecificDetails ResyncProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// ResyncProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetResyncProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ResyncProviderSpecificInput, *VMwareCbtResyncInput -type ResyncProviderSpecificInputClassification interface { - // GetResyncProviderSpecificInput returns the ResyncProviderSpecificInput content of the underlying type. - GetResyncProviderSpecificInput() *ResyncProviderSpecificInput -} - -// ResyncProviderSpecificInput - Resync provider specific input. -type ResyncProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetResyncProviderSpecificInput implements the ResyncProviderSpecificInputClassification interface for type ResyncProviderSpecificInput. -func (r *ResyncProviderSpecificInput) GetResyncProviderSpecificInput() *ResyncProviderSpecificInput { - return r -} - -// RetentionVolume - The retention details of the MT. -type RetentionVolume struct { - // The volume capacity. - CapacityInBytes *int64 `json:"capacityInBytes,omitempty"` - - // The free space available in this volume. - FreeSpaceInBytes *int64 `json:"freeSpaceInBytes,omitempty"` - - // The threshold percentage. - ThresholdPercentage *int32 `json:"thresholdPercentage,omitempty"` - - // The volume name. - VolumeName *string `json:"volumeName,omitempty"` -} - -// ReverseReplicationInput - Reverse replication input. -type ReverseReplicationInput struct { - // Reverse replication properties. - Properties *ReverseReplicationInputProperties `json:"properties,omitempty"` -} - -// ReverseReplicationInputProperties - Reverse replication input properties. -type ReverseReplicationInputProperties struct { - // Failover direction. - FailoverDirection *string `json:"failoverDirection,omitempty"` - - // Provider specific reverse replication input. - ProviderSpecificDetails ReverseReplicationProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// ReverseReplicationProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetReverseReplicationProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AReprotectInput, *HyperVReplicaAzureReprotectInput, *InMageAzureV2ReprotectInput, *InMageRcmFailbackReprotectInput, -// - *InMageRcmReprotectInput, *InMageReprotectInput, *ReverseReplicationProviderSpecificInput -type ReverseReplicationProviderSpecificInputClassification interface { - // GetReverseReplicationProviderSpecificInput returns the ReverseReplicationProviderSpecificInput content of the underlying type. - GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput -} - -// ReverseReplicationProviderSpecificInput - Provider specific reverse replication input. -type ReverseReplicationProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface -// for type ReverseReplicationProviderSpecificInput. -func (r *ReverseReplicationProviderSpecificInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { - return r -} - -// RoleAssignment - Azure role assignment details. -type RoleAssignment struct { - // The ARM Id of the role assignment. - ID *string `json:"id,omitempty"` - - // The name of the role assignment. - Name *string `json:"name,omitempty"` - - // Principal Id. - PrincipalID *string `json:"principalId,omitempty"` - - // Role definition id. - RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` - - // Role assignment scope. - Scope *string `json:"scope,omitempty"` -} - -// RunAsAccount - CS Accounts Details. -type RunAsAccount struct { - // The CS RunAs account Id. - AccountID *string `json:"accountId,omitempty"` - - // The CS RunAs account name. - AccountName *string `json:"accountName,omitempty"` -} - -// ScriptActionTaskDetails - This class represents the script action task details. -type ScriptActionTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating whether it is a primary side script or not. - IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` - - // The name. - Name *string `json:"name,omitempty"` - - // The output. - Output *string `json:"output,omitempty"` - - // The path. - Path *string `json:"path,omitempty"` -} - -// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type ScriptActionTaskDetails. -func (s *ScriptActionTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { - return &TaskTypeDetails{ - InstanceType: s.InstanceType, - } -} - -// ServiceError - ASR error model. -type ServiceError struct { - // Activity Id. - ActivityID *string `json:"activityId,omitempty"` - - // Error code. - Code *string `json:"code,omitempty"` - - // Error message. - Message *string `json:"message,omitempty"` - - // Possible causes of error. - PossibleCauses *string `json:"possibleCauses,omitempty"` - - // Recommended action to resolve error. - RecommendedAction *string `json:"recommendedAction,omitempty"` -} - -// StorageAccountCustomDetailsClassification provides polymorphic access to related types. -// Call the interface's GetStorageAccountCustomDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ExistingStorageAccount, *StorageAccountCustomDetails -type StorageAccountCustomDetailsClassification interface { - // GetStorageAccountCustomDetails returns the StorageAccountCustomDetails content of the underlying type. - GetStorageAccountCustomDetails() *StorageAccountCustomDetails -} - -// StorageAccountCustomDetails - Storage account custom input. -type StorageAccountCustomDetails struct { - // REQUIRED; The class type. - ResourceType *string `json:"resourceType,omitempty"` -} - -// GetStorageAccountCustomDetails implements the StorageAccountCustomDetailsClassification interface for type StorageAccountCustomDetails. -func (s *StorageAccountCustomDetails) GetStorageAccountCustomDetails() *StorageAccountCustomDetails { - return s -} - -// StorageClassification - Storage object definition. -type StorageClassification struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // Properties of the storage object. - Properties *StorageClassificationProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StorageClassificationCollection - Collection of storage details. -type StorageClassificationCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The storage details. - Value []*StorageClassification `json:"value,omitempty"` -} - -// StorageClassificationMapping - Storage mapping object. -type StorageClassificationMapping struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // Properties of the storage mapping object. - Properties *StorageClassificationMappingProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StorageClassificationMappingCollection - Collection of storage mapping details. -type StorageClassificationMappingCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The storage details. - Value []*StorageClassificationMapping `json:"value,omitempty"` -} - -// StorageClassificationMappingInput - Storage mapping input. -type StorageClassificationMappingInput struct { - // Storage mapping input properties. - Properties *StorageMappingInputProperties `json:"properties,omitempty"` -} - -// StorageClassificationMappingProperties - Storage mapping properties. -type StorageClassificationMappingProperties struct { - // Target storage object Id. - TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"` -} - -// StorageClassificationProperties - Storage object properties. -type StorageClassificationProperties struct { - // Friendly name of the Storage classification. - FriendlyName *string `json:"friendlyName,omitempty"` -} - -// StorageMappingInputProperties - Storage mapping input properties. -type StorageMappingInputProperties struct { - // The ID of the storage object. - TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"` -} - -// Subnets of the network. -type Subnet struct { - // The list of addresses for the subnet. - AddressList []*string `json:"addressList,omitempty"` - - // The subnet friendly name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The subnet name. - Name *string `json:"name,omitempty"` -} - -// SupportedOSDetails - Supported operating system details. -type SupportedOSDetails struct { - // The name. - OSName *string `json:"osName,omitempty"` - - // The type. - OSType *string `json:"osType,omitempty"` - - // The list of version for operating system. - OSVersions []*OSVersionWrapper `json:"osVersions,omitempty"` -} - -// SupportedOSProperties - Supported operating systems properties. -type SupportedOSProperties struct { - // The supported operating systems property list. - SupportedOsList []*SupportedOSProperty `json:"supportedOsList,omitempty"` -} - -// SupportedOSProperty - Supported operating systems property. -type SupportedOSProperty struct { - // The replication provider type. - InstanceType *string `json:"instanceType,omitempty"` - - // The list of supported operating systems. - SupportedOs []*SupportedOSDetails `json:"supportedOs,omitempty"` -} - -// SupportedOperatingSystems - Supported operating systems. -type SupportedOperatingSystems struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The supported operating systems properties. - Properties *SupportedOSProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// SupportedOperatingSystemsClientGetOptions contains the optional parameters for the SupportedOperatingSystemsClient.Get -// method. -type SupportedOperatingSystemsClientGetOptions struct { - // The instance type. - InstanceType *string -} - -// SwitchProtectionInput - Switch protection input. -type SwitchProtectionInput struct { - // Switch protection properties. - Properties *SwitchProtectionInputProperties `json:"properties,omitempty"` -} - -// SwitchProtectionInputProperties - Switch protection input properties. -type SwitchProtectionInputProperties struct { - // Provider specific switch protection input. - ProviderSpecificDetails SwitchProtectionProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` - - // The unique replication protected item name. - ReplicationProtectedItemName *string `json:"replicationProtectedItemName,omitempty"` -} - -// SwitchProtectionJobDetails - This class represents details for switch protection job. -type SwitchProtectionJobDetails struct { - // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). - InstanceType *string `json:"instanceType,omitempty"` - - // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow - // object details. - AffectedObjectDetails map[string]*string `json:"affectedObjectDetails,omitempty"` - - // ARM Id of the new replication protected item. - NewReplicationProtectedItemID *string `json:"newReplicationProtectedItemId,omitempty"` -} - -// GetJobDetails implements the JobDetailsClassification interface for type SwitchProtectionJobDetails. -func (s *SwitchProtectionJobDetails) GetJobDetails() *JobDetails { - return &JobDetails{ - InstanceType: s.InstanceType, - AffectedObjectDetails: s.AffectedObjectDetails, - } -} - -// SwitchProtectionProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetSwitchProtectionProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2ASwitchProtectionInput, *SwitchProtectionProviderSpecificInput -type SwitchProtectionProviderSpecificInputClassification interface { - // GetSwitchProtectionProviderSpecificInput returns the SwitchProtectionProviderSpecificInput content of the underlying type. - GetSwitchProtectionProviderSpecificInput() *SwitchProtectionProviderSpecificInput -} - -// SwitchProtectionProviderSpecificInput - Provider specific switch protection input. -type SwitchProtectionProviderSpecificInput struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetSwitchProtectionProviderSpecificInput implements the SwitchProtectionProviderSpecificInputClassification interface for -// type SwitchProtectionProviderSpecificInput. -func (s *SwitchProtectionProviderSpecificInput) GetSwitchProtectionProviderSpecificInput() *SwitchProtectionProviderSpecificInput { - return s -} - -// SwitchProviderInput - Input definition for switch provider. -type SwitchProviderInput struct { - // Switch provider input properties. - Properties *SwitchProviderInputProperties `json:"properties,omitempty"` -} - -// SwitchProviderInputProperties - Input definition for switch provider input properties. -type SwitchProviderInputProperties struct { - // Provider specific settings. - ProviderSpecificDetails SwitchProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` - - // Target provider type. - TargetInstanceType *string `json:"targetInstanceType,omitempty"` -} - -// SwitchProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetSwitchProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *InMageAzureV2SwitchProviderInput, *SwitchProviderSpecificInput -type SwitchProviderSpecificInputClassification interface { - // GetSwitchProviderSpecificInput returns the SwitchProviderSpecificInput content of the underlying type. - GetSwitchProviderSpecificInput() *SwitchProviderSpecificInput -} - -// SwitchProviderSpecificInput - Provider specific switch provider input. -type SwitchProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetSwitchProviderSpecificInput implements the SwitchProviderSpecificInputClassification interface for type SwitchProviderSpecificInput. -func (s *SwitchProviderSpecificInput) GetSwitchProviderSpecificInput() *SwitchProviderSpecificInput { - return s -} - -// TargetComputeSize - Represents applicable recovery vm sizes. -type TargetComputeSize struct { - // The Id. - ID *string `json:"id,omitempty"` - - // The name. - Name *string `json:"name,omitempty"` - - // The custom data. - Properties *TargetComputeSizeProperties `json:"properties,omitempty"` - - // The Type of the object. - Type *string `json:"type,omitempty"` -} - -// TargetComputeSizeCollection - Target compute size collection. -type TargetComputeSizeCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The list of target compute sizes. - Value []*TargetComputeSize `json:"value,omitempty"` -} - -// TargetComputeSizeProperties - Represents applicable recovery vm sizes properties. -type TargetComputeSizeProperties struct { - // The maximum cpu cores count supported by target compute size. - CPUCoresCount *int32 `json:"cpuCoresCount,omitempty"` - - // The reasons why the target compute size is not applicable for the protected item. - Errors []*ComputeSizeErrorDetails `json:"errors,omitempty"` - - // Target compute size display name. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The value indicating whether the target compute size supports high Iops. - HighIopsSupported *string `json:"highIopsSupported,omitempty"` - - // The supported HyperV Generations. - HyperVGenerations []*string `json:"hyperVGenerations,omitempty"` - - // The maximum data disks count supported by target compute size. - MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"` - - // The maximum Nics count supported by target compute size. - MaxNicsCount *int32 `json:"maxNicsCount,omitempty"` - - // The maximum memory in GB supported by target compute size. - MemoryInGB *float64 `json:"memoryInGB,omitempty"` - - // Target compute size name. - Name *string `json:"name,omitempty"` - - // READ-ONLY; The Available vCPUs supported by target compute size. - VCPUsAvailable *int32 `json:"vCPUsAvailable,omitempty" azure:"ro"` -} - -// TargetComputeSizesClientListByReplicationProtectedItemsOptions contains the optional parameters for the TargetComputeSizesClient.ListByReplicationProtectedItems -// method. -type TargetComputeSizesClientListByReplicationProtectedItemsOptions struct { - // placeholder for future optional parameters -} - -// TaskTypeDetailsClassification provides polymorphic access to related types. -// Call the interface's GetTaskTypeDetails() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AutomationRunbookTaskDetails, *ConsistencyCheckTaskDetails, *FabricReplicationGroupTaskDetails, *JobTaskDetails, *ManualActionTaskDetails, -// - *ScriptActionTaskDetails, *TaskTypeDetails, *VMNicUpdatesTaskDetails, *VirtualMachineTaskDetails -type TaskTypeDetailsClassification interface { - // GetTaskTypeDetails returns the TaskTypeDetails content of the underlying type. - GetTaskTypeDetails() *TaskTypeDetails -} - -// TaskTypeDetails - Task details based on specific task type. -type TaskTypeDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type TaskTypeDetails. -func (t *TaskTypeDetails) GetTaskTypeDetails() *TaskTypeDetails { return t } - -// TestFailoverCleanupInput - Input definition for test failover cleanup. -type TestFailoverCleanupInput struct { - // REQUIRED; Test failover cleanup input properties. - Properties *TestFailoverCleanupInputProperties `json:"properties,omitempty"` -} - -// TestFailoverCleanupInputProperties - Input definition for test failover cleanup input properties. -type TestFailoverCleanupInputProperties struct { - // Test failover cleanup comments. - Comments *string `json:"comments,omitempty"` -} - -// TestFailoverInput - Input definition for test failover. -type TestFailoverInput struct { - // REQUIRED; Test failover input properties. - Properties *TestFailoverInputProperties `json:"properties,omitempty"` -} - -// TestFailoverInputProperties - Input definition for test failover input properties. -type TestFailoverInputProperties struct { - // Test failover direction. - FailoverDirection *string `json:"failoverDirection,omitempty"` - - // The id of the network to be used for test failover. - NetworkID *string `json:"networkId,omitempty"` - - // Network type to be used for test failover. - NetworkType *string `json:"networkType,omitempty"` - - // Provider specific settings. - ProviderSpecificDetails TestFailoverProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// TestFailoverJobDetails - This class represents the details for a test failover job. -type TestFailoverJobDetails struct { - // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). - InstanceType *string `json:"instanceType,omitempty"` - - // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow - // object details. - AffectedObjectDetails map[string]*string `json:"affectedObjectDetails,omitempty"` - - // The test failover comments. - Comments *string `json:"comments,omitempty"` - - // The test network friendly name. - NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` - - // The test network name. - NetworkName *string `json:"networkName,omitempty"` - - // The test network type (see TestFailoverInput enum for possible values). - NetworkType *string `json:"networkType,omitempty"` - - // The test VM details. - ProtectedItemDetails []*FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` - - // The test failover status. - TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` -} - -// GetJobDetails implements the JobDetailsClassification interface for type TestFailoverJobDetails. -func (t *TestFailoverJobDetails) GetJobDetails() *JobDetails { - return &JobDetails{ - InstanceType: t.InstanceType, - AffectedObjectDetails: t.AffectedObjectDetails, - } -} - -// TestFailoverProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetTestFailoverProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2ATestFailoverInput, *HyperVReplicaAzureTestFailoverInput, *InMageAzureV2TestFailoverInput, *InMageRcmTestFailoverInput, -// - *InMageTestFailoverInput, *TestFailoverProviderSpecificInput -type TestFailoverProviderSpecificInputClassification interface { - // GetTestFailoverProviderSpecificInput returns the TestFailoverProviderSpecificInput content of the underlying type. - GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput -} - -// TestFailoverProviderSpecificInput - Provider specific test failover input. -type TestFailoverProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type -// TestFailoverProviderSpecificInput. -func (t *TestFailoverProviderSpecificInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { - return t -} - -// TestMigrateCleanupInput - Input for test migrate cleanup. -type TestMigrateCleanupInput struct { - // REQUIRED; Test migrate cleanup input properties. - Properties *TestMigrateCleanupInputProperties `json:"properties,omitempty"` -} - -// TestMigrateCleanupInputProperties - Test migrate cleanup input properties. -type TestMigrateCleanupInputProperties struct { - // Test migrate cleanup comments. - Comments *string `json:"comments,omitempty"` -} - -// TestMigrateInput - Input for test migrate. -type TestMigrateInput struct { - // REQUIRED; Test migrate input properties. - Properties *TestMigrateInputProperties `json:"properties,omitempty"` -} - -// TestMigrateInputProperties - Test migrate input properties. -type TestMigrateInputProperties struct { - // REQUIRED; The provider specific details. - ProviderSpecificDetails TestMigrateProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// TestMigrateProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetTestMigrateProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *TestMigrateProviderSpecificInput, *VMwareCbtTestMigrateInput -type TestMigrateProviderSpecificInputClassification interface { - // GetTestMigrateProviderSpecificInput returns the TestMigrateProviderSpecificInput content of the underlying type. - GetTestMigrateProviderSpecificInput() *TestMigrateProviderSpecificInput -} - -// TestMigrateProviderSpecificInput - Test migrate provider specific input. -type TestMigrateProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetTestMigrateProviderSpecificInput implements the TestMigrateProviderSpecificInputClassification interface for type TestMigrateProviderSpecificInput. -func (t *TestMigrateProviderSpecificInput) GetTestMigrateProviderSpecificInput() *TestMigrateProviderSpecificInput { - return t -} - -// UnplannedFailoverInput - Input definition for unplanned failover. -type UnplannedFailoverInput struct { - // REQUIRED; Unplanned failover input properties. - Properties *UnplannedFailoverInputProperties `json:"properties,omitempty"` -} - -// UnplannedFailoverInputProperties - Input definition for unplanned failover input properties. -type UnplannedFailoverInputProperties struct { - // Failover direction. - FailoverDirection *string `json:"failoverDirection,omitempty"` - - // Provider specific settings. - ProviderSpecificDetails UnplannedFailoverProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` - - // Source site operations status. - SourceSiteOperations *string `json:"sourceSiteOperations,omitempty"` -} - -// UnplannedFailoverProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetUnplannedFailoverProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AUnplannedFailoverInput, *HyperVReplicaAzureUnplannedFailoverInput, *InMageAzureV2UnplannedFailoverInput, *InMageRcmUnplannedFailoverInput, -// - *InMageUnplannedFailoverInput, *UnplannedFailoverProviderSpecificInput -type UnplannedFailoverProviderSpecificInputClassification interface { - // GetUnplannedFailoverProviderSpecificInput returns the UnplannedFailoverProviderSpecificInput content of the underlying type. - GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput -} - -// UnplannedFailoverProviderSpecificInput - Provider specific unplanned failover input. -type UnplannedFailoverProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface -// for type UnplannedFailoverProviderSpecificInput. -func (u *UnplannedFailoverProviderSpecificInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { - return u -} - -// UpdateApplianceForReplicationProtectedItemInput - Update appliance for replication protected item input. -type UpdateApplianceForReplicationProtectedItemInput struct { - // REQUIRED; Update appliance replication protected item properties. - Properties *UpdateApplianceForReplicationProtectedItemInputProperties `json:"properties,omitempty"` -} - -// UpdateApplianceForReplicationProtectedItemInputProperties - Update appliance for protected item input properties. -type UpdateApplianceForReplicationProtectedItemInputProperties struct { - // REQUIRED; The provider specific input to update replication protected item. - ProviderSpecificDetails UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` - - // REQUIRED; The target appliance Id. - TargetApplianceID *string `json:"targetApplianceId,omitempty"` -} - -// UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *InMageRcmUpdateApplianceForReplicationProtectedItemInput, *UpdateApplianceForReplicationProtectedItemProviderSpecificInput -type UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification interface { - // GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput returns the UpdateApplianceForReplicationProtectedItemProviderSpecificInput content of the underlying type. - GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput() *UpdateApplianceForReplicationProtectedItemProviderSpecificInput -} - -// UpdateApplianceForReplicationProtectedItemProviderSpecificInput - Update replication protected item provider specific input. -type UpdateApplianceForReplicationProtectedItemProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput implements the UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification -// interface for type UpdateApplianceForReplicationProtectedItemProviderSpecificInput. -func (u *UpdateApplianceForReplicationProtectedItemProviderSpecificInput) GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput() *UpdateApplianceForReplicationProtectedItemProviderSpecificInput { - return u -} - -// UpdateDiskInput - Disk input for update. -type UpdateDiskInput struct { - // REQUIRED; The disk Id. - DiskID *string `json:"diskId,omitempty"` - - // The target disk name. - TargetDiskName *string `json:"targetDiskName,omitempty"` -} - -// UpdateMigrationItemInput - Update migration item input. -type UpdateMigrationItemInput struct { - // Update migration item input properties. - Properties *UpdateMigrationItemInputProperties `json:"properties,omitempty"` -} - -// UpdateMigrationItemInputProperties - Update migration item input properties. -type UpdateMigrationItemInputProperties struct { - // REQUIRED; The provider specific input to update migration item. - ProviderSpecificDetails UpdateMigrationItemProviderSpecificInputClassification `json:"providerSpecificDetails,omitempty"` -} - -// UpdateMigrationItemProviderSpecificInputClassification provides polymorphic access to related types. -// Call the interface's GetUpdateMigrationItemProviderSpecificInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *UpdateMigrationItemProviderSpecificInput, *VMwareCbtUpdateMigrationItemInput -type UpdateMigrationItemProviderSpecificInputClassification interface { - // GetUpdateMigrationItemProviderSpecificInput returns the UpdateMigrationItemProviderSpecificInput content of the underlying type. - GetUpdateMigrationItemProviderSpecificInput() *UpdateMigrationItemProviderSpecificInput -} - -// UpdateMigrationItemProviderSpecificInput - Update migration item provider specific input. -type UpdateMigrationItemProviderSpecificInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetUpdateMigrationItemProviderSpecificInput implements the UpdateMigrationItemProviderSpecificInputClassification interface -// for type UpdateMigrationItemProviderSpecificInput. -func (u *UpdateMigrationItemProviderSpecificInput) GetUpdateMigrationItemProviderSpecificInput() *UpdateMigrationItemProviderSpecificInput { - return u -} - -// UpdateMobilityServiceRequest - Request to update the mobility service on a protected item. -type UpdateMobilityServiceRequest struct { - // The properties of the update mobility service request. - Properties *UpdateMobilityServiceRequestProperties `json:"properties,omitempty"` -} - -// UpdateMobilityServiceRequestProperties - The properties of an update mobility service request. -type UpdateMobilityServiceRequestProperties struct { - // The CS run as account Id. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` -} - -// UpdateNetworkMappingInput - Update network mapping input. -type UpdateNetworkMappingInput struct { - // The input properties needed to update network mapping. - Properties *UpdateNetworkMappingInputProperties `json:"properties,omitempty"` -} - -// UpdateNetworkMappingInputProperties - Common input details for network mapping operation. -type UpdateNetworkMappingInputProperties struct { - // Fabrics specific input network Id. - FabricSpecificDetails FabricSpecificUpdateNetworkMappingInputClassification `json:"fabricSpecificDetails,omitempty"` - - // Recovery fabric name. - RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` - - // Recovery network Id. - RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` -} - -// UpdatePolicyInput - Update policy input. -type UpdatePolicyInput struct { - // The ReplicationProviderSettings. - Properties *UpdatePolicyInputProperties `json:"properties,omitempty"` -} - -// UpdatePolicyInputProperties - Policy update properties. -type UpdatePolicyInputProperties struct { - // The ReplicationProviderSettings. - ReplicationProviderSettings PolicyProviderSpecificInputClassification `json:"replicationProviderSettings,omitempty"` -} - -// UpdateProtectionContainerMappingInput - Container pairing update input. -type UpdateProtectionContainerMappingInput struct { - // Update protection container mapping input properties. - Properties *UpdateProtectionContainerMappingInputProperties `json:"properties,omitempty"` -} - -// UpdateProtectionContainerMappingInputProperties - Container pairing update input. -type UpdateProtectionContainerMappingInputProperties struct { - // Provider specific input for updating protection container mapping. - ProviderSpecificInput ReplicationProviderSpecificUpdateContainerMappingInputClassification `json:"providerSpecificInput,omitempty"` -} - -// UpdateRecoveryPlanInput - Update recovery plan input class. -type UpdateRecoveryPlanInput struct { - // Recovery plan update properties. - Properties *UpdateRecoveryPlanInputProperties `json:"properties,omitempty"` -} - -// UpdateRecoveryPlanInputProperties - Recovery plan update properties. -type UpdateRecoveryPlanInputProperties struct { - // The recovery plan groups. - Groups []*RecoveryPlanGroup `json:"groups,omitempty"` -} - -// UpdateReplicationProtectedItemInput - Update replication protected item input. -type UpdateReplicationProtectedItemInput struct { - // Update replication protected item properties. - Properties *UpdateReplicationProtectedItemInputProperties `json:"properties,omitempty"` -} - -// UpdateReplicationProtectedItemInputProperties - Update protected item input properties. -type UpdateReplicationProtectedItemInputProperties struct { - // The selected option to enable RDP\SSH on target vm after failover. String value of SrsDataContract.EnableRDPOnTargetOption - // enum. - EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` - - // License type. - LicenseType *LicenseType `json:"licenseType,omitempty"` - - // The provider specific input to update replication protected item. - ProviderSpecificDetails UpdateReplicationProtectedItemProviderInputClassification `json:"providerSpecificDetails,omitempty"` - - // The target availability set Id. - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - - // Target Azure VM name given by the user. - RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` - - // Target Azure VM size. - RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` - - // Target Azure Network Id. - SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` - - // The selected source nic Id which will be used as the primary nic during failover. - SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"` - - // The Azure Network Id for test failover. - SelectedTfoAzureNetworkID *string `json:"selectedTfoAzureNetworkId,omitempty"` - - // The list of VM nic details. - VMNics []*VMNicInputDetails `json:"vmNics,omitempty"` -} - -// UpdateReplicationProtectedItemProviderInputClassification provides polymorphic access to related types. -// Call the interface's GetUpdateReplicationProtectedItemProviderInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *A2AUpdateReplicationProtectedItemInput, *HyperVReplicaAzureUpdateReplicationProtectedItemInput, *InMageAzureV2UpdateReplicationProtectedItemInput, -// - *InMageRcmUpdateReplicationProtectedItemInput, *UpdateReplicationProtectedItemProviderInput -type UpdateReplicationProtectedItemProviderInputClassification interface { - // GetUpdateReplicationProtectedItemProviderInput returns the UpdateReplicationProtectedItemProviderInput content of the underlying type. - GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput -} - -// UpdateReplicationProtectedItemProviderInput - Update replication protected item provider specific input. -type UpdateReplicationProtectedItemProviderInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetUpdateReplicationProtectedItemProviderInput implements the UpdateReplicationProtectedItemProviderInputClassification -// interface for type UpdateReplicationProtectedItemProviderInput. -func (u *UpdateReplicationProtectedItemProviderInput) GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput { - return u -} - -// UpdateVCenterRequest - Input required to update vCenter. -type UpdateVCenterRequest struct { - // The update VCenter Request Properties. - Properties *UpdateVCenterRequestProperties `json:"properties,omitempty"` -} - -// UpdateVCenterRequestProperties - The properties of an update vCenter request. -type UpdateVCenterRequestProperties struct { - // The friendly name of the vCenter. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The IP address of the vCenter to be discovered. - IPAddress *string `json:"ipAddress,omitempty"` - - // The port number for discovery. - Port *string `json:"port,omitempty"` - - // The process server Id from where the update can be orchestrated. - ProcessServerID *string `json:"processServerId,omitempty"` - - // The CS account Id which has privileges to update the vCenter. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` -} - -// VCenter - vCenter definition. -type VCenter struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // VCenter related data. - Properties *VCenterProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VCenterCollection - Collection of vCenter details. -type VCenterCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The vCenter details. - Value []*VCenter `json:"value,omitempty"` -} - -// VCenterProperties - vCenter properties. -type VCenterProperties struct { - // The VCenter discovery status. - DiscoveryStatus *string `json:"discoveryStatus,omitempty"` - - // The ARM resource name of the fabric containing this VCenter. - FabricArmResourceName *string `json:"fabricArmResourceName,omitempty"` - - // Friendly name of the vCenter. - FriendlyName *string `json:"friendlyName,omitempty"` - - // The health errors for this VCenter. - HealthErrors []*HealthError `json:"healthErrors,omitempty"` - - // The IP address of the vCenter. - IPAddress *string `json:"ipAddress,omitempty"` - - // The infrastructure Id of vCenter. - InfrastructureID *string `json:"infrastructureId,omitempty"` - - // VCenter internal ID. - InternalID *string `json:"internalId,omitempty"` - - // The time when the last heartbeat was received by vCenter. - LastHeartbeat *time.Time `json:"lastHeartbeat,omitempty"` - - // The port number for discovery. - Port *string `json:"port,omitempty"` - - // The process server Id. - ProcessServerID *string `json:"processServerId,omitempty"` - - // The account Id which has privileges to discover the vCenter. - RunAsAccountID *string `json:"runAsAccountId,omitempty"` -} - -// VMNicDetails - Hyper V VM network details. -type VMNicDetails struct { - // A value indicating whether the NIC has accelerated networking enabled. - EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"` - - // Whether the TFO NIC has accelerated networking enabled. - EnableAcceleratedNetworkingOnTfo *bool `json:"enableAcceleratedNetworkingOnTfo,omitempty"` - - // The IP configurations of the NIC. - IPConfigs []*IPConfigDetails `json:"ipConfigs,omitempty"` - - // The nic Id. - NicID *string `json:"nicId,omitempty"` - - // The id of the NSG associated with the NIC. - RecoveryNetworkSecurityGroupID *string `json:"recoveryNetworkSecurityGroupId,omitempty"` - - // The name of the NIC to be used when creating target NICs. - RecoveryNicName *string `json:"recoveryNicName,omitempty"` - - // The resource group of the NIC to be used when creating target NICs. - RecoveryNicResourceGroupName *string `json:"recoveryNicResourceGroupName,omitempty"` - - // Recovery VM network Id. - RecoveryVMNetworkID *string `json:"recoveryVMNetworkId,omitempty"` - - // The replica nic Id. - ReplicaNicID *string `json:"replicaNicId,omitempty"` - - // A value indicating whether an existing NIC is allowed to be reused during failover subject to availability. - ReuseExistingNic *bool `json:"reuseExistingNic,omitempty"` - - // Selection type for failover. - SelectionType *string `json:"selectionType,omitempty"` - - // The source nic ARM Id. - SourceNicArmID *string `json:"sourceNicArmId,omitempty"` - - // Target NIC name. - TargetNicName *string `json:"targetNicName,omitempty"` - - // The NSG to be used by NIC during test failover. - TfoNetworkSecurityGroupID *string `json:"tfoNetworkSecurityGroupId,omitempty"` - - // The name of the NIC to be used when creating target NICs in TFO. - TfoRecoveryNicName *string `json:"tfoRecoveryNicName,omitempty"` - - // The resource group of the NIC to be used when creating target NICs in TFO. - TfoRecoveryNicResourceGroupName *string `json:"tfoRecoveryNicResourceGroupName,omitempty"` - - // A value indicating whether an existing NIC is allowed to be reused during test failover subject to availability. - TfoReuseExistingNic *bool `json:"tfoReuseExistingNic,omitempty"` - - // The network to be used by NIC during test failover. - TfoVMNetworkID *string `json:"tfoVMNetworkId,omitempty"` - - // VM network name. - VMNetworkName *string `json:"vMNetworkName,omitempty"` -} - -// VMNicInputDetails - Hyper V VM network input details. -type VMNicInputDetails struct { - // Whether the NIC has accelerated networking enabled. - EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"` - - // Whether the test NIC has accelerated networking enabled. - EnableAcceleratedNetworkingOnTfo *bool `json:"enableAcceleratedNetworkingOnTfo,omitempty"` - - // The IP configurations to be used by NIC during test failover and failover. - IPConfigs []*IPConfigInputDetails `json:"ipConfigs,omitempty"` - - // The nic Id. - NicID *string `json:"nicId,omitempty"` - - // The id of the NSG associated with the NIC. - RecoveryNetworkSecurityGroupID *string `json:"recoveryNetworkSecurityGroupId,omitempty"` - - // The name of the NIC to be used when creating target NICs. - RecoveryNicName *string `json:"recoveryNicName,omitempty"` - - // The resource group of the NIC to be used when creating target NICs. - RecoveryNicResourceGroupName *string `json:"recoveryNicResourceGroupName,omitempty"` - - // A value indicating whether an existing NIC is allowed to be reused during failover subject to availability. - ReuseExistingNic *bool `json:"reuseExistingNic,omitempty"` - - // Selection type for failover. - SelectionType *string `json:"selectionType,omitempty"` - - // Target NIC name. - TargetNicName *string `json:"targetNicName,omitempty"` - - // The NSG to be used by NIC during test failover. - TfoNetworkSecurityGroupID *string `json:"tfoNetworkSecurityGroupId,omitempty"` - - // The name of the NIC to be used when creating target NICs in TFO. - TfoNicName *string `json:"tfoNicName,omitempty"` - - // The resource group of the NIC to be used when creating target NICs in TFO. - TfoNicResourceGroupName *string `json:"tfoNicResourceGroupName,omitempty"` - - // A value indicating whether an existing NIC is allowed to be reused during test failover subject to availability. - TfoReuseExistingNic *bool `json:"tfoReuseExistingNic,omitempty"` -} - -// VMNicUpdatesTaskDetails - This class represents the vm NicUpdates task details. -type VMNicUpdatesTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // Name of the Nic. - Name *string `json:"name,omitempty"` - - // Nic Id. - NicID *string `json:"nicId,omitempty"` - - // Virtual machine Id. - VMID *string `json:"vmId,omitempty"` -} - -// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type VMNicUpdatesTaskDetails. -func (v *VMNicUpdatesTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { - return &TaskTypeDetails{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtContainerCreationInput - VMwareCbt container creation input. -type VMwareCbtContainerCreationInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetReplicationProviderSpecificContainerCreationInput implements the ReplicationProviderSpecificContainerCreationInputClassification -// interface for type VMwareCbtContainerCreationInput. -func (v *VMwareCbtContainerCreationInput) GetReplicationProviderSpecificContainerCreationInput() *ReplicationProviderSpecificContainerCreationInput { - return &ReplicationProviderSpecificContainerCreationInput{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtContainerMappingInput - VMwareCbt container mapping input. -type VMwareCbtContainerMappingInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The storage account ARM Id. - StorageAccountID *string `json:"storageAccountId,omitempty"` - - // REQUIRED; The target location. - TargetLocation *string `json:"targetLocation,omitempty"` - - // The target key vault ARM Id. - KeyVaultID *string `json:"keyVaultId,omitempty"` - - // The target key vault URL. - KeyVaultURI *string `json:"keyVaultUri,omitempty"` - - // The secret name of the service bus connection string. - ServiceBusConnectionStringSecretName *string `json:"serviceBusConnectionStringSecretName,omitempty"` - - // The secret name of the storage account. - StorageAccountSasSecretName *string `json:"storageAccountSasSecretName,omitempty"` -} - -// GetReplicationProviderSpecificContainerMappingInput implements the ReplicationProviderSpecificContainerMappingInputClassification -// interface for type VMwareCbtContainerMappingInput. -func (v *VMwareCbtContainerMappingInput) GetReplicationProviderSpecificContainerMappingInput() *ReplicationProviderSpecificContainerMappingInput { - return &ReplicationProviderSpecificContainerMappingInput{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtDiskInput - VMwareCbt disk input. -type VMwareCbtDiskInput struct { - // REQUIRED; The disk Id. - DiskID *string `json:"diskId,omitempty"` - - // REQUIRED; A value indicating whether the disk is the OS disk. - IsOSDisk *string `json:"isOSDisk,omitempty"` - - // REQUIRED; The log storage account ARM Id. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - - // REQUIRED; The key vault secret name of the log storage account. - LogStorageAccountSasSecretName *string `json:"logStorageAccountSasSecretName,omitempty"` - - // The DiskEncryptionSet ARM Id. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` - - // The disk type. - DiskType *DiskAccountType `json:"diskType,omitempty"` -} - -// VMwareCbtEnableMigrationInput - VMwareCbt specific enable migration input. -type VMwareCbtEnableMigrationInput struct { - // REQUIRED; The data mover run as account Id. - DataMoverRunAsAccountID *string `json:"dataMoverRunAsAccountId,omitempty"` - - // REQUIRED; The disks to include list. - DisksToInclude []*VMwareCbtDiskInput `json:"disksToInclude,omitempty"` - - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The snapshot run as account Id. - SnapshotRunAsAccountID *string `json:"snapshotRunAsAccountId,omitempty"` - - // REQUIRED; The target network ARM Id. - TargetNetworkID *string `json:"targetNetworkId,omitempty"` - - // REQUIRED; The target resource group ARM Id. - TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` - - // REQUIRED; The ARM Id of the VM discovered in VMware. - VmwareMachineID *string `json:"vmwareMachineId,omitempty"` - - // License type. - LicenseType *LicenseType `json:"licenseType,omitempty"` - - // A value indicating whether auto resync is to be done. - PerformAutoResync *string `json:"performAutoResync,omitempty"` - - // A value indicating whether bulk SQL RP registration to be done. - PerformSQLBulkRegistration *string `json:"performSqlBulkRegistration,omitempty"` - - // The SQL Server license type. - SQLServerLicenseType *SQLServerLicenseType `json:"sqlServerLicenseType,omitempty"` - - // The tags for the seed disks. - SeedDiskTags map[string]*string `json:"seedDiskTags,omitempty"` - - // The target availability set ARM Id. - TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The target boot diagnostics storage account ARM Id. - TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` - - // The tags for the target disks. - TargetDiskTags map[string]*string `json:"targetDiskTags,omitempty"` - - // The tags for the target NICs. - TargetNicTags map[string]*string `json:"targetNicTags,omitempty"` - - // The target proximity placement group ARM Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The target subnet name. - TargetSubnetName *string `json:"targetSubnetName,omitempty"` - - // The target VM name. - TargetVMName *string `json:"targetVmName,omitempty"` - - // The target VM size. - TargetVMSize *string `json:"targetVmSize,omitempty"` - - // The target VM tags. - TargetVMTags map[string]*string `json:"targetVmTags,omitempty"` - - // The selected test network ARM Id. - TestNetworkID *string `json:"testNetworkId,omitempty"` - - // The selected test subnet name. - TestSubnetName *string `json:"testSubnetName,omitempty"` -} - -// GetEnableMigrationProviderSpecificInput implements the EnableMigrationProviderSpecificInputClassification interface for -// type VMwareCbtEnableMigrationInput. -func (v *VMwareCbtEnableMigrationInput) GetEnableMigrationProviderSpecificInput() *EnableMigrationProviderSpecificInput { - return &EnableMigrationProviderSpecificInput{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtEventDetails - Event details for VMwareCbt provider. -type VMwareCbtEventDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // READ-ONLY; The migration item name. - MigrationItemName *string `json:"migrationItemName,omitempty" azure:"ro"` -} - -// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type VMwareCbtEventDetails. -func (v *VMwareCbtEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { - return &EventProviderSpecificDetails{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtMigrateInput - VMwareCbt specific migrate input. -type VMwareCbtMigrateInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; A value indicating whether VM is to be shutdown. - PerformShutdown *string `json:"performShutdown,omitempty"` -} - -// GetMigrateProviderSpecificInput implements the MigrateProviderSpecificInputClassification interface for type VMwareCbtMigrateInput. -func (v *VMwareCbtMigrateInput) GetMigrateProviderSpecificInput() *MigrateProviderSpecificInput { - return &MigrateProviderSpecificInput{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtMigrationDetails - VMwareCbt provider specific settings. -type VMwareCbtMigrationDetails struct { - // REQUIRED; Gets the instance type. - InstanceType *string `json:"instanceType,omitempty"` - - // License Type of the VM to be used. - LicenseType *string `json:"licenseType,omitempty"` - - // A value indicating whether auto resync is to be done. - PerformAutoResync *string `json:"performAutoResync,omitempty"` - - // The list of protected disks. - ProtectedDisks []*VMwareCbtProtectedDiskDetails `json:"protectedDisks,omitempty"` - - // The SQL Server license type. - SQLServerLicenseType *string `json:"sqlServerLicenseType,omitempty"` - - // The tags for the seed disks. - SeedDiskTags map[string]*string `json:"seedDiskTags,omitempty"` - - // The target availability set Id. - TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The target boot diagnostics storage account ARM Id. - TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` - - // The tags for the target disks. - TargetDiskTags map[string]*string `json:"targetDiskTags,omitempty"` - - // The target network Id. - TargetNetworkID *string `json:"targetNetworkId,omitempty"` - - // The tags for the target NICs. - TargetNicTags map[string]*string `json:"targetNicTags,omitempty"` - - // The target proximity placement group Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The target resource group Id. - TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` - - // Target VM name. - TargetVMName *string `json:"targetVmName,omitempty"` - - // The target VM size. - TargetVMSize *string `json:"targetVmSize,omitempty"` - - // The target VM tags. - TargetVMTags map[string]*string `json:"targetVmTags,omitempty"` - - // The test network Id. - TestNetworkID *string `json:"testNetworkId,omitempty"` - - // The network details. - VMNics []*VMwareCbtNicDetails `json:"vmNics,omitempty"` - - // READ-ONLY; The data mover run as account Id. - DataMoverRunAsAccountID *string `json:"dataMoverRunAsAccountId,omitempty" azure:"ro"` - - // READ-ONLY; The firmware type. - FirmwareType *string `json:"firmwareType,omitempty" azure:"ro"` - - // READ-ONLY; The initial seeding progress percentage. - InitialSeedingProgressPercentage *int32 `json:"initialSeedingProgressPercentage,omitempty" azure:"ro"` - - // READ-ONLY; The initial seeding retry count. - InitialSeedingRetryCount *int64 `json:"initialSeedingRetryCount,omitempty" azure:"ro"` - - // READ-ONLY; The last recovery point Id. - LastRecoveryPointID *string `json:"lastRecoveryPointId,omitempty" azure:"ro"` - - // READ-ONLY; The last recovery point received time. - LastRecoveryPointReceived *time.Time `json:"lastRecoveryPointReceived,omitempty" azure:"ro"` - - // READ-ONLY; The migration progress percentage. - MigrationProgressPercentage *int32 `json:"migrationProgressPercentage,omitempty" azure:"ro"` - - // READ-ONLY; The recovery point Id to which the VM was migrated. - MigrationRecoveryPointID *string `json:"migrationRecoveryPointId,omitempty" azure:"ro"` - - // READ-ONLY; The type of the OS on the VM. - OSType *string `json:"osType,omitempty" azure:"ro"` - - // READ-ONLY; The resume progress percentage. - ResumeProgressPercentage *int32 `json:"resumeProgressPercentage,omitempty" azure:"ro"` - - // READ-ONLY; The resume retry count. - ResumeRetryCount *int64 `json:"resumeRetryCount,omitempty" azure:"ro"` - - // READ-ONLY; The resync progress percentage. - ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether resync is required. - ResyncRequired *string `json:"resyncRequired,omitempty" azure:"ro"` - - // READ-ONLY; The resync retry count. - ResyncRetryCount *int64 `json:"resyncRetryCount,omitempty" azure:"ro"` - - // READ-ONLY; The resync state. - ResyncState *ResyncState `json:"resyncState,omitempty" azure:"ro"` - - // READ-ONLY; The snapshot run as account Id. - SnapshotRunAsAccountID *string `json:"snapshotRunAsAccountId,omitempty" azure:"ro"` - - // READ-ONLY; The replication storage account ARM Id. This is applicable only for the blob based replication test hook. - StorageAccountID *string `json:"storageAccountId,omitempty" azure:"ro"` - - // READ-ONLY; The target generation. - TargetGeneration *string `json:"targetGeneration,omitempty" azure:"ro"` - - // READ-ONLY; The target location. - TargetLocation *string `json:"targetLocation,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of the VM discovered in VMware. - VmwareMachineID *string `json:"vmwareMachineId,omitempty" azure:"ro"` -} - -// GetMigrationProviderSpecificSettings implements the MigrationProviderSpecificSettingsClassification interface for type -// VMwareCbtMigrationDetails. -func (v *VMwareCbtMigrationDetails) GetMigrationProviderSpecificSettings() *MigrationProviderSpecificSettings { - return &MigrationProviderSpecificSettings{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtNicDetails - VMwareCbt NIC details. -type VMwareCbtNicDetails struct { - // A value indicating whether this is the primary NIC. - IsPrimaryNic *string `json:"isPrimaryNic,omitempty"` - - // A value indicating whether this NIC is selected for migration. - IsSelectedForMigration *string `json:"isSelectedForMigration,omitempty"` - - // The target IP address. - TargetIPAddress *string `json:"targetIPAddress,omitempty"` - - // The target IP address type. - TargetIPAddressType *EthernetAddressType `json:"targetIPAddressType,omitempty"` - - // Target NIC name. - TargetNicName *string `json:"targetNicName,omitempty"` - - // Target subnet name. - TargetSubnetName *string `json:"targetSubnetName,omitempty"` - - // The test IP address. - TestIPAddress *string `json:"testIPAddress,omitempty"` - - // The test IP address type. - TestIPAddressType *EthernetAddressType `json:"testIPAddressType,omitempty"` - - // Source network Id. - TestNetworkID *string `json:"testNetworkId,omitempty"` - - // Test subnet name. - TestSubnetName *string `json:"testSubnetName,omitempty"` - - // READ-ONLY; The NIC Id. - NicID *string `json:"nicId,omitempty" azure:"ro"` - - // READ-ONLY; The source IP address. - SourceIPAddress *string `json:"sourceIPAddress,omitempty" azure:"ro"` - - // READ-ONLY; The source IP address type. - SourceIPAddressType *EthernetAddressType `json:"sourceIPAddressType,omitempty" azure:"ro"` - - // READ-ONLY; Source network Id. - SourceNetworkID *string `json:"sourceNetworkId,omitempty" azure:"ro"` -} - -// VMwareCbtNicInput - VMwareCbt NIC input. -type VMwareCbtNicInput struct { - // REQUIRED; A value indicating whether this is the primary NIC. - IsPrimaryNic *string `json:"isPrimaryNic,omitempty"` - - // REQUIRED; The NIC Id. - NicID *string `json:"nicId,omitempty"` - - // A value indicating whether this NIC is selected for migration. - IsSelectedForMigration *string `json:"isSelectedForMigration,omitempty"` - - // Target NIC name. - TargetNicName *string `json:"targetNicName,omitempty"` - - // The static IP address. - TargetStaticIPAddress *string `json:"targetStaticIPAddress,omitempty"` - - // Target subnet name. - TargetSubnetName *string `json:"targetSubnetName,omitempty"` - - // The test static IP address. - TestStaticIPAddress *string `json:"testStaticIPAddress,omitempty"` - - // The test subnet name. - TestSubnetName *string `json:"testSubnetName,omitempty"` -} - -// VMwareCbtPolicyCreationInput - VMware Cbt policy creation input. -type VMwareCbtPolicyCreationInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The app consistent snapshot frequency (in minutes). - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency (in minutes). - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type VMwareCbtPolicyCreationInput. -func (v *VMwareCbtPolicyCreationInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { - return &PolicyProviderSpecificInput{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtProtectedDiskDetails - VMwareCbt protected disk details. -type VMwareCbtProtectedDiskDetails struct { - // The disk type. - DiskType *DiskAccountType `json:"diskType,omitempty"` - - // The name for the target managed disk. - TargetDiskName *string `json:"targetDiskName,omitempty"` - - // READ-ONLY; The disk capacity in bytes. - CapacityInBytes *int64 `json:"capacityInBytes,omitempty" azure:"ro"` - - // READ-ONLY; The DiskEncryptionSet ARM Id. - DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty" azure:"ro"` - - // READ-ONLY; The disk id. - DiskID *string `json:"diskId,omitempty" azure:"ro"` - - // READ-ONLY; The disk name. - DiskName *string `json:"diskName,omitempty" azure:"ro"` - - // READ-ONLY; The disk path. - DiskPath *string `json:"diskPath,omitempty" azure:"ro"` - - // READ-ONLY; A value indicating whether the disk is the OS disk. - IsOSDisk *string `json:"isOSDisk,omitempty" azure:"ro"` - - // READ-ONLY; The log storage account ARM Id. - LogStorageAccountID *string `json:"logStorageAccountId,omitempty" azure:"ro"` - - // READ-ONLY; The key vault secret name of the log storage account. - LogStorageAccountSasSecretName *string `json:"logStorageAccountSasSecretName,omitempty" azure:"ro"` - - // READ-ONLY; The uri of the seed blob. - SeedBlobURI *string `json:"seedBlobUri,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of the seed managed disk. - SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty" azure:"ro"` - - // READ-ONLY; The uri of the target blob. - TargetBlobURI *string `json:"targetBlobUri,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of the target managed disk. - TargetManagedDiskID *string `json:"targetManagedDiskId,omitempty" azure:"ro"` -} - -// VMwareCbtProtectionContainerMappingDetails - VMwareCbt provider specific container mapping details. -type VMwareCbtProtectionContainerMappingDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // READ-ONLY; The target key vault ARM Id. - KeyVaultID *string `json:"keyVaultId,omitempty" azure:"ro"` - - // READ-ONLY; The target key vault URI. - KeyVaultURI *string `json:"keyVaultUri,omitempty" azure:"ro"` - - // READ-ONLY; The role size to NIC count map. - RoleSizeToNicCountMap map[string]*int32 `json:"roleSizeToNicCountMap,omitempty" azure:"ro"` - - // READ-ONLY; The secret name of the service bus connection string. - ServiceBusConnectionStringSecretName *string `json:"serviceBusConnectionStringSecretName,omitempty" azure:"ro"` - - // READ-ONLY; The storage account ARM Id. - StorageAccountID *string `json:"storageAccountId,omitempty" azure:"ro"` - - // READ-ONLY; The secret name of the storage account. - StorageAccountSasSecretName *string `json:"storageAccountSasSecretName,omitempty" azure:"ro"` - - // READ-ONLY; The target location. - TargetLocation *string `json:"targetLocation,omitempty" azure:"ro"` -} - -// GetProtectionContainerMappingProviderSpecificDetails implements the ProtectionContainerMappingProviderSpecificDetailsClassification -// interface for type VMwareCbtProtectionContainerMappingDetails. -func (v *VMwareCbtProtectionContainerMappingDetails) GetProtectionContainerMappingProviderSpecificDetails() *ProtectionContainerMappingProviderSpecificDetails { - return &ProtectionContainerMappingProviderSpecificDetails{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtResumeReplicationInput - VMwareCbt specific resume replication input. -type VMwareCbtResumeReplicationInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // A value indicating whether Migration resources to be deleted. - DeleteMigrationResources *string `json:"deleteMigrationResources,omitempty"` -} - -// GetResumeReplicationProviderSpecificInput implements the ResumeReplicationProviderSpecificInputClassification interface -// for type VMwareCbtResumeReplicationInput. -func (v *VMwareCbtResumeReplicationInput) GetResumeReplicationProviderSpecificInput() *ResumeReplicationProviderSpecificInput { - return &ResumeReplicationProviderSpecificInput{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtResyncInput - VMwareCbt specific resync input. -type VMwareCbtResyncInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; A value indicating whether CBT is to be reset. - SkipCbtReset *string `json:"skipCbtReset,omitempty"` -} - -// GetResyncProviderSpecificInput implements the ResyncProviderSpecificInputClassification interface for type VMwareCbtResyncInput. -func (v *VMwareCbtResyncInput) GetResyncProviderSpecificInput() *ResyncProviderSpecificInput { - return &ResyncProviderSpecificInput{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtTestMigrateInput - VMwareCbt specific test migrate input. -type VMwareCbtTestMigrateInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The test network Id. - NetworkID *string `json:"networkId,omitempty"` - - // REQUIRED; The recovery point Id. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - - // The list of NIC details. - VMNics []*VMwareCbtNicInput `json:"vmNics,omitempty"` -} - -// GetTestMigrateProviderSpecificInput implements the TestMigrateProviderSpecificInputClassification interface for type VMwareCbtTestMigrateInput. -func (v *VMwareCbtTestMigrateInput) GetTestMigrateProviderSpecificInput() *TestMigrateProviderSpecificInput { - return &TestMigrateProviderSpecificInput{ - InstanceType: v.InstanceType, - } -} - -// VMwareCbtUpdateDiskInput - VMwareCbt disk input for update. -type VMwareCbtUpdateDiskInput struct { - // REQUIRED; The disk Id. - DiskID *string `json:"diskId,omitempty"` - - // A value indicating whether the disk is the OS disk. - IsOSDisk *string `json:"isOSDisk,omitempty"` - - // The target disk name. - TargetDiskName *string `json:"targetDiskName,omitempty"` -} - -// VMwareCbtUpdateMigrationItemInput - VMwareCbt specific update migration item input. -type VMwareCbtUpdateMigrationItemInput struct { - // REQUIRED; The class type. - InstanceType *string `json:"instanceType,omitempty"` - - // The license type. - LicenseType *LicenseType `json:"licenseType,omitempty"` - - // A value indicating whether auto resync is to be done. - PerformAutoResync *string `json:"performAutoResync,omitempty"` - - // The SQL Server license type. - SQLServerLicenseType *SQLServerLicenseType `json:"sqlServerLicenseType,omitempty"` - - // The target availability set ARM Id. - TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` - - // The target availability zone. - TargetAvailabilityZone *string `json:"targetAvailabilityZone,omitempty"` - - // The target boot diagnostics storage account ARM Id. - TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` - - // The tags for the target disks. - TargetDiskTags map[string]*string `json:"targetDiskTags,omitempty"` - - // The target network ARM Id. - TargetNetworkID *string `json:"targetNetworkId,omitempty"` - - // The tags for the target NICs. - TargetNicTags map[string]*string `json:"targetNicTags,omitempty"` - - // The target proximity placement group ARM Id. - TargetProximityPlacementGroupID *string `json:"targetProximityPlacementGroupId,omitempty"` - - // The target resource group ARM Id. - TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` - - // The target VM name. - TargetVMName *string `json:"targetVmName,omitempty"` - - // The target VM size. - TargetVMSize *string `json:"targetVmSize,omitempty"` - - // The target VM tags. - TargetVMTags map[string]*string `json:"targetVmTags,omitempty"` - - // The test network ARM Id. - TestNetworkID *string `json:"testNetworkId,omitempty"` - - // The list of disk update properties. - VMDisks []*VMwareCbtUpdateDiskInput `json:"vmDisks,omitempty"` - - // The list of NIC details. - VMNics []*VMwareCbtNicInput `json:"vmNics,omitempty"` -} - -// GetUpdateMigrationItemProviderSpecificInput implements the UpdateMigrationItemProviderSpecificInputClassification interface -// for type VMwareCbtUpdateMigrationItemInput. -func (v *VMwareCbtUpdateMigrationItemInput) GetUpdateMigrationItemProviderSpecificInput() *UpdateMigrationItemProviderSpecificInput { - return &UpdateMigrationItemProviderSpecificInput{ - InstanceType: v.InstanceType, - } -} - -// VMwareDetails - Store the fabric details specific to the VMware fabric. -type VMwareDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The number of source and target servers configured to talk to this CS. - AgentCount *string `json:"agentCount,omitempty"` - - // Agent expiry date. - AgentExpiryDate *time.Time `json:"agentExpiryDate,omitempty"` - - // The agent Version. - AgentVersion *string `json:"agentVersion,omitempty"` - - // The agent version details. - AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"` - - // The available memory. - AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"` - - // The available space. - AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"` - - // The percentage of the CPU load. - CPULoad *string `json:"cpuLoad,omitempty"` - - // The CPU load status. - CPULoadStatus *string `json:"cpuLoadStatus,omitempty"` - - // The CS service status. - CsServiceStatus *string `json:"csServiceStatus,omitempty"` - - // The database server load. - DatabaseServerLoad *string `json:"databaseServerLoad,omitempty"` - - // The database server load status. - DatabaseServerLoadStatus *string `json:"databaseServerLoadStatus,omitempty"` - - // The host name. - HostName *string `json:"hostName,omitempty"` - - // The IP address. - IPAddress *string `json:"ipAddress,omitempty"` - - // The last heartbeat received from CS server. - LastHeartbeat *time.Time `json:"lastHeartbeat,omitempty"` - - // The list of Master Target servers associated with the fabric. - MasterTargetServers []*MasterTargetServer `json:"masterTargetServers,omitempty"` - - // The memory usage status. - MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"` - - // The number of process servers. - ProcessServerCount *string `json:"processServerCount,omitempty"` - - // The list of Process Servers associated with the fabric. - ProcessServers []*ProcessServer `json:"processServers,omitempty"` - - // The number of protected servers. - ProtectedServers *string `json:"protectedServers,omitempty"` - - // PS template version. - PsTemplateVersion *string `json:"psTemplateVersion,omitempty"` - - // The number of replication pairs configured in this CS. - ReplicationPairCount *string `json:"replicationPairCount,omitempty"` - - // The list of run as accounts created on the server. - RunAsAccounts []*RunAsAccount `json:"runAsAccounts,omitempty"` - - // CS SSL cert expiry date. - SSLCertExpiryDate *time.Time `json:"sslCertExpiryDate,omitempty"` - - // CS SSL cert expiry date. - SSLCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` - - // The space usage status. - SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"` - - // The switch provider blocking error information. - SwitchProviderBlockingErrorDetails []*InMageFabricSwitchProviderBlockingErrorDetails `json:"switchProviderBlockingErrorDetails,omitempty"` - - // The percentage of the system load. - SystemLoad *string `json:"systemLoad,omitempty"` - - // The system load status. - SystemLoadStatus *string `json:"systemLoadStatus,omitempty"` - - // The total memory. - TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"` - - // The total space. - TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"` - - // Version status. - VersionStatus *string `json:"versionStatus,omitempty"` - - // The web load. - WebLoad *string `json:"webLoad,omitempty"` - - // The web load status. - WebLoadStatus *string `json:"webLoadStatus,omitempty"` -} - -// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type VMwareDetails. -func (v *VMwareDetails) GetFabricSpecificDetails() *FabricSpecificDetails { - return &FabricSpecificDetails{ - InstanceType: v.InstanceType, - } -} - -// VMwareV2FabricCreationInput - VMwareV2 fabric provider specific settings. -type VMwareV2FabricCreationInput struct { - // REQUIRED; Gets the class type. - InstanceType *string `json:"instanceType,omitempty"` - - // REQUIRED; The ARM Id of the migration solution. - MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` - - // The ARM Id of the physical site. - PhysicalSiteID *string `json:"physicalSiteId,omitempty"` - - // The ARM Id of the VMware site. - VmwareSiteID *string `json:"vmwareSiteId,omitempty"` -} - -// GetFabricSpecificCreationInput implements the FabricSpecificCreationInputClassification interface for type VMwareV2FabricCreationInput. -func (v *VMwareV2FabricCreationInput) GetFabricSpecificCreationInput() *FabricSpecificCreationInput { - return &FabricSpecificCreationInput{ - InstanceType: v.InstanceType, - } -} - -// VMwareV2FabricSpecificDetails - VMwareV2 fabric specific details. -type VMwareV2FabricSpecificDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // READ-ONLY; The Migration solution ARM Id. - MigrationSolutionID *string `json:"migrationSolutionId,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of the physical site. - PhysicalSiteID *string `json:"physicalSiteId,omitempty" azure:"ro"` - - // READ-ONLY; The list of process servers. - ProcessServers []*ProcessServerDetails `json:"processServers,omitempty" azure:"ro"` - - // READ-ONLY; The service container Id. - ServiceContainerID *string `json:"serviceContainerId,omitempty" azure:"ro"` - - // READ-ONLY; The service endpoint. - ServiceEndpoint *string `json:"serviceEndpoint,omitempty" azure:"ro"` - - // READ-ONLY; The service resource Id. - ServiceResourceID *string `json:"serviceResourceId,omitempty" azure:"ro"` - - // READ-ONLY; The ARM Id of the VMware site. - VmwareSiteID *string `json:"vmwareSiteId,omitempty" azure:"ro"` -} - -// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type VMwareV2FabricSpecificDetails. -func (v *VMwareV2FabricSpecificDetails) GetFabricSpecificDetails() *FabricSpecificDetails { - return &FabricSpecificDetails{ - InstanceType: v.InstanceType, - } -} - -// VMwareVirtualMachineDetails - VMware provider specific settings. -type VMwareVirtualMachineDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The ID generated by the InMage agent after it gets installed on guest. This is the ID to be used during InMage CreateProtection. - AgentGeneratedID *string `json:"agentGeneratedId,omitempty"` - - // The value indicating if InMage scout agent is installed on guest. - AgentInstalled *string `json:"agentInstalled,omitempty"` - - // The agent version. - AgentVersion *string `json:"agentVersion,omitempty"` - - // A value indicating the discovery type of the machine. Value can be vCenter or physical. - DiscoveryType *string `json:"discoveryType,omitempty"` - - // The disk details. - DiskDetails []*InMageDiskDetails `json:"diskDetails,omitempty"` - - // The IP address. - IPAddress *string `json:"ipAddress,omitempty"` - - // The OsType installed on VM. - OSType *string `json:"osType,omitempty"` - - // The value indicating whether VM is powered on. - PoweredOn *string `json:"poweredOn,omitempty"` - - // The VCenter infrastructure Id. - VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` - - // The validation errors. - ValidationErrors []*HealthError `json:"validationErrors,omitempty"` -} - -// GetConfigurationSettings implements the ConfigurationSettingsClassification interface for type VMwareVirtualMachineDetails. -func (v *VMwareVirtualMachineDetails) GetConfigurationSettings() *ConfigurationSettings { - return &ConfigurationSettings{ - InstanceType: v.InstanceType, - } -} - -// VaultHealthDetails - Vault health details definition. -type VaultHealthDetails struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The vault health related data. - Properties *VaultHealthProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VaultHealthProperties - class to define the health summary of the Vault. -type VaultHealthProperties struct { - // The list of the health detail of the containers in the vault. - ContainersHealth *ResourceHealthSummary `json:"containersHealth,omitempty"` - - // The list of the health detail of the fabrics in the vault. - FabricsHealth *ResourceHealthSummary `json:"fabricsHealth,omitempty"` - - // The list of the health detail of the protected items in the vault. - ProtectedItemsHealth *ResourceHealthSummary `json:"protectedItemsHealth,omitempty"` - - // The list of errors on the vault. - VaultErrors []*HealthError `json:"vaultErrors,omitempty"` -} - -// VaultSetting - Vault setting. -type VaultSetting struct { - // Resource Location - Location *string `json:"location,omitempty"` - - // The vault setting properties. - Properties *VaultSettingProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource Id - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Resource Name - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Resource Type - Type *string `json:"type,omitempty" azure:"ro"` -} - -// VaultSettingCollection - Vault setting collection. -type VaultSettingCollection struct { - // The value of next link. - NextLink *string `json:"nextLink,omitempty"` - - // The list of vault setting. - Value []*VaultSetting `json:"value,omitempty"` -} - -// VaultSettingCreationInput - Input to create vault setting. -type VaultSettingCreationInput struct { - // REQUIRED; Vault setting creation input properties. - Properties *VaultSettingCreationInputProperties `json:"properties,omitempty"` -} - -// VaultSettingCreationInputProperties - Input to create vault setting. -type VaultSettingCreationInputProperties struct { - // The migration solution Id. - MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` - - // VMware to Azure provider type. - VmwareToAzureProviderType *string `json:"vmwareToAzureProviderType,omitempty"` -} - -// VaultSettingProperties - Vault setting properties. -type VaultSettingProperties struct { - // The migration solution ARM Id. - MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` - - // VMware to Azure provider type. - VmwareToAzureProviderType *string `json:"vmwareToAzureProviderType,omitempty"` -} - -// VersionDetails - Version related details. -type VersionDetails struct { - // Version expiry date. - ExpiryDate *time.Time `json:"expiryDate,omitempty"` - - // A value indicating whether security update required. - Status *AgentVersionStatus `json:"status,omitempty"` - - // The agent version. - Version *string `json:"version,omitempty"` -} - -// VirtualMachineTaskDetails - This class represents the virtual machine task details. -type VirtualMachineTaskDetails struct { - // REQUIRED; The type of task details. - InstanceType *string `json:"instanceType,omitempty"` - - // The job entity. - JobTask *JobEntity `json:"jobTask,omitempty"` - - // The skipped reason. - SkippedReason *string `json:"skippedReason,omitempty"` - - // The skipped reason string. - SkippedReasonString *string `json:"skippedReasonString,omitempty"` -} - -// GetJobTaskDetails implements the JobTaskDetailsClassification interface for type VirtualMachineTaskDetails. -func (v *VirtualMachineTaskDetails) GetJobTaskDetails() *JobTaskDetails { - return &JobTaskDetails{ - JobTask: v.JobTask, - InstanceType: v.InstanceType, - } -} - -// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type VirtualMachineTaskDetails. -func (v *VirtualMachineTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { - return &TaskTypeDetails{ - InstanceType: v.InstanceType, - } -} - -// VmmDetails - VMM fabric specific details. -type VmmDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type VmmDetails. -func (v *VmmDetails) GetFabricSpecificDetails() *FabricSpecificDetails { - return &FabricSpecificDetails{ - InstanceType: v.InstanceType, - } -} - -// VmmToAzureCreateNetworkMappingInput - Create network mappings input properties/behavior specific to Vmm to Azure Network -// mapping. -type VmmToAzureCreateNetworkMappingInput struct { - // REQUIRED; The instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetFabricSpecificCreateNetworkMappingInput implements the FabricSpecificCreateNetworkMappingInputClassification interface -// for type VmmToAzureCreateNetworkMappingInput. -func (v *VmmToAzureCreateNetworkMappingInput) GetFabricSpecificCreateNetworkMappingInput() *FabricSpecificCreateNetworkMappingInput { - return &FabricSpecificCreateNetworkMappingInput{ - InstanceType: v.InstanceType, - } -} - -// VmmToAzureNetworkMappingSettings - E2A Network Mapping fabric specific settings. -type VmmToAzureNetworkMappingSettings struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetNetworkMappingFabricSpecificSettings implements the NetworkMappingFabricSpecificSettingsClassification interface for -// type VmmToAzureNetworkMappingSettings. -func (v *VmmToAzureNetworkMappingSettings) GetNetworkMappingFabricSpecificSettings() *NetworkMappingFabricSpecificSettings { - return &NetworkMappingFabricSpecificSettings{ - InstanceType: v.InstanceType, - } -} - -// VmmToAzureUpdateNetworkMappingInput - Update network mappings input properties/behavior specific to vmm to azure. -type VmmToAzureUpdateNetworkMappingInput struct { - // REQUIRED; The instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetFabricSpecificUpdateNetworkMappingInput implements the FabricSpecificUpdateNetworkMappingInputClassification interface -// for type VmmToAzureUpdateNetworkMappingInput. -func (v *VmmToAzureUpdateNetworkMappingInput) GetFabricSpecificUpdateNetworkMappingInput() *FabricSpecificUpdateNetworkMappingInput { - return &FabricSpecificUpdateNetworkMappingInput{ - InstanceType: v.InstanceType, - } -} - -// VmmToVmmCreateNetworkMappingInput - Create network mappings input properties/behavior specific to vmm to vmm Network mapping. -type VmmToVmmCreateNetworkMappingInput struct { - // REQUIRED; The instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetFabricSpecificCreateNetworkMappingInput implements the FabricSpecificCreateNetworkMappingInputClassification interface -// for type VmmToVmmCreateNetworkMappingInput. -func (v *VmmToVmmCreateNetworkMappingInput) GetFabricSpecificCreateNetworkMappingInput() *FabricSpecificCreateNetworkMappingInput { - return &FabricSpecificCreateNetworkMappingInput{ - InstanceType: v.InstanceType, - } -} - -// VmmToVmmNetworkMappingSettings - E2E Network Mapping fabric specific settings. -type VmmToVmmNetworkMappingSettings struct { - // REQUIRED; Gets the Instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetNetworkMappingFabricSpecificSettings implements the NetworkMappingFabricSpecificSettingsClassification interface for -// type VmmToVmmNetworkMappingSettings. -func (v *VmmToVmmNetworkMappingSettings) GetNetworkMappingFabricSpecificSettings() *NetworkMappingFabricSpecificSettings { - return &NetworkMappingFabricSpecificSettings{ - InstanceType: v.InstanceType, - } -} - -// VmmToVmmUpdateNetworkMappingInput - Update network mappings input properties/behavior specific to vmm to vmm. -type VmmToVmmUpdateNetworkMappingInput struct { - // REQUIRED; The instance type. - InstanceType *string `json:"instanceType,omitempty"` -} - -// GetFabricSpecificUpdateNetworkMappingInput implements the FabricSpecificUpdateNetworkMappingInputClassification interface -// for type VmmToVmmUpdateNetworkMappingInput. -func (v *VmmToVmmUpdateNetworkMappingInput) GetFabricSpecificUpdateNetworkMappingInput() *FabricSpecificUpdateNetworkMappingInput { - return &FabricSpecificUpdateNetworkMappingInput{ - InstanceType: v.InstanceType, - } -} - -// VmmVirtualMachineDetails - VMM fabric provider specific VM settings. -type VmmVirtualMachineDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The Last successful failover time. - DiskDetails []*DiskDetails `json:"diskDetails,omitempty"` - - // The id of the object in fabric. - Generation *string `json:"generation,omitempty"` - - // A value indicating whether the VM has a fibre channel adapter attached. String value of SrsDataContract.PresenceStatus - // enum. - HasFibreChannelAdapter *PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` - - // A value indicating whether the VM has a physical disk attached. String value of SrsDataContract.PresenceStatus enum. - HasPhysicalDisk *PresenceStatus `json:"hasPhysicalDisk,omitempty"` - - // A value indicating whether the VM has a shared VHD attached. String value of SrsDataContract.PresenceStatus enum. - HasSharedVhd *PresenceStatus `json:"hasSharedVhd,omitempty"` - - // The Id of the hyper-v host in fabric. - HyperVHostID *string `json:"hyperVHostId,omitempty"` - - // The Last replication time. - OSDetails *OSDetails `json:"osDetails,omitempty"` - - // The source id of the object. - SourceItemID *string `json:"sourceItemId,omitempty"` -} - -// GetConfigurationSettings implements the ConfigurationSettingsClassification interface for type VmmVirtualMachineDetails. -func (v *VmmVirtualMachineDetails) GetConfigurationSettings() *ConfigurationSettings { - return &ConfigurationSettings{ - InstanceType: v.InstanceType, - } -} - -// GetHyperVVirtualMachineDetails implements the HyperVVirtualMachineDetailsClassification interface for type VmmVirtualMachineDetails. -func (v *VmmVirtualMachineDetails) GetHyperVVirtualMachineDetails() *HyperVVirtualMachineDetails { - return &HyperVVirtualMachineDetails{ - SourceItemID: v.SourceItemID, - Generation: v.Generation, - OSDetails: v.OSDetails, - DiskDetails: v.DiskDetails, - HasPhysicalDisk: v.HasPhysicalDisk, - HasFibreChannelAdapter: v.HasFibreChannelAdapter, - HasSharedVhd: v.HasSharedVhd, - HyperVHostID: v.HyperVHostID, - InstanceType: v.InstanceType, - } -} - -// VmwareCbtPolicyDetails - VMware Cbt specific policy details. -type VmwareCbtPolicyDetails struct { - // REQUIRED; Gets the class type. Overridden in derived classes. - InstanceType *string `json:"instanceType,omitempty"` - - // The app consistent snapshot frequency in minutes. - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - - // The crash consistent snapshot frequency in minutes. - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - - // The duration in minutes until which the recovery points need to be stored. - RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"` -} - -// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type VmwareCbtPolicyDetails. -func (v *VmwareCbtPolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { - return &PolicyProviderSpecificDetails{ - InstanceType: v.InstanceType, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/models_serde.go deleted file mode 100644 index 9425a475..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/models_serde.go +++ /dev/null @@ -1,22415 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type A2AAddDisksInput. -func (a A2AAddDisksInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "A2A" - populate(objectMap, "vmDisks", a.VMDisks) - populate(objectMap, "vmManagedDisks", a.VMManagedDisks) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AAddDisksInput. -func (a *A2AAddDisksInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "vmDisks": - err = unpopulate(val, "VMDisks", &a.VMDisks) - delete(rawMsg, key) - case "vmManagedDisks": - err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AApplyRecoveryPointInput. -func (a A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "A2A" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AApplyRecoveryPointInput. -func (a *A2AApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AContainerCreationInput. -func (a A2AContainerCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "A2A" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AContainerCreationInput. -func (a *A2AContainerCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AContainerMappingInput. -func (a A2AContainerMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentAutoUpdateStatus", a.AgentAutoUpdateStatus) - populate(objectMap, "automationAccountArmId", a.AutomationAccountArmID) - populate(objectMap, "automationAccountAuthenticationType", a.AutomationAccountAuthenticationType) - objectMap["instanceType"] = "A2A" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AContainerMappingInput. -func (a *A2AContainerMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentAutoUpdateStatus": - err = unpopulate(val, "AgentAutoUpdateStatus", &a.AgentAutoUpdateStatus) - delete(rawMsg, key) - case "automationAccountArmId": - err = unpopulate(val, "AutomationAccountArmID", &a.AutomationAccountArmID) - delete(rawMsg, key) - case "automationAccountAuthenticationType": - err = unpopulate(val, "AutomationAccountAuthenticationType", &a.AutomationAccountAuthenticationType) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2ACreateProtectionIntentInput. -func (a A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentAutoUpdateStatus", a.AgentAutoUpdateStatus) - populate(objectMap, "autoProtectionOfDataDisk", a.AutoProtectionOfDataDisk) - populate(objectMap, "automationAccountArmId", a.AutomationAccountArmID) - populate(objectMap, "automationAccountAuthenticationType", a.AutomationAccountAuthenticationType) - populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) - populate(objectMap, "fabricObjectId", a.FabricObjectID) - objectMap["instanceType"] = "A2A" - populate(objectMap, "multiVmGroupId", a.MultiVMGroupID) - populate(objectMap, "multiVmGroupName", a.MultiVMGroupName) - populate(objectMap, "primaryLocation", a.PrimaryLocation) - populate(objectMap, "primaryStagingStorageAccountCustomInput", a.PrimaryStagingStorageAccountCustomInput) - populate(objectMap, "protectionProfileCustomInput", a.ProtectionProfileCustomInput) - populate(objectMap, "recoveryAvailabilitySetCustomInput", a.RecoveryAvailabilitySetCustomInput) - populate(objectMap, "recoveryAvailabilityType", a.RecoveryAvailabilityType) - populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) - populate(objectMap, "recoveryBootDiagStorageAccount", a.RecoveryBootDiagStorageAccount) - populate(objectMap, "recoveryLocation", a.RecoveryLocation) - populate(objectMap, "recoveryProximityPlacementGroupCustomInput", a.RecoveryProximityPlacementGroupCustomInput) - populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) - populate(objectMap, "recoverySubscriptionId", a.RecoverySubscriptionID) - populate(objectMap, "recoveryVirtualNetworkCustomInput", a.RecoveryVirtualNetworkCustomInput) - populate(objectMap, "vmDisks", a.VMDisks) - populate(objectMap, "vmManagedDisks", a.VMManagedDisks) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACreateProtectionIntentInput. -func (a *A2ACreateProtectionIntentInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentAutoUpdateStatus": - err = unpopulate(val, "AgentAutoUpdateStatus", &a.AgentAutoUpdateStatus) - delete(rawMsg, key) - case "autoProtectionOfDataDisk": - err = unpopulate(val, "AutoProtectionOfDataDisk", &a.AutoProtectionOfDataDisk) - delete(rawMsg, key) - case "automationAccountArmId": - err = unpopulate(val, "AutomationAccountArmID", &a.AutomationAccountArmID) - delete(rawMsg, key) - case "automationAccountAuthenticationType": - err = unpopulate(val, "AutomationAccountAuthenticationType", &a.AutomationAccountAuthenticationType) - delete(rawMsg, key) - case "diskEncryptionInfo": - err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "multiVmGroupId": - err = unpopulate(val, "MultiVMGroupID", &a.MultiVMGroupID) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &a.MultiVMGroupName) - delete(rawMsg, key) - case "primaryLocation": - err = unpopulate(val, "PrimaryLocation", &a.PrimaryLocation) - delete(rawMsg, key) - case "primaryStagingStorageAccountCustomInput": - a.PrimaryStagingStorageAccountCustomInput, err = unmarshalStorageAccountCustomDetailsClassification(val) - delete(rawMsg, key) - case "protectionProfileCustomInput": - a.ProtectionProfileCustomInput, err = unmarshalProtectionProfileCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryAvailabilitySetCustomInput": - a.RecoveryAvailabilitySetCustomInput, err = unmarshalRecoveryAvailabilitySetCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryAvailabilityType": - err = unpopulate(val, "RecoveryAvailabilityType", &a.RecoveryAvailabilityType) - delete(rawMsg, key) - case "recoveryAvailabilityZone": - err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) - delete(rawMsg, key) - case "recoveryBootDiagStorageAccount": - a.RecoveryBootDiagStorageAccount, err = unmarshalStorageAccountCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryLocation": - err = unpopulate(val, "RecoveryLocation", &a.RecoveryLocation) - delete(rawMsg, key) - case "recoveryProximityPlacementGroupCustomInput": - a.RecoveryProximityPlacementGroupCustomInput, err = unmarshalRecoveryProximityPlacementGroupCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryResourceGroupId": - err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) - delete(rawMsg, key) - case "recoverySubscriptionId": - err = unpopulate(val, "RecoverySubscriptionID", &a.RecoverySubscriptionID) - delete(rawMsg, key) - case "recoveryVirtualNetworkCustomInput": - a.RecoveryVirtualNetworkCustomInput, err = unmarshalRecoveryVirtualNetworkCustomDetailsClassification(val) - delete(rawMsg, key) - case "vmDisks": - err = unpopulate(val, "VMDisks", &a.VMDisks) - delete(rawMsg, key) - case "vmManagedDisks": - err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2ACrossClusterMigrationApplyRecoveryPointInput. -func (a A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "A2ACrossClusterMigration" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACrossClusterMigrationApplyRecoveryPointInput. -func (a *A2ACrossClusterMigrationApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2ACrossClusterMigrationContainerCreationInput. -func (a A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "A2ACrossClusterMigration" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACrossClusterMigrationContainerCreationInput. -func (a *A2ACrossClusterMigrationContainerCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2ACrossClusterMigrationEnableProtectionInput. -func (a A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricObjectId", a.FabricObjectID) - objectMap["instanceType"] = "A2ACrossClusterMigration" - populate(objectMap, "recoveryContainerId", a.RecoveryContainerID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACrossClusterMigrationEnableProtectionInput. -func (a *A2ACrossClusterMigrationEnableProtectionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "recoveryContainerId": - err = unpopulate(val, "RecoveryContainerID", &a.RecoveryContainerID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2ACrossClusterMigrationPolicyCreationInput. -func (a A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "A2ACrossClusterMigration" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACrossClusterMigrationPolicyCreationInput. -func (a *A2ACrossClusterMigrationPolicyCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2ACrossClusterMigrationReplicationDetails. -func (a A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricObjectId", a.FabricObjectID) - objectMap["instanceType"] = "A2ACrossClusterMigration" - populate(objectMap, "lifecycleId", a.LifecycleID) - populate(objectMap, "osType", a.OSType) - populate(objectMap, "primaryFabricLocation", a.PrimaryFabricLocation) - populate(objectMap, "vmProtectionState", a.VMProtectionState) - populate(objectMap, "vmProtectionStateDescription", a.VMProtectionStateDescription) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACrossClusterMigrationReplicationDetails. -func (a *A2ACrossClusterMigrationReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "lifecycleId": - err = unpopulate(val, "LifecycleID", &a.LifecycleID) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &a.OSType) - delete(rawMsg, key) - case "primaryFabricLocation": - err = unpopulate(val, "PrimaryFabricLocation", &a.PrimaryFabricLocation) - delete(rawMsg, key) - case "vmProtectionState": - err = unpopulate(val, "VMProtectionState", &a.VMProtectionState) - delete(rawMsg, key) - case "vmProtectionStateDescription": - err = unpopulate(val, "VMProtectionStateDescription", &a.VMProtectionStateDescription) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AEnableProtectionInput. -func (a A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) - populate(objectMap, "fabricObjectId", a.FabricObjectID) - objectMap["instanceType"] = "A2A" - populate(objectMap, "multiVmGroupId", a.MultiVMGroupID) - populate(objectMap, "multiVmGroupName", a.MultiVMGroupName) - populate(objectMap, "recoveryAvailabilitySetId", a.RecoveryAvailabilitySetID) - populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) - populate(objectMap, "recoveryAzureNetworkId", a.RecoveryAzureNetworkID) - populate(objectMap, "recoveryBootDiagStorageAccountId", a.RecoveryBootDiagStorageAccountID) - populate(objectMap, "recoveryCapacityReservationGroupId", a.RecoveryCapacityReservationGroupID) - populate(objectMap, "recoveryCloudServiceId", a.RecoveryCloudServiceID) - populate(objectMap, "recoveryContainerId", a.RecoveryContainerID) - populate(objectMap, "recoveryExtendedLocation", a.RecoveryExtendedLocation) - populate(objectMap, "recoveryProximityPlacementGroupId", a.RecoveryProximityPlacementGroupID) - populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) - populate(objectMap, "recoverySubnetName", a.RecoverySubnetName) - populate(objectMap, "recoveryVirtualMachineScaleSetId", a.RecoveryVirtualMachineScaleSetID) - populate(objectMap, "vmDisks", a.VMDisks) - populate(objectMap, "vmManagedDisks", a.VMManagedDisks) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AEnableProtectionInput. -func (a *A2AEnableProtectionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionInfo": - err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "multiVmGroupId": - err = unpopulate(val, "MultiVMGroupID", &a.MultiVMGroupID) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &a.MultiVMGroupName) - delete(rawMsg, key) - case "recoveryAvailabilitySetId": - err = unpopulate(val, "RecoveryAvailabilitySetID", &a.RecoveryAvailabilitySetID) - delete(rawMsg, key) - case "recoveryAvailabilityZone": - err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) - delete(rawMsg, key) - case "recoveryAzureNetworkId": - err = unpopulate(val, "RecoveryAzureNetworkID", &a.RecoveryAzureNetworkID) - delete(rawMsg, key) - case "recoveryBootDiagStorageAccountId": - err = unpopulate(val, "RecoveryBootDiagStorageAccountID", &a.RecoveryBootDiagStorageAccountID) - delete(rawMsg, key) - case "recoveryCapacityReservationGroupId": - err = unpopulate(val, "RecoveryCapacityReservationGroupID", &a.RecoveryCapacityReservationGroupID) - delete(rawMsg, key) - case "recoveryCloudServiceId": - err = unpopulate(val, "RecoveryCloudServiceID", &a.RecoveryCloudServiceID) - delete(rawMsg, key) - case "recoveryContainerId": - err = unpopulate(val, "RecoveryContainerID", &a.RecoveryContainerID) - delete(rawMsg, key) - case "recoveryExtendedLocation": - err = unpopulate(val, "RecoveryExtendedLocation", &a.RecoveryExtendedLocation) - delete(rawMsg, key) - case "recoveryProximityPlacementGroupId": - err = unpopulate(val, "RecoveryProximityPlacementGroupID", &a.RecoveryProximityPlacementGroupID) - delete(rawMsg, key) - case "recoveryResourceGroupId": - err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) - delete(rawMsg, key) - case "recoverySubnetName": - err = unpopulate(val, "RecoverySubnetName", &a.RecoverySubnetName) - delete(rawMsg, key) - case "recoveryVirtualMachineScaleSetId": - err = unpopulate(val, "RecoveryVirtualMachineScaleSetID", &a.RecoveryVirtualMachineScaleSetID) - delete(rawMsg, key) - case "vmDisks": - err = unpopulate(val, "VMDisks", &a.VMDisks) - delete(rawMsg, key) - case "vmManagedDisks": - err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AEventDetails. -func (a A2AEventDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricLocation", a.FabricLocation) - populate(objectMap, "fabricName", a.FabricName) - populate(objectMap, "fabricObjectId", a.FabricObjectID) - objectMap["instanceType"] = "A2A" - populate(objectMap, "protectedItemName", a.ProtectedItemName) - populate(objectMap, "remoteFabricLocation", a.RemoteFabricLocation) - populate(objectMap, "remoteFabricName", a.RemoteFabricName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AEventDetails. -func (a *A2AEventDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricLocation": - err = unpopulate(val, "FabricLocation", &a.FabricLocation) - delete(rawMsg, key) - case "fabricName": - err = unpopulate(val, "FabricName", &a.FabricName) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "protectedItemName": - err = unpopulate(val, "ProtectedItemName", &a.ProtectedItemName) - delete(rawMsg, key) - case "remoteFabricLocation": - err = unpopulate(val, "RemoteFabricLocation", &a.RemoteFabricLocation) - delete(rawMsg, key) - case "remoteFabricName": - err = unpopulate(val, "RemoteFabricName", &a.RemoteFabricName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AExtendedLocationDetails. -func (a A2AExtendedLocationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "primaryExtendedLocation", a.PrimaryExtendedLocation) - populate(objectMap, "recoveryExtendedLocation", a.RecoveryExtendedLocation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AExtendedLocationDetails. -func (a *A2AExtendedLocationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "primaryExtendedLocation": - err = unpopulate(val, "PrimaryExtendedLocation", &a.PrimaryExtendedLocation) - delete(rawMsg, key) - case "recoveryExtendedLocation": - err = unpopulate(val, "RecoveryExtendedLocation", &a.RecoveryExtendedLocation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2APolicyCreationInput. -func (a A2APolicyCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", a.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", a.CrashConsistentFrequencyInMinutes) - objectMap["instanceType"] = "A2A" - populate(objectMap, "multiVmSyncStatus", a.MultiVMSyncStatus) - populate(objectMap, "recoveryPointHistory", a.RecoveryPointHistory) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2APolicyCreationInput. -func (a *A2APolicyCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &a.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &a.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "multiVmSyncStatus": - err = unpopulate(val, "MultiVMSyncStatus", &a.MultiVMSyncStatus) - delete(rawMsg, key) - case "recoveryPointHistory": - err = unpopulate(val, "RecoveryPointHistory", &a.RecoveryPointHistory) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2APolicyDetails. -func (a A2APolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", a.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", a.CrashConsistentFrequencyInMinutes) - objectMap["instanceType"] = "A2A" - populate(objectMap, "multiVmSyncStatus", a.MultiVMSyncStatus) - populate(objectMap, "recoveryPointHistory", a.RecoveryPointHistory) - populate(objectMap, "recoveryPointThresholdInMinutes", a.RecoveryPointThresholdInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2APolicyDetails. -func (a *A2APolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &a.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &a.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "multiVmSyncStatus": - err = unpopulate(val, "MultiVMSyncStatus", &a.MultiVMSyncStatus) - delete(rawMsg, key) - case "recoveryPointHistory": - err = unpopulate(val, "RecoveryPointHistory", &a.RecoveryPointHistory) - delete(rawMsg, key) - case "recoveryPointThresholdInMinutes": - err = unpopulate(val, "RecoveryPointThresholdInMinutes", &a.RecoveryPointThresholdInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AProtectedDiskDetails. -func (a A2AProtectedDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedDiskLevelOperation", a.AllowedDiskLevelOperation) - populate(objectMap, "dataPendingAtSourceAgentInMB", a.DataPendingAtSourceAgentInMB) - populate(objectMap, "dataPendingInStagingStorageAccountInMB", a.DataPendingInStagingStorageAccountInMB) - populate(objectMap, "dekKeyVaultArmId", a.DekKeyVaultArmID) - populate(objectMap, "diskCapacityInBytes", a.DiskCapacityInBytes) - populate(objectMap, "diskName", a.DiskName) - populate(objectMap, "diskState", a.DiskState) - populate(objectMap, "diskType", a.DiskType) - populate(objectMap, "diskUri", a.DiskURI) - populate(objectMap, "failoverDiskName", a.FailoverDiskName) - populate(objectMap, "isDiskEncrypted", a.IsDiskEncrypted) - populate(objectMap, "isDiskKeyEncrypted", a.IsDiskKeyEncrypted) - populate(objectMap, "kekKeyVaultArmId", a.KekKeyVaultArmID) - populate(objectMap, "keyIdentifier", a.KeyIdentifier) - populate(objectMap, "monitoringJobType", a.MonitoringJobType) - populate(objectMap, "monitoringPercentageCompletion", a.MonitoringPercentageCompletion) - populate(objectMap, "primaryDiskAzureStorageAccountId", a.PrimaryDiskAzureStorageAccountID) - populate(objectMap, "primaryStagingAzureStorageAccountId", a.PrimaryStagingAzureStorageAccountID) - populate(objectMap, "recoveryAzureStorageAccountId", a.RecoveryAzureStorageAccountID) - populate(objectMap, "recoveryDiskUri", a.RecoveryDiskURI) - populate(objectMap, "resyncRequired", a.ResyncRequired) - populate(objectMap, "secretIdentifier", a.SecretIdentifier) - populate(objectMap, "tfoDiskName", a.TfoDiskName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectedDiskDetails. -func (a *A2AProtectedDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedDiskLevelOperation": - err = unpopulate(val, "AllowedDiskLevelOperation", &a.AllowedDiskLevelOperation) - delete(rawMsg, key) - case "dataPendingAtSourceAgentInMB": - err = unpopulate(val, "DataPendingAtSourceAgentInMB", &a.DataPendingAtSourceAgentInMB) - delete(rawMsg, key) - case "dataPendingInStagingStorageAccountInMB": - err = unpopulate(val, "DataPendingInStagingStorageAccountInMB", &a.DataPendingInStagingStorageAccountInMB) - delete(rawMsg, key) - case "dekKeyVaultArmId": - err = unpopulate(val, "DekKeyVaultArmID", &a.DekKeyVaultArmID) - delete(rawMsg, key) - case "diskCapacityInBytes": - err = unpopulate(val, "DiskCapacityInBytes", &a.DiskCapacityInBytes) - delete(rawMsg, key) - case "diskName": - err = unpopulate(val, "DiskName", &a.DiskName) - delete(rawMsg, key) - case "diskState": - err = unpopulate(val, "DiskState", &a.DiskState) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &a.DiskType) - delete(rawMsg, key) - case "diskUri": - err = unpopulate(val, "DiskURI", &a.DiskURI) - delete(rawMsg, key) - case "failoverDiskName": - err = unpopulate(val, "FailoverDiskName", &a.FailoverDiskName) - delete(rawMsg, key) - case "isDiskEncrypted": - err = unpopulate(val, "IsDiskEncrypted", &a.IsDiskEncrypted) - delete(rawMsg, key) - case "isDiskKeyEncrypted": - err = unpopulate(val, "IsDiskKeyEncrypted", &a.IsDiskKeyEncrypted) - delete(rawMsg, key) - case "kekKeyVaultArmId": - err = unpopulate(val, "KekKeyVaultArmID", &a.KekKeyVaultArmID) - delete(rawMsg, key) - case "keyIdentifier": - err = unpopulate(val, "KeyIdentifier", &a.KeyIdentifier) - delete(rawMsg, key) - case "monitoringJobType": - err = unpopulate(val, "MonitoringJobType", &a.MonitoringJobType) - delete(rawMsg, key) - case "monitoringPercentageCompletion": - err = unpopulate(val, "MonitoringPercentageCompletion", &a.MonitoringPercentageCompletion) - delete(rawMsg, key) - case "primaryDiskAzureStorageAccountId": - err = unpopulate(val, "PrimaryDiskAzureStorageAccountID", &a.PrimaryDiskAzureStorageAccountID) - delete(rawMsg, key) - case "primaryStagingAzureStorageAccountId": - err = unpopulate(val, "PrimaryStagingAzureStorageAccountID", &a.PrimaryStagingAzureStorageAccountID) - delete(rawMsg, key) - case "recoveryAzureStorageAccountId": - err = unpopulate(val, "RecoveryAzureStorageAccountID", &a.RecoveryAzureStorageAccountID) - delete(rawMsg, key) - case "recoveryDiskUri": - err = unpopulate(val, "RecoveryDiskURI", &a.RecoveryDiskURI) - delete(rawMsg, key) - case "resyncRequired": - err = unpopulate(val, "ResyncRequired", &a.ResyncRequired) - delete(rawMsg, key) - case "secretIdentifier": - err = unpopulate(val, "SecretIdentifier", &a.SecretIdentifier) - delete(rawMsg, key) - case "tfoDiskName": - err = unpopulate(val, "TfoDiskName", &a.TfoDiskName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AProtectedManagedDiskDetails. -func (a A2AProtectedManagedDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedDiskLevelOperation", a.AllowedDiskLevelOperation) - populate(objectMap, "dataPendingAtSourceAgentInMB", a.DataPendingAtSourceAgentInMB) - populate(objectMap, "dataPendingInStagingStorageAccountInMB", a.DataPendingInStagingStorageAccountInMB) - populate(objectMap, "dekKeyVaultArmId", a.DekKeyVaultArmID) - populate(objectMap, "diskCapacityInBytes", a.DiskCapacityInBytes) - populate(objectMap, "diskId", a.DiskID) - populate(objectMap, "diskName", a.DiskName) - populate(objectMap, "diskState", a.DiskState) - populate(objectMap, "diskType", a.DiskType) - populate(objectMap, "failoverDiskName", a.FailoverDiskName) - populate(objectMap, "isDiskEncrypted", a.IsDiskEncrypted) - populate(objectMap, "isDiskKeyEncrypted", a.IsDiskKeyEncrypted) - populate(objectMap, "kekKeyVaultArmId", a.KekKeyVaultArmID) - populate(objectMap, "keyIdentifier", a.KeyIdentifier) - populate(objectMap, "monitoringJobType", a.MonitoringJobType) - populate(objectMap, "monitoringPercentageCompletion", a.MonitoringPercentageCompletion) - populate(objectMap, "primaryDiskEncryptionSetId", a.PrimaryDiskEncryptionSetID) - populate(objectMap, "primaryStagingAzureStorageAccountId", a.PrimaryStagingAzureStorageAccountID) - populate(objectMap, "recoveryDiskEncryptionSetId", a.RecoveryDiskEncryptionSetID) - populate(objectMap, "recoveryOrignalTargetDiskId", a.RecoveryOrignalTargetDiskID) - populate(objectMap, "recoveryReplicaDiskAccountType", a.RecoveryReplicaDiskAccountType) - populate(objectMap, "recoveryReplicaDiskId", a.RecoveryReplicaDiskID) - populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) - populate(objectMap, "recoveryTargetDiskAccountType", a.RecoveryTargetDiskAccountType) - populate(objectMap, "recoveryTargetDiskId", a.RecoveryTargetDiskID) - populate(objectMap, "resyncRequired", a.ResyncRequired) - populate(objectMap, "secretIdentifier", a.SecretIdentifier) - populate(objectMap, "tfoDiskName", a.TfoDiskName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectedManagedDiskDetails. -func (a *A2AProtectedManagedDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedDiskLevelOperation": - err = unpopulate(val, "AllowedDiskLevelOperation", &a.AllowedDiskLevelOperation) - delete(rawMsg, key) - case "dataPendingAtSourceAgentInMB": - err = unpopulate(val, "DataPendingAtSourceAgentInMB", &a.DataPendingAtSourceAgentInMB) - delete(rawMsg, key) - case "dataPendingInStagingStorageAccountInMB": - err = unpopulate(val, "DataPendingInStagingStorageAccountInMB", &a.DataPendingInStagingStorageAccountInMB) - delete(rawMsg, key) - case "dekKeyVaultArmId": - err = unpopulate(val, "DekKeyVaultArmID", &a.DekKeyVaultArmID) - delete(rawMsg, key) - case "diskCapacityInBytes": - err = unpopulate(val, "DiskCapacityInBytes", &a.DiskCapacityInBytes) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &a.DiskID) - delete(rawMsg, key) - case "diskName": - err = unpopulate(val, "DiskName", &a.DiskName) - delete(rawMsg, key) - case "diskState": - err = unpopulate(val, "DiskState", &a.DiskState) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &a.DiskType) - delete(rawMsg, key) - case "failoverDiskName": - err = unpopulate(val, "FailoverDiskName", &a.FailoverDiskName) - delete(rawMsg, key) - case "isDiskEncrypted": - err = unpopulate(val, "IsDiskEncrypted", &a.IsDiskEncrypted) - delete(rawMsg, key) - case "isDiskKeyEncrypted": - err = unpopulate(val, "IsDiskKeyEncrypted", &a.IsDiskKeyEncrypted) - delete(rawMsg, key) - case "kekKeyVaultArmId": - err = unpopulate(val, "KekKeyVaultArmID", &a.KekKeyVaultArmID) - delete(rawMsg, key) - case "keyIdentifier": - err = unpopulate(val, "KeyIdentifier", &a.KeyIdentifier) - delete(rawMsg, key) - case "monitoringJobType": - err = unpopulate(val, "MonitoringJobType", &a.MonitoringJobType) - delete(rawMsg, key) - case "monitoringPercentageCompletion": - err = unpopulate(val, "MonitoringPercentageCompletion", &a.MonitoringPercentageCompletion) - delete(rawMsg, key) - case "primaryDiskEncryptionSetId": - err = unpopulate(val, "PrimaryDiskEncryptionSetID", &a.PrimaryDiskEncryptionSetID) - delete(rawMsg, key) - case "primaryStagingAzureStorageAccountId": - err = unpopulate(val, "PrimaryStagingAzureStorageAccountID", &a.PrimaryStagingAzureStorageAccountID) - delete(rawMsg, key) - case "recoveryDiskEncryptionSetId": - err = unpopulate(val, "RecoveryDiskEncryptionSetID", &a.RecoveryDiskEncryptionSetID) - delete(rawMsg, key) - case "recoveryOrignalTargetDiskId": - err = unpopulate(val, "RecoveryOrignalTargetDiskID", &a.RecoveryOrignalTargetDiskID) - delete(rawMsg, key) - case "recoveryReplicaDiskAccountType": - err = unpopulate(val, "RecoveryReplicaDiskAccountType", &a.RecoveryReplicaDiskAccountType) - delete(rawMsg, key) - case "recoveryReplicaDiskId": - err = unpopulate(val, "RecoveryReplicaDiskID", &a.RecoveryReplicaDiskID) - delete(rawMsg, key) - case "recoveryResourceGroupId": - err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) - delete(rawMsg, key) - case "recoveryTargetDiskAccountType": - err = unpopulate(val, "RecoveryTargetDiskAccountType", &a.RecoveryTargetDiskAccountType) - delete(rawMsg, key) - case "recoveryTargetDiskId": - err = unpopulate(val, "RecoveryTargetDiskID", &a.RecoveryTargetDiskID) - delete(rawMsg, key) - case "resyncRequired": - err = unpopulate(val, "ResyncRequired", &a.ResyncRequired) - delete(rawMsg, key) - case "secretIdentifier": - err = unpopulate(val, "SecretIdentifier", &a.SecretIdentifier) - delete(rawMsg, key) - case "tfoDiskName": - err = unpopulate(val, "TfoDiskName", &a.TfoDiskName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AProtectionContainerMappingDetails. -func (a A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentAutoUpdateStatus", a.AgentAutoUpdateStatus) - populate(objectMap, "automationAccountArmId", a.AutomationAccountArmID) - populate(objectMap, "automationAccountAuthenticationType", a.AutomationAccountAuthenticationType) - objectMap["instanceType"] = "A2A" - populate(objectMap, "jobScheduleName", a.JobScheduleName) - populate(objectMap, "scheduleName", a.ScheduleName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectionContainerMappingDetails. -func (a *A2AProtectionContainerMappingDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentAutoUpdateStatus": - err = unpopulate(val, "AgentAutoUpdateStatus", &a.AgentAutoUpdateStatus) - delete(rawMsg, key) - case "automationAccountArmId": - err = unpopulate(val, "AutomationAccountArmID", &a.AutomationAccountArmID) - delete(rawMsg, key) - case "automationAccountAuthenticationType": - err = unpopulate(val, "AutomationAccountAuthenticationType", &a.AutomationAccountAuthenticationType) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "jobScheduleName": - err = unpopulate(val, "JobScheduleName", &a.JobScheduleName) - delete(rawMsg, key) - case "scheduleName": - err = unpopulate(val, "ScheduleName", &a.ScheduleName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AProtectionIntentDiskInputDetails. -func (a A2AProtectionIntentDiskInputDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskUri", a.DiskURI) - populate(objectMap, "primaryStagingStorageAccountCustomInput", a.PrimaryStagingStorageAccountCustomInput) - populate(objectMap, "recoveryAzureStorageAccountCustomInput", a.RecoveryAzureStorageAccountCustomInput) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectionIntentDiskInputDetails. -func (a *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskUri": - err = unpopulate(val, "DiskURI", &a.DiskURI) - delete(rawMsg, key) - case "primaryStagingStorageAccountCustomInput": - a.PrimaryStagingStorageAccountCustomInput, err = unmarshalStorageAccountCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryAzureStorageAccountCustomInput": - a.RecoveryAzureStorageAccountCustomInput, err = unmarshalStorageAccountCustomDetailsClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AProtectionIntentManagedDiskInputDetails. -func (a A2AProtectionIntentManagedDiskInputDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) - populate(objectMap, "diskId", a.DiskID) - populate(objectMap, "primaryStagingStorageAccountCustomInput", a.PrimaryStagingStorageAccountCustomInput) - populate(objectMap, "recoveryDiskEncryptionSetId", a.RecoveryDiskEncryptionSetID) - populate(objectMap, "recoveryReplicaDiskAccountType", a.RecoveryReplicaDiskAccountType) - populate(objectMap, "recoveryResourceGroupCustomInput", a.RecoveryResourceGroupCustomInput) - populate(objectMap, "recoveryTargetDiskAccountType", a.RecoveryTargetDiskAccountType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectionIntentManagedDiskInputDetails. -func (a *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionInfo": - err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &a.DiskID) - delete(rawMsg, key) - case "primaryStagingStorageAccountCustomInput": - a.PrimaryStagingStorageAccountCustomInput, err = unmarshalStorageAccountCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryDiskEncryptionSetId": - err = unpopulate(val, "RecoveryDiskEncryptionSetID", &a.RecoveryDiskEncryptionSetID) - delete(rawMsg, key) - case "recoveryReplicaDiskAccountType": - err = unpopulate(val, "RecoveryReplicaDiskAccountType", &a.RecoveryReplicaDiskAccountType) - delete(rawMsg, key) - case "recoveryResourceGroupCustomInput": - a.RecoveryResourceGroupCustomInput, err = unmarshalRecoveryResourceGroupCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryTargetDiskAccountType": - err = unpopulate(val, "RecoveryTargetDiskAccountType", &a.RecoveryTargetDiskAccountType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2ARecoveryPointDetails. -func (a A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disks", a.Disks) - objectMap["instanceType"] = "A2A" - populate(objectMap, "recoveryPointSyncType", a.RecoveryPointSyncType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2ARecoveryPointDetails. -func (a *A2ARecoveryPointDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disks": - err = unpopulate(val, "Disks", &a.Disks) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "recoveryPointSyncType": - err = unpopulate(val, "RecoveryPointSyncType", &a.RecoveryPointSyncType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2ARemoveDisksInput. -func (a A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "A2A" - populate(objectMap, "vmDisksUris", a.VMDisksUris) - populate(objectMap, "vmManagedDisksIds", a.VMManagedDisksIDs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2ARemoveDisksInput. -func (a *A2ARemoveDisksInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "vmDisksUris": - err = unpopulate(val, "VMDisksUris", &a.VMDisksUris) - delete(rawMsg, key) - case "vmManagedDisksIds": - err = unpopulate(val, "VMManagedDisksIDs", &a.VMManagedDisksIDs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AReplicationDetails. -func (a A2AReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "agentCertificateExpiryDate", a.AgentCertificateExpiryDate) - populateTimeRFC3339(objectMap, "agentExpiryDate", a.AgentExpiryDate) - populate(objectMap, "agentVersion", a.AgentVersion) - populate(objectMap, "autoProtectionOfDataDisk", a.AutoProtectionOfDataDisk) - populate(objectMap, "fabricObjectId", a.FabricObjectID) - populate(objectMap, "initialPrimaryExtendedLocation", a.InitialPrimaryExtendedLocation) - populate(objectMap, "initialPrimaryFabricLocation", a.InitialPrimaryFabricLocation) - populate(objectMap, "initialPrimaryZone", a.InitialPrimaryZone) - populate(objectMap, "initialRecoveryExtendedLocation", a.InitialRecoveryExtendedLocation) - populate(objectMap, "initialRecoveryFabricLocation", a.InitialRecoveryFabricLocation) - populate(objectMap, "initialRecoveryZone", a.InitialRecoveryZone) - objectMap["instanceType"] = "A2A" - populate(objectMap, "isReplicationAgentCertificateUpdateRequired", a.IsReplicationAgentCertificateUpdateRequired) - populate(objectMap, "isReplicationAgentUpdateRequired", a.IsReplicationAgentUpdateRequired) - populateTimeRFC3339(objectMap, "lastHeartbeat", a.LastHeartbeat) - populateTimeRFC3339(objectMap, "lastRpoCalculatedTime", a.LastRpoCalculatedTime) - populate(objectMap, "lifecycleId", a.LifecycleID) - populate(objectMap, "managementId", a.ManagementID) - populate(objectMap, "monitoringJobType", a.MonitoringJobType) - populate(objectMap, "monitoringPercentageCompletion", a.MonitoringPercentageCompletion) - populate(objectMap, "multiVmGroupCreateOption", a.MultiVMGroupCreateOption) - populate(objectMap, "multiVmGroupId", a.MultiVMGroupID) - populate(objectMap, "multiVmGroupName", a.MultiVMGroupName) - populate(objectMap, "osType", a.OSType) - populate(objectMap, "primaryAvailabilityZone", a.PrimaryAvailabilityZone) - populate(objectMap, "primaryExtendedLocation", a.PrimaryExtendedLocation) - populate(objectMap, "primaryFabricLocation", a.PrimaryFabricLocation) - populate(objectMap, "protectedDisks", a.ProtectedDisks) - populate(objectMap, "protectedManagedDisks", a.ProtectedManagedDisks) - populate(objectMap, "recoveryAvailabilitySet", a.RecoveryAvailabilitySet) - populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) - populate(objectMap, "recoveryAzureGeneration", a.RecoveryAzureGeneration) - populate(objectMap, "recoveryAzureResourceGroupId", a.RecoveryAzureResourceGroupID) - populate(objectMap, "recoveryAzureVMName", a.RecoveryAzureVMName) - populate(objectMap, "recoveryAzureVMSize", a.RecoveryAzureVMSize) - populate(objectMap, "recoveryBootDiagStorageAccountId", a.RecoveryBootDiagStorageAccountID) - populate(objectMap, "recoveryCapacityReservationGroupId", a.RecoveryCapacityReservationGroupID) - populate(objectMap, "recoveryCloudService", a.RecoveryCloudService) - populate(objectMap, "recoveryExtendedLocation", a.RecoveryExtendedLocation) - populate(objectMap, "recoveryFabricLocation", a.RecoveryFabricLocation) - populate(objectMap, "recoveryFabricObjectId", a.RecoveryFabricObjectID) - populate(objectMap, "recoveryProximityPlacementGroupId", a.RecoveryProximityPlacementGroupID) - populate(objectMap, "recoveryVirtualMachineScaleSetId", a.RecoveryVirtualMachineScaleSetID) - populate(objectMap, "rpoInSeconds", a.RpoInSeconds) - populate(objectMap, "selectedRecoveryAzureNetworkId", a.SelectedRecoveryAzureNetworkID) - populate(objectMap, "selectedTfoAzureNetworkId", a.SelectedTfoAzureNetworkID) - populate(objectMap, "testFailoverRecoveryFabricObjectId", a.TestFailoverRecoveryFabricObjectID) - populate(objectMap, "tfoAzureVMName", a.TfoAzureVMName) - populate(objectMap, "unprotectedDisks", a.UnprotectedDisks) - populate(objectMap, "vmEncryptionType", a.VMEncryptionType) - populate(objectMap, "vmNics", a.VMNics) - populate(objectMap, "vmProtectionState", a.VMProtectionState) - populate(objectMap, "vmProtectionStateDescription", a.VMProtectionStateDescription) - populate(objectMap, "vmSyncedConfigDetails", a.VMSyncedConfigDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AReplicationDetails. -func (a *A2AReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentCertificateExpiryDate": - err = unpopulateTimeRFC3339(val, "AgentCertificateExpiryDate", &a.AgentCertificateExpiryDate) - delete(rawMsg, key) - case "agentExpiryDate": - err = unpopulateTimeRFC3339(val, "AgentExpiryDate", &a.AgentExpiryDate) - delete(rawMsg, key) - case "agentVersion": - err = unpopulate(val, "AgentVersion", &a.AgentVersion) - delete(rawMsg, key) - case "autoProtectionOfDataDisk": - err = unpopulate(val, "AutoProtectionOfDataDisk", &a.AutoProtectionOfDataDisk) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) - delete(rawMsg, key) - case "initialPrimaryExtendedLocation": - err = unpopulate(val, "InitialPrimaryExtendedLocation", &a.InitialPrimaryExtendedLocation) - delete(rawMsg, key) - case "initialPrimaryFabricLocation": - err = unpopulate(val, "InitialPrimaryFabricLocation", &a.InitialPrimaryFabricLocation) - delete(rawMsg, key) - case "initialPrimaryZone": - err = unpopulate(val, "InitialPrimaryZone", &a.InitialPrimaryZone) - delete(rawMsg, key) - case "initialRecoveryExtendedLocation": - err = unpopulate(val, "InitialRecoveryExtendedLocation", &a.InitialRecoveryExtendedLocation) - delete(rawMsg, key) - case "initialRecoveryFabricLocation": - err = unpopulate(val, "InitialRecoveryFabricLocation", &a.InitialRecoveryFabricLocation) - delete(rawMsg, key) - case "initialRecoveryZone": - err = unpopulate(val, "InitialRecoveryZone", &a.InitialRecoveryZone) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "isReplicationAgentCertificateUpdateRequired": - err = unpopulate(val, "IsReplicationAgentCertificateUpdateRequired", &a.IsReplicationAgentCertificateUpdateRequired) - delete(rawMsg, key) - case "isReplicationAgentUpdateRequired": - err = unpopulate(val, "IsReplicationAgentUpdateRequired", &a.IsReplicationAgentUpdateRequired) - delete(rawMsg, key) - case "lastHeartbeat": - err = unpopulateTimeRFC3339(val, "LastHeartbeat", &a.LastHeartbeat) - delete(rawMsg, key) - case "lastRpoCalculatedTime": - err = unpopulateTimeRFC3339(val, "LastRpoCalculatedTime", &a.LastRpoCalculatedTime) - delete(rawMsg, key) - case "lifecycleId": - err = unpopulate(val, "LifecycleID", &a.LifecycleID) - delete(rawMsg, key) - case "managementId": - err = unpopulate(val, "ManagementID", &a.ManagementID) - delete(rawMsg, key) - case "monitoringJobType": - err = unpopulate(val, "MonitoringJobType", &a.MonitoringJobType) - delete(rawMsg, key) - case "monitoringPercentageCompletion": - err = unpopulate(val, "MonitoringPercentageCompletion", &a.MonitoringPercentageCompletion) - delete(rawMsg, key) - case "multiVmGroupCreateOption": - err = unpopulate(val, "MultiVMGroupCreateOption", &a.MultiVMGroupCreateOption) - delete(rawMsg, key) - case "multiVmGroupId": - err = unpopulate(val, "MultiVMGroupID", &a.MultiVMGroupID) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &a.MultiVMGroupName) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &a.OSType) - delete(rawMsg, key) - case "primaryAvailabilityZone": - err = unpopulate(val, "PrimaryAvailabilityZone", &a.PrimaryAvailabilityZone) - delete(rawMsg, key) - case "primaryExtendedLocation": - err = unpopulate(val, "PrimaryExtendedLocation", &a.PrimaryExtendedLocation) - delete(rawMsg, key) - case "primaryFabricLocation": - err = unpopulate(val, "PrimaryFabricLocation", &a.PrimaryFabricLocation) - delete(rawMsg, key) - case "protectedDisks": - err = unpopulate(val, "ProtectedDisks", &a.ProtectedDisks) - delete(rawMsg, key) - case "protectedManagedDisks": - err = unpopulate(val, "ProtectedManagedDisks", &a.ProtectedManagedDisks) - delete(rawMsg, key) - case "recoveryAvailabilitySet": - err = unpopulate(val, "RecoveryAvailabilitySet", &a.RecoveryAvailabilitySet) - delete(rawMsg, key) - case "recoveryAvailabilityZone": - err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) - delete(rawMsg, key) - case "recoveryAzureGeneration": - err = unpopulate(val, "RecoveryAzureGeneration", &a.RecoveryAzureGeneration) - delete(rawMsg, key) - case "recoveryAzureResourceGroupId": - err = unpopulate(val, "RecoveryAzureResourceGroupID", &a.RecoveryAzureResourceGroupID) - delete(rawMsg, key) - case "recoveryAzureVMName": - err = unpopulate(val, "RecoveryAzureVMName", &a.RecoveryAzureVMName) - delete(rawMsg, key) - case "recoveryAzureVMSize": - err = unpopulate(val, "RecoveryAzureVMSize", &a.RecoveryAzureVMSize) - delete(rawMsg, key) - case "recoveryBootDiagStorageAccountId": - err = unpopulate(val, "RecoveryBootDiagStorageAccountID", &a.RecoveryBootDiagStorageAccountID) - delete(rawMsg, key) - case "recoveryCapacityReservationGroupId": - err = unpopulate(val, "RecoveryCapacityReservationGroupID", &a.RecoveryCapacityReservationGroupID) - delete(rawMsg, key) - case "recoveryCloudService": - err = unpopulate(val, "RecoveryCloudService", &a.RecoveryCloudService) - delete(rawMsg, key) - case "recoveryExtendedLocation": - err = unpopulate(val, "RecoveryExtendedLocation", &a.RecoveryExtendedLocation) - delete(rawMsg, key) - case "recoveryFabricLocation": - err = unpopulate(val, "RecoveryFabricLocation", &a.RecoveryFabricLocation) - delete(rawMsg, key) - case "recoveryFabricObjectId": - err = unpopulate(val, "RecoveryFabricObjectID", &a.RecoveryFabricObjectID) - delete(rawMsg, key) - case "recoveryProximityPlacementGroupId": - err = unpopulate(val, "RecoveryProximityPlacementGroupID", &a.RecoveryProximityPlacementGroupID) - delete(rawMsg, key) - case "recoveryVirtualMachineScaleSetId": - err = unpopulate(val, "RecoveryVirtualMachineScaleSetID", &a.RecoveryVirtualMachineScaleSetID) - delete(rawMsg, key) - case "rpoInSeconds": - err = unpopulate(val, "RpoInSeconds", &a.RpoInSeconds) - delete(rawMsg, key) - case "selectedRecoveryAzureNetworkId": - err = unpopulate(val, "SelectedRecoveryAzureNetworkID", &a.SelectedRecoveryAzureNetworkID) - delete(rawMsg, key) - case "selectedTfoAzureNetworkId": - err = unpopulate(val, "SelectedTfoAzureNetworkID", &a.SelectedTfoAzureNetworkID) - delete(rawMsg, key) - case "testFailoverRecoveryFabricObjectId": - err = unpopulate(val, "TestFailoverRecoveryFabricObjectID", &a.TestFailoverRecoveryFabricObjectID) - delete(rawMsg, key) - case "tfoAzureVMName": - err = unpopulate(val, "TfoAzureVMName", &a.TfoAzureVMName) - delete(rawMsg, key) - case "unprotectedDisks": - err = unpopulate(val, "UnprotectedDisks", &a.UnprotectedDisks) - delete(rawMsg, key) - case "vmEncryptionType": - err = unpopulate(val, "VMEncryptionType", &a.VMEncryptionType) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &a.VMNics) - delete(rawMsg, key) - case "vmProtectionState": - err = unpopulate(val, "VMProtectionState", &a.VMProtectionState) - delete(rawMsg, key) - case "vmProtectionStateDescription": - err = unpopulate(val, "VMProtectionStateDescription", &a.VMProtectionStateDescription) - delete(rawMsg, key) - case "vmSyncedConfigDetails": - err = unpopulate(val, "VMSyncedConfigDetails", &a.VMSyncedConfigDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AReplicationIntentDetails. -func (a A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentAutoUpdateStatus", a.AgentAutoUpdateStatus) - populate(objectMap, "autoProtectionOfDataDisk", a.AutoProtectionOfDataDisk) - populate(objectMap, "automationAccountArmId", a.AutomationAccountArmID) - populate(objectMap, "automationAccountAuthenticationType", a.AutomationAccountAuthenticationType) - populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) - populate(objectMap, "fabricObjectId", a.FabricObjectID) - objectMap["instanceType"] = "A2A" - populate(objectMap, "multiVmGroupId", a.MultiVMGroupID) - populate(objectMap, "multiVmGroupName", a.MultiVMGroupName) - populate(objectMap, "primaryLocation", a.PrimaryLocation) - populate(objectMap, "primaryStagingStorageAccount", a.PrimaryStagingStorageAccount) - populate(objectMap, "protectionProfile", a.ProtectionProfile) - populate(objectMap, "recoveryAvailabilitySet", a.RecoveryAvailabilitySet) - populate(objectMap, "recoveryAvailabilityType", a.RecoveryAvailabilityType) - populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) - populate(objectMap, "recoveryBootDiagStorageAccount", a.RecoveryBootDiagStorageAccount) - populate(objectMap, "recoveryLocation", a.RecoveryLocation) - populate(objectMap, "recoveryProximityPlacementGroup", a.RecoveryProximityPlacementGroup) - populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) - populate(objectMap, "recoverySubscriptionId", a.RecoverySubscriptionID) - populate(objectMap, "recoveryVirtualNetwork", a.RecoveryVirtualNetwork) - populate(objectMap, "vmDisks", a.VMDisks) - populate(objectMap, "vmManagedDisks", a.VMManagedDisks) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AReplicationIntentDetails. -func (a *A2AReplicationIntentDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentAutoUpdateStatus": - err = unpopulate(val, "AgentAutoUpdateStatus", &a.AgentAutoUpdateStatus) - delete(rawMsg, key) - case "autoProtectionOfDataDisk": - err = unpopulate(val, "AutoProtectionOfDataDisk", &a.AutoProtectionOfDataDisk) - delete(rawMsg, key) - case "automationAccountArmId": - err = unpopulate(val, "AutomationAccountArmID", &a.AutomationAccountArmID) - delete(rawMsg, key) - case "automationAccountAuthenticationType": - err = unpopulate(val, "AutomationAccountAuthenticationType", &a.AutomationAccountAuthenticationType) - delete(rawMsg, key) - case "diskEncryptionInfo": - err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "multiVmGroupId": - err = unpopulate(val, "MultiVMGroupID", &a.MultiVMGroupID) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &a.MultiVMGroupName) - delete(rawMsg, key) - case "primaryLocation": - err = unpopulate(val, "PrimaryLocation", &a.PrimaryLocation) - delete(rawMsg, key) - case "primaryStagingStorageAccount": - a.PrimaryStagingStorageAccount, err = unmarshalStorageAccountCustomDetailsClassification(val) - delete(rawMsg, key) - case "protectionProfile": - a.ProtectionProfile, err = unmarshalProtectionProfileCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryAvailabilitySet": - a.RecoveryAvailabilitySet, err = unmarshalRecoveryAvailabilitySetCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryAvailabilityType": - err = unpopulate(val, "RecoveryAvailabilityType", &a.RecoveryAvailabilityType) - delete(rawMsg, key) - case "recoveryAvailabilityZone": - err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) - delete(rawMsg, key) - case "recoveryBootDiagStorageAccount": - a.RecoveryBootDiagStorageAccount, err = unmarshalStorageAccountCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryLocation": - err = unpopulate(val, "RecoveryLocation", &a.RecoveryLocation) - delete(rawMsg, key) - case "recoveryProximityPlacementGroup": - a.RecoveryProximityPlacementGroup, err = unmarshalRecoveryProximityPlacementGroupCustomDetailsClassification(val) - delete(rawMsg, key) - case "recoveryResourceGroupId": - err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) - delete(rawMsg, key) - case "recoverySubscriptionId": - err = unpopulate(val, "RecoverySubscriptionID", &a.RecoverySubscriptionID) - delete(rawMsg, key) - case "recoveryVirtualNetwork": - a.RecoveryVirtualNetwork, err = unmarshalRecoveryVirtualNetworkCustomDetailsClassification(val) - delete(rawMsg, key) - case "vmDisks": - err = unpopulate(val, "VMDisks", &a.VMDisks) - delete(rawMsg, key) - case "vmManagedDisks": - err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AReprotectInput. -func (a A2AReprotectInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "A2A" - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "recoveryAvailabilitySetId", a.RecoveryAvailabilitySetID) - populate(objectMap, "recoveryCloudServiceId", a.RecoveryCloudServiceID) - populate(objectMap, "recoveryContainerId", a.RecoveryContainerID) - populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) - populate(objectMap, "vmDisks", a.VMDisks) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AReprotectInput. -func (a *A2AReprotectInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "recoveryAvailabilitySetId": - err = unpopulate(val, "RecoveryAvailabilitySetID", &a.RecoveryAvailabilitySetID) - delete(rawMsg, key) - case "recoveryCloudServiceId": - err = unpopulate(val, "RecoveryCloudServiceID", &a.RecoveryCloudServiceID) - delete(rawMsg, key) - case "recoveryContainerId": - err = unpopulate(val, "RecoveryContainerID", &a.RecoveryContainerID) - delete(rawMsg, key) - case "recoveryResourceGroupId": - err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) - delete(rawMsg, key) - case "vmDisks": - err = unpopulate(val, "VMDisks", &a.VMDisks) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2ASwitchProtectionInput. -func (a A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) - objectMap["instanceType"] = "A2A" - populate(objectMap, "policyId", a.PolicyID) - populate(objectMap, "recoveryAvailabilitySetId", a.RecoveryAvailabilitySetID) - populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) - populate(objectMap, "recoveryBootDiagStorageAccountId", a.RecoveryBootDiagStorageAccountID) - populate(objectMap, "recoveryCapacityReservationGroupId", a.RecoveryCapacityReservationGroupID) - populate(objectMap, "recoveryCloudServiceId", a.RecoveryCloudServiceID) - populate(objectMap, "recoveryContainerId", a.RecoveryContainerID) - populate(objectMap, "recoveryProximityPlacementGroupId", a.RecoveryProximityPlacementGroupID) - populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) - populate(objectMap, "recoveryVirtualMachineScaleSetId", a.RecoveryVirtualMachineScaleSetID) - populate(objectMap, "vmDisks", a.VMDisks) - populate(objectMap, "vmManagedDisks", a.VMManagedDisks) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2ASwitchProtectionInput. -func (a *A2ASwitchProtectionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionInfo": - err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &a.PolicyID) - delete(rawMsg, key) - case "recoveryAvailabilitySetId": - err = unpopulate(val, "RecoveryAvailabilitySetID", &a.RecoveryAvailabilitySetID) - delete(rawMsg, key) - case "recoveryAvailabilityZone": - err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) - delete(rawMsg, key) - case "recoveryBootDiagStorageAccountId": - err = unpopulate(val, "RecoveryBootDiagStorageAccountID", &a.RecoveryBootDiagStorageAccountID) - delete(rawMsg, key) - case "recoveryCapacityReservationGroupId": - err = unpopulate(val, "RecoveryCapacityReservationGroupID", &a.RecoveryCapacityReservationGroupID) - delete(rawMsg, key) - case "recoveryCloudServiceId": - err = unpopulate(val, "RecoveryCloudServiceID", &a.RecoveryCloudServiceID) - delete(rawMsg, key) - case "recoveryContainerId": - err = unpopulate(val, "RecoveryContainerID", &a.RecoveryContainerID) - delete(rawMsg, key) - case "recoveryProximityPlacementGroupId": - err = unpopulate(val, "RecoveryProximityPlacementGroupID", &a.RecoveryProximityPlacementGroupID) - delete(rawMsg, key) - case "recoveryResourceGroupId": - err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) - delete(rawMsg, key) - case "recoveryVirtualMachineScaleSetId": - err = unpopulate(val, "RecoveryVirtualMachineScaleSetID", &a.RecoveryVirtualMachineScaleSetID) - delete(rawMsg, key) - case "vmDisks": - err = unpopulate(val, "VMDisks", &a.VMDisks) - delete(rawMsg, key) - case "vmManagedDisks": - err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2ATestFailoverInput. -func (a A2ATestFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cloudServiceCreationOption", a.CloudServiceCreationOption) - objectMap["instanceType"] = "A2A" - populate(objectMap, "recoveryPointId", a.RecoveryPointID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2ATestFailoverInput. -func (a *A2ATestFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cloudServiceCreationOption": - err = unpopulate(val, "CloudServiceCreationOption", &a.CloudServiceCreationOption) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AUnplannedFailoverInput. -func (a A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cloudServiceCreationOption", a.CloudServiceCreationOption) - objectMap["instanceType"] = "A2A" - populate(objectMap, "recoveryPointId", a.RecoveryPointID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AUnplannedFailoverInput. -func (a *A2AUnplannedFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cloudServiceCreationOption": - err = unpopulate(val, "CloudServiceCreationOption", &a.CloudServiceCreationOption) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AUnprotectedDiskDetails. -func (a A2AUnprotectedDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskAutoProtectionStatus", a.DiskAutoProtectionStatus) - populate(objectMap, "diskLunId", a.DiskLunID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AUnprotectedDiskDetails. -func (a *A2AUnprotectedDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskAutoProtectionStatus": - err = unpopulate(val, "DiskAutoProtectionStatus", &a.DiskAutoProtectionStatus) - delete(rawMsg, key) - case "diskLunId": - err = unpopulate(val, "DiskLunID", &a.DiskLunID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AUpdateContainerMappingInput. -func (a A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentAutoUpdateStatus", a.AgentAutoUpdateStatus) - populate(objectMap, "automationAccountArmId", a.AutomationAccountArmID) - populate(objectMap, "automationAccountAuthenticationType", a.AutomationAccountAuthenticationType) - objectMap["instanceType"] = "A2A" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AUpdateContainerMappingInput. -func (a *A2AUpdateContainerMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentAutoUpdateStatus": - err = unpopulate(val, "AgentAutoUpdateStatus", &a.AgentAutoUpdateStatus) - delete(rawMsg, key) - case "automationAccountArmId": - err = unpopulate(val, "AutomationAccountArmID", &a.AutomationAccountArmID) - delete(rawMsg, key) - case "automationAccountAuthenticationType": - err = unpopulate(val, "AutomationAccountAuthenticationType", &a.AutomationAccountAuthenticationType) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AUpdateReplicationProtectedItemInput. -func (a A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) - objectMap["instanceType"] = "A2A" - populate(objectMap, "managedDiskUpdateDetails", a.ManagedDiskUpdateDetails) - populate(objectMap, "recoveryBootDiagStorageAccountId", a.RecoveryBootDiagStorageAccountID) - populate(objectMap, "recoveryCapacityReservationGroupId", a.RecoveryCapacityReservationGroupID) - populate(objectMap, "recoveryCloudServiceId", a.RecoveryCloudServiceID) - populate(objectMap, "recoveryProximityPlacementGroupId", a.RecoveryProximityPlacementGroupID) - populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) - populate(objectMap, "recoveryVirtualMachineScaleSetId", a.RecoveryVirtualMachineScaleSetID) - populate(objectMap, "tfoAzureVMName", a.TfoAzureVMName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AUpdateReplicationProtectedItemInput. -func (a *A2AUpdateReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionInfo": - err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "managedDiskUpdateDetails": - err = unpopulate(val, "ManagedDiskUpdateDetails", &a.ManagedDiskUpdateDetails) - delete(rawMsg, key) - case "recoveryBootDiagStorageAccountId": - err = unpopulate(val, "RecoveryBootDiagStorageAccountID", &a.RecoveryBootDiagStorageAccountID) - delete(rawMsg, key) - case "recoveryCapacityReservationGroupId": - err = unpopulate(val, "RecoveryCapacityReservationGroupID", &a.RecoveryCapacityReservationGroupID) - delete(rawMsg, key) - case "recoveryCloudServiceId": - err = unpopulate(val, "RecoveryCloudServiceID", &a.RecoveryCloudServiceID) - delete(rawMsg, key) - case "recoveryProximityPlacementGroupId": - err = unpopulate(val, "RecoveryProximityPlacementGroupID", &a.RecoveryProximityPlacementGroupID) - delete(rawMsg, key) - case "recoveryResourceGroupId": - err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) - delete(rawMsg, key) - case "recoveryVirtualMachineScaleSetId": - err = unpopulate(val, "RecoveryVirtualMachineScaleSetID", &a.RecoveryVirtualMachineScaleSetID) - delete(rawMsg, key) - case "tfoAzureVMName": - err = unpopulate(val, "TfoAzureVMName", &a.TfoAzureVMName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AVMDiskInputDetails. -func (a A2AVMDiskInputDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskUri", a.DiskURI) - populate(objectMap, "primaryStagingAzureStorageAccountId", a.PrimaryStagingAzureStorageAccountID) - populate(objectMap, "recoveryAzureStorageAccountId", a.RecoveryAzureStorageAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AVMDiskInputDetails. -func (a *A2AVMDiskInputDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskUri": - err = unpopulate(val, "DiskURI", &a.DiskURI) - delete(rawMsg, key) - case "primaryStagingAzureStorageAccountId": - err = unpopulate(val, "PrimaryStagingAzureStorageAccountID", &a.PrimaryStagingAzureStorageAccountID) - delete(rawMsg, key) - case "recoveryAzureStorageAccountId": - err = unpopulate(val, "RecoveryAzureStorageAccountID", &a.RecoveryAzureStorageAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AVMManagedDiskInputDetails. -func (a A2AVMManagedDiskInputDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) - populate(objectMap, "diskId", a.DiskID) - populate(objectMap, "primaryStagingAzureStorageAccountId", a.PrimaryStagingAzureStorageAccountID) - populate(objectMap, "recoveryDiskEncryptionSetId", a.RecoveryDiskEncryptionSetID) - populate(objectMap, "recoveryReplicaDiskAccountType", a.RecoveryReplicaDiskAccountType) - populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) - populate(objectMap, "recoveryTargetDiskAccountType", a.RecoveryTargetDiskAccountType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AVMManagedDiskInputDetails. -func (a *A2AVMManagedDiskInputDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionInfo": - err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &a.DiskID) - delete(rawMsg, key) - case "primaryStagingAzureStorageAccountId": - err = unpopulate(val, "PrimaryStagingAzureStorageAccountID", &a.PrimaryStagingAzureStorageAccountID) - delete(rawMsg, key) - case "recoveryDiskEncryptionSetId": - err = unpopulate(val, "RecoveryDiskEncryptionSetID", &a.RecoveryDiskEncryptionSetID) - delete(rawMsg, key) - case "recoveryReplicaDiskAccountType": - err = unpopulate(val, "RecoveryReplicaDiskAccountType", &a.RecoveryReplicaDiskAccountType) - delete(rawMsg, key) - case "recoveryResourceGroupId": - err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) - delete(rawMsg, key) - case "recoveryTargetDiskAccountType": - err = unpopulate(val, "RecoveryTargetDiskAccountType", &a.RecoveryTargetDiskAccountType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AVMManagedDiskUpdateDetails. -func (a A2AVMManagedDiskUpdateDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) - populate(objectMap, "diskId", a.DiskID) - populate(objectMap, "failoverDiskName", a.FailoverDiskName) - populate(objectMap, "recoveryReplicaDiskAccountType", a.RecoveryReplicaDiskAccountType) - populate(objectMap, "recoveryTargetDiskAccountType", a.RecoveryTargetDiskAccountType) - populate(objectMap, "tfoDiskName", a.TfoDiskName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AVMManagedDiskUpdateDetails. -func (a *A2AVMManagedDiskUpdateDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionInfo": - err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &a.DiskID) - delete(rawMsg, key) - case "failoverDiskName": - err = unpopulate(val, "FailoverDiskName", &a.FailoverDiskName) - delete(rawMsg, key) - case "recoveryReplicaDiskAccountType": - err = unpopulate(val, "RecoveryReplicaDiskAccountType", &a.RecoveryReplicaDiskAccountType) - delete(rawMsg, key) - case "recoveryTargetDiskAccountType": - err = unpopulate(val, "RecoveryTargetDiskAccountType", &a.RecoveryTargetDiskAccountType) - delete(rawMsg, key) - case "tfoDiskName": - err = unpopulate(val, "TfoDiskName", &a.TfoDiskName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type A2AZoneDetails. -func (a A2AZoneDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "source", a.Source) - populate(objectMap, "target", a.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type A2AZoneDetails. -func (a *A2AZoneDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "source": - err = unpopulate(val, "Source", &a.Source) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &a.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ASRTask. -func (a ASRTask) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedActions", a.AllowedActions) - populate(objectMap, "customDetails", a.CustomDetails) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "errors", a.Errors) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "groupTaskCustomDetails", a.GroupTaskCustomDetails) - populate(objectMap, "name", a.Name) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - populate(objectMap, "state", a.State) - populate(objectMap, "stateDescription", a.StateDescription) - populate(objectMap, "taskId", a.TaskID) - populate(objectMap, "taskType", a.TaskType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ASRTask. -func (a *ASRTask) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedActions": - err = unpopulate(val, "AllowedActions", &a.AllowedActions) - delete(rawMsg, key) - case "customDetails": - a.CustomDetails, err = unmarshalTaskTypeDetailsClassification(val) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) - delete(rawMsg, key) - case "errors": - err = unpopulate(val, "Errors", &a.Errors) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "groupTaskCustomDetails": - a.GroupTaskCustomDetails, err = unmarshalGroupTaskDetailsClassification(val) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &a.State) - delete(rawMsg, key) - case "stateDescription": - err = unpopulate(val, "StateDescription", &a.StateDescription) - delete(rawMsg, key) - case "taskId": - err = unpopulate(val, "TaskID", &a.TaskID) - delete(rawMsg, key) - case "taskType": - err = unpopulate(val, "TaskType", &a.TaskType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AddDisksInput. -func (a AddDisksInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AddDisksInput. -func (a *AddDisksInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AddDisksInputProperties. -func (a AddDisksInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", a.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AddDisksInputProperties. -func (a *AddDisksInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - a.ProviderSpecificDetails, err = unmarshalAddDisksProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AddDisksProviderSpecificInput. -func (a AddDisksProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = a.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AddDisksProviderSpecificInput. -func (a *AddDisksProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AddRecoveryServicesProviderInput. -func (a AddRecoveryServicesProviderInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AddRecoveryServicesProviderInput. -func (a *AddRecoveryServicesProviderInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AddRecoveryServicesProviderInputProperties. -func (a AddRecoveryServicesProviderInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authenticationIdentityInput", a.AuthenticationIdentityInput) - populate(objectMap, "biosId", a.BiosID) - populate(objectMap, "dataPlaneAuthenticationIdentityInput", a.DataPlaneAuthenticationIdentityInput) - populate(objectMap, "machineId", a.MachineID) - populate(objectMap, "machineName", a.MachineName) - populate(objectMap, "resourceAccessIdentityInput", a.ResourceAccessIdentityInput) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AddRecoveryServicesProviderInputProperties. -func (a *AddRecoveryServicesProviderInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authenticationIdentityInput": - err = unpopulate(val, "AuthenticationIdentityInput", &a.AuthenticationIdentityInput) - delete(rawMsg, key) - case "biosId": - err = unpopulate(val, "BiosID", &a.BiosID) - delete(rawMsg, key) - case "dataPlaneAuthenticationIdentityInput": - err = unpopulate(val, "DataPlaneAuthenticationIdentityInput", &a.DataPlaneAuthenticationIdentityInput) - delete(rawMsg, key) - case "machineId": - err = unpopulate(val, "MachineID", &a.MachineID) - delete(rawMsg, key) - case "machineName": - err = unpopulate(val, "MachineName", &a.MachineName) - delete(rawMsg, key) - case "resourceAccessIdentityInput": - err = unpopulate(val, "ResourceAccessIdentityInput", &a.ResourceAccessIdentityInput) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AddVCenterRequest. -func (a AddVCenterRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AddVCenterRequest. -func (a *AddVCenterRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AddVCenterRequestProperties. -func (a AddVCenterRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "friendlyName", a.FriendlyName) - populate(objectMap, "ipAddress", a.IPAddress) - populate(objectMap, "port", a.Port) - populate(objectMap, "processServerId", a.ProcessServerID) - populate(objectMap, "runAsAccountId", a.RunAsAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AddVCenterRequestProperties. -func (a *AddVCenterRequestProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "friendlyName": - err = unpopulate(val, "FriendlyName", &a.FriendlyName) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &a.IPAddress) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &a.Port) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &a.ProcessServerID) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &a.RunAsAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AgentDetails. -func (a AgentDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentId", a.AgentID) - populate(objectMap, "biosId", a.BiosID) - populate(objectMap, "disks", a.Disks) - populate(objectMap, "fqdn", a.Fqdn) - populate(objectMap, "machineId", a.MachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentDetails. -func (a *AgentDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentId": - err = unpopulate(val, "AgentID", &a.AgentID) - delete(rawMsg, key) - case "biosId": - err = unpopulate(val, "BiosID", &a.BiosID) - delete(rawMsg, key) - case "disks": - err = unpopulate(val, "Disks", &a.Disks) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &a.Fqdn) - delete(rawMsg, key) - case "machineId": - err = unpopulate(val, "MachineID", &a.MachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AgentDiskDetails. -func (a AgentDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capacityInBytes", a.CapacityInBytes) - populate(objectMap, "diskId", a.DiskID) - populate(objectMap, "diskName", a.DiskName) - populate(objectMap, "isOSDisk", a.IsOSDisk) - populate(objectMap, "lunId", a.LunID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentDiskDetails. -func (a *AgentDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacityInBytes": - err = unpopulate(val, "CapacityInBytes", &a.CapacityInBytes) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &a.DiskID) - delete(rawMsg, key) - case "diskName": - err = unpopulate(val, "DiskName", &a.DiskName) - delete(rawMsg, key) - case "isOSDisk": - err = unpopulate(val, "IsOSDisk", &a.IsOSDisk) - delete(rawMsg, key) - case "lunId": - err = unpopulate(val, "LunID", &a.LunID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Alert. -func (a Alert) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Alert. -func (a *Alert) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AlertCollection. -func (a AlertCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AlertCollection. -func (a *AlertCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AlertProperties. -func (a AlertProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customEmailAddresses", a.CustomEmailAddresses) - populate(objectMap, "locale", a.Locale) - populate(objectMap, "sendToOwners", a.SendToOwners) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AlertProperties. -func (a *AlertProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customEmailAddresses": - err = unpopulate(val, "CustomEmailAddresses", &a.CustomEmailAddresses) - delete(rawMsg, key) - case "locale": - err = unpopulate(val, "Locale", &a.Locale) - delete(rawMsg, key) - case "sendToOwners": - err = unpopulate(val, "SendToOwners", &a.SendToOwners) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplianceCollection. -func (a ApplianceCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceCollection. -func (a *ApplianceCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplianceQueryParameter. -func (a ApplianceQueryParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerType", a.ProviderType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceQueryParameter. -func (a *ApplianceQueryParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerType": - err = unpopulate(val, "ProviderType", &a.ProviderType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplianceSpecificDetails. -func (a ApplianceSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = a.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceSpecificDetails. -func (a *ApplianceSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplyRecoveryPointInput. -func (a ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplyRecoveryPointInput. -func (a *ApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplyRecoveryPointInputProperties. -func (a ApplyRecoveryPointInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", a.ProviderSpecificDetails) - populate(objectMap, "recoveryPointId", a.RecoveryPointID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplyRecoveryPointInputProperties. -func (a *ApplyRecoveryPointInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - a.ProviderSpecificDetails, err = unmarshalApplyRecoveryPointProviderSpecificInputClassification(val) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ApplyRecoveryPointProviderSpecificInput. -func (a ApplyRecoveryPointProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = a.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplyRecoveryPointProviderSpecificInput. -func (a *ApplyRecoveryPointProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AsrJobDetails. -func (a AsrJobDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedObjectDetails", a.AffectedObjectDetails) - objectMap["instanceType"] = "AsrJobDetails" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AsrJobDetails. -func (a *AsrJobDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedObjectDetails": - err = unpopulate(val, "AffectedObjectDetails", &a.AffectedObjectDetails) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AutomationRunbookTaskDetails. -func (a AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accountName", a.AccountName) - populate(objectMap, "cloudServiceName", a.CloudServiceName) - objectMap["instanceType"] = "AutomationRunbookTaskDetails" - populate(objectMap, "isPrimarySideScript", a.IsPrimarySideScript) - populate(objectMap, "jobId", a.JobID) - populate(objectMap, "jobOutput", a.JobOutput) - populate(objectMap, "name", a.Name) - populate(objectMap, "runbookId", a.RunbookID) - populate(objectMap, "runbookName", a.RunbookName) - populate(objectMap, "subscriptionId", a.SubscriptionID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AutomationRunbookTaskDetails. -func (a *AutomationRunbookTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accountName": - err = unpopulate(val, "AccountName", &a.AccountName) - delete(rawMsg, key) - case "cloudServiceName": - err = unpopulate(val, "CloudServiceName", &a.CloudServiceName) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "isPrimarySideScript": - err = unpopulate(val, "IsPrimarySideScript", &a.IsPrimarySideScript) - delete(rawMsg, key) - case "jobId": - err = unpopulate(val, "JobID", &a.JobID) - delete(rawMsg, key) - case "jobOutput": - err = unpopulate(val, "JobOutput", &a.JobOutput) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "runbookId": - err = unpopulate(val, "RunbookID", &a.RunbookID) - delete(rawMsg, key) - case "runbookName": - err = unpopulate(val, "RunbookName", &a.RunbookName) - delete(rawMsg, key) - case "subscriptionId": - err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFabricCreationInput. -func (a AzureFabricCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "Azure" - populate(objectMap, "location", a.Location) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFabricCreationInput. -func (a *AzureFabricCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFabricSpecificDetails. -func (a AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerIds", a.ContainerIDs) - populate(objectMap, "extendedLocations", a.ExtendedLocations) - objectMap["instanceType"] = "Azure" - populate(objectMap, "location", a.Location) - populate(objectMap, "zones", a.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFabricSpecificDetails. -func (a *AzureFabricSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containerIds": - err = unpopulate(val, "ContainerIDs", &a.ContainerIDs) - delete(rawMsg, key) - case "extendedLocations": - err = unpopulate(val, "ExtendedLocations", &a.ExtendedLocations) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &a.Zones) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureToAzureCreateNetworkMappingInput. -func (a AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "AzureToAzure" - populate(objectMap, "primaryNetworkId", a.PrimaryNetworkID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureToAzureCreateNetworkMappingInput. -func (a *AzureToAzureCreateNetworkMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "primaryNetworkId": - err = unpopulate(val, "PrimaryNetworkID", &a.PrimaryNetworkID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureToAzureNetworkMappingSettings. -func (a AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "AzureToAzure" - populate(objectMap, "primaryFabricLocation", a.PrimaryFabricLocation) - populate(objectMap, "recoveryFabricLocation", a.RecoveryFabricLocation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureToAzureNetworkMappingSettings. -func (a *AzureToAzureNetworkMappingSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "primaryFabricLocation": - err = unpopulate(val, "PrimaryFabricLocation", &a.PrimaryFabricLocation) - delete(rawMsg, key) - case "recoveryFabricLocation": - err = unpopulate(val, "RecoveryFabricLocation", &a.RecoveryFabricLocation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureToAzureUpdateNetworkMappingInput. -func (a AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "AzureToAzure" - populate(objectMap, "primaryNetworkId", a.PrimaryNetworkID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureToAzureUpdateNetworkMappingInput. -func (a *AzureToAzureUpdateNetworkMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &a.InstanceType) - delete(rawMsg, key) - case "primaryNetworkId": - err = unpopulate(val, "PrimaryNetworkID", &a.PrimaryNetworkID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureToAzureVMSyncedConfigDetails. -func (a AzureToAzureVMSyncedConfigDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "inputEndpoints", a.InputEndpoints) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureToAzureVMSyncedConfigDetails. -func (a *AzureToAzureVMSyncedConfigDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "inputEndpoints": - err = unpopulate(val, "InputEndpoints", &a.InputEndpoints) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureVMDiskDetails. -func (a AzureVMDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customTargetDiskName", a.CustomTargetDiskName) - populate(objectMap, "diskEncryptionSetId", a.DiskEncryptionSetID) - populate(objectMap, "diskId", a.DiskID) - populate(objectMap, "lunId", a.LunID) - populate(objectMap, "maxSizeMB", a.MaxSizeMB) - populate(objectMap, "targetDiskLocation", a.TargetDiskLocation) - populate(objectMap, "targetDiskName", a.TargetDiskName) - populate(objectMap, "vhdId", a.VhdID) - populate(objectMap, "vhdName", a.VhdName) - populate(objectMap, "vhdType", a.VhdType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMDiskDetails. -func (a *AzureVMDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customTargetDiskName": - err = unpopulate(val, "CustomTargetDiskName", &a.CustomTargetDiskName) - delete(rawMsg, key) - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &a.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &a.DiskID) - delete(rawMsg, key) - case "lunId": - err = unpopulate(val, "LunID", &a.LunID) - delete(rawMsg, key) - case "maxSizeMB": - err = unpopulate(val, "MaxSizeMB", &a.MaxSizeMB) - delete(rawMsg, key) - case "targetDiskLocation": - err = unpopulate(val, "TargetDiskLocation", &a.TargetDiskLocation) - delete(rawMsg, key) - case "targetDiskName": - err = unpopulate(val, "TargetDiskName", &a.TargetDiskName) - delete(rawMsg, key) - case "vhdId": - err = unpopulate(val, "VhdID", &a.VhdID) - delete(rawMsg, key) - case "vhdName": - err = unpopulate(val, "VhdName", &a.VhdName) - delete(rawMsg, key) - case "vhdType": - err = unpopulate(val, "VhdType", &a.VhdType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComputeSizeErrorDetails. -func (c ComputeSizeErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "message", c.Message) - populate(objectMap, "severity", c.Severity) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeSizeErrorDetails. -func (c *ComputeSizeErrorDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "severity": - err = unpopulate(val, "Severity", &c.Severity) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigurationSettings. -func (c ConfigurationSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = c.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationSettings. -func (c *ConfigurationSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &c.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigureAlertRequest. -func (c ConfigureAlertRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigureAlertRequest. -func (c *ConfigureAlertRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConfigureAlertRequestProperties. -func (c ConfigureAlertRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customEmailAddresses", c.CustomEmailAddresses) - populate(objectMap, "locale", c.Locale) - populate(objectMap, "sendToOwners", c.SendToOwners) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigureAlertRequestProperties. -func (c *ConfigureAlertRequestProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customEmailAddresses": - err = unpopulate(val, "CustomEmailAddresses", &c.CustomEmailAddresses) - delete(rawMsg, key) - case "locale": - err = unpopulate(val, "Locale", &c.Locale) - delete(rawMsg, key) - case "sendToOwners": - err = unpopulate(val, "SendToOwners", &c.SendToOwners) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ConsistencyCheckTaskDetails. -func (c ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "ConsistencyCheckTaskDetails" - populate(objectMap, "vmDetails", c.VMDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConsistencyCheckTaskDetails. -func (c *ConsistencyCheckTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &c.InstanceType) - delete(rawMsg, key) - case "vmDetails": - err = unpopulate(val, "VMDetails", &c.VMDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateNetworkMappingInput. -func (c CreateNetworkMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateNetworkMappingInput. -func (c *CreateNetworkMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateNetworkMappingInputProperties. -func (c CreateNetworkMappingInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricSpecificDetails", c.FabricSpecificDetails) - populate(objectMap, "recoveryFabricName", c.RecoveryFabricName) - populate(objectMap, "recoveryNetworkId", c.RecoveryNetworkID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateNetworkMappingInputProperties. -func (c *CreateNetworkMappingInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricSpecificDetails": - c.FabricSpecificDetails, err = unmarshalFabricSpecificCreateNetworkMappingInputClassification(val) - delete(rawMsg, key) - case "recoveryFabricName": - err = unpopulate(val, "RecoveryFabricName", &c.RecoveryFabricName) - delete(rawMsg, key) - case "recoveryNetworkId": - err = unpopulate(val, "RecoveryNetworkID", &c.RecoveryNetworkID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreatePolicyInput. -func (c CreatePolicyInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreatePolicyInput. -func (c *CreatePolicyInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreatePolicyInputProperties. -func (c CreatePolicyInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificInput", c.ProviderSpecificInput) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreatePolicyInputProperties. -func (c *CreatePolicyInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificInput": - c.ProviderSpecificInput, err = unmarshalPolicyProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateProtectionContainerInput. -func (c CreateProtectionContainerInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionContainerInput. -func (c *CreateProtectionContainerInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateProtectionContainerInputProperties. -func (c CreateProtectionContainerInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificInput", c.ProviderSpecificInput) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionContainerInputProperties. -func (c *CreateProtectionContainerInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificInput": - c.ProviderSpecificInput, err = unmarshalReplicationProviderSpecificContainerCreationInputClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateProtectionContainerMappingInput. -func (c CreateProtectionContainerMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionContainerMappingInput. -func (c *CreateProtectionContainerMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateProtectionContainerMappingInputProperties. -func (c CreateProtectionContainerMappingInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "policyId", c.PolicyID) - populate(objectMap, "providerSpecificInput", c.ProviderSpecificInput) - populate(objectMap, "targetProtectionContainerId", c.TargetProtectionContainerID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionContainerMappingInputProperties. -func (c *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "policyId": - err = unpopulate(val, "PolicyID", &c.PolicyID) - delete(rawMsg, key) - case "providerSpecificInput": - c.ProviderSpecificInput, err = unmarshalReplicationProviderSpecificContainerMappingInputClassification(val) - delete(rawMsg, key) - case "targetProtectionContainerId": - err = unpopulate(val, "TargetProtectionContainerID", &c.TargetProtectionContainerID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateProtectionIntentInput. -func (c CreateProtectionIntentInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionIntentInput. -func (c *CreateProtectionIntentInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateProtectionIntentProperties. -func (c CreateProtectionIntentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", c.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionIntentProperties. -func (c *CreateProtectionIntentProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - c.ProviderSpecificDetails, err = unmarshalCreateProtectionIntentProviderSpecificDetailsClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateProtectionIntentProviderSpecificDetails. -func (c CreateProtectionIntentProviderSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = c.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionIntentProviderSpecificDetails. -func (c *CreateProtectionIntentProviderSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &c.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateRecoveryPlanInput. -func (c CreateRecoveryPlanInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateRecoveryPlanInput. -func (c *CreateRecoveryPlanInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CreateRecoveryPlanInputProperties. -func (c CreateRecoveryPlanInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "failoverDeploymentModel", c.FailoverDeploymentModel) - populate(objectMap, "groups", c.Groups) - populate(objectMap, "primaryFabricId", c.PrimaryFabricID) - populate(objectMap, "providerSpecificInput", c.ProviderSpecificInput) - populate(objectMap, "recoveryFabricId", c.RecoveryFabricID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CreateRecoveryPlanInputProperties. -func (c *CreateRecoveryPlanInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failoverDeploymentModel": - err = unpopulate(val, "FailoverDeploymentModel", &c.FailoverDeploymentModel) - delete(rawMsg, key) - case "groups": - err = unpopulate(val, "Groups", &c.Groups) - delete(rawMsg, key) - case "primaryFabricId": - err = unpopulate(val, "PrimaryFabricID", &c.PrimaryFabricID) - delete(rawMsg, key) - case "providerSpecificInput": - c.ProviderSpecificInput, err = unmarshalRecoveryPlanProviderSpecificInputClassificationArray(val) - delete(rawMsg, key) - case "recoveryFabricId": - err = unpopulate(val, "RecoveryFabricID", &c.RecoveryFabricID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CriticalJobHistoryDetails. -func (c CriticalJobHistoryDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "jobId", c.JobID) - populate(objectMap, "jobName", c.JobName) - populate(objectMap, "jobStatus", c.JobStatus) - populateTimeRFC3339(objectMap, "startTime", c.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CriticalJobHistoryDetails. -func (c *CriticalJobHistoryDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobId": - err = unpopulate(val, "JobID", &c.JobID) - delete(rawMsg, key) - case "jobName": - err = unpopulate(val, "JobName", &c.JobName) - delete(rawMsg, key) - case "jobStatus": - err = unpopulate(val, "JobStatus", &c.JobStatus) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &c.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CurrentJobDetails. -func (c CurrentJobDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "jobId", c.JobID) - populate(objectMap, "jobName", c.JobName) - populateTimeRFC3339(objectMap, "startTime", c.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CurrentJobDetails. -func (c *CurrentJobDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobId": - err = unpopulate(val, "JobID", &c.JobID) - delete(rawMsg, key) - case "jobName": - err = unpopulate(val, "JobName", &c.JobName) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &c.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CurrentScenarioDetails. -func (c CurrentScenarioDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "jobId", c.JobID) - populate(objectMap, "scenarioName", c.ScenarioName) - populateTimeRFC3339(objectMap, "startTime", c.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CurrentScenarioDetails. -func (c *CurrentScenarioDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobId": - err = unpopulate(val, "JobID", &c.JobID) - delete(rawMsg, key) - case "scenarioName": - err = unpopulate(val, "ScenarioName", &c.ScenarioName) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &c.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataStore. -func (d DataStore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capacity", d.Capacity) - populate(objectMap, "freeSpace", d.FreeSpace) - populate(objectMap, "symbolicName", d.SymbolicName) - populate(objectMap, "type", d.Type) - populate(objectMap, "uuid", d.UUID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataStore. -func (d *DataStore) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacity": - err = unpopulate(val, "Capacity", &d.Capacity) - delete(rawMsg, key) - case "freeSpace": - err = unpopulate(val, "FreeSpace", &d.FreeSpace) - delete(rawMsg, key) - case "symbolicName": - err = unpopulate(val, "SymbolicName", &d.SymbolicName) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - case "uuid": - err = unpopulate(val, "UUID", &d.UUID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DisableProtectionInput. -func (d DisableProtectionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", d.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DisableProtectionInput. -func (d *DisableProtectionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DisableProtectionInputProperties. -func (d DisableProtectionInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disableProtectionReason", d.DisableProtectionReason) - populate(objectMap, "replicationProviderInput", d.ReplicationProviderInput) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DisableProtectionInputProperties. -func (d *DisableProtectionInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disableProtectionReason": - err = unpopulate(val, "DisableProtectionReason", &d.DisableProtectionReason) - delete(rawMsg, key) - case "replicationProviderInput": - d.ReplicationProviderInput, err = unmarshalDisableProtectionProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DisableProtectionProviderSpecificInput. -func (d DisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = d.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DisableProtectionProviderSpecificInput. -func (d *DisableProtectionProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &d.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiscoverProtectableItemRequest. -func (d DiscoverProtectableItemRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", d.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiscoverProtectableItemRequest. -func (d *DiscoverProtectableItemRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiscoverProtectableItemRequestProperties. -func (d DiscoverProtectableItemRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "friendlyName", d.FriendlyName) - populate(objectMap, "ipAddress", d.IPAddress) - populate(objectMap, "osType", d.OSType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiscoverProtectableItemRequestProperties. -func (d *DiscoverProtectableItemRequestProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "friendlyName": - err = unpopulate(val, "FriendlyName", &d.FriendlyName) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &d.IPAddress) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &d.OSType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiskDetails. -func (d DiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "maxSizeMB", d.MaxSizeMB) - populate(objectMap, "vhdId", d.VhdID) - populate(objectMap, "vhdName", d.VhdName) - populate(objectMap, "vhdType", d.VhdType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiskDetails. -func (d *DiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "maxSizeMB": - err = unpopulate(val, "MaxSizeMB", &d.MaxSizeMB) - delete(rawMsg, key) - case "vhdId": - err = unpopulate(val, "VhdID", &d.VhdID) - delete(rawMsg, key) - case "vhdName": - err = unpopulate(val, "VhdName", &d.VhdName) - delete(rawMsg, key) - case "vhdType": - err = unpopulate(val, "VhdType", &d.VhdType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionInfo. -func (d DiskEncryptionInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionKeyInfo", d.DiskEncryptionKeyInfo) - populate(objectMap, "keyEncryptionKeyInfo", d.KeyEncryptionKeyInfo) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionInfo. -func (d *DiskEncryptionInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionKeyInfo": - err = unpopulate(val, "DiskEncryptionKeyInfo", &d.DiskEncryptionKeyInfo) - delete(rawMsg, key) - case "keyEncryptionKeyInfo": - err = unpopulate(val, "KeyEncryptionKeyInfo", &d.KeyEncryptionKeyInfo) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionKeyInfo. -func (d DiskEncryptionKeyInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "keyVaultResourceArmId", d.KeyVaultResourceArmID) - populate(objectMap, "secretIdentifier", d.SecretIdentifier) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionKeyInfo. -func (d *DiskEncryptionKeyInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "keyVaultResourceArmId": - err = unpopulate(val, "KeyVaultResourceArmID", &d.KeyVaultResourceArmID) - delete(rawMsg, key) - case "secretIdentifier": - err = unpopulate(val, "SecretIdentifier", &d.SecretIdentifier) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiskVolumeDetails. -func (d DiskVolumeDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "label", d.Label) - populate(objectMap, "name", d.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DiskVolumeDetails. -func (d *DiskVolumeDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "label": - err = unpopulate(val, "Label", &d.Label) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Display. -func (d Display) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", d.Description) - populate(objectMap, "operation", d.Operation) - populate(objectMap, "provider", d.Provider) - populate(objectMap, "resource", d.Resource) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Display. -func (d *Display) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &d.Description) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &d.Operation) - delete(rawMsg, key) - case "provider": - err = unpopulate(val, "Provider", &d.Provider) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &d.Resource) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DraDetails. -func (d DraDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "biosId", d.BiosID) - populate(objectMap, "forwardProtectedItemCount", d.ForwardProtectedItemCount) - populate(objectMap, "health", d.Health) - populate(objectMap, "healthErrors", d.HealthErrors) - populate(objectMap, "id", d.ID) - populateTimeRFC3339(objectMap, "lastHeartbeatUtc", d.LastHeartbeatUTC) - populate(objectMap, "name", d.Name) - populate(objectMap, "reverseProtectedItemCount", d.ReverseProtectedItemCount) - populate(objectMap, "version", d.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DraDetails. -func (d *DraDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "biosId": - err = unpopulate(val, "BiosID", &d.BiosID) - delete(rawMsg, key) - case "forwardProtectedItemCount": - err = unpopulate(val, "ForwardProtectedItemCount", &d.ForwardProtectedItemCount) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &d.Health) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &d.HealthErrors) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "lastHeartbeatUtc": - err = unpopulateTimeRFC3339(val, "LastHeartbeatUTC", &d.LastHeartbeatUTC) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "reverseProtectedItemCount": - err = unpopulate(val, "ReverseProtectedItemCount", &d.ReverseProtectedItemCount) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &d.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EnableMigrationInput. -func (e EnableMigrationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", e.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnableMigrationInput. -func (e *EnableMigrationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EnableMigrationInputProperties. -func (e EnableMigrationInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "policyId", e.PolicyID) - populate(objectMap, "providerSpecificDetails", e.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnableMigrationInputProperties. -func (e *EnableMigrationInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "policyId": - err = unpopulate(val, "PolicyID", &e.PolicyID) - delete(rawMsg, key) - case "providerSpecificDetails": - e.ProviderSpecificDetails, err = unmarshalEnableMigrationProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EnableMigrationProviderSpecificInput. -func (e EnableMigrationProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = e.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnableMigrationProviderSpecificInput. -func (e *EnableMigrationProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &e.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EnableProtectionInput. -func (e EnableProtectionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", e.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnableProtectionInput. -func (e *EnableProtectionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EnableProtectionInputProperties. -func (e EnableProtectionInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "policyId", e.PolicyID) - populate(objectMap, "protectableItemId", e.ProtectableItemID) - populate(objectMap, "providerSpecificDetails", e.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnableProtectionInputProperties. -func (e *EnableProtectionInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "policyId": - err = unpopulate(val, "PolicyID", &e.PolicyID) - delete(rawMsg, key) - case "protectableItemId": - err = unpopulate(val, "ProtectableItemID", &e.ProtectableItemID) - delete(rawMsg, key) - case "providerSpecificDetails": - e.ProviderSpecificDetails, err = unmarshalEnableProtectionProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EnableProtectionProviderSpecificInput. -func (e EnableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = e.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EnableProtectionProviderSpecificInput. -func (e *EnableProtectionProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &e.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EncryptionDetails. -func (e EncryptionDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "kekCertExpiryDate", e.KekCertExpiryDate) - populate(objectMap, "kekCertThumbprint", e.KekCertThumbprint) - populate(objectMap, "kekState", e.KekState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionDetails. -func (e *EncryptionDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "kekCertExpiryDate": - err = unpopulateTimeRFC3339(val, "KekCertExpiryDate", &e.KekCertExpiryDate) - delete(rawMsg, key) - case "kekCertThumbprint": - err = unpopulate(val, "KekCertThumbprint", &e.KekCertThumbprint) - delete(rawMsg, key) - case "kekState": - err = unpopulate(val, "KekState", &e.KekState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Event. -func (e Event) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Event. -func (e *Event) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &e.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventCollection. -func (e EventCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventCollection. -func (e *EventCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventProperties. -func (e EventProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedObjectCorrelationId", e.AffectedObjectCorrelationID) - populate(objectMap, "affectedObjectFriendlyName", e.AffectedObjectFriendlyName) - populate(objectMap, "description", e.Description) - populate(objectMap, "eventCode", e.EventCode) - populate(objectMap, "eventSpecificDetails", e.EventSpecificDetails) - populate(objectMap, "eventType", e.EventType) - populate(objectMap, "fabricId", e.FabricID) - populate(objectMap, "healthErrors", e.HealthErrors) - populate(objectMap, "providerSpecificDetails", e.ProviderSpecificDetails) - populate(objectMap, "severity", e.Severity) - populateTimeRFC3339(objectMap, "timeOfOccurrence", e.TimeOfOccurrence) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventProperties. -func (e *EventProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedObjectCorrelationId": - err = unpopulate(val, "AffectedObjectCorrelationID", &e.AffectedObjectCorrelationID) - delete(rawMsg, key) - case "affectedObjectFriendlyName": - err = unpopulate(val, "AffectedObjectFriendlyName", &e.AffectedObjectFriendlyName) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &e.Description) - delete(rawMsg, key) - case "eventCode": - err = unpopulate(val, "EventCode", &e.EventCode) - delete(rawMsg, key) - case "eventSpecificDetails": - e.EventSpecificDetails, err = unmarshalEventSpecificDetailsClassification(val) - delete(rawMsg, key) - case "eventType": - err = unpopulate(val, "EventType", &e.EventType) - delete(rawMsg, key) - case "fabricId": - err = unpopulate(val, "FabricID", &e.FabricID) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &e.HealthErrors) - delete(rawMsg, key) - case "providerSpecificDetails": - e.ProviderSpecificDetails, err = unmarshalEventProviderSpecificDetailsClassification(val) - delete(rawMsg, key) - case "severity": - err = unpopulate(val, "Severity", &e.Severity) - delete(rawMsg, key) - case "timeOfOccurrence": - err = unpopulateTimeRFC3339(val, "TimeOfOccurrence", &e.TimeOfOccurrence) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventProviderSpecificDetails. -func (e EventProviderSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = e.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventProviderSpecificDetails. -func (e *EventProviderSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &e.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventQueryParameter. -func (e EventQueryParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedObjectCorrelationId", e.AffectedObjectCorrelationID) - populate(objectMap, "affectedObjectFriendlyName", e.AffectedObjectFriendlyName) - populateTimeRFC3339(objectMap, "endTime", e.EndTime) - populate(objectMap, "eventCode", e.EventCode) - populate(objectMap, "eventType", e.EventType) - populate(objectMap, "fabricName", e.FabricName) - populate(objectMap, "severity", e.Severity) - populateTimeRFC3339(objectMap, "startTime", e.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventQueryParameter. -func (e *EventQueryParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedObjectCorrelationId": - err = unpopulate(val, "AffectedObjectCorrelationID", &e.AffectedObjectCorrelationID) - delete(rawMsg, key) - case "affectedObjectFriendlyName": - err = unpopulate(val, "AffectedObjectFriendlyName", &e.AffectedObjectFriendlyName) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &e.EndTime) - delete(rawMsg, key) - case "eventCode": - err = unpopulate(val, "EventCode", &e.EventCode) - delete(rawMsg, key) - case "eventType": - err = unpopulate(val, "EventType", &e.EventType) - delete(rawMsg, key) - case "fabricName": - err = unpopulate(val, "FabricName", &e.FabricName) - delete(rawMsg, key) - case "severity": - err = unpopulate(val, "Severity", &e.Severity) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &e.StartTime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EventSpecificDetails. -func (e EventSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = e.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EventSpecificDetails. -func (e *EventSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &e.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExistingProtectionProfile. -func (e ExistingProtectionProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "protectionProfileId", e.ProtectionProfileID) - objectMap["resourceType"] = "Existing" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingProtectionProfile. -func (e *ExistingProtectionProfile) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "protectionProfileId": - err = unpopulate(val, "ProtectionProfileID", &e.ProtectionProfileID) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &e.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExistingRecoveryAvailabilitySet. -func (e ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "recoveryAvailabilitySetId", e.RecoveryAvailabilitySetID) - objectMap["resourceType"] = "Existing" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingRecoveryAvailabilitySet. -func (e *ExistingRecoveryAvailabilitySet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "recoveryAvailabilitySetId": - err = unpopulate(val, "RecoveryAvailabilitySetID", &e.RecoveryAvailabilitySetID) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &e.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExistingRecoveryProximityPlacementGroup. -func (e ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "recoveryProximityPlacementGroupId", e.RecoveryProximityPlacementGroupID) - objectMap["resourceType"] = "Existing" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingRecoveryProximityPlacementGroup. -func (e *ExistingRecoveryProximityPlacementGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "recoveryProximityPlacementGroupId": - err = unpopulate(val, "RecoveryProximityPlacementGroupID", &e.RecoveryProximityPlacementGroupID) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &e.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExistingRecoveryResourceGroup. -func (e ExistingRecoveryResourceGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "recoveryResourceGroupId", e.RecoveryResourceGroupID) - objectMap["resourceType"] = "Existing" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingRecoveryResourceGroup. -func (e *ExistingRecoveryResourceGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "recoveryResourceGroupId": - err = unpopulate(val, "RecoveryResourceGroupID", &e.RecoveryResourceGroupID) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &e.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExistingRecoveryVirtualNetwork. -func (e ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "recoverySubnetName", e.RecoverySubnetName) - populate(objectMap, "recoveryVirtualNetworkId", e.RecoveryVirtualNetworkID) - objectMap["resourceType"] = "Existing" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingRecoveryVirtualNetwork. -func (e *ExistingRecoveryVirtualNetwork) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "recoverySubnetName": - err = unpopulate(val, "RecoverySubnetName", &e.RecoverySubnetName) - delete(rawMsg, key) - case "recoveryVirtualNetworkId": - err = unpopulate(val, "RecoveryVirtualNetworkID", &e.RecoveryVirtualNetworkID) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &e.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExistingStorageAccount. -func (e ExistingStorageAccount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureStorageAccountId", e.AzureStorageAccountID) - objectMap["resourceType"] = "Existing" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingStorageAccount. -func (e *ExistingStorageAccount) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureStorageAccountId": - err = unpopulate(val, "AzureStorageAccountID", &e.AzureStorageAccountID) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &e.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExportJobDetails. -func (e ExportJobDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedObjectDetails", e.AffectedObjectDetails) - populate(objectMap, "blobUri", e.BlobURI) - objectMap["instanceType"] = "ExportJobDetails" - populate(objectMap, "sasToken", e.SasToken) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExportJobDetails. -func (e *ExportJobDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedObjectDetails": - err = unpopulate(val, "AffectedObjectDetails", &e.AffectedObjectDetails) - delete(rawMsg, key) - case "blobUri": - err = unpopulate(val, "BlobURI", &e.BlobURI) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &e.InstanceType) - delete(rawMsg, key) - case "sasToken": - err = unpopulate(val, "SasToken", &e.SasToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. -func (e ExtendedLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "name", e.Name) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation. -func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Fabric. -func (f Fabric) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", f.ID) - populate(objectMap, "location", f.Location) - populate(objectMap, "name", f.Name) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "type", f.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Fabric. -func (f *Fabric) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &f.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &f.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &f.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &f.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FabricCollection. -func (f FabricCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", f.NextLink) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FabricCollection. -func (f *FabricCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &f.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &f.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FabricCreationInput. -func (f FabricCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", f.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FabricCreationInput. -func (f *FabricCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &f.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FabricCreationInputProperties. -func (f FabricCreationInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customDetails", f.CustomDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FabricCreationInputProperties. -func (f *FabricCreationInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customDetails": - f.CustomDetails, err = unmarshalFabricSpecificCreationInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FabricProperties. -func (f FabricProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bcdrState", f.BcdrState) - populate(objectMap, "customDetails", f.CustomDetails) - populate(objectMap, "encryptionDetails", f.EncryptionDetails) - populate(objectMap, "friendlyName", f.FriendlyName) - populate(objectMap, "health", f.Health) - populate(objectMap, "healthErrorDetails", f.HealthErrorDetails) - populate(objectMap, "internalIdentifier", f.InternalIdentifier) - populate(objectMap, "rolloverEncryptionDetails", f.RolloverEncryptionDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FabricProperties. -func (f *FabricProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bcdrState": - err = unpopulate(val, "BcdrState", &f.BcdrState) - delete(rawMsg, key) - case "customDetails": - f.CustomDetails, err = unmarshalFabricSpecificDetailsClassification(val) - delete(rawMsg, key) - case "encryptionDetails": - err = unpopulate(val, "EncryptionDetails", &f.EncryptionDetails) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &f.FriendlyName) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &f.Health) - delete(rawMsg, key) - case "healthErrorDetails": - err = unpopulate(val, "HealthErrorDetails", &f.HealthErrorDetails) - delete(rawMsg, key) - case "internalIdentifier": - err = unpopulate(val, "InternalIdentifier", &f.InternalIdentifier) - delete(rawMsg, key) - case "rolloverEncryptionDetails": - err = unpopulate(val, "RolloverEncryptionDetails", &f.RolloverEncryptionDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FabricQueryParameter. -func (f FabricQueryParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "biosId", f.BiosID) - populate(objectMap, "discoveryType", f.DiscoveryType) - populate(objectMap, "fetchAgentDetails", f.FetchAgentDetails) - populate(objectMap, "fqdn", f.Fqdn) - populate(objectMap, "osType", f.OSType) - populate(objectMap, "zoneToZoneMappings", f.ZoneToZoneMappings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FabricQueryParameter. -func (f *FabricQueryParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "biosId": - err = unpopulate(val, "BiosID", &f.BiosID) - delete(rawMsg, key) - case "discoveryType": - err = unpopulate(val, "DiscoveryType", &f.DiscoveryType) - delete(rawMsg, key) - case "fetchAgentDetails": - err = unpopulate(val, "FetchAgentDetails", &f.FetchAgentDetails) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &f.Fqdn) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &f.OSType) - delete(rawMsg, key) - case "zoneToZoneMappings": - err = unpopulate(val, "ZoneToZoneMappings", &f.ZoneToZoneMappings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FabricReplicationGroupTaskDetails. -func (f FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "FabricReplicationGroupTaskDetails" - populate(objectMap, "jobTask", f.JobTask) - populate(objectMap, "skippedReason", f.SkippedReason) - populate(objectMap, "skippedReasonString", f.SkippedReasonString) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FabricReplicationGroupTaskDetails. -func (f *FabricReplicationGroupTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &f.InstanceType) - delete(rawMsg, key) - case "jobTask": - err = unpopulate(val, "JobTask", &f.JobTask) - delete(rawMsg, key) - case "skippedReason": - err = unpopulate(val, "SkippedReason", &f.SkippedReason) - delete(rawMsg, key) - case "skippedReasonString": - err = unpopulate(val, "SkippedReasonString", &f.SkippedReasonString) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FabricSpecificCreateNetworkMappingInput. -func (f FabricSpecificCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = f.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FabricSpecificCreateNetworkMappingInput. -func (f *FabricSpecificCreateNetworkMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &f.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FabricSpecificCreationInput. -func (f FabricSpecificCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = f.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FabricSpecificCreationInput. -func (f *FabricSpecificCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &f.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FabricSpecificDetails. -func (f FabricSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = f.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FabricSpecificDetails. -func (f *FabricSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &f.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FabricSpecificUpdateNetworkMappingInput. -func (f FabricSpecificUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = f.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FabricSpecificUpdateNetworkMappingInput. -func (f *FabricSpecificUpdateNetworkMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &f.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FailoverJobDetails. -func (f FailoverJobDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedObjectDetails", f.AffectedObjectDetails) - objectMap["instanceType"] = "FailoverJobDetails" - populate(objectMap, "protectedItemDetails", f.ProtectedItemDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverJobDetails. -func (f *FailoverJobDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedObjectDetails": - err = unpopulate(val, "AffectedObjectDetails", &f.AffectedObjectDetails) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &f.InstanceType) - delete(rawMsg, key) - case "protectedItemDetails": - err = unpopulate(val, "ProtectedItemDetails", &f.ProtectedItemDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FailoverProcessServerRequest. -func (f FailoverProcessServerRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", f.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverProcessServerRequest. -func (f *FailoverProcessServerRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &f.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FailoverProcessServerRequestProperties. -func (f FailoverProcessServerRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerName", f.ContainerName) - populate(objectMap, "sourceProcessServerId", f.SourceProcessServerID) - populate(objectMap, "targetProcessServerId", f.TargetProcessServerID) - populate(objectMap, "updateType", f.UpdateType) - populate(objectMap, "vmsToMigrate", f.VMsToMigrate) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverProcessServerRequestProperties. -func (f *FailoverProcessServerRequestProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containerName": - err = unpopulate(val, "ContainerName", &f.ContainerName) - delete(rawMsg, key) - case "sourceProcessServerId": - err = unpopulate(val, "SourceProcessServerID", &f.SourceProcessServerID) - delete(rawMsg, key) - case "targetProcessServerId": - err = unpopulate(val, "TargetProcessServerID", &f.TargetProcessServerID) - delete(rawMsg, key) - case "updateType": - err = unpopulate(val, "UpdateType", &f.UpdateType) - delete(rawMsg, key) - case "vmsToMigrate": - err = unpopulate(val, "VMsToMigrate", &f.VMsToMigrate) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type FailoverReplicationProtectedItemDetails. -func (f FailoverReplicationProtectedItemDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "friendlyName", f.FriendlyName) - populate(objectMap, "name", f.Name) - populate(objectMap, "networkConnectionStatus", f.NetworkConnectionStatus) - populate(objectMap, "networkFriendlyName", f.NetworkFriendlyName) - populate(objectMap, "recoveryPointId", f.RecoveryPointID) - populateTimeRFC3339(objectMap, "recoveryPointTime", f.RecoveryPointTime) - populate(objectMap, "subnet", f.Subnet) - populate(objectMap, "testVmFriendlyName", f.TestVMFriendlyName) - populate(objectMap, "testVmName", f.TestVMName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverReplicationProtectedItemDetails. -func (f *FailoverReplicationProtectedItemDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "friendlyName": - err = unpopulate(val, "FriendlyName", &f.FriendlyName) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &f.Name) - delete(rawMsg, key) - case "networkConnectionStatus": - err = unpopulate(val, "NetworkConnectionStatus", &f.NetworkConnectionStatus) - delete(rawMsg, key) - case "networkFriendlyName": - err = unpopulate(val, "NetworkFriendlyName", &f.NetworkFriendlyName) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &f.RecoveryPointID) - delete(rawMsg, key) - case "recoveryPointTime": - err = unpopulateTimeRFC3339(val, "RecoveryPointTime", &f.RecoveryPointTime) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &f.Subnet) - delete(rawMsg, key) - case "testVmFriendlyName": - err = unpopulate(val, "TestVMFriendlyName", &f.TestVMFriendlyName) - delete(rawMsg, key) - case "testVmName": - err = unpopulate(val, "TestVMName", &f.TestVMName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", f, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GroupTaskDetails. -func (g GroupTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "childTasks", g.ChildTasks) - objectMap["instanceType"] = g.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GroupTaskDetails. -func (g *GroupTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "childTasks": - err = unpopulate(val, "ChildTasks", &g.ChildTasks) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &g.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HealthError. -func (h HealthError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "creationTimeUtc", h.CreationTimeUTC) - populate(objectMap, "customerResolvability", h.CustomerResolvability) - populate(objectMap, "entityId", h.EntityID) - populate(objectMap, "errorCategory", h.ErrorCategory) - populate(objectMap, "errorCode", h.ErrorCode) - populate(objectMap, "errorId", h.ErrorID) - populate(objectMap, "errorLevel", h.ErrorLevel) - populate(objectMap, "errorMessage", h.ErrorMessage) - populate(objectMap, "errorSource", h.ErrorSource) - populate(objectMap, "errorType", h.ErrorType) - populate(objectMap, "innerHealthErrors", h.InnerHealthErrors) - populate(objectMap, "possibleCauses", h.PossibleCauses) - populate(objectMap, "recommendedAction", h.RecommendedAction) - populate(objectMap, "recoveryProviderErrorMessage", h.RecoveryProviderErrorMessage) - populate(objectMap, "summaryMessage", h.SummaryMessage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HealthError. -func (h *HealthError) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "creationTimeUtc": - err = unpopulateTimeRFC3339(val, "CreationTimeUTC", &h.CreationTimeUTC) - delete(rawMsg, key) - case "customerResolvability": - err = unpopulate(val, "CustomerResolvability", &h.CustomerResolvability) - delete(rawMsg, key) - case "entityId": - err = unpopulate(val, "EntityID", &h.EntityID) - delete(rawMsg, key) - case "errorCategory": - err = unpopulate(val, "ErrorCategory", &h.ErrorCategory) - delete(rawMsg, key) - case "errorCode": - err = unpopulate(val, "ErrorCode", &h.ErrorCode) - delete(rawMsg, key) - case "errorId": - err = unpopulate(val, "ErrorID", &h.ErrorID) - delete(rawMsg, key) - case "errorLevel": - err = unpopulate(val, "ErrorLevel", &h.ErrorLevel) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &h.ErrorMessage) - delete(rawMsg, key) - case "errorSource": - err = unpopulate(val, "ErrorSource", &h.ErrorSource) - delete(rawMsg, key) - case "errorType": - err = unpopulate(val, "ErrorType", &h.ErrorType) - delete(rawMsg, key) - case "innerHealthErrors": - err = unpopulate(val, "InnerHealthErrors", &h.InnerHealthErrors) - delete(rawMsg, key) - case "possibleCauses": - err = unpopulate(val, "PossibleCauses", &h.PossibleCauses) - delete(rawMsg, key) - case "recommendedAction": - err = unpopulate(val, "RecommendedAction", &h.RecommendedAction) - delete(rawMsg, key) - case "recoveryProviderErrorMessage": - err = unpopulate(val, "RecoveryProviderErrorMessage", &h.RecoveryProviderErrorMessage) - delete(rawMsg, key) - case "summaryMessage": - err = unpopulate(val, "SummaryMessage", &h.SummaryMessage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HealthErrorSummary. -func (h HealthErrorSummary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedResourceCorrelationIds", h.AffectedResourceCorrelationIDs) - populate(objectMap, "affectedResourceSubtype", h.AffectedResourceSubtype) - populate(objectMap, "affectedResourceType", h.AffectedResourceType) - populate(objectMap, "category", h.Category) - populate(objectMap, "severity", h.Severity) - populate(objectMap, "summaryCode", h.SummaryCode) - populate(objectMap, "summaryMessage", h.SummaryMessage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HealthErrorSummary. -func (h *HealthErrorSummary) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedResourceCorrelationIds": - err = unpopulate(val, "AffectedResourceCorrelationIDs", &h.AffectedResourceCorrelationIDs) - delete(rawMsg, key) - case "affectedResourceSubtype": - err = unpopulate(val, "AffectedResourceSubtype", &h.AffectedResourceSubtype) - delete(rawMsg, key) - case "affectedResourceType": - err = unpopulate(val, "AffectedResourceType", &h.AffectedResourceType) - delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &h.Category) - delete(rawMsg, key) - case "severity": - err = unpopulate(val, "Severity", &h.Severity) - delete(rawMsg, key) - case "summaryCode": - err = unpopulate(val, "SummaryCode", &h.SummaryCode) - delete(rawMsg, key) - case "summaryMessage": - err = unpopulate(val, "SummaryMessage", &h.SummaryMessage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVHostDetails. -func (h HyperVHostDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", h.ID) - populate(objectMap, "marsAgentVersion", h.MarsAgentVersion) - populate(objectMap, "name", h.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVHostDetails. -func (h *HyperVHostDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &h.ID) - delete(rawMsg, key) - case "marsAgentVersion": - err = unpopulate(val, "MarsAgentVersion", &h.MarsAgentVersion) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &h.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplica2012EventDetails. -func (h HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerName", h.ContainerName) - populate(objectMap, "fabricName", h.FabricName) - objectMap["instanceType"] = "HyperVReplica2012" - populate(objectMap, "remoteContainerName", h.RemoteContainerName) - populate(objectMap, "remoteFabricName", h.RemoteFabricName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplica2012EventDetails. -func (h *HyperVReplica2012EventDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containerName": - err = unpopulate(val, "ContainerName", &h.ContainerName) - delete(rawMsg, key) - case "fabricName": - err = unpopulate(val, "FabricName", &h.FabricName) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "remoteContainerName": - err = unpopulate(val, "RemoteContainerName", &h.RemoteContainerName) - delete(rawMsg, key) - case "remoteFabricName": - err = unpopulate(val, "RemoteFabricName", &h.RemoteFabricName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplica2012R2EventDetails. -func (h HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerName", h.ContainerName) - populate(objectMap, "fabricName", h.FabricName) - objectMap["instanceType"] = "HyperVReplica2012R2" - populate(objectMap, "remoteContainerName", h.RemoteContainerName) - populate(objectMap, "remoteFabricName", h.RemoteFabricName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplica2012R2EventDetails. -func (h *HyperVReplica2012R2EventDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containerName": - err = unpopulate(val, "ContainerName", &h.ContainerName) - delete(rawMsg, key) - case "fabricName": - err = unpopulate(val, "FabricName", &h.FabricName) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "remoteContainerName": - err = unpopulate(val, "RemoteContainerName", &h.RemoteContainerName) - delete(rawMsg, key) - case "remoteFabricName": - err = unpopulate(val, "RemoteFabricName", &h.RemoteFabricName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureApplyRecoveryPointInput. -func (h HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "primaryKekCertificatePfx", h.PrimaryKekCertificatePfx) - populate(objectMap, "secondaryKekCertificatePfx", h.SecondaryKekCertificatePfx) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureApplyRecoveryPointInput. -func (h *HyperVReplicaAzureApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "primaryKekCertificatePfx": - err = unpopulate(val, "PrimaryKekCertificatePfx", &h.PrimaryKekCertificatePfx) - delete(rawMsg, key) - case "secondaryKekCertificatePfx": - err = unpopulate(val, "SecondaryKekCertificatePfx", &h.SecondaryKekCertificatePfx) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureDiskInputDetails. -func (h HyperVReplicaAzureDiskInputDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionSetId", h.DiskEncryptionSetID) - populate(objectMap, "diskId", h.DiskID) - populate(objectMap, "diskType", h.DiskType) - populate(objectMap, "logStorageAccountId", h.LogStorageAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureDiskInputDetails. -func (h *HyperVReplicaAzureDiskInputDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &h.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &h.DiskID) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &h.DiskType) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &h.LogStorageAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureEnableProtectionInput. -func (h HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionSetId", h.DiskEncryptionSetID) - populate(objectMap, "diskType", h.DiskType) - populate(objectMap, "disksToInclude", h.DisksToInclude) - populate(objectMap, "disksToIncludeForManagedDisks", h.DisksToIncludeForManagedDisks) - populate(objectMap, "enableRdpOnTargetOption", h.EnableRdpOnTargetOption) - populate(objectMap, "hvHostVmId", h.HvHostVMID) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "licenseType", h.LicenseType) - populate(objectMap, "logStorageAccountId", h.LogStorageAccountID) - populate(objectMap, "osType", h.OSType) - populate(objectMap, "sqlServerLicenseType", h.SQLServerLicenseType) - populate(objectMap, "seedManagedDiskTags", h.SeedManagedDiskTags) - populate(objectMap, "targetAvailabilitySetId", h.TargetAvailabilitySetID) - populate(objectMap, "targetAvailabilityZone", h.TargetAvailabilityZone) - populate(objectMap, "targetAzureNetworkId", h.TargetAzureNetworkID) - populate(objectMap, "targetAzureSubnetId", h.TargetAzureSubnetID) - populate(objectMap, "targetAzureV1ResourceGroupId", h.TargetAzureV1ResourceGroupID) - populate(objectMap, "targetAzureV2ResourceGroupId", h.TargetAzureV2ResourceGroupID) - populate(objectMap, "targetAzureVmName", h.TargetAzureVMName) - populate(objectMap, "targetManagedDiskTags", h.TargetManagedDiskTags) - populate(objectMap, "targetNicTags", h.TargetNicTags) - populate(objectMap, "targetProximityPlacementGroupId", h.TargetProximityPlacementGroupID) - populate(objectMap, "targetStorageAccountId", h.TargetStorageAccountID) - populate(objectMap, "targetVmSize", h.TargetVMSize) - populate(objectMap, "targetVmTags", h.TargetVMTags) - populate(objectMap, "useManagedDisks", h.UseManagedDisks) - populate(objectMap, "useManagedDisksForReplication", h.UseManagedDisksForReplication) - populate(objectMap, "vmName", h.VMName) - populate(objectMap, "vhdId", h.VhdID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureEnableProtectionInput. -func (h *HyperVReplicaAzureEnableProtectionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &h.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &h.DiskType) - delete(rawMsg, key) - case "disksToInclude": - err = unpopulate(val, "DisksToInclude", &h.DisksToInclude) - delete(rawMsg, key) - case "disksToIncludeForManagedDisks": - err = unpopulate(val, "DisksToIncludeForManagedDisks", &h.DisksToIncludeForManagedDisks) - delete(rawMsg, key) - case "enableRdpOnTargetOption": - err = unpopulate(val, "EnableRdpOnTargetOption", &h.EnableRdpOnTargetOption) - delete(rawMsg, key) - case "hvHostVmId": - err = unpopulate(val, "HvHostVMID", &h.HvHostVMID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &h.LicenseType) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &h.LogStorageAccountID) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &h.OSType) - delete(rawMsg, key) - case "sqlServerLicenseType": - err = unpopulate(val, "SQLServerLicenseType", &h.SQLServerLicenseType) - delete(rawMsg, key) - case "seedManagedDiskTags": - err = unpopulate(val, "SeedManagedDiskTags", &h.SeedManagedDiskTags) - delete(rawMsg, key) - case "targetAvailabilitySetId": - err = unpopulate(val, "TargetAvailabilitySetID", &h.TargetAvailabilitySetID) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &h.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetAzureNetworkId": - err = unpopulate(val, "TargetAzureNetworkID", &h.TargetAzureNetworkID) - delete(rawMsg, key) - case "targetAzureSubnetId": - err = unpopulate(val, "TargetAzureSubnetID", &h.TargetAzureSubnetID) - delete(rawMsg, key) - case "targetAzureV1ResourceGroupId": - err = unpopulate(val, "TargetAzureV1ResourceGroupID", &h.TargetAzureV1ResourceGroupID) - delete(rawMsg, key) - case "targetAzureV2ResourceGroupId": - err = unpopulate(val, "TargetAzureV2ResourceGroupID", &h.TargetAzureV2ResourceGroupID) - delete(rawMsg, key) - case "targetAzureVmName": - err = unpopulate(val, "TargetAzureVMName", &h.TargetAzureVMName) - delete(rawMsg, key) - case "targetManagedDiskTags": - err = unpopulate(val, "TargetManagedDiskTags", &h.TargetManagedDiskTags) - delete(rawMsg, key) - case "targetNicTags": - err = unpopulate(val, "TargetNicTags", &h.TargetNicTags) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &h.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetStorageAccountId": - err = unpopulate(val, "TargetStorageAccountID", &h.TargetStorageAccountID) - delete(rawMsg, key) - case "targetVmSize": - err = unpopulate(val, "TargetVMSize", &h.TargetVMSize) - delete(rawMsg, key) - case "targetVmTags": - err = unpopulate(val, "TargetVMTags", &h.TargetVMTags) - delete(rawMsg, key) - case "useManagedDisks": - err = unpopulate(val, "UseManagedDisks", &h.UseManagedDisks) - delete(rawMsg, key) - case "useManagedDisksForReplication": - err = unpopulate(val, "UseManagedDisksForReplication", &h.UseManagedDisksForReplication) - delete(rawMsg, key) - case "vmName": - err = unpopulate(val, "VMName", &h.VMName) - delete(rawMsg, key) - case "vhdId": - err = unpopulate(val, "VhdID", &h.VhdID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureEventDetails. -func (h HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerName", h.ContainerName) - populate(objectMap, "fabricName", h.FabricName) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "remoteContainerName", h.RemoteContainerName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureEventDetails. -func (h *HyperVReplicaAzureEventDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containerName": - err = unpopulate(val, "ContainerName", &h.ContainerName) - delete(rawMsg, key) - case "fabricName": - err = unpopulate(val, "FabricName", &h.FabricName) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "remoteContainerName": - err = unpopulate(val, "RemoteContainerName", &h.RemoteContainerName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureFailbackProviderInput. -func (h HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataSyncOption", h.DataSyncOption) - objectMap["instanceType"] = "HyperVReplicaAzureFailback" - populate(objectMap, "providerIdForAlternateRecovery", h.ProviderIDForAlternateRecovery) - populate(objectMap, "recoveryVmCreationOption", h.RecoveryVMCreationOption) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureFailbackProviderInput. -func (h *HyperVReplicaAzureFailbackProviderInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataSyncOption": - err = unpopulate(val, "DataSyncOption", &h.DataSyncOption) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "providerIdForAlternateRecovery": - err = unpopulate(val, "ProviderIDForAlternateRecovery", &h.ProviderIDForAlternateRecovery) - delete(rawMsg, key) - case "recoveryVmCreationOption": - err = unpopulate(val, "RecoveryVMCreationOption", &h.RecoveryVMCreationOption) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureManagedDiskDetails. -func (h HyperVReplicaAzureManagedDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionSetId", h.DiskEncryptionSetID) - populate(objectMap, "diskId", h.DiskID) - populate(objectMap, "replicaDiskType", h.ReplicaDiskType) - populate(objectMap, "seedManagedDiskId", h.SeedManagedDiskID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureManagedDiskDetails. -func (h *HyperVReplicaAzureManagedDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &h.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &h.DiskID) - delete(rawMsg, key) - case "replicaDiskType": - err = unpopulate(val, "ReplicaDiskType", &h.ReplicaDiskType) - delete(rawMsg, key) - case "seedManagedDiskId": - err = unpopulate(val, "SeedManagedDiskID", &h.SeedManagedDiskID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzurePlannedFailoverProviderInput. -func (h HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "primaryKekCertificatePfx", h.PrimaryKekCertificatePfx) - populate(objectMap, "recoveryPointId", h.RecoveryPointID) - populate(objectMap, "secondaryKekCertificatePfx", h.SecondaryKekCertificatePfx) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzurePlannedFailoverProviderInput. -func (h *HyperVReplicaAzurePlannedFailoverProviderInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "primaryKekCertificatePfx": - err = unpopulate(val, "PrimaryKekCertificatePfx", &h.PrimaryKekCertificatePfx) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &h.RecoveryPointID) - delete(rawMsg, key) - case "secondaryKekCertificatePfx": - err = unpopulate(val, "SecondaryKekCertificatePfx", &h.SecondaryKekCertificatePfx) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzurePolicyDetails. -func (h HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeStorageAccountId", h.ActiveStorageAccountID) - populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) - populate(objectMap, "encryption", h.Encryption) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) - populate(objectMap, "recoveryPointHistoryDurationInHours", h.RecoveryPointHistoryDurationInHours) - populate(objectMap, "replicationInterval", h.ReplicationInterval) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzurePolicyDetails. -func (h *HyperVReplicaAzurePolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activeStorageAccountId": - err = unpopulate(val, "ActiveStorageAccountID", &h.ActiveStorageAccountID) - delete(rawMsg, key) - case "applicationConsistentSnapshotFrequencyInHours": - err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) - delete(rawMsg, key) - case "encryption": - err = unpopulate(val, "Encryption", &h.Encryption) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "onlineReplicationStartTime": - err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) - delete(rawMsg, key) - case "recoveryPointHistoryDurationInHours": - err = unpopulate(val, "RecoveryPointHistoryDurationInHours", &h.RecoveryPointHistoryDurationInHours) - delete(rawMsg, key) - case "replicationInterval": - err = unpopulate(val, "ReplicationInterval", &h.ReplicationInterval) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzurePolicyInput. -func (h HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) - populate(objectMap, "recoveryPointHistoryDuration", h.RecoveryPointHistoryDuration) - populate(objectMap, "replicationInterval", h.ReplicationInterval) - populate(objectMap, "storageAccounts", h.StorageAccounts) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzurePolicyInput. -func (h *HyperVReplicaAzurePolicyInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "applicationConsistentSnapshotFrequencyInHours": - err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "onlineReplicationStartTime": - err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) - delete(rawMsg, key) - case "recoveryPointHistoryDuration": - err = unpopulate(val, "RecoveryPointHistoryDuration", &h.RecoveryPointHistoryDuration) - delete(rawMsg, key) - case "replicationInterval": - err = unpopulate(val, "ReplicationInterval", &h.ReplicationInterval) - delete(rawMsg, key) - case "storageAccounts": - err = unpopulate(val, "StorageAccounts", &h.StorageAccounts) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureReplicationDetails. -func (h HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureVmDiskDetails", h.AzureVMDiskDetails) - populate(objectMap, "enableRdpOnTargetOption", h.EnableRdpOnTargetOption) - populate(objectMap, "encryption", h.Encryption) - populate(objectMap, "initialReplicationDetails", h.InitialReplicationDetails) - objectMap["instanceType"] = "HyperVReplicaAzure" - populateTimeRFC3339(objectMap, "lastRecoveryPointReceived", h.LastRecoveryPointReceived) - populateTimeRFC3339(objectMap, "lastReplicatedTime", h.LastReplicatedTime) - populateTimeRFC3339(objectMap, "lastRpoCalculatedTime", h.LastRpoCalculatedTime) - populate(objectMap, "licenseType", h.LicenseType) - populate(objectMap, "oSDetails", h.OSDetails) - populate(objectMap, "protectedManagedDisks", h.ProtectedManagedDisks) - populate(objectMap, "recoveryAvailabilitySetId", h.RecoveryAvailabilitySetID) - populate(objectMap, "recoveryAzureLogStorageAccountId", h.RecoveryAzureLogStorageAccountID) - populate(objectMap, "recoveryAzureResourceGroupId", h.RecoveryAzureResourceGroupID) - populate(objectMap, "recoveryAzureStorageAccount", h.RecoveryAzureStorageAccount) - populate(objectMap, "recoveryAzureVmName", h.RecoveryAzureVMName) - populate(objectMap, "recoveryAzureVMSize", h.RecoveryAzureVMSize) - populate(objectMap, "rpoInSeconds", h.RpoInSeconds) - populate(objectMap, "sqlServerLicenseType", h.SQLServerLicenseType) - populate(objectMap, "seedManagedDiskTags", h.SeedManagedDiskTags) - populate(objectMap, "selectedRecoveryAzureNetworkId", h.SelectedRecoveryAzureNetworkID) - populate(objectMap, "selectedSourceNicId", h.SelectedSourceNicID) - populate(objectMap, "sourceVmCpuCount", h.SourceVMCPUCount) - populate(objectMap, "sourceVmRamSizeInMB", h.SourceVMRAMSizeInMB) - populate(objectMap, "targetAvailabilityZone", h.TargetAvailabilityZone) - populate(objectMap, "targetManagedDiskTags", h.TargetManagedDiskTags) - populate(objectMap, "targetNicTags", h.TargetNicTags) - populate(objectMap, "targetProximityPlacementGroupId", h.TargetProximityPlacementGroupID) - populate(objectMap, "targetVmTags", h.TargetVMTags) - populate(objectMap, "useManagedDisks", h.UseManagedDisks) - populate(objectMap, "vmId", h.VMID) - populate(objectMap, "vmNics", h.VMNics) - populate(objectMap, "vmProtectionState", h.VMProtectionState) - populate(objectMap, "vmProtectionStateDescription", h.VMProtectionStateDescription) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureReplicationDetails. -func (h *HyperVReplicaAzureReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureVmDiskDetails": - err = unpopulate(val, "AzureVMDiskDetails", &h.AzureVMDiskDetails) - delete(rawMsg, key) - case "enableRdpOnTargetOption": - err = unpopulate(val, "EnableRdpOnTargetOption", &h.EnableRdpOnTargetOption) - delete(rawMsg, key) - case "encryption": - err = unpopulate(val, "Encryption", &h.Encryption) - delete(rawMsg, key) - case "initialReplicationDetails": - err = unpopulate(val, "InitialReplicationDetails", &h.InitialReplicationDetails) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "lastRecoveryPointReceived": - err = unpopulateTimeRFC3339(val, "LastRecoveryPointReceived", &h.LastRecoveryPointReceived) - delete(rawMsg, key) - case "lastReplicatedTime": - err = unpopulateTimeRFC3339(val, "LastReplicatedTime", &h.LastReplicatedTime) - delete(rawMsg, key) - case "lastRpoCalculatedTime": - err = unpopulateTimeRFC3339(val, "LastRpoCalculatedTime", &h.LastRpoCalculatedTime) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &h.LicenseType) - delete(rawMsg, key) - case "oSDetails": - err = unpopulate(val, "OSDetails", &h.OSDetails) - delete(rawMsg, key) - case "protectedManagedDisks": - err = unpopulate(val, "ProtectedManagedDisks", &h.ProtectedManagedDisks) - delete(rawMsg, key) - case "recoveryAvailabilitySetId": - err = unpopulate(val, "RecoveryAvailabilitySetID", &h.RecoveryAvailabilitySetID) - delete(rawMsg, key) - case "recoveryAzureLogStorageAccountId": - err = unpopulate(val, "RecoveryAzureLogStorageAccountID", &h.RecoveryAzureLogStorageAccountID) - delete(rawMsg, key) - case "recoveryAzureResourceGroupId": - err = unpopulate(val, "RecoveryAzureResourceGroupID", &h.RecoveryAzureResourceGroupID) - delete(rawMsg, key) - case "recoveryAzureStorageAccount": - err = unpopulate(val, "RecoveryAzureStorageAccount", &h.RecoveryAzureStorageAccount) - delete(rawMsg, key) - case "recoveryAzureVmName": - err = unpopulate(val, "RecoveryAzureVMName", &h.RecoveryAzureVMName) - delete(rawMsg, key) - case "recoveryAzureVMSize": - err = unpopulate(val, "RecoveryAzureVMSize", &h.RecoveryAzureVMSize) - delete(rawMsg, key) - case "rpoInSeconds": - err = unpopulate(val, "RpoInSeconds", &h.RpoInSeconds) - delete(rawMsg, key) - case "sqlServerLicenseType": - err = unpopulate(val, "SQLServerLicenseType", &h.SQLServerLicenseType) - delete(rawMsg, key) - case "seedManagedDiskTags": - err = unpopulate(val, "SeedManagedDiskTags", &h.SeedManagedDiskTags) - delete(rawMsg, key) - case "selectedRecoveryAzureNetworkId": - err = unpopulate(val, "SelectedRecoveryAzureNetworkID", &h.SelectedRecoveryAzureNetworkID) - delete(rawMsg, key) - case "selectedSourceNicId": - err = unpopulate(val, "SelectedSourceNicID", &h.SelectedSourceNicID) - delete(rawMsg, key) - case "sourceVmCpuCount": - err = unpopulate(val, "SourceVMCPUCount", &h.SourceVMCPUCount) - delete(rawMsg, key) - case "sourceVmRamSizeInMB": - err = unpopulate(val, "SourceVMRAMSizeInMB", &h.SourceVMRAMSizeInMB) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &h.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetManagedDiskTags": - err = unpopulate(val, "TargetManagedDiskTags", &h.TargetManagedDiskTags) - delete(rawMsg, key) - case "targetNicTags": - err = unpopulate(val, "TargetNicTags", &h.TargetNicTags) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &h.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetVmTags": - err = unpopulate(val, "TargetVMTags", &h.TargetVMTags) - delete(rawMsg, key) - case "useManagedDisks": - err = unpopulate(val, "UseManagedDisks", &h.UseManagedDisks) - delete(rawMsg, key) - case "vmId": - err = unpopulate(val, "VMID", &h.VMID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &h.VMNics) - delete(rawMsg, key) - case "vmProtectionState": - err = unpopulate(val, "VMProtectionState", &h.VMProtectionState) - delete(rawMsg, key) - case "vmProtectionStateDescription": - err = unpopulate(val, "VMProtectionStateDescription", &h.VMProtectionStateDescription) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureReprotectInput. -func (h HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hvHostVmId", h.HvHostVMID) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "logStorageAccountId", h.LogStorageAccountID) - populate(objectMap, "osType", h.OSType) - populate(objectMap, "storageAccountId", h.StorageAccountID) - populate(objectMap, "vHDId", h.VHDID) - populate(objectMap, "vmName", h.VMName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureReprotectInput. -func (h *HyperVReplicaAzureReprotectInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "hvHostVmId": - err = unpopulate(val, "HvHostVMID", &h.HvHostVMID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &h.LogStorageAccountID) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &h.OSType) - delete(rawMsg, key) - case "storageAccountId": - err = unpopulate(val, "StorageAccountID", &h.StorageAccountID) - delete(rawMsg, key) - case "vHDId": - err = unpopulate(val, "VHDID", &h.VHDID) - delete(rawMsg, key) - case "vmName": - err = unpopulate(val, "VMName", &h.VMName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureTestFailoverInput. -func (h HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "primaryKekCertificatePfx", h.PrimaryKekCertificatePfx) - populate(objectMap, "recoveryPointId", h.RecoveryPointID) - populate(objectMap, "secondaryKekCertificatePfx", h.SecondaryKekCertificatePfx) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureTestFailoverInput. -func (h *HyperVReplicaAzureTestFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "primaryKekCertificatePfx": - err = unpopulate(val, "PrimaryKekCertificatePfx", &h.PrimaryKekCertificatePfx) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &h.RecoveryPointID) - delete(rawMsg, key) - case "secondaryKekCertificatePfx": - err = unpopulate(val, "SecondaryKekCertificatePfx", &h.SecondaryKekCertificatePfx) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureUnplannedFailoverInput. -func (h HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "primaryKekCertificatePfx", h.PrimaryKekCertificatePfx) - populate(objectMap, "recoveryPointId", h.RecoveryPointID) - populate(objectMap, "secondaryKekCertificatePfx", h.SecondaryKekCertificatePfx) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureUnplannedFailoverInput. -func (h *HyperVReplicaAzureUnplannedFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "primaryKekCertificatePfx": - err = unpopulate(val, "PrimaryKekCertificatePfx", &h.PrimaryKekCertificatePfx) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &h.RecoveryPointID) - delete(rawMsg, key) - case "secondaryKekCertificatePfx": - err = unpopulate(val, "SecondaryKekCertificatePfx", &h.SecondaryKekCertificatePfx) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureUpdateReplicationProtectedItemInput. -func (h HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskIdToDiskEncryptionMap", h.DiskIDToDiskEncryptionMap) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "recoveryAzureV1ResourceGroupId", h.RecoveryAzureV1ResourceGroupID) - populate(objectMap, "recoveryAzureV2ResourceGroupId", h.RecoveryAzureV2ResourceGroupID) - populate(objectMap, "sqlServerLicenseType", h.SQLServerLicenseType) - populate(objectMap, "targetAvailabilityZone", h.TargetAvailabilityZone) - populate(objectMap, "targetManagedDiskTags", h.TargetManagedDiskTags) - populate(objectMap, "targetNicTags", h.TargetNicTags) - populate(objectMap, "targetProximityPlacementGroupId", h.TargetProximityPlacementGroupID) - populate(objectMap, "targetVmTags", h.TargetVMTags) - populate(objectMap, "useManagedDisks", h.UseManagedDisks) - populate(objectMap, "vmDisks", h.VMDisks) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureUpdateReplicationProtectedItemInput. -func (h *HyperVReplicaAzureUpdateReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskIdToDiskEncryptionMap": - err = unpopulate(val, "DiskIDToDiskEncryptionMap", &h.DiskIDToDiskEncryptionMap) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "recoveryAzureV1ResourceGroupId": - err = unpopulate(val, "RecoveryAzureV1ResourceGroupID", &h.RecoveryAzureV1ResourceGroupID) - delete(rawMsg, key) - case "recoveryAzureV2ResourceGroupId": - err = unpopulate(val, "RecoveryAzureV2ResourceGroupID", &h.RecoveryAzureV2ResourceGroupID) - delete(rawMsg, key) - case "sqlServerLicenseType": - err = unpopulate(val, "SQLServerLicenseType", &h.SQLServerLicenseType) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &h.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetManagedDiskTags": - err = unpopulate(val, "TargetManagedDiskTags", &h.TargetManagedDiskTags) - delete(rawMsg, key) - case "targetNicTags": - err = unpopulate(val, "TargetNicTags", &h.TargetNicTags) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &h.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetVmTags": - err = unpopulate(val, "TargetVMTags", &h.TargetVMTags) - delete(rawMsg, key) - case "useManagedDisks": - err = unpopulate(val, "UseManagedDisks", &h.UseManagedDisks) - delete(rawMsg, key) - case "vmDisks": - err = unpopulate(val, "VMDisks", &h.VMDisks) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBaseEventDetails. -func (h HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerName", h.ContainerName) - populate(objectMap, "fabricName", h.FabricName) - objectMap["instanceType"] = "HyperVReplicaBaseEventDetails" - populate(objectMap, "remoteContainerName", h.RemoteContainerName) - populate(objectMap, "remoteFabricName", h.RemoteFabricName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBaseEventDetails. -func (h *HyperVReplicaBaseEventDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containerName": - err = unpopulate(val, "ContainerName", &h.ContainerName) - delete(rawMsg, key) - case "fabricName": - err = unpopulate(val, "FabricName", &h.FabricName) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "remoteContainerName": - err = unpopulate(val, "RemoteContainerName", &h.RemoteContainerName) - delete(rawMsg, key) - case "remoteFabricName": - err = unpopulate(val, "RemoteFabricName", &h.RemoteFabricName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBasePolicyDetails. -func (h HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType) - populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) - populate(objectMap, "compression", h.Compression) - populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod) - objectMap["instanceType"] = "HyperVReplicaBasePolicyDetails" - populate(objectMap, "offlineReplicationExportPath", h.OfflineReplicationExportPath) - populate(objectMap, "offlineReplicationImportPath", h.OfflineReplicationImportPath) - populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) - populate(objectMap, "recoveryPoints", h.RecoveryPoints) - populate(objectMap, "replicaDeletionOption", h.ReplicaDeletionOption) - populate(objectMap, "replicationPort", h.ReplicationPort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBasePolicyDetails. -func (h *HyperVReplicaBasePolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedAuthenticationType": - err = unpopulate(val, "AllowedAuthenticationType", &h.AllowedAuthenticationType) - delete(rawMsg, key) - case "applicationConsistentSnapshotFrequencyInHours": - err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) - delete(rawMsg, key) - case "compression": - err = unpopulate(val, "Compression", &h.Compression) - delete(rawMsg, key) - case "initialReplicationMethod": - err = unpopulate(val, "InitialReplicationMethod", &h.InitialReplicationMethod) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "offlineReplicationExportPath": - err = unpopulate(val, "OfflineReplicationExportPath", &h.OfflineReplicationExportPath) - delete(rawMsg, key) - case "offlineReplicationImportPath": - err = unpopulate(val, "OfflineReplicationImportPath", &h.OfflineReplicationImportPath) - delete(rawMsg, key) - case "onlineReplicationStartTime": - err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) - delete(rawMsg, key) - case "recoveryPoints": - err = unpopulate(val, "RecoveryPoints", &h.RecoveryPoints) - delete(rawMsg, key) - case "replicaDeletionOption": - err = unpopulate(val, "ReplicaDeletionOption", &h.ReplicaDeletionOption) - delete(rawMsg, key) - case "replicationPort": - err = unpopulate(val, "ReplicationPort", &h.ReplicationPort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBaseReplicationDetails. -func (h HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "initialReplicationDetails", h.InitialReplicationDetails) - objectMap["instanceType"] = "HyperVReplicaBaseReplicationDetails" - populateTimeRFC3339(objectMap, "lastReplicatedTime", h.LastReplicatedTime) - populate(objectMap, "vMDiskDetails", h.VMDiskDetails) - populate(objectMap, "vmId", h.VMID) - populate(objectMap, "vmNics", h.VMNics) - populate(objectMap, "vmProtectionState", h.VMProtectionState) - populate(objectMap, "vmProtectionStateDescription", h.VMProtectionStateDescription) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBaseReplicationDetails. -func (h *HyperVReplicaBaseReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "initialReplicationDetails": - err = unpopulate(val, "InitialReplicationDetails", &h.InitialReplicationDetails) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "lastReplicatedTime": - err = unpopulateTimeRFC3339(val, "LastReplicatedTime", &h.LastReplicatedTime) - delete(rawMsg, key) - case "vMDiskDetails": - err = unpopulate(val, "VMDiskDetails", &h.VMDiskDetails) - delete(rawMsg, key) - case "vmId": - err = unpopulate(val, "VMID", &h.VMID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &h.VMNics) - delete(rawMsg, key) - case "vmProtectionState": - err = unpopulate(val, "VMProtectionState", &h.VMProtectionState) - delete(rawMsg, key) - case "vmProtectionStateDescription": - err = unpopulate(val, "VMProtectionStateDescription", &h.VMProtectionStateDescription) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBluePolicyDetails. -func (h HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType) - populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) - populate(objectMap, "compression", h.Compression) - populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod) - objectMap["instanceType"] = "HyperVReplica2012R2" - populate(objectMap, "offlineReplicationExportPath", h.OfflineReplicationExportPath) - populate(objectMap, "offlineReplicationImportPath", h.OfflineReplicationImportPath) - populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) - populate(objectMap, "recoveryPoints", h.RecoveryPoints) - populate(objectMap, "replicaDeletionOption", h.ReplicaDeletionOption) - populate(objectMap, "replicationFrequencyInSeconds", h.ReplicationFrequencyInSeconds) - populate(objectMap, "replicationPort", h.ReplicationPort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBluePolicyDetails. -func (h *HyperVReplicaBluePolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedAuthenticationType": - err = unpopulate(val, "AllowedAuthenticationType", &h.AllowedAuthenticationType) - delete(rawMsg, key) - case "applicationConsistentSnapshotFrequencyInHours": - err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) - delete(rawMsg, key) - case "compression": - err = unpopulate(val, "Compression", &h.Compression) - delete(rawMsg, key) - case "initialReplicationMethod": - err = unpopulate(val, "InitialReplicationMethod", &h.InitialReplicationMethod) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "offlineReplicationExportPath": - err = unpopulate(val, "OfflineReplicationExportPath", &h.OfflineReplicationExportPath) - delete(rawMsg, key) - case "offlineReplicationImportPath": - err = unpopulate(val, "OfflineReplicationImportPath", &h.OfflineReplicationImportPath) - delete(rawMsg, key) - case "onlineReplicationStartTime": - err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) - delete(rawMsg, key) - case "recoveryPoints": - err = unpopulate(val, "RecoveryPoints", &h.RecoveryPoints) - delete(rawMsg, key) - case "replicaDeletionOption": - err = unpopulate(val, "ReplicaDeletionOption", &h.ReplicaDeletionOption) - delete(rawMsg, key) - case "replicationFrequencyInSeconds": - err = unpopulate(val, "ReplicationFrequencyInSeconds", &h.ReplicationFrequencyInSeconds) - delete(rawMsg, key) - case "replicationPort": - err = unpopulate(val, "ReplicationPort", &h.ReplicationPort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBluePolicyInput. -func (h HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType) - populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) - populate(objectMap, "compression", h.Compression) - populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod) - objectMap["instanceType"] = "HyperVReplica2012R2" - populate(objectMap, "offlineReplicationExportPath", h.OfflineReplicationExportPath) - populate(objectMap, "offlineReplicationImportPath", h.OfflineReplicationImportPath) - populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) - populate(objectMap, "recoveryPoints", h.RecoveryPoints) - populate(objectMap, "replicaDeletion", h.ReplicaDeletion) - populate(objectMap, "replicationFrequencyInSeconds", h.ReplicationFrequencyInSeconds) - populate(objectMap, "replicationPort", h.ReplicationPort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBluePolicyInput. -func (h *HyperVReplicaBluePolicyInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedAuthenticationType": - err = unpopulate(val, "AllowedAuthenticationType", &h.AllowedAuthenticationType) - delete(rawMsg, key) - case "applicationConsistentSnapshotFrequencyInHours": - err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) - delete(rawMsg, key) - case "compression": - err = unpopulate(val, "Compression", &h.Compression) - delete(rawMsg, key) - case "initialReplicationMethod": - err = unpopulate(val, "InitialReplicationMethod", &h.InitialReplicationMethod) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "offlineReplicationExportPath": - err = unpopulate(val, "OfflineReplicationExportPath", &h.OfflineReplicationExportPath) - delete(rawMsg, key) - case "offlineReplicationImportPath": - err = unpopulate(val, "OfflineReplicationImportPath", &h.OfflineReplicationImportPath) - delete(rawMsg, key) - case "onlineReplicationStartTime": - err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) - delete(rawMsg, key) - case "recoveryPoints": - err = unpopulate(val, "RecoveryPoints", &h.RecoveryPoints) - delete(rawMsg, key) - case "replicaDeletion": - err = unpopulate(val, "ReplicaDeletion", &h.ReplicaDeletion) - delete(rawMsg, key) - case "replicationFrequencyInSeconds": - err = unpopulate(val, "ReplicationFrequencyInSeconds", &h.ReplicationFrequencyInSeconds) - delete(rawMsg, key) - case "replicationPort": - err = unpopulate(val, "ReplicationPort", &h.ReplicationPort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBlueReplicationDetails. -func (h HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "initialReplicationDetails", h.InitialReplicationDetails) - objectMap["instanceType"] = "HyperVReplica2012R2" - populateTimeRFC3339(objectMap, "lastReplicatedTime", h.LastReplicatedTime) - populate(objectMap, "vMDiskDetails", h.VMDiskDetails) - populate(objectMap, "vmId", h.VMID) - populate(objectMap, "vmNics", h.VMNics) - populate(objectMap, "vmProtectionState", h.VMProtectionState) - populate(objectMap, "vmProtectionStateDescription", h.VMProtectionStateDescription) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBlueReplicationDetails. -func (h *HyperVReplicaBlueReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "initialReplicationDetails": - err = unpopulate(val, "InitialReplicationDetails", &h.InitialReplicationDetails) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "lastReplicatedTime": - err = unpopulateTimeRFC3339(val, "LastReplicatedTime", &h.LastReplicatedTime) - delete(rawMsg, key) - case "vMDiskDetails": - err = unpopulate(val, "VMDiskDetails", &h.VMDiskDetails) - delete(rawMsg, key) - case "vmId": - err = unpopulate(val, "VMID", &h.VMID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &h.VMNics) - delete(rawMsg, key) - case "vmProtectionState": - err = unpopulate(val, "VMProtectionState", &h.VMProtectionState) - delete(rawMsg, key) - case "vmProtectionStateDescription": - err = unpopulate(val, "VMProtectionStateDescription", &h.VMProtectionStateDescription) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaPolicyDetails. -func (h HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType) - populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) - populate(objectMap, "compression", h.Compression) - populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod) - objectMap["instanceType"] = "HyperVReplica2012" - populate(objectMap, "offlineReplicationExportPath", h.OfflineReplicationExportPath) - populate(objectMap, "offlineReplicationImportPath", h.OfflineReplicationImportPath) - populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) - populate(objectMap, "recoveryPoints", h.RecoveryPoints) - populate(objectMap, "replicaDeletionOption", h.ReplicaDeletionOption) - populate(objectMap, "replicationPort", h.ReplicationPort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaPolicyDetails. -func (h *HyperVReplicaPolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedAuthenticationType": - err = unpopulate(val, "AllowedAuthenticationType", &h.AllowedAuthenticationType) - delete(rawMsg, key) - case "applicationConsistentSnapshotFrequencyInHours": - err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) - delete(rawMsg, key) - case "compression": - err = unpopulate(val, "Compression", &h.Compression) - delete(rawMsg, key) - case "initialReplicationMethod": - err = unpopulate(val, "InitialReplicationMethod", &h.InitialReplicationMethod) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "offlineReplicationExportPath": - err = unpopulate(val, "OfflineReplicationExportPath", &h.OfflineReplicationExportPath) - delete(rawMsg, key) - case "offlineReplicationImportPath": - err = unpopulate(val, "OfflineReplicationImportPath", &h.OfflineReplicationImportPath) - delete(rawMsg, key) - case "onlineReplicationStartTime": - err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) - delete(rawMsg, key) - case "recoveryPoints": - err = unpopulate(val, "RecoveryPoints", &h.RecoveryPoints) - delete(rawMsg, key) - case "replicaDeletionOption": - err = unpopulate(val, "ReplicaDeletionOption", &h.ReplicaDeletionOption) - delete(rawMsg, key) - case "replicationPort": - err = unpopulate(val, "ReplicationPort", &h.ReplicationPort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaPolicyInput. -func (h HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType) - populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) - populate(objectMap, "compression", h.Compression) - populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod) - objectMap["instanceType"] = "HyperVReplica2012" - populate(objectMap, "offlineReplicationExportPath", h.OfflineReplicationExportPath) - populate(objectMap, "offlineReplicationImportPath", h.OfflineReplicationImportPath) - populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) - populate(objectMap, "recoveryPoints", h.RecoveryPoints) - populate(objectMap, "replicaDeletion", h.ReplicaDeletion) - populate(objectMap, "replicationPort", h.ReplicationPort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaPolicyInput. -func (h *HyperVReplicaPolicyInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedAuthenticationType": - err = unpopulate(val, "AllowedAuthenticationType", &h.AllowedAuthenticationType) - delete(rawMsg, key) - case "applicationConsistentSnapshotFrequencyInHours": - err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) - delete(rawMsg, key) - case "compression": - err = unpopulate(val, "Compression", &h.Compression) - delete(rawMsg, key) - case "initialReplicationMethod": - err = unpopulate(val, "InitialReplicationMethod", &h.InitialReplicationMethod) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "offlineReplicationExportPath": - err = unpopulate(val, "OfflineReplicationExportPath", &h.OfflineReplicationExportPath) - delete(rawMsg, key) - case "offlineReplicationImportPath": - err = unpopulate(val, "OfflineReplicationImportPath", &h.OfflineReplicationImportPath) - delete(rawMsg, key) - case "onlineReplicationStartTime": - err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) - delete(rawMsg, key) - case "recoveryPoints": - err = unpopulate(val, "RecoveryPoints", &h.RecoveryPoints) - delete(rawMsg, key) - case "replicaDeletion": - err = unpopulate(val, "ReplicaDeletion", &h.ReplicaDeletion) - delete(rawMsg, key) - case "replicationPort": - err = unpopulate(val, "ReplicationPort", &h.ReplicationPort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaReplicationDetails. -func (h HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "initialReplicationDetails", h.InitialReplicationDetails) - objectMap["instanceType"] = "HyperVReplica2012" - populateTimeRFC3339(objectMap, "lastReplicatedTime", h.LastReplicatedTime) - populate(objectMap, "vMDiskDetails", h.VMDiskDetails) - populate(objectMap, "vmId", h.VMID) - populate(objectMap, "vmNics", h.VMNics) - populate(objectMap, "vmProtectionState", h.VMProtectionState) - populate(objectMap, "vmProtectionStateDescription", h.VMProtectionStateDescription) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaReplicationDetails. -func (h *HyperVReplicaReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "initialReplicationDetails": - err = unpopulate(val, "InitialReplicationDetails", &h.InitialReplicationDetails) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "lastReplicatedTime": - err = unpopulateTimeRFC3339(val, "LastReplicatedTime", &h.LastReplicatedTime) - delete(rawMsg, key) - case "vMDiskDetails": - err = unpopulate(val, "VMDiskDetails", &h.VMDiskDetails) - delete(rawMsg, key) - case "vmId": - err = unpopulate(val, "VMID", &h.VMID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &h.VMNics) - delete(rawMsg, key) - case "vmProtectionState": - err = unpopulate(val, "VMProtectionState", &h.VMProtectionState) - delete(rawMsg, key) - case "vmProtectionStateDescription": - err = unpopulate(val, "VMProtectionStateDescription", &h.VMProtectionStateDescription) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVSiteDetails. -func (h HyperVSiteDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hyperVHosts", h.HyperVHosts) - objectMap["instanceType"] = "HyperVSite" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVSiteDetails. -func (h *HyperVSiteDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "hyperVHosts": - err = unpopulate(val, "HyperVHosts", &h.HyperVHosts) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HyperVVirtualMachineDetails. -func (h HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskDetails", h.DiskDetails) - populate(objectMap, "generation", h.Generation) - populate(objectMap, "hasFibreChannelAdapter", h.HasFibreChannelAdapter) - populate(objectMap, "hasPhysicalDisk", h.HasPhysicalDisk) - populate(objectMap, "hasSharedVhd", h.HasSharedVhd) - populate(objectMap, "hyperVHostId", h.HyperVHostID) - objectMap["instanceType"] = "HyperVVirtualMachine" - populate(objectMap, "osDetails", h.OSDetails) - populate(objectMap, "sourceItemId", h.SourceItemID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVVirtualMachineDetails. -func (h *HyperVVirtualMachineDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskDetails": - err = unpopulate(val, "DiskDetails", &h.DiskDetails) - delete(rawMsg, key) - case "generation": - err = unpopulate(val, "Generation", &h.Generation) - delete(rawMsg, key) - case "hasFibreChannelAdapter": - err = unpopulate(val, "HasFibreChannelAdapter", &h.HasFibreChannelAdapter) - delete(rawMsg, key) - case "hasPhysicalDisk": - err = unpopulate(val, "HasPhysicalDisk", &h.HasPhysicalDisk) - delete(rawMsg, key) - case "hasSharedVhd": - err = unpopulate(val, "HasSharedVhd", &h.HasSharedVhd) - delete(rawMsg, key) - case "hyperVHostId": - err = unpopulate(val, "HyperVHostID", &h.HyperVHostID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &h.InstanceType) - delete(rawMsg, key) - case "osDetails": - err = unpopulate(val, "OSDetails", &h.OSDetails) - delete(rawMsg, key) - case "sourceItemId": - err = unpopulate(val, "SourceItemID", &h.SourceItemID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPConfigDetails. -func (i IPConfigDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipAddressType", i.IPAddressType) - populate(objectMap, "isPrimary", i.IsPrimary) - populate(objectMap, "isSeletedForFailover", i.IsSeletedForFailover) - populate(objectMap, "name", i.Name) - populate(objectMap, "recoveryIPAddressType", i.RecoveryIPAddressType) - populate(objectMap, "recoveryLBBackendAddressPoolIds", i.RecoveryLBBackendAddressPoolIDs) - populate(objectMap, "recoveryPublicIPAddressId", i.RecoveryPublicIPAddressID) - populate(objectMap, "recoveryStaticIPAddress", i.RecoveryStaticIPAddress) - populate(objectMap, "recoverySubnetName", i.RecoverySubnetName) - populate(objectMap, "staticIPAddress", i.StaticIPAddress) - populate(objectMap, "subnetName", i.SubnetName) - populate(objectMap, "tfoLBBackendAddressPoolIds", i.TfoLBBackendAddressPoolIDs) - populate(objectMap, "tfoPublicIPAddressId", i.TfoPublicIPAddressID) - populate(objectMap, "tfoStaticIPAddress", i.TfoStaticIPAddress) - populate(objectMap, "tfoSubnetName", i.TfoSubnetName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigDetails. -func (i *IPConfigDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ipAddressType": - err = unpopulate(val, "IPAddressType", &i.IPAddressType) - delete(rawMsg, key) - case "isPrimary": - err = unpopulate(val, "IsPrimary", &i.IsPrimary) - delete(rawMsg, key) - case "isSeletedForFailover": - err = unpopulate(val, "IsSeletedForFailover", &i.IsSeletedForFailover) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "recoveryIPAddressType": - err = unpopulate(val, "RecoveryIPAddressType", &i.RecoveryIPAddressType) - delete(rawMsg, key) - case "recoveryLBBackendAddressPoolIds": - err = unpopulate(val, "RecoveryLBBackendAddressPoolIDs", &i.RecoveryLBBackendAddressPoolIDs) - delete(rawMsg, key) - case "recoveryPublicIPAddressId": - err = unpopulate(val, "RecoveryPublicIPAddressID", &i.RecoveryPublicIPAddressID) - delete(rawMsg, key) - case "recoveryStaticIPAddress": - err = unpopulate(val, "RecoveryStaticIPAddress", &i.RecoveryStaticIPAddress) - delete(rawMsg, key) - case "recoverySubnetName": - err = unpopulate(val, "RecoverySubnetName", &i.RecoverySubnetName) - delete(rawMsg, key) - case "staticIPAddress": - err = unpopulate(val, "StaticIPAddress", &i.StaticIPAddress) - delete(rawMsg, key) - case "subnetName": - err = unpopulate(val, "SubnetName", &i.SubnetName) - delete(rawMsg, key) - case "tfoLBBackendAddressPoolIds": - err = unpopulate(val, "TfoLBBackendAddressPoolIDs", &i.TfoLBBackendAddressPoolIDs) - delete(rawMsg, key) - case "tfoPublicIPAddressId": - err = unpopulate(val, "TfoPublicIPAddressID", &i.TfoPublicIPAddressID) - delete(rawMsg, key) - case "tfoStaticIPAddress": - err = unpopulate(val, "TfoStaticIPAddress", &i.TfoStaticIPAddress) - delete(rawMsg, key) - case "tfoSubnetName": - err = unpopulate(val, "TfoSubnetName", &i.TfoSubnetName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IPConfigInputDetails. -func (i IPConfigInputDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipConfigName", i.IPConfigName) - populate(objectMap, "isPrimary", i.IsPrimary) - populate(objectMap, "isSeletedForFailover", i.IsSeletedForFailover) - populate(objectMap, "recoveryLBBackendAddressPoolIds", i.RecoveryLBBackendAddressPoolIDs) - populate(objectMap, "recoveryPublicIPAddressId", i.RecoveryPublicIPAddressID) - populate(objectMap, "recoveryStaticIPAddress", i.RecoveryStaticIPAddress) - populate(objectMap, "recoverySubnetName", i.RecoverySubnetName) - populate(objectMap, "tfoLBBackendAddressPoolIds", i.TfoLBBackendAddressPoolIDs) - populate(objectMap, "tfoPublicIPAddressId", i.TfoPublicIPAddressID) - populate(objectMap, "tfoStaticIPAddress", i.TfoStaticIPAddress) - populate(objectMap, "tfoSubnetName", i.TfoSubnetName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigInputDetails. -func (i *IPConfigInputDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ipConfigName": - err = unpopulate(val, "IPConfigName", &i.IPConfigName) - delete(rawMsg, key) - case "isPrimary": - err = unpopulate(val, "IsPrimary", &i.IsPrimary) - delete(rawMsg, key) - case "isSeletedForFailover": - err = unpopulate(val, "IsSeletedForFailover", &i.IsSeletedForFailover) - delete(rawMsg, key) - case "recoveryLBBackendAddressPoolIds": - err = unpopulate(val, "RecoveryLBBackendAddressPoolIDs", &i.RecoveryLBBackendAddressPoolIDs) - delete(rawMsg, key) - case "recoveryPublicIPAddressId": - err = unpopulate(val, "RecoveryPublicIPAddressID", &i.RecoveryPublicIPAddressID) - delete(rawMsg, key) - case "recoveryStaticIPAddress": - err = unpopulate(val, "RecoveryStaticIPAddress", &i.RecoveryStaticIPAddress) - delete(rawMsg, key) - case "recoverySubnetName": - err = unpopulate(val, "RecoverySubnetName", &i.RecoverySubnetName) - delete(rawMsg, key) - case "tfoLBBackendAddressPoolIds": - err = unpopulate(val, "TfoLBBackendAddressPoolIDs", &i.TfoLBBackendAddressPoolIDs) - delete(rawMsg, key) - case "tfoPublicIPAddressId": - err = unpopulate(val, "TfoPublicIPAddressID", &i.TfoPublicIPAddressID) - delete(rawMsg, key) - case "tfoStaticIPAddress": - err = unpopulate(val, "TfoStaticIPAddress", &i.TfoStaticIPAddress) - delete(rawMsg, key) - case "tfoSubnetName": - err = unpopulate(val, "TfoSubnetName", &i.TfoSubnetName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviderDetails. -func (i IdentityProviderDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aadAuthority", i.AADAuthority) - populate(objectMap, "applicationId", i.ApplicationID) - populate(objectMap, "audience", i.Audience) - populate(objectMap, "objectId", i.ObjectID) - populate(objectMap, "tenantId", i.TenantID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderDetails. -func (i *IdentityProviderDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aadAuthority": - err = unpopulate(val, "AADAuthority", &i.AADAuthority) - delete(rawMsg, key) - case "applicationId": - err = unpopulate(val, "ApplicationID", &i.ApplicationID) - delete(rawMsg, key) - case "audience": - err = unpopulate(val, "Audience", &i.Audience) - delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &i.ObjectID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &i.TenantID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityProviderInput. -func (i IdentityProviderInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aadAuthority", i.AADAuthority) - populate(objectMap, "applicationId", i.ApplicationID) - populate(objectMap, "audience", i.Audience) - populate(objectMap, "objectId", i.ObjectID) - populate(objectMap, "tenantId", i.TenantID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderInput. -func (i *IdentityProviderInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aadAuthority": - err = unpopulate(val, "AADAuthority", &i.AADAuthority) - delete(rawMsg, key) - case "applicationId": - err = unpopulate(val, "ApplicationID", &i.ApplicationID) - delete(rawMsg, key) - case "audience": - err = unpopulate(val, "Audience", &i.Audience) - delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &i.ObjectID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &i.TenantID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAgentDetails. -func (i InMageAgentDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "agentExpiryDate", i.AgentExpiryDate) - populate(objectMap, "agentUpdateStatus", i.AgentUpdateStatus) - populate(objectMap, "agentVersion", i.AgentVersion) - populate(objectMap, "postUpdateRebootStatus", i.PostUpdateRebootStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAgentDetails. -func (i *InMageAgentDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentExpiryDate": - err = unpopulateTimeRFC3339(val, "AgentExpiryDate", &i.AgentExpiryDate) - delete(rawMsg, key) - case "agentUpdateStatus": - err = unpopulate(val, "AgentUpdateStatus", &i.AgentUpdateStatus) - delete(rawMsg, key) - case "agentVersion": - err = unpopulate(val, "AgentVersion", &i.AgentVersion) - delete(rawMsg, key) - case "postUpdateRebootStatus": - err = unpopulate(val, "PostUpdateRebootStatus", &i.PostUpdateRebootStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2ApplyRecoveryPointInput. -func (i InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageAzureV2" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2ApplyRecoveryPointInput. -func (i *InMageAzureV2ApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2DiskInputDetails. -func (i InMageAzureV2DiskInputDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) - populate(objectMap, "diskId", i.DiskID) - populate(objectMap, "diskType", i.DiskType) - populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2DiskInputDetails. -func (i *InMageAzureV2DiskInputDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &i.DiskID) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &i.DiskType) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2EnableProtectionInput. -func (i InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) - populate(objectMap, "diskType", i.DiskType) - populate(objectMap, "disksToInclude", i.DisksToInclude) - populate(objectMap, "enableRdpOnTargetOption", i.EnableRdpOnTargetOption) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "licenseType", i.LicenseType) - populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) - populate(objectMap, "masterTargetId", i.MasterTargetID) - populate(objectMap, "multiVmGroupId", i.MultiVMGroupID) - populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) - populate(objectMap, "processServerId", i.ProcessServerID) - populate(objectMap, "runAsAccountId", i.RunAsAccountID) - populate(objectMap, "sqlServerLicenseType", i.SQLServerLicenseType) - populate(objectMap, "seedManagedDiskTags", i.SeedManagedDiskTags) - populate(objectMap, "storageAccountId", i.StorageAccountID) - populate(objectMap, "targetAvailabilitySetId", i.TargetAvailabilitySetID) - populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) - populate(objectMap, "targetAzureNetworkId", i.TargetAzureNetworkID) - populate(objectMap, "targetAzureSubnetId", i.TargetAzureSubnetID) - populate(objectMap, "targetAzureV1ResourceGroupId", i.TargetAzureV1ResourceGroupID) - populate(objectMap, "targetAzureV2ResourceGroupId", i.TargetAzureV2ResourceGroupID) - populate(objectMap, "targetAzureVmName", i.TargetAzureVMName) - populate(objectMap, "targetManagedDiskTags", i.TargetManagedDiskTags) - populate(objectMap, "targetNicTags", i.TargetNicTags) - populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) - populate(objectMap, "targetVmSize", i.TargetVMSize) - populate(objectMap, "targetVmTags", i.TargetVMTags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2EnableProtectionInput. -func (i *InMageAzureV2EnableProtectionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &i.DiskType) - delete(rawMsg, key) - case "disksToInclude": - err = unpopulate(val, "DisksToInclude", &i.DisksToInclude) - delete(rawMsg, key) - case "enableRdpOnTargetOption": - err = unpopulate(val, "EnableRdpOnTargetOption", &i.EnableRdpOnTargetOption) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &i.LicenseType) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) - delete(rawMsg, key) - case "masterTargetId": - err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) - delete(rawMsg, key) - case "multiVmGroupId": - err = unpopulate(val, "MultiVMGroupID", &i.MultiVMGroupID) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) - delete(rawMsg, key) - case "sqlServerLicenseType": - err = unpopulate(val, "SQLServerLicenseType", &i.SQLServerLicenseType) - delete(rawMsg, key) - case "seedManagedDiskTags": - err = unpopulate(val, "SeedManagedDiskTags", &i.SeedManagedDiskTags) - delete(rawMsg, key) - case "storageAccountId": - err = unpopulate(val, "StorageAccountID", &i.StorageAccountID) - delete(rawMsg, key) - case "targetAvailabilitySetId": - err = unpopulate(val, "TargetAvailabilitySetID", &i.TargetAvailabilitySetID) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetAzureNetworkId": - err = unpopulate(val, "TargetAzureNetworkID", &i.TargetAzureNetworkID) - delete(rawMsg, key) - case "targetAzureSubnetId": - err = unpopulate(val, "TargetAzureSubnetID", &i.TargetAzureSubnetID) - delete(rawMsg, key) - case "targetAzureV1ResourceGroupId": - err = unpopulate(val, "TargetAzureV1ResourceGroupID", &i.TargetAzureV1ResourceGroupID) - delete(rawMsg, key) - case "targetAzureV2ResourceGroupId": - err = unpopulate(val, "TargetAzureV2ResourceGroupID", &i.TargetAzureV2ResourceGroupID) - delete(rawMsg, key) - case "targetAzureVmName": - err = unpopulate(val, "TargetAzureVMName", &i.TargetAzureVMName) - delete(rawMsg, key) - case "targetManagedDiskTags": - err = unpopulate(val, "TargetManagedDiskTags", &i.TargetManagedDiskTags) - delete(rawMsg, key) - case "targetNicTags": - err = unpopulate(val, "TargetNicTags", &i.TargetNicTags) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetVmSize": - err = unpopulate(val, "TargetVMSize", &i.TargetVMSize) - delete(rawMsg, key) - case "targetVmTags": - err = unpopulate(val, "TargetVMTags", &i.TargetVMTags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2EventDetails. -func (i InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "category", i.Category) - populate(objectMap, "component", i.Component) - populate(objectMap, "correctiveAction", i.CorrectiveAction) - populate(objectMap, "details", i.Details) - populate(objectMap, "eventType", i.EventType) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "siteName", i.SiteName) - populate(objectMap, "summary", i.Summary) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2EventDetails. -func (i *InMageAzureV2EventDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "category": - err = unpopulate(val, "Category", &i.Category) - delete(rawMsg, key) - case "component": - err = unpopulate(val, "Component", &i.Component) - delete(rawMsg, key) - case "correctiveAction": - err = unpopulate(val, "CorrectiveAction", &i.CorrectiveAction) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &i.Details) - delete(rawMsg, key) - case "eventType": - err = unpopulate(val, "EventType", &i.EventType) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "siteName": - err = unpopulate(val, "SiteName", &i.SiteName) - delete(rawMsg, key) - case "summary": - err = unpopulate(val, "Summary", &i.Summary) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2ManagedDiskDetails. -func (i InMageAzureV2ManagedDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) - populate(objectMap, "diskId", i.DiskID) - populate(objectMap, "replicaDiskType", i.ReplicaDiskType) - populate(objectMap, "seedManagedDiskId", i.SeedManagedDiskID) - populate(objectMap, "targetDiskName", i.TargetDiskName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2ManagedDiskDetails. -func (i *InMageAzureV2ManagedDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &i.DiskID) - delete(rawMsg, key) - case "replicaDiskType": - err = unpopulate(val, "ReplicaDiskType", &i.ReplicaDiskType) - delete(rawMsg, key) - case "seedManagedDiskId": - err = unpopulate(val, "SeedManagedDiskID", &i.SeedManagedDiskID) - delete(rawMsg, key) - case "targetDiskName": - err = unpopulate(val, "TargetDiskName", &i.TargetDiskName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2PolicyDetails. -func (i InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) - populate(objectMap, "recoveryPointHistory", i.RecoveryPointHistory) - populate(objectMap, "recoveryPointThresholdInMinutes", i.RecoveryPointThresholdInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2PolicyDetails. -func (i *InMageAzureV2PolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "multiVmSyncStatus": - err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) - delete(rawMsg, key) - case "recoveryPointHistory": - err = unpopulate(val, "RecoveryPointHistory", &i.RecoveryPointHistory) - delete(rawMsg, key) - case "recoveryPointThresholdInMinutes": - err = unpopulate(val, "RecoveryPointThresholdInMinutes", &i.RecoveryPointThresholdInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2PolicyInput. -func (i InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) - populate(objectMap, "recoveryPointHistory", i.RecoveryPointHistory) - populate(objectMap, "recoveryPointThresholdInMinutes", i.RecoveryPointThresholdInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2PolicyInput. -func (i *InMageAzureV2PolicyInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "multiVmSyncStatus": - err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) - delete(rawMsg, key) - case "recoveryPointHistory": - err = unpopulate(val, "RecoveryPointHistory", &i.RecoveryPointHistory) - delete(rawMsg, key) - case "recoveryPointThresholdInMinutes": - err = unpopulate(val, "RecoveryPointThresholdInMinutes", &i.RecoveryPointThresholdInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2ProtectedDiskDetails. -func (i InMageAzureV2ProtectedDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskCapacityInBytes", i.DiskCapacityInBytes) - populate(objectMap, "diskId", i.DiskID) - populate(objectMap, "diskName", i.DiskName) - populate(objectMap, "diskResized", i.DiskResized) - populate(objectMap, "fileSystemCapacityInBytes", i.FileSystemCapacityInBytes) - populate(objectMap, "healthErrorCode", i.HealthErrorCode) - populateTimeRFC3339(objectMap, "lastRpoCalculatedTime", i.LastRpoCalculatedTime) - populate(objectMap, "progressHealth", i.ProgressHealth) - populate(objectMap, "progressStatus", i.ProgressStatus) - populate(objectMap, "protectionStage", i.ProtectionStage) - populate(objectMap, "psDataInMegaBytes", i.PsDataInMegaBytes) - populate(objectMap, "resyncDurationInSeconds", i.ResyncDurationInSeconds) - populate(objectMap, "resyncLast15MinutesTransferredBytes", i.ResyncLast15MinutesTransferredBytes) - populateTimeRFC3339(objectMap, "resyncLastDataTransferTimeUTC", i.ResyncLastDataTransferTimeUTC) - populate(objectMap, "resyncProcessedBytes", i.ResyncProcessedBytes) - populate(objectMap, "resyncProgressPercentage", i.ResyncProgressPercentage) - populate(objectMap, "resyncRequired", i.ResyncRequired) - populateTimeRFC3339(objectMap, "resyncStartTime", i.ResyncStartTime) - populate(objectMap, "resyncTotalTransferredBytes", i.ResyncTotalTransferredBytes) - populate(objectMap, "rpoInSeconds", i.RpoInSeconds) - populate(objectMap, "secondsToTakeSwitchProvider", i.SecondsToTakeSwitchProvider) - populate(objectMap, "sourceDataInMegaBytes", i.SourceDataInMegaBytes) - populate(objectMap, "targetDataInMegaBytes", i.TargetDataInMegaBytes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2ProtectedDiskDetails. -func (i *InMageAzureV2ProtectedDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskCapacityInBytes": - err = unpopulate(val, "DiskCapacityInBytes", &i.DiskCapacityInBytes) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &i.DiskID) - delete(rawMsg, key) - case "diskName": - err = unpopulate(val, "DiskName", &i.DiskName) - delete(rawMsg, key) - case "diskResized": - err = unpopulate(val, "DiskResized", &i.DiskResized) - delete(rawMsg, key) - case "fileSystemCapacityInBytes": - err = unpopulate(val, "FileSystemCapacityInBytes", &i.FileSystemCapacityInBytes) - delete(rawMsg, key) - case "healthErrorCode": - err = unpopulate(val, "HealthErrorCode", &i.HealthErrorCode) - delete(rawMsg, key) - case "lastRpoCalculatedTime": - err = unpopulateTimeRFC3339(val, "LastRpoCalculatedTime", &i.LastRpoCalculatedTime) - delete(rawMsg, key) - case "progressHealth": - err = unpopulate(val, "ProgressHealth", &i.ProgressHealth) - delete(rawMsg, key) - case "progressStatus": - err = unpopulate(val, "ProgressStatus", &i.ProgressStatus) - delete(rawMsg, key) - case "protectionStage": - err = unpopulate(val, "ProtectionStage", &i.ProtectionStage) - delete(rawMsg, key) - case "psDataInMegaBytes": - err = unpopulate(val, "PsDataInMegaBytes", &i.PsDataInMegaBytes) - delete(rawMsg, key) - case "resyncDurationInSeconds": - err = unpopulate(val, "ResyncDurationInSeconds", &i.ResyncDurationInSeconds) - delete(rawMsg, key) - case "resyncLast15MinutesTransferredBytes": - err = unpopulate(val, "ResyncLast15MinutesTransferredBytes", &i.ResyncLast15MinutesTransferredBytes) - delete(rawMsg, key) - case "resyncLastDataTransferTimeUTC": - err = unpopulateTimeRFC3339(val, "ResyncLastDataTransferTimeUTC", &i.ResyncLastDataTransferTimeUTC) - delete(rawMsg, key) - case "resyncProcessedBytes": - err = unpopulate(val, "ResyncProcessedBytes", &i.ResyncProcessedBytes) - delete(rawMsg, key) - case "resyncProgressPercentage": - err = unpopulate(val, "ResyncProgressPercentage", &i.ResyncProgressPercentage) - delete(rawMsg, key) - case "resyncRequired": - err = unpopulate(val, "ResyncRequired", &i.ResyncRequired) - delete(rawMsg, key) - case "resyncStartTime": - err = unpopulateTimeRFC3339(val, "ResyncStartTime", &i.ResyncStartTime) - delete(rawMsg, key) - case "resyncTotalTransferredBytes": - err = unpopulate(val, "ResyncTotalTransferredBytes", &i.ResyncTotalTransferredBytes) - delete(rawMsg, key) - case "rpoInSeconds": - err = unpopulate(val, "RpoInSeconds", &i.RpoInSeconds) - delete(rawMsg, key) - case "secondsToTakeSwitchProvider": - err = unpopulate(val, "SecondsToTakeSwitchProvider", &i.SecondsToTakeSwitchProvider) - delete(rawMsg, key) - case "sourceDataInMegaBytes": - err = unpopulate(val, "SourceDataInMegaBytes", &i.SourceDataInMegaBytes) - delete(rawMsg, key) - case "targetDataInMegaBytes": - err = unpopulate(val, "TargetDataInMegaBytes", &i.TargetDataInMegaBytes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2RecoveryPointDetails. -func (i InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "isMultiVmSyncPoint", i.IsMultiVMSyncPoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2RecoveryPointDetails. -func (i *InMageAzureV2RecoveryPointDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "isMultiVmSyncPoint": - err = unpopulate(val, "IsMultiVMSyncPoint", &i.IsMultiVMSyncPoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2ReplicationDetails. -func (i InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "agentExpiryDate", i.AgentExpiryDate) - populate(objectMap, "agentVersion", i.AgentVersion) - populate(objectMap, "azureVMDiskDetails", i.AzureVMDiskDetails) - populate(objectMap, "azureVmGeneration", i.AzureVMGeneration) - populate(objectMap, "compressedDataRateInMB", i.CompressedDataRateInMB) - populate(objectMap, "datastores", i.Datastores) - populate(objectMap, "discoveryType", i.DiscoveryType) - populate(objectMap, "diskResized", i.DiskResized) - populate(objectMap, "enableRdpOnTargetOption", i.EnableRdpOnTargetOption) - populate(objectMap, "firmwareType", i.FirmwareType) - populate(objectMap, "ipAddress", i.IPAddress) - populate(objectMap, "infrastructureVmId", i.InfrastructureVMID) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "isAdditionalStatsAvailable", i.IsAdditionalStatsAvailable) - populate(objectMap, "isAgentUpdateRequired", i.IsAgentUpdateRequired) - populate(objectMap, "isRebootAfterUpdateRequired", i.IsRebootAfterUpdateRequired) - populateTimeRFC3339(objectMap, "lastHeartbeat", i.LastHeartbeat) - populateTimeRFC3339(objectMap, "lastRecoveryPointReceived", i.LastRecoveryPointReceived) - populateTimeRFC3339(objectMap, "lastRpoCalculatedTime", i.LastRpoCalculatedTime) - populateTimeRFC3339(objectMap, "lastUpdateReceivedTime", i.LastUpdateReceivedTime) - populate(objectMap, "licenseType", i.LicenseType) - populate(objectMap, "masterTargetId", i.MasterTargetID) - populate(objectMap, "multiVmGroupId", i.MultiVMGroupID) - populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) - populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) - populate(objectMap, "osDiskId", i.OSDiskID) - populate(objectMap, "osType", i.OSType) - populate(objectMap, "osVersion", i.OSVersion) - populate(objectMap, "processServerId", i.ProcessServerID) - populate(objectMap, "processServerName", i.ProcessServerName) - populate(objectMap, "protectedDisks", i.ProtectedDisks) - populate(objectMap, "protectedManagedDisks", i.ProtectedManagedDisks) - populate(objectMap, "protectionStage", i.ProtectionStage) - populate(objectMap, "recoveryAvailabilitySetId", i.RecoveryAvailabilitySetID) - populate(objectMap, "recoveryAzureLogStorageAccountId", i.RecoveryAzureLogStorageAccountID) - populate(objectMap, "recoveryAzureResourceGroupId", i.RecoveryAzureResourceGroupID) - populate(objectMap, "recoveryAzureStorageAccount", i.RecoveryAzureStorageAccount) - populate(objectMap, "recoveryAzureVMName", i.RecoveryAzureVMName) - populate(objectMap, "recoveryAzureVMSize", i.RecoveryAzureVMSize) - populate(objectMap, "replicaId", i.ReplicaID) - populate(objectMap, "resyncProgressPercentage", i.ResyncProgressPercentage) - populate(objectMap, "rpoInSeconds", i.RpoInSeconds) - populate(objectMap, "sqlServerLicenseType", i.SQLServerLicenseType) - populate(objectMap, "seedManagedDiskTags", i.SeedManagedDiskTags) - populate(objectMap, "selectedRecoveryAzureNetworkId", i.SelectedRecoveryAzureNetworkID) - populate(objectMap, "selectedSourceNicId", i.SelectedSourceNicID) - populate(objectMap, "selectedTfoAzureNetworkId", i.SelectedTfoAzureNetworkID) - populate(objectMap, "sourceVmCpuCount", i.SourceVMCPUCount) - populate(objectMap, "sourceVmRamSizeInMB", i.SourceVMRAMSizeInMB) - populate(objectMap, "switchProviderBlockingErrorDetails", i.SwitchProviderBlockingErrorDetails) - populate(objectMap, "switchProviderDetails", i.SwitchProviderDetails) - populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) - populate(objectMap, "targetManagedDiskTags", i.TargetManagedDiskTags) - populate(objectMap, "targetNicTags", i.TargetNicTags) - populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) - populate(objectMap, "targetVmId", i.TargetVMID) - populate(objectMap, "targetVmTags", i.TargetVMTags) - populate(objectMap, "totalDataTransferred", i.TotalDataTransferred) - populate(objectMap, "totalProgressHealth", i.TotalProgressHealth) - populate(objectMap, "uncompressedDataRateInMB", i.UncompressedDataRateInMB) - populate(objectMap, "useManagedDisks", i.UseManagedDisks) - populate(objectMap, "vCenterInfrastructureId", i.VCenterInfrastructureID) - populate(objectMap, "vmId", i.VMID) - populate(objectMap, "vmNics", i.VMNics) - populate(objectMap, "vmProtectionState", i.VMProtectionState) - populate(objectMap, "vmProtectionStateDescription", i.VMProtectionStateDescription) - populate(objectMap, "validationErrors", i.ValidationErrors) - populate(objectMap, "vhdName", i.VhdName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2ReplicationDetails. -func (i *InMageAzureV2ReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentExpiryDate": - err = unpopulateTimeRFC3339(val, "AgentExpiryDate", &i.AgentExpiryDate) - delete(rawMsg, key) - case "agentVersion": - err = unpopulate(val, "AgentVersion", &i.AgentVersion) - delete(rawMsg, key) - case "azureVMDiskDetails": - err = unpopulate(val, "AzureVMDiskDetails", &i.AzureVMDiskDetails) - delete(rawMsg, key) - case "azureVmGeneration": - err = unpopulate(val, "AzureVMGeneration", &i.AzureVMGeneration) - delete(rawMsg, key) - case "compressedDataRateInMB": - err = unpopulate(val, "CompressedDataRateInMB", &i.CompressedDataRateInMB) - delete(rawMsg, key) - case "datastores": - err = unpopulate(val, "Datastores", &i.Datastores) - delete(rawMsg, key) - case "discoveryType": - err = unpopulate(val, "DiscoveryType", &i.DiscoveryType) - delete(rawMsg, key) - case "diskResized": - err = unpopulate(val, "DiskResized", &i.DiskResized) - delete(rawMsg, key) - case "enableRdpOnTargetOption": - err = unpopulate(val, "EnableRdpOnTargetOption", &i.EnableRdpOnTargetOption) - delete(rawMsg, key) - case "firmwareType": - err = unpopulate(val, "FirmwareType", &i.FirmwareType) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &i.IPAddress) - delete(rawMsg, key) - case "infrastructureVmId": - err = unpopulate(val, "InfrastructureVMID", &i.InfrastructureVMID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "isAdditionalStatsAvailable": - err = unpopulate(val, "IsAdditionalStatsAvailable", &i.IsAdditionalStatsAvailable) - delete(rawMsg, key) - case "isAgentUpdateRequired": - err = unpopulate(val, "IsAgentUpdateRequired", &i.IsAgentUpdateRequired) - delete(rawMsg, key) - case "isRebootAfterUpdateRequired": - err = unpopulate(val, "IsRebootAfterUpdateRequired", &i.IsRebootAfterUpdateRequired) - delete(rawMsg, key) - case "lastHeartbeat": - err = unpopulateTimeRFC3339(val, "LastHeartbeat", &i.LastHeartbeat) - delete(rawMsg, key) - case "lastRecoveryPointReceived": - err = unpopulateTimeRFC3339(val, "LastRecoveryPointReceived", &i.LastRecoveryPointReceived) - delete(rawMsg, key) - case "lastRpoCalculatedTime": - err = unpopulateTimeRFC3339(val, "LastRpoCalculatedTime", &i.LastRpoCalculatedTime) - delete(rawMsg, key) - case "lastUpdateReceivedTime": - err = unpopulateTimeRFC3339(val, "LastUpdateReceivedTime", &i.LastUpdateReceivedTime) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &i.LicenseType) - delete(rawMsg, key) - case "masterTargetId": - err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) - delete(rawMsg, key) - case "multiVmGroupId": - err = unpopulate(val, "MultiVMGroupID", &i.MultiVMGroupID) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) - delete(rawMsg, key) - case "multiVmSyncStatus": - err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) - delete(rawMsg, key) - case "osDiskId": - err = unpopulate(val, "OSDiskID", &i.OSDiskID) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &i.OSType) - delete(rawMsg, key) - case "osVersion": - err = unpopulate(val, "OSVersion", &i.OSVersion) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) - delete(rawMsg, key) - case "processServerName": - err = unpopulate(val, "ProcessServerName", &i.ProcessServerName) - delete(rawMsg, key) - case "protectedDisks": - err = unpopulate(val, "ProtectedDisks", &i.ProtectedDisks) - delete(rawMsg, key) - case "protectedManagedDisks": - err = unpopulate(val, "ProtectedManagedDisks", &i.ProtectedManagedDisks) - delete(rawMsg, key) - case "protectionStage": - err = unpopulate(val, "ProtectionStage", &i.ProtectionStage) - delete(rawMsg, key) - case "recoveryAvailabilitySetId": - err = unpopulate(val, "RecoveryAvailabilitySetID", &i.RecoveryAvailabilitySetID) - delete(rawMsg, key) - case "recoveryAzureLogStorageAccountId": - err = unpopulate(val, "RecoveryAzureLogStorageAccountID", &i.RecoveryAzureLogStorageAccountID) - delete(rawMsg, key) - case "recoveryAzureResourceGroupId": - err = unpopulate(val, "RecoveryAzureResourceGroupID", &i.RecoveryAzureResourceGroupID) - delete(rawMsg, key) - case "recoveryAzureStorageAccount": - err = unpopulate(val, "RecoveryAzureStorageAccount", &i.RecoveryAzureStorageAccount) - delete(rawMsg, key) - case "recoveryAzureVMName": - err = unpopulate(val, "RecoveryAzureVMName", &i.RecoveryAzureVMName) - delete(rawMsg, key) - case "recoveryAzureVMSize": - err = unpopulate(val, "RecoveryAzureVMSize", &i.RecoveryAzureVMSize) - delete(rawMsg, key) - case "replicaId": - err = unpopulate(val, "ReplicaID", &i.ReplicaID) - delete(rawMsg, key) - case "resyncProgressPercentage": - err = unpopulate(val, "ResyncProgressPercentage", &i.ResyncProgressPercentage) - delete(rawMsg, key) - case "rpoInSeconds": - err = unpopulate(val, "RpoInSeconds", &i.RpoInSeconds) - delete(rawMsg, key) - case "sqlServerLicenseType": - err = unpopulate(val, "SQLServerLicenseType", &i.SQLServerLicenseType) - delete(rawMsg, key) - case "seedManagedDiskTags": - err = unpopulate(val, "SeedManagedDiskTags", &i.SeedManagedDiskTags) - delete(rawMsg, key) - case "selectedRecoveryAzureNetworkId": - err = unpopulate(val, "SelectedRecoveryAzureNetworkID", &i.SelectedRecoveryAzureNetworkID) - delete(rawMsg, key) - case "selectedSourceNicId": - err = unpopulate(val, "SelectedSourceNicID", &i.SelectedSourceNicID) - delete(rawMsg, key) - case "selectedTfoAzureNetworkId": - err = unpopulate(val, "SelectedTfoAzureNetworkID", &i.SelectedTfoAzureNetworkID) - delete(rawMsg, key) - case "sourceVmCpuCount": - err = unpopulate(val, "SourceVMCPUCount", &i.SourceVMCPUCount) - delete(rawMsg, key) - case "sourceVmRamSizeInMB": - err = unpopulate(val, "SourceVMRAMSizeInMB", &i.SourceVMRAMSizeInMB) - delete(rawMsg, key) - case "switchProviderBlockingErrorDetails": - err = unpopulate(val, "SwitchProviderBlockingErrorDetails", &i.SwitchProviderBlockingErrorDetails) - delete(rawMsg, key) - case "switchProviderDetails": - err = unpopulate(val, "SwitchProviderDetails", &i.SwitchProviderDetails) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetManagedDiskTags": - err = unpopulate(val, "TargetManagedDiskTags", &i.TargetManagedDiskTags) - delete(rawMsg, key) - case "targetNicTags": - err = unpopulate(val, "TargetNicTags", &i.TargetNicTags) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetVmId": - err = unpopulate(val, "TargetVMID", &i.TargetVMID) - delete(rawMsg, key) - case "targetVmTags": - err = unpopulate(val, "TargetVMTags", &i.TargetVMTags) - delete(rawMsg, key) - case "totalDataTransferred": - err = unpopulate(val, "TotalDataTransferred", &i.TotalDataTransferred) - delete(rawMsg, key) - case "totalProgressHealth": - err = unpopulate(val, "TotalProgressHealth", &i.TotalProgressHealth) - delete(rawMsg, key) - case "uncompressedDataRateInMB": - err = unpopulate(val, "UncompressedDataRateInMB", &i.UncompressedDataRateInMB) - delete(rawMsg, key) - case "useManagedDisks": - err = unpopulate(val, "UseManagedDisks", &i.UseManagedDisks) - delete(rawMsg, key) - case "vCenterInfrastructureId": - err = unpopulate(val, "VCenterInfrastructureID", &i.VCenterInfrastructureID) - delete(rawMsg, key) - case "vmId": - err = unpopulate(val, "VMID", &i.VMID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &i.VMNics) - delete(rawMsg, key) - case "vmProtectionState": - err = unpopulate(val, "VMProtectionState", &i.VMProtectionState) - delete(rawMsg, key) - case "vmProtectionStateDescription": - err = unpopulate(val, "VMProtectionStateDescription", &i.VMProtectionStateDescription) - delete(rawMsg, key) - case "validationErrors": - err = unpopulate(val, "ValidationErrors", &i.ValidationErrors) - delete(rawMsg, key) - case "vhdName": - err = unpopulate(val, "VhdName", &i.VhdName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2ReprotectInput. -func (i InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disksToInclude", i.DisksToInclude) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) - populate(objectMap, "masterTargetId", i.MasterTargetID) - populate(objectMap, "policyId", i.PolicyID) - populate(objectMap, "processServerId", i.ProcessServerID) - populate(objectMap, "runAsAccountId", i.RunAsAccountID) - populate(objectMap, "storageAccountId", i.StorageAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2ReprotectInput. -func (i *InMageAzureV2ReprotectInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disksToInclude": - err = unpopulate(val, "DisksToInclude", &i.DisksToInclude) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) - delete(rawMsg, key) - case "masterTargetId": - err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &i.PolicyID) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) - delete(rawMsg, key) - case "storageAccountId": - err = unpopulate(val, "StorageAccountID", &i.StorageAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2SwitchProviderBlockingErrorDetails. -func (i InMageAzureV2SwitchProviderBlockingErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorCode", i.ErrorCode) - populate(objectMap, "errorMessage", i.ErrorMessage) - populate(objectMap, "errorMessageParameters", i.ErrorMessageParameters) - populate(objectMap, "errorTags", i.ErrorTags) - populate(objectMap, "possibleCauses", i.PossibleCauses) - populate(objectMap, "recommendedAction", i.RecommendedAction) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2SwitchProviderBlockingErrorDetails. -func (i *InMageAzureV2SwitchProviderBlockingErrorDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "errorCode": - err = unpopulate(val, "ErrorCode", &i.ErrorCode) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) - delete(rawMsg, key) - case "errorMessageParameters": - err = unpopulate(val, "ErrorMessageParameters", &i.ErrorMessageParameters) - delete(rawMsg, key) - case "errorTags": - err = unpopulate(val, "ErrorTags", &i.ErrorTags) - delete(rawMsg, key) - case "possibleCauses": - err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) - delete(rawMsg, key) - case "recommendedAction": - err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2SwitchProviderDetails. -func (i InMageAzureV2SwitchProviderDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "targetApplianceId", i.TargetApplianceID) - populate(objectMap, "targetFabricId", i.TargetFabricID) - populate(objectMap, "targetResourceId", i.TargetResourceID) - populate(objectMap, "targetVaultId", i.TargetVaultID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2SwitchProviderDetails. -func (i *InMageAzureV2SwitchProviderDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "targetApplianceId": - err = unpopulate(val, "TargetApplianceID", &i.TargetApplianceID) - delete(rawMsg, key) - case "targetFabricId": - err = unpopulate(val, "TargetFabricID", &i.TargetFabricID) - delete(rawMsg, key) - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &i.TargetResourceID) - delete(rawMsg, key) - case "targetVaultId": - err = unpopulate(val, "TargetVaultID", &i.TargetVaultID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2SwitchProviderInput. -func (i InMageAzureV2SwitchProviderInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "targetApplianceID", i.TargetApplianceID) - populate(objectMap, "targetFabricID", i.TargetFabricID) - populate(objectMap, "targetVaultID", i.TargetVaultID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2SwitchProviderInput. -func (i *InMageAzureV2SwitchProviderInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "targetApplianceID": - err = unpopulate(val, "TargetApplianceID", &i.TargetApplianceID) - delete(rawMsg, key) - case "targetFabricID": - err = unpopulate(val, "TargetFabricID", &i.TargetFabricID) - delete(rawMsg, key) - case "targetVaultID": - err = unpopulate(val, "TargetVaultID", &i.TargetVaultID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2TestFailoverInput. -func (i InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "recoveryPointId", i.RecoveryPointID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2TestFailoverInput. -func (i *InMageAzureV2TestFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2UnplannedFailoverInput. -func (i InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "recoveryPointId", i.RecoveryPointID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2UnplannedFailoverInput. -func (i *InMageAzureV2UnplannedFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2UpdateReplicationProtectedItemInput. -func (i InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "recoveryAzureV1ResourceGroupId", i.RecoveryAzureV1ResourceGroupID) - populate(objectMap, "recoveryAzureV2ResourceGroupId", i.RecoveryAzureV2ResourceGroupID) - populate(objectMap, "sqlServerLicenseType", i.SQLServerLicenseType) - populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) - populate(objectMap, "targetManagedDiskTags", i.TargetManagedDiskTags) - populate(objectMap, "targetNicTags", i.TargetNicTags) - populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) - populate(objectMap, "targetVmTags", i.TargetVMTags) - populate(objectMap, "useManagedDisks", i.UseManagedDisks) - populate(objectMap, "vmDisks", i.VMDisks) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2UpdateReplicationProtectedItemInput. -func (i *InMageAzureV2UpdateReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "recoveryAzureV1ResourceGroupId": - err = unpopulate(val, "RecoveryAzureV1ResourceGroupID", &i.RecoveryAzureV1ResourceGroupID) - delete(rawMsg, key) - case "recoveryAzureV2ResourceGroupId": - err = unpopulate(val, "RecoveryAzureV2ResourceGroupID", &i.RecoveryAzureV2ResourceGroupID) - delete(rawMsg, key) - case "sqlServerLicenseType": - err = unpopulate(val, "SQLServerLicenseType", &i.SQLServerLicenseType) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetManagedDiskTags": - err = unpopulate(val, "TargetManagedDiskTags", &i.TargetManagedDiskTags) - delete(rawMsg, key) - case "targetNicTags": - err = unpopulate(val, "TargetNicTags", &i.TargetNicTags) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetVmTags": - err = unpopulate(val, "TargetVMTags", &i.TargetVMTags) - delete(rawMsg, key) - case "useManagedDisks": - err = unpopulate(val, "UseManagedDisks", &i.UseManagedDisks) - delete(rawMsg, key) - case "vmDisks": - err = unpopulate(val, "VMDisks", &i.VMDisks) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageBasePolicyDetails. -func (i InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) - objectMap["instanceType"] = "InMageBasePolicyDetails" - populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) - populate(objectMap, "recoveryPointHistory", i.RecoveryPointHistory) - populate(objectMap, "recoveryPointThresholdInMinutes", i.RecoveryPointThresholdInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageBasePolicyDetails. -func (i *InMageBasePolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "multiVmSyncStatus": - err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) - delete(rawMsg, key) - case "recoveryPointHistory": - err = unpopulate(val, "RecoveryPointHistory", &i.RecoveryPointHistory) - delete(rawMsg, key) - case "recoveryPointThresholdInMinutes": - err = unpopulate(val, "RecoveryPointThresholdInMinutes", &i.RecoveryPointThresholdInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageDisableProtectionProviderSpecificInput. -func (i InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMage" - populate(objectMap, "replicaVmDeletionStatus", i.ReplicaVMDeletionStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageDisableProtectionProviderSpecificInput. -func (i *InMageDisableProtectionProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "replicaVmDeletionStatus": - err = unpopulate(val, "ReplicaVMDeletionStatus", &i.ReplicaVMDeletionStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageDiskDetails. -func (i InMageDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskConfiguration", i.DiskConfiguration) - populate(objectMap, "diskId", i.DiskID) - populate(objectMap, "diskName", i.DiskName) - populate(objectMap, "diskSizeInMB", i.DiskSizeInMB) - populate(objectMap, "diskType", i.DiskType) - populate(objectMap, "volumeList", i.VolumeList) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageDiskDetails. -func (i *InMageDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskConfiguration": - err = unpopulate(val, "DiskConfiguration", &i.DiskConfiguration) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &i.DiskID) - delete(rawMsg, key) - case "diskName": - err = unpopulate(val, "DiskName", &i.DiskName) - delete(rawMsg, key) - case "diskSizeInMB": - err = unpopulate(val, "DiskSizeInMB", &i.DiskSizeInMB) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &i.DiskType) - delete(rawMsg, key) - case "volumeList": - err = unpopulate(val, "VolumeList", &i.VolumeList) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageDiskExclusionInput. -func (i InMageDiskExclusionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskSignatureOptions", i.DiskSignatureOptions) - populate(objectMap, "volumeOptions", i.VolumeOptions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageDiskExclusionInput. -func (i *InMageDiskExclusionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskSignatureOptions": - err = unpopulate(val, "DiskSignatureOptions", &i.DiskSignatureOptions) - delete(rawMsg, key) - case "volumeOptions": - err = unpopulate(val, "VolumeOptions", &i.VolumeOptions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageDiskSignatureExclusionOptions. -func (i InMageDiskSignatureExclusionOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskSignature", i.DiskSignature) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageDiskSignatureExclusionOptions. -func (i *InMageDiskSignatureExclusionOptions) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskSignature": - err = unpopulate(val, "DiskSignature", &i.DiskSignature) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageEnableProtectionInput. -func (i InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "datastoreName", i.DatastoreName) - populate(objectMap, "diskExclusionInput", i.DiskExclusionInput) - populate(objectMap, "disksToInclude", i.DisksToInclude) - objectMap["instanceType"] = "InMage" - populate(objectMap, "masterTargetId", i.MasterTargetID) - populate(objectMap, "multiVmGroupId", i.MultiVMGroupID) - populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) - populate(objectMap, "processServerId", i.ProcessServerID) - populate(objectMap, "retentionDrive", i.RetentionDrive) - populate(objectMap, "runAsAccountId", i.RunAsAccountID) - populate(objectMap, "vmFriendlyName", i.VMFriendlyName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageEnableProtectionInput. -func (i *InMageEnableProtectionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "datastoreName": - err = unpopulate(val, "DatastoreName", &i.DatastoreName) - delete(rawMsg, key) - case "diskExclusionInput": - err = unpopulate(val, "DiskExclusionInput", &i.DiskExclusionInput) - delete(rawMsg, key) - case "disksToInclude": - err = unpopulate(val, "DisksToInclude", &i.DisksToInclude) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "masterTargetId": - err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) - delete(rawMsg, key) - case "multiVmGroupId": - err = unpopulate(val, "MultiVMGroupID", &i.MultiVMGroupID) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) - delete(rawMsg, key) - case "retentionDrive": - err = unpopulate(val, "RetentionDrive", &i.RetentionDrive) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) - delete(rawMsg, key) - case "vmFriendlyName": - err = unpopulate(val, "VMFriendlyName", &i.VMFriendlyName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageFabricSwitchProviderBlockingErrorDetails. -func (i InMageFabricSwitchProviderBlockingErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorCode", i.ErrorCode) - populate(objectMap, "errorMessage", i.ErrorMessage) - populate(objectMap, "errorMessageParameters", i.ErrorMessageParameters) - populate(objectMap, "errorTags", i.ErrorTags) - populate(objectMap, "possibleCauses", i.PossibleCauses) - populate(objectMap, "recommendedAction", i.RecommendedAction) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageFabricSwitchProviderBlockingErrorDetails. -func (i *InMageFabricSwitchProviderBlockingErrorDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "errorCode": - err = unpopulate(val, "ErrorCode", &i.ErrorCode) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) - delete(rawMsg, key) - case "errorMessageParameters": - err = unpopulate(val, "ErrorMessageParameters", &i.ErrorMessageParameters) - delete(rawMsg, key) - case "errorTags": - err = unpopulate(val, "ErrorTags", &i.ErrorTags) - delete(rawMsg, key) - case "possibleCauses": - err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) - delete(rawMsg, key) - case "recommendedAction": - err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMagePolicyDetails. -func (i InMagePolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) - objectMap["instanceType"] = "InMage" - populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) - populate(objectMap, "recoveryPointHistory", i.RecoveryPointHistory) - populate(objectMap, "recoveryPointThresholdInMinutes", i.RecoveryPointThresholdInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMagePolicyDetails. -func (i *InMagePolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "multiVmSyncStatus": - err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) - delete(rawMsg, key) - case "recoveryPointHistory": - err = unpopulate(val, "RecoveryPointHistory", &i.RecoveryPointHistory) - delete(rawMsg, key) - case "recoveryPointThresholdInMinutes": - err = unpopulate(val, "RecoveryPointThresholdInMinutes", &i.RecoveryPointThresholdInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMagePolicyInput. -func (i InMagePolicyInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) - objectMap["instanceType"] = "InMage" - populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) - populate(objectMap, "recoveryPointHistory", i.RecoveryPointHistory) - populate(objectMap, "recoveryPointThresholdInMinutes", i.RecoveryPointThresholdInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMagePolicyInput. -func (i *InMagePolicyInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "multiVmSyncStatus": - err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) - delete(rawMsg, key) - case "recoveryPointHistory": - err = unpopulate(val, "RecoveryPointHistory", &i.RecoveryPointHistory) - delete(rawMsg, key) - case "recoveryPointThresholdInMinutes": - err = unpopulate(val, "RecoveryPointThresholdInMinutes", &i.RecoveryPointThresholdInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageProtectedDiskDetails. -func (i InMageProtectedDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskCapacityInBytes", i.DiskCapacityInBytes) - populate(objectMap, "diskId", i.DiskID) - populate(objectMap, "diskName", i.DiskName) - populate(objectMap, "diskResized", i.DiskResized) - populate(objectMap, "fileSystemCapacityInBytes", i.FileSystemCapacityInBytes) - populate(objectMap, "healthErrorCode", i.HealthErrorCode) - populateTimeRFC3339(objectMap, "lastRpoCalculatedTime", i.LastRpoCalculatedTime) - populate(objectMap, "progressHealth", i.ProgressHealth) - populate(objectMap, "progressStatus", i.ProgressStatus) - populate(objectMap, "protectionStage", i.ProtectionStage) - populate(objectMap, "psDataInMB", i.PsDataInMB) - populate(objectMap, "resyncDurationInSeconds", i.ResyncDurationInSeconds) - populate(objectMap, "resyncLast15MinutesTransferredBytes", i.ResyncLast15MinutesTransferredBytes) - populateTimeRFC3339(objectMap, "resyncLastDataTransferTimeUTC", i.ResyncLastDataTransferTimeUTC) - populate(objectMap, "resyncProcessedBytes", i.ResyncProcessedBytes) - populate(objectMap, "resyncProgressPercentage", i.ResyncProgressPercentage) - populate(objectMap, "resyncRequired", i.ResyncRequired) - populateTimeRFC3339(objectMap, "resyncStartTime", i.ResyncStartTime) - populate(objectMap, "resyncTotalTransferredBytes", i.ResyncTotalTransferredBytes) - populate(objectMap, "rpoInSeconds", i.RpoInSeconds) - populate(objectMap, "sourceDataInMB", i.SourceDataInMB) - populate(objectMap, "targetDataInMB", i.TargetDataInMB) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageProtectedDiskDetails. -func (i *InMageProtectedDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskCapacityInBytes": - err = unpopulate(val, "DiskCapacityInBytes", &i.DiskCapacityInBytes) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &i.DiskID) - delete(rawMsg, key) - case "diskName": - err = unpopulate(val, "DiskName", &i.DiskName) - delete(rawMsg, key) - case "diskResized": - err = unpopulate(val, "DiskResized", &i.DiskResized) - delete(rawMsg, key) - case "fileSystemCapacityInBytes": - err = unpopulate(val, "FileSystemCapacityInBytes", &i.FileSystemCapacityInBytes) - delete(rawMsg, key) - case "healthErrorCode": - err = unpopulate(val, "HealthErrorCode", &i.HealthErrorCode) - delete(rawMsg, key) - case "lastRpoCalculatedTime": - err = unpopulateTimeRFC3339(val, "LastRpoCalculatedTime", &i.LastRpoCalculatedTime) - delete(rawMsg, key) - case "progressHealth": - err = unpopulate(val, "ProgressHealth", &i.ProgressHealth) - delete(rawMsg, key) - case "progressStatus": - err = unpopulate(val, "ProgressStatus", &i.ProgressStatus) - delete(rawMsg, key) - case "protectionStage": - err = unpopulate(val, "ProtectionStage", &i.ProtectionStage) - delete(rawMsg, key) - case "psDataInMB": - err = unpopulate(val, "PsDataInMB", &i.PsDataInMB) - delete(rawMsg, key) - case "resyncDurationInSeconds": - err = unpopulate(val, "ResyncDurationInSeconds", &i.ResyncDurationInSeconds) - delete(rawMsg, key) - case "resyncLast15MinutesTransferredBytes": - err = unpopulate(val, "ResyncLast15MinutesTransferredBytes", &i.ResyncLast15MinutesTransferredBytes) - delete(rawMsg, key) - case "resyncLastDataTransferTimeUTC": - err = unpopulateTimeRFC3339(val, "ResyncLastDataTransferTimeUTC", &i.ResyncLastDataTransferTimeUTC) - delete(rawMsg, key) - case "resyncProcessedBytes": - err = unpopulate(val, "ResyncProcessedBytes", &i.ResyncProcessedBytes) - delete(rawMsg, key) - case "resyncProgressPercentage": - err = unpopulate(val, "ResyncProgressPercentage", &i.ResyncProgressPercentage) - delete(rawMsg, key) - case "resyncRequired": - err = unpopulate(val, "ResyncRequired", &i.ResyncRequired) - delete(rawMsg, key) - case "resyncStartTime": - err = unpopulateTimeRFC3339(val, "ResyncStartTime", &i.ResyncStartTime) - delete(rawMsg, key) - case "resyncTotalTransferredBytes": - err = unpopulate(val, "ResyncTotalTransferredBytes", &i.ResyncTotalTransferredBytes) - delete(rawMsg, key) - case "rpoInSeconds": - err = unpopulate(val, "RpoInSeconds", &i.RpoInSeconds) - delete(rawMsg, key) - case "sourceDataInMB": - err = unpopulate(val, "SourceDataInMB", &i.SourceDataInMB) - delete(rawMsg, key) - case "targetDataInMB": - err = unpopulate(val, "TargetDataInMB", &i.TargetDataInMB) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmAgentUpgradeBlockingErrorDetails. -func (i InMageRcmAgentUpgradeBlockingErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorCode", i.ErrorCode) - populate(objectMap, "errorMessage", i.ErrorMessage) - populate(objectMap, "errorMessageParameters", i.ErrorMessageParameters) - populate(objectMap, "errorTags", i.ErrorTags) - populate(objectMap, "possibleCauses", i.PossibleCauses) - populate(objectMap, "recommendedAction", i.RecommendedAction) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmAgentUpgradeBlockingErrorDetails. -func (i *InMageRcmAgentUpgradeBlockingErrorDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "errorCode": - err = unpopulate(val, "ErrorCode", &i.ErrorCode) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) - delete(rawMsg, key) - case "errorMessageParameters": - err = unpopulate(val, "ErrorMessageParameters", &i.ErrorMessageParameters) - delete(rawMsg, key) - case "errorTags": - err = unpopulate(val, "ErrorTags", &i.ErrorTags) - delete(rawMsg, key) - case "possibleCauses": - err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) - delete(rawMsg, key) - case "recommendedAction": - err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmApplianceDetails. -func (i InMageRcmApplianceDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dra", i.Dra) - populate(objectMap, "fabricArmId", i.FabricArmID) - populate(objectMap, "id", i.ID) - populate(objectMap, "marsAgent", i.MarsAgent) - populate(objectMap, "name", i.Name) - populate(objectMap, "processServer", i.ProcessServer) - populate(objectMap, "pushInstaller", i.PushInstaller) - populate(objectMap, "rcmProxy", i.RcmProxy) - populate(objectMap, "replicationAgent", i.ReplicationAgent) - populate(objectMap, "reprotectAgent", i.ReprotectAgent) - populate(objectMap, "switchProviderBlockingErrorDetails", i.SwitchProviderBlockingErrorDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmApplianceDetails. -func (i *InMageRcmApplianceDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dra": - err = unpopulate(val, "Dra", &i.Dra) - delete(rawMsg, key) - case "fabricArmId": - err = unpopulate(val, "FabricArmID", &i.FabricArmID) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) - delete(rawMsg, key) - case "marsAgent": - err = unpopulate(val, "MarsAgent", &i.MarsAgent) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "processServer": - err = unpopulate(val, "ProcessServer", &i.ProcessServer) - delete(rawMsg, key) - case "pushInstaller": - err = unpopulate(val, "PushInstaller", &i.PushInstaller) - delete(rawMsg, key) - case "rcmProxy": - err = unpopulate(val, "RcmProxy", &i.RcmProxy) - delete(rawMsg, key) - case "replicationAgent": - err = unpopulate(val, "ReplicationAgent", &i.ReplicationAgent) - delete(rawMsg, key) - case "reprotectAgent": - err = unpopulate(val, "ReprotectAgent", &i.ReprotectAgent) - delete(rawMsg, key) - case "switchProviderBlockingErrorDetails": - err = unpopulate(val, "SwitchProviderBlockingErrorDetails", &i.SwitchProviderBlockingErrorDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmApplianceSpecificDetails. -func (i InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appliances", i.Appliances) - objectMap["instanceType"] = "InMageRcm" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmApplianceSpecificDetails. -func (i *InMageRcmApplianceSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appliances": - err = unpopulate(val, "Appliances", &i.Appliances) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmApplyRecoveryPointInput. -func (i InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "recoveryPointId", i.RecoveryPointID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmApplyRecoveryPointInput. -func (i *InMageRcmApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmDiscoveredProtectedVMDetails. -func (i InMageRcmDiscoveredProtectedVMDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdTimestamp", i.CreatedTimestamp) - populate(objectMap, "datastores", i.Datastores) - populate(objectMap, "ipAddresses", i.IPAddresses) - populate(objectMap, "isDeleted", i.IsDeleted) - populateTimeRFC3339(objectMap, "lastDiscoveryTimeInUtc", i.LastDiscoveryTimeInUTC) - populate(objectMap, "osName", i.OSName) - populate(objectMap, "powerStatus", i.PowerStatus) - populateTimeRFC3339(objectMap, "updatedTimestamp", i.UpdatedTimestamp) - populate(objectMap, "vCenterFqdn", i.VCenterFqdn) - populate(objectMap, "vCenterId", i.VCenterID) - populate(objectMap, "vmFqdn", i.VMFqdn) - populate(objectMap, "vmwareToolsStatus", i.VmwareToolsStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmDiscoveredProtectedVMDetails. -func (i *InMageRcmDiscoveredProtectedVMDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdTimestamp": - err = unpopulateTimeRFC3339(val, "CreatedTimestamp", &i.CreatedTimestamp) - delete(rawMsg, key) - case "datastores": - err = unpopulate(val, "Datastores", &i.Datastores) - delete(rawMsg, key) - case "ipAddresses": - err = unpopulate(val, "IPAddresses", &i.IPAddresses) - delete(rawMsg, key) - case "isDeleted": - err = unpopulate(val, "IsDeleted", &i.IsDeleted) - delete(rawMsg, key) - case "lastDiscoveryTimeInUtc": - err = unpopulateTimeRFC3339(val, "LastDiscoveryTimeInUTC", &i.LastDiscoveryTimeInUTC) - delete(rawMsg, key) - case "osName": - err = unpopulate(val, "OSName", &i.OSName) - delete(rawMsg, key) - case "powerStatus": - err = unpopulate(val, "PowerStatus", &i.PowerStatus) - delete(rawMsg, key) - case "updatedTimestamp": - err = unpopulateTimeRFC3339(val, "UpdatedTimestamp", &i.UpdatedTimestamp) - delete(rawMsg, key) - case "vCenterFqdn": - err = unpopulate(val, "VCenterFqdn", &i.VCenterFqdn) - delete(rawMsg, key) - case "vCenterId": - err = unpopulate(val, "VCenterID", &i.VCenterID) - delete(rawMsg, key) - case "vmFqdn": - err = unpopulate(val, "VMFqdn", &i.VMFqdn) - delete(rawMsg, key) - case "vmwareToolsStatus": - err = unpopulate(val, "VmwareToolsStatus", &i.VmwareToolsStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmDiskInput. -func (i InMageRcmDiskInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) - populate(objectMap, "diskId", i.DiskID) - populate(objectMap, "diskType", i.DiskType) - populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmDiskInput. -func (i *InMageRcmDiskInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &i.DiskID) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &i.DiskType) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmDisksDefaultInput. -func (i InMageRcmDisksDefaultInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) - populate(objectMap, "diskType", i.DiskType) - populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmDisksDefaultInput. -func (i *InMageRcmDisksDefaultInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &i.DiskType) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmEnableProtectionInput. -func (i InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disksDefault", i.DisksDefault) - populate(objectMap, "disksToInclude", i.DisksToInclude) - populate(objectMap, "fabricDiscoveryMachineId", i.FabricDiscoveryMachineID) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "licenseType", i.LicenseType) - populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) - populate(objectMap, "processServerId", i.ProcessServerID) - populate(objectMap, "runAsAccountId", i.RunAsAccountID) - populate(objectMap, "targetAvailabilitySetId", i.TargetAvailabilitySetID) - populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) - populate(objectMap, "targetBootDiagnosticsStorageAccountId", i.TargetBootDiagnosticsStorageAccountID) - populate(objectMap, "targetNetworkId", i.TargetNetworkID) - populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) - populate(objectMap, "targetResourceGroupId", i.TargetResourceGroupID) - populate(objectMap, "targetSubnetName", i.TargetSubnetName) - populate(objectMap, "targetVmName", i.TargetVMName) - populate(objectMap, "targetVmSize", i.TargetVMSize) - populate(objectMap, "testNetworkId", i.TestNetworkID) - populate(objectMap, "testSubnetName", i.TestSubnetName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmEnableProtectionInput. -func (i *InMageRcmEnableProtectionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disksDefault": - err = unpopulate(val, "DisksDefault", &i.DisksDefault) - delete(rawMsg, key) - case "disksToInclude": - err = unpopulate(val, "DisksToInclude", &i.DisksToInclude) - delete(rawMsg, key) - case "fabricDiscoveryMachineId": - err = unpopulate(val, "FabricDiscoveryMachineID", &i.FabricDiscoveryMachineID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &i.LicenseType) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) - delete(rawMsg, key) - case "targetAvailabilitySetId": - err = unpopulate(val, "TargetAvailabilitySetID", &i.TargetAvailabilitySetID) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetBootDiagnosticsStorageAccountId": - err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &i.TargetBootDiagnosticsStorageAccountID) - delete(rawMsg, key) - case "targetNetworkId": - err = unpopulate(val, "TargetNetworkID", &i.TargetNetworkID) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetResourceGroupId": - err = unpopulate(val, "TargetResourceGroupID", &i.TargetResourceGroupID) - delete(rawMsg, key) - case "targetSubnetName": - err = unpopulate(val, "TargetSubnetName", &i.TargetSubnetName) - delete(rawMsg, key) - case "targetVmName": - err = unpopulate(val, "TargetVMName", &i.TargetVMName) - delete(rawMsg, key) - case "targetVmSize": - err = unpopulate(val, "TargetVMSize", &i.TargetVMSize) - delete(rawMsg, key) - case "testNetworkId": - err = unpopulate(val, "TestNetworkID", &i.TestNetworkID) - delete(rawMsg, key) - case "testSubnetName": - err = unpopulate(val, "TestSubnetName", &i.TestSubnetName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmEventDetails. -func (i InMageRcmEventDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applianceName", i.ApplianceName) - populate(objectMap, "componentDisplayName", i.ComponentDisplayName) - populate(objectMap, "fabricName", i.FabricName) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "jobId", i.JobID) - populate(objectMap, "latestAgentVersion", i.LatestAgentVersion) - populate(objectMap, "protectedItemName", i.ProtectedItemName) - populate(objectMap, "serverType", i.ServerType) - populate(objectMap, "vmName", i.VMName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmEventDetails. -func (i *InMageRcmEventDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "applianceName": - err = unpopulate(val, "ApplianceName", &i.ApplianceName) - delete(rawMsg, key) - case "componentDisplayName": - err = unpopulate(val, "ComponentDisplayName", &i.ComponentDisplayName) - delete(rawMsg, key) - case "fabricName": - err = unpopulate(val, "FabricName", &i.FabricName) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "jobId": - err = unpopulate(val, "JobID", &i.JobID) - delete(rawMsg, key) - case "latestAgentVersion": - err = unpopulate(val, "LatestAgentVersion", &i.LatestAgentVersion) - delete(rawMsg, key) - case "protectedItemName": - err = unpopulate(val, "ProtectedItemName", &i.ProtectedItemName) - delete(rawMsg, key) - case "serverType": - err = unpopulate(val, "ServerType", &i.ServerType) - delete(rawMsg, key) - case "vmName": - err = unpopulate(val, "VMName", &i.VMName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFabricCreationInput. -func (i InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "physicalSiteId", i.PhysicalSiteID) - populate(objectMap, "sourceAgentIdentity", i.SourceAgentIdentity) - populate(objectMap, "vmwareSiteId", i.VmwareSiteID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFabricCreationInput. -func (i *InMageRcmFabricCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "physicalSiteId": - err = unpopulate(val, "PhysicalSiteID", &i.PhysicalSiteID) - delete(rawMsg, key) - case "sourceAgentIdentity": - err = unpopulate(val, "SourceAgentIdentity", &i.SourceAgentIdentity) - delete(rawMsg, key) - case "vmwareSiteId": - err = unpopulate(val, "VmwareSiteID", &i.VmwareSiteID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFabricSpecificDetails. -func (i InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentDetails", i.AgentDetails) - populate(objectMap, "controlPlaneUri", i.ControlPlaneURI) - populate(objectMap, "dataPlaneUri", i.DataPlaneURI) - populate(objectMap, "dras", i.Dras) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "marsAgents", i.MarsAgents) - populate(objectMap, "physicalSiteId", i.PhysicalSiteID) - populate(objectMap, "processServers", i.ProcessServers) - populate(objectMap, "pushInstallers", i.PushInstallers) - populate(objectMap, "rcmProxies", i.RcmProxies) - populate(objectMap, "replicationAgents", i.ReplicationAgents) - populate(objectMap, "reprotectAgents", i.ReprotectAgents) - populate(objectMap, "serviceContainerId", i.ServiceContainerID) - populate(objectMap, "serviceEndpoint", i.ServiceEndpoint) - populate(objectMap, "serviceResourceId", i.ServiceResourceID) - populate(objectMap, "sourceAgentIdentityDetails", i.SourceAgentIdentityDetails) - populate(objectMap, "vmwareSiteId", i.VmwareSiteID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFabricSpecificDetails. -func (i *InMageRcmFabricSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentDetails": - err = unpopulate(val, "AgentDetails", &i.AgentDetails) - delete(rawMsg, key) - case "controlPlaneUri": - err = unpopulate(val, "ControlPlaneURI", &i.ControlPlaneURI) - delete(rawMsg, key) - case "dataPlaneUri": - err = unpopulate(val, "DataPlaneURI", &i.DataPlaneURI) - delete(rawMsg, key) - case "dras": - err = unpopulate(val, "Dras", &i.Dras) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "marsAgents": - err = unpopulate(val, "MarsAgents", &i.MarsAgents) - delete(rawMsg, key) - case "physicalSiteId": - err = unpopulate(val, "PhysicalSiteID", &i.PhysicalSiteID) - delete(rawMsg, key) - case "processServers": - err = unpopulate(val, "ProcessServers", &i.ProcessServers) - delete(rawMsg, key) - case "pushInstallers": - err = unpopulate(val, "PushInstallers", &i.PushInstallers) - delete(rawMsg, key) - case "rcmProxies": - err = unpopulate(val, "RcmProxies", &i.RcmProxies) - delete(rawMsg, key) - case "replicationAgents": - err = unpopulate(val, "ReplicationAgents", &i.ReplicationAgents) - delete(rawMsg, key) - case "reprotectAgents": - err = unpopulate(val, "ReprotectAgents", &i.ReprotectAgents) - delete(rawMsg, key) - case "serviceContainerId": - err = unpopulate(val, "ServiceContainerID", &i.ServiceContainerID) - delete(rawMsg, key) - case "serviceEndpoint": - err = unpopulate(val, "ServiceEndpoint", &i.ServiceEndpoint) - delete(rawMsg, key) - case "serviceResourceId": - err = unpopulate(val, "ServiceResourceID", &i.ServiceResourceID) - delete(rawMsg, key) - case "sourceAgentIdentityDetails": - err = unpopulate(val, "SourceAgentIdentityDetails", &i.SourceAgentIdentityDetails) - delete(rawMsg, key) - case "vmwareSiteId": - err = unpopulate(val, "VmwareSiteID", &i.VmwareSiteID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFabricSwitchProviderBlockingErrorDetails. -func (i InMageRcmFabricSwitchProviderBlockingErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorCode", i.ErrorCode) - populate(objectMap, "errorMessage", i.ErrorMessage) - populate(objectMap, "errorMessageParameters", i.ErrorMessageParameters) - populate(objectMap, "errorTags", i.ErrorTags) - populate(objectMap, "possibleCauses", i.PossibleCauses) - populate(objectMap, "recommendedAction", i.RecommendedAction) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFabricSwitchProviderBlockingErrorDetails. -func (i *InMageRcmFabricSwitchProviderBlockingErrorDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "errorCode": - err = unpopulate(val, "ErrorCode", &i.ErrorCode) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) - delete(rawMsg, key) - case "errorMessageParameters": - err = unpopulate(val, "ErrorMessageParameters", &i.ErrorMessageParameters) - delete(rawMsg, key) - case "errorTags": - err = unpopulate(val, "ErrorTags", &i.ErrorTags) - delete(rawMsg, key) - case "possibleCauses": - err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) - delete(rawMsg, key) - case "recommendedAction": - err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackDiscoveredProtectedVMDetails. -func (i InMageRcmFailbackDiscoveredProtectedVMDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdTimestamp", i.CreatedTimestamp) - populate(objectMap, "datastores", i.Datastores) - populate(objectMap, "ipAddresses", i.IPAddresses) - populate(objectMap, "isDeleted", i.IsDeleted) - populateTimeRFC3339(objectMap, "lastDiscoveryTimeInUtc", i.LastDiscoveryTimeInUTC) - populate(objectMap, "osName", i.OSName) - populate(objectMap, "powerStatus", i.PowerStatus) - populateTimeRFC3339(objectMap, "updatedTimestamp", i.UpdatedTimestamp) - populate(objectMap, "vCenterFqdn", i.VCenterFqdn) - populate(objectMap, "vCenterId", i.VCenterID) - populate(objectMap, "vmFqdn", i.VMFqdn) - populate(objectMap, "vmwareToolsStatus", i.VmwareToolsStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackDiscoveredProtectedVMDetails. -func (i *InMageRcmFailbackDiscoveredProtectedVMDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdTimestamp": - err = unpopulateTimeRFC3339(val, "CreatedTimestamp", &i.CreatedTimestamp) - delete(rawMsg, key) - case "datastores": - err = unpopulate(val, "Datastores", &i.Datastores) - delete(rawMsg, key) - case "ipAddresses": - err = unpopulate(val, "IPAddresses", &i.IPAddresses) - delete(rawMsg, key) - case "isDeleted": - err = unpopulate(val, "IsDeleted", &i.IsDeleted) - delete(rawMsg, key) - case "lastDiscoveryTimeInUtc": - err = unpopulateTimeRFC3339(val, "LastDiscoveryTimeInUTC", &i.LastDiscoveryTimeInUTC) - delete(rawMsg, key) - case "osName": - err = unpopulate(val, "OSName", &i.OSName) - delete(rawMsg, key) - case "powerStatus": - err = unpopulate(val, "PowerStatus", &i.PowerStatus) - delete(rawMsg, key) - case "updatedTimestamp": - err = unpopulateTimeRFC3339(val, "UpdatedTimestamp", &i.UpdatedTimestamp) - delete(rawMsg, key) - case "vCenterFqdn": - err = unpopulate(val, "VCenterFqdn", &i.VCenterFqdn) - delete(rawMsg, key) - case "vCenterId": - err = unpopulate(val, "VCenterID", &i.VCenterID) - delete(rawMsg, key) - case "vmFqdn": - err = unpopulate(val, "VMFqdn", &i.VMFqdn) - delete(rawMsg, key) - case "vmwareToolsStatus": - err = unpopulate(val, "VmwareToolsStatus", &i.VmwareToolsStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackEventDetails. -func (i InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applianceName", i.ApplianceName) - populate(objectMap, "componentDisplayName", i.ComponentDisplayName) - objectMap["instanceType"] = "InMageRcmFailback" - populate(objectMap, "protectedItemName", i.ProtectedItemName) - populate(objectMap, "serverType", i.ServerType) - populate(objectMap, "vmName", i.VMName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackEventDetails. -func (i *InMageRcmFailbackEventDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "applianceName": - err = unpopulate(val, "ApplianceName", &i.ApplianceName) - delete(rawMsg, key) - case "componentDisplayName": - err = unpopulate(val, "ComponentDisplayName", &i.ComponentDisplayName) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "protectedItemName": - err = unpopulate(val, "ProtectedItemName", &i.ProtectedItemName) - delete(rawMsg, key) - case "serverType": - err = unpopulate(val, "ServerType", &i.ServerType) - delete(rawMsg, key) - case "vmName": - err = unpopulate(val, "VMName", &i.VMName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackMobilityAgentDetails. -func (i InMageRcmFailbackMobilityAgentDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "agentVersionExpiryDate", i.AgentVersionExpiryDate) - populate(objectMap, "driverVersion", i.DriverVersion) - populateTimeRFC3339(objectMap, "driverVersionExpiryDate", i.DriverVersionExpiryDate) - populate(objectMap, "isUpgradeable", i.IsUpgradeable) - populateTimeRFC3339(objectMap, "lastHeartbeatUtc", i.LastHeartbeatUTC) - populate(objectMap, "latestUpgradableVersionWithoutReboot", i.LatestUpgradableVersionWithoutReboot) - populate(objectMap, "latestVersion", i.LatestVersion) - populate(objectMap, "reasonsBlockingUpgrade", i.ReasonsBlockingUpgrade) - populate(objectMap, "version", i.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackMobilityAgentDetails. -func (i *InMageRcmFailbackMobilityAgentDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentVersionExpiryDate": - err = unpopulateTimeRFC3339(val, "AgentVersionExpiryDate", &i.AgentVersionExpiryDate) - delete(rawMsg, key) - case "driverVersion": - err = unpopulate(val, "DriverVersion", &i.DriverVersion) - delete(rawMsg, key) - case "driverVersionExpiryDate": - err = unpopulateTimeRFC3339(val, "DriverVersionExpiryDate", &i.DriverVersionExpiryDate) - delete(rawMsg, key) - case "isUpgradeable": - err = unpopulate(val, "IsUpgradeable", &i.IsUpgradeable) - delete(rawMsg, key) - case "lastHeartbeatUtc": - err = unpopulateTimeRFC3339(val, "LastHeartbeatUTC", &i.LastHeartbeatUTC) - delete(rawMsg, key) - case "latestUpgradableVersionWithoutReboot": - err = unpopulate(val, "LatestUpgradableVersionWithoutReboot", &i.LatestUpgradableVersionWithoutReboot) - delete(rawMsg, key) - case "latestVersion": - err = unpopulate(val, "LatestVersion", &i.LatestVersion) - delete(rawMsg, key) - case "reasonsBlockingUpgrade": - err = unpopulate(val, "ReasonsBlockingUpgrade", &i.ReasonsBlockingUpgrade) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &i.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackNicDetails. -func (i InMageRcmFailbackNicDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "adapterType", i.AdapterType) - populate(objectMap, "macAddress", i.MacAddress) - populate(objectMap, "networkName", i.NetworkName) - populate(objectMap, "sourceIpAddress", i.SourceIPAddress) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackNicDetails. -func (i *InMageRcmFailbackNicDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "adapterType": - err = unpopulate(val, "AdapterType", &i.AdapterType) - delete(rawMsg, key) - case "macAddress": - err = unpopulate(val, "MacAddress", &i.MacAddress) - delete(rawMsg, key) - case "networkName": - err = unpopulate(val, "NetworkName", &i.NetworkName) - delete(rawMsg, key) - case "sourceIpAddress": - err = unpopulate(val, "SourceIPAddress", &i.SourceIPAddress) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackPlannedFailoverProviderInput. -func (i InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcmFailback" - populate(objectMap, "recoveryPointType", i.RecoveryPointType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackPlannedFailoverProviderInput. -func (i *InMageRcmFailbackPlannedFailoverProviderInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &i.RecoveryPointType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackPolicyCreationInput. -func (i InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) - objectMap["instanceType"] = "InMageRcmFailback" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackPolicyCreationInput. -func (i *InMageRcmFailbackPolicyCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackPolicyDetails. -func (i InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) - objectMap["instanceType"] = "InMageRcmFailback" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackPolicyDetails. -func (i *InMageRcmFailbackPolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackProtectedDiskDetails. -func (i InMageRcmFailbackProtectedDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capacityInBytes", i.CapacityInBytes) - populate(objectMap, "dataPendingAtSourceAgentInMB", i.DataPendingAtSourceAgentInMB) - populate(objectMap, "dataPendingInLogDataStoreInMB", i.DataPendingInLogDataStoreInMB) - populate(objectMap, "diskId", i.DiskID) - populate(objectMap, "diskName", i.DiskName) - populate(objectMap, "diskUuid", i.DiskUUID) - populate(objectMap, "irDetails", i.IrDetails) - populate(objectMap, "isInitialReplicationComplete", i.IsInitialReplicationComplete) - populate(objectMap, "isOSDisk", i.IsOSDisk) - populateTimeRFC3339(objectMap, "lastSyncTime", i.LastSyncTime) - populate(objectMap, "resyncDetails", i.ResyncDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackProtectedDiskDetails. -func (i *InMageRcmFailbackProtectedDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacityInBytes": - err = unpopulate(val, "CapacityInBytes", &i.CapacityInBytes) - delete(rawMsg, key) - case "dataPendingAtSourceAgentInMB": - err = unpopulate(val, "DataPendingAtSourceAgentInMB", &i.DataPendingAtSourceAgentInMB) - delete(rawMsg, key) - case "dataPendingInLogDataStoreInMB": - err = unpopulate(val, "DataPendingInLogDataStoreInMB", &i.DataPendingInLogDataStoreInMB) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &i.DiskID) - delete(rawMsg, key) - case "diskName": - err = unpopulate(val, "DiskName", &i.DiskName) - delete(rawMsg, key) - case "diskUuid": - err = unpopulate(val, "DiskUUID", &i.DiskUUID) - delete(rawMsg, key) - case "irDetails": - err = unpopulate(val, "IrDetails", &i.IrDetails) - delete(rawMsg, key) - case "isInitialReplicationComplete": - err = unpopulate(val, "IsInitialReplicationComplete", &i.IsInitialReplicationComplete) - delete(rawMsg, key) - case "isOSDisk": - err = unpopulate(val, "IsOSDisk", &i.IsOSDisk) - delete(rawMsg, key) - case "lastSyncTime": - err = unpopulateTimeRFC3339(val, "LastSyncTime", &i.LastSyncTime) - delete(rawMsg, key) - case "resyncDetails": - err = unpopulate(val, "ResyncDetails", &i.ResyncDetails) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackReplicationDetails. -func (i InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureVirtualMachineId", i.AzureVirtualMachineID) - populate(objectMap, "discoveredVmDetails", i.DiscoveredVMDetails) - populate(objectMap, "initialReplicationProcessedBytes", i.InitialReplicationProcessedBytes) - populate(objectMap, "initialReplicationProgressHealth", i.InitialReplicationProgressHealth) - populate(objectMap, "initialReplicationProgressPercentage", i.InitialReplicationProgressPercentage) - populate(objectMap, "initialReplicationTransferredBytes", i.InitialReplicationTransferredBytes) - objectMap["instanceType"] = "InMageRcmFailback" - populate(objectMap, "internalIdentifier", i.InternalIdentifier) - populate(objectMap, "isAgentRegistrationSuccessfulAfterFailover", i.IsAgentRegistrationSuccessfulAfterFailover) - populateTimeRFC3339(objectMap, "lastPlannedFailoverStartTime", i.LastPlannedFailoverStartTime) - populate(objectMap, "lastPlannedFailoverStatus", i.LastPlannedFailoverStatus) - populate(objectMap, "lastUsedPolicyFriendlyName", i.LastUsedPolicyFriendlyName) - populate(objectMap, "lastUsedPolicyId", i.LastUsedPolicyID) - populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) - populate(objectMap, "mobilityAgentDetails", i.MobilityAgentDetails) - populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) - populate(objectMap, "osType", i.OSType) - populate(objectMap, "protectedDisks", i.ProtectedDisks) - populate(objectMap, "reprotectAgentId", i.ReprotectAgentID) - populate(objectMap, "reprotectAgentName", i.ReprotectAgentName) - populate(objectMap, "resyncProcessedBytes", i.ResyncProcessedBytes) - populate(objectMap, "resyncProgressHealth", i.ResyncProgressHealth) - populate(objectMap, "resyncProgressPercentage", i.ResyncProgressPercentage) - populate(objectMap, "resyncRequired", i.ResyncRequired) - populate(objectMap, "resyncState", i.ResyncState) - populate(objectMap, "resyncTransferredBytes", i.ResyncTransferredBytes) - populate(objectMap, "targetDataStoreName", i.TargetDataStoreName) - populate(objectMap, "targetVmName", i.TargetVMName) - populate(objectMap, "targetvCenterId", i.TargetvCenterID) - populate(objectMap, "vmNics", i.VMNics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackReplicationDetails. -func (i *InMageRcmFailbackReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "azureVirtualMachineId": - err = unpopulate(val, "AzureVirtualMachineID", &i.AzureVirtualMachineID) - delete(rawMsg, key) - case "discoveredVmDetails": - err = unpopulate(val, "DiscoveredVMDetails", &i.DiscoveredVMDetails) - delete(rawMsg, key) - case "initialReplicationProcessedBytes": - err = unpopulate(val, "InitialReplicationProcessedBytes", &i.InitialReplicationProcessedBytes) - delete(rawMsg, key) - case "initialReplicationProgressHealth": - err = unpopulate(val, "InitialReplicationProgressHealth", &i.InitialReplicationProgressHealth) - delete(rawMsg, key) - case "initialReplicationProgressPercentage": - err = unpopulate(val, "InitialReplicationProgressPercentage", &i.InitialReplicationProgressPercentage) - delete(rawMsg, key) - case "initialReplicationTransferredBytes": - err = unpopulate(val, "InitialReplicationTransferredBytes", &i.InitialReplicationTransferredBytes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "internalIdentifier": - err = unpopulate(val, "InternalIdentifier", &i.InternalIdentifier) - delete(rawMsg, key) - case "isAgentRegistrationSuccessfulAfterFailover": - err = unpopulate(val, "IsAgentRegistrationSuccessfulAfterFailover", &i.IsAgentRegistrationSuccessfulAfterFailover) - delete(rawMsg, key) - case "lastPlannedFailoverStartTime": - err = unpopulateTimeRFC3339(val, "LastPlannedFailoverStartTime", &i.LastPlannedFailoverStartTime) - delete(rawMsg, key) - case "lastPlannedFailoverStatus": - err = unpopulate(val, "LastPlannedFailoverStatus", &i.LastPlannedFailoverStatus) - delete(rawMsg, key) - case "lastUsedPolicyFriendlyName": - err = unpopulate(val, "LastUsedPolicyFriendlyName", &i.LastUsedPolicyFriendlyName) - delete(rawMsg, key) - case "lastUsedPolicyId": - err = unpopulate(val, "LastUsedPolicyID", &i.LastUsedPolicyID) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) - delete(rawMsg, key) - case "mobilityAgentDetails": - err = unpopulate(val, "MobilityAgentDetails", &i.MobilityAgentDetails) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &i.OSType) - delete(rawMsg, key) - case "protectedDisks": - err = unpopulate(val, "ProtectedDisks", &i.ProtectedDisks) - delete(rawMsg, key) - case "reprotectAgentId": - err = unpopulate(val, "ReprotectAgentID", &i.ReprotectAgentID) - delete(rawMsg, key) - case "reprotectAgentName": - err = unpopulate(val, "ReprotectAgentName", &i.ReprotectAgentName) - delete(rawMsg, key) - case "resyncProcessedBytes": - err = unpopulate(val, "ResyncProcessedBytes", &i.ResyncProcessedBytes) - delete(rawMsg, key) - case "resyncProgressHealth": - err = unpopulate(val, "ResyncProgressHealth", &i.ResyncProgressHealth) - delete(rawMsg, key) - case "resyncProgressPercentage": - err = unpopulate(val, "ResyncProgressPercentage", &i.ResyncProgressPercentage) - delete(rawMsg, key) - case "resyncRequired": - err = unpopulate(val, "ResyncRequired", &i.ResyncRequired) - delete(rawMsg, key) - case "resyncState": - err = unpopulate(val, "ResyncState", &i.ResyncState) - delete(rawMsg, key) - case "resyncTransferredBytes": - err = unpopulate(val, "ResyncTransferredBytes", &i.ResyncTransferredBytes) - delete(rawMsg, key) - case "targetDataStoreName": - err = unpopulate(val, "TargetDataStoreName", &i.TargetDataStoreName) - delete(rawMsg, key) - case "targetVmName": - err = unpopulate(val, "TargetVMName", &i.TargetVMName) - delete(rawMsg, key) - case "targetvCenterId": - err = unpopulate(val, "TargetvCenterID", &i.TargetvCenterID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &i.VMNics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackReprotectInput. -func (i InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcmFailback" - populate(objectMap, "policyId", i.PolicyID) - populate(objectMap, "processServerId", i.ProcessServerID) - populate(objectMap, "runAsAccountId", i.RunAsAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackReprotectInput. -func (i *InMageRcmFailbackReprotectInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &i.PolicyID) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackSyncDetails. -func (i InMageRcmFailbackSyncDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "last15MinutesTransferredBytes", i.Last15MinutesTransferredBytes) - populate(objectMap, "lastDataTransferTimeUtc", i.LastDataTransferTimeUTC) - populate(objectMap, "lastRefreshTime", i.LastRefreshTime) - populate(objectMap, "processedBytes", i.ProcessedBytes) - populate(objectMap, "progressHealth", i.ProgressHealth) - populate(objectMap, "progressPercentage", i.ProgressPercentage) - populate(objectMap, "startTime", i.StartTime) - populate(objectMap, "transferredBytes", i.TransferredBytes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackSyncDetails. -func (i *InMageRcmFailbackSyncDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "last15MinutesTransferredBytes": - err = unpopulate(val, "Last15MinutesTransferredBytes", &i.Last15MinutesTransferredBytes) - delete(rawMsg, key) - case "lastDataTransferTimeUtc": - err = unpopulate(val, "LastDataTransferTimeUTC", &i.LastDataTransferTimeUTC) - delete(rawMsg, key) - case "lastRefreshTime": - err = unpopulate(val, "LastRefreshTime", &i.LastRefreshTime) - delete(rawMsg, key) - case "processedBytes": - err = unpopulate(val, "ProcessedBytes", &i.ProcessedBytes) - delete(rawMsg, key) - case "progressHealth": - err = unpopulate(val, "ProgressHealth", &i.ProgressHealth) - delete(rawMsg, key) - case "progressPercentage": - err = unpopulate(val, "ProgressPercentage", &i.ProgressPercentage) - delete(rawMsg, key) - case "startTime": - err = unpopulate(val, "StartTime", &i.StartTime) - delete(rawMsg, key) - case "transferredBytes": - err = unpopulate(val, "TransferredBytes", &i.TransferredBytes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmLastAgentUpgradeErrorDetails. -func (i InMageRcmLastAgentUpgradeErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorCode", i.ErrorCode) - populate(objectMap, "errorMessage", i.ErrorMessage) - populate(objectMap, "errorMessageParameters", i.ErrorMessageParameters) - populate(objectMap, "errorTags", i.ErrorTags) - populate(objectMap, "possibleCauses", i.PossibleCauses) - populate(objectMap, "recommendedAction", i.RecommendedAction) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmLastAgentUpgradeErrorDetails. -func (i *InMageRcmLastAgentUpgradeErrorDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "errorCode": - err = unpopulate(val, "ErrorCode", &i.ErrorCode) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) - delete(rawMsg, key) - case "errorMessageParameters": - err = unpopulate(val, "ErrorMessageParameters", &i.ErrorMessageParameters) - delete(rawMsg, key) - case "errorTags": - err = unpopulate(val, "ErrorTags", &i.ErrorTags) - delete(rawMsg, key) - case "possibleCauses": - err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) - delete(rawMsg, key) - case "recommendedAction": - err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmMobilityAgentDetails. -func (i InMageRcmMobilityAgentDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "agentVersionExpiryDate", i.AgentVersionExpiryDate) - populate(objectMap, "driverVersion", i.DriverVersion) - populateTimeRFC3339(objectMap, "driverVersionExpiryDate", i.DriverVersionExpiryDate) - populate(objectMap, "isUpgradeable", i.IsUpgradeable) - populateTimeRFC3339(objectMap, "lastHeartbeatUtc", i.LastHeartbeatUTC) - populate(objectMap, "latestAgentReleaseDate", i.LatestAgentReleaseDate) - populate(objectMap, "latestUpgradableVersionWithoutReboot", i.LatestUpgradableVersionWithoutReboot) - populate(objectMap, "latestVersion", i.LatestVersion) - populate(objectMap, "reasonsBlockingUpgrade", i.ReasonsBlockingUpgrade) - populate(objectMap, "version", i.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmMobilityAgentDetails. -func (i *InMageRcmMobilityAgentDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentVersionExpiryDate": - err = unpopulateTimeRFC3339(val, "AgentVersionExpiryDate", &i.AgentVersionExpiryDate) - delete(rawMsg, key) - case "driverVersion": - err = unpopulate(val, "DriverVersion", &i.DriverVersion) - delete(rawMsg, key) - case "driverVersionExpiryDate": - err = unpopulateTimeRFC3339(val, "DriverVersionExpiryDate", &i.DriverVersionExpiryDate) - delete(rawMsg, key) - case "isUpgradeable": - err = unpopulate(val, "IsUpgradeable", &i.IsUpgradeable) - delete(rawMsg, key) - case "lastHeartbeatUtc": - err = unpopulateTimeRFC3339(val, "LastHeartbeatUTC", &i.LastHeartbeatUTC) - delete(rawMsg, key) - case "latestAgentReleaseDate": - err = unpopulate(val, "LatestAgentReleaseDate", &i.LatestAgentReleaseDate) - delete(rawMsg, key) - case "latestUpgradableVersionWithoutReboot": - err = unpopulate(val, "LatestUpgradableVersionWithoutReboot", &i.LatestUpgradableVersionWithoutReboot) - delete(rawMsg, key) - case "latestVersion": - err = unpopulate(val, "LatestVersion", &i.LatestVersion) - delete(rawMsg, key) - case "reasonsBlockingUpgrade": - err = unpopulate(val, "ReasonsBlockingUpgrade", &i.ReasonsBlockingUpgrade) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &i.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmNicDetails. -func (i InMageRcmNicDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isPrimaryNic", i.IsPrimaryNic) - populate(objectMap, "isSelectedForFailover", i.IsSelectedForFailover) - populate(objectMap, "nicId", i.NicID) - populate(objectMap, "sourceIPAddress", i.SourceIPAddress) - populate(objectMap, "sourceIPAddressType", i.SourceIPAddressType) - populate(objectMap, "sourceNetworkId", i.SourceNetworkID) - populate(objectMap, "sourceSubnetName", i.SourceSubnetName) - populate(objectMap, "targetIPAddress", i.TargetIPAddress) - populate(objectMap, "targetIPAddressType", i.TargetIPAddressType) - populate(objectMap, "targetSubnetName", i.TargetSubnetName) - populate(objectMap, "testIPAddress", i.TestIPAddress) - populate(objectMap, "testIPAddressType", i.TestIPAddressType) - populate(objectMap, "testSubnetName", i.TestSubnetName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmNicDetails. -func (i *InMageRcmNicDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isPrimaryNic": - err = unpopulate(val, "IsPrimaryNic", &i.IsPrimaryNic) - delete(rawMsg, key) - case "isSelectedForFailover": - err = unpopulate(val, "IsSelectedForFailover", &i.IsSelectedForFailover) - delete(rawMsg, key) - case "nicId": - err = unpopulate(val, "NicID", &i.NicID) - delete(rawMsg, key) - case "sourceIPAddress": - err = unpopulate(val, "SourceIPAddress", &i.SourceIPAddress) - delete(rawMsg, key) - case "sourceIPAddressType": - err = unpopulate(val, "SourceIPAddressType", &i.SourceIPAddressType) - delete(rawMsg, key) - case "sourceNetworkId": - err = unpopulate(val, "SourceNetworkID", &i.SourceNetworkID) - delete(rawMsg, key) - case "sourceSubnetName": - err = unpopulate(val, "SourceSubnetName", &i.SourceSubnetName) - delete(rawMsg, key) - case "targetIPAddress": - err = unpopulate(val, "TargetIPAddress", &i.TargetIPAddress) - delete(rawMsg, key) - case "targetIPAddressType": - err = unpopulate(val, "TargetIPAddressType", &i.TargetIPAddressType) - delete(rawMsg, key) - case "targetSubnetName": - err = unpopulate(val, "TargetSubnetName", &i.TargetSubnetName) - delete(rawMsg, key) - case "testIPAddress": - err = unpopulate(val, "TestIPAddress", &i.TestIPAddress) - delete(rawMsg, key) - case "testIPAddressType": - err = unpopulate(val, "TestIPAddressType", &i.TestIPAddressType) - delete(rawMsg, key) - case "testSubnetName": - err = unpopulate(val, "TestSubnetName", &i.TestSubnetName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmNicInput. -func (i InMageRcmNicInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isPrimaryNic", i.IsPrimaryNic) - populate(objectMap, "isSelectedForFailover", i.IsSelectedForFailover) - populate(objectMap, "nicId", i.NicID) - populate(objectMap, "targetStaticIPAddress", i.TargetStaticIPAddress) - populate(objectMap, "targetSubnetName", i.TargetSubnetName) - populate(objectMap, "testStaticIPAddress", i.TestStaticIPAddress) - populate(objectMap, "testSubnetName", i.TestSubnetName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmNicInput. -func (i *InMageRcmNicInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isPrimaryNic": - err = unpopulate(val, "IsPrimaryNic", &i.IsPrimaryNic) - delete(rawMsg, key) - case "isSelectedForFailover": - err = unpopulate(val, "IsSelectedForFailover", &i.IsSelectedForFailover) - delete(rawMsg, key) - case "nicId": - err = unpopulate(val, "NicID", &i.NicID) - delete(rawMsg, key) - case "targetStaticIPAddress": - err = unpopulate(val, "TargetStaticIPAddress", &i.TargetStaticIPAddress) - delete(rawMsg, key) - case "targetSubnetName": - err = unpopulate(val, "TargetSubnetName", &i.TargetSubnetName) - delete(rawMsg, key) - case "testStaticIPAddress": - err = unpopulate(val, "TestStaticIPAddress", &i.TestStaticIPAddress) - delete(rawMsg, key) - case "testSubnetName": - err = unpopulate(val, "TestSubnetName", &i.TestSubnetName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmPolicyCreationInput. -func (i InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) - populate(objectMap, "enableMultiVmSync", i.EnableMultiVMSync) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "recoveryPointHistoryInMinutes", i.RecoveryPointHistoryInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmPolicyCreationInput. -func (i *InMageRcmPolicyCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "enableMultiVmSync": - err = unpopulate(val, "EnableMultiVMSync", &i.EnableMultiVMSync) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "recoveryPointHistoryInMinutes": - err = unpopulate(val, "RecoveryPointHistoryInMinutes", &i.RecoveryPointHistoryInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmPolicyDetails. -func (i InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) - populate(objectMap, "enableMultiVmSync", i.EnableMultiVMSync) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "recoveryPointHistoryInMinutes", i.RecoveryPointHistoryInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmPolicyDetails. -func (i *InMageRcmPolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "enableMultiVmSync": - err = unpopulate(val, "EnableMultiVMSync", &i.EnableMultiVMSync) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "recoveryPointHistoryInMinutes": - err = unpopulate(val, "RecoveryPointHistoryInMinutes", &i.RecoveryPointHistoryInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmProtectedDiskDetails. -func (i InMageRcmProtectedDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capacityInBytes", i.CapacityInBytes) - populate(objectMap, "dataPendingAtSourceAgentInMB", i.DataPendingAtSourceAgentInMB) - populate(objectMap, "dataPendingInLogDataStoreInMB", i.DataPendingInLogDataStoreInMB) - populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) - populate(objectMap, "diskId", i.DiskID) - populate(objectMap, "diskName", i.DiskName) - populate(objectMap, "diskType", i.DiskType) - populate(objectMap, "irDetails", i.IrDetails) - populate(objectMap, "isInitialReplicationComplete", i.IsInitialReplicationComplete) - populate(objectMap, "isOSDisk", i.IsOSDisk) - populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) - populate(objectMap, "resyncDetails", i.ResyncDetails) - populate(objectMap, "seedBlobUri", i.SeedBlobURI) - populate(objectMap, "seedManagedDiskId", i.SeedManagedDiskID) - populate(objectMap, "targetManagedDiskId", i.TargetManagedDiskID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmProtectedDiskDetails. -func (i *InMageRcmProtectedDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacityInBytes": - err = unpopulate(val, "CapacityInBytes", &i.CapacityInBytes) - delete(rawMsg, key) - case "dataPendingAtSourceAgentInMB": - err = unpopulate(val, "DataPendingAtSourceAgentInMB", &i.DataPendingAtSourceAgentInMB) - delete(rawMsg, key) - case "dataPendingInLogDataStoreInMB": - err = unpopulate(val, "DataPendingInLogDataStoreInMB", &i.DataPendingInLogDataStoreInMB) - delete(rawMsg, key) - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &i.DiskID) - delete(rawMsg, key) - case "diskName": - err = unpopulate(val, "DiskName", &i.DiskName) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &i.DiskType) - delete(rawMsg, key) - case "irDetails": - err = unpopulate(val, "IrDetails", &i.IrDetails) - delete(rawMsg, key) - case "isInitialReplicationComplete": - err = unpopulate(val, "IsInitialReplicationComplete", &i.IsInitialReplicationComplete) - delete(rawMsg, key) - case "isOSDisk": - err = unpopulate(val, "IsOSDisk", &i.IsOSDisk) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) - delete(rawMsg, key) - case "resyncDetails": - err = unpopulate(val, "ResyncDetails", &i.ResyncDetails) - delete(rawMsg, key) - case "seedBlobUri": - err = unpopulate(val, "SeedBlobURI", &i.SeedBlobURI) - delete(rawMsg, key) - case "seedManagedDiskId": - err = unpopulate(val, "SeedManagedDiskID", &i.SeedManagedDiskID) - delete(rawMsg, key) - case "targetManagedDiskId": - err = unpopulate(val, "TargetManagedDiskID", &i.TargetManagedDiskID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmProtectionContainerMappingDetails. -func (i InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enableAgentAutoUpgrade", i.EnableAgentAutoUpgrade) - objectMap["instanceType"] = "InMageRcm" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmProtectionContainerMappingDetails. -func (i *InMageRcmProtectionContainerMappingDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enableAgentAutoUpgrade": - err = unpopulate(val, "EnableAgentAutoUpgrade", &i.EnableAgentAutoUpgrade) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmRecoveryPointDetails. -func (i InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "isMultiVmSyncPoint", i.IsMultiVMSyncPoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmRecoveryPointDetails. -func (i *InMageRcmRecoveryPointDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "isMultiVmSyncPoint": - err = unpopulate(val, "IsMultiVMSyncPoint", &i.IsMultiVMSyncPoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmReplicationDetails. -func (i InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentUpgradeAttemptToVersion", i.AgentUpgradeAttemptToVersion) - populate(objectMap, "agentUpgradeBlockingErrorDetails", i.AgentUpgradeBlockingErrorDetails) - populate(objectMap, "agentUpgradeJobId", i.AgentUpgradeJobID) - populate(objectMap, "agentUpgradeState", i.AgentUpgradeState) - populate(objectMap, "allocatedMemoryInMB", i.AllocatedMemoryInMB) - populate(objectMap, "discoveredVmDetails", i.DiscoveredVMDetails) - populate(objectMap, "discoveryType", i.DiscoveryType) - populate(objectMap, "fabricDiscoveryMachineId", i.FabricDiscoveryMachineID) - populate(objectMap, "failoverRecoveryPointId", i.FailoverRecoveryPointID) - populate(objectMap, "firmwareType", i.FirmwareType) - populate(objectMap, "initialReplicationProcessedBytes", i.InitialReplicationProcessedBytes) - populate(objectMap, "initialReplicationProgressHealth", i.InitialReplicationProgressHealth) - populate(objectMap, "initialReplicationProgressPercentage", i.InitialReplicationProgressPercentage) - populate(objectMap, "initialReplicationTransferredBytes", i.InitialReplicationTransferredBytes) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "internalIdentifier", i.InternalIdentifier) - populate(objectMap, "isAgentRegistrationSuccessfulAfterFailover", i.IsAgentRegistrationSuccessfulAfterFailover) - populate(objectMap, "isLastUpgradeSuccessful", i.IsLastUpgradeSuccessful) - populate(objectMap, "lastAgentUpgradeErrorDetails", i.LastAgentUpgradeErrorDetails) - populate(objectMap, "lastAgentUpgradeType", i.LastAgentUpgradeType) - populate(objectMap, "lastRecoveryPointId", i.LastRecoveryPointID) - populateTimeRFC3339(objectMap, "lastRecoveryPointReceived", i.LastRecoveryPointReceived) - populateTimeRFC3339(objectMap, "lastRpoCalculatedTime", i.LastRpoCalculatedTime) - populate(objectMap, "lastRpoInSeconds", i.LastRpoInSeconds) - populate(objectMap, "licenseType", i.LicenseType) - populate(objectMap, "mobilityAgentDetails", i.MobilityAgentDetails) - populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) - populate(objectMap, "osType", i.OSType) - populate(objectMap, "primaryNicIpAddress", i.PrimaryNicIPAddress) - populate(objectMap, "processServerId", i.ProcessServerID) - populate(objectMap, "processServerName", i.ProcessServerName) - populate(objectMap, "processorCoreCount", i.ProcessorCoreCount) - populate(objectMap, "protectedDisks", i.ProtectedDisks) - populate(objectMap, "resyncProcessedBytes", i.ResyncProcessedBytes) - populate(objectMap, "resyncProgressHealth", i.ResyncProgressHealth) - populate(objectMap, "resyncProgressPercentage", i.ResyncProgressPercentage) - populate(objectMap, "resyncRequired", i.ResyncRequired) - populate(objectMap, "resyncState", i.ResyncState) - populate(objectMap, "resyncTransferredBytes", i.ResyncTransferredBytes) - populate(objectMap, "runAsAccountId", i.RunAsAccountID) - populate(objectMap, "storageAccountId", i.StorageAccountID) - populate(objectMap, "targetAvailabilitySetId", i.TargetAvailabilitySetID) - populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) - populate(objectMap, "targetBootDiagnosticsStorageAccountId", i.TargetBootDiagnosticsStorageAccountID) - populate(objectMap, "targetGeneration", i.TargetGeneration) - populate(objectMap, "targetLocation", i.TargetLocation) - populate(objectMap, "targetNetworkId", i.TargetNetworkID) - populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) - populate(objectMap, "targetResourceGroupId", i.TargetResourceGroupID) - populate(objectMap, "targetVmName", i.TargetVMName) - populate(objectMap, "targetVmSize", i.TargetVMSize) - populate(objectMap, "testNetworkId", i.TestNetworkID) - populate(objectMap, "vmNics", i.VMNics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmReplicationDetails. -func (i *InMageRcmReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentUpgradeAttemptToVersion": - err = unpopulate(val, "AgentUpgradeAttemptToVersion", &i.AgentUpgradeAttemptToVersion) - delete(rawMsg, key) - case "agentUpgradeBlockingErrorDetails": - err = unpopulate(val, "AgentUpgradeBlockingErrorDetails", &i.AgentUpgradeBlockingErrorDetails) - delete(rawMsg, key) - case "agentUpgradeJobId": - err = unpopulate(val, "AgentUpgradeJobID", &i.AgentUpgradeJobID) - delete(rawMsg, key) - case "agentUpgradeState": - err = unpopulate(val, "AgentUpgradeState", &i.AgentUpgradeState) - delete(rawMsg, key) - case "allocatedMemoryInMB": - err = unpopulate(val, "AllocatedMemoryInMB", &i.AllocatedMemoryInMB) - delete(rawMsg, key) - case "discoveredVmDetails": - err = unpopulate(val, "DiscoveredVMDetails", &i.DiscoveredVMDetails) - delete(rawMsg, key) - case "discoveryType": - err = unpopulate(val, "DiscoveryType", &i.DiscoveryType) - delete(rawMsg, key) - case "fabricDiscoveryMachineId": - err = unpopulate(val, "FabricDiscoveryMachineID", &i.FabricDiscoveryMachineID) - delete(rawMsg, key) - case "failoverRecoveryPointId": - err = unpopulate(val, "FailoverRecoveryPointID", &i.FailoverRecoveryPointID) - delete(rawMsg, key) - case "firmwareType": - err = unpopulate(val, "FirmwareType", &i.FirmwareType) - delete(rawMsg, key) - case "initialReplicationProcessedBytes": - err = unpopulate(val, "InitialReplicationProcessedBytes", &i.InitialReplicationProcessedBytes) - delete(rawMsg, key) - case "initialReplicationProgressHealth": - err = unpopulate(val, "InitialReplicationProgressHealth", &i.InitialReplicationProgressHealth) - delete(rawMsg, key) - case "initialReplicationProgressPercentage": - err = unpopulate(val, "InitialReplicationProgressPercentage", &i.InitialReplicationProgressPercentage) - delete(rawMsg, key) - case "initialReplicationTransferredBytes": - err = unpopulate(val, "InitialReplicationTransferredBytes", &i.InitialReplicationTransferredBytes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "internalIdentifier": - err = unpopulate(val, "InternalIdentifier", &i.InternalIdentifier) - delete(rawMsg, key) - case "isAgentRegistrationSuccessfulAfterFailover": - err = unpopulate(val, "IsAgentRegistrationSuccessfulAfterFailover", &i.IsAgentRegistrationSuccessfulAfterFailover) - delete(rawMsg, key) - case "isLastUpgradeSuccessful": - err = unpopulate(val, "IsLastUpgradeSuccessful", &i.IsLastUpgradeSuccessful) - delete(rawMsg, key) - case "lastAgentUpgradeErrorDetails": - err = unpopulate(val, "LastAgentUpgradeErrorDetails", &i.LastAgentUpgradeErrorDetails) - delete(rawMsg, key) - case "lastAgentUpgradeType": - err = unpopulate(val, "LastAgentUpgradeType", &i.LastAgentUpgradeType) - delete(rawMsg, key) - case "lastRecoveryPointId": - err = unpopulate(val, "LastRecoveryPointID", &i.LastRecoveryPointID) - delete(rawMsg, key) - case "lastRecoveryPointReceived": - err = unpopulateTimeRFC3339(val, "LastRecoveryPointReceived", &i.LastRecoveryPointReceived) - delete(rawMsg, key) - case "lastRpoCalculatedTime": - err = unpopulateTimeRFC3339(val, "LastRpoCalculatedTime", &i.LastRpoCalculatedTime) - delete(rawMsg, key) - case "lastRpoInSeconds": - err = unpopulate(val, "LastRpoInSeconds", &i.LastRpoInSeconds) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &i.LicenseType) - delete(rawMsg, key) - case "mobilityAgentDetails": - err = unpopulate(val, "MobilityAgentDetails", &i.MobilityAgentDetails) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &i.OSType) - delete(rawMsg, key) - case "primaryNicIpAddress": - err = unpopulate(val, "PrimaryNicIPAddress", &i.PrimaryNicIPAddress) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) - delete(rawMsg, key) - case "processServerName": - err = unpopulate(val, "ProcessServerName", &i.ProcessServerName) - delete(rawMsg, key) - case "processorCoreCount": - err = unpopulate(val, "ProcessorCoreCount", &i.ProcessorCoreCount) - delete(rawMsg, key) - case "protectedDisks": - err = unpopulate(val, "ProtectedDisks", &i.ProtectedDisks) - delete(rawMsg, key) - case "resyncProcessedBytes": - err = unpopulate(val, "ResyncProcessedBytes", &i.ResyncProcessedBytes) - delete(rawMsg, key) - case "resyncProgressHealth": - err = unpopulate(val, "ResyncProgressHealth", &i.ResyncProgressHealth) - delete(rawMsg, key) - case "resyncProgressPercentage": - err = unpopulate(val, "ResyncProgressPercentage", &i.ResyncProgressPercentage) - delete(rawMsg, key) - case "resyncRequired": - err = unpopulate(val, "ResyncRequired", &i.ResyncRequired) - delete(rawMsg, key) - case "resyncState": - err = unpopulate(val, "ResyncState", &i.ResyncState) - delete(rawMsg, key) - case "resyncTransferredBytes": - err = unpopulate(val, "ResyncTransferredBytes", &i.ResyncTransferredBytes) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) - delete(rawMsg, key) - case "storageAccountId": - err = unpopulate(val, "StorageAccountID", &i.StorageAccountID) - delete(rawMsg, key) - case "targetAvailabilitySetId": - err = unpopulate(val, "TargetAvailabilitySetID", &i.TargetAvailabilitySetID) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetBootDiagnosticsStorageAccountId": - err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &i.TargetBootDiagnosticsStorageAccountID) - delete(rawMsg, key) - case "targetGeneration": - err = unpopulate(val, "TargetGeneration", &i.TargetGeneration) - delete(rawMsg, key) - case "targetLocation": - err = unpopulate(val, "TargetLocation", &i.TargetLocation) - delete(rawMsg, key) - case "targetNetworkId": - err = unpopulate(val, "TargetNetworkID", &i.TargetNetworkID) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetResourceGroupId": - err = unpopulate(val, "TargetResourceGroupID", &i.TargetResourceGroupID) - delete(rawMsg, key) - case "targetVmName": - err = unpopulate(val, "TargetVMName", &i.TargetVMName) - delete(rawMsg, key) - case "targetVmSize": - err = unpopulate(val, "TargetVMSize", &i.TargetVMSize) - delete(rawMsg, key) - case "testNetworkId": - err = unpopulate(val, "TestNetworkID", &i.TestNetworkID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &i.VMNics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmReprotectInput. -func (i InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "datastoreName", i.DatastoreName) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) - populate(objectMap, "policyId", i.PolicyID) - populate(objectMap, "reprotectAgentId", i.ReprotectAgentID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmReprotectInput. -func (i *InMageRcmReprotectInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "datastoreName": - err = unpopulate(val, "DatastoreName", &i.DatastoreName) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &i.PolicyID) - delete(rawMsg, key) - case "reprotectAgentId": - err = unpopulate(val, "ReprotectAgentID", &i.ReprotectAgentID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmSyncDetails. -func (i InMageRcmSyncDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "last15MinutesTransferredBytes", i.Last15MinutesTransferredBytes) - populate(objectMap, "lastDataTransferTimeUtc", i.LastDataTransferTimeUTC) - populate(objectMap, "lastRefreshTime", i.LastRefreshTime) - populate(objectMap, "processedBytes", i.ProcessedBytes) - populate(objectMap, "progressHealth", i.ProgressHealth) - populate(objectMap, "progressPercentage", i.ProgressPercentage) - populate(objectMap, "startTime", i.StartTime) - populate(objectMap, "transferredBytes", i.TransferredBytes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmSyncDetails. -func (i *InMageRcmSyncDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "last15MinutesTransferredBytes": - err = unpopulate(val, "Last15MinutesTransferredBytes", &i.Last15MinutesTransferredBytes) - delete(rawMsg, key) - case "lastDataTransferTimeUtc": - err = unpopulate(val, "LastDataTransferTimeUTC", &i.LastDataTransferTimeUTC) - delete(rawMsg, key) - case "lastRefreshTime": - err = unpopulate(val, "LastRefreshTime", &i.LastRefreshTime) - delete(rawMsg, key) - case "processedBytes": - err = unpopulate(val, "ProcessedBytes", &i.ProcessedBytes) - delete(rawMsg, key) - case "progressHealth": - err = unpopulate(val, "ProgressHealth", &i.ProgressHealth) - delete(rawMsg, key) - case "progressPercentage": - err = unpopulate(val, "ProgressPercentage", &i.ProgressPercentage) - delete(rawMsg, key) - case "startTime": - err = unpopulate(val, "StartTime", &i.StartTime) - delete(rawMsg, key) - case "transferredBytes": - err = unpopulate(val, "TransferredBytes", &i.TransferredBytes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmTestFailoverInput. -func (i InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "networkId", i.NetworkID) - populate(objectMap, "recoveryPointId", i.RecoveryPointID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmTestFailoverInput. -func (i *InMageRcmTestFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "networkId": - err = unpopulate(val, "NetworkID", &i.NetworkID) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmUnplannedFailoverInput. -func (i InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "performShutdown", i.PerformShutdown) - populate(objectMap, "recoveryPointId", i.RecoveryPointID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmUnplannedFailoverInput. -func (i *InMageRcmUnplannedFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "performShutdown": - err = unpopulate(val, "PerformShutdown", &i.PerformShutdown) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmUpdateApplianceForReplicationProtectedItemInput. -func (i InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "runAsAccountId", i.RunAsAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmUpdateApplianceForReplicationProtectedItemInput. -func (i *InMageRcmUpdateApplianceForReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmUpdateContainerMappingInput. -func (i InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enableAgentAutoUpgrade", i.EnableAgentAutoUpgrade) - objectMap["instanceType"] = "InMageRcm" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmUpdateContainerMappingInput. -func (i *InMageRcmUpdateContainerMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enableAgentAutoUpgrade": - err = unpopulate(val, "EnableAgentAutoUpgrade", &i.EnableAgentAutoUpgrade) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageRcmUpdateReplicationProtectedItemInput. -func (i InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "licenseType", i.LicenseType) - populate(objectMap, "targetAvailabilitySetId", i.TargetAvailabilitySetID) - populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) - populate(objectMap, "targetBootDiagnosticsStorageAccountId", i.TargetBootDiagnosticsStorageAccountID) - populate(objectMap, "targetNetworkId", i.TargetNetworkID) - populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) - populate(objectMap, "targetResourceGroupId", i.TargetResourceGroupID) - populate(objectMap, "targetVmName", i.TargetVMName) - populate(objectMap, "targetVmSize", i.TargetVMSize) - populate(objectMap, "testNetworkId", i.TestNetworkID) - populate(objectMap, "vmNics", i.VMNics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmUpdateReplicationProtectedItemInput. -func (i *InMageRcmUpdateReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &i.LicenseType) - delete(rawMsg, key) - case "targetAvailabilitySetId": - err = unpopulate(val, "TargetAvailabilitySetID", &i.TargetAvailabilitySetID) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetBootDiagnosticsStorageAccountId": - err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &i.TargetBootDiagnosticsStorageAccountID) - delete(rawMsg, key) - case "targetNetworkId": - err = unpopulate(val, "TargetNetworkID", &i.TargetNetworkID) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetResourceGroupId": - err = unpopulate(val, "TargetResourceGroupID", &i.TargetResourceGroupID) - delete(rawMsg, key) - case "targetVmName": - err = unpopulate(val, "TargetVMName", &i.TargetVMName) - delete(rawMsg, key) - case "targetVmSize": - err = unpopulate(val, "TargetVMSize", &i.TargetVMSize) - delete(rawMsg, key) - case "testNetworkId": - err = unpopulate(val, "TestNetworkID", &i.TestNetworkID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &i.VMNics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageReplicationDetails. -func (i InMageReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeSiteType", i.ActiveSiteType) - populate(objectMap, "agentDetails", i.AgentDetails) - populate(objectMap, "azureStorageAccountId", i.AzureStorageAccountID) - populate(objectMap, "compressedDataRateInMB", i.CompressedDataRateInMB) - populate(objectMap, "consistencyPoints", i.ConsistencyPoints) - populate(objectMap, "datastores", i.Datastores) - populate(objectMap, "discoveryType", i.DiscoveryType) - populate(objectMap, "diskResized", i.DiskResized) - populate(objectMap, "ipAddress", i.IPAddress) - populate(objectMap, "infrastructureVmId", i.InfrastructureVMID) - objectMap["instanceType"] = "InMage" - populate(objectMap, "isAdditionalStatsAvailable", i.IsAdditionalStatsAvailable) - populateTimeRFC3339(objectMap, "lastHeartbeat", i.LastHeartbeat) - populateTimeRFC3339(objectMap, "lastRpoCalculatedTime", i.LastRpoCalculatedTime) - populateTimeRFC3339(objectMap, "lastUpdateReceivedTime", i.LastUpdateReceivedTime) - populate(objectMap, "masterTargetId", i.MasterTargetID) - populate(objectMap, "multiVmGroupId", i.MultiVMGroupID) - populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) - populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) - populate(objectMap, "osDetails", i.OSDetails) - populate(objectMap, "osVersion", i.OSVersion) - populate(objectMap, "processServerId", i.ProcessServerID) - populate(objectMap, "protectedDisks", i.ProtectedDisks) - populate(objectMap, "protectionStage", i.ProtectionStage) - populate(objectMap, "rebootAfterUpdateStatus", i.RebootAfterUpdateStatus) - populate(objectMap, "replicaId", i.ReplicaID) - populate(objectMap, "resyncDetails", i.ResyncDetails) - populateTimeRFC3339(objectMap, "retentionWindowEnd", i.RetentionWindowEnd) - populateTimeRFC3339(objectMap, "retentionWindowStart", i.RetentionWindowStart) - populate(objectMap, "rpoInSeconds", i.RpoInSeconds) - populate(objectMap, "sourceVmCpuCount", i.SourceVMCPUCount) - populate(objectMap, "sourceVmRamSizeInMB", i.SourceVMRAMSizeInMB) - populate(objectMap, "totalDataTransferred", i.TotalDataTransferred) - populate(objectMap, "totalProgressHealth", i.TotalProgressHealth) - populate(objectMap, "uncompressedDataRateInMB", i.UncompressedDataRateInMB) - populate(objectMap, "vCenterInfrastructureId", i.VCenterInfrastructureID) - populate(objectMap, "vmId", i.VMID) - populate(objectMap, "vmNics", i.VMNics) - populate(objectMap, "vmProtectionState", i.VMProtectionState) - populate(objectMap, "vmProtectionStateDescription", i.VMProtectionStateDescription) - populate(objectMap, "validationErrors", i.ValidationErrors) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageReplicationDetails. -func (i *InMageReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activeSiteType": - err = unpopulate(val, "ActiveSiteType", &i.ActiveSiteType) - delete(rawMsg, key) - case "agentDetails": - err = unpopulate(val, "AgentDetails", &i.AgentDetails) - delete(rawMsg, key) - case "azureStorageAccountId": - err = unpopulate(val, "AzureStorageAccountID", &i.AzureStorageAccountID) - delete(rawMsg, key) - case "compressedDataRateInMB": - err = unpopulate(val, "CompressedDataRateInMB", &i.CompressedDataRateInMB) - delete(rawMsg, key) - case "consistencyPoints": - err = unpopulate(val, "ConsistencyPoints", &i.ConsistencyPoints) - delete(rawMsg, key) - case "datastores": - err = unpopulate(val, "Datastores", &i.Datastores) - delete(rawMsg, key) - case "discoveryType": - err = unpopulate(val, "DiscoveryType", &i.DiscoveryType) - delete(rawMsg, key) - case "diskResized": - err = unpopulate(val, "DiskResized", &i.DiskResized) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &i.IPAddress) - delete(rawMsg, key) - case "infrastructureVmId": - err = unpopulate(val, "InfrastructureVMID", &i.InfrastructureVMID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "isAdditionalStatsAvailable": - err = unpopulate(val, "IsAdditionalStatsAvailable", &i.IsAdditionalStatsAvailable) - delete(rawMsg, key) - case "lastHeartbeat": - err = unpopulateTimeRFC3339(val, "LastHeartbeat", &i.LastHeartbeat) - delete(rawMsg, key) - case "lastRpoCalculatedTime": - err = unpopulateTimeRFC3339(val, "LastRpoCalculatedTime", &i.LastRpoCalculatedTime) - delete(rawMsg, key) - case "lastUpdateReceivedTime": - err = unpopulateTimeRFC3339(val, "LastUpdateReceivedTime", &i.LastUpdateReceivedTime) - delete(rawMsg, key) - case "masterTargetId": - err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) - delete(rawMsg, key) - case "multiVmGroupId": - err = unpopulate(val, "MultiVMGroupID", &i.MultiVMGroupID) - delete(rawMsg, key) - case "multiVmGroupName": - err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) - delete(rawMsg, key) - case "multiVmSyncStatus": - err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) - delete(rawMsg, key) - case "osDetails": - err = unpopulate(val, "OSDetails", &i.OSDetails) - delete(rawMsg, key) - case "osVersion": - err = unpopulate(val, "OSVersion", &i.OSVersion) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) - delete(rawMsg, key) - case "protectedDisks": - err = unpopulate(val, "ProtectedDisks", &i.ProtectedDisks) - delete(rawMsg, key) - case "protectionStage": - err = unpopulate(val, "ProtectionStage", &i.ProtectionStage) - delete(rawMsg, key) - case "rebootAfterUpdateStatus": - err = unpopulate(val, "RebootAfterUpdateStatus", &i.RebootAfterUpdateStatus) - delete(rawMsg, key) - case "replicaId": - err = unpopulate(val, "ReplicaID", &i.ReplicaID) - delete(rawMsg, key) - case "resyncDetails": - err = unpopulate(val, "ResyncDetails", &i.ResyncDetails) - delete(rawMsg, key) - case "retentionWindowEnd": - err = unpopulateTimeRFC3339(val, "RetentionWindowEnd", &i.RetentionWindowEnd) - delete(rawMsg, key) - case "retentionWindowStart": - err = unpopulateTimeRFC3339(val, "RetentionWindowStart", &i.RetentionWindowStart) - delete(rawMsg, key) - case "rpoInSeconds": - err = unpopulate(val, "RpoInSeconds", &i.RpoInSeconds) - delete(rawMsg, key) - case "sourceVmCpuCount": - err = unpopulate(val, "SourceVMCPUCount", &i.SourceVMCPUCount) - delete(rawMsg, key) - case "sourceVmRamSizeInMB": - err = unpopulate(val, "SourceVMRAMSizeInMB", &i.SourceVMRAMSizeInMB) - delete(rawMsg, key) - case "totalDataTransferred": - err = unpopulate(val, "TotalDataTransferred", &i.TotalDataTransferred) - delete(rawMsg, key) - case "totalProgressHealth": - err = unpopulate(val, "TotalProgressHealth", &i.TotalProgressHealth) - delete(rawMsg, key) - case "uncompressedDataRateInMB": - err = unpopulate(val, "UncompressedDataRateInMB", &i.UncompressedDataRateInMB) - delete(rawMsg, key) - case "vCenterInfrastructureId": - err = unpopulate(val, "VCenterInfrastructureID", &i.VCenterInfrastructureID) - delete(rawMsg, key) - case "vmId": - err = unpopulate(val, "VMID", &i.VMID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &i.VMNics) - delete(rawMsg, key) - case "vmProtectionState": - err = unpopulate(val, "VMProtectionState", &i.VMProtectionState) - delete(rawMsg, key) - case "vmProtectionStateDescription": - err = unpopulate(val, "VMProtectionStateDescription", &i.VMProtectionStateDescription) - delete(rawMsg, key) - case "validationErrors": - err = unpopulate(val, "ValidationErrors", &i.ValidationErrors) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageReprotectInput. -func (i InMageReprotectInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "datastoreName", i.DatastoreName) - populate(objectMap, "diskExclusionInput", i.DiskExclusionInput) - populate(objectMap, "disksToInclude", i.DisksToInclude) - objectMap["instanceType"] = "InMage" - populate(objectMap, "masterTargetId", i.MasterTargetID) - populate(objectMap, "processServerId", i.ProcessServerID) - populate(objectMap, "profileId", i.ProfileID) - populate(objectMap, "retentionDrive", i.RetentionDrive) - populate(objectMap, "runAsAccountId", i.RunAsAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageReprotectInput. -func (i *InMageReprotectInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "datastoreName": - err = unpopulate(val, "DatastoreName", &i.DatastoreName) - delete(rawMsg, key) - case "diskExclusionInput": - err = unpopulate(val, "DiskExclusionInput", &i.DiskExclusionInput) - delete(rawMsg, key) - case "disksToInclude": - err = unpopulate(val, "DisksToInclude", &i.DisksToInclude) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "masterTargetId": - err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) - delete(rawMsg, key) - case "profileId": - err = unpopulate(val, "ProfileID", &i.ProfileID) - delete(rawMsg, key) - case "retentionDrive": - err = unpopulate(val, "RetentionDrive", &i.RetentionDrive) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageTestFailoverInput. -func (i InMageTestFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMage" - populate(objectMap, "recoveryPointId", i.RecoveryPointID) - populate(objectMap, "recoveryPointType", i.RecoveryPointType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageTestFailoverInput. -func (i *InMageTestFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &i.RecoveryPointType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageUnplannedFailoverInput. -func (i InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMage" - populate(objectMap, "recoveryPointId", i.RecoveryPointID) - populate(objectMap, "recoveryPointType", i.RecoveryPointType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageUnplannedFailoverInput. -func (i *InMageUnplannedFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &i.RecoveryPointType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InMageVolumeExclusionOptions. -func (i InMageVolumeExclusionOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "onlyExcludeIfSingleVolume", i.OnlyExcludeIfSingleVolume) - populate(objectMap, "volumeLabel", i.VolumeLabel) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InMageVolumeExclusionOptions. -func (i *InMageVolumeExclusionOptions) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "onlyExcludeIfSingleVolume": - err = unpopulate(val, "OnlyExcludeIfSingleVolume", &i.OnlyExcludeIfSingleVolume) - delete(rawMsg, key) - case "volumeLabel": - err = unpopulate(val, "VolumeLabel", &i.VolumeLabel) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InconsistentVMDetails. -func (i InconsistentVMDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cloudName", i.CloudName) - populate(objectMap, "details", i.Details) - populate(objectMap, "errorIds", i.ErrorIDs) - populate(objectMap, "vmName", i.VMName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InconsistentVMDetails. -func (i *InconsistentVMDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cloudName": - err = unpopulate(val, "CloudName", &i.CloudName) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &i.Details) - delete(rawMsg, key) - case "errorIds": - err = unpopulate(val, "ErrorIDs", &i.ErrorIDs) - delete(rawMsg, key) - case "vmName": - err = unpopulate(val, "VMName", &i.VMName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InitialReplicationDetails. -func (i InitialReplicationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "initialReplicationProgressPercentage", i.InitialReplicationProgressPercentage) - populate(objectMap, "initialReplicationType", i.InitialReplicationType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InitialReplicationDetails. -func (i *InitialReplicationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "initialReplicationProgressPercentage": - err = unpopulate(val, "InitialReplicationProgressPercentage", &i.InitialReplicationProgressPercentage) - delete(rawMsg, key) - case "initialReplicationType": - err = unpopulate(val, "InitialReplicationType", &i.InitialReplicationType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InlineWorkflowTaskDetails. -func (i InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "childTasks", i.ChildTasks) - objectMap["instanceType"] = "InlineWorkflowTaskDetails" - populate(objectMap, "workflowIds", i.WorkflowIDs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InlineWorkflowTaskDetails. -func (i *InlineWorkflowTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "childTasks": - err = unpopulate(val, "ChildTasks", &i.ChildTasks) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &i.InstanceType) - delete(rawMsg, key) - case "workflowIds": - err = unpopulate(val, "WorkflowIDs", &i.WorkflowIDs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InnerHealthError. -func (i InnerHealthError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "creationTimeUtc", i.CreationTimeUTC) - populate(objectMap, "customerResolvability", i.CustomerResolvability) - populate(objectMap, "entityId", i.EntityID) - populate(objectMap, "errorCategory", i.ErrorCategory) - populate(objectMap, "errorCode", i.ErrorCode) - populate(objectMap, "errorId", i.ErrorID) - populate(objectMap, "errorLevel", i.ErrorLevel) - populate(objectMap, "errorMessage", i.ErrorMessage) - populate(objectMap, "errorSource", i.ErrorSource) - populate(objectMap, "errorType", i.ErrorType) - populate(objectMap, "possibleCauses", i.PossibleCauses) - populate(objectMap, "recommendedAction", i.RecommendedAction) - populate(objectMap, "recoveryProviderErrorMessage", i.RecoveryProviderErrorMessage) - populate(objectMap, "summaryMessage", i.SummaryMessage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InnerHealthError. -func (i *InnerHealthError) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "creationTimeUtc": - err = unpopulateTimeRFC3339(val, "CreationTimeUTC", &i.CreationTimeUTC) - delete(rawMsg, key) - case "customerResolvability": - err = unpopulate(val, "CustomerResolvability", &i.CustomerResolvability) - delete(rawMsg, key) - case "entityId": - err = unpopulate(val, "EntityID", &i.EntityID) - delete(rawMsg, key) - case "errorCategory": - err = unpopulate(val, "ErrorCategory", &i.ErrorCategory) - delete(rawMsg, key) - case "errorCode": - err = unpopulate(val, "ErrorCode", &i.ErrorCode) - delete(rawMsg, key) - case "errorId": - err = unpopulate(val, "ErrorID", &i.ErrorID) - delete(rawMsg, key) - case "errorLevel": - err = unpopulate(val, "ErrorLevel", &i.ErrorLevel) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) - delete(rawMsg, key) - case "errorSource": - err = unpopulate(val, "ErrorSource", &i.ErrorSource) - delete(rawMsg, key) - case "errorType": - err = unpopulate(val, "ErrorType", &i.ErrorType) - delete(rawMsg, key) - case "possibleCauses": - err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) - delete(rawMsg, key) - case "recommendedAction": - err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) - delete(rawMsg, key) - case "recoveryProviderErrorMessage": - err = unpopulate(val, "RecoveryProviderErrorMessage", &i.RecoveryProviderErrorMessage) - delete(rawMsg, key) - case "summaryMessage": - err = unpopulate(val, "SummaryMessage", &i.SummaryMessage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InputEndpoint. -func (i InputEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "endpointName", i.EndpointName) - populate(objectMap, "privatePort", i.PrivatePort) - populate(objectMap, "protocol", i.Protocol) - populate(objectMap, "publicPort", i.PublicPort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type InputEndpoint. -func (i *InputEndpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endpointName": - err = unpopulate(val, "EndpointName", &i.EndpointName) - delete(rawMsg, key) - case "privatePort": - err = unpopulate(val, "PrivatePort", &i.PrivatePort) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &i.Protocol) - delete(rawMsg, key) - case "publicPort": - err = unpopulate(val, "PublicPort", &i.PublicPort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Job. -func (j Job) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", j.ID) - populate(objectMap, "location", j.Location) - populate(objectMap, "name", j.Name) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "type", j.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Job. -func (j *Job) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &j.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &j.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &j.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &j.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &j.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobCollection. -func (j JobCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", j.NextLink) - populate(objectMap, "value", j.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobCollection. -func (j *JobCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &j.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &j.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobDetails. -func (j JobDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedObjectDetails", j.AffectedObjectDetails) - objectMap["instanceType"] = j.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobDetails. -func (j *JobDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedObjectDetails": - err = unpopulate(val, "AffectedObjectDetails", &j.AffectedObjectDetails) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &j.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobEntity. -func (j JobEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "jobFriendlyName", j.JobFriendlyName) - populate(objectMap, "jobId", j.JobID) - populate(objectMap, "jobScenarioName", j.JobScenarioName) - populate(objectMap, "targetInstanceType", j.TargetInstanceType) - populate(objectMap, "targetObjectId", j.TargetObjectID) - populate(objectMap, "targetObjectName", j.TargetObjectName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobEntity. -func (j *JobEntity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobFriendlyName": - err = unpopulate(val, "JobFriendlyName", &j.JobFriendlyName) - delete(rawMsg, key) - case "jobId": - err = unpopulate(val, "JobID", &j.JobID) - delete(rawMsg, key) - case "jobScenarioName": - err = unpopulate(val, "JobScenarioName", &j.JobScenarioName) - delete(rawMsg, key) - case "targetInstanceType": - err = unpopulate(val, "TargetInstanceType", &j.TargetInstanceType) - delete(rawMsg, key) - case "targetObjectId": - err = unpopulate(val, "TargetObjectID", &j.TargetObjectID) - delete(rawMsg, key) - case "targetObjectName": - err = unpopulate(val, "TargetObjectName", &j.TargetObjectName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobErrorDetails. -func (j JobErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "creationTime", j.CreationTime) - populate(objectMap, "errorLevel", j.ErrorLevel) - populate(objectMap, "providerErrorDetails", j.ProviderErrorDetails) - populate(objectMap, "serviceErrorDetails", j.ServiceErrorDetails) - populate(objectMap, "taskId", j.TaskID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobErrorDetails. -func (j *JobErrorDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &j.CreationTime) - delete(rawMsg, key) - case "errorLevel": - err = unpopulate(val, "ErrorLevel", &j.ErrorLevel) - delete(rawMsg, key) - case "providerErrorDetails": - err = unpopulate(val, "ProviderErrorDetails", &j.ProviderErrorDetails) - delete(rawMsg, key) - case "serviceErrorDetails": - err = unpopulate(val, "ServiceErrorDetails", &j.ServiceErrorDetails) - delete(rawMsg, key) - case "taskId": - err = unpopulate(val, "TaskID", &j.TaskID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobProperties. -func (j JobProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activityId", j.ActivityID) - populate(objectMap, "allowedActions", j.AllowedActions) - populate(objectMap, "customDetails", j.CustomDetails) - populateTimeRFC3339(objectMap, "endTime", j.EndTime) - populate(objectMap, "errors", j.Errors) - populate(objectMap, "friendlyName", j.FriendlyName) - populate(objectMap, "scenarioName", j.ScenarioName) - populateTimeRFC3339(objectMap, "startTime", j.StartTime) - populate(objectMap, "state", j.State) - populate(objectMap, "stateDescription", j.StateDescription) - populate(objectMap, "targetInstanceType", j.TargetInstanceType) - populate(objectMap, "targetObjectId", j.TargetObjectID) - populate(objectMap, "targetObjectName", j.TargetObjectName) - populate(objectMap, "tasks", j.Tasks) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobProperties. -func (j *JobProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activityId": - err = unpopulate(val, "ActivityID", &j.ActivityID) - delete(rawMsg, key) - case "allowedActions": - err = unpopulate(val, "AllowedActions", &j.AllowedActions) - delete(rawMsg, key) - case "customDetails": - j.CustomDetails, err = unmarshalJobDetailsClassification(val) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &j.EndTime) - delete(rawMsg, key) - case "errors": - err = unpopulate(val, "Errors", &j.Errors) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &j.FriendlyName) - delete(rawMsg, key) - case "scenarioName": - err = unpopulate(val, "ScenarioName", &j.ScenarioName) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &j.StartTime) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &j.State) - delete(rawMsg, key) - case "stateDescription": - err = unpopulate(val, "StateDescription", &j.StateDescription) - delete(rawMsg, key) - case "targetInstanceType": - err = unpopulate(val, "TargetInstanceType", &j.TargetInstanceType) - delete(rawMsg, key) - case "targetObjectId": - err = unpopulate(val, "TargetObjectID", &j.TargetObjectID) - delete(rawMsg, key) - case "targetObjectName": - err = unpopulate(val, "TargetObjectName", &j.TargetObjectName) - delete(rawMsg, key) - case "tasks": - err = unpopulate(val, "Tasks", &j.Tasks) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobQueryParameter. -func (j JobQueryParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedObjectTypes", j.AffectedObjectTypes) - populate(objectMap, "endTime", j.EndTime) - populate(objectMap, "fabricId", j.FabricID) - populate(objectMap, "jobName", j.JobName) - populate(objectMap, "jobOutputType", j.JobOutputType) - populate(objectMap, "jobStatus", j.JobStatus) - populate(objectMap, "startTime", j.StartTime) - populate(objectMap, "timezoneOffset", j.TimezoneOffset) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobQueryParameter. -func (j *JobQueryParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedObjectTypes": - err = unpopulate(val, "AffectedObjectTypes", &j.AffectedObjectTypes) - delete(rawMsg, key) - case "endTime": - err = unpopulate(val, "EndTime", &j.EndTime) - delete(rawMsg, key) - case "fabricId": - err = unpopulate(val, "FabricID", &j.FabricID) - delete(rawMsg, key) - case "jobName": - err = unpopulate(val, "JobName", &j.JobName) - delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &j.JobOutputType) - delete(rawMsg, key) - case "jobStatus": - err = unpopulate(val, "JobStatus", &j.JobStatus) - delete(rawMsg, key) - case "startTime": - err = unpopulate(val, "StartTime", &j.StartTime) - delete(rawMsg, key) - case "timezoneOffset": - err = unpopulate(val, "TimezoneOffset", &j.TimezoneOffset) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobStatusEventDetails. -func (j JobStatusEventDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedObjectType", j.AffectedObjectType) - objectMap["instanceType"] = "JobStatus" - populate(objectMap, "jobFriendlyName", j.JobFriendlyName) - populate(objectMap, "jobId", j.JobID) - populate(objectMap, "jobStatus", j.JobStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobStatusEventDetails. -func (j *JobStatusEventDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedObjectType": - err = unpopulate(val, "AffectedObjectType", &j.AffectedObjectType) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &j.InstanceType) - delete(rawMsg, key) - case "jobFriendlyName": - err = unpopulate(val, "JobFriendlyName", &j.JobFriendlyName) - delete(rawMsg, key) - case "jobId": - err = unpopulate(val, "JobID", &j.JobID) - delete(rawMsg, key) - case "jobStatus": - err = unpopulate(val, "JobStatus", &j.JobStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobTaskDetails. -func (j JobTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "JobTaskDetails" - populate(objectMap, "jobTask", j.JobTask) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobTaskDetails. -func (j *JobTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &j.InstanceType) - delete(rawMsg, key) - case "jobTask": - err = unpopulate(val, "JobTask", &j.JobTask) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KeyEncryptionKeyInfo. -func (k KeyEncryptionKeyInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "keyIdentifier", k.KeyIdentifier) - populate(objectMap, "keyVaultResourceArmId", k.KeyVaultResourceArmID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KeyEncryptionKeyInfo. -func (k *KeyEncryptionKeyInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "keyIdentifier": - err = unpopulate(val, "KeyIdentifier", &k.KeyIdentifier) - delete(rawMsg, key) - case "keyVaultResourceArmId": - err = unpopulate(val, "KeyVaultResourceArmID", &k.KeyVaultResourceArmID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LogicalNetwork. -func (l LogicalNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", l.ID) - populate(objectMap, "location", l.Location) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "type", l.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetwork. -func (l *LogicalNetwork) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &l.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &l.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &l.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &l.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LogicalNetworkCollection. -func (l LogicalNetworkCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworkCollection. -func (l *LogicalNetworkCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LogicalNetworkProperties. -func (l LogicalNetworkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "friendlyName", l.FriendlyName) - populate(objectMap, "logicalNetworkDefinitionsStatus", l.LogicalNetworkDefinitionsStatus) - populate(objectMap, "logicalNetworkUsage", l.LogicalNetworkUsage) - populate(objectMap, "networkVirtualizationStatus", l.NetworkVirtualizationStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworkProperties. -func (l *LogicalNetworkProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "friendlyName": - err = unpopulate(val, "FriendlyName", &l.FriendlyName) - delete(rawMsg, key) - case "logicalNetworkDefinitionsStatus": - err = unpopulate(val, "LogicalNetworkDefinitionsStatus", &l.LogicalNetworkDefinitionsStatus) - delete(rawMsg, key) - case "logicalNetworkUsage": - err = unpopulate(val, "LogicalNetworkUsage", &l.LogicalNetworkUsage) - delete(rawMsg, key) - case "networkVirtualizationStatus": - err = unpopulate(val, "NetworkVirtualizationStatus", &l.NetworkVirtualizationStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManualActionTaskDetails. -func (m ManualActionTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "ManualActionTaskDetails" - populate(objectMap, "instructions", m.Instructions) - populate(objectMap, "name", m.Name) - populate(objectMap, "observation", m.Observation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManualActionTaskDetails. -func (m *ManualActionTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &m.InstanceType) - delete(rawMsg, key) - case "instructions": - err = unpopulate(val, "Instructions", &m.Instructions) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "observation": - err = unpopulate(val, "Observation", &m.Observation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MarsAgentDetails. -func (m MarsAgentDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "biosId", m.BiosID) - populate(objectMap, "fabricObjectId", m.FabricObjectID) - populate(objectMap, "fqdn", m.Fqdn) - populate(objectMap, "health", m.Health) - populate(objectMap, "healthErrors", m.HealthErrors) - populate(objectMap, "id", m.ID) - populateTimeRFC3339(objectMap, "lastHeartbeatUtc", m.LastHeartbeatUTC) - populate(objectMap, "name", m.Name) - populate(objectMap, "version", m.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MarsAgentDetails. -func (m *MarsAgentDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "biosId": - err = unpopulate(val, "BiosID", &m.BiosID) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &m.FabricObjectID) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &m.Fqdn) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &m.Health) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &m.HealthErrors) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "lastHeartbeatUtc": - err = unpopulateTimeRFC3339(val, "LastHeartbeatUTC", &m.LastHeartbeatUTC) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &m.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MasterTargetServer. -func (m MasterTargetServer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "agentExpiryDate", m.AgentExpiryDate) - populate(objectMap, "agentVersion", m.AgentVersion) - populate(objectMap, "agentVersionDetails", m.AgentVersionDetails) - populate(objectMap, "dataStores", m.DataStores) - populate(objectMap, "diskCount", m.DiskCount) - populate(objectMap, "healthErrors", m.HealthErrors) - populate(objectMap, "id", m.ID) - populate(objectMap, "ipAddress", m.IPAddress) - populateTimeRFC3339(objectMap, "lastHeartbeat", m.LastHeartbeat) - populateTimeRFC3339(objectMap, "marsAgentExpiryDate", m.MarsAgentExpiryDate) - populate(objectMap, "marsAgentVersion", m.MarsAgentVersion) - populate(objectMap, "marsAgentVersionDetails", m.MarsAgentVersionDetails) - populate(objectMap, "name", m.Name) - populate(objectMap, "osType", m.OSType) - populate(objectMap, "osVersion", m.OSVersion) - populate(objectMap, "retentionVolumes", m.RetentionVolumes) - populate(objectMap, "validationErrors", m.ValidationErrors) - populate(objectMap, "versionStatus", m.VersionStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MasterTargetServer. -func (m *MasterTargetServer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentExpiryDate": - err = unpopulateTimeRFC3339(val, "AgentExpiryDate", &m.AgentExpiryDate) - delete(rawMsg, key) - case "agentVersion": - err = unpopulate(val, "AgentVersion", &m.AgentVersion) - delete(rawMsg, key) - case "agentVersionDetails": - err = unpopulate(val, "AgentVersionDetails", &m.AgentVersionDetails) - delete(rawMsg, key) - case "dataStores": - err = unpopulate(val, "DataStores", &m.DataStores) - delete(rawMsg, key) - case "diskCount": - err = unpopulate(val, "DiskCount", &m.DiskCount) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &m.HealthErrors) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &m.IPAddress) - delete(rawMsg, key) - case "lastHeartbeat": - err = unpopulateTimeRFC3339(val, "LastHeartbeat", &m.LastHeartbeat) - delete(rawMsg, key) - case "marsAgentExpiryDate": - err = unpopulateTimeRFC3339(val, "MarsAgentExpiryDate", &m.MarsAgentExpiryDate) - delete(rawMsg, key) - case "marsAgentVersion": - err = unpopulate(val, "MarsAgentVersion", &m.MarsAgentVersion) - delete(rawMsg, key) - case "marsAgentVersionDetails": - err = unpopulate(val, "MarsAgentVersionDetails", &m.MarsAgentVersionDetails) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &m.OSType) - delete(rawMsg, key) - case "osVersion": - err = unpopulate(val, "OSVersion", &m.OSVersion) - delete(rawMsg, key) - case "retentionVolumes": - err = unpopulate(val, "RetentionVolumes", &m.RetentionVolumes) - delete(rawMsg, key) - case "validationErrors": - err = unpopulate(val, "ValidationErrors", &m.ValidationErrors) - delete(rawMsg, key) - case "versionStatus": - err = unpopulate(val, "VersionStatus", &m.VersionStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrateInput. -func (m MigrateInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", m.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateInput. -func (m *MigrateInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrateInputProperties. -func (m MigrateInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", m.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateInputProperties. -func (m *MigrateInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - m.ProviderSpecificDetails, err = unmarshalMigrateProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrateProviderSpecificInput. -func (m MigrateProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = m.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateProviderSpecificInput. -func (m *MigrateProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &m.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrationItem. -func (m MigrationItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationItem. -func (m *MigrationItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrationItemCollection. -func (m MigrationItemCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationItemCollection. -func (m *MigrationItemCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrationItemProperties. -func (m MigrationItemProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedOperations", m.AllowedOperations) - populate(objectMap, "criticalJobHistory", m.CriticalJobHistory) - populate(objectMap, "currentJob", m.CurrentJob) - populate(objectMap, "eventCorrelationId", m.EventCorrelationID) - populate(objectMap, "health", m.Health) - populate(objectMap, "healthErrors", m.HealthErrors) - populate(objectMap, "lastMigrationStatus", m.LastMigrationStatus) - populateTimeRFC3339(objectMap, "lastMigrationTime", m.LastMigrationTime) - populate(objectMap, "lastTestMigrationStatus", m.LastTestMigrationStatus) - populateTimeRFC3339(objectMap, "lastTestMigrationTime", m.LastTestMigrationTime) - populate(objectMap, "machineName", m.MachineName) - populate(objectMap, "migrationState", m.MigrationState) - populate(objectMap, "migrationStateDescription", m.MigrationStateDescription) - populate(objectMap, "policyFriendlyName", m.PolicyFriendlyName) - populate(objectMap, "policyId", m.PolicyID) - populate(objectMap, "providerSpecificDetails", m.ProviderSpecificDetails) - populate(objectMap, "recoveryServicesProviderId", m.RecoveryServicesProviderID) - populate(objectMap, "replicationStatus", m.ReplicationStatus) - populate(objectMap, "testMigrateState", m.TestMigrateState) - populate(objectMap, "testMigrateStateDescription", m.TestMigrateStateDescription) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationItemProperties. -func (m *MigrationItemProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedOperations": - err = unpopulate(val, "AllowedOperations", &m.AllowedOperations) - delete(rawMsg, key) - case "criticalJobHistory": - err = unpopulate(val, "CriticalJobHistory", &m.CriticalJobHistory) - delete(rawMsg, key) - case "currentJob": - err = unpopulate(val, "CurrentJob", &m.CurrentJob) - delete(rawMsg, key) - case "eventCorrelationId": - err = unpopulate(val, "EventCorrelationID", &m.EventCorrelationID) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &m.Health) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &m.HealthErrors) - delete(rawMsg, key) - case "lastMigrationStatus": - err = unpopulate(val, "LastMigrationStatus", &m.LastMigrationStatus) - delete(rawMsg, key) - case "lastMigrationTime": - err = unpopulateTimeRFC3339(val, "LastMigrationTime", &m.LastMigrationTime) - delete(rawMsg, key) - case "lastTestMigrationStatus": - err = unpopulate(val, "LastTestMigrationStatus", &m.LastTestMigrationStatus) - delete(rawMsg, key) - case "lastTestMigrationTime": - err = unpopulateTimeRFC3339(val, "LastTestMigrationTime", &m.LastTestMigrationTime) - delete(rawMsg, key) - case "machineName": - err = unpopulate(val, "MachineName", &m.MachineName) - delete(rawMsg, key) - case "migrationState": - err = unpopulate(val, "MigrationState", &m.MigrationState) - delete(rawMsg, key) - case "migrationStateDescription": - err = unpopulate(val, "MigrationStateDescription", &m.MigrationStateDescription) - delete(rawMsg, key) - case "policyFriendlyName": - err = unpopulate(val, "PolicyFriendlyName", &m.PolicyFriendlyName) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &m.PolicyID) - delete(rawMsg, key) - case "providerSpecificDetails": - m.ProviderSpecificDetails, err = unmarshalMigrationProviderSpecificSettingsClassification(val) - delete(rawMsg, key) - case "recoveryServicesProviderId": - err = unpopulate(val, "RecoveryServicesProviderID", &m.RecoveryServicesProviderID) - delete(rawMsg, key) - case "replicationStatus": - err = unpopulate(val, "ReplicationStatus", &m.ReplicationStatus) - delete(rawMsg, key) - case "testMigrateState": - err = unpopulate(val, "TestMigrateState", &m.TestMigrateState) - delete(rawMsg, key) - case "testMigrateStateDescription": - err = unpopulate(val, "TestMigrateStateDescription", &m.TestMigrateStateDescription) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrationItemsQueryParameter. -func (m MigrationItemsQueryParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instanceType", m.InstanceType) - populate(objectMap, "sourceContainerName", m.SourceContainerName) - populate(objectMap, "sourceFabricName", m.SourceFabricName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationItemsQueryParameter. -func (m *MigrationItemsQueryParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &m.InstanceType) - delete(rawMsg, key) - case "sourceContainerName": - err = unpopulate(val, "SourceContainerName", &m.SourceContainerName) - delete(rawMsg, key) - case "sourceFabricName": - err = unpopulate(val, "SourceFabricName", &m.SourceFabricName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrationProviderSpecificSettings. -func (m MigrationProviderSpecificSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = m.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationProviderSpecificSettings. -func (m *MigrationProviderSpecificSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &m.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrationRecoveryPoint. -func (m MigrationRecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationRecoveryPoint. -func (m *MigrationRecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrationRecoveryPointCollection. -func (m MigrationRecoveryPointCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationRecoveryPointCollection. -func (m *MigrationRecoveryPointCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MigrationRecoveryPointProperties. -func (m MigrationRecoveryPointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "recoveryPointTime", m.RecoveryPointTime) - populate(objectMap, "recoveryPointType", m.RecoveryPointType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationRecoveryPointProperties. -func (m *MigrationRecoveryPointProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "recoveryPointTime": - err = unpopulateTimeRFC3339(val, "RecoveryPointTime", &m.RecoveryPointTime) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &m.RecoveryPointType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MobilityServiceUpdate. -func (m MobilityServiceUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "osType", m.OSType) - populate(objectMap, "rebootStatus", m.RebootStatus) - populate(objectMap, "version", m.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MobilityServiceUpdate. -func (m *MobilityServiceUpdate) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "osType": - err = unpopulate(val, "OSType", &m.OSType) - delete(rawMsg, key) - case "rebootStatus": - err = unpopulate(val, "RebootStatus", &m.RebootStatus) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &m.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Network. -func (n Network) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", n.ID) - populate(objectMap, "location", n.Location) - populate(objectMap, "name", n.Name) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "type", n.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Network. -func (n *Network) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &n.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &n.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &n.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkCollection. -func (n NetworkCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", n.NextLink) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkCollection. -func (n *NetworkCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &n.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkMapping. -func (n NetworkMapping) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", n.ID) - populate(objectMap, "location", n.Location) - populate(objectMap, "name", n.Name) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "type", n.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkMapping. -func (n *NetworkMapping) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &n.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &n.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &n.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &n.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &n.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkMappingCollection. -func (n NetworkMappingCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", n.NextLink) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkMappingCollection. -func (n *NetworkMappingCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &n.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkMappingFabricSpecificSettings. -func (n NetworkMappingFabricSpecificSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = n.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkMappingFabricSpecificSettings. -func (n *NetworkMappingFabricSpecificSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &n.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkMappingProperties. -func (n NetworkMappingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricSpecificSettings", n.FabricSpecificSettings) - populate(objectMap, "primaryFabricFriendlyName", n.PrimaryFabricFriendlyName) - populate(objectMap, "primaryNetworkFriendlyName", n.PrimaryNetworkFriendlyName) - populate(objectMap, "primaryNetworkId", n.PrimaryNetworkID) - populate(objectMap, "recoveryFabricArmId", n.RecoveryFabricArmID) - populate(objectMap, "recoveryFabricFriendlyName", n.RecoveryFabricFriendlyName) - populate(objectMap, "recoveryNetworkFriendlyName", n.RecoveryNetworkFriendlyName) - populate(objectMap, "recoveryNetworkId", n.RecoveryNetworkID) - populate(objectMap, "state", n.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkMappingProperties. -func (n *NetworkMappingProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricSpecificSettings": - n.FabricSpecificSettings, err = unmarshalNetworkMappingFabricSpecificSettingsClassification(val) - delete(rawMsg, key) - case "primaryFabricFriendlyName": - err = unpopulate(val, "PrimaryFabricFriendlyName", &n.PrimaryFabricFriendlyName) - delete(rawMsg, key) - case "primaryNetworkFriendlyName": - err = unpopulate(val, "PrimaryNetworkFriendlyName", &n.PrimaryNetworkFriendlyName) - delete(rawMsg, key) - case "primaryNetworkId": - err = unpopulate(val, "PrimaryNetworkID", &n.PrimaryNetworkID) - delete(rawMsg, key) - case "recoveryFabricArmId": - err = unpopulate(val, "RecoveryFabricArmID", &n.RecoveryFabricArmID) - delete(rawMsg, key) - case "recoveryFabricFriendlyName": - err = unpopulate(val, "RecoveryFabricFriendlyName", &n.RecoveryFabricFriendlyName) - delete(rawMsg, key) - case "recoveryNetworkFriendlyName": - err = unpopulate(val, "RecoveryNetworkFriendlyName", &n.RecoveryNetworkFriendlyName) - delete(rawMsg, key) - case "recoveryNetworkId": - err = unpopulate(val, "RecoveryNetworkID", &n.RecoveryNetworkID) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &n.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkProperties. -func (n NetworkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricType", n.FabricType) - populate(objectMap, "friendlyName", n.FriendlyName) - populate(objectMap, "networkType", n.NetworkType) - populate(objectMap, "subnets", n.Subnets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProperties. -func (n *NetworkProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricType": - err = unpopulate(val, "FabricType", &n.FabricType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &n.FriendlyName) - delete(rawMsg, key) - case "networkType": - err = unpopulate(val, "NetworkType", &n.NetworkType) - delete(rawMsg, key) - case "subnets": - err = unpopulate(val, "Subnets", &n.Subnets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NewProtectionProfile. -func (n NewProtectionProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", n.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", n.CrashConsistentFrequencyInMinutes) - populate(objectMap, "multiVmSyncStatus", n.MultiVMSyncStatus) - populate(objectMap, "policyName", n.PolicyName) - populate(objectMap, "recoveryPointHistory", n.RecoveryPointHistory) - objectMap["resourceType"] = "New" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NewProtectionProfile. -func (n *NewProtectionProfile) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &n.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &n.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "multiVmSyncStatus": - err = unpopulate(val, "MultiVMSyncStatus", &n.MultiVMSyncStatus) - delete(rawMsg, key) - case "policyName": - err = unpopulate(val, "PolicyName", &n.PolicyName) - delete(rawMsg, key) - case "recoveryPointHistory": - err = unpopulate(val, "RecoveryPointHistory", &n.RecoveryPointHistory) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &n.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NewRecoveryVirtualNetwork. -func (n NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "recoveryVirtualNetworkName", n.RecoveryVirtualNetworkName) - populate(objectMap, "recoveryVirtualNetworkResourceGroupName", n.RecoveryVirtualNetworkResourceGroupName) - objectMap["resourceType"] = "New" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NewRecoveryVirtualNetwork. -func (n *NewRecoveryVirtualNetwork) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "recoveryVirtualNetworkName": - err = unpopulate(val, "RecoveryVirtualNetworkName", &n.RecoveryVirtualNetworkName) - delete(rawMsg, key) - case "recoveryVirtualNetworkResourceGroupName": - err = unpopulate(val, "RecoveryVirtualNetworkResourceGroupName", &n.RecoveryVirtualNetworkResourceGroupName) - delete(rawMsg, key) - case "resourceType": - err = unpopulate(val, "ResourceType", &n.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OSDetails. -func (o OSDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "osEdition", o.OSEdition) - populate(objectMap, "oSMajorVersion", o.OSMajorVersion) - populate(objectMap, "oSMinorVersion", o.OSMinorVersion) - populate(objectMap, "osType", o.OSType) - populate(objectMap, "oSVersion", o.OSVersion) - populate(objectMap, "productType", o.ProductType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OSDetails. -func (o *OSDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "osEdition": - err = unpopulate(val, "OSEdition", &o.OSEdition) - delete(rawMsg, key) - case "oSMajorVersion": - err = unpopulate(val, "OSMajorVersion", &o.OSMajorVersion) - delete(rawMsg, key) - case "oSMinorVersion": - err = unpopulate(val, "OSMinorVersion", &o.OSMinorVersion) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &o.OSType) - delete(rawMsg, key) - case "oSVersion": - err = unpopulate(val, "OSVersion", &o.OSVersion) - delete(rawMsg, key) - case "productType": - err = unpopulate(val, "ProductType", &o.ProductType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OSDiskDetails. -func (o OSDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "osType", o.OSType) - populate(objectMap, "osVhdId", o.OSVhdID) - populate(objectMap, "vhdName", o.VhdName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OSDiskDetails. -func (o *OSDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "osType": - err = unpopulate(val, "OSType", &o.OSType) - delete(rawMsg, key) - case "osVhdId": - err = unpopulate(val, "OSVhdID", &o.OSVhdID) - delete(rawMsg, key) - case "vhdName": - err = unpopulate(val, "VhdName", &o.VhdName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OSVersionWrapper. -func (o OSVersionWrapper) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "servicePack", o.ServicePack) - populate(objectMap, "version", o.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OSVersionWrapper. -func (o *OSVersionWrapper) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "servicePack": - err = unpopulate(val, "ServicePack", &o.ServicePack) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &o.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationsDiscovery. -func (o OperationsDiscovery) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "display", o.Display) - populate(objectMap, "name", o.Name) - populate(objectMap, "origin", o.Origin) - populate(objectMap, "properties", &o.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDiscovery. -func (o *OperationsDiscovery) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "display": - err = unpopulate(val, "Display", &o.Display) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &o.Origin) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationsDiscoveryCollection. -func (o OperationsDiscoveryCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDiscoveryCollection. -func (o *OperationsDiscoveryCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PauseReplicationInput. -func (p PauseReplicationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PauseReplicationInput. -func (p *PauseReplicationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PauseReplicationInputProperties. -func (p PauseReplicationInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instanceType", p.InstanceType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PauseReplicationInputProperties. -func (p *PauseReplicationInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &p.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PlannedFailoverInput. -func (p PlannedFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PlannedFailoverInput. -func (p *PlannedFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PlannedFailoverInputProperties. -func (p PlannedFailoverInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "failoverDirection", p.FailoverDirection) - populate(objectMap, "providerSpecificDetails", p.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PlannedFailoverInputProperties. -func (p *PlannedFailoverInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failoverDirection": - err = unpopulate(val, "FailoverDirection", &p.FailoverDirection) - delete(rawMsg, key) - case "providerSpecificDetails": - p.ProviderSpecificDetails, err = unmarshalPlannedFailoverProviderSpecificFailoverInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PlannedFailoverProviderSpecificFailoverInput. -func (p PlannedFailoverProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = p.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PlannedFailoverProviderSpecificFailoverInput. -func (p *PlannedFailoverProviderSpecificFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &p.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Policy. -func (p Policy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Policy. -func (p *Policy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyCollection. -func (p PolicyCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyCollection. -func (p *PolicyCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyProperties. -func (p PolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "friendlyName", p.FriendlyName) - populate(objectMap, "providerSpecificDetails", p.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyProperties. -func (p *PolicyProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "friendlyName": - err = unpopulate(val, "FriendlyName", &p.FriendlyName) - delete(rawMsg, key) - case "providerSpecificDetails": - p.ProviderSpecificDetails, err = unmarshalPolicyProviderSpecificDetailsClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyProviderSpecificDetails. -func (p PolicyProviderSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = p.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyProviderSpecificDetails. -func (p *PolicyProviderSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &p.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PolicyProviderSpecificInput. -func (p PolicyProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = p.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyProviderSpecificInput. -func (p *PolicyProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &p.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProcessServer. -func (p ProcessServer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "agentExpiryDate", p.AgentExpiryDate) - populate(objectMap, "agentVersion", p.AgentVersion) - populate(objectMap, "agentVersionDetails", p.AgentVersionDetails) - populate(objectMap, "availableMemoryInBytes", p.AvailableMemoryInBytes) - populate(objectMap, "availableSpaceInBytes", p.AvailableSpaceInBytes) - populate(objectMap, "cpuLoad", p.CPULoad) - populate(objectMap, "cpuLoadStatus", p.CPULoadStatus) - populate(objectMap, "friendlyName", p.FriendlyName) - populate(objectMap, "health", p.Health) - populate(objectMap, "healthErrors", p.HealthErrors) - populate(objectMap, "hostId", p.HostID) - populate(objectMap, "id", p.ID) - populate(objectMap, "ipAddress", p.IPAddress) - populateTimeRFC3339(objectMap, "lastHeartbeat", p.LastHeartbeat) - populate(objectMap, "machineCount", p.MachineCount) - populate(objectMap, "marsCommunicationStatus", p.MarsCommunicationStatus) - populate(objectMap, "marsRegistrationStatus", p.MarsRegistrationStatus) - populate(objectMap, "memoryUsageStatus", p.MemoryUsageStatus) - populate(objectMap, "mobilityServiceUpdates", p.MobilityServiceUpdates) - populate(objectMap, "osType", p.OSType) - populate(objectMap, "osVersion", p.OSVersion) - populate(objectMap, "psServiceStatus", p.PsServiceStatus) - populateTimeRFC3339(objectMap, "psStatsRefreshTime", p.PsStatsRefreshTime) - populate(objectMap, "replicationPairCount", p.ReplicationPairCount) - populateTimeRFC3339(objectMap, "sslCertExpiryDate", p.SSLCertExpiryDate) - populate(objectMap, "sslCertExpiryRemainingDays", p.SSLCertExpiryRemainingDays) - populate(objectMap, "spaceUsageStatus", p.SpaceUsageStatus) - populate(objectMap, "systemLoad", p.SystemLoad) - populate(objectMap, "systemLoadStatus", p.SystemLoadStatus) - populate(objectMap, "throughputInBytes", p.ThroughputInBytes) - populate(objectMap, "throughputInMBps", p.ThroughputInMBps) - populate(objectMap, "throughputStatus", p.ThroughputStatus) - populate(objectMap, "throughputUploadPendingDataInBytes", p.ThroughputUploadPendingDataInBytes) - populate(objectMap, "totalMemoryInBytes", p.TotalMemoryInBytes) - populate(objectMap, "totalSpaceInBytes", p.TotalSpaceInBytes) - populate(objectMap, "versionStatus", p.VersionStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessServer. -func (p *ProcessServer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentExpiryDate": - err = unpopulateTimeRFC3339(val, "AgentExpiryDate", &p.AgentExpiryDate) - delete(rawMsg, key) - case "agentVersion": - err = unpopulate(val, "AgentVersion", &p.AgentVersion) - delete(rawMsg, key) - case "agentVersionDetails": - err = unpopulate(val, "AgentVersionDetails", &p.AgentVersionDetails) - delete(rawMsg, key) - case "availableMemoryInBytes": - err = unpopulate(val, "AvailableMemoryInBytes", &p.AvailableMemoryInBytes) - delete(rawMsg, key) - case "availableSpaceInBytes": - err = unpopulate(val, "AvailableSpaceInBytes", &p.AvailableSpaceInBytes) - delete(rawMsg, key) - case "cpuLoad": - err = unpopulate(val, "CPULoad", &p.CPULoad) - delete(rawMsg, key) - case "cpuLoadStatus": - err = unpopulate(val, "CPULoadStatus", &p.CPULoadStatus) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &p.FriendlyName) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &p.Health) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &p.HealthErrors) - delete(rawMsg, key) - case "hostId": - err = unpopulate(val, "HostID", &p.HostID) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &p.IPAddress) - delete(rawMsg, key) - case "lastHeartbeat": - err = unpopulateTimeRFC3339(val, "LastHeartbeat", &p.LastHeartbeat) - delete(rawMsg, key) - case "machineCount": - err = unpopulate(val, "MachineCount", &p.MachineCount) - delete(rawMsg, key) - case "marsCommunicationStatus": - err = unpopulate(val, "MarsCommunicationStatus", &p.MarsCommunicationStatus) - delete(rawMsg, key) - case "marsRegistrationStatus": - err = unpopulate(val, "MarsRegistrationStatus", &p.MarsRegistrationStatus) - delete(rawMsg, key) - case "memoryUsageStatus": - err = unpopulate(val, "MemoryUsageStatus", &p.MemoryUsageStatus) - delete(rawMsg, key) - case "mobilityServiceUpdates": - err = unpopulate(val, "MobilityServiceUpdates", &p.MobilityServiceUpdates) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &p.OSType) - delete(rawMsg, key) - case "osVersion": - err = unpopulate(val, "OSVersion", &p.OSVersion) - delete(rawMsg, key) - case "psServiceStatus": - err = unpopulate(val, "PsServiceStatus", &p.PsServiceStatus) - delete(rawMsg, key) - case "psStatsRefreshTime": - err = unpopulateTimeRFC3339(val, "PsStatsRefreshTime", &p.PsStatsRefreshTime) - delete(rawMsg, key) - case "replicationPairCount": - err = unpopulate(val, "ReplicationPairCount", &p.ReplicationPairCount) - delete(rawMsg, key) - case "sslCertExpiryDate": - err = unpopulateTimeRFC3339(val, "SSLCertExpiryDate", &p.SSLCertExpiryDate) - delete(rawMsg, key) - case "sslCertExpiryRemainingDays": - err = unpopulate(val, "SSLCertExpiryRemainingDays", &p.SSLCertExpiryRemainingDays) - delete(rawMsg, key) - case "spaceUsageStatus": - err = unpopulate(val, "SpaceUsageStatus", &p.SpaceUsageStatus) - delete(rawMsg, key) - case "systemLoad": - err = unpopulate(val, "SystemLoad", &p.SystemLoad) - delete(rawMsg, key) - case "systemLoadStatus": - err = unpopulate(val, "SystemLoadStatus", &p.SystemLoadStatus) - delete(rawMsg, key) - case "throughputInBytes": - err = unpopulate(val, "ThroughputInBytes", &p.ThroughputInBytes) - delete(rawMsg, key) - case "throughputInMBps": - err = unpopulate(val, "ThroughputInMBps", &p.ThroughputInMBps) - delete(rawMsg, key) - case "throughputStatus": - err = unpopulate(val, "ThroughputStatus", &p.ThroughputStatus) - delete(rawMsg, key) - case "throughputUploadPendingDataInBytes": - err = unpopulate(val, "ThroughputUploadPendingDataInBytes", &p.ThroughputUploadPendingDataInBytes) - delete(rawMsg, key) - case "totalMemoryInBytes": - err = unpopulate(val, "TotalMemoryInBytes", &p.TotalMemoryInBytes) - delete(rawMsg, key) - case "totalSpaceInBytes": - err = unpopulate(val, "TotalSpaceInBytes", &p.TotalSpaceInBytes) - delete(rawMsg, key) - case "versionStatus": - err = unpopulate(val, "VersionStatus", &p.VersionStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProcessServerDetails. -func (p ProcessServerDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "availableMemoryInBytes", p.AvailableMemoryInBytes) - populate(objectMap, "availableSpaceInBytes", p.AvailableSpaceInBytes) - populate(objectMap, "biosId", p.BiosID) - populate(objectMap, "diskUsageStatus", p.DiskUsageStatus) - populate(objectMap, "fabricObjectId", p.FabricObjectID) - populate(objectMap, "fqdn", p.Fqdn) - populate(objectMap, "freeSpacePercentage", p.FreeSpacePercentage) - populate(objectMap, "health", p.Health) - populate(objectMap, "healthErrors", p.HealthErrors) - populate(objectMap, "historicHealth", p.HistoricHealth) - populate(objectMap, "id", p.ID) - populate(objectMap, "ipAddresses", p.IPAddresses) - populateTimeRFC3339(objectMap, "lastHeartbeatUtc", p.LastHeartbeatUTC) - populate(objectMap, "memoryUsagePercentage", p.MemoryUsagePercentage) - populate(objectMap, "memoryUsageStatus", p.MemoryUsageStatus) - populate(objectMap, "name", p.Name) - populate(objectMap, "processorUsagePercentage", p.ProcessorUsagePercentage) - populate(objectMap, "processorUsageStatus", p.ProcessorUsageStatus) - populate(objectMap, "protectedItemCount", p.ProtectedItemCount) - populate(objectMap, "systemLoad", p.SystemLoad) - populate(objectMap, "systemLoadStatus", p.SystemLoadStatus) - populate(objectMap, "throughputInBytes", p.ThroughputInBytes) - populate(objectMap, "throughputStatus", p.ThroughputStatus) - populate(objectMap, "throughputUploadPendingDataInBytes", p.ThroughputUploadPendingDataInBytes) - populate(objectMap, "totalMemoryInBytes", p.TotalMemoryInBytes) - populate(objectMap, "totalSpaceInBytes", p.TotalSpaceInBytes) - populate(objectMap, "usedMemoryInBytes", p.UsedMemoryInBytes) - populate(objectMap, "usedSpaceInBytes", p.UsedSpaceInBytes) - populate(objectMap, "version", p.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessServerDetails. -func (p *ProcessServerDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "availableMemoryInBytes": - err = unpopulate(val, "AvailableMemoryInBytes", &p.AvailableMemoryInBytes) - delete(rawMsg, key) - case "availableSpaceInBytes": - err = unpopulate(val, "AvailableSpaceInBytes", &p.AvailableSpaceInBytes) - delete(rawMsg, key) - case "biosId": - err = unpopulate(val, "BiosID", &p.BiosID) - delete(rawMsg, key) - case "diskUsageStatus": - err = unpopulate(val, "DiskUsageStatus", &p.DiskUsageStatus) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &p.FabricObjectID) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &p.Fqdn) - delete(rawMsg, key) - case "freeSpacePercentage": - err = unpopulate(val, "FreeSpacePercentage", &p.FreeSpacePercentage) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &p.Health) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &p.HealthErrors) - delete(rawMsg, key) - case "historicHealth": - err = unpopulate(val, "HistoricHealth", &p.HistoricHealth) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "ipAddresses": - err = unpopulate(val, "IPAddresses", &p.IPAddresses) - delete(rawMsg, key) - case "lastHeartbeatUtc": - err = unpopulateTimeRFC3339(val, "LastHeartbeatUTC", &p.LastHeartbeatUTC) - delete(rawMsg, key) - case "memoryUsagePercentage": - err = unpopulate(val, "MemoryUsagePercentage", &p.MemoryUsagePercentage) - delete(rawMsg, key) - case "memoryUsageStatus": - err = unpopulate(val, "MemoryUsageStatus", &p.MemoryUsageStatus) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "processorUsagePercentage": - err = unpopulate(val, "ProcessorUsagePercentage", &p.ProcessorUsagePercentage) - delete(rawMsg, key) - case "processorUsageStatus": - err = unpopulate(val, "ProcessorUsageStatus", &p.ProcessorUsageStatus) - delete(rawMsg, key) - case "protectedItemCount": - err = unpopulate(val, "ProtectedItemCount", &p.ProtectedItemCount) - delete(rawMsg, key) - case "systemLoad": - err = unpopulate(val, "SystemLoad", &p.SystemLoad) - delete(rawMsg, key) - case "systemLoadStatus": - err = unpopulate(val, "SystemLoadStatus", &p.SystemLoadStatus) - delete(rawMsg, key) - case "throughputInBytes": - err = unpopulate(val, "ThroughputInBytes", &p.ThroughputInBytes) - delete(rawMsg, key) - case "throughputStatus": - err = unpopulate(val, "ThroughputStatus", &p.ThroughputStatus) - delete(rawMsg, key) - case "throughputUploadPendingDataInBytes": - err = unpopulate(val, "ThroughputUploadPendingDataInBytes", &p.ThroughputUploadPendingDataInBytes) - delete(rawMsg, key) - case "totalMemoryInBytes": - err = unpopulate(val, "TotalMemoryInBytes", &p.TotalMemoryInBytes) - delete(rawMsg, key) - case "totalSpaceInBytes": - err = unpopulate(val, "TotalSpaceInBytes", &p.TotalSpaceInBytes) - delete(rawMsg, key) - case "usedMemoryInBytes": - err = unpopulate(val, "UsedMemoryInBytes", &p.UsedMemoryInBytes) - delete(rawMsg, key) - case "usedSpaceInBytes": - err = unpopulate(val, "UsedSpaceInBytes", &p.UsedSpaceInBytes) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &p.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectableItem. -func (p ProtectableItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableItem. -func (p *ProtectableItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectableItemCollection. -func (p ProtectableItemCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableItemCollection. -func (p *ProtectableItemCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectableItemProperties. -func (p ProtectableItemProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customDetails", p.CustomDetails) - populate(objectMap, "friendlyName", p.FriendlyName) - populate(objectMap, "protectionReadinessErrors", p.ProtectionReadinessErrors) - populate(objectMap, "protectionStatus", p.ProtectionStatus) - populate(objectMap, "recoveryServicesProviderId", p.RecoveryServicesProviderID) - populate(objectMap, "replicationProtectedItemId", p.ReplicationProtectedItemID) - populate(objectMap, "supportedReplicationProviders", p.SupportedReplicationProviders) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableItemProperties. -func (p *ProtectableItemProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "customDetails": - p.CustomDetails, err = unmarshalConfigurationSettingsClassification(val) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &p.FriendlyName) - delete(rawMsg, key) - case "protectionReadinessErrors": - err = unpopulate(val, "ProtectionReadinessErrors", &p.ProtectionReadinessErrors) - delete(rawMsg, key) - case "protectionStatus": - err = unpopulate(val, "ProtectionStatus", &p.ProtectionStatus) - delete(rawMsg, key) - case "recoveryServicesProviderId": - err = unpopulate(val, "RecoveryServicesProviderID", &p.RecoveryServicesProviderID) - delete(rawMsg, key) - case "replicationProtectedItemId": - err = unpopulate(val, "ReplicationProtectedItemID", &p.ReplicationProtectedItemID) - delete(rawMsg, key) - case "supportedReplicationProviders": - err = unpopulate(val, "SupportedReplicationProviders", &p.SupportedReplicationProviders) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectableItemQueryParameter. -func (p ProtectableItemQueryParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "state", p.State) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableItemQueryParameter. -func (p *ProtectableItemQueryParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "state": - err = unpopulate(val, "State", &p.State) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectedItemsQueryParameter. -func (p ProtectedItemsQueryParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricObjectId", p.FabricObjectID) - populate(objectMap, "instanceType", p.InstanceType) - populate(objectMap, "multiVmGroupCreateOption", p.MultiVMGroupCreateOption) - populate(objectMap, "processServerId", p.ProcessServerID) - populate(objectMap, "recoveryPlanName", p.RecoveryPlanName) - populate(objectMap, "sourceFabricLocation", p.SourceFabricLocation) - populate(objectMap, "sourceFabricName", p.SourceFabricName) - populate(objectMap, "vCenterName", p.VCenterName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedItemsQueryParameter. -func (p *ProtectedItemsQueryParameter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &p.FabricObjectID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &p.InstanceType) - delete(rawMsg, key) - case "multiVmGroupCreateOption": - err = unpopulate(val, "MultiVMGroupCreateOption", &p.MultiVMGroupCreateOption) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &p.ProcessServerID) - delete(rawMsg, key) - case "recoveryPlanName": - err = unpopulate(val, "RecoveryPlanName", &p.RecoveryPlanName) - delete(rawMsg, key) - case "sourceFabricLocation": - err = unpopulate(val, "SourceFabricLocation", &p.SourceFabricLocation) - delete(rawMsg, key) - case "sourceFabricName": - err = unpopulate(val, "SourceFabricName", &p.SourceFabricName) - delete(rawMsg, key) - case "vCenterName": - err = unpopulate(val, "VCenterName", &p.VCenterName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionContainer. -func (p ProtectionContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainer. -func (p *ProtectionContainer) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerCollection. -func (p ProtectionContainerCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerCollection. -func (p *ProtectionContainerCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerFabricSpecificDetails. -func (p ProtectionContainerFabricSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instanceType", p.InstanceType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerFabricSpecificDetails. -func (p *ProtectionContainerFabricSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &p.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerMapping. -func (p ProtectionContainerMapping) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerMapping. -func (p *ProtectionContainerMapping) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &p.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerMappingCollection. -func (p ProtectionContainerMappingCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerMappingCollection. -func (p *ProtectionContainerMappingCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerMappingProperties. -func (p ProtectionContainerMappingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "health", p.Health) - populate(objectMap, "healthErrorDetails", p.HealthErrorDetails) - populate(objectMap, "policyFriendlyName", p.PolicyFriendlyName) - populate(objectMap, "policyId", p.PolicyID) - populate(objectMap, "providerSpecificDetails", p.ProviderSpecificDetails) - populate(objectMap, "sourceFabricFriendlyName", p.SourceFabricFriendlyName) - populate(objectMap, "sourceProtectionContainerFriendlyName", p.SourceProtectionContainerFriendlyName) - populate(objectMap, "state", p.State) - populate(objectMap, "targetFabricFriendlyName", p.TargetFabricFriendlyName) - populate(objectMap, "targetProtectionContainerFriendlyName", p.TargetProtectionContainerFriendlyName) - populate(objectMap, "targetProtectionContainerId", p.TargetProtectionContainerID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerMappingProperties. -func (p *ProtectionContainerMappingProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "health": - err = unpopulate(val, "Health", &p.Health) - delete(rawMsg, key) - case "healthErrorDetails": - err = unpopulate(val, "HealthErrorDetails", &p.HealthErrorDetails) - delete(rawMsg, key) - case "policyFriendlyName": - err = unpopulate(val, "PolicyFriendlyName", &p.PolicyFriendlyName) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &p.PolicyID) - delete(rawMsg, key) - case "providerSpecificDetails": - p.ProviderSpecificDetails, err = unmarshalProtectionContainerMappingProviderSpecificDetailsClassification(val) - delete(rawMsg, key) - case "sourceFabricFriendlyName": - err = unpopulate(val, "SourceFabricFriendlyName", &p.SourceFabricFriendlyName) - delete(rawMsg, key) - case "sourceProtectionContainerFriendlyName": - err = unpopulate(val, "SourceProtectionContainerFriendlyName", &p.SourceProtectionContainerFriendlyName) - delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &p.State) - delete(rawMsg, key) - case "targetFabricFriendlyName": - err = unpopulate(val, "TargetFabricFriendlyName", &p.TargetFabricFriendlyName) - delete(rawMsg, key) - case "targetProtectionContainerFriendlyName": - err = unpopulate(val, "TargetProtectionContainerFriendlyName", &p.TargetProtectionContainerFriendlyName) - delete(rawMsg, key) - case "targetProtectionContainerId": - err = unpopulate(val, "TargetProtectionContainerID", &p.TargetProtectionContainerID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerMappingProviderSpecificDetails. -func (p ProtectionContainerMappingProviderSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = p.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerMappingProviderSpecificDetails. -func (p *ProtectionContainerMappingProviderSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &p.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerProperties. -func (p ProtectionContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricFriendlyName", p.FabricFriendlyName) - populate(objectMap, "fabricSpecificDetails", p.FabricSpecificDetails) - populate(objectMap, "fabricType", p.FabricType) - populate(objectMap, "friendlyName", p.FriendlyName) - populate(objectMap, "pairingStatus", p.PairingStatus) - populate(objectMap, "protectedItemCount", p.ProtectedItemCount) - populate(objectMap, "role", p.Role) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerProperties. -func (p *ProtectionContainerProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricFriendlyName": - err = unpopulate(val, "FabricFriendlyName", &p.FabricFriendlyName) - delete(rawMsg, key) - case "fabricSpecificDetails": - err = unpopulate(val, "FabricSpecificDetails", &p.FabricSpecificDetails) - delete(rawMsg, key) - case "fabricType": - err = unpopulate(val, "FabricType", &p.FabricType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &p.FriendlyName) - delete(rawMsg, key) - case "pairingStatus": - err = unpopulate(val, "PairingStatus", &p.PairingStatus) - delete(rawMsg, key) - case "protectedItemCount": - err = unpopulate(val, "ProtectedItemCount", &p.ProtectedItemCount) - delete(rawMsg, key) - case "role": - err = unpopulate(val, "Role", &p.Role) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProtectionProfileCustomDetails. -func (p ProtectionProfileCustomDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["resourceType"] = p.ResourceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionProfileCustomDetails. -func (p *ProtectionProfileCustomDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "resourceType": - err = unpopulate(val, "ResourceType", &p.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProviderError. -func (p ProviderError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "errorCode", p.ErrorCode) - populate(objectMap, "errorId", p.ErrorID) - populate(objectMap, "errorMessage", p.ErrorMessage) - populate(objectMap, "possibleCauses", p.PossibleCauses) - populate(objectMap, "recommendedAction", p.RecommendedAction) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderError. -func (p *ProviderError) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "errorCode": - err = unpopulate(val, "ErrorCode", &p.ErrorCode) - delete(rawMsg, key) - case "errorId": - err = unpopulate(val, "ErrorID", &p.ErrorID) - delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &p.ErrorMessage) - delete(rawMsg, key) - case "possibleCauses": - err = unpopulate(val, "PossibleCauses", &p.PossibleCauses) - delete(rawMsg, key) - case "recommendedAction": - err = unpopulate(val, "RecommendedAction", &p.RecommendedAction) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProviderSpecificRecoveryPointDetails. -func (p ProviderSpecificRecoveryPointDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = p.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderSpecificRecoveryPointDetails. -func (p *ProviderSpecificRecoveryPointDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &p.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PushInstallerDetails. -func (p PushInstallerDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "biosId", p.BiosID) - populate(objectMap, "fabricObjectId", p.FabricObjectID) - populate(objectMap, "fqdn", p.Fqdn) - populate(objectMap, "health", p.Health) - populate(objectMap, "healthErrors", p.HealthErrors) - populate(objectMap, "id", p.ID) - populateTimeRFC3339(objectMap, "lastHeartbeatUtc", p.LastHeartbeatUTC) - populate(objectMap, "name", p.Name) - populate(objectMap, "version", p.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PushInstallerDetails. -func (p *PushInstallerDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "biosId": - err = unpopulate(val, "BiosID", &p.BiosID) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &p.FabricObjectID) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &p.Fqdn) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &p.Health) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &p.HealthErrors) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "lastHeartbeatUtc": - err = unpopulateTimeRFC3339(val, "LastHeartbeatUTC", &p.LastHeartbeatUTC) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &p.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RcmProxyDetails. -func (r RcmProxyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "biosId", r.BiosID) - populate(objectMap, "clientAuthenticationType", r.ClientAuthenticationType) - populate(objectMap, "fabricObjectId", r.FabricObjectID) - populate(objectMap, "fqdn", r.Fqdn) - populate(objectMap, "health", r.Health) - populate(objectMap, "healthErrors", r.HealthErrors) - populate(objectMap, "id", r.ID) - populateTimeRFC3339(objectMap, "lastHeartbeatUtc", r.LastHeartbeatUTC) - populate(objectMap, "name", r.Name) - populate(objectMap, "version", r.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RcmProxyDetails. -func (r *RcmProxyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "biosId": - err = unpopulate(val, "BiosID", &r.BiosID) - delete(rawMsg, key) - case "clientAuthenticationType": - err = unpopulate(val, "ClientAuthenticationType", &r.ClientAuthenticationType) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &r.FabricObjectID) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &r.Fqdn) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &r.Health) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &r.HealthErrors) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "lastHeartbeatUtc": - err = unpopulateTimeRFC3339(val, "LastHeartbeatUTC", &r.LastHeartbeatUTC) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &r.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryAvailabilitySetCustomDetails. -func (r RecoveryAvailabilitySetCustomDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["resourceType"] = r.ResourceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryAvailabilitySetCustomDetails. -func (r *RecoveryAvailabilitySetCustomDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "resourceType": - err = unpopulate(val, "ResourceType", &r.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlan. -func (r RecoveryPlan) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlan. -func (r *RecoveryPlan) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanA2ADetails. -func (r RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "A2A" - populate(objectMap, "primaryExtendedLocation", r.PrimaryExtendedLocation) - populate(objectMap, "primaryZone", r.PrimaryZone) - populate(objectMap, "recoveryExtendedLocation", r.RecoveryExtendedLocation) - populate(objectMap, "recoveryZone", r.RecoveryZone) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanA2ADetails. -func (r *RecoveryPlanA2ADetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "primaryExtendedLocation": - err = unpopulate(val, "PrimaryExtendedLocation", &r.PrimaryExtendedLocation) - delete(rawMsg, key) - case "primaryZone": - err = unpopulate(val, "PrimaryZone", &r.PrimaryZone) - delete(rawMsg, key) - case "recoveryExtendedLocation": - err = unpopulate(val, "RecoveryExtendedLocation", &r.RecoveryExtendedLocation) - delete(rawMsg, key) - case "recoveryZone": - err = unpopulate(val, "RecoveryZone", &r.RecoveryZone) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanA2AFailoverInput. -func (r RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cloudServiceCreationOption", r.CloudServiceCreationOption) - objectMap["instanceType"] = "A2A" - populate(objectMap, "multiVmSyncPointOption", r.MultiVMSyncPointOption) - populate(objectMap, "recoveryPointType", r.RecoveryPointType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanA2AFailoverInput. -func (r *RecoveryPlanA2AFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cloudServiceCreationOption": - err = unpopulate(val, "CloudServiceCreationOption", &r.CloudServiceCreationOption) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "multiVmSyncPointOption": - err = unpopulate(val, "MultiVMSyncPointOption", &r.MultiVMSyncPointOption) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanA2AInput. -func (r RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "A2A" - populate(objectMap, "primaryExtendedLocation", r.PrimaryExtendedLocation) - populate(objectMap, "primaryZone", r.PrimaryZone) - populate(objectMap, "recoveryExtendedLocation", r.RecoveryExtendedLocation) - populate(objectMap, "recoveryZone", r.RecoveryZone) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanA2AInput. -func (r *RecoveryPlanA2AInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "primaryExtendedLocation": - err = unpopulate(val, "PrimaryExtendedLocation", &r.PrimaryExtendedLocation) - delete(rawMsg, key) - case "primaryZone": - err = unpopulate(val, "PrimaryZone", &r.PrimaryZone) - delete(rawMsg, key) - case "recoveryExtendedLocation": - err = unpopulate(val, "RecoveryExtendedLocation", &r.RecoveryExtendedLocation) - delete(rawMsg, key) - case "recoveryZone": - err = unpopulate(val, "RecoveryZone", &r.RecoveryZone) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanAction. -func (r RecoveryPlanAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionName", r.ActionName) - populate(objectMap, "customDetails", r.CustomDetails) - populate(objectMap, "failoverDirections", r.FailoverDirections) - populate(objectMap, "failoverTypes", r.FailoverTypes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanAction. -func (r *RecoveryPlanAction) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionName": - err = unpopulate(val, "ActionName", &r.ActionName) - delete(rawMsg, key) - case "customDetails": - r.CustomDetails, err = unmarshalRecoveryPlanActionDetailsClassification(val) - delete(rawMsg, key) - case "failoverDirections": - err = unpopulate(val, "FailoverDirections", &r.FailoverDirections) - delete(rawMsg, key) - case "failoverTypes": - err = unpopulate(val, "FailoverTypes", &r.FailoverTypes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanActionDetails. -func (r RecoveryPlanActionDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanActionDetails. -func (r *RecoveryPlanActionDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanAutomationRunbookActionDetails. -func (r RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricLocation", r.FabricLocation) - objectMap["instanceType"] = "AutomationRunbookActionDetails" - populate(objectMap, "runbookId", r.RunbookID) - populate(objectMap, "timeout", r.Timeout) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanAutomationRunbookActionDetails. -func (r *RecoveryPlanAutomationRunbookActionDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricLocation": - err = unpopulate(val, "FabricLocation", &r.FabricLocation) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "runbookId": - err = unpopulate(val, "RunbookID", &r.RunbookID) - delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &r.Timeout) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanCollection. -func (r RecoveryPlanCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanCollection. -func (r *RecoveryPlanCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanGroup. -func (r RecoveryPlanGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "endGroupActions", r.EndGroupActions) - populate(objectMap, "groupType", r.GroupType) - populate(objectMap, "replicationProtectedItems", r.ReplicationProtectedItems) - populate(objectMap, "startGroupActions", r.StartGroupActions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanGroup. -func (r *RecoveryPlanGroup) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "endGroupActions": - err = unpopulate(val, "EndGroupActions", &r.EndGroupActions) - delete(rawMsg, key) - case "groupType": - err = unpopulate(val, "GroupType", &r.GroupType) - delete(rawMsg, key) - case "replicationProtectedItems": - err = unpopulate(val, "ReplicationProtectedItems", &r.ReplicationProtectedItems) - delete(rawMsg, key) - case "startGroupActions": - err = unpopulate(val, "StartGroupActions", &r.StartGroupActions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanGroupTaskDetails. -func (r RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "childTasks", r.ChildTasks) - populate(objectMap, "groupId", r.GroupID) - objectMap["instanceType"] = "RecoveryPlanGroupTaskDetails" - populate(objectMap, "name", r.Name) - populate(objectMap, "rpGroupType", r.RpGroupType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanGroupTaskDetails. -func (r *RecoveryPlanGroupTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "childTasks": - err = unpopulate(val, "ChildTasks", &r.ChildTasks) - delete(rawMsg, key) - case "groupId": - err = unpopulate(val, "GroupID", &r.GroupID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "rpGroupType": - err = unpopulate(val, "RpGroupType", &r.RpGroupType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanHyperVReplicaAzureFailbackInput. -func (r RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataSyncOption", r.DataSyncOption) - objectMap["instanceType"] = "HyperVReplicaAzureFailback" - populate(objectMap, "recoveryVmCreationOption", r.RecoveryVMCreationOption) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanHyperVReplicaAzureFailbackInput. -func (r *RecoveryPlanHyperVReplicaAzureFailbackInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataSyncOption": - err = unpopulate(val, "DataSyncOption", &r.DataSyncOption) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "recoveryVmCreationOption": - err = unpopulate(val, "RecoveryVMCreationOption", &r.RecoveryVMCreationOption) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanHyperVReplicaAzureFailoverInput. -func (r RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "HyperVReplicaAzure" - populate(objectMap, "primaryKekCertificatePfx", r.PrimaryKekCertificatePfx) - populate(objectMap, "recoveryPointType", r.RecoveryPointType) - populate(objectMap, "secondaryKekCertificatePfx", r.SecondaryKekCertificatePfx) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanHyperVReplicaAzureFailoverInput. -func (r *RecoveryPlanHyperVReplicaAzureFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "primaryKekCertificatePfx": - err = unpopulate(val, "PrimaryKekCertificatePfx", &r.PrimaryKekCertificatePfx) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) - delete(rawMsg, key) - case "secondaryKekCertificatePfx": - err = unpopulate(val, "SecondaryKekCertificatePfx", &r.SecondaryKekCertificatePfx) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanInMageAzureV2FailoverInput. -func (r RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageAzureV2" - populate(objectMap, "recoveryPointType", r.RecoveryPointType) - populate(objectMap, "useMultiVmSyncPoint", r.UseMultiVMSyncPoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanInMageAzureV2FailoverInput. -func (r *RecoveryPlanInMageAzureV2FailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) - delete(rawMsg, key) - case "useMultiVmSyncPoint": - err = unpopulate(val, "UseMultiVMSyncPoint", &r.UseMultiVMSyncPoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanInMageFailoverInput. -func (r RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMage" - populate(objectMap, "recoveryPointType", r.RecoveryPointType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanInMageFailoverInput. -func (r *RecoveryPlanInMageFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanInMageRcmFailbackFailoverInput. -func (r RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcmFailback" - populate(objectMap, "recoveryPointType", r.RecoveryPointType) - populate(objectMap, "useMultiVmSyncPoint", r.UseMultiVMSyncPoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanInMageRcmFailbackFailoverInput. -func (r *RecoveryPlanInMageRcmFailbackFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) - delete(rawMsg, key) - case "useMultiVmSyncPoint": - err = unpopulate(val, "UseMultiVMSyncPoint", &r.UseMultiVMSyncPoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanInMageRcmFailoverInput. -func (r RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "InMageRcm" - populate(objectMap, "recoveryPointType", r.RecoveryPointType) - populate(objectMap, "useMultiVmSyncPoint", r.UseMultiVMSyncPoint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanInMageRcmFailoverInput. -func (r *RecoveryPlanInMageRcmFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) - delete(rawMsg, key) - case "useMultiVmSyncPoint": - err = unpopulate(val, "UseMultiVMSyncPoint", &r.UseMultiVMSyncPoint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanManualActionDetails. -func (r RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", r.Description) - objectMap["instanceType"] = "ManualActionDetails" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanManualActionDetails. -func (r *RecoveryPlanManualActionDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &r.Description) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanPlannedFailoverInput. -func (r RecoveryPlanPlannedFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanPlannedFailoverInput. -func (r *RecoveryPlanPlannedFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanPlannedFailoverInputProperties. -func (r RecoveryPlanPlannedFailoverInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "failoverDirection", r.FailoverDirection) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanPlannedFailoverInputProperties. -func (r *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failoverDirection": - err = unpopulate(val, "FailoverDirection", &r.FailoverDirection) - delete(rawMsg, key) - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalRecoveryPlanProviderSpecificFailoverInputClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanProperties. -func (r RecoveryPlanProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedOperations", r.AllowedOperations) - populate(objectMap, "currentScenario", r.CurrentScenario) - populate(objectMap, "currentScenarioStatus", r.CurrentScenarioStatus) - populate(objectMap, "currentScenarioStatusDescription", r.CurrentScenarioStatusDescription) - populate(objectMap, "failoverDeploymentModel", r.FailoverDeploymentModel) - populate(objectMap, "friendlyName", r.FriendlyName) - populate(objectMap, "groups", r.Groups) - populateTimeRFC3339(objectMap, "lastPlannedFailoverTime", r.LastPlannedFailoverTime) - populateTimeRFC3339(objectMap, "lastTestFailoverTime", r.LastTestFailoverTime) - populateTimeRFC3339(objectMap, "lastUnplannedFailoverTime", r.LastUnplannedFailoverTime) - populate(objectMap, "primaryFabricFriendlyName", r.PrimaryFabricFriendlyName) - populate(objectMap, "primaryFabricId", r.PrimaryFabricID) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - populate(objectMap, "recoveryFabricFriendlyName", r.RecoveryFabricFriendlyName) - populate(objectMap, "recoveryFabricId", r.RecoveryFabricID) - populate(objectMap, "replicationProviders", r.ReplicationProviders) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanProperties. -func (r *RecoveryPlanProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedOperations": - err = unpopulate(val, "AllowedOperations", &r.AllowedOperations) - delete(rawMsg, key) - case "currentScenario": - err = unpopulate(val, "CurrentScenario", &r.CurrentScenario) - delete(rawMsg, key) - case "currentScenarioStatus": - err = unpopulate(val, "CurrentScenarioStatus", &r.CurrentScenarioStatus) - delete(rawMsg, key) - case "currentScenarioStatusDescription": - err = unpopulate(val, "CurrentScenarioStatusDescription", &r.CurrentScenarioStatusDescription) - delete(rawMsg, key) - case "failoverDeploymentModel": - err = unpopulate(val, "FailoverDeploymentModel", &r.FailoverDeploymentModel) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &r.FriendlyName) - delete(rawMsg, key) - case "groups": - err = unpopulate(val, "Groups", &r.Groups) - delete(rawMsg, key) - case "lastPlannedFailoverTime": - err = unpopulateTimeRFC3339(val, "LastPlannedFailoverTime", &r.LastPlannedFailoverTime) - delete(rawMsg, key) - case "lastTestFailoverTime": - err = unpopulateTimeRFC3339(val, "LastTestFailoverTime", &r.LastTestFailoverTime) - delete(rawMsg, key) - case "lastUnplannedFailoverTime": - err = unpopulateTimeRFC3339(val, "LastUnplannedFailoverTime", &r.LastUnplannedFailoverTime) - delete(rawMsg, key) - case "primaryFabricFriendlyName": - err = unpopulate(val, "PrimaryFabricFriendlyName", &r.PrimaryFabricFriendlyName) - delete(rawMsg, key) - case "primaryFabricId": - err = unpopulate(val, "PrimaryFabricID", &r.PrimaryFabricID) - delete(rawMsg, key) - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalRecoveryPlanProviderSpecificDetailsClassificationArray(val) - delete(rawMsg, key) - case "recoveryFabricFriendlyName": - err = unpopulate(val, "RecoveryFabricFriendlyName", &r.RecoveryFabricFriendlyName) - delete(rawMsg, key) - case "recoveryFabricId": - err = unpopulate(val, "RecoveryFabricID", &r.RecoveryFabricID) - delete(rawMsg, key) - case "replicationProviders": - err = unpopulate(val, "ReplicationProviders", &r.ReplicationProviders) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanProtectedItem. -func (r RecoveryPlanProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "virtualMachineId", r.VirtualMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanProtectedItem. -func (r *RecoveryPlanProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "virtualMachineId": - err = unpopulate(val, "VirtualMachineID", &r.VirtualMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanProviderSpecificDetails. -func (r RecoveryPlanProviderSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanProviderSpecificDetails. -func (r *RecoveryPlanProviderSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanProviderSpecificFailoverInput. -func (r RecoveryPlanProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanProviderSpecificFailoverInput. -func (r *RecoveryPlanProviderSpecificFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanProviderSpecificInput. -func (r RecoveryPlanProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanProviderSpecificInput. -func (r *RecoveryPlanProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanScriptActionDetails. -func (r RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricLocation", r.FabricLocation) - objectMap["instanceType"] = "ScriptActionDetails" - populate(objectMap, "path", r.Path) - populate(objectMap, "timeout", r.Timeout) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanScriptActionDetails. -func (r *RecoveryPlanScriptActionDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricLocation": - err = unpopulate(val, "FabricLocation", &r.FabricLocation) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &r.Path) - delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &r.Timeout) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanShutdownGroupTaskDetails. -func (r RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "childTasks", r.ChildTasks) - populate(objectMap, "groupId", r.GroupID) - objectMap["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" - populate(objectMap, "name", r.Name) - populate(objectMap, "rpGroupType", r.RpGroupType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanShutdownGroupTaskDetails. -func (r *RecoveryPlanShutdownGroupTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "childTasks": - err = unpopulate(val, "ChildTasks", &r.ChildTasks) - delete(rawMsg, key) - case "groupId": - err = unpopulate(val, "GroupID", &r.GroupID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "rpGroupType": - err = unpopulate(val, "RpGroupType", &r.RpGroupType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanTestFailoverCleanupInput. -func (r RecoveryPlanTestFailoverCleanupInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanTestFailoverCleanupInput. -func (r *RecoveryPlanTestFailoverCleanupInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanTestFailoverCleanupInputProperties. -func (r RecoveryPlanTestFailoverCleanupInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "comments", r.Comments) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanTestFailoverCleanupInputProperties. -func (r *RecoveryPlanTestFailoverCleanupInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "comments": - err = unpopulate(val, "Comments", &r.Comments) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanTestFailoverInput. -func (r RecoveryPlanTestFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanTestFailoverInput. -func (r *RecoveryPlanTestFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanTestFailoverInputProperties. -func (r RecoveryPlanTestFailoverInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "failoverDirection", r.FailoverDirection) - populate(objectMap, "networkId", r.NetworkID) - populate(objectMap, "networkType", r.NetworkType) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanTestFailoverInputProperties. -func (r *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failoverDirection": - err = unpopulate(val, "FailoverDirection", &r.FailoverDirection) - delete(rawMsg, key) - case "networkId": - err = unpopulate(val, "NetworkID", &r.NetworkID) - delete(rawMsg, key) - case "networkType": - err = unpopulate(val, "NetworkType", &r.NetworkType) - delete(rawMsg, key) - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalRecoveryPlanProviderSpecificFailoverInputClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanUnplannedFailoverInput. -func (r RecoveryPlanUnplannedFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanUnplannedFailoverInput. -func (r *RecoveryPlanUnplannedFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanUnplannedFailoverInputProperties. -func (r RecoveryPlanUnplannedFailoverInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "failoverDirection", r.FailoverDirection) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - populate(objectMap, "sourceSiteOperations", r.SourceSiteOperations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanUnplannedFailoverInputProperties. -func (r *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failoverDirection": - err = unpopulate(val, "FailoverDirection", &r.FailoverDirection) - delete(rawMsg, key) - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalRecoveryPlanProviderSpecificFailoverInputClassificationArray(val) - delete(rawMsg, key) - case "sourceSiteOperations": - err = unpopulate(val, "SourceSiteOperations", &r.SourceSiteOperations) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPoint. -func (r RecoveryPoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPoint. -func (r *RecoveryPoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPointCollection. -func (r RecoveryPointCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointCollection. -func (r *RecoveryPointCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryPointProperties. -func (r RecoveryPointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - populateTimeRFC3339(objectMap, "recoveryPointTime", r.RecoveryPointTime) - populate(objectMap, "recoveryPointType", r.RecoveryPointType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointProperties. -func (r *RecoveryPointProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalProviderSpecificRecoveryPointDetailsClassification(val) - delete(rawMsg, key) - case "recoveryPointTime": - err = unpopulateTimeRFC3339(val, "RecoveryPointTime", &r.RecoveryPointTime) - delete(rawMsg, key) - case "recoveryPointType": - err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryProximityPlacementGroupCustomDetails. -func (r RecoveryProximityPlacementGroupCustomDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["resourceType"] = r.ResourceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryProximityPlacementGroupCustomDetails. -func (r *RecoveryProximityPlacementGroupCustomDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "resourceType": - err = unpopulate(val, "ResourceType", &r.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryResourceGroupCustomDetails. -func (r RecoveryResourceGroupCustomDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["resourceType"] = r.ResourceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryResourceGroupCustomDetails. -func (r *RecoveryResourceGroupCustomDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "resourceType": - err = unpopulate(val, "ResourceType", &r.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryServicesProvider. -func (r RecoveryServicesProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryServicesProvider. -func (r *RecoveryServicesProvider) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryServicesProviderCollection. -func (r RecoveryServicesProviderCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryServicesProviderCollection. -func (r *RecoveryServicesProviderCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryServicesProviderProperties. -func (r RecoveryServicesProviderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowedScenarios", r.AllowedScenarios) - populate(objectMap, "authenticationIdentityDetails", r.AuthenticationIdentityDetails) - populate(objectMap, "biosId", r.BiosID) - populate(objectMap, "connectionStatus", r.ConnectionStatus) - populate(objectMap, "dataPlaneAuthenticationIdentityDetails", r.DataPlaneAuthenticationIdentityDetails) - populate(objectMap, "draIdentifier", r.DraIdentifier) - populate(objectMap, "fabricFriendlyName", r.FabricFriendlyName) - populate(objectMap, "fabricType", r.FabricType) - populate(objectMap, "friendlyName", r.FriendlyName) - populate(objectMap, "healthErrorDetails", r.HealthErrorDetails) - populateTimeRFC3339(objectMap, "lastHeartBeat", r.LastHeartBeat) - populate(objectMap, "machineId", r.MachineID) - populate(objectMap, "machineName", r.MachineName) - populate(objectMap, "protectedItemCount", r.ProtectedItemCount) - populate(objectMap, "providerVersion", r.ProviderVersion) - populate(objectMap, "providerVersionDetails", r.ProviderVersionDetails) - populateTimeRFC3339(objectMap, "providerVersionExpiryDate", r.ProviderVersionExpiryDate) - populate(objectMap, "providerVersionState", r.ProviderVersionState) - populate(objectMap, "resourceAccessIdentityDetails", r.ResourceAccessIdentityDetails) - populate(objectMap, "serverVersion", r.ServerVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryServicesProviderProperties. -func (r *RecoveryServicesProviderProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowedScenarios": - err = unpopulate(val, "AllowedScenarios", &r.AllowedScenarios) - delete(rawMsg, key) - case "authenticationIdentityDetails": - err = unpopulate(val, "AuthenticationIdentityDetails", &r.AuthenticationIdentityDetails) - delete(rawMsg, key) - case "biosId": - err = unpopulate(val, "BiosID", &r.BiosID) - delete(rawMsg, key) - case "connectionStatus": - err = unpopulate(val, "ConnectionStatus", &r.ConnectionStatus) - delete(rawMsg, key) - case "dataPlaneAuthenticationIdentityDetails": - err = unpopulate(val, "DataPlaneAuthenticationIdentityDetails", &r.DataPlaneAuthenticationIdentityDetails) - delete(rawMsg, key) - case "draIdentifier": - err = unpopulate(val, "DraIdentifier", &r.DraIdentifier) - delete(rawMsg, key) - case "fabricFriendlyName": - err = unpopulate(val, "FabricFriendlyName", &r.FabricFriendlyName) - delete(rawMsg, key) - case "fabricType": - err = unpopulate(val, "FabricType", &r.FabricType) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &r.FriendlyName) - delete(rawMsg, key) - case "healthErrorDetails": - err = unpopulate(val, "HealthErrorDetails", &r.HealthErrorDetails) - delete(rawMsg, key) - case "lastHeartBeat": - err = unpopulateTimeRFC3339(val, "LastHeartBeat", &r.LastHeartBeat) - delete(rawMsg, key) - case "machineId": - err = unpopulate(val, "MachineID", &r.MachineID) - delete(rawMsg, key) - case "machineName": - err = unpopulate(val, "MachineName", &r.MachineName) - delete(rawMsg, key) - case "protectedItemCount": - err = unpopulate(val, "ProtectedItemCount", &r.ProtectedItemCount) - delete(rawMsg, key) - case "providerVersion": - err = unpopulate(val, "ProviderVersion", &r.ProviderVersion) - delete(rawMsg, key) - case "providerVersionDetails": - err = unpopulate(val, "ProviderVersionDetails", &r.ProviderVersionDetails) - delete(rawMsg, key) - case "providerVersionExpiryDate": - err = unpopulateTimeRFC3339(val, "ProviderVersionExpiryDate", &r.ProviderVersionExpiryDate) - delete(rawMsg, key) - case "providerVersionState": - err = unpopulate(val, "ProviderVersionState", &r.ProviderVersionState) - delete(rawMsg, key) - case "resourceAccessIdentityDetails": - err = unpopulate(val, "ResourceAccessIdentityDetails", &r.ResourceAccessIdentityDetails) - delete(rawMsg, key) - case "serverVersion": - err = unpopulate(val, "ServerVersion", &r.ServerVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RecoveryVirtualNetworkCustomDetails. -func (r RecoveryVirtualNetworkCustomDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["resourceType"] = r.ResourceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryVirtualNetworkCustomDetails. -func (r *RecoveryVirtualNetworkCustomDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "resourceType": - err = unpopulate(val, "ResourceType", &r.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RemoveDisksInput. -func (r RemoveDisksInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RemoveDisksInput. -func (r *RemoveDisksInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RemoveDisksInputProperties. -func (r RemoveDisksInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RemoveDisksInputProperties. -func (r *RemoveDisksInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalRemoveDisksProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RemoveDisksProviderSpecificInput. -func (r RemoveDisksProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RemoveDisksProviderSpecificInput. -func (r *RemoveDisksProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RemoveProtectionContainerMappingInput. -func (r RemoveProtectionContainerMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RemoveProtectionContainerMappingInput. -func (r *RemoveProtectionContainerMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RemoveProtectionContainerMappingInputProperties. -func (r RemoveProtectionContainerMappingInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificInput", r.ProviderSpecificInput) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RemoveProtectionContainerMappingInputProperties. -func (r *RemoveProtectionContainerMappingInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificInput": - err = unpopulate(val, "ProviderSpecificInput", &r.ProviderSpecificInput) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RenewCertificateInput. -func (r RenewCertificateInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RenewCertificateInput. -func (r *RenewCertificateInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RenewCertificateInputProperties. -func (r RenewCertificateInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "renewCertificateType", r.RenewCertificateType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RenewCertificateInputProperties. -func (r *RenewCertificateInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "renewCertificateType": - err = unpopulate(val, "RenewCertificateType", &r.RenewCertificateType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationAgentDetails. -func (r ReplicationAgentDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "biosId", r.BiosID) - populate(objectMap, "fabricObjectId", r.FabricObjectID) - populate(objectMap, "fqdn", r.Fqdn) - populate(objectMap, "health", r.Health) - populate(objectMap, "healthErrors", r.HealthErrors) - populate(objectMap, "id", r.ID) - populateTimeRFC3339(objectMap, "lastHeartbeatUtc", r.LastHeartbeatUTC) - populate(objectMap, "name", r.Name) - populate(objectMap, "version", r.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationAgentDetails. -func (r *ReplicationAgentDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "biosId": - err = unpopulate(val, "BiosID", &r.BiosID) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &r.FabricObjectID) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &r.Fqdn) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &r.Health) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &r.HealthErrors) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "lastHeartbeatUtc": - err = unpopulateTimeRFC3339(val, "LastHeartbeatUTC", &r.LastHeartbeatUTC) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &r.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationAppliance. -func (r ReplicationAppliance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationAppliance. -func (r *ReplicationAppliance) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationApplianceProperties. -func (r ReplicationApplianceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationApplianceProperties. -func (r *ReplicationApplianceProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalApplianceSpecificDetailsClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationEligibilityResults. -func (r ReplicationEligibilityResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationEligibilityResults. -func (r *ReplicationEligibilityResults) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationEligibilityResultsCollection. -func (r ReplicationEligibilityResultsCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationEligibilityResultsCollection. -func (r *ReplicationEligibilityResultsCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationEligibilityResultsErrorInfo. -func (r ReplicationEligibilityResultsErrorInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", r.Code) - populate(objectMap, "message", r.Message) - populate(objectMap, "possibleCauses", r.PossibleCauses) - populate(objectMap, "recommendedAction", r.RecommendedAction) - populate(objectMap, "status", r.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationEligibilityResultsErrorInfo. -func (r *ReplicationEligibilityResultsErrorInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &r.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &r.Message) - delete(rawMsg, key) - case "possibleCauses": - err = unpopulate(val, "PossibleCauses", &r.PossibleCauses) - delete(rawMsg, key) - case "recommendedAction": - err = unpopulate(val, "RecommendedAction", &r.RecommendedAction) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &r.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationEligibilityResultsProperties. -func (r ReplicationEligibilityResultsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clientRequestId", r.ClientRequestID) - populate(objectMap, "errors", r.Errors) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationEligibilityResultsProperties. -func (r *ReplicationEligibilityResultsProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientRequestId": - err = unpopulate(val, "ClientRequestID", &r.ClientRequestID) - delete(rawMsg, key) - case "errors": - err = unpopulate(val, "Errors", &r.Errors) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationGroupDetails. -func (r ReplicationGroupDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "ReplicationGroupDetails" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationGroupDetails. -func (r *ReplicationGroupDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectedItem. -func (r ReplicationProtectedItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectedItem. -func (r *ReplicationProtectedItem) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectedItemCollection. -func (r ReplicationProtectedItemCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectedItemCollection. -func (r *ReplicationProtectedItemCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectedItemProperties. -func (r ReplicationProtectedItemProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeLocation", r.ActiveLocation) - populate(objectMap, "allowedOperations", r.AllowedOperations) - populate(objectMap, "currentScenario", r.CurrentScenario) - populate(objectMap, "eventCorrelationId", r.EventCorrelationID) - populate(objectMap, "failoverHealth", r.FailoverHealth) - populate(objectMap, "failoverRecoveryPointId", r.FailoverRecoveryPointID) - populate(objectMap, "friendlyName", r.FriendlyName) - populate(objectMap, "healthErrors", r.HealthErrors) - populateTimeRFC3339(objectMap, "lastSuccessfulFailoverTime", r.LastSuccessfulFailoverTime) - populateTimeRFC3339(objectMap, "lastSuccessfulTestFailoverTime", r.LastSuccessfulTestFailoverTime) - populate(objectMap, "policyFriendlyName", r.PolicyFriendlyName) - populate(objectMap, "policyId", r.PolicyID) - populate(objectMap, "primaryFabricFriendlyName", r.PrimaryFabricFriendlyName) - populate(objectMap, "primaryFabricProvider", r.PrimaryFabricProvider) - populate(objectMap, "primaryProtectionContainerFriendlyName", r.PrimaryProtectionContainerFriendlyName) - populate(objectMap, "protectableItemId", r.ProtectableItemID) - populate(objectMap, "protectedItemType", r.ProtectedItemType) - populate(objectMap, "protectionState", r.ProtectionState) - populate(objectMap, "protectionStateDescription", r.ProtectionStateDescription) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - populate(objectMap, "recoveryContainerId", r.RecoveryContainerID) - populate(objectMap, "recoveryFabricFriendlyName", r.RecoveryFabricFriendlyName) - populate(objectMap, "recoveryFabricId", r.RecoveryFabricID) - populate(objectMap, "recoveryProtectionContainerFriendlyName", r.RecoveryProtectionContainerFriendlyName) - populate(objectMap, "recoveryServicesProviderId", r.RecoveryServicesProviderID) - populate(objectMap, "replicationHealth", r.ReplicationHealth) - populate(objectMap, "switchProviderState", r.SwitchProviderState) - populate(objectMap, "switchProviderStateDescription", r.SwitchProviderStateDescription) - populate(objectMap, "testFailoverState", r.TestFailoverState) - populate(objectMap, "testFailoverStateDescription", r.TestFailoverStateDescription) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectedItemProperties. -func (r *ReplicationProtectedItemProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activeLocation": - err = unpopulate(val, "ActiveLocation", &r.ActiveLocation) - delete(rawMsg, key) - case "allowedOperations": - err = unpopulate(val, "AllowedOperations", &r.AllowedOperations) - delete(rawMsg, key) - case "currentScenario": - err = unpopulate(val, "CurrentScenario", &r.CurrentScenario) - delete(rawMsg, key) - case "eventCorrelationId": - err = unpopulate(val, "EventCorrelationID", &r.EventCorrelationID) - delete(rawMsg, key) - case "failoverHealth": - err = unpopulate(val, "FailoverHealth", &r.FailoverHealth) - delete(rawMsg, key) - case "failoverRecoveryPointId": - err = unpopulate(val, "FailoverRecoveryPointID", &r.FailoverRecoveryPointID) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &r.FriendlyName) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &r.HealthErrors) - delete(rawMsg, key) - case "lastSuccessfulFailoverTime": - err = unpopulateTimeRFC3339(val, "LastSuccessfulFailoverTime", &r.LastSuccessfulFailoverTime) - delete(rawMsg, key) - case "lastSuccessfulTestFailoverTime": - err = unpopulateTimeRFC3339(val, "LastSuccessfulTestFailoverTime", &r.LastSuccessfulTestFailoverTime) - delete(rawMsg, key) - case "policyFriendlyName": - err = unpopulate(val, "PolicyFriendlyName", &r.PolicyFriendlyName) - delete(rawMsg, key) - case "policyId": - err = unpopulate(val, "PolicyID", &r.PolicyID) - delete(rawMsg, key) - case "primaryFabricFriendlyName": - err = unpopulate(val, "PrimaryFabricFriendlyName", &r.PrimaryFabricFriendlyName) - delete(rawMsg, key) - case "primaryFabricProvider": - err = unpopulate(val, "PrimaryFabricProvider", &r.PrimaryFabricProvider) - delete(rawMsg, key) - case "primaryProtectionContainerFriendlyName": - err = unpopulate(val, "PrimaryProtectionContainerFriendlyName", &r.PrimaryProtectionContainerFriendlyName) - delete(rawMsg, key) - case "protectableItemId": - err = unpopulate(val, "ProtectableItemID", &r.ProtectableItemID) - delete(rawMsg, key) - case "protectedItemType": - err = unpopulate(val, "ProtectedItemType", &r.ProtectedItemType) - delete(rawMsg, key) - case "protectionState": - err = unpopulate(val, "ProtectionState", &r.ProtectionState) - delete(rawMsg, key) - case "protectionStateDescription": - err = unpopulate(val, "ProtectionStateDescription", &r.ProtectionStateDescription) - delete(rawMsg, key) - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalReplicationProviderSpecificSettingsClassification(val) - delete(rawMsg, key) - case "recoveryContainerId": - err = unpopulate(val, "RecoveryContainerID", &r.RecoveryContainerID) - delete(rawMsg, key) - case "recoveryFabricFriendlyName": - err = unpopulate(val, "RecoveryFabricFriendlyName", &r.RecoveryFabricFriendlyName) - delete(rawMsg, key) - case "recoveryFabricId": - err = unpopulate(val, "RecoveryFabricID", &r.RecoveryFabricID) - delete(rawMsg, key) - case "recoveryProtectionContainerFriendlyName": - err = unpopulate(val, "RecoveryProtectionContainerFriendlyName", &r.RecoveryProtectionContainerFriendlyName) - delete(rawMsg, key) - case "recoveryServicesProviderId": - err = unpopulate(val, "RecoveryServicesProviderID", &r.RecoveryServicesProviderID) - delete(rawMsg, key) - case "replicationHealth": - err = unpopulate(val, "ReplicationHealth", &r.ReplicationHealth) - delete(rawMsg, key) - case "switchProviderState": - err = unpopulate(val, "SwitchProviderState", &r.SwitchProviderState) - delete(rawMsg, key) - case "switchProviderStateDescription": - err = unpopulate(val, "SwitchProviderStateDescription", &r.SwitchProviderStateDescription) - delete(rawMsg, key) - case "testFailoverState": - err = unpopulate(val, "TestFailoverState", &r.TestFailoverState) - delete(rawMsg, key) - case "testFailoverStateDescription": - err = unpopulate(val, "TestFailoverStateDescription", &r.TestFailoverStateDescription) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionIntent. -func (r ReplicationProtectionIntent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionIntent. -func (r *ReplicationProtectionIntent) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionIntentCollection. -func (r ReplicationProtectionIntentCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionIntentCollection. -func (r *ReplicationProtectionIntentCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &r.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &r.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionIntentProperties. -func (r ReplicationProtectionIntentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "creationTimeUTC", r.CreationTimeUTC) - populate(objectMap, "friendlyName", r.FriendlyName) - populate(objectMap, "isActive", r.IsActive) - populate(objectMap, "jobId", r.JobID) - populate(objectMap, "jobState", r.JobState) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionIntentProperties. -func (r *ReplicationProtectionIntentProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "creationTimeUTC": - err = unpopulate(val, "CreationTimeUTC", &r.CreationTimeUTC) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &r.FriendlyName) - delete(rawMsg, key) - case "isActive": - err = unpopulate(val, "IsActive", &r.IsActive) - delete(rawMsg, key) - case "jobId": - err = unpopulate(val, "JobID", &r.JobID) - delete(rawMsg, key) - case "jobState": - err = unpopulate(val, "JobState", &r.JobState) - delete(rawMsg, key) - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalReplicationProtectionIntentProviderSpecificSettingsClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionIntentProviderSpecificSettings. -func (r ReplicationProtectionIntentProviderSpecificSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionIntentProviderSpecificSettings. -func (r *ReplicationProtectionIntentProviderSpecificSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProviderContainerUnmappingInput. -func (r ReplicationProviderContainerUnmappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instanceType", r.InstanceType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProviderContainerUnmappingInput. -func (r *ReplicationProviderContainerUnmappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProviderSpecificContainerCreationInput. -func (r ReplicationProviderSpecificContainerCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProviderSpecificContainerCreationInput. -func (r *ReplicationProviderSpecificContainerCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProviderSpecificContainerMappingInput. -func (r ReplicationProviderSpecificContainerMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProviderSpecificContainerMappingInput. -func (r *ReplicationProviderSpecificContainerMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProviderSpecificSettings. -func (r ReplicationProviderSpecificSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProviderSpecificSettings. -func (r *ReplicationProviderSpecificSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReplicationProviderSpecificUpdateContainerMappingInput. -func (r ReplicationProviderSpecificUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProviderSpecificUpdateContainerMappingInput. -func (r *ReplicationProviderSpecificUpdateContainerMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReprotectAgentDetails. -func (r ReprotectAgentDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessibleDatastores", r.AccessibleDatastores) - populate(objectMap, "biosId", r.BiosID) - populate(objectMap, "fabricObjectId", r.FabricObjectID) - populate(objectMap, "fqdn", r.Fqdn) - populate(objectMap, "health", r.Health) - populate(objectMap, "healthErrors", r.HealthErrors) - populate(objectMap, "id", r.ID) - populateTimeRFC3339(objectMap, "lastDiscoveryInUtc", r.LastDiscoveryInUTC) - populateTimeRFC3339(objectMap, "lastHeartbeatUtc", r.LastHeartbeatUTC) - populate(objectMap, "name", r.Name) - populate(objectMap, "protectedItemCount", r.ProtectedItemCount) - populate(objectMap, "vcenterId", r.VcenterID) - populate(objectMap, "version", r.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReprotectAgentDetails. -func (r *ReprotectAgentDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accessibleDatastores": - err = unpopulate(val, "AccessibleDatastores", &r.AccessibleDatastores) - delete(rawMsg, key) - case "biosId": - err = unpopulate(val, "BiosID", &r.BiosID) - delete(rawMsg, key) - case "fabricObjectId": - err = unpopulate(val, "FabricObjectID", &r.FabricObjectID) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &r.Fqdn) - delete(rawMsg, key) - case "health": - err = unpopulate(val, "Health", &r.Health) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &r.HealthErrors) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "lastDiscoveryInUtc": - err = unpopulateTimeRFC3339(val, "LastDiscoveryInUTC", &r.LastDiscoveryInUTC) - delete(rawMsg, key) - case "lastHeartbeatUtc": - err = unpopulateTimeRFC3339(val, "LastHeartbeatUTC", &r.LastHeartbeatUTC) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "protectedItemCount": - err = unpopulate(val, "ProtectedItemCount", &r.ProtectedItemCount) - delete(rawMsg, key) - case "vcenterId": - err = unpopulate(val, "VcenterID", &r.VcenterID) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &r.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResolveHealthError. -func (r ResolveHealthError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "healthErrorId", r.HealthErrorID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResolveHealthError. -func (r *ResolveHealthError) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "healthErrorId": - err = unpopulate(val, "HealthErrorID", &r.HealthErrorID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResolveHealthInput. -func (r ResolveHealthInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResolveHealthInput. -func (r *ResolveHealthInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResolveHealthInputProperties. -func (r ResolveHealthInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "healthErrors", r.HealthErrors) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResolveHealthInputProperties. -func (r *ResolveHealthInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "healthErrors": - err = unpopulate(val, "HealthErrors", &r.HealthErrors) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. -func (r *Resource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &r.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &r.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceHealthSummary. -func (r ResourceHealthSummary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "categorizedResourceCounts", r.CategorizedResourceCounts) - populate(objectMap, "issues", r.Issues) - populate(objectMap, "resourceCount", r.ResourceCount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHealthSummary. -func (r *ResourceHealthSummary) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "categorizedResourceCounts": - err = unpopulate(val, "CategorizedResourceCounts", &r.CategorizedResourceCounts) - delete(rawMsg, key) - case "issues": - err = unpopulate(val, "Issues", &r.Issues) - delete(rawMsg, key) - case "resourceCount": - err = unpopulate(val, "ResourceCount", &r.ResourceCount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResumeJobParams. -func (r ResumeJobParams) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResumeJobParams. -func (r *ResumeJobParams) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResumeJobParamsProperties. -func (r ResumeJobParamsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "comments", r.Comments) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResumeJobParamsProperties. -func (r *ResumeJobParamsProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "comments": - err = unpopulate(val, "Comments", &r.Comments) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResumeReplicationInput. -func (r ResumeReplicationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResumeReplicationInput. -func (r *ResumeReplicationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResumeReplicationInputProperties. -func (r ResumeReplicationInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResumeReplicationInputProperties. -func (r *ResumeReplicationInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalResumeReplicationProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResumeReplicationProviderSpecificInput. -func (r ResumeReplicationProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResumeReplicationProviderSpecificInput. -func (r *ResumeReplicationProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResyncInput. -func (r ResyncInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResyncInput. -func (r *ResyncInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResyncInputProperties. -func (r ResyncInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResyncInputProperties. -func (r *ResyncInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalResyncProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResyncProviderSpecificInput. -func (r ResyncProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ResyncProviderSpecificInput. -func (r *ResyncProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RetentionVolume. -func (r RetentionVolume) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capacityInBytes", r.CapacityInBytes) - populate(objectMap, "freeSpaceInBytes", r.FreeSpaceInBytes) - populate(objectMap, "thresholdPercentage", r.ThresholdPercentage) - populate(objectMap, "volumeName", r.VolumeName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RetentionVolume. -func (r *RetentionVolume) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacityInBytes": - err = unpopulate(val, "CapacityInBytes", &r.CapacityInBytes) - delete(rawMsg, key) - case "freeSpaceInBytes": - err = unpopulate(val, "FreeSpaceInBytes", &r.FreeSpaceInBytes) - delete(rawMsg, key) - case "thresholdPercentage": - err = unpopulate(val, "ThresholdPercentage", &r.ThresholdPercentage) - delete(rawMsg, key) - case "volumeName": - err = unpopulate(val, "VolumeName", &r.VolumeName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReverseReplicationInput. -func (r ReverseReplicationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReverseReplicationInput. -func (r *ReverseReplicationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &r.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReverseReplicationInputProperties. -func (r ReverseReplicationInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "failoverDirection", r.FailoverDirection) - populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReverseReplicationInputProperties. -func (r *ReverseReplicationInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failoverDirection": - err = unpopulate(val, "FailoverDirection", &r.FailoverDirection) - delete(rawMsg, key) - case "providerSpecificDetails": - r.ProviderSpecificDetails, err = unmarshalReverseReplicationProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ReverseReplicationProviderSpecificInput. -func (r ReverseReplicationProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = r.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ReverseReplicationProviderSpecificInput. -func (r *ReverseReplicationProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &r.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RoleAssignment. -func (r RoleAssignment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "name", r.Name) - populate(objectMap, "principalId", r.PrincipalID) - populate(objectMap, "roleDefinitionId", r.RoleDefinitionID) - populate(objectMap, "scope", r.Scope) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignment. -func (r *RoleAssignment) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &r.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &r.Name) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &r.PrincipalID) - delete(rawMsg, key) - case "roleDefinitionId": - err = unpopulate(val, "RoleDefinitionID", &r.RoleDefinitionID) - delete(rawMsg, key) - case "scope": - err = unpopulate(val, "Scope", &r.Scope) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type RunAsAccount. -func (r RunAsAccount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accountId", r.AccountID) - populate(objectMap, "accountName", r.AccountName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RunAsAccount. -func (r *RunAsAccount) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accountId": - err = unpopulate(val, "AccountID", &r.AccountID) - delete(rawMsg, key) - case "accountName": - err = unpopulate(val, "AccountName", &r.AccountName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ScriptActionTaskDetails. -func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "ScriptActionTaskDetails" - populate(objectMap, "isPrimarySideScript", s.IsPrimarySideScript) - populate(objectMap, "name", s.Name) - populate(objectMap, "output", s.Output) - populate(objectMap, "path", s.Path) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptActionTaskDetails. -func (s *ScriptActionTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &s.InstanceType) - delete(rawMsg, key) - case "isPrimarySideScript": - err = unpopulate(val, "IsPrimarySideScript", &s.IsPrimarySideScript) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "output": - err = unpopulate(val, "Output", &s.Output) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &s.Path) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServiceError. -func (s ServiceError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activityId", s.ActivityID) - populate(objectMap, "code", s.Code) - populate(objectMap, "message", s.Message) - populate(objectMap, "possibleCauses", s.PossibleCauses) - populate(objectMap, "recommendedAction", s.RecommendedAction) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceError. -func (s *ServiceError) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "activityId": - err = unpopulate(val, "ActivityID", &s.ActivityID) - delete(rawMsg, key) - case "code": - err = unpopulate(val, "Code", &s.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &s.Message) - delete(rawMsg, key) - case "possibleCauses": - err = unpopulate(val, "PossibleCauses", &s.PossibleCauses) - delete(rawMsg, key) - case "recommendedAction": - err = unpopulate(val, "RecommendedAction", &s.RecommendedAction) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageAccountCustomDetails. -func (s StorageAccountCustomDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["resourceType"] = s.ResourceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccountCustomDetails. -func (s *StorageAccountCustomDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "resourceType": - err = unpopulate(val, "ResourceType", &s.ResourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageClassification. -func (s StorageClassification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassification. -func (s *StorageClassification) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageClassificationCollection. -func (s StorageClassificationCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationCollection. -func (s *StorageClassificationCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageClassificationMapping. -func (s StorageClassificationMapping) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationMapping. -func (s *StorageClassificationMapping) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageClassificationMappingCollection. -func (s StorageClassificationMappingCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationMappingCollection. -func (s *StorageClassificationMappingCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageClassificationMappingInput. -func (s StorageClassificationMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", s.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationMappingInput. -func (s *StorageClassificationMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageClassificationMappingProperties. -func (s StorageClassificationMappingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "targetStorageClassificationId", s.TargetStorageClassificationID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationMappingProperties. -func (s *StorageClassificationMappingProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "targetStorageClassificationId": - err = unpopulate(val, "TargetStorageClassificationID", &s.TargetStorageClassificationID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageClassificationProperties. -func (s StorageClassificationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "friendlyName", s.FriendlyName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationProperties. -func (s *StorageClassificationProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "friendlyName": - err = unpopulate(val, "FriendlyName", &s.FriendlyName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageMappingInputProperties. -func (s StorageMappingInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "targetStorageClassificationId", s.TargetStorageClassificationID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMappingInputProperties. -func (s *StorageMappingInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "targetStorageClassificationId": - err = unpopulate(val, "TargetStorageClassificationID", &s.TargetStorageClassificationID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Subnet. -func (s Subnet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressList", s.AddressList) - populate(objectMap, "friendlyName", s.FriendlyName) - populate(objectMap, "name", s.Name) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Subnet. -func (s *Subnet) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "addressList": - err = unpopulate(val, "AddressList", &s.AddressList) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &s.FriendlyName) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SupportedOSDetails. -func (s SupportedOSDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "osName", s.OSName) - populate(objectMap, "osType", s.OSType) - populate(objectMap, "osVersions", s.OSVersions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOSDetails. -func (s *SupportedOSDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "osName": - err = unpopulate(val, "OSName", &s.OSName) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &s.OSType) - delete(rawMsg, key) - case "osVersions": - err = unpopulate(val, "OSVersions", &s.OSVersions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SupportedOSProperties. -func (s SupportedOSProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "supportedOsList", s.SupportedOsList) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOSProperties. -func (s *SupportedOSProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "supportedOsList": - err = unpopulate(val, "SupportedOsList", &s.SupportedOsList) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SupportedOSProperty. -func (s SupportedOSProperty) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instanceType", s.InstanceType) - populate(objectMap, "supportedOs", s.SupportedOs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOSProperty. -func (s *SupportedOSProperty) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &s.InstanceType) - delete(rawMsg, key) - case "supportedOs": - err = unpopulate(val, "SupportedOs", &s.SupportedOs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SupportedOperatingSystems. -func (s SupportedOperatingSystems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOperatingSystems. -func (s *SupportedOperatingSystems) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SwitchProtectionInput. -func (s SwitchProtectionInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", s.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProtectionInput. -func (s *SwitchProtectionInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SwitchProtectionInputProperties. -func (s SwitchProtectionInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", s.ProviderSpecificDetails) - populate(objectMap, "replicationProtectedItemName", s.ReplicationProtectedItemName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProtectionInputProperties. -func (s *SwitchProtectionInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - s.ProviderSpecificDetails, err = unmarshalSwitchProtectionProviderSpecificInputClassification(val) - delete(rawMsg, key) - case "replicationProtectedItemName": - err = unpopulate(val, "ReplicationProtectedItemName", &s.ReplicationProtectedItemName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SwitchProtectionJobDetails. -func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedObjectDetails", s.AffectedObjectDetails) - objectMap["instanceType"] = "SwitchProtectionJobDetails" - populate(objectMap, "newReplicationProtectedItemId", s.NewReplicationProtectedItemID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProtectionJobDetails. -func (s *SwitchProtectionJobDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedObjectDetails": - err = unpopulate(val, "AffectedObjectDetails", &s.AffectedObjectDetails) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &s.InstanceType) - delete(rawMsg, key) - case "newReplicationProtectedItemId": - err = unpopulate(val, "NewReplicationProtectedItemID", &s.NewReplicationProtectedItemID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SwitchProtectionProviderSpecificInput. -func (s SwitchProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = s.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProtectionProviderSpecificInput. -func (s *SwitchProtectionProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &s.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SwitchProviderInput. -func (s SwitchProviderInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", s.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProviderInput. -func (s *SwitchProviderInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SwitchProviderInputProperties. -func (s SwitchProviderInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", s.ProviderSpecificDetails) - populate(objectMap, "targetInstanceType", s.TargetInstanceType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProviderInputProperties. -func (s *SwitchProviderInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - s.ProviderSpecificDetails, err = unmarshalSwitchProviderSpecificInputClassification(val) - delete(rawMsg, key) - case "targetInstanceType": - err = unpopulate(val, "TargetInstanceType", &s.TargetInstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SwitchProviderSpecificInput. -func (s SwitchProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = s.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProviderSpecificInput. -func (s *SwitchProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &s.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TargetComputeSize. -func (t TargetComputeSize) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", t.ID) - populate(objectMap, "name", t.Name) - populate(objectMap, "properties", t.Properties) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TargetComputeSize. -func (t *TargetComputeSize) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &t.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &t.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TargetComputeSizeCollection. -func (t TargetComputeSizeCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", t.NextLink) - populate(objectMap, "value", t.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TargetComputeSizeCollection. -func (t *TargetComputeSizeCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &t.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &t.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TargetComputeSizeProperties. -func (t TargetComputeSizeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cpuCoresCount", t.CPUCoresCount) - populate(objectMap, "errors", t.Errors) - populate(objectMap, "friendlyName", t.FriendlyName) - populate(objectMap, "highIopsSupported", t.HighIopsSupported) - populate(objectMap, "hyperVGenerations", t.HyperVGenerations) - populate(objectMap, "maxDataDiskCount", t.MaxDataDiskCount) - populate(objectMap, "maxNicsCount", t.MaxNicsCount) - populate(objectMap, "memoryInGB", t.MemoryInGB) - populate(objectMap, "name", t.Name) - populate(objectMap, "vCPUsAvailable", t.VCPUsAvailable) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TargetComputeSizeProperties. -func (t *TargetComputeSizeProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cpuCoresCount": - err = unpopulate(val, "CPUCoresCount", &t.CPUCoresCount) - delete(rawMsg, key) - case "errors": - err = unpopulate(val, "Errors", &t.Errors) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &t.FriendlyName) - delete(rawMsg, key) - case "highIopsSupported": - err = unpopulate(val, "HighIopsSupported", &t.HighIopsSupported) - delete(rawMsg, key) - case "hyperVGenerations": - err = unpopulate(val, "HyperVGenerations", &t.HyperVGenerations) - delete(rawMsg, key) - case "maxDataDiskCount": - err = unpopulate(val, "MaxDataDiskCount", &t.MaxDataDiskCount) - delete(rawMsg, key) - case "maxNicsCount": - err = unpopulate(val, "MaxNicsCount", &t.MaxNicsCount) - delete(rawMsg, key) - case "memoryInGB": - err = unpopulate(val, "MemoryInGB", &t.MemoryInGB) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &t.Name) - delete(rawMsg, key) - case "vCPUsAvailable": - err = unpopulate(val, "VCPUsAvailable", &t.VCPUsAvailable) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TaskTypeDetails. -func (t TaskTypeDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = t.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TaskTypeDetails. -func (t *TaskTypeDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &t.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestFailoverCleanupInput. -func (t TestFailoverCleanupInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", t.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverCleanupInput. -func (t *TestFailoverCleanupInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestFailoverCleanupInputProperties. -func (t TestFailoverCleanupInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "comments", t.Comments) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverCleanupInputProperties. -func (t *TestFailoverCleanupInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "comments": - err = unpopulate(val, "Comments", &t.Comments) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestFailoverInput. -func (t TestFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", t.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverInput. -func (t *TestFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestFailoverInputProperties. -func (t TestFailoverInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "failoverDirection", t.FailoverDirection) - populate(objectMap, "networkId", t.NetworkID) - populate(objectMap, "networkType", t.NetworkType) - populate(objectMap, "providerSpecificDetails", t.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverInputProperties. -func (t *TestFailoverInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failoverDirection": - err = unpopulate(val, "FailoverDirection", &t.FailoverDirection) - delete(rawMsg, key) - case "networkId": - err = unpopulate(val, "NetworkID", &t.NetworkID) - delete(rawMsg, key) - case "networkType": - err = unpopulate(val, "NetworkType", &t.NetworkType) - delete(rawMsg, key) - case "providerSpecificDetails": - t.ProviderSpecificDetails, err = unmarshalTestFailoverProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestFailoverJobDetails. -func (t TestFailoverJobDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affectedObjectDetails", t.AffectedObjectDetails) - populate(objectMap, "comments", t.Comments) - objectMap["instanceType"] = "TestFailoverJobDetails" - populate(objectMap, "networkFriendlyName", t.NetworkFriendlyName) - populate(objectMap, "networkName", t.NetworkName) - populate(objectMap, "networkType", t.NetworkType) - populate(objectMap, "protectedItemDetails", t.ProtectedItemDetails) - populate(objectMap, "testFailoverStatus", t.TestFailoverStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverJobDetails. -func (t *TestFailoverJobDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "affectedObjectDetails": - err = unpopulate(val, "AffectedObjectDetails", &t.AffectedObjectDetails) - delete(rawMsg, key) - case "comments": - err = unpopulate(val, "Comments", &t.Comments) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &t.InstanceType) - delete(rawMsg, key) - case "networkFriendlyName": - err = unpopulate(val, "NetworkFriendlyName", &t.NetworkFriendlyName) - delete(rawMsg, key) - case "networkName": - err = unpopulate(val, "NetworkName", &t.NetworkName) - delete(rawMsg, key) - case "networkType": - err = unpopulate(val, "NetworkType", &t.NetworkType) - delete(rawMsg, key) - case "protectedItemDetails": - err = unpopulate(val, "ProtectedItemDetails", &t.ProtectedItemDetails) - delete(rawMsg, key) - case "testFailoverStatus": - err = unpopulate(val, "TestFailoverStatus", &t.TestFailoverStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestFailoverProviderSpecificInput. -func (t TestFailoverProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = t.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverProviderSpecificInput. -func (t *TestFailoverProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &t.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestMigrateCleanupInput. -func (t TestMigrateCleanupInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", t.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestMigrateCleanupInput. -func (t *TestMigrateCleanupInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestMigrateCleanupInputProperties. -func (t TestMigrateCleanupInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "comments", t.Comments) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestMigrateCleanupInputProperties. -func (t *TestMigrateCleanupInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "comments": - err = unpopulate(val, "Comments", &t.Comments) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestMigrateInput. -func (t TestMigrateInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", t.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestMigrateInput. -func (t *TestMigrateInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &t.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestMigrateInputProperties. -func (t TestMigrateInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", t.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestMigrateInputProperties. -func (t *TestMigrateInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - t.ProviderSpecificDetails, err = unmarshalTestMigrateProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TestMigrateProviderSpecificInput. -func (t TestMigrateProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = t.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TestMigrateProviderSpecificInput. -func (t *TestMigrateProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &t.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UnplannedFailoverInput. -func (u UnplannedFailoverInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UnplannedFailoverInput. -func (u *UnplannedFailoverInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UnplannedFailoverInputProperties. -func (u UnplannedFailoverInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "failoverDirection", u.FailoverDirection) - populate(objectMap, "providerSpecificDetails", u.ProviderSpecificDetails) - populate(objectMap, "sourceSiteOperations", u.SourceSiteOperations) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UnplannedFailoverInputProperties. -func (u *UnplannedFailoverInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "failoverDirection": - err = unpopulate(val, "FailoverDirection", &u.FailoverDirection) - delete(rawMsg, key) - case "providerSpecificDetails": - u.ProviderSpecificDetails, err = unmarshalUnplannedFailoverProviderSpecificInputClassification(val) - delete(rawMsg, key) - case "sourceSiteOperations": - err = unpopulate(val, "SourceSiteOperations", &u.SourceSiteOperations) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UnplannedFailoverProviderSpecificInput. -func (u UnplannedFailoverProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = u.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UnplannedFailoverProviderSpecificInput. -func (u *UnplannedFailoverProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &u.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateApplianceForReplicationProtectedItemInput. -func (u UpdateApplianceForReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateApplianceForReplicationProtectedItemInput. -func (u *UpdateApplianceForReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateApplianceForReplicationProtectedItemInputProperties. -func (u UpdateApplianceForReplicationProtectedItemInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", u.ProviderSpecificDetails) - populate(objectMap, "targetApplianceId", u.TargetApplianceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateApplianceForReplicationProtectedItemInputProperties. -func (u *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - u.ProviderSpecificDetails, err = unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification(val) - delete(rawMsg, key) - case "targetApplianceId": - err = unpopulate(val, "TargetApplianceID", &u.TargetApplianceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateApplianceForReplicationProtectedItemProviderSpecificInput. -func (u UpdateApplianceForReplicationProtectedItemProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = u.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateApplianceForReplicationProtectedItemProviderSpecificInput. -func (u *UpdateApplianceForReplicationProtectedItemProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &u.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateDiskInput. -func (u UpdateDiskInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskId", u.DiskID) - populate(objectMap, "targetDiskName", u.TargetDiskName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateDiskInput. -func (u *UpdateDiskInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskId": - err = unpopulate(val, "DiskID", &u.DiskID) - delete(rawMsg, key) - case "targetDiskName": - err = unpopulate(val, "TargetDiskName", &u.TargetDiskName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateMigrationItemInput. -func (u UpdateMigrationItemInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMigrationItemInput. -func (u *UpdateMigrationItemInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateMigrationItemInputProperties. -func (u UpdateMigrationItemInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificDetails", u.ProviderSpecificDetails) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMigrationItemInputProperties. -func (u *UpdateMigrationItemInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificDetails": - u.ProviderSpecificDetails, err = unmarshalUpdateMigrationItemProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateMigrationItemProviderSpecificInput. -func (u UpdateMigrationItemProviderSpecificInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = u.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMigrationItemProviderSpecificInput. -func (u *UpdateMigrationItemProviderSpecificInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &u.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateMobilityServiceRequest. -func (u UpdateMobilityServiceRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMobilityServiceRequest. -func (u *UpdateMobilityServiceRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateMobilityServiceRequestProperties. -func (u UpdateMobilityServiceRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "runAsAccountId", u.RunAsAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMobilityServiceRequestProperties. -func (u *UpdateMobilityServiceRequestProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &u.RunAsAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateNetworkMappingInput. -func (u UpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateNetworkMappingInput. -func (u *UpdateNetworkMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateNetworkMappingInputProperties. -func (u UpdateNetworkMappingInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fabricSpecificDetails", u.FabricSpecificDetails) - populate(objectMap, "recoveryFabricName", u.RecoveryFabricName) - populate(objectMap, "recoveryNetworkId", u.RecoveryNetworkID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateNetworkMappingInputProperties. -func (u *UpdateNetworkMappingInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "fabricSpecificDetails": - u.FabricSpecificDetails, err = unmarshalFabricSpecificUpdateNetworkMappingInputClassification(val) - delete(rawMsg, key) - case "recoveryFabricName": - err = unpopulate(val, "RecoveryFabricName", &u.RecoveryFabricName) - delete(rawMsg, key) - case "recoveryNetworkId": - err = unpopulate(val, "RecoveryNetworkID", &u.RecoveryNetworkID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdatePolicyInput. -func (u UpdatePolicyInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdatePolicyInput. -func (u *UpdatePolicyInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdatePolicyInputProperties. -func (u UpdatePolicyInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "replicationProviderSettings", u.ReplicationProviderSettings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdatePolicyInputProperties. -func (u *UpdatePolicyInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "replicationProviderSettings": - u.ReplicationProviderSettings, err = unmarshalPolicyProviderSpecificInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateProtectionContainerMappingInput. -func (u UpdateProtectionContainerMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateProtectionContainerMappingInput. -func (u *UpdateProtectionContainerMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateProtectionContainerMappingInputProperties. -func (u UpdateProtectionContainerMappingInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "providerSpecificInput", u.ProviderSpecificInput) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateProtectionContainerMappingInputProperties. -func (u *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "providerSpecificInput": - u.ProviderSpecificInput, err = unmarshalReplicationProviderSpecificUpdateContainerMappingInputClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateRecoveryPlanInput. -func (u UpdateRecoveryPlanInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateRecoveryPlanInput. -func (u *UpdateRecoveryPlanInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateRecoveryPlanInputProperties. -func (u UpdateRecoveryPlanInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groups", u.Groups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateRecoveryPlanInputProperties. -func (u *UpdateRecoveryPlanInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "groups": - err = unpopulate(val, "Groups", &u.Groups) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateReplicationProtectedItemInput. -func (u UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateReplicationProtectedItemInput. -func (u *UpdateReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateReplicationProtectedItemInputProperties. -func (u UpdateReplicationProtectedItemInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enableRdpOnTargetOption", u.EnableRdpOnTargetOption) - populate(objectMap, "licenseType", u.LicenseType) - populate(objectMap, "providerSpecificDetails", u.ProviderSpecificDetails) - populate(objectMap, "recoveryAvailabilitySetId", u.RecoveryAvailabilitySetID) - populate(objectMap, "recoveryAzureVMName", u.RecoveryAzureVMName) - populate(objectMap, "recoveryAzureVMSize", u.RecoveryAzureVMSize) - populate(objectMap, "selectedRecoveryAzureNetworkId", u.SelectedRecoveryAzureNetworkID) - populate(objectMap, "selectedSourceNicId", u.SelectedSourceNicID) - populate(objectMap, "selectedTfoAzureNetworkId", u.SelectedTfoAzureNetworkID) - populate(objectMap, "vmNics", u.VMNics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateReplicationProtectedItemInputProperties. -func (u *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enableRdpOnTargetOption": - err = unpopulate(val, "EnableRdpOnTargetOption", &u.EnableRdpOnTargetOption) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &u.LicenseType) - delete(rawMsg, key) - case "providerSpecificDetails": - u.ProviderSpecificDetails, err = unmarshalUpdateReplicationProtectedItemProviderInputClassification(val) - delete(rawMsg, key) - case "recoveryAvailabilitySetId": - err = unpopulate(val, "RecoveryAvailabilitySetID", &u.RecoveryAvailabilitySetID) - delete(rawMsg, key) - case "recoveryAzureVMName": - err = unpopulate(val, "RecoveryAzureVMName", &u.RecoveryAzureVMName) - delete(rawMsg, key) - case "recoveryAzureVMSize": - err = unpopulate(val, "RecoveryAzureVMSize", &u.RecoveryAzureVMSize) - delete(rawMsg, key) - case "selectedRecoveryAzureNetworkId": - err = unpopulate(val, "SelectedRecoveryAzureNetworkID", &u.SelectedRecoveryAzureNetworkID) - delete(rawMsg, key) - case "selectedSourceNicId": - err = unpopulate(val, "SelectedSourceNicID", &u.SelectedSourceNicID) - delete(rawMsg, key) - case "selectedTfoAzureNetworkId": - err = unpopulate(val, "SelectedTfoAzureNetworkID", &u.SelectedTfoAzureNetworkID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &u.VMNics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateReplicationProtectedItemProviderInput. -func (u UpdateReplicationProtectedItemProviderInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = u.InstanceType - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateReplicationProtectedItemProviderInput. -func (u *UpdateReplicationProtectedItemProviderInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &u.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateVCenterRequest. -func (u UpdateVCenterRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", u.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateVCenterRequest. -func (u *UpdateVCenterRequest) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateVCenterRequestProperties. -func (u UpdateVCenterRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "friendlyName", u.FriendlyName) - populate(objectMap, "ipAddress", u.IPAddress) - populate(objectMap, "port", u.Port) - populate(objectMap, "processServerId", u.ProcessServerID) - populate(objectMap, "runAsAccountId", u.RunAsAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateVCenterRequestProperties. -func (u *UpdateVCenterRequestProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "friendlyName": - err = unpopulate(val, "FriendlyName", &u.FriendlyName) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &u.IPAddress) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &u.Port) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &u.ProcessServerID) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &u.RunAsAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VCenter. -func (v VCenter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VCenter. -func (v *VCenter) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VCenterCollection. -func (v VCenterCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VCenterCollection. -func (v *VCenterCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VCenterProperties. -func (v VCenterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "discoveryStatus", v.DiscoveryStatus) - populate(objectMap, "fabricArmResourceName", v.FabricArmResourceName) - populate(objectMap, "friendlyName", v.FriendlyName) - populate(objectMap, "healthErrors", v.HealthErrors) - populate(objectMap, "ipAddress", v.IPAddress) - populate(objectMap, "infrastructureId", v.InfrastructureID) - populate(objectMap, "internalId", v.InternalID) - populateTimeRFC3339(objectMap, "lastHeartbeat", v.LastHeartbeat) - populate(objectMap, "port", v.Port) - populate(objectMap, "processServerId", v.ProcessServerID) - populate(objectMap, "runAsAccountId", v.RunAsAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VCenterProperties. -func (v *VCenterProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "discoveryStatus": - err = unpopulate(val, "DiscoveryStatus", &v.DiscoveryStatus) - delete(rawMsg, key) - case "fabricArmResourceName": - err = unpopulate(val, "FabricArmResourceName", &v.FabricArmResourceName) - delete(rawMsg, key) - case "friendlyName": - err = unpopulate(val, "FriendlyName", &v.FriendlyName) - delete(rawMsg, key) - case "healthErrors": - err = unpopulate(val, "HealthErrors", &v.HealthErrors) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &v.IPAddress) - delete(rawMsg, key) - case "infrastructureId": - err = unpopulate(val, "InfrastructureID", &v.InfrastructureID) - delete(rawMsg, key) - case "internalId": - err = unpopulate(val, "InternalID", &v.InternalID) - delete(rawMsg, key) - case "lastHeartbeat": - err = unpopulateTimeRFC3339(val, "LastHeartbeat", &v.LastHeartbeat) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &v.Port) - delete(rawMsg, key) - case "processServerId": - err = unpopulate(val, "ProcessServerID", &v.ProcessServerID) - delete(rawMsg, key) - case "runAsAccountId": - err = unpopulate(val, "RunAsAccountID", &v.RunAsAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMNicDetails. -func (v VMNicDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enableAcceleratedNetworkingOnRecovery", v.EnableAcceleratedNetworkingOnRecovery) - populate(objectMap, "enableAcceleratedNetworkingOnTfo", v.EnableAcceleratedNetworkingOnTfo) - populate(objectMap, "ipConfigs", v.IPConfigs) - populate(objectMap, "nicId", v.NicID) - populate(objectMap, "recoveryNetworkSecurityGroupId", v.RecoveryNetworkSecurityGroupID) - populate(objectMap, "recoveryNicName", v.RecoveryNicName) - populate(objectMap, "recoveryNicResourceGroupName", v.RecoveryNicResourceGroupName) - populate(objectMap, "recoveryVMNetworkId", v.RecoveryVMNetworkID) - populate(objectMap, "replicaNicId", v.ReplicaNicID) - populate(objectMap, "reuseExistingNic", v.ReuseExistingNic) - populate(objectMap, "selectionType", v.SelectionType) - populate(objectMap, "sourceNicArmId", v.SourceNicArmID) - populate(objectMap, "targetNicName", v.TargetNicName) - populate(objectMap, "tfoNetworkSecurityGroupId", v.TfoNetworkSecurityGroupID) - populate(objectMap, "tfoRecoveryNicName", v.TfoRecoveryNicName) - populate(objectMap, "tfoRecoveryNicResourceGroupName", v.TfoRecoveryNicResourceGroupName) - populate(objectMap, "tfoReuseExistingNic", v.TfoReuseExistingNic) - populate(objectMap, "tfoVMNetworkId", v.TfoVMNetworkID) - populate(objectMap, "vMNetworkName", v.VMNetworkName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMNicDetails. -func (v *VMNicDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enableAcceleratedNetworkingOnRecovery": - err = unpopulate(val, "EnableAcceleratedNetworkingOnRecovery", &v.EnableAcceleratedNetworkingOnRecovery) - delete(rawMsg, key) - case "enableAcceleratedNetworkingOnTfo": - err = unpopulate(val, "EnableAcceleratedNetworkingOnTfo", &v.EnableAcceleratedNetworkingOnTfo) - delete(rawMsg, key) - case "ipConfigs": - err = unpopulate(val, "IPConfigs", &v.IPConfigs) - delete(rawMsg, key) - case "nicId": - err = unpopulate(val, "NicID", &v.NicID) - delete(rawMsg, key) - case "recoveryNetworkSecurityGroupId": - err = unpopulate(val, "RecoveryNetworkSecurityGroupID", &v.RecoveryNetworkSecurityGroupID) - delete(rawMsg, key) - case "recoveryNicName": - err = unpopulate(val, "RecoveryNicName", &v.RecoveryNicName) - delete(rawMsg, key) - case "recoveryNicResourceGroupName": - err = unpopulate(val, "RecoveryNicResourceGroupName", &v.RecoveryNicResourceGroupName) - delete(rawMsg, key) - case "recoveryVMNetworkId": - err = unpopulate(val, "RecoveryVMNetworkID", &v.RecoveryVMNetworkID) - delete(rawMsg, key) - case "replicaNicId": - err = unpopulate(val, "ReplicaNicID", &v.ReplicaNicID) - delete(rawMsg, key) - case "reuseExistingNic": - err = unpopulate(val, "ReuseExistingNic", &v.ReuseExistingNic) - delete(rawMsg, key) - case "selectionType": - err = unpopulate(val, "SelectionType", &v.SelectionType) - delete(rawMsg, key) - case "sourceNicArmId": - err = unpopulate(val, "SourceNicArmID", &v.SourceNicArmID) - delete(rawMsg, key) - case "targetNicName": - err = unpopulate(val, "TargetNicName", &v.TargetNicName) - delete(rawMsg, key) - case "tfoNetworkSecurityGroupId": - err = unpopulate(val, "TfoNetworkSecurityGroupID", &v.TfoNetworkSecurityGroupID) - delete(rawMsg, key) - case "tfoRecoveryNicName": - err = unpopulate(val, "TfoRecoveryNicName", &v.TfoRecoveryNicName) - delete(rawMsg, key) - case "tfoRecoveryNicResourceGroupName": - err = unpopulate(val, "TfoRecoveryNicResourceGroupName", &v.TfoRecoveryNicResourceGroupName) - delete(rawMsg, key) - case "tfoReuseExistingNic": - err = unpopulate(val, "TfoReuseExistingNic", &v.TfoReuseExistingNic) - delete(rawMsg, key) - case "tfoVMNetworkId": - err = unpopulate(val, "TfoVMNetworkID", &v.TfoVMNetworkID) - delete(rawMsg, key) - case "vMNetworkName": - err = unpopulate(val, "VMNetworkName", &v.VMNetworkName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMNicInputDetails. -func (v VMNicInputDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enableAcceleratedNetworkingOnRecovery", v.EnableAcceleratedNetworkingOnRecovery) - populate(objectMap, "enableAcceleratedNetworkingOnTfo", v.EnableAcceleratedNetworkingOnTfo) - populate(objectMap, "ipConfigs", v.IPConfigs) - populate(objectMap, "nicId", v.NicID) - populate(objectMap, "recoveryNetworkSecurityGroupId", v.RecoveryNetworkSecurityGroupID) - populate(objectMap, "recoveryNicName", v.RecoveryNicName) - populate(objectMap, "recoveryNicResourceGroupName", v.RecoveryNicResourceGroupName) - populate(objectMap, "reuseExistingNic", v.ReuseExistingNic) - populate(objectMap, "selectionType", v.SelectionType) - populate(objectMap, "targetNicName", v.TargetNicName) - populate(objectMap, "tfoNetworkSecurityGroupId", v.TfoNetworkSecurityGroupID) - populate(objectMap, "tfoNicName", v.TfoNicName) - populate(objectMap, "tfoNicResourceGroupName", v.TfoNicResourceGroupName) - populate(objectMap, "tfoReuseExistingNic", v.TfoReuseExistingNic) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMNicInputDetails. -func (v *VMNicInputDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enableAcceleratedNetworkingOnRecovery": - err = unpopulate(val, "EnableAcceleratedNetworkingOnRecovery", &v.EnableAcceleratedNetworkingOnRecovery) - delete(rawMsg, key) - case "enableAcceleratedNetworkingOnTfo": - err = unpopulate(val, "EnableAcceleratedNetworkingOnTfo", &v.EnableAcceleratedNetworkingOnTfo) - delete(rawMsg, key) - case "ipConfigs": - err = unpopulate(val, "IPConfigs", &v.IPConfigs) - delete(rawMsg, key) - case "nicId": - err = unpopulate(val, "NicID", &v.NicID) - delete(rawMsg, key) - case "recoveryNetworkSecurityGroupId": - err = unpopulate(val, "RecoveryNetworkSecurityGroupID", &v.RecoveryNetworkSecurityGroupID) - delete(rawMsg, key) - case "recoveryNicName": - err = unpopulate(val, "RecoveryNicName", &v.RecoveryNicName) - delete(rawMsg, key) - case "recoveryNicResourceGroupName": - err = unpopulate(val, "RecoveryNicResourceGroupName", &v.RecoveryNicResourceGroupName) - delete(rawMsg, key) - case "reuseExistingNic": - err = unpopulate(val, "ReuseExistingNic", &v.ReuseExistingNic) - delete(rawMsg, key) - case "selectionType": - err = unpopulate(val, "SelectionType", &v.SelectionType) - delete(rawMsg, key) - case "targetNicName": - err = unpopulate(val, "TargetNicName", &v.TargetNicName) - delete(rawMsg, key) - case "tfoNetworkSecurityGroupId": - err = unpopulate(val, "TfoNetworkSecurityGroupID", &v.TfoNetworkSecurityGroupID) - delete(rawMsg, key) - case "tfoNicName": - err = unpopulate(val, "TfoNicName", &v.TfoNicName) - delete(rawMsg, key) - case "tfoNicResourceGroupName": - err = unpopulate(val, "TfoNicResourceGroupName", &v.TfoNicResourceGroupName) - delete(rawMsg, key) - case "tfoReuseExistingNic": - err = unpopulate(val, "TfoReuseExistingNic", &v.TfoReuseExistingNic) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMNicUpdatesTaskDetails. -func (v VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VmNicUpdatesTaskDetails" - populate(objectMap, "name", v.Name) - populate(objectMap, "nicId", v.NicID) - populate(objectMap, "vmId", v.VMID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMNicUpdatesTaskDetails. -func (v *VMNicUpdatesTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "nicId": - err = unpopulate(val, "NicID", &v.NicID) - delete(rawMsg, key) - case "vmId": - err = unpopulate(val, "VMID", &v.VMID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtContainerCreationInput. -func (v VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMwareCbt" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtContainerCreationInput. -func (v *VMwareCbtContainerCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtContainerMappingInput. -func (v VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "keyVaultId", v.KeyVaultID) - populate(objectMap, "keyVaultUri", v.KeyVaultURI) - populate(objectMap, "serviceBusConnectionStringSecretName", v.ServiceBusConnectionStringSecretName) - populate(objectMap, "storageAccountId", v.StorageAccountID) - populate(objectMap, "storageAccountSasSecretName", v.StorageAccountSasSecretName) - populate(objectMap, "targetLocation", v.TargetLocation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtContainerMappingInput. -func (v *VMwareCbtContainerMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "keyVaultId": - err = unpopulate(val, "KeyVaultID", &v.KeyVaultID) - delete(rawMsg, key) - case "keyVaultUri": - err = unpopulate(val, "KeyVaultURI", &v.KeyVaultURI) - delete(rawMsg, key) - case "serviceBusConnectionStringSecretName": - err = unpopulate(val, "ServiceBusConnectionStringSecretName", &v.ServiceBusConnectionStringSecretName) - delete(rawMsg, key) - case "storageAccountId": - err = unpopulate(val, "StorageAccountID", &v.StorageAccountID) - delete(rawMsg, key) - case "storageAccountSasSecretName": - err = unpopulate(val, "StorageAccountSasSecretName", &v.StorageAccountSasSecretName) - delete(rawMsg, key) - case "targetLocation": - err = unpopulate(val, "TargetLocation", &v.TargetLocation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtDiskInput. -func (v VMwareCbtDiskInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskEncryptionSetId", v.DiskEncryptionSetID) - populate(objectMap, "diskId", v.DiskID) - populate(objectMap, "diskType", v.DiskType) - populate(objectMap, "isOSDisk", v.IsOSDisk) - populate(objectMap, "logStorageAccountId", v.LogStorageAccountID) - populate(objectMap, "logStorageAccountSasSecretName", v.LogStorageAccountSasSecretName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtDiskInput. -func (v *VMwareCbtDiskInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &v.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &v.DiskID) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &v.DiskType) - delete(rawMsg, key) - case "isOSDisk": - err = unpopulate(val, "IsOSDisk", &v.IsOSDisk) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &v.LogStorageAccountID) - delete(rawMsg, key) - case "logStorageAccountSasSecretName": - err = unpopulate(val, "LogStorageAccountSasSecretName", &v.LogStorageAccountSasSecretName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtEnableMigrationInput. -func (v VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataMoverRunAsAccountId", v.DataMoverRunAsAccountID) - populate(objectMap, "disksToInclude", v.DisksToInclude) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "licenseType", v.LicenseType) - populate(objectMap, "performAutoResync", v.PerformAutoResync) - populate(objectMap, "performSqlBulkRegistration", v.PerformSQLBulkRegistration) - populate(objectMap, "sqlServerLicenseType", v.SQLServerLicenseType) - populate(objectMap, "seedDiskTags", v.SeedDiskTags) - populate(objectMap, "snapshotRunAsAccountId", v.SnapshotRunAsAccountID) - populate(objectMap, "targetAvailabilitySetId", v.TargetAvailabilitySetID) - populate(objectMap, "targetAvailabilityZone", v.TargetAvailabilityZone) - populate(objectMap, "targetBootDiagnosticsStorageAccountId", v.TargetBootDiagnosticsStorageAccountID) - populate(objectMap, "targetDiskTags", v.TargetDiskTags) - populate(objectMap, "targetNetworkId", v.TargetNetworkID) - populate(objectMap, "targetNicTags", v.TargetNicTags) - populate(objectMap, "targetProximityPlacementGroupId", v.TargetProximityPlacementGroupID) - populate(objectMap, "targetResourceGroupId", v.TargetResourceGroupID) - populate(objectMap, "targetSubnetName", v.TargetSubnetName) - populate(objectMap, "targetVmName", v.TargetVMName) - populate(objectMap, "targetVmSize", v.TargetVMSize) - populate(objectMap, "targetVmTags", v.TargetVMTags) - populate(objectMap, "testNetworkId", v.TestNetworkID) - populate(objectMap, "testSubnetName", v.TestSubnetName) - populate(objectMap, "vmwareMachineId", v.VmwareMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtEnableMigrationInput. -func (v *VMwareCbtEnableMigrationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataMoverRunAsAccountId": - err = unpopulate(val, "DataMoverRunAsAccountID", &v.DataMoverRunAsAccountID) - delete(rawMsg, key) - case "disksToInclude": - err = unpopulate(val, "DisksToInclude", &v.DisksToInclude) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &v.LicenseType) - delete(rawMsg, key) - case "performAutoResync": - err = unpopulate(val, "PerformAutoResync", &v.PerformAutoResync) - delete(rawMsg, key) - case "performSqlBulkRegistration": - err = unpopulate(val, "PerformSQLBulkRegistration", &v.PerformSQLBulkRegistration) - delete(rawMsg, key) - case "sqlServerLicenseType": - err = unpopulate(val, "SQLServerLicenseType", &v.SQLServerLicenseType) - delete(rawMsg, key) - case "seedDiskTags": - err = unpopulate(val, "SeedDiskTags", &v.SeedDiskTags) - delete(rawMsg, key) - case "snapshotRunAsAccountId": - err = unpopulate(val, "SnapshotRunAsAccountID", &v.SnapshotRunAsAccountID) - delete(rawMsg, key) - case "targetAvailabilitySetId": - err = unpopulate(val, "TargetAvailabilitySetID", &v.TargetAvailabilitySetID) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &v.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetBootDiagnosticsStorageAccountId": - err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &v.TargetBootDiagnosticsStorageAccountID) - delete(rawMsg, key) - case "targetDiskTags": - err = unpopulate(val, "TargetDiskTags", &v.TargetDiskTags) - delete(rawMsg, key) - case "targetNetworkId": - err = unpopulate(val, "TargetNetworkID", &v.TargetNetworkID) - delete(rawMsg, key) - case "targetNicTags": - err = unpopulate(val, "TargetNicTags", &v.TargetNicTags) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &v.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetResourceGroupId": - err = unpopulate(val, "TargetResourceGroupID", &v.TargetResourceGroupID) - delete(rawMsg, key) - case "targetSubnetName": - err = unpopulate(val, "TargetSubnetName", &v.TargetSubnetName) - delete(rawMsg, key) - case "targetVmName": - err = unpopulate(val, "TargetVMName", &v.TargetVMName) - delete(rawMsg, key) - case "targetVmSize": - err = unpopulate(val, "TargetVMSize", &v.TargetVMSize) - delete(rawMsg, key) - case "targetVmTags": - err = unpopulate(val, "TargetVMTags", &v.TargetVMTags) - delete(rawMsg, key) - case "testNetworkId": - err = unpopulate(val, "TestNetworkID", &v.TestNetworkID) - delete(rawMsg, key) - case "testSubnetName": - err = unpopulate(val, "TestSubnetName", &v.TestSubnetName) - delete(rawMsg, key) - case "vmwareMachineId": - err = unpopulate(val, "VmwareMachineID", &v.VmwareMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtEventDetails. -func (v VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "migrationItemName", v.MigrationItemName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtEventDetails. -func (v *VMwareCbtEventDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "migrationItemName": - err = unpopulate(val, "MigrationItemName", &v.MigrationItemName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtMigrateInput. -func (v VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "performShutdown", v.PerformShutdown) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtMigrateInput. -func (v *VMwareCbtMigrateInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "performShutdown": - err = unpopulate(val, "PerformShutdown", &v.PerformShutdown) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtMigrationDetails. -func (v VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataMoverRunAsAccountId", v.DataMoverRunAsAccountID) - populate(objectMap, "firmwareType", v.FirmwareType) - populate(objectMap, "initialSeedingProgressPercentage", v.InitialSeedingProgressPercentage) - populate(objectMap, "initialSeedingRetryCount", v.InitialSeedingRetryCount) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "lastRecoveryPointId", v.LastRecoveryPointID) - populateTimeRFC3339(objectMap, "lastRecoveryPointReceived", v.LastRecoveryPointReceived) - populate(objectMap, "licenseType", v.LicenseType) - populate(objectMap, "migrationProgressPercentage", v.MigrationProgressPercentage) - populate(objectMap, "migrationRecoveryPointId", v.MigrationRecoveryPointID) - populate(objectMap, "osType", v.OSType) - populate(objectMap, "performAutoResync", v.PerformAutoResync) - populate(objectMap, "protectedDisks", v.ProtectedDisks) - populate(objectMap, "resumeProgressPercentage", v.ResumeProgressPercentage) - populate(objectMap, "resumeRetryCount", v.ResumeRetryCount) - populate(objectMap, "resyncProgressPercentage", v.ResyncProgressPercentage) - populate(objectMap, "resyncRequired", v.ResyncRequired) - populate(objectMap, "resyncRetryCount", v.ResyncRetryCount) - populate(objectMap, "resyncState", v.ResyncState) - populate(objectMap, "sqlServerLicenseType", v.SQLServerLicenseType) - populate(objectMap, "seedDiskTags", v.SeedDiskTags) - populate(objectMap, "snapshotRunAsAccountId", v.SnapshotRunAsAccountID) - populate(objectMap, "storageAccountId", v.StorageAccountID) - populate(objectMap, "targetAvailabilitySetId", v.TargetAvailabilitySetID) - populate(objectMap, "targetAvailabilityZone", v.TargetAvailabilityZone) - populate(objectMap, "targetBootDiagnosticsStorageAccountId", v.TargetBootDiagnosticsStorageAccountID) - populate(objectMap, "targetDiskTags", v.TargetDiskTags) - populate(objectMap, "targetGeneration", v.TargetGeneration) - populate(objectMap, "targetLocation", v.TargetLocation) - populate(objectMap, "targetNetworkId", v.TargetNetworkID) - populate(objectMap, "targetNicTags", v.TargetNicTags) - populate(objectMap, "targetProximityPlacementGroupId", v.TargetProximityPlacementGroupID) - populate(objectMap, "targetResourceGroupId", v.TargetResourceGroupID) - populate(objectMap, "targetVmName", v.TargetVMName) - populate(objectMap, "targetVmSize", v.TargetVMSize) - populate(objectMap, "targetVmTags", v.TargetVMTags) - populate(objectMap, "testNetworkId", v.TestNetworkID) - populate(objectMap, "vmNics", v.VMNics) - populate(objectMap, "vmwareMachineId", v.VmwareMachineID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtMigrationDetails. -func (v *VMwareCbtMigrationDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataMoverRunAsAccountId": - err = unpopulate(val, "DataMoverRunAsAccountID", &v.DataMoverRunAsAccountID) - delete(rawMsg, key) - case "firmwareType": - err = unpopulate(val, "FirmwareType", &v.FirmwareType) - delete(rawMsg, key) - case "initialSeedingProgressPercentage": - err = unpopulate(val, "InitialSeedingProgressPercentage", &v.InitialSeedingProgressPercentage) - delete(rawMsg, key) - case "initialSeedingRetryCount": - err = unpopulate(val, "InitialSeedingRetryCount", &v.InitialSeedingRetryCount) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "lastRecoveryPointId": - err = unpopulate(val, "LastRecoveryPointID", &v.LastRecoveryPointID) - delete(rawMsg, key) - case "lastRecoveryPointReceived": - err = unpopulateTimeRFC3339(val, "LastRecoveryPointReceived", &v.LastRecoveryPointReceived) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &v.LicenseType) - delete(rawMsg, key) - case "migrationProgressPercentage": - err = unpopulate(val, "MigrationProgressPercentage", &v.MigrationProgressPercentage) - delete(rawMsg, key) - case "migrationRecoveryPointId": - err = unpopulate(val, "MigrationRecoveryPointID", &v.MigrationRecoveryPointID) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &v.OSType) - delete(rawMsg, key) - case "performAutoResync": - err = unpopulate(val, "PerformAutoResync", &v.PerformAutoResync) - delete(rawMsg, key) - case "protectedDisks": - err = unpopulate(val, "ProtectedDisks", &v.ProtectedDisks) - delete(rawMsg, key) - case "resumeProgressPercentage": - err = unpopulate(val, "ResumeProgressPercentage", &v.ResumeProgressPercentage) - delete(rawMsg, key) - case "resumeRetryCount": - err = unpopulate(val, "ResumeRetryCount", &v.ResumeRetryCount) - delete(rawMsg, key) - case "resyncProgressPercentage": - err = unpopulate(val, "ResyncProgressPercentage", &v.ResyncProgressPercentage) - delete(rawMsg, key) - case "resyncRequired": - err = unpopulate(val, "ResyncRequired", &v.ResyncRequired) - delete(rawMsg, key) - case "resyncRetryCount": - err = unpopulate(val, "ResyncRetryCount", &v.ResyncRetryCount) - delete(rawMsg, key) - case "resyncState": - err = unpopulate(val, "ResyncState", &v.ResyncState) - delete(rawMsg, key) - case "sqlServerLicenseType": - err = unpopulate(val, "SQLServerLicenseType", &v.SQLServerLicenseType) - delete(rawMsg, key) - case "seedDiskTags": - err = unpopulate(val, "SeedDiskTags", &v.SeedDiskTags) - delete(rawMsg, key) - case "snapshotRunAsAccountId": - err = unpopulate(val, "SnapshotRunAsAccountID", &v.SnapshotRunAsAccountID) - delete(rawMsg, key) - case "storageAccountId": - err = unpopulate(val, "StorageAccountID", &v.StorageAccountID) - delete(rawMsg, key) - case "targetAvailabilitySetId": - err = unpopulate(val, "TargetAvailabilitySetID", &v.TargetAvailabilitySetID) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &v.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetBootDiagnosticsStorageAccountId": - err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &v.TargetBootDiagnosticsStorageAccountID) - delete(rawMsg, key) - case "targetDiskTags": - err = unpopulate(val, "TargetDiskTags", &v.TargetDiskTags) - delete(rawMsg, key) - case "targetGeneration": - err = unpopulate(val, "TargetGeneration", &v.TargetGeneration) - delete(rawMsg, key) - case "targetLocation": - err = unpopulate(val, "TargetLocation", &v.TargetLocation) - delete(rawMsg, key) - case "targetNetworkId": - err = unpopulate(val, "TargetNetworkID", &v.TargetNetworkID) - delete(rawMsg, key) - case "targetNicTags": - err = unpopulate(val, "TargetNicTags", &v.TargetNicTags) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &v.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetResourceGroupId": - err = unpopulate(val, "TargetResourceGroupID", &v.TargetResourceGroupID) - delete(rawMsg, key) - case "targetVmName": - err = unpopulate(val, "TargetVMName", &v.TargetVMName) - delete(rawMsg, key) - case "targetVmSize": - err = unpopulate(val, "TargetVMSize", &v.TargetVMSize) - delete(rawMsg, key) - case "targetVmTags": - err = unpopulate(val, "TargetVMTags", &v.TargetVMTags) - delete(rawMsg, key) - case "testNetworkId": - err = unpopulate(val, "TestNetworkID", &v.TestNetworkID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &v.VMNics) - delete(rawMsg, key) - case "vmwareMachineId": - err = unpopulate(val, "VmwareMachineID", &v.VmwareMachineID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtNicDetails. -func (v VMwareCbtNicDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isPrimaryNic", v.IsPrimaryNic) - populate(objectMap, "isSelectedForMigration", v.IsSelectedForMigration) - populate(objectMap, "nicId", v.NicID) - populate(objectMap, "sourceIPAddress", v.SourceIPAddress) - populate(objectMap, "sourceIPAddressType", v.SourceIPAddressType) - populate(objectMap, "sourceNetworkId", v.SourceNetworkID) - populate(objectMap, "targetIPAddress", v.TargetIPAddress) - populate(objectMap, "targetIPAddressType", v.TargetIPAddressType) - populate(objectMap, "targetNicName", v.TargetNicName) - populate(objectMap, "targetSubnetName", v.TargetSubnetName) - populate(objectMap, "testIPAddress", v.TestIPAddress) - populate(objectMap, "testIPAddressType", v.TestIPAddressType) - populate(objectMap, "testNetworkId", v.TestNetworkID) - populate(objectMap, "testSubnetName", v.TestSubnetName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtNicDetails. -func (v *VMwareCbtNicDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isPrimaryNic": - err = unpopulate(val, "IsPrimaryNic", &v.IsPrimaryNic) - delete(rawMsg, key) - case "isSelectedForMigration": - err = unpopulate(val, "IsSelectedForMigration", &v.IsSelectedForMigration) - delete(rawMsg, key) - case "nicId": - err = unpopulate(val, "NicID", &v.NicID) - delete(rawMsg, key) - case "sourceIPAddress": - err = unpopulate(val, "SourceIPAddress", &v.SourceIPAddress) - delete(rawMsg, key) - case "sourceIPAddressType": - err = unpopulate(val, "SourceIPAddressType", &v.SourceIPAddressType) - delete(rawMsg, key) - case "sourceNetworkId": - err = unpopulate(val, "SourceNetworkID", &v.SourceNetworkID) - delete(rawMsg, key) - case "targetIPAddress": - err = unpopulate(val, "TargetIPAddress", &v.TargetIPAddress) - delete(rawMsg, key) - case "targetIPAddressType": - err = unpopulate(val, "TargetIPAddressType", &v.TargetIPAddressType) - delete(rawMsg, key) - case "targetNicName": - err = unpopulate(val, "TargetNicName", &v.TargetNicName) - delete(rawMsg, key) - case "targetSubnetName": - err = unpopulate(val, "TargetSubnetName", &v.TargetSubnetName) - delete(rawMsg, key) - case "testIPAddress": - err = unpopulate(val, "TestIPAddress", &v.TestIPAddress) - delete(rawMsg, key) - case "testIPAddressType": - err = unpopulate(val, "TestIPAddressType", &v.TestIPAddressType) - delete(rawMsg, key) - case "testNetworkId": - err = unpopulate(val, "TestNetworkID", &v.TestNetworkID) - delete(rawMsg, key) - case "testSubnetName": - err = unpopulate(val, "TestSubnetName", &v.TestSubnetName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtNicInput. -func (v VMwareCbtNicInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "isPrimaryNic", v.IsPrimaryNic) - populate(objectMap, "isSelectedForMigration", v.IsSelectedForMigration) - populate(objectMap, "nicId", v.NicID) - populate(objectMap, "targetNicName", v.TargetNicName) - populate(objectMap, "targetStaticIPAddress", v.TargetStaticIPAddress) - populate(objectMap, "targetSubnetName", v.TargetSubnetName) - populate(objectMap, "testStaticIPAddress", v.TestStaticIPAddress) - populate(objectMap, "testSubnetName", v.TestSubnetName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtNicInput. -func (v *VMwareCbtNicInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isPrimaryNic": - err = unpopulate(val, "IsPrimaryNic", &v.IsPrimaryNic) - delete(rawMsg, key) - case "isSelectedForMigration": - err = unpopulate(val, "IsSelectedForMigration", &v.IsSelectedForMigration) - delete(rawMsg, key) - case "nicId": - err = unpopulate(val, "NicID", &v.NicID) - delete(rawMsg, key) - case "targetNicName": - err = unpopulate(val, "TargetNicName", &v.TargetNicName) - delete(rawMsg, key) - case "targetStaticIPAddress": - err = unpopulate(val, "TargetStaticIPAddress", &v.TargetStaticIPAddress) - delete(rawMsg, key) - case "targetSubnetName": - err = unpopulate(val, "TargetSubnetName", &v.TargetSubnetName) - delete(rawMsg, key) - case "testStaticIPAddress": - err = unpopulate(val, "TestStaticIPAddress", &v.TestStaticIPAddress) - delete(rawMsg, key) - case "testSubnetName": - err = unpopulate(val, "TestSubnetName", &v.TestSubnetName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtPolicyCreationInput. -func (v VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", v.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", v.CrashConsistentFrequencyInMinutes) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "recoveryPointHistoryInMinutes", v.RecoveryPointHistoryInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtPolicyCreationInput. -func (v *VMwareCbtPolicyCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &v.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &v.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "recoveryPointHistoryInMinutes": - err = unpopulate(val, "RecoveryPointHistoryInMinutes", &v.RecoveryPointHistoryInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtProtectedDiskDetails. -func (v VMwareCbtProtectedDiskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "capacityInBytes", v.CapacityInBytes) - populate(objectMap, "diskEncryptionSetId", v.DiskEncryptionSetID) - populate(objectMap, "diskId", v.DiskID) - populate(objectMap, "diskName", v.DiskName) - populate(objectMap, "diskPath", v.DiskPath) - populate(objectMap, "diskType", v.DiskType) - populate(objectMap, "isOSDisk", v.IsOSDisk) - populate(objectMap, "logStorageAccountId", v.LogStorageAccountID) - populate(objectMap, "logStorageAccountSasSecretName", v.LogStorageAccountSasSecretName) - populate(objectMap, "seedBlobUri", v.SeedBlobURI) - populate(objectMap, "seedManagedDiskId", v.SeedManagedDiskID) - populate(objectMap, "targetBlobUri", v.TargetBlobURI) - populate(objectMap, "targetDiskName", v.TargetDiskName) - populate(objectMap, "targetManagedDiskId", v.TargetManagedDiskID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtProtectedDiskDetails. -func (v *VMwareCbtProtectedDiskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "capacityInBytes": - err = unpopulate(val, "CapacityInBytes", &v.CapacityInBytes) - delete(rawMsg, key) - case "diskEncryptionSetId": - err = unpopulate(val, "DiskEncryptionSetID", &v.DiskEncryptionSetID) - delete(rawMsg, key) - case "diskId": - err = unpopulate(val, "DiskID", &v.DiskID) - delete(rawMsg, key) - case "diskName": - err = unpopulate(val, "DiskName", &v.DiskName) - delete(rawMsg, key) - case "diskPath": - err = unpopulate(val, "DiskPath", &v.DiskPath) - delete(rawMsg, key) - case "diskType": - err = unpopulate(val, "DiskType", &v.DiskType) - delete(rawMsg, key) - case "isOSDisk": - err = unpopulate(val, "IsOSDisk", &v.IsOSDisk) - delete(rawMsg, key) - case "logStorageAccountId": - err = unpopulate(val, "LogStorageAccountID", &v.LogStorageAccountID) - delete(rawMsg, key) - case "logStorageAccountSasSecretName": - err = unpopulate(val, "LogStorageAccountSasSecretName", &v.LogStorageAccountSasSecretName) - delete(rawMsg, key) - case "seedBlobUri": - err = unpopulate(val, "SeedBlobURI", &v.SeedBlobURI) - delete(rawMsg, key) - case "seedManagedDiskId": - err = unpopulate(val, "SeedManagedDiskID", &v.SeedManagedDiskID) - delete(rawMsg, key) - case "targetBlobUri": - err = unpopulate(val, "TargetBlobURI", &v.TargetBlobURI) - delete(rawMsg, key) - case "targetDiskName": - err = unpopulate(val, "TargetDiskName", &v.TargetDiskName) - delete(rawMsg, key) - case "targetManagedDiskId": - err = unpopulate(val, "TargetManagedDiskID", &v.TargetManagedDiskID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtProtectionContainerMappingDetails. -func (v VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "keyVaultId", v.KeyVaultID) - populate(objectMap, "keyVaultUri", v.KeyVaultURI) - populate(objectMap, "roleSizeToNicCountMap", v.RoleSizeToNicCountMap) - populate(objectMap, "serviceBusConnectionStringSecretName", v.ServiceBusConnectionStringSecretName) - populate(objectMap, "storageAccountId", v.StorageAccountID) - populate(objectMap, "storageAccountSasSecretName", v.StorageAccountSasSecretName) - populate(objectMap, "targetLocation", v.TargetLocation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtProtectionContainerMappingDetails. -func (v *VMwareCbtProtectionContainerMappingDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "keyVaultId": - err = unpopulate(val, "KeyVaultID", &v.KeyVaultID) - delete(rawMsg, key) - case "keyVaultUri": - err = unpopulate(val, "KeyVaultURI", &v.KeyVaultURI) - delete(rawMsg, key) - case "roleSizeToNicCountMap": - err = unpopulate(val, "RoleSizeToNicCountMap", &v.RoleSizeToNicCountMap) - delete(rawMsg, key) - case "serviceBusConnectionStringSecretName": - err = unpopulate(val, "ServiceBusConnectionStringSecretName", &v.ServiceBusConnectionStringSecretName) - delete(rawMsg, key) - case "storageAccountId": - err = unpopulate(val, "StorageAccountID", &v.StorageAccountID) - delete(rawMsg, key) - case "storageAccountSasSecretName": - err = unpopulate(val, "StorageAccountSasSecretName", &v.StorageAccountSasSecretName) - delete(rawMsg, key) - case "targetLocation": - err = unpopulate(val, "TargetLocation", &v.TargetLocation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtResumeReplicationInput. -func (v VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "deleteMigrationResources", v.DeleteMigrationResources) - objectMap["instanceType"] = "VMwareCbt" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtResumeReplicationInput. -func (v *VMwareCbtResumeReplicationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "deleteMigrationResources": - err = unpopulate(val, "DeleteMigrationResources", &v.DeleteMigrationResources) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtResyncInput. -func (v VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "skipCbtReset", v.SkipCbtReset) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtResyncInput. -func (v *VMwareCbtResyncInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "skipCbtReset": - err = unpopulate(val, "SkipCbtReset", &v.SkipCbtReset) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtTestMigrateInput. -func (v VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "networkId", v.NetworkID) - populate(objectMap, "recoveryPointId", v.RecoveryPointID) - populate(objectMap, "vmNics", v.VMNics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtTestMigrateInput. -func (v *VMwareCbtTestMigrateInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "networkId": - err = unpopulate(val, "NetworkID", &v.NetworkID) - delete(rawMsg, key) - case "recoveryPointId": - err = unpopulate(val, "RecoveryPointID", &v.RecoveryPointID) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &v.VMNics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtUpdateDiskInput. -func (v VMwareCbtUpdateDiskInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskId", v.DiskID) - populate(objectMap, "isOSDisk", v.IsOSDisk) - populate(objectMap, "targetDiskName", v.TargetDiskName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtUpdateDiskInput. -func (v *VMwareCbtUpdateDiskInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskId": - err = unpopulate(val, "DiskID", &v.DiskID) - delete(rawMsg, key) - case "isOSDisk": - err = unpopulate(val, "IsOSDisk", &v.IsOSDisk) - delete(rawMsg, key) - case "targetDiskName": - err = unpopulate(val, "TargetDiskName", &v.TargetDiskName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareCbtUpdateMigrationItemInput. -func (v VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "licenseType", v.LicenseType) - populate(objectMap, "performAutoResync", v.PerformAutoResync) - populate(objectMap, "sqlServerLicenseType", v.SQLServerLicenseType) - populate(objectMap, "targetAvailabilitySetId", v.TargetAvailabilitySetID) - populate(objectMap, "targetAvailabilityZone", v.TargetAvailabilityZone) - populate(objectMap, "targetBootDiagnosticsStorageAccountId", v.TargetBootDiagnosticsStorageAccountID) - populate(objectMap, "targetDiskTags", v.TargetDiskTags) - populate(objectMap, "targetNetworkId", v.TargetNetworkID) - populate(objectMap, "targetNicTags", v.TargetNicTags) - populate(objectMap, "targetProximityPlacementGroupId", v.TargetProximityPlacementGroupID) - populate(objectMap, "targetResourceGroupId", v.TargetResourceGroupID) - populate(objectMap, "targetVmName", v.TargetVMName) - populate(objectMap, "targetVmSize", v.TargetVMSize) - populate(objectMap, "targetVmTags", v.TargetVMTags) - populate(objectMap, "testNetworkId", v.TestNetworkID) - populate(objectMap, "vmDisks", v.VMDisks) - populate(objectMap, "vmNics", v.VMNics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtUpdateMigrationItemInput. -func (v *VMwareCbtUpdateMigrationItemInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &v.LicenseType) - delete(rawMsg, key) - case "performAutoResync": - err = unpopulate(val, "PerformAutoResync", &v.PerformAutoResync) - delete(rawMsg, key) - case "sqlServerLicenseType": - err = unpopulate(val, "SQLServerLicenseType", &v.SQLServerLicenseType) - delete(rawMsg, key) - case "targetAvailabilitySetId": - err = unpopulate(val, "TargetAvailabilitySetID", &v.TargetAvailabilitySetID) - delete(rawMsg, key) - case "targetAvailabilityZone": - err = unpopulate(val, "TargetAvailabilityZone", &v.TargetAvailabilityZone) - delete(rawMsg, key) - case "targetBootDiagnosticsStorageAccountId": - err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &v.TargetBootDiagnosticsStorageAccountID) - delete(rawMsg, key) - case "targetDiskTags": - err = unpopulate(val, "TargetDiskTags", &v.TargetDiskTags) - delete(rawMsg, key) - case "targetNetworkId": - err = unpopulate(val, "TargetNetworkID", &v.TargetNetworkID) - delete(rawMsg, key) - case "targetNicTags": - err = unpopulate(val, "TargetNicTags", &v.TargetNicTags) - delete(rawMsg, key) - case "targetProximityPlacementGroupId": - err = unpopulate(val, "TargetProximityPlacementGroupID", &v.TargetProximityPlacementGroupID) - delete(rawMsg, key) - case "targetResourceGroupId": - err = unpopulate(val, "TargetResourceGroupID", &v.TargetResourceGroupID) - delete(rawMsg, key) - case "targetVmName": - err = unpopulate(val, "TargetVMName", &v.TargetVMName) - delete(rawMsg, key) - case "targetVmSize": - err = unpopulate(val, "TargetVMSize", &v.TargetVMSize) - delete(rawMsg, key) - case "targetVmTags": - err = unpopulate(val, "TargetVMTags", &v.TargetVMTags) - delete(rawMsg, key) - case "testNetworkId": - err = unpopulate(val, "TestNetworkID", &v.TestNetworkID) - delete(rawMsg, key) - case "vmDisks": - err = unpopulate(val, "VMDisks", &v.VMDisks) - delete(rawMsg, key) - case "vmNics": - err = unpopulate(val, "VMNics", &v.VMNics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareDetails. -func (v VMwareDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentCount", v.AgentCount) - populateTimeRFC3339(objectMap, "agentExpiryDate", v.AgentExpiryDate) - populate(objectMap, "agentVersion", v.AgentVersion) - populate(objectMap, "agentVersionDetails", v.AgentVersionDetails) - populate(objectMap, "availableMemoryInBytes", v.AvailableMemoryInBytes) - populate(objectMap, "availableSpaceInBytes", v.AvailableSpaceInBytes) - populate(objectMap, "cpuLoad", v.CPULoad) - populate(objectMap, "cpuLoadStatus", v.CPULoadStatus) - populate(objectMap, "csServiceStatus", v.CsServiceStatus) - populate(objectMap, "databaseServerLoad", v.DatabaseServerLoad) - populate(objectMap, "databaseServerLoadStatus", v.DatabaseServerLoadStatus) - populate(objectMap, "hostName", v.HostName) - populate(objectMap, "ipAddress", v.IPAddress) - objectMap["instanceType"] = "VMware" - populateTimeRFC3339(objectMap, "lastHeartbeat", v.LastHeartbeat) - populate(objectMap, "masterTargetServers", v.MasterTargetServers) - populate(objectMap, "memoryUsageStatus", v.MemoryUsageStatus) - populate(objectMap, "processServerCount", v.ProcessServerCount) - populate(objectMap, "processServers", v.ProcessServers) - populate(objectMap, "protectedServers", v.ProtectedServers) - populate(objectMap, "psTemplateVersion", v.PsTemplateVersion) - populate(objectMap, "replicationPairCount", v.ReplicationPairCount) - populate(objectMap, "runAsAccounts", v.RunAsAccounts) - populateTimeRFC3339(objectMap, "sslCertExpiryDate", v.SSLCertExpiryDate) - populate(objectMap, "sslCertExpiryRemainingDays", v.SSLCertExpiryRemainingDays) - populate(objectMap, "spaceUsageStatus", v.SpaceUsageStatus) - populate(objectMap, "switchProviderBlockingErrorDetails", v.SwitchProviderBlockingErrorDetails) - populate(objectMap, "systemLoad", v.SystemLoad) - populate(objectMap, "systemLoadStatus", v.SystemLoadStatus) - populate(objectMap, "totalMemoryInBytes", v.TotalMemoryInBytes) - populate(objectMap, "totalSpaceInBytes", v.TotalSpaceInBytes) - populate(objectMap, "versionStatus", v.VersionStatus) - populate(objectMap, "webLoad", v.WebLoad) - populate(objectMap, "webLoadStatus", v.WebLoadStatus) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareDetails. -func (v *VMwareDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentCount": - err = unpopulate(val, "AgentCount", &v.AgentCount) - delete(rawMsg, key) - case "agentExpiryDate": - err = unpopulateTimeRFC3339(val, "AgentExpiryDate", &v.AgentExpiryDate) - delete(rawMsg, key) - case "agentVersion": - err = unpopulate(val, "AgentVersion", &v.AgentVersion) - delete(rawMsg, key) - case "agentVersionDetails": - err = unpopulate(val, "AgentVersionDetails", &v.AgentVersionDetails) - delete(rawMsg, key) - case "availableMemoryInBytes": - err = unpopulate(val, "AvailableMemoryInBytes", &v.AvailableMemoryInBytes) - delete(rawMsg, key) - case "availableSpaceInBytes": - err = unpopulate(val, "AvailableSpaceInBytes", &v.AvailableSpaceInBytes) - delete(rawMsg, key) - case "cpuLoad": - err = unpopulate(val, "CPULoad", &v.CPULoad) - delete(rawMsg, key) - case "cpuLoadStatus": - err = unpopulate(val, "CPULoadStatus", &v.CPULoadStatus) - delete(rawMsg, key) - case "csServiceStatus": - err = unpopulate(val, "CsServiceStatus", &v.CsServiceStatus) - delete(rawMsg, key) - case "databaseServerLoad": - err = unpopulate(val, "DatabaseServerLoad", &v.DatabaseServerLoad) - delete(rawMsg, key) - case "databaseServerLoadStatus": - err = unpopulate(val, "DatabaseServerLoadStatus", &v.DatabaseServerLoadStatus) - delete(rawMsg, key) - case "hostName": - err = unpopulate(val, "HostName", &v.HostName) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &v.IPAddress) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "lastHeartbeat": - err = unpopulateTimeRFC3339(val, "LastHeartbeat", &v.LastHeartbeat) - delete(rawMsg, key) - case "masterTargetServers": - err = unpopulate(val, "MasterTargetServers", &v.MasterTargetServers) - delete(rawMsg, key) - case "memoryUsageStatus": - err = unpopulate(val, "MemoryUsageStatus", &v.MemoryUsageStatus) - delete(rawMsg, key) - case "processServerCount": - err = unpopulate(val, "ProcessServerCount", &v.ProcessServerCount) - delete(rawMsg, key) - case "processServers": - err = unpopulate(val, "ProcessServers", &v.ProcessServers) - delete(rawMsg, key) - case "protectedServers": - err = unpopulate(val, "ProtectedServers", &v.ProtectedServers) - delete(rawMsg, key) - case "psTemplateVersion": - err = unpopulate(val, "PsTemplateVersion", &v.PsTemplateVersion) - delete(rawMsg, key) - case "replicationPairCount": - err = unpopulate(val, "ReplicationPairCount", &v.ReplicationPairCount) - delete(rawMsg, key) - case "runAsAccounts": - err = unpopulate(val, "RunAsAccounts", &v.RunAsAccounts) - delete(rawMsg, key) - case "sslCertExpiryDate": - err = unpopulateTimeRFC3339(val, "SSLCertExpiryDate", &v.SSLCertExpiryDate) - delete(rawMsg, key) - case "sslCertExpiryRemainingDays": - err = unpopulate(val, "SSLCertExpiryRemainingDays", &v.SSLCertExpiryRemainingDays) - delete(rawMsg, key) - case "spaceUsageStatus": - err = unpopulate(val, "SpaceUsageStatus", &v.SpaceUsageStatus) - delete(rawMsg, key) - case "switchProviderBlockingErrorDetails": - err = unpopulate(val, "SwitchProviderBlockingErrorDetails", &v.SwitchProviderBlockingErrorDetails) - delete(rawMsg, key) - case "systemLoad": - err = unpopulate(val, "SystemLoad", &v.SystemLoad) - delete(rawMsg, key) - case "systemLoadStatus": - err = unpopulate(val, "SystemLoadStatus", &v.SystemLoadStatus) - delete(rawMsg, key) - case "totalMemoryInBytes": - err = unpopulate(val, "TotalMemoryInBytes", &v.TotalMemoryInBytes) - delete(rawMsg, key) - case "totalSpaceInBytes": - err = unpopulate(val, "TotalSpaceInBytes", &v.TotalSpaceInBytes) - delete(rawMsg, key) - case "versionStatus": - err = unpopulate(val, "VersionStatus", &v.VersionStatus) - delete(rawMsg, key) - case "webLoad": - err = unpopulate(val, "WebLoad", &v.WebLoad) - delete(rawMsg, key) - case "webLoadStatus": - err = unpopulate(val, "WebLoadStatus", &v.WebLoadStatus) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareV2FabricCreationInput. -func (v VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMwareV2" - populate(objectMap, "migrationSolutionId", v.MigrationSolutionID) - populate(objectMap, "physicalSiteId", v.PhysicalSiteID) - populate(objectMap, "vmwareSiteId", v.VmwareSiteID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareV2FabricCreationInput. -func (v *VMwareV2FabricCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "migrationSolutionId": - err = unpopulate(val, "MigrationSolutionID", &v.MigrationSolutionID) - delete(rawMsg, key) - case "physicalSiteId": - err = unpopulate(val, "PhysicalSiteID", &v.PhysicalSiteID) - delete(rawMsg, key) - case "vmwareSiteId": - err = unpopulate(val, "VmwareSiteID", &v.VmwareSiteID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareV2FabricSpecificDetails. -func (v VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMwareV2" - populate(objectMap, "migrationSolutionId", v.MigrationSolutionID) - populate(objectMap, "physicalSiteId", v.PhysicalSiteID) - populate(objectMap, "processServers", v.ProcessServers) - populate(objectMap, "serviceContainerId", v.ServiceContainerID) - populate(objectMap, "serviceEndpoint", v.ServiceEndpoint) - populate(objectMap, "serviceResourceId", v.ServiceResourceID) - populate(objectMap, "vmwareSiteId", v.VmwareSiteID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareV2FabricSpecificDetails. -func (v *VMwareV2FabricSpecificDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "migrationSolutionId": - err = unpopulate(val, "MigrationSolutionID", &v.MigrationSolutionID) - delete(rawMsg, key) - case "physicalSiteId": - err = unpopulate(val, "PhysicalSiteID", &v.PhysicalSiteID) - delete(rawMsg, key) - case "processServers": - err = unpopulate(val, "ProcessServers", &v.ProcessServers) - delete(rawMsg, key) - case "serviceContainerId": - err = unpopulate(val, "ServiceContainerID", &v.ServiceContainerID) - delete(rawMsg, key) - case "serviceEndpoint": - err = unpopulate(val, "ServiceEndpoint", &v.ServiceEndpoint) - delete(rawMsg, key) - case "serviceResourceId": - err = unpopulate(val, "ServiceResourceID", &v.ServiceResourceID) - delete(rawMsg, key) - case "vmwareSiteId": - err = unpopulate(val, "VmwareSiteID", &v.VmwareSiteID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VMwareVirtualMachineDetails. -func (v VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentGeneratedId", v.AgentGeneratedID) - populate(objectMap, "agentInstalled", v.AgentInstalled) - populate(objectMap, "agentVersion", v.AgentVersion) - populate(objectMap, "discoveryType", v.DiscoveryType) - populate(objectMap, "diskDetails", v.DiskDetails) - populate(objectMap, "ipAddress", v.IPAddress) - objectMap["instanceType"] = "VMwareVirtualMachine" - populate(objectMap, "osType", v.OSType) - populate(objectMap, "poweredOn", v.PoweredOn) - populate(objectMap, "vCenterInfrastructureId", v.VCenterInfrastructureID) - populate(objectMap, "validationErrors", v.ValidationErrors) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareVirtualMachineDetails. -func (v *VMwareVirtualMachineDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentGeneratedId": - err = unpopulate(val, "AgentGeneratedID", &v.AgentGeneratedID) - delete(rawMsg, key) - case "agentInstalled": - err = unpopulate(val, "AgentInstalled", &v.AgentInstalled) - delete(rawMsg, key) - case "agentVersion": - err = unpopulate(val, "AgentVersion", &v.AgentVersion) - delete(rawMsg, key) - case "discoveryType": - err = unpopulate(val, "DiscoveryType", &v.DiscoveryType) - delete(rawMsg, key) - case "diskDetails": - err = unpopulate(val, "DiskDetails", &v.DiskDetails) - delete(rawMsg, key) - case "ipAddress": - err = unpopulate(val, "IPAddress", &v.IPAddress) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &v.OSType) - delete(rawMsg, key) - case "poweredOn": - err = unpopulate(val, "PoweredOn", &v.PoweredOn) - delete(rawMsg, key) - case "vCenterInfrastructureId": - err = unpopulate(val, "VCenterInfrastructureID", &v.VCenterInfrastructureID) - delete(rawMsg, key) - case "validationErrors": - err = unpopulate(val, "ValidationErrors", &v.ValidationErrors) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VaultHealthDetails. -func (v VaultHealthDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VaultHealthDetails. -func (v *VaultHealthDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VaultHealthProperties. -func (v VaultHealthProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containersHealth", v.ContainersHealth) - populate(objectMap, "fabricsHealth", v.FabricsHealth) - populate(objectMap, "protectedItemsHealth", v.ProtectedItemsHealth) - populate(objectMap, "vaultErrors", v.VaultErrors) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VaultHealthProperties. -func (v *VaultHealthProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containersHealth": - err = unpopulate(val, "ContainersHealth", &v.ContainersHealth) - delete(rawMsg, key) - case "fabricsHealth": - err = unpopulate(val, "FabricsHealth", &v.FabricsHealth) - delete(rawMsg, key) - case "protectedItemsHealth": - err = unpopulate(val, "ProtectedItemsHealth", &v.ProtectedItemsHealth) - delete(rawMsg, key) - case "vaultErrors": - err = unpopulate(val, "VaultErrors", &v.VaultErrors) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VaultSetting. -func (v VaultSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSetting. -func (v *VaultSetting) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &v.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &v.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &v.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &v.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VaultSettingCollection. -func (v VaultSettingCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSettingCollection. -func (v *VaultSettingCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &v.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &v.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VaultSettingCreationInput. -func (v VaultSettingCreationInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", v.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSettingCreationInput. -func (v *VaultSettingCreationInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VaultSettingCreationInputProperties. -func (v VaultSettingCreationInputProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "migrationSolutionId", v.MigrationSolutionID) - populate(objectMap, "vmwareToAzureProviderType", v.VmwareToAzureProviderType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSettingCreationInputProperties. -func (v *VaultSettingCreationInputProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "migrationSolutionId": - err = unpopulate(val, "MigrationSolutionID", &v.MigrationSolutionID) - delete(rawMsg, key) - case "vmwareToAzureProviderType": - err = unpopulate(val, "VmwareToAzureProviderType", &v.VmwareToAzureProviderType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VaultSettingProperties. -func (v VaultSettingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "migrationSolutionId", v.MigrationSolutionID) - populate(objectMap, "vmwareToAzureProviderType", v.VmwareToAzureProviderType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSettingProperties. -func (v *VaultSettingProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "migrationSolutionId": - err = unpopulate(val, "MigrationSolutionID", &v.MigrationSolutionID) - delete(rawMsg, key) - case "vmwareToAzureProviderType": - err = unpopulate(val, "VmwareToAzureProviderType", &v.VmwareToAzureProviderType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VersionDetails. -func (v VersionDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "expiryDate", v.ExpiryDate) - populate(objectMap, "status", v.Status) - populate(objectMap, "version", v.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VersionDetails. -func (v *VersionDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "expiryDate": - err = unpopulateTimeRFC3339(val, "ExpiryDate", &v.ExpiryDate) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &v.Status) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &v.Version) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualMachineTaskDetails. -func (v VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VirtualMachineTaskDetails" - populate(objectMap, "jobTask", v.JobTask) - populate(objectMap, "skippedReason", v.SkippedReason) - populate(objectMap, "skippedReasonString", v.SkippedReasonString) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTaskDetails. -func (v *VirtualMachineTaskDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "jobTask": - err = unpopulate(val, "JobTask", &v.JobTask) - delete(rawMsg, key) - case "skippedReason": - err = unpopulate(val, "SkippedReason", &v.SkippedReason) - delete(rawMsg, key) - case "skippedReasonString": - err = unpopulate(val, "SkippedReasonString", &v.SkippedReasonString) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VmmDetails. -func (v VmmDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VMM" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VmmDetails. -func (v *VmmDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VmmToAzureCreateNetworkMappingInput. -func (v VmmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VmmToAzure" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToAzureCreateNetworkMappingInput. -func (v *VmmToAzureCreateNetworkMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VmmToAzureNetworkMappingSettings. -func (v VmmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VmmToAzure" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToAzureNetworkMappingSettings. -func (v *VmmToAzureNetworkMappingSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VmmToAzureUpdateNetworkMappingInput. -func (v VmmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VmmToAzure" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToAzureUpdateNetworkMappingInput. -func (v *VmmToAzureUpdateNetworkMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VmmToVmmCreateNetworkMappingInput. -func (v VmmToVmmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VmmToVmm" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToVmmCreateNetworkMappingInput. -func (v *VmmToVmmCreateNetworkMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VmmToVmmNetworkMappingSettings. -func (v VmmToVmmNetworkMappingSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VmmToVmm" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToVmmNetworkMappingSettings. -func (v *VmmToVmmNetworkMappingSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VmmToVmmUpdateNetworkMappingInput. -func (v VmmToVmmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["instanceType"] = "VmmToVmm" - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToVmmUpdateNetworkMappingInput. -func (v *VmmToVmmUpdateNetworkMappingInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VmmVirtualMachineDetails. -func (v VmmVirtualMachineDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "diskDetails", v.DiskDetails) - populate(objectMap, "generation", v.Generation) - populate(objectMap, "hasFibreChannelAdapter", v.HasFibreChannelAdapter) - populate(objectMap, "hasPhysicalDisk", v.HasPhysicalDisk) - populate(objectMap, "hasSharedVhd", v.HasSharedVhd) - populate(objectMap, "hyperVHostId", v.HyperVHostID) - objectMap["instanceType"] = "VmmVirtualMachine" - populate(objectMap, "osDetails", v.OSDetails) - populate(objectMap, "sourceItemId", v.SourceItemID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VmmVirtualMachineDetails. -func (v *VmmVirtualMachineDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "diskDetails": - err = unpopulate(val, "DiskDetails", &v.DiskDetails) - delete(rawMsg, key) - case "generation": - err = unpopulate(val, "Generation", &v.Generation) - delete(rawMsg, key) - case "hasFibreChannelAdapter": - err = unpopulate(val, "HasFibreChannelAdapter", &v.HasFibreChannelAdapter) - delete(rawMsg, key) - case "hasPhysicalDisk": - err = unpopulate(val, "HasPhysicalDisk", &v.HasPhysicalDisk) - delete(rawMsg, key) - case "hasSharedVhd": - err = unpopulate(val, "HasSharedVhd", &v.HasSharedVhd) - delete(rawMsg, key) - case "hyperVHostId": - err = unpopulate(val, "HyperVHostID", &v.HyperVHostID) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "osDetails": - err = unpopulate(val, "OSDetails", &v.OSDetails) - delete(rawMsg, key) - case "sourceItemId": - err = unpopulate(val, "SourceItemID", &v.SourceItemID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VmwareCbtPolicyDetails. -func (v VmwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appConsistentFrequencyInMinutes", v.AppConsistentFrequencyInMinutes) - populate(objectMap, "crashConsistentFrequencyInMinutes", v.CrashConsistentFrequencyInMinutes) - objectMap["instanceType"] = "VMwareCbt" - populate(objectMap, "recoveryPointHistoryInMinutes", v.RecoveryPointHistoryInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VmwareCbtPolicyDetails. -func (v *VmwareCbtPolicyDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appConsistentFrequencyInMinutes": - err = unpopulate(val, "AppConsistentFrequencyInMinutes", &v.AppConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "crashConsistentFrequencyInMinutes": - err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &v.CrashConsistentFrequencyInMinutes) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &v.InstanceType) - delete(rawMsg, key) - case "recoveryPointHistoryInMinutes": - err = unpopulate(val, "RecoveryPointHistoryInMinutes", &v.RecoveryPointHistoryInMinutes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/operations_client.go deleted file mode 100644 index fd2a231f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/operations_client.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - host string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationsClient(resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Operation to return the list of available operations. -// Generated from API version 2022-10-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations" - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationsDiscoveryCollection); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/polymorphic_helpers.go deleted file mode 100644 index f13634de..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/polymorphic_helpers.go +++ /dev/null @@ -1,1244 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import "encoding/json" - -func unmarshalAddDisksProviderSpecificInputClassification(rawMsg json.RawMessage) (AddDisksProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b AddDisksProviderSpecificInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2AAddDisksInput{} - default: - b = &AddDisksProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalApplianceSpecificDetailsClassification(rawMsg json.RawMessage) (ApplianceSpecificDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ApplianceSpecificDetailsClassification - switch m["instanceType"] { - case "InMageRcm": - b = &InMageRcmApplianceSpecificDetails{} - default: - b = &ApplianceSpecificDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalApplyRecoveryPointProviderSpecificInputClassification(rawMsg json.RawMessage) (ApplyRecoveryPointProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ApplyRecoveryPointProviderSpecificInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2AApplyRecoveryPointInput{} - case "A2ACrossClusterMigration": - b = &A2ACrossClusterMigrationApplyRecoveryPointInput{} - case "HyperVReplicaAzure": - b = &HyperVReplicaAzureApplyRecoveryPointInput{} - case "InMageAzureV2": - b = &InMageAzureV2ApplyRecoveryPointInput{} - case "InMageRcm": - b = &InMageRcmApplyRecoveryPointInput{} - default: - b = &ApplyRecoveryPointProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalConfigurationSettingsClassification(rawMsg json.RawMessage) (ConfigurationSettingsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ConfigurationSettingsClassification - switch m["instanceType"] { - case "HyperVVirtualMachine": - b = &HyperVVirtualMachineDetails{} - case "ReplicationGroupDetails": - b = &ReplicationGroupDetails{} - case "VMwareVirtualMachine": - b = &VMwareVirtualMachineDetails{} - case "VmmVirtualMachine": - b = &VmmVirtualMachineDetails{} - default: - b = &ConfigurationSettings{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalCreateProtectionIntentProviderSpecificDetailsClassification(rawMsg json.RawMessage) (CreateProtectionIntentProviderSpecificDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b CreateProtectionIntentProviderSpecificDetailsClassification - switch m["instanceType"] { - case "A2A": - b = &A2ACreateProtectionIntentInput{} - default: - b = &CreateProtectionIntentProviderSpecificDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalDisableProtectionProviderSpecificInputClassification(rawMsg json.RawMessage) (DisableProtectionProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b DisableProtectionProviderSpecificInputClassification - switch m["instanceType"] { - case "InMage": - b = &InMageDisableProtectionProviderSpecificInput{} - default: - b = &DisableProtectionProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalEnableMigrationProviderSpecificInputClassification(rawMsg json.RawMessage) (EnableMigrationProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b EnableMigrationProviderSpecificInputClassification - switch m["instanceType"] { - case "VMwareCbt": - b = &VMwareCbtEnableMigrationInput{} - default: - b = &EnableMigrationProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalEnableProtectionProviderSpecificInputClassification(rawMsg json.RawMessage) (EnableProtectionProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b EnableProtectionProviderSpecificInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2AEnableProtectionInput{} - case "A2ACrossClusterMigration": - b = &A2ACrossClusterMigrationEnableProtectionInput{} - case "HyperVReplicaAzure": - b = &HyperVReplicaAzureEnableProtectionInput{} - case "InMage": - b = &InMageEnableProtectionInput{} - case "InMageAzureV2": - b = &InMageAzureV2EnableProtectionInput{} - case "InMageRcm": - b = &InMageRcmEnableProtectionInput{} - default: - b = &EnableProtectionProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalEventProviderSpecificDetailsClassification(rawMsg json.RawMessage) (EventProviderSpecificDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b EventProviderSpecificDetailsClassification - switch m["instanceType"] { - case "A2A": - b = &A2AEventDetails{} - case "HyperVReplica2012": - b = &HyperVReplica2012EventDetails{} - case "HyperVReplica2012R2": - b = &HyperVReplica2012R2EventDetails{} - case "HyperVReplicaAzure": - b = &HyperVReplicaAzureEventDetails{} - case "HyperVReplicaBaseEventDetails": - b = &HyperVReplicaBaseEventDetails{} - case "InMageAzureV2": - b = &InMageAzureV2EventDetails{} - case "InMageRcm": - b = &InMageRcmEventDetails{} - case "InMageRcmFailback": - b = &InMageRcmFailbackEventDetails{} - case "VMwareCbt": - b = &VMwareCbtEventDetails{} - default: - b = &EventProviderSpecificDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalEventSpecificDetailsClassification(rawMsg json.RawMessage) (EventSpecificDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b EventSpecificDetailsClassification - switch m["instanceType"] { - case "JobStatus": - b = &JobStatusEventDetails{} - default: - b = &EventSpecificDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalFabricSpecificCreateNetworkMappingInputClassification(rawMsg json.RawMessage) (FabricSpecificCreateNetworkMappingInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b FabricSpecificCreateNetworkMappingInputClassification - switch m["instanceType"] { - case "AzureToAzure": - b = &AzureToAzureCreateNetworkMappingInput{} - case "VmmToAzure": - b = &VmmToAzureCreateNetworkMappingInput{} - case "VmmToVmm": - b = &VmmToVmmCreateNetworkMappingInput{} - default: - b = &FabricSpecificCreateNetworkMappingInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalFabricSpecificCreationInputClassification(rawMsg json.RawMessage) (FabricSpecificCreationInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b FabricSpecificCreationInputClassification - switch m["instanceType"] { - case "Azure": - b = &AzureFabricCreationInput{} - case "InMageRcm": - b = &InMageRcmFabricCreationInput{} - case "VMwareV2": - b = &VMwareV2FabricCreationInput{} - default: - b = &FabricSpecificCreationInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalFabricSpecificDetailsClassification(rawMsg json.RawMessage) (FabricSpecificDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b FabricSpecificDetailsClassification - switch m["instanceType"] { - case "Azure": - b = &AzureFabricSpecificDetails{} - case "HyperVSite": - b = &HyperVSiteDetails{} - case "InMageRcm": - b = &InMageRcmFabricSpecificDetails{} - case "VMM": - b = &VmmDetails{} - case "VMware": - b = &VMwareDetails{} - case "VMwareV2": - b = &VMwareV2FabricSpecificDetails{} - default: - b = &FabricSpecificDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalFabricSpecificUpdateNetworkMappingInputClassification(rawMsg json.RawMessage) (FabricSpecificUpdateNetworkMappingInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b FabricSpecificUpdateNetworkMappingInputClassification - switch m["instanceType"] { - case "AzureToAzure": - b = &AzureToAzureUpdateNetworkMappingInput{} - case "VmmToAzure": - b = &VmmToAzureUpdateNetworkMappingInput{} - case "VmmToVmm": - b = &VmmToVmmUpdateNetworkMappingInput{} - default: - b = &FabricSpecificUpdateNetworkMappingInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalGroupTaskDetailsClassification(rawMsg json.RawMessage) (GroupTaskDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b GroupTaskDetailsClassification - switch m["instanceType"] { - case "InlineWorkflowTaskDetails": - b = &InlineWorkflowTaskDetails{} - case "RecoveryPlanGroupTaskDetails": - b = &RecoveryPlanGroupTaskDetails{} - case "RecoveryPlanShutdownGroupTaskDetails": - b = &RecoveryPlanShutdownGroupTaskDetails{} - default: - b = &GroupTaskDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalJobDetailsClassification(rawMsg json.RawMessage) (JobDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b JobDetailsClassification - switch m["instanceType"] { - case "AsrJobDetails": - b = &AsrJobDetails{} - case "ExportJobDetails": - b = &ExportJobDetails{} - case "FailoverJobDetails": - b = &FailoverJobDetails{} - case "SwitchProtectionJobDetails": - b = &SwitchProtectionJobDetails{} - case "TestFailoverJobDetails": - b = &TestFailoverJobDetails{} - default: - b = &JobDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalMigrateProviderSpecificInputClassification(rawMsg json.RawMessage) (MigrateProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b MigrateProviderSpecificInputClassification - switch m["instanceType"] { - case "VMwareCbt": - b = &VMwareCbtMigrateInput{} - default: - b = &MigrateProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalMigrationProviderSpecificSettingsClassification(rawMsg json.RawMessage) (MigrationProviderSpecificSettingsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b MigrationProviderSpecificSettingsClassification - switch m["instanceType"] { - case "VMwareCbt": - b = &VMwareCbtMigrationDetails{} - default: - b = &MigrationProviderSpecificSettings{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalNetworkMappingFabricSpecificSettingsClassification(rawMsg json.RawMessage) (NetworkMappingFabricSpecificSettingsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b NetworkMappingFabricSpecificSettingsClassification - switch m["instanceType"] { - case "AzureToAzure": - b = &AzureToAzureNetworkMappingSettings{} - case "VmmToAzure": - b = &VmmToAzureNetworkMappingSettings{} - case "VmmToVmm": - b = &VmmToVmmNetworkMappingSettings{} - default: - b = &NetworkMappingFabricSpecificSettings{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalPlannedFailoverProviderSpecificFailoverInputClassification(rawMsg json.RawMessage) (PlannedFailoverProviderSpecificFailoverInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b PlannedFailoverProviderSpecificFailoverInputClassification - switch m["instanceType"] { - case "HyperVReplicaAzure": - b = &HyperVReplicaAzurePlannedFailoverProviderInput{} - case "HyperVReplicaAzureFailback": - b = &HyperVReplicaAzureFailbackProviderInput{} - case "InMageRcmFailback": - b = &InMageRcmFailbackPlannedFailoverProviderInput{} - default: - b = &PlannedFailoverProviderSpecificFailoverInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalPolicyProviderSpecificDetailsClassification(rawMsg json.RawMessage) (PolicyProviderSpecificDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b PolicyProviderSpecificDetailsClassification - switch m["instanceType"] { - case "A2A": - b = &A2APolicyDetails{} - case "HyperVReplica2012": - b = &HyperVReplicaPolicyDetails{} - case "HyperVReplica2012R2": - b = &HyperVReplicaBluePolicyDetails{} - case "HyperVReplicaAzure": - b = &HyperVReplicaAzurePolicyDetails{} - case "HyperVReplicaBasePolicyDetails": - b = &HyperVReplicaBasePolicyDetails{} - case "InMage": - b = &InMagePolicyDetails{} - case "InMageAzureV2": - b = &InMageAzureV2PolicyDetails{} - case "InMageBasePolicyDetails": - b = &InMageBasePolicyDetails{} - case "InMageRcm": - b = &InMageRcmPolicyDetails{} - case "InMageRcmFailback": - b = &InMageRcmFailbackPolicyDetails{} - case "VMwareCbt": - b = &VmwareCbtPolicyDetails{} - default: - b = &PolicyProviderSpecificDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalPolicyProviderSpecificInputClassification(rawMsg json.RawMessage) (PolicyProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b PolicyProviderSpecificInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2APolicyCreationInput{} - case "A2ACrossClusterMigration": - b = &A2ACrossClusterMigrationPolicyCreationInput{} - case "HyperVReplica2012": - b = &HyperVReplicaPolicyInput{} - case "HyperVReplica2012R2": - b = &HyperVReplicaBluePolicyInput{} - case "HyperVReplicaAzure": - b = &HyperVReplicaAzurePolicyInput{} - case "InMage": - b = &InMagePolicyInput{} - case "InMageAzureV2": - b = &InMageAzureV2PolicyInput{} - case "InMageRcm": - b = &InMageRcmPolicyCreationInput{} - case "InMageRcmFailback": - b = &InMageRcmFailbackPolicyCreationInput{} - case "VMwareCbt": - b = &VMwareCbtPolicyCreationInput{} - default: - b = &PolicyProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalProtectionContainerMappingProviderSpecificDetailsClassification(rawMsg json.RawMessage) (ProtectionContainerMappingProviderSpecificDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ProtectionContainerMappingProviderSpecificDetailsClassification - switch m["instanceType"] { - case "A2A": - b = &A2AProtectionContainerMappingDetails{} - case "InMageRcm": - b = &InMageRcmProtectionContainerMappingDetails{} - case "VMwareCbt": - b = &VMwareCbtProtectionContainerMappingDetails{} - default: - b = &ProtectionContainerMappingProviderSpecificDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalProtectionProfileCustomDetailsClassification(rawMsg json.RawMessage) (ProtectionProfileCustomDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ProtectionProfileCustomDetailsClassification - switch m["resourceType"] { - case "Existing": - b = &ExistingProtectionProfile{} - case "New": - b = &NewProtectionProfile{} - default: - b = &ProtectionProfileCustomDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalProviderSpecificRecoveryPointDetailsClassification(rawMsg json.RawMessage) (ProviderSpecificRecoveryPointDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ProviderSpecificRecoveryPointDetailsClassification - switch m["instanceType"] { - case "A2A": - b = &A2ARecoveryPointDetails{} - case "InMageAzureV2": - b = &InMageAzureV2RecoveryPointDetails{} - case "InMageRcm": - b = &InMageRcmRecoveryPointDetails{} - default: - b = &ProviderSpecificRecoveryPointDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRecoveryAvailabilitySetCustomDetailsClassification(rawMsg json.RawMessage) (RecoveryAvailabilitySetCustomDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RecoveryAvailabilitySetCustomDetailsClassification - switch m["resourceType"] { - case "Existing": - b = &ExistingRecoveryAvailabilitySet{} - default: - b = &RecoveryAvailabilitySetCustomDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRecoveryPlanActionDetailsClassification(rawMsg json.RawMessage) (RecoveryPlanActionDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RecoveryPlanActionDetailsClassification - switch m["instanceType"] { - case "AutomationRunbookActionDetails": - b = &RecoveryPlanAutomationRunbookActionDetails{} - case "ManualActionDetails": - b = &RecoveryPlanManualActionDetails{} - case "ScriptActionDetails": - b = &RecoveryPlanScriptActionDetails{} - default: - b = &RecoveryPlanActionDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRecoveryPlanProviderSpecificDetailsClassification(rawMsg json.RawMessage) (RecoveryPlanProviderSpecificDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RecoveryPlanProviderSpecificDetailsClassification - switch m["instanceType"] { - case "A2A": - b = &RecoveryPlanA2ADetails{} - default: - b = &RecoveryPlanProviderSpecificDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRecoveryPlanProviderSpecificDetailsClassificationArray(rawMsg json.RawMessage) ([]RecoveryPlanProviderSpecificDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]RecoveryPlanProviderSpecificDetailsClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalRecoveryPlanProviderSpecificDetailsClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalRecoveryPlanProviderSpecificFailoverInputClassification(rawMsg json.RawMessage) (RecoveryPlanProviderSpecificFailoverInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RecoveryPlanProviderSpecificFailoverInputClassification - switch m["instanceType"] { - case "A2A": - b = &RecoveryPlanA2AFailoverInput{} - case "HyperVReplicaAzure": - b = &RecoveryPlanHyperVReplicaAzureFailoverInput{} - case "HyperVReplicaAzureFailback": - b = &RecoveryPlanHyperVReplicaAzureFailbackInput{} - case "InMage": - b = &RecoveryPlanInMageFailoverInput{} - case "InMageAzureV2": - b = &RecoveryPlanInMageAzureV2FailoverInput{} - case "InMageRcm": - b = &RecoveryPlanInMageRcmFailoverInput{} - case "InMageRcmFailback": - b = &RecoveryPlanInMageRcmFailbackFailoverInput{} - default: - b = &RecoveryPlanProviderSpecificFailoverInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRecoveryPlanProviderSpecificFailoverInputClassificationArray(rawMsg json.RawMessage) ([]RecoveryPlanProviderSpecificFailoverInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]RecoveryPlanProviderSpecificFailoverInputClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalRecoveryPlanProviderSpecificFailoverInputClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalRecoveryPlanProviderSpecificInputClassification(rawMsg json.RawMessage) (RecoveryPlanProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RecoveryPlanProviderSpecificInputClassification - switch m["instanceType"] { - case "A2A": - b = &RecoveryPlanA2AInput{} - default: - b = &RecoveryPlanProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRecoveryPlanProviderSpecificInputClassificationArray(rawMsg json.RawMessage) ([]RecoveryPlanProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]RecoveryPlanProviderSpecificInputClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalRecoveryPlanProviderSpecificInputClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalRecoveryProximityPlacementGroupCustomDetailsClassification(rawMsg json.RawMessage) (RecoveryProximityPlacementGroupCustomDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RecoveryProximityPlacementGroupCustomDetailsClassification - switch m["resourceType"] { - case "Existing": - b = &ExistingRecoveryProximityPlacementGroup{} - default: - b = &RecoveryProximityPlacementGroupCustomDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRecoveryResourceGroupCustomDetailsClassification(rawMsg json.RawMessage) (RecoveryResourceGroupCustomDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RecoveryResourceGroupCustomDetailsClassification - switch m["resourceType"] { - case "Existing": - b = &ExistingRecoveryResourceGroup{} - default: - b = &RecoveryResourceGroupCustomDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRecoveryVirtualNetworkCustomDetailsClassification(rawMsg json.RawMessage) (RecoveryVirtualNetworkCustomDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RecoveryVirtualNetworkCustomDetailsClassification - switch m["resourceType"] { - case "Existing": - b = &ExistingRecoveryVirtualNetwork{} - case "New": - b = &NewRecoveryVirtualNetwork{} - default: - b = &RecoveryVirtualNetworkCustomDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalRemoveDisksProviderSpecificInputClassification(rawMsg json.RawMessage) (RemoveDisksProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b RemoveDisksProviderSpecificInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2ARemoveDisksInput{} - default: - b = &RemoveDisksProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalReplicationProtectionIntentProviderSpecificSettingsClassification(rawMsg json.RawMessage) (ReplicationProtectionIntentProviderSpecificSettingsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ReplicationProtectionIntentProviderSpecificSettingsClassification - switch m["instanceType"] { - case "A2A": - b = &A2AReplicationIntentDetails{} - default: - b = &ReplicationProtectionIntentProviderSpecificSettings{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalReplicationProviderSpecificContainerCreationInputClassification(rawMsg json.RawMessage) (ReplicationProviderSpecificContainerCreationInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ReplicationProviderSpecificContainerCreationInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2AContainerCreationInput{} - case "A2ACrossClusterMigration": - b = &A2ACrossClusterMigrationContainerCreationInput{} - case "VMwareCbt": - b = &VMwareCbtContainerCreationInput{} - default: - b = &ReplicationProviderSpecificContainerCreationInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalReplicationProviderSpecificContainerCreationInputClassificationArray(rawMsg json.RawMessage) ([]ReplicationProviderSpecificContainerCreationInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]ReplicationProviderSpecificContainerCreationInputClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalReplicationProviderSpecificContainerCreationInputClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} - -func unmarshalReplicationProviderSpecificContainerMappingInputClassification(rawMsg json.RawMessage) (ReplicationProviderSpecificContainerMappingInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ReplicationProviderSpecificContainerMappingInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2AContainerMappingInput{} - case "VMwareCbt": - b = &VMwareCbtContainerMappingInput{} - default: - b = &ReplicationProviderSpecificContainerMappingInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalReplicationProviderSpecificSettingsClassification(rawMsg json.RawMessage) (ReplicationProviderSpecificSettingsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ReplicationProviderSpecificSettingsClassification - switch m["instanceType"] { - case "A2A": - b = &A2AReplicationDetails{} - case "A2ACrossClusterMigration": - b = &A2ACrossClusterMigrationReplicationDetails{} - case "HyperVReplica2012": - b = &HyperVReplicaReplicationDetails{} - case "HyperVReplica2012R2": - b = &HyperVReplicaBlueReplicationDetails{} - case "HyperVReplicaAzure": - b = &HyperVReplicaAzureReplicationDetails{} - case "HyperVReplicaBaseReplicationDetails": - b = &HyperVReplicaBaseReplicationDetails{} - case "InMage": - b = &InMageReplicationDetails{} - case "InMageAzureV2": - b = &InMageAzureV2ReplicationDetails{} - case "InMageRcm": - b = &InMageRcmReplicationDetails{} - case "InMageRcmFailback": - b = &InMageRcmFailbackReplicationDetails{} - default: - b = &ReplicationProviderSpecificSettings{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalReplicationProviderSpecificUpdateContainerMappingInputClassification(rawMsg json.RawMessage) (ReplicationProviderSpecificUpdateContainerMappingInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ReplicationProviderSpecificUpdateContainerMappingInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2AUpdateContainerMappingInput{} - case "InMageRcm": - b = &InMageRcmUpdateContainerMappingInput{} - default: - b = &ReplicationProviderSpecificUpdateContainerMappingInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalResumeReplicationProviderSpecificInputClassification(rawMsg json.RawMessage) (ResumeReplicationProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ResumeReplicationProviderSpecificInputClassification - switch m["instanceType"] { - case "VMwareCbt": - b = &VMwareCbtResumeReplicationInput{} - default: - b = &ResumeReplicationProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalResyncProviderSpecificInputClassification(rawMsg json.RawMessage) (ResyncProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ResyncProviderSpecificInputClassification - switch m["instanceType"] { - case "VMwareCbt": - b = &VMwareCbtResyncInput{} - default: - b = &ResyncProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalReverseReplicationProviderSpecificInputClassification(rawMsg json.RawMessage) (ReverseReplicationProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b ReverseReplicationProviderSpecificInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2AReprotectInput{} - case "HyperVReplicaAzure": - b = &HyperVReplicaAzureReprotectInput{} - case "InMage": - b = &InMageReprotectInput{} - case "InMageAzureV2": - b = &InMageAzureV2ReprotectInput{} - case "InMageRcm": - b = &InMageRcmReprotectInput{} - case "InMageRcmFailback": - b = &InMageRcmFailbackReprotectInput{} - default: - b = &ReverseReplicationProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalStorageAccountCustomDetailsClassification(rawMsg json.RawMessage) (StorageAccountCustomDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b StorageAccountCustomDetailsClassification - switch m["resourceType"] { - case "Existing": - b = &ExistingStorageAccount{} - default: - b = &StorageAccountCustomDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalSwitchProtectionProviderSpecificInputClassification(rawMsg json.RawMessage) (SwitchProtectionProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b SwitchProtectionProviderSpecificInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2ASwitchProtectionInput{} - default: - b = &SwitchProtectionProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalSwitchProviderSpecificInputClassification(rawMsg json.RawMessage) (SwitchProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b SwitchProviderSpecificInputClassification - switch m["instanceType"] { - case "InMageAzureV2": - b = &InMageAzureV2SwitchProviderInput{} - default: - b = &SwitchProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalTaskTypeDetailsClassification(rawMsg json.RawMessage) (TaskTypeDetailsClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b TaskTypeDetailsClassification - switch m["instanceType"] { - case "AutomationRunbookTaskDetails": - b = &AutomationRunbookTaskDetails{} - case "ConsistencyCheckTaskDetails": - b = &ConsistencyCheckTaskDetails{} - case "FabricReplicationGroupTaskDetails": - b = &FabricReplicationGroupTaskDetails{} - case "JobTaskDetails": - b = &JobTaskDetails{} - case "ManualActionTaskDetails": - b = &ManualActionTaskDetails{} - case "ScriptActionTaskDetails": - b = &ScriptActionTaskDetails{} - case "VirtualMachineTaskDetails": - b = &VirtualMachineTaskDetails{} - case "VmNicUpdatesTaskDetails": - b = &VMNicUpdatesTaskDetails{} - default: - b = &TaskTypeDetails{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalTestFailoverProviderSpecificInputClassification(rawMsg json.RawMessage) (TestFailoverProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b TestFailoverProviderSpecificInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2ATestFailoverInput{} - case "HyperVReplicaAzure": - b = &HyperVReplicaAzureTestFailoverInput{} - case "InMage": - b = &InMageTestFailoverInput{} - case "InMageAzureV2": - b = &InMageAzureV2TestFailoverInput{} - case "InMageRcm": - b = &InMageRcmTestFailoverInput{} - default: - b = &TestFailoverProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalTestMigrateProviderSpecificInputClassification(rawMsg json.RawMessage) (TestMigrateProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b TestMigrateProviderSpecificInputClassification - switch m["instanceType"] { - case "VMwareCbt": - b = &VMwareCbtTestMigrateInput{} - default: - b = &TestMigrateProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalUnplannedFailoverProviderSpecificInputClassification(rawMsg json.RawMessage) (UnplannedFailoverProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b UnplannedFailoverProviderSpecificInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2AUnplannedFailoverInput{} - case "HyperVReplicaAzure": - b = &HyperVReplicaAzureUnplannedFailoverInput{} - case "InMage": - b = &InMageUnplannedFailoverInput{} - case "InMageAzureV2": - b = &InMageAzureV2UnplannedFailoverInput{} - case "InMageRcm": - b = &InMageRcmUnplannedFailoverInput{} - default: - b = &UnplannedFailoverProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification(rawMsg json.RawMessage) (UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification - switch m["instanceType"] { - case "InMageRcm": - b = &InMageRcmUpdateApplianceForReplicationProtectedItemInput{} - default: - b = &UpdateApplianceForReplicationProtectedItemProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalUpdateMigrationItemProviderSpecificInputClassification(rawMsg json.RawMessage) (UpdateMigrationItemProviderSpecificInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b UpdateMigrationItemProviderSpecificInputClassification - switch m["instanceType"] { - case "VMwareCbt": - b = &VMwareCbtUpdateMigrationItemInput{} - default: - b = &UpdateMigrationItemProviderSpecificInput{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalUpdateReplicationProtectedItemProviderInputClassification(rawMsg json.RawMessage) (UpdateReplicationProtectedItemProviderInputClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b UpdateReplicationProtectedItemProviderInputClassification - switch m["instanceType"] { - case "A2A": - b = &A2AUpdateReplicationProtectedItemInput{} - case "HyperVReplicaAzure": - b = &HyperVReplicaAzureUpdateReplicationProtectedItemInput{} - case "InMageAzureV2": - b = &InMageAzureV2UpdateReplicationProtectedItemInput{} - case "InMageRcm": - b = &InMageRcmUpdateReplicationProtectedItemInput{} - default: - b = &UpdateReplicationProtectedItemProviderInput{} - } - return b, json.Unmarshal(rawMsg, b) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/recoverypoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/recoverypoints_client.go deleted file mode 100644 index 166f0e59..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/recoverypoints_client.go +++ /dev/null @@ -1,218 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// RecoveryPointsClient contains the methods for the RecoveryPoints group. -// Don't use this type directly, use NewRecoveryPointsClient() instead. -type RecoveryPointsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewRecoveryPointsClient creates a new instance of RecoveryPointsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewRecoveryPointsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoveryPointsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &RecoveryPointsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Get the details of specified recovery point. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - The fabric name. -// protectionContainerName - The protection container name. -// replicatedProtectedItemName - The replication protected item name. -// recoveryPointName - The recovery point name. -// options - RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. -func (client *RecoveryPointsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, recoveryPointName string, options *RecoveryPointsClientGetOptions) (RecoveryPointsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName, options) - if err != nil { - return RecoveryPointsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecoveryPointsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecoveryPointsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *RecoveryPointsClient) getCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, recoveryPointName string, options *RecoveryPointsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints/{recoveryPointName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - if recoveryPointName == "" { - return nil, errors.New("parameter recoveryPointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPointName}", url.PathEscape(recoveryPointName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *RecoveryPointsClient) getHandleResponse(resp *http.Response) (RecoveryPointsClientGetResponse, error) { - result := RecoveryPointsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPoint); err != nil { - return RecoveryPointsClientGetResponse{}, err - } - return result, nil -} - -// NewListByReplicationProtectedItemsPager - Lists the available recovery points for a replication protected item. -// Generated from API version 2022-10-01 -// fabricName - The fabric name. -// protectionContainerName - The protection container name. -// replicatedProtectedItemName - The replication protected item name. -// options - RecoveryPointsClientListByReplicationProtectedItemsOptions contains the optional parameters for the RecoveryPointsClient.ListByReplicationProtectedItems -// method. -func (client *RecoveryPointsClient) NewListByReplicationProtectedItemsPager(fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *RecoveryPointsClientListByReplicationProtectedItemsOptions) *runtime.Pager[RecoveryPointsClientListByReplicationProtectedItemsResponse] { - return runtime.NewPager(runtime.PagingHandler[RecoveryPointsClientListByReplicationProtectedItemsResponse]{ - More: func(page RecoveryPointsClientListByReplicationProtectedItemsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *RecoveryPointsClientListByReplicationProtectedItemsResponse) (RecoveryPointsClientListByReplicationProtectedItemsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationProtectedItemsCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return RecoveryPointsClientListByReplicationProtectedItemsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return RecoveryPointsClientListByReplicationProtectedItemsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecoveryPointsClientListByReplicationProtectedItemsResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationProtectedItemsHandleResponse(resp) - }, - }) -} - -// listByReplicationProtectedItemsCreateRequest creates the ListByReplicationProtectedItems request. -func (client *RecoveryPointsClient) listByReplicationProtectedItemsCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *RecoveryPointsClientListByReplicationProtectedItemsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationProtectedItemsHandleResponse handles the ListByReplicationProtectedItems response. -func (client *RecoveryPointsClient) listByReplicationProtectedItemsHandleResponse(resp *http.Response) (RecoveryPointsClientListByReplicationProtectedItemsResponse, error) { - result := RecoveryPointsClientListByReplicationProtectedItemsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPointCollection); err != nil { - return RecoveryPointsClientListByReplicationProtectedItemsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationalertsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationalertsettings_client.go deleted file mode 100644 index 32caffa8..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationalertsettings_client.go +++ /dev/null @@ -1,250 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationAlertSettingsClient contains the methods for the ReplicationAlertSettings group. -// Don't use this type directly, use NewReplicationAlertSettingsClient() instead. -type ReplicationAlertSettingsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationAlertSettingsClient creates a new instance of ReplicationAlertSettingsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationAlertSettingsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationAlertSettingsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationAlertSettingsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Create - Create or update an email notification(alert) configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// alertSettingName - The name of the email notification(alert) configuration. -// request - The input to configure the email notification(alert). -// options - ReplicationAlertSettingsClientCreateOptions contains the optional parameters for the ReplicationAlertSettingsClient.Create -// method. -func (client *ReplicationAlertSettingsClient) Create(ctx context.Context, alertSettingName string, request ConfigureAlertRequest, options *ReplicationAlertSettingsClientCreateOptions) (ReplicationAlertSettingsClientCreateResponse, error) { - req, err := client.createCreateRequest(ctx, alertSettingName, request, options) - if err != nil { - return ReplicationAlertSettingsClientCreateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationAlertSettingsClientCreateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationAlertSettingsClientCreateResponse{}, runtime.NewResponseError(resp) - } - return client.createHandleResponse(resp) -} - -// createCreateRequest creates the Create request. -func (client *ReplicationAlertSettingsClient) createCreateRequest(ctx context.Context, alertSettingName string, request ConfigureAlertRequest, options *ReplicationAlertSettingsClientCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if alertSettingName == "" { - return nil, errors.New("parameter alertSettingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{alertSettingName}", url.PathEscape(alertSettingName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) -} - -// createHandleResponse handles the Create response. -func (client *ReplicationAlertSettingsClient) createHandleResponse(resp *http.Response) (ReplicationAlertSettingsClientCreateResponse, error) { - result := ReplicationAlertSettingsClientCreateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Alert); err != nil { - return ReplicationAlertSettingsClientCreateResponse{}, err - } - return result, nil -} - -// Get - Gets the details of the specified email notification(alert) configuration. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// alertSettingName - The name of the email notification configuration. -// options - ReplicationAlertSettingsClientGetOptions contains the optional parameters for the ReplicationAlertSettingsClient.Get -// method. -func (client *ReplicationAlertSettingsClient) Get(ctx context.Context, alertSettingName string, options *ReplicationAlertSettingsClientGetOptions) (ReplicationAlertSettingsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, alertSettingName, options) - if err != nil { - return ReplicationAlertSettingsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationAlertSettingsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationAlertSettingsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationAlertSettingsClient) getCreateRequest(ctx context.Context, alertSettingName string, options *ReplicationAlertSettingsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if alertSettingName == "" { - return nil, errors.New("parameter alertSettingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{alertSettingName}", url.PathEscape(alertSettingName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationAlertSettingsClient) getHandleResponse(resp *http.Response) (ReplicationAlertSettingsClientGetResponse, error) { - result := ReplicationAlertSettingsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Alert); err != nil { - return ReplicationAlertSettingsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets the list of email notification(alert) configurations for the vault. -// Generated from API version 2022-10-01 -// options - ReplicationAlertSettingsClientListOptions contains the optional parameters for the ReplicationAlertSettingsClient.List -// method. -func (client *ReplicationAlertSettingsClient) NewListPager(options *ReplicationAlertSettingsClientListOptions) *runtime.Pager[ReplicationAlertSettingsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationAlertSettingsClientListResponse]{ - More: func(page ReplicationAlertSettingsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationAlertSettingsClientListResponse) (ReplicationAlertSettingsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationAlertSettingsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationAlertSettingsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationAlertSettingsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationAlertSettingsClient) listCreateRequest(ctx context.Context, options *ReplicationAlertSettingsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationAlertSettingsClient) listHandleResponse(resp *http.Response) (ReplicationAlertSettingsClientListResponse, error) { - result := ReplicationAlertSettingsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AlertCollection); err != nil { - return ReplicationAlertSettingsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationappliances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationappliances_client.go deleted file mode 100644 index ad4efddf..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationappliances_client.go +++ /dev/null @@ -1,132 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationAppliancesClient contains the methods for the ReplicationAppliances group. -// Don't use this type directly, use NewReplicationAppliancesClient() instead. -type ReplicationAppliancesClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationAppliancesClient creates a new instance of ReplicationAppliancesClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationAppliancesClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationAppliancesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationAppliancesClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Gets the list of Azure Site Recovery appliances for the vault. -// Generated from API version 2022-10-01 -// options - ReplicationAppliancesClientListOptions contains the optional parameters for the ReplicationAppliancesClient.List -// method. -func (client *ReplicationAppliancesClient) NewListPager(options *ReplicationAppliancesClientListOptions) *runtime.Pager[ReplicationAppliancesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationAppliancesClientListResponse]{ - More: func(page ReplicationAppliancesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationAppliancesClientListResponse) (ReplicationAppliancesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationAppliancesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationAppliancesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationAppliancesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationAppliancesClient) listCreateRequest(ctx context.Context, options *ReplicationAppliancesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAppliances" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationAppliancesClient) listHandleResponse(resp *http.Response) (ReplicationAppliancesClientListResponse, error) { - result := ReplicationAppliancesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ApplianceCollection); err != nil { - return ReplicationAppliancesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationeligibilityresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationeligibilityresults_client.go deleted file mode 100644 index 1d80db2b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationeligibilityresults_client.go +++ /dev/null @@ -1,171 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationEligibilityResultsClient contains the methods for the ReplicationEligibilityResults group. -// Don't use this type directly, use NewReplicationEligibilityResultsClient() instead. -type ReplicationEligibilityResultsClient struct { - host string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationEligibilityResultsClient creates a new instance of ReplicationEligibilityResultsClient with the specified values. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationEligibilityResultsClient(resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationEligibilityResultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationEligibilityResultsClient{ - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Validates whether a given VM can be protected or not in which case returns list of errors. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// virtualMachineName - Virtual Machine name. -// options - ReplicationEligibilityResultsClientGetOptions contains the optional parameters for the ReplicationEligibilityResultsClient.Get -// method. -func (client *ReplicationEligibilityResultsClient) Get(ctx context.Context, virtualMachineName string, options *ReplicationEligibilityResultsClientGetOptions) (ReplicationEligibilityResultsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, virtualMachineName, options) - if err != nil { - return ReplicationEligibilityResultsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationEligibilityResultsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationEligibilityResultsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationEligibilityResultsClient) getCreateRequest(ctx context.Context, virtualMachineName string, options *ReplicationEligibilityResultsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults/default" - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if virtualMachineName == "" { - return nil, errors.New("parameter virtualMachineName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualMachineName}", url.PathEscape(virtualMachineName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationEligibilityResultsClient) getHandleResponse(resp *http.Response) (ReplicationEligibilityResultsClientGetResponse, error) { - result := ReplicationEligibilityResultsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationEligibilityResults); err != nil { - return ReplicationEligibilityResultsClientGetResponse{}, err - } - return result, nil -} - -// List - Validates whether a given VM can be protected or not in which case returns list of errors. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// virtualMachineName - Virtual Machine name. -// options - ReplicationEligibilityResultsClientListOptions contains the optional parameters for the ReplicationEligibilityResultsClient.List -// method. -func (client *ReplicationEligibilityResultsClient) List(ctx context.Context, virtualMachineName string, options *ReplicationEligibilityResultsClientListOptions) (ReplicationEligibilityResultsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, virtualMachineName, options) - if err != nil { - return ReplicationEligibilityResultsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationEligibilityResultsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationEligibilityResultsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) -} - -// listCreateRequest creates the List request. -func (client *ReplicationEligibilityResultsClient) listCreateRequest(ctx context.Context, virtualMachineName string, options *ReplicationEligibilityResultsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults" - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if virtualMachineName == "" { - return nil, errors.New("parameter virtualMachineName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{virtualMachineName}", url.PathEscape(virtualMachineName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationEligibilityResultsClient) listHandleResponse(resp *http.Response) (ReplicationEligibilityResultsClientListResponse, error) { - result := ReplicationEligibilityResultsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationEligibilityResultsCollection); err != nil { - return ReplicationEligibilityResultsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationevents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationevents_client.go deleted file mode 100644 index 7073f192..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationevents_client.go +++ /dev/null @@ -1,190 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationEventsClient contains the methods for the ReplicationEvents group. -// Don't use this type directly, use NewReplicationEventsClient() instead. -type ReplicationEventsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationEventsClient creates a new instance of ReplicationEventsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationEventsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationEventsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationEventsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - The operation to get the details of an Azure Site recovery event. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// eventName - The name of the Azure Site Recovery event. -// options - ReplicationEventsClientGetOptions contains the optional parameters for the ReplicationEventsClient.Get method. -func (client *ReplicationEventsClient) Get(ctx context.Context, eventName string, options *ReplicationEventsClientGetOptions) (ReplicationEventsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, eventName, options) - if err != nil { - return ReplicationEventsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationEventsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationEventsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationEventsClient) getCreateRequest(ctx context.Context, eventName string, options *ReplicationEventsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents/{eventName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if eventName == "" { - return nil, errors.New("parameter eventName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{eventName}", url.PathEscape(eventName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationEventsClient) getHandleResponse(resp *http.Response) (ReplicationEventsClientGetResponse, error) { - result := ReplicationEventsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Event); err != nil { - return ReplicationEventsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets the list of Azure Site Recovery events for the vault. -// Generated from API version 2022-10-01 -// options - ReplicationEventsClientListOptions contains the optional parameters for the ReplicationEventsClient.List method. -func (client *ReplicationEventsClient) NewListPager(options *ReplicationEventsClientListOptions) *runtime.Pager[ReplicationEventsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationEventsClientListResponse]{ - More: func(page ReplicationEventsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationEventsClientListResponse) (ReplicationEventsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationEventsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationEventsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationEventsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationEventsClient) listCreateRequest(ctx context.Context, options *ReplicationEventsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationEventsClient) listHandleResponse(resp *http.Response) (ReplicationEventsClientListResponse, error) { - result := ReplicationEventsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EventCollection); err != nil { - return ReplicationEventsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationfabrics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationfabrics_client.go deleted file mode 100644 index 82c2d2af..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationfabrics_client.go +++ /dev/null @@ -1,652 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationFabricsClient contains the methods for the ReplicationFabrics group. -// Don't use this type directly, use NewReplicationFabricsClient() instead. -type ReplicationFabricsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationFabricsClient creates a new instance of ReplicationFabricsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationFabricsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationFabricsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationFabricsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCheckConsistency - The operation to perform a consistency check on the fabric. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// options - ReplicationFabricsClientBeginCheckConsistencyOptions contains the optional parameters for the ReplicationFabricsClient.BeginCheckConsistency -// method. -func (client *ReplicationFabricsClient) BeginCheckConsistency(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginCheckConsistencyOptions) (*runtime.Poller[ReplicationFabricsClientCheckConsistencyResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.checkConsistency(ctx, fabricName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationFabricsClientCheckConsistencyResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationFabricsClientCheckConsistencyResponse](options.ResumeToken, client.pl, nil) - } -} - -// CheckConsistency - The operation to perform a consistency check on the fabric. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationFabricsClient) checkConsistency(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginCheckConsistencyOptions) (*http.Response, error) { - req, err := client.checkConsistencyCreateRequest(ctx, fabricName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// checkConsistencyCreateRequest creates the CheckConsistency request. -func (client *ReplicationFabricsClient) checkConsistencyCreateRequest(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginCheckConsistencyOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/checkConsistency" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginCreate - The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Name of the ASR fabric. -// input - Fabric creation input. -// options - ReplicationFabricsClientBeginCreateOptions contains the optional parameters for the ReplicationFabricsClient.BeginCreate -// method. -func (client *ReplicationFabricsClient) BeginCreate(ctx context.Context, fabricName string, input FabricCreationInput, options *ReplicationFabricsClientBeginCreateOptions) (*runtime.Poller[ReplicationFabricsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, fabricName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationFabricsClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationFabricsClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationFabricsClient) create(ctx context.Context, fabricName string, input FabricCreationInput, options *ReplicationFabricsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, fabricName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationFabricsClient) createCreateRequest(ctx context.Context, fabricName string, input FabricCreationInput, options *ReplicationFabricsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginDelete - The operation to delete or remove an Azure Site Recovery fabric. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - ASR fabric to delete. -// options - ReplicationFabricsClientBeginDeleteOptions contains the optional parameters for the ReplicationFabricsClient.BeginDelete -// method. -func (client *ReplicationFabricsClient) BeginDelete(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginDeleteOptions) (*runtime.Poller[ReplicationFabricsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, fabricName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationFabricsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationFabricsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - The operation to delete or remove an Azure Site Recovery fabric. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationFabricsClient) deleteOperation(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, fabricName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationFabricsClient) deleteCreateRequest(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/remove" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets the details of an Azure Site Recovery fabric. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// options - ReplicationFabricsClientGetOptions contains the optional parameters for the ReplicationFabricsClient.Get method. -func (client *ReplicationFabricsClient) Get(ctx context.Context, fabricName string, options *ReplicationFabricsClientGetOptions) (ReplicationFabricsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, options) - if err != nil { - return ReplicationFabricsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationFabricsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationFabricsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationFabricsClient) getCreateRequest(ctx context.Context, fabricName string, options *ReplicationFabricsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationFabricsClient) getHandleResponse(resp *http.Response) (ReplicationFabricsClientGetResponse, error) { - result := ReplicationFabricsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Fabric); err != nil { - return ReplicationFabricsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets a list of the Azure Site Recovery fabrics in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationFabricsClientListOptions contains the optional parameters for the ReplicationFabricsClient.List method. -func (client *ReplicationFabricsClient) NewListPager(options *ReplicationFabricsClientListOptions) *runtime.Pager[ReplicationFabricsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationFabricsClientListResponse]{ - More: func(page ReplicationFabricsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationFabricsClientListResponse) (ReplicationFabricsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationFabricsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationFabricsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationFabricsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationFabricsClient) listCreateRequest(ctx context.Context, options *ReplicationFabricsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationFabricsClient) listHandleResponse(resp *http.Response) (ReplicationFabricsClientListResponse, error) { - result := ReplicationFabricsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.FabricCollection); err != nil { - return ReplicationFabricsClientListResponse{}, err - } - return result, nil -} - -// BeginMigrateToAAD - The operation to migrate an Azure Site Recovery fabric to AAD. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - ASR fabric to migrate. -// options - ReplicationFabricsClientBeginMigrateToAADOptions contains the optional parameters for the ReplicationFabricsClient.BeginMigrateToAAD -// method. -func (client *ReplicationFabricsClient) BeginMigrateToAAD(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginMigrateToAADOptions) (*runtime.Poller[ReplicationFabricsClientMigrateToAADResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.migrateToAAD(ctx, fabricName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationFabricsClientMigrateToAADResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationFabricsClientMigrateToAADResponse](options.ResumeToken, client.pl, nil) - } -} - -// MigrateToAAD - The operation to migrate an Azure Site Recovery fabric to AAD. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationFabricsClient) migrateToAAD(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginMigrateToAADOptions) (*http.Response, error) { - req, err := client.migrateToAADCreateRequest(ctx, fabricName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// migrateToAADCreateRequest creates the MigrateToAAD request. -func (client *ReplicationFabricsClient) migrateToAADCreateRequest(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginMigrateToAADOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/migratetoaad" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// BeginPurge - The operation to purge(force delete) an Azure Site Recovery fabric. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - ASR fabric to purge. -// options - ReplicationFabricsClientBeginPurgeOptions contains the optional parameters for the ReplicationFabricsClient.BeginPurge -// method. -func (client *ReplicationFabricsClient) BeginPurge(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginPurgeOptions) (*runtime.Poller[ReplicationFabricsClientPurgeResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.purge(ctx, fabricName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationFabricsClientPurgeResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationFabricsClientPurgeResponse](options.ResumeToken, client.pl, nil) - } -} - -// Purge - The operation to purge(force delete) an Azure Site Recovery fabric. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationFabricsClient) purge(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginPurgeOptions) (*http.Response, error) { - req, err := client.purgeCreateRequest(ctx, fabricName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// purgeCreateRequest creates the Purge request. -func (client *ReplicationFabricsClient) purgeCreateRequest(ctx context.Context, fabricName string, options *ReplicationFabricsClientBeginPurgeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// BeginReassociateGateway - The operation to move replications from a process server to another process server. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - The name of the fabric containing the process server. -// failoverProcessServerRequest - The input to the failover process server operation. -// options - ReplicationFabricsClientBeginReassociateGatewayOptions contains the optional parameters for the ReplicationFabricsClient.BeginReassociateGateway -// method. -func (client *ReplicationFabricsClient) BeginReassociateGateway(ctx context.Context, fabricName string, failoverProcessServerRequest FailoverProcessServerRequest, options *ReplicationFabricsClientBeginReassociateGatewayOptions) (*runtime.Poller[ReplicationFabricsClientReassociateGatewayResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.reassociateGateway(ctx, fabricName, failoverProcessServerRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationFabricsClientReassociateGatewayResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationFabricsClientReassociateGatewayResponse](options.ResumeToken, client.pl, nil) - } -} - -// ReassociateGateway - The operation to move replications from a process server to another process server. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationFabricsClient) reassociateGateway(ctx context.Context, fabricName string, failoverProcessServerRequest FailoverProcessServerRequest, options *ReplicationFabricsClientBeginReassociateGatewayOptions) (*http.Response, error) { - req, err := client.reassociateGatewayCreateRequest(ctx, fabricName, failoverProcessServerRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// reassociateGatewayCreateRequest creates the ReassociateGateway request. -func (client *ReplicationFabricsClient) reassociateGatewayCreateRequest(ctx context.Context, fabricName string, failoverProcessServerRequest FailoverProcessServerRequest, options *ReplicationFabricsClientBeginReassociateGatewayOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/reassociateGateway" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, failoverProcessServerRequest) -} - -// BeginRenewCertificate - Renews the connection certificate for the ASR replication fabric. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - fabric name to renew certs for. -// renewCertificate - Renew certificate input. -// options - ReplicationFabricsClientBeginRenewCertificateOptions contains the optional parameters for the ReplicationFabricsClient.BeginRenewCertificate -// method. -func (client *ReplicationFabricsClient) BeginRenewCertificate(ctx context.Context, fabricName string, renewCertificate RenewCertificateInput, options *ReplicationFabricsClientBeginRenewCertificateOptions) (*runtime.Poller[ReplicationFabricsClientRenewCertificateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.renewCertificate(ctx, fabricName, renewCertificate, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationFabricsClientRenewCertificateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationFabricsClientRenewCertificateResponse](options.ResumeToken, client.pl, nil) - } -} - -// RenewCertificate - Renews the connection certificate for the ASR replication fabric. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationFabricsClient) renewCertificate(ctx context.Context, fabricName string, renewCertificate RenewCertificateInput, options *ReplicationFabricsClientBeginRenewCertificateOptions) (*http.Response, error) { - req, err := client.renewCertificateCreateRequest(ctx, fabricName, renewCertificate, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// renewCertificateCreateRequest creates the RenewCertificate request. -func (client *ReplicationFabricsClient) renewCertificateCreateRequest(ctx context.Context, fabricName string, renewCertificate RenewCertificateInput, options *ReplicationFabricsClientBeginRenewCertificateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/renewCertificate" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, renewCertificate) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationjobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationjobs_client.go deleted file mode 100644 index b4f3c129..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationjobs_client.go +++ /dev/null @@ -1,451 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationJobsClient contains the methods for the ReplicationJobs group. -// Don't use this type directly, use NewReplicationJobsClient() instead. -type ReplicationJobsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationJobsClient creates a new instance of ReplicationJobsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationJobsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationJobsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationJobsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCancel - The operation to cancel an Azure Site Recovery job. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// jobName - Job identifier. -// options - ReplicationJobsClientBeginCancelOptions contains the optional parameters for the ReplicationJobsClient.BeginCancel -// method. -func (client *ReplicationJobsClient) BeginCancel(ctx context.Context, jobName string, options *ReplicationJobsClientBeginCancelOptions) (*runtime.Poller[ReplicationJobsClientCancelResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.cancel(ctx, jobName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationJobsClientCancelResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationJobsClientCancelResponse](options.ResumeToken, client.pl, nil) - } -} - -// Cancel - The operation to cancel an Azure Site Recovery job. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationJobsClient) cancel(ctx context.Context, jobName string, options *ReplicationJobsClientBeginCancelOptions) (*http.Response, error) { - req, err := client.cancelCreateRequest(ctx, jobName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// cancelCreateRequest creates the Cancel request. -func (client *ReplicationJobsClient) cancelCreateRequest(ctx context.Context, jobName string, options *ReplicationJobsClientBeginCancelOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/cancel" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginExport - The operation to export the details of the Azure Site Recovery jobs of the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// jobQueryParameter - job query filter. -// options - ReplicationJobsClientBeginExportOptions contains the optional parameters for the ReplicationJobsClient.BeginExport -// method. -func (client *ReplicationJobsClient) BeginExport(ctx context.Context, jobQueryParameter JobQueryParameter, options *ReplicationJobsClientBeginExportOptions) (*runtime.Poller[ReplicationJobsClientExportResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.export(ctx, jobQueryParameter, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationJobsClientExportResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationJobsClientExportResponse](options.ResumeToken, client.pl, nil) - } -} - -// Export - The operation to export the details of the Azure Site Recovery jobs of the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationJobsClient) export(ctx context.Context, jobQueryParameter JobQueryParameter, options *ReplicationJobsClientBeginExportOptions) (*http.Response, error) { - req, err := client.exportCreateRequest(ctx, jobQueryParameter, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// exportCreateRequest creates the Export request. -func (client *ReplicationJobsClient) exportCreateRequest(ctx context.Context, jobQueryParameter JobQueryParameter, options *ReplicationJobsClientBeginExportOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/export" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, jobQueryParameter) -} - -// Get - Get the details of an Azure Site Recovery job. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// jobName - Job identifier. -// options - ReplicationJobsClientGetOptions contains the optional parameters for the ReplicationJobsClient.Get method. -func (client *ReplicationJobsClient) Get(ctx context.Context, jobName string, options *ReplicationJobsClientGetOptions) (ReplicationJobsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, jobName, options) - if err != nil { - return ReplicationJobsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationJobsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationJobsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationJobsClient) getCreateRequest(ctx context.Context, jobName string, options *ReplicationJobsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationJobsClient) getHandleResponse(resp *http.Response) (ReplicationJobsClientGetResponse, error) { - result := ReplicationJobsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Job); err != nil { - return ReplicationJobsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets the list of Azure Site Recovery Jobs for the vault. -// Generated from API version 2022-10-01 -// options - ReplicationJobsClientListOptions contains the optional parameters for the ReplicationJobsClient.List method. -func (client *ReplicationJobsClient) NewListPager(options *ReplicationJobsClientListOptions) *runtime.Pager[ReplicationJobsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationJobsClientListResponse]{ - More: func(page ReplicationJobsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationJobsClientListResponse) (ReplicationJobsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationJobsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationJobsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationJobsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationJobsClient) listCreateRequest(ctx context.Context, options *ReplicationJobsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationJobsClient) listHandleResponse(resp *http.Response) (ReplicationJobsClientListResponse, error) { - result := ReplicationJobsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.JobCollection); err != nil { - return ReplicationJobsClientListResponse{}, err - } - return result, nil -} - -// BeginRestart - The operation to restart an Azure Site Recovery job. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// jobName - Job identifier. -// options - ReplicationJobsClientBeginRestartOptions contains the optional parameters for the ReplicationJobsClient.BeginRestart -// method. -func (client *ReplicationJobsClient) BeginRestart(ctx context.Context, jobName string, options *ReplicationJobsClientBeginRestartOptions) (*runtime.Poller[ReplicationJobsClientRestartResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.restart(ctx, jobName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationJobsClientRestartResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationJobsClientRestartResponse](options.ResumeToken, client.pl, nil) - } -} - -// Restart - The operation to restart an Azure Site Recovery job. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationJobsClient) restart(ctx context.Context, jobName string, options *ReplicationJobsClientBeginRestartOptions) (*http.Response, error) { - req, err := client.restartCreateRequest(ctx, jobName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// restartCreateRequest creates the Restart request. -func (client *ReplicationJobsClient) restartCreateRequest(ctx context.Context, jobName string, options *ReplicationJobsClientBeginRestartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/restart" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginResume - The operation to resume an Azure Site Recovery job. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// jobName - Job identifier. -// resumeJobParams - Resume rob comments. -// options - ReplicationJobsClientBeginResumeOptions contains the optional parameters for the ReplicationJobsClient.BeginResume -// method. -func (client *ReplicationJobsClient) BeginResume(ctx context.Context, jobName string, resumeJobParams ResumeJobParams, options *ReplicationJobsClientBeginResumeOptions) (*runtime.Poller[ReplicationJobsClientResumeResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resume(ctx, jobName, resumeJobParams, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationJobsClientResumeResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationJobsClientResumeResponse](options.ResumeToken, client.pl, nil) - } -} - -// Resume - The operation to resume an Azure Site Recovery job. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationJobsClient) resume(ctx context.Context, jobName string, resumeJobParams ResumeJobParams, options *ReplicationJobsClientBeginResumeOptions) (*http.Response, error) { - req, err := client.resumeCreateRequest(ctx, jobName, resumeJobParams, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resumeCreateRequest creates the Resume request. -func (client *ReplicationJobsClient) resumeCreateRequest(ctx context.Context, jobName string, resumeJobParams ResumeJobParams, options *ReplicationJobsClientBeginResumeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/resume" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if jobName == "" { - return nil, errors.New("parameter jobName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resumeJobParams) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationlogicalnetworks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationlogicalnetworks_client.go deleted file mode 100644 index 848ed84b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationlogicalnetworks_client.go +++ /dev/null @@ -1,199 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationLogicalNetworksClient contains the methods for the ReplicationLogicalNetworks group. -// Don't use this type directly, use NewReplicationLogicalNetworksClient() instead. -type ReplicationLogicalNetworksClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationLogicalNetworksClient creates a new instance of ReplicationLogicalNetworksClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationLogicalNetworksClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationLogicalNetworksClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationLogicalNetworksClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the details of a logical network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Server Id. -// logicalNetworkName - Logical network name. -// options - ReplicationLogicalNetworksClientGetOptions contains the optional parameters for the ReplicationLogicalNetworksClient.Get -// method. -func (client *ReplicationLogicalNetworksClient) Get(ctx context.Context, fabricName string, logicalNetworkName string, options *ReplicationLogicalNetworksClientGetOptions) (ReplicationLogicalNetworksClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, logicalNetworkName, options) - if err != nil { - return ReplicationLogicalNetworksClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationLogicalNetworksClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationLogicalNetworksClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationLogicalNetworksClient) getCreateRequest(ctx context.Context, fabricName string, logicalNetworkName string, options *ReplicationLogicalNetworksClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks/{logicalNetworkName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if logicalNetworkName == "" { - return nil, errors.New("parameter logicalNetworkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{logicalNetworkName}", url.PathEscape(logicalNetworkName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationLogicalNetworksClient) getHandleResponse(resp *http.Response) (ReplicationLogicalNetworksClientGetResponse, error) { - result := ReplicationLogicalNetworksClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogicalNetwork); err != nil { - return ReplicationLogicalNetworksClientGetResponse{}, err - } - return result, nil -} - -// NewListByReplicationFabricsPager - Lists all the logical networks of the Azure Site Recovery fabric. -// Generated from API version 2022-10-01 -// fabricName - Server Id. -// options - ReplicationLogicalNetworksClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationLogicalNetworksClient.ListByReplicationFabrics -// method. -func (client *ReplicationLogicalNetworksClient) NewListByReplicationFabricsPager(fabricName string, options *ReplicationLogicalNetworksClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationLogicalNetworksClientListByReplicationFabricsResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationLogicalNetworksClientListByReplicationFabricsResponse]{ - More: func(page ReplicationLogicalNetworksClientListByReplicationFabricsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationLogicalNetworksClientListByReplicationFabricsResponse) (ReplicationLogicalNetworksClientListByReplicationFabricsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationFabricsCreateRequest(ctx, fabricName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationLogicalNetworksClientListByReplicationFabricsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationLogicalNetworksClientListByReplicationFabricsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationLogicalNetworksClientListByReplicationFabricsResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationFabricsHandleResponse(resp) - }, - }) -} - -// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. -func (client *ReplicationLogicalNetworksClient) listByReplicationFabricsCreateRequest(ctx context.Context, fabricName string, options *ReplicationLogicalNetworksClientListByReplicationFabricsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. -func (client *ReplicationLogicalNetworksClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationLogicalNetworksClientListByReplicationFabricsResponse, error) { - result := ReplicationLogicalNetworksClientListByReplicationFabricsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LogicalNetworkCollection); err != nil { - return ReplicationLogicalNetworksClientListByReplicationFabricsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationmigrationitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationmigrationitems_client.go deleted file mode 100644 index 40d8ef60..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationmigrationitems_client.go +++ /dev/null @@ -1,988 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationMigrationItemsClient contains the methods for the ReplicationMigrationItems group. -// Don't use this type directly, use NewReplicationMigrationItemsClient() instead. -type ReplicationMigrationItemsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationMigrationItemsClient creates a new instance of ReplicationMigrationItemsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationMigrationItemsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationMigrationItemsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationMigrationItemsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - The operation to create an ASR migration item (enable migration). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// input - Enable migration input. -// options - ReplicationMigrationItemsClientBeginCreateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginCreate -// method. -func (client *ReplicationMigrationItemsClient) BeginCreate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input EnableMigrationInput, options *ReplicationMigrationItemsClientBeginCreateOptions) (*runtime.Poller[ReplicationMigrationItemsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, fabricName, protectionContainerName, migrationItemName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationMigrationItemsClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationMigrationItemsClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to create an ASR migration item (enable migration). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationMigrationItemsClient) create(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input EnableMigrationInput, options *ReplicationMigrationItemsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationMigrationItemsClient) createCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input EnableMigrationInput, options *ReplicationMigrationItemsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginDelete - The operation to delete an ASR migration item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// options - ReplicationMigrationItemsClientBeginDeleteOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginDelete -// method. -func (client *ReplicationMigrationItemsClient) BeginDelete(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, options *ReplicationMigrationItemsClientBeginDeleteOptions) (*runtime.Poller[ReplicationMigrationItemsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, fabricName, protectionContainerName, migrationItemName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationMigrationItemsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationMigrationItemsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - The operation to delete an ASR migration item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationMigrationItemsClient) deleteOperation(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, options *ReplicationMigrationItemsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationMigrationItemsClient) deleteCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, options *ReplicationMigrationItemsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.DeleteOption != nil { - reqQP.Set("deleteOption", *options.DeleteOption) - } - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets the details of a migration item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric unique name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// options - ReplicationMigrationItemsClientGetOptions contains the optional parameters for the ReplicationMigrationItemsClient.Get -// method. -func (client *ReplicationMigrationItemsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, options *ReplicationMigrationItemsClientGetOptions) (ReplicationMigrationItemsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, options) - if err != nil { - return ReplicationMigrationItemsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationMigrationItemsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationMigrationItemsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationMigrationItemsClient) getCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, options *ReplicationMigrationItemsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationMigrationItemsClient) getHandleResponse(resp *http.Response) (ReplicationMigrationItemsClientGetResponse, error) { - result := ReplicationMigrationItemsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MigrationItem); err != nil { - return ReplicationMigrationItemsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets the list of migration items in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationMigrationItemsClientListOptions contains the optional parameters for the ReplicationMigrationItemsClient.List -// method. -func (client *ReplicationMigrationItemsClient) NewListPager(options *ReplicationMigrationItemsClientListOptions) *runtime.Pager[ReplicationMigrationItemsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationMigrationItemsClientListResponse]{ - More: func(page ReplicationMigrationItemsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationMigrationItemsClientListResponse) (ReplicationMigrationItemsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationMigrationItemsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationMigrationItemsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationMigrationItemsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationMigrationItemsClient) listCreateRequest(ctx context.Context, options *ReplicationMigrationItemsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationMigrationItems" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.SkipToken != nil { - reqQP.Set("skipToken", *options.SkipToken) - } - if options != nil && options.TakeToken != nil { - reqQP.Set("takeToken", *options.TakeToken) - } - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationMigrationItemsClient) listHandleResponse(resp *http.Response) (ReplicationMigrationItemsClientListResponse, error) { - result := ReplicationMigrationItemsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MigrationItemCollection); err != nil { - return ReplicationMigrationItemsClientListResponse{}, err - } - return result, nil -} - -// NewListByReplicationProtectionContainersPager - Gets the list of ASR migration items in the protection container. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// options - ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions contains the optional parameters -// for the ReplicationMigrationItemsClient.ListByReplicationProtectionContainers method. -func (client *ReplicationMigrationItemsClient) NewListByReplicationProtectionContainersPager(fabricName string, protectionContainerName string, options *ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions) *runtime.Pager[ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse]{ - More: func(page ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse) (ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationProtectionContainersCreateRequest(ctx, fabricName, protectionContainerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationProtectionContainersHandleResponse(resp) - }, - }) -} - -// listByReplicationProtectionContainersCreateRequest creates the ListByReplicationProtectionContainers request. -func (client *ReplicationMigrationItemsClient) listByReplicationProtectionContainersCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, options *ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.SkipToken != nil { - reqQP.Set("skipToken", *options.SkipToken) - } - if options != nil && options.TakeToken != nil { - reqQP.Set("takeToken", *options.TakeToken) - } - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationProtectionContainersHandleResponse handles the ListByReplicationProtectionContainers response. -func (client *ReplicationMigrationItemsClient) listByReplicationProtectionContainersHandleResponse(resp *http.Response) (ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse, error) { - result := ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MigrationItemCollection); err != nil { - return ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse{}, err - } - return result, nil -} - -// BeginMigrate - The operation to initiate migration of the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// migrateInput - Migrate input. -// options - ReplicationMigrationItemsClientBeginMigrateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginMigrate -// method. -func (client *ReplicationMigrationItemsClient) BeginMigrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrateInput MigrateInput, options *ReplicationMigrationItemsClientBeginMigrateOptions) (*runtime.Poller[ReplicationMigrationItemsClientMigrateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.migrate(ctx, fabricName, protectionContainerName, migrationItemName, migrateInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationMigrationItemsClientMigrateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationMigrationItemsClientMigrateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Migrate - The operation to initiate migration of the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationMigrationItemsClient) migrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrateInput MigrateInput, options *ReplicationMigrationItemsClientBeginMigrateOptions) (*http.Response, error) { - req, err := client.migrateCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, migrateInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// migrateCreateRequest creates the Migrate request. -func (client *ReplicationMigrationItemsClient) migrateCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrateInput MigrateInput, options *ReplicationMigrationItemsClientBeginMigrateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrate" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, migrateInput) -} - -// BeginPauseReplication - The operation to initiate pause replication of the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// pauseReplicationInput - Pause replication input. -// options - ReplicationMigrationItemsClientBeginPauseReplicationOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginPauseReplication -// method. -func (client *ReplicationMigrationItemsClient) BeginPauseReplication(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, pauseReplicationInput PauseReplicationInput, options *ReplicationMigrationItemsClientBeginPauseReplicationOptions) (*runtime.Poller[ReplicationMigrationItemsClientPauseReplicationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.pauseReplication(ctx, fabricName, protectionContainerName, migrationItemName, pauseReplicationInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationMigrationItemsClientPauseReplicationResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationMigrationItemsClientPauseReplicationResponse](options.ResumeToken, client.pl, nil) - } -} - -// PauseReplication - The operation to initiate pause replication of the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationMigrationItemsClient) pauseReplication(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, pauseReplicationInput PauseReplicationInput, options *ReplicationMigrationItemsClientBeginPauseReplicationOptions) (*http.Response, error) { - req, err := client.pauseReplicationCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, pauseReplicationInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// pauseReplicationCreateRequest creates the PauseReplication request. -func (client *ReplicationMigrationItemsClient) pauseReplicationCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, pauseReplicationInput PauseReplicationInput, options *ReplicationMigrationItemsClientBeginPauseReplicationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/pauseReplication" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, pauseReplicationInput) -} - -// BeginResumeReplication - The operation to initiate resume replication of the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// resumeReplicationInput - Resume replication input. -// options - ReplicationMigrationItemsClientBeginResumeReplicationOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginResumeReplication -// method. -func (client *ReplicationMigrationItemsClient) BeginResumeReplication(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, resumeReplicationInput ResumeReplicationInput, options *ReplicationMigrationItemsClientBeginResumeReplicationOptions) (*runtime.Poller[ReplicationMigrationItemsClientResumeReplicationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resumeReplication(ctx, fabricName, protectionContainerName, migrationItemName, resumeReplicationInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationMigrationItemsClientResumeReplicationResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationMigrationItemsClientResumeReplicationResponse](options.ResumeToken, client.pl, nil) - } -} - -// ResumeReplication - The operation to initiate resume replication of the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationMigrationItemsClient) resumeReplication(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, resumeReplicationInput ResumeReplicationInput, options *ReplicationMigrationItemsClientBeginResumeReplicationOptions) (*http.Response, error) { - req, err := client.resumeReplicationCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, resumeReplicationInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resumeReplicationCreateRequest creates the ResumeReplication request. -func (client *ReplicationMigrationItemsClient) resumeReplicationCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, resumeReplicationInput ResumeReplicationInput, options *ReplicationMigrationItemsClientBeginResumeReplicationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/resumeReplication" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resumeReplicationInput) -} - -// BeginResync - The operation to resynchronize replication of an ASR migration item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// input - Resync input. -// options - ReplicationMigrationItemsClientBeginResyncOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginResync -// method. -func (client *ReplicationMigrationItemsClient) BeginResync(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input ResyncInput, options *ReplicationMigrationItemsClientBeginResyncOptions) (*runtime.Poller[ReplicationMigrationItemsClientResyncResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resync(ctx, fabricName, protectionContainerName, migrationItemName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationMigrationItemsClientResyncResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationMigrationItemsClientResyncResponse](options.ResumeToken, client.pl, nil) - } -} - -// Resync - The operation to resynchronize replication of an ASR migration item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationMigrationItemsClient) resync(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input ResyncInput, options *ReplicationMigrationItemsClientBeginResyncOptions) (*http.Response, error) { - req, err := client.resyncCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resyncCreateRequest creates the Resync request. -func (client *ReplicationMigrationItemsClient) resyncCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input ResyncInput, options *ReplicationMigrationItemsClientBeginResyncOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/resync" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginTestMigrate - The operation to initiate test migration of the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// testMigrateInput - Test migrate input. -// options - ReplicationMigrationItemsClientBeginTestMigrateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginTestMigrate -// method. -func (client *ReplicationMigrationItemsClient) BeginTestMigrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput TestMigrateInput, options *ReplicationMigrationItemsClientBeginTestMigrateOptions) (*runtime.Poller[ReplicationMigrationItemsClientTestMigrateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.testMigrate(ctx, fabricName, protectionContainerName, migrationItemName, testMigrateInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationMigrationItemsClientTestMigrateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationMigrationItemsClientTestMigrateResponse](options.ResumeToken, client.pl, nil) - } -} - -// TestMigrate - The operation to initiate test migration of the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationMigrationItemsClient) testMigrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput TestMigrateInput, options *ReplicationMigrationItemsClientBeginTestMigrateOptions) (*http.Response, error) { - req, err := client.testMigrateCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, testMigrateInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// testMigrateCreateRequest creates the TestMigrate request. -func (client *ReplicationMigrationItemsClient) testMigrateCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput TestMigrateInput, options *ReplicationMigrationItemsClientBeginTestMigrateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/testMigrate" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, testMigrateInput) -} - -// BeginTestMigrateCleanup - The operation to initiate test migrate cleanup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// testMigrateCleanupInput - Test migrate cleanup input. -// options - ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginTestMigrateCleanup -// method. -func (client *ReplicationMigrationItemsClient) BeginTestMigrateCleanup(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput TestMigrateCleanupInput, options *ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions) (*runtime.Poller[ReplicationMigrationItemsClientTestMigrateCleanupResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.testMigrateCleanup(ctx, fabricName, protectionContainerName, migrationItemName, testMigrateCleanupInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationMigrationItemsClientTestMigrateCleanupResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationMigrationItemsClientTestMigrateCleanupResponse](options.ResumeToken, client.pl, nil) - } -} - -// TestMigrateCleanup - The operation to initiate test migrate cleanup. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationMigrationItemsClient) testMigrateCleanup(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput TestMigrateCleanupInput, options *ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions) (*http.Response, error) { - req, err := client.testMigrateCleanupCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, testMigrateCleanupInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// testMigrateCleanupCreateRequest creates the TestMigrateCleanup request. -func (client *ReplicationMigrationItemsClient) testMigrateCleanupCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput TestMigrateCleanupInput, options *ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/testMigrateCleanup" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, testMigrateCleanupInput) -} - -// BeginUpdate - The operation to update the recovery settings of an ASR migration item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// migrationItemName - Migration item name. -// input - Update migration item input. -// options - ReplicationMigrationItemsClientBeginUpdateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginUpdate -// method. -func (client *ReplicationMigrationItemsClient) BeginUpdate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input UpdateMigrationItemInput, options *ReplicationMigrationItemsClientBeginUpdateOptions) (*runtime.Poller[ReplicationMigrationItemsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, fabricName, protectionContainerName, migrationItemName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationMigrationItemsClientUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationMigrationItemsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - The operation to update the recovery settings of an ASR migration item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationMigrationItemsClient) update(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input UpdateMigrationItemInput, options *ReplicationMigrationItemsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, fabricName, protectionContainerName, migrationItemName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ReplicationMigrationItemsClient) updateCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input UpdateMigrationItemInput, options *ReplicationMigrationItemsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if migrationItemName == "" { - return nil, errors.New("parameter migrationItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationnetworkmappings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationnetworkmappings_client.go deleted file mode 100644 index 8fb1a27a..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationnetworkmappings_client.go +++ /dev/null @@ -1,505 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationNetworkMappingsClient contains the methods for the ReplicationNetworkMappings group. -// Don't use this type directly, use NewReplicationNetworkMappingsClient() instead. -type ReplicationNetworkMappingsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationNetworkMappingsClient creates a new instance of ReplicationNetworkMappingsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationNetworkMappingsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationNetworkMappingsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationNetworkMappingsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - The operation to create an ASR network mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Primary fabric name. -// networkName - Primary network name. -// networkMappingName - Network mapping name. -// input - Create network mapping input. -// options - ReplicationNetworkMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginCreate -// method. -func (client *ReplicationNetworkMappingsClient) BeginCreate(ctx context.Context, fabricName string, networkName string, networkMappingName string, input CreateNetworkMappingInput, options *ReplicationNetworkMappingsClientBeginCreateOptions) (*runtime.Poller[ReplicationNetworkMappingsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, fabricName, networkName, networkMappingName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationNetworkMappingsClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationNetworkMappingsClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to create an ASR network mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationNetworkMappingsClient) create(ctx context.Context, fabricName string, networkName string, networkMappingName string, input CreateNetworkMappingInput, options *ReplicationNetworkMappingsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, fabricName, networkName, networkMappingName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationNetworkMappingsClient) createCreateRequest(ctx context.Context, fabricName string, networkName string, networkMappingName string, input CreateNetworkMappingInput, options *ReplicationNetworkMappingsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if networkName == "" { - return nil, errors.New("parameter networkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) - if networkMappingName == "" { - return nil, errors.New("parameter networkMappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkMappingName}", url.PathEscape(networkMappingName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginDelete - The operation to delete a network mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Primary fabric name. -// networkName - Primary network name. -// networkMappingName - ARM Resource Name for network mapping. -// options - ReplicationNetworkMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginDelete -// method. -func (client *ReplicationNetworkMappingsClient) BeginDelete(ctx context.Context, fabricName string, networkName string, networkMappingName string, options *ReplicationNetworkMappingsClientBeginDeleteOptions) (*runtime.Poller[ReplicationNetworkMappingsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, fabricName, networkName, networkMappingName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationNetworkMappingsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationNetworkMappingsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - The operation to delete a network mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationNetworkMappingsClient) deleteOperation(ctx context.Context, fabricName string, networkName string, networkMappingName string, options *ReplicationNetworkMappingsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, fabricName, networkName, networkMappingName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationNetworkMappingsClient) deleteCreateRequest(ctx context.Context, fabricName string, networkName string, networkMappingName string, options *ReplicationNetworkMappingsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if networkName == "" { - return nil, errors.New("parameter networkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) - if networkMappingName == "" { - return nil, errors.New("parameter networkMappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkMappingName}", url.PathEscape(networkMappingName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets the details of an ASR network mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Primary fabric name. -// networkName - Primary network name. -// networkMappingName - Network mapping name. -// options - ReplicationNetworkMappingsClientGetOptions contains the optional parameters for the ReplicationNetworkMappingsClient.Get -// method. -func (client *ReplicationNetworkMappingsClient) Get(ctx context.Context, fabricName string, networkName string, networkMappingName string, options *ReplicationNetworkMappingsClientGetOptions) (ReplicationNetworkMappingsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, networkName, networkMappingName, options) - if err != nil { - return ReplicationNetworkMappingsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationNetworkMappingsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationNetworkMappingsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationNetworkMappingsClient) getCreateRequest(ctx context.Context, fabricName string, networkName string, networkMappingName string, options *ReplicationNetworkMappingsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if networkName == "" { - return nil, errors.New("parameter networkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) - if networkMappingName == "" { - return nil, errors.New("parameter networkMappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkMappingName}", url.PathEscape(networkMappingName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationNetworkMappingsClient) getHandleResponse(resp *http.Response) (ReplicationNetworkMappingsClientGetResponse, error) { - result := ReplicationNetworkMappingsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkMapping); err != nil { - return ReplicationNetworkMappingsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all ASR network mappings in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationNetworkMappingsClientListOptions contains the optional parameters for the ReplicationNetworkMappingsClient.List -// method. -func (client *ReplicationNetworkMappingsClient) NewListPager(options *ReplicationNetworkMappingsClientListOptions) *runtime.Pager[ReplicationNetworkMappingsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationNetworkMappingsClientListResponse]{ - More: func(page ReplicationNetworkMappingsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationNetworkMappingsClientListResponse) (ReplicationNetworkMappingsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationNetworkMappingsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationNetworkMappingsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationNetworkMappingsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationNetworkMappingsClient) listCreateRequest(ctx context.Context, options *ReplicationNetworkMappingsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworkMappings" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationNetworkMappingsClient) listHandleResponse(resp *http.Response) (ReplicationNetworkMappingsClientListResponse, error) { - result := ReplicationNetworkMappingsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkMappingCollection); err != nil { - return ReplicationNetworkMappingsClientListResponse{}, err - } - return result, nil -} - -// NewListByReplicationNetworksPager - Lists all ASR network mappings for the specified network. -// Generated from API version 2022-10-01 -// fabricName - Primary fabric name. -// networkName - Primary network name. -// options - ReplicationNetworkMappingsClientListByReplicationNetworksOptions contains the optional parameters for the ReplicationNetworkMappingsClient.ListByReplicationNetworks -// method. -func (client *ReplicationNetworkMappingsClient) NewListByReplicationNetworksPager(fabricName string, networkName string, options *ReplicationNetworkMappingsClientListByReplicationNetworksOptions) *runtime.Pager[ReplicationNetworkMappingsClientListByReplicationNetworksResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationNetworkMappingsClientListByReplicationNetworksResponse]{ - More: func(page ReplicationNetworkMappingsClientListByReplicationNetworksResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationNetworkMappingsClientListByReplicationNetworksResponse) (ReplicationNetworkMappingsClientListByReplicationNetworksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationNetworksCreateRequest(ctx, fabricName, networkName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationNetworkMappingsClientListByReplicationNetworksResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationNetworkMappingsClientListByReplicationNetworksResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationNetworkMappingsClientListByReplicationNetworksResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationNetworksHandleResponse(resp) - }, - }) -} - -// listByReplicationNetworksCreateRequest creates the ListByReplicationNetworks request. -func (client *ReplicationNetworkMappingsClient) listByReplicationNetworksCreateRequest(ctx context.Context, fabricName string, networkName string, options *ReplicationNetworkMappingsClientListByReplicationNetworksOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if networkName == "" { - return nil, errors.New("parameter networkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationNetworksHandleResponse handles the ListByReplicationNetworks response. -func (client *ReplicationNetworkMappingsClient) listByReplicationNetworksHandleResponse(resp *http.Response) (ReplicationNetworkMappingsClientListByReplicationNetworksResponse, error) { - result := ReplicationNetworkMappingsClientListByReplicationNetworksResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkMappingCollection); err != nil { - return ReplicationNetworkMappingsClientListByReplicationNetworksResponse{}, err - } - return result, nil -} - -// BeginUpdate - The operation to update an ASR network mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Primary fabric name. -// networkName - Primary network name. -// networkMappingName - Network mapping name. -// input - Update network mapping input. -// options - ReplicationNetworkMappingsClientBeginUpdateOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginUpdate -// method. -func (client *ReplicationNetworkMappingsClient) BeginUpdate(ctx context.Context, fabricName string, networkName string, networkMappingName string, input UpdateNetworkMappingInput, options *ReplicationNetworkMappingsClientBeginUpdateOptions) (*runtime.Poller[ReplicationNetworkMappingsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, fabricName, networkName, networkMappingName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationNetworkMappingsClientUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationNetworkMappingsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - The operation to update an ASR network mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationNetworkMappingsClient) update(ctx context.Context, fabricName string, networkName string, networkMappingName string, input UpdateNetworkMappingInput, options *ReplicationNetworkMappingsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, fabricName, networkName, networkMappingName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ReplicationNetworkMappingsClient) updateCreateRequest(ctx context.Context, fabricName string, networkName string, networkMappingName string, input UpdateNetworkMappingInput, options *ReplicationNetworkMappingsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if networkName == "" { - return nil, errors.New("parameter networkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) - if networkMappingName == "" { - return nil, errors.New("parameter networkMappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkMappingName}", url.PathEscape(networkMappingName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationnetworks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationnetworks_client.go deleted file mode 100644 index 171206c4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationnetworks_client.go +++ /dev/null @@ -1,265 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationNetworksClient contains the methods for the ReplicationNetworks group. -// Don't use this type directly, use NewReplicationNetworksClient() instead. -type ReplicationNetworksClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationNetworksClient creates a new instance of ReplicationNetworksClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationNetworksClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationNetworksClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationNetworksClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the details of a network. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Server Id. -// networkName - Primary network name. -// options - ReplicationNetworksClientGetOptions contains the optional parameters for the ReplicationNetworksClient.Get method. -func (client *ReplicationNetworksClient) Get(ctx context.Context, fabricName string, networkName string, options *ReplicationNetworksClientGetOptions) (ReplicationNetworksClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, networkName, options) - if err != nil { - return ReplicationNetworksClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationNetworksClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationNetworksClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationNetworksClient) getCreateRequest(ctx context.Context, fabricName string, networkName string, options *ReplicationNetworksClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if networkName == "" { - return nil, errors.New("parameter networkName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationNetworksClient) getHandleResponse(resp *http.Response) (ReplicationNetworksClientGetResponse, error) { - result := ReplicationNetworksClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Network); err != nil { - return ReplicationNetworksClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the networks available in a vault. -// Generated from API version 2022-10-01 -// options - ReplicationNetworksClientListOptions contains the optional parameters for the ReplicationNetworksClient.List -// method. -func (client *ReplicationNetworksClient) NewListPager(options *ReplicationNetworksClientListOptions) *runtime.Pager[ReplicationNetworksClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationNetworksClientListResponse]{ - More: func(page ReplicationNetworksClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationNetworksClientListResponse) (ReplicationNetworksClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationNetworksClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationNetworksClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationNetworksClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationNetworksClient) listCreateRequest(ctx context.Context, options *ReplicationNetworksClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworks" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationNetworksClient) listHandleResponse(resp *http.Response) (ReplicationNetworksClientListResponse, error) { - result := ReplicationNetworksClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkCollection); err != nil { - return ReplicationNetworksClientListResponse{}, err - } - return result, nil -} - -// NewListByReplicationFabricsPager - Lists the networks available for a fabric. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// options - ReplicationNetworksClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationNetworksClient.ListByReplicationFabrics -// method. -func (client *ReplicationNetworksClient) NewListByReplicationFabricsPager(fabricName string, options *ReplicationNetworksClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationNetworksClientListByReplicationFabricsResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationNetworksClientListByReplicationFabricsResponse]{ - More: func(page ReplicationNetworksClientListByReplicationFabricsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationNetworksClientListByReplicationFabricsResponse) (ReplicationNetworksClientListByReplicationFabricsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationFabricsCreateRequest(ctx, fabricName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationNetworksClientListByReplicationFabricsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationNetworksClientListByReplicationFabricsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationNetworksClientListByReplicationFabricsResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationFabricsHandleResponse(resp) - }, - }) -} - -// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. -func (client *ReplicationNetworksClient) listByReplicationFabricsCreateRequest(ctx context.Context, fabricName string, options *ReplicationNetworksClientListByReplicationFabricsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. -func (client *ReplicationNetworksClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationNetworksClientListByReplicationFabricsResponse, error) { - result := ReplicationNetworksClientListByReplicationFabricsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NetworkCollection); err != nil { - return ReplicationNetworksClientListByReplicationFabricsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationpolicies_client.go deleted file mode 100644 index 6d67a09d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationpolicies_client.go +++ /dev/null @@ -1,387 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationPoliciesClient contains the methods for the ReplicationPolicies group. -// Don't use this type directly, use NewReplicationPoliciesClient() instead. -type ReplicationPoliciesClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationPoliciesClient creates a new instance of ReplicationPoliciesClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationPoliciesClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationPoliciesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationPoliciesClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - The operation to create a replication policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// policyName - Replication policy name. -// input - Create policy input. -// options - ReplicationPoliciesClientBeginCreateOptions contains the optional parameters for the ReplicationPoliciesClient.BeginCreate -// method. -func (client *ReplicationPoliciesClient) BeginCreate(ctx context.Context, policyName string, input CreatePolicyInput, options *ReplicationPoliciesClientBeginCreateOptions) (*runtime.Poller[ReplicationPoliciesClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, policyName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationPoliciesClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationPoliciesClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to create a replication policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationPoliciesClient) create(ctx context.Context, policyName string, input CreatePolicyInput, options *ReplicationPoliciesClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, policyName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationPoliciesClient) createCreateRequest(ctx context.Context, policyName string, input CreatePolicyInput, options *ReplicationPoliciesClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginDelete - The operation to delete a replication policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// policyName - Replication policy name. -// options - ReplicationPoliciesClientBeginDeleteOptions contains the optional parameters for the ReplicationPoliciesClient.BeginDelete -// method. -func (client *ReplicationPoliciesClient) BeginDelete(ctx context.Context, policyName string, options *ReplicationPoliciesClientBeginDeleteOptions) (*runtime.Poller[ReplicationPoliciesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, policyName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationPoliciesClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - The operation to delete a replication policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationPoliciesClient) deleteOperation(ctx context.Context, policyName string, options *ReplicationPoliciesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, policyName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationPoliciesClient) deleteCreateRequest(ctx context.Context, policyName string, options *ReplicationPoliciesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets the details of a replication policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// policyName - Replication policy name. -// options - ReplicationPoliciesClientGetOptions contains the optional parameters for the ReplicationPoliciesClient.Get method. -func (client *ReplicationPoliciesClient) Get(ctx context.Context, policyName string, options *ReplicationPoliciesClientGetOptions) (ReplicationPoliciesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, policyName, options) - if err != nil { - return ReplicationPoliciesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationPoliciesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationPoliciesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationPoliciesClient) getCreateRequest(ctx context.Context, policyName string, options *ReplicationPoliciesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationPoliciesClient) getHandleResponse(resp *http.Response) (ReplicationPoliciesClientGetResponse, error) { - result := ReplicationPoliciesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Policy); err != nil { - return ReplicationPoliciesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the replication policies for a vault. -// Generated from API version 2022-10-01 -// options - ReplicationPoliciesClientListOptions contains the optional parameters for the ReplicationPoliciesClient.List -// method. -func (client *ReplicationPoliciesClient) NewListPager(options *ReplicationPoliciesClientListOptions) *runtime.Pager[ReplicationPoliciesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationPoliciesClientListResponse]{ - More: func(page ReplicationPoliciesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationPoliciesClientListResponse) (ReplicationPoliciesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationPoliciesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationPoliciesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationPoliciesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationPoliciesClient) listCreateRequest(ctx context.Context, options *ReplicationPoliciesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationPoliciesClient) listHandleResponse(resp *http.Response) (ReplicationPoliciesClientListResponse, error) { - result := ReplicationPoliciesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.PolicyCollection); err != nil { - return ReplicationPoliciesClientListResponse{}, err - } - return result, nil -} - -// BeginUpdate - The operation to update a replication policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// policyName - Policy Id. -// input - Update Policy Input. -// options - ReplicationPoliciesClientBeginUpdateOptions contains the optional parameters for the ReplicationPoliciesClient.BeginUpdate -// method. -func (client *ReplicationPoliciesClient) BeginUpdate(ctx context.Context, policyName string, input UpdatePolicyInput, options *ReplicationPoliciesClientBeginUpdateOptions) (*runtime.Poller[ReplicationPoliciesClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, policyName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationPoliciesClientUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationPoliciesClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - The operation to update a replication policy. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationPoliciesClient) update(ctx context.Context, policyName string, input UpdatePolicyInput, options *ReplicationPoliciesClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, policyName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ReplicationPoliciesClient) updateCreateRequest(ctx context.Context, policyName string, input UpdatePolicyInput, options *ReplicationPoliciesClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if policyName == "" { - return nil, errors.New("parameter policyName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectableitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectableitems_client.go deleted file mode 100644 index 92410312..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectableitems_client.go +++ /dev/null @@ -1,218 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationProtectableItemsClient contains the methods for the ReplicationProtectableItems group. -// Don't use this type directly, use NewReplicationProtectableItemsClient() instead. -type ReplicationProtectableItemsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationProtectableItemsClient creates a new instance of ReplicationProtectableItemsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationProtectableItemsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectableItemsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationProtectableItemsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - The operation to get the details of a protectable item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// protectableItemName - Protectable item name. -// options - ReplicationProtectableItemsClientGetOptions contains the optional parameters for the ReplicationProtectableItemsClient.Get -// method. -func (client *ReplicationProtectableItemsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, protectableItemName string, options *ReplicationProtectableItemsClientGetOptions) (ReplicationProtectableItemsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, protectionContainerName, protectableItemName, options) - if err != nil { - return ReplicationProtectableItemsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectableItemsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectableItemsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationProtectableItemsClient) getCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, protectableItemName string, options *ReplicationProtectableItemsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems/{protectableItemName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if protectableItemName == "" { - return nil, errors.New("parameter protectableItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectableItemName}", url.PathEscape(protectableItemName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationProtectableItemsClient) getHandleResponse(resp *http.Response) (ReplicationProtectableItemsClientGetResponse, error) { - result := ReplicationProtectableItemsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectableItem); err != nil { - return ReplicationProtectableItemsClientGetResponse{}, err - } - return result, nil -} - -// NewListByReplicationProtectionContainersPager - Lists the protectable items in a protection container. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// options - ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions contains the optional parameters -// for the ReplicationProtectableItemsClient.ListByReplicationProtectionContainers method. -func (client *ReplicationProtectableItemsClient) NewListByReplicationProtectionContainersPager(fabricName string, protectionContainerName string, options *ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions) *runtime.Pager[ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse]{ - More: func(page ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse) (ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationProtectionContainersCreateRequest(ctx, fabricName, protectionContainerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationProtectionContainersHandleResponse(resp) - }, - }) -} - -// listByReplicationProtectionContainersCreateRequest creates the ListByReplicationProtectionContainers request. -func (client *ReplicationProtectableItemsClient) listByReplicationProtectionContainersCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, options *ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - if options != nil && options.Take != nil { - reqQP.Set("$take", *options.Take) - } - if options != nil && options.SkipToken != nil { - reqQP.Set("$skipToken", *options.SkipToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationProtectionContainersHandleResponse handles the ListByReplicationProtectionContainers response. -func (client *ReplicationProtectableItemsClient) listByReplicationProtectionContainersHandleResponse(resp *http.Response) (ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse, error) { - result := ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectableItemCollection); err != nil { - return ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotecteditems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotecteditems_client.go deleted file mode 100644 index 35f6060c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotecteditems_client.go +++ /dev/null @@ -1,1751 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationProtectedItemsClient contains the methods for the ReplicationProtectedItems group. -// Don't use this type directly, use NewReplicationProtectedItemsClient() instead. -type ReplicationProtectedItemsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationProtectedItemsClient creates a new instance of ReplicationProtectedItemsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationProtectedItemsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectedItemsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationProtectedItemsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginAddDisks - Operation to add disks(s) to the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// addDisksInput - Add disks input. -// options - ReplicationProtectedItemsClientBeginAddDisksOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginAddDisks -// method. -func (client *ReplicationProtectedItemsClient) BeginAddDisks(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, addDisksInput AddDisksInput, options *ReplicationProtectedItemsClientBeginAddDisksOptions) (*runtime.Poller[ReplicationProtectedItemsClientAddDisksResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.addDisks(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, addDisksInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientAddDisksResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientAddDisksResponse](options.ResumeToken, client.pl, nil) - } -} - -// AddDisks - Operation to add disks(s) to the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) addDisks(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, addDisksInput AddDisksInput, options *ReplicationProtectedItemsClientBeginAddDisksOptions) (*http.Response, error) { - req, err := client.addDisksCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, addDisksInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// addDisksCreateRequest creates the AddDisks request. -func (client *ReplicationProtectedItemsClient) addDisksCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, addDisksInput AddDisksInput, options *ReplicationProtectedItemsClientBeginAddDisksOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/addDisks" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, addDisksInput) -} - -// BeginApplyRecoveryPoint - The operation to change the recovery point of a failed over replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - The ARM fabric name. -// protectionContainerName - The protection container name. -// replicatedProtectedItemName - The replicated protected item name. -// applyRecoveryPointInput - The ApplyRecoveryPointInput. -// options - ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginApplyRecoveryPoint -// method. -func (client *ReplicationProtectedItemsClient) BeginApplyRecoveryPoint(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applyRecoveryPointInput ApplyRecoveryPointInput, options *ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions) (*runtime.Poller[ReplicationProtectedItemsClientApplyRecoveryPointResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.applyRecoveryPoint(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientApplyRecoveryPointResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientApplyRecoveryPointResponse](options.ResumeToken, client.pl, nil) - } -} - -// ApplyRecoveryPoint - The operation to change the recovery point of a failed over replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) applyRecoveryPoint(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applyRecoveryPointInput ApplyRecoveryPointInput, options *ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions) (*http.Response, error) { - req, err := client.applyRecoveryPointCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// applyRecoveryPointCreateRequest creates the ApplyRecoveryPoint request. -func (client *ReplicationProtectedItemsClient) applyRecoveryPointCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applyRecoveryPointInput ApplyRecoveryPointInput, options *ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/applyRecoveryPoint" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, applyRecoveryPointInput) -} - -// BeginCreate - The operation to create an ASR replication protected item (Enable replication). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Name of the fabric. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - A name for the replication protected item. -// input - Enable Protection Input. -// options - ReplicationProtectedItemsClientBeginCreateOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginCreate -// method. -func (client *ReplicationProtectedItemsClient) BeginCreate(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, input EnableProtectionInput, options *ReplicationProtectedItemsClientBeginCreateOptions) (*runtime.Poller[ReplicationProtectedItemsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to create an ASR replication protected item (Enable replication). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) create(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, input EnableProtectionInput, options *ReplicationProtectedItemsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationProtectedItemsClient) createCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, input EnableProtectionInput, options *ReplicationProtectedItemsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginDelete - The operation to disable replication on a replication protected item. This will also remove the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// disableProtectionInput - Disable protection input. -// options - ReplicationProtectedItemsClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginDelete -// method. -func (client *ReplicationProtectedItemsClient) BeginDelete(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, disableProtectionInput DisableProtectionInput, options *ReplicationProtectedItemsClientBeginDeleteOptions) (*runtime.Poller[ReplicationProtectedItemsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, disableProtectionInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - The operation to disable replication on a replication protected item. This will also remove the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) deleteOperation(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, disableProtectionInput DisableProtectionInput, options *ReplicationProtectedItemsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, disableProtectionInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationProtectedItemsClient) deleteCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, disableProtectionInput DisableProtectionInput, options *ReplicationProtectedItemsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/remove" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, runtime.MarshalAsJSON(req, disableProtectionInput) -} - -// BeginFailoverCancel - Operation to cancel the failover of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// options - ReplicationProtectedItemsClientBeginFailoverCancelOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginFailoverCancel -// method. -func (client *ReplicationProtectedItemsClient) BeginFailoverCancel(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginFailoverCancelOptions) (*runtime.Poller[ReplicationProtectedItemsClientFailoverCancelResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.failoverCancel(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientFailoverCancelResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientFailoverCancelResponse](options.ResumeToken, client.pl, nil) - } -} - -// FailoverCancel - Operation to cancel the failover of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) failoverCancel(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginFailoverCancelOptions) (*http.Response, error) { - req, err := client.failoverCancelCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// failoverCancelCreateRequest creates the FailoverCancel request. -func (client *ReplicationProtectedItemsClient) failoverCancelCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginFailoverCancelOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCancel" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginFailoverCommit - Operation to commit the failover of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// options - ReplicationProtectedItemsClientBeginFailoverCommitOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginFailoverCommit -// method. -func (client *ReplicationProtectedItemsClient) BeginFailoverCommit(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginFailoverCommitOptions) (*runtime.Poller[ReplicationProtectedItemsClientFailoverCommitResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.failoverCommit(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientFailoverCommitResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientFailoverCommitResponse](options.ResumeToken, client.pl, nil) - } -} - -// FailoverCommit - Operation to commit the failover of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) failoverCommit(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginFailoverCommitOptions) (*http.Response, error) { - req, err := client.failoverCommitCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// failoverCommitCreateRequest creates the FailoverCommit request. -func (client *ReplicationProtectedItemsClient) failoverCommitCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginFailoverCommitOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCommit" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the details of an ASR replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric unique name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// options - ReplicationProtectedItemsClientGetOptions contains the optional parameters for the ReplicationProtectedItemsClient.Get -// method. -func (client *ReplicationProtectedItemsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientGetOptions) (ReplicationProtectedItemsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - if err != nil { - return ReplicationProtectedItemsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectedItemsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectedItemsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationProtectedItemsClient) getCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationProtectedItemsClient) getHandleResponse(resp *http.Response) (ReplicationProtectedItemsClientGetResponse, error) { - result := ReplicationProtectedItemsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectedItem); err != nil { - return ReplicationProtectedItemsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets the list of ASR replication protected items in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationProtectedItemsClientListOptions contains the optional parameters for the ReplicationProtectedItemsClient.List -// method. -func (client *ReplicationProtectedItemsClient) NewListPager(options *ReplicationProtectedItemsClientListOptions) *runtime.Pager[ReplicationProtectedItemsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationProtectedItemsClientListResponse]{ - More: func(page ReplicationProtectedItemsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationProtectedItemsClientListResponse) (ReplicationProtectedItemsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationProtectedItemsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectedItemsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectedItemsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationProtectedItemsClient) listCreateRequest(ctx context.Context, options *ReplicationProtectedItemsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectedItems" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.SkipToken != nil { - reqQP.Set("skipToken", *options.SkipToken) - } - if options != nil && options.Filter != nil { - reqQP.Set("$filter", *options.Filter) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationProtectedItemsClient) listHandleResponse(resp *http.Response) (ReplicationProtectedItemsClientListResponse, error) { - result := ReplicationProtectedItemsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectedItemCollection); err != nil { - return ReplicationProtectedItemsClientListResponse{}, err - } - return result, nil -} - -// NewListByReplicationProtectionContainersPager - Gets the list of ASR replication protected items in the protection container. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// options - ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions contains the optional parameters -// for the ReplicationProtectedItemsClient.ListByReplicationProtectionContainers method. -func (client *ReplicationProtectedItemsClient) NewListByReplicationProtectionContainersPager(fabricName string, protectionContainerName string, options *ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions) *runtime.Pager[ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse]{ - More: func(page ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse) (ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationProtectionContainersCreateRequest(ctx, fabricName, protectionContainerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationProtectionContainersHandleResponse(resp) - }, - }) -} - -// listByReplicationProtectionContainersCreateRequest creates the ListByReplicationProtectionContainers request. -func (client *ReplicationProtectedItemsClient) listByReplicationProtectionContainersCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, options *ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationProtectionContainersHandleResponse handles the ListByReplicationProtectionContainers response. -func (client *ReplicationProtectedItemsClient) listByReplicationProtectionContainersHandleResponse(resp *http.Response) (ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse, error) { - result := ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectedItemCollection); err != nil { - return ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse{}, err - } - return result, nil -} - -// BeginPlannedFailover - Operation to initiate a planned failover of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// failoverInput - Planned failover input. -// options - ReplicationProtectedItemsClientBeginPlannedFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginPlannedFailover -// method. -func (client *ReplicationProtectedItemsClient) BeginPlannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput PlannedFailoverInput, options *ReplicationProtectedItemsClientBeginPlannedFailoverOptions) (*runtime.Poller[ReplicationProtectedItemsClientPlannedFailoverResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.plannedFailover(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientPlannedFailoverResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientPlannedFailoverResponse](options.ResumeToken, client.pl, nil) - } -} - -// PlannedFailover - Operation to initiate a planned failover of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) plannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput PlannedFailoverInput, options *ReplicationProtectedItemsClientBeginPlannedFailoverOptions) (*http.Response, error) { - req, err := client.plannedFailoverCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// plannedFailoverCreateRequest creates the PlannedFailover request. -func (client *ReplicationProtectedItemsClient) plannedFailoverCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput PlannedFailoverInput, options *ReplicationProtectedItemsClientBeginPlannedFailoverOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/plannedFailover" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, failoverInput) -} - -// BeginPurge - The operation to delete or purge a replication protected item. This operation will force delete the replication -// protected item. Use the remove operation on replication protected item to perform a -// clean disable replication for the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// options - ReplicationProtectedItemsClientBeginPurgeOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginPurge -// method. -func (client *ReplicationProtectedItemsClient) BeginPurge(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginPurgeOptions) (*runtime.Poller[ReplicationProtectedItemsClientPurgeResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.purge(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientPurgeResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientPurgeResponse](options.ResumeToken, client.pl, nil) - } -} - -// Purge - The operation to delete or purge a replication protected item. This operation will force delete the replication -// protected item. Use the remove operation on replication protected item to perform a -// clean disable replication for the item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) purge(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginPurgeOptions) (*http.Response, error) { - req, err := client.purgeCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// purgeCreateRequest creates the Purge request. -func (client *ReplicationProtectedItemsClient) purgeCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginPurgeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// BeginRemoveDisks - Operation to remove disk(s) from the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// removeDisksInput - Remove disks input. -// options - ReplicationProtectedItemsClientBeginRemoveDisksOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginRemoveDisks -// method. -func (client *ReplicationProtectedItemsClient) BeginRemoveDisks(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, removeDisksInput RemoveDisksInput, options *ReplicationProtectedItemsClientBeginRemoveDisksOptions) (*runtime.Poller[ReplicationProtectedItemsClientRemoveDisksResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.removeDisks(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, removeDisksInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientRemoveDisksResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientRemoveDisksResponse](options.ResumeToken, client.pl, nil) - } -} - -// RemoveDisks - Operation to remove disk(s) from the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) removeDisks(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, removeDisksInput RemoveDisksInput, options *ReplicationProtectedItemsClientBeginRemoveDisksOptions) (*http.Response, error) { - req, err := client.removeDisksCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, removeDisksInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// removeDisksCreateRequest creates the RemoveDisks request. -func (client *ReplicationProtectedItemsClient) removeDisksCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, removeDisksInput RemoveDisksInput, options *ReplicationProtectedItemsClientBeginRemoveDisksOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/removeDisks" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, removeDisksInput) -} - -// BeginRepairReplication - The operation to start resynchronize/repair replication for a replication protected item requiring -// resynchronization. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - The name of the fabric. -// protectionContainerName - The name of the container. -// replicatedProtectedItemName - The name of the replication protected item. -// options - ReplicationProtectedItemsClientBeginRepairReplicationOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginRepairReplication -// method. -func (client *ReplicationProtectedItemsClient) BeginRepairReplication(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginRepairReplicationOptions) (*runtime.Poller[ReplicationProtectedItemsClientRepairReplicationResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.repairReplication(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientRepairReplicationResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientRepairReplicationResponse](options.ResumeToken, client.pl, nil) - } -} - -// RepairReplication - The operation to start resynchronize/repair replication for a replication protected item requiring -// resynchronization. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) repairReplication(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginRepairReplicationOptions) (*http.Response, error) { - req, err := client.repairReplicationCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// repairReplicationCreateRequest creates the RepairReplication request. -func (client *ReplicationProtectedItemsClient) repairReplicationCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginRepairReplicationOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/repairReplication" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginReprotect - Operation to reprotect or reverse replicate a failed over replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// reprotectInput - Reverse replication input. -// options - ReplicationProtectedItemsClientBeginReprotectOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginReprotect -// method. -func (client *ReplicationProtectedItemsClient) BeginReprotect(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, reprotectInput ReverseReplicationInput, options *ReplicationProtectedItemsClientBeginReprotectOptions) (*runtime.Poller[ReplicationProtectedItemsClientReprotectResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.reprotect(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, reprotectInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientReprotectResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientReprotectResponse](options.ResumeToken, client.pl, nil) - } -} - -// Reprotect - Operation to reprotect or reverse replicate a failed over replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) reprotect(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, reprotectInput ReverseReplicationInput, options *ReplicationProtectedItemsClientBeginReprotectOptions) (*http.Response, error) { - req, err := client.reprotectCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, reprotectInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// reprotectCreateRequest creates the Reprotect request. -func (client *ReplicationProtectedItemsClient) reprotectCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, reprotectInput ReverseReplicationInput, options *ReplicationProtectedItemsClientBeginReprotectOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/reProtect" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, reprotectInput) -} - -// BeginResolveHealthErrors - Operation to resolve health issues of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// resolveHealthInput - Health issue input object. -// options - ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginResolveHealthErrors -// method. -func (client *ReplicationProtectedItemsClient) BeginResolveHealthErrors(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, resolveHealthInput ResolveHealthInput, options *ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions) (*runtime.Poller[ReplicationProtectedItemsClientResolveHealthErrorsResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resolveHealthErrors(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, resolveHealthInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientResolveHealthErrorsResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientResolveHealthErrorsResponse](options.ResumeToken, client.pl, nil) - } -} - -// ResolveHealthErrors - Operation to resolve health issues of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) resolveHealthErrors(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, resolveHealthInput ResolveHealthInput, options *ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions) (*http.Response, error) { - req, err := client.resolveHealthErrorsCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, resolveHealthInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resolveHealthErrorsCreateRequest creates the ResolveHealthErrors request. -func (client *ReplicationProtectedItemsClient) resolveHealthErrorsCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, resolveHealthInput ResolveHealthInput, options *ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/resolveHealthErrors" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resolveHealthInput) -} - -// BeginSwitchProvider - Operation to initiate a switch provider of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// switchProviderInput - Switch provider input. -// options - ReplicationProtectedItemsClientBeginSwitchProviderOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginSwitchProvider -// method. -func (client *ReplicationProtectedItemsClient) BeginSwitchProvider(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, switchProviderInput SwitchProviderInput, options *ReplicationProtectedItemsClientBeginSwitchProviderOptions) (*runtime.Poller[ReplicationProtectedItemsClientSwitchProviderResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.switchProvider(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, switchProviderInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ReplicationProtectedItemsClientSwitchProviderResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientSwitchProviderResponse](options.ResumeToken, client.pl, nil) - } -} - -// SwitchProvider - Operation to initiate a switch provider of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) switchProvider(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, switchProviderInput SwitchProviderInput, options *ReplicationProtectedItemsClientBeginSwitchProviderOptions) (*http.Response, error) { - req, err := client.switchProviderCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, switchProviderInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// switchProviderCreateRequest creates the SwitchProvider request. -func (client *ReplicationProtectedItemsClient) switchProviderCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, switchProviderInput SwitchProviderInput, options *ReplicationProtectedItemsClientBeginSwitchProviderOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/switchProvider" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, switchProviderInput) -} - -// BeginTestFailover - Operation to perform a test failover of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// testfailoverInput - Test failover input. -// options - ReplicationProtectedItemsClientBeginTestFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginTestFailover -// method. -func (client *ReplicationProtectedItemsClient) BeginTestFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, testfailoverInput TestFailoverInput, options *ReplicationProtectedItemsClientBeginTestFailoverOptions) (*runtime.Poller[ReplicationProtectedItemsClientTestFailoverResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.testFailover(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, testfailoverInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientTestFailoverResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientTestFailoverResponse](options.ResumeToken, client.pl, nil) - } -} - -// TestFailover - Operation to perform a test failover of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) testFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, testfailoverInput TestFailoverInput, options *ReplicationProtectedItemsClientBeginTestFailoverOptions) (*http.Response, error) { - req, err := client.testFailoverCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, testfailoverInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// testFailoverCreateRequest creates the TestFailover request. -func (client *ReplicationProtectedItemsClient) testFailoverCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, testfailoverInput TestFailoverInput, options *ReplicationProtectedItemsClientBeginTestFailoverOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailover" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, testfailoverInput) -} - -// BeginTestFailoverCleanup - Operation to clean up the test failover of a replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// cleanupInput - Test failover cleanup input. -// options - ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginTestFailoverCleanup -// method. -func (client *ReplicationProtectedItemsClient) BeginTestFailoverCleanup(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, cleanupInput TestFailoverCleanupInput, options *ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions) (*runtime.Poller[ReplicationProtectedItemsClientTestFailoverCleanupResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.testFailoverCleanup(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientTestFailoverCleanupResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientTestFailoverCleanupResponse](options.ResumeToken, client.pl, nil) - } -} - -// TestFailoverCleanup - Operation to clean up the test failover of a replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) testFailoverCleanup(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, cleanupInput TestFailoverCleanupInput, options *ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions) (*http.Response, error) { - req, err := client.testFailoverCleanupCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// testFailoverCleanupCreateRequest creates the TestFailoverCleanup request. -func (client *ReplicationProtectedItemsClient) testFailoverCleanupCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, cleanupInput TestFailoverCleanupInput, options *ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailoverCleanup" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, cleanupInput) -} - -// BeginUnplannedFailover - Operation to initiate a failover of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// failoverInput - Failover input. -// options - ReplicationProtectedItemsClientBeginUnplannedFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUnplannedFailover -// method. -func (client *ReplicationProtectedItemsClient) BeginUnplannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput UnplannedFailoverInput, options *ReplicationProtectedItemsClientBeginUnplannedFailoverOptions) (*runtime.Poller[ReplicationProtectedItemsClientUnplannedFailoverResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.unplannedFailover(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientUnplannedFailoverResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientUnplannedFailoverResponse](options.ResumeToken, client.pl, nil) - } -} - -// UnplannedFailover - Operation to initiate a failover of the replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) unplannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput UnplannedFailoverInput, options *ReplicationProtectedItemsClientBeginUnplannedFailoverOptions) (*http.Response, error) { - req, err := client.unplannedFailoverCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// unplannedFailoverCreateRequest creates the UnplannedFailover request. -func (client *ReplicationProtectedItemsClient) unplannedFailoverCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput UnplannedFailoverInput, options *ReplicationProtectedItemsClientBeginUnplannedFailoverOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, failoverInput) -} - -// BeginUpdate - The operation to update the recovery settings of an ASR replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// updateProtectionInput - Update protection input. -// options - ReplicationProtectedItemsClientBeginUpdateOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdate -// method. -func (client *ReplicationProtectedItemsClient) BeginUpdate(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateProtectionInput UpdateReplicationProtectedItemInput, options *ReplicationProtectedItemsClientBeginUpdateOptions) (*runtime.Poller[ReplicationProtectedItemsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, updateProtectionInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - The operation to update the recovery settings of an ASR replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) update(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateProtectionInput UpdateReplicationProtectedItemInput, options *ReplicationProtectedItemsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, updateProtectionInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ReplicationProtectedItemsClient) updateCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateProtectionInput UpdateReplicationProtectedItemInput, options *ReplicationProtectedItemsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, updateProtectionInput) -} - -// BeginUpdateAppliance - The operation to update appliance of an ASR replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// replicatedProtectedItemName - Replication protected item name. -// applianceUpdateInput - Appliance update protection input. -// options - ReplicationProtectedItemsClientBeginUpdateApplianceOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdateAppliance -// method. -func (client *ReplicationProtectedItemsClient) BeginUpdateAppliance(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applianceUpdateInput UpdateApplianceForReplicationProtectedItemInput, options *ReplicationProtectedItemsClientBeginUpdateApplianceOptions) (*runtime.Poller[ReplicationProtectedItemsClientUpdateApplianceResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updateAppliance(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, applianceUpdateInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectedItemsClientUpdateApplianceResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientUpdateApplianceResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdateAppliance - The operation to update appliance of an ASR replication protected item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) updateAppliance(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applianceUpdateInput UpdateApplianceForReplicationProtectedItemInput, options *ReplicationProtectedItemsClientBeginUpdateApplianceOptions) (*http.Response, error) { - req, err := client.updateApplianceCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, applianceUpdateInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateApplianceCreateRequest creates the UpdateAppliance request. -func (client *ReplicationProtectedItemsClient) updateApplianceCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applianceUpdateInput UpdateApplianceForReplicationProtectedItemInput, options *ReplicationProtectedItemsClientBeginUpdateApplianceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/updateAppliance" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, applianceUpdateInput) -} - -// BeginUpdateMobilityService - The operation to update(push update) the installed mobility service software on a replication -// protected item to the latest available version. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - The name of the fabric containing the protected item. -// protectionContainerName - The name of the container containing the protected item. -// replicatedProtectedItemName - The name of the protected item on which the agent is to be updated. -// updateMobilityServiceRequest - Request to update the mobility service on the protected item. -// options - ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdateMobilityService -// method. -func (client *ReplicationProtectedItemsClient) BeginUpdateMobilityService(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateMobilityServiceRequest UpdateMobilityServiceRequest, options *ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions) (*runtime.Poller[ReplicationProtectedItemsClientUpdateMobilityServiceResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.updateMobilityService(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, updateMobilityServiceRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ReplicationProtectedItemsClientUpdateMobilityServiceResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectedItemsClientUpdateMobilityServiceResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpdateMobilityService - The operation to update(push update) the installed mobility service software on a replication protected -// item to the latest available version. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectedItemsClient) updateMobilityService(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateMobilityServiceRequest UpdateMobilityServiceRequest, options *ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions) (*http.Response, error) { - req, err := client.updateMobilityServiceCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, updateMobilityServiceRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateMobilityServiceCreateRequest creates the UpdateMobilityService request. -func (client *ReplicationProtectedItemsClient) updateMobilityServiceCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateMobilityServiceRequest UpdateMobilityServiceRequest, options *ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/updateMobilityService" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, updateMobilityServiceRequest) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectioncontainermappings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectioncontainermappings_client.go deleted file mode 100644 index 6d05e489..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectioncontainermappings_client.go +++ /dev/null @@ -1,581 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationProtectionContainerMappingsClient contains the methods for the ReplicationProtectionContainerMappings group. -// Don't use this type directly, use NewReplicationProtectionContainerMappingsClient() instead. -type ReplicationProtectionContainerMappingsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationProtectionContainerMappingsClient creates a new instance of ReplicationProtectionContainerMappingsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationProtectionContainerMappingsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectionContainerMappingsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationProtectionContainerMappingsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - The operation to create a protection container mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// mappingName - Protection container mapping name. -// creationInput - Mapping creation input. -// options - ReplicationProtectionContainerMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginCreate -// method. -func (client *ReplicationProtectionContainerMappingsClient) BeginCreate(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, creationInput CreateProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginCreateOptions) (*runtime.Poller[ReplicationProtectionContainerMappingsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, fabricName, protectionContainerName, mappingName, creationInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectionContainerMappingsClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectionContainerMappingsClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to create a protection container mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectionContainerMappingsClient) create(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, creationInput CreateProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, fabricName, protectionContainerName, mappingName, creationInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationProtectionContainerMappingsClient) createCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, creationInput CreateProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if mappingName == "" { - return nil, errors.New("parameter mappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mappingName}", url.PathEscape(mappingName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, creationInput) -} - -// BeginDelete - The operation to delete or remove a protection container mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// mappingName - Protection container mapping name. -// removalInput - Removal input. -// options - ReplicationProtectionContainerMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginDelete -// method. -func (client *ReplicationProtectionContainerMappingsClient) BeginDelete(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, removalInput RemoveProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginDeleteOptions) (*runtime.Poller[ReplicationProtectionContainerMappingsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, fabricName, protectionContainerName, mappingName, removalInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectionContainerMappingsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectionContainerMappingsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - The operation to delete or remove a protection container mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectionContainerMappingsClient) deleteOperation(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, removalInput RemoveProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, fabricName, protectionContainerName, mappingName, removalInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationProtectionContainerMappingsClient) deleteCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, removalInput RemoveProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if mappingName == "" { - return nil, errors.New("parameter mappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mappingName}", url.PathEscape(mappingName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, runtime.MarshalAsJSON(req, removalInput) -} - -// Get - Gets the details of a protection container mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// mappingName - Protection Container mapping name. -// options - ReplicationProtectionContainerMappingsClientGetOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.Get -// method. -func (client *ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, options *ReplicationProtectionContainerMappingsClientGetOptions) (ReplicationProtectionContainerMappingsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, protectionContainerName, mappingName, options) - if err != nil { - return ReplicationProtectionContainerMappingsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectionContainerMappingsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectionContainerMappingsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationProtectionContainerMappingsClient) getCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, options *ReplicationProtectionContainerMappingsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if mappingName == "" { - return nil, errors.New("parameter mappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mappingName}", url.PathEscape(mappingName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationProtectionContainerMappingsClient) getHandleResponse(resp *http.Response) (ReplicationProtectionContainerMappingsClientGetResponse, error) { - result := ReplicationProtectionContainerMappingsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerMapping); err != nil { - return ReplicationProtectionContainerMappingsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the protection container mappings in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationProtectionContainerMappingsClientListOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.List -// method. -func (client *ReplicationProtectionContainerMappingsClient) NewListPager(options *ReplicationProtectionContainerMappingsClientListOptions) *runtime.Pager[ReplicationProtectionContainerMappingsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionContainerMappingsClientListResponse]{ - More: func(page ReplicationProtectionContainerMappingsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationProtectionContainerMappingsClientListResponse) (ReplicationProtectionContainerMappingsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationProtectionContainerMappingsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectionContainerMappingsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectionContainerMappingsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationProtectionContainerMappingsClient) listCreateRequest(ctx context.Context, options *ReplicationProtectionContainerMappingsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainerMappings" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationProtectionContainerMappingsClient) listHandleResponse(resp *http.Response) (ReplicationProtectionContainerMappingsClientListResponse, error) { - result := ReplicationProtectionContainerMappingsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerMappingCollection); err != nil { - return ReplicationProtectionContainerMappingsClientListResponse{}, err - } - return result, nil -} - -// NewListByReplicationProtectionContainersPager - Lists the protection container mappings for a protection container. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// options - ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions contains the optional -// parameters for the ReplicationProtectionContainerMappingsClient.ListByReplicationProtectionContainers method. -func (client *ReplicationProtectionContainerMappingsClient) NewListByReplicationProtectionContainersPager(fabricName string, protectionContainerName string, options *ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions) *runtime.Pager[ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse]{ - More: func(page ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse) (ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationProtectionContainersCreateRequest(ctx, fabricName, protectionContainerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationProtectionContainersHandleResponse(resp) - }, - }) -} - -// listByReplicationProtectionContainersCreateRequest creates the ListByReplicationProtectionContainers request. -func (client *ReplicationProtectionContainerMappingsClient) listByReplicationProtectionContainersCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, options *ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationProtectionContainersHandleResponse handles the ListByReplicationProtectionContainers response. -func (client *ReplicationProtectionContainerMappingsClient) listByReplicationProtectionContainersHandleResponse(resp *http.Response) (ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse, error) { - result := ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerMappingCollection); err != nil { - return ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse{}, err - } - return result, nil -} - -// BeginPurge - The operation to purge(force delete) a protection container mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// mappingName - Protection container mapping name. -// options - ReplicationProtectionContainerMappingsClientBeginPurgeOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginPurge -// method. -func (client *ReplicationProtectionContainerMappingsClient) BeginPurge(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, options *ReplicationProtectionContainerMappingsClientBeginPurgeOptions) (*runtime.Poller[ReplicationProtectionContainerMappingsClientPurgeResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.purge(ctx, fabricName, protectionContainerName, mappingName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectionContainerMappingsClientPurgeResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectionContainerMappingsClientPurgeResponse](options.ResumeToken, client.pl, nil) - } -} - -// Purge - The operation to purge(force delete) a protection container mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectionContainerMappingsClient) purge(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, options *ReplicationProtectionContainerMappingsClientBeginPurgeOptions) (*http.Response, error) { - req, err := client.purgeCreateRequest(ctx, fabricName, protectionContainerName, mappingName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// purgeCreateRequest creates the Purge request. -func (client *ReplicationProtectionContainerMappingsClient) purgeCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, options *ReplicationProtectionContainerMappingsClientBeginPurgeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if mappingName == "" { - return nil, errors.New("parameter mappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mappingName}", url.PathEscape(mappingName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// BeginUpdate - The operation to update protection container mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// mappingName - Protection container mapping name. -// updateInput - Mapping update input. -// options - ReplicationProtectionContainerMappingsClientBeginUpdateOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginUpdate -// method. -func (client *ReplicationProtectionContainerMappingsClient) BeginUpdate(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, updateInput UpdateProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginUpdateOptions) (*runtime.Poller[ReplicationProtectionContainerMappingsClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, fabricName, protectionContainerName, mappingName, updateInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectionContainerMappingsClientUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectionContainerMappingsClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - The operation to update protection container mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectionContainerMappingsClient) update(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, updateInput UpdateProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, fabricName, protectionContainerName, mappingName, updateInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ReplicationProtectionContainerMappingsClient) updateCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, updateInput UpdateProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if mappingName == "" { - return nil, errors.New("parameter mappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{mappingName}", url.PathEscape(mappingName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, updateInput) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectioncontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectioncontainers_client.go deleted file mode 100644 index 272f556d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectioncontainers_client.go +++ /dev/null @@ -1,552 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationProtectionContainersClient contains the methods for the ReplicationProtectionContainers group. -// Don't use this type directly, use NewReplicationProtectionContainersClient() instead. -type ReplicationProtectionContainersClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationProtectionContainersClient creates a new instance of ReplicationProtectionContainersClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationProtectionContainersClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectionContainersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationProtectionContainersClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - Operation to create a protection container. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric ARM name. -// protectionContainerName - Unique protection container ARM name. -// creationInput - Creation input. -// options - ReplicationProtectionContainersClientBeginCreateOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginCreate -// method. -func (client *ReplicationProtectionContainersClient) BeginCreate(ctx context.Context, fabricName string, protectionContainerName string, creationInput CreateProtectionContainerInput, options *ReplicationProtectionContainersClientBeginCreateOptions) (*runtime.Poller[ReplicationProtectionContainersClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, fabricName, protectionContainerName, creationInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectionContainersClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectionContainersClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - Operation to create a protection container. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectionContainersClient) create(ctx context.Context, fabricName string, protectionContainerName string, creationInput CreateProtectionContainerInput, options *ReplicationProtectionContainersClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, fabricName, protectionContainerName, creationInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationProtectionContainersClient) createCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, creationInput CreateProtectionContainerInput, options *ReplicationProtectionContainersClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, creationInput) -} - -// BeginDelete - Operation to remove a protection container. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric ARM name. -// protectionContainerName - Unique protection container ARM name. -// options - ReplicationProtectionContainersClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginDelete -// method. -func (client *ReplicationProtectionContainersClient) BeginDelete(ctx context.Context, fabricName string, protectionContainerName string, options *ReplicationProtectionContainersClientBeginDeleteOptions) (*runtime.Poller[ReplicationProtectionContainersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, fabricName, protectionContainerName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectionContainersClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectionContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Operation to remove a protection container. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectionContainersClient) deleteOperation(ctx context.Context, fabricName string, protectionContainerName string, options *ReplicationProtectionContainersClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, fabricName, protectionContainerName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationProtectionContainersClient) deleteCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, options *ReplicationProtectionContainersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// BeginDiscoverProtectableItem - The operation to a add a protectable item to a protection container(Add physical server). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - The name of the fabric. -// protectionContainerName - The name of the protection container. -// discoverProtectableItemRequest - The request object to add a protectable item. -// options - ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions contains the optional parameters for -// the ReplicationProtectionContainersClient.BeginDiscoverProtectableItem method. -func (client *ReplicationProtectionContainersClient) BeginDiscoverProtectableItem(ctx context.Context, fabricName string, protectionContainerName string, discoverProtectableItemRequest DiscoverProtectableItemRequest, options *ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions) (*runtime.Poller[ReplicationProtectionContainersClientDiscoverProtectableItemResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.discoverProtectableItem(ctx, fabricName, protectionContainerName, discoverProtectableItemRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectionContainersClientDiscoverProtectableItemResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectionContainersClientDiscoverProtectableItemResponse](options.ResumeToken, client.pl, nil) - } -} - -// DiscoverProtectableItem - The operation to a add a protectable item to a protection container(Add physical server). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectionContainersClient) discoverProtectableItem(ctx context.Context, fabricName string, protectionContainerName string, discoverProtectableItemRequest DiscoverProtectableItemRequest, options *ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions) (*http.Response, error) { - req, err := client.discoverProtectableItemCreateRequest(ctx, fabricName, protectionContainerName, discoverProtectableItemRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// discoverProtectableItemCreateRequest creates the DiscoverProtectableItem request. -func (client *ReplicationProtectionContainersClient) discoverProtectableItemCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, discoverProtectableItemRequest DiscoverProtectableItemRequest, options *ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/discoverProtectableItem" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, discoverProtectableItemRequest) -} - -// Get - Gets the details of a protection container. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - Protection container name. -// options - ReplicationProtectionContainersClientGetOptions contains the optional parameters for the ReplicationProtectionContainersClient.Get -// method. -func (client *ReplicationProtectionContainersClient) Get(ctx context.Context, fabricName string, protectionContainerName string, options *ReplicationProtectionContainersClientGetOptions) (ReplicationProtectionContainersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, protectionContainerName, options) - if err != nil { - return ReplicationProtectionContainersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectionContainersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectionContainersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationProtectionContainersClient) getCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, options *ReplicationProtectionContainersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationProtectionContainersClient) getHandleResponse(resp *http.Response) (ReplicationProtectionContainersClientGetResponse, error) { - result := ReplicationProtectionContainersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainer); err != nil { - return ReplicationProtectionContainersClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the protection containers in a vault. -// Generated from API version 2022-10-01 -// options - ReplicationProtectionContainersClientListOptions contains the optional parameters for the ReplicationProtectionContainersClient.List -// method. -func (client *ReplicationProtectionContainersClient) NewListPager(options *ReplicationProtectionContainersClientListOptions) *runtime.Pager[ReplicationProtectionContainersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionContainersClientListResponse]{ - More: func(page ReplicationProtectionContainersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationProtectionContainersClientListResponse) (ReplicationProtectionContainersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationProtectionContainersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectionContainersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectionContainersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationProtectionContainersClient) listCreateRequest(ctx context.Context, options *ReplicationProtectionContainersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainers" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationProtectionContainersClient) listHandleResponse(resp *http.Response) (ReplicationProtectionContainersClientListResponse, error) { - result := ReplicationProtectionContainersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerCollection); err != nil { - return ReplicationProtectionContainersClientListResponse{}, err - } - return result, nil -} - -// NewListByReplicationFabricsPager - Lists the protection containers in the specified fabric. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// options - ReplicationProtectionContainersClientListByReplicationFabricsOptions contains the optional parameters for the -// ReplicationProtectionContainersClient.ListByReplicationFabrics method. -func (client *ReplicationProtectionContainersClient) NewListByReplicationFabricsPager(fabricName string, options *ReplicationProtectionContainersClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationProtectionContainersClientListByReplicationFabricsResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionContainersClientListByReplicationFabricsResponse]{ - More: func(page ReplicationProtectionContainersClientListByReplicationFabricsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationProtectionContainersClientListByReplicationFabricsResponse) (ReplicationProtectionContainersClientListByReplicationFabricsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationFabricsCreateRequest(ctx, fabricName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationProtectionContainersClientListByReplicationFabricsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectionContainersClientListByReplicationFabricsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectionContainersClientListByReplicationFabricsResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationFabricsHandleResponse(resp) - }, - }) -} - -// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. -func (client *ReplicationProtectionContainersClient) listByReplicationFabricsCreateRequest(ctx context.Context, fabricName string, options *ReplicationProtectionContainersClientListByReplicationFabricsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. -func (client *ReplicationProtectionContainersClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationProtectionContainersClientListByReplicationFabricsResponse, error) { - result := ReplicationProtectionContainersClientListByReplicationFabricsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerCollection); err != nil { - return ReplicationProtectionContainersClientListByReplicationFabricsResponse{}, err - } - return result, nil -} - -// BeginSwitchProtection - Operation to switch protection from one container to another or one replication provider to another. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Unique fabric name. -// protectionContainerName - Protection container name. -// switchInput - Switch protection input. -// options - ReplicationProtectionContainersClientBeginSwitchProtectionOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginSwitchProtection -// method. -func (client *ReplicationProtectionContainersClient) BeginSwitchProtection(ctx context.Context, fabricName string, protectionContainerName string, switchInput SwitchProtectionInput, options *ReplicationProtectionContainersClientBeginSwitchProtectionOptions) (*runtime.Poller[ReplicationProtectionContainersClientSwitchProtectionResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.switchProtection(ctx, fabricName, protectionContainerName, switchInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationProtectionContainersClientSwitchProtectionResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationProtectionContainersClientSwitchProtectionResponse](options.ResumeToken, client.pl, nil) - } -} - -// SwitchProtection - Operation to switch protection from one container to another or one replication provider to another. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationProtectionContainersClient) switchProtection(ctx context.Context, fabricName string, protectionContainerName string, switchInput SwitchProtectionInput, options *ReplicationProtectionContainersClientBeginSwitchProtectionOptions) (*http.Response, error) { - req, err := client.switchProtectionCreateRequest(ctx, fabricName, protectionContainerName, switchInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// switchProtectionCreateRequest creates the SwitchProtection request. -func (client *ReplicationProtectionContainersClient) switchProtectionCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, switchInput SwitchProtectionInput, options *ReplicationProtectionContainersClientBeginSwitchProtectionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, switchInput) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectionintents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectionintents_client.go deleted file mode 100644 index 8a19524b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationprotectionintents_client.go +++ /dev/null @@ -1,256 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationProtectionIntentsClient contains the methods for the ReplicationProtectionIntents group. -// Don't use this type directly, use NewReplicationProtectionIntentsClient() instead. -type ReplicationProtectionIntentsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationProtectionIntentsClient creates a new instance of ReplicationProtectionIntentsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationProtectionIntentsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectionIntentsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationProtectionIntentsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Create - The operation to create an ASR replication protection intent item. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// intentObjectName - A name for the replication protection item. -// input - Create Protection Intent Input. -// options - ReplicationProtectionIntentsClientCreateOptions contains the optional parameters for the ReplicationProtectionIntentsClient.Create -// method. -func (client *ReplicationProtectionIntentsClient) Create(ctx context.Context, intentObjectName string, input CreateProtectionIntentInput, options *ReplicationProtectionIntentsClientCreateOptions) (ReplicationProtectionIntentsClientCreateResponse, error) { - req, err := client.createCreateRequest(ctx, intentObjectName, input, options) - if err != nil { - return ReplicationProtectionIntentsClientCreateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectionIntentsClientCreateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectionIntentsClientCreateResponse{}, runtime.NewResponseError(resp) - } - return client.createHandleResponse(resp) -} - -// createCreateRequest creates the Create request. -func (client *ReplicationProtectionIntentsClient) createCreateRequest(ctx context.Context, intentObjectName string, input CreateProtectionIntentInput, options *ReplicationProtectionIntentsClientCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents/{intentObjectName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if intentObjectName == "" { - return nil, errors.New("parameter intentObjectName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{intentObjectName}", url.PathEscape(intentObjectName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// createHandleResponse handles the Create response. -func (client *ReplicationProtectionIntentsClient) createHandleResponse(resp *http.Response) (ReplicationProtectionIntentsClientCreateResponse, error) { - result := ReplicationProtectionIntentsClientCreateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectionIntent); err != nil { - return ReplicationProtectionIntentsClientCreateResponse{}, err - } - return result, nil -} - -// Get - Gets the details of an ASR replication protection intent. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// intentObjectName - Replication protection intent name. -// options - ReplicationProtectionIntentsClientGetOptions contains the optional parameters for the ReplicationProtectionIntentsClient.Get -// method. -func (client *ReplicationProtectionIntentsClient) Get(ctx context.Context, intentObjectName string, options *ReplicationProtectionIntentsClientGetOptions) (ReplicationProtectionIntentsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, intentObjectName, options) - if err != nil { - return ReplicationProtectionIntentsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectionIntentsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectionIntentsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationProtectionIntentsClient) getCreateRequest(ctx context.Context, intentObjectName string, options *ReplicationProtectionIntentsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents/{intentObjectName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if intentObjectName == "" { - return nil, errors.New("parameter intentObjectName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{intentObjectName}", url.PathEscape(intentObjectName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationProtectionIntentsClient) getHandleResponse(resp *http.Response) (ReplicationProtectionIntentsClientGetResponse, error) { - result := ReplicationProtectionIntentsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectionIntent); err != nil { - return ReplicationProtectionIntentsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets the list of ASR replication protection intent objects in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationProtectionIntentsClientListOptions contains the optional parameters for the ReplicationProtectionIntentsClient.List -// method. -func (client *ReplicationProtectionIntentsClient) NewListPager(options *ReplicationProtectionIntentsClientListOptions) *runtime.Pager[ReplicationProtectionIntentsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionIntentsClientListResponse]{ - More: func(page ReplicationProtectionIntentsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationProtectionIntentsClientListResponse) (ReplicationProtectionIntentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationProtectionIntentsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationProtectionIntentsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationProtectionIntentsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationProtectionIntentsClient) listCreateRequest(ctx context.Context, options *ReplicationProtectionIntentsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.SkipToken != nil { - reqQP.Set("skipToken", *options.SkipToken) - } - if options != nil && options.TakeToken != nil { - reqQP.Set("takeToken", *options.TakeToken) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationProtectionIntentsClient) listHandleResponse(resp *http.Response) (ReplicationProtectionIntentsClientListResponse, error) { - result := ReplicationProtectionIntentsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectionIntentCollection); err != nil { - return ReplicationProtectionIntentsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationrecoveryplans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationrecoveryplans_client.go deleted file mode 100644 index 4ca3fd03..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationrecoveryplans_client.go +++ /dev/null @@ -1,854 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationRecoveryPlansClient contains the methods for the ReplicationRecoveryPlans group. -// Don't use this type directly, use NewReplicationRecoveryPlansClient() instead. -type ReplicationRecoveryPlansClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationRecoveryPlansClient creates a new instance of ReplicationRecoveryPlansClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationRecoveryPlansClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationRecoveryPlansClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationRecoveryPlansClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - The operation to create a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Recovery plan name. -// input - Recovery Plan creation input. -// options - ReplicationRecoveryPlansClientBeginCreateOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginCreate -// method. -func (client *ReplicationRecoveryPlansClient) BeginCreate(ctx context.Context, recoveryPlanName string, input CreateRecoveryPlanInput, options *ReplicationRecoveryPlansClientBeginCreateOptions) (*runtime.Poller[ReplicationRecoveryPlansClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryPlansClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryPlansClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to create a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryPlansClient) create(ctx context.Context, recoveryPlanName string, input CreateRecoveryPlanInput, options *ReplicationRecoveryPlansClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationRecoveryPlansClient) createCreateRequest(ctx context.Context, recoveryPlanName string, input CreateRecoveryPlanInput, options *ReplicationRecoveryPlansClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginDelete - Delete a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Recovery plan name. -// options - ReplicationRecoveryPlansClientBeginDeleteOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginDelete -// method. -func (client *ReplicationRecoveryPlansClient) BeginDelete(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginDeleteOptions) (*runtime.Poller[ReplicationRecoveryPlansClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, recoveryPlanName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryPlansClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryPlansClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Delete a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryPlansClient) deleteOperation(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, recoveryPlanName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationRecoveryPlansClient) deleteCreateRequest(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// BeginFailoverCancel - The operation to cancel the failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Recovery plan name. -// options - ReplicationRecoveryPlansClientBeginFailoverCancelOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginFailoverCancel -// method. -func (client *ReplicationRecoveryPlansClient) BeginFailoverCancel(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginFailoverCancelOptions) (*runtime.Poller[ReplicationRecoveryPlansClientFailoverCancelResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.failoverCancel(ctx, recoveryPlanName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryPlansClientFailoverCancelResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryPlansClientFailoverCancelResponse](options.ResumeToken, client.pl, nil) - } -} - -// FailoverCancel - The operation to cancel the failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryPlansClient) failoverCancel(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginFailoverCancelOptions) (*http.Response, error) { - req, err := client.failoverCancelCreateRequest(ctx, recoveryPlanName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// failoverCancelCreateRequest creates the FailoverCancel request. -func (client *ReplicationRecoveryPlansClient) failoverCancelCreateRequest(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginFailoverCancelOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCancel" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginFailoverCommit - The operation to commit the failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Recovery plan name. -// options - ReplicationRecoveryPlansClientBeginFailoverCommitOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginFailoverCommit -// method. -func (client *ReplicationRecoveryPlansClient) BeginFailoverCommit(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginFailoverCommitOptions) (*runtime.Poller[ReplicationRecoveryPlansClientFailoverCommitResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.failoverCommit(ctx, recoveryPlanName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryPlansClientFailoverCommitResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryPlansClientFailoverCommitResponse](options.ResumeToken, client.pl, nil) - } -} - -// FailoverCommit - The operation to commit the failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryPlansClient) failoverCommit(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginFailoverCommitOptions) (*http.Response, error) { - req, err := client.failoverCommitCreateRequest(ctx, recoveryPlanName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// failoverCommitCreateRequest creates the FailoverCommit request. -func (client *ReplicationRecoveryPlansClient) failoverCommitCreateRequest(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginFailoverCommitOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCommit" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the details of the recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Name of the recovery plan. -// options - ReplicationRecoveryPlansClientGetOptions contains the optional parameters for the ReplicationRecoveryPlansClient.Get -// method. -func (client *ReplicationRecoveryPlansClient) Get(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientGetOptions) (ReplicationRecoveryPlansClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, recoveryPlanName, options) - if err != nil { - return ReplicationRecoveryPlansClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationRecoveryPlansClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationRecoveryPlansClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationRecoveryPlansClient) getCreateRequest(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationRecoveryPlansClient) getHandleResponse(resp *http.Response) (ReplicationRecoveryPlansClientGetResponse, error) { - result := ReplicationRecoveryPlansClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPlan); err != nil { - return ReplicationRecoveryPlansClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the recovery plans in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationRecoveryPlansClientListOptions contains the optional parameters for the ReplicationRecoveryPlansClient.List -// method. -func (client *ReplicationRecoveryPlansClient) NewListPager(options *ReplicationRecoveryPlansClientListOptions) *runtime.Pager[ReplicationRecoveryPlansClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationRecoveryPlansClientListResponse]{ - More: func(page ReplicationRecoveryPlansClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationRecoveryPlansClientListResponse) (ReplicationRecoveryPlansClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationRecoveryPlansClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationRecoveryPlansClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationRecoveryPlansClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationRecoveryPlansClient) listCreateRequest(ctx context.Context, options *ReplicationRecoveryPlansClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationRecoveryPlansClient) listHandleResponse(resp *http.Response) (ReplicationRecoveryPlansClientListResponse, error) { - result := ReplicationRecoveryPlansClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPlanCollection); err != nil { - return ReplicationRecoveryPlansClientListResponse{}, err - } - return result, nil -} - -// BeginPlannedFailover - The operation to start the planned failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Recovery plan name. -// input - Failover input. -// options - ReplicationRecoveryPlansClientBeginPlannedFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginPlannedFailover -// method. -func (client *ReplicationRecoveryPlansClient) BeginPlannedFailover(ctx context.Context, recoveryPlanName string, input RecoveryPlanPlannedFailoverInput, options *ReplicationRecoveryPlansClientBeginPlannedFailoverOptions) (*runtime.Poller[ReplicationRecoveryPlansClientPlannedFailoverResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.plannedFailover(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryPlansClientPlannedFailoverResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryPlansClientPlannedFailoverResponse](options.ResumeToken, client.pl, nil) - } -} - -// PlannedFailover - The operation to start the planned failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryPlansClient) plannedFailover(ctx context.Context, recoveryPlanName string, input RecoveryPlanPlannedFailoverInput, options *ReplicationRecoveryPlansClientBeginPlannedFailoverOptions) (*http.Response, error) { - req, err := client.plannedFailoverCreateRequest(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// plannedFailoverCreateRequest creates the PlannedFailover request. -func (client *ReplicationRecoveryPlansClient) plannedFailoverCreateRequest(ctx context.Context, recoveryPlanName string, input RecoveryPlanPlannedFailoverInput, options *ReplicationRecoveryPlansClientBeginPlannedFailoverOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/plannedFailover" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginReprotect - The operation to reprotect(reverse replicate) a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Recovery plan name. -// options - ReplicationRecoveryPlansClientBeginReprotectOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginReprotect -// method. -func (client *ReplicationRecoveryPlansClient) BeginReprotect(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginReprotectOptions) (*runtime.Poller[ReplicationRecoveryPlansClientReprotectResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.reprotect(ctx, recoveryPlanName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryPlansClientReprotectResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryPlansClientReprotectResponse](options.ResumeToken, client.pl, nil) - } -} - -// Reprotect - The operation to reprotect(reverse replicate) a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryPlansClient) reprotect(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginReprotectOptions) (*http.Response, error) { - req, err := client.reprotectCreateRequest(ctx, recoveryPlanName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// reprotectCreateRequest creates the Reprotect request. -func (client *ReplicationRecoveryPlansClient) reprotectCreateRequest(ctx context.Context, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginReprotectOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/reProtect" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginTestFailover - The operation to start the test failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Recovery plan name. -// input - Recovery plan test failover input. -// options - ReplicationRecoveryPlansClientBeginTestFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginTestFailover -// method. -func (client *ReplicationRecoveryPlansClient) BeginTestFailover(ctx context.Context, recoveryPlanName string, input RecoveryPlanTestFailoverInput, options *ReplicationRecoveryPlansClientBeginTestFailoverOptions) (*runtime.Poller[ReplicationRecoveryPlansClientTestFailoverResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.testFailover(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryPlansClientTestFailoverResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryPlansClientTestFailoverResponse](options.ResumeToken, client.pl, nil) - } -} - -// TestFailover - The operation to start the test failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryPlansClient) testFailover(ctx context.Context, recoveryPlanName string, input RecoveryPlanTestFailoverInput, options *ReplicationRecoveryPlansClientBeginTestFailoverOptions) (*http.Response, error) { - req, err := client.testFailoverCreateRequest(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// testFailoverCreateRequest creates the TestFailover request. -func (client *ReplicationRecoveryPlansClient) testFailoverCreateRequest(ctx context.Context, recoveryPlanName string, input RecoveryPlanTestFailoverInput, options *ReplicationRecoveryPlansClientBeginTestFailoverOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailover" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginTestFailoverCleanup - The operation to cleanup test failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Recovery plan name. -// input - Recovery plan test failover cleanup input. -// options - ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginTestFailoverCleanup -// method. -func (client *ReplicationRecoveryPlansClient) BeginTestFailoverCleanup(ctx context.Context, recoveryPlanName string, input RecoveryPlanTestFailoverCleanupInput, options *ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions) (*runtime.Poller[ReplicationRecoveryPlansClientTestFailoverCleanupResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.testFailoverCleanup(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryPlansClientTestFailoverCleanupResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryPlansClientTestFailoverCleanupResponse](options.ResumeToken, client.pl, nil) - } -} - -// TestFailoverCleanup - The operation to cleanup test failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryPlansClient) testFailoverCleanup(ctx context.Context, recoveryPlanName string, input RecoveryPlanTestFailoverCleanupInput, options *ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions) (*http.Response, error) { - req, err := client.testFailoverCleanupCreateRequest(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// testFailoverCleanupCreateRequest creates the TestFailoverCleanup request. -func (client *ReplicationRecoveryPlansClient) testFailoverCleanupCreateRequest(ctx context.Context, recoveryPlanName string, input RecoveryPlanTestFailoverCleanupInput, options *ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailoverCleanup" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginUnplannedFailover - The operation to start the unplanned failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Recovery plan name. -// input - Recovery plan unplanned failover input. -// options - ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginUnplannedFailover -// method. -func (client *ReplicationRecoveryPlansClient) BeginUnplannedFailover(ctx context.Context, recoveryPlanName string, input RecoveryPlanUnplannedFailoverInput, options *ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions) (*runtime.Poller[ReplicationRecoveryPlansClientUnplannedFailoverResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.unplannedFailover(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryPlansClientUnplannedFailoverResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryPlansClientUnplannedFailoverResponse](options.ResumeToken, client.pl, nil) - } -} - -// UnplannedFailover - The operation to start the unplanned failover of a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryPlansClient) unplannedFailover(ctx context.Context, recoveryPlanName string, input RecoveryPlanUnplannedFailoverInput, options *ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions) (*http.Response, error) { - req, err := client.unplannedFailoverCreateRequest(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// unplannedFailoverCreateRequest creates the UnplannedFailover request. -func (client *ReplicationRecoveryPlansClient) unplannedFailoverCreateRequest(ctx context.Context, recoveryPlanName string, input RecoveryPlanUnplannedFailoverInput, options *ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/unplannedFailover" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// BeginUpdate - The operation to update a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// recoveryPlanName - Recovery plan name. -// input - Update recovery plan input. -// options - ReplicationRecoveryPlansClientBeginUpdateOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginUpdate -// method. -func (client *ReplicationRecoveryPlansClient) BeginUpdate(ctx context.Context, recoveryPlanName string, input UpdateRecoveryPlanInput, options *ReplicationRecoveryPlansClientBeginUpdateOptions) (*runtime.Poller[ReplicationRecoveryPlansClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryPlansClientUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryPlansClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - The operation to update a recovery plan. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryPlansClient) update(ctx context.Context, recoveryPlanName string, input UpdateRecoveryPlanInput, options *ReplicationRecoveryPlansClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, recoveryPlanName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ReplicationRecoveryPlansClient) updateCreateRequest(ctx context.Context, recoveryPlanName string, input UpdateRecoveryPlanInput, options *ReplicationRecoveryPlansClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if recoveryPlanName == "" { - return nil, errors.New("parameter recoveryPlanName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationrecoveryservicesproviders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationrecoveryservicesproviders_client.go deleted file mode 100644 index afdbcada..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationrecoveryservicesproviders_client.go +++ /dev/null @@ -1,549 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationRecoveryServicesProvidersClient contains the methods for the ReplicationRecoveryServicesProviders group. -// Don't use this type directly, use NewReplicationRecoveryServicesProvidersClient() instead. -type ReplicationRecoveryServicesProvidersClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationRecoveryServicesProvidersClient creates a new instance of ReplicationRecoveryServicesProvidersClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationRecoveryServicesProvidersClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationRecoveryServicesProvidersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationRecoveryServicesProvidersClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - The operation to add a recovery services provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// providerName - Recovery services provider name. -// addProviderInput - Add provider input. -// options - ReplicationRecoveryServicesProvidersClientBeginCreateOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginCreate -// method. -func (client *ReplicationRecoveryServicesProvidersClient) BeginCreate(ctx context.Context, fabricName string, providerName string, addProviderInput AddRecoveryServicesProviderInput, options *ReplicationRecoveryServicesProvidersClientBeginCreateOptions) (*runtime.Poller[ReplicationRecoveryServicesProvidersClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, fabricName, providerName, addProviderInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryServicesProvidersClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryServicesProvidersClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to add a recovery services provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryServicesProvidersClient) create(ctx context.Context, fabricName string, providerName string, addProviderInput AddRecoveryServicesProviderInput, options *ReplicationRecoveryServicesProvidersClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, fabricName, providerName, addProviderInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationRecoveryServicesProvidersClient) createCreateRequest(ctx context.Context, fabricName string, providerName string, addProviderInput AddRecoveryServicesProviderInput, options *ReplicationRecoveryServicesProvidersClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if providerName == "" { - return nil, errors.New("parameter providerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{providerName}", url.PathEscape(providerName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, addProviderInput) -} - -// BeginDelete - The operation to removes/delete(unregister) a recovery services provider from the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// providerName - Recovery services provider name. -// options - ReplicationRecoveryServicesProvidersClientBeginDeleteOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginDelete -// method. -func (client *ReplicationRecoveryServicesProvidersClient) BeginDelete(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginDeleteOptions) (*runtime.Poller[ReplicationRecoveryServicesProvidersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, fabricName, providerName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryServicesProvidersClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryServicesProvidersClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - The operation to removes/delete(unregister) a recovery services provider from the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryServicesProvidersClient) deleteOperation(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, fabricName, providerName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationRecoveryServicesProvidersClient) deleteCreateRequest(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if providerName == "" { - return nil, errors.New("parameter providerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{providerName}", url.PathEscape(providerName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets the details of registered recovery services provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// providerName - Recovery services provider name. -// options - ReplicationRecoveryServicesProvidersClientGetOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.Get -// method. -func (client *ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientGetOptions) (ReplicationRecoveryServicesProvidersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, providerName, options) - if err != nil { - return ReplicationRecoveryServicesProvidersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationRecoveryServicesProvidersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationRecoveryServicesProvidersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationRecoveryServicesProvidersClient) getCreateRequest(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if providerName == "" { - return nil, errors.New("parameter providerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{providerName}", url.PathEscape(providerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationRecoveryServicesProvidersClient) getHandleResponse(resp *http.Response) (ReplicationRecoveryServicesProvidersClientGetResponse, error) { - result := ReplicationRecoveryServicesProvidersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryServicesProvider); err != nil { - return ReplicationRecoveryServicesProvidersClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the registered recovery services providers in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationRecoveryServicesProvidersClientListOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.List -// method. -func (client *ReplicationRecoveryServicesProvidersClient) NewListPager(options *ReplicationRecoveryServicesProvidersClientListOptions) *runtime.Pager[ReplicationRecoveryServicesProvidersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationRecoveryServicesProvidersClientListResponse]{ - More: func(page ReplicationRecoveryServicesProvidersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationRecoveryServicesProvidersClientListResponse) (ReplicationRecoveryServicesProvidersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationRecoveryServicesProvidersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationRecoveryServicesProvidersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationRecoveryServicesProvidersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationRecoveryServicesProvidersClient) listCreateRequest(ctx context.Context, options *ReplicationRecoveryServicesProvidersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryServicesProviders" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationRecoveryServicesProvidersClient) listHandleResponse(resp *http.Response) (ReplicationRecoveryServicesProvidersClientListResponse, error) { - result := ReplicationRecoveryServicesProvidersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryServicesProviderCollection); err != nil { - return ReplicationRecoveryServicesProvidersClientListResponse{}, err - } - return result, nil -} - -// NewListByReplicationFabricsPager - Lists the registered recovery services providers for the specified fabric. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// options - ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions contains the optional parameters for -// the ReplicationRecoveryServicesProvidersClient.ListByReplicationFabrics method. -func (client *ReplicationRecoveryServicesProvidersClient) NewListByReplicationFabricsPager(fabricName string, options *ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse]{ - More: func(page ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse) (ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationFabricsCreateRequest(ctx, fabricName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationFabricsHandleResponse(resp) - }, - }) -} - -// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. -func (client *ReplicationRecoveryServicesProvidersClient) listByReplicationFabricsCreateRequest(ctx context.Context, fabricName string, options *ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. -func (client *ReplicationRecoveryServicesProvidersClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse, error) { - result := ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryServicesProviderCollection); err != nil { - return ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse{}, err - } - return result, nil -} - -// BeginPurge - The operation to purge(force delete) a recovery services provider from the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// providerName - Recovery services provider name. -// options - ReplicationRecoveryServicesProvidersClientBeginPurgeOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginPurge -// method. -func (client *ReplicationRecoveryServicesProvidersClient) BeginPurge(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginPurgeOptions) (*runtime.Poller[ReplicationRecoveryServicesProvidersClientPurgeResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.purge(ctx, fabricName, providerName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryServicesProvidersClientPurgeResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryServicesProvidersClientPurgeResponse](options.ResumeToken, client.pl, nil) - } -} - -// Purge - The operation to purge(force delete) a recovery services provider from the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryServicesProvidersClient) purge(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginPurgeOptions) (*http.Response, error) { - req, err := client.purgeCreateRequest(ctx, fabricName, providerName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// purgeCreateRequest creates the Purge request. -func (client *ReplicationRecoveryServicesProvidersClient) purgeCreateRequest(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginPurgeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if providerName == "" { - return nil, errors.New("parameter providerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{providerName}", url.PathEscape(providerName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// BeginRefreshProvider - The operation to refresh the information from the recovery services provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// providerName - Recovery services provider name. -// options - ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions contains the optional parameters for the -// ReplicationRecoveryServicesProvidersClient.BeginRefreshProvider method. -func (client *ReplicationRecoveryServicesProvidersClient) BeginRefreshProvider(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions) (*runtime.Poller[ReplicationRecoveryServicesProvidersClientRefreshProviderResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.refreshProvider(ctx, fabricName, providerName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationRecoveryServicesProvidersClientRefreshProviderResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationRecoveryServicesProvidersClientRefreshProviderResponse](options.ResumeToken, client.pl, nil) - } -} - -// RefreshProvider - The operation to refresh the information from the recovery services provider. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationRecoveryServicesProvidersClient) refreshProvider(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions) (*http.Response, error) { - req, err := client.refreshProviderCreateRequest(ctx, fabricName, providerName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// refreshProviderCreateRequest creates the RefreshProvider request. -func (client *ReplicationRecoveryServicesProvidersClient) refreshProviderCreateRequest(ctx context.Context, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if providerName == "" { - return nil, errors.New("parameter providerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{providerName}", url.PathEscape(providerName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationstorageclassificationmappings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationstorageclassificationmappings_client.go deleted file mode 100644 index e9897b94..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationstorageclassificationmappings_client.go +++ /dev/null @@ -1,428 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationStorageClassificationMappingsClient contains the methods for the ReplicationStorageClassificationMappings group. -// Don't use this type directly, use NewReplicationStorageClassificationMappingsClient() instead. -type ReplicationStorageClassificationMappingsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationStorageClassificationMappingsClient creates a new instance of ReplicationStorageClassificationMappingsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationStorageClassificationMappingsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationStorageClassificationMappingsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationStorageClassificationMappingsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - The operation to create a storage classification mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// storageClassificationName - Storage classification name. -// storageClassificationMappingName - Storage classification mapping name. -// pairingInput - Pairing input. -// options - ReplicationStorageClassificationMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.BeginCreate -// method. -func (client *ReplicationStorageClassificationMappingsClient) BeginCreate(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, pairingInput StorageClassificationMappingInput, options *ReplicationStorageClassificationMappingsClientBeginCreateOptions) (*runtime.Poller[ReplicationStorageClassificationMappingsClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, fabricName, storageClassificationName, storageClassificationMappingName, pairingInput, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationStorageClassificationMappingsClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationStorageClassificationMappingsClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to create a storage classification mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationStorageClassificationMappingsClient) create(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, pairingInput StorageClassificationMappingInput, options *ReplicationStorageClassificationMappingsClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, fabricName, storageClassificationName, storageClassificationMappingName, pairingInput, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationStorageClassificationMappingsClient) createCreateRequest(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, pairingInput StorageClassificationMappingInput, options *ReplicationStorageClassificationMappingsClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if storageClassificationName == "" { - return nil, errors.New("parameter storageClassificationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageClassificationName}", url.PathEscape(storageClassificationName)) - if storageClassificationMappingName == "" { - return nil, errors.New("parameter storageClassificationMappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageClassificationMappingName}", url.PathEscape(storageClassificationMappingName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, pairingInput) -} - -// BeginDelete - The operation to delete a storage classification mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// storageClassificationName - Storage classification name. -// storageClassificationMappingName - Storage classification mapping name. -// options - ReplicationStorageClassificationMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.BeginDelete -// method. -func (client *ReplicationStorageClassificationMappingsClient) BeginDelete(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, options *ReplicationStorageClassificationMappingsClientBeginDeleteOptions) (*runtime.Poller[ReplicationStorageClassificationMappingsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, fabricName, storageClassificationName, storageClassificationMappingName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationStorageClassificationMappingsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationStorageClassificationMappingsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - The operation to delete a storage classification mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationStorageClassificationMappingsClient) deleteOperation(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, options *ReplicationStorageClassificationMappingsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, fabricName, storageClassificationName, storageClassificationMappingName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationStorageClassificationMappingsClient) deleteCreateRequest(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, options *ReplicationStorageClassificationMappingsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if storageClassificationName == "" { - return nil, errors.New("parameter storageClassificationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageClassificationName}", url.PathEscape(storageClassificationName)) - if storageClassificationMappingName == "" { - return nil, errors.New("parameter storageClassificationMappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageClassificationMappingName}", url.PathEscape(storageClassificationMappingName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets the details of the specified storage classification mapping. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// storageClassificationName - Storage classification name. -// storageClassificationMappingName - Storage classification mapping name. -// options - ReplicationStorageClassificationMappingsClientGetOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.Get -// method. -func (client *ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, options *ReplicationStorageClassificationMappingsClientGetOptions) (ReplicationStorageClassificationMappingsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, storageClassificationName, storageClassificationMappingName, options) - if err != nil { - return ReplicationStorageClassificationMappingsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationStorageClassificationMappingsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationStorageClassificationMappingsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationStorageClassificationMappingsClient) getCreateRequest(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, options *ReplicationStorageClassificationMappingsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if storageClassificationName == "" { - return nil, errors.New("parameter storageClassificationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageClassificationName}", url.PathEscape(storageClassificationName)) - if storageClassificationMappingName == "" { - return nil, errors.New("parameter storageClassificationMappingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageClassificationMappingName}", url.PathEscape(storageClassificationMappingName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationStorageClassificationMappingsClient) getHandleResponse(resp *http.Response) (ReplicationStorageClassificationMappingsClientGetResponse, error) { - result := ReplicationStorageClassificationMappingsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassificationMapping); err != nil { - return ReplicationStorageClassificationMappingsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the storage classification mappings in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationStorageClassificationMappingsClientListOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.List -// method. -func (client *ReplicationStorageClassificationMappingsClient) NewListPager(options *ReplicationStorageClassificationMappingsClientListOptions) *runtime.Pager[ReplicationStorageClassificationMappingsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationStorageClassificationMappingsClientListResponse]{ - More: func(page ReplicationStorageClassificationMappingsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationStorageClassificationMappingsClientListResponse) (ReplicationStorageClassificationMappingsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationStorageClassificationMappingsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationStorageClassificationMappingsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationStorageClassificationMappingsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationStorageClassificationMappingsClient) listCreateRequest(ctx context.Context, options *ReplicationStorageClassificationMappingsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassificationMappings" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationStorageClassificationMappingsClient) listHandleResponse(resp *http.Response) (ReplicationStorageClassificationMappingsClientListResponse, error) { - result := ReplicationStorageClassificationMappingsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassificationMappingCollection); err != nil { - return ReplicationStorageClassificationMappingsClientListResponse{}, err - } - return result, nil -} - -// NewListByReplicationStorageClassificationsPager - Lists the storage classification mappings for the fabric. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// storageClassificationName - Storage classification name. -// options - ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions contains the optional -// parameters for the ReplicationStorageClassificationMappingsClient.ListByReplicationStorageClassifications method. -func (client *ReplicationStorageClassificationMappingsClient) NewListByReplicationStorageClassificationsPager(fabricName string, storageClassificationName string, options *ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions) *runtime.Pager[ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse]{ - More: func(page ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse) (ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationStorageClassificationsCreateRequest(ctx, fabricName, storageClassificationName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationStorageClassificationsHandleResponse(resp) - }, - }) -} - -// listByReplicationStorageClassificationsCreateRequest creates the ListByReplicationStorageClassifications request. -func (client *ReplicationStorageClassificationMappingsClient) listByReplicationStorageClassificationsCreateRequest(ctx context.Context, fabricName string, storageClassificationName string, options *ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if storageClassificationName == "" { - return nil, errors.New("parameter storageClassificationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageClassificationName}", url.PathEscape(storageClassificationName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationStorageClassificationsHandleResponse handles the ListByReplicationStorageClassifications response. -func (client *ReplicationStorageClassificationMappingsClient) listByReplicationStorageClassificationsHandleResponse(resp *http.Response) (ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse, error) { - result := ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassificationMappingCollection); err != nil { - return ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationstorageclassifications_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationstorageclassifications_client.go deleted file mode 100644 index c7d72207..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationstorageclassifications_client.go +++ /dev/null @@ -1,266 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationStorageClassificationsClient contains the methods for the ReplicationStorageClassifications group. -// Don't use this type directly, use NewReplicationStorageClassificationsClient() instead. -type ReplicationStorageClassificationsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationStorageClassificationsClient creates a new instance of ReplicationStorageClassificationsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationStorageClassificationsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationStorageClassificationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationStorageClassificationsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the details of the specified storage classification. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// storageClassificationName - Storage classification name. -// options - ReplicationStorageClassificationsClientGetOptions contains the optional parameters for the ReplicationStorageClassificationsClient.Get -// method. -func (client *ReplicationStorageClassificationsClient) Get(ctx context.Context, fabricName string, storageClassificationName string, options *ReplicationStorageClassificationsClientGetOptions) (ReplicationStorageClassificationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, storageClassificationName, options) - if err != nil { - return ReplicationStorageClassificationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationStorageClassificationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationStorageClassificationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationStorageClassificationsClient) getCreateRequest(ctx context.Context, fabricName string, storageClassificationName string, options *ReplicationStorageClassificationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if storageClassificationName == "" { - return nil, errors.New("parameter storageClassificationName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageClassificationName}", url.PathEscape(storageClassificationName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationStorageClassificationsClient) getHandleResponse(resp *http.Response) (ReplicationStorageClassificationsClientGetResponse, error) { - result := ReplicationStorageClassificationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassification); err != nil { - return ReplicationStorageClassificationsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the storage classifications in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationStorageClassificationsClientListOptions contains the optional parameters for the ReplicationStorageClassificationsClient.List -// method. -func (client *ReplicationStorageClassificationsClient) NewListPager(options *ReplicationStorageClassificationsClientListOptions) *runtime.Pager[ReplicationStorageClassificationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationStorageClassificationsClientListResponse]{ - More: func(page ReplicationStorageClassificationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationStorageClassificationsClientListResponse) (ReplicationStorageClassificationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationStorageClassificationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationStorageClassificationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationStorageClassificationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationStorageClassificationsClient) listCreateRequest(ctx context.Context, options *ReplicationStorageClassificationsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassifications" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationStorageClassificationsClient) listHandleResponse(resp *http.Response) (ReplicationStorageClassificationsClientListResponse, error) { - result := ReplicationStorageClassificationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassificationCollection); err != nil { - return ReplicationStorageClassificationsClientListResponse{}, err - } - return result, nil -} - -// NewListByReplicationFabricsPager - Lists the storage classifications available in the specified fabric. -// Generated from API version 2022-10-01 -// fabricName - Site name of interest. -// options - ReplicationStorageClassificationsClientListByReplicationFabricsOptions contains the optional parameters for the -// ReplicationStorageClassificationsClient.ListByReplicationFabrics method. -func (client *ReplicationStorageClassificationsClient) NewListByReplicationFabricsPager(fabricName string, options *ReplicationStorageClassificationsClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationStorageClassificationsClientListByReplicationFabricsResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationStorageClassificationsClientListByReplicationFabricsResponse]{ - More: func(page ReplicationStorageClassificationsClientListByReplicationFabricsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationStorageClassificationsClientListByReplicationFabricsResponse) (ReplicationStorageClassificationsClientListByReplicationFabricsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationFabricsCreateRequest(ctx, fabricName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationStorageClassificationsClientListByReplicationFabricsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationStorageClassificationsClientListByReplicationFabricsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationStorageClassificationsClientListByReplicationFabricsResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationFabricsHandleResponse(resp) - }, - }) -} - -// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. -func (client *ReplicationStorageClassificationsClient) listByReplicationFabricsCreateRequest(ctx context.Context, fabricName string, options *ReplicationStorageClassificationsClientListByReplicationFabricsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. -func (client *ReplicationStorageClassificationsClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationStorageClassificationsClientListByReplicationFabricsResponse, error) { - result := ReplicationStorageClassificationsClientListByReplicationFabricsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassificationCollection); err != nil { - return ReplicationStorageClassificationsClientListByReplicationFabricsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationvaulthealth_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationvaulthealth_client.go deleted file mode 100644 index 97fc7079..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationvaulthealth_client.go +++ /dev/null @@ -1,178 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationVaultHealthClient contains the methods for the ReplicationVaultHealth group. -// Don't use this type directly, use NewReplicationVaultHealthClient() instead. -type ReplicationVaultHealthClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationVaultHealthClient creates a new instance of ReplicationVaultHealthClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationVaultHealthClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationVaultHealthClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationVaultHealthClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the health details of the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// options - ReplicationVaultHealthClientGetOptions contains the optional parameters for the ReplicationVaultHealthClient.Get -// method. -func (client *ReplicationVaultHealthClient) Get(ctx context.Context, options *ReplicationVaultHealthClientGetOptions) (ReplicationVaultHealthClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, options) - if err != nil { - return ReplicationVaultHealthClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationVaultHealthClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationVaultHealthClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationVaultHealthClient) getCreateRequest(ctx context.Context, options *ReplicationVaultHealthClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationVaultHealthClient) getHandleResponse(resp *http.Response) (ReplicationVaultHealthClientGetResponse, error) { - result := ReplicationVaultHealthClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VaultHealthDetails); err != nil { - return ReplicationVaultHealthClientGetResponse{}, err - } - return result, nil -} - -// BeginRefresh - Refreshes health summary of the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// options - ReplicationVaultHealthClientBeginRefreshOptions contains the optional parameters for the ReplicationVaultHealthClient.BeginRefresh -// method. -func (client *ReplicationVaultHealthClient) BeginRefresh(ctx context.Context, options *ReplicationVaultHealthClientBeginRefreshOptions) (*runtime.Poller[ReplicationVaultHealthClientRefreshResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.refresh(ctx, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationVaultHealthClientRefreshResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationVaultHealthClientRefreshResponse](options.ResumeToken, client.pl, nil) - } -} - -// Refresh - Refreshes health summary of the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationVaultHealthClient) refresh(ctx context.Context, options *ReplicationVaultHealthClientBeginRefreshOptions) (*http.Response, error) { - req, err := client.refreshCreateRequest(ctx, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// refreshCreateRequest creates the Refresh request. -func (client *ReplicationVaultHealthClient) refreshCreateRequest(ctx context.Context, options *ReplicationVaultHealthClientBeginRefreshOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth/default/refresh" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationvaultsetting_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationvaultsetting_client.go deleted file mode 100644 index b51b3b04..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationvaultsetting_client.go +++ /dev/null @@ -1,256 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationVaultSettingClient contains the methods for the ReplicationVaultSetting group. -// Don't use this type directly, use NewReplicationVaultSettingClient() instead. -type ReplicationVaultSettingClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationVaultSettingClient creates a new instance of ReplicationVaultSettingClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationVaultSettingClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationVaultSettingClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationVaultSettingClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - The operation to configure vault setting. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// vaultSettingName - Vault setting name. -// input - Vault setting creation input. -// options - ReplicationVaultSettingClientBeginCreateOptions contains the optional parameters for the ReplicationVaultSettingClient.BeginCreate -// method. -func (client *ReplicationVaultSettingClient) BeginCreate(ctx context.Context, vaultSettingName string, input VaultSettingCreationInput, options *ReplicationVaultSettingClientBeginCreateOptions) (*runtime.Poller[ReplicationVaultSettingClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, vaultSettingName, input, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationVaultSettingClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationVaultSettingClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to configure vault setting. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationVaultSettingClient) create(ctx context.Context, vaultSettingName string, input VaultSettingCreationInput, options *ReplicationVaultSettingClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, vaultSettingName, input, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationVaultSettingClient) createCreateRequest(ctx context.Context, vaultSettingName string, input VaultSettingCreationInput, options *ReplicationVaultSettingClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings/{vaultSettingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if vaultSettingName == "" { - return nil, errors.New("parameter vaultSettingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultSettingName}", url.PathEscape(vaultSettingName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, input) -} - -// Get - Gets the vault setting. This includes the Migration Hub connection settings. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// vaultSettingName - Vault setting name. -// options - ReplicationVaultSettingClientGetOptions contains the optional parameters for the ReplicationVaultSettingClient.Get -// method. -func (client *ReplicationVaultSettingClient) Get(ctx context.Context, vaultSettingName string, options *ReplicationVaultSettingClientGetOptions) (ReplicationVaultSettingClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, vaultSettingName, options) - if err != nil { - return ReplicationVaultSettingClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationVaultSettingClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationVaultSettingClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationVaultSettingClient) getCreateRequest(ctx context.Context, vaultSettingName string, options *ReplicationVaultSettingClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings/{vaultSettingName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if vaultSettingName == "" { - return nil, errors.New("parameter vaultSettingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vaultSettingName}", url.PathEscape(vaultSettingName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationVaultSettingClient) getHandleResponse(resp *http.Response) (ReplicationVaultSettingClientGetResponse, error) { - result := ReplicationVaultSettingClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VaultSetting); err != nil { - return ReplicationVaultSettingClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets the list of vault setting. This includes the Migration Hub connection settings. -// Generated from API version 2022-10-01 -// options - ReplicationVaultSettingClientListOptions contains the optional parameters for the ReplicationVaultSettingClient.List -// method. -func (client *ReplicationVaultSettingClient) NewListPager(options *ReplicationVaultSettingClientListOptions) *runtime.Pager[ReplicationVaultSettingClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationVaultSettingClientListResponse]{ - More: func(page ReplicationVaultSettingClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationVaultSettingClientListResponse) (ReplicationVaultSettingClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationVaultSettingClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationVaultSettingClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationVaultSettingClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationVaultSettingClient) listCreateRequest(ctx context.Context, options *ReplicationVaultSettingClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationVaultSettingClient) listHandleResponse(resp *http.Response) (ReplicationVaultSettingClientListResponse, error) { - result := ReplicationVaultSettingClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VaultSettingCollection); err != nil { - return ReplicationVaultSettingClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationvcenters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationvcenters_client.go deleted file mode 100644 index 94638fa2..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/replicationvcenters_client.go +++ /dev/null @@ -1,479 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ReplicationvCentersClient contains the methods for the ReplicationvCenters group. -// Don't use this type directly, use NewReplicationvCentersClient() instead. -type ReplicationvCentersClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewReplicationvCentersClient creates a new instance of ReplicationvCentersClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewReplicationvCentersClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationvCentersClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &ReplicationvCentersClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - The operation to create a vCenter object.. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// vcenterName - vcenter name. -// addVCenterRequest - The input to the add vCenter operation. -// options - ReplicationvCentersClientBeginCreateOptions contains the optional parameters for the ReplicationvCentersClient.BeginCreate -// method. -func (client *ReplicationvCentersClient) BeginCreate(ctx context.Context, fabricName string, vcenterName string, addVCenterRequest AddVCenterRequest, options *ReplicationvCentersClientBeginCreateOptions) (*runtime.Poller[ReplicationvCentersClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, fabricName, vcenterName, addVCenterRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationvCentersClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationvCentersClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - The operation to create a vCenter object.. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationvCentersClient) create(ctx context.Context, fabricName string, vcenterName string, addVCenterRequest AddVCenterRequest, options *ReplicationvCentersClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, fabricName, vcenterName, addVCenterRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *ReplicationvCentersClient) createCreateRequest(ctx context.Context, fabricName string, vcenterName string, addVCenterRequest AddVCenterRequest, options *ReplicationvCentersClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if vcenterName == "" { - return nil, errors.New("parameter vcenterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vcenterName}", url.PathEscape(vcenterName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, addVCenterRequest) -} - -// BeginDelete - The operation to remove(unregister) a registered vCenter server from the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// vcenterName - vcenter name. -// options - ReplicationvCentersClientBeginDeleteOptions contains the optional parameters for the ReplicationvCentersClient.BeginDelete -// method. -func (client *ReplicationvCentersClient) BeginDelete(ctx context.Context, fabricName string, vcenterName string, options *ReplicationvCentersClientBeginDeleteOptions) (*runtime.Poller[ReplicationvCentersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, fabricName, vcenterName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationvCentersClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationvCentersClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - The operation to remove(unregister) a registered vCenter server from the vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationvCentersClient) deleteOperation(ctx context.Context, fabricName string, vcenterName string, options *ReplicationvCentersClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, fabricName, vcenterName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ReplicationvCentersClient) deleteCreateRequest(ctx context.Context, fabricName string, vcenterName string, options *ReplicationvCentersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if vcenterName == "" { - return nil, errors.New("parameter vcenterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vcenterName}", url.PathEscape(vcenterName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - return req, nil -} - -// Get - Gets the details of a registered vCenter server(Add vCenter server). -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// vcenterName - vcenter name. -// options - ReplicationvCentersClientGetOptions contains the optional parameters for the ReplicationvCentersClient.Get method. -func (client *ReplicationvCentersClient) Get(ctx context.Context, fabricName string, vcenterName string, options *ReplicationvCentersClientGetOptions) (ReplicationvCentersClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, fabricName, vcenterName, options) - if err != nil { - return ReplicationvCentersClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationvCentersClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationvCentersClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *ReplicationvCentersClient) getCreateRequest(ctx context.Context, fabricName string, vcenterName string, options *ReplicationvCentersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if vcenterName == "" { - return nil, errors.New("parameter vcenterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vcenterName}", url.PathEscape(vcenterName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ReplicationvCentersClient) getHandleResponse(resp *http.Response) (ReplicationvCentersClientGetResponse, error) { - result := ReplicationvCentersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VCenter); err != nil { - return ReplicationvCentersClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists the vCenter servers registered in the vault. -// Generated from API version 2022-10-01 -// options - ReplicationvCentersClientListOptions contains the optional parameters for the ReplicationvCentersClient.List -// method. -func (client *ReplicationvCentersClient) NewListPager(options *ReplicationvCentersClientListOptions) *runtime.Pager[ReplicationvCentersClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationvCentersClientListResponse]{ - More: func(page ReplicationvCentersClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationvCentersClientListResponse) (ReplicationvCentersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationvCentersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationvCentersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationvCentersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *ReplicationvCentersClient) listCreateRequest(ctx context.Context, options *ReplicationvCentersClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationvCenters" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ReplicationvCentersClient) listHandleResponse(resp *http.Response) (ReplicationvCentersClientListResponse, error) { - result := ReplicationvCentersClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VCenterCollection); err != nil { - return ReplicationvCentersClientListResponse{}, err - } - return result, nil -} - -// NewListByReplicationFabricsPager - Lists the vCenter servers registered in a fabric. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// options - ReplicationvCentersClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationvCentersClient.ListByReplicationFabrics -// method. -func (client *ReplicationvCentersClient) NewListByReplicationFabricsPager(fabricName string, options *ReplicationvCentersClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationvCentersClientListByReplicationFabricsResponse] { - return runtime.NewPager(runtime.PagingHandler[ReplicationvCentersClientListByReplicationFabricsResponse]{ - More: func(page ReplicationvCentersClientListByReplicationFabricsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ReplicationvCentersClientListByReplicationFabricsResponse) (ReplicationvCentersClientListByReplicationFabricsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationFabricsCreateRequest(ctx, fabricName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ReplicationvCentersClientListByReplicationFabricsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ReplicationvCentersClientListByReplicationFabricsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ReplicationvCentersClientListByReplicationFabricsResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationFabricsHandleResponse(resp) - }, - }) -} - -// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. -func (client *ReplicationvCentersClient) listByReplicationFabricsCreateRequest(ctx context.Context, fabricName string, options *ReplicationvCentersClientListByReplicationFabricsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. -func (client *ReplicationvCentersClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationvCentersClientListByReplicationFabricsResponse, error) { - result := ReplicationvCentersClientListByReplicationFabricsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.VCenterCollection); err != nil { - return ReplicationvCentersClientListByReplicationFabricsResponse{}, err - } - return result, nil -} - -// BeginUpdate - The operation to update a registered vCenter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// vcenterName - vcenter name. -// updateVCenterRequest - The input to the update vCenter operation. -// options - ReplicationvCentersClientBeginUpdateOptions contains the optional parameters for the ReplicationvCentersClient.BeginUpdate -// method. -func (client *ReplicationvCentersClient) BeginUpdate(ctx context.Context, fabricName string, vcenterName string, updateVCenterRequest UpdateVCenterRequest, options *ReplicationvCentersClientBeginUpdateOptions) (*runtime.Poller[ReplicationvCentersClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, fabricName, vcenterName, updateVCenterRequest, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ReplicationvCentersClientUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ReplicationvCentersClientUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Update - The operation to update a registered vCenter. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -func (client *ReplicationvCentersClient) update(ctx context.Context, fabricName string, vcenterName string, updateVCenterRequest UpdateVCenterRequest, options *ReplicationvCentersClientBeginUpdateOptions) (*http.Response, error) { - req, err := client.updateCreateRequest(ctx, fabricName, vcenterName, updateVCenterRequest, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// updateCreateRequest creates the Update request. -func (client *ReplicationvCentersClient) updateCreateRequest(ctx context.Context, fabricName string, vcenterName string, updateVCenterRequest UpdateVCenterRequest, options *ReplicationvCentersClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if vcenterName == "" { - return nil, errors.New("parameter vcenterName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{vcenterName}", url.PathEscape(vcenterName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, updateVCenterRequest) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/response_types.go deleted file mode 100644 index 7098d365..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/response_types.go +++ /dev/null @@ -1,697 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -// MigrationRecoveryPointsClientGetResponse contains the response from method MigrationRecoveryPointsClient.Get. -type MigrationRecoveryPointsClientGetResponse struct { - MigrationRecoveryPoint -} - -// MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse contains the response from method MigrationRecoveryPointsClient.ListByReplicationMigrationItems. -type MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse struct { - MigrationRecoveryPointCollection -} - -// OperationsClientListResponse contains the response from method OperationsClient.List. -type OperationsClientListResponse struct { - OperationsDiscoveryCollection -} - -// RecoveryPointsClientGetResponse contains the response from method RecoveryPointsClient.Get. -type RecoveryPointsClientGetResponse struct { - RecoveryPoint -} - -// RecoveryPointsClientListByReplicationProtectedItemsResponse contains the response from method RecoveryPointsClient.ListByReplicationProtectedItems. -type RecoveryPointsClientListByReplicationProtectedItemsResponse struct { - RecoveryPointCollection -} - -// ReplicationAlertSettingsClientCreateResponse contains the response from method ReplicationAlertSettingsClient.Create. -type ReplicationAlertSettingsClientCreateResponse struct { - Alert -} - -// ReplicationAlertSettingsClientGetResponse contains the response from method ReplicationAlertSettingsClient.Get. -type ReplicationAlertSettingsClientGetResponse struct { - Alert -} - -// ReplicationAlertSettingsClientListResponse contains the response from method ReplicationAlertSettingsClient.List. -type ReplicationAlertSettingsClientListResponse struct { - AlertCollection -} - -// ReplicationAppliancesClientListResponse contains the response from method ReplicationAppliancesClient.List. -type ReplicationAppliancesClientListResponse struct { - ApplianceCollection -} - -// ReplicationEligibilityResultsClientGetResponse contains the response from method ReplicationEligibilityResultsClient.Get. -type ReplicationEligibilityResultsClientGetResponse struct { - ReplicationEligibilityResults -} - -// ReplicationEligibilityResultsClientListResponse contains the response from method ReplicationEligibilityResultsClient.List. -type ReplicationEligibilityResultsClientListResponse struct { - ReplicationEligibilityResultsCollection -} - -// ReplicationEventsClientGetResponse contains the response from method ReplicationEventsClient.Get. -type ReplicationEventsClientGetResponse struct { - Event -} - -// ReplicationEventsClientListResponse contains the response from method ReplicationEventsClient.List. -type ReplicationEventsClientListResponse struct { - EventCollection -} - -// ReplicationFabricsClientCheckConsistencyResponse contains the response from method ReplicationFabricsClient.CheckConsistency. -type ReplicationFabricsClientCheckConsistencyResponse struct { - Fabric -} - -// ReplicationFabricsClientCreateResponse contains the response from method ReplicationFabricsClient.Create. -type ReplicationFabricsClientCreateResponse struct { - Fabric -} - -// ReplicationFabricsClientDeleteResponse contains the response from method ReplicationFabricsClient.Delete. -type ReplicationFabricsClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationFabricsClientGetResponse contains the response from method ReplicationFabricsClient.Get. -type ReplicationFabricsClientGetResponse struct { - Fabric -} - -// ReplicationFabricsClientListResponse contains the response from method ReplicationFabricsClient.List. -type ReplicationFabricsClientListResponse struct { - FabricCollection -} - -// ReplicationFabricsClientMigrateToAADResponse contains the response from method ReplicationFabricsClient.MigrateToAAD. -type ReplicationFabricsClientMigrateToAADResponse struct { - // placeholder for future response values -} - -// ReplicationFabricsClientPurgeResponse contains the response from method ReplicationFabricsClient.Purge. -type ReplicationFabricsClientPurgeResponse struct { - // placeholder for future response values -} - -// ReplicationFabricsClientReassociateGatewayResponse contains the response from method ReplicationFabricsClient.ReassociateGateway. -type ReplicationFabricsClientReassociateGatewayResponse struct { - Fabric -} - -// ReplicationFabricsClientRenewCertificateResponse contains the response from method ReplicationFabricsClient.RenewCertificate. -type ReplicationFabricsClientRenewCertificateResponse struct { - Fabric -} - -// ReplicationJobsClientCancelResponse contains the response from method ReplicationJobsClient.Cancel. -type ReplicationJobsClientCancelResponse struct { - Job -} - -// ReplicationJobsClientExportResponse contains the response from method ReplicationJobsClient.Export. -type ReplicationJobsClientExportResponse struct { - Job -} - -// ReplicationJobsClientGetResponse contains the response from method ReplicationJobsClient.Get. -type ReplicationJobsClientGetResponse struct { - Job -} - -// ReplicationJobsClientListResponse contains the response from method ReplicationJobsClient.List. -type ReplicationJobsClientListResponse struct { - JobCollection -} - -// ReplicationJobsClientRestartResponse contains the response from method ReplicationJobsClient.Restart. -type ReplicationJobsClientRestartResponse struct { - Job -} - -// ReplicationJobsClientResumeResponse contains the response from method ReplicationJobsClient.Resume. -type ReplicationJobsClientResumeResponse struct { - Job -} - -// ReplicationLogicalNetworksClientGetResponse contains the response from method ReplicationLogicalNetworksClient.Get. -type ReplicationLogicalNetworksClientGetResponse struct { - LogicalNetwork -} - -// ReplicationLogicalNetworksClientListByReplicationFabricsResponse contains the response from method ReplicationLogicalNetworksClient.ListByReplicationFabrics. -type ReplicationLogicalNetworksClientListByReplicationFabricsResponse struct { - LogicalNetworkCollection -} - -// ReplicationMigrationItemsClientCreateResponse contains the response from method ReplicationMigrationItemsClient.Create. -type ReplicationMigrationItemsClientCreateResponse struct { - MigrationItem -} - -// ReplicationMigrationItemsClientDeleteResponse contains the response from method ReplicationMigrationItemsClient.Delete. -type ReplicationMigrationItemsClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationMigrationItemsClientGetResponse contains the response from method ReplicationMigrationItemsClient.Get. -type ReplicationMigrationItemsClientGetResponse struct { - MigrationItem -} - -// ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse contains the response from method ReplicationMigrationItemsClient.ListByReplicationProtectionContainers. -type ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse struct { - MigrationItemCollection -} - -// ReplicationMigrationItemsClientListResponse contains the response from method ReplicationMigrationItemsClient.List. -type ReplicationMigrationItemsClientListResponse struct { - MigrationItemCollection -} - -// ReplicationMigrationItemsClientMigrateResponse contains the response from method ReplicationMigrationItemsClient.Migrate. -type ReplicationMigrationItemsClientMigrateResponse struct { - MigrationItem -} - -// ReplicationMigrationItemsClientPauseReplicationResponse contains the response from method ReplicationMigrationItemsClient.PauseReplication. -type ReplicationMigrationItemsClientPauseReplicationResponse struct { - MigrationItem -} - -// ReplicationMigrationItemsClientResumeReplicationResponse contains the response from method ReplicationMigrationItemsClient.ResumeReplication. -type ReplicationMigrationItemsClientResumeReplicationResponse struct { - MigrationItem -} - -// ReplicationMigrationItemsClientResyncResponse contains the response from method ReplicationMigrationItemsClient.Resync. -type ReplicationMigrationItemsClientResyncResponse struct { - MigrationItem -} - -// ReplicationMigrationItemsClientTestMigrateCleanupResponse contains the response from method ReplicationMigrationItemsClient.TestMigrateCleanup. -type ReplicationMigrationItemsClientTestMigrateCleanupResponse struct { - MigrationItem -} - -// ReplicationMigrationItemsClientTestMigrateResponse contains the response from method ReplicationMigrationItemsClient.TestMigrate. -type ReplicationMigrationItemsClientTestMigrateResponse struct { - MigrationItem -} - -// ReplicationMigrationItemsClientUpdateResponse contains the response from method ReplicationMigrationItemsClient.Update. -type ReplicationMigrationItemsClientUpdateResponse struct { - MigrationItem -} - -// ReplicationNetworkMappingsClientCreateResponse contains the response from method ReplicationNetworkMappingsClient.Create. -type ReplicationNetworkMappingsClientCreateResponse struct { - NetworkMapping -} - -// ReplicationNetworkMappingsClientDeleteResponse contains the response from method ReplicationNetworkMappingsClient.Delete. -type ReplicationNetworkMappingsClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationNetworkMappingsClientGetResponse contains the response from method ReplicationNetworkMappingsClient.Get. -type ReplicationNetworkMappingsClientGetResponse struct { - NetworkMapping -} - -// ReplicationNetworkMappingsClientListByReplicationNetworksResponse contains the response from method ReplicationNetworkMappingsClient.ListByReplicationNetworks. -type ReplicationNetworkMappingsClientListByReplicationNetworksResponse struct { - NetworkMappingCollection -} - -// ReplicationNetworkMappingsClientListResponse contains the response from method ReplicationNetworkMappingsClient.List. -type ReplicationNetworkMappingsClientListResponse struct { - NetworkMappingCollection -} - -// ReplicationNetworkMappingsClientUpdateResponse contains the response from method ReplicationNetworkMappingsClient.Update. -type ReplicationNetworkMappingsClientUpdateResponse struct { - NetworkMapping -} - -// ReplicationNetworksClientGetResponse contains the response from method ReplicationNetworksClient.Get. -type ReplicationNetworksClientGetResponse struct { - Network -} - -// ReplicationNetworksClientListByReplicationFabricsResponse contains the response from method ReplicationNetworksClient.ListByReplicationFabrics. -type ReplicationNetworksClientListByReplicationFabricsResponse struct { - NetworkCollection -} - -// ReplicationNetworksClientListResponse contains the response from method ReplicationNetworksClient.List. -type ReplicationNetworksClientListResponse struct { - NetworkCollection -} - -// ReplicationPoliciesClientCreateResponse contains the response from method ReplicationPoliciesClient.Create. -type ReplicationPoliciesClientCreateResponse struct { - Policy -} - -// ReplicationPoliciesClientDeleteResponse contains the response from method ReplicationPoliciesClient.Delete. -type ReplicationPoliciesClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationPoliciesClientGetResponse contains the response from method ReplicationPoliciesClient.Get. -type ReplicationPoliciesClientGetResponse struct { - Policy -} - -// ReplicationPoliciesClientListResponse contains the response from method ReplicationPoliciesClient.List. -type ReplicationPoliciesClientListResponse struct { - PolicyCollection -} - -// ReplicationPoliciesClientUpdateResponse contains the response from method ReplicationPoliciesClient.Update. -type ReplicationPoliciesClientUpdateResponse struct { - Policy -} - -// ReplicationProtectableItemsClientGetResponse contains the response from method ReplicationProtectableItemsClient.Get. -type ReplicationProtectableItemsClientGetResponse struct { - ProtectableItem -} - -// ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse contains the response from method ReplicationProtectableItemsClient.ListByReplicationProtectionContainers. -type ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse struct { - ProtectableItemCollection -} - -// ReplicationProtectedItemsClientAddDisksResponse contains the response from method ReplicationProtectedItemsClient.AddDisks. -type ReplicationProtectedItemsClientAddDisksResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientApplyRecoveryPointResponse contains the response from method ReplicationProtectedItemsClient.ApplyRecoveryPoint. -type ReplicationProtectedItemsClientApplyRecoveryPointResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientCreateResponse contains the response from method ReplicationProtectedItemsClient.Create. -type ReplicationProtectedItemsClientCreateResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientDeleteResponse contains the response from method ReplicationProtectedItemsClient.Delete. -type ReplicationProtectedItemsClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationProtectedItemsClientFailoverCancelResponse contains the response from method ReplicationProtectedItemsClient.FailoverCancel. -type ReplicationProtectedItemsClientFailoverCancelResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientFailoverCommitResponse contains the response from method ReplicationProtectedItemsClient.FailoverCommit. -type ReplicationProtectedItemsClientFailoverCommitResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientGetResponse contains the response from method ReplicationProtectedItemsClient.Get. -type ReplicationProtectedItemsClientGetResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse contains the response from method ReplicationProtectedItemsClient.ListByReplicationProtectionContainers. -type ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse struct { - ReplicationProtectedItemCollection -} - -// ReplicationProtectedItemsClientListResponse contains the response from method ReplicationProtectedItemsClient.List. -type ReplicationProtectedItemsClientListResponse struct { - ReplicationProtectedItemCollection -} - -// ReplicationProtectedItemsClientPlannedFailoverResponse contains the response from method ReplicationProtectedItemsClient.PlannedFailover. -type ReplicationProtectedItemsClientPlannedFailoverResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientPurgeResponse contains the response from method ReplicationProtectedItemsClient.Purge. -type ReplicationProtectedItemsClientPurgeResponse struct { - // placeholder for future response values -} - -// ReplicationProtectedItemsClientRemoveDisksResponse contains the response from method ReplicationProtectedItemsClient.RemoveDisks. -type ReplicationProtectedItemsClientRemoveDisksResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientRepairReplicationResponse contains the response from method ReplicationProtectedItemsClient.RepairReplication. -type ReplicationProtectedItemsClientRepairReplicationResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientReprotectResponse contains the response from method ReplicationProtectedItemsClient.Reprotect. -type ReplicationProtectedItemsClientReprotectResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientResolveHealthErrorsResponse contains the response from method ReplicationProtectedItemsClient.ResolveHealthErrors. -type ReplicationProtectedItemsClientResolveHealthErrorsResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientSwitchProviderResponse contains the response from method ReplicationProtectedItemsClient.SwitchProvider. -type ReplicationProtectedItemsClientSwitchProviderResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientTestFailoverCleanupResponse contains the response from method ReplicationProtectedItemsClient.TestFailoverCleanup. -type ReplicationProtectedItemsClientTestFailoverCleanupResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientTestFailoverResponse contains the response from method ReplicationProtectedItemsClient.TestFailover. -type ReplicationProtectedItemsClientTestFailoverResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientUnplannedFailoverResponse contains the response from method ReplicationProtectedItemsClient.UnplannedFailover. -type ReplicationProtectedItemsClientUnplannedFailoverResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientUpdateApplianceResponse contains the response from method ReplicationProtectedItemsClient.UpdateAppliance. -type ReplicationProtectedItemsClientUpdateApplianceResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientUpdateMobilityServiceResponse contains the response from method ReplicationProtectedItemsClient.UpdateMobilityService. -type ReplicationProtectedItemsClientUpdateMobilityServiceResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectedItemsClientUpdateResponse contains the response from method ReplicationProtectedItemsClient.Update. -type ReplicationProtectedItemsClientUpdateResponse struct { - ReplicationProtectedItem -} - -// ReplicationProtectionContainerMappingsClientCreateResponse contains the response from method ReplicationProtectionContainerMappingsClient.Create. -type ReplicationProtectionContainerMappingsClientCreateResponse struct { - ProtectionContainerMapping -} - -// ReplicationProtectionContainerMappingsClientDeleteResponse contains the response from method ReplicationProtectionContainerMappingsClient.Delete. -type ReplicationProtectionContainerMappingsClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationProtectionContainerMappingsClientGetResponse contains the response from method ReplicationProtectionContainerMappingsClient.Get. -type ReplicationProtectionContainerMappingsClientGetResponse struct { - ProtectionContainerMapping -} - -// ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse contains the response from method -// ReplicationProtectionContainerMappingsClient.ListByReplicationProtectionContainers. -type ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse struct { - ProtectionContainerMappingCollection -} - -// ReplicationProtectionContainerMappingsClientListResponse contains the response from method ReplicationProtectionContainerMappingsClient.List. -type ReplicationProtectionContainerMappingsClientListResponse struct { - ProtectionContainerMappingCollection -} - -// ReplicationProtectionContainerMappingsClientPurgeResponse contains the response from method ReplicationProtectionContainerMappingsClient.Purge. -type ReplicationProtectionContainerMappingsClientPurgeResponse struct { - // placeholder for future response values -} - -// ReplicationProtectionContainerMappingsClientUpdateResponse contains the response from method ReplicationProtectionContainerMappingsClient.Update. -type ReplicationProtectionContainerMappingsClientUpdateResponse struct { - ProtectionContainerMapping -} - -// ReplicationProtectionContainersClientCreateResponse contains the response from method ReplicationProtectionContainersClient.Create. -type ReplicationProtectionContainersClientCreateResponse struct { - ProtectionContainer -} - -// ReplicationProtectionContainersClientDeleteResponse contains the response from method ReplicationProtectionContainersClient.Delete. -type ReplicationProtectionContainersClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationProtectionContainersClientDiscoverProtectableItemResponse contains the response from method ReplicationProtectionContainersClient.DiscoverProtectableItem. -type ReplicationProtectionContainersClientDiscoverProtectableItemResponse struct { - ProtectionContainer -} - -// ReplicationProtectionContainersClientGetResponse contains the response from method ReplicationProtectionContainersClient.Get. -type ReplicationProtectionContainersClientGetResponse struct { - ProtectionContainer -} - -// ReplicationProtectionContainersClientListByReplicationFabricsResponse contains the response from method ReplicationProtectionContainersClient.ListByReplicationFabrics. -type ReplicationProtectionContainersClientListByReplicationFabricsResponse struct { - ProtectionContainerCollection -} - -// ReplicationProtectionContainersClientListResponse contains the response from method ReplicationProtectionContainersClient.List. -type ReplicationProtectionContainersClientListResponse struct { - ProtectionContainerCollection -} - -// ReplicationProtectionContainersClientSwitchProtectionResponse contains the response from method ReplicationProtectionContainersClient.SwitchProtection. -type ReplicationProtectionContainersClientSwitchProtectionResponse struct { - ProtectionContainer -} - -// ReplicationProtectionIntentsClientCreateResponse contains the response from method ReplicationProtectionIntentsClient.Create. -type ReplicationProtectionIntentsClientCreateResponse struct { - ReplicationProtectionIntent -} - -// ReplicationProtectionIntentsClientGetResponse contains the response from method ReplicationProtectionIntentsClient.Get. -type ReplicationProtectionIntentsClientGetResponse struct { - ReplicationProtectionIntent -} - -// ReplicationProtectionIntentsClientListResponse contains the response from method ReplicationProtectionIntentsClient.List. -type ReplicationProtectionIntentsClientListResponse struct { - ReplicationProtectionIntentCollection -} - -// ReplicationRecoveryPlansClientCreateResponse contains the response from method ReplicationRecoveryPlansClient.Create. -type ReplicationRecoveryPlansClientCreateResponse struct { - RecoveryPlan -} - -// ReplicationRecoveryPlansClientDeleteResponse contains the response from method ReplicationRecoveryPlansClient.Delete. -type ReplicationRecoveryPlansClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationRecoveryPlansClientFailoverCancelResponse contains the response from method ReplicationRecoveryPlansClient.FailoverCancel. -type ReplicationRecoveryPlansClientFailoverCancelResponse struct { - RecoveryPlan -} - -// ReplicationRecoveryPlansClientFailoverCommitResponse contains the response from method ReplicationRecoveryPlansClient.FailoverCommit. -type ReplicationRecoveryPlansClientFailoverCommitResponse struct { - RecoveryPlan -} - -// ReplicationRecoveryPlansClientGetResponse contains the response from method ReplicationRecoveryPlansClient.Get. -type ReplicationRecoveryPlansClientGetResponse struct { - RecoveryPlan -} - -// ReplicationRecoveryPlansClientListResponse contains the response from method ReplicationRecoveryPlansClient.List. -type ReplicationRecoveryPlansClientListResponse struct { - RecoveryPlanCollection -} - -// ReplicationRecoveryPlansClientPlannedFailoverResponse contains the response from method ReplicationRecoveryPlansClient.PlannedFailover. -type ReplicationRecoveryPlansClientPlannedFailoverResponse struct { - RecoveryPlan -} - -// ReplicationRecoveryPlansClientReprotectResponse contains the response from method ReplicationRecoveryPlansClient.Reprotect. -type ReplicationRecoveryPlansClientReprotectResponse struct { - RecoveryPlan -} - -// ReplicationRecoveryPlansClientTestFailoverCleanupResponse contains the response from method ReplicationRecoveryPlansClient.TestFailoverCleanup. -type ReplicationRecoveryPlansClientTestFailoverCleanupResponse struct { - RecoveryPlan -} - -// ReplicationRecoveryPlansClientTestFailoverResponse contains the response from method ReplicationRecoveryPlansClient.TestFailover. -type ReplicationRecoveryPlansClientTestFailoverResponse struct { - RecoveryPlan -} - -// ReplicationRecoveryPlansClientUnplannedFailoverResponse contains the response from method ReplicationRecoveryPlansClient.UnplannedFailover. -type ReplicationRecoveryPlansClientUnplannedFailoverResponse struct { - RecoveryPlan -} - -// ReplicationRecoveryPlansClientUpdateResponse contains the response from method ReplicationRecoveryPlansClient.Update. -type ReplicationRecoveryPlansClientUpdateResponse struct { - RecoveryPlan -} - -// ReplicationRecoveryServicesProvidersClientCreateResponse contains the response from method ReplicationRecoveryServicesProvidersClient.Create. -type ReplicationRecoveryServicesProvidersClientCreateResponse struct { - RecoveryServicesProvider -} - -// ReplicationRecoveryServicesProvidersClientDeleteResponse contains the response from method ReplicationRecoveryServicesProvidersClient.Delete. -type ReplicationRecoveryServicesProvidersClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationRecoveryServicesProvidersClientGetResponse contains the response from method ReplicationRecoveryServicesProvidersClient.Get. -type ReplicationRecoveryServicesProvidersClientGetResponse struct { - RecoveryServicesProvider -} - -// ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse contains the response from method ReplicationRecoveryServicesProvidersClient.ListByReplicationFabrics. -type ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse struct { - RecoveryServicesProviderCollection -} - -// ReplicationRecoveryServicesProvidersClientListResponse contains the response from method ReplicationRecoveryServicesProvidersClient.List. -type ReplicationRecoveryServicesProvidersClientListResponse struct { - RecoveryServicesProviderCollection -} - -// ReplicationRecoveryServicesProvidersClientPurgeResponse contains the response from method ReplicationRecoveryServicesProvidersClient.Purge. -type ReplicationRecoveryServicesProvidersClientPurgeResponse struct { - // placeholder for future response values -} - -// ReplicationRecoveryServicesProvidersClientRefreshProviderResponse contains the response from method ReplicationRecoveryServicesProvidersClient.RefreshProvider. -type ReplicationRecoveryServicesProvidersClientRefreshProviderResponse struct { - RecoveryServicesProvider -} - -// ReplicationStorageClassificationMappingsClientCreateResponse contains the response from method ReplicationStorageClassificationMappingsClient.Create. -type ReplicationStorageClassificationMappingsClientCreateResponse struct { - StorageClassificationMapping -} - -// ReplicationStorageClassificationMappingsClientDeleteResponse contains the response from method ReplicationStorageClassificationMappingsClient.Delete. -type ReplicationStorageClassificationMappingsClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationStorageClassificationMappingsClientGetResponse contains the response from method ReplicationStorageClassificationMappingsClient.Get. -type ReplicationStorageClassificationMappingsClientGetResponse struct { - StorageClassificationMapping -} - -// ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse contains the response from -// method ReplicationStorageClassificationMappingsClient.ListByReplicationStorageClassifications. -type ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse struct { - StorageClassificationMappingCollection -} - -// ReplicationStorageClassificationMappingsClientListResponse contains the response from method ReplicationStorageClassificationMappingsClient.List. -type ReplicationStorageClassificationMappingsClientListResponse struct { - StorageClassificationMappingCollection -} - -// ReplicationStorageClassificationsClientGetResponse contains the response from method ReplicationStorageClassificationsClient.Get. -type ReplicationStorageClassificationsClientGetResponse struct { - StorageClassification -} - -// ReplicationStorageClassificationsClientListByReplicationFabricsResponse contains the response from method ReplicationStorageClassificationsClient.ListByReplicationFabrics. -type ReplicationStorageClassificationsClientListByReplicationFabricsResponse struct { - StorageClassificationCollection -} - -// ReplicationStorageClassificationsClientListResponse contains the response from method ReplicationStorageClassificationsClient.List. -type ReplicationStorageClassificationsClientListResponse struct { - StorageClassificationCollection -} - -// ReplicationVaultHealthClientGetResponse contains the response from method ReplicationVaultHealthClient.Get. -type ReplicationVaultHealthClientGetResponse struct { - VaultHealthDetails -} - -// ReplicationVaultHealthClientRefreshResponse contains the response from method ReplicationVaultHealthClient.Refresh. -type ReplicationVaultHealthClientRefreshResponse struct { - VaultHealthDetails -} - -// ReplicationVaultSettingClientCreateResponse contains the response from method ReplicationVaultSettingClient.Create. -type ReplicationVaultSettingClientCreateResponse struct { - VaultSetting -} - -// ReplicationVaultSettingClientGetResponse contains the response from method ReplicationVaultSettingClient.Get. -type ReplicationVaultSettingClientGetResponse struct { - VaultSetting -} - -// ReplicationVaultSettingClientListResponse contains the response from method ReplicationVaultSettingClient.List. -type ReplicationVaultSettingClientListResponse struct { - VaultSettingCollection -} - -// ReplicationvCentersClientCreateResponse contains the response from method ReplicationvCentersClient.Create. -type ReplicationvCentersClientCreateResponse struct { - VCenter -} - -// ReplicationvCentersClientDeleteResponse contains the response from method ReplicationvCentersClient.Delete. -type ReplicationvCentersClientDeleteResponse struct { - // placeholder for future response values -} - -// ReplicationvCentersClientGetResponse contains the response from method ReplicationvCentersClient.Get. -type ReplicationvCentersClientGetResponse struct { - VCenter -} - -// ReplicationvCentersClientListByReplicationFabricsResponse contains the response from method ReplicationvCentersClient.ListByReplicationFabrics. -type ReplicationvCentersClientListByReplicationFabricsResponse struct { - VCenterCollection -} - -// ReplicationvCentersClientListResponse contains the response from method ReplicationvCentersClient.List. -type ReplicationvCentersClientListResponse struct { - VCenterCollection -} - -// ReplicationvCentersClientUpdateResponse contains the response from method ReplicationvCentersClient.Update. -type ReplicationvCentersClientUpdateResponse struct { - VCenter -} - -// SupportedOperatingSystemsClientGetResponse contains the response from method SupportedOperatingSystemsClient.Get. -type SupportedOperatingSystemsClientGetResponse struct { - SupportedOperatingSystems -} - -// TargetComputeSizesClientListByReplicationProtectedItemsResponse contains the response from method TargetComputeSizesClient.ListByReplicationProtectedItems. -type TargetComputeSizesClientListByReplicationProtectedItemsResponse struct { - TargetComputeSizeCollection -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/supportedoperatingsystems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/supportedoperatingsystems_client.go deleted file mode 100644 index 55d336d3..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/supportedoperatingsystems_client.go +++ /dev/null @@ -1,120 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SupportedOperatingSystemsClient contains the methods for the SupportedOperatingSystems group. -// Don't use this type directly, use NewSupportedOperatingSystemsClient() instead. -type SupportedOperatingSystemsClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewSupportedOperatingSystemsClient creates a new instance of SupportedOperatingSystemsClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSupportedOperatingSystemsClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SupportedOperatingSystemsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SupportedOperatingSystemsClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the data of supported operating systems by SRS. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// options - SupportedOperatingSystemsClientGetOptions contains the optional parameters for the SupportedOperatingSystemsClient.Get -// method. -func (client *SupportedOperatingSystemsClient) Get(ctx context.Context, options *SupportedOperatingSystemsClientGetOptions) (SupportedOperatingSystemsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, options) - if err != nil { - return SupportedOperatingSystemsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SupportedOperatingSystemsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SupportedOperatingSystemsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *SupportedOperatingSystemsClient) getCreateRequest(ctx context.Context, options *SupportedOperatingSystemsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationSupportedOperatingSystems" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - if options != nil && options.InstanceType != nil { - reqQP.Set("instanceType", *options.InstanceType) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *SupportedOperatingSystemsClient) getHandleResponse(resp *http.Response) (SupportedOperatingSystemsClientGetResponse, error) { - result := SupportedOperatingSystemsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SupportedOperatingSystems); err != nil { - return SupportedOperatingSystemsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/targetcomputesizes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/targetcomputesizes_client.go deleted file mode 100644 index 89757568..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/targetcomputesizes_client.go +++ /dev/null @@ -1,144 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// TargetComputeSizesClient contains the methods for the TargetComputeSizes group. -// Don't use this type directly, use NewTargetComputeSizesClient() instead. -type TargetComputeSizesClient struct { - host string - resourceName string - resourceGroupName string - subscriptionID string - pl runtime.Pipeline -} - -// NewTargetComputeSizesClient creates a new instance of TargetComputeSizesClient with the specified values. -// resourceName - The name of the recovery services vault. -// resourceGroupName - The name of the resource group where the recovery services vault is present. -// subscriptionID - The subscription Id. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewTargetComputeSizesClient(resourceName string, resourceGroupName string, subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TargetComputeSizesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &TargetComputeSizesClient{ - resourceName: resourceName, - resourceGroupName: resourceGroupName, - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListByReplicationProtectedItemsPager - Lists the available target compute sizes for a replication protected item. -// Generated from API version 2022-10-01 -// fabricName - Fabric name. -// protectionContainerName - protection container name. -// replicatedProtectedItemName - Replication protected item name. -// options - TargetComputeSizesClientListByReplicationProtectedItemsOptions contains the optional parameters for the TargetComputeSizesClient.ListByReplicationProtectedItems -// method. -func (client *TargetComputeSizesClient) NewListByReplicationProtectedItemsPager(fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *TargetComputeSizesClientListByReplicationProtectedItemsOptions) *runtime.Pager[TargetComputeSizesClientListByReplicationProtectedItemsResponse] { - return runtime.NewPager(runtime.PagingHandler[TargetComputeSizesClientListByReplicationProtectedItemsResponse]{ - More: func(page TargetComputeSizesClientListByReplicationProtectedItemsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *TargetComputeSizesClientListByReplicationProtectedItemsResponse) (TargetComputeSizesClientListByReplicationProtectedItemsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByReplicationProtectedItemsCreateRequest(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TargetComputeSizesClientListByReplicationProtectedItemsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return TargetComputeSizesClientListByReplicationProtectedItemsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TargetComputeSizesClientListByReplicationProtectedItemsResponse{}, runtime.NewResponseError(resp) - } - return client.listByReplicationProtectedItemsHandleResponse(resp) - }, - }) -} - -// listByReplicationProtectedItemsCreateRequest creates the ListByReplicationProtectedItems request. -func (client *TargetComputeSizesClient) listByReplicationProtectedItemsCreateRequest(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *TargetComputeSizesClientListByReplicationProtectedItemsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/targetComputeSizes" - if client.resourceName == "" { - return nil, errors.New("parameter client.resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(client.resourceName)) - if client.resourceGroupName == "" { - return nil, errors.New("parameter client.resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(client.resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if fabricName == "" { - return nil, errors.New("parameter fabricName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) - if protectionContainerName == "" { - return nil, errors.New("parameter protectionContainerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) - if replicatedProtectedItemName == "" { - return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByReplicationProtectedItemsHandleResponse handles the ListByReplicationProtectedItems response. -func (client *TargetComputeSizesClient) listByReplicationProtectedItemsHandleResponse(resp *http.Response) (TargetComputeSizesClientListByReplicationProtectedItemsResponse, error) { - result := TargetComputeSizesClientListByReplicationProtectedItemsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.TargetComputeSizeCollection); err != nil { - return TargetComputeSizesClientListByReplicationProtectedItemsResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/time_rfc3339.go deleted file mode 100644 index 154cb19b..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/time_rfc3339.go +++ /dev/null @@ -1,87 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armrecoveryservicessiterecovery - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/CHANGELOG.md new file mode 100644 index 00000000..ba1edbde --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/CHANGELOG.md @@ -0,0 +1,381 @@ +# Release History + +## 2.4.0 (2025-04-25) +### Features Added + +- New value `DiskAccountTypePremiumV2LRS`, `DiskAccountTypePremiumZRS`, `DiskAccountTypeStandardSSDZRS`, `DiskAccountTypeUltraSSDLRS` added to enum type `DiskAccountType` +- New enum type `ClusterRecoveryPointType` with values `ClusterRecoveryPointTypeApplicationConsistent`, `ClusterRecoveryPointTypeCrashConsistent`, `ClusterRecoveryPointTypeNotSpecified` +- New enum type `DiskState` with values `DiskStateInitialReplicationFailed`, `DiskStateInitialReplicationPending`, `DiskStateProtected`, `DiskStateUnavailable` +- New enum type `FailoverDirection` with values `FailoverDirectionPrimaryToRecovery`, `FailoverDirectionRecoveryToPrimary` +- New enum type `LinuxLicenseType` with values `LinuxLicenseTypeLinuxServer`, `LinuxLicenseTypeNoLicenseType`, `LinuxLicenseTypeNotSpecified` +- New enum type `SecurityConfiguration` with values `SecurityConfigurationDisabled`, `SecurityConfigurationEnabled` +- New function `*A2AApplyClusterRecoveryPointInput.GetApplyClusterRecoveryPointProviderSpecificInput() *ApplyClusterRecoveryPointProviderSpecificInput` +- New function `*A2AClusterRecoveryPointDetails.GetClusterProviderSpecificRecoveryPointDetails() *ClusterProviderSpecificRecoveryPointDetails` +- New function `*A2AClusterTestFailoverInput.GetClusterTestFailoverProviderSpecificInput() *ClusterTestFailoverProviderSpecificInput` +- New function `*A2AClusterUnplannedFailoverInput.GetClusterUnplannedFailoverProviderSpecificInput() *ClusterUnplannedFailoverProviderSpecificInput` +- New function `*A2AReplicationProtectionClusterDetails.GetReplicationClusterProviderSpecificSettings() *ReplicationClusterProviderSpecificSettings` +- New function `*A2ASharedDiskReplicationDetails.GetSharedDiskReplicationProviderSpecificSettings() *SharedDiskReplicationProviderSpecificSettings` +- New function `*A2ASwitchClusterProtectionInput.GetSwitchClusterProtectionProviderSpecificInput() *SwitchClusterProtectionProviderSpecificInput` +- New function `*ApplyClusterRecoveryPointProviderSpecificInput.GetApplyClusterRecoveryPointProviderSpecificInput() *ApplyClusterRecoveryPointProviderSpecificInput` +- New function `*ClientFactory.NewClusterRecoveryPointClient() *ClusterRecoveryPointClient` +- New function `*ClientFactory.NewClusterRecoveryPointsClient() *ClusterRecoveryPointsClient` +- New function `*ClientFactory.NewReplicationProtectionClustersClient() *ReplicationProtectionClustersClient` +- New function `*ClusterFailoverJobDetails.GetJobDetails() *JobDetails` +- New function `*ClusterProviderSpecificRecoveryPointDetails.GetClusterProviderSpecificRecoveryPointDetails() *ClusterProviderSpecificRecoveryPointDetails` +- New function `NewClusterRecoveryPointClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ClusterRecoveryPointClient, error)` +- New function `*ClusterRecoveryPointClient.Get(context.Context, string, string, string, string, string, string, *ClusterRecoveryPointClientGetOptions) (ClusterRecoveryPointClientGetResponse, error)` +- New function `NewClusterRecoveryPointsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ClusterRecoveryPointsClient, error)` +- New function `*ClusterRecoveryPointsClient.NewListByReplicationProtectionClusterPager(string, string, string, string, string, *ClusterRecoveryPointsClientListByReplicationProtectionClusterOptions) *runtime.Pager[ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse]` +- New function `*ClusterSwitchProtectionJobDetails.GetJobDetails() *JobDetails` +- New function `*ClusterTestFailoverJobDetails.GetJobDetails() *JobDetails` +- New function `*ClusterTestFailoverProviderSpecificInput.GetClusterTestFailoverProviderSpecificInput() *ClusterTestFailoverProviderSpecificInput` +- New function `*ClusterUnplannedFailoverProviderSpecificInput.GetClusterUnplannedFailoverProviderSpecificInput() *ClusterUnplannedFailoverProviderSpecificInput` +- New function `*InMageRcmAddDisksInput.GetAddDisksProviderSpecificInput() *AddDisksProviderSpecificInput` +- New function `*ReplicationClusterProviderSpecificSettings.GetReplicationClusterProviderSpecificSettings() *ReplicationClusterProviderSpecificSettings` +- New function `NewReplicationProtectionClustersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ReplicationProtectionClustersClient, error)` +- New function `*ReplicationProtectionClustersClient.BeginApplyRecoveryPoint(context.Context, string, string, string, string, string, ApplyClusterRecoveryPointInput, *ReplicationProtectionClustersClientBeginApplyRecoveryPointOptions) (*runtime.Poller[ReplicationProtectionClustersClientApplyRecoveryPointResponse], error)` +- New function `*ReplicationProtectionClustersClient.BeginCreate(context.Context, string, string, string, string, string, ReplicationProtectionCluster, *ReplicationProtectionClustersClientBeginCreateOptions) (*runtime.Poller[ReplicationProtectionClustersClientCreateResponse], error)` +- New function `*ReplicationProtectionClustersClient.BeginFailoverCommit(context.Context, string, string, string, string, string, *ReplicationProtectionClustersClientBeginFailoverCommitOptions) (*runtime.Poller[ReplicationProtectionClustersClientFailoverCommitResponse], error)` +- New function `*ReplicationProtectionClustersClient.Get(context.Context, string, string, string, string, string, *ReplicationProtectionClustersClientGetOptions) (ReplicationProtectionClustersClientGetResponse, error)` +- New function `*ReplicationProtectionClustersClient.GetOperationResults(context.Context, string, string, string, string, string, string, *ReplicationProtectionClustersClientGetOperationResultsOptions) (ReplicationProtectionClustersClientGetOperationResultsResponse, error)` +- New function `*ReplicationProtectionClustersClient.NewListByReplicationProtectionContainersPager(string, string, string, string, *ReplicationProtectionClustersClientListByReplicationProtectionContainersOptions) *runtime.Pager[ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse]` +- New function `*ReplicationProtectionClustersClient.NewListPager(string, string, *ReplicationProtectionClustersClientListOptions) *runtime.Pager[ReplicationProtectionClustersClientListResponse]` +- New function `*ReplicationProtectionClustersClient.BeginPurge(context.Context, string, string, string, string, string, *ReplicationProtectionClustersClientBeginPurgeOptions) (*runtime.Poller[ReplicationProtectionClustersClientPurgeResponse], error)` +- New function `*ReplicationProtectionClustersClient.BeginRepairReplication(context.Context, string, string, string, string, string, *ReplicationProtectionClustersClientBeginRepairReplicationOptions) (*runtime.Poller[ReplicationProtectionClustersClientRepairReplicationResponse], error)` +- New function `*ReplicationProtectionClustersClient.BeginTestFailover(context.Context, string, string, string, string, string, ClusterTestFailoverInput, *ReplicationProtectionClustersClientBeginTestFailoverOptions) (*runtime.Poller[ReplicationProtectionClustersClientTestFailoverResponse], error)` +- New function `*ReplicationProtectionClustersClient.BeginTestFailoverCleanup(context.Context, string, string, string, string, string, ClusterTestFailoverCleanupInput, *ReplicationProtectionClustersClientBeginTestFailoverCleanupOptions) (*runtime.Poller[ReplicationProtectionClustersClientTestFailoverCleanupResponse], error)` +- New function `*ReplicationProtectionClustersClient.BeginUnplannedFailover(context.Context, string, string, string, string, string, ClusterUnplannedFailoverInput, *ReplicationProtectionClustersClientBeginUnplannedFailoverOptions) (*runtime.Poller[ReplicationProtectionClustersClientUnplannedFailoverResponse], error)` +- New function `*ReplicationProtectionContainersClient.BeginSwitchClusterProtection(context.Context, string, string, string, string, SwitchClusterProtectionInput, *ReplicationProtectionContainersClientBeginSwitchClusterProtectionOptions) (*runtime.Poller[ReplicationProtectionContainersClientSwitchClusterProtectionResponse], error)` +- New function `*SharedDiskReplicationProviderSpecificSettings.GetSharedDiskReplicationProviderSpecificSettings() *SharedDiskReplicationProviderSpecificSettings` +- New function `*SwitchClusterProtectionProviderSpecificInput.GetSwitchClusterProtectionProviderSpecificInput() *SwitchClusterProtectionProviderSpecificInput` +- New struct `A2AApplyClusterRecoveryPointInput` +- New struct `A2AClusterRecoveryPointDetails` +- New struct `A2AClusterTestFailoverInput` +- New struct `A2AClusterUnplannedFailoverInput` +- New struct `A2AProtectedItemDetail` +- New struct `A2AReplicationProtectionClusterDetails` +- New struct `A2ASharedDiskIRErrorDetails` +- New struct `A2ASharedDiskReplicationDetails` +- New struct `A2ASwitchClusterProtectionInput` +- New struct `ApplyClusterRecoveryPointInput` +- New struct `ApplyClusterRecoveryPointInputProperties` +- New struct `ClusterFailoverJobDetails` +- New struct `ClusterRecoveryPoint` +- New struct `ClusterRecoveryPointCollection` +- New struct `ClusterRecoveryPointProperties` +- New struct `ClusterSwitchProtectionJobDetails` +- New struct `ClusterTestFailoverCleanupInput` +- New struct `ClusterTestFailoverCleanupInputProperties` +- New struct `ClusterTestFailoverInput` +- New struct `ClusterTestFailoverInputProperties` +- New struct `ClusterTestFailoverJobDetails` +- New struct `ClusterUnplannedFailoverInput` +- New struct `ClusterUnplannedFailoverInputProperties` +- New struct `InMageRcmAddDisksInput` +- New struct `InMageRcmUnProtectedDiskDetails` +- New struct `ManagedRunCommandScriptInput` +- New struct `ProtectedClustersQueryParameter` +- New struct `RegisteredClusterNodes` +- New struct `ReplicationProtectionCluster` +- New struct `ReplicationProtectionClusterCollection` +- New struct `ReplicationProtectionClusterProperties` +- New struct `SecurityProfileProperties` +- New struct `SharedDiskReplicationItemProperties` +- New struct `SwitchClusterProtectionInput` +- New struct `SwitchClusterProtectionInputProperties` +- New struct `UserCreatedResourceTag` +- New field `ProtectionClusterID` in struct `A2AEnableProtectionInput` +- New field `IsClusterInfraReady`, `ProtectionClusterID` in struct `A2AReplicationDetails` +- New field `SectorSizeInBytes` in struct `HyperVReplicaAzureDiskInputDetails` +- New field `LinuxLicenseType`, `TargetVMSecurityProfile`, `UserSelectedOSName` in struct `HyperVReplicaAzureEnableProtectionInput` +- New field `SectorSizeInBytes`, `TargetDiskAccountType` in struct `HyperVReplicaAzureManagedDiskDetails` +- New field `LinuxLicenseType`, `TargetVMSecurityProfile` in struct `HyperVReplicaAzureReplicationDetails` +- New field `LinuxLicenseType`, `UserSelectedOSName` in struct `HyperVReplicaAzureUpdateReplicationProtectedItemInput` +- New field `SectorSizeInBytes` in struct `InMageRcmDiskInput` +- New field `SectorSizeInBytes` in struct `InMageRcmDisksDefaultInput` +- New field `LinuxLicenseType`, `SQLServerLicenseType`, `SeedManagedDiskTags`, `TargetManagedDiskTags`, `TargetNicTags`, `TargetVMSecurityProfile`, `TargetVMTags`, `UserSelectedOSName` in struct `InMageRcmEnableProtectionInput` +- New field `TargetNicName` in struct `InMageRcmNicDetails` +- New field `TargetNicName` in struct `InMageRcmNicInput` +- New field `CustomTargetDiskName`, `DiskState`, `SectorSizeInBytes` in struct `InMageRcmProtectedDiskDetails` +- New field `LinuxLicenseType`, `OSName`, `SQLServerLicenseType`, `SeedManagedDiskTags`, `SupportedOSVersions`, `TargetManagedDiskTags`, `TargetNicTags`, `TargetVMSecurityProfile`, `TargetVMTags`, `UnprotectedDisks` in struct `InMageRcmReplicationDetails` +- New field `OSUpgradeVersion` in struct `InMageRcmTestFailoverInput` +- New field `OSUpgradeVersion` in struct `InMageRcmUnplannedFailoverInput` +- New field `LinuxLicenseType`, `SQLServerLicenseType`, `TargetManagedDiskTags`, `TargetNicTags`, `TargetVMTags`, `UserSelectedOSName` in struct `InMageRcmUpdateReplicationProtectedItemInput` +- New field `UserSelectedOSName` in struct `OSDetails` +- New field `SectorSizeInBytes` in struct `VMwareCbtDiskInput` +- New field `LinuxLicenseType`, `UserSelectedOSName` in struct `VMwareCbtEnableMigrationInput` +- New field `PostMigrationSteps` in struct `VMwareCbtMigrateInput` +- New field `LinuxLicenseType` in struct `VMwareCbtMigrationDetails` +- New field `SectorSizeInBytes` in struct `VMwareCbtProtectedDiskDetails` +- New field `PostMigrationSteps` in struct `VMwareCbtTestMigrateInput` +- New field `LinuxLicenseType`, `UserSelectedOSName` in struct `VMwareCbtUpdateMigrationItemInput` + + +## 2.3.0 (2024-02-23) +### Features Added + +- New function `*ReplicationFabricsClient.BeginRemoveInfra(context.Context, string, string, string, *ReplicationFabricsClientBeginRemoveInfraOptions) (*runtime.Poller[ReplicationFabricsClientRemoveInfraResponse], error)` +- New field `AutoProtectionOfDataDisk` in struct `A2AEnableProtectionInput` + + +## 2.2.0 (2023-11-30) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.1.0 (2023-09-22) +### Features Added + +- New enum type `ChurnOptionSelected` with values `ChurnOptionSelectedHigh`, `ChurnOptionSelectedNormal` +- New enum type `SecurityType` with values `SecurityTypeConfidentialVM`, `SecurityTypeNone`, `SecurityTypeTrustedLaunch` +- New struct `A2AFabricSpecificLocationDetails` +- New struct `ApplianceMonitoringDetails` +- New struct `ApplianceResourceDetails` +- New struct `DataStoreUtilizationDetails` +- New struct `GatewayOperationDetails` +- New struct `OSUpgradeSupportedVersions` +- New struct `VMwareCbtSecurityProfileProperties` +- New field `ChurnOptionSelected` in struct `A2AReplicationDetails` +- New field `LocationDetails` in struct `AzureFabricSpecificDetails` +- New field `ExtendedLocationMappings`, `LocationDetails` in struct `FabricQueryParameter` +- New field `OSUpgradeVersion` in struct `HyperVReplicaAzurePlannedFailoverProviderInput` +- New field `AllAvailableOSUpgradeConfigurations` in struct `HyperVReplicaAzureReplicationDetails` +- New field `OSUpgradeVersion` in struct `HyperVReplicaAzureTestFailoverInput` +- New field `AllAvailableOSUpgradeConfigurations`, `OSName`, `SupportedOSVersions` in struct `InMageAzureV2ReplicationDetails` +- New field `OSUpgradeVersion` in struct `InMageAzureV2TestFailoverInput` +- New field `OSUpgradeVersion` in struct `InMageAzureV2UnplannedFailoverInput` +- New field `ConfidentialVMKeyVaultID`, `TargetVMSecurityProfile` in struct `VMwareCbtEnableMigrationInput` +- New field `OSUpgradeVersion` in struct `VMwareCbtMigrateInput` +- New field `ApplianceMonitoringDetails`, `ConfidentialVMKeyVaultID`, `DeltaSyncProgressPercentage`, `DeltaSyncRetryCount`, `GatewayOperationDetails`, `IsCheckSumResyncCycle`, `OSName`, `OperationName`, `SupportedOSVersions`, `TargetVMSecurityProfile` in struct `VMwareCbtMigrationDetails` +- New field `GatewayOperationDetails` in struct `VMwareCbtProtectedDiskDetails` +- New field `ExcludedSKUs` in struct `VMwareCbtProtectionContainerMappingDetails` +- New field `OSUpgradeVersion` in struct `VMwareCbtTestMigrateInput` + + +## 2.0.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + + +## 2.0.0 (2023-04-03) +### Breaking Changes + +- Function `NewMigrationRecoveryPointsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*MigrationRecoveryPointsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *MigrationRecoveryPointsClientGetOptions)` to `(context.Context, string, string, string, string, string, string, *MigrationRecoveryPointsClientGetOptions)` +- Function `*MigrationRecoveryPointsClient.NewListByReplicationMigrationItemsPager` parameter(s) have been changed from `(string, string, string, *MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions)` to `(string, string, string, string, string, *MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions)` +- Function `NewOperationsClient` parameter(s) have been changed from `(string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*OperationsClient.NewListPager` parameter(s) have been changed from `(*OperationsClientListOptions)` to `(string, *OperationsClientListOptions)` +- Function `NewRecoveryPointsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*RecoveryPointsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, string, *RecoveryPointsClientGetOptions)` to `(context.Context, string, string, string, string, string, string, *RecoveryPointsClientGetOptions)` +- Function `*RecoveryPointsClient.NewListByReplicationProtectedItemsPager` parameter(s) have been changed from `(string, string, string, *RecoveryPointsClientListByReplicationProtectedItemsOptions)` to `(string, string, string, string, string, *RecoveryPointsClientListByReplicationProtectedItemsOptions)` +- Function `NewReplicationAlertSettingsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationAlertSettingsClient.Create` parameter(s) have been changed from `(context.Context, string, ConfigureAlertRequest, *ReplicationAlertSettingsClientCreateOptions)` to `(context.Context, string, string, string, ConfigureAlertRequest, *ReplicationAlertSettingsClientCreateOptions)` +- Function `*ReplicationAlertSettingsClient.Get` parameter(s) have been changed from `(context.Context, string, *ReplicationAlertSettingsClientGetOptions)` to `(context.Context, string, string, string, *ReplicationAlertSettingsClientGetOptions)` +- Function `*ReplicationAlertSettingsClient.NewListPager` parameter(s) have been changed from `(*ReplicationAlertSettingsClientListOptions)` to `(string, string, *ReplicationAlertSettingsClientListOptions)` +- Function `NewReplicationAppliancesClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationAppliancesClient.NewListPager` parameter(s) have been changed from `(*ReplicationAppliancesClientListOptions)` to `(string, string, *ReplicationAppliancesClientListOptions)` +- Function `NewReplicationEligibilityResultsClient` parameter(s) have been changed from `(string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationEligibilityResultsClient.Get` parameter(s) have been changed from `(context.Context, string, *ReplicationEligibilityResultsClientGetOptions)` to `(context.Context, string, string, *ReplicationEligibilityResultsClientGetOptions)` +- Function `*ReplicationEligibilityResultsClient.List` parameter(s) have been changed from `(context.Context, string, *ReplicationEligibilityResultsClientListOptions)` to `(context.Context, string, string, *ReplicationEligibilityResultsClientListOptions)` +- Function `NewReplicationEventsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationEventsClient.Get` parameter(s) have been changed from `(context.Context, string, *ReplicationEventsClientGetOptions)` to `(context.Context, string, string, string, *ReplicationEventsClientGetOptions)` +- Function `*ReplicationEventsClient.NewListPager` parameter(s) have been changed from `(*ReplicationEventsClientListOptions)` to `(string, string, *ReplicationEventsClientListOptions)` +- Function `NewReplicationFabricsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationFabricsClient.BeginCheckConsistency` parameter(s) have been changed from `(context.Context, string, *ReplicationFabricsClientBeginCheckConsistencyOptions)` to `(context.Context, string, string, string, *ReplicationFabricsClientBeginCheckConsistencyOptions)` +- Function `*ReplicationFabricsClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, FabricCreationInput, *ReplicationFabricsClientBeginCreateOptions)` to `(context.Context, string, string, string, FabricCreationInput, *ReplicationFabricsClientBeginCreateOptions)` +- Function `*ReplicationFabricsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, *ReplicationFabricsClientBeginDeleteOptions)` to `(context.Context, string, string, string, *ReplicationFabricsClientBeginDeleteOptions)` +- Function `*ReplicationFabricsClient.BeginMigrateToAAD` parameter(s) have been changed from `(context.Context, string, *ReplicationFabricsClientBeginMigrateToAADOptions)` to `(context.Context, string, string, string, *ReplicationFabricsClientBeginMigrateToAADOptions)` +- Function `*ReplicationFabricsClient.BeginPurge` parameter(s) have been changed from `(context.Context, string, *ReplicationFabricsClientBeginPurgeOptions)` to `(context.Context, string, string, string, *ReplicationFabricsClientBeginPurgeOptions)` +- Function `*ReplicationFabricsClient.BeginReassociateGateway` parameter(s) have been changed from `(context.Context, string, FailoverProcessServerRequest, *ReplicationFabricsClientBeginReassociateGatewayOptions)` to `(context.Context, string, string, string, FailoverProcessServerRequest, *ReplicationFabricsClientBeginReassociateGatewayOptions)` +- Function `*ReplicationFabricsClient.BeginRenewCertificate` parameter(s) have been changed from `(context.Context, string, RenewCertificateInput, *ReplicationFabricsClientBeginRenewCertificateOptions)` to `(context.Context, string, string, string, RenewCertificateInput, *ReplicationFabricsClientBeginRenewCertificateOptions)` +- Function `*ReplicationFabricsClient.Get` parameter(s) have been changed from `(context.Context, string, *ReplicationFabricsClientGetOptions)` to `(context.Context, string, string, string, *ReplicationFabricsClientGetOptions)` +- Function `*ReplicationFabricsClient.NewListPager` parameter(s) have been changed from `(*ReplicationFabricsClientListOptions)` to `(string, string, *ReplicationFabricsClientListOptions)` +- Function `NewReplicationJobsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationJobsClient.BeginCancel` parameter(s) have been changed from `(context.Context, string, *ReplicationJobsClientBeginCancelOptions)` to `(context.Context, string, string, string, *ReplicationJobsClientBeginCancelOptions)` +- Function `*ReplicationJobsClient.BeginExport` parameter(s) have been changed from `(context.Context, JobQueryParameter, *ReplicationJobsClientBeginExportOptions)` to `(context.Context, string, string, JobQueryParameter, *ReplicationJobsClientBeginExportOptions)` +- Function `*ReplicationJobsClient.BeginRestart` parameter(s) have been changed from `(context.Context, string, *ReplicationJobsClientBeginRestartOptions)` to `(context.Context, string, string, string, *ReplicationJobsClientBeginRestartOptions)` +- Function `*ReplicationJobsClient.BeginResume` parameter(s) have been changed from `(context.Context, string, ResumeJobParams, *ReplicationJobsClientBeginResumeOptions)` to `(context.Context, string, string, string, ResumeJobParams, *ReplicationJobsClientBeginResumeOptions)` +- Function `*ReplicationJobsClient.Get` parameter(s) have been changed from `(context.Context, string, *ReplicationJobsClientGetOptions)` to `(context.Context, string, string, string, *ReplicationJobsClientGetOptions)` +- Function `*ReplicationJobsClient.NewListPager` parameter(s) have been changed from `(*ReplicationJobsClientListOptions)` to `(string, string, *ReplicationJobsClientListOptions)` +- Function `NewReplicationLogicalNetworksClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationLogicalNetworksClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ReplicationLogicalNetworksClientGetOptions)` to `(context.Context, string, string, string, string, *ReplicationLogicalNetworksClientGetOptions)` +- Function `*ReplicationLogicalNetworksClient.NewListByReplicationFabricsPager` parameter(s) have been changed from `(string, *ReplicationLogicalNetworksClientListByReplicationFabricsOptions)` to `(string, string, string, *ReplicationLogicalNetworksClientListByReplicationFabricsOptions)` +- Function `NewReplicationMigrationItemsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationMigrationItemsClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, string, EnableMigrationInput, *ReplicationMigrationItemsClientBeginCreateOptions)` to `(context.Context, string, string, string, string, string, EnableMigrationInput, *ReplicationMigrationItemsClientBeginCreateOptions)` +- Function `*ReplicationMigrationItemsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationMigrationItemsClientBeginDeleteOptions)` to `(context.Context, string, string, string, string, string, *ReplicationMigrationItemsClientBeginDeleteOptions)` +- Function `*ReplicationMigrationItemsClient.BeginMigrate` parameter(s) have been changed from `(context.Context, string, string, string, MigrateInput, *ReplicationMigrationItemsClientBeginMigrateOptions)` to `(context.Context, string, string, string, string, string, MigrateInput, *ReplicationMigrationItemsClientBeginMigrateOptions)` +- Function `*ReplicationMigrationItemsClient.BeginPauseReplication` parameter(s) have been changed from `(context.Context, string, string, string, PauseReplicationInput, *ReplicationMigrationItemsClientBeginPauseReplicationOptions)` to `(context.Context, string, string, string, string, string, PauseReplicationInput, *ReplicationMigrationItemsClientBeginPauseReplicationOptions)` +- Function `*ReplicationMigrationItemsClient.BeginResumeReplication` parameter(s) have been changed from `(context.Context, string, string, string, ResumeReplicationInput, *ReplicationMigrationItemsClientBeginResumeReplicationOptions)` to `(context.Context, string, string, string, string, string, ResumeReplicationInput, *ReplicationMigrationItemsClientBeginResumeReplicationOptions)` +- Function `*ReplicationMigrationItemsClient.BeginResync` parameter(s) have been changed from `(context.Context, string, string, string, ResyncInput, *ReplicationMigrationItemsClientBeginResyncOptions)` to `(context.Context, string, string, string, string, string, ResyncInput, *ReplicationMigrationItemsClientBeginResyncOptions)` +- Function `*ReplicationMigrationItemsClient.BeginTestMigrate` parameter(s) have been changed from `(context.Context, string, string, string, TestMigrateInput, *ReplicationMigrationItemsClientBeginTestMigrateOptions)` to `(context.Context, string, string, string, string, string, TestMigrateInput, *ReplicationMigrationItemsClientBeginTestMigrateOptions)` +- Function `*ReplicationMigrationItemsClient.BeginTestMigrateCleanup` parameter(s) have been changed from `(context.Context, string, string, string, TestMigrateCleanupInput, *ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions)` to `(context.Context, string, string, string, string, string, TestMigrateCleanupInput, *ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions)` +- Function `*ReplicationMigrationItemsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, UpdateMigrationItemInput, *ReplicationMigrationItemsClientBeginUpdateOptions)` to `(context.Context, string, string, string, string, string, UpdateMigrationItemInput, *ReplicationMigrationItemsClientBeginUpdateOptions)` +- Function `*ReplicationMigrationItemsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationMigrationItemsClientGetOptions)` to `(context.Context, string, string, string, string, string, *ReplicationMigrationItemsClientGetOptions)` +- Function `*ReplicationMigrationItemsClient.NewListByReplicationProtectionContainersPager` parameter(s) have been changed from `(string, string, *ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions)` to `(string, string, string, string, *ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions)` +- Function `*ReplicationMigrationItemsClient.NewListPager` parameter(s) have been changed from `(*ReplicationMigrationItemsClientListOptions)` to `(string, string, *ReplicationMigrationItemsClientListOptions)` +- Function `NewReplicationNetworkMappingsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationNetworkMappingsClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, string, CreateNetworkMappingInput, *ReplicationNetworkMappingsClientBeginCreateOptions)` to `(context.Context, string, string, string, string, string, CreateNetworkMappingInput, *ReplicationNetworkMappingsClientBeginCreateOptions)` +- Function `*ReplicationNetworkMappingsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationNetworkMappingsClientBeginDeleteOptions)` to `(context.Context, string, string, string, string, string, *ReplicationNetworkMappingsClientBeginDeleteOptions)` +- Function `*ReplicationNetworkMappingsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, UpdateNetworkMappingInput, *ReplicationNetworkMappingsClientBeginUpdateOptions)` to `(context.Context, string, string, string, string, string, UpdateNetworkMappingInput, *ReplicationNetworkMappingsClientBeginUpdateOptions)` +- Function `*ReplicationNetworkMappingsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationNetworkMappingsClientGetOptions)` to `(context.Context, string, string, string, string, string, *ReplicationNetworkMappingsClientGetOptions)` +- Function `*ReplicationNetworkMappingsClient.NewListByReplicationNetworksPager` parameter(s) have been changed from `(string, string, *ReplicationNetworkMappingsClientListByReplicationNetworksOptions)` to `(string, string, string, string, *ReplicationNetworkMappingsClientListByReplicationNetworksOptions)` +- Function `*ReplicationNetworkMappingsClient.NewListPager` parameter(s) have been changed from `(*ReplicationNetworkMappingsClientListOptions)` to `(string, string, *ReplicationNetworkMappingsClientListOptions)` +- Function `NewReplicationNetworksClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationNetworksClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ReplicationNetworksClientGetOptions)` to `(context.Context, string, string, string, string, *ReplicationNetworksClientGetOptions)` +- Function `*ReplicationNetworksClient.NewListByReplicationFabricsPager` parameter(s) have been changed from `(string, *ReplicationNetworksClientListByReplicationFabricsOptions)` to `(string, string, string, *ReplicationNetworksClientListByReplicationFabricsOptions)` +- Function `*ReplicationNetworksClient.NewListPager` parameter(s) have been changed from `(*ReplicationNetworksClientListOptions)` to `(string, string, *ReplicationNetworksClientListOptions)` +- Function `NewReplicationPoliciesClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationPoliciesClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, CreatePolicyInput, *ReplicationPoliciesClientBeginCreateOptions)` to `(context.Context, string, string, string, CreatePolicyInput, *ReplicationPoliciesClientBeginCreateOptions)` +- Function `*ReplicationPoliciesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, *ReplicationPoliciesClientBeginDeleteOptions)` to `(context.Context, string, string, string, *ReplicationPoliciesClientBeginDeleteOptions)` +- Function `*ReplicationPoliciesClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, UpdatePolicyInput, *ReplicationPoliciesClientBeginUpdateOptions)` to `(context.Context, string, string, string, UpdatePolicyInput, *ReplicationPoliciesClientBeginUpdateOptions)` +- Function `*ReplicationPoliciesClient.Get` parameter(s) have been changed from `(context.Context, string, *ReplicationPoliciesClientGetOptions)` to `(context.Context, string, string, string, *ReplicationPoliciesClientGetOptions)` +- Function `*ReplicationPoliciesClient.NewListPager` parameter(s) have been changed from `(*ReplicationPoliciesClientListOptions)` to `(string, string, *ReplicationPoliciesClientListOptions)` +- Function `NewReplicationProtectableItemsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationProtectableItemsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationProtectableItemsClientGetOptions)` to `(context.Context, string, string, string, string, string, *ReplicationProtectableItemsClientGetOptions)` +- Function `*ReplicationProtectableItemsClient.NewListByReplicationProtectionContainersPager` parameter(s) have been changed from `(string, string, *ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions)` to `(string, string, string, string, *ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions)` +- Function `NewReplicationProtectedItemsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationProtectedItemsClient.BeginAddDisks` parameter(s) have been changed from `(context.Context, string, string, string, AddDisksInput, *ReplicationProtectedItemsClientBeginAddDisksOptions)` to `(context.Context, string, string, string, string, string, AddDisksInput, *ReplicationProtectedItemsClientBeginAddDisksOptions)` +- Function `*ReplicationProtectedItemsClient.BeginApplyRecoveryPoint` parameter(s) have been changed from `(context.Context, string, string, string, ApplyRecoveryPointInput, *ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions)` to `(context.Context, string, string, string, string, string, ApplyRecoveryPointInput, *ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions)` +- Function `*ReplicationProtectedItemsClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, string, EnableProtectionInput, *ReplicationProtectedItemsClientBeginCreateOptions)` to `(context.Context, string, string, string, string, string, EnableProtectionInput, *ReplicationProtectedItemsClientBeginCreateOptions)` +- Function `*ReplicationProtectedItemsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, DisableProtectionInput, *ReplicationProtectedItemsClientBeginDeleteOptions)` to `(context.Context, string, string, string, string, string, DisableProtectionInput, *ReplicationProtectedItemsClientBeginDeleteOptions)` +- Function `*ReplicationProtectedItemsClient.BeginFailoverCancel` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationProtectedItemsClientBeginFailoverCancelOptions)` to `(context.Context, string, string, string, string, string, *ReplicationProtectedItemsClientBeginFailoverCancelOptions)` +- Function `*ReplicationProtectedItemsClient.BeginFailoverCommit` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationProtectedItemsClientBeginFailoverCommitOptions)` to `(context.Context, string, string, string, string, string, *ReplicationProtectedItemsClientBeginFailoverCommitOptions)` +- Function `*ReplicationProtectedItemsClient.BeginPlannedFailover` parameter(s) have been changed from `(context.Context, string, string, string, PlannedFailoverInput, *ReplicationProtectedItemsClientBeginPlannedFailoverOptions)` to `(context.Context, string, string, string, string, string, PlannedFailoverInput, *ReplicationProtectedItemsClientBeginPlannedFailoverOptions)` +- Function `*ReplicationProtectedItemsClient.BeginPurge` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationProtectedItemsClientBeginPurgeOptions)` to `(context.Context, string, string, string, string, string, *ReplicationProtectedItemsClientBeginPurgeOptions)` +- Function `*ReplicationProtectedItemsClient.BeginRemoveDisks` parameter(s) have been changed from `(context.Context, string, string, string, RemoveDisksInput, *ReplicationProtectedItemsClientBeginRemoveDisksOptions)` to `(context.Context, string, string, string, string, string, RemoveDisksInput, *ReplicationProtectedItemsClientBeginRemoveDisksOptions)` +- Function `*ReplicationProtectedItemsClient.BeginRepairReplication` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationProtectedItemsClientBeginRepairReplicationOptions)` to `(context.Context, string, string, string, string, string, *ReplicationProtectedItemsClientBeginRepairReplicationOptions)` +- Function `*ReplicationProtectedItemsClient.BeginReprotect` parameter(s) have been changed from `(context.Context, string, string, string, ReverseReplicationInput, *ReplicationProtectedItemsClientBeginReprotectOptions)` to `(context.Context, string, string, string, string, string, ReverseReplicationInput, *ReplicationProtectedItemsClientBeginReprotectOptions)` +- Function `*ReplicationProtectedItemsClient.BeginResolveHealthErrors` parameter(s) have been changed from `(context.Context, string, string, string, ResolveHealthInput, *ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions)` to `(context.Context, string, string, string, string, string, ResolveHealthInput, *ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions)` +- Function `*ReplicationProtectedItemsClient.BeginSwitchProvider` parameter(s) have been changed from `(context.Context, string, string, string, SwitchProviderInput, *ReplicationProtectedItemsClientBeginSwitchProviderOptions)` to `(context.Context, string, string, string, string, string, SwitchProviderInput, *ReplicationProtectedItemsClientBeginSwitchProviderOptions)` +- Function `*ReplicationProtectedItemsClient.BeginTestFailover` parameter(s) have been changed from `(context.Context, string, string, string, TestFailoverInput, *ReplicationProtectedItemsClientBeginTestFailoverOptions)` to `(context.Context, string, string, string, string, string, TestFailoverInput, *ReplicationProtectedItemsClientBeginTestFailoverOptions)` +- Function `*ReplicationProtectedItemsClient.BeginTestFailoverCleanup` parameter(s) have been changed from `(context.Context, string, string, string, TestFailoverCleanupInput, *ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions)` to `(context.Context, string, string, string, string, string, TestFailoverCleanupInput, *ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions)` +- Function `*ReplicationProtectedItemsClient.BeginUnplannedFailover` parameter(s) have been changed from `(context.Context, string, string, string, UnplannedFailoverInput, *ReplicationProtectedItemsClientBeginUnplannedFailoverOptions)` to `(context.Context, string, string, string, string, string, UnplannedFailoverInput, *ReplicationProtectedItemsClientBeginUnplannedFailoverOptions)` +- Function `*ReplicationProtectedItemsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, UpdateReplicationProtectedItemInput, *ReplicationProtectedItemsClientBeginUpdateOptions)` to `(context.Context, string, string, string, string, string, UpdateReplicationProtectedItemInput, *ReplicationProtectedItemsClientBeginUpdateOptions)` +- Function `*ReplicationProtectedItemsClient.BeginUpdateAppliance` parameter(s) have been changed from `(context.Context, string, string, string, UpdateApplianceForReplicationProtectedItemInput, *ReplicationProtectedItemsClientBeginUpdateApplianceOptions)` to `(context.Context, string, string, string, string, string, UpdateApplianceForReplicationProtectedItemInput, *ReplicationProtectedItemsClientBeginUpdateApplianceOptions)` +- Function `*ReplicationProtectedItemsClient.BeginUpdateMobilityService` parameter(s) have been changed from `(context.Context, string, string, string, UpdateMobilityServiceRequest, *ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions)` to `(context.Context, string, string, string, string, string, UpdateMobilityServiceRequest, *ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions)` +- Function `*ReplicationProtectedItemsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationProtectedItemsClientGetOptions)` to `(context.Context, string, string, string, string, string, *ReplicationProtectedItemsClientGetOptions)` +- Function `*ReplicationProtectedItemsClient.NewListByReplicationProtectionContainersPager` parameter(s) have been changed from `(string, string, *ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions)` to `(string, string, string, string, *ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions)` +- Function `*ReplicationProtectedItemsClient.NewListPager` parameter(s) have been changed from `(*ReplicationProtectedItemsClientListOptions)` to `(string, string, *ReplicationProtectedItemsClientListOptions)` +- Function `NewReplicationProtectionContainerMappingsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationProtectionContainerMappingsClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, string, CreateProtectionContainerMappingInput, *ReplicationProtectionContainerMappingsClientBeginCreateOptions)` to `(context.Context, string, string, string, string, string, CreateProtectionContainerMappingInput, *ReplicationProtectionContainerMappingsClientBeginCreateOptions)` +- Function `*ReplicationProtectionContainerMappingsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, RemoveProtectionContainerMappingInput, *ReplicationProtectionContainerMappingsClientBeginDeleteOptions)` to `(context.Context, string, string, string, string, string, RemoveProtectionContainerMappingInput, *ReplicationProtectionContainerMappingsClientBeginDeleteOptions)` +- Function `*ReplicationProtectionContainerMappingsClient.BeginPurge` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationProtectionContainerMappingsClientBeginPurgeOptions)` to `(context.Context, string, string, string, string, string, *ReplicationProtectionContainerMappingsClientBeginPurgeOptions)` +- Function `*ReplicationProtectionContainerMappingsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, UpdateProtectionContainerMappingInput, *ReplicationProtectionContainerMappingsClientBeginUpdateOptions)` to `(context.Context, string, string, string, string, string, UpdateProtectionContainerMappingInput, *ReplicationProtectionContainerMappingsClientBeginUpdateOptions)` +- Function `*ReplicationProtectionContainerMappingsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationProtectionContainerMappingsClientGetOptions)` to `(context.Context, string, string, string, string, string, *ReplicationProtectionContainerMappingsClientGetOptions)` +- Function `*ReplicationProtectionContainerMappingsClient.NewListByReplicationProtectionContainersPager` parameter(s) have been changed from `(string, string, *ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions)` to `(string, string, string, string, *ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions)` +- Function `*ReplicationProtectionContainerMappingsClient.NewListPager` parameter(s) have been changed from `(*ReplicationProtectionContainerMappingsClientListOptions)` to `(string, string, *ReplicationProtectionContainerMappingsClientListOptions)` +- Function `NewReplicationProtectionContainersClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationProtectionContainersClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, CreateProtectionContainerInput, *ReplicationProtectionContainersClientBeginCreateOptions)` to `(context.Context, string, string, string, string, CreateProtectionContainerInput, *ReplicationProtectionContainersClientBeginCreateOptions)` +- Function `*ReplicationProtectionContainersClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *ReplicationProtectionContainersClientBeginDeleteOptions)` to `(context.Context, string, string, string, string, *ReplicationProtectionContainersClientBeginDeleteOptions)` +- Function `*ReplicationProtectionContainersClient.BeginDiscoverProtectableItem` parameter(s) have been changed from `(context.Context, string, string, DiscoverProtectableItemRequest, *ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions)` to `(context.Context, string, string, string, string, DiscoverProtectableItemRequest, *ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions)` +- Function `*ReplicationProtectionContainersClient.BeginSwitchProtection` parameter(s) have been changed from `(context.Context, string, string, SwitchProtectionInput, *ReplicationProtectionContainersClientBeginSwitchProtectionOptions)` to `(context.Context, string, string, string, string, SwitchProtectionInput, *ReplicationProtectionContainersClientBeginSwitchProtectionOptions)` +- Function `*ReplicationProtectionContainersClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ReplicationProtectionContainersClientGetOptions)` to `(context.Context, string, string, string, string, *ReplicationProtectionContainersClientGetOptions)` +- Function `*ReplicationProtectionContainersClient.NewListByReplicationFabricsPager` parameter(s) have been changed from `(string, *ReplicationProtectionContainersClientListByReplicationFabricsOptions)` to `(string, string, string, *ReplicationProtectionContainersClientListByReplicationFabricsOptions)` +- Function `*ReplicationProtectionContainersClient.NewListPager` parameter(s) have been changed from `(*ReplicationProtectionContainersClientListOptions)` to `(string, string, *ReplicationProtectionContainersClientListOptions)` +- Function `NewReplicationProtectionIntentsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationProtectionIntentsClient.Create` parameter(s) have been changed from `(context.Context, string, CreateProtectionIntentInput, *ReplicationProtectionIntentsClientCreateOptions)` to `(context.Context, string, string, string, CreateProtectionIntentInput, *ReplicationProtectionIntentsClientCreateOptions)` +- Function `*ReplicationProtectionIntentsClient.Get` parameter(s) have been changed from `(context.Context, string, *ReplicationProtectionIntentsClientGetOptions)` to `(context.Context, string, string, string, *ReplicationProtectionIntentsClientGetOptions)` +- Function `*ReplicationProtectionIntentsClient.NewListPager` parameter(s) have been changed from `(*ReplicationProtectionIntentsClientListOptions)` to `(string, string, *ReplicationProtectionIntentsClientListOptions)` +- Function `NewReplicationRecoveryPlansClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationRecoveryPlansClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, CreateRecoveryPlanInput, *ReplicationRecoveryPlansClientBeginCreateOptions)` to `(context.Context, string, string, string, CreateRecoveryPlanInput, *ReplicationRecoveryPlansClientBeginCreateOptions)` +- Function `*ReplicationRecoveryPlansClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, *ReplicationRecoveryPlansClientBeginDeleteOptions)` to `(context.Context, string, string, string, *ReplicationRecoveryPlansClientBeginDeleteOptions)` +- Function `*ReplicationRecoveryPlansClient.BeginFailoverCancel` parameter(s) have been changed from `(context.Context, string, *ReplicationRecoveryPlansClientBeginFailoverCancelOptions)` to `(context.Context, string, string, string, *ReplicationRecoveryPlansClientBeginFailoverCancelOptions)` +- Function `*ReplicationRecoveryPlansClient.BeginFailoverCommit` parameter(s) have been changed from `(context.Context, string, *ReplicationRecoveryPlansClientBeginFailoverCommitOptions)` to `(context.Context, string, string, string, *ReplicationRecoveryPlansClientBeginFailoverCommitOptions)` +- Function `*ReplicationRecoveryPlansClient.BeginPlannedFailover` parameter(s) have been changed from `(context.Context, string, RecoveryPlanPlannedFailoverInput, *ReplicationRecoveryPlansClientBeginPlannedFailoverOptions)` to `(context.Context, string, string, string, RecoveryPlanPlannedFailoverInput, *ReplicationRecoveryPlansClientBeginPlannedFailoverOptions)` +- Function `*ReplicationRecoveryPlansClient.BeginReprotect` parameter(s) have been changed from `(context.Context, string, *ReplicationRecoveryPlansClientBeginReprotectOptions)` to `(context.Context, string, string, string, *ReplicationRecoveryPlansClientBeginReprotectOptions)` +- Function `*ReplicationRecoveryPlansClient.BeginTestFailover` parameter(s) have been changed from `(context.Context, string, RecoveryPlanTestFailoverInput, *ReplicationRecoveryPlansClientBeginTestFailoverOptions)` to `(context.Context, string, string, string, RecoveryPlanTestFailoverInput, *ReplicationRecoveryPlansClientBeginTestFailoverOptions)` +- Function `*ReplicationRecoveryPlansClient.BeginTestFailoverCleanup` parameter(s) have been changed from `(context.Context, string, RecoveryPlanTestFailoverCleanupInput, *ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions)` to `(context.Context, string, string, string, RecoveryPlanTestFailoverCleanupInput, *ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions)` +- Function `*ReplicationRecoveryPlansClient.BeginUnplannedFailover` parameter(s) have been changed from `(context.Context, string, RecoveryPlanUnplannedFailoverInput, *ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions)` to `(context.Context, string, string, string, RecoveryPlanUnplannedFailoverInput, *ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions)` +- Function `*ReplicationRecoveryPlansClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, UpdateRecoveryPlanInput, *ReplicationRecoveryPlansClientBeginUpdateOptions)` to `(context.Context, string, string, string, UpdateRecoveryPlanInput, *ReplicationRecoveryPlansClientBeginUpdateOptions)` +- Function `*ReplicationRecoveryPlansClient.Get` parameter(s) have been changed from `(context.Context, string, *ReplicationRecoveryPlansClientGetOptions)` to `(context.Context, string, string, string, *ReplicationRecoveryPlansClientGetOptions)` +- Function `*ReplicationRecoveryPlansClient.NewListPager` parameter(s) have been changed from `(*ReplicationRecoveryPlansClientListOptions)` to `(string, string, *ReplicationRecoveryPlansClientListOptions)` +- Function `NewReplicationRecoveryServicesProvidersClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationRecoveryServicesProvidersClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, AddRecoveryServicesProviderInput, *ReplicationRecoveryServicesProvidersClientBeginCreateOptions)` to `(context.Context, string, string, string, string, AddRecoveryServicesProviderInput, *ReplicationRecoveryServicesProvidersClientBeginCreateOptions)` +- Function `*ReplicationRecoveryServicesProvidersClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *ReplicationRecoveryServicesProvidersClientBeginDeleteOptions)` to `(context.Context, string, string, string, string, *ReplicationRecoveryServicesProvidersClientBeginDeleteOptions)` +- Function `*ReplicationRecoveryServicesProvidersClient.BeginPurge` parameter(s) have been changed from `(context.Context, string, string, *ReplicationRecoveryServicesProvidersClientBeginPurgeOptions)` to `(context.Context, string, string, string, string, *ReplicationRecoveryServicesProvidersClientBeginPurgeOptions)` +- Function `*ReplicationRecoveryServicesProvidersClient.BeginRefreshProvider` parameter(s) have been changed from `(context.Context, string, string, *ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions)` to `(context.Context, string, string, string, string, *ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions)` +- Function `*ReplicationRecoveryServicesProvidersClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ReplicationRecoveryServicesProvidersClientGetOptions)` to `(context.Context, string, string, string, string, *ReplicationRecoveryServicesProvidersClientGetOptions)` +- Function `*ReplicationRecoveryServicesProvidersClient.NewListByReplicationFabricsPager` parameter(s) have been changed from `(string, *ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions)` to `(string, string, string, *ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions)` +- Function `*ReplicationRecoveryServicesProvidersClient.NewListPager` parameter(s) have been changed from `(*ReplicationRecoveryServicesProvidersClientListOptions)` to `(string, string, *ReplicationRecoveryServicesProvidersClientListOptions)` +- Function `NewReplicationStorageClassificationMappingsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationStorageClassificationMappingsClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, string, StorageClassificationMappingInput, *ReplicationStorageClassificationMappingsClientBeginCreateOptions)` to `(context.Context, string, string, string, string, string, StorageClassificationMappingInput, *ReplicationStorageClassificationMappingsClientBeginCreateOptions)` +- Function `*ReplicationStorageClassificationMappingsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationStorageClassificationMappingsClientBeginDeleteOptions)` to `(context.Context, string, string, string, string, string, *ReplicationStorageClassificationMappingsClientBeginDeleteOptions)` +- Function `*ReplicationStorageClassificationMappingsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *ReplicationStorageClassificationMappingsClientGetOptions)` to `(context.Context, string, string, string, string, string, *ReplicationStorageClassificationMappingsClientGetOptions)` +- Function `*ReplicationStorageClassificationMappingsClient.NewListByReplicationStorageClassificationsPager` parameter(s) have been changed from `(string, string, *ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions)` to `(string, string, string, string, *ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions)` +- Function `*ReplicationStorageClassificationMappingsClient.NewListPager` parameter(s) have been changed from `(*ReplicationStorageClassificationMappingsClientListOptions)` to `(string, string, *ReplicationStorageClassificationMappingsClientListOptions)` +- Function `NewReplicationStorageClassificationsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationStorageClassificationsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ReplicationStorageClassificationsClientGetOptions)` to `(context.Context, string, string, string, string, *ReplicationStorageClassificationsClientGetOptions)` +- Function `*ReplicationStorageClassificationsClient.NewListByReplicationFabricsPager` parameter(s) have been changed from `(string, *ReplicationStorageClassificationsClientListByReplicationFabricsOptions)` to `(string, string, string, *ReplicationStorageClassificationsClientListByReplicationFabricsOptions)` +- Function `*ReplicationStorageClassificationsClient.NewListPager` parameter(s) have been changed from `(*ReplicationStorageClassificationsClientListOptions)` to `(string, string, *ReplicationStorageClassificationsClientListOptions)` +- Function `NewReplicationVaultHealthClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationVaultHealthClient.BeginRefresh` parameter(s) have been changed from `(context.Context, *ReplicationVaultHealthClientBeginRefreshOptions)` to `(context.Context, string, string, *ReplicationVaultHealthClientBeginRefreshOptions)` +- Function `*ReplicationVaultHealthClient.Get` parameter(s) have been changed from `(context.Context, *ReplicationVaultHealthClientGetOptions)` to `(context.Context, string, string, *ReplicationVaultHealthClientGetOptions)` +- Function `NewReplicationVaultSettingClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationVaultSettingClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, VaultSettingCreationInput, *ReplicationVaultSettingClientBeginCreateOptions)` to `(context.Context, string, string, string, VaultSettingCreationInput, *ReplicationVaultSettingClientBeginCreateOptions)` +- Function `*ReplicationVaultSettingClient.Get` parameter(s) have been changed from `(context.Context, string, *ReplicationVaultSettingClientGetOptions)` to `(context.Context, string, string, string, *ReplicationVaultSettingClientGetOptions)` +- Function `*ReplicationVaultSettingClient.NewListPager` parameter(s) have been changed from `(*ReplicationVaultSettingClientListOptions)` to `(string, string, *ReplicationVaultSettingClientListOptions)` +- Function `NewReplicationvCentersClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*ReplicationvCentersClient.BeginCreate` parameter(s) have been changed from `(context.Context, string, string, AddVCenterRequest, *ReplicationvCentersClientBeginCreateOptions)` to `(context.Context, string, string, string, string, AddVCenterRequest, *ReplicationvCentersClientBeginCreateOptions)` +- Function `*ReplicationvCentersClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *ReplicationvCentersClientBeginDeleteOptions)` to `(context.Context, string, string, string, string, *ReplicationvCentersClientBeginDeleteOptions)` +- Function `*ReplicationvCentersClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, UpdateVCenterRequest, *ReplicationvCentersClientBeginUpdateOptions)` to `(context.Context, string, string, string, string, UpdateVCenterRequest, *ReplicationvCentersClientBeginUpdateOptions)` +- Function `*ReplicationvCentersClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ReplicationvCentersClientGetOptions)` to `(context.Context, string, string, string, string, *ReplicationvCentersClientGetOptions)` +- Function `*ReplicationvCentersClient.NewListByReplicationFabricsPager` parameter(s) have been changed from `(string, *ReplicationvCentersClientListByReplicationFabricsOptions)` to `(string, string, string, *ReplicationvCentersClientListByReplicationFabricsOptions)` +- Function `*ReplicationvCentersClient.NewListPager` parameter(s) have been changed from `(*ReplicationvCentersClientListOptions)` to `(string, string, *ReplicationvCentersClientListOptions)` +- Function `NewSupportedOperatingSystemsClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*SupportedOperatingSystemsClient.Get` parameter(s) have been changed from `(context.Context, *SupportedOperatingSystemsClientGetOptions)` to `(context.Context, string, string, *SupportedOperatingSystemsClientGetOptions)` +- Function `NewTargetComputeSizesClient` parameter(s) have been changed from `(string, string, string, azcore.TokenCredential, *arm.ClientOptions)` to `(string, azcore.TokenCredential, *arm.ClientOptions)` +- Function `*TargetComputeSizesClient.NewListByReplicationProtectedItemsPager` parameter(s) have been changed from `(string, string, string, *TargetComputeSizesClientListByReplicationProtectedItemsOptions)` to `(string, string, string, string, string, *TargetComputeSizesClientListByReplicationProtectedItemsOptions)` + +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + + +## 1.1.0 (2022-12-23) +### Features Added + +- New value `MigrationItemOperationPauseReplication`, `MigrationItemOperationResumeReplication` added to type alias `MigrationItemOperation` +- New value `MigrationStateMigrationCompletedWithInformation`, `MigrationStateMigrationPartiallySucceeded`, `MigrationStateProtectionSuspended`, `MigrationStateResumeInProgress`, `MigrationStateResumeInitiated`, `MigrationStateSuspendingProtection` added to type alias `MigrationState` +- New value `TestMigrationStateTestMigrationCompletedWithInformation`, `TestMigrationStateTestMigrationPartiallySucceeded` added to type alias `TestMigrationState` +- New function `*ReplicationMigrationItemsClient.BeginPauseReplication(context.Context, string, string, string, PauseReplicationInput, *ReplicationMigrationItemsClientBeginPauseReplicationOptions) (*runtime.Poller[ReplicationMigrationItemsClientPauseReplicationResponse], error)` +- New function `*ReplicationMigrationItemsClient.BeginResumeReplication(context.Context, string, string, string, ResumeReplicationInput, *ReplicationMigrationItemsClientBeginResumeReplicationOptions) (*runtime.Poller[ReplicationMigrationItemsClientResumeReplicationResponse], error)` +- New function `*ResumeReplicationProviderSpecificInput.GetResumeReplicationProviderSpecificInput() *ResumeReplicationProviderSpecificInput` +- New function `*VMwareCbtResumeReplicationInput.GetResumeReplicationProviderSpecificInput() *ResumeReplicationProviderSpecificInput` +- New struct `A2AExtendedLocationDetails` +- New struct `CriticalJobHistoryDetails` +- New struct `PauseReplicationInput` +- New struct `PauseReplicationInputProperties` +- New struct `ReplicationMigrationItemsClientPauseReplicationResponse` +- New struct `ReplicationMigrationItemsClientResumeReplicationResponse` +- New struct `ResumeReplicationInput` +- New struct `ResumeReplicationInputProperties` +- New struct `VMwareCbtResumeReplicationInput` +- New field `ExtendedLocations` in struct `AzureFabricSpecificDetails` +- New field `SeedBlobURI` in struct `InMageRcmProtectedDiskDetails` +- New field `StorageAccountID` in struct `InMageRcmReplicationDetails` +- New field `CriticalJobHistory` in struct `MigrationItemProperties` +- New field `LastMigrationStatus` in struct `MigrationItemProperties` +- New field `LastMigrationTime` in struct `MigrationItemProperties` +- New field `RecoveryServicesProviderID` in struct `MigrationItemProperties` +- New field `ReplicationStatus` in struct `MigrationItemProperties` +- New field `PrimaryExtendedLocation` in struct `RecoveryPlanA2ADetails` +- New field `RecoveryExtendedLocation` in struct `RecoveryPlanA2ADetails` +- New field `PerformSQLBulkRegistration` in struct `VMwareCbtEnableMigrationInput` +- New field `ResumeProgressPercentage` in struct `VMwareCbtMigrationDetails` +- New field `ResumeRetryCount` in struct `VMwareCbtMigrationDetails` +- New field `StorageAccountID` in struct `VMwareCbtMigrationDetails` +- New field `TestNetworkID` in struct `VMwareCbtMigrationDetails` +- New field `SeedBlobURI` in struct `VMwareCbtProtectedDiskDetails` +- New field `TargetBlobURI` in struct `VMwareCbtProtectedDiskDetails` +- New field `RoleSizeToNicCountMap` in struct `VMwareCbtProtectionContainerMappingDetails` + + +## 1.0.0 (2022-05-17) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/README.md new file mode 100644 index 00000000..fba63853 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/README.md @@ -0,0 +1,90 @@ +# Azure Recovery Services Site Recovery Module for Go + +The `armrecoveryservicessiterecovery` module provides operations for working with Azure Recovery Services Site Recovery. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- [Supported](https://aka.ms/azsdk/go/supported-versions) version of Go (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Recovery Services Site Recovery module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Recovery Services Site Recovery. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Recovery Services Site Recovery module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armrecoveryservicessiterecovery.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armrecoveryservicessiterecovery.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewClusterRecoveryPointClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Recovery Services Site Recovery` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/autorest.md new file mode 100644 index 00000000..088933fa --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/4fc983fb08e5fd8a7a821eb6491f5338ce52a9cf/specification/recoveryservicessiterecovery/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/4fc983fb08e5fd8a7a821eb6491f5338ce52a9cf/specification/recoveryservicessiterecovery/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 2.4.0 +tag: package-2025-01-01 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/build.go new file mode 100644 index 00000000..21c1c4e4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -removeUnreferencedTypes resourcemanager/recoveryservices/armrecoveryservicessiterecovery + +package armrecoveryservicessiterecovery diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/ci.yml new file mode 100644 index 00000000..a9871159 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/ci.yml @@ -0,0 +1,27 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + ServiceDirectory: 'resourcemanager/recoveryservices/armrecoveryservicessiterecovery' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/client_factory.go new file mode 100644 index 00000000..6bb4db41 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/client_factory.go @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewClusterRecoveryPointClient creates a new instance of ClusterRecoveryPointClient. +func (c *ClientFactory) NewClusterRecoveryPointClient() *ClusterRecoveryPointClient { + return &ClusterRecoveryPointClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewClusterRecoveryPointsClient creates a new instance of ClusterRecoveryPointsClient. +func (c *ClientFactory) NewClusterRecoveryPointsClient() *ClusterRecoveryPointsClient { + return &ClusterRecoveryPointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewMigrationRecoveryPointsClient creates a new instance of MigrationRecoveryPointsClient. +func (c *ClientFactory) NewMigrationRecoveryPointsClient() *MigrationRecoveryPointsClient { + return &MigrationRecoveryPointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewRecoveryPointsClient creates a new instance of RecoveryPointsClient. +func (c *ClientFactory) NewRecoveryPointsClient() *RecoveryPointsClient { + return &RecoveryPointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationAlertSettingsClient creates a new instance of ReplicationAlertSettingsClient. +func (c *ClientFactory) NewReplicationAlertSettingsClient() *ReplicationAlertSettingsClient { + return &ReplicationAlertSettingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationAppliancesClient creates a new instance of ReplicationAppliancesClient. +func (c *ClientFactory) NewReplicationAppliancesClient() *ReplicationAppliancesClient { + return &ReplicationAppliancesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationEligibilityResultsClient creates a new instance of ReplicationEligibilityResultsClient. +func (c *ClientFactory) NewReplicationEligibilityResultsClient() *ReplicationEligibilityResultsClient { + return &ReplicationEligibilityResultsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationEventsClient creates a new instance of ReplicationEventsClient. +func (c *ClientFactory) NewReplicationEventsClient() *ReplicationEventsClient { + return &ReplicationEventsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationFabricsClient creates a new instance of ReplicationFabricsClient. +func (c *ClientFactory) NewReplicationFabricsClient() *ReplicationFabricsClient { + return &ReplicationFabricsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationJobsClient creates a new instance of ReplicationJobsClient. +func (c *ClientFactory) NewReplicationJobsClient() *ReplicationJobsClient { + return &ReplicationJobsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationLogicalNetworksClient creates a new instance of ReplicationLogicalNetworksClient. +func (c *ClientFactory) NewReplicationLogicalNetworksClient() *ReplicationLogicalNetworksClient { + return &ReplicationLogicalNetworksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationMigrationItemsClient creates a new instance of ReplicationMigrationItemsClient. +func (c *ClientFactory) NewReplicationMigrationItemsClient() *ReplicationMigrationItemsClient { + return &ReplicationMigrationItemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationNetworkMappingsClient creates a new instance of ReplicationNetworkMappingsClient. +func (c *ClientFactory) NewReplicationNetworkMappingsClient() *ReplicationNetworkMappingsClient { + return &ReplicationNetworkMappingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationNetworksClient creates a new instance of ReplicationNetworksClient. +func (c *ClientFactory) NewReplicationNetworksClient() *ReplicationNetworksClient { + return &ReplicationNetworksClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationPoliciesClient creates a new instance of ReplicationPoliciesClient. +func (c *ClientFactory) NewReplicationPoliciesClient() *ReplicationPoliciesClient { + return &ReplicationPoliciesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationProtectableItemsClient creates a new instance of ReplicationProtectableItemsClient. +func (c *ClientFactory) NewReplicationProtectableItemsClient() *ReplicationProtectableItemsClient { + return &ReplicationProtectableItemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationProtectedItemsClient creates a new instance of ReplicationProtectedItemsClient. +func (c *ClientFactory) NewReplicationProtectedItemsClient() *ReplicationProtectedItemsClient { + return &ReplicationProtectedItemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationProtectionClustersClient creates a new instance of ReplicationProtectionClustersClient. +func (c *ClientFactory) NewReplicationProtectionClustersClient() *ReplicationProtectionClustersClient { + return &ReplicationProtectionClustersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationProtectionContainerMappingsClient creates a new instance of ReplicationProtectionContainerMappingsClient. +func (c *ClientFactory) NewReplicationProtectionContainerMappingsClient() *ReplicationProtectionContainerMappingsClient { + return &ReplicationProtectionContainerMappingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationProtectionContainersClient creates a new instance of ReplicationProtectionContainersClient. +func (c *ClientFactory) NewReplicationProtectionContainersClient() *ReplicationProtectionContainersClient { + return &ReplicationProtectionContainersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationProtectionIntentsClient creates a new instance of ReplicationProtectionIntentsClient. +func (c *ClientFactory) NewReplicationProtectionIntentsClient() *ReplicationProtectionIntentsClient { + return &ReplicationProtectionIntentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationRecoveryPlansClient creates a new instance of ReplicationRecoveryPlansClient. +func (c *ClientFactory) NewReplicationRecoveryPlansClient() *ReplicationRecoveryPlansClient { + return &ReplicationRecoveryPlansClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationRecoveryServicesProvidersClient creates a new instance of ReplicationRecoveryServicesProvidersClient. +func (c *ClientFactory) NewReplicationRecoveryServicesProvidersClient() *ReplicationRecoveryServicesProvidersClient { + return &ReplicationRecoveryServicesProvidersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationStorageClassificationMappingsClient creates a new instance of ReplicationStorageClassificationMappingsClient. +func (c *ClientFactory) NewReplicationStorageClassificationMappingsClient() *ReplicationStorageClassificationMappingsClient { + return &ReplicationStorageClassificationMappingsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationStorageClassificationsClient creates a new instance of ReplicationStorageClassificationsClient. +func (c *ClientFactory) NewReplicationStorageClassificationsClient() *ReplicationStorageClassificationsClient { + return &ReplicationStorageClassificationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationVaultHealthClient creates a new instance of ReplicationVaultHealthClient. +func (c *ClientFactory) NewReplicationVaultHealthClient() *ReplicationVaultHealthClient { + return &ReplicationVaultHealthClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationVaultSettingClient creates a new instance of ReplicationVaultSettingClient. +func (c *ClientFactory) NewReplicationVaultSettingClient() *ReplicationVaultSettingClient { + return &ReplicationVaultSettingClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewReplicationvCentersClient creates a new instance of ReplicationvCentersClient. +func (c *ClientFactory) NewReplicationvCentersClient() *ReplicationvCentersClient { + return &ReplicationvCentersClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewSupportedOperatingSystemsClient creates a new instance of SupportedOperatingSystemsClient. +func (c *ClientFactory) NewSupportedOperatingSystemsClient() *SupportedOperatingSystemsClient { + return &SupportedOperatingSystemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewTargetComputeSizesClient creates a new instance of TargetComputeSizesClient. +func (c *ClientFactory) NewTargetComputeSizesClient() *TargetComputeSizesClient { + return &TargetComputeSizesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/clusterrecoverypoint_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/clusterrecoverypoint_client.go new file mode 100644 index 00000000..ff99f1cb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/clusterrecoverypoint_client.go @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ClusterRecoveryPointClient contains the methods for the ClusterRecoveryPoint group. +// Don't use this type directly, use NewClusterRecoveryPointClient() instead. +type ClusterRecoveryPointClient struct { + internal *arm.Client + subscriptionID string +} + +// NewClusterRecoveryPointClient creates a new instance of ClusterRecoveryPointClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClusterRecoveryPointClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClusterRecoveryPointClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ClusterRecoveryPointClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get the details of specified recovery point. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - recoveryPointName - The recovery point name. +// - options - ClusterRecoveryPointClientGetOptions contains the optional parameters for the ClusterRecoveryPointClient.Get +// method. +func (client *ClusterRecoveryPointClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, recoveryPointName string, options *ClusterRecoveryPointClientGetOptions) (ClusterRecoveryPointClientGetResponse, error) { + var err error + const operationName = "ClusterRecoveryPointClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, recoveryPointName, options) + if err != nil { + return ClusterRecoveryPointClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClusterRecoveryPointClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClusterRecoveryPointClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ClusterRecoveryPointClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, recoveryPointName string, _ *ClusterRecoveryPointClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}/recoveryPoints/{recoveryPointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + if recoveryPointName == "" { + return nil, errors.New("parameter recoveryPointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPointName}", url.PathEscape(recoveryPointName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ClusterRecoveryPointClient) getHandleResponse(resp *http.Response) (ClusterRecoveryPointClientGetResponse, error) { + result := ClusterRecoveryPointClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ClusterRecoveryPoint); err != nil { + return ClusterRecoveryPointClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/clusterrecoverypoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/clusterrecoverypoints_client.go new file mode 100644 index 00000000..6b556697 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/clusterrecoverypoints_client.go @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ClusterRecoveryPointsClient contains the methods for the ClusterRecoveryPoints group. +// Don't use this type directly, use NewClusterRecoveryPointsClient() instead. +type ClusterRecoveryPointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewClusterRecoveryPointsClient creates a new instance of ClusterRecoveryPointsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClusterRecoveryPointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClusterRecoveryPointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ClusterRecoveryPointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByReplicationProtectionClusterPager - The list of cluster recovery points. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - options - ClusterRecoveryPointsClientListByReplicationProtectionClusterOptions contains the optional parameters for the +// ClusterRecoveryPointsClient.NewListByReplicationProtectionClusterPager method. +func (client *ClusterRecoveryPointsClient) NewListByReplicationProtectionClusterPager(resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, options *ClusterRecoveryPointsClientListByReplicationProtectionClusterOptions) *runtime.Pager[ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse] { + return runtime.NewPager(runtime.PagingHandler[ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse]{ + More: func(page ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse) (ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ClusterRecoveryPointsClient.NewListByReplicationProtectionClusterPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationProtectionClusterCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, options) + }, nil) + if err != nil { + return ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse{}, err + } + return client.listByReplicationProtectionClusterHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationProtectionClusterCreateRequest creates the ListByReplicationProtectionCluster request. +func (client *ClusterRecoveryPointsClient) listByReplicationProtectionClusterCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, _ *ClusterRecoveryPointsClientListByReplicationProtectionClusterOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}/recoveryPoints" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationProtectionClusterHandleResponse handles the ListByReplicationProtectionCluster response. +func (client *ClusterRecoveryPointsClient) listByReplicationProtectionClusterHandleResponse(resp *http.Response) (ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse, error) { + result := ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ClusterRecoveryPointCollection); err != nil { + return ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/constants.go new file mode 100644 index 00000000..8af2c534 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/constants.go @@ -0,0 +1,1100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery" + moduleVersion = "v2.4.0" +) + +// A2ARecoveryAvailabilityType - The recovery availability type of the virtual machine. +type A2ARecoveryAvailabilityType string + +const ( + A2ARecoveryAvailabilityTypeAvailabilitySet A2ARecoveryAvailabilityType = "AvailabilitySet" + A2ARecoveryAvailabilityTypeAvailabilityZone A2ARecoveryAvailabilityType = "AvailabilityZone" + A2ARecoveryAvailabilityTypeSingle A2ARecoveryAvailabilityType = "Single" +) + +// PossibleA2ARecoveryAvailabilityTypeValues returns the possible values for the A2ARecoveryAvailabilityType const type. +func PossibleA2ARecoveryAvailabilityTypeValues() []A2ARecoveryAvailabilityType { + return []A2ARecoveryAvailabilityType{ + A2ARecoveryAvailabilityTypeAvailabilitySet, + A2ARecoveryAvailabilityTypeAvailabilityZone, + A2ARecoveryAvailabilityTypeSingle, + } +} + +// A2ARpRecoveryPointType - The recovery point type. +type A2ARpRecoveryPointType string + +const ( + A2ARpRecoveryPointTypeLatest A2ARpRecoveryPointType = "Latest" + A2ARpRecoveryPointTypeLatestApplicationConsistent A2ARpRecoveryPointType = "LatestApplicationConsistent" + A2ARpRecoveryPointTypeLatestCrashConsistent A2ARpRecoveryPointType = "LatestCrashConsistent" + A2ARpRecoveryPointTypeLatestProcessed A2ARpRecoveryPointType = "LatestProcessed" +) + +// PossibleA2ARpRecoveryPointTypeValues returns the possible values for the A2ARpRecoveryPointType const type. +func PossibleA2ARpRecoveryPointTypeValues() []A2ARpRecoveryPointType { + return []A2ARpRecoveryPointType{ + A2ARpRecoveryPointTypeLatest, + A2ARpRecoveryPointTypeLatestApplicationConsistent, + A2ARpRecoveryPointTypeLatestCrashConsistent, + A2ARpRecoveryPointTypeLatestProcessed, + } +} + +// AgentAutoUpdateStatus - A value indicating whether the auto update is enabled. +type AgentAutoUpdateStatus string + +const ( + AgentAutoUpdateStatusDisabled AgentAutoUpdateStatus = "Disabled" + AgentAutoUpdateStatusEnabled AgentAutoUpdateStatus = "Enabled" +) + +// PossibleAgentAutoUpdateStatusValues returns the possible values for the AgentAutoUpdateStatus const type. +func PossibleAgentAutoUpdateStatusValues() []AgentAutoUpdateStatus { + return []AgentAutoUpdateStatus{ + AgentAutoUpdateStatusDisabled, + AgentAutoUpdateStatusEnabled, + } +} + +type AgentUpgradeBlockedReason string + +const ( + AgentUpgradeBlockedReasonAgentNoHeartbeat AgentUpgradeBlockedReason = "AgentNoHeartbeat" + AgentUpgradeBlockedReasonAlreadyOnLatestVersion AgentUpgradeBlockedReason = "AlreadyOnLatestVersion" + AgentUpgradeBlockedReasonDistroIsNotReported AgentUpgradeBlockedReason = "DistroIsNotReported" + AgentUpgradeBlockedReasonDistroNotSupportedForUpgrade AgentUpgradeBlockedReason = "DistroNotSupportedForUpgrade" + AgentUpgradeBlockedReasonIncompatibleApplianceVersion AgentUpgradeBlockedReason = "IncompatibleApplianceVersion" + AgentUpgradeBlockedReasonInvalidAgentVersion AgentUpgradeBlockedReason = "InvalidAgentVersion" + AgentUpgradeBlockedReasonInvalidDriverVersion AgentUpgradeBlockedReason = "InvalidDriverVersion" + AgentUpgradeBlockedReasonMissingUpgradePath AgentUpgradeBlockedReason = "MissingUpgradePath" + AgentUpgradeBlockedReasonNotProtected AgentUpgradeBlockedReason = "NotProtected" + AgentUpgradeBlockedReasonProcessServerNoHeartbeat AgentUpgradeBlockedReason = "ProcessServerNoHeartbeat" + AgentUpgradeBlockedReasonRcmProxyNoHeartbeat AgentUpgradeBlockedReason = "RcmProxyNoHeartbeat" + AgentUpgradeBlockedReasonRebootRequired AgentUpgradeBlockedReason = "RebootRequired" + AgentUpgradeBlockedReasonUnknown AgentUpgradeBlockedReason = "Unknown" + AgentUpgradeBlockedReasonUnsupportedProtectionScenario AgentUpgradeBlockedReason = "UnsupportedProtectionScenario" +) + +// PossibleAgentUpgradeBlockedReasonValues returns the possible values for the AgentUpgradeBlockedReason const type. +func PossibleAgentUpgradeBlockedReasonValues() []AgentUpgradeBlockedReason { + return []AgentUpgradeBlockedReason{ + AgentUpgradeBlockedReasonAgentNoHeartbeat, + AgentUpgradeBlockedReasonAlreadyOnLatestVersion, + AgentUpgradeBlockedReasonDistroIsNotReported, + AgentUpgradeBlockedReasonDistroNotSupportedForUpgrade, + AgentUpgradeBlockedReasonIncompatibleApplianceVersion, + AgentUpgradeBlockedReasonInvalidAgentVersion, + AgentUpgradeBlockedReasonInvalidDriverVersion, + AgentUpgradeBlockedReasonMissingUpgradePath, + AgentUpgradeBlockedReasonNotProtected, + AgentUpgradeBlockedReasonProcessServerNoHeartbeat, + AgentUpgradeBlockedReasonRcmProxyNoHeartbeat, + AgentUpgradeBlockedReasonRebootRequired, + AgentUpgradeBlockedReasonUnknown, + AgentUpgradeBlockedReasonUnsupportedProtectionScenario, + } +} + +// AgentVersionStatus - A value indicating whether security update required. +type AgentVersionStatus string + +const ( + AgentVersionStatusDeprecated AgentVersionStatus = "Deprecated" + AgentVersionStatusNotSupported AgentVersionStatus = "NotSupported" + AgentVersionStatusSecurityUpdateRequired AgentVersionStatus = "SecurityUpdateRequired" + AgentVersionStatusSupported AgentVersionStatus = "Supported" + AgentVersionStatusUpdateRequired AgentVersionStatus = "UpdateRequired" +) + +// PossibleAgentVersionStatusValues returns the possible values for the AgentVersionStatus const type. +func PossibleAgentVersionStatusValues() []AgentVersionStatus { + return []AgentVersionStatus{ + AgentVersionStatusDeprecated, + AgentVersionStatusNotSupported, + AgentVersionStatusSecurityUpdateRequired, + AgentVersionStatusSupported, + AgentVersionStatusUpdateRequired, + } +} + +// AlternateLocationRecoveryOption - The ALR option. +type AlternateLocationRecoveryOption string + +const ( + AlternateLocationRecoveryOptionCreateVMIfNotFound AlternateLocationRecoveryOption = "CreateVmIfNotFound" + AlternateLocationRecoveryOptionNoAction AlternateLocationRecoveryOption = "NoAction" +) + +// PossibleAlternateLocationRecoveryOptionValues returns the possible values for the AlternateLocationRecoveryOption const type. +func PossibleAlternateLocationRecoveryOptionValues() []AlternateLocationRecoveryOption { + return []AlternateLocationRecoveryOption{ + AlternateLocationRecoveryOptionCreateVMIfNotFound, + AlternateLocationRecoveryOptionNoAction, + } +} + +// AutoProtectionOfDataDisk - A value indicating whether the auto protection is enabled. +type AutoProtectionOfDataDisk string + +const ( + AutoProtectionOfDataDiskDisabled AutoProtectionOfDataDisk = "Disabled" + AutoProtectionOfDataDiskEnabled AutoProtectionOfDataDisk = "Enabled" +) + +// PossibleAutoProtectionOfDataDiskValues returns the possible values for the AutoProtectionOfDataDisk const type. +func PossibleAutoProtectionOfDataDiskValues() []AutoProtectionOfDataDisk { + return []AutoProtectionOfDataDisk{ + AutoProtectionOfDataDiskDisabled, + AutoProtectionOfDataDiskEnabled, + } +} + +// AutomationAccountAuthenticationType - A value indicating the type authentication to use for automation Account. +type AutomationAccountAuthenticationType string + +const ( + AutomationAccountAuthenticationTypeRunAsAccount AutomationAccountAuthenticationType = "RunAsAccount" + AutomationAccountAuthenticationTypeSystemAssignedIdentity AutomationAccountAuthenticationType = "SystemAssignedIdentity" +) + +// PossibleAutomationAccountAuthenticationTypeValues returns the possible values for the AutomationAccountAuthenticationType const type. +func PossibleAutomationAccountAuthenticationTypeValues() []AutomationAccountAuthenticationType { + return []AutomationAccountAuthenticationType{ + AutomationAccountAuthenticationTypeRunAsAccount, + AutomationAccountAuthenticationTypeSystemAssignedIdentity, + } +} + +// ChurnOptionSelected - A value indicating the churn option selected by user. +type ChurnOptionSelected string + +const ( + ChurnOptionSelectedHigh ChurnOptionSelected = "High" + ChurnOptionSelectedNormal ChurnOptionSelected = "Normal" +) + +// PossibleChurnOptionSelectedValues returns the possible values for the ChurnOptionSelected const type. +func PossibleChurnOptionSelectedValues() []ChurnOptionSelected { + return []ChurnOptionSelected{ + ChurnOptionSelectedHigh, + ChurnOptionSelectedNormal, + } +} + +// ClusterRecoveryPointType - The recovery point type. +type ClusterRecoveryPointType string + +const ( + ClusterRecoveryPointTypeApplicationConsistent ClusterRecoveryPointType = "ApplicationConsistent" + ClusterRecoveryPointTypeCrashConsistent ClusterRecoveryPointType = "CrashConsistent" + ClusterRecoveryPointTypeNotSpecified ClusterRecoveryPointType = "NotSpecified" +) + +// PossibleClusterRecoveryPointTypeValues returns the possible values for the ClusterRecoveryPointType const type. +func PossibleClusterRecoveryPointTypeValues() []ClusterRecoveryPointType { + return []ClusterRecoveryPointType{ + ClusterRecoveryPointTypeApplicationConsistent, + ClusterRecoveryPointTypeCrashConsistent, + ClusterRecoveryPointTypeNotSpecified, + } +} + +// DataSyncStatus - The data sync option. +type DataSyncStatus string + +const ( + DataSyncStatusForDownTime DataSyncStatus = "ForDownTime" + DataSyncStatusForSynchronization DataSyncStatus = "ForSynchronization" +) + +// PossibleDataSyncStatusValues returns the possible values for the DataSyncStatus const type. +func PossibleDataSyncStatusValues() []DataSyncStatus { + return []DataSyncStatus{ + DataSyncStatusForDownTime, + DataSyncStatusForSynchronization, + } +} + +// DisableProtectionReason - Disable protection reason. It can have values NotSpecified/MigrationComplete. +type DisableProtectionReason string + +const ( + DisableProtectionReasonMigrationComplete DisableProtectionReason = "MigrationComplete" + DisableProtectionReasonNotSpecified DisableProtectionReason = "NotSpecified" +) + +// PossibleDisableProtectionReasonValues returns the possible values for the DisableProtectionReason const type. +func PossibleDisableProtectionReasonValues() []DisableProtectionReason { + return []DisableProtectionReason{ + DisableProtectionReasonMigrationComplete, + DisableProtectionReasonNotSpecified, + } +} + +// DiskAccountType - The disk type. +type DiskAccountType string + +const ( + DiskAccountTypePremiumLRS DiskAccountType = "Premium_LRS" + DiskAccountTypePremiumV2LRS DiskAccountType = "PremiumV2_LRS" + DiskAccountTypePremiumZRS DiskAccountType = "Premium_ZRS" + DiskAccountTypeStandardLRS DiskAccountType = "Standard_LRS" + DiskAccountTypeStandardSSDLRS DiskAccountType = "StandardSSD_LRS" + DiskAccountTypeStandardSSDZRS DiskAccountType = "StandardSSD_ZRS" + DiskAccountTypeUltraSSDLRS DiskAccountType = "UltraSSD_LRS" +) + +// PossibleDiskAccountTypeValues returns the possible values for the DiskAccountType const type. +func PossibleDiskAccountTypeValues() []DiskAccountType { + return []DiskAccountType{ + DiskAccountTypePremiumLRS, + DiskAccountTypePremiumV2LRS, + DiskAccountTypePremiumZRS, + DiskAccountTypeStandardLRS, + DiskAccountTypeStandardSSDLRS, + DiskAccountTypeStandardSSDZRS, + DiskAccountTypeUltraSSDLRS, + } +} + +// DiskReplicationProgressHealth - The progress health. +type DiskReplicationProgressHealth string + +const ( + DiskReplicationProgressHealthInProgress DiskReplicationProgressHealth = "InProgress" + DiskReplicationProgressHealthNoProgress DiskReplicationProgressHealth = "NoProgress" + DiskReplicationProgressHealthNone DiskReplicationProgressHealth = "None" + DiskReplicationProgressHealthQueued DiskReplicationProgressHealth = "Queued" + DiskReplicationProgressHealthSlowProgress DiskReplicationProgressHealth = "SlowProgress" +) + +// PossibleDiskReplicationProgressHealthValues returns the possible values for the DiskReplicationProgressHealth const type. +func PossibleDiskReplicationProgressHealthValues() []DiskReplicationProgressHealth { + return []DiskReplicationProgressHealth{ + DiskReplicationProgressHealthInProgress, + DiskReplicationProgressHealthNoProgress, + DiskReplicationProgressHealthNone, + DiskReplicationProgressHealthQueued, + DiskReplicationProgressHealthSlowProgress, + } +} + +// DiskState - The disk state. +type DiskState string + +const ( + DiskStateInitialReplicationFailed DiskState = "InitialReplicationFailed" + DiskStateInitialReplicationPending DiskState = "InitialReplicationPending" + DiskStateProtected DiskState = "Protected" + DiskStateUnavailable DiskState = "Unavailable" +) + +// PossibleDiskStateValues returns the possible values for the DiskState const type. +func PossibleDiskStateValues() []DiskState { + return []DiskState{ + DiskStateInitialReplicationFailed, + DiskStateInitialReplicationPending, + DiskStateProtected, + DiskStateUnavailable, + } +} + +// EthernetAddressType - The source IP address type. +type EthernetAddressType string + +const ( + EthernetAddressTypeDynamic EthernetAddressType = "Dynamic" + EthernetAddressTypeStatic EthernetAddressType = "Static" +) + +// PossibleEthernetAddressTypeValues returns the possible values for the EthernetAddressType const type. +func PossibleEthernetAddressTypeValues() []EthernetAddressType { + return []EthernetAddressType{ + EthernetAddressTypeDynamic, + EthernetAddressTypeStatic, + } +} + +// ExportJobOutputSerializationType - The output type of the jobs. +type ExportJobOutputSerializationType string + +const ( + ExportJobOutputSerializationTypeExcel ExportJobOutputSerializationType = "Excel" + ExportJobOutputSerializationTypeJSON ExportJobOutputSerializationType = "Json" + ExportJobOutputSerializationTypeXML ExportJobOutputSerializationType = "Xml" +) + +// PossibleExportJobOutputSerializationTypeValues returns the possible values for the ExportJobOutputSerializationType const type. +func PossibleExportJobOutputSerializationTypeValues() []ExportJobOutputSerializationType { + return []ExportJobOutputSerializationType{ + ExportJobOutputSerializationTypeExcel, + ExportJobOutputSerializationTypeJSON, + ExportJobOutputSerializationTypeXML, + } +} + +// ExtendedLocationType - The extended location type. +type ExtendedLocationType string + +const ( + ExtendedLocationTypeEdgeZone ExtendedLocationType = "EdgeZone" +) + +// PossibleExtendedLocationTypeValues returns the possible values for the ExtendedLocationType const type. +func PossibleExtendedLocationTypeValues() []ExtendedLocationType { + return []ExtendedLocationType{ + ExtendedLocationTypeEdgeZone, + } +} + +// FailoverDeploymentModel - The failover deployment model. +type FailoverDeploymentModel string + +const ( + FailoverDeploymentModelClassic FailoverDeploymentModel = "Classic" + FailoverDeploymentModelNotApplicable FailoverDeploymentModel = "NotApplicable" + FailoverDeploymentModelResourceManager FailoverDeploymentModel = "ResourceManager" +) + +// PossibleFailoverDeploymentModelValues returns the possible values for the FailoverDeploymentModel const type. +func PossibleFailoverDeploymentModelValues() []FailoverDeploymentModel { + return []FailoverDeploymentModel{ + FailoverDeploymentModelClassic, + FailoverDeploymentModelNotApplicable, + FailoverDeploymentModelResourceManager, + } +} + +// FailoverDirection - Failover direction. +type FailoverDirection string + +const ( + FailoverDirectionPrimaryToRecovery FailoverDirection = "PrimaryToRecovery" + FailoverDirectionRecoveryToPrimary FailoverDirection = "RecoveryToPrimary" +) + +// PossibleFailoverDirectionValues returns the possible values for the FailoverDirection const type. +func PossibleFailoverDirectionValues() []FailoverDirection { + return []FailoverDirection{ + FailoverDirectionPrimaryToRecovery, + FailoverDirectionRecoveryToPrimary, + } +} + +// HealthErrorCategory - The category of the health error. +type HealthErrorCategory string + +const ( + HealthErrorCategoryAgentAutoUpdateArtifactDeleted HealthErrorCategory = "AgentAutoUpdateArtifactDeleted" + HealthErrorCategoryAgentAutoUpdateInfra HealthErrorCategory = "AgentAutoUpdateInfra" + HealthErrorCategoryAgentAutoUpdateRunAsAccount HealthErrorCategory = "AgentAutoUpdateRunAsAccount" + HealthErrorCategoryAgentAutoUpdateRunAsAccountExpired HealthErrorCategory = "AgentAutoUpdateRunAsAccountExpired" + HealthErrorCategoryAgentAutoUpdateRunAsAccountExpiry HealthErrorCategory = "AgentAutoUpdateRunAsAccountExpiry" + HealthErrorCategoryConfiguration HealthErrorCategory = "Configuration" + HealthErrorCategoryFabricInfrastructure HealthErrorCategory = "FabricInfrastructure" + HealthErrorCategoryNone HealthErrorCategory = "None" + HealthErrorCategoryReplication HealthErrorCategory = "Replication" + HealthErrorCategoryTestFailover HealthErrorCategory = "TestFailover" + HealthErrorCategoryVersionExpiry HealthErrorCategory = "VersionExpiry" +) + +// PossibleHealthErrorCategoryValues returns the possible values for the HealthErrorCategory const type. +func PossibleHealthErrorCategoryValues() []HealthErrorCategory { + return []HealthErrorCategory{ + HealthErrorCategoryAgentAutoUpdateArtifactDeleted, + HealthErrorCategoryAgentAutoUpdateInfra, + HealthErrorCategoryAgentAutoUpdateRunAsAccount, + HealthErrorCategoryAgentAutoUpdateRunAsAccountExpired, + HealthErrorCategoryAgentAutoUpdateRunAsAccountExpiry, + HealthErrorCategoryConfiguration, + HealthErrorCategoryFabricInfrastructure, + HealthErrorCategoryNone, + HealthErrorCategoryReplication, + HealthErrorCategoryTestFailover, + HealthErrorCategoryVersionExpiry, + } +} + +// HealthErrorCustomerResolvability - Value indicating whether the health error is customer resolvable. +type HealthErrorCustomerResolvability string + +const ( + HealthErrorCustomerResolvabilityAllowed HealthErrorCustomerResolvability = "Allowed" + HealthErrorCustomerResolvabilityNotAllowed HealthErrorCustomerResolvability = "NotAllowed" +) + +// PossibleHealthErrorCustomerResolvabilityValues returns the possible values for the HealthErrorCustomerResolvability const type. +func PossibleHealthErrorCustomerResolvabilityValues() []HealthErrorCustomerResolvability { + return []HealthErrorCustomerResolvability{ + HealthErrorCustomerResolvabilityAllowed, + HealthErrorCustomerResolvabilityNotAllowed, + } +} + +// HyperVReplicaAzureRpRecoveryPointType - The recovery point type. +type HyperVReplicaAzureRpRecoveryPointType string + +const ( + HyperVReplicaAzureRpRecoveryPointTypeLatest HyperVReplicaAzureRpRecoveryPointType = "Latest" + HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent HyperVReplicaAzureRpRecoveryPointType = "LatestApplicationConsistent" + HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed HyperVReplicaAzureRpRecoveryPointType = "LatestProcessed" +) + +// PossibleHyperVReplicaAzureRpRecoveryPointTypeValues returns the possible values for the HyperVReplicaAzureRpRecoveryPointType const type. +func PossibleHyperVReplicaAzureRpRecoveryPointTypeValues() []HyperVReplicaAzureRpRecoveryPointType { + return []HyperVReplicaAzureRpRecoveryPointType{ + HyperVReplicaAzureRpRecoveryPointTypeLatest, + HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent, + HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed, + } +} + +// InMageRcmFailbackRecoveryPointType - The recovery point type. +type InMageRcmFailbackRecoveryPointType string + +const ( + InMageRcmFailbackRecoveryPointTypeApplicationConsistent InMageRcmFailbackRecoveryPointType = "ApplicationConsistent" + InMageRcmFailbackRecoveryPointTypeCrashConsistent InMageRcmFailbackRecoveryPointType = "CrashConsistent" +) + +// PossibleInMageRcmFailbackRecoveryPointTypeValues returns the possible values for the InMageRcmFailbackRecoveryPointType const type. +func PossibleInMageRcmFailbackRecoveryPointTypeValues() []InMageRcmFailbackRecoveryPointType { + return []InMageRcmFailbackRecoveryPointType{ + InMageRcmFailbackRecoveryPointTypeApplicationConsistent, + InMageRcmFailbackRecoveryPointTypeCrashConsistent, + } +} + +// InMageV2RpRecoveryPointType - The recovery point type. +type InMageV2RpRecoveryPointType string + +const ( + InMageV2RpRecoveryPointTypeLatest InMageV2RpRecoveryPointType = "Latest" + InMageV2RpRecoveryPointTypeLatestApplicationConsistent InMageV2RpRecoveryPointType = "LatestApplicationConsistent" + InMageV2RpRecoveryPointTypeLatestCrashConsistent InMageV2RpRecoveryPointType = "LatestCrashConsistent" + InMageV2RpRecoveryPointTypeLatestProcessed InMageV2RpRecoveryPointType = "LatestProcessed" +) + +// PossibleInMageV2RpRecoveryPointTypeValues returns the possible values for the InMageV2RpRecoveryPointType const type. +func PossibleInMageV2RpRecoveryPointTypeValues() []InMageV2RpRecoveryPointType { + return []InMageV2RpRecoveryPointType{ + InMageV2RpRecoveryPointTypeLatest, + InMageV2RpRecoveryPointTypeLatestApplicationConsistent, + InMageV2RpRecoveryPointTypeLatestCrashConsistent, + InMageV2RpRecoveryPointTypeLatestProcessed, + } +} + +// LicenseType - License type. +type LicenseType string + +const ( + LicenseTypeNoLicenseType LicenseType = "NoLicenseType" + LicenseTypeNotSpecified LicenseType = "NotSpecified" + LicenseTypeWindowsServer LicenseType = "WindowsServer" +) + +// PossibleLicenseTypeValues returns the possible values for the LicenseType const type. +func PossibleLicenseTypeValues() []LicenseType { + return []LicenseType{ + LicenseTypeNoLicenseType, + LicenseTypeNotSpecified, + LicenseTypeWindowsServer, + } +} + +// LinuxLicenseType - The license type for Linux VM's. +type LinuxLicenseType string + +const ( + LinuxLicenseTypeLinuxServer LinuxLicenseType = "LinuxServer" + LinuxLicenseTypeNoLicenseType LinuxLicenseType = "NoLicenseType" + LinuxLicenseTypeNotSpecified LinuxLicenseType = "NotSpecified" +) + +// PossibleLinuxLicenseTypeValues returns the possible values for the LinuxLicenseType const type. +func PossibleLinuxLicenseTypeValues() []LinuxLicenseType { + return []LinuxLicenseType{ + LinuxLicenseTypeLinuxServer, + LinuxLicenseTypeNoLicenseType, + LinuxLicenseTypeNotSpecified, + } +} + +type MigrationItemOperation string + +const ( + MigrationItemOperationDisableMigration MigrationItemOperation = "DisableMigration" + MigrationItemOperationMigrate MigrationItemOperation = "Migrate" + MigrationItemOperationPauseReplication MigrationItemOperation = "PauseReplication" + MigrationItemOperationResumeReplication MigrationItemOperation = "ResumeReplication" + MigrationItemOperationStartResync MigrationItemOperation = "StartResync" + MigrationItemOperationTestMigrate MigrationItemOperation = "TestMigrate" + MigrationItemOperationTestMigrateCleanup MigrationItemOperation = "TestMigrateCleanup" +) + +// PossibleMigrationItemOperationValues returns the possible values for the MigrationItemOperation const type. +func PossibleMigrationItemOperationValues() []MigrationItemOperation { + return []MigrationItemOperation{ + MigrationItemOperationDisableMigration, + MigrationItemOperationMigrate, + MigrationItemOperationPauseReplication, + MigrationItemOperationResumeReplication, + MigrationItemOperationStartResync, + MigrationItemOperationTestMigrate, + MigrationItemOperationTestMigrateCleanup, + } +} + +// MigrationRecoveryPointType - The recovery point type. +type MigrationRecoveryPointType string + +const ( + MigrationRecoveryPointTypeApplicationConsistent MigrationRecoveryPointType = "ApplicationConsistent" + MigrationRecoveryPointTypeCrashConsistent MigrationRecoveryPointType = "CrashConsistent" + MigrationRecoveryPointTypeNotSpecified MigrationRecoveryPointType = "NotSpecified" +) + +// PossibleMigrationRecoveryPointTypeValues returns the possible values for the MigrationRecoveryPointType const type. +func PossibleMigrationRecoveryPointTypeValues() []MigrationRecoveryPointType { + return []MigrationRecoveryPointType{ + MigrationRecoveryPointTypeApplicationConsistent, + MigrationRecoveryPointTypeCrashConsistent, + MigrationRecoveryPointTypeNotSpecified, + } +} + +// MigrationState - The migration status. +type MigrationState string + +const ( + MigrationStateDisableMigrationFailed MigrationState = "DisableMigrationFailed" + MigrationStateDisableMigrationInProgress MigrationState = "DisableMigrationInProgress" + MigrationStateEnableMigrationFailed MigrationState = "EnableMigrationFailed" + MigrationStateEnableMigrationInProgress MigrationState = "EnableMigrationInProgress" + MigrationStateInitialSeedingFailed MigrationState = "InitialSeedingFailed" + MigrationStateInitialSeedingInProgress MigrationState = "InitialSeedingInProgress" + MigrationStateMigrationCompletedWithInformation MigrationState = "MigrationCompletedWithInformation" + MigrationStateMigrationFailed MigrationState = "MigrationFailed" + MigrationStateMigrationInProgress MigrationState = "MigrationInProgress" + MigrationStateMigrationPartiallySucceeded MigrationState = "MigrationPartiallySucceeded" + MigrationStateMigrationSucceeded MigrationState = "MigrationSucceeded" + MigrationStateNone MigrationState = "None" + MigrationStateProtectionSuspended MigrationState = "ProtectionSuspended" + MigrationStateReplicating MigrationState = "Replicating" + MigrationStateResumeInProgress MigrationState = "ResumeInProgress" + MigrationStateResumeInitiated MigrationState = "ResumeInitiated" + MigrationStateSuspendingProtection MigrationState = "SuspendingProtection" +) + +// PossibleMigrationStateValues returns the possible values for the MigrationState const type. +func PossibleMigrationStateValues() []MigrationState { + return []MigrationState{ + MigrationStateDisableMigrationFailed, + MigrationStateDisableMigrationInProgress, + MigrationStateEnableMigrationFailed, + MigrationStateEnableMigrationInProgress, + MigrationStateInitialSeedingFailed, + MigrationStateInitialSeedingInProgress, + MigrationStateMigrationCompletedWithInformation, + MigrationStateMigrationFailed, + MigrationStateMigrationInProgress, + MigrationStateMigrationPartiallySucceeded, + MigrationStateMigrationSucceeded, + MigrationStateNone, + MigrationStateProtectionSuspended, + MigrationStateReplicating, + MigrationStateResumeInProgress, + MigrationStateResumeInitiated, + MigrationStateSuspendingProtection, + } +} + +// MobilityAgentUpgradeState - The agent auto upgrade state. +type MobilityAgentUpgradeState string + +const ( + MobilityAgentUpgradeStateCommit MobilityAgentUpgradeState = "Commit" + MobilityAgentUpgradeStateCompleted MobilityAgentUpgradeState = "Completed" + MobilityAgentUpgradeStateNone MobilityAgentUpgradeState = "None" + MobilityAgentUpgradeStateStarted MobilityAgentUpgradeState = "Started" +) + +// PossibleMobilityAgentUpgradeStateValues returns the possible values for the MobilityAgentUpgradeState const type. +func PossibleMobilityAgentUpgradeStateValues() []MobilityAgentUpgradeState { + return []MobilityAgentUpgradeState{ + MobilityAgentUpgradeStateCommit, + MobilityAgentUpgradeStateCompleted, + MobilityAgentUpgradeStateNone, + MobilityAgentUpgradeStateStarted, + } +} + +// MultiVMGroupCreateOption - Whether Multi VM group is auto created or specified by user. +type MultiVMGroupCreateOption string + +const ( + MultiVMGroupCreateOptionAutoCreated MultiVMGroupCreateOption = "AutoCreated" + MultiVMGroupCreateOptionUserSpecified MultiVMGroupCreateOption = "UserSpecified" +) + +// PossibleMultiVMGroupCreateOptionValues returns the possible values for the MultiVMGroupCreateOption const type. +func PossibleMultiVMGroupCreateOptionValues() []MultiVMGroupCreateOption { + return []MultiVMGroupCreateOption{ + MultiVMGroupCreateOptionAutoCreated, + MultiVMGroupCreateOptionUserSpecified, + } +} + +// MultiVMSyncPointOption - A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. +type MultiVMSyncPointOption string + +const ( + MultiVMSyncPointOptionUseMultiVMSyncRecoveryPoint MultiVMSyncPointOption = "UseMultiVmSyncRecoveryPoint" + MultiVMSyncPointOptionUsePerVMRecoveryPoint MultiVMSyncPointOption = "UsePerVmRecoveryPoint" +) + +// PossibleMultiVMSyncPointOptionValues returns the possible values for the MultiVMSyncPointOption const type. +func PossibleMultiVMSyncPointOptionValues() []MultiVMSyncPointOption { + return []MultiVMSyncPointOption{ + MultiVMSyncPointOptionUseMultiVMSyncRecoveryPoint, + MultiVMSyncPointOptionUsePerVMRecoveryPoint, + } +} + +// PlannedFailoverStatus - The last planned failover status. +type PlannedFailoverStatus string + +const ( + PlannedFailoverStatusCancelled PlannedFailoverStatus = "Cancelled" + PlannedFailoverStatusFailed PlannedFailoverStatus = "Failed" + PlannedFailoverStatusSucceeded PlannedFailoverStatus = "Succeeded" + PlannedFailoverStatusUnknown PlannedFailoverStatus = "Unknown" +) + +// PossiblePlannedFailoverStatusValues returns the possible values for the PlannedFailoverStatus const type. +func PossiblePlannedFailoverStatusValues() []PlannedFailoverStatus { + return []PlannedFailoverStatus{ + PlannedFailoverStatusCancelled, + PlannedFailoverStatusFailed, + PlannedFailoverStatusSucceeded, + PlannedFailoverStatusUnknown, + } +} + +type PossibleOperationsDirections string + +const ( + PossibleOperationsDirectionsPrimaryToRecovery PossibleOperationsDirections = "PrimaryToRecovery" + PossibleOperationsDirectionsRecoveryToPrimary PossibleOperationsDirections = "RecoveryToPrimary" +) + +// PossiblePossibleOperationsDirectionsValues returns the possible values for the PossibleOperationsDirections const type. +func PossiblePossibleOperationsDirectionsValues() []PossibleOperationsDirections { + return []PossibleOperationsDirections{ + PossibleOperationsDirectionsPrimaryToRecovery, + PossibleOperationsDirectionsRecoveryToPrimary, + } +} + +// PresenceStatus - A value indicating whether the VM has a physical disk attached. String value of SrsDataContract.PresenceStatus +// enum. +type PresenceStatus string + +const ( + PresenceStatusNotPresent PresenceStatus = "NotPresent" + PresenceStatusPresent PresenceStatus = "Present" + PresenceStatusUnknown PresenceStatus = "Unknown" +) + +// PossiblePresenceStatusValues returns the possible values for the PresenceStatus const type. +func PossiblePresenceStatusValues() []PresenceStatus { + return []PresenceStatus{ + PresenceStatusNotPresent, + PresenceStatusPresent, + PresenceStatusUnknown, + } +} + +// ProtectionHealth - The health. +type ProtectionHealth string + +const ( + ProtectionHealthCritical ProtectionHealth = "Critical" + ProtectionHealthNone ProtectionHealth = "None" + ProtectionHealthNormal ProtectionHealth = "Normal" + ProtectionHealthWarning ProtectionHealth = "Warning" +) + +// PossibleProtectionHealthValues returns the possible values for the ProtectionHealth const type. +func PossibleProtectionHealthValues() []ProtectionHealth { + return []ProtectionHealth{ + ProtectionHealthCritical, + ProtectionHealthNone, + ProtectionHealthNormal, + ProtectionHealthWarning, + } +} + +// RcmComponentStatus - The throughput status. +type RcmComponentStatus string + +const ( + RcmComponentStatusCritical RcmComponentStatus = "Critical" + RcmComponentStatusHealthy RcmComponentStatus = "Healthy" + RcmComponentStatusUnknown RcmComponentStatus = "Unknown" + RcmComponentStatusWarning RcmComponentStatus = "Warning" +) + +// PossibleRcmComponentStatusValues returns the possible values for the RcmComponentStatus const type. +func PossibleRcmComponentStatusValues() []RcmComponentStatus { + return []RcmComponentStatus{ + RcmComponentStatusCritical, + RcmComponentStatusHealthy, + RcmComponentStatusUnknown, + RcmComponentStatusWarning, + } +} + +// RecoveryPlanActionLocation - The fabric location. +type RecoveryPlanActionLocation string + +const ( + RecoveryPlanActionLocationPrimary RecoveryPlanActionLocation = "Primary" + RecoveryPlanActionLocationRecovery RecoveryPlanActionLocation = "Recovery" +) + +// PossibleRecoveryPlanActionLocationValues returns the possible values for the RecoveryPlanActionLocation const type. +func PossibleRecoveryPlanActionLocationValues() []RecoveryPlanActionLocation { + return []RecoveryPlanActionLocation{ + RecoveryPlanActionLocationPrimary, + RecoveryPlanActionLocationRecovery, + } +} + +// RecoveryPlanGroupType - The group type. +type RecoveryPlanGroupType string + +const ( + RecoveryPlanGroupTypeBoot RecoveryPlanGroupType = "Boot" + RecoveryPlanGroupTypeFailover RecoveryPlanGroupType = "Failover" + RecoveryPlanGroupTypeShutdown RecoveryPlanGroupType = "Shutdown" +) + +// PossibleRecoveryPlanGroupTypeValues returns the possible values for the RecoveryPlanGroupType const type. +func PossibleRecoveryPlanGroupTypeValues() []RecoveryPlanGroupType { + return []RecoveryPlanGroupType{ + RecoveryPlanGroupTypeBoot, + RecoveryPlanGroupTypeFailover, + RecoveryPlanGroupTypeShutdown, + } +} + +// RecoveryPlanPointType - The recovery point type. +type RecoveryPlanPointType string + +const ( + RecoveryPlanPointTypeLatest RecoveryPlanPointType = "Latest" + RecoveryPlanPointTypeLatestApplicationConsistent RecoveryPlanPointType = "LatestApplicationConsistent" + RecoveryPlanPointTypeLatestCrashConsistent RecoveryPlanPointType = "LatestCrashConsistent" + RecoveryPlanPointTypeLatestProcessed RecoveryPlanPointType = "LatestProcessed" +) + +// PossibleRecoveryPlanPointTypeValues returns the possible values for the RecoveryPlanPointType const type. +func PossibleRecoveryPlanPointTypeValues() []RecoveryPlanPointType { + return []RecoveryPlanPointType{ + RecoveryPlanPointTypeLatest, + RecoveryPlanPointTypeLatestApplicationConsistent, + RecoveryPlanPointTypeLatestCrashConsistent, + RecoveryPlanPointTypeLatestProcessed, + } +} + +// RecoveryPointSyncType - A value indicating whether the recovery point is multi VM consistent. +type RecoveryPointSyncType string + +const ( + RecoveryPointSyncTypeMultiVMSyncRecoveryPoint RecoveryPointSyncType = "MultiVmSyncRecoveryPoint" + RecoveryPointSyncTypePerVMRecoveryPoint RecoveryPointSyncType = "PerVmRecoveryPoint" +) + +// PossibleRecoveryPointSyncTypeValues returns the possible values for the RecoveryPointSyncType const type. +func PossibleRecoveryPointSyncTypeValues() []RecoveryPointSyncType { + return []RecoveryPointSyncType{ + RecoveryPointSyncTypeMultiVMSyncRecoveryPoint, + RecoveryPointSyncTypePerVMRecoveryPoint, + } +} + +// RecoveryPointType - The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery +// point provided by RecoveryPointId will be used. In the other two cases, recovery point id will +// be ignored. +type RecoveryPointType string + +const ( + RecoveryPointTypeCustom RecoveryPointType = "Custom" + RecoveryPointTypeLatestTag RecoveryPointType = "LatestTag" + RecoveryPointTypeLatestTime RecoveryPointType = "LatestTime" +) + +// PossibleRecoveryPointTypeValues returns the possible values for the RecoveryPointType const type. +func PossibleRecoveryPointTypeValues() []RecoveryPointType { + return []RecoveryPointType{ + RecoveryPointTypeCustom, + RecoveryPointTypeLatestTag, + RecoveryPointTypeLatestTime, + } +} + +type ReplicationProtectedItemOperation string + +const ( + ReplicationProtectedItemOperationCancelFailover ReplicationProtectedItemOperation = "CancelFailover" + ReplicationProtectedItemOperationChangePit ReplicationProtectedItemOperation = "ChangePit" + ReplicationProtectedItemOperationCommit ReplicationProtectedItemOperation = "Commit" + ReplicationProtectedItemOperationCompleteMigration ReplicationProtectedItemOperation = "CompleteMigration" + ReplicationProtectedItemOperationDisableProtection ReplicationProtectedItemOperation = "DisableProtection" + ReplicationProtectedItemOperationFailback ReplicationProtectedItemOperation = "Failback" + ReplicationProtectedItemOperationFinalizeFailback ReplicationProtectedItemOperation = "FinalizeFailback" + ReplicationProtectedItemOperationPlannedFailover ReplicationProtectedItemOperation = "PlannedFailover" + ReplicationProtectedItemOperationRepairReplication ReplicationProtectedItemOperation = "RepairReplication" + ReplicationProtectedItemOperationReverseReplicate ReplicationProtectedItemOperation = "ReverseReplicate" + ReplicationProtectedItemOperationSwitchProtection ReplicationProtectedItemOperation = "SwitchProtection" + ReplicationProtectedItemOperationTestFailover ReplicationProtectedItemOperation = "TestFailover" + ReplicationProtectedItemOperationTestFailoverCleanup ReplicationProtectedItemOperation = "TestFailoverCleanup" + ReplicationProtectedItemOperationUnplannedFailover ReplicationProtectedItemOperation = "UnplannedFailover" +) + +// PossibleReplicationProtectedItemOperationValues returns the possible values for the ReplicationProtectedItemOperation const type. +func PossibleReplicationProtectedItemOperationValues() []ReplicationProtectedItemOperation { + return []ReplicationProtectedItemOperation{ + ReplicationProtectedItemOperationCancelFailover, + ReplicationProtectedItemOperationChangePit, + ReplicationProtectedItemOperationCommit, + ReplicationProtectedItemOperationCompleteMigration, + ReplicationProtectedItemOperationDisableProtection, + ReplicationProtectedItemOperationFailback, + ReplicationProtectedItemOperationFinalizeFailback, + ReplicationProtectedItemOperationPlannedFailover, + ReplicationProtectedItemOperationRepairReplication, + ReplicationProtectedItemOperationReverseReplicate, + ReplicationProtectedItemOperationSwitchProtection, + ReplicationProtectedItemOperationTestFailover, + ReplicationProtectedItemOperationTestFailoverCleanup, + ReplicationProtectedItemOperationUnplannedFailover, + } +} + +// ResyncState - The resync state. +type ResyncState string + +const ( + ResyncStateNone ResyncState = "None" + ResyncStatePreparedForResynchronization ResyncState = "PreparedForResynchronization" + ResyncStateStartedResynchronization ResyncState = "StartedResynchronization" +) + +// PossibleResyncStateValues returns the possible values for the ResyncState const type. +func PossibleResyncStateValues() []ResyncState { + return []ResyncState{ + ResyncStateNone, + ResyncStatePreparedForResynchronization, + ResyncStateStartedResynchronization, + } +} + +// RpInMageRecoveryPointType - The recovery point type. +type RpInMageRecoveryPointType string + +const ( + RpInMageRecoveryPointTypeCustom RpInMageRecoveryPointType = "Custom" + RpInMageRecoveryPointTypeLatestTag RpInMageRecoveryPointType = "LatestTag" + RpInMageRecoveryPointTypeLatestTime RpInMageRecoveryPointType = "LatestTime" +) + +// PossibleRpInMageRecoveryPointTypeValues returns the possible values for the RpInMageRecoveryPointType const type. +func PossibleRpInMageRecoveryPointTypeValues() []RpInMageRecoveryPointType { + return []RpInMageRecoveryPointType{ + RpInMageRecoveryPointTypeCustom, + RpInMageRecoveryPointTypeLatestTag, + RpInMageRecoveryPointTypeLatestTime, + } +} + +// SQLServerLicenseType - The SQL Server license type. +type SQLServerLicenseType string + +const ( + SQLServerLicenseTypeAHUB SQLServerLicenseType = "AHUB" + SQLServerLicenseTypeNoLicenseType SQLServerLicenseType = "NoLicenseType" + SQLServerLicenseTypeNotSpecified SQLServerLicenseType = "NotSpecified" + SQLServerLicenseTypePAYG SQLServerLicenseType = "PAYG" +) + +// PossibleSQLServerLicenseTypeValues returns the possible values for the SQLServerLicenseType const type. +func PossibleSQLServerLicenseTypeValues() []SQLServerLicenseType { + return []SQLServerLicenseType{ + SQLServerLicenseTypeAHUB, + SQLServerLicenseTypeNoLicenseType, + SQLServerLicenseTypeNotSpecified, + SQLServerLicenseTypePAYG, + } +} + +// SecurityConfiguration - Security configuration state. +type SecurityConfiguration string + +const ( + SecurityConfigurationDisabled SecurityConfiguration = "Disabled" + SecurityConfigurationEnabled SecurityConfiguration = "Enabled" +) + +// PossibleSecurityConfigurationValues returns the possible values for the SecurityConfiguration const type. +func PossibleSecurityConfigurationValues() []SecurityConfiguration { + return []SecurityConfiguration{ + SecurityConfigurationDisabled, + SecurityConfigurationEnabled, + } +} + +// SecurityType - The target VM security type. +type SecurityType string + +const ( + SecurityTypeConfidentialVM SecurityType = "ConfidentialVM" + SecurityTypeNone SecurityType = "None" + SecurityTypeTrustedLaunch SecurityType = "TrustedLaunch" +) + +// PossibleSecurityTypeValues returns the possible values for the SecurityType const type. +func PossibleSecurityTypeValues() []SecurityType { + return []SecurityType{ + SecurityTypeConfidentialVM, + SecurityTypeNone, + SecurityTypeTrustedLaunch, + } +} + +// SetMultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. +type SetMultiVMSyncStatus string + +const ( + SetMultiVMSyncStatusDisable SetMultiVMSyncStatus = "Disable" + SetMultiVMSyncStatusEnable SetMultiVMSyncStatus = "Enable" +) + +// PossibleSetMultiVMSyncStatusValues returns the possible values for the SetMultiVMSyncStatus const type. +func PossibleSetMultiVMSyncStatusValues() []SetMultiVMSyncStatus { + return []SetMultiVMSyncStatus{ + SetMultiVMSyncStatusDisable, + SetMultiVMSyncStatusEnable, + } +} + +// Severity - Severity of error. +type Severity string + +const ( + SeverityError Severity = "Error" + SeverityInfo Severity = "Info" + SeverityNONE Severity = "NONE" + SeverityWarning Severity = "Warning" +) + +// PossibleSeverityValues returns the possible values for the Severity const type. +func PossibleSeverityValues() []Severity { + return []Severity{ + SeverityError, + SeverityInfo, + SeverityNONE, + SeverityWarning, + } +} + +// SourceSiteOperations - A value indicating whether source site operations are required. +type SourceSiteOperations string + +const ( + SourceSiteOperationsNotRequired SourceSiteOperations = "NotRequired" + SourceSiteOperationsRequired SourceSiteOperations = "Required" +) + +// PossibleSourceSiteOperationsValues returns the possible values for the SourceSiteOperations const type. +func PossibleSourceSiteOperationsValues() []SourceSiteOperations { + return []SourceSiteOperations{ + SourceSiteOperationsNotRequired, + SourceSiteOperationsRequired, + } +} + +// TestMigrationState - The test migrate state. +type TestMigrationState string + +const ( + TestMigrationStateNone TestMigrationState = "None" + TestMigrationStateTestMigrationCleanupInProgress TestMigrationState = "TestMigrationCleanupInProgress" + TestMigrationStateTestMigrationCompletedWithInformation TestMigrationState = "TestMigrationCompletedWithInformation" + TestMigrationStateTestMigrationFailed TestMigrationState = "TestMigrationFailed" + TestMigrationStateTestMigrationInProgress TestMigrationState = "TestMigrationInProgress" + TestMigrationStateTestMigrationPartiallySucceeded TestMigrationState = "TestMigrationPartiallySucceeded" + TestMigrationStateTestMigrationSucceeded TestMigrationState = "TestMigrationSucceeded" +) + +// PossibleTestMigrationStateValues returns the possible values for the TestMigrationState const type. +func PossibleTestMigrationStateValues() []TestMigrationState { + return []TestMigrationState{ + TestMigrationStateNone, + TestMigrationStateTestMigrationCleanupInProgress, + TestMigrationStateTestMigrationCompletedWithInformation, + TestMigrationStateTestMigrationFailed, + TestMigrationStateTestMigrationInProgress, + TestMigrationStateTestMigrationPartiallySucceeded, + TestMigrationStateTestMigrationSucceeded, + } +} + +// VMEncryptionType - The encryption type of the VM. +type VMEncryptionType string + +const ( + VMEncryptionTypeNotEncrypted VMEncryptionType = "NotEncrypted" + VMEncryptionTypeOnePassEncrypted VMEncryptionType = "OnePassEncrypted" + VMEncryptionTypeTwoPassEncrypted VMEncryptionType = "TwoPassEncrypted" +) + +// PossibleVMEncryptionTypeValues returns the possible values for the VMEncryptionType const type. +func PossibleVMEncryptionTypeValues() []VMEncryptionType { + return []VMEncryptionType{ + VMEncryptionTypeNotEncrypted, + VMEncryptionTypeOnePassEncrypted, + VMEncryptionTypeTwoPassEncrypted, + } +} + +// VMReplicationProgressHealth - The initial replication progress health. +type VMReplicationProgressHealth string + +const ( + VMReplicationProgressHealthInProgress VMReplicationProgressHealth = "InProgress" + VMReplicationProgressHealthNoProgress VMReplicationProgressHealth = "NoProgress" + VMReplicationProgressHealthNone VMReplicationProgressHealth = "None" + VMReplicationProgressHealthSlowProgress VMReplicationProgressHealth = "SlowProgress" +) + +// PossibleVMReplicationProgressHealthValues returns the possible values for the VMReplicationProgressHealth const type. +func PossibleVMReplicationProgressHealthValues() []VMReplicationProgressHealth { + return []VMReplicationProgressHealth{ + VMReplicationProgressHealthInProgress, + VMReplicationProgressHealthNoProgress, + VMReplicationProgressHealthNone, + VMReplicationProgressHealthSlowProgress, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/interfaces.go new file mode 100644 index 00000000..7d7256aa --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/interfaces.go @@ -0,0 +1,600 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +// AddDisksProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetAddDisksProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AAddDisksInput, *AddDisksProviderSpecificInput, *InMageRcmAddDisksInput +type AddDisksProviderSpecificInputClassification interface { + // GetAddDisksProviderSpecificInput returns the AddDisksProviderSpecificInput content of the underlying type. + GetAddDisksProviderSpecificInput() *AddDisksProviderSpecificInput +} + +// ApplianceSpecificDetailsClassification provides polymorphic access to related types. +// Call the interface's GetApplianceSpecificDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ApplianceSpecificDetails, *InMageRcmApplianceSpecificDetails +type ApplianceSpecificDetailsClassification interface { + // GetApplianceSpecificDetails returns the ApplianceSpecificDetails content of the underlying type. + GetApplianceSpecificDetails() *ApplianceSpecificDetails +} + +// ApplyClusterRecoveryPointProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetApplyClusterRecoveryPointProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AApplyClusterRecoveryPointInput, *ApplyClusterRecoveryPointProviderSpecificInput +type ApplyClusterRecoveryPointProviderSpecificInputClassification interface { + // GetApplyClusterRecoveryPointProviderSpecificInput returns the ApplyClusterRecoveryPointProviderSpecificInput content of the underlying type. + GetApplyClusterRecoveryPointProviderSpecificInput() *ApplyClusterRecoveryPointProviderSpecificInput +} + +// ApplyRecoveryPointProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetApplyRecoveryPointProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AApplyRecoveryPointInput, *A2ACrossClusterMigrationApplyRecoveryPointInput, *ApplyRecoveryPointProviderSpecificInput, +// - *HyperVReplicaAzureApplyRecoveryPointInput, *InMageAzureV2ApplyRecoveryPointInput, *InMageRcmApplyRecoveryPointInput +type ApplyRecoveryPointProviderSpecificInputClassification interface { + // GetApplyRecoveryPointProviderSpecificInput returns the ApplyRecoveryPointProviderSpecificInput content of the underlying type. + GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput +} + +// ClusterProviderSpecificRecoveryPointDetailsClassification provides polymorphic access to related types. +// Call the interface's GetClusterProviderSpecificRecoveryPointDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AClusterRecoveryPointDetails, *ClusterProviderSpecificRecoveryPointDetails +type ClusterProviderSpecificRecoveryPointDetailsClassification interface { + // GetClusterProviderSpecificRecoveryPointDetails returns the ClusterProviderSpecificRecoveryPointDetails content of the underlying type. + GetClusterProviderSpecificRecoveryPointDetails() *ClusterProviderSpecificRecoveryPointDetails +} + +// ClusterTestFailoverProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetClusterTestFailoverProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AClusterTestFailoverInput, *ClusterTestFailoverProviderSpecificInput +type ClusterTestFailoverProviderSpecificInputClassification interface { + // GetClusterTestFailoverProviderSpecificInput returns the ClusterTestFailoverProviderSpecificInput content of the underlying type. + GetClusterTestFailoverProviderSpecificInput() *ClusterTestFailoverProviderSpecificInput +} + +// ClusterUnplannedFailoverProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetClusterUnplannedFailoverProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AClusterUnplannedFailoverInput, *ClusterUnplannedFailoverProviderSpecificInput +type ClusterUnplannedFailoverProviderSpecificInputClassification interface { + // GetClusterUnplannedFailoverProviderSpecificInput returns the ClusterUnplannedFailoverProviderSpecificInput content of the underlying type. + GetClusterUnplannedFailoverProviderSpecificInput() *ClusterUnplannedFailoverProviderSpecificInput +} + +// ConfigurationSettingsClassification provides polymorphic access to related types. +// Call the interface's GetConfigurationSettings() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ConfigurationSettings, *HyperVVirtualMachineDetails, *ReplicationGroupDetails, *VMwareVirtualMachineDetails, *VmmVirtualMachineDetails +type ConfigurationSettingsClassification interface { + // GetConfigurationSettings returns the ConfigurationSettings content of the underlying type. + GetConfigurationSettings() *ConfigurationSettings +} + +// CreateProtectionIntentProviderSpecificDetailsClassification provides polymorphic access to related types. +// Call the interface's GetCreateProtectionIntentProviderSpecificDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2ACreateProtectionIntentInput, *CreateProtectionIntentProviderSpecificDetails +type CreateProtectionIntentProviderSpecificDetailsClassification interface { + // GetCreateProtectionIntentProviderSpecificDetails returns the CreateProtectionIntentProviderSpecificDetails content of the underlying type. + GetCreateProtectionIntentProviderSpecificDetails() *CreateProtectionIntentProviderSpecificDetails +} + +// DisableProtectionProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetDisableProtectionProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *DisableProtectionProviderSpecificInput, *InMageDisableProtectionProviderSpecificInput +type DisableProtectionProviderSpecificInputClassification interface { + // GetDisableProtectionProviderSpecificInput returns the DisableProtectionProviderSpecificInput content of the underlying type. + GetDisableProtectionProviderSpecificInput() *DisableProtectionProviderSpecificInput +} + +// EnableMigrationProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetEnableMigrationProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EnableMigrationProviderSpecificInput, *VMwareCbtEnableMigrationInput +type EnableMigrationProviderSpecificInputClassification interface { + // GetEnableMigrationProviderSpecificInput returns the EnableMigrationProviderSpecificInput content of the underlying type. + GetEnableMigrationProviderSpecificInput() *EnableMigrationProviderSpecificInput +} + +// EnableProtectionProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetEnableProtectionProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2ACrossClusterMigrationEnableProtectionInput, *A2AEnableProtectionInput, *EnableProtectionProviderSpecificInput, *HyperVReplicaAzureEnableProtectionInput, +// - *InMageAzureV2EnableProtectionInput, *InMageEnableProtectionInput, *InMageRcmEnableProtectionInput +type EnableProtectionProviderSpecificInputClassification interface { + // GetEnableProtectionProviderSpecificInput returns the EnableProtectionProviderSpecificInput content of the underlying type. + GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput +} + +// EventProviderSpecificDetailsClassification provides polymorphic access to related types. +// Call the interface's GetEventProviderSpecificDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AEventDetails, *EventProviderSpecificDetails, *HyperVReplica2012EventDetails, *HyperVReplica2012R2EventDetails, *HyperVReplicaAzureEventDetails, +// - *HyperVReplicaBaseEventDetails, *InMageAzureV2EventDetails, *InMageRcmEventDetails, *InMageRcmFailbackEventDetails, *VMwareCbtEventDetails +type EventProviderSpecificDetailsClassification interface { + // GetEventProviderSpecificDetails returns the EventProviderSpecificDetails content of the underlying type. + GetEventProviderSpecificDetails() *EventProviderSpecificDetails +} + +// EventSpecificDetailsClassification provides polymorphic access to related types. +// Call the interface's GetEventSpecificDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EventSpecificDetails, *JobStatusEventDetails +type EventSpecificDetailsClassification interface { + // GetEventSpecificDetails returns the EventSpecificDetails content of the underlying type. + GetEventSpecificDetails() *EventSpecificDetails +} + +// FabricSpecificCreateNetworkMappingInputClassification provides polymorphic access to related types. +// Call the interface's GetFabricSpecificCreateNetworkMappingInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureToAzureCreateNetworkMappingInput, *FabricSpecificCreateNetworkMappingInput, *VmmToAzureCreateNetworkMappingInput, +// - *VmmToVmmCreateNetworkMappingInput +type FabricSpecificCreateNetworkMappingInputClassification interface { + // GetFabricSpecificCreateNetworkMappingInput returns the FabricSpecificCreateNetworkMappingInput content of the underlying type. + GetFabricSpecificCreateNetworkMappingInput() *FabricSpecificCreateNetworkMappingInput +} + +// FabricSpecificCreationInputClassification provides polymorphic access to related types. +// Call the interface's GetFabricSpecificCreationInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFabricCreationInput, *FabricSpecificCreationInput, *InMageRcmFabricCreationInput, *VMwareV2FabricCreationInput +type FabricSpecificCreationInputClassification interface { + // GetFabricSpecificCreationInput returns the FabricSpecificCreationInput content of the underlying type. + GetFabricSpecificCreationInput() *FabricSpecificCreationInput +} + +// FabricSpecificDetailsClassification provides polymorphic access to related types. +// Call the interface's GetFabricSpecificDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureFabricSpecificDetails, *FabricSpecificDetails, *HyperVSiteDetails, *InMageRcmFabricSpecificDetails, *VMwareDetails, +// - *VMwareV2FabricSpecificDetails, *VmmDetails +type FabricSpecificDetailsClassification interface { + // GetFabricSpecificDetails returns the FabricSpecificDetails content of the underlying type. + GetFabricSpecificDetails() *FabricSpecificDetails +} + +// FabricSpecificUpdateNetworkMappingInputClassification provides polymorphic access to related types. +// Call the interface's GetFabricSpecificUpdateNetworkMappingInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureToAzureUpdateNetworkMappingInput, *FabricSpecificUpdateNetworkMappingInput, *VmmToAzureUpdateNetworkMappingInput, +// - *VmmToVmmUpdateNetworkMappingInput +type FabricSpecificUpdateNetworkMappingInputClassification interface { + // GetFabricSpecificUpdateNetworkMappingInput returns the FabricSpecificUpdateNetworkMappingInput content of the underlying type. + GetFabricSpecificUpdateNetworkMappingInput() *FabricSpecificUpdateNetworkMappingInput +} + +// GroupTaskDetailsClassification provides polymorphic access to related types. +// Call the interface's GetGroupTaskDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *GroupTaskDetails, *InlineWorkflowTaskDetails, *RecoveryPlanGroupTaskDetails, *RecoveryPlanShutdownGroupTaskDetails +type GroupTaskDetailsClassification interface { + // GetGroupTaskDetails returns the GroupTaskDetails content of the underlying type. + GetGroupTaskDetails() *GroupTaskDetails +} + +// HyperVReplicaPolicyInputClassification provides polymorphic access to related types. +// Call the interface's GetHyperVReplicaPolicyInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *HyperVReplicaBluePolicyInput, *HyperVReplicaPolicyInput +type HyperVReplicaPolicyInputClassification interface { + PolicyProviderSpecificInputClassification + // GetHyperVReplicaPolicyInput returns the HyperVReplicaPolicyInput content of the underlying type. + GetHyperVReplicaPolicyInput() *HyperVReplicaPolicyInput +} + +// HyperVVirtualMachineDetailsClassification provides polymorphic access to related types. +// Call the interface's GetHyperVVirtualMachineDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *HyperVVirtualMachineDetails, *VmmVirtualMachineDetails +type HyperVVirtualMachineDetailsClassification interface { + ConfigurationSettingsClassification + // GetHyperVVirtualMachineDetails returns the HyperVVirtualMachineDetails content of the underlying type. + GetHyperVVirtualMachineDetails() *HyperVVirtualMachineDetails +} + +// JobDetailsClassification provides polymorphic access to related types. +// Call the interface's GetJobDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AsrJobDetails, *ClusterFailoverJobDetails, *ClusterSwitchProtectionJobDetails, *ClusterTestFailoverJobDetails, *ExportJobDetails, +// - *FailoverJobDetails, *JobDetails, *SwitchProtectionJobDetails, *TestFailoverJobDetails +type JobDetailsClassification interface { + // GetJobDetails returns the JobDetails content of the underlying type. + GetJobDetails() *JobDetails +} + +// JobTaskDetailsClassification provides polymorphic access to related types. +// Call the interface's GetJobTaskDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *FabricReplicationGroupTaskDetails, *JobTaskDetails, *VirtualMachineTaskDetails +type JobTaskDetailsClassification interface { + TaskTypeDetailsClassification + // GetJobTaskDetails returns the JobTaskDetails content of the underlying type. + GetJobTaskDetails() *JobTaskDetails +} + +// MigrateProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetMigrateProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *MigrateProviderSpecificInput, *VMwareCbtMigrateInput +type MigrateProviderSpecificInputClassification interface { + // GetMigrateProviderSpecificInput returns the MigrateProviderSpecificInput content of the underlying type. + GetMigrateProviderSpecificInput() *MigrateProviderSpecificInput +} + +// MigrationProviderSpecificSettingsClassification provides polymorphic access to related types. +// Call the interface's GetMigrationProviderSpecificSettings() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *MigrationProviderSpecificSettings, *VMwareCbtMigrationDetails +type MigrationProviderSpecificSettingsClassification interface { + // GetMigrationProviderSpecificSettings returns the MigrationProviderSpecificSettings content of the underlying type. + GetMigrationProviderSpecificSettings() *MigrationProviderSpecificSettings +} + +// NetworkMappingFabricSpecificSettingsClassification provides polymorphic access to related types. +// Call the interface's GetNetworkMappingFabricSpecificSettings() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureToAzureNetworkMappingSettings, *NetworkMappingFabricSpecificSettings, *VmmToAzureNetworkMappingSettings, *VmmToVmmNetworkMappingSettings +type NetworkMappingFabricSpecificSettingsClassification interface { + // GetNetworkMappingFabricSpecificSettings returns the NetworkMappingFabricSpecificSettings content of the underlying type. + GetNetworkMappingFabricSpecificSettings() *NetworkMappingFabricSpecificSettings +} + +// PlannedFailoverProviderSpecificFailoverInputClassification provides polymorphic access to related types. +// Call the interface's GetPlannedFailoverProviderSpecificFailoverInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *HyperVReplicaAzureFailbackProviderInput, *HyperVReplicaAzurePlannedFailoverProviderInput, *InMageRcmFailbackPlannedFailoverProviderInput, +// - *PlannedFailoverProviderSpecificFailoverInput +type PlannedFailoverProviderSpecificFailoverInputClassification interface { + // GetPlannedFailoverProviderSpecificFailoverInput returns the PlannedFailoverProviderSpecificFailoverInput content of the underlying type. + GetPlannedFailoverProviderSpecificFailoverInput() *PlannedFailoverProviderSpecificFailoverInput +} + +// PolicyProviderSpecificDetailsClassification provides polymorphic access to related types. +// Call the interface's GetPolicyProviderSpecificDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2APolicyDetails, *HyperVReplicaAzurePolicyDetails, *HyperVReplicaBasePolicyDetails, *HyperVReplicaBluePolicyDetails, +// - *HyperVReplicaPolicyDetails, *InMageAzureV2PolicyDetails, *InMageBasePolicyDetails, *InMagePolicyDetails, *InMageRcmFailbackPolicyDetails, +// - *InMageRcmPolicyDetails, *PolicyProviderSpecificDetails, *VmwareCbtPolicyDetails +type PolicyProviderSpecificDetailsClassification interface { + // GetPolicyProviderSpecificDetails returns the PolicyProviderSpecificDetails content of the underlying type. + GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails +} + +// PolicyProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetPolicyProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2ACrossClusterMigrationPolicyCreationInput, *A2APolicyCreationInput, *HyperVReplicaAzurePolicyInput, *HyperVReplicaBluePolicyInput, +// - *HyperVReplicaPolicyInput, *InMageAzureV2PolicyInput, *InMagePolicyInput, *InMageRcmFailbackPolicyCreationInput, *InMageRcmPolicyCreationInput, +// - *PolicyProviderSpecificInput, *VMwareCbtPolicyCreationInput +type PolicyProviderSpecificInputClassification interface { + // GetPolicyProviderSpecificInput returns the PolicyProviderSpecificInput content of the underlying type. + GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput +} + +// ProtectionContainerMappingProviderSpecificDetailsClassification provides polymorphic access to related types. +// Call the interface's GetProtectionContainerMappingProviderSpecificDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AProtectionContainerMappingDetails, *InMageRcmProtectionContainerMappingDetails, *ProtectionContainerMappingProviderSpecificDetails, +// - *VMwareCbtProtectionContainerMappingDetails +type ProtectionContainerMappingProviderSpecificDetailsClassification interface { + // GetProtectionContainerMappingProviderSpecificDetails returns the ProtectionContainerMappingProviderSpecificDetails content of the underlying type. + GetProtectionContainerMappingProviderSpecificDetails() *ProtectionContainerMappingProviderSpecificDetails +} + +// ProtectionProfileCustomDetailsClassification provides polymorphic access to related types. +// Call the interface's GetProtectionProfileCustomDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ExistingProtectionProfile, *NewProtectionProfile, *ProtectionProfileCustomDetails +type ProtectionProfileCustomDetailsClassification interface { + // GetProtectionProfileCustomDetails returns the ProtectionProfileCustomDetails content of the underlying type. + GetProtectionProfileCustomDetails() *ProtectionProfileCustomDetails +} + +// ProviderSpecificRecoveryPointDetailsClassification provides polymorphic access to related types. +// Call the interface's GetProviderSpecificRecoveryPointDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2ARecoveryPointDetails, *InMageAzureV2RecoveryPointDetails, *InMageRcmRecoveryPointDetails, *ProviderSpecificRecoveryPointDetails +type ProviderSpecificRecoveryPointDetailsClassification interface { + // GetProviderSpecificRecoveryPointDetails returns the ProviderSpecificRecoveryPointDetails content of the underlying type. + GetProviderSpecificRecoveryPointDetails() *ProviderSpecificRecoveryPointDetails +} + +// RecoveryAvailabilitySetCustomDetailsClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryAvailabilitySetCustomDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ExistingRecoveryAvailabilitySet, *RecoveryAvailabilitySetCustomDetails +type RecoveryAvailabilitySetCustomDetailsClassification interface { + // GetRecoveryAvailabilitySetCustomDetails returns the RecoveryAvailabilitySetCustomDetails content of the underlying type. + GetRecoveryAvailabilitySetCustomDetails() *RecoveryAvailabilitySetCustomDetails +} + +// RecoveryPlanActionDetailsClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryPlanActionDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *RecoveryPlanActionDetails, *RecoveryPlanAutomationRunbookActionDetails, *RecoveryPlanManualActionDetails, *RecoveryPlanScriptActionDetails +type RecoveryPlanActionDetailsClassification interface { + // GetRecoveryPlanActionDetails returns the RecoveryPlanActionDetails content of the underlying type. + GetRecoveryPlanActionDetails() *RecoveryPlanActionDetails +} + +// RecoveryPlanGroupTaskDetailsClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryPlanGroupTaskDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *RecoveryPlanGroupTaskDetails, *RecoveryPlanShutdownGroupTaskDetails +type RecoveryPlanGroupTaskDetailsClassification interface { + GroupTaskDetailsClassification + // GetRecoveryPlanGroupTaskDetails returns the RecoveryPlanGroupTaskDetails content of the underlying type. + GetRecoveryPlanGroupTaskDetails() *RecoveryPlanGroupTaskDetails +} + +// RecoveryPlanProviderSpecificDetailsClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryPlanProviderSpecificDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *RecoveryPlanA2ADetails, *RecoveryPlanProviderSpecificDetails +type RecoveryPlanProviderSpecificDetailsClassification interface { + // GetRecoveryPlanProviderSpecificDetails returns the RecoveryPlanProviderSpecificDetails content of the underlying type. + GetRecoveryPlanProviderSpecificDetails() *RecoveryPlanProviderSpecificDetails +} + +// RecoveryPlanProviderSpecificFailoverInputClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryPlanProviderSpecificFailoverInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *RecoveryPlanA2AFailoverInput, *RecoveryPlanHyperVReplicaAzureFailbackInput, *RecoveryPlanHyperVReplicaAzureFailoverInput, +// - *RecoveryPlanInMageAzureV2FailoverInput, *RecoveryPlanInMageFailoverInput, *RecoveryPlanInMageRcmFailbackFailoverInput, +// - *RecoveryPlanInMageRcmFailoverInput, *RecoveryPlanProviderSpecificFailoverInput +type RecoveryPlanProviderSpecificFailoverInputClassification interface { + // GetRecoveryPlanProviderSpecificFailoverInput returns the RecoveryPlanProviderSpecificFailoverInput content of the underlying type. + GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput +} + +// RecoveryPlanProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryPlanProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *RecoveryPlanA2AInput, *RecoveryPlanProviderSpecificInput +type RecoveryPlanProviderSpecificInputClassification interface { + // GetRecoveryPlanProviderSpecificInput returns the RecoveryPlanProviderSpecificInput content of the underlying type. + GetRecoveryPlanProviderSpecificInput() *RecoveryPlanProviderSpecificInput +} + +// RecoveryProximityPlacementGroupCustomDetailsClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryProximityPlacementGroupCustomDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ExistingRecoveryProximityPlacementGroup, *RecoveryProximityPlacementGroupCustomDetails +type RecoveryProximityPlacementGroupCustomDetailsClassification interface { + // GetRecoveryProximityPlacementGroupCustomDetails returns the RecoveryProximityPlacementGroupCustomDetails content of the underlying type. + GetRecoveryProximityPlacementGroupCustomDetails() *RecoveryProximityPlacementGroupCustomDetails +} + +// RecoveryResourceGroupCustomDetailsClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryResourceGroupCustomDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ExistingRecoveryResourceGroup, *RecoveryResourceGroupCustomDetails +type RecoveryResourceGroupCustomDetailsClassification interface { + // GetRecoveryResourceGroupCustomDetails returns the RecoveryResourceGroupCustomDetails content of the underlying type. + GetRecoveryResourceGroupCustomDetails() *RecoveryResourceGroupCustomDetails +} + +// RecoveryVirtualNetworkCustomDetailsClassification provides polymorphic access to related types. +// Call the interface's GetRecoveryVirtualNetworkCustomDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ExistingRecoveryVirtualNetwork, *NewRecoveryVirtualNetwork, *RecoveryVirtualNetworkCustomDetails +type RecoveryVirtualNetworkCustomDetailsClassification interface { + // GetRecoveryVirtualNetworkCustomDetails returns the RecoveryVirtualNetworkCustomDetails content of the underlying type. + GetRecoveryVirtualNetworkCustomDetails() *RecoveryVirtualNetworkCustomDetails +} + +// RemoveDisksProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetRemoveDisksProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2ARemoveDisksInput, *RemoveDisksProviderSpecificInput +type RemoveDisksProviderSpecificInputClassification interface { + // GetRemoveDisksProviderSpecificInput returns the RemoveDisksProviderSpecificInput content of the underlying type. + GetRemoveDisksProviderSpecificInput() *RemoveDisksProviderSpecificInput +} + +// ReplicationClusterProviderSpecificSettingsClassification provides polymorphic access to related types. +// Call the interface's GetReplicationClusterProviderSpecificSettings() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AReplicationProtectionClusterDetails, *ReplicationClusterProviderSpecificSettings +type ReplicationClusterProviderSpecificSettingsClassification interface { + // GetReplicationClusterProviderSpecificSettings returns the ReplicationClusterProviderSpecificSettings content of the underlying type. + GetReplicationClusterProviderSpecificSettings() *ReplicationClusterProviderSpecificSettings +} + +// ReplicationProtectionIntentProviderSpecificSettingsClassification provides polymorphic access to related types. +// Call the interface's GetReplicationProtectionIntentProviderSpecificSettings() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AReplicationIntentDetails, *ReplicationProtectionIntentProviderSpecificSettings +type ReplicationProtectionIntentProviderSpecificSettingsClassification interface { + // GetReplicationProtectionIntentProviderSpecificSettings returns the ReplicationProtectionIntentProviderSpecificSettings content of the underlying type. + GetReplicationProtectionIntentProviderSpecificSettings() *ReplicationProtectionIntentProviderSpecificSettings +} + +// ReplicationProviderSpecificContainerCreationInputClassification provides polymorphic access to related types. +// Call the interface's GetReplicationProviderSpecificContainerCreationInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AContainerCreationInput, *A2ACrossClusterMigrationContainerCreationInput, *ReplicationProviderSpecificContainerCreationInput, +// - *VMwareCbtContainerCreationInput +type ReplicationProviderSpecificContainerCreationInputClassification interface { + // GetReplicationProviderSpecificContainerCreationInput returns the ReplicationProviderSpecificContainerCreationInput content of the underlying type. + GetReplicationProviderSpecificContainerCreationInput() *ReplicationProviderSpecificContainerCreationInput +} + +// ReplicationProviderSpecificContainerMappingInputClassification provides polymorphic access to related types. +// Call the interface's GetReplicationProviderSpecificContainerMappingInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AContainerMappingInput, *ReplicationProviderSpecificContainerMappingInput, *VMwareCbtContainerMappingInput +type ReplicationProviderSpecificContainerMappingInputClassification interface { + // GetReplicationProviderSpecificContainerMappingInput returns the ReplicationProviderSpecificContainerMappingInput content of the underlying type. + GetReplicationProviderSpecificContainerMappingInput() *ReplicationProviderSpecificContainerMappingInput +} + +// ReplicationProviderSpecificSettingsClassification provides polymorphic access to related types. +// Call the interface's GetReplicationProviderSpecificSettings() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2ACrossClusterMigrationReplicationDetails, *A2AReplicationDetails, *HyperVReplicaAzureReplicationDetails, *HyperVReplicaBaseReplicationDetails, +// - *HyperVReplicaBlueReplicationDetails, *HyperVReplicaReplicationDetails, *InMageAzureV2ReplicationDetails, *InMageRcmFailbackReplicationDetails, +// - *InMageRcmReplicationDetails, *InMageReplicationDetails, *ReplicationProviderSpecificSettings +type ReplicationProviderSpecificSettingsClassification interface { + // GetReplicationProviderSpecificSettings returns the ReplicationProviderSpecificSettings content of the underlying type. + GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings +} + +// ReplicationProviderSpecificUpdateContainerMappingInputClassification provides polymorphic access to related types. +// Call the interface's GetReplicationProviderSpecificUpdateContainerMappingInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AUpdateContainerMappingInput, *InMageRcmUpdateContainerMappingInput, *ReplicationProviderSpecificUpdateContainerMappingInput +type ReplicationProviderSpecificUpdateContainerMappingInputClassification interface { + // GetReplicationProviderSpecificUpdateContainerMappingInput returns the ReplicationProviderSpecificUpdateContainerMappingInput content of the underlying type. + GetReplicationProviderSpecificUpdateContainerMappingInput() *ReplicationProviderSpecificUpdateContainerMappingInput +} + +// ResumeReplicationProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetResumeReplicationProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ResumeReplicationProviderSpecificInput, *VMwareCbtResumeReplicationInput +type ResumeReplicationProviderSpecificInputClassification interface { + // GetResumeReplicationProviderSpecificInput returns the ResumeReplicationProviderSpecificInput content of the underlying type. + GetResumeReplicationProviderSpecificInput() *ResumeReplicationProviderSpecificInput +} + +// ResyncProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetResyncProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ResyncProviderSpecificInput, *VMwareCbtResyncInput +type ResyncProviderSpecificInputClassification interface { + // GetResyncProviderSpecificInput returns the ResyncProviderSpecificInput content of the underlying type. + GetResyncProviderSpecificInput() *ResyncProviderSpecificInput +} + +// ReverseReplicationProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetReverseReplicationProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AReprotectInput, *HyperVReplicaAzureReprotectInput, *InMageAzureV2ReprotectInput, *InMageRcmFailbackReprotectInput, +// - *InMageRcmReprotectInput, *InMageReprotectInput, *ReverseReplicationProviderSpecificInput +type ReverseReplicationProviderSpecificInputClassification interface { + // GetReverseReplicationProviderSpecificInput returns the ReverseReplicationProviderSpecificInput content of the underlying type. + GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput +} + +// SharedDiskReplicationProviderSpecificSettingsClassification provides polymorphic access to related types. +// Call the interface's GetSharedDiskReplicationProviderSpecificSettings() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2ASharedDiskReplicationDetails, *SharedDiskReplicationProviderSpecificSettings +type SharedDiskReplicationProviderSpecificSettingsClassification interface { + // GetSharedDiskReplicationProviderSpecificSettings returns the SharedDiskReplicationProviderSpecificSettings content of the underlying type. + GetSharedDiskReplicationProviderSpecificSettings() *SharedDiskReplicationProviderSpecificSettings +} + +// StorageAccountCustomDetailsClassification provides polymorphic access to related types. +// Call the interface's GetStorageAccountCustomDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ExistingStorageAccount, *StorageAccountCustomDetails +type StorageAccountCustomDetailsClassification interface { + // GetStorageAccountCustomDetails returns the StorageAccountCustomDetails content of the underlying type. + GetStorageAccountCustomDetails() *StorageAccountCustomDetails +} + +// SwitchClusterProtectionProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetSwitchClusterProtectionProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2ASwitchClusterProtectionInput, *SwitchClusterProtectionProviderSpecificInput +type SwitchClusterProtectionProviderSpecificInputClassification interface { + // GetSwitchClusterProtectionProviderSpecificInput returns the SwitchClusterProtectionProviderSpecificInput content of the underlying type. + GetSwitchClusterProtectionProviderSpecificInput() *SwitchClusterProtectionProviderSpecificInput +} + +// SwitchProtectionProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetSwitchProtectionProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2ASwitchProtectionInput, *SwitchProtectionProviderSpecificInput +type SwitchProtectionProviderSpecificInputClassification interface { + // GetSwitchProtectionProviderSpecificInput returns the SwitchProtectionProviderSpecificInput content of the underlying type. + GetSwitchProtectionProviderSpecificInput() *SwitchProtectionProviderSpecificInput +} + +// SwitchProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetSwitchProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *InMageAzureV2SwitchProviderInput, *SwitchProviderSpecificInput +type SwitchProviderSpecificInputClassification interface { + // GetSwitchProviderSpecificInput returns the SwitchProviderSpecificInput content of the underlying type. + GetSwitchProviderSpecificInput() *SwitchProviderSpecificInput +} + +// TaskTypeDetailsClassification provides polymorphic access to related types. +// Call the interface's GetTaskTypeDetails() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutomationRunbookTaskDetails, *ConsistencyCheckTaskDetails, *FabricReplicationGroupTaskDetails, *JobTaskDetails, *ManualActionTaskDetails, +// - *ScriptActionTaskDetails, *TaskTypeDetails, *VMNicUpdatesTaskDetails, *VirtualMachineTaskDetails +type TaskTypeDetailsClassification interface { + // GetTaskTypeDetails returns the TaskTypeDetails content of the underlying type. + GetTaskTypeDetails() *TaskTypeDetails +} + +// TestFailoverProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetTestFailoverProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2ATestFailoverInput, *HyperVReplicaAzureTestFailoverInput, *InMageAzureV2TestFailoverInput, *InMageRcmTestFailoverInput, +// - *InMageTestFailoverInput, *TestFailoverProviderSpecificInput +type TestFailoverProviderSpecificInputClassification interface { + // GetTestFailoverProviderSpecificInput returns the TestFailoverProviderSpecificInput content of the underlying type. + GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput +} + +// TestMigrateProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetTestMigrateProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *TestMigrateProviderSpecificInput, *VMwareCbtTestMigrateInput +type TestMigrateProviderSpecificInputClassification interface { + // GetTestMigrateProviderSpecificInput returns the TestMigrateProviderSpecificInput content of the underlying type. + GetTestMigrateProviderSpecificInput() *TestMigrateProviderSpecificInput +} + +// UnplannedFailoverProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetUnplannedFailoverProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AUnplannedFailoverInput, *HyperVReplicaAzureUnplannedFailoverInput, *InMageAzureV2UnplannedFailoverInput, *InMageRcmUnplannedFailoverInput, +// - *InMageUnplannedFailoverInput, *UnplannedFailoverProviderSpecificInput +type UnplannedFailoverProviderSpecificInputClassification interface { + // GetUnplannedFailoverProviderSpecificInput returns the UnplannedFailoverProviderSpecificInput content of the underlying type. + GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput +} + +// UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *InMageRcmUpdateApplianceForReplicationProtectedItemInput, *UpdateApplianceForReplicationProtectedItemProviderSpecificInput +type UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification interface { + // GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput returns the UpdateApplianceForReplicationProtectedItemProviderSpecificInput content of the underlying type. + GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput() *UpdateApplianceForReplicationProtectedItemProviderSpecificInput +} + +// UpdateMigrationItemProviderSpecificInputClassification provides polymorphic access to related types. +// Call the interface's GetUpdateMigrationItemProviderSpecificInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *UpdateMigrationItemProviderSpecificInput, *VMwareCbtUpdateMigrationItemInput +type UpdateMigrationItemProviderSpecificInputClassification interface { + // GetUpdateMigrationItemProviderSpecificInput returns the UpdateMigrationItemProviderSpecificInput content of the underlying type. + GetUpdateMigrationItemProviderSpecificInput() *UpdateMigrationItemProviderSpecificInput +} + +// UpdateReplicationProtectedItemProviderInputClassification provides polymorphic access to related types. +// Call the interface's GetUpdateReplicationProtectedItemProviderInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *A2AUpdateReplicationProtectedItemInput, *HyperVReplicaAzureUpdateReplicationProtectedItemInput, *InMageAzureV2UpdateReplicationProtectedItemInput, +// - *InMageRcmUpdateReplicationProtectedItemInput, *UpdateReplicationProtectedItemProviderInput +type UpdateReplicationProtectedItemProviderInputClassification interface { + // GetUpdateReplicationProtectedItemProviderInput returns the UpdateReplicationProtectedItemProviderInput content of the underlying type. + GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/migrationrecoverypoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/migrationrecoverypoints_client.go new file mode 100644 index 00000000..500bb04b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/migrationrecoverypoints_client.go @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// MigrationRecoveryPointsClient contains the methods for the MigrationRecoveryPoints group. +// Don't use this type directly, use NewMigrationRecoveryPointsClient() instead. +type MigrationRecoveryPointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewMigrationRecoveryPointsClient creates a new instance of MigrationRecoveryPointsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewMigrationRecoveryPointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MigrationRecoveryPointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &MigrationRecoveryPointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets a recovery point for a migration item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric unique name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - migrationRecoveryPointName - The migration recovery point name. +// - options - MigrationRecoveryPointsClientGetOptions contains the optional parameters for the MigrationRecoveryPointsClient.Get +// method. +func (client *MigrationRecoveryPointsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, migrationRecoveryPointName string, options *MigrationRecoveryPointsClientGetOptions) (MigrationRecoveryPointsClientGetResponse, error) { + var err error + const operationName = "MigrationRecoveryPointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, migrationRecoveryPointName, options) + if err != nil { + return MigrationRecoveryPointsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MigrationRecoveryPointsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MigrationRecoveryPointsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *MigrationRecoveryPointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, migrationRecoveryPointName string, _ *MigrationRecoveryPointsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrationRecoveryPoints/{migrationRecoveryPointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + if migrationRecoveryPointName == "" { + return nil, errors.New("parameter migrationRecoveryPointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationRecoveryPointName}", url.PathEscape(migrationRecoveryPointName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *MigrationRecoveryPointsClient) getHandleResponse(resp *http.Response) (MigrationRecoveryPointsClientGetResponse, error) { + result := MigrationRecoveryPointsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MigrationRecoveryPoint); err != nil { + return MigrationRecoveryPointsClientGetResponse{}, err + } + return result, nil +} + +// NewListByReplicationMigrationItemsPager - Gets the recovery points for a migration item. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric unique name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - options - MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions contains the optional parameters for the +// MigrationRecoveryPointsClient.NewListByReplicationMigrationItemsPager method. +func (client *MigrationRecoveryPointsClient) NewListByReplicationMigrationItemsPager(resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, options *MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions) *runtime.Pager[MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse] { + return runtime.NewPager(runtime.PagingHandler[MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse]{ + More: func(page MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse) (MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MigrationRecoveryPointsClient.NewListByReplicationMigrationItemsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationMigrationItemsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, options) + }, nil) + if err != nil { + return MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse{}, err + } + return client.listByReplicationMigrationItemsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationMigrationItemsCreateRequest creates the ListByReplicationMigrationItems request. +func (client *MigrationRecoveryPointsClient) listByReplicationMigrationItemsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, _ *MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrationRecoveryPoints" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationMigrationItemsHandleResponse handles the ListByReplicationMigrationItems response. +func (client *MigrationRecoveryPointsClient) listByReplicationMigrationItemsHandleResponse(resp *http.Response) (MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse, error) { + result := MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MigrationRecoveryPointCollection); err != nil { + return MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/models.go new file mode 100644 index 00000000..990f5055 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/models.go @@ -0,0 +1,12261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import "time" + +// A2AAddDisksInput - A2A add disk(s) input. +type A2AAddDisksInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The list of vm disk details. + VMDisks []*A2AVMDiskInputDetails + + // The list of vm managed disk details. + VMManagedDisks []*A2AVMManagedDiskInputDetails +} + +// GetAddDisksProviderSpecificInput implements the AddDisksProviderSpecificInputClassification interface for type A2AAddDisksInput. +func (a *A2AAddDisksInput) GetAddDisksProviderSpecificInput() *AddDisksProviderSpecificInput { + return &AddDisksProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2AApplyClusterRecoveryPointInput - A2A provider specific input for apply cluster recovery point. +type A2AApplyClusterRecoveryPointInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetApplyClusterRecoveryPointProviderSpecificInput implements the ApplyClusterRecoveryPointProviderSpecificInputClassification +// interface for type A2AApplyClusterRecoveryPointInput. +func (a *A2AApplyClusterRecoveryPointInput) GetApplyClusterRecoveryPointProviderSpecificInput() *ApplyClusterRecoveryPointProviderSpecificInput { + return &ApplyClusterRecoveryPointProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2AApplyRecoveryPointInput - ApplyRecoveryPoint input specific to A2A provider. +type A2AApplyRecoveryPointInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface +// for type A2AApplyRecoveryPointInput. +func (a *A2AApplyRecoveryPointInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { + return &ApplyRecoveryPointProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2AClusterRecoveryPointDetails - A2A provider specific cluster recovery point details. +type A2AClusterRecoveryPointDetails struct { + // The list of nodes representing the cluster. + Nodes []*string + + // A value indicating whether the recovery point is multi VM consistent. + RecoveryPointSyncType *RecoveryPointSyncType + + // READ-ONLY; Gets the provider type. + InstanceType *string +} + +// GetClusterProviderSpecificRecoveryPointDetails implements the ClusterProviderSpecificRecoveryPointDetailsClassification +// interface for type A2AClusterRecoveryPointDetails. +func (a *A2AClusterRecoveryPointDetails) GetClusterProviderSpecificRecoveryPointDetails() *ClusterProviderSpecificRecoveryPointDetails { + return &ClusterProviderSpecificRecoveryPointDetails{ + InstanceType: a.InstanceType, + } +} + +// A2AClusterTestFailoverInput - A2A provider specific input for test cluster failover. +type A2AClusterTestFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The cluster recovery point id to be passed to failover to a particular recovery point. + ClusterRecoveryPointID *string + + // The list of individual node recovery points. + IndividualNodeRecoveryPoints []*string +} + +// GetClusterTestFailoverProviderSpecificInput implements the ClusterTestFailoverProviderSpecificInputClassification interface +// for type A2AClusterTestFailoverInput. +func (a *A2AClusterTestFailoverInput) GetClusterTestFailoverProviderSpecificInput() *ClusterTestFailoverProviderSpecificInput { + return &ClusterTestFailoverProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2AClusterUnplannedFailoverInput - A2A provider specific input for unplanned cluster failover. +type A2AClusterUnplannedFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The cluster recovery point id to be passed to failover to a particular recovery point. + ClusterRecoveryPointID *string + + // The list of individual node recovery points. + IndividualNodeRecoveryPoints []*string +} + +// GetClusterUnplannedFailoverProviderSpecificInput implements the ClusterUnplannedFailoverProviderSpecificInputClassification +// interface for type A2AClusterUnplannedFailoverInput. +func (a *A2AClusterUnplannedFailoverInput) GetClusterUnplannedFailoverProviderSpecificInput() *ClusterUnplannedFailoverProviderSpecificInput { + return &ClusterUnplannedFailoverProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2AContainerCreationInput - A2A cloud creation input. +type A2AContainerCreationInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetReplicationProviderSpecificContainerCreationInput implements the ReplicationProviderSpecificContainerCreationInputClassification +// interface for type A2AContainerCreationInput. +func (a *A2AContainerCreationInput) GetReplicationProviderSpecificContainerCreationInput() *ReplicationProviderSpecificContainerCreationInput { + return &ReplicationProviderSpecificContainerCreationInput{ + InstanceType: a.InstanceType, + } +} + +// A2AContainerMappingInput - A2A container mapping input. +type A2AContainerMappingInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating whether the auto update is enabled. + AgentAutoUpdateStatus *AgentAutoUpdateStatus + + // The automation account arm id. + AutomationAccountArmID *string + + // A value indicating the type authentication to use for automation Account. + AutomationAccountAuthenticationType *AutomationAccountAuthenticationType +} + +// GetReplicationProviderSpecificContainerMappingInput implements the ReplicationProviderSpecificContainerMappingInputClassification +// interface for type A2AContainerMappingInput. +func (a *A2AContainerMappingInput) GetReplicationProviderSpecificContainerMappingInput() *ReplicationProviderSpecificContainerMappingInput { + return &ReplicationProviderSpecificContainerMappingInput{ + InstanceType: a.InstanceType, + } +} + +// A2ACreateProtectionIntentInput - A2A create protection intent input. +type A2ACreateProtectionIntentInput struct { + // REQUIRED; The fabric specific object Id of the virtual machine. + FabricObjectID *string + + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The primary location for the virtual machine. + PrimaryLocation *string + + // REQUIRED; The recovery availability type of the virtual machine. + RecoveryAvailabilityType *A2ARecoveryAvailabilityType + + // REQUIRED; The recovery location for the virtual machine. + RecoveryLocation *string + + // REQUIRED; The recovery resource group Id. Valid for V2 scenarios. + RecoveryResourceGroupID *string + + // REQUIRED; The recovery subscription Id of the virtual machine. + RecoverySubscriptionID *string + + // A value indicating whether the auto update is enabled. + AgentAutoUpdateStatus *AgentAutoUpdateStatus + + // A value indicating whether the auto protection is enabled. + AutoProtectionOfDataDisk *AutoProtectionOfDataDisk + + // The automation account arm id. + AutomationAccountArmID *string + + // A value indicating the authentication type for automation account. The default value is "RunAsAccount". + AutomationAccountAuthenticationType *AutomationAccountAuthenticationType + + // The recovery disk encryption information (for two pass flows). + DiskEncryptionInfo *DiskEncryptionInfo + + // The multi vm group id. + MultiVMGroupID *string + + // The multi vm group name. + MultiVMGroupName *string + + // The primary staging storage account input. + PrimaryStagingStorageAccountCustomInput StorageAccountCustomDetailsClassification + + // The protection profile custom inputs. + ProtectionProfileCustomInput ProtectionProfileCustomDetailsClassification + + // The recovery availability set input. + RecoveryAvailabilitySetCustomInput RecoveryAvailabilitySetCustomDetailsClassification + + // The recovery availability zone. + RecoveryAvailabilityZone *string + + // The boot diagnostic storage account. + RecoveryBootDiagStorageAccount StorageAccountCustomDetailsClassification + + // The recovery proximity placement group custom input. + RecoveryProximityPlacementGroupCustomInput RecoveryProximityPlacementGroupCustomDetailsClassification + + // The recovery virtual network input. + RecoveryVirtualNetworkCustomInput RecoveryVirtualNetworkCustomDetailsClassification + + // The list of vm disk inputs. + VMDisks []*A2AProtectionIntentDiskInputDetails + + // The list of vm managed disk inputs. + VMManagedDisks []*A2AProtectionIntentManagedDiskInputDetails +} + +// GetCreateProtectionIntentProviderSpecificDetails implements the CreateProtectionIntentProviderSpecificDetailsClassification +// interface for type A2ACreateProtectionIntentInput. +func (a *A2ACreateProtectionIntentInput) GetCreateProtectionIntentProviderSpecificDetails() *CreateProtectionIntentProviderSpecificDetails { + return &CreateProtectionIntentProviderSpecificDetails{ + InstanceType: a.InstanceType, + } +} + +// A2ACrossClusterMigrationApplyRecoveryPointInput - ApplyRecoveryPoint input specific to A2ACrossClusterMigration provider. +type A2ACrossClusterMigrationApplyRecoveryPointInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface +// for type A2ACrossClusterMigrationApplyRecoveryPointInput. +func (a *A2ACrossClusterMigrationApplyRecoveryPointInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { + return &ApplyRecoveryPointProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2ACrossClusterMigrationContainerCreationInput - A2ACrossClusterMigration cloud creation input. +type A2ACrossClusterMigrationContainerCreationInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetReplicationProviderSpecificContainerCreationInput implements the ReplicationProviderSpecificContainerCreationInputClassification +// interface for type A2ACrossClusterMigrationContainerCreationInput. +func (a *A2ACrossClusterMigrationContainerCreationInput) GetReplicationProviderSpecificContainerCreationInput() *ReplicationProviderSpecificContainerCreationInput { + return &ReplicationProviderSpecificContainerCreationInput{ + InstanceType: a.InstanceType, + } +} + +// A2ACrossClusterMigrationEnableProtectionInput - A2A Cross-Cluster Migration enable protection input. +type A2ACrossClusterMigrationEnableProtectionInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The fabric specific object Id of the virtual machine. + FabricObjectID *string + + // The recovery container Id. + RecoveryContainerID *string +} + +// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for +// type A2ACrossClusterMigrationEnableProtectionInput. +func (a *A2ACrossClusterMigrationEnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { + return &EnableProtectionProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2ACrossClusterMigrationPolicyCreationInput - A2A Cross-Cluster Migration Policy creation input. +type A2ACrossClusterMigrationPolicyCreationInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type A2ACrossClusterMigrationPolicyCreationInput. +func (a *A2ACrossClusterMigrationPolicyCreationInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return &PolicyProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2ACrossClusterMigrationReplicationDetails - A2A provider specific settings. +type A2ACrossClusterMigrationReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The fabric specific object Id of the virtual machine. + FabricObjectID *string + + // An id associated with the PE that survives actions like switch protection which change the backing PE/CPE objects internally.The + // lifecycle id gets carried forward to have a link/continuity in being + // able to have an Id that denotes the "same" protected item even though other internal Ids/ARM Id might be changing. + LifecycleID *string + + // The type of operating system. + OSType *string + + // Primary fabric location. + PrimaryFabricLocation *string + + // The protection state for the vm. + VMProtectionState *string + + // The protection state description for the vm. + VMProtectionStateDescription *string +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// A2ACrossClusterMigrationReplicationDetails. +func (a *A2ACrossClusterMigrationReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return &ReplicationProviderSpecificSettings{ + InstanceType: a.InstanceType, + } +} + +// A2AEnableProtectionInput - A2A enable protection input. +type A2AEnableProtectionInput struct { + // REQUIRED; The fabric specific object Id of the virtual machine. + FabricObjectID *string + + // REQUIRED; The class type. + InstanceType *string + + // A value indicating whether the auto protection is enabled. + AutoProtectionOfDataDisk *AutoProtectionOfDataDisk + + // The recovery disk encryption information (for two pass flows). + DiskEncryptionInfo *DiskEncryptionInfo + + // The multi vm group id. + MultiVMGroupID *string + + // The multi vm group name. + MultiVMGroupName *string + + // The replication protection cluster Id. + ProtectionClusterID *string + + // The recovery availability set Id. + RecoveryAvailabilitySetID *string + + // The recovery availability zone. + RecoveryAvailabilityZone *string + + // The recovery Azure virtual network ARM id. + RecoveryAzureNetworkID *string + + // The boot diagnostic storage account. + RecoveryBootDiagStorageAccountID *string + + // The recovery capacity reservation group Id. + RecoveryCapacityReservationGroupID *string + + // The recovery cloud service Id. Valid for V1 scenarios. + RecoveryCloudServiceID *string + + // The recovery container Id. + RecoveryContainerID *string + + // The recovery extended location. + RecoveryExtendedLocation *ExtendedLocation + + // The recovery proximity placement group Id. + RecoveryProximityPlacementGroupID *string + + // The recovery resource group Id. Valid for V2 scenarios. + RecoveryResourceGroupID *string + + // The recovery subnet name. + RecoverySubnetName *string + + // The virtual machine scale set Id. + RecoveryVirtualMachineScaleSetID *string + + // The list of vm disk details. + VMDisks []*A2AVMDiskInputDetails + + // The list of vm managed disk details. + VMManagedDisks []*A2AVMManagedDiskInputDetails +} + +// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for +// type A2AEnableProtectionInput. +func (a *A2AEnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { + return &EnableProtectionProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2AEventDetails - Model class for event details of a A2A event. +type A2AEventDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The fabric location. + FabricLocation *string + + // Fabric arm name. + FabricName *string + + // The azure vm arm id. + FabricObjectID *string + + // The protected item arm name. + ProtectedItemName *string + + // Remote fabric location. + RemoteFabricLocation *string + + // Remote fabric arm name. + RemoteFabricName *string +} + +// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type A2AEventDetails. +func (a *A2AEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { + return &EventProviderSpecificDetails{ + InstanceType: a.InstanceType, + } +} + +// A2AExtendedLocationDetails - ExtendedLocation details data. +type A2AExtendedLocationDetails struct { + // The primary ExtendedLocation. + PrimaryExtendedLocation *ExtendedLocation + + // The recovery ExtendedLocation. + RecoveryExtendedLocation *ExtendedLocation +} + +// A2AFabricSpecificLocationDetails - ExtendedLocation details data. +type A2AFabricSpecificLocationDetails struct { + // The initial primary ExtendedLocation. + InitialPrimaryExtendedLocation *ExtendedLocation + + // Initial primary fabric location info. + InitialPrimaryFabricLocation *string + + // The initial source zone info. + InitialPrimaryZone *string + + // The initial recovery ExtendedLocation. + InitialRecoveryExtendedLocation *ExtendedLocation + + // The initial recovery fabric location info. + InitialRecoveryFabricLocation *string + + // The initial target zone info. + InitialRecoveryZone *string + + // The primary ExtendedLocation. + PrimaryExtendedLocation *ExtendedLocation + + // Primary fabric location info. + PrimaryFabricLocation *string + + // Source zone info. + PrimaryZone *string + + // The recovery ExtendedLocation. + RecoveryExtendedLocation *ExtendedLocation + + // The recovery fabric location info. + RecoveryFabricLocation *string + + // The target zone info. + RecoveryZone *string +} + +// A2APolicyCreationInput - A2A Policy creation input. +type A2APolicyCreationInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. + MultiVMSyncStatus *SetMultiVMSyncStatus + + // The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency (in minutes). + CrashConsistentFrequencyInMinutes *int32 + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 +} + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type A2APolicyCreationInput. +func (a *A2APolicyCreationInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return &PolicyProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2APolicyDetails - A2A specific policy details. +type A2APolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency in minutes. + CrashConsistentFrequencyInMinutes *int32 + + // A value indicating whether multi-VM sync has to be enabled. + MultiVMSyncStatus *string + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 + + // The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type A2APolicyDetails. +func (a *A2APolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: a.InstanceType, + } +} + +// A2AProtectedDiskDetails - A2A protected disk details. +type A2AProtectedDiskDetails struct { + // The disk level operations list. + AllowedDiskLevelOperation []*string + + // The data pending at source virtual machine in MB. + DataPendingAtSourceAgentInMB *float64 + + // The data pending for replication in MB at staging account. + DataPendingInStagingStorageAccountInMB *float64 + + // The KeyVault resource id for secret (BEK). + DekKeyVaultArmID *string + + // The disk capacity in bytes. + DiskCapacityInBytes *int64 + + // The disk name. + DiskName *string + + // The disk state. + DiskState *string + + // The type of disk. + DiskType *string + + // The disk uri. + DiskURI *string + + // The failover name for the managed disk. + FailoverDiskName *string + + // A value indicating whether vm has encrypted os disk or not. + IsDiskEncrypted *bool + + // A value indicating whether disk key got encrypted or not. + IsDiskKeyEncrypted *bool + + // The KeyVault resource id for key (KEK). + KekKeyVaultArmID *string + + // The key URL / identifier (KEK). + KeyIdentifier *string + + // The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + MonitoringJobType *string + + // The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + MonitoringPercentageCompletion *int32 + + // The primary disk storage account. + PrimaryDiskAzureStorageAccountID *string + + // The primary staging storage account. + PrimaryStagingAzureStorageAccountID *string + + // The recovery disk storage account. + RecoveryAzureStorageAccountID *string + + // Recovery disk uri. + RecoveryDiskURI *string + + // A value indicating whether resync is required for this disk. + ResyncRequired *bool + + // The secret URL / identifier (BEK). + SecretIdentifier *string + + // The test failover name for the managed disk. + TfoDiskName *string +} + +// A2AProtectedItemDetail - A2A specific switch cluster protection input. +type A2AProtectedItemDetail struct { + // The recovery disk encryption information. + DiskEncryptionInfo *DiskEncryptionInfo + + // The recovery availability set. + RecoveryAvailabilitySetID *string + + // The recovery availability zone. + RecoveryAvailabilityZone *string + + // The boot diagnostic storage account. + RecoveryBootDiagStorageAccountID *string + + // The recovery capacity reservation group Id. + RecoveryCapacityReservationGroupID *string + + // The recovery proximity placement group Id. + RecoveryProximityPlacementGroupID *string + + // The recovery resource group Id. + RecoveryResourceGroupID *string + + // The virtual machine scale set id. + RecoveryVirtualMachineScaleSetID *string + + // The Replication Protected item name. + ReplicationProtectedItemName *string + + // The list of vm managed disk details. + VMManagedDisks []*A2AVMManagedDiskInputDetails +} + +// A2AProtectedManagedDiskDetails - A2A protected managed disk details. +type A2AProtectedManagedDiskDetails struct { + // The disk level operations list. + AllowedDiskLevelOperation []*string + + // The data pending at source virtual machine in MB. + DataPendingAtSourceAgentInMB *float64 + + // The data pending for replication in MB at staging account. + DataPendingInStagingStorageAccountInMB *float64 + + // The KeyVault resource id for secret (BEK). + DekKeyVaultArmID *string + + // The disk capacity in bytes. + DiskCapacityInBytes *int64 + + // The managed disk Arm id. + DiskID *string + + // The disk name. + DiskName *string + + // The disk state. + DiskState *string + + // The type of disk. + DiskType *string + + // The failover name for the managed disk. + FailoverDiskName *string + + // A value indicating whether vm has encrypted os disk or not. + IsDiskEncrypted *bool + + // A value indicating whether disk key got encrypted or not. + IsDiskKeyEncrypted *bool + + // The KeyVault resource id for key (KEK). + KekKeyVaultArmID *string + + // The key URL / identifier (KEK). + KeyIdentifier *string + + // The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + MonitoringJobType *string + + // The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + MonitoringPercentageCompletion *int32 + + // The primary disk encryption set Id. + PrimaryDiskEncryptionSetID *string + + // The primary staging storage account. + PrimaryStagingAzureStorageAccountID *string + + // The recovery disk encryption set Id. + RecoveryDiskEncryptionSetID *string + + // Recovery original target disk Arm Id. + RecoveryOrignalTargetDiskID *string + + // The replica disk type. Its an optional value and will be same as source disk type if not user provided. + RecoveryReplicaDiskAccountType *string + + // Recovery replica disk Arm Id. + RecoveryReplicaDiskID *string + + // The recovery disk resource group Arm Id. + RecoveryResourceGroupID *string + + // The target disk type after failover. Its an optional value and will be same as source disk type if not user provided. + RecoveryTargetDiskAccountType *string + + // Recovery target disk Arm Id. + RecoveryTargetDiskID *string + + // A value indicating whether resync is required for this disk. + ResyncRequired *bool + + // The secret URL / identifier (BEK). + SecretIdentifier *string + + // The test failover name for the managed disk. + TfoDiskName *string +} + +// A2AProtectionContainerMappingDetails - A2A provider specific settings. +type A2AProtectionContainerMappingDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // A value indicating whether the auto update is enabled. + AgentAutoUpdateStatus *AgentAutoUpdateStatus + + // The automation account arm id. + AutomationAccountArmID *string + + // A value indicating the type authentication to use for automation Account. + AutomationAccountAuthenticationType *AutomationAccountAuthenticationType + + // The job schedule arm name. + JobScheduleName *string + + // The schedule arm name. + ScheduleName *string +} + +// GetProtectionContainerMappingProviderSpecificDetails implements the ProtectionContainerMappingProviderSpecificDetailsClassification +// interface for type A2AProtectionContainerMappingDetails. +func (a *A2AProtectionContainerMappingDetails) GetProtectionContainerMappingProviderSpecificDetails() *ProtectionContainerMappingProviderSpecificDetails { + return &ProtectionContainerMappingProviderSpecificDetails{ + InstanceType: a.InstanceType, + } +} + +// A2AProtectionIntentDiskInputDetails - Azure VM unmanaged disk input details. +type A2AProtectionIntentDiskInputDetails struct { + // REQUIRED; The disk Uri. + DiskURI *string + + // The primary staging storage account input. + PrimaryStagingStorageAccountCustomInput StorageAccountCustomDetailsClassification + + // The recovery VHD storage account input. + RecoveryAzureStorageAccountCustomInput StorageAccountCustomDetailsClassification +} + +// A2AProtectionIntentManagedDiskInputDetails - Azure VM managed disk input details. +type A2AProtectionIntentManagedDiskInputDetails struct { + // REQUIRED; The disk Id. + DiskID *string + + // The recovery disk encryption information (for one / single pass flows). + DiskEncryptionInfo *DiskEncryptionInfo + + // The primary staging storage account input. + PrimaryStagingStorageAccountCustomInput StorageAccountCustomDetailsClassification + + // The recovery disk encryption set Id. + RecoveryDiskEncryptionSetID *string + + // The replica disk type. Its an optional value and will be same as source disk type if not user provided. + RecoveryReplicaDiskAccountType *string + + // The recovery resource group input. + RecoveryResourceGroupCustomInput RecoveryResourceGroupCustomDetailsClassification + + // The target disk type after failover. Its an optional value and will be same as source disk type if not user provided. + RecoveryTargetDiskAccountType *string +} + +// A2ARecoveryPointDetails - A2A provider specific recovery point details. +type A2ARecoveryPointDetails struct { + // REQUIRED; Gets the provider type. + InstanceType *string + + // List of disk ids representing a recovery point. + Disks []*string + + // A value indicating whether the recovery point is multi VM consistent. + RecoveryPointSyncType *RecoveryPointSyncType +} + +// GetProviderSpecificRecoveryPointDetails implements the ProviderSpecificRecoveryPointDetailsClassification interface for +// type A2ARecoveryPointDetails. +func (a *A2ARecoveryPointDetails) GetProviderSpecificRecoveryPointDetails() *ProviderSpecificRecoveryPointDetails { + return &ProviderSpecificRecoveryPointDetails{ + InstanceType: a.InstanceType, + } +} + +// A2ARemoveDisksInput - A2A remove disk(s) input. +type A2ARemoveDisksInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The list of vm disk vhd URIs. + VMDisksUris []*string + + // The list of vm managed disk Ids. + VMManagedDisksIDs []*string +} + +// GetRemoveDisksProviderSpecificInput implements the RemoveDisksProviderSpecificInputClassification interface for type A2ARemoveDisksInput. +func (a *A2ARemoveDisksInput) GetRemoveDisksProviderSpecificInput() *RemoveDisksProviderSpecificInput { + return &RemoveDisksProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2AReplicationDetails - A2A provider specific settings. +type A2AReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // Agent expiry date. + AgentExpiryDate *time.Time + + // The agent version. + AgentVersion *string + + // A value indicating whether the auto protection is enabled. + AutoProtectionOfDataDisk *AutoProtectionOfDataDisk + + // The fabric specific object Id of the virtual machine. + FabricObjectID *string + + // The initial primary extended location. + InitialPrimaryExtendedLocation *ExtendedLocation + + // The initial recovery extended location. + InitialRecoveryExtendedLocation *ExtendedLocation + + // A value indicating if the cluster infra is ready or not. + IsClusterInfraReady *bool + + // A value indicating whether agent certificate update is required. + IsReplicationAgentCertificateUpdateRequired *bool + + // A value indicating whether replication agent update is required. + IsReplicationAgentUpdateRequired *bool + + // The last heartbeat received from the source server. + LastHeartbeat *time.Time + + // The time (in UTC) when the last RPO value was calculated by Protection Service. + LastRpoCalculatedTime *time.Time + + // An id associated with the PE that survives actions like switch protection which change the backing PE/CPE objects internally.The + // lifecycle id gets carried forward to have a link/continuity in being + // able to have an Id that denotes the "same" protected item even though other internal Ids/ARM Id might be changing. + LifecycleID *string + + // The management Id. + ManagementID *string + + // The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + MonitoringJobType *string + + // The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + MonitoringPercentageCompletion *int32 + + // Whether Multi VM group is auto created or specified by user. + MultiVMGroupCreateOption *MultiVMGroupCreateOption + + // The multi vm group Id. + MultiVMGroupID *string + + // The multi vm group name. + MultiVMGroupName *string + + // The type of operating system. + OSType *string + + // The primary availability zone. + PrimaryAvailabilityZone *string + + // The primary Extended Location. + PrimaryExtendedLocation *ExtendedLocation + + // Primary fabric location. + PrimaryFabricLocation *string + + // The list of protected disks. + ProtectedDisks []*A2AProtectedDiskDetails + + // The list of protected managed disks. + ProtectedManagedDisks []*A2AProtectedManagedDiskDetails + + // The replication protection cluster Id. + ProtectionClusterID *string + + // The recovery availability set. + RecoveryAvailabilitySet *string + + // The recovery availability zone. + RecoveryAvailabilityZone *string + + // The recovery resource group. + RecoveryAzureResourceGroupID *string + + // The name of recovery virtual machine. + RecoveryAzureVMName *string + + // The size of recovery virtual machine. + RecoveryAzureVMSize *string + + // The recovery boot diagnostic storage account Arm Id. + RecoveryBootDiagStorageAccountID *string + + // The recovery capacity reservation group Id. + RecoveryCapacityReservationGroupID *string + + // The recovery cloud service. + RecoveryCloudService *string + + // The recovery Extended Location. + RecoveryExtendedLocation *ExtendedLocation + + // The recovery fabric location. + RecoveryFabricLocation *string + + // The recovery fabric object Id. + RecoveryFabricObjectID *string + + // The recovery proximity placement group Id. + RecoveryProximityPlacementGroupID *string + + // The recovery virtual machine scale set id. + RecoveryVirtualMachineScaleSetID *string + + // The last RPO value in seconds. + RpoInSeconds *int64 + + // The recovery virtual network. + SelectedRecoveryAzureNetworkID *string + + // The test failover virtual network. + SelectedTfoAzureNetworkID *string + + // The test failover fabric object Id. + TestFailoverRecoveryFabricObjectID *string + + // The test failover vm name. + TfoAzureVMName *string + + // The list of unprotected disks. + UnprotectedDisks []*A2AUnprotectedDiskDetails + + // The virtual machine nic details. + VMNics []*VMNicDetails + + // The protection state for the vm. + VMProtectionState *string + + // The protection state description for the vm. + VMProtectionStateDescription *string + + // The synced configuration details. + VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails + + // READ-ONLY; Agent certificate expiry date. + AgentCertificateExpiryDate *time.Time + + // READ-ONLY; A value indicating the churn option selected by user. + ChurnOptionSelected *ChurnOptionSelected + + // READ-ONLY; The initial primary fabric location. + InitialPrimaryFabricLocation *string + + // READ-ONLY; The initial primary availability zone. + InitialPrimaryZone *string + + // READ-ONLY; The initial recovery fabric location. + InitialRecoveryFabricLocation *string + + // READ-ONLY; The initial recovery availability zone. + InitialRecoveryZone *string + + // READ-ONLY; The recovery azure generation. + RecoveryAzureGeneration *string + + // READ-ONLY; The encryption type of the VM. + VMEncryptionType *VMEncryptionType +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// A2AReplicationDetails. +func (a *A2AReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return &ReplicationProviderSpecificSettings{ + InstanceType: a.InstanceType, + } +} + +// A2AReplicationIntentDetails - A2A provider specific settings. +type A2AReplicationIntentDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // REQUIRED; The recovery availability type of the virtual machine. + RecoveryAvailabilityType *string + + // A value indicating whether the auto update is enabled. + AgentAutoUpdateStatus *AgentAutoUpdateStatus + + // A value indicating whether the auto protection is enabled. + AutoProtectionOfDataDisk *AutoProtectionOfDataDisk + + // The automation account arm id. + AutomationAccountArmID *string + + // A value indicating the type authentication to use for automation Account. + AutomationAccountAuthenticationType *AutomationAccountAuthenticationType + + // The recovery disk encryption information (for two pass flows). + DiskEncryptionInfo *DiskEncryptionInfo + + // The fabric specific object Id of the virtual machine. + FabricObjectID *string + + // The multi vm group id. + MultiVMGroupID *string + + // The multi vm group name. + MultiVMGroupName *string + + // The primary location for the virtual machine. + PrimaryLocation *string + + // The primary staging storage account details. + PrimaryStagingStorageAccount StorageAccountCustomDetailsClassification + + // The protection profile custom details. + ProtectionProfile ProtectionProfileCustomDetailsClassification + + // The recovery availability set details. + RecoveryAvailabilitySet RecoveryAvailabilitySetCustomDetailsClassification + + // The recovery availability zone. + RecoveryAvailabilityZone *string + + // The boot diagnostic storage account. + RecoveryBootDiagStorageAccount StorageAccountCustomDetailsClassification + + // The recovery location for the virtual machine. + RecoveryLocation *string + + // The recovery proximity placement group custom details. + RecoveryProximityPlacementGroup RecoveryProximityPlacementGroupCustomDetailsClassification + + // The recovery resource group id. + RecoveryResourceGroupID *string + + // The recovery subscription Id of the virtual machine. + RecoverySubscriptionID *string + + // The recovery virtual network details. + RecoveryVirtualNetwork RecoveryVirtualNetworkCustomDetailsClassification + + // The list of vm disk details. + VMDisks []*A2AProtectionIntentDiskInputDetails + + // The list of vm managed disk details. + VMManagedDisks []*A2AProtectionIntentManagedDiskInputDetails +} + +// GetReplicationProtectionIntentProviderSpecificSettings implements the ReplicationProtectionIntentProviderSpecificSettingsClassification +// interface for type A2AReplicationIntentDetails. +func (a *A2AReplicationIntentDetails) GetReplicationProtectionIntentProviderSpecificSettings() *ReplicationProtectionIntentProviderSpecificSettings { + return &ReplicationProtectionIntentProviderSpecificSettings{ + InstanceType: a.InstanceType, + } +} + +// A2AReplicationProtectionClusterDetails - A2A provider specific settings. +type A2AReplicationProtectionClusterDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The cluster management Id. + ClusterManagementID *string + + // The recovery point Id to which the cluster was failed over. + FailoverRecoveryPointID *string + + // The initial primary extended location. + InitialPrimaryExtendedLocation *ExtendedLocation + + // The initial primary fabric location. + InitialPrimaryFabricLocation *string + + // The initial primary availability zone. + InitialPrimaryZone *string + + // The initial recovery extended location. + InitialRecoveryExtendedLocation *ExtendedLocation + + // The initial recovery fabric location. + InitialRecoveryFabricLocation *string + + // The initial recovery availability zone. + InitialRecoveryZone *string + + // The time (in UTC) when the last RPO value was calculated by Protection Service. + LastRpoCalculatedTime *time.Time + + // An id that survives actions like switch protection which change the backing PE/CPE objects internally.The lifecycle id + // gets carried forward to have a link/continuity in being able to have an Id that + // denotes the "same" protected cluster even though other internal Ids/ARM Id might be changing. + LifecycleID *string + + // Whether Multi VM group is auto created or specified by user. + MultiVMGroupCreateOption *MultiVMGroupCreateOption + + // The multi vm group Id. + MultiVMGroupID *string + + // The multi vm group name. + MultiVMGroupName *string + + // The primary availability zone. + PrimaryAvailabilityZone *string + + // The primary Extended Location. + PrimaryExtendedLocation *ExtendedLocation + + // Primary fabric location. + PrimaryFabricLocation *string + + // The recovery availability zone. + RecoveryAvailabilityZone *string + + // The recovery Extended Location. + RecoveryExtendedLocation *ExtendedLocation + + // The recovery fabric location. + RecoveryFabricLocation *string + + // The last RPO value in seconds. + RpoInSeconds *int64 +} + +// GetReplicationClusterProviderSpecificSettings implements the ReplicationClusterProviderSpecificSettingsClassification interface +// for type A2AReplicationProtectionClusterDetails. +func (a *A2AReplicationProtectionClusterDetails) GetReplicationClusterProviderSpecificSettings() *ReplicationClusterProviderSpecificSettings { + return &ReplicationClusterProviderSpecificSettings{ + InstanceType: a.InstanceType, + } +} + +// A2AReprotectInput - Azure specific reprotect input. +type A2AReprotectInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The Policy Id. + PolicyID *string + + // The recovery availability set. + RecoveryAvailabilitySetID *string + + // The recovery cloud service Id. Valid for V1 scenarios. + RecoveryCloudServiceID *string + + // The recovery container Id. + RecoveryContainerID *string + + // The recovery resource group Id. Valid for V2 scenarios. + RecoveryResourceGroupID *string + + // The list of vm disk details. + VMDisks []*A2AVMDiskInputDetails +} + +// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface +// for type A2AReprotectInput. +func (a *A2AReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { + return &ReverseReplicationProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2ASharedDiskIRErrorDetails - Extended location of the resource. +type A2ASharedDiskIRErrorDetails struct { + // READ-ONLY; The error code. + ErrorCode *string + + // READ-ONLY; The error code enum. + ErrorCodeEnum *string + + // READ-ONLY; The error message. + ErrorMessage *string + + // READ-ONLY; The possible causes. + PossibleCauses *string + + // READ-ONLY; The recommended action. + RecommendedAction *string +} + +// A2ASharedDiskReplicationDetails - A2A provider specific settings. +type A2ASharedDiskReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The recovery point id to which the Virtual node was failed over. + FailoverRecoveryPointID *string + + // The time (in UTC) when the last RPO value was calculated by Protection Service. + LastRpoCalculatedTime *time.Time + + // The management Id. + ManagementID *string + + // The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + MonitoringJobType *string + + // The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + MonitoringPercentageCompletion *int32 + + // Primary fabric location. + PrimaryFabricLocation *string + + // The list of protected managed disks. + ProtectedManagedDisks []*A2AProtectedManagedDiskDetails + + // The recovery fabric location. + RecoveryFabricLocation *string + + // The last RPO value in seconds. + RpoInSeconds *int64 + + // The IR Errors. + SharedDiskIRErrors []*A2ASharedDiskIRErrorDetails + + // The list of unprotected disks. + UnprotectedDisks []*A2AUnprotectedDiskDetails +} + +// GetSharedDiskReplicationProviderSpecificSettings implements the SharedDiskReplicationProviderSpecificSettingsClassification +// interface for type A2ASharedDiskReplicationDetails. +func (a *A2ASharedDiskReplicationDetails) GetSharedDiskReplicationProviderSpecificSettings() *SharedDiskReplicationProviderSpecificSettings { + return &SharedDiskReplicationProviderSpecificSettings{ + InstanceType: a.InstanceType, + } +} + +// A2ASwitchClusterProtectionInput - A2A specific switch cluster protection input. +type A2ASwitchClusterProtectionInput struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The Policy Id. + PolicyID *string + ProtectedItemsDetail []*A2AProtectedItemDetail + + // The recovery container Id. + RecoveryContainerID *string +} + +// GetSwitchClusterProtectionProviderSpecificInput implements the SwitchClusterProtectionProviderSpecificInputClassification +// interface for type A2ASwitchClusterProtectionInput. +func (a *A2ASwitchClusterProtectionInput) GetSwitchClusterProtectionProviderSpecificInput() *SwitchClusterProtectionProviderSpecificInput { + return &SwitchClusterProtectionProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2ASwitchProtectionInput - A2A specific switch protection input. +type A2ASwitchProtectionInput struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The recovery disk encryption information. + DiskEncryptionInfo *DiskEncryptionInfo + + // The Policy Id. + PolicyID *string + + // The recovery availability set. + RecoveryAvailabilitySetID *string + + // The recovery availability zone. + RecoveryAvailabilityZone *string + + // The boot diagnostic storage account. + RecoveryBootDiagStorageAccountID *string + + // The recovery capacity reservation group Id. + RecoveryCapacityReservationGroupID *string + + // The recovery cloud service Id. Valid for V1 scenarios. + RecoveryCloudServiceID *string + + // The recovery container Id. + RecoveryContainerID *string + + // The recovery proximity placement group Id. + RecoveryProximityPlacementGroupID *string + + // The recovery resource group Id. Valid for V2 scenarios. + RecoveryResourceGroupID *string + + // The virtual machine scale set id. + RecoveryVirtualMachineScaleSetID *string + + // The list of vm disk details. + VMDisks []*A2AVMDiskInputDetails + + // The list of vm managed disk details. + VMManagedDisks []*A2AVMManagedDiskInputDetails +} + +// GetSwitchProtectionProviderSpecificInput implements the SwitchProtectionProviderSpecificInputClassification interface for +// type A2ASwitchProtectionInput. +func (a *A2ASwitchProtectionInput) GetSwitchProtectionProviderSpecificInput() *SwitchProtectionProviderSpecificInput { + return &SwitchProtectionProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2ATestFailoverInput - A2A provider specific input for test failover. +type A2ATestFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating whether to use recovery cloud service for TFO or not. + CloudServiceCreationOption *string + + // The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null + // should be passed. + RecoveryPointID *string +} + +// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type +// A2ATestFailoverInput. +func (a *A2ATestFailoverInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { + return &TestFailoverProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2AUnplannedFailoverInput - A2A provider specific input for unplanned failover. +type A2AUnplannedFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating whether to use recovery cloud service for failover or not. + CloudServiceCreationOption *string + + // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should + // be passed. + RecoveryPointID *string +} + +// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface +// for type A2AUnplannedFailoverInput. +func (a *A2AUnplannedFailoverInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { + return &UnplannedFailoverProviderSpecificInput{ + InstanceType: a.InstanceType, + } +} + +// A2AUnprotectedDiskDetails - A2A unprotected disk details. +type A2AUnprotectedDiskDetails struct { + // A value indicating whether the disk auto protection is enabled. + DiskAutoProtectionStatus *AutoProtectionOfDataDisk + + // The source lun Id for the data disk. + DiskLunID *int32 +} + +// A2AUpdateContainerMappingInput - A2A update protection container mapping. +type A2AUpdateContainerMappingInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating whether the auto update is enabled. + AgentAutoUpdateStatus *AgentAutoUpdateStatus + + // The automation account arm id. + AutomationAccountArmID *string + + // A value indicating the type authentication to use for automation Account. + AutomationAccountAuthenticationType *AutomationAccountAuthenticationType +} + +// GetReplicationProviderSpecificUpdateContainerMappingInput implements the ReplicationProviderSpecificUpdateContainerMappingInputClassification +// interface for type A2AUpdateContainerMappingInput. +func (a *A2AUpdateContainerMappingInput) GetReplicationProviderSpecificUpdateContainerMappingInput() *ReplicationProviderSpecificUpdateContainerMappingInput { + return &ReplicationProviderSpecificUpdateContainerMappingInput{ + InstanceType: a.InstanceType, + } +} + +// A2AUpdateReplicationProtectedItemInput - InMage Azure V2 input to update replication protected item. +type A2AUpdateReplicationProtectedItemInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The recovery os disk encryption information. + DiskEncryptionInfo *DiskEncryptionInfo + + // Managed disk update details. + ManagedDiskUpdateDetails []*A2AVMManagedDiskUpdateDetails + + // The boot diagnostic storage account. + RecoveryBootDiagStorageAccountID *string + + // The recovery capacity reservation group Id. + RecoveryCapacityReservationGroupID *string + + // The target cloud service ARM Id (for V1). + RecoveryCloudServiceID *string + + // The recovery proximity placement group Id. + RecoveryProximityPlacementGroupID *string + + // The target resource group ARM Id (for V2). + RecoveryResourceGroupID *string + + // The recovery virtual machine scale set Id. + RecoveryVirtualMachineScaleSetID *string + + // The user given name for Test Failover VM. + TfoAzureVMName *string +} + +// GetUpdateReplicationProtectedItemProviderInput implements the UpdateReplicationProtectedItemProviderInputClassification +// interface for type A2AUpdateReplicationProtectedItemInput. +func (a *A2AUpdateReplicationProtectedItemInput) GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput { + return &UpdateReplicationProtectedItemProviderInput{ + InstanceType: a.InstanceType, + } +} + +// A2AVMDiskInputDetails - A2A disk input details. +type A2AVMDiskInputDetails struct { + // REQUIRED; The disk Uri. + DiskURI *string + + // REQUIRED; The primary staging storage account Id. + PrimaryStagingAzureStorageAccountID *string + + // REQUIRED; The recovery VHD storage account Id. + RecoveryAzureStorageAccountID *string +} + +// A2AVMManagedDiskInputDetails - A2A managed disk input details. +type A2AVMManagedDiskInputDetails struct { + // REQUIRED; The disk Id. + DiskID *string + + // REQUIRED; The primary staging storage account Arm Id. + PrimaryStagingAzureStorageAccountID *string + + // REQUIRED; The target resource group Arm Id. + RecoveryResourceGroupID *string + + // The recovery disk encryption information (for one / single pass flows). + DiskEncryptionInfo *DiskEncryptionInfo + + // The recovery disk encryption set Id. + RecoveryDiskEncryptionSetID *string + + // The replica disk type. Its an optional value and will be same as source disk type if not user provided. + RecoveryReplicaDiskAccountType *string + + // The target disk type after failover. Its an optional value and will be same as source disk type if not user provided. + RecoveryTargetDiskAccountType *string +} + +// A2AVMManagedDiskUpdateDetails - A2A Vm managed disk update details. +type A2AVMManagedDiskUpdateDetails struct { + // The recovery os disk encryption information. + DiskEncryptionInfo *DiskEncryptionInfo + + // The disk Id. + DiskID *string + + // The target disk name for unplanned failover operation. + FailoverDiskName *string + + // The replica disk type before failover. + RecoveryReplicaDiskAccountType *string + + // The target disk type before failover. + RecoveryTargetDiskAccountType *string + + // The target disk name for test failover operation. + TfoDiskName *string +} + +// A2AZoneDetails - Zone details data. +type A2AZoneDetails struct { + // Source zone info. + Source *string + + // The target zone info. + Target *string +} + +// ASRTask - Task of the Job. +type ASRTask struct { + // The state/actions applicable on this task. + AllowedActions []*string + + // The custom task details based on the task type. + CustomDetails TaskTypeDetailsClassification + + // The end time. + EndTime *time.Time + + // The task error details. + Errors []*JobErrorDetails + + // The name. + FriendlyName *string + + // The custom task details based on the task type, if the task type is GroupTaskDetails or one of the types derived from it. + GroupTaskCustomDetails GroupTaskDetailsClassification + + // The unique Task name. + Name *string + + // The start time. + StartTime *time.Time + + // The State. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + State *string + + // The description of the task state. For example - For Succeeded state, description can be Completed, PartiallySucceeded, + // CompletedWithInformation or Skipped. + StateDescription *string + + // The Id. + TaskID *string + + // The type of task. Details in CustomDetails property depend on this type. + TaskType *string +} + +// AddDisksInput - Input for add disk(s) operation. +type AddDisksInput struct { + // Add disks input properties. + Properties *AddDisksInputProperties +} + +// AddDisksInputProperties - Add Disks input properties. +type AddDisksInputProperties struct { + // REQUIRED; The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. + // For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure + // provider, it can be null. + ProviderSpecificDetails AddDisksProviderSpecificInputClassification +} + +// AddDisksProviderSpecificInput - Add Disks provider specific input. +type AddDisksProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetAddDisksProviderSpecificInput implements the AddDisksProviderSpecificInputClassification interface for type AddDisksProviderSpecificInput. +func (a *AddDisksProviderSpecificInput) GetAddDisksProviderSpecificInput() *AddDisksProviderSpecificInput { + return a +} + +// AddRecoveryServicesProviderInput - Input required to add a provider. +type AddRecoveryServicesProviderInput struct { + // REQUIRED; The properties of an add provider request. + Properties *AddRecoveryServicesProviderInputProperties +} + +// AddRecoveryServicesProviderInputProperties - The properties of an add provider request. +type AddRecoveryServicesProviderInputProperties struct { + // REQUIRED; The identity provider input for DRA authentication. + AuthenticationIdentityInput *IdentityProviderInput + + // REQUIRED; The name of the machine where the provider is getting added. + MachineName *string + + // REQUIRED; The identity provider input for resource access. + ResourceAccessIdentityInput *IdentityProviderInput + + // The Bios Id of the machine. + BiosID *string + + // The identity provider input for data plane authentication. + DataPlaneAuthenticationIdentityInput *IdentityProviderInput + + // The Id of the machine where the provider is getting added. + MachineID *string +} + +// AddVCenterRequest - Input required to add vCenter. +type AddVCenterRequest struct { + // The properties of an add vCenter request. + Properties *AddVCenterRequestProperties +} + +// AddVCenterRequestProperties - The properties of an add vCenter request. +type AddVCenterRequestProperties struct { + // The friendly name of the vCenter. + FriendlyName *string + + // The IP address of the vCenter to be discovered. + IPAddress *string + + // The port number for discovery. + Port *string + + // The process server Id from where the discovery is orchestrated. + ProcessServerID *string + + // The account Id which has privileges to discover the vCenter. + RunAsAccountID *string +} + +// AgentDetails - Agent details. +type AgentDetails struct { + // READ-ONLY; The Id of the agent running on the server. + AgentID *string + + // READ-ONLY; The machine BIOS Id. + BiosID *string + + // READ-ONLY; The disks. + Disks []*AgentDiskDetails + + // READ-ONLY; The machine FQDN. + Fqdn *string + + // READ-ONLY; The Id of the machine to which the agent is registered. + MachineID *string +} + +// AgentDiskDetails - Agent disk details. +type AgentDiskDetails struct { + // READ-ONLY; The disk capacity in bytes. + CapacityInBytes *int64 + + // READ-ONLY; The disk Id. + DiskID *string + + // READ-ONLY; The disk name. + DiskName *string + + // READ-ONLY; A value indicating whether the disk is the OS disk. + IsOSDisk *string + + // READ-ONLY; The lun of disk. + LunID *int32 +} + +// Alert - Implements the Alert class. +type Alert struct { + // Resource Location + Location *string + + // Alert related data. + Properties *AlertProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// AlertCollection - Collection of alerts. +type AlertCollection struct { + // The value of next link. + NextLink *string + + // The list of alerts. + Value []*Alert +} + +// AlertProperties - The properties of an alert. +type AlertProperties struct { + // The custom email address for sending emails. + CustomEmailAddresses []*string + + // The locale for the email notification. + Locale *string + + // A value indicating whether to send email to subscription administrator. + SendToOwners *string +} + +// ApplianceCollection - Collection of appliance details. +type ApplianceCollection struct { + // The value of next link. + NextLink *string + + // The appliance details. + Value []*ReplicationAppliance +} + +// ApplianceMonitoringDetails - Appliance details of the migration item. +type ApplianceMonitoringDetails struct { + // READ-ONLY; The appliance CPU details. + CPUDetails *ApplianceResourceDetails + + // READ-ONLY; The appliance datastore snapshot details. + DatastoreSnapshot []*DataStoreUtilizationDetails + + // READ-ONLY; The disk replication details. + DisksReplicationDetails *ApplianceResourceDetails + + // READ-ONLY; The ESXi NFC buffer details. + EsxiNfcBuffer *ApplianceResourceDetails + + // READ-ONLY; The appliance network bandwidth details. + NetworkBandwidth *ApplianceResourceDetails + + // READ-ONLY; The appliance RAM details. + RAMDetails *ApplianceResourceDetails +} + +// ApplianceQueryParameter - Query parameter to get appliance. +type ApplianceQueryParameter struct { + // The providerType to be used for fetching appliance details. + ProviderType *string +} + +// ApplianceResourceDetails - Details of the appliance resource. +type ApplianceResourceDetails struct { + // READ-ONLY; A value indicating the total capacity of appliance resource. + Capacity *int64 + + // READ-ONLY; A value indicating the utilization percentage by gateway agent on appliance. + ProcessUtilization *float64 + + // READ-ONLY; A value indicating the status of appliance resource. + Status *string + + // READ-ONLY; A value indicating the total utilization percentage for all processes on the appliance. + TotalUtilization *float64 +} + +// ApplianceSpecificDetails - Appliance specific details. +type ApplianceSpecificDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string +} + +// GetApplianceSpecificDetails implements the ApplianceSpecificDetailsClassification interface for type ApplianceSpecificDetails. +func (a *ApplianceSpecificDetails) GetApplianceSpecificDetails() *ApplianceSpecificDetails { return a } + +// ApplyClusterRecoveryPointInput - Input definition for apply cluster recovery point. +type ApplyClusterRecoveryPointInput struct { + // REQUIRED; The properties to apply cluster recovery point input. + Properties *ApplyClusterRecoveryPointInputProperties +} + +// ApplyClusterRecoveryPointInputProperties - Input definition for apply cluster recovery point properties. +type ApplyClusterRecoveryPointInputProperties struct { + // REQUIRED; The provider specific input for applying cluster recovery point. + ProviderSpecificDetails ApplyClusterRecoveryPointProviderSpecificInputClassification + + // The cluster recovery point id to be passed to failover to a particular recovery point. + ClusterRecoveryPointID *string + + // The list of individual node recovery points. + IndividualNodeRecoveryPoints []*string +} + +// ApplyClusterRecoveryPointProviderSpecificInput - Provider specific input for apply cluster recovery point. +type ApplyClusterRecoveryPointProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetApplyClusterRecoveryPointProviderSpecificInput implements the ApplyClusterRecoveryPointProviderSpecificInputClassification +// interface for type ApplyClusterRecoveryPointProviderSpecificInput. +func (a *ApplyClusterRecoveryPointProviderSpecificInput) GetApplyClusterRecoveryPointProviderSpecificInput() *ApplyClusterRecoveryPointProviderSpecificInput { + return a +} + +// ApplyRecoveryPointInput - Input to apply recovery point. +type ApplyRecoveryPointInput struct { + // REQUIRED; The input properties to apply recovery point. + Properties *ApplyRecoveryPointInputProperties +} + +// ApplyRecoveryPointInputProperties - Input properties to apply recovery point. +type ApplyRecoveryPointInputProperties struct { + // REQUIRED; Provider specific input for applying recovery point. + ProviderSpecificDetails ApplyRecoveryPointProviderSpecificInputClassification + + // The recovery point Id. + RecoveryPointID *string +} + +// ApplyRecoveryPointProviderSpecificInput - Provider specific input for apply recovery point. +type ApplyRecoveryPointProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface +// for type ApplyRecoveryPointProviderSpecificInput. +func (a *ApplyRecoveryPointProviderSpecificInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { + return a +} + +// AsrJobDetails - This class represents job details based on specific job type. +type AsrJobDetails struct { + // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). + InstanceType *string + + // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow + // object details. + AffectedObjectDetails map[string]*string +} + +// GetJobDetails implements the JobDetailsClassification interface for type AsrJobDetails. +func (a *AsrJobDetails) GetJobDetails() *JobDetails { + return &JobDetails{ + AffectedObjectDetails: a.AffectedObjectDetails, + InstanceType: a.InstanceType, + } +} + +// AutomationRunbookTaskDetails - This class represents the task details for an automation runbook. +type AutomationRunbookTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // The automation account name of the runbook. + AccountName *string + + // The cloud service of the automation runbook account. + CloudServiceName *string + + // A value indicating whether it is a primary side script or not. + IsPrimarySideScript *bool + + // The job Id of the runbook execution. + JobID *string + + // The execution output of the runbook. + JobOutput *string + + // The recovery plan task name. + Name *string + + // The runbook Id. + RunbookID *string + + // The runbook name. + RunbookName *string + + // The subscription Id of the automation runbook account. + SubscriptionID *string +} + +// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type AutomationRunbookTaskDetails. +func (a *AutomationRunbookTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { + return &TaskTypeDetails{ + InstanceType: a.InstanceType, + } +} + +// AzureFabricCreationInput - Fabric provider specific settings. +type AzureFabricCreationInput struct { + // REQUIRED; Gets the class type. + InstanceType *string + + // The Location. + Location *string +} + +// GetFabricSpecificCreationInput implements the FabricSpecificCreationInputClassification interface for type AzureFabricCreationInput. +func (a *AzureFabricCreationInput) GetFabricSpecificCreationInput() *FabricSpecificCreationInput { + return &FabricSpecificCreationInput{ + InstanceType: a.InstanceType, + } +} + +// AzureFabricSpecificDetails - Azure Fabric Specific Details. +type AzureFabricSpecificDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The container Ids for the Azure fabric. + ContainerIDs []*string + + // The ExtendedLocations. + ExtendedLocations []*A2AExtendedLocationDetails + + // The Location for the Azure fabric. + Location *string + + // The location details. + LocationDetails []*A2AFabricSpecificLocationDetails + + // The zones. + Zones []*A2AZoneDetails +} + +// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type AzureFabricSpecificDetails. +func (a *AzureFabricSpecificDetails) GetFabricSpecificDetails() *FabricSpecificDetails { + return &FabricSpecificDetails{ + InstanceType: a.InstanceType, + } +} + +// AzureToAzureCreateNetworkMappingInput - Create network mappings input properties/behavior specific to Azure to Azure Network +// mapping. +type AzureToAzureCreateNetworkMappingInput struct { + // REQUIRED; The instance type. + InstanceType *string + + // REQUIRED; The primary azure vnet Id. + PrimaryNetworkID *string +} + +// GetFabricSpecificCreateNetworkMappingInput implements the FabricSpecificCreateNetworkMappingInputClassification interface +// for type AzureToAzureCreateNetworkMappingInput. +func (a *AzureToAzureCreateNetworkMappingInput) GetFabricSpecificCreateNetworkMappingInput() *FabricSpecificCreateNetworkMappingInput { + return &FabricSpecificCreateNetworkMappingInput{ + InstanceType: a.InstanceType, + } +} + +// AzureToAzureNetworkMappingSettings - A2A Network Mapping fabric specific settings. +type AzureToAzureNetworkMappingSettings struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The primary fabric location. + PrimaryFabricLocation *string + + // The recovery fabric location. + RecoveryFabricLocation *string +} + +// GetNetworkMappingFabricSpecificSettings implements the NetworkMappingFabricSpecificSettingsClassification interface for +// type AzureToAzureNetworkMappingSettings. +func (a *AzureToAzureNetworkMappingSettings) GetNetworkMappingFabricSpecificSettings() *NetworkMappingFabricSpecificSettings { + return &NetworkMappingFabricSpecificSettings{ + InstanceType: a.InstanceType, + } +} + +// AzureToAzureUpdateNetworkMappingInput - Updates network mappings input. +type AzureToAzureUpdateNetworkMappingInput struct { + // REQUIRED; The instance type. + InstanceType *string + + // The primary azure vnet Id. + PrimaryNetworkID *string +} + +// GetFabricSpecificUpdateNetworkMappingInput implements the FabricSpecificUpdateNetworkMappingInputClassification interface +// for type AzureToAzureUpdateNetworkMappingInput. +func (a *AzureToAzureUpdateNetworkMappingInput) GetFabricSpecificUpdateNetworkMappingInput() *FabricSpecificUpdateNetworkMappingInput { + return &FabricSpecificUpdateNetworkMappingInput{ + InstanceType: a.InstanceType, + } +} + +// AzureToAzureVMSyncedConfigDetails - Azure to Azure VM synced configuration details. +type AzureToAzureVMSyncedConfigDetails struct { + // The Azure VM input endpoints. + InputEndpoints []*InputEndpoint + + // The Azure VM tags. + Tags map[string]*string +} + +// AzureVMDiskDetails - Disk details for E2A provider. +type AzureVMDiskDetails struct { + // The custom target Azure disk name. + CustomTargetDiskName *string + + // The DiskEncryptionSet ARM ID. + DiskEncryptionSetID *string + + // The disk resource id. + DiskID *string + + // Ordinal\LunId of the disk for the Azure VM. + LunID *string + + // Max side in MB. + MaxSizeMB *string + + // Blob uri of the Azure disk. + TargetDiskLocation *string + + // The target Azure disk name. + TargetDiskName *string + + // The VHD id. + VhdID *string + + // VHD name. + VhdName *string + + // VHD type. + VhdType *string +} + +// ClusterFailoverJobDetails - This class represents the details for a failover job of cluster. +type ClusterFailoverJobDetails struct { + // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). + InstanceType *string + + // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow + // object details. + AffectedObjectDetails map[string]*string + + // The test VM details. + ProtectedItemDetails []*FailoverReplicationProtectedItemDetails +} + +// GetJobDetails implements the JobDetailsClassification interface for type ClusterFailoverJobDetails. +func (c *ClusterFailoverJobDetails) GetJobDetails() *JobDetails { + return &JobDetails{ + AffectedObjectDetails: c.AffectedObjectDetails, + InstanceType: c.InstanceType, + } +} + +// ClusterProviderSpecificRecoveryPointDetails - Replication provider specific cluster recovery point details. +type ClusterProviderSpecificRecoveryPointDetails struct { + // READ-ONLY; Gets the provider type. + InstanceType *string +} + +// GetClusterProviderSpecificRecoveryPointDetails implements the ClusterProviderSpecificRecoveryPointDetailsClassification +// interface for type ClusterProviderSpecificRecoveryPointDetails. +func (c *ClusterProviderSpecificRecoveryPointDetails) GetClusterProviderSpecificRecoveryPointDetails() *ClusterProviderSpecificRecoveryPointDetails { + return c +} + +// ClusterRecoveryPoint - Recovery point. +type ClusterRecoveryPoint struct { + // The recovery point Id. + ID *string + + // The name of the recovery point. + Name *string + + // The recovery point properties. + Properties *ClusterRecoveryPointProperties + + // The resource type. + Type *string +} + +// ClusterRecoveryPointCollection - Collection of cluster recovery point details. +type ClusterRecoveryPointCollection struct { + // The value of next link. + NextLink *string + + // The cluster recovery point details. + Value []*ClusterRecoveryPoint +} + +// ClusterRecoveryPointProperties - Cluster recovery point properties. +type ClusterRecoveryPointProperties struct { + // The provider specific details for the recovery point. + ProviderSpecificDetails ClusterProviderSpecificRecoveryPointDetailsClassification + + // The recovery point time. + RecoveryPointTime *time.Time + + // The recovery point type. + RecoveryPointType *ClusterRecoveryPointType +} + +// ClusterSwitchProtectionJobDetails - This class represents details for switch cluster protection job. +type ClusterSwitchProtectionJobDetails struct { + // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). + InstanceType *string + + // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow + // object details. + AffectedObjectDetails map[string]*string + + // ARM Id of the new replication protection cluster. + NewReplicationProtectionClusterID *string +} + +// GetJobDetails implements the JobDetailsClassification interface for type ClusterSwitchProtectionJobDetails. +func (c *ClusterSwitchProtectionJobDetails) GetJobDetails() *JobDetails { + return &JobDetails{ + AffectedObjectDetails: c.AffectedObjectDetails, + InstanceType: c.InstanceType, + } +} + +// ClusterTestFailoverCleanupInput - Input definition for test failover cleanup for cluster. +type ClusterTestFailoverCleanupInput struct { + // REQUIRED; Test failover cleanup input properties. + Properties *ClusterTestFailoverCleanupInputProperties +} + +// ClusterTestFailoverCleanupInputProperties - Input definition for test failover cleanup input properties. +type ClusterTestFailoverCleanupInputProperties struct { + // Test failover cleanup comments. + Comments *string +} + +// ClusterTestFailoverInput - Input definition for test cluster failover. +type ClusterTestFailoverInput struct { + // REQUIRED; Test failover input properties. + Properties *ClusterTestFailoverInputProperties +} + +// ClusterTestFailoverInputProperties - Input definition for test failover input properties. +type ClusterTestFailoverInputProperties struct { + // Failover direction. + FailoverDirection *FailoverDirection + + // The id of the network to be used for test failover. + NetworkID *string + + // Network type to be used for test failover. + NetworkType *string + + // Provider specific settings. + ProviderSpecificDetails ClusterTestFailoverProviderSpecificInputClassification +} + +// ClusterTestFailoverJobDetails - This class represents the details for a test failover job of cluster. +type ClusterTestFailoverJobDetails struct { + // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). + InstanceType *string + + // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow + // object details. + AffectedObjectDetails map[string]*string + + // The test failover comments. + Comments *string + + // The test network friendly name. + NetworkFriendlyName *string + + // The test network name. + NetworkName *string + + // The test network type (see TestFailoverInput enum for possible values). + NetworkType *string + + // The test VM details. + ProtectedItemDetails []*FailoverReplicationProtectedItemDetails + + // The test failover status. + TestFailoverStatus *string +} + +// GetJobDetails implements the JobDetailsClassification interface for type ClusterTestFailoverJobDetails. +func (c *ClusterTestFailoverJobDetails) GetJobDetails() *JobDetails { + return &JobDetails{ + AffectedObjectDetails: c.AffectedObjectDetails, + InstanceType: c.InstanceType, + } +} + +// ClusterTestFailoverProviderSpecificInput - Provider specific test cluster failover input. +type ClusterTestFailoverProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetClusterTestFailoverProviderSpecificInput implements the ClusterTestFailoverProviderSpecificInputClassification interface +// for type ClusterTestFailoverProviderSpecificInput. +func (c *ClusterTestFailoverProviderSpecificInput) GetClusterTestFailoverProviderSpecificInput() *ClusterTestFailoverProviderSpecificInput { + return c +} + +// ClusterUnplannedFailoverInput - Input definition for unplanned cluster failover. +type ClusterUnplannedFailoverInput struct { + // REQUIRED; Unplanned failover input properties. + Properties *ClusterUnplannedFailoverInputProperties +} + +// ClusterUnplannedFailoverInputProperties - Input definition for unplanned failover input properties. +type ClusterUnplannedFailoverInputProperties struct { + // Failover direction. + FailoverDirection *string + + // Provider specific settings. + ProviderSpecificDetails ClusterUnplannedFailoverProviderSpecificInputClassification + + // Source site operations status. + SourceSiteOperations *string +} + +// ClusterUnplannedFailoverProviderSpecificInput - Provider specific unplanned cluster failover input. +type ClusterUnplannedFailoverProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetClusterUnplannedFailoverProviderSpecificInput implements the ClusterUnplannedFailoverProviderSpecificInputClassification +// interface for type ClusterUnplannedFailoverProviderSpecificInput. +func (c *ClusterUnplannedFailoverProviderSpecificInput) GetClusterUnplannedFailoverProviderSpecificInput() *ClusterUnplannedFailoverProviderSpecificInput { + return c +} + +// ComputeSizeErrorDetails - Represents the error used to indicate why the target compute size is not applicable. +type ComputeSizeErrorDetails struct { + // The error message. + Message *string + + // The severity of the error. + Severity *string +} + +// ConfigurationSettings - Replication provider specific settings. +type ConfigurationSettings struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string +} + +// GetConfigurationSettings implements the ConfigurationSettingsClassification interface for type ConfigurationSettings. +func (c *ConfigurationSettings) GetConfigurationSettings() *ConfigurationSettings { return c } + +// ConfigureAlertRequest - Request to configure alerts for the system. +type ConfigureAlertRequest struct { + // The properties of a configure alert request. + Properties *ConfigureAlertRequestProperties +} + +// ConfigureAlertRequestProperties - Properties of a configure alert request. +type ConfigureAlertRequestProperties struct { + // The custom email address for sending emails. + CustomEmailAddresses []*string + + // The locale for the email notification. + Locale *string + + // A value indicating whether to send email to subscription administrator. + SendToOwners *string +} + +// ConsistencyCheckTaskDetails - This class contains monitoring details of all the inconsistent Protected Entities in Vmm. +type ConsistencyCheckTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // The list of inconsistent Vm details. + VMDetails []*InconsistentVMDetails +} + +// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type ConsistencyCheckTaskDetails. +func (c *ConsistencyCheckTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { + return &TaskTypeDetails{ + InstanceType: c.InstanceType, + } +} + +// CreateNetworkMappingInput - Create network mappings input. +type CreateNetworkMappingInput struct { + // REQUIRED; Input properties for creating network mapping. + Properties *CreateNetworkMappingInputProperties +} + +// CreateNetworkMappingInputProperties - Common input details for network mapping operation. +type CreateNetworkMappingInputProperties struct { + // REQUIRED; Recovery network Id. + RecoveryNetworkID *string + + // Fabric specific input properties. + FabricSpecificDetails FabricSpecificCreateNetworkMappingInputClassification + + // Recovery fabric Name. + RecoveryFabricName *string +} + +// CreatePolicyInput - Protection Policy input. +type CreatePolicyInput struct { + // Policy creation properties. + Properties *CreatePolicyInputProperties +} + +// CreatePolicyInputProperties - Policy creation properties. +type CreatePolicyInputProperties struct { + // The ReplicationProviderSettings. + ProviderSpecificInput PolicyProviderSpecificInputClassification +} + +// CreateProtectionContainerInput - Create protection container input. +type CreateProtectionContainerInput struct { + // Create protection container input properties. + Properties *CreateProtectionContainerInputProperties +} + +// CreateProtectionContainerInputProperties - Create protection container input properties. +type CreateProtectionContainerInputProperties struct { + // Provider specific inputs for container creation. + ProviderSpecificInput []ReplicationProviderSpecificContainerCreationInputClassification +} + +// CreateProtectionContainerMappingInput - Configure pairing input. +type CreateProtectionContainerMappingInput struct { + // Configure protection input properties. + Properties *CreateProtectionContainerMappingInputProperties +} + +// CreateProtectionContainerMappingInputProperties - Configure pairing input properties. +type CreateProtectionContainerMappingInputProperties struct { + // Applicable policy. + PolicyID *string + + // Provider specific input for pairing. + ProviderSpecificInput ReplicationProviderSpecificContainerMappingInputClassification + + // The target unique protection container name. + TargetProtectionContainerID *string +} + +// CreateProtectionIntentInput - Create protection intent input. +type CreateProtectionIntentInput struct { + // Create protection intent input properties. + Properties *CreateProtectionIntentProperties +} + +// CreateProtectionIntentProperties - Create protection intent input properties. +type CreateProtectionIntentProperties struct { + // The ReplicationProviderInput. For A2A provider, it will be A2ACreateProtectionIntentInput object. + ProviderSpecificDetails CreateProtectionIntentProviderSpecificDetailsClassification +} + +// CreateProtectionIntentProviderSpecificDetails - Create protection intent provider specific input. +type CreateProtectionIntentProviderSpecificDetails struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetCreateProtectionIntentProviderSpecificDetails implements the CreateProtectionIntentProviderSpecificDetailsClassification +// interface for type CreateProtectionIntentProviderSpecificDetails. +func (c *CreateProtectionIntentProviderSpecificDetails) GetCreateProtectionIntentProviderSpecificDetails() *CreateProtectionIntentProviderSpecificDetails { + return c +} + +// CreateRecoveryPlanInput - Create recovery plan input class. +type CreateRecoveryPlanInput struct { + // REQUIRED; Recovery plan creation properties. + Properties *CreateRecoveryPlanInputProperties +} + +// CreateRecoveryPlanInputProperties - Recovery plan creation properties. +type CreateRecoveryPlanInputProperties struct { + // REQUIRED; The recovery plan groups. + Groups []*RecoveryPlanGroup + + // REQUIRED; The primary fabric Id. + PrimaryFabricID *string + + // REQUIRED; The recovery fabric Id. + RecoveryFabricID *string + + // The failover deployment model. + FailoverDeploymentModel *FailoverDeploymentModel + + // The provider specific input. + ProviderSpecificInput []RecoveryPlanProviderSpecificInputClassification +} + +// CriticalJobHistoryDetails - Critical past job details of the migration item. +type CriticalJobHistoryDetails struct { + // READ-ONLY; The ARM Id of the job being executed. + JobID *string + + // READ-ONLY; The job name. + JobName *string + + // READ-ONLY; The job state. + JobStatus *string + + // READ-ONLY; The start time of the job. + StartTime *time.Time +} + +// CurrentJobDetails - Current job details of the migration item. +type CurrentJobDetails struct { + // READ-ONLY; The ARM Id of the job being executed. + JobID *string + + // READ-ONLY; The job name. + JobName *string + + // READ-ONLY; The start time of the job. + StartTime *time.Time +} + +// CurrentScenarioDetails - Current scenario details of the protected entity. +type CurrentScenarioDetails struct { + // ARM Id of the job being executed. + JobID *string + + // Scenario name. + ScenarioName *string + + // Start time of the workflow. + StartTime *time.Time +} + +// DataStore - The datastore details of the MT. +type DataStore struct { + // The capacity of data store in GBs. + Capacity *string + + // The free space of data store in GBs. + FreeSpace *string + + // The symbolic name of data store. + SymbolicName *string + + // The type of data store. + Type *string + + // The uuid of data store. + UUID *string +} + +// DataStoreUtilizationDetails - Details of the appliance resource. +type DataStoreUtilizationDetails struct { + // READ-ONLY; The datastore name. + DataStoreName *string + + // READ-ONLY; The total snapshots created for server migration in the datastore. + TotalSnapshotsCreated *int64 + + // READ-ONLY; The total count of snapshots supported by the datastore. + TotalSnapshotsSupported *int64 +} + +// DisableProtectionInput - Disable protection input. +type DisableProtectionInput struct { + // REQUIRED; Disable protection input properties. + Properties *DisableProtectionInputProperties +} + +// DisableProtectionInputProperties - Disable protection input properties. +type DisableProtectionInputProperties struct { + // Disable protection reason. It can have values NotSpecified/MigrationComplete. + DisableProtectionReason *DisableProtectionReason + + // Replication provider specific input. + ReplicationProviderInput DisableProtectionProviderSpecificInputClassification +} + +// DisableProtectionProviderSpecificInput - Disable protection provider specific input. +type DisableProtectionProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetDisableProtectionProviderSpecificInput implements the DisableProtectionProviderSpecificInputClassification interface +// for type DisableProtectionProviderSpecificInput. +func (d *DisableProtectionProviderSpecificInput) GetDisableProtectionProviderSpecificInput() *DisableProtectionProviderSpecificInput { + return d +} + +// DiscoverProtectableItemRequest - Request to add a physical machine as a protectable item in a container. +type DiscoverProtectableItemRequest struct { + // The properties of a discover protectable item request. + Properties *DiscoverProtectableItemRequestProperties +} + +// DiscoverProtectableItemRequestProperties - Discover protectable item properties. +type DiscoverProtectableItemRequestProperties struct { + // The friendly name of the physical machine. + FriendlyName *string + + // The IP address of the physical machine to be discovered. + IPAddress *string + + // The OS type on the physical machine. + OSType *string +} + +// DiskDetails - Onprem disk details data. +type DiskDetails struct { + // The hard disk max size in MB. + MaxSizeMB *int64 + + // The VHD Id. + VhdID *string + + // The VHD name. + VhdName *string + + // The type of the volume. + VhdType *string +} + +// DiskEncryptionInfo - Recovery disk encryption info (BEK and KEK). +type DiskEncryptionInfo struct { + // The recovery KeyVault reference for secret. + DiskEncryptionKeyInfo *DiskEncryptionKeyInfo + + // The recovery KeyVault reference for key. + KeyEncryptionKeyInfo *KeyEncryptionKeyInfo +} + +// DiskEncryptionKeyInfo - Disk Encryption Key Information (BitLocker Encryption Key (BEK) on Windows). +type DiskEncryptionKeyInfo struct { + // The KeyVault resource ARM id for secret. + KeyVaultResourceArmID *string + + // The secret url / identifier. + SecretIdentifier *string +} + +// DiskVolumeDetails - Volume details. +type DiskVolumeDetails struct { + // The volume label. + Label *string + + // The volume name. + Name *string +} + +// Display - Contains the localized display information for this particular operation / action. These value will be used by +// several clients for (1) custom role definitions for RBAC; (2) complex query filters for +// the event service; and (3) audit history / records for management operations. +type Display struct { + // The description. The localized friendly description for the operation, as it should be shown to the user. It should be + // thorough, yet concise - it will be used in tool tips and detailed views. + // Prescriptive guidance for namespaces: Read any 'display.provider' resource Create or Update any 'display.provider' resource + // Delete any 'display.provider' resource Perform any other action on any + // 'display.provider' resource Prescriptive guidance for namespaces: Read any 'display.resource' Create or Update any 'display.resource' + // Delete any 'display.resource' 'ActionName' any + // 'display.resources'. + Description *string + + // The operation. The localized friendly name for the operation, as it should be shown to the user. It should be concise (to + // fit in drop downs) but clear (i.e. self-documenting). It should use Title + // Casing. Prescriptive guidance: Read Create or Update Delete 'ActionName'. + Operation *string + + // The provider. The localized friendly form of the resource provider name - it is expected to also include the publisher/company + // responsible. It should use Title Casing and begin with "Microsoft" for + // 1st party services. e.g. "Microsoft Monitoring Insights" or "Microsoft Compute.". + Provider *string + + // The resource. The localized friendly form of the resource related to this action/operation - it should match the public + // documentation for the resource provider. It should use Title Casing. This value + // should be unique for a particular URL type (e.g. nested types should not reuse their parent's display.resource field). + // e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual Machine VM + // Sizes" or "Scheduler Jobs". + Resource *string +} + +// DraDetails - DRA details. +type DraDetails struct { + // READ-ONLY; The DRA Bios Id. + BiosID *string + + // READ-ONLY; The count of protected items which are protected in forward direction. + ForwardProtectedItemCount *int32 + + // READ-ONLY; The health. + Health *ProtectionHealth + + // READ-ONLY; The health errors. + HealthErrors []*HealthError + + // READ-ONLY; The DRA Id. + ID *string + + // READ-ONLY; The last heartbeat received from the DRA. + LastHeartbeatUTC *time.Time + + // READ-ONLY; The DRA name. + Name *string + + // READ-ONLY; The count of protected items which are protected in reverse direction. + ReverseProtectedItemCount *int32 + + // READ-ONLY; The version. + Version *string +} + +// EnableMigrationInput - Enable migration input. +type EnableMigrationInput struct { + // REQUIRED; Enable migration input properties. + Properties *EnableMigrationInputProperties +} + +// EnableMigrationInputProperties - Enable migration input properties. +type EnableMigrationInputProperties struct { + // REQUIRED; The policy Id. + PolicyID *string + + // REQUIRED; The provider specific details. + ProviderSpecificDetails EnableMigrationProviderSpecificInputClassification +} + +// EnableMigrationProviderSpecificInput - Enable migration provider specific input. +type EnableMigrationProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetEnableMigrationProviderSpecificInput implements the EnableMigrationProviderSpecificInputClassification interface for +// type EnableMigrationProviderSpecificInput. +func (e *EnableMigrationProviderSpecificInput) GetEnableMigrationProviderSpecificInput() *EnableMigrationProviderSpecificInput { + return e +} + +// EnableProtectionInput - Enable protection input. +type EnableProtectionInput struct { + // Enable protection input properties. + Properties *EnableProtectionInputProperties +} + +// EnableProtectionInputProperties - Enable protection input properties. +type EnableProtectionInputProperties struct { + // The Policy Id. + PolicyID *string + + // The protectable item Id. + ProtectableItemID *string + + // The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, + // it will be SanEnableProtectionInput object. For HyperVReplicaAzure + // provider, it can be null. + ProviderSpecificDetails EnableProtectionProviderSpecificInputClassification +} + +// EnableProtectionProviderSpecificInput - Enable protection provider specific input. +type EnableProtectionProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for +// type EnableProtectionProviderSpecificInput. +func (e *EnableProtectionProviderSpecificInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { + return e +} + +// EncryptionDetails - Encryption details for the fabric. +type EncryptionDetails struct { + // The key encryption key certificate expiry date. + KekCertExpiryDate *time.Time + + // The key encryption key certificate thumbprint. + KekCertThumbprint *string + + // The key encryption key state for the Vmm. + KekState *string +} + +// Event - Implements the Event class. +type Event struct { + // Resource Location + Location *string + + // Event related data. + Properties *EventProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// EventCollection - Collection of fabric details. +type EventCollection struct { + // The value of next link. + NextLink *string + + // The list of events. + Value []*Event +} + +// EventProperties - The properties of a monitoring event. +type EventProperties struct { + // The affected object correlationId for the event. + AffectedObjectCorrelationID *string + + // The friendly name of the source of the event on which it is raised (for example, VM, VMM etc). + AffectedObjectFriendlyName *string + + // The event name. + Description *string + + // The Id of the monitoring event. + EventCode *string + + // The event specific settings. + EventSpecificDetails EventSpecificDetailsClassification + + // The type of the event. for example: VM Health, Server Health, Job Failure etc. + EventType *string + + // The ARM ID of the fabric. + FabricID *string + + // The list of errors / warnings capturing details associated with the issue(s). + HealthErrors []*HealthError + + // The provider specific settings. + ProviderSpecificDetails EventProviderSpecificDetailsClassification + + // The severity of the event. + Severity *string + + // The time of occurrence of the event. + TimeOfOccurrence *time.Time +} + +// EventProviderSpecificDetails - Model class for provider specific details for an event. +type EventProviderSpecificDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string +} + +// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type EventProviderSpecificDetails. +func (e *EventProviderSpecificDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { + return e +} + +// EventQueryParameter - Implements the event query parameter. +type EventQueryParameter struct { + // The affected object correlationId for the events to be queried. + AffectedObjectCorrelationID *string + + // The affected object name of the events to be queried. + AffectedObjectFriendlyName *string + + // The end time of the time range within which the events are to be queried. + EndTime *time.Time + + // The source id of the events to be queried. + EventCode *string + + // The type of the events to be queried. + EventType *string + + // The affected object server id of the events to be queried. + FabricName *string + + // The severity of the events to be queried. + Severity *string + + // The start time of the time range within which the events are to be queried. + StartTime *time.Time +} + +// EventSpecificDetails - Model class for event specific details for an event. +type EventSpecificDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string +} + +// GetEventSpecificDetails implements the EventSpecificDetailsClassification interface for type EventSpecificDetails. +func (e *EventSpecificDetails) GetEventSpecificDetails() *EventSpecificDetails { return e } + +// ExistingProtectionProfile - Existing storage account input. +type ExistingProtectionProfile struct { + // REQUIRED; The protection profile Arm Id. Throw error, if resource does not exists. + ProtectionProfileID *string + + // REQUIRED; The class type. + ResourceType *string +} + +// GetProtectionProfileCustomDetails implements the ProtectionProfileCustomDetailsClassification interface for type ExistingProtectionProfile. +func (e *ExistingProtectionProfile) GetProtectionProfileCustomDetails() *ProtectionProfileCustomDetails { + return &ProtectionProfileCustomDetails{ + ResourceType: e.ResourceType, + } +} + +// ExistingRecoveryAvailabilitySet - Existing recovery availability set input. +type ExistingRecoveryAvailabilitySet struct { + // REQUIRED; The class type. + ResourceType *string + + // The recovery availability set Id. Will throw error, if resource does not exist. + RecoveryAvailabilitySetID *string +} + +// GetRecoveryAvailabilitySetCustomDetails implements the RecoveryAvailabilitySetCustomDetailsClassification interface for +// type ExistingRecoveryAvailabilitySet. +func (e *ExistingRecoveryAvailabilitySet) GetRecoveryAvailabilitySetCustomDetails() *RecoveryAvailabilitySetCustomDetails { + return &RecoveryAvailabilitySetCustomDetails{ + ResourceType: e.ResourceType, + } +} + +// ExistingRecoveryProximityPlacementGroup - Existing recovery proximity placement group input. +type ExistingRecoveryProximityPlacementGroup struct { + // REQUIRED; The class type. + ResourceType *string + + // The recovery proximity placement group Id. Will throw error, if resource does not exist. + RecoveryProximityPlacementGroupID *string +} + +// GetRecoveryProximityPlacementGroupCustomDetails implements the RecoveryProximityPlacementGroupCustomDetailsClassification +// interface for type ExistingRecoveryProximityPlacementGroup. +func (e *ExistingRecoveryProximityPlacementGroup) GetRecoveryProximityPlacementGroupCustomDetails() *RecoveryProximityPlacementGroupCustomDetails { + return &RecoveryProximityPlacementGroupCustomDetails{ + ResourceType: e.ResourceType, + } +} + +// ExistingRecoveryResourceGroup - Existing recovery resource group input. +type ExistingRecoveryResourceGroup struct { + // REQUIRED; The class type. + ResourceType *string + + // The recovery resource group Id. Valid for V2 scenarios. + RecoveryResourceGroupID *string +} + +// GetRecoveryResourceGroupCustomDetails implements the RecoveryResourceGroupCustomDetailsClassification interface for type +// ExistingRecoveryResourceGroup. +func (e *ExistingRecoveryResourceGroup) GetRecoveryResourceGroupCustomDetails() *RecoveryResourceGroupCustomDetails { + return &RecoveryResourceGroupCustomDetails{ + ResourceType: e.ResourceType, + } +} + +// ExistingRecoveryVirtualNetwork - Existing recovery virtual network input. +type ExistingRecoveryVirtualNetwork struct { + // REQUIRED; The recovery virtual network Id. Will throw error, if resource does not exist. + RecoveryVirtualNetworkID *string + + // REQUIRED; The class type. + ResourceType *string + + // The recovery subnet name. + RecoverySubnetName *string +} + +// GetRecoveryVirtualNetworkCustomDetails implements the RecoveryVirtualNetworkCustomDetailsClassification interface for type +// ExistingRecoveryVirtualNetwork. +func (e *ExistingRecoveryVirtualNetwork) GetRecoveryVirtualNetworkCustomDetails() *RecoveryVirtualNetworkCustomDetails { + return &RecoveryVirtualNetworkCustomDetails{ + ResourceType: e.ResourceType, + } +} + +// ExistingStorageAccount - Existing storage account input. +type ExistingStorageAccount struct { + // REQUIRED; The storage account Arm Id. Throw error, if resource does not exists. + AzureStorageAccountID *string + + // REQUIRED; The class type. + ResourceType *string +} + +// GetStorageAccountCustomDetails implements the StorageAccountCustomDetailsClassification interface for type ExistingStorageAccount. +func (e *ExistingStorageAccount) GetStorageAccountCustomDetails() *StorageAccountCustomDetails { + return &StorageAccountCustomDetails{ + ResourceType: e.ResourceType, + } +} + +// ExportJobDetails - This class represents details for export jobs workflow. +type ExportJobDetails struct { + // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). + InstanceType *string + + // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow + // object details. + AffectedObjectDetails map[string]*string + + // BlobUri of the exported jobs. + BlobURI *string + + // The sas token to access blob. + SasToken *string +} + +// GetJobDetails implements the JobDetailsClassification interface for type ExportJobDetails. +func (e *ExportJobDetails) GetJobDetails() *JobDetails { + return &JobDetails{ + AffectedObjectDetails: e.AffectedObjectDetails, + InstanceType: e.InstanceType, + } +} + +// ExtendedLocation - Extended location of the resource. +type ExtendedLocation struct { + // REQUIRED; The name of the extended location. + Name *string + + // REQUIRED; The extended location type. + Type *ExtendedLocationType +} + +// Fabric definition. +type Fabric struct { + // Resource Location + Location *string + + // Fabric related data. + Properties *FabricProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// FabricCollection - Collection of fabric details. +type FabricCollection struct { + // The value of next link. + NextLink *string + + // The fabric details. + Value []*Fabric +} + +// FabricCreationInput - Site details provided during the time of site creation. +type FabricCreationInput struct { + // Fabric creation input. + Properties *FabricCreationInputProperties +} + +// FabricCreationInputProperties - Properties of site details provided during the time of site creation. +type FabricCreationInputProperties struct { + // Fabric provider specific creation input. + CustomDetails FabricSpecificCreationInputClassification +} + +// FabricProperties - Fabric properties. +type FabricProperties struct { + // BCDR state of the fabric. + BcdrState *string + + // Fabric specific settings. + CustomDetails FabricSpecificDetailsClassification + + // Encryption details for the fabric. + EncryptionDetails *EncryptionDetails + + // Friendly name of the fabric. + FriendlyName *string + + // Health of fabric. + Health *string + + // Fabric health error details. + HealthErrorDetails []*HealthError + + // Dra Registration Id. + InternalIdentifier *string + + // Rollover encryption details for the fabric. + RolloverEncryptionDetails *EncryptionDetails +} + +// FabricQueryParameter - Query parameter to get fabric. +type FabricQueryParameter struct { + // The BIOS Id to be used for fetching agent details. + BiosID *string + + // The type of the discovered machine to be used for fetching agent details. + DiscoveryType *string + + // A value indicating whether the Extended Location mappings are to be returned. + ExtendedLocationMappings *string + + // A value indicating whether the agent details are to be fetched. + FetchAgentDetails *string + + // The FQDN to be used for fetching agent details. + Fqdn *string + + // A value indicating whether the location details are to be returned. + LocationDetails *string + + // The OS type to be used for fetching agent details. + OSType *string + + // A value indicating whether the zone to zone mappings are to be returned. + ZoneToZoneMappings *string +} + +// FabricReplicationGroupTaskDetails - This class represents the fabric replication group task details. +type FabricReplicationGroupTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // The job entity. + JobTask *JobEntity + + // The skipped reason. + SkippedReason *string + + // The skipped reason string. + SkippedReasonString *string +} + +// GetJobTaskDetails implements the JobTaskDetailsClassification interface for type FabricReplicationGroupTaskDetails. +func (f *FabricReplicationGroupTaskDetails) GetJobTaskDetails() *JobTaskDetails { + return &JobTaskDetails{ + InstanceType: f.InstanceType, + JobTask: f.JobTask, + } +} + +// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type FabricReplicationGroupTaskDetails. +func (f *FabricReplicationGroupTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { + return &TaskTypeDetails{ + InstanceType: f.InstanceType, + } +} + +// FabricSpecificCreateNetworkMappingInput - Input details specific to fabrics during Network Mapping. +type FabricSpecificCreateNetworkMappingInput struct { + // REQUIRED; The instance type. + InstanceType *string +} + +// GetFabricSpecificCreateNetworkMappingInput implements the FabricSpecificCreateNetworkMappingInputClassification interface +// for type FabricSpecificCreateNetworkMappingInput. +func (f *FabricSpecificCreateNetworkMappingInput) GetFabricSpecificCreateNetworkMappingInput() *FabricSpecificCreateNetworkMappingInput { + return f +} + +// FabricSpecificCreationInput - Fabric provider specific settings. +type FabricSpecificCreationInput struct { + // REQUIRED; Gets the class type. + InstanceType *string +} + +// GetFabricSpecificCreationInput implements the FabricSpecificCreationInputClassification interface for type FabricSpecificCreationInput. +func (f *FabricSpecificCreationInput) GetFabricSpecificCreationInput() *FabricSpecificCreationInput { + return f +} + +// FabricSpecificDetails - Fabric specific details. +type FabricSpecificDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string +} + +// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type FabricSpecificDetails. +func (f *FabricSpecificDetails) GetFabricSpecificDetails() *FabricSpecificDetails { return f } + +// FabricSpecificUpdateNetworkMappingInput - Input details specific to fabrics during Network Mapping. +type FabricSpecificUpdateNetworkMappingInput struct { + // REQUIRED; The instance type. + InstanceType *string +} + +// GetFabricSpecificUpdateNetworkMappingInput implements the FabricSpecificUpdateNetworkMappingInputClassification interface +// for type FabricSpecificUpdateNetworkMappingInput. +func (f *FabricSpecificUpdateNetworkMappingInput) GetFabricSpecificUpdateNetworkMappingInput() *FabricSpecificUpdateNetworkMappingInput { + return f +} + +// FailoverJobDetails - This class represents the details for a failover job. +type FailoverJobDetails struct { + // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). + InstanceType *string + + // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow + // object details. + AffectedObjectDetails map[string]*string + + // The test VM details. + ProtectedItemDetails []*FailoverReplicationProtectedItemDetails +} + +// GetJobDetails implements the JobDetailsClassification interface for type FailoverJobDetails. +func (f *FailoverJobDetails) GetJobDetails() *JobDetails { + return &JobDetails{ + AffectedObjectDetails: f.AffectedObjectDetails, + InstanceType: f.InstanceType, + } +} + +// FailoverProcessServerRequest - Request to failover a process server. +type FailoverProcessServerRequest struct { + // The properties of the PS Failover request. + Properties *FailoverProcessServerRequestProperties +} + +// FailoverProcessServerRequestProperties - The properties of the Failover Process Server request. +type FailoverProcessServerRequestProperties struct { + // The container identifier. + ContainerName *string + + // The source process server. + SourceProcessServerID *string + + // The new process server. + TargetProcessServerID *string + + // A value for failover type. It can be systemlevel/serverlevel. + UpdateType *string + + // The VMS to migrate. + VMsToMigrate []*string +} + +// FailoverReplicationProtectedItemDetails - Failover details for a replication protected item. +type FailoverReplicationProtectedItemDetails struct { + // The friendly name. + FriendlyName *string + + // The name. + Name *string + + // The network connection status. + NetworkConnectionStatus *string + + // The network friendly name. + NetworkFriendlyName *string + + // The recovery point Id. + RecoveryPointID *string + + // The recovery point time. + RecoveryPointTime *time.Time + + // The network subnet. + Subnet *string + + // The test Vm friendly name. + TestVMFriendlyName *string + + // The test Vm name. + TestVMName *string +} + +// GatewayOperationDetails - Details of the gateway operation. +type GatewayOperationDetails struct { + // READ-ONLY; A value indicating the datastore collection. + DataStores []*string + + // READ-ONLY; A value indicating the ESXi host name. + HostName *string + + // READ-ONLY; A value indicating the progress percentage of gateway operation. + ProgressPercentage *int32 + + // READ-ONLY; A value indicating the state of gateway operation. + State *string + + // READ-ONLY; A value indicating the time elapsed for the operation in milliseconds. + TimeElapsed *int64 + + // READ-ONLY; A value indicating the time remaining for the operation in milliseconds. + TimeRemaining *int64 + + // READ-ONLY; A value indicating the upload speed in bytes per second. + UploadSpeed *int64 + + // READ-ONLY; A value indicating the VMware read throughput in bytes per second. + VmwareReadThroughput *int64 +} + +// GroupTaskDetails - This class represents the group task details when parent child relationship exists in the drill down. +type GroupTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // The child tasks. + ChildTasks []*ASRTask +} + +// GetGroupTaskDetails implements the GroupTaskDetailsClassification interface for type GroupTaskDetails. +func (g *GroupTaskDetails) GetGroupTaskDetails() *GroupTaskDetails { return g } + +// HealthError - Health Error. +type HealthError struct { + // Error creation time (UTC). + CreationTimeUTC *time.Time + + // Value indicating whether the health error is customer resolvable. + CustomerResolvability *HealthErrorCustomerResolvability + + // ID of the entity. + EntityID *string + + // Category of error. + ErrorCategory *string + + // Error code. + ErrorCode *string + + // The health error unique id. + ErrorID *string + + // Level of error. + ErrorLevel *string + + // Error message. + ErrorMessage *string + + // Source of error. + ErrorSource *string + + // Type of error. + ErrorType *string + + // The inner health errors. HealthError having a list of HealthError as child errors is problematic. InnerHealthError is used + // because this will prevent an infinite loop of structures when Hydra tries to + // auto-generate the contract. We are exposing the related health errors as inner health errors and all API consumers can + // utilize this in the same fashion as Exception -> InnerException. + InnerHealthErrors []*InnerHealthError + + // Possible causes of error. + PossibleCauses *string + + // Recommended action to resolve error. + RecommendedAction *string + + // DRA error message. + RecoveryProviderErrorMessage *string + + // Summary message of the entity. + SummaryMessage *string +} + +// HealthErrorSummary - class to define the summary of the health error details. +type HealthErrorSummary struct { + // The list of affected resource correlation Ids. This can be used to uniquely identify the count of items affected by a specific + // category and severity as well as count of item affected by an specific + // issue. + AffectedResourceCorrelationIDs []*string + + // The sub type of any subcomponent within the ARM resource that this might be applicable. Value remains null if not applicable. + AffectedResourceSubtype *string + + // The type of affected ARM resource. + AffectedResourceType *string + + // The category of the health error. + Category *HealthErrorCategory + + // Severity of error. + Severity *Severity + + // The code of the health error. + SummaryCode *string + + // The summary message of the health error. + SummaryMessage *string +} + +// HyperVHostDetails - Hyper-V host details. +type HyperVHostDetails struct { + // READ-ONLY; The Hyper-V host Id. + ID *string + + // READ-ONLY; The Mars agent version. + MarsAgentVersion *string + + // READ-ONLY; The Hyper-V host name. + Name *string +} + +// HyperVReplica2012EventDetails - Model class for event details of a HyperVReplica E2E event. +type HyperVReplica2012EventDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The container friendly name. + ContainerName *string + + // The fabric friendly name. + FabricName *string + + // The remote container name. + RemoteContainerName *string + + // The remote fabric name. + RemoteFabricName *string +} + +// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type HyperVReplica2012EventDetails. +func (h *HyperVReplica2012EventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { + return &EventProviderSpecificDetails{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplica2012R2EventDetails - Model class for event details of a HyperVReplica blue E2E event. +type HyperVReplica2012R2EventDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The container friendly name. + ContainerName *string + + // The fabric friendly name. + FabricName *string + + // The remote container name. + RemoteContainerName *string + + // The remote fabric name. + RemoteFabricName *string +} + +// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type HyperVReplica2012R2EventDetails. +func (h *HyperVReplica2012R2EventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { + return &EventProviderSpecificDetails{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzureApplyRecoveryPointInput - ApplyRecoveryPoint input specific to HyperVReplicaAzure provider. +type HyperVReplicaAzureApplyRecoveryPointInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The primary kek certificate pfx. + PrimaryKekCertificatePfx *string + + // The secondary kek certificate pfx. + SecondaryKekCertificatePfx *string +} + +// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface +// for type HyperVReplicaAzureApplyRecoveryPointInput. +func (h *HyperVReplicaAzureApplyRecoveryPointInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { + return &ApplyRecoveryPointProviderSpecificInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzureDiskInputDetails - Disk input details. +type HyperVReplicaAzureDiskInputDetails struct { + // The DiskEncryptionSet ARM ID. + DiskEncryptionSetID *string + + // The DiskId. + DiskID *string + + // The disk type. + DiskType *DiskAccountType + + // The LogStorageAccountId. + LogStorageAccountID *string + + // The logical sector size (in bytes), 512 by default. + SectorSizeInBytes *int32 +} + +// HyperVReplicaAzureEnableProtectionInput - HyperVReplicaAzure specific enable protection input. +type HyperVReplicaAzureEnableProtectionInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The DiskEncryptionSet ARM Id. + DiskEncryptionSetID *string + + // The disk type. + DiskType *DiskAccountType + + // The list of VHD Ids of disks to be protected. + DisksToInclude []*string + + // The disks to include list for managed disks. + DisksToIncludeForManagedDisks []*HyperVReplicaAzureDiskInputDetails + + // The selected option to enable RDP\SSH on target vm after failover. String value of SrsDataContract.EnableRDPOnTargetOption + // enum. + EnableRdpOnTargetOption *string + + // The Hyper-V host VM Id. + HvHostVMID *string + + // License type. + LicenseType *LicenseType + + // The license type for Linux VM's. + LinuxLicenseType *LinuxLicenseType + + // The storage account to be used for logging during replication. + LogStorageAccountID *string + + // The OS type associated with VM. + OSType *string + + // The SQL Server license type. + SQLServerLicenseType *SQLServerLicenseType + + // The tags for the seed managed disks. + SeedManagedDiskTags map[string]*string + + // The target availability set ARM Id for resource manager deployment. + TargetAvailabilitySetID *string + + // The target availability zone. + TargetAvailabilityZone *string + + // The selected target Azure network Id. + TargetAzureNetworkID *string + + // The selected target Azure subnet Id. + TargetAzureSubnetID *string + + // The Id of the target resource group (for classic deployment) in which the failover VM is to be created. + TargetAzureV1ResourceGroupID *string + + // The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. + TargetAzureV2ResourceGroupID *string + + // The target azure VM Name. + TargetAzureVMName *string + + // The tags for the target managed disks. + TargetManagedDiskTags map[string]*string + + // The tags for the target NICs. + TargetNicTags map[string]*string + + // The proximity placement group ARM Id. + TargetProximityPlacementGroupID *string + + // The storage account Id. + TargetStorageAccountID *string + + // The target VM security profile. + TargetVMSecurityProfile *SecurityProfileProperties + + // The target VM size. + TargetVMSize *string + + // The target VM tags. + TargetVMTags map[string]*string + + // A value indicating whether managed disks should be used during failover. + UseManagedDisks *string + + // A value indicating whether managed disks should be used during replication. + UseManagedDisksForReplication *string + + // The OS name selected by user. + UserSelectedOSName *string + + // The VM Name. + VMName *string + + // The OS disk VHD id associated with VM. + VhdID *string +} + +// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for +// type HyperVReplicaAzureEnableProtectionInput. +func (h *HyperVReplicaAzureEnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { + return &EnableProtectionProviderSpecificInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzureEventDetails - Model class for event details of a HyperVReplica E2A event. +type HyperVReplicaAzureEventDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The container friendly name. + ContainerName *string + + // The fabric friendly name. + FabricName *string + + // The remote container name. + RemoteContainerName *string +} + +// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type HyperVReplicaAzureEventDetails. +func (h *HyperVReplicaAzureEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { + return &EventProviderSpecificDetails{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzureFailbackProviderInput - HyperVReplicaAzureFailback specific planned failover input. +type HyperVReplicaAzureFailbackProviderInput struct { + // REQUIRED; The class type. + InstanceType *string + + // Data sync option. + DataSyncOption *string + + // Provider Id for alternate location. + ProviderIDForAlternateRecovery *string + + // ALR options to create alternate recovery. + RecoveryVMCreationOption *string +} + +// GetPlannedFailoverProviderSpecificFailoverInput implements the PlannedFailoverProviderSpecificFailoverInputClassification +// interface for type HyperVReplicaAzureFailbackProviderInput. +func (h *HyperVReplicaAzureFailbackProviderInput) GetPlannedFailoverProviderSpecificFailoverInput() *PlannedFailoverProviderSpecificFailoverInput { + return &PlannedFailoverProviderSpecificFailoverInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzureManagedDiskDetails - Hyper-V Managed disk details. +type HyperVReplicaAzureManagedDiskDetails struct { + // The disk encryption set ARM Id. + DiskEncryptionSetID *string + + // The disk Id. + DiskID *string + + // The replica disk type. + ReplicaDiskType *string + + // The logical sector size (in bytes), 512 by default. + SectorSizeInBytes *int32 + + // Seed managed disk Id. + SeedManagedDiskID *string + + // The disk type. + TargetDiskAccountType *DiskAccountType +} + +// HyperVReplicaAzurePlannedFailoverProviderInput - HyperVReplicaAzure specific planned failover input. +type HyperVReplicaAzurePlannedFailoverProviderInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating the inplace OS Upgrade version. + OSUpgradeVersion *string + + // Primary kek certificate pfx. + PrimaryKekCertificatePfx *string + + // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should + // be passed. + RecoveryPointID *string + + // Secondary kek certificate pfx. + SecondaryKekCertificatePfx *string +} + +// GetPlannedFailoverProviderSpecificFailoverInput implements the PlannedFailoverProviderSpecificFailoverInputClassification +// interface for type HyperVReplicaAzurePlannedFailoverProviderInput. +func (h *HyperVReplicaAzurePlannedFailoverProviderInput) GetPlannedFailoverProviderSpecificFailoverInput() *PlannedFailoverProviderSpecificFailoverInput { + return &PlannedFailoverProviderSpecificFailoverInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzurePolicyDetails - Hyper-V Replica Azure specific protection profile details. +type HyperVReplicaAzurePolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The active storage account Id. + ActiveStorageAccountID *string + + // The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. + ApplicationConsistentSnapshotFrequencyInHours *int32 + + // A value indicating whether encryption is enabled for virtual machines in this cloud. + Encryption *string + + // The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. + OnlineReplicationStartTime *string + + // The duration (in hours) to which point the recovery history needs to be maintained. + RecoveryPointHistoryDurationInHours *int32 + + // The replication interval. + ReplicationInterval *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type HyperVReplicaAzurePolicyDetails. +func (h *HyperVReplicaAzurePolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzurePolicyInput - Hyper-V Replica Azure specific input for creating a protection profile. +type HyperVReplicaAzurePolicyInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. + ApplicationConsistentSnapshotFrequencyInHours *int32 + + // The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. + OnlineReplicationStartTime *string + + // The duration (in hours) to which point the recovery history needs to be maintained. + RecoveryPointHistoryDuration *int32 + + // The replication interval. + ReplicationInterval *int32 + + // The list of storage accounts to which the VMs in the primary cloud can replicate to. + StorageAccounts []*string +} + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type HyperVReplicaAzurePolicyInput. +func (h *HyperVReplicaAzurePolicyInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return &PolicyProviderSpecificInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzureReplicationDetails - Hyper V Replica Azure provider specific settings. +type HyperVReplicaAzureReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // A value indicating all available inplace OS Upgrade configurations. + AllAvailableOSUpgradeConfigurations []*OSUpgradeSupportedVersions + + // Azure VM Disk details. + AzureVMDiskDetails []*AzureVMDiskDetails + + // The selected option to enable RDP\SSH on target vm after failover. String value of SrsDataContract.EnableRDPOnTargetOption + // enum. + EnableRdpOnTargetOption *string + + // The encryption info. + Encryption *string + + // Initial replication details. + InitialReplicationDetails *InitialReplicationDetails + + // The Last replication time. + LastReplicatedTime *time.Time + + // The last RPO calculated time. + LastRpoCalculatedTime *time.Time + + // License Type of the VM to be used. + LicenseType *string + + // The license type for Linux VM's. + LinuxLicenseType *LinuxLicenseType + + // The operating system info. + OSDetails *OSDetails + + // The list of protected managed disks. + ProtectedManagedDisks []*HyperVReplicaAzureManagedDiskDetails + + // The recovery availability set Id. + RecoveryAvailabilitySetID *string + + // The ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided + // during enable protection. + RecoveryAzureLogStorageAccountID *string + + // The target resource group Id. + RecoveryAzureResourceGroupID *string + + // The recovery Azure storage account. + RecoveryAzureStorageAccount *string + + // Recovery Azure given name. + RecoveryAzureVMName *string + + // The Recovery Azure VM size. + RecoveryAzureVMSize *string + + // Last RPO value. + RpoInSeconds *int64 + + // The SQL Server license type. + SQLServerLicenseType *string + + // The tags for the seed managed disks. + SeedManagedDiskTags map[string]*string + + // The selected recovery azure network Id. + SelectedRecoveryAzureNetworkID *string + + // The selected source nic Id which will be used as the primary nic during failover. + SelectedSourceNicID *string + + // The CPU count of the VM on the primary side. + SourceVMCPUCount *int32 + + // The RAM size of the VM on the primary side. + SourceVMRAMSizeInMB *int32 + + // The target availability zone. + TargetAvailabilityZone *string + + // The tags for the target managed disks. + TargetManagedDiskTags map[string]*string + + // The tags for the target NICs. + TargetNicTags map[string]*string + + // The target proximity placement group Id. + TargetProximityPlacementGroupID *string + + // The target VM security profile. + TargetVMSecurityProfile *SecurityProfileProperties + + // The target VM tags. + TargetVMTags map[string]*string + + // A value indicating whether managed disks should be used during failover. + UseManagedDisks *string + + // The virtual machine Id. + VMID *string + + // The PE Network details. + VMNics []*VMNicDetails + + // The protection state for the vm. + VMProtectionState *string + + // The protection state description for the vm. + VMProtectionStateDescription *string + + // READ-ONLY; The last recovery point received time. + LastRecoveryPointReceived *time.Time +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// HyperVReplicaAzureReplicationDetails. +func (h *HyperVReplicaAzureReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return &ReplicationProviderSpecificSettings{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzureReprotectInput - Azure specific reprotect input. +type HyperVReplicaAzureReprotectInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The Hyper-V host Vm Id. + HvHostVMID *string + + // The storage account to be used for logging during replication. + LogStorageAccountID *string + + // The OS type associated with vm. + OSType *string + + // The storage account name. + StorageAccountID *string + + // The OS disk VHD id associated with vm. + VHDID *string + + // The Vm Name. + VMName *string +} + +// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface +// for type HyperVReplicaAzureReprotectInput. +func (h *HyperVReplicaAzureReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { + return &ReverseReplicationProviderSpecificInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzureTestFailoverInput - HvrA provider specific input for test failover. +type HyperVReplicaAzureTestFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating the inplace OS Upgrade version. + OSUpgradeVersion *string + + // Primary kek certificate pfx. + PrimaryKekCertificatePfx *string + + // The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null + // should be passed. + RecoveryPointID *string + + // Secondary kek certificate pfx. + SecondaryKekCertificatePfx *string +} + +// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type +// HyperVReplicaAzureTestFailoverInput. +func (h *HyperVReplicaAzureTestFailoverInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { + return &TestFailoverProviderSpecificInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzureUnplannedFailoverInput - HvrA provider specific input for unplanned failover. +type HyperVReplicaAzureUnplannedFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // Primary kek certificate pfx. + PrimaryKekCertificatePfx *string + + // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should + // be passed. + RecoveryPointID *string + + // Secondary kek certificate pfx. + SecondaryKekCertificatePfx *string +} + +// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface +// for type HyperVReplicaAzureUnplannedFailoverInput. +func (h *HyperVReplicaAzureUnplannedFailoverInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { + return &UnplannedFailoverProviderSpecificInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaAzureUpdateReplicationProtectedItemInput - HyperV replica Azure input to update replication protected item. +type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The dictionary of disk resource Id to disk encryption set ARM Id. + DiskIDToDiskEncryptionMap map[string]*string + + // The license type for Linux VM's. + LinuxLicenseType *LinuxLicenseType + + // The recovery Azure resource group Id for classic deployment. + RecoveryAzureV1ResourceGroupID *string + + // The recovery Azure resource group Id for resource manager deployment. + RecoveryAzureV2ResourceGroupID *string + + // The SQL Server license type. + SQLServerLicenseType *SQLServerLicenseType + + // The target availability zone. + TargetAvailabilityZone *string + + // The tags for the target managed disks. + TargetManagedDiskTags map[string]*string + + // The tags for the target NICs. + TargetNicTags map[string]*string + + // The target proximity placement group Id. + TargetProximityPlacementGroupID *string + + // The target VM tags. + TargetVMTags map[string]*string + + // A value indicating whether managed disks should be used during failover. + UseManagedDisks *string + + // The OS name selected by user. + UserSelectedOSName *string + + // The list of disk update properties. + VMDisks []*UpdateDiskInput +} + +// GetUpdateReplicationProtectedItemProviderInput implements the UpdateReplicationProtectedItemProviderInputClassification +// interface for type HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (h *HyperVReplicaAzureUpdateReplicationProtectedItemInput) GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput { + return &UpdateReplicationProtectedItemProviderInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaBaseEventDetails - Abstract model class for event details of a HyperVReplica E2E event. +type HyperVReplicaBaseEventDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The container friendly name. + ContainerName *string + + // The fabric friendly name. + FabricName *string + + // The remote container name. + RemoteContainerName *string + + // The remote fabric name. + RemoteFabricName *string +} + +// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type HyperVReplicaBaseEventDetails. +func (h *HyperVReplicaBaseEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { + return &EventProviderSpecificDetails{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaBasePolicyDetails - Base class for HyperVReplica policy details. +type HyperVReplicaBasePolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // A value indicating the authentication type. + AllowedAuthenticationType *int32 + + // A value indicating the application consistent frequency. + ApplicationConsistentSnapshotFrequencyInHours *int32 + + // A value indicating whether compression has to be enabled. + Compression *string + + // A value indicating whether IR is online. + InitialReplicationMethod *string + + // A value indicating the offline IR export path. + OfflineReplicationExportPath *string + + // A value indicating the offline IR import path. + OfflineReplicationImportPath *string + + // A value indicating the online IR start time. + OnlineReplicationStartTime *string + + // A value indicating the number of recovery points. + RecoveryPoints *int32 + + // A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud. + ReplicaDeletionOption *string + + // A value indicating the recovery HTTPS port. + ReplicationPort *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type HyperVReplicaBasePolicyDetails. +func (h *HyperVReplicaBasePolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaBaseReplicationDetails - Hyper V replica provider specific settings base class. +type HyperVReplicaBaseReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // Initial replication details. + InitialReplicationDetails *InitialReplicationDetails + + // The Last replication time. + LastReplicatedTime *time.Time + + // VM disk details. + VMDiskDetails []*DiskDetails + + // The virtual machine Id. + VMID *string + + // The PE Network details. + VMNics []*VMNicDetails + + // The protection state for the vm. + VMProtectionState *string + + // The protection state description for the vm. + VMProtectionStateDescription *string +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// HyperVReplicaBaseReplicationDetails. +func (h *HyperVReplicaBaseReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return &ReplicationProviderSpecificSettings{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaBluePolicyDetails - Hyper-V Replica Blue specific protection profile details. +type HyperVReplicaBluePolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // A value indicating the authentication type. + AllowedAuthenticationType *int32 + + // A value indicating the application consistent frequency. + ApplicationConsistentSnapshotFrequencyInHours *int32 + + // A value indicating whether compression has to be enabled. + Compression *string + + // A value indicating whether IR is online. + InitialReplicationMethod *string + + // A value indicating the offline IR export path. + OfflineReplicationExportPath *string + + // A value indicating the offline IR import path. + OfflineReplicationImportPath *string + + // A value indicating the online IR start time. + OnlineReplicationStartTime *string + + // A value indicating the number of recovery points. + RecoveryPoints *int32 + + // A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud + ReplicaDeletionOption *string + + // A value indicating the replication interval. + ReplicationFrequencyInSeconds *int32 + + // A value indicating the recovery HTTPS port. + ReplicationPort *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type HyperVReplicaBluePolicyDetails. +func (h *HyperVReplicaBluePolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaBluePolicyInput - HyperV Replica Blue policy input. +type HyperVReplicaBluePolicyInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating the authentication type. + AllowedAuthenticationType *int32 + + // A value indicating the application consistent frequency. + ApplicationConsistentSnapshotFrequencyInHours *int32 + + // A value indicating whether compression has to be enabled. + Compression *string + + // A value indicating whether IR is online. + InitialReplicationMethod *string + + // A value indicating the offline IR export path. + OfflineReplicationExportPath *string + + // A value indicating the offline IR import path. + OfflineReplicationImportPath *string + + // A value indicating the online IR start time. + OnlineReplicationStartTime *string + + // A value indicating the number of recovery points. + RecoveryPoints *int32 + + // A value indicating whether the VM has to be auto deleted. + ReplicaDeletion *string + + // A value indicating the replication interval. + ReplicationFrequencyInSeconds *int32 + + // A value indicating the recovery HTTPS port. + ReplicationPort *int32 +} + +// GetHyperVReplicaPolicyInput implements the HyperVReplicaPolicyInputClassification interface for type HyperVReplicaBluePolicyInput. +func (h *HyperVReplicaBluePolicyInput) GetHyperVReplicaPolicyInput() *HyperVReplicaPolicyInput { + return &HyperVReplicaPolicyInput{ + AllowedAuthenticationType: h.AllowedAuthenticationType, + ApplicationConsistentSnapshotFrequencyInHours: h.ApplicationConsistentSnapshotFrequencyInHours, + Compression: h.Compression, + InitialReplicationMethod: h.InitialReplicationMethod, + InstanceType: h.InstanceType, + OfflineReplicationExportPath: h.OfflineReplicationExportPath, + OfflineReplicationImportPath: h.OfflineReplicationImportPath, + OnlineReplicationStartTime: h.OnlineReplicationStartTime, + RecoveryPoints: h.RecoveryPoints, + ReplicaDeletion: h.ReplicaDeletion, + ReplicationPort: h.ReplicationPort, + } +} + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type HyperVReplicaBluePolicyInput. +func (h *HyperVReplicaBluePolicyInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return &PolicyProviderSpecificInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaBlueReplicationDetails - HyperV replica 2012 R2 (Blue) replication details. +type HyperVReplicaBlueReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // Initial replication details. + InitialReplicationDetails *InitialReplicationDetails + + // The Last replication time. + LastReplicatedTime *time.Time + + // VM disk details. + VMDiskDetails []*DiskDetails + + // The virtual machine Id. + VMID *string + + // The PE Network details. + VMNics []*VMNicDetails + + // The protection state for the vm. + VMProtectionState *string + + // The protection state description for the vm. + VMProtectionStateDescription *string +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// HyperVReplicaBlueReplicationDetails. +func (h *HyperVReplicaBlueReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return &ReplicationProviderSpecificSettings{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaPolicyDetails - Hyper-V Replica Blue specific protection profile details. +type HyperVReplicaPolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // A value indicating the authentication type. + AllowedAuthenticationType *int32 + + // A value indicating the application consistent frequency. + ApplicationConsistentSnapshotFrequencyInHours *int32 + + // A value indicating whether compression has to be enabled. + Compression *string + + // A value indicating whether IR is online. + InitialReplicationMethod *string + + // A value indicating the offline IR export path. + OfflineReplicationExportPath *string + + // A value indicating the offline IR import path. + OfflineReplicationImportPath *string + + // A value indicating the online IR start time. + OnlineReplicationStartTime *string + + // A value indicating the number of recovery points. + RecoveryPoints *int32 + + // A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud + ReplicaDeletionOption *string + + // A value indicating the recovery HTTPS port. + ReplicationPort *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type HyperVReplicaPolicyDetails. +func (h *HyperVReplicaPolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaPolicyInput - Hyper-V Replica specific policy Input. +type HyperVReplicaPolicyInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating the authentication type. + AllowedAuthenticationType *int32 + + // A value indicating the application consistent frequency. + ApplicationConsistentSnapshotFrequencyInHours *int32 + + // A value indicating whether compression has to be enabled. + Compression *string + + // A value indicating whether IR is online. + InitialReplicationMethod *string + + // A value indicating the offline IR export path. + OfflineReplicationExportPath *string + + // A value indicating the offline IR import path. + OfflineReplicationImportPath *string + + // A value indicating the online IR start time. + OnlineReplicationStartTime *string + + // A value indicating the number of recovery points. + RecoveryPoints *int32 + + // A value indicating whether the VM has to be auto deleted. + ReplicaDeletion *string + + // A value indicating the recovery HTTPS port. + ReplicationPort *int32 +} + +// GetHyperVReplicaPolicyInput implements the HyperVReplicaPolicyInputClassification interface for type HyperVReplicaPolicyInput. +func (h *HyperVReplicaPolicyInput) GetHyperVReplicaPolicyInput() *HyperVReplicaPolicyInput { return h } + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type HyperVReplicaPolicyInput. +func (h *HyperVReplicaPolicyInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return &PolicyProviderSpecificInput{ + InstanceType: h.InstanceType, + } +} + +// HyperVReplicaReplicationDetails - HyperV replica 2012 replication details. +type HyperVReplicaReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // Initial replication details. + InitialReplicationDetails *InitialReplicationDetails + + // The Last replication time. + LastReplicatedTime *time.Time + + // VM disk details. + VMDiskDetails []*DiskDetails + + // The virtual machine Id. + VMID *string + + // The PE Network details. + VMNics []*VMNicDetails + + // The protection state for the vm. + VMProtectionState *string + + // The protection state description for the vm. + VMProtectionStateDescription *string +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// HyperVReplicaReplicationDetails. +func (h *HyperVReplicaReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return &ReplicationProviderSpecificSettings{ + InstanceType: h.InstanceType, + } +} + +// HyperVSiteDetails - HyperVSite fabric specific details. +type HyperVSiteDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The list of Hyper-V hosts associated with the fabric. + HyperVHosts []*HyperVHostDetails +} + +// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type HyperVSiteDetails. +func (h *HyperVSiteDetails) GetFabricSpecificDetails() *FabricSpecificDetails { + return &FabricSpecificDetails{ + InstanceType: h.InstanceType, + } +} + +// HyperVVirtualMachineDetails - Single Host fabric provider specific VM settings. +type HyperVVirtualMachineDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The Last successful failover time. + DiskDetails []*DiskDetails + + // The id of the object in fabric. + Generation *string + + // A value indicating whether the VM has a fibre channel adapter attached. String value of SrsDataContract.PresenceStatus + // enum. + HasFibreChannelAdapter *PresenceStatus + + // A value indicating whether the VM has a physical disk attached. String value of SrsDataContract.PresenceStatus enum. + HasPhysicalDisk *PresenceStatus + + // A value indicating whether the VM has a shared VHD attached. String value of SrsDataContract.PresenceStatus enum. + HasSharedVhd *PresenceStatus + + // The Id of the hyper-v host in fabric. + HyperVHostID *string + + // The Last replication time. + OSDetails *OSDetails + + // The source id of the object. + SourceItemID *string +} + +// GetConfigurationSettings implements the ConfigurationSettingsClassification interface for type HyperVVirtualMachineDetails. +func (h *HyperVVirtualMachineDetails) GetConfigurationSettings() *ConfigurationSettings { + return &ConfigurationSettings{ + InstanceType: h.InstanceType, + } +} + +// GetHyperVVirtualMachineDetails implements the HyperVVirtualMachineDetailsClassification interface for type HyperVVirtualMachineDetails. +func (h *HyperVVirtualMachineDetails) GetHyperVVirtualMachineDetails() *HyperVVirtualMachineDetails { + return h +} + +type IPConfigDetails struct { + IPAddressType *string + IsPrimary *bool + IsSeletedForFailover *bool + Name *string + RecoveryIPAddressType *string + RecoveryLBBackendAddressPoolIDs []*string + RecoveryPublicIPAddressID *string + RecoveryStaticIPAddress *string + RecoverySubnetName *string + StaticIPAddress *string + SubnetName *string + TfoLBBackendAddressPoolIDs []*string + TfoPublicIPAddressID *string + TfoStaticIPAddress *string + TfoSubnetName *string +} + +type IPConfigInputDetails struct { + IPConfigName *string + IsPrimary *bool + IsSeletedForFailover *bool + RecoveryLBBackendAddressPoolIDs []*string + RecoveryPublicIPAddressID *string + RecoveryStaticIPAddress *string + RecoverySubnetName *string + TfoLBBackendAddressPoolIDs []*string + TfoPublicIPAddressID *string + TfoStaticIPAddress *string + TfoSubnetName *string +} + +// IdentityProviderDetails - Identity provider details. +type IdentityProviderDetails struct { + // The base authority for Azure Active Directory authentication. + AADAuthority *string + + // The application/client Id for the service principal with which the on-premise management/data plane components would communicate + // with our Azure services. + ApplicationID *string + + // The intended Audience of the service principal with which the on-premise management/data plane components would communicate + // with our Azure services. + Audience *string + + // The object Id of the service principal with which the on-premise management/data plane components would communicate with + // our Azure services. + ObjectID *string + + // The tenant Id for the service principal with which the on-premise management/data plane components would communicate with + // our Azure services. + TenantID *string +} + +// IdentityProviderInput - Identity provider input. +type IdentityProviderInput struct { + // REQUIRED; The base authority for Azure Active Directory authentication. + AADAuthority *string + + // REQUIRED; The application/client Id for the service principal with which the on-premise management/data plane components + // would communicate with our Azure services. + ApplicationID *string + + // REQUIRED; The intended Audience of the service principal with which the on-premise management/data plane components would + // communicate with our Azure services. + Audience *string + + // REQUIRED; The object Id of the service principal with which the on-premise management/data plane components would communicate + // with our Azure services. + ObjectID *string + + // REQUIRED; The tenant Id for the service principal with which the on-premise management/data plane components would communicate + // with our Azure services. + TenantID *string +} + +// InMageAgentDetails - The details of the InMage agent. +type InMageAgentDetails struct { + // Agent expiry date. + AgentExpiryDate *time.Time + + // A value indicating whether installed agent needs to be updated. + AgentUpdateStatus *string + + // The agent version. + AgentVersion *string + + // A value indicating whether reboot is required after update is applied. + PostUpdateRebootStatus *string +} + +// InMageAzureV2ApplyRecoveryPointInput - ApplyRecoveryPoint input specific to InMageAzureV2 provider. +type InMageAzureV2ApplyRecoveryPointInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface +// for type InMageAzureV2ApplyRecoveryPointInput. +func (i *InMageAzureV2ApplyRecoveryPointInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { + return &ApplyRecoveryPointProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2DiskInputDetails - Disk input details. +type InMageAzureV2DiskInputDetails struct { + // The DiskEncryptionSet ARM ID. + DiskEncryptionSetID *string + + // The DiskId. + DiskID *string + + // The disk type. + DiskType *DiskAccountType + + // The LogStorageAccountId. + LogStorageAccountID *string +} + +// InMageAzureV2EnableProtectionInput - VMware Azure specific enable protection input. +type InMageAzureV2EnableProtectionInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The DiskEncryptionSet ARM Id. + DiskEncryptionSetID *string + + // The disk type. + DiskType *DiskAccountType + + // The disks to include list. + DisksToInclude []*InMageAzureV2DiskInputDetails + + // The selected option to enable RDP\SSH on target VM after failover. String value of SrsDataContract.EnableRDPOnTargetOption + // enum. + EnableRdpOnTargetOption *string + + // License type. + LicenseType *LicenseType + + // The storage account to be used for logging during replication. + LogStorageAccountID *string + + // The Master target Id. + MasterTargetID *string + + // The multi VM group Id. + MultiVMGroupID *string + + // The multi VM group name. + MultiVMGroupName *string + + // The Process Server Id. + ProcessServerID *string + + // The CS account Id. + RunAsAccountID *string + + // The SQL Server license type. + SQLServerLicenseType *SQLServerLicenseType + + // The tags for the seed managed disks. + SeedManagedDiskTags map[string]*string + + // The storage account Id. + StorageAccountID *string + + // The target availability set ARM Id for resource manager deployment. + TargetAvailabilitySetID *string + + // The target availability zone. + TargetAvailabilityZone *string + + // The selected target Azure network Id. + TargetAzureNetworkID *string + + // The selected target Azure subnet Id. + TargetAzureSubnetID *string + + // The Id of the target resource group (for classic deployment) in which the failover VM is to be created. + TargetAzureV1ResourceGroupID *string + + // The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. + TargetAzureV2ResourceGroupID *string + + // The target azure VM Name. + TargetAzureVMName *string + + // The tags for the target managed disks. + TargetManagedDiskTags map[string]*string + + // The tags for the target NICs. + TargetNicTags map[string]*string + + // The proximity placement group ARM Id. + TargetProximityPlacementGroupID *string + + // The target VM size. + TargetVMSize *string + + // The target VM tags. + TargetVMTags map[string]*string +} + +// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for +// type InMageAzureV2EnableProtectionInput. +func (i *InMageAzureV2EnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { + return &EnableProtectionProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2EventDetails - Model class for event details of a VMwareAzureV2 event. +type InMageAzureV2EventDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // InMage Event Category. + Category *string + + // InMage Event Component. + Component *string + + // Corrective Action string for the event. + CorrectiveAction *string + + // InMage Event Details. + Details *string + + // InMage Event type. Takes one of the values of InMageDataContract.InMageMonitoringEventType. + EventType *string + + // VMware Site name. + SiteName *string + + // InMage Event Summary. + Summary *string +} + +// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type InMageAzureV2EventDetails. +func (i *InMageAzureV2EventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { + return &EventProviderSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2ManagedDiskDetails - InMageAzureV2 Managed disk details. +type InMageAzureV2ManagedDiskDetails struct { + // The DiskEncryptionSet ARM ID. + DiskEncryptionSetID *string + + // The disk id. + DiskID *string + + // The replica disk type. + ReplicaDiskType *string + + // Seed managed disk Id. + SeedManagedDiskID *string + + // The target disk name. + TargetDiskName *string +} + +// InMageAzureV2PolicyDetails - InMage Azure v2 specific protection profile details. +type InMageAzureV2PolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency in minutes. + CrashConsistentFrequencyInMinutes *int32 + + // A value indicating whether multi-VM sync has to be enabled. + MultiVMSyncStatus *string + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 + + // The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type InMageAzureV2PolicyDetails. +func (i *InMageAzureV2PolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2PolicyInput - VMWare Azure specific policy Input. +type InMageAzureV2PolicyInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. + MultiVMSyncStatus *SetMultiVMSyncStatus + + // The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency (in minutes). + CrashConsistentFrequencyInMinutes *int32 + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 + + // The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 +} + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type InMageAzureV2PolicyInput. +func (i *InMageAzureV2PolicyInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return &PolicyProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2ProtectedDiskDetails - InMageAzureV2 protected disk details. +type InMageAzureV2ProtectedDiskDetails struct { + // The disk capacity in bytes. + DiskCapacityInBytes *int64 + + // The disk id. + DiskID *string + + // The disk name. + DiskName *string + + // A value indicating whether disk is resized. + DiskResized *string + + // The disk file system capacity in bytes. + FileSystemCapacityInBytes *int64 + + // The health error code for the disk. + HealthErrorCode *string + + // The last RPO calculated time. + LastRpoCalculatedTime *time.Time + + // The Progress Health. + ProgressHealth *string + + // The Progress Status. + ProgressStatus *string + + // The protection stage. + ProtectionStage *string + + // The PS data transit in MB. + PsDataInMegaBytes *float64 + + // The resync duration in seconds. + ResyncDurationInSeconds *int64 + + // The resync last 15 minutes transferred bytes. + ResyncLast15MinutesTransferredBytes *int64 + + // The last data transfer time in UTC. + ResyncLastDataTransferTimeUTC *time.Time + + // The resync processed bytes. + ResyncProcessedBytes *int64 + + // The resync progress percentage. + ResyncProgressPercentage *int32 + + // A value indicating whether resync is required for this disk. + ResyncRequired *string + + // The resync start time. + ResyncStartTime *time.Time + + // The resync total transferred bytes. + ResyncTotalTransferredBytes *int64 + + // The RPO in seconds. + RpoInSeconds *int64 + + // The seconds to take for switch provider. + SecondsToTakeSwitchProvider *int64 + + // The source data transit in MB. + SourceDataInMegaBytes *float64 + + // The target data transit in MB. + TargetDataInMegaBytes *float64 +} + +// InMageAzureV2RecoveryPointDetails - InMage Azure V2 provider specific recovery point details. +type InMageAzureV2RecoveryPointDetails struct { + // REQUIRED; Gets the provider type. + InstanceType *string + + // A value indicating whether the recovery point is multi VM consistent. + IsMultiVMSyncPoint *string +} + +// GetProviderSpecificRecoveryPointDetails implements the ProviderSpecificRecoveryPointDetailsClassification interface for +// type InMageAzureV2RecoveryPointDetails. +func (i *InMageAzureV2RecoveryPointDetails) GetProviderSpecificRecoveryPointDetails() *ProviderSpecificRecoveryPointDetails { + return &ProviderSpecificRecoveryPointDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2ReplicationDetails - InMageAzureV2 provider specific settings. +type InMageAzureV2ReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // Agent expiry date. + AgentExpiryDate *time.Time + + // The agent version. + AgentVersion *string + + // A value indicating all available inplace OS Upgrade configurations. + AllAvailableOSUpgradeConfigurations []*OSUpgradeSupportedVersions + + // Azure VM Disk details. + AzureVMDiskDetails []*AzureVMDiskDetails + + // The target generation for this protected item. + AzureVMGeneration *string + + // The compressed data change rate in MB. + CompressedDataRateInMB *float64 + + // The datastores of the on-premise machine. Value can be list of strings that contain datastore names. + Datastores []*string + + // A value indicating the discovery type of the machine. Value can be vCenter or physical. + DiscoveryType *string + + // A value indicating whether any disk is resized for this VM. + DiskResized *string + + // The selected option to enable RDP\SSH on target vm after failover. String value of SrsDataContract.EnableRDPOnTargetOption + // enum. + EnableRdpOnTargetOption *string + + // The firmware type of this protected item. + FirmwareType *string + + // The source IP address. + IPAddress *string + + // The infrastructure VM Id. + InfrastructureVMID *string + + // A value indicating whether additional IR stats are available or not. + IsAdditionalStatsAvailable *bool + + // A value indicating whether installed agent needs to be updated. + IsAgentUpdateRequired *string + + // A value indicating whether the source server requires a restart after update. + IsRebootAfterUpdateRequired *string + + // The last heartbeat received from the source server. + LastHeartbeat *time.Time + + // The last RPO calculated time. + LastRpoCalculatedTime *time.Time + + // The last update time received from on-prem components. + LastUpdateReceivedTime *time.Time + + // License Type of the VM to be used. + LicenseType *string + + // The master target Id. + MasterTargetID *string + + // The multi vm group Id. + MultiVMGroupID *string + + // The multi vm group name. + MultiVMGroupName *string + + // A value indicating whether multi vm sync is enabled or disabled. + MultiVMSyncStatus *string + + // The id of the disk containing the OS. + OSDiskID *string + + // The type of the OS on the VM. + OSType *string + + // The OS Version of the protected item. + OSVersion *string + + // The process server Id. + ProcessServerID *string + + // The process server name. + ProcessServerName *string + + // The list of protected disks. + ProtectedDisks []*InMageAzureV2ProtectedDiskDetails + + // The list of protected managed disks. + ProtectedManagedDisks []*InMageAzureV2ManagedDiskDetails + + // The protection stage. + ProtectionStage *string + + // The recovery availability set Id. + RecoveryAvailabilitySetID *string + + // The ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided + // during enable protection. + RecoveryAzureLogStorageAccountID *string + + // The target resource group Id. + RecoveryAzureResourceGroupID *string + + // The recovery Azure storage account. + RecoveryAzureStorageAccount *string + + // Recovery Azure given name. + RecoveryAzureVMName *string + + // The Recovery Azure VM size. + RecoveryAzureVMSize *string + + // The replica id of the protected item. + ReplicaID *string + + // The resync progress percentage. + ResyncProgressPercentage *int32 + + // The RPO in seconds. + RpoInSeconds *int64 + + // The SQL Server license type. + SQLServerLicenseType *string + + // The tags for the seed managed disks. + SeedManagedDiskTags map[string]*string + + // The selected recovery azure network Id. + SelectedRecoveryAzureNetworkID *string + + // The selected source nic Id which will be used as the primary nic during failover. + SelectedSourceNicID *string + + // The test failover virtual network. + SelectedTfoAzureNetworkID *string + + // The CPU count of the VM on the primary side. + SourceVMCPUCount *int32 + + // The RAM size of the VM on the primary side. + SourceVMRAMSizeInMB *int32 + + // A value indicating the inplace OS Upgrade version. + SupportedOSVersions []*string + + // The switch provider blocking error information. + SwitchProviderBlockingErrorDetails []*InMageAzureV2SwitchProviderBlockingErrorDetails + + // The switch provider blocking error information. + SwitchProviderDetails *InMageAzureV2SwitchProviderDetails + + // The target availability zone. + TargetAvailabilityZone *string + + // The tags for the target managed disks. + TargetManagedDiskTags map[string]*string + + // The tags for the target NICs. + TargetNicTags map[string]*string + + // The target proximity placement group Id. + TargetProximityPlacementGroupID *string + + // The ARM Id of the target Azure VM. This value will be null until the VM is failed over. Only after failure it will be populated + // with the ARM Id of the Azure VM. + TargetVMID *string + + // The target VM tags. + TargetVMTags map[string]*string + + // The total transferred data in bytes. + TotalDataTransferred *int64 + + // The progress health. + TotalProgressHealth *string + + // The uncompressed data change rate in MB. + UncompressedDataRateInMB *float64 + + // A value indicating whether managed disks should be used during failover. + UseManagedDisks *string + + // The vCenter infrastructure Id. + VCenterInfrastructureID *string + + // The virtual machine Id. + VMID *string + + // The PE Network details. + VMNics []*VMNicDetails + + // The protection state for the vm. + VMProtectionState *string + + // The protection state description for the vm. + VMProtectionStateDescription *string + + // The validation errors of the on-premise machine Value can be list of validation errors. + ValidationErrors []*HealthError + + // The OS disk VHD name. + VhdName *string + + // READ-ONLY; The last recovery point received time. + LastRecoveryPointReceived *time.Time + + // READ-ONLY; The name of the OS on the VM. + OSName *string +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// InMageAzureV2ReplicationDetails. +func (i *InMageAzureV2ReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return &ReplicationProviderSpecificSettings{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2ReprotectInput - InMageAzureV2 specific provider input. +type InMageAzureV2ReprotectInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The disks to include list. + DisksToInclude []*string + + // The storage account to be used for logging during replication. + LogStorageAccountID *string + + // The Master target Id. + MasterTargetID *string + + // The Policy Id. + PolicyID *string + + // The Process Server Id. + ProcessServerID *string + + // The CS account Id. + RunAsAccountID *string + + // The storage account id. + StorageAccountID *string +} + +// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface +// for type InMageAzureV2ReprotectInput. +func (i *InMageAzureV2ReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { + return &ReverseReplicationProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2SwitchProviderBlockingErrorDetails - InMageAzureV2 switch provider blocking error details. +type InMageAzureV2SwitchProviderBlockingErrorDetails struct { + // READ-ONLY; The error code. + ErrorCode *string + + // READ-ONLY; The error message. + ErrorMessage *string + + // READ-ONLY; The error message parameters. + ErrorMessageParameters map[string]*string + + // READ-ONLY; The error tags. + ErrorTags map[string]*string + + // READ-ONLY; The possible causes. + PossibleCauses *string + + // READ-ONLY; The recommended action. + RecommendedAction *string +} + +// InMageAzureV2SwitchProviderDetails - InMageAzureV2 switch provider details. +type InMageAzureV2SwitchProviderDetails struct { + // READ-ONLY; The target appliance Id. + TargetApplianceID *string + + // READ-ONLY; The target fabric Id. + TargetFabricID *string + + // READ-ONLY; The target resource Id. + TargetResourceID *string + + // READ-ONLY; The target vault Id. + TargetVaultID *string +} + +// InMageAzureV2SwitchProviderInput - Provider specific input for InMageAzureV2 switch provider. +type InMageAzureV2SwitchProviderInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The target appliance Id. + TargetApplianceID *string + + // REQUIRED; The target fabric Id. + TargetFabricID *string + + // REQUIRED; The target vault Id. + TargetVaultID *string +} + +// GetSwitchProviderSpecificInput implements the SwitchProviderSpecificInputClassification interface for type InMageAzureV2SwitchProviderInput. +func (i *InMageAzureV2SwitchProviderInput) GetSwitchProviderSpecificInput() *SwitchProviderSpecificInput { + return &SwitchProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2TestFailoverInput - InMageAzureV2 provider specific input for test failover. +type InMageAzureV2TestFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating the inplace OS Upgrade version. + OSUpgradeVersion *string + + // The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null + // should be passed. + RecoveryPointID *string +} + +// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type +// InMageAzureV2TestFailoverInput. +func (i *InMageAzureV2TestFailoverInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { + return &TestFailoverProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2UnplannedFailoverInput - InMageAzureV2 provider specific input for unplanned failover. +type InMageAzureV2UnplannedFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating the inplace OS Upgrade version. + OSUpgradeVersion *string + + // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should + // be passed. + RecoveryPointID *string +} + +// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface +// for type InMageAzureV2UnplannedFailoverInput. +func (i *InMageAzureV2UnplannedFailoverInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { + return &UnplannedFailoverProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageAzureV2UpdateReplicationProtectedItemInput - InMage Azure V2 input to update replication protected item. +type InMageAzureV2UpdateReplicationProtectedItemInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The recovery Azure resource group Id for classic deployment. + RecoveryAzureV1ResourceGroupID *string + + // The recovery Azure resource group Id for resource manager deployment. + RecoveryAzureV2ResourceGroupID *string + + // The SQL Server license type. + SQLServerLicenseType *SQLServerLicenseType + + // The target availability zone. + TargetAvailabilityZone *string + + // The tags for the target managed disks. + TargetManagedDiskTags map[string]*string + + // The tags for the target NICs. + TargetNicTags map[string]*string + + // The target proximity placement group Id. + TargetProximityPlacementGroupID *string + + // The target VM tags. + TargetVMTags map[string]*string + + // A value indicating whether managed disks should be used during failover. + UseManagedDisks *string + + // The list of disk update properties. + VMDisks []*UpdateDiskInput +} + +// GetUpdateReplicationProtectedItemProviderInput implements the UpdateReplicationProtectedItemProviderInputClassification +// interface for type InMageAzureV2UpdateReplicationProtectedItemInput. +func (i *InMageAzureV2UpdateReplicationProtectedItemInput) GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput { + return &UpdateReplicationProtectedItemProviderInput{ + InstanceType: i.InstanceType, + } +} + +// InMageBasePolicyDetails - Base class for the policies of providers using InMage replication. +type InMageBasePolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 + + // A value indicating whether multi-VM sync has to be enabled. + MultiVMSyncStatus *string + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 + + // The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type InMageBasePolicyDetails. +func (i *InMageBasePolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageDisableProtectionProviderSpecificInput - InMage disable protection provider specific input. +type InMageDisableProtectionProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating whether the replica VM should be destroyed or retained. Values from Delete and Retain. + ReplicaVMDeletionStatus *string +} + +// GetDisableProtectionProviderSpecificInput implements the DisableProtectionProviderSpecificInputClassification interface +// for type InMageDisableProtectionProviderSpecificInput. +func (i *InMageDisableProtectionProviderSpecificInput) GetDisableProtectionProviderSpecificInput() *DisableProtectionProviderSpecificInput { + return &DisableProtectionProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageDiskDetails - VMware/Physical specific Disk Details. +type InMageDiskDetails struct { + // Whether disk is dynamic disk or basic disk. + DiskConfiguration *string + + // The disk Id. + DiskID *string + + // The disk name. + DiskName *string + + // The disk size in MB. + DiskSizeInMB *string + + // Whether disk is system disk or data disk. + DiskType *string + + // Volumes of the disk. + VolumeList []*DiskVolumeDetails +} + +// InMageDiskExclusionInput - DiskExclusionInput when doing enable protection of virtual machine in InMage provider. +type InMageDiskExclusionInput struct { + // The guest disk signature based option for disk exclusion. + DiskSignatureOptions []*InMageDiskSignatureExclusionOptions + + // The volume label based option for disk exclusion. + VolumeOptions []*InMageVolumeExclusionOptions +} + +// InMageDiskSignatureExclusionOptions - Guest disk signature based disk exclusion option when doing enable protection of +// virtual machine in InMage provider. +type InMageDiskSignatureExclusionOptions struct { + // The guest signature of disk to be excluded from replication. + DiskSignature *string +} + +// InMageEnableProtectionInput - VMware Azure specific enable protection input. +type InMageEnableProtectionInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The Master Target Id. + MasterTargetID *string + + // REQUIRED; The multi VM group Id. + MultiVMGroupID *string + + // REQUIRED; The multi VM group name. + MultiVMGroupName *string + + // REQUIRED; The Process Server Id. + ProcessServerID *string + + // REQUIRED; The retention drive to use on the MT. + RetentionDrive *string + + // The target datastore name. + DatastoreName *string + + // The enable disk exclusion input. + DiskExclusionInput *InMageDiskExclusionInput + + // The disks to include list. + DisksToInclude []*string + + // The CS account Id. + RunAsAccountID *string + + // The VM Name. + VMFriendlyName *string +} + +// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for +// type InMageEnableProtectionInput. +func (i *InMageEnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { + return &EnableProtectionProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageFabricSwitchProviderBlockingErrorDetails - InMageFabric switch provider blocking error details. +type InMageFabricSwitchProviderBlockingErrorDetails struct { + // READ-ONLY; The error code. + ErrorCode *string + + // READ-ONLY; The error message. + ErrorMessage *string + + // READ-ONLY; The error message parameters. + ErrorMessageParameters map[string]*string + + // READ-ONLY; The error tags. + ErrorTags map[string]*string + + // READ-ONLY; The possible causes. + PossibleCauses *string + + // READ-ONLY; The recommended action. + RecommendedAction *string +} + +// InMagePolicyDetails - InMage specific protection profile details. +type InMagePolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 + + // A value indicating whether multi-VM sync has to be enabled. + MultiVMSyncStatus *string + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 + + // The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type InMagePolicyDetails. +func (i *InMagePolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMagePolicyInput - VMWare Azure specific protection profile Input. +type InMagePolicyInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. + MultiVMSyncStatus *SetMultiVMSyncStatus + + // The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 + + // The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 +} + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type InMagePolicyInput. +func (i *InMagePolicyInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return &PolicyProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageProtectedDiskDetails - InMage protected disk details. +type InMageProtectedDiskDetails struct { + // The disk capacity in bytes. + DiskCapacityInBytes *int64 + + // The disk id. + DiskID *string + + // The disk name. + DiskName *string + + // A value indicating whether disk is resized. + DiskResized *string + + // The file system capacity in bytes. + FileSystemCapacityInBytes *int64 + + // The health error code for the disk. + HealthErrorCode *string + + // The last RPO calculated time. + LastRpoCalculatedTime *time.Time + + // The Progress Health. + ProgressHealth *string + + // The Progress Status. + ProgressStatus *string + + // The protection stage. + ProtectionStage *string + + // The PS data transit in MB. + PsDataInMB *float64 + + // The resync duration in seconds. + ResyncDurationInSeconds *int64 + + // The resync last 15 minutes transferred bytes. + ResyncLast15MinutesTransferredBytes *int64 + + // The last data transfer time in UTC. + ResyncLastDataTransferTimeUTC *time.Time + + // The resync processed bytes. + ResyncProcessedBytes *int64 + + // The resync progress percentage. + ResyncProgressPercentage *int32 + + // A value indicating whether resync is required for this disk. + ResyncRequired *string + + // The resync start time. + ResyncStartTime *time.Time + + // The resync total transferred bytes. + ResyncTotalTransferredBytes *int64 + + // The RPO in seconds. + RpoInSeconds *int64 + + // The source data transit in MB. + SourceDataInMB *float64 + + // The target data transit in MB. + TargetDataInMB *float64 +} + +// InMageRcmAddDisksInput - InMageRcm add disk(s) input. +type InMageRcmAddDisksInput struct { + // REQUIRED; The list of disk details. + Disks []*InMageRcmDiskInput + + // REQUIRED; The class type. + InstanceType *string +} + +// GetAddDisksProviderSpecificInput implements the AddDisksProviderSpecificInputClassification interface for type InMageRcmAddDisksInput. +func (i *InMageRcmAddDisksInput) GetAddDisksProviderSpecificInput() *AddDisksProviderSpecificInput { + return &AddDisksProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmAgentUpgradeBlockingErrorDetails - InMageRcm source agent upgrade blocking error details. +type InMageRcmAgentUpgradeBlockingErrorDetails struct { + // READ-ONLY; The error code. + ErrorCode *string + + // READ-ONLY; The error message. + ErrorMessage *string + + // READ-ONLY; The error message parameters. + ErrorMessageParameters map[string]*string + + // READ-ONLY; The error tags. + ErrorTags map[string]*string + + // READ-ONLY; The possible causes. + PossibleCauses *string + + // READ-ONLY; The recommended action. + RecommendedAction *string +} + +// InMageRcmApplianceDetails - InMageRcm appliance details. +type InMageRcmApplianceDetails struct { + // READ-ONLY; The DRA. + Dra *DraDetails + + // READ-ONLY; The fabric ARM Id. + FabricArmID *string + + // READ-ONLY; The appliance Id. + ID *string + + // READ-ONLY; The Mars agent. + MarsAgent *MarsAgentDetails + + // READ-ONLY; The appliance name. + Name *string + + // READ-ONLY; The process server. + ProcessServer *ProcessServerDetails + + // READ-ONLY; The push installer. + PushInstaller *PushInstallerDetails + + // READ-ONLY; The of RCM proxy. + RcmProxy *RcmProxyDetails + + // READ-ONLY; The replication agent. + ReplicationAgent *ReplicationAgentDetails + + // READ-ONLY; The reprotect agent. + ReprotectAgent *ReprotectAgentDetails + + // READ-ONLY; The switch provider blocking error information. + SwitchProviderBlockingErrorDetails []*InMageRcmFabricSwitchProviderBlockingErrorDetails +} + +// InMageRcmApplianceSpecificDetails - InMageRcm appliance specific details. +type InMageRcmApplianceSpecificDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // READ-ONLY; The list of appliances. + Appliances []*InMageRcmApplianceDetails +} + +// GetApplianceSpecificDetails implements the ApplianceSpecificDetailsClassification interface for type InMageRcmApplianceSpecificDetails. +func (i *InMageRcmApplianceSpecificDetails) GetApplianceSpecificDetails() *ApplianceSpecificDetails { + return &ApplianceSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmApplyRecoveryPointInput - ApplyRecoveryPoint input specific to InMageRcm provider. +type InMageRcmApplyRecoveryPointInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The recovery point Id. + RecoveryPointID *string +} + +// GetApplyRecoveryPointProviderSpecificInput implements the ApplyRecoveryPointProviderSpecificInputClassification interface +// for type InMageRcmApplyRecoveryPointInput. +func (i *InMageRcmApplyRecoveryPointInput) GetApplyRecoveryPointProviderSpecificInput() *ApplyRecoveryPointProviderSpecificInput { + return &ApplyRecoveryPointProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmDiscoveredProtectedVMDetails - InMageRcm discovered protected VM details. +type InMageRcmDiscoveredProtectedVMDetails struct { + // READ-ONLY; The SDS created timestamp. + CreatedTimestamp *time.Time + + // READ-ONLY; The list of datastores. + Datastores []*string + + // READ-ONLY; The list of IP addresses. + IPAddresses []*string + + // READ-ONLY; A value indicating whether the VM is deleted. + IsDeleted *bool + + // READ-ONLY; The last time when SDS information discovered in SRS. + LastDiscoveryTimeInUTC *time.Time + + // READ-ONLY; The VM's OS name. + OSName *string + + // READ-ONLY; The VM power status. + PowerStatus *string + + // READ-ONLY; The SDS updated timestamp. + UpdatedTimestamp *time.Time + + // READ-ONLY; The VCenter fqdn. + VCenterFqdn *string + + // READ-ONLY; The VCenter Id. + VCenterID *string + + // READ-ONLY; The VM fqdn. + VMFqdn *string + + // READ-ONLY; The VMware tools status. + VmwareToolsStatus *string +} + +// InMageRcmDiskInput - InMageRcm disk input. +type InMageRcmDiskInput struct { + // REQUIRED; The disk Id. + DiskID *string + + // REQUIRED; The disk type. + DiskType *DiskAccountType + + // REQUIRED; The log storage account ARM Id. + LogStorageAccountID *string + + // The DiskEncryptionSet ARM Id. + DiskEncryptionSetID *string + + // The logical sector size (in bytes), 512 by default. + SectorSizeInBytes *int32 +} + +// InMageRcmDisksDefaultInput - InMageRcm disk input. +type InMageRcmDisksDefaultInput struct { + // REQUIRED; The disk type. + DiskType *DiskAccountType + + // REQUIRED; The log storage account ARM Id. + LogStorageAccountID *string + + // The DiskEncryptionSet ARM Id. + DiskEncryptionSetID *string + + // The logical sector size (in bytes), 512 by default. + SectorSizeInBytes *int32 +} + +// InMageRcmEnableProtectionInput - InMageRcm specific enable protection input. +type InMageRcmEnableProtectionInput struct { + // REQUIRED; The ARM Id of discovered machine. + FabricDiscoveryMachineID *string + + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The process server Id. + ProcessServerID *string + + // REQUIRED; The target resource group ARM Id. + TargetResourceGroupID *string + + // The default disk input. + DisksDefault *InMageRcmDisksDefaultInput + + // The disks to include list. + DisksToInclude []*InMageRcmDiskInput + + // The license type. + LicenseType *LicenseType + + // The license type for Linux VM's. + LinuxLicenseType *LinuxLicenseType + + // The multi VM group name. + MultiVMGroupName *string + + // The run-as account Id. + RunAsAccountID *string + + // The SQL Server license type. + SQLServerLicenseType *SQLServerLicenseType + + // The tags for the seed managed disks. + SeedManagedDiskTags []*UserCreatedResourceTag + + // The target availability set ARM Id. + TargetAvailabilitySetID *string + + // The target availability zone. + TargetAvailabilityZone *string + + // The target boot diagnostics storage account ARM Id. + TargetBootDiagnosticsStorageAccountID *string + + // The tags for the target managed disks. + TargetManagedDiskTags []*UserCreatedResourceTag + + // The selected target network ARM Id. + TargetNetworkID *string + + // The tags for the target NICs. + TargetNicTags []*UserCreatedResourceTag + + // The target proximity placement group Id. + TargetProximityPlacementGroupID *string + + // The selected target subnet name. + TargetSubnetName *string + + // The target VM name. + TargetVMName *string + + // The target VM security profile. + TargetVMSecurityProfile *SecurityProfileProperties + + // The target VM size. + TargetVMSize *string + + // The target VM tags. + TargetVMTags []*UserCreatedResourceTag + + // The selected test network ARM Id. + TestNetworkID *string + + // The selected test subnet name. + TestSubnetName *string + + // The OS name selected by user. + UserSelectedOSName *string +} + +// GetEnableProtectionProviderSpecificInput implements the EnableProtectionProviderSpecificInputClassification interface for +// type InMageRcmEnableProtectionInput. +func (i *InMageRcmEnableProtectionInput) GetEnableProtectionProviderSpecificInput() *EnableProtectionProviderSpecificInput { + return &EnableProtectionProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmEventDetails - Event details for InMageRcm provider. +type InMageRcmEventDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // READ-ONLY; The appliance name. + ApplianceName *string + + // READ-ONLY; The component display name. + ComponentDisplayName *string + + // READ-ONLY; The fabric name. + FabricName *string + + // READ-ONLY; The job Id. + JobID *string + + // READ-ONLY; The latest agent version. + LatestAgentVersion *string + + // READ-ONLY; The protected item name. + ProtectedItemName *string + + // READ-ONLY; The server type. + ServerType *string + + // READ-ONLY; The protected item name. + VMName *string +} + +// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type InMageRcmEventDetails. +func (i *InMageRcmEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { + return &EventProviderSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmFabricCreationInput - InMageRcm fabric provider specific settings. +type InMageRcmFabricCreationInput struct { + // REQUIRED; Gets the class type. + InstanceType *string + + // REQUIRED; The ARM Id of the physical site. + PhysicalSiteID *string + + // REQUIRED; The identity provider input for source agent authentication. + SourceAgentIdentity *IdentityProviderInput + + // REQUIRED; The ARM Id of the VMware site. + VmwareSiteID *string +} + +// GetFabricSpecificCreationInput implements the FabricSpecificCreationInputClassification interface for type InMageRcmFabricCreationInput. +func (i *InMageRcmFabricCreationInput) GetFabricSpecificCreationInput() *FabricSpecificCreationInput { + return &FabricSpecificCreationInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmFabricSpecificDetails - InMageRcm fabric specific details. +type InMageRcmFabricSpecificDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The source agent identity details. + SourceAgentIdentityDetails *IdentityProviderDetails + + // READ-ONLY; The list of agent details. + AgentDetails []*AgentDetails + + // READ-ONLY; The control plane Uri. + ControlPlaneURI *string + + // READ-ONLY; The data plane Uri. + DataPlaneURI *string + + // READ-ONLY; The list of DRAs. + Dras []*DraDetails + + // READ-ONLY; The list of Mars agents. + MarsAgents []*MarsAgentDetails + + // READ-ONLY; The ARM Id of the physical site. + PhysicalSiteID *string + + // READ-ONLY; The list of process servers. + ProcessServers []*ProcessServerDetails + + // READ-ONLY; The list of push installers. + PushInstallers []*PushInstallerDetails + + // READ-ONLY; The list of RCM proxies. + RcmProxies []*RcmProxyDetails + + // READ-ONLY; The list of replication agents. + ReplicationAgents []*ReplicationAgentDetails + + // READ-ONLY; The list of reprotect agents. + ReprotectAgents []*ReprotectAgentDetails + + // READ-ONLY; The service container Id. + ServiceContainerID *string + + // READ-ONLY; The service endpoint. + ServiceEndpoint *string + + // READ-ONLY; The service resource Id. + ServiceResourceID *string + + // READ-ONLY; The ARM Id of the VMware site. + VmwareSiteID *string +} + +// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type InMageRcmFabricSpecificDetails. +func (i *InMageRcmFabricSpecificDetails) GetFabricSpecificDetails() *FabricSpecificDetails { + return &FabricSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmFabricSwitchProviderBlockingErrorDetails - InMageRcmFabric switch provider blocking error details. +type InMageRcmFabricSwitchProviderBlockingErrorDetails struct { + // READ-ONLY; The error code. + ErrorCode *string + + // READ-ONLY; The error message. + ErrorMessage *string + + // READ-ONLY; The error message parameters. + ErrorMessageParameters map[string]*string + + // READ-ONLY; The error tags. + ErrorTags map[string]*string + + // READ-ONLY; The possible causes. + PossibleCauses *string + + // READ-ONLY; The recommended action. + RecommendedAction *string +} + +// InMageRcmFailbackDiscoveredProtectedVMDetails - InMageRcmFailback discovered VM details. +type InMageRcmFailbackDiscoveredProtectedVMDetails struct { + // READ-ONLY; The SDS created timestamp. + CreatedTimestamp *time.Time + + // READ-ONLY; The list of datastores. + Datastores []*string + + // READ-ONLY; The list of IP addresses. + IPAddresses []*string + + // READ-ONLY; A value indicating whether the VM is deleted. + IsDeleted *bool + + // READ-ONLY; The last time when SDS information discovered in SRS. + LastDiscoveryTimeInUTC *time.Time + + // READ-ONLY; The VM's OS name. + OSName *string + + // READ-ONLY; The VM power status. + PowerStatus *string + + // READ-ONLY; The SDS updated timestamp. + UpdatedTimestamp *time.Time + + // READ-ONLY; The VCenter fqdn. + VCenterFqdn *string + + // READ-ONLY; The VCenter Id. + VCenterID *string + + // READ-ONLY; The VM fqdn. + VMFqdn *string + + // READ-ONLY; The VMware tools status. + VmwareToolsStatus *string +} + +// InMageRcmFailbackEventDetails - Event details for InMageRcmFailback provider. +type InMageRcmFailbackEventDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // READ-ONLY; The appliance name. + ApplianceName *string + + // READ-ONLY; The component display name. + ComponentDisplayName *string + + // READ-ONLY; The protected item name. + ProtectedItemName *string + + // READ-ONLY; The server type. + ServerType *string + + // READ-ONLY; The protected item name. + VMName *string +} + +// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type InMageRcmFailbackEventDetails. +func (i *InMageRcmFailbackEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { + return &EventProviderSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmFailbackMobilityAgentDetails - InMageRcmFailback mobility agent details. +type InMageRcmFailbackMobilityAgentDetails struct { + // READ-ONLY; The agent version expiry date. + AgentVersionExpiryDate *time.Time + + // READ-ONLY; The driver version. + DriverVersion *string + + // READ-ONLY; The driver version expiry date. + DriverVersionExpiryDate *time.Time + + // READ-ONLY; A value indicating whether agent is upgradeable or not. + IsUpgradeable *string + + // READ-ONLY; The time of the last heartbeat received from the agent. + LastHeartbeatUTC *time.Time + + // READ-ONLY; The latest upgradeable version available without reboot. + LatestUpgradableVersionWithoutReboot *string + + // READ-ONLY; The latest agent version available. + LatestVersion *string + + // READ-ONLY; The whether update is possible or not. + ReasonsBlockingUpgrade []*AgentUpgradeBlockedReason + + // READ-ONLY; The agent version. + Version *string +} + +// InMageRcmFailbackNicDetails - InMageRcmFailback NIC details. +type InMageRcmFailbackNicDetails struct { + // READ-ONLY; The adapter type. + AdapterType *string + + // READ-ONLY; The mac address. + MacAddress *string + + // READ-ONLY; The network name. + NetworkName *string + + // READ-ONLY; The IP address. + SourceIPAddress *string +} + +// InMageRcmFailbackPlannedFailoverProviderInput - Provider specific input for InMageRcmFailback failover. +type InMageRcmFailbackPlannedFailoverProviderInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The recovery point type. + RecoveryPointType *InMageRcmFailbackRecoveryPointType +} + +// GetPlannedFailoverProviderSpecificFailoverInput implements the PlannedFailoverProviderSpecificFailoverInputClassification +// interface for type InMageRcmFailbackPlannedFailoverProviderInput. +func (i *InMageRcmFailbackPlannedFailoverProviderInput) GetPlannedFailoverProviderSpecificFailoverInput() *PlannedFailoverProviderSpecificFailoverInput { + return &PlannedFailoverProviderSpecificFailoverInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmFailbackPolicyCreationInput - InMageRcmFailback policy creation input. +type InMageRcmFailbackPolicyCreationInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency (in minutes). + CrashConsistentFrequencyInMinutes *int32 +} + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type InMageRcmFailbackPolicyCreationInput. +func (i *InMageRcmFailbackPolicyCreationInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return &PolicyProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmFailbackPolicyDetails - InMageRcm failback specific policy details. +type InMageRcmFailbackPolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency in minutes. + CrashConsistentFrequencyInMinutes *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type InMageRcmFailbackPolicyDetails. +func (i *InMageRcmFailbackPolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmFailbackProtectedDiskDetails - InMageRcmFailback protected disk details. +type InMageRcmFailbackProtectedDiskDetails struct { + // The initial replication details. + IrDetails *InMageRcmFailbackSyncDetails + + // The resync details. + ResyncDetails *InMageRcmFailbackSyncDetails + + // READ-ONLY; The disk capacity in bytes. + CapacityInBytes *int64 + + // READ-ONLY; The data pending at source agent in MB. + DataPendingAtSourceAgentInMB *float64 + + // READ-ONLY; The data pending in log data store in MB. + DataPendingInLogDataStoreInMB *float64 + + // READ-ONLY; The disk Id (reported by source agent). + DiskID *string + + // READ-ONLY; The disk name. + DiskName *string + + // READ-ONLY; The disk Uuid (reported by vCenter). + DiskUUID *string + + // READ-ONLY; A value indicating whether initial replication is complete or not. + IsInitialReplicationComplete *string + + // READ-ONLY; A value indicating whether the disk is the OS disk. + IsOSDisk *string + + // READ-ONLY; The last sync time. + LastSyncTime *time.Time +} + +// InMageRcmFailbackReplicationDetails - InMageRcmFailback provider specific details. +type InMageRcmFailbackReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The discovered VM information. + DiscoveredVMDetails *InMageRcmFailbackDiscoveredProtectedVMDetails + + // The mobility agent information. + MobilityAgentDetails *InMageRcmFailbackMobilityAgentDetails + + // The list of protected disks. + ProtectedDisks []*InMageRcmFailbackProtectedDiskDetails + + // The network details. + VMNics []*InMageRcmFailbackNicDetails + + // READ-ONLY; The ARM Id of the azure VM. + AzureVirtualMachineID *string + + // READ-ONLY; The initial replication processed bytes. This includes sum of total bytes transferred and matched bytes on all + // selected disks in source VM. + InitialReplicationProcessedBytes *int64 + + // READ-ONLY; The initial replication progress health. + InitialReplicationProgressHealth *VMReplicationProgressHealth + + // READ-ONLY; The initial replication progress percentage. + InitialReplicationProgressPercentage *int32 + + // READ-ONLY; The initial replication transferred bytes from source VM to target for all selected disks on source VM. + InitialReplicationTransferredBytes *int64 + + // READ-ONLY; The virtual machine internal identifier. + InternalIdentifier *string + + // READ-ONLY; A value indicating whether agent registration was successful after failover. + IsAgentRegistrationSuccessfulAfterFailover *bool + + // READ-ONLY; The last planned failover start time. + LastPlannedFailoverStartTime *time.Time + + // READ-ONLY; The last planned failover status. + LastPlannedFailoverStatus *PlannedFailoverStatus + + // READ-ONLY; The policy friendly name used by the forward replication. + LastUsedPolicyFriendlyName *string + + // READ-ONLY; The policy Id used by the forward replication. + LastUsedPolicyID *string + + // READ-ONLY; The log storage account ARM Id. + LogStorageAccountID *string + + // READ-ONLY; The multi VM group name. + MultiVMGroupName *string + + // READ-ONLY; The type of the OS on the VM. + OSType *string + + // READ-ONLY; The reprotect agent Id. + ReprotectAgentID *string + + // READ-ONLY; The reprotect agent name. + ReprotectAgentName *string + + // READ-ONLY; The resync processed bytes. This includes sum of total bytes transferred and matched bytes on all selected disks + // in source VM. + ResyncProcessedBytes *int64 + + // READ-ONLY; The resync progress health. + ResyncProgressHealth *VMReplicationProgressHealth + + // READ-ONLY; The resync progress percentage. + ResyncProgressPercentage *int32 + + // READ-ONLY; A value indicating whether resync is required. + ResyncRequired *string + + // READ-ONLY; The resync state. + ResyncState *ResyncState + + // READ-ONLY; The resync transferred bytes from source VM to target for all selected disks on source VM. + ResyncTransferredBytes *int64 + + // READ-ONLY; The target datastore name. + TargetDataStoreName *string + + // READ-ONLY; The target VM name. + TargetVMName *string + + // READ-ONLY; The target vCenter Id. + TargetvCenterID *string +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// InMageRcmFailbackReplicationDetails. +func (i *InMageRcmFailbackReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return &ReplicationProviderSpecificSettings{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmFailbackReprotectInput - InMageRcmFailback specific provider input. +type InMageRcmFailbackReprotectInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The Policy Id. + PolicyID *string + + // REQUIRED; The process server Id. + ProcessServerID *string + + // The run as account Id. + RunAsAccountID *string +} + +// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface +// for type InMageRcmFailbackReprotectInput. +func (i *InMageRcmFailbackReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { + return &ReverseReplicationProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmFailbackSyncDetails - InMageRcmFailback disk level sync details. +type InMageRcmFailbackSyncDetails struct { + // READ-ONLY; The bytes transferred in last 15 minutes from source VM to target. + Last15MinutesTransferredBytes *int64 + + // READ-ONLY; The time of the last data transfer from source VM to target. + LastDataTransferTimeUTC *string + + // READ-ONLY; The last refresh time. + LastRefreshTime *string + + // READ-ONLY; The total processed bytes. This includes bytes that are transferred from source VM to target and matched bytes. + ProcessedBytes *int64 + + // READ-ONLY; The progress health. + ProgressHealth *DiskReplicationProgressHealth + + // READ-ONLY; Progress in percentage. Progress percentage is calculated based on processed bytes. + ProgressPercentage *int32 + + // READ-ONLY; The start time. + StartTime *string + + // READ-ONLY; The transferred bytes from source VM to azure for the disk. + TransferredBytes *int64 +} + +// InMageRcmLastAgentUpgradeErrorDetails - InMageRcm last source agent upgrade error details. +type InMageRcmLastAgentUpgradeErrorDetails struct { + // READ-ONLY; The error code. + ErrorCode *string + + // READ-ONLY; The error message. + ErrorMessage *string + + // READ-ONLY; The error message parameters. + ErrorMessageParameters map[string]*string + + // READ-ONLY; The error tags. + ErrorTags map[string]*string + + // READ-ONLY; The possible causes. + PossibleCauses *string + + // READ-ONLY; The recommended action. + RecommendedAction *string +} + +// InMageRcmMobilityAgentDetails - InMageRcm mobility agent details. +type InMageRcmMobilityAgentDetails struct { + // READ-ONLY; The agent version expiry date. + AgentVersionExpiryDate *time.Time + + // READ-ONLY; The driver version. + DriverVersion *string + + // READ-ONLY; The driver version expiry date. + DriverVersionExpiryDate *time.Time + + // READ-ONLY; A value indicating whether agent is upgradeable or not. + IsUpgradeable *string + + // READ-ONLY; The time of the last heartbeat received from the agent. + LastHeartbeatUTC *time.Time + + // READ-ONLY; The latest agent version release date. + LatestAgentReleaseDate *string + + // READ-ONLY; The latest upgradeable version available without reboot. + LatestUpgradableVersionWithoutReboot *string + + // READ-ONLY; The latest agent version available. + LatestVersion *string + + // READ-ONLY; The whether update is possible or not. + ReasonsBlockingUpgrade []*AgentUpgradeBlockedReason + + // READ-ONLY; The agent version. + Version *string +} + +// InMageRcmNicDetails - InMageRcm NIC details. +type InMageRcmNicDetails struct { + // A value indicating whether this is the primary NIC. + IsPrimaryNic *string + + // A value indicating whether this NIC is selected for failover. + IsSelectedForFailover *string + + // The target IP address. + TargetIPAddress *string + + // The target IP address type. + TargetIPAddressType *EthernetAddressType + + // The target NIC name. + TargetNicName *string + + // Target subnet name. + TargetSubnetName *string + + // The test IP address. + TestIPAddress *string + + // The test IP address type. + TestIPAddressType *EthernetAddressType + + // Test subnet name. + TestSubnetName *string + + // READ-ONLY; The NIC Id. + NicID *string + + // READ-ONLY; The source IP address. + SourceIPAddress *string + + // READ-ONLY; The source IP address type. + SourceIPAddressType *EthernetAddressType + + // READ-ONLY; Source network Id. + SourceNetworkID *string + + // READ-ONLY; Source subnet name. + SourceSubnetName *string +} + +// InMageRcmNicInput - InMageRcm NIC input. +type InMageRcmNicInput struct { + // REQUIRED; A value indicating whether this is the primary NIC. + IsPrimaryNic *string + + // REQUIRED; The NIC Id. + NicID *string + + // A value indicating whether this NIC is selected for failover. + IsSelectedForFailover *string + + // The target NIC name. + TargetNicName *string + + // The target static IP address. + TargetStaticIPAddress *string + + // Target subnet name. + TargetSubnetName *string + + // The test static IP address. + TestStaticIPAddress *string + + // The test subnet name. + TestSubnetName *string +} + +// InMageRcmPolicyCreationInput - InMageRcm policy creation input. +type InMageRcmPolicyCreationInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency (in minutes). + CrashConsistentFrequencyInMinutes *int32 + + // A value indicating whether multi-VM sync has to be enabled. + EnableMultiVMSync *string + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistoryInMinutes *int32 +} + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type InMageRcmPolicyCreationInput. +func (i *InMageRcmPolicyCreationInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return &PolicyProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmPolicyDetails - InMageRcm specific policy details. +type InMageRcmPolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency in minutes. + CrashConsistentFrequencyInMinutes *int32 + + // A value indicating whether multi-VM sync has to be enabled. + EnableMultiVMSync *string + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistoryInMinutes *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type InMageRcmPolicyDetails. +func (i *InMageRcmPolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmProtectedDiskDetails - InMageRcm protected disk details. +type InMageRcmProtectedDiskDetails struct { + // The custom target Azure disk name. + CustomTargetDiskName *string + + // The disk type. + DiskType *DiskAccountType + + // The initial replication details. + IrDetails *InMageRcmSyncDetails + + // The resync details. + ResyncDetails *InMageRcmSyncDetails + + // The logical sector size (in bytes), 512 by default. + SectorSizeInBytes *int32 + + // READ-ONLY; The disk capacity in bytes. + CapacityInBytes *int64 + + // READ-ONLY; The data pending at source agent in MB. + DataPendingAtSourceAgentInMB *float64 + + // READ-ONLY; The data pending in log data store in MB. + DataPendingInLogDataStoreInMB *float64 + + // READ-ONLY; The DiskEncryptionSet ARM Id. + DiskEncryptionSetID *string + + // READ-ONLY; The disk Id. + DiskID *string + + // READ-ONLY; The disk name. + DiskName *string + + // READ-ONLY; The disk state. + DiskState *DiskState + + // READ-ONLY; A value indicating whether initial replication is complete or not. + IsInitialReplicationComplete *string + + // READ-ONLY; A value indicating whether the disk is the OS disk. + IsOSDisk *string + + // READ-ONLY; The log storage account ARM Id. + LogStorageAccountID *string + + // READ-ONLY; The uri of the seed blob. + SeedBlobURI *string + + // READ-ONLY; The ARM Id of the seed managed disk. + SeedManagedDiskID *string + + // READ-ONLY; The ARM Id of the target managed disk. + TargetManagedDiskID *string +} + +// InMageRcmProtectionContainerMappingDetails - InMageRcm provider specific container mapping details. +type InMageRcmProtectionContainerMappingDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // READ-ONLY; A value indicating whether the flag for enable agent auto upgrade. + EnableAgentAutoUpgrade *string +} + +// GetProtectionContainerMappingProviderSpecificDetails implements the ProtectionContainerMappingProviderSpecificDetailsClassification +// interface for type InMageRcmProtectionContainerMappingDetails. +func (i *InMageRcmProtectionContainerMappingDetails) GetProtectionContainerMappingProviderSpecificDetails() *ProtectionContainerMappingProviderSpecificDetails { + return &ProtectionContainerMappingProviderSpecificDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmRecoveryPointDetails - InMageRcm provider specific recovery point details. +type InMageRcmRecoveryPointDetails struct { + // REQUIRED; Gets the provider type. + InstanceType *string + + // READ-ONLY; A value indicating whether the recovery point is multi VM consistent. + IsMultiVMSyncPoint *string +} + +// GetProviderSpecificRecoveryPointDetails implements the ProviderSpecificRecoveryPointDetailsClassification interface for +// type InMageRcmRecoveryPointDetails. +func (i *InMageRcmRecoveryPointDetails) GetProviderSpecificRecoveryPointDetails() *ProviderSpecificRecoveryPointDetails { + return &ProviderSpecificRecoveryPointDetails{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmReplicationDetails - InMageRcm provider specific details. +type InMageRcmReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The agent upgrade blocking error information. + AgentUpgradeBlockingErrorDetails []*InMageRcmAgentUpgradeBlockingErrorDetails + + // The discovered VM details. + DiscoveredVMDetails *InMageRcmDiscoveredProtectedVMDetails + + // The last agent upgrade error information. + LastAgentUpgradeErrorDetails []*InMageRcmLastAgentUpgradeErrorDetails + + // License Type of the VM to be used. + LicenseType *string + + // The license type for Linux VM's. + LinuxLicenseType *LinuxLicenseType + + // The mobility agent information. + MobilityAgentDetails *InMageRcmMobilityAgentDetails + + // The OS name associated with VM. + OSName *string + + // The list of protected disks. + ProtectedDisks []*InMageRcmProtectedDiskDetails + + // The SQL Server license type. + SQLServerLicenseType *string + + // The tags for the seed managed disks. + SeedManagedDiskTags []*UserCreatedResourceTag + + // A value indicating the inplace OS Upgrade version. + SupportedOSVersions []*string + + // The target availability set Id. + TargetAvailabilitySetID *string + + // The target availability zone. + TargetAvailabilityZone *string + + // The target boot diagnostics storage account ARM Id. + TargetBootDiagnosticsStorageAccountID *string + + // The target location. + TargetLocation *string + + // The tags for the target managed disks. + TargetManagedDiskTags []*UserCreatedResourceTag + + // The target network Id. + TargetNetworkID *string + + // The tags for the target NICs. + TargetNicTags []*UserCreatedResourceTag + + // The target proximity placement group Id. + TargetProximityPlacementGroupID *string + + // The target resource group Id. + TargetResourceGroupID *string + + // Target VM name. + TargetVMName *string + + // The target VM security profile. + TargetVMSecurityProfile *SecurityProfileProperties + + // The target VM size. + TargetVMSize *string + + // The target VM tags. + TargetVMTags []*UserCreatedResourceTag + + // The test network Id. + TestNetworkID *string + + // The list of unprotected disks. + UnprotectedDisks []*InMageRcmUnProtectedDiskDetails + + // The network details. + VMNics []*InMageRcmNicDetails + + // READ-ONLY; The agent version to which last agent upgrade was attempted. + AgentUpgradeAttemptToVersion *string + + // READ-ONLY; The agent upgrade job Id. + AgentUpgradeJobID *string + + // READ-ONLY; The agent auto upgrade state. + AgentUpgradeState *MobilityAgentUpgradeState + + // READ-ONLY; The allocated memory in MB. + AllocatedMemoryInMB *float64 + + // READ-ONLY; The type of the discovered VM. + DiscoveryType *string + + // READ-ONLY; The ARM Id of the discovered VM. + FabricDiscoveryMachineID *string + + // READ-ONLY; The recovery point Id to which the VM was failed over. + FailoverRecoveryPointID *string + + // READ-ONLY; The firmware type. + FirmwareType *string + + // READ-ONLY; The initial replication processed bytes. This includes sum of total bytes transferred and matched bytes on all + // selected disks in source VM. + InitialReplicationProcessedBytes *int64 + + // READ-ONLY; The initial replication progress health. + InitialReplicationProgressHealth *VMReplicationProgressHealth + + // READ-ONLY; The initial replication progress percentage. This is calculated based on total bytes processed for all disks + // in the source VM. + InitialReplicationProgressPercentage *int32 + + // READ-ONLY; The initial replication transferred bytes from source VM to azure for all selected disks on source VM. + InitialReplicationTransferredBytes *int64 + + // READ-ONLY; The virtual machine internal identifier. + InternalIdentifier *string + + // READ-ONLY; A value indicating whether agent registration was successful after failover. + IsAgentRegistrationSuccessfulAfterFailover *bool + + // READ-ONLY; A value indicating whether last agent upgrade was successful or not. + IsLastUpgradeSuccessful *string + + // READ-ONLY; The last agent upgrade type. + LastAgentUpgradeType *string + + // READ-ONLY; The last recovery point Id. + LastRecoveryPointID *string + + // READ-ONLY; The last recovery point received time. + LastRecoveryPointReceived *time.Time + + // READ-ONLY; The last recovery point objective calculated time. + LastRpoCalculatedTime *time.Time + + // READ-ONLY; The last recovery point objective value. + LastRpoInSeconds *int64 + + // READ-ONLY; The multi VM group name. + MultiVMGroupName *string + + // READ-ONLY; The type of the OS on the VM. + OSType *string + + // READ-ONLY; The IP address of the primary network interface. + PrimaryNicIPAddress *string + + // READ-ONLY; The process server Id. + ProcessServerID *string + + // READ-ONLY; The process server name. + ProcessServerName *string + + // READ-ONLY; The processor core count. + ProcessorCoreCount *int32 + + // READ-ONLY; The resync processed bytes. This includes sum of total bytes transferred and matched bytes on all selected disks + // in source VM. + ResyncProcessedBytes *int64 + + // READ-ONLY; The resync progress health. + ResyncProgressHealth *VMReplicationProgressHealth + + // READ-ONLY; The resync progress percentage. This is calculated based on total bytes processed for all disks in the source + // VM. + ResyncProgressPercentage *int32 + + // READ-ONLY; A value indicating whether resync is required. + ResyncRequired *string + + // READ-ONLY; The resync state. + ResyncState *ResyncState + + // READ-ONLY; The resync transferred bytes from source VM to azure for all selected disks on source VM. + ResyncTransferredBytes *int64 + + // READ-ONLY; The run-as account Id. + RunAsAccountID *string + + // READ-ONLY; The replication storage account ARM Id. This is applicable only for the blob based replication test hook. + StorageAccountID *string + + // READ-ONLY; The target generation. + TargetGeneration *string +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// InMageRcmReplicationDetails. +func (i *InMageRcmReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return &ReplicationProviderSpecificSettings{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmReprotectInput - InMageRcm specific provider input. +type InMageRcmReprotectInput struct { + // REQUIRED; The target datastore name. + DatastoreName *string + + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The log storage account ARM Id. + LogStorageAccountID *string + + // REQUIRED; The reprotect agent Id. + ReprotectAgentID *string + + // The Policy Id. + PolicyID *string +} + +// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface +// for type InMageRcmReprotectInput. +func (i *InMageRcmReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { + return &ReverseReplicationProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmSyncDetails - InMageRcm disk level sync details. +type InMageRcmSyncDetails struct { + // READ-ONLY; The bytes transferred in last 15 minutes from source VM to azure. + Last15MinutesTransferredBytes *int64 + + // READ-ONLY; The time of the last data transfer from source VM to azure. + LastDataTransferTimeUTC *string + + // READ-ONLY; The last refresh time. + LastRefreshTime *string + + // READ-ONLY; The total processed bytes. This includes bytes that are transferred from source VM to azure and matched bytes. + ProcessedBytes *int64 + + // READ-ONLY; The progress health. + ProgressHealth *DiskReplicationProgressHealth + + // READ-ONLY; Progress in percentage. Progress percentage is calculated based on processed bytes. + ProgressPercentage *int32 + + // READ-ONLY; The start time. + StartTime *string + + // READ-ONLY; The transferred bytes from source VM to azure for the disk. + TransferredBytes *int64 +} + +// InMageRcmTestFailoverInput - InMageRcm provider specific input for test failover. +type InMageRcmTestFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The test network Id. + NetworkID *string + + // A value indicating the inplace OS Upgrade version. + OSUpgradeVersion *string + + // The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null + // should be passed. + RecoveryPointID *string +} + +// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type +// InMageRcmTestFailoverInput. +func (i *InMageRcmTestFailoverInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { + return &TestFailoverProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmUnProtectedDiskDetails - InMageRcm un-protected disk details. +type InMageRcmUnProtectedDiskDetails struct { + // READ-ONLY; The disk capacity in bytes. + CapacityInBytes *int64 + + // READ-ONLY; The disk Id. + DiskID *string + + // READ-ONLY; The disk name. + DiskName *string +} + +// InMageRcmUnplannedFailoverInput - InMageRcm provider specific input for unplanned failover. +type InMageRcmUnplannedFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; A value indicating whether VM is to be shutdown. + PerformShutdown *string + + // A value indicating the inplace OS Upgrade version. + OSUpgradeVersion *string + + // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should + // be passed. + RecoveryPointID *string +} + +// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface +// for type InMageRcmUnplannedFailoverInput. +func (i *InMageRcmUnplannedFailoverInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { + return &UnplannedFailoverProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmUpdateApplianceForReplicationProtectedItemInput - InMageRcm provider specific input to update appliance for replication +// protected item. +type InMageRcmUpdateApplianceForReplicationProtectedItemInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The run as account Id. + RunAsAccountID *string +} + +// GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput implements the UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification +// interface for type InMageRcmUpdateApplianceForReplicationProtectedItemInput. +func (i *InMageRcmUpdateApplianceForReplicationProtectedItemInput) GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput() *UpdateApplianceForReplicationProtectedItemProviderSpecificInput { + return &UpdateApplianceForReplicationProtectedItemProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmUpdateContainerMappingInput - InMageRcm update protection container mapping. +type InMageRcmUpdateContainerMappingInput struct { + // REQUIRED; A value indicating whether agent auto upgrade has to be enabled. + EnableAgentAutoUpgrade *string + + // REQUIRED; The class type. + InstanceType *string +} + +// GetReplicationProviderSpecificUpdateContainerMappingInput implements the ReplicationProviderSpecificUpdateContainerMappingInputClassification +// interface for type InMageRcmUpdateContainerMappingInput. +func (i *InMageRcmUpdateContainerMappingInput) GetReplicationProviderSpecificUpdateContainerMappingInput() *ReplicationProviderSpecificUpdateContainerMappingInput { + return &ReplicationProviderSpecificUpdateContainerMappingInput{ + InstanceType: i.InstanceType, + } +} + +// InMageRcmUpdateReplicationProtectedItemInput - InMageRcm provider specific input to update replication protected item. +type InMageRcmUpdateReplicationProtectedItemInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The license type. + LicenseType *LicenseType + + // The license type for Linux VM's. + LinuxLicenseType *LinuxLicenseType + + // The SQL Server license type. + SQLServerLicenseType *SQLServerLicenseType + + // The target availability set ARM Id. + TargetAvailabilitySetID *string + + // The target availability zone. + TargetAvailabilityZone *string + + // The target boot diagnostics storage account ARM Id. + TargetBootDiagnosticsStorageAccountID *string + + // The tags for the target managed disks. + TargetManagedDiskTags []*UserCreatedResourceTag + + // The target network ARM Id. + TargetNetworkID *string + + // The tags for the target NICs. + TargetNicTags []*UserCreatedResourceTag + + // The target proximity placement group Id. + TargetProximityPlacementGroupID *string + + // The target resource group ARM Id. + TargetResourceGroupID *string + + // The target VM name. + TargetVMName *string + + // The target VM size. + TargetVMSize *string + + // The target VM tags. + TargetVMTags []*UserCreatedResourceTag + + // The test network ARM Id. + TestNetworkID *string + + // The OS name selected by user. + UserSelectedOSName *string + + // The list of NIC details. + VMNics []*InMageRcmNicInput +} + +// GetUpdateReplicationProtectedItemProviderInput implements the UpdateReplicationProtectedItemProviderInputClassification +// interface for type InMageRcmUpdateReplicationProtectedItemInput. +func (i *InMageRcmUpdateReplicationProtectedItemInput) GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput { + return &UpdateReplicationProtectedItemProviderInput{ + InstanceType: i.InstanceType, + } +} + +// InMageReplicationDetails - InMage provider specific settings. +type InMageReplicationDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The active location of the VM. If the VM is being protected from Azure, this field will take values from { Azure, OnPrem + // }. If the VM is being protected between two data-centers, this field will be + // OnPrem always. + ActiveSiteType *string + + // The agent details. + AgentDetails *InMageAgentDetails + + // A value indicating the underlying Azure storage account. If the VM is not running in Azure, this value shall be set to + // null. + AzureStorageAccountID *string + + // The compressed data change rate in MB. + CompressedDataRateInMB *float64 + + // The collection of Consistency points. + ConsistencyPoints map[string]*time.Time + + // The datastores of the on-premise machine Value can be list of strings that contain datastore names. + Datastores []*string + + // A value indicating the discovery type of the machine. + DiscoveryType *string + + // A value indicating whether any disk is resized for this VM. + DiskResized *string + + // The source IP address. + IPAddress *string + + // The infrastructure VM Id. + InfrastructureVMID *string + + // A value indicating whether additional IR stats are available or not. + IsAdditionalStatsAvailable *bool + + // The last heartbeat received from the source server. + LastHeartbeat *time.Time + + // The last RPO calculated time. + LastRpoCalculatedTime *time.Time + + // The last update time received from on-prem components. + LastUpdateReceivedTime *time.Time + + // The master target Id. + MasterTargetID *string + + // The multi vm group Id, if any. + MultiVMGroupID *string + + // The multi vm group name, if any. + MultiVMGroupName *string + + // A value indicating whether the multi vm sync is enabled or disabled. + MultiVMSyncStatus *string + + // The OS details. + OSDetails *OSDiskDetails + + // The OS Version of the protected item. + OSVersion *string + + // The process server Id. + ProcessServerID *string + + // The list of protected disks. + ProtectedDisks []*InMageProtectedDiskDetails + + // The protection stage. + ProtectionStage *string + + // A value indicating whether the source server requires a restart after update. + RebootAfterUpdateStatus *string + + // The replica id of the protected item. + ReplicaID *string + + // The resync details of the machine. + ResyncDetails *InitialReplicationDetails + + // The retention window end time. + RetentionWindowEnd *time.Time + + // The retention window start time. + RetentionWindowStart *time.Time + + // The RPO in seconds. + RpoInSeconds *int64 + + // The CPU count of the VM on the primary side. + SourceVMCPUCount *int32 + + // The RAM size of the VM on the primary side. + SourceVMRAMSizeInMB *int32 + + // The total transferred data in bytes. + TotalDataTransferred *int64 + + // The progress health. + TotalProgressHealth *string + + // The uncompressed data change rate in MB. + UncompressedDataRateInMB *float64 + + // The vCenter infrastructure Id. + VCenterInfrastructureID *string + + // The virtual machine Id. + VMID *string + + // The PE Network details. + VMNics []*VMNicDetails + + // The protection state for the vm. + VMProtectionState *string + + // The protection state description for the vm. + VMProtectionStateDescription *string + + // The validation errors of the on-premise machine Value can be list of validation errors. + ValidationErrors []*HealthError +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// InMageReplicationDetails. +func (i *InMageReplicationDetails) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return &ReplicationProviderSpecificSettings{ + InstanceType: i.InstanceType, + } +} + +// InMageReprotectInput - InMageAzureV2 specific provider input. +type InMageReprotectInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The Master Target Id. + MasterTargetID *string + + // REQUIRED; The Process Server Id. + ProcessServerID *string + + // REQUIRED; The Policy Id. + ProfileID *string + + // REQUIRED; The retention drive to use on the MT. + RetentionDrive *string + + // The target datastore name. + DatastoreName *string + + // The enable disk exclusion input. + DiskExclusionInput *InMageDiskExclusionInput + + // The disks to include list. + DisksToInclude []*string + + // The CS account Id. + RunAsAccountID *string +} + +// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface +// for type InMageReprotectInput. +func (i *InMageReprotectInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { + return &ReverseReplicationProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageTestFailoverInput - Provider specific input for InMage test failover. +type InMageTestFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null + // should be passed. + RecoveryPointID *string + + // The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided + // by RecoveryPointId will be used. In the other two cases, recovery point id will + // be ignored. + RecoveryPointType *RecoveryPointType +} + +// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type +// InMageTestFailoverInput. +func (i *InMageTestFailoverInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { + return &TestFailoverProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageUnplannedFailoverInput - Provider specific input for InMage unplanned failover. +type InMageUnplannedFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should + // be passed. + RecoveryPointID *string + + // The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided + // by RecoveryPointId will be used. In the other two cases, recovery point id will + // be ignored. + RecoveryPointType *RecoveryPointType +} + +// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface +// for type InMageUnplannedFailoverInput. +func (i *InMageUnplannedFailoverInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { + return &UnplannedFailoverProviderSpecificInput{ + InstanceType: i.InstanceType, + } +} + +// InMageVolumeExclusionOptions - Guest disk signature based disk exclusion option when doing enable protection of virtual +// machine in InMage provider. +type InMageVolumeExclusionOptions struct { + // The value indicating whether to exclude multi volume disk or not. If a disk has multiple volumes and one of the volume + // has label matching with VolumeLabel this disk will be excluded from replication + // if OnlyExcludeIfSingleVolume is false. + OnlyExcludeIfSingleVolume *string + + // The volume label. The disk having any volume with this label will be excluded from replication. + VolumeLabel *string +} + +// InconsistentVMDetails - This class stores the monitoring details for consistency check of inconsistent Protected Entity. +type InconsistentVMDetails struct { + // The Cloud name. + CloudName *string + + // The list of details regarding state of the Protected Entity in SRS and On prem. + Details []*string + + // The list of error ids. + ErrorIDs []*string + + // The Vm name. + VMName *string +} + +// InitialReplicationDetails - Initial replication details. +type InitialReplicationDetails struct { + // The initial replication progress percentage. + InitialReplicationProgressPercentage *string + + // Initial replication type. + InitialReplicationType *string +} + +// InlineWorkflowTaskDetails - This class represents the inline workflow task details. +type InlineWorkflowTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // The child tasks. + ChildTasks []*ASRTask + + // The list of child workflow ids. + WorkflowIDs []*string +} + +// GetGroupTaskDetails implements the GroupTaskDetailsClassification interface for type InlineWorkflowTaskDetails. +func (i *InlineWorkflowTaskDetails) GetGroupTaskDetails() *GroupTaskDetails { + return &GroupTaskDetails{ + ChildTasks: i.ChildTasks, + InstanceType: i.InstanceType, + } +} + +// InnerHealthError - Implements InnerHealthError class. HealthError object has a list of InnerHealthErrors as child errors. +// InnerHealthError is used because this will prevent an infinite loop of structures when Hydra +// tries to auto-generate the contract. We are exposing the related health errors as inner health errors and all API consumers +// can utilize this in the same fashion as Exception -> InnerException. +type InnerHealthError struct { + // Error creation time (UTC). + CreationTimeUTC *time.Time + + // Value indicating whether the health error is customer resolvable. + CustomerResolvability *HealthErrorCustomerResolvability + + // ID of the entity. + EntityID *string + + // Category of error. + ErrorCategory *string + + // Error code. + ErrorCode *string + + // The health error unique id. + ErrorID *string + + // Level of error. + ErrorLevel *string + + // Error message. + ErrorMessage *string + + // Source of error. + ErrorSource *string + + // Type of error. + ErrorType *string + + // Possible causes of error. + PossibleCauses *string + + // Recommended action to resolve error. + RecommendedAction *string + + // DRA error message. + RecoveryProviderErrorMessage *string + + // Summary message of the entity. + SummaryMessage *string +} + +type InputEndpoint struct { + EndpointName *string + PrivatePort *int32 + Protocol *string + PublicPort *int32 +} + +// Job details. +type Job struct { + // Resource Location + Location *string + + // The custom data. + Properties *JobProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// JobCollection - Collection of jobs. +type JobCollection struct { + // The value of next link. + NextLink *string + + // The list of jobs. + Value []*Job +} + +// JobDetails - Job details based on specific job type. +type JobDetails struct { + // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). + InstanceType *string + + // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow + // object details. + AffectedObjectDetails map[string]*string +} + +// GetJobDetails implements the JobDetailsClassification interface for type JobDetails. +func (j *JobDetails) GetJobDetails() *JobDetails { return j } + +// JobEntity - This class contains the minimal job details required to navigate to the desired drill down. +type JobEntity struct { + // The job display name. + JobFriendlyName *string + + // The job id. + JobID *string + + // The job name. Enum type ScenarioName. + JobScenarioName *string + + // The workflow affected object type. + TargetInstanceType *string + + // The object id. + TargetObjectID *string + + // The object name. + TargetObjectName *string +} + +// JobErrorDetails - This class contains the error details per object. +type JobErrorDetails struct { + // The creation time of job error. + CreationTime *time.Time + + // Error level of error. + ErrorLevel *string + + // The Provider error details. + ProviderErrorDetails *ProviderError + + // The Service error details. + ServiceErrorDetails *ServiceError + + // The Id of the task. + TaskID *string +} + +// JobProperties - Job custom data details. +type JobProperties struct { + // The activity id. + ActivityID *string + + // The Allowed action the job. + AllowedActions []*string + + // The custom job details like test failover job details. + CustomDetails JobDetailsClassification + + // The end time. + EndTime *time.Time + + // The errors. + Errors []*JobErrorDetails + + // The DisplayName. + FriendlyName *string + + // The ScenarioName. + ScenarioName *string + + // The start time. + StartTime *time.Time + + // The status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + State *string + + // The description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, + // CompletedWithInformation or Skipped. + StateDescription *string + + // The type of the affected object which is of Microsoft.Azure.SiteRecovery.V20151110.AffectedObjectType class. + TargetInstanceType *string + + // The affected Object Id. + TargetObjectID *string + + // The name of the affected object. + TargetObjectName *string + + // The tasks. + Tasks []*ASRTask +} + +// JobQueryParameter - Query parameter to enumerate jobs. +type JobQueryParameter struct { + // The type of objects. + AffectedObjectTypes *string + + // Date time to get jobs upto. + EndTime *string + + // The Id of the fabric to search jobs under. + FabricID *string + + // The job Name. + JobName *string + + // The output type of the jobs. + JobOutputType *ExportJobOutputSerializationType + + // The states of the job to be filtered can be in. + JobStatus *string + + // Date time to get jobs from. + StartTime *string + + // The timezone offset for the location of the request (in minutes). + TimezoneOffset *float64 +} + +// JobStatusEventDetails - Model class for event details of a job status event. +type JobStatusEventDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // AffectedObjectType for the event. + AffectedObjectType *string + + // JobName for the Event. + JobFriendlyName *string + + // Job arm id for the event. + JobID *string + + // JobStatus for the Event. + JobStatus *string +} + +// GetEventSpecificDetails implements the EventSpecificDetailsClassification interface for type JobStatusEventDetails. +func (j *JobStatusEventDetails) GetEventSpecificDetails() *EventSpecificDetails { + return &EventSpecificDetails{ + InstanceType: j.InstanceType, + } +} + +// JobTaskDetails - This class represents a task which is actually a workflow so that one can navigate to its individual drill +// down. +type JobTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // The job entity. + JobTask *JobEntity +} + +// GetJobTaskDetails implements the JobTaskDetailsClassification interface for type JobTaskDetails. +func (j *JobTaskDetails) GetJobTaskDetails() *JobTaskDetails { return j } + +// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type JobTaskDetails. +func (j *JobTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { + return &TaskTypeDetails{ + InstanceType: j.InstanceType, + } +} + +// KeyEncryptionKeyInfo - Key Encryption Key (KEK) information. +type KeyEncryptionKeyInfo struct { + // The key URL / identifier. + KeyIdentifier *string + + // The KeyVault resource ARM Id for key. + KeyVaultResourceArmID *string +} + +// LogicalNetwork - Logical network data model. +type LogicalNetwork struct { + // Resource Location + Location *string + + // The Logical Network Properties. + Properties *LogicalNetworkProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// LogicalNetworkCollection - List of logical networks. +type LogicalNetworkCollection struct { + // The value of next link. + NextLink *string + + // The Logical Networks list details. + Value []*LogicalNetwork +} + +// LogicalNetworkProperties - Logical Network Properties. +type LogicalNetworkProperties struct { + // The Friendly Name. + FriendlyName *string + + // A value indicating whether logical network definitions are isolated. + LogicalNetworkDefinitionsStatus *string + + // A value indicating whether logical network is used as private test network by test failover. + LogicalNetworkUsage *string + + // A value indicating whether Network Virtualization is enabled for the logical network. + NetworkVirtualizationStatus *string +} + +// ManagedRunCommandScriptInput - Managed RunCommand script input +type ManagedRunCommandScriptInput struct { + // REQUIRED; The script parameters. + ScriptParameters *string + + // REQUIRED; The script url. + ScriptURL *string + + // REQUIRED; The step name. + StepName *string +} + +// ManualActionTaskDetails - This class represents the manual action task details. +type ManualActionTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // The instructions. + Instructions *string + + // The name. + Name *string + + // The observation. + Observation *string +} + +// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type ManualActionTaskDetails. +func (m *ManualActionTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { + return &TaskTypeDetails{ + InstanceType: m.InstanceType, + } +} + +// MarsAgentDetails - Mars agent details. +type MarsAgentDetails struct { + // READ-ONLY; The Mars agent Bios Id. + BiosID *string + + // READ-ONLY; The fabric object Id. + FabricObjectID *string + + // READ-ONLY; The Mars agent Fqdn. + Fqdn *string + + // READ-ONLY; The health of the Mars agent. + Health *ProtectionHealth + + // READ-ONLY; The health errors. + HealthErrors []*HealthError + + // READ-ONLY; The Mars agent Id. + ID *string + + // READ-ONLY; The last heartbeat received from the Mars agent. + LastHeartbeatUTC *time.Time + + // READ-ONLY; The Mars agent name. + Name *string + + // READ-ONLY; The version. + Version *string +} + +// MasterTargetServer - Details of a Master Target Server. +type MasterTargetServer struct { + // Agent expiry date. + AgentExpiryDate *time.Time + + // The version of the scout component on the server. + AgentVersion *string + + // Agent version details. + AgentVersionDetails *VersionDetails + + // The list of data stores in the fabric. + DataStores []*DataStore + + // Disk count of the master target. + DiskCount *int32 + + // Health errors. + HealthErrors []*HealthError + + // The server Id. + ID *string + + // The IP address of the server. + IPAddress *string + + // The last heartbeat received from the server. + LastHeartbeat *time.Time + + // MARS agent expiry date. + MarsAgentExpiryDate *time.Time + + // MARS agent version. + MarsAgentVersion *string + + // Mars agent version details. + MarsAgentVersionDetails *VersionDetails + + // The server name. + Name *string + + // The OS type of the server. + OSType *string + + // OS Version of the master target. + OSVersion *string + + // The retention volumes of Master target Server. + RetentionVolumes []*RetentionVolume + + // Validation errors. + ValidationErrors []*HealthError + + // Version status. + VersionStatus *string +} + +// MigrateInput - Input for migrate. +type MigrateInput struct { + // REQUIRED; Migrate input properties. + Properties *MigrateInputProperties +} + +// MigrateInputProperties - Migrate input properties. +type MigrateInputProperties struct { + // REQUIRED; The provider specific details. + ProviderSpecificDetails MigrateProviderSpecificInputClassification +} + +// MigrateProviderSpecificInput - Migrate provider specific input. +type MigrateProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetMigrateProviderSpecificInput implements the MigrateProviderSpecificInputClassification interface for type MigrateProviderSpecificInput. +func (m *MigrateProviderSpecificInput) GetMigrateProviderSpecificInput() *MigrateProviderSpecificInput { + return m +} + +// MigrationItem - Migration item. +type MigrationItem struct { + // Resource Location + Location *string + + // The migration item properties. + Properties *MigrationItemProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// MigrationItemCollection - Migration item collection. +type MigrationItemCollection struct { + // The value of next link. + NextLink *string + + // The list of migration items. + Value []*MigrationItem +} + +// MigrationItemProperties - Migration item properties. +type MigrationItemProperties struct { + // The migration provider custom settings. + ProviderSpecificDetails MigrationProviderSpecificSettingsClassification + + // READ-ONLY; The allowed operations on the migration item based on the current migration state of the item. + AllowedOperations []*MigrationItemOperation + + // READ-ONLY; The critical past job details. + CriticalJobHistory []*CriticalJobHistoryDetails + + // READ-ONLY; The current job details. + CurrentJob *CurrentJobDetails + + // READ-ONLY; The correlation Id for events associated with this migration item. + EventCorrelationID *string + + // READ-ONLY; The consolidated health. + Health *ProtectionHealth + + // READ-ONLY; The list of health errors. + HealthErrors []*HealthError + + // READ-ONLY; The status of the last migration. + LastMigrationStatus *string + + // READ-ONLY; The last migration time. + LastMigrationTime *time.Time + + // READ-ONLY; The status of the last test migration. + LastTestMigrationStatus *string + + // READ-ONLY; The last test migration time. + LastTestMigrationTime *time.Time + + // READ-ONLY; The on-premise virtual machine name. + MachineName *string + + // READ-ONLY; The migration status. + MigrationState *MigrationState + + // READ-ONLY; The migration state description. + MigrationStateDescription *string + + // READ-ONLY; The name of policy governing this item. + PolicyFriendlyName *string + + // READ-ONLY; The ARM Id of policy governing this item. + PolicyID *string + + // READ-ONLY; The recovery services provider ARM Id. + RecoveryServicesProviderID *string + + // READ-ONLY; The replication status. + ReplicationStatus *string + + // READ-ONLY; The test migrate state. + TestMigrateState *TestMigrationState + + // READ-ONLY; The test migrate state description. + TestMigrateStateDescription *string +} + +// MigrationItemsQueryParameter - Query parameter to enumerate migration items. +type MigrationItemsQueryParameter struct { + // The replication provider type. + InstanceType *string + + // The source container name filter. + SourceContainerName *string + + // The source fabric name filter. + SourceFabricName *string +} + +// MigrationProviderSpecificSettings - Migration provider specific settings. +type MigrationProviderSpecificSettings struct { + // REQUIRED; Gets the instance type. + InstanceType *string +} + +// GetMigrationProviderSpecificSettings implements the MigrationProviderSpecificSettingsClassification interface for type +// MigrationProviderSpecificSettings. +func (m *MigrationProviderSpecificSettings) GetMigrationProviderSpecificSettings() *MigrationProviderSpecificSettings { + return m +} + +// MigrationRecoveryPoint - Recovery point for a migration item. +type MigrationRecoveryPoint struct { + // Resource Location + Location *string + + // Recovery point properties. + Properties *MigrationRecoveryPointProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// MigrationRecoveryPointCollection - Collection of migration recovery points. +type MigrationRecoveryPointCollection struct { + // The value of next link. + NextLink *string + + // The migration recovery point details. + Value []*MigrationRecoveryPoint +} + +// MigrationRecoveryPointProperties - Migration item recovery point properties. +type MigrationRecoveryPointProperties struct { + // READ-ONLY; The recovery point time. + RecoveryPointTime *time.Time + + // READ-ONLY; The recovery point type. + RecoveryPointType *MigrationRecoveryPointType +} + +// MobilityServiceUpdate - The Mobility Service update details. +type MobilityServiceUpdate struct { + // The OS type. + OSType *string + + // The reboot status of the update - whether it is required or not. + RebootStatus *string + + // The version of the latest update. + Version *string +} + +// Network model. +type Network struct { + // Resource Location + Location *string + + // The Network Properties. + Properties *NetworkProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// NetworkCollection - List of networks. +type NetworkCollection struct { + // The value of next link. + NextLink *string + + // The Networks list details. + Value []*Network +} + +// NetworkMapping - Network Mapping model. Ideally it should have been possible to inherit this class from prev version in +// InheritedModels as long as there is no difference in structure or method signature. Since there +// were no base Models for certain fields and methods viz NetworkMappingProperties and Load with required return type, the +// class has been introduced in its entirety with references to base models to +// facilitate extensions in subsequent versions. +type NetworkMapping struct { + // Resource Location + Location *string + + // The Network Mapping Properties. + Properties *NetworkMappingProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// NetworkMappingCollection - List of network mappings. As with NetworkMapping, it should be possible to reuse a prev version +// of this class. It doesn't seem likely this class could be anything more than a slightly bespoke +// collection of NetworkMapping. Hence it makes sense to override Load with Base.NetworkMapping instead of existing CurrentVersion.NetworkMapping. +type NetworkMappingCollection struct { + // The value of next link. + NextLink *string + + // The Network Mappings list. + Value []*NetworkMapping +} + +// NetworkMappingFabricSpecificSettings - Network Mapping fabric specific settings. +type NetworkMappingFabricSpecificSettings struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetNetworkMappingFabricSpecificSettings implements the NetworkMappingFabricSpecificSettingsClassification interface for +// type NetworkMappingFabricSpecificSettings. +func (n *NetworkMappingFabricSpecificSettings) GetNetworkMappingFabricSpecificSettings() *NetworkMappingFabricSpecificSettings { + return n +} + +// NetworkMappingProperties - Network Mapping Properties. +type NetworkMappingProperties struct { + // The fabric specific settings. + FabricSpecificSettings NetworkMappingFabricSpecificSettingsClassification + + // The primary fabric friendly name. + PrimaryFabricFriendlyName *string + + // The primary network friendly name. + PrimaryNetworkFriendlyName *string + + // The primary network id for network mapping. + PrimaryNetworkID *string + + // The recovery fabric ARM id. + RecoveryFabricArmID *string + + // The recovery fabric friendly name. + RecoveryFabricFriendlyName *string + + // The recovery network friendly name. + RecoveryNetworkFriendlyName *string + + // The recovery network id for network mapping. + RecoveryNetworkID *string + + // The pairing state for network mapping. + State *string +} + +// NetworkProperties - Network Properties. +type NetworkProperties struct { + // The Fabric Type. + FabricType *string + + // The Friendly Name. + FriendlyName *string + + // The Network Type. + NetworkType *string + + // The List of subnets. + Subnets []*Subnet +} + +// NewProtectionProfile - New Protection profile input. +type NewProtectionProfile struct { + // REQUIRED; A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. + MultiVMSyncStatus *SetMultiVMSyncStatus + + // REQUIRED; The protection profile input. + PolicyName *string + + // REQUIRED; The class type. + ResourceType *string + + // The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency (in minutes). + CrashConsistentFrequencyInMinutes *int32 + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 +} + +// GetProtectionProfileCustomDetails implements the ProtectionProfileCustomDetailsClassification interface for type NewProtectionProfile. +func (n *NewProtectionProfile) GetProtectionProfileCustomDetails() *ProtectionProfileCustomDetails { + return &ProtectionProfileCustomDetails{ + ResourceType: n.ResourceType, + } +} + +// NewRecoveryVirtualNetwork - Recovery virtual network input to create new virtual network from given source network. +type NewRecoveryVirtualNetwork struct { + // REQUIRED; The class type. + ResourceType *string + + // The recovery virtual network name. + RecoveryVirtualNetworkName *string + + // The name of the resource group to be used to create the recovery virtual network. If absent, target network would be created + // in the same resource group as target VM. + RecoveryVirtualNetworkResourceGroupName *string +} + +// GetRecoveryVirtualNetworkCustomDetails implements the RecoveryVirtualNetworkCustomDetailsClassification interface for type +// NewRecoveryVirtualNetwork. +func (n *NewRecoveryVirtualNetwork) GetRecoveryVirtualNetworkCustomDetails() *RecoveryVirtualNetworkCustomDetails { + return &RecoveryVirtualNetworkCustomDetails{ + ResourceType: n.ResourceType, + } +} + +// OSDetails - Disk Details. +type OSDetails struct { + // The OSEdition. + OSEdition *string + + // The OS Major Version. + OSMajorVersion *string + + // The OS Minor Version. + OSMinorVersion *string + + // VM Disk details. + OSType *string + + // The OS Version. + OSVersion *string + + // Product type. + ProductType *string + + // The OS name selected by user. + UserSelectedOSName *string +} + +// OSDiskDetails - Details of the OS Disk. +type OSDiskDetails struct { + // The type of the OS on the VM. + OSType *string + + // The id of the disk containing the OS. + OSVhdID *string + + // The OS disk VHD name. + VhdName *string +} + +// OSUpgradeSupportedVersions - Supported OS upgrade versions. +type OSUpgradeSupportedVersions struct { + // READ-ONLY; The source OS version name. + SupportedSourceOsVersion *string + + // READ-ONLY; The target OS version names. + SupportedTargetOsVersions []*string +} + +// OSVersionWrapper - Wrapper model for OSVersion to include version and service pack info. +type OSVersionWrapper struct { + // The service pack. + ServicePack *string + + // The version. + Version *string +} + +// OperationsDiscovery - Operations discovery class. +type OperationsDiscovery struct { + // Object type. + Display *Display + + // Name of the API. The name of the operation being performed on this particular object. It should match the action name that + // appears in RBAC / the event service. Examples of operations include: * + // Microsoft.Compute/virtualMachine/capture/action * Microsoft.Compute/virtualMachine/restart/action * Microsoft.Compute/virtualMachine/write + // * Microsoft.Compute/virtualMachine/read * + // Microsoft.Compute/virtualMachine/delete Each action should include, in order: (1) Resource Provider Namespace (2) Type + // hierarchy for which the action applies (e.g. server/databases for a SQL Azure + // database) (3) Read, Write, Action or Delete indicating which type applies. If it is a PUT/PATCH on a collection or named + // value, Write should be used. If it is a GET, Read should be used. If it is a + // DELETE, Delete should be used. If it is a POST, Action should be used. As a note: all resource providers would need to + // include the "{Resource Provider Namespace}/register/action" operation in their + // response. This API is used to register for their service, and should include details about the operation (e.g. a localized + // name for the resource provider + any special considerations like PII + // release). + Name *string + + // Origin. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs + // UX. Default value is "user,system". + Origin *string + + // Properties. Reserved for future use. + Properties any +} + +// OperationsDiscoveryCollection - Collection of ClientDiscovery details. +type OperationsDiscoveryCollection struct { + // The value of next link. + NextLink *string + + // The ClientDiscovery details. + Value []*OperationsDiscovery +} + +// PauseReplicationInput - Pause replication input. +type PauseReplicationInput struct { + // REQUIRED; Pause replication input properties. + Properties *PauseReplicationInputProperties +} + +// PauseReplicationInputProperties - Pause replication input properties. +type PauseReplicationInputProperties struct { + // REQUIRED; The class type. + InstanceType *string +} + +// PlannedFailoverInput - Input definition for planned failover. +type PlannedFailoverInput struct { + // Planned failover input properties. + Properties *PlannedFailoverInputProperties +} + +// PlannedFailoverInputProperties - Input definition for planned failover input properties. +type PlannedFailoverInputProperties struct { + // Failover direction. + FailoverDirection *string + + // Provider specific settings. + ProviderSpecificDetails PlannedFailoverProviderSpecificFailoverInputClassification +} + +// PlannedFailoverProviderSpecificFailoverInput - Provider specific failover input. +type PlannedFailoverProviderSpecificFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetPlannedFailoverProviderSpecificFailoverInput implements the PlannedFailoverProviderSpecificFailoverInputClassification +// interface for type PlannedFailoverProviderSpecificFailoverInput. +func (p *PlannedFailoverProviderSpecificFailoverInput) GetPlannedFailoverProviderSpecificFailoverInput() *PlannedFailoverProviderSpecificFailoverInput { + return p +} + +// Policy - Protection profile details. +type Policy struct { + // Resource Location + Location *string + + // The custom data. + Properties *PolicyProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// PolicyCollection - Protection Profile Collection details. +type PolicyCollection struct { + // The value of next link. + NextLink *string + + // The policy details. + Value []*Policy +} + +// PolicyProperties - Protection profile custom data details. +type PolicyProperties struct { + // The FriendlyName. + FriendlyName *string + + // The ReplicationChannelSetting. + ProviderSpecificDetails PolicyProviderSpecificDetailsClassification +} + +// PolicyProviderSpecificDetails - Base class for Provider specific details for policies. +type PolicyProviderSpecificDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type PolicyProviderSpecificDetails. +func (p *PolicyProviderSpecificDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return p +} + +// PolicyProviderSpecificInput - Base class for provider specific input. +type PolicyProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type PolicyProviderSpecificInput. +func (p *PolicyProviderSpecificInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return p +} + +// ProcessServer - Details of the Process Server. +type ProcessServer struct { + // Agent expiry date. + AgentExpiryDate *time.Time + + // The version of the scout component on the server. + AgentVersion *string + + // The agent version details. + AgentVersionDetails *VersionDetails + + // The available memory. + AvailableMemoryInBytes *int64 + + // The available space. + AvailableSpaceInBytes *int64 + + // The percentage of the CPU load. + CPULoad *string + + // The CPU load status. + CPULoadStatus *string + + // The Process Server's friendly name. + FriendlyName *string + + // Health errors. + HealthErrors []*HealthError + + // The agent generated Id. + HostID *string + + // The Process Server Id. + ID *string + + // The IP address of the server. + IPAddress *string + + // The last heartbeat received from the server. + LastHeartbeat *time.Time + + // The servers configured with this PS. + MachineCount *string + + // The memory usage status. + MemoryUsageStatus *string + + // The list of the mobility service updates available on the Process Server. + MobilityServiceUpdates []*MobilityServiceUpdate + + // The OS type of the server. + OSType *string + + // OS Version of the process server. Note: This will get populated if user has CS version greater than 9.12.0.0. + OSVersion *string + + // The PS service status. + PsServiceStatus *string + + // The number of replication pairs configured in this PS. + ReplicationPairCount *string + + // The PS SSL cert expiry date. + SSLCertExpiryDate *time.Time + + // CS SSL cert expiry date. + SSLCertExpiryRemainingDays *int32 + + // The space usage status. + SpaceUsageStatus *string + + // The percentage of the system load. + SystemLoad *string + + // The system load status. + SystemLoadStatus *string + + // The total memory. + TotalMemoryInBytes *int64 + + // The total space. + TotalSpaceInBytes *int64 + + // Version status. + VersionStatus *string + + // READ-ONLY; The health of Process Server. + Health *ProtectionHealth + + // READ-ONLY; The MARS communication status. + MarsCommunicationStatus *string + + // READ-ONLY; The MARS registration status. + MarsRegistrationStatus *string + + // READ-ONLY; The process server stats refresh time. + PsStatsRefreshTime *time.Time + + // READ-ONLY; The throughput in bytes. + ThroughputInBytes *int64 + + // READ-ONLY; The throughput in MBps. + ThroughputInMBps *int64 + + // READ-ONLY; The throughput status. + ThroughputStatus *string + + // READ-ONLY; The uploading pending data in bytes. + ThroughputUploadPendingDataInBytes *int64 +} + +// ProcessServerDetails - Process server details. +type ProcessServerDetails struct { + // READ-ONLY; The available memory. + AvailableMemoryInBytes *int64 + + // READ-ONLY; The available disk space. + AvailableSpaceInBytes *int64 + + // READ-ONLY; The process server Bios Id. + BiosID *string + + // READ-ONLY; The disk usage status. + DiskUsageStatus *RcmComponentStatus + + // READ-ONLY; The fabric object Id. + FabricObjectID *string + + // READ-ONLY; The process server Fqdn. + Fqdn *string + + // READ-ONLY; The free disk space percentage. + FreeSpacePercentage *float64 + + // READ-ONLY; The health of the process server. + Health *ProtectionHealth + + // READ-ONLY; The health errors. + HealthErrors []*HealthError + + // READ-ONLY; The historic health of the process server based on the health in last 24 hours. + HistoricHealth *ProtectionHealth + + // READ-ONLY; The process server Id. + ID *string + + // READ-ONLY; The list of IP addresses for communicating with the RCM component. + IPAddresses []*string + + // READ-ONLY; The last heartbeat received from the process server. + LastHeartbeatUTC *time.Time + + // READ-ONLY; The memory usage percentage. + MemoryUsagePercentage *float64 + + // READ-ONLY; The memory usage status. + MemoryUsageStatus *RcmComponentStatus + + // READ-ONLY; The process server name. + Name *string + + // READ-ONLY; The processor usage percentage. + ProcessorUsagePercentage *float64 + + // READ-ONLY; The processor usage status. + ProcessorUsageStatus *RcmComponentStatus + + // READ-ONLY; The protected item count. + ProtectedItemCount *int32 + + // READ-ONLY; The system load. + SystemLoad *int64 + + // READ-ONLY; The system load status. + SystemLoadStatus *RcmComponentStatus + + // READ-ONLY; The throughput in bytes. + ThroughputInBytes *int64 + + // READ-ONLY; The throughput status. + ThroughputStatus *RcmComponentStatus + + // READ-ONLY; The uploading pending data in bytes. + ThroughputUploadPendingDataInBytes *int64 + + // READ-ONLY; The total memory. + TotalMemoryInBytes *int64 + + // READ-ONLY; The total disk space. + TotalSpaceInBytes *int64 + + // READ-ONLY; The used memory. + UsedMemoryInBytes *int64 + + // READ-ONLY; The used disk space. + UsedSpaceInBytes *int64 + + // READ-ONLY; The version. + Version *string +} + +// ProtectableItem - Replication protected item. +type ProtectableItem struct { + // Resource Location + Location *string + + // The custom data. + Properties *ProtectableItemProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// ProtectableItemCollection - Protectable item collection. +type ProtectableItemCollection struct { + // The value of next link. + NextLink *string + + // The Protectable item details. + Value []*ProtectableItem +} + +// ProtectableItemProperties - Replication protected item custom data details. +type ProtectableItemProperties struct { + // The Replication provider custom settings. + CustomDetails ConfigurationSettingsClassification + + // The name. + FriendlyName *string + + // The Current protection readiness errors. + ProtectionReadinessErrors []*string + + // The protection status. + ProtectionStatus *string + + // The recovery provider ARM Id. + RecoveryServicesProviderID *string + + // The ARM resource of protected items. + ReplicationProtectedItemID *string + + // The list of replication providers supported for the protectable item. + SupportedReplicationProviders []*string +} + +// ProtectableItemQueryParameter - Query parameter to enumerate Protectable items. +type ProtectableItemQueryParameter struct { + // State of the Protectable item query filter. + State *string +} + +// ProtectedClustersQueryParameter - Query parameter to enumerate protected clusters. +type ProtectedClustersQueryParameter struct { + // The replication provider type. + InstanceType *string + + // The source fabric location filter. + SourceFabricLocation *string + + // The source fabric name filter. + SourceFabricName *string +} + +// ProtectedItemsQueryParameter - Query parameter to enumerate protected items. +type ProtectedItemsQueryParameter struct { + // The fabric object Id filter. + FabricObjectID *string + + // The replication provider type. + InstanceType *string + + // Whether Multi VM group is auto created or specified by user. + MultiVMGroupCreateOption *MultiVMGroupCreateOption + + // The process server Id filter. + ProcessServerID *string + + // The recovery plan filter. + RecoveryPlanName *string + + // The source fabric location filter. + SourceFabricLocation *string + + // The source fabric name filter. + SourceFabricName *string + + // The vCenter name filter. + VCenterName *string +} + +// ProtectionContainer - Protection container details. +type ProtectionContainer struct { + // Resource Location + Location *string + + // The custom data. + Properties *ProtectionContainerProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// ProtectionContainerCollection - Protection Container collection. +type ProtectionContainerCollection struct { + // The value of next link. + NextLink *string + + // The Protection Container details. + Value []*ProtectionContainer +} + +// ProtectionContainerFabricSpecificDetails - Base class for fabric specific details of container. +type ProtectionContainerFabricSpecificDetails struct { + // READ-ONLY; Gets the class type. Overridden in derived classes. + InstanceType *string +} + +// ProtectionContainerMapping - Protection container mapping object. +type ProtectionContainerMapping struct { + // Resource Location + Location *string + + // The custom data. + Properties *ProtectionContainerMappingProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// ProtectionContainerMappingCollection - Protection container mapping collection class. +type ProtectionContainerMappingCollection struct { + // Link to fetch rest of the data. + NextLink *string + + // List of container mappings. + Value []*ProtectionContainerMapping +} + +// ProtectionContainerMappingProperties - Protection container mapping properties. +type ProtectionContainerMappingProperties struct { + // Health of pairing. + Health *string + + // Health error. + HealthErrorDetails []*HealthError + + // Friendly name of replication policy. + PolicyFriendlyName *string + + // Policy ARM Id. + PolicyID *string + + // Provider specific provider details. + ProviderSpecificDetails ProtectionContainerMappingProviderSpecificDetailsClassification + + // Friendly name of source fabric. + SourceFabricFriendlyName *string + + // Friendly name of source protection container. + SourceProtectionContainerFriendlyName *string + + // Association Status. + State *string + + // Friendly name of target fabric. + TargetFabricFriendlyName *string + + // Friendly name of paired container. + TargetProtectionContainerFriendlyName *string + + // Paired protection container ARM ID. + TargetProtectionContainerID *string +} + +// ProtectionContainerMappingProviderSpecificDetails - Container mapping provider specific details. +type ProtectionContainerMappingProviderSpecificDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string +} + +// GetProtectionContainerMappingProviderSpecificDetails implements the ProtectionContainerMappingProviderSpecificDetailsClassification +// interface for type ProtectionContainerMappingProviderSpecificDetails. +func (p *ProtectionContainerMappingProviderSpecificDetails) GetProtectionContainerMappingProviderSpecificDetails() *ProtectionContainerMappingProviderSpecificDetails { + return p +} + +// ProtectionContainerProperties - Protection profile custom data details. +type ProtectionContainerProperties struct { + // Fabric friendly name. + FabricFriendlyName *string + + // Fabric specific details. + FabricSpecificDetails *ProtectionContainerFabricSpecificDetails + + // The fabric type. + FabricType *string + + // The name. + FriendlyName *string + + // The pairing status of this cloud. + PairingStatus *string + + // Number of protected PEs. + ProtectedItemCount *int32 + + // The role of this cloud. + Role *string +} + +// ProtectionProfileCustomDetails - Protection Profile custom input. +type ProtectionProfileCustomDetails struct { + // REQUIRED; The class type. + ResourceType *string +} + +// GetProtectionProfileCustomDetails implements the ProtectionProfileCustomDetailsClassification interface for type ProtectionProfileCustomDetails. +func (p *ProtectionProfileCustomDetails) GetProtectionProfileCustomDetails() *ProtectionProfileCustomDetails { + return p +} + +// ProviderError - This class contains the error details per object. +type ProviderError struct { + // The Error code. + ErrorCode *int32 + + // The Provider error Id. + ErrorID *string + + // The Error message. + ErrorMessage *string + + // The possible causes for the error. + PossibleCauses *string + + // The recommended action to resolve the error. + RecommendedAction *string +} + +// ProviderSpecificRecoveryPointDetails - Replication provider specific recovery point details. +type ProviderSpecificRecoveryPointDetails struct { + // REQUIRED; Gets the provider type. + InstanceType *string +} + +// GetProviderSpecificRecoveryPointDetails implements the ProviderSpecificRecoveryPointDetailsClassification interface for +// type ProviderSpecificRecoveryPointDetails. +func (p *ProviderSpecificRecoveryPointDetails) GetProviderSpecificRecoveryPointDetails() *ProviderSpecificRecoveryPointDetails { + return p +} + +// PushInstallerDetails - Push installer details. +type PushInstallerDetails struct { + // READ-ONLY; The push installer Bios Id. + BiosID *string + + // READ-ONLY; The fabric object Id. + FabricObjectID *string + + // READ-ONLY; The push installer Fqdn. + Fqdn *string + + // READ-ONLY; The health of the push installer. + Health *ProtectionHealth + + // READ-ONLY; The health errors. + HealthErrors []*HealthError + + // READ-ONLY; The push installer Id. + ID *string + + // READ-ONLY; The last heartbeat received from the push installer. + LastHeartbeatUTC *time.Time + + // READ-ONLY; The push installer name. + Name *string + + // READ-ONLY; The version. + Version *string +} + +// RcmProxyDetails - RCM proxy details. +type RcmProxyDetails struct { + // READ-ONLY; The RCM proxy Bios Id. + BiosID *string + + // READ-ONLY; The client authentication type. + ClientAuthenticationType *string + + // READ-ONLY; The fabric object Id. + FabricObjectID *string + + // READ-ONLY; The RCM proxy Fqdn. + Fqdn *string + + // READ-ONLY; The health of the RCM proxy. + Health *ProtectionHealth + + // READ-ONLY; The health errors. + HealthErrors []*HealthError + + // READ-ONLY; The RCM proxy Id. + ID *string + + // READ-ONLY; The last heartbeat received from the RCM proxy. + LastHeartbeatUTC *time.Time + + // READ-ONLY; The RCM proxy name. + Name *string + + // READ-ONLY; The version. + Version *string +} + +// RecoveryAvailabilitySetCustomDetails - Recovery Availability Set custom input. +type RecoveryAvailabilitySetCustomDetails struct { + // REQUIRED; The class type. + ResourceType *string +} + +// GetRecoveryAvailabilitySetCustomDetails implements the RecoveryAvailabilitySetCustomDetailsClassification interface for +// type RecoveryAvailabilitySetCustomDetails. +func (r *RecoveryAvailabilitySetCustomDetails) GetRecoveryAvailabilitySetCustomDetails() *RecoveryAvailabilitySetCustomDetails { + return r +} + +// RecoveryPlan - Recovery plan details. +type RecoveryPlan struct { + // Resource Location + Location *string + + // The custom details. + Properties *RecoveryPlanProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// RecoveryPlanA2ADetails - Recovery plan A2A specific details. +type RecoveryPlanA2ADetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The primary extended location. + PrimaryExtendedLocation *ExtendedLocation + + // The primary zone. + PrimaryZone *string + + // The recovery extended location. + RecoveryExtendedLocation *ExtendedLocation + + // The recovery zone. + RecoveryZone *string +} + +// GetRecoveryPlanProviderSpecificDetails implements the RecoveryPlanProviderSpecificDetailsClassification interface for type +// RecoveryPlanA2ADetails. +func (r *RecoveryPlanA2ADetails) GetRecoveryPlanProviderSpecificDetails() *RecoveryPlanProviderSpecificDetails { + return &RecoveryPlanProviderSpecificDetails{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanA2AFailoverInput - Recovery plan A2A failover input. +type RecoveryPlanA2AFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The recovery point type. + RecoveryPointType *A2ARpRecoveryPointType + + // A value indicating whether to use recovery cloud service for TFO or not. + CloudServiceCreationOption *string + + // A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. + MultiVMSyncPointOption *MultiVMSyncPointOption +} + +// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface +// for type RecoveryPlanA2AFailoverInput. +func (r *RecoveryPlanA2AFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { + return &RecoveryPlanProviderSpecificFailoverInput{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanA2AInput - Recovery plan A2A input. +type RecoveryPlanA2AInput struct { + // REQUIRED; Gets the Instance type. + InstanceType *string + + // The primary extended location. + PrimaryExtendedLocation *ExtendedLocation + + // The primary zone. + PrimaryZone *string + + // The recovery extended location. + RecoveryExtendedLocation *ExtendedLocation + + // The recovery zone. + RecoveryZone *string +} + +// GetRecoveryPlanProviderSpecificInput implements the RecoveryPlanProviderSpecificInputClassification interface for type +// RecoveryPlanA2AInput. +func (r *RecoveryPlanA2AInput) GetRecoveryPlanProviderSpecificInput() *RecoveryPlanProviderSpecificInput { + return &RecoveryPlanProviderSpecificInput{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanAction - Recovery plan action details. +type RecoveryPlanAction struct { + // REQUIRED; The action name. + ActionName *string + + // REQUIRED; The custom details. + CustomDetails RecoveryPlanActionDetailsClassification + + // REQUIRED; The list of failover directions. + FailoverDirections []*PossibleOperationsDirections + + // REQUIRED; The list of failover types. + FailoverTypes []*ReplicationProtectedItemOperation +} + +// RecoveryPlanActionDetails - Recovery plan action custom details. +type RecoveryPlanActionDetails struct { + // REQUIRED; Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). + InstanceType *string +} + +// GetRecoveryPlanActionDetails implements the RecoveryPlanActionDetailsClassification interface for type RecoveryPlanActionDetails. +func (r *RecoveryPlanActionDetails) GetRecoveryPlanActionDetails() *RecoveryPlanActionDetails { + return r +} + +// RecoveryPlanAutomationRunbookActionDetails - Recovery plan Automation runbook action details. +type RecoveryPlanAutomationRunbookActionDetails struct { + // REQUIRED; The fabric location. + FabricLocation *RecoveryPlanActionLocation + + // REQUIRED; Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). + InstanceType *string + + // The runbook ARM Id. + RunbookID *string + + // The runbook timeout. + Timeout *string +} + +// GetRecoveryPlanActionDetails implements the RecoveryPlanActionDetailsClassification interface for type RecoveryPlanAutomationRunbookActionDetails. +func (r *RecoveryPlanAutomationRunbookActionDetails) GetRecoveryPlanActionDetails() *RecoveryPlanActionDetails { + return &RecoveryPlanActionDetails{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanCollection - Recovery plan collection details. +type RecoveryPlanCollection struct { + // The value of next link. + NextLink *string + + // The list of recovery plans. + Value []*RecoveryPlan +} + +// RecoveryPlanGroup - Recovery plan group details. +type RecoveryPlanGroup struct { + // REQUIRED; The group type. + GroupType *RecoveryPlanGroupType + + // The end group actions. + EndGroupActions []*RecoveryPlanAction + + // The list of protected items. + ReplicationProtectedItems []*RecoveryPlanProtectedItem + + // The start group actions. + StartGroupActions []*RecoveryPlanAction +} + +// RecoveryPlanGroupTaskDetails - This class represents the recovery plan group task. +type RecoveryPlanGroupTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // The child tasks. + ChildTasks []*ASRTask + + // The group identifier. + GroupID *string + + // The name. + Name *string + + // The group type. + RpGroupType *string +} + +// GetGroupTaskDetails implements the GroupTaskDetailsClassification interface for type RecoveryPlanGroupTaskDetails. +func (r *RecoveryPlanGroupTaskDetails) GetGroupTaskDetails() *GroupTaskDetails { + return &GroupTaskDetails{ + ChildTasks: r.ChildTasks, + InstanceType: r.InstanceType, + } +} + +// GetRecoveryPlanGroupTaskDetails implements the RecoveryPlanGroupTaskDetailsClassification interface for type RecoveryPlanGroupTaskDetails. +func (r *RecoveryPlanGroupTaskDetails) GetRecoveryPlanGroupTaskDetails() *RecoveryPlanGroupTaskDetails { + return r +} + +// RecoveryPlanHyperVReplicaAzureFailbackInput - Recovery plan HVR Azure failback input. +type RecoveryPlanHyperVReplicaAzureFailbackInput struct { + // REQUIRED; The data sync option. + DataSyncOption *DataSyncStatus + + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The ALR option. + RecoveryVMCreationOption *AlternateLocationRecoveryOption +} + +// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface +// for type RecoveryPlanHyperVReplicaAzureFailbackInput. +func (r *RecoveryPlanHyperVReplicaAzureFailbackInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { + return &RecoveryPlanProviderSpecificFailoverInput{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanHyperVReplicaAzureFailoverInput - Recovery plan HVR Azure failover input. +type RecoveryPlanHyperVReplicaAzureFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The primary KEK certificate PFX. + PrimaryKekCertificatePfx *string + + // The recovery point type. + RecoveryPointType *HyperVReplicaAzureRpRecoveryPointType + + // The secondary KEK certificate PFX. + SecondaryKekCertificatePfx *string +} + +// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface +// for type RecoveryPlanHyperVReplicaAzureFailoverInput. +func (r *RecoveryPlanHyperVReplicaAzureFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { + return &RecoveryPlanProviderSpecificFailoverInput{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanInMageAzureV2FailoverInput - Recovery plan InMageAzureV2 failover input. +type RecoveryPlanInMageAzureV2FailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The recovery point type. + RecoveryPointType *InMageV2RpRecoveryPointType + + // A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. + UseMultiVMSyncPoint *string +} + +// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface +// for type RecoveryPlanInMageAzureV2FailoverInput. +func (r *RecoveryPlanInMageAzureV2FailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { + return &RecoveryPlanProviderSpecificFailoverInput{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanInMageFailoverInput - Recovery plan InMage failover input. +type RecoveryPlanInMageFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The recovery point type. + RecoveryPointType *RpInMageRecoveryPointType +} + +// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface +// for type RecoveryPlanInMageFailoverInput. +func (r *RecoveryPlanInMageFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { + return &RecoveryPlanProviderSpecificFailoverInput{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanInMageRcmFailbackFailoverInput - Recovery plan InMageRcmFailback failover input. +type RecoveryPlanInMageRcmFailbackFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The recovery point type. + RecoveryPointType *InMageRcmFailbackRecoveryPointType + + // A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. + UseMultiVMSyncPoint *string +} + +// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface +// for type RecoveryPlanInMageRcmFailbackFailoverInput. +func (r *RecoveryPlanInMageRcmFailbackFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { + return &RecoveryPlanProviderSpecificFailoverInput{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanInMageRcmFailoverInput - Recovery plan InMageRcm failover input. +type RecoveryPlanInMageRcmFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The recovery point type. + RecoveryPointType *RecoveryPlanPointType + + // A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. + UseMultiVMSyncPoint *string +} + +// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface +// for type RecoveryPlanInMageRcmFailoverInput. +func (r *RecoveryPlanInMageRcmFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { + return &RecoveryPlanProviderSpecificFailoverInput{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanManualActionDetails - Recovery plan manual action details. +type RecoveryPlanManualActionDetails struct { + // REQUIRED; Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). + InstanceType *string + + // The manual action description. + Description *string +} + +// GetRecoveryPlanActionDetails implements the RecoveryPlanActionDetailsClassification interface for type RecoveryPlanManualActionDetails. +func (r *RecoveryPlanManualActionDetails) GetRecoveryPlanActionDetails() *RecoveryPlanActionDetails { + return &RecoveryPlanActionDetails{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanPlannedFailoverInput - Recovery plan planned failover input. +type RecoveryPlanPlannedFailoverInput struct { + // REQUIRED; The recovery plan planned failover input properties. + Properties *RecoveryPlanPlannedFailoverInputProperties +} + +// RecoveryPlanPlannedFailoverInputProperties - Recovery plan planned failover input properties. +type RecoveryPlanPlannedFailoverInputProperties struct { + // REQUIRED; The failover direction. + FailoverDirection *PossibleOperationsDirections + + // The provider specific properties. + ProviderSpecificDetails []RecoveryPlanProviderSpecificFailoverInputClassification +} + +// RecoveryPlanProperties - Recovery plan properties. +type RecoveryPlanProperties struct { + // The list of allowed operations. + AllowedOperations []*string + + // The current scenario details. + CurrentScenario *CurrentScenarioDetails + + // The recovery plan status. + CurrentScenarioStatus *string + + // The recovery plan status description. + CurrentScenarioStatusDescription *string + + // The failover deployment model. + FailoverDeploymentModel *string + + // The friendly name. + FriendlyName *string + + // The recovery plan groups. + Groups []*RecoveryPlanGroup + + // The start time of the last planned failover. + LastPlannedFailoverTime *time.Time + + // The start time of the last test failover. + LastTestFailoverTime *time.Time + + // The start time of the last unplanned failover. + LastUnplannedFailoverTime *time.Time + + // The primary fabric friendly name. + PrimaryFabricFriendlyName *string + + // The primary fabric Id. + PrimaryFabricID *string + + // The provider id and provider specific details. + ProviderSpecificDetails []RecoveryPlanProviderSpecificDetailsClassification + + // The recovery fabric friendly name. + RecoveryFabricFriendlyName *string + + // The recovery fabric Id. + RecoveryFabricID *string + + // The list of replication providers. + ReplicationProviders []*string +} + +// RecoveryPlanProtectedItem - Recovery plan protected item. +type RecoveryPlanProtectedItem struct { + // The ARM Id of the recovery plan protected item. + ID *string + + // The virtual machine Id. + VirtualMachineID *string +} + +// RecoveryPlanProviderSpecificDetails - Recovery plan provider specific details. +type RecoveryPlanProviderSpecificDetails struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetRecoveryPlanProviderSpecificDetails implements the RecoveryPlanProviderSpecificDetailsClassification interface for type +// RecoveryPlanProviderSpecificDetails. +func (r *RecoveryPlanProviderSpecificDetails) GetRecoveryPlanProviderSpecificDetails() *RecoveryPlanProviderSpecificDetails { + return r +} + +// RecoveryPlanProviderSpecificFailoverInput - Recovery plan provider specific failover input. +type RecoveryPlanProviderSpecificFailoverInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetRecoveryPlanProviderSpecificFailoverInput implements the RecoveryPlanProviderSpecificFailoverInputClassification interface +// for type RecoveryPlanProviderSpecificFailoverInput. +func (r *RecoveryPlanProviderSpecificFailoverInput) GetRecoveryPlanProviderSpecificFailoverInput() *RecoveryPlanProviderSpecificFailoverInput { + return r +} + +// RecoveryPlanProviderSpecificInput - Recovery plan provider specific input base class. +type RecoveryPlanProviderSpecificInput struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetRecoveryPlanProviderSpecificInput implements the RecoveryPlanProviderSpecificInputClassification interface for type +// RecoveryPlanProviderSpecificInput. +func (r *RecoveryPlanProviderSpecificInput) GetRecoveryPlanProviderSpecificInput() *RecoveryPlanProviderSpecificInput { + return r +} + +// RecoveryPlanScriptActionDetails - Recovery plan script action details. +type RecoveryPlanScriptActionDetails struct { + // REQUIRED; The fabric location. + FabricLocation *RecoveryPlanActionLocation + + // REQUIRED; Gets the type of action details (see RecoveryPlanActionDetailsTypes enum for possible values). + InstanceType *string + + // REQUIRED; The script path. + Path *string + + // The script timeout. + Timeout *string +} + +// GetRecoveryPlanActionDetails implements the RecoveryPlanActionDetailsClassification interface for type RecoveryPlanScriptActionDetails. +func (r *RecoveryPlanScriptActionDetails) GetRecoveryPlanActionDetails() *RecoveryPlanActionDetails { + return &RecoveryPlanActionDetails{ + InstanceType: r.InstanceType, + } +} + +// RecoveryPlanShutdownGroupTaskDetails - This class represents the recovery plan shutdown group task details. +type RecoveryPlanShutdownGroupTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // The child tasks. + ChildTasks []*ASRTask + + // The group identifier. + GroupID *string + + // The name. + Name *string + + // The group type. + RpGroupType *string +} + +// GetGroupTaskDetails implements the GroupTaskDetailsClassification interface for type RecoveryPlanShutdownGroupTaskDetails. +func (r *RecoveryPlanShutdownGroupTaskDetails) GetGroupTaskDetails() *GroupTaskDetails { + return &GroupTaskDetails{ + ChildTasks: r.ChildTasks, + InstanceType: r.InstanceType, + } +} + +// GetRecoveryPlanGroupTaskDetails implements the RecoveryPlanGroupTaskDetailsClassification interface for type RecoveryPlanShutdownGroupTaskDetails. +func (r *RecoveryPlanShutdownGroupTaskDetails) GetRecoveryPlanGroupTaskDetails() *RecoveryPlanGroupTaskDetails { + return &RecoveryPlanGroupTaskDetails{ + ChildTasks: r.ChildTasks, + GroupID: r.GroupID, + InstanceType: r.InstanceType, + Name: r.Name, + RpGroupType: r.RpGroupType, + } +} + +// RecoveryPlanTestFailoverCleanupInput - Recovery plan test failover cleanup input. +type RecoveryPlanTestFailoverCleanupInput struct { + // REQUIRED; The recovery plan test failover cleanup input properties. + Properties *RecoveryPlanTestFailoverCleanupInputProperties +} + +// RecoveryPlanTestFailoverCleanupInputProperties - Recovery plan test failover cleanup input properties. +type RecoveryPlanTestFailoverCleanupInputProperties struct { + // The test failover cleanup comments. + Comments *string +} + +// RecoveryPlanTestFailoverInput - Recovery plan test failover input. +type RecoveryPlanTestFailoverInput struct { + // REQUIRED; The recovery plan test failover input properties. + Properties *RecoveryPlanTestFailoverInputProperties +} + +// RecoveryPlanTestFailoverInputProperties - Recovery plan test failover input properties. +type RecoveryPlanTestFailoverInputProperties struct { + // REQUIRED; The failover direction. + FailoverDirection *PossibleOperationsDirections + + // REQUIRED; The network type to be used for test failover. + NetworkType *string + + // The Id of the network to be used for test failover. + NetworkID *string + + // The provider specific properties. + ProviderSpecificDetails []RecoveryPlanProviderSpecificFailoverInputClassification +} + +// RecoveryPlanUnplannedFailoverInput - Recovery plan unplanned failover input. +type RecoveryPlanUnplannedFailoverInput struct { + // REQUIRED; The recovery plan unplanned failover input properties. + Properties *RecoveryPlanUnplannedFailoverInputProperties +} + +// RecoveryPlanUnplannedFailoverInputProperties - Recovery plan unplanned failover input properties. +type RecoveryPlanUnplannedFailoverInputProperties struct { + // REQUIRED; The failover direction. + FailoverDirection *PossibleOperationsDirections + + // REQUIRED; A value indicating whether source site operations are required. + SourceSiteOperations *SourceSiteOperations + + // The provider specific properties. + ProviderSpecificDetails []RecoveryPlanProviderSpecificFailoverInputClassification +} + +// RecoveryPoint - Recovery point. +type RecoveryPoint struct { + // Resource Location + Location *string + + // The recovery point properties. + Properties *RecoveryPointProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// RecoveryPointCollection - Collection of recovery point details. +type RecoveryPointCollection struct { + // The value of next link. + NextLink *string + + // The recovery point details. + Value []*RecoveryPoint +} + +// RecoveryPointProperties - Recovery point properties. +type RecoveryPointProperties struct { + // The provider specific details for the recovery point. + ProviderSpecificDetails ProviderSpecificRecoveryPointDetailsClassification + + // The recovery point time. + RecoveryPointTime *time.Time + + // The recovery point type: ApplicationConsistent, CrashConsistent. + RecoveryPointType *string +} + +// RecoveryProximityPlacementGroupCustomDetails - Recovery Proximity placement group custom input. +type RecoveryProximityPlacementGroupCustomDetails struct { + // REQUIRED; The class type. + ResourceType *string +} + +// GetRecoveryProximityPlacementGroupCustomDetails implements the RecoveryProximityPlacementGroupCustomDetailsClassification +// interface for type RecoveryProximityPlacementGroupCustomDetails. +func (r *RecoveryProximityPlacementGroupCustomDetails) GetRecoveryProximityPlacementGroupCustomDetails() *RecoveryProximityPlacementGroupCustomDetails { + return r +} + +// RecoveryResourceGroupCustomDetails - Recovery Resource Group custom input. +type RecoveryResourceGroupCustomDetails struct { + // REQUIRED; The class type. + ResourceType *string +} + +// GetRecoveryResourceGroupCustomDetails implements the RecoveryResourceGroupCustomDetailsClassification interface for type +// RecoveryResourceGroupCustomDetails. +func (r *RecoveryResourceGroupCustomDetails) GetRecoveryResourceGroupCustomDetails() *RecoveryResourceGroupCustomDetails { + return r +} + +// RecoveryServicesProvider - Provider details. +type RecoveryServicesProvider struct { + // Resource Location + Location *string + + // Provider properties. + Properties *RecoveryServicesProviderProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// RecoveryServicesProviderCollection - Collection of providers. +type RecoveryServicesProviderCollection struct { + // The value of next link. + NextLink *string + + // The Servers details. + Value []*RecoveryServicesProvider +} + +// RecoveryServicesProviderProperties - Recovery services provider properties. +type RecoveryServicesProviderProperties struct { + // The scenarios allowed on this provider. + AllowedScenarios []*string + + // The authentication identity details. + AuthenticationIdentityDetails *IdentityProviderDetails + + // The Bios Id. + BiosID *string + + // A value indicating whether DRA is responsive. + ConnectionStatus *string + + // The data plane authentication identity details. + DataPlaneAuthenticationIdentityDetails *IdentityProviderDetails + + // The DRA Id. + DraIdentifier *string + + // The fabric friendly name. + FabricFriendlyName *string + + // Type of the site. + FabricType *string + + // Friendly name of the DRA. + FriendlyName *string + + // The recovery services provider health error details. + HealthErrorDetails []*HealthError + + // Time when last heartbeat was sent by the DRA. + LastHeartBeat *time.Time + + // The machine Id. + MachineID *string + + // The machine name. + MachineName *string + + // Number of protected VMs currently managed by the DRA. + ProtectedItemCount *int32 + + // The provider version. + ProviderVersion *string + + // The provider version details. + ProviderVersionDetails *VersionDetails + + // Expiry date of the version. + ProviderVersionExpiryDate *time.Time + + // DRA version status. + ProviderVersionState *string + + // The resource access identity details. + ResourceAccessIdentityDetails *IdentityProviderDetails + + // The fabric provider. + ServerVersion *string +} + +// RecoveryVirtualNetworkCustomDetails - Recovery Virtual network custom input. +type RecoveryVirtualNetworkCustomDetails struct { + // REQUIRED; The class type. + ResourceType *string +} + +// GetRecoveryVirtualNetworkCustomDetails implements the RecoveryVirtualNetworkCustomDetailsClassification interface for type +// RecoveryVirtualNetworkCustomDetails. +func (r *RecoveryVirtualNetworkCustomDetails) GetRecoveryVirtualNetworkCustomDetails() *RecoveryVirtualNetworkCustomDetails { + return r +} + +// RegisteredClusterNodes - Extended location of the resource. +type RegisteredClusterNodes struct { + // The BIOS ID. + BiosID *string + + // The cluster node name. + ClusterNodeFqdn *string + + // A value indicating whether this represents virtual entity hosting all the shared disks. + IsSharedDiskVirtualNode *bool + + // The machine ID. + MachineID *string +} + +// RemoveDisksInput - Input for remove disk(s) operation. +type RemoveDisksInput struct { + // Remove disk input properties. + Properties *RemoveDisksInputProperties +} + +// RemoveDisksInputProperties - Remove Disk input properties. +type RemoveDisksInputProperties struct { + // The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, + // it will be SanEnableProtectionInput object. For HyperVReplicaAzure + // provider, it can be null. + ProviderSpecificDetails RemoveDisksProviderSpecificInputClassification +} + +// RemoveDisksProviderSpecificInput - Remove Disk provider specific input. +type RemoveDisksProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetRemoveDisksProviderSpecificInput implements the RemoveDisksProviderSpecificInputClassification interface for type RemoveDisksProviderSpecificInput. +func (r *RemoveDisksProviderSpecificInput) GetRemoveDisksProviderSpecificInput() *RemoveDisksProviderSpecificInput { + return r +} + +// RemoveProtectionContainerMappingInput - Container unpairing input. +type RemoveProtectionContainerMappingInput struct { + // Configure protection input properties. + Properties *RemoveProtectionContainerMappingInputProperties +} + +// RemoveProtectionContainerMappingInputProperties - Unpairing input properties. +type RemoveProtectionContainerMappingInputProperties struct { + // Provider specific input for unpairing. + ProviderSpecificInput *ReplicationProviderContainerUnmappingInput +} + +// RenewCertificateInput - Certificate renewal input. +type RenewCertificateInput struct { + // Renew certificate input properties. + Properties *RenewCertificateInputProperties +} + +// RenewCertificateInputProperties - Renew Certificate input properties. +type RenewCertificateInputProperties struct { + // Renew certificate type. + RenewCertificateType *string +} + +// ReplicationAgentDetails - Replication agent details. +type ReplicationAgentDetails struct { + // READ-ONLY; The replication agent Bios Id. + BiosID *string + + // READ-ONLY; The fabric object Id. + FabricObjectID *string + + // READ-ONLY; The replication agent Fqdn. + Fqdn *string + + // READ-ONLY; The health of the replication agent. + Health *ProtectionHealth + + // READ-ONLY; The health errors. + HealthErrors []*HealthError + + // READ-ONLY; The replication agent Id. + ID *string + + // READ-ONLY; The last heartbeat received from the replication agent. + LastHeartbeatUTC *time.Time + + // READ-ONLY; The replication agent name. + Name *string + + // READ-ONLY; The version. + Version *string +} + +// ReplicationAppliance - Replication appliance definition. +type ReplicationAppliance struct { + // Appliance related data. + Properties *ReplicationApplianceProperties +} + +// ReplicationApplianceProperties - Replication appliance properties. +type ReplicationApplianceProperties struct { + // Provider specific settings. + ProviderSpecificDetails ApplianceSpecificDetailsClassification +} + +// ReplicationClusterProviderSpecificSettings - Replication cluster provider specific settings. +type ReplicationClusterProviderSpecificSettings struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetReplicationClusterProviderSpecificSettings implements the ReplicationClusterProviderSpecificSettingsClassification interface +// for type ReplicationClusterProviderSpecificSettings. +func (r *ReplicationClusterProviderSpecificSettings) GetReplicationClusterProviderSpecificSettings() *ReplicationClusterProviderSpecificSettings { + return r +} + +// ReplicationEligibilityResults - Replication eligibility results response model. +type ReplicationEligibilityResults struct { + // READ-ONLY; Gets Unique ARM identifier for this object. + ID *string + + // READ-ONLY; Gets the name of this object. + Name *string + + // READ-ONLY; Gets properties model for replication eligibility results API. + Properties *ReplicationEligibilityResultsProperties + + // READ-ONLY; Gets the object type. + Type *string +} + +// ReplicationEligibilityResultsCollection - Replication eligibility results collection response model. +type ReplicationEligibilityResultsCollection struct { + // The replication eligibility results details. + Value []*ReplicationEligibilityResults +} + +// ReplicationEligibilityResultsErrorInfo - Error model that can be exposed to the user. +type ReplicationEligibilityResultsErrorInfo struct { + // The error code. + Code *string + + // The error message. + Message *string + + // The possible causes. + PossibleCauses *string + + // The recommended action. + RecommendedAction *string + + // READ-ONLY; The error status. + Status *string +} + +// ReplicationEligibilityResultsProperties - Properties model for replication eligibility results API. +type ReplicationEligibilityResultsProperties struct { + // The error details. + Errors []*ReplicationEligibilityResultsErrorInfo + + // READ-ONLY; The client request Id. + ClientRequestID *string +} + +// ReplicationGroupDetails - Replication group details. This will be used in case of San. +type ReplicationGroupDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string +} + +// GetConfigurationSettings implements the ConfigurationSettingsClassification interface for type ReplicationGroupDetails. +func (r *ReplicationGroupDetails) GetConfigurationSettings() *ConfigurationSettings { + return &ConfigurationSettings{ + InstanceType: r.InstanceType, + } +} + +// ReplicationProtectedItem - Replication protected item. +type ReplicationProtectedItem struct { + // Resource Location + Location *string + + // The custom data. + Properties *ReplicationProtectedItemProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// ReplicationProtectedItemCollection - Replication protected item collection. +type ReplicationProtectedItemCollection struct { + // The value of next link. + NextLink *string + + // The Replication protected item details. + Value []*ReplicationProtectedItem +} + +// ReplicationProtectedItemProperties - Replication protected item custom data details. +type ReplicationProtectedItemProperties struct { + // The Current active location of the PE. + ActiveLocation *string + + // The allowed operations on the Replication protected item. + AllowedOperations []*string + + // The current scenario. + CurrentScenario *CurrentScenarioDetails + + // The correlation Id for events associated with this protected item. + EventCorrelationID *string + + // The consolidated failover health for the VM. + FailoverHealth *string + + // The recovery point ARM Id to which the Vm was failed over. + FailoverRecoveryPointID *string + + // The name. + FriendlyName *string + + // List of health errors. + HealthErrors []*HealthError + + // The Last successful failover time. + LastSuccessfulFailoverTime *time.Time + + // The Last successful test failover time. + LastSuccessfulTestFailoverTime *time.Time + + // The name of Policy governing this PE. + PolicyFriendlyName *string + + // The ID of Policy governing this PE. + PolicyID *string + + // The friendly name of the primary fabric. + PrimaryFabricFriendlyName *string + + // The fabric provider of the primary fabric. + PrimaryFabricProvider *string + + // The name of primary protection container friendly name. + PrimaryProtectionContainerFriendlyName *string + + // The protected item ARM Id. + ProtectableItemID *string + + // The type of protected item type. + ProtectedItemType *string + + // The protection status. + ProtectionState *string + + // The protection state description. + ProtectionStateDescription *string + + // The Replication provider custom settings. + ProviderSpecificDetails ReplicationProviderSpecificSettingsClassification + + // The recovery container Id. + RecoveryContainerID *string + + // The friendly name of recovery fabric. + RecoveryFabricFriendlyName *string + + // The Arm Id of recovery fabric. + RecoveryFabricID *string + + // The name of recovery container friendly name. + RecoveryProtectionContainerFriendlyName *string + + // The recovery provider ARM Id. + RecoveryServicesProviderID *string + + // The consolidated protection health for the VM taking any issues with SRS as well as all the replication units associated + // with the VM's replication group into account. This is a string representation + // of the ProtectionHealth enumeration. + ReplicationHealth *string + + // The switch provider state. + SwitchProviderState *string + + // The switch provider state description. + SwitchProviderStateDescription *string + + // The Test failover state. + TestFailoverState *string + + // The Test failover state description. + TestFailoverStateDescription *string +} + +// ReplicationProtectionCluster - Replication protection Cluster. +type ReplicationProtectionCluster struct { + // The custom data. + Properties *ReplicationProtectionClusterProperties + + // READ-ONLY; The protection cluster Id. + ID *string + + // READ-ONLY; The name of the protection cluster. + Name *string + + // READ-ONLY; The Type of the object. + Type *string +} + +// ReplicationProtectionClusterCollection - Replication protected item collection. +type ReplicationProtectionClusterCollection struct { + // The value of next link. + NextLink *string + + // The Replication protection cluster details. + Value []*ReplicationProtectionCluster +} + +// ReplicationProtectionClusterProperties - Replication protection cluster custom data details. +type ReplicationProtectionClusterProperties struct { + // The Current active location of the Protection cluster. + ActiveLocation *string + + // The Agent cluster Id. + AgentClusterID *string + + // The allowed operations on the Replication protection cluster. + AllowedOperations []*string + + // A value indicating whether all nodes of the cluster are registered or not. + AreAllClusterNodesRegistered *bool + + // The cluster FQDN. + ClusterFqdn *string + + // The List of cluster Node FQDNs. + ClusterNodeFqdns []*string + + // The List of Protected Item Id's. + ClusterProtectedItemIDs []*string + + // The registered node details. + ClusterRegisteredNodes []*RegisteredClusterNodes + + // The current scenario. + CurrentScenario *CurrentScenarioDetails + + // List of health errors. + HealthErrors []*HealthError + + // The last successful failover time. + LastSuccessfulFailoverTime *time.Time + + // The last successful test failover time. + LastSuccessfulTestFailoverTime *time.Time + + // The name of Policy governing this PE. + PolicyFriendlyName *string + + // The Policy Id. + PolicyID *string + + // The friendly name of the primary fabric. + PrimaryFabricFriendlyName *string + + // The fabric provider of the primary fabric. + PrimaryFabricProvider *string + + // The name of primary protection container friendly name. + PrimaryProtectionContainerFriendlyName *string + + // The type of protection cluster type. + ProtectionClusterType *string + + // The protection status. + ProtectionState *string + + // The protection state description. + ProtectionStateDescription *string + + // The Replication cluster provider custom settings. + ProviderSpecificDetails ReplicationClusterProviderSpecificSettingsClassification + + // The recovery container Id. + RecoveryContainerID *string + + // The friendly name of recovery fabric. + RecoveryFabricFriendlyName *string + + // The Arm Id of recovery fabric. + RecoveryFabricID *string + + // The name of recovery container friendly name. + RecoveryProtectionContainerFriendlyName *string + + // The consolidated protection health for the VM taking any issues with SRS as well as all the replication units associated + // with the VM's replication group into account. This is a string representation + // of the ProtectionHealth enumeration. + ReplicationHealth *string + + // The shared disk properties. + SharedDiskProperties *SharedDiskReplicationItemProperties + + // The Test failover state. + TestFailoverState *string + + // The Test failover state description. + TestFailoverStateDescription *string + + // READ-ONLY; The provisioning state of the cluster. + ProvisioningState *string +} + +// ReplicationProtectionIntent - Replication protection intent. +type ReplicationProtectionIntent struct { + // Resource Location + Location *string + + // The custom data. + Properties *ReplicationProtectionIntentProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// ReplicationProtectionIntentCollection - Replication protection intent objects collection. +type ReplicationProtectionIntentCollection struct { + // The value of next link. + NextLink *string + + // The Replication protection intent details. + Value []*ReplicationProtectionIntent +} + +// ReplicationProtectionIntentProperties - Replication protection intent custom data details. +type ReplicationProtectionIntentProperties struct { + // The name. + FriendlyName *string + + // The Replication provider custom settings. + ProviderSpecificDetails ReplicationProtectionIntentProviderSpecificSettingsClassification + + // READ-ONLY; The creation time in UTC. + CreationTimeUTC *string + + // READ-ONLY; A value indicating whether the intent object is active. + IsActive *bool + + // READ-ONLY; The job Id. + JobID *string + + // READ-ONLY; The job state. + JobState *string +} + +// ReplicationProtectionIntentProviderSpecificSettings - Replication provider specific settings. +type ReplicationProtectionIntentProviderSpecificSettings struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetReplicationProtectionIntentProviderSpecificSettings implements the ReplicationProtectionIntentProviderSpecificSettingsClassification +// interface for type ReplicationProtectionIntentProviderSpecificSettings. +func (r *ReplicationProtectionIntentProviderSpecificSettings) GetReplicationProtectionIntentProviderSpecificSettings() *ReplicationProtectionIntentProviderSpecificSettings { + return r +} + +// ReplicationProviderContainerUnmappingInput - Provider specific input for unpairing operations. +type ReplicationProviderContainerUnmappingInput struct { + // The class type. + InstanceType *string +} + +// ReplicationProviderSpecificContainerCreationInput - Provider specific input for container creation operation. +type ReplicationProviderSpecificContainerCreationInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetReplicationProviderSpecificContainerCreationInput implements the ReplicationProviderSpecificContainerCreationInputClassification +// interface for type ReplicationProviderSpecificContainerCreationInput. +func (r *ReplicationProviderSpecificContainerCreationInput) GetReplicationProviderSpecificContainerCreationInput() *ReplicationProviderSpecificContainerCreationInput { + return r +} + +// ReplicationProviderSpecificContainerMappingInput - Provider specific input for pairing operations. +type ReplicationProviderSpecificContainerMappingInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetReplicationProviderSpecificContainerMappingInput implements the ReplicationProviderSpecificContainerMappingInputClassification +// interface for type ReplicationProviderSpecificContainerMappingInput. +func (r *ReplicationProviderSpecificContainerMappingInput) GetReplicationProviderSpecificContainerMappingInput() *ReplicationProviderSpecificContainerMappingInput { + return r +} + +// ReplicationProviderSpecificSettings - Replication provider specific settings. +type ReplicationProviderSpecificSettings struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetReplicationProviderSpecificSettings implements the ReplicationProviderSpecificSettingsClassification interface for type +// ReplicationProviderSpecificSettings. +func (r *ReplicationProviderSpecificSettings) GetReplicationProviderSpecificSettings() *ReplicationProviderSpecificSettings { + return r +} + +// ReplicationProviderSpecificUpdateContainerMappingInput - Provider specific input for update pairing operations. +type ReplicationProviderSpecificUpdateContainerMappingInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetReplicationProviderSpecificUpdateContainerMappingInput implements the ReplicationProviderSpecificUpdateContainerMappingInputClassification +// interface for type ReplicationProviderSpecificUpdateContainerMappingInput. +func (r *ReplicationProviderSpecificUpdateContainerMappingInput) GetReplicationProviderSpecificUpdateContainerMappingInput() *ReplicationProviderSpecificUpdateContainerMappingInput { + return r +} + +// ReprotectAgentDetails - Reprotect agent details. +type ReprotectAgentDetails struct { + // READ-ONLY; The list of accessible datastores fetched from discovery. + AccessibleDatastores []*string + + // READ-ONLY; The reprotect agent Bios Id. + BiosID *string + + // READ-ONLY; The fabric object Id. + FabricObjectID *string + + // READ-ONLY; The reprotect agent Fqdn. + Fqdn *string + + // READ-ONLY; The health of the reprotect agent. + Health *ProtectionHealth + + // READ-ONLY; The health errors. + HealthErrors []*HealthError + + // READ-ONLY; The reprotect agent Id. + ID *string + + // READ-ONLY; The last time when SDS information discovered in SRS. + LastDiscoveryInUTC *time.Time + + // READ-ONLY; The last heartbeat received from the reprotect agent. + LastHeartbeatUTC *time.Time + + // READ-ONLY; The reprotect agent name. + Name *string + + // READ-ONLY; The protected item count. + ProtectedItemCount *int32 + + // READ-ONLY; The Vcenter Id. + VcenterID *string + + // READ-ONLY; The version. + Version *string +} + +// ResolveHealthError - Resolve health errors input properties. +type ResolveHealthError struct { + // Health error id. + HealthErrorID *string +} + +// ResolveHealthInput - Resolve health input. +type ResolveHealthInput struct { + // Disable resolve health input properties. + Properties *ResolveHealthInputProperties +} + +// ResolveHealthInputProperties - Resolve health input properties. +type ResolveHealthInputProperties struct { + // Health errors. + HealthErrors []*ResolveHealthError +} + +// ResourceHealthSummary - Base class to define the health summary of the resources contained under an Arm resource. +type ResourceHealthSummary struct { + // The categorized resource counts. + CategorizedResourceCounts map[string]*int32 + + // The list of summary of health errors across the resources under the container. + Issues []*HealthErrorSummary + + // The count of total resources under the container. + ResourceCount *int32 +} + +// ResumeJobParams - Resume job params. +type ResumeJobParams struct { + // Resume job properties. + Properties *ResumeJobParamsProperties +} + +// ResumeJobParamsProperties - Resume job properties. +type ResumeJobParamsProperties struct { + // Resume job comments. + Comments *string +} + +// ResumeReplicationInput - Resume replication input. +type ResumeReplicationInput struct { + // REQUIRED; Resume replication input properties. + Properties *ResumeReplicationInputProperties +} + +// ResumeReplicationInputProperties - Resume replication input properties. +type ResumeReplicationInputProperties struct { + // REQUIRED; The provider specific input for resume replication. + ProviderSpecificDetails ResumeReplicationProviderSpecificInputClassification +} + +// ResumeReplicationProviderSpecificInput - Resume replication provider specific input. +type ResumeReplicationProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetResumeReplicationProviderSpecificInput implements the ResumeReplicationProviderSpecificInputClassification interface +// for type ResumeReplicationProviderSpecificInput. +func (r *ResumeReplicationProviderSpecificInput) GetResumeReplicationProviderSpecificInput() *ResumeReplicationProviderSpecificInput { + return r +} + +// ResyncInput - Resync input. +type ResyncInput struct { + // REQUIRED; Resync input properties. + Properties *ResyncInputProperties +} + +// ResyncInputProperties - Resync input properties. +type ResyncInputProperties struct { + // REQUIRED; The provider specific details. + ProviderSpecificDetails ResyncProviderSpecificInputClassification +} + +// ResyncProviderSpecificInput - Resync provider specific input. +type ResyncProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetResyncProviderSpecificInput implements the ResyncProviderSpecificInputClassification interface for type ResyncProviderSpecificInput. +func (r *ResyncProviderSpecificInput) GetResyncProviderSpecificInput() *ResyncProviderSpecificInput { + return r +} + +// RetentionVolume - The retention details of the MT. +type RetentionVolume struct { + // The volume capacity. + CapacityInBytes *int64 + + // The free space available in this volume. + FreeSpaceInBytes *int64 + + // The threshold percentage. + ThresholdPercentage *int32 + + // The volume name. + VolumeName *string +} + +// ReverseReplicationInput - Reverse replication input. +type ReverseReplicationInput struct { + // Reverse replication properties. + Properties *ReverseReplicationInputProperties +} + +// ReverseReplicationInputProperties - Reverse replication input properties. +type ReverseReplicationInputProperties struct { + // Failover direction. + FailoverDirection *string + + // Provider specific reverse replication input. + ProviderSpecificDetails ReverseReplicationProviderSpecificInputClassification +} + +// ReverseReplicationProviderSpecificInput - Provider specific reverse replication input. +type ReverseReplicationProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetReverseReplicationProviderSpecificInput implements the ReverseReplicationProviderSpecificInputClassification interface +// for type ReverseReplicationProviderSpecificInput. +func (r *ReverseReplicationProviderSpecificInput) GetReverseReplicationProviderSpecificInput() *ReverseReplicationProviderSpecificInput { + return r +} + +// RunAsAccount - CS Accounts Details. +type RunAsAccount struct { + // The CS RunAs account Id. + AccountID *string + + // The CS RunAs account name. + AccountName *string +} + +// ScriptActionTaskDetails - This class represents the script action task details. +type ScriptActionTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // A value indicating whether it is a primary side script or not. + IsPrimarySideScript *bool + + // The name. + Name *string + + // The output. + Output *string + + // The path. + Path *string +} + +// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type ScriptActionTaskDetails. +func (s *ScriptActionTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { + return &TaskTypeDetails{ + InstanceType: s.InstanceType, + } +} + +// SecurityProfileProperties - Security profile input. +type SecurityProfileProperties struct { + // A value indicating whether confidential compute encryption to be enabled. + TargetVMConfidentialEncryption *SecurityConfiguration + + // A value indicating whether integrity monitoring to be enabled. + TargetVMMonitoring *SecurityConfiguration + + // A value indicating whether secure boot to be enabled. + TargetVMSecureBoot *SecurityConfiguration + + // The target VM security type. + TargetVMSecurityType *SecurityType + + // A value indicating whether trusted platform module to be enabled. + TargetVMTpm *SecurityConfiguration +} + +// ServiceError - ASR error model. +type ServiceError struct { + // Activity Id. + ActivityID *string + + // Error code. + Code *string + + // Error message. + Message *string + + // Possible causes of error. + PossibleCauses *string + + // Recommended action to resolve error. + RecommendedAction *string +} + +// SharedDiskReplicationItemProperties - Shared Disk Replication item custom data details. +type SharedDiskReplicationItemProperties struct { + // The Current active location of the PE. + ActiveLocation *string + + // The allowed operations on the Replication protected item. + AllowedOperations []*string + + // The current scenario. + CurrentScenario *CurrentScenarioDetails + + // List of health errors. + HealthErrors []*HealthError + + // The protection state of shared disk. + ProtectionState *string + + // The consolidated protection health for the VM taking any issues with SRS as well as all the replication units associated + // with the VM's replication group into account. This is a string representation + // of the ProtectionHealth enumeration. + ReplicationHealth *string + + // The Replication provider custom settings. + SharedDiskProviderSpecificDetails SharedDiskReplicationProviderSpecificSettingsClassification + + // The tfo state of shared disk. + TestFailoverState *string +} + +// SharedDiskReplicationProviderSpecificSettings - Replication provider specific settings. +type SharedDiskReplicationProviderSpecificSettings struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetSharedDiskReplicationProviderSpecificSettings implements the SharedDiskReplicationProviderSpecificSettingsClassification +// interface for type SharedDiskReplicationProviderSpecificSettings. +func (s *SharedDiskReplicationProviderSpecificSettings) GetSharedDiskReplicationProviderSpecificSettings() *SharedDiskReplicationProviderSpecificSettings { + return s +} + +// StorageAccountCustomDetails - Storage account custom input. +type StorageAccountCustomDetails struct { + // REQUIRED; The class type. + ResourceType *string +} + +// GetStorageAccountCustomDetails implements the StorageAccountCustomDetailsClassification interface for type StorageAccountCustomDetails. +func (s *StorageAccountCustomDetails) GetStorageAccountCustomDetails() *StorageAccountCustomDetails { + return s +} + +// StorageClassification - Storage object definition. +type StorageClassification struct { + // Resource Location + Location *string + + // Properties of the storage object. + Properties *StorageClassificationProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// StorageClassificationCollection - Collection of storage details. +type StorageClassificationCollection struct { + // The value of next link. + NextLink *string + + // The storage details. + Value []*StorageClassification +} + +// StorageClassificationMapping - Storage mapping object. +type StorageClassificationMapping struct { + // Resource Location + Location *string + + // Properties of the storage mapping object. + Properties *StorageClassificationMappingProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// StorageClassificationMappingCollection - Collection of storage mapping details. +type StorageClassificationMappingCollection struct { + // The value of next link. + NextLink *string + + // The storage details. + Value []*StorageClassificationMapping +} + +// StorageClassificationMappingInput - Storage mapping input. +type StorageClassificationMappingInput struct { + // Storage mapping input properties. + Properties *StorageMappingInputProperties +} + +// StorageClassificationMappingProperties - Storage mapping properties. +type StorageClassificationMappingProperties struct { + // Target storage object Id. + TargetStorageClassificationID *string +} + +// StorageClassificationProperties - Storage object properties. +type StorageClassificationProperties struct { + // Friendly name of the Storage classification. + FriendlyName *string +} + +// StorageMappingInputProperties - Storage mapping input properties. +type StorageMappingInputProperties struct { + // The ID of the storage object. + TargetStorageClassificationID *string +} + +// Subnets of the network. +type Subnet struct { + // The list of addresses for the subnet. + AddressList []*string + + // The subnet friendly name. + FriendlyName *string + + // The subnet name. + Name *string +} + +// SupportedOSDetails - Supported operating system details. +type SupportedOSDetails struct { + // The name. + OSName *string + + // The type. + OSType *string + + // The list of version for operating system. + OSVersions []*OSVersionWrapper +} + +// SupportedOSProperties - Supported operating systems properties. +type SupportedOSProperties struct { + // The supported operating systems property list. + SupportedOsList []*SupportedOSProperty +} + +// SupportedOSProperty - Supported operating systems property. +type SupportedOSProperty struct { + // The replication provider type. + InstanceType *string + + // The list of supported operating systems. + SupportedOs []*SupportedOSDetails +} + +// SupportedOperatingSystems - Supported operating systems. +type SupportedOperatingSystems struct { + // Resource Location + Location *string + + // The supported operating systems properties. + Properties *SupportedOSProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// SwitchClusterProtectionInput - Switch cluster protection input. +type SwitchClusterProtectionInput struct { + // Switch cluster protection properties. + Properties *SwitchClusterProtectionInputProperties +} + +// SwitchClusterProtectionInputProperties - Switch cluster protection input properties. +type SwitchClusterProtectionInputProperties struct { + // Provider specific switch protection input. + ProviderSpecificDetails SwitchClusterProtectionProviderSpecificInputClassification + + // The unique replication protection cluster name. + ReplicationProtectionClusterName *string +} + +// SwitchClusterProtectionProviderSpecificInput - Provider specific switch cluster protection input. +type SwitchClusterProtectionProviderSpecificInput struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetSwitchClusterProtectionProviderSpecificInput implements the SwitchClusterProtectionProviderSpecificInputClassification +// interface for type SwitchClusterProtectionProviderSpecificInput. +func (s *SwitchClusterProtectionProviderSpecificInput) GetSwitchClusterProtectionProviderSpecificInput() *SwitchClusterProtectionProviderSpecificInput { + return s +} + +// SwitchProtectionInput - Switch protection input. +type SwitchProtectionInput struct { + // Switch protection properties. + Properties *SwitchProtectionInputProperties +} + +// SwitchProtectionInputProperties - Switch protection input properties. +type SwitchProtectionInputProperties struct { + // Provider specific switch protection input. + ProviderSpecificDetails SwitchProtectionProviderSpecificInputClassification + + // The unique replication protected item name. + ReplicationProtectedItemName *string +} + +// SwitchProtectionJobDetails - This class represents details for switch protection job. +type SwitchProtectionJobDetails struct { + // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). + InstanceType *string + + // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow + // object details. + AffectedObjectDetails map[string]*string + + // ARM Id of the new replication protected item. + NewReplicationProtectedItemID *string +} + +// GetJobDetails implements the JobDetailsClassification interface for type SwitchProtectionJobDetails. +func (s *SwitchProtectionJobDetails) GetJobDetails() *JobDetails { + return &JobDetails{ + AffectedObjectDetails: s.AffectedObjectDetails, + InstanceType: s.InstanceType, + } +} + +// SwitchProtectionProviderSpecificInput - Provider specific switch protection input. +type SwitchProtectionProviderSpecificInput struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetSwitchProtectionProviderSpecificInput implements the SwitchProtectionProviderSpecificInputClassification interface for +// type SwitchProtectionProviderSpecificInput. +func (s *SwitchProtectionProviderSpecificInput) GetSwitchProtectionProviderSpecificInput() *SwitchProtectionProviderSpecificInput { + return s +} + +// SwitchProviderInput - Input definition for switch provider. +type SwitchProviderInput struct { + // Switch provider input properties. + Properties *SwitchProviderInputProperties +} + +// SwitchProviderInputProperties - Input definition for switch provider input properties. +type SwitchProviderInputProperties struct { + // Provider specific settings. + ProviderSpecificDetails SwitchProviderSpecificInputClassification + + // Target provider type. + TargetInstanceType *string +} + +// SwitchProviderSpecificInput - Provider specific switch provider input. +type SwitchProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetSwitchProviderSpecificInput implements the SwitchProviderSpecificInputClassification interface for type SwitchProviderSpecificInput. +func (s *SwitchProviderSpecificInput) GetSwitchProviderSpecificInput() *SwitchProviderSpecificInput { + return s +} + +// TargetComputeSize - Represents applicable recovery vm sizes. +type TargetComputeSize struct { + // The Id. + ID *string + + // The name. + Name *string + + // The custom data. + Properties *TargetComputeSizeProperties + + // The Type of the object. + Type *string +} + +// TargetComputeSizeCollection - Target compute size collection. +type TargetComputeSizeCollection struct { + // The value of next link. + NextLink *string + + // The list of target compute sizes. + Value []*TargetComputeSize +} + +// TargetComputeSizeProperties - Represents applicable recovery vm sizes properties. +type TargetComputeSizeProperties struct { + // The maximum cpu cores count supported by target compute size. + CPUCoresCount *int32 + + // The reasons why the target compute size is not applicable for the protected item. + Errors []*ComputeSizeErrorDetails + + // Target compute size display name. + FriendlyName *string + + // The value indicating whether the target compute size supports high Iops. + HighIopsSupported *string + + // The supported HyperV Generations. + HyperVGenerations []*string + + // The maximum data disks count supported by target compute size. + MaxDataDiskCount *int32 + + // The maximum Nics count supported by target compute size. + MaxNicsCount *int32 + + // The maximum memory in GB supported by target compute size. + MemoryInGB *float64 + + // Target compute size name. + Name *string + + // READ-ONLY; The Available vCPUs supported by target compute size. + VCPUsAvailable *int32 +} + +// TaskTypeDetails - Task details based on specific task type. +type TaskTypeDetails struct { + // REQUIRED; The type of task details. + InstanceType *string +} + +// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type TaskTypeDetails. +func (t *TaskTypeDetails) GetTaskTypeDetails() *TaskTypeDetails { return t } + +// TestFailoverCleanupInput - Input definition for test failover cleanup. +type TestFailoverCleanupInput struct { + // REQUIRED; Test failover cleanup input properties. + Properties *TestFailoverCleanupInputProperties +} + +// TestFailoverCleanupInputProperties - Input definition for test failover cleanup input properties. +type TestFailoverCleanupInputProperties struct { + // Test failover cleanup comments. + Comments *string +} + +// TestFailoverInput - Input definition for test failover. +type TestFailoverInput struct { + // REQUIRED; Test failover input properties. + Properties *TestFailoverInputProperties +} + +// TestFailoverInputProperties - Input definition for test failover input properties. +type TestFailoverInputProperties struct { + // Test failover direction. + FailoverDirection *string + + // The id of the network to be used for test failover. + NetworkID *string + + // Network type to be used for test failover. + NetworkType *string + + // Provider specific settings. + ProviderSpecificDetails TestFailoverProviderSpecificInputClassification +} + +// TestFailoverJobDetails - This class represents the details for a test failover job. +type TestFailoverJobDetails struct { + // REQUIRED; Gets the type of job details (see JobDetailsTypes enum for possible values). + InstanceType *string + + // The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow + // object details. + AffectedObjectDetails map[string]*string + + // The test failover comments. + Comments *string + + // The test network friendly name. + NetworkFriendlyName *string + + // The test network name. + NetworkName *string + + // The test network type (see TestFailoverInput enum for possible values). + NetworkType *string + + // The test VM details. + ProtectedItemDetails []*FailoverReplicationProtectedItemDetails + + // The test failover status. + TestFailoverStatus *string +} + +// GetJobDetails implements the JobDetailsClassification interface for type TestFailoverJobDetails. +func (t *TestFailoverJobDetails) GetJobDetails() *JobDetails { + return &JobDetails{ + AffectedObjectDetails: t.AffectedObjectDetails, + InstanceType: t.InstanceType, + } +} + +// TestFailoverProviderSpecificInput - Provider specific test failover input. +type TestFailoverProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetTestFailoverProviderSpecificInput implements the TestFailoverProviderSpecificInputClassification interface for type +// TestFailoverProviderSpecificInput. +func (t *TestFailoverProviderSpecificInput) GetTestFailoverProviderSpecificInput() *TestFailoverProviderSpecificInput { + return t +} + +// TestMigrateCleanupInput - Input for test migrate cleanup. +type TestMigrateCleanupInput struct { + // REQUIRED; Test migrate cleanup input properties. + Properties *TestMigrateCleanupInputProperties +} + +// TestMigrateCleanupInputProperties - Test migrate cleanup input properties. +type TestMigrateCleanupInputProperties struct { + // Test migrate cleanup comments. + Comments *string +} + +// TestMigrateInput - Input for test migrate. +type TestMigrateInput struct { + // REQUIRED; Test migrate input properties. + Properties *TestMigrateInputProperties +} + +// TestMigrateInputProperties - Test migrate input properties. +type TestMigrateInputProperties struct { + // REQUIRED; The provider specific details. + ProviderSpecificDetails TestMigrateProviderSpecificInputClassification +} + +// TestMigrateProviderSpecificInput - Test migrate provider specific input. +type TestMigrateProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetTestMigrateProviderSpecificInput implements the TestMigrateProviderSpecificInputClassification interface for type TestMigrateProviderSpecificInput. +func (t *TestMigrateProviderSpecificInput) GetTestMigrateProviderSpecificInput() *TestMigrateProviderSpecificInput { + return t +} + +// UnplannedFailoverInput - Input definition for unplanned failover. +type UnplannedFailoverInput struct { + // REQUIRED; Unplanned failover input properties. + Properties *UnplannedFailoverInputProperties +} + +// UnplannedFailoverInputProperties - Input definition for unplanned failover input properties. +type UnplannedFailoverInputProperties struct { + // Failover direction. + FailoverDirection *string + + // Provider specific settings. + ProviderSpecificDetails UnplannedFailoverProviderSpecificInputClassification + + // Source site operations status. + SourceSiteOperations *string +} + +// UnplannedFailoverProviderSpecificInput - Provider specific unplanned failover input. +type UnplannedFailoverProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetUnplannedFailoverProviderSpecificInput implements the UnplannedFailoverProviderSpecificInputClassification interface +// for type UnplannedFailoverProviderSpecificInput. +func (u *UnplannedFailoverProviderSpecificInput) GetUnplannedFailoverProviderSpecificInput() *UnplannedFailoverProviderSpecificInput { + return u +} + +// UpdateApplianceForReplicationProtectedItemInput - Update appliance for replication protected item input. +type UpdateApplianceForReplicationProtectedItemInput struct { + // REQUIRED; Update appliance replication protected item properties. + Properties *UpdateApplianceForReplicationProtectedItemInputProperties +} + +// UpdateApplianceForReplicationProtectedItemInputProperties - Update appliance for protected item input properties. +type UpdateApplianceForReplicationProtectedItemInputProperties struct { + // REQUIRED; The provider specific input to update replication protected item. + ProviderSpecificDetails UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification + + // REQUIRED; The target appliance Id. + TargetApplianceID *string +} + +// UpdateApplianceForReplicationProtectedItemProviderSpecificInput - Update replication protected item provider specific input. +type UpdateApplianceForReplicationProtectedItemProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput implements the UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification +// interface for type UpdateApplianceForReplicationProtectedItemProviderSpecificInput. +func (u *UpdateApplianceForReplicationProtectedItemProviderSpecificInput) GetUpdateApplianceForReplicationProtectedItemProviderSpecificInput() *UpdateApplianceForReplicationProtectedItemProviderSpecificInput { + return u +} + +// UpdateDiskInput - Disk input for update. +type UpdateDiskInput struct { + // REQUIRED; The disk Id. + DiskID *string + + // The target disk name. + TargetDiskName *string +} + +// UpdateMigrationItemInput - Update migration item input. +type UpdateMigrationItemInput struct { + // Update migration item input properties. + Properties *UpdateMigrationItemInputProperties +} + +// UpdateMigrationItemInputProperties - Update migration item input properties. +type UpdateMigrationItemInputProperties struct { + // REQUIRED; The provider specific input to update migration item. + ProviderSpecificDetails UpdateMigrationItemProviderSpecificInputClassification +} + +// UpdateMigrationItemProviderSpecificInput - Update migration item provider specific input. +type UpdateMigrationItemProviderSpecificInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetUpdateMigrationItemProviderSpecificInput implements the UpdateMigrationItemProviderSpecificInputClassification interface +// for type UpdateMigrationItemProviderSpecificInput. +func (u *UpdateMigrationItemProviderSpecificInput) GetUpdateMigrationItemProviderSpecificInput() *UpdateMigrationItemProviderSpecificInput { + return u +} + +// UpdateMobilityServiceRequest - Request to update the mobility service on a protected item. +type UpdateMobilityServiceRequest struct { + // The properties of the update mobility service request. + Properties *UpdateMobilityServiceRequestProperties +} + +// UpdateMobilityServiceRequestProperties - The properties of an update mobility service request. +type UpdateMobilityServiceRequestProperties struct { + // The CS run as account Id. + RunAsAccountID *string +} + +// UpdateNetworkMappingInput - Update network mapping input. +type UpdateNetworkMappingInput struct { + // The input properties needed to update network mapping. + Properties *UpdateNetworkMappingInputProperties +} + +// UpdateNetworkMappingInputProperties - Common input details for network mapping operation. +type UpdateNetworkMappingInputProperties struct { + // Fabrics specific input network Id. + FabricSpecificDetails FabricSpecificUpdateNetworkMappingInputClassification + + // Recovery fabric name. + RecoveryFabricName *string + + // Recovery network Id. + RecoveryNetworkID *string +} + +// UpdatePolicyInput - Update policy input. +type UpdatePolicyInput struct { + // The ReplicationProviderSettings. + Properties *UpdatePolicyInputProperties +} + +// UpdatePolicyInputProperties - Policy update properties. +type UpdatePolicyInputProperties struct { + // The ReplicationProviderSettings. + ReplicationProviderSettings PolicyProviderSpecificInputClassification +} + +// UpdateProtectionContainerMappingInput - Container pairing update input. +type UpdateProtectionContainerMappingInput struct { + // Update protection container mapping input properties. + Properties *UpdateProtectionContainerMappingInputProperties +} + +// UpdateProtectionContainerMappingInputProperties - Container pairing update input. +type UpdateProtectionContainerMappingInputProperties struct { + // Provider specific input for updating protection container mapping. + ProviderSpecificInput ReplicationProviderSpecificUpdateContainerMappingInputClassification +} + +// UpdateRecoveryPlanInput - Update recovery plan input class. +type UpdateRecoveryPlanInput struct { + // Recovery plan update properties. + Properties *UpdateRecoveryPlanInputProperties +} + +// UpdateRecoveryPlanInputProperties - Recovery plan update properties. +type UpdateRecoveryPlanInputProperties struct { + // The recovery plan groups. + Groups []*RecoveryPlanGroup +} + +// UpdateReplicationProtectedItemInput - Update replication protected item input. +type UpdateReplicationProtectedItemInput struct { + // Update replication protected item properties. + Properties *UpdateReplicationProtectedItemInputProperties +} + +// UpdateReplicationProtectedItemInputProperties - Update protected item input properties. +type UpdateReplicationProtectedItemInputProperties struct { + // The selected option to enable RDP\SSH on target vm after failover. String value of SrsDataContract.EnableRDPOnTargetOption + // enum. + EnableRdpOnTargetOption *string + + // License type. + LicenseType *LicenseType + + // The provider specific input to update replication protected item. + ProviderSpecificDetails UpdateReplicationProtectedItemProviderInputClassification + + // The target availability set Id. + RecoveryAvailabilitySetID *string + + // Target Azure VM name given by the user. + RecoveryAzureVMName *string + + // Target Azure VM size. + RecoveryAzureVMSize *string + + // Target Azure Network Id. + SelectedRecoveryAzureNetworkID *string + + // The selected source nic Id which will be used as the primary nic during failover. + SelectedSourceNicID *string + + // The Azure Network Id for test failover. + SelectedTfoAzureNetworkID *string + + // The list of VM nic details. + VMNics []*VMNicInputDetails +} + +// UpdateReplicationProtectedItemProviderInput - Update replication protected item provider specific input. +type UpdateReplicationProtectedItemProviderInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetUpdateReplicationProtectedItemProviderInput implements the UpdateReplicationProtectedItemProviderInputClassification +// interface for type UpdateReplicationProtectedItemProviderInput. +func (u *UpdateReplicationProtectedItemProviderInput) GetUpdateReplicationProtectedItemProviderInput() *UpdateReplicationProtectedItemProviderInput { + return u +} + +// UpdateVCenterRequest - Input required to update vCenter. +type UpdateVCenterRequest struct { + // The update VCenter Request Properties. + Properties *UpdateVCenterRequestProperties +} + +// UpdateVCenterRequestProperties - The properties of an update vCenter request. +type UpdateVCenterRequestProperties struct { + // The friendly name of the vCenter. + FriendlyName *string + + // The IP address of the vCenter to be discovered. + IPAddress *string + + // The port number for discovery. + Port *string + + // The process server Id from where the update can be orchestrated. + ProcessServerID *string + + // The CS account Id which has privileges to update the vCenter. + RunAsAccountID *string +} + +// UserCreatedResourceTag - Resource tag input. +type UserCreatedResourceTag struct { + // The tag name. Please read for more information: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources#limitations + TagName *string + + // The tag value. Please read her for more information: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources#limitations + TagValue *string +} + +// VCenter - vCenter definition. +type VCenter struct { + // Resource Location + Location *string + + // VCenter related data. + Properties *VCenterProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// VCenterCollection - Collection of vCenter details. +type VCenterCollection struct { + // The value of next link. + NextLink *string + + // The vCenter details. + Value []*VCenter +} + +// VCenterProperties - vCenter properties. +type VCenterProperties struct { + // The VCenter discovery status. + DiscoveryStatus *string + + // The ARM resource name of the fabric containing this VCenter. + FabricArmResourceName *string + + // Friendly name of the vCenter. + FriendlyName *string + + // The health errors for this VCenter. + HealthErrors []*HealthError + + // The IP address of the vCenter. + IPAddress *string + + // The infrastructure Id of vCenter. + InfrastructureID *string + + // VCenter internal ID. + InternalID *string + + // The time when the last heartbeat was received by vCenter. + LastHeartbeat *time.Time + + // The port number for discovery. + Port *string + + // The process server Id. + ProcessServerID *string + + // The account Id which has privileges to discover the vCenter. + RunAsAccountID *string +} + +// VMNicDetails - Hyper V VM network details. +type VMNicDetails struct { + // A value indicating whether the NIC has accelerated networking enabled. + EnableAcceleratedNetworkingOnRecovery *bool + + // Whether the TFO NIC has accelerated networking enabled. + EnableAcceleratedNetworkingOnTfo *bool + + // The IP configurations of the NIC. + IPConfigs []*IPConfigDetails + + // The nic Id. + NicID *string + + // The id of the NSG associated with the NIC. + RecoveryNetworkSecurityGroupID *string + + // The name of the NIC to be used when creating target NICs. + RecoveryNicName *string + + // The resource group of the NIC to be used when creating target NICs. + RecoveryNicResourceGroupName *string + + // Recovery VM network Id. + RecoveryVMNetworkID *string + + // The replica nic Id. + ReplicaNicID *string + + // A value indicating whether an existing NIC is allowed to be reused during failover subject to availability. + ReuseExistingNic *bool + + // Selection type for failover. + SelectionType *string + + // The source nic ARM Id. + SourceNicArmID *string + + // Target NIC name. + TargetNicName *string + + // The NSG to be used by NIC during test failover. + TfoNetworkSecurityGroupID *string + + // The name of the NIC to be used when creating target NICs in TFO. + TfoRecoveryNicName *string + + // The resource group of the NIC to be used when creating target NICs in TFO. + TfoRecoveryNicResourceGroupName *string + + // A value indicating whether an existing NIC is allowed to be reused during test failover subject to availability. + TfoReuseExistingNic *bool + + // The network to be used by NIC during test failover. + TfoVMNetworkID *string + + // VM network name. + VMNetworkName *string +} + +// VMNicInputDetails - Hyper V VM network input details. +type VMNicInputDetails struct { + // Whether the NIC has accelerated networking enabled. + EnableAcceleratedNetworkingOnRecovery *bool + + // Whether the test NIC has accelerated networking enabled. + EnableAcceleratedNetworkingOnTfo *bool + + // The IP configurations to be used by NIC during test failover and failover. + IPConfigs []*IPConfigInputDetails + + // The nic Id. + NicID *string + + // The id of the NSG associated with the NIC. + RecoveryNetworkSecurityGroupID *string + + // The name of the NIC to be used when creating target NICs. + RecoveryNicName *string + + // The resource group of the NIC to be used when creating target NICs. + RecoveryNicResourceGroupName *string + + // A value indicating whether an existing NIC is allowed to be reused during failover subject to availability. + ReuseExistingNic *bool + + // Selection type for failover. + SelectionType *string + + // Target NIC name. + TargetNicName *string + + // The NSG to be used by NIC during test failover. + TfoNetworkSecurityGroupID *string + + // The name of the NIC to be used when creating target NICs in TFO. + TfoNicName *string + + // The resource group of the NIC to be used when creating target NICs in TFO. + TfoNicResourceGroupName *string + + // A value indicating whether an existing NIC is allowed to be reused during test failover subject to availability. + TfoReuseExistingNic *bool +} + +// VMNicUpdatesTaskDetails - This class represents the vm NicUpdates task details. +type VMNicUpdatesTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // Name of the Nic. + Name *string + + // Nic Id. + NicID *string + + // Virtual machine Id. + VMID *string +} + +// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type VMNicUpdatesTaskDetails. +func (v *VMNicUpdatesTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { + return &TaskTypeDetails{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtContainerCreationInput - VMwareCbt container creation input. +type VMwareCbtContainerCreationInput struct { + // REQUIRED; The class type. + InstanceType *string +} + +// GetReplicationProviderSpecificContainerCreationInput implements the ReplicationProviderSpecificContainerCreationInputClassification +// interface for type VMwareCbtContainerCreationInput. +func (v *VMwareCbtContainerCreationInput) GetReplicationProviderSpecificContainerCreationInput() *ReplicationProviderSpecificContainerCreationInput { + return &ReplicationProviderSpecificContainerCreationInput{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtContainerMappingInput - VMwareCbt container mapping input. +type VMwareCbtContainerMappingInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The storage account ARM Id. + StorageAccountID *string + + // REQUIRED; The target location. + TargetLocation *string + + // The target key vault ARM Id. + KeyVaultID *string + + // The target key vault URL. + KeyVaultURI *string + + // The secret name of the service bus connection string. + ServiceBusConnectionStringSecretName *string + + // The secret name of the storage account. + StorageAccountSasSecretName *string +} + +// GetReplicationProviderSpecificContainerMappingInput implements the ReplicationProviderSpecificContainerMappingInputClassification +// interface for type VMwareCbtContainerMappingInput. +func (v *VMwareCbtContainerMappingInput) GetReplicationProviderSpecificContainerMappingInput() *ReplicationProviderSpecificContainerMappingInput { + return &ReplicationProviderSpecificContainerMappingInput{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtDiskInput - VMwareCbt disk input. +type VMwareCbtDiskInput struct { + // REQUIRED; The disk Id. + DiskID *string + + // REQUIRED; A value indicating whether the disk is the OS disk. + IsOSDisk *string + + // REQUIRED; The log storage account ARM Id. + LogStorageAccountID *string + + // REQUIRED; The key vault secret name of the log storage account. + LogStorageAccountSasSecretName *string + + // The DiskEncryptionSet ARM Id. + DiskEncryptionSetID *string + + // The disk type. + DiskType *DiskAccountType + + // The logical sector size (in bytes), 512 by default. + SectorSizeInBytes *int32 +} + +// VMwareCbtEnableMigrationInput - VMwareCbt specific enable migration input. +type VMwareCbtEnableMigrationInput struct { + // REQUIRED; The data mover run as account Id. + DataMoverRunAsAccountID *string + + // REQUIRED; The disks to include list. + DisksToInclude []*VMwareCbtDiskInput + + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The snapshot run as account Id. + SnapshotRunAsAccountID *string + + // REQUIRED; The target network ARM Id. + TargetNetworkID *string + + // REQUIRED; The target resource group ARM Id. + TargetResourceGroupID *string + + // REQUIRED; The ARM Id of the VM discovered in VMware. + VmwareMachineID *string + + // The confidential VM key vault Id for ADE installation. + ConfidentialVMKeyVaultID *string + + // License type. + LicenseType *LicenseType + + // The license type for Linux VM's. + LinuxLicenseType *LinuxLicenseType + + // A value indicating whether auto resync is to be done. + PerformAutoResync *string + + // A value indicating whether bulk SQL RP registration to be done. + PerformSQLBulkRegistration *string + + // The SQL Server license type. + SQLServerLicenseType *SQLServerLicenseType + + // The tags for the seed disks. + SeedDiskTags map[string]*string + + // The target availability set ARM Id. + TargetAvailabilitySetID *string + + // The target availability zone. + TargetAvailabilityZone *string + + // The target boot diagnostics storage account ARM Id. + TargetBootDiagnosticsStorageAccountID *string + + // The tags for the target disks. + TargetDiskTags map[string]*string + + // The tags for the target NICs. + TargetNicTags map[string]*string + + // The target proximity placement group ARM Id. + TargetProximityPlacementGroupID *string + + // The target subnet name. + TargetSubnetName *string + + // The target VM name. + TargetVMName *string + + // The target VM security profile. + TargetVMSecurityProfile *VMwareCbtSecurityProfileProperties + + // The target VM size. + TargetVMSize *string + + // The target VM tags. + TargetVMTags map[string]*string + + // The selected test network ARM Id. + TestNetworkID *string + + // The selected test subnet name. + TestSubnetName *string + + // The OS name selected by user. + UserSelectedOSName *string +} + +// GetEnableMigrationProviderSpecificInput implements the EnableMigrationProviderSpecificInputClassification interface for +// type VMwareCbtEnableMigrationInput. +func (v *VMwareCbtEnableMigrationInput) GetEnableMigrationProviderSpecificInput() *EnableMigrationProviderSpecificInput { + return &EnableMigrationProviderSpecificInput{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtEventDetails - Event details for VMwareCbt provider. +type VMwareCbtEventDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // READ-ONLY; The migration item name. + MigrationItemName *string +} + +// GetEventProviderSpecificDetails implements the EventProviderSpecificDetailsClassification interface for type VMwareCbtEventDetails. +func (v *VMwareCbtEventDetails) GetEventProviderSpecificDetails() *EventProviderSpecificDetails { + return &EventProviderSpecificDetails{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtMigrateInput - VMwareCbt specific migrate input. +type VMwareCbtMigrateInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; A value indicating whether VM is to be shutdown. + PerformShutdown *string + + // A value indicating the inplace OS Upgrade version. + OSUpgradeVersion *string + + // The managed run command script input. + PostMigrationSteps []*ManagedRunCommandScriptInput +} + +// GetMigrateProviderSpecificInput implements the MigrateProviderSpecificInputClassification interface for type VMwareCbtMigrateInput. +func (v *VMwareCbtMigrateInput) GetMigrateProviderSpecificInput() *MigrateProviderSpecificInput { + return &MigrateProviderSpecificInput{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtMigrationDetails - VMwareCbt provider specific settings. +type VMwareCbtMigrationDetails struct { + // REQUIRED; Gets the instance type. + InstanceType *string + + // The confidential VM key vault Id for ADE installation. + ConfidentialVMKeyVaultID *string + + // License Type of the VM to be used. + LicenseType *string + + // The license type for Linux VM's. + LinuxLicenseType *LinuxLicenseType + + // A value indicating whether auto resync is to be done. + PerformAutoResync *string + + // The list of protected disks. + ProtectedDisks []*VMwareCbtProtectedDiskDetails + + // The SQL Server license type. + SQLServerLicenseType *string + + // The tags for the seed disks. + SeedDiskTags map[string]*string + + // A value indicating the inplace OS Upgrade version. + SupportedOSVersions []*string + + // The target availability set Id. + TargetAvailabilitySetID *string + + // The target availability zone. + TargetAvailabilityZone *string + + // The target boot diagnostics storage account ARM Id. + TargetBootDiagnosticsStorageAccountID *string + + // The tags for the target disks. + TargetDiskTags map[string]*string + + // The target network Id. + TargetNetworkID *string + + // The tags for the target NICs. + TargetNicTags map[string]*string + + // The target proximity placement group Id. + TargetProximityPlacementGroupID *string + + // The target resource group Id. + TargetResourceGroupID *string + + // Target VM name. + TargetVMName *string + + // The target VM security profile. + TargetVMSecurityProfile *VMwareCbtSecurityProfileProperties + + // The target VM size. + TargetVMSize *string + + // The target VM tags. + TargetVMTags map[string]*string + + // The test network Id. + TestNetworkID *string + + // The network details. + VMNics []*VMwareCbtNicDetails + + // READ-ONLY; A value indicating the appliance monitoring details. + ApplianceMonitoringDetails *ApplianceMonitoringDetails + + // READ-ONLY; The data mover run as account Id. + DataMoverRunAsAccountID *string + + // READ-ONLY; The delta sync progress percentage. + DeltaSyncProgressPercentage *int32 + + // READ-ONLY; The delta sync retry count. + DeltaSyncRetryCount *int64 + + // READ-ONLY; The firmware type. + FirmwareType *string + + // READ-ONLY; A value indicating the gateway operation details. + GatewayOperationDetails *GatewayOperationDetails + + // READ-ONLY; The initial seeding progress percentage. + InitialSeedingProgressPercentage *int32 + + // READ-ONLY; The initial seeding retry count. + InitialSeedingRetryCount *int64 + + // READ-ONLY; A value indicating whether checksum resync cycle is in progress. + IsCheckSumResyncCycle *string + + // READ-ONLY; The last recovery point Id. + LastRecoveryPointID *string + + // READ-ONLY; The last recovery point received time. + LastRecoveryPointReceived *time.Time + + // READ-ONLY; The migration progress percentage. + MigrationProgressPercentage *int32 + + // READ-ONLY; The recovery point Id to which the VM was migrated. + MigrationRecoveryPointID *string + + // READ-ONLY; The name of the OS on the VM. + OSName *string + + // READ-ONLY; The type of the OS on the VM. + OSType *string + + // READ-ONLY; A value indicating the SRS operation name. + OperationName *string + + // READ-ONLY; The resume progress percentage. + ResumeProgressPercentage *int32 + + // READ-ONLY; The resume retry count. + ResumeRetryCount *int64 + + // READ-ONLY; The resync progress percentage. + ResyncProgressPercentage *int32 + + // READ-ONLY; A value indicating whether resync is required. + ResyncRequired *string + + // READ-ONLY; The resync retry count. + ResyncRetryCount *int64 + + // READ-ONLY; The resync state. + ResyncState *ResyncState + + // READ-ONLY; The snapshot run as account Id. + SnapshotRunAsAccountID *string + + // READ-ONLY; The replication storage account ARM Id. This is applicable only for the blob based replication test hook. + StorageAccountID *string + + // READ-ONLY; The target generation. + TargetGeneration *string + + // READ-ONLY; The target location. + TargetLocation *string + + // READ-ONLY; The ARM Id of the VM discovered in VMware. + VmwareMachineID *string +} + +// GetMigrationProviderSpecificSettings implements the MigrationProviderSpecificSettingsClassification interface for type +// VMwareCbtMigrationDetails. +func (v *VMwareCbtMigrationDetails) GetMigrationProviderSpecificSettings() *MigrationProviderSpecificSettings { + return &MigrationProviderSpecificSettings{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtNicDetails - VMwareCbt NIC details. +type VMwareCbtNicDetails struct { + // A value indicating whether this is the primary NIC. + IsPrimaryNic *string + + // A value indicating whether this NIC is selected for migration. + IsSelectedForMigration *string + + // The target IP address. + TargetIPAddress *string + + // The target IP address type. + TargetIPAddressType *EthernetAddressType + + // Target NIC name. + TargetNicName *string + + // Target subnet name. + TargetSubnetName *string + + // The test IP address. + TestIPAddress *string + + // The test IP address type. + TestIPAddressType *EthernetAddressType + + // Source network Id. + TestNetworkID *string + + // Test subnet name. + TestSubnetName *string + + // READ-ONLY; The NIC Id. + NicID *string + + // READ-ONLY; The source IP address. + SourceIPAddress *string + + // READ-ONLY; The source IP address type. + SourceIPAddressType *EthernetAddressType + + // READ-ONLY; Source network Id. + SourceNetworkID *string +} + +// VMwareCbtNicInput - VMwareCbt NIC input. +type VMwareCbtNicInput struct { + // REQUIRED; A value indicating whether this is the primary NIC. + IsPrimaryNic *string + + // REQUIRED; The NIC Id. + NicID *string + + // A value indicating whether this NIC is selected for migration. + IsSelectedForMigration *string + + // Target NIC name. + TargetNicName *string + + // The static IP address. + TargetStaticIPAddress *string + + // Target subnet name. + TargetSubnetName *string + + // The test static IP address. + TestStaticIPAddress *string + + // The test subnet name. + TestSubnetName *string +} + +// VMwareCbtPolicyCreationInput - VMware Cbt policy creation input. +type VMwareCbtPolicyCreationInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency (in minutes). + CrashConsistentFrequencyInMinutes *int32 + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistoryInMinutes *int32 +} + +// GetPolicyProviderSpecificInput implements the PolicyProviderSpecificInputClassification interface for type VMwareCbtPolicyCreationInput. +func (v *VMwareCbtPolicyCreationInput) GetPolicyProviderSpecificInput() *PolicyProviderSpecificInput { + return &PolicyProviderSpecificInput{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtProtectedDiskDetails - VMwareCbt protected disk details. +type VMwareCbtProtectedDiskDetails struct { + // The disk type. + DiskType *DiskAccountType + + // The logical sector size (in bytes), 512 by default. + SectorSizeInBytes *int32 + + // The name for the target managed disk. + TargetDiskName *string + + // READ-ONLY; The disk capacity in bytes. + CapacityInBytes *int64 + + // READ-ONLY; The DiskEncryptionSet ARM Id. + DiskEncryptionSetID *string + + // READ-ONLY; The disk id. + DiskID *string + + // READ-ONLY; The disk name. + DiskName *string + + // READ-ONLY; The disk path. + DiskPath *string + + // READ-ONLY; A value indicating the gateway operation details. + GatewayOperationDetails *GatewayOperationDetails + + // READ-ONLY; A value indicating whether the disk is the OS disk. + IsOSDisk *string + + // READ-ONLY; The log storage account ARM Id. + LogStorageAccountID *string + + // READ-ONLY; The key vault secret name of the log storage account. + LogStorageAccountSasSecretName *string + + // READ-ONLY; The uri of the seed blob. + SeedBlobURI *string + + // READ-ONLY; The ARM Id of the seed managed disk. + SeedManagedDiskID *string + + // READ-ONLY; The uri of the target blob. + TargetBlobURI *string + + // READ-ONLY; The ARM Id of the target managed disk. + TargetManagedDiskID *string +} + +// VMwareCbtProtectionContainerMappingDetails - VMwareCbt provider specific container mapping details. +type VMwareCbtProtectionContainerMappingDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The SKUs to be excluded. + ExcludedSKUs []*string + + // READ-ONLY; The target key vault ARM Id. + KeyVaultID *string + + // READ-ONLY; The target key vault URI. + KeyVaultURI *string + + // READ-ONLY; The role size to NIC count map. + RoleSizeToNicCountMap map[string]*int32 + + // READ-ONLY; The secret name of the service bus connection string. + ServiceBusConnectionStringSecretName *string + + // READ-ONLY; The storage account ARM Id. + StorageAccountID *string + + // READ-ONLY; The secret name of the storage account. + StorageAccountSasSecretName *string + + // READ-ONLY; The target location. + TargetLocation *string +} + +// GetProtectionContainerMappingProviderSpecificDetails implements the ProtectionContainerMappingProviderSpecificDetailsClassification +// interface for type VMwareCbtProtectionContainerMappingDetails. +func (v *VMwareCbtProtectionContainerMappingDetails) GetProtectionContainerMappingProviderSpecificDetails() *ProtectionContainerMappingProviderSpecificDetails { + return &ProtectionContainerMappingProviderSpecificDetails{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtResumeReplicationInput - VMwareCbt specific resume replication input. +type VMwareCbtResumeReplicationInput struct { + // REQUIRED; The class type. + InstanceType *string + + // A value indicating whether Migration resources to be deleted. + DeleteMigrationResources *string +} + +// GetResumeReplicationProviderSpecificInput implements the ResumeReplicationProviderSpecificInputClassification interface +// for type VMwareCbtResumeReplicationInput. +func (v *VMwareCbtResumeReplicationInput) GetResumeReplicationProviderSpecificInput() *ResumeReplicationProviderSpecificInput { + return &ResumeReplicationProviderSpecificInput{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtResyncInput - VMwareCbt specific resync input. +type VMwareCbtResyncInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; A value indicating whether CBT is to be reset. + SkipCbtReset *string +} + +// GetResyncProviderSpecificInput implements the ResyncProviderSpecificInputClassification interface for type VMwareCbtResyncInput. +func (v *VMwareCbtResyncInput) GetResyncProviderSpecificInput() *ResyncProviderSpecificInput { + return &ResyncProviderSpecificInput{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtSecurityProfileProperties - VMwareCbt security profile input. +type VMwareCbtSecurityProfileProperties struct { + // A value indicating whether confidential compute encryption to be enabled. + IsTargetVMConfidentialEncryptionEnabled *string + + // A value indicating whether integrity monitoring to be enabled. + IsTargetVMIntegrityMonitoringEnabled *string + + // A value indicating whether secure boot to be enabled. + IsTargetVMSecureBootEnabled *string + + // A value indicating whether trusted platform module to be enabled. + IsTargetVMTpmEnabled *string + + // The target VM security type. + TargetVMSecurityType *SecurityType +} + +// VMwareCbtTestMigrateInput - VMwareCbt specific test migrate input. +type VMwareCbtTestMigrateInput struct { + // REQUIRED; The class type. + InstanceType *string + + // REQUIRED; The test network Id. + NetworkID *string + + // REQUIRED; The recovery point Id. + RecoveryPointID *string + + // A value indicating the inplace OS Upgrade version. + OSUpgradeVersion *string + + // The managed run command script input. + PostMigrationSteps []*ManagedRunCommandScriptInput + + // The list of NIC details. + VMNics []*VMwareCbtNicInput +} + +// GetTestMigrateProviderSpecificInput implements the TestMigrateProviderSpecificInputClassification interface for type VMwareCbtTestMigrateInput. +func (v *VMwareCbtTestMigrateInput) GetTestMigrateProviderSpecificInput() *TestMigrateProviderSpecificInput { + return &TestMigrateProviderSpecificInput{ + InstanceType: v.InstanceType, + } +} + +// VMwareCbtUpdateDiskInput - VMwareCbt disk input for update. +type VMwareCbtUpdateDiskInput struct { + // REQUIRED; The disk Id. + DiskID *string + + // A value indicating whether the disk is the OS disk. + IsOSDisk *string + + // The target disk name. + TargetDiskName *string +} + +// VMwareCbtUpdateMigrationItemInput - VMwareCbt specific update migration item input. +type VMwareCbtUpdateMigrationItemInput struct { + // REQUIRED; The class type. + InstanceType *string + + // The license type. + LicenseType *LicenseType + + // The license type for Linux VM's. + LinuxLicenseType *LinuxLicenseType + + // A value indicating whether auto resync is to be done. + PerformAutoResync *string + + // The SQL Server license type. + SQLServerLicenseType *SQLServerLicenseType + + // The target availability set ARM Id. + TargetAvailabilitySetID *string + + // The target availability zone. + TargetAvailabilityZone *string + + // The target boot diagnostics storage account ARM Id. + TargetBootDiagnosticsStorageAccountID *string + + // The tags for the target disks. + TargetDiskTags map[string]*string + + // The target network ARM Id. + TargetNetworkID *string + + // The tags for the target NICs. + TargetNicTags map[string]*string + + // The target proximity placement group ARM Id. + TargetProximityPlacementGroupID *string + + // The target resource group ARM Id. + TargetResourceGroupID *string + + // The target VM name. + TargetVMName *string + + // The target VM size. + TargetVMSize *string + + // The target VM tags. + TargetVMTags map[string]*string + + // The test network ARM Id. + TestNetworkID *string + + // The OS name selected by user. + UserSelectedOSName *string + + // The list of disk update properties. + VMDisks []*VMwareCbtUpdateDiskInput + + // The list of NIC details. + VMNics []*VMwareCbtNicInput +} + +// GetUpdateMigrationItemProviderSpecificInput implements the UpdateMigrationItemProviderSpecificInputClassification interface +// for type VMwareCbtUpdateMigrationItemInput. +func (v *VMwareCbtUpdateMigrationItemInput) GetUpdateMigrationItemProviderSpecificInput() *UpdateMigrationItemProviderSpecificInput { + return &UpdateMigrationItemProviderSpecificInput{ + InstanceType: v.InstanceType, + } +} + +// VMwareDetails - Store the fabric details specific to the VMware fabric. +type VMwareDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The number of source and target servers configured to talk to this CS. + AgentCount *string + + // Agent expiry date. + AgentExpiryDate *time.Time + + // The agent Version. + AgentVersion *string + + // The agent version details. + AgentVersionDetails *VersionDetails + + // The available memory. + AvailableMemoryInBytes *int64 + + // The available space. + AvailableSpaceInBytes *int64 + + // The percentage of the CPU load. + CPULoad *string + + // The CPU load status. + CPULoadStatus *string + + // The CS service status. + CsServiceStatus *string + + // The database server load. + DatabaseServerLoad *string + + // The database server load status. + DatabaseServerLoadStatus *string + + // The host name. + HostName *string + + // The IP address. + IPAddress *string + + // The last heartbeat received from CS server. + LastHeartbeat *time.Time + + // The list of Master Target servers associated with the fabric. + MasterTargetServers []*MasterTargetServer + + // The memory usage status. + MemoryUsageStatus *string + + // The number of process servers. + ProcessServerCount *string + + // The list of Process Servers associated with the fabric. + ProcessServers []*ProcessServer + + // The number of protected servers. + ProtectedServers *string + + // PS template version. + PsTemplateVersion *string + + // The number of replication pairs configured in this CS. + ReplicationPairCount *string + + // The list of run as accounts created on the server. + RunAsAccounts []*RunAsAccount + + // CS SSL cert expiry date. + SSLCertExpiryDate *time.Time + + // CS SSL cert expiry date. + SSLCertExpiryRemainingDays *int32 + + // The space usage status. + SpaceUsageStatus *string + + // The switch provider blocking error information. + SwitchProviderBlockingErrorDetails []*InMageFabricSwitchProviderBlockingErrorDetails + + // The percentage of the system load. + SystemLoad *string + + // The system load status. + SystemLoadStatus *string + + // The total memory. + TotalMemoryInBytes *int64 + + // The total space. + TotalSpaceInBytes *int64 + + // Version status. + VersionStatus *string + + // The web load. + WebLoad *string + + // The web load status. + WebLoadStatus *string +} + +// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type VMwareDetails. +func (v *VMwareDetails) GetFabricSpecificDetails() *FabricSpecificDetails { + return &FabricSpecificDetails{ + InstanceType: v.InstanceType, + } +} + +// VMwareV2FabricCreationInput - VMwareV2 fabric provider specific settings. +type VMwareV2FabricCreationInput struct { + // REQUIRED; Gets the class type. + InstanceType *string + + // REQUIRED; The ARM Id of the migration solution. + MigrationSolutionID *string + + // The ARM Id of the physical site. + PhysicalSiteID *string + + // The ARM Id of the VMware site. + VmwareSiteID *string +} + +// GetFabricSpecificCreationInput implements the FabricSpecificCreationInputClassification interface for type VMwareV2FabricCreationInput. +func (v *VMwareV2FabricCreationInput) GetFabricSpecificCreationInput() *FabricSpecificCreationInput { + return &FabricSpecificCreationInput{ + InstanceType: v.InstanceType, + } +} + +// VMwareV2FabricSpecificDetails - VMwareV2 fabric specific details. +type VMwareV2FabricSpecificDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // READ-ONLY; The Migration solution ARM Id. + MigrationSolutionID *string + + // READ-ONLY; The ARM Id of the physical site. + PhysicalSiteID *string + + // READ-ONLY; The list of process servers. + ProcessServers []*ProcessServerDetails + + // READ-ONLY; The service container Id. + ServiceContainerID *string + + // READ-ONLY; The service endpoint. + ServiceEndpoint *string + + // READ-ONLY; The service resource Id. + ServiceResourceID *string + + // READ-ONLY; The ARM Id of the VMware site. + VmwareSiteID *string +} + +// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type VMwareV2FabricSpecificDetails. +func (v *VMwareV2FabricSpecificDetails) GetFabricSpecificDetails() *FabricSpecificDetails { + return &FabricSpecificDetails{ + InstanceType: v.InstanceType, + } +} + +// VMwareVirtualMachineDetails - VMware provider specific settings. +type VMwareVirtualMachineDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The ID generated by the InMage agent after it gets installed on guest. This is the ID to be used during InMage CreateProtection. + AgentGeneratedID *string + + // The value indicating if InMage scout agent is installed on guest. + AgentInstalled *string + + // The agent version. + AgentVersion *string + + // A value indicating the discovery type of the machine. Value can be vCenter or physical. + DiscoveryType *string + + // The disk details. + DiskDetails []*InMageDiskDetails + + // The IP address. + IPAddress *string + + // The OsType installed on VM. + OSType *string + + // The value indicating whether VM is powered on. + PoweredOn *string + + // The VCenter infrastructure Id. + VCenterInfrastructureID *string + + // The validation errors. + ValidationErrors []*HealthError +} + +// GetConfigurationSettings implements the ConfigurationSettingsClassification interface for type VMwareVirtualMachineDetails. +func (v *VMwareVirtualMachineDetails) GetConfigurationSettings() *ConfigurationSettings { + return &ConfigurationSettings{ + InstanceType: v.InstanceType, + } +} + +// VaultHealthDetails - Vault health details definition. +type VaultHealthDetails struct { + // Resource Location + Location *string + + // The vault health related data. + Properties *VaultHealthProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// VaultHealthProperties - class to define the health summary of the Vault. +type VaultHealthProperties struct { + // The list of the health detail of the containers in the vault. + ContainersHealth *ResourceHealthSummary + + // The list of the health detail of the fabrics in the vault. + FabricsHealth *ResourceHealthSummary + + // The list of the health detail of the protected items in the vault. + ProtectedItemsHealth *ResourceHealthSummary + + // The list of errors on the vault. + VaultErrors []*HealthError +} + +// VaultSetting - Vault setting. +type VaultSetting struct { + // Resource Location + Location *string + + // The vault setting properties. + Properties *VaultSettingProperties + + // READ-ONLY; Resource Id + ID *string + + // READ-ONLY; Resource Name + Name *string + + // READ-ONLY; Resource Type + Type *string +} + +// VaultSettingCollection - Vault setting collection. +type VaultSettingCollection struct { + // The value of next link. + NextLink *string + + // The list of vault setting. + Value []*VaultSetting +} + +// VaultSettingCreationInput - Input to create vault setting. +type VaultSettingCreationInput struct { + // REQUIRED; Vault setting creation input properties. + Properties *VaultSettingCreationInputProperties +} + +// VaultSettingCreationInputProperties - Input to create vault setting. +type VaultSettingCreationInputProperties struct { + // The migration solution Id. + MigrationSolutionID *string + + // VMware to Azure provider type. + VmwareToAzureProviderType *string +} + +// VaultSettingProperties - Vault setting properties. +type VaultSettingProperties struct { + // The migration solution ARM Id. + MigrationSolutionID *string + + // VMware to Azure provider type. + VmwareToAzureProviderType *string +} + +// VersionDetails - Version related details. +type VersionDetails struct { + // Version expiry date. + ExpiryDate *time.Time + + // A value indicating whether security update required. + Status *AgentVersionStatus + + // The agent version. + Version *string +} + +// VirtualMachineTaskDetails - This class represents the virtual machine task details. +type VirtualMachineTaskDetails struct { + // REQUIRED; The type of task details. + InstanceType *string + + // The job entity. + JobTask *JobEntity + + // The skipped reason. + SkippedReason *string + + // The skipped reason string. + SkippedReasonString *string +} + +// GetJobTaskDetails implements the JobTaskDetailsClassification interface for type VirtualMachineTaskDetails. +func (v *VirtualMachineTaskDetails) GetJobTaskDetails() *JobTaskDetails { + return &JobTaskDetails{ + InstanceType: v.InstanceType, + JobTask: v.JobTask, + } +} + +// GetTaskTypeDetails implements the TaskTypeDetailsClassification interface for type VirtualMachineTaskDetails. +func (v *VirtualMachineTaskDetails) GetTaskTypeDetails() *TaskTypeDetails { + return &TaskTypeDetails{ + InstanceType: v.InstanceType, + } +} + +// VmmDetails - VMM fabric specific details. +type VmmDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string +} + +// GetFabricSpecificDetails implements the FabricSpecificDetailsClassification interface for type VmmDetails. +func (v *VmmDetails) GetFabricSpecificDetails() *FabricSpecificDetails { + return &FabricSpecificDetails{ + InstanceType: v.InstanceType, + } +} + +// VmmToAzureCreateNetworkMappingInput - Create network mappings input properties/behavior specific to Vmm to Azure Network +// mapping. +type VmmToAzureCreateNetworkMappingInput struct { + // REQUIRED; The instance type. + InstanceType *string +} + +// GetFabricSpecificCreateNetworkMappingInput implements the FabricSpecificCreateNetworkMappingInputClassification interface +// for type VmmToAzureCreateNetworkMappingInput. +func (v *VmmToAzureCreateNetworkMappingInput) GetFabricSpecificCreateNetworkMappingInput() *FabricSpecificCreateNetworkMappingInput { + return &FabricSpecificCreateNetworkMappingInput{ + InstanceType: v.InstanceType, + } +} + +// VmmToAzureNetworkMappingSettings - E2A Network Mapping fabric specific settings. +type VmmToAzureNetworkMappingSettings struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetNetworkMappingFabricSpecificSettings implements the NetworkMappingFabricSpecificSettingsClassification interface for +// type VmmToAzureNetworkMappingSettings. +func (v *VmmToAzureNetworkMappingSettings) GetNetworkMappingFabricSpecificSettings() *NetworkMappingFabricSpecificSettings { + return &NetworkMappingFabricSpecificSettings{ + InstanceType: v.InstanceType, + } +} + +// VmmToAzureUpdateNetworkMappingInput - Update network mappings input properties/behavior specific to vmm to azure. +type VmmToAzureUpdateNetworkMappingInput struct { + // REQUIRED; The instance type. + InstanceType *string +} + +// GetFabricSpecificUpdateNetworkMappingInput implements the FabricSpecificUpdateNetworkMappingInputClassification interface +// for type VmmToAzureUpdateNetworkMappingInput. +func (v *VmmToAzureUpdateNetworkMappingInput) GetFabricSpecificUpdateNetworkMappingInput() *FabricSpecificUpdateNetworkMappingInput { + return &FabricSpecificUpdateNetworkMappingInput{ + InstanceType: v.InstanceType, + } +} + +// VmmToVmmCreateNetworkMappingInput - Create network mappings input properties/behavior specific to vmm to vmm Network mapping. +type VmmToVmmCreateNetworkMappingInput struct { + // REQUIRED; The instance type. + InstanceType *string +} + +// GetFabricSpecificCreateNetworkMappingInput implements the FabricSpecificCreateNetworkMappingInputClassification interface +// for type VmmToVmmCreateNetworkMappingInput. +func (v *VmmToVmmCreateNetworkMappingInput) GetFabricSpecificCreateNetworkMappingInput() *FabricSpecificCreateNetworkMappingInput { + return &FabricSpecificCreateNetworkMappingInput{ + InstanceType: v.InstanceType, + } +} + +// VmmToVmmNetworkMappingSettings - E2E Network Mapping fabric specific settings. +type VmmToVmmNetworkMappingSettings struct { + // REQUIRED; Gets the Instance type. + InstanceType *string +} + +// GetNetworkMappingFabricSpecificSettings implements the NetworkMappingFabricSpecificSettingsClassification interface for +// type VmmToVmmNetworkMappingSettings. +func (v *VmmToVmmNetworkMappingSettings) GetNetworkMappingFabricSpecificSettings() *NetworkMappingFabricSpecificSettings { + return &NetworkMappingFabricSpecificSettings{ + InstanceType: v.InstanceType, + } +} + +// VmmToVmmUpdateNetworkMappingInput - Update network mappings input properties/behavior specific to vmm to vmm. +type VmmToVmmUpdateNetworkMappingInput struct { + // REQUIRED; The instance type. + InstanceType *string +} + +// GetFabricSpecificUpdateNetworkMappingInput implements the FabricSpecificUpdateNetworkMappingInputClassification interface +// for type VmmToVmmUpdateNetworkMappingInput. +func (v *VmmToVmmUpdateNetworkMappingInput) GetFabricSpecificUpdateNetworkMappingInput() *FabricSpecificUpdateNetworkMappingInput { + return &FabricSpecificUpdateNetworkMappingInput{ + InstanceType: v.InstanceType, + } +} + +// VmmVirtualMachineDetails - VMM fabric provider specific VM settings. +type VmmVirtualMachineDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The Last successful failover time. + DiskDetails []*DiskDetails + + // The id of the object in fabric. + Generation *string + + // A value indicating whether the VM has a fibre channel adapter attached. String value of SrsDataContract.PresenceStatus + // enum. + HasFibreChannelAdapter *PresenceStatus + + // A value indicating whether the VM has a physical disk attached. String value of SrsDataContract.PresenceStatus enum. + HasPhysicalDisk *PresenceStatus + + // A value indicating whether the VM has a shared VHD attached. String value of SrsDataContract.PresenceStatus enum. + HasSharedVhd *PresenceStatus + + // The Id of the hyper-v host in fabric. + HyperVHostID *string + + // The Last replication time. + OSDetails *OSDetails + + // The source id of the object. + SourceItemID *string +} + +// GetConfigurationSettings implements the ConfigurationSettingsClassification interface for type VmmVirtualMachineDetails. +func (v *VmmVirtualMachineDetails) GetConfigurationSettings() *ConfigurationSettings { + return &ConfigurationSettings{ + InstanceType: v.InstanceType, + } +} + +// GetHyperVVirtualMachineDetails implements the HyperVVirtualMachineDetailsClassification interface for type VmmVirtualMachineDetails. +func (v *VmmVirtualMachineDetails) GetHyperVVirtualMachineDetails() *HyperVVirtualMachineDetails { + return &HyperVVirtualMachineDetails{ + DiskDetails: v.DiskDetails, + Generation: v.Generation, + HasFibreChannelAdapter: v.HasFibreChannelAdapter, + HasPhysicalDisk: v.HasPhysicalDisk, + HasSharedVhd: v.HasSharedVhd, + HyperVHostID: v.HyperVHostID, + InstanceType: v.InstanceType, + OSDetails: v.OSDetails, + SourceItemID: v.SourceItemID, + } +} + +// VmwareCbtPolicyDetails - VMware Cbt specific policy details. +type VmwareCbtPolicyDetails struct { + // REQUIRED; Gets the class type. Overridden in derived classes. + InstanceType *string + + // The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 + + // The crash consistent snapshot frequency in minutes. + CrashConsistentFrequencyInMinutes *int32 + + // The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistoryInMinutes *int32 +} + +// GetPolicyProviderSpecificDetails implements the PolicyProviderSpecificDetailsClassification interface for type VmwareCbtPolicyDetails. +func (v *VmwareCbtPolicyDetails) GetPolicyProviderSpecificDetails() *PolicyProviderSpecificDetails { + return &PolicyProviderSpecificDetails{ + InstanceType: v.InstanceType, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/models_serde.go new file mode 100644 index 00000000..15d213f0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/models_serde.go @@ -0,0 +1,24693 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type A2AAddDisksInput. +func (a A2AAddDisksInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2A" + populate(objectMap, "vmDisks", a.VMDisks) + populate(objectMap, "vmManagedDisks", a.VMManagedDisks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AAddDisksInput. +func (a *A2AAddDisksInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "vmDisks": + err = unpopulate(val, "VMDisks", &a.VMDisks) + delete(rawMsg, key) + case "vmManagedDisks": + err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AApplyClusterRecoveryPointInput. +func (a A2AApplyClusterRecoveryPointInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2A" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AApplyClusterRecoveryPointInput. +func (a *A2AApplyClusterRecoveryPointInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AApplyRecoveryPointInput. +func (a A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2A" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AApplyRecoveryPointInput. +func (a *A2AApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AClusterRecoveryPointDetails. +func (a A2AClusterRecoveryPointDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2A" + populate(objectMap, "nodes", a.Nodes) + populate(objectMap, "recoveryPointSyncType", a.RecoveryPointSyncType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AClusterRecoveryPointDetails. +func (a *A2AClusterRecoveryPointDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "nodes": + err = unpopulate(val, "Nodes", &a.Nodes) + delete(rawMsg, key) + case "recoveryPointSyncType": + err = unpopulate(val, "RecoveryPointSyncType", &a.RecoveryPointSyncType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AClusterTestFailoverInput. +func (a A2AClusterTestFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clusterRecoveryPointId", a.ClusterRecoveryPointID) + populate(objectMap, "individualNodeRecoveryPoints", a.IndividualNodeRecoveryPoints) + objectMap["instanceType"] = "A2A" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AClusterTestFailoverInput. +func (a *A2AClusterTestFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clusterRecoveryPointId": + err = unpopulate(val, "ClusterRecoveryPointID", &a.ClusterRecoveryPointID) + delete(rawMsg, key) + case "individualNodeRecoveryPoints": + err = unpopulate(val, "IndividualNodeRecoveryPoints", &a.IndividualNodeRecoveryPoints) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AClusterUnplannedFailoverInput. +func (a A2AClusterUnplannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clusterRecoveryPointId", a.ClusterRecoveryPointID) + populate(objectMap, "individualNodeRecoveryPoints", a.IndividualNodeRecoveryPoints) + objectMap["instanceType"] = "A2A" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AClusterUnplannedFailoverInput. +func (a *A2AClusterUnplannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clusterRecoveryPointId": + err = unpopulate(val, "ClusterRecoveryPointID", &a.ClusterRecoveryPointID) + delete(rawMsg, key) + case "individualNodeRecoveryPoints": + err = unpopulate(val, "IndividualNodeRecoveryPoints", &a.IndividualNodeRecoveryPoints) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AContainerCreationInput. +func (a A2AContainerCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2A" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AContainerCreationInput. +func (a *A2AContainerCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AContainerMappingInput. +func (a A2AContainerMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentAutoUpdateStatus", a.AgentAutoUpdateStatus) + populate(objectMap, "automationAccountArmId", a.AutomationAccountArmID) + populate(objectMap, "automationAccountAuthenticationType", a.AutomationAccountAuthenticationType) + objectMap["instanceType"] = "A2A" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AContainerMappingInput. +func (a *A2AContainerMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentAutoUpdateStatus": + err = unpopulate(val, "AgentAutoUpdateStatus", &a.AgentAutoUpdateStatus) + delete(rawMsg, key) + case "automationAccountArmId": + err = unpopulate(val, "AutomationAccountArmID", &a.AutomationAccountArmID) + delete(rawMsg, key) + case "automationAccountAuthenticationType": + err = unpopulate(val, "AutomationAccountAuthenticationType", &a.AutomationAccountAuthenticationType) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ACreateProtectionIntentInput. +func (a A2ACreateProtectionIntentInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentAutoUpdateStatus", a.AgentAutoUpdateStatus) + populate(objectMap, "autoProtectionOfDataDisk", a.AutoProtectionOfDataDisk) + populate(objectMap, "automationAccountArmId", a.AutomationAccountArmID) + populate(objectMap, "automationAccountAuthenticationType", a.AutomationAccountAuthenticationType) + populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) + populate(objectMap, "fabricObjectId", a.FabricObjectID) + objectMap["instanceType"] = "A2A" + populate(objectMap, "multiVmGroupId", a.MultiVMGroupID) + populate(objectMap, "multiVmGroupName", a.MultiVMGroupName) + populate(objectMap, "primaryLocation", a.PrimaryLocation) + populate(objectMap, "primaryStagingStorageAccountCustomInput", a.PrimaryStagingStorageAccountCustomInput) + populate(objectMap, "protectionProfileCustomInput", a.ProtectionProfileCustomInput) + populate(objectMap, "recoveryAvailabilitySetCustomInput", a.RecoveryAvailabilitySetCustomInput) + populate(objectMap, "recoveryAvailabilityType", a.RecoveryAvailabilityType) + populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) + populate(objectMap, "recoveryBootDiagStorageAccount", a.RecoveryBootDiagStorageAccount) + populate(objectMap, "recoveryLocation", a.RecoveryLocation) + populate(objectMap, "recoveryProximityPlacementGroupCustomInput", a.RecoveryProximityPlacementGroupCustomInput) + populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) + populate(objectMap, "recoverySubscriptionId", a.RecoverySubscriptionID) + populate(objectMap, "recoveryVirtualNetworkCustomInput", a.RecoveryVirtualNetworkCustomInput) + populate(objectMap, "vmDisks", a.VMDisks) + populate(objectMap, "vmManagedDisks", a.VMManagedDisks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACreateProtectionIntentInput. +func (a *A2ACreateProtectionIntentInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentAutoUpdateStatus": + err = unpopulate(val, "AgentAutoUpdateStatus", &a.AgentAutoUpdateStatus) + delete(rawMsg, key) + case "autoProtectionOfDataDisk": + err = unpopulate(val, "AutoProtectionOfDataDisk", &a.AutoProtectionOfDataDisk) + delete(rawMsg, key) + case "automationAccountArmId": + err = unpopulate(val, "AutomationAccountArmID", &a.AutomationAccountArmID) + delete(rawMsg, key) + case "automationAccountAuthenticationType": + err = unpopulate(val, "AutomationAccountAuthenticationType", &a.AutomationAccountAuthenticationType) + delete(rawMsg, key) + case "diskEncryptionInfo": + err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "multiVmGroupId": + err = unpopulate(val, "MultiVMGroupID", &a.MultiVMGroupID) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &a.MultiVMGroupName) + delete(rawMsg, key) + case "primaryLocation": + err = unpopulate(val, "PrimaryLocation", &a.PrimaryLocation) + delete(rawMsg, key) + case "primaryStagingStorageAccountCustomInput": + a.PrimaryStagingStorageAccountCustomInput, err = unmarshalStorageAccountCustomDetailsClassification(val) + delete(rawMsg, key) + case "protectionProfileCustomInput": + a.ProtectionProfileCustomInput, err = unmarshalProtectionProfileCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryAvailabilitySetCustomInput": + a.RecoveryAvailabilitySetCustomInput, err = unmarshalRecoveryAvailabilitySetCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryAvailabilityType": + err = unpopulate(val, "RecoveryAvailabilityType", &a.RecoveryAvailabilityType) + delete(rawMsg, key) + case "recoveryAvailabilityZone": + err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) + delete(rawMsg, key) + case "recoveryBootDiagStorageAccount": + a.RecoveryBootDiagStorageAccount, err = unmarshalStorageAccountCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryLocation": + err = unpopulate(val, "RecoveryLocation", &a.RecoveryLocation) + delete(rawMsg, key) + case "recoveryProximityPlacementGroupCustomInput": + a.RecoveryProximityPlacementGroupCustomInput, err = unmarshalRecoveryProximityPlacementGroupCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryResourceGroupId": + err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) + delete(rawMsg, key) + case "recoverySubscriptionId": + err = unpopulate(val, "RecoverySubscriptionID", &a.RecoverySubscriptionID) + delete(rawMsg, key) + case "recoveryVirtualNetworkCustomInput": + a.RecoveryVirtualNetworkCustomInput, err = unmarshalRecoveryVirtualNetworkCustomDetailsClassification(val) + delete(rawMsg, key) + case "vmDisks": + err = unpopulate(val, "VMDisks", &a.VMDisks) + delete(rawMsg, key) + case "vmManagedDisks": + err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ACrossClusterMigrationApplyRecoveryPointInput. +func (a A2ACrossClusterMigrationApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2ACrossClusterMigration" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACrossClusterMigrationApplyRecoveryPointInput. +func (a *A2ACrossClusterMigrationApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ACrossClusterMigrationContainerCreationInput. +func (a A2ACrossClusterMigrationContainerCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2ACrossClusterMigration" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACrossClusterMigrationContainerCreationInput. +func (a *A2ACrossClusterMigrationContainerCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ACrossClusterMigrationEnableProtectionInput. +func (a A2ACrossClusterMigrationEnableProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricObjectId", a.FabricObjectID) + objectMap["instanceType"] = "A2ACrossClusterMigration" + populate(objectMap, "recoveryContainerId", a.RecoveryContainerID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACrossClusterMigrationEnableProtectionInput. +func (a *A2ACrossClusterMigrationEnableProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "recoveryContainerId": + err = unpopulate(val, "RecoveryContainerID", &a.RecoveryContainerID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ACrossClusterMigrationPolicyCreationInput. +func (a A2ACrossClusterMigrationPolicyCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2ACrossClusterMigration" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACrossClusterMigrationPolicyCreationInput. +func (a *A2ACrossClusterMigrationPolicyCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ACrossClusterMigrationReplicationDetails. +func (a A2ACrossClusterMigrationReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricObjectId", a.FabricObjectID) + objectMap["instanceType"] = "A2ACrossClusterMigration" + populate(objectMap, "lifecycleId", a.LifecycleID) + populate(objectMap, "osType", a.OSType) + populate(objectMap, "primaryFabricLocation", a.PrimaryFabricLocation) + populate(objectMap, "vmProtectionState", a.VMProtectionState) + populate(objectMap, "vmProtectionStateDescription", a.VMProtectionStateDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ACrossClusterMigrationReplicationDetails. +func (a *A2ACrossClusterMigrationReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "lifecycleId": + err = unpopulate(val, "LifecycleID", &a.LifecycleID) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &a.OSType) + delete(rawMsg, key) + case "primaryFabricLocation": + err = unpopulate(val, "PrimaryFabricLocation", &a.PrimaryFabricLocation) + delete(rawMsg, key) + case "vmProtectionState": + err = unpopulate(val, "VMProtectionState", &a.VMProtectionState) + delete(rawMsg, key) + case "vmProtectionStateDescription": + err = unpopulate(val, "VMProtectionStateDescription", &a.VMProtectionStateDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AEnableProtectionInput. +func (a A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoProtectionOfDataDisk", a.AutoProtectionOfDataDisk) + populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) + populate(objectMap, "fabricObjectId", a.FabricObjectID) + objectMap["instanceType"] = "A2A" + populate(objectMap, "multiVmGroupId", a.MultiVMGroupID) + populate(objectMap, "multiVmGroupName", a.MultiVMGroupName) + populate(objectMap, "protectionClusterId", a.ProtectionClusterID) + populate(objectMap, "recoveryAvailabilitySetId", a.RecoveryAvailabilitySetID) + populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) + populate(objectMap, "recoveryAzureNetworkId", a.RecoveryAzureNetworkID) + populate(objectMap, "recoveryBootDiagStorageAccountId", a.RecoveryBootDiagStorageAccountID) + populate(objectMap, "recoveryCapacityReservationGroupId", a.RecoveryCapacityReservationGroupID) + populate(objectMap, "recoveryCloudServiceId", a.RecoveryCloudServiceID) + populate(objectMap, "recoveryContainerId", a.RecoveryContainerID) + populate(objectMap, "recoveryExtendedLocation", a.RecoveryExtendedLocation) + populate(objectMap, "recoveryProximityPlacementGroupId", a.RecoveryProximityPlacementGroupID) + populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) + populate(objectMap, "recoverySubnetName", a.RecoverySubnetName) + populate(objectMap, "recoveryVirtualMachineScaleSetId", a.RecoveryVirtualMachineScaleSetID) + populate(objectMap, "vmDisks", a.VMDisks) + populate(objectMap, "vmManagedDisks", a.VMManagedDisks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AEnableProtectionInput. +func (a *A2AEnableProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoProtectionOfDataDisk": + err = unpopulate(val, "AutoProtectionOfDataDisk", &a.AutoProtectionOfDataDisk) + delete(rawMsg, key) + case "diskEncryptionInfo": + err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "multiVmGroupId": + err = unpopulate(val, "MultiVMGroupID", &a.MultiVMGroupID) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &a.MultiVMGroupName) + delete(rawMsg, key) + case "protectionClusterId": + err = unpopulate(val, "ProtectionClusterID", &a.ProtectionClusterID) + delete(rawMsg, key) + case "recoveryAvailabilitySetId": + err = unpopulate(val, "RecoveryAvailabilitySetID", &a.RecoveryAvailabilitySetID) + delete(rawMsg, key) + case "recoveryAvailabilityZone": + err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) + delete(rawMsg, key) + case "recoveryAzureNetworkId": + err = unpopulate(val, "RecoveryAzureNetworkID", &a.RecoveryAzureNetworkID) + delete(rawMsg, key) + case "recoveryBootDiagStorageAccountId": + err = unpopulate(val, "RecoveryBootDiagStorageAccountID", &a.RecoveryBootDiagStorageAccountID) + delete(rawMsg, key) + case "recoveryCapacityReservationGroupId": + err = unpopulate(val, "RecoveryCapacityReservationGroupID", &a.RecoveryCapacityReservationGroupID) + delete(rawMsg, key) + case "recoveryCloudServiceId": + err = unpopulate(val, "RecoveryCloudServiceID", &a.RecoveryCloudServiceID) + delete(rawMsg, key) + case "recoveryContainerId": + err = unpopulate(val, "RecoveryContainerID", &a.RecoveryContainerID) + delete(rawMsg, key) + case "recoveryExtendedLocation": + err = unpopulate(val, "RecoveryExtendedLocation", &a.RecoveryExtendedLocation) + delete(rawMsg, key) + case "recoveryProximityPlacementGroupId": + err = unpopulate(val, "RecoveryProximityPlacementGroupID", &a.RecoveryProximityPlacementGroupID) + delete(rawMsg, key) + case "recoveryResourceGroupId": + err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) + delete(rawMsg, key) + case "recoverySubnetName": + err = unpopulate(val, "RecoverySubnetName", &a.RecoverySubnetName) + delete(rawMsg, key) + case "recoveryVirtualMachineScaleSetId": + err = unpopulate(val, "RecoveryVirtualMachineScaleSetID", &a.RecoveryVirtualMachineScaleSetID) + delete(rawMsg, key) + case "vmDisks": + err = unpopulate(val, "VMDisks", &a.VMDisks) + delete(rawMsg, key) + case "vmManagedDisks": + err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AEventDetails. +func (a A2AEventDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricLocation", a.FabricLocation) + populate(objectMap, "fabricName", a.FabricName) + populate(objectMap, "fabricObjectId", a.FabricObjectID) + objectMap["instanceType"] = "A2A" + populate(objectMap, "protectedItemName", a.ProtectedItemName) + populate(objectMap, "remoteFabricLocation", a.RemoteFabricLocation) + populate(objectMap, "remoteFabricName", a.RemoteFabricName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AEventDetails. +func (a *A2AEventDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricLocation": + err = unpopulate(val, "FabricLocation", &a.FabricLocation) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &a.FabricName) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "protectedItemName": + err = unpopulate(val, "ProtectedItemName", &a.ProtectedItemName) + delete(rawMsg, key) + case "remoteFabricLocation": + err = unpopulate(val, "RemoteFabricLocation", &a.RemoteFabricLocation) + delete(rawMsg, key) + case "remoteFabricName": + err = unpopulate(val, "RemoteFabricName", &a.RemoteFabricName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AExtendedLocationDetails. +func (a A2AExtendedLocationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primaryExtendedLocation", a.PrimaryExtendedLocation) + populate(objectMap, "recoveryExtendedLocation", a.RecoveryExtendedLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AExtendedLocationDetails. +func (a *A2AExtendedLocationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primaryExtendedLocation": + err = unpopulate(val, "PrimaryExtendedLocation", &a.PrimaryExtendedLocation) + delete(rawMsg, key) + case "recoveryExtendedLocation": + err = unpopulate(val, "RecoveryExtendedLocation", &a.RecoveryExtendedLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AFabricSpecificLocationDetails. +func (a A2AFabricSpecificLocationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "initialPrimaryExtendedLocation", a.InitialPrimaryExtendedLocation) + populate(objectMap, "initialPrimaryFabricLocation", a.InitialPrimaryFabricLocation) + populate(objectMap, "initialPrimaryZone", a.InitialPrimaryZone) + populate(objectMap, "initialRecoveryExtendedLocation", a.InitialRecoveryExtendedLocation) + populate(objectMap, "initialRecoveryFabricLocation", a.InitialRecoveryFabricLocation) + populate(objectMap, "initialRecoveryZone", a.InitialRecoveryZone) + populate(objectMap, "primaryExtendedLocation", a.PrimaryExtendedLocation) + populate(objectMap, "primaryFabricLocation", a.PrimaryFabricLocation) + populate(objectMap, "primaryZone", a.PrimaryZone) + populate(objectMap, "recoveryExtendedLocation", a.RecoveryExtendedLocation) + populate(objectMap, "recoveryFabricLocation", a.RecoveryFabricLocation) + populate(objectMap, "recoveryZone", a.RecoveryZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AFabricSpecificLocationDetails. +func (a *A2AFabricSpecificLocationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "initialPrimaryExtendedLocation": + err = unpopulate(val, "InitialPrimaryExtendedLocation", &a.InitialPrimaryExtendedLocation) + delete(rawMsg, key) + case "initialPrimaryFabricLocation": + err = unpopulate(val, "InitialPrimaryFabricLocation", &a.InitialPrimaryFabricLocation) + delete(rawMsg, key) + case "initialPrimaryZone": + err = unpopulate(val, "InitialPrimaryZone", &a.InitialPrimaryZone) + delete(rawMsg, key) + case "initialRecoveryExtendedLocation": + err = unpopulate(val, "InitialRecoveryExtendedLocation", &a.InitialRecoveryExtendedLocation) + delete(rawMsg, key) + case "initialRecoveryFabricLocation": + err = unpopulate(val, "InitialRecoveryFabricLocation", &a.InitialRecoveryFabricLocation) + delete(rawMsg, key) + case "initialRecoveryZone": + err = unpopulate(val, "InitialRecoveryZone", &a.InitialRecoveryZone) + delete(rawMsg, key) + case "primaryExtendedLocation": + err = unpopulate(val, "PrimaryExtendedLocation", &a.PrimaryExtendedLocation) + delete(rawMsg, key) + case "primaryFabricLocation": + err = unpopulate(val, "PrimaryFabricLocation", &a.PrimaryFabricLocation) + delete(rawMsg, key) + case "primaryZone": + err = unpopulate(val, "PrimaryZone", &a.PrimaryZone) + delete(rawMsg, key) + case "recoveryExtendedLocation": + err = unpopulate(val, "RecoveryExtendedLocation", &a.RecoveryExtendedLocation) + delete(rawMsg, key) + case "recoveryFabricLocation": + err = unpopulate(val, "RecoveryFabricLocation", &a.RecoveryFabricLocation) + delete(rawMsg, key) + case "recoveryZone": + err = unpopulate(val, "RecoveryZone", &a.RecoveryZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2APolicyCreationInput. +func (a A2APolicyCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", a.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", a.CrashConsistentFrequencyInMinutes) + objectMap["instanceType"] = "A2A" + populate(objectMap, "multiVmSyncStatus", a.MultiVMSyncStatus) + populate(objectMap, "recoveryPointHistory", a.RecoveryPointHistory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2APolicyCreationInput. +func (a *A2APolicyCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &a.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &a.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "multiVmSyncStatus": + err = unpopulate(val, "MultiVMSyncStatus", &a.MultiVMSyncStatus) + delete(rawMsg, key) + case "recoveryPointHistory": + err = unpopulate(val, "RecoveryPointHistory", &a.RecoveryPointHistory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2APolicyDetails. +func (a A2APolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", a.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", a.CrashConsistentFrequencyInMinutes) + objectMap["instanceType"] = "A2A" + populate(objectMap, "multiVmSyncStatus", a.MultiVMSyncStatus) + populate(objectMap, "recoveryPointHistory", a.RecoveryPointHistory) + populate(objectMap, "recoveryPointThresholdInMinutes", a.RecoveryPointThresholdInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2APolicyDetails. +func (a *A2APolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &a.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &a.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "multiVmSyncStatus": + err = unpopulate(val, "MultiVMSyncStatus", &a.MultiVMSyncStatus) + delete(rawMsg, key) + case "recoveryPointHistory": + err = unpopulate(val, "RecoveryPointHistory", &a.RecoveryPointHistory) + delete(rawMsg, key) + case "recoveryPointThresholdInMinutes": + err = unpopulate(val, "RecoveryPointThresholdInMinutes", &a.RecoveryPointThresholdInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AProtectedDiskDetails. +func (a A2AProtectedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedDiskLevelOperation", a.AllowedDiskLevelOperation) + populate(objectMap, "dataPendingAtSourceAgentInMB", a.DataPendingAtSourceAgentInMB) + populate(objectMap, "dataPendingInStagingStorageAccountInMB", a.DataPendingInStagingStorageAccountInMB) + populate(objectMap, "dekKeyVaultArmId", a.DekKeyVaultArmID) + populate(objectMap, "diskCapacityInBytes", a.DiskCapacityInBytes) + populate(objectMap, "diskName", a.DiskName) + populate(objectMap, "diskState", a.DiskState) + populate(objectMap, "diskType", a.DiskType) + populate(objectMap, "diskUri", a.DiskURI) + populate(objectMap, "failoverDiskName", a.FailoverDiskName) + populate(objectMap, "isDiskEncrypted", a.IsDiskEncrypted) + populate(objectMap, "isDiskKeyEncrypted", a.IsDiskKeyEncrypted) + populate(objectMap, "kekKeyVaultArmId", a.KekKeyVaultArmID) + populate(objectMap, "keyIdentifier", a.KeyIdentifier) + populate(objectMap, "monitoringJobType", a.MonitoringJobType) + populate(objectMap, "monitoringPercentageCompletion", a.MonitoringPercentageCompletion) + populate(objectMap, "primaryDiskAzureStorageAccountId", a.PrimaryDiskAzureStorageAccountID) + populate(objectMap, "primaryStagingAzureStorageAccountId", a.PrimaryStagingAzureStorageAccountID) + populate(objectMap, "recoveryAzureStorageAccountId", a.RecoveryAzureStorageAccountID) + populate(objectMap, "recoveryDiskUri", a.RecoveryDiskURI) + populate(objectMap, "resyncRequired", a.ResyncRequired) + populate(objectMap, "secretIdentifier", a.SecretIdentifier) + populate(objectMap, "tfoDiskName", a.TfoDiskName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectedDiskDetails. +func (a *A2AProtectedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedDiskLevelOperation": + err = unpopulate(val, "AllowedDiskLevelOperation", &a.AllowedDiskLevelOperation) + delete(rawMsg, key) + case "dataPendingAtSourceAgentInMB": + err = unpopulate(val, "DataPendingAtSourceAgentInMB", &a.DataPendingAtSourceAgentInMB) + delete(rawMsg, key) + case "dataPendingInStagingStorageAccountInMB": + err = unpopulate(val, "DataPendingInStagingStorageAccountInMB", &a.DataPendingInStagingStorageAccountInMB) + delete(rawMsg, key) + case "dekKeyVaultArmId": + err = unpopulate(val, "DekKeyVaultArmID", &a.DekKeyVaultArmID) + delete(rawMsg, key) + case "diskCapacityInBytes": + err = unpopulate(val, "DiskCapacityInBytes", &a.DiskCapacityInBytes) + delete(rawMsg, key) + case "diskName": + err = unpopulate(val, "DiskName", &a.DiskName) + delete(rawMsg, key) + case "diskState": + err = unpopulate(val, "DiskState", &a.DiskState) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &a.DiskType) + delete(rawMsg, key) + case "diskUri": + err = unpopulate(val, "DiskURI", &a.DiskURI) + delete(rawMsg, key) + case "failoverDiskName": + err = unpopulate(val, "FailoverDiskName", &a.FailoverDiskName) + delete(rawMsg, key) + case "isDiskEncrypted": + err = unpopulate(val, "IsDiskEncrypted", &a.IsDiskEncrypted) + delete(rawMsg, key) + case "isDiskKeyEncrypted": + err = unpopulate(val, "IsDiskKeyEncrypted", &a.IsDiskKeyEncrypted) + delete(rawMsg, key) + case "kekKeyVaultArmId": + err = unpopulate(val, "KekKeyVaultArmID", &a.KekKeyVaultArmID) + delete(rawMsg, key) + case "keyIdentifier": + err = unpopulate(val, "KeyIdentifier", &a.KeyIdentifier) + delete(rawMsg, key) + case "monitoringJobType": + err = unpopulate(val, "MonitoringJobType", &a.MonitoringJobType) + delete(rawMsg, key) + case "monitoringPercentageCompletion": + err = unpopulate(val, "MonitoringPercentageCompletion", &a.MonitoringPercentageCompletion) + delete(rawMsg, key) + case "primaryDiskAzureStorageAccountId": + err = unpopulate(val, "PrimaryDiskAzureStorageAccountID", &a.PrimaryDiskAzureStorageAccountID) + delete(rawMsg, key) + case "primaryStagingAzureStorageAccountId": + err = unpopulate(val, "PrimaryStagingAzureStorageAccountID", &a.PrimaryStagingAzureStorageAccountID) + delete(rawMsg, key) + case "recoveryAzureStorageAccountId": + err = unpopulate(val, "RecoveryAzureStorageAccountID", &a.RecoveryAzureStorageAccountID) + delete(rawMsg, key) + case "recoveryDiskUri": + err = unpopulate(val, "RecoveryDiskURI", &a.RecoveryDiskURI) + delete(rawMsg, key) + case "resyncRequired": + err = unpopulate(val, "ResyncRequired", &a.ResyncRequired) + delete(rawMsg, key) + case "secretIdentifier": + err = unpopulate(val, "SecretIdentifier", &a.SecretIdentifier) + delete(rawMsg, key) + case "tfoDiskName": + err = unpopulate(val, "TfoDiskName", &a.TfoDiskName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AProtectedItemDetail. +func (a A2AProtectedItemDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) + populate(objectMap, "recoveryAvailabilitySetId", a.RecoveryAvailabilitySetID) + populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) + populate(objectMap, "recoveryBootDiagStorageAccountId", a.RecoveryBootDiagStorageAccountID) + populate(objectMap, "recoveryCapacityReservationGroupId", a.RecoveryCapacityReservationGroupID) + populate(objectMap, "recoveryProximityPlacementGroupId", a.RecoveryProximityPlacementGroupID) + populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) + populate(objectMap, "recoveryVirtualMachineScaleSetId", a.RecoveryVirtualMachineScaleSetID) + populate(objectMap, "replicationProtectedItemName", a.ReplicationProtectedItemName) + populate(objectMap, "vmManagedDisks", a.VMManagedDisks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectedItemDetail. +func (a *A2AProtectedItemDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionInfo": + err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) + delete(rawMsg, key) + case "recoveryAvailabilitySetId": + err = unpopulate(val, "RecoveryAvailabilitySetID", &a.RecoveryAvailabilitySetID) + delete(rawMsg, key) + case "recoveryAvailabilityZone": + err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) + delete(rawMsg, key) + case "recoveryBootDiagStorageAccountId": + err = unpopulate(val, "RecoveryBootDiagStorageAccountID", &a.RecoveryBootDiagStorageAccountID) + delete(rawMsg, key) + case "recoveryCapacityReservationGroupId": + err = unpopulate(val, "RecoveryCapacityReservationGroupID", &a.RecoveryCapacityReservationGroupID) + delete(rawMsg, key) + case "recoveryProximityPlacementGroupId": + err = unpopulate(val, "RecoveryProximityPlacementGroupID", &a.RecoveryProximityPlacementGroupID) + delete(rawMsg, key) + case "recoveryResourceGroupId": + err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) + delete(rawMsg, key) + case "recoveryVirtualMachineScaleSetId": + err = unpopulate(val, "RecoveryVirtualMachineScaleSetID", &a.RecoveryVirtualMachineScaleSetID) + delete(rawMsg, key) + case "replicationProtectedItemName": + err = unpopulate(val, "ReplicationProtectedItemName", &a.ReplicationProtectedItemName) + delete(rawMsg, key) + case "vmManagedDisks": + err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AProtectedManagedDiskDetails. +func (a A2AProtectedManagedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedDiskLevelOperation", a.AllowedDiskLevelOperation) + populate(objectMap, "dataPendingAtSourceAgentInMB", a.DataPendingAtSourceAgentInMB) + populate(objectMap, "dataPendingInStagingStorageAccountInMB", a.DataPendingInStagingStorageAccountInMB) + populate(objectMap, "dekKeyVaultArmId", a.DekKeyVaultArmID) + populate(objectMap, "diskCapacityInBytes", a.DiskCapacityInBytes) + populate(objectMap, "diskId", a.DiskID) + populate(objectMap, "diskName", a.DiskName) + populate(objectMap, "diskState", a.DiskState) + populate(objectMap, "diskType", a.DiskType) + populate(objectMap, "failoverDiskName", a.FailoverDiskName) + populate(objectMap, "isDiskEncrypted", a.IsDiskEncrypted) + populate(objectMap, "isDiskKeyEncrypted", a.IsDiskKeyEncrypted) + populate(objectMap, "kekKeyVaultArmId", a.KekKeyVaultArmID) + populate(objectMap, "keyIdentifier", a.KeyIdentifier) + populate(objectMap, "monitoringJobType", a.MonitoringJobType) + populate(objectMap, "monitoringPercentageCompletion", a.MonitoringPercentageCompletion) + populate(objectMap, "primaryDiskEncryptionSetId", a.PrimaryDiskEncryptionSetID) + populate(objectMap, "primaryStagingAzureStorageAccountId", a.PrimaryStagingAzureStorageAccountID) + populate(objectMap, "recoveryDiskEncryptionSetId", a.RecoveryDiskEncryptionSetID) + populate(objectMap, "recoveryOrignalTargetDiskId", a.RecoveryOrignalTargetDiskID) + populate(objectMap, "recoveryReplicaDiskAccountType", a.RecoveryReplicaDiskAccountType) + populate(objectMap, "recoveryReplicaDiskId", a.RecoveryReplicaDiskID) + populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) + populate(objectMap, "recoveryTargetDiskAccountType", a.RecoveryTargetDiskAccountType) + populate(objectMap, "recoveryTargetDiskId", a.RecoveryTargetDiskID) + populate(objectMap, "resyncRequired", a.ResyncRequired) + populate(objectMap, "secretIdentifier", a.SecretIdentifier) + populate(objectMap, "tfoDiskName", a.TfoDiskName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectedManagedDiskDetails. +func (a *A2AProtectedManagedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedDiskLevelOperation": + err = unpopulate(val, "AllowedDiskLevelOperation", &a.AllowedDiskLevelOperation) + delete(rawMsg, key) + case "dataPendingAtSourceAgentInMB": + err = unpopulate(val, "DataPendingAtSourceAgentInMB", &a.DataPendingAtSourceAgentInMB) + delete(rawMsg, key) + case "dataPendingInStagingStorageAccountInMB": + err = unpopulate(val, "DataPendingInStagingStorageAccountInMB", &a.DataPendingInStagingStorageAccountInMB) + delete(rawMsg, key) + case "dekKeyVaultArmId": + err = unpopulate(val, "DekKeyVaultArmID", &a.DekKeyVaultArmID) + delete(rawMsg, key) + case "diskCapacityInBytes": + err = unpopulate(val, "DiskCapacityInBytes", &a.DiskCapacityInBytes) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &a.DiskID) + delete(rawMsg, key) + case "diskName": + err = unpopulate(val, "DiskName", &a.DiskName) + delete(rawMsg, key) + case "diskState": + err = unpopulate(val, "DiskState", &a.DiskState) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &a.DiskType) + delete(rawMsg, key) + case "failoverDiskName": + err = unpopulate(val, "FailoverDiskName", &a.FailoverDiskName) + delete(rawMsg, key) + case "isDiskEncrypted": + err = unpopulate(val, "IsDiskEncrypted", &a.IsDiskEncrypted) + delete(rawMsg, key) + case "isDiskKeyEncrypted": + err = unpopulate(val, "IsDiskKeyEncrypted", &a.IsDiskKeyEncrypted) + delete(rawMsg, key) + case "kekKeyVaultArmId": + err = unpopulate(val, "KekKeyVaultArmID", &a.KekKeyVaultArmID) + delete(rawMsg, key) + case "keyIdentifier": + err = unpopulate(val, "KeyIdentifier", &a.KeyIdentifier) + delete(rawMsg, key) + case "monitoringJobType": + err = unpopulate(val, "MonitoringJobType", &a.MonitoringJobType) + delete(rawMsg, key) + case "monitoringPercentageCompletion": + err = unpopulate(val, "MonitoringPercentageCompletion", &a.MonitoringPercentageCompletion) + delete(rawMsg, key) + case "primaryDiskEncryptionSetId": + err = unpopulate(val, "PrimaryDiskEncryptionSetID", &a.PrimaryDiskEncryptionSetID) + delete(rawMsg, key) + case "primaryStagingAzureStorageAccountId": + err = unpopulate(val, "PrimaryStagingAzureStorageAccountID", &a.PrimaryStagingAzureStorageAccountID) + delete(rawMsg, key) + case "recoveryDiskEncryptionSetId": + err = unpopulate(val, "RecoveryDiskEncryptionSetID", &a.RecoveryDiskEncryptionSetID) + delete(rawMsg, key) + case "recoveryOrignalTargetDiskId": + err = unpopulate(val, "RecoveryOrignalTargetDiskID", &a.RecoveryOrignalTargetDiskID) + delete(rawMsg, key) + case "recoveryReplicaDiskAccountType": + err = unpopulate(val, "RecoveryReplicaDiskAccountType", &a.RecoveryReplicaDiskAccountType) + delete(rawMsg, key) + case "recoveryReplicaDiskId": + err = unpopulate(val, "RecoveryReplicaDiskID", &a.RecoveryReplicaDiskID) + delete(rawMsg, key) + case "recoveryResourceGroupId": + err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) + delete(rawMsg, key) + case "recoveryTargetDiskAccountType": + err = unpopulate(val, "RecoveryTargetDiskAccountType", &a.RecoveryTargetDiskAccountType) + delete(rawMsg, key) + case "recoveryTargetDiskId": + err = unpopulate(val, "RecoveryTargetDiskID", &a.RecoveryTargetDiskID) + delete(rawMsg, key) + case "resyncRequired": + err = unpopulate(val, "ResyncRequired", &a.ResyncRequired) + delete(rawMsg, key) + case "secretIdentifier": + err = unpopulate(val, "SecretIdentifier", &a.SecretIdentifier) + delete(rawMsg, key) + case "tfoDiskName": + err = unpopulate(val, "TfoDiskName", &a.TfoDiskName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AProtectionContainerMappingDetails. +func (a A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentAutoUpdateStatus", a.AgentAutoUpdateStatus) + populate(objectMap, "automationAccountArmId", a.AutomationAccountArmID) + populate(objectMap, "automationAccountAuthenticationType", a.AutomationAccountAuthenticationType) + objectMap["instanceType"] = "A2A" + populate(objectMap, "jobScheduleName", a.JobScheduleName) + populate(objectMap, "scheduleName", a.ScheduleName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectionContainerMappingDetails. +func (a *A2AProtectionContainerMappingDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentAutoUpdateStatus": + err = unpopulate(val, "AgentAutoUpdateStatus", &a.AgentAutoUpdateStatus) + delete(rawMsg, key) + case "automationAccountArmId": + err = unpopulate(val, "AutomationAccountArmID", &a.AutomationAccountArmID) + delete(rawMsg, key) + case "automationAccountAuthenticationType": + err = unpopulate(val, "AutomationAccountAuthenticationType", &a.AutomationAccountAuthenticationType) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "jobScheduleName": + err = unpopulate(val, "JobScheduleName", &a.JobScheduleName) + delete(rawMsg, key) + case "scheduleName": + err = unpopulate(val, "ScheduleName", &a.ScheduleName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AProtectionIntentDiskInputDetails. +func (a A2AProtectionIntentDiskInputDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskUri", a.DiskURI) + populate(objectMap, "primaryStagingStorageAccountCustomInput", a.PrimaryStagingStorageAccountCustomInput) + populate(objectMap, "recoveryAzureStorageAccountCustomInput", a.RecoveryAzureStorageAccountCustomInput) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectionIntentDiskInputDetails. +func (a *A2AProtectionIntentDiskInputDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskUri": + err = unpopulate(val, "DiskURI", &a.DiskURI) + delete(rawMsg, key) + case "primaryStagingStorageAccountCustomInput": + a.PrimaryStagingStorageAccountCustomInput, err = unmarshalStorageAccountCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryAzureStorageAccountCustomInput": + a.RecoveryAzureStorageAccountCustomInput, err = unmarshalStorageAccountCustomDetailsClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AProtectionIntentManagedDiskInputDetails. +func (a A2AProtectionIntentManagedDiskInputDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) + populate(objectMap, "diskId", a.DiskID) + populate(objectMap, "primaryStagingStorageAccountCustomInput", a.PrimaryStagingStorageAccountCustomInput) + populate(objectMap, "recoveryDiskEncryptionSetId", a.RecoveryDiskEncryptionSetID) + populate(objectMap, "recoveryReplicaDiskAccountType", a.RecoveryReplicaDiskAccountType) + populate(objectMap, "recoveryResourceGroupCustomInput", a.RecoveryResourceGroupCustomInput) + populate(objectMap, "recoveryTargetDiskAccountType", a.RecoveryTargetDiskAccountType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AProtectionIntentManagedDiskInputDetails. +func (a *A2AProtectionIntentManagedDiskInputDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionInfo": + err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &a.DiskID) + delete(rawMsg, key) + case "primaryStagingStorageAccountCustomInput": + a.PrimaryStagingStorageAccountCustomInput, err = unmarshalStorageAccountCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryDiskEncryptionSetId": + err = unpopulate(val, "RecoveryDiskEncryptionSetID", &a.RecoveryDiskEncryptionSetID) + delete(rawMsg, key) + case "recoveryReplicaDiskAccountType": + err = unpopulate(val, "RecoveryReplicaDiskAccountType", &a.RecoveryReplicaDiskAccountType) + delete(rawMsg, key) + case "recoveryResourceGroupCustomInput": + a.RecoveryResourceGroupCustomInput, err = unmarshalRecoveryResourceGroupCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryTargetDiskAccountType": + err = unpopulate(val, "RecoveryTargetDiskAccountType", &a.RecoveryTargetDiskAccountType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ARecoveryPointDetails. +func (a A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disks", a.Disks) + objectMap["instanceType"] = "A2A" + populate(objectMap, "recoveryPointSyncType", a.RecoveryPointSyncType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ARecoveryPointDetails. +func (a *A2ARecoveryPointDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disks": + err = unpopulate(val, "Disks", &a.Disks) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "recoveryPointSyncType": + err = unpopulate(val, "RecoveryPointSyncType", &a.RecoveryPointSyncType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ARemoveDisksInput. +func (a A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2A" + populate(objectMap, "vmDisksUris", a.VMDisksUris) + populate(objectMap, "vmManagedDisksIds", a.VMManagedDisksIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ARemoveDisksInput. +func (a *A2ARemoveDisksInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "vmDisksUris": + err = unpopulate(val, "VMDisksUris", &a.VMDisksUris) + delete(rawMsg, key) + case "vmManagedDisksIds": + err = unpopulate(val, "VMManagedDisksIDs", &a.VMManagedDisksIDs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AReplicationDetails. +func (a A2AReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "agentCertificateExpiryDate", a.AgentCertificateExpiryDate) + populateDateTimeRFC3339(objectMap, "agentExpiryDate", a.AgentExpiryDate) + populate(objectMap, "agentVersion", a.AgentVersion) + populate(objectMap, "autoProtectionOfDataDisk", a.AutoProtectionOfDataDisk) + populate(objectMap, "churnOptionSelected", a.ChurnOptionSelected) + populate(objectMap, "fabricObjectId", a.FabricObjectID) + populate(objectMap, "initialPrimaryExtendedLocation", a.InitialPrimaryExtendedLocation) + populate(objectMap, "initialPrimaryFabricLocation", a.InitialPrimaryFabricLocation) + populate(objectMap, "initialPrimaryZone", a.InitialPrimaryZone) + populate(objectMap, "initialRecoveryExtendedLocation", a.InitialRecoveryExtendedLocation) + populate(objectMap, "initialRecoveryFabricLocation", a.InitialRecoveryFabricLocation) + populate(objectMap, "initialRecoveryZone", a.InitialRecoveryZone) + objectMap["instanceType"] = "A2A" + populate(objectMap, "isClusterInfraReady", a.IsClusterInfraReady) + populate(objectMap, "isReplicationAgentCertificateUpdateRequired", a.IsReplicationAgentCertificateUpdateRequired) + populate(objectMap, "isReplicationAgentUpdateRequired", a.IsReplicationAgentUpdateRequired) + populateDateTimeRFC3339(objectMap, "lastHeartbeat", a.LastHeartbeat) + populateDateTimeRFC3339(objectMap, "lastRpoCalculatedTime", a.LastRpoCalculatedTime) + populate(objectMap, "lifecycleId", a.LifecycleID) + populate(objectMap, "managementId", a.ManagementID) + populate(objectMap, "monitoringJobType", a.MonitoringJobType) + populate(objectMap, "monitoringPercentageCompletion", a.MonitoringPercentageCompletion) + populate(objectMap, "multiVmGroupCreateOption", a.MultiVMGroupCreateOption) + populate(objectMap, "multiVmGroupId", a.MultiVMGroupID) + populate(objectMap, "multiVmGroupName", a.MultiVMGroupName) + populate(objectMap, "osType", a.OSType) + populate(objectMap, "primaryAvailabilityZone", a.PrimaryAvailabilityZone) + populate(objectMap, "primaryExtendedLocation", a.PrimaryExtendedLocation) + populate(objectMap, "primaryFabricLocation", a.PrimaryFabricLocation) + populate(objectMap, "protectedDisks", a.ProtectedDisks) + populate(objectMap, "protectedManagedDisks", a.ProtectedManagedDisks) + populate(objectMap, "protectionClusterId", a.ProtectionClusterID) + populate(objectMap, "recoveryAvailabilitySet", a.RecoveryAvailabilitySet) + populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) + populate(objectMap, "recoveryAzureGeneration", a.RecoveryAzureGeneration) + populate(objectMap, "recoveryAzureResourceGroupId", a.RecoveryAzureResourceGroupID) + populate(objectMap, "recoveryAzureVMName", a.RecoveryAzureVMName) + populate(objectMap, "recoveryAzureVMSize", a.RecoveryAzureVMSize) + populate(objectMap, "recoveryBootDiagStorageAccountId", a.RecoveryBootDiagStorageAccountID) + populate(objectMap, "recoveryCapacityReservationGroupId", a.RecoveryCapacityReservationGroupID) + populate(objectMap, "recoveryCloudService", a.RecoveryCloudService) + populate(objectMap, "recoveryExtendedLocation", a.RecoveryExtendedLocation) + populate(objectMap, "recoveryFabricLocation", a.RecoveryFabricLocation) + populate(objectMap, "recoveryFabricObjectId", a.RecoveryFabricObjectID) + populate(objectMap, "recoveryProximityPlacementGroupId", a.RecoveryProximityPlacementGroupID) + populate(objectMap, "recoveryVirtualMachineScaleSetId", a.RecoveryVirtualMachineScaleSetID) + populate(objectMap, "rpoInSeconds", a.RpoInSeconds) + populate(objectMap, "selectedRecoveryAzureNetworkId", a.SelectedRecoveryAzureNetworkID) + populate(objectMap, "selectedTfoAzureNetworkId", a.SelectedTfoAzureNetworkID) + populate(objectMap, "testFailoverRecoveryFabricObjectId", a.TestFailoverRecoveryFabricObjectID) + populate(objectMap, "tfoAzureVMName", a.TfoAzureVMName) + populate(objectMap, "unprotectedDisks", a.UnprotectedDisks) + populate(objectMap, "vmEncryptionType", a.VMEncryptionType) + populate(objectMap, "vmNics", a.VMNics) + populate(objectMap, "vmProtectionState", a.VMProtectionState) + populate(objectMap, "vmProtectionStateDescription", a.VMProtectionStateDescription) + populate(objectMap, "vmSyncedConfigDetails", a.VMSyncedConfigDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AReplicationDetails. +func (a *A2AReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentCertificateExpiryDate": + err = unpopulateDateTimeRFC3339(val, "AgentCertificateExpiryDate", &a.AgentCertificateExpiryDate) + delete(rawMsg, key) + case "agentExpiryDate": + err = unpopulateDateTimeRFC3339(val, "AgentExpiryDate", &a.AgentExpiryDate) + delete(rawMsg, key) + case "agentVersion": + err = unpopulate(val, "AgentVersion", &a.AgentVersion) + delete(rawMsg, key) + case "autoProtectionOfDataDisk": + err = unpopulate(val, "AutoProtectionOfDataDisk", &a.AutoProtectionOfDataDisk) + delete(rawMsg, key) + case "churnOptionSelected": + err = unpopulate(val, "ChurnOptionSelected", &a.ChurnOptionSelected) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) + delete(rawMsg, key) + case "initialPrimaryExtendedLocation": + err = unpopulate(val, "InitialPrimaryExtendedLocation", &a.InitialPrimaryExtendedLocation) + delete(rawMsg, key) + case "initialPrimaryFabricLocation": + err = unpopulate(val, "InitialPrimaryFabricLocation", &a.InitialPrimaryFabricLocation) + delete(rawMsg, key) + case "initialPrimaryZone": + err = unpopulate(val, "InitialPrimaryZone", &a.InitialPrimaryZone) + delete(rawMsg, key) + case "initialRecoveryExtendedLocation": + err = unpopulate(val, "InitialRecoveryExtendedLocation", &a.InitialRecoveryExtendedLocation) + delete(rawMsg, key) + case "initialRecoveryFabricLocation": + err = unpopulate(val, "InitialRecoveryFabricLocation", &a.InitialRecoveryFabricLocation) + delete(rawMsg, key) + case "initialRecoveryZone": + err = unpopulate(val, "InitialRecoveryZone", &a.InitialRecoveryZone) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "isClusterInfraReady": + err = unpopulate(val, "IsClusterInfraReady", &a.IsClusterInfraReady) + delete(rawMsg, key) + case "isReplicationAgentCertificateUpdateRequired": + err = unpopulate(val, "IsReplicationAgentCertificateUpdateRequired", &a.IsReplicationAgentCertificateUpdateRequired) + delete(rawMsg, key) + case "isReplicationAgentUpdateRequired": + err = unpopulate(val, "IsReplicationAgentUpdateRequired", &a.IsReplicationAgentUpdateRequired) + delete(rawMsg, key) + case "lastHeartbeat": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeat", &a.LastHeartbeat) + delete(rawMsg, key) + case "lastRpoCalculatedTime": + err = unpopulateDateTimeRFC3339(val, "LastRpoCalculatedTime", &a.LastRpoCalculatedTime) + delete(rawMsg, key) + case "lifecycleId": + err = unpopulate(val, "LifecycleID", &a.LifecycleID) + delete(rawMsg, key) + case "managementId": + err = unpopulate(val, "ManagementID", &a.ManagementID) + delete(rawMsg, key) + case "monitoringJobType": + err = unpopulate(val, "MonitoringJobType", &a.MonitoringJobType) + delete(rawMsg, key) + case "monitoringPercentageCompletion": + err = unpopulate(val, "MonitoringPercentageCompletion", &a.MonitoringPercentageCompletion) + delete(rawMsg, key) + case "multiVmGroupCreateOption": + err = unpopulate(val, "MultiVMGroupCreateOption", &a.MultiVMGroupCreateOption) + delete(rawMsg, key) + case "multiVmGroupId": + err = unpopulate(val, "MultiVMGroupID", &a.MultiVMGroupID) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &a.MultiVMGroupName) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &a.OSType) + delete(rawMsg, key) + case "primaryAvailabilityZone": + err = unpopulate(val, "PrimaryAvailabilityZone", &a.PrimaryAvailabilityZone) + delete(rawMsg, key) + case "primaryExtendedLocation": + err = unpopulate(val, "PrimaryExtendedLocation", &a.PrimaryExtendedLocation) + delete(rawMsg, key) + case "primaryFabricLocation": + err = unpopulate(val, "PrimaryFabricLocation", &a.PrimaryFabricLocation) + delete(rawMsg, key) + case "protectedDisks": + err = unpopulate(val, "ProtectedDisks", &a.ProtectedDisks) + delete(rawMsg, key) + case "protectedManagedDisks": + err = unpopulate(val, "ProtectedManagedDisks", &a.ProtectedManagedDisks) + delete(rawMsg, key) + case "protectionClusterId": + err = unpopulate(val, "ProtectionClusterID", &a.ProtectionClusterID) + delete(rawMsg, key) + case "recoveryAvailabilitySet": + err = unpopulate(val, "RecoveryAvailabilitySet", &a.RecoveryAvailabilitySet) + delete(rawMsg, key) + case "recoveryAvailabilityZone": + err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) + delete(rawMsg, key) + case "recoveryAzureGeneration": + err = unpopulate(val, "RecoveryAzureGeneration", &a.RecoveryAzureGeneration) + delete(rawMsg, key) + case "recoveryAzureResourceGroupId": + err = unpopulate(val, "RecoveryAzureResourceGroupID", &a.RecoveryAzureResourceGroupID) + delete(rawMsg, key) + case "recoveryAzureVMName": + err = unpopulate(val, "RecoveryAzureVMName", &a.RecoveryAzureVMName) + delete(rawMsg, key) + case "recoveryAzureVMSize": + err = unpopulate(val, "RecoveryAzureVMSize", &a.RecoveryAzureVMSize) + delete(rawMsg, key) + case "recoveryBootDiagStorageAccountId": + err = unpopulate(val, "RecoveryBootDiagStorageAccountID", &a.RecoveryBootDiagStorageAccountID) + delete(rawMsg, key) + case "recoveryCapacityReservationGroupId": + err = unpopulate(val, "RecoveryCapacityReservationGroupID", &a.RecoveryCapacityReservationGroupID) + delete(rawMsg, key) + case "recoveryCloudService": + err = unpopulate(val, "RecoveryCloudService", &a.RecoveryCloudService) + delete(rawMsg, key) + case "recoveryExtendedLocation": + err = unpopulate(val, "RecoveryExtendedLocation", &a.RecoveryExtendedLocation) + delete(rawMsg, key) + case "recoveryFabricLocation": + err = unpopulate(val, "RecoveryFabricLocation", &a.RecoveryFabricLocation) + delete(rawMsg, key) + case "recoveryFabricObjectId": + err = unpopulate(val, "RecoveryFabricObjectID", &a.RecoveryFabricObjectID) + delete(rawMsg, key) + case "recoveryProximityPlacementGroupId": + err = unpopulate(val, "RecoveryProximityPlacementGroupID", &a.RecoveryProximityPlacementGroupID) + delete(rawMsg, key) + case "recoveryVirtualMachineScaleSetId": + err = unpopulate(val, "RecoveryVirtualMachineScaleSetID", &a.RecoveryVirtualMachineScaleSetID) + delete(rawMsg, key) + case "rpoInSeconds": + err = unpopulate(val, "RpoInSeconds", &a.RpoInSeconds) + delete(rawMsg, key) + case "selectedRecoveryAzureNetworkId": + err = unpopulate(val, "SelectedRecoveryAzureNetworkID", &a.SelectedRecoveryAzureNetworkID) + delete(rawMsg, key) + case "selectedTfoAzureNetworkId": + err = unpopulate(val, "SelectedTfoAzureNetworkID", &a.SelectedTfoAzureNetworkID) + delete(rawMsg, key) + case "testFailoverRecoveryFabricObjectId": + err = unpopulate(val, "TestFailoverRecoveryFabricObjectID", &a.TestFailoverRecoveryFabricObjectID) + delete(rawMsg, key) + case "tfoAzureVMName": + err = unpopulate(val, "TfoAzureVMName", &a.TfoAzureVMName) + delete(rawMsg, key) + case "unprotectedDisks": + err = unpopulate(val, "UnprotectedDisks", &a.UnprotectedDisks) + delete(rawMsg, key) + case "vmEncryptionType": + err = unpopulate(val, "VMEncryptionType", &a.VMEncryptionType) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &a.VMNics) + delete(rawMsg, key) + case "vmProtectionState": + err = unpopulate(val, "VMProtectionState", &a.VMProtectionState) + delete(rawMsg, key) + case "vmProtectionStateDescription": + err = unpopulate(val, "VMProtectionStateDescription", &a.VMProtectionStateDescription) + delete(rawMsg, key) + case "vmSyncedConfigDetails": + err = unpopulate(val, "VMSyncedConfigDetails", &a.VMSyncedConfigDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AReplicationIntentDetails. +func (a A2AReplicationIntentDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentAutoUpdateStatus", a.AgentAutoUpdateStatus) + populate(objectMap, "autoProtectionOfDataDisk", a.AutoProtectionOfDataDisk) + populate(objectMap, "automationAccountArmId", a.AutomationAccountArmID) + populate(objectMap, "automationAccountAuthenticationType", a.AutomationAccountAuthenticationType) + populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) + populate(objectMap, "fabricObjectId", a.FabricObjectID) + objectMap["instanceType"] = "A2A" + populate(objectMap, "multiVmGroupId", a.MultiVMGroupID) + populate(objectMap, "multiVmGroupName", a.MultiVMGroupName) + populate(objectMap, "primaryLocation", a.PrimaryLocation) + populate(objectMap, "primaryStagingStorageAccount", a.PrimaryStagingStorageAccount) + populate(objectMap, "protectionProfile", a.ProtectionProfile) + populate(objectMap, "recoveryAvailabilitySet", a.RecoveryAvailabilitySet) + populate(objectMap, "recoveryAvailabilityType", a.RecoveryAvailabilityType) + populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) + populate(objectMap, "recoveryBootDiagStorageAccount", a.RecoveryBootDiagStorageAccount) + populate(objectMap, "recoveryLocation", a.RecoveryLocation) + populate(objectMap, "recoveryProximityPlacementGroup", a.RecoveryProximityPlacementGroup) + populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) + populate(objectMap, "recoverySubscriptionId", a.RecoverySubscriptionID) + populate(objectMap, "recoveryVirtualNetwork", a.RecoveryVirtualNetwork) + populate(objectMap, "vmDisks", a.VMDisks) + populate(objectMap, "vmManagedDisks", a.VMManagedDisks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AReplicationIntentDetails. +func (a *A2AReplicationIntentDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentAutoUpdateStatus": + err = unpopulate(val, "AgentAutoUpdateStatus", &a.AgentAutoUpdateStatus) + delete(rawMsg, key) + case "autoProtectionOfDataDisk": + err = unpopulate(val, "AutoProtectionOfDataDisk", &a.AutoProtectionOfDataDisk) + delete(rawMsg, key) + case "automationAccountArmId": + err = unpopulate(val, "AutomationAccountArmID", &a.AutomationAccountArmID) + delete(rawMsg, key) + case "automationAccountAuthenticationType": + err = unpopulate(val, "AutomationAccountAuthenticationType", &a.AutomationAccountAuthenticationType) + delete(rawMsg, key) + case "diskEncryptionInfo": + err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &a.FabricObjectID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "multiVmGroupId": + err = unpopulate(val, "MultiVMGroupID", &a.MultiVMGroupID) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &a.MultiVMGroupName) + delete(rawMsg, key) + case "primaryLocation": + err = unpopulate(val, "PrimaryLocation", &a.PrimaryLocation) + delete(rawMsg, key) + case "primaryStagingStorageAccount": + a.PrimaryStagingStorageAccount, err = unmarshalStorageAccountCustomDetailsClassification(val) + delete(rawMsg, key) + case "protectionProfile": + a.ProtectionProfile, err = unmarshalProtectionProfileCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryAvailabilitySet": + a.RecoveryAvailabilitySet, err = unmarshalRecoveryAvailabilitySetCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryAvailabilityType": + err = unpopulate(val, "RecoveryAvailabilityType", &a.RecoveryAvailabilityType) + delete(rawMsg, key) + case "recoveryAvailabilityZone": + err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) + delete(rawMsg, key) + case "recoveryBootDiagStorageAccount": + a.RecoveryBootDiagStorageAccount, err = unmarshalStorageAccountCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryLocation": + err = unpopulate(val, "RecoveryLocation", &a.RecoveryLocation) + delete(rawMsg, key) + case "recoveryProximityPlacementGroup": + a.RecoveryProximityPlacementGroup, err = unmarshalRecoveryProximityPlacementGroupCustomDetailsClassification(val) + delete(rawMsg, key) + case "recoveryResourceGroupId": + err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) + delete(rawMsg, key) + case "recoverySubscriptionId": + err = unpopulate(val, "RecoverySubscriptionID", &a.RecoverySubscriptionID) + delete(rawMsg, key) + case "recoveryVirtualNetwork": + a.RecoveryVirtualNetwork, err = unmarshalRecoveryVirtualNetworkCustomDetailsClassification(val) + delete(rawMsg, key) + case "vmDisks": + err = unpopulate(val, "VMDisks", &a.VMDisks) + delete(rawMsg, key) + case "vmManagedDisks": + err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AReplicationProtectionClusterDetails. +func (a A2AReplicationProtectionClusterDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clusterManagementId", a.ClusterManagementID) + populate(objectMap, "failoverRecoveryPointId", a.FailoverRecoveryPointID) + populate(objectMap, "initialPrimaryExtendedLocation", a.InitialPrimaryExtendedLocation) + populate(objectMap, "initialPrimaryFabricLocation", a.InitialPrimaryFabricLocation) + populate(objectMap, "initialPrimaryZone", a.InitialPrimaryZone) + populate(objectMap, "initialRecoveryExtendedLocation", a.InitialRecoveryExtendedLocation) + populate(objectMap, "initialRecoveryFabricLocation", a.InitialRecoveryFabricLocation) + populate(objectMap, "initialRecoveryZone", a.InitialRecoveryZone) + objectMap["instanceType"] = "A2A" + populateDateTimeRFC3339(objectMap, "lastRpoCalculatedTime", a.LastRpoCalculatedTime) + populate(objectMap, "lifecycleId", a.LifecycleID) + populate(objectMap, "multiVmGroupCreateOption", a.MultiVMGroupCreateOption) + populate(objectMap, "multiVmGroupId", a.MultiVMGroupID) + populate(objectMap, "multiVmGroupName", a.MultiVMGroupName) + populate(objectMap, "primaryAvailabilityZone", a.PrimaryAvailabilityZone) + populate(objectMap, "primaryExtendedLocation", a.PrimaryExtendedLocation) + populate(objectMap, "primaryFabricLocation", a.PrimaryFabricLocation) + populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) + populate(objectMap, "recoveryExtendedLocation", a.RecoveryExtendedLocation) + populate(objectMap, "recoveryFabricLocation", a.RecoveryFabricLocation) + populate(objectMap, "rpoInSeconds", a.RpoInSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AReplicationProtectionClusterDetails. +func (a *A2AReplicationProtectionClusterDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clusterManagementId": + err = unpopulate(val, "ClusterManagementID", &a.ClusterManagementID) + delete(rawMsg, key) + case "failoverRecoveryPointId": + err = unpopulate(val, "FailoverRecoveryPointID", &a.FailoverRecoveryPointID) + delete(rawMsg, key) + case "initialPrimaryExtendedLocation": + err = unpopulate(val, "InitialPrimaryExtendedLocation", &a.InitialPrimaryExtendedLocation) + delete(rawMsg, key) + case "initialPrimaryFabricLocation": + err = unpopulate(val, "InitialPrimaryFabricLocation", &a.InitialPrimaryFabricLocation) + delete(rawMsg, key) + case "initialPrimaryZone": + err = unpopulate(val, "InitialPrimaryZone", &a.InitialPrimaryZone) + delete(rawMsg, key) + case "initialRecoveryExtendedLocation": + err = unpopulate(val, "InitialRecoveryExtendedLocation", &a.InitialRecoveryExtendedLocation) + delete(rawMsg, key) + case "initialRecoveryFabricLocation": + err = unpopulate(val, "InitialRecoveryFabricLocation", &a.InitialRecoveryFabricLocation) + delete(rawMsg, key) + case "initialRecoveryZone": + err = unpopulate(val, "InitialRecoveryZone", &a.InitialRecoveryZone) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "lastRpoCalculatedTime": + err = unpopulateDateTimeRFC3339(val, "LastRpoCalculatedTime", &a.LastRpoCalculatedTime) + delete(rawMsg, key) + case "lifecycleId": + err = unpopulate(val, "LifecycleID", &a.LifecycleID) + delete(rawMsg, key) + case "multiVmGroupCreateOption": + err = unpopulate(val, "MultiVMGroupCreateOption", &a.MultiVMGroupCreateOption) + delete(rawMsg, key) + case "multiVmGroupId": + err = unpopulate(val, "MultiVMGroupID", &a.MultiVMGroupID) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &a.MultiVMGroupName) + delete(rawMsg, key) + case "primaryAvailabilityZone": + err = unpopulate(val, "PrimaryAvailabilityZone", &a.PrimaryAvailabilityZone) + delete(rawMsg, key) + case "primaryExtendedLocation": + err = unpopulate(val, "PrimaryExtendedLocation", &a.PrimaryExtendedLocation) + delete(rawMsg, key) + case "primaryFabricLocation": + err = unpopulate(val, "PrimaryFabricLocation", &a.PrimaryFabricLocation) + delete(rawMsg, key) + case "recoveryAvailabilityZone": + err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) + delete(rawMsg, key) + case "recoveryExtendedLocation": + err = unpopulate(val, "RecoveryExtendedLocation", &a.RecoveryExtendedLocation) + delete(rawMsg, key) + case "recoveryFabricLocation": + err = unpopulate(val, "RecoveryFabricLocation", &a.RecoveryFabricLocation) + delete(rawMsg, key) + case "rpoInSeconds": + err = unpopulate(val, "RpoInSeconds", &a.RpoInSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AReprotectInput. +func (a A2AReprotectInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2A" + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "recoveryAvailabilitySetId", a.RecoveryAvailabilitySetID) + populate(objectMap, "recoveryCloudServiceId", a.RecoveryCloudServiceID) + populate(objectMap, "recoveryContainerId", a.RecoveryContainerID) + populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) + populate(objectMap, "vmDisks", a.VMDisks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AReprotectInput. +func (a *A2AReprotectInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "recoveryAvailabilitySetId": + err = unpopulate(val, "RecoveryAvailabilitySetID", &a.RecoveryAvailabilitySetID) + delete(rawMsg, key) + case "recoveryCloudServiceId": + err = unpopulate(val, "RecoveryCloudServiceID", &a.RecoveryCloudServiceID) + delete(rawMsg, key) + case "recoveryContainerId": + err = unpopulate(val, "RecoveryContainerID", &a.RecoveryContainerID) + delete(rawMsg, key) + case "recoveryResourceGroupId": + err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) + delete(rawMsg, key) + case "vmDisks": + err = unpopulate(val, "VMDisks", &a.VMDisks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ASharedDiskIRErrorDetails. +func (a A2ASharedDiskIRErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", a.ErrorCode) + populate(objectMap, "errorCodeEnum", a.ErrorCodeEnum) + populate(objectMap, "errorMessage", a.ErrorMessage) + populate(objectMap, "possibleCauses", a.PossibleCauses) + populate(objectMap, "recommendedAction", a.RecommendedAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ASharedDiskIRErrorDetails. +func (a *A2ASharedDiskIRErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &a.ErrorCode) + delete(rawMsg, key) + case "errorCodeEnum": + err = unpopulate(val, "ErrorCodeEnum", &a.ErrorCodeEnum) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &a.ErrorMessage) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &a.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &a.RecommendedAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ASharedDiskReplicationDetails. +func (a A2ASharedDiskReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverRecoveryPointId", a.FailoverRecoveryPointID) + objectMap["instanceType"] = "A2A" + populateDateTimeRFC3339(objectMap, "lastRpoCalculatedTime", a.LastRpoCalculatedTime) + populate(objectMap, "managementId", a.ManagementID) + populate(objectMap, "monitoringJobType", a.MonitoringJobType) + populate(objectMap, "monitoringPercentageCompletion", a.MonitoringPercentageCompletion) + populate(objectMap, "primaryFabricLocation", a.PrimaryFabricLocation) + populate(objectMap, "protectedManagedDisks", a.ProtectedManagedDisks) + populate(objectMap, "recoveryFabricLocation", a.RecoveryFabricLocation) + populate(objectMap, "rpoInSeconds", a.RpoInSeconds) + populate(objectMap, "sharedDiskIRErrors", a.SharedDiskIRErrors) + populate(objectMap, "unprotectedDisks", a.UnprotectedDisks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ASharedDiskReplicationDetails. +func (a *A2ASharedDiskReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverRecoveryPointId": + err = unpopulate(val, "FailoverRecoveryPointID", &a.FailoverRecoveryPointID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "lastRpoCalculatedTime": + err = unpopulateDateTimeRFC3339(val, "LastRpoCalculatedTime", &a.LastRpoCalculatedTime) + delete(rawMsg, key) + case "managementId": + err = unpopulate(val, "ManagementID", &a.ManagementID) + delete(rawMsg, key) + case "monitoringJobType": + err = unpopulate(val, "MonitoringJobType", &a.MonitoringJobType) + delete(rawMsg, key) + case "monitoringPercentageCompletion": + err = unpopulate(val, "MonitoringPercentageCompletion", &a.MonitoringPercentageCompletion) + delete(rawMsg, key) + case "primaryFabricLocation": + err = unpopulate(val, "PrimaryFabricLocation", &a.PrimaryFabricLocation) + delete(rawMsg, key) + case "protectedManagedDisks": + err = unpopulate(val, "ProtectedManagedDisks", &a.ProtectedManagedDisks) + delete(rawMsg, key) + case "recoveryFabricLocation": + err = unpopulate(val, "RecoveryFabricLocation", &a.RecoveryFabricLocation) + delete(rawMsg, key) + case "rpoInSeconds": + err = unpopulate(val, "RpoInSeconds", &a.RpoInSeconds) + delete(rawMsg, key) + case "sharedDiskIRErrors": + err = unpopulate(val, "SharedDiskIRErrors", &a.SharedDiskIRErrors) + delete(rawMsg, key) + case "unprotectedDisks": + err = unpopulate(val, "UnprotectedDisks", &a.UnprotectedDisks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ASwitchClusterProtectionInput. +func (a A2ASwitchClusterProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2A" + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "protectedItemsDetail", a.ProtectedItemsDetail) + populate(objectMap, "recoveryContainerId", a.RecoveryContainerID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ASwitchClusterProtectionInput. +func (a *A2ASwitchClusterProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "protectedItemsDetail": + err = unpopulate(val, "ProtectedItemsDetail", &a.ProtectedItemsDetail) + delete(rawMsg, key) + case "recoveryContainerId": + err = unpopulate(val, "RecoveryContainerID", &a.RecoveryContainerID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ASwitchProtectionInput. +func (a A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) + objectMap["instanceType"] = "A2A" + populate(objectMap, "policyId", a.PolicyID) + populate(objectMap, "recoveryAvailabilitySetId", a.RecoveryAvailabilitySetID) + populate(objectMap, "recoveryAvailabilityZone", a.RecoveryAvailabilityZone) + populate(objectMap, "recoveryBootDiagStorageAccountId", a.RecoveryBootDiagStorageAccountID) + populate(objectMap, "recoveryCapacityReservationGroupId", a.RecoveryCapacityReservationGroupID) + populate(objectMap, "recoveryCloudServiceId", a.RecoveryCloudServiceID) + populate(objectMap, "recoveryContainerId", a.RecoveryContainerID) + populate(objectMap, "recoveryProximityPlacementGroupId", a.RecoveryProximityPlacementGroupID) + populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) + populate(objectMap, "recoveryVirtualMachineScaleSetId", a.RecoveryVirtualMachineScaleSetID) + populate(objectMap, "vmDisks", a.VMDisks) + populate(objectMap, "vmManagedDisks", a.VMManagedDisks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ASwitchProtectionInput. +func (a *A2ASwitchProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionInfo": + err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &a.PolicyID) + delete(rawMsg, key) + case "recoveryAvailabilitySetId": + err = unpopulate(val, "RecoveryAvailabilitySetID", &a.RecoveryAvailabilitySetID) + delete(rawMsg, key) + case "recoveryAvailabilityZone": + err = unpopulate(val, "RecoveryAvailabilityZone", &a.RecoveryAvailabilityZone) + delete(rawMsg, key) + case "recoveryBootDiagStorageAccountId": + err = unpopulate(val, "RecoveryBootDiagStorageAccountID", &a.RecoveryBootDiagStorageAccountID) + delete(rawMsg, key) + case "recoveryCapacityReservationGroupId": + err = unpopulate(val, "RecoveryCapacityReservationGroupID", &a.RecoveryCapacityReservationGroupID) + delete(rawMsg, key) + case "recoveryCloudServiceId": + err = unpopulate(val, "RecoveryCloudServiceID", &a.RecoveryCloudServiceID) + delete(rawMsg, key) + case "recoveryContainerId": + err = unpopulate(val, "RecoveryContainerID", &a.RecoveryContainerID) + delete(rawMsg, key) + case "recoveryProximityPlacementGroupId": + err = unpopulate(val, "RecoveryProximityPlacementGroupID", &a.RecoveryProximityPlacementGroupID) + delete(rawMsg, key) + case "recoveryResourceGroupId": + err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) + delete(rawMsg, key) + case "recoveryVirtualMachineScaleSetId": + err = unpopulate(val, "RecoveryVirtualMachineScaleSetID", &a.RecoveryVirtualMachineScaleSetID) + delete(rawMsg, key) + case "vmDisks": + err = unpopulate(val, "VMDisks", &a.VMDisks) + delete(rawMsg, key) + case "vmManagedDisks": + err = unpopulate(val, "VMManagedDisks", &a.VMManagedDisks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2ATestFailoverInput. +func (a A2ATestFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cloudServiceCreationOption", a.CloudServiceCreationOption) + objectMap["instanceType"] = "A2A" + populate(objectMap, "recoveryPointId", a.RecoveryPointID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2ATestFailoverInput. +func (a *A2ATestFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cloudServiceCreationOption": + err = unpopulate(val, "CloudServiceCreationOption", &a.CloudServiceCreationOption) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AUnplannedFailoverInput. +func (a A2AUnplannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cloudServiceCreationOption", a.CloudServiceCreationOption) + objectMap["instanceType"] = "A2A" + populate(objectMap, "recoveryPointId", a.RecoveryPointID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AUnplannedFailoverInput. +func (a *A2AUnplannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cloudServiceCreationOption": + err = unpopulate(val, "CloudServiceCreationOption", &a.CloudServiceCreationOption) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AUnprotectedDiskDetails. +func (a A2AUnprotectedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskAutoProtectionStatus", a.DiskAutoProtectionStatus) + populate(objectMap, "diskLunId", a.DiskLunID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AUnprotectedDiskDetails. +func (a *A2AUnprotectedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskAutoProtectionStatus": + err = unpopulate(val, "DiskAutoProtectionStatus", &a.DiskAutoProtectionStatus) + delete(rawMsg, key) + case "diskLunId": + err = unpopulate(val, "DiskLunID", &a.DiskLunID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AUpdateContainerMappingInput. +func (a A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentAutoUpdateStatus", a.AgentAutoUpdateStatus) + populate(objectMap, "automationAccountArmId", a.AutomationAccountArmID) + populate(objectMap, "automationAccountAuthenticationType", a.AutomationAccountAuthenticationType) + objectMap["instanceType"] = "A2A" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AUpdateContainerMappingInput. +func (a *A2AUpdateContainerMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentAutoUpdateStatus": + err = unpopulate(val, "AgentAutoUpdateStatus", &a.AgentAutoUpdateStatus) + delete(rawMsg, key) + case "automationAccountArmId": + err = unpopulate(val, "AutomationAccountArmID", &a.AutomationAccountArmID) + delete(rawMsg, key) + case "automationAccountAuthenticationType": + err = unpopulate(val, "AutomationAccountAuthenticationType", &a.AutomationAccountAuthenticationType) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AUpdateReplicationProtectedItemInput. +func (a A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) + objectMap["instanceType"] = "A2A" + populate(objectMap, "managedDiskUpdateDetails", a.ManagedDiskUpdateDetails) + populate(objectMap, "recoveryBootDiagStorageAccountId", a.RecoveryBootDiagStorageAccountID) + populate(objectMap, "recoveryCapacityReservationGroupId", a.RecoveryCapacityReservationGroupID) + populate(objectMap, "recoveryCloudServiceId", a.RecoveryCloudServiceID) + populate(objectMap, "recoveryProximityPlacementGroupId", a.RecoveryProximityPlacementGroupID) + populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) + populate(objectMap, "recoveryVirtualMachineScaleSetId", a.RecoveryVirtualMachineScaleSetID) + populate(objectMap, "tfoAzureVMName", a.TfoAzureVMName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AUpdateReplicationProtectedItemInput. +func (a *A2AUpdateReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionInfo": + err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "managedDiskUpdateDetails": + err = unpopulate(val, "ManagedDiskUpdateDetails", &a.ManagedDiskUpdateDetails) + delete(rawMsg, key) + case "recoveryBootDiagStorageAccountId": + err = unpopulate(val, "RecoveryBootDiagStorageAccountID", &a.RecoveryBootDiagStorageAccountID) + delete(rawMsg, key) + case "recoveryCapacityReservationGroupId": + err = unpopulate(val, "RecoveryCapacityReservationGroupID", &a.RecoveryCapacityReservationGroupID) + delete(rawMsg, key) + case "recoveryCloudServiceId": + err = unpopulate(val, "RecoveryCloudServiceID", &a.RecoveryCloudServiceID) + delete(rawMsg, key) + case "recoveryProximityPlacementGroupId": + err = unpopulate(val, "RecoveryProximityPlacementGroupID", &a.RecoveryProximityPlacementGroupID) + delete(rawMsg, key) + case "recoveryResourceGroupId": + err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) + delete(rawMsg, key) + case "recoveryVirtualMachineScaleSetId": + err = unpopulate(val, "RecoveryVirtualMachineScaleSetID", &a.RecoveryVirtualMachineScaleSetID) + delete(rawMsg, key) + case "tfoAzureVMName": + err = unpopulate(val, "TfoAzureVMName", &a.TfoAzureVMName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AVMDiskInputDetails. +func (a A2AVMDiskInputDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskUri", a.DiskURI) + populate(objectMap, "primaryStagingAzureStorageAccountId", a.PrimaryStagingAzureStorageAccountID) + populate(objectMap, "recoveryAzureStorageAccountId", a.RecoveryAzureStorageAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AVMDiskInputDetails. +func (a *A2AVMDiskInputDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskUri": + err = unpopulate(val, "DiskURI", &a.DiskURI) + delete(rawMsg, key) + case "primaryStagingAzureStorageAccountId": + err = unpopulate(val, "PrimaryStagingAzureStorageAccountID", &a.PrimaryStagingAzureStorageAccountID) + delete(rawMsg, key) + case "recoveryAzureStorageAccountId": + err = unpopulate(val, "RecoveryAzureStorageAccountID", &a.RecoveryAzureStorageAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AVMManagedDiskInputDetails. +func (a A2AVMManagedDiskInputDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) + populate(objectMap, "diskId", a.DiskID) + populate(objectMap, "primaryStagingAzureStorageAccountId", a.PrimaryStagingAzureStorageAccountID) + populate(objectMap, "recoveryDiskEncryptionSetId", a.RecoveryDiskEncryptionSetID) + populate(objectMap, "recoveryReplicaDiskAccountType", a.RecoveryReplicaDiskAccountType) + populate(objectMap, "recoveryResourceGroupId", a.RecoveryResourceGroupID) + populate(objectMap, "recoveryTargetDiskAccountType", a.RecoveryTargetDiskAccountType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AVMManagedDiskInputDetails. +func (a *A2AVMManagedDiskInputDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionInfo": + err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &a.DiskID) + delete(rawMsg, key) + case "primaryStagingAzureStorageAccountId": + err = unpopulate(val, "PrimaryStagingAzureStorageAccountID", &a.PrimaryStagingAzureStorageAccountID) + delete(rawMsg, key) + case "recoveryDiskEncryptionSetId": + err = unpopulate(val, "RecoveryDiskEncryptionSetID", &a.RecoveryDiskEncryptionSetID) + delete(rawMsg, key) + case "recoveryReplicaDiskAccountType": + err = unpopulate(val, "RecoveryReplicaDiskAccountType", &a.RecoveryReplicaDiskAccountType) + delete(rawMsg, key) + case "recoveryResourceGroupId": + err = unpopulate(val, "RecoveryResourceGroupID", &a.RecoveryResourceGroupID) + delete(rawMsg, key) + case "recoveryTargetDiskAccountType": + err = unpopulate(val, "RecoveryTargetDiskAccountType", &a.RecoveryTargetDiskAccountType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AVMManagedDiskUpdateDetails. +func (a A2AVMManagedDiskUpdateDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionInfo", a.DiskEncryptionInfo) + populate(objectMap, "diskId", a.DiskID) + populate(objectMap, "failoverDiskName", a.FailoverDiskName) + populate(objectMap, "recoveryReplicaDiskAccountType", a.RecoveryReplicaDiskAccountType) + populate(objectMap, "recoveryTargetDiskAccountType", a.RecoveryTargetDiskAccountType) + populate(objectMap, "tfoDiskName", a.TfoDiskName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AVMManagedDiskUpdateDetails. +func (a *A2AVMManagedDiskUpdateDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionInfo": + err = unpopulate(val, "DiskEncryptionInfo", &a.DiskEncryptionInfo) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &a.DiskID) + delete(rawMsg, key) + case "failoverDiskName": + err = unpopulate(val, "FailoverDiskName", &a.FailoverDiskName) + delete(rawMsg, key) + case "recoveryReplicaDiskAccountType": + err = unpopulate(val, "RecoveryReplicaDiskAccountType", &a.RecoveryReplicaDiskAccountType) + delete(rawMsg, key) + case "recoveryTargetDiskAccountType": + err = unpopulate(val, "RecoveryTargetDiskAccountType", &a.RecoveryTargetDiskAccountType) + delete(rawMsg, key) + case "tfoDiskName": + err = unpopulate(val, "TfoDiskName", &a.TfoDiskName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type A2AZoneDetails. +func (a A2AZoneDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "source", a.Source) + populate(objectMap, "target", a.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type A2AZoneDetails. +func (a *A2AZoneDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "source": + err = unpopulate(val, "Source", &a.Source) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &a.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ASRTask. +func (a ASRTask) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedActions", a.AllowedActions) + populate(objectMap, "customDetails", a.CustomDetails) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "errors", a.Errors) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "groupTaskCustomDetails", a.GroupTaskCustomDetails) + populate(objectMap, "name", a.Name) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) + populate(objectMap, "state", a.State) + populate(objectMap, "stateDescription", a.StateDescription) + populate(objectMap, "taskId", a.TaskID) + populate(objectMap, "taskType", a.TaskType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ASRTask. +func (a *ASRTask) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedActions": + err = unpopulate(val, "AllowedActions", &a.AllowedActions) + delete(rawMsg, key) + case "customDetails": + a.CustomDetails, err = unmarshalTaskTypeDetailsClassification(val) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &a.Errors) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "groupTaskCustomDetails": + a.GroupTaskCustomDetails, err = unmarshalGroupTaskDetailsClassification(val) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + case "stateDescription": + err = unpopulate(val, "StateDescription", &a.StateDescription) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &a.TaskID) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &a.TaskType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddDisksInput. +func (a AddDisksInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddDisksInput. +func (a *AddDisksInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddDisksInputProperties. +func (a AddDisksInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", a.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddDisksInputProperties. +func (a *AddDisksInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + a.ProviderSpecificDetails, err = unmarshalAddDisksProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddDisksProviderSpecificInput. +func (a AddDisksProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = a.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddDisksProviderSpecificInput. +func (a *AddDisksProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddRecoveryServicesProviderInput. +func (a AddRecoveryServicesProviderInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddRecoveryServicesProviderInput. +func (a *AddRecoveryServicesProviderInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddRecoveryServicesProviderInputProperties. +func (a AddRecoveryServicesProviderInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authenticationIdentityInput", a.AuthenticationIdentityInput) + populate(objectMap, "biosId", a.BiosID) + populate(objectMap, "dataPlaneAuthenticationIdentityInput", a.DataPlaneAuthenticationIdentityInput) + populate(objectMap, "machineId", a.MachineID) + populate(objectMap, "machineName", a.MachineName) + populate(objectMap, "resourceAccessIdentityInput", a.ResourceAccessIdentityInput) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddRecoveryServicesProviderInputProperties. +func (a *AddRecoveryServicesProviderInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authenticationIdentityInput": + err = unpopulate(val, "AuthenticationIdentityInput", &a.AuthenticationIdentityInput) + delete(rawMsg, key) + case "biosId": + err = unpopulate(val, "BiosID", &a.BiosID) + delete(rawMsg, key) + case "dataPlaneAuthenticationIdentityInput": + err = unpopulate(val, "DataPlaneAuthenticationIdentityInput", &a.DataPlaneAuthenticationIdentityInput) + delete(rawMsg, key) + case "machineId": + err = unpopulate(val, "MachineID", &a.MachineID) + delete(rawMsg, key) + case "machineName": + err = unpopulate(val, "MachineName", &a.MachineName) + delete(rawMsg, key) + case "resourceAccessIdentityInput": + err = unpopulate(val, "ResourceAccessIdentityInput", &a.ResourceAccessIdentityInput) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddVCenterRequest. +func (a AddVCenterRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddVCenterRequest. +func (a *AddVCenterRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AddVCenterRequestProperties. +func (a AddVCenterRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "friendlyName", a.FriendlyName) + populate(objectMap, "ipAddress", a.IPAddress) + populate(objectMap, "port", a.Port) + populate(objectMap, "processServerId", a.ProcessServerID) + populate(objectMap, "runAsAccountId", a.RunAsAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AddVCenterRequestProperties. +func (a *AddVCenterRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "friendlyName": + err = unpopulate(val, "FriendlyName", &a.FriendlyName) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &a.IPAddress) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &a.Port) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &a.ProcessServerID) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &a.RunAsAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentDetails. +func (a AgentDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentId", a.AgentID) + populate(objectMap, "biosId", a.BiosID) + populate(objectMap, "disks", a.Disks) + populate(objectMap, "fqdn", a.Fqdn) + populate(objectMap, "machineId", a.MachineID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentDetails. +func (a *AgentDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentId": + err = unpopulate(val, "AgentID", &a.AgentID) + delete(rawMsg, key) + case "biosId": + err = unpopulate(val, "BiosID", &a.BiosID) + delete(rawMsg, key) + case "disks": + err = unpopulate(val, "Disks", &a.Disks) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &a.Fqdn) + delete(rawMsg, key) + case "machineId": + err = unpopulate(val, "MachineID", &a.MachineID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentDiskDetails. +func (a AgentDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacityInBytes", a.CapacityInBytes) + populate(objectMap, "diskId", a.DiskID) + populate(objectMap, "diskName", a.DiskName) + populate(objectMap, "isOSDisk", a.IsOSDisk) + populate(objectMap, "lunId", a.LunID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentDiskDetails. +func (a *AgentDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacityInBytes": + err = unpopulate(val, "CapacityInBytes", &a.CapacityInBytes) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &a.DiskID) + delete(rawMsg, key) + case "diskName": + err = unpopulate(val, "DiskName", &a.DiskName) + delete(rawMsg, key) + case "isOSDisk": + err = unpopulate(val, "IsOSDisk", &a.IsOSDisk) + delete(rawMsg, key) + case "lunId": + err = unpopulate(val, "LunID", &a.LunID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Alert. +func (a Alert) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Alert. +func (a *Alert) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AlertCollection. +func (a AlertCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AlertCollection. +func (a *AlertCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AlertProperties. +func (a AlertProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customEmailAddresses", a.CustomEmailAddresses) + populate(objectMap, "locale", a.Locale) + populate(objectMap, "sendToOwners", a.SendToOwners) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AlertProperties. +func (a *AlertProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customEmailAddresses": + err = unpopulate(val, "CustomEmailAddresses", &a.CustomEmailAddresses) + delete(rawMsg, key) + case "locale": + err = unpopulate(val, "Locale", &a.Locale) + delete(rawMsg, key) + case "sendToOwners": + err = unpopulate(val, "SendToOwners", &a.SendToOwners) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplianceCollection. +func (a ApplianceCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceCollection. +func (a *ApplianceCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplianceMonitoringDetails. +func (a ApplianceMonitoringDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpuDetails", a.CPUDetails) + populate(objectMap, "datastoreSnapshot", a.DatastoreSnapshot) + populate(objectMap, "disksReplicationDetails", a.DisksReplicationDetails) + populate(objectMap, "esxiNfcBuffer", a.EsxiNfcBuffer) + populate(objectMap, "networkBandwidth", a.NetworkBandwidth) + populate(objectMap, "ramDetails", a.RAMDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceMonitoringDetails. +func (a *ApplianceMonitoringDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpuDetails": + err = unpopulate(val, "CPUDetails", &a.CPUDetails) + delete(rawMsg, key) + case "datastoreSnapshot": + err = unpopulate(val, "DatastoreSnapshot", &a.DatastoreSnapshot) + delete(rawMsg, key) + case "disksReplicationDetails": + err = unpopulate(val, "DisksReplicationDetails", &a.DisksReplicationDetails) + delete(rawMsg, key) + case "esxiNfcBuffer": + err = unpopulate(val, "EsxiNfcBuffer", &a.EsxiNfcBuffer) + delete(rawMsg, key) + case "networkBandwidth": + err = unpopulate(val, "NetworkBandwidth", &a.NetworkBandwidth) + delete(rawMsg, key) + case "ramDetails": + err = unpopulate(val, "RAMDetails", &a.RAMDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplianceQueryParameter. +func (a ApplianceQueryParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerType", a.ProviderType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceQueryParameter. +func (a *ApplianceQueryParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerType": + err = unpopulate(val, "ProviderType", &a.ProviderType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplianceResourceDetails. +func (a ApplianceResourceDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", a.Capacity) + populate(objectMap, "processUtilization", a.ProcessUtilization) + populate(objectMap, "status", a.Status) + populate(objectMap, "totalUtilization", a.TotalUtilization) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceResourceDetails. +func (a *ApplianceResourceDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &a.Capacity) + delete(rawMsg, key) + case "processUtilization": + err = unpopulate(val, "ProcessUtilization", &a.ProcessUtilization) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "totalUtilization": + err = unpopulate(val, "TotalUtilization", &a.TotalUtilization) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplianceSpecificDetails. +func (a ApplianceSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = a.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplianceSpecificDetails. +func (a *ApplianceSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplyClusterRecoveryPointInput. +func (a ApplyClusterRecoveryPointInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplyClusterRecoveryPointInput. +func (a *ApplyClusterRecoveryPointInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplyClusterRecoveryPointInputProperties. +func (a ApplyClusterRecoveryPointInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clusterRecoveryPointId", a.ClusterRecoveryPointID) + populate(objectMap, "individualNodeRecoveryPoints", a.IndividualNodeRecoveryPoints) + populate(objectMap, "providerSpecificDetails", a.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplyClusterRecoveryPointInputProperties. +func (a *ApplyClusterRecoveryPointInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clusterRecoveryPointId": + err = unpopulate(val, "ClusterRecoveryPointID", &a.ClusterRecoveryPointID) + delete(rawMsg, key) + case "individualNodeRecoveryPoints": + err = unpopulate(val, "IndividualNodeRecoveryPoints", &a.IndividualNodeRecoveryPoints) + delete(rawMsg, key) + case "providerSpecificDetails": + a.ProviderSpecificDetails, err = unmarshalApplyClusterRecoveryPointProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplyClusterRecoveryPointProviderSpecificInput. +func (a ApplyClusterRecoveryPointProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = a.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplyClusterRecoveryPointProviderSpecificInput. +func (a *ApplyClusterRecoveryPointProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplyRecoveryPointInput. +func (a ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplyRecoveryPointInput. +func (a *ApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplyRecoveryPointInputProperties. +func (a ApplyRecoveryPointInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", a.ProviderSpecificDetails) + populate(objectMap, "recoveryPointId", a.RecoveryPointID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplyRecoveryPointInputProperties. +func (a *ApplyRecoveryPointInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + a.ProviderSpecificDetails, err = unmarshalApplyRecoveryPointProviderSpecificInputClassification(val) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &a.RecoveryPointID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplyRecoveryPointProviderSpecificInput. +func (a ApplyRecoveryPointProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = a.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplyRecoveryPointProviderSpecificInput. +func (a *ApplyRecoveryPointProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AsrJobDetails. +func (a AsrJobDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectDetails", a.AffectedObjectDetails) + objectMap["instanceType"] = "AsrJobDetails" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AsrJobDetails. +func (a *AsrJobDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectDetails": + err = unpopulate(val, "AffectedObjectDetails", &a.AffectedObjectDetails) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutomationRunbookTaskDetails. +func (a AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accountName", a.AccountName) + populate(objectMap, "cloudServiceName", a.CloudServiceName) + objectMap["instanceType"] = "AutomationRunbookTaskDetails" + populate(objectMap, "isPrimarySideScript", a.IsPrimarySideScript) + populate(objectMap, "jobId", a.JobID) + populate(objectMap, "jobOutput", a.JobOutput) + populate(objectMap, "name", a.Name) + populate(objectMap, "runbookId", a.RunbookID) + populate(objectMap, "runbookName", a.RunbookName) + populate(objectMap, "subscriptionId", a.SubscriptionID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutomationRunbookTaskDetails. +func (a *AutomationRunbookTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accountName": + err = unpopulate(val, "AccountName", &a.AccountName) + delete(rawMsg, key) + case "cloudServiceName": + err = unpopulate(val, "CloudServiceName", &a.CloudServiceName) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "isPrimarySideScript": + err = unpopulate(val, "IsPrimarySideScript", &a.IsPrimarySideScript) + delete(rawMsg, key) + case "jobId": + err = unpopulate(val, "JobID", &a.JobID) + delete(rawMsg, key) + case "jobOutput": + err = unpopulate(val, "JobOutput", &a.JobOutput) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "runbookId": + err = unpopulate(val, "RunbookID", &a.RunbookID) + delete(rawMsg, key) + case "runbookName": + err = unpopulate(val, "RunbookName", &a.RunbookName) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFabricCreationInput. +func (a AzureFabricCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "Azure" + populate(objectMap, "location", a.Location) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFabricCreationInput. +func (a *AzureFabricCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFabricSpecificDetails. +func (a AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerIds", a.ContainerIDs) + populate(objectMap, "extendedLocations", a.ExtendedLocations) + objectMap["instanceType"] = "Azure" + populate(objectMap, "location", a.Location) + populate(objectMap, "locationDetails", a.LocationDetails) + populate(objectMap, "zones", a.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFabricSpecificDetails. +func (a *AzureFabricSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerIds": + err = unpopulate(val, "ContainerIDs", &a.ContainerIDs) + delete(rawMsg, key) + case "extendedLocations": + err = unpopulate(val, "ExtendedLocations", &a.ExtendedLocations) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "locationDetails": + err = unpopulate(val, "LocationDetails", &a.LocationDetails) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &a.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureToAzureCreateNetworkMappingInput. +func (a AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "AzureToAzure" + populate(objectMap, "primaryNetworkId", a.PrimaryNetworkID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureToAzureCreateNetworkMappingInput. +func (a *AzureToAzureCreateNetworkMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "primaryNetworkId": + err = unpopulate(val, "PrimaryNetworkID", &a.PrimaryNetworkID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureToAzureNetworkMappingSettings. +func (a AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "AzureToAzure" + populate(objectMap, "primaryFabricLocation", a.PrimaryFabricLocation) + populate(objectMap, "recoveryFabricLocation", a.RecoveryFabricLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureToAzureNetworkMappingSettings. +func (a *AzureToAzureNetworkMappingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "primaryFabricLocation": + err = unpopulate(val, "PrimaryFabricLocation", &a.PrimaryFabricLocation) + delete(rawMsg, key) + case "recoveryFabricLocation": + err = unpopulate(val, "RecoveryFabricLocation", &a.RecoveryFabricLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureToAzureUpdateNetworkMappingInput. +func (a AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "AzureToAzure" + populate(objectMap, "primaryNetworkId", a.PrimaryNetworkID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureToAzureUpdateNetworkMappingInput. +func (a *AzureToAzureUpdateNetworkMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &a.InstanceType) + delete(rawMsg, key) + case "primaryNetworkId": + err = unpopulate(val, "PrimaryNetworkID", &a.PrimaryNetworkID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureToAzureVMSyncedConfigDetails. +func (a AzureToAzureVMSyncedConfigDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inputEndpoints", a.InputEndpoints) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureToAzureVMSyncedConfigDetails. +func (a *AzureToAzureVMSyncedConfigDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inputEndpoints": + err = unpopulate(val, "InputEndpoints", &a.InputEndpoints) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureVMDiskDetails. +func (a AzureVMDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customTargetDiskName", a.CustomTargetDiskName) + populate(objectMap, "diskEncryptionSetId", a.DiskEncryptionSetID) + populate(objectMap, "diskId", a.DiskID) + populate(objectMap, "lunId", a.LunID) + populate(objectMap, "maxSizeMB", a.MaxSizeMB) + populate(objectMap, "targetDiskLocation", a.TargetDiskLocation) + populate(objectMap, "targetDiskName", a.TargetDiskName) + populate(objectMap, "vhdId", a.VhdID) + populate(objectMap, "vhdName", a.VhdName) + populate(objectMap, "vhdType", a.VhdType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureVMDiskDetails. +func (a *AzureVMDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customTargetDiskName": + err = unpopulate(val, "CustomTargetDiskName", &a.CustomTargetDiskName) + delete(rawMsg, key) + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &a.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &a.DiskID) + delete(rawMsg, key) + case "lunId": + err = unpopulate(val, "LunID", &a.LunID) + delete(rawMsg, key) + case "maxSizeMB": + err = unpopulate(val, "MaxSizeMB", &a.MaxSizeMB) + delete(rawMsg, key) + case "targetDiskLocation": + err = unpopulate(val, "TargetDiskLocation", &a.TargetDiskLocation) + delete(rawMsg, key) + case "targetDiskName": + err = unpopulate(val, "TargetDiskName", &a.TargetDiskName) + delete(rawMsg, key) + case "vhdId": + err = unpopulate(val, "VhdID", &a.VhdID) + delete(rawMsg, key) + case "vhdName": + err = unpopulate(val, "VhdName", &a.VhdName) + delete(rawMsg, key) + case "vhdType": + err = unpopulate(val, "VhdType", &a.VhdType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterFailoverJobDetails. +func (c ClusterFailoverJobDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectDetails", c.AffectedObjectDetails) + objectMap["instanceType"] = "ClusterFailoverJobDetails" + populate(objectMap, "protectedItemDetails", c.ProtectedItemDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterFailoverJobDetails. +func (c *ClusterFailoverJobDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectDetails": + err = unpopulate(val, "AffectedObjectDetails", &c.AffectedObjectDetails) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &c.InstanceType) + delete(rawMsg, key) + case "protectedItemDetails": + err = unpopulate(val, "ProtectedItemDetails", &c.ProtectedItemDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterProviderSpecificRecoveryPointDetails. +func (c ClusterProviderSpecificRecoveryPointDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = c.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProviderSpecificRecoveryPointDetails. +func (c *ClusterProviderSpecificRecoveryPointDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &c.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterRecoveryPoint. +func (c ClusterRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterRecoveryPoint. +func (c *ClusterRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterRecoveryPointCollection. +func (c ClusterRecoveryPointCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterRecoveryPointCollection. +func (c *ClusterRecoveryPointCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterRecoveryPointProperties. +func (c ClusterRecoveryPointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", c.ProviderSpecificDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTime", c.RecoveryPointTime) + populate(objectMap, "recoveryPointType", c.RecoveryPointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterRecoveryPointProperties. +func (c *ClusterRecoveryPointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + c.ProviderSpecificDetails, err = unmarshalClusterProviderSpecificRecoveryPointDetailsClassification(val) + delete(rawMsg, key) + case "recoveryPointTime": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTime", &c.RecoveryPointTime) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &c.RecoveryPointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterSwitchProtectionJobDetails. +func (c ClusterSwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectDetails", c.AffectedObjectDetails) + objectMap["instanceType"] = "ClusterSwitchProtectionJobDetails" + populate(objectMap, "newReplicationProtectionClusterId", c.NewReplicationProtectionClusterID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterSwitchProtectionJobDetails. +func (c *ClusterSwitchProtectionJobDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectDetails": + err = unpopulate(val, "AffectedObjectDetails", &c.AffectedObjectDetails) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &c.InstanceType) + delete(rawMsg, key) + case "newReplicationProtectionClusterId": + err = unpopulate(val, "NewReplicationProtectionClusterID", &c.NewReplicationProtectionClusterID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterTestFailoverCleanupInput. +func (c ClusterTestFailoverCleanupInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterTestFailoverCleanupInput. +func (c *ClusterTestFailoverCleanupInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterTestFailoverCleanupInputProperties. +func (c ClusterTestFailoverCleanupInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "comments", c.Comments) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterTestFailoverCleanupInputProperties. +func (c *ClusterTestFailoverCleanupInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "comments": + err = unpopulate(val, "Comments", &c.Comments) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterTestFailoverInput. +func (c ClusterTestFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterTestFailoverInput. +func (c *ClusterTestFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterTestFailoverInputProperties. +func (c ClusterTestFailoverInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverDirection", c.FailoverDirection) + populate(objectMap, "networkId", c.NetworkID) + populate(objectMap, "networkType", c.NetworkType) + populate(objectMap, "providerSpecificDetails", c.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterTestFailoverInputProperties. +func (c *ClusterTestFailoverInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverDirection": + err = unpopulate(val, "FailoverDirection", &c.FailoverDirection) + delete(rawMsg, key) + case "networkId": + err = unpopulate(val, "NetworkID", &c.NetworkID) + delete(rawMsg, key) + case "networkType": + err = unpopulate(val, "NetworkType", &c.NetworkType) + delete(rawMsg, key) + case "providerSpecificDetails": + c.ProviderSpecificDetails, err = unmarshalClusterTestFailoverProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterTestFailoverJobDetails. +func (c ClusterTestFailoverJobDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectDetails", c.AffectedObjectDetails) + populate(objectMap, "comments", c.Comments) + objectMap["instanceType"] = "ClusterTestFailoverJobDetails" + populate(objectMap, "networkFriendlyName", c.NetworkFriendlyName) + populate(objectMap, "networkName", c.NetworkName) + populate(objectMap, "networkType", c.NetworkType) + populate(objectMap, "protectedItemDetails", c.ProtectedItemDetails) + populate(objectMap, "testFailoverStatus", c.TestFailoverStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterTestFailoverJobDetails. +func (c *ClusterTestFailoverJobDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectDetails": + err = unpopulate(val, "AffectedObjectDetails", &c.AffectedObjectDetails) + delete(rawMsg, key) + case "comments": + err = unpopulate(val, "Comments", &c.Comments) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &c.InstanceType) + delete(rawMsg, key) + case "networkFriendlyName": + err = unpopulate(val, "NetworkFriendlyName", &c.NetworkFriendlyName) + delete(rawMsg, key) + case "networkName": + err = unpopulate(val, "NetworkName", &c.NetworkName) + delete(rawMsg, key) + case "networkType": + err = unpopulate(val, "NetworkType", &c.NetworkType) + delete(rawMsg, key) + case "protectedItemDetails": + err = unpopulate(val, "ProtectedItemDetails", &c.ProtectedItemDetails) + delete(rawMsg, key) + case "testFailoverStatus": + err = unpopulate(val, "TestFailoverStatus", &c.TestFailoverStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterTestFailoverProviderSpecificInput. +func (c ClusterTestFailoverProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = c.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterTestFailoverProviderSpecificInput. +func (c *ClusterTestFailoverProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &c.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterUnplannedFailoverInput. +func (c ClusterUnplannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUnplannedFailoverInput. +func (c *ClusterUnplannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterUnplannedFailoverInputProperties. +func (c ClusterUnplannedFailoverInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverDirection", c.FailoverDirection) + populate(objectMap, "providerSpecificDetails", c.ProviderSpecificDetails) + populate(objectMap, "sourceSiteOperations", c.SourceSiteOperations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUnplannedFailoverInputProperties. +func (c *ClusterUnplannedFailoverInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverDirection": + err = unpopulate(val, "FailoverDirection", &c.FailoverDirection) + delete(rawMsg, key) + case "providerSpecificDetails": + c.ProviderSpecificDetails, err = unmarshalClusterUnplannedFailoverProviderSpecificInputClassification(val) + delete(rawMsg, key) + case "sourceSiteOperations": + err = unpopulate(val, "SourceSiteOperations", &c.SourceSiteOperations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterUnplannedFailoverProviderSpecificInput. +func (c ClusterUnplannedFailoverProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = c.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUnplannedFailoverProviderSpecificInput. +func (c *ClusterUnplannedFailoverProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &c.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeSizeErrorDetails. +func (c ComputeSizeErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", c.Message) + populate(objectMap, "severity", c.Severity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeSizeErrorDetails. +func (c *ComputeSizeErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &c.Severity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationSettings. +func (c ConfigurationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = c.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationSettings. +func (c *ConfigurationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &c.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigureAlertRequest. +func (c ConfigureAlertRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigureAlertRequest. +func (c *ConfigureAlertRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigureAlertRequestProperties. +func (c ConfigureAlertRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customEmailAddresses", c.CustomEmailAddresses) + populate(objectMap, "locale", c.Locale) + populate(objectMap, "sendToOwners", c.SendToOwners) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConfigureAlertRequestProperties. +func (c *ConfigureAlertRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customEmailAddresses": + err = unpopulate(val, "CustomEmailAddresses", &c.CustomEmailAddresses) + delete(rawMsg, key) + case "locale": + err = unpopulate(val, "Locale", &c.Locale) + delete(rawMsg, key) + case "sendToOwners": + err = unpopulate(val, "SendToOwners", &c.SendToOwners) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConsistencyCheckTaskDetails. +func (c ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "ConsistencyCheckTaskDetails" + populate(objectMap, "vmDetails", c.VMDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConsistencyCheckTaskDetails. +func (c *ConsistencyCheckTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &c.InstanceType) + delete(rawMsg, key) + case "vmDetails": + err = unpopulate(val, "VMDetails", &c.VMDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateNetworkMappingInput. +func (c CreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateNetworkMappingInput. +func (c *CreateNetworkMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateNetworkMappingInputProperties. +func (c CreateNetworkMappingInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricSpecificDetails", c.FabricSpecificDetails) + populate(objectMap, "recoveryFabricName", c.RecoveryFabricName) + populate(objectMap, "recoveryNetworkId", c.RecoveryNetworkID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateNetworkMappingInputProperties. +func (c *CreateNetworkMappingInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricSpecificDetails": + c.FabricSpecificDetails, err = unmarshalFabricSpecificCreateNetworkMappingInputClassification(val) + delete(rawMsg, key) + case "recoveryFabricName": + err = unpopulate(val, "RecoveryFabricName", &c.RecoveryFabricName) + delete(rawMsg, key) + case "recoveryNetworkId": + err = unpopulate(val, "RecoveryNetworkID", &c.RecoveryNetworkID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreatePolicyInput. +func (c CreatePolicyInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreatePolicyInput. +func (c *CreatePolicyInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreatePolicyInputProperties. +func (c CreatePolicyInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificInput", c.ProviderSpecificInput) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreatePolicyInputProperties. +func (c *CreatePolicyInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificInput": + c.ProviderSpecificInput, err = unmarshalPolicyProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateProtectionContainerInput. +func (c CreateProtectionContainerInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionContainerInput. +func (c *CreateProtectionContainerInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateProtectionContainerInputProperties. +func (c CreateProtectionContainerInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificInput", c.ProviderSpecificInput) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionContainerInputProperties. +func (c *CreateProtectionContainerInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificInput": + c.ProviderSpecificInput, err = unmarshalReplicationProviderSpecificContainerCreationInputClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateProtectionContainerMappingInput. +func (c CreateProtectionContainerMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionContainerMappingInput. +func (c *CreateProtectionContainerMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateProtectionContainerMappingInputProperties. +func (c CreateProtectionContainerMappingInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "policyId", c.PolicyID) + populate(objectMap, "providerSpecificInput", c.ProviderSpecificInput) + populate(objectMap, "targetProtectionContainerId", c.TargetProtectionContainerID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionContainerMappingInputProperties. +func (c *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "policyId": + err = unpopulate(val, "PolicyID", &c.PolicyID) + delete(rawMsg, key) + case "providerSpecificInput": + c.ProviderSpecificInput, err = unmarshalReplicationProviderSpecificContainerMappingInputClassification(val) + delete(rawMsg, key) + case "targetProtectionContainerId": + err = unpopulate(val, "TargetProtectionContainerID", &c.TargetProtectionContainerID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateProtectionIntentInput. +func (c CreateProtectionIntentInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionIntentInput. +func (c *CreateProtectionIntentInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateProtectionIntentProperties. +func (c CreateProtectionIntentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", c.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionIntentProperties. +func (c *CreateProtectionIntentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + c.ProviderSpecificDetails, err = unmarshalCreateProtectionIntentProviderSpecificDetailsClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateProtectionIntentProviderSpecificDetails. +func (c CreateProtectionIntentProviderSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = c.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateProtectionIntentProviderSpecificDetails. +func (c *CreateProtectionIntentProviderSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &c.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateRecoveryPlanInput. +func (c CreateRecoveryPlanInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateRecoveryPlanInput. +func (c *CreateRecoveryPlanInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CreateRecoveryPlanInputProperties. +func (c CreateRecoveryPlanInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverDeploymentModel", c.FailoverDeploymentModel) + populate(objectMap, "groups", c.Groups) + populate(objectMap, "primaryFabricId", c.PrimaryFabricID) + populate(objectMap, "providerSpecificInput", c.ProviderSpecificInput) + populate(objectMap, "recoveryFabricId", c.RecoveryFabricID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CreateRecoveryPlanInputProperties. +func (c *CreateRecoveryPlanInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverDeploymentModel": + err = unpopulate(val, "FailoverDeploymentModel", &c.FailoverDeploymentModel) + delete(rawMsg, key) + case "groups": + err = unpopulate(val, "Groups", &c.Groups) + delete(rawMsg, key) + case "primaryFabricId": + err = unpopulate(val, "PrimaryFabricID", &c.PrimaryFabricID) + delete(rawMsg, key) + case "providerSpecificInput": + c.ProviderSpecificInput, err = unmarshalRecoveryPlanProviderSpecificInputClassificationArray(val) + delete(rawMsg, key) + case "recoveryFabricId": + err = unpopulate(val, "RecoveryFabricID", &c.RecoveryFabricID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CriticalJobHistoryDetails. +func (c CriticalJobHistoryDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobId", c.JobID) + populate(objectMap, "jobName", c.JobName) + populate(objectMap, "jobStatus", c.JobStatus) + populateDateTimeRFC3339(objectMap, "startTime", c.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CriticalJobHistoryDetails. +func (c *CriticalJobHistoryDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobId": + err = unpopulate(val, "JobID", &c.JobID) + delete(rawMsg, key) + case "jobName": + err = unpopulate(val, "JobName", &c.JobName) + delete(rawMsg, key) + case "jobStatus": + err = unpopulate(val, "JobStatus", &c.JobStatus) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &c.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CurrentJobDetails. +func (c CurrentJobDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobId", c.JobID) + populate(objectMap, "jobName", c.JobName) + populateDateTimeRFC3339(objectMap, "startTime", c.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CurrentJobDetails. +func (c *CurrentJobDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobId": + err = unpopulate(val, "JobID", &c.JobID) + delete(rawMsg, key) + case "jobName": + err = unpopulate(val, "JobName", &c.JobName) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &c.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CurrentScenarioDetails. +func (c CurrentScenarioDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobId", c.JobID) + populate(objectMap, "scenarioName", c.ScenarioName) + populateDateTimeRFC3339(objectMap, "startTime", c.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CurrentScenarioDetails. +func (c *CurrentScenarioDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobId": + err = unpopulate(val, "JobID", &c.JobID) + delete(rawMsg, key) + case "scenarioName": + err = unpopulate(val, "ScenarioName", &c.ScenarioName) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &c.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataStore. +func (d DataStore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacity", d.Capacity) + populate(objectMap, "freeSpace", d.FreeSpace) + populate(objectMap, "symbolicName", d.SymbolicName) + populate(objectMap, "type", d.Type) + populate(objectMap, "uuid", d.UUID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataStore. +func (d *DataStore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &d.Capacity) + delete(rawMsg, key) + case "freeSpace": + err = unpopulate(val, "FreeSpace", &d.FreeSpace) + delete(rawMsg, key) + case "symbolicName": + err = unpopulate(val, "SymbolicName", &d.SymbolicName) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + case "uuid": + err = unpopulate(val, "UUID", &d.UUID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataStoreUtilizationDetails. +func (d DataStoreUtilizationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataStoreName", d.DataStoreName) + populate(objectMap, "totalSnapshotsCreated", d.TotalSnapshotsCreated) + populate(objectMap, "totalSnapshotsSupported", d.TotalSnapshotsSupported) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataStoreUtilizationDetails. +func (d *DataStoreUtilizationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataStoreName": + err = unpopulate(val, "DataStoreName", &d.DataStoreName) + delete(rawMsg, key) + case "totalSnapshotsCreated": + err = unpopulate(val, "TotalSnapshotsCreated", &d.TotalSnapshotsCreated) + delete(rawMsg, key) + case "totalSnapshotsSupported": + err = unpopulate(val, "TotalSnapshotsSupported", &d.TotalSnapshotsSupported) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DisableProtectionInput. +func (d DisableProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DisableProtectionInput. +func (d *DisableProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DisableProtectionInputProperties. +func (d DisableProtectionInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disableProtectionReason", d.DisableProtectionReason) + populate(objectMap, "replicationProviderInput", d.ReplicationProviderInput) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DisableProtectionInputProperties. +func (d *DisableProtectionInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disableProtectionReason": + err = unpopulate(val, "DisableProtectionReason", &d.DisableProtectionReason) + delete(rawMsg, key) + case "replicationProviderInput": + d.ReplicationProviderInput, err = unmarshalDisableProtectionProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DisableProtectionProviderSpecificInput. +func (d DisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = d.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DisableProtectionProviderSpecificInput. +func (d *DisableProtectionProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &d.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiscoverProtectableItemRequest. +func (d DiscoverProtectableItemRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiscoverProtectableItemRequest. +func (d *DiscoverProtectableItemRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiscoverProtectableItemRequestProperties. +func (d DiscoverProtectableItemRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "friendlyName", d.FriendlyName) + populate(objectMap, "ipAddress", d.IPAddress) + populate(objectMap, "osType", d.OSType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiscoverProtectableItemRequestProperties. +func (d *DiscoverProtectableItemRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "friendlyName": + err = unpopulate(val, "FriendlyName", &d.FriendlyName) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &d.IPAddress) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &d.OSType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiskDetails. +func (d DiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maxSizeMB", d.MaxSizeMB) + populate(objectMap, "vhdId", d.VhdID) + populate(objectMap, "vhdName", d.VhdName) + populate(objectMap, "vhdType", d.VhdType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiskDetails. +func (d *DiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxSizeMB": + err = unpopulate(val, "MaxSizeMB", &d.MaxSizeMB) + delete(rawMsg, key) + case "vhdId": + err = unpopulate(val, "VhdID", &d.VhdID) + delete(rawMsg, key) + case "vhdName": + err = unpopulate(val, "VhdName", &d.VhdName) + delete(rawMsg, key) + case "vhdType": + err = unpopulate(val, "VhdType", &d.VhdType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionInfo. +func (d DiskEncryptionInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionKeyInfo", d.DiskEncryptionKeyInfo) + populate(objectMap, "keyEncryptionKeyInfo", d.KeyEncryptionKeyInfo) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionInfo. +func (d *DiskEncryptionInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionKeyInfo": + err = unpopulate(val, "DiskEncryptionKeyInfo", &d.DiskEncryptionKeyInfo) + delete(rawMsg, key) + case "keyEncryptionKeyInfo": + err = unpopulate(val, "KeyEncryptionKeyInfo", &d.KeyEncryptionKeyInfo) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionKeyInfo. +func (d DiskEncryptionKeyInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyVaultResourceArmId", d.KeyVaultResourceArmID) + populate(objectMap, "secretIdentifier", d.SecretIdentifier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionKeyInfo. +func (d *DiskEncryptionKeyInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyVaultResourceArmId": + err = unpopulate(val, "KeyVaultResourceArmID", &d.KeyVaultResourceArmID) + delete(rawMsg, key) + case "secretIdentifier": + err = unpopulate(val, "SecretIdentifier", &d.SecretIdentifier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiskVolumeDetails. +func (d DiskVolumeDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "label", d.Label) + populate(objectMap, "name", d.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiskVolumeDetails. +func (d *DiskVolumeDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "label": + err = unpopulate(val, "Label", &d.Label) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Display. +func (d Display) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", d.Description) + populate(objectMap, "operation", d.Operation) + populate(objectMap, "provider", d.Provider) + populate(objectMap, "resource", d.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Display. +func (d *Display) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &d.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &d.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &d.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DraDetails. +func (d DraDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "biosId", d.BiosID) + populate(objectMap, "forwardProtectedItemCount", d.ForwardProtectedItemCount) + populate(objectMap, "health", d.Health) + populate(objectMap, "healthErrors", d.HealthErrors) + populate(objectMap, "id", d.ID) + populateDateTimeRFC3339(objectMap, "lastHeartbeatUtc", d.LastHeartbeatUTC) + populate(objectMap, "name", d.Name) + populate(objectMap, "reverseProtectedItemCount", d.ReverseProtectedItemCount) + populate(objectMap, "version", d.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DraDetails. +func (d *DraDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "biosId": + err = unpopulate(val, "BiosID", &d.BiosID) + delete(rawMsg, key) + case "forwardProtectedItemCount": + err = unpopulate(val, "ForwardProtectedItemCount", &d.ForwardProtectedItemCount) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &d.Health) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &d.HealthErrors) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "lastHeartbeatUtc": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeatUTC", &d.LastHeartbeatUTC) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "reverseProtectedItemCount": + err = unpopulate(val, "ReverseProtectedItemCount", &d.ReverseProtectedItemCount) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &d.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnableMigrationInput. +func (e EnableMigrationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", e.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnableMigrationInput. +func (e *EnableMigrationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnableMigrationInputProperties. +func (e EnableMigrationInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "policyId", e.PolicyID) + populate(objectMap, "providerSpecificDetails", e.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnableMigrationInputProperties. +func (e *EnableMigrationInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "policyId": + err = unpopulate(val, "PolicyID", &e.PolicyID) + delete(rawMsg, key) + case "providerSpecificDetails": + e.ProviderSpecificDetails, err = unmarshalEnableMigrationProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnableMigrationProviderSpecificInput. +func (e EnableMigrationProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = e.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnableMigrationProviderSpecificInput. +func (e *EnableMigrationProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &e.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnableProtectionInput. +func (e EnableProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", e.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnableProtectionInput. +func (e *EnableProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnableProtectionInputProperties. +func (e EnableProtectionInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "policyId", e.PolicyID) + populate(objectMap, "protectableItemId", e.ProtectableItemID) + populate(objectMap, "providerSpecificDetails", e.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnableProtectionInputProperties. +func (e *EnableProtectionInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "policyId": + err = unpopulate(val, "PolicyID", &e.PolicyID) + delete(rawMsg, key) + case "protectableItemId": + err = unpopulate(val, "ProtectableItemID", &e.ProtectableItemID) + delete(rawMsg, key) + case "providerSpecificDetails": + e.ProviderSpecificDetails, err = unmarshalEnableProtectionProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnableProtectionProviderSpecificInput. +func (e EnableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = e.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnableProtectionProviderSpecificInput. +func (e *EnableProtectionProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &e.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionDetails. +func (e EncryptionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "kekCertExpiryDate", e.KekCertExpiryDate) + populate(objectMap, "kekCertThumbprint", e.KekCertThumbprint) + populate(objectMap, "kekState", e.KekState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionDetails. +func (e *EncryptionDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "kekCertExpiryDate": + err = unpopulateDateTimeRFC3339(val, "KekCertExpiryDate", &e.KekCertExpiryDate) + delete(rawMsg, key) + case "kekCertThumbprint": + err = unpopulate(val, "KekCertThumbprint", &e.KekCertThumbprint) + delete(rawMsg, key) + case "kekState": + err = unpopulate(val, "KekState", &e.KekState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Event. +func (e Event) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Event. +func (e *Event) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &e.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventCollection. +func (e EventCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventCollection. +func (e *EventCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventProperties. +func (e EventProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectCorrelationId", e.AffectedObjectCorrelationID) + populate(objectMap, "affectedObjectFriendlyName", e.AffectedObjectFriendlyName) + populate(objectMap, "description", e.Description) + populate(objectMap, "eventCode", e.EventCode) + populate(objectMap, "eventSpecificDetails", e.EventSpecificDetails) + populate(objectMap, "eventType", e.EventType) + populate(objectMap, "fabricId", e.FabricID) + populate(objectMap, "healthErrors", e.HealthErrors) + populate(objectMap, "providerSpecificDetails", e.ProviderSpecificDetails) + populate(objectMap, "severity", e.Severity) + populateDateTimeRFC3339(objectMap, "timeOfOccurrence", e.TimeOfOccurrence) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventProperties. +func (e *EventProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectCorrelationId": + err = unpopulate(val, "AffectedObjectCorrelationID", &e.AffectedObjectCorrelationID) + delete(rawMsg, key) + case "affectedObjectFriendlyName": + err = unpopulate(val, "AffectedObjectFriendlyName", &e.AffectedObjectFriendlyName) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "eventCode": + err = unpopulate(val, "EventCode", &e.EventCode) + delete(rawMsg, key) + case "eventSpecificDetails": + e.EventSpecificDetails, err = unmarshalEventSpecificDetailsClassification(val) + delete(rawMsg, key) + case "eventType": + err = unpopulate(val, "EventType", &e.EventType) + delete(rawMsg, key) + case "fabricId": + err = unpopulate(val, "FabricID", &e.FabricID) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &e.HealthErrors) + delete(rawMsg, key) + case "providerSpecificDetails": + e.ProviderSpecificDetails, err = unmarshalEventProviderSpecificDetailsClassification(val) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &e.Severity) + delete(rawMsg, key) + case "timeOfOccurrence": + err = unpopulateDateTimeRFC3339(val, "TimeOfOccurrence", &e.TimeOfOccurrence) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventProviderSpecificDetails. +func (e EventProviderSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = e.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventProviderSpecificDetails. +func (e *EventProviderSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &e.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventQueryParameter. +func (e EventQueryParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectCorrelationId", e.AffectedObjectCorrelationID) + populate(objectMap, "affectedObjectFriendlyName", e.AffectedObjectFriendlyName) + populateDateTimeRFC3339(objectMap, "endTime", e.EndTime) + populate(objectMap, "eventCode", e.EventCode) + populate(objectMap, "eventType", e.EventType) + populate(objectMap, "fabricName", e.FabricName) + populate(objectMap, "severity", e.Severity) + populateDateTimeRFC3339(objectMap, "startTime", e.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventQueryParameter. +func (e *EventQueryParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectCorrelationId": + err = unpopulate(val, "AffectedObjectCorrelationID", &e.AffectedObjectCorrelationID) + delete(rawMsg, key) + case "affectedObjectFriendlyName": + err = unpopulate(val, "AffectedObjectFriendlyName", &e.AffectedObjectFriendlyName) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &e.EndTime) + delete(rawMsg, key) + case "eventCode": + err = unpopulate(val, "EventCode", &e.EventCode) + delete(rawMsg, key) + case "eventType": + err = unpopulate(val, "EventType", &e.EventType) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &e.FabricName) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &e.Severity) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &e.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EventSpecificDetails. +func (e EventSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = e.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EventSpecificDetails. +func (e *EventSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &e.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExistingProtectionProfile. +func (e ExistingProtectionProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "protectionProfileId", e.ProtectionProfileID) + objectMap["resourceType"] = "Existing" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingProtectionProfile. +func (e *ExistingProtectionProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "protectionProfileId": + err = unpopulate(val, "ProtectionProfileID", &e.ProtectionProfileID) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &e.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExistingRecoveryAvailabilitySet. +func (e ExistingRecoveryAvailabilitySet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recoveryAvailabilitySetId", e.RecoveryAvailabilitySetID) + objectMap["resourceType"] = "Existing" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingRecoveryAvailabilitySet. +func (e *ExistingRecoveryAvailabilitySet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recoveryAvailabilitySetId": + err = unpopulate(val, "RecoveryAvailabilitySetID", &e.RecoveryAvailabilitySetID) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &e.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExistingRecoveryProximityPlacementGroup. +func (e ExistingRecoveryProximityPlacementGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recoveryProximityPlacementGroupId", e.RecoveryProximityPlacementGroupID) + objectMap["resourceType"] = "Existing" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingRecoveryProximityPlacementGroup. +func (e *ExistingRecoveryProximityPlacementGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recoveryProximityPlacementGroupId": + err = unpopulate(val, "RecoveryProximityPlacementGroupID", &e.RecoveryProximityPlacementGroupID) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &e.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExistingRecoveryResourceGroup. +func (e ExistingRecoveryResourceGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recoveryResourceGroupId", e.RecoveryResourceGroupID) + objectMap["resourceType"] = "Existing" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingRecoveryResourceGroup. +func (e *ExistingRecoveryResourceGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recoveryResourceGroupId": + err = unpopulate(val, "RecoveryResourceGroupID", &e.RecoveryResourceGroupID) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &e.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExistingRecoveryVirtualNetwork. +func (e ExistingRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recoverySubnetName", e.RecoverySubnetName) + populate(objectMap, "recoveryVirtualNetworkId", e.RecoveryVirtualNetworkID) + objectMap["resourceType"] = "Existing" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingRecoveryVirtualNetwork. +func (e *ExistingRecoveryVirtualNetwork) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recoverySubnetName": + err = unpopulate(val, "RecoverySubnetName", &e.RecoverySubnetName) + delete(rawMsg, key) + case "recoveryVirtualNetworkId": + err = unpopulate(val, "RecoveryVirtualNetworkID", &e.RecoveryVirtualNetworkID) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &e.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExistingStorageAccount. +func (e ExistingStorageAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureStorageAccountId", e.AzureStorageAccountID) + objectMap["resourceType"] = "Existing" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExistingStorageAccount. +func (e *ExistingStorageAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureStorageAccountId": + err = unpopulate(val, "AzureStorageAccountID", &e.AzureStorageAccountID) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &e.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExportJobDetails. +func (e ExportJobDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectDetails", e.AffectedObjectDetails) + populate(objectMap, "blobUri", e.BlobURI) + objectMap["instanceType"] = "ExportJobDetails" + populate(objectMap, "sasToken", e.SasToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExportJobDetails. +func (e *ExportJobDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectDetails": + err = unpopulate(val, "AffectedObjectDetails", &e.AffectedObjectDetails) + delete(rawMsg, key) + case "blobUri": + err = unpopulate(val, "BlobURI", &e.BlobURI) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &e.InstanceType) + delete(rawMsg, key) + case "sasToken": + err = unpopulate(val, "SasToken", &e.SasToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. +func (e ExtendedLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", e.Name) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation. +func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Fabric. +func (f Fabric) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "location", f.Location) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Fabric. +func (f *Fabric) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &f.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FabricCollection. +func (f FabricCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FabricCollection. +func (f *FabricCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FabricCreationInput. +func (f FabricCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", f.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FabricCreationInput. +func (f *FabricCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FabricCreationInputProperties. +func (f FabricCreationInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customDetails", f.CustomDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FabricCreationInputProperties. +func (f *FabricCreationInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customDetails": + f.CustomDetails, err = unmarshalFabricSpecificCreationInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FabricProperties. +func (f FabricProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bcdrState", f.BcdrState) + populate(objectMap, "customDetails", f.CustomDetails) + populate(objectMap, "encryptionDetails", f.EncryptionDetails) + populate(objectMap, "friendlyName", f.FriendlyName) + populate(objectMap, "health", f.Health) + populate(objectMap, "healthErrorDetails", f.HealthErrorDetails) + populate(objectMap, "internalIdentifier", f.InternalIdentifier) + populate(objectMap, "rolloverEncryptionDetails", f.RolloverEncryptionDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FabricProperties. +func (f *FabricProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bcdrState": + err = unpopulate(val, "BcdrState", &f.BcdrState) + delete(rawMsg, key) + case "customDetails": + f.CustomDetails, err = unmarshalFabricSpecificDetailsClassification(val) + delete(rawMsg, key) + case "encryptionDetails": + err = unpopulate(val, "EncryptionDetails", &f.EncryptionDetails) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &f.FriendlyName) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &f.Health) + delete(rawMsg, key) + case "healthErrorDetails": + err = unpopulate(val, "HealthErrorDetails", &f.HealthErrorDetails) + delete(rawMsg, key) + case "internalIdentifier": + err = unpopulate(val, "InternalIdentifier", &f.InternalIdentifier) + delete(rawMsg, key) + case "rolloverEncryptionDetails": + err = unpopulate(val, "RolloverEncryptionDetails", &f.RolloverEncryptionDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FabricQueryParameter. +func (f FabricQueryParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "biosId", f.BiosID) + populate(objectMap, "discoveryType", f.DiscoveryType) + populate(objectMap, "extendedLocationMappings", f.ExtendedLocationMappings) + populate(objectMap, "fetchAgentDetails", f.FetchAgentDetails) + populate(objectMap, "fqdn", f.Fqdn) + populate(objectMap, "locationDetails", f.LocationDetails) + populate(objectMap, "osType", f.OSType) + populate(objectMap, "zoneToZoneMappings", f.ZoneToZoneMappings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FabricQueryParameter. +func (f *FabricQueryParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "biosId": + err = unpopulate(val, "BiosID", &f.BiosID) + delete(rawMsg, key) + case "discoveryType": + err = unpopulate(val, "DiscoveryType", &f.DiscoveryType) + delete(rawMsg, key) + case "extendedLocationMappings": + err = unpopulate(val, "ExtendedLocationMappings", &f.ExtendedLocationMappings) + delete(rawMsg, key) + case "fetchAgentDetails": + err = unpopulate(val, "FetchAgentDetails", &f.FetchAgentDetails) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &f.Fqdn) + delete(rawMsg, key) + case "locationDetails": + err = unpopulate(val, "LocationDetails", &f.LocationDetails) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &f.OSType) + delete(rawMsg, key) + case "zoneToZoneMappings": + err = unpopulate(val, "ZoneToZoneMappings", &f.ZoneToZoneMappings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FabricReplicationGroupTaskDetails. +func (f FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "FabricReplicationGroupTaskDetails" + populate(objectMap, "jobTask", f.JobTask) + populate(objectMap, "skippedReason", f.SkippedReason) + populate(objectMap, "skippedReasonString", f.SkippedReasonString) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FabricReplicationGroupTaskDetails. +func (f *FabricReplicationGroupTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &f.InstanceType) + delete(rawMsg, key) + case "jobTask": + err = unpopulate(val, "JobTask", &f.JobTask) + delete(rawMsg, key) + case "skippedReason": + err = unpopulate(val, "SkippedReason", &f.SkippedReason) + delete(rawMsg, key) + case "skippedReasonString": + err = unpopulate(val, "SkippedReasonString", &f.SkippedReasonString) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FabricSpecificCreateNetworkMappingInput. +func (f FabricSpecificCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = f.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FabricSpecificCreateNetworkMappingInput. +func (f *FabricSpecificCreateNetworkMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &f.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FabricSpecificCreationInput. +func (f FabricSpecificCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = f.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FabricSpecificCreationInput. +func (f *FabricSpecificCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &f.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FabricSpecificDetails. +func (f FabricSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = f.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FabricSpecificDetails. +func (f *FabricSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &f.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FabricSpecificUpdateNetworkMappingInput. +func (f FabricSpecificUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = f.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FabricSpecificUpdateNetworkMappingInput. +func (f *FabricSpecificUpdateNetworkMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &f.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverJobDetails. +func (f FailoverJobDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectDetails", f.AffectedObjectDetails) + objectMap["instanceType"] = "FailoverJobDetails" + populate(objectMap, "protectedItemDetails", f.ProtectedItemDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverJobDetails. +func (f *FailoverJobDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectDetails": + err = unpopulate(val, "AffectedObjectDetails", &f.AffectedObjectDetails) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &f.InstanceType) + delete(rawMsg, key) + case "protectedItemDetails": + err = unpopulate(val, "ProtectedItemDetails", &f.ProtectedItemDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverProcessServerRequest. +func (f FailoverProcessServerRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", f.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverProcessServerRequest. +func (f *FailoverProcessServerRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverProcessServerRequestProperties. +func (f FailoverProcessServerRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerName", f.ContainerName) + populate(objectMap, "sourceProcessServerId", f.SourceProcessServerID) + populate(objectMap, "targetProcessServerId", f.TargetProcessServerID) + populate(objectMap, "updateType", f.UpdateType) + populate(objectMap, "vmsToMigrate", f.VMsToMigrate) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverProcessServerRequestProperties. +func (f *FailoverProcessServerRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &f.ContainerName) + delete(rawMsg, key) + case "sourceProcessServerId": + err = unpopulate(val, "SourceProcessServerID", &f.SourceProcessServerID) + delete(rawMsg, key) + case "targetProcessServerId": + err = unpopulate(val, "TargetProcessServerID", &f.TargetProcessServerID) + delete(rawMsg, key) + case "updateType": + err = unpopulate(val, "UpdateType", &f.UpdateType) + delete(rawMsg, key) + case "vmsToMigrate": + err = unpopulate(val, "VMsToMigrate", &f.VMsToMigrate) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FailoverReplicationProtectedItemDetails. +func (f FailoverReplicationProtectedItemDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "friendlyName", f.FriendlyName) + populate(objectMap, "name", f.Name) + populate(objectMap, "networkConnectionStatus", f.NetworkConnectionStatus) + populate(objectMap, "networkFriendlyName", f.NetworkFriendlyName) + populate(objectMap, "recoveryPointId", f.RecoveryPointID) + populateDateTimeRFC3339(objectMap, "recoveryPointTime", f.RecoveryPointTime) + populate(objectMap, "subnet", f.Subnet) + populate(objectMap, "testVmFriendlyName", f.TestVMFriendlyName) + populate(objectMap, "testVmName", f.TestVMName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FailoverReplicationProtectedItemDetails. +func (f *FailoverReplicationProtectedItemDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "friendlyName": + err = unpopulate(val, "FriendlyName", &f.FriendlyName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "networkConnectionStatus": + err = unpopulate(val, "NetworkConnectionStatus", &f.NetworkConnectionStatus) + delete(rawMsg, key) + case "networkFriendlyName": + err = unpopulate(val, "NetworkFriendlyName", &f.NetworkFriendlyName) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &f.RecoveryPointID) + delete(rawMsg, key) + case "recoveryPointTime": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTime", &f.RecoveryPointTime) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &f.Subnet) + delete(rawMsg, key) + case "testVmFriendlyName": + err = unpopulate(val, "TestVMFriendlyName", &f.TestVMFriendlyName) + delete(rawMsg, key) + case "testVmName": + err = unpopulate(val, "TestVMName", &f.TestVMName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayOperationDetails. +func (g GatewayOperationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataStores", g.DataStores) + populate(objectMap, "hostName", g.HostName) + populate(objectMap, "progressPercentage", g.ProgressPercentage) + populate(objectMap, "state", g.State) + populate(objectMap, "timeElapsed", g.TimeElapsed) + populate(objectMap, "timeRemaining", g.TimeRemaining) + populate(objectMap, "uploadSpeed", g.UploadSpeed) + populate(objectMap, "vmwareReadThroughput", g.VmwareReadThroughput) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GatewayOperationDetails. +func (g *GatewayOperationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataStores": + err = unpopulate(val, "DataStores", &g.DataStores) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &g.HostName) + delete(rawMsg, key) + case "progressPercentage": + err = unpopulate(val, "ProgressPercentage", &g.ProgressPercentage) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &g.State) + delete(rawMsg, key) + case "timeElapsed": + err = unpopulate(val, "TimeElapsed", &g.TimeElapsed) + delete(rawMsg, key) + case "timeRemaining": + err = unpopulate(val, "TimeRemaining", &g.TimeRemaining) + delete(rawMsg, key) + case "uploadSpeed": + err = unpopulate(val, "UploadSpeed", &g.UploadSpeed) + delete(rawMsg, key) + case "vmwareReadThroughput": + err = unpopulate(val, "VmwareReadThroughput", &g.VmwareReadThroughput) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GroupTaskDetails. +func (g GroupTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "childTasks", g.ChildTasks) + objectMap["instanceType"] = g.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GroupTaskDetails. +func (g *GroupTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "childTasks": + err = unpopulate(val, "ChildTasks", &g.ChildTasks) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &g.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HealthError. +func (h HealthError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "creationTimeUtc", h.CreationTimeUTC) + populate(objectMap, "customerResolvability", h.CustomerResolvability) + populate(objectMap, "entityId", h.EntityID) + populate(objectMap, "errorCategory", h.ErrorCategory) + populate(objectMap, "errorCode", h.ErrorCode) + populate(objectMap, "errorId", h.ErrorID) + populate(objectMap, "errorLevel", h.ErrorLevel) + populate(objectMap, "errorMessage", h.ErrorMessage) + populate(objectMap, "errorSource", h.ErrorSource) + populate(objectMap, "errorType", h.ErrorType) + populate(objectMap, "innerHealthErrors", h.InnerHealthErrors) + populate(objectMap, "possibleCauses", h.PossibleCauses) + populate(objectMap, "recommendedAction", h.RecommendedAction) + populate(objectMap, "recoveryProviderErrorMessage", h.RecoveryProviderErrorMessage) + populate(objectMap, "summaryMessage", h.SummaryMessage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HealthError. +func (h *HealthError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationTimeUtc": + err = unpopulateDateTimeRFC3339(val, "CreationTimeUTC", &h.CreationTimeUTC) + delete(rawMsg, key) + case "customerResolvability": + err = unpopulate(val, "CustomerResolvability", &h.CustomerResolvability) + delete(rawMsg, key) + case "entityId": + err = unpopulate(val, "EntityID", &h.EntityID) + delete(rawMsg, key) + case "errorCategory": + err = unpopulate(val, "ErrorCategory", &h.ErrorCategory) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &h.ErrorCode) + delete(rawMsg, key) + case "errorId": + err = unpopulate(val, "ErrorID", &h.ErrorID) + delete(rawMsg, key) + case "errorLevel": + err = unpopulate(val, "ErrorLevel", &h.ErrorLevel) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &h.ErrorMessage) + delete(rawMsg, key) + case "errorSource": + err = unpopulate(val, "ErrorSource", &h.ErrorSource) + delete(rawMsg, key) + case "errorType": + err = unpopulate(val, "ErrorType", &h.ErrorType) + delete(rawMsg, key) + case "innerHealthErrors": + err = unpopulate(val, "InnerHealthErrors", &h.InnerHealthErrors) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &h.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &h.RecommendedAction) + delete(rawMsg, key) + case "recoveryProviderErrorMessage": + err = unpopulate(val, "RecoveryProviderErrorMessage", &h.RecoveryProviderErrorMessage) + delete(rawMsg, key) + case "summaryMessage": + err = unpopulate(val, "SummaryMessage", &h.SummaryMessage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HealthErrorSummary. +func (h HealthErrorSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedResourceCorrelationIds", h.AffectedResourceCorrelationIDs) + populate(objectMap, "affectedResourceSubtype", h.AffectedResourceSubtype) + populate(objectMap, "affectedResourceType", h.AffectedResourceType) + populate(objectMap, "category", h.Category) + populate(objectMap, "severity", h.Severity) + populate(objectMap, "summaryCode", h.SummaryCode) + populate(objectMap, "summaryMessage", h.SummaryMessage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HealthErrorSummary. +func (h *HealthErrorSummary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedResourceCorrelationIds": + err = unpopulate(val, "AffectedResourceCorrelationIDs", &h.AffectedResourceCorrelationIDs) + delete(rawMsg, key) + case "affectedResourceSubtype": + err = unpopulate(val, "AffectedResourceSubtype", &h.AffectedResourceSubtype) + delete(rawMsg, key) + case "affectedResourceType": + err = unpopulate(val, "AffectedResourceType", &h.AffectedResourceType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &h.Category) + delete(rawMsg, key) + case "severity": + err = unpopulate(val, "Severity", &h.Severity) + delete(rawMsg, key) + case "summaryCode": + err = unpopulate(val, "SummaryCode", &h.SummaryCode) + delete(rawMsg, key) + case "summaryMessage": + err = unpopulate(val, "SummaryMessage", &h.SummaryMessage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVHostDetails. +func (h HyperVHostDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", h.ID) + populate(objectMap, "marsAgentVersion", h.MarsAgentVersion) + populate(objectMap, "name", h.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVHostDetails. +func (h *HyperVHostDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &h.ID) + delete(rawMsg, key) + case "marsAgentVersion": + err = unpopulate(val, "MarsAgentVersion", &h.MarsAgentVersion) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &h.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplica2012EventDetails. +func (h HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerName", h.ContainerName) + populate(objectMap, "fabricName", h.FabricName) + objectMap["instanceType"] = "HyperVReplica2012" + populate(objectMap, "remoteContainerName", h.RemoteContainerName) + populate(objectMap, "remoteFabricName", h.RemoteFabricName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplica2012EventDetails. +func (h *HyperVReplica2012EventDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &h.ContainerName) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &h.FabricName) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "remoteContainerName": + err = unpopulate(val, "RemoteContainerName", &h.RemoteContainerName) + delete(rawMsg, key) + case "remoteFabricName": + err = unpopulate(val, "RemoteFabricName", &h.RemoteFabricName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplica2012R2EventDetails. +func (h HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerName", h.ContainerName) + populate(objectMap, "fabricName", h.FabricName) + objectMap["instanceType"] = "HyperVReplica2012R2" + populate(objectMap, "remoteContainerName", h.RemoteContainerName) + populate(objectMap, "remoteFabricName", h.RemoteFabricName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplica2012R2EventDetails. +func (h *HyperVReplica2012R2EventDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &h.ContainerName) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &h.FabricName) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "remoteContainerName": + err = unpopulate(val, "RemoteContainerName", &h.RemoteContainerName) + delete(rawMsg, key) + case "remoteFabricName": + err = unpopulate(val, "RemoteFabricName", &h.RemoteFabricName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureApplyRecoveryPointInput. +func (h HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "primaryKekCertificatePfx", h.PrimaryKekCertificatePfx) + populate(objectMap, "secondaryKekCertificatePfx", h.SecondaryKekCertificatePfx) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureApplyRecoveryPointInput. +func (h *HyperVReplicaAzureApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "primaryKekCertificatePfx": + err = unpopulate(val, "PrimaryKekCertificatePfx", &h.PrimaryKekCertificatePfx) + delete(rawMsg, key) + case "secondaryKekCertificatePfx": + err = unpopulate(val, "SecondaryKekCertificatePfx", &h.SecondaryKekCertificatePfx) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureDiskInputDetails. +func (h HyperVReplicaAzureDiskInputDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionSetId", h.DiskEncryptionSetID) + populate(objectMap, "diskId", h.DiskID) + populate(objectMap, "diskType", h.DiskType) + populate(objectMap, "logStorageAccountId", h.LogStorageAccountID) + populate(objectMap, "sectorSizeInBytes", h.SectorSizeInBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureDiskInputDetails. +func (h *HyperVReplicaAzureDiskInputDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &h.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &h.DiskID) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &h.DiskType) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &h.LogStorageAccountID) + delete(rawMsg, key) + case "sectorSizeInBytes": + err = unpopulate(val, "SectorSizeInBytes", &h.SectorSizeInBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureEnableProtectionInput. +func (h HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionSetId", h.DiskEncryptionSetID) + populate(objectMap, "diskType", h.DiskType) + populate(objectMap, "disksToInclude", h.DisksToInclude) + populate(objectMap, "disksToIncludeForManagedDisks", h.DisksToIncludeForManagedDisks) + populate(objectMap, "enableRdpOnTargetOption", h.EnableRdpOnTargetOption) + populate(objectMap, "hvHostVmId", h.HvHostVMID) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "licenseType", h.LicenseType) + populate(objectMap, "linuxLicenseType", h.LinuxLicenseType) + populate(objectMap, "logStorageAccountId", h.LogStorageAccountID) + populate(objectMap, "osType", h.OSType) + populate(objectMap, "sqlServerLicenseType", h.SQLServerLicenseType) + populate(objectMap, "seedManagedDiskTags", h.SeedManagedDiskTags) + populate(objectMap, "targetAvailabilitySetId", h.TargetAvailabilitySetID) + populate(objectMap, "targetAvailabilityZone", h.TargetAvailabilityZone) + populate(objectMap, "targetAzureNetworkId", h.TargetAzureNetworkID) + populate(objectMap, "targetAzureSubnetId", h.TargetAzureSubnetID) + populate(objectMap, "targetAzureV1ResourceGroupId", h.TargetAzureV1ResourceGroupID) + populate(objectMap, "targetAzureV2ResourceGroupId", h.TargetAzureV2ResourceGroupID) + populate(objectMap, "targetAzureVmName", h.TargetAzureVMName) + populate(objectMap, "targetManagedDiskTags", h.TargetManagedDiskTags) + populate(objectMap, "targetNicTags", h.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", h.TargetProximityPlacementGroupID) + populate(objectMap, "targetStorageAccountId", h.TargetStorageAccountID) + populate(objectMap, "targetVmSecurityProfile", h.TargetVMSecurityProfile) + populate(objectMap, "targetVmSize", h.TargetVMSize) + populate(objectMap, "targetVmTags", h.TargetVMTags) + populate(objectMap, "useManagedDisks", h.UseManagedDisks) + populate(objectMap, "useManagedDisksForReplication", h.UseManagedDisksForReplication) + populate(objectMap, "userSelectedOSName", h.UserSelectedOSName) + populate(objectMap, "vmName", h.VMName) + populate(objectMap, "vhdId", h.VhdID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureEnableProtectionInput. +func (h *HyperVReplicaAzureEnableProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &h.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &h.DiskType) + delete(rawMsg, key) + case "disksToInclude": + err = unpopulate(val, "DisksToInclude", &h.DisksToInclude) + delete(rawMsg, key) + case "disksToIncludeForManagedDisks": + err = unpopulate(val, "DisksToIncludeForManagedDisks", &h.DisksToIncludeForManagedDisks) + delete(rawMsg, key) + case "enableRdpOnTargetOption": + err = unpopulate(val, "EnableRdpOnTargetOption", &h.EnableRdpOnTargetOption) + delete(rawMsg, key) + case "hvHostVmId": + err = unpopulate(val, "HvHostVMID", &h.HvHostVMID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &h.LicenseType) + delete(rawMsg, key) + case "linuxLicenseType": + err = unpopulate(val, "LinuxLicenseType", &h.LinuxLicenseType) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &h.LogStorageAccountID) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &h.OSType) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &h.SQLServerLicenseType) + delete(rawMsg, key) + case "seedManagedDiskTags": + err = unpopulate(val, "SeedManagedDiskTags", &h.SeedManagedDiskTags) + delete(rawMsg, key) + case "targetAvailabilitySetId": + err = unpopulate(val, "TargetAvailabilitySetID", &h.TargetAvailabilitySetID) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &h.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetAzureNetworkId": + err = unpopulate(val, "TargetAzureNetworkID", &h.TargetAzureNetworkID) + delete(rawMsg, key) + case "targetAzureSubnetId": + err = unpopulate(val, "TargetAzureSubnetID", &h.TargetAzureSubnetID) + delete(rawMsg, key) + case "targetAzureV1ResourceGroupId": + err = unpopulate(val, "TargetAzureV1ResourceGroupID", &h.TargetAzureV1ResourceGroupID) + delete(rawMsg, key) + case "targetAzureV2ResourceGroupId": + err = unpopulate(val, "TargetAzureV2ResourceGroupID", &h.TargetAzureV2ResourceGroupID) + delete(rawMsg, key) + case "targetAzureVmName": + err = unpopulate(val, "TargetAzureVMName", &h.TargetAzureVMName) + delete(rawMsg, key) + case "targetManagedDiskTags": + err = unpopulate(val, "TargetManagedDiskTags", &h.TargetManagedDiskTags) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &h.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &h.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetStorageAccountId": + err = unpopulate(val, "TargetStorageAccountID", &h.TargetStorageAccountID) + delete(rawMsg, key) + case "targetVmSecurityProfile": + err = unpopulate(val, "TargetVMSecurityProfile", &h.TargetVMSecurityProfile) + delete(rawMsg, key) + case "targetVmSize": + err = unpopulate(val, "TargetVMSize", &h.TargetVMSize) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &h.TargetVMTags) + delete(rawMsg, key) + case "useManagedDisks": + err = unpopulate(val, "UseManagedDisks", &h.UseManagedDisks) + delete(rawMsg, key) + case "useManagedDisksForReplication": + err = unpopulate(val, "UseManagedDisksForReplication", &h.UseManagedDisksForReplication) + delete(rawMsg, key) + case "userSelectedOSName": + err = unpopulate(val, "UserSelectedOSName", &h.UserSelectedOSName) + delete(rawMsg, key) + case "vmName": + err = unpopulate(val, "VMName", &h.VMName) + delete(rawMsg, key) + case "vhdId": + err = unpopulate(val, "VhdID", &h.VhdID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureEventDetails. +func (h HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerName", h.ContainerName) + populate(objectMap, "fabricName", h.FabricName) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "remoteContainerName", h.RemoteContainerName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureEventDetails. +func (h *HyperVReplicaAzureEventDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &h.ContainerName) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &h.FabricName) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "remoteContainerName": + err = unpopulate(val, "RemoteContainerName", &h.RemoteContainerName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureFailbackProviderInput. +func (h HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataSyncOption", h.DataSyncOption) + objectMap["instanceType"] = "HyperVReplicaAzureFailback" + populate(objectMap, "providerIdForAlternateRecovery", h.ProviderIDForAlternateRecovery) + populate(objectMap, "recoveryVmCreationOption", h.RecoveryVMCreationOption) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureFailbackProviderInput. +func (h *HyperVReplicaAzureFailbackProviderInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataSyncOption": + err = unpopulate(val, "DataSyncOption", &h.DataSyncOption) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "providerIdForAlternateRecovery": + err = unpopulate(val, "ProviderIDForAlternateRecovery", &h.ProviderIDForAlternateRecovery) + delete(rawMsg, key) + case "recoveryVmCreationOption": + err = unpopulate(val, "RecoveryVMCreationOption", &h.RecoveryVMCreationOption) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureManagedDiskDetails. +func (h HyperVReplicaAzureManagedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionSetId", h.DiskEncryptionSetID) + populate(objectMap, "diskId", h.DiskID) + populate(objectMap, "replicaDiskType", h.ReplicaDiskType) + populate(objectMap, "sectorSizeInBytes", h.SectorSizeInBytes) + populate(objectMap, "seedManagedDiskId", h.SeedManagedDiskID) + populate(objectMap, "targetDiskAccountType", h.TargetDiskAccountType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureManagedDiskDetails. +func (h *HyperVReplicaAzureManagedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &h.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &h.DiskID) + delete(rawMsg, key) + case "replicaDiskType": + err = unpopulate(val, "ReplicaDiskType", &h.ReplicaDiskType) + delete(rawMsg, key) + case "sectorSizeInBytes": + err = unpopulate(val, "SectorSizeInBytes", &h.SectorSizeInBytes) + delete(rawMsg, key) + case "seedManagedDiskId": + err = unpopulate(val, "SeedManagedDiskID", &h.SeedManagedDiskID) + delete(rawMsg, key) + case "targetDiskAccountType": + err = unpopulate(val, "TargetDiskAccountType", &h.TargetDiskAccountType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzurePlannedFailoverProviderInput. +func (h HyperVReplicaAzurePlannedFailoverProviderInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "osUpgradeVersion", h.OSUpgradeVersion) + populate(objectMap, "primaryKekCertificatePfx", h.PrimaryKekCertificatePfx) + populate(objectMap, "recoveryPointId", h.RecoveryPointID) + populate(objectMap, "secondaryKekCertificatePfx", h.SecondaryKekCertificatePfx) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzurePlannedFailoverProviderInput. +func (h *HyperVReplicaAzurePlannedFailoverProviderInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "osUpgradeVersion": + err = unpopulate(val, "OSUpgradeVersion", &h.OSUpgradeVersion) + delete(rawMsg, key) + case "primaryKekCertificatePfx": + err = unpopulate(val, "PrimaryKekCertificatePfx", &h.PrimaryKekCertificatePfx) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &h.RecoveryPointID) + delete(rawMsg, key) + case "secondaryKekCertificatePfx": + err = unpopulate(val, "SecondaryKekCertificatePfx", &h.SecondaryKekCertificatePfx) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzurePolicyDetails. +func (h HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeStorageAccountId", h.ActiveStorageAccountID) + populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) + populate(objectMap, "encryption", h.Encryption) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) + populate(objectMap, "recoveryPointHistoryDurationInHours", h.RecoveryPointHistoryDurationInHours) + populate(objectMap, "replicationInterval", h.ReplicationInterval) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzurePolicyDetails. +func (h *HyperVReplicaAzurePolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeStorageAccountId": + err = unpopulate(val, "ActiveStorageAccountID", &h.ActiveStorageAccountID) + delete(rawMsg, key) + case "applicationConsistentSnapshotFrequencyInHours": + err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) + delete(rawMsg, key) + case "encryption": + err = unpopulate(val, "Encryption", &h.Encryption) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "onlineReplicationStartTime": + err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) + delete(rawMsg, key) + case "recoveryPointHistoryDurationInHours": + err = unpopulate(val, "RecoveryPointHistoryDurationInHours", &h.RecoveryPointHistoryDurationInHours) + delete(rawMsg, key) + case "replicationInterval": + err = unpopulate(val, "ReplicationInterval", &h.ReplicationInterval) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzurePolicyInput. +func (h HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) + populate(objectMap, "recoveryPointHistoryDuration", h.RecoveryPointHistoryDuration) + populate(objectMap, "replicationInterval", h.ReplicationInterval) + populate(objectMap, "storageAccounts", h.StorageAccounts) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzurePolicyInput. +func (h *HyperVReplicaAzurePolicyInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationConsistentSnapshotFrequencyInHours": + err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "onlineReplicationStartTime": + err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) + delete(rawMsg, key) + case "recoveryPointHistoryDuration": + err = unpopulate(val, "RecoveryPointHistoryDuration", &h.RecoveryPointHistoryDuration) + delete(rawMsg, key) + case "replicationInterval": + err = unpopulate(val, "ReplicationInterval", &h.ReplicationInterval) + delete(rawMsg, key) + case "storageAccounts": + err = unpopulate(val, "StorageAccounts", &h.StorageAccounts) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureReplicationDetails. +func (h HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allAvailableOSUpgradeConfigurations", h.AllAvailableOSUpgradeConfigurations) + populate(objectMap, "azureVmDiskDetails", h.AzureVMDiskDetails) + populate(objectMap, "enableRdpOnTargetOption", h.EnableRdpOnTargetOption) + populate(objectMap, "encryption", h.Encryption) + populate(objectMap, "initialReplicationDetails", h.InitialReplicationDetails) + objectMap["instanceType"] = "HyperVReplicaAzure" + populateDateTimeRFC3339(objectMap, "lastRecoveryPointReceived", h.LastRecoveryPointReceived) + populateDateTimeRFC3339(objectMap, "lastReplicatedTime", h.LastReplicatedTime) + populateDateTimeRFC3339(objectMap, "lastRpoCalculatedTime", h.LastRpoCalculatedTime) + populate(objectMap, "licenseType", h.LicenseType) + populate(objectMap, "linuxLicenseType", h.LinuxLicenseType) + populate(objectMap, "oSDetails", h.OSDetails) + populate(objectMap, "protectedManagedDisks", h.ProtectedManagedDisks) + populate(objectMap, "recoveryAvailabilitySetId", h.RecoveryAvailabilitySetID) + populate(objectMap, "recoveryAzureLogStorageAccountId", h.RecoveryAzureLogStorageAccountID) + populate(objectMap, "recoveryAzureResourceGroupId", h.RecoveryAzureResourceGroupID) + populate(objectMap, "recoveryAzureStorageAccount", h.RecoveryAzureStorageAccount) + populate(objectMap, "recoveryAzureVmName", h.RecoveryAzureVMName) + populate(objectMap, "recoveryAzureVMSize", h.RecoveryAzureVMSize) + populate(objectMap, "rpoInSeconds", h.RpoInSeconds) + populate(objectMap, "sqlServerLicenseType", h.SQLServerLicenseType) + populate(objectMap, "seedManagedDiskTags", h.SeedManagedDiskTags) + populate(objectMap, "selectedRecoveryAzureNetworkId", h.SelectedRecoveryAzureNetworkID) + populate(objectMap, "selectedSourceNicId", h.SelectedSourceNicID) + populate(objectMap, "sourceVmCpuCount", h.SourceVMCPUCount) + populate(objectMap, "sourceVmRamSizeInMB", h.SourceVMRAMSizeInMB) + populate(objectMap, "targetAvailabilityZone", h.TargetAvailabilityZone) + populate(objectMap, "targetManagedDiskTags", h.TargetManagedDiskTags) + populate(objectMap, "targetNicTags", h.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", h.TargetProximityPlacementGroupID) + populate(objectMap, "targetVmSecurityProfile", h.TargetVMSecurityProfile) + populate(objectMap, "targetVmTags", h.TargetVMTags) + populate(objectMap, "useManagedDisks", h.UseManagedDisks) + populate(objectMap, "vmId", h.VMID) + populate(objectMap, "vmNics", h.VMNics) + populate(objectMap, "vmProtectionState", h.VMProtectionState) + populate(objectMap, "vmProtectionStateDescription", h.VMProtectionStateDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureReplicationDetails. +func (h *HyperVReplicaAzureReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allAvailableOSUpgradeConfigurations": + err = unpopulate(val, "AllAvailableOSUpgradeConfigurations", &h.AllAvailableOSUpgradeConfigurations) + delete(rawMsg, key) + case "azureVmDiskDetails": + err = unpopulate(val, "AzureVMDiskDetails", &h.AzureVMDiskDetails) + delete(rawMsg, key) + case "enableRdpOnTargetOption": + err = unpopulate(val, "EnableRdpOnTargetOption", &h.EnableRdpOnTargetOption) + delete(rawMsg, key) + case "encryption": + err = unpopulate(val, "Encryption", &h.Encryption) + delete(rawMsg, key) + case "initialReplicationDetails": + err = unpopulate(val, "InitialReplicationDetails", &h.InitialReplicationDetails) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "lastRecoveryPointReceived": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPointReceived", &h.LastRecoveryPointReceived) + delete(rawMsg, key) + case "lastReplicatedTime": + err = unpopulateDateTimeRFC3339(val, "LastReplicatedTime", &h.LastReplicatedTime) + delete(rawMsg, key) + case "lastRpoCalculatedTime": + err = unpopulateDateTimeRFC3339(val, "LastRpoCalculatedTime", &h.LastRpoCalculatedTime) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &h.LicenseType) + delete(rawMsg, key) + case "linuxLicenseType": + err = unpopulate(val, "LinuxLicenseType", &h.LinuxLicenseType) + delete(rawMsg, key) + case "oSDetails": + err = unpopulate(val, "OSDetails", &h.OSDetails) + delete(rawMsg, key) + case "protectedManagedDisks": + err = unpopulate(val, "ProtectedManagedDisks", &h.ProtectedManagedDisks) + delete(rawMsg, key) + case "recoveryAvailabilitySetId": + err = unpopulate(val, "RecoveryAvailabilitySetID", &h.RecoveryAvailabilitySetID) + delete(rawMsg, key) + case "recoveryAzureLogStorageAccountId": + err = unpopulate(val, "RecoveryAzureLogStorageAccountID", &h.RecoveryAzureLogStorageAccountID) + delete(rawMsg, key) + case "recoveryAzureResourceGroupId": + err = unpopulate(val, "RecoveryAzureResourceGroupID", &h.RecoveryAzureResourceGroupID) + delete(rawMsg, key) + case "recoveryAzureStorageAccount": + err = unpopulate(val, "RecoveryAzureStorageAccount", &h.RecoveryAzureStorageAccount) + delete(rawMsg, key) + case "recoveryAzureVmName": + err = unpopulate(val, "RecoveryAzureVMName", &h.RecoveryAzureVMName) + delete(rawMsg, key) + case "recoveryAzureVMSize": + err = unpopulate(val, "RecoveryAzureVMSize", &h.RecoveryAzureVMSize) + delete(rawMsg, key) + case "rpoInSeconds": + err = unpopulate(val, "RpoInSeconds", &h.RpoInSeconds) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &h.SQLServerLicenseType) + delete(rawMsg, key) + case "seedManagedDiskTags": + err = unpopulate(val, "SeedManagedDiskTags", &h.SeedManagedDiskTags) + delete(rawMsg, key) + case "selectedRecoveryAzureNetworkId": + err = unpopulate(val, "SelectedRecoveryAzureNetworkID", &h.SelectedRecoveryAzureNetworkID) + delete(rawMsg, key) + case "selectedSourceNicId": + err = unpopulate(val, "SelectedSourceNicID", &h.SelectedSourceNicID) + delete(rawMsg, key) + case "sourceVmCpuCount": + err = unpopulate(val, "SourceVMCPUCount", &h.SourceVMCPUCount) + delete(rawMsg, key) + case "sourceVmRamSizeInMB": + err = unpopulate(val, "SourceVMRAMSizeInMB", &h.SourceVMRAMSizeInMB) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &h.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetManagedDiskTags": + err = unpopulate(val, "TargetManagedDiskTags", &h.TargetManagedDiskTags) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &h.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &h.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetVmSecurityProfile": + err = unpopulate(val, "TargetVMSecurityProfile", &h.TargetVMSecurityProfile) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &h.TargetVMTags) + delete(rawMsg, key) + case "useManagedDisks": + err = unpopulate(val, "UseManagedDisks", &h.UseManagedDisks) + delete(rawMsg, key) + case "vmId": + err = unpopulate(val, "VMID", &h.VMID) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &h.VMNics) + delete(rawMsg, key) + case "vmProtectionState": + err = unpopulate(val, "VMProtectionState", &h.VMProtectionState) + delete(rawMsg, key) + case "vmProtectionStateDescription": + err = unpopulate(val, "VMProtectionStateDescription", &h.VMProtectionStateDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureReprotectInput. +func (h HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hvHostVmId", h.HvHostVMID) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "logStorageAccountId", h.LogStorageAccountID) + populate(objectMap, "osType", h.OSType) + populate(objectMap, "storageAccountId", h.StorageAccountID) + populate(objectMap, "vHDId", h.VHDID) + populate(objectMap, "vmName", h.VMName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureReprotectInput. +func (h *HyperVReplicaAzureReprotectInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hvHostVmId": + err = unpopulate(val, "HvHostVMID", &h.HvHostVMID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &h.LogStorageAccountID) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &h.OSType) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &h.StorageAccountID) + delete(rawMsg, key) + case "vHDId": + err = unpopulate(val, "VHDID", &h.VHDID) + delete(rawMsg, key) + case "vmName": + err = unpopulate(val, "VMName", &h.VMName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureTestFailoverInput. +func (h HyperVReplicaAzureTestFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "osUpgradeVersion", h.OSUpgradeVersion) + populate(objectMap, "primaryKekCertificatePfx", h.PrimaryKekCertificatePfx) + populate(objectMap, "recoveryPointId", h.RecoveryPointID) + populate(objectMap, "secondaryKekCertificatePfx", h.SecondaryKekCertificatePfx) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureTestFailoverInput. +func (h *HyperVReplicaAzureTestFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "osUpgradeVersion": + err = unpopulate(val, "OSUpgradeVersion", &h.OSUpgradeVersion) + delete(rawMsg, key) + case "primaryKekCertificatePfx": + err = unpopulate(val, "PrimaryKekCertificatePfx", &h.PrimaryKekCertificatePfx) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &h.RecoveryPointID) + delete(rawMsg, key) + case "secondaryKekCertificatePfx": + err = unpopulate(val, "SecondaryKekCertificatePfx", &h.SecondaryKekCertificatePfx) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureUnplannedFailoverInput. +func (h HyperVReplicaAzureUnplannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "primaryKekCertificatePfx", h.PrimaryKekCertificatePfx) + populate(objectMap, "recoveryPointId", h.RecoveryPointID) + populate(objectMap, "secondaryKekCertificatePfx", h.SecondaryKekCertificatePfx) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureUnplannedFailoverInput. +func (h *HyperVReplicaAzureUnplannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "primaryKekCertificatePfx": + err = unpopulate(val, "PrimaryKekCertificatePfx", &h.PrimaryKekCertificatePfx) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &h.RecoveryPointID) + delete(rawMsg, key) + case "secondaryKekCertificatePfx": + err = unpopulate(val, "SecondaryKekCertificatePfx", &h.SecondaryKekCertificatePfx) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (h HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskIdToDiskEncryptionMap", h.DiskIDToDiskEncryptionMap) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "linuxLicenseType", h.LinuxLicenseType) + populate(objectMap, "recoveryAzureV1ResourceGroupId", h.RecoveryAzureV1ResourceGroupID) + populate(objectMap, "recoveryAzureV2ResourceGroupId", h.RecoveryAzureV2ResourceGroupID) + populate(objectMap, "sqlServerLicenseType", h.SQLServerLicenseType) + populate(objectMap, "targetAvailabilityZone", h.TargetAvailabilityZone) + populate(objectMap, "targetManagedDiskTags", h.TargetManagedDiskTags) + populate(objectMap, "targetNicTags", h.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", h.TargetProximityPlacementGroupID) + populate(objectMap, "targetVmTags", h.TargetVMTags) + populate(objectMap, "useManagedDisks", h.UseManagedDisks) + populate(objectMap, "userSelectedOSName", h.UserSelectedOSName) + populate(objectMap, "vmDisks", h.VMDisks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (h *HyperVReplicaAzureUpdateReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskIdToDiskEncryptionMap": + err = unpopulate(val, "DiskIDToDiskEncryptionMap", &h.DiskIDToDiskEncryptionMap) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "linuxLicenseType": + err = unpopulate(val, "LinuxLicenseType", &h.LinuxLicenseType) + delete(rawMsg, key) + case "recoveryAzureV1ResourceGroupId": + err = unpopulate(val, "RecoveryAzureV1ResourceGroupID", &h.RecoveryAzureV1ResourceGroupID) + delete(rawMsg, key) + case "recoveryAzureV2ResourceGroupId": + err = unpopulate(val, "RecoveryAzureV2ResourceGroupID", &h.RecoveryAzureV2ResourceGroupID) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &h.SQLServerLicenseType) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &h.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetManagedDiskTags": + err = unpopulate(val, "TargetManagedDiskTags", &h.TargetManagedDiskTags) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &h.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &h.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &h.TargetVMTags) + delete(rawMsg, key) + case "useManagedDisks": + err = unpopulate(val, "UseManagedDisks", &h.UseManagedDisks) + delete(rawMsg, key) + case "userSelectedOSName": + err = unpopulate(val, "UserSelectedOSName", &h.UserSelectedOSName) + delete(rawMsg, key) + case "vmDisks": + err = unpopulate(val, "VMDisks", &h.VMDisks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBaseEventDetails. +func (h HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerName", h.ContainerName) + populate(objectMap, "fabricName", h.FabricName) + objectMap["instanceType"] = "HyperVReplicaBaseEventDetails" + populate(objectMap, "remoteContainerName", h.RemoteContainerName) + populate(objectMap, "remoteFabricName", h.RemoteFabricName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBaseEventDetails. +func (h *HyperVReplicaBaseEventDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &h.ContainerName) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &h.FabricName) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "remoteContainerName": + err = unpopulate(val, "RemoteContainerName", &h.RemoteContainerName) + delete(rawMsg, key) + case "remoteFabricName": + err = unpopulate(val, "RemoteFabricName", &h.RemoteFabricName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBasePolicyDetails. +func (h HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType) + populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) + populate(objectMap, "compression", h.Compression) + populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod) + objectMap["instanceType"] = "HyperVReplicaBasePolicyDetails" + populate(objectMap, "offlineReplicationExportPath", h.OfflineReplicationExportPath) + populate(objectMap, "offlineReplicationImportPath", h.OfflineReplicationImportPath) + populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) + populate(objectMap, "recoveryPoints", h.RecoveryPoints) + populate(objectMap, "replicaDeletionOption", h.ReplicaDeletionOption) + populate(objectMap, "replicationPort", h.ReplicationPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBasePolicyDetails. +func (h *HyperVReplicaBasePolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedAuthenticationType": + err = unpopulate(val, "AllowedAuthenticationType", &h.AllowedAuthenticationType) + delete(rawMsg, key) + case "applicationConsistentSnapshotFrequencyInHours": + err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) + delete(rawMsg, key) + case "compression": + err = unpopulate(val, "Compression", &h.Compression) + delete(rawMsg, key) + case "initialReplicationMethod": + err = unpopulate(val, "InitialReplicationMethod", &h.InitialReplicationMethod) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "offlineReplicationExportPath": + err = unpopulate(val, "OfflineReplicationExportPath", &h.OfflineReplicationExportPath) + delete(rawMsg, key) + case "offlineReplicationImportPath": + err = unpopulate(val, "OfflineReplicationImportPath", &h.OfflineReplicationImportPath) + delete(rawMsg, key) + case "onlineReplicationStartTime": + err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) + delete(rawMsg, key) + case "recoveryPoints": + err = unpopulate(val, "RecoveryPoints", &h.RecoveryPoints) + delete(rawMsg, key) + case "replicaDeletionOption": + err = unpopulate(val, "ReplicaDeletionOption", &h.ReplicaDeletionOption) + delete(rawMsg, key) + case "replicationPort": + err = unpopulate(val, "ReplicationPort", &h.ReplicationPort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBaseReplicationDetails. +func (h HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "initialReplicationDetails", h.InitialReplicationDetails) + objectMap["instanceType"] = "HyperVReplicaBaseReplicationDetails" + populateDateTimeRFC3339(objectMap, "lastReplicatedTime", h.LastReplicatedTime) + populate(objectMap, "vMDiskDetails", h.VMDiskDetails) + populate(objectMap, "vmId", h.VMID) + populate(objectMap, "vmNics", h.VMNics) + populate(objectMap, "vmProtectionState", h.VMProtectionState) + populate(objectMap, "vmProtectionStateDescription", h.VMProtectionStateDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBaseReplicationDetails. +func (h *HyperVReplicaBaseReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "initialReplicationDetails": + err = unpopulate(val, "InitialReplicationDetails", &h.InitialReplicationDetails) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "lastReplicatedTime": + err = unpopulateDateTimeRFC3339(val, "LastReplicatedTime", &h.LastReplicatedTime) + delete(rawMsg, key) + case "vMDiskDetails": + err = unpopulate(val, "VMDiskDetails", &h.VMDiskDetails) + delete(rawMsg, key) + case "vmId": + err = unpopulate(val, "VMID", &h.VMID) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &h.VMNics) + delete(rawMsg, key) + case "vmProtectionState": + err = unpopulate(val, "VMProtectionState", &h.VMProtectionState) + delete(rawMsg, key) + case "vmProtectionStateDescription": + err = unpopulate(val, "VMProtectionStateDescription", &h.VMProtectionStateDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBluePolicyDetails. +func (h HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType) + populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) + populate(objectMap, "compression", h.Compression) + populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod) + objectMap["instanceType"] = "HyperVReplica2012R2" + populate(objectMap, "offlineReplicationExportPath", h.OfflineReplicationExportPath) + populate(objectMap, "offlineReplicationImportPath", h.OfflineReplicationImportPath) + populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) + populate(objectMap, "recoveryPoints", h.RecoveryPoints) + populate(objectMap, "replicaDeletionOption", h.ReplicaDeletionOption) + populate(objectMap, "replicationFrequencyInSeconds", h.ReplicationFrequencyInSeconds) + populate(objectMap, "replicationPort", h.ReplicationPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBluePolicyDetails. +func (h *HyperVReplicaBluePolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedAuthenticationType": + err = unpopulate(val, "AllowedAuthenticationType", &h.AllowedAuthenticationType) + delete(rawMsg, key) + case "applicationConsistentSnapshotFrequencyInHours": + err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) + delete(rawMsg, key) + case "compression": + err = unpopulate(val, "Compression", &h.Compression) + delete(rawMsg, key) + case "initialReplicationMethod": + err = unpopulate(val, "InitialReplicationMethod", &h.InitialReplicationMethod) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "offlineReplicationExportPath": + err = unpopulate(val, "OfflineReplicationExportPath", &h.OfflineReplicationExportPath) + delete(rawMsg, key) + case "offlineReplicationImportPath": + err = unpopulate(val, "OfflineReplicationImportPath", &h.OfflineReplicationImportPath) + delete(rawMsg, key) + case "onlineReplicationStartTime": + err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) + delete(rawMsg, key) + case "recoveryPoints": + err = unpopulate(val, "RecoveryPoints", &h.RecoveryPoints) + delete(rawMsg, key) + case "replicaDeletionOption": + err = unpopulate(val, "ReplicaDeletionOption", &h.ReplicaDeletionOption) + delete(rawMsg, key) + case "replicationFrequencyInSeconds": + err = unpopulate(val, "ReplicationFrequencyInSeconds", &h.ReplicationFrequencyInSeconds) + delete(rawMsg, key) + case "replicationPort": + err = unpopulate(val, "ReplicationPort", &h.ReplicationPort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBluePolicyInput. +func (h HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType) + populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) + populate(objectMap, "compression", h.Compression) + populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod) + objectMap["instanceType"] = "HyperVReplica2012R2" + populate(objectMap, "offlineReplicationExportPath", h.OfflineReplicationExportPath) + populate(objectMap, "offlineReplicationImportPath", h.OfflineReplicationImportPath) + populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) + populate(objectMap, "recoveryPoints", h.RecoveryPoints) + populate(objectMap, "replicaDeletion", h.ReplicaDeletion) + populate(objectMap, "replicationFrequencyInSeconds", h.ReplicationFrequencyInSeconds) + populate(objectMap, "replicationPort", h.ReplicationPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBluePolicyInput. +func (h *HyperVReplicaBluePolicyInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedAuthenticationType": + err = unpopulate(val, "AllowedAuthenticationType", &h.AllowedAuthenticationType) + delete(rawMsg, key) + case "applicationConsistentSnapshotFrequencyInHours": + err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) + delete(rawMsg, key) + case "compression": + err = unpopulate(val, "Compression", &h.Compression) + delete(rawMsg, key) + case "initialReplicationMethod": + err = unpopulate(val, "InitialReplicationMethod", &h.InitialReplicationMethod) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "offlineReplicationExportPath": + err = unpopulate(val, "OfflineReplicationExportPath", &h.OfflineReplicationExportPath) + delete(rawMsg, key) + case "offlineReplicationImportPath": + err = unpopulate(val, "OfflineReplicationImportPath", &h.OfflineReplicationImportPath) + delete(rawMsg, key) + case "onlineReplicationStartTime": + err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) + delete(rawMsg, key) + case "recoveryPoints": + err = unpopulate(val, "RecoveryPoints", &h.RecoveryPoints) + delete(rawMsg, key) + case "replicaDeletion": + err = unpopulate(val, "ReplicaDeletion", &h.ReplicaDeletion) + delete(rawMsg, key) + case "replicationFrequencyInSeconds": + err = unpopulate(val, "ReplicationFrequencyInSeconds", &h.ReplicationFrequencyInSeconds) + delete(rawMsg, key) + case "replicationPort": + err = unpopulate(val, "ReplicationPort", &h.ReplicationPort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBlueReplicationDetails. +func (h HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "initialReplicationDetails", h.InitialReplicationDetails) + objectMap["instanceType"] = "HyperVReplica2012R2" + populateDateTimeRFC3339(objectMap, "lastReplicatedTime", h.LastReplicatedTime) + populate(objectMap, "vMDiskDetails", h.VMDiskDetails) + populate(objectMap, "vmId", h.VMID) + populate(objectMap, "vmNics", h.VMNics) + populate(objectMap, "vmProtectionState", h.VMProtectionState) + populate(objectMap, "vmProtectionStateDescription", h.VMProtectionStateDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBlueReplicationDetails. +func (h *HyperVReplicaBlueReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "initialReplicationDetails": + err = unpopulate(val, "InitialReplicationDetails", &h.InitialReplicationDetails) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "lastReplicatedTime": + err = unpopulateDateTimeRFC3339(val, "LastReplicatedTime", &h.LastReplicatedTime) + delete(rawMsg, key) + case "vMDiskDetails": + err = unpopulate(val, "VMDiskDetails", &h.VMDiskDetails) + delete(rawMsg, key) + case "vmId": + err = unpopulate(val, "VMID", &h.VMID) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &h.VMNics) + delete(rawMsg, key) + case "vmProtectionState": + err = unpopulate(val, "VMProtectionState", &h.VMProtectionState) + delete(rawMsg, key) + case "vmProtectionStateDescription": + err = unpopulate(val, "VMProtectionStateDescription", &h.VMProtectionStateDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaPolicyDetails. +func (h HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType) + populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) + populate(objectMap, "compression", h.Compression) + populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod) + objectMap["instanceType"] = "HyperVReplica2012" + populate(objectMap, "offlineReplicationExportPath", h.OfflineReplicationExportPath) + populate(objectMap, "offlineReplicationImportPath", h.OfflineReplicationImportPath) + populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) + populate(objectMap, "recoveryPoints", h.RecoveryPoints) + populate(objectMap, "replicaDeletionOption", h.ReplicaDeletionOption) + populate(objectMap, "replicationPort", h.ReplicationPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaPolicyDetails. +func (h *HyperVReplicaPolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedAuthenticationType": + err = unpopulate(val, "AllowedAuthenticationType", &h.AllowedAuthenticationType) + delete(rawMsg, key) + case "applicationConsistentSnapshotFrequencyInHours": + err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) + delete(rawMsg, key) + case "compression": + err = unpopulate(val, "Compression", &h.Compression) + delete(rawMsg, key) + case "initialReplicationMethod": + err = unpopulate(val, "InitialReplicationMethod", &h.InitialReplicationMethod) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "offlineReplicationExportPath": + err = unpopulate(val, "OfflineReplicationExportPath", &h.OfflineReplicationExportPath) + delete(rawMsg, key) + case "offlineReplicationImportPath": + err = unpopulate(val, "OfflineReplicationImportPath", &h.OfflineReplicationImportPath) + delete(rawMsg, key) + case "onlineReplicationStartTime": + err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) + delete(rawMsg, key) + case "recoveryPoints": + err = unpopulate(val, "RecoveryPoints", &h.RecoveryPoints) + delete(rawMsg, key) + case "replicaDeletionOption": + err = unpopulate(val, "ReplicaDeletionOption", &h.ReplicaDeletionOption) + delete(rawMsg, key) + case "replicationPort": + err = unpopulate(val, "ReplicationPort", &h.ReplicationPort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaPolicyInput. +func (h HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType) + populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours) + populate(objectMap, "compression", h.Compression) + populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod) + objectMap["instanceType"] = "HyperVReplica2012" + populate(objectMap, "offlineReplicationExportPath", h.OfflineReplicationExportPath) + populate(objectMap, "offlineReplicationImportPath", h.OfflineReplicationImportPath) + populate(objectMap, "onlineReplicationStartTime", h.OnlineReplicationStartTime) + populate(objectMap, "recoveryPoints", h.RecoveryPoints) + populate(objectMap, "replicaDeletion", h.ReplicaDeletion) + populate(objectMap, "replicationPort", h.ReplicationPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaPolicyInput. +func (h *HyperVReplicaPolicyInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedAuthenticationType": + err = unpopulate(val, "AllowedAuthenticationType", &h.AllowedAuthenticationType) + delete(rawMsg, key) + case "applicationConsistentSnapshotFrequencyInHours": + err = unpopulate(val, "ApplicationConsistentSnapshotFrequencyInHours", &h.ApplicationConsistentSnapshotFrequencyInHours) + delete(rawMsg, key) + case "compression": + err = unpopulate(val, "Compression", &h.Compression) + delete(rawMsg, key) + case "initialReplicationMethod": + err = unpopulate(val, "InitialReplicationMethod", &h.InitialReplicationMethod) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "offlineReplicationExportPath": + err = unpopulate(val, "OfflineReplicationExportPath", &h.OfflineReplicationExportPath) + delete(rawMsg, key) + case "offlineReplicationImportPath": + err = unpopulate(val, "OfflineReplicationImportPath", &h.OfflineReplicationImportPath) + delete(rawMsg, key) + case "onlineReplicationStartTime": + err = unpopulate(val, "OnlineReplicationStartTime", &h.OnlineReplicationStartTime) + delete(rawMsg, key) + case "recoveryPoints": + err = unpopulate(val, "RecoveryPoints", &h.RecoveryPoints) + delete(rawMsg, key) + case "replicaDeletion": + err = unpopulate(val, "ReplicaDeletion", &h.ReplicaDeletion) + delete(rawMsg, key) + case "replicationPort": + err = unpopulate(val, "ReplicationPort", &h.ReplicationPort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaReplicationDetails. +func (h HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "initialReplicationDetails", h.InitialReplicationDetails) + objectMap["instanceType"] = "HyperVReplica2012" + populateDateTimeRFC3339(objectMap, "lastReplicatedTime", h.LastReplicatedTime) + populate(objectMap, "vMDiskDetails", h.VMDiskDetails) + populate(objectMap, "vmId", h.VMID) + populate(objectMap, "vmNics", h.VMNics) + populate(objectMap, "vmProtectionState", h.VMProtectionState) + populate(objectMap, "vmProtectionStateDescription", h.VMProtectionStateDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaReplicationDetails. +func (h *HyperVReplicaReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "initialReplicationDetails": + err = unpopulate(val, "InitialReplicationDetails", &h.InitialReplicationDetails) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "lastReplicatedTime": + err = unpopulateDateTimeRFC3339(val, "LastReplicatedTime", &h.LastReplicatedTime) + delete(rawMsg, key) + case "vMDiskDetails": + err = unpopulate(val, "VMDiskDetails", &h.VMDiskDetails) + delete(rawMsg, key) + case "vmId": + err = unpopulate(val, "VMID", &h.VMID) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &h.VMNics) + delete(rawMsg, key) + case "vmProtectionState": + err = unpopulate(val, "VMProtectionState", &h.VMProtectionState) + delete(rawMsg, key) + case "vmProtectionStateDescription": + err = unpopulate(val, "VMProtectionStateDescription", &h.VMProtectionStateDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVSiteDetails. +func (h HyperVSiteDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hyperVHosts", h.HyperVHosts) + objectMap["instanceType"] = "HyperVSite" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVSiteDetails. +func (h *HyperVSiteDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hyperVHosts": + err = unpopulate(val, "HyperVHosts", &h.HyperVHosts) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HyperVVirtualMachineDetails. +func (h HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskDetails", h.DiskDetails) + populate(objectMap, "generation", h.Generation) + populate(objectMap, "hasFibreChannelAdapter", h.HasFibreChannelAdapter) + populate(objectMap, "hasPhysicalDisk", h.HasPhysicalDisk) + populate(objectMap, "hasSharedVhd", h.HasSharedVhd) + populate(objectMap, "hyperVHostId", h.HyperVHostID) + objectMap["instanceType"] = "HyperVVirtualMachine" + populate(objectMap, "osDetails", h.OSDetails) + populate(objectMap, "sourceItemId", h.SourceItemID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVVirtualMachineDetails. +func (h *HyperVVirtualMachineDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskDetails": + err = unpopulate(val, "DiskDetails", &h.DiskDetails) + delete(rawMsg, key) + case "generation": + err = unpopulate(val, "Generation", &h.Generation) + delete(rawMsg, key) + case "hasFibreChannelAdapter": + err = unpopulate(val, "HasFibreChannelAdapter", &h.HasFibreChannelAdapter) + delete(rawMsg, key) + case "hasPhysicalDisk": + err = unpopulate(val, "HasPhysicalDisk", &h.HasPhysicalDisk) + delete(rawMsg, key) + case "hasSharedVhd": + err = unpopulate(val, "HasSharedVhd", &h.HasSharedVhd) + delete(rawMsg, key) + case "hyperVHostId": + err = unpopulate(val, "HyperVHostID", &h.HyperVHostID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &h.InstanceType) + delete(rawMsg, key) + case "osDetails": + err = unpopulate(val, "OSDetails", &h.OSDetails) + delete(rawMsg, key) + case "sourceItemId": + err = unpopulate(val, "SourceItemID", &h.SourceItemID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPConfigDetails. +func (i IPConfigDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipAddressType", i.IPAddressType) + populate(objectMap, "isPrimary", i.IsPrimary) + populate(objectMap, "isSeletedForFailover", i.IsSeletedForFailover) + populate(objectMap, "name", i.Name) + populate(objectMap, "recoveryIPAddressType", i.RecoveryIPAddressType) + populate(objectMap, "recoveryLBBackendAddressPoolIds", i.RecoveryLBBackendAddressPoolIDs) + populate(objectMap, "recoveryPublicIPAddressId", i.RecoveryPublicIPAddressID) + populate(objectMap, "recoveryStaticIPAddress", i.RecoveryStaticIPAddress) + populate(objectMap, "recoverySubnetName", i.RecoverySubnetName) + populate(objectMap, "staticIPAddress", i.StaticIPAddress) + populate(objectMap, "subnetName", i.SubnetName) + populate(objectMap, "tfoLBBackendAddressPoolIds", i.TfoLBBackendAddressPoolIDs) + populate(objectMap, "tfoPublicIPAddressId", i.TfoPublicIPAddressID) + populate(objectMap, "tfoStaticIPAddress", i.TfoStaticIPAddress) + populate(objectMap, "tfoSubnetName", i.TfoSubnetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigDetails. +func (i *IPConfigDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipAddressType": + err = unpopulate(val, "IPAddressType", &i.IPAddressType) + delete(rawMsg, key) + case "isPrimary": + err = unpopulate(val, "IsPrimary", &i.IsPrimary) + delete(rawMsg, key) + case "isSeletedForFailover": + err = unpopulate(val, "IsSeletedForFailover", &i.IsSeletedForFailover) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "recoveryIPAddressType": + err = unpopulate(val, "RecoveryIPAddressType", &i.RecoveryIPAddressType) + delete(rawMsg, key) + case "recoveryLBBackendAddressPoolIds": + err = unpopulate(val, "RecoveryLBBackendAddressPoolIDs", &i.RecoveryLBBackendAddressPoolIDs) + delete(rawMsg, key) + case "recoveryPublicIPAddressId": + err = unpopulate(val, "RecoveryPublicIPAddressID", &i.RecoveryPublicIPAddressID) + delete(rawMsg, key) + case "recoveryStaticIPAddress": + err = unpopulate(val, "RecoveryStaticIPAddress", &i.RecoveryStaticIPAddress) + delete(rawMsg, key) + case "recoverySubnetName": + err = unpopulate(val, "RecoverySubnetName", &i.RecoverySubnetName) + delete(rawMsg, key) + case "staticIPAddress": + err = unpopulate(val, "StaticIPAddress", &i.StaticIPAddress) + delete(rawMsg, key) + case "subnetName": + err = unpopulate(val, "SubnetName", &i.SubnetName) + delete(rawMsg, key) + case "tfoLBBackendAddressPoolIds": + err = unpopulate(val, "TfoLBBackendAddressPoolIDs", &i.TfoLBBackendAddressPoolIDs) + delete(rawMsg, key) + case "tfoPublicIPAddressId": + err = unpopulate(val, "TfoPublicIPAddressID", &i.TfoPublicIPAddressID) + delete(rawMsg, key) + case "tfoStaticIPAddress": + err = unpopulate(val, "TfoStaticIPAddress", &i.TfoStaticIPAddress) + delete(rawMsg, key) + case "tfoSubnetName": + err = unpopulate(val, "TfoSubnetName", &i.TfoSubnetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IPConfigInputDetails. +func (i IPConfigInputDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "ipConfigName", i.IPConfigName) + populate(objectMap, "isPrimary", i.IsPrimary) + populate(objectMap, "isSeletedForFailover", i.IsSeletedForFailover) + populate(objectMap, "recoveryLBBackendAddressPoolIds", i.RecoveryLBBackendAddressPoolIDs) + populate(objectMap, "recoveryPublicIPAddressId", i.RecoveryPublicIPAddressID) + populate(objectMap, "recoveryStaticIPAddress", i.RecoveryStaticIPAddress) + populate(objectMap, "recoverySubnetName", i.RecoverySubnetName) + populate(objectMap, "tfoLBBackendAddressPoolIds", i.TfoLBBackendAddressPoolIDs) + populate(objectMap, "tfoPublicIPAddressId", i.TfoPublicIPAddressID) + populate(objectMap, "tfoStaticIPAddress", i.TfoStaticIPAddress) + populate(objectMap, "tfoSubnetName", i.TfoSubnetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPConfigInputDetails. +func (i *IPConfigInputDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "ipConfigName": + err = unpopulate(val, "IPConfigName", &i.IPConfigName) + delete(rawMsg, key) + case "isPrimary": + err = unpopulate(val, "IsPrimary", &i.IsPrimary) + delete(rawMsg, key) + case "isSeletedForFailover": + err = unpopulate(val, "IsSeletedForFailover", &i.IsSeletedForFailover) + delete(rawMsg, key) + case "recoveryLBBackendAddressPoolIds": + err = unpopulate(val, "RecoveryLBBackendAddressPoolIDs", &i.RecoveryLBBackendAddressPoolIDs) + delete(rawMsg, key) + case "recoveryPublicIPAddressId": + err = unpopulate(val, "RecoveryPublicIPAddressID", &i.RecoveryPublicIPAddressID) + delete(rawMsg, key) + case "recoveryStaticIPAddress": + err = unpopulate(val, "RecoveryStaticIPAddress", &i.RecoveryStaticIPAddress) + delete(rawMsg, key) + case "recoverySubnetName": + err = unpopulate(val, "RecoverySubnetName", &i.RecoverySubnetName) + delete(rawMsg, key) + case "tfoLBBackendAddressPoolIds": + err = unpopulate(val, "TfoLBBackendAddressPoolIDs", &i.TfoLBBackendAddressPoolIDs) + delete(rawMsg, key) + case "tfoPublicIPAddressId": + err = unpopulate(val, "TfoPublicIPAddressID", &i.TfoPublicIPAddressID) + delete(rawMsg, key) + case "tfoStaticIPAddress": + err = unpopulate(val, "TfoStaticIPAddress", &i.TfoStaticIPAddress) + delete(rawMsg, key) + case "tfoSubnetName": + err = unpopulate(val, "TfoSubnetName", &i.TfoSubnetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviderDetails. +func (i IdentityProviderDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadAuthority", i.AADAuthority) + populate(objectMap, "applicationId", i.ApplicationID) + populate(objectMap, "audience", i.Audience) + populate(objectMap, "objectId", i.ObjectID) + populate(objectMap, "tenantId", i.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderDetails. +func (i *IdentityProviderDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadAuthority": + err = unpopulate(val, "AADAuthority", &i.AADAuthority) + delete(rawMsg, key) + case "applicationId": + err = unpopulate(val, "ApplicationID", &i.ApplicationID) + delete(rawMsg, key) + case "audience": + err = unpopulate(val, "Audience", &i.Audience) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &i.ObjectID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &i.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityProviderInput. +func (i IdentityProviderInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aadAuthority", i.AADAuthority) + populate(objectMap, "applicationId", i.ApplicationID) + populate(objectMap, "audience", i.Audience) + populate(objectMap, "objectId", i.ObjectID) + populate(objectMap, "tenantId", i.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProviderInput. +func (i *IdentityProviderInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aadAuthority": + err = unpopulate(val, "AADAuthority", &i.AADAuthority) + delete(rawMsg, key) + case "applicationId": + err = unpopulate(val, "ApplicationID", &i.ApplicationID) + delete(rawMsg, key) + case "audience": + err = unpopulate(val, "Audience", &i.Audience) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &i.ObjectID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &i.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAgentDetails. +func (i InMageAgentDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "agentExpiryDate", i.AgentExpiryDate) + populate(objectMap, "agentUpdateStatus", i.AgentUpdateStatus) + populate(objectMap, "agentVersion", i.AgentVersion) + populate(objectMap, "postUpdateRebootStatus", i.PostUpdateRebootStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAgentDetails. +func (i *InMageAgentDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentExpiryDate": + err = unpopulateDateTimeRFC3339(val, "AgentExpiryDate", &i.AgentExpiryDate) + delete(rawMsg, key) + case "agentUpdateStatus": + err = unpopulate(val, "AgentUpdateStatus", &i.AgentUpdateStatus) + delete(rawMsg, key) + case "agentVersion": + err = unpopulate(val, "AgentVersion", &i.AgentVersion) + delete(rawMsg, key) + case "postUpdateRebootStatus": + err = unpopulate(val, "PostUpdateRebootStatus", &i.PostUpdateRebootStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2ApplyRecoveryPointInput. +func (i InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageAzureV2" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2ApplyRecoveryPointInput. +func (i *InMageAzureV2ApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2DiskInputDetails. +func (i InMageAzureV2DiskInputDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) + populate(objectMap, "diskId", i.DiskID) + populate(objectMap, "diskType", i.DiskType) + populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2DiskInputDetails. +func (i *InMageAzureV2DiskInputDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &i.DiskID) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &i.DiskType) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2EnableProtectionInput. +func (i InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) + populate(objectMap, "diskType", i.DiskType) + populate(objectMap, "disksToInclude", i.DisksToInclude) + populate(objectMap, "enableRdpOnTargetOption", i.EnableRdpOnTargetOption) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "licenseType", i.LicenseType) + populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) + populate(objectMap, "masterTargetId", i.MasterTargetID) + populate(objectMap, "multiVmGroupId", i.MultiVMGroupID) + populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) + populate(objectMap, "processServerId", i.ProcessServerID) + populate(objectMap, "runAsAccountId", i.RunAsAccountID) + populate(objectMap, "sqlServerLicenseType", i.SQLServerLicenseType) + populate(objectMap, "seedManagedDiskTags", i.SeedManagedDiskTags) + populate(objectMap, "storageAccountId", i.StorageAccountID) + populate(objectMap, "targetAvailabilitySetId", i.TargetAvailabilitySetID) + populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) + populate(objectMap, "targetAzureNetworkId", i.TargetAzureNetworkID) + populate(objectMap, "targetAzureSubnetId", i.TargetAzureSubnetID) + populate(objectMap, "targetAzureV1ResourceGroupId", i.TargetAzureV1ResourceGroupID) + populate(objectMap, "targetAzureV2ResourceGroupId", i.TargetAzureV2ResourceGroupID) + populate(objectMap, "targetAzureVmName", i.TargetAzureVMName) + populate(objectMap, "targetManagedDiskTags", i.TargetManagedDiskTags) + populate(objectMap, "targetNicTags", i.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) + populate(objectMap, "targetVmSize", i.TargetVMSize) + populate(objectMap, "targetVmTags", i.TargetVMTags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2EnableProtectionInput. +func (i *InMageAzureV2EnableProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &i.DiskType) + delete(rawMsg, key) + case "disksToInclude": + err = unpopulate(val, "DisksToInclude", &i.DisksToInclude) + delete(rawMsg, key) + case "enableRdpOnTargetOption": + err = unpopulate(val, "EnableRdpOnTargetOption", &i.EnableRdpOnTargetOption) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &i.LicenseType) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) + delete(rawMsg, key) + case "masterTargetId": + err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) + delete(rawMsg, key) + case "multiVmGroupId": + err = unpopulate(val, "MultiVMGroupID", &i.MultiVMGroupID) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &i.SQLServerLicenseType) + delete(rawMsg, key) + case "seedManagedDiskTags": + err = unpopulate(val, "SeedManagedDiskTags", &i.SeedManagedDiskTags) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &i.StorageAccountID) + delete(rawMsg, key) + case "targetAvailabilitySetId": + err = unpopulate(val, "TargetAvailabilitySetID", &i.TargetAvailabilitySetID) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetAzureNetworkId": + err = unpopulate(val, "TargetAzureNetworkID", &i.TargetAzureNetworkID) + delete(rawMsg, key) + case "targetAzureSubnetId": + err = unpopulate(val, "TargetAzureSubnetID", &i.TargetAzureSubnetID) + delete(rawMsg, key) + case "targetAzureV1ResourceGroupId": + err = unpopulate(val, "TargetAzureV1ResourceGroupID", &i.TargetAzureV1ResourceGroupID) + delete(rawMsg, key) + case "targetAzureV2ResourceGroupId": + err = unpopulate(val, "TargetAzureV2ResourceGroupID", &i.TargetAzureV2ResourceGroupID) + delete(rawMsg, key) + case "targetAzureVmName": + err = unpopulate(val, "TargetAzureVMName", &i.TargetAzureVMName) + delete(rawMsg, key) + case "targetManagedDiskTags": + err = unpopulate(val, "TargetManagedDiskTags", &i.TargetManagedDiskTags) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &i.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetVmSize": + err = unpopulate(val, "TargetVMSize", &i.TargetVMSize) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &i.TargetVMTags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2EventDetails. +func (i InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "category", i.Category) + populate(objectMap, "component", i.Component) + populate(objectMap, "correctiveAction", i.CorrectiveAction) + populate(objectMap, "details", i.Details) + populate(objectMap, "eventType", i.EventType) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "siteName", i.SiteName) + populate(objectMap, "summary", i.Summary) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2EventDetails. +func (i *InMageAzureV2EventDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "category": + err = unpopulate(val, "Category", &i.Category) + delete(rawMsg, key) + case "component": + err = unpopulate(val, "Component", &i.Component) + delete(rawMsg, key) + case "correctiveAction": + err = unpopulate(val, "CorrectiveAction", &i.CorrectiveAction) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &i.Details) + delete(rawMsg, key) + case "eventType": + err = unpopulate(val, "EventType", &i.EventType) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "siteName": + err = unpopulate(val, "SiteName", &i.SiteName) + delete(rawMsg, key) + case "summary": + err = unpopulate(val, "Summary", &i.Summary) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2ManagedDiskDetails. +func (i InMageAzureV2ManagedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) + populate(objectMap, "diskId", i.DiskID) + populate(objectMap, "replicaDiskType", i.ReplicaDiskType) + populate(objectMap, "seedManagedDiskId", i.SeedManagedDiskID) + populate(objectMap, "targetDiskName", i.TargetDiskName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2ManagedDiskDetails. +func (i *InMageAzureV2ManagedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &i.DiskID) + delete(rawMsg, key) + case "replicaDiskType": + err = unpopulate(val, "ReplicaDiskType", &i.ReplicaDiskType) + delete(rawMsg, key) + case "seedManagedDiskId": + err = unpopulate(val, "SeedManagedDiskID", &i.SeedManagedDiskID) + delete(rawMsg, key) + case "targetDiskName": + err = unpopulate(val, "TargetDiskName", &i.TargetDiskName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2PolicyDetails. +func (i InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) + populate(objectMap, "recoveryPointHistory", i.RecoveryPointHistory) + populate(objectMap, "recoveryPointThresholdInMinutes", i.RecoveryPointThresholdInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2PolicyDetails. +func (i *InMageAzureV2PolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "multiVmSyncStatus": + err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) + delete(rawMsg, key) + case "recoveryPointHistory": + err = unpopulate(val, "RecoveryPointHistory", &i.RecoveryPointHistory) + delete(rawMsg, key) + case "recoveryPointThresholdInMinutes": + err = unpopulate(val, "RecoveryPointThresholdInMinutes", &i.RecoveryPointThresholdInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2PolicyInput. +func (i InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) + populate(objectMap, "recoveryPointHistory", i.RecoveryPointHistory) + populate(objectMap, "recoveryPointThresholdInMinutes", i.RecoveryPointThresholdInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2PolicyInput. +func (i *InMageAzureV2PolicyInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "multiVmSyncStatus": + err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) + delete(rawMsg, key) + case "recoveryPointHistory": + err = unpopulate(val, "RecoveryPointHistory", &i.RecoveryPointHistory) + delete(rawMsg, key) + case "recoveryPointThresholdInMinutes": + err = unpopulate(val, "RecoveryPointThresholdInMinutes", &i.RecoveryPointThresholdInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2ProtectedDiskDetails. +func (i InMageAzureV2ProtectedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskCapacityInBytes", i.DiskCapacityInBytes) + populate(objectMap, "diskId", i.DiskID) + populate(objectMap, "diskName", i.DiskName) + populate(objectMap, "diskResized", i.DiskResized) + populate(objectMap, "fileSystemCapacityInBytes", i.FileSystemCapacityInBytes) + populate(objectMap, "healthErrorCode", i.HealthErrorCode) + populateDateTimeRFC3339(objectMap, "lastRpoCalculatedTime", i.LastRpoCalculatedTime) + populate(objectMap, "progressHealth", i.ProgressHealth) + populate(objectMap, "progressStatus", i.ProgressStatus) + populate(objectMap, "protectionStage", i.ProtectionStage) + populate(objectMap, "psDataInMegaBytes", i.PsDataInMegaBytes) + populate(objectMap, "resyncDurationInSeconds", i.ResyncDurationInSeconds) + populate(objectMap, "resyncLast15MinutesTransferredBytes", i.ResyncLast15MinutesTransferredBytes) + populateDateTimeRFC3339(objectMap, "resyncLastDataTransferTimeUTC", i.ResyncLastDataTransferTimeUTC) + populate(objectMap, "resyncProcessedBytes", i.ResyncProcessedBytes) + populate(objectMap, "resyncProgressPercentage", i.ResyncProgressPercentage) + populate(objectMap, "resyncRequired", i.ResyncRequired) + populateDateTimeRFC3339(objectMap, "resyncStartTime", i.ResyncStartTime) + populate(objectMap, "resyncTotalTransferredBytes", i.ResyncTotalTransferredBytes) + populate(objectMap, "rpoInSeconds", i.RpoInSeconds) + populate(objectMap, "secondsToTakeSwitchProvider", i.SecondsToTakeSwitchProvider) + populate(objectMap, "sourceDataInMegaBytes", i.SourceDataInMegaBytes) + populate(objectMap, "targetDataInMegaBytes", i.TargetDataInMegaBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2ProtectedDiskDetails. +func (i *InMageAzureV2ProtectedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskCapacityInBytes": + err = unpopulate(val, "DiskCapacityInBytes", &i.DiskCapacityInBytes) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &i.DiskID) + delete(rawMsg, key) + case "diskName": + err = unpopulate(val, "DiskName", &i.DiskName) + delete(rawMsg, key) + case "diskResized": + err = unpopulate(val, "DiskResized", &i.DiskResized) + delete(rawMsg, key) + case "fileSystemCapacityInBytes": + err = unpopulate(val, "FileSystemCapacityInBytes", &i.FileSystemCapacityInBytes) + delete(rawMsg, key) + case "healthErrorCode": + err = unpopulate(val, "HealthErrorCode", &i.HealthErrorCode) + delete(rawMsg, key) + case "lastRpoCalculatedTime": + err = unpopulateDateTimeRFC3339(val, "LastRpoCalculatedTime", &i.LastRpoCalculatedTime) + delete(rawMsg, key) + case "progressHealth": + err = unpopulate(val, "ProgressHealth", &i.ProgressHealth) + delete(rawMsg, key) + case "progressStatus": + err = unpopulate(val, "ProgressStatus", &i.ProgressStatus) + delete(rawMsg, key) + case "protectionStage": + err = unpopulate(val, "ProtectionStage", &i.ProtectionStage) + delete(rawMsg, key) + case "psDataInMegaBytes": + err = unpopulate(val, "PsDataInMegaBytes", &i.PsDataInMegaBytes) + delete(rawMsg, key) + case "resyncDurationInSeconds": + err = unpopulate(val, "ResyncDurationInSeconds", &i.ResyncDurationInSeconds) + delete(rawMsg, key) + case "resyncLast15MinutesTransferredBytes": + err = unpopulate(val, "ResyncLast15MinutesTransferredBytes", &i.ResyncLast15MinutesTransferredBytes) + delete(rawMsg, key) + case "resyncLastDataTransferTimeUTC": + err = unpopulateDateTimeRFC3339(val, "ResyncLastDataTransferTimeUTC", &i.ResyncLastDataTransferTimeUTC) + delete(rawMsg, key) + case "resyncProcessedBytes": + err = unpopulate(val, "ResyncProcessedBytes", &i.ResyncProcessedBytes) + delete(rawMsg, key) + case "resyncProgressPercentage": + err = unpopulate(val, "ResyncProgressPercentage", &i.ResyncProgressPercentage) + delete(rawMsg, key) + case "resyncRequired": + err = unpopulate(val, "ResyncRequired", &i.ResyncRequired) + delete(rawMsg, key) + case "resyncStartTime": + err = unpopulateDateTimeRFC3339(val, "ResyncStartTime", &i.ResyncStartTime) + delete(rawMsg, key) + case "resyncTotalTransferredBytes": + err = unpopulate(val, "ResyncTotalTransferredBytes", &i.ResyncTotalTransferredBytes) + delete(rawMsg, key) + case "rpoInSeconds": + err = unpopulate(val, "RpoInSeconds", &i.RpoInSeconds) + delete(rawMsg, key) + case "secondsToTakeSwitchProvider": + err = unpopulate(val, "SecondsToTakeSwitchProvider", &i.SecondsToTakeSwitchProvider) + delete(rawMsg, key) + case "sourceDataInMegaBytes": + err = unpopulate(val, "SourceDataInMegaBytes", &i.SourceDataInMegaBytes) + delete(rawMsg, key) + case "targetDataInMegaBytes": + err = unpopulate(val, "TargetDataInMegaBytes", &i.TargetDataInMegaBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2RecoveryPointDetails. +func (i InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "isMultiVmSyncPoint", i.IsMultiVMSyncPoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2RecoveryPointDetails. +func (i *InMageAzureV2RecoveryPointDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "isMultiVmSyncPoint": + err = unpopulate(val, "IsMultiVMSyncPoint", &i.IsMultiVMSyncPoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2ReplicationDetails. +func (i InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "agentExpiryDate", i.AgentExpiryDate) + populate(objectMap, "agentVersion", i.AgentVersion) + populate(objectMap, "allAvailableOSUpgradeConfigurations", i.AllAvailableOSUpgradeConfigurations) + populate(objectMap, "azureVMDiskDetails", i.AzureVMDiskDetails) + populate(objectMap, "azureVmGeneration", i.AzureVMGeneration) + populate(objectMap, "compressedDataRateInMB", i.CompressedDataRateInMB) + populate(objectMap, "datastores", i.Datastores) + populate(objectMap, "discoveryType", i.DiscoveryType) + populate(objectMap, "diskResized", i.DiskResized) + populate(objectMap, "enableRdpOnTargetOption", i.EnableRdpOnTargetOption) + populate(objectMap, "firmwareType", i.FirmwareType) + populate(objectMap, "ipAddress", i.IPAddress) + populate(objectMap, "infrastructureVmId", i.InfrastructureVMID) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "isAdditionalStatsAvailable", i.IsAdditionalStatsAvailable) + populate(objectMap, "isAgentUpdateRequired", i.IsAgentUpdateRequired) + populate(objectMap, "isRebootAfterUpdateRequired", i.IsRebootAfterUpdateRequired) + populateDateTimeRFC3339(objectMap, "lastHeartbeat", i.LastHeartbeat) + populateDateTimeRFC3339(objectMap, "lastRecoveryPointReceived", i.LastRecoveryPointReceived) + populateDateTimeRFC3339(objectMap, "lastRpoCalculatedTime", i.LastRpoCalculatedTime) + populateDateTimeRFC3339(objectMap, "lastUpdateReceivedTime", i.LastUpdateReceivedTime) + populate(objectMap, "licenseType", i.LicenseType) + populate(objectMap, "masterTargetId", i.MasterTargetID) + populate(objectMap, "multiVmGroupId", i.MultiVMGroupID) + populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) + populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) + populate(objectMap, "osDiskId", i.OSDiskID) + populate(objectMap, "osName", i.OSName) + populate(objectMap, "osType", i.OSType) + populate(objectMap, "osVersion", i.OSVersion) + populate(objectMap, "processServerId", i.ProcessServerID) + populate(objectMap, "processServerName", i.ProcessServerName) + populate(objectMap, "protectedDisks", i.ProtectedDisks) + populate(objectMap, "protectedManagedDisks", i.ProtectedManagedDisks) + populate(objectMap, "protectionStage", i.ProtectionStage) + populate(objectMap, "recoveryAvailabilitySetId", i.RecoveryAvailabilitySetID) + populate(objectMap, "recoveryAzureLogStorageAccountId", i.RecoveryAzureLogStorageAccountID) + populate(objectMap, "recoveryAzureResourceGroupId", i.RecoveryAzureResourceGroupID) + populate(objectMap, "recoveryAzureStorageAccount", i.RecoveryAzureStorageAccount) + populate(objectMap, "recoveryAzureVMName", i.RecoveryAzureVMName) + populate(objectMap, "recoveryAzureVMSize", i.RecoveryAzureVMSize) + populate(objectMap, "replicaId", i.ReplicaID) + populate(objectMap, "resyncProgressPercentage", i.ResyncProgressPercentage) + populate(objectMap, "rpoInSeconds", i.RpoInSeconds) + populate(objectMap, "sqlServerLicenseType", i.SQLServerLicenseType) + populate(objectMap, "seedManagedDiskTags", i.SeedManagedDiskTags) + populate(objectMap, "selectedRecoveryAzureNetworkId", i.SelectedRecoveryAzureNetworkID) + populate(objectMap, "selectedSourceNicId", i.SelectedSourceNicID) + populate(objectMap, "selectedTfoAzureNetworkId", i.SelectedTfoAzureNetworkID) + populate(objectMap, "sourceVmCpuCount", i.SourceVMCPUCount) + populate(objectMap, "sourceVmRamSizeInMB", i.SourceVMRAMSizeInMB) + populate(objectMap, "supportedOSVersions", i.SupportedOSVersions) + populate(objectMap, "switchProviderBlockingErrorDetails", i.SwitchProviderBlockingErrorDetails) + populate(objectMap, "switchProviderDetails", i.SwitchProviderDetails) + populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) + populate(objectMap, "targetManagedDiskTags", i.TargetManagedDiskTags) + populate(objectMap, "targetNicTags", i.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) + populate(objectMap, "targetVmId", i.TargetVMID) + populate(objectMap, "targetVmTags", i.TargetVMTags) + populate(objectMap, "totalDataTransferred", i.TotalDataTransferred) + populate(objectMap, "totalProgressHealth", i.TotalProgressHealth) + populate(objectMap, "uncompressedDataRateInMB", i.UncompressedDataRateInMB) + populate(objectMap, "useManagedDisks", i.UseManagedDisks) + populate(objectMap, "vCenterInfrastructureId", i.VCenterInfrastructureID) + populate(objectMap, "vmId", i.VMID) + populate(objectMap, "vmNics", i.VMNics) + populate(objectMap, "vmProtectionState", i.VMProtectionState) + populate(objectMap, "vmProtectionStateDescription", i.VMProtectionStateDescription) + populate(objectMap, "validationErrors", i.ValidationErrors) + populate(objectMap, "vhdName", i.VhdName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2ReplicationDetails. +func (i *InMageAzureV2ReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentExpiryDate": + err = unpopulateDateTimeRFC3339(val, "AgentExpiryDate", &i.AgentExpiryDate) + delete(rawMsg, key) + case "agentVersion": + err = unpopulate(val, "AgentVersion", &i.AgentVersion) + delete(rawMsg, key) + case "allAvailableOSUpgradeConfigurations": + err = unpopulate(val, "AllAvailableOSUpgradeConfigurations", &i.AllAvailableOSUpgradeConfigurations) + delete(rawMsg, key) + case "azureVMDiskDetails": + err = unpopulate(val, "AzureVMDiskDetails", &i.AzureVMDiskDetails) + delete(rawMsg, key) + case "azureVmGeneration": + err = unpopulate(val, "AzureVMGeneration", &i.AzureVMGeneration) + delete(rawMsg, key) + case "compressedDataRateInMB": + err = unpopulate(val, "CompressedDataRateInMB", &i.CompressedDataRateInMB) + delete(rawMsg, key) + case "datastores": + err = unpopulate(val, "Datastores", &i.Datastores) + delete(rawMsg, key) + case "discoveryType": + err = unpopulate(val, "DiscoveryType", &i.DiscoveryType) + delete(rawMsg, key) + case "diskResized": + err = unpopulate(val, "DiskResized", &i.DiskResized) + delete(rawMsg, key) + case "enableRdpOnTargetOption": + err = unpopulate(val, "EnableRdpOnTargetOption", &i.EnableRdpOnTargetOption) + delete(rawMsg, key) + case "firmwareType": + err = unpopulate(val, "FirmwareType", &i.FirmwareType) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &i.IPAddress) + delete(rawMsg, key) + case "infrastructureVmId": + err = unpopulate(val, "InfrastructureVMID", &i.InfrastructureVMID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "isAdditionalStatsAvailable": + err = unpopulate(val, "IsAdditionalStatsAvailable", &i.IsAdditionalStatsAvailable) + delete(rawMsg, key) + case "isAgentUpdateRequired": + err = unpopulate(val, "IsAgentUpdateRequired", &i.IsAgentUpdateRequired) + delete(rawMsg, key) + case "isRebootAfterUpdateRequired": + err = unpopulate(val, "IsRebootAfterUpdateRequired", &i.IsRebootAfterUpdateRequired) + delete(rawMsg, key) + case "lastHeartbeat": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeat", &i.LastHeartbeat) + delete(rawMsg, key) + case "lastRecoveryPointReceived": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPointReceived", &i.LastRecoveryPointReceived) + delete(rawMsg, key) + case "lastRpoCalculatedTime": + err = unpopulateDateTimeRFC3339(val, "LastRpoCalculatedTime", &i.LastRpoCalculatedTime) + delete(rawMsg, key) + case "lastUpdateReceivedTime": + err = unpopulateDateTimeRFC3339(val, "LastUpdateReceivedTime", &i.LastUpdateReceivedTime) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &i.LicenseType) + delete(rawMsg, key) + case "masterTargetId": + err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) + delete(rawMsg, key) + case "multiVmGroupId": + err = unpopulate(val, "MultiVMGroupID", &i.MultiVMGroupID) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) + delete(rawMsg, key) + case "multiVmSyncStatus": + err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) + delete(rawMsg, key) + case "osDiskId": + err = unpopulate(val, "OSDiskID", &i.OSDiskID) + delete(rawMsg, key) + case "osName": + err = unpopulate(val, "OSName", &i.OSName) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &i.OSType) + delete(rawMsg, key) + case "osVersion": + err = unpopulate(val, "OSVersion", &i.OSVersion) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) + delete(rawMsg, key) + case "processServerName": + err = unpopulate(val, "ProcessServerName", &i.ProcessServerName) + delete(rawMsg, key) + case "protectedDisks": + err = unpopulate(val, "ProtectedDisks", &i.ProtectedDisks) + delete(rawMsg, key) + case "protectedManagedDisks": + err = unpopulate(val, "ProtectedManagedDisks", &i.ProtectedManagedDisks) + delete(rawMsg, key) + case "protectionStage": + err = unpopulate(val, "ProtectionStage", &i.ProtectionStage) + delete(rawMsg, key) + case "recoveryAvailabilitySetId": + err = unpopulate(val, "RecoveryAvailabilitySetID", &i.RecoveryAvailabilitySetID) + delete(rawMsg, key) + case "recoveryAzureLogStorageAccountId": + err = unpopulate(val, "RecoveryAzureLogStorageAccountID", &i.RecoveryAzureLogStorageAccountID) + delete(rawMsg, key) + case "recoveryAzureResourceGroupId": + err = unpopulate(val, "RecoveryAzureResourceGroupID", &i.RecoveryAzureResourceGroupID) + delete(rawMsg, key) + case "recoveryAzureStorageAccount": + err = unpopulate(val, "RecoveryAzureStorageAccount", &i.RecoveryAzureStorageAccount) + delete(rawMsg, key) + case "recoveryAzureVMName": + err = unpopulate(val, "RecoveryAzureVMName", &i.RecoveryAzureVMName) + delete(rawMsg, key) + case "recoveryAzureVMSize": + err = unpopulate(val, "RecoveryAzureVMSize", &i.RecoveryAzureVMSize) + delete(rawMsg, key) + case "replicaId": + err = unpopulate(val, "ReplicaID", &i.ReplicaID) + delete(rawMsg, key) + case "resyncProgressPercentage": + err = unpopulate(val, "ResyncProgressPercentage", &i.ResyncProgressPercentage) + delete(rawMsg, key) + case "rpoInSeconds": + err = unpopulate(val, "RpoInSeconds", &i.RpoInSeconds) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &i.SQLServerLicenseType) + delete(rawMsg, key) + case "seedManagedDiskTags": + err = unpopulate(val, "SeedManagedDiskTags", &i.SeedManagedDiskTags) + delete(rawMsg, key) + case "selectedRecoveryAzureNetworkId": + err = unpopulate(val, "SelectedRecoveryAzureNetworkID", &i.SelectedRecoveryAzureNetworkID) + delete(rawMsg, key) + case "selectedSourceNicId": + err = unpopulate(val, "SelectedSourceNicID", &i.SelectedSourceNicID) + delete(rawMsg, key) + case "selectedTfoAzureNetworkId": + err = unpopulate(val, "SelectedTfoAzureNetworkID", &i.SelectedTfoAzureNetworkID) + delete(rawMsg, key) + case "sourceVmCpuCount": + err = unpopulate(val, "SourceVMCPUCount", &i.SourceVMCPUCount) + delete(rawMsg, key) + case "sourceVmRamSizeInMB": + err = unpopulate(val, "SourceVMRAMSizeInMB", &i.SourceVMRAMSizeInMB) + delete(rawMsg, key) + case "supportedOSVersions": + err = unpopulate(val, "SupportedOSVersions", &i.SupportedOSVersions) + delete(rawMsg, key) + case "switchProviderBlockingErrorDetails": + err = unpopulate(val, "SwitchProviderBlockingErrorDetails", &i.SwitchProviderBlockingErrorDetails) + delete(rawMsg, key) + case "switchProviderDetails": + err = unpopulate(val, "SwitchProviderDetails", &i.SwitchProviderDetails) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetManagedDiskTags": + err = unpopulate(val, "TargetManagedDiskTags", &i.TargetManagedDiskTags) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &i.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetVmId": + err = unpopulate(val, "TargetVMID", &i.TargetVMID) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &i.TargetVMTags) + delete(rawMsg, key) + case "totalDataTransferred": + err = unpopulate(val, "TotalDataTransferred", &i.TotalDataTransferred) + delete(rawMsg, key) + case "totalProgressHealth": + err = unpopulate(val, "TotalProgressHealth", &i.TotalProgressHealth) + delete(rawMsg, key) + case "uncompressedDataRateInMB": + err = unpopulate(val, "UncompressedDataRateInMB", &i.UncompressedDataRateInMB) + delete(rawMsg, key) + case "useManagedDisks": + err = unpopulate(val, "UseManagedDisks", &i.UseManagedDisks) + delete(rawMsg, key) + case "vCenterInfrastructureId": + err = unpopulate(val, "VCenterInfrastructureID", &i.VCenterInfrastructureID) + delete(rawMsg, key) + case "vmId": + err = unpopulate(val, "VMID", &i.VMID) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &i.VMNics) + delete(rawMsg, key) + case "vmProtectionState": + err = unpopulate(val, "VMProtectionState", &i.VMProtectionState) + delete(rawMsg, key) + case "vmProtectionStateDescription": + err = unpopulate(val, "VMProtectionStateDescription", &i.VMProtectionStateDescription) + delete(rawMsg, key) + case "validationErrors": + err = unpopulate(val, "ValidationErrors", &i.ValidationErrors) + delete(rawMsg, key) + case "vhdName": + err = unpopulate(val, "VhdName", &i.VhdName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2ReprotectInput. +func (i InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disksToInclude", i.DisksToInclude) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) + populate(objectMap, "masterTargetId", i.MasterTargetID) + populate(objectMap, "policyId", i.PolicyID) + populate(objectMap, "processServerId", i.ProcessServerID) + populate(objectMap, "runAsAccountId", i.RunAsAccountID) + populate(objectMap, "storageAccountId", i.StorageAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2ReprotectInput. +func (i *InMageAzureV2ReprotectInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disksToInclude": + err = unpopulate(val, "DisksToInclude", &i.DisksToInclude) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) + delete(rawMsg, key) + case "masterTargetId": + err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &i.PolicyID) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &i.StorageAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2SwitchProviderBlockingErrorDetails. +func (i InMageAzureV2SwitchProviderBlockingErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", i.ErrorCode) + populate(objectMap, "errorMessage", i.ErrorMessage) + populate(objectMap, "errorMessageParameters", i.ErrorMessageParameters) + populate(objectMap, "errorTags", i.ErrorTags) + populate(objectMap, "possibleCauses", i.PossibleCauses) + populate(objectMap, "recommendedAction", i.RecommendedAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2SwitchProviderBlockingErrorDetails. +func (i *InMageAzureV2SwitchProviderBlockingErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &i.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) + delete(rawMsg, key) + case "errorMessageParameters": + err = unpopulate(val, "ErrorMessageParameters", &i.ErrorMessageParameters) + delete(rawMsg, key) + case "errorTags": + err = unpopulate(val, "ErrorTags", &i.ErrorTags) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2SwitchProviderDetails. +func (i InMageAzureV2SwitchProviderDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetApplianceId", i.TargetApplianceID) + populate(objectMap, "targetFabricId", i.TargetFabricID) + populate(objectMap, "targetResourceId", i.TargetResourceID) + populate(objectMap, "targetVaultId", i.TargetVaultID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2SwitchProviderDetails. +func (i *InMageAzureV2SwitchProviderDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetApplianceId": + err = unpopulate(val, "TargetApplianceID", &i.TargetApplianceID) + delete(rawMsg, key) + case "targetFabricId": + err = unpopulate(val, "TargetFabricID", &i.TargetFabricID) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &i.TargetResourceID) + delete(rawMsg, key) + case "targetVaultId": + err = unpopulate(val, "TargetVaultID", &i.TargetVaultID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2SwitchProviderInput. +func (i InMageAzureV2SwitchProviderInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "targetApplianceID", i.TargetApplianceID) + populate(objectMap, "targetFabricID", i.TargetFabricID) + populate(objectMap, "targetVaultID", i.TargetVaultID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2SwitchProviderInput. +func (i *InMageAzureV2SwitchProviderInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "targetApplianceID": + err = unpopulate(val, "TargetApplianceID", &i.TargetApplianceID) + delete(rawMsg, key) + case "targetFabricID": + err = unpopulate(val, "TargetFabricID", &i.TargetFabricID) + delete(rawMsg, key) + case "targetVaultID": + err = unpopulate(val, "TargetVaultID", &i.TargetVaultID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2TestFailoverInput. +func (i InMageAzureV2TestFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "osUpgradeVersion", i.OSUpgradeVersion) + populate(objectMap, "recoveryPointId", i.RecoveryPointID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2TestFailoverInput. +func (i *InMageAzureV2TestFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "osUpgradeVersion": + err = unpopulate(val, "OSUpgradeVersion", &i.OSUpgradeVersion) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2UnplannedFailoverInput. +func (i InMageAzureV2UnplannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "osUpgradeVersion", i.OSUpgradeVersion) + populate(objectMap, "recoveryPointId", i.RecoveryPointID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2UnplannedFailoverInput. +func (i *InMageAzureV2UnplannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "osUpgradeVersion": + err = unpopulate(val, "OSUpgradeVersion", &i.OSUpgradeVersion) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageAzureV2UpdateReplicationProtectedItemInput. +func (i InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "recoveryAzureV1ResourceGroupId", i.RecoveryAzureV1ResourceGroupID) + populate(objectMap, "recoveryAzureV2ResourceGroupId", i.RecoveryAzureV2ResourceGroupID) + populate(objectMap, "sqlServerLicenseType", i.SQLServerLicenseType) + populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) + populate(objectMap, "targetManagedDiskTags", i.TargetManagedDiskTags) + populate(objectMap, "targetNicTags", i.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) + populate(objectMap, "targetVmTags", i.TargetVMTags) + populate(objectMap, "useManagedDisks", i.UseManagedDisks) + populate(objectMap, "vmDisks", i.VMDisks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageAzureV2UpdateReplicationProtectedItemInput. +func (i *InMageAzureV2UpdateReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "recoveryAzureV1ResourceGroupId": + err = unpopulate(val, "RecoveryAzureV1ResourceGroupID", &i.RecoveryAzureV1ResourceGroupID) + delete(rawMsg, key) + case "recoveryAzureV2ResourceGroupId": + err = unpopulate(val, "RecoveryAzureV2ResourceGroupID", &i.RecoveryAzureV2ResourceGroupID) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &i.SQLServerLicenseType) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetManagedDiskTags": + err = unpopulate(val, "TargetManagedDiskTags", &i.TargetManagedDiskTags) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &i.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &i.TargetVMTags) + delete(rawMsg, key) + case "useManagedDisks": + err = unpopulate(val, "UseManagedDisks", &i.UseManagedDisks) + delete(rawMsg, key) + case "vmDisks": + err = unpopulate(val, "VMDisks", &i.VMDisks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageBasePolicyDetails. +func (i InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) + objectMap["instanceType"] = "InMageBasePolicyDetails" + populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) + populate(objectMap, "recoveryPointHistory", i.RecoveryPointHistory) + populate(objectMap, "recoveryPointThresholdInMinutes", i.RecoveryPointThresholdInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageBasePolicyDetails. +func (i *InMageBasePolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "multiVmSyncStatus": + err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) + delete(rawMsg, key) + case "recoveryPointHistory": + err = unpopulate(val, "RecoveryPointHistory", &i.RecoveryPointHistory) + delete(rawMsg, key) + case "recoveryPointThresholdInMinutes": + err = unpopulate(val, "RecoveryPointThresholdInMinutes", &i.RecoveryPointThresholdInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageDisableProtectionProviderSpecificInput. +func (i InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMage" + populate(objectMap, "replicaVmDeletionStatus", i.ReplicaVMDeletionStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageDisableProtectionProviderSpecificInput. +func (i *InMageDisableProtectionProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "replicaVmDeletionStatus": + err = unpopulate(val, "ReplicaVMDeletionStatus", &i.ReplicaVMDeletionStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageDiskDetails. +func (i InMageDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskConfiguration", i.DiskConfiguration) + populate(objectMap, "diskId", i.DiskID) + populate(objectMap, "diskName", i.DiskName) + populate(objectMap, "diskSizeInMB", i.DiskSizeInMB) + populate(objectMap, "diskType", i.DiskType) + populate(objectMap, "volumeList", i.VolumeList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageDiskDetails. +func (i *InMageDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskConfiguration": + err = unpopulate(val, "DiskConfiguration", &i.DiskConfiguration) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &i.DiskID) + delete(rawMsg, key) + case "diskName": + err = unpopulate(val, "DiskName", &i.DiskName) + delete(rawMsg, key) + case "diskSizeInMB": + err = unpopulate(val, "DiskSizeInMB", &i.DiskSizeInMB) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &i.DiskType) + delete(rawMsg, key) + case "volumeList": + err = unpopulate(val, "VolumeList", &i.VolumeList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageDiskExclusionInput. +func (i InMageDiskExclusionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskSignatureOptions", i.DiskSignatureOptions) + populate(objectMap, "volumeOptions", i.VolumeOptions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageDiskExclusionInput. +func (i *InMageDiskExclusionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskSignatureOptions": + err = unpopulate(val, "DiskSignatureOptions", &i.DiskSignatureOptions) + delete(rawMsg, key) + case "volumeOptions": + err = unpopulate(val, "VolumeOptions", &i.VolumeOptions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageDiskSignatureExclusionOptions. +func (i InMageDiskSignatureExclusionOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskSignature", i.DiskSignature) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageDiskSignatureExclusionOptions. +func (i *InMageDiskSignatureExclusionOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskSignature": + err = unpopulate(val, "DiskSignature", &i.DiskSignature) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageEnableProtectionInput. +func (i InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datastoreName", i.DatastoreName) + populate(objectMap, "diskExclusionInput", i.DiskExclusionInput) + populate(objectMap, "disksToInclude", i.DisksToInclude) + objectMap["instanceType"] = "InMage" + populate(objectMap, "masterTargetId", i.MasterTargetID) + populate(objectMap, "multiVmGroupId", i.MultiVMGroupID) + populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) + populate(objectMap, "processServerId", i.ProcessServerID) + populate(objectMap, "retentionDrive", i.RetentionDrive) + populate(objectMap, "runAsAccountId", i.RunAsAccountID) + populate(objectMap, "vmFriendlyName", i.VMFriendlyName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageEnableProtectionInput. +func (i *InMageEnableProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datastoreName": + err = unpopulate(val, "DatastoreName", &i.DatastoreName) + delete(rawMsg, key) + case "diskExclusionInput": + err = unpopulate(val, "DiskExclusionInput", &i.DiskExclusionInput) + delete(rawMsg, key) + case "disksToInclude": + err = unpopulate(val, "DisksToInclude", &i.DisksToInclude) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "masterTargetId": + err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) + delete(rawMsg, key) + case "multiVmGroupId": + err = unpopulate(val, "MultiVMGroupID", &i.MultiVMGroupID) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) + delete(rawMsg, key) + case "retentionDrive": + err = unpopulate(val, "RetentionDrive", &i.RetentionDrive) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) + delete(rawMsg, key) + case "vmFriendlyName": + err = unpopulate(val, "VMFriendlyName", &i.VMFriendlyName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageFabricSwitchProviderBlockingErrorDetails. +func (i InMageFabricSwitchProviderBlockingErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", i.ErrorCode) + populate(objectMap, "errorMessage", i.ErrorMessage) + populate(objectMap, "errorMessageParameters", i.ErrorMessageParameters) + populate(objectMap, "errorTags", i.ErrorTags) + populate(objectMap, "possibleCauses", i.PossibleCauses) + populate(objectMap, "recommendedAction", i.RecommendedAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageFabricSwitchProviderBlockingErrorDetails. +func (i *InMageFabricSwitchProviderBlockingErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &i.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) + delete(rawMsg, key) + case "errorMessageParameters": + err = unpopulate(val, "ErrorMessageParameters", &i.ErrorMessageParameters) + delete(rawMsg, key) + case "errorTags": + err = unpopulate(val, "ErrorTags", &i.ErrorTags) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMagePolicyDetails. +func (i InMagePolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) + objectMap["instanceType"] = "InMage" + populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) + populate(objectMap, "recoveryPointHistory", i.RecoveryPointHistory) + populate(objectMap, "recoveryPointThresholdInMinutes", i.RecoveryPointThresholdInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMagePolicyDetails. +func (i *InMagePolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "multiVmSyncStatus": + err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) + delete(rawMsg, key) + case "recoveryPointHistory": + err = unpopulate(val, "RecoveryPointHistory", &i.RecoveryPointHistory) + delete(rawMsg, key) + case "recoveryPointThresholdInMinutes": + err = unpopulate(val, "RecoveryPointThresholdInMinutes", &i.RecoveryPointThresholdInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMagePolicyInput. +func (i InMagePolicyInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) + objectMap["instanceType"] = "InMage" + populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) + populate(objectMap, "recoveryPointHistory", i.RecoveryPointHistory) + populate(objectMap, "recoveryPointThresholdInMinutes", i.RecoveryPointThresholdInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMagePolicyInput. +func (i *InMagePolicyInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "multiVmSyncStatus": + err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) + delete(rawMsg, key) + case "recoveryPointHistory": + err = unpopulate(val, "RecoveryPointHistory", &i.RecoveryPointHistory) + delete(rawMsg, key) + case "recoveryPointThresholdInMinutes": + err = unpopulate(val, "RecoveryPointThresholdInMinutes", &i.RecoveryPointThresholdInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageProtectedDiskDetails. +func (i InMageProtectedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskCapacityInBytes", i.DiskCapacityInBytes) + populate(objectMap, "diskId", i.DiskID) + populate(objectMap, "diskName", i.DiskName) + populate(objectMap, "diskResized", i.DiskResized) + populate(objectMap, "fileSystemCapacityInBytes", i.FileSystemCapacityInBytes) + populate(objectMap, "healthErrorCode", i.HealthErrorCode) + populateDateTimeRFC3339(objectMap, "lastRpoCalculatedTime", i.LastRpoCalculatedTime) + populate(objectMap, "progressHealth", i.ProgressHealth) + populate(objectMap, "progressStatus", i.ProgressStatus) + populate(objectMap, "protectionStage", i.ProtectionStage) + populate(objectMap, "psDataInMB", i.PsDataInMB) + populate(objectMap, "resyncDurationInSeconds", i.ResyncDurationInSeconds) + populate(objectMap, "resyncLast15MinutesTransferredBytes", i.ResyncLast15MinutesTransferredBytes) + populateDateTimeRFC3339(objectMap, "resyncLastDataTransferTimeUTC", i.ResyncLastDataTransferTimeUTC) + populate(objectMap, "resyncProcessedBytes", i.ResyncProcessedBytes) + populate(objectMap, "resyncProgressPercentage", i.ResyncProgressPercentage) + populate(objectMap, "resyncRequired", i.ResyncRequired) + populateDateTimeRFC3339(objectMap, "resyncStartTime", i.ResyncStartTime) + populate(objectMap, "resyncTotalTransferredBytes", i.ResyncTotalTransferredBytes) + populate(objectMap, "rpoInSeconds", i.RpoInSeconds) + populate(objectMap, "sourceDataInMB", i.SourceDataInMB) + populate(objectMap, "targetDataInMB", i.TargetDataInMB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageProtectedDiskDetails. +func (i *InMageProtectedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskCapacityInBytes": + err = unpopulate(val, "DiskCapacityInBytes", &i.DiskCapacityInBytes) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &i.DiskID) + delete(rawMsg, key) + case "diskName": + err = unpopulate(val, "DiskName", &i.DiskName) + delete(rawMsg, key) + case "diskResized": + err = unpopulate(val, "DiskResized", &i.DiskResized) + delete(rawMsg, key) + case "fileSystemCapacityInBytes": + err = unpopulate(val, "FileSystemCapacityInBytes", &i.FileSystemCapacityInBytes) + delete(rawMsg, key) + case "healthErrorCode": + err = unpopulate(val, "HealthErrorCode", &i.HealthErrorCode) + delete(rawMsg, key) + case "lastRpoCalculatedTime": + err = unpopulateDateTimeRFC3339(val, "LastRpoCalculatedTime", &i.LastRpoCalculatedTime) + delete(rawMsg, key) + case "progressHealth": + err = unpopulate(val, "ProgressHealth", &i.ProgressHealth) + delete(rawMsg, key) + case "progressStatus": + err = unpopulate(val, "ProgressStatus", &i.ProgressStatus) + delete(rawMsg, key) + case "protectionStage": + err = unpopulate(val, "ProtectionStage", &i.ProtectionStage) + delete(rawMsg, key) + case "psDataInMB": + err = unpopulate(val, "PsDataInMB", &i.PsDataInMB) + delete(rawMsg, key) + case "resyncDurationInSeconds": + err = unpopulate(val, "ResyncDurationInSeconds", &i.ResyncDurationInSeconds) + delete(rawMsg, key) + case "resyncLast15MinutesTransferredBytes": + err = unpopulate(val, "ResyncLast15MinutesTransferredBytes", &i.ResyncLast15MinutesTransferredBytes) + delete(rawMsg, key) + case "resyncLastDataTransferTimeUTC": + err = unpopulateDateTimeRFC3339(val, "ResyncLastDataTransferTimeUTC", &i.ResyncLastDataTransferTimeUTC) + delete(rawMsg, key) + case "resyncProcessedBytes": + err = unpopulate(val, "ResyncProcessedBytes", &i.ResyncProcessedBytes) + delete(rawMsg, key) + case "resyncProgressPercentage": + err = unpopulate(val, "ResyncProgressPercentage", &i.ResyncProgressPercentage) + delete(rawMsg, key) + case "resyncRequired": + err = unpopulate(val, "ResyncRequired", &i.ResyncRequired) + delete(rawMsg, key) + case "resyncStartTime": + err = unpopulateDateTimeRFC3339(val, "ResyncStartTime", &i.ResyncStartTime) + delete(rawMsg, key) + case "resyncTotalTransferredBytes": + err = unpopulate(val, "ResyncTotalTransferredBytes", &i.ResyncTotalTransferredBytes) + delete(rawMsg, key) + case "rpoInSeconds": + err = unpopulate(val, "RpoInSeconds", &i.RpoInSeconds) + delete(rawMsg, key) + case "sourceDataInMB": + err = unpopulate(val, "SourceDataInMB", &i.SourceDataInMB) + delete(rawMsg, key) + case "targetDataInMB": + err = unpopulate(val, "TargetDataInMB", &i.TargetDataInMB) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmAddDisksInput. +func (i InMageRcmAddDisksInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disks", i.Disks) + objectMap["instanceType"] = "InMageRcm" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmAddDisksInput. +func (i *InMageRcmAddDisksInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disks": + err = unpopulate(val, "Disks", &i.Disks) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmAgentUpgradeBlockingErrorDetails. +func (i InMageRcmAgentUpgradeBlockingErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", i.ErrorCode) + populate(objectMap, "errorMessage", i.ErrorMessage) + populate(objectMap, "errorMessageParameters", i.ErrorMessageParameters) + populate(objectMap, "errorTags", i.ErrorTags) + populate(objectMap, "possibleCauses", i.PossibleCauses) + populate(objectMap, "recommendedAction", i.RecommendedAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmAgentUpgradeBlockingErrorDetails. +func (i *InMageRcmAgentUpgradeBlockingErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &i.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) + delete(rawMsg, key) + case "errorMessageParameters": + err = unpopulate(val, "ErrorMessageParameters", &i.ErrorMessageParameters) + delete(rawMsg, key) + case "errorTags": + err = unpopulate(val, "ErrorTags", &i.ErrorTags) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmApplianceDetails. +func (i InMageRcmApplianceDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dra", i.Dra) + populate(objectMap, "fabricArmId", i.FabricArmID) + populate(objectMap, "id", i.ID) + populate(objectMap, "marsAgent", i.MarsAgent) + populate(objectMap, "name", i.Name) + populate(objectMap, "processServer", i.ProcessServer) + populate(objectMap, "pushInstaller", i.PushInstaller) + populate(objectMap, "rcmProxy", i.RcmProxy) + populate(objectMap, "replicationAgent", i.ReplicationAgent) + populate(objectMap, "reprotectAgent", i.ReprotectAgent) + populate(objectMap, "switchProviderBlockingErrorDetails", i.SwitchProviderBlockingErrorDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmApplianceDetails. +func (i *InMageRcmApplianceDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dra": + err = unpopulate(val, "Dra", &i.Dra) + delete(rawMsg, key) + case "fabricArmId": + err = unpopulate(val, "FabricArmID", &i.FabricArmID) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "marsAgent": + err = unpopulate(val, "MarsAgent", &i.MarsAgent) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "processServer": + err = unpopulate(val, "ProcessServer", &i.ProcessServer) + delete(rawMsg, key) + case "pushInstaller": + err = unpopulate(val, "PushInstaller", &i.PushInstaller) + delete(rawMsg, key) + case "rcmProxy": + err = unpopulate(val, "RcmProxy", &i.RcmProxy) + delete(rawMsg, key) + case "replicationAgent": + err = unpopulate(val, "ReplicationAgent", &i.ReplicationAgent) + delete(rawMsg, key) + case "reprotectAgent": + err = unpopulate(val, "ReprotectAgent", &i.ReprotectAgent) + delete(rawMsg, key) + case "switchProviderBlockingErrorDetails": + err = unpopulate(val, "SwitchProviderBlockingErrorDetails", &i.SwitchProviderBlockingErrorDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmApplianceSpecificDetails. +func (i InMageRcmApplianceSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appliances", i.Appliances) + objectMap["instanceType"] = "InMageRcm" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmApplianceSpecificDetails. +func (i *InMageRcmApplianceSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appliances": + err = unpopulate(val, "Appliances", &i.Appliances) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmApplyRecoveryPointInput. +func (i InMageRcmApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "recoveryPointId", i.RecoveryPointID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmApplyRecoveryPointInput. +func (i *InMageRcmApplyRecoveryPointInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmDiscoveredProtectedVMDetails. +func (i InMageRcmDiscoveredProtectedVMDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdTimestamp", i.CreatedTimestamp) + populate(objectMap, "datastores", i.Datastores) + populate(objectMap, "ipAddresses", i.IPAddresses) + populate(objectMap, "isDeleted", i.IsDeleted) + populateDateTimeRFC3339(objectMap, "lastDiscoveryTimeInUtc", i.LastDiscoveryTimeInUTC) + populate(objectMap, "osName", i.OSName) + populate(objectMap, "powerStatus", i.PowerStatus) + populateDateTimeRFC3339(objectMap, "updatedTimestamp", i.UpdatedTimestamp) + populate(objectMap, "vCenterFqdn", i.VCenterFqdn) + populate(objectMap, "vCenterId", i.VCenterID) + populate(objectMap, "vmFqdn", i.VMFqdn) + populate(objectMap, "vmwareToolsStatus", i.VmwareToolsStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmDiscoveredProtectedVMDetails. +func (i *InMageRcmDiscoveredProtectedVMDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdTimestamp": + err = unpopulateDateTimeRFC3339(val, "CreatedTimestamp", &i.CreatedTimestamp) + delete(rawMsg, key) + case "datastores": + err = unpopulate(val, "Datastores", &i.Datastores) + delete(rawMsg, key) + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &i.IPAddresses) + delete(rawMsg, key) + case "isDeleted": + err = unpopulate(val, "IsDeleted", &i.IsDeleted) + delete(rawMsg, key) + case "lastDiscoveryTimeInUtc": + err = unpopulateDateTimeRFC3339(val, "LastDiscoveryTimeInUTC", &i.LastDiscoveryTimeInUTC) + delete(rawMsg, key) + case "osName": + err = unpopulate(val, "OSName", &i.OSName) + delete(rawMsg, key) + case "powerStatus": + err = unpopulate(val, "PowerStatus", &i.PowerStatus) + delete(rawMsg, key) + case "updatedTimestamp": + err = unpopulateDateTimeRFC3339(val, "UpdatedTimestamp", &i.UpdatedTimestamp) + delete(rawMsg, key) + case "vCenterFqdn": + err = unpopulate(val, "VCenterFqdn", &i.VCenterFqdn) + delete(rawMsg, key) + case "vCenterId": + err = unpopulate(val, "VCenterID", &i.VCenterID) + delete(rawMsg, key) + case "vmFqdn": + err = unpopulate(val, "VMFqdn", &i.VMFqdn) + delete(rawMsg, key) + case "vmwareToolsStatus": + err = unpopulate(val, "VmwareToolsStatus", &i.VmwareToolsStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmDiskInput. +func (i InMageRcmDiskInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) + populate(objectMap, "diskId", i.DiskID) + populate(objectMap, "diskType", i.DiskType) + populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) + populate(objectMap, "sectorSizeInBytes", i.SectorSizeInBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmDiskInput. +func (i *InMageRcmDiskInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &i.DiskID) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &i.DiskType) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) + delete(rawMsg, key) + case "sectorSizeInBytes": + err = unpopulate(val, "SectorSizeInBytes", &i.SectorSizeInBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmDisksDefaultInput. +func (i InMageRcmDisksDefaultInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) + populate(objectMap, "diskType", i.DiskType) + populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) + populate(objectMap, "sectorSizeInBytes", i.SectorSizeInBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmDisksDefaultInput. +func (i *InMageRcmDisksDefaultInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &i.DiskType) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) + delete(rawMsg, key) + case "sectorSizeInBytes": + err = unpopulate(val, "SectorSizeInBytes", &i.SectorSizeInBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmEnableProtectionInput. +func (i InMageRcmEnableProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disksDefault", i.DisksDefault) + populate(objectMap, "disksToInclude", i.DisksToInclude) + populate(objectMap, "fabricDiscoveryMachineId", i.FabricDiscoveryMachineID) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "licenseType", i.LicenseType) + populate(objectMap, "linuxLicenseType", i.LinuxLicenseType) + populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) + populate(objectMap, "processServerId", i.ProcessServerID) + populate(objectMap, "runAsAccountId", i.RunAsAccountID) + populate(objectMap, "sqlServerLicenseType", i.SQLServerLicenseType) + populate(objectMap, "seedManagedDiskTags", i.SeedManagedDiskTags) + populate(objectMap, "targetAvailabilitySetId", i.TargetAvailabilitySetID) + populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) + populate(objectMap, "targetBootDiagnosticsStorageAccountId", i.TargetBootDiagnosticsStorageAccountID) + populate(objectMap, "targetManagedDiskTags", i.TargetManagedDiskTags) + populate(objectMap, "targetNetworkId", i.TargetNetworkID) + populate(objectMap, "targetNicTags", i.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) + populate(objectMap, "targetResourceGroupId", i.TargetResourceGroupID) + populate(objectMap, "targetSubnetName", i.TargetSubnetName) + populate(objectMap, "targetVmName", i.TargetVMName) + populate(objectMap, "targetVmSecurityProfile", i.TargetVMSecurityProfile) + populate(objectMap, "targetVmSize", i.TargetVMSize) + populate(objectMap, "targetVmTags", i.TargetVMTags) + populate(objectMap, "testNetworkId", i.TestNetworkID) + populate(objectMap, "testSubnetName", i.TestSubnetName) + populate(objectMap, "userSelectedOSName", i.UserSelectedOSName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmEnableProtectionInput. +func (i *InMageRcmEnableProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disksDefault": + err = unpopulate(val, "DisksDefault", &i.DisksDefault) + delete(rawMsg, key) + case "disksToInclude": + err = unpopulate(val, "DisksToInclude", &i.DisksToInclude) + delete(rawMsg, key) + case "fabricDiscoveryMachineId": + err = unpopulate(val, "FabricDiscoveryMachineID", &i.FabricDiscoveryMachineID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &i.LicenseType) + delete(rawMsg, key) + case "linuxLicenseType": + err = unpopulate(val, "LinuxLicenseType", &i.LinuxLicenseType) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &i.SQLServerLicenseType) + delete(rawMsg, key) + case "seedManagedDiskTags": + err = unpopulate(val, "SeedManagedDiskTags", &i.SeedManagedDiskTags) + delete(rawMsg, key) + case "targetAvailabilitySetId": + err = unpopulate(val, "TargetAvailabilitySetID", &i.TargetAvailabilitySetID) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetBootDiagnosticsStorageAccountId": + err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &i.TargetBootDiagnosticsStorageAccountID) + delete(rawMsg, key) + case "targetManagedDiskTags": + err = unpopulate(val, "TargetManagedDiskTags", &i.TargetManagedDiskTags) + delete(rawMsg, key) + case "targetNetworkId": + err = unpopulate(val, "TargetNetworkID", &i.TargetNetworkID) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &i.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetResourceGroupId": + err = unpopulate(val, "TargetResourceGroupID", &i.TargetResourceGroupID) + delete(rawMsg, key) + case "targetSubnetName": + err = unpopulate(val, "TargetSubnetName", &i.TargetSubnetName) + delete(rawMsg, key) + case "targetVmName": + err = unpopulate(val, "TargetVMName", &i.TargetVMName) + delete(rawMsg, key) + case "targetVmSecurityProfile": + err = unpopulate(val, "TargetVMSecurityProfile", &i.TargetVMSecurityProfile) + delete(rawMsg, key) + case "targetVmSize": + err = unpopulate(val, "TargetVMSize", &i.TargetVMSize) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &i.TargetVMTags) + delete(rawMsg, key) + case "testNetworkId": + err = unpopulate(val, "TestNetworkID", &i.TestNetworkID) + delete(rawMsg, key) + case "testSubnetName": + err = unpopulate(val, "TestSubnetName", &i.TestSubnetName) + delete(rawMsg, key) + case "userSelectedOSName": + err = unpopulate(val, "UserSelectedOSName", &i.UserSelectedOSName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmEventDetails. +func (i InMageRcmEventDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applianceName", i.ApplianceName) + populate(objectMap, "componentDisplayName", i.ComponentDisplayName) + populate(objectMap, "fabricName", i.FabricName) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "jobId", i.JobID) + populate(objectMap, "latestAgentVersion", i.LatestAgentVersion) + populate(objectMap, "protectedItemName", i.ProtectedItemName) + populate(objectMap, "serverType", i.ServerType) + populate(objectMap, "vmName", i.VMName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmEventDetails. +func (i *InMageRcmEventDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applianceName": + err = unpopulate(val, "ApplianceName", &i.ApplianceName) + delete(rawMsg, key) + case "componentDisplayName": + err = unpopulate(val, "ComponentDisplayName", &i.ComponentDisplayName) + delete(rawMsg, key) + case "fabricName": + err = unpopulate(val, "FabricName", &i.FabricName) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "jobId": + err = unpopulate(val, "JobID", &i.JobID) + delete(rawMsg, key) + case "latestAgentVersion": + err = unpopulate(val, "LatestAgentVersion", &i.LatestAgentVersion) + delete(rawMsg, key) + case "protectedItemName": + err = unpopulate(val, "ProtectedItemName", &i.ProtectedItemName) + delete(rawMsg, key) + case "serverType": + err = unpopulate(val, "ServerType", &i.ServerType) + delete(rawMsg, key) + case "vmName": + err = unpopulate(val, "VMName", &i.VMName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFabricCreationInput. +func (i InMageRcmFabricCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "physicalSiteId", i.PhysicalSiteID) + populate(objectMap, "sourceAgentIdentity", i.SourceAgentIdentity) + populate(objectMap, "vmwareSiteId", i.VmwareSiteID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFabricCreationInput. +func (i *InMageRcmFabricCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "physicalSiteId": + err = unpopulate(val, "PhysicalSiteID", &i.PhysicalSiteID) + delete(rawMsg, key) + case "sourceAgentIdentity": + err = unpopulate(val, "SourceAgentIdentity", &i.SourceAgentIdentity) + delete(rawMsg, key) + case "vmwareSiteId": + err = unpopulate(val, "VmwareSiteID", &i.VmwareSiteID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFabricSpecificDetails. +func (i InMageRcmFabricSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentDetails", i.AgentDetails) + populate(objectMap, "controlPlaneUri", i.ControlPlaneURI) + populate(objectMap, "dataPlaneUri", i.DataPlaneURI) + populate(objectMap, "dras", i.Dras) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "marsAgents", i.MarsAgents) + populate(objectMap, "physicalSiteId", i.PhysicalSiteID) + populate(objectMap, "processServers", i.ProcessServers) + populate(objectMap, "pushInstallers", i.PushInstallers) + populate(objectMap, "rcmProxies", i.RcmProxies) + populate(objectMap, "replicationAgents", i.ReplicationAgents) + populate(objectMap, "reprotectAgents", i.ReprotectAgents) + populate(objectMap, "serviceContainerId", i.ServiceContainerID) + populate(objectMap, "serviceEndpoint", i.ServiceEndpoint) + populate(objectMap, "serviceResourceId", i.ServiceResourceID) + populate(objectMap, "sourceAgentIdentityDetails", i.SourceAgentIdentityDetails) + populate(objectMap, "vmwareSiteId", i.VmwareSiteID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFabricSpecificDetails. +func (i *InMageRcmFabricSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentDetails": + err = unpopulate(val, "AgentDetails", &i.AgentDetails) + delete(rawMsg, key) + case "controlPlaneUri": + err = unpopulate(val, "ControlPlaneURI", &i.ControlPlaneURI) + delete(rawMsg, key) + case "dataPlaneUri": + err = unpopulate(val, "DataPlaneURI", &i.DataPlaneURI) + delete(rawMsg, key) + case "dras": + err = unpopulate(val, "Dras", &i.Dras) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "marsAgents": + err = unpopulate(val, "MarsAgents", &i.MarsAgents) + delete(rawMsg, key) + case "physicalSiteId": + err = unpopulate(val, "PhysicalSiteID", &i.PhysicalSiteID) + delete(rawMsg, key) + case "processServers": + err = unpopulate(val, "ProcessServers", &i.ProcessServers) + delete(rawMsg, key) + case "pushInstallers": + err = unpopulate(val, "PushInstallers", &i.PushInstallers) + delete(rawMsg, key) + case "rcmProxies": + err = unpopulate(val, "RcmProxies", &i.RcmProxies) + delete(rawMsg, key) + case "replicationAgents": + err = unpopulate(val, "ReplicationAgents", &i.ReplicationAgents) + delete(rawMsg, key) + case "reprotectAgents": + err = unpopulate(val, "ReprotectAgents", &i.ReprotectAgents) + delete(rawMsg, key) + case "serviceContainerId": + err = unpopulate(val, "ServiceContainerID", &i.ServiceContainerID) + delete(rawMsg, key) + case "serviceEndpoint": + err = unpopulate(val, "ServiceEndpoint", &i.ServiceEndpoint) + delete(rawMsg, key) + case "serviceResourceId": + err = unpopulate(val, "ServiceResourceID", &i.ServiceResourceID) + delete(rawMsg, key) + case "sourceAgentIdentityDetails": + err = unpopulate(val, "SourceAgentIdentityDetails", &i.SourceAgentIdentityDetails) + delete(rawMsg, key) + case "vmwareSiteId": + err = unpopulate(val, "VmwareSiteID", &i.VmwareSiteID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFabricSwitchProviderBlockingErrorDetails. +func (i InMageRcmFabricSwitchProviderBlockingErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", i.ErrorCode) + populate(objectMap, "errorMessage", i.ErrorMessage) + populate(objectMap, "errorMessageParameters", i.ErrorMessageParameters) + populate(objectMap, "errorTags", i.ErrorTags) + populate(objectMap, "possibleCauses", i.PossibleCauses) + populate(objectMap, "recommendedAction", i.RecommendedAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFabricSwitchProviderBlockingErrorDetails. +func (i *InMageRcmFabricSwitchProviderBlockingErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &i.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) + delete(rawMsg, key) + case "errorMessageParameters": + err = unpopulate(val, "ErrorMessageParameters", &i.ErrorMessageParameters) + delete(rawMsg, key) + case "errorTags": + err = unpopulate(val, "ErrorTags", &i.ErrorTags) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackDiscoveredProtectedVMDetails. +func (i InMageRcmFailbackDiscoveredProtectedVMDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdTimestamp", i.CreatedTimestamp) + populate(objectMap, "datastores", i.Datastores) + populate(objectMap, "ipAddresses", i.IPAddresses) + populate(objectMap, "isDeleted", i.IsDeleted) + populateDateTimeRFC3339(objectMap, "lastDiscoveryTimeInUtc", i.LastDiscoveryTimeInUTC) + populate(objectMap, "osName", i.OSName) + populate(objectMap, "powerStatus", i.PowerStatus) + populateDateTimeRFC3339(objectMap, "updatedTimestamp", i.UpdatedTimestamp) + populate(objectMap, "vCenterFqdn", i.VCenterFqdn) + populate(objectMap, "vCenterId", i.VCenterID) + populate(objectMap, "vmFqdn", i.VMFqdn) + populate(objectMap, "vmwareToolsStatus", i.VmwareToolsStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackDiscoveredProtectedVMDetails. +func (i *InMageRcmFailbackDiscoveredProtectedVMDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdTimestamp": + err = unpopulateDateTimeRFC3339(val, "CreatedTimestamp", &i.CreatedTimestamp) + delete(rawMsg, key) + case "datastores": + err = unpopulate(val, "Datastores", &i.Datastores) + delete(rawMsg, key) + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &i.IPAddresses) + delete(rawMsg, key) + case "isDeleted": + err = unpopulate(val, "IsDeleted", &i.IsDeleted) + delete(rawMsg, key) + case "lastDiscoveryTimeInUtc": + err = unpopulateDateTimeRFC3339(val, "LastDiscoveryTimeInUTC", &i.LastDiscoveryTimeInUTC) + delete(rawMsg, key) + case "osName": + err = unpopulate(val, "OSName", &i.OSName) + delete(rawMsg, key) + case "powerStatus": + err = unpopulate(val, "PowerStatus", &i.PowerStatus) + delete(rawMsg, key) + case "updatedTimestamp": + err = unpopulateDateTimeRFC3339(val, "UpdatedTimestamp", &i.UpdatedTimestamp) + delete(rawMsg, key) + case "vCenterFqdn": + err = unpopulate(val, "VCenterFqdn", &i.VCenterFqdn) + delete(rawMsg, key) + case "vCenterId": + err = unpopulate(val, "VCenterID", &i.VCenterID) + delete(rawMsg, key) + case "vmFqdn": + err = unpopulate(val, "VMFqdn", &i.VMFqdn) + delete(rawMsg, key) + case "vmwareToolsStatus": + err = unpopulate(val, "VmwareToolsStatus", &i.VmwareToolsStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackEventDetails. +func (i InMageRcmFailbackEventDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applianceName", i.ApplianceName) + populate(objectMap, "componentDisplayName", i.ComponentDisplayName) + objectMap["instanceType"] = "InMageRcmFailback" + populate(objectMap, "protectedItemName", i.ProtectedItemName) + populate(objectMap, "serverType", i.ServerType) + populate(objectMap, "vmName", i.VMName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackEventDetails. +func (i *InMageRcmFailbackEventDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applianceName": + err = unpopulate(val, "ApplianceName", &i.ApplianceName) + delete(rawMsg, key) + case "componentDisplayName": + err = unpopulate(val, "ComponentDisplayName", &i.ComponentDisplayName) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "protectedItemName": + err = unpopulate(val, "ProtectedItemName", &i.ProtectedItemName) + delete(rawMsg, key) + case "serverType": + err = unpopulate(val, "ServerType", &i.ServerType) + delete(rawMsg, key) + case "vmName": + err = unpopulate(val, "VMName", &i.VMName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackMobilityAgentDetails. +func (i InMageRcmFailbackMobilityAgentDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "agentVersionExpiryDate", i.AgentVersionExpiryDate) + populate(objectMap, "driverVersion", i.DriverVersion) + populateDateTimeRFC3339(objectMap, "driverVersionExpiryDate", i.DriverVersionExpiryDate) + populate(objectMap, "isUpgradeable", i.IsUpgradeable) + populateDateTimeRFC3339(objectMap, "lastHeartbeatUtc", i.LastHeartbeatUTC) + populate(objectMap, "latestUpgradableVersionWithoutReboot", i.LatestUpgradableVersionWithoutReboot) + populate(objectMap, "latestVersion", i.LatestVersion) + populate(objectMap, "reasonsBlockingUpgrade", i.ReasonsBlockingUpgrade) + populate(objectMap, "version", i.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackMobilityAgentDetails. +func (i *InMageRcmFailbackMobilityAgentDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentVersionExpiryDate": + err = unpopulateDateTimeRFC3339(val, "AgentVersionExpiryDate", &i.AgentVersionExpiryDate) + delete(rawMsg, key) + case "driverVersion": + err = unpopulate(val, "DriverVersion", &i.DriverVersion) + delete(rawMsg, key) + case "driverVersionExpiryDate": + err = unpopulateDateTimeRFC3339(val, "DriverVersionExpiryDate", &i.DriverVersionExpiryDate) + delete(rawMsg, key) + case "isUpgradeable": + err = unpopulate(val, "IsUpgradeable", &i.IsUpgradeable) + delete(rawMsg, key) + case "lastHeartbeatUtc": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeatUTC", &i.LastHeartbeatUTC) + delete(rawMsg, key) + case "latestUpgradableVersionWithoutReboot": + err = unpopulate(val, "LatestUpgradableVersionWithoutReboot", &i.LatestUpgradableVersionWithoutReboot) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &i.LatestVersion) + delete(rawMsg, key) + case "reasonsBlockingUpgrade": + err = unpopulate(val, "ReasonsBlockingUpgrade", &i.ReasonsBlockingUpgrade) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &i.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackNicDetails. +func (i InMageRcmFailbackNicDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "adapterType", i.AdapterType) + populate(objectMap, "macAddress", i.MacAddress) + populate(objectMap, "networkName", i.NetworkName) + populate(objectMap, "sourceIpAddress", i.SourceIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackNicDetails. +func (i *InMageRcmFailbackNicDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adapterType": + err = unpopulate(val, "AdapterType", &i.AdapterType) + delete(rawMsg, key) + case "macAddress": + err = unpopulate(val, "MacAddress", &i.MacAddress) + delete(rawMsg, key) + case "networkName": + err = unpopulate(val, "NetworkName", &i.NetworkName) + delete(rawMsg, key) + case "sourceIpAddress": + err = unpopulate(val, "SourceIPAddress", &i.SourceIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackPlannedFailoverProviderInput. +func (i InMageRcmFailbackPlannedFailoverProviderInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcmFailback" + populate(objectMap, "recoveryPointType", i.RecoveryPointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackPlannedFailoverProviderInput. +func (i *InMageRcmFailbackPlannedFailoverProviderInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &i.RecoveryPointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackPolicyCreationInput. +func (i InMageRcmFailbackPolicyCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) + objectMap["instanceType"] = "InMageRcmFailback" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackPolicyCreationInput. +func (i *InMageRcmFailbackPolicyCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackPolicyDetails. +func (i InMageRcmFailbackPolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) + objectMap["instanceType"] = "InMageRcmFailback" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackPolicyDetails. +func (i *InMageRcmFailbackPolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackProtectedDiskDetails. +func (i InMageRcmFailbackProtectedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacityInBytes", i.CapacityInBytes) + populate(objectMap, "dataPendingAtSourceAgentInMB", i.DataPendingAtSourceAgentInMB) + populate(objectMap, "dataPendingInLogDataStoreInMB", i.DataPendingInLogDataStoreInMB) + populate(objectMap, "diskId", i.DiskID) + populate(objectMap, "diskName", i.DiskName) + populate(objectMap, "diskUuid", i.DiskUUID) + populate(objectMap, "irDetails", i.IrDetails) + populate(objectMap, "isInitialReplicationComplete", i.IsInitialReplicationComplete) + populate(objectMap, "isOSDisk", i.IsOSDisk) + populateDateTimeRFC3339(objectMap, "lastSyncTime", i.LastSyncTime) + populate(objectMap, "resyncDetails", i.ResyncDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackProtectedDiskDetails. +func (i *InMageRcmFailbackProtectedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacityInBytes": + err = unpopulate(val, "CapacityInBytes", &i.CapacityInBytes) + delete(rawMsg, key) + case "dataPendingAtSourceAgentInMB": + err = unpopulate(val, "DataPendingAtSourceAgentInMB", &i.DataPendingAtSourceAgentInMB) + delete(rawMsg, key) + case "dataPendingInLogDataStoreInMB": + err = unpopulate(val, "DataPendingInLogDataStoreInMB", &i.DataPendingInLogDataStoreInMB) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &i.DiskID) + delete(rawMsg, key) + case "diskName": + err = unpopulate(val, "DiskName", &i.DiskName) + delete(rawMsg, key) + case "diskUuid": + err = unpopulate(val, "DiskUUID", &i.DiskUUID) + delete(rawMsg, key) + case "irDetails": + err = unpopulate(val, "IrDetails", &i.IrDetails) + delete(rawMsg, key) + case "isInitialReplicationComplete": + err = unpopulate(val, "IsInitialReplicationComplete", &i.IsInitialReplicationComplete) + delete(rawMsg, key) + case "isOSDisk": + err = unpopulate(val, "IsOSDisk", &i.IsOSDisk) + delete(rawMsg, key) + case "lastSyncTime": + err = unpopulateDateTimeRFC3339(val, "LastSyncTime", &i.LastSyncTime) + delete(rawMsg, key) + case "resyncDetails": + err = unpopulate(val, "ResyncDetails", &i.ResyncDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackReplicationDetails. +func (i InMageRcmFailbackReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "azureVirtualMachineId", i.AzureVirtualMachineID) + populate(objectMap, "discoveredVmDetails", i.DiscoveredVMDetails) + populate(objectMap, "initialReplicationProcessedBytes", i.InitialReplicationProcessedBytes) + populate(objectMap, "initialReplicationProgressHealth", i.InitialReplicationProgressHealth) + populate(objectMap, "initialReplicationProgressPercentage", i.InitialReplicationProgressPercentage) + populate(objectMap, "initialReplicationTransferredBytes", i.InitialReplicationTransferredBytes) + objectMap["instanceType"] = "InMageRcmFailback" + populate(objectMap, "internalIdentifier", i.InternalIdentifier) + populate(objectMap, "isAgentRegistrationSuccessfulAfterFailover", i.IsAgentRegistrationSuccessfulAfterFailover) + populateDateTimeRFC3339(objectMap, "lastPlannedFailoverStartTime", i.LastPlannedFailoverStartTime) + populate(objectMap, "lastPlannedFailoverStatus", i.LastPlannedFailoverStatus) + populate(objectMap, "lastUsedPolicyFriendlyName", i.LastUsedPolicyFriendlyName) + populate(objectMap, "lastUsedPolicyId", i.LastUsedPolicyID) + populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) + populate(objectMap, "mobilityAgentDetails", i.MobilityAgentDetails) + populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) + populate(objectMap, "osType", i.OSType) + populate(objectMap, "protectedDisks", i.ProtectedDisks) + populate(objectMap, "reprotectAgentId", i.ReprotectAgentID) + populate(objectMap, "reprotectAgentName", i.ReprotectAgentName) + populate(objectMap, "resyncProcessedBytes", i.ResyncProcessedBytes) + populate(objectMap, "resyncProgressHealth", i.ResyncProgressHealth) + populate(objectMap, "resyncProgressPercentage", i.ResyncProgressPercentage) + populate(objectMap, "resyncRequired", i.ResyncRequired) + populate(objectMap, "resyncState", i.ResyncState) + populate(objectMap, "resyncTransferredBytes", i.ResyncTransferredBytes) + populate(objectMap, "targetDataStoreName", i.TargetDataStoreName) + populate(objectMap, "targetVmName", i.TargetVMName) + populate(objectMap, "targetvCenterId", i.TargetvCenterID) + populate(objectMap, "vmNics", i.VMNics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackReplicationDetails. +func (i *InMageRcmFailbackReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "azureVirtualMachineId": + err = unpopulate(val, "AzureVirtualMachineID", &i.AzureVirtualMachineID) + delete(rawMsg, key) + case "discoveredVmDetails": + err = unpopulate(val, "DiscoveredVMDetails", &i.DiscoveredVMDetails) + delete(rawMsg, key) + case "initialReplicationProcessedBytes": + err = unpopulate(val, "InitialReplicationProcessedBytes", &i.InitialReplicationProcessedBytes) + delete(rawMsg, key) + case "initialReplicationProgressHealth": + err = unpopulate(val, "InitialReplicationProgressHealth", &i.InitialReplicationProgressHealth) + delete(rawMsg, key) + case "initialReplicationProgressPercentage": + err = unpopulate(val, "InitialReplicationProgressPercentage", &i.InitialReplicationProgressPercentage) + delete(rawMsg, key) + case "initialReplicationTransferredBytes": + err = unpopulate(val, "InitialReplicationTransferredBytes", &i.InitialReplicationTransferredBytes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "internalIdentifier": + err = unpopulate(val, "InternalIdentifier", &i.InternalIdentifier) + delete(rawMsg, key) + case "isAgentRegistrationSuccessfulAfterFailover": + err = unpopulate(val, "IsAgentRegistrationSuccessfulAfterFailover", &i.IsAgentRegistrationSuccessfulAfterFailover) + delete(rawMsg, key) + case "lastPlannedFailoverStartTime": + err = unpopulateDateTimeRFC3339(val, "LastPlannedFailoverStartTime", &i.LastPlannedFailoverStartTime) + delete(rawMsg, key) + case "lastPlannedFailoverStatus": + err = unpopulate(val, "LastPlannedFailoverStatus", &i.LastPlannedFailoverStatus) + delete(rawMsg, key) + case "lastUsedPolicyFriendlyName": + err = unpopulate(val, "LastUsedPolicyFriendlyName", &i.LastUsedPolicyFriendlyName) + delete(rawMsg, key) + case "lastUsedPolicyId": + err = unpopulate(val, "LastUsedPolicyID", &i.LastUsedPolicyID) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) + delete(rawMsg, key) + case "mobilityAgentDetails": + err = unpopulate(val, "MobilityAgentDetails", &i.MobilityAgentDetails) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &i.OSType) + delete(rawMsg, key) + case "protectedDisks": + err = unpopulate(val, "ProtectedDisks", &i.ProtectedDisks) + delete(rawMsg, key) + case "reprotectAgentId": + err = unpopulate(val, "ReprotectAgentID", &i.ReprotectAgentID) + delete(rawMsg, key) + case "reprotectAgentName": + err = unpopulate(val, "ReprotectAgentName", &i.ReprotectAgentName) + delete(rawMsg, key) + case "resyncProcessedBytes": + err = unpopulate(val, "ResyncProcessedBytes", &i.ResyncProcessedBytes) + delete(rawMsg, key) + case "resyncProgressHealth": + err = unpopulate(val, "ResyncProgressHealth", &i.ResyncProgressHealth) + delete(rawMsg, key) + case "resyncProgressPercentage": + err = unpopulate(val, "ResyncProgressPercentage", &i.ResyncProgressPercentage) + delete(rawMsg, key) + case "resyncRequired": + err = unpopulate(val, "ResyncRequired", &i.ResyncRequired) + delete(rawMsg, key) + case "resyncState": + err = unpopulate(val, "ResyncState", &i.ResyncState) + delete(rawMsg, key) + case "resyncTransferredBytes": + err = unpopulate(val, "ResyncTransferredBytes", &i.ResyncTransferredBytes) + delete(rawMsg, key) + case "targetDataStoreName": + err = unpopulate(val, "TargetDataStoreName", &i.TargetDataStoreName) + delete(rawMsg, key) + case "targetVmName": + err = unpopulate(val, "TargetVMName", &i.TargetVMName) + delete(rawMsg, key) + case "targetvCenterId": + err = unpopulate(val, "TargetvCenterID", &i.TargetvCenterID) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &i.VMNics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackReprotectInput. +func (i InMageRcmFailbackReprotectInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcmFailback" + populate(objectMap, "policyId", i.PolicyID) + populate(objectMap, "processServerId", i.ProcessServerID) + populate(objectMap, "runAsAccountId", i.RunAsAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackReprotectInput. +func (i *InMageRcmFailbackReprotectInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &i.PolicyID) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmFailbackSyncDetails. +func (i InMageRcmFailbackSyncDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "last15MinutesTransferredBytes", i.Last15MinutesTransferredBytes) + populate(objectMap, "lastDataTransferTimeUtc", i.LastDataTransferTimeUTC) + populate(objectMap, "lastRefreshTime", i.LastRefreshTime) + populate(objectMap, "processedBytes", i.ProcessedBytes) + populate(objectMap, "progressHealth", i.ProgressHealth) + populate(objectMap, "progressPercentage", i.ProgressPercentage) + populate(objectMap, "startTime", i.StartTime) + populate(objectMap, "transferredBytes", i.TransferredBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmFailbackSyncDetails. +func (i *InMageRcmFailbackSyncDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "last15MinutesTransferredBytes": + err = unpopulate(val, "Last15MinutesTransferredBytes", &i.Last15MinutesTransferredBytes) + delete(rawMsg, key) + case "lastDataTransferTimeUtc": + err = unpopulate(val, "LastDataTransferTimeUTC", &i.LastDataTransferTimeUTC) + delete(rawMsg, key) + case "lastRefreshTime": + err = unpopulate(val, "LastRefreshTime", &i.LastRefreshTime) + delete(rawMsg, key) + case "processedBytes": + err = unpopulate(val, "ProcessedBytes", &i.ProcessedBytes) + delete(rawMsg, key) + case "progressHealth": + err = unpopulate(val, "ProgressHealth", &i.ProgressHealth) + delete(rawMsg, key) + case "progressPercentage": + err = unpopulate(val, "ProgressPercentage", &i.ProgressPercentage) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &i.StartTime) + delete(rawMsg, key) + case "transferredBytes": + err = unpopulate(val, "TransferredBytes", &i.TransferredBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmLastAgentUpgradeErrorDetails. +func (i InMageRcmLastAgentUpgradeErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", i.ErrorCode) + populate(objectMap, "errorMessage", i.ErrorMessage) + populate(objectMap, "errorMessageParameters", i.ErrorMessageParameters) + populate(objectMap, "errorTags", i.ErrorTags) + populate(objectMap, "possibleCauses", i.PossibleCauses) + populate(objectMap, "recommendedAction", i.RecommendedAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmLastAgentUpgradeErrorDetails. +func (i *InMageRcmLastAgentUpgradeErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &i.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) + delete(rawMsg, key) + case "errorMessageParameters": + err = unpopulate(val, "ErrorMessageParameters", &i.ErrorMessageParameters) + delete(rawMsg, key) + case "errorTags": + err = unpopulate(val, "ErrorTags", &i.ErrorTags) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmMobilityAgentDetails. +func (i InMageRcmMobilityAgentDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "agentVersionExpiryDate", i.AgentVersionExpiryDate) + populate(objectMap, "driverVersion", i.DriverVersion) + populateDateTimeRFC3339(objectMap, "driverVersionExpiryDate", i.DriverVersionExpiryDate) + populate(objectMap, "isUpgradeable", i.IsUpgradeable) + populateDateTimeRFC3339(objectMap, "lastHeartbeatUtc", i.LastHeartbeatUTC) + populate(objectMap, "latestAgentReleaseDate", i.LatestAgentReleaseDate) + populate(objectMap, "latestUpgradableVersionWithoutReboot", i.LatestUpgradableVersionWithoutReboot) + populate(objectMap, "latestVersion", i.LatestVersion) + populate(objectMap, "reasonsBlockingUpgrade", i.ReasonsBlockingUpgrade) + populate(objectMap, "version", i.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmMobilityAgentDetails. +func (i *InMageRcmMobilityAgentDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentVersionExpiryDate": + err = unpopulateDateTimeRFC3339(val, "AgentVersionExpiryDate", &i.AgentVersionExpiryDate) + delete(rawMsg, key) + case "driverVersion": + err = unpopulate(val, "DriverVersion", &i.DriverVersion) + delete(rawMsg, key) + case "driverVersionExpiryDate": + err = unpopulateDateTimeRFC3339(val, "DriverVersionExpiryDate", &i.DriverVersionExpiryDate) + delete(rawMsg, key) + case "isUpgradeable": + err = unpopulate(val, "IsUpgradeable", &i.IsUpgradeable) + delete(rawMsg, key) + case "lastHeartbeatUtc": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeatUTC", &i.LastHeartbeatUTC) + delete(rawMsg, key) + case "latestAgentReleaseDate": + err = unpopulate(val, "LatestAgentReleaseDate", &i.LatestAgentReleaseDate) + delete(rawMsg, key) + case "latestUpgradableVersionWithoutReboot": + err = unpopulate(val, "LatestUpgradableVersionWithoutReboot", &i.LatestUpgradableVersionWithoutReboot) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &i.LatestVersion) + delete(rawMsg, key) + case "reasonsBlockingUpgrade": + err = unpopulate(val, "ReasonsBlockingUpgrade", &i.ReasonsBlockingUpgrade) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &i.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmNicDetails. +func (i InMageRcmNicDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isPrimaryNic", i.IsPrimaryNic) + populate(objectMap, "isSelectedForFailover", i.IsSelectedForFailover) + populate(objectMap, "nicId", i.NicID) + populate(objectMap, "sourceIPAddress", i.SourceIPAddress) + populate(objectMap, "sourceIPAddressType", i.SourceIPAddressType) + populate(objectMap, "sourceNetworkId", i.SourceNetworkID) + populate(objectMap, "sourceSubnetName", i.SourceSubnetName) + populate(objectMap, "targetIPAddress", i.TargetIPAddress) + populate(objectMap, "targetIPAddressType", i.TargetIPAddressType) + populate(objectMap, "targetNicName", i.TargetNicName) + populate(objectMap, "targetSubnetName", i.TargetSubnetName) + populate(objectMap, "testIPAddress", i.TestIPAddress) + populate(objectMap, "testIPAddressType", i.TestIPAddressType) + populate(objectMap, "testSubnetName", i.TestSubnetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmNicDetails. +func (i *InMageRcmNicDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isPrimaryNic": + err = unpopulate(val, "IsPrimaryNic", &i.IsPrimaryNic) + delete(rawMsg, key) + case "isSelectedForFailover": + err = unpopulate(val, "IsSelectedForFailover", &i.IsSelectedForFailover) + delete(rawMsg, key) + case "nicId": + err = unpopulate(val, "NicID", &i.NicID) + delete(rawMsg, key) + case "sourceIPAddress": + err = unpopulate(val, "SourceIPAddress", &i.SourceIPAddress) + delete(rawMsg, key) + case "sourceIPAddressType": + err = unpopulate(val, "SourceIPAddressType", &i.SourceIPAddressType) + delete(rawMsg, key) + case "sourceNetworkId": + err = unpopulate(val, "SourceNetworkID", &i.SourceNetworkID) + delete(rawMsg, key) + case "sourceSubnetName": + err = unpopulate(val, "SourceSubnetName", &i.SourceSubnetName) + delete(rawMsg, key) + case "targetIPAddress": + err = unpopulate(val, "TargetIPAddress", &i.TargetIPAddress) + delete(rawMsg, key) + case "targetIPAddressType": + err = unpopulate(val, "TargetIPAddressType", &i.TargetIPAddressType) + delete(rawMsg, key) + case "targetNicName": + err = unpopulate(val, "TargetNicName", &i.TargetNicName) + delete(rawMsg, key) + case "targetSubnetName": + err = unpopulate(val, "TargetSubnetName", &i.TargetSubnetName) + delete(rawMsg, key) + case "testIPAddress": + err = unpopulate(val, "TestIPAddress", &i.TestIPAddress) + delete(rawMsg, key) + case "testIPAddressType": + err = unpopulate(val, "TestIPAddressType", &i.TestIPAddressType) + delete(rawMsg, key) + case "testSubnetName": + err = unpopulate(val, "TestSubnetName", &i.TestSubnetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmNicInput. +func (i InMageRcmNicInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isPrimaryNic", i.IsPrimaryNic) + populate(objectMap, "isSelectedForFailover", i.IsSelectedForFailover) + populate(objectMap, "nicId", i.NicID) + populate(objectMap, "targetNicName", i.TargetNicName) + populate(objectMap, "targetStaticIPAddress", i.TargetStaticIPAddress) + populate(objectMap, "targetSubnetName", i.TargetSubnetName) + populate(objectMap, "testStaticIPAddress", i.TestStaticIPAddress) + populate(objectMap, "testSubnetName", i.TestSubnetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmNicInput. +func (i *InMageRcmNicInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isPrimaryNic": + err = unpopulate(val, "IsPrimaryNic", &i.IsPrimaryNic) + delete(rawMsg, key) + case "isSelectedForFailover": + err = unpopulate(val, "IsSelectedForFailover", &i.IsSelectedForFailover) + delete(rawMsg, key) + case "nicId": + err = unpopulate(val, "NicID", &i.NicID) + delete(rawMsg, key) + case "targetNicName": + err = unpopulate(val, "TargetNicName", &i.TargetNicName) + delete(rawMsg, key) + case "targetStaticIPAddress": + err = unpopulate(val, "TargetStaticIPAddress", &i.TargetStaticIPAddress) + delete(rawMsg, key) + case "targetSubnetName": + err = unpopulate(val, "TargetSubnetName", &i.TargetSubnetName) + delete(rawMsg, key) + case "testStaticIPAddress": + err = unpopulate(val, "TestStaticIPAddress", &i.TestStaticIPAddress) + delete(rawMsg, key) + case "testSubnetName": + err = unpopulate(val, "TestSubnetName", &i.TestSubnetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmPolicyCreationInput. +func (i InMageRcmPolicyCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) + populate(objectMap, "enableMultiVmSync", i.EnableMultiVMSync) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "recoveryPointHistoryInMinutes", i.RecoveryPointHistoryInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmPolicyCreationInput. +func (i *InMageRcmPolicyCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "enableMultiVmSync": + err = unpopulate(val, "EnableMultiVMSync", &i.EnableMultiVMSync) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "recoveryPointHistoryInMinutes": + err = unpopulate(val, "RecoveryPointHistoryInMinutes", &i.RecoveryPointHistoryInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmPolicyDetails. +func (i InMageRcmPolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", i.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", i.CrashConsistentFrequencyInMinutes) + populate(objectMap, "enableMultiVmSync", i.EnableMultiVMSync) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "recoveryPointHistoryInMinutes", i.RecoveryPointHistoryInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmPolicyDetails. +func (i *InMageRcmPolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &i.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &i.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "enableMultiVmSync": + err = unpopulate(val, "EnableMultiVMSync", &i.EnableMultiVMSync) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "recoveryPointHistoryInMinutes": + err = unpopulate(val, "RecoveryPointHistoryInMinutes", &i.RecoveryPointHistoryInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmProtectedDiskDetails. +func (i InMageRcmProtectedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacityInBytes", i.CapacityInBytes) + populate(objectMap, "customTargetDiskName", i.CustomTargetDiskName) + populate(objectMap, "dataPendingAtSourceAgentInMB", i.DataPendingAtSourceAgentInMB) + populate(objectMap, "dataPendingInLogDataStoreInMB", i.DataPendingInLogDataStoreInMB) + populate(objectMap, "diskEncryptionSetId", i.DiskEncryptionSetID) + populate(objectMap, "diskId", i.DiskID) + populate(objectMap, "diskName", i.DiskName) + populate(objectMap, "diskState", i.DiskState) + populate(objectMap, "diskType", i.DiskType) + populate(objectMap, "irDetails", i.IrDetails) + populate(objectMap, "isInitialReplicationComplete", i.IsInitialReplicationComplete) + populate(objectMap, "isOSDisk", i.IsOSDisk) + populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) + populate(objectMap, "resyncDetails", i.ResyncDetails) + populate(objectMap, "sectorSizeInBytes", i.SectorSizeInBytes) + populate(objectMap, "seedBlobUri", i.SeedBlobURI) + populate(objectMap, "seedManagedDiskId", i.SeedManagedDiskID) + populate(objectMap, "targetManagedDiskId", i.TargetManagedDiskID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmProtectedDiskDetails. +func (i *InMageRcmProtectedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacityInBytes": + err = unpopulate(val, "CapacityInBytes", &i.CapacityInBytes) + delete(rawMsg, key) + case "customTargetDiskName": + err = unpopulate(val, "CustomTargetDiskName", &i.CustomTargetDiskName) + delete(rawMsg, key) + case "dataPendingAtSourceAgentInMB": + err = unpopulate(val, "DataPendingAtSourceAgentInMB", &i.DataPendingAtSourceAgentInMB) + delete(rawMsg, key) + case "dataPendingInLogDataStoreInMB": + err = unpopulate(val, "DataPendingInLogDataStoreInMB", &i.DataPendingInLogDataStoreInMB) + delete(rawMsg, key) + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &i.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &i.DiskID) + delete(rawMsg, key) + case "diskName": + err = unpopulate(val, "DiskName", &i.DiskName) + delete(rawMsg, key) + case "diskState": + err = unpopulate(val, "DiskState", &i.DiskState) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &i.DiskType) + delete(rawMsg, key) + case "irDetails": + err = unpopulate(val, "IrDetails", &i.IrDetails) + delete(rawMsg, key) + case "isInitialReplicationComplete": + err = unpopulate(val, "IsInitialReplicationComplete", &i.IsInitialReplicationComplete) + delete(rawMsg, key) + case "isOSDisk": + err = unpopulate(val, "IsOSDisk", &i.IsOSDisk) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) + delete(rawMsg, key) + case "resyncDetails": + err = unpopulate(val, "ResyncDetails", &i.ResyncDetails) + delete(rawMsg, key) + case "sectorSizeInBytes": + err = unpopulate(val, "SectorSizeInBytes", &i.SectorSizeInBytes) + delete(rawMsg, key) + case "seedBlobUri": + err = unpopulate(val, "SeedBlobURI", &i.SeedBlobURI) + delete(rawMsg, key) + case "seedManagedDiskId": + err = unpopulate(val, "SeedManagedDiskID", &i.SeedManagedDiskID) + delete(rawMsg, key) + case "targetManagedDiskId": + err = unpopulate(val, "TargetManagedDiskID", &i.TargetManagedDiskID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmProtectionContainerMappingDetails. +func (i InMageRcmProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableAgentAutoUpgrade", i.EnableAgentAutoUpgrade) + objectMap["instanceType"] = "InMageRcm" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmProtectionContainerMappingDetails. +func (i *InMageRcmProtectionContainerMappingDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableAgentAutoUpgrade": + err = unpopulate(val, "EnableAgentAutoUpgrade", &i.EnableAgentAutoUpgrade) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmRecoveryPointDetails. +func (i InMageRcmRecoveryPointDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "isMultiVmSyncPoint", i.IsMultiVMSyncPoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmRecoveryPointDetails. +func (i *InMageRcmRecoveryPointDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "isMultiVmSyncPoint": + err = unpopulate(val, "IsMultiVMSyncPoint", &i.IsMultiVMSyncPoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmReplicationDetails. +func (i InMageRcmReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentUpgradeAttemptToVersion", i.AgentUpgradeAttemptToVersion) + populate(objectMap, "agentUpgradeBlockingErrorDetails", i.AgentUpgradeBlockingErrorDetails) + populate(objectMap, "agentUpgradeJobId", i.AgentUpgradeJobID) + populate(objectMap, "agentUpgradeState", i.AgentUpgradeState) + populate(objectMap, "allocatedMemoryInMB", i.AllocatedMemoryInMB) + populate(objectMap, "discoveredVmDetails", i.DiscoveredVMDetails) + populate(objectMap, "discoveryType", i.DiscoveryType) + populate(objectMap, "fabricDiscoveryMachineId", i.FabricDiscoveryMachineID) + populate(objectMap, "failoverRecoveryPointId", i.FailoverRecoveryPointID) + populate(objectMap, "firmwareType", i.FirmwareType) + populate(objectMap, "initialReplicationProcessedBytes", i.InitialReplicationProcessedBytes) + populate(objectMap, "initialReplicationProgressHealth", i.InitialReplicationProgressHealth) + populate(objectMap, "initialReplicationProgressPercentage", i.InitialReplicationProgressPercentage) + populate(objectMap, "initialReplicationTransferredBytes", i.InitialReplicationTransferredBytes) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "internalIdentifier", i.InternalIdentifier) + populate(objectMap, "isAgentRegistrationSuccessfulAfterFailover", i.IsAgentRegistrationSuccessfulAfterFailover) + populate(objectMap, "isLastUpgradeSuccessful", i.IsLastUpgradeSuccessful) + populate(objectMap, "lastAgentUpgradeErrorDetails", i.LastAgentUpgradeErrorDetails) + populate(objectMap, "lastAgentUpgradeType", i.LastAgentUpgradeType) + populate(objectMap, "lastRecoveryPointId", i.LastRecoveryPointID) + populateDateTimeRFC3339(objectMap, "lastRecoveryPointReceived", i.LastRecoveryPointReceived) + populateDateTimeRFC3339(objectMap, "lastRpoCalculatedTime", i.LastRpoCalculatedTime) + populate(objectMap, "lastRpoInSeconds", i.LastRpoInSeconds) + populate(objectMap, "licenseType", i.LicenseType) + populate(objectMap, "linuxLicenseType", i.LinuxLicenseType) + populate(objectMap, "mobilityAgentDetails", i.MobilityAgentDetails) + populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) + populate(objectMap, "osName", i.OSName) + populate(objectMap, "osType", i.OSType) + populate(objectMap, "primaryNicIpAddress", i.PrimaryNicIPAddress) + populate(objectMap, "processServerId", i.ProcessServerID) + populate(objectMap, "processServerName", i.ProcessServerName) + populate(objectMap, "processorCoreCount", i.ProcessorCoreCount) + populate(objectMap, "protectedDisks", i.ProtectedDisks) + populate(objectMap, "resyncProcessedBytes", i.ResyncProcessedBytes) + populate(objectMap, "resyncProgressHealth", i.ResyncProgressHealth) + populate(objectMap, "resyncProgressPercentage", i.ResyncProgressPercentage) + populate(objectMap, "resyncRequired", i.ResyncRequired) + populate(objectMap, "resyncState", i.ResyncState) + populate(objectMap, "resyncTransferredBytes", i.ResyncTransferredBytes) + populate(objectMap, "runAsAccountId", i.RunAsAccountID) + populate(objectMap, "sqlServerLicenseType", i.SQLServerLicenseType) + populate(objectMap, "seedManagedDiskTags", i.SeedManagedDiskTags) + populate(objectMap, "storageAccountId", i.StorageAccountID) + populate(objectMap, "supportedOSVersions", i.SupportedOSVersions) + populate(objectMap, "targetAvailabilitySetId", i.TargetAvailabilitySetID) + populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) + populate(objectMap, "targetBootDiagnosticsStorageAccountId", i.TargetBootDiagnosticsStorageAccountID) + populate(objectMap, "targetGeneration", i.TargetGeneration) + populate(objectMap, "targetLocation", i.TargetLocation) + populate(objectMap, "targetManagedDiskTags", i.TargetManagedDiskTags) + populate(objectMap, "targetNetworkId", i.TargetNetworkID) + populate(objectMap, "targetNicTags", i.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) + populate(objectMap, "targetResourceGroupId", i.TargetResourceGroupID) + populate(objectMap, "targetVmName", i.TargetVMName) + populate(objectMap, "targetVmSecurityProfile", i.TargetVMSecurityProfile) + populate(objectMap, "targetVmSize", i.TargetVMSize) + populate(objectMap, "targetVmTags", i.TargetVMTags) + populate(objectMap, "testNetworkId", i.TestNetworkID) + populate(objectMap, "unprotectedDisks", i.UnprotectedDisks) + populate(objectMap, "vmNics", i.VMNics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmReplicationDetails. +func (i *InMageRcmReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentUpgradeAttemptToVersion": + err = unpopulate(val, "AgentUpgradeAttemptToVersion", &i.AgentUpgradeAttemptToVersion) + delete(rawMsg, key) + case "agentUpgradeBlockingErrorDetails": + err = unpopulate(val, "AgentUpgradeBlockingErrorDetails", &i.AgentUpgradeBlockingErrorDetails) + delete(rawMsg, key) + case "agentUpgradeJobId": + err = unpopulate(val, "AgentUpgradeJobID", &i.AgentUpgradeJobID) + delete(rawMsg, key) + case "agentUpgradeState": + err = unpopulate(val, "AgentUpgradeState", &i.AgentUpgradeState) + delete(rawMsg, key) + case "allocatedMemoryInMB": + err = unpopulate(val, "AllocatedMemoryInMB", &i.AllocatedMemoryInMB) + delete(rawMsg, key) + case "discoveredVmDetails": + err = unpopulate(val, "DiscoveredVMDetails", &i.DiscoveredVMDetails) + delete(rawMsg, key) + case "discoveryType": + err = unpopulate(val, "DiscoveryType", &i.DiscoveryType) + delete(rawMsg, key) + case "fabricDiscoveryMachineId": + err = unpopulate(val, "FabricDiscoveryMachineID", &i.FabricDiscoveryMachineID) + delete(rawMsg, key) + case "failoverRecoveryPointId": + err = unpopulate(val, "FailoverRecoveryPointID", &i.FailoverRecoveryPointID) + delete(rawMsg, key) + case "firmwareType": + err = unpopulate(val, "FirmwareType", &i.FirmwareType) + delete(rawMsg, key) + case "initialReplicationProcessedBytes": + err = unpopulate(val, "InitialReplicationProcessedBytes", &i.InitialReplicationProcessedBytes) + delete(rawMsg, key) + case "initialReplicationProgressHealth": + err = unpopulate(val, "InitialReplicationProgressHealth", &i.InitialReplicationProgressHealth) + delete(rawMsg, key) + case "initialReplicationProgressPercentage": + err = unpopulate(val, "InitialReplicationProgressPercentage", &i.InitialReplicationProgressPercentage) + delete(rawMsg, key) + case "initialReplicationTransferredBytes": + err = unpopulate(val, "InitialReplicationTransferredBytes", &i.InitialReplicationTransferredBytes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "internalIdentifier": + err = unpopulate(val, "InternalIdentifier", &i.InternalIdentifier) + delete(rawMsg, key) + case "isAgentRegistrationSuccessfulAfterFailover": + err = unpopulate(val, "IsAgentRegistrationSuccessfulAfterFailover", &i.IsAgentRegistrationSuccessfulAfterFailover) + delete(rawMsg, key) + case "isLastUpgradeSuccessful": + err = unpopulate(val, "IsLastUpgradeSuccessful", &i.IsLastUpgradeSuccessful) + delete(rawMsg, key) + case "lastAgentUpgradeErrorDetails": + err = unpopulate(val, "LastAgentUpgradeErrorDetails", &i.LastAgentUpgradeErrorDetails) + delete(rawMsg, key) + case "lastAgentUpgradeType": + err = unpopulate(val, "LastAgentUpgradeType", &i.LastAgentUpgradeType) + delete(rawMsg, key) + case "lastRecoveryPointId": + err = unpopulate(val, "LastRecoveryPointID", &i.LastRecoveryPointID) + delete(rawMsg, key) + case "lastRecoveryPointReceived": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPointReceived", &i.LastRecoveryPointReceived) + delete(rawMsg, key) + case "lastRpoCalculatedTime": + err = unpopulateDateTimeRFC3339(val, "LastRpoCalculatedTime", &i.LastRpoCalculatedTime) + delete(rawMsg, key) + case "lastRpoInSeconds": + err = unpopulate(val, "LastRpoInSeconds", &i.LastRpoInSeconds) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &i.LicenseType) + delete(rawMsg, key) + case "linuxLicenseType": + err = unpopulate(val, "LinuxLicenseType", &i.LinuxLicenseType) + delete(rawMsg, key) + case "mobilityAgentDetails": + err = unpopulate(val, "MobilityAgentDetails", &i.MobilityAgentDetails) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) + delete(rawMsg, key) + case "osName": + err = unpopulate(val, "OSName", &i.OSName) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &i.OSType) + delete(rawMsg, key) + case "primaryNicIpAddress": + err = unpopulate(val, "PrimaryNicIPAddress", &i.PrimaryNicIPAddress) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) + delete(rawMsg, key) + case "processServerName": + err = unpopulate(val, "ProcessServerName", &i.ProcessServerName) + delete(rawMsg, key) + case "processorCoreCount": + err = unpopulate(val, "ProcessorCoreCount", &i.ProcessorCoreCount) + delete(rawMsg, key) + case "protectedDisks": + err = unpopulate(val, "ProtectedDisks", &i.ProtectedDisks) + delete(rawMsg, key) + case "resyncProcessedBytes": + err = unpopulate(val, "ResyncProcessedBytes", &i.ResyncProcessedBytes) + delete(rawMsg, key) + case "resyncProgressHealth": + err = unpopulate(val, "ResyncProgressHealth", &i.ResyncProgressHealth) + delete(rawMsg, key) + case "resyncProgressPercentage": + err = unpopulate(val, "ResyncProgressPercentage", &i.ResyncProgressPercentage) + delete(rawMsg, key) + case "resyncRequired": + err = unpopulate(val, "ResyncRequired", &i.ResyncRequired) + delete(rawMsg, key) + case "resyncState": + err = unpopulate(val, "ResyncState", &i.ResyncState) + delete(rawMsg, key) + case "resyncTransferredBytes": + err = unpopulate(val, "ResyncTransferredBytes", &i.ResyncTransferredBytes) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &i.SQLServerLicenseType) + delete(rawMsg, key) + case "seedManagedDiskTags": + err = unpopulate(val, "SeedManagedDiskTags", &i.SeedManagedDiskTags) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &i.StorageAccountID) + delete(rawMsg, key) + case "supportedOSVersions": + err = unpopulate(val, "SupportedOSVersions", &i.SupportedOSVersions) + delete(rawMsg, key) + case "targetAvailabilitySetId": + err = unpopulate(val, "TargetAvailabilitySetID", &i.TargetAvailabilitySetID) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetBootDiagnosticsStorageAccountId": + err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &i.TargetBootDiagnosticsStorageAccountID) + delete(rawMsg, key) + case "targetGeneration": + err = unpopulate(val, "TargetGeneration", &i.TargetGeneration) + delete(rawMsg, key) + case "targetLocation": + err = unpopulate(val, "TargetLocation", &i.TargetLocation) + delete(rawMsg, key) + case "targetManagedDiskTags": + err = unpopulate(val, "TargetManagedDiskTags", &i.TargetManagedDiskTags) + delete(rawMsg, key) + case "targetNetworkId": + err = unpopulate(val, "TargetNetworkID", &i.TargetNetworkID) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &i.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetResourceGroupId": + err = unpopulate(val, "TargetResourceGroupID", &i.TargetResourceGroupID) + delete(rawMsg, key) + case "targetVmName": + err = unpopulate(val, "TargetVMName", &i.TargetVMName) + delete(rawMsg, key) + case "targetVmSecurityProfile": + err = unpopulate(val, "TargetVMSecurityProfile", &i.TargetVMSecurityProfile) + delete(rawMsg, key) + case "targetVmSize": + err = unpopulate(val, "TargetVMSize", &i.TargetVMSize) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &i.TargetVMTags) + delete(rawMsg, key) + case "testNetworkId": + err = unpopulate(val, "TestNetworkID", &i.TestNetworkID) + delete(rawMsg, key) + case "unprotectedDisks": + err = unpopulate(val, "UnprotectedDisks", &i.UnprotectedDisks) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &i.VMNics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmReprotectInput. +func (i InMageRcmReprotectInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datastoreName", i.DatastoreName) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "logStorageAccountId", i.LogStorageAccountID) + populate(objectMap, "policyId", i.PolicyID) + populate(objectMap, "reprotectAgentId", i.ReprotectAgentID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmReprotectInput. +func (i *InMageRcmReprotectInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datastoreName": + err = unpopulate(val, "DatastoreName", &i.DatastoreName) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &i.LogStorageAccountID) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &i.PolicyID) + delete(rawMsg, key) + case "reprotectAgentId": + err = unpopulate(val, "ReprotectAgentID", &i.ReprotectAgentID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmSyncDetails. +func (i InMageRcmSyncDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "last15MinutesTransferredBytes", i.Last15MinutesTransferredBytes) + populate(objectMap, "lastDataTransferTimeUtc", i.LastDataTransferTimeUTC) + populate(objectMap, "lastRefreshTime", i.LastRefreshTime) + populate(objectMap, "processedBytes", i.ProcessedBytes) + populate(objectMap, "progressHealth", i.ProgressHealth) + populate(objectMap, "progressPercentage", i.ProgressPercentage) + populate(objectMap, "startTime", i.StartTime) + populate(objectMap, "transferredBytes", i.TransferredBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmSyncDetails. +func (i *InMageRcmSyncDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "last15MinutesTransferredBytes": + err = unpopulate(val, "Last15MinutesTransferredBytes", &i.Last15MinutesTransferredBytes) + delete(rawMsg, key) + case "lastDataTransferTimeUtc": + err = unpopulate(val, "LastDataTransferTimeUTC", &i.LastDataTransferTimeUTC) + delete(rawMsg, key) + case "lastRefreshTime": + err = unpopulate(val, "LastRefreshTime", &i.LastRefreshTime) + delete(rawMsg, key) + case "processedBytes": + err = unpopulate(val, "ProcessedBytes", &i.ProcessedBytes) + delete(rawMsg, key) + case "progressHealth": + err = unpopulate(val, "ProgressHealth", &i.ProgressHealth) + delete(rawMsg, key) + case "progressPercentage": + err = unpopulate(val, "ProgressPercentage", &i.ProgressPercentage) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &i.StartTime) + delete(rawMsg, key) + case "transferredBytes": + err = unpopulate(val, "TransferredBytes", &i.TransferredBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmTestFailoverInput. +func (i InMageRcmTestFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "networkId", i.NetworkID) + populate(objectMap, "osUpgradeVersion", i.OSUpgradeVersion) + populate(objectMap, "recoveryPointId", i.RecoveryPointID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmTestFailoverInput. +func (i *InMageRcmTestFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "networkId": + err = unpopulate(val, "NetworkID", &i.NetworkID) + delete(rawMsg, key) + case "osUpgradeVersion": + err = unpopulate(val, "OSUpgradeVersion", &i.OSUpgradeVersion) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmUnProtectedDiskDetails. +func (i InMageRcmUnProtectedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacityInBytes", i.CapacityInBytes) + populate(objectMap, "diskId", i.DiskID) + populate(objectMap, "diskName", i.DiskName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmUnProtectedDiskDetails. +func (i *InMageRcmUnProtectedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacityInBytes": + err = unpopulate(val, "CapacityInBytes", &i.CapacityInBytes) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &i.DiskID) + delete(rawMsg, key) + case "diskName": + err = unpopulate(val, "DiskName", &i.DiskName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmUnplannedFailoverInput. +func (i InMageRcmUnplannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "osUpgradeVersion", i.OSUpgradeVersion) + populate(objectMap, "performShutdown", i.PerformShutdown) + populate(objectMap, "recoveryPointId", i.RecoveryPointID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmUnplannedFailoverInput. +func (i *InMageRcmUnplannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "osUpgradeVersion": + err = unpopulate(val, "OSUpgradeVersion", &i.OSUpgradeVersion) + delete(rawMsg, key) + case "performShutdown": + err = unpopulate(val, "PerformShutdown", &i.PerformShutdown) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmUpdateApplianceForReplicationProtectedItemInput. +func (i InMageRcmUpdateApplianceForReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "runAsAccountId", i.RunAsAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmUpdateApplianceForReplicationProtectedItemInput. +func (i *InMageRcmUpdateApplianceForReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmUpdateContainerMappingInput. +func (i InMageRcmUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableAgentAutoUpgrade", i.EnableAgentAutoUpgrade) + objectMap["instanceType"] = "InMageRcm" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmUpdateContainerMappingInput. +func (i *InMageRcmUpdateContainerMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableAgentAutoUpgrade": + err = unpopulate(val, "EnableAgentAutoUpgrade", &i.EnableAgentAutoUpgrade) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageRcmUpdateReplicationProtectedItemInput. +func (i InMageRcmUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "licenseType", i.LicenseType) + populate(objectMap, "linuxLicenseType", i.LinuxLicenseType) + populate(objectMap, "sqlServerLicenseType", i.SQLServerLicenseType) + populate(objectMap, "targetAvailabilitySetId", i.TargetAvailabilitySetID) + populate(objectMap, "targetAvailabilityZone", i.TargetAvailabilityZone) + populate(objectMap, "targetBootDiagnosticsStorageAccountId", i.TargetBootDiagnosticsStorageAccountID) + populate(objectMap, "targetManagedDiskTags", i.TargetManagedDiskTags) + populate(objectMap, "targetNetworkId", i.TargetNetworkID) + populate(objectMap, "targetNicTags", i.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", i.TargetProximityPlacementGroupID) + populate(objectMap, "targetResourceGroupId", i.TargetResourceGroupID) + populate(objectMap, "targetVmName", i.TargetVMName) + populate(objectMap, "targetVmSize", i.TargetVMSize) + populate(objectMap, "targetVmTags", i.TargetVMTags) + populate(objectMap, "testNetworkId", i.TestNetworkID) + populate(objectMap, "userSelectedOSName", i.UserSelectedOSName) + populate(objectMap, "vmNics", i.VMNics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageRcmUpdateReplicationProtectedItemInput. +func (i *InMageRcmUpdateReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &i.LicenseType) + delete(rawMsg, key) + case "linuxLicenseType": + err = unpopulate(val, "LinuxLicenseType", &i.LinuxLicenseType) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &i.SQLServerLicenseType) + delete(rawMsg, key) + case "targetAvailabilitySetId": + err = unpopulate(val, "TargetAvailabilitySetID", &i.TargetAvailabilitySetID) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &i.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetBootDiagnosticsStorageAccountId": + err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &i.TargetBootDiagnosticsStorageAccountID) + delete(rawMsg, key) + case "targetManagedDiskTags": + err = unpopulate(val, "TargetManagedDiskTags", &i.TargetManagedDiskTags) + delete(rawMsg, key) + case "targetNetworkId": + err = unpopulate(val, "TargetNetworkID", &i.TargetNetworkID) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &i.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &i.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetResourceGroupId": + err = unpopulate(val, "TargetResourceGroupID", &i.TargetResourceGroupID) + delete(rawMsg, key) + case "targetVmName": + err = unpopulate(val, "TargetVMName", &i.TargetVMName) + delete(rawMsg, key) + case "targetVmSize": + err = unpopulate(val, "TargetVMSize", &i.TargetVMSize) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &i.TargetVMTags) + delete(rawMsg, key) + case "testNetworkId": + err = unpopulate(val, "TestNetworkID", &i.TestNetworkID) + delete(rawMsg, key) + case "userSelectedOSName": + err = unpopulate(val, "UserSelectedOSName", &i.UserSelectedOSName) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &i.VMNics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageReplicationDetails. +func (i InMageReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeSiteType", i.ActiveSiteType) + populate(objectMap, "agentDetails", i.AgentDetails) + populate(objectMap, "azureStorageAccountId", i.AzureStorageAccountID) + populate(objectMap, "compressedDataRateInMB", i.CompressedDataRateInMB) + populate(objectMap, "consistencyPoints", i.ConsistencyPoints) + populate(objectMap, "datastores", i.Datastores) + populate(objectMap, "discoveryType", i.DiscoveryType) + populate(objectMap, "diskResized", i.DiskResized) + populate(objectMap, "ipAddress", i.IPAddress) + populate(objectMap, "infrastructureVmId", i.InfrastructureVMID) + objectMap["instanceType"] = "InMage" + populate(objectMap, "isAdditionalStatsAvailable", i.IsAdditionalStatsAvailable) + populateDateTimeRFC3339(objectMap, "lastHeartbeat", i.LastHeartbeat) + populateDateTimeRFC3339(objectMap, "lastRpoCalculatedTime", i.LastRpoCalculatedTime) + populateDateTimeRFC3339(objectMap, "lastUpdateReceivedTime", i.LastUpdateReceivedTime) + populate(objectMap, "masterTargetId", i.MasterTargetID) + populate(objectMap, "multiVmGroupId", i.MultiVMGroupID) + populate(objectMap, "multiVmGroupName", i.MultiVMGroupName) + populate(objectMap, "multiVmSyncStatus", i.MultiVMSyncStatus) + populate(objectMap, "osDetails", i.OSDetails) + populate(objectMap, "osVersion", i.OSVersion) + populate(objectMap, "processServerId", i.ProcessServerID) + populate(objectMap, "protectedDisks", i.ProtectedDisks) + populate(objectMap, "protectionStage", i.ProtectionStage) + populate(objectMap, "rebootAfterUpdateStatus", i.RebootAfterUpdateStatus) + populate(objectMap, "replicaId", i.ReplicaID) + populate(objectMap, "resyncDetails", i.ResyncDetails) + populateDateTimeRFC3339(objectMap, "retentionWindowEnd", i.RetentionWindowEnd) + populateDateTimeRFC3339(objectMap, "retentionWindowStart", i.RetentionWindowStart) + populate(objectMap, "rpoInSeconds", i.RpoInSeconds) + populate(objectMap, "sourceVmCpuCount", i.SourceVMCPUCount) + populate(objectMap, "sourceVmRamSizeInMB", i.SourceVMRAMSizeInMB) + populate(objectMap, "totalDataTransferred", i.TotalDataTransferred) + populate(objectMap, "totalProgressHealth", i.TotalProgressHealth) + populate(objectMap, "uncompressedDataRateInMB", i.UncompressedDataRateInMB) + populate(objectMap, "vCenterInfrastructureId", i.VCenterInfrastructureID) + populate(objectMap, "vmId", i.VMID) + populate(objectMap, "vmNics", i.VMNics) + populate(objectMap, "vmProtectionState", i.VMProtectionState) + populate(objectMap, "vmProtectionStateDescription", i.VMProtectionStateDescription) + populate(objectMap, "validationErrors", i.ValidationErrors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageReplicationDetails. +func (i *InMageReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeSiteType": + err = unpopulate(val, "ActiveSiteType", &i.ActiveSiteType) + delete(rawMsg, key) + case "agentDetails": + err = unpopulate(val, "AgentDetails", &i.AgentDetails) + delete(rawMsg, key) + case "azureStorageAccountId": + err = unpopulate(val, "AzureStorageAccountID", &i.AzureStorageAccountID) + delete(rawMsg, key) + case "compressedDataRateInMB": + err = unpopulate(val, "CompressedDataRateInMB", &i.CompressedDataRateInMB) + delete(rawMsg, key) + case "consistencyPoints": + err = unpopulate(val, "ConsistencyPoints", &i.ConsistencyPoints) + delete(rawMsg, key) + case "datastores": + err = unpopulate(val, "Datastores", &i.Datastores) + delete(rawMsg, key) + case "discoveryType": + err = unpopulate(val, "DiscoveryType", &i.DiscoveryType) + delete(rawMsg, key) + case "diskResized": + err = unpopulate(val, "DiskResized", &i.DiskResized) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &i.IPAddress) + delete(rawMsg, key) + case "infrastructureVmId": + err = unpopulate(val, "InfrastructureVMID", &i.InfrastructureVMID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "isAdditionalStatsAvailable": + err = unpopulate(val, "IsAdditionalStatsAvailable", &i.IsAdditionalStatsAvailable) + delete(rawMsg, key) + case "lastHeartbeat": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeat", &i.LastHeartbeat) + delete(rawMsg, key) + case "lastRpoCalculatedTime": + err = unpopulateDateTimeRFC3339(val, "LastRpoCalculatedTime", &i.LastRpoCalculatedTime) + delete(rawMsg, key) + case "lastUpdateReceivedTime": + err = unpopulateDateTimeRFC3339(val, "LastUpdateReceivedTime", &i.LastUpdateReceivedTime) + delete(rawMsg, key) + case "masterTargetId": + err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) + delete(rawMsg, key) + case "multiVmGroupId": + err = unpopulate(val, "MultiVMGroupID", &i.MultiVMGroupID) + delete(rawMsg, key) + case "multiVmGroupName": + err = unpopulate(val, "MultiVMGroupName", &i.MultiVMGroupName) + delete(rawMsg, key) + case "multiVmSyncStatus": + err = unpopulate(val, "MultiVMSyncStatus", &i.MultiVMSyncStatus) + delete(rawMsg, key) + case "osDetails": + err = unpopulate(val, "OSDetails", &i.OSDetails) + delete(rawMsg, key) + case "osVersion": + err = unpopulate(val, "OSVersion", &i.OSVersion) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) + delete(rawMsg, key) + case "protectedDisks": + err = unpopulate(val, "ProtectedDisks", &i.ProtectedDisks) + delete(rawMsg, key) + case "protectionStage": + err = unpopulate(val, "ProtectionStage", &i.ProtectionStage) + delete(rawMsg, key) + case "rebootAfterUpdateStatus": + err = unpopulate(val, "RebootAfterUpdateStatus", &i.RebootAfterUpdateStatus) + delete(rawMsg, key) + case "replicaId": + err = unpopulate(val, "ReplicaID", &i.ReplicaID) + delete(rawMsg, key) + case "resyncDetails": + err = unpopulate(val, "ResyncDetails", &i.ResyncDetails) + delete(rawMsg, key) + case "retentionWindowEnd": + err = unpopulateDateTimeRFC3339(val, "RetentionWindowEnd", &i.RetentionWindowEnd) + delete(rawMsg, key) + case "retentionWindowStart": + err = unpopulateDateTimeRFC3339(val, "RetentionWindowStart", &i.RetentionWindowStart) + delete(rawMsg, key) + case "rpoInSeconds": + err = unpopulate(val, "RpoInSeconds", &i.RpoInSeconds) + delete(rawMsg, key) + case "sourceVmCpuCount": + err = unpopulate(val, "SourceVMCPUCount", &i.SourceVMCPUCount) + delete(rawMsg, key) + case "sourceVmRamSizeInMB": + err = unpopulate(val, "SourceVMRAMSizeInMB", &i.SourceVMRAMSizeInMB) + delete(rawMsg, key) + case "totalDataTransferred": + err = unpopulate(val, "TotalDataTransferred", &i.TotalDataTransferred) + delete(rawMsg, key) + case "totalProgressHealth": + err = unpopulate(val, "TotalProgressHealth", &i.TotalProgressHealth) + delete(rawMsg, key) + case "uncompressedDataRateInMB": + err = unpopulate(val, "UncompressedDataRateInMB", &i.UncompressedDataRateInMB) + delete(rawMsg, key) + case "vCenterInfrastructureId": + err = unpopulate(val, "VCenterInfrastructureID", &i.VCenterInfrastructureID) + delete(rawMsg, key) + case "vmId": + err = unpopulate(val, "VMID", &i.VMID) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &i.VMNics) + delete(rawMsg, key) + case "vmProtectionState": + err = unpopulate(val, "VMProtectionState", &i.VMProtectionState) + delete(rawMsg, key) + case "vmProtectionStateDescription": + err = unpopulate(val, "VMProtectionStateDescription", &i.VMProtectionStateDescription) + delete(rawMsg, key) + case "validationErrors": + err = unpopulate(val, "ValidationErrors", &i.ValidationErrors) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageReprotectInput. +func (i InMageReprotectInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "datastoreName", i.DatastoreName) + populate(objectMap, "diskExclusionInput", i.DiskExclusionInput) + populate(objectMap, "disksToInclude", i.DisksToInclude) + objectMap["instanceType"] = "InMage" + populate(objectMap, "masterTargetId", i.MasterTargetID) + populate(objectMap, "processServerId", i.ProcessServerID) + populate(objectMap, "profileId", i.ProfileID) + populate(objectMap, "retentionDrive", i.RetentionDrive) + populate(objectMap, "runAsAccountId", i.RunAsAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageReprotectInput. +func (i *InMageReprotectInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datastoreName": + err = unpopulate(val, "DatastoreName", &i.DatastoreName) + delete(rawMsg, key) + case "diskExclusionInput": + err = unpopulate(val, "DiskExclusionInput", &i.DiskExclusionInput) + delete(rawMsg, key) + case "disksToInclude": + err = unpopulate(val, "DisksToInclude", &i.DisksToInclude) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "masterTargetId": + err = unpopulate(val, "MasterTargetID", &i.MasterTargetID) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &i.ProcessServerID) + delete(rawMsg, key) + case "profileId": + err = unpopulate(val, "ProfileID", &i.ProfileID) + delete(rawMsg, key) + case "retentionDrive": + err = unpopulate(val, "RetentionDrive", &i.RetentionDrive) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &i.RunAsAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageTestFailoverInput. +func (i InMageTestFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMage" + populate(objectMap, "recoveryPointId", i.RecoveryPointID) + populate(objectMap, "recoveryPointType", i.RecoveryPointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageTestFailoverInput. +func (i *InMageTestFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &i.RecoveryPointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageUnplannedFailoverInput. +func (i InMageUnplannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMage" + populate(objectMap, "recoveryPointId", i.RecoveryPointID) + populate(objectMap, "recoveryPointType", i.RecoveryPointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageUnplannedFailoverInput. +func (i *InMageUnplannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &i.RecoveryPointID) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &i.RecoveryPointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InMageVolumeExclusionOptions. +func (i InMageVolumeExclusionOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "onlyExcludeIfSingleVolume", i.OnlyExcludeIfSingleVolume) + populate(objectMap, "volumeLabel", i.VolumeLabel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InMageVolumeExclusionOptions. +func (i *InMageVolumeExclusionOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "onlyExcludeIfSingleVolume": + err = unpopulate(val, "OnlyExcludeIfSingleVolume", &i.OnlyExcludeIfSingleVolume) + delete(rawMsg, key) + case "volumeLabel": + err = unpopulate(val, "VolumeLabel", &i.VolumeLabel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InconsistentVMDetails. +func (i InconsistentVMDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cloudName", i.CloudName) + populate(objectMap, "details", i.Details) + populate(objectMap, "errorIds", i.ErrorIDs) + populate(objectMap, "vmName", i.VMName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InconsistentVMDetails. +func (i *InconsistentVMDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cloudName": + err = unpopulate(val, "CloudName", &i.CloudName) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &i.Details) + delete(rawMsg, key) + case "errorIds": + err = unpopulate(val, "ErrorIDs", &i.ErrorIDs) + delete(rawMsg, key) + case "vmName": + err = unpopulate(val, "VMName", &i.VMName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InitialReplicationDetails. +func (i InitialReplicationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "initialReplicationProgressPercentage", i.InitialReplicationProgressPercentage) + populate(objectMap, "initialReplicationType", i.InitialReplicationType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InitialReplicationDetails. +func (i *InitialReplicationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "initialReplicationProgressPercentage": + err = unpopulate(val, "InitialReplicationProgressPercentage", &i.InitialReplicationProgressPercentage) + delete(rawMsg, key) + case "initialReplicationType": + err = unpopulate(val, "InitialReplicationType", &i.InitialReplicationType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InlineWorkflowTaskDetails. +func (i InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "childTasks", i.ChildTasks) + objectMap["instanceType"] = "InlineWorkflowTaskDetails" + populate(objectMap, "workflowIds", i.WorkflowIDs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InlineWorkflowTaskDetails. +func (i *InlineWorkflowTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "childTasks": + err = unpopulate(val, "ChildTasks", &i.ChildTasks) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &i.InstanceType) + delete(rawMsg, key) + case "workflowIds": + err = unpopulate(val, "WorkflowIDs", &i.WorkflowIDs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InnerHealthError. +func (i InnerHealthError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "creationTimeUtc", i.CreationTimeUTC) + populate(objectMap, "customerResolvability", i.CustomerResolvability) + populate(objectMap, "entityId", i.EntityID) + populate(objectMap, "errorCategory", i.ErrorCategory) + populate(objectMap, "errorCode", i.ErrorCode) + populate(objectMap, "errorId", i.ErrorID) + populate(objectMap, "errorLevel", i.ErrorLevel) + populate(objectMap, "errorMessage", i.ErrorMessage) + populate(objectMap, "errorSource", i.ErrorSource) + populate(objectMap, "errorType", i.ErrorType) + populate(objectMap, "possibleCauses", i.PossibleCauses) + populate(objectMap, "recommendedAction", i.RecommendedAction) + populate(objectMap, "recoveryProviderErrorMessage", i.RecoveryProviderErrorMessage) + populate(objectMap, "summaryMessage", i.SummaryMessage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InnerHealthError. +func (i *InnerHealthError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationTimeUtc": + err = unpopulateDateTimeRFC3339(val, "CreationTimeUTC", &i.CreationTimeUTC) + delete(rawMsg, key) + case "customerResolvability": + err = unpopulate(val, "CustomerResolvability", &i.CustomerResolvability) + delete(rawMsg, key) + case "entityId": + err = unpopulate(val, "EntityID", &i.EntityID) + delete(rawMsg, key) + case "errorCategory": + err = unpopulate(val, "ErrorCategory", &i.ErrorCategory) + delete(rawMsg, key) + case "errorCode": + err = unpopulate(val, "ErrorCode", &i.ErrorCode) + delete(rawMsg, key) + case "errorId": + err = unpopulate(val, "ErrorID", &i.ErrorID) + delete(rawMsg, key) + case "errorLevel": + err = unpopulate(val, "ErrorLevel", &i.ErrorLevel) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &i.ErrorMessage) + delete(rawMsg, key) + case "errorSource": + err = unpopulate(val, "ErrorSource", &i.ErrorSource) + delete(rawMsg, key) + case "errorType": + err = unpopulate(val, "ErrorType", &i.ErrorType) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &i.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &i.RecommendedAction) + delete(rawMsg, key) + case "recoveryProviderErrorMessage": + err = unpopulate(val, "RecoveryProviderErrorMessage", &i.RecoveryProviderErrorMessage) + delete(rawMsg, key) + case "summaryMessage": + err = unpopulate(val, "SummaryMessage", &i.SummaryMessage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InputEndpoint. +func (i InputEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endpointName", i.EndpointName) + populate(objectMap, "privatePort", i.PrivatePort) + populate(objectMap, "protocol", i.Protocol) + populate(objectMap, "publicPort", i.PublicPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InputEndpoint. +func (i *InputEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endpointName": + err = unpopulate(val, "EndpointName", &i.EndpointName) + delete(rawMsg, key) + case "privatePort": + err = unpopulate(val, "PrivatePort", &i.PrivatePort) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &i.Protocol) + delete(rawMsg, key) + case "publicPort": + err = unpopulate(val, "PublicPort", &i.PublicPort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Job. +func (j Job) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "location", j.Location) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Job. +func (j *Job) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &j.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobCollection. +func (j JobCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobCollection. +func (j *JobCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobDetails. +func (j JobDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectDetails", j.AffectedObjectDetails) + objectMap["instanceType"] = j.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobDetails. +func (j *JobDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectDetails": + err = unpopulate(val, "AffectedObjectDetails", &j.AffectedObjectDetails) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &j.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobEntity. +func (j JobEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobFriendlyName", j.JobFriendlyName) + populate(objectMap, "jobId", j.JobID) + populate(objectMap, "jobScenarioName", j.JobScenarioName) + populate(objectMap, "targetInstanceType", j.TargetInstanceType) + populate(objectMap, "targetObjectId", j.TargetObjectID) + populate(objectMap, "targetObjectName", j.TargetObjectName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobEntity. +func (j *JobEntity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobFriendlyName": + err = unpopulate(val, "JobFriendlyName", &j.JobFriendlyName) + delete(rawMsg, key) + case "jobId": + err = unpopulate(val, "JobID", &j.JobID) + delete(rawMsg, key) + case "jobScenarioName": + err = unpopulate(val, "JobScenarioName", &j.JobScenarioName) + delete(rawMsg, key) + case "targetInstanceType": + err = unpopulate(val, "TargetInstanceType", &j.TargetInstanceType) + delete(rawMsg, key) + case "targetObjectId": + err = unpopulate(val, "TargetObjectID", &j.TargetObjectID) + delete(rawMsg, key) + case "targetObjectName": + err = unpopulate(val, "TargetObjectName", &j.TargetObjectName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobErrorDetails. +func (j JobErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "creationTime", j.CreationTime) + populate(objectMap, "errorLevel", j.ErrorLevel) + populate(objectMap, "providerErrorDetails", j.ProviderErrorDetails) + populate(objectMap, "serviceErrorDetails", j.ServiceErrorDetails) + populate(objectMap, "taskId", j.TaskID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobErrorDetails. +func (j *JobErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationTime": + err = unpopulateDateTimeRFC3339(val, "CreationTime", &j.CreationTime) + delete(rawMsg, key) + case "errorLevel": + err = unpopulate(val, "ErrorLevel", &j.ErrorLevel) + delete(rawMsg, key) + case "providerErrorDetails": + err = unpopulate(val, "ProviderErrorDetails", &j.ProviderErrorDetails) + delete(rawMsg, key) + case "serviceErrorDetails": + err = unpopulate(val, "ServiceErrorDetails", &j.ServiceErrorDetails) + delete(rawMsg, key) + case "taskId": + err = unpopulate(val, "TaskID", &j.TaskID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobProperties. +func (j JobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activityId", j.ActivityID) + populate(objectMap, "allowedActions", j.AllowedActions) + populate(objectMap, "customDetails", j.CustomDetails) + populateDateTimeRFC3339(objectMap, "endTime", j.EndTime) + populate(objectMap, "errors", j.Errors) + populate(objectMap, "friendlyName", j.FriendlyName) + populate(objectMap, "scenarioName", j.ScenarioName) + populateDateTimeRFC3339(objectMap, "startTime", j.StartTime) + populate(objectMap, "state", j.State) + populate(objectMap, "stateDescription", j.StateDescription) + populate(objectMap, "targetInstanceType", j.TargetInstanceType) + populate(objectMap, "targetObjectId", j.TargetObjectID) + populate(objectMap, "targetObjectName", j.TargetObjectName) + populate(objectMap, "tasks", j.Tasks) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobProperties. +func (j *JobProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activityId": + err = unpopulate(val, "ActivityID", &j.ActivityID) + delete(rawMsg, key) + case "allowedActions": + err = unpopulate(val, "AllowedActions", &j.AllowedActions) + delete(rawMsg, key) + case "customDetails": + j.CustomDetails, err = unmarshalJobDetailsClassification(val) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &j.EndTime) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &j.Errors) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &j.FriendlyName) + delete(rawMsg, key) + case "scenarioName": + err = unpopulate(val, "ScenarioName", &j.ScenarioName) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &j.StartTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &j.State) + delete(rawMsg, key) + case "stateDescription": + err = unpopulate(val, "StateDescription", &j.StateDescription) + delete(rawMsg, key) + case "targetInstanceType": + err = unpopulate(val, "TargetInstanceType", &j.TargetInstanceType) + delete(rawMsg, key) + case "targetObjectId": + err = unpopulate(val, "TargetObjectID", &j.TargetObjectID) + delete(rawMsg, key) + case "targetObjectName": + err = unpopulate(val, "TargetObjectName", &j.TargetObjectName) + delete(rawMsg, key) + case "tasks": + err = unpopulate(val, "Tasks", &j.Tasks) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobQueryParameter. +func (j JobQueryParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectTypes", j.AffectedObjectTypes) + populate(objectMap, "endTime", j.EndTime) + populate(objectMap, "fabricId", j.FabricID) + populate(objectMap, "jobName", j.JobName) + populate(objectMap, "jobOutputType", j.JobOutputType) + populate(objectMap, "jobStatus", j.JobStatus) + populate(objectMap, "startTime", j.StartTime) + populate(objectMap, "timezoneOffset", j.TimezoneOffset) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobQueryParameter. +func (j *JobQueryParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectTypes": + err = unpopulate(val, "AffectedObjectTypes", &j.AffectedObjectTypes) + delete(rawMsg, key) + case "endTime": + err = unpopulate(val, "EndTime", &j.EndTime) + delete(rawMsg, key) + case "fabricId": + err = unpopulate(val, "FabricID", &j.FabricID) + delete(rawMsg, key) + case "jobName": + err = unpopulate(val, "JobName", &j.JobName) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &j.JobOutputType) + delete(rawMsg, key) + case "jobStatus": + err = unpopulate(val, "JobStatus", &j.JobStatus) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &j.StartTime) + delete(rawMsg, key) + case "timezoneOffset": + err = unpopulate(val, "TimezoneOffset", &j.TimezoneOffset) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobStatusEventDetails. +func (j JobStatusEventDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectType", j.AffectedObjectType) + objectMap["instanceType"] = "JobStatus" + populate(objectMap, "jobFriendlyName", j.JobFriendlyName) + populate(objectMap, "jobId", j.JobID) + populate(objectMap, "jobStatus", j.JobStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobStatusEventDetails. +func (j *JobStatusEventDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectType": + err = unpopulate(val, "AffectedObjectType", &j.AffectedObjectType) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &j.InstanceType) + delete(rawMsg, key) + case "jobFriendlyName": + err = unpopulate(val, "JobFriendlyName", &j.JobFriendlyName) + delete(rawMsg, key) + case "jobId": + err = unpopulate(val, "JobID", &j.JobID) + delete(rawMsg, key) + case "jobStatus": + err = unpopulate(val, "JobStatus", &j.JobStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobTaskDetails. +func (j JobTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "JobTaskDetails" + populate(objectMap, "jobTask", j.JobTask) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobTaskDetails. +func (j *JobTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &j.InstanceType) + delete(rawMsg, key) + case "jobTask": + err = unpopulate(val, "JobTask", &j.JobTask) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyEncryptionKeyInfo. +func (k KeyEncryptionKeyInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyIdentifier", k.KeyIdentifier) + populate(objectMap, "keyVaultResourceArmId", k.KeyVaultResourceArmID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyEncryptionKeyInfo. +func (k *KeyEncryptionKeyInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyIdentifier": + err = unpopulate(val, "KeyIdentifier", &k.KeyIdentifier) + delete(rawMsg, key) + case "keyVaultResourceArmId": + err = unpopulate(val, "KeyVaultResourceArmID", &k.KeyVaultResourceArmID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogicalNetwork. +func (l LogicalNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", l.ID) + populate(objectMap, "location", l.Location) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetwork. +func (l *LogicalNetwork) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &l.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogicalNetworkCollection. +func (l LogicalNetworkCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworkCollection. +func (l *LogicalNetworkCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogicalNetworkProperties. +func (l LogicalNetworkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "friendlyName", l.FriendlyName) + populate(objectMap, "logicalNetworkDefinitionsStatus", l.LogicalNetworkDefinitionsStatus) + populate(objectMap, "logicalNetworkUsage", l.LogicalNetworkUsage) + populate(objectMap, "networkVirtualizationStatus", l.NetworkVirtualizationStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogicalNetworkProperties. +func (l *LogicalNetworkProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "friendlyName": + err = unpopulate(val, "FriendlyName", &l.FriendlyName) + delete(rawMsg, key) + case "logicalNetworkDefinitionsStatus": + err = unpopulate(val, "LogicalNetworkDefinitionsStatus", &l.LogicalNetworkDefinitionsStatus) + delete(rawMsg, key) + case "logicalNetworkUsage": + err = unpopulate(val, "LogicalNetworkUsage", &l.LogicalNetworkUsage) + delete(rawMsg, key) + case "networkVirtualizationStatus": + err = unpopulate(val, "NetworkVirtualizationStatus", &l.NetworkVirtualizationStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRunCommandScriptInput. +func (m ManagedRunCommandScriptInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "scriptParameters", m.ScriptParameters) + populate(objectMap, "scriptUrl", m.ScriptURL) + populate(objectMap, "stepName", m.StepName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRunCommandScriptInput. +func (m *ManagedRunCommandScriptInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scriptParameters": + err = unpopulate(val, "ScriptParameters", &m.ScriptParameters) + delete(rawMsg, key) + case "scriptUrl": + err = unpopulate(val, "ScriptURL", &m.ScriptURL) + delete(rawMsg, key) + case "stepName": + err = unpopulate(val, "StepName", &m.StepName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManualActionTaskDetails. +func (m ManualActionTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "ManualActionTaskDetails" + populate(objectMap, "instructions", m.Instructions) + populate(objectMap, "name", m.Name) + populate(objectMap, "observation", m.Observation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManualActionTaskDetails. +func (m *ManualActionTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &m.InstanceType) + delete(rawMsg, key) + case "instructions": + err = unpopulate(val, "Instructions", &m.Instructions) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "observation": + err = unpopulate(val, "Observation", &m.Observation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MarsAgentDetails. +func (m MarsAgentDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "biosId", m.BiosID) + populate(objectMap, "fabricObjectId", m.FabricObjectID) + populate(objectMap, "fqdn", m.Fqdn) + populate(objectMap, "health", m.Health) + populate(objectMap, "healthErrors", m.HealthErrors) + populate(objectMap, "id", m.ID) + populateDateTimeRFC3339(objectMap, "lastHeartbeatUtc", m.LastHeartbeatUTC) + populate(objectMap, "name", m.Name) + populate(objectMap, "version", m.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MarsAgentDetails. +func (m *MarsAgentDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "biosId": + err = unpopulate(val, "BiosID", &m.BiosID) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &m.FabricObjectID) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &m.Fqdn) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &m.Health) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &m.HealthErrors) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "lastHeartbeatUtc": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeatUTC", &m.LastHeartbeatUTC) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &m.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MasterTargetServer. +func (m MasterTargetServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "agentExpiryDate", m.AgentExpiryDate) + populate(objectMap, "agentVersion", m.AgentVersion) + populate(objectMap, "agentVersionDetails", m.AgentVersionDetails) + populate(objectMap, "dataStores", m.DataStores) + populate(objectMap, "diskCount", m.DiskCount) + populate(objectMap, "healthErrors", m.HealthErrors) + populate(objectMap, "id", m.ID) + populate(objectMap, "ipAddress", m.IPAddress) + populateDateTimeRFC3339(objectMap, "lastHeartbeat", m.LastHeartbeat) + populateDateTimeRFC3339(objectMap, "marsAgentExpiryDate", m.MarsAgentExpiryDate) + populate(objectMap, "marsAgentVersion", m.MarsAgentVersion) + populate(objectMap, "marsAgentVersionDetails", m.MarsAgentVersionDetails) + populate(objectMap, "name", m.Name) + populate(objectMap, "osType", m.OSType) + populate(objectMap, "osVersion", m.OSVersion) + populate(objectMap, "retentionVolumes", m.RetentionVolumes) + populate(objectMap, "validationErrors", m.ValidationErrors) + populate(objectMap, "versionStatus", m.VersionStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MasterTargetServer. +func (m *MasterTargetServer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentExpiryDate": + err = unpopulateDateTimeRFC3339(val, "AgentExpiryDate", &m.AgentExpiryDate) + delete(rawMsg, key) + case "agentVersion": + err = unpopulate(val, "AgentVersion", &m.AgentVersion) + delete(rawMsg, key) + case "agentVersionDetails": + err = unpopulate(val, "AgentVersionDetails", &m.AgentVersionDetails) + delete(rawMsg, key) + case "dataStores": + err = unpopulate(val, "DataStores", &m.DataStores) + delete(rawMsg, key) + case "diskCount": + err = unpopulate(val, "DiskCount", &m.DiskCount) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &m.HealthErrors) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &m.IPAddress) + delete(rawMsg, key) + case "lastHeartbeat": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeat", &m.LastHeartbeat) + delete(rawMsg, key) + case "marsAgentExpiryDate": + err = unpopulateDateTimeRFC3339(val, "MarsAgentExpiryDate", &m.MarsAgentExpiryDate) + delete(rawMsg, key) + case "marsAgentVersion": + err = unpopulate(val, "MarsAgentVersion", &m.MarsAgentVersion) + delete(rawMsg, key) + case "marsAgentVersionDetails": + err = unpopulate(val, "MarsAgentVersionDetails", &m.MarsAgentVersionDetails) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &m.OSType) + delete(rawMsg, key) + case "osVersion": + err = unpopulate(val, "OSVersion", &m.OSVersion) + delete(rawMsg, key) + case "retentionVolumes": + err = unpopulate(val, "RetentionVolumes", &m.RetentionVolumes) + delete(rawMsg, key) + case "validationErrors": + err = unpopulate(val, "ValidationErrors", &m.ValidationErrors) + delete(rawMsg, key) + case "versionStatus": + err = unpopulate(val, "VersionStatus", &m.VersionStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateInput. +func (m MigrateInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", m.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateInput. +func (m *MigrateInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateInputProperties. +func (m MigrateInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", m.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateInputProperties. +func (m *MigrateInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + m.ProviderSpecificDetails, err = unmarshalMigrateProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrateProviderSpecificInput. +func (m MigrateProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = m.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrateProviderSpecificInput. +func (m *MigrateProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &m.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationItem. +func (m MigrationItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationItem. +func (m *MigrationItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationItemCollection. +func (m MigrationItemCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationItemCollection. +func (m *MigrationItemCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationItemProperties. +func (m MigrationItemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedOperations", m.AllowedOperations) + populate(objectMap, "criticalJobHistory", m.CriticalJobHistory) + populate(objectMap, "currentJob", m.CurrentJob) + populate(objectMap, "eventCorrelationId", m.EventCorrelationID) + populate(objectMap, "health", m.Health) + populate(objectMap, "healthErrors", m.HealthErrors) + populate(objectMap, "lastMigrationStatus", m.LastMigrationStatus) + populateDateTimeRFC3339(objectMap, "lastMigrationTime", m.LastMigrationTime) + populate(objectMap, "lastTestMigrationStatus", m.LastTestMigrationStatus) + populateDateTimeRFC3339(objectMap, "lastTestMigrationTime", m.LastTestMigrationTime) + populate(objectMap, "machineName", m.MachineName) + populate(objectMap, "migrationState", m.MigrationState) + populate(objectMap, "migrationStateDescription", m.MigrationStateDescription) + populate(objectMap, "policyFriendlyName", m.PolicyFriendlyName) + populate(objectMap, "policyId", m.PolicyID) + populate(objectMap, "providerSpecificDetails", m.ProviderSpecificDetails) + populate(objectMap, "recoveryServicesProviderId", m.RecoveryServicesProviderID) + populate(objectMap, "replicationStatus", m.ReplicationStatus) + populate(objectMap, "testMigrateState", m.TestMigrateState) + populate(objectMap, "testMigrateStateDescription", m.TestMigrateStateDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationItemProperties. +func (m *MigrationItemProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedOperations": + err = unpopulate(val, "AllowedOperations", &m.AllowedOperations) + delete(rawMsg, key) + case "criticalJobHistory": + err = unpopulate(val, "CriticalJobHistory", &m.CriticalJobHistory) + delete(rawMsg, key) + case "currentJob": + err = unpopulate(val, "CurrentJob", &m.CurrentJob) + delete(rawMsg, key) + case "eventCorrelationId": + err = unpopulate(val, "EventCorrelationID", &m.EventCorrelationID) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &m.Health) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &m.HealthErrors) + delete(rawMsg, key) + case "lastMigrationStatus": + err = unpopulate(val, "LastMigrationStatus", &m.LastMigrationStatus) + delete(rawMsg, key) + case "lastMigrationTime": + err = unpopulateDateTimeRFC3339(val, "LastMigrationTime", &m.LastMigrationTime) + delete(rawMsg, key) + case "lastTestMigrationStatus": + err = unpopulate(val, "LastTestMigrationStatus", &m.LastTestMigrationStatus) + delete(rawMsg, key) + case "lastTestMigrationTime": + err = unpopulateDateTimeRFC3339(val, "LastTestMigrationTime", &m.LastTestMigrationTime) + delete(rawMsg, key) + case "machineName": + err = unpopulate(val, "MachineName", &m.MachineName) + delete(rawMsg, key) + case "migrationState": + err = unpopulate(val, "MigrationState", &m.MigrationState) + delete(rawMsg, key) + case "migrationStateDescription": + err = unpopulate(val, "MigrationStateDescription", &m.MigrationStateDescription) + delete(rawMsg, key) + case "policyFriendlyName": + err = unpopulate(val, "PolicyFriendlyName", &m.PolicyFriendlyName) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &m.PolicyID) + delete(rawMsg, key) + case "providerSpecificDetails": + m.ProviderSpecificDetails, err = unmarshalMigrationProviderSpecificSettingsClassification(val) + delete(rawMsg, key) + case "recoveryServicesProviderId": + err = unpopulate(val, "RecoveryServicesProviderID", &m.RecoveryServicesProviderID) + delete(rawMsg, key) + case "replicationStatus": + err = unpopulate(val, "ReplicationStatus", &m.ReplicationStatus) + delete(rawMsg, key) + case "testMigrateState": + err = unpopulate(val, "TestMigrateState", &m.TestMigrateState) + delete(rawMsg, key) + case "testMigrateStateDescription": + err = unpopulate(val, "TestMigrateStateDescription", &m.TestMigrateStateDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationItemsQueryParameter. +func (m MigrationItemsQueryParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceType", m.InstanceType) + populate(objectMap, "sourceContainerName", m.SourceContainerName) + populate(objectMap, "sourceFabricName", m.SourceFabricName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationItemsQueryParameter. +func (m *MigrationItemsQueryParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &m.InstanceType) + delete(rawMsg, key) + case "sourceContainerName": + err = unpopulate(val, "SourceContainerName", &m.SourceContainerName) + delete(rawMsg, key) + case "sourceFabricName": + err = unpopulate(val, "SourceFabricName", &m.SourceFabricName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationProviderSpecificSettings. +func (m MigrationProviderSpecificSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = m.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationProviderSpecificSettings. +func (m *MigrationProviderSpecificSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &m.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationRecoveryPoint. +func (m MigrationRecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationRecoveryPoint. +func (m *MigrationRecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationRecoveryPointCollection. +func (m MigrationRecoveryPointCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationRecoveryPointCollection. +func (m *MigrationRecoveryPointCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MigrationRecoveryPointProperties. +func (m MigrationRecoveryPointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "recoveryPointTime", m.RecoveryPointTime) + populate(objectMap, "recoveryPointType", m.RecoveryPointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MigrationRecoveryPointProperties. +func (m *MigrationRecoveryPointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recoveryPointTime": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTime", &m.RecoveryPointTime) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &m.RecoveryPointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MobilityServiceUpdate. +func (m MobilityServiceUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "osType", m.OSType) + populate(objectMap, "rebootStatus", m.RebootStatus) + populate(objectMap, "version", m.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MobilityServiceUpdate. +func (m *MobilityServiceUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "osType": + err = unpopulate(val, "OSType", &m.OSType) + delete(rawMsg, key) + case "rebootStatus": + err = unpopulate(val, "RebootStatus", &m.RebootStatus) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &m.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Network. +func (n Network) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", n.ID) + populate(objectMap, "location", n.Location) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Network. +func (n *Network) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &n.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkCollection. +func (n NetworkCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkCollection. +func (n *NetworkCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &n.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkMapping. +func (n NetworkMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", n.ID) + populate(objectMap, "location", n.Location) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "type", n.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkMapping. +func (n *NetworkMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &n.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &n.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &n.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &n.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkMappingCollection. +func (n NetworkMappingCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkMappingCollection. +func (n *NetworkMappingCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &n.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkMappingFabricSpecificSettings. +func (n NetworkMappingFabricSpecificSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = n.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkMappingFabricSpecificSettings. +func (n *NetworkMappingFabricSpecificSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &n.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkMappingProperties. +func (n NetworkMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricSpecificSettings", n.FabricSpecificSettings) + populate(objectMap, "primaryFabricFriendlyName", n.PrimaryFabricFriendlyName) + populate(objectMap, "primaryNetworkFriendlyName", n.PrimaryNetworkFriendlyName) + populate(objectMap, "primaryNetworkId", n.PrimaryNetworkID) + populate(objectMap, "recoveryFabricArmId", n.RecoveryFabricArmID) + populate(objectMap, "recoveryFabricFriendlyName", n.RecoveryFabricFriendlyName) + populate(objectMap, "recoveryNetworkFriendlyName", n.RecoveryNetworkFriendlyName) + populate(objectMap, "recoveryNetworkId", n.RecoveryNetworkID) + populate(objectMap, "state", n.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkMappingProperties. +func (n *NetworkMappingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricSpecificSettings": + n.FabricSpecificSettings, err = unmarshalNetworkMappingFabricSpecificSettingsClassification(val) + delete(rawMsg, key) + case "primaryFabricFriendlyName": + err = unpopulate(val, "PrimaryFabricFriendlyName", &n.PrimaryFabricFriendlyName) + delete(rawMsg, key) + case "primaryNetworkFriendlyName": + err = unpopulate(val, "PrimaryNetworkFriendlyName", &n.PrimaryNetworkFriendlyName) + delete(rawMsg, key) + case "primaryNetworkId": + err = unpopulate(val, "PrimaryNetworkID", &n.PrimaryNetworkID) + delete(rawMsg, key) + case "recoveryFabricArmId": + err = unpopulate(val, "RecoveryFabricArmID", &n.RecoveryFabricArmID) + delete(rawMsg, key) + case "recoveryFabricFriendlyName": + err = unpopulate(val, "RecoveryFabricFriendlyName", &n.RecoveryFabricFriendlyName) + delete(rawMsg, key) + case "recoveryNetworkFriendlyName": + err = unpopulate(val, "RecoveryNetworkFriendlyName", &n.RecoveryNetworkFriendlyName) + delete(rawMsg, key) + case "recoveryNetworkId": + err = unpopulate(val, "RecoveryNetworkID", &n.RecoveryNetworkID) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &n.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NetworkProperties. +func (n NetworkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricType", n.FabricType) + populate(objectMap, "friendlyName", n.FriendlyName) + populate(objectMap, "networkType", n.NetworkType) + populate(objectMap, "subnets", n.Subnets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProperties. +func (n *NetworkProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricType": + err = unpopulate(val, "FabricType", &n.FabricType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &n.FriendlyName) + delete(rawMsg, key) + case "networkType": + err = unpopulate(val, "NetworkType", &n.NetworkType) + delete(rawMsg, key) + case "subnets": + err = unpopulate(val, "Subnets", &n.Subnets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NewProtectionProfile. +func (n NewProtectionProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", n.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", n.CrashConsistentFrequencyInMinutes) + populate(objectMap, "multiVmSyncStatus", n.MultiVMSyncStatus) + populate(objectMap, "policyName", n.PolicyName) + populate(objectMap, "recoveryPointHistory", n.RecoveryPointHistory) + objectMap["resourceType"] = "New" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NewProtectionProfile. +func (n *NewProtectionProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &n.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &n.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "multiVmSyncStatus": + err = unpopulate(val, "MultiVMSyncStatus", &n.MultiVMSyncStatus) + delete(rawMsg, key) + case "policyName": + err = unpopulate(val, "PolicyName", &n.PolicyName) + delete(rawMsg, key) + case "recoveryPointHistory": + err = unpopulate(val, "RecoveryPointHistory", &n.RecoveryPointHistory) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &n.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NewRecoveryVirtualNetwork. +func (n NewRecoveryVirtualNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "recoveryVirtualNetworkName", n.RecoveryVirtualNetworkName) + populate(objectMap, "recoveryVirtualNetworkResourceGroupName", n.RecoveryVirtualNetworkResourceGroupName) + objectMap["resourceType"] = "New" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NewRecoveryVirtualNetwork. +func (n *NewRecoveryVirtualNetwork) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "recoveryVirtualNetworkName": + err = unpopulate(val, "RecoveryVirtualNetworkName", &n.RecoveryVirtualNetworkName) + delete(rawMsg, key) + case "recoveryVirtualNetworkResourceGroupName": + err = unpopulate(val, "RecoveryVirtualNetworkResourceGroupName", &n.RecoveryVirtualNetworkResourceGroupName) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &n.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OSDetails. +func (o OSDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "osEdition", o.OSEdition) + populate(objectMap, "oSMajorVersion", o.OSMajorVersion) + populate(objectMap, "oSMinorVersion", o.OSMinorVersion) + populate(objectMap, "osType", o.OSType) + populate(objectMap, "oSVersion", o.OSVersion) + populate(objectMap, "productType", o.ProductType) + populate(objectMap, "userSelectedOSName", o.UserSelectedOSName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OSDetails. +func (o *OSDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "osEdition": + err = unpopulate(val, "OSEdition", &o.OSEdition) + delete(rawMsg, key) + case "oSMajorVersion": + err = unpopulate(val, "OSMajorVersion", &o.OSMajorVersion) + delete(rawMsg, key) + case "oSMinorVersion": + err = unpopulate(val, "OSMinorVersion", &o.OSMinorVersion) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &o.OSType) + delete(rawMsg, key) + case "oSVersion": + err = unpopulate(val, "OSVersion", &o.OSVersion) + delete(rawMsg, key) + case "productType": + err = unpopulate(val, "ProductType", &o.ProductType) + delete(rawMsg, key) + case "userSelectedOSName": + err = unpopulate(val, "UserSelectedOSName", &o.UserSelectedOSName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OSDiskDetails. +func (o OSDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "osType", o.OSType) + populate(objectMap, "osVhdId", o.OSVhdID) + populate(objectMap, "vhdName", o.VhdName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OSDiskDetails. +func (o *OSDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "osType": + err = unpopulate(val, "OSType", &o.OSType) + delete(rawMsg, key) + case "osVhdId": + err = unpopulate(val, "OSVhdID", &o.OSVhdID) + delete(rawMsg, key) + case "vhdName": + err = unpopulate(val, "VhdName", &o.VhdName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OSUpgradeSupportedVersions. +func (o OSUpgradeSupportedVersions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "supportedSourceOsVersion", o.SupportedSourceOsVersion) + populate(objectMap, "supportedTargetOsVersions", o.SupportedTargetOsVersions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OSUpgradeSupportedVersions. +func (o *OSUpgradeSupportedVersions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "supportedSourceOsVersion": + err = unpopulate(val, "SupportedSourceOsVersion", &o.SupportedSourceOsVersion) + delete(rawMsg, key) + case "supportedTargetOsVersions": + err = unpopulate(val, "SupportedTargetOsVersions", &o.SupportedTargetOsVersions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OSVersionWrapper. +func (o OSVersionWrapper) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "servicePack", o.ServicePack) + populate(objectMap, "version", o.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OSVersionWrapper. +func (o *OSVersionWrapper) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "servicePack": + err = unpopulate(val, "ServicePack", &o.ServicePack) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &o.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationsDiscovery. +func (o OperationsDiscovery) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + populateAny(objectMap, "properties", o.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDiscovery. +func (o *OperationsDiscovery) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationsDiscoveryCollection. +func (o OperationsDiscoveryCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDiscoveryCollection. +func (o *OperationsDiscoveryCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PauseReplicationInput. +func (p PauseReplicationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PauseReplicationInput. +func (p *PauseReplicationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PauseReplicationInputProperties. +func (p PauseReplicationInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceType", p.InstanceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PauseReplicationInputProperties. +func (p *PauseReplicationInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &p.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlannedFailoverInput. +func (p PlannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlannedFailoverInput. +func (p *PlannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlannedFailoverInputProperties. +func (p PlannedFailoverInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverDirection", p.FailoverDirection) + populate(objectMap, "providerSpecificDetails", p.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlannedFailoverInputProperties. +func (p *PlannedFailoverInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverDirection": + err = unpopulate(val, "FailoverDirection", &p.FailoverDirection) + delete(rawMsg, key) + case "providerSpecificDetails": + p.ProviderSpecificDetails, err = unmarshalPlannedFailoverProviderSpecificFailoverInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PlannedFailoverProviderSpecificFailoverInput. +func (p PlannedFailoverProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = p.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PlannedFailoverProviderSpecificFailoverInput. +func (p *PlannedFailoverProviderSpecificFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &p.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Policy. +func (p Policy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Policy. +func (p *Policy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyCollection. +func (p PolicyCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyCollection. +func (p *PolicyCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyProperties. +func (p PolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "friendlyName", p.FriendlyName) + populate(objectMap, "providerSpecificDetails", p.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyProperties. +func (p *PolicyProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "friendlyName": + err = unpopulate(val, "FriendlyName", &p.FriendlyName) + delete(rawMsg, key) + case "providerSpecificDetails": + p.ProviderSpecificDetails, err = unmarshalPolicyProviderSpecificDetailsClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyProviderSpecificDetails. +func (p PolicyProviderSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = p.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyProviderSpecificDetails. +func (p *PolicyProviderSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &p.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PolicyProviderSpecificInput. +func (p PolicyProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = p.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyProviderSpecificInput. +func (p *PolicyProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &p.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessServer. +func (p ProcessServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "agentExpiryDate", p.AgentExpiryDate) + populate(objectMap, "agentVersion", p.AgentVersion) + populate(objectMap, "agentVersionDetails", p.AgentVersionDetails) + populate(objectMap, "availableMemoryInBytes", p.AvailableMemoryInBytes) + populate(objectMap, "availableSpaceInBytes", p.AvailableSpaceInBytes) + populate(objectMap, "cpuLoad", p.CPULoad) + populate(objectMap, "cpuLoadStatus", p.CPULoadStatus) + populate(objectMap, "friendlyName", p.FriendlyName) + populate(objectMap, "health", p.Health) + populate(objectMap, "healthErrors", p.HealthErrors) + populate(objectMap, "hostId", p.HostID) + populate(objectMap, "id", p.ID) + populate(objectMap, "ipAddress", p.IPAddress) + populateDateTimeRFC3339(objectMap, "lastHeartbeat", p.LastHeartbeat) + populate(objectMap, "machineCount", p.MachineCount) + populate(objectMap, "marsCommunicationStatus", p.MarsCommunicationStatus) + populate(objectMap, "marsRegistrationStatus", p.MarsRegistrationStatus) + populate(objectMap, "memoryUsageStatus", p.MemoryUsageStatus) + populate(objectMap, "mobilityServiceUpdates", p.MobilityServiceUpdates) + populate(objectMap, "osType", p.OSType) + populate(objectMap, "osVersion", p.OSVersion) + populate(objectMap, "psServiceStatus", p.PsServiceStatus) + populateDateTimeRFC3339(objectMap, "psStatsRefreshTime", p.PsStatsRefreshTime) + populate(objectMap, "replicationPairCount", p.ReplicationPairCount) + populateDateTimeRFC3339(objectMap, "sslCertExpiryDate", p.SSLCertExpiryDate) + populate(objectMap, "sslCertExpiryRemainingDays", p.SSLCertExpiryRemainingDays) + populate(objectMap, "spaceUsageStatus", p.SpaceUsageStatus) + populate(objectMap, "systemLoad", p.SystemLoad) + populate(objectMap, "systemLoadStatus", p.SystemLoadStatus) + populate(objectMap, "throughputInBytes", p.ThroughputInBytes) + populate(objectMap, "throughputInMBps", p.ThroughputInMBps) + populate(objectMap, "throughputStatus", p.ThroughputStatus) + populate(objectMap, "throughputUploadPendingDataInBytes", p.ThroughputUploadPendingDataInBytes) + populate(objectMap, "totalMemoryInBytes", p.TotalMemoryInBytes) + populate(objectMap, "totalSpaceInBytes", p.TotalSpaceInBytes) + populate(objectMap, "versionStatus", p.VersionStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessServer. +func (p *ProcessServer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentExpiryDate": + err = unpopulateDateTimeRFC3339(val, "AgentExpiryDate", &p.AgentExpiryDate) + delete(rawMsg, key) + case "agentVersion": + err = unpopulate(val, "AgentVersion", &p.AgentVersion) + delete(rawMsg, key) + case "agentVersionDetails": + err = unpopulate(val, "AgentVersionDetails", &p.AgentVersionDetails) + delete(rawMsg, key) + case "availableMemoryInBytes": + err = unpopulate(val, "AvailableMemoryInBytes", &p.AvailableMemoryInBytes) + delete(rawMsg, key) + case "availableSpaceInBytes": + err = unpopulate(val, "AvailableSpaceInBytes", &p.AvailableSpaceInBytes) + delete(rawMsg, key) + case "cpuLoad": + err = unpopulate(val, "CPULoad", &p.CPULoad) + delete(rawMsg, key) + case "cpuLoadStatus": + err = unpopulate(val, "CPULoadStatus", &p.CPULoadStatus) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &p.FriendlyName) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &p.Health) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &p.HealthErrors) + delete(rawMsg, key) + case "hostId": + err = unpopulate(val, "HostID", &p.HostID) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &p.IPAddress) + delete(rawMsg, key) + case "lastHeartbeat": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeat", &p.LastHeartbeat) + delete(rawMsg, key) + case "machineCount": + err = unpopulate(val, "MachineCount", &p.MachineCount) + delete(rawMsg, key) + case "marsCommunicationStatus": + err = unpopulate(val, "MarsCommunicationStatus", &p.MarsCommunicationStatus) + delete(rawMsg, key) + case "marsRegistrationStatus": + err = unpopulate(val, "MarsRegistrationStatus", &p.MarsRegistrationStatus) + delete(rawMsg, key) + case "memoryUsageStatus": + err = unpopulate(val, "MemoryUsageStatus", &p.MemoryUsageStatus) + delete(rawMsg, key) + case "mobilityServiceUpdates": + err = unpopulate(val, "MobilityServiceUpdates", &p.MobilityServiceUpdates) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &p.OSType) + delete(rawMsg, key) + case "osVersion": + err = unpopulate(val, "OSVersion", &p.OSVersion) + delete(rawMsg, key) + case "psServiceStatus": + err = unpopulate(val, "PsServiceStatus", &p.PsServiceStatus) + delete(rawMsg, key) + case "psStatsRefreshTime": + err = unpopulateDateTimeRFC3339(val, "PsStatsRefreshTime", &p.PsStatsRefreshTime) + delete(rawMsg, key) + case "replicationPairCount": + err = unpopulate(val, "ReplicationPairCount", &p.ReplicationPairCount) + delete(rawMsg, key) + case "sslCertExpiryDate": + err = unpopulateDateTimeRFC3339(val, "SSLCertExpiryDate", &p.SSLCertExpiryDate) + delete(rawMsg, key) + case "sslCertExpiryRemainingDays": + err = unpopulate(val, "SSLCertExpiryRemainingDays", &p.SSLCertExpiryRemainingDays) + delete(rawMsg, key) + case "spaceUsageStatus": + err = unpopulate(val, "SpaceUsageStatus", &p.SpaceUsageStatus) + delete(rawMsg, key) + case "systemLoad": + err = unpopulate(val, "SystemLoad", &p.SystemLoad) + delete(rawMsg, key) + case "systemLoadStatus": + err = unpopulate(val, "SystemLoadStatus", &p.SystemLoadStatus) + delete(rawMsg, key) + case "throughputInBytes": + err = unpopulate(val, "ThroughputInBytes", &p.ThroughputInBytes) + delete(rawMsg, key) + case "throughputInMBps": + err = unpopulate(val, "ThroughputInMBps", &p.ThroughputInMBps) + delete(rawMsg, key) + case "throughputStatus": + err = unpopulate(val, "ThroughputStatus", &p.ThroughputStatus) + delete(rawMsg, key) + case "throughputUploadPendingDataInBytes": + err = unpopulate(val, "ThroughputUploadPendingDataInBytes", &p.ThroughputUploadPendingDataInBytes) + delete(rawMsg, key) + case "totalMemoryInBytes": + err = unpopulate(val, "TotalMemoryInBytes", &p.TotalMemoryInBytes) + delete(rawMsg, key) + case "totalSpaceInBytes": + err = unpopulate(val, "TotalSpaceInBytes", &p.TotalSpaceInBytes) + delete(rawMsg, key) + case "versionStatus": + err = unpopulate(val, "VersionStatus", &p.VersionStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProcessServerDetails. +func (p ProcessServerDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableMemoryInBytes", p.AvailableMemoryInBytes) + populate(objectMap, "availableSpaceInBytes", p.AvailableSpaceInBytes) + populate(objectMap, "biosId", p.BiosID) + populate(objectMap, "diskUsageStatus", p.DiskUsageStatus) + populate(objectMap, "fabricObjectId", p.FabricObjectID) + populate(objectMap, "fqdn", p.Fqdn) + populate(objectMap, "freeSpacePercentage", p.FreeSpacePercentage) + populate(objectMap, "health", p.Health) + populate(objectMap, "healthErrors", p.HealthErrors) + populate(objectMap, "historicHealth", p.HistoricHealth) + populate(objectMap, "id", p.ID) + populate(objectMap, "ipAddresses", p.IPAddresses) + populateDateTimeRFC3339(objectMap, "lastHeartbeatUtc", p.LastHeartbeatUTC) + populate(objectMap, "memoryUsagePercentage", p.MemoryUsagePercentage) + populate(objectMap, "memoryUsageStatus", p.MemoryUsageStatus) + populate(objectMap, "name", p.Name) + populate(objectMap, "processorUsagePercentage", p.ProcessorUsagePercentage) + populate(objectMap, "processorUsageStatus", p.ProcessorUsageStatus) + populate(objectMap, "protectedItemCount", p.ProtectedItemCount) + populate(objectMap, "systemLoad", p.SystemLoad) + populate(objectMap, "systemLoadStatus", p.SystemLoadStatus) + populate(objectMap, "throughputInBytes", p.ThroughputInBytes) + populate(objectMap, "throughputStatus", p.ThroughputStatus) + populate(objectMap, "throughputUploadPendingDataInBytes", p.ThroughputUploadPendingDataInBytes) + populate(objectMap, "totalMemoryInBytes", p.TotalMemoryInBytes) + populate(objectMap, "totalSpaceInBytes", p.TotalSpaceInBytes) + populate(objectMap, "usedMemoryInBytes", p.UsedMemoryInBytes) + populate(objectMap, "usedSpaceInBytes", p.UsedSpaceInBytes) + populate(objectMap, "version", p.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProcessServerDetails. +func (p *ProcessServerDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableMemoryInBytes": + err = unpopulate(val, "AvailableMemoryInBytes", &p.AvailableMemoryInBytes) + delete(rawMsg, key) + case "availableSpaceInBytes": + err = unpopulate(val, "AvailableSpaceInBytes", &p.AvailableSpaceInBytes) + delete(rawMsg, key) + case "biosId": + err = unpopulate(val, "BiosID", &p.BiosID) + delete(rawMsg, key) + case "diskUsageStatus": + err = unpopulate(val, "DiskUsageStatus", &p.DiskUsageStatus) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &p.FabricObjectID) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &p.Fqdn) + delete(rawMsg, key) + case "freeSpacePercentage": + err = unpopulate(val, "FreeSpacePercentage", &p.FreeSpacePercentage) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &p.Health) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &p.HealthErrors) + delete(rawMsg, key) + case "historicHealth": + err = unpopulate(val, "HistoricHealth", &p.HistoricHealth) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &p.IPAddresses) + delete(rawMsg, key) + case "lastHeartbeatUtc": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeatUTC", &p.LastHeartbeatUTC) + delete(rawMsg, key) + case "memoryUsagePercentage": + err = unpopulate(val, "MemoryUsagePercentage", &p.MemoryUsagePercentage) + delete(rawMsg, key) + case "memoryUsageStatus": + err = unpopulate(val, "MemoryUsageStatus", &p.MemoryUsageStatus) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "processorUsagePercentage": + err = unpopulate(val, "ProcessorUsagePercentage", &p.ProcessorUsagePercentage) + delete(rawMsg, key) + case "processorUsageStatus": + err = unpopulate(val, "ProcessorUsageStatus", &p.ProcessorUsageStatus) + delete(rawMsg, key) + case "protectedItemCount": + err = unpopulate(val, "ProtectedItemCount", &p.ProtectedItemCount) + delete(rawMsg, key) + case "systemLoad": + err = unpopulate(val, "SystemLoad", &p.SystemLoad) + delete(rawMsg, key) + case "systemLoadStatus": + err = unpopulate(val, "SystemLoadStatus", &p.SystemLoadStatus) + delete(rawMsg, key) + case "throughputInBytes": + err = unpopulate(val, "ThroughputInBytes", &p.ThroughputInBytes) + delete(rawMsg, key) + case "throughputStatus": + err = unpopulate(val, "ThroughputStatus", &p.ThroughputStatus) + delete(rawMsg, key) + case "throughputUploadPendingDataInBytes": + err = unpopulate(val, "ThroughputUploadPendingDataInBytes", &p.ThroughputUploadPendingDataInBytes) + delete(rawMsg, key) + case "totalMemoryInBytes": + err = unpopulate(val, "TotalMemoryInBytes", &p.TotalMemoryInBytes) + delete(rawMsg, key) + case "totalSpaceInBytes": + err = unpopulate(val, "TotalSpaceInBytes", &p.TotalSpaceInBytes) + delete(rawMsg, key) + case "usedMemoryInBytes": + err = unpopulate(val, "UsedMemoryInBytes", &p.UsedMemoryInBytes) + delete(rawMsg, key) + case "usedSpaceInBytes": + err = unpopulate(val, "UsedSpaceInBytes", &p.UsedSpaceInBytes) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &p.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectableItem. +func (p ProtectableItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableItem. +func (p *ProtectableItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectableItemCollection. +func (p ProtectableItemCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableItemCollection. +func (p *ProtectableItemCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectableItemProperties. +func (p ProtectableItemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "customDetails", p.CustomDetails) + populate(objectMap, "friendlyName", p.FriendlyName) + populate(objectMap, "protectionReadinessErrors", p.ProtectionReadinessErrors) + populate(objectMap, "protectionStatus", p.ProtectionStatus) + populate(objectMap, "recoveryServicesProviderId", p.RecoveryServicesProviderID) + populate(objectMap, "replicationProtectedItemId", p.ReplicationProtectedItemID) + populate(objectMap, "supportedReplicationProviders", p.SupportedReplicationProviders) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableItemProperties. +func (p *ProtectableItemProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "customDetails": + p.CustomDetails, err = unmarshalConfigurationSettingsClassification(val) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &p.FriendlyName) + delete(rawMsg, key) + case "protectionReadinessErrors": + err = unpopulate(val, "ProtectionReadinessErrors", &p.ProtectionReadinessErrors) + delete(rawMsg, key) + case "protectionStatus": + err = unpopulate(val, "ProtectionStatus", &p.ProtectionStatus) + delete(rawMsg, key) + case "recoveryServicesProviderId": + err = unpopulate(val, "RecoveryServicesProviderID", &p.RecoveryServicesProviderID) + delete(rawMsg, key) + case "replicationProtectedItemId": + err = unpopulate(val, "ReplicationProtectedItemID", &p.ReplicationProtectedItemID) + delete(rawMsg, key) + case "supportedReplicationProviders": + err = unpopulate(val, "SupportedReplicationProviders", &p.SupportedReplicationProviders) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectableItemQueryParameter. +func (p ProtectableItemQueryParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", p.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectableItemQueryParameter. +func (p *ProtectableItemQueryParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectedClustersQueryParameter. +func (p ProtectedClustersQueryParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceType", p.InstanceType) + populate(objectMap, "sourceFabricLocation", p.SourceFabricLocation) + populate(objectMap, "sourceFabricName", p.SourceFabricName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedClustersQueryParameter. +func (p *ProtectedClustersQueryParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &p.InstanceType) + delete(rawMsg, key) + case "sourceFabricLocation": + err = unpopulate(val, "SourceFabricLocation", &p.SourceFabricLocation) + delete(rawMsg, key) + case "sourceFabricName": + err = unpopulate(val, "SourceFabricName", &p.SourceFabricName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectedItemsQueryParameter. +func (p ProtectedItemsQueryParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricObjectId", p.FabricObjectID) + populate(objectMap, "instanceType", p.InstanceType) + populate(objectMap, "multiVmGroupCreateOption", p.MultiVMGroupCreateOption) + populate(objectMap, "processServerId", p.ProcessServerID) + populate(objectMap, "recoveryPlanName", p.RecoveryPlanName) + populate(objectMap, "sourceFabricLocation", p.SourceFabricLocation) + populate(objectMap, "sourceFabricName", p.SourceFabricName) + populate(objectMap, "vCenterName", p.VCenterName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectedItemsQueryParameter. +func (p *ProtectedItemsQueryParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &p.FabricObjectID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &p.InstanceType) + delete(rawMsg, key) + case "multiVmGroupCreateOption": + err = unpopulate(val, "MultiVMGroupCreateOption", &p.MultiVMGroupCreateOption) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &p.ProcessServerID) + delete(rawMsg, key) + case "recoveryPlanName": + err = unpopulate(val, "RecoveryPlanName", &p.RecoveryPlanName) + delete(rawMsg, key) + case "sourceFabricLocation": + err = unpopulate(val, "SourceFabricLocation", &p.SourceFabricLocation) + delete(rawMsg, key) + case "sourceFabricName": + err = unpopulate(val, "SourceFabricName", &p.SourceFabricName) + delete(rawMsg, key) + case "vCenterName": + err = unpopulate(val, "VCenterName", &p.VCenterName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainer. +func (p ProtectionContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainer. +func (p *ProtectionContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerCollection. +func (p ProtectionContainerCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerCollection. +func (p *ProtectionContainerCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerFabricSpecificDetails. +func (p ProtectionContainerFabricSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceType", p.InstanceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerFabricSpecificDetails. +func (p *ProtectionContainerFabricSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &p.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerMapping. +func (p ProtectionContainerMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerMapping. +func (p *ProtectionContainerMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerMappingCollection. +func (p ProtectionContainerMappingCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerMappingCollection. +func (p *ProtectionContainerMappingCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerMappingProperties. +func (p ProtectionContainerMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "health", p.Health) + populate(objectMap, "healthErrorDetails", p.HealthErrorDetails) + populate(objectMap, "policyFriendlyName", p.PolicyFriendlyName) + populate(objectMap, "policyId", p.PolicyID) + populate(objectMap, "providerSpecificDetails", p.ProviderSpecificDetails) + populate(objectMap, "sourceFabricFriendlyName", p.SourceFabricFriendlyName) + populate(objectMap, "sourceProtectionContainerFriendlyName", p.SourceProtectionContainerFriendlyName) + populate(objectMap, "state", p.State) + populate(objectMap, "targetFabricFriendlyName", p.TargetFabricFriendlyName) + populate(objectMap, "targetProtectionContainerFriendlyName", p.TargetProtectionContainerFriendlyName) + populate(objectMap, "targetProtectionContainerId", p.TargetProtectionContainerID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerMappingProperties. +func (p *ProtectionContainerMappingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "health": + err = unpopulate(val, "Health", &p.Health) + delete(rawMsg, key) + case "healthErrorDetails": + err = unpopulate(val, "HealthErrorDetails", &p.HealthErrorDetails) + delete(rawMsg, key) + case "policyFriendlyName": + err = unpopulate(val, "PolicyFriendlyName", &p.PolicyFriendlyName) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &p.PolicyID) + delete(rawMsg, key) + case "providerSpecificDetails": + p.ProviderSpecificDetails, err = unmarshalProtectionContainerMappingProviderSpecificDetailsClassification(val) + delete(rawMsg, key) + case "sourceFabricFriendlyName": + err = unpopulate(val, "SourceFabricFriendlyName", &p.SourceFabricFriendlyName) + delete(rawMsg, key) + case "sourceProtectionContainerFriendlyName": + err = unpopulate(val, "SourceProtectionContainerFriendlyName", &p.SourceProtectionContainerFriendlyName) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + case "targetFabricFriendlyName": + err = unpopulate(val, "TargetFabricFriendlyName", &p.TargetFabricFriendlyName) + delete(rawMsg, key) + case "targetProtectionContainerFriendlyName": + err = unpopulate(val, "TargetProtectionContainerFriendlyName", &p.TargetProtectionContainerFriendlyName) + delete(rawMsg, key) + case "targetProtectionContainerId": + err = unpopulate(val, "TargetProtectionContainerID", &p.TargetProtectionContainerID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerMappingProviderSpecificDetails. +func (p ProtectionContainerMappingProviderSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = p.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerMappingProviderSpecificDetails. +func (p *ProtectionContainerMappingProviderSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &p.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionContainerProperties. +func (p ProtectionContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricFriendlyName", p.FabricFriendlyName) + populate(objectMap, "fabricSpecificDetails", p.FabricSpecificDetails) + populate(objectMap, "fabricType", p.FabricType) + populate(objectMap, "friendlyName", p.FriendlyName) + populate(objectMap, "pairingStatus", p.PairingStatus) + populate(objectMap, "protectedItemCount", p.ProtectedItemCount) + populate(objectMap, "role", p.Role) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionContainerProperties. +func (p *ProtectionContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricFriendlyName": + err = unpopulate(val, "FabricFriendlyName", &p.FabricFriendlyName) + delete(rawMsg, key) + case "fabricSpecificDetails": + err = unpopulate(val, "FabricSpecificDetails", &p.FabricSpecificDetails) + delete(rawMsg, key) + case "fabricType": + err = unpopulate(val, "FabricType", &p.FabricType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &p.FriendlyName) + delete(rawMsg, key) + case "pairingStatus": + err = unpopulate(val, "PairingStatus", &p.PairingStatus) + delete(rawMsg, key) + case "protectedItemCount": + err = unpopulate(val, "ProtectedItemCount", &p.ProtectedItemCount) + delete(rawMsg, key) + case "role": + err = unpopulate(val, "Role", &p.Role) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProtectionProfileCustomDetails. +func (p ProtectionProfileCustomDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["resourceType"] = p.ResourceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProtectionProfileCustomDetails. +func (p *ProtectionProfileCustomDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceType": + err = unpopulate(val, "ResourceType", &p.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProviderError. +func (p ProviderError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", p.ErrorCode) + populate(objectMap, "errorId", p.ErrorID) + populate(objectMap, "errorMessage", p.ErrorMessage) + populate(objectMap, "possibleCauses", p.PossibleCauses) + populate(objectMap, "recommendedAction", p.RecommendedAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderError. +func (p *ProviderError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &p.ErrorCode) + delete(rawMsg, key) + case "errorId": + err = unpopulate(val, "ErrorID", &p.ErrorID) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &p.ErrorMessage) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &p.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &p.RecommendedAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProviderSpecificRecoveryPointDetails. +func (p ProviderSpecificRecoveryPointDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = p.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProviderSpecificRecoveryPointDetails. +func (p *ProviderSpecificRecoveryPointDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &p.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PushInstallerDetails. +func (p PushInstallerDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "biosId", p.BiosID) + populate(objectMap, "fabricObjectId", p.FabricObjectID) + populate(objectMap, "fqdn", p.Fqdn) + populate(objectMap, "health", p.Health) + populate(objectMap, "healthErrors", p.HealthErrors) + populate(objectMap, "id", p.ID) + populateDateTimeRFC3339(objectMap, "lastHeartbeatUtc", p.LastHeartbeatUTC) + populate(objectMap, "name", p.Name) + populate(objectMap, "version", p.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PushInstallerDetails. +func (p *PushInstallerDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "biosId": + err = unpopulate(val, "BiosID", &p.BiosID) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &p.FabricObjectID) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &p.Fqdn) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &p.Health) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &p.HealthErrors) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "lastHeartbeatUtc": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeatUTC", &p.LastHeartbeatUTC) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &p.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RcmProxyDetails. +func (r RcmProxyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "biosId", r.BiosID) + populate(objectMap, "clientAuthenticationType", r.ClientAuthenticationType) + populate(objectMap, "fabricObjectId", r.FabricObjectID) + populate(objectMap, "fqdn", r.Fqdn) + populate(objectMap, "health", r.Health) + populate(objectMap, "healthErrors", r.HealthErrors) + populate(objectMap, "id", r.ID) + populateDateTimeRFC3339(objectMap, "lastHeartbeatUtc", r.LastHeartbeatUTC) + populate(objectMap, "name", r.Name) + populate(objectMap, "version", r.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RcmProxyDetails. +func (r *RcmProxyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "biosId": + err = unpopulate(val, "BiosID", &r.BiosID) + delete(rawMsg, key) + case "clientAuthenticationType": + err = unpopulate(val, "ClientAuthenticationType", &r.ClientAuthenticationType) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &r.FabricObjectID) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &r.Fqdn) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &r.Health) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &r.HealthErrors) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "lastHeartbeatUtc": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeatUTC", &r.LastHeartbeatUTC) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &r.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryAvailabilitySetCustomDetails. +func (r RecoveryAvailabilitySetCustomDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["resourceType"] = r.ResourceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryAvailabilitySetCustomDetails. +func (r *RecoveryAvailabilitySetCustomDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceType": + err = unpopulate(val, "ResourceType", &r.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlan. +func (r RecoveryPlan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlan. +func (r *RecoveryPlan) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanA2ADetails. +func (r RecoveryPlanA2ADetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2A" + populate(objectMap, "primaryExtendedLocation", r.PrimaryExtendedLocation) + populate(objectMap, "primaryZone", r.PrimaryZone) + populate(objectMap, "recoveryExtendedLocation", r.RecoveryExtendedLocation) + populate(objectMap, "recoveryZone", r.RecoveryZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanA2ADetails. +func (r *RecoveryPlanA2ADetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "primaryExtendedLocation": + err = unpopulate(val, "PrimaryExtendedLocation", &r.PrimaryExtendedLocation) + delete(rawMsg, key) + case "primaryZone": + err = unpopulate(val, "PrimaryZone", &r.PrimaryZone) + delete(rawMsg, key) + case "recoveryExtendedLocation": + err = unpopulate(val, "RecoveryExtendedLocation", &r.RecoveryExtendedLocation) + delete(rawMsg, key) + case "recoveryZone": + err = unpopulate(val, "RecoveryZone", &r.RecoveryZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanA2AFailoverInput. +func (r RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cloudServiceCreationOption", r.CloudServiceCreationOption) + objectMap["instanceType"] = "A2A" + populate(objectMap, "multiVmSyncPointOption", r.MultiVMSyncPointOption) + populate(objectMap, "recoveryPointType", r.RecoveryPointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanA2AFailoverInput. +func (r *RecoveryPlanA2AFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cloudServiceCreationOption": + err = unpopulate(val, "CloudServiceCreationOption", &r.CloudServiceCreationOption) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "multiVmSyncPointOption": + err = unpopulate(val, "MultiVMSyncPointOption", &r.MultiVMSyncPointOption) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanA2AInput. +func (r RecoveryPlanA2AInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "A2A" + populate(objectMap, "primaryExtendedLocation", r.PrimaryExtendedLocation) + populate(objectMap, "primaryZone", r.PrimaryZone) + populate(objectMap, "recoveryExtendedLocation", r.RecoveryExtendedLocation) + populate(objectMap, "recoveryZone", r.RecoveryZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanA2AInput. +func (r *RecoveryPlanA2AInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "primaryExtendedLocation": + err = unpopulate(val, "PrimaryExtendedLocation", &r.PrimaryExtendedLocation) + delete(rawMsg, key) + case "primaryZone": + err = unpopulate(val, "PrimaryZone", &r.PrimaryZone) + delete(rawMsg, key) + case "recoveryExtendedLocation": + err = unpopulate(val, "RecoveryExtendedLocation", &r.RecoveryExtendedLocation) + delete(rawMsg, key) + case "recoveryZone": + err = unpopulate(val, "RecoveryZone", &r.RecoveryZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanAction. +func (r RecoveryPlanAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionName", r.ActionName) + populate(objectMap, "customDetails", r.CustomDetails) + populate(objectMap, "failoverDirections", r.FailoverDirections) + populate(objectMap, "failoverTypes", r.FailoverTypes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanAction. +func (r *RecoveryPlanAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionName": + err = unpopulate(val, "ActionName", &r.ActionName) + delete(rawMsg, key) + case "customDetails": + r.CustomDetails, err = unmarshalRecoveryPlanActionDetailsClassification(val) + delete(rawMsg, key) + case "failoverDirections": + err = unpopulate(val, "FailoverDirections", &r.FailoverDirections) + delete(rawMsg, key) + case "failoverTypes": + err = unpopulate(val, "FailoverTypes", &r.FailoverTypes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanActionDetails. +func (r RecoveryPlanActionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanActionDetails. +func (r *RecoveryPlanActionDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanAutomationRunbookActionDetails. +func (r RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricLocation", r.FabricLocation) + objectMap["instanceType"] = "AutomationRunbookActionDetails" + populate(objectMap, "runbookId", r.RunbookID) + populate(objectMap, "timeout", r.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanAutomationRunbookActionDetails. +func (r *RecoveryPlanAutomationRunbookActionDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricLocation": + err = unpopulate(val, "FabricLocation", &r.FabricLocation) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "runbookId": + err = unpopulate(val, "RunbookID", &r.RunbookID) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &r.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanCollection. +func (r RecoveryPlanCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanCollection. +func (r *RecoveryPlanCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanGroup. +func (r RecoveryPlanGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endGroupActions", r.EndGroupActions) + populate(objectMap, "groupType", r.GroupType) + populate(objectMap, "replicationProtectedItems", r.ReplicationProtectedItems) + populate(objectMap, "startGroupActions", r.StartGroupActions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanGroup. +func (r *RecoveryPlanGroup) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endGroupActions": + err = unpopulate(val, "EndGroupActions", &r.EndGroupActions) + delete(rawMsg, key) + case "groupType": + err = unpopulate(val, "GroupType", &r.GroupType) + delete(rawMsg, key) + case "replicationProtectedItems": + err = unpopulate(val, "ReplicationProtectedItems", &r.ReplicationProtectedItems) + delete(rawMsg, key) + case "startGroupActions": + err = unpopulate(val, "StartGroupActions", &r.StartGroupActions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanGroupTaskDetails. +func (r RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "childTasks", r.ChildTasks) + populate(objectMap, "groupId", r.GroupID) + objectMap["instanceType"] = "RecoveryPlanGroupTaskDetails" + populate(objectMap, "name", r.Name) + populate(objectMap, "rpGroupType", r.RpGroupType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanGroupTaskDetails. +func (r *RecoveryPlanGroupTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "childTasks": + err = unpopulate(val, "ChildTasks", &r.ChildTasks) + delete(rawMsg, key) + case "groupId": + err = unpopulate(val, "GroupID", &r.GroupID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "rpGroupType": + err = unpopulate(val, "RpGroupType", &r.RpGroupType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanHyperVReplicaAzureFailbackInput. +func (r RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataSyncOption", r.DataSyncOption) + objectMap["instanceType"] = "HyperVReplicaAzureFailback" + populate(objectMap, "recoveryVmCreationOption", r.RecoveryVMCreationOption) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanHyperVReplicaAzureFailbackInput. +func (r *RecoveryPlanHyperVReplicaAzureFailbackInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataSyncOption": + err = unpopulate(val, "DataSyncOption", &r.DataSyncOption) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "recoveryVmCreationOption": + err = unpopulate(val, "RecoveryVMCreationOption", &r.RecoveryVMCreationOption) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanHyperVReplicaAzureFailoverInput. +func (r RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "HyperVReplicaAzure" + populate(objectMap, "primaryKekCertificatePfx", r.PrimaryKekCertificatePfx) + populate(objectMap, "recoveryPointType", r.RecoveryPointType) + populate(objectMap, "secondaryKekCertificatePfx", r.SecondaryKekCertificatePfx) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanHyperVReplicaAzureFailoverInput. +func (r *RecoveryPlanHyperVReplicaAzureFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "primaryKekCertificatePfx": + err = unpopulate(val, "PrimaryKekCertificatePfx", &r.PrimaryKekCertificatePfx) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) + delete(rawMsg, key) + case "secondaryKekCertificatePfx": + err = unpopulate(val, "SecondaryKekCertificatePfx", &r.SecondaryKekCertificatePfx) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanInMageAzureV2FailoverInput. +func (r RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageAzureV2" + populate(objectMap, "recoveryPointType", r.RecoveryPointType) + populate(objectMap, "useMultiVmSyncPoint", r.UseMultiVMSyncPoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanInMageAzureV2FailoverInput. +func (r *RecoveryPlanInMageAzureV2FailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) + delete(rawMsg, key) + case "useMultiVmSyncPoint": + err = unpopulate(val, "UseMultiVMSyncPoint", &r.UseMultiVMSyncPoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanInMageFailoverInput. +func (r RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMage" + populate(objectMap, "recoveryPointType", r.RecoveryPointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanInMageFailoverInput. +func (r *RecoveryPlanInMageFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanInMageRcmFailbackFailoverInput. +func (r RecoveryPlanInMageRcmFailbackFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcmFailback" + populate(objectMap, "recoveryPointType", r.RecoveryPointType) + populate(objectMap, "useMultiVmSyncPoint", r.UseMultiVMSyncPoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanInMageRcmFailbackFailoverInput. +func (r *RecoveryPlanInMageRcmFailbackFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) + delete(rawMsg, key) + case "useMultiVmSyncPoint": + err = unpopulate(val, "UseMultiVMSyncPoint", &r.UseMultiVMSyncPoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanInMageRcmFailoverInput. +func (r RecoveryPlanInMageRcmFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "InMageRcm" + populate(objectMap, "recoveryPointType", r.RecoveryPointType) + populate(objectMap, "useMultiVmSyncPoint", r.UseMultiVMSyncPoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanInMageRcmFailoverInput. +func (r *RecoveryPlanInMageRcmFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) + delete(rawMsg, key) + case "useMultiVmSyncPoint": + err = unpopulate(val, "UseMultiVMSyncPoint", &r.UseMultiVMSyncPoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanManualActionDetails. +func (r RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + objectMap["instanceType"] = "ManualActionDetails" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanManualActionDetails. +func (r *RecoveryPlanManualActionDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanPlannedFailoverInput. +func (r RecoveryPlanPlannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanPlannedFailoverInput. +func (r *RecoveryPlanPlannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanPlannedFailoverInputProperties. +func (r RecoveryPlanPlannedFailoverInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverDirection", r.FailoverDirection) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanPlannedFailoverInputProperties. +func (r *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverDirection": + err = unpopulate(val, "FailoverDirection", &r.FailoverDirection) + delete(rawMsg, key) + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalRecoveryPlanProviderSpecificFailoverInputClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanProperties. +func (r RecoveryPlanProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedOperations", r.AllowedOperations) + populate(objectMap, "currentScenario", r.CurrentScenario) + populate(objectMap, "currentScenarioStatus", r.CurrentScenarioStatus) + populate(objectMap, "currentScenarioStatusDescription", r.CurrentScenarioStatusDescription) + populate(objectMap, "failoverDeploymentModel", r.FailoverDeploymentModel) + populate(objectMap, "friendlyName", r.FriendlyName) + populate(objectMap, "groups", r.Groups) + populateDateTimeRFC3339(objectMap, "lastPlannedFailoverTime", r.LastPlannedFailoverTime) + populateDateTimeRFC3339(objectMap, "lastTestFailoverTime", r.LastTestFailoverTime) + populateDateTimeRFC3339(objectMap, "lastUnplannedFailoverTime", r.LastUnplannedFailoverTime) + populate(objectMap, "primaryFabricFriendlyName", r.PrimaryFabricFriendlyName) + populate(objectMap, "primaryFabricId", r.PrimaryFabricID) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + populate(objectMap, "recoveryFabricFriendlyName", r.RecoveryFabricFriendlyName) + populate(objectMap, "recoveryFabricId", r.RecoveryFabricID) + populate(objectMap, "replicationProviders", r.ReplicationProviders) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanProperties. +func (r *RecoveryPlanProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedOperations": + err = unpopulate(val, "AllowedOperations", &r.AllowedOperations) + delete(rawMsg, key) + case "currentScenario": + err = unpopulate(val, "CurrentScenario", &r.CurrentScenario) + delete(rawMsg, key) + case "currentScenarioStatus": + err = unpopulate(val, "CurrentScenarioStatus", &r.CurrentScenarioStatus) + delete(rawMsg, key) + case "currentScenarioStatusDescription": + err = unpopulate(val, "CurrentScenarioStatusDescription", &r.CurrentScenarioStatusDescription) + delete(rawMsg, key) + case "failoverDeploymentModel": + err = unpopulate(val, "FailoverDeploymentModel", &r.FailoverDeploymentModel) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &r.FriendlyName) + delete(rawMsg, key) + case "groups": + err = unpopulate(val, "Groups", &r.Groups) + delete(rawMsg, key) + case "lastPlannedFailoverTime": + err = unpopulateDateTimeRFC3339(val, "LastPlannedFailoverTime", &r.LastPlannedFailoverTime) + delete(rawMsg, key) + case "lastTestFailoverTime": + err = unpopulateDateTimeRFC3339(val, "LastTestFailoverTime", &r.LastTestFailoverTime) + delete(rawMsg, key) + case "lastUnplannedFailoverTime": + err = unpopulateDateTimeRFC3339(val, "LastUnplannedFailoverTime", &r.LastUnplannedFailoverTime) + delete(rawMsg, key) + case "primaryFabricFriendlyName": + err = unpopulate(val, "PrimaryFabricFriendlyName", &r.PrimaryFabricFriendlyName) + delete(rawMsg, key) + case "primaryFabricId": + err = unpopulate(val, "PrimaryFabricID", &r.PrimaryFabricID) + delete(rawMsg, key) + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalRecoveryPlanProviderSpecificDetailsClassificationArray(val) + delete(rawMsg, key) + case "recoveryFabricFriendlyName": + err = unpopulate(val, "RecoveryFabricFriendlyName", &r.RecoveryFabricFriendlyName) + delete(rawMsg, key) + case "recoveryFabricId": + err = unpopulate(val, "RecoveryFabricID", &r.RecoveryFabricID) + delete(rawMsg, key) + case "replicationProviders": + err = unpopulate(val, "ReplicationProviders", &r.ReplicationProviders) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanProtectedItem. +func (r RecoveryPlanProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "virtualMachineId", r.VirtualMachineID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanProtectedItem. +func (r *RecoveryPlanProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "virtualMachineId": + err = unpopulate(val, "VirtualMachineID", &r.VirtualMachineID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanProviderSpecificDetails. +func (r RecoveryPlanProviderSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanProviderSpecificDetails. +func (r *RecoveryPlanProviderSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanProviderSpecificFailoverInput. +func (r RecoveryPlanProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanProviderSpecificFailoverInput. +func (r *RecoveryPlanProviderSpecificFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanProviderSpecificInput. +func (r RecoveryPlanProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanProviderSpecificInput. +func (r *RecoveryPlanProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanScriptActionDetails. +func (r RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricLocation", r.FabricLocation) + objectMap["instanceType"] = "ScriptActionDetails" + populate(objectMap, "path", r.Path) + populate(objectMap, "timeout", r.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanScriptActionDetails. +func (r *RecoveryPlanScriptActionDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricLocation": + err = unpopulate(val, "FabricLocation", &r.FabricLocation) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &r.Path) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &r.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanShutdownGroupTaskDetails. +func (r RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "childTasks", r.ChildTasks) + populate(objectMap, "groupId", r.GroupID) + objectMap["instanceType"] = "RecoveryPlanShutdownGroupTaskDetails" + populate(objectMap, "name", r.Name) + populate(objectMap, "rpGroupType", r.RpGroupType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanShutdownGroupTaskDetails. +func (r *RecoveryPlanShutdownGroupTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "childTasks": + err = unpopulate(val, "ChildTasks", &r.ChildTasks) + delete(rawMsg, key) + case "groupId": + err = unpopulate(val, "GroupID", &r.GroupID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "rpGroupType": + err = unpopulate(val, "RpGroupType", &r.RpGroupType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanTestFailoverCleanupInput. +func (r RecoveryPlanTestFailoverCleanupInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanTestFailoverCleanupInput. +func (r *RecoveryPlanTestFailoverCleanupInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanTestFailoverCleanupInputProperties. +func (r RecoveryPlanTestFailoverCleanupInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "comments", r.Comments) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanTestFailoverCleanupInputProperties. +func (r *RecoveryPlanTestFailoverCleanupInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "comments": + err = unpopulate(val, "Comments", &r.Comments) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanTestFailoverInput. +func (r RecoveryPlanTestFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanTestFailoverInput. +func (r *RecoveryPlanTestFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanTestFailoverInputProperties. +func (r RecoveryPlanTestFailoverInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverDirection", r.FailoverDirection) + populate(objectMap, "networkId", r.NetworkID) + populate(objectMap, "networkType", r.NetworkType) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanTestFailoverInputProperties. +func (r *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverDirection": + err = unpopulate(val, "FailoverDirection", &r.FailoverDirection) + delete(rawMsg, key) + case "networkId": + err = unpopulate(val, "NetworkID", &r.NetworkID) + delete(rawMsg, key) + case "networkType": + err = unpopulate(val, "NetworkType", &r.NetworkType) + delete(rawMsg, key) + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalRecoveryPlanProviderSpecificFailoverInputClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanUnplannedFailoverInput. +func (r RecoveryPlanUnplannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanUnplannedFailoverInput. +func (r *RecoveryPlanUnplannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPlanUnplannedFailoverInputProperties. +func (r RecoveryPlanUnplannedFailoverInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverDirection", r.FailoverDirection) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + populate(objectMap, "sourceSiteOperations", r.SourceSiteOperations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPlanUnplannedFailoverInputProperties. +func (r *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverDirection": + err = unpopulate(val, "FailoverDirection", &r.FailoverDirection) + delete(rawMsg, key) + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalRecoveryPlanProviderSpecificFailoverInputClassificationArray(val) + delete(rawMsg, key) + case "sourceSiteOperations": + err = unpopulate(val, "SourceSiteOperations", &r.SourceSiteOperations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPoint. +func (r RecoveryPoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPoint. +func (r *RecoveryPoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointCollection. +func (r RecoveryPointCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointCollection. +func (r *RecoveryPointCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryPointProperties. +func (r RecoveryPointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + populateDateTimeRFC3339(objectMap, "recoveryPointTime", r.RecoveryPointTime) + populate(objectMap, "recoveryPointType", r.RecoveryPointType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryPointProperties. +func (r *RecoveryPointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalProviderSpecificRecoveryPointDetailsClassification(val) + delete(rawMsg, key) + case "recoveryPointTime": + err = unpopulateDateTimeRFC3339(val, "RecoveryPointTime", &r.RecoveryPointTime) + delete(rawMsg, key) + case "recoveryPointType": + err = unpopulate(val, "RecoveryPointType", &r.RecoveryPointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryProximityPlacementGroupCustomDetails. +func (r RecoveryProximityPlacementGroupCustomDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["resourceType"] = r.ResourceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryProximityPlacementGroupCustomDetails. +func (r *RecoveryProximityPlacementGroupCustomDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceType": + err = unpopulate(val, "ResourceType", &r.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryResourceGroupCustomDetails. +func (r RecoveryResourceGroupCustomDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["resourceType"] = r.ResourceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryResourceGroupCustomDetails. +func (r *RecoveryResourceGroupCustomDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceType": + err = unpopulate(val, "ResourceType", &r.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryServicesProvider. +func (r RecoveryServicesProvider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryServicesProvider. +func (r *RecoveryServicesProvider) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryServicesProviderCollection. +func (r RecoveryServicesProviderCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryServicesProviderCollection. +func (r *RecoveryServicesProviderCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryServicesProviderProperties. +func (r RecoveryServicesProviderProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedScenarios", r.AllowedScenarios) + populate(objectMap, "authenticationIdentityDetails", r.AuthenticationIdentityDetails) + populate(objectMap, "biosId", r.BiosID) + populate(objectMap, "connectionStatus", r.ConnectionStatus) + populate(objectMap, "dataPlaneAuthenticationIdentityDetails", r.DataPlaneAuthenticationIdentityDetails) + populate(objectMap, "draIdentifier", r.DraIdentifier) + populate(objectMap, "fabricFriendlyName", r.FabricFriendlyName) + populate(objectMap, "fabricType", r.FabricType) + populate(objectMap, "friendlyName", r.FriendlyName) + populate(objectMap, "healthErrorDetails", r.HealthErrorDetails) + populateDateTimeRFC3339(objectMap, "lastHeartBeat", r.LastHeartBeat) + populate(objectMap, "machineId", r.MachineID) + populate(objectMap, "machineName", r.MachineName) + populate(objectMap, "protectedItemCount", r.ProtectedItemCount) + populate(objectMap, "providerVersion", r.ProviderVersion) + populate(objectMap, "providerVersionDetails", r.ProviderVersionDetails) + populateDateTimeRFC3339(objectMap, "providerVersionExpiryDate", r.ProviderVersionExpiryDate) + populate(objectMap, "providerVersionState", r.ProviderVersionState) + populate(objectMap, "resourceAccessIdentityDetails", r.ResourceAccessIdentityDetails) + populate(objectMap, "serverVersion", r.ServerVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryServicesProviderProperties. +func (r *RecoveryServicesProviderProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedScenarios": + err = unpopulate(val, "AllowedScenarios", &r.AllowedScenarios) + delete(rawMsg, key) + case "authenticationIdentityDetails": + err = unpopulate(val, "AuthenticationIdentityDetails", &r.AuthenticationIdentityDetails) + delete(rawMsg, key) + case "biosId": + err = unpopulate(val, "BiosID", &r.BiosID) + delete(rawMsg, key) + case "connectionStatus": + err = unpopulate(val, "ConnectionStatus", &r.ConnectionStatus) + delete(rawMsg, key) + case "dataPlaneAuthenticationIdentityDetails": + err = unpopulate(val, "DataPlaneAuthenticationIdentityDetails", &r.DataPlaneAuthenticationIdentityDetails) + delete(rawMsg, key) + case "draIdentifier": + err = unpopulate(val, "DraIdentifier", &r.DraIdentifier) + delete(rawMsg, key) + case "fabricFriendlyName": + err = unpopulate(val, "FabricFriendlyName", &r.FabricFriendlyName) + delete(rawMsg, key) + case "fabricType": + err = unpopulate(val, "FabricType", &r.FabricType) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &r.FriendlyName) + delete(rawMsg, key) + case "healthErrorDetails": + err = unpopulate(val, "HealthErrorDetails", &r.HealthErrorDetails) + delete(rawMsg, key) + case "lastHeartBeat": + err = unpopulateDateTimeRFC3339(val, "LastHeartBeat", &r.LastHeartBeat) + delete(rawMsg, key) + case "machineId": + err = unpopulate(val, "MachineID", &r.MachineID) + delete(rawMsg, key) + case "machineName": + err = unpopulate(val, "MachineName", &r.MachineName) + delete(rawMsg, key) + case "protectedItemCount": + err = unpopulate(val, "ProtectedItemCount", &r.ProtectedItemCount) + delete(rawMsg, key) + case "providerVersion": + err = unpopulate(val, "ProviderVersion", &r.ProviderVersion) + delete(rawMsg, key) + case "providerVersionDetails": + err = unpopulate(val, "ProviderVersionDetails", &r.ProviderVersionDetails) + delete(rawMsg, key) + case "providerVersionExpiryDate": + err = unpopulateDateTimeRFC3339(val, "ProviderVersionExpiryDate", &r.ProviderVersionExpiryDate) + delete(rawMsg, key) + case "providerVersionState": + err = unpopulate(val, "ProviderVersionState", &r.ProviderVersionState) + delete(rawMsg, key) + case "resourceAccessIdentityDetails": + err = unpopulate(val, "ResourceAccessIdentityDetails", &r.ResourceAccessIdentityDetails) + delete(rawMsg, key) + case "serverVersion": + err = unpopulate(val, "ServerVersion", &r.ServerVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecoveryVirtualNetworkCustomDetails. +func (r RecoveryVirtualNetworkCustomDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["resourceType"] = r.ResourceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryVirtualNetworkCustomDetails. +func (r *RecoveryVirtualNetworkCustomDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceType": + err = unpopulate(val, "ResourceType", &r.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegisteredClusterNodes. +func (r RegisteredClusterNodes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "biosId", r.BiosID) + populate(objectMap, "clusterNodeFqdn", r.ClusterNodeFqdn) + populate(objectMap, "isSharedDiskVirtualNode", r.IsSharedDiskVirtualNode) + populate(objectMap, "machineId", r.MachineID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegisteredClusterNodes. +func (r *RegisteredClusterNodes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "biosId": + err = unpopulate(val, "BiosID", &r.BiosID) + delete(rawMsg, key) + case "clusterNodeFqdn": + err = unpopulate(val, "ClusterNodeFqdn", &r.ClusterNodeFqdn) + delete(rawMsg, key) + case "isSharedDiskVirtualNode": + err = unpopulate(val, "IsSharedDiskVirtualNode", &r.IsSharedDiskVirtualNode) + delete(rawMsg, key) + case "machineId": + err = unpopulate(val, "MachineID", &r.MachineID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemoveDisksInput. +func (r RemoveDisksInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemoveDisksInput. +func (r *RemoveDisksInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemoveDisksInputProperties. +func (r RemoveDisksInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemoveDisksInputProperties. +func (r *RemoveDisksInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalRemoveDisksProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemoveDisksProviderSpecificInput. +func (r RemoveDisksProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemoveDisksProviderSpecificInput. +func (r *RemoveDisksProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemoveProtectionContainerMappingInput. +func (r RemoveProtectionContainerMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemoveProtectionContainerMappingInput. +func (r *RemoveProtectionContainerMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RemoveProtectionContainerMappingInputProperties. +func (r RemoveProtectionContainerMappingInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificInput", r.ProviderSpecificInput) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RemoveProtectionContainerMappingInputProperties. +func (r *RemoveProtectionContainerMappingInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificInput": + err = unpopulate(val, "ProviderSpecificInput", &r.ProviderSpecificInput) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RenewCertificateInput. +func (r RenewCertificateInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RenewCertificateInput. +func (r *RenewCertificateInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RenewCertificateInputProperties. +func (r RenewCertificateInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "renewCertificateType", r.RenewCertificateType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RenewCertificateInputProperties. +func (r *RenewCertificateInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "renewCertificateType": + err = unpopulate(val, "RenewCertificateType", &r.RenewCertificateType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationAgentDetails. +func (r ReplicationAgentDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "biosId", r.BiosID) + populate(objectMap, "fabricObjectId", r.FabricObjectID) + populate(objectMap, "fqdn", r.Fqdn) + populate(objectMap, "health", r.Health) + populate(objectMap, "healthErrors", r.HealthErrors) + populate(objectMap, "id", r.ID) + populateDateTimeRFC3339(objectMap, "lastHeartbeatUtc", r.LastHeartbeatUTC) + populate(objectMap, "name", r.Name) + populate(objectMap, "version", r.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationAgentDetails. +func (r *ReplicationAgentDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "biosId": + err = unpopulate(val, "BiosID", &r.BiosID) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &r.FabricObjectID) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &r.Fqdn) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &r.Health) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &r.HealthErrors) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "lastHeartbeatUtc": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeatUTC", &r.LastHeartbeatUTC) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &r.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationAppliance. +func (r ReplicationAppliance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationAppliance. +func (r *ReplicationAppliance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationApplianceProperties. +func (r ReplicationApplianceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationApplianceProperties. +func (r *ReplicationApplianceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalApplianceSpecificDetailsClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationClusterProviderSpecificSettings. +func (r ReplicationClusterProviderSpecificSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationClusterProviderSpecificSettings. +func (r *ReplicationClusterProviderSpecificSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationEligibilityResults. +func (r ReplicationEligibilityResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationEligibilityResults. +func (r *ReplicationEligibilityResults) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationEligibilityResultsCollection. +func (r ReplicationEligibilityResultsCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationEligibilityResultsCollection. +func (r *ReplicationEligibilityResultsCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationEligibilityResultsErrorInfo. +func (r ReplicationEligibilityResultsErrorInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", r.Code) + populate(objectMap, "message", r.Message) + populate(objectMap, "possibleCauses", r.PossibleCauses) + populate(objectMap, "recommendedAction", r.RecommendedAction) + populate(objectMap, "status", r.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationEligibilityResultsErrorInfo. +func (r *ReplicationEligibilityResultsErrorInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &r.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &r.Message) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &r.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &r.RecommendedAction) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &r.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationEligibilityResultsProperties. +func (r ReplicationEligibilityResultsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientRequestId", r.ClientRequestID) + populate(objectMap, "errors", r.Errors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationEligibilityResultsProperties. +func (r *ReplicationEligibilityResultsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientRequestId": + err = unpopulate(val, "ClientRequestID", &r.ClientRequestID) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &r.Errors) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationGroupDetails. +func (r ReplicationGroupDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "ReplicationGroupDetails" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationGroupDetails. +func (r *ReplicationGroupDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectedItem. +func (r ReplicationProtectedItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectedItem. +func (r *ReplicationProtectedItem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectedItemCollection. +func (r ReplicationProtectedItemCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectedItemCollection. +func (r *ReplicationProtectedItemCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectedItemProperties. +func (r ReplicationProtectedItemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeLocation", r.ActiveLocation) + populate(objectMap, "allowedOperations", r.AllowedOperations) + populate(objectMap, "currentScenario", r.CurrentScenario) + populate(objectMap, "eventCorrelationId", r.EventCorrelationID) + populate(objectMap, "failoverHealth", r.FailoverHealth) + populate(objectMap, "failoverRecoveryPointId", r.FailoverRecoveryPointID) + populate(objectMap, "friendlyName", r.FriendlyName) + populate(objectMap, "healthErrors", r.HealthErrors) + populateDateTimeRFC3339(objectMap, "lastSuccessfulFailoverTime", r.LastSuccessfulFailoverTime) + populateDateTimeRFC3339(objectMap, "lastSuccessfulTestFailoverTime", r.LastSuccessfulTestFailoverTime) + populate(objectMap, "policyFriendlyName", r.PolicyFriendlyName) + populate(objectMap, "policyId", r.PolicyID) + populate(objectMap, "primaryFabricFriendlyName", r.PrimaryFabricFriendlyName) + populate(objectMap, "primaryFabricProvider", r.PrimaryFabricProvider) + populate(objectMap, "primaryProtectionContainerFriendlyName", r.PrimaryProtectionContainerFriendlyName) + populate(objectMap, "protectableItemId", r.ProtectableItemID) + populate(objectMap, "protectedItemType", r.ProtectedItemType) + populate(objectMap, "protectionState", r.ProtectionState) + populate(objectMap, "protectionStateDescription", r.ProtectionStateDescription) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + populate(objectMap, "recoveryContainerId", r.RecoveryContainerID) + populate(objectMap, "recoveryFabricFriendlyName", r.RecoveryFabricFriendlyName) + populate(objectMap, "recoveryFabricId", r.RecoveryFabricID) + populate(objectMap, "recoveryProtectionContainerFriendlyName", r.RecoveryProtectionContainerFriendlyName) + populate(objectMap, "recoveryServicesProviderId", r.RecoveryServicesProviderID) + populate(objectMap, "replicationHealth", r.ReplicationHealth) + populate(objectMap, "switchProviderState", r.SwitchProviderState) + populate(objectMap, "switchProviderStateDescription", r.SwitchProviderStateDescription) + populate(objectMap, "testFailoverState", r.TestFailoverState) + populate(objectMap, "testFailoverStateDescription", r.TestFailoverStateDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectedItemProperties. +func (r *ReplicationProtectedItemProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeLocation": + err = unpopulate(val, "ActiveLocation", &r.ActiveLocation) + delete(rawMsg, key) + case "allowedOperations": + err = unpopulate(val, "AllowedOperations", &r.AllowedOperations) + delete(rawMsg, key) + case "currentScenario": + err = unpopulate(val, "CurrentScenario", &r.CurrentScenario) + delete(rawMsg, key) + case "eventCorrelationId": + err = unpopulate(val, "EventCorrelationID", &r.EventCorrelationID) + delete(rawMsg, key) + case "failoverHealth": + err = unpopulate(val, "FailoverHealth", &r.FailoverHealth) + delete(rawMsg, key) + case "failoverRecoveryPointId": + err = unpopulate(val, "FailoverRecoveryPointID", &r.FailoverRecoveryPointID) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &r.FriendlyName) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &r.HealthErrors) + delete(rawMsg, key) + case "lastSuccessfulFailoverTime": + err = unpopulateDateTimeRFC3339(val, "LastSuccessfulFailoverTime", &r.LastSuccessfulFailoverTime) + delete(rawMsg, key) + case "lastSuccessfulTestFailoverTime": + err = unpopulateDateTimeRFC3339(val, "LastSuccessfulTestFailoverTime", &r.LastSuccessfulTestFailoverTime) + delete(rawMsg, key) + case "policyFriendlyName": + err = unpopulate(val, "PolicyFriendlyName", &r.PolicyFriendlyName) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &r.PolicyID) + delete(rawMsg, key) + case "primaryFabricFriendlyName": + err = unpopulate(val, "PrimaryFabricFriendlyName", &r.PrimaryFabricFriendlyName) + delete(rawMsg, key) + case "primaryFabricProvider": + err = unpopulate(val, "PrimaryFabricProvider", &r.PrimaryFabricProvider) + delete(rawMsg, key) + case "primaryProtectionContainerFriendlyName": + err = unpopulate(val, "PrimaryProtectionContainerFriendlyName", &r.PrimaryProtectionContainerFriendlyName) + delete(rawMsg, key) + case "protectableItemId": + err = unpopulate(val, "ProtectableItemID", &r.ProtectableItemID) + delete(rawMsg, key) + case "protectedItemType": + err = unpopulate(val, "ProtectedItemType", &r.ProtectedItemType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &r.ProtectionState) + delete(rawMsg, key) + case "protectionStateDescription": + err = unpopulate(val, "ProtectionStateDescription", &r.ProtectionStateDescription) + delete(rawMsg, key) + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalReplicationProviderSpecificSettingsClassification(val) + delete(rawMsg, key) + case "recoveryContainerId": + err = unpopulate(val, "RecoveryContainerID", &r.RecoveryContainerID) + delete(rawMsg, key) + case "recoveryFabricFriendlyName": + err = unpopulate(val, "RecoveryFabricFriendlyName", &r.RecoveryFabricFriendlyName) + delete(rawMsg, key) + case "recoveryFabricId": + err = unpopulate(val, "RecoveryFabricID", &r.RecoveryFabricID) + delete(rawMsg, key) + case "recoveryProtectionContainerFriendlyName": + err = unpopulate(val, "RecoveryProtectionContainerFriendlyName", &r.RecoveryProtectionContainerFriendlyName) + delete(rawMsg, key) + case "recoveryServicesProviderId": + err = unpopulate(val, "RecoveryServicesProviderID", &r.RecoveryServicesProviderID) + delete(rawMsg, key) + case "replicationHealth": + err = unpopulate(val, "ReplicationHealth", &r.ReplicationHealth) + delete(rawMsg, key) + case "switchProviderState": + err = unpopulate(val, "SwitchProviderState", &r.SwitchProviderState) + delete(rawMsg, key) + case "switchProviderStateDescription": + err = unpopulate(val, "SwitchProviderStateDescription", &r.SwitchProviderStateDescription) + delete(rawMsg, key) + case "testFailoverState": + err = unpopulate(val, "TestFailoverState", &r.TestFailoverState) + delete(rawMsg, key) + case "testFailoverStateDescription": + err = unpopulate(val, "TestFailoverStateDescription", &r.TestFailoverStateDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionCluster. +func (r ReplicationProtectionCluster) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionCluster. +func (r *ReplicationProtectionCluster) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionClusterCollection. +func (r ReplicationProtectionClusterCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionClusterCollection. +func (r *ReplicationProtectionClusterCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionClusterProperties. +func (r ReplicationProtectionClusterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeLocation", r.ActiveLocation) + populate(objectMap, "agentClusterId", r.AgentClusterID) + populate(objectMap, "allowedOperations", r.AllowedOperations) + populate(objectMap, "areAllClusterNodesRegistered", r.AreAllClusterNodesRegistered) + populate(objectMap, "clusterFqdn", r.ClusterFqdn) + populate(objectMap, "clusterNodeFqdns", r.ClusterNodeFqdns) + populate(objectMap, "clusterProtectedItemIds", r.ClusterProtectedItemIDs) + populate(objectMap, "clusterRegisteredNodes", r.ClusterRegisteredNodes) + populate(objectMap, "currentScenario", r.CurrentScenario) + populate(objectMap, "healthErrors", r.HealthErrors) + populateDateTimeRFC3339(objectMap, "lastSuccessfulFailoverTime", r.LastSuccessfulFailoverTime) + populateDateTimeRFC3339(objectMap, "lastSuccessfulTestFailoverTime", r.LastSuccessfulTestFailoverTime) + populate(objectMap, "policyFriendlyName", r.PolicyFriendlyName) + populate(objectMap, "policyId", r.PolicyID) + populate(objectMap, "primaryFabricFriendlyName", r.PrimaryFabricFriendlyName) + populate(objectMap, "primaryFabricProvider", r.PrimaryFabricProvider) + populate(objectMap, "primaryProtectionContainerFriendlyName", r.PrimaryProtectionContainerFriendlyName) + populate(objectMap, "protectionClusterType", r.ProtectionClusterType) + populate(objectMap, "protectionState", r.ProtectionState) + populate(objectMap, "protectionStateDescription", r.ProtectionStateDescription) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "recoveryContainerId", r.RecoveryContainerID) + populate(objectMap, "recoveryFabricFriendlyName", r.RecoveryFabricFriendlyName) + populate(objectMap, "recoveryFabricId", r.RecoveryFabricID) + populate(objectMap, "recoveryProtectionContainerFriendlyName", r.RecoveryProtectionContainerFriendlyName) + populate(objectMap, "replicationHealth", r.ReplicationHealth) + populate(objectMap, "sharedDiskProperties", r.SharedDiskProperties) + populate(objectMap, "testFailoverState", r.TestFailoverState) + populate(objectMap, "testFailoverStateDescription", r.TestFailoverStateDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionClusterProperties. +func (r *ReplicationProtectionClusterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeLocation": + err = unpopulate(val, "ActiveLocation", &r.ActiveLocation) + delete(rawMsg, key) + case "agentClusterId": + err = unpopulate(val, "AgentClusterID", &r.AgentClusterID) + delete(rawMsg, key) + case "allowedOperations": + err = unpopulate(val, "AllowedOperations", &r.AllowedOperations) + delete(rawMsg, key) + case "areAllClusterNodesRegistered": + err = unpopulate(val, "AreAllClusterNodesRegistered", &r.AreAllClusterNodesRegistered) + delete(rawMsg, key) + case "clusterFqdn": + err = unpopulate(val, "ClusterFqdn", &r.ClusterFqdn) + delete(rawMsg, key) + case "clusterNodeFqdns": + err = unpopulate(val, "ClusterNodeFqdns", &r.ClusterNodeFqdns) + delete(rawMsg, key) + case "clusterProtectedItemIds": + err = unpopulate(val, "ClusterProtectedItemIDs", &r.ClusterProtectedItemIDs) + delete(rawMsg, key) + case "clusterRegisteredNodes": + err = unpopulate(val, "ClusterRegisteredNodes", &r.ClusterRegisteredNodes) + delete(rawMsg, key) + case "currentScenario": + err = unpopulate(val, "CurrentScenario", &r.CurrentScenario) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &r.HealthErrors) + delete(rawMsg, key) + case "lastSuccessfulFailoverTime": + err = unpopulateDateTimeRFC3339(val, "LastSuccessfulFailoverTime", &r.LastSuccessfulFailoverTime) + delete(rawMsg, key) + case "lastSuccessfulTestFailoverTime": + err = unpopulateDateTimeRFC3339(val, "LastSuccessfulTestFailoverTime", &r.LastSuccessfulTestFailoverTime) + delete(rawMsg, key) + case "policyFriendlyName": + err = unpopulate(val, "PolicyFriendlyName", &r.PolicyFriendlyName) + delete(rawMsg, key) + case "policyId": + err = unpopulate(val, "PolicyID", &r.PolicyID) + delete(rawMsg, key) + case "primaryFabricFriendlyName": + err = unpopulate(val, "PrimaryFabricFriendlyName", &r.PrimaryFabricFriendlyName) + delete(rawMsg, key) + case "primaryFabricProvider": + err = unpopulate(val, "PrimaryFabricProvider", &r.PrimaryFabricProvider) + delete(rawMsg, key) + case "primaryProtectionContainerFriendlyName": + err = unpopulate(val, "PrimaryProtectionContainerFriendlyName", &r.PrimaryProtectionContainerFriendlyName) + delete(rawMsg, key) + case "protectionClusterType": + err = unpopulate(val, "ProtectionClusterType", &r.ProtectionClusterType) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &r.ProtectionState) + delete(rawMsg, key) + case "protectionStateDescription": + err = unpopulate(val, "ProtectionStateDescription", &r.ProtectionStateDescription) + delete(rawMsg, key) + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalReplicationClusterProviderSpecificSettingsClassification(val) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &r.ProvisioningState) + delete(rawMsg, key) + case "recoveryContainerId": + err = unpopulate(val, "RecoveryContainerID", &r.RecoveryContainerID) + delete(rawMsg, key) + case "recoveryFabricFriendlyName": + err = unpopulate(val, "RecoveryFabricFriendlyName", &r.RecoveryFabricFriendlyName) + delete(rawMsg, key) + case "recoveryFabricId": + err = unpopulate(val, "RecoveryFabricID", &r.RecoveryFabricID) + delete(rawMsg, key) + case "recoveryProtectionContainerFriendlyName": + err = unpopulate(val, "RecoveryProtectionContainerFriendlyName", &r.RecoveryProtectionContainerFriendlyName) + delete(rawMsg, key) + case "replicationHealth": + err = unpopulate(val, "ReplicationHealth", &r.ReplicationHealth) + delete(rawMsg, key) + case "sharedDiskProperties": + err = unpopulate(val, "SharedDiskProperties", &r.SharedDiskProperties) + delete(rawMsg, key) + case "testFailoverState": + err = unpopulate(val, "TestFailoverState", &r.TestFailoverState) + delete(rawMsg, key) + case "testFailoverStateDescription": + err = unpopulate(val, "TestFailoverStateDescription", &r.TestFailoverStateDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionIntent. +func (r ReplicationProtectionIntent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionIntent. +func (r *ReplicationProtectionIntent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionIntentCollection. +func (r ReplicationProtectionIntentCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionIntentCollection. +func (r *ReplicationProtectionIntentCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionIntentProperties. +func (r ReplicationProtectionIntentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "creationTimeUTC", r.CreationTimeUTC) + populate(objectMap, "friendlyName", r.FriendlyName) + populate(objectMap, "isActive", r.IsActive) + populate(objectMap, "jobId", r.JobID) + populate(objectMap, "jobState", r.JobState) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionIntentProperties. +func (r *ReplicationProtectionIntentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationTimeUTC": + err = unpopulate(val, "CreationTimeUTC", &r.CreationTimeUTC) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &r.FriendlyName) + delete(rawMsg, key) + case "isActive": + err = unpopulate(val, "IsActive", &r.IsActive) + delete(rawMsg, key) + case "jobId": + err = unpopulate(val, "JobID", &r.JobID) + delete(rawMsg, key) + case "jobState": + err = unpopulate(val, "JobState", &r.JobState) + delete(rawMsg, key) + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalReplicationProtectionIntentProviderSpecificSettingsClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProtectionIntentProviderSpecificSettings. +func (r ReplicationProtectionIntentProviderSpecificSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProtectionIntentProviderSpecificSettings. +func (r *ReplicationProtectionIntentProviderSpecificSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProviderContainerUnmappingInput. +func (r ReplicationProviderContainerUnmappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceType", r.InstanceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProviderContainerUnmappingInput. +func (r *ReplicationProviderContainerUnmappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProviderSpecificContainerCreationInput. +func (r ReplicationProviderSpecificContainerCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProviderSpecificContainerCreationInput. +func (r *ReplicationProviderSpecificContainerCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProviderSpecificContainerMappingInput. +func (r ReplicationProviderSpecificContainerMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProviderSpecificContainerMappingInput. +func (r *ReplicationProviderSpecificContainerMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProviderSpecificSettings. +func (r ReplicationProviderSpecificSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProviderSpecificSettings. +func (r *ReplicationProviderSpecificSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReplicationProviderSpecificUpdateContainerMappingInput. +func (r ReplicationProviderSpecificUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationProviderSpecificUpdateContainerMappingInput. +func (r *ReplicationProviderSpecificUpdateContainerMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReprotectAgentDetails. +func (r ReprotectAgentDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessibleDatastores", r.AccessibleDatastores) + populate(objectMap, "biosId", r.BiosID) + populate(objectMap, "fabricObjectId", r.FabricObjectID) + populate(objectMap, "fqdn", r.Fqdn) + populate(objectMap, "health", r.Health) + populate(objectMap, "healthErrors", r.HealthErrors) + populate(objectMap, "id", r.ID) + populateDateTimeRFC3339(objectMap, "lastDiscoveryInUtc", r.LastDiscoveryInUTC) + populateDateTimeRFC3339(objectMap, "lastHeartbeatUtc", r.LastHeartbeatUTC) + populate(objectMap, "name", r.Name) + populate(objectMap, "protectedItemCount", r.ProtectedItemCount) + populate(objectMap, "vcenterId", r.VcenterID) + populate(objectMap, "version", r.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReprotectAgentDetails. +func (r *ReprotectAgentDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessibleDatastores": + err = unpopulate(val, "AccessibleDatastores", &r.AccessibleDatastores) + delete(rawMsg, key) + case "biosId": + err = unpopulate(val, "BiosID", &r.BiosID) + delete(rawMsg, key) + case "fabricObjectId": + err = unpopulate(val, "FabricObjectID", &r.FabricObjectID) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &r.Fqdn) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &r.Health) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &r.HealthErrors) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "lastDiscoveryInUtc": + err = unpopulateDateTimeRFC3339(val, "LastDiscoveryInUTC", &r.LastDiscoveryInUTC) + delete(rawMsg, key) + case "lastHeartbeatUtc": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeatUTC", &r.LastHeartbeatUTC) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "protectedItemCount": + err = unpopulate(val, "ProtectedItemCount", &r.ProtectedItemCount) + delete(rawMsg, key) + case "vcenterId": + err = unpopulate(val, "VcenterID", &r.VcenterID) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &r.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolveHealthError. +func (r ResolveHealthError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "healthErrorId", r.HealthErrorID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolveHealthError. +func (r *ResolveHealthError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "healthErrorId": + err = unpopulate(val, "HealthErrorID", &r.HealthErrorID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolveHealthInput. +func (r ResolveHealthInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolveHealthInput. +func (r *ResolveHealthInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResolveHealthInputProperties. +func (r ResolveHealthInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "healthErrors", r.HealthErrors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResolveHealthInputProperties. +func (r *ResolveHealthInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "healthErrors": + err = unpopulate(val, "HealthErrors", &r.HealthErrors) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceHealthSummary. +func (r ResourceHealthSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "categorizedResourceCounts", r.CategorizedResourceCounts) + populate(objectMap, "issues", r.Issues) + populate(objectMap, "resourceCount", r.ResourceCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceHealthSummary. +func (r *ResourceHealthSummary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "categorizedResourceCounts": + err = unpopulate(val, "CategorizedResourceCounts", &r.CategorizedResourceCounts) + delete(rawMsg, key) + case "issues": + err = unpopulate(val, "Issues", &r.Issues) + delete(rawMsg, key) + case "resourceCount": + err = unpopulate(val, "ResourceCount", &r.ResourceCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResumeJobParams. +func (r ResumeJobParams) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResumeJobParams. +func (r *ResumeJobParams) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResumeJobParamsProperties. +func (r ResumeJobParamsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "comments", r.Comments) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResumeJobParamsProperties. +func (r *ResumeJobParamsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "comments": + err = unpopulate(val, "Comments", &r.Comments) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResumeReplicationInput. +func (r ResumeReplicationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResumeReplicationInput. +func (r *ResumeReplicationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResumeReplicationInputProperties. +func (r ResumeReplicationInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResumeReplicationInputProperties. +func (r *ResumeReplicationInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalResumeReplicationProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResumeReplicationProviderSpecificInput. +func (r ResumeReplicationProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResumeReplicationProviderSpecificInput. +func (r *ResumeReplicationProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResyncInput. +func (r ResyncInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResyncInput. +func (r *ResyncInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResyncInputProperties. +func (r ResyncInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResyncInputProperties. +func (r *ResyncInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalResyncProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResyncProviderSpecificInput. +func (r ResyncProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResyncProviderSpecificInput. +func (r *ResyncProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RetentionVolume. +func (r RetentionVolume) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacityInBytes", r.CapacityInBytes) + populate(objectMap, "freeSpaceInBytes", r.FreeSpaceInBytes) + populate(objectMap, "thresholdPercentage", r.ThresholdPercentage) + populate(objectMap, "volumeName", r.VolumeName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RetentionVolume. +func (r *RetentionVolume) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacityInBytes": + err = unpopulate(val, "CapacityInBytes", &r.CapacityInBytes) + delete(rawMsg, key) + case "freeSpaceInBytes": + err = unpopulate(val, "FreeSpaceInBytes", &r.FreeSpaceInBytes) + delete(rawMsg, key) + case "thresholdPercentage": + err = unpopulate(val, "ThresholdPercentage", &r.ThresholdPercentage) + delete(rawMsg, key) + case "volumeName": + err = unpopulate(val, "VolumeName", &r.VolumeName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReverseReplicationInput. +func (r ReverseReplicationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReverseReplicationInput. +func (r *ReverseReplicationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReverseReplicationInputProperties. +func (r ReverseReplicationInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverDirection", r.FailoverDirection) + populate(objectMap, "providerSpecificDetails", r.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReverseReplicationInputProperties. +func (r *ReverseReplicationInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverDirection": + err = unpopulate(val, "FailoverDirection", &r.FailoverDirection) + delete(rawMsg, key) + case "providerSpecificDetails": + r.ProviderSpecificDetails, err = unmarshalReverseReplicationProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ReverseReplicationProviderSpecificInput. +func (r ReverseReplicationProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = r.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ReverseReplicationProviderSpecificInput. +func (r *ReverseReplicationProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RunAsAccount. +func (r RunAsAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accountId", r.AccountID) + populate(objectMap, "accountName", r.AccountName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RunAsAccount. +func (r *RunAsAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accountId": + err = unpopulate(val, "AccountID", &r.AccountID) + delete(rawMsg, key) + case "accountName": + err = unpopulate(val, "AccountName", &r.AccountName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScriptActionTaskDetails. +func (s ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "ScriptActionTaskDetails" + populate(objectMap, "isPrimarySideScript", s.IsPrimarySideScript) + populate(objectMap, "name", s.Name) + populate(objectMap, "output", s.Output) + populate(objectMap, "path", s.Path) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptActionTaskDetails. +func (s *ScriptActionTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &s.InstanceType) + delete(rawMsg, key) + case "isPrimarySideScript": + err = unpopulate(val, "IsPrimarySideScript", &s.IsPrimarySideScript) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "output": + err = unpopulate(val, "Output", &s.Output) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &s.Path) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityProfileProperties. +func (s SecurityProfileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetVmConfidentialEncryption", s.TargetVMConfidentialEncryption) + populate(objectMap, "targetVmMonitoring", s.TargetVMMonitoring) + populate(objectMap, "targetVmSecureBoot", s.TargetVMSecureBoot) + populate(objectMap, "targetVmSecurityType", s.TargetVMSecurityType) + populate(objectMap, "targetVmTpm", s.TargetVMTpm) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityProfileProperties. +func (s *SecurityProfileProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetVmConfidentialEncryption": + err = unpopulate(val, "TargetVMConfidentialEncryption", &s.TargetVMConfidentialEncryption) + delete(rawMsg, key) + case "targetVmMonitoring": + err = unpopulate(val, "TargetVMMonitoring", &s.TargetVMMonitoring) + delete(rawMsg, key) + case "targetVmSecureBoot": + err = unpopulate(val, "TargetVMSecureBoot", &s.TargetVMSecureBoot) + delete(rawMsg, key) + case "targetVmSecurityType": + err = unpopulate(val, "TargetVMSecurityType", &s.TargetVMSecurityType) + delete(rawMsg, key) + case "targetVmTpm": + err = unpopulate(val, "TargetVMTpm", &s.TargetVMTpm) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceError. +func (s ServiceError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activityId", s.ActivityID) + populate(objectMap, "code", s.Code) + populate(objectMap, "message", s.Message) + populate(objectMap, "possibleCauses", s.PossibleCauses) + populate(objectMap, "recommendedAction", s.RecommendedAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceError. +func (s *ServiceError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activityId": + err = unpopulate(val, "ActivityID", &s.ActivityID) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &s.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &s.Message) + delete(rawMsg, key) + case "possibleCauses": + err = unpopulate(val, "PossibleCauses", &s.PossibleCauses) + delete(rawMsg, key) + case "recommendedAction": + err = unpopulate(val, "RecommendedAction", &s.RecommendedAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SharedDiskReplicationItemProperties. +func (s SharedDiskReplicationItemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeLocation", s.ActiveLocation) + populate(objectMap, "allowedOperations", s.AllowedOperations) + populate(objectMap, "currentScenario", s.CurrentScenario) + populate(objectMap, "healthErrors", s.HealthErrors) + populate(objectMap, "protectionState", s.ProtectionState) + populate(objectMap, "replicationHealth", s.ReplicationHealth) + populate(objectMap, "sharedDiskProviderSpecificDetails", s.SharedDiskProviderSpecificDetails) + populate(objectMap, "testFailoverState", s.TestFailoverState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SharedDiskReplicationItemProperties. +func (s *SharedDiskReplicationItemProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeLocation": + err = unpopulate(val, "ActiveLocation", &s.ActiveLocation) + delete(rawMsg, key) + case "allowedOperations": + err = unpopulate(val, "AllowedOperations", &s.AllowedOperations) + delete(rawMsg, key) + case "currentScenario": + err = unpopulate(val, "CurrentScenario", &s.CurrentScenario) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &s.HealthErrors) + delete(rawMsg, key) + case "protectionState": + err = unpopulate(val, "ProtectionState", &s.ProtectionState) + delete(rawMsg, key) + case "replicationHealth": + err = unpopulate(val, "ReplicationHealth", &s.ReplicationHealth) + delete(rawMsg, key) + case "sharedDiskProviderSpecificDetails": + s.SharedDiskProviderSpecificDetails, err = unmarshalSharedDiskReplicationProviderSpecificSettingsClassification(val) + delete(rawMsg, key) + case "testFailoverState": + err = unpopulate(val, "TestFailoverState", &s.TestFailoverState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SharedDiskReplicationProviderSpecificSettings. +func (s SharedDiskReplicationProviderSpecificSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = s.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SharedDiskReplicationProviderSpecificSettings. +func (s *SharedDiskReplicationProviderSpecificSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &s.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageAccountCustomDetails. +func (s StorageAccountCustomDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["resourceType"] = s.ResourceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccountCustomDetails. +func (s *StorageAccountCustomDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageClassification. +func (s StorageClassification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassification. +func (s *StorageClassification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageClassificationCollection. +func (s StorageClassificationCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationCollection. +func (s *StorageClassificationCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageClassificationMapping. +func (s StorageClassificationMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationMapping. +func (s *StorageClassificationMapping) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageClassificationMappingCollection. +func (s StorageClassificationMappingCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationMappingCollection. +func (s *StorageClassificationMappingCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageClassificationMappingInput. +func (s StorageClassificationMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationMappingInput. +func (s *StorageClassificationMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageClassificationMappingProperties. +func (s StorageClassificationMappingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetStorageClassificationId", s.TargetStorageClassificationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationMappingProperties. +func (s *StorageClassificationMappingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetStorageClassificationId": + err = unpopulate(val, "TargetStorageClassificationID", &s.TargetStorageClassificationID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageClassificationProperties. +func (s StorageClassificationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "friendlyName", s.FriendlyName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageClassificationProperties. +func (s *StorageClassificationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "friendlyName": + err = unpopulate(val, "FriendlyName", &s.FriendlyName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageMappingInputProperties. +func (s StorageMappingInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "targetStorageClassificationId", s.TargetStorageClassificationID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMappingInputProperties. +func (s *StorageMappingInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "targetStorageClassificationId": + err = unpopulate(val, "TargetStorageClassificationID", &s.TargetStorageClassificationID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Subnet. +func (s Subnet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "addressList", s.AddressList) + populate(objectMap, "friendlyName", s.FriendlyName) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Subnet. +func (s *Subnet) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "addressList": + err = unpopulate(val, "AddressList", &s.AddressList) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &s.FriendlyName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedOSDetails. +func (s SupportedOSDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "osName", s.OSName) + populate(objectMap, "osType", s.OSType) + populate(objectMap, "osVersions", s.OSVersions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOSDetails. +func (s *SupportedOSDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "osName": + err = unpopulate(val, "OSName", &s.OSName) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &s.OSType) + delete(rawMsg, key) + case "osVersions": + err = unpopulate(val, "OSVersions", &s.OSVersions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedOSProperties. +func (s SupportedOSProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "supportedOsList", s.SupportedOsList) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOSProperties. +func (s *SupportedOSProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "supportedOsList": + err = unpopulate(val, "SupportedOsList", &s.SupportedOsList) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedOSProperty. +func (s SupportedOSProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceType", s.InstanceType) + populate(objectMap, "supportedOs", s.SupportedOs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOSProperty. +func (s *SupportedOSProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &s.InstanceType) + delete(rawMsg, key) + case "supportedOs": + err = unpopulate(val, "SupportedOs", &s.SupportedOs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SupportedOperatingSystems. +func (s SupportedOperatingSystems) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedOperatingSystems. +func (s *SupportedOperatingSystems) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwitchClusterProtectionInput. +func (s SwitchClusterProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchClusterProtectionInput. +func (s *SwitchClusterProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwitchClusterProtectionInputProperties. +func (s SwitchClusterProtectionInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", s.ProviderSpecificDetails) + populate(objectMap, "replicationProtectionClusterName", s.ReplicationProtectionClusterName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchClusterProtectionInputProperties. +func (s *SwitchClusterProtectionInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + s.ProviderSpecificDetails, err = unmarshalSwitchClusterProtectionProviderSpecificInputClassification(val) + delete(rawMsg, key) + case "replicationProtectionClusterName": + err = unpopulate(val, "ReplicationProtectionClusterName", &s.ReplicationProtectionClusterName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwitchClusterProtectionProviderSpecificInput. +func (s SwitchClusterProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = s.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchClusterProtectionProviderSpecificInput. +func (s *SwitchClusterProtectionProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &s.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwitchProtectionInput. +func (s SwitchProtectionInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProtectionInput. +func (s *SwitchProtectionInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwitchProtectionInputProperties. +func (s SwitchProtectionInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", s.ProviderSpecificDetails) + populate(objectMap, "replicationProtectedItemName", s.ReplicationProtectedItemName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProtectionInputProperties. +func (s *SwitchProtectionInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + s.ProviderSpecificDetails, err = unmarshalSwitchProtectionProviderSpecificInputClassification(val) + delete(rawMsg, key) + case "replicationProtectedItemName": + err = unpopulate(val, "ReplicationProtectedItemName", &s.ReplicationProtectedItemName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwitchProtectionJobDetails. +func (s SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectDetails", s.AffectedObjectDetails) + objectMap["instanceType"] = "SwitchProtectionJobDetails" + populate(objectMap, "newReplicationProtectedItemId", s.NewReplicationProtectedItemID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProtectionJobDetails. +func (s *SwitchProtectionJobDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectDetails": + err = unpopulate(val, "AffectedObjectDetails", &s.AffectedObjectDetails) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &s.InstanceType) + delete(rawMsg, key) + case "newReplicationProtectedItemId": + err = unpopulate(val, "NewReplicationProtectedItemID", &s.NewReplicationProtectedItemID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwitchProtectionProviderSpecificInput. +func (s SwitchProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = s.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProtectionProviderSpecificInput. +func (s *SwitchProtectionProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &s.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwitchProviderInput. +func (s SwitchProviderInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProviderInput. +func (s *SwitchProviderInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwitchProviderInputProperties. +func (s SwitchProviderInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", s.ProviderSpecificDetails) + populate(objectMap, "targetInstanceType", s.TargetInstanceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProviderInputProperties. +func (s *SwitchProviderInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + s.ProviderSpecificDetails, err = unmarshalSwitchProviderSpecificInputClassification(val) + delete(rawMsg, key) + case "targetInstanceType": + err = unpopulate(val, "TargetInstanceType", &s.TargetInstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SwitchProviderSpecificInput. +func (s SwitchProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = s.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SwitchProviderSpecificInput. +func (s *SwitchProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &s.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetComputeSize. +func (t TargetComputeSize) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetComputeSize. +func (t *TargetComputeSize) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetComputeSizeCollection. +func (t TargetComputeSizeCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetComputeSizeCollection. +func (t *TargetComputeSizeCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetComputeSizeProperties. +func (t TargetComputeSizeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpuCoresCount", t.CPUCoresCount) + populate(objectMap, "errors", t.Errors) + populate(objectMap, "friendlyName", t.FriendlyName) + populate(objectMap, "highIopsSupported", t.HighIopsSupported) + populate(objectMap, "hyperVGenerations", t.HyperVGenerations) + populate(objectMap, "maxDataDiskCount", t.MaxDataDiskCount) + populate(objectMap, "maxNicsCount", t.MaxNicsCount) + populate(objectMap, "memoryInGB", t.MemoryInGB) + populate(objectMap, "name", t.Name) + populate(objectMap, "vCPUsAvailable", t.VCPUsAvailable) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetComputeSizeProperties. +func (t *TargetComputeSizeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpuCoresCount": + err = unpopulate(val, "CPUCoresCount", &t.CPUCoresCount) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &t.Errors) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &t.FriendlyName) + delete(rawMsg, key) + case "highIopsSupported": + err = unpopulate(val, "HighIopsSupported", &t.HighIopsSupported) + delete(rawMsg, key) + case "hyperVGenerations": + err = unpopulate(val, "HyperVGenerations", &t.HyperVGenerations) + delete(rawMsg, key) + case "maxDataDiskCount": + err = unpopulate(val, "MaxDataDiskCount", &t.MaxDataDiskCount) + delete(rawMsg, key) + case "maxNicsCount": + err = unpopulate(val, "MaxNicsCount", &t.MaxNicsCount) + delete(rawMsg, key) + case "memoryInGB": + err = unpopulate(val, "MemoryInGB", &t.MemoryInGB) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "vCPUsAvailable": + err = unpopulate(val, "VCPUsAvailable", &t.VCPUsAvailable) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TaskTypeDetails. +func (t TaskTypeDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = t.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TaskTypeDetails. +func (t *TaskTypeDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &t.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestFailoverCleanupInput. +func (t TestFailoverCleanupInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", t.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverCleanupInput. +func (t *TestFailoverCleanupInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestFailoverCleanupInputProperties. +func (t TestFailoverCleanupInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "comments", t.Comments) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverCleanupInputProperties. +func (t *TestFailoverCleanupInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "comments": + err = unpopulate(val, "Comments", &t.Comments) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestFailoverInput. +func (t TestFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", t.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverInput. +func (t *TestFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestFailoverInputProperties. +func (t TestFailoverInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverDirection", t.FailoverDirection) + populate(objectMap, "networkId", t.NetworkID) + populate(objectMap, "networkType", t.NetworkType) + populate(objectMap, "providerSpecificDetails", t.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverInputProperties. +func (t *TestFailoverInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverDirection": + err = unpopulate(val, "FailoverDirection", &t.FailoverDirection) + delete(rawMsg, key) + case "networkId": + err = unpopulate(val, "NetworkID", &t.NetworkID) + delete(rawMsg, key) + case "networkType": + err = unpopulate(val, "NetworkType", &t.NetworkType) + delete(rawMsg, key) + case "providerSpecificDetails": + t.ProviderSpecificDetails, err = unmarshalTestFailoverProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestFailoverJobDetails. +func (t TestFailoverJobDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "affectedObjectDetails", t.AffectedObjectDetails) + populate(objectMap, "comments", t.Comments) + objectMap["instanceType"] = "TestFailoverJobDetails" + populate(objectMap, "networkFriendlyName", t.NetworkFriendlyName) + populate(objectMap, "networkName", t.NetworkName) + populate(objectMap, "networkType", t.NetworkType) + populate(objectMap, "protectedItemDetails", t.ProtectedItemDetails) + populate(objectMap, "testFailoverStatus", t.TestFailoverStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverJobDetails. +func (t *TestFailoverJobDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "affectedObjectDetails": + err = unpopulate(val, "AffectedObjectDetails", &t.AffectedObjectDetails) + delete(rawMsg, key) + case "comments": + err = unpopulate(val, "Comments", &t.Comments) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &t.InstanceType) + delete(rawMsg, key) + case "networkFriendlyName": + err = unpopulate(val, "NetworkFriendlyName", &t.NetworkFriendlyName) + delete(rawMsg, key) + case "networkName": + err = unpopulate(val, "NetworkName", &t.NetworkName) + delete(rawMsg, key) + case "networkType": + err = unpopulate(val, "NetworkType", &t.NetworkType) + delete(rawMsg, key) + case "protectedItemDetails": + err = unpopulate(val, "ProtectedItemDetails", &t.ProtectedItemDetails) + delete(rawMsg, key) + case "testFailoverStatus": + err = unpopulate(val, "TestFailoverStatus", &t.TestFailoverStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestFailoverProviderSpecificInput. +func (t TestFailoverProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = t.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestFailoverProviderSpecificInput. +func (t *TestFailoverProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &t.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestMigrateCleanupInput. +func (t TestMigrateCleanupInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", t.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestMigrateCleanupInput. +func (t *TestMigrateCleanupInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestMigrateCleanupInputProperties. +func (t TestMigrateCleanupInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "comments", t.Comments) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestMigrateCleanupInputProperties. +func (t *TestMigrateCleanupInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "comments": + err = unpopulate(val, "Comments", &t.Comments) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestMigrateInput. +func (t TestMigrateInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", t.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestMigrateInput. +func (t *TestMigrateInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestMigrateInputProperties. +func (t TestMigrateInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", t.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestMigrateInputProperties. +func (t *TestMigrateInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + t.ProviderSpecificDetails, err = unmarshalTestMigrateProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TestMigrateProviderSpecificInput. +func (t TestMigrateProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = t.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TestMigrateProviderSpecificInput. +func (t *TestMigrateProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &t.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnplannedFailoverInput. +func (u UnplannedFailoverInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnplannedFailoverInput. +func (u *UnplannedFailoverInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnplannedFailoverInputProperties. +func (u UnplannedFailoverInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "failoverDirection", u.FailoverDirection) + populate(objectMap, "providerSpecificDetails", u.ProviderSpecificDetails) + populate(objectMap, "sourceSiteOperations", u.SourceSiteOperations) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnplannedFailoverInputProperties. +func (u *UnplannedFailoverInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failoverDirection": + err = unpopulate(val, "FailoverDirection", &u.FailoverDirection) + delete(rawMsg, key) + case "providerSpecificDetails": + u.ProviderSpecificDetails, err = unmarshalUnplannedFailoverProviderSpecificInputClassification(val) + delete(rawMsg, key) + case "sourceSiteOperations": + err = unpopulate(val, "SourceSiteOperations", &u.SourceSiteOperations) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnplannedFailoverProviderSpecificInput. +func (u UnplannedFailoverProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = u.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnplannedFailoverProviderSpecificInput. +func (u *UnplannedFailoverProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &u.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateApplianceForReplicationProtectedItemInput. +func (u UpdateApplianceForReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateApplianceForReplicationProtectedItemInput. +func (u *UpdateApplianceForReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateApplianceForReplicationProtectedItemInputProperties. +func (u UpdateApplianceForReplicationProtectedItemInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", u.ProviderSpecificDetails) + populate(objectMap, "targetApplianceId", u.TargetApplianceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateApplianceForReplicationProtectedItemInputProperties. +func (u *UpdateApplianceForReplicationProtectedItemInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + u.ProviderSpecificDetails, err = unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification(val) + delete(rawMsg, key) + case "targetApplianceId": + err = unpopulate(val, "TargetApplianceID", &u.TargetApplianceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateApplianceForReplicationProtectedItemProviderSpecificInput. +func (u UpdateApplianceForReplicationProtectedItemProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = u.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateApplianceForReplicationProtectedItemProviderSpecificInput. +func (u *UpdateApplianceForReplicationProtectedItemProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &u.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateDiskInput. +func (u UpdateDiskInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskId", u.DiskID) + populate(objectMap, "targetDiskName", u.TargetDiskName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateDiskInput. +func (u *UpdateDiskInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskId": + err = unpopulate(val, "DiskID", &u.DiskID) + delete(rawMsg, key) + case "targetDiskName": + err = unpopulate(val, "TargetDiskName", &u.TargetDiskName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateMigrationItemInput. +func (u UpdateMigrationItemInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMigrationItemInput. +func (u *UpdateMigrationItemInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateMigrationItemInputProperties. +func (u UpdateMigrationItemInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificDetails", u.ProviderSpecificDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMigrationItemInputProperties. +func (u *UpdateMigrationItemInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificDetails": + u.ProviderSpecificDetails, err = unmarshalUpdateMigrationItemProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateMigrationItemProviderSpecificInput. +func (u UpdateMigrationItemProviderSpecificInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = u.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMigrationItemProviderSpecificInput. +func (u *UpdateMigrationItemProviderSpecificInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &u.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateMobilityServiceRequest. +func (u UpdateMobilityServiceRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMobilityServiceRequest. +func (u *UpdateMobilityServiceRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateMobilityServiceRequestProperties. +func (u UpdateMobilityServiceRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "runAsAccountId", u.RunAsAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMobilityServiceRequestProperties. +func (u *UpdateMobilityServiceRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &u.RunAsAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateNetworkMappingInput. +func (u UpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateNetworkMappingInput. +func (u *UpdateNetworkMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateNetworkMappingInputProperties. +func (u UpdateNetworkMappingInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fabricSpecificDetails", u.FabricSpecificDetails) + populate(objectMap, "recoveryFabricName", u.RecoveryFabricName) + populate(objectMap, "recoveryNetworkId", u.RecoveryNetworkID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateNetworkMappingInputProperties. +func (u *UpdateNetworkMappingInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fabricSpecificDetails": + u.FabricSpecificDetails, err = unmarshalFabricSpecificUpdateNetworkMappingInputClassification(val) + delete(rawMsg, key) + case "recoveryFabricName": + err = unpopulate(val, "RecoveryFabricName", &u.RecoveryFabricName) + delete(rawMsg, key) + case "recoveryNetworkId": + err = unpopulate(val, "RecoveryNetworkID", &u.RecoveryNetworkID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdatePolicyInput. +func (u UpdatePolicyInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdatePolicyInput. +func (u *UpdatePolicyInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdatePolicyInputProperties. +func (u UpdatePolicyInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "replicationProviderSettings", u.ReplicationProviderSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdatePolicyInputProperties. +func (u *UpdatePolicyInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "replicationProviderSettings": + u.ReplicationProviderSettings, err = unmarshalPolicyProviderSpecificInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateProtectionContainerMappingInput. +func (u UpdateProtectionContainerMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateProtectionContainerMappingInput. +func (u *UpdateProtectionContainerMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateProtectionContainerMappingInputProperties. +func (u UpdateProtectionContainerMappingInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "providerSpecificInput", u.ProviderSpecificInput) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateProtectionContainerMappingInputProperties. +func (u *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "providerSpecificInput": + u.ProviderSpecificInput, err = unmarshalReplicationProviderSpecificUpdateContainerMappingInputClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateRecoveryPlanInput. +func (u UpdateRecoveryPlanInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateRecoveryPlanInput. +func (u *UpdateRecoveryPlanInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateRecoveryPlanInputProperties. +func (u UpdateRecoveryPlanInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groups", u.Groups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateRecoveryPlanInputProperties. +func (u *UpdateRecoveryPlanInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groups": + err = unpopulate(val, "Groups", &u.Groups) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateReplicationProtectedItemInput. +func (u UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateReplicationProtectedItemInput. +func (u *UpdateReplicationProtectedItemInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateReplicationProtectedItemInputProperties. +func (u UpdateReplicationProtectedItemInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableRdpOnTargetOption", u.EnableRdpOnTargetOption) + populate(objectMap, "licenseType", u.LicenseType) + populate(objectMap, "providerSpecificDetails", u.ProviderSpecificDetails) + populate(objectMap, "recoveryAvailabilitySetId", u.RecoveryAvailabilitySetID) + populate(objectMap, "recoveryAzureVMName", u.RecoveryAzureVMName) + populate(objectMap, "recoveryAzureVMSize", u.RecoveryAzureVMSize) + populate(objectMap, "selectedRecoveryAzureNetworkId", u.SelectedRecoveryAzureNetworkID) + populate(objectMap, "selectedSourceNicId", u.SelectedSourceNicID) + populate(objectMap, "selectedTfoAzureNetworkId", u.SelectedTfoAzureNetworkID) + populate(objectMap, "vmNics", u.VMNics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateReplicationProtectedItemInputProperties. +func (u *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableRdpOnTargetOption": + err = unpopulate(val, "EnableRdpOnTargetOption", &u.EnableRdpOnTargetOption) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &u.LicenseType) + delete(rawMsg, key) + case "providerSpecificDetails": + u.ProviderSpecificDetails, err = unmarshalUpdateReplicationProtectedItemProviderInputClassification(val) + delete(rawMsg, key) + case "recoveryAvailabilitySetId": + err = unpopulate(val, "RecoveryAvailabilitySetID", &u.RecoveryAvailabilitySetID) + delete(rawMsg, key) + case "recoveryAzureVMName": + err = unpopulate(val, "RecoveryAzureVMName", &u.RecoveryAzureVMName) + delete(rawMsg, key) + case "recoveryAzureVMSize": + err = unpopulate(val, "RecoveryAzureVMSize", &u.RecoveryAzureVMSize) + delete(rawMsg, key) + case "selectedRecoveryAzureNetworkId": + err = unpopulate(val, "SelectedRecoveryAzureNetworkID", &u.SelectedRecoveryAzureNetworkID) + delete(rawMsg, key) + case "selectedSourceNicId": + err = unpopulate(val, "SelectedSourceNicID", &u.SelectedSourceNicID) + delete(rawMsg, key) + case "selectedTfoAzureNetworkId": + err = unpopulate(val, "SelectedTfoAzureNetworkID", &u.SelectedTfoAzureNetworkID) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &u.VMNics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateReplicationProtectedItemProviderInput. +func (u UpdateReplicationProtectedItemProviderInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = u.InstanceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateReplicationProtectedItemProviderInput. +func (u *UpdateReplicationProtectedItemProviderInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &u.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateVCenterRequest. +func (u UpdateVCenterRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateVCenterRequest. +func (u *UpdateVCenterRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateVCenterRequestProperties. +func (u UpdateVCenterRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "friendlyName", u.FriendlyName) + populate(objectMap, "ipAddress", u.IPAddress) + populate(objectMap, "port", u.Port) + populate(objectMap, "processServerId", u.ProcessServerID) + populate(objectMap, "runAsAccountId", u.RunAsAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateVCenterRequestProperties. +func (u *UpdateVCenterRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "friendlyName": + err = unpopulate(val, "FriendlyName", &u.FriendlyName) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &u.IPAddress) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &u.Port) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &u.ProcessServerID) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &u.RunAsAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserCreatedResourceTag. +func (u UserCreatedResourceTag) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tagName", u.TagName) + populate(objectMap, "tagValue", u.TagValue) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreatedResourceTag. +func (u *UserCreatedResourceTag) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tagName": + err = unpopulate(val, "TagName", &u.TagName) + delete(rawMsg, key) + case "tagValue": + err = unpopulate(val, "TagValue", &u.TagValue) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VCenter. +func (v VCenter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VCenter. +func (v *VCenter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VCenterCollection. +func (v VCenterCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VCenterCollection. +func (v *VCenterCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VCenterProperties. +func (v VCenterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "discoveryStatus", v.DiscoveryStatus) + populate(objectMap, "fabricArmResourceName", v.FabricArmResourceName) + populate(objectMap, "friendlyName", v.FriendlyName) + populate(objectMap, "healthErrors", v.HealthErrors) + populate(objectMap, "ipAddress", v.IPAddress) + populate(objectMap, "infrastructureId", v.InfrastructureID) + populate(objectMap, "internalId", v.InternalID) + populateDateTimeRFC3339(objectMap, "lastHeartbeat", v.LastHeartbeat) + populate(objectMap, "port", v.Port) + populate(objectMap, "processServerId", v.ProcessServerID) + populate(objectMap, "runAsAccountId", v.RunAsAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VCenterProperties. +func (v *VCenterProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "discoveryStatus": + err = unpopulate(val, "DiscoveryStatus", &v.DiscoveryStatus) + delete(rawMsg, key) + case "fabricArmResourceName": + err = unpopulate(val, "FabricArmResourceName", &v.FabricArmResourceName) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &v.FriendlyName) + delete(rawMsg, key) + case "healthErrors": + err = unpopulate(val, "HealthErrors", &v.HealthErrors) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &v.IPAddress) + delete(rawMsg, key) + case "infrastructureId": + err = unpopulate(val, "InfrastructureID", &v.InfrastructureID) + delete(rawMsg, key) + case "internalId": + err = unpopulate(val, "InternalID", &v.InternalID) + delete(rawMsg, key) + case "lastHeartbeat": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeat", &v.LastHeartbeat) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &v.Port) + delete(rawMsg, key) + case "processServerId": + err = unpopulate(val, "ProcessServerID", &v.ProcessServerID) + delete(rawMsg, key) + case "runAsAccountId": + err = unpopulate(val, "RunAsAccountID", &v.RunAsAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMNicDetails. +func (v VMNicDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableAcceleratedNetworkingOnRecovery", v.EnableAcceleratedNetworkingOnRecovery) + populate(objectMap, "enableAcceleratedNetworkingOnTfo", v.EnableAcceleratedNetworkingOnTfo) + populate(objectMap, "ipConfigs", v.IPConfigs) + populate(objectMap, "nicId", v.NicID) + populate(objectMap, "recoveryNetworkSecurityGroupId", v.RecoveryNetworkSecurityGroupID) + populate(objectMap, "recoveryNicName", v.RecoveryNicName) + populate(objectMap, "recoveryNicResourceGroupName", v.RecoveryNicResourceGroupName) + populate(objectMap, "recoveryVMNetworkId", v.RecoveryVMNetworkID) + populate(objectMap, "replicaNicId", v.ReplicaNicID) + populate(objectMap, "reuseExistingNic", v.ReuseExistingNic) + populate(objectMap, "selectionType", v.SelectionType) + populate(objectMap, "sourceNicArmId", v.SourceNicArmID) + populate(objectMap, "targetNicName", v.TargetNicName) + populate(objectMap, "tfoNetworkSecurityGroupId", v.TfoNetworkSecurityGroupID) + populate(objectMap, "tfoRecoveryNicName", v.TfoRecoveryNicName) + populate(objectMap, "tfoRecoveryNicResourceGroupName", v.TfoRecoveryNicResourceGroupName) + populate(objectMap, "tfoReuseExistingNic", v.TfoReuseExistingNic) + populate(objectMap, "tfoVMNetworkId", v.TfoVMNetworkID) + populate(objectMap, "vMNetworkName", v.VMNetworkName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMNicDetails. +func (v *VMNicDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableAcceleratedNetworkingOnRecovery": + err = unpopulate(val, "EnableAcceleratedNetworkingOnRecovery", &v.EnableAcceleratedNetworkingOnRecovery) + delete(rawMsg, key) + case "enableAcceleratedNetworkingOnTfo": + err = unpopulate(val, "EnableAcceleratedNetworkingOnTfo", &v.EnableAcceleratedNetworkingOnTfo) + delete(rawMsg, key) + case "ipConfigs": + err = unpopulate(val, "IPConfigs", &v.IPConfigs) + delete(rawMsg, key) + case "nicId": + err = unpopulate(val, "NicID", &v.NicID) + delete(rawMsg, key) + case "recoveryNetworkSecurityGroupId": + err = unpopulate(val, "RecoveryNetworkSecurityGroupID", &v.RecoveryNetworkSecurityGroupID) + delete(rawMsg, key) + case "recoveryNicName": + err = unpopulate(val, "RecoveryNicName", &v.RecoveryNicName) + delete(rawMsg, key) + case "recoveryNicResourceGroupName": + err = unpopulate(val, "RecoveryNicResourceGroupName", &v.RecoveryNicResourceGroupName) + delete(rawMsg, key) + case "recoveryVMNetworkId": + err = unpopulate(val, "RecoveryVMNetworkID", &v.RecoveryVMNetworkID) + delete(rawMsg, key) + case "replicaNicId": + err = unpopulate(val, "ReplicaNicID", &v.ReplicaNicID) + delete(rawMsg, key) + case "reuseExistingNic": + err = unpopulate(val, "ReuseExistingNic", &v.ReuseExistingNic) + delete(rawMsg, key) + case "selectionType": + err = unpopulate(val, "SelectionType", &v.SelectionType) + delete(rawMsg, key) + case "sourceNicArmId": + err = unpopulate(val, "SourceNicArmID", &v.SourceNicArmID) + delete(rawMsg, key) + case "targetNicName": + err = unpopulate(val, "TargetNicName", &v.TargetNicName) + delete(rawMsg, key) + case "tfoNetworkSecurityGroupId": + err = unpopulate(val, "TfoNetworkSecurityGroupID", &v.TfoNetworkSecurityGroupID) + delete(rawMsg, key) + case "tfoRecoveryNicName": + err = unpopulate(val, "TfoRecoveryNicName", &v.TfoRecoveryNicName) + delete(rawMsg, key) + case "tfoRecoveryNicResourceGroupName": + err = unpopulate(val, "TfoRecoveryNicResourceGroupName", &v.TfoRecoveryNicResourceGroupName) + delete(rawMsg, key) + case "tfoReuseExistingNic": + err = unpopulate(val, "TfoReuseExistingNic", &v.TfoReuseExistingNic) + delete(rawMsg, key) + case "tfoVMNetworkId": + err = unpopulate(val, "TfoVMNetworkID", &v.TfoVMNetworkID) + delete(rawMsg, key) + case "vMNetworkName": + err = unpopulate(val, "VMNetworkName", &v.VMNetworkName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMNicInputDetails. +func (v VMNicInputDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enableAcceleratedNetworkingOnRecovery", v.EnableAcceleratedNetworkingOnRecovery) + populate(objectMap, "enableAcceleratedNetworkingOnTfo", v.EnableAcceleratedNetworkingOnTfo) + populate(objectMap, "ipConfigs", v.IPConfigs) + populate(objectMap, "nicId", v.NicID) + populate(objectMap, "recoveryNetworkSecurityGroupId", v.RecoveryNetworkSecurityGroupID) + populate(objectMap, "recoveryNicName", v.RecoveryNicName) + populate(objectMap, "recoveryNicResourceGroupName", v.RecoveryNicResourceGroupName) + populate(objectMap, "reuseExistingNic", v.ReuseExistingNic) + populate(objectMap, "selectionType", v.SelectionType) + populate(objectMap, "targetNicName", v.TargetNicName) + populate(objectMap, "tfoNetworkSecurityGroupId", v.TfoNetworkSecurityGroupID) + populate(objectMap, "tfoNicName", v.TfoNicName) + populate(objectMap, "tfoNicResourceGroupName", v.TfoNicResourceGroupName) + populate(objectMap, "tfoReuseExistingNic", v.TfoReuseExistingNic) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMNicInputDetails. +func (v *VMNicInputDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableAcceleratedNetworkingOnRecovery": + err = unpopulate(val, "EnableAcceleratedNetworkingOnRecovery", &v.EnableAcceleratedNetworkingOnRecovery) + delete(rawMsg, key) + case "enableAcceleratedNetworkingOnTfo": + err = unpopulate(val, "EnableAcceleratedNetworkingOnTfo", &v.EnableAcceleratedNetworkingOnTfo) + delete(rawMsg, key) + case "ipConfigs": + err = unpopulate(val, "IPConfigs", &v.IPConfigs) + delete(rawMsg, key) + case "nicId": + err = unpopulate(val, "NicID", &v.NicID) + delete(rawMsg, key) + case "recoveryNetworkSecurityGroupId": + err = unpopulate(val, "RecoveryNetworkSecurityGroupID", &v.RecoveryNetworkSecurityGroupID) + delete(rawMsg, key) + case "recoveryNicName": + err = unpopulate(val, "RecoveryNicName", &v.RecoveryNicName) + delete(rawMsg, key) + case "recoveryNicResourceGroupName": + err = unpopulate(val, "RecoveryNicResourceGroupName", &v.RecoveryNicResourceGroupName) + delete(rawMsg, key) + case "reuseExistingNic": + err = unpopulate(val, "ReuseExistingNic", &v.ReuseExistingNic) + delete(rawMsg, key) + case "selectionType": + err = unpopulate(val, "SelectionType", &v.SelectionType) + delete(rawMsg, key) + case "targetNicName": + err = unpopulate(val, "TargetNicName", &v.TargetNicName) + delete(rawMsg, key) + case "tfoNetworkSecurityGroupId": + err = unpopulate(val, "TfoNetworkSecurityGroupID", &v.TfoNetworkSecurityGroupID) + delete(rawMsg, key) + case "tfoNicName": + err = unpopulate(val, "TfoNicName", &v.TfoNicName) + delete(rawMsg, key) + case "tfoNicResourceGroupName": + err = unpopulate(val, "TfoNicResourceGroupName", &v.TfoNicResourceGroupName) + delete(rawMsg, key) + case "tfoReuseExistingNic": + err = unpopulate(val, "TfoReuseExistingNic", &v.TfoReuseExistingNic) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMNicUpdatesTaskDetails. +func (v VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VmNicUpdatesTaskDetails" + populate(objectMap, "name", v.Name) + populate(objectMap, "nicId", v.NicID) + populate(objectMap, "vmId", v.VMID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMNicUpdatesTaskDetails. +func (v *VMNicUpdatesTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "nicId": + err = unpopulate(val, "NicID", &v.NicID) + delete(rawMsg, key) + case "vmId": + err = unpopulate(val, "VMID", &v.VMID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtContainerCreationInput. +func (v VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VMwareCbt" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtContainerCreationInput. +func (v *VMwareCbtContainerCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtContainerMappingInput. +func (v VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "keyVaultId", v.KeyVaultID) + populate(objectMap, "keyVaultUri", v.KeyVaultURI) + populate(objectMap, "serviceBusConnectionStringSecretName", v.ServiceBusConnectionStringSecretName) + populate(objectMap, "storageAccountId", v.StorageAccountID) + populate(objectMap, "storageAccountSasSecretName", v.StorageAccountSasSecretName) + populate(objectMap, "targetLocation", v.TargetLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtContainerMappingInput. +func (v *VMwareCbtContainerMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &v.KeyVaultID) + delete(rawMsg, key) + case "keyVaultUri": + err = unpopulate(val, "KeyVaultURI", &v.KeyVaultURI) + delete(rawMsg, key) + case "serviceBusConnectionStringSecretName": + err = unpopulate(val, "ServiceBusConnectionStringSecretName", &v.ServiceBusConnectionStringSecretName) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &v.StorageAccountID) + delete(rawMsg, key) + case "storageAccountSasSecretName": + err = unpopulate(val, "StorageAccountSasSecretName", &v.StorageAccountSasSecretName) + delete(rawMsg, key) + case "targetLocation": + err = unpopulate(val, "TargetLocation", &v.TargetLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtDiskInput. +func (v VMwareCbtDiskInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskEncryptionSetId", v.DiskEncryptionSetID) + populate(objectMap, "diskId", v.DiskID) + populate(objectMap, "diskType", v.DiskType) + populate(objectMap, "isOSDisk", v.IsOSDisk) + populate(objectMap, "logStorageAccountId", v.LogStorageAccountID) + populate(objectMap, "logStorageAccountSasSecretName", v.LogStorageAccountSasSecretName) + populate(objectMap, "sectorSizeInBytes", v.SectorSizeInBytes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtDiskInput. +func (v *VMwareCbtDiskInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &v.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &v.DiskID) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &v.DiskType) + delete(rawMsg, key) + case "isOSDisk": + err = unpopulate(val, "IsOSDisk", &v.IsOSDisk) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &v.LogStorageAccountID) + delete(rawMsg, key) + case "logStorageAccountSasSecretName": + err = unpopulate(val, "LogStorageAccountSasSecretName", &v.LogStorageAccountSasSecretName) + delete(rawMsg, key) + case "sectorSizeInBytes": + err = unpopulate(val, "SectorSizeInBytes", &v.SectorSizeInBytes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtEnableMigrationInput. +func (v VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "confidentialVmKeyVaultId", v.ConfidentialVMKeyVaultID) + populate(objectMap, "dataMoverRunAsAccountId", v.DataMoverRunAsAccountID) + populate(objectMap, "disksToInclude", v.DisksToInclude) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "licenseType", v.LicenseType) + populate(objectMap, "linuxLicenseType", v.LinuxLicenseType) + populate(objectMap, "performAutoResync", v.PerformAutoResync) + populate(objectMap, "performSqlBulkRegistration", v.PerformSQLBulkRegistration) + populate(objectMap, "sqlServerLicenseType", v.SQLServerLicenseType) + populate(objectMap, "seedDiskTags", v.SeedDiskTags) + populate(objectMap, "snapshotRunAsAccountId", v.SnapshotRunAsAccountID) + populate(objectMap, "targetAvailabilitySetId", v.TargetAvailabilitySetID) + populate(objectMap, "targetAvailabilityZone", v.TargetAvailabilityZone) + populate(objectMap, "targetBootDiagnosticsStorageAccountId", v.TargetBootDiagnosticsStorageAccountID) + populate(objectMap, "targetDiskTags", v.TargetDiskTags) + populate(objectMap, "targetNetworkId", v.TargetNetworkID) + populate(objectMap, "targetNicTags", v.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", v.TargetProximityPlacementGroupID) + populate(objectMap, "targetResourceGroupId", v.TargetResourceGroupID) + populate(objectMap, "targetSubnetName", v.TargetSubnetName) + populate(objectMap, "targetVmName", v.TargetVMName) + populate(objectMap, "targetVmSecurityProfile", v.TargetVMSecurityProfile) + populate(objectMap, "targetVmSize", v.TargetVMSize) + populate(objectMap, "targetVmTags", v.TargetVMTags) + populate(objectMap, "testNetworkId", v.TestNetworkID) + populate(objectMap, "testSubnetName", v.TestSubnetName) + populate(objectMap, "userSelectedOSName", v.UserSelectedOSName) + populate(objectMap, "vmwareMachineId", v.VmwareMachineID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtEnableMigrationInput. +func (v *VMwareCbtEnableMigrationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "confidentialVmKeyVaultId": + err = unpopulate(val, "ConfidentialVMKeyVaultID", &v.ConfidentialVMKeyVaultID) + delete(rawMsg, key) + case "dataMoverRunAsAccountId": + err = unpopulate(val, "DataMoverRunAsAccountID", &v.DataMoverRunAsAccountID) + delete(rawMsg, key) + case "disksToInclude": + err = unpopulate(val, "DisksToInclude", &v.DisksToInclude) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &v.LicenseType) + delete(rawMsg, key) + case "linuxLicenseType": + err = unpopulate(val, "LinuxLicenseType", &v.LinuxLicenseType) + delete(rawMsg, key) + case "performAutoResync": + err = unpopulate(val, "PerformAutoResync", &v.PerformAutoResync) + delete(rawMsg, key) + case "performSqlBulkRegistration": + err = unpopulate(val, "PerformSQLBulkRegistration", &v.PerformSQLBulkRegistration) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &v.SQLServerLicenseType) + delete(rawMsg, key) + case "seedDiskTags": + err = unpopulate(val, "SeedDiskTags", &v.SeedDiskTags) + delete(rawMsg, key) + case "snapshotRunAsAccountId": + err = unpopulate(val, "SnapshotRunAsAccountID", &v.SnapshotRunAsAccountID) + delete(rawMsg, key) + case "targetAvailabilitySetId": + err = unpopulate(val, "TargetAvailabilitySetID", &v.TargetAvailabilitySetID) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &v.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetBootDiagnosticsStorageAccountId": + err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &v.TargetBootDiagnosticsStorageAccountID) + delete(rawMsg, key) + case "targetDiskTags": + err = unpopulate(val, "TargetDiskTags", &v.TargetDiskTags) + delete(rawMsg, key) + case "targetNetworkId": + err = unpopulate(val, "TargetNetworkID", &v.TargetNetworkID) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &v.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &v.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetResourceGroupId": + err = unpopulate(val, "TargetResourceGroupID", &v.TargetResourceGroupID) + delete(rawMsg, key) + case "targetSubnetName": + err = unpopulate(val, "TargetSubnetName", &v.TargetSubnetName) + delete(rawMsg, key) + case "targetVmName": + err = unpopulate(val, "TargetVMName", &v.TargetVMName) + delete(rawMsg, key) + case "targetVmSecurityProfile": + err = unpopulate(val, "TargetVMSecurityProfile", &v.TargetVMSecurityProfile) + delete(rawMsg, key) + case "targetVmSize": + err = unpopulate(val, "TargetVMSize", &v.TargetVMSize) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &v.TargetVMTags) + delete(rawMsg, key) + case "testNetworkId": + err = unpopulate(val, "TestNetworkID", &v.TestNetworkID) + delete(rawMsg, key) + case "testSubnetName": + err = unpopulate(val, "TestSubnetName", &v.TestSubnetName) + delete(rawMsg, key) + case "userSelectedOSName": + err = unpopulate(val, "UserSelectedOSName", &v.UserSelectedOSName) + delete(rawMsg, key) + case "vmwareMachineId": + err = unpopulate(val, "VmwareMachineID", &v.VmwareMachineID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtEventDetails. +func (v VMwareCbtEventDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "migrationItemName", v.MigrationItemName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtEventDetails. +func (v *VMwareCbtEventDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "migrationItemName": + err = unpopulate(val, "MigrationItemName", &v.MigrationItemName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtMigrateInput. +func (v VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "osUpgradeVersion", v.OSUpgradeVersion) + populate(objectMap, "performShutdown", v.PerformShutdown) + populate(objectMap, "postMigrationSteps", v.PostMigrationSteps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtMigrateInput. +func (v *VMwareCbtMigrateInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "osUpgradeVersion": + err = unpopulate(val, "OSUpgradeVersion", &v.OSUpgradeVersion) + delete(rawMsg, key) + case "performShutdown": + err = unpopulate(val, "PerformShutdown", &v.PerformShutdown) + delete(rawMsg, key) + case "postMigrationSteps": + err = unpopulate(val, "PostMigrationSteps", &v.PostMigrationSteps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtMigrationDetails. +func (v VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applianceMonitoringDetails", v.ApplianceMonitoringDetails) + populate(objectMap, "confidentialVmKeyVaultId", v.ConfidentialVMKeyVaultID) + populate(objectMap, "dataMoverRunAsAccountId", v.DataMoverRunAsAccountID) + populate(objectMap, "deltaSyncProgressPercentage", v.DeltaSyncProgressPercentage) + populate(objectMap, "deltaSyncRetryCount", v.DeltaSyncRetryCount) + populate(objectMap, "firmwareType", v.FirmwareType) + populate(objectMap, "gatewayOperationDetails", v.GatewayOperationDetails) + populate(objectMap, "initialSeedingProgressPercentage", v.InitialSeedingProgressPercentage) + populate(objectMap, "initialSeedingRetryCount", v.InitialSeedingRetryCount) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "isCheckSumResyncCycle", v.IsCheckSumResyncCycle) + populate(objectMap, "lastRecoveryPointId", v.LastRecoveryPointID) + populateDateTimeRFC3339(objectMap, "lastRecoveryPointReceived", v.LastRecoveryPointReceived) + populate(objectMap, "licenseType", v.LicenseType) + populate(objectMap, "linuxLicenseType", v.LinuxLicenseType) + populate(objectMap, "migrationProgressPercentage", v.MigrationProgressPercentage) + populate(objectMap, "migrationRecoveryPointId", v.MigrationRecoveryPointID) + populate(objectMap, "osName", v.OSName) + populate(objectMap, "osType", v.OSType) + populate(objectMap, "operationName", v.OperationName) + populate(objectMap, "performAutoResync", v.PerformAutoResync) + populate(objectMap, "protectedDisks", v.ProtectedDisks) + populate(objectMap, "resumeProgressPercentage", v.ResumeProgressPercentage) + populate(objectMap, "resumeRetryCount", v.ResumeRetryCount) + populate(objectMap, "resyncProgressPercentage", v.ResyncProgressPercentage) + populate(objectMap, "resyncRequired", v.ResyncRequired) + populate(objectMap, "resyncRetryCount", v.ResyncRetryCount) + populate(objectMap, "resyncState", v.ResyncState) + populate(objectMap, "sqlServerLicenseType", v.SQLServerLicenseType) + populate(objectMap, "seedDiskTags", v.SeedDiskTags) + populate(objectMap, "snapshotRunAsAccountId", v.SnapshotRunAsAccountID) + populate(objectMap, "storageAccountId", v.StorageAccountID) + populate(objectMap, "supportedOSVersions", v.SupportedOSVersions) + populate(objectMap, "targetAvailabilitySetId", v.TargetAvailabilitySetID) + populate(objectMap, "targetAvailabilityZone", v.TargetAvailabilityZone) + populate(objectMap, "targetBootDiagnosticsStorageAccountId", v.TargetBootDiagnosticsStorageAccountID) + populate(objectMap, "targetDiskTags", v.TargetDiskTags) + populate(objectMap, "targetGeneration", v.TargetGeneration) + populate(objectMap, "targetLocation", v.TargetLocation) + populate(objectMap, "targetNetworkId", v.TargetNetworkID) + populate(objectMap, "targetNicTags", v.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", v.TargetProximityPlacementGroupID) + populate(objectMap, "targetResourceGroupId", v.TargetResourceGroupID) + populate(objectMap, "targetVmName", v.TargetVMName) + populate(objectMap, "targetVmSecurityProfile", v.TargetVMSecurityProfile) + populate(objectMap, "targetVmSize", v.TargetVMSize) + populate(objectMap, "targetVmTags", v.TargetVMTags) + populate(objectMap, "testNetworkId", v.TestNetworkID) + populate(objectMap, "vmNics", v.VMNics) + populate(objectMap, "vmwareMachineId", v.VmwareMachineID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtMigrationDetails. +func (v *VMwareCbtMigrationDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applianceMonitoringDetails": + err = unpopulate(val, "ApplianceMonitoringDetails", &v.ApplianceMonitoringDetails) + delete(rawMsg, key) + case "confidentialVmKeyVaultId": + err = unpopulate(val, "ConfidentialVMKeyVaultID", &v.ConfidentialVMKeyVaultID) + delete(rawMsg, key) + case "dataMoverRunAsAccountId": + err = unpopulate(val, "DataMoverRunAsAccountID", &v.DataMoverRunAsAccountID) + delete(rawMsg, key) + case "deltaSyncProgressPercentage": + err = unpopulate(val, "DeltaSyncProgressPercentage", &v.DeltaSyncProgressPercentage) + delete(rawMsg, key) + case "deltaSyncRetryCount": + err = unpopulate(val, "DeltaSyncRetryCount", &v.DeltaSyncRetryCount) + delete(rawMsg, key) + case "firmwareType": + err = unpopulate(val, "FirmwareType", &v.FirmwareType) + delete(rawMsg, key) + case "gatewayOperationDetails": + err = unpopulate(val, "GatewayOperationDetails", &v.GatewayOperationDetails) + delete(rawMsg, key) + case "initialSeedingProgressPercentage": + err = unpopulate(val, "InitialSeedingProgressPercentage", &v.InitialSeedingProgressPercentage) + delete(rawMsg, key) + case "initialSeedingRetryCount": + err = unpopulate(val, "InitialSeedingRetryCount", &v.InitialSeedingRetryCount) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "isCheckSumResyncCycle": + err = unpopulate(val, "IsCheckSumResyncCycle", &v.IsCheckSumResyncCycle) + delete(rawMsg, key) + case "lastRecoveryPointId": + err = unpopulate(val, "LastRecoveryPointID", &v.LastRecoveryPointID) + delete(rawMsg, key) + case "lastRecoveryPointReceived": + err = unpopulateDateTimeRFC3339(val, "LastRecoveryPointReceived", &v.LastRecoveryPointReceived) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &v.LicenseType) + delete(rawMsg, key) + case "linuxLicenseType": + err = unpopulate(val, "LinuxLicenseType", &v.LinuxLicenseType) + delete(rawMsg, key) + case "migrationProgressPercentage": + err = unpopulate(val, "MigrationProgressPercentage", &v.MigrationProgressPercentage) + delete(rawMsg, key) + case "migrationRecoveryPointId": + err = unpopulate(val, "MigrationRecoveryPointID", &v.MigrationRecoveryPointID) + delete(rawMsg, key) + case "osName": + err = unpopulate(val, "OSName", &v.OSName) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &v.OSType) + delete(rawMsg, key) + case "operationName": + err = unpopulate(val, "OperationName", &v.OperationName) + delete(rawMsg, key) + case "performAutoResync": + err = unpopulate(val, "PerformAutoResync", &v.PerformAutoResync) + delete(rawMsg, key) + case "protectedDisks": + err = unpopulate(val, "ProtectedDisks", &v.ProtectedDisks) + delete(rawMsg, key) + case "resumeProgressPercentage": + err = unpopulate(val, "ResumeProgressPercentage", &v.ResumeProgressPercentage) + delete(rawMsg, key) + case "resumeRetryCount": + err = unpopulate(val, "ResumeRetryCount", &v.ResumeRetryCount) + delete(rawMsg, key) + case "resyncProgressPercentage": + err = unpopulate(val, "ResyncProgressPercentage", &v.ResyncProgressPercentage) + delete(rawMsg, key) + case "resyncRequired": + err = unpopulate(val, "ResyncRequired", &v.ResyncRequired) + delete(rawMsg, key) + case "resyncRetryCount": + err = unpopulate(val, "ResyncRetryCount", &v.ResyncRetryCount) + delete(rawMsg, key) + case "resyncState": + err = unpopulate(val, "ResyncState", &v.ResyncState) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &v.SQLServerLicenseType) + delete(rawMsg, key) + case "seedDiskTags": + err = unpopulate(val, "SeedDiskTags", &v.SeedDiskTags) + delete(rawMsg, key) + case "snapshotRunAsAccountId": + err = unpopulate(val, "SnapshotRunAsAccountID", &v.SnapshotRunAsAccountID) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &v.StorageAccountID) + delete(rawMsg, key) + case "supportedOSVersions": + err = unpopulate(val, "SupportedOSVersions", &v.SupportedOSVersions) + delete(rawMsg, key) + case "targetAvailabilitySetId": + err = unpopulate(val, "TargetAvailabilitySetID", &v.TargetAvailabilitySetID) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &v.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetBootDiagnosticsStorageAccountId": + err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &v.TargetBootDiagnosticsStorageAccountID) + delete(rawMsg, key) + case "targetDiskTags": + err = unpopulate(val, "TargetDiskTags", &v.TargetDiskTags) + delete(rawMsg, key) + case "targetGeneration": + err = unpopulate(val, "TargetGeneration", &v.TargetGeneration) + delete(rawMsg, key) + case "targetLocation": + err = unpopulate(val, "TargetLocation", &v.TargetLocation) + delete(rawMsg, key) + case "targetNetworkId": + err = unpopulate(val, "TargetNetworkID", &v.TargetNetworkID) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &v.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &v.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetResourceGroupId": + err = unpopulate(val, "TargetResourceGroupID", &v.TargetResourceGroupID) + delete(rawMsg, key) + case "targetVmName": + err = unpopulate(val, "TargetVMName", &v.TargetVMName) + delete(rawMsg, key) + case "targetVmSecurityProfile": + err = unpopulate(val, "TargetVMSecurityProfile", &v.TargetVMSecurityProfile) + delete(rawMsg, key) + case "targetVmSize": + err = unpopulate(val, "TargetVMSize", &v.TargetVMSize) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &v.TargetVMTags) + delete(rawMsg, key) + case "testNetworkId": + err = unpopulate(val, "TestNetworkID", &v.TestNetworkID) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &v.VMNics) + delete(rawMsg, key) + case "vmwareMachineId": + err = unpopulate(val, "VmwareMachineID", &v.VmwareMachineID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtNicDetails. +func (v VMwareCbtNicDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isPrimaryNic", v.IsPrimaryNic) + populate(objectMap, "isSelectedForMigration", v.IsSelectedForMigration) + populate(objectMap, "nicId", v.NicID) + populate(objectMap, "sourceIPAddress", v.SourceIPAddress) + populate(objectMap, "sourceIPAddressType", v.SourceIPAddressType) + populate(objectMap, "sourceNetworkId", v.SourceNetworkID) + populate(objectMap, "targetIPAddress", v.TargetIPAddress) + populate(objectMap, "targetIPAddressType", v.TargetIPAddressType) + populate(objectMap, "targetNicName", v.TargetNicName) + populate(objectMap, "targetSubnetName", v.TargetSubnetName) + populate(objectMap, "testIPAddress", v.TestIPAddress) + populate(objectMap, "testIPAddressType", v.TestIPAddressType) + populate(objectMap, "testNetworkId", v.TestNetworkID) + populate(objectMap, "testSubnetName", v.TestSubnetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtNicDetails. +func (v *VMwareCbtNicDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isPrimaryNic": + err = unpopulate(val, "IsPrimaryNic", &v.IsPrimaryNic) + delete(rawMsg, key) + case "isSelectedForMigration": + err = unpopulate(val, "IsSelectedForMigration", &v.IsSelectedForMigration) + delete(rawMsg, key) + case "nicId": + err = unpopulate(val, "NicID", &v.NicID) + delete(rawMsg, key) + case "sourceIPAddress": + err = unpopulate(val, "SourceIPAddress", &v.SourceIPAddress) + delete(rawMsg, key) + case "sourceIPAddressType": + err = unpopulate(val, "SourceIPAddressType", &v.SourceIPAddressType) + delete(rawMsg, key) + case "sourceNetworkId": + err = unpopulate(val, "SourceNetworkID", &v.SourceNetworkID) + delete(rawMsg, key) + case "targetIPAddress": + err = unpopulate(val, "TargetIPAddress", &v.TargetIPAddress) + delete(rawMsg, key) + case "targetIPAddressType": + err = unpopulate(val, "TargetIPAddressType", &v.TargetIPAddressType) + delete(rawMsg, key) + case "targetNicName": + err = unpopulate(val, "TargetNicName", &v.TargetNicName) + delete(rawMsg, key) + case "targetSubnetName": + err = unpopulate(val, "TargetSubnetName", &v.TargetSubnetName) + delete(rawMsg, key) + case "testIPAddress": + err = unpopulate(val, "TestIPAddress", &v.TestIPAddress) + delete(rawMsg, key) + case "testIPAddressType": + err = unpopulate(val, "TestIPAddressType", &v.TestIPAddressType) + delete(rawMsg, key) + case "testNetworkId": + err = unpopulate(val, "TestNetworkID", &v.TestNetworkID) + delete(rawMsg, key) + case "testSubnetName": + err = unpopulate(val, "TestSubnetName", &v.TestSubnetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtNicInput. +func (v VMwareCbtNicInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isPrimaryNic", v.IsPrimaryNic) + populate(objectMap, "isSelectedForMigration", v.IsSelectedForMigration) + populate(objectMap, "nicId", v.NicID) + populate(objectMap, "targetNicName", v.TargetNicName) + populate(objectMap, "targetStaticIPAddress", v.TargetStaticIPAddress) + populate(objectMap, "targetSubnetName", v.TargetSubnetName) + populate(objectMap, "testStaticIPAddress", v.TestStaticIPAddress) + populate(objectMap, "testSubnetName", v.TestSubnetName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtNicInput. +func (v *VMwareCbtNicInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isPrimaryNic": + err = unpopulate(val, "IsPrimaryNic", &v.IsPrimaryNic) + delete(rawMsg, key) + case "isSelectedForMigration": + err = unpopulate(val, "IsSelectedForMigration", &v.IsSelectedForMigration) + delete(rawMsg, key) + case "nicId": + err = unpopulate(val, "NicID", &v.NicID) + delete(rawMsg, key) + case "targetNicName": + err = unpopulate(val, "TargetNicName", &v.TargetNicName) + delete(rawMsg, key) + case "targetStaticIPAddress": + err = unpopulate(val, "TargetStaticIPAddress", &v.TargetStaticIPAddress) + delete(rawMsg, key) + case "targetSubnetName": + err = unpopulate(val, "TargetSubnetName", &v.TargetSubnetName) + delete(rawMsg, key) + case "testStaticIPAddress": + err = unpopulate(val, "TestStaticIPAddress", &v.TestStaticIPAddress) + delete(rawMsg, key) + case "testSubnetName": + err = unpopulate(val, "TestSubnetName", &v.TestSubnetName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtPolicyCreationInput. +func (v VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", v.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", v.CrashConsistentFrequencyInMinutes) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "recoveryPointHistoryInMinutes", v.RecoveryPointHistoryInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtPolicyCreationInput. +func (v *VMwareCbtPolicyCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &v.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &v.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "recoveryPointHistoryInMinutes": + err = unpopulate(val, "RecoveryPointHistoryInMinutes", &v.RecoveryPointHistoryInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtProtectedDiskDetails. +func (v VMwareCbtProtectedDiskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capacityInBytes", v.CapacityInBytes) + populate(objectMap, "diskEncryptionSetId", v.DiskEncryptionSetID) + populate(objectMap, "diskId", v.DiskID) + populate(objectMap, "diskName", v.DiskName) + populate(objectMap, "diskPath", v.DiskPath) + populate(objectMap, "diskType", v.DiskType) + populate(objectMap, "gatewayOperationDetails", v.GatewayOperationDetails) + populate(objectMap, "isOSDisk", v.IsOSDisk) + populate(objectMap, "logStorageAccountId", v.LogStorageAccountID) + populate(objectMap, "logStorageAccountSasSecretName", v.LogStorageAccountSasSecretName) + populate(objectMap, "sectorSizeInBytes", v.SectorSizeInBytes) + populate(objectMap, "seedBlobUri", v.SeedBlobURI) + populate(objectMap, "seedManagedDiskId", v.SeedManagedDiskID) + populate(objectMap, "targetBlobUri", v.TargetBlobURI) + populate(objectMap, "targetDiskName", v.TargetDiskName) + populate(objectMap, "targetManagedDiskId", v.TargetManagedDiskID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtProtectedDiskDetails. +func (v *VMwareCbtProtectedDiskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacityInBytes": + err = unpopulate(val, "CapacityInBytes", &v.CapacityInBytes) + delete(rawMsg, key) + case "diskEncryptionSetId": + err = unpopulate(val, "DiskEncryptionSetID", &v.DiskEncryptionSetID) + delete(rawMsg, key) + case "diskId": + err = unpopulate(val, "DiskID", &v.DiskID) + delete(rawMsg, key) + case "diskName": + err = unpopulate(val, "DiskName", &v.DiskName) + delete(rawMsg, key) + case "diskPath": + err = unpopulate(val, "DiskPath", &v.DiskPath) + delete(rawMsg, key) + case "diskType": + err = unpopulate(val, "DiskType", &v.DiskType) + delete(rawMsg, key) + case "gatewayOperationDetails": + err = unpopulate(val, "GatewayOperationDetails", &v.GatewayOperationDetails) + delete(rawMsg, key) + case "isOSDisk": + err = unpopulate(val, "IsOSDisk", &v.IsOSDisk) + delete(rawMsg, key) + case "logStorageAccountId": + err = unpopulate(val, "LogStorageAccountID", &v.LogStorageAccountID) + delete(rawMsg, key) + case "logStorageAccountSasSecretName": + err = unpopulate(val, "LogStorageAccountSasSecretName", &v.LogStorageAccountSasSecretName) + delete(rawMsg, key) + case "sectorSizeInBytes": + err = unpopulate(val, "SectorSizeInBytes", &v.SectorSizeInBytes) + delete(rawMsg, key) + case "seedBlobUri": + err = unpopulate(val, "SeedBlobURI", &v.SeedBlobURI) + delete(rawMsg, key) + case "seedManagedDiskId": + err = unpopulate(val, "SeedManagedDiskID", &v.SeedManagedDiskID) + delete(rawMsg, key) + case "targetBlobUri": + err = unpopulate(val, "TargetBlobURI", &v.TargetBlobURI) + delete(rawMsg, key) + case "targetDiskName": + err = unpopulate(val, "TargetDiskName", &v.TargetDiskName) + delete(rawMsg, key) + case "targetManagedDiskId": + err = unpopulate(val, "TargetManagedDiskID", &v.TargetManagedDiskID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtProtectionContainerMappingDetails. +func (v VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "excludedSkus", v.ExcludedSKUs) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "keyVaultId", v.KeyVaultID) + populate(objectMap, "keyVaultUri", v.KeyVaultURI) + populate(objectMap, "roleSizeToNicCountMap", v.RoleSizeToNicCountMap) + populate(objectMap, "serviceBusConnectionStringSecretName", v.ServiceBusConnectionStringSecretName) + populate(objectMap, "storageAccountId", v.StorageAccountID) + populate(objectMap, "storageAccountSasSecretName", v.StorageAccountSasSecretName) + populate(objectMap, "targetLocation", v.TargetLocation) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtProtectionContainerMappingDetails. +func (v *VMwareCbtProtectionContainerMappingDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "excludedSkus": + err = unpopulate(val, "ExcludedSKUs", &v.ExcludedSKUs) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &v.KeyVaultID) + delete(rawMsg, key) + case "keyVaultUri": + err = unpopulate(val, "KeyVaultURI", &v.KeyVaultURI) + delete(rawMsg, key) + case "roleSizeToNicCountMap": + err = unpopulate(val, "RoleSizeToNicCountMap", &v.RoleSizeToNicCountMap) + delete(rawMsg, key) + case "serviceBusConnectionStringSecretName": + err = unpopulate(val, "ServiceBusConnectionStringSecretName", &v.ServiceBusConnectionStringSecretName) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &v.StorageAccountID) + delete(rawMsg, key) + case "storageAccountSasSecretName": + err = unpopulate(val, "StorageAccountSasSecretName", &v.StorageAccountSasSecretName) + delete(rawMsg, key) + case "targetLocation": + err = unpopulate(val, "TargetLocation", &v.TargetLocation) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtResumeReplicationInput. +func (v VMwareCbtResumeReplicationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "deleteMigrationResources", v.DeleteMigrationResources) + objectMap["instanceType"] = "VMwareCbt" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtResumeReplicationInput. +func (v *VMwareCbtResumeReplicationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deleteMigrationResources": + err = unpopulate(val, "DeleteMigrationResources", &v.DeleteMigrationResources) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtResyncInput. +func (v VMwareCbtResyncInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "skipCbtReset", v.SkipCbtReset) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtResyncInput. +func (v *VMwareCbtResyncInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "skipCbtReset": + err = unpopulate(val, "SkipCbtReset", &v.SkipCbtReset) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtSecurityProfileProperties. +func (v VMwareCbtSecurityProfileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isTargetVmConfidentialEncryptionEnabled", v.IsTargetVMConfidentialEncryptionEnabled) + populate(objectMap, "isTargetVmIntegrityMonitoringEnabled", v.IsTargetVMIntegrityMonitoringEnabled) + populate(objectMap, "isTargetVmSecureBootEnabled", v.IsTargetVMSecureBootEnabled) + populate(objectMap, "isTargetVmTpmEnabled", v.IsTargetVMTpmEnabled) + populate(objectMap, "targetVmSecurityType", v.TargetVMSecurityType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtSecurityProfileProperties. +func (v *VMwareCbtSecurityProfileProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "isTargetVmConfidentialEncryptionEnabled": + err = unpopulate(val, "IsTargetVMConfidentialEncryptionEnabled", &v.IsTargetVMConfidentialEncryptionEnabled) + delete(rawMsg, key) + case "isTargetVmIntegrityMonitoringEnabled": + err = unpopulate(val, "IsTargetVMIntegrityMonitoringEnabled", &v.IsTargetVMIntegrityMonitoringEnabled) + delete(rawMsg, key) + case "isTargetVmSecureBootEnabled": + err = unpopulate(val, "IsTargetVMSecureBootEnabled", &v.IsTargetVMSecureBootEnabled) + delete(rawMsg, key) + case "isTargetVmTpmEnabled": + err = unpopulate(val, "IsTargetVMTpmEnabled", &v.IsTargetVMTpmEnabled) + delete(rawMsg, key) + case "targetVmSecurityType": + err = unpopulate(val, "TargetVMSecurityType", &v.TargetVMSecurityType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtTestMigrateInput. +func (v VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "networkId", v.NetworkID) + populate(objectMap, "osUpgradeVersion", v.OSUpgradeVersion) + populate(objectMap, "postMigrationSteps", v.PostMigrationSteps) + populate(objectMap, "recoveryPointId", v.RecoveryPointID) + populate(objectMap, "vmNics", v.VMNics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtTestMigrateInput. +func (v *VMwareCbtTestMigrateInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "networkId": + err = unpopulate(val, "NetworkID", &v.NetworkID) + delete(rawMsg, key) + case "osUpgradeVersion": + err = unpopulate(val, "OSUpgradeVersion", &v.OSUpgradeVersion) + delete(rawMsg, key) + case "postMigrationSteps": + err = unpopulate(val, "PostMigrationSteps", &v.PostMigrationSteps) + delete(rawMsg, key) + case "recoveryPointId": + err = unpopulate(val, "RecoveryPointID", &v.RecoveryPointID) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &v.VMNics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtUpdateDiskInput. +func (v VMwareCbtUpdateDiskInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskId", v.DiskID) + populate(objectMap, "isOSDisk", v.IsOSDisk) + populate(objectMap, "targetDiskName", v.TargetDiskName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtUpdateDiskInput. +func (v *VMwareCbtUpdateDiskInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskId": + err = unpopulate(val, "DiskID", &v.DiskID) + delete(rawMsg, key) + case "isOSDisk": + err = unpopulate(val, "IsOSDisk", &v.IsOSDisk) + delete(rawMsg, key) + case "targetDiskName": + err = unpopulate(val, "TargetDiskName", &v.TargetDiskName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareCbtUpdateMigrationItemInput. +func (v VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "licenseType", v.LicenseType) + populate(objectMap, "linuxLicenseType", v.LinuxLicenseType) + populate(objectMap, "performAutoResync", v.PerformAutoResync) + populate(objectMap, "sqlServerLicenseType", v.SQLServerLicenseType) + populate(objectMap, "targetAvailabilitySetId", v.TargetAvailabilitySetID) + populate(objectMap, "targetAvailabilityZone", v.TargetAvailabilityZone) + populate(objectMap, "targetBootDiagnosticsStorageAccountId", v.TargetBootDiagnosticsStorageAccountID) + populate(objectMap, "targetDiskTags", v.TargetDiskTags) + populate(objectMap, "targetNetworkId", v.TargetNetworkID) + populate(objectMap, "targetNicTags", v.TargetNicTags) + populate(objectMap, "targetProximityPlacementGroupId", v.TargetProximityPlacementGroupID) + populate(objectMap, "targetResourceGroupId", v.TargetResourceGroupID) + populate(objectMap, "targetVmName", v.TargetVMName) + populate(objectMap, "targetVmSize", v.TargetVMSize) + populate(objectMap, "targetVmTags", v.TargetVMTags) + populate(objectMap, "testNetworkId", v.TestNetworkID) + populate(objectMap, "userSelectedOSName", v.UserSelectedOSName) + populate(objectMap, "vmDisks", v.VMDisks) + populate(objectMap, "vmNics", v.VMNics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareCbtUpdateMigrationItemInput. +func (v *VMwareCbtUpdateMigrationItemInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &v.LicenseType) + delete(rawMsg, key) + case "linuxLicenseType": + err = unpopulate(val, "LinuxLicenseType", &v.LinuxLicenseType) + delete(rawMsg, key) + case "performAutoResync": + err = unpopulate(val, "PerformAutoResync", &v.PerformAutoResync) + delete(rawMsg, key) + case "sqlServerLicenseType": + err = unpopulate(val, "SQLServerLicenseType", &v.SQLServerLicenseType) + delete(rawMsg, key) + case "targetAvailabilitySetId": + err = unpopulate(val, "TargetAvailabilitySetID", &v.TargetAvailabilitySetID) + delete(rawMsg, key) + case "targetAvailabilityZone": + err = unpopulate(val, "TargetAvailabilityZone", &v.TargetAvailabilityZone) + delete(rawMsg, key) + case "targetBootDiagnosticsStorageAccountId": + err = unpopulate(val, "TargetBootDiagnosticsStorageAccountID", &v.TargetBootDiagnosticsStorageAccountID) + delete(rawMsg, key) + case "targetDiskTags": + err = unpopulate(val, "TargetDiskTags", &v.TargetDiskTags) + delete(rawMsg, key) + case "targetNetworkId": + err = unpopulate(val, "TargetNetworkID", &v.TargetNetworkID) + delete(rawMsg, key) + case "targetNicTags": + err = unpopulate(val, "TargetNicTags", &v.TargetNicTags) + delete(rawMsg, key) + case "targetProximityPlacementGroupId": + err = unpopulate(val, "TargetProximityPlacementGroupID", &v.TargetProximityPlacementGroupID) + delete(rawMsg, key) + case "targetResourceGroupId": + err = unpopulate(val, "TargetResourceGroupID", &v.TargetResourceGroupID) + delete(rawMsg, key) + case "targetVmName": + err = unpopulate(val, "TargetVMName", &v.TargetVMName) + delete(rawMsg, key) + case "targetVmSize": + err = unpopulate(val, "TargetVMSize", &v.TargetVMSize) + delete(rawMsg, key) + case "targetVmTags": + err = unpopulate(val, "TargetVMTags", &v.TargetVMTags) + delete(rawMsg, key) + case "testNetworkId": + err = unpopulate(val, "TestNetworkID", &v.TestNetworkID) + delete(rawMsg, key) + case "userSelectedOSName": + err = unpopulate(val, "UserSelectedOSName", &v.UserSelectedOSName) + delete(rawMsg, key) + case "vmDisks": + err = unpopulate(val, "VMDisks", &v.VMDisks) + delete(rawMsg, key) + case "vmNics": + err = unpopulate(val, "VMNics", &v.VMNics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareDetails. +func (v VMwareDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentCount", v.AgentCount) + populateDateTimeRFC3339(objectMap, "agentExpiryDate", v.AgentExpiryDate) + populate(objectMap, "agentVersion", v.AgentVersion) + populate(objectMap, "agentVersionDetails", v.AgentVersionDetails) + populate(objectMap, "availableMemoryInBytes", v.AvailableMemoryInBytes) + populate(objectMap, "availableSpaceInBytes", v.AvailableSpaceInBytes) + populate(objectMap, "cpuLoad", v.CPULoad) + populate(objectMap, "cpuLoadStatus", v.CPULoadStatus) + populate(objectMap, "csServiceStatus", v.CsServiceStatus) + populate(objectMap, "databaseServerLoad", v.DatabaseServerLoad) + populate(objectMap, "databaseServerLoadStatus", v.DatabaseServerLoadStatus) + populate(objectMap, "hostName", v.HostName) + populate(objectMap, "ipAddress", v.IPAddress) + objectMap["instanceType"] = "VMware" + populateDateTimeRFC3339(objectMap, "lastHeartbeat", v.LastHeartbeat) + populate(objectMap, "masterTargetServers", v.MasterTargetServers) + populate(objectMap, "memoryUsageStatus", v.MemoryUsageStatus) + populate(objectMap, "processServerCount", v.ProcessServerCount) + populate(objectMap, "processServers", v.ProcessServers) + populate(objectMap, "protectedServers", v.ProtectedServers) + populate(objectMap, "psTemplateVersion", v.PsTemplateVersion) + populate(objectMap, "replicationPairCount", v.ReplicationPairCount) + populate(objectMap, "runAsAccounts", v.RunAsAccounts) + populateDateTimeRFC3339(objectMap, "sslCertExpiryDate", v.SSLCertExpiryDate) + populate(objectMap, "sslCertExpiryRemainingDays", v.SSLCertExpiryRemainingDays) + populate(objectMap, "spaceUsageStatus", v.SpaceUsageStatus) + populate(objectMap, "switchProviderBlockingErrorDetails", v.SwitchProviderBlockingErrorDetails) + populate(objectMap, "systemLoad", v.SystemLoad) + populate(objectMap, "systemLoadStatus", v.SystemLoadStatus) + populate(objectMap, "totalMemoryInBytes", v.TotalMemoryInBytes) + populate(objectMap, "totalSpaceInBytes", v.TotalSpaceInBytes) + populate(objectMap, "versionStatus", v.VersionStatus) + populate(objectMap, "webLoad", v.WebLoad) + populate(objectMap, "webLoadStatus", v.WebLoadStatus) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareDetails. +func (v *VMwareDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentCount": + err = unpopulate(val, "AgentCount", &v.AgentCount) + delete(rawMsg, key) + case "agentExpiryDate": + err = unpopulateDateTimeRFC3339(val, "AgentExpiryDate", &v.AgentExpiryDate) + delete(rawMsg, key) + case "agentVersion": + err = unpopulate(val, "AgentVersion", &v.AgentVersion) + delete(rawMsg, key) + case "agentVersionDetails": + err = unpopulate(val, "AgentVersionDetails", &v.AgentVersionDetails) + delete(rawMsg, key) + case "availableMemoryInBytes": + err = unpopulate(val, "AvailableMemoryInBytes", &v.AvailableMemoryInBytes) + delete(rawMsg, key) + case "availableSpaceInBytes": + err = unpopulate(val, "AvailableSpaceInBytes", &v.AvailableSpaceInBytes) + delete(rawMsg, key) + case "cpuLoad": + err = unpopulate(val, "CPULoad", &v.CPULoad) + delete(rawMsg, key) + case "cpuLoadStatus": + err = unpopulate(val, "CPULoadStatus", &v.CPULoadStatus) + delete(rawMsg, key) + case "csServiceStatus": + err = unpopulate(val, "CsServiceStatus", &v.CsServiceStatus) + delete(rawMsg, key) + case "databaseServerLoad": + err = unpopulate(val, "DatabaseServerLoad", &v.DatabaseServerLoad) + delete(rawMsg, key) + case "databaseServerLoadStatus": + err = unpopulate(val, "DatabaseServerLoadStatus", &v.DatabaseServerLoadStatus) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &v.HostName) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &v.IPAddress) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "lastHeartbeat": + err = unpopulateDateTimeRFC3339(val, "LastHeartbeat", &v.LastHeartbeat) + delete(rawMsg, key) + case "masterTargetServers": + err = unpopulate(val, "MasterTargetServers", &v.MasterTargetServers) + delete(rawMsg, key) + case "memoryUsageStatus": + err = unpopulate(val, "MemoryUsageStatus", &v.MemoryUsageStatus) + delete(rawMsg, key) + case "processServerCount": + err = unpopulate(val, "ProcessServerCount", &v.ProcessServerCount) + delete(rawMsg, key) + case "processServers": + err = unpopulate(val, "ProcessServers", &v.ProcessServers) + delete(rawMsg, key) + case "protectedServers": + err = unpopulate(val, "ProtectedServers", &v.ProtectedServers) + delete(rawMsg, key) + case "psTemplateVersion": + err = unpopulate(val, "PsTemplateVersion", &v.PsTemplateVersion) + delete(rawMsg, key) + case "replicationPairCount": + err = unpopulate(val, "ReplicationPairCount", &v.ReplicationPairCount) + delete(rawMsg, key) + case "runAsAccounts": + err = unpopulate(val, "RunAsAccounts", &v.RunAsAccounts) + delete(rawMsg, key) + case "sslCertExpiryDate": + err = unpopulateDateTimeRFC3339(val, "SSLCertExpiryDate", &v.SSLCertExpiryDate) + delete(rawMsg, key) + case "sslCertExpiryRemainingDays": + err = unpopulate(val, "SSLCertExpiryRemainingDays", &v.SSLCertExpiryRemainingDays) + delete(rawMsg, key) + case "spaceUsageStatus": + err = unpopulate(val, "SpaceUsageStatus", &v.SpaceUsageStatus) + delete(rawMsg, key) + case "switchProviderBlockingErrorDetails": + err = unpopulate(val, "SwitchProviderBlockingErrorDetails", &v.SwitchProviderBlockingErrorDetails) + delete(rawMsg, key) + case "systemLoad": + err = unpopulate(val, "SystemLoad", &v.SystemLoad) + delete(rawMsg, key) + case "systemLoadStatus": + err = unpopulate(val, "SystemLoadStatus", &v.SystemLoadStatus) + delete(rawMsg, key) + case "totalMemoryInBytes": + err = unpopulate(val, "TotalMemoryInBytes", &v.TotalMemoryInBytes) + delete(rawMsg, key) + case "totalSpaceInBytes": + err = unpopulate(val, "TotalSpaceInBytes", &v.TotalSpaceInBytes) + delete(rawMsg, key) + case "versionStatus": + err = unpopulate(val, "VersionStatus", &v.VersionStatus) + delete(rawMsg, key) + case "webLoad": + err = unpopulate(val, "WebLoad", &v.WebLoad) + delete(rawMsg, key) + case "webLoadStatus": + err = unpopulate(val, "WebLoadStatus", &v.WebLoadStatus) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareV2FabricCreationInput. +func (v VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VMwareV2" + populate(objectMap, "migrationSolutionId", v.MigrationSolutionID) + populate(objectMap, "physicalSiteId", v.PhysicalSiteID) + populate(objectMap, "vmwareSiteId", v.VmwareSiteID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareV2FabricCreationInput. +func (v *VMwareV2FabricCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "migrationSolutionId": + err = unpopulate(val, "MigrationSolutionID", &v.MigrationSolutionID) + delete(rawMsg, key) + case "physicalSiteId": + err = unpopulate(val, "PhysicalSiteID", &v.PhysicalSiteID) + delete(rawMsg, key) + case "vmwareSiteId": + err = unpopulate(val, "VmwareSiteID", &v.VmwareSiteID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareV2FabricSpecificDetails. +func (v VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VMwareV2" + populate(objectMap, "migrationSolutionId", v.MigrationSolutionID) + populate(objectMap, "physicalSiteId", v.PhysicalSiteID) + populate(objectMap, "processServers", v.ProcessServers) + populate(objectMap, "serviceContainerId", v.ServiceContainerID) + populate(objectMap, "serviceEndpoint", v.ServiceEndpoint) + populate(objectMap, "serviceResourceId", v.ServiceResourceID) + populate(objectMap, "vmwareSiteId", v.VmwareSiteID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareV2FabricSpecificDetails. +func (v *VMwareV2FabricSpecificDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "migrationSolutionId": + err = unpopulate(val, "MigrationSolutionID", &v.MigrationSolutionID) + delete(rawMsg, key) + case "physicalSiteId": + err = unpopulate(val, "PhysicalSiteID", &v.PhysicalSiteID) + delete(rawMsg, key) + case "processServers": + err = unpopulate(val, "ProcessServers", &v.ProcessServers) + delete(rawMsg, key) + case "serviceContainerId": + err = unpopulate(val, "ServiceContainerID", &v.ServiceContainerID) + delete(rawMsg, key) + case "serviceEndpoint": + err = unpopulate(val, "ServiceEndpoint", &v.ServiceEndpoint) + delete(rawMsg, key) + case "serviceResourceId": + err = unpopulate(val, "ServiceResourceID", &v.ServiceResourceID) + delete(rawMsg, key) + case "vmwareSiteId": + err = unpopulate(val, "VmwareSiteID", &v.VmwareSiteID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VMwareVirtualMachineDetails. +func (v VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentGeneratedId", v.AgentGeneratedID) + populate(objectMap, "agentInstalled", v.AgentInstalled) + populate(objectMap, "agentVersion", v.AgentVersion) + populate(objectMap, "discoveryType", v.DiscoveryType) + populate(objectMap, "diskDetails", v.DiskDetails) + populate(objectMap, "ipAddress", v.IPAddress) + objectMap["instanceType"] = "VMwareVirtualMachine" + populate(objectMap, "osType", v.OSType) + populate(objectMap, "poweredOn", v.PoweredOn) + populate(objectMap, "vCenterInfrastructureId", v.VCenterInfrastructureID) + populate(objectMap, "validationErrors", v.ValidationErrors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VMwareVirtualMachineDetails. +func (v *VMwareVirtualMachineDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentGeneratedId": + err = unpopulate(val, "AgentGeneratedID", &v.AgentGeneratedID) + delete(rawMsg, key) + case "agentInstalled": + err = unpopulate(val, "AgentInstalled", &v.AgentInstalled) + delete(rawMsg, key) + case "agentVersion": + err = unpopulate(val, "AgentVersion", &v.AgentVersion) + delete(rawMsg, key) + case "discoveryType": + err = unpopulate(val, "DiscoveryType", &v.DiscoveryType) + delete(rawMsg, key) + case "diskDetails": + err = unpopulate(val, "DiskDetails", &v.DiskDetails) + delete(rawMsg, key) + case "ipAddress": + err = unpopulate(val, "IPAddress", &v.IPAddress) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &v.OSType) + delete(rawMsg, key) + case "poweredOn": + err = unpopulate(val, "PoweredOn", &v.PoweredOn) + delete(rawMsg, key) + case "vCenterInfrastructureId": + err = unpopulate(val, "VCenterInfrastructureID", &v.VCenterInfrastructureID) + delete(rawMsg, key) + case "validationErrors": + err = unpopulate(val, "ValidationErrors", &v.ValidationErrors) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultHealthDetails. +func (v VaultHealthDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultHealthDetails. +func (v *VaultHealthDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultHealthProperties. +func (v VaultHealthProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containersHealth", v.ContainersHealth) + populate(objectMap, "fabricsHealth", v.FabricsHealth) + populate(objectMap, "protectedItemsHealth", v.ProtectedItemsHealth) + populate(objectMap, "vaultErrors", v.VaultErrors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultHealthProperties. +func (v *VaultHealthProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containersHealth": + err = unpopulate(val, "ContainersHealth", &v.ContainersHealth) + delete(rawMsg, key) + case "fabricsHealth": + err = unpopulate(val, "FabricsHealth", &v.FabricsHealth) + delete(rawMsg, key) + case "protectedItemsHealth": + err = unpopulate(val, "ProtectedItemsHealth", &v.ProtectedItemsHealth) + delete(rawMsg, key) + case "vaultErrors": + err = unpopulate(val, "VaultErrors", &v.VaultErrors) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultSetting. +func (v VaultSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSetting. +func (v *VaultSetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &v.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultSettingCollection. +func (v VaultSettingCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSettingCollection. +func (v *VaultSettingCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &v.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultSettingCreationInput. +func (v VaultSettingCreationInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSettingCreationInput. +func (v *VaultSettingCreationInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultSettingCreationInputProperties. +func (v VaultSettingCreationInputProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "migrationSolutionId", v.MigrationSolutionID) + populate(objectMap, "vmwareToAzureProviderType", v.VmwareToAzureProviderType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSettingCreationInputProperties. +func (v *VaultSettingCreationInputProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "migrationSolutionId": + err = unpopulate(val, "MigrationSolutionID", &v.MigrationSolutionID) + delete(rawMsg, key) + case "vmwareToAzureProviderType": + err = unpopulate(val, "VmwareToAzureProviderType", &v.VmwareToAzureProviderType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VaultSettingProperties. +func (v VaultSettingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "migrationSolutionId", v.MigrationSolutionID) + populate(objectMap, "vmwareToAzureProviderType", v.VmwareToAzureProviderType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSettingProperties. +func (v *VaultSettingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "migrationSolutionId": + err = unpopulate(val, "MigrationSolutionID", &v.MigrationSolutionID) + delete(rawMsg, key) + case "vmwareToAzureProviderType": + err = unpopulate(val, "VmwareToAzureProviderType", &v.VmwareToAzureProviderType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VersionDetails. +func (v VersionDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "expiryDate", v.ExpiryDate) + populate(objectMap, "status", v.Status) + populate(objectMap, "version", v.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VersionDetails. +func (v *VersionDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expiryDate": + err = unpopulateDateTimeRFC3339(val, "ExpiryDate", &v.ExpiryDate) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &v.Status) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &v.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualMachineTaskDetails. +func (v VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VirtualMachineTaskDetails" + populate(objectMap, "jobTask", v.JobTask) + populate(objectMap, "skippedReason", v.SkippedReason) + populate(objectMap, "skippedReasonString", v.SkippedReasonString) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTaskDetails. +func (v *VirtualMachineTaskDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "jobTask": + err = unpopulate(val, "JobTask", &v.JobTask) + delete(rawMsg, key) + case "skippedReason": + err = unpopulate(val, "SkippedReason", &v.SkippedReason) + delete(rawMsg, key) + case "skippedReasonString": + err = unpopulate(val, "SkippedReasonString", &v.SkippedReasonString) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VmmDetails. +func (v VmmDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VMM" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VmmDetails. +func (v *VmmDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VmmToAzureCreateNetworkMappingInput. +func (v VmmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VmmToAzure" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToAzureCreateNetworkMappingInput. +func (v *VmmToAzureCreateNetworkMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VmmToAzureNetworkMappingSettings. +func (v VmmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VmmToAzure" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToAzureNetworkMappingSettings. +func (v *VmmToAzureNetworkMappingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VmmToAzureUpdateNetworkMappingInput. +func (v VmmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VmmToAzure" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToAzureUpdateNetworkMappingInput. +func (v *VmmToAzureUpdateNetworkMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VmmToVmmCreateNetworkMappingInput. +func (v VmmToVmmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VmmToVmm" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToVmmCreateNetworkMappingInput. +func (v *VmmToVmmCreateNetworkMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VmmToVmmNetworkMappingSettings. +func (v VmmToVmmNetworkMappingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VmmToVmm" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToVmmNetworkMappingSettings. +func (v *VmmToVmmNetworkMappingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VmmToVmmUpdateNetworkMappingInput. +func (v VmmToVmmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["instanceType"] = "VmmToVmm" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VmmToVmmUpdateNetworkMappingInput. +func (v *VmmToVmmUpdateNetworkMappingInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VmmVirtualMachineDetails. +func (v VmmVirtualMachineDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "diskDetails", v.DiskDetails) + populate(objectMap, "generation", v.Generation) + populate(objectMap, "hasFibreChannelAdapter", v.HasFibreChannelAdapter) + populate(objectMap, "hasPhysicalDisk", v.HasPhysicalDisk) + populate(objectMap, "hasSharedVhd", v.HasSharedVhd) + populate(objectMap, "hyperVHostId", v.HyperVHostID) + objectMap["instanceType"] = "VmmVirtualMachine" + populate(objectMap, "osDetails", v.OSDetails) + populate(objectMap, "sourceItemId", v.SourceItemID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VmmVirtualMachineDetails. +func (v *VmmVirtualMachineDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "diskDetails": + err = unpopulate(val, "DiskDetails", &v.DiskDetails) + delete(rawMsg, key) + case "generation": + err = unpopulate(val, "Generation", &v.Generation) + delete(rawMsg, key) + case "hasFibreChannelAdapter": + err = unpopulate(val, "HasFibreChannelAdapter", &v.HasFibreChannelAdapter) + delete(rawMsg, key) + case "hasPhysicalDisk": + err = unpopulate(val, "HasPhysicalDisk", &v.HasPhysicalDisk) + delete(rawMsg, key) + case "hasSharedVhd": + err = unpopulate(val, "HasSharedVhd", &v.HasSharedVhd) + delete(rawMsg, key) + case "hyperVHostId": + err = unpopulate(val, "HyperVHostID", &v.HyperVHostID) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "osDetails": + err = unpopulate(val, "OSDetails", &v.OSDetails) + delete(rawMsg, key) + case "sourceItemId": + err = unpopulate(val, "SourceItemID", &v.SourceItemID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VmwareCbtPolicyDetails. +func (v VmwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appConsistentFrequencyInMinutes", v.AppConsistentFrequencyInMinutes) + populate(objectMap, "crashConsistentFrequencyInMinutes", v.CrashConsistentFrequencyInMinutes) + objectMap["instanceType"] = "VMwareCbt" + populate(objectMap, "recoveryPointHistoryInMinutes", v.RecoveryPointHistoryInMinutes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VmwareCbtPolicyDetails. +func (v *VmwareCbtPolicyDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appConsistentFrequencyInMinutes": + err = unpopulate(val, "AppConsistentFrequencyInMinutes", &v.AppConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "crashConsistentFrequencyInMinutes": + err = unpopulate(val, "CrashConsistentFrequencyInMinutes", &v.CrashConsistentFrequencyInMinutes) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &v.InstanceType) + delete(rawMsg, key) + case "recoveryPointHistoryInMinutes": + err = unpopulate(val, "RecoveryPointHistoryInMinutes", &v.RecoveryPointHistoryInMinutes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/operations_client.go new file mode 100644 index 00000000..e717ba08 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/operations_client.go @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Operation to return the list of available operations. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(resourceGroupName string, options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, _ *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationsDiscoveryCollection); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/options.go new file mode 100644 index 00000000..056818c6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/options.go @@ -0,0 +1,1025 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +// ClusterRecoveryPointClientGetOptions contains the optional parameters for the ClusterRecoveryPointClient.Get method. +type ClusterRecoveryPointClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClusterRecoveryPointsClientListByReplicationProtectionClusterOptions contains the optional parameters for the ClusterRecoveryPointsClient.NewListByReplicationProtectionClusterPager +// method. +type ClusterRecoveryPointsClientListByReplicationProtectionClusterOptions struct { + // placeholder for future optional parameters +} + +// MigrationRecoveryPointsClientGetOptions contains the optional parameters for the MigrationRecoveryPointsClient.Get method. +type MigrationRecoveryPointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions contains the optional parameters for the MigrationRecoveryPointsClient.NewListByReplicationMigrationItemsPager +// method. +type MigrationRecoveryPointsClientListByReplicationMigrationItemsOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. +type RecoveryPointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RecoveryPointsClientListByReplicationProtectedItemsOptions contains the optional parameters for the RecoveryPointsClient.NewListByReplicationProtectedItemsPager +// method. +type RecoveryPointsClientListByReplicationProtectedItemsOptions struct { + // placeholder for future optional parameters +} + +// ReplicationAlertSettingsClientCreateOptions contains the optional parameters for the ReplicationAlertSettingsClient.Create +// method. +type ReplicationAlertSettingsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ReplicationAlertSettingsClientGetOptions contains the optional parameters for the ReplicationAlertSettingsClient.Get method. +type ReplicationAlertSettingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationAlertSettingsClientListOptions contains the optional parameters for the ReplicationAlertSettingsClient.NewListPager +// method. +type ReplicationAlertSettingsClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationAppliancesClientListOptions contains the optional parameters for the ReplicationAppliancesClient.NewListPager +// method. +type ReplicationAppliancesClientListOptions struct { + // OData filter options. + Filter *string +} + +// ReplicationEligibilityResultsClientGetOptions contains the optional parameters for the ReplicationEligibilityResultsClient.Get +// method. +type ReplicationEligibilityResultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationEligibilityResultsClientListOptions contains the optional parameters for the ReplicationEligibilityResultsClient.List +// method. +type ReplicationEligibilityResultsClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationEventsClientGetOptions contains the optional parameters for the ReplicationEventsClient.Get method. +type ReplicationEventsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationEventsClientListOptions contains the optional parameters for the ReplicationEventsClient.NewListPager method. +type ReplicationEventsClientListOptions struct { + // OData filter options. + Filter *string +} + +// ReplicationFabricsClientBeginCheckConsistencyOptions contains the optional parameters for the ReplicationFabricsClient.BeginCheckConsistency +// method. +type ReplicationFabricsClientBeginCheckConsistencyOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationFabricsClientBeginCreateOptions contains the optional parameters for the ReplicationFabricsClient.BeginCreate +// method. +type ReplicationFabricsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationFabricsClientBeginDeleteOptions contains the optional parameters for the ReplicationFabricsClient.BeginDelete +// method. +type ReplicationFabricsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationFabricsClientBeginMigrateToAADOptions contains the optional parameters for the ReplicationFabricsClient.BeginMigrateToAAD +// method. +type ReplicationFabricsClientBeginMigrateToAADOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationFabricsClientBeginPurgeOptions contains the optional parameters for the ReplicationFabricsClient.BeginPurge +// method. +type ReplicationFabricsClientBeginPurgeOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationFabricsClientBeginReassociateGatewayOptions contains the optional parameters for the ReplicationFabricsClient.BeginReassociateGateway +// method. +type ReplicationFabricsClientBeginReassociateGatewayOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationFabricsClientBeginRemoveInfraOptions contains the optional parameters for the ReplicationFabricsClient.BeginRemoveInfra +// method. +type ReplicationFabricsClientBeginRemoveInfraOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationFabricsClientBeginRenewCertificateOptions contains the optional parameters for the ReplicationFabricsClient.BeginRenewCertificate +// method. +type ReplicationFabricsClientBeginRenewCertificateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationFabricsClientGetOptions contains the optional parameters for the ReplicationFabricsClient.Get method. +type ReplicationFabricsClientGetOptions struct { + // OData filter options. + Filter *string +} + +// ReplicationFabricsClientListOptions contains the optional parameters for the ReplicationFabricsClient.NewListPager method. +type ReplicationFabricsClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationJobsClientBeginCancelOptions contains the optional parameters for the ReplicationJobsClient.BeginCancel method. +type ReplicationJobsClientBeginCancelOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationJobsClientBeginExportOptions contains the optional parameters for the ReplicationJobsClient.BeginExport method. +type ReplicationJobsClientBeginExportOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationJobsClientBeginRestartOptions contains the optional parameters for the ReplicationJobsClient.BeginRestart method. +type ReplicationJobsClientBeginRestartOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationJobsClientBeginResumeOptions contains the optional parameters for the ReplicationJobsClient.BeginResume method. +type ReplicationJobsClientBeginResumeOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationJobsClientGetOptions contains the optional parameters for the ReplicationJobsClient.Get method. +type ReplicationJobsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationJobsClientListOptions contains the optional parameters for the ReplicationJobsClient.NewListPager method. +type ReplicationJobsClientListOptions struct { + // OData filter options. + Filter *string +} + +// ReplicationLogicalNetworksClientGetOptions contains the optional parameters for the ReplicationLogicalNetworksClient.Get +// method. +type ReplicationLogicalNetworksClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationLogicalNetworksClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationLogicalNetworksClient.NewListByReplicationFabricsPager +// method. +type ReplicationLogicalNetworksClientListByReplicationFabricsOptions struct { + // placeholder for future optional parameters +} + +// ReplicationMigrationItemsClientBeginCreateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginCreate +// method. +type ReplicationMigrationItemsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationMigrationItemsClientBeginDeleteOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginDelete +// method. +type ReplicationMigrationItemsClientBeginDeleteOptions struct { + // The delete option. + DeleteOption *string + + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationMigrationItemsClientBeginMigrateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginMigrate +// method. +type ReplicationMigrationItemsClientBeginMigrateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationMigrationItemsClientBeginPauseReplicationOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginPauseReplication +// method. +type ReplicationMigrationItemsClientBeginPauseReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationMigrationItemsClientBeginResumeReplicationOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginResumeReplication +// method. +type ReplicationMigrationItemsClientBeginResumeReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationMigrationItemsClientBeginResyncOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginResync +// method. +type ReplicationMigrationItemsClientBeginResyncOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginTestMigrateCleanup +// method. +type ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationMigrationItemsClientBeginTestMigrateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginTestMigrate +// method. +type ReplicationMigrationItemsClientBeginTestMigrateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationMigrationItemsClientBeginUpdateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginUpdate +// method. +type ReplicationMigrationItemsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationMigrationItemsClientGetOptions contains the optional parameters for the ReplicationMigrationItemsClient.Get +// method. +type ReplicationMigrationItemsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions contains the optional parameters for the ReplicationMigrationItemsClient.NewListByReplicationProtectionContainersPager +// method. +type ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions struct { + // OData filter options. + Filter *string + + // The pagination token. + SkipToken *string + + // The page size. + TakeToken *string +} + +// ReplicationMigrationItemsClientListOptions contains the optional parameters for the ReplicationMigrationItemsClient.NewListPager +// method. +type ReplicationMigrationItemsClientListOptions struct { + // OData filter options. + Filter *string + + // The pagination token. + SkipToken *string + + // The page size. + TakeToken *string +} + +// ReplicationNetworkMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginCreate +// method. +type ReplicationNetworkMappingsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationNetworkMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginDelete +// method. +type ReplicationNetworkMappingsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationNetworkMappingsClientBeginUpdateOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginUpdate +// method. +type ReplicationNetworkMappingsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationNetworkMappingsClientGetOptions contains the optional parameters for the ReplicationNetworkMappingsClient.Get +// method. +type ReplicationNetworkMappingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationNetworkMappingsClientListByReplicationNetworksOptions contains the optional parameters for the ReplicationNetworkMappingsClient.NewListByReplicationNetworksPager +// method. +type ReplicationNetworkMappingsClientListByReplicationNetworksOptions struct { + // placeholder for future optional parameters +} + +// ReplicationNetworkMappingsClientListOptions contains the optional parameters for the ReplicationNetworkMappingsClient.NewListPager +// method. +type ReplicationNetworkMappingsClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationNetworksClientGetOptions contains the optional parameters for the ReplicationNetworksClient.Get method. +type ReplicationNetworksClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationNetworksClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationNetworksClient.NewListByReplicationFabricsPager +// method. +type ReplicationNetworksClientListByReplicationFabricsOptions struct { + // placeholder for future optional parameters +} + +// ReplicationNetworksClientListOptions contains the optional parameters for the ReplicationNetworksClient.NewListPager method. +type ReplicationNetworksClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationPoliciesClientBeginCreateOptions contains the optional parameters for the ReplicationPoliciesClient.BeginCreate +// method. +type ReplicationPoliciesClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationPoliciesClientBeginDeleteOptions contains the optional parameters for the ReplicationPoliciesClient.BeginDelete +// method. +type ReplicationPoliciesClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationPoliciesClientBeginUpdateOptions contains the optional parameters for the ReplicationPoliciesClient.BeginUpdate +// method. +type ReplicationPoliciesClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationPoliciesClientGetOptions contains the optional parameters for the ReplicationPoliciesClient.Get method. +type ReplicationPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationPoliciesClientListOptions contains the optional parameters for the ReplicationPoliciesClient.NewListPager method. +type ReplicationPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectableItemsClientGetOptions contains the optional parameters for the ReplicationProtectableItemsClient.Get +// method. +type ReplicationProtectableItemsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions contains the optional parameters for the +// ReplicationProtectableItemsClient.NewListByReplicationProtectionContainersPager method. +type ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions struct { + // OData filter options. + Filter *string + + // skipToken OData query parameter. + SkipToken *string + + // take OData query parameter. + Take *string +} + +// ReplicationProtectedItemsClientBeginAddDisksOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginAddDisks +// method. +type ReplicationProtectedItemsClientBeginAddDisksOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginApplyRecoveryPoint +// method. +type ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginCreateOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginCreate +// method. +type ReplicationProtectedItemsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginDelete +// method. +type ReplicationProtectedItemsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginFailoverCancelOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginFailoverCancel +// method. +type ReplicationProtectedItemsClientBeginFailoverCancelOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginFailoverCommitOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginFailoverCommit +// method. +type ReplicationProtectedItemsClientBeginFailoverCommitOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginPlannedFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginPlannedFailover +// method. +type ReplicationProtectedItemsClientBeginPlannedFailoverOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginPurgeOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginPurge +// method. +type ReplicationProtectedItemsClientBeginPurgeOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginRemoveDisksOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginRemoveDisks +// method. +type ReplicationProtectedItemsClientBeginRemoveDisksOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginRepairReplicationOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginRepairReplication +// method. +type ReplicationProtectedItemsClientBeginRepairReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginReprotectOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginReprotect +// method. +type ReplicationProtectedItemsClientBeginReprotectOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginResolveHealthErrors +// method. +type ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginSwitchProviderOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginSwitchProvider +// method. +type ReplicationProtectedItemsClientBeginSwitchProviderOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginTestFailoverCleanup +// method. +type ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginTestFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginTestFailover +// method. +type ReplicationProtectedItemsClientBeginTestFailoverOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginUnplannedFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUnplannedFailover +// method. +type ReplicationProtectedItemsClientBeginUnplannedFailoverOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginUpdateApplianceOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdateAppliance +// method. +type ReplicationProtectedItemsClientBeginUpdateApplianceOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdateMobilityService +// method. +type ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientBeginUpdateOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdate +// method. +type ReplicationProtectedItemsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectedItemsClientGetOptions contains the optional parameters for the ReplicationProtectedItemsClient.Get +// method. +type ReplicationProtectedItemsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions contains the optional parameters for the ReplicationProtectedItemsClient.NewListByReplicationProtectionContainersPager +// method. +type ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectedItemsClientListOptions contains the optional parameters for the ReplicationProtectedItemsClient.NewListPager +// method. +type ReplicationProtectedItemsClientListOptions struct { + // OData filter options. + Filter *string + + // The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. + SkipToken *string +} + +// ReplicationProtectionClustersClientBeginApplyRecoveryPointOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginApplyRecoveryPoint +// method. +type ReplicationProtectionClustersClientBeginApplyRecoveryPointOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionClustersClientBeginCreateOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginCreate +// method. +type ReplicationProtectionClustersClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionClustersClientBeginFailoverCommitOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginFailoverCommit +// method. +type ReplicationProtectionClustersClientBeginFailoverCommitOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionClustersClientBeginPurgeOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginPurge +// method. +type ReplicationProtectionClustersClientBeginPurgeOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionClustersClientBeginRepairReplicationOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginRepairReplication +// method. +type ReplicationProtectionClustersClientBeginRepairReplicationOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionClustersClientBeginTestFailoverCleanupOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginTestFailoverCleanup +// method. +type ReplicationProtectionClustersClientBeginTestFailoverCleanupOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionClustersClientBeginTestFailoverOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginTestFailover +// method. +type ReplicationProtectionClustersClientBeginTestFailoverOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionClustersClientBeginUnplannedFailoverOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginUnplannedFailover +// method. +type ReplicationProtectionClustersClientBeginUnplannedFailoverOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionClustersClientGetOperationResultsOptions contains the optional parameters for the ReplicationProtectionClustersClient.GetOperationResults +// method. +type ReplicationProtectionClustersClientGetOperationResultsOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionClustersClientGetOptions contains the optional parameters for the ReplicationProtectionClustersClient.Get +// method. +type ReplicationProtectionClustersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionClustersClientListByReplicationProtectionContainersOptions contains the optional parameters for the +// ReplicationProtectionClustersClient.NewListByReplicationProtectionContainersPager method. +type ReplicationProtectionClustersClientListByReplicationProtectionContainersOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionClustersClientListOptions contains the optional parameters for the ReplicationProtectionClustersClient.NewListPager +// method. +type ReplicationProtectionClustersClientListOptions struct { + // OData filter options. + Filter *string + + // The pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. + SkipToken *string +} + +// ReplicationProtectionContainerMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginCreate +// method. +type ReplicationProtectionContainerMappingsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionContainerMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginDelete +// method. +type ReplicationProtectionContainerMappingsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionContainerMappingsClientBeginPurgeOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginPurge +// method. +type ReplicationProtectionContainerMappingsClientBeginPurgeOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionContainerMappingsClientBeginUpdateOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginUpdate +// method. +type ReplicationProtectionContainerMappingsClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionContainerMappingsClientGetOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.Get +// method. +type ReplicationProtectionContainerMappingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions contains the optional parameters +// for the ReplicationProtectionContainerMappingsClient.NewListByReplicationProtectionContainersPager method. +type ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionContainerMappingsClientListOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.NewListPager +// method. +type ReplicationProtectionContainerMappingsClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionContainersClientBeginCreateOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginCreate +// method. +type ReplicationProtectionContainersClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionContainersClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginDelete +// method. +type ReplicationProtectionContainersClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginDiscoverProtectableItem +// method. +type ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionContainersClientBeginSwitchClusterProtectionOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginSwitchClusterProtection +// method. +type ReplicationProtectionContainersClientBeginSwitchClusterProtectionOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionContainersClientBeginSwitchProtectionOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginSwitchProtection +// method. +type ReplicationProtectionContainersClientBeginSwitchProtectionOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationProtectionContainersClientGetOptions contains the optional parameters for the ReplicationProtectionContainersClient.Get +// method. +type ReplicationProtectionContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionContainersClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationProtectionContainersClient.NewListByReplicationFabricsPager +// method. +type ReplicationProtectionContainersClientListByReplicationFabricsOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionContainersClientListOptions contains the optional parameters for the ReplicationProtectionContainersClient.NewListPager +// method. +type ReplicationProtectionContainersClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionIntentsClientCreateOptions contains the optional parameters for the ReplicationProtectionIntentsClient.Create +// method. +type ReplicationProtectionIntentsClientCreateOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionIntentsClientGetOptions contains the optional parameters for the ReplicationProtectionIntentsClient.Get +// method. +type ReplicationProtectionIntentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationProtectionIntentsClientListOptions contains the optional parameters for the ReplicationProtectionIntentsClient.NewListPager +// method. +type ReplicationProtectionIntentsClientListOptions struct { + // The pagination token. + SkipToken *string + + // The page size. + TakeToken *string +} + +// ReplicationRecoveryPlansClientBeginCreateOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginCreate +// method. +type ReplicationRecoveryPlansClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryPlansClientBeginDeleteOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginDelete +// method. +type ReplicationRecoveryPlansClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryPlansClientBeginFailoverCancelOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginFailoverCancel +// method. +type ReplicationRecoveryPlansClientBeginFailoverCancelOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryPlansClientBeginFailoverCommitOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginFailoverCommit +// method. +type ReplicationRecoveryPlansClientBeginFailoverCommitOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryPlansClientBeginPlannedFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginPlannedFailover +// method. +type ReplicationRecoveryPlansClientBeginPlannedFailoverOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryPlansClientBeginReprotectOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginReprotect +// method. +type ReplicationRecoveryPlansClientBeginReprotectOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginTestFailoverCleanup +// method. +type ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryPlansClientBeginTestFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginTestFailover +// method. +type ReplicationRecoveryPlansClientBeginTestFailoverOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginUnplannedFailover +// method. +type ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryPlansClientBeginUpdateOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginUpdate +// method. +type ReplicationRecoveryPlansClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryPlansClientGetOptions contains the optional parameters for the ReplicationRecoveryPlansClient.Get method. +type ReplicationRecoveryPlansClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationRecoveryPlansClientListOptions contains the optional parameters for the ReplicationRecoveryPlansClient.NewListPager +// method. +type ReplicationRecoveryPlansClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationRecoveryServicesProvidersClientBeginCreateOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginCreate +// method. +type ReplicationRecoveryServicesProvidersClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryServicesProvidersClientBeginDeleteOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginDelete +// method. +type ReplicationRecoveryServicesProvidersClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryServicesProvidersClientBeginPurgeOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginPurge +// method. +type ReplicationRecoveryServicesProvidersClientBeginPurgeOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginRefreshProvider +// method. +type ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationRecoveryServicesProvidersClientGetOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.Get +// method. +type ReplicationRecoveryServicesProvidersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.NewListByReplicationFabricsPager +// method. +type ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions struct { + // placeholder for future optional parameters +} + +// ReplicationRecoveryServicesProvidersClientListOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.NewListPager +// method. +type ReplicationRecoveryServicesProvidersClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationStorageClassificationMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.BeginCreate +// method. +type ReplicationStorageClassificationMappingsClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationStorageClassificationMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.BeginDelete +// method. +type ReplicationStorageClassificationMappingsClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationStorageClassificationMappingsClientGetOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.Get +// method. +type ReplicationStorageClassificationMappingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions contains the optional parameters +// for the ReplicationStorageClassificationMappingsClient.NewListByReplicationStorageClassificationsPager method. +type ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions struct { + // placeholder for future optional parameters +} + +// ReplicationStorageClassificationMappingsClientListOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.NewListPager +// method. +type ReplicationStorageClassificationMappingsClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationStorageClassificationsClientGetOptions contains the optional parameters for the ReplicationStorageClassificationsClient.Get +// method. +type ReplicationStorageClassificationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationStorageClassificationsClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationStorageClassificationsClient.NewListByReplicationFabricsPager +// method. +type ReplicationStorageClassificationsClientListByReplicationFabricsOptions struct { + // placeholder for future optional parameters +} + +// ReplicationStorageClassificationsClientListOptions contains the optional parameters for the ReplicationStorageClassificationsClient.NewListPager +// method. +type ReplicationStorageClassificationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationVaultHealthClientBeginRefreshOptions contains the optional parameters for the ReplicationVaultHealthClient.BeginRefresh +// method. +type ReplicationVaultHealthClientBeginRefreshOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationVaultHealthClientGetOptions contains the optional parameters for the ReplicationVaultHealthClient.Get method. +type ReplicationVaultHealthClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationVaultSettingClientBeginCreateOptions contains the optional parameters for the ReplicationVaultSettingClient.BeginCreate +// method. +type ReplicationVaultSettingClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationVaultSettingClientGetOptions contains the optional parameters for the ReplicationVaultSettingClient.Get method. +type ReplicationVaultSettingClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationVaultSettingClientListOptions contains the optional parameters for the ReplicationVaultSettingClient.NewListPager +// method. +type ReplicationVaultSettingClientListOptions struct { + // placeholder for future optional parameters +} + +// ReplicationvCentersClientBeginCreateOptions contains the optional parameters for the ReplicationvCentersClient.BeginCreate +// method. +type ReplicationvCentersClientBeginCreateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationvCentersClientBeginDeleteOptions contains the optional parameters for the ReplicationvCentersClient.BeginDelete +// method. +type ReplicationvCentersClientBeginDeleteOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationvCentersClientBeginUpdateOptions contains the optional parameters for the ReplicationvCentersClient.BeginUpdate +// method. +type ReplicationvCentersClientBeginUpdateOptions struct { + // Resumes the long-running operation from the provided token. + ResumeToken string +} + +// ReplicationvCentersClientGetOptions contains the optional parameters for the ReplicationvCentersClient.Get method. +type ReplicationvCentersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ReplicationvCentersClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationvCentersClient.NewListByReplicationFabricsPager +// method. +type ReplicationvCentersClientListByReplicationFabricsOptions struct { + // placeholder for future optional parameters +} + +// ReplicationvCentersClientListOptions contains the optional parameters for the ReplicationvCentersClient.NewListPager method. +type ReplicationvCentersClientListOptions struct { + // placeholder for future optional parameters +} + +// SupportedOperatingSystemsClientGetOptions contains the optional parameters for the SupportedOperatingSystemsClient.Get +// method. +type SupportedOperatingSystemsClientGetOptions struct { + // The instance type. + InstanceType *string +} + +// TargetComputeSizesClientListByReplicationProtectedItemsOptions contains the optional parameters for the TargetComputeSizesClient.NewListByReplicationProtectedItemsPager +// method. +type TargetComputeSizesClientListByReplicationProtectedItemsOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/polymorphic_helpers.go new file mode 100644 index 00000000..3d878a44 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/polymorphic_helpers.go @@ -0,0 +1,1551 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import "encoding/json" + +func unmarshalAddDisksProviderSpecificInputClassification(rawMsg json.RawMessage) (AddDisksProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b AddDisksProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AAddDisksInput{} + case "InMageRcm": + b = &InMageRcmAddDisksInput{} + default: + b = &AddDisksProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalApplianceSpecificDetailsClassification(rawMsg json.RawMessage) (ApplianceSpecificDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ApplianceSpecificDetailsClassification + switch m["instanceType"] { + case "InMageRcm": + b = &InMageRcmApplianceSpecificDetails{} + default: + b = &ApplianceSpecificDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalApplyClusterRecoveryPointProviderSpecificInputClassification(rawMsg json.RawMessage) (ApplyClusterRecoveryPointProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ApplyClusterRecoveryPointProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AApplyClusterRecoveryPointInput{} + default: + b = &ApplyClusterRecoveryPointProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalApplyRecoveryPointProviderSpecificInputClassification(rawMsg json.RawMessage) (ApplyRecoveryPointProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ApplyRecoveryPointProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AApplyRecoveryPointInput{} + case "A2ACrossClusterMigration": + b = &A2ACrossClusterMigrationApplyRecoveryPointInput{} + case "HyperVReplicaAzure": + b = &HyperVReplicaAzureApplyRecoveryPointInput{} + case "InMageAzureV2": + b = &InMageAzureV2ApplyRecoveryPointInput{} + case "InMageRcm": + b = &InMageRcmApplyRecoveryPointInput{} + default: + b = &ApplyRecoveryPointProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalClusterProviderSpecificRecoveryPointDetailsClassification(rawMsg json.RawMessage) (ClusterProviderSpecificRecoveryPointDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ClusterProviderSpecificRecoveryPointDetailsClassification + switch m["instanceType"] { + case "A2A": + b = &A2AClusterRecoveryPointDetails{} + default: + b = &ClusterProviderSpecificRecoveryPointDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalClusterTestFailoverProviderSpecificInputClassification(rawMsg json.RawMessage) (ClusterTestFailoverProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ClusterTestFailoverProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AClusterTestFailoverInput{} + default: + b = &ClusterTestFailoverProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalClusterUnplannedFailoverProviderSpecificInputClassification(rawMsg json.RawMessage) (ClusterUnplannedFailoverProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ClusterUnplannedFailoverProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AClusterUnplannedFailoverInput{} + default: + b = &ClusterUnplannedFailoverProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalConfigurationSettingsClassification(rawMsg json.RawMessage) (ConfigurationSettingsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ConfigurationSettingsClassification + switch m["instanceType"] { + case "HyperVVirtualMachine": + b = &HyperVVirtualMachineDetails{} + case "ReplicationGroupDetails": + b = &ReplicationGroupDetails{} + case "VMwareVirtualMachine": + b = &VMwareVirtualMachineDetails{} + case "VmmVirtualMachine": + b = &VmmVirtualMachineDetails{} + default: + b = &ConfigurationSettings{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalCreateProtectionIntentProviderSpecificDetailsClassification(rawMsg json.RawMessage) (CreateProtectionIntentProviderSpecificDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b CreateProtectionIntentProviderSpecificDetailsClassification + switch m["instanceType"] { + case "A2A": + b = &A2ACreateProtectionIntentInput{} + default: + b = &CreateProtectionIntentProviderSpecificDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDisableProtectionProviderSpecificInputClassification(rawMsg json.RawMessage) (DisableProtectionProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DisableProtectionProviderSpecificInputClassification + switch m["instanceType"] { + case "InMage": + b = &InMageDisableProtectionProviderSpecificInput{} + default: + b = &DisableProtectionProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalEnableMigrationProviderSpecificInputClassification(rawMsg json.RawMessage) (EnableMigrationProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b EnableMigrationProviderSpecificInputClassification + switch m["instanceType"] { + case "VMwareCbt": + b = &VMwareCbtEnableMigrationInput{} + default: + b = &EnableMigrationProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalEnableProtectionProviderSpecificInputClassification(rawMsg json.RawMessage) (EnableProtectionProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b EnableProtectionProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AEnableProtectionInput{} + case "A2ACrossClusterMigration": + b = &A2ACrossClusterMigrationEnableProtectionInput{} + case "HyperVReplicaAzure": + b = &HyperVReplicaAzureEnableProtectionInput{} + case "InMage": + b = &InMageEnableProtectionInput{} + case "InMageAzureV2": + b = &InMageAzureV2EnableProtectionInput{} + case "InMageRcm": + b = &InMageRcmEnableProtectionInput{} + default: + b = &EnableProtectionProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalEventProviderSpecificDetailsClassification(rawMsg json.RawMessage) (EventProviderSpecificDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b EventProviderSpecificDetailsClassification + switch m["instanceType"] { + case "A2A": + b = &A2AEventDetails{} + case "HyperVReplica2012": + b = &HyperVReplica2012EventDetails{} + case "HyperVReplica2012R2": + b = &HyperVReplica2012R2EventDetails{} + case "HyperVReplicaAzure": + b = &HyperVReplicaAzureEventDetails{} + case "HyperVReplicaBaseEventDetails": + b = &HyperVReplicaBaseEventDetails{} + case "InMageAzureV2": + b = &InMageAzureV2EventDetails{} + case "InMageRcm": + b = &InMageRcmEventDetails{} + case "InMageRcmFailback": + b = &InMageRcmFailbackEventDetails{} + case "VMwareCbt": + b = &VMwareCbtEventDetails{} + default: + b = &EventProviderSpecificDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalEventSpecificDetailsClassification(rawMsg json.RawMessage) (EventSpecificDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b EventSpecificDetailsClassification + switch m["instanceType"] { + case "JobStatus": + b = &JobStatusEventDetails{} + default: + b = &EventSpecificDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalFabricSpecificCreateNetworkMappingInputClassification(rawMsg json.RawMessage) (FabricSpecificCreateNetworkMappingInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b FabricSpecificCreateNetworkMappingInputClassification + switch m["instanceType"] { + case "AzureToAzure": + b = &AzureToAzureCreateNetworkMappingInput{} + case "VmmToAzure": + b = &VmmToAzureCreateNetworkMappingInput{} + case "VmmToVmm": + b = &VmmToVmmCreateNetworkMappingInput{} + default: + b = &FabricSpecificCreateNetworkMappingInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalFabricSpecificCreationInputClassification(rawMsg json.RawMessage) (FabricSpecificCreationInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b FabricSpecificCreationInputClassification + switch m["instanceType"] { + case "Azure": + b = &AzureFabricCreationInput{} + case "InMageRcm": + b = &InMageRcmFabricCreationInput{} + case "VMwareV2": + b = &VMwareV2FabricCreationInput{} + default: + b = &FabricSpecificCreationInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalFabricSpecificDetailsClassification(rawMsg json.RawMessage) (FabricSpecificDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b FabricSpecificDetailsClassification + switch m["instanceType"] { + case "Azure": + b = &AzureFabricSpecificDetails{} + case "HyperVSite": + b = &HyperVSiteDetails{} + case "InMageRcm": + b = &InMageRcmFabricSpecificDetails{} + case "VMM": + b = &VmmDetails{} + case "VMware": + b = &VMwareDetails{} + case "VMwareV2": + b = &VMwareV2FabricSpecificDetails{} + default: + b = &FabricSpecificDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalFabricSpecificUpdateNetworkMappingInputClassification(rawMsg json.RawMessage) (FabricSpecificUpdateNetworkMappingInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b FabricSpecificUpdateNetworkMappingInputClassification + switch m["instanceType"] { + case "AzureToAzure": + b = &AzureToAzureUpdateNetworkMappingInput{} + case "VmmToAzure": + b = &VmmToAzureUpdateNetworkMappingInput{} + case "VmmToVmm": + b = &VmmToVmmUpdateNetworkMappingInput{} + default: + b = &FabricSpecificUpdateNetworkMappingInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalGroupTaskDetailsClassification(rawMsg json.RawMessage) (GroupTaskDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b GroupTaskDetailsClassification + switch m["instanceType"] { + case "InlineWorkflowTaskDetails": + b = &InlineWorkflowTaskDetails{} + case "RecoveryPlanGroupTaskDetails": + b = &RecoveryPlanGroupTaskDetails{} + case "RecoveryPlanShutdownGroupTaskDetails": + b = &RecoveryPlanShutdownGroupTaskDetails{} + default: + b = &GroupTaskDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalJobDetailsClassification(rawMsg json.RawMessage) (JobDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b JobDetailsClassification + switch m["instanceType"] { + case "AsrJobDetails": + b = &AsrJobDetails{} + case "ClusterFailoverJobDetails": + b = &ClusterFailoverJobDetails{} + case "ClusterSwitchProtectionJobDetails": + b = &ClusterSwitchProtectionJobDetails{} + case "ClusterTestFailoverJobDetails": + b = &ClusterTestFailoverJobDetails{} + case "ExportJobDetails": + b = &ExportJobDetails{} + case "FailoverJobDetails": + b = &FailoverJobDetails{} + case "SwitchProtectionJobDetails": + b = &SwitchProtectionJobDetails{} + case "TestFailoverJobDetails": + b = &TestFailoverJobDetails{} + default: + b = &JobDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalMigrateProviderSpecificInputClassification(rawMsg json.RawMessage) (MigrateProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b MigrateProviderSpecificInputClassification + switch m["instanceType"] { + case "VMwareCbt": + b = &VMwareCbtMigrateInput{} + default: + b = &MigrateProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalMigrationProviderSpecificSettingsClassification(rawMsg json.RawMessage) (MigrationProviderSpecificSettingsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b MigrationProviderSpecificSettingsClassification + switch m["instanceType"] { + case "VMwareCbt": + b = &VMwareCbtMigrationDetails{} + default: + b = &MigrationProviderSpecificSettings{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalNetworkMappingFabricSpecificSettingsClassification(rawMsg json.RawMessage) (NetworkMappingFabricSpecificSettingsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b NetworkMappingFabricSpecificSettingsClassification + switch m["instanceType"] { + case "AzureToAzure": + b = &AzureToAzureNetworkMappingSettings{} + case "VmmToAzure": + b = &VmmToAzureNetworkMappingSettings{} + case "VmmToVmm": + b = &VmmToVmmNetworkMappingSettings{} + default: + b = &NetworkMappingFabricSpecificSettings{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalPlannedFailoverProviderSpecificFailoverInputClassification(rawMsg json.RawMessage) (PlannedFailoverProviderSpecificFailoverInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b PlannedFailoverProviderSpecificFailoverInputClassification + switch m["instanceType"] { + case "HyperVReplicaAzure": + b = &HyperVReplicaAzurePlannedFailoverProviderInput{} + case "HyperVReplicaAzureFailback": + b = &HyperVReplicaAzureFailbackProviderInput{} + case "InMageRcmFailback": + b = &InMageRcmFailbackPlannedFailoverProviderInput{} + default: + b = &PlannedFailoverProviderSpecificFailoverInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalPolicyProviderSpecificDetailsClassification(rawMsg json.RawMessage) (PolicyProviderSpecificDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b PolicyProviderSpecificDetailsClassification + switch m["instanceType"] { + case "A2A": + b = &A2APolicyDetails{} + case "HyperVReplica2012": + b = &HyperVReplicaPolicyDetails{} + case "HyperVReplica2012R2": + b = &HyperVReplicaBluePolicyDetails{} + case "HyperVReplicaAzure": + b = &HyperVReplicaAzurePolicyDetails{} + case "HyperVReplicaBasePolicyDetails": + b = &HyperVReplicaBasePolicyDetails{} + case "InMage": + b = &InMagePolicyDetails{} + case "InMageAzureV2": + b = &InMageAzureV2PolicyDetails{} + case "InMageBasePolicyDetails": + b = &InMageBasePolicyDetails{} + case "InMageRcm": + b = &InMageRcmPolicyDetails{} + case "InMageRcmFailback": + b = &InMageRcmFailbackPolicyDetails{} + case "VMwareCbt": + b = &VmwareCbtPolicyDetails{} + default: + b = &PolicyProviderSpecificDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalPolicyProviderSpecificInputClassification(rawMsg json.RawMessage) (PolicyProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b PolicyProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2APolicyCreationInput{} + case "A2ACrossClusterMigration": + b = &A2ACrossClusterMigrationPolicyCreationInput{} + case "HyperVReplica2012": + b = &HyperVReplicaPolicyInput{} + case "HyperVReplica2012R2": + b = &HyperVReplicaBluePolicyInput{} + case "HyperVReplicaAzure": + b = &HyperVReplicaAzurePolicyInput{} + case "InMage": + b = &InMagePolicyInput{} + case "InMageAzureV2": + b = &InMageAzureV2PolicyInput{} + case "InMageRcm": + b = &InMageRcmPolicyCreationInput{} + case "InMageRcmFailback": + b = &InMageRcmFailbackPolicyCreationInput{} + case "VMwareCbt": + b = &VMwareCbtPolicyCreationInput{} + default: + b = &PolicyProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalProtectionContainerMappingProviderSpecificDetailsClassification(rawMsg json.RawMessage) (ProtectionContainerMappingProviderSpecificDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ProtectionContainerMappingProviderSpecificDetailsClassification + switch m["instanceType"] { + case "A2A": + b = &A2AProtectionContainerMappingDetails{} + case "InMageRcm": + b = &InMageRcmProtectionContainerMappingDetails{} + case "VMwareCbt": + b = &VMwareCbtProtectionContainerMappingDetails{} + default: + b = &ProtectionContainerMappingProviderSpecificDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalProtectionProfileCustomDetailsClassification(rawMsg json.RawMessage) (ProtectionProfileCustomDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ProtectionProfileCustomDetailsClassification + switch m["resourceType"] { + case "Existing": + b = &ExistingProtectionProfile{} + case "New": + b = &NewProtectionProfile{} + default: + b = &ProtectionProfileCustomDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalProviderSpecificRecoveryPointDetailsClassification(rawMsg json.RawMessage) (ProviderSpecificRecoveryPointDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ProviderSpecificRecoveryPointDetailsClassification + switch m["instanceType"] { + case "A2A": + b = &A2ARecoveryPointDetails{} + case "InMageAzureV2": + b = &InMageAzureV2RecoveryPointDetails{} + case "InMageRcm": + b = &InMageRcmRecoveryPointDetails{} + default: + b = &ProviderSpecificRecoveryPointDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRecoveryAvailabilitySetCustomDetailsClassification(rawMsg json.RawMessage) (RecoveryAvailabilitySetCustomDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RecoveryAvailabilitySetCustomDetailsClassification + switch m["resourceType"] { + case "Existing": + b = &ExistingRecoveryAvailabilitySet{} + default: + b = &RecoveryAvailabilitySetCustomDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRecoveryPlanActionDetailsClassification(rawMsg json.RawMessage) (RecoveryPlanActionDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RecoveryPlanActionDetailsClassification + switch m["instanceType"] { + case "AutomationRunbookActionDetails": + b = &RecoveryPlanAutomationRunbookActionDetails{} + case "ManualActionDetails": + b = &RecoveryPlanManualActionDetails{} + case "ScriptActionDetails": + b = &RecoveryPlanScriptActionDetails{} + default: + b = &RecoveryPlanActionDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRecoveryPlanProviderSpecificDetailsClassification(rawMsg json.RawMessage) (RecoveryPlanProviderSpecificDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RecoveryPlanProviderSpecificDetailsClassification + switch m["instanceType"] { + case "A2A": + b = &RecoveryPlanA2ADetails{} + default: + b = &RecoveryPlanProviderSpecificDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRecoveryPlanProviderSpecificDetailsClassificationArray(rawMsg json.RawMessage) ([]RecoveryPlanProviderSpecificDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]RecoveryPlanProviderSpecificDetailsClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalRecoveryPlanProviderSpecificDetailsClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalRecoveryPlanProviderSpecificFailoverInputClassification(rawMsg json.RawMessage) (RecoveryPlanProviderSpecificFailoverInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RecoveryPlanProviderSpecificFailoverInputClassification + switch m["instanceType"] { + case "A2A": + b = &RecoveryPlanA2AFailoverInput{} + case "HyperVReplicaAzure": + b = &RecoveryPlanHyperVReplicaAzureFailoverInput{} + case "HyperVReplicaAzureFailback": + b = &RecoveryPlanHyperVReplicaAzureFailbackInput{} + case "InMage": + b = &RecoveryPlanInMageFailoverInput{} + case "InMageAzureV2": + b = &RecoveryPlanInMageAzureV2FailoverInput{} + case "InMageRcm": + b = &RecoveryPlanInMageRcmFailoverInput{} + case "InMageRcmFailback": + b = &RecoveryPlanInMageRcmFailbackFailoverInput{} + default: + b = &RecoveryPlanProviderSpecificFailoverInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRecoveryPlanProviderSpecificFailoverInputClassificationArray(rawMsg json.RawMessage) ([]RecoveryPlanProviderSpecificFailoverInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]RecoveryPlanProviderSpecificFailoverInputClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalRecoveryPlanProviderSpecificFailoverInputClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalRecoveryPlanProviderSpecificInputClassification(rawMsg json.RawMessage) (RecoveryPlanProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RecoveryPlanProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &RecoveryPlanA2AInput{} + default: + b = &RecoveryPlanProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRecoveryPlanProviderSpecificInputClassificationArray(rawMsg json.RawMessage) ([]RecoveryPlanProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]RecoveryPlanProviderSpecificInputClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalRecoveryPlanProviderSpecificInputClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalRecoveryProximityPlacementGroupCustomDetailsClassification(rawMsg json.RawMessage) (RecoveryProximityPlacementGroupCustomDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RecoveryProximityPlacementGroupCustomDetailsClassification + switch m["resourceType"] { + case "Existing": + b = &ExistingRecoveryProximityPlacementGroup{} + default: + b = &RecoveryProximityPlacementGroupCustomDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRecoveryResourceGroupCustomDetailsClassification(rawMsg json.RawMessage) (RecoveryResourceGroupCustomDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RecoveryResourceGroupCustomDetailsClassification + switch m["resourceType"] { + case "Existing": + b = &ExistingRecoveryResourceGroup{} + default: + b = &RecoveryResourceGroupCustomDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRecoveryVirtualNetworkCustomDetailsClassification(rawMsg json.RawMessage) (RecoveryVirtualNetworkCustomDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RecoveryVirtualNetworkCustomDetailsClassification + switch m["resourceType"] { + case "Existing": + b = &ExistingRecoveryVirtualNetwork{} + case "New": + b = &NewRecoveryVirtualNetwork{} + default: + b = &RecoveryVirtualNetworkCustomDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalRemoveDisksProviderSpecificInputClassification(rawMsg json.RawMessage) (RemoveDisksProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b RemoveDisksProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2ARemoveDisksInput{} + default: + b = &RemoveDisksProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalReplicationClusterProviderSpecificSettingsClassification(rawMsg json.RawMessage) (ReplicationClusterProviderSpecificSettingsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ReplicationClusterProviderSpecificSettingsClassification + switch m["instanceType"] { + case "A2A": + b = &A2AReplicationProtectionClusterDetails{} + default: + b = &ReplicationClusterProviderSpecificSettings{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalReplicationProtectionIntentProviderSpecificSettingsClassification(rawMsg json.RawMessage) (ReplicationProtectionIntentProviderSpecificSettingsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ReplicationProtectionIntentProviderSpecificSettingsClassification + switch m["instanceType"] { + case "A2A": + b = &A2AReplicationIntentDetails{} + default: + b = &ReplicationProtectionIntentProviderSpecificSettings{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalReplicationProviderSpecificContainerCreationInputClassification(rawMsg json.RawMessage) (ReplicationProviderSpecificContainerCreationInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ReplicationProviderSpecificContainerCreationInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AContainerCreationInput{} + case "A2ACrossClusterMigration": + b = &A2ACrossClusterMigrationContainerCreationInput{} + case "VMwareCbt": + b = &VMwareCbtContainerCreationInput{} + default: + b = &ReplicationProviderSpecificContainerCreationInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalReplicationProviderSpecificContainerCreationInputClassificationArray(rawMsg json.RawMessage) ([]ReplicationProviderSpecificContainerCreationInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]ReplicationProviderSpecificContainerCreationInputClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalReplicationProviderSpecificContainerCreationInputClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +func unmarshalReplicationProviderSpecificContainerMappingInputClassification(rawMsg json.RawMessage) (ReplicationProviderSpecificContainerMappingInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ReplicationProviderSpecificContainerMappingInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AContainerMappingInput{} + case "VMwareCbt": + b = &VMwareCbtContainerMappingInput{} + default: + b = &ReplicationProviderSpecificContainerMappingInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalReplicationProviderSpecificSettingsClassification(rawMsg json.RawMessage) (ReplicationProviderSpecificSettingsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ReplicationProviderSpecificSettingsClassification + switch m["instanceType"] { + case "A2A": + b = &A2AReplicationDetails{} + case "A2ACrossClusterMigration": + b = &A2ACrossClusterMigrationReplicationDetails{} + case "HyperVReplica2012": + b = &HyperVReplicaReplicationDetails{} + case "HyperVReplica2012R2": + b = &HyperVReplicaBlueReplicationDetails{} + case "HyperVReplicaAzure": + b = &HyperVReplicaAzureReplicationDetails{} + case "HyperVReplicaBaseReplicationDetails": + b = &HyperVReplicaBaseReplicationDetails{} + case "InMage": + b = &InMageReplicationDetails{} + case "InMageAzureV2": + b = &InMageAzureV2ReplicationDetails{} + case "InMageRcm": + b = &InMageRcmReplicationDetails{} + case "InMageRcmFailback": + b = &InMageRcmFailbackReplicationDetails{} + default: + b = &ReplicationProviderSpecificSettings{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalReplicationProviderSpecificUpdateContainerMappingInputClassification(rawMsg json.RawMessage) (ReplicationProviderSpecificUpdateContainerMappingInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ReplicationProviderSpecificUpdateContainerMappingInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AUpdateContainerMappingInput{} + case "InMageRcm": + b = &InMageRcmUpdateContainerMappingInput{} + default: + b = &ReplicationProviderSpecificUpdateContainerMappingInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalResumeReplicationProviderSpecificInputClassification(rawMsg json.RawMessage) (ResumeReplicationProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ResumeReplicationProviderSpecificInputClassification + switch m["instanceType"] { + case "VMwareCbt": + b = &VMwareCbtResumeReplicationInput{} + default: + b = &ResumeReplicationProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalResyncProviderSpecificInputClassification(rawMsg json.RawMessage) (ResyncProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ResyncProviderSpecificInputClassification + switch m["instanceType"] { + case "VMwareCbt": + b = &VMwareCbtResyncInput{} + default: + b = &ResyncProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalReverseReplicationProviderSpecificInputClassification(rawMsg json.RawMessage) (ReverseReplicationProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ReverseReplicationProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AReprotectInput{} + case "HyperVReplicaAzure": + b = &HyperVReplicaAzureReprotectInput{} + case "InMage": + b = &InMageReprotectInput{} + case "InMageAzureV2": + b = &InMageAzureV2ReprotectInput{} + case "InMageRcm": + b = &InMageRcmReprotectInput{} + case "InMageRcmFailback": + b = &InMageRcmFailbackReprotectInput{} + default: + b = &ReverseReplicationProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalSharedDiskReplicationProviderSpecificSettingsClassification(rawMsg json.RawMessage) (SharedDiskReplicationProviderSpecificSettingsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SharedDiskReplicationProviderSpecificSettingsClassification + switch m["instanceType"] { + case "A2A": + b = &A2ASharedDiskReplicationDetails{} + default: + b = &SharedDiskReplicationProviderSpecificSettings{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalStorageAccountCustomDetailsClassification(rawMsg json.RawMessage) (StorageAccountCustomDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b StorageAccountCustomDetailsClassification + switch m["resourceType"] { + case "Existing": + b = &ExistingStorageAccount{} + default: + b = &StorageAccountCustomDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalSwitchClusterProtectionProviderSpecificInputClassification(rawMsg json.RawMessage) (SwitchClusterProtectionProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SwitchClusterProtectionProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2ASwitchClusterProtectionInput{} + default: + b = &SwitchClusterProtectionProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalSwitchProtectionProviderSpecificInputClassification(rawMsg json.RawMessage) (SwitchProtectionProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SwitchProtectionProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2ASwitchProtectionInput{} + default: + b = &SwitchProtectionProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalSwitchProviderSpecificInputClassification(rawMsg json.RawMessage) (SwitchProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SwitchProviderSpecificInputClassification + switch m["instanceType"] { + case "InMageAzureV2": + b = &InMageAzureV2SwitchProviderInput{} + default: + b = &SwitchProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalTaskTypeDetailsClassification(rawMsg json.RawMessage) (TaskTypeDetailsClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b TaskTypeDetailsClassification + switch m["instanceType"] { + case "AutomationRunbookTaskDetails": + b = &AutomationRunbookTaskDetails{} + case "ConsistencyCheckTaskDetails": + b = &ConsistencyCheckTaskDetails{} + case "FabricReplicationGroupTaskDetails": + b = &FabricReplicationGroupTaskDetails{} + case "JobTaskDetails": + b = &JobTaskDetails{} + case "ManualActionTaskDetails": + b = &ManualActionTaskDetails{} + case "ScriptActionTaskDetails": + b = &ScriptActionTaskDetails{} + case "VirtualMachineTaskDetails": + b = &VirtualMachineTaskDetails{} + case "VmNicUpdatesTaskDetails": + b = &VMNicUpdatesTaskDetails{} + default: + b = &TaskTypeDetails{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalTestFailoverProviderSpecificInputClassification(rawMsg json.RawMessage) (TestFailoverProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b TestFailoverProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2ATestFailoverInput{} + case "HyperVReplicaAzure": + b = &HyperVReplicaAzureTestFailoverInput{} + case "InMage": + b = &InMageTestFailoverInput{} + case "InMageAzureV2": + b = &InMageAzureV2TestFailoverInput{} + case "InMageRcm": + b = &InMageRcmTestFailoverInput{} + default: + b = &TestFailoverProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalTestMigrateProviderSpecificInputClassification(rawMsg json.RawMessage) (TestMigrateProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b TestMigrateProviderSpecificInputClassification + switch m["instanceType"] { + case "VMwareCbt": + b = &VMwareCbtTestMigrateInput{} + default: + b = &TestMigrateProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalUnplannedFailoverProviderSpecificInputClassification(rawMsg json.RawMessage) (UnplannedFailoverProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b UnplannedFailoverProviderSpecificInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AUnplannedFailoverInput{} + case "HyperVReplicaAzure": + b = &HyperVReplicaAzureUnplannedFailoverInput{} + case "InMage": + b = &InMageUnplannedFailoverInput{} + case "InMageAzureV2": + b = &InMageAzureV2UnplannedFailoverInput{} + case "InMageRcm": + b = &InMageRcmUnplannedFailoverInput{} + default: + b = &UnplannedFailoverProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalUpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification(rawMsg json.RawMessage) (UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b UpdateApplianceForReplicationProtectedItemProviderSpecificInputClassification + switch m["instanceType"] { + case "InMageRcm": + b = &InMageRcmUpdateApplianceForReplicationProtectedItemInput{} + default: + b = &UpdateApplianceForReplicationProtectedItemProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalUpdateMigrationItemProviderSpecificInputClassification(rawMsg json.RawMessage) (UpdateMigrationItemProviderSpecificInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b UpdateMigrationItemProviderSpecificInputClassification + switch m["instanceType"] { + case "VMwareCbt": + b = &VMwareCbtUpdateMigrationItemInput{} + default: + b = &UpdateMigrationItemProviderSpecificInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalUpdateReplicationProtectedItemProviderInputClassification(rawMsg json.RawMessage) (UpdateReplicationProtectedItemProviderInputClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b UpdateReplicationProtectedItemProviderInputClassification + switch m["instanceType"] { + case "A2A": + b = &A2AUpdateReplicationProtectedItemInput{} + case "HyperVReplicaAzure": + b = &HyperVReplicaAzureUpdateReplicationProtectedItemInput{} + case "InMageAzureV2": + b = &InMageAzureV2UpdateReplicationProtectedItemInput{} + case "InMageRcm": + b = &InMageRcmUpdateReplicationProtectedItemInput{} + default: + b = &UpdateReplicationProtectedItemProviderInput{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/recoverypoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/recoverypoints_client.go new file mode 100644 index 00000000..4682b208 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/recoverypoints_client.go @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RecoveryPointsClient contains the methods for the RecoveryPoints group. +// Don't use this type directly, use NewRecoveryPointsClient() instead. +type RecoveryPointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewRecoveryPointsClient creates a new instance of RecoveryPointsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRecoveryPointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoveryPointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &RecoveryPointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get the details of specified recovery point. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - The fabric name. +// - protectionContainerName - The protection container name. +// - replicatedProtectedItemName - The replication protected item name. +// - recoveryPointName - The recovery point name. +// - options - RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method. +func (client *RecoveryPointsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, recoveryPointName string, options *RecoveryPointsClientGetOptions) (RecoveryPointsClientGetResponse, error) { + var err error + const operationName = "RecoveryPointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName, options) + if err != nil { + return RecoveryPointsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return RecoveryPointsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecoveryPointsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *RecoveryPointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, recoveryPointName string, _ *RecoveryPointsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints/{recoveryPointName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + if recoveryPointName == "" { + return nil, errors.New("parameter recoveryPointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPointName}", url.PathEscape(recoveryPointName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RecoveryPointsClient) getHandleResponse(resp *http.Response) (RecoveryPointsClientGetResponse, error) { + result := RecoveryPointsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPoint); err != nil { + return RecoveryPointsClientGetResponse{}, err + } + return result, nil +} + +// NewListByReplicationProtectedItemsPager - Lists the available recovery points for a replication protected item. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - The fabric name. +// - protectionContainerName - The protection container name. +// - replicatedProtectedItemName - The replication protected item name. +// - options - RecoveryPointsClientListByReplicationProtectedItemsOptions contains the optional parameters for the RecoveryPointsClient.NewListByReplicationProtectedItemsPager +// method. +func (client *RecoveryPointsClient) NewListByReplicationProtectedItemsPager(resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *RecoveryPointsClientListByReplicationProtectedItemsOptions) *runtime.Pager[RecoveryPointsClientListByReplicationProtectedItemsResponse] { + return runtime.NewPager(runtime.PagingHandler[RecoveryPointsClientListByReplicationProtectedItemsResponse]{ + More: func(page RecoveryPointsClientListByReplicationProtectedItemsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RecoveryPointsClientListByReplicationProtectedItemsResponse) (RecoveryPointsClientListByReplicationProtectedItemsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecoveryPointsClient.NewListByReplicationProtectedItemsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationProtectedItemsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + }, nil) + if err != nil { + return RecoveryPointsClientListByReplicationProtectedItemsResponse{}, err + } + return client.listByReplicationProtectedItemsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationProtectedItemsCreateRequest creates the ListByReplicationProtectedItems request. +func (client *RecoveryPointsClient) listByReplicationProtectedItemsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, _ *RecoveryPointsClientListByReplicationProtectedItemsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationProtectedItemsHandleResponse handles the ListByReplicationProtectedItems response. +func (client *RecoveryPointsClient) listByReplicationProtectedItemsHandleResponse(resp *http.Response) (RecoveryPointsClientListByReplicationProtectedItemsResponse, error) { + result := RecoveryPointsClientListByReplicationProtectedItemsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPointCollection); err != nil { + return RecoveryPointsClientListByReplicationProtectedItemsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationalertsettings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationalertsettings_client.go new file mode 100644 index 00000000..94df0046 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationalertsettings_client.go @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationAlertSettingsClient contains the methods for the ReplicationAlertSettings group. +// Don't use this type directly, use NewReplicationAlertSettingsClient() instead. +type ReplicationAlertSettingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationAlertSettingsClient creates a new instance of ReplicationAlertSettingsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationAlertSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationAlertSettingsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationAlertSettingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Create - Create or update an email notification(alert) configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - alertSettingName - The name of the email notification(alert) configuration. +// - request - The input to configure the email notification(alert). +// - options - ReplicationAlertSettingsClientCreateOptions contains the optional parameters for the ReplicationAlertSettingsClient.Create +// method. +func (client *ReplicationAlertSettingsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, alertSettingName string, request ConfigureAlertRequest, options *ReplicationAlertSettingsClientCreateOptions) (ReplicationAlertSettingsClientCreateResponse, error) { + var err error + const operationName = "ReplicationAlertSettingsClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, alertSettingName, request, options) + if err != nil { + return ReplicationAlertSettingsClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationAlertSettingsClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationAlertSettingsClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *ReplicationAlertSettingsClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, alertSettingName string, request ConfigureAlertRequest, _ *ReplicationAlertSettingsClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if alertSettingName == "" { + return nil, errors.New("parameter alertSettingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{alertSettingName}", url.PathEscape(alertSettingName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *ReplicationAlertSettingsClient) createHandleResponse(resp *http.Response) (ReplicationAlertSettingsClientCreateResponse, error) { + result := ReplicationAlertSettingsClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Alert); err != nil { + return ReplicationAlertSettingsClientCreateResponse{}, err + } + return result, nil +} + +// Get - Gets the details of the specified email notification(alert) configuration. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - alertSettingName - The name of the email notification configuration. +// - options - ReplicationAlertSettingsClientGetOptions contains the optional parameters for the ReplicationAlertSettingsClient.Get +// method. +func (client *ReplicationAlertSettingsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, alertSettingName string, options *ReplicationAlertSettingsClientGetOptions) (ReplicationAlertSettingsClientGetResponse, error) { + var err error + const operationName = "ReplicationAlertSettingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, alertSettingName, options) + if err != nil { + return ReplicationAlertSettingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationAlertSettingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationAlertSettingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationAlertSettingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, alertSettingName string, _ *ReplicationAlertSettingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if alertSettingName == "" { + return nil, errors.New("parameter alertSettingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{alertSettingName}", url.PathEscape(alertSettingName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationAlertSettingsClient) getHandleResponse(resp *http.Response) (ReplicationAlertSettingsClientGetResponse, error) { + result := ReplicationAlertSettingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Alert); err != nil { + return ReplicationAlertSettingsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the list of email notification(alert) configurations for the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationAlertSettingsClientListOptions contains the optional parameters for the ReplicationAlertSettingsClient.NewListPager +// method. +func (client *ReplicationAlertSettingsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationAlertSettingsClientListOptions) *runtime.Pager[ReplicationAlertSettingsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationAlertSettingsClientListResponse]{ + More: func(page ReplicationAlertSettingsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationAlertSettingsClientListResponse) (ReplicationAlertSettingsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationAlertSettingsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationAlertSettingsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationAlertSettingsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationAlertSettingsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationAlertSettingsClient) listHandleResponse(resp *http.Response) (ReplicationAlertSettingsClientListResponse, error) { + result := ReplicationAlertSettingsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AlertCollection); err != nil { + return ReplicationAlertSettingsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationappliances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationappliances_client.go new file mode 100644 index 00000000..e60c7899 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationappliances_client.go @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationAppliancesClient contains the methods for the ReplicationAppliances group. +// Don't use this type directly, use NewReplicationAppliancesClient() instead. +type ReplicationAppliancesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationAppliancesClient creates a new instance of ReplicationAppliancesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationAppliancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationAppliancesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationAppliancesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets the list of Azure Site Recovery appliances for the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationAppliancesClientListOptions contains the optional parameters for the ReplicationAppliancesClient.NewListPager +// method. +func (client *ReplicationAppliancesClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationAppliancesClientListOptions) *runtime.Pager[ReplicationAppliancesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationAppliancesClientListResponse]{ + More: func(page ReplicationAppliancesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationAppliancesClientListResponse) (ReplicationAppliancesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationAppliancesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationAppliancesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationAppliancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicationAppliancesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAppliances" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationAppliancesClient) listHandleResponse(resp *http.Response) (ReplicationAppliancesClientListResponse, error) { + result := ReplicationAppliancesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ApplianceCollection); err != nil { + return ReplicationAppliancesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationeligibilityresults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationeligibilityresults_client.go new file mode 100644 index 00000000..afa7dae0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationeligibilityresults_client.go @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationEligibilityResultsClient contains the methods for the ReplicationEligibilityResults group. +// Don't use this type directly, use NewReplicationEligibilityResultsClient() instead. +type ReplicationEligibilityResultsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationEligibilityResultsClient creates a new instance of ReplicationEligibilityResultsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationEligibilityResultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationEligibilityResultsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationEligibilityResultsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Validates whether a given VM can be protected or not in which case returns list of errors. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - virtualMachineName - Virtual Machine name. +// - options - ReplicationEligibilityResultsClientGetOptions contains the optional parameters for the ReplicationEligibilityResultsClient.Get +// method. +func (client *ReplicationEligibilityResultsClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, options *ReplicationEligibilityResultsClientGetOptions) (ReplicationEligibilityResultsClientGetResponse, error) { + var err error + const operationName = "ReplicationEligibilityResultsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, virtualMachineName, options) + if err != nil { + return ReplicationEligibilityResultsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationEligibilityResultsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationEligibilityResultsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationEligibilityResultsClient) getCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineName string, _ *ReplicationEligibilityResultsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults/default" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if virtualMachineName == "" { + return nil, errors.New("parameter virtualMachineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualMachineName}", url.PathEscape(virtualMachineName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationEligibilityResultsClient) getHandleResponse(resp *http.Response) (ReplicationEligibilityResultsClientGetResponse, error) { + result := ReplicationEligibilityResultsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationEligibilityResults); err != nil { + return ReplicationEligibilityResultsClientGetResponse{}, err + } + return result, nil +} + +// List - Validates whether a given VM can be protected or not in which case returns list of errors. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - virtualMachineName - Virtual Machine name. +// - options - ReplicationEligibilityResultsClientListOptions contains the optional parameters for the ReplicationEligibilityResultsClient.List +// method. +func (client *ReplicationEligibilityResultsClient) List(ctx context.Context, resourceGroupName string, virtualMachineName string, options *ReplicationEligibilityResultsClientListOptions) (ReplicationEligibilityResultsClientListResponse, error) { + var err error + const operationName = "ReplicationEligibilityResultsClient.List" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.listCreateRequest(ctx, resourceGroupName, virtualMachineName, options) + if err != nil { + return ReplicationEligibilityResultsClientListResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationEligibilityResultsClientListResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationEligibilityResultsClientListResponse{}, err + } + resp, err := client.listHandleResponse(httpResp) + return resp, err +} + +// listCreateRequest creates the List request. +func (client *ReplicationEligibilityResultsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineName string, _ *ReplicationEligibilityResultsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if virtualMachineName == "" { + return nil, errors.New("parameter virtualMachineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{virtualMachineName}", url.PathEscape(virtualMachineName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationEligibilityResultsClient) listHandleResponse(resp *http.Response) (ReplicationEligibilityResultsClientListResponse, error) { + result := ReplicationEligibilityResultsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationEligibilityResultsCollection); err != nil { + return ReplicationEligibilityResultsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationevents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationevents_client.go new file mode 100644 index 00000000..f31f23dc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationevents_client.go @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationEventsClient contains the methods for the ReplicationEvents group. +// Don't use this type directly, use NewReplicationEventsClient() instead. +type ReplicationEventsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationEventsClient creates a new instance of ReplicationEventsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationEventsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationEventsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationEventsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - The operation to get the details of an Azure Site recovery event. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - eventName - The name of the Azure Site Recovery event. +// - options - ReplicationEventsClientGetOptions contains the optional parameters for the ReplicationEventsClient.Get method. +func (client *ReplicationEventsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, eventName string, options *ReplicationEventsClientGetOptions) (ReplicationEventsClientGetResponse, error) { + var err error + const operationName = "ReplicationEventsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, eventName, options) + if err != nil { + return ReplicationEventsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationEventsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationEventsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationEventsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, eventName string, _ *ReplicationEventsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents/{eventName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if eventName == "" { + return nil, errors.New("parameter eventName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{eventName}", url.PathEscape(eventName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationEventsClient) getHandleResponse(resp *http.Response) (ReplicationEventsClientGetResponse, error) { + result := ReplicationEventsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Event); err != nil { + return ReplicationEventsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the list of Azure Site Recovery events for the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationEventsClientListOptions contains the optional parameters for the ReplicationEventsClient.NewListPager +// method. +func (client *ReplicationEventsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationEventsClientListOptions) *runtime.Pager[ReplicationEventsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationEventsClientListResponse]{ + More: func(page ReplicationEventsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationEventsClientListResponse) (ReplicationEventsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationEventsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationEventsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationEventsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicationEventsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationEventsClient) listHandleResponse(resp *http.Response) (ReplicationEventsClientListResponse, error) { + result := ReplicationEventsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EventCollection); err != nil { + return ReplicationEventsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationfabrics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationfabrics_client.go new file mode 100644 index 00000000..d2fa32f0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationfabrics_client.go @@ -0,0 +1,835 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationFabricsClient contains the methods for the ReplicationFabrics group. +// Don't use this type directly, use NewReplicationFabricsClient() instead. +type ReplicationFabricsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationFabricsClient creates a new instance of ReplicationFabricsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationFabricsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationFabricsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationFabricsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCheckConsistency - The operation to perform a consistency check on the fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - options - ReplicationFabricsClientBeginCheckConsistencyOptions contains the optional parameters for the ReplicationFabricsClient.BeginCheckConsistency +// method. +func (client *ReplicationFabricsClient) BeginCheckConsistency(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientBeginCheckConsistencyOptions) (*runtime.Poller[ReplicationFabricsClientCheckConsistencyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.checkConsistency(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationFabricsClientCheckConsistencyResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationFabricsClientCheckConsistencyResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CheckConsistency - The operation to perform a consistency check on the fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationFabricsClient) checkConsistency(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientBeginCheckConsistencyOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationFabricsClient.BeginCheckConsistency" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkConsistencyCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// checkConsistencyCreateRequest creates the CheckConsistency request. +func (client *ReplicationFabricsClient) checkConsistencyCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationFabricsClientBeginCheckConsistencyOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/checkConsistency" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginCreate - The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Name of the ASR fabric. +// - input - Fabric creation input. +// - options - ReplicationFabricsClientBeginCreateOptions contains the optional parameters for the ReplicationFabricsClient.BeginCreate +// method. +func (client *ReplicationFabricsClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, input FabricCreationInput, options *ReplicationFabricsClientBeginCreateOptions) (*runtime.Poller[ReplicationFabricsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, fabricName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationFabricsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationFabricsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationFabricsClient) create(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, input FabricCreationInput, options *ReplicationFabricsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationFabricsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, fabricName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationFabricsClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, input FabricCreationInput, _ *ReplicationFabricsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - The operation to delete or remove an Azure Site Recovery fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - ASR fabric to delete. +// - options - ReplicationFabricsClientBeginDeleteOptions contains the optional parameters for the ReplicationFabricsClient.BeginDelete +// method. +func (client *ReplicationFabricsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientBeginDeleteOptions) (*runtime.Poller[ReplicationFabricsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationFabricsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationFabricsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - The operation to delete or remove an Azure Site Recovery fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationFabricsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationFabricsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationFabricsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationFabricsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/remove" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the details of an Azure Site Recovery fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - options - ReplicationFabricsClientGetOptions contains the optional parameters for the ReplicationFabricsClient.Get method. +func (client *ReplicationFabricsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientGetOptions) (ReplicationFabricsClientGetResponse, error) { + var err error + const operationName = "ReplicationFabricsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return ReplicationFabricsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationFabricsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationFabricsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationFabricsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationFabricsClient) getHandleResponse(resp *http.Response) (ReplicationFabricsClientGetResponse, error) { + result := ReplicationFabricsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Fabric); err != nil { + return ReplicationFabricsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of the Azure Site Recovery fabrics in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationFabricsClientListOptions contains the optional parameters for the ReplicationFabricsClient.NewListPager +// method. +func (client *ReplicationFabricsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationFabricsClientListOptions) *runtime.Pager[ReplicationFabricsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationFabricsClientListResponse]{ + More: func(page ReplicationFabricsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationFabricsClientListResponse) (ReplicationFabricsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationFabricsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationFabricsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationFabricsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationFabricsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationFabricsClient) listHandleResponse(resp *http.Response) (ReplicationFabricsClientListResponse, error) { + result := ReplicationFabricsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FabricCollection); err != nil { + return ReplicationFabricsClientListResponse{}, err + } + return result, nil +} + +// BeginMigrateToAAD - The operation to migrate an Azure Site Recovery fabric to AAD. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - ASR fabric to migrate. +// - options - ReplicationFabricsClientBeginMigrateToAADOptions contains the optional parameters for the ReplicationFabricsClient.BeginMigrateToAAD +// method. +func (client *ReplicationFabricsClient) BeginMigrateToAAD(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientBeginMigrateToAADOptions) (*runtime.Poller[ReplicationFabricsClientMigrateToAADResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrateToAAD(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationFabricsClientMigrateToAADResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationFabricsClientMigrateToAADResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// MigrateToAAD - The operation to migrate an Azure Site Recovery fabric to AAD. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationFabricsClient) migrateToAAD(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientBeginMigrateToAADOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationFabricsClient.BeginMigrateToAAD" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateToAADCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrateToAADCreateRequest creates the MigrateToAAD request. +func (client *ReplicationFabricsClient) migrateToAADCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationFabricsClientBeginMigrateToAADOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/migratetoaad" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginPurge - The operation to purge(force delete) an Azure Site Recovery fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - ASR fabric to purge. +// - options - ReplicationFabricsClientBeginPurgeOptions contains the optional parameters for the ReplicationFabricsClient.BeginPurge +// method. +func (client *ReplicationFabricsClient) BeginPurge(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientBeginPurgeOptions) (*runtime.Poller[ReplicationFabricsClientPurgeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.purge(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationFabricsClientPurgeResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationFabricsClientPurgeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Purge - The operation to purge(force delete) an Azure Site Recovery fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationFabricsClient) purge(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientBeginPurgeOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationFabricsClient.BeginPurge" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.purgeCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// purgeCreateRequest creates the Purge request. +func (client *ReplicationFabricsClient) purgeCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationFabricsClientBeginPurgeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginReassociateGateway - The operation to move replications from a process server to another process server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - The name of the fabric containing the process server. +// - failoverProcessServerRequest - The input to the failover process server operation. +// - options - ReplicationFabricsClientBeginReassociateGatewayOptions contains the optional parameters for the ReplicationFabricsClient.BeginReassociateGateway +// method. +func (client *ReplicationFabricsClient) BeginReassociateGateway(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, failoverProcessServerRequest FailoverProcessServerRequest, options *ReplicationFabricsClientBeginReassociateGatewayOptions) (*runtime.Poller[ReplicationFabricsClientReassociateGatewayResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reassociateGateway(ctx, resourceGroupName, resourceName, fabricName, failoverProcessServerRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationFabricsClientReassociateGatewayResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationFabricsClientReassociateGatewayResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ReassociateGateway - The operation to move replications from a process server to another process server. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationFabricsClient) reassociateGateway(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, failoverProcessServerRequest FailoverProcessServerRequest, options *ReplicationFabricsClientBeginReassociateGatewayOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationFabricsClient.BeginReassociateGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.reassociateGatewayCreateRequest(ctx, resourceGroupName, resourceName, fabricName, failoverProcessServerRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// reassociateGatewayCreateRequest creates the ReassociateGateway request. +func (client *ReplicationFabricsClient) reassociateGatewayCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, failoverProcessServerRequest FailoverProcessServerRequest, _ *ReplicationFabricsClientBeginReassociateGatewayOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/reassociateGateway" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, failoverProcessServerRequest); err != nil { + return nil, err + } + return req, nil +} + +// BeginRemoveInfra - Removes the appliance's infrastructure under the fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - Resource name. +// - fabricName - Fabric name. +// - options - ReplicationFabricsClientBeginRemoveInfraOptions contains the optional parameters for the ReplicationFabricsClient.BeginRemoveInfra +// method. +func (client *ReplicationFabricsClient) BeginRemoveInfra(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientBeginRemoveInfraOptions) (*runtime.Poller[ReplicationFabricsClientRemoveInfraResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.removeInfra(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationFabricsClientRemoveInfraResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationFabricsClientRemoveInfraResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RemoveInfra - Removes the appliance's infrastructure under the fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationFabricsClient) removeInfra(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, options *ReplicationFabricsClientBeginRemoveInfraOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationFabricsClient.BeginRemoveInfra" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.removeInfraCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// removeInfraCreateRequest creates the RemoveInfra request. +func (client *ReplicationFabricsClient) removeInfraCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationFabricsClientBeginRemoveInfraOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/removeInfra" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginRenewCertificate - Renews the connection certificate for the ASR replication fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - fabric name to renew certs for. +// - renewCertificate - Renew certificate input. +// - options - ReplicationFabricsClientBeginRenewCertificateOptions contains the optional parameters for the ReplicationFabricsClient.BeginRenewCertificate +// method. +func (client *ReplicationFabricsClient) BeginRenewCertificate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, renewCertificate RenewCertificateInput, options *ReplicationFabricsClientBeginRenewCertificateOptions) (*runtime.Poller[ReplicationFabricsClientRenewCertificateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.renewCertificate(ctx, resourceGroupName, resourceName, fabricName, renewCertificate, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationFabricsClientRenewCertificateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationFabricsClientRenewCertificateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RenewCertificate - Renews the connection certificate for the ASR replication fabric. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationFabricsClient) renewCertificate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, renewCertificate RenewCertificateInput, options *ReplicationFabricsClientBeginRenewCertificateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationFabricsClient.BeginRenewCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.renewCertificateCreateRequest(ctx, resourceGroupName, resourceName, fabricName, renewCertificate, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// renewCertificateCreateRequest creates the RenewCertificate request. +func (client *ReplicationFabricsClient) renewCertificateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, renewCertificate RenewCertificateInput, _ *ReplicationFabricsClientBeginRenewCertificateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/renewCertificate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, renewCertificate); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationjobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationjobs_client.go new file mode 100644 index 00000000..96c237bf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationjobs_client.go @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationJobsClient contains the methods for the ReplicationJobs group. +// Don't use this type directly, use NewReplicationJobsClient() instead. +type ReplicationJobsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationJobsClient creates a new instance of ReplicationJobsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationJobsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationJobsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCancel - The operation to cancel an Azure Site Recovery job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - jobName - Job identifier. +// - options - ReplicationJobsClientBeginCancelOptions contains the optional parameters for the ReplicationJobsClient.BeginCancel +// method. +func (client *ReplicationJobsClient) BeginCancel(ctx context.Context, resourceGroupName string, resourceName string, jobName string, options *ReplicationJobsClientBeginCancelOptions) (*runtime.Poller[ReplicationJobsClientCancelResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.cancel(ctx, resourceGroupName, resourceName, jobName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationJobsClientCancelResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationJobsClientCancelResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Cancel - The operation to cancel an Azure Site Recovery job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationJobsClient) cancel(ctx context.Context, resourceGroupName string, resourceName string, jobName string, options *ReplicationJobsClientBeginCancelOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationJobsClient.BeginCancel" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.cancelCreateRequest(ctx, resourceGroupName, resourceName, jobName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// cancelCreateRequest creates the Cancel request. +func (client *ReplicationJobsClient) cancelCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, jobName string, _ *ReplicationJobsClientBeginCancelOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/cancel" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginExport - The operation to export the details of the Azure Site Recovery jobs of the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - jobQueryParameter - job query filter. +// - options - ReplicationJobsClientBeginExportOptions contains the optional parameters for the ReplicationJobsClient.BeginExport +// method. +func (client *ReplicationJobsClient) BeginExport(ctx context.Context, resourceGroupName string, resourceName string, jobQueryParameter JobQueryParameter, options *ReplicationJobsClientBeginExportOptions) (*runtime.Poller[ReplicationJobsClientExportResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.export(ctx, resourceGroupName, resourceName, jobQueryParameter, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationJobsClientExportResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationJobsClientExportResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Export - The operation to export the details of the Azure Site Recovery jobs of the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationJobsClient) export(ctx context.Context, resourceGroupName string, resourceName string, jobQueryParameter JobQueryParameter, options *ReplicationJobsClientBeginExportOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationJobsClient.BeginExport" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.exportCreateRequest(ctx, resourceGroupName, resourceName, jobQueryParameter, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// exportCreateRequest creates the Export request. +func (client *ReplicationJobsClient) exportCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, jobQueryParameter JobQueryParameter, _ *ReplicationJobsClientBeginExportOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/export" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, jobQueryParameter); err != nil { + return nil, err + } + return req, nil +} + +// Get - Get the details of an Azure Site Recovery job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - jobName - Job identifier. +// - options - ReplicationJobsClientGetOptions contains the optional parameters for the ReplicationJobsClient.Get method. +func (client *ReplicationJobsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, jobName string, options *ReplicationJobsClientGetOptions) (ReplicationJobsClientGetResponse, error) { + var err error + const operationName = "ReplicationJobsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, jobName, options) + if err != nil { + return ReplicationJobsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationJobsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationJobsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationJobsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, jobName string, _ *ReplicationJobsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationJobsClient) getHandleResponse(resp *http.Response) (ReplicationJobsClientGetResponse, error) { + result := ReplicationJobsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Job); err != nil { + return ReplicationJobsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the list of Azure Site Recovery Jobs for the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationJobsClientListOptions contains the optional parameters for the ReplicationJobsClient.NewListPager +// method. +func (client *ReplicationJobsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationJobsClientListOptions) *runtime.Pager[ReplicationJobsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationJobsClientListResponse]{ + More: func(page ReplicationJobsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationJobsClientListResponse) (ReplicationJobsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationJobsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationJobsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationJobsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicationJobsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationJobsClient) listHandleResponse(resp *http.Response) (ReplicationJobsClientListResponse, error) { + result := ReplicationJobsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.JobCollection); err != nil { + return ReplicationJobsClientListResponse{}, err + } + return result, nil +} + +// BeginRestart - The operation to restart an Azure Site Recovery job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - jobName - Job identifier. +// - options - ReplicationJobsClientBeginRestartOptions contains the optional parameters for the ReplicationJobsClient.BeginRestart +// method. +func (client *ReplicationJobsClient) BeginRestart(ctx context.Context, resourceGroupName string, resourceName string, jobName string, options *ReplicationJobsClientBeginRestartOptions) (*runtime.Poller[ReplicationJobsClientRestartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restart(ctx, resourceGroupName, resourceName, jobName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationJobsClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationJobsClientRestartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Restart - The operation to restart an Azure Site Recovery job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationJobsClient) restart(ctx context.Context, resourceGroupName string, resourceName string, jobName string, options *ReplicationJobsClientBeginRestartOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationJobsClient.BeginRestart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restartCreateRequest(ctx, resourceGroupName, resourceName, jobName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restartCreateRequest creates the Restart request. +func (client *ReplicationJobsClient) restartCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, jobName string, _ *ReplicationJobsClientBeginRestartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/restart" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginResume - The operation to resume an Azure Site Recovery job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - jobName - Job identifier. +// - resumeJobParams - Resume rob comments. +// - options - ReplicationJobsClientBeginResumeOptions contains the optional parameters for the ReplicationJobsClient.BeginResume +// method. +func (client *ReplicationJobsClient) BeginResume(ctx context.Context, resourceGroupName string, resourceName string, jobName string, resumeJobParams ResumeJobParams, options *ReplicationJobsClientBeginResumeOptions) (*runtime.Poller[ReplicationJobsClientResumeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resume(ctx, resourceGroupName, resourceName, jobName, resumeJobParams, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationJobsClientResumeResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationJobsClientResumeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Resume - The operation to resume an Azure Site Recovery job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationJobsClient) resume(ctx context.Context, resourceGroupName string, resourceName string, jobName string, resumeJobParams ResumeJobParams, options *ReplicationJobsClientBeginResumeOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationJobsClient.BeginResume" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resumeCreateRequest(ctx, resourceGroupName, resourceName, jobName, resumeJobParams, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resumeCreateRequest creates the Resume request. +func (client *ReplicationJobsClient) resumeCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, jobName string, resumeJobParams ResumeJobParams, _ *ReplicationJobsClientBeginResumeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/resume" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if jobName == "" { + return nil, errors.New("parameter jobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobName}", url.PathEscape(jobName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, resumeJobParams); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationlogicalnetworks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationlogicalnetworks_client.go new file mode 100644 index 00000000..2fe2e013 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationlogicalnetworks_client.go @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationLogicalNetworksClient contains the methods for the ReplicationLogicalNetworks group. +// Don't use this type directly, use NewReplicationLogicalNetworksClient() instead. +type ReplicationLogicalNetworksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationLogicalNetworksClient creates a new instance of ReplicationLogicalNetworksClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationLogicalNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationLogicalNetworksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationLogicalNetworksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the details of a logical network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Server Id. +// - logicalNetworkName - Logical network name. +// - options - ReplicationLogicalNetworksClientGetOptions contains the optional parameters for the ReplicationLogicalNetworksClient.Get +// method. +func (client *ReplicationLogicalNetworksClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, logicalNetworkName string, options *ReplicationLogicalNetworksClientGetOptions) (ReplicationLogicalNetworksClientGetResponse, error) { + var err error + const operationName = "ReplicationLogicalNetworksClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, logicalNetworkName, options) + if err != nil { + return ReplicationLogicalNetworksClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationLogicalNetworksClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationLogicalNetworksClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationLogicalNetworksClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, logicalNetworkName string, _ *ReplicationLogicalNetworksClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks/{logicalNetworkName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if logicalNetworkName == "" { + return nil, errors.New("parameter logicalNetworkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{logicalNetworkName}", url.PathEscape(logicalNetworkName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationLogicalNetworksClient) getHandleResponse(resp *http.Response) (ReplicationLogicalNetworksClientGetResponse, error) { + result := ReplicationLogicalNetworksClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LogicalNetwork); err != nil { + return ReplicationLogicalNetworksClientGetResponse{}, err + } + return result, nil +} + +// NewListByReplicationFabricsPager - Lists all the logical networks of the Azure Site Recovery fabric. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Server Id. +// - options - ReplicationLogicalNetworksClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationLogicalNetworksClient.NewListByReplicationFabricsPager +// method. +func (client *ReplicationLogicalNetworksClient) NewListByReplicationFabricsPager(resourceGroupName string, resourceName string, fabricName string, options *ReplicationLogicalNetworksClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationLogicalNetworksClientListByReplicationFabricsResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationLogicalNetworksClientListByReplicationFabricsResponse]{ + More: func(page ReplicationLogicalNetworksClientListByReplicationFabricsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationLogicalNetworksClientListByReplicationFabricsResponse) (ReplicationLogicalNetworksClientListByReplicationFabricsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationLogicalNetworksClient.NewListByReplicationFabricsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationFabricsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + }, nil) + if err != nil { + return ReplicationLogicalNetworksClientListByReplicationFabricsResponse{}, err + } + return client.listByReplicationFabricsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. +func (client *ReplicationLogicalNetworksClient) listByReplicationFabricsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationLogicalNetworksClientListByReplicationFabricsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. +func (client *ReplicationLogicalNetworksClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationLogicalNetworksClientListByReplicationFabricsResponse, error) { + result := ReplicationLogicalNetworksClientListByReplicationFabricsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LogicalNetworkCollection); err != nil { + return ReplicationLogicalNetworksClientListByReplicationFabricsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationmigrationitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationmigrationitems_client.go new file mode 100644 index 00000000..7871c6ce --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationmigrationitems_client.go @@ -0,0 +1,1132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationMigrationItemsClient contains the methods for the ReplicationMigrationItems group. +// Don't use this type directly, use NewReplicationMigrationItemsClient() instead. +type ReplicationMigrationItemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationMigrationItemsClient creates a new instance of ReplicationMigrationItemsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationMigrationItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationMigrationItemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationMigrationItemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - The operation to create an ASR migration item (enable migration). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - input - Enable migration input. +// - options - ReplicationMigrationItemsClientBeginCreateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginCreate +// method. +func (client *ReplicationMigrationItemsClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, input EnableMigrationInput, options *ReplicationMigrationItemsClientBeginCreateOptions) (*runtime.Poller[ReplicationMigrationItemsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationMigrationItemsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationMigrationItemsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to create an ASR migration item (enable migration). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationMigrationItemsClient) create(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, input EnableMigrationInput, options *ReplicationMigrationItemsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationMigrationItemsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationMigrationItemsClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, input EnableMigrationInput, _ *ReplicationMigrationItemsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - The operation to delete an ASR migration item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - options - ReplicationMigrationItemsClientBeginDeleteOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginDelete +// method. +func (client *ReplicationMigrationItemsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, options *ReplicationMigrationItemsClientBeginDeleteOptions) (*runtime.Poller[ReplicationMigrationItemsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationMigrationItemsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationMigrationItemsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - The operation to delete an ASR migration item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationMigrationItemsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, options *ReplicationMigrationItemsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationMigrationItemsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationMigrationItemsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, options *ReplicationMigrationItemsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + if options != nil && options.DeleteOption != nil { + reqQP.Set("deleteOption", *options.DeleteOption) + } + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the details of a migration item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric unique name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - options - ReplicationMigrationItemsClientGetOptions contains the optional parameters for the ReplicationMigrationItemsClient.Get +// method. +func (client *ReplicationMigrationItemsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, options *ReplicationMigrationItemsClientGetOptions) (ReplicationMigrationItemsClientGetResponse, error) { + var err error + const operationName = "ReplicationMigrationItemsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, options) + if err != nil { + return ReplicationMigrationItemsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationMigrationItemsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationMigrationItemsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationMigrationItemsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, _ *ReplicationMigrationItemsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationMigrationItemsClient) getHandleResponse(resp *http.Response) (ReplicationMigrationItemsClientGetResponse, error) { + result := ReplicationMigrationItemsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MigrationItem); err != nil { + return ReplicationMigrationItemsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the list of migration items in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationMigrationItemsClientListOptions contains the optional parameters for the ReplicationMigrationItemsClient.NewListPager +// method. +func (client *ReplicationMigrationItemsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationMigrationItemsClientListOptions) *runtime.Pager[ReplicationMigrationItemsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationMigrationItemsClientListResponse]{ + More: func(page ReplicationMigrationItemsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationMigrationItemsClientListResponse) (ReplicationMigrationItemsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationMigrationItemsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationMigrationItemsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationMigrationItemsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicationMigrationItemsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationMigrationItems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-01-01") + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + if options != nil && options.TakeToken != nil { + reqQP.Set("takeToken", *options.TakeToken) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationMigrationItemsClient) listHandleResponse(resp *http.Response) (ReplicationMigrationItemsClientListResponse, error) { + result := ReplicationMigrationItemsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MigrationItemCollection); err != nil { + return ReplicationMigrationItemsClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationProtectionContainersPager - Gets the list of ASR migration items in the protection container. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - options - ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions contains the optional parameters +// for the ReplicationMigrationItemsClient.NewListByReplicationProtectionContainersPager method. +func (client *ReplicationMigrationItemsClient) NewListByReplicationProtectionContainersPager(resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, options *ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions) *runtime.Pager[ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse]{ + More: func(page ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse) (ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationMigrationItemsClient.NewListByReplicationProtectionContainersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationProtectionContainersCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, options) + }, nil) + if err != nil { + return ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse{}, err + } + return client.listByReplicationProtectionContainersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationProtectionContainersCreateRequest creates the ListByReplicationProtectionContainers request. +func (client *ReplicationMigrationItemsClient) listByReplicationProtectionContainersCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, options *ReplicationMigrationItemsClientListByReplicationProtectionContainersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-01-01") + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + if options != nil && options.TakeToken != nil { + reqQP.Set("takeToken", *options.TakeToken) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationProtectionContainersHandleResponse handles the ListByReplicationProtectionContainers response. +func (client *ReplicationMigrationItemsClient) listByReplicationProtectionContainersHandleResponse(resp *http.Response) (ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse, error) { + result := ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MigrationItemCollection); err != nil { + return ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse{}, err + } + return result, nil +} + +// BeginMigrate - The operation to initiate migration of the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - migrateInput - Migrate input. +// - options - ReplicationMigrationItemsClientBeginMigrateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginMigrate +// method. +func (client *ReplicationMigrationItemsClient) BeginMigrate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, migrateInput MigrateInput, options *ReplicationMigrationItemsClientBeginMigrateOptions) (*runtime.Poller[ReplicationMigrationItemsClientMigrateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.migrate(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, migrateInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationMigrationItemsClientMigrateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationMigrationItemsClientMigrateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Migrate - The operation to initiate migration of the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationMigrationItemsClient) migrate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, migrateInput MigrateInput, options *ReplicationMigrationItemsClientBeginMigrateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationMigrationItemsClient.BeginMigrate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.migrateCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, migrateInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// migrateCreateRequest creates the Migrate request. +func (client *ReplicationMigrationItemsClient) migrateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, migrateInput MigrateInput, _ *ReplicationMigrationItemsClientBeginMigrateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, migrateInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginPauseReplication - The operation to initiate pause replication of the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - pauseReplicationInput - Pause replication input. +// - options - ReplicationMigrationItemsClientBeginPauseReplicationOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginPauseReplication +// method. +func (client *ReplicationMigrationItemsClient) BeginPauseReplication(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, pauseReplicationInput PauseReplicationInput, options *ReplicationMigrationItemsClientBeginPauseReplicationOptions) (*runtime.Poller[ReplicationMigrationItemsClientPauseReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.pauseReplication(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, pauseReplicationInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationMigrationItemsClientPauseReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationMigrationItemsClientPauseReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PauseReplication - The operation to initiate pause replication of the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationMigrationItemsClient) pauseReplication(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, pauseReplicationInput PauseReplicationInput, options *ReplicationMigrationItemsClientBeginPauseReplicationOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationMigrationItemsClient.BeginPauseReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.pauseReplicationCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, pauseReplicationInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// pauseReplicationCreateRequest creates the PauseReplication request. +func (client *ReplicationMigrationItemsClient) pauseReplicationCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, pauseReplicationInput PauseReplicationInput, _ *ReplicationMigrationItemsClientBeginPauseReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/pauseReplication" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, pauseReplicationInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginResumeReplication - The operation to initiate resume replication of the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - resumeReplicationInput - Resume replication input. +// - options - ReplicationMigrationItemsClientBeginResumeReplicationOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginResumeReplication +// method. +func (client *ReplicationMigrationItemsClient) BeginResumeReplication(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, resumeReplicationInput ResumeReplicationInput, options *ReplicationMigrationItemsClientBeginResumeReplicationOptions) (*runtime.Poller[ReplicationMigrationItemsClientResumeReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resumeReplication(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, resumeReplicationInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationMigrationItemsClientResumeReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationMigrationItemsClientResumeReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResumeReplication - The operation to initiate resume replication of the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationMigrationItemsClient) resumeReplication(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, resumeReplicationInput ResumeReplicationInput, options *ReplicationMigrationItemsClientBeginResumeReplicationOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationMigrationItemsClient.BeginResumeReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resumeReplicationCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, resumeReplicationInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resumeReplicationCreateRequest creates the ResumeReplication request. +func (client *ReplicationMigrationItemsClient) resumeReplicationCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, resumeReplicationInput ResumeReplicationInput, _ *ReplicationMigrationItemsClientBeginResumeReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/resumeReplication" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, resumeReplicationInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginResync - The operation to resynchronize replication of an ASR migration item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - input - Resync input. +// - options - ReplicationMigrationItemsClientBeginResyncOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginResync +// method. +func (client *ReplicationMigrationItemsClient) BeginResync(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, input ResyncInput, options *ReplicationMigrationItemsClientBeginResyncOptions) (*runtime.Poller[ReplicationMigrationItemsClientResyncResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resync(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationMigrationItemsClientResyncResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationMigrationItemsClientResyncResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Resync - The operation to resynchronize replication of an ASR migration item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationMigrationItemsClient) resync(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, input ResyncInput, options *ReplicationMigrationItemsClientBeginResyncOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationMigrationItemsClient.BeginResync" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resyncCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resyncCreateRequest creates the Resync request. +func (client *ReplicationMigrationItemsClient) resyncCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, input ResyncInput, _ *ReplicationMigrationItemsClientBeginResyncOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/resync" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginTestMigrate - The operation to initiate test migration of the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - testMigrateInput - Test migrate input. +// - options - ReplicationMigrationItemsClientBeginTestMigrateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginTestMigrate +// method. +func (client *ReplicationMigrationItemsClient) BeginTestMigrate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput TestMigrateInput, options *ReplicationMigrationItemsClientBeginTestMigrateOptions) (*runtime.Poller[ReplicationMigrationItemsClientTestMigrateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.testMigrate(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, testMigrateInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationMigrationItemsClientTestMigrateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationMigrationItemsClientTestMigrateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TestMigrate - The operation to initiate test migration of the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationMigrationItemsClient) testMigrate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput TestMigrateInput, options *ReplicationMigrationItemsClientBeginTestMigrateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationMigrationItemsClient.BeginTestMigrate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.testMigrateCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, testMigrateInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// testMigrateCreateRequest creates the TestMigrate request. +func (client *ReplicationMigrationItemsClient) testMigrateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput TestMigrateInput, _ *ReplicationMigrationItemsClientBeginTestMigrateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/testMigrate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, testMigrateInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginTestMigrateCleanup - The operation to initiate test migrate cleanup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - testMigrateCleanupInput - Test migrate cleanup input. +// - options - ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginTestMigrateCleanup +// method. +func (client *ReplicationMigrationItemsClient) BeginTestMigrateCleanup(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput TestMigrateCleanupInput, options *ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions) (*runtime.Poller[ReplicationMigrationItemsClientTestMigrateCleanupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.testMigrateCleanup(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, testMigrateCleanupInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationMigrationItemsClientTestMigrateCleanupResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationMigrationItemsClientTestMigrateCleanupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TestMigrateCleanup - The operation to initiate test migrate cleanup. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationMigrationItemsClient) testMigrateCleanup(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput TestMigrateCleanupInput, options *ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationMigrationItemsClient.BeginTestMigrateCleanup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.testMigrateCleanupCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, testMigrateCleanupInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// testMigrateCleanupCreateRequest creates the TestMigrateCleanup request. +func (client *ReplicationMigrationItemsClient) testMigrateCleanupCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput TestMigrateCleanupInput, _ *ReplicationMigrationItemsClientBeginTestMigrateCleanupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/testMigrateCleanup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, testMigrateCleanupInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdate - The operation to update the recovery settings of an ASR migration item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - migrationItemName - Migration item name. +// - input - Update migration item input. +// - options - ReplicationMigrationItemsClientBeginUpdateOptions contains the optional parameters for the ReplicationMigrationItemsClient.BeginUpdate +// method. +func (client *ReplicationMigrationItemsClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, input UpdateMigrationItemInput, options *ReplicationMigrationItemsClientBeginUpdateOptions) (*runtime.Poller[ReplicationMigrationItemsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationMigrationItemsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationMigrationItemsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - The operation to update the recovery settings of an ASR migration item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationMigrationItemsClient) update(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, input UpdateMigrationItemInput, options *ReplicationMigrationItemsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationMigrationItemsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, migrationItemName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ReplicationMigrationItemsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, migrationItemName string, input UpdateMigrationItemInput, _ *ReplicationMigrationItemsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if migrationItemName == "" { + return nil, errors.New("parameter migrationItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{migrationItemName}", url.PathEscape(migrationItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationnetworkmappings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationnetworkmappings_client.go new file mode 100644 index 00000000..ab4c6f47 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationnetworkmappings_client.go @@ -0,0 +1,541 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationNetworkMappingsClient contains the methods for the ReplicationNetworkMappings group. +// Don't use this type directly, use NewReplicationNetworkMappingsClient() instead. +type ReplicationNetworkMappingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationNetworkMappingsClient creates a new instance of ReplicationNetworkMappingsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationNetworkMappingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationNetworkMappingsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationNetworkMappingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - The operation to create an ASR network mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Primary fabric name. +// - networkName - Primary network name. +// - networkMappingName - Network mapping name. +// - input - Create network mapping input. +// - options - ReplicationNetworkMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginCreate +// method. +func (client *ReplicationNetworkMappingsClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, input CreateNetworkMappingInput, options *ReplicationNetworkMappingsClientBeginCreateOptions) (*runtime.Poller[ReplicationNetworkMappingsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, fabricName, networkName, networkMappingName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationNetworkMappingsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationNetworkMappingsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to create an ASR network mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationNetworkMappingsClient) create(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, input CreateNetworkMappingInput, options *ReplicationNetworkMappingsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationNetworkMappingsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, fabricName, networkName, networkMappingName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationNetworkMappingsClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, input CreateNetworkMappingInput, _ *ReplicationNetworkMappingsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if networkName == "" { + return nil, errors.New("parameter networkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) + if networkMappingName == "" { + return nil, errors.New("parameter networkMappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkMappingName}", url.PathEscape(networkMappingName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - The operation to delete a network mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Primary fabric name. +// - networkName - Primary network name. +// - networkMappingName - ARM Resource Name for network mapping. +// - options - ReplicationNetworkMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginDelete +// method. +func (client *ReplicationNetworkMappingsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, options *ReplicationNetworkMappingsClientBeginDeleteOptions) (*runtime.Poller[ReplicationNetworkMappingsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, fabricName, networkName, networkMappingName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationNetworkMappingsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationNetworkMappingsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - The operation to delete a network mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationNetworkMappingsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, options *ReplicationNetworkMappingsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationNetworkMappingsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, fabricName, networkName, networkMappingName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationNetworkMappingsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, _ *ReplicationNetworkMappingsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if networkName == "" { + return nil, errors.New("parameter networkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) + if networkMappingName == "" { + return nil, errors.New("parameter networkMappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkMappingName}", url.PathEscape(networkMappingName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the details of an ASR network mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Primary fabric name. +// - networkName - Primary network name. +// - networkMappingName - Network mapping name. +// - options - ReplicationNetworkMappingsClientGetOptions contains the optional parameters for the ReplicationNetworkMappingsClient.Get +// method. +func (client *ReplicationNetworkMappingsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, options *ReplicationNetworkMappingsClientGetOptions) (ReplicationNetworkMappingsClientGetResponse, error) { + var err error + const operationName = "ReplicationNetworkMappingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, networkName, networkMappingName, options) + if err != nil { + return ReplicationNetworkMappingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationNetworkMappingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationNetworkMappingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationNetworkMappingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, _ *ReplicationNetworkMappingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if networkName == "" { + return nil, errors.New("parameter networkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) + if networkMappingName == "" { + return nil, errors.New("parameter networkMappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkMappingName}", url.PathEscape(networkMappingName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationNetworkMappingsClient) getHandleResponse(resp *http.Response) (ReplicationNetworkMappingsClientGetResponse, error) { + result := ReplicationNetworkMappingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkMapping); err != nil { + return ReplicationNetworkMappingsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all ASR network mappings in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationNetworkMappingsClientListOptions contains the optional parameters for the ReplicationNetworkMappingsClient.NewListPager +// method. +func (client *ReplicationNetworkMappingsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationNetworkMappingsClientListOptions) *runtime.Pager[ReplicationNetworkMappingsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationNetworkMappingsClientListResponse]{ + More: func(page ReplicationNetworkMappingsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationNetworkMappingsClientListResponse) (ReplicationNetworkMappingsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationNetworkMappingsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationNetworkMappingsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationNetworkMappingsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationNetworkMappingsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworkMappings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationNetworkMappingsClient) listHandleResponse(resp *http.Response) (ReplicationNetworkMappingsClientListResponse, error) { + result := ReplicationNetworkMappingsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkMappingCollection); err != nil { + return ReplicationNetworkMappingsClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationNetworksPager - Lists all ASR network mappings for the specified network. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Primary fabric name. +// - networkName - Primary network name. +// - options - ReplicationNetworkMappingsClientListByReplicationNetworksOptions contains the optional parameters for the ReplicationNetworkMappingsClient.NewListByReplicationNetworksPager +// method. +func (client *ReplicationNetworkMappingsClient) NewListByReplicationNetworksPager(resourceGroupName string, resourceName string, fabricName string, networkName string, options *ReplicationNetworkMappingsClientListByReplicationNetworksOptions) *runtime.Pager[ReplicationNetworkMappingsClientListByReplicationNetworksResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationNetworkMappingsClientListByReplicationNetworksResponse]{ + More: func(page ReplicationNetworkMappingsClientListByReplicationNetworksResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationNetworkMappingsClientListByReplicationNetworksResponse) (ReplicationNetworkMappingsClientListByReplicationNetworksResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationNetworkMappingsClient.NewListByReplicationNetworksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationNetworksCreateRequest(ctx, resourceGroupName, resourceName, fabricName, networkName, options) + }, nil) + if err != nil { + return ReplicationNetworkMappingsClientListByReplicationNetworksResponse{}, err + } + return client.listByReplicationNetworksHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationNetworksCreateRequest creates the ListByReplicationNetworks request. +func (client *ReplicationNetworkMappingsClient) listByReplicationNetworksCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, _ *ReplicationNetworkMappingsClientListByReplicationNetworksOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if networkName == "" { + return nil, errors.New("parameter networkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationNetworksHandleResponse handles the ListByReplicationNetworks response. +func (client *ReplicationNetworkMappingsClient) listByReplicationNetworksHandleResponse(resp *http.Response) (ReplicationNetworkMappingsClientListByReplicationNetworksResponse, error) { + result := ReplicationNetworkMappingsClientListByReplicationNetworksResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkMappingCollection); err != nil { + return ReplicationNetworkMappingsClientListByReplicationNetworksResponse{}, err + } + return result, nil +} + +// BeginUpdate - The operation to update an ASR network mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Primary fabric name. +// - networkName - Primary network name. +// - networkMappingName - Network mapping name. +// - input - Update network mapping input. +// - options - ReplicationNetworkMappingsClientBeginUpdateOptions contains the optional parameters for the ReplicationNetworkMappingsClient.BeginUpdate +// method. +func (client *ReplicationNetworkMappingsClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, input UpdateNetworkMappingInput, options *ReplicationNetworkMappingsClientBeginUpdateOptions) (*runtime.Poller[ReplicationNetworkMappingsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, resourceName, fabricName, networkName, networkMappingName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationNetworkMappingsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationNetworkMappingsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - The operation to update an ASR network mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationNetworkMappingsClient) update(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, input UpdateNetworkMappingInput, options *ReplicationNetworkMappingsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationNetworkMappingsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, fabricName, networkName, networkMappingName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ReplicationNetworkMappingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, networkMappingName string, input UpdateNetworkMappingInput, _ *ReplicationNetworkMappingsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if networkName == "" { + return nil, errors.New("parameter networkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) + if networkMappingName == "" { + return nil, errors.New("parameter networkMappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkMappingName}", url.PathEscape(networkMappingName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationnetworks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationnetworks_client.go new file mode 100644 index 00000000..1653ed5e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationnetworks_client.go @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationNetworksClient contains the methods for the ReplicationNetworks group. +// Don't use this type directly, use NewReplicationNetworksClient() instead. +type ReplicationNetworksClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationNetworksClient creates a new instance of ReplicationNetworksClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationNetworksClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationNetworksClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the details of a network. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Server Id. +// - networkName - Primary network name. +// - options - ReplicationNetworksClientGetOptions contains the optional parameters for the ReplicationNetworksClient.Get method. +func (client *ReplicationNetworksClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, options *ReplicationNetworksClientGetOptions) (ReplicationNetworksClientGetResponse, error) { + var err error + const operationName = "ReplicationNetworksClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, networkName, options) + if err != nil { + return ReplicationNetworksClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationNetworksClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationNetworksClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationNetworksClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, networkName string, _ *ReplicationNetworksClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if networkName == "" { + return nil, errors.New("parameter networkName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{networkName}", url.PathEscape(networkName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationNetworksClient) getHandleResponse(resp *http.Response) (ReplicationNetworksClientGetResponse, error) { + result := ReplicationNetworksClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Network); err != nil { + return ReplicationNetworksClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the networks available in a vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationNetworksClientListOptions contains the optional parameters for the ReplicationNetworksClient.NewListPager +// method. +func (client *ReplicationNetworksClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationNetworksClientListOptions) *runtime.Pager[ReplicationNetworksClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationNetworksClientListResponse]{ + More: func(page ReplicationNetworksClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationNetworksClientListResponse) (ReplicationNetworksClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationNetworksClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationNetworksClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationNetworksClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationNetworksClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationNetworksClient) listHandleResponse(resp *http.Response) (ReplicationNetworksClientListResponse, error) { + result := ReplicationNetworksClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkCollection); err != nil { + return ReplicationNetworksClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationFabricsPager - Lists the networks available for a fabric. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - options - ReplicationNetworksClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationNetworksClient.NewListByReplicationFabricsPager +// method. +func (client *ReplicationNetworksClient) NewListByReplicationFabricsPager(resourceGroupName string, resourceName string, fabricName string, options *ReplicationNetworksClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationNetworksClientListByReplicationFabricsResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationNetworksClientListByReplicationFabricsResponse]{ + More: func(page ReplicationNetworksClientListByReplicationFabricsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationNetworksClientListByReplicationFabricsResponse) (ReplicationNetworksClientListByReplicationFabricsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationNetworksClient.NewListByReplicationFabricsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationFabricsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + }, nil) + if err != nil { + return ReplicationNetworksClientListByReplicationFabricsResponse{}, err + } + return client.listByReplicationFabricsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. +func (client *ReplicationNetworksClient) listByReplicationFabricsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationNetworksClientListByReplicationFabricsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. +func (client *ReplicationNetworksClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationNetworksClientListByReplicationFabricsResponse, error) { + result := ReplicationNetworksClientListByReplicationFabricsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.NetworkCollection); err != nil { + return ReplicationNetworksClientListByReplicationFabricsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationpolicies_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationpolicies_client.go new file mode 100644 index 00000000..e94756cc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationpolicies_client.go @@ -0,0 +1,425 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationPoliciesClient contains the methods for the ReplicationPolicies group. +// Don't use this type directly, use NewReplicationPoliciesClient() instead. +type ReplicationPoliciesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationPoliciesClient creates a new instance of ReplicationPoliciesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationPoliciesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationPoliciesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - The operation to create a replication policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - policyName - Replication policy name. +// - input - Create policy input. +// - options - ReplicationPoliciesClientBeginCreateOptions contains the optional parameters for the ReplicationPoliciesClient.BeginCreate +// method. +func (client *ReplicationPoliciesClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, policyName string, input CreatePolicyInput, options *ReplicationPoliciesClientBeginCreateOptions) (*runtime.Poller[ReplicationPoliciesClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, policyName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationPoliciesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationPoliciesClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to create a replication policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationPoliciesClient) create(ctx context.Context, resourceGroupName string, resourceName string, policyName string, input CreatePolicyInput, options *ReplicationPoliciesClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationPoliciesClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, policyName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationPoliciesClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, policyName string, input CreatePolicyInput, _ *ReplicationPoliciesClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - The operation to delete a replication policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - policyName - Replication policy name. +// - options - ReplicationPoliciesClientBeginDeleteOptions contains the optional parameters for the ReplicationPoliciesClient.BeginDelete +// method. +func (client *ReplicationPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, policyName string, options *ReplicationPoliciesClientBeginDeleteOptions) (*runtime.Poller[ReplicationPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, policyName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationPoliciesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - The operation to delete a replication policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, policyName string, options *ReplicationPoliciesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationPoliciesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, policyName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationPoliciesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, policyName string, _ *ReplicationPoliciesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the details of a replication policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - policyName - Replication policy name. +// - options - ReplicationPoliciesClientGetOptions contains the optional parameters for the ReplicationPoliciesClient.Get method. +func (client *ReplicationPoliciesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, policyName string, options *ReplicationPoliciesClientGetOptions) (ReplicationPoliciesClientGetResponse, error) { + var err error + const operationName = "ReplicationPoliciesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, policyName, options) + if err != nil { + return ReplicationPoliciesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationPoliciesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationPoliciesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationPoliciesClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, policyName string, _ *ReplicationPoliciesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationPoliciesClient) getHandleResponse(resp *http.Response) (ReplicationPoliciesClientGetResponse, error) { + result := ReplicationPoliciesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Policy); err != nil { + return ReplicationPoliciesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the replication policies for a vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationPoliciesClientListOptions contains the optional parameters for the ReplicationPoliciesClient.NewListPager +// method. +func (client *ReplicationPoliciesClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationPoliciesClientListOptions) *runtime.Pager[ReplicationPoliciesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationPoliciesClientListResponse]{ + More: func(page ReplicationPoliciesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationPoliciesClientListResponse) (ReplicationPoliciesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationPoliciesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationPoliciesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationPoliciesClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationPoliciesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationPoliciesClient) listHandleResponse(resp *http.Response) (ReplicationPoliciesClientListResponse, error) { + result := ReplicationPoliciesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.PolicyCollection); err != nil { + return ReplicationPoliciesClientListResponse{}, err + } + return result, nil +} + +// BeginUpdate - The operation to update a replication policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - policyName - Policy Id. +// - input - Update Policy Input. +// - options - ReplicationPoliciesClientBeginUpdateOptions contains the optional parameters for the ReplicationPoliciesClient.BeginUpdate +// method. +func (client *ReplicationPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, policyName string, input UpdatePolicyInput, options *ReplicationPoliciesClientBeginUpdateOptions) (*runtime.Poller[ReplicationPoliciesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, resourceName, policyName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationPoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationPoliciesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - The operation to update a replication policy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationPoliciesClient) update(ctx context.Context, resourceGroupName string, resourceName string, policyName string, input UpdatePolicyInput, options *ReplicationPoliciesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationPoliciesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, policyName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ReplicationPoliciesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, policyName string, input UpdatePolicyInput, _ *ReplicationPoliciesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if policyName == "" { + return nil, errors.New("parameter policyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{policyName}", url.PathEscape(policyName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectableitems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectableitems_client.go new file mode 100644 index 00000000..50e9573e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectableitems_client.go @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationProtectableItemsClient contains the methods for the ReplicationProtectableItems group. +// Don't use this type directly, use NewReplicationProtectableItemsClient() instead. +type ReplicationProtectableItemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationProtectableItemsClient creates a new instance of ReplicationProtectableItemsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationProtectableItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectableItemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationProtectableItemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - The operation to get the details of a protectable item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - protectableItemName - Protectable item name. +// - options - ReplicationProtectableItemsClientGetOptions contains the optional parameters for the ReplicationProtectableItemsClient.Get +// method. +func (client *ReplicationProtectableItemsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, protectableItemName string, options *ReplicationProtectableItemsClientGetOptions) (ReplicationProtectableItemsClientGetResponse, error) { + var err error + const operationName = "ReplicationProtectableItemsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, protectableItemName, options) + if err != nil { + return ReplicationProtectableItemsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationProtectableItemsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationProtectableItemsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationProtectableItemsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, protectableItemName string, _ *ReplicationProtectableItemsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems/{protectableItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if protectableItemName == "" { + return nil, errors.New("parameter protectableItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectableItemName}", url.PathEscape(protectableItemName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationProtectableItemsClient) getHandleResponse(resp *http.Response) (ReplicationProtectableItemsClientGetResponse, error) { + result := ReplicationProtectableItemsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectableItem); err != nil { + return ReplicationProtectableItemsClientGetResponse{}, err + } + return result, nil +} + +// NewListByReplicationProtectionContainersPager - Lists the protectable items in a protection container. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - options - ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions contains the optional parameters +// for the ReplicationProtectableItemsClient.NewListByReplicationProtectionContainersPager method. +func (client *ReplicationProtectableItemsClient) NewListByReplicationProtectionContainersPager(resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, options *ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions) *runtime.Pager[ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse]{ + More: func(page ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse) (ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationProtectableItemsClient.NewListByReplicationProtectionContainersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationProtectionContainersCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, options) + }, nil) + if err != nil { + return ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse{}, err + } + return client.listByReplicationProtectionContainersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationProtectionContainersCreateRequest creates the ListByReplicationProtectionContainers request. +func (client *ReplicationProtectableItemsClient) listByReplicationProtectionContainersCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, options *ReplicationProtectableItemsClientListByReplicationProtectionContainersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + if options != nil && options.SkipToken != nil { + reqQP.Set("$skipToken", *options.SkipToken) + } + if options != nil && options.Take != nil { + reqQP.Set("$take", *options.Take) + } + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationProtectionContainersHandleResponse handles the ListByReplicationProtectionContainers response. +func (client *ReplicationProtectableItemsClient) listByReplicationProtectionContainersHandleResponse(resp *http.Response) (ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse, error) { + result := ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectableItemCollection); err != nil { + return ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotecteditems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotecteditems_client.go new file mode 100644 index 00000000..b08fb249 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotecteditems_client.go @@ -0,0 +1,2064 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationProtectedItemsClient contains the methods for the ReplicationProtectedItems group. +// Don't use this type directly, use NewReplicationProtectedItemsClient() instead. +type ReplicationProtectedItemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationProtectedItemsClient creates a new instance of ReplicationProtectedItemsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationProtectedItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectedItemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationProtectedItemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginAddDisks - Operation to add disks(s) to the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - addDisksInput - Add disks input. +// - options - ReplicationProtectedItemsClientBeginAddDisksOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginAddDisks +// method. +func (client *ReplicationProtectedItemsClient) BeginAddDisks(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, addDisksInput AddDisksInput, options *ReplicationProtectedItemsClientBeginAddDisksOptions) (*runtime.Poller[ReplicationProtectedItemsClientAddDisksResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.addDisks(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, addDisksInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientAddDisksResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientAddDisksResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// AddDisks - Operation to add disks(s) to the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) addDisks(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, addDisksInput AddDisksInput, options *ReplicationProtectedItemsClientBeginAddDisksOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginAddDisks" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.addDisksCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, addDisksInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// addDisksCreateRequest creates the AddDisks request. +func (client *ReplicationProtectedItemsClient) addDisksCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, addDisksInput AddDisksInput, _ *ReplicationProtectedItemsClientBeginAddDisksOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/addDisks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, addDisksInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginApplyRecoveryPoint - The operation to change the recovery point of a failed over replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - The ARM fabric name. +// - protectionContainerName - The protection container name. +// - replicatedProtectedItemName - The replicated protected item name. +// - applyRecoveryPointInput - The ApplyRecoveryPointInput. +// - options - ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginApplyRecoveryPoint +// method. +func (client *ReplicationProtectedItemsClient) BeginApplyRecoveryPoint(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applyRecoveryPointInput ApplyRecoveryPointInput, options *ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions) (*runtime.Poller[ReplicationProtectedItemsClientApplyRecoveryPointResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.applyRecoveryPoint(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientApplyRecoveryPointResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientApplyRecoveryPointResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ApplyRecoveryPoint - The operation to change the recovery point of a failed over replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) applyRecoveryPoint(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applyRecoveryPointInput ApplyRecoveryPointInput, options *ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginApplyRecoveryPoint" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.applyRecoveryPointCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// applyRecoveryPointCreateRequest creates the ApplyRecoveryPoint request. +func (client *ReplicationProtectedItemsClient) applyRecoveryPointCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applyRecoveryPointInput ApplyRecoveryPointInput, _ *ReplicationProtectedItemsClientBeginApplyRecoveryPointOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/applyRecoveryPoint" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, applyRecoveryPointInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreate - The operation to create an ASR replication protected item (Enable replication). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Name of the fabric. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - A name for the replication protected item. +// - input - Enable Protection Input. +// - options - ReplicationProtectedItemsClientBeginCreateOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginCreate +// method. +func (client *ReplicationProtectedItemsClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, input EnableProtectionInput, options *ReplicationProtectedItemsClientBeginCreateOptions) (*runtime.Poller[ReplicationProtectedItemsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to create an ASR replication protected item (Enable replication). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) create(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, input EnableProtectionInput, options *ReplicationProtectedItemsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationProtectedItemsClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, input EnableProtectionInput, _ *ReplicationProtectedItemsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - The operation to disable replication on a replication protected item. This will also remove the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - disableProtectionInput - Disable protection input. +// - options - ReplicationProtectedItemsClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginDelete +// method. +func (client *ReplicationProtectedItemsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, disableProtectionInput DisableProtectionInput, options *ReplicationProtectedItemsClientBeginDeleteOptions) (*runtime.Poller[ReplicationProtectedItemsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, disableProtectionInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - The operation to disable replication on a replication protected item. This will also remove the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, disableProtectionInput DisableProtectionInput, options *ReplicationProtectedItemsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, disableProtectionInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationProtectedItemsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, disableProtectionInput DisableProtectionInput, _ *ReplicationProtectedItemsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/remove" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, disableProtectionInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginFailoverCancel - Operation to cancel the failover of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - options - ReplicationProtectedItemsClientBeginFailoverCancelOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginFailoverCancel +// method. +func (client *ReplicationProtectedItemsClient) BeginFailoverCancel(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginFailoverCancelOptions) (*runtime.Poller[ReplicationProtectedItemsClientFailoverCancelResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failoverCancel(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientFailoverCancelResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientFailoverCancelResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// FailoverCancel - Operation to cancel the failover of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) failoverCancel(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginFailoverCancelOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginFailoverCancel" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCancelCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCancelCreateRequest creates the FailoverCancel request. +func (client *ReplicationProtectedItemsClient) failoverCancelCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, _ *ReplicationProtectedItemsClientBeginFailoverCancelOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCancel" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginFailoverCommit - Operation to commit the failover of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - options - ReplicationProtectedItemsClientBeginFailoverCommitOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginFailoverCommit +// method. +func (client *ReplicationProtectedItemsClient) BeginFailoverCommit(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginFailoverCommitOptions) (*runtime.Poller[ReplicationProtectedItemsClientFailoverCommitResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failoverCommit(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientFailoverCommitResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientFailoverCommitResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// FailoverCommit - Operation to commit the failover of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) failoverCommit(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginFailoverCommitOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginFailoverCommit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCommitCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCommitCreateRequest creates the FailoverCommit request. +func (client *ReplicationProtectedItemsClient) failoverCommitCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, _ *ReplicationProtectedItemsClientBeginFailoverCommitOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCommit" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the details of an ASR replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric unique name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - options - ReplicationProtectedItemsClientGetOptions contains the optional parameters for the ReplicationProtectedItemsClient.Get +// method. +func (client *ReplicationProtectedItemsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientGetOptions) (ReplicationProtectedItemsClientGetResponse, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + if err != nil { + return ReplicationProtectedItemsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationProtectedItemsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationProtectedItemsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationProtectedItemsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, _ *ReplicationProtectedItemsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationProtectedItemsClient) getHandleResponse(resp *http.Response) (ReplicationProtectedItemsClientGetResponse, error) { + result := ReplicationProtectedItemsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectedItem); err != nil { + return ReplicationProtectedItemsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the list of ASR replication protected items in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationProtectedItemsClientListOptions contains the optional parameters for the ReplicationProtectedItemsClient.NewListPager +// method. +func (client *ReplicationProtectedItemsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationProtectedItemsClientListOptions) *runtime.Pager[ReplicationProtectedItemsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationProtectedItemsClientListResponse]{ + More: func(page ReplicationProtectedItemsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationProtectedItemsClientListResponse) (ReplicationProtectedItemsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationProtectedItemsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationProtectedItemsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationProtectedItemsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicationProtectedItemsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectedItems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-01-01") + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationProtectedItemsClient) listHandleResponse(resp *http.Response) (ReplicationProtectedItemsClientListResponse, error) { + result := ReplicationProtectedItemsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectedItemCollection); err != nil { + return ReplicationProtectedItemsClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationProtectionContainersPager - Gets the list of ASR replication protected items in the protection container. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - options - ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions contains the optional parameters +// for the ReplicationProtectedItemsClient.NewListByReplicationProtectionContainersPager method. +func (client *ReplicationProtectedItemsClient) NewListByReplicationProtectionContainersPager(resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, options *ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions) *runtime.Pager[ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse]{ + More: func(page ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse) (ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationProtectedItemsClient.NewListByReplicationProtectionContainersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationProtectionContainersCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, options) + }, nil) + if err != nil { + return ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse{}, err + } + return client.listByReplicationProtectionContainersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationProtectionContainersCreateRequest creates the ListByReplicationProtectionContainers request. +func (client *ReplicationProtectedItemsClient) listByReplicationProtectionContainersCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, _ *ReplicationProtectedItemsClientListByReplicationProtectionContainersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationProtectionContainersHandleResponse handles the ListByReplicationProtectionContainers response. +func (client *ReplicationProtectedItemsClient) listByReplicationProtectionContainersHandleResponse(resp *http.Response) (ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse, error) { + result := ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectedItemCollection); err != nil { + return ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse{}, err + } + return result, nil +} + +// BeginPlannedFailover - Operation to initiate a planned failover of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - failoverInput - Planned failover input. +// - options - ReplicationProtectedItemsClientBeginPlannedFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginPlannedFailover +// method. +func (client *ReplicationProtectedItemsClient) BeginPlannedFailover(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput PlannedFailoverInput, options *ReplicationProtectedItemsClientBeginPlannedFailoverOptions) (*runtime.Poller[ReplicationProtectedItemsClientPlannedFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.plannedFailover(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientPlannedFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientPlannedFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PlannedFailover - Operation to initiate a planned failover of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) plannedFailover(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput PlannedFailoverInput, options *ReplicationProtectedItemsClientBeginPlannedFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginPlannedFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.plannedFailoverCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// plannedFailoverCreateRequest creates the PlannedFailover request. +func (client *ReplicationProtectedItemsClient) plannedFailoverCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput PlannedFailoverInput, _ *ReplicationProtectedItemsClientBeginPlannedFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/plannedFailover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, failoverInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginPurge - The operation to delete or purge a replication protected item. This operation will force delete the replication +// protected item. Use the remove operation on replication protected item to perform a +// clean disable replication for the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - options - ReplicationProtectedItemsClientBeginPurgeOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginPurge +// method. +func (client *ReplicationProtectedItemsClient) BeginPurge(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginPurgeOptions) (*runtime.Poller[ReplicationProtectedItemsClientPurgeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.purge(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientPurgeResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientPurgeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Purge - The operation to delete or purge a replication protected item. This operation will force delete the replication +// protected item. Use the remove operation on replication protected item to perform a +// clean disable replication for the item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) purge(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginPurgeOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginPurge" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.purgeCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// purgeCreateRequest creates the Purge request. +func (client *ReplicationProtectedItemsClient) purgeCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, _ *ReplicationProtectedItemsClientBeginPurgeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginRemoveDisks - Operation to remove disk(s) from the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - removeDisksInput - Remove disks input. +// - options - ReplicationProtectedItemsClientBeginRemoveDisksOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginRemoveDisks +// method. +func (client *ReplicationProtectedItemsClient) BeginRemoveDisks(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, removeDisksInput RemoveDisksInput, options *ReplicationProtectedItemsClientBeginRemoveDisksOptions) (*runtime.Poller[ReplicationProtectedItemsClientRemoveDisksResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.removeDisks(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, removeDisksInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientRemoveDisksResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientRemoveDisksResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RemoveDisks - Operation to remove disk(s) from the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) removeDisks(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, removeDisksInput RemoveDisksInput, options *ReplicationProtectedItemsClientBeginRemoveDisksOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginRemoveDisks" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.removeDisksCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, removeDisksInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// removeDisksCreateRequest creates the RemoveDisks request. +func (client *ReplicationProtectedItemsClient) removeDisksCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, removeDisksInput RemoveDisksInput, _ *ReplicationProtectedItemsClientBeginRemoveDisksOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/removeDisks" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, removeDisksInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginRepairReplication - The operation to start resynchronize/repair replication for a replication protected item requiring +// resynchronization. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - The name of the fabric. +// - protectionContainerName - The name of the container. +// - replicatedProtectedItemName - The name of the replication protected item. +// - options - ReplicationProtectedItemsClientBeginRepairReplicationOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginRepairReplication +// method. +func (client *ReplicationProtectedItemsClient) BeginRepairReplication(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginRepairReplicationOptions) (*runtime.Poller[ReplicationProtectedItemsClientRepairReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.repairReplication(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientRepairReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientRepairReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RepairReplication - The operation to start resynchronize/repair replication for a replication protected item requiring +// resynchronization. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) repairReplication(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *ReplicationProtectedItemsClientBeginRepairReplicationOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginRepairReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.repairReplicationCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// repairReplicationCreateRequest creates the RepairReplication request. +func (client *ReplicationProtectedItemsClient) repairReplicationCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, _ *ReplicationProtectedItemsClientBeginRepairReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/repairReplication" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginReprotect - Operation to reprotect or reverse replicate a failed over replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - reprotectInput - Reverse replication input. +// - options - ReplicationProtectedItemsClientBeginReprotectOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginReprotect +// method. +func (client *ReplicationProtectedItemsClient) BeginReprotect(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, reprotectInput ReverseReplicationInput, options *ReplicationProtectedItemsClientBeginReprotectOptions) (*runtime.Poller[ReplicationProtectedItemsClientReprotectResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reprotect(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, reprotectInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientReprotectResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientReprotectResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Reprotect - Operation to reprotect or reverse replicate a failed over replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) reprotect(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, reprotectInput ReverseReplicationInput, options *ReplicationProtectedItemsClientBeginReprotectOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginReprotect" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.reprotectCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, reprotectInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// reprotectCreateRequest creates the Reprotect request. +func (client *ReplicationProtectedItemsClient) reprotectCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, reprotectInput ReverseReplicationInput, _ *ReplicationProtectedItemsClientBeginReprotectOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/reProtect" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, reprotectInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginResolveHealthErrors - Operation to resolve health issues of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - resolveHealthInput - Health issue input object. +// - options - ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginResolveHealthErrors +// method. +func (client *ReplicationProtectedItemsClient) BeginResolveHealthErrors(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, resolveHealthInput ResolveHealthInput, options *ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions) (*runtime.Poller[ReplicationProtectedItemsClientResolveHealthErrorsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resolveHealthErrors(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, resolveHealthInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientResolveHealthErrorsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientResolveHealthErrorsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResolveHealthErrors - Operation to resolve health issues of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) resolveHealthErrors(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, resolveHealthInput ResolveHealthInput, options *ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginResolveHealthErrors" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resolveHealthErrorsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, resolveHealthInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resolveHealthErrorsCreateRequest creates the ResolveHealthErrors request. +func (client *ReplicationProtectedItemsClient) resolveHealthErrorsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, resolveHealthInput ResolveHealthInput, _ *ReplicationProtectedItemsClientBeginResolveHealthErrorsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/resolveHealthErrors" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, resolveHealthInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginSwitchProvider - Operation to initiate a switch provider of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - switchProviderInput - Switch provider input. +// - options - ReplicationProtectedItemsClientBeginSwitchProviderOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginSwitchProvider +// method. +func (client *ReplicationProtectedItemsClient) BeginSwitchProvider(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, switchProviderInput SwitchProviderInput, options *ReplicationProtectedItemsClientBeginSwitchProviderOptions) (*runtime.Poller[ReplicationProtectedItemsClientSwitchProviderResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.switchProvider(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, switchProviderInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientSwitchProviderResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientSwitchProviderResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SwitchProvider - Operation to initiate a switch provider of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) switchProvider(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, switchProviderInput SwitchProviderInput, options *ReplicationProtectedItemsClientBeginSwitchProviderOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginSwitchProvider" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.switchProviderCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, switchProviderInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// switchProviderCreateRequest creates the SwitchProvider request. +func (client *ReplicationProtectedItemsClient) switchProviderCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, switchProviderInput SwitchProviderInput, _ *ReplicationProtectedItemsClientBeginSwitchProviderOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/switchProvider" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, switchProviderInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginTestFailover - Operation to perform a test failover of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - testfailoverInput - Test failover input. +// - options - ReplicationProtectedItemsClientBeginTestFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginTestFailover +// method. +func (client *ReplicationProtectedItemsClient) BeginTestFailover(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, testfailoverInput TestFailoverInput, options *ReplicationProtectedItemsClientBeginTestFailoverOptions) (*runtime.Poller[ReplicationProtectedItemsClientTestFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.testFailover(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, testfailoverInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientTestFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientTestFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TestFailover - Operation to perform a test failover of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) testFailover(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, testfailoverInput TestFailoverInput, options *ReplicationProtectedItemsClientBeginTestFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginTestFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.testFailoverCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, testfailoverInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// testFailoverCreateRequest creates the TestFailover request. +func (client *ReplicationProtectedItemsClient) testFailoverCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, testfailoverInput TestFailoverInput, _ *ReplicationProtectedItemsClientBeginTestFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, testfailoverInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginTestFailoverCleanup - Operation to clean up the test failover of a replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - cleanupInput - Test failover cleanup input. +// - options - ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginTestFailoverCleanup +// method. +func (client *ReplicationProtectedItemsClient) BeginTestFailoverCleanup(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, cleanupInput TestFailoverCleanupInput, options *ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions) (*runtime.Poller[ReplicationProtectedItemsClientTestFailoverCleanupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.testFailoverCleanup(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientTestFailoverCleanupResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientTestFailoverCleanupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TestFailoverCleanup - Operation to clean up the test failover of a replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) testFailoverCleanup(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, cleanupInput TestFailoverCleanupInput, options *ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginTestFailoverCleanup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.testFailoverCleanupCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// testFailoverCleanupCreateRequest creates the TestFailoverCleanup request. +func (client *ReplicationProtectedItemsClient) testFailoverCleanupCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, cleanupInput TestFailoverCleanupInput, _ *ReplicationProtectedItemsClientBeginTestFailoverCleanupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailoverCleanup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, cleanupInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginUnplannedFailover - Operation to initiate a failover of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - failoverInput - Failover input. +// - options - ReplicationProtectedItemsClientBeginUnplannedFailoverOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUnplannedFailover +// method. +func (client *ReplicationProtectedItemsClient) BeginUnplannedFailover(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput UnplannedFailoverInput, options *ReplicationProtectedItemsClientBeginUnplannedFailoverOptions) (*runtime.Poller[ReplicationProtectedItemsClientUnplannedFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.unplannedFailover(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientUnplannedFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientUnplannedFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UnplannedFailover - Operation to initiate a failover of the replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) unplannedFailover(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput UnplannedFailoverInput, options *ReplicationProtectedItemsClientBeginUnplannedFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginUnplannedFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.unplannedFailoverCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// unplannedFailoverCreateRequest creates the UnplannedFailover request. +func (client *ReplicationProtectedItemsClient) unplannedFailoverCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput UnplannedFailoverInput, _ *ReplicationProtectedItemsClientBeginUnplannedFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, failoverInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdate - The operation to update the recovery settings of an ASR replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - updateProtectionInput - Update protection input. +// - options - ReplicationProtectedItemsClientBeginUpdateOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdate +// method. +func (client *ReplicationProtectedItemsClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateProtectionInput UpdateReplicationProtectedItemInput, options *ReplicationProtectedItemsClientBeginUpdateOptions) (*runtime.Poller[ReplicationProtectedItemsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, updateProtectionInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - The operation to update the recovery settings of an ASR replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) update(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateProtectionInput UpdateReplicationProtectedItemInput, options *ReplicationProtectedItemsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, updateProtectionInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ReplicationProtectedItemsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateProtectionInput UpdateReplicationProtectedItemInput, _ *ReplicationProtectedItemsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, updateProtectionInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdateAppliance - The operation to update appliance of an ASR replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - applianceUpdateInput - Appliance update protection input. +// - options - ReplicationProtectedItemsClientBeginUpdateApplianceOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdateAppliance +// method. +func (client *ReplicationProtectedItemsClient) BeginUpdateAppliance(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applianceUpdateInput UpdateApplianceForReplicationProtectedItemInput, options *ReplicationProtectedItemsClientBeginUpdateApplianceOptions) (*runtime.Poller[ReplicationProtectedItemsClientUpdateApplianceResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateAppliance(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, applianceUpdateInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientUpdateApplianceResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientUpdateApplianceResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateAppliance - The operation to update appliance of an ASR replication protected item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) updateAppliance(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applianceUpdateInput UpdateApplianceForReplicationProtectedItemInput, options *ReplicationProtectedItemsClientBeginUpdateApplianceOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginUpdateAppliance" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateApplianceCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, applianceUpdateInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateApplianceCreateRequest creates the UpdateAppliance request. +func (client *ReplicationProtectedItemsClient) updateApplianceCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applianceUpdateInput UpdateApplianceForReplicationProtectedItemInput, _ *ReplicationProtectedItemsClientBeginUpdateApplianceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/updateAppliance" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, applianceUpdateInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdateMobilityService - The operation to update(push update) the installed mobility service software on a replication +// protected item to the latest available version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - The name of the fabric containing the protected item. +// - protectionContainerName - The name of the container containing the protected item. +// - replicatedProtectedItemName - The name of the protected item on which the agent is to be updated. +// - updateMobilityServiceRequest - Request to update the mobility service on the protected item. +// - options - ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions contains the optional parameters for the ReplicationProtectedItemsClient.BeginUpdateMobilityService +// method. +func (client *ReplicationProtectedItemsClient) BeginUpdateMobilityService(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateMobilityServiceRequest UpdateMobilityServiceRequest, options *ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions) (*runtime.Poller[ReplicationProtectedItemsClientUpdateMobilityServiceResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateMobilityService(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, updateMobilityServiceRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectedItemsClientUpdateMobilityServiceResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectedItemsClientUpdateMobilityServiceResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpdateMobilityService - The operation to update(push update) the installed mobility service software on a replication protected +// item to the latest available version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectedItemsClient) updateMobilityService(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateMobilityServiceRequest UpdateMobilityServiceRequest, options *ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectedItemsClient.BeginUpdateMobilityService" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateMobilityServiceCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, updateMobilityServiceRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateMobilityServiceCreateRequest creates the UpdateMobilityService request. +func (client *ReplicationProtectedItemsClient) updateMobilityServiceCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateMobilityServiceRequest UpdateMobilityServiceRequest, _ *ReplicationProtectedItemsClientBeginUpdateMobilityServiceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/updateMobilityService" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, updateMobilityServiceRequest); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectionclusters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectionclusters_client.go new file mode 100644 index 00000000..d77fb342 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectionclusters_client.go @@ -0,0 +1,1111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationProtectionClustersClient contains the methods for the ReplicationProtectionClusters group. +// Don't use this type directly, use NewReplicationProtectionClustersClient() instead. +type ReplicationProtectionClustersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationProtectionClustersClient creates a new instance of ReplicationProtectionClustersClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationProtectionClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectionClustersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationProtectionClustersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginApplyRecoveryPoint - Operation to apply a new cluster recovery point on the Protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - applyClusterRecoveryPointInput - Apply recovery point input. +// - options - ReplicationProtectionClustersClientBeginApplyRecoveryPointOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginApplyRecoveryPoint +// method. +func (client *ReplicationProtectionClustersClient) BeginApplyRecoveryPoint(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, applyClusterRecoveryPointInput ApplyClusterRecoveryPointInput, options *ReplicationProtectionClustersClientBeginApplyRecoveryPointOptions) (*runtime.Poller[ReplicationProtectionClustersClientApplyRecoveryPointResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.applyRecoveryPoint(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, applyClusterRecoveryPointInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionClustersClientApplyRecoveryPointResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionClustersClientApplyRecoveryPointResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ApplyRecoveryPoint - Operation to apply a new cluster recovery point on the Protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionClustersClient) applyRecoveryPoint(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, applyClusterRecoveryPointInput ApplyClusterRecoveryPointInput, options *ReplicationProtectionClustersClientBeginApplyRecoveryPointOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionClustersClient.BeginApplyRecoveryPoint" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.applyRecoveryPointCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, applyClusterRecoveryPointInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// applyRecoveryPointCreateRequest creates the ApplyRecoveryPoint request. +func (client *ReplicationProtectionClustersClient) applyRecoveryPointCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, applyClusterRecoveryPointInput ApplyClusterRecoveryPointInput, _ *ReplicationProtectionClustersClientBeginApplyRecoveryPointOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}/applyRecoveryPoint" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, applyClusterRecoveryPointInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginCreate - The operation to create an ASR replication protection cluster item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - replicationProtectionCluster - Create replication protection cluster Input. +// - options - ReplicationProtectionClustersClientBeginCreateOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginCreate +// method. +func (client *ReplicationProtectionClustersClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, replicationProtectionCluster ReplicationProtectionCluster, options *ReplicationProtectionClustersClientBeginCreateOptions) (*runtime.Poller[ReplicationProtectionClustersClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, replicationProtectionCluster, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionClustersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionClustersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to create an ASR replication protection cluster item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionClustersClient) create(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, replicationProtectionCluster ReplicationProtectionCluster, options *ReplicationProtectionClustersClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionClustersClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, replicationProtectionCluster, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationProtectionClustersClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, replicationProtectionCluster ReplicationProtectionCluster, _ *ReplicationProtectionClustersClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, replicationProtectionCluster); err != nil { + return nil, err + } + return req, nil +} + +// BeginFailoverCommit - Operation to initiate commit failover of the replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - options - ReplicationProtectionClustersClientBeginFailoverCommitOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginFailoverCommit +// method. +func (client *ReplicationProtectionClustersClient) BeginFailoverCommit(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, options *ReplicationProtectionClustersClientBeginFailoverCommitOptions) (*runtime.Poller[ReplicationProtectionClustersClientFailoverCommitResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failoverCommit(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionClustersClientFailoverCommitResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionClustersClientFailoverCommitResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// FailoverCommit - Operation to initiate commit failover of the replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionClustersClient) failoverCommit(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, options *ReplicationProtectionClustersClientBeginFailoverCommitOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionClustersClient.BeginFailoverCommit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCommitCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCommitCreateRequest creates the FailoverCommit request. +func (client *ReplicationProtectionClustersClient) failoverCommitCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, _ *ReplicationProtectionClustersClientBeginFailoverCommitOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}/failoverCommit" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the details of an ASR replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - options - ReplicationProtectionClustersClientGetOptions contains the optional parameters for the ReplicationProtectionClustersClient.Get +// method. +func (client *ReplicationProtectionClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, options *ReplicationProtectionClustersClientGetOptions) (ReplicationProtectionClustersClientGetResponse, error) { + var err error + const operationName = "ReplicationProtectionClustersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, options) + if err != nil { + return ReplicationProtectionClustersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationProtectionClustersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationProtectionClustersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationProtectionClustersClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, _ *ReplicationProtectionClustersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationProtectionClustersClient) getHandleResponse(resp *http.Response) (ReplicationProtectionClustersClientGetResponse, error) { + result := ReplicationProtectionClustersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectionCluster); err != nil { + return ReplicationProtectionClustersClientGetResponse{}, err + } + return result, nil +} + +// GetOperationResults - Track the results of an asynchronous operation on the replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - jobID - job id to track. +// - options - ReplicationProtectionClustersClientGetOperationResultsOptions contains the optional parameters for the ReplicationProtectionClustersClient.GetOperationResults +// method. +func (client *ReplicationProtectionClustersClient) GetOperationResults(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, jobID string, options *ReplicationProtectionClustersClientGetOperationResultsOptions) (ReplicationProtectionClustersClientGetOperationResultsResponse, error) { + var err error + const operationName = "ReplicationProtectionClustersClient.GetOperationResults" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getOperationResultsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, jobID, options) + if err != nil { + return ReplicationProtectionClustersClientGetOperationResultsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationProtectionClustersClientGetOperationResultsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationProtectionClustersClientGetOperationResultsResponse{}, err + } + resp, err := client.getOperationResultsHandleResponse(httpResp) + return resp, err +} + +// getOperationResultsCreateRequest creates the GetOperationResults request. +func (client *ReplicationProtectionClustersClient) getOperationResultsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, jobID string, _ *ReplicationProtectionClustersClientGetOperationResultsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}/operationResults/{jobId}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + if jobID == "" { + return nil, errors.New("parameter jobID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{jobId}", url.PathEscape(jobID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getOperationResultsHandleResponse handles the GetOperationResults response. +func (client *ReplicationProtectionClustersClient) getOperationResultsHandleResponse(resp *http.Response) (ReplicationProtectionClustersClientGetOperationResultsResponse, error) { + result := ReplicationProtectionClustersClientGetOperationResultsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectionCluster); err != nil { + return ReplicationProtectionClustersClientGetOperationResultsResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the list of ASR replication protected clusters in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationProtectionClustersClientListOptions contains the optional parameters for the ReplicationProtectionClustersClient.NewListPager +// method. +func (client *ReplicationProtectionClustersClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationProtectionClustersClientListOptions) *runtime.Pager[ReplicationProtectionClustersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionClustersClientListResponse]{ + More: func(page ReplicationProtectionClustersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationProtectionClustersClientListResponse) (ReplicationProtectionClustersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationProtectionClustersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationProtectionClustersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationProtectionClustersClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicationProtectionClustersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionClusters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + reqQP.Set("api-version", "2025-01-01") + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationProtectionClustersClient) listHandleResponse(resp *http.Response) (ReplicationProtectionClustersClientListResponse, error) { + result := ReplicationProtectionClustersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectionClusterCollection); err != nil { + return ReplicationProtectionClustersClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationProtectionContainersPager - Gets the list of ASR replication protected clusters in the protection container. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - options - ReplicationProtectionClustersClientListByReplicationProtectionContainersOptions contains the optional parameters +// for the ReplicationProtectionClustersClient.NewListByReplicationProtectionContainersPager method. +func (client *ReplicationProtectionClustersClient) NewListByReplicationProtectionContainersPager(resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, options *ReplicationProtectionClustersClientListByReplicationProtectionContainersOptions) *runtime.Pager[ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse]{ + More: func(page ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse) (ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationProtectionClustersClient.NewListByReplicationProtectionContainersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationProtectionContainersCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, options) + }, nil) + if err != nil { + return ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse{}, err + } + return client.listByReplicationProtectionContainersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationProtectionContainersCreateRequest creates the ListByReplicationProtectionContainers request. +func (client *ReplicationProtectionClustersClient) listByReplicationProtectionContainersCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, _ *ReplicationProtectionClustersClientListByReplicationProtectionContainersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationProtectionContainersHandleResponse handles the ListByReplicationProtectionContainers response. +func (client *ReplicationProtectionClustersClient) listByReplicationProtectionContainersHandleResponse(resp *http.Response) (ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse, error) { + result := ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectionClusterCollection); err != nil { + return ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse{}, err + } + return result, nil +} + +// BeginPurge - The operation to purge the replication protection cluster. This operation will force delete the replication +// protection cluster. Use the remove operation on replication protection cluster to perform a +// clean disable replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - options - ReplicationProtectionClustersClientBeginPurgeOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginPurge +// method. +func (client *ReplicationProtectionClustersClient) BeginPurge(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, options *ReplicationProtectionClustersClientBeginPurgeOptions) (*runtime.Poller[ReplicationProtectionClustersClientPurgeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.purge(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionClustersClientPurgeResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionClustersClientPurgeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Purge - The operation to purge the replication protection cluster. This operation will force delete the replication protection +// cluster. Use the remove operation on replication protection cluster to perform a +// clean disable replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionClustersClient) purge(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, options *ReplicationProtectionClustersClientBeginPurgeOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionClustersClient.BeginPurge" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.purgeCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// purgeCreateRequest creates the Purge request. +func (client *ReplicationProtectionClustersClient) purgeCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, _ *ReplicationProtectionClustersClientBeginPurgeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginRepairReplication - The operation to repair replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - options - ReplicationProtectionClustersClientBeginRepairReplicationOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginRepairReplication +// method. +func (client *ReplicationProtectionClustersClient) BeginRepairReplication(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, options *ReplicationProtectionClustersClientBeginRepairReplicationOptions) (*runtime.Poller[ReplicationProtectionClustersClientRepairReplicationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.repairReplication(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionClustersClientRepairReplicationResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionClustersClientRepairReplicationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RepairReplication - The operation to repair replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionClustersClient) repairReplication(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, options *ReplicationProtectionClustersClientBeginRepairReplicationOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionClustersClient.BeginRepairReplication" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.repairReplicationCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// repairReplicationCreateRequest creates the RepairReplication request. +func (client *ReplicationProtectionClustersClient) repairReplicationCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, _ *ReplicationProtectionClustersClientBeginRepairReplicationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}/repairReplication" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginTestFailover - Operation to initiate a failover of the replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - failoverInput - Cluster test failover input body. +// - options - ReplicationProtectionClustersClientBeginTestFailoverOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginTestFailover +// method. +func (client *ReplicationProtectionClustersClient) BeginTestFailover(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, failoverInput ClusterTestFailoverInput, options *ReplicationProtectionClustersClientBeginTestFailoverOptions) (*runtime.Poller[ReplicationProtectionClustersClientTestFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.testFailover(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, failoverInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionClustersClientTestFailoverResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionClustersClientTestFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TestFailover - Operation to initiate a failover of the replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionClustersClient) testFailover(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, failoverInput ClusterTestFailoverInput, options *ReplicationProtectionClustersClientBeginTestFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionClustersClient.BeginTestFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.testFailoverCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, failoverInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// testFailoverCreateRequest creates the TestFailover request. +func (client *ReplicationProtectionClustersClient) testFailoverCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, failoverInput ClusterTestFailoverInput, _ *ReplicationProtectionClustersClientBeginTestFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}/testFailover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, failoverInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginTestFailoverCleanup - Operation to clean up the test failover of a replication protected cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - cleanupInput - Test failover cleanup input. +// - options - ReplicationProtectionClustersClientBeginTestFailoverCleanupOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginTestFailoverCleanup +// method. +func (client *ReplicationProtectionClustersClient) BeginTestFailoverCleanup(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, cleanupInput ClusterTestFailoverCleanupInput, options *ReplicationProtectionClustersClientBeginTestFailoverCleanupOptions) (*runtime.Poller[ReplicationProtectionClustersClientTestFailoverCleanupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.testFailoverCleanup(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, cleanupInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionClustersClientTestFailoverCleanupResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionClustersClientTestFailoverCleanupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TestFailoverCleanup - Operation to clean up the test failover of a replication protected cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionClustersClient) testFailoverCleanup(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, cleanupInput ClusterTestFailoverCleanupInput, options *ReplicationProtectionClustersClientBeginTestFailoverCleanupOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionClustersClient.BeginTestFailoverCleanup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.testFailoverCleanupCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, cleanupInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// testFailoverCleanupCreateRequest creates the TestFailoverCleanup request. +func (client *ReplicationProtectionClustersClient) testFailoverCleanupCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, cleanupInput ClusterTestFailoverCleanupInput, _ *ReplicationProtectionClustersClientBeginTestFailoverCleanupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}/testFailoverCleanup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, cleanupInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginUnplannedFailover - Operation to initiate a failover of the replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - replicationProtectionClusterName - Replication protection cluster name. +// - failoverInput - Failover input. +// - options - ReplicationProtectionClustersClientBeginUnplannedFailoverOptions contains the optional parameters for the ReplicationProtectionClustersClient.BeginUnplannedFailover +// method. +func (client *ReplicationProtectionClustersClient) BeginUnplannedFailover(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, failoverInput ClusterUnplannedFailoverInput, options *ReplicationProtectionClustersClientBeginUnplannedFailoverOptions) (*runtime.Poller[ReplicationProtectionClustersClientUnplannedFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.unplannedFailover(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, failoverInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionClustersClientUnplannedFailoverResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionClustersClientUnplannedFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UnplannedFailover - Operation to initiate a failover of the replication protection cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionClustersClient) unplannedFailover(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, failoverInput ClusterUnplannedFailoverInput, options *ReplicationProtectionClustersClientBeginUnplannedFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionClustersClient.BeginUnplannedFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.unplannedFailoverCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicationProtectionClusterName, failoverInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// unplannedFailoverCreateRequest creates the UnplannedFailover request. +func (client *ReplicationProtectionClustersClient) unplannedFailoverCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicationProtectionClusterName string, failoverInput ClusterUnplannedFailoverInput, _ *ReplicationProtectionClustersClientBeginUnplannedFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionClusters/{replicationProtectionClusterName}/unplannedFailover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicationProtectionClusterName == "" { + return nil, errors.New("parameter replicationProtectionClusterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicationProtectionClusterName}", url.PathEscape(replicationProtectionClusterName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, failoverInput); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectioncontainermappings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectioncontainermappings_client.go new file mode 100644 index 00000000..6a400503 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectioncontainermappings_client.go @@ -0,0 +1,635 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationProtectionContainerMappingsClient contains the methods for the ReplicationProtectionContainerMappings group. +// Don't use this type directly, use NewReplicationProtectionContainerMappingsClient() instead. +type ReplicationProtectionContainerMappingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationProtectionContainerMappingsClient creates a new instance of ReplicationProtectionContainerMappingsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationProtectionContainerMappingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectionContainerMappingsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationProtectionContainerMappingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - The operation to create a protection container mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - mappingName - Protection container mapping name. +// - creationInput - Mapping creation input. +// - options - ReplicationProtectionContainerMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginCreate +// method. +func (client *ReplicationProtectionContainerMappingsClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, creationInput CreateProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginCreateOptions) (*runtime.Poller[ReplicationProtectionContainerMappingsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, mappingName, creationInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionContainerMappingsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionContainerMappingsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to create a protection container mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionContainerMappingsClient) create(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, creationInput CreateProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionContainerMappingsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, mappingName, creationInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationProtectionContainerMappingsClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, creationInput CreateProtectionContainerMappingInput, _ *ReplicationProtectionContainerMappingsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if mappingName == "" { + return nil, errors.New("parameter mappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{mappingName}", url.PathEscape(mappingName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, creationInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - The operation to delete or remove a protection container mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - mappingName - Protection container mapping name. +// - removalInput - Removal input. +// - options - ReplicationProtectionContainerMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginDelete +// method. +func (client *ReplicationProtectionContainerMappingsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, removalInput RemoveProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginDeleteOptions) (*runtime.Poller[ReplicationProtectionContainerMappingsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, mappingName, removalInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionContainerMappingsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionContainerMappingsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - The operation to delete or remove a protection container mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionContainerMappingsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, removalInput RemoveProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionContainerMappingsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, mappingName, removalInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationProtectionContainerMappingsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, removalInput RemoveProtectionContainerMappingInput, _ *ReplicationProtectionContainerMappingsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if mappingName == "" { + return nil, errors.New("parameter mappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{mappingName}", url.PathEscape(mappingName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + if err := runtime.MarshalAsJSON(req, removalInput); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets the details of a protection container mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - mappingName - Protection Container mapping name. +// - options - ReplicationProtectionContainerMappingsClientGetOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.Get +// method. +func (client *ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, options *ReplicationProtectionContainerMappingsClientGetOptions) (ReplicationProtectionContainerMappingsClientGetResponse, error) { + var err error + const operationName = "ReplicationProtectionContainerMappingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, mappingName, options) + if err != nil { + return ReplicationProtectionContainerMappingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationProtectionContainerMappingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationProtectionContainerMappingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationProtectionContainerMappingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, _ *ReplicationProtectionContainerMappingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if mappingName == "" { + return nil, errors.New("parameter mappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{mappingName}", url.PathEscape(mappingName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationProtectionContainerMappingsClient) getHandleResponse(resp *http.Response) (ReplicationProtectionContainerMappingsClientGetResponse, error) { + result := ReplicationProtectionContainerMappingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerMapping); err != nil { + return ReplicationProtectionContainerMappingsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the protection container mappings in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationProtectionContainerMappingsClientListOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.NewListPager +// method. +func (client *ReplicationProtectionContainerMappingsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationProtectionContainerMappingsClientListOptions) *runtime.Pager[ReplicationProtectionContainerMappingsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionContainerMappingsClientListResponse]{ + More: func(page ReplicationProtectionContainerMappingsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationProtectionContainerMappingsClientListResponse) (ReplicationProtectionContainerMappingsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationProtectionContainerMappingsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationProtectionContainerMappingsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationProtectionContainerMappingsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationProtectionContainerMappingsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainerMappings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationProtectionContainerMappingsClient) listHandleResponse(resp *http.Response) (ReplicationProtectionContainerMappingsClientListResponse, error) { + result := ReplicationProtectionContainerMappingsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerMappingCollection); err != nil { + return ReplicationProtectionContainerMappingsClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationProtectionContainersPager - Lists the protection container mappings for a protection container. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - options - ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions contains the optional +// parameters for the ReplicationProtectionContainerMappingsClient.NewListByReplicationProtectionContainersPager method. +func (client *ReplicationProtectionContainerMappingsClient) NewListByReplicationProtectionContainersPager(resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, options *ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions) *runtime.Pager[ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse]{ + More: func(page ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse) (ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationProtectionContainerMappingsClient.NewListByReplicationProtectionContainersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationProtectionContainersCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, options) + }, nil) + if err != nil { + return ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse{}, err + } + return client.listByReplicationProtectionContainersHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationProtectionContainersCreateRequest creates the ListByReplicationProtectionContainers request. +func (client *ReplicationProtectionContainerMappingsClient) listByReplicationProtectionContainersCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, _ *ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationProtectionContainersHandleResponse handles the ListByReplicationProtectionContainers response. +func (client *ReplicationProtectionContainerMappingsClient) listByReplicationProtectionContainersHandleResponse(resp *http.Response) (ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse, error) { + result := ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerMappingCollection); err != nil { + return ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse{}, err + } + return result, nil +} + +// BeginPurge - The operation to purge(force delete) a protection container mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - mappingName - Protection container mapping name. +// - options - ReplicationProtectionContainerMappingsClientBeginPurgeOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginPurge +// method. +func (client *ReplicationProtectionContainerMappingsClient) BeginPurge(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, options *ReplicationProtectionContainerMappingsClientBeginPurgeOptions) (*runtime.Poller[ReplicationProtectionContainerMappingsClientPurgeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.purge(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, mappingName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionContainerMappingsClientPurgeResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionContainerMappingsClientPurgeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Purge - The operation to purge(force delete) a protection container mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionContainerMappingsClient) purge(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, options *ReplicationProtectionContainerMappingsClientBeginPurgeOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionContainerMappingsClient.BeginPurge" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.purgeCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, mappingName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// purgeCreateRequest creates the Purge request. +func (client *ReplicationProtectionContainerMappingsClient) purgeCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, _ *ReplicationProtectionContainerMappingsClientBeginPurgeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if mappingName == "" { + return nil, errors.New("parameter mappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{mappingName}", url.PathEscape(mappingName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginUpdate - The operation to update protection container mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - mappingName - Protection container mapping name. +// - updateInput - Mapping update input. +// - options - ReplicationProtectionContainerMappingsClientBeginUpdateOptions contains the optional parameters for the ReplicationProtectionContainerMappingsClient.BeginUpdate +// method. +func (client *ReplicationProtectionContainerMappingsClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, updateInput UpdateProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginUpdateOptions) (*runtime.Poller[ReplicationProtectionContainerMappingsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, mappingName, updateInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionContainerMappingsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionContainerMappingsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - The operation to update protection container mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionContainerMappingsClient) update(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, updateInput UpdateProtectionContainerMappingInput, options *ReplicationProtectionContainerMappingsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionContainerMappingsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, mappingName, updateInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ReplicationProtectionContainerMappingsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, mappingName string, updateInput UpdateProtectionContainerMappingInput, _ *ReplicationProtectionContainerMappingsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if mappingName == "" { + return nil, errors.New("parameter mappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{mappingName}", url.PathEscape(mappingName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, updateInput); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectioncontainers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectioncontainers_client.go new file mode 100644 index 00000000..be722209 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectioncontainers_client.go @@ -0,0 +1,697 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationProtectionContainersClient contains the methods for the ReplicationProtectionContainers group. +// Don't use this type directly, use NewReplicationProtectionContainersClient() instead. +type ReplicationProtectionContainersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationProtectionContainersClient creates a new instance of ReplicationProtectionContainersClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationProtectionContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectionContainersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationProtectionContainersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Operation to create a protection container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric ARM name. +// - protectionContainerName - Unique protection container ARM name. +// - creationInput - Creation input. +// - options - ReplicationProtectionContainersClientBeginCreateOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginCreate +// method. +func (client *ReplicationProtectionContainersClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, creationInput CreateProtectionContainerInput, options *ReplicationProtectionContainersClientBeginCreateOptions) (*runtime.Poller[ReplicationProtectionContainersClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, creationInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionContainersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionContainersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Operation to create a protection container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionContainersClient) create(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, creationInput CreateProtectionContainerInput, options *ReplicationProtectionContainersClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionContainersClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, creationInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationProtectionContainersClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, creationInput CreateProtectionContainerInput, _ *ReplicationProtectionContainersClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, creationInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Operation to remove a protection container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric ARM name. +// - protectionContainerName - Unique protection container ARM name. +// - options - ReplicationProtectionContainersClientBeginDeleteOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginDelete +// method. +func (client *ReplicationProtectionContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, options *ReplicationProtectionContainersClientBeginDeleteOptions) (*runtime.Poller[ReplicationProtectionContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionContainersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionContainersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Operation to remove a protection container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, options *ReplicationProtectionContainersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionContainersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationProtectionContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, _ *ReplicationProtectionContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginDiscoverProtectableItem - The operation to a add a protectable item to a protection container(Add physical server). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - The name of the fabric. +// - protectionContainerName - The name of the protection container. +// - discoverProtectableItemRequest - The request object to add a protectable item. +// - options - ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions contains the optional parameters for +// the ReplicationProtectionContainersClient.BeginDiscoverProtectableItem method. +func (client *ReplicationProtectionContainersClient) BeginDiscoverProtectableItem(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, discoverProtectableItemRequest DiscoverProtectableItemRequest, options *ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions) (*runtime.Poller[ReplicationProtectionContainersClientDiscoverProtectableItemResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.discoverProtectableItem(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, discoverProtectableItemRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionContainersClientDiscoverProtectableItemResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionContainersClientDiscoverProtectableItemResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DiscoverProtectableItem - The operation to a add a protectable item to a protection container(Add physical server). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionContainersClient) discoverProtectableItem(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, discoverProtectableItemRequest DiscoverProtectableItemRequest, options *ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionContainersClient.BeginDiscoverProtectableItem" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.discoverProtectableItemCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, discoverProtectableItemRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// discoverProtectableItemCreateRequest creates the DiscoverProtectableItem request. +func (client *ReplicationProtectionContainersClient) discoverProtectableItemCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, discoverProtectableItemRequest DiscoverProtectableItemRequest, _ *ReplicationProtectionContainersClientBeginDiscoverProtectableItemOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/discoverProtectableItem" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, discoverProtectableItemRequest); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets the details of a protection container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - options - ReplicationProtectionContainersClientGetOptions contains the optional parameters for the ReplicationProtectionContainersClient.Get +// method. +func (client *ReplicationProtectionContainersClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, options *ReplicationProtectionContainersClientGetOptions) (ReplicationProtectionContainersClientGetResponse, error) { + var err error + const operationName = "ReplicationProtectionContainersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, options) + if err != nil { + return ReplicationProtectionContainersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationProtectionContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationProtectionContainersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationProtectionContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, _ *ReplicationProtectionContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationProtectionContainersClient) getHandleResponse(resp *http.Response) (ReplicationProtectionContainersClientGetResponse, error) { + result := ReplicationProtectionContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainer); err != nil { + return ReplicationProtectionContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the protection containers in a vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationProtectionContainersClientListOptions contains the optional parameters for the ReplicationProtectionContainersClient.NewListPager +// method. +func (client *ReplicationProtectionContainersClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationProtectionContainersClientListOptions) *runtime.Pager[ReplicationProtectionContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionContainersClientListResponse]{ + More: func(page ReplicationProtectionContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationProtectionContainersClientListResponse) (ReplicationProtectionContainersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationProtectionContainersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationProtectionContainersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationProtectionContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationProtectionContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationProtectionContainersClient) listHandleResponse(resp *http.Response) (ReplicationProtectionContainersClientListResponse, error) { + result := ReplicationProtectionContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerCollection); err != nil { + return ReplicationProtectionContainersClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationFabricsPager - Lists the protection containers in the specified fabric. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - options - ReplicationProtectionContainersClientListByReplicationFabricsOptions contains the optional parameters for the +// ReplicationProtectionContainersClient.NewListByReplicationFabricsPager method. +func (client *ReplicationProtectionContainersClient) NewListByReplicationFabricsPager(resourceGroupName string, resourceName string, fabricName string, options *ReplicationProtectionContainersClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationProtectionContainersClientListByReplicationFabricsResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionContainersClientListByReplicationFabricsResponse]{ + More: func(page ReplicationProtectionContainersClientListByReplicationFabricsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationProtectionContainersClientListByReplicationFabricsResponse) (ReplicationProtectionContainersClientListByReplicationFabricsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationProtectionContainersClient.NewListByReplicationFabricsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationFabricsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + }, nil) + if err != nil { + return ReplicationProtectionContainersClientListByReplicationFabricsResponse{}, err + } + return client.listByReplicationFabricsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. +func (client *ReplicationProtectionContainersClient) listByReplicationFabricsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationProtectionContainersClientListByReplicationFabricsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. +func (client *ReplicationProtectionContainersClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationProtectionContainersClientListByReplicationFabricsResponse, error) { + result := ReplicationProtectionContainersClientListByReplicationFabricsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ProtectionContainerCollection); err != nil { + return ReplicationProtectionContainersClientListByReplicationFabricsResponse{}, err + } + return result, nil +} + +// BeginSwitchClusterProtection - Operation to switch protection from one container to another. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - Protection container name. +// - switchInput - Switch protection input. +// - options - ReplicationProtectionContainersClientBeginSwitchClusterProtectionOptions contains the optional parameters for +// the ReplicationProtectionContainersClient.BeginSwitchClusterProtection method. +func (client *ReplicationProtectionContainersClient) BeginSwitchClusterProtection(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, switchInput SwitchClusterProtectionInput, options *ReplicationProtectionContainersClientBeginSwitchClusterProtectionOptions) (*runtime.Poller[ReplicationProtectionContainersClientSwitchClusterProtectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.switchClusterProtection(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, switchInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionContainersClientSwitchClusterProtectionResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionContainersClientSwitchClusterProtectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SwitchClusterProtection - Operation to switch protection from one container to another. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionContainersClient) switchClusterProtection(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, switchInput SwitchClusterProtectionInput, options *ReplicationProtectionContainersClientBeginSwitchClusterProtectionOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionContainersClient.BeginSwitchClusterProtection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.switchClusterProtectionCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, switchInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// switchClusterProtectionCreateRequest creates the SwitchClusterProtection request. +func (client *ReplicationProtectionContainersClient) switchClusterProtectionCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, switchInput SwitchClusterProtectionInput, _ *ReplicationProtectionContainersClientBeginSwitchClusterProtectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchClusterProtection" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, switchInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginSwitchProtection - Operation to switch protection from one container to another or one replication provider to another. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Unique fabric name. +// - protectionContainerName - Protection container name. +// - switchInput - Switch protection input. +// - options - ReplicationProtectionContainersClientBeginSwitchProtectionOptions contains the optional parameters for the ReplicationProtectionContainersClient.BeginSwitchProtection +// method. +func (client *ReplicationProtectionContainersClient) BeginSwitchProtection(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, switchInput SwitchProtectionInput, options *ReplicationProtectionContainersClientBeginSwitchProtectionOptions) (*runtime.Poller[ReplicationProtectionContainersClientSwitchProtectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.switchProtection(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, switchInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationProtectionContainersClientSwitchProtectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationProtectionContainersClientSwitchProtectionResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SwitchProtection - Operation to switch protection from one container to another or one replication provider to another. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationProtectionContainersClient) switchProtection(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, switchInput SwitchProtectionInput, options *ReplicationProtectionContainersClientBeginSwitchProtectionOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationProtectionContainersClient.BeginSwitchProtection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.switchProtectionCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, switchInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// switchProtectionCreateRequest creates the SwitchProtection request. +func (client *ReplicationProtectionContainersClient) switchProtectionCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, switchInput SwitchProtectionInput, _ *ReplicationProtectionContainersClientBeginSwitchProtectionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, switchInput); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectionintents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectionintents_client.go new file mode 100644 index 00000000..9591bbb3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationprotectionintents_client.go @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationProtectionIntentsClient contains the methods for the ReplicationProtectionIntents group. +// Don't use this type directly, use NewReplicationProtectionIntentsClient() instead. +type ReplicationProtectionIntentsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationProtectionIntentsClient creates a new instance of ReplicationProtectionIntentsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationProtectionIntentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationProtectionIntentsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationProtectionIntentsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Create - The operation to create an ASR replication protection intent item. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - intentObjectName - A name for the replication protection item. +// - input - Create Protection Intent Input. +// - options - ReplicationProtectionIntentsClientCreateOptions contains the optional parameters for the ReplicationProtectionIntentsClient.Create +// method. +func (client *ReplicationProtectionIntentsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, intentObjectName string, input CreateProtectionIntentInput, options *ReplicationProtectionIntentsClientCreateOptions) (ReplicationProtectionIntentsClientCreateResponse, error) { + var err error + const operationName = "ReplicationProtectionIntentsClient.Create" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, intentObjectName, input, options) + if err != nil { + return ReplicationProtectionIntentsClientCreateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationProtectionIntentsClientCreateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationProtectionIntentsClientCreateResponse{}, err + } + resp, err := client.createHandleResponse(httpResp) + return resp, err +} + +// createCreateRequest creates the Create request. +func (client *ReplicationProtectionIntentsClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, intentObjectName string, input CreateProtectionIntentInput, _ *ReplicationProtectionIntentsClientCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents/{intentObjectName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if intentObjectName == "" { + return nil, errors.New("parameter intentObjectName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{intentObjectName}", url.PathEscape(intentObjectName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// createHandleResponse handles the Create response. +func (client *ReplicationProtectionIntentsClient) createHandleResponse(resp *http.Response) (ReplicationProtectionIntentsClientCreateResponse, error) { + result := ReplicationProtectionIntentsClientCreateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectionIntent); err != nil { + return ReplicationProtectionIntentsClientCreateResponse{}, err + } + return result, nil +} + +// Get - Gets the details of an ASR replication protection intent. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - intentObjectName - Replication protection intent name. +// - options - ReplicationProtectionIntentsClientGetOptions contains the optional parameters for the ReplicationProtectionIntentsClient.Get +// method. +func (client *ReplicationProtectionIntentsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, intentObjectName string, options *ReplicationProtectionIntentsClientGetOptions) (ReplicationProtectionIntentsClientGetResponse, error) { + var err error + const operationName = "ReplicationProtectionIntentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, intentObjectName, options) + if err != nil { + return ReplicationProtectionIntentsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationProtectionIntentsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationProtectionIntentsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationProtectionIntentsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, intentObjectName string, _ *ReplicationProtectionIntentsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents/{intentObjectName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if intentObjectName == "" { + return nil, errors.New("parameter intentObjectName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{intentObjectName}", url.PathEscape(intentObjectName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationProtectionIntentsClient) getHandleResponse(resp *http.Response) (ReplicationProtectionIntentsClientGetResponse, error) { + result := ReplicationProtectionIntentsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectionIntent); err != nil { + return ReplicationProtectionIntentsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the list of ASR replication protection intent objects in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationProtectionIntentsClientListOptions contains the optional parameters for the ReplicationProtectionIntentsClient.NewListPager +// method. +func (client *ReplicationProtectionIntentsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationProtectionIntentsClientListOptions) *runtime.Pager[ReplicationProtectionIntentsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationProtectionIntentsClientListResponse]{ + More: func(page ReplicationProtectionIntentsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationProtectionIntentsClientListResponse) (ReplicationProtectionIntentsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationProtectionIntentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationProtectionIntentsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationProtectionIntentsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicationProtectionIntentsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionIntents" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + if options != nil && options.SkipToken != nil { + reqQP.Set("skipToken", *options.SkipToken) + } + if options != nil && options.TakeToken != nil { + reqQP.Set("takeToken", *options.TakeToken) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationProtectionIntentsClient) listHandleResponse(resp *http.Response) (ReplicationProtectionIntentsClientListResponse, error) { + result := ReplicationProtectionIntentsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ReplicationProtectionIntentCollection); err != nil { + return ReplicationProtectionIntentsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationrecoveryplans_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationrecoveryplans_client.go new file mode 100644 index 00000000..f7dc0291 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationrecoveryplans_client.go @@ -0,0 +1,1011 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationRecoveryPlansClient contains the methods for the ReplicationRecoveryPlans group. +// Don't use this type directly, use NewReplicationRecoveryPlansClient() instead. +type ReplicationRecoveryPlansClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationRecoveryPlansClient creates a new instance of ReplicationRecoveryPlansClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationRecoveryPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationRecoveryPlansClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationRecoveryPlansClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - The operation to create a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Recovery plan name. +// - input - Recovery Plan creation input. +// - options - ReplicationRecoveryPlansClientBeginCreateOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginCreate +// method. +func (client *ReplicationRecoveryPlansClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input CreateRecoveryPlanInput, options *ReplicationRecoveryPlansClientBeginCreateOptions) (*runtime.Poller[ReplicationRecoveryPlansClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryPlansClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryPlansClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to create a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryPlansClient) create(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input CreateRecoveryPlanInput, options *ReplicationRecoveryPlansClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationRecoveryPlansClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input CreateRecoveryPlanInput, _ *ReplicationRecoveryPlansClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Delete a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Recovery plan name. +// - options - ReplicationRecoveryPlansClientBeginDeleteOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginDelete +// method. +func (client *ReplicationRecoveryPlansClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginDeleteOptions) (*runtime.Poller[ReplicationRecoveryPlansClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, recoveryPlanName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryPlansClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryPlansClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Delete a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryPlansClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationRecoveryPlansClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, _ *ReplicationRecoveryPlansClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginFailoverCancel - The operation to cancel the failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Recovery plan name. +// - options - ReplicationRecoveryPlansClientBeginFailoverCancelOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginFailoverCancel +// method. +func (client *ReplicationRecoveryPlansClient) BeginFailoverCancel(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginFailoverCancelOptions) (*runtime.Poller[ReplicationRecoveryPlansClientFailoverCancelResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failoverCancel(ctx, resourceGroupName, resourceName, recoveryPlanName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryPlansClientFailoverCancelResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryPlansClientFailoverCancelResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// FailoverCancel - The operation to cancel the failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryPlansClient) failoverCancel(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginFailoverCancelOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.BeginFailoverCancel" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCancelCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCancelCreateRequest creates the FailoverCancel request. +func (client *ReplicationRecoveryPlansClient) failoverCancelCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, _ *ReplicationRecoveryPlansClientBeginFailoverCancelOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCancel" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginFailoverCommit - The operation to commit the failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Recovery plan name. +// - options - ReplicationRecoveryPlansClientBeginFailoverCommitOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginFailoverCommit +// method. +func (client *ReplicationRecoveryPlansClient) BeginFailoverCommit(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginFailoverCommitOptions) (*runtime.Poller[ReplicationRecoveryPlansClientFailoverCommitResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.failoverCommit(ctx, resourceGroupName, resourceName, recoveryPlanName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryPlansClientFailoverCommitResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryPlansClientFailoverCommitResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// FailoverCommit - The operation to commit the failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryPlansClient) failoverCommit(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginFailoverCommitOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.BeginFailoverCommit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.failoverCommitCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// failoverCommitCreateRequest creates the FailoverCommit request. +func (client *ReplicationRecoveryPlansClient) failoverCommitCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, _ *ReplicationRecoveryPlansClientBeginFailoverCommitOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCommit" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets the details of the recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Name of the recovery plan. +// - options - ReplicationRecoveryPlansClientGetOptions contains the optional parameters for the ReplicationRecoveryPlansClient.Get +// method. +func (client *ReplicationRecoveryPlansClient) Get(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, options *ReplicationRecoveryPlansClientGetOptions) (ReplicationRecoveryPlansClientGetResponse, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, options) + if err != nil { + return ReplicationRecoveryPlansClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationRecoveryPlansClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationRecoveryPlansClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationRecoveryPlansClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, _ *ReplicationRecoveryPlansClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationRecoveryPlansClient) getHandleResponse(resp *http.Response) (ReplicationRecoveryPlansClientGetResponse, error) { + result := ReplicationRecoveryPlansClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPlan); err != nil { + return ReplicationRecoveryPlansClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the recovery plans in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationRecoveryPlansClientListOptions contains the optional parameters for the ReplicationRecoveryPlansClient.NewListPager +// method. +func (client *ReplicationRecoveryPlansClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationRecoveryPlansClientListOptions) *runtime.Pager[ReplicationRecoveryPlansClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationRecoveryPlansClientListResponse]{ + More: func(page ReplicationRecoveryPlansClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationRecoveryPlansClientListResponse) (ReplicationRecoveryPlansClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationRecoveryPlansClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationRecoveryPlansClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationRecoveryPlansClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationRecoveryPlansClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationRecoveryPlansClient) listHandleResponse(resp *http.Response) (ReplicationRecoveryPlansClientListResponse, error) { + result := ReplicationRecoveryPlansClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryPlanCollection); err != nil { + return ReplicationRecoveryPlansClientListResponse{}, err + } + return result, nil +} + +// BeginPlannedFailover - The operation to start the planned failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Recovery plan name. +// - input - Failover input. +// - options - ReplicationRecoveryPlansClientBeginPlannedFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginPlannedFailover +// method. +func (client *ReplicationRecoveryPlansClient) BeginPlannedFailover(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanPlannedFailoverInput, options *ReplicationRecoveryPlansClientBeginPlannedFailoverOptions) (*runtime.Poller[ReplicationRecoveryPlansClientPlannedFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.plannedFailover(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryPlansClientPlannedFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryPlansClientPlannedFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PlannedFailover - The operation to start the planned failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryPlansClient) plannedFailover(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanPlannedFailoverInput, options *ReplicationRecoveryPlansClientBeginPlannedFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.BeginPlannedFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.plannedFailoverCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// plannedFailoverCreateRequest creates the PlannedFailover request. +func (client *ReplicationRecoveryPlansClient) plannedFailoverCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanPlannedFailoverInput, _ *ReplicationRecoveryPlansClientBeginPlannedFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/plannedFailover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginReprotect - The operation to reprotect(reverse replicate) a recovery plan. This api is for deprecated scenarios and +// no longer works. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Recovery plan name. +// - options - ReplicationRecoveryPlansClientBeginReprotectOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginReprotect +// method. +func (client *ReplicationRecoveryPlansClient) BeginReprotect(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginReprotectOptions) (*runtime.Poller[ReplicationRecoveryPlansClientReprotectResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reprotect(ctx, resourceGroupName, resourceName, recoveryPlanName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryPlansClientReprotectResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryPlansClientReprotectResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Reprotect - The operation to reprotect(reverse replicate) a recovery plan. This api is for deprecated scenarios and no +// longer works. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryPlansClient) reprotect(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, options *ReplicationRecoveryPlansClientBeginReprotectOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.BeginReprotect" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.reprotectCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// reprotectCreateRequest creates the Reprotect request. +func (client *ReplicationRecoveryPlansClient) reprotectCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, _ *ReplicationRecoveryPlansClientBeginReprotectOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/reProtect" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginTestFailover - The operation to start the test failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Recovery plan name. +// - input - Recovery plan test failover input. +// - options - ReplicationRecoveryPlansClientBeginTestFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginTestFailover +// method. +func (client *ReplicationRecoveryPlansClient) BeginTestFailover(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanTestFailoverInput, options *ReplicationRecoveryPlansClientBeginTestFailoverOptions) (*runtime.Poller[ReplicationRecoveryPlansClientTestFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.testFailover(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryPlansClientTestFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryPlansClientTestFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TestFailover - The operation to start the test failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryPlansClient) testFailover(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanTestFailoverInput, options *ReplicationRecoveryPlansClientBeginTestFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.BeginTestFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.testFailoverCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// testFailoverCreateRequest creates the TestFailover request. +func (client *ReplicationRecoveryPlansClient) testFailoverCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanTestFailoverInput, _ *ReplicationRecoveryPlansClientBeginTestFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginTestFailoverCleanup - The operation to cleanup test failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Recovery plan name. +// - input - Recovery plan test failover cleanup input. +// - options - ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginTestFailoverCleanup +// method. +func (client *ReplicationRecoveryPlansClient) BeginTestFailoverCleanup(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanTestFailoverCleanupInput, options *ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions) (*runtime.Poller[ReplicationRecoveryPlansClientTestFailoverCleanupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.testFailoverCleanup(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryPlansClientTestFailoverCleanupResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryPlansClientTestFailoverCleanupResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// TestFailoverCleanup - The operation to cleanup test failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryPlansClient) testFailoverCleanup(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanTestFailoverCleanupInput, options *ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.BeginTestFailoverCleanup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.testFailoverCleanupCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// testFailoverCleanupCreateRequest creates the TestFailoverCleanup request. +func (client *ReplicationRecoveryPlansClient) testFailoverCleanupCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanTestFailoverCleanupInput, _ *ReplicationRecoveryPlansClientBeginTestFailoverCleanupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailoverCleanup" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginUnplannedFailover - The operation to start the unplanned failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Recovery plan name. +// - input - Recovery plan unplanned failover input. +// - options - ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginUnplannedFailover +// method. +func (client *ReplicationRecoveryPlansClient) BeginUnplannedFailover(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanUnplannedFailoverInput, options *ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions) (*runtime.Poller[ReplicationRecoveryPlansClientUnplannedFailoverResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.unplannedFailover(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryPlansClientUnplannedFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryPlansClientUnplannedFailoverResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UnplannedFailover - The operation to start the unplanned failover of a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryPlansClient) unplannedFailover(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanUnplannedFailoverInput, options *ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.BeginUnplannedFailover" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.unplannedFailoverCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// unplannedFailoverCreateRequest creates the UnplannedFailover request. +func (client *ReplicationRecoveryPlansClient) unplannedFailoverCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input RecoveryPlanUnplannedFailoverInput, _ *ReplicationRecoveryPlansClientBeginUnplannedFailoverOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/unplannedFailover" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpdate - The operation to update a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - recoveryPlanName - Recovery plan name. +// - input - Update recovery plan input. +// - options - ReplicationRecoveryPlansClientBeginUpdateOptions contains the optional parameters for the ReplicationRecoveryPlansClient.BeginUpdate +// method. +func (client *ReplicationRecoveryPlansClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input UpdateRecoveryPlanInput, options *ReplicationRecoveryPlansClientBeginUpdateOptions) (*runtime.Poller[ReplicationRecoveryPlansClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryPlansClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryPlansClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - The operation to update a recovery plan. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryPlansClient) update(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input UpdateRecoveryPlanInput, options *ReplicationRecoveryPlansClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryPlansClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, recoveryPlanName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ReplicationRecoveryPlansClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, recoveryPlanName string, input UpdateRecoveryPlanInput, _ *ReplicationRecoveryPlansClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if recoveryPlanName == "" { + return nil, errors.New("parameter recoveryPlanName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{recoveryPlanName}", url.PathEscape(recoveryPlanName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationrecoveryservicesproviders_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationrecoveryservicesproviders_client.go new file mode 100644 index 00000000..c3666932 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationrecoveryservicesproviders_client.go @@ -0,0 +1,597 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationRecoveryServicesProvidersClient contains the methods for the ReplicationRecoveryServicesProviders group. +// Don't use this type directly, use NewReplicationRecoveryServicesProvidersClient() instead. +type ReplicationRecoveryServicesProvidersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationRecoveryServicesProvidersClient creates a new instance of ReplicationRecoveryServicesProvidersClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationRecoveryServicesProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationRecoveryServicesProvidersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationRecoveryServicesProvidersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - The operation to add a recovery services provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - providerName - Recovery services provider name. +// - addProviderInput - Add provider input. +// - options - ReplicationRecoveryServicesProvidersClientBeginCreateOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginCreate +// method. +func (client *ReplicationRecoveryServicesProvidersClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, addProviderInput AddRecoveryServicesProviderInput, options *ReplicationRecoveryServicesProvidersClientBeginCreateOptions) (*runtime.Poller[ReplicationRecoveryServicesProvidersClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, fabricName, providerName, addProviderInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryServicesProvidersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryServicesProvidersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to add a recovery services provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryServicesProvidersClient) create(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, addProviderInput AddRecoveryServicesProviderInput, options *ReplicationRecoveryServicesProvidersClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryServicesProvidersClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, fabricName, providerName, addProviderInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationRecoveryServicesProvidersClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, addProviderInput AddRecoveryServicesProviderInput, _ *ReplicationRecoveryServicesProvidersClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if providerName == "" { + return nil, errors.New("parameter providerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{providerName}", url.PathEscape(providerName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, addProviderInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - The operation to removes/delete(unregister) a recovery services provider from the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - providerName - Recovery services provider name. +// - options - ReplicationRecoveryServicesProvidersClientBeginDeleteOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginDelete +// method. +func (client *ReplicationRecoveryServicesProvidersClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginDeleteOptions) (*runtime.Poller[ReplicationRecoveryServicesProvidersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, fabricName, providerName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryServicesProvidersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryServicesProvidersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - The operation to removes/delete(unregister) a recovery services provider from the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryServicesProvidersClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryServicesProvidersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, fabricName, providerName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationRecoveryServicesProvidersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, _ *ReplicationRecoveryServicesProvidersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if providerName == "" { + return nil, errors.New("parameter providerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{providerName}", url.PathEscape(providerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the details of registered recovery services provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - providerName - Recovery services provider name. +// - options - ReplicationRecoveryServicesProvidersClientGetOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.Get +// method. +func (client *ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientGetOptions) (ReplicationRecoveryServicesProvidersClientGetResponse, error) { + var err error + const operationName = "ReplicationRecoveryServicesProvidersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, providerName, options) + if err != nil { + return ReplicationRecoveryServicesProvidersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationRecoveryServicesProvidersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationRecoveryServicesProvidersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationRecoveryServicesProvidersClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, _ *ReplicationRecoveryServicesProvidersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if providerName == "" { + return nil, errors.New("parameter providerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{providerName}", url.PathEscape(providerName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationRecoveryServicesProvidersClient) getHandleResponse(resp *http.Response) (ReplicationRecoveryServicesProvidersClientGetResponse, error) { + result := ReplicationRecoveryServicesProvidersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryServicesProvider); err != nil { + return ReplicationRecoveryServicesProvidersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the registered recovery services providers in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationRecoveryServicesProvidersClientListOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.NewListPager +// method. +func (client *ReplicationRecoveryServicesProvidersClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationRecoveryServicesProvidersClientListOptions) *runtime.Pager[ReplicationRecoveryServicesProvidersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationRecoveryServicesProvidersClientListResponse]{ + More: func(page ReplicationRecoveryServicesProvidersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationRecoveryServicesProvidersClientListResponse) (ReplicationRecoveryServicesProvidersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationRecoveryServicesProvidersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationRecoveryServicesProvidersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationRecoveryServicesProvidersClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationRecoveryServicesProvidersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryServicesProviders" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationRecoveryServicesProvidersClient) listHandleResponse(resp *http.Response) (ReplicationRecoveryServicesProvidersClientListResponse, error) { + result := ReplicationRecoveryServicesProvidersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryServicesProviderCollection); err != nil { + return ReplicationRecoveryServicesProvidersClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationFabricsPager - Lists the registered recovery services providers for the specified fabric. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - options - ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions contains the optional parameters for +// the ReplicationRecoveryServicesProvidersClient.NewListByReplicationFabricsPager method. +func (client *ReplicationRecoveryServicesProvidersClient) NewListByReplicationFabricsPager(resourceGroupName string, resourceName string, fabricName string, options *ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse]{ + More: func(page ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse) (ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationRecoveryServicesProvidersClient.NewListByReplicationFabricsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationFabricsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + }, nil) + if err != nil { + return ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse{}, err + } + return client.listByReplicationFabricsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. +func (client *ReplicationRecoveryServicesProvidersClient) listByReplicationFabricsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationRecoveryServicesProvidersClientListByReplicationFabricsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. +func (client *ReplicationRecoveryServicesProvidersClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse, error) { + result := ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryServicesProviderCollection); err != nil { + return ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse{}, err + } + return result, nil +} + +// BeginPurge - The operation to purge(force delete) a recovery services provider from the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - providerName - Recovery services provider name. +// - options - ReplicationRecoveryServicesProvidersClientBeginPurgeOptions contains the optional parameters for the ReplicationRecoveryServicesProvidersClient.BeginPurge +// method. +func (client *ReplicationRecoveryServicesProvidersClient) BeginPurge(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginPurgeOptions) (*runtime.Poller[ReplicationRecoveryServicesProvidersClientPurgeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.purge(ctx, resourceGroupName, resourceName, fabricName, providerName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryServicesProvidersClientPurgeResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryServicesProvidersClientPurgeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Purge - The operation to purge(force delete) a recovery services provider from the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryServicesProvidersClient) purge(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginPurgeOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryServicesProvidersClient.BeginPurge" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.purgeCreateRequest(ctx, resourceGroupName, resourceName, fabricName, providerName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// purgeCreateRequest creates the Purge request. +func (client *ReplicationRecoveryServicesProvidersClient) purgeCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, _ *ReplicationRecoveryServicesProvidersClientBeginPurgeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if providerName == "" { + return nil, errors.New("parameter providerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{providerName}", url.PathEscape(providerName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// BeginRefreshProvider - The operation to refresh the information from the recovery services provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - providerName - Recovery services provider name. +// - options - ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions contains the optional parameters for the +// ReplicationRecoveryServicesProvidersClient.BeginRefreshProvider method. +func (client *ReplicationRecoveryServicesProvidersClient) BeginRefreshProvider(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions) (*runtime.Poller[ReplicationRecoveryServicesProvidersClientRefreshProviderResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.refreshProvider(ctx, resourceGroupName, resourceName, fabricName, providerName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationRecoveryServicesProvidersClientRefreshProviderResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationRecoveryServicesProvidersClientRefreshProviderResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RefreshProvider - The operation to refresh the information from the recovery services provider. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationRecoveryServicesProvidersClient) refreshProvider(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, options *ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationRecoveryServicesProvidersClient.BeginRefreshProvider" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.refreshProviderCreateRequest(ctx, resourceGroupName, resourceName, fabricName, providerName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// refreshProviderCreateRequest creates the RefreshProvider request. +func (client *ReplicationRecoveryServicesProvidersClient) refreshProviderCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, providerName string, _ *ReplicationRecoveryServicesProvidersClientBeginRefreshProviderOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if providerName == "" { + return nil, errors.New("parameter providerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{providerName}", url.PathEscape(providerName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationstorageclassificationmappings_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationstorageclassificationmappings_client.go new file mode 100644 index 00000000..341a0b28 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationstorageclassificationmappings_client.go @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationStorageClassificationMappingsClient contains the methods for the ReplicationStorageClassificationMappings group. +// Don't use this type directly, use NewReplicationStorageClassificationMappingsClient() instead. +type ReplicationStorageClassificationMappingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationStorageClassificationMappingsClient creates a new instance of ReplicationStorageClassificationMappingsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationStorageClassificationMappingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationStorageClassificationMappingsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationStorageClassificationMappingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - The operation to create a storage classification mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - storageClassificationName - Storage classification name. +// - storageClassificationMappingName - Storage classification mapping name. +// - pairingInput - Pairing input. +// - options - ReplicationStorageClassificationMappingsClientBeginCreateOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.BeginCreate +// method. +func (client *ReplicationStorageClassificationMappingsClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, storageClassificationMappingName string, pairingInput StorageClassificationMappingInput, options *ReplicationStorageClassificationMappingsClientBeginCreateOptions) (*runtime.Poller[ReplicationStorageClassificationMappingsClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, fabricName, storageClassificationName, storageClassificationMappingName, pairingInput, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationStorageClassificationMappingsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationStorageClassificationMappingsClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to create a storage classification mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationStorageClassificationMappingsClient) create(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, storageClassificationMappingName string, pairingInput StorageClassificationMappingInput, options *ReplicationStorageClassificationMappingsClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationStorageClassificationMappingsClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, fabricName, storageClassificationName, storageClassificationMappingName, pairingInput, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationStorageClassificationMappingsClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, storageClassificationMappingName string, pairingInput StorageClassificationMappingInput, _ *ReplicationStorageClassificationMappingsClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if storageClassificationName == "" { + return nil, errors.New("parameter storageClassificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageClassificationName}", url.PathEscape(storageClassificationName)) + if storageClassificationMappingName == "" { + return nil, errors.New("parameter storageClassificationMappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageClassificationMappingName}", url.PathEscape(storageClassificationMappingName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, pairingInput); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - The operation to delete a storage classification mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - storageClassificationName - Storage classification name. +// - storageClassificationMappingName - Storage classification mapping name. +// - options - ReplicationStorageClassificationMappingsClientBeginDeleteOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.BeginDelete +// method. +func (client *ReplicationStorageClassificationMappingsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, storageClassificationMappingName string, options *ReplicationStorageClassificationMappingsClientBeginDeleteOptions) (*runtime.Poller[ReplicationStorageClassificationMappingsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, fabricName, storageClassificationName, storageClassificationMappingName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationStorageClassificationMappingsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationStorageClassificationMappingsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - The operation to delete a storage classification mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationStorageClassificationMappingsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, storageClassificationMappingName string, options *ReplicationStorageClassificationMappingsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationStorageClassificationMappingsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, fabricName, storageClassificationName, storageClassificationMappingName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationStorageClassificationMappingsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, storageClassificationMappingName string, _ *ReplicationStorageClassificationMappingsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if storageClassificationName == "" { + return nil, errors.New("parameter storageClassificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageClassificationName}", url.PathEscape(storageClassificationName)) + if storageClassificationMappingName == "" { + return nil, errors.New("parameter storageClassificationMappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageClassificationMappingName}", url.PathEscape(storageClassificationMappingName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the details of the specified storage classification mapping. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - storageClassificationName - Storage classification name. +// - storageClassificationMappingName - Storage classification mapping name. +// - options - ReplicationStorageClassificationMappingsClientGetOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.Get +// method. +func (client *ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, storageClassificationMappingName string, options *ReplicationStorageClassificationMappingsClientGetOptions) (ReplicationStorageClassificationMappingsClientGetResponse, error) { + var err error + const operationName = "ReplicationStorageClassificationMappingsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, storageClassificationName, storageClassificationMappingName, options) + if err != nil { + return ReplicationStorageClassificationMappingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationStorageClassificationMappingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationStorageClassificationMappingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationStorageClassificationMappingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, storageClassificationMappingName string, _ *ReplicationStorageClassificationMappingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if storageClassificationName == "" { + return nil, errors.New("parameter storageClassificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageClassificationName}", url.PathEscape(storageClassificationName)) + if storageClassificationMappingName == "" { + return nil, errors.New("parameter storageClassificationMappingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageClassificationMappingName}", url.PathEscape(storageClassificationMappingName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationStorageClassificationMappingsClient) getHandleResponse(resp *http.Response) (ReplicationStorageClassificationMappingsClientGetResponse, error) { + result := ReplicationStorageClassificationMappingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassificationMapping); err != nil { + return ReplicationStorageClassificationMappingsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the storage classification mappings in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationStorageClassificationMappingsClientListOptions contains the optional parameters for the ReplicationStorageClassificationMappingsClient.NewListPager +// method. +func (client *ReplicationStorageClassificationMappingsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationStorageClassificationMappingsClientListOptions) *runtime.Pager[ReplicationStorageClassificationMappingsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationStorageClassificationMappingsClientListResponse]{ + More: func(page ReplicationStorageClassificationMappingsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationStorageClassificationMappingsClientListResponse) (ReplicationStorageClassificationMappingsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationStorageClassificationMappingsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationStorageClassificationMappingsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationStorageClassificationMappingsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationStorageClassificationMappingsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassificationMappings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationStorageClassificationMappingsClient) listHandleResponse(resp *http.Response) (ReplicationStorageClassificationMappingsClientListResponse, error) { + result := ReplicationStorageClassificationMappingsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassificationMappingCollection); err != nil { + return ReplicationStorageClassificationMappingsClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationStorageClassificationsPager - Lists the storage classification mappings for the fabric. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - storageClassificationName - Storage classification name. +// - options - ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions contains the optional +// parameters for the ReplicationStorageClassificationMappingsClient.NewListByReplicationStorageClassificationsPager method. +func (client *ReplicationStorageClassificationMappingsClient) NewListByReplicationStorageClassificationsPager(resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, options *ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions) *runtime.Pager[ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse]{ + More: func(page ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse) (ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationStorageClassificationMappingsClient.NewListByReplicationStorageClassificationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationStorageClassificationsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, storageClassificationName, options) + }, nil) + if err != nil { + return ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse{}, err + } + return client.listByReplicationStorageClassificationsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationStorageClassificationsCreateRequest creates the ListByReplicationStorageClassifications request. +func (client *ReplicationStorageClassificationMappingsClient) listByReplicationStorageClassificationsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, _ *ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if storageClassificationName == "" { + return nil, errors.New("parameter storageClassificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageClassificationName}", url.PathEscape(storageClassificationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationStorageClassificationsHandleResponse handles the ListByReplicationStorageClassifications response. +func (client *ReplicationStorageClassificationMappingsClient) listByReplicationStorageClassificationsHandleResponse(resp *http.Response) (ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse, error) { + result := ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassificationMappingCollection); err != nil { + return ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationstorageclassifications_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationstorageclassifications_client.go new file mode 100644 index 00000000..43ca32ef --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationstorageclassifications_client.go @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationStorageClassificationsClient contains the methods for the ReplicationStorageClassifications group. +// Don't use this type directly, use NewReplicationStorageClassificationsClient() instead. +type ReplicationStorageClassificationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationStorageClassificationsClient creates a new instance of ReplicationStorageClassificationsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationStorageClassificationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationStorageClassificationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationStorageClassificationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the details of the specified storage classification. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - storageClassificationName - Storage classification name. +// - options - ReplicationStorageClassificationsClientGetOptions contains the optional parameters for the ReplicationStorageClassificationsClient.Get +// method. +func (client *ReplicationStorageClassificationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, options *ReplicationStorageClassificationsClientGetOptions) (ReplicationStorageClassificationsClientGetResponse, error) { + var err error + const operationName = "ReplicationStorageClassificationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, storageClassificationName, options) + if err != nil { + return ReplicationStorageClassificationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationStorageClassificationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationStorageClassificationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationStorageClassificationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, storageClassificationName string, _ *ReplicationStorageClassificationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if storageClassificationName == "" { + return nil, errors.New("parameter storageClassificationName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageClassificationName}", url.PathEscape(storageClassificationName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationStorageClassificationsClient) getHandleResponse(resp *http.Response) (ReplicationStorageClassificationsClientGetResponse, error) { + result := ReplicationStorageClassificationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassification); err != nil { + return ReplicationStorageClassificationsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the storage classifications in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationStorageClassificationsClientListOptions contains the optional parameters for the ReplicationStorageClassificationsClient.NewListPager +// method. +func (client *ReplicationStorageClassificationsClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationStorageClassificationsClientListOptions) *runtime.Pager[ReplicationStorageClassificationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationStorageClassificationsClientListResponse]{ + More: func(page ReplicationStorageClassificationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationStorageClassificationsClientListResponse) (ReplicationStorageClassificationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationStorageClassificationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationStorageClassificationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationStorageClassificationsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationStorageClassificationsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassifications" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationStorageClassificationsClient) listHandleResponse(resp *http.Response) (ReplicationStorageClassificationsClientListResponse, error) { + result := ReplicationStorageClassificationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassificationCollection); err != nil { + return ReplicationStorageClassificationsClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationFabricsPager - Lists the storage classifications available in the specified fabric. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Site name of interest. +// - options - ReplicationStorageClassificationsClientListByReplicationFabricsOptions contains the optional parameters for the +// ReplicationStorageClassificationsClient.NewListByReplicationFabricsPager method. +func (client *ReplicationStorageClassificationsClient) NewListByReplicationFabricsPager(resourceGroupName string, resourceName string, fabricName string, options *ReplicationStorageClassificationsClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationStorageClassificationsClientListByReplicationFabricsResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationStorageClassificationsClientListByReplicationFabricsResponse]{ + More: func(page ReplicationStorageClassificationsClientListByReplicationFabricsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationStorageClassificationsClientListByReplicationFabricsResponse) (ReplicationStorageClassificationsClientListByReplicationFabricsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationStorageClassificationsClient.NewListByReplicationFabricsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationFabricsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + }, nil) + if err != nil { + return ReplicationStorageClassificationsClientListByReplicationFabricsResponse{}, err + } + return client.listByReplicationFabricsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. +func (client *ReplicationStorageClassificationsClient) listByReplicationFabricsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationStorageClassificationsClientListByReplicationFabricsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. +func (client *ReplicationStorageClassificationsClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationStorageClassificationsClientListByReplicationFabricsResponse, error) { + result := ReplicationStorageClassificationsClientListByReplicationFabricsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StorageClassificationCollection); err != nil { + return ReplicationStorageClassificationsClientListByReplicationFabricsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationvaulthealth_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationvaulthealth_client.go new file mode 100644 index 00000000..77fe8688 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationvaulthealth_client.go @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationVaultHealthClient contains the methods for the ReplicationVaultHealth group. +// Don't use this type directly, use NewReplicationVaultHealthClient() instead. +type ReplicationVaultHealthClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationVaultHealthClient creates a new instance of ReplicationVaultHealthClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationVaultHealthClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationVaultHealthClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationVaultHealthClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the health details of the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationVaultHealthClientGetOptions contains the optional parameters for the ReplicationVaultHealthClient.Get +// method. +func (client *ReplicationVaultHealthClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicationVaultHealthClientGetOptions) (ReplicationVaultHealthClientGetResponse, error) { + var err error + const operationName = "ReplicationVaultHealthClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, options) + if err != nil { + return ReplicationVaultHealthClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationVaultHealthClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationVaultHealthClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationVaultHealthClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationVaultHealthClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationVaultHealthClient) getHandleResponse(resp *http.Response) (ReplicationVaultHealthClientGetResponse, error) { + result := ReplicationVaultHealthClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VaultHealthDetails); err != nil { + return ReplicationVaultHealthClientGetResponse{}, err + } + return result, nil +} + +// BeginRefresh - Refreshes health summary of the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationVaultHealthClientBeginRefreshOptions contains the optional parameters for the ReplicationVaultHealthClient.BeginRefresh +// method. +func (client *ReplicationVaultHealthClient) BeginRefresh(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicationVaultHealthClientBeginRefreshOptions) (*runtime.Poller[ReplicationVaultHealthClientRefreshResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.refresh(ctx, resourceGroupName, resourceName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationVaultHealthClientRefreshResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationVaultHealthClientRefreshResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Refresh - Refreshes health summary of the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationVaultHealthClient) refresh(ctx context.Context, resourceGroupName string, resourceName string, options *ReplicationVaultHealthClientBeginRefreshOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationVaultHealthClient.BeginRefresh" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.refreshCreateRequest(ctx, resourceGroupName, resourceName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// refreshCreateRequest creates the Refresh request. +func (client *ReplicationVaultHealthClient) refreshCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationVaultHealthClientBeginRefreshOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth/default/refresh" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationvaultsetting_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationvaultsetting_client.go new file mode 100644 index 00000000..773a8ac6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationvaultsetting_client.go @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationVaultSettingClient contains the methods for the ReplicationVaultSetting group. +// Don't use this type directly, use NewReplicationVaultSettingClient() instead. +type ReplicationVaultSettingClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationVaultSettingClient creates a new instance of ReplicationVaultSettingClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationVaultSettingClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationVaultSettingClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationVaultSettingClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - The operation to configure vault setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - vaultSettingName - Vault setting name. +// - input - Vault setting creation input. +// - options - ReplicationVaultSettingClientBeginCreateOptions contains the optional parameters for the ReplicationVaultSettingClient.BeginCreate +// method. +func (client *ReplicationVaultSettingClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, vaultSettingName string, input VaultSettingCreationInput, options *ReplicationVaultSettingClientBeginCreateOptions) (*runtime.Poller[ReplicationVaultSettingClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, vaultSettingName, input, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationVaultSettingClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationVaultSettingClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to configure vault setting. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationVaultSettingClient) create(ctx context.Context, resourceGroupName string, resourceName string, vaultSettingName string, input VaultSettingCreationInput, options *ReplicationVaultSettingClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationVaultSettingClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, vaultSettingName, input, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationVaultSettingClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, vaultSettingName string, input VaultSettingCreationInput, _ *ReplicationVaultSettingClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings/{vaultSettingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if vaultSettingName == "" { + return nil, errors.New("parameter vaultSettingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultSettingName}", url.PathEscape(vaultSettingName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, input); err != nil { + return nil, err + } + return req, nil +} + +// Get - Gets the vault setting. This includes the Migration Hub connection settings. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - vaultSettingName - Vault setting name. +// - options - ReplicationVaultSettingClientGetOptions contains the optional parameters for the ReplicationVaultSettingClient.Get +// method. +func (client *ReplicationVaultSettingClient) Get(ctx context.Context, resourceGroupName string, resourceName string, vaultSettingName string, options *ReplicationVaultSettingClientGetOptions) (ReplicationVaultSettingClientGetResponse, error) { + var err error + const operationName = "ReplicationVaultSettingClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, vaultSettingName, options) + if err != nil { + return ReplicationVaultSettingClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationVaultSettingClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationVaultSettingClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationVaultSettingClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, vaultSettingName string, _ *ReplicationVaultSettingClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings/{vaultSettingName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if vaultSettingName == "" { + return nil, errors.New("parameter vaultSettingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vaultSettingName}", url.PathEscape(vaultSettingName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationVaultSettingClient) getHandleResponse(resp *http.Response) (ReplicationVaultSettingClientGetResponse, error) { + result := ReplicationVaultSettingClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VaultSetting); err != nil { + return ReplicationVaultSettingClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets the list of vault setting. This includes the Migration Hub connection settings. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationVaultSettingClientListOptions contains the optional parameters for the ReplicationVaultSettingClient.NewListPager +// method. +func (client *ReplicationVaultSettingClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationVaultSettingClientListOptions) *runtime.Pager[ReplicationVaultSettingClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationVaultSettingClientListResponse]{ + More: func(page ReplicationVaultSettingClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationVaultSettingClientListResponse) (ReplicationVaultSettingClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationVaultSettingClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationVaultSettingClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationVaultSettingClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationVaultSettingClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationVaultSettingClient) listHandleResponse(resp *http.Response) (ReplicationVaultSettingClientListResponse, error) { + result := ReplicationVaultSettingClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VaultSettingCollection); err != nil { + return ReplicationVaultSettingClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationvcenters_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationvcenters_client.go new file mode 100644 index 00000000..211be654 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/replicationvcenters_client.go @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ReplicationvCentersClient contains the methods for the ReplicationvCenters group. +// Don't use this type directly, use NewReplicationvCentersClient() instead. +type ReplicationvCentersClient struct { + internal *arm.Client + subscriptionID string +} + +// NewReplicationvCentersClient creates a new instance of ReplicationvCentersClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewReplicationvCentersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationvCentersClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ReplicationvCentersClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - The operation to create a vCenter object.. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - vcenterName - vcenter name. +// - addVCenterRequest - The input to the add vCenter operation. +// - options - ReplicationvCentersClientBeginCreateOptions contains the optional parameters for the ReplicationvCentersClient.BeginCreate +// method. +func (client *ReplicationvCentersClient) BeginCreate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, addVCenterRequest AddVCenterRequest, options *ReplicationvCentersClientBeginCreateOptions) (*runtime.Poller[ReplicationvCentersClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, resourceName, fabricName, vcenterName, addVCenterRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationvCentersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationvCentersClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - The operation to create a vCenter object.. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationvCentersClient) create(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, addVCenterRequest AddVCenterRequest, options *ReplicationvCentersClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationvCentersClient.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, resourceName, fabricName, vcenterName, addVCenterRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *ReplicationvCentersClient) createCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, addVCenterRequest AddVCenterRequest, _ *ReplicationvCentersClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if vcenterName == "" { + return nil, errors.New("parameter vcenterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vcenterName}", url.PathEscape(vcenterName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, addVCenterRequest); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - The operation to remove(unregister) a registered vCenter server from the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - vcenterName - vcenter name. +// - options - ReplicationvCentersClientBeginDeleteOptions contains the optional parameters for the ReplicationvCentersClient.BeginDelete +// method. +func (client *ReplicationvCentersClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, options *ReplicationvCentersClientBeginDeleteOptions) (*runtime.Poller[ReplicationvCentersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, fabricName, vcenterName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationvCentersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationvCentersClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - The operation to remove(unregister) a registered vCenter server from the vault. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationvCentersClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, options *ReplicationvCentersClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationvCentersClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, fabricName, vcenterName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ReplicationvCentersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, _ *ReplicationvCentersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if vcenterName == "" { + return nil, errors.New("parameter vcenterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vcenterName}", url.PathEscape(vcenterName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + return req, nil +} + +// Get - Gets the details of a registered vCenter server(Add vCenter server). +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - vcenterName - vcenter name. +// - options - ReplicationvCentersClientGetOptions contains the optional parameters for the ReplicationvCentersClient.Get method. +func (client *ReplicationvCentersClient) Get(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, options *ReplicationvCentersClientGetOptions) (ReplicationvCentersClientGetResponse, error) { + var err error + const operationName = "ReplicationvCentersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, fabricName, vcenterName, options) + if err != nil { + return ReplicationvCentersClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ReplicationvCentersClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ReplicationvCentersClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ReplicationvCentersClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, _ *ReplicationvCentersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if vcenterName == "" { + return nil, errors.New("parameter vcenterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vcenterName}", url.PathEscape(vcenterName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ReplicationvCentersClient) getHandleResponse(resp *http.Response) (ReplicationvCentersClientGetResponse, error) { + result := ReplicationvCentersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VCenter); err != nil { + return ReplicationvCentersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the vCenter servers registered in the vault. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - ReplicationvCentersClientListOptions contains the optional parameters for the ReplicationvCentersClient.NewListPager +// method. +func (client *ReplicationvCentersClient) NewListPager(resourceGroupName string, resourceName string, options *ReplicationvCentersClientListOptions) *runtime.Pager[ReplicationvCentersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationvCentersClientListResponse]{ + More: func(page ReplicationvCentersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationvCentersClientListResponse) (ReplicationvCentersClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationvCentersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + }, nil) + if err != nil { + return ReplicationvCentersClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *ReplicationvCentersClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ReplicationvCentersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationvCenters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ReplicationvCentersClient) listHandleResponse(resp *http.Response) (ReplicationvCentersClientListResponse, error) { + result := ReplicationvCentersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VCenterCollection); err != nil { + return ReplicationvCentersClientListResponse{}, err + } + return result, nil +} + +// NewListByReplicationFabricsPager - Lists the vCenter servers registered in a fabric. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - options - ReplicationvCentersClientListByReplicationFabricsOptions contains the optional parameters for the ReplicationvCentersClient.NewListByReplicationFabricsPager +// method. +func (client *ReplicationvCentersClient) NewListByReplicationFabricsPager(resourceGroupName string, resourceName string, fabricName string, options *ReplicationvCentersClientListByReplicationFabricsOptions) *runtime.Pager[ReplicationvCentersClientListByReplicationFabricsResponse] { + return runtime.NewPager(runtime.PagingHandler[ReplicationvCentersClientListByReplicationFabricsResponse]{ + More: func(page ReplicationvCentersClientListByReplicationFabricsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ReplicationvCentersClientListByReplicationFabricsResponse) (ReplicationvCentersClientListByReplicationFabricsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ReplicationvCentersClient.NewListByReplicationFabricsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationFabricsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, options) + }, nil) + if err != nil { + return ReplicationvCentersClientListByReplicationFabricsResponse{}, err + } + return client.listByReplicationFabricsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationFabricsCreateRequest creates the ListByReplicationFabrics request. +func (client *ReplicationvCentersClient) listByReplicationFabricsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, _ *ReplicationvCentersClientListByReplicationFabricsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationFabricsHandleResponse handles the ListByReplicationFabrics response. +func (client *ReplicationvCentersClient) listByReplicationFabricsHandleResponse(resp *http.Response) (ReplicationvCentersClientListByReplicationFabricsResponse, error) { + result := ReplicationvCentersClientListByReplicationFabricsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.VCenterCollection); err != nil { + return ReplicationvCentersClientListByReplicationFabricsResponse{}, err + } + return result, nil +} + +// BeginUpdate - The operation to update a registered vCenter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - vcenterName - vcenter name. +// - updateVCenterRequest - The input to the update vCenter operation. +// - options - ReplicationvCentersClientBeginUpdateOptions contains the optional parameters for the ReplicationvCentersClient.BeginUpdate +// method. +func (client *ReplicationvCentersClient) BeginUpdate(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, updateVCenterRequest UpdateVCenterRequest, options *ReplicationvCentersClientBeginUpdateOptions) (*runtime.Poller[ReplicationvCentersClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, resourceName, fabricName, vcenterName, updateVCenterRequest, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ReplicationvCentersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ReplicationvCentersClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - The operation to update a registered vCenter. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +func (client *ReplicationvCentersClient) update(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, updateVCenterRequest UpdateVCenterRequest, options *ReplicationvCentersClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ReplicationvCentersClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, resourceName, fabricName, vcenterName, updateVCenterRequest, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ReplicationvCentersClient) updateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, vcenterName string, updateVCenterRequest UpdateVCenterRequest, _ *ReplicationvCentersClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vcenterName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if vcenterName == "" { + return nil, errors.New("parameter vcenterName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{vcenterName}", url.PathEscape(vcenterName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, updateVCenterRequest); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/responses.go new file mode 100644 index 00000000..29e65285 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/responses.go @@ -0,0 +1,921 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +// ClusterRecoveryPointClientGetResponse contains the response from method ClusterRecoveryPointClient.Get. +type ClusterRecoveryPointClientGetResponse struct { + // Recovery point. + ClusterRecoveryPoint +} + +// ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse contains the response from method ClusterRecoveryPointsClient.NewListByReplicationProtectionClusterPager. +type ClusterRecoveryPointsClientListByReplicationProtectionClusterResponse struct { + // Collection of cluster recovery point details. + ClusterRecoveryPointCollection +} + +// MigrationRecoveryPointsClientGetResponse contains the response from method MigrationRecoveryPointsClient.Get. +type MigrationRecoveryPointsClientGetResponse struct { + // Recovery point for a migration item. + MigrationRecoveryPoint +} + +// MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse contains the response from method MigrationRecoveryPointsClient.NewListByReplicationMigrationItemsPager. +type MigrationRecoveryPointsClientListByReplicationMigrationItemsResponse struct { + // Collection of migration recovery points. + MigrationRecoveryPointCollection +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Collection of ClientDiscovery details. + OperationsDiscoveryCollection +} + +// RecoveryPointsClientGetResponse contains the response from method RecoveryPointsClient.Get. +type RecoveryPointsClientGetResponse struct { + // Recovery point. + RecoveryPoint +} + +// RecoveryPointsClientListByReplicationProtectedItemsResponse contains the response from method RecoveryPointsClient.NewListByReplicationProtectedItemsPager. +type RecoveryPointsClientListByReplicationProtectedItemsResponse struct { + // Collection of recovery point details. + RecoveryPointCollection +} + +// ReplicationAlertSettingsClientCreateResponse contains the response from method ReplicationAlertSettingsClient.Create. +type ReplicationAlertSettingsClientCreateResponse struct { + // Implements the Alert class. + Alert +} + +// ReplicationAlertSettingsClientGetResponse contains the response from method ReplicationAlertSettingsClient.Get. +type ReplicationAlertSettingsClientGetResponse struct { + // Implements the Alert class. + Alert +} + +// ReplicationAlertSettingsClientListResponse contains the response from method ReplicationAlertSettingsClient.NewListPager. +type ReplicationAlertSettingsClientListResponse struct { + // Collection of alerts. + AlertCollection +} + +// ReplicationAppliancesClientListResponse contains the response from method ReplicationAppliancesClient.NewListPager. +type ReplicationAppliancesClientListResponse struct { + // Collection of appliance details. + ApplianceCollection +} + +// ReplicationEligibilityResultsClientGetResponse contains the response from method ReplicationEligibilityResultsClient.Get. +type ReplicationEligibilityResultsClientGetResponse struct { + // Replication eligibility results response model. + ReplicationEligibilityResults +} + +// ReplicationEligibilityResultsClientListResponse contains the response from method ReplicationEligibilityResultsClient.List. +type ReplicationEligibilityResultsClientListResponse struct { + // Replication eligibility results collection response model. + ReplicationEligibilityResultsCollection +} + +// ReplicationEventsClientGetResponse contains the response from method ReplicationEventsClient.Get. +type ReplicationEventsClientGetResponse struct { + // Implements the Event class. + Event +} + +// ReplicationEventsClientListResponse contains the response from method ReplicationEventsClient.NewListPager. +type ReplicationEventsClientListResponse struct { + // Collection of fabric details. + EventCollection +} + +// ReplicationFabricsClientCheckConsistencyResponse contains the response from method ReplicationFabricsClient.BeginCheckConsistency. +type ReplicationFabricsClientCheckConsistencyResponse struct { + // Fabric definition. + Fabric +} + +// ReplicationFabricsClientCreateResponse contains the response from method ReplicationFabricsClient.BeginCreate. +type ReplicationFabricsClientCreateResponse struct { + // Fabric definition. + Fabric +} + +// ReplicationFabricsClientDeleteResponse contains the response from method ReplicationFabricsClient.BeginDelete. +type ReplicationFabricsClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationFabricsClientGetResponse contains the response from method ReplicationFabricsClient.Get. +type ReplicationFabricsClientGetResponse struct { + // Fabric definition. + Fabric +} + +// ReplicationFabricsClientListResponse contains the response from method ReplicationFabricsClient.NewListPager. +type ReplicationFabricsClientListResponse struct { + // Collection of fabric details. + FabricCollection +} + +// ReplicationFabricsClientMigrateToAADResponse contains the response from method ReplicationFabricsClient.BeginMigrateToAAD. +type ReplicationFabricsClientMigrateToAADResponse struct { + // placeholder for future response values +} + +// ReplicationFabricsClientPurgeResponse contains the response from method ReplicationFabricsClient.BeginPurge. +type ReplicationFabricsClientPurgeResponse struct { + // placeholder for future response values +} + +// ReplicationFabricsClientReassociateGatewayResponse contains the response from method ReplicationFabricsClient.BeginReassociateGateway. +type ReplicationFabricsClientReassociateGatewayResponse struct { + // Fabric definition. + Fabric +} + +// ReplicationFabricsClientRemoveInfraResponse contains the response from method ReplicationFabricsClient.BeginRemoveInfra. +type ReplicationFabricsClientRemoveInfraResponse struct { + // placeholder for future response values +} + +// ReplicationFabricsClientRenewCertificateResponse contains the response from method ReplicationFabricsClient.BeginRenewCertificate. +type ReplicationFabricsClientRenewCertificateResponse struct { + // Fabric definition. + Fabric +} + +// ReplicationJobsClientCancelResponse contains the response from method ReplicationJobsClient.BeginCancel. +type ReplicationJobsClientCancelResponse struct { + // Job details. + Job +} + +// ReplicationJobsClientExportResponse contains the response from method ReplicationJobsClient.BeginExport. +type ReplicationJobsClientExportResponse struct { + // Job details. + Job +} + +// ReplicationJobsClientGetResponse contains the response from method ReplicationJobsClient.Get. +type ReplicationJobsClientGetResponse struct { + // Job details. + Job +} + +// ReplicationJobsClientListResponse contains the response from method ReplicationJobsClient.NewListPager. +type ReplicationJobsClientListResponse struct { + // Collection of jobs. + JobCollection +} + +// ReplicationJobsClientRestartResponse contains the response from method ReplicationJobsClient.BeginRestart. +type ReplicationJobsClientRestartResponse struct { + // Job details. + Job +} + +// ReplicationJobsClientResumeResponse contains the response from method ReplicationJobsClient.BeginResume. +type ReplicationJobsClientResumeResponse struct { + // Job details. + Job +} + +// ReplicationLogicalNetworksClientGetResponse contains the response from method ReplicationLogicalNetworksClient.Get. +type ReplicationLogicalNetworksClientGetResponse struct { + // Logical network data model. + LogicalNetwork +} + +// ReplicationLogicalNetworksClientListByReplicationFabricsResponse contains the response from method ReplicationLogicalNetworksClient.NewListByReplicationFabricsPager. +type ReplicationLogicalNetworksClientListByReplicationFabricsResponse struct { + // List of logical networks. + LogicalNetworkCollection +} + +// ReplicationMigrationItemsClientCreateResponse contains the response from method ReplicationMigrationItemsClient.BeginCreate. +type ReplicationMigrationItemsClientCreateResponse struct { + // Migration item. + MigrationItem +} + +// ReplicationMigrationItemsClientDeleteResponse contains the response from method ReplicationMigrationItemsClient.BeginDelete. +type ReplicationMigrationItemsClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationMigrationItemsClientGetResponse contains the response from method ReplicationMigrationItemsClient.Get. +type ReplicationMigrationItemsClientGetResponse struct { + // Migration item. + MigrationItem +} + +// ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse contains the response from method ReplicationMigrationItemsClient.NewListByReplicationProtectionContainersPager. +type ReplicationMigrationItemsClientListByReplicationProtectionContainersResponse struct { + // Migration item collection. + MigrationItemCollection +} + +// ReplicationMigrationItemsClientListResponse contains the response from method ReplicationMigrationItemsClient.NewListPager. +type ReplicationMigrationItemsClientListResponse struct { + // Migration item collection. + MigrationItemCollection +} + +// ReplicationMigrationItemsClientMigrateResponse contains the response from method ReplicationMigrationItemsClient.BeginMigrate. +type ReplicationMigrationItemsClientMigrateResponse struct { + // Migration item. + MigrationItem +} + +// ReplicationMigrationItemsClientPauseReplicationResponse contains the response from method ReplicationMigrationItemsClient.BeginPauseReplication. +type ReplicationMigrationItemsClientPauseReplicationResponse struct { + // Migration item. + MigrationItem +} + +// ReplicationMigrationItemsClientResumeReplicationResponse contains the response from method ReplicationMigrationItemsClient.BeginResumeReplication. +type ReplicationMigrationItemsClientResumeReplicationResponse struct { + // Migration item. + MigrationItem +} + +// ReplicationMigrationItemsClientResyncResponse contains the response from method ReplicationMigrationItemsClient.BeginResync. +type ReplicationMigrationItemsClientResyncResponse struct { + // Migration item. + MigrationItem +} + +// ReplicationMigrationItemsClientTestMigrateCleanupResponse contains the response from method ReplicationMigrationItemsClient.BeginTestMigrateCleanup. +type ReplicationMigrationItemsClientTestMigrateCleanupResponse struct { + // Migration item. + MigrationItem +} + +// ReplicationMigrationItemsClientTestMigrateResponse contains the response from method ReplicationMigrationItemsClient.BeginTestMigrate. +type ReplicationMigrationItemsClientTestMigrateResponse struct { + // Migration item. + MigrationItem +} + +// ReplicationMigrationItemsClientUpdateResponse contains the response from method ReplicationMigrationItemsClient.BeginUpdate. +type ReplicationMigrationItemsClientUpdateResponse struct { + // Migration item. + MigrationItem +} + +// ReplicationNetworkMappingsClientCreateResponse contains the response from method ReplicationNetworkMappingsClient.BeginCreate. +type ReplicationNetworkMappingsClientCreateResponse struct { + // Network Mapping model. Ideally it should have been possible to inherit this class from prev version in InheritedModels + // as long as there is no difference in structure or method signature. Since there were no base Models for certain fields + // and methods viz NetworkMappingProperties and Load with required return type, the class has been introduced in its entirety + // with references to base models to facilitate extensions in subsequent versions. + NetworkMapping +} + +// ReplicationNetworkMappingsClientDeleteResponse contains the response from method ReplicationNetworkMappingsClient.BeginDelete. +type ReplicationNetworkMappingsClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationNetworkMappingsClientGetResponse contains the response from method ReplicationNetworkMappingsClient.Get. +type ReplicationNetworkMappingsClientGetResponse struct { + // Network Mapping model. Ideally it should have been possible to inherit this class from prev version in InheritedModels + // as long as there is no difference in structure or method signature. Since there were no base Models for certain fields + // and methods viz NetworkMappingProperties and Load with required return type, the class has been introduced in its entirety + // with references to base models to facilitate extensions in subsequent versions. + NetworkMapping +} + +// ReplicationNetworkMappingsClientListByReplicationNetworksResponse contains the response from method ReplicationNetworkMappingsClient.NewListByReplicationNetworksPager. +type ReplicationNetworkMappingsClientListByReplicationNetworksResponse struct { + // List of network mappings. As with NetworkMapping, it should be possible to reuse a prev version of this class. It doesn't + // seem likely this class could be anything more than a slightly bespoke collection of NetworkMapping. Hence it makes sense + // to override Load with Base.NetworkMapping instead of existing CurrentVersion.NetworkMapping. + NetworkMappingCollection +} + +// ReplicationNetworkMappingsClientListResponse contains the response from method ReplicationNetworkMappingsClient.NewListPager. +type ReplicationNetworkMappingsClientListResponse struct { + // List of network mappings. As with NetworkMapping, it should be possible to reuse a prev version of this class. It doesn't + // seem likely this class could be anything more than a slightly bespoke collection of NetworkMapping. Hence it makes sense + // to override Load with Base.NetworkMapping instead of existing CurrentVersion.NetworkMapping. + NetworkMappingCollection +} + +// ReplicationNetworkMappingsClientUpdateResponse contains the response from method ReplicationNetworkMappingsClient.BeginUpdate. +type ReplicationNetworkMappingsClientUpdateResponse struct { + // Network Mapping model. Ideally it should have been possible to inherit this class from prev version in InheritedModels + // as long as there is no difference in structure or method signature. Since there were no base Models for certain fields + // and methods viz NetworkMappingProperties and Load with required return type, the class has been introduced in its entirety + // with references to base models to facilitate extensions in subsequent versions. + NetworkMapping +} + +// ReplicationNetworksClientGetResponse contains the response from method ReplicationNetworksClient.Get. +type ReplicationNetworksClientGetResponse struct { + // Network model. + Network +} + +// ReplicationNetworksClientListByReplicationFabricsResponse contains the response from method ReplicationNetworksClient.NewListByReplicationFabricsPager. +type ReplicationNetworksClientListByReplicationFabricsResponse struct { + // List of networks. + NetworkCollection +} + +// ReplicationNetworksClientListResponse contains the response from method ReplicationNetworksClient.NewListPager. +type ReplicationNetworksClientListResponse struct { + // List of networks. + NetworkCollection +} + +// ReplicationPoliciesClientCreateResponse contains the response from method ReplicationPoliciesClient.BeginCreate. +type ReplicationPoliciesClientCreateResponse struct { + // Protection profile details. + Policy +} + +// ReplicationPoliciesClientDeleteResponse contains the response from method ReplicationPoliciesClient.BeginDelete. +type ReplicationPoliciesClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationPoliciesClientGetResponse contains the response from method ReplicationPoliciesClient.Get. +type ReplicationPoliciesClientGetResponse struct { + // Protection profile details. + Policy +} + +// ReplicationPoliciesClientListResponse contains the response from method ReplicationPoliciesClient.NewListPager. +type ReplicationPoliciesClientListResponse struct { + // Protection Profile Collection details. + PolicyCollection +} + +// ReplicationPoliciesClientUpdateResponse contains the response from method ReplicationPoliciesClient.BeginUpdate. +type ReplicationPoliciesClientUpdateResponse struct { + // Protection profile details. + Policy +} + +// ReplicationProtectableItemsClientGetResponse contains the response from method ReplicationProtectableItemsClient.Get. +type ReplicationProtectableItemsClientGetResponse struct { + // Replication protected item. + ProtectableItem +} + +// ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse contains the response from method ReplicationProtectableItemsClient.NewListByReplicationProtectionContainersPager. +type ReplicationProtectableItemsClientListByReplicationProtectionContainersResponse struct { + // Protectable item collection. + ProtectableItemCollection +} + +// ReplicationProtectedItemsClientAddDisksResponse contains the response from method ReplicationProtectedItemsClient.BeginAddDisks. +type ReplicationProtectedItemsClientAddDisksResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientApplyRecoveryPointResponse contains the response from method ReplicationProtectedItemsClient.BeginApplyRecoveryPoint. +type ReplicationProtectedItemsClientApplyRecoveryPointResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientCreateResponse contains the response from method ReplicationProtectedItemsClient.BeginCreate. +type ReplicationProtectedItemsClientCreateResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientDeleteResponse contains the response from method ReplicationProtectedItemsClient.BeginDelete. +type ReplicationProtectedItemsClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationProtectedItemsClientFailoverCancelResponse contains the response from method ReplicationProtectedItemsClient.BeginFailoverCancel. +type ReplicationProtectedItemsClientFailoverCancelResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientFailoverCommitResponse contains the response from method ReplicationProtectedItemsClient.BeginFailoverCommit. +type ReplicationProtectedItemsClientFailoverCommitResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientGetResponse contains the response from method ReplicationProtectedItemsClient.Get. +type ReplicationProtectedItemsClientGetResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse contains the response from method ReplicationProtectedItemsClient.NewListByReplicationProtectionContainersPager. +type ReplicationProtectedItemsClientListByReplicationProtectionContainersResponse struct { + // Replication protected item collection. + ReplicationProtectedItemCollection +} + +// ReplicationProtectedItemsClientListResponse contains the response from method ReplicationProtectedItemsClient.NewListPager. +type ReplicationProtectedItemsClientListResponse struct { + // Replication protected item collection. + ReplicationProtectedItemCollection +} + +// ReplicationProtectedItemsClientPlannedFailoverResponse contains the response from method ReplicationProtectedItemsClient.BeginPlannedFailover. +type ReplicationProtectedItemsClientPlannedFailoverResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientPurgeResponse contains the response from method ReplicationProtectedItemsClient.BeginPurge. +type ReplicationProtectedItemsClientPurgeResponse struct { + // placeholder for future response values +} + +// ReplicationProtectedItemsClientRemoveDisksResponse contains the response from method ReplicationProtectedItemsClient.BeginRemoveDisks. +type ReplicationProtectedItemsClientRemoveDisksResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientRepairReplicationResponse contains the response from method ReplicationProtectedItemsClient.BeginRepairReplication. +type ReplicationProtectedItemsClientRepairReplicationResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientReprotectResponse contains the response from method ReplicationProtectedItemsClient.BeginReprotect. +type ReplicationProtectedItemsClientReprotectResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientResolveHealthErrorsResponse contains the response from method ReplicationProtectedItemsClient.BeginResolveHealthErrors. +type ReplicationProtectedItemsClientResolveHealthErrorsResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientSwitchProviderResponse contains the response from method ReplicationProtectedItemsClient.BeginSwitchProvider. +type ReplicationProtectedItemsClientSwitchProviderResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientTestFailoverCleanupResponse contains the response from method ReplicationProtectedItemsClient.BeginTestFailoverCleanup. +type ReplicationProtectedItemsClientTestFailoverCleanupResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientTestFailoverResponse contains the response from method ReplicationProtectedItemsClient.BeginTestFailover. +type ReplicationProtectedItemsClientTestFailoverResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientUnplannedFailoverResponse contains the response from method ReplicationProtectedItemsClient.BeginUnplannedFailover. +type ReplicationProtectedItemsClientUnplannedFailoverResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientUpdateApplianceResponse contains the response from method ReplicationProtectedItemsClient.BeginUpdateAppliance. +type ReplicationProtectedItemsClientUpdateApplianceResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientUpdateMobilityServiceResponse contains the response from method ReplicationProtectedItemsClient.BeginUpdateMobilityService. +type ReplicationProtectedItemsClientUpdateMobilityServiceResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectedItemsClientUpdateResponse contains the response from method ReplicationProtectedItemsClient.BeginUpdate. +type ReplicationProtectedItemsClientUpdateResponse struct { + // Replication protected item. + ReplicationProtectedItem +} + +// ReplicationProtectionClustersClientApplyRecoveryPointResponse contains the response from method ReplicationProtectionClustersClient.BeginApplyRecoveryPoint. +type ReplicationProtectionClustersClientApplyRecoveryPointResponse struct { + // Replication protection Cluster. + ReplicationProtectionCluster +} + +// ReplicationProtectionClustersClientCreateResponse contains the response from method ReplicationProtectionClustersClient.BeginCreate. +type ReplicationProtectionClustersClientCreateResponse struct { + // Replication protection Cluster. + ReplicationProtectionCluster +} + +// ReplicationProtectionClustersClientFailoverCommitResponse contains the response from method ReplicationProtectionClustersClient.BeginFailoverCommit. +type ReplicationProtectionClustersClientFailoverCommitResponse struct { + // Replication protection Cluster. + ReplicationProtectionCluster +} + +// ReplicationProtectionClustersClientGetOperationResultsResponse contains the response from method ReplicationProtectionClustersClient.GetOperationResults. +type ReplicationProtectionClustersClientGetOperationResultsResponse struct { + // Replication protection Cluster. + ReplicationProtectionCluster +} + +// ReplicationProtectionClustersClientGetResponse contains the response from method ReplicationProtectionClustersClient.Get. +type ReplicationProtectionClustersClientGetResponse struct { + // Replication protection Cluster. + ReplicationProtectionCluster +} + +// ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse contains the response from method ReplicationProtectionClustersClient.NewListByReplicationProtectionContainersPager. +type ReplicationProtectionClustersClientListByReplicationProtectionContainersResponse struct { + // Replication protected item collection. + ReplicationProtectionClusterCollection +} + +// ReplicationProtectionClustersClientListResponse contains the response from method ReplicationProtectionClustersClient.NewListPager. +type ReplicationProtectionClustersClientListResponse struct { + // Replication protected item collection. + ReplicationProtectionClusterCollection +} + +// ReplicationProtectionClustersClientPurgeResponse contains the response from method ReplicationProtectionClustersClient.BeginPurge. +type ReplicationProtectionClustersClientPurgeResponse struct { + // placeholder for future response values +} + +// ReplicationProtectionClustersClientRepairReplicationResponse contains the response from method ReplicationProtectionClustersClient.BeginRepairReplication. +type ReplicationProtectionClustersClientRepairReplicationResponse struct { + // Replication protection Cluster. + ReplicationProtectionCluster +} + +// ReplicationProtectionClustersClientTestFailoverCleanupResponse contains the response from method ReplicationProtectionClustersClient.BeginTestFailoverCleanup. +type ReplicationProtectionClustersClientTestFailoverCleanupResponse struct { + // Replication protection Cluster. + ReplicationProtectionCluster +} + +// ReplicationProtectionClustersClientTestFailoverResponse contains the response from method ReplicationProtectionClustersClient.BeginTestFailover. +type ReplicationProtectionClustersClientTestFailoverResponse struct { + // Replication protection Cluster. + ReplicationProtectionCluster +} + +// ReplicationProtectionClustersClientUnplannedFailoverResponse contains the response from method ReplicationProtectionClustersClient.BeginUnplannedFailover. +type ReplicationProtectionClustersClientUnplannedFailoverResponse struct { + // Replication protection Cluster. + ReplicationProtectionCluster +} + +// ReplicationProtectionContainerMappingsClientCreateResponse contains the response from method ReplicationProtectionContainerMappingsClient.BeginCreate. +type ReplicationProtectionContainerMappingsClientCreateResponse struct { + // Protection container mapping object. + ProtectionContainerMapping +} + +// ReplicationProtectionContainerMappingsClientDeleteResponse contains the response from method ReplicationProtectionContainerMappingsClient.BeginDelete. +type ReplicationProtectionContainerMappingsClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationProtectionContainerMappingsClientGetResponse contains the response from method ReplicationProtectionContainerMappingsClient.Get. +type ReplicationProtectionContainerMappingsClientGetResponse struct { + // Protection container mapping object. + ProtectionContainerMapping +} + +// ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse contains the response from method +// ReplicationProtectionContainerMappingsClient.NewListByReplicationProtectionContainersPager. +type ReplicationProtectionContainerMappingsClientListByReplicationProtectionContainersResponse struct { + // Protection container mapping collection class. + ProtectionContainerMappingCollection +} + +// ReplicationProtectionContainerMappingsClientListResponse contains the response from method ReplicationProtectionContainerMappingsClient.NewListPager. +type ReplicationProtectionContainerMappingsClientListResponse struct { + // Protection container mapping collection class. + ProtectionContainerMappingCollection +} + +// ReplicationProtectionContainerMappingsClientPurgeResponse contains the response from method ReplicationProtectionContainerMappingsClient.BeginPurge. +type ReplicationProtectionContainerMappingsClientPurgeResponse struct { + // placeholder for future response values +} + +// ReplicationProtectionContainerMappingsClientUpdateResponse contains the response from method ReplicationProtectionContainerMappingsClient.BeginUpdate. +type ReplicationProtectionContainerMappingsClientUpdateResponse struct { + // Protection container mapping object. + ProtectionContainerMapping +} + +// ReplicationProtectionContainersClientCreateResponse contains the response from method ReplicationProtectionContainersClient.BeginCreate. +type ReplicationProtectionContainersClientCreateResponse struct { + // Protection container details. + ProtectionContainer +} + +// ReplicationProtectionContainersClientDeleteResponse contains the response from method ReplicationProtectionContainersClient.BeginDelete. +type ReplicationProtectionContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationProtectionContainersClientDiscoverProtectableItemResponse contains the response from method ReplicationProtectionContainersClient.BeginDiscoverProtectableItem. +type ReplicationProtectionContainersClientDiscoverProtectableItemResponse struct { + // Protection container details. + ProtectionContainer +} + +// ReplicationProtectionContainersClientGetResponse contains the response from method ReplicationProtectionContainersClient.Get. +type ReplicationProtectionContainersClientGetResponse struct { + // Protection container details. + ProtectionContainer +} + +// ReplicationProtectionContainersClientListByReplicationFabricsResponse contains the response from method ReplicationProtectionContainersClient.NewListByReplicationFabricsPager. +type ReplicationProtectionContainersClientListByReplicationFabricsResponse struct { + // Protection Container collection. + ProtectionContainerCollection +} + +// ReplicationProtectionContainersClientListResponse contains the response from method ReplicationProtectionContainersClient.NewListPager. +type ReplicationProtectionContainersClientListResponse struct { + // Protection Container collection. + ProtectionContainerCollection +} + +// ReplicationProtectionContainersClientSwitchClusterProtectionResponse contains the response from method ReplicationProtectionContainersClient.BeginSwitchClusterProtection. +type ReplicationProtectionContainersClientSwitchClusterProtectionResponse struct { + // Protection container details. + ProtectionContainer +} + +// ReplicationProtectionContainersClientSwitchProtectionResponse contains the response from method ReplicationProtectionContainersClient.BeginSwitchProtection. +type ReplicationProtectionContainersClientSwitchProtectionResponse struct { + // Protection container details. + ProtectionContainer +} + +// ReplicationProtectionIntentsClientCreateResponse contains the response from method ReplicationProtectionIntentsClient.Create. +type ReplicationProtectionIntentsClientCreateResponse struct { + // Replication protection intent. + ReplicationProtectionIntent +} + +// ReplicationProtectionIntentsClientGetResponse contains the response from method ReplicationProtectionIntentsClient.Get. +type ReplicationProtectionIntentsClientGetResponse struct { + // Replication protection intent. + ReplicationProtectionIntent +} + +// ReplicationProtectionIntentsClientListResponse contains the response from method ReplicationProtectionIntentsClient.NewListPager. +type ReplicationProtectionIntentsClientListResponse struct { + // Replication protection intent objects collection. + ReplicationProtectionIntentCollection +} + +// ReplicationRecoveryPlansClientCreateResponse contains the response from method ReplicationRecoveryPlansClient.BeginCreate. +type ReplicationRecoveryPlansClientCreateResponse struct { + // Recovery plan details. + RecoveryPlan +} + +// ReplicationRecoveryPlansClientDeleteResponse contains the response from method ReplicationRecoveryPlansClient.BeginDelete. +type ReplicationRecoveryPlansClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationRecoveryPlansClientFailoverCancelResponse contains the response from method ReplicationRecoveryPlansClient.BeginFailoverCancel. +type ReplicationRecoveryPlansClientFailoverCancelResponse struct { + // Recovery plan details. + RecoveryPlan +} + +// ReplicationRecoveryPlansClientFailoverCommitResponse contains the response from method ReplicationRecoveryPlansClient.BeginFailoverCommit. +type ReplicationRecoveryPlansClientFailoverCommitResponse struct { + // Recovery plan details. + RecoveryPlan +} + +// ReplicationRecoveryPlansClientGetResponse contains the response from method ReplicationRecoveryPlansClient.Get. +type ReplicationRecoveryPlansClientGetResponse struct { + // Recovery plan details. + RecoveryPlan +} + +// ReplicationRecoveryPlansClientListResponse contains the response from method ReplicationRecoveryPlansClient.NewListPager. +type ReplicationRecoveryPlansClientListResponse struct { + // Recovery plan collection details. + RecoveryPlanCollection +} + +// ReplicationRecoveryPlansClientPlannedFailoverResponse contains the response from method ReplicationRecoveryPlansClient.BeginPlannedFailover. +type ReplicationRecoveryPlansClientPlannedFailoverResponse struct { + // Recovery plan details. + RecoveryPlan +} + +// ReplicationRecoveryPlansClientReprotectResponse contains the response from method ReplicationRecoveryPlansClient.BeginReprotect. +type ReplicationRecoveryPlansClientReprotectResponse struct { + // Recovery plan details. + RecoveryPlan +} + +// ReplicationRecoveryPlansClientTestFailoverCleanupResponse contains the response from method ReplicationRecoveryPlansClient.BeginTestFailoverCleanup. +type ReplicationRecoveryPlansClientTestFailoverCleanupResponse struct { + // Recovery plan details. + RecoveryPlan +} + +// ReplicationRecoveryPlansClientTestFailoverResponse contains the response from method ReplicationRecoveryPlansClient.BeginTestFailover. +type ReplicationRecoveryPlansClientTestFailoverResponse struct { + // Recovery plan details. + RecoveryPlan +} + +// ReplicationRecoveryPlansClientUnplannedFailoverResponse contains the response from method ReplicationRecoveryPlansClient.BeginUnplannedFailover. +type ReplicationRecoveryPlansClientUnplannedFailoverResponse struct { + // Recovery plan details. + RecoveryPlan +} + +// ReplicationRecoveryPlansClientUpdateResponse contains the response from method ReplicationRecoveryPlansClient.BeginUpdate. +type ReplicationRecoveryPlansClientUpdateResponse struct { + // Recovery plan details. + RecoveryPlan +} + +// ReplicationRecoveryServicesProvidersClientCreateResponse contains the response from method ReplicationRecoveryServicesProvidersClient.BeginCreate. +type ReplicationRecoveryServicesProvidersClientCreateResponse struct { + // Provider details. + RecoveryServicesProvider +} + +// ReplicationRecoveryServicesProvidersClientDeleteResponse contains the response from method ReplicationRecoveryServicesProvidersClient.BeginDelete. +type ReplicationRecoveryServicesProvidersClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationRecoveryServicesProvidersClientGetResponse contains the response from method ReplicationRecoveryServicesProvidersClient.Get. +type ReplicationRecoveryServicesProvidersClientGetResponse struct { + // Provider details. + RecoveryServicesProvider +} + +// ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse contains the response from method ReplicationRecoveryServicesProvidersClient.NewListByReplicationFabricsPager. +type ReplicationRecoveryServicesProvidersClientListByReplicationFabricsResponse struct { + // Collection of providers. + RecoveryServicesProviderCollection +} + +// ReplicationRecoveryServicesProvidersClientListResponse contains the response from method ReplicationRecoveryServicesProvidersClient.NewListPager. +type ReplicationRecoveryServicesProvidersClientListResponse struct { + // Collection of providers. + RecoveryServicesProviderCollection +} + +// ReplicationRecoveryServicesProvidersClientPurgeResponse contains the response from method ReplicationRecoveryServicesProvidersClient.BeginPurge. +type ReplicationRecoveryServicesProvidersClientPurgeResponse struct { + // placeholder for future response values +} + +// ReplicationRecoveryServicesProvidersClientRefreshProviderResponse contains the response from method ReplicationRecoveryServicesProvidersClient.BeginRefreshProvider. +type ReplicationRecoveryServicesProvidersClientRefreshProviderResponse struct { + // Provider details. + RecoveryServicesProvider +} + +// ReplicationStorageClassificationMappingsClientCreateResponse contains the response from method ReplicationStorageClassificationMappingsClient.BeginCreate. +type ReplicationStorageClassificationMappingsClientCreateResponse struct { + // Storage mapping object. + StorageClassificationMapping +} + +// ReplicationStorageClassificationMappingsClientDeleteResponse contains the response from method ReplicationStorageClassificationMappingsClient.BeginDelete. +type ReplicationStorageClassificationMappingsClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationStorageClassificationMappingsClientGetResponse contains the response from method ReplicationStorageClassificationMappingsClient.Get. +type ReplicationStorageClassificationMappingsClientGetResponse struct { + // Storage mapping object. + StorageClassificationMapping +} + +// ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse contains the response from +// method ReplicationStorageClassificationMappingsClient.NewListByReplicationStorageClassificationsPager. +type ReplicationStorageClassificationMappingsClientListByReplicationStorageClassificationsResponse struct { + // Collection of storage mapping details. + StorageClassificationMappingCollection +} + +// ReplicationStorageClassificationMappingsClientListResponse contains the response from method ReplicationStorageClassificationMappingsClient.NewListPager. +type ReplicationStorageClassificationMappingsClientListResponse struct { + // Collection of storage mapping details. + StorageClassificationMappingCollection +} + +// ReplicationStorageClassificationsClientGetResponse contains the response from method ReplicationStorageClassificationsClient.Get. +type ReplicationStorageClassificationsClientGetResponse struct { + // Storage object definition. + StorageClassification +} + +// ReplicationStorageClassificationsClientListByReplicationFabricsResponse contains the response from method ReplicationStorageClassificationsClient.NewListByReplicationFabricsPager. +type ReplicationStorageClassificationsClientListByReplicationFabricsResponse struct { + // Collection of storage details. + StorageClassificationCollection +} + +// ReplicationStorageClassificationsClientListResponse contains the response from method ReplicationStorageClassificationsClient.NewListPager. +type ReplicationStorageClassificationsClientListResponse struct { + // Collection of storage details. + StorageClassificationCollection +} + +// ReplicationVaultHealthClientGetResponse contains the response from method ReplicationVaultHealthClient.Get. +type ReplicationVaultHealthClientGetResponse struct { + // Vault health details definition. + VaultHealthDetails +} + +// ReplicationVaultHealthClientRefreshResponse contains the response from method ReplicationVaultHealthClient.BeginRefresh. +type ReplicationVaultHealthClientRefreshResponse struct { + // Vault health details definition. + VaultHealthDetails +} + +// ReplicationVaultSettingClientCreateResponse contains the response from method ReplicationVaultSettingClient.BeginCreate. +type ReplicationVaultSettingClientCreateResponse struct { + // Vault setting. + VaultSetting +} + +// ReplicationVaultSettingClientGetResponse contains the response from method ReplicationVaultSettingClient.Get. +type ReplicationVaultSettingClientGetResponse struct { + // Vault setting. + VaultSetting +} + +// ReplicationVaultSettingClientListResponse contains the response from method ReplicationVaultSettingClient.NewListPager. +type ReplicationVaultSettingClientListResponse struct { + // Vault setting collection. + VaultSettingCollection +} + +// ReplicationvCentersClientCreateResponse contains the response from method ReplicationvCentersClient.BeginCreate. +type ReplicationvCentersClientCreateResponse struct { + // vCenter definition. + VCenter +} + +// ReplicationvCentersClientDeleteResponse contains the response from method ReplicationvCentersClient.BeginDelete. +type ReplicationvCentersClientDeleteResponse struct { + // placeholder for future response values +} + +// ReplicationvCentersClientGetResponse contains the response from method ReplicationvCentersClient.Get. +type ReplicationvCentersClientGetResponse struct { + // vCenter definition. + VCenter +} + +// ReplicationvCentersClientListByReplicationFabricsResponse contains the response from method ReplicationvCentersClient.NewListByReplicationFabricsPager. +type ReplicationvCentersClientListByReplicationFabricsResponse struct { + // Collection of vCenter details. + VCenterCollection +} + +// ReplicationvCentersClientListResponse contains the response from method ReplicationvCentersClient.NewListPager. +type ReplicationvCentersClientListResponse struct { + // Collection of vCenter details. + VCenterCollection +} + +// ReplicationvCentersClientUpdateResponse contains the response from method ReplicationvCentersClient.BeginUpdate. +type ReplicationvCentersClientUpdateResponse struct { + // vCenter definition. + VCenter +} + +// SupportedOperatingSystemsClientGetResponse contains the response from method SupportedOperatingSystemsClient.Get. +type SupportedOperatingSystemsClientGetResponse struct { + // Supported operating systems. + SupportedOperatingSystems +} + +// TargetComputeSizesClientListByReplicationProtectedItemsResponse contains the response from method TargetComputeSizesClient.NewListByReplicationProtectedItemsPager. +type TargetComputeSizesClientListByReplicationProtectedItemsResponse struct { + // Target compute size collection. + TargetComputeSizeCollection +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/supportedoperatingsystems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/supportedoperatingsystems_client.go new file mode 100644 index 00000000..42407dc4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/supportedoperatingsystems_client.go @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SupportedOperatingSystemsClient contains the methods for the SupportedOperatingSystems group. +// Don't use this type directly, use NewSupportedOperatingSystemsClient() instead. +type SupportedOperatingSystemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSupportedOperatingSystemsClient creates a new instance of SupportedOperatingSystemsClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSupportedOperatingSystemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SupportedOperatingSystemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SupportedOperatingSystemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the data of supported operating systems by SRS. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - options - SupportedOperatingSystemsClientGetOptions contains the optional parameters for the SupportedOperatingSystemsClient.Get +// method. +func (client *SupportedOperatingSystemsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *SupportedOperatingSystemsClientGetOptions) (SupportedOperatingSystemsClientGetResponse, error) { + var err error + const operationName = "SupportedOperatingSystemsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, options) + if err != nil { + return SupportedOperatingSystemsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return SupportedOperatingSystemsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SupportedOperatingSystemsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *SupportedOperatingSystemsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *SupportedOperatingSystemsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationSupportedOperatingSystems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + if options != nil && options.InstanceType != nil { + reqQP.Set("instanceType", *options.InstanceType) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SupportedOperatingSystemsClient) getHandleResponse(resp *http.Response) (SupportedOperatingSystemsClientGetResponse, error) { + result := SupportedOperatingSystemsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.SupportedOperatingSystems); err != nil { + return SupportedOperatingSystemsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/targetcomputesizes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/targetcomputesizes_client.go new file mode 100644 index 00000000..d5bd6744 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/targetcomputesizes_client.go @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// TargetComputeSizesClient contains the methods for the TargetComputeSizes group. +// Don't use this type directly, use NewTargetComputeSizesClient() instead. +type TargetComputeSizesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTargetComputeSizesClient creates a new instance of TargetComputeSizesClient with the specified values. +// - subscriptionID - The subscription Id. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTargetComputeSizesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TargetComputeSizesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TargetComputeSizesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByReplicationProtectedItemsPager - Lists the available target compute sizes for a replication protected item. +// +// Generated from API version 2025-01-01 +// - resourceGroupName - The name of the resource group where the recovery services vault is present. +// - resourceName - The name of the recovery services vault. +// - fabricName - Fabric name. +// - protectionContainerName - protection container name. +// - replicatedProtectedItemName - Replication protected item name. +// - options - TargetComputeSizesClientListByReplicationProtectedItemsOptions contains the optional parameters for the TargetComputeSizesClient.NewListByReplicationProtectedItemsPager +// method. +func (client *TargetComputeSizesClient) NewListByReplicationProtectedItemsPager(resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, options *TargetComputeSizesClientListByReplicationProtectedItemsOptions) *runtime.Pager[TargetComputeSizesClientListByReplicationProtectedItemsResponse] { + return runtime.NewPager(runtime.PagingHandler[TargetComputeSizesClientListByReplicationProtectedItemsResponse]{ + More: func(page TargetComputeSizesClientListByReplicationProtectedItemsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TargetComputeSizesClientListByReplicationProtectedItemsResponse) (TargetComputeSizesClientListByReplicationProtectedItemsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TargetComputeSizesClient.NewListByReplicationProtectedItemsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByReplicationProtectedItemsCreateRequest(ctx, resourceGroupName, resourceName, fabricName, protectionContainerName, replicatedProtectedItemName, options) + }, nil) + if err != nil { + return TargetComputeSizesClientListByReplicationProtectedItemsResponse{}, err + } + return client.listByReplicationProtectedItemsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByReplicationProtectedItemsCreateRequest creates the ListByReplicationProtectedItems request. +func (client *TargetComputeSizesClient) listByReplicationProtectedItemsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, fabricName string, protectionContainerName string, replicatedProtectedItemName string, _ *TargetComputeSizesClientListByReplicationProtectedItemsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/targetComputeSizes" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if fabricName == "" { + return nil, errors.New("parameter fabricName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{fabricName}", url.PathEscape(fabricName)) + if protectionContainerName == "" { + return nil, errors.New("parameter protectionContainerName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{protectionContainerName}", url.PathEscape(protectionContainerName)) + if replicatedProtectedItemName == "" { + return nil, errors.New("parameter replicatedProtectedItemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{replicatedProtectedItemName}", url.PathEscape(replicatedProtectedItemName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2025-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByReplicationProtectedItemsHandleResponse handles the ListByReplicationProtectedItems response. +func (client *TargetComputeSizesClient) listByReplicationProtectedItemsHandleResponse(resp *http.Response) (TargetComputeSizesClientListByReplicationProtectedItemsResponse, error) { + result := TargetComputeSizesClientListByReplicationProtectedItemsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TargetComputeSizeCollection); err != nil { + return TargetComputeSizesClientListByReplicationProtectedItemsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/time_rfc3339.go new file mode 100644 index 00000000..6a39a990 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2/time_rfc3339.go @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armrecoveryservicessiterecovery + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + if len(data) == 0 { + return nil + } + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/CHANGELOG.md deleted file mode 100644 index 5bd9deda..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/CHANGELOG.md +++ /dev/null @@ -1,303 +0,0 @@ -# Release History - -## 1.0.0 (2022-05-18) -### Breaking Changes - -- Function `*Client.BeginCreate` return value(s) have been changed from `(*armruntime.Poller[ClientCreateResponse], error)` to `(*runtime.Poller[ClientCreateResponse], error)` -- Function `DeploymentScriptListResult.MarshalJSON` has been removed -- Function `ScriptLogsList.MarshalJSON` has been removed - - -## 0.5.0 (2022-04-18) -### Breaking Changes - -- Function `*Client.ListByResourceGroup` has been removed -- Function `*Client.ListBySubscription` has been removed - -### Features Added - -- New function `*Client.NewListBySubscriptionPager(*ClientListBySubscriptionOptions) *runtime.Pager[ClientListBySubscriptionResponse]` -- New function `*Client.NewListByResourceGroupPager(string, *ClientListByResourceGroupOptions) *runtime.Pager[ClientListByResourceGroupResponse]` - - -## 0.4.0 (2022-04-14) -### Breaking Changes - -- Function `*Client.ListByResourceGroup` return value(s) have been changed from `(*ClientListByResourceGroupPager)` to `(*runtime.Pager[ClientListByResourceGroupResponse])` -- Function `NewClient` return value(s) have been changed from `(*Client)` to `(*Client, error)` -- Function `*Client.BeginCreate` return value(s) have been changed from `(ClientCreatePollerResponse, error)` to `(*armruntime.Poller[ClientCreateResponse], error)` -- Function `*Client.ListBySubscription` return value(s) have been changed from `(*ClientListBySubscriptionPager)` to `(*runtime.Pager[ClientListBySubscriptionResponse])` -- Function `*ClientUpdateResult.UnmarshalJSON` has been removed -- Function `*ClientCreatePoller.Done` has been removed -- Function `CleanupOptions.ToPtr` has been removed -- Function `ScriptProvisioningState.ToPtr` has been removed -- Function `*ClientListBySubscriptionPager.Err` has been removed -- Function `*ClientCreatePoller.Poll` has been removed -- Function `*ClientCreatePollerResponse.Resume` has been removed -- Function `*ClientGetResult.UnmarshalJSON` has been removed -- Function `ManagedServiceIdentityType.ToPtr` has been removed -- Function `*ClientListByResourceGroupPager.PageResponse` has been removed -- Function `ClientCreatePollerResponse.PollUntilDone` has been removed -- Function `*ClientListBySubscriptionPager.PageResponse` has been removed -- Function `*ClientCreatePoller.FinalResponse` has been removed -- Function `*ClientListBySubscriptionPager.NextPage` has been removed -- Function `*ClientCreateResult.UnmarshalJSON` has been removed -- Function `*ClientListByResourceGroupPager.Err` has been removed -- Function `*ClientCreatePoller.ResumeToken` has been removed -- Function `*ClientListByResourceGroupPager.NextPage` has been removed -- Function `CreatedByType.ToPtr` has been removed -- Function `ScriptType.ToPtr` has been removed -- Struct `ClientCreatePoller` has been removed -- Struct `ClientCreatePollerResponse` has been removed -- Struct `ClientCreateResult` has been removed -- Struct `ClientGetLogsDefaultResult` has been removed -- Struct `ClientGetLogsResult` has been removed -- Struct `ClientGetResult` has been removed -- Struct `ClientListByResourceGroupPager` has been removed -- Struct `ClientListByResourceGroupResult` has been removed -- Struct `ClientListBySubscriptionPager` has been removed -- Struct `ClientListBySubscriptionResult` has been removed -- Struct `ClientUpdateResult` has been removed -- Field `ClientGetLogsDefaultResult` of struct `ClientGetLogsDefaultResponse` has been removed -- Field `RawResponse` of struct `ClientGetLogsDefaultResponse` has been removed -- Field `RawResponse` of struct `ClientDeleteResponse` has been removed -- Field `ClientListByResourceGroupResult` of struct `ClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ClientListByResourceGroupResponse` has been removed -- Field `ClientGetResult` of struct `ClientGetResponse` has been removed -- Field `RawResponse` of struct `ClientGetResponse` has been removed -- Field `ClientCreateResult` of struct `ClientCreateResponse` has been removed -- Field `RawResponse` of struct `ClientCreateResponse` has been removed -- Field `ClientListBySubscriptionResult` of struct `ClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `ClientListBySubscriptionResponse` has been removed -- Field `ClientGetLogsResult` of struct `ClientGetLogsResponse` has been removed -- Field `RawResponse` of struct `ClientGetLogsResponse` has been removed -- Field `ClientUpdateResult` of struct `ClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ClientUpdateResponse` has been removed - -### Features Added - -- New function `*ClientUpdateResponse.UnmarshalJSON([]byte) error` -- New function `*ClientCreateResponse.UnmarshalJSON([]byte) error` -- New function `*ClientGetResponse.UnmarshalJSON([]byte) error` -- New struct `Error` -- New anonymous field `DeploymentScriptClassification` in struct `ClientGetResponse` -- New anonymous field `ScriptLog` in struct `ClientGetLogsDefaultResponse` -- New anonymous field `DeploymentScriptListResult` in struct `ClientListByResourceGroupResponse` -- New anonymous field `ScriptLogsList` in struct `ClientGetLogsResponse` -- New anonymous field `DeploymentScriptListResult` in struct `ClientListBySubscriptionResponse` -- New anonymous field `DeploymentScriptClassification` in struct `ClientCreateResponse` -- New anonymous field `DeploymentScriptClassification` in struct `ClientUpdateResponse` -- New field `ResumeToken` in struct `ClientBeginCreateOptions` - - -## 0.3.1 (2022-02-22) - -### Other Changes - -- Remove the go_mod_tidy_hack.go file. - -## 0.3.0 (2022-02-16) -### Breaking Changes - -- Type of `AzurePowerShellScriptProperties.Outputs` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `DeploymentScriptPropertiesBase.Outputs` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `AzureCliScriptProperties.Outputs` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Type of `ErrorAdditionalInfo.Info` has been changed from `map[string]interface{}` to `interface{}` -- Struct `Error` has been removed - - -## 0.2.0 (2022-01-13) -### Breaking Changes - -- Function `*DeploymentScriptsClient.GetLogsDefault` has been removed -- Function `*DeploymentScriptsCreatePoller.Done` has been removed -- Function `*DeploymentScriptsClient.ListBySubscription` has been removed -- Function `*DeploymentScriptsCreatePoller.Poll` has been removed -- Function `*DeploymentScript.UnmarshalJSON` has been removed -- Function `*DeploymentScriptsClient.BeginCreate` has been removed -- Function `DeploymentScriptsCreatePollerResponse.PollUntilDone` has been removed -- Function `*DeploymentScriptsListBySubscriptionPager.PageResponse` has been removed -- Function `*DeploymentScriptsListByResourceGroupPager.Err` has been removed -- Function `ScriptLog.MarshalJSON` has been removed -- Function `*DeploymentScriptsGetResult.UnmarshalJSON` has been removed -- Function `NewDeploymentScriptsClient` has been removed -- Function `*DeploymentScriptsCreatePoller.ResumeToken` has been removed -- Function `*ScriptLog.UnmarshalJSON` has been removed -- Function `AzureResourceBase.MarshalJSON` has been removed -- Function `*DeploymentScriptUpdateParameter.UnmarshalJSON` has been removed -- Function `DeploymentScriptsError.Error` has been removed -- Function `*DeploymentScriptsListBySubscriptionPager.NextPage` has been removed -- Function `*DeploymentScriptsListByResourceGroupPager.PageResponse` has been removed -- Function `*DeploymentScriptsClient.Get` has been removed -- Function `*DeploymentScriptsCreatePollerResponse.Resume` has been removed -- Function `*DeploymentScriptsListBySubscriptionPager.Err` has been removed -- Function `*DeploymentScriptsUpdateResult.UnmarshalJSON` has been removed -- Function `*AzureResourceBase.UnmarshalJSON` has been removed -- Function `*DeploymentScriptsClient.Delete` has been removed -- Function `*DeploymentScriptsClient.Update` has been removed -- Function `*DeploymentScriptsCreateResult.UnmarshalJSON` has been removed -- Function `*DeploymentScriptsCreatePoller.FinalResponse` has been removed -- Function `*DeploymentScriptsListByResourceGroupPager.NextPage` has been removed -- Function `*DeploymentScriptsClient.GetLogs` has been removed -- Function `*DeploymentScriptsClient.ListByResourceGroup` has been removed -- Struct `DeploymentScriptsBeginCreateOptions` has been removed -- Struct `DeploymentScriptsClient` has been removed -- Struct `DeploymentScriptsCreatePoller` has been removed -- Struct `DeploymentScriptsCreatePollerResponse` has been removed -- Struct `DeploymentScriptsCreateResponse` has been removed -- Struct `DeploymentScriptsCreateResult` has been removed -- Struct `DeploymentScriptsDeleteOptions` has been removed -- Struct `DeploymentScriptsDeleteResponse` has been removed -- Struct `DeploymentScriptsError` has been removed -- Struct `DeploymentScriptsGetLogsDefaultOptions` has been removed -- Struct `DeploymentScriptsGetLogsDefaultResponse` has been removed -- Struct `DeploymentScriptsGetLogsDefaultResult` has been removed -- Struct `DeploymentScriptsGetLogsOptions` has been removed -- Struct `DeploymentScriptsGetLogsResponse` has been removed -- Struct `DeploymentScriptsGetLogsResult` has been removed -- Struct `DeploymentScriptsGetOptions` has been removed -- Struct `DeploymentScriptsGetResponse` has been removed -- Struct `DeploymentScriptsGetResult` has been removed -- Struct `DeploymentScriptsListByResourceGroupOptions` has been removed -- Struct `DeploymentScriptsListByResourceGroupPager` has been removed -- Struct `DeploymentScriptsListByResourceGroupResponse` has been removed -- Struct `DeploymentScriptsListByResourceGroupResult` has been removed -- Struct `DeploymentScriptsListBySubscriptionOptions` has been removed -- Struct `DeploymentScriptsListBySubscriptionPager` has been removed -- Struct `DeploymentScriptsListBySubscriptionResponse` has been removed -- Struct `DeploymentScriptsListBySubscriptionResult` has been removed -- Struct `DeploymentScriptsUpdateOptions` has been removed -- Struct `DeploymentScriptsUpdateResponse` has been removed -- Struct `DeploymentScriptsUpdateResult` has been removed -- Field `DeploymentScriptPropertiesBase` of struct `AzurePowerShellScriptProperties` has been removed -- Field `ScriptConfigurationBase` of struct `AzurePowerShellScriptProperties` has been removed -- Field `AzureResourceBase` of struct `DeploymentScriptUpdateParameter` has been removed -- Field `DeploymentScript` of struct `AzureCliScript` has been removed -- Field `AzureResourceBase` of struct `DeploymentScript` has been removed -- Field `AzureResourceBase` of struct `ScriptLog` has been removed -- Field `DeploymentScriptPropertiesBase` of struct `AzureCliScriptProperties` has been removed -- Field `ScriptConfigurationBase` of struct `AzureCliScriptProperties` has been removed -- Field `DeploymentScript` of struct `AzurePowerShellScript` has been removed - -### Features Added - -- New function `*Client.ListByResourceGroup(string, *ClientListByResourceGroupOptions) *ClientListByResourceGroupPager` -- New function `*ClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `NewClient(string, azcore.TokenCredential, *arm.ClientOptions) *Client` -- New function `ClientCreatePollerResponse.PollUntilDone(context.Context, time.Duration) (ClientCreateResponse, error)` -- New function `*ClientCreatePollerResponse.Resume(context.Context, *Client, string) error` -- New function `*Client.GetLogsDefault(context.Context, string, string, *ClientGetLogsDefaultOptions) (ClientGetLogsDefaultResponse, error)` -- New function `*ClientCreatePoller.FinalResponse(context.Context) (ClientCreateResponse, error)` -- New function `*ClientCreateResult.UnmarshalJSON([]byte) error` -- New function `*ClientCreatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ClientListBySubscriptionPager.Err() error` -- New function `*ClientCreatePoller.Done() bool` -- New function `*ClientGetResult.UnmarshalJSON([]byte) error` -- New function `*Client.Update(context.Context, string, string, *ClientUpdateOptions) (ClientUpdateResponse, error)` -- New function `*ClientListBySubscriptionPager.PageResponse() ClientListBySubscriptionResponse` -- New function `DeploymentScript.MarshalJSON() ([]byte, error)` -- New function `*AzurePowerShellScript.GetDeploymentScript() *DeploymentScript` -- New function `*ClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*ClientCreatePoller.ResumeToken() (string, error)` -- New function `*ClientListByResourceGroupPager.Err() error` -- New function `*Client.Get(context.Context, string, string, *ClientGetOptions) (ClientGetResponse, error)` -- New function `*ClientUpdateResult.UnmarshalJSON([]byte) error` -- New function `*Client.ListBySubscription(*ClientListBySubscriptionOptions) *ClientListBySubscriptionPager` -- New function `*Client.Delete(context.Context, string, string, *ClientDeleteOptions) (ClientDeleteResponse, error)` -- New function `*ClientListByResourceGroupPager.PageResponse() ClientListByResourceGroupResponse` -- New function `*Client.GetLogs(context.Context, string, string, *ClientGetLogsOptions) (ClientGetLogsResponse, error)` -- New function `*Client.BeginCreate(context.Context, string, string, DeploymentScriptClassification, *ClientBeginCreateOptions) (ClientCreatePollerResponse, error)` -- New function `*AzureCliScript.GetDeploymentScript() *DeploymentScript` -- New struct `Client` -- New struct `ClientBeginCreateOptions` -- New struct `ClientCreatePoller` -- New struct `ClientCreatePollerResponse` -- New struct `ClientCreateResponse` -- New struct `ClientCreateResult` -- New struct `ClientDeleteOptions` -- New struct `ClientDeleteResponse` -- New struct `ClientGetLogsDefaultOptions` -- New struct `ClientGetLogsDefaultResponse` -- New struct `ClientGetLogsDefaultResult` -- New struct `ClientGetLogsOptions` -- New struct `ClientGetLogsResponse` -- New struct `ClientGetLogsResult` -- New struct `ClientGetOptions` -- New struct `ClientGetResponse` -- New struct `ClientGetResult` -- New struct `ClientListByResourceGroupOptions` -- New struct `ClientListByResourceGroupPager` -- New struct `ClientListByResourceGroupResponse` -- New struct `ClientListByResourceGroupResult` -- New struct `ClientListBySubscriptionOptions` -- New struct `ClientListBySubscriptionPager` -- New struct `ClientListBySubscriptionResponse` -- New struct `ClientListBySubscriptionResult` -- New struct `ClientUpdateOptions` -- New struct `ClientUpdateResponse` -- New struct `ClientUpdateResult` -- New struct `Error` -- New field `Tags` in struct `AzureCliScript` -- New field `SystemData` in struct `AzureCliScript` -- New field `Location` in struct `AzureCliScript` -- New field `ID` in struct `AzureCliScript` -- New field `Name` in struct `AzureCliScript` -- New field `Type` in struct `AzureCliScript` -- New field `Kind` in struct `AzureCliScript` -- New field `Identity` in struct `AzureCliScript` -- New field `Location` in struct `AzurePowerShellScript` -- New field `Kind` in struct `AzurePowerShellScript` -- New field `SystemData` in struct `AzurePowerShellScript` -- New field `Identity` in struct `AzurePowerShellScript` -- New field `Tags` in struct `AzurePowerShellScript` -- New field `ID` in struct `AzurePowerShellScript` -- New field `Name` in struct `AzurePowerShellScript` -- New field `Type` in struct `AzurePowerShellScript` -- New field `RetentionInterval` in struct `AzureCliScriptProperties` -- New field `Arguments` in struct `AzureCliScriptProperties` -- New field `ScriptContent` in struct `AzureCliScriptProperties` -- New field `EnvironmentVariables` in struct `AzureCliScriptProperties` -- New field `ForceUpdateTag` in struct `AzureCliScriptProperties` -- New field `Timeout` in struct `AzureCliScriptProperties` -- New field `ContainerSettings` in struct `AzureCliScriptProperties` -- New field `ProvisioningState` in struct `AzureCliScriptProperties` -- New field `Outputs` in struct `AzureCliScriptProperties` -- New field `CleanupPreference` in struct `AzureCliScriptProperties` -- New field `Status` in struct `AzureCliScriptProperties` -- New field `SupportingScriptUris` in struct `AzureCliScriptProperties` -- New field `PrimaryScriptURI` in struct `AzureCliScriptProperties` -- New field `StorageAccountSettings` in struct `AzureCliScriptProperties` -- New field `StorageAccountSettings` in struct `AzurePowerShellScriptProperties` -- New field `Arguments` in struct `AzurePowerShellScriptProperties` -- New field `CleanupPreference` in struct `AzurePowerShellScriptProperties` -- New field `RetentionInterval` in struct `AzurePowerShellScriptProperties` -- New field `ForceUpdateTag` in struct `AzurePowerShellScriptProperties` -- New field `Outputs` in struct `AzurePowerShellScriptProperties` -- New field `ContainerSettings` in struct `AzurePowerShellScriptProperties` -- New field `SupportingScriptUris` in struct `AzurePowerShellScriptProperties` -- New field `Status` in struct `AzurePowerShellScriptProperties` -- New field `EnvironmentVariables` in struct `AzurePowerShellScriptProperties` -- New field `Timeout` in struct `AzurePowerShellScriptProperties` -- New field `ProvisioningState` in struct `AzurePowerShellScriptProperties` -- New field `ScriptContent` in struct `AzurePowerShellScriptProperties` -- New field `PrimaryScriptURI` in struct `AzurePowerShellScriptProperties` -- New field `ID` in struct `DeploymentScriptUpdateParameter` -- New field `Name` in struct `DeploymentScriptUpdateParameter` -- New field `Type` in struct `DeploymentScriptUpdateParameter` -- New field `Type` in struct `ScriptLog` -- New field `ID` in struct `ScriptLog` -- New field `Name` in struct `ScriptLog` -- New field `ID` in struct `DeploymentScript` -- New field `Name` in struct `DeploymentScript` -- New field `Type` in struct `DeploymentScript` - - -## 0.1.1 (2021-12-13) - -### Other Changes - -- Fix the go minimum version to `1.16` - -## 0.1.0 (2021-11-16) - -- Initial preview release. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/README.md deleted file mode 100644 index 7e4aab18..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Azure Deployment Scripts Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts) - -The `armdeploymentscripts` module provides operations for working with Azure Deployment Scripts. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/resources/armdeploymentscripts) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Deployment Scripts module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Deployment Scripts. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure Deployment Scripts modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armdeploymentscripts.NewClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armdeploymentscripts.NewClient(, cred, &options) -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Deployment Scripts` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/autorest.md deleted file mode 100644 index 6a6ae7fe..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/autorest.md +++ /dev/null @@ -1,13 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/resources/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/resources/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 -package-deploymentscripts: true -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/build.go deleted file mode 100644 index 7d1b90ad..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/resources/armdeploymentscripts - -package armdeploymentscripts diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/CHANGELOG.md new file mode 100644 index 00000000..35bae96c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/CHANGELOG.md @@ -0,0 +1,31 @@ +# Release History + +## 2.1.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.0.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + + +## 2.0.0 (2023-03-27) +### Breaking Changes + +- Struct `DeploymentScriptPropertiesBase` has been removed +- Struct `ScriptConfigurationBase` has been removed + +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + +## 1.0.0 (2022-05-18) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/README.md new file mode 100644 index 00000000..93220762 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/README.md @@ -0,0 +1,92 @@ +# Azure Deployment Scripts Module for Go + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts) + +The `armdeploymentscripts` module provides operations for working with Azure Deployment Scripts. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/resources/armdeploymentscripts) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Deployment Scripts module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Deployment Scripts. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Deployment module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armdeploymentscripts.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armdeploymentscripts.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Deployment Scripts` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/assets.json new file mode 100644 index 00000000..0025276a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/resources/armdeploymentscripts", + "Tag": "go/resourcemanager/resources/armdeploymentscripts_aa387434cd" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/autorest.md new file mode 100644 index 00000000..0f813d9d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/resources/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/resources/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 2.1.0 +package-deploymentscripts: true +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/build.go new file mode 100644 index 00000000..147d4f15 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/resources/armdeploymentscripts + +package armdeploymentscripts diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/ci.yml similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/ci.yml rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/ci.yml diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/client.go new file mode 100644 index 00000000..b9365062 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/client.go @@ -0,0 +1,557 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdeploymentscripts + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// Client contains the methods for the DeploymentScripts group. +// Don't use this type directly, use NewClient() instead. +type Client struct { + internal *arm.Client + subscriptionID string +} + +// NewClient creates a new instance of Client with the specified values. +// - subscriptionID - Subscription Id which forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &Client{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreate - Creates a deployment script. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scriptName - Name of the deployment script. +// - deploymentScript - Deployment script supplied to the operation. +// - options - ClientBeginCreateOptions contains the optional parameters for the Client.BeginCreate method. +func (client *Client) BeginCreate(ctx context.Context, resourceGroupName string, scriptName string, deploymentScript DeploymentScriptClassification, options *ClientBeginCreateOptions) (*runtime.Poller[ClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, scriptName, deploymentScript, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ClientCreateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Create - Creates a deployment script. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-10-01 +func (client *Client) create(ctx context.Context, resourceGroupName string, scriptName string, deploymentScript DeploymentScriptClassification, options *ClientBeginCreateOptions) (*http.Response, error) { + var err error + const operationName = "Client.BeginCreate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createCreateRequest(ctx, resourceGroupName, scriptName, deploymentScript, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createCreateRequest creates the Create request. +func (client *Client) createCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, deploymentScript DeploymentScriptClassification, options *ClientBeginCreateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scriptName == "" { + return nil, errors.New("parameter scriptName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, deploymentScript); err != nil { + return nil, err + } + return req, nil +} + +// Delete - Deletes a deployment script. When operation completes, status code 200 returned without content. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scriptName - Name of the deployment script. +// - options - ClientDeleteOptions contains the optional parameters for the Client.Delete method. +func (client *Client) Delete(ctx context.Context, resourceGroupName string, scriptName string, options *ClientDeleteOptions) (ClientDeleteResponse, error) { + var err error + const operationName = "Client.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, scriptName, options) + if err != nil { + return ClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ClientDeleteResponse{}, err + } + return ClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *Client) deleteCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, options *ClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scriptName == "" { + return nil, errors.New("parameter scriptName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a deployment script with a given name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scriptName - Name of the deployment script. +// - options - ClientGetOptions contains the optional parameters for the Client.Get method. +func (client *Client) Get(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetOptions) (ClientGetResponse, error) { + var err error + const operationName = "Client.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, scriptName, options) + if err != nil { + return ClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *Client) getCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scriptName == "" { + return nil, errors.New("parameter scriptName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *Client) getHandleResponse(resp *http.Response) (ClientGetResponse, error) { + result := ClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { + return ClientGetResponse{}, err + } + return result, nil +} + +// GetLogs - Gets deployment script logs for a given deployment script name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scriptName - Name of the deployment script. +// - options - ClientGetLogsOptions contains the optional parameters for the Client.GetLogs method. +func (client *Client) GetLogs(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetLogsOptions) (ClientGetLogsResponse, error) { + var err error + const operationName = "Client.GetLogs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getLogsCreateRequest(ctx, resourceGroupName, scriptName, options) + if err != nil { + return ClientGetLogsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientGetLogsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientGetLogsResponse{}, err + } + resp, err := client.getLogsHandleResponse(httpResp) + return resp, err +} + +// getLogsCreateRequest creates the GetLogs request. +func (client *Client) getLogsCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetLogsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scriptName == "" { + return nil, errors.New("parameter scriptName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLogsHandleResponse handles the GetLogs response. +func (client *Client) getLogsHandleResponse(resp *http.Response) (ClientGetLogsResponse, error) { + result := ClientGetLogsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScriptLogsList); err != nil { + return ClientGetLogsResponse{}, err + } + return result, nil +} + +// GetLogsDefault - Gets deployment script logs for a given deployment script name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scriptName - Name of the deployment script. +// - options - ClientGetLogsDefaultOptions contains the optional parameters for the Client.GetLogsDefault method. +func (client *Client) GetLogsDefault(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetLogsDefaultOptions) (ClientGetLogsDefaultResponse, error) { + var err error + const operationName = "Client.GetLogsDefault" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getLogsDefaultCreateRequest(ctx, resourceGroupName, scriptName, options) + if err != nil { + return ClientGetLogsDefaultResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientGetLogsDefaultResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientGetLogsDefaultResponse{}, err + } + resp, err := client.getLogsDefaultHandleResponse(httpResp) + return resp, err +} + +// getLogsDefaultCreateRequest creates the GetLogsDefault request. +func (client *Client) getLogsDefaultCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetLogsDefaultOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs/default" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scriptName == "" { + return nil, errors.New("parameter scriptName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-10-01") + if options != nil && options.Tail != nil { + reqQP.Set("tail", strconv.FormatInt(int64(*options.Tail), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getLogsDefaultHandleResponse handles the GetLogsDefault response. +func (client *Client) getLogsDefaultHandleResponse(resp *http.Response) (ClientGetLogsDefaultResponse, error) { + result := ClientGetLogsDefaultResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScriptLog); err != nil { + return ClientGetLogsDefaultResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists deployments scripts. +// +// Generated from API version 2020-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager +// method. +func (client *Client) NewListByResourceGroupPager(resourceGroupName string, options *ClientListByResourceGroupOptions) *runtime.Pager[ClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ClientListByResourceGroupResponse]{ + More: func(page ClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ClientListByResourceGroupResponse) (ClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return ClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *Client) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *Client) listByResourceGroupHandleResponse(resp *http.Response) (ClientListByResourceGroupResponse, error) { + result := ClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentScriptListResult); err != nil { + return ClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - Lists all deployment scripts for a given subscription. +// +// Generated from API version 2020-10-01 +// - options - ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method. +func (client *Client) NewListBySubscriptionPager(options *ClientListBySubscriptionOptions) *runtime.Pager[ClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[ClientListBySubscriptionResponse]{ + More: func(page ClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ClientListBySubscriptionResponse) (ClientListBySubscriptionResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) + if err != nil { + return ClientListBySubscriptionResponse{}, err + } + return client.listBySubscriptionHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *Client) listBySubscriptionCreateRequest(ctx context.Context, options *ClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentScripts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *Client) listBySubscriptionHandleResponse(resp *http.Response) (ClientListBySubscriptionResponse, error) { + result := ClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentScriptListResult); err != nil { + return ClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// Update - Updates deployment script tags with specified values. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2020-10-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - scriptName - Name of the deployment script. +// - options - ClientUpdateOptions contains the optional parameters for the Client.Update method. +func (client *Client) Update(ctx context.Context, resourceGroupName string, scriptName string, options *ClientUpdateOptions) (ClientUpdateResponse, error) { + var err error + const operationName = "Client.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, scriptName, options) + if err != nil { + return ClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *Client) updateCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, options *ClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if scriptName == "" { + return nil, errors.New("parameter scriptName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2020-10-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.DeploymentScript != nil { + if err := runtime.MarshalAsJSON(req, *options.DeploymentScript); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *Client) updateHandleResponse(resp *http.Response) (ClientUpdateResponse, error) { + result := ClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { + return ClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/client_factory.go new file mode 100644 index 00000000..893af593 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/client_factory.go @@ -0,0 +1,44 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdeploymentscripts + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + credential azcore.TokenCredential + options *arm.ClientOptions +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - Subscription Id which forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, credential: credential, + options: options.Clone(), + }, nil +} + +// NewClient creates a new instance of Client. +func (c *ClientFactory) NewClient() *Client { + subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) + return subClient +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/constants.go new file mode 100644 index 00000000..17c28202 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/constants.go @@ -0,0 +1,106 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdeploymentscripts + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts" + moduleVersion = "v2.1.0" +) + +// CleanupOptions - The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. +type CleanupOptions string + +const ( + CleanupOptionsAlways CleanupOptions = "Always" + CleanupOptionsOnExpiration CleanupOptions = "OnExpiration" + CleanupOptionsOnSuccess CleanupOptions = "OnSuccess" +) + +// PossibleCleanupOptionsValues returns the possible values for the CleanupOptions const type. +func PossibleCleanupOptionsValues() []CleanupOptions { + return []CleanupOptions{ + CleanupOptionsAlways, + CleanupOptionsOnExpiration, + CleanupOptionsOnSuccess, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// ManagedServiceIdentityType - Type of the managed identity. +type ManagedServiceIdentityType string + +const ( + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{ + ManagedServiceIdentityTypeUserAssigned, + } +} + +// ScriptProvisioningState - State of the script execution. This only appears in the response. +type ScriptProvisioningState string + +const ( + ScriptProvisioningStateCanceled ScriptProvisioningState = "Canceled" + ScriptProvisioningStateCreating ScriptProvisioningState = "Creating" + ScriptProvisioningStateFailed ScriptProvisioningState = "Failed" + ScriptProvisioningStateProvisioningResources ScriptProvisioningState = "ProvisioningResources" + ScriptProvisioningStateRunning ScriptProvisioningState = "Running" + ScriptProvisioningStateSucceeded ScriptProvisioningState = "Succeeded" +) + +// PossibleScriptProvisioningStateValues returns the possible values for the ScriptProvisioningState const type. +func PossibleScriptProvisioningStateValues() []ScriptProvisioningState { + return []ScriptProvisioningState{ + ScriptProvisioningStateCanceled, + ScriptProvisioningStateCreating, + ScriptProvisioningStateFailed, + ScriptProvisioningStateProvisioningResources, + ScriptProvisioningStateRunning, + ScriptProvisioningStateSucceeded, + } +} + +// ScriptType - Type of the script. +type ScriptType string + +const ( + ScriptTypeAzureCLI ScriptType = "AzureCLI" + ScriptTypeAzurePowerShell ScriptType = "AzurePowerShell" +) + +// PossibleScriptTypeValues returns the possible values for the ScriptType const type. +func PossibleScriptTypeValues() []ScriptType { + return []ScriptType{ + ScriptTypeAzureCLI, + ScriptTypeAzurePowerShell, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/interfaces.go new file mode 100644 index 00000000..cde83547 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/interfaces.go @@ -0,0 +1,18 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdeploymentscripts + +// DeploymentScriptClassification provides polymorphic access to related types. +// Call the interface's GetDeploymentScript() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureCliScript, *AzurePowerShellScript, *DeploymentScript +type DeploymentScriptClassification interface { + // GetDeploymentScript returns the DeploymentScript content of the underlying type. + GetDeploymentScript() *DeploymentScript +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/models.go new file mode 100644 index 00000000..8722a471 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/models.go @@ -0,0 +1,429 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdeploymentscripts + +import "time" + +// AzureCliScript - Object model for the Azure CLI script. +type AzureCliScript struct { + // REQUIRED; Type of the script. + Kind *ScriptType + + // REQUIRED; The location of the ACI and the storage account for the deployment script. + Location *string + + // REQUIRED; Properties of the Azure CLI script object. + Properties *AzureCliScriptProperties + + // Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. + Identity *ManagedServiceIdentity + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; String Id used to locate any resource on Azure. + ID *string + + // READ-ONLY; Name of this resource. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Type of this resource. + Type *string +} + +// GetDeploymentScript implements the DeploymentScriptClassification interface for type AzureCliScript. +func (a *AzureCliScript) GetDeploymentScript() *DeploymentScript { + return &DeploymentScript{ + ID: a.ID, + Identity: a.Identity, + Kind: a.Kind, + Location: a.Location, + Name: a.Name, + SystemData: a.SystemData, + Tags: a.Tags, + Type: a.Type, + } +} + +// AzureCliScriptProperties - Properties of the Azure CLI script object. +type AzureCliScriptProperties struct { + // REQUIRED; Azure CLI module version to be used. + AzCliVersion *string + + // REQUIRED; Interval for which the service retains the script resource after it reaches a terminal state. Resource will be + // deleted when this duration expires. Duration is based on ISO 8601 pattern (for example + // P1D means one day). + RetentionInterval *string + + // Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' + Arguments *string + + // The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. + CleanupPreference *CleanupOptions + + // Container settings. + ContainerSettings *ContainerConfiguration + + // The environment variables to pass over to the script. + EnvironmentVariables []*EnvironmentVariable + + // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be + // current time stamp or a GUID. + ForceUpdateTag *string + + // Uri for the script. This is the entry point for the external script. + PrimaryScriptURI *string + + // Script body. + ScriptContent *string + + // Storage Account settings. + StorageAccountSettings *StorageAccountConfiguration + + // Supporting files for the external script. + SupportingScriptUris []*string + + // Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D + Timeout *string + + // READ-ONLY; List of script outputs. + Outputs map[string]any + + // READ-ONLY; State of the script execution. This only appears in the response. + ProvisioningState *ScriptProvisioningState + + // READ-ONLY; Contains the results of script execution. + Status *ScriptStatus +} + +// AzurePowerShellScript - Object model for the Azure PowerShell script. +type AzurePowerShellScript struct { + // REQUIRED; Type of the script. + Kind *ScriptType + + // REQUIRED; The location of the ACI and the storage account for the deployment script. + Location *string + + // REQUIRED; Properties of the Azure PowerShell script object. + Properties *AzurePowerShellScriptProperties + + // Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. + Identity *ManagedServiceIdentity + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; String Id used to locate any resource on Azure. + ID *string + + // READ-ONLY; Name of this resource. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Type of this resource. + Type *string +} + +// GetDeploymentScript implements the DeploymentScriptClassification interface for type AzurePowerShellScript. +func (a *AzurePowerShellScript) GetDeploymentScript() *DeploymentScript { + return &DeploymentScript{ + ID: a.ID, + Identity: a.Identity, + Kind: a.Kind, + Location: a.Location, + Name: a.Name, + SystemData: a.SystemData, + Tags: a.Tags, + Type: a.Type, + } +} + +// AzurePowerShellScriptProperties - Properties of the Azure PowerShell script object. +type AzurePowerShellScriptProperties struct { + // REQUIRED; Azure PowerShell module version to be used. + AzPowerShellVersion *string + + // REQUIRED; Interval for which the service retains the script resource after it reaches a terminal state. Resource will be + // deleted when this duration expires. Duration is based on ISO 8601 pattern (for example + // P1D means one day). + RetentionInterval *string + + // Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' + Arguments *string + + // The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. + CleanupPreference *CleanupOptions + + // Container settings. + ContainerSettings *ContainerConfiguration + + // The environment variables to pass over to the script. + EnvironmentVariables []*EnvironmentVariable + + // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be + // current time stamp or a GUID. + ForceUpdateTag *string + + // Uri for the script. This is the entry point for the external script. + PrimaryScriptURI *string + + // Script body. + ScriptContent *string + + // Storage Account settings. + StorageAccountSettings *StorageAccountConfiguration + + // Supporting files for the external script. + SupportingScriptUris []*string + + // Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D + Timeout *string + + // READ-ONLY; List of script outputs. + Outputs map[string]any + + // READ-ONLY; State of the script execution. This only appears in the response. + ProvisioningState *ScriptProvisioningState + + // READ-ONLY; Contains the results of script execution. + Status *ScriptStatus +} + +// AzureResourceBase - Common properties for all Azure resources. +type AzureResourceBase struct { + // READ-ONLY; String Id used to locate any resource on Azure. + ID *string + + // READ-ONLY; Name of this resource. + Name *string + + // READ-ONLY; Type of this resource. + Type *string +} + +// ContainerConfiguration - Settings to customize ACI container instance. +type ContainerConfiguration struct { + // Container group name, if not specified then the name will get auto-generated. Not specifying a 'containerGroupName' indicates + // the system to generate a unique name which might end up flagging an Azure + // Policy as non-compliant. Use 'containerGroupName' when you have an Azure Policy that expects a specific naming convention + // or when you want to fully control the name. 'containerGroupName' property must + // be between 1 and 63 characters long, must contain only lowercase letters, numbers, and dashes and it cannot start or end + // with a dash and consecutive dashes are not allowed. To specify a + // 'containerGroupName', add the following object to properties: { "containerSettings": { "containerGroupName": "contoso-container" + // } }. If you do not want to specify a 'containerGroupName' then do not + // add 'containerSettings' property. + ContainerGroupName *string +} + +// DeploymentScript - Deployment script object. +type DeploymentScript struct { + // REQUIRED; Type of the script. + Kind *ScriptType + + // REQUIRED; The location of the ACI and the storage account for the deployment script. + Location *string + + // Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. + Identity *ManagedServiceIdentity + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; String Id used to locate any resource on Azure. + ID *string + + // READ-ONLY; Name of this resource. + Name *string + + // READ-ONLY; The system metadata related to this resource. + SystemData *SystemData + + // READ-ONLY; Type of this resource. + Type *string +} + +// GetDeploymentScript implements the DeploymentScriptClassification interface for type DeploymentScript. +func (d *DeploymentScript) GetDeploymentScript() *DeploymentScript { return d } + +// DeploymentScriptListResult - List of deployment scripts. +type DeploymentScriptListResult struct { + // An array of deployment scripts. + Value []DeploymentScriptClassification + + // READ-ONLY; The URL to use for getting the next set of results. + NextLink *string +} + +// DeploymentScriptUpdateParameter - Deployment script parameters to be updated. +type DeploymentScriptUpdateParameter struct { + // Resource tags to be updated. + Tags map[string]*string + + // READ-ONLY; String Id used to locate any resource on Azure. + ID *string + + // READ-ONLY; Name of this resource. + Name *string + + // READ-ONLY; Type of this resource. + Type *string +} + +// EnvironmentVariable - The environment variable to pass to the script in the container instance. +type EnvironmentVariable struct { + // REQUIRED; The name of the environment variable. + Name *string + + // The value of the secure environment variable. + SecureValue *string + + // The value of the environment variable. + Value *string +} + +// Error - Deployment scripts error response. +type Error struct { + // Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + // the OData error response format.) + Error *ErrorResponse +} + +// ErrorAdditionalInfo - The resource management error additional info. +type ErrorAdditionalInfo struct { + // READ-ONLY; The additional info. + Info any + + // READ-ONLY; The additional info type. + Type *string +} + +// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. +// (This also follows the OData error response format.) +type ErrorResponse struct { + // READ-ONLY; The error additional info. + AdditionalInfo []*ErrorAdditionalInfo + + // READ-ONLY; The error code. + Code *string + + // READ-ONLY; The error details. + Details []*ErrorResponse + + // READ-ONLY; The error message. + Message *string + + // READ-ONLY; The error target. + Target *string +} + +// LogProperties - Script log properties. +type LogProperties struct { + // READ-ONLY; Script execution logs in text format. + Log *string +} + +// ManagedServiceIdentity - Managed identity generic object. +type ManagedServiceIdentity struct { + // Type of the managed identity. + Type *ManagedServiceIdentityType + + // The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed + // identity. + UserAssignedIdentities map[string]*UserAssignedIdentity + + // READ-ONLY; ID of the Azure Active Directory. + TenantID *string +} + +// ScriptLog - Script execution log object. +type ScriptLog struct { + // Script log properties. + Properties *LogProperties + + // READ-ONLY; String Id used to locate any resource on Azure. + ID *string + + // READ-ONLY; Name of this resource. + Name *string + + // READ-ONLY; Type of this resource. + Type *string +} + +// ScriptLogsList - Deployment script execution logs. +type ScriptLogsList struct { + // Deployment scripts logs. + Value []*ScriptLog +} + +// ScriptStatus - Generic object modeling results of script execution. +type ScriptStatus struct { + // Error that is relayed from the script execution. + Error *ErrorResponse + + // READ-ONLY; ACI resource Id. + ContainerInstanceID *string + + // READ-ONLY; End time of the script execution. + EndTime *time.Time + + // READ-ONLY; Time the deployment script resource will expire. + ExpirationTime *time.Time + + // READ-ONLY; Start time of the script execution. + StartTime *time.Time + + // READ-ONLY; Storage account resource Id. + StorageAccountID *string +} + +// StorageAccountConfiguration - Settings to use an existing storage account. Valid storage account kinds are: Storage, StorageV2 +// and FileStorage +type StorageAccountConfiguration struct { + // The storage account access key. + StorageAccountKey *string + + // The storage account name. + StorageAccountName *string +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource last modification (UTC) + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *CreatedByType +} + +// UserAssignedIdentity - User-assigned managed identity. +type UserAssignedIdentity struct { + // READ-ONLY; Client App Id associated with this identity. + ClientID *string + + // READ-ONLY; Azure Active Directory principal ID associated with this identity. + PrincipalID *string +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/models_serde.go new file mode 100644 index 00000000..a4b8dc46 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/models_serde.go @@ -0,0 +1,937 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdeploymentscripts + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AzureCliScript. +func (a AzureCliScript) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + objectMap["kind"] = ScriptTypeAzureCLI + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureCliScript. +func (a *AzureCliScript) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureCliScriptProperties. +func (a AzureCliScriptProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "arguments", a.Arguments) + populate(objectMap, "azCliVersion", a.AzCliVersion) + populate(objectMap, "cleanupPreference", a.CleanupPreference) + populate(objectMap, "containerSettings", a.ContainerSettings) + populate(objectMap, "environmentVariables", a.EnvironmentVariables) + populate(objectMap, "forceUpdateTag", a.ForceUpdateTag) + populate(objectMap, "outputs", a.Outputs) + populate(objectMap, "primaryScriptUri", a.PrimaryScriptURI) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "retentionInterval", a.RetentionInterval) + populate(objectMap, "scriptContent", a.ScriptContent) + populate(objectMap, "status", a.Status) + populate(objectMap, "storageAccountSettings", a.StorageAccountSettings) + populate(objectMap, "supportingScriptUris", a.SupportingScriptUris) + populate(objectMap, "timeout", a.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureCliScriptProperties. +func (a *AzureCliScriptProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "arguments": + err = unpopulate(val, "Arguments", &a.Arguments) + delete(rawMsg, key) + case "azCliVersion": + err = unpopulate(val, "AzCliVersion", &a.AzCliVersion) + delete(rawMsg, key) + case "cleanupPreference": + err = unpopulate(val, "CleanupPreference", &a.CleanupPreference) + delete(rawMsg, key) + case "containerSettings": + err = unpopulate(val, "ContainerSettings", &a.ContainerSettings) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &a.EnvironmentVariables) + delete(rawMsg, key) + case "forceUpdateTag": + err = unpopulate(val, "ForceUpdateTag", &a.ForceUpdateTag) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &a.Outputs) + delete(rawMsg, key) + case "primaryScriptUri": + err = unpopulate(val, "PrimaryScriptURI", &a.PrimaryScriptURI) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "retentionInterval": + err = unpopulate(val, "RetentionInterval", &a.RetentionInterval) + delete(rawMsg, key) + case "scriptContent": + err = unpopulate(val, "ScriptContent", &a.ScriptContent) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "storageAccountSettings": + err = unpopulate(val, "StorageAccountSettings", &a.StorageAccountSettings) + delete(rawMsg, key) + case "supportingScriptUris": + err = unpopulate(val, "SupportingScriptUris", &a.SupportingScriptUris) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &a.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzurePowerShellScript. +func (a AzurePowerShellScript) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + objectMap["kind"] = ScriptTypeAzurePowerShell + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzurePowerShellScript. +func (a *AzurePowerShellScript) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzurePowerShellScriptProperties. +func (a AzurePowerShellScriptProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "arguments", a.Arguments) + populate(objectMap, "azPowerShellVersion", a.AzPowerShellVersion) + populate(objectMap, "cleanupPreference", a.CleanupPreference) + populate(objectMap, "containerSettings", a.ContainerSettings) + populate(objectMap, "environmentVariables", a.EnvironmentVariables) + populate(objectMap, "forceUpdateTag", a.ForceUpdateTag) + populate(objectMap, "outputs", a.Outputs) + populate(objectMap, "primaryScriptUri", a.PrimaryScriptURI) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "retentionInterval", a.RetentionInterval) + populate(objectMap, "scriptContent", a.ScriptContent) + populate(objectMap, "status", a.Status) + populate(objectMap, "storageAccountSettings", a.StorageAccountSettings) + populate(objectMap, "supportingScriptUris", a.SupportingScriptUris) + populate(objectMap, "timeout", a.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzurePowerShellScriptProperties. +func (a *AzurePowerShellScriptProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "arguments": + err = unpopulate(val, "Arguments", &a.Arguments) + delete(rawMsg, key) + case "azPowerShellVersion": + err = unpopulate(val, "AzPowerShellVersion", &a.AzPowerShellVersion) + delete(rawMsg, key) + case "cleanupPreference": + err = unpopulate(val, "CleanupPreference", &a.CleanupPreference) + delete(rawMsg, key) + case "containerSettings": + err = unpopulate(val, "ContainerSettings", &a.ContainerSettings) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &a.EnvironmentVariables) + delete(rawMsg, key) + case "forceUpdateTag": + err = unpopulate(val, "ForceUpdateTag", &a.ForceUpdateTag) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, "Outputs", &a.Outputs) + delete(rawMsg, key) + case "primaryScriptUri": + err = unpopulate(val, "PrimaryScriptURI", &a.PrimaryScriptURI) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "retentionInterval": + err = unpopulate(val, "RetentionInterval", &a.RetentionInterval) + delete(rawMsg, key) + case "scriptContent": + err = unpopulate(val, "ScriptContent", &a.ScriptContent) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "storageAccountSettings": + err = unpopulate(val, "StorageAccountSettings", &a.StorageAccountSettings) + delete(rawMsg, key) + case "supportingScriptUris": + err = unpopulate(val, "SupportingScriptUris", &a.SupportingScriptUris) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &a.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureResourceBase. +func (a AzureResourceBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureResourceBase. +func (a *AzureResourceBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerConfiguration. +func (c ContainerConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerGroupName", c.ContainerGroupName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerConfiguration. +func (c *ContainerConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerGroupName": + err = unpopulate(val, "ContainerGroupName", &c.ContainerGroupName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentScript. +func (d DeploymentScript) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "identity", d.Identity) + objectMap["kind"] = d.Kind + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentScript. +func (d *DeploymentScript) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &d.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &d.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentScriptListResult. +func (d DeploymentScriptListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentScriptListResult. +func (d *DeploymentScriptListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + d.Value, err = unmarshalDeploymentScriptClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentScriptUpdateParameter. +func (d DeploymentScriptUpdateParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentScriptUpdateParameter. +func (d *DeploymentScriptUpdateParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVariable. +func (e EnvironmentVariable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", e.Name) + populate(objectMap, "secureValue", e.SecureValue) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVariable. +func (e *EnvironmentVariable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "secureValue": + err = unpopulate(val, "SecureValue", &e.SecureValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Error. +func (e Error) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Error. +func (e *Error) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. +func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateAny(objectMap, "info", e.Info) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. +func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "info": + err = unpopulate(val, "Info", &e.Info) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "additionalInfo", e.AdditionalInfo) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. +func (e *ErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogProperties. +func (l LogProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "log", l.Log) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogProperties. +func (l *LogProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "log": + err = unpopulate(val, "Log", &l.Log) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScriptLog. +func (s ScriptLog) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptLog. +func (s *ScriptLog) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScriptLogsList. +func (s ScriptLogsList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptLogsList. +func (s *ScriptLogsList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScriptStatus. +func (s ScriptStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerInstanceId", s.ContainerInstanceID) + populateDateTimeRFC3339(objectMap, "endTime", s.EndTime) + populate(objectMap, "error", s.Error) + populateDateTimeRFC3339(objectMap, "expirationTime", s.ExpirationTime) + populateDateTimeRFC3339(objectMap, "startTime", s.StartTime) + populate(objectMap, "storageAccountId", s.StorageAccountID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptStatus. +func (s *ScriptStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerInstanceId": + err = unpopulate(val, "ContainerInstanceID", &s.ContainerInstanceID) + delete(rawMsg, key) + case "endTime": + err = unpopulateDateTimeRFC3339(val, "EndTime", &s.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &s.Error) + delete(rawMsg, key) + case "expirationTime": + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &s.ExpirationTime) + delete(rawMsg, key) + case "startTime": + err = unpopulateDateTimeRFC3339(val, "StartTime", &s.StartTime) + delete(rawMsg, key) + case "storageAccountId": + err = unpopulate(val, "StorageAccountID", &s.StorageAccountID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageAccountConfiguration. +func (s StorageAccountConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "storageAccountKey", s.StorageAccountKey) + populate(objectMap, "storageAccountName", s.StorageAccountName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccountConfiguration. +func (s *StorageAccountConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "storageAccountKey": + err = unpopulate(val, "StorageAccountKey", &s.StorageAccountKey) + delete(rawMsg, key) + case "storageAccountName": + err = unpopulate(val, "StorageAccountName", &s.StorageAccountName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. +func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/options.go new file mode 100644 index 00000000..6dd22298 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/options.go @@ -0,0 +1,54 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdeploymentscripts + +// ClientBeginCreateOptions contains the optional parameters for the Client.BeginCreate method. +type ClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientDeleteOptions contains the optional parameters for the Client.Delete method. +type ClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ClientGetLogsDefaultOptions contains the optional parameters for the Client.GetLogsDefault method. +type ClientGetLogsDefaultOptions struct { + // The number of lines to show from the tail of the deployment script log. Valid value is a positive number up to 1000. If + // 'tail' is not provided, all available logs are shown up to container instance + // log capacity of 4mb. + Tail *int32 +} + +// ClientGetLogsOptions contains the optional parameters for the Client.GetLogs method. +type ClientGetLogsOptions struct { + // placeholder for future optional parameters +} + +// ClientGetOptions contains the optional parameters for the Client.Get method. +type ClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. +type ClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ClientListBySubscriptionOptions contains the optional parameters for the Client.NewListBySubscriptionPager method. +type ClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ClientUpdateOptions contains the optional parameters for the Client.Update method. +type ClientUpdateOptions struct { + // Deployment script resource with the tags to be updated. + DeploymentScript *DeploymentScriptUpdateParameter +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/polymorphic_helpers.go new file mode 100644 index 00000000..ab6bf154 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/polymorphic_helpers.go @@ -0,0 +1,53 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdeploymentscripts + +import "encoding/json" + +func unmarshalDeploymentScriptClassification(rawMsg json.RawMessage) (DeploymentScriptClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b DeploymentScriptClassification + switch m["kind"] { + case string(ScriptTypeAzureCLI): + b = &AzureCliScript{} + case string(ScriptTypeAzurePowerShell): + b = &AzurePowerShellScript{} + default: + b = &DeploymentScript{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalDeploymentScriptClassificationArray(rawMsg json.RawMessage) ([]DeploymentScriptClassification, error) { + if rawMsg == nil { + return nil, nil + } + var rawMessages []json.RawMessage + if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { + return nil, err + } + fArray := make([]DeploymentScriptClassification, len(rawMessages)) + for index, rawMessage := range rawMessages { + f, err := unmarshalDeploymentScriptClassification(rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/response_types.go new file mode 100644 index 00000000..dc9bf73f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/response_types.go @@ -0,0 +1,93 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdeploymentscripts + +import "encoding/json" + +// ClientCreateResponse contains the response from method Client.BeginCreate. +type ClientCreateResponse struct { + // Deployment script object. + DeploymentScriptClassification +} + +// MarshalJSON implements the json.Marshaller interface for type ClientCreateResponse. +func (c ClientCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(c.DeploymentScriptClassification) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientCreateResponse. +func (c *ClientCreateResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalDeploymentScriptClassification(data) + if err != nil { + return err + } + c.DeploymentScriptClassification = res + return nil +} + +// ClientDeleteResponse contains the response from method Client.Delete. +type ClientDeleteResponse struct { + // placeholder for future response values +} + +// ClientGetLogsDefaultResponse contains the response from method Client.GetLogsDefault. +type ClientGetLogsDefaultResponse struct { + // Script execution log object. + ScriptLog +} + +// ClientGetLogsResponse contains the response from method Client.GetLogs. +type ClientGetLogsResponse struct { + // Deployment script execution logs. + ScriptLogsList +} + +// ClientGetResponse contains the response from method Client.Get. +type ClientGetResponse struct { + // Deployment script object. + DeploymentScriptClassification +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientGetResponse. +func (c *ClientGetResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalDeploymentScriptClassification(data) + if err != nil { + return err + } + c.DeploymentScriptClassification = res + return nil +} + +// ClientListByResourceGroupResponse contains the response from method Client.NewListByResourceGroupPager. +type ClientListByResourceGroupResponse struct { + // List of deployment scripts. + DeploymentScriptListResult +} + +// ClientListBySubscriptionResponse contains the response from method Client.NewListBySubscriptionPager. +type ClientListBySubscriptionResponse struct { + // List of deployment scripts. + DeploymentScriptListResult +} + +// ClientUpdateResponse contains the response from method Client.Update. +type ClientUpdateResponse struct { + // Deployment script object. + DeploymentScriptClassification +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClientUpdateResponse. +func (c *ClientUpdateResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalDeploymentScriptClassification(data) + if err != nil { + return err + } + c.DeploymentScriptClassification = res + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/time_rfc3339.go new file mode 100644 index 00000000..b1f88d20 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2/time_rfc3339.go @@ -0,0 +1,86 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armdeploymentscripts + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) + +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON + if tzOffsetRegex.Match(data) { + layout = dateTimeJSON + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime + if tzOffsetRegex.Match(data) { + layout = time.RFC3339Nano + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || strings.EqualFold(string(data), "null") { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_client.go deleted file mode 100644 index 78032f66..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_client.go +++ /dev/null @@ -1,519 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdeploymentscripts - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strconv" - "strings" -) - -// Client contains the methods for the DeploymentScripts group. -// Don't use this type directly, use NewClient() instead. -type Client struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewClient creates a new instance of Client with the specified values. -// subscriptionID - Subscription Id which forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &Client{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreate - Creates a deployment script. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scriptName - Name of the deployment script. -// deploymentScript - Deployment script supplied to the operation. -// options - ClientBeginCreateOptions contains the optional parameters for the Client.BeginCreate method. -func (client *Client) BeginCreate(ctx context.Context, resourceGroupName string, scriptName string, deploymentScript DeploymentScriptClassification, options *ClientBeginCreateOptions) (*runtime.Poller[ClientCreateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.create(ctx, resourceGroupName, scriptName, deploymentScript, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[ClientCreateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[ClientCreateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Create - Creates a deployment script. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -func (client *Client) create(ctx context.Context, resourceGroupName string, scriptName string, deploymentScript DeploymentScriptClassification, options *ClientBeginCreateOptions) (*http.Response, error) { - req, err := client.createCreateRequest(ctx, resourceGroupName, scriptName, deploymentScript, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createCreateRequest creates the Create request. -func (client *Client) createCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, deploymentScript DeploymentScriptClassification, options *ClientBeginCreateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scriptName == "" { - return nil, errors.New("parameter scriptName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, deploymentScript) -} - -// Delete - Deletes a deployment script. When operation completes, status code 200 returned without content. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scriptName - Name of the deployment script. -// options - ClientDeleteOptions contains the optional parameters for the Client.Delete method. -func (client *Client) Delete(ctx context.Context, resourceGroupName string, scriptName string, options *ClientDeleteOptions) (ClientDeleteResponse, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, scriptName, options) - if err != nil { - return ClientDeleteResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ClientDeleteResponse{}, runtime.NewResponseError(resp) - } - return ClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *Client) deleteCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, options *ClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scriptName == "" { - return nil, errors.New("parameter scriptName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a deployment script with a given name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scriptName - Name of the deployment script. -// options - ClientGetOptions contains the optional parameters for the Client.Get method. -func (client *Client) Get(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetOptions) (ClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, scriptName, options) - if err != nil { - return ClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *Client) getCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scriptName == "" { - return nil, errors.New("parameter scriptName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *Client) getHandleResponse(resp *http.Response) (ClientGetResponse, error) { - result := ClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { - return ClientGetResponse{}, err - } - return result, nil -} - -// GetLogs - Gets deployment script logs for a given deployment script name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scriptName - Name of the deployment script. -// options - ClientGetLogsOptions contains the optional parameters for the Client.GetLogs method. -func (client *Client) GetLogs(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetLogsOptions) (ClientGetLogsResponse, error) { - req, err := client.getLogsCreateRequest(ctx, resourceGroupName, scriptName, options) - if err != nil { - return ClientGetLogsResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ClientGetLogsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientGetLogsResponse{}, runtime.NewResponseError(resp) - } - return client.getLogsHandleResponse(resp) -} - -// getLogsCreateRequest creates the GetLogs request. -func (client *Client) getLogsCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetLogsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scriptName == "" { - return nil, errors.New("parameter scriptName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getLogsHandleResponse handles the GetLogs response. -func (client *Client) getLogsHandleResponse(resp *http.Response) (ClientGetLogsResponse, error) { - result := ClientGetLogsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScriptLogsList); err != nil { - return ClientGetLogsResponse{}, err - } - return result, nil -} - -// GetLogsDefault - Gets deployment script logs for a given deployment script name. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scriptName - Name of the deployment script. -// options - ClientGetLogsDefaultOptions contains the optional parameters for the Client.GetLogsDefault method. -func (client *Client) GetLogsDefault(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetLogsDefaultOptions) (ClientGetLogsDefaultResponse, error) { - req, err := client.getLogsDefaultCreateRequest(ctx, resourceGroupName, scriptName, options) - if err != nil { - return ClientGetLogsDefaultResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ClientGetLogsDefaultResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientGetLogsDefaultResponse{}, runtime.NewResponseError(resp) - } - return client.getLogsDefaultHandleResponse(resp) -} - -// getLogsDefaultCreateRequest creates the GetLogsDefault request. -func (client *Client) getLogsDefaultCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, options *ClientGetLogsDefaultOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs/default" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scriptName == "" { - return nil, errors.New("parameter scriptName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - if options != nil && options.Tail != nil { - reqQP.Set("tail", strconv.FormatInt(int64(*options.Tail), 10)) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getLogsDefaultHandleResponse handles the GetLogsDefault response. -func (client *Client) getLogsDefaultHandleResponse(resp *http.Response) (ClientGetLogsDefaultResponse, error) { - result := ClientGetLogsDefaultResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ScriptLog); err != nil { - return ClientGetLogsDefaultResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists deployments scripts. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - ClientListByResourceGroupOptions contains the optional parameters for the Client.ListByResourceGroup method. -func (client *Client) NewListByResourceGroupPager(resourceGroupName string, options *ClientListByResourceGroupOptions) *runtime.Pager[ClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ClientListByResourceGroupResponse]{ - More: func(page ClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ClientListByResourceGroupResponse) (ClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *Client) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *Client) listByResourceGroupHandleResponse(resp *http.Response) (ClientListByResourceGroupResponse, error) { - result := ClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentScriptListResult); err != nil { - return ClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// NewListBySubscriptionPager - Lists all deployment scripts for a given subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// options - ClientListBySubscriptionOptions contains the optional parameters for the Client.ListBySubscription method. -func (client *Client) NewListBySubscriptionPager(options *ClientListBySubscriptionOptions) *runtime.Pager[ClientListBySubscriptionResponse] { - return runtime.NewPager(runtime.PagingHandler[ClientListBySubscriptionResponse]{ - More: func(page ClientListBySubscriptionResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ClientListBySubscriptionResponse) (ClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ClientListBySubscriptionResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } - return client.listBySubscriptionHandleResponse(resp) - }, - }) -} - -// listBySubscriptionCreateRequest creates the ListBySubscription request. -func (client *Client) listBySubscriptionCreateRequest(ctx context.Context, options *ClientListBySubscriptionOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentScripts" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listBySubscriptionHandleResponse handles the ListBySubscription response. -func (client *Client) listBySubscriptionHandleResponse(resp *http.Response) (ClientListBySubscriptionResponse, error) { - result := ClientListBySubscriptionResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.DeploymentScriptListResult); err != nil { - return ClientListBySubscriptionResponse{}, err - } - return result, nil -} - -// Update - Updates deployment script tags with specified values. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2020-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// scriptName - Name of the deployment script. -// options - ClientUpdateOptions contains the optional parameters for the Client.Update method. -func (client *Client) Update(ctx context.Context, resourceGroupName string, scriptName string, options *ClientUpdateOptions) (ClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, scriptName, options) - if err != nil { - return ClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *Client) updateCreateRequest(ctx context.Context, resourceGroupName string, scriptName string, options *ClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if scriptName == "" { - return nil, errors.New("parameter scriptName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{scriptName}", url.PathEscape(scriptName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2020-10-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.DeploymentScript != nil { - return req, runtime.MarshalAsJSON(req, *options.DeploymentScript) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *Client) updateHandleResponse(resp *http.Response) (ClientUpdateResponse, error) { - result := ClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result); err != nil { - return ClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_constants.go deleted file mode 100644 index 37bea6dc..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_constants.go +++ /dev/null @@ -1,106 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdeploymentscripts - -const ( - moduleName = "armdeploymentscripts" - moduleVersion = "v1.0.0" -) - -// CleanupOptions - The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. -type CleanupOptions string - -const ( - CleanupOptionsAlways CleanupOptions = "Always" - CleanupOptionsOnExpiration CleanupOptions = "OnExpiration" - CleanupOptionsOnSuccess CleanupOptions = "OnSuccess" -) - -// PossibleCleanupOptionsValues returns the possible values for the CleanupOptions const type. -func PossibleCleanupOptionsValues() []CleanupOptions { - return []CleanupOptions{ - CleanupOptionsAlways, - CleanupOptionsOnExpiration, - CleanupOptionsOnSuccess, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// ManagedServiceIdentityType - Type of the managed identity. -type ManagedServiceIdentityType string - -const ( - ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" -) - -// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. -func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { - return []ManagedServiceIdentityType{ - ManagedServiceIdentityTypeUserAssigned, - } -} - -// ScriptProvisioningState - State of the script execution. This only appears in the response. -type ScriptProvisioningState string - -const ( - ScriptProvisioningStateCanceled ScriptProvisioningState = "Canceled" - ScriptProvisioningStateCreating ScriptProvisioningState = "Creating" - ScriptProvisioningStateFailed ScriptProvisioningState = "Failed" - ScriptProvisioningStateProvisioningResources ScriptProvisioningState = "ProvisioningResources" - ScriptProvisioningStateRunning ScriptProvisioningState = "Running" - ScriptProvisioningStateSucceeded ScriptProvisioningState = "Succeeded" -) - -// PossibleScriptProvisioningStateValues returns the possible values for the ScriptProvisioningState const type. -func PossibleScriptProvisioningStateValues() []ScriptProvisioningState { - return []ScriptProvisioningState{ - ScriptProvisioningStateCanceled, - ScriptProvisioningStateCreating, - ScriptProvisioningStateFailed, - ScriptProvisioningStateProvisioningResources, - ScriptProvisioningStateRunning, - ScriptProvisioningStateSucceeded, - } -} - -// ScriptType - Type of the script. -type ScriptType string - -const ( - ScriptTypeAzureCLI ScriptType = "AzureCLI" - ScriptTypeAzurePowerShell ScriptType = "AzurePowerShell" -) - -// PossibleScriptTypeValues returns the possible values for the ScriptType const type. -func PossibleScriptTypeValues() []ScriptType { - return []ScriptType{ - ScriptTypeAzureCLI, - ScriptTypeAzurePowerShell, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_models.go deleted file mode 100644 index fdbf7074..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_models.go +++ /dev/null @@ -1,534 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdeploymentscripts - -import "time" - -// AzureCliScript - Object model for the Azure CLI script. -type AzureCliScript struct { - // REQUIRED; Type of the script. - Kind *ScriptType `json:"kind,omitempty"` - - // REQUIRED; The location of the ACI and the storage account for the deployment script. - Location *string `json:"location,omitempty"` - - // REQUIRED; Properties of the Azure CLI script object. - Properties *AzureCliScriptProperties `json:"properties,omitempty"` - - // Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; String Id used to locate any resource on Azure. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of this resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Type of this resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GetDeploymentScript implements the DeploymentScriptClassification interface for type AzureCliScript. -func (a *AzureCliScript) GetDeploymentScript() *DeploymentScript { - return &DeploymentScript{ - Identity: a.Identity, - Location: a.Location, - Tags: a.Tags, - Kind: a.Kind, - SystemData: a.SystemData, - ID: a.ID, - Name: a.Name, - Type: a.Type, - } -} - -// AzureCliScriptProperties - Properties of the Azure CLI script object. -type AzureCliScriptProperties struct { - // REQUIRED; Azure CLI module version to be used. - AzCliVersion *string `json:"azCliVersion,omitempty"` - - // REQUIRED; Interval for which the service retains the script resource after it reaches a terminal state. Resource will be - // deleted when this duration expires. Duration is based on ISO 8601 pattern (for example - // P1D means one day). - RetentionInterval *string `json:"retentionInterval,omitempty"` - - // Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' - Arguments *string `json:"arguments,omitempty"` - - // The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. - CleanupPreference *CleanupOptions `json:"cleanupPreference,omitempty"` - - // Container settings. - ContainerSettings *ContainerConfiguration `json:"containerSettings,omitempty"` - - // The environment variables to pass over to the script. - EnvironmentVariables []*EnvironmentVariable `json:"environmentVariables,omitempty"` - - // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be - // current time stamp or a GUID. - ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` - - // Uri for the script. This is the entry point for the external script. - PrimaryScriptURI *string `json:"primaryScriptUri,omitempty"` - - // Script body. - ScriptContent *string `json:"scriptContent,omitempty"` - - // Storage Account settings. - StorageAccountSettings *StorageAccountConfiguration `json:"storageAccountSettings,omitempty"` - - // Supporting files for the external script. - SupportingScriptUris []*string `json:"supportingScriptUris,omitempty"` - - // Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D - Timeout *string `json:"timeout,omitempty"` - - // READ-ONLY; List of script outputs. - Outputs map[string]interface{} `json:"outputs,omitempty" azure:"ro"` - - // READ-ONLY; State of the script execution. This only appears in the response. - ProvisioningState *ScriptProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Contains the results of script execution. - Status *ScriptStatus `json:"status,omitempty" azure:"ro"` -} - -// AzurePowerShellScript - Object model for the Azure PowerShell script. -type AzurePowerShellScript struct { - // REQUIRED; Type of the script. - Kind *ScriptType `json:"kind,omitempty"` - - // REQUIRED; The location of the ACI and the storage account for the deployment script. - Location *string `json:"location,omitempty"` - - // REQUIRED; Properties of the Azure PowerShell script object. - Properties *AzurePowerShellScriptProperties `json:"properties,omitempty"` - - // Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; String Id used to locate any resource on Azure. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of this resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Type of this resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GetDeploymentScript implements the DeploymentScriptClassification interface for type AzurePowerShellScript. -func (a *AzurePowerShellScript) GetDeploymentScript() *DeploymentScript { - return &DeploymentScript{ - Identity: a.Identity, - Location: a.Location, - Tags: a.Tags, - Kind: a.Kind, - SystemData: a.SystemData, - ID: a.ID, - Name: a.Name, - Type: a.Type, - } -} - -// AzurePowerShellScriptProperties - Properties of the Azure PowerShell script object. -type AzurePowerShellScriptProperties struct { - // REQUIRED; Azure PowerShell module version to be used. - AzPowerShellVersion *string `json:"azPowerShellVersion,omitempty"` - - // REQUIRED; Interval for which the service retains the script resource after it reaches a terminal state. Resource will be - // deleted when this duration expires. Duration is based on ISO 8601 pattern (for example - // P1D means one day). - RetentionInterval *string `json:"retentionInterval,omitempty"` - - // Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' - Arguments *string `json:"arguments,omitempty"` - - // The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. - CleanupPreference *CleanupOptions `json:"cleanupPreference,omitempty"` - - // Container settings. - ContainerSettings *ContainerConfiguration `json:"containerSettings,omitempty"` - - // The environment variables to pass over to the script. - EnvironmentVariables []*EnvironmentVariable `json:"environmentVariables,omitempty"` - - // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be - // current time stamp or a GUID. - ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` - - // Uri for the script. This is the entry point for the external script. - PrimaryScriptURI *string `json:"primaryScriptUri,omitempty"` - - // Script body. - ScriptContent *string `json:"scriptContent,omitempty"` - - // Storage Account settings. - StorageAccountSettings *StorageAccountConfiguration `json:"storageAccountSettings,omitempty"` - - // Supporting files for the external script. - SupportingScriptUris []*string `json:"supportingScriptUris,omitempty"` - - // Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D - Timeout *string `json:"timeout,omitempty"` - - // READ-ONLY; List of script outputs. - Outputs map[string]interface{} `json:"outputs,omitempty" azure:"ro"` - - // READ-ONLY; State of the script execution. This only appears in the response. - ProvisioningState *ScriptProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Contains the results of script execution. - Status *ScriptStatus `json:"status,omitempty" azure:"ro"` -} - -// AzureResourceBase - Common properties for all Azure resources. -type AzureResourceBase struct { - // READ-ONLY; String Id used to locate any resource on Azure. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of this resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Type of this resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ClientBeginCreateOptions contains the optional parameters for the Client.BeginCreate method. -type ClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientDeleteOptions contains the optional parameters for the Client.Delete method. -type ClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ClientGetLogsDefaultOptions contains the optional parameters for the Client.GetLogsDefault method. -type ClientGetLogsDefaultOptions struct { - // The number of lines to show from the tail of the deployment script log. Valid value is a positive number up to 1000. If - // 'tail' is not provided, all available logs are shown up to container instance - // log capacity of 4mb. - Tail *int32 -} - -// ClientGetLogsOptions contains the optional parameters for the Client.GetLogs method. -type ClientGetLogsOptions struct { - // placeholder for future optional parameters -} - -// ClientGetOptions contains the optional parameters for the Client.Get method. -type ClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClientListByResourceGroupOptions contains the optional parameters for the Client.ListByResourceGroup method. -type ClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ClientListBySubscriptionOptions contains the optional parameters for the Client.ListBySubscription method. -type ClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ClientUpdateOptions contains the optional parameters for the Client.Update method. -type ClientUpdateOptions struct { - // Deployment script resource with the tags to be updated. - DeploymentScript *DeploymentScriptUpdateParameter -} - -// ContainerConfiguration - Settings to customize ACI container instance. -type ContainerConfiguration struct { - // Container group name, if not specified then the name will get auto-generated. Not specifying a 'containerGroupName' indicates - // the system to generate a unique name which might end up flagging an Azure - // Policy as non-compliant. Use 'containerGroupName' when you have an Azure Policy that expects a specific naming convention - // or when you want to fully control the name. 'containerGroupName' property must - // be between 1 and 63 characters long, must contain only lowercase letters, numbers, and dashes and it cannot start or end - // with a dash and consecutive dashes are not allowed. To specify a - // 'containerGroupName', add the following object to properties: { "containerSettings": { "containerGroupName": "contoso-container" - // } }. If you do not want to specify a 'containerGroupName' then do not - // add 'containerSettings' property. - ContainerGroupName *string `json:"containerGroupName,omitempty"` -} - -// DeploymentScriptClassification provides polymorphic access to related types. -// Call the interface's GetDeploymentScript() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureCliScript, *AzurePowerShellScript, *DeploymentScript -type DeploymentScriptClassification interface { - // GetDeploymentScript returns the DeploymentScript content of the underlying type. - GetDeploymentScript() *DeploymentScript -} - -// DeploymentScript - Deployment script object. -type DeploymentScript struct { - // REQUIRED; Type of the script. - Kind *ScriptType `json:"kind,omitempty"` - - // REQUIRED; The location of the ACI and the storage account for the deployment script. - Location *string `json:"location,omitempty"` - - // Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; String Id used to locate any resource on Azure. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of this resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system metadata related to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Type of this resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// GetDeploymentScript implements the DeploymentScriptClassification interface for type DeploymentScript. -func (d *DeploymentScript) GetDeploymentScript() *DeploymentScript { return d } - -// DeploymentScriptListResult - List of deployment scripts. -type DeploymentScriptListResult struct { - // An array of deployment scripts. - Value []DeploymentScriptClassification `json:"value,omitempty"` - - // READ-ONLY; The URL to use for getting the next set of results. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` -} - -// DeploymentScriptPropertiesBase - Common properties for the deployment script. -type DeploymentScriptPropertiesBase struct { - // The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. - CleanupPreference *CleanupOptions `json:"cleanupPreference,omitempty"` - - // Container settings. - ContainerSettings *ContainerConfiguration `json:"containerSettings,omitempty"` - - // Storage Account settings. - StorageAccountSettings *StorageAccountConfiguration `json:"storageAccountSettings,omitempty"` - - // READ-ONLY; List of script outputs. - Outputs map[string]interface{} `json:"outputs,omitempty" azure:"ro"` - - // READ-ONLY; State of the script execution. This only appears in the response. - ProvisioningState *ScriptProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Contains the results of script execution. - Status *ScriptStatus `json:"status,omitempty" azure:"ro"` -} - -// DeploymentScriptUpdateParameter - Deployment script parameters to be updated. -type DeploymentScriptUpdateParameter struct { - // Resource tags to be updated. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; String Id used to locate any resource on Azure. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of this resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Type of this resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// EnvironmentVariable - The environment variable to pass to the script in the container instance. -type EnvironmentVariable struct { - // REQUIRED; The name of the environment variable. - Name *string `json:"name,omitempty"` - - // The value of the secure environment variable. - SecureValue *string `json:"secureValue,omitempty"` - - // The value of the environment variable. - Value *string `json:"value,omitempty"` -} - -// Error - Deployment scripts error response. -type Error struct { - // Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - // the OData error response format.) - Error *ErrorResponse `json:"error,omitempty"` -} - -// ErrorAdditionalInfo - The resource management error additional info. -type ErrorAdditionalInfo struct { - // READ-ONLY; The additional info. - Info interface{} `json:"info,omitempty" azure:"ro"` - - // READ-ONLY; The additional info type. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. -// (This also follows the OData error response format.) -type ErrorResponse struct { - // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` - - // READ-ONLY; The error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; The error details. - Details []*ErrorResponse `json:"details,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; The error target. - Target *string `json:"target,omitempty" azure:"ro"` -} - -// LogProperties - Script log properties. -type LogProperties struct { - // READ-ONLY; Script execution logs in text format. - Log *string `json:"log,omitempty" azure:"ro"` -} - -// ManagedServiceIdentity - Managed identity generic object. -type ManagedServiceIdentity struct { - // Type of the managed identity. - Type *ManagedServiceIdentityType `json:"type,omitempty"` - - // The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed - // identity. - UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` - - // READ-ONLY; ID of the Azure Active Directory. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// ScriptConfigurationBase - Common configuration settings for both Azure PowerShell and Azure CLI scripts. -type ScriptConfigurationBase struct { - // REQUIRED; Interval for which the service retains the script resource after it reaches a terminal state. Resource will be - // deleted when this duration expires. Duration is based on ISO 8601 pattern (for example - // P1D means one day). - RetentionInterval *string `json:"retentionInterval,omitempty"` - - // Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' - Arguments *string `json:"arguments,omitempty"` - - // The environment variables to pass over to the script. - EnvironmentVariables []*EnvironmentVariable `json:"environmentVariables,omitempty"` - - // Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be - // current time stamp or a GUID. - ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` - - // Uri for the script. This is the entry point for the external script. - PrimaryScriptURI *string `json:"primaryScriptUri,omitempty"` - - // Script body. - ScriptContent *string `json:"scriptContent,omitempty"` - - // Supporting files for the external script. - SupportingScriptUris []*string `json:"supportingScriptUris,omitempty"` - - // Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D - Timeout *string `json:"timeout,omitempty"` -} - -// ScriptLog - Script execution log object. -type ScriptLog struct { - // Script log properties. - Properties *LogProperties `json:"properties,omitempty"` - - // READ-ONLY; String Id used to locate any resource on Azure. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of this resource. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Type of this resource. - Type *string `json:"type,omitempty" azure:"ro"` -} - -// ScriptLogsList - Deployment script execution logs. -type ScriptLogsList struct { - // Deployment scripts logs. - Value []*ScriptLog `json:"value,omitempty"` -} - -// ScriptStatus - Generic object modeling results of script execution. -type ScriptStatus struct { - // Error that is relayed from the script execution. - Error *ErrorResponse `json:"error,omitempty"` - - // READ-ONLY; ACI resource Id. - ContainerInstanceID *string `json:"containerInstanceId,omitempty" azure:"ro"` - - // READ-ONLY; End time of the script execution. - EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` - - // READ-ONLY; Time the deployment script resource will expire. - ExpirationTime *time.Time `json:"expirationTime,omitempty" azure:"ro"` - - // READ-ONLY; Start time of the script execution. - StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` - - // READ-ONLY; Storage account resource Id. - StorageAccountID *string `json:"storageAccountId,omitempty" azure:"ro"` -} - -// StorageAccountConfiguration - Settings to use an existing storage account. Valid storage account kinds are: Storage, StorageV2 -// and FileStorage -type StorageAccountConfiguration struct { - // The storage account access key. - StorageAccountKey *string `json:"storageAccountKey,omitempty"` - - // The storage account name. - StorageAccountName *string `json:"storageAccountName,omitempty"` -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -// UserAssignedIdentity - User-assigned managed identity. -type UserAssignedIdentity struct { - // READ-ONLY; Client App Id associated with this identity. - ClientID *string `json:"clientId,omitempty" azure:"ro"` - - // READ-ONLY; Azure Active Directory principal ID associated with this identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_models_serde.go deleted file mode 100644 index fe13c598..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_models_serde.go +++ /dev/null @@ -1,383 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdeploymentscripts - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type AzureCliScript. -func (a AzureCliScript) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) - objectMap["kind"] = ScriptTypeAzureCLI - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureCliScript. -func (a *AzureCliScript) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &a.Identity) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &a.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureCliScriptProperties. -func (a AzureCliScriptProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "arguments", a.Arguments) - populate(objectMap, "azCliVersion", a.AzCliVersion) - populate(objectMap, "cleanupPreference", a.CleanupPreference) - populate(objectMap, "containerSettings", a.ContainerSettings) - populate(objectMap, "environmentVariables", a.EnvironmentVariables) - populate(objectMap, "forceUpdateTag", a.ForceUpdateTag) - populate(objectMap, "outputs", a.Outputs) - populate(objectMap, "primaryScriptUri", a.PrimaryScriptURI) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "retentionInterval", a.RetentionInterval) - populate(objectMap, "scriptContent", a.ScriptContent) - populate(objectMap, "status", a.Status) - populate(objectMap, "storageAccountSettings", a.StorageAccountSettings) - populate(objectMap, "supportingScriptUris", a.SupportingScriptUris) - populate(objectMap, "timeout", a.Timeout) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzurePowerShellScript. -func (a AzurePowerShellScript) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) - objectMap["kind"] = ScriptTypeAzurePowerShell - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzurePowerShellScript. -func (a *AzurePowerShellScript) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &a.Identity) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &a.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzurePowerShellScriptProperties. -func (a AzurePowerShellScriptProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "arguments", a.Arguments) - populate(objectMap, "azPowerShellVersion", a.AzPowerShellVersion) - populate(objectMap, "cleanupPreference", a.CleanupPreference) - populate(objectMap, "containerSettings", a.ContainerSettings) - populate(objectMap, "environmentVariables", a.EnvironmentVariables) - populate(objectMap, "forceUpdateTag", a.ForceUpdateTag) - populate(objectMap, "outputs", a.Outputs) - populate(objectMap, "primaryScriptUri", a.PrimaryScriptURI) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "retentionInterval", a.RetentionInterval) - populate(objectMap, "scriptContent", a.ScriptContent) - populate(objectMap, "status", a.Status) - populate(objectMap, "storageAccountSettings", a.StorageAccountSettings) - populate(objectMap, "supportingScriptUris", a.SupportingScriptUris) - populate(objectMap, "timeout", a.Timeout) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentScript. -func (d DeploymentScript) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "identity", d.Identity) - objectMap["kind"] = d.Kind - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentScriptListResult. -func (d *DeploymentScriptListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &d.NextLink) - delete(rawMsg, key) - case "value": - d.Value, err = unmarshalDeploymentScriptClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentScriptPropertiesBase. -func (d DeploymentScriptPropertiesBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cleanupPreference", d.CleanupPreference) - populate(objectMap, "containerSettings", d.ContainerSettings) - populate(objectMap, "outputs", d.Outputs) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "status", d.Status) - populate(objectMap, "storageAccountSettings", d.StorageAccountSettings) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DeploymentScriptUpdateParameter. -func (d DeploymentScriptUpdateParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. -func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "additionalInfo", e.AdditionalInfo) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. -func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ScriptConfigurationBase. -func (s ScriptConfigurationBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "arguments", s.Arguments) - populate(objectMap, "environmentVariables", s.EnvironmentVariables) - populate(objectMap, "forceUpdateTag", s.ForceUpdateTag) - populate(objectMap, "primaryScriptUri", s.PrimaryScriptURI) - populate(objectMap, "retentionInterval", s.RetentionInterval) - populate(objectMap, "scriptContent", s.ScriptContent) - populate(objectMap, "supportingScriptUris", s.SupportingScriptUris) - populate(objectMap, "timeout", s.Timeout) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ScriptStatus. -func (s ScriptStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerInstanceId", s.ContainerInstanceID) - populateTimeRFC3339(objectMap, "endTime", s.EndTime) - populate(objectMap, "error", s.Error) - populateTimeRFC3339(objectMap, "expirationTime", s.ExpirationTime) - populateTimeRFC3339(objectMap, "startTime", s.StartTime) - populate(objectMap, "storageAccountId", s.StorageAccountID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptStatus. -func (s *ScriptStatus) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "containerInstanceId": - err = unpopulate(val, "ContainerInstanceID", &s.ContainerInstanceID) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &s.EndTime) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &s.Error) - delete(rawMsg, key) - case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &s.ExpirationTime) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &s.StartTime) - delete(rawMsg, key) - case "storageAccountId": - err = unpopulate(val, "StorageAccountID", &s.StorageAccountID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_polymorphic_helpers.go deleted file mode 100644 index c4a54f97..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_polymorphic_helpers.go +++ /dev/null @@ -1,50 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdeploymentscripts - -import "encoding/json" - -func unmarshalDeploymentScriptClassification(rawMsg json.RawMessage) (DeploymentScriptClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]interface{} - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b DeploymentScriptClassification - switch m["kind"] { - case string(ScriptTypeAzureCLI): - b = &AzureCliScript{} - case string(ScriptTypeAzurePowerShell): - b = &AzurePowerShellScript{} - default: - b = &DeploymentScript{} - } - return b, json.Unmarshal(rawMsg, b) -} - -func unmarshalDeploymentScriptClassificationArray(rawMsg json.RawMessage) ([]DeploymentScriptClassification, error) { - if rawMsg == nil { - return nil, nil - } - var rawMessages []json.RawMessage - if err := json.Unmarshal(rawMsg, &rawMessages); err != nil { - return nil, err - } - fArray := make([]DeploymentScriptClassification, len(rawMessages)) - for index, rawMessage := range rawMessages { - f, err := unmarshalDeploymentScriptClassification(rawMessage) - if err != nil { - return nil, err - } - fArray[index] = f - } - return fArray, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_response_types.go deleted file mode 100644 index 61d0e619..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_response_types.go +++ /dev/null @@ -1,79 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdeploymentscripts - -// ClientCreateResponse contains the response from method Client.Create. -type ClientCreateResponse struct { - DeploymentScriptClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientCreateResponse. -func (c *ClientCreateResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalDeploymentScriptClassification(data) - if err != nil { - return err - } - c.DeploymentScriptClassification = res - return nil -} - -// ClientDeleteResponse contains the response from method Client.Delete. -type ClientDeleteResponse struct { - // placeholder for future response values -} - -// ClientGetLogsDefaultResponse contains the response from method Client.GetLogsDefault. -type ClientGetLogsDefaultResponse struct { - ScriptLog -} - -// ClientGetLogsResponse contains the response from method Client.GetLogs. -type ClientGetLogsResponse struct { - ScriptLogsList -} - -// ClientGetResponse contains the response from method Client.Get. -type ClientGetResponse struct { - DeploymentScriptClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientGetResponse. -func (c *ClientGetResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalDeploymentScriptClassification(data) - if err != nil { - return err - } - c.DeploymentScriptClassification = res - return nil -} - -// ClientListByResourceGroupResponse contains the response from method Client.ListByResourceGroup. -type ClientListByResourceGroupResponse struct { - DeploymentScriptListResult -} - -// ClientListBySubscriptionResponse contains the response from method Client.ListBySubscription. -type ClientListBySubscriptionResponse struct { - DeploymentScriptListResult -} - -// ClientUpdateResponse contains the response from method Client.Update. -type ClientUpdateResponse struct { - DeploymentScriptClassification -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ClientUpdateResponse. -func (c *ClientUpdateResponse) UnmarshalJSON(data []byte) error { - res, err := unmarshalDeploymentScriptClassification(data) - if err != nil { - return err - } - c.DeploymentScriptClassification = res - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_time_rfc3339.go deleted file mode 100644 index 71dc0525..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/zz_generated_time_rfc3339.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armdeploymentscripts - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/CHANGELOG.md index fa3cf068..625e3b73 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.8.0 (2025-04-08) +### Features Added + +- New value `ProvisioningStateAccepted` added to enum type `ProvisioningState` + + ## 1.7.0 (2025-02-27) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/README.md index 22f79112..9724799d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/README.md @@ -9,7 +9,7 @@ The `armstorage` module provides operations for working with Azure Storage. ## Prerequisites - an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) +- [Supported](https://aka.ms/azsdk/go/supported-versions) version of Go (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) ## Install the package diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/accounts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/accounts_client.go index fa6783e4..4597afad 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/accounts_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/accounts_client.go @@ -414,7 +414,7 @@ func (client *AccountsClient) deleteCreateRequest(ctx context.Context, resourceG // event of availability issues as Planned failover is only available while the // primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing // drills. This type of failover is invoked by setting FailoverType parameter to -// 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance +// 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance // If the operation fails it returns an *azcore.ResponseError type. // // Generated from API version 2024-01-01 @@ -448,7 +448,7 @@ func (client *AccountsClient) BeginFailover(ctx context.Context, resourceGroupNa // event of availability issues as Planned failover is only available while the // primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing // drills. This type of failover is invoked by setting FailoverType parameter to -// 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance +// 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/azure/storage/common/storage-disaster-recovery-guidance // If the operation fails it returns an *azcore.ResponseError type. // // Generated from API version 2024-01-01 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/autorest.md index 6fc36ed8..0ea98258 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/autorest.md @@ -5,10 +5,10 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/9d3547622288137fd36f086afcdaea5408dbe48c/specification/storage/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/9d3547622288137fd36f086afcdaea5408dbe48c/specification/storage/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/97ee23a6db6078abcbec7b75bf9af8c503e9bb8b/specification/storage/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/97ee23a6db6078abcbec7b75bf9af8c503e9bb8b/specification/storage/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.7.0 +module-version: 1.8.0 modelerfour: seal-single-value-enum-by-default: true tag: package-2024-01 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/ci.yml index 674a186b..f65cf924 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/ci.yml +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/ci.yml @@ -24,6 +24,5 @@ pr: extends: template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml parameters: - IncludeRelease: true ServiceDirectory: 'resourcemanager/storage/armstorage' UsePipelineProxy: false diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/constants.go index 2f84c377..f6160c2e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/constants.go @@ -7,7 +7,7 @@ package armstorage const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" - moduleVersion = "v1.7.0" + moduleVersion = "v1.8.0" ) // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' @@ -991,6 +991,7 @@ func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointSer type ProvisioningState string const ( + ProvisioningStateAccepted ProvisioningState = "Accepted" ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" @@ -1004,6 +1005,7 @@ const ( // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { return []ProvisioningState{ + ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreating, ProvisioningStateDeleting, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models.go index 320312c9..ed3c8e58 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/models.go @@ -2225,7 +2225,7 @@ type ManagementPolicyFilter struct { // ManagementPolicyProperties - The Storage Account ManagementPolicy properties. type ManagementPolicyProperties struct { - // REQUIRED; The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + // REQUIRED; The Storage Account ManagementPolicy, in JSON format. See more details in: https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview. Policy *ManagementPolicySchema // READ-ONLY; Returns the date and time the ManagementPolicies was last modified. @@ -2248,9 +2248,9 @@ type ManagementPolicyRule struct { Enabled *bool } -// ManagementPolicySchema - The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. +// ManagementPolicySchema - The Storage Account ManagementPolicies Rules. See more details in: https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview. type ManagementPolicySchema struct { - // REQUIRED; The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + // REQUIRED; The Storage Account ManagementPolicies Rules. See more details in: https://learn.microsoft.com/azure/storage/blobs/lifecycle-management-overview. Rules []*ManagementPolicyRule } @@ -3286,27 +3286,27 @@ type TaskReportInstance struct { type TaskReportProperties struct { // READ-ONLY; End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison // operators can be used as described for DateTime properties in - // https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + // https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators FinishTime *string // READ-ONLY; Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount // eq 0 and other comparison operators can be used as described for Numerical properties - // in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + // in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators ObjectFailedCount *string // READ-ONLY; Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as // objectsOperatedOnCount ge 100 and other comparison operators can be used as described for - // Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + // Numerical properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators ObjectsOperatedOnCount *string // READ-ONLY; Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount // gt 150 and other comparison operators can be used as described for Numerical - // properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + // properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators ObjectsSucceededCount *string // READ-ONLY; Total number of objects that meet the condition as defined in the storage task assignment execution context. // Filter options such as objectsTargetedCount gt 50 and other comparison operators can be - // used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + // used as described for Numerical properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators ObjectsTargetedCount *string // READ-ONLY; Represents the overall result of the execution for the run instance @@ -3320,7 +3320,7 @@ type TaskReportProperties struct { // READ-ONLY; Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other // comparison operators can be used as described for DateTime properties in - // https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + // https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators StartTime *string // READ-ONLY; Represents the Storage Account Id where the storage task definition was applied and executed. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/options.go index 8e84f38c..b0cbc5b2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/options.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/options.go @@ -610,8 +610,7 @@ type TableServicesClientSetServicePropertiesOptions struct { // method. type TaskAssignmentInstancesReportClientListOptions struct { // Optional. When specified, it can be used to query using reporting properties. See Constructing Filter Strings - // [https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings] for - // details. + // [https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings] for details. Filter *string // Optional, specifies the maximum number of storage task assignment instances to be included in the list response. @@ -651,8 +650,7 @@ type TaskAssignmentsClientListOptions struct { // method. type TaskAssignmentsInstancesReportClientListOptions struct { // Optional. When specified, it can be used to query using reporting properties. See Constructing Filter Strings - // [https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings] for - // details. + // [https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings] for details. Filter *string // Optional, specifies the maximum number of storage task assignment instances to be included in the list response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md deleted file mode 100644 index a74d127d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/CHANGELOG.md +++ /dev/null @@ -1,762 +0,0 @@ -# Release History - -## 1.0.0 (2022-05-17) -### Breaking Changes - -- Function `*StorageTargetsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[StorageTargetsClientDeleteResponse], error)` to `(*runtime.Poller[StorageTargetsClientDeleteResponse], error)` -- Function `*CachesClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[CachesClientDeleteResponse], error)` to `(*runtime.Poller[CachesClientDeleteResponse], error)` -- Function `*StorageTargetsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[StorageTargetsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[StorageTargetsClientCreateOrUpdateResponse], error)` -- Function `*StorageTargetClient.BeginSuspend` return value(s) have been changed from `(*armruntime.Poller[StorageTargetClientSuspendResponse], error)` to `(*runtime.Poller[StorageTargetClientSuspendResponse], error)` -- Function `*CachesClient.BeginDebugInfo` return value(s) have been changed from `(*armruntime.Poller[CachesClientDebugInfoResponse], error)` to `(*runtime.Poller[CachesClientDebugInfoResponse], error)` -- Function `*StorageTargetClient.BeginFlush` return value(s) have been changed from `(*armruntime.Poller[StorageTargetClientFlushResponse], error)` to `(*runtime.Poller[StorageTargetClientFlushResponse], error)` -- Function `*CachesClient.BeginStart` return value(s) have been changed from `(*armruntime.Poller[CachesClientStartResponse], error)` to `(*runtime.Poller[CachesClientStartResponse], error)` -- Function `*CachesClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[CachesClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[CachesClientCreateOrUpdateResponse], error)` -- Function `*CachesClient.BeginFlush` return value(s) have been changed from `(*armruntime.Poller[CachesClientFlushResponse], error)` to `(*runtime.Poller[CachesClientFlushResponse], error)` -- Function `*CachesClient.BeginStop` return value(s) have been changed from `(*armruntime.Poller[CachesClientStopResponse], error)` to `(*runtime.Poller[CachesClientStopResponse], error)` -- Function `*CachesClient.BeginUpgradeFirmware` return value(s) have been changed from `(*armruntime.Poller[CachesClientUpgradeFirmwareResponse], error)` to `(*runtime.Poller[CachesClientUpgradeFirmwareResponse], error)` -- Function `*StorageTargetClient.BeginResume` return value(s) have been changed from `(*armruntime.Poller[StorageTargetClientResumeResponse], error)` to `(*runtime.Poller[StorageTargetClientResumeResponse], error)` -- Function `*StorageTargetsClient.BeginDNSRefresh` return value(s) have been changed from `(*armruntime.Poller[StorageTargetsClientDNSRefreshResponse], error)` to `(*runtime.Poller[StorageTargetsClientDNSRefreshResponse], error)` -- Function `*StorageTargetClient.BeginInvalidate` return value(s) have been changed from `(*armruntime.Poller[StorageTargetClientInvalidateResponse], error)` to `(*runtime.Poller[StorageTargetClientInvalidateResponse], error)` -- Function `CloudErrorBody.MarshalJSON` has been removed -- Function `ResourceSKUsResult.MarshalJSON` has been removed -- Function `StorageTargetsResult.MarshalJSON` has been removed -- Function `APIOperationListResult.MarshalJSON` has been removed -- Function `Restriction.MarshalJSON` has been removed -- Function `AscOperationProperties.MarshalJSON` has been removed -- Function `ResourceSKU.MarshalJSON` has been removed -- Function `ResourceSKULocationInfo.MarshalJSON` has been removed -- Function `UsageModelsResult.MarshalJSON` has been removed -- Function `APIOperationPropertiesServiceSpecification.MarshalJSON` has been removed -- Function `MetricSpecification.MarshalJSON` has been removed -- Function `ResourceUsagesListResult.MarshalJSON` has been removed -- Function `CachesListResult.MarshalJSON` has been removed - - -## 0.4.0 (2022-04-18) -### Breaking Changes - -- Function `*CachesClient.ListByResourceGroup` has been removed -- Function `*UsageModelsClient.List` has been removed -- Function `*CachesClient.List` has been removed -- Function `*OperationsClient.List` has been removed -- Function `*SKUsClient.List` has been removed -- Function `*StorageTargetsClient.ListByCache` has been removed -- Function `*AscUsagesClient.List` has been removed - -### Features Added - -- New function `*AscUsagesClient.NewListPager(string, *AscUsagesClientListOptions) *runtime.Pager[AscUsagesClientListResponse]` -- New function `*OperationsClient.NewListPager(*OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]` -- New function `*UsageModelsClient.NewListPager(*UsageModelsClientListOptions) *runtime.Pager[UsageModelsClientListResponse]` -- New function `*CachesClient.NewListPager(*CachesClientListOptions) *runtime.Pager[CachesClientListResponse]` -- New function `*SKUsClient.NewListPager(*SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]` -- New function `*StorageTargetsClient.NewListByCachePager(string, string, *StorageTargetsClientListByCacheOptions) *runtime.Pager[StorageTargetsClientListByCacheResponse]` -- New function `*CachesClient.NewListByResourceGroupPager(string, *CachesClientListByResourceGroupOptions) *runtime.Pager[CachesClientListByResourceGroupResponse]` - - -## 0.3.0 (2022-04-13) -### Breaking Changes - -- Function `*SKUsClient.List` return value(s) have been changed from `(*SKUsClientListPager)` to `(*runtime.Pager[SKUsClientListResponse])` -- Function `*CachesClient.ListByResourceGroup` return value(s) have been changed from `(*CachesClientListByResourceGroupPager)` to `(*runtime.Pager[CachesClientListByResourceGroupResponse])` -- Function `*CachesClient.BeginFlush` return value(s) have been changed from `(CachesClientFlushPollerResponse, error)` to `(*armruntime.Poller[CachesClientFlushResponse], error)` -- Function `NewStorageTargetsClient` return value(s) have been changed from `(*StorageTargetsClient)` to `(*StorageTargetsClient, error)` -- Function `NewCachesClient` return value(s) have been changed from `(*CachesClient)` to `(*CachesClient, error)` -- Function `*CachesClient.BeginUpgradeFirmware` return value(s) have been changed from `(CachesClientUpgradeFirmwarePollerResponse, error)` to `(*armruntime.Poller[CachesClientUpgradeFirmwareResponse], error)` -- Function `*CachesClient.BeginStart` return value(s) have been changed from `(CachesClientStartPollerResponse, error)` to `(*armruntime.Poller[CachesClientStartResponse], error)` -- Function `*CachesClient.BeginStop` return value(s) have been changed from `(CachesClientStopPollerResponse, error)` to `(*armruntime.Poller[CachesClientStopResponse], error)` -- Function `*StorageTargetClient.BeginResume` return value(s) have been changed from `(StorageTargetClientResumePollerResponse, error)` to `(*armruntime.Poller[StorageTargetClientResumeResponse], error)` -- Function `*StorageTargetsClient.BeginDNSRefresh` return value(s) have been changed from `(StorageTargetsClientDNSRefreshPollerResponse, error)` to `(*armruntime.Poller[StorageTargetsClientDNSRefreshResponse], error)` -- Function `*StorageTargetClient.BeginFlush` return value(s) have been changed from `(StorageTargetClientFlushPollerResponse, error)` to `(*armruntime.Poller[StorageTargetClientFlushResponse], error)` -- Function `*CachesClient.BeginDebugInfo` return value(s) have been changed from `(CachesClientDebugInfoPollerResponse, error)` to `(*armruntime.Poller[CachesClientDebugInfoResponse], error)` -- Function `*StorageTargetsClient.BeginCreateOrUpdate` return value(s) have been changed from `(StorageTargetsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[StorageTargetsClientCreateOrUpdateResponse], error)` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsClientListPager)` to `(*runtime.Pager[OperationsClientListResponse])` -- Function `NewSKUsClient` return value(s) have been changed from `(*SKUsClient)` to `(*SKUsClient, error)` -- Function `*UsageModelsClient.List` return value(s) have been changed from `(*UsageModelsClientListPager)` to `(*runtime.Pager[UsageModelsClientListResponse])` -- Function `NewUsageModelsClient` return value(s) have been changed from `(*UsageModelsClient)` to `(*UsageModelsClient, error)` -- Function `*CachesClient.List` return value(s) have been changed from `(*CachesClientListPager)` to `(*runtime.Pager[CachesClientListResponse])` -- Function `*StorageTargetsClient.BeginDelete` return value(s) have been changed from `(StorageTargetsClientDeletePollerResponse, error)` to `(*armruntime.Poller[StorageTargetsClientDeleteResponse], error)` -- Function `*StorageTargetsClient.ListByCache` return value(s) have been changed from `(*StorageTargetsClientListByCachePager)` to `(*runtime.Pager[StorageTargetsClientListByCacheResponse])` -- Function `*StorageTargetClient.BeginSuspend` return value(s) have been changed from `(StorageTargetClientSuspendPollerResponse, error)` to `(*armruntime.Poller[StorageTargetClientSuspendResponse], error)` -- Function `NewOperationsClient` return value(s) have been changed from `(*OperationsClient)` to `(*OperationsClient, error)` -- Function `NewAscOperationsClient` return value(s) have been changed from `(*AscOperationsClient)` to `(*AscOperationsClient, error)` -- Function `*CachesClient.BeginCreateOrUpdate` return value(s) have been changed from `(CachesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[CachesClientCreateOrUpdateResponse], error)` -- Function `*CachesClient.BeginDelete` return value(s) have been changed from `(CachesClientDeletePollerResponse, error)` to `(*armruntime.Poller[CachesClientDeleteResponse], error)` -- Function `NewStorageTargetClient` return value(s) have been changed from `(*StorageTargetClient)` to `(*StorageTargetClient, error)` -- Type of `AscOperationProperties.Output` has been changed from `map[string]map[string]interface{}` to `map[string]interface{}` -- Function `ProvisioningStateType.ToPtr` has been removed -- Function `*CachesClientDeletePoller.Done` has been removed -- Function `*StorageTargetsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*StorageTargetClientFlushPoller.ResumeToken` has been removed -- Function `*StorageTargetsClientDeletePoller.Poll` has been removed -- Function `HealthStateType.ToPtr` has been removed -- Function `DomainJoinedType.ToPtr` has been removed -- Function `*SKUsClientListPager.PageResponse` has been removed -- Function `*CachesClientStartPoller.Done` has been removed -- Function `CachesClientDebugInfoPollerResponse.PollUntilDone` has been removed -- Function `*OperationsClientListPager.PageResponse` has been removed -- Function `StorageTargetsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*CachesClientStartPoller.ResumeToken` has been removed -- Function `*StorageTargetsClientDNSRefreshPoller.Done` has been removed -- Function `*CachesClientUpgradeFirmwarePoller.ResumeToken` has been removed -- Function `*StorageTargetsClientDeletePoller.FinalResponse` has been removed -- Function `StorageTargetsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*StorageTargetsClientDNSRefreshPoller.ResumeToken` has been removed -- Function `*StorageTargetsClientDNSRefreshPoller.FinalResponse` has been removed -- Function `*CachesClientStopPoller.ResumeToken` has been removed -- Function `*CachesClientDeletePoller.Poll` has been removed -- Function `*StorageTargetsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*UsageModelsClientListPager.NextPage` has been removed -- Function `StorageTargetClientSuspendPollerResponse.PollUntilDone` has been removed -- Function `*StorageTargetsClientDeletePollerResponse.Resume` has been removed -- Function `*CachesClientDebugInfoPollerResponse.Resume` has been removed -- Function `*StorageTargetClientFlushPollerResponse.Resume` has been removed -- Function `*StorageTargetsClientListByCachePager.PageResponse` has been removed -- Function `CreatedByType.ToPtr` has been removed -- Function `*StorageTargetClientFlushPoller.FinalResponse` has been removed -- Function `*CachesClientFlushPollerResponse.Resume` has been removed -- Function `*StorageTargetClientFlushPoller.Poll` has been removed -- Function `*CachesClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*StorageTargetClientResumePollerResponse.Resume` has been removed -- Function `*CachesClientDebugInfoPoller.ResumeToken` has been removed -- Function `*CachesClientFlushPoller.Done` has been removed -- Function `CachesClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*StorageTargetClientResumePoller.Poll` has been removed -- Function `*CachesClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*CachesClientCreateOrUpdatePoller.Poll` has been removed -- Function `*UsageModelsClientListPager.Err` has been removed -- Function `*CachesClientDebugInfoPoller.FinalResponse` has been removed -- Function `*CachesClientUpgradeFirmwarePoller.Poll` has been removed -- Function `*CachesClientUpgradeFirmwarePoller.FinalResponse` has been removed -- Function `*StorageTargetsClientListByCachePager.NextPage` has been removed -- Function `*StorageTargetClientSuspendPoller.Done` has been removed -- Function `*CachesClientListPager.NextPage` has been removed -- Function `*CachesClientDeletePoller.FinalResponse` has been removed -- Function `*CachesClientStartPollerResponse.Resume` has been removed -- Function `UsernameDownloadedType.ToPtr` has been removed -- Function `*StorageTargetsClientDeletePoller.Done` has been removed -- Function `*OperationsClientListPager.NextPage` has been removed -- Function `*StorageTargetClientSuspendPoller.FinalResponse` has been removed -- Function `*CachesClientDebugInfoPoller.Poll` has been removed -- Function `*StorageTargetsClientListByCachePager.Err` has been removed -- Function `*StorageTargetsClientDNSRefreshPollerResponse.Resume` has been removed -- Function `CacheIdentityType.ToPtr` has been removed -- Function `CachesClientStartPollerResponse.PollUntilDone` has been removed -- Function `*CachesClientStopPollerResponse.Resume` has been removed -- Function `CachesClientFlushPollerResponse.PollUntilDone` has been removed -- Function `*CachesClientStopPoller.Done` has been removed -- Function `OperationalStateType.ToPtr` has been removed -- Function `NfsAccessRuleScope.ToPtr` has been removed -- Function `*CachesClientUpgradeFirmwarePoller.Done` has been removed -- Function `*StorageTargetClientSuspendPoller.ResumeToken` has been removed -- Function `*CachesClientUpgradeFirmwarePollerResponse.Resume` has been removed -- Function `*OperationsClientListPager.Err` has been removed -- Function `*CachesClientStopPoller.FinalResponse` has been removed -- Function `CachesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*CachesClientListPager.Err` has been removed -- Function `*StorageTargetClientSuspendPollerResponse.Resume` has been removed -- Function `ReasonCode.ToPtr` has been removed -- Function `*CachesClientDeletePoller.ResumeToken` has been removed -- Function `*CachesClientDebugInfoPoller.Done` has been removed -- Function `*UsageModelsClientListPager.PageResponse` has been removed -- Function `*StorageTargetsClientCreateOrUpdatePoller.Done` has been removed -- Function `*StorageTargetClientResumePoller.Done` has been removed -- Function `*CachesClientStopPoller.Poll` has been removed -- Function `*StorageTargetClientSuspendPoller.Poll` has been removed -- Function `*CachesClientListByResourceGroupPager.Err` has been removed -- Function `*CachesClientStartPoller.Poll` has been removed -- Function `*CachesClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*StorageTargetClientResumePoller.ResumeToken` has been removed -- Function `FirmwareStatusType.ToPtr` has been removed -- Function `*CachesClientFlushPoller.ResumeToken` has been removed -- Function `UsernameSource.ToPtr` has been removed -- Function `*CachesClientFlushPoller.Poll` has been removed -- Function `*StorageTargetsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*CachesClientListByResourceGroupPager.PageResponse` has been removed -- Function `StorageTargetClientFlushPollerResponse.PollUntilDone` has been removed -- Function `*StorageTargetsClientDeletePoller.ResumeToken` has been removed -- Function `StorageTargetsClientDNSRefreshPollerResponse.PollUntilDone` has been removed -- Function `StorageTargetType.ToPtr` has been removed -- Function `*CachesClientFlushPoller.FinalResponse` has been removed -- Function `*CachesClientStartPoller.FinalResponse` has been removed -- Function `*SKUsClientListPager.NextPage` has been removed -- Function `*CachesClientDeletePollerResponse.Resume` has been removed -- Function `*StorageTargetClientFlushPoller.Done` has been removed -- Function `CachesClientUpgradeFirmwarePollerResponse.PollUntilDone` has been removed -- Function `*StorageTargetsClientDNSRefreshPoller.Poll` has been removed -- Function `*SKUsClientListPager.Err` has been removed -- Function `*StorageTargetsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `MetricAggregationType.ToPtr` has been removed -- Function `CachesClientStopPollerResponse.PollUntilDone` has been removed -- Function `NfsAccessRuleAccess.ToPtr` has been removed -- Function `*CachesClientListPager.PageResponse` has been removed -- Function `*StorageTargetClientResumePoller.FinalResponse` has been removed -- Function `*CachesClientCreateOrUpdatePoller.Done` has been removed -- Function `StorageTargetClientResumePollerResponse.PollUntilDone` has been removed -- Function `*CachesClientListByResourceGroupPager.NextPage` has been removed -- Struct `AscOperationsClientGetResult` has been removed -- Struct `CachesClientCreateOrUpdatePoller` has been removed -- Struct `CachesClientCreateOrUpdatePollerResponse` has been removed -- Struct `CachesClientCreateOrUpdateResult` has been removed -- Struct `CachesClientDebugInfoPoller` has been removed -- Struct `CachesClientDebugInfoPollerResponse` has been removed -- Struct `CachesClientDeletePoller` has been removed -- Struct `CachesClientDeletePollerResponse` has been removed -- Struct `CachesClientFlushPoller` has been removed -- Struct `CachesClientFlushPollerResponse` has been removed -- Struct `CachesClientGetResult` has been removed -- Struct `CachesClientListByResourceGroupPager` has been removed -- Struct `CachesClientListByResourceGroupResult` has been removed -- Struct `CachesClientListPager` has been removed -- Struct `CachesClientListResult` has been removed -- Struct `CachesClientStartPoller` has been removed -- Struct `CachesClientStartPollerResponse` has been removed -- Struct `CachesClientStopPoller` has been removed -- Struct `CachesClientStopPollerResponse` has been removed -- Struct `CachesClientUpdateResult` has been removed -- Struct `CachesClientUpgradeFirmwarePoller` has been removed -- Struct `CachesClientUpgradeFirmwarePollerResponse` has been removed -- Struct `OperationsClientListPager` has been removed -- Struct `OperationsClientListResult` has been removed -- Struct `SKUsClientListPager` has been removed -- Struct `SKUsClientListResult` has been removed -- Struct `StorageTargetClientFlushPoller` has been removed -- Struct `StorageTargetClientFlushPollerResponse` has been removed -- Struct `StorageTargetClientResumePoller` has been removed -- Struct `StorageTargetClientResumePollerResponse` has been removed -- Struct `StorageTargetClientSuspendPoller` has been removed -- Struct `StorageTargetClientSuspendPollerResponse` has been removed -- Struct `StorageTargetsClientCreateOrUpdatePoller` has been removed -- Struct `StorageTargetsClientCreateOrUpdatePollerResponse` has been removed -- Struct `StorageTargetsClientCreateOrUpdateResult` has been removed -- Struct `StorageTargetsClientDNSRefreshPoller` has been removed -- Struct `StorageTargetsClientDNSRefreshPollerResponse` has been removed -- Struct `StorageTargetsClientDeletePoller` has been removed -- Struct `StorageTargetsClientDeletePollerResponse` has been removed -- Struct `StorageTargetsClientGetResult` has been removed -- Struct `StorageTargetsClientListByCachePager` has been removed -- Struct `StorageTargetsClientListByCacheResult` has been removed -- Struct `UsageModelsClientListPager` has been removed -- Struct `UsageModelsClientListResult` has been removed -- Field `StorageTargetsClientGetResult` of struct `StorageTargetsClientGetResponse` has been removed -- Field `RawResponse` of struct `StorageTargetsClientGetResponse` has been removed -- Field `SKUsClientListResult` of struct `SKUsClientListResponse` has been removed -- Field `RawResponse` of struct `SKUsClientListResponse` has been removed -- Field `CachesClientListResult` of struct `CachesClientListResponse` has been removed -- Field `RawResponse` of struct `CachesClientListResponse` has been removed -- Field `UsageModelsClientListResult` of struct `UsageModelsClientListResponse` has been removed -- Field `RawResponse` of struct `UsageModelsClientListResponse` has been removed -- Field `CachesClientCreateOrUpdateResult` of struct `CachesClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `CachesClientCreateOrUpdateResponse` has been removed -- Field `CachesClientListByResourceGroupResult` of struct `CachesClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `CachesClientListByResourceGroupResponse` has been removed -- Field `CachesClientGetResult` of struct `CachesClientGetResponse` has been removed -- Field `RawResponse` of struct `CachesClientGetResponse` has been removed -- Field `RawResponse` of struct `CachesClientFlushResponse` has been removed -- Field `OperationsClientListResult` of struct `OperationsClientListResponse` has been removed -- Field `RawResponse` of struct `OperationsClientListResponse` has been removed -- Field `RawResponse` of struct `StorageTargetsClientDNSRefreshResponse` has been removed -- Field `StorageTargetsClientCreateOrUpdateResult` of struct `StorageTargetsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `StorageTargetsClientCreateOrUpdateResponse` has been removed -- Field `AscOperationsClientGetResult` of struct `AscOperationsClientGetResponse` has been removed -- Field `RawResponse` of struct `AscOperationsClientGetResponse` has been removed -- Field `CachesClientUpdateResult` of struct `CachesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `CachesClientUpdateResponse` has been removed -- Field `RawResponse` of struct `StorageTargetClientSuspendResponse` has been removed -- Field `RawResponse` of struct `CachesClientStartResponse` has been removed -- Field `RawResponse` of struct `StorageTargetsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `StorageTargetClientFlushResponse` has been removed -- Field `RawResponse` of struct `StorageTargetClientResumeResponse` has been removed -- Field `StorageTargetsClientListByCacheResult` of struct `StorageTargetsClientListByCacheResponse` has been removed -- Field `RawResponse` of struct `StorageTargetsClientListByCacheResponse` has been removed -- Field `RawResponse` of struct `CachesClientUpgradeFirmwareResponse` has been removed -- Field `RawResponse` of struct `CachesClientStopResponse` has been removed -- Field `RawResponse` of struct `CachesClientDeleteResponse` has been removed -- Field `RawResponse` of struct `CachesClientDebugInfoResponse` has been removed - -### Features Added - -- New function `NewAscUsagesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AscUsagesClient, error)` -- New function `*AscUsagesClient.List(string, *AscUsagesClientListOptions) *runtime.Pager[AscUsagesClientListResponse]` -- New function `*StorageTargetClient.BeginInvalidate(context.Context, string, string, string, *StorageTargetClientBeginInvalidateOptions) (*armruntime.Poller[StorageTargetClientInvalidateResponse], error)` -- New function `ResourceUsagesListResult.MarshalJSON() ([]byte, error)` -- New struct `AscUsagesClient` -- New struct `AscUsagesClientListOptions` -- New struct `AscUsagesClientListResponse` -- New struct `ResourceUsage` -- New struct `ResourceUsageName` -- New struct `ResourceUsagesListResult` -- New struct `StorageTargetClientBeginInvalidateOptions` -- New struct `StorageTargetClientInvalidateResponse` -- New anonymous field `CachesListResult` in struct `CachesClientListByResourceGroupResponse` -- New anonymous field `Cache` in struct `CachesClientGetResponse` -- New field `ResumeToken` in struct `StorageTargetClientBeginSuspendOptions` -- New field `ResumeToken` in struct `CachesClientBeginCreateOrUpdateOptions` -- New field `ResumeToken` in struct `CachesClientBeginUpgradeFirmwareOptions` -- New field `ResumeToken` in struct `StorageTargetsClientBeginCreateOrUpdateOptions` -- New anonymous field `ResourceSKUsResult` in struct `SKUsClientListResponse` -- New field `ResumeToken` in struct `StorageTargetsClientBeginDNSRefreshOptions` -- New field `ResumeToken` in struct `CachesClientBeginStopOptions` -- New field `ResumeToken` in struct `CachesClientBeginDeleteOptions` -- New field `ResumeToken` in struct `StorageTargetClientBeginResumeOptions` -- New field `ResumeToken` in struct `StorageTargetClientBeginFlushOptions` -- New field `ResumeToken` in struct `CachesClientBeginDebugInfoOptions` -- New anonymous field `APIOperationListResult` in struct `OperationsClientListResponse` -- New anonymous field `Cache` in struct `CachesClientCreateOrUpdateResponse` -- New anonymous field `StorageTarget` in struct `StorageTargetsClientGetResponse` -- New anonymous field `AscOperation` in struct `AscOperationsClientGetResponse` -- New field `ResumeToken` in struct `StorageTargetsClientBeginDeleteOptions` -- New field `Zones` in struct `CacheProperties` -- New anonymous field `StorageTarget` in struct `StorageTargetsClientCreateOrUpdateResponse` -- New anonymous field `Cache` in struct `CachesClientUpdateResponse` -- New field `ResumeToken` in struct `CachesClientBeginFlushOptions` -- New anonymous field `CachesListResult` in struct `CachesClientListResponse` -- New anonymous field `UsageModelsResult` in struct `UsageModelsClientListResponse` -- New field `ResumeToken` in struct `CachesClientBeginStartOptions` -- New anonymous field `StorageTargetsResult` in struct `StorageTargetsClientListByCacheResponse` - - -## 0.2.1 (2022-02-22) - -### Other Changes - -- Remove the go_mod_tidy_hack.go file. - -## 0.2.0 (2022-01-13) -### Breaking Changes - -- Function `*CachesClient.BeginStop` parameter(s) have been changed from `(context.Context, string, string, *CachesBeginStopOptions)` to `(context.Context, string, string, *CachesClientBeginStopOptions)` -- Function `*CachesClient.BeginStop` return value(s) have been changed from `(CachesStopPollerResponse, error)` to `(CachesClientStopPollerResponse, error)` -- Function `*StorageTargetsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *StorageTargetsBeginDeleteOptions)` to `(context.Context, string, string, string, *StorageTargetsClientBeginDeleteOptions)` -- Function `*StorageTargetsClient.BeginDelete` return value(s) have been changed from `(StorageTargetsDeletePollerResponse, error)` to `(StorageTargetsClientDeletePollerResponse, error)` -- Function `*CachesClient.BeginUpgradeFirmware` parameter(s) have been changed from `(context.Context, string, string, *CachesBeginUpgradeFirmwareOptions)` to `(context.Context, string, string, *CachesClientBeginUpgradeFirmwareOptions)` -- Function `*CachesClient.BeginUpgradeFirmware` return value(s) have been changed from `(CachesUpgradeFirmwarePollerResponse, error)` to `(CachesClientUpgradeFirmwarePollerResponse, error)` -- Function `*StorageTargetClient.BeginResume` parameter(s) have been changed from `(context.Context, string, string, string, *StorageTargetBeginResumeOptions)` to `(context.Context, string, string, string, *StorageTargetClientBeginResumeOptions)` -- Function `*StorageTargetClient.BeginResume` return value(s) have been changed from `(StorageTargetResumePollerResponse, error)` to `(StorageTargetClientResumePollerResponse, error)` -- Function `*CachesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, *CachesBeginCreateOrUpdateOptions)` to `(context.Context, string, string, *CachesClientBeginCreateOrUpdateOptions)` -- Function `*CachesClient.BeginCreateOrUpdate` return value(s) have been changed from `(CachesCreateOrUpdatePollerResponse, error)` to `(CachesClientCreateOrUpdatePollerResponse, error)` -- Function `*CachesClient.BeginDebugInfo` parameter(s) have been changed from `(context.Context, string, string, *CachesBeginDebugInfoOptions)` to `(context.Context, string, string, *CachesClientBeginDebugInfoOptions)` -- Function `*CachesClient.BeginDebugInfo` return value(s) have been changed from `(CachesDebugInfoPollerResponse, error)` to `(CachesClientDebugInfoPollerResponse, error)` -- Function `*CachesClient.List` parameter(s) have been changed from `(*CachesListOptions)` to `(*CachesClientListOptions)` -- Function `*CachesClient.List` return value(s) have been changed from `(*CachesListPager)` to `(*CachesClientListPager)` -- Function `*StorageTargetClient.BeginFlush` parameter(s) have been changed from `(context.Context, string, string, string, *StorageTargetBeginFlushOptions)` to `(context.Context, string, string, string, *StorageTargetClientBeginFlushOptions)` -- Function `*StorageTargetClient.BeginFlush` return value(s) have been changed from `(StorageTargetFlushPollerResponse, error)` to `(StorageTargetClientFlushPollerResponse, error)` -- Function `*CachesClient.Update` parameter(s) have been changed from `(context.Context, string, string, *CachesUpdateOptions)` to `(context.Context, string, string, *CachesClientUpdateOptions)` -- Function `*CachesClient.Update` return value(s) have been changed from `(CachesUpdateResponse, error)` to `(CachesClientUpdateResponse, error)` -- Function `*AscOperationsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *AscOperationsGetOptions)` to `(context.Context, string, string, *AscOperationsClientGetOptions)` -- Function `*AscOperationsClient.Get` return value(s) have been changed from `(AscOperationsGetResponse, error)` to `(AscOperationsClientGetResponse, error)` -- Function `*CachesClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *CachesBeginDeleteOptions)` to `(context.Context, string, string, *CachesClientBeginDeleteOptions)` -- Function `*CachesClient.BeginDelete` return value(s) have been changed from `(CachesDeletePollerResponse, error)` to `(CachesClientDeletePollerResponse, error)` -- Function `*SKUsClient.List` parameter(s) have been changed from `(*SKUsListOptions)` to `(*SKUsClientListOptions)` -- Function `*SKUsClient.List` return value(s) have been changed from `(*SKUsListPager)` to `(*SKUsClientListPager)` -- Function `*StorageTargetsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *StorageTargetsGetOptions)` to `(context.Context, string, string, string, *StorageTargetsClientGetOptions)` -- Function `*StorageTargetsClient.Get` return value(s) have been changed from `(StorageTargetsGetResponse, error)` to `(StorageTargetsClientGetResponse, error)` -- Function `*OperationsClient.List` parameter(s) have been changed from `(*OperationsListOptions)` to `(*OperationsClientListOptions)` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsListPager)` to `(*OperationsClientListPager)` -- Function `*StorageTargetClient.BeginSuspend` parameter(s) have been changed from `(context.Context, string, string, string, *StorageTargetBeginSuspendOptions)` to `(context.Context, string, string, string, *StorageTargetClientBeginSuspendOptions)` -- Function `*StorageTargetClient.BeginSuspend` return value(s) have been changed from `(StorageTargetSuspendPollerResponse, error)` to `(StorageTargetClientSuspendPollerResponse, error)` -- Function `*CachesClient.BeginFlush` parameter(s) have been changed from `(context.Context, string, string, *CachesBeginFlushOptions)` to `(context.Context, string, string, *CachesClientBeginFlushOptions)` -- Function `*CachesClient.BeginFlush` return value(s) have been changed from `(CachesFlushPollerResponse, error)` to `(CachesClientFlushPollerResponse, error)` -- Function `*UsageModelsClient.List` parameter(s) have been changed from `(*UsageModelsListOptions)` to `(*UsageModelsClientListOptions)` -- Function `*UsageModelsClient.List` return value(s) have been changed from `(*UsageModelsListPager)` to `(*UsageModelsClientListPager)` -- Function `*CachesClient.ListByResourceGroup` parameter(s) have been changed from `(string, *CachesListByResourceGroupOptions)` to `(string, *CachesClientListByResourceGroupOptions)` -- Function `*CachesClient.ListByResourceGroup` return value(s) have been changed from `(*CachesListByResourceGroupPager)` to `(*CachesClientListByResourceGroupPager)` -- Function `*StorageTargetsClient.BeginDNSRefresh` parameter(s) have been changed from `(context.Context, string, string, string, *StorageTargetsBeginDNSRefreshOptions)` to `(context.Context, string, string, string, *StorageTargetsClientBeginDNSRefreshOptions)` -- Function `*StorageTargetsClient.BeginDNSRefresh` return value(s) have been changed from `(StorageTargetsDNSRefreshPollerResponse, error)` to `(StorageTargetsClientDNSRefreshPollerResponse, error)` -- Function `*StorageTargetsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, *StorageTargetsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, *StorageTargetsClientBeginCreateOrUpdateOptions)` -- Function `*StorageTargetsClient.BeginCreateOrUpdate` return value(s) have been changed from `(StorageTargetsCreateOrUpdatePollerResponse, error)` to `(StorageTargetsClientCreateOrUpdatePollerResponse, error)` -- Function `*StorageTargetsClient.ListByCache` parameter(s) have been changed from `(string, string, *StorageTargetsListByCacheOptions)` to `(string, string, *StorageTargetsClientListByCacheOptions)` -- Function `*StorageTargetsClient.ListByCache` return value(s) have been changed from `(*StorageTargetsListByCachePager)` to `(*StorageTargetsClientListByCachePager)` -- Function `*CachesClient.BeginStart` parameter(s) have been changed from `(context.Context, string, string, *CachesBeginStartOptions)` to `(context.Context, string, string, *CachesClientBeginStartOptions)` -- Function `*CachesClient.BeginStart` return value(s) have been changed from `(CachesStartPollerResponse, error)` to `(CachesClientStartPollerResponse, error)` -- Function `*CachesClient.Get` parameter(s) have been changed from `(context.Context, string, string, *CachesGetOptions)` to `(context.Context, string, string, *CachesClientGetOptions)` -- Function `*CachesClient.Get` return value(s) have been changed from `(CachesGetResponse, error)` to `(CachesClientGetResponse, error)` -- Function `*CachesFlushPoller.FinalResponse` has been removed -- Function `*SKUsListPager.Err` has been removed -- Function `*CachesDeletePoller.Done` has been removed -- Function `*OperationsListPager.PageResponse` has been removed -- Function `StorageTargetFlushPollerResponse.PollUntilDone` has been removed -- Function `*UsageModelsListPager.NextPage` has been removed -- Function `*StorageTargetsDNSRefreshPoller.FinalResponse` has been removed -- Function `*CachesDeletePoller.ResumeToken` has been removed -- Function `*CachesCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*StorageTargetFlushPoller.Poll` has been removed -- Function `*StorageTargetResumePoller.ResumeToken` has been removed -- Function `*StorageTargetSuspendPoller.FinalResponse` has been removed -- Function `*CachesFlushPoller.Done` has been removed -- Function `CachesUpgradeFirmwarePollerResponse.PollUntilDone` has been removed -- Function `*StorageTargetsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*StorageTargetSuspendPoller.Poll` has been removed -- Function `*CachesStartPollerResponse.Resume` has been removed -- Function `*StorageTargetSuspendPollerResponse.Resume` has been removed -- Function `*StorageTargetsDeletePoller.FinalResponse` has been removed -- Function `*CachesDebugInfoPoller.Done` has been removed -- Function `*CachesStartPoller.Done` has been removed -- Function `CachesStopPollerResponse.PollUntilDone` has been removed -- Function `*CachesDebugInfoPoller.FinalResponse` has been removed -- Function `*CachesUpgradeFirmwarePollerResponse.Resume` has been removed -- Function `*CachesListByResourceGroupPager.Err` has been removed -- Function `StorageTargetsDeletePollerResponse.PollUntilDone` has been removed -- Function `*StorageTargetResumePollerResponse.Resume` has been removed -- Function `*CachesDebugInfoPoller.Poll` has been removed -- Function `*StorageTargetsListByCachePager.PageResponse` has been removed -- Function `*CachesListPager.NextPage` has been removed -- Function `*StorageTargetsDNSRefreshPollerResponse.Resume` has been removed -- Function `*StorageTargetsDeletePoller.Poll` has been removed -- Function `StorageTargetSuspendPollerResponse.PollUntilDone` has been removed -- Function `*StorageTargetsCreateOrUpdatePoller.Poll` has been removed -- Function `CachesDebugInfoPollerResponse.PollUntilDone` has been removed -- Function `*UsageModelsListPager.Err` has been removed -- Function `*CachesStartPoller.FinalResponse` has been removed -- Function `*CachesListByResourceGroupPager.NextPage` has been removed -- Function `*StorageTargetsDNSRefreshPoller.Done` has been removed -- Function `*CachesCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*CachesDebugInfoPollerResponse.Resume` has been removed -- Function `*CachesFlushPollerResponse.Resume` has been removed -- Function `*StorageTargetsDNSRefreshPoller.Poll` has been removed -- Function `*CachesStopPoller.Poll` has been removed -- Function `*CachesCreateOrUpdatePoller.Done` has been removed -- Function `CachesFlushPollerResponse.PollUntilDone` has been removed -- Function `CachesStartPollerResponse.PollUntilDone` has been removed -- Function `CachesDeletePollerResponse.PollUntilDone` has been removed -- Function `CachesCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*CachesDeletePoller.FinalResponse` has been removed -- Function `*CachesFlushPoller.ResumeToken` has been removed -- Function `*StorageTargetFlushPoller.ResumeToken` has been removed -- Function `*StorageTargetResumePoller.Done` has been removed -- Function `*StorageTargetsDeletePoller.ResumeToken` has been removed -- Function `*StorageTargetResumePoller.Poll` has been removed -- Function `*CachesCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*StorageTargetResumePoller.FinalResponse` has been removed -- Function `*OperationsListPager.Err` has been removed -- Function `*StorageTargetsCreateOrUpdatePoller.Done` has been removed -- Function `*StorageTargetsDeletePoller.Done` has been removed -- Function `*CachesListByResourceGroupPager.PageResponse` has been removed -- Function `*StorageTargetSuspendPoller.Done` has been removed -- Function `*StorageTargetsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*SKUsListPager.PageResponse` has been removed -- Function `*CachesStopPoller.Done` has been removed -- Function `*CachesUpgradeFirmwarePoller.Poll` has been removed -- Function `*CachesStartPoller.ResumeToken` has been removed -- Function `*StorageTargetFlushPoller.Done` has been removed -- Function `*OperationsListPager.NextPage` has been removed -- Function `*CachesUpgradeFirmwarePoller.FinalResponse` has been removed -- Function `*CachesUpgradeFirmwarePoller.ResumeToken` has been removed -- Function `*UsageModelsListPager.PageResponse` has been removed -- Function `StorageTargetResumePollerResponse.PollUntilDone` has been removed -- Function `*CachesStopPoller.ResumeToken` has been removed -- Function `StorageTargetsDNSRefreshPollerResponse.PollUntilDone` has been removed -- Function `*CachesDeletePollerResponse.Resume` has been removed -- Function `*CachesCreateOrUpdatePoller.Poll` has been removed -- Function `*CachesDeletePoller.Poll` has been removed -- Function `*CachesUpgradeFirmwarePoller.Done` has been removed -- Function `*StorageTargetFlushPoller.FinalResponse` has been removed -- Function `*CachesFlushPoller.Poll` has been removed -- Function `*StorageTargetsDNSRefreshPoller.ResumeToken` has been removed -- Function `CloudError.Error` has been removed -- Function `*StorageTargetsListByCachePager.NextPage` has been removed -- Function `*CachesStartPoller.Poll` has been removed -- Function `*CachesDebugInfoPoller.ResumeToken` has been removed -- Function `*CachesStopPoller.FinalResponse` has been removed -- Function `*CachesStopPollerResponse.Resume` has been removed -- Function `*CachesListPager.Err` has been removed -- Function `*StorageTargetSuspendPoller.ResumeToken` has been removed -- Function `*SKUsListPager.NextPage` has been removed -- Function `StorageTargetsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*StorageTargetsDeletePollerResponse.Resume` has been removed -- Function `*StorageTargetsListByCachePager.Err` has been removed -- Function `*StorageTargetsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*CachesListPager.PageResponse` has been removed -- Function `*StorageTargetFlushPollerResponse.Resume` has been removed -- Struct `AscOperationsGetOptions` has been removed -- Struct `AscOperationsGetResponse` has been removed -- Struct `AscOperationsGetResult` has been removed -- Struct `CachesBeginCreateOrUpdateOptions` has been removed -- Struct `CachesBeginDebugInfoOptions` has been removed -- Struct `CachesBeginDeleteOptions` has been removed -- Struct `CachesBeginFlushOptions` has been removed -- Struct `CachesBeginStartOptions` has been removed -- Struct `CachesBeginStopOptions` has been removed -- Struct `CachesBeginUpgradeFirmwareOptions` has been removed -- Struct `CachesCreateOrUpdatePoller` has been removed -- Struct `CachesCreateOrUpdatePollerResponse` has been removed -- Struct `CachesCreateOrUpdateResponse` has been removed -- Struct `CachesCreateOrUpdateResult` has been removed -- Struct `CachesDebugInfoPoller` has been removed -- Struct `CachesDebugInfoPollerResponse` has been removed -- Struct `CachesDebugInfoResponse` has been removed -- Struct `CachesDeletePoller` has been removed -- Struct `CachesDeletePollerResponse` has been removed -- Struct `CachesDeleteResponse` has been removed -- Struct `CachesFlushPoller` has been removed -- Struct `CachesFlushPollerResponse` has been removed -- Struct `CachesFlushResponse` has been removed -- Struct `CachesGetOptions` has been removed -- Struct `CachesGetResponse` has been removed -- Struct `CachesGetResult` has been removed -- Struct `CachesListByResourceGroupOptions` has been removed -- Struct `CachesListByResourceGroupPager` has been removed -- Struct `CachesListByResourceGroupResponse` has been removed -- Struct `CachesListByResourceGroupResult` has been removed -- Struct `CachesListOptions` has been removed -- Struct `CachesListPager` has been removed -- Struct `CachesListResponse` has been removed -- Struct `CachesListResultEnvelope` has been removed -- Struct `CachesStartPoller` has been removed -- Struct `CachesStartPollerResponse` has been removed -- Struct `CachesStartResponse` has been removed -- Struct `CachesStopPoller` has been removed -- Struct `CachesStopPollerResponse` has been removed -- Struct `CachesStopResponse` has been removed -- Struct `CachesUpdateOptions` has been removed -- Struct `CachesUpdateResponse` has been removed -- Struct `CachesUpdateResult` has been removed -- Struct `CachesUpgradeFirmwarePoller` has been removed -- Struct `CachesUpgradeFirmwarePollerResponse` has been removed -- Struct `CachesUpgradeFirmwareResponse` has been removed -- Struct `OperationsListOptions` has been removed -- Struct `OperationsListPager` has been removed -- Struct `OperationsListResponse` has been removed -- Struct `OperationsListResult` has been removed -- Struct `SKUsListOptions` has been removed -- Struct `SKUsListPager` has been removed -- Struct `SKUsListResponse` has been removed -- Struct `SKUsListResult` has been removed -- Struct `StorageTargetBeginFlushOptions` has been removed -- Struct `StorageTargetBeginResumeOptions` has been removed -- Struct `StorageTargetBeginSuspendOptions` has been removed -- Struct `StorageTargetFlushPoller` has been removed -- Struct `StorageTargetFlushPollerResponse` has been removed -- Struct `StorageTargetFlushResponse` has been removed -- Struct `StorageTargetResumePoller` has been removed -- Struct `StorageTargetResumePollerResponse` has been removed -- Struct `StorageTargetResumeResponse` has been removed -- Struct `StorageTargetSuspendPoller` has been removed -- Struct `StorageTargetSuspendPollerResponse` has been removed -- Struct `StorageTargetSuspendResponse` has been removed -- Struct `StorageTargetsBeginCreateOrUpdateOptions` has been removed -- Struct `StorageTargetsBeginDNSRefreshOptions` has been removed -- Struct `StorageTargetsBeginDeleteOptions` has been removed -- Struct `StorageTargetsCreateOrUpdatePoller` has been removed -- Struct `StorageTargetsCreateOrUpdatePollerResponse` has been removed -- Struct `StorageTargetsCreateOrUpdateResponse` has been removed -- Struct `StorageTargetsCreateOrUpdateResult` has been removed -- Struct `StorageTargetsDNSRefreshPoller` has been removed -- Struct `StorageTargetsDNSRefreshPollerResponse` has been removed -- Struct `StorageTargetsDNSRefreshResponse` has been removed -- Struct `StorageTargetsDeletePoller` has been removed -- Struct `StorageTargetsDeletePollerResponse` has been removed -- Struct `StorageTargetsDeleteResponse` has been removed -- Struct `StorageTargetsGetOptions` has been removed -- Struct `StorageTargetsGetResponse` has been removed -- Struct `StorageTargetsGetResult` has been removed -- Struct `StorageTargetsListByCacheOptions` has been removed -- Struct `StorageTargetsListByCachePager` has been removed -- Struct `StorageTargetsListByCacheResponse` has been removed -- Struct `StorageTargetsListByCacheResult` has been removed -- Struct `UsageModelsListOptions` has been removed -- Struct `UsageModelsListPager` has been removed -- Struct `UsageModelsListResponse` has been removed -- Struct `UsageModelsListResult` has been removed -- Field `InnerError` of struct `CloudError` has been removed -- Field `StorageTargetResource` of struct `StorageTarget` has been removed - -### Features Added - -- New function `*StorageTargetsClientCreateOrUpdatePollerResponse.Resume(context.Context, *StorageTargetsClient, string) error` -- New function `*StorageTargetsClientDNSRefreshPoller.ResumeToken() (string, error)` -- New function `*CachesClientListPager.Err() error` -- New function `*OperationsClientListPager.Err() error` -- New function `*CachesClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*StorageTargetsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CachesClientCreateOrUpdatePoller.FinalResponse(context.Context) (CachesClientCreateOrUpdateResponse, error)` -- New function `*CachesClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CachesClientStartPoller.FinalResponse(context.Context) (CachesClientStartResponse, error)` -- New function `*StorageTargetsClientDeletePoller.ResumeToken() (string, error)` -- New function `*UsageModelsClientListPager.NextPage(context.Context) bool` -- New function `*CachesClientListPager.NextPage(context.Context) bool` -- New function `*SKUsClientListPager.Err() error` -- New function `StorageTargetsClientDNSRefreshPollerResponse.PollUntilDone(context.Context, time.Duration) (StorageTargetsClientDNSRefreshResponse, error)` -- New function `*CachesClientFlushPoller.Done() bool` -- New function `*CachesClientUpgradeFirmwarePollerResponse.Resume(context.Context, *CachesClient, string) error` -- New function `*StorageTargetClientSuspendPoller.Poll(context.Context) (*http.Response, error)` -- New function `*CachesClientStartPoller.ResumeToken() (string, error)` -- New function `*CachesClientStopPoller.FinalResponse(context.Context) (CachesClientStopResponse, error)` -- New function `StorageTargetClientSuspendPollerResponse.PollUntilDone(context.Context, time.Duration) (StorageTargetClientSuspendResponse, error)` -- New function `*CachesClientFlushPollerResponse.Resume(context.Context, *CachesClient, string) error` -- New function `*CachesClientStopPollerResponse.Resume(context.Context, *CachesClient, string) error` -- New function `*StorageTargetClientFlushPoller.ResumeToken() (string, error)` -- New function `*CachesClientUpgradeFirmwarePoller.ResumeToken() (string, error)` -- New function `*StorageTargetClientResumePoller.Poll(context.Context) (*http.Response, error)` -- New function `*StorageTargetsClientDNSRefreshPoller.Poll(context.Context) (*http.Response, error)` -- New function `CachesClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (CachesClientDeleteResponse, error)` -- New function `*StorageTargetClientFlushPoller.Done() bool` -- New function `*CachesClientFlushPoller.ResumeToken() (string, error)` -- New function `*StorageTargetsClientDNSRefreshPollerResponse.Resume(context.Context, *StorageTargetsClient, string) error` -- New function `*CachesClientStopPoller.ResumeToken() (string, error)` -- New function `*CachesClientFlushPoller.Poll(context.Context) (*http.Response, error)` -- New function `*UsageModelsClientListPager.PageResponse() UsageModelsClientListResponse` -- New function `*CachesClientDeletePoller.ResumeToken() (string, error)` -- New function `CachesClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (CachesClientCreateOrUpdateResponse, error)` -- New function `*CachesClientDebugInfoPollerResponse.Resume(context.Context, *CachesClient, string) error` -- New function `*StorageTargetsClientDeletePoller.FinalResponse(context.Context) (StorageTargetsClientDeleteResponse, error)` -- New function `*CachesClientDebugInfoPoller.FinalResponse(context.Context) (CachesClientDebugInfoResponse, error)` -- New function `*CachesClientUpgradeFirmwarePoller.FinalResponse(context.Context) (CachesClientUpgradeFirmwareResponse, error)` -- New function `*StorageTargetsClientCreateOrUpdatePoller.Done() bool` -- New function `*StorageTargetsClientDeletePollerResponse.Resume(context.Context, *StorageTargetsClient, string) error` -- New function `*StorageTargetsClientDNSRefreshPoller.FinalResponse(context.Context) (StorageTargetsClientDNSRefreshResponse, error)` -- New function `*CachesClientStartPoller.Poll(context.Context) (*http.Response, error)` -- New function `*StorageTargetClientResumePollerResponse.Resume(context.Context, *StorageTargetClient, string) error` -- New function `*CachesClientDebugInfoPoller.Poll(context.Context) (*http.Response, error)` -- New function `StorageTargetsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (StorageTargetsClientDeleteResponse, error)` -- New function `*CachesClientListByResourceGroupPager.Err() error` -- New function `*StorageTargetClientFlushPoller.FinalResponse(context.Context) (StorageTargetClientFlushResponse, error)` -- New function `CachesClientFlushPollerResponse.PollUntilDone(context.Context, time.Duration) (CachesClientFlushResponse, error)` -- New function `*CachesClientDebugInfoPoller.ResumeToken() (string, error)` -- New function `*CachesClientDebugInfoPoller.Done() bool` -- New function `*CachesClientDeletePollerResponse.Resume(context.Context, *CachesClient, string) error` -- New function `*StorageTargetsClientDeletePoller.Done() bool` -- New function `*StorageTargetsClientDNSRefreshPoller.Done() bool` -- New function `*StorageTargetClientSuspendPoller.FinalResponse(context.Context) (StorageTargetClientSuspendResponse, error)` -- New function `*StorageTargetsClientListByCachePager.Err() error` -- New function `*CachesClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*StorageTargetsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*CachesClientListPager.PageResponse() CachesClientListResponse` -- New function `*StorageTargetClientSuspendPoller.ResumeToken() (string, error)` -- New function `*CachesClientStopPoller.Poll(context.Context) (*http.Response, error)` -- New function `*StorageTargetClientFlushPollerResponse.Resume(context.Context, *StorageTargetClient, string) error` -- New function `*CachesClientFlushPoller.FinalResponse(context.Context) (CachesClientFlushResponse, error)` -- New function `*OperationsClientListPager.NextPage(context.Context) bool` -- New function `CachesClientStartPollerResponse.PollUntilDone(context.Context, time.Duration) (CachesClientStartResponse, error)` -- New function `*CachesClientDeletePoller.Done() bool` -- New function `*CachesClientStartPollerResponse.Resume(context.Context, *CachesClient, string) error` -- New function `*StorageTargetsClientCreateOrUpdatePoller.FinalResponse(context.Context) (StorageTargetsClientCreateOrUpdateResponse, error)` -- New function `*StorageTargetsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*StorageTargetClientResumePoller.Done() bool` -- New function `*CachesClientListByResourceGroupPager.PageResponse() CachesClientListByResourceGroupResponse` -- New function `*StorageTargetsClientListByCachePager.PageResponse() StorageTargetsClientListByCacheResponse` -- New function `*OperationsClientListPager.PageResponse() OperationsClientListResponse` -- New function `StorageTargetsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (StorageTargetsClientCreateOrUpdateResponse, error)` -- New function `*StorageTargetClientResumePoller.ResumeToken() (string, error)` -- New function `*UsageModelsClientListPager.Err() error` -- New function `*CachesClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*StorageTargetClientResumePoller.FinalResponse(context.Context) (StorageTargetClientResumeResponse, error)` -- New function `*CachesClientStartPoller.Done() bool` -- New function `StorageTargetClientFlushPollerResponse.PollUntilDone(context.Context, time.Duration) (StorageTargetClientFlushResponse, error)` -- New function `CachesClientUpgradeFirmwarePollerResponse.PollUntilDone(context.Context, time.Duration) (CachesClientUpgradeFirmwareResponse, error)` -- New function `*StorageTargetClientSuspendPollerResponse.Resume(context.Context, *StorageTargetClient, string) error` -- New function `*CachesClientUpgradeFirmwarePoller.Done() bool` -- New function `*SKUsClientListPager.NextPage(context.Context) bool` -- New function `*StorageTargetClientFlushPoller.Poll(context.Context) (*http.Response, error)` -- New function `*CachesClientCreateOrUpdatePoller.Done() bool` -- New function `*CachesClientStopPoller.Done() bool` -- New function `CachesClientDebugInfoPollerResponse.PollUntilDone(context.Context, time.Duration) (CachesClientDebugInfoResponse, error)` -- New function `*CachesClientUpgradeFirmwarePoller.Poll(context.Context) (*http.Response, error)` -- New function `*StorageTargetClientSuspendPoller.Done() bool` -- New function `StorageTargetClientResumePollerResponse.PollUntilDone(context.Context, time.Duration) (StorageTargetClientResumeResponse, error)` -- New function `CachesClientStopPollerResponse.PollUntilDone(context.Context, time.Duration) (CachesClientStopResponse, error)` -- New function `*CachesClientDeletePoller.FinalResponse(context.Context) (CachesClientDeleteResponse, error)` -- New function `*SKUsClientListPager.PageResponse() SKUsClientListResponse` -- New function `*CachesClientCreateOrUpdatePollerResponse.Resume(context.Context, *CachesClient, string) error` -- New function `*StorageTargetsClientListByCachePager.NextPage(context.Context) bool` -- New struct `AscOperationsClientGetOptions` -- New struct `AscOperationsClientGetResponse` -- New struct `AscOperationsClientGetResult` -- New struct `CachesClientBeginCreateOrUpdateOptions` -- New struct `CachesClientBeginDebugInfoOptions` -- New struct `CachesClientBeginDeleteOptions` -- New struct `CachesClientBeginFlushOptions` -- New struct `CachesClientBeginStartOptions` -- New struct `CachesClientBeginStopOptions` -- New struct `CachesClientBeginUpgradeFirmwareOptions` -- New struct `CachesClientCreateOrUpdatePoller` -- New struct `CachesClientCreateOrUpdatePollerResponse` -- New struct `CachesClientCreateOrUpdateResponse` -- New struct `CachesClientCreateOrUpdateResult` -- New struct `CachesClientDebugInfoPoller` -- New struct `CachesClientDebugInfoPollerResponse` -- New struct `CachesClientDebugInfoResponse` -- New struct `CachesClientDeletePoller` -- New struct `CachesClientDeletePollerResponse` -- New struct `CachesClientDeleteResponse` -- New struct `CachesClientFlushPoller` -- New struct `CachesClientFlushPollerResponse` -- New struct `CachesClientFlushResponse` -- New struct `CachesClientGetOptions` -- New struct `CachesClientGetResponse` -- New struct `CachesClientGetResult` -- New struct `CachesClientListByResourceGroupOptions` -- New struct `CachesClientListByResourceGroupPager` -- New struct `CachesClientListByResourceGroupResponse` -- New struct `CachesClientListByResourceGroupResult` -- New struct `CachesClientListOptions` -- New struct `CachesClientListPager` -- New struct `CachesClientListResponse` -- New struct `CachesClientListResult` -- New struct `CachesClientStartPoller` -- New struct `CachesClientStartPollerResponse` -- New struct `CachesClientStartResponse` -- New struct `CachesClientStopPoller` -- New struct `CachesClientStopPollerResponse` -- New struct `CachesClientStopResponse` -- New struct `CachesClientUpdateOptions` -- New struct `CachesClientUpdateResponse` -- New struct `CachesClientUpdateResult` -- New struct `CachesClientUpgradeFirmwarePoller` -- New struct `CachesClientUpgradeFirmwarePollerResponse` -- New struct `CachesClientUpgradeFirmwareResponse` -- New struct `OperationsClientListOptions` -- New struct `OperationsClientListPager` -- New struct `OperationsClientListResponse` -- New struct `OperationsClientListResult` -- New struct `SKUsClientListOptions` -- New struct `SKUsClientListPager` -- New struct `SKUsClientListResponse` -- New struct `SKUsClientListResult` -- New struct `StorageTargetClientBeginFlushOptions` -- New struct `StorageTargetClientBeginResumeOptions` -- New struct `StorageTargetClientBeginSuspendOptions` -- New struct `StorageTargetClientFlushPoller` -- New struct `StorageTargetClientFlushPollerResponse` -- New struct `StorageTargetClientFlushResponse` -- New struct `StorageTargetClientResumePoller` -- New struct `StorageTargetClientResumePollerResponse` -- New struct `StorageTargetClientResumeResponse` -- New struct `StorageTargetClientSuspendPoller` -- New struct `StorageTargetClientSuspendPollerResponse` -- New struct `StorageTargetClientSuspendResponse` -- New struct `StorageTargetsClientBeginCreateOrUpdateOptions` -- New struct `StorageTargetsClientBeginDNSRefreshOptions` -- New struct `StorageTargetsClientBeginDeleteOptions` -- New struct `StorageTargetsClientCreateOrUpdatePoller` -- New struct `StorageTargetsClientCreateOrUpdatePollerResponse` -- New struct `StorageTargetsClientCreateOrUpdateResponse` -- New struct `StorageTargetsClientCreateOrUpdateResult` -- New struct `StorageTargetsClientDNSRefreshPoller` -- New struct `StorageTargetsClientDNSRefreshPollerResponse` -- New struct `StorageTargetsClientDNSRefreshResponse` -- New struct `StorageTargetsClientDeletePoller` -- New struct `StorageTargetsClientDeletePollerResponse` -- New struct `StorageTargetsClientDeleteResponse` -- New struct `StorageTargetsClientGetOptions` -- New struct `StorageTargetsClientGetResponse` -- New struct `StorageTargetsClientGetResult` -- New struct `StorageTargetsClientListByCacheOptions` -- New struct `StorageTargetsClientListByCachePager` -- New struct `StorageTargetsClientListByCacheResponse` -- New struct `StorageTargetsClientListByCacheResult` -- New struct `UsageModelsClientListOptions` -- New struct `UsageModelsClientListPager` -- New struct `UsageModelsClientListResponse` -- New struct `UsageModelsClientListResult` -- New field `Error` in struct `CloudError` -- New field `Name` in struct `StorageTarget` -- New field `SystemData` in struct `StorageTarget` -- New field `Type` in struct `StorageTarget` -- New field `ID` in struct `StorageTarget` -- New field `Location` in struct `StorageTarget` - - -## 0.1.0 (2021-12-22) - -- Init release. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/README.md deleted file mode 100644 index 20f1f067..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Azure Storage Caches Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache) - -The `armstoragecache` module provides operations for working with Azure Storage Caches. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/storagecache/armstoragecache) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Storage Caches module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Storage Caches. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Clients - -Azure Storage Caches modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. - -```go -client, err := armstoragecache.NewStorageTargetClient(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -client, err := armstoragecache.NewStorageTargetClient(, cred, &options) -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Storage Caches` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/autorest.md deleted file mode 100644 index 2312d390..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/autorest.md +++ /dev/null @@ -1,13 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/storagecache/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/storagecache/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 - -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/build.go deleted file mode 100644 index 4b5ceb34..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/build.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/storagecache/armstoragecache - -package armstoragecache diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/ci.yml deleted file mode 100644 index ce14dd7e..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/storagecache/armstoragecache/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/storagecache/armstoragecache/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/storagecache/armstoragecache' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/CHANGELOG.md new file mode 100644 index 00000000..be4a1f8f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/CHANGELOG.md @@ -0,0 +1,177 @@ +# Release History + +## 4.0.0 (2024-05-24) +### Breaking Changes + +- Type of `AscOperation.Error` has been changed from `*ErrorResponse` to `*AscOperationErrorResponse` + +### Features Added + +- New enum type `AmlFilesystemSquashMode` with values `AmlFilesystemSquashModeAll`, `AmlFilesystemSquashModeNone`, `AmlFilesystemSquashModeRootOnly` +- New enum type `ConflictResolutionMode` with values `ConflictResolutionModeFail`, `ConflictResolutionModeOverwriteAlways`, `ConflictResolutionModeOverwriteIfDirty`, `ConflictResolutionModeSkip` +- New enum type `ImportJobProvisioningStateType` with values `ImportJobProvisioningStateTypeCanceled`, `ImportJobProvisioningStateTypeCreating`, `ImportJobProvisioningStateTypeDeleting`, `ImportJobProvisioningStateTypeFailed`, `ImportJobProvisioningStateTypeSucceeded`, `ImportJobProvisioningStateTypeUpdating` +- New enum type `ImportStatusType` with values `ImportStatusTypeCanceled`, `ImportStatusTypeCancelling`, `ImportStatusTypeCompleted`, `ImportStatusTypeCompletedPartial`, `ImportStatusTypeFailed`, `ImportStatusTypeInProgress` +- New function `*ClientFactory.NewImportJobsClient() *ImportJobsClient` +- New function `NewImportJobsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ImportJobsClient, error)` +- New function `*ImportJobsClient.BeginCreateOrUpdate(context.Context, string, string, string, ImportJob, *ImportJobsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ImportJobsClientCreateOrUpdateResponse], error)` +- New function `*ImportJobsClient.BeginDelete(context.Context, string, string, string, *ImportJobsClientBeginDeleteOptions) (*runtime.Poller[ImportJobsClientDeleteResponse], error)` +- New function `*ImportJobsClient.Get(context.Context, string, string, string, *ImportJobsClientGetOptions) (ImportJobsClientGetResponse, error)` +- New function `*ImportJobsClient.NewListByAmlFilesystemPager(string, string, *ImportJobsClientListByAmlFilesystemOptions) *runtime.Pager[ImportJobsClientListByAmlFilesystemResponse]` +- New function `*ImportJobsClient.BeginUpdate(context.Context, string, string, string, ImportJobUpdate, *ImportJobsClientBeginUpdateOptions) (*runtime.Poller[ImportJobsClientUpdateResponse], error)` +- New struct `AmlFilesystemRootSquashSettings` +- New struct `AscOperationErrorResponse` +- New struct `ImportJob` +- New struct `ImportJobProperties` +- New struct `ImportJobPropertiesStatus` +- New struct `ImportJobUpdate` +- New struct `ImportJobsListResult` +- New field `ImportPrefixesInitial` in struct `AmlFilesystemHsmSettings` +- New field `RootSquashSettings` in struct `AmlFilesystemProperties` +- New field `RootSquashSettings` in struct `AmlFilesystemUpdateProperties` + + +## 3.4.0-beta.1 (2024-02-23) +### Features Added + +- New enum type `AmlFilesystemSquashMode` with values `AmlFilesystemSquashModeAll`, `AmlFilesystemSquashModeNone`, `AmlFilesystemSquashModeRootOnly` +- New struct `AmlFilesystemRootSquashSettings` +- New field `RootSquashSettings` in struct `AmlFilesystemProperties` +- New field `RootSquashSettings` in struct `AmlFilesystemUpdateProperties` + + +## 3.3.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 3.2.1 (2023-06-23) +### Bugs Fixed + +- Change `ProvisioningStateTypeCancelled` value to `Canceled` + + +## 3.2.0 (2023-06-23) +### Features Added + +- New enum type `AmlFilesystemHealthStateType` with values `AmlFilesystemHealthStateTypeAvailable`, `AmlFilesystemHealthStateTypeDegraded`, `AmlFilesystemHealthStateTypeMaintenance`, `AmlFilesystemHealthStateTypeTransitioning`, `AmlFilesystemHealthStateTypeUnavailable` +- New enum type `AmlFilesystemIdentityType` with values `AmlFilesystemIdentityTypeNone`, `AmlFilesystemIdentityTypeUserAssigned` +- New enum type `AmlFilesystemProvisioningStateType` with values `AmlFilesystemProvisioningStateTypeCanceled`, `AmlFilesystemProvisioningStateTypeCreating`, `AmlFilesystemProvisioningStateTypeDeleting`, `AmlFilesystemProvisioningStateTypeFailed`, `AmlFilesystemProvisioningStateTypeSucceeded`, `AmlFilesystemProvisioningStateTypeUpdating` +- New enum type `ArchiveStatusType` with values `ArchiveStatusTypeCanceled`, `ArchiveStatusTypeCancelling`, `ArchiveStatusTypeCompleted`, `ArchiveStatusTypeFSScanInProgress`, `ArchiveStatusTypeFailed`, `ArchiveStatusTypeIdle`, `ArchiveStatusTypeInProgress`, `ArchiveStatusTypeNotConfigured` +- New enum type `FilesystemSubnetStatusType` with values `FilesystemSubnetStatusTypeInvalid`, `FilesystemSubnetStatusTypeOk` +- New enum type `MaintenanceDayOfWeekType` with values `MaintenanceDayOfWeekTypeFriday`, `MaintenanceDayOfWeekTypeMonday`, `MaintenanceDayOfWeekTypeSaturday`, `MaintenanceDayOfWeekTypeSunday`, `MaintenanceDayOfWeekTypeThursday`, `MaintenanceDayOfWeekTypeTuesday`, `MaintenanceDayOfWeekTypeWednesday` +- New function `NewAmlFilesystemsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*AmlFilesystemsClient, error)` +- New function `*AmlFilesystemsClient.Archive(context.Context, string, string, *AmlFilesystemsClientArchiveOptions) (AmlFilesystemsClientArchiveResponse, error)` +- New function `*AmlFilesystemsClient.CancelArchive(context.Context, string, string, *AmlFilesystemsClientCancelArchiveOptions) (AmlFilesystemsClientCancelArchiveResponse, error)` +- New function `*AmlFilesystemsClient.BeginCreateOrUpdate(context.Context, string, string, AmlFilesystem, *AmlFilesystemsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AmlFilesystemsClientCreateOrUpdateResponse], error)` +- New function `*AmlFilesystemsClient.BeginDelete(context.Context, string, string, *AmlFilesystemsClientBeginDeleteOptions) (*runtime.Poller[AmlFilesystemsClientDeleteResponse], error)` +- New function `*AmlFilesystemsClient.Get(context.Context, string, string, *AmlFilesystemsClientGetOptions) (AmlFilesystemsClientGetResponse, error)` +- New function `*AmlFilesystemsClient.NewListByResourceGroupPager(string, *AmlFilesystemsClientListByResourceGroupOptions) *runtime.Pager[AmlFilesystemsClientListByResourceGroupResponse]` +- New function `*AmlFilesystemsClient.NewListPager(*AmlFilesystemsClientListOptions) *runtime.Pager[AmlFilesystemsClientListResponse]` +- New function `*AmlFilesystemsClient.BeginUpdate(context.Context, string, string, AmlFilesystemUpdate, *AmlFilesystemsClientBeginUpdateOptions) (*runtime.Poller[AmlFilesystemsClientUpdateResponse], error)` +- New function `*ClientFactory.NewAmlFilesystemsClient() *AmlFilesystemsClient` +- New function `*ClientFactory.NewManagementClient() *ManagementClient` +- New function `NewManagementClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagementClient, error)` +- New function `*ManagementClient.CheckAmlFSSubnets(context.Context, *ManagementClientCheckAmlFSSubnetsOptions) (ManagementClientCheckAmlFSSubnetsResponse, error)` +- New function `*ManagementClient.GetRequiredAmlFSSubnetsSize(context.Context, *ManagementClientGetRequiredAmlFSSubnetsSizeOptions) (ManagementClientGetRequiredAmlFSSubnetsSizeResponse, error)` +- New struct `AmlFilesystem` +- New struct `AmlFilesystemArchive` +- New struct `AmlFilesystemArchiveInfo` +- New struct `AmlFilesystemArchiveStatus` +- New struct `AmlFilesystemCheckSubnetError` +- New struct `AmlFilesystemCheckSubnetErrorFilesystemSubnet` +- New struct `AmlFilesystemClientInfo` +- New struct `AmlFilesystemContainerStorageInterface` +- New struct `AmlFilesystemEncryptionSettings` +- New struct `AmlFilesystemHealth` +- New struct `AmlFilesystemHsmSettings` +- New struct `AmlFilesystemIdentity` +- New struct `AmlFilesystemProperties` +- New struct `AmlFilesystemPropertiesHsm` +- New struct `AmlFilesystemPropertiesMaintenanceWindow` +- New struct `AmlFilesystemSubnetInfo` +- New struct `AmlFilesystemUpdate` +- New struct `AmlFilesystemUpdateProperties` +- New struct `AmlFilesystemUpdatePropertiesMaintenanceWindow` +- New struct `AmlFilesystemsListResult` +- New struct `RequiredAmlFilesystemSubnetsSize` +- New struct `RequiredAmlFilesystemSubnetsSizeInfo` +- New struct `Resource` +- New struct `SKUName` +- New struct `TrackedResource` + + +## 3.1.0 (2023-04-07) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + + +## 3.0.0 (2023-02-24) +### Breaking Changes + +- Operation `*CachesClient.Update` has been changed to LRO, use `*CachesClient.BeginUpdate` instead. + +### Features Added + +- New function `*StorageTargetsClient.BeginRestoreDefaults(context.Context, string, string, string, *StorageTargetsClientBeginRestoreDefaultsOptions) (*runtime.Poller[StorageTargetsClientRestoreDefaultsResponse], error)` +- New field `VerificationTimer` in struct `BlobNfsTarget` +- New field `WriteBackTimer` in struct `BlobNfsTarget` +- New field `VerificationTimer` in struct `Nfs3Target` +- New field `WriteBackTimer` in struct `Nfs3Target` + + +## 2.0.0 (2022-07-06) +### Breaking Changes + +- Function `*StorageTargetsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, *StorageTargetsClientBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, StorageTarget, *StorageTargetsClientBeginCreateOrUpdateOptions)` +- Function `*CachesClient.Update` parameter(s) have been changed from `(context.Context, string, string, *CachesClientUpdateOptions)` to `(context.Context, string, string, Cache, *CachesClientUpdateOptions)` +- Function `*CachesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, *CachesClientBeginCreateOrUpdateOptions)` to `(context.Context, string, string, Cache, *CachesClientBeginCreateOrUpdateOptions)` +- Field `Cache` of struct `CachesClientUpdateOptions` has been removed +- Field `Cache` of struct `CachesClientBeginCreateOrUpdateOptions` has been removed +- Field `Storagetarget` of struct `StorageTargetsClientBeginCreateOrUpdateOptions` has been removed + +### Features Added + +- New const `PrimingJobStateQueued` +- New const `PrimingJobStateComplete` +- New const `PrimingJobStateRunning` +- New const `HealthStateTypeStartFailed` +- New const `HealthStateTypeUpgradeFailed` +- New const `PrimingJobStatePaused` +- New const `HealthStateTypeWaitingForKey` +- New function `*CachesClient.BeginStartPrimingJob(context.Context, string, string, *CachesClientBeginStartPrimingJobOptions) (*runtime.Poller[CachesClientStartPrimingJobResponse], error)` +- New function `PossiblePrimingJobStateValues() []PrimingJobState` +- New function `*CachesClient.BeginStopPrimingJob(context.Context, string, string, *CachesClientBeginStopPrimingJobOptions) (*runtime.Poller[CachesClientStopPrimingJobResponse], error)` +- New function `*CachesClient.BeginResumePrimingJob(context.Context, string, string, *CachesClientBeginResumePrimingJobOptions) (*runtime.Poller[CachesClientResumePrimingJobResponse], error)` +- New function `*CachesClient.BeginPausePrimingJob(context.Context, string, string, *CachesClientBeginPausePrimingJobOptions) (*runtime.Poller[CachesClientPausePrimingJobResponse], error)` +- New function `*CachesClient.BeginSpaceAllocation(context.Context, string, string, *CachesClientBeginSpaceAllocationOptions) (*runtime.Poller[CachesClientSpaceAllocationResponse], error)` +- New struct `CacheUpgradeSettings` +- New struct `CachesClientBeginPausePrimingJobOptions` +- New struct `CachesClientBeginResumePrimingJobOptions` +- New struct `CachesClientBeginSpaceAllocationOptions` +- New struct `CachesClientBeginStartPrimingJobOptions` +- New struct `CachesClientBeginStopPrimingJobOptions` +- New struct `CachesClientPausePrimingJobResponse` +- New struct `CachesClientResumePrimingJobResponse` +- New struct `CachesClientSpaceAllocationResponse` +- New struct `CachesClientStartPrimingJobResponse` +- New struct `CachesClientStopPrimingJobResponse` +- New struct `LogSpecification` +- New struct `PrimingJob` +- New struct `PrimingJobIDParameter` +- New struct `StorageTargetSpaceAllocation` +- New field `LogSpecifications` in struct `APIOperationPropertiesServiceSpecification` +- New field `AllocationPercentage` in struct `StorageTargetProperties` +- New field `UpgradeSettings` in struct `CacheProperties` +- New field `PrimingJobs` in struct `CacheProperties` +- New field `SpaceAllocation` in struct `CacheProperties` + + +## 1.0.0 (2022-05-17) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes. + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/README.md new file mode 100644 index 00000000..7080e468 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/README.md @@ -0,0 +1,101 @@ +# Azure Storage Caches Module for Go + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4) + +The `armstoragecache` module provides operations for working with Azure Storage Caches. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/storagecache/armstoragecache) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Storage Caches module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Storage Caches. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Storage Caches module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armstoragecache.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armstoragecache.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewAmlFilesystemsClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Major Version Upgrade + +Go uses [semantic import versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) to ensure a good backward compatibility for modules. For Azure Go management SDK, we usually upgrade module version according to cooresponding service's API version. Regarding it could be a complicated experience for major version upgrade, we will try our best to keep the SDK API stable and release new version in backward compatible way. However, if any unavoidable breaking changes and a new major version releases for SDK modules, you could use these commands under your module folder to upgrade: + +```sh +go install github.com/icholy/gomajor@latest +gomajor get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute@latest +``` + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Storage Caches` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/amlfilesystems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/amlfilesystems_client.go new file mode 100644 index 00000000..302294dc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/amlfilesystems_client.go @@ -0,0 +1,578 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AmlFilesystemsClient contains the methods for the AmlFilesystems group. +// Don't use this type directly, use NewAmlFilesystemsClient() instead. +type AmlFilesystemsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAmlFilesystemsClient creates a new instance of AmlFilesystemsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAmlFilesystemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AmlFilesystemsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AmlFilesystemsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Archive - Archive data from the AML file system. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - AmlFilesystemsClientArchiveOptions contains the optional parameters for the AmlFilesystemsClient.Archive method. +func (client *AmlFilesystemsClient) Archive(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientArchiveOptions) (AmlFilesystemsClientArchiveResponse, error) { + var err error + const operationName = "AmlFilesystemsClient.Archive" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.archiveCreateRequest(ctx, resourceGroupName, amlFilesystemName, options) + if err != nil { + return AmlFilesystemsClientArchiveResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AmlFilesystemsClientArchiveResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AmlFilesystemsClientArchiveResponse{}, err + } + return AmlFilesystemsClientArchiveResponse{}, nil +} + +// archiveCreateRequest creates the Archive request. +func (client *AmlFilesystemsClient) archiveCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientArchiveOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/archive" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.ArchiveInfo != nil { + if err := runtime.MarshalAsJSON(req, *options.ArchiveInfo); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// CancelArchive - Cancel archiving data from the AML file system. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - AmlFilesystemsClientCancelArchiveOptions contains the optional parameters for the AmlFilesystemsClient.CancelArchive +// method. +func (client *AmlFilesystemsClient) CancelArchive(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientCancelArchiveOptions) (AmlFilesystemsClientCancelArchiveResponse, error) { + var err error + const operationName = "AmlFilesystemsClient.CancelArchive" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.cancelArchiveCreateRequest(ctx, resourceGroupName, amlFilesystemName, options) + if err != nil { + return AmlFilesystemsClientCancelArchiveResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AmlFilesystemsClientCancelArchiveResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AmlFilesystemsClientCancelArchiveResponse{}, err + } + return AmlFilesystemsClientCancelArchiveResponse{}, nil +} + +// cancelArchiveCreateRequest creates the CancelArchive request. +func (client *AmlFilesystemsClient) cancelArchiveCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientCancelArchiveOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/cancelArchive" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginCreateOrUpdate - Create or update an AML file system. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - amlFilesystem - Object containing the user-selectable properties of the AML file system. If read-only properties are included, +// they must match the existing values of those properties. +// - options - AmlFilesystemsClientBeginCreateOrUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginCreateOrUpdate +// method. +func (client *AmlFilesystemsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystem, options *AmlFilesystemsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AmlFilesystemsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, amlFilesystemName, amlFilesystem, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AmlFilesystemsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AmlFilesystemsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update an AML file system. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *AmlFilesystemsClient) createOrUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystem, options *AmlFilesystemsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AmlFilesystemsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, amlFilesystemName, amlFilesystem, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *AmlFilesystemsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystem, options *AmlFilesystemsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, amlFilesystem); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Schedules an AML file system for deletion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - AmlFilesystemsClientBeginDeleteOptions contains the optional parameters for the AmlFilesystemsClient.BeginDelete +// method. +func (client *AmlFilesystemsClient) BeginDelete(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientBeginDeleteOptions) (*runtime.Poller[AmlFilesystemsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, amlFilesystemName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AmlFilesystemsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AmlFilesystemsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Schedules an AML file system for deletion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *AmlFilesystemsClient) deleteOperation(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AmlFilesystemsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, amlFilesystemName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *AmlFilesystemsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns an AML file system. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - AmlFilesystemsClientGetOptions contains the optional parameters for the AmlFilesystemsClient.Get method. +func (client *AmlFilesystemsClient) Get(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientGetOptions) (AmlFilesystemsClientGetResponse, error) { + var err error + const operationName = "AmlFilesystemsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, amlFilesystemName, options) + if err != nil { + return AmlFilesystemsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AmlFilesystemsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AmlFilesystemsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AmlFilesystemsClient) getCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AmlFilesystemsClient) getHandleResponse(resp *http.Response) (AmlFilesystemsClientGetResponse, error) { + result := AmlFilesystemsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AmlFilesystem); err != nil { + return AmlFilesystemsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Returns all AML file systems the user has access to under a subscription. +// +// Generated from API version 2024-03-01 +// - options - AmlFilesystemsClientListOptions contains the optional parameters for the AmlFilesystemsClient.NewListPager method. +func (client *AmlFilesystemsClient) NewListPager(options *AmlFilesystemsClientListOptions) *runtime.Pager[AmlFilesystemsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AmlFilesystemsClientListResponse]{ + More: func(page AmlFilesystemsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AmlFilesystemsClientListResponse) (AmlFilesystemsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AmlFilesystemsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return AmlFilesystemsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AmlFilesystemsClient) listCreateRequest(ctx context.Context, options *AmlFilesystemsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/amlFilesystems" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AmlFilesystemsClient) listHandleResponse(resp *http.Response) (AmlFilesystemsClientListResponse, error) { + result := AmlFilesystemsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AmlFilesystemsListResult); err != nil { + return AmlFilesystemsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Returns all AML file systems the user has access to under a resource group. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - AmlFilesystemsClientListByResourceGroupOptions contains the optional parameters for the AmlFilesystemsClient.NewListByResourceGroupPager +// method. +func (client *AmlFilesystemsClient) NewListByResourceGroupPager(resourceGroupName string, options *AmlFilesystemsClientListByResourceGroupOptions) *runtime.Pager[AmlFilesystemsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[AmlFilesystemsClientListByResourceGroupResponse]{ + More: func(page AmlFilesystemsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AmlFilesystemsClientListByResourceGroupResponse) (AmlFilesystemsClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AmlFilesystemsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return AmlFilesystemsClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *AmlFilesystemsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *AmlFilesystemsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *AmlFilesystemsClient) listByResourceGroupHandleResponse(resp *http.Response) (AmlFilesystemsClientListByResourceGroupResponse, error) { + result := AmlFilesystemsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AmlFilesystemsListResult); err != nil { + return AmlFilesystemsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginUpdate - Update an AML file system instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - amlFilesystem - Object containing the user-selectable properties of the AML file system. If read-only properties are included, +// they must match the existing values of those properties. +// - options - AmlFilesystemsClientBeginUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginUpdate +// method. +func (client *AmlFilesystemsClient) BeginUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystemUpdate, options *AmlFilesystemsClientBeginUpdateOptions) (*runtime.Poller[AmlFilesystemsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, amlFilesystemName, amlFilesystem, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AmlFilesystemsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AmlFilesystemsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Update an AML file system instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *AmlFilesystemsClient) update(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystemUpdate, options *AmlFilesystemsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "AmlFilesystemsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, amlFilesystemName, amlFilesystem, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *AmlFilesystemsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystemUpdate, options *AmlFilesystemsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, amlFilesystem); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/ascoperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/ascoperations_client.go new file mode 100644 index 00000000..06399f58 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/ascoperations_client.go @@ -0,0 +1,108 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AscOperationsClient contains the methods for the AscOperations group. +// Don't use this type directly, use NewAscOperationsClient() instead. +type AscOperationsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAscOperationsClient creates a new instance of AscOperationsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAscOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AscOperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AscOperationsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Gets the status of an asynchronous operation for the Azure HPC Cache +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - location - The name of Azure region. +// - operationID - The ID of an ongoing async operation. +// - options - AscOperationsClientGetOptions contains the optional parameters for the AscOperationsClient.Get method. +func (client *AscOperationsClient) Get(ctx context.Context, location string, operationID string, options *AscOperationsClientGetOptions) (AscOperationsClientGetResponse, error) { + var err error + const operationName = "AscOperationsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, location, operationID, options) + if err != nil { + return AscOperationsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return AscOperationsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AscOperationsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *AscOperationsClient) getCreateRequest(ctx context.Context, location string, operationID string, options *AscOperationsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/ascOperations/{operationId}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if operationID == "" { + return nil, errors.New("parameter operationID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *AscOperationsClient) getHandleResponse(resp *http.Response) (AscOperationsClientGetResponse, error) { + result := AscOperationsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AscOperation); err != nil { + return AscOperationsClientGetResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/ascusages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/ascusages_client.go new file mode 100644 index 00000000..20c08de1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/ascusages_client.go @@ -0,0 +1,103 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// AscUsagesClient contains the methods for the AscUsages group. +// Don't use this type directly, use NewAscUsagesClient() instead. +type AscUsagesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewAscUsagesClient creates a new instance of AscUsagesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewAscUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AscUsagesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &AscUsagesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Gets the quantity used and quota limit for resources +// +// Generated from API version 2024-03-01 +// - location - The name of the region to query for usage information. +// - options - AscUsagesClientListOptions contains the optional parameters for the AscUsagesClient.NewListPager method. +func (client *AscUsagesClient) NewListPager(location string, options *AscUsagesClientListOptions) *runtime.Pager[AscUsagesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[AscUsagesClientListResponse]{ + More: func(page AscUsagesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *AscUsagesClientListResponse) (AscUsagesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AscUsagesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return AscUsagesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *AscUsagesClient) listCreateRequest(ctx context.Context, location string, options *AscUsagesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/usages" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *AscUsagesClient) listHandleResponse(resp *http.Response) (AscUsagesClientListResponse, error) { + result := AscUsagesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceUsagesListResult); err != nil { + return AscUsagesClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/assets.json new file mode 100644 index 00000000..c0e3615a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/storagecache/armstoragecache", + "Tag": "go/resourcemanager/storagecache/armstoragecache_2fee547926" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/autorest.md new file mode 100644 index 00000000..c022bb79 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/storagecache/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/storagecache/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 4.0.0 +tag: package-2024-03 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/build.go new file mode 100644 index 00000000..eca3a4cb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/build.go @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// This file enables 'go generate' to regenerate this specific SDK +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -alwaysSetBodyParamRequired -removeUnreferencedTypes resourcemanager/storagecache/armstoragecache + +package armstoragecache diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/caches_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/caches_client.go new file mode 100644 index 00000000..225e4671 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/caches_client.go @@ -0,0 +1,1257 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// CachesClient contains the methods for the Caches group. +// Don't use this type directly, use NewCachesClient() instead. +type CachesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewCachesClient creates a new instance of CachesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewCachesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CachesClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &CachesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a cache. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - cache - Object containing the user-selectable properties of the new cache. If read-only properties are included, they must +// match the existing values of those properties. +// - options - CachesClientBeginCreateOrUpdateOptions contains the optional parameters for the CachesClient.BeginCreateOrUpdate +// method. +func (client *CachesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CachesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, cacheName, cache, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a cache. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) createOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, cacheName, cache, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *CachesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, cache); err != nil { + return nil, err + } + return req, nil +} + +// BeginDebugInfo - Tells a cache to write generate debug info for support to process. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginDebugInfoOptions contains the optional parameters for the CachesClient.BeginDebugInfo method. +func (client *CachesClient) BeginDebugInfo(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*runtime.Poller[CachesClientDebugInfoResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.debugInfo(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientDebugInfoResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientDebugInfoResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DebugInfo - Tells a cache to write generate debug info for support to process. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) debugInfo(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginDebugInfo" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.debugInfoCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// debugInfoCreateRequest creates the DebugInfo request. +func (client *CachesClient) debugInfoCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/debugInfo" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDelete - Schedules a cache for deletion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginDeleteOptions contains the optional parameters for the CachesClient.BeginDelete method. +func (client *CachesClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*runtime.Poller[CachesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Schedules a cache for deletion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) deleteOperation(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *CachesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginFlush - Tells a cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors +// returned until the flush is complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginFlushOptions contains the optional parameters for the CachesClient.BeginFlush method. +func (client *CachesClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*runtime.Poller[CachesClientFlushResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.flush(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientFlushResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientFlushResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Flush - Tells a cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors returned +// until the flush is complete. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) flush(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginFlush" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.flushCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// flushCreateRequest creates the Flush request. +func (client *CachesClient) flushCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/flush" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns a cache. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientGetOptions contains the optional parameters for the CachesClient.Get method. +func (client *CachesClient) Get(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientGetOptions) (CachesClientGetResponse, error) { + var err error + const operationName = "CachesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return CachesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return CachesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CachesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *CachesClient) getCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *CachesClient) getHandleResponse(resp *http.Response) (CachesClientGetResponse, error) { + result := CachesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Cache); err != nil { + return CachesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Returns all caches the user has access to under a subscription. +// +// Generated from API version 2024-03-01 +// - options - CachesClientListOptions contains the optional parameters for the CachesClient.NewListPager method. +func (client *CachesClient) NewListPager(options *CachesClientListOptions) *runtime.Pager[CachesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[CachesClientListResponse]{ + More: func(page CachesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CachesClientListResponse) (CachesClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CachesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return CachesClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *CachesClient) listCreateRequest(ctx context.Context, options *CachesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/caches" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *CachesClient) listHandleResponse(resp *http.Response) (CachesClientListResponse, error) { + result := CachesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CachesListResult); err != nil { + return CachesClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Returns all caches the user has access to under a resource group. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - CachesClientListByResourceGroupOptions contains the optional parameters for the CachesClient.NewListByResourceGroupPager +// method. +func (client *CachesClient) NewListByResourceGroupPager(resourceGroupName string, options *CachesClientListByResourceGroupOptions) *runtime.Pager[CachesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[CachesClientListByResourceGroupResponse]{ + More: func(page CachesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *CachesClientListByResourceGroupResponse) (CachesClientListByResourceGroupResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CachesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) + if err != nil { + return CachesClientListByResourceGroupResponse{}, err + } + return client.listByResourceGroupHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *CachesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *CachesClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *CachesClient) listByResourceGroupHandleResponse(resp *http.Response) (CachesClientListByResourceGroupResponse, error) { + result := CachesClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CachesListResult); err != nil { + return CachesClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// BeginPausePrimingJob - Schedule a priming job to be paused. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginPausePrimingJobOptions contains the optional parameters for the CachesClient.BeginPausePrimingJob +// method. +func (client *CachesClient) BeginPausePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginPausePrimingJobOptions) (*runtime.Poller[CachesClientPausePrimingJobResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.pausePrimingJob(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientPausePrimingJobResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientPausePrimingJobResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// PausePrimingJob - Schedule a priming job to be paused. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) pausePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginPausePrimingJobOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginPausePrimingJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.pausePrimingJobCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// pausePrimingJobCreateRequest creates the PausePrimingJob request. +func (client *CachesClient) pausePrimingJobCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginPausePrimingJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/pausePrimingJob" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.PrimingJobID != nil { + if err := runtime.MarshalAsJSON(req, *options.PrimingJobID); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginResumePrimingJob - Resumes a paused priming job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginResumePrimingJobOptions contains the optional parameters for the CachesClient.BeginResumePrimingJob +// method. +func (client *CachesClient) BeginResumePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginResumePrimingJobOptions) (*runtime.Poller[CachesClientResumePrimingJobResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resumePrimingJob(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientResumePrimingJobResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientResumePrimingJobResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// ResumePrimingJob - Resumes a paused priming job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) resumePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginResumePrimingJobOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginResumePrimingJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resumePrimingJobCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resumePrimingJobCreateRequest creates the ResumePrimingJob request. +func (client *CachesClient) resumePrimingJobCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginResumePrimingJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/resumePrimingJob" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.PrimingJobID != nil { + if err := runtime.MarshalAsJSON(req, *options.PrimingJobID); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginSpaceAllocation - Update cache space allocation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginSpaceAllocationOptions contains the optional parameters for the CachesClient.BeginSpaceAllocation +// method. +func (client *CachesClient) BeginSpaceAllocation(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginSpaceAllocationOptions) (*runtime.Poller[CachesClientSpaceAllocationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.spaceAllocation(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientSpaceAllocationResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientSpaceAllocationResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// SpaceAllocation - Update cache space allocation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) spaceAllocation(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginSpaceAllocationOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginSpaceAllocation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.spaceAllocationCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// spaceAllocationCreateRequest creates the SpaceAllocation request. +func (client *CachesClient) spaceAllocationCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginSpaceAllocationOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/spaceAllocation" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.SpaceAllocation != nil { + if err := runtime.MarshalAsJSON(req, options.SpaceAllocation); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginStart - Tells a Stopped state cache to transition to Active state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginStartOptions contains the optional parameters for the CachesClient.BeginStart method. +func (client *CachesClient) BeginStart(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*runtime.Poller[CachesClientStartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.start(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientStartResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientStartResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Start - Tells a Stopped state cache to transition to Active state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) start(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginStart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startCreateRequest creates the Start request. +func (client *CachesClient) startCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/start" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStartPrimingJob - Create a priming job. This operation is only allowed when the cache is healthy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginStartPrimingJobOptions contains the optional parameters for the CachesClient.BeginStartPrimingJob +// method. +func (client *CachesClient) BeginStartPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartPrimingJobOptions) (*runtime.Poller[CachesClientStartPrimingJobResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startPrimingJob(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientStartPrimingJobResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientStartPrimingJobResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StartPrimingJob - Create a priming job. This operation is only allowed when the cache is healthy. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) startPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartPrimingJobOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginStartPrimingJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.startPrimingJobCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// startPrimingJobCreateRequest creates the StartPrimingJob request. +func (client *CachesClient) startPrimingJobCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartPrimingJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/startPrimingJob" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.Primingjob != nil { + if err := runtime.MarshalAsJSON(req, *options.Primingjob); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginStop - Tells an Active cache to transition to Stopped state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginStopOptions contains the optional parameters for the CachesClient.BeginStop method. +func (client *CachesClient) BeginStop(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*runtime.Poller[CachesClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientStopResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientStopResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Stop - Tells an Active cache to transition to Stopped state. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) stop(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginStop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopCreateRequest creates the Stop request. +func (client *CachesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/stop" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginStopPrimingJob - Schedule a priming job for deletion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginStopPrimingJobOptions contains the optional parameters for the CachesClient.BeginStopPrimingJob +// method. +func (client *CachesClient) BeginStopPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopPrimingJobOptions) (*runtime.Poller[CachesClientStopPrimingJobResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopPrimingJob(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientStopPrimingJobResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientStopPrimingJobResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// StopPrimingJob - Schedule a priming job for deletion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) stopPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopPrimingJobOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginStopPrimingJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.stopPrimingJobCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// stopPrimingJobCreateRequest creates the StopPrimingJob request. +func (client *CachesClient) stopPrimingJobCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopPrimingJobOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/stopPrimingJob" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.PrimingJobID != nil { + if err := runtime.MarshalAsJSON(req, *options.PrimingJobID); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// BeginUpdate - Update a cache instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - cache - Object containing the user-selectable properties of the cache. If read-only properties are included, they must +// match the existing values of those properties. +// - options - CachesClientBeginUpdateOptions contains the optional parameters for the CachesClient.BeginUpdate method. +func (client *CachesClient) BeginUpdate(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginUpdateOptions) (*runtime.Poller[CachesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, cacheName, cache, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Update a cache instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) update(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, cacheName, cache, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *CachesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, cache); err != nil { + return nil, err + } + return req, nil +} + +// BeginUpgradeFirmware - Upgrade a cache's firmware if a new version is available. Otherwise, this operation has no effect. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - CachesClientBeginUpgradeFirmwareOptions contains the optional parameters for the CachesClient.BeginUpgradeFirmware +// method. +func (client *CachesClient) BeginUpgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*runtime.Poller[CachesClientUpgradeFirmwareResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.upgradeFirmware(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CachesClientUpgradeFirmwareResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CachesClientUpgradeFirmwareResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// UpgradeFirmware - Upgrade a cache's firmware if a new version is available. Otherwise, this operation has no effect. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *CachesClient) upgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*http.Response, error) { + var err error + const operationName = "CachesClient.BeginUpgradeFirmware" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.upgradeFirmwareCreateRequest(ctx, resourceGroupName, cacheName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// upgradeFirmwareCreateRequest creates the UpgradeFirmware request. +func (client *CachesClient) upgradeFirmwareCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/upgrade" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/ci.yml new file mode 100644 index 00000000..75b63b02 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/ci.yml @@ -0,0 +1,28 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/storagecache/armstoragecache/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/storagecache/armstoragecache/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/storagecache/armstoragecache' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/client_factory.go new file mode 100644 index 00000000..8c326c51 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/client_factory.go @@ -0,0 +1,124 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewAmlFilesystemsClient creates a new instance of AmlFilesystemsClient. +func (c *ClientFactory) NewAmlFilesystemsClient() *AmlFilesystemsClient { + return &AmlFilesystemsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAscOperationsClient creates a new instance of AscOperationsClient. +func (c *ClientFactory) NewAscOperationsClient() *AscOperationsClient { + return &AscOperationsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewAscUsagesClient creates a new instance of AscUsagesClient. +func (c *ClientFactory) NewAscUsagesClient() *AscUsagesClient { + return &AscUsagesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewCachesClient creates a new instance of CachesClient. +func (c *ClientFactory) NewCachesClient() *CachesClient { + return &CachesClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewImportJobsClient creates a new instance of ImportJobsClient. +func (c *ClientFactory) NewImportJobsClient() *ImportJobsClient { + return &ImportJobsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewManagementClient creates a new instance of ManagementClient. +func (c *ClientFactory) NewManagementClient() *ManagementClient { + return &ManagementClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewSKUsClient creates a new instance of SKUsClient. +func (c *ClientFactory) NewSKUsClient() *SKUsClient { + return &SKUsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewStorageTargetClient creates a new instance of StorageTargetClient. +func (c *ClientFactory) NewStorageTargetClient() *StorageTargetClient { + return &StorageTargetClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewStorageTargetsClient creates a new instance of StorageTargetsClient. +func (c *ClientFactory) NewStorageTargetsClient() *StorageTargetsClient { + return &StorageTargetsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewUsageModelsClient creates a new instance of UsageModelsClient. +func (c *ClientFactory) NewUsageModelsClient() *UsageModelsClient { + return &UsageModelsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/constants.go new file mode 100644 index 00000000..c7e4453b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/constants.go @@ -0,0 +1,545 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache" + moduleVersion = "v4.0.0" +) + +// AmlFilesystemHealthStateType - List of AML file system health states. +type AmlFilesystemHealthStateType string + +const ( + AmlFilesystemHealthStateTypeAvailable AmlFilesystemHealthStateType = "Available" + AmlFilesystemHealthStateTypeDegraded AmlFilesystemHealthStateType = "Degraded" + AmlFilesystemHealthStateTypeMaintenance AmlFilesystemHealthStateType = "Maintenance" + AmlFilesystemHealthStateTypeTransitioning AmlFilesystemHealthStateType = "Transitioning" + AmlFilesystemHealthStateTypeUnavailable AmlFilesystemHealthStateType = "Unavailable" +) + +// PossibleAmlFilesystemHealthStateTypeValues returns the possible values for the AmlFilesystemHealthStateType const type. +func PossibleAmlFilesystemHealthStateTypeValues() []AmlFilesystemHealthStateType { + return []AmlFilesystemHealthStateType{ + AmlFilesystemHealthStateTypeAvailable, + AmlFilesystemHealthStateTypeDegraded, + AmlFilesystemHealthStateTypeMaintenance, + AmlFilesystemHealthStateTypeTransitioning, + AmlFilesystemHealthStateTypeUnavailable, + } +} + +// AmlFilesystemIdentityType - The type of identity used for the resource. +type AmlFilesystemIdentityType string + +const ( + AmlFilesystemIdentityTypeNone AmlFilesystemIdentityType = "None" + AmlFilesystemIdentityTypeUserAssigned AmlFilesystemIdentityType = "UserAssigned" +) + +// PossibleAmlFilesystemIdentityTypeValues returns the possible values for the AmlFilesystemIdentityType const type. +func PossibleAmlFilesystemIdentityTypeValues() []AmlFilesystemIdentityType { + return []AmlFilesystemIdentityType{ + AmlFilesystemIdentityTypeNone, + AmlFilesystemIdentityTypeUserAssigned, + } +} + +// AmlFilesystemProvisioningStateType - ARM provisioning state. +type AmlFilesystemProvisioningStateType string + +const ( + AmlFilesystemProvisioningStateTypeCanceled AmlFilesystemProvisioningStateType = "Canceled" + AmlFilesystemProvisioningStateTypeCreating AmlFilesystemProvisioningStateType = "Creating" + AmlFilesystemProvisioningStateTypeDeleting AmlFilesystemProvisioningStateType = "Deleting" + AmlFilesystemProvisioningStateTypeFailed AmlFilesystemProvisioningStateType = "Failed" + AmlFilesystemProvisioningStateTypeSucceeded AmlFilesystemProvisioningStateType = "Succeeded" + AmlFilesystemProvisioningStateTypeUpdating AmlFilesystemProvisioningStateType = "Updating" +) + +// PossibleAmlFilesystemProvisioningStateTypeValues returns the possible values for the AmlFilesystemProvisioningStateType const type. +func PossibleAmlFilesystemProvisioningStateTypeValues() []AmlFilesystemProvisioningStateType { + return []AmlFilesystemProvisioningStateType{ + AmlFilesystemProvisioningStateTypeCanceled, + AmlFilesystemProvisioningStateTypeCreating, + AmlFilesystemProvisioningStateTypeDeleting, + AmlFilesystemProvisioningStateTypeFailed, + AmlFilesystemProvisioningStateTypeSucceeded, + AmlFilesystemProvisioningStateTypeUpdating, + } +} + +// AmlFilesystemSquashMode - Squash mode of the AML file system. 'All': User and Group IDs on files will be squashed to the +// provided values for all users on non-trusted systems. 'RootOnly': User and Group IDs on files will be +// squashed to provided values for solely the root user on non-trusted systems. 'None': No squashing of User and Group IDs +// is performed for any users on any systems. +type AmlFilesystemSquashMode string + +const ( + AmlFilesystemSquashModeAll AmlFilesystemSquashMode = "All" + AmlFilesystemSquashModeNone AmlFilesystemSquashMode = "None" + AmlFilesystemSquashModeRootOnly AmlFilesystemSquashMode = "RootOnly" +) + +// PossibleAmlFilesystemSquashModeValues returns the possible values for the AmlFilesystemSquashMode const type. +func PossibleAmlFilesystemSquashModeValues() []AmlFilesystemSquashMode { + return []AmlFilesystemSquashMode{ + AmlFilesystemSquashModeAll, + AmlFilesystemSquashModeNone, + AmlFilesystemSquashModeRootOnly, + } +} + +// ArchiveStatusType - The state of the archive operation +type ArchiveStatusType string + +const ( + ArchiveStatusTypeCanceled ArchiveStatusType = "Canceled" + ArchiveStatusTypeCancelling ArchiveStatusType = "Cancelling" + ArchiveStatusTypeCompleted ArchiveStatusType = "Completed" + ArchiveStatusTypeFSScanInProgress ArchiveStatusType = "FSScanInProgress" + ArchiveStatusTypeFailed ArchiveStatusType = "Failed" + ArchiveStatusTypeIdle ArchiveStatusType = "Idle" + ArchiveStatusTypeInProgress ArchiveStatusType = "InProgress" + ArchiveStatusTypeNotConfigured ArchiveStatusType = "NotConfigured" +) + +// PossibleArchiveStatusTypeValues returns the possible values for the ArchiveStatusType const type. +func PossibleArchiveStatusTypeValues() []ArchiveStatusType { + return []ArchiveStatusType{ + ArchiveStatusTypeCanceled, + ArchiveStatusTypeCancelling, + ArchiveStatusTypeCompleted, + ArchiveStatusTypeFSScanInProgress, + ArchiveStatusTypeFailed, + ArchiveStatusTypeIdle, + ArchiveStatusTypeInProgress, + ArchiveStatusTypeNotConfigured, + } +} + +// CacheIdentityType - The type of identity used for the cache +type CacheIdentityType string + +const ( + CacheIdentityTypeNone CacheIdentityType = "None" + CacheIdentityTypeSystemAssigned CacheIdentityType = "SystemAssigned" + CacheIdentityTypeSystemAssignedUserAssigned CacheIdentityType = "SystemAssigned, UserAssigned" + CacheIdentityTypeUserAssigned CacheIdentityType = "UserAssigned" +) + +// PossibleCacheIdentityTypeValues returns the possible values for the CacheIdentityType const type. +func PossibleCacheIdentityTypeValues() []CacheIdentityType { + return []CacheIdentityType{ + CacheIdentityTypeNone, + CacheIdentityTypeSystemAssigned, + CacheIdentityTypeSystemAssignedUserAssigned, + CacheIdentityTypeUserAssigned, + } +} + +// ConflictResolutionMode - How the import job will handle conflicts. For example, if the import job is trying to bring in +// a directory, but a file is at that path, how it handles it. Fail indicates that the import job should +// stop immediately and not do anything with the conflict. Skip indicates that it should pass over the conflict. OverwriteIfDirty +// causes the import job to delete and re-import the file or directory if it +// is a conflicting type, is dirty, or was not previously imported. OverwriteAlways extends OverwriteIfDirty to include releasing +// files that had been restored but were not dirty. Please reference +// https://learn.microsoft.com/en-us/azure/azure-managed-lustre/ for a thorough explanation of these resolution modes. +type ConflictResolutionMode string + +const ( + ConflictResolutionModeFail ConflictResolutionMode = "Fail" + ConflictResolutionModeOverwriteAlways ConflictResolutionMode = "OverwriteAlways" + ConflictResolutionModeOverwriteIfDirty ConflictResolutionMode = "OverwriteIfDirty" + ConflictResolutionModeSkip ConflictResolutionMode = "Skip" +) + +// PossibleConflictResolutionModeValues returns the possible values for the ConflictResolutionMode const type. +func PossibleConflictResolutionModeValues() []ConflictResolutionMode { + return []ConflictResolutionMode{ + ConflictResolutionModeFail, + ConflictResolutionModeOverwriteAlways, + ConflictResolutionModeOverwriteIfDirty, + ConflictResolutionModeSkip, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// DomainJoinedType - True if the HPC Cache is joined to the Active Directory domain. +type DomainJoinedType string + +const ( + DomainJoinedTypeError DomainJoinedType = "Error" + DomainJoinedTypeNo DomainJoinedType = "No" + DomainJoinedTypeYes DomainJoinedType = "Yes" +) + +// PossibleDomainJoinedTypeValues returns the possible values for the DomainJoinedType const type. +func PossibleDomainJoinedTypeValues() []DomainJoinedType { + return []DomainJoinedType{ + DomainJoinedTypeError, + DomainJoinedTypeNo, + DomainJoinedTypeYes, + } +} + +// FirmwareStatusType - True if there is a firmware update ready to install on this cache. The firmware will automatically +// be installed after firmwareUpdateDeadline if not triggered earlier via the upgrade operation. +type FirmwareStatusType string + +const ( + FirmwareStatusTypeAvailable FirmwareStatusType = "available" + FirmwareStatusTypeUnavailable FirmwareStatusType = "unavailable" +) + +// PossibleFirmwareStatusTypeValues returns the possible values for the FirmwareStatusType const type. +func PossibleFirmwareStatusTypeValues() []FirmwareStatusType { + return []FirmwareStatusType{ + FirmwareStatusTypeAvailable, + FirmwareStatusTypeUnavailable, + } +} + +// HealthStateType - List of cache health states. Down is when the cluster is not responding. Degraded is when its functioning +// but has some alerts. Transitioning when it is creating or deleting. Unknown will be returned +// in old api versions when a new value is added in future versions. WaitingForKey is when the create is waiting for the system +// assigned identity to be given access to the encryption key in the +// encryption settings. +type HealthStateType string + +const ( + HealthStateTypeDegraded HealthStateType = "Degraded" + HealthStateTypeDown HealthStateType = "Down" + HealthStateTypeFlushing HealthStateType = "Flushing" + HealthStateTypeHealthy HealthStateType = "Healthy" + HealthStateTypeStartFailed HealthStateType = "StartFailed" + HealthStateTypeStopped HealthStateType = "Stopped" + HealthStateTypeStopping HealthStateType = "Stopping" + HealthStateTypeTransitioning HealthStateType = "Transitioning" + HealthStateTypeUnknown HealthStateType = "Unknown" + HealthStateTypeUpgradeFailed HealthStateType = "UpgradeFailed" + HealthStateTypeUpgrading HealthStateType = "Upgrading" + HealthStateTypeWaitingForKey HealthStateType = "WaitingForKey" +) + +// PossibleHealthStateTypeValues returns the possible values for the HealthStateType const type. +func PossibleHealthStateTypeValues() []HealthStateType { + return []HealthStateType{ + HealthStateTypeDegraded, + HealthStateTypeDown, + HealthStateTypeFlushing, + HealthStateTypeHealthy, + HealthStateTypeStartFailed, + HealthStateTypeStopped, + HealthStateTypeStopping, + HealthStateTypeTransitioning, + HealthStateTypeUnknown, + HealthStateTypeUpgradeFailed, + HealthStateTypeUpgrading, + HealthStateTypeWaitingForKey, + } +} + +// ImportJobProvisioningStateType - ARM provisioning state. +type ImportJobProvisioningStateType string + +const ( + ImportJobProvisioningStateTypeCanceled ImportJobProvisioningStateType = "Canceled" + ImportJobProvisioningStateTypeCreating ImportJobProvisioningStateType = "Creating" + ImportJobProvisioningStateTypeDeleting ImportJobProvisioningStateType = "Deleting" + ImportJobProvisioningStateTypeFailed ImportJobProvisioningStateType = "Failed" + ImportJobProvisioningStateTypeSucceeded ImportJobProvisioningStateType = "Succeeded" + ImportJobProvisioningStateTypeUpdating ImportJobProvisioningStateType = "Updating" +) + +// PossibleImportJobProvisioningStateTypeValues returns the possible values for the ImportJobProvisioningStateType const type. +func PossibleImportJobProvisioningStateTypeValues() []ImportJobProvisioningStateType { + return []ImportJobProvisioningStateType{ + ImportJobProvisioningStateTypeCanceled, + ImportJobProvisioningStateTypeCreating, + ImportJobProvisioningStateTypeDeleting, + ImportJobProvisioningStateTypeFailed, + ImportJobProvisioningStateTypeSucceeded, + ImportJobProvisioningStateTypeUpdating, + } +} + +// ImportStatusType - The state of the import job. InProgress indicates the import is still running. Canceled indicates it +// has been canceled by the user. Completed indicates import finished, successfully importing all +// discovered blobs into the Lustre namespace. CompletedPartial indicates the import finished but some blobs either were found +// to be conflicting and could not be imported or other errors were +// encountered. Failed means the import was unable to complete due to a fatal error. +type ImportStatusType string + +const ( + ImportStatusTypeCanceled ImportStatusType = "Canceled" + ImportStatusTypeCancelling ImportStatusType = "Cancelling" + ImportStatusTypeCompleted ImportStatusType = "Completed" + ImportStatusTypeCompletedPartial ImportStatusType = "CompletedPartial" + ImportStatusTypeFailed ImportStatusType = "Failed" + ImportStatusTypeInProgress ImportStatusType = "InProgress" +) + +// PossibleImportStatusTypeValues returns the possible values for the ImportStatusType const type. +func PossibleImportStatusTypeValues() []ImportStatusType { + return []ImportStatusType{ + ImportStatusTypeCanceled, + ImportStatusTypeCancelling, + ImportStatusTypeCompleted, + ImportStatusTypeCompletedPartial, + ImportStatusTypeFailed, + ImportStatusTypeInProgress, + } +} + +// MaintenanceDayOfWeekType - Day of the week on which the maintenance window will occur. +type MaintenanceDayOfWeekType string + +const ( + MaintenanceDayOfWeekTypeFriday MaintenanceDayOfWeekType = "Friday" + MaintenanceDayOfWeekTypeMonday MaintenanceDayOfWeekType = "Monday" + MaintenanceDayOfWeekTypeSaturday MaintenanceDayOfWeekType = "Saturday" + MaintenanceDayOfWeekTypeSunday MaintenanceDayOfWeekType = "Sunday" + MaintenanceDayOfWeekTypeThursday MaintenanceDayOfWeekType = "Thursday" + MaintenanceDayOfWeekTypeTuesday MaintenanceDayOfWeekType = "Tuesday" + MaintenanceDayOfWeekTypeWednesday MaintenanceDayOfWeekType = "Wednesday" +) + +// PossibleMaintenanceDayOfWeekTypeValues returns the possible values for the MaintenanceDayOfWeekType const type. +func PossibleMaintenanceDayOfWeekTypeValues() []MaintenanceDayOfWeekType { + return []MaintenanceDayOfWeekType{ + MaintenanceDayOfWeekTypeFriday, + MaintenanceDayOfWeekTypeMonday, + MaintenanceDayOfWeekTypeSaturday, + MaintenanceDayOfWeekTypeSunday, + MaintenanceDayOfWeekTypeThursday, + MaintenanceDayOfWeekTypeTuesday, + MaintenanceDayOfWeekTypeWednesday, + } +} + +type MetricAggregationType string + +const ( + MetricAggregationTypeAverage MetricAggregationType = "Average" + MetricAggregationTypeCount MetricAggregationType = "Count" + MetricAggregationTypeMaximum MetricAggregationType = "Maximum" + MetricAggregationTypeMinimum MetricAggregationType = "Minimum" + MetricAggregationTypeNone MetricAggregationType = "None" + MetricAggregationTypeNotSpecified MetricAggregationType = "NotSpecified" + MetricAggregationTypeTotal MetricAggregationType = "Total" +) + +// PossibleMetricAggregationTypeValues returns the possible values for the MetricAggregationType const type. +func PossibleMetricAggregationTypeValues() []MetricAggregationType { + return []MetricAggregationType{ + MetricAggregationTypeAverage, + MetricAggregationTypeCount, + MetricAggregationTypeMaximum, + MetricAggregationTypeMinimum, + MetricAggregationTypeNone, + MetricAggregationTypeNotSpecified, + MetricAggregationTypeTotal, + } +} + +// NfsAccessRuleAccess - Access allowed by this rule. +type NfsAccessRuleAccess string + +const ( + NfsAccessRuleAccessNo NfsAccessRuleAccess = "no" + NfsAccessRuleAccessRo NfsAccessRuleAccess = "ro" + NfsAccessRuleAccessRw NfsAccessRuleAccess = "rw" +) + +// PossibleNfsAccessRuleAccessValues returns the possible values for the NfsAccessRuleAccess const type. +func PossibleNfsAccessRuleAccessValues() []NfsAccessRuleAccess { + return []NfsAccessRuleAccess{ + NfsAccessRuleAccessNo, + NfsAccessRuleAccessRo, + NfsAccessRuleAccessRw, + } +} + +// NfsAccessRuleScope - Scope for this rule. The scope and filter determine which clients match the rule. +type NfsAccessRuleScope string + +const ( + NfsAccessRuleScopeDefault NfsAccessRuleScope = "default" + NfsAccessRuleScopeHost NfsAccessRuleScope = "host" + NfsAccessRuleScopeNetwork NfsAccessRuleScope = "network" +) + +// PossibleNfsAccessRuleScopeValues returns the possible values for the NfsAccessRuleScope const type. +func PossibleNfsAccessRuleScopeValues() []NfsAccessRuleScope { + return []NfsAccessRuleScope{ + NfsAccessRuleScopeDefault, + NfsAccessRuleScopeHost, + NfsAccessRuleScopeNetwork, + } +} + +// OperationalStateType - Storage target operational state. +type OperationalStateType string + +const ( + OperationalStateTypeBusy OperationalStateType = "Busy" + OperationalStateTypeFlushing OperationalStateType = "Flushing" + OperationalStateTypeReady OperationalStateType = "Ready" + OperationalStateTypeSuspended OperationalStateType = "Suspended" +) + +// PossibleOperationalStateTypeValues returns the possible values for the OperationalStateType const type. +func PossibleOperationalStateTypeValues() []OperationalStateType { + return []OperationalStateType{ + OperationalStateTypeBusy, + OperationalStateTypeFlushing, + OperationalStateTypeReady, + OperationalStateTypeSuspended, + } +} + +// PrimingJobState - The state of the priming operation. +type PrimingJobState string + +const ( + PrimingJobStateComplete PrimingJobState = "Complete" + PrimingJobStatePaused PrimingJobState = "Paused" + PrimingJobStateQueued PrimingJobState = "Queued" + PrimingJobStateRunning PrimingJobState = "Running" +) + +// PossiblePrimingJobStateValues returns the possible values for the PrimingJobState const type. +func PossiblePrimingJobStateValues() []PrimingJobState { + return []PrimingJobState{ + PrimingJobStateComplete, + PrimingJobStatePaused, + PrimingJobStateQueued, + PrimingJobStateRunning, + } +} + +// ProvisioningStateType - ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property +type ProvisioningStateType string + +const ( + ProvisioningStateTypeCancelled ProvisioningStateType = "Canceled" + ProvisioningStateTypeCreating ProvisioningStateType = "Creating" + ProvisioningStateTypeDeleting ProvisioningStateType = "Deleting" + ProvisioningStateTypeFailed ProvisioningStateType = "Failed" + ProvisioningStateTypeSucceeded ProvisioningStateType = "Succeeded" + ProvisioningStateTypeUpdating ProvisioningStateType = "Updating" +) + +// PossibleProvisioningStateTypeValues returns the possible values for the ProvisioningStateType const type. +func PossibleProvisioningStateTypeValues() []ProvisioningStateType { + return []ProvisioningStateType{ + ProvisioningStateTypeCancelled, + ProvisioningStateTypeCreating, + ProvisioningStateTypeDeleting, + ProvisioningStateTypeFailed, + ProvisioningStateTypeSucceeded, + ProvisioningStateTypeUpdating, + } +} + +// ReasonCode - The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" +// is set when the SKU has requiredQuotas parameter as the subscription does not belong to that +// quota. "NotAvailableForSubscription" is related to capacity at the datacenter. +type ReasonCode string + +const ( + ReasonCodeNotAvailableForSubscription ReasonCode = "NotAvailableForSubscription" + ReasonCodeQuotaID ReasonCode = "QuotaId" +) + +// PossibleReasonCodeValues returns the possible values for the ReasonCode const type. +func PossibleReasonCodeValues() []ReasonCode { + return []ReasonCode{ + ReasonCodeNotAvailableForSubscription, + ReasonCodeQuotaID, + } +} + +// StorageTargetType - Type of the Storage Target. +type StorageTargetType string + +const ( + StorageTargetTypeBlobNfs StorageTargetType = "blobNfs" + StorageTargetTypeClfs StorageTargetType = "clfs" + StorageTargetTypeNfs3 StorageTargetType = "nfs3" + StorageTargetTypeUnknown StorageTargetType = "unknown" +) + +// PossibleStorageTargetTypeValues returns the possible values for the StorageTargetType const type. +func PossibleStorageTargetTypeValues() []StorageTargetType { + return []StorageTargetType{ + StorageTargetTypeBlobNfs, + StorageTargetTypeClfs, + StorageTargetTypeNfs3, + StorageTargetTypeUnknown, + } +} + +// UsernameDownloadedType - Indicates whether or not the HPC Cache has performed the username download successfully. +type UsernameDownloadedType string + +const ( + UsernameDownloadedTypeError UsernameDownloadedType = "Error" + UsernameDownloadedTypeNo UsernameDownloadedType = "No" + UsernameDownloadedTypeYes UsernameDownloadedType = "Yes" +) + +// PossibleUsernameDownloadedTypeValues returns the possible values for the UsernameDownloadedType const type. +func PossibleUsernameDownloadedTypeValues() []UsernameDownloadedType { + return []UsernameDownloadedType{ + UsernameDownloadedTypeError, + UsernameDownloadedTypeNo, + UsernameDownloadedTypeYes, + } +} + +// UsernameSource - This setting determines how the cache gets username and group names for clients. +type UsernameSource string + +const ( + UsernameSourceAD UsernameSource = "AD" + UsernameSourceFile UsernameSource = "File" + UsernameSourceLDAP UsernameSource = "LDAP" + UsernameSourceNone UsernameSource = "None" +) + +// PossibleUsernameSourceValues returns the possible values for the UsernameSource const type. +func PossibleUsernameSourceValues() []UsernameSource { + return []UsernameSource{ + UsernameSourceAD, + UsernameSourceFile, + UsernameSourceLDAP, + UsernameSourceNone, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/importjobs_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/importjobs_client.go new file mode 100644 index 00000000..95aa06fe --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/importjobs_client.go @@ -0,0 +1,432 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ImportJobsClient contains the methods for the ImportJobs group. +// Don't use this type directly, use NewImportJobsClient() instead. +type ImportJobsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewImportJobsClient creates a new instance of ImportJobsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewImportJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ImportJobsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ImportJobsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update an import job. Import jobs are automatically deleted 72 hours after completion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - importJobName - Name for the import job. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - importJob - Object containing the user-selectable properties of the import job. If read-only properties are included, they +// must match the existing values of those properties. +// - options - ImportJobsClientBeginCreateOrUpdateOptions contains the optional parameters for the ImportJobsClient.BeginCreateOrUpdate +// method. +func (client *ImportJobsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, importJob ImportJob, options *ImportJobsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ImportJobsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, amlFilesystemName, importJobName, importJob, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ImportJobsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ImportJobsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update an import job. Import jobs are automatically deleted 72 hours after completion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *ImportJobsClient) createOrUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, importJob ImportJob, options *ImportJobsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ImportJobsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, amlFilesystemName, importJobName, importJob, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ImportJobsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, importJob ImportJob, options *ImportJobsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs/{importJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + if importJobName == "" { + return nil, errors.New("parameter importJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{importJobName}", url.PathEscape(importJobName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, importJob); err != nil { + return nil, err + } + return req, nil +} + +// BeginDelete - Schedules an import job for deletion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - importJobName - Name for the import job. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - ImportJobsClientBeginDeleteOptions contains the optional parameters for the ImportJobsClient.BeginDelete method. +func (client *ImportJobsClient) BeginDelete(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, options *ImportJobsClientBeginDeleteOptions) (*runtime.Poller[ImportJobsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, amlFilesystemName, importJobName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ImportJobsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ImportJobsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Schedules an import job for deletion. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *ImportJobsClient) deleteOperation(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, options *ImportJobsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ImportJobsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, amlFilesystemName, importJobName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ImportJobsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, options *ImportJobsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs/{importJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if importJobName == "" { + return nil, errors.New("parameter importJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{importJobName}", url.PathEscape(importJobName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns an import job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - importJobName - Name for the import job. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - ImportJobsClientGetOptions contains the optional parameters for the ImportJobsClient.Get method. +func (client *ImportJobsClient) Get(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, options *ImportJobsClientGetOptions) (ImportJobsClientGetResponse, error) { + var err error + const operationName = "ImportJobsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, amlFilesystemName, importJobName, options) + if err != nil { + return ImportJobsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ImportJobsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ImportJobsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ImportJobsClient) getCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, options *ImportJobsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs/{importJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if importJobName == "" { + return nil, errors.New("parameter importJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{importJobName}", url.PathEscape(importJobName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ImportJobsClient) getHandleResponse(resp *http.Response) (ImportJobsClientGetResponse, error) { + result := ImportJobsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ImportJob); err != nil { + return ImportJobsClientGetResponse{}, err + } + return result, nil +} + +// NewListByAmlFilesystemPager - Returns all import jobs the user has access to under an AML File System. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - options - ImportJobsClientListByAmlFilesystemOptions contains the optional parameters for the ImportJobsClient.NewListByAmlFilesystemPager +// method. +func (client *ImportJobsClient) NewListByAmlFilesystemPager(resourceGroupName string, amlFilesystemName string, options *ImportJobsClientListByAmlFilesystemOptions) *runtime.Pager[ImportJobsClientListByAmlFilesystemResponse] { + return runtime.NewPager(runtime.PagingHandler[ImportJobsClientListByAmlFilesystemResponse]{ + More: func(page ImportJobsClientListByAmlFilesystemResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ImportJobsClientListByAmlFilesystemResponse) (ImportJobsClientListByAmlFilesystemResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ImportJobsClient.NewListByAmlFilesystemPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByAmlFilesystemCreateRequest(ctx, resourceGroupName, amlFilesystemName, options) + }, nil) + if err != nil { + return ImportJobsClientListByAmlFilesystemResponse{}, err + } + return client.listByAmlFilesystemHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByAmlFilesystemCreateRequest creates the ListByAmlFilesystem request. +func (client *ImportJobsClient) listByAmlFilesystemCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *ImportJobsClientListByAmlFilesystemOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByAmlFilesystemHandleResponse handles the ListByAmlFilesystem response. +func (client *ImportJobsClient) listByAmlFilesystemHandleResponse(resp *http.Response) (ImportJobsClientListByAmlFilesystemResponse, error) { + result := ImportJobsClientListByAmlFilesystemResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ImportJobsListResult); err != nil { + return ImportJobsClientListByAmlFilesystemResponse{}, err + } + return result, nil +} + +// BeginUpdate - Update an import job instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - importJobName - Name for the import job. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric. +// - importJob - Object containing the user-selectable properties of the import job. If read-only properties are included, they +// must match the existing values of those properties. +// - options - ImportJobsClientBeginUpdateOptions contains the optional parameters for the ImportJobsClient.BeginUpdate method. +func (client *ImportJobsClient) BeginUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, importJob ImportJobUpdate, options *ImportJobsClientBeginUpdateOptions) (*runtime.Poller[ImportJobsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, amlFilesystemName, importJobName, importJob, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ImportJobsClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ImportJobsClientUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Update - Update an import job instance. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *ImportJobsClient) update(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, importJob ImportJobUpdate, options *ImportJobsClientBeginUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ImportJobsClient.BeginUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, amlFilesystemName, importJobName, importJob, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// updateCreateRequest creates the Update request. +func (client *ImportJobsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, amlFilesystemName string, importJobName string, importJob ImportJobUpdate, options *ImportJobsClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs/{importJobName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if amlFilesystemName == "" { + return nil, errors.New("parameter amlFilesystemName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{amlFilesystemName}", url.PathEscape(amlFilesystemName)) + if importJobName == "" { + return nil, errors.New("parameter importJobName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{importJobName}", url.PathEscape(importJobName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, importJob); err != nil { + return nil, err + } + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/management_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/management_client.go new file mode 100644 index 00000000..dbf12a7b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/management_client.go @@ -0,0 +1,156 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagementClient contains the methods for the StorageCacheManagementClient group. +// Don't use this type directly, use NewManagementClient() instead. +type ManagementClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagementClient creates a new instance of ManagementClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagementClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CheckAmlFSSubnets - Check that subnets will be valid for AML file system create calls. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - options - ManagementClientCheckAmlFSSubnetsOptions contains the optional parameters for the ManagementClient.CheckAmlFSSubnets +// method. +func (client *ManagementClient) CheckAmlFSSubnets(ctx context.Context, options *ManagementClientCheckAmlFSSubnetsOptions) (ManagementClientCheckAmlFSSubnetsResponse, error) { + var err error + const operationName = "ManagementClient.CheckAmlFSSubnets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.checkAmlFSSubnetsCreateRequest(ctx, options) + if err != nil { + return ManagementClientCheckAmlFSSubnetsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientCheckAmlFSSubnetsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientCheckAmlFSSubnetsResponse{}, err + } + return ManagementClientCheckAmlFSSubnetsResponse{}, nil +} + +// checkAmlFSSubnetsCreateRequest creates the CheckAmlFSSubnets request. +func (client *ManagementClient) checkAmlFSSubnetsCreateRequest(ctx context.Context, options *ManagementClientCheckAmlFSSubnetsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/checkAmlFSSubnets" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.AmlFilesystemSubnetInfo != nil { + if err := runtime.MarshalAsJSON(req, *options.AmlFilesystemSubnetInfo); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// GetRequiredAmlFSSubnetsSize - Get the number of available IP addresses needed for the AML file system information provided. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - options - ManagementClientGetRequiredAmlFSSubnetsSizeOptions contains the optional parameters for the ManagementClient.GetRequiredAmlFSSubnetsSize +// method. +func (client *ManagementClient) GetRequiredAmlFSSubnetsSize(ctx context.Context, options *ManagementClientGetRequiredAmlFSSubnetsSizeOptions) (ManagementClientGetRequiredAmlFSSubnetsSizeResponse, error) { + var err error + const operationName = "ManagementClient.GetRequiredAmlFSSubnetsSize" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getRequiredAmlFSSubnetsSizeCreateRequest(ctx, options) + if err != nil { + return ManagementClientGetRequiredAmlFSSubnetsSizeResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagementClientGetRequiredAmlFSSubnetsSizeResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagementClientGetRequiredAmlFSSubnetsSizeResponse{}, err + } + resp, err := client.getRequiredAmlFSSubnetsSizeHandleResponse(httpResp) + return resp, err +} + +// getRequiredAmlFSSubnetsSizeCreateRequest creates the GetRequiredAmlFSSubnetsSize request. +func (client *ManagementClient) getRequiredAmlFSSubnetsSizeCreateRequest(ctx context.Context, options *ManagementClientGetRequiredAmlFSSubnetsSizeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/getRequiredAmlFSSubnetsSize" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if options != nil && options.RequiredAMLFilesystemSubnetsSizeInfo != nil { + if err := runtime.MarshalAsJSON(req, *options.RequiredAMLFilesystemSubnetsSizeInfo); err != nil { + return nil, err + } + return req, nil + } + return req, nil +} + +// getRequiredAmlFSSubnetsSizeHandleResponse handles the GetRequiredAmlFSSubnetsSize response. +func (client *ManagementClient) getRequiredAmlFSSubnetsSizeHandleResponse(resp *http.Response) (ManagementClientGetRequiredAmlFSSubnetsSizeResponse, error) { + result := ManagementClientGetRequiredAmlFSSubnetsSizeResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RequiredAmlFilesystemSubnetsSize); err != nil { + return ManagementClientGetRequiredAmlFSSubnetsSizeResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/models.go new file mode 100644 index 00000000..251ba680 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/models.go @@ -0,0 +1,1223 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import "time" + +// APIOperation - REST API operation description: see https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/openapi-authoring-automated-guidelines.md#r3023-operationsapiimplementation +type APIOperation struct { + // The object that represents the operation. + Display *APIOperationDisplay + + // The flag that indicates whether the operation applies to data plane. + IsDataAction *bool + + // Operation name: {provider}/{resource}/{operation} + Name *string + + // Origin of the operation. + Origin *string + + // Additional details about an operation. + Properties *APIOperationProperties +} + +// APIOperationDisplay - The object that represents the operation. +type APIOperationDisplay struct { + // The description of the operation + Description *string + + // Operation type: Read, write, delete, etc. + Operation *string + + // Service provider: Microsoft.StorageCache + Provider *string + + // Resource on which the operation is performed: Cache, etc. + Resource *string +} + +// APIOperationListResult - Result of the request to list Resource Provider operations. It contains a list of operations and +// a URL link to get the next set of results. +type APIOperationListResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string + + // List of Resource Provider operations supported by the Microsoft.StorageCache resource provider. + Value []*APIOperation +} + +// APIOperationProperties - Additional details about an operation. +type APIOperationProperties struct { + // Specification of the all the metrics provided for a resource type. + ServiceSpecification *APIOperationPropertiesServiceSpecification +} + +// APIOperationPropertiesServiceSpecification - Specification of the all the metrics provided for a resource type. +type APIOperationPropertiesServiceSpecification struct { + // Details about operations related to logs. + LogSpecifications []*LogSpecification + + // Details about operations related to metrics. + MetricSpecifications []*MetricSpecification +} + +// AmlFilesystem - An AML file system instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md +type AmlFilesystem struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // The managed identity used by the AML file system, if configured. + Identity *AmlFilesystemIdentity + + // Properties of the AML file system. + Properties *AmlFilesystemProperties + + // SKU for the resource. + SKU *SKUName + + // Resource tags. + Tags map[string]*string + + // Availability zones for resources. This field should only contain a single element in the array. + Zones []*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AmlFilesystemArchive - Information about the AML file system archive +type AmlFilesystemArchive struct { + // READ-ONLY; Lustre file system path to archive relative to the file system root. Specify '/' to archive all modified data. + FilesystemPath *string + + // READ-ONLY; The status of the archive + Status *AmlFilesystemArchiveStatus +} + +// AmlFilesystemArchiveInfo - Information required to execute the archive operation +type AmlFilesystemArchiveInfo struct { + // Lustre file system path to archive relative to the file system root. Specify '/' to archive all modified data. + FilesystemPath *string +} + +// AmlFilesystemArchiveStatus - The status of the archive +type AmlFilesystemArchiveStatus struct { + // READ-ONLY; Server-defined error code for the archive operation + ErrorCode *string + + // READ-ONLY; Server-defined error message for the archive operation + ErrorMessage *string + + // READ-ONLY; The time of the last completed archive operation + LastCompletionTime *time.Time + + // READ-ONLY; The time the latest archive operation started + LastStartedTime *time.Time + + // READ-ONLY; The completion percentage of the archive operation + PercentComplete *int32 + + // READ-ONLY; The state of the archive operation + State *ArchiveStatusType +} + +// AmlFilesystemClientInfo - AML file system client information +type AmlFilesystemClientInfo struct { + // READ-ONLY; Container Storage Interface information for the AML file system. + ContainerStorageInterface *AmlFilesystemContainerStorageInterface + + // READ-ONLY; The version of Lustre running in the AML file system + LustreVersion *string + + // READ-ONLY; The IPv4 address used by clients to mount the AML file system's Lustre Management Service (MGS). + MgsAddress *string + + // READ-ONLY; Recommended command to mount the AML file system + MountCommand *string +} + +// AmlFilesystemContainerStorageInterface - AML file system container storage interface information +type AmlFilesystemContainerStorageInterface struct { + // READ-ONLY; Recommended AKS Persistent Volume for the CSI driver, in Base64 encoded YAML + PersistentVolume *string + + // READ-ONLY; Recommended AKS Persistent Volume Claim for the CSI driver, in Base64 encoded YAML + PersistentVolumeClaim *string + + // READ-ONLY; Recommended AKS Storage Class for the CSI driver, in Base64 encoded YAML + StorageClass *string +} + +// AmlFilesystemEncryptionSettings - AML file system encryption settings. +type AmlFilesystemEncryptionSettings struct { + // Specifies the location of the encryption key in Key Vault. + KeyEncryptionKey *KeyVaultKeyReference +} + +// AmlFilesystemHealth - An indication of AML file system health. Gives more information about health than just that related +// to provisioning. +type AmlFilesystemHealth struct { + // List of AML file system health states. + State *AmlFilesystemHealthStateType + + // Server-defined error code for the AML file system health + StatusCode *string + + // Describes the health state. + StatusDescription *string +} + +// AmlFilesystemHsmSettings - AML file system HSM settings. +type AmlFilesystemHsmSettings struct { + // REQUIRED; Resource ID of storage container used for hydrating the namespace and archiving from the namespace. The resource + // provider must have permission to create SAS tokens on the storage account. + Container *string + + // REQUIRED; Resource ID of storage container used for logging events and errors. Must be a separate container in the same + // storage account as the hydration and archive container. The resource provider must have + // permission to create SAS tokens on the storage account. + LoggingContainer *string + + // Only blobs in the non-logging container that start with this path/prefix get imported into the cluster namespace. This + // is only used during initial creation of the AML file system. It automatically + // creates an import job resource that can be deleted. + ImportPrefix *string + + // Only blobs in the non-logging container that start with one of the paths/prefixes in this array get imported into the cluster + // namespace. This is only used during initial creation of the AML file + // system and has '/' as the default value. It automatically creates an import job resource that can be deleted. + ImportPrefixesInitial []*string +} + +// AmlFilesystemIdentity - Managed Identity properties. +type AmlFilesystemIdentity struct { + // The type of identity used for the resource. + Type *AmlFilesystemIdentityType + + // A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty dictionary. + UserAssignedIdentities map[string]*UserAssignedIdentitiesValue + + // READ-ONLY; The principal ID for the user-assigned identity of the resource. + PrincipalID *string + + // READ-ONLY; The tenant ID associated with the resource. + TenantID *string +} + +// AmlFilesystemProperties - Properties of the AML file system. +type AmlFilesystemProperties struct { + // REQUIRED; Subnet used for managing the AML file system and for client-facing operations. This subnet should have at least + // a /24 subnet mask within the VNET's address space. + FilesystemSubnet *string + + // REQUIRED; Start time of a 30-minute weekly maintenance window. + MaintenanceWindow *AmlFilesystemPropertiesMaintenanceWindow + + // REQUIRED; The size of the AML file system, in TiB. This might be rounded up. + StorageCapacityTiB *float32 + + // Specifies encryption settings of the AML file system. + EncryptionSettings *AmlFilesystemEncryptionSettings + + // Hydration and archive settings and status + Hsm *AmlFilesystemPropertiesHsm + + // Specifies root squash settings of the AML file system. + RootSquashSettings *AmlFilesystemRootSquashSettings + + // READ-ONLY; Client information for the AML file system. + ClientInfo *AmlFilesystemClientInfo + + // READ-ONLY; Health of the AML file system. + Health *AmlFilesystemHealth + + // READ-ONLY; ARM provisioning state. + ProvisioningState *AmlFilesystemProvisioningStateType + + // READ-ONLY; Throughput provisioned in MB per sec, calculated as storageCapacityTiB * per-unit storage throughput + ThroughputProvisionedMBps *int32 +} + +// AmlFilesystemPropertiesHsm - Hydration and archive settings and status +type AmlFilesystemPropertiesHsm struct { + // Specifies HSM settings of the AML file system. + Settings *AmlFilesystemHsmSettings + + // READ-ONLY; Archive status + ArchiveStatus []*AmlFilesystemArchive +} + +// AmlFilesystemPropertiesMaintenanceWindow - Start time of a 30-minute weekly maintenance window. +type AmlFilesystemPropertiesMaintenanceWindow struct { + // Day of the week on which the maintenance window will occur. + DayOfWeek *MaintenanceDayOfWeekType + + // The time of day (in UTC) to start the maintenance window. + TimeOfDayUTC *string +} + +// AmlFilesystemRootSquashSettings - AML file system squash settings. +type AmlFilesystemRootSquashSettings struct { + // Squash mode of the AML file system. 'All': User and Group IDs on files will be squashed to the provided values for all + // users on non-trusted systems. 'RootOnly': User and Group IDs on files will be + // squashed to provided values for solely the root user on non-trusted systems. 'None': No squashing of User and Group IDs + // is performed for any users on any systems. + Mode *AmlFilesystemSquashMode + + // Semicolon separated NID IP Address list(s) to be added to the TrustedSystems. + NoSquashNidLists *string + + // Group ID to squash to. + SquashGID *int64 + + // User ID to squash to. + SquashUID *int64 + + // READ-ONLY; AML file system squash status. + Status *string +} + +// AmlFilesystemSubnetInfo - Information required to validate the subnet that will be used in AML file system create +type AmlFilesystemSubnetInfo struct { + // Subnet used for managing the AML file system and for client-facing operations. This subnet should have at least a /24 subnet + // mask within the VNET's address space. + FilesystemSubnet *string + + // Region that the AML file system will be created in. + Location *string + + // SKU for the resource. + SKU *SKUName + + // The size of the AML file system, in TiB. + StorageCapacityTiB *float32 +} + +// AmlFilesystemUpdate - An AML file system update instance. +type AmlFilesystemUpdate struct { + // Properties of the AML file system. + Properties *AmlFilesystemUpdateProperties + + // Resource tags. + Tags map[string]*string +} + +// AmlFilesystemUpdateProperties - Properties of the AML file system. +type AmlFilesystemUpdateProperties struct { + // Specifies encryption settings of the AML file system. + EncryptionSettings *AmlFilesystemEncryptionSettings + + // Start time of a 30-minute weekly maintenance window. + MaintenanceWindow *AmlFilesystemUpdatePropertiesMaintenanceWindow + + // Specifies root squash settings of the AML file system. + RootSquashSettings *AmlFilesystemRootSquashSettings +} + +// AmlFilesystemUpdatePropertiesMaintenanceWindow - Start time of a 30-minute weekly maintenance window. +type AmlFilesystemUpdatePropertiesMaintenanceWindow struct { + // Day of the week on which the maintenance window will occur. + DayOfWeek *MaintenanceDayOfWeekType + + // The time of day (in UTC) to start the maintenance window. + TimeOfDayUTC *string +} + +// AmlFilesystemsListResult - Result of the request to list AML file systems. It contains a list of AML file systems and a +// URL link to get the next set of results. +type AmlFilesystemsListResult struct { + // URL to get the next set of AML file system list results, if there are any. + NextLink *string + + // List of AML file systems. + Value []*AmlFilesystem +} + +// AscOperation - The status of operation. +type AscOperation struct { + // The end time of the operation. + EndTime *string + + // The error detail of the operation if any. + Error *AscOperationErrorResponse + + // The operation Id. + ID *string + + // The operation name. + Name *string + + // Additional operation-specific properties + Properties *AscOperationProperties + + // The start time of the operation. + StartTime *string + + // The status of the operation. + Status *string +} + +// AscOperationErrorResponse - Describes the format of Error response. +type AscOperationErrorResponse struct { + // Error code + Code *string + + // Error message indicating why the operation failed. + Message *string +} + +// AscOperationProperties - Additional operation-specific output. +type AscOperationProperties struct { + // Additional operation-specific output. + Output map[string]any +} + +// BlobNfsTarget - Properties pertaining to the BlobNfsTarget. +type BlobNfsTarget struct { + // Resource ID of the storage container. + Target *string + + // Identifies the StorageCache usage model to be used for this storage target. + UsageModel *string + + // Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates. + VerificationTimer *int32 + + // Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to back-end storage. + WriteBackTimer *int32 +} + +// Cache - A cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md +type Cache struct { + // The identity of the cache, if configured. + Identity *CacheIdentity + + // Region name string. + Location *string + + // Properties of the cache. + Properties *CacheProperties + + // SKU for the cache. + SKU *CacheSKU + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Resource ID of the cache. + ID *string + + // READ-ONLY; Name of cache. + Name *string + + // READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData + + // READ-ONLY; Type of the cache; Microsoft.StorageCache/Cache + Type *string +} + +// CacheActiveDirectorySettings - Active Directory settings used to join a cache to a domain. +type CacheActiveDirectorySettings struct { + // REQUIRED; The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server. Length must + // 1-15 characters from the class [-0-9a-zA-Z]. + CacheNetBiosName *string + + // REQUIRED; The fully qualified domain name of the Active Directory domain controller. + DomainName *string + + // REQUIRED; The Active Directory domain's NetBIOS name. + DomainNetBiosName *string + + // REQUIRED; Primary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name. + PrimaryDNSIPAddress *string + + // Active Directory admin credentials used to join the HPC Cache to a domain. + Credentials *CacheActiveDirectorySettingsCredentials + + // Secondary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name. + SecondaryDNSIPAddress *string + + // READ-ONLY; True if the HPC Cache is joined to the Active Directory domain. + DomainJoined *DomainJoinedType +} + +// CacheActiveDirectorySettingsCredentials - Active Directory admin credentials used to join the HPC Cache to a domain. +type CacheActiveDirectorySettingsCredentials struct { + // REQUIRED; Username of the Active Directory domain administrator. This value is stored encrypted and not returned on response. + Username *string + + // Plain text password of the Active Directory domain administrator. This value is stored encrypted and not returned on response. + Password *string +} + +// CacheDirectorySettings - Cache Directory Services settings. +type CacheDirectorySettings struct { + // Specifies settings for joining the HPC Cache to an Active Directory domain. + ActiveDirectory *CacheActiveDirectorySettings + + // Specifies settings for Extended Groups. Extended Groups allows users to be members of more than 16 groups. + UsernameDownload *CacheUsernameDownloadSettings +} + +// CacheEncryptionSettings - Cache encryption settings. +type CacheEncryptionSettings struct { + // Specifies the location of the key encryption key in key vault. + KeyEncryptionKey *KeyVaultKeyReference + + // Specifies whether the service will automatically rotate to the newest version of the key in the key vault. + RotationToLatestKeyVersionEnabled *bool +} + +// CacheHealth - An indication of cache health. Gives more information about health than just that related to provisioning. +type CacheHealth struct { + // List of cache health states. Down is when the cluster is not responding. Degraded is when its functioning but has some + // alerts. Transitioning when it is creating or deleting. Unknown will be returned + // in old api versions when a new value is added in future versions. WaitingForKey is when the create is waiting for the system + // assigned identity to be given access to the encryption key in the + // encryption settings. + State *HealthStateType + + // Describes explanation of state. + StatusDescription *string + + // READ-ONLY; Outstanding conditions that need to be investigated and resolved. + Conditions []*Condition +} + +// CacheIdentity - Cache identity properties. +type CacheIdentity struct { + // The type of identity used for the cache + Type *CacheIdentityType + + // A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty dictionary. + UserAssignedIdentities map[string]*UserAssignedIdentitiesValue + + // READ-ONLY; The principal ID for the system-assigned identity of the cache. + PrincipalID *string + + // READ-ONLY; The tenant ID associated with the cache. + TenantID *string +} + +// CacheNetworkSettings - Cache network settings. +type CacheNetworkSettings struct { + // DNS search domain + DNSSearchDomain *string + + // DNS servers for the cache to use. It will be set from the network configuration if no value is provided. + DNSServers []*string + + // The IPv4 maximum transmission unit configured for the subnet. + Mtu *int32 + + // NTP server IP Address or FQDN for the cache to use. The default is time.windows.com. + NtpServer *string + + // READ-ONLY; Array of additional IP addresses used by this cache. + UtilityAddresses []*string +} + +// CacheProperties - Properties of the cache. +type CacheProperties struct { + // The size of this Cache, in GB. + CacheSizeGB *int32 + + // Specifies Directory Services settings of the cache. + DirectoryServicesSettings *CacheDirectorySettings + + // Specifies encryption settings of the cache. + EncryptionSettings *CacheEncryptionSettings + + // Specifies network settings of the cache. + NetworkSettings *CacheNetworkSettings + + // Specifies security settings of the cache. + SecuritySettings *CacheSecuritySettings + + // Subnet used for the cache. + Subnet *string + + // Upgrade settings of the cache. + UpgradeSettings *CacheUpgradeSettings + + // Availability zones for resources. This field should only contain a single element in the array. + Zones []*string + + // READ-ONLY; Health of the cache. + Health *CacheHealth + + // READ-ONLY; Array of IPv4 addresses that can be used by clients mounting this cache. + MountAddresses []*string + + // READ-ONLY; Specifies the priming jobs defined in the cache. + PrimingJobs []*PrimingJob + + // READ-ONLY; ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property + ProvisioningState *ProvisioningStateType + + // READ-ONLY; Specifies the space allocation percentage for each storage target in the cache. + SpaceAllocation []*StorageTargetSpaceAllocation + + // READ-ONLY; Upgrade status of the cache. + UpgradeStatus *CacheUpgradeStatus +} + +// CacheSKU - SKU for the cache. +type CacheSKU struct { + // SKU name for this cache. + Name *string +} + +// CacheSecuritySettings - Cache security settings. +type CacheSecuritySettings struct { + // NFS access policies defined for this cache. + AccessPolicies []*NfsAccessPolicy +} + +// CacheUpgradeSettings - Cache Upgrade Settings. +type CacheUpgradeSettings struct { + // When upgradeScheduleEnabled is true, this field holds the user-chosen upgrade time. At the user-chosen time, the firmware + // update will automatically be installed on the cache. + ScheduledTime *time.Time + + // True if the user chooses to select an installation time between now and firmwareUpdateDeadline. Else the firmware will + // automatically be installed after firmwareUpdateDeadline if not triggered earlier + // via the upgrade operation. + UpgradeScheduleEnabled *bool +} + +// CacheUpgradeStatus - Properties describing the software upgrade state of the cache. +type CacheUpgradeStatus struct { + // READ-ONLY; Version string of the firmware currently installed on this cache. + CurrentFirmwareVersion *string + + // READ-ONLY; Time at which the pending firmware update will automatically be installed on the cache. + FirmwareUpdateDeadline *time.Time + + // READ-ONLY; True if there is a firmware update ready to install on this cache. The firmware will automatically be installed + // after firmwareUpdateDeadline if not triggered earlier via the upgrade operation. + FirmwareUpdateStatus *FirmwareStatusType + + // READ-ONLY; Time of the last successful firmware update. + LastFirmwareUpdate *time.Time + + // READ-ONLY; When firmwareUpdateAvailable is true, this field holds the version string for the update. + PendingFirmwareVersion *string +} + +// CacheUsernameDownloadSettings - Settings for Extended Groups username and group download. +type CacheUsernameDownloadSettings struct { + // Determines if the certificate should be automatically downloaded. This applies to 'caCertificateURI' only if 'requireValidCertificate' + // is true. + AutoDownloadCertificate *bool + + // The URI of the CA certificate to validate the LDAP secure connection. This field must be populated when 'requireValidCertificate' + // is set to true. + CaCertificateURI *string + + // When present, these are the credentials for the secure LDAP connection. + Credentials *CacheUsernameDownloadSettingsCredentials + + // Whether or not the LDAP connection should be encrypted. + EncryptLdapConnection *bool + + // Whether or not Extended Groups is enabled. + ExtendedGroups *bool + + // The URI of the file containing group information (in /etc/group file format). This field must be populated when 'usernameSource' + // is set to 'File'. + GroupFileURI *string + + // The base distinguished name for the LDAP domain. + LdapBaseDN *string + + // The fully qualified domain name or IP address of the LDAP server to use. + LdapServer *string + + // Determines if the certificates must be validated by a certificate authority. When true, caCertificateURI must be provided. + RequireValidCertificate *bool + + // The URI of the file containing user information (in /etc/passwd file format). This field must be populated when 'usernameSource' + // is set to 'File'. + UserFileURI *string + + // This setting determines how the cache gets username and group names for clients. + UsernameSource *UsernameSource + + // READ-ONLY; Indicates whether or not the HPC Cache has performed the username download successfully. + UsernameDownloaded *UsernameDownloadedType +} + +// CacheUsernameDownloadSettingsCredentials - When present, these are the credentials for the secure LDAP connection. +type CacheUsernameDownloadSettingsCredentials struct { + // The Bind Distinguished Name identity to be used in the secure LDAP connection. This value is stored encrypted and not returned + // on response. + BindDn *string + + // The Bind password to be used in the secure LDAP connection. This value is stored encrypted and not returned on response. + BindPassword *string +} + +// CachesListResult - Result of the request to list caches. It contains a list of caches and a URL link to get the next set +// of results. +type CachesListResult struct { + // URL to get the next set of cache list results, if there are any. + NextLink *string + + // List of Caches. + Value []*Cache +} + +// ClfsTarget - Properties pertaining to the ClfsTarget +type ClfsTarget struct { + // Resource ID of storage container. + Target *string +} + +// Condition - Outstanding conditions that will need to be resolved. +type Condition struct { + // READ-ONLY; The issue requiring attention. + Message *string + + // READ-ONLY; The time when the condition was raised. + Timestamp *time.Time +} + +// ImportJob - An import job instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md +type ImportJob struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Properties of the import job. + Properties *ImportJobProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ImportJobProperties - Properties of the import job. +type ImportJobProperties struct { + // How the import job will handle conflicts. For example, if the import job is trying to bring in a directory, but a file + // is at that path, how it handles it. Fail indicates that the import job should + // stop immediately and not do anything with the conflict. Skip indicates that it should pass over the conflict. OverwriteIfDirty + // causes the import job to delete and re-import the file or directory if it + // is a conflicting type, is dirty, or was not previously imported. OverwriteAlways extends OverwriteIfDirty to include releasing + // files that had been restored but were not dirty. Please reference + // https://learn.microsoft.com/en-us/azure/azure-managed-lustre/ for a thorough explanation of these resolution modes. + ConflictResolutionMode *ConflictResolutionMode + + // An array of blob paths/prefixes that get imported into the cluster namespace. It has '/' as the default value. + ImportPrefixes []*string + + // Total non-conflict oriented errors the import job will tolerate before exiting with failure. -1 means infinite. 0 means + // exit immediately and is the default. + MaximumErrors *int32 + + // READ-ONLY; ARM provisioning state. + ProvisioningState *ImportJobProvisioningStateType + + // READ-ONLY; The status of the import + Status *ImportJobPropertiesStatus +} + +// ImportJobPropertiesStatus - The status of the import +type ImportJobPropertiesStatus struct { + // READ-ONLY; A recent and frequently updated rate of total files, directories, and symlinks imported per second. + BlobsImportedPerSecond *int64 + + // READ-ONLY; A recent and frequently updated rate of blobs walked per second. + BlobsWalkedPerSecond *int64 + + // READ-ONLY; The time of the last completed archive operation + LastCompletionTime *time.Time + + // READ-ONLY; The time the latest archive operation started + LastStartedTime *time.Time + + // READ-ONLY; The state of the import job. InProgress indicates the import is still running. Canceled indicates it has been + // canceled by the user. Completed indicates import finished, successfully importing all + // discovered blobs into the Lustre namespace. CompletedPartial indicates the import finished but some blobs either were found + // to be conflicting and could not be imported or other errors were + // encountered. Failed means the import was unable to complete due to a fatal error. + State *ImportStatusType + + // READ-ONLY; The status message of the import job. + StatusMessage *string + + // READ-ONLY; The total blobs that have been imported since import began. + TotalBlobsImported *int64 + + // READ-ONLY; The total blob objects walked. + TotalBlobsWalked *int64 + + // READ-ONLY; Number of conflicts in the import job. + TotalConflicts *int32 + + // READ-ONLY; Number of errors in the import job. + TotalErrors *int32 +} + +// ImportJobUpdate - An import job update instance. +type ImportJobUpdate struct { + // Resource tags. + Tags map[string]*string +} + +// ImportJobsListResult - Result of the request to list import jobs. It contains a list of import jobs and a URL link to get +// the next set of results. +type ImportJobsListResult struct { + // URL to get the next set of import job list results, if there are any. + NextLink *string + + // List of import jobs. + Value []*ImportJob +} + +// KeyVaultKeyReference - Describes a reference to key vault key. +type KeyVaultKeyReference struct { + // REQUIRED; The URL referencing a key encryption key in key vault. + KeyURL *string + + // REQUIRED; Describes a resource Id to source key vault. + SourceVault *KeyVaultKeyReferenceSourceVault +} + +// KeyVaultKeyReferenceSourceVault - Describes a resource Id to source key vault. +type KeyVaultKeyReferenceSourceVault struct { + // Resource Id. + ID *string +} + +// LogSpecification - Details about operation related to logs. +type LogSpecification struct { + // Localized display name of the log. + DisplayName *string + + // The name of the log. + Name *string +} + +// MetricDimension - Specifications of the Dimension of metrics. +type MetricDimension struct { + // Localized friendly display name of the dimension + DisplayName *string + + // Internal name of the dimension. + InternalName *string + + // Name of the dimension + Name *string + + // To be exported to shoe box. + ToBeExportedForShoebox *bool +} + +// MetricSpecification - Details about operation related to metrics. +type MetricSpecification struct { + // The type of metric aggregation. + AggregationType *string + + // Dimensions of the metric + Dimensions []*MetricDimension + + // The description of the metric. + DisplayDescription *string + + // Localized display name of the metric. + DisplayName *string + + // Type of metrics. + MetricClass *string + + // The name of the metric. + Name *string + + // Support metric aggregation type. + SupportedAggregationTypes []*MetricAggregationType + + // The unit that the metric is measured in. + Unit *string +} + +// NamespaceJunction - A namespace junction. +type NamespaceJunction struct { + // Namespace path on a cache for a Storage Target. + NamespacePath *string + + // Name of the access policy applied to this junction. + NfsAccessPolicy *string + + // NFS export where targetPath exists. + NfsExport *string + + // Path in Storage Target to which namespacePath points. + TargetPath *string +} + +// Nfs3Target - Properties pertaining to the Nfs3Target +type Nfs3Target struct { + // IP address or host name of an NFSv3 host (e.g., 10.0.44.44). + Target *string + + // Identifies the StorageCache usage model to be used for this storage target. + UsageModel *string + + // Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates. + VerificationTimer *int32 + + // Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to back-end storage. + WriteBackTimer *int32 +} + +// NfsAccessPolicy - A set of rules describing access policies applied to NFSv3 clients of the cache. +type NfsAccessPolicy struct { + // REQUIRED; The set of rules describing client accesses allowed under this policy. + AccessRules []*NfsAccessRule + + // REQUIRED; Name identifying this policy. Access Policy names are not case sensitive. + Name *string +} + +// NfsAccessRule - Rule to place restrictions on portions of the cache namespace being presented to clients. +type NfsAccessRule struct { + // REQUIRED; Access allowed by this rule. + Access *NfsAccessRuleAccess + + // REQUIRED; Scope for this rule. The scope and filter determine which clients match the rule. + Scope *NfsAccessRuleScope + + // GID value that replaces 0 when rootSquash is true. This will use the value of anonymousUID if not provided. + AnonymousGID *string + + // UID value that replaces 0 when rootSquash is true. 65534 will be used if not provided. + AnonymousUID *string + + // Filter applied to the scope for this rule. The filter's format depends on its scope. 'default' scope matches all clients + // and has no filter value. 'network' scope takes a filter in CIDR format (for + // example, 10.99.1.0/24). 'host' takes an IP address or fully qualified domain name as filter. If a client does not match + // any filter rule and there is no default rule, access is denied. + Filter *string + + // Map root accesses to anonymousUID and anonymousGID. + RootSquash *bool + + // For the default policy, allow access to subdirectories under the root export. If this is set to no, clients can only mount + // the path '/'. If set to yes, clients can mount a deeper path, like '/a/b'. + SubmountAccess *bool + + // Allow SUID semantics. + Suid *bool +} + +// PrimingJob - A priming job instance. +type PrimingJob struct { + // REQUIRED; The priming job name. + PrimingJobName *string + + // REQUIRED; The URL for the priming manifest file to download. This file must be readable from the HPC Cache. When the file + // is in Azure blob storage the URL should include a Shared Access Signature (SAS) granting + // read permissions on the blob. + PrimingManifestURL *string + + // READ-ONLY; The job details or error information if any. + PrimingJobDetails *string + + // READ-ONLY; The unique identifier of the priming job. + PrimingJobID *string + + // READ-ONLY; The current progress of the priming job, as a percentage. + PrimingJobPercentComplete *float64 + + // READ-ONLY; The state of the priming operation. + PrimingJobState *PrimingJobState + + // READ-ONLY; The status code of the priming job. + PrimingJobStatus *string +} + +// PrimingJobIDParameter - Object containing the priming job ID. +type PrimingJobIDParameter struct { + // REQUIRED; The unique identifier of the priming job. + PrimingJobID *string +} + +// RequiredAmlFilesystemSubnetsSize - Information about the number of available IP addresses that are required for the AML +// file system. +type RequiredAmlFilesystemSubnetsSize struct { + // The number of available IP addresses that are required for the AML file system. + FilesystemSubnetSize *int32 +} + +// RequiredAmlFilesystemSubnetsSizeInfo - Information required to get the number of available IP addresses a subnet should +// have that will be used in AML file system create +type RequiredAmlFilesystemSubnetsSizeInfo struct { + // SKU for the resource. + SKU *SKUName + + // The size of the AML file system, in TiB. + StorageCapacityTiB *float32 +} + +// ResourceSKU - A resource SKU. +type ResourceSKU struct { + // A list of capabilities of this SKU, such as throughput or ops/sec. + Capabilities []*ResourceSKUCapabilities + + // The set of locations where the SKU is available. + LocationInfo []*ResourceSKULocationInfo + + // The name of this SKU. + Name *string + + // The restrictions preventing this SKU from being used. This is empty if there are no restrictions. + Restrictions []*Restriction + + // READ-ONLY; The set of locations where the SKU is available. This is the supported and registered Azure Geo Regions (e.g., + // West US, East US, Southeast Asia, etc.). + Locations []*string + + // READ-ONLY; The type of resource the SKU applies to. + ResourceType *string +} + +// ResourceSKUCapabilities - A resource SKU capability. +type ResourceSKUCapabilities struct { + // Name of a capability, such as ops/sec. + Name *string + + // Quantity, if the capability is measured by quantity. + Value *string +} + +// ResourceSKULocationInfo - Resource SKU location information. +type ResourceSKULocationInfo struct { + // Location where this SKU is available. + Location *string + + // Zones if any. + Zones []*string +} + +// ResourceSKUsResult - The response from the List Cache SKUs operation. +type ResourceSKUsResult struct { + // The URI to fetch the next page of cache SKUs. + NextLink *string + + // READ-ONLY; The list of SKUs available for the subscription. + Value []*ResourceSKU +} + +// ResourceUsage - The usage and limit (quota) for a resource. +type ResourceUsage struct { + // READ-ONLY; The current usage of this resource. + CurrentValue *int32 + + // READ-ONLY; The limit (quota) for this resource. + Limit *int32 + + // READ-ONLY; Naming information for this resource type. + Name *ResourceUsageName + + // READ-ONLY; Unit that the limit and usages are expressed in, such as 'Count'. + Unit *string +} + +// ResourceUsageName - Naming information for this resource type. +type ResourceUsageName struct { + // Localized name for this resource type. + LocalizedValue *string + + // Canonical name for this resource type. + Value *string +} + +// ResourceUsagesListResult - Result of the request to list resource usages. It contains a list of resource usages & limits +// and a URL link to get the next set of results. +type ResourceUsagesListResult struct { + // READ-ONLY; URL to get the next set of resource usage list results if there are any. + NextLink *string + + // READ-ONLY; List of usages and limits for resources controlled by the Microsoft.StorageCache resource provider. + Value []*ResourceUsage +} + +// Restriction - The restrictions preventing this SKU from being used. +type Restriction struct { + // The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" is set when + // the SKU has requiredQuotas parameter as the subscription does not belong to that + // quota. "NotAvailableForSubscription" is related to capacity at the datacenter. + ReasonCode *ReasonCode + + // READ-ONLY; The type of restrictions. In this version, the only possible value for this is location. + Type *string + + // READ-ONLY; The value of restrictions. If the restriction type is set to location, then this would be the different locations + // where the SKU is restricted. + Values []*string +} + +// SKUName - SKU for the resource. +type SKUName struct { + // SKU name for this resource. + Name *string +} + +// StorageTarget - Type of the Storage Target. +type StorageTarget struct { + // StorageTarget properties + Properties *StorageTargetProperties + + // READ-ONLY; Resource ID of the Storage Target. + ID *string + + // READ-ONLY; Region name string. + Location *string + + // READ-ONLY; Name of the Storage Target. + Name *string + + // READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData + + // READ-ONLY; Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget + Type *string +} + +// StorageTargetProperties - Properties of the Storage Target. +type StorageTargetProperties struct { + // REQUIRED; Type of the Storage Target. + TargetType *StorageTargetType + + // Properties when targetType is blobNfs. + BlobNfs *BlobNfsTarget + + // Properties when targetType is clfs. + Clfs *ClfsTarget + + // List of cache namespace junctions to target for namespace associations. + Junctions []*NamespaceJunction + + // Properties when targetType is nfs3. + Nfs3 *Nfs3Target + + // Storage target operational state. + State *OperationalStateType + + // Properties when targetType is unknown. + Unknown *UnknownTarget + + // READ-ONLY; The percentage of cache space allocated for this storage target + AllocationPercentage *int32 + + // READ-ONLY; ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property + ProvisioningState *ProvisioningStateType +} + +// StorageTargetSpaceAllocation - Storage Target space allocation properties. +type StorageTargetSpaceAllocation struct { + // The percentage of cache space allocated for this storage target + AllocationPercentage *int32 + + // Name of the storage target. + Name *string +} + +// StorageTargetsResult - A list of Storage Targets. +type StorageTargetsResult struct { + // The URI to fetch the next page of Storage Targets. + NextLink *string + + // The list of Storage Targets defined for the cache. + Value []*StorageTarget +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource last modification (UTC) + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *CreatedByType +} + +// UnknownTarget - Properties pertaining to the UnknownTarget +type UnknownTarget struct { + // Dictionary of string->string pairs containing information about the Storage Target. + Attributes map[string]*string +} + +// UsageModel - A usage model. +type UsageModel struct { + // Localized information describing this usage model. + Display *UsageModelDisplay + + // Non-localized keyword name for this usage model. + ModelName *string + + // The type of Storage Target to which this model is applicable (only nfs3 as of this version). + TargetType *string +} + +// UsageModelDisplay - Localized information describing this usage model. +type UsageModelDisplay struct { + // String to display for this usage model. + Description *string +} + +// UsageModelsResult - A list of cache usage models. +type UsageModelsResult struct { + // The URI to fetch the next page of cache usage models. + NextLink *string + + // The list of usage models available for the subscription. + Value []*UsageModel +} + +type UserAssignedIdentitiesValue struct { + // READ-ONLY; The client ID of the user-assigned identity. + ClientID *string + + // READ-ONLY; The principal ID of the user-assigned identity. + PrincipalID *string +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/models_serde.go new file mode 100644 index 00000000..978d572b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/models_serde.go @@ -0,0 +1,3157 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type APIOperation. +func (a APIOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", a.Display) + populate(objectMap, "isDataAction", a.IsDataAction) + populate(objectMap, "name", a.Name) + populate(objectMap, "origin", a.Origin) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIOperation. +func (a *APIOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &a.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &a.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &a.Origin) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIOperationDisplay. +func (a APIOperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "operation", a.Operation) + populate(objectMap, "provider", a.Provider) + populate(objectMap, "resource", a.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationDisplay. +func (a *APIOperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &a.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &a.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &a.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIOperationListResult. +func (a APIOperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationListResult. +func (a *APIOperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIOperationProperties. +func (a APIOperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", a.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationProperties. +func (a *APIOperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &a.ServiceSpecification) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type APIOperationPropertiesServiceSpecification. +func (a APIOperationPropertiesServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", a.LogSpecifications) + populate(objectMap, "metricSpecifications", a.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationPropertiesServiceSpecification. +func (a *APIOperationPropertiesServiceSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logSpecifications": + err = unpopulate(val, "LogSpecifications", &a.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &a.MetricSpecifications) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystem. +func (a AmlFilesystem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + populate(objectMap, "zones", a.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystem. +func (a *AmlFilesystem) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &a.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &a.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemArchive. +func (a AmlFilesystemArchive) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filesystemPath", a.FilesystemPath) + populate(objectMap, "status", a.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemArchive. +func (a *AmlFilesystemArchive) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filesystemPath": + err = unpopulate(val, "FilesystemPath", &a.FilesystemPath) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemArchiveInfo. +func (a AmlFilesystemArchiveInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filesystemPath", a.FilesystemPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemArchiveInfo. +func (a *AmlFilesystemArchiveInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filesystemPath": + err = unpopulate(val, "FilesystemPath", &a.FilesystemPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemArchiveStatus. +func (a AmlFilesystemArchiveStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "errorCode", a.ErrorCode) + populate(objectMap, "errorMessage", a.ErrorMessage) + populateDateTimeRFC3339(objectMap, "lastCompletionTime", a.LastCompletionTime) + populateDateTimeRFC3339(objectMap, "lastStartedTime", a.LastStartedTime) + populate(objectMap, "percentComplete", a.PercentComplete) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemArchiveStatus. +func (a *AmlFilesystemArchiveStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorCode": + err = unpopulate(val, "ErrorCode", &a.ErrorCode) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &a.ErrorMessage) + delete(rawMsg, key) + case "lastCompletionTime": + err = unpopulateDateTimeRFC3339(val, "LastCompletionTime", &a.LastCompletionTime) + delete(rawMsg, key) + case "lastStartedTime": + err = unpopulateDateTimeRFC3339(val, "LastStartedTime", &a.LastStartedTime) + delete(rawMsg, key) + case "percentComplete": + err = unpopulate(val, "PercentComplete", &a.PercentComplete) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemClientInfo. +func (a AmlFilesystemClientInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "containerStorageInterface", a.ContainerStorageInterface) + populate(objectMap, "lustreVersion", a.LustreVersion) + populate(objectMap, "mgsAddress", a.MgsAddress) + populate(objectMap, "mountCommand", a.MountCommand) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemClientInfo. +func (a *AmlFilesystemClientInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerStorageInterface": + err = unpopulate(val, "ContainerStorageInterface", &a.ContainerStorageInterface) + delete(rawMsg, key) + case "lustreVersion": + err = unpopulate(val, "LustreVersion", &a.LustreVersion) + delete(rawMsg, key) + case "mgsAddress": + err = unpopulate(val, "MgsAddress", &a.MgsAddress) + delete(rawMsg, key) + case "mountCommand": + err = unpopulate(val, "MountCommand", &a.MountCommand) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemContainerStorageInterface. +func (a AmlFilesystemContainerStorageInterface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "persistentVolume", a.PersistentVolume) + populate(objectMap, "persistentVolumeClaim", a.PersistentVolumeClaim) + populate(objectMap, "storageClass", a.StorageClass) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemContainerStorageInterface. +func (a *AmlFilesystemContainerStorageInterface) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "persistentVolume": + err = unpopulate(val, "PersistentVolume", &a.PersistentVolume) + delete(rawMsg, key) + case "persistentVolumeClaim": + err = unpopulate(val, "PersistentVolumeClaim", &a.PersistentVolumeClaim) + delete(rawMsg, key) + case "storageClass": + err = unpopulate(val, "StorageClass", &a.StorageClass) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemEncryptionSettings. +func (a AmlFilesystemEncryptionSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyEncryptionKey", a.KeyEncryptionKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemEncryptionSettings. +func (a *AmlFilesystemEncryptionSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyEncryptionKey": + err = unpopulate(val, "KeyEncryptionKey", &a.KeyEncryptionKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemHealth. +func (a AmlFilesystemHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "state", a.State) + populate(objectMap, "statusCode", a.StatusCode) + populate(objectMap, "statusDescription", a.StatusDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemHealth. +func (a *AmlFilesystemHealth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "state": + err = unpopulate(val, "State", &a.State) + delete(rawMsg, key) + case "statusCode": + err = unpopulate(val, "StatusCode", &a.StatusCode) + delete(rawMsg, key) + case "statusDescription": + err = unpopulate(val, "StatusDescription", &a.StatusDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemHsmSettings. +func (a AmlFilesystemHsmSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "container", a.Container) + populate(objectMap, "importPrefix", a.ImportPrefix) + populate(objectMap, "importPrefixesInitial", a.ImportPrefixesInitial) + populate(objectMap, "loggingContainer", a.LoggingContainer) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemHsmSettings. +func (a *AmlFilesystemHsmSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "container": + err = unpopulate(val, "Container", &a.Container) + delete(rawMsg, key) + case "importPrefix": + err = unpopulate(val, "ImportPrefix", &a.ImportPrefix) + delete(rawMsg, key) + case "importPrefixesInitial": + err = unpopulate(val, "ImportPrefixesInitial", &a.ImportPrefixesInitial) + delete(rawMsg, key) + case "loggingContainer": + err = unpopulate(val, "LoggingContainer", &a.LoggingContainer) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemIdentity. +func (a AmlFilesystemIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", a.PrincipalID) + populate(objectMap, "tenantId", a.TenantID) + populate(objectMap, "type", a.Type) + populate(objectMap, "userAssignedIdentities", a.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemIdentity. +func (a *AmlFilesystemIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &a.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &a.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &a.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemProperties. +func (a AmlFilesystemProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientInfo", a.ClientInfo) + populate(objectMap, "encryptionSettings", a.EncryptionSettings) + populate(objectMap, "filesystemSubnet", a.FilesystemSubnet) + populate(objectMap, "health", a.Health) + populate(objectMap, "hsm", a.Hsm) + populate(objectMap, "maintenanceWindow", a.MaintenanceWindow) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "rootSquashSettings", a.RootSquashSettings) + populate(objectMap, "storageCapacityTiB", a.StorageCapacityTiB) + populate(objectMap, "throughputProvisionedMBps", a.ThroughputProvisionedMBps) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemProperties. +func (a *AmlFilesystemProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientInfo": + err = unpopulate(val, "ClientInfo", &a.ClientInfo) + delete(rawMsg, key) + case "encryptionSettings": + err = unpopulate(val, "EncryptionSettings", &a.EncryptionSettings) + delete(rawMsg, key) + case "filesystemSubnet": + err = unpopulate(val, "FilesystemSubnet", &a.FilesystemSubnet) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &a.Health) + delete(rawMsg, key) + case "hsm": + err = unpopulate(val, "Hsm", &a.Hsm) + delete(rawMsg, key) + case "maintenanceWindow": + err = unpopulate(val, "MaintenanceWindow", &a.MaintenanceWindow) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "rootSquashSettings": + err = unpopulate(val, "RootSquashSettings", &a.RootSquashSettings) + delete(rawMsg, key) + case "storageCapacityTiB": + err = unpopulate(val, "StorageCapacityTiB", &a.StorageCapacityTiB) + delete(rawMsg, key) + case "throughputProvisionedMBps": + err = unpopulate(val, "ThroughputProvisionedMBps", &a.ThroughputProvisionedMBps) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemPropertiesHsm. +func (a AmlFilesystemPropertiesHsm) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "archiveStatus", a.ArchiveStatus) + populate(objectMap, "settings", a.Settings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemPropertiesHsm. +func (a *AmlFilesystemPropertiesHsm) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "archiveStatus": + err = unpopulate(val, "ArchiveStatus", &a.ArchiveStatus) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &a.Settings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemPropertiesMaintenanceWindow. +func (a AmlFilesystemPropertiesMaintenanceWindow) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dayOfWeek", a.DayOfWeek) + populate(objectMap, "timeOfDayUTC", a.TimeOfDayUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemPropertiesMaintenanceWindow. +func (a *AmlFilesystemPropertiesMaintenanceWindow) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dayOfWeek": + err = unpopulate(val, "DayOfWeek", &a.DayOfWeek) + delete(rawMsg, key) + case "timeOfDayUTC": + err = unpopulate(val, "TimeOfDayUTC", &a.TimeOfDayUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemRootSquashSettings. +func (a AmlFilesystemRootSquashSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "mode", a.Mode) + populate(objectMap, "noSquashNidLists", a.NoSquashNidLists) + populate(objectMap, "squashGID", a.SquashGID) + populate(objectMap, "squashUID", a.SquashUID) + populate(objectMap, "status", a.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemRootSquashSettings. +func (a *AmlFilesystemRootSquashSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &a.Mode) + delete(rawMsg, key) + case "noSquashNidLists": + err = unpopulate(val, "NoSquashNidLists", &a.NoSquashNidLists) + delete(rawMsg, key) + case "squashGID": + err = unpopulate(val, "SquashGID", &a.SquashGID) + delete(rawMsg, key) + case "squashUID": + err = unpopulate(val, "SquashUID", &a.SquashUID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemSubnetInfo. +func (a AmlFilesystemSubnetInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filesystemSubnet", a.FilesystemSubnet) + populate(objectMap, "location", a.Location) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "storageCapacityTiB", a.StorageCapacityTiB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemSubnetInfo. +func (a *AmlFilesystemSubnetInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filesystemSubnet": + err = unpopulate(val, "FilesystemSubnet", &a.FilesystemSubnet) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &a.Location) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &a.SKU) + delete(rawMsg, key) + case "storageCapacityTiB": + err = unpopulate(val, "StorageCapacityTiB", &a.StorageCapacityTiB) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemUpdate. +func (a AmlFilesystemUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemUpdate. +func (a *AmlFilesystemUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemUpdateProperties. +func (a AmlFilesystemUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "encryptionSettings", a.EncryptionSettings) + populate(objectMap, "maintenanceWindow", a.MaintenanceWindow) + populate(objectMap, "rootSquashSettings", a.RootSquashSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemUpdateProperties. +func (a *AmlFilesystemUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "encryptionSettings": + err = unpopulate(val, "EncryptionSettings", &a.EncryptionSettings) + delete(rawMsg, key) + case "maintenanceWindow": + err = unpopulate(val, "MaintenanceWindow", &a.MaintenanceWindow) + delete(rawMsg, key) + case "rootSquashSettings": + err = unpopulate(val, "RootSquashSettings", &a.RootSquashSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemUpdatePropertiesMaintenanceWindow. +func (a AmlFilesystemUpdatePropertiesMaintenanceWindow) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dayOfWeek", a.DayOfWeek) + populate(objectMap, "timeOfDayUTC", a.TimeOfDayUTC) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemUpdatePropertiesMaintenanceWindow. +func (a *AmlFilesystemUpdatePropertiesMaintenanceWindow) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dayOfWeek": + err = unpopulate(val, "DayOfWeek", &a.DayOfWeek) + delete(rawMsg, key) + case "timeOfDayUTC": + err = unpopulate(val, "TimeOfDayUTC", &a.TimeOfDayUTC) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlFilesystemsListResult. +func (a AmlFilesystemsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemsListResult. +func (a *AmlFilesystemsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AscOperation. +func (a AscOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "endTime", a.EndTime) + populate(objectMap, "error", a.Error) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "startTime", a.StartTime) + populate(objectMap, "status", a.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AscOperation. +func (a *AscOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulate(val, "EndTime", &a.EndTime) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &a.Error) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &a.StartTime) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AscOperationErrorResponse. +func (a AscOperationErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", a.Code) + populate(objectMap, "message", a.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AscOperationErrorResponse. +func (a *AscOperationErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &a.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &a.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AscOperationProperties. +func (a AscOperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "output", a.Output) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AscOperationProperties. +func (a *AscOperationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "output": + err = unpopulate(val, "Output", &a.Output) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BlobNfsTarget. +func (b BlobNfsTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "target", b.Target) + populate(objectMap, "usageModel", b.UsageModel) + populate(objectMap, "verificationTimer", b.VerificationTimer) + populate(objectMap, "writeBackTimer", b.WriteBackTimer) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BlobNfsTarget. +func (b *BlobNfsTarget) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "target": + err = unpopulate(val, "Target", &b.Target) + delete(rawMsg, key) + case "usageModel": + err = unpopulate(val, "UsageModel", &b.UsageModel) + delete(rawMsg, key) + case "verificationTimer": + err = unpopulate(val, "VerificationTimer", &b.VerificationTimer) + delete(rawMsg, key) + case "writeBackTimer": + err = unpopulate(val, "WriteBackTimer", &b.WriteBackTimer) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Cache. +func (c Cache) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", c.ID) + populate(objectMap, "identity", c.Identity) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "sku", c.SKU) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Cache. +func (c *Cache) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &c.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheActiveDirectorySettings. +func (c CacheActiveDirectorySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cacheNetBiosName", c.CacheNetBiosName) + populate(objectMap, "credentials", c.Credentials) + populate(objectMap, "domainJoined", c.DomainJoined) + populate(objectMap, "domainName", c.DomainName) + populate(objectMap, "domainNetBiosName", c.DomainNetBiosName) + populate(objectMap, "primaryDnsIpAddress", c.PrimaryDNSIPAddress) + populate(objectMap, "secondaryDnsIpAddress", c.SecondaryDNSIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheActiveDirectorySettings. +func (c *CacheActiveDirectorySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cacheNetBiosName": + err = unpopulate(val, "CacheNetBiosName", &c.CacheNetBiosName) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &c.Credentials) + delete(rawMsg, key) + case "domainJoined": + err = unpopulate(val, "DomainJoined", &c.DomainJoined) + delete(rawMsg, key) + case "domainName": + err = unpopulate(val, "DomainName", &c.DomainName) + delete(rawMsg, key) + case "domainNetBiosName": + err = unpopulate(val, "DomainNetBiosName", &c.DomainNetBiosName) + delete(rawMsg, key) + case "primaryDnsIpAddress": + err = unpopulate(val, "PrimaryDNSIPAddress", &c.PrimaryDNSIPAddress) + delete(rawMsg, key) + case "secondaryDnsIpAddress": + err = unpopulate(val, "SecondaryDNSIPAddress", &c.SecondaryDNSIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheActiveDirectorySettingsCredentials. +func (c CacheActiveDirectorySettingsCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "password", c.Password) + populate(objectMap, "username", c.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheActiveDirectorySettingsCredentials. +func (c *CacheActiveDirectorySettingsCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "password": + err = unpopulate(val, "Password", &c.Password) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &c.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheDirectorySettings. +func (c CacheDirectorySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activeDirectory", c.ActiveDirectory) + populate(objectMap, "usernameDownload", c.UsernameDownload) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheDirectorySettings. +func (c *CacheDirectorySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "activeDirectory": + err = unpopulate(val, "ActiveDirectory", &c.ActiveDirectory) + delete(rawMsg, key) + case "usernameDownload": + err = unpopulate(val, "UsernameDownload", &c.UsernameDownload) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheEncryptionSettings. +func (c CacheEncryptionSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyEncryptionKey", c.KeyEncryptionKey) + populate(objectMap, "rotationToLatestKeyVersionEnabled", c.RotationToLatestKeyVersionEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheEncryptionSettings. +func (c *CacheEncryptionSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyEncryptionKey": + err = unpopulate(val, "KeyEncryptionKey", &c.KeyEncryptionKey) + delete(rawMsg, key) + case "rotationToLatestKeyVersionEnabled": + err = unpopulate(val, "RotationToLatestKeyVersionEnabled", &c.RotationToLatestKeyVersionEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheHealth. +func (c CacheHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "conditions", c.Conditions) + populate(objectMap, "state", c.State) + populate(objectMap, "statusDescription", c.StatusDescription) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheHealth. +func (c *CacheHealth) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "conditions": + err = unpopulate(val, "Conditions", &c.Conditions) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &c.State) + delete(rawMsg, key) + case "statusDescription": + err = unpopulate(val, "StatusDescription", &c.StatusDescription) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheIdentity. +func (c CacheIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", c.PrincipalID) + populate(objectMap, "tenantId", c.TenantID) + populate(objectMap, "type", c.Type) + populate(objectMap, "userAssignedIdentities", c.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheIdentity. +func (c *CacheIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &c.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &c.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &c.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheNetworkSettings. +func (c CacheNetworkSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dnsSearchDomain", c.DNSSearchDomain) + populate(objectMap, "dnsServers", c.DNSServers) + populate(objectMap, "mtu", c.Mtu) + populate(objectMap, "ntpServer", c.NtpServer) + populate(objectMap, "utilityAddresses", c.UtilityAddresses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheNetworkSettings. +func (c *CacheNetworkSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dnsSearchDomain": + err = unpopulate(val, "DNSSearchDomain", &c.DNSSearchDomain) + delete(rawMsg, key) + case "dnsServers": + err = unpopulate(val, "DNSServers", &c.DNSServers) + delete(rawMsg, key) + case "mtu": + err = unpopulate(val, "Mtu", &c.Mtu) + delete(rawMsg, key) + case "ntpServer": + err = unpopulate(val, "NtpServer", &c.NtpServer) + delete(rawMsg, key) + case "utilityAddresses": + err = unpopulate(val, "UtilityAddresses", &c.UtilityAddresses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheProperties. +func (c CacheProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cacheSizeGB", c.CacheSizeGB) + populate(objectMap, "directoryServicesSettings", c.DirectoryServicesSettings) + populate(objectMap, "encryptionSettings", c.EncryptionSettings) + populate(objectMap, "health", c.Health) + populate(objectMap, "mountAddresses", c.MountAddresses) + populate(objectMap, "networkSettings", c.NetworkSettings) + populate(objectMap, "primingJobs", c.PrimingJobs) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "securitySettings", c.SecuritySettings) + populate(objectMap, "spaceAllocation", c.SpaceAllocation) + populate(objectMap, "subnet", c.Subnet) + populate(objectMap, "upgradeSettings", c.UpgradeSettings) + populate(objectMap, "upgradeStatus", c.UpgradeStatus) + populate(objectMap, "zones", c.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheProperties. +func (c *CacheProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cacheSizeGB": + err = unpopulate(val, "CacheSizeGB", &c.CacheSizeGB) + delete(rawMsg, key) + case "directoryServicesSettings": + err = unpopulate(val, "DirectoryServicesSettings", &c.DirectoryServicesSettings) + delete(rawMsg, key) + case "encryptionSettings": + err = unpopulate(val, "EncryptionSettings", &c.EncryptionSettings) + delete(rawMsg, key) + case "health": + err = unpopulate(val, "Health", &c.Health) + delete(rawMsg, key) + case "mountAddresses": + err = unpopulate(val, "MountAddresses", &c.MountAddresses) + delete(rawMsg, key) + case "networkSettings": + err = unpopulate(val, "NetworkSettings", &c.NetworkSettings) + delete(rawMsg, key) + case "primingJobs": + err = unpopulate(val, "PrimingJobs", &c.PrimingJobs) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "securitySettings": + err = unpopulate(val, "SecuritySettings", &c.SecuritySettings) + delete(rawMsg, key) + case "spaceAllocation": + err = unpopulate(val, "SpaceAllocation", &c.SpaceAllocation) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &c.Subnet) + delete(rawMsg, key) + case "upgradeSettings": + err = unpopulate(val, "UpgradeSettings", &c.UpgradeSettings) + delete(rawMsg, key) + case "upgradeStatus": + err = unpopulate(val, "UpgradeStatus", &c.UpgradeStatus) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &c.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheSKU. +func (c CacheSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheSKU. +func (c *CacheSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheSecuritySettings. +func (c CacheSecuritySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessPolicies", c.AccessPolicies) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheSecuritySettings. +func (c *CacheSecuritySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessPolicies": + err = unpopulate(val, "AccessPolicies", &c.AccessPolicies) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheUpgradeSettings. +func (c CacheUpgradeSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "scheduledTime", c.ScheduledTime) + populate(objectMap, "upgradeScheduleEnabled", c.UpgradeScheduleEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpgradeSettings. +func (c *CacheUpgradeSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scheduledTime": + err = unpopulateDateTimeRFC3339(val, "ScheduledTime", &c.ScheduledTime) + delete(rawMsg, key) + case "upgradeScheduleEnabled": + err = unpopulate(val, "UpgradeScheduleEnabled", &c.UpgradeScheduleEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheUpgradeStatus. +func (c CacheUpgradeStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentFirmwareVersion", c.CurrentFirmwareVersion) + populateDateTimeRFC3339(objectMap, "firmwareUpdateDeadline", c.FirmwareUpdateDeadline) + populate(objectMap, "firmwareUpdateStatus", c.FirmwareUpdateStatus) + populateDateTimeRFC3339(objectMap, "lastFirmwareUpdate", c.LastFirmwareUpdate) + populate(objectMap, "pendingFirmwareVersion", c.PendingFirmwareVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpgradeStatus. +func (c *CacheUpgradeStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentFirmwareVersion": + err = unpopulate(val, "CurrentFirmwareVersion", &c.CurrentFirmwareVersion) + delete(rawMsg, key) + case "firmwareUpdateDeadline": + err = unpopulateDateTimeRFC3339(val, "FirmwareUpdateDeadline", &c.FirmwareUpdateDeadline) + delete(rawMsg, key) + case "firmwareUpdateStatus": + err = unpopulate(val, "FirmwareUpdateStatus", &c.FirmwareUpdateStatus) + delete(rawMsg, key) + case "lastFirmwareUpdate": + err = unpopulateDateTimeRFC3339(val, "LastFirmwareUpdate", &c.LastFirmwareUpdate) + delete(rawMsg, key) + case "pendingFirmwareVersion": + err = unpopulate(val, "PendingFirmwareVersion", &c.PendingFirmwareVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheUsernameDownloadSettings. +func (c CacheUsernameDownloadSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "autoDownloadCertificate", c.AutoDownloadCertificate) + populate(objectMap, "caCertificateURI", c.CaCertificateURI) + populate(objectMap, "credentials", c.Credentials) + populate(objectMap, "encryptLdapConnection", c.EncryptLdapConnection) + populate(objectMap, "extendedGroups", c.ExtendedGroups) + populate(objectMap, "groupFileURI", c.GroupFileURI) + populate(objectMap, "ldapBaseDN", c.LdapBaseDN) + populate(objectMap, "ldapServer", c.LdapServer) + populate(objectMap, "requireValidCertificate", c.RequireValidCertificate) + populate(objectMap, "userFileURI", c.UserFileURI) + populate(objectMap, "usernameDownloaded", c.UsernameDownloaded) + populate(objectMap, "usernameSource", c.UsernameSource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheUsernameDownloadSettings. +func (c *CacheUsernameDownloadSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoDownloadCertificate": + err = unpopulate(val, "AutoDownloadCertificate", &c.AutoDownloadCertificate) + delete(rawMsg, key) + case "caCertificateURI": + err = unpopulate(val, "CaCertificateURI", &c.CaCertificateURI) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &c.Credentials) + delete(rawMsg, key) + case "encryptLdapConnection": + err = unpopulate(val, "EncryptLdapConnection", &c.EncryptLdapConnection) + delete(rawMsg, key) + case "extendedGroups": + err = unpopulate(val, "ExtendedGroups", &c.ExtendedGroups) + delete(rawMsg, key) + case "groupFileURI": + err = unpopulate(val, "GroupFileURI", &c.GroupFileURI) + delete(rawMsg, key) + case "ldapBaseDN": + err = unpopulate(val, "LdapBaseDN", &c.LdapBaseDN) + delete(rawMsg, key) + case "ldapServer": + err = unpopulate(val, "LdapServer", &c.LdapServer) + delete(rawMsg, key) + case "requireValidCertificate": + err = unpopulate(val, "RequireValidCertificate", &c.RequireValidCertificate) + delete(rawMsg, key) + case "userFileURI": + err = unpopulate(val, "UserFileURI", &c.UserFileURI) + delete(rawMsg, key) + case "usernameDownloaded": + err = unpopulate(val, "UsernameDownloaded", &c.UsernameDownloaded) + delete(rawMsg, key) + case "usernameSource": + err = unpopulate(val, "UsernameSource", &c.UsernameSource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CacheUsernameDownloadSettingsCredentials. +func (c CacheUsernameDownloadSettingsCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bindDn", c.BindDn) + populate(objectMap, "bindPassword", c.BindPassword) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CacheUsernameDownloadSettingsCredentials. +func (c *CacheUsernameDownloadSettingsCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bindDn": + err = unpopulate(val, "BindDn", &c.BindDn) + delete(rawMsg, key) + case "bindPassword": + err = unpopulate(val, "BindPassword", &c.BindPassword) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CachesListResult. +func (c CachesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CachesListResult. +func (c *CachesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClfsTarget. +func (c ClfsTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "target", c.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClfsTarget. +func (c *ClfsTarget) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "target": + err = unpopulate(val, "Target", &c.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Condition. +func (c Condition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", c.Message) + populateDateTimeRFC3339(objectMap, "timestamp", c.Timestamp) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Condition. +func (c *Condition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "timestamp": + err = unpopulateDateTimeRFC3339(val, "Timestamp", &c.Timestamp) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportJob. +func (i ImportJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "systemData", i.SystemData) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportJob. +func (i *ImportJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &i.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &i.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &i.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &i.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &i.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportJobProperties. +func (i ImportJobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "conflictResolutionMode", i.ConflictResolutionMode) + populate(objectMap, "importPrefixes", i.ImportPrefixes) + populate(objectMap, "maximumErrors", i.MaximumErrors) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "status", i.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportJobProperties. +func (i *ImportJobProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "conflictResolutionMode": + err = unpopulate(val, "ConflictResolutionMode", &i.ConflictResolutionMode) + delete(rawMsg, key) + case "importPrefixes": + err = unpopulate(val, "ImportPrefixes", &i.ImportPrefixes) + delete(rawMsg, key) + case "maximumErrors": + err = unpopulate(val, "MaximumErrors", &i.MaximumErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &i.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportJobPropertiesStatus. +func (i ImportJobPropertiesStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobsImportedPerSecond", i.BlobsImportedPerSecond) + populate(objectMap, "blobsWalkedPerSecond", i.BlobsWalkedPerSecond) + populateDateTimeRFC3339(objectMap, "lastCompletionTime", i.LastCompletionTime) + populateDateTimeRFC3339(objectMap, "lastStartedTime", i.LastStartedTime) + populate(objectMap, "state", i.State) + populate(objectMap, "statusMessage", i.StatusMessage) + populate(objectMap, "totalBlobsImported", i.TotalBlobsImported) + populate(objectMap, "totalBlobsWalked", i.TotalBlobsWalked) + populate(objectMap, "totalConflicts", i.TotalConflicts) + populate(objectMap, "totalErrors", i.TotalErrors) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportJobPropertiesStatus. +func (i *ImportJobPropertiesStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobsImportedPerSecond": + err = unpopulate(val, "BlobsImportedPerSecond", &i.BlobsImportedPerSecond) + delete(rawMsg, key) + case "blobsWalkedPerSecond": + err = unpopulate(val, "BlobsWalkedPerSecond", &i.BlobsWalkedPerSecond) + delete(rawMsg, key) + case "lastCompletionTime": + err = unpopulateDateTimeRFC3339(val, "LastCompletionTime", &i.LastCompletionTime) + delete(rawMsg, key) + case "lastStartedTime": + err = unpopulateDateTimeRFC3339(val, "LastStartedTime", &i.LastStartedTime) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &i.State) + delete(rawMsg, key) + case "statusMessage": + err = unpopulate(val, "StatusMessage", &i.StatusMessage) + delete(rawMsg, key) + case "totalBlobsImported": + err = unpopulate(val, "TotalBlobsImported", &i.TotalBlobsImported) + delete(rawMsg, key) + case "totalBlobsWalked": + err = unpopulate(val, "TotalBlobsWalked", &i.TotalBlobsWalked) + delete(rawMsg, key) + case "totalConflicts": + err = unpopulate(val, "TotalConflicts", &i.TotalConflicts) + delete(rawMsg, key) + case "totalErrors": + err = unpopulate(val, "TotalErrors", &i.TotalErrors) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportJobUpdate. +func (i ImportJobUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "tags", i.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportJobUpdate. +func (i *ImportJobUpdate) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &i.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImportJobsListResult. +func (i ImportJobsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImportJobsListResult. +func (i *ImportJobsListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &i.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &i.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultKeyReference. +func (k KeyVaultKeyReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "keyUrl", k.KeyURL) + populate(objectMap, "sourceVault", k.SourceVault) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultKeyReference. +func (k *KeyVaultKeyReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyUrl": + err = unpopulate(val, "KeyURL", &k.KeyURL) + delete(rawMsg, key) + case "sourceVault": + err = unpopulate(val, "SourceVault", &k.SourceVault) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KeyVaultKeyReferenceSourceVault. +func (k KeyVaultKeyReferenceSourceVault) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", k.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultKeyReferenceSourceVault. +func (k *KeyVaultKeyReferenceSourceVault) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricDimension. +func (m MetricDimension) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "internalName", m.InternalName) + populate(objectMap, "name", m.Name) + populate(objectMap, "toBeExportedForShoebox", m.ToBeExportedForShoebox) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricDimension. +func (m *MetricDimension) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "internalName": + err = unpopulate(val, "InternalName", &m.InternalName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "toBeExportedForShoebox": + err = unpopulate(val, "ToBeExportedForShoebox", &m.ToBeExportedForShoebox) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "metricClass", m.MetricClass) + populate(objectMap, "name", m.Name) + populate(objectMap, "supportedAggregationTypes", m.SupportedAggregationTypes) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "metricClass": + err = unpopulate(val, "MetricClass", &m.MetricClass) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "supportedAggregationTypes": + err = unpopulate(val, "SupportedAggregationTypes", &m.SupportedAggregationTypes) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NamespaceJunction. +func (n NamespaceJunction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "namespacePath", n.NamespacePath) + populate(objectMap, "nfsAccessPolicy", n.NfsAccessPolicy) + populate(objectMap, "nfsExport", n.NfsExport) + populate(objectMap, "targetPath", n.TargetPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceJunction. +func (n *NamespaceJunction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "namespacePath": + err = unpopulate(val, "NamespacePath", &n.NamespacePath) + delete(rawMsg, key) + case "nfsAccessPolicy": + err = unpopulate(val, "NfsAccessPolicy", &n.NfsAccessPolicy) + delete(rawMsg, key) + case "nfsExport": + err = unpopulate(val, "NfsExport", &n.NfsExport) + delete(rawMsg, key) + case "targetPath": + err = unpopulate(val, "TargetPath", &n.TargetPath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Nfs3Target. +func (n Nfs3Target) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "target", n.Target) + populate(objectMap, "usageModel", n.UsageModel) + populate(objectMap, "verificationTimer", n.VerificationTimer) + populate(objectMap, "writeBackTimer", n.WriteBackTimer) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Nfs3Target. +func (n *Nfs3Target) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "target": + err = unpopulate(val, "Target", &n.Target) + delete(rawMsg, key) + case "usageModel": + err = unpopulate(val, "UsageModel", &n.UsageModel) + delete(rawMsg, key) + case "verificationTimer": + err = unpopulate(val, "VerificationTimer", &n.VerificationTimer) + delete(rawMsg, key) + case "writeBackTimer": + err = unpopulate(val, "WriteBackTimer", &n.WriteBackTimer) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NfsAccessPolicy. +func (n NfsAccessPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessRules", n.AccessRules) + populate(objectMap, "name", n.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NfsAccessPolicy. +func (n *NfsAccessPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessRules": + err = unpopulate(val, "AccessRules", &n.AccessRules) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &n.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NfsAccessRule. +func (n NfsAccessRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "access", n.Access) + populate(objectMap, "anonymousGID", n.AnonymousGID) + populate(objectMap, "anonymousUID", n.AnonymousUID) + populate(objectMap, "filter", n.Filter) + populate(objectMap, "rootSquash", n.RootSquash) + populate(objectMap, "scope", n.Scope) + populate(objectMap, "submountAccess", n.SubmountAccess) + populate(objectMap, "suid", n.Suid) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NfsAccessRule. +func (n *NfsAccessRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "access": + err = unpopulate(val, "Access", &n.Access) + delete(rawMsg, key) + case "anonymousGID": + err = unpopulate(val, "AnonymousGID", &n.AnonymousGID) + delete(rawMsg, key) + case "anonymousUID": + err = unpopulate(val, "AnonymousUID", &n.AnonymousUID) + delete(rawMsg, key) + case "filter": + err = unpopulate(val, "Filter", &n.Filter) + delete(rawMsg, key) + case "rootSquash": + err = unpopulate(val, "RootSquash", &n.RootSquash) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &n.Scope) + delete(rawMsg, key) + case "submountAccess": + err = unpopulate(val, "SubmountAccess", &n.SubmountAccess) + delete(rawMsg, key) + case "suid": + err = unpopulate(val, "Suid", &n.Suid) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrimingJob. +func (p PrimingJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primingJobDetails", p.PrimingJobDetails) + populate(objectMap, "primingJobId", p.PrimingJobID) + populate(objectMap, "primingJobName", p.PrimingJobName) + populate(objectMap, "primingJobPercentComplete", p.PrimingJobPercentComplete) + populate(objectMap, "primingJobState", p.PrimingJobState) + populate(objectMap, "primingJobStatus", p.PrimingJobStatus) + populate(objectMap, "primingManifestUrl", p.PrimingManifestURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrimingJob. +func (p *PrimingJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primingJobDetails": + err = unpopulate(val, "PrimingJobDetails", &p.PrimingJobDetails) + delete(rawMsg, key) + case "primingJobId": + err = unpopulate(val, "PrimingJobID", &p.PrimingJobID) + delete(rawMsg, key) + case "primingJobName": + err = unpopulate(val, "PrimingJobName", &p.PrimingJobName) + delete(rawMsg, key) + case "primingJobPercentComplete": + err = unpopulate(val, "PrimingJobPercentComplete", &p.PrimingJobPercentComplete) + delete(rawMsg, key) + case "primingJobState": + err = unpopulate(val, "PrimingJobState", &p.PrimingJobState) + delete(rawMsg, key) + case "primingJobStatus": + err = unpopulate(val, "PrimingJobStatus", &p.PrimingJobStatus) + delete(rawMsg, key) + case "primingManifestUrl": + err = unpopulate(val, "PrimingManifestURL", &p.PrimingManifestURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrimingJobIDParameter. +func (p PrimingJobIDParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "primingJobId", p.PrimingJobID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrimingJobIDParameter. +func (p *PrimingJobIDParameter) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primingJobId": + err = unpopulate(val, "PrimingJobID", &p.PrimingJobID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequiredAmlFilesystemSubnetsSize. +func (r RequiredAmlFilesystemSubnetsSize) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "filesystemSubnetSize", r.FilesystemSubnetSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequiredAmlFilesystemSubnetsSize. +func (r *RequiredAmlFilesystemSubnetsSize) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "filesystemSubnetSize": + err = unpopulate(val, "FilesystemSubnetSize", &r.FilesystemSubnetSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RequiredAmlFilesystemSubnetsSizeInfo. +func (r RequiredAmlFilesystemSubnetsSizeInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sku", r.SKU) + populate(objectMap, "storageCapacityTiB", r.StorageCapacityTiB) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RequiredAmlFilesystemSubnetsSizeInfo. +func (r *RequiredAmlFilesystemSubnetsSizeInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sku": + err = unpopulate(val, "SKU", &r.SKU) + delete(rawMsg, key) + case "storageCapacityTiB": + err = unpopulate(val, "StorageCapacityTiB", &r.StorageCapacityTiB) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKU. +func (r ResourceSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "capabilities", r.Capabilities) + populate(objectMap, "locationInfo", r.LocationInfo) + populate(objectMap, "locations", r.Locations) + populate(objectMap, "name", r.Name) + populate(objectMap, "resourceType", r.ResourceType) + populate(objectMap, "restrictions", r.Restrictions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU. +func (r *ResourceSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capabilities": + err = unpopulate(val, "Capabilities", &r.Capabilities) + delete(rawMsg, key) + case "locationInfo": + err = unpopulate(val, "LocationInfo", &r.LocationInfo) + delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &r.Locations) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &r.ResourceType) + delete(rawMsg, key) + case "restrictions": + err = unpopulate(val, "Restrictions", &r.Restrictions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities. +func (r ResourceSKUCapabilities) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", r.Name) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapabilities. +func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo. +func (r ResourceSKULocationInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", r.Location) + populate(objectMap, "zones", r.Zones) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKULocationInfo. +func (r *ResourceSKULocationInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &r.Zones) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSKUsResult. +func (r ResourceSKUsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUsResult. +func (r *ResourceSKUsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceUsage. +func (r ResourceUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentValue", r.CurrentValue) + populate(objectMap, "limit", r.Limit) + populate(objectMap, "name", r.Name) + populate(objectMap, "unit", r.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsage. +func (r *ResourceUsage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentValue": + err = unpopulate(val, "CurrentValue", &r.CurrentValue) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &r.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &r.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceUsageName. +func (r ResourceUsageName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "localizedValue", r.LocalizedValue) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsageName. +func (r *ResourceUsageName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &r.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceUsagesListResult. +func (r ResourceUsagesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsagesListResult. +func (r *ResourceUsagesListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Restriction. +func (r Restriction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "reasonCode", r.ReasonCode) + populate(objectMap, "type", r.Type) + populate(objectMap, "values", r.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Restriction. +func (r *Restriction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "reasonCode": + err = unpopulate(val, "ReasonCode", &r.ReasonCode) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &r.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUName. +func (s SKUName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUName. +func (s *SKUName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageTarget. +func (s StorageTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageTarget. +func (s *StorageTarget) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageTargetProperties. +func (s StorageTargetProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allocationPercentage", s.AllocationPercentage) + populate(objectMap, "blobNfs", s.BlobNfs) + populate(objectMap, "clfs", s.Clfs) + populate(objectMap, "junctions", s.Junctions) + populate(objectMap, "nfs3", s.Nfs3) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "state", s.State) + populate(objectMap, "targetType", s.TargetType) + populate(objectMap, "unknown", s.Unknown) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetProperties. +func (s *StorageTargetProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allocationPercentage": + err = unpopulate(val, "AllocationPercentage", &s.AllocationPercentage) + delete(rawMsg, key) + case "blobNfs": + err = unpopulate(val, "BlobNfs", &s.BlobNfs) + delete(rawMsg, key) + case "clfs": + err = unpopulate(val, "Clfs", &s.Clfs) + delete(rawMsg, key) + case "junctions": + err = unpopulate(val, "Junctions", &s.Junctions) + delete(rawMsg, key) + case "nfs3": + err = unpopulate(val, "Nfs3", &s.Nfs3) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &s.State) + delete(rawMsg, key) + case "targetType": + err = unpopulate(val, "TargetType", &s.TargetType) + delete(rawMsg, key) + case "unknown": + err = unpopulate(val, "Unknown", &s.Unknown) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageTargetSpaceAllocation. +func (s StorageTargetSpaceAllocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allocationPercentage", s.AllocationPercentage) + populate(objectMap, "name", s.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetSpaceAllocation. +func (s *StorageTargetSpaceAllocation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allocationPercentage": + err = unpopulate(val, "AllocationPercentage", &s.AllocationPercentage) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageTargetsResult. +func (s StorageTargetsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetsResult. +func (s *StorageTargetsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnknownTarget. +func (u UnknownTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", u.Attributes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnknownTarget. +func (u *UnknownTarget) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "attributes": + err = unpopulate(val, "Attributes", &u.Attributes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageModel. +func (u UsageModel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", u.Display) + populate(objectMap, "modelName", u.ModelName) + populate(objectMap, "targetType", u.TargetType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageModel. +func (u *UsageModel) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &u.Display) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &u.ModelName) + delete(rawMsg, key) + case "targetType": + err = unpopulate(val, "TargetType", &u.TargetType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageModelDisplay. +func (u UsageModelDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", u.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageModelDisplay. +func (u *UsageModelDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &u.Description) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageModelsResult. +func (u UsageModelsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageModelsResult. +func (u *UsageModelsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentitiesValue. +func (u UserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentitiesValue. +func (u *UserAssignedIdentitiesValue) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/operations_client.go new file mode 100644 index 00000000..46390dcf --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/operations_client.go @@ -0,0 +1,88 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Lists all of the available Resource Provider operations. +// +// Generated from API version 2024-03-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.StorageCache/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.APIOperationListResult); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/options.go new file mode 100644 index 00000000..282ab5b6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/options.go @@ -0,0 +1,299 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +// AmlFilesystemsClientArchiveOptions contains the optional parameters for the AmlFilesystemsClient.Archive method. +type AmlFilesystemsClientArchiveOptions struct { + // Information about the archive operation + ArchiveInfo *AmlFilesystemArchiveInfo +} + +// AmlFilesystemsClientBeginCreateOrUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginCreateOrUpdate +// method. +type AmlFilesystemsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AmlFilesystemsClientBeginDeleteOptions contains the optional parameters for the AmlFilesystemsClient.BeginDelete method. +type AmlFilesystemsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AmlFilesystemsClientBeginUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginUpdate method. +type AmlFilesystemsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AmlFilesystemsClientCancelArchiveOptions contains the optional parameters for the AmlFilesystemsClient.CancelArchive method. +type AmlFilesystemsClientCancelArchiveOptions struct { + // placeholder for future optional parameters +} + +// AmlFilesystemsClientGetOptions contains the optional parameters for the AmlFilesystemsClient.Get method. +type AmlFilesystemsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AmlFilesystemsClientListByResourceGroupOptions contains the optional parameters for the AmlFilesystemsClient.NewListByResourceGroupPager +// method. +type AmlFilesystemsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AmlFilesystemsClientListOptions contains the optional parameters for the AmlFilesystemsClient.NewListPager method. +type AmlFilesystemsClientListOptions struct { + // placeholder for future optional parameters +} + +// AscOperationsClientGetOptions contains the optional parameters for the AscOperationsClient.Get method. +type AscOperationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AscUsagesClientListOptions contains the optional parameters for the AscUsagesClient.NewListPager method. +type AscUsagesClientListOptions struct { + // placeholder for future optional parameters +} + +// CachesClientBeginCreateOrUpdateOptions contains the optional parameters for the CachesClient.BeginCreateOrUpdate method. +type CachesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginDebugInfoOptions contains the optional parameters for the CachesClient.BeginDebugInfo method. +type CachesClientBeginDebugInfoOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginDeleteOptions contains the optional parameters for the CachesClient.BeginDelete method. +type CachesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginFlushOptions contains the optional parameters for the CachesClient.BeginFlush method. +type CachesClientBeginFlushOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginPausePrimingJobOptions contains the optional parameters for the CachesClient.BeginPausePrimingJob method. +type CachesClientBeginPausePrimingJobOptions struct { + // Object containing the priming job ID. + PrimingJobID *PrimingJobIDParameter + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginResumePrimingJobOptions contains the optional parameters for the CachesClient.BeginResumePrimingJob method. +type CachesClientBeginResumePrimingJobOptions struct { + // Object containing the priming job ID. + PrimingJobID *PrimingJobIDParameter + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginSpaceAllocationOptions contains the optional parameters for the CachesClient.BeginSpaceAllocation method. +type CachesClientBeginSpaceAllocationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + + // List containing storage target cache space percentage allocations. + SpaceAllocation []*StorageTargetSpaceAllocation +} + +// CachesClientBeginStartOptions contains the optional parameters for the CachesClient.BeginStart method. +type CachesClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginStartPrimingJobOptions contains the optional parameters for the CachesClient.BeginStartPrimingJob method. +type CachesClientBeginStartPrimingJobOptions struct { + // Object containing the definition of a priming job. + Primingjob *PrimingJob + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginStopOptions contains the optional parameters for the CachesClient.BeginStop method. +type CachesClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginStopPrimingJobOptions contains the optional parameters for the CachesClient.BeginStopPrimingJob method. +type CachesClientBeginStopPrimingJobOptions struct { + // Object containing the priming job ID. + PrimingJobID *PrimingJobIDParameter + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginUpdateOptions contains the optional parameters for the CachesClient.BeginUpdate method. +type CachesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientBeginUpgradeFirmwareOptions contains the optional parameters for the CachesClient.BeginUpgradeFirmware method. +type CachesClientBeginUpgradeFirmwareOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CachesClientGetOptions contains the optional parameters for the CachesClient.Get method. +type CachesClientGetOptions struct { + // placeholder for future optional parameters +} + +// CachesClientListByResourceGroupOptions contains the optional parameters for the CachesClient.NewListByResourceGroupPager +// method. +type CachesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// CachesClientListOptions contains the optional parameters for the CachesClient.NewListPager method. +type CachesClientListOptions struct { + // placeholder for future optional parameters +} + +// ImportJobsClientBeginCreateOrUpdateOptions contains the optional parameters for the ImportJobsClient.BeginCreateOrUpdate +// method. +type ImportJobsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ImportJobsClientBeginDeleteOptions contains the optional parameters for the ImportJobsClient.BeginDelete method. +type ImportJobsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ImportJobsClientBeginUpdateOptions contains the optional parameters for the ImportJobsClient.BeginUpdate method. +type ImportJobsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ImportJobsClientGetOptions contains the optional parameters for the ImportJobsClient.Get method. +type ImportJobsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ImportJobsClientListByAmlFilesystemOptions contains the optional parameters for the ImportJobsClient.NewListByAmlFilesystemPager +// method. +type ImportJobsClientListByAmlFilesystemOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientCheckAmlFSSubnetsOptions contains the optional parameters for the ManagementClient.CheckAmlFSSubnets method. +type ManagementClientCheckAmlFSSubnetsOptions struct { + // Information about the subnets to validate. + AmlFilesystemSubnetInfo *AmlFilesystemSubnetInfo +} + +// ManagementClientGetRequiredAmlFSSubnetsSizeOptions contains the optional parameters for the ManagementClient.GetRequiredAmlFSSubnetsSize +// method. +type ManagementClientGetRequiredAmlFSSubnetsSizeOptions struct { + // Information to determine the number of available IPs a subnet will need to host the AML file system. + RequiredAMLFilesystemSubnetsSizeInfo *RequiredAmlFilesystemSubnetsSizeInfo +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. +type SKUsClientListOptions struct { + // placeholder for future optional parameters +} + +// StorageTargetClientBeginFlushOptions contains the optional parameters for the StorageTargetClient.BeginFlush method. +type StorageTargetClientBeginFlushOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StorageTargetClientBeginInvalidateOptions contains the optional parameters for the StorageTargetClient.BeginInvalidate +// method. +type StorageTargetClientBeginInvalidateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StorageTargetClientBeginResumeOptions contains the optional parameters for the StorageTargetClient.BeginResume method. +type StorageTargetClientBeginResumeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StorageTargetClientBeginSuspendOptions contains the optional parameters for the StorageTargetClient.BeginSuspend method. +type StorageTargetClientBeginSuspendOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StorageTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageTargetsClient.BeginCreateOrUpdate +// method. +type StorageTargetsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StorageTargetsClientBeginDNSRefreshOptions contains the optional parameters for the StorageTargetsClient.BeginDNSRefresh +// method. +type StorageTargetsClientBeginDNSRefreshOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StorageTargetsClientBeginDeleteOptions contains the optional parameters for the StorageTargetsClient.BeginDelete method. +type StorageTargetsClientBeginDeleteOptions struct { + // Boolean value requesting the force delete operation for a storage target. Force delete discards unwritten-data in the cache + // instead of flushing it to back-end storage. + Force *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StorageTargetsClientBeginRestoreDefaultsOptions contains the optional parameters for the StorageTargetsClient.BeginRestoreDefaults +// method. +type StorageTargetsClientBeginRestoreDefaultsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StorageTargetsClientGetOptions contains the optional parameters for the StorageTargetsClient.Get method. +type StorageTargetsClientGetOptions struct { + // placeholder for future optional parameters +} + +// StorageTargetsClientListByCacheOptions contains the optional parameters for the StorageTargetsClient.NewListByCachePager +// method. +type StorageTargetsClientListByCacheOptions struct { + // placeholder for future optional parameters +} + +// UsageModelsClientListOptions contains the optional parameters for the UsageModelsClient.NewListPager method. +type UsageModelsClientListOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/responses.go new file mode 100644 index 00000000..89017c28 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/responses.go @@ -0,0 +1,266 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +// AmlFilesystemsClientArchiveResponse contains the response from method AmlFilesystemsClient.Archive. +type AmlFilesystemsClientArchiveResponse struct { + // placeholder for future response values +} + +// AmlFilesystemsClientCancelArchiveResponse contains the response from method AmlFilesystemsClient.CancelArchive. +type AmlFilesystemsClientCancelArchiveResponse struct { + // placeholder for future response values +} + +// AmlFilesystemsClientCreateOrUpdateResponse contains the response from method AmlFilesystemsClient.BeginCreateOrUpdate. +type AmlFilesystemsClientCreateOrUpdateResponse struct { + // An AML file system instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md + AmlFilesystem +} + +// AmlFilesystemsClientDeleteResponse contains the response from method AmlFilesystemsClient.BeginDelete. +type AmlFilesystemsClientDeleteResponse struct { + // placeholder for future response values +} + +// AmlFilesystemsClientGetResponse contains the response from method AmlFilesystemsClient.Get. +type AmlFilesystemsClientGetResponse struct { + // An AML file system instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md + AmlFilesystem +} + +// AmlFilesystemsClientListByResourceGroupResponse contains the response from method AmlFilesystemsClient.NewListByResourceGroupPager. +type AmlFilesystemsClientListByResourceGroupResponse struct { + // Result of the request to list AML file systems. It contains a list of AML file systems and a URL link to get the next set + // of results. + AmlFilesystemsListResult +} + +// AmlFilesystemsClientListResponse contains the response from method AmlFilesystemsClient.NewListPager. +type AmlFilesystemsClientListResponse struct { + // Result of the request to list AML file systems. It contains a list of AML file systems and a URL link to get the next set + // of results. + AmlFilesystemsListResult +} + +// AmlFilesystemsClientUpdateResponse contains the response from method AmlFilesystemsClient.BeginUpdate. +type AmlFilesystemsClientUpdateResponse struct { + // An AML file system instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md + AmlFilesystem +} + +// AscOperationsClientGetResponse contains the response from method AscOperationsClient.Get. +type AscOperationsClientGetResponse struct { + // The status of operation. + AscOperation +} + +// AscUsagesClientListResponse contains the response from method AscUsagesClient.NewListPager. +type AscUsagesClientListResponse struct { + // Result of the request to list resource usages. It contains a list of resource usages & limits and a URL link to get the + // next set of results. + ResourceUsagesListResult +} + +// CachesClientCreateOrUpdateResponse contains the response from method CachesClient.BeginCreateOrUpdate. +type CachesClientCreateOrUpdateResponse struct { + // A cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md + Cache +} + +// CachesClientDebugInfoResponse contains the response from method CachesClient.BeginDebugInfo. +type CachesClientDebugInfoResponse struct { + // placeholder for future response values +} + +// CachesClientDeleteResponse contains the response from method CachesClient.BeginDelete. +type CachesClientDeleteResponse struct { + // placeholder for future response values +} + +// CachesClientFlushResponse contains the response from method CachesClient.BeginFlush. +type CachesClientFlushResponse struct { + // placeholder for future response values +} + +// CachesClientGetResponse contains the response from method CachesClient.Get. +type CachesClientGetResponse struct { + // A cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md + Cache +} + +// CachesClientListByResourceGroupResponse contains the response from method CachesClient.NewListByResourceGroupPager. +type CachesClientListByResourceGroupResponse struct { + // Result of the request to list caches. It contains a list of caches and a URL link to get the next set of results. + CachesListResult +} + +// CachesClientListResponse contains the response from method CachesClient.NewListPager. +type CachesClientListResponse struct { + // Result of the request to list caches. It contains a list of caches and a URL link to get the next set of results. + CachesListResult +} + +// CachesClientPausePrimingJobResponse contains the response from method CachesClient.BeginPausePrimingJob. +type CachesClientPausePrimingJobResponse struct { + // placeholder for future response values +} + +// CachesClientResumePrimingJobResponse contains the response from method CachesClient.BeginResumePrimingJob. +type CachesClientResumePrimingJobResponse struct { + // placeholder for future response values +} + +// CachesClientSpaceAllocationResponse contains the response from method CachesClient.BeginSpaceAllocation. +type CachesClientSpaceAllocationResponse struct { + // placeholder for future response values +} + +// CachesClientStartPrimingJobResponse contains the response from method CachesClient.BeginStartPrimingJob. +type CachesClientStartPrimingJobResponse struct { + // placeholder for future response values +} + +// CachesClientStartResponse contains the response from method CachesClient.BeginStart. +type CachesClientStartResponse struct { + // placeholder for future response values +} + +// CachesClientStopPrimingJobResponse contains the response from method CachesClient.BeginStopPrimingJob. +type CachesClientStopPrimingJobResponse struct { + // placeholder for future response values +} + +// CachesClientStopResponse contains the response from method CachesClient.BeginStop. +type CachesClientStopResponse struct { + // placeholder for future response values +} + +// CachesClientUpdateResponse contains the response from method CachesClient.BeginUpdate. +type CachesClientUpdateResponse struct { + // A cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md + Cache +} + +// CachesClientUpgradeFirmwareResponse contains the response from method CachesClient.BeginUpgradeFirmware. +type CachesClientUpgradeFirmwareResponse struct { + // placeholder for future response values +} + +// ImportJobsClientCreateOrUpdateResponse contains the response from method ImportJobsClient.BeginCreateOrUpdate. +type ImportJobsClientCreateOrUpdateResponse struct { + // An import job instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md + ImportJob +} + +// ImportJobsClientDeleteResponse contains the response from method ImportJobsClient.BeginDelete. +type ImportJobsClientDeleteResponse struct { + // placeholder for future response values +} + +// ImportJobsClientGetResponse contains the response from method ImportJobsClient.Get. +type ImportJobsClientGetResponse struct { + // An import job instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md + ImportJob +} + +// ImportJobsClientListByAmlFilesystemResponse contains the response from method ImportJobsClient.NewListByAmlFilesystemPager. +type ImportJobsClientListByAmlFilesystemResponse struct { + // Result of the request to list import jobs. It contains a list of import jobs and a URL link to get the next set of results. + ImportJobsListResult +} + +// ImportJobsClientUpdateResponse contains the response from method ImportJobsClient.BeginUpdate. +type ImportJobsClientUpdateResponse struct { + // An import job instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md + ImportJob +} + +// ManagementClientCheckAmlFSSubnetsResponse contains the response from method ManagementClient.CheckAmlFSSubnets. +type ManagementClientCheckAmlFSSubnetsResponse struct { + // placeholder for future response values +} + +// ManagementClientGetRequiredAmlFSSubnetsSizeResponse contains the response from method ManagementClient.GetRequiredAmlFSSubnetsSize. +type ManagementClientGetRequiredAmlFSSubnetsSizeResponse struct { + // Information about the number of available IP addresses that are required for the AML file system. + RequiredAmlFilesystemSubnetsSize +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // Result of the request to list Resource Provider operations. It contains a list of operations and a URL link to get the + // next set of results. + APIOperationListResult +} + +// SKUsClientListResponse contains the response from method SKUsClient.NewListPager. +type SKUsClientListResponse struct { + // The response from the List Cache SKUs operation. + ResourceSKUsResult +} + +// StorageTargetClientFlushResponse contains the response from method StorageTargetClient.BeginFlush. +type StorageTargetClientFlushResponse struct { + // placeholder for future response values +} + +// StorageTargetClientInvalidateResponse contains the response from method StorageTargetClient.BeginInvalidate. +type StorageTargetClientInvalidateResponse struct { + // placeholder for future response values +} + +// StorageTargetClientResumeResponse contains the response from method StorageTargetClient.BeginResume. +type StorageTargetClientResumeResponse struct { + // placeholder for future response values +} + +// StorageTargetClientSuspendResponse contains the response from method StorageTargetClient.BeginSuspend. +type StorageTargetClientSuspendResponse struct { + // placeholder for future response values +} + +// StorageTargetsClientCreateOrUpdateResponse contains the response from method StorageTargetsClient.BeginCreateOrUpdate. +type StorageTargetsClientCreateOrUpdateResponse struct { + // Type of the Storage Target. + StorageTarget +} + +// StorageTargetsClientDNSRefreshResponse contains the response from method StorageTargetsClient.BeginDNSRefresh. +type StorageTargetsClientDNSRefreshResponse struct { + // placeholder for future response values +} + +// StorageTargetsClientDeleteResponse contains the response from method StorageTargetsClient.BeginDelete. +type StorageTargetsClientDeleteResponse struct { + // placeholder for future response values +} + +// StorageTargetsClientGetResponse contains the response from method StorageTargetsClient.Get. +type StorageTargetsClientGetResponse struct { + // Type of the Storage Target. + StorageTarget +} + +// StorageTargetsClientListByCacheResponse contains the response from method StorageTargetsClient.NewListByCachePager. +type StorageTargetsClientListByCacheResponse struct { + // A list of Storage Targets. + StorageTargetsResult +} + +// StorageTargetsClientRestoreDefaultsResponse contains the response from method StorageTargetsClient.BeginRestoreDefaults. +type StorageTargetsClientRestoreDefaultsResponse struct { + // placeholder for future response values +} + +// UsageModelsClientListResponse contains the response from method UsageModelsClient.NewListPager. +type UsageModelsClientListResponse struct { + // A list of cache usage models. + UsageModelsResult +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/skus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/skus_client.go new file mode 100644 index 00000000..69d19223 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/skus_client.go @@ -0,0 +1,98 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SKUsClient contains the methods for the SKUs group. +// Don't use this type directly, use NewSKUsClient() instead. +type SKUsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewSKUsClient creates a new instance of SKUsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &SKUsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Get the list of StorageCache.Cache SKUs available to this subscription. +// +// Generated from API version 2024-03-01 +// - options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. +func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ + More: func(page SKUsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SKUsClientListResponse) (SKUsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SKUsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return SKUsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/skus" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SKUsClient) listHandleResponse(resp *http.Response) (SKUsClientListResponse, error) { + result := SKUsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ResourceSKUsResult); err != nil { + return SKUsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/storagetarget_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/storagetarget_client.go new file mode 100644 index 00000000..c3ead32e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/storagetarget_client.go @@ -0,0 +1,376 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// StorageTargetClient contains the methods for the StorageTarget group. +// Don't use this type directly, use NewStorageTargetClient() instead. +type StorageTargetClient struct { + internal *arm.Client + subscriptionID string +} + +// NewStorageTargetClient creates a new instance of StorageTargetClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewStorageTargetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageTargetClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &StorageTargetClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginFlush - Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to this storage +// target's namespace will return errors until the flush operation completes. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - storageTargetName - Name of Storage Target. +// - options - StorageTargetClientBeginFlushOptions contains the optional parameters for the StorageTargetClient.BeginFlush +// method. +func (client *StorageTargetClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginFlushOptions) (*runtime.Poller[StorageTargetClientFlushResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.flush(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StorageTargetClientFlushResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StorageTargetClientFlushResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Flush - Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to this storage +// target's namespace will return errors until the flush operation completes. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *StorageTargetClient) flush(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginFlushOptions) (*http.Response, error) { + var err error + const operationName = "StorageTargetClient.BeginFlush" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.flushCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// flushCreateRequest creates the Flush request. +func (client *StorageTargetClient) flushCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginFlushOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/flush" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if storageTargetName == "" { + return nil, errors.New("parameter storageTargetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginInvalidate - Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back +// end on the next request. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - storageTargetName - Name of Storage Target. +// - options - StorageTargetClientBeginInvalidateOptions contains the optional parameters for the StorageTargetClient.BeginInvalidate +// method. +func (client *StorageTargetClient) BeginInvalidate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginInvalidateOptions) (*runtime.Poller[StorageTargetClientInvalidateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.invalidate(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StorageTargetClientInvalidateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StorageTargetClientInvalidateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Invalidate - Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end +// on the next request. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *StorageTargetClient) invalidate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginInvalidateOptions) (*http.Response, error) { + var err error + const operationName = "StorageTargetClient.BeginInvalidate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.invalidateCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// invalidateCreateRequest creates the Invalidate request. +func (client *StorageTargetClient) invalidateCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginInvalidateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/invalidate" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if storageTargetName == "" { + return nil, errors.New("parameter storageTargetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginResume - Resumes client access to a previously suspended storage target. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - storageTargetName - Name of Storage Target. +// - options - StorageTargetClientBeginResumeOptions contains the optional parameters for the StorageTargetClient.BeginResume +// method. +func (client *StorageTargetClient) BeginResume(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginResumeOptions) (*runtime.Poller[StorageTargetClientResumeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resume(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StorageTargetClientResumeResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StorageTargetClientResumeResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Resume - Resumes client access to a previously suspended storage target. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *StorageTargetClient) resume(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginResumeOptions) (*http.Response, error) { + var err error + const operationName = "StorageTargetClient.BeginResume" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.resumeCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// resumeCreateRequest creates the Resume request. +func (client *StorageTargetClient) resumeCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginResumeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/resume" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if storageTargetName == "" { + return nil, errors.New("parameter storageTargetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginSuspend - Suspends client access to a storage target. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - storageTargetName - Name of Storage Target. +// - options - StorageTargetClientBeginSuspendOptions contains the optional parameters for the StorageTargetClient.BeginSuspend +// method. +func (client *StorageTargetClient) BeginSuspend(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginSuspendOptions) (*runtime.Poller[StorageTargetClientSuspendResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.suspend(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StorageTargetClientSuspendResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StorageTargetClientSuspendResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Suspend - Suspends client access to a storage target. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *StorageTargetClient) suspend(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginSuspendOptions) (*http.Response, error) { + var err error + const operationName = "StorageTargetClient.BeginSuspend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.suspendCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// suspendCreateRequest creates the Suspend request. +func (client *StorageTargetClient) suspendCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginSuspendOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/suspend" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if storageTargetName == "" { + return nil, errors.New("parameter storageTargetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/storagetargets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/storagetargets_client.go new file mode 100644 index 00000000..5be53265 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/storagetargets_client.go @@ -0,0 +1,521 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// StorageTargetsClient contains the methods for the StorageTargets group. +// Don't use this type directly, use NewStorageTargetsClient() instead. +type StorageTargetsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewStorageTargetsClient creates a new instance of StorageTargetsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewStorageTargetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageTargetsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &StorageTargetsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update a Storage Target. This operation is allowed at any time, but if the cache is down +// or unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache +// is healthy again. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - storageTargetName - Name of Storage Target. +// - storagetarget - Object containing the definition of a Storage Target. +// - options - StorageTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageTargetsClient.BeginCreateOrUpdate +// method. +func (client *StorageTargetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, storagetarget StorageTarget, options *StorageTargetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[StorageTargetsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, cacheName, storageTargetName, storagetarget, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StorageTargetsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StorageTargetsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// CreateOrUpdate - Create or update a Storage Target. This operation is allowed at any time, but if the cache is down or +// unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache +// is healthy again. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *StorageTargetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, storagetarget StorageTarget, options *StorageTargetsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "StorageTargetsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, storagetarget, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *StorageTargetsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, storagetarget StorageTarget, options *StorageTargetsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if storageTargetName == "" { + return nil, errors.New("parameter storageTargetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, storagetarget); err != nil { + return nil, err + } + return req, nil +} + +// BeginDNSRefresh - Tells a storage target to refresh its DNS information. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - storageTargetName - Name of Storage Target. +// - options - StorageTargetsClientBeginDNSRefreshOptions contains the optional parameters for the StorageTargetsClient.BeginDNSRefresh +// method. +func (client *StorageTargetsClient) BeginDNSRefresh(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDNSRefreshOptions) (*runtime.Poller[StorageTargetsClientDNSRefreshResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.dNSRefresh(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StorageTargetsClientDNSRefreshResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StorageTargetsClientDNSRefreshResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// DNSRefresh - Tells a storage target to refresh its DNS information. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *StorageTargetsClient) dNSRefresh(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDNSRefreshOptions) (*http.Response, error) { + var err error + const operationName = "StorageTargetsClient.BeginDNSRefresh" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.dnsRefreshCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// dnsRefreshCreateRequest creates the DNSRefresh request. +func (client *StorageTargetsClient) dnsRefreshCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDNSRefreshOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/dnsRefresh" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if storageTargetName == "" { + return nil, errors.New("parameter storageTargetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginDelete - Removes a Storage Target from a cache. This operation is allowed at any time, but if the cache is down or +// unhealthy, the actual removal of the Storage Target may be delayed until the cache is healthy +// again. Note that if the cache has data to flush to the Storage Target, the data will be flushed before the Storage Target +// will be deleted. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - storageTargetName - Name of Storage Target. +// - options - StorageTargetsClientBeginDeleteOptions contains the optional parameters for the StorageTargetsClient.BeginDelete +// method. +func (client *StorageTargetsClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDeleteOptions) (*runtime.Poller[StorageTargetsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StorageTargetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StorageTargetsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Removes a Storage Target from a cache. This operation is allowed at any time, but if the cache is down or unhealthy, +// the actual removal of the Storage Target may be delayed until the cache is healthy +// again. Note that if the cache has data to flush to the Storage Target, the data will be flushed before the Storage Target +// will be deleted. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *StorageTargetsClient) deleteOperation(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "StorageTargetsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *StorageTargetsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if storageTargetName == "" { + return nil, errors.New("parameter storageTargetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + if options != nil && options.Force != nil { + reqQP.Set("force", *options.Force) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Returns a Storage Target from a cache. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - storageTargetName - Name of Storage Target. +// - options - StorageTargetsClientGetOptions contains the optional parameters for the StorageTargetsClient.Get method. +func (client *StorageTargetsClient) Get(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientGetOptions) (StorageTargetsClientGetResponse, error) { + var err error + const operationName = "StorageTargetsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return StorageTargetsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return StorageTargetsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StorageTargetsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *StorageTargetsClient) getCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if storageTargetName == "" { + return nil, errors.New("parameter storageTargetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *StorageTargetsClient) getHandleResponse(resp *http.Response) (StorageTargetsClientGetResponse, error) { + result := StorageTargetsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StorageTarget); err != nil { + return StorageTargetsClientGetResponse{}, err + } + return result, nil +} + +// NewListByCachePager - Returns a list of Storage Targets for the specified cache. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - options - StorageTargetsClientListByCacheOptions contains the optional parameters for the StorageTargetsClient.NewListByCachePager +// method. +func (client *StorageTargetsClient) NewListByCachePager(resourceGroupName string, cacheName string, options *StorageTargetsClientListByCacheOptions) *runtime.Pager[StorageTargetsClientListByCacheResponse] { + return runtime.NewPager(runtime.PagingHandler[StorageTargetsClientListByCacheResponse]{ + More: func(page StorageTargetsClientListByCacheResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *StorageTargetsClientListByCacheResponse) (StorageTargetsClientListByCacheResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StorageTargetsClient.NewListByCachePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByCacheCreateRequest(ctx, resourceGroupName, cacheName, options) + }, nil) + if err != nil { + return StorageTargetsClientListByCacheResponse{}, err + } + return client.listByCacheHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByCacheCreateRequest creates the ListByCache request. +func (client *StorageTargetsClient) listByCacheCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *StorageTargetsClientListByCacheOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByCacheHandleResponse handles the ListByCache response. +func (client *StorageTargetsClient) listByCacheHandleResponse(resp *http.Response) (StorageTargetsClientListByCacheResponse, error) { + result := StorageTargetsClientListByCacheResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.StorageTargetsResult); err != nil { + return StorageTargetsClientListByCacheResponse{}, err + } + return result, nil +} + +// BeginRestoreDefaults - Tells a storage target to restore its settings to their default values. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. +// - storageTargetName - Name of Storage Target. +// - options - StorageTargetsClientBeginRestoreDefaultsOptions contains the optional parameters for the StorageTargetsClient.BeginRestoreDefaults +// method. +func (client *StorageTargetsClient) BeginRestoreDefaults(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginRestoreDefaultsOptions) (*runtime.Poller[StorageTargetsClientRestoreDefaultsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.restoreDefaults(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StorageTargetsClientRestoreDefaultsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StorageTargetsClientRestoreDefaultsResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// RestoreDefaults - Tells a storage target to restore its settings to their default values. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-03-01 +func (client *StorageTargetsClient) restoreDefaults(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginRestoreDefaultsOptions) (*http.Response, error) { + var err error + const operationName = "StorageTargetsClient.BeginRestoreDefaults" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.restoreDefaultsCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// restoreDefaultsCreateRequest creates the RestoreDefaults request. +func (client *StorageTargetsClient) restoreDefaultsCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginRestoreDefaultsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/restoreDefaults" + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if cacheName == "" { + return nil, errors.New("parameter cacheName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) + if storageTargetName == "" { + return nil, errors.New("parameter storageTargetName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/time_rfc3339.go new file mode 100644 index 00000000..6f7d381c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/time_rfc3339.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/usagemodels_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/usagemodels_client.go new file mode 100644 index 00000000..c3909f25 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4/usagemodels_client.go @@ -0,0 +1,98 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragecache + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// UsageModelsClient contains the methods for the UsageModels group. +// Don't use this type directly, use NewUsageModelsClient() instead. +type UsageModelsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewUsageModelsClient creates a new instance of UsageModelsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewUsageModelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsageModelsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &UsageModelsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - Get the list of cache usage models available to this subscription. +// +// Generated from API version 2024-03-01 +// - options - UsageModelsClientListOptions contains the optional parameters for the UsageModelsClient.NewListPager method. +func (client *UsageModelsClient) NewListPager(options *UsageModelsClientListOptions) *runtime.Pager[UsageModelsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[UsageModelsClientListResponse]{ + More: func(page UsageModelsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *UsageModelsClientListResponse) (UsageModelsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UsageModelsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return UsageModelsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *UsageModelsClient) listCreateRequest(ctx context.Context, options *UsageModelsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/usageModels" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-03-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *UsageModelsClient) listHandleResponse(resp *http.Response) (UsageModelsClientListResponse, error) { + result := UsageModelsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.UsageModelsResult); err != nil { + return UsageModelsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_ascoperations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_ascoperations_client.go deleted file mode 100644 index 697b2891..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_ascoperations_client.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AscOperationsClient contains the methods for the AscOperations group. -// Don't use this type directly, use NewAscOperationsClient() instead. -type AscOperationsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAscOperationsClient creates a new instance of AscOperationsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAscOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AscOperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AscOperationsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// Get - Gets the status of an asynchronous operation for the Azure HPC Cache -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The name of the region used to look up the operation. -// operationID - The operation id which uniquely identifies the asynchronous operation. -// options - AscOperationsClientGetOptions contains the optional parameters for the AscOperationsClient.Get method. -func (client *AscOperationsClient) Get(ctx context.Context, location string, operationID string, options *AscOperationsClientGetOptions) (AscOperationsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, location, operationID, options) - if err != nil { - return AscOperationsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AscOperationsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AscOperationsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *AscOperationsClient) getCreateRequest(ctx context.Context, location string, operationID string, options *AscOperationsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/ascOperations/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *AscOperationsClient) getHandleResponse(resp *http.Response) (AscOperationsClientGetResponse, error) { - result := AscOperationsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.AscOperation); err != nil { - return AscOperationsClientGetResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_ascusages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_ascusages_client.go deleted file mode 100644 index 30c2e6a1..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_ascusages_client.go +++ /dev/null @@ -1,120 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// AscUsagesClient contains the methods for the AscUsages group. -// Don't use this type directly, use NewAscUsagesClient() instead. -type AscUsagesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewAscUsagesClient creates a new instance of AscUsagesClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewAscUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AscUsagesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &AscUsagesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Gets the quantity used and quota limit for resources -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// location - The name of the region to query for usage information. -// options - AscUsagesClientListOptions contains the optional parameters for the AscUsagesClient.List method. -func (client *AscUsagesClient) NewListPager(location string, options *AscUsagesClientListOptions) *runtime.Pager[AscUsagesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[AscUsagesClientListResponse]{ - More: func(page AscUsagesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *AscUsagesClientListResponse) (AscUsagesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return AscUsagesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return AscUsagesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AscUsagesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *AscUsagesClient) listCreateRequest(ctx context.Context, location string, options *AscUsagesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/usages" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *AscUsagesClient) listHandleResponse(resp *http.Response) (AscUsagesClientListResponse, error) { - result := AscUsagesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceUsagesListResult); err != nil { - return AscUsagesClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_caches_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_caches_client.go deleted file mode 100644 index 22836798..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_caches_client.go +++ /dev/null @@ -1,746 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// CachesClient contains the methods for the Caches group. -// Don't use this type directly, use NewCachesClient() instead. -type CachesClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewCachesClient creates a new instance of CachesClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewCachesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CachesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &CachesClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update a Cache. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// options - CachesClientBeginCreateOrUpdateOptions contains the optional parameters for the CachesClient.BeginCreateOrUpdate -// method. -func (client *CachesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CachesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CachesClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[CachesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update a Cache. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *CachesClient) createOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *CachesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Cache != nil { - return req, runtime.MarshalAsJSON(req, *options.Cache) - } - return req, nil -} - -// BeginDebugInfo - Tells a Cache to write generate debug info for support to process. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// options - CachesClientBeginDebugInfoOptions contains the optional parameters for the CachesClient.BeginDebugInfo method. -func (client *CachesClient) BeginDebugInfo(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*runtime.Poller[CachesClientDebugInfoResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.debugInfo(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CachesClientDebugInfoResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[CachesClientDebugInfoResponse](options.ResumeToken, client.pl, nil) - } -} - -// DebugInfo - Tells a Cache to write generate debug info for support to process. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *CachesClient) debugInfo(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*http.Response, error) { - req, err := client.debugInfoCreateRequest(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// debugInfoCreateRequest creates the DebugInfo request. -func (client *CachesClient) debugInfoCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/debugInfo" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDelete - Schedules a Cache for deletion. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// options - CachesClientBeginDeleteOptions contains the optional parameters for the CachesClient.BeginDelete method. -func (client *CachesClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*runtime.Poller[CachesClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[CachesClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[CachesClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Schedules a Cache for deletion. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *CachesClient) deleteOperation(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *CachesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginFlush - Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors -// returned until the flush is complete. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// options - CachesClientBeginFlushOptions contains the optional parameters for the CachesClient.BeginFlush method. -func (client *CachesClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*runtime.Poller[CachesClientFlushResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.flush(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CachesClientFlushResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[CachesClientFlushResponse](options.ResumeToken, client.pl, nil) - } -} - -// Flush - Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors returned -// until the flush is complete. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *CachesClient) flush(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*http.Response, error) { - req, err := client.flushCreateRequest(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// flushCreateRequest creates the Flush request. -func (client *CachesClient) flushCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/flush" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Returns a Cache. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// options - CachesClientGetOptions contains the optional parameters for the CachesClient.Get method. -func (client *CachesClient) Get(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientGetOptions) (CachesClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, cacheName, options) - if err != nil { - return CachesClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CachesClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CachesClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *CachesClient) getCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *CachesClient) getHandleResponse(resp *http.Response) (CachesClientGetResponse, error) { - result := CachesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Cache); err != nil { - return CachesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Returns all Caches the user has access to under a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - CachesClientListOptions contains the optional parameters for the CachesClient.List method. -func (client *CachesClient) NewListPager(options *CachesClientListOptions) *runtime.Pager[CachesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[CachesClientListResponse]{ - More: func(page CachesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CachesClientListResponse) (CachesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CachesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CachesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CachesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *CachesClient) listCreateRequest(ctx context.Context, options *CachesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/caches" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *CachesClient) listHandleResponse(resp *http.Response) (CachesClientListResponse, error) { - result := CachesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CachesListResult); err != nil { - return CachesClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Returns all Caches the user has access to under a resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// options - CachesClientListByResourceGroupOptions contains the optional parameters for the CachesClient.ListByResourceGroup -// method. -func (client *CachesClient) NewListByResourceGroupPager(resourceGroupName string, options *CachesClientListByResourceGroupOptions) *runtime.Pager[CachesClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[CachesClientListByResourceGroupResponse]{ - More: func(page CachesClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *CachesClientListByResourceGroupResponse) (CachesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CachesClientListByResourceGroupResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CachesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CachesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } - return client.listByResourceGroupHandleResponse(resp) - }, - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *CachesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *CachesClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *CachesClient) listByResourceGroupHandleResponse(resp *http.Response) (CachesClientListByResourceGroupResponse, error) { - result := CachesClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.CachesListResult); err != nil { - return CachesClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// BeginStart - Tells a Stopped state Cache to transition to Active state. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// options - CachesClientBeginStartOptions contains the optional parameters for the CachesClient.BeginStart method. -func (client *CachesClient) BeginStart(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*runtime.Poller[CachesClientStartResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.start(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CachesClientStartResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[CachesClientStartResponse](options.ResumeToken, client.pl, nil) - } -} - -// Start - Tells a Stopped state Cache to transition to Active state. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *CachesClient) start(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*http.Response, error) { - req, err := client.startCreateRequest(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// startCreateRequest creates the Start request. -func (client *CachesClient) startCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/start" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginStop - Tells an Active Cache to transition to Stopped state. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// options - CachesClientBeginStopOptions contains the optional parameters for the CachesClient.BeginStop method. -func (client *CachesClient) BeginStop(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*runtime.Poller[CachesClientStopResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.stop(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CachesClientStopResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[CachesClientStopResponse](options.ResumeToken, client.pl, nil) - } -} - -// Stop - Tells an Active Cache to transition to Stopped state. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *CachesClient) stop(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*http.Response, error) { - req, err := client.stopCreateRequest(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// stopCreateRequest creates the Stop request. -func (client *CachesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/stop" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Update - Update a Cache instance. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// options - CachesClientUpdateOptions contains the optional parameters for the CachesClient.Update method. -func (client *CachesClient) Update(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientUpdateOptions) (CachesClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, cacheName, options) - if err != nil { - return CachesClientUpdateResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return CachesClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CachesClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *CachesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Cache != nil { - return req, runtime.MarshalAsJSON(req, *options.Cache) - } - return req, nil -} - -// updateHandleResponse handles the Update response. -func (client *CachesClient) updateHandleResponse(resp *http.Response) (CachesClientUpdateResponse, error) { - result := CachesClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Cache); err != nil { - return CachesClientUpdateResponse{}, err - } - return result, nil -} - -// BeginUpgradeFirmware - Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// options - CachesClientBeginUpgradeFirmwareOptions contains the optional parameters for the CachesClient.BeginUpgradeFirmware -// method. -func (client *CachesClient) BeginUpgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*runtime.Poller[CachesClientUpgradeFirmwareResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.upgradeFirmware(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[CachesClientUpgradeFirmwareResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[CachesClientUpgradeFirmwareResponse](options.ResumeToken, client.pl, nil) - } -} - -// UpgradeFirmware - Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *CachesClient) upgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*http.Response, error) { - req, err := client.upgradeFirmwareCreateRequest(ctx, resourceGroupName, cacheName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusCreated, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// upgradeFirmwareCreateRequest creates the UpgradeFirmware request. -func (client *CachesClient) upgradeFirmwareCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/upgrade" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_constants.go deleted file mode 100644 index 2e161801..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_constants.go +++ /dev/null @@ -1,300 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -const ( - moduleName = "armstoragecache" - moduleVersion = "v1.0.0" -) - -// CacheIdentityType - The type of identity used for the cache -type CacheIdentityType string - -const ( - CacheIdentityTypeSystemAssigned CacheIdentityType = "SystemAssigned" - CacheIdentityTypeUserAssigned CacheIdentityType = "UserAssigned" - CacheIdentityTypeSystemAssignedUserAssigned CacheIdentityType = "SystemAssigned, UserAssigned" - CacheIdentityTypeNone CacheIdentityType = "None" -) - -// PossibleCacheIdentityTypeValues returns the possible values for the CacheIdentityType const type. -func PossibleCacheIdentityTypeValues() []CacheIdentityType { - return []CacheIdentityType{ - CacheIdentityTypeSystemAssigned, - CacheIdentityTypeUserAssigned, - CacheIdentityTypeSystemAssignedUserAssigned, - CacheIdentityTypeNone, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// DomainJoinedType - True if the HPC Cache is joined to the Active Directory domain. -type DomainJoinedType string - -const ( - DomainJoinedTypeError DomainJoinedType = "Error" - DomainJoinedTypeNo DomainJoinedType = "No" - DomainJoinedTypeYes DomainJoinedType = "Yes" -) - -// PossibleDomainJoinedTypeValues returns the possible values for the DomainJoinedType const type. -func PossibleDomainJoinedTypeValues() []DomainJoinedType { - return []DomainJoinedType{ - DomainJoinedTypeError, - DomainJoinedTypeNo, - DomainJoinedTypeYes, - } -} - -// FirmwareStatusType - True if there is a firmware update ready to install on this Cache. The firmware will automatically -// be installed after firmwareUpdateDeadline if not triggered earlier via the upgrade operation. -type FirmwareStatusType string - -const ( - FirmwareStatusTypeAvailable FirmwareStatusType = "available" - FirmwareStatusTypeUnavailable FirmwareStatusType = "unavailable" -) - -// PossibleFirmwareStatusTypeValues returns the possible values for the FirmwareStatusType const type. -func PossibleFirmwareStatusTypeValues() []FirmwareStatusType { - return []FirmwareStatusType{ - FirmwareStatusTypeAvailable, - FirmwareStatusTypeUnavailable, - } -} - -// HealthStateType - List of Cache health states. -type HealthStateType string - -const ( - HealthStateTypeDegraded HealthStateType = "Degraded" - HealthStateTypeDown HealthStateType = "Down" - HealthStateTypeFlushing HealthStateType = "Flushing" - HealthStateTypeHealthy HealthStateType = "Healthy" - HealthStateTypeStopped HealthStateType = "Stopped" - HealthStateTypeStopping HealthStateType = "Stopping" - HealthStateTypeTransitioning HealthStateType = "Transitioning" - HealthStateTypeUnknown HealthStateType = "Unknown" - HealthStateTypeUpgrading HealthStateType = "Upgrading" -) - -// PossibleHealthStateTypeValues returns the possible values for the HealthStateType const type. -func PossibleHealthStateTypeValues() []HealthStateType { - return []HealthStateType{ - HealthStateTypeDegraded, - HealthStateTypeDown, - HealthStateTypeFlushing, - HealthStateTypeHealthy, - HealthStateTypeStopped, - HealthStateTypeStopping, - HealthStateTypeTransitioning, - HealthStateTypeUnknown, - HealthStateTypeUpgrading, - } -} - -type MetricAggregationType string - -const ( - MetricAggregationTypeAverage MetricAggregationType = "Average" - MetricAggregationTypeCount MetricAggregationType = "Count" - MetricAggregationTypeMaximum MetricAggregationType = "Maximum" - MetricAggregationTypeMinimum MetricAggregationType = "Minimum" - MetricAggregationTypeNone MetricAggregationType = "None" - MetricAggregationTypeNotSpecified MetricAggregationType = "NotSpecified" - MetricAggregationTypeTotal MetricAggregationType = "Total" -) - -// PossibleMetricAggregationTypeValues returns the possible values for the MetricAggregationType const type. -func PossibleMetricAggregationTypeValues() []MetricAggregationType { - return []MetricAggregationType{ - MetricAggregationTypeAverage, - MetricAggregationTypeCount, - MetricAggregationTypeMaximum, - MetricAggregationTypeMinimum, - MetricAggregationTypeNone, - MetricAggregationTypeNotSpecified, - MetricAggregationTypeTotal, - } -} - -// NfsAccessRuleAccess - Access allowed by this rule. -type NfsAccessRuleAccess string - -const ( - NfsAccessRuleAccessNo NfsAccessRuleAccess = "no" - NfsAccessRuleAccessRo NfsAccessRuleAccess = "ro" - NfsAccessRuleAccessRw NfsAccessRuleAccess = "rw" -) - -// PossibleNfsAccessRuleAccessValues returns the possible values for the NfsAccessRuleAccess const type. -func PossibleNfsAccessRuleAccessValues() []NfsAccessRuleAccess { - return []NfsAccessRuleAccess{ - NfsAccessRuleAccessNo, - NfsAccessRuleAccessRo, - NfsAccessRuleAccessRw, - } -} - -// NfsAccessRuleScope - Scope for this rule. The scope and filter determine which clients match the rule. -type NfsAccessRuleScope string - -const ( - NfsAccessRuleScopeDefault NfsAccessRuleScope = "default" - NfsAccessRuleScopeHost NfsAccessRuleScope = "host" - NfsAccessRuleScopeNetwork NfsAccessRuleScope = "network" -) - -// PossibleNfsAccessRuleScopeValues returns the possible values for the NfsAccessRuleScope const type. -func PossibleNfsAccessRuleScopeValues() []NfsAccessRuleScope { - return []NfsAccessRuleScope{ - NfsAccessRuleScopeDefault, - NfsAccessRuleScopeHost, - NfsAccessRuleScopeNetwork, - } -} - -// OperationalStateType - Storage target operational state. -type OperationalStateType string - -const ( - OperationalStateTypeBusy OperationalStateType = "Busy" - OperationalStateTypeFlushing OperationalStateType = "Flushing" - OperationalStateTypeReady OperationalStateType = "Ready" - OperationalStateTypeSuspended OperationalStateType = "Suspended" -) - -// PossibleOperationalStateTypeValues returns the possible values for the OperationalStateType const type. -func PossibleOperationalStateTypeValues() []OperationalStateType { - return []OperationalStateType{ - OperationalStateTypeBusy, - OperationalStateTypeFlushing, - OperationalStateTypeReady, - OperationalStateTypeSuspended, - } -} - -// ProvisioningStateType - ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property -type ProvisioningStateType string - -const ( - ProvisioningStateTypeCancelled ProvisioningStateType = "Cancelled" - ProvisioningStateTypeCreating ProvisioningStateType = "Creating" - ProvisioningStateTypeDeleting ProvisioningStateType = "Deleting" - ProvisioningStateTypeFailed ProvisioningStateType = "Failed" - ProvisioningStateTypeSucceeded ProvisioningStateType = "Succeeded" - ProvisioningStateTypeUpdating ProvisioningStateType = "Updating" -) - -// PossibleProvisioningStateTypeValues returns the possible values for the ProvisioningStateType const type. -func PossibleProvisioningStateTypeValues() []ProvisioningStateType { - return []ProvisioningStateType{ - ProvisioningStateTypeCancelled, - ProvisioningStateTypeCreating, - ProvisioningStateTypeDeleting, - ProvisioningStateTypeFailed, - ProvisioningStateTypeSucceeded, - ProvisioningStateTypeUpdating, - } -} - -// ReasonCode - The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" -// is set when the SKU has requiredQuotas parameter as the subscription does not belong to that -// quota. "NotAvailableForSubscription" is related to capacity at the datacenter. -type ReasonCode string - -const ( - ReasonCodeNotAvailableForSubscription ReasonCode = "NotAvailableForSubscription" - ReasonCodeQuotaID ReasonCode = "QuotaId" -) - -// PossibleReasonCodeValues returns the possible values for the ReasonCode const type. -func PossibleReasonCodeValues() []ReasonCode { - return []ReasonCode{ - ReasonCodeNotAvailableForSubscription, - ReasonCodeQuotaID, - } -} - -// StorageTargetType - Type of the Storage Target. -type StorageTargetType string - -const ( - StorageTargetTypeBlobNfs StorageTargetType = "blobNfs" - StorageTargetTypeClfs StorageTargetType = "clfs" - StorageTargetTypeNfs3 StorageTargetType = "nfs3" - StorageTargetTypeUnknown StorageTargetType = "unknown" -) - -// PossibleStorageTargetTypeValues returns the possible values for the StorageTargetType const type. -func PossibleStorageTargetTypeValues() []StorageTargetType { - return []StorageTargetType{ - StorageTargetTypeBlobNfs, - StorageTargetTypeClfs, - StorageTargetTypeNfs3, - StorageTargetTypeUnknown, - } -} - -// UsernameDownloadedType - Indicates whether or not the HPC Cache has performed the username download successfully. -type UsernameDownloadedType string - -const ( - UsernameDownloadedTypeError UsernameDownloadedType = "Error" - UsernameDownloadedTypeNo UsernameDownloadedType = "No" - UsernameDownloadedTypeYes UsernameDownloadedType = "Yes" -) - -// PossibleUsernameDownloadedTypeValues returns the possible values for the UsernameDownloadedType const type. -func PossibleUsernameDownloadedTypeValues() []UsernameDownloadedType { - return []UsernameDownloadedType{ - UsernameDownloadedTypeError, - UsernameDownloadedTypeNo, - UsernameDownloadedTypeYes, - } -} - -// UsernameSource - This setting determines how the cache gets username and group names for clients. -type UsernameSource string - -const ( - UsernameSourceAD UsernameSource = "AD" - UsernameSourceFile UsernameSource = "File" - UsernameSourceLDAP UsernameSource = "LDAP" - UsernameSourceNone UsernameSource = "None" -) - -// PossibleUsernameSourceValues returns the possible values for the UsernameSource const type. -func PossibleUsernameSourceValues() []UsernameSource { - return []UsernameSource{ - UsernameSourceAD, - UsernameSourceFile, - UsernameSourceLDAP, - UsernameSourceNone, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_models.go deleted file mode 100644 index 5f48fa10..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_models.go +++ /dev/null @@ -1,916 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import "time" - -// APIOperation - REST API operation description: see https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/openapi-authoring-automated-guidelines.md#r3023-operationsapiimplementation -type APIOperation struct { - // The object that represents the operation. - Display *APIOperationDisplay `json:"display,omitempty"` - - // The flag that indicates whether the operation applies to data plane. - IsDataAction *bool `json:"isDataAction,omitempty"` - - // Operation name: {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` - - // Origin of the operation. - Origin *string `json:"origin,omitempty"` - - // Additional details about an operation. - Properties *APIOperationProperties `json:"properties,omitempty"` -} - -// APIOperationDisplay - The object that represents the operation. -type APIOperationDisplay struct { - // The description of the operation - Description *string `json:"description,omitempty"` - - // Operation type: Read, write, delete, etc. - Operation *string `json:"operation,omitempty"` - - // Service provider: Microsoft.StorageCache - Provider *string `json:"provider,omitempty"` - - // Resource on which the operation is performed: Cache, etc. - Resource *string `json:"resource,omitempty"` -} - -// APIOperationListResult - Result of the request to list Resource Provider operations. It contains a list of operations and -// a URL link to get the next set of results. -type APIOperationListResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of Resource Provider operations supported by the Microsoft.StorageCache resource provider. - Value []*APIOperation `json:"value,omitempty"` -} - -// APIOperationProperties - Additional details about an operation. -type APIOperationProperties struct { - // Specification of the all the metrics provided for a resource type. - ServiceSpecification *APIOperationPropertiesServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// APIOperationPropertiesServiceSpecification - Specification of the all the metrics provided for a resource type. -type APIOperationPropertiesServiceSpecification struct { - // Details about operations related to metrics. - MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` -} - -// AscOperation - The status of operation. -type AscOperation struct { - // The end time of the operation. - EndTime *string `json:"endTime,omitempty"` - - // The error detail of the operation if any. - Error *ErrorResponse `json:"error,omitempty"` - - // The operation Id. - ID *string `json:"id,omitempty"` - - // The operation name. - Name *string `json:"name,omitempty"` - - // Additional operation-specific properties - Properties *AscOperationProperties `json:"properties,omitempty"` - - // The start time of the operation. - StartTime *string `json:"startTime,omitempty"` - - // The status of the operation. - Status *string `json:"status,omitempty"` -} - -// AscOperationProperties - Additional operation-specific output. -type AscOperationProperties struct { - // Additional operation-specific output. - Output map[string]interface{} `json:"output,omitempty"` -} - -// AscOperationsClientGetOptions contains the optional parameters for the AscOperationsClient.Get method. -type AscOperationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AscUsagesClientListOptions contains the optional parameters for the AscUsagesClient.List method. -type AscUsagesClientListOptions struct { - // placeholder for future optional parameters -} - -// BlobNfsTarget - Properties pertaining to the BlobNfsTarget. -type BlobNfsTarget struct { - // Resource ID of the storage container. - Target *string `json:"target,omitempty"` - - // Identifies the StorageCache usage model to be used for this storage target. - UsageModel *string `json:"usageModel,omitempty"` -} - -// Cache - A Cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md -type Cache struct { - // The identity of the cache, if configured. - Identity *CacheIdentity `json:"identity,omitempty"` - - // Region name string. - Location *string `json:"location,omitempty"` - - // Properties of the Cache. - Properties *CacheProperties `json:"properties,omitempty"` - - // SKU for the Cache. - SKU *CacheSKU `json:"sku,omitempty"` - - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Resource ID of the Cache. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Name of Cache. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Type of the Cache; Microsoft.StorageCache/Cache - Type *string `json:"type,omitempty" azure:"ro"` -} - -// CacheActiveDirectorySettings - Active Directory settings used to join a cache to a domain. -type CacheActiveDirectorySettings struct { - // REQUIRED; The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server. Length must - // 1-15 characters from the class [-0-9a-zA-Z]. - CacheNetBiosName *string `json:"cacheNetBiosName,omitempty"` - - // REQUIRED; The fully qualified domain name of the Active Directory domain controller. - DomainName *string `json:"domainName,omitempty"` - - // REQUIRED; The Active Directory domain's NetBIOS name. - DomainNetBiosName *string `json:"domainNetBiosName,omitempty"` - - // REQUIRED; Primary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name. - PrimaryDNSIPAddress *string `json:"primaryDnsIpAddress,omitempty"` - - // Active Directory admin credentials used to join the HPC Cache to a domain. - Credentials *CacheActiveDirectorySettingsCredentials `json:"credentials,omitempty"` - - // Secondary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name. - SecondaryDNSIPAddress *string `json:"secondaryDnsIpAddress,omitempty"` - - // READ-ONLY; True if the HPC Cache is joined to the Active Directory domain. - DomainJoined *DomainJoinedType `json:"domainJoined,omitempty" azure:"ro"` -} - -// CacheActiveDirectorySettingsCredentials - Active Directory admin credentials used to join the HPC Cache to a domain. -type CacheActiveDirectorySettingsCredentials struct { - // REQUIRED; Plain text password of the Active Directory domain administrator. This value is stored encrypted and not returned - // on response. - Password *string `json:"password,omitempty"` - - // REQUIRED; Username of the Active Directory domain administrator. This value is stored encrypted and not returned on response. - Username *string `json:"username,omitempty"` -} - -// CacheDirectorySettings - Cache Directory Services settings. -type CacheDirectorySettings struct { - // Specifies settings for joining the HPC Cache to an Active Directory domain. - ActiveDirectory *CacheActiveDirectorySettings `json:"activeDirectory,omitempty"` - - // Specifies settings for Extended Groups. Extended Groups allows users to be members of more than 16 groups. - UsernameDownload *CacheUsernameDownloadSettings `json:"usernameDownload,omitempty"` -} - -// CacheEncryptionSettings - Cache encryption settings. -type CacheEncryptionSettings struct { - // Specifies the location of the key encryption key in Key Vault. - KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"` - - // Specifies whether the service will automatically rotate to the newest version of the key in the Key Vault. - RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` -} - -// CacheHealth - An indication of Cache health. Gives more information about health than just that related to provisioning. -type CacheHealth struct { - // List of Cache health states. - State *HealthStateType `json:"state,omitempty"` - - // Describes explanation of state. - StatusDescription *string `json:"statusDescription,omitempty"` - - // READ-ONLY; Outstanding conditions that need to be investigated and resolved. - Conditions []*Condition `json:"conditions,omitempty" azure:"ro"` -} - -// CacheIdentity - Cache identity properties. -type CacheIdentity struct { - // The type of identity used for the cache - Type *CacheIdentityType `json:"type,omitempty"` - - // A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty dictionary. - UserAssignedIdentities map[string]*UserAssignedIdentitiesValue `json:"userAssignedIdentities,omitempty"` - - // READ-ONLY; The principal ID for the system-assigned identity of the cache. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` - - // READ-ONLY; The tenant ID associated with the cache. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` -} - -// CacheNetworkSettings - Cache network settings. -type CacheNetworkSettings struct { - // DNS search domain - DNSSearchDomain *string `json:"dnsSearchDomain,omitempty"` - - // DNS servers for the cache to use. It will be set from the network configuration if no value is provided. - DNSServers []*string `json:"dnsServers,omitempty"` - - // The IPv4 maximum transmission unit configured for the subnet. - Mtu *int32 `json:"mtu,omitempty"` - - // NTP server IP Address or FQDN for the cache to use. The default is time.windows.com. - NtpServer *string `json:"ntpServer,omitempty"` - - // READ-ONLY; Array of additional IP addresses used by this Cache. - UtilityAddresses []*string `json:"utilityAddresses,omitempty" azure:"ro"` -} - -// CacheProperties - Properties of the Cache. -type CacheProperties struct { - // The size of this Cache, in GB. - CacheSizeGB *int32 `json:"cacheSizeGB,omitempty"` - - // Specifies Directory Services settings of the cache. - DirectoryServicesSettings *CacheDirectorySettings `json:"directoryServicesSettings,omitempty"` - - // Specifies encryption settings of the cache. - EncryptionSettings *CacheEncryptionSettings `json:"encryptionSettings,omitempty"` - - // Specifies network settings of the cache. - NetworkSettings *CacheNetworkSettings `json:"networkSettings,omitempty"` - - // Specifies security settings of the cache. - SecuritySettings *CacheSecuritySettings `json:"securitySettings,omitempty"` - - // Subnet used for the Cache. - Subnet *string `json:"subnet,omitempty"` - - // Availability zones for resources. This field should only contain a single element in the array. - Zones []*string `json:"zones,omitempty"` - - // READ-ONLY; Health of the Cache. - Health *CacheHealth `json:"health,omitempty" azure:"ro"` - - // READ-ONLY; Array of IP addresses that can be used by clients mounting this Cache. - MountAddresses []*string `json:"mountAddresses,omitempty" azure:"ro"` - - // READ-ONLY; ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property - ProvisioningState *ProvisioningStateType `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Upgrade status of the Cache. - UpgradeStatus *CacheUpgradeStatus `json:"upgradeStatus,omitempty" azure:"ro"` -} - -// CacheSKU - SKU for the Cache. -type CacheSKU struct { - // SKU name for this Cache. - Name *string `json:"name,omitempty"` -} - -// CacheSecuritySettings - Cache security settings. -type CacheSecuritySettings struct { - // NFS access policies defined for this cache. - AccessPolicies []*NfsAccessPolicy `json:"accessPolicies,omitempty"` -} - -// CacheUpgradeStatus - Properties describing the software upgrade state of the Cache. -type CacheUpgradeStatus struct { - // READ-ONLY; Version string of the firmware currently installed on this Cache. - CurrentFirmwareVersion *string `json:"currentFirmwareVersion,omitempty" azure:"ro"` - - // READ-ONLY; Time at which the pending firmware update will automatically be installed on the Cache. - FirmwareUpdateDeadline *time.Time `json:"firmwareUpdateDeadline,omitempty" azure:"ro"` - - // READ-ONLY; True if there is a firmware update ready to install on this Cache. The firmware will automatically be installed - // after firmwareUpdateDeadline if not triggered earlier via the upgrade operation. - FirmwareUpdateStatus *FirmwareStatusType `json:"firmwareUpdateStatus,omitempty" azure:"ro"` - - // READ-ONLY; Time of the last successful firmware update. - LastFirmwareUpdate *time.Time `json:"lastFirmwareUpdate,omitempty" azure:"ro"` - - // READ-ONLY; When firmwareUpdateAvailable is true, this field holds the version string for the update. - PendingFirmwareVersion *string `json:"pendingFirmwareVersion,omitempty" azure:"ro"` -} - -// CacheUsernameDownloadSettings - Settings for Extended Groups username and group download. -type CacheUsernameDownloadSettings struct { - // Determines if the certificate should be automatically downloaded. This applies to 'caCertificateURI' only if 'requireValidCertificate' - // is true. - AutoDownloadCertificate *bool `json:"autoDownloadCertificate,omitempty"` - - // The URI of the CA certificate to validate the LDAP secure connection. This field must be populated when 'requireValidCertificate' - // is set to true. - CaCertificateURI *string `json:"caCertificateURI,omitempty"` - - // When present, these are the credentials for the secure LDAP connection. - Credentials *CacheUsernameDownloadSettingsCredentials `json:"credentials,omitempty"` - - // Whether or not the LDAP connection should be encrypted. - EncryptLdapConnection *bool `json:"encryptLdapConnection,omitempty"` - - // Whether or not Extended Groups is enabled. - ExtendedGroups *bool `json:"extendedGroups,omitempty"` - - // The URI of the file containing group information (in /etc/group file format). This field must be populated when 'usernameSource' - // is set to 'File'. - GroupFileURI *string `json:"groupFileURI,omitempty"` - - // The base distinguished name for the LDAP domain. - LdapBaseDN *string `json:"ldapBaseDN,omitempty"` - - // The fully qualified domain name or IP address of the LDAP server to use. - LdapServer *string `json:"ldapServer,omitempty"` - - // Determines if the certificates must be validated by a certificate authority. When true, caCertificateURI must be provided. - RequireValidCertificate *bool `json:"requireValidCertificate,omitempty"` - - // The URI of the file containing user information (in /etc/passwd file format). This field must be populated when 'usernameSource' - // is set to 'File'. - UserFileURI *string `json:"userFileURI,omitempty"` - - // This setting determines how the cache gets username and group names for clients. - UsernameSource *UsernameSource `json:"usernameSource,omitempty"` - - // READ-ONLY; Indicates whether or not the HPC Cache has performed the username download successfully. - UsernameDownloaded *UsernameDownloadedType `json:"usernameDownloaded,omitempty" azure:"ro"` -} - -// CacheUsernameDownloadSettingsCredentials - When present, these are the credentials for the secure LDAP connection. -type CacheUsernameDownloadSettingsCredentials struct { - // The Bind Distinguished Name identity to be used in the secure LDAP connection. This value is stored encrypted and not returned - // on response. - BindDn *string `json:"bindDn,omitempty"` - - // The Bind password to be used in the secure LDAP connection. This value is stored encrypted and not returned on response. - BindPassword *string `json:"bindPassword,omitempty"` -} - -// CachesClientBeginCreateOrUpdateOptions contains the optional parameters for the CachesClient.BeginCreateOrUpdate method. -type CachesClientBeginCreateOrUpdateOptions struct { - // Object containing the user-selectable properties of the new Cache. If read-only properties are included, they must match - // the existing values of those properties. - Cache *Cache - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CachesClientBeginDebugInfoOptions contains the optional parameters for the CachesClient.BeginDebugInfo method. -type CachesClientBeginDebugInfoOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CachesClientBeginDeleteOptions contains the optional parameters for the CachesClient.BeginDelete method. -type CachesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CachesClientBeginFlushOptions contains the optional parameters for the CachesClient.BeginFlush method. -type CachesClientBeginFlushOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CachesClientBeginStartOptions contains the optional parameters for the CachesClient.BeginStart method. -type CachesClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CachesClientBeginStopOptions contains the optional parameters for the CachesClient.BeginStop method. -type CachesClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CachesClientBeginUpgradeFirmwareOptions contains the optional parameters for the CachesClient.BeginUpgradeFirmware method. -type CachesClientBeginUpgradeFirmwareOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CachesClientGetOptions contains the optional parameters for the CachesClient.Get method. -type CachesClientGetOptions struct { - // placeholder for future optional parameters -} - -// CachesClientListByResourceGroupOptions contains the optional parameters for the CachesClient.ListByResourceGroup method. -type CachesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// CachesClientListOptions contains the optional parameters for the CachesClient.List method. -type CachesClientListOptions struct { - // placeholder for future optional parameters -} - -// CachesClientUpdateOptions contains the optional parameters for the CachesClient.Update method. -type CachesClientUpdateOptions struct { - // Object containing the user-selectable properties of the Cache. If read-only properties are included, they must match the - // existing values of those properties. - Cache *Cache -} - -// CachesListResult - Result of the request to list Caches. It contains a list of Caches and a URL link to get the next set -// of results. -type CachesListResult struct { - // URL to get the next set of Cache list results, if there are any. - NextLink *string `json:"nextLink,omitempty"` - - // List of Caches. - Value []*Cache `json:"value,omitempty"` -} - -// ClfsTarget - Properties pertaining to the ClfsTarget -type ClfsTarget struct { - // Resource ID of storage container. - Target *string `json:"target,omitempty"` -} - -// CloudError - An error response. -type CloudError struct { - // The body of the error. - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorBody - An error response. -type CloudErrorBody struct { - // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - - // A list of additional details about the error. - Details []*CloudErrorBody `json:"details,omitempty"` - - // A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` - - // The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` -} - -// Condition - Outstanding conditions that will need to be resolved. -type Condition struct { - // READ-ONLY; The issue requiring attention. - Message *string `json:"message,omitempty" azure:"ro"` - - // READ-ONLY; The time when the condition was raised. - Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` -} - -// ErrorResponse - Describes the format of Error response. -type ErrorResponse struct { - // Error code - Code *string `json:"code,omitempty"` - - // Error message indicating why the operation failed. - Message *string `json:"message,omitempty"` -} - -// KeyVaultKeyReference - Describes a reference to Key Vault Key. -type KeyVaultKeyReference struct { - // REQUIRED; The URL referencing a key encryption key in Key Vault. - KeyURL *string `json:"keyUrl,omitempty"` - - // REQUIRED; Describes a resource Id to source Key Vault. - SourceVault *KeyVaultKeyReferenceSourceVault `json:"sourceVault,omitempty"` -} - -// KeyVaultKeyReferenceSourceVault - Describes a resource Id to source Key Vault. -type KeyVaultKeyReferenceSourceVault struct { - // Resource Id. - ID *string `json:"id,omitempty"` -} - -// MetricDimension - Specifications of the Dimension of metrics. -type MetricDimension struct { - // Localized friendly display name of the dimension - DisplayName *string `json:"displayName,omitempty"` - - // Internal name of the dimension. - InternalName *string `json:"internalName,omitempty"` - - // Name of the dimension - Name *string `json:"name,omitempty"` - - // To be exported to shoe box. - ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"` -} - -// MetricSpecification - Details about operation related to metrics. -type MetricSpecification struct { - // The type of metric aggregation. - AggregationType *string `json:"aggregationType,omitempty"` - - // Dimensions of the metric - Dimensions []*MetricDimension `json:"dimensions,omitempty"` - - // The description of the metric. - DisplayDescription *string `json:"displayDescription,omitempty"` - - // Localized display name of the metric. - DisplayName *string `json:"displayName,omitempty"` - - // Type of metrics. - MetricClass *string `json:"metricClass,omitempty"` - - // The name of the metric. - Name *string `json:"name,omitempty"` - - // Support metric aggregation type. - SupportedAggregationTypes []*MetricAggregationType `json:"supportedAggregationTypes,omitempty"` - - // The unit that the metric is measured in. - Unit *string `json:"unit,omitempty"` -} - -// NamespaceJunction - A namespace junction. -type NamespaceJunction struct { - // Namespace path on a Cache for a Storage Target. - NamespacePath *string `json:"namespacePath,omitempty"` - - // Name of the access policy applied to this junction. - NfsAccessPolicy *string `json:"nfsAccessPolicy,omitempty"` - - // NFS export where targetPath exists. - NfsExport *string `json:"nfsExport,omitempty"` - - // Path in Storage Target to which namespacePath points. - TargetPath *string `json:"targetPath,omitempty"` -} - -// Nfs3Target - Properties pertaining to the Nfs3Target -type Nfs3Target struct { - // IP address or host name of an NFSv3 host (e.g., 10.0.44.44). - Target *string `json:"target,omitempty"` - - // Identifies the StorageCache usage model to be used for this storage target. - UsageModel *string `json:"usageModel,omitempty"` -} - -// NfsAccessPolicy - A set of rules describing access policies applied to NFSv3 clients of the cache. -type NfsAccessPolicy struct { - // REQUIRED; The set of rules describing client accesses allowed under this policy. - AccessRules []*NfsAccessRule `json:"accessRules,omitempty"` - - // REQUIRED; Name identifying this policy. Access Policy names are not case sensitive. - Name *string `json:"name,omitempty"` -} - -// NfsAccessRule - Rule to place restrictions on portions of the cache namespace being presented to clients. -type NfsAccessRule struct { - // REQUIRED; Access allowed by this rule. - Access *NfsAccessRuleAccess `json:"access,omitempty"` - - // REQUIRED; Scope for this rule. The scope and filter determine which clients match the rule. - Scope *NfsAccessRuleScope `json:"scope,omitempty"` - - // GID value that replaces 0 when rootSquash is true. This will use the value of anonymousUID if not provided. - AnonymousGID *string `json:"anonymousGID,omitempty"` - - // UID value that replaces 0 when rootSquash is true. 65534 will be used if not provided. - AnonymousUID *string `json:"anonymousUID,omitempty"` - - // Filter applied to the scope for this rule. The filter's format depends on its scope. 'default' scope matches all clients - // and has no filter value. 'network' scope takes a filter in CIDR format (for - // example, 10.99.1.0/24). 'host' takes an IP address or fully qualified domain name as filter. If a client does not match - // any filter rule and there is no default rule, access is denied. - Filter *string `json:"filter,omitempty"` - - // Map root accesses to anonymousUID and anonymousGID. - RootSquash *bool `json:"rootSquash,omitempty"` - - // For the default policy, allow access to subdirectories under the root export. If this is set to no, clients can only mount - // the path '/'. If set to yes, clients can mount a deeper path, like '/a/b'. - SubmountAccess *bool `json:"submountAccess,omitempty"` - - // Allow SUID semantics. - Suid *bool `json:"suid,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// ResourceSKU - A resource SKU. -type ResourceSKU struct { - // A list of capabilities of this SKU, such as throughput or ops/sec. - Capabilities []*ResourceSKUCapabilities `json:"capabilities,omitempty"` - - // The set of locations where the SKU is available. - LocationInfo []*ResourceSKULocationInfo `json:"locationInfo,omitempty"` - - // The name of this SKU. - Name *string `json:"name,omitempty"` - - // The restrictions preventing this SKU from being used. This is empty if there are no restrictions. - Restrictions []*Restriction `json:"restrictions,omitempty"` - - // READ-ONLY; The set of locations where the SKU is available. This is the supported and registered Azure Geo Regions (e.g., - // West US, East US, Southeast Asia, etc.). - Locations []*string `json:"locations,omitempty" azure:"ro"` - - // READ-ONLY; The type of resource the SKU applies to. - ResourceType *string `json:"resourceType,omitempty" azure:"ro"` -} - -// ResourceSKUCapabilities - A resource SKU capability. -type ResourceSKUCapabilities struct { - // Name of a capability, such as ops/sec. - Name *string `json:"name,omitempty"` - - // Quantity, if the capability is measured by quantity. - Value *string `json:"value,omitempty"` -} - -// ResourceSKULocationInfo - Resource SKU location information. -type ResourceSKULocationInfo struct { - // Location where this SKU is available. - Location *string `json:"location,omitempty"` - - // Zones if any. - Zones []*string `json:"zones,omitempty"` -} - -// ResourceSKUsResult - The response from the List Cache SKUs operation. -type ResourceSKUsResult struct { - // The URI to fetch the next page of Cache SKUs. - NextLink *string `json:"nextLink,omitempty"` - - // READ-ONLY; The list of SKUs available for the subscription. - Value []*ResourceSKU `json:"value,omitempty" azure:"ro"` -} - -// ResourceUsage - The usage and limit (quota) for a resource. -type ResourceUsage struct { - // READ-ONLY; The current usage of this resource. - CurrentValue *int32 `json:"currentValue,omitempty" azure:"ro"` - - // READ-ONLY; The limit (quota) for this resource. - Limit *int32 `json:"limit,omitempty" azure:"ro"` - - // READ-ONLY; Naming information for this resource type. - Name *ResourceUsageName `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Unit that the limit and usages are expressed in, such as 'Count'. - Unit *string `json:"unit,omitempty" azure:"ro"` -} - -// ResourceUsageName - Naming information for this resource type. -type ResourceUsageName struct { - // Localized name for this resource type. - LocalizedValue *string `json:"localizedValue,omitempty"` - - // Canonical name for this resource type. - Value *string `json:"value,omitempty"` -} - -// ResourceUsagesListResult - Result of the request to list resource usages. It contains a list of resource usages & limits -// and a URL link to get the next set of results. -type ResourceUsagesListResult struct { - // READ-ONLY; URL to get the next set of resource usage list results if there are any. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` - - // READ-ONLY; List of usages and limits for resources controlled by the Microsoft.StorageCache resource provider. - Value []*ResourceUsage `json:"value,omitempty" azure:"ro"` -} - -// Restriction - The restrictions preventing this SKU from being used. -type Restriction struct { - // The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" is set when - // the SKU has requiredQuotas parameter as the subscription does not belong to that - // quota. "NotAvailableForSubscription" is related to capacity at the datacenter. - ReasonCode *ReasonCode `json:"reasonCode,omitempty"` - - // READ-ONLY; The type of restrictions. In this version, the only possible value for this is location. - Type *string `json:"type,omitempty" azure:"ro"` - - // READ-ONLY; The value of restrictions. If the restriction type is set to location, then this would be the different locations - // where the SKU is restricted. - Values []*string `json:"values,omitempty" azure:"ro"` -} - -// SKUsClientListOptions contains the optional parameters for the SKUsClient.List method. -type SKUsClientListOptions struct { - // placeholder for future optional parameters -} - -// StorageTarget - Type of the Storage Target. -type StorageTarget struct { - // StorageTarget properties - Properties *StorageTargetProperties `json:"properties,omitempty"` - - // READ-ONLY; Resource ID of the Storage Target. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Region name string. - Location *string `json:"location,omitempty" azure:"ro"` - - // READ-ONLY; Name of the Storage Target. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StorageTargetClientBeginFlushOptions contains the optional parameters for the StorageTargetClient.BeginFlush method. -type StorageTargetClientBeginFlushOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StorageTargetClientBeginInvalidateOptions contains the optional parameters for the StorageTargetClient.BeginInvalidate -// method. -type StorageTargetClientBeginInvalidateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StorageTargetClientBeginResumeOptions contains the optional parameters for the StorageTargetClient.BeginResume method. -type StorageTargetClientBeginResumeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StorageTargetClientBeginSuspendOptions contains the optional parameters for the StorageTargetClient.BeginSuspend method. -type StorageTargetClientBeginSuspendOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StorageTargetProperties - Properties of the Storage Target. -type StorageTargetProperties struct { - // REQUIRED; Type of the Storage Target. - TargetType *StorageTargetType `json:"targetType,omitempty"` - - // Properties when targetType is blobNfs. - BlobNfs *BlobNfsTarget `json:"blobNfs,omitempty"` - - // Properties when targetType is clfs. - Clfs *ClfsTarget `json:"clfs,omitempty"` - - // List of Cache namespace junctions to target for namespace associations. - Junctions []*NamespaceJunction `json:"junctions,omitempty"` - - // Properties when targetType is nfs3. - Nfs3 *Nfs3Target `json:"nfs3,omitempty"` - - // Storage target operational state. - State *OperationalStateType `json:"state,omitempty"` - - // Properties when targetType is unknown. - Unknown *UnknownTarget `json:"unknown,omitempty"` - - // READ-ONLY; ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property - ProvisioningState *ProvisioningStateType `json:"provisioningState,omitempty" azure:"ro"` -} - -// StorageTargetResource - Resource used by a Cache. -type StorageTargetResource struct { - // READ-ONLY; Resource ID of the Storage Target. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; Region name string. - Location *string `json:"location,omitempty" azure:"ro"` - - // READ-ONLY; Name of the Storage Target. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The system meta data relating to this resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget - Type *string `json:"type,omitempty" azure:"ro"` -} - -// StorageTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageTargetsClient.BeginCreateOrUpdate -// method. -type StorageTargetsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string - // Object containing the definition of a Storage Target. - Storagetarget *StorageTarget -} - -// StorageTargetsClientBeginDNSRefreshOptions contains the optional parameters for the StorageTargetsClient.BeginDNSRefresh -// method. -type StorageTargetsClientBeginDNSRefreshOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StorageTargetsClientBeginDeleteOptions contains the optional parameters for the StorageTargetsClient.BeginDelete method. -type StorageTargetsClientBeginDeleteOptions struct { - // Boolean value requesting the force delete operation for a storage target. Force delete discards unwritten-data in the cache - // instead of flushing it to back-end storage. - Force *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StorageTargetsClientGetOptions contains the optional parameters for the StorageTargetsClient.Get method. -type StorageTargetsClientGetOptions struct { - // placeholder for future optional parameters -} - -// StorageTargetsClientListByCacheOptions contains the optional parameters for the StorageTargetsClient.ListByCache method. -type StorageTargetsClientListByCacheOptions struct { - // placeholder for future optional parameters -} - -// StorageTargetsResult - A list of Storage Targets. -type StorageTargetsResult struct { - // The URI to fetch the next page of Storage Targets. - NextLink *string `json:"nextLink,omitempty"` - - // The list of Storage Targets defined for the Cache. - Value []*StorageTarget `json:"value,omitempty"` -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - - // The type of identity that created the resource. - CreatedByType *CreatedByType `json:"createdByType,omitempty"` - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` - - // The identity that last modified the resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` -} - -// UnknownTarget - Properties pertaining to the UnknownTarget -type UnknownTarget struct { - // Dictionary of string->string pairs containing information about the Storage Target. - Attributes map[string]*string `json:"attributes,omitempty"` -} - -// UsageModel - A usage model. -type UsageModel struct { - // Localized information describing this usage model. - Display *UsageModelDisplay `json:"display,omitempty"` - - // Non-localized keyword name for this usage model. - ModelName *string `json:"modelName,omitempty"` - - // The type of Storage Target to which this model is applicable (only nfs3 as of this version). - TargetType *string `json:"targetType,omitempty"` -} - -// UsageModelDisplay - Localized information describing this usage model. -type UsageModelDisplay struct { - // String to display for this usage model. - Description *string `json:"description,omitempty"` -} - -// UsageModelsClientListOptions contains the optional parameters for the UsageModelsClient.List method. -type UsageModelsClientListOptions struct { - // placeholder for future optional parameters -} - -// UsageModelsResult - A list of Cache usage models. -type UsageModelsResult struct { - // The URI to fetch the next page of Cache usage models. - NextLink *string `json:"nextLink,omitempty"` - - // The list of usage models available for the subscription. - Value []*UsageModel `json:"value,omitempty"` -} - -type UserAssignedIdentitiesValue struct { - // READ-ONLY; The client ID of the user-assigned identity. - ClientID *string `json:"clientId,omitempty" azure:"ro"` - - // READ-ONLY; The principal ID of the user-assigned identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_models_serde.go deleted file mode 100644 index 9953f9c1..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_models_serde.go +++ /dev/null @@ -1,255 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type Cache. -func (c Cache) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "sku", c.SKU) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CacheHealth. -func (c CacheHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "conditions", c.Conditions) - populate(objectMap, "state", c.State) - populate(objectMap, "statusDescription", c.StatusDescription) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CacheIdentity. -func (c CacheIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "principalId", c.PrincipalID) - populate(objectMap, "tenantId", c.TenantID) - populate(objectMap, "type", c.Type) - populate(objectMap, "userAssignedIdentities", c.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CacheNetworkSettings. -func (c CacheNetworkSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dnsSearchDomain", c.DNSSearchDomain) - populate(objectMap, "dnsServers", c.DNSServers) - populate(objectMap, "mtu", c.Mtu) - populate(objectMap, "ntpServer", c.NtpServer) - populate(objectMap, "utilityAddresses", c.UtilityAddresses) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CacheProperties. -func (c CacheProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cacheSizeGB", c.CacheSizeGB) - populate(objectMap, "directoryServicesSettings", c.DirectoryServicesSettings) - populate(objectMap, "encryptionSettings", c.EncryptionSettings) - populate(objectMap, "health", c.Health) - populate(objectMap, "mountAddresses", c.MountAddresses) - populate(objectMap, "networkSettings", c.NetworkSettings) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "securitySettings", c.SecuritySettings) - populate(objectMap, "subnet", c.Subnet) - populate(objectMap, "upgradeStatus", c.UpgradeStatus) - populate(objectMap, "zones", c.Zones) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CacheSecuritySettings. -func (c CacheSecuritySettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessPolicies", c.AccessPolicies) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CacheUpgradeStatus. -func (c CacheUpgradeStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "currentFirmwareVersion", c.CurrentFirmwareVersion) - populateTimeRFC3339(objectMap, "firmwareUpdateDeadline", c.FirmwareUpdateDeadline) - populate(objectMap, "firmwareUpdateStatus", c.FirmwareUpdateStatus) - populateTimeRFC3339(objectMap, "lastFirmwareUpdate", c.LastFirmwareUpdate) - populate(objectMap, "pendingFirmwareVersion", c.PendingFirmwareVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpgradeStatus. -func (c *CacheUpgradeStatus) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "currentFirmwareVersion": - err = unpopulate(val, "CurrentFirmwareVersion", &c.CurrentFirmwareVersion) - delete(rawMsg, key) - case "firmwareUpdateDeadline": - err = unpopulateTimeRFC3339(val, "FirmwareUpdateDeadline", &c.FirmwareUpdateDeadline) - delete(rawMsg, key) - case "firmwareUpdateStatus": - err = unpopulate(val, "FirmwareUpdateStatus", &c.FirmwareUpdateStatus) - delete(rawMsg, key) - case "lastFirmwareUpdate": - err = unpopulateTimeRFC3339(val, "LastFirmwareUpdate", &c.LastFirmwareUpdate) - delete(rawMsg, key) - case "pendingFirmwareVersion": - err = unpopulate(val, "PendingFirmwareVersion", &c.PendingFirmwareVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Condition. -func (c Condition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "message", c.Message) - populateTimeRFC3339(objectMap, "timestamp", c.Timestamp) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Condition. -func (c *Condition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "message": - err = unpopulate(val, "Message", &c.Message) - delete(rawMsg, key) - case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &c.Timestamp) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NfsAccessPolicy. -func (n NfsAccessPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessRules", n.AccessRules) - populate(objectMap, "name", n.Name) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type StorageTargetProperties. -func (s StorageTargetProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "blobNfs", s.BlobNfs) - populate(objectMap, "clfs", s.Clfs) - populate(objectMap, "junctions", s.Junctions) - populate(objectMap, "nfs3", s.Nfs3) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "state", s.State) - populate(objectMap, "targetType", s.TargetType) - populate(objectMap, "unknown", s.Unknown) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UnknownTarget. -func (u UnknownTarget) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "attributes", u.Attributes) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_operations_client.go deleted file mode 100644 index 1a8e45f4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_operations_client.go +++ /dev/null @@ -1,104 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - host string - pl runtime.Pipeline -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Lists all of the available Resource Provider operations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.StorageCache/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.APIOperationListResult); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_response_types.go deleted file mode 100644 index d7ca4689..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_response_types.go +++ /dev/null @@ -1,134 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -// AscOperationsClientGetResponse contains the response from method AscOperationsClient.Get. -type AscOperationsClientGetResponse struct { - AscOperation -} - -// AscUsagesClientListResponse contains the response from method AscUsagesClient.List. -type AscUsagesClientListResponse struct { - ResourceUsagesListResult -} - -// CachesClientCreateOrUpdateResponse contains the response from method CachesClient.CreateOrUpdate. -type CachesClientCreateOrUpdateResponse struct { - Cache -} - -// CachesClientDebugInfoResponse contains the response from method CachesClient.DebugInfo. -type CachesClientDebugInfoResponse struct { - // placeholder for future response values -} - -// CachesClientDeleteResponse contains the response from method CachesClient.Delete. -type CachesClientDeleteResponse struct { - // placeholder for future response values -} - -// CachesClientFlushResponse contains the response from method CachesClient.Flush. -type CachesClientFlushResponse struct { - // placeholder for future response values -} - -// CachesClientGetResponse contains the response from method CachesClient.Get. -type CachesClientGetResponse struct { - Cache -} - -// CachesClientListByResourceGroupResponse contains the response from method CachesClient.ListByResourceGroup. -type CachesClientListByResourceGroupResponse struct { - CachesListResult -} - -// CachesClientListResponse contains the response from method CachesClient.List. -type CachesClientListResponse struct { - CachesListResult -} - -// CachesClientStartResponse contains the response from method CachesClient.Start. -type CachesClientStartResponse struct { - // placeholder for future response values -} - -// CachesClientStopResponse contains the response from method CachesClient.Stop. -type CachesClientStopResponse struct { - // placeholder for future response values -} - -// CachesClientUpdateResponse contains the response from method CachesClient.Update. -type CachesClientUpdateResponse struct { - Cache -} - -// CachesClientUpgradeFirmwareResponse contains the response from method CachesClient.UpgradeFirmware. -type CachesClientUpgradeFirmwareResponse struct { - // placeholder for future response values -} - -// OperationsClientListResponse contains the response from method OperationsClient.List. -type OperationsClientListResponse struct { - APIOperationListResult -} - -// SKUsClientListResponse contains the response from method SKUsClient.List. -type SKUsClientListResponse struct { - ResourceSKUsResult -} - -// StorageTargetClientFlushResponse contains the response from method StorageTargetClient.Flush. -type StorageTargetClientFlushResponse struct { - // placeholder for future response values -} - -// StorageTargetClientInvalidateResponse contains the response from method StorageTargetClient.Invalidate. -type StorageTargetClientInvalidateResponse struct { - // placeholder for future response values -} - -// StorageTargetClientResumeResponse contains the response from method StorageTargetClient.Resume. -type StorageTargetClientResumeResponse struct { - // placeholder for future response values -} - -// StorageTargetClientSuspendResponse contains the response from method StorageTargetClient.Suspend. -type StorageTargetClientSuspendResponse struct { - // placeholder for future response values -} - -// StorageTargetsClientCreateOrUpdateResponse contains the response from method StorageTargetsClient.CreateOrUpdate. -type StorageTargetsClientCreateOrUpdateResponse struct { - StorageTarget -} - -// StorageTargetsClientDNSRefreshResponse contains the response from method StorageTargetsClient.DNSRefresh. -type StorageTargetsClientDNSRefreshResponse struct { - // placeholder for future response values -} - -// StorageTargetsClientDeleteResponse contains the response from method StorageTargetsClient.Delete. -type StorageTargetsClientDeleteResponse struct { - // placeholder for future response values -} - -// StorageTargetsClientGetResponse contains the response from method StorageTargetsClient.Get. -type StorageTargetsClientGetResponse struct { - StorageTarget -} - -// StorageTargetsClientListByCacheResponse contains the response from method StorageTargetsClient.ListByCache. -type StorageTargetsClientListByCacheResponse struct { - StorageTargetsResult -} - -// UsageModelsClientListResponse contains the response from method UsageModelsClient.List. -type UsageModelsClientListResponse struct { - UsageModelsResult -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_skus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_skus_client.go deleted file mode 100644 index fa6d3553..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_skus_client.go +++ /dev/null @@ -1,115 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// SKUsClient contains the methods for the SKUs group. -// Don't use this type directly, use NewSKUsClient() instead. -type SKUsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewSKUsClient creates a new instance of SKUsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &SKUsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Get the list of StorageCache.Cache SKUs available to this subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - SKUsClientListOptions contains the optional parameters for the SKUsClient.List method. -func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[SKUsClientListResponse]{ - More: func(page SKUsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *SKUsClientListResponse) (SKUsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return SKUsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return SKUsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SKUsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *SKUsClient) listCreateRequest(ctx context.Context, options *SKUsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/skus" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *SKUsClient) listHandleResponse(resp *http.Response) (SKUsClientListResponse, error) { - result := SKUsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ResourceSKUsResult); err != nil { - return SKUsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_storagetarget_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_storagetarget_client.go deleted file mode 100644 index 84845c4c..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_storagetarget_client.go +++ /dev/null @@ -1,340 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// StorageTargetClient contains the methods for the StorageTarget group. -// Don't use this type directly, use NewStorageTargetClient() instead. -type StorageTargetClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewStorageTargetClient creates a new instance of StorageTargetClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewStorageTargetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageTargetClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &StorageTargetClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginFlush - Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to this storage -// target's namespace will return errors until the flush operation completes. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// storageTargetName - Name of Storage Target. -// options - StorageTargetClientBeginFlushOptions contains the optional parameters for the StorageTargetClient.BeginFlush -// method. -func (client *StorageTargetClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginFlushOptions) (*runtime.Poller[StorageTargetClientFlushResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.flush(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[StorageTargetClientFlushResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[StorageTargetClientFlushResponse](options.ResumeToken, client.pl, nil) - } -} - -// Flush - Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to this storage -// target's namespace will return errors until the flush operation completes. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *StorageTargetClient) flush(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginFlushOptions) (*http.Response, error) { - req, err := client.flushCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// flushCreateRequest creates the Flush request. -func (client *StorageTargetClient) flushCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginFlushOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/flush" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - if storageTargetName == "" { - return nil, errors.New("parameter storageTargetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginInvalidate - Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back -// end on the next request. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// storageTargetName - Name of Storage Target. -// options - StorageTargetClientBeginInvalidateOptions contains the optional parameters for the StorageTargetClient.BeginInvalidate -// method. -func (client *StorageTargetClient) BeginInvalidate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginInvalidateOptions) (*runtime.Poller[StorageTargetClientInvalidateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.invalidate(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[StorageTargetClientInvalidateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[StorageTargetClientInvalidateResponse](options.ResumeToken, client.pl, nil) - } -} - -// Invalidate - Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end -// on the next request. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *StorageTargetClient) invalidate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginInvalidateOptions) (*http.Response, error) { - req, err := client.invalidateCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// invalidateCreateRequest creates the Invalidate request. -func (client *StorageTargetClient) invalidateCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginInvalidateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/invalidate" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - if storageTargetName == "" { - return nil, errors.New("parameter storageTargetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginResume - Resumes client access to a previously suspended storage target. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// storageTargetName - Name of Storage Target. -// options - StorageTargetClientBeginResumeOptions contains the optional parameters for the StorageTargetClient.BeginResume -// method. -func (client *StorageTargetClient) BeginResume(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginResumeOptions) (*runtime.Poller[StorageTargetClientResumeResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.resume(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[StorageTargetClientResumeResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[StorageTargetClientResumeResponse](options.ResumeToken, client.pl, nil) - } -} - -// Resume - Resumes client access to a previously suspended storage target. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *StorageTargetClient) resume(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginResumeOptions) (*http.Response, error) { - req, err := client.resumeCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// resumeCreateRequest creates the Resume request. -func (client *StorageTargetClient) resumeCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginResumeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/resume" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - if storageTargetName == "" { - return nil, errors.New("parameter storageTargetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginSuspend - Suspends client access to a storage target. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// storageTargetName - Name of Storage Target. -// options - StorageTargetClientBeginSuspendOptions contains the optional parameters for the StorageTargetClient.BeginSuspend -// method. -func (client *StorageTargetClient) BeginSuspend(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginSuspendOptions) (*runtime.Poller[StorageTargetClientSuspendResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.suspend(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[StorageTargetClientSuspendResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[StorageTargetClientSuspendResponse](options.ResumeToken, client.pl, nil) - } -} - -// Suspend - Suspends client access to a storage target. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *StorageTargetClient) suspend(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginSuspendOptions) (*http.Response, error) { - req, err := client.suspendCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// suspendCreateRequest creates the Suspend request. -func (client *StorageTargetClient) suspendCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginSuspendOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/suspend" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - if storageTargetName == "" { - return nil, errors.New("parameter storageTargetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_storagetargets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_storagetargets_client.go deleted file mode 100644 index b4ad89ee..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_storagetargets_client.go +++ /dev/null @@ -1,409 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// StorageTargetsClient contains the methods for the StorageTargets group. -// Don't use this type directly, use NewStorageTargetsClient() instead. -type StorageTargetsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewStorageTargetsClient creates a new instance of StorageTargetsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewStorageTargetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageTargetsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &StorageTargetsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// BeginCreateOrUpdate - Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down -// or unhealthy, the actual creation/modification of the Storage Target may be delayed until the Cache -// is healthy again. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// storageTargetName - Name of Storage Target. -// options - StorageTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageTargetsClient.BeginCreateOrUpdate -// method. -func (client *StorageTargetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[StorageTargetsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StorageTargetsClientCreateOrUpdateResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StorageTargetsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) - } -} - -// CreateOrUpdate - Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or -// unhealthy, the actual creation/modification of the Storage Target may be delayed until the Cache -// is healthy again. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *StorageTargetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *StorageTargetsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - if storageTargetName == "" { - return nil, errors.New("parameter storageTargetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.Storagetarget != nil { - return req, runtime.MarshalAsJSON(req, *options.Storagetarget) - } - return req, nil -} - -// BeginDNSRefresh - Tells a storage target to refresh its DNS information. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// storageTargetName - Name of Storage Target. -// options - StorageTargetsClientBeginDNSRefreshOptions contains the optional parameters for the StorageTargetsClient.BeginDNSRefresh -// method. -func (client *StorageTargetsClient) BeginDNSRefresh(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDNSRefreshOptions) (*runtime.Poller[StorageTargetsClientDNSRefreshResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.dNSRefresh(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[StorageTargetsClientDNSRefreshResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - }) - } else { - return runtime.NewPollerFromResumeToken[StorageTargetsClientDNSRefreshResponse](options.ResumeToken, client.pl, nil) - } -} - -// DNSRefresh - Tells a storage target to refresh its DNS information. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *StorageTargetsClient) dNSRefresh(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDNSRefreshOptions) (*http.Response, error) { - req, err := client.dnsRefreshCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// dnsRefreshCreateRequest creates the DNSRefresh request. -func (client *StorageTargetsClient) dnsRefreshCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDNSRefreshOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/dnsRefresh" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - if storageTargetName == "" { - return nil, errors.New("parameter storageTargetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginDelete - Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or -// unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy -// again. Note that if the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target -// will be deleted. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// storageTargetName - Name of Storage Target. -// options - StorageTargetsClientBeginDeleteOptions contains the optional parameters for the StorageTargetsClient.BeginDelete -// method. -func (client *StorageTargetsClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDeleteOptions) (*runtime.Poller[StorageTargetsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller[StorageTargetsClientDeleteResponse](resp, client.pl, nil) - } else { - return runtime.NewPollerFromResumeToken[StorageTargetsClientDeleteResponse](options.ResumeToken, client.pl, nil) - } -} - -// Delete - Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or unhealthy, -// the actual removal of the Storage Target may be delayed until the Cache is healthy -// again. Note that if the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target -// will be deleted. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -func (client *StorageTargetsClient) deleteOperation(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return nil, err - } - resp, err := client.pl.Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *StorageTargetsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - if storageTargetName == "" { - return nil, errors.New("parameter storageTargetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - if options != nil && options.Force != nil { - reqQP.Set("force", *options.Force) - } - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Returns a Storage Target from a Cache. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// storageTargetName - Name of Storage Target. -// options - StorageTargetsClientGetOptions contains the optional parameters for the StorageTargetsClient.Get method. -func (client *StorageTargetsClient) Get(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientGetOptions) (StorageTargetsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, cacheName, storageTargetName, options) - if err != nil { - return StorageTargetsClientGetResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StorageTargetsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageTargetsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *StorageTargetsClient) getCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - if storageTargetName == "" { - return nil, errors.New("parameter storageTargetName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageTargetName}", url.PathEscape(storageTargetName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *StorageTargetsClient) getHandleResponse(resp *http.Response) (StorageTargetsClientGetResponse, error) { - result := StorageTargetsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageTarget); err != nil { - return StorageTargetsClientGetResponse{}, err - } - return result, nil -} - -// NewListByCachePager - Returns a list of Storage Targets for the specified Cache. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// resourceGroupName - Target resource group. -// cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. -// options - StorageTargetsClientListByCacheOptions contains the optional parameters for the StorageTargetsClient.ListByCache -// method. -func (client *StorageTargetsClient) NewListByCachePager(resourceGroupName string, cacheName string, options *StorageTargetsClientListByCacheOptions) *runtime.Pager[StorageTargetsClientListByCacheResponse] { - return runtime.NewPager(runtime.PagingHandler[StorageTargetsClientListByCacheResponse]{ - More: func(page StorageTargetsClientListByCacheResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *StorageTargetsClientListByCacheResponse) (StorageTargetsClientListByCacheResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByCacheCreateRequest(ctx, resourceGroupName, cacheName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StorageTargetsClientListByCacheResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return StorageTargetsClientListByCacheResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageTargetsClientListByCacheResponse{}, runtime.NewResponseError(resp) - } - return client.listByCacheHandleResponse(resp) - }, - }) -} - -// listByCacheCreateRequest creates the ListByCache request. -func (client *StorageTargetsClient) listByCacheCreateRequest(ctx context.Context, resourceGroupName string, cacheName string, options *StorageTargetsClientListByCacheOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets" - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if cacheName == "" { - return nil, errors.New("parameter cacheName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{cacheName}", url.PathEscape(cacheName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByCacheHandleResponse handles the ListByCache response. -func (client *StorageTargetsClient) listByCacheHandleResponse(resp *http.Response) (StorageTargetsClientListByCacheResponse, error) { - result := StorageTargetsClientListByCacheResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.StorageTargetsResult); err != nil { - return StorageTargetsClientListByCacheResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_time_rfc3339.go deleted file mode 100644 index 4926169d..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_time_rfc3339.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_usagemodels_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_usagemodels_client.go deleted file mode 100644 index 0f1c10c9..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/zz_generated_usagemodels_client.go +++ /dev/null @@ -1,115 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armstoragecache - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// UsageModelsClient contains the methods for the UsageModels group. -// Don't use this type directly, use NewUsageModelsClient() instead. -type UsageModelsClient struct { - host string - subscriptionID string - pl runtime.Pipeline -} - -// NewUsageModelsClient creates a new instance of UsageModelsClient with the specified values. -// subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. -func NewUsageModelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsageModelsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) - if err != nil { - return nil, err - } - client := &UsageModelsClient{ - subscriptionID: subscriptionID, - host: ep, - pl: pl, - } - return client, nil -} - -// NewListPager - Get the list of Cache Usage Models available to this subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-01-01 -// options - UsageModelsClientListOptions contains the optional parameters for the UsageModelsClient.List method. -func (client *UsageModelsClient) NewListPager(options *UsageModelsClientListOptions) *runtime.Pager[UsageModelsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[UsageModelsClientListResponse]{ - More: func(page UsageModelsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *UsageModelsClientListResponse) (UsageModelsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return UsageModelsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return UsageModelsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return UsageModelsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *UsageModelsClient) listCreateRequest(ctx context.Context, options *UsageModelsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/usageModels" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-01-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *UsageModelsClient) listHandleResponse(resp *http.Response) (UsageModelsClientListResponse, error) { - result := UsageModelsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.UsageModelsResult); err != nil { - return UsageModelsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/CHANGELOG.md deleted file mode 100644 index 51f14519..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -# Release History - -## 1.1.1 (2023-04-14) -### Bug Fixes - -- Fix serialization bug of empty value of `any` type. - - -## 1.1.0 (2023-03-31) -### Features Added - -- New struct `ClientFactory` which is a client factory used to create any client in this module - - -## 1.0.0 (2023-03-07) -### Other Changes - -- Release stable version. - -## 0.1.0 (2023-02-24) - -The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html). - -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/LICENSE.txt deleted file mode 100644 index dc0c2ffb..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Microsoft Corporation. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/README.md deleted file mode 100644 index bf8b6ea4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Azure Storage Mover Module for Go - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover) - -The `armstoragemover` module provides operations for working with Azure Storage Mover. - -[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/storagemover/armstoragemover) - -# Getting started - -## Prerequisites - -- an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) - -## Install the package - -This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. - -Install the Azure Storage Mover module: - -```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover -``` - -## Authorization - -When creating a client, you will need to provide a credential for authenticating with Azure Storage Mover. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. - -```go -cred, err := azidentity.NewDefaultAzureCredential(nil) -``` - -For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). - -## Client Factory - -Azure Storage Mover module consists of one or more clients. We provide a client factory which could be used to create any client in this module. - -```go -clientFactory, err := armstoragemover.NewClientFactory(, cred, nil) -``` - -You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). - -```go -options := arm.ClientOptions { - ClientOptions: azcore.ClientOptions { - Cloud: cloud.AzureChina, - }, -} -clientFactory, err := armstoragemover.NewClientFactory(, cred, &options) -``` - -## Clients - -A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. - -```go -client := clientFactory.NewStorageMoversClient() -``` - -## Provide Feedback - -If you encounter bugs or have suggestions, please -[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Storage Mover` label. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information, see the -[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any -additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/autorest.md deleted file mode 100644 index fa15823f..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/autorest.md +++ /dev/null @@ -1,13 +0,0 @@ -### AutoRest Configuration - -> see https://aka.ms/autorest - -``` yaml -azure-arm: true -require: -- https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/241e964afe675a7be98aa6a2e171a3c5f830816c/specification/storagemover/resource-manager/readme.go.md -license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 - -``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/ci.yml deleted file mode 100644 index 63d7bda4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/storagemover/armstoragemover/ - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/resourcemanager/storagemover/armstoragemover/ - -stages: -- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml - parameters: - IncludeRelease: true - ServiceDirectory: 'resourcemanager/storagemover/armstoragemover' diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/client_factory.go deleted file mode 100644 index f3303059..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/client_factory.go +++ /dev/null @@ -1,74 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armstoragemover - -import ( - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" -) - -// ClientFactory is a client factory used to create any client in this module. -// Don't use this type directly, use NewClientFactory instead. -type ClientFactory struct { - subscriptionID string - credential azcore.TokenCredential - options *arm.ClientOptions -} - -// NewClientFactory creates a new instance of ClientFactory with the specified values. -// The parameter values will be propagated to any client created from this factory. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) - if err != nil { - return nil, err - } - return &ClientFactory{ - subscriptionID: subscriptionID, credential: credential, - options: options.Clone(), - }, nil -} - -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewStorageMoversClient() *StorageMoversClient { - subClient, _ := NewStorageMoversClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewAgentsClient() *AgentsClient { - subClient, _ := NewAgentsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewEndpointsClient() *EndpointsClient { - subClient, _ := NewEndpointsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewProjectsClient() *ProjectsClient { - subClient, _ := NewProjectsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewJobDefinitionsClient() *JobDefinitionsClient { - subClient, _ := NewJobDefinitionsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewJobRunsClient() *JobRunsClient { - subClient, _ := NewJobRunsClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/constants.go deleted file mode 100644 index c8e25c44..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/constants.go +++ /dev/null @@ -1,202 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armstoragemover - -const ( - moduleName = "armstoragemover" - moduleVersion = "v1.1.1" -) - -// ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. -type ActionType string - -const ( - ActionTypeInternal ActionType = "Internal" -) - -// PossibleActionTypeValues returns the possible values for the ActionType const type. -func PossibleActionTypeValues() []ActionType { - return []ActionType{ - ActionTypeInternal, - } -} - -// AgentStatus - The Agent status. -type AgentStatus string - -const ( - AgentStatusExecuting AgentStatus = "Executing" - AgentStatusOffline AgentStatus = "Offline" - AgentStatusOnline AgentStatus = "Online" - AgentStatusRegistering AgentStatus = "Registering" - AgentStatusRequiresAttention AgentStatus = "RequiresAttention" - AgentStatusUnregistering AgentStatus = "Unregistering" -) - -// PossibleAgentStatusValues returns the possible values for the AgentStatus const type. -func PossibleAgentStatusValues() []AgentStatus { - return []AgentStatus{ - AgentStatusExecuting, - AgentStatusOffline, - AgentStatusOnline, - AgentStatusRegistering, - AgentStatusRequiresAttention, - AgentStatusUnregistering, - } -} - -// CopyMode - Strategy to use for copy. -type CopyMode string - -const ( - CopyModeAdditive CopyMode = "Additive" - CopyModeMirror CopyMode = "Mirror" -) - -// PossibleCopyModeValues returns the possible values for the CopyMode const type. -func PossibleCopyModeValues() []CopyMode { - return []CopyMode{ - CopyModeAdditive, - CopyModeMirror, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// EndpointType - The Endpoint resource type. -type EndpointType string - -const ( - EndpointTypeAzureStorageBlobContainer EndpointType = "AzureStorageBlobContainer" - EndpointTypeNfsMount EndpointType = "NfsMount" -) - -// PossibleEndpointTypeValues returns the possible values for the EndpointType const type. -func PossibleEndpointTypeValues() []EndpointType { - return []EndpointType{ - EndpointTypeAzureStorageBlobContainer, - EndpointTypeNfsMount, - } -} - -// JobRunScanStatus - The status of Agent's scanning of source. -type JobRunScanStatus string - -const ( - JobRunScanStatusCompleted JobRunScanStatus = "Completed" - JobRunScanStatusNotStarted JobRunScanStatus = "NotStarted" - JobRunScanStatusScanning JobRunScanStatus = "Scanning" -) - -// PossibleJobRunScanStatusValues returns the possible values for the JobRunScanStatus const type. -func PossibleJobRunScanStatusValues() []JobRunScanStatus { - return []JobRunScanStatus{ - JobRunScanStatusCompleted, - JobRunScanStatusNotStarted, - JobRunScanStatusScanning, - } -} - -// JobRunStatus - The current status of the Job Run in a non-terminal state, if exists. -type JobRunStatus string - -const ( - JobRunStatusCancelRequested JobRunStatus = "CancelRequested" - JobRunStatusCanceled JobRunStatus = "Canceled" - JobRunStatusCanceling JobRunStatus = "Canceling" - JobRunStatusFailed JobRunStatus = "Failed" - JobRunStatusQueued JobRunStatus = "Queued" - JobRunStatusRunning JobRunStatus = "Running" - JobRunStatusStarted JobRunStatus = "Started" - JobRunStatusSucceeded JobRunStatus = "Succeeded" -) - -// PossibleJobRunStatusValues returns the possible values for the JobRunStatus const type. -func PossibleJobRunStatusValues() []JobRunStatus { - return []JobRunStatus{ - JobRunStatusCancelRequested, - JobRunStatusCanceled, - JobRunStatusCanceling, - JobRunStatusFailed, - JobRunStatusQueued, - JobRunStatusRunning, - JobRunStatusStarted, - JobRunStatusSucceeded, - } -} - -// NfsVersion - The NFS protocol version. -type NfsVersion string - -const ( - NfsVersionNFSauto NfsVersion = "NFSauto" - NfsVersionNFSv3 NfsVersion = "NFSv3" - NfsVersionNFSv4 NfsVersion = "NFSv4" -) - -// PossibleNfsVersionValues returns the possible values for the NfsVersion const type. -func PossibleNfsVersionValues() []NfsVersion { - return []NfsVersion{ - NfsVersionNFSauto, - NfsVersionNFSv3, - NfsVersionNFSv4, - } -} - -// Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default -// value is "user,system" -type Origin string - -const ( - OriginSystem Origin = "system" - OriginUser Origin = "user" - OriginUserSystem Origin = "user,system" -) - -// PossibleOriginValues returns the possible values for the Origin const type. -func PossibleOriginValues() []Origin { - return []Origin{ - OriginSystem, - OriginUser, - OriginUserSystem, - } -} - -// ProvisioningState - The provisioning state of this resource. -type ProvisioningState string - -const ( - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateSucceeded, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client.go deleted file mode 100644 index 4c3d2db1..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/endpoints_client.go +++ /dev/null @@ -1,372 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armstoragemover - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// EndpointsClient contains the methods for the Endpoints group. -// Don't use this type directly, use NewEndpointsClient() instead. -type EndpointsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewEndpointsClient creates a new instance of EndpointsClient with the specified values. -// - subscriptionID - The ID of the target subscription. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointsClient, error) { - cl, err := arm.NewClient(moduleName+".EndpointsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &EndpointsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates an Endpoint resource, which represents a data transfer source or destination. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-03-01 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - storageMoverName - The name of the Storage Mover resource. -// - endpointName - The name of the Endpoint resource. -// - options - EndpointsClientCreateOrUpdateOptions contains the optional parameters for the EndpointsClient.CreateOrUpdate -// method. -func (client *EndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, endpoint Endpoint, options *EndpointsClientCreateOrUpdateOptions) (EndpointsClientCreateOrUpdateResponse, error) { - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, storageMoverName, endpointName, endpoint, options) - if err != nil { - return EndpointsClientCreateOrUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EndpointsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EndpointsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.createOrUpdateHandleResponse(resp) -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *EndpointsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, endpoint Endpoint, options *EndpointsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if storageMoverName == "" { - return nil, errors.New("parameter storageMoverName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageMoverName}", url.PathEscape(storageMoverName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, endpoint) -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *EndpointsClient) createOrUpdateHandleResponse(resp *http.Response) (EndpointsClientCreateOrUpdateResponse, error) { - result := EndpointsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Endpoint); err != nil { - return EndpointsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes an Endpoint resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-03-01 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - storageMoverName - The name of the Storage Mover resource. -// - endpointName - The name of the Endpoint resource. -// - options - EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method. -func (client *EndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*runtime.Poller[EndpointsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, storageMoverName, endpointName, options) - if err != nil { - return nil, err - } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - }) - } else { - return runtime.NewPollerFromResumeToken[EndpointsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) - } -} - -// Delete - Deletes an Endpoint resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-03-01 -func (client *EndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*http.Response, error) { - req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, endpointName, options) - if err != nil { - return nil, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) - } - return resp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *EndpointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if storageMoverName == "" { - return nil, errors.New("parameter storageMoverName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageMoverName}", url.PathEscape(storageMoverName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets an Endpoint resource. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-03-01 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - storageMoverName - The name of the Storage Mover resource. -// - endpointName - The name of the Endpoint resource. -// - options - EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method. -func (client *EndpointsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientGetOptions) (EndpointsClientGetResponse, error) { - req, err := client.getCreateRequest(ctx, resourceGroupName, storageMoverName, endpointName, options) - if err != nil { - return EndpointsClientGetResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EndpointsClientGetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EndpointsClientGetResponse{}, runtime.NewResponseError(resp) - } - return client.getHandleResponse(resp) -} - -// getCreateRequest creates the Get request. -func (client *EndpointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if storageMoverName == "" { - return nil, errors.New("parameter storageMoverName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageMoverName}", url.PathEscape(storageMoverName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *EndpointsClient) getHandleResponse(resp *http.Response) (EndpointsClientGetResponse, error) { - result := EndpointsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Endpoint); err != nil { - return EndpointsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Lists all Endpoints in a Storage Mover. -// -// Generated from API version 2023-03-01 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - storageMoverName - The name of the Storage Mover resource. -// - options - EndpointsClientListOptions contains the optional parameters for the EndpointsClient.NewListPager method. -func (client *EndpointsClient) NewListPager(resourceGroupName string, storageMoverName string, options *EndpointsClientListOptions) *runtime.Pager[EndpointsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[EndpointsClientListResponse]{ - More: func(page EndpointsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *EndpointsClientListResponse) (EndpointsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, storageMoverName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EndpointsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EndpointsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EndpointsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *EndpointsClient) listCreateRequest(ctx context.Context, resourceGroupName string, storageMoverName string, options *EndpointsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if storageMoverName == "" { - return nil, errors.New("parameter storageMoverName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageMoverName}", url.PathEscape(storageMoverName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *EndpointsClient) listHandleResponse(resp *http.Response) (EndpointsClientListResponse, error) { - result := EndpointsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.EndpointList); err != nil { - return EndpointsClientListResponse{}, err - } - return result, nil -} - -// Update - Updates properties for an Endpoint resource. Properties not specified in the request body will be unchanged. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-03-01 -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - storageMoverName - The name of the Storage Mover resource. -// - endpointName - The name of the Endpoint resource. -// - options - EndpointsClientUpdateOptions contains the optional parameters for the EndpointsClient.Update method. -func (client *EndpointsClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, endpoint EndpointBaseUpdateParameters, options *EndpointsClientUpdateOptions) (EndpointsClientUpdateResponse, error) { - req, err := client.updateCreateRequest(ctx, resourceGroupName, storageMoverName, endpointName, endpoint, options) - if err != nil { - return EndpointsClientUpdateResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EndpointsClientUpdateResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EndpointsClientUpdateResponse{}, runtime.NewResponseError(resp) - } - return client.updateHandleResponse(resp) -} - -// updateCreateRequest creates the Update request. -func (client *EndpointsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, endpoint EndpointBaseUpdateParameters, options *EndpointsClientUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if storageMoverName == "" { - return nil, errors.New("parameter storageMoverName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{storageMoverName}", url.PathEscape(storageMoverName)) - if endpointName == "" { - return nil, errors.New("parameter endpointName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, endpoint) -} - -// updateHandleResponse handles the Update response. -func (client *EndpointsClient) updateHandleResponse(resp *http.Response) (EndpointsClientUpdateResponse, error) { - result := EndpointsClientUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Endpoint); err != nil { - return EndpointsClientUpdateResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/models.go deleted file mode 100644 index 4fb900f4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/models.go +++ /dev/null @@ -1,778 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armstoragemover - -import "time" - -// Agent - The Agent resource. -type Agent struct { - // REQUIRED - Properties *AgentProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Resource system metadata. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// AgentList - List of Agents. -type AgentList struct { - // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers - // exceed maximum page size. - NextLink *string - - // READ-ONLY - Value []*Agent -} - -type AgentProperties struct { - // REQUIRED; The fully qualified resource ID of the Hybrid Compute resource for the Agent. - ArcResourceID *string - - // REQUIRED; The VM UUID of the Hybrid Compute resource for the Agent. - ArcVMUUID *string - - // A description for the Agent. - Description *string - - // READ-ONLY; The Agent status. - AgentStatus *AgentStatus - - // READ-ONLY; The Agent version. - AgentVersion *string - - // READ-ONLY - ErrorDetails *AgentPropertiesErrorDetails - - // READ-ONLY; The last updated time of the Agent status. - LastStatusUpdate *time.Time - - // READ-ONLY; Local IP address reported by the Agent. - LocalIPAddress *string - - // READ-ONLY; Available memory reported by the Agent, in MB. - MemoryInMB *int64 - - // READ-ONLY; Available compute cores reported by the Agent. - NumberOfCores *int64 - - // READ-ONLY; The provisioning state of this resource. - ProvisioningState *ProvisioningState - - // READ-ONLY; Uptime of the Agent in seconds. - UptimeInSeconds *int64 -} - -type AgentPropertiesErrorDetails struct { - // Error code reported by Agent - Code *string - - // Expanded description of reported error code - Message *string -} - -// AgentUpdateParameters - The Agent resource. -type AgentUpdateParameters struct { - Properties *AgentUpdateProperties -} - -type AgentUpdateProperties struct { - // A description for the Agent. - Description *string -} - -// AgentsClientBeginDeleteOptions contains the optional parameters for the AgentsClient.BeginDelete method. -type AgentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AgentsClientCreateOrUpdateOptions contains the optional parameters for the AgentsClient.CreateOrUpdate method. -type AgentsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AgentsClientGetOptions contains the optional parameters for the AgentsClient.Get method. -type AgentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AgentsClientListOptions contains the optional parameters for the AgentsClient.NewListPager method. -type AgentsClientListOptions struct { - // placeholder for future optional parameters -} - -// AgentsClientUpdateOptions contains the optional parameters for the AgentsClient.Update method. -type AgentsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -type AzureStorageBlobContainerEndpointProperties struct { - // REQUIRED; The name of the Storage blob container that is the target destination. - BlobContainerName *string - - // REQUIRED; The Endpoint resource type. - EndpointType *EndpointType - - // REQUIRED; The Azure Resource ID of the storage account that is the target destination. - StorageAccountResourceID *string - - // A description for the Endpoint. - Description *string - - // READ-ONLY; The provisioning state of this resource. - ProvisioningState *ProvisioningState -} - -// GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type AzureStorageBlobContainerEndpointProperties. -func (a *AzureStorageBlobContainerEndpointProperties) GetEndpointBaseProperties() *EndpointBaseProperties { - return &EndpointBaseProperties{ - EndpointType: a.EndpointType, - Description: a.Description, - ProvisioningState: a.ProvisioningState, - } -} - -// Endpoint - The Endpoint resource, which contains information about file sources and targets. -type Endpoint struct { - // REQUIRED; The resource specific properties for the Storage Mover resource. - Properties EndpointBasePropertiesClassification - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Resource system metadata. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// EndpointBasePropertiesClassification provides polymorphic access to related types. -// Call the interface's GetEndpointBaseProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AzureStorageBlobContainerEndpointProperties, *EndpointBaseProperties, *NfsMountEndpointProperties -type EndpointBasePropertiesClassification interface { - // GetEndpointBaseProperties returns the EndpointBaseProperties content of the underlying type. - GetEndpointBaseProperties() *EndpointBaseProperties -} - -// EndpointBaseProperties - The resource specific properties for the Storage Mover resource. -type EndpointBaseProperties struct { - // REQUIRED; The Endpoint resource type. - EndpointType *EndpointType - - // A description for the Endpoint. - Description *string - - // READ-ONLY; The provisioning state of this resource. - ProvisioningState *ProvisioningState -} - -// GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type EndpointBaseProperties. -func (e *EndpointBaseProperties) GetEndpointBaseProperties() *EndpointBaseProperties { return e } - -// EndpointBaseUpdateParameters - The Endpoint resource. -type EndpointBaseUpdateParameters struct { - // The Endpoint resource, which contains information about file sources and targets. - Properties *EndpointBaseUpdateProperties -} - -// EndpointBaseUpdateProperties - The Endpoint resource, which contains information about file sources and targets. -type EndpointBaseUpdateProperties struct { - // A description for the Endpoint. - Description *string -} - -// EndpointList - List of Endpoints. -type EndpointList struct { - // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers - // exceed maximum page size. - NextLink *string - - // READ-ONLY - Value []*Endpoint -} - -// EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method. -type EndpointsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EndpointsClientCreateOrUpdateOptions contains the optional parameters for the EndpointsClient.CreateOrUpdate method. -type EndpointsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method. -type EndpointsClientGetOptions struct { - // placeholder for future optional parameters -} - -// EndpointsClientListOptions contains the optional parameters for the EndpointsClient.NewListPager method. -type EndpointsClientListOptions struct { - // placeholder for future optional parameters -} - -// EndpointsClientUpdateOptions contains the optional parameters for the EndpointsClient.Update method. -type EndpointsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// JobDefinition - The Job Definition resource. -type JobDefinition struct { - // REQUIRED; Job definition properties. - Properties *JobDefinitionProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Resource system metadata. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// JobDefinitionList - List of Job Definitions. -type JobDefinitionList struct { - // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers - // exceed maximum page size. - NextLink *string - - // READ-ONLY - Value []*JobDefinition -} - -// JobDefinitionProperties - Job definition properties. -type JobDefinitionProperties struct { - // REQUIRED; Strategy to use for copy. - CopyMode *CopyMode - - // REQUIRED; The name of the source Endpoint. - SourceName *string - - // REQUIRED; The name of the target Endpoint. - TargetName *string - - // Name of the Agent to assign for new Job Runs of this Job Definition. - AgentName *string - - // A description for the Job Definition. - Description *string - - // The subpath to use when reading from the source Endpoint. - SourceSubpath *string - - // The subpath to use when writing to the target Endpoint. - TargetSubpath *string - - // READ-ONLY; Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. - AgentResourceID *string - - // READ-ONLY; The name of the Job Run in a non-terminal state, if exists. - LatestJobRunName *string - - // READ-ONLY; The fully qualified resource ID of the Job Run in a non-terminal state, if exists. - LatestJobRunResourceID *string - - // READ-ONLY; The current status of the Job Run in a non-terminal state, if exists. - LatestJobRunStatus *JobRunStatus - - // READ-ONLY; The provisioning state of this resource. - ProvisioningState *ProvisioningState - - // READ-ONLY; Fully qualified resource ID of the source Endpoint. - SourceResourceID *string - - // READ-ONLY; Fully qualified resource ID of the target Endpoint. - TargetResourceID *string -} - -// JobDefinitionUpdateParameters - The Job Definition resource. -type JobDefinitionUpdateParameters struct { - // Job definition properties. - Properties *JobDefinitionUpdateProperties -} - -// JobDefinitionUpdateProperties - Job definition properties. -type JobDefinitionUpdateProperties struct { - // Name of the Agent to assign for new Job Runs of this Job Definition. - AgentName *string - - // Strategy to use for copy. - CopyMode *CopyMode - - // A description for the Job Definition. - Description *string -} - -// JobDefinitionsClientBeginDeleteOptions contains the optional parameters for the JobDefinitionsClient.BeginDelete method. -type JobDefinitionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// JobDefinitionsClientCreateOrUpdateOptions contains the optional parameters for the JobDefinitionsClient.CreateOrUpdate -// method. -type JobDefinitionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// JobDefinitionsClientGetOptions contains the optional parameters for the JobDefinitionsClient.Get method. -type JobDefinitionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// JobDefinitionsClientListOptions contains the optional parameters for the JobDefinitionsClient.NewListPager method. -type JobDefinitionsClientListOptions struct { - // placeholder for future optional parameters -} - -// JobDefinitionsClientStartJobOptions contains the optional parameters for the JobDefinitionsClient.StartJob method. -type JobDefinitionsClientStartJobOptions struct { - // placeholder for future optional parameters -} - -// JobDefinitionsClientStopJobOptions contains the optional parameters for the JobDefinitionsClient.StopJob method. -type JobDefinitionsClientStopJobOptions struct { - // placeholder for future optional parameters -} - -// JobDefinitionsClientUpdateOptions contains the optional parameters for the JobDefinitionsClient.Update method. -type JobDefinitionsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// JobRun - The Job Run resource. -type JobRun struct { - // Job run properties. - Properties *JobRunProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Resource system metadata. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// JobRunError - Error type -type JobRunError struct { - // Error code of the given entry. - Code *string - - // Error message of the given entry. - Message *string - - // Target of the given error entry. - Target *string -} - -// JobRunList - List of Job Runs. -type JobRunList struct { - // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers - // exceed maximum page size. - NextLink *string - - // READ-ONLY - Value []*JobRun -} - -// JobRunProperties - Job run properties. -type JobRunProperties struct { - // READ-ONLY; Name of the Agent assigned to this run. - AgentName *string - - // READ-ONLY; Fully qualified resource id of the Agent assigned to this run. - AgentResourceID *string - - // READ-ONLY; Bytes of data that will not be transferred, as they are excluded by user configuration. - BytesExcluded *int64 - - // READ-ONLY; Bytes of data that were attempted to transfer and failed. - BytesFailed *int64 - - // READ-ONLY; Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode). - BytesNoTransferNeeded *int64 - - // READ-ONLY; Bytes of data scanned so far in source. - BytesScanned *int64 - - // READ-ONLY; Bytes of data successfully transferred to target. - BytesTransferred *int64 - - // READ-ONLY; Bytes of data that will not be transferred, as they are unsupported on target. - BytesUnsupported *int64 - - // READ-ONLY; Error details. - Error *JobRunError - - // READ-ONLY; End time of the run. Null if Agent has not reported that the job has ended. - ExecutionEndTime *time.Time - - // READ-ONLY; Start time of the run. Null if no Agent reported that the job has started. - ExecutionStartTime *time.Time - - // READ-ONLY; Number of items that will not be transferred, as they are excluded by user configuration. - ItemsExcluded *int64 - - // READ-ONLY; Number of items that were attempted to transfer and failed. - ItemsFailed *int64 - - // READ-ONLY; Number of items that will not be transferred, as they are already found on target (e.g. mirror mode). - ItemsNoTransferNeeded *int64 - - // READ-ONLY; Number of items scanned so far in source. - ItemsScanned *int64 - - // READ-ONLY; Number of items successfully transferred to target. - ItemsTransferred *int64 - - // READ-ONLY; Number of items that will not be transferred, as they are unsupported on target. - ItemsUnsupported *int64 - - // READ-ONLY; Copy of parent Job Definition's properties at time of Job Run creation. - JobDefinitionProperties any - - // READ-ONLY; The last updated time of the Job Run. - LastStatusUpdate *time.Time - - // READ-ONLY; The provisioning state of this resource. - ProvisioningState *ProvisioningState - - // READ-ONLY; The status of Agent's scanning of source. - ScanStatus *JobRunScanStatus - - // READ-ONLY; Name of source Endpoint resource. This resource may no longer exist. - SourceName *string - - // READ-ONLY; Copy of source Endpoint resource's properties at time of Job Run creation. - SourceProperties any - - // READ-ONLY; Fully qualified resource id of source Endpoint. This id may no longer exist. - SourceResourceID *string - - // READ-ONLY; The state of the job execution. - Status *JobRunStatus - - // READ-ONLY; Name of target Endpoint resource. This resource may no longer exist. - TargetName *string - - // READ-ONLY; Copy of Endpoint resource's properties at time of Job Run creation. - TargetProperties any - - // READ-ONLY; Fully qualified resource id of of Endpoint. This id may no longer exist. - TargetResourceID *string -} - -// JobRunResourceID - Response that identifies a Job Run. -type JobRunResourceID struct { - // READ-ONLY; Fully qualified resource id of the Job Run. - JobRunResourceID *string -} - -// JobRunsClientGetOptions contains the optional parameters for the JobRunsClient.Get method. -type JobRunsClientGetOptions struct { - // placeholder for future optional parameters -} - -// JobRunsClientListOptions contains the optional parameters for the JobRunsClient.NewListPager method. -type JobRunsClientListOptions struct { - // placeholder for future optional parameters -} - -// List of Storage Movers. -type List struct { - // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers - // exceed maximum page size. - NextLink *string - - // READ-ONLY - Value []*StorageMover -} - -type NfsMountEndpointProperties struct { - // REQUIRED; The Endpoint resource type. - EndpointType *EndpointType - - // REQUIRED; The directory being exported from the server. - Export *string - - // REQUIRED; The host name or IP address of the server exporting the file system. - Host *string - - // A description for the Endpoint. - Description *string - - // The NFS protocol version. - NfsVersion *NfsVersion - - // READ-ONLY; The provisioning state of this resource. - ProvisioningState *ProvisioningState -} - -// GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type NfsMountEndpointProperties. -func (n *NfsMountEndpointProperties) GetEndpointBaseProperties() *EndpointBaseProperties { - return &EndpointBaseProperties{ - EndpointType: n.EndpointType, - Description: n.Description, - ProvisioningState: n.ProvisioningState, - } -} - -// Operation - Details of a REST API operation, returned from the Resource Provider Operations API -type Operation struct { - // Localized display information for this particular operation. - Display *OperationDisplay - - // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - ActionType *ActionType - - // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane - // operations. - IsDataAction *bool - - // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", - // "Microsoft.Compute/virtualMachines/capture/action" - Name *string - - // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - // value is "user,system" - Origin *Origin -} - -// OperationDisplay - Localized display information for this particular operation. -type OperationDisplay struct { - // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. - Description *string - - // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual - // Machine", "Restart Virtual Machine". - Operation *string - - // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft - // Compute". - Provider *string - - // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job - // Schedule Collections". - Resource *string -} - -// OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to -// get the next set of results. -type OperationListResult struct { - // READ-ONLY; URL to get the next set of operation list results (if there are any). - NextLink *string - - // READ-ONLY; List of operations supported by the resource provider - Value []*Operation -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - -// Project - The Project resource. -type Project struct { - // Project properties. - Properties *ProjectProperties - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Resource system metadata. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// ProjectList - List of Project resources. -type ProjectList struct { - // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers - // exceed maximum page size. - NextLink *string - - // READ-ONLY - Value []*Project -} - -// ProjectProperties - Project properties. -type ProjectProperties struct { - // A description for the Project. - Description *string - - // READ-ONLY; The provisioning state of this resource. - ProvisioningState *ProvisioningState -} - -// ProjectUpdateParameters - The Project resource. -type ProjectUpdateParameters struct { - // Project properties. - Properties *ProjectUpdateProperties -} - -// ProjectUpdateProperties - Project properties. -type ProjectUpdateProperties struct { - // A description for the Project. - Description *string -} - -// ProjectsClientBeginDeleteOptions contains the optional parameters for the ProjectsClient.BeginDelete method. -type ProjectsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ProjectsClientCreateOrUpdateOptions contains the optional parameters for the ProjectsClient.CreateOrUpdate method. -type ProjectsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProjectsClientGetOptions contains the optional parameters for the ProjectsClient.Get method. -type ProjectsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ProjectsClientListOptions contains the optional parameters for the ProjectsClient.NewListPager method. -type ProjectsClientListOptions struct { - // placeholder for future optional parameters -} - -// ProjectsClientUpdateOptions contains the optional parameters for the ProjectsClient.Update method. -type ProjectsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// Properties - The resource specific properties for the Storage Mover resource. -type Properties struct { - // A description for the Storage Mover. - Description *string - - // READ-ONLY; The provisioning state of this resource. - ProvisioningState *ProvisioningState -} - -// StorageMover - The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. -type StorageMover struct { - // REQUIRED; The geo-location where the resource lives - Location *string - - // The resource specific properties for the Storage Mover resource. - Properties *Properties - - // Resource tags. - Tags map[string]*string - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string - - // READ-ONLY; The name of the resource - Name *string - - // READ-ONLY; Resource system metadata. - SystemData *SystemData - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string -} - -// StorageMoversClientBeginDeleteOptions contains the optional parameters for the StorageMoversClient.BeginDelete method. -type StorageMoversClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StorageMoversClientCreateOrUpdateOptions contains the optional parameters for the StorageMoversClient.CreateOrUpdate method. -type StorageMoversClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// StorageMoversClientGetOptions contains the optional parameters for the StorageMoversClient.Get method. -type StorageMoversClientGetOptions struct { - // placeholder for future optional parameters -} - -// StorageMoversClientListBySubscriptionOptions contains the optional parameters for the StorageMoversClient.NewListBySubscriptionPager -// method. -type StorageMoversClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// StorageMoversClientListOptions contains the optional parameters for the StorageMoversClient.NewListPager method. -type StorageMoversClientListOptions struct { - // placeholder for future optional parameters -} - -// StorageMoversClientUpdateOptions contains the optional parameters for the StorageMoversClient.Update method. -type StorageMoversClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// SystemData - Metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // The timestamp of resource creation (UTC). - CreatedAt *time.Time - - // The identity that created the resource. - CreatedBy *string - - // The type of identity that created the resource. - CreatedByType *CreatedByType - - // The timestamp of resource last modification (UTC) - LastModifiedAt *time.Time - - // The identity that last modified the resource. - LastModifiedBy *string - - // The type of identity that last modified the resource. - LastModifiedByType *CreatedByType -} - -// UpdateParameters - The Storage Mover resource. -type UpdateParameters struct { - // The resource specific properties for the Storage Mover resource. - Properties *UpdateProperties - - // Resource tags. - Tags map[string]*string -} - -// UpdateProperties - The resource specific properties for the Storage Mover resource. -type UpdateProperties struct { - // A description for the Storage Mover. - Description *string -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/models_serde.go deleted file mode 100644 index 4ecf5360..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/models_serde.go +++ /dev/null @@ -1,1506 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armstoragemover - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type Agent. -func (a Agent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "systemData", a.SystemData) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Agent. -func (a *Agent) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &a.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &a.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &a.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AgentList. -func (a AgentList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentList. -func (a *AgentList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &a.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &a.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AgentProperties. -func (a AgentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "agentStatus", a.AgentStatus) - populate(objectMap, "agentVersion", a.AgentVersion) - populate(objectMap, "arcResourceId", a.ArcResourceID) - populate(objectMap, "arcVmUuid", a.ArcVMUUID) - populate(objectMap, "description", a.Description) - populate(objectMap, "errorDetails", a.ErrorDetails) - populateTimeRFC3339(objectMap, "lastStatusUpdate", a.LastStatusUpdate) - populate(objectMap, "localIPAddress", a.LocalIPAddress) - populate(objectMap, "memoryInMB", a.MemoryInMB) - populate(objectMap, "numberOfCores", a.NumberOfCores) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "uptimeInSeconds", a.UptimeInSeconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentProperties. -func (a *AgentProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentStatus": - err = unpopulate(val, "AgentStatus", &a.AgentStatus) - delete(rawMsg, key) - case "agentVersion": - err = unpopulate(val, "AgentVersion", &a.AgentVersion) - delete(rawMsg, key) - case "arcResourceId": - err = unpopulate(val, "ArcResourceID", &a.ArcResourceID) - delete(rawMsg, key) - case "arcVmUuid": - err = unpopulate(val, "ArcVMUUID", &a.ArcVMUUID) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "errorDetails": - err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) - delete(rawMsg, key) - case "lastStatusUpdate": - err = unpopulateTimeRFC3339(val, "LastStatusUpdate", &a.LastStatusUpdate) - delete(rawMsg, key) - case "localIPAddress": - err = unpopulate(val, "LocalIPAddress", &a.LocalIPAddress) - delete(rawMsg, key) - case "memoryInMB": - err = unpopulate(val, "MemoryInMB", &a.MemoryInMB) - delete(rawMsg, key) - case "numberOfCores": - err = unpopulate(val, "NumberOfCores", &a.NumberOfCores) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "uptimeInSeconds": - err = unpopulate(val, "UptimeInSeconds", &a.UptimeInSeconds) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AgentPropertiesErrorDetails. -func (a AgentPropertiesErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", a.Code) - populate(objectMap, "message", a.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPropertiesErrorDetails. -func (a *AgentPropertiesErrorDetails) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &a.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &a.Message) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AgentUpdateParameters. -func (a AgentUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", a.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpdateParameters. -func (a *AgentUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AgentUpdateProperties. -func (a AgentUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", a.Description) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpdateProperties. -func (a *AgentUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureStorageBlobContainerEndpointProperties. -func (a AzureStorageBlobContainerEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "blobContainerName", a.BlobContainerName) - populate(objectMap, "description", a.Description) - objectMap["endpointType"] = EndpointTypeAzureStorageBlobContainer - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "storageAccountResourceId", a.StorageAccountResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageBlobContainerEndpointProperties. -func (a *AzureStorageBlobContainerEndpointProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blobContainerName": - err = unpopulate(val, "BlobContainerName", &a.BlobContainerName) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "endpointType": - err = unpopulate(val, "EndpointType", &a.EndpointType) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "storageAccountResourceId": - err = unpopulate(val, "StorageAccountResourceID", &a.StorageAccountResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Endpoint. -func (e Endpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", e.ID) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "systemData", e.SystemData) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Endpoint. -func (e *Endpoint) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &e.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &e.Name) - delete(rawMsg, key) - case "properties": - e.Properties, err = unmarshalEndpointBasePropertiesClassification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &e.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointBaseProperties. -func (e EndpointBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", e.Description) - objectMap["endpointType"] = e.EndpointType - populate(objectMap, "provisioningState", e.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointBaseProperties. -func (e *EndpointBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &e.Description) - delete(rawMsg, key) - case "endpointType": - err = unpopulate(val, "EndpointType", &e.EndpointType) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointBaseUpdateParameters. -func (e EndpointBaseUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", e.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointBaseUpdateParameters. -func (e *EndpointBaseUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &e.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointBaseUpdateProperties. -func (e EndpointBaseUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", e.Description) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointBaseUpdateProperties. -func (e *EndpointBaseUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &e.Description) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointList. -func (e EndpointList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointList. -func (e *EndpointList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &e.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &e.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobDefinition. -func (j JobDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", j.ID) - populate(objectMap, "name", j.Name) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "systemData", j.SystemData) - populate(objectMap, "type", j.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinition. -func (j *JobDefinition) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &j.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &j.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &j.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &j.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &j.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobDefinitionList. -func (j JobDefinitionList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", j.NextLink) - populate(objectMap, "value", j.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionList. -func (j *JobDefinitionList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &j.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &j.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobDefinitionProperties. -func (j JobDefinitionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "agentName", j.AgentName) - populate(objectMap, "agentResourceId", j.AgentResourceID) - populate(objectMap, "copyMode", j.CopyMode) - populate(objectMap, "description", j.Description) - populate(objectMap, "latestJobRunName", j.LatestJobRunName) - populate(objectMap, "latestJobRunResourceId", j.LatestJobRunResourceID) - populate(objectMap, "latestJobRunStatus", j.LatestJobRunStatus) - populate(objectMap, "provisioningState", j.ProvisioningState) - populate(objectMap, "sourceName", j.SourceName) - populate(objectMap, "sourceResourceId", j.SourceResourceID) - populate(objectMap, "sourceSubpath", j.SourceSubpath) - populate(objectMap, "targetName", j.TargetName) - populate(objectMap, "targetResourceId", j.TargetResourceID) - populate(objectMap, "targetSubpath", j.TargetSubpath) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionProperties. -func (j *JobDefinitionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentName": - err = unpopulate(val, "AgentName", &j.AgentName) - delete(rawMsg, key) - case "agentResourceId": - err = unpopulate(val, "AgentResourceID", &j.AgentResourceID) - delete(rawMsg, key) - case "copyMode": - err = unpopulate(val, "CopyMode", &j.CopyMode) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &j.Description) - delete(rawMsg, key) - case "latestJobRunName": - err = unpopulate(val, "LatestJobRunName", &j.LatestJobRunName) - delete(rawMsg, key) - case "latestJobRunResourceId": - err = unpopulate(val, "LatestJobRunResourceID", &j.LatestJobRunResourceID) - delete(rawMsg, key) - case "latestJobRunStatus": - err = unpopulate(val, "LatestJobRunStatus", &j.LatestJobRunStatus) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) - delete(rawMsg, key) - case "sourceName": - err = unpopulate(val, "SourceName", &j.SourceName) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &j.SourceResourceID) - delete(rawMsg, key) - case "sourceSubpath": - err = unpopulate(val, "SourceSubpath", &j.SourceSubpath) - delete(rawMsg, key) - case "targetName": - err = unpopulate(val, "TargetName", &j.TargetName) - delete(rawMsg, key) - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &j.TargetResourceID) - delete(rawMsg, key) - case "targetSubpath": - err = unpopulate(val, "TargetSubpath", &j.TargetSubpath) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobDefinitionUpdateParameters. -func (j JobDefinitionUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", j.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionUpdateParameters. -func (j *JobDefinitionUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &j.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobDefinitionUpdateProperties. -func (j JobDefinitionUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "agentName", j.AgentName) - populate(objectMap, "copyMode", j.CopyMode) - populate(objectMap, "description", j.Description) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionUpdateProperties. -func (j *JobDefinitionUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentName": - err = unpopulate(val, "AgentName", &j.AgentName) - delete(rawMsg, key) - case "copyMode": - err = unpopulate(val, "CopyMode", &j.CopyMode) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &j.Description) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobRun. -func (j JobRun) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", j.ID) - populate(objectMap, "name", j.Name) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "systemData", j.SystemData) - populate(objectMap, "type", j.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobRun. -func (j *JobRun) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &j.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &j.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &j.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &j.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &j.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobRunError. -func (j JobRunError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", j.Code) - populate(objectMap, "message", j.Message) - populate(objectMap, "target", j.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobRunError. -func (j *JobRunError) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &j.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &j.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &j.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobRunList. -func (j JobRunList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", j.NextLink) - populate(objectMap, "value", j.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobRunList. -func (j *JobRunList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &j.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &j.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobRunProperties. -func (j JobRunProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "agentName", j.AgentName) - populate(objectMap, "agentResourceId", j.AgentResourceID) - populate(objectMap, "bytesExcluded", j.BytesExcluded) - populate(objectMap, "bytesFailed", j.BytesFailed) - populate(objectMap, "bytesNoTransferNeeded", j.BytesNoTransferNeeded) - populate(objectMap, "bytesScanned", j.BytesScanned) - populate(objectMap, "bytesTransferred", j.BytesTransferred) - populate(objectMap, "bytesUnsupported", j.BytesUnsupported) - populate(objectMap, "error", j.Error) - populateTimeRFC3339(objectMap, "executionEndTime", j.ExecutionEndTime) - populateTimeRFC3339(objectMap, "executionStartTime", j.ExecutionStartTime) - populate(objectMap, "itemsExcluded", j.ItemsExcluded) - populate(objectMap, "itemsFailed", j.ItemsFailed) - populate(objectMap, "itemsNoTransferNeeded", j.ItemsNoTransferNeeded) - populate(objectMap, "itemsScanned", j.ItemsScanned) - populate(objectMap, "itemsTransferred", j.ItemsTransferred) - populate(objectMap, "itemsUnsupported", j.ItemsUnsupported) - populateAny(objectMap, "jobDefinitionProperties", j.JobDefinitionProperties) - populateTimeRFC3339(objectMap, "lastStatusUpdate", j.LastStatusUpdate) - populate(objectMap, "provisioningState", j.ProvisioningState) - populate(objectMap, "scanStatus", j.ScanStatus) - populate(objectMap, "sourceName", j.SourceName) - populateAny(objectMap, "sourceProperties", j.SourceProperties) - populate(objectMap, "sourceResourceId", j.SourceResourceID) - populate(objectMap, "status", j.Status) - populate(objectMap, "targetName", j.TargetName) - populateAny(objectMap, "targetProperties", j.TargetProperties) - populate(objectMap, "targetResourceId", j.TargetResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobRunProperties. -func (j *JobRunProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "agentName": - err = unpopulate(val, "AgentName", &j.AgentName) - delete(rawMsg, key) - case "agentResourceId": - err = unpopulate(val, "AgentResourceID", &j.AgentResourceID) - delete(rawMsg, key) - case "bytesExcluded": - err = unpopulate(val, "BytesExcluded", &j.BytesExcluded) - delete(rawMsg, key) - case "bytesFailed": - err = unpopulate(val, "BytesFailed", &j.BytesFailed) - delete(rawMsg, key) - case "bytesNoTransferNeeded": - err = unpopulate(val, "BytesNoTransferNeeded", &j.BytesNoTransferNeeded) - delete(rawMsg, key) - case "bytesScanned": - err = unpopulate(val, "BytesScanned", &j.BytesScanned) - delete(rawMsg, key) - case "bytesTransferred": - err = unpopulate(val, "BytesTransferred", &j.BytesTransferred) - delete(rawMsg, key) - case "bytesUnsupported": - err = unpopulate(val, "BytesUnsupported", &j.BytesUnsupported) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &j.Error) - delete(rawMsg, key) - case "executionEndTime": - err = unpopulateTimeRFC3339(val, "ExecutionEndTime", &j.ExecutionEndTime) - delete(rawMsg, key) - case "executionStartTime": - err = unpopulateTimeRFC3339(val, "ExecutionStartTime", &j.ExecutionStartTime) - delete(rawMsg, key) - case "itemsExcluded": - err = unpopulate(val, "ItemsExcluded", &j.ItemsExcluded) - delete(rawMsg, key) - case "itemsFailed": - err = unpopulate(val, "ItemsFailed", &j.ItemsFailed) - delete(rawMsg, key) - case "itemsNoTransferNeeded": - err = unpopulate(val, "ItemsNoTransferNeeded", &j.ItemsNoTransferNeeded) - delete(rawMsg, key) - case "itemsScanned": - err = unpopulate(val, "ItemsScanned", &j.ItemsScanned) - delete(rawMsg, key) - case "itemsTransferred": - err = unpopulate(val, "ItemsTransferred", &j.ItemsTransferred) - delete(rawMsg, key) - case "itemsUnsupported": - err = unpopulate(val, "ItemsUnsupported", &j.ItemsUnsupported) - delete(rawMsg, key) - case "jobDefinitionProperties": - err = unpopulate(val, "JobDefinitionProperties", &j.JobDefinitionProperties) - delete(rawMsg, key) - case "lastStatusUpdate": - err = unpopulateTimeRFC3339(val, "LastStatusUpdate", &j.LastStatusUpdate) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) - delete(rawMsg, key) - case "scanStatus": - err = unpopulate(val, "ScanStatus", &j.ScanStatus) - delete(rawMsg, key) - case "sourceName": - err = unpopulate(val, "SourceName", &j.SourceName) - delete(rawMsg, key) - case "sourceProperties": - err = unpopulate(val, "SourceProperties", &j.SourceProperties) - delete(rawMsg, key) - case "sourceResourceId": - err = unpopulate(val, "SourceResourceID", &j.SourceResourceID) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &j.Status) - delete(rawMsg, key) - case "targetName": - err = unpopulate(val, "TargetName", &j.TargetName) - delete(rawMsg, key) - case "targetProperties": - err = unpopulate(val, "TargetProperties", &j.TargetProperties) - delete(rawMsg, key) - case "targetResourceId": - err = unpopulate(val, "TargetResourceID", &j.TargetResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobRunResourceID. -func (j JobRunResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "jobRunResourceId", j.JobRunResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobRunResourceID. -func (j *JobRunResourceID) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobRunResourceId": - err = unpopulate(val, "JobRunResourceID", &j.JobRunResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type List. -func (l List) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type List. -func (l *List) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NfsMountEndpointProperties. -func (n NfsMountEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", n.Description) - objectMap["endpointType"] = EndpointTypeNfsMount - populate(objectMap, "export", n.Export) - populate(objectMap, "host", n.Host) - populate(objectMap, "nfsVersion", n.NfsVersion) - populate(objectMap, "provisioningState", n.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NfsMountEndpointProperties. -func (n *NfsMountEndpointProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &n.Description) - delete(rawMsg, key) - case "endpointType": - err = unpopulate(val, "EndpointType", &n.EndpointType) - delete(rawMsg, key) - case "export": - err = unpopulate(val, "Export", &n.Export) - delete(rawMsg, key) - case "host": - err = unpopulate(val, "Host", &n.Host) - delete(rawMsg, key) - case "nfsVersion": - err = unpopulate(val, "NfsVersion", &n.NfsVersion) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Operation. -func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "actionType", o.ActionType) - populate(objectMap, "display", o.Display) - populate(objectMap, "isDataAction", o.IsDataAction) - populate(objectMap, "name", o.Name) - populate(objectMap, "origin", o.Origin) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. -func (o *Operation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "actionType": - err = unpopulate(val, "ActionType", &o.ActionType) - delete(rawMsg, key) - case "display": - err = unpopulate(val, "Display", &o.Display) - delete(rawMsg, key) - case "isDataAction": - err = unpopulate(val, "IsDataAction", &o.IsDataAction) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "origin": - err = unpopulate(val, "Origin", &o.Origin) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. -func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", o.Description) - populate(objectMap, "operation", o.Operation) - populate(objectMap, "provider", o.Provider) - populate(objectMap, "resource", o.Resource) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. -func (o *OperationDisplay) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "operation": - err = unpopulate(val, "Operation", &o.Operation) - delete(rawMsg, key) - case "provider": - err = unpopulate(val, "Provider", &o.Provider) - delete(rawMsg, key) - case "resource": - err = unpopulate(val, "Resource", &o.Resource) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. -func (o *OperationListResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &o.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Project. -func (p Project) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Project. -func (p *Project) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProjectList. -func (p ProjectList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProjectList. -func (p *ProjectList) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProjectProperties. -func (p ProjectProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", p.Description) - populate(objectMap, "provisioningState", p.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProjectProperties. -func (p *ProjectProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProjectUpdateParameters. -func (p ProjectUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", p.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProjectUpdateParameters. -func (p *ProjectUpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ProjectUpdateProperties. -func (p ProjectUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", p.Description) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProjectUpdateProperties. -func (p *ProjectUpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Properties. -func (p Properties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", p.Description) - populate(objectMap, "provisioningState", p.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Properties. -func (p *Properties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type StorageMover. -func (s StorageMover) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMover. -func (s *StorageMover) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &s.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &s.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateParameters. -func (u UpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "properties", u.Properties) - populate(objectMap, "tags", u.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateParameters. -func (u *UpdateParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &u.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UpdateProperties. -func (u UpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "description", u.Description) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateProperties. -func (u *UpdateProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &u.Description) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -func populate(m map[string]any, k string, v any) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func populateAny(m map[string]any, k string, v any) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v any) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/operations_client.go deleted file mode 100644 index d6443314..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/operations_client.go +++ /dev/null @@ -1,94 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armstoragemover - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" -) - -// OperationsClient contains the methods for the Operations group. -// Don't use this type directly, use NewOperationsClient() instead. -type OperationsClient struct { - internal *arm.Client -} - -// NewOperationsClient creates a new instance of OperationsClient with the specified values. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { - cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &OperationsClient{ - internal: cl, - } - return client, nil -} - -// NewListPager - Lists all the supported operations for the Azure Storage Mover REST API. -// -// Generated from API version 2023-03-01 -// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ - More: func(page OperationsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return OperationsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return OperationsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) - }, - }) -} - -// listCreateRequest creates the List request. -func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { - urlPath := "/providers/Microsoft.StorageMover/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { - return OperationsClientListResponse{}, err - } - return result, nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/polymorphic_helpers.go deleted file mode 100644 index f7805272..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/polymorphic_helpers.go +++ /dev/null @@ -1,32 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armstoragemover - -import "encoding/json" - -func unmarshalEndpointBasePropertiesClassification(rawMsg json.RawMessage) (EndpointBasePropertiesClassification, error) { - if rawMsg == nil { - return nil, nil - } - var m map[string]any - if err := json.Unmarshal(rawMsg, &m); err != nil { - return nil, err - } - var b EndpointBasePropertiesClassification - switch m["endpointType"] { - case string(EndpointTypeAzureStorageBlobContainer): - b = &AzureStorageBlobContainerEndpointProperties{} - case string(EndpointTypeNfsMount): - b = &NfsMountEndpointProperties{} - default: - b = &EndpointBaseProperties{} - } - return b, json.Unmarshal(rawMsg, b) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/response_types.go deleted file mode 100644 index 0218cca9..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/response_types.go +++ /dev/null @@ -1,165 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armstoragemover - -// AgentsClientCreateOrUpdateResponse contains the response from method AgentsClient.CreateOrUpdate. -type AgentsClientCreateOrUpdateResponse struct { - Agent -} - -// AgentsClientDeleteResponse contains the response from method AgentsClient.BeginDelete. -type AgentsClientDeleteResponse struct { - // placeholder for future response values -} - -// AgentsClientGetResponse contains the response from method AgentsClient.Get. -type AgentsClientGetResponse struct { - Agent -} - -// AgentsClientListResponse contains the response from method AgentsClient.NewListPager. -type AgentsClientListResponse struct { - AgentList -} - -// AgentsClientUpdateResponse contains the response from method AgentsClient.Update. -type AgentsClientUpdateResponse struct { - Agent -} - -// EndpointsClientCreateOrUpdateResponse contains the response from method EndpointsClient.CreateOrUpdate. -type EndpointsClientCreateOrUpdateResponse struct { - Endpoint -} - -// EndpointsClientDeleteResponse contains the response from method EndpointsClient.BeginDelete. -type EndpointsClientDeleteResponse struct { - // placeholder for future response values -} - -// EndpointsClientGetResponse contains the response from method EndpointsClient.Get. -type EndpointsClientGetResponse struct { - Endpoint -} - -// EndpointsClientListResponse contains the response from method EndpointsClient.NewListPager. -type EndpointsClientListResponse struct { - EndpointList -} - -// EndpointsClientUpdateResponse contains the response from method EndpointsClient.Update. -type EndpointsClientUpdateResponse struct { - Endpoint -} - -// JobDefinitionsClientCreateOrUpdateResponse contains the response from method JobDefinitionsClient.CreateOrUpdate. -type JobDefinitionsClientCreateOrUpdateResponse struct { - JobDefinition -} - -// JobDefinitionsClientDeleteResponse contains the response from method JobDefinitionsClient.BeginDelete. -type JobDefinitionsClientDeleteResponse struct { - // placeholder for future response values -} - -// JobDefinitionsClientGetResponse contains the response from method JobDefinitionsClient.Get. -type JobDefinitionsClientGetResponse struct { - JobDefinition -} - -// JobDefinitionsClientListResponse contains the response from method JobDefinitionsClient.NewListPager. -type JobDefinitionsClientListResponse struct { - JobDefinitionList -} - -// JobDefinitionsClientStartJobResponse contains the response from method JobDefinitionsClient.StartJob. -type JobDefinitionsClientStartJobResponse struct { - JobRunResourceID -} - -// JobDefinitionsClientStopJobResponse contains the response from method JobDefinitionsClient.StopJob. -type JobDefinitionsClientStopJobResponse struct { - JobRunResourceID -} - -// JobDefinitionsClientUpdateResponse contains the response from method JobDefinitionsClient.Update. -type JobDefinitionsClientUpdateResponse struct { - JobDefinition -} - -// JobRunsClientGetResponse contains the response from method JobRunsClient.Get. -type JobRunsClientGetResponse struct { - JobRun -} - -// JobRunsClientListResponse contains the response from method JobRunsClient.NewListPager. -type JobRunsClientListResponse struct { - JobRunList -} - -// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. -type OperationsClientListResponse struct { - OperationListResult -} - -// ProjectsClientCreateOrUpdateResponse contains the response from method ProjectsClient.CreateOrUpdate. -type ProjectsClientCreateOrUpdateResponse struct { - Project -} - -// ProjectsClientDeleteResponse contains the response from method ProjectsClient.BeginDelete. -type ProjectsClientDeleteResponse struct { - // placeholder for future response values -} - -// ProjectsClientGetResponse contains the response from method ProjectsClient.Get. -type ProjectsClientGetResponse struct { - Project -} - -// ProjectsClientListResponse contains the response from method ProjectsClient.NewListPager. -type ProjectsClientListResponse struct { - ProjectList -} - -// ProjectsClientUpdateResponse contains the response from method ProjectsClient.Update. -type ProjectsClientUpdateResponse struct { - Project -} - -// StorageMoversClientCreateOrUpdateResponse contains the response from method StorageMoversClient.CreateOrUpdate. -type StorageMoversClientCreateOrUpdateResponse struct { - StorageMover -} - -// StorageMoversClientDeleteResponse contains the response from method StorageMoversClient.BeginDelete. -type StorageMoversClientDeleteResponse struct { - // placeholder for future response values -} - -// StorageMoversClientGetResponse contains the response from method StorageMoversClient.Get. -type StorageMoversClientGetResponse struct { - StorageMover -} - -// StorageMoversClientListBySubscriptionResponse contains the response from method StorageMoversClient.NewListBySubscriptionPager. -type StorageMoversClientListBySubscriptionResponse struct { - List -} - -// StorageMoversClientListResponse contains the response from method StorageMoversClient.NewListPager. -type StorageMoversClientListResponse struct { - List -} - -// StorageMoversClientUpdateResponse contains the response from method StorageMoversClient.Update. -type StorageMoversClientUpdateResponse struct { - StorageMover -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/time_rfc3339.go deleted file mode 100644 index 049fdaa4..00000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/time_rfc3339.go +++ /dev/null @@ -1,87 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armstoragemover - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "regexp" - "strings" - "time" -) - -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) - -type timeRFC3339 time.Time - -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { - tt := time.Time(t) - return tt.MarshalJSON() -} - -func (t timeRFC3339) MarshalText() (text []byte, err error) { - tt := time.Time(t) - return tt.MarshalText() -} - -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON - if tzOffsetRegex.Match(data) { - layout = rfc3339JSON - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout - if tzOffsetRegex.Match(data) { - layout = time.RFC3339Nano - } - return t.Parse(layout, string(data)) -} - -func (t *timeRFC3339) Parse(layout, value string) error { - p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) - return err -} - -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { - if t == nil { - return - } else if azcore.IsNullValue(t) { - m[k] = nil - return - } else if reflect.ValueOf(t).IsNil() { - return - } - m[k] = (*timeRFC3339)(t) -} - -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { - if data == nil || strings.EqualFold(string(data), "null") { - return nil - } - var aux timeRFC3339 - if err := json.Unmarshal(data, &aux); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - *t = (*time.Time)(&aux) - return nil -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/CHANGELOG.md new file mode 100644 index 00000000..fc6fbcd9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/CHANGELOG.md @@ -0,0 +1,96 @@ +# Release History + +## 2.2.0 (2024-06-21) +### Features Added + +- New value `JobRunStatusPausedByBandwidthManagement` added to enum type `JobRunStatus` +- New value `ProvisioningStateCanceled`, `ProvisioningStateDeleting`, `ProvisioningStateFailed` added to enum type `ProvisioningState` +- New enum type `DayOfWeek` with values `DayOfWeekFriday`, `DayOfWeekMonday`, `DayOfWeekSaturday`, `DayOfWeekSunday`, `DayOfWeekThursday`, `DayOfWeekTuesday`, `DayOfWeekWednesday` +- New enum type `Minute` with values `MinuteThirty`, `MinuteZero` +- New struct `Time` +- New struct `UploadLimitSchedule` +- New struct `UploadLimitWeeklyRecurrence` +- New field `TimeZone`, `UploadLimitSchedule` in struct `AgentProperties` +- New field `UploadLimitSchedule` in struct `AgentUpdateProperties` + + +## 2.1.0 (2023-11-24) +### Features Added + +- Support for test fakes and OpenTelemetry trace spans. + + +## 2.0.0 (2023-10-27) +### Breaking Changes + +- Type of `EndpointBaseUpdateParameters.Properties` has been changed from `*EndpointBaseUpdateProperties` to `EndpointBaseUpdatePropertiesClassification` + +### Features Added + +- New value `EndpointTypeAzureStorageSmbFileShare`, `EndpointTypeSmbMount` added to enum type `EndpointType` +- New enum type `CredentialType` with values `CredentialTypeAzureKeyVaultSmb` +- New function `*AzureKeyVaultSmbCredentials.GetCredentials() *Credentials` +- New function `*AzureStorageBlobContainerEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*AzureStorageSmbFileShareEndpointProperties.GetEndpointBaseProperties() *EndpointBaseProperties` +- New function `*AzureStorageSmbFileShareEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*Credentials.GetCredentials() *Credentials` +- New function `*EndpointBaseUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*SmbMountEndpointProperties.GetEndpointBaseProperties() *EndpointBaseProperties` +- New function `*SmbMountEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*NfsMountEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New struct `AzureKeyVaultSmbCredentials` +- New struct `AzureStorageBlobContainerEndpointUpdateProperties` +- New struct `AzureStorageSmbFileShareEndpointProperties` +- New struct `AzureStorageSmbFileShareEndpointUpdateProperties` +- New struct `NfsMountEndpointUpdateProperties` +- New struct `SmbMountEndpointProperties` +- New struct `SmbMountEndpointUpdateProperties` + + +## 2.0.0-beta.1 (2023-07-28) +### Breaking Changes + +- Type of `EndpointBaseUpdateParameters.Properties` has been changed from `*EndpointBaseUpdateProperties` to `EndpointBaseUpdatePropertiesClassification` +### Features Added +- New value `EndpointTypeAzureStorageSmbFileShare`, `EndpointTypeSmbMount` added to enum type `EndpointType` +- New enum type `CredentialType` with values `CredentialTypeAzureKeyVaultSmb` +- New function `*AzureKeyVaultSmbCredentials.GetCredentials() *Credentials` +- New function `*AzureStorageBlobContainerEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*AzureStorageSmbFileShareEndpointProperties.GetEndpointBaseProperties() *EndpointBaseProperties` +- New function `*AzureStorageSmbFileShareEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*Credentials.GetCredentials() *Credentials` +- New function `*EndpointBaseUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*SmbMountEndpointProperties.GetEndpointBaseProperties() *EndpointBaseProperties` +- New function `*SmbMountEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New function `*NfsMountEndpointUpdateProperties.GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties` +- New struct `AzureKeyVaultSmbCredentials` +- New struct `AzureStorageBlobContainerEndpointUpdateProperties` +- New struct `AzureStorageSmbFileShareEndpointProperties` +- New struct `AzureStorageSmbFileShareEndpointUpdateProperties` +- New struct `NfsMountEndpointUpdateProperties` +- New struct `SmbMountEndpointProperties` +- New struct `SmbMountEndpointUpdateProperties` + + +## 1.1.1 (2023-04-14) +### Bug Fixes + +- Fix serialization bug of empty value of `any` type. + + +## 1.1.0 (2023-03-31) +### Features Added + +- New struct `ClientFactory` which is a client factory used to create any client in this module + + +## 1.0.0 (2023-03-07) +### Other Changes + +- Release stable version. + +## 0.1.0 (2023-02-24) + +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/LICENSE.txt similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/LICENSE.txt rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/LICENSE.txt diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/README.md new file mode 100644 index 00000000..c3c39fce --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/README.md @@ -0,0 +1,92 @@ +# Azure Storage Mover Module for Go + +[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2) + +The `armstoragemover` module provides operations for working with Azure Storage Mover. + +[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/storagemover/armstoragemover) + +# Getting started + +## Prerequisites + +- an [Azure subscription](https://azure.microsoft.com/free/) +- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).) + +## Install the package + +This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management. + +Install the Azure Storage Mover module: + +```sh +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2 +``` + +## Authorization + +When creating a client, you will need to provide a credential for authenticating with Azure Storage Mover. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more. + +```go +cred, err := azidentity.NewDefaultAzureCredential(nil) +``` + +For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity). + +## Client Factory + +Azure Storage Mover module consists of one or more clients. We provide a client factory which could be used to create any client in this module. + +```go +clientFactory, err := armstoragemover.NewClientFactory(, cred, nil) +``` + +You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore). + +```go +options := arm.ClientOptions { + ClientOptions: azcore.ClientOptions { + Cloud: cloud.AzureChina, + }, +} +clientFactory, err := armstoragemover.NewClientFactory(, cred, &options) +``` + +## Clients + +A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory. + +```go +client := clientFactory.NewAgentsClient() +``` + +## Fakes + +The fake package contains types used for constructing in-memory fake servers used in unit tests. +This allows writing tests to cover various success/error conditions without the need for connecting to a live service. + +Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes. + +## Provide Feedback + +If you encounter bugs or have suggestions, please +[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Storage Mover` label. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information, see the +[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any +additional questions or comments. \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/agents_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/agents_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/agents_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/agents_client.go index 96c52578..79d35c2d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/agents_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/agents_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armstoragemover @@ -33,7 +32,7 @@ type AgentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewAgentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AgentsClient, error) { - cl, err := arm.NewClient(moduleName+".AgentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,24 +46,31 @@ func NewAgentsClient(subscriptionID string, credential azcore.TokenCredential, o // CreateOrUpdate - Creates or updates an Agent resource, which references a hybrid compute machine that can run jobs. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - agentName - The name of the Agent resource. // - options - AgentsClientCreateOrUpdateOptions contains the optional parameters for the AgentsClient.CreateOrUpdate method. func (client *AgentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, agentName string, agent Agent, options *AgentsClientCreateOrUpdateOptions) (AgentsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "AgentsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, storageMoverName, agentName, agent, options) if err != nil { return AgentsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AgentsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AgentsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AgentsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -91,10 +97,13 @@ func (client *AgentsClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, agent) + if err := runtime.MarshalAsJSON(req, agent); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -109,7 +118,7 @@ func (client *AgentsClient) createOrUpdateHandleResponse(resp *http.Response) (A // BeginDelete - Deletes an Agent resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - agentName - The name of the Agent resource. @@ -120,31 +129,41 @@ func (client *AgentsClient) BeginDelete(ctx context.Context, resourceGroupName s if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AgentsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AgentsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[AgentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AgentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes an Agent resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 func (client *AgentsClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, agentName string, options *AgentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "AgentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, agentName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -171,7 +190,7 @@ func (client *AgentsClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,24 +199,31 @@ func (client *AgentsClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Gets an Agent resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - agentName - The name of the Agent resource. // - options - AgentsClientGetOptions contains the optional parameters for the AgentsClient.Get method. func (client *AgentsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, agentName string, options *AgentsClientGetOptions) (AgentsClientGetResponse, error) { + var err error + const operationName = "AgentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, storageMoverName, agentName, options) if err != nil { return AgentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AgentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AgentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AgentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -224,7 +250,7 @@ func (client *AgentsClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,7 +267,7 @@ func (client *AgentsClient) getHandleResponse(resp *http.Response) (AgentsClient // NewListPager - Lists all Agents in a Storage Mover. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - options - AgentsClientListOptions contains the optional parameters for the AgentsClient.NewListPager method. @@ -251,25 +277,20 @@ func (client *AgentsClient) NewListPager(resourceGroupName string, storageMoverN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *AgentsClientListResponse) (AgentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, storageMoverName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AgentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, storageMoverName, options) + }, nil) if err != nil { return AgentsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return AgentsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AgentsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -293,7 +314,7 @@ func (client *AgentsClient) listCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,24 +332,31 @@ func (client *AgentsClient) listHandleResponse(resp *http.Response) (AgentsClien // Update - Creates or updates an Agent resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - agentName - The name of the Agent resource. // - options - AgentsClientUpdateOptions contains the optional parameters for the AgentsClient.Update method. func (client *AgentsClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, agentName string, agent AgentUpdateParameters, options *AgentsClientUpdateOptions) (AgentsClientUpdateResponse, error) { + var err error + const operationName = "AgentsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, storageMoverName, agentName, agent, options) if err != nil { return AgentsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return AgentsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return AgentsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return AgentsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -355,10 +383,13 @@ func (client *AgentsClient) updateCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, agent) + if err := runtime.MarshalAsJSON(req, agent); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/assets.json new file mode 100644 index 00000000..e016084e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/storagemover/armstoragemover", + "Tag": "go/resourcemanager/storagemover/armstoragemover_5c897731c5" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/autorest.md new file mode 100644 index 00000000..1d20f0d8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/autorest.md @@ -0,0 +1,13 @@ +### AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +azure-arm: true +require: +- https://github.com/Azure/azure-rest-api-specs/blob/4ee6d9fd7687d4b67117c5a167c191a7e7e70b53/specification/storagemover/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/4ee6d9fd7687d4b67117c5a167c191a7e7e70b53/specification/storagemover/resource-manager/readme.go.md +license-header: MICROSOFT_MIT_NO_VERSION +module-version: 2.2.0 +tag: package-2024-07 +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/build.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/build.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/build.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/ci.yml new file mode 100644 index 00000000..396d488f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/ci.yml @@ -0,0 +1,29 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/storagemover/armstoragemover/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemanager/storagemover/armstoragemover/ + +extends: + template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml + parameters: + IncludeRelease: true + ServiceDirectory: 'resourcemanager/storagemover/armstoragemover' + UsePipelineProxy: false diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/client_factory.go new file mode 100644 index 00000000..07285fdc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/client_factory.go @@ -0,0 +1,92 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" +) + +// ClientFactory is a client factory used to create any client in this module. +// Don't use this type directly, use NewClientFactory instead. +type ClientFactory struct { + subscriptionID string + internal *arm.Client +} + +// NewClientFactory creates a new instance of ClientFactory with the specified values. +// The parameter values will be propagated to any client created from this factory. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { + internal, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, + internal: internal, + }, nil +} + +// NewAgentsClient creates a new instance of AgentsClient. +func (c *ClientFactory) NewAgentsClient() *AgentsClient { + return &AgentsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewEndpointsClient creates a new instance of EndpointsClient. +func (c *ClientFactory) NewEndpointsClient() *EndpointsClient { + return &EndpointsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewJobDefinitionsClient creates a new instance of JobDefinitionsClient. +func (c *ClientFactory) NewJobDefinitionsClient() *JobDefinitionsClient { + return &JobDefinitionsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewJobRunsClient creates a new instance of JobRunsClient. +func (c *ClientFactory) NewJobRunsClient() *JobRunsClient { + return &JobRunsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewOperationsClient creates a new instance of OperationsClient. +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + return &OperationsClient{ + internal: c.internal, + } +} + +// NewProjectsClient creates a new instance of ProjectsClient. +func (c *ClientFactory) NewProjectsClient() *ProjectsClient { + return &ProjectsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + +// NewStorageMoversClient creates a new instance of StorageMoversClient. +func (c *ClientFactory) NewStorageMoversClient() *StorageMoversClient { + return &StorageMoversClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/constants.go new file mode 100644 index 00000000..ba666419 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/constants.go @@ -0,0 +1,269 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +const ( + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" + moduleVersion = "v2.2.0" +) + +// ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. +type ActionType string + +const ( + ActionTypeInternal ActionType = "Internal" +) + +// PossibleActionTypeValues returns the possible values for the ActionType const type. +func PossibleActionTypeValues() []ActionType { + return []ActionType{ + ActionTypeInternal, + } +} + +// AgentStatus - The Agent status. +type AgentStatus string + +const ( + AgentStatusExecuting AgentStatus = "Executing" + AgentStatusOffline AgentStatus = "Offline" + AgentStatusOnline AgentStatus = "Online" + AgentStatusRegistering AgentStatus = "Registering" + AgentStatusRequiresAttention AgentStatus = "RequiresAttention" + AgentStatusUnregistering AgentStatus = "Unregistering" +) + +// PossibleAgentStatusValues returns the possible values for the AgentStatus const type. +func PossibleAgentStatusValues() []AgentStatus { + return []AgentStatus{ + AgentStatusExecuting, + AgentStatusOffline, + AgentStatusOnline, + AgentStatusRegistering, + AgentStatusRequiresAttention, + AgentStatusUnregistering, + } +} + +// CopyMode - Strategy to use for copy. +type CopyMode string + +const ( + CopyModeAdditive CopyMode = "Additive" + CopyModeMirror CopyMode = "Mirror" +) + +// PossibleCopyModeValues returns the possible values for the CopyMode const type. +func PossibleCopyModeValues() []CopyMode { + return []CopyMode{ + CopyModeAdditive, + CopyModeMirror, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// CredentialType - The Credentials type. +type CredentialType string + +const ( + CredentialTypeAzureKeyVaultSmb CredentialType = "AzureKeyVaultSmb" +) + +// PossibleCredentialTypeValues returns the possible values for the CredentialType const type. +func PossibleCredentialTypeValues() []CredentialType { + return []CredentialType{ + CredentialTypeAzureKeyVaultSmb, + } +} + +// DayOfWeek - The day of week. +type DayOfWeek string + +const ( + DayOfWeekFriday DayOfWeek = "Friday" + DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" + DayOfWeekTuesday DayOfWeek = "Tuesday" + DayOfWeekWednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{ + DayOfWeekFriday, + DayOfWeekMonday, + DayOfWeekSaturday, + DayOfWeekSunday, + DayOfWeekThursday, + DayOfWeekTuesday, + DayOfWeekWednesday, + } +} + +// EndpointType - The Endpoint resource type. +type EndpointType string + +const ( + EndpointTypeAzureStorageBlobContainer EndpointType = "AzureStorageBlobContainer" + EndpointTypeAzureStorageSmbFileShare EndpointType = "AzureStorageSmbFileShare" + EndpointTypeNfsMount EndpointType = "NfsMount" + EndpointTypeSmbMount EndpointType = "SmbMount" +) + +// PossibleEndpointTypeValues returns the possible values for the EndpointType const type. +func PossibleEndpointTypeValues() []EndpointType { + return []EndpointType{ + EndpointTypeAzureStorageBlobContainer, + EndpointTypeAzureStorageSmbFileShare, + EndpointTypeNfsMount, + EndpointTypeSmbMount, + } +} + +// JobRunScanStatus - The status of Agent's scanning of source. +type JobRunScanStatus string + +const ( + JobRunScanStatusCompleted JobRunScanStatus = "Completed" + JobRunScanStatusNotStarted JobRunScanStatus = "NotStarted" + JobRunScanStatusScanning JobRunScanStatus = "Scanning" +) + +// PossibleJobRunScanStatusValues returns the possible values for the JobRunScanStatus const type. +func PossibleJobRunScanStatusValues() []JobRunScanStatus { + return []JobRunScanStatus{ + JobRunScanStatusCompleted, + JobRunScanStatusNotStarted, + JobRunScanStatusScanning, + } +} + +// JobRunStatus - The current status of the Job Run in a non-terminal state, if exists. +type JobRunStatus string + +const ( + JobRunStatusCancelRequested JobRunStatus = "CancelRequested" + JobRunStatusCanceled JobRunStatus = "Canceled" + JobRunStatusCanceling JobRunStatus = "Canceling" + JobRunStatusFailed JobRunStatus = "Failed" + JobRunStatusPausedByBandwidthManagement JobRunStatus = "PausedByBandwidthManagement" + JobRunStatusQueued JobRunStatus = "Queued" + JobRunStatusRunning JobRunStatus = "Running" + JobRunStatusStarted JobRunStatus = "Started" + JobRunStatusSucceeded JobRunStatus = "Succeeded" +) + +// PossibleJobRunStatusValues returns the possible values for the JobRunStatus const type. +func PossibleJobRunStatusValues() []JobRunStatus { + return []JobRunStatus{ + JobRunStatusCancelRequested, + JobRunStatusCanceled, + JobRunStatusCanceling, + JobRunStatusFailed, + JobRunStatusPausedByBandwidthManagement, + JobRunStatusQueued, + JobRunStatusRunning, + JobRunStatusStarted, + JobRunStatusSucceeded, + } +} + +// Minute - The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. +type Minute int32 + +const ( + MinuteThirty Minute = 30 + MinuteZero Minute = 0 +) + +// PossibleMinuteValues returns the possible values for the Minute const type. +func PossibleMinuteValues() []Minute { + return []Minute{ + MinuteThirty, + MinuteZero, + } +} + +// NfsVersion - The NFS protocol version. +type NfsVersion string + +const ( + NfsVersionNFSauto NfsVersion = "NFSauto" + NfsVersionNFSv3 NfsVersion = "NFSv3" + NfsVersionNFSv4 NfsVersion = "NFSv4" +) + +// PossibleNfsVersionValues returns the possible values for the NfsVersion const type. +func PossibleNfsVersionValues() []NfsVersion { + return []NfsVersion{ + NfsVersionNFSauto, + NfsVersionNFSv3, + NfsVersionNFSv4, + } +} + +// Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default +// value is "user,system" +type Origin string + +const ( + OriginSystem Origin = "system" + OriginUser Origin = "user" + OriginUserSystem Origin = "user,system" +) + +// PossibleOriginValues returns the possible values for the Origin const type. +func PossibleOriginValues() []Origin { + return []Origin{ + OriginSystem, + OriginUser, + OriginUserSystem, + } +} + +// ProvisioningState - The provisioning state of a resource. +type ProvisioningState string + +const ( + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" +) + +// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ + ProvisioningStateCanceled, + ProvisioningStateDeleting, + ProvisioningStateFailed, + ProvisioningStateSucceeded, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/endpoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/endpoints_client.go new file mode 100644 index 00000000..6558280a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/endpoints_client.go @@ -0,0 +1,403 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// EndpointsClient contains the methods for the Endpoints group. +// Don't use this type directly, use NewEndpointsClient() instead. +type EndpointsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewEndpointsClient creates a new instance of EndpointsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &EndpointsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates an Endpoint resource, which represents a data transfer source or destination. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-07-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - storageMoverName - The name of the Storage Mover resource. +// - endpointName - The name of the Endpoint resource. +// - options - EndpointsClientCreateOrUpdateOptions contains the optional parameters for the EndpointsClient.CreateOrUpdate +// method. +func (client *EndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, endpoint Endpoint, options *EndpointsClientCreateOrUpdateOptions) (EndpointsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "EndpointsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, storageMoverName, endpointName, endpoint, options) + if err != nil { + return EndpointsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EndpointsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EndpointsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *EndpointsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, endpoint Endpoint, options *EndpointsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if storageMoverName == "" { + return nil, errors.New("parameter storageMoverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageMoverName}", url.PathEscape(storageMoverName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-07-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, endpoint); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *EndpointsClient) createOrUpdateHandleResponse(resp *http.Response) (EndpointsClientCreateOrUpdateResponse, error) { + result := EndpointsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Endpoint); err != nil { + return EndpointsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// BeginDelete - Deletes an Endpoint resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-07-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - storageMoverName - The name of the Storage Mover resource. +// - endpointName - The name of the Endpoint resource. +// - options - EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method. +func (client *EndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*runtime.Poller[EndpointsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, storageMoverName, endpointName, options) + if err != nil { + return nil, err + } + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EndpointsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), + }) + return poller, err + } else { + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EndpointsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + } +} + +// Delete - Deletes an Endpoint resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-07-01 +func (client *EndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "EndpointsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, endpointName, options) + if err != nil { + return nil, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err + } + return httpResp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *EndpointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if storageMoverName == "" { + return nil, errors.New("parameter storageMoverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageMoverName}", url.PathEscape(storageMoverName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-07-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets an Endpoint resource. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-07-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - storageMoverName - The name of the Storage Mover resource. +// - endpointName - The name of the Endpoint resource. +// - options - EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method. +func (client *EndpointsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientGetOptions) (EndpointsClientGetResponse, error) { + var err error + const operationName = "EndpointsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.getCreateRequest(ctx, resourceGroupName, storageMoverName, endpointName, options) + if err != nil { + return EndpointsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EndpointsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EndpointsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *EndpointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, options *EndpointsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if storageMoverName == "" { + return nil, errors.New("parameter storageMoverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageMoverName}", url.PathEscape(storageMoverName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-07-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *EndpointsClient) getHandleResponse(resp *http.Response) (EndpointsClientGetResponse, error) { + result := EndpointsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Endpoint); err != nil { + return EndpointsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists all Endpoints in a Storage Mover. +// +// Generated from API version 2024-07-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - storageMoverName - The name of the Storage Mover resource. +// - options - EndpointsClientListOptions contains the optional parameters for the EndpointsClient.NewListPager method. +func (client *EndpointsClient) NewListPager(resourceGroupName string, storageMoverName string, options *EndpointsClientListOptions) *runtime.Pager[EndpointsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[EndpointsClientListResponse]{ + More: func(page EndpointsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *EndpointsClientListResponse) (EndpointsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EndpointsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, storageMoverName, options) + }, nil) + if err != nil { + return EndpointsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *EndpointsClient) listCreateRequest(ctx context.Context, resourceGroupName string, storageMoverName string, options *EndpointsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if storageMoverName == "" { + return nil, errors.New("parameter storageMoverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageMoverName}", url.PathEscape(storageMoverName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-07-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *EndpointsClient) listHandleResponse(resp *http.Response) (EndpointsClientListResponse, error) { + result := EndpointsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EndpointList); err != nil { + return EndpointsClientListResponse{}, err + } + return result, nil +} + +// Update - Updates properties for an Endpoint resource. Properties not specified in the request body will be unchanged. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2024-07-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - storageMoverName - The name of the Storage Mover resource. +// - endpointName - The name of the Endpoint resource. +// - options - EndpointsClientUpdateOptions contains the optional parameters for the EndpointsClient.Update method. +func (client *EndpointsClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, endpoint EndpointBaseUpdateParameters, options *EndpointsClientUpdateOptions) (EndpointsClientUpdateResponse, error) { + var err error + const operationName = "EndpointsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() + req, err := client.updateCreateRequest(ctx, resourceGroupName, storageMoverName, endpointName, endpoint, options) + if err != nil { + return EndpointsClientUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return EndpointsClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EndpointsClientUpdateResponse{}, err + } + resp, err := client.updateHandleResponse(httpResp) + return resp, err +} + +// updateCreateRequest creates the Update request. +func (client *EndpointsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, storageMoverName string, endpointName string, endpoint EndpointBaseUpdateParameters, options *EndpointsClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if storageMoverName == "" { + return nil, errors.New("parameter storageMoverName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{storageMoverName}", url.PathEscape(storageMoverName)) + if endpointName == "" { + return nil, errors.New("parameter endpointName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{endpointName}", url.PathEscape(endpointName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-07-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, endpoint); err != nil { + return nil, err + } + return req, nil +} + +// updateHandleResponse handles the Update response. +func (client *EndpointsClient) updateHandleResponse(resp *http.Response) (EndpointsClientUpdateResponse, error) { + result := EndpointsClientUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Endpoint); err != nil { + return EndpointsClientUpdateResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/interfaces.go new file mode 100644 index 00000000..5ca6b809 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/interfaces.go @@ -0,0 +1,38 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +// CredentialsClassification provides polymorphic access to related types. +// Call the interface's GetCredentials() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureKeyVaultSmbCredentials, *Credentials +type CredentialsClassification interface { + // GetCredentials returns the Credentials content of the underlying type. + GetCredentials() *Credentials +} + +// EndpointBasePropertiesClassification provides polymorphic access to related types. +// Call the interface's GetEndpointBaseProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureStorageBlobContainerEndpointProperties, *AzureStorageSmbFileShareEndpointProperties, *EndpointBaseProperties, *NfsMountEndpointProperties, +// - *SmbMountEndpointProperties +type EndpointBasePropertiesClassification interface { + // GetEndpointBaseProperties returns the EndpointBaseProperties content of the underlying type. + GetEndpointBaseProperties() *EndpointBaseProperties +} + +// EndpointBaseUpdatePropertiesClassification provides polymorphic access to related types. +// Call the interface's GetEndpointBaseUpdateProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureStorageBlobContainerEndpointUpdateProperties, *AzureStorageSmbFileShareEndpointUpdateProperties, *EndpointBaseUpdateProperties, +// - *NfsMountEndpointUpdateProperties, *SmbMountEndpointUpdateProperties +type EndpointBaseUpdatePropertiesClassification interface { + // GetEndpointBaseUpdateProperties returns the EndpointBaseUpdateProperties content of the underlying type. + GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/jobdefinitions_client.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/jobdefinitions_client.go index 4dde3e76..0bd43d28 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/jobdefinitions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/jobdefinitions_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armstoragemover @@ -33,7 +32,7 @@ type JobDefinitionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewJobDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobDefinitionsClient, error) { - cl, err := arm.NewClient(moduleName+".JobDefinitionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +47,7 @@ func NewJobDefinitionsClient(subscriptionID string, credential azcore.TokenCrede // data transfer. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. @@ -56,18 +55,25 @@ func NewJobDefinitionsClient(subscriptionID string, credential azcore.TokenCrede // - options - JobDefinitionsClientCreateOrUpdateOptions contains the optional parameters for the JobDefinitionsClient.CreateOrUpdate // method. func (client *JobDefinitionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, jobDefinition JobDefinition, options *JobDefinitionsClientCreateOrUpdateOptions) (JobDefinitionsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "JobDefinitionsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobDefinition, options) if err != nil { return JobDefinitionsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobDefinitionsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobDefinitionsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobDefinitionsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -98,10 +104,13 @@ func (client *JobDefinitionsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, jobDefinition) + if err := runtime.MarshalAsJSON(req, jobDefinition); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -116,7 +125,7 @@ func (client *JobDefinitionsClient) createOrUpdateHandleResponse(resp *http.Resp // BeginDelete - Deletes a Job Definition resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. @@ -129,31 +138,41 @@ func (client *JobDefinitionsClient) BeginDelete(ctx context.Context, resourceGro if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobDefinitionsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JobDefinitionsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[JobDefinitionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JobDefinitionsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes a Job Definition resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 func (client *JobDefinitionsClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, options *JobDefinitionsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "JobDefinitionsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -184,7 +203,7 @@ func (client *JobDefinitionsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,25 +212,32 @@ func (client *JobDefinitionsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets a Job Definition resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. // - jobDefinitionName - The name of the Job Definition resource. // - options - JobDefinitionsClientGetOptions contains the optional parameters for the JobDefinitionsClient.Get method. func (client *JobDefinitionsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, options *JobDefinitionsClientGetOptions) (JobDefinitionsClientGetResponse, error) { + var err error + const operationName = "JobDefinitionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) if err != nil { return JobDefinitionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobDefinitionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobDefinitionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobDefinitionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -242,7 +268,7 @@ func (client *JobDefinitionsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,7 +285,7 @@ func (client *JobDefinitionsClient) getHandleResponse(resp *http.Response) (JobD // NewListPager - Lists all Job Definitions in a Project. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. @@ -270,25 +296,20 @@ func (client *JobDefinitionsClient) NewListPager(resourceGroupName string, stora return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *JobDefinitionsClientListResponse) (JobDefinitionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobDefinitionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, options) + }, nil) if err != nil { return JobDefinitionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return JobDefinitionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobDefinitionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -316,7 +337,7 @@ func (client *JobDefinitionsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -331,28 +352,35 @@ func (client *JobDefinitionsClient) listHandleResponse(resp *http.Response) (Job return result, nil } -// StartJob - Requests an Agent to start a new instance of this Job Definition, generating a new Job Run resource. +// StartJob - Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. // - jobDefinitionName - The name of the Job Definition resource. // - options - JobDefinitionsClientStartJobOptions contains the optional parameters for the JobDefinitionsClient.StartJob method. func (client *JobDefinitionsClient) StartJob(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, options *JobDefinitionsClientStartJobOptions) (JobDefinitionsClientStartJobResponse, error) { + var err error + const operationName = "JobDefinitionsClient.StartJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startJobCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) if err != nil { return JobDefinitionsClientStartJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobDefinitionsClientStartJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobDefinitionsClientStartJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobDefinitionsClientStartJobResponse{}, err } - return client.startJobHandleResponse(resp) + resp, err := client.startJobHandleResponse(httpResp) + return resp, err } // startJobCreateRequest creates the StartJob request. @@ -383,7 +411,7 @@ func (client *JobDefinitionsClient) startJobCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -401,25 +429,32 @@ func (client *JobDefinitionsClient) startJobHandleResponse(resp *http.Response) // StopJob - Requests the Agent of any active instance of this Job Definition to stop. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. // - jobDefinitionName - The name of the Job Definition resource. // - options - JobDefinitionsClientStopJobOptions contains the optional parameters for the JobDefinitionsClient.StopJob method. func (client *JobDefinitionsClient) StopJob(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, options *JobDefinitionsClientStopJobOptions) (JobDefinitionsClientStopJobResponse, error) { + var err error + const operationName = "JobDefinitionsClient.StopJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopJobCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) if err != nil { return JobDefinitionsClientStopJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobDefinitionsClientStopJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobDefinitionsClientStopJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobDefinitionsClientStopJobResponse{}, err } - return client.stopJobHandleResponse(resp) + resp, err := client.stopJobHandleResponse(httpResp) + return resp, err } // stopJobCreateRequest creates the StopJob request. @@ -450,7 +485,7 @@ func (client *JobDefinitionsClient) stopJobCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -468,25 +503,32 @@ func (client *JobDefinitionsClient) stopJobHandleResponse(resp *http.Response) ( // Update - Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. // - jobDefinitionName - The name of the Job Definition resource. // - options - JobDefinitionsClientUpdateOptions contains the optional parameters for the JobDefinitionsClient.Update method. func (client *JobDefinitionsClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, jobDefinition JobDefinitionUpdateParameters, options *JobDefinitionsClientUpdateOptions) (JobDefinitionsClientUpdateResponse, error) { + var err error + const operationName = "JobDefinitionsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobDefinition, options) if err != nil { return JobDefinitionsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobDefinitionsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobDefinitionsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobDefinitionsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -517,10 +559,13 @@ func (client *JobDefinitionsClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, jobDefinition) + if err := runtime.MarshalAsJSON(req, jobDefinition); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/jobruns_client.go similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/jobruns_client.go index af7eb409..bd4fa0e9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/jobruns_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/jobruns_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armstoragemover @@ -33,7 +32,7 @@ type JobRunsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewJobRunsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobRunsClient, error) { - cl, err := arm.NewClient(moduleName+".JobRunsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewJobRunsClient(subscriptionID string, credential azcore.TokenCredential, // Get - Gets a Job Run resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. @@ -55,18 +54,25 @@ func NewJobRunsClient(subscriptionID string, credential azcore.TokenCredential, // - jobRunName - The name of the Job Run resource. // - options - JobRunsClientGetOptions contains the optional parameters for the JobRunsClient.Get method. func (client *JobRunsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, jobRunName string, options *JobRunsClientGetOptions) (JobRunsClientGetResponse, error) { + var err error + const operationName = "JobRunsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobRunName, options) if err != nil { return JobRunsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return JobRunsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobRunsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return JobRunsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -101,7 +107,7 @@ func (client *JobRunsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +124,7 @@ func (client *JobRunsClient) getHandleResponse(resp *http.Response) (JobRunsClie // NewListPager - Lists all Job Runs in a Job Definition. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. @@ -130,25 +136,20 @@ func (client *JobRunsClient) NewListPager(resourceGroupName string, storageMover return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *JobRunsClientListResponse) (JobRunsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JobRunsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, jobDefinitionName, options) + }, nil) if err != nil { return JobRunsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return JobRunsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return JobRunsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -180,7 +181,7 @@ func (client *JobRunsClient) listCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/models.go new file mode 100644 index 00000000..4d23654f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/models.go @@ -0,0 +1,818 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +import "time" + +// Agent - The Agent resource. +type Agent struct { + // REQUIRED + Properties *AgentProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// AgentList - List of Agents. +type AgentList struct { + // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers + // exceed maximum page size. + NextLink *string + + // READ-ONLY + Value []*Agent +} + +type AgentProperties struct { + // REQUIRED; The fully qualified resource ID of the Hybrid Compute resource for the Agent. + ArcResourceID *string + + // REQUIRED; The VM UUID of the Hybrid Compute resource for the Agent. + ArcVMUUID *string + + // A description for the Agent. + Description *string + + // The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) + // are affected. Control plane operations ensure seamless migration + // functionality and are not limited by this schedule. The schedule is interpreted with the agent's local time. + UploadLimitSchedule *UploadLimitSchedule + + // READ-ONLY; The Agent status. + AgentStatus *AgentStatus + + // READ-ONLY; The Agent version. + AgentVersion *string + + // READ-ONLY + ErrorDetails *AgentPropertiesErrorDetails + + // READ-ONLY; The last updated time of the Agent status. + LastStatusUpdate *time.Time + + // READ-ONLY; Local IP address reported by the Agent. + LocalIPAddress *string + + // READ-ONLY; Available memory reported by the Agent, in MB. + MemoryInMB *int64 + + // READ-ONLY; Available compute cores reported by the Agent. + NumberOfCores *int64 + + // READ-ONLY; The provisioning state of this resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The agent's local time zone represented in Windows format. + TimeZone *string + + // READ-ONLY; Uptime of the Agent in seconds. + UptimeInSeconds *int64 +} + +type AgentPropertiesErrorDetails struct { + // Error code reported by Agent + Code *string + + // Expanded description of reported error code + Message *string +} + +// AgentUpdateParameters - The Agent resource. +type AgentUpdateParameters struct { + Properties *AgentUpdateProperties +} + +type AgentUpdateProperties struct { + // A description for the Agent. + Description *string + + // The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) + // are affected. Control plane operations ensure seamless migration + // functionality and are not limited by this schedule. The schedule is interpreted with the agent's local time. + UploadLimitSchedule *UploadLimitSchedule +} + +// AzureKeyVaultSmbCredentials - The Azure Key Vault secret URIs which store the credentials. +type AzureKeyVaultSmbCredentials struct { + // REQUIRED; The Credentials type. + Type *CredentialType + + // The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. + PasswordURI *string + + // The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. + UsernameURI *string +} + +// GetCredentials implements the CredentialsClassification interface for type AzureKeyVaultSmbCredentials. +func (a *AzureKeyVaultSmbCredentials) GetCredentials() *Credentials { + return &Credentials{ + Type: a.Type, + } +} + +// AzureStorageBlobContainerEndpointProperties - The properties of Azure Storage blob container endpoint. +type AzureStorageBlobContainerEndpointProperties struct { + // REQUIRED; The name of the Storage blob container that is the target destination. + BlobContainerName *string + + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // REQUIRED; The Azure Resource ID of the storage account that is the target destination. + StorageAccountResourceID *string + + // A description for the Endpoint. + Description *string + + // READ-ONLY; The provisioning state of this resource. + ProvisioningState *ProvisioningState +} + +// GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type AzureStorageBlobContainerEndpointProperties. +func (a *AzureStorageBlobContainerEndpointProperties) GetEndpointBaseProperties() *EndpointBaseProperties { + return &EndpointBaseProperties{ + Description: a.Description, + EndpointType: a.EndpointType, + ProvisioningState: a.ProvisioningState, + } +} + +type AzureStorageBlobContainerEndpointUpdateProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // A description for the Endpoint. + Description *string +} + +// GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type AzureStorageBlobContainerEndpointUpdateProperties. +func (a *AzureStorageBlobContainerEndpointUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties { + return &EndpointBaseUpdateProperties{ + Description: a.Description, + EndpointType: a.EndpointType, + } +} + +// AzureStorageSmbFileShareEndpointProperties - The properties of Azure Storage SMB file share endpoint. +type AzureStorageSmbFileShareEndpointProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // REQUIRED; The name of the Azure Storage file share. + FileShareName *string + + // REQUIRED; The Azure Resource ID of the storage account. + StorageAccountResourceID *string + + // A description for the Endpoint. + Description *string + + // READ-ONLY; The provisioning state of this resource. + ProvisioningState *ProvisioningState +} + +// GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type AzureStorageSmbFileShareEndpointProperties. +func (a *AzureStorageSmbFileShareEndpointProperties) GetEndpointBaseProperties() *EndpointBaseProperties { + return &EndpointBaseProperties{ + Description: a.Description, + EndpointType: a.EndpointType, + ProvisioningState: a.ProvisioningState, + } +} + +// AzureStorageSmbFileShareEndpointUpdateProperties - The properties of Azure Storage SMB file share endpoint to update. +type AzureStorageSmbFileShareEndpointUpdateProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // A description for the Endpoint. + Description *string +} + +// GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type AzureStorageSmbFileShareEndpointUpdateProperties. +func (a *AzureStorageSmbFileShareEndpointUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties { + return &EndpointBaseUpdateProperties{ + Description: a.Description, + EndpointType: a.EndpointType, + } +} + +// Credentials - The Credentials. +type Credentials struct { + // REQUIRED; The Credentials type. + Type *CredentialType +} + +// GetCredentials implements the CredentialsClassification interface for type Credentials. +func (c *Credentials) GetCredentials() *Credentials { return c } + +// Endpoint - The Endpoint resource, which contains information about file sources and targets. +type Endpoint struct { + // REQUIRED; The resource specific properties for the Storage Mover resource. + Properties EndpointBasePropertiesClassification + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// EndpointBaseProperties - The resource specific properties for the Storage Mover resource. +type EndpointBaseProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // A description for the Endpoint. + Description *string + + // READ-ONLY; The provisioning state of this resource. + ProvisioningState *ProvisioningState +} + +// GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type EndpointBaseProperties. +func (e *EndpointBaseProperties) GetEndpointBaseProperties() *EndpointBaseProperties { return e } + +// EndpointBaseUpdateParameters - The Endpoint resource. +type EndpointBaseUpdateParameters struct { + // The Endpoint resource, which contains information about file sources and targets. + Properties EndpointBaseUpdatePropertiesClassification +} + +// EndpointBaseUpdateProperties - The Endpoint resource, which contains information about file sources and targets. +type EndpointBaseUpdateProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // A description for the Endpoint. + Description *string +} + +// GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type EndpointBaseUpdateProperties. +func (e *EndpointBaseUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties { + return e +} + +// EndpointList - List of Endpoints. +type EndpointList struct { + // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers + // exceed maximum page size. + NextLink *string + + // READ-ONLY + Value []*Endpoint +} + +// JobDefinition - The Job Definition resource. +type JobDefinition struct { + // REQUIRED; Job definition properties. + Properties *JobDefinitionProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// JobDefinitionList - List of Job Definitions. +type JobDefinitionList struct { + // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers + // exceed maximum page size. + NextLink *string + + // READ-ONLY + Value []*JobDefinition +} + +// JobDefinitionProperties - Job definition properties. +type JobDefinitionProperties struct { + // REQUIRED; Strategy to use for copy. + CopyMode *CopyMode + + // REQUIRED; The name of the source Endpoint. + SourceName *string + + // REQUIRED; The name of the target Endpoint. + TargetName *string + + // Name of the Agent to assign for new Job Runs of this Job Definition. + AgentName *string + + // A description for the Job Definition. + Description *string + + // The subpath to use when reading from the source Endpoint. + SourceSubpath *string + + // The subpath to use when writing to the target Endpoint. + TargetSubpath *string + + // READ-ONLY; Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. + AgentResourceID *string + + // READ-ONLY; The name of the Job Run in a non-terminal state, if exists. + LatestJobRunName *string + + // READ-ONLY; The fully qualified resource ID of the Job Run in a non-terminal state, if exists. + LatestJobRunResourceID *string + + // READ-ONLY; The current status of the Job Run in a non-terminal state, if exists. + LatestJobRunStatus *JobRunStatus + + // READ-ONLY; The provisioning state of this resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; Fully qualified resource ID of the source Endpoint. + SourceResourceID *string + + // READ-ONLY; Fully qualified resource ID of the target Endpoint. + TargetResourceID *string +} + +// JobDefinitionUpdateParameters - The Job Definition resource. +type JobDefinitionUpdateParameters struct { + // Job definition properties. + Properties *JobDefinitionUpdateProperties +} + +// JobDefinitionUpdateProperties - Job definition properties. +type JobDefinitionUpdateProperties struct { + // Name of the Agent to assign for new Job Runs of this Job Definition. + AgentName *string + + // Strategy to use for copy. + CopyMode *CopyMode + + // A description for the Job Definition. + Description *string +} + +// JobRun - The Job Run resource. +type JobRun struct { + // Job run properties. + Properties *JobRunProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// JobRunError - Error type +type JobRunError struct { + // Error code of the given entry. + Code *string + + // Error message of the given entry. + Message *string + + // Target of the given error entry. + Target *string +} + +// JobRunList - List of Job Runs. +type JobRunList struct { + // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers + // exceed maximum page size. + NextLink *string + + // READ-ONLY + Value []*JobRun +} + +// JobRunProperties - Job run properties. +type JobRunProperties struct { + // READ-ONLY; Name of the Agent assigned to this run. + AgentName *string + + // READ-ONLY; Fully qualified resource id of the Agent assigned to this run. + AgentResourceID *string + + // READ-ONLY; Bytes of data that will not be transferred, as they are excluded by user configuration. + BytesExcluded *int64 + + // READ-ONLY; Bytes of data that were attempted to transfer and failed. + BytesFailed *int64 + + // READ-ONLY; Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode). + BytesNoTransferNeeded *int64 + + // READ-ONLY; Bytes of data scanned so far in source. + BytesScanned *int64 + + // READ-ONLY; Bytes of data successfully transferred to target. + BytesTransferred *int64 + + // READ-ONLY; Bytes of data that will not be transferred, as they are unsupported on target. + BytesUnsupported *int64 + + // READ-ONLY; Error details. + Error *JobRunError + + // READ-ONLY; End time of the run. Null if Agent has not reported that the job has ended. + ExecutionEndTime *time.Time + + // READ-ONLY; Start time of the run. Null if no Agent reported that the job has started. + ExecutionStartTime *time.Time + + // READ-ONLY; Number of items that will not be transferred, as they are excluded by user configuration. + ItemsExcluded *int64 + + // READ-ONLY; Number of items that were attempted to transfer and failed. + ItemsFailed *int64 + + // READ-ONLY; Number of items that will not be transferred, as they are already found on target (e.g. mirror mode). + ItemsNoTransferNeeded *int64 + + // READ-ONLY; Number of items scanned so far in source. + ItemsScanned *int64 + + // READ-ONLY; Number of items successfully transferred to target. + ItemsTransferred *int64 + + // READ-ONLY; Number of items that will not be transferred, as they are unsupported on target. + ItemsUnsupported *int64 + + // READ-ONLY; Copy of parent Job Definition's properties at time of Job Run creation. + JobDefinitionProperties any + + // READ-ONLY; The last updated time of the Job Run. + LastStatusUpdate *time.Time + + // READ-ONLY; The provisioning state of this resource. + ProvisioningState *ProvisioningState + + // READ-ONLY; The status of Agent's scanning of source. + ScanStatus *JobRunScanStatus + + // READ-ONLY; Name of source Endpoint resource. This resource may no longer exist. + SourceName *string + + // READ-ONLY; Copy of source Endpoint resource's properties at time of Job Run creation. + SourceProperties any + + // READ-ONLY; Fully qualified resource id of source Endpoint. This id may no longer exist. + SourceResourceID *string + + // READ-ONLY; The state of the job execution. + Status *JobRunStatus + + // READ-ONLY; Name of target Endpoint resource. This resource may no longer exist. + TargetName *string + + // READ-ONLY; Copy of Endpoint resource's properties at time of Job Run creation. + TargetProperties any + + // READ-ONLY; Fully qualified resource id of of Endpoint. This id may no longer exist. + TargetResourceID *string +} + +// JobRunResourceID - Response that identifies a Job Run. +type JobRunResourceID struct { + // READ-ONLY; Fully qualified resource id of the Job Run. + JobRunResourceID *string +} + +// List of Storage Movers. +type List struct { + // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers + // exceed maximum page size. + NextLink *string + + // READ-ONLY + Value []*StorageMover +} + +// NfsMountEndpointProperties - The properties of NFS share endpoint. +type NfsMountEndpointProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // REQUIRED; The directory being exported from the server. + Export *string + + // REQUIRED; The host name or IP address of the server exporting the file system. + Host *string + + // A description for the Endpoint. + Description *string + + // The NFS protocol version. + NfsVersion *NfsVersion + + // READ-ONLY; The provisioning state of this resource. + ProvisioningState *ProvisioningState +} + +// GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type NfsMountEndpointProperties. +func (n *NfsMountEndpointProperties) GetEndpointBaseProperties() *EndpointBaseProperties { + return &EndpointBaseProperties{ + Description: n.Description, + EndpointType: n.EndpointType, + ProvisioningState: n.ProvisioningState, + } +} + +type NfsMountEndpointUpdateProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // A description for the Endpoint. + Description *string +} + +// GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type NfsMountEndpointUpdateProperties. +func (n *NfsMountEndpointUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties { + return &EndpointBaseUpdateProperties{ + Description: n.Description, + EndpointType: n.EndpointType, + } +} + +// Operation - Details of a REST API operation, returned from the Resource Provider Operations API +type Operation struct { + // Localized display information for this particular operation. + Display *OperationDisplay + + // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + ActionType *ActionType + + // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + // operations. + IsDataAction *bool + + // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + // "Microsoft.Compute/virtualMachines/capture/action" + Name *string + + // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + // value is "user,system" + Origin *Origin +} + +// OperationDisplay - Localized display information for this particular operation. +type OperationDisplay struct { + // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. + Description *string + + // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + // Machine", "Restart Virtual Machine". + Operation *string + + // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + // Compute". + Provider *string + + // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + // Schedule Collections". + Resource *string +} + +// OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to +// get the next set of results. +type OperationListResult struct { + // READ-ONLY; URL to get the next set of operation list results (if there are any). + NextLink *string + + // READ-ONLY; List of operations supported by the resource provider + Value []*Operation +} + +// Project - The Project resource. +type Project struct { + // Project properties. + Properties *ProjectProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// ProjectList - List of Project resources. +type ProjectList struct { + // READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers + // exceed maximum page size. + NextLink *string + + // READ-ONLY + Value []*Project +} + +// ProjectProperties - Project properties. +type ProjectProperties struct { + // A description for the Project. + Description *string + + // READ-ONLY; The provisioning state of this resource. + ProvisioningState *ProvisioningState +} + +// ProjectUpdateParameters - The Project resource. +type ProjectUpdateParameters struct { + // Project properties. + Properties *ProjectUpdateProperties +} + +// ProjectUpdateProperties - Project properties. +type ProjectUpdateProperties struct { + // A description for the Project. + Description *string +} + +// Properties - The resource specific properties for the Storage Mover resource. +type Properties struct { + // A description for the Storage Mover. + Description *string + + // READ-ONLY; The provisioning state of this resource. + ProvisioningState *ProvisioningState +} + +// SmbMountEndpointProperties - The properties of SMB share endpoint. +type SmbMountEndpointProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // REQUIRED; The host name or IP address of the server exporting the file system. + Host *string + + // REQUIRED; The name of the SMB share being exported from the server. + ShareName *string + + // The Azure Key Vault secret URIs which store the required credentials to access the SMB share. + Credentials *AzureKeyVaultSmbCredentials + + // A description for the Endpoint. + Description *string + + // READ-ONLY; The provisioning state of this resource. + ProvisioningState *ProvisioningState +} + +// GetEndpointBaseProperties implements the EndpointBasePropertiesClassification interface for type SmbMountEndpointProperties. +func (s *SmbMountEndpointProperties) GetEndpointBaseProperties() *EndpointBaseProperties { + return &EndpointBaseProperties{ + Description: s.Description, + EndpointType: s.EndpointType, + ProvisioningState: s.ProvisioningState, + } +} + +// SmbMountEndpointUpdateProperties - The properties of SMB share endpoint to update. +type SmbMountEndpointUpdateProperties struct { + // REQUIRED; The Endpoint resource type. + EndpointType *EndpointType + + // The Azure Key Vault secret URIs which store the required credentials to access the SMB share. + Credentials *AzureKeyVaultSmbCredentials + + // A description for the Endpoint. + Description *string +} + +// GetEndpointBaseUpdateProperties implements the EndpointBaseUpdatePropertiesClassification interface for type SmbMountEndpointUpdateProperties. +func (s *SmbMountEndpointUpdateProperties) GetEndpointBaseUpdateProperties() *EndpointBaseUpdateProperties { + return &EndpointBaseUpdateProperties{ + Description: s.Description, + EndpointType: s.EndpointType, + } +} + +// StorageMover - The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. +type StorageMover struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // The resource specific properties for the Storage Mover resource. + Properties *Properties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// SystemData - Metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // The timestamp of resource creation (UTC). + CreatedAt *time.Time + + // The identity that created the resource. + CreatedBy *string + + // The type of identity that created the resource. + CreatedByType *CreatedByType + + // The timestamp of resource last modification (UTC) + LastModifiedAt *time.Time + + // The identity that last modified the resource. + LastModifiedBy *string + + // The type of identity that last modified the resource. + LastModifiedByType *CreatedByType +} + +// Time - The time of day. +type Time struct { + // REQUIRED; The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected + // day). Hour value 24 cannot be combined with any other minute value but 0. + Hour *int32 + + // The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. + Minute *Minute +} + +// UpdateParameters - The Storage Mover resource. +type UpdateParameters struct { + // The resource specific properties for the Storage Mover resource. + Properties *UpdateProperties + + // Resource tags. + Tags map[string]*string +} + +// UpdateProperties - The resource specific properties for the Storage Mover resource. +type UpdateProperties struct { + // A description for the Storage Mover. + Description *string +} + +// UploadLimitSchedule - The WAN-link upload limit schedule. Overlapping recurrences are not allowed. +type UploadLimitSchedule struct { + // The set of weekly repeating recurrences of the WAN-link upload limit schedule. + WeeklyRecurrences []*UploadLimitWeeklyRecurrence +} + +// UploadLimitWeeklyRecurrence - The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier +// in the day than the end time. The recurrence must not span across multiple days. +type UploadLimitWeeklyRecurrence struct { + // REQUIRED; The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. + Days []*DayOfWeek + + // REQUIRED; The end time of the schedule recurrence. Full hour and 30-minute intervals are supported. + EndTime *Time + + // REQUIRED; The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput + // is allowed and any running migration job is effectively paused for the duration of + // this recurrence. Only data plane operations are governed by this limit. Control plane operations ensure seamless functionality. + // The agent may exceed this limit with control messages, if necessary. + LimitInMbps *int32 + + // REQUIRED; The start time of the schedule recurrence. Full hour and 30-minute intervals are supported. + StartTime *Time +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/models_serde.go new file mode 100644 index 00000000..2df961c8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/models_serde.go @@ -0,0 +1,1898 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type Agent. +func (a Agent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "systemData", a.SystemData) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Agent. +func (a *Agent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &a.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentList. +func (a AgentList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentList. +func (a *AgentList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentProperties. +func (a AgentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentStatus", a.AgentStatus) + populate(objectMap, "agentVersion", a.AgentVersion) + populate(objectMap, "arcResourceId", a.ArcResourceID) + populate(objectMap, "arcVmUuid", a.ArcVMUUID) + populate(objectMap, "description", a.Description) + populate(objectMap, "errorDetails", a.ErrorDetails) + populateDateTimeRFC3339(objectMap, "lastStatusUpdate", a.LastStatusUpdate) + populate(objectMap, "localIPAddress", a.LocalIPAddress) + populate(objectMap, "memoryInMB", a.MemoryInMB) + populate(objectMap, "numberOfCores", a.NumberOfCores) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "timeZone", a.TimeZone) + populate(objectMap, "uploadLimitSchedule", a.UploadLimitSchedule) + populate(objectMap, "uptimeInSeconds", a.UptimeInSeconds) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentProperties. +func (a *AgentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentStatus": + err = unpopulate(val, "AgentStatus", &a.AgentStatus) + delete(rawMsg, key) + case "agentVersion": + err = unpopulate(val, "AgentVersion", &a.AgentVersion) + delete(rawMsg, key) + case "arcResourceId": + err = unpopulate(val, "ArcResourceID", &a.ArcResourceID) + delete(rawMsg, key) + case "arcVmUuid": + err = unpopulate(val, "ArcVMUUID", &a.ArcVMUUID) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "errorDetails": + err = unpopulate(val, "ErrorDetails", &a.ErrorDetails) + delete(rawMsg, key) + case "lastStatusUpdate": + err = unpopulateDateTimeRFC3339(val, "LastStatusUpdate", &a.LastStatusUpdate) + delete(rawMsg, key) + case "localIPAddress": + err = unpopulate(val, "LocalIPAddress", &a.LocalIPAddress) + delete(rawMsg, key) + case "memoryInMB": + err = unpopulate(val, "MemoryInMB", &a.MemoryInMB) + delete(rawMsg, key) + case "numberOfCores": + err = unpopulate(val, "NumberOfCores", &a.NumberOfCores) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &a.TimeZone) + delete(rawMsg, key) + case "uploadLimitSchedule": + err = unpopulate(val, "UploadLimitSchedule", &a.UploadLimitSchedule) + delete(rawMsg, key) + case "uptimeInSeconds": + err = unpopulate(val, "UptimeInSeconds", &a.UptimeInSeconds) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentPropertiesErrorDetails. +func (a AgentPropertiesErrorDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", a.Code) + populate(objectMap, "message", a.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPropertiesErrorDetails. +func (a *AgentPropertiesErrorDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &a.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &a.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentUpdateParameters. +func (a AgentUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpdateParameters. +func (a *AgentUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentUpdateProperties. +func (a AgentUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + populate(objectMap, "uploadLimitSchedule", a.UploadLimitSchedule) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpdateProperties. +func (a *AgentUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "uploadLimitSchedule": + err = unpopulate(val, "UploadLimitSchedule", &a.UploadLimitSchedule) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureKeyVaultSmbCredentials. +func (a AzureKeyVaultSmbCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "passwordUri", a.PasswordURI) + objectMap["type"] = CredentialTypeAzureKeyVaultSmb + populate(objectMap, "usernameUri", a.UsernameURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureKeyVaultSmbCredentials. +func (a *AzureKeyVaultSmbCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "passwordUri": + err = unpopulate(val, "PasswordURI", &a.PasswordURI) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + case "usernameUri": + err = unpopulate(val, "UsernameURI", &a.UsernameURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageBlobContainerEndpointProperties. +func (a AzureStorageBlobContainerEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobContainerName", a.BlobContainerName) + populate(objectMap, "description", a.Description) + objectMap["endpointType"] = EndpointTypeAzureStorageBlobContainer + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "storageAccountResourceId", a.StorageAccountResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageBlobContainerEndpointProperties. +func (a *AzureStorageBlobContainerEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blobContainerName": + err = unpopulate(val, "BlobContainerName", &a.BlobContainerName) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &a.EndpointType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "storageAccountResourceId": + err = unpopulate(val, "StorageAccountResourceID", &a.StorageAccountResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageBlobContainerEndpointUpdateProperties. +func (a AzureStorageBlobContainerEndpointUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + objectMap["endpointType"] = EndpointTypeAzureStorageBlobContainer + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageBlobContainerEndpointUpdateProperties. +func (a *AzureStorageBlobContainerEndpointUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &a.EndpointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageSmbFileShareEndpointProperties. +func (a AzureStorageSmbFileShareEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + objectMap["endpointType"] = EndpointTypeAzureStorageSmbFileShare + populate(objectMap, "fileShareName", a.FileShareName) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "storageAccountResourceId", a.StorageAccountResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageSmbFileShareEndpointProperties. +func (a *AzureStorageSmbFileShareEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &a.EndpointType) + delete(rawMsg, key) + case "fileShareName": + err = unpopulate(val, "FileShareName", &a.FileShareName) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "storageAccountResourceId": + err = unpopulate(val, "StorageAccountResourceID", &a.StorageAccountResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureStorageSmbFileShareEndpointUpdateProperties. +func (a AzureStorageSmbFileShareEndpointUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", a.Description) + objectMap["endpointType"] = EndpointTypeAzureStorageSmbFileShare + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureStorageSmbFileShareEndpointUpdateProperties. +func (a *AzureStorageSmbFileShareEndpointUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &a.EndpointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Credentials. +func (c Credentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["type"] = c.Type + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Credentials. +func (c *Credentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Endpoint. +func (e Endpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "systemData", e.SystemData) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Endpoint. +func (e *Endpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + e.Properties, err = unmarshalEndpointBasePropertiesClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &e.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointBaseProperties. +func (e EndpointBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", e.Description) + objectMap["endpointType"] = e.EndpointType + populate(objectMap, "provisioningState", e.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointBaseProperties. +func (e *EndpointBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &e.EndpointType) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointBaseUpdateParameters. +func (e EndpointBaseUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", e.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointBaseUpdateParameters. +func (e *EndpointBaseUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + e.Properties, err = unmarshalEndpointBaseUpdatePropertiesClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointBaseUpdateProperties. +func (e EndpointBaseUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", e.Description) + objectMap["endpointType"] = e.EndpointType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointBaseUpdateProperties. +func (e *EndpointBaseUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &e.EndpointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointList. +func (e EndpointList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointList. +func (e *EndpointList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobDefinition. +func (j JobDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "systemData", j.SystemData) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinition. +func (j *JobDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &j.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobDefinitionList. +func (j JobDefinitionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionList. +func (j *JobDefinitionList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobDefinitionProperties. +func (j JobDefinitionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentName", j.AgentName) + populate(objectMap, "agentResourceId", j.AgentResourceID) + populate(objectMap, "copyMode", j.CopyMode) + populate(objectMap, "description", j.Description) + populate(objectMap, "latestJobRunName", j.LatestJobRunName) + populate(objectMap, "latestJobRunResourceId", j.LatestJobRunResourceID) + populate(objectMap, "latestJobRunStatus", j.LatestJobRunStatus) + populate(objectMap, "provisioningState", j.ProvisioningState) + populate(objectMap, "sourceName", j.SourceName) + populate(objectMap, "sourceResourceId", j.SourceResourceID) + populate(objectMap, "sourceSubpath", j.SourceSubpath) + populate(objectMap, "targetName", j.TargetName) + populate(objectMap, "targetResourceId", j.TargetResourceID) + populate(objectMap, "targetSubpath", j.TargetSubpath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionProperties. +func (j *JobDefinitionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentName": + err = unpopulate(val, "AgentName", &j.AgentName) + delete(rawMsg, key) + case "agentResourceId": + err = unpopulate(val, "AgentResourceID", &j.AgentResourceID) + delete(rawMsg, key) + case "copyMode": + err = unpopulate(val, "CopyMode", &j.CopyMode) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &j.Description) + delete(rawMsg, key) + case "latestJobRunName": + err = unpopulate(val, "LatestJobRunName", &j.LatestJobRunName) + delete(rawMsg, key) + case "latestJobRunResourceId": + err = unpopulate(val, "LatestJobRunResourceID", &j.LatestJobRunResourceID) + delete(rawMsg, key) + case "latestJobRunStatus": + err = unpopulate(val, "LatestJobRunStatus", &j.LatestJobRunStatus) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) + delete(rawMsg, key) + case "sourceName": + err = unpopulate(val, "SourceName", &j.SourceName) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &j.SourceResourceID) + delete(rawMsg, key) + case "sourceSubpath": + err = unpopulate(val, "SourceSubpath", &j.SourceSubpath) + delete(rawMsg, key) + case "targetName": + err = unpopulate(val, "TargetName", &j.TargetName) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &j.TargetResourceID) + delete(rawMsg, key) + case "targetSubpath": + err = unpopulate(val, "TargetSubpath", &j.TargetSubpath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobDefinitionUpdateParameters. +func (j JobDefinitionUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", j.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionUpdateParameters. +func (j *JobDefinitionUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobDefinitionUpdateProperties. +func (j JobDefinitionUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentName", j.AgentName) + populate(objectMap, "copyMode", j.CopyMode) + populate(objectMap, "description", j.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobDefinitionUpdateProperties. +func (j *JobDefinitionUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentName": + err = unpopulate(val, "AgentName", &j.AgentName) + delete(rawMsg, key) + case "copyMode": + err = unpopulate(val, "CopyMode", &j.CopyMode) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &j.Description) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobRun. +func (j JobRun) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "systemData", j.SystemData) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobRun. +func (j *JobRun) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &j.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobRunError. +func (j JobRunError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", j.Code) + populate(objectMap, "message", j.Message) + populate(objectMap, "target", j.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobRunError. +func (j *JobRunError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &j.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &j.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &j.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobRunList. +func (j JobRunList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobRunList. +func (j *JobRunList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobRunProperties. +func (j JobRunProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "agentName", j.AgentName) + populate(objectMap, "agentResourceId", j.AgentResourceID) + populate(objectMap, "bytesExcluded", j.BytesExcluded) + populate(objectMap, "bytesFailed", j.BytesFailed) + populate(objectMap, "bytesNoTransferNeeded", j.BytesNoTransferNeeded) + populate(objectMap, "bytesScanned", j.BytesScanned) + populate(objectMap, "bytesTransferred", j.BytesTransferred) + populate(objectMap, "bytesUnsupported", j.BytesUnsupported) + populate(objectMap, "error", j.Error) + populateDateTimeRFC3339(objectMap, "executionEndTime", j.ExecutionEndTime) + populateDateTimeRFC3339(objectMap, "executionStartTime", j.ExecutionStartTime) + populate(objectMap, "itemsExcluded", j.ItemsExcluded) + populate(objectMap, "itemsFailed", j.ItemsFailed) + populate(objectMap, "itemsNoTransferNeeded", j.ItemsNoTransferNeeded) + populate(objectMap, "itemsScanned", j.ItemsScanned) + populate(objectMap, "itemsTransferred", j.ItemsTransferred) + populate(objectMap, "itemsUnsupported", j.ItemsUnsupported) + populateAny(objectMap, "jobDefinitionProperties", j.JobDefinitionProperties) + populateDateTimeRFC3339(objectMap, "lastStatusUpdate", j.LastStatusUpdate) + populate(objectMap, "provisioningState", j.ProvisioningState) + populate(objectMap, "scanStatus", j.ScanStatus) + populate(objectMap, "sourceName", j.SourceName) + populateAny(objectMap, "sourceProperties", j.SourceProperties) + populate(objectMap, "sourceResourceId", j.SourceResourceID) + populate(objectMap, "status", j.Status) + populate(objectMap, "targetName", j.TargetName) + populateAny(objectMap, "targetProperties", j.TargetProperties) + populate(objectMap, "targetResourceId", j.TargetResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobRunProperties. +func (j *JobRunProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentName": + err = unpopulate(val, "AgentName", &j.AgentName) + delete(rawMsg, key) + case "agentResourceId": + err = unpopulate(val, "AgentResourceID", &j.AgentResourceID) + delete(rawMsg, key) + case "bytesExcluded": + err = unpopulate(val, "BytesExcluded", &j.BytesExcluded) + delete(rawMsg, key) + case "bytesFailed": + err = unpopulate(val, "BytesFailed", &j.BytesFailed) + delete(rawMsg, key) + case "bytesNoTransferNeeded": + err = unpopulate(val, "BytesNoTransferNeeded", &j.BytesNoTransferNeeded) + delete(rawMsg, key) + case "bytesScanned": + err = unpopulate(val, "BytesScanned", &j.BytesScanned) + delete(rawMsg, key) + case "bytesTransferred": + err = unpopulate(val, "BytesTransferred", &j.BytesTransferred) + delete(rawMsg, key) + case "bytesUnsupported": + err = unpopulate(val, "BytesUnsupported", &j.BytesUnsupported) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &j.Error) + delete(rawMsg, key) + case "executionEndTime": + err = unpopulateDateTimeRFC3339(val, "ExecutionEndTime", &j.ExecutionEndTime) + delete(rawMsg, key) + case "executionStartTime": + err = unpopulateDateTimeRFC3339(val, "ExecutionStartTime", &j.ExecutionStartTime) + delete(rawMsg, key) + case "itemsExcluded": + err = unpopulate(val, "ItemsExcluded", &j.ItemsExcluded) + delete(rawMsg, key) + case "itemsFailed": + err = unpopulate(val, "ItemsFailed", &j.ItemsFailed) + delete(rawMsg, key) + case "itemsNoTransferNeeded": + err = unpopulate(val, "ItemsNoTransferNeeded", &j.ItemsNoTransferNeeded) + delete(rawMsg, key) + case "itemsScanned": + err = unpopulate(val, "ItemsScanned", &j.ItemsScanned) + delete(rawMsg, key) + case "itemsTransferred": + err = unpopulate(val, "ItemsTransferred", &j.ItemsTransferred) + delete(rawMsg, key) + case "itemsUnsupported": + err = unpopulate(val, "ItemsUnsupported", &j.ItemsUnsupported) + delete(rawMsg, key) + case "jobDefinitionProperties": + err = unpopulate(val, "JobDefinitionProperties", &j.JobDefinitionProperties) + delete(rawMsg, key) + case "lastStatusUpdate": + err = unpopulateDateTimeRFC3339(val, "LastStatusUpdate", &j.LastStatusUpdate) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) + delete(rawMsg, key) + case "scanStatus": + err = unpopulate(val, "ScanStatus", &j.ScanStatus) + delete(rawMsg, key) + case "sourceName": + err = unpopulate(val, "SourceName", &j.SourceName) + delete(rawMsg, key) + case "sourceProperties": + err = unpopulate(val, "SourceProperties", &j.SourceProperties) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &j.SourceResourceID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &j.Status) + delete(rawMsg, key) + case "targetName": + err = unpopulate(val, "TargetName", &j.TargetName) + delete(rawMsg, key) + case "targetProperties": + err = unpopulate(val, "TargetProperties", &j.TargetProperties) + delete(rawMsg, key) + case "targetResourceId": + err = unpopulate(val, "TargetResourceID", &j.TargetResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobRunResourceID. +func (j JobRunResourceID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobRunResourceId", j.JobRunResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobRunResourceID. +func (j *JobRunResourceID) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobRunResourceId": + err = unpopulate(val, "JobRunResourceID", &j.JobRunResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type List. +func (l List) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type List. +func (l *List) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NfsMountEndpointProperties. +func (n NfsMountEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", n.Description) + objectMap["endpointType"] = EndpointTypeNfsMount + populate(objectMap, "export", n.Export) + populate(objectMap, "host", n.Host) + populate(objectMap, "nfsVersion", n.NfsVersion) + populate(objectMap, "provisioningState", n.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NfsMountEndpointProperties. +func (n *NfsMountEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &n.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &n.EndpointType) + delete(rawMsg, key) + case "export": + err = unpopulate(val, "Export", &n.Export) + delete(rawMsg, key) + case "host": + err = unpopulate(val, "Host", &n.Host) + delete(rawMsg, key) + case "nfsVersion": + err = unpopulate(val, "NfsVersion", &n.NfsVersion) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NfsMountEndpointUpdateProperties. +func (n NfsMountEndpointUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", n.Description) + objectMap["endpointType"] = EndpointTypeNfsMount + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NfsMountEndpointUpdateProperties. +func (n *NfsMountEndpointUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &n.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &n.EndpointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionType", o.ActionType) + populate(objectMap, "display", o.Display) + populate(objectMap, "isDataAction", o.IsDataAction) + populate(objectMap, "name", o.Name) + populate(objectMap, "origin", o.Origin) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &o.ActionType) + delete(rawMsg, key) + case "display": + err = unpopulate(val, "Display", &o.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &o.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "origin": + err = unpopulate(val, "Origin", &o.Origin) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationDisplay. +func (o OperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", o.Description) + populate(objectMap, "operation", o.Operation) + populate(objectMap, "provider", o.Provider) + populate(objectMap, "resource", o.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &o.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &o.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &o.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Project. +func (p Project) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Project. +func (p *Project) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProjectList. +func (p ProjectList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProjectList. +func (p *ProjectList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProjectProperties. +func (p ProjectProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", p.Description) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProjectProperties. +func (p *ProjectProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProjectUpdateParameters. +func (p ProjectUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProjectUpdateParameters. +func (p *ProjectUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProjectUpdateProperties. +func (p ProjectUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", p.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProjectUpdateProperties. +func (p *ProjectUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Properties. +func (p Properties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", p.Description) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Properties. +func (p *Properties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SmbMountEndpointProperties. +func (s SmbMountEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "credentials", s.Credentials) + populate(objectMap, "description", s.Description) + objectMap["endpointType"] = EndpointTypeSmbMount + populate(objectMap, "host", s.Host) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "shareName", s.ShareName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SmbMountEndpointProperties. +func (s *SmbMountEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentials": + err = unpopulate(val, "Credentials", &s.Credentials) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &s.EndpointType) + delete(rawMsg, key) + case "host": + err = unpopulate(val, "Host", &s.Host) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "shareName": + err = unpopulate(val, "ShareName", &s.ShareName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SmbMountEndpointUpdateProperties. +func (s SmbMountEndpointUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "credentials", s.Credentials) + populate(objectMap, "description", s.Description) + objectMap["endpointType"] = EndpointTypeSmbMount + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SmbMountEndpointUpdateProperties. +func (s *SmbMountEndpointUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentials": + err = unpopulate(val, "Credentials", &s.Credentials) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "endpointType": + err = unpopulate(val, "EndpointType", &s.EndpointType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageMover. +func (s StorageMover) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageMover. +func (s *StorageMover) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &s.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Time. +func (t Time) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hour", t.Hour) + populate(objectMap, "minute", t.Minute) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Time. +func (t *Time) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hour": + err = unpopulate(val, "Hour", &t.Hour) + delete(rawMsg, key) + case "minute": + err = unpopulate(val, "Minute", &t.Minute) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateParameters. +func (u UpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "tags", u.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateParameters. +func (u *UpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &u.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateProperties. +func (u UpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", u.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateProperties. +func (u *UpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &u.Description) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UploadLimitSchedule. +func (u UploadLimitSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "weeklyRecurrences", u.WeeklyRecurrences) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UploadLimitSchedule. +func (u *UploadLimitSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "weeklyRecurrences": + err = unpopulate(val, "WeeklyRecurrences", &u.WeeklyRecurrences) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UploadLimitWeeklyRecurrence. +func (u UploadLimitWeeklyRecurrence) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "days", u.Days) + populate(objectMap, "endTime", u.EndTime) + populate(objectMap, "limitInMbps", u.LimitInMbps) + populate(objectMap, "startTime", u.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UploadLimitWeeklyRecurrence. +func (u *UploadLimitWeeklyRecurrence) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "days": + err = unpopulate(val, "Days", &u.Days) + delete(rawMsg, key) + case "endTime": + err = unpopulate(val, "EndTime", &u.EndTime) + delete(rawMsg, key) + case "limitInMbps": + err = unpopulate(val, "LimitInMbps", &u.LimitInMbps) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &u.StartTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +func populate(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func populateAny(m map[string]any, k string, v any) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil || string(data) == "null" { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/operations_client.go new file mode 100644 index 00000000..fbb9adb2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/operations_client.go @@ -0,0 +1,88 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" +) + +// OperationsClient contains the methods for the Operations group. +// Don't use this type directly, use NewOperationsClient() instead. +type OperationsClient struct { + internal *arm.Client +} + +// NewOperationsClient creates a new instance of OperationsClient with the specified values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &OperationsClient{ + internal: cl, + } + return client, nil +} + +// NewListPager - Lists all the supported operations for the Azure Storage Mover REST API. +// +// Generated from API version 2024-07-01 +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) + if err != nil { + return OperationsClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { + urlPath := "/providers/Microsoft.StorageMover/operations" + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2024-07-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { + result := OperationsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { + return OperationsClientListResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/options.go new file mode 100644 index 00000000..f02967e8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/options.go @@ -0,0 +1,171 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +// AgentsClientBeginDeleteOptions contains the optional parameters for the AgentsClient.BeginDelete method. +type AgentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AgentsClientCreateOrUpdateOptions contains the optional parameters for the AgentsClient.CreateOrUpdate method. +type AgentsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AgentsClientGetOptions contains the optional parameters for the AgentsClient.Get method. +type AgentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AgentsClientListOptions contains the optional parameters for the AgentsClient.NewListPager method. +type AgentsClientListOptions struct { + // placeholder for future optional parameters +} + +// AgentsClientUpdateOptions contains the optional parameters for the AgentsClient.Update method. +type AgentsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// EndpointsClientBeginDeleteOptions contains the optional parameters for the EndpointsClient.BeginDelete method. +type EndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EndpointsClientCreateOrUpdateOptions contains the optional parameters for the EndpointsClient.CreateOrUpdate method. +type EndpointsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// EndpointsClientGetOptions contains the optional parameters for the EndpointsClient.Get method. +type EndpointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// EndpointsClientListOptions contains the optional parameters for the EndpointsClient.NewListPager method. +type EndpointsClientListOptions struct { + // placeholder for future optional parameters +} + +// EndpointsClientUpdateOptions contains the optional parameters for the EndpointsClient.Update method. +type EndpointsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// JobDefinitionsClientBeginDeleteOptions contains the optional parameters for the JobDefinitionsClient.BeginDelete method. +type JobDefinitionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobDefinitionsClientCreateOrUpdateOptions contains the optional parameters for the JobDefinitionsClient.CreateOrUpdate +// method. +type JobDefinitionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// JobDefinitionsClientGetOptions contains the optional parameters for the JobDefinitionsClient.Get method. +type JobDefinitionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobDefinitionsClientListOptions contains the optional parameters for the JobDefinitionsClient.NewListPager method. +type JobDefinitionsClientListOptions struct { + // placeholder for future optional parameters +} + +// JobDefinitionsClientStartJobOptions contains the optional parameters for the JobDefinitionsClient.StartJob method. +type JobDefinitionsClientStartJobOptions struct { + // placeholder for future optional parameters +} + +// JobDefinitionsClientStopJobOptions contains the optional parameters for the JobDefinitionsClient.StopJob method. +type JobDefinitionsClientStopJobOptions struct { + // placeholder for future optional parameters +} + +// JobDefinitionsClientUpdateOptions contains the optional parameters for the JobDefinitionsClient.Update method. +type JobDefinitionsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// JobRunsClientGetOptions contains the optional parameters for the JobRunsClient.Get method. +type JobRunsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobRunsClientListOptions contains the optional parameters for the JobRunsClient.NewListPager method. +type JobRunsClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ProjectsClientBeginDeleteOptions contains the optional parameters for the ProjectsClient.BeginDelete method. +type ProjectsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProjectsClientCreateOrUpdateOptions contains the optional parameters for the ProjectsClient.CreateOrUpdate method. +type ProjectsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProjectsClientGetOptions contains the optional parameters for the ProjectsClient.Get method. +type ProjectsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ProjectsClientListOptions contains the optional parameters for the ProjectsClient.NewListPager method. +type ProjectsClientListOptions struct { + // placeholder for future optional parameters +} + +// ProjectsClientUpdateOptions contains the optional parameters for the ProjectsClient.Update method. +type ProjectsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// StorageMoversClientBeginDeleteOptions contains the optional parameters for the StorageMoversClient.BeginDelete method. +type StorageMoversClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StorageMoversClientCreateOrUpdateOptions contains the optional parameters for the StorageMoversClient.CreateOrUpdate method. +type StorageMoversClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// StorageMoversClientGetOptions contains the optional parameters for the StorageMoversClient.Get method. +type StorageMoversClientGetOptions struct { + // placeholder for future optional parameters +} + +// StorageMoversClientListBySubscriptionOptions contains the optional parameters for the StorageMoversClient.NewListBySubscriptionPager +// method. +type StorageMoversClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// StorageMoversClientListOptions contains the optional parameters for the StorageMoversClient.NewListPager method. +type StorageMoversClientListOptions struct { + // placeholder for future optional parameters +} + +// StorageMoversClientUpdateOptions contains the optional parameters for the StorageMoversClient.Update method. +type StorageMoversClientUpdateOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/polymorphic_helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/polymorphic_helpers.go new file mode 100644 index 00000000..1fc8ab15 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/polymorphic_helpers.go @@ -0,0 +1,65 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +import "encoding/json" + +func unmarshalEndpointBasePropertiesClassification(rawMsg json.RawMessage) (EndpointBasePropertiesClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b EndpointBasePropertiesClassification + switch m["endpointType"] { + case string(EndpointTypeAzureStorageBlobContainer): + b = &AzureStorageBlobContainerEndpointProperties{} + case string(EndpointTypeAzureStorageSmbFileShare): + b = &AzureStorageSmbFileShareEndpointProperties{} + case string(EndpointTypeNfsMount): + b = &NfsMountEndpointProperties{} + case string(EndpointTypeSmbMount): + b = &SmbMountEndpointProperties{} + default: + b = &EndpointBaseProperties{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} + +func unmarshalEndpointBaseUpdatePropertiesClassification(rawMsg json.RawMessage) (EndpointBaseUpdatePropertiesClassification, error) { + if rawMsg == nil || string(rawMsg) == "null" { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b EndpointBaseUpdatePropertiesClassification + switch m["endpointType"] { + case string(EndpointTypeAzureStorageBlobContainer): + b = &AzureStorageBlobContainerEndpointUpdateProperties{} + case string(EndpointTypeAzureStorageSmbFileShare): + b = &AzureStorageSmbFileShareEndpointUpdateProperties{} + case string(EndpointTypeNfsMount): + b = &NfsMountEndpointUpdateProperties{} + case string(EndpointTypeSmbMount): + b = &SmbMountEndpointUpdateProperties{} + default: + b = &EndpointBaseUpdateProperties{} + } + if err := json.Unmarshal(rawMsg, b); err != nil { + return nil, err + } + return b, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/projects_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/projects_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/projects_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/projects_client.go index 75732d9b..cae8bb8f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/projects_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/projects_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armstoragemover @@ -33,7 +32,7 @@ type ProjectsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProjectsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProjectsClient, error) { - cl, err := arm.NewClient(moduleName+".ProjectsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,24 +46,31 @@ func NewProjectsClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Creates or updates a Project resource, which is a logical grouping of related jobs. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. // - options - ProjectsClientCreateOrUpdateOptions contains the optional parameters for the ProjectsClient.CreateOrUpdate method. func (client *ProjectsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, project Project, options *ProjectsClientCreateOrUpdateOptions) (ProjectsClientCreateOrUpdateResponse, error) { + var err error + const operationName = "ProjectsClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, project, options) if err != nil { return ProjectsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProjectsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProjectsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProjectsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -91,10 +97,13 @@ func (client *ProjectsClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, project) + if err := runtime.MarshalAsJSON(req, project); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -109,7 +118,7 @@ func (client *ProjectsClient) createOrUpdateHandleResponse(resp *http.Response) // BeginDelete - Deletes a Project resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. @@ -120,31 +129,41 @@ func (client *ProjectsClient) BeginDelete(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProjectsClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ProjectsClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ProjectsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ProjectsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes a Project resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 func (client *ProjectsClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, options *ProjectsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ProjectsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -171,7 +190,7 @@ func (client *ProjectsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,24 +199,31 @@ func (client *ProjectsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets a Project resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. // - options - ProjectsClientGetOptions contains the optional parameters for the ProjectsClient.Get method. func (client *ProjectsClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, options *ProjectsClientGetOptions) (ProjectsClientGetResponse, error) { + var err error + const operationName = "ProjectsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, options) if err != nil { return ProjectsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProjectsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProjectsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProjectsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -224,7 +250,7 @@ func (client *ProjectsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,7 +267,7 @@ func (client *ProjectsClient) getHandleResponse(resp *http.Response) (ProjectsCl // NewListPager - Lists all Projects in a Storage Mover. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - options - ProjectsClientListOptions contains the optional parameters for the ProjectsClient.NewListPager method. @@ -251,25 +277,20 @@ func (client *ProjectsClient) NewListPager(resourceGroupName string, storageMove return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProjectsClientListResponse) (ProjectsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, storageMoverName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProjectsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, storageMoverName, options) + }, nil) if err != nil { return ProjectsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProjectsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProjectsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -293,7 +314,7 @@ func (client *ProjectsClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,24 +332,31 @@ func (client *ProjectsClient) listHandleResponse(resp *http.Response) (ProjectsC // Update - Updates properties for a Project resource. Properties not specified in the request body will be unchanged. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - projectName - The name of the Project resource. // - options - ProjectsClientUpdateOptions contains the optional parameters for the ProjectsClient.Update method. func (client *ProjectsClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, projectName string, project ProjectUpdateParameters, options *ProjectsClientUpdateOptions) (ProjectsClientUpdateResponse, error) { + var err error + const operationName = "ProjectsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, storageMoverName, projectName, project, options) if err != nil { return ProjectsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ProjectsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProjectsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ProjectsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -355,10 +383,13 @@ func (client *ProjectsClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, project) + if err := runtime.MarshalAsJSON(req, project); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/responses.go new file mode 100644 index 00000000..b410f919 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/responses.go @@ -0,0 +1,190 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +// AgentsClientCreateOrUpdateResponse contains the response from method AgentsClient.CreateOrUpdate. +type AgentsClientCreateOrUpdateResponse struct { + // The Agent resource. + Agent +} + +// AgentsClientDeleteResponse contains the response from method AgentsClient.BeginDelete. +type AgentsClientDeleteResponse struct { + // placeholder for future response values +} + +// AgentsClientGetResponse contains the response from method AgentsClient.Get. +type AgentsClientGetResponse struct { + // The Agent resource. + Agent +} + +// AgentsClientListResponse contains the response from method AgentsClient.NewListPager. +type AgentsClientListResponse struct { + // List of Agents. + AgentList +} + +// AgentsClientUpdateResponse contains the response from method AgentsClient.Update. +type AgentsClientUpdateResponse struct { + // The Agent resource. + Agent +} + +// EndpointsClientCreateOrUpdateResponse contains the response from method EndpointsClient.CreateOrUpdate. +type EndpointsClientCreateOrUpdateResponse struct { + // The Endpoint resource, which contains information about file sources and targets. + Endpoint +} + +// EndpointsClientDeleteResponse contains the response from method EndpointsClient.BeginDelete. +type EndpointsClientDeleteResponse struct { + // placeholder for future response values +} + +// EndpointsClientGetResponse contains the response from method EndpointsClient.Get. +type EndpointsClientGetResponse struct { + // The Endpoint resource, which contains information about file sources and targets. + Endpoint +} + +// EndpointsClientListResponse contains the response from method EndpointsClient.NewListPager. +type EndpointsClientListResponse struct { + // List of Endpoints. + EndpointList +} + +// EndpointsClientUpdateResponse contains the response from method EndpointsClient.Update. +type EndpointsClientUpdateResponse struct { + // The Endpoint resource, which contains information about file sources and targets. + Endpoint +} + +// JobDefinitionsClientCreateOrUpdateResponse contains the response from method JobDefinitionsClient.CreateOrUpdate. +type JobDefinitionsClientCreateOrUpdateResponse struct { + // The Job Definition resource. + JobDefinition +} + +// JobDefinitionsClientDeleteResponse contains the response from method JobDefinitionsClient.BeginDelete. +type JobDefinitionsClientDeleteResponse struct { + // placeholder for future response values +} + +// JobDefinitionsClientGetResponse contains the response from method JobDefinitionsClient.Get. +type JobDefinitionsClientGetResponse struct { + // The Job Definition resource. + JobDefinition +} + +// JobDefinitionsClientListResponse contains the response from method JobDefinitionsClient.NewListPager. +type JobDefinitionsClientListResponse struct { + // List of Job Definitions. + JobDefinitionList +} + +// JobDefinitionsClientStartJobResponse contains the response from method JobDefinitionsClient.StartJob. +type JobDefinitionsClientStartJobResponse struct { + // Response that identifies a Job Run. + JobRunResourceID +} + +// JobDefinitionsClientStopJobResponse contains the response from method JobDefinitionsClient.StopJob. +type JobDefinitionsClientStopJobResponse struct { + // Response that identifies a Job Run. + JobRunResourceID +} + +// JobDefinitionsClientUpdateResponse contains the response from method JobDefinitionsClient.Update. +type JobDefinitionsClientUpdateResponse struct { + // The Job Definition resource. + JobDefinition +} + +// JobRunsClientGetResponse contains the response from method JobRunsClient.Get. +type JobRunsClientGetResponse struct { + // The Job Run resource. + JobRun +} + +// JobRunsClientListResponse contains the response from method JobRunsClient.NewListPager. +type JobRunsClientListResponse struct { + // List of Job Runs. + JobRunList +} + +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. +type OperationsClientListResponse struct { + // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + OperationListResult +} + +// ProjectsClientCreateOrUpdateResponse contains the response from method ProjectsClient.CreateOrUpdate. +type ProjectsClientCreateOrUpdateResponse struct { + // The Project resource. + Project +} + +// ProjectsClientDeleteResponse contains the response from method ProjectsClient.BeginDelete. +type ProjectsClientDeleteResponse struct { + // placeholder for future response values +} + +// ProjectsClientGetResponse contains the response from method ProjectsClient.Get. +type ProjectsClientGetResponse struct { + // The Project resource. + Project +} + +// ProjectsClientListResponse contains the response from method ProjectsClient.NewListPager. +type ProjectsClientListResponse struct { + // List of Project resources. + ProjectList +} + +// ProjectsClientUpdateResponse contains the response from method ProjectsClient.Update. +type ProjectsClientUpdateResponse struct { + // The Project resource. + Project +} + +// StorageMoversClientCreateOrUpdateResponse contains the response from method StorageMoversClient.CreateOrUpdate. +type StorageMoversClientCreateOrUpdateResponse struct { + // The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. + StorageMover +} + +// StorageMoversClientDeleteResponse contains the response from method StorageMoversClient.BeginDelete. +type StorageMoversClientDeleteResponse struct { + // placeholder for future response values +} + +// StorageMoversClientGetResponse contains the response from method StorageMoversClient.Get. +type StorageMoversClientGetResponse struct { + // The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. + StorageMover +} + +// StorageMoversClientListBySubscriptionResponse contains the response from method StorageMoversClient.NewListBySubscriptionPager. +type StorageMoversClientListBySubscriptionResponse struct { + // List of Storage Movers. + List +} + +// StorageMoversClientListResponse contains the response from method StorageMoversClient.NewListPager. +type StorageMoversClientListResponse struct { + // List of Storage Movers. + List +} + +// StorageMoversClientUpdateResponse contains the response from method StorageMoversClient.Update. +type StorageMoversClientUpdateResponse struct { + // The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. + StorageMover +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/storagemovers_client.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/storagemovers_client.go index e72b042d..2cb7efee 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/storagemovers_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/storagemovers_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armstoragemover @@ -33,7 +32,7 @@ type StorageMoversClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewStorageMoversClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageMoversClient, error) { - cl, err := arm.NewClient(moduleName+".StorageMoversClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,24 +46,31 @@ func NewStorageMoversClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Creates or updates a top-level Storage Mover resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - options - StorageMoversClientCreateOrUpdateOptions contains the optional parameters for the StorageMoversClient.CreateOrUpdate // method. func (client *StorageMoversClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, storageMoverName string, storageMover StorageMover, options *StorageMoversClientCreateOrUpdateOptions) (StorageMoversClientCreateOrUpdateResponse, error) { + var err error + const operationName = "StorageMoversClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, storageMoverName, storageMover, options) if err != nil { return StorageMoversClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StorageMoversClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageMoversClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StorageMoversClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -87,10 +93,13 @@ func (client *StorageMoversClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, storageMover) + if err := runtime.MarshalAsJSON(req, storageMover); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -105,7 +114,7 @@ func (client *StorageMoversClient) createOrUpdateHandleResponse(resp *http.Respo // BeginDelete - Deletes a Storage Mover resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - options - StorageMoversClientBeginDeleteOptions contains the optional parameters for the StorageMoversClient.BeginDelete @@ -116,31 +125,41 @@ func (client *StorageMoversClient) BeginDelete(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StorageMoversClientDeleteResponse]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StorageMoversClientDeleteResponse]{ FinalStateVia: runtime.FinalStateViaLocation, + Tracer: client.internal.Tracer(), }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StorageMoversClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StorageMoversClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Deletes a Storage Mover resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 func (client *StorageMoversClient) deleteOperation(ctx context.Context, resourceGroupName string, storageMoverName string, options *StorageMoversClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "StorageMoversClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, storageMoverName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -163,7 +182,7 @@ func (client *StorageMoversClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,23 +191,30 @@ func (client *StorageMoversClient) deleteCreateRequest(ctx context.Context, reso // Get - Gets a Storage Mover resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - options - StorageMoversClientGetOptions contains the optional parameters for the StorageMoversClient.Get method. func (client *StorageMoversClient) Get(ctx context.Context, resourceGroupName string, storageMoverName string, options *StorageMoversClientGetOptions) (StorageMoversClientGetResponse, error) { + var err error + const operationName = "StorageMoversClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, storageMoverName, options) if err != nil { return StorageMoversClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StorageMoversClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageMoversClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StorageMoversClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -211,7 +237,7 @@ func (client *StorageMoversClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,7 +254,7 @@ func (client *StorageMoversClient) getHandleResponse(resp *http.Response) (Stora // NewListPager - Lists all Storage Movers in a resource group. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - StorageMoversClientListOptions contains the optional parameters for the StorageMoversClient.NewListPager method. func (client *StorageMoversClient) NewListPager(resourceGroupName string, options *StorageMoversClientListOptions) *runtime.Pager[StorageMoversClientListResponse] { @@ -237,25 +263,20 @@ func (client *StorageMoversClient) NewListPager(resourceGroupName string, option return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StorageMoversClientListResponse) (StorageMoversClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StorageMoversClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StorageMoversClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return StorageMoversClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageMoversClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -275,7 +296,7 @@ func (client *StorageMoversClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -292,7 +313,7 @@ func (client *StorageMoversClient) listHandleResponse(resp *http.Response) (Stor // NewListBySubscriptionPager - Lists all Storage Movers in a subscription. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - options - StorageMoversClientListBySubscriptionOptions contains the optional parameters for the StorageMoversClient.NewListBySubscriptionPager // method. func (client *StorageMoversClient) NewListBySubscriptionPager(options *StorageMoversClientListBySubscriptionOptions) *runtime.Pager[StorageMoversClientListBySubscriptionResponse] { @@ -301,25 +322,20 @@ func (client *StorageMoversClient) NewListBySubscriptionPager(options *StorageMo return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StorageMoversClientListBySubscriptionResponse) (StorageMoversClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StorageMoversClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) if err != nil { return StorageMoversClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StorageMoversClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageMoversClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -335,7 +351,7 @@ func (client *StorageMoversClient) listBySubscriptionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -353,23 +369,30 @@ func (client *StorageMoversClient) listBySubscriptionHandleResponse(resp *http.R // Update - Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-03-01 +// Generated from API version 2024-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - storageMoverName - The name of the Storage Mover resource. // - options - StorageMoversClientUpdateOptions contains the optional parameters for the StorageMoversClient.Update method. func (client *StorageMoversClient) Update(ctx context.Context, resourceGroupName string, storageMoverName string, storageMover UpdateParameters, options *StorageMoversClientUpdateOptions) (StorageMoversClientUpdateResponse, error) { + var err error + const operationName = "StorageMoversClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, storageMoverName, storageMover, options) if err != nil { return StorageMoversClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StorageMoversClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StorageMoversClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StorageMoversClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -392,10 +415,13 @@ func (client *StorageMoversClient) updateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-03-01") + reqQP.Set("api-version", "2024-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, storageMover) + if err := runtime.MarshalAsJSON(req, storageMover); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/time_rfc3339.go new file mode 100644 index 00000000..85a75a8f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2/time_rfc3339.go @@ -0,0 +1,110 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armstoragemover + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`) + +const ( + utcDateTime = "2006-01-02T15:04:05.999999999" + utcDateTimeJSON = `"` + utcDateTime + `"` + utcDateTimeNoT = "2006-01-02 15:04:05.999999999" + utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"` + dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00` + dateTimeJSON = `"` + time.RFC3339Nano + `"` + dateTimeJSONNoT = `"` + dateTimeNoT + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = dateTimeJSON + } else if tzOffset { + layout = dateTimeJSONNoT + } else if hasT { + layout = utcDateTimeJSON + } else { + layout = utcDateTimeJSONNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + tzOffset := tzOffsetRegex.Match(data) + hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t") + var layout string + if tzOffset && hasT { + layout = time.RFC3339Nano + } else if tzOffset { + layout = dateTimeNoT + } else if hasT { + layout = utcDateTime + } else { + layout = utcDateTimeNoT + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func (t dateTimeRFC3339) String() string { + return time.Time(t).Format(time.RFC3339Nano) +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || string(data) == "null" { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/vendor/github.com/magodo/aztft/internal/client/client.go b/vendor/github.com/magodo/aztft/internal/client/client.go index 1ba1a64a..9c08220c 100644 --- a/vendor/github.com/magodo/aztft/internal/client/client.go +++ b/vendor/github.com/magodo/aztft/internal/client/client.go @@ -4,21 +4,21 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/digitaltwins/armdigitaltwins" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/domainservices/armdomainservices" @@ -27,22 +27,21 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridkubernetes/armhybridkubernetes" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/streamanalytics/armstreamanalytics" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/synapse/armsynapse" @@ -375,14 +374,6 @@ func (b *ClientBuilder) NewStreamAnalyticsJobsClient(subscriptionId string) (*ar ) } -func (b *ClientBuilder) NewMonitorScheduledQueryRulesClient(subscriptionId string) (*armmonitor.ScheduledQueryRulesClient, error) { - return armmonitor.NewScheduledQueryRulesClient( - subscriptionId, - b.Cred, - &b.ClientOpt, - ) -} - func (b *ClientBuilder) NewCdnProfilesClient(subscriptionId string) (*armcdn.ProfilesClient, error) { return armcdn.NewProfilesClient( subscriptionId, @@ -583,50 +574,40 @@ func (b *ClientBuilder) NewDeploymentScriptsClient(subscriptionId string) (*armd ) } -func (b *ClientBuilder) NewSiteRecoveryReplicationPoliciesClient(subscriptionId, resourceGroupName, vaultName string) (*armrecoveryservicessiterecovery.ReplicationPoliciesClient, error) { +func (b *ClientBuilder) NewSiteRecoveryReplicationPoliciesClient(subscriptionId string) (*armrecoveryservicessiterecovery.ReplicationPoliciesClient, error) { return armrecoveryservicessiterecovery.NewReplicationPoliciesClient( - vaultName, - resourceGroupName, subscriptionId, b.Cred, &b.ClientOpt, ) } -func (b *ClientBuilder) NewSiteRecoveryReplicationFabricsClient(subscriptionId, resourceGroupName, vaultName string) (*armrecoveryservicessiterecovery.ReplicationFabricsClient, error) { +func (b *ClientBuilder) NewSiteRecoveryReplicationFabricsClient(subscriptionId string) (*armrecoveryservicessiterecovery.ReplicationFabricsClient, error) { return armrecoveryservicessiterecovery.NewReplicationFabricsClient( - vaultName, - resourceGroupName, subscriptionId, b.Cred, &b.ClientOpt, ) } -func (b *ClientBuilder) NewSiteRecoveryReplicationProtectedItemsClient(subscriptionId, resourceGroupName, vaultName string) (*armrecoveryservicessiterecovery.ReplicationProtectedItemsClient, error) { +func (b *ClientBuilder) NewSiteRecoveryReplicationProtectedItemsClient(subscriptionId string) (*armrecoveryservicessiterecovery.ReplicationProtectedItemsClient, error) { return armrecoveryservicessiterecovery.NewReplicationProtectedItemsClient( - vaultName, - resourceGroupName, subscriptionId, b.Cred, &b.ClientOpt, ) } -func (b *ClientBuilder) NewSiteRecoveryReplicationProtectionContainerMappingsClient(subscriptionId, resourceGroupName, vaultName string) (*armrecoveryservicessiterecovery.ReplicationProtectionContainerMappingsClient, error) { +func (b *ClientBuilder) NewSiteRecoveryReplicationProtectionContainerMappingsClient(subscriptionId string) (*armrecoveryservicessiterecovery.ReplicationProtectionContainerMappingsClient, error) { return armrecoveryservicessiterecovery.NewReplicationProtectionContainerMappingsClient( - vaultName, - resourceGroupName, subscriptionId, b.Cred, &b.ClientOpt, ) } -func (b *ClientBuilder) NewSiteRecoveryReplicationNetworkMappingsClient(subscriptionId, resourceGroupName, vaultName string) (*armrecoveryservicessiterecovery.ReplicationNetworkMappingsClient, error) { +func (b *ClientBuilder) NewSiteRecoveryReplicationNetworkMappingsClient(subscriptionId string) (*armrecoveryservicessiterecovery.ReplicationNetworkMappingsClient, error) { return armrecoveryservicessiterecovery.NewReplicationNetworkMappingsClient( - vaultName, - resourceGroupName, subscriptionId, b.Cred, &b.ClientOpt, diff --git a/vendor/github.com/magodo/aztft/internal/populate/populate_nat_gateway.go b/vendor/github.com/magodo/aztft/internal/populate/populate_nat_gateway.go index d47639ae..6948d6d3 100644 --- a/vendor/github.com/magodo/aztft/internal/populate/populate_nat_gateway.go +++ b/vendor/github.com/magodo/aztft/internal/populate/populate_nat_gateway.go @@ -5,7 +5,7 @@ import ( "encoding/base64" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/populate/populate_network_interface.go b/vendor/github.com/magodo/aztft/internal/populate/populate_network_interface.go index c33a1f1c..19073afc 100644 --- a/vendor/github.com/magodo/aztft/internal/populate/populate_network_interface.go +++ b/vendor/github.com/magodo/aztft/internal/populate/populate_network_interface.go @@ -5,7 +5,7 @@ import ( "encoding/base64" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resmap/map.json b/vendor/github.com/magodo/aztft/internal/resmap/map.json index daf6a4a1..acf46d9d 100644 --- a/vendor/github.com/magodo/aztft/internal/resmap/map.json +++ b/vendor/github.com/magodo/aztft/internal/resmap/map.json @@ -5443,6 +5443,20 @@ ] } }, + "azurerm_eventgrid_partner_configuration": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Microsoft.EventGrid", + "types": [ + "partnerConfigurations" + ], + "import_specs": [ + "/subscriptions/resourceGroups" + ] + } + }, "azurerm_eventgrid_system_topic": { "management_plane": { "scopes": [ @@ -8709,6 +8723,8 @@ } }, "azurerm_monitor_scheduled_query_rules_log": { + "is_removed": true, + "remove_reason": "This is deprecated in favor of azurerm_monitor_scheduled_query_rules_alert_v2", "management_plane": { "scopes": [ "/subscriptions/resourceGroups" @@ -9951,6 +9967,21 @@ ] } }, + "azurerm_nginx_api_key": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Nginx.NginxPlus", + "types": [ + "nginxDeployments", + "apiKeys" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Nginx.NginxPlus/nginxDeployments/apiKeys" + ] + } + }, "azurerm_nginx_certificate": { "management_plane": { "scopes": [ diff --git a/vendor/github.com/magodo/aztft/internal/resmap/map_gen.json b/vendor/github.com/magodo/aztft/internal/resmap/map_gen.json index f8d25474..68593b16 100644 --- a/vendor/github.com/magodo/aztft/internal/resmap/map_gen.json +++ b/vendor/github.com/magodo/aztft/internal/resmap/map_gen.json @@ -5431,6 +5431,18 @@ ] } }, + "azurerm_eventgrid_partner_configuration": { + "management_plane": { + "provider": "Microsoft.Resources", + "types": [ + "subscriptions", + "resourceGroups" + ], + "import_specs": [ + "/subscriptions/resourceGroups" + ] + } + }, "azurerm_eventgrid_system_topic": { "management_plane": { "scopes": [ @@ -9829,6 +9841,21 @@ ] } }, + "azurerm_nginx_api_key": { + "management_plane": { + "scopes": [ + "/subscriptions/resourceGroups" + ], + "provider": "Nginx.NginxPlus", + "types": [ + "nginxDeployments", + "apiKeys" + ], + "import_specs": [ + "/subscriptions/resourceGroups/Nginx.NginxPlus/nginxDeployments/apiKeys" + ] + } + }, "azurerm_nginx_certificate": { "management_plane": { "scopes": [ diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve.go index a4ab4c8a..82a5e56a 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve.go @@ -127,9 +127,6 @@ var Resolvers = map[string]map[string]resolver{ "/MICROSOFT.STREAMANALYTICS/STREAMINGJOBS/FUNCTIONS": { "/SUBSCRIPTIONS/RESOURCEGROUPS": streamAnalyticsFunctionsResolver{}, }, - "/MICROSOFT.INSIGHTS/SCHEDULEDQUERYRULES": { - "/SUBSCRIPTIONS/RESOURCEGROUPS": monitorScheduledQueryRulesResolver{}, - }, "/MICROSOFT.CDN/PROFILES": { "/SUBSCRIPTIONS/RESOURCEGROUPS": cdnProfilesResolver{}, }, diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_api_management_identities.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_api_management_identities.go index 57bb11c3..655f6b1f 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_api_management_identities.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_api_management_identities.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_app_platform_deployment.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_app_platform_deployment.go index b42b386d..ca7653a9 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_app_platform_deployment.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_app_platform_deployment.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_cdn_profile.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_cdn_profile.go index 1ab8df05..05367028 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_cdn_profile.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_cdn_profile.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_data_protection_backup_policies.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_data_protection_backup_policies.go index db13540f..e7c170de 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_data_protection_backup_policies.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_data_protection_backup_policies.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_deployment_scripts.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_deployment_scripts.go index b57900fd..231b1728 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_deployment_scripts.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_deployment_scripts.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_kusto_data_connection.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_kusto_data_connection.go index 712e632f..862712f9 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_kusto_data_connection.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_kusto_data_connection.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_monitor_scheduled_query_rule.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_monitor_scheduled_query_rule.go deleted file mode 100644 index d525528c..00000000 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_monitor_scheduled_query_rule.go +++ /dev/null @@ -1,48 +0,0 @@ -package resolve - -import ( - "context" - "fmt" - - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor" - "github.com/magodo/armid" - "github.com/magodo/aztft/internal/client" -) - -type monitorScheduledQueryRulesResolver struct{} - -func (monitorScheduledQueryRulesResolver) ResourceTypes() []string { - return []string{ - "azurerm_monitor_scheduled_query_rules_log", - "azurerm_monitor_scheduled_query_rules_alert_v2", - } -} - -func (monitorScheduledQueryRulesResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { - resourceGroupId := id.RootScope().(*armid.ResourceGroup) - client, err := b.NewMonitorScheduledQueryRulesClient(resourceGroupId.SubscriptionId) - if err != nil { - return "", err - } - resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], nil) - if err != nil { - return "", fmt.Errorf("retrieving %q: %v", id, err) - } - props := resp.LogSearchRuleResource.Properties - if props == nil { - return "", fmt.Errorf("unexpected nil property in response") - } - action := props.Action - if action == nil { - return "", fmt.Errorf("unexpected nil properties.action in response") - } - - switch action.(type) { - case *armmonitor.AlertingAction: - return "azurerm_monitor_scheduled_query_rules_alert_v2", nil - case *armmonitor.LogToMetricAction: - return "azurerm_monitor_scheduled_query_rules_log", nil - default: - return "", fmt.Errorf("unknown monitor scheduled query rule action type: %T", action) - } -} diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_backup_protected_items.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_backup_protected_items.go index c725343d..cc6e6ba0 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_backup_protected_items.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_backup_protected_items.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_backup_protection_policies.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_backup_protection_policies.go index 5c20d44b..275743f3 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_backup_protection_policies.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_backup_protection_policies.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_replication_protected_items.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_replication_protected_items.go index 1ff1f0e0..2ba88416 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_replication_protected_items.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_recovery_services_replication_protected_items.go @@ -16,11 +16,11 @@ func (recoveryServicesReplicationProtectedItemsResolver) ResourceTypes() []strin func (recoveryServicesReplicationProtectedItemsResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { resourceGroupId := id.RootScope().(*armid.ResourceGroup) - client, err := b.NewSiteRecoveryReplicationProtectedItemsClient(resourceGroupId.SubscriptionId, resourceGroupId.Name, id.Names()[0]) + client, err := b.NewSiteRecoveryReplicationProtectedItemsClient(resourceGroupId.SubscriptionId) if err != nil { return "", err } - resp, err := client.Get(context.Background(), id.Names()[1], id.Names()[2], id.Names()[3], nil) + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], id.Names()[1], id.Names()[2], id.Names()[3], nil) if err != nil { return "", fmt.Errorf("retrieving %q: %v", id, err) } diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_fabric.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_fabric.go index 4df4a37c..e38f5c01 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_fabric.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_fabric.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) @@ -17,11 +17,11 @@ func (siteRecoveryReplicationFabricsResolver) ResourceTypes() []string { func (siteRecoveryReplicationFabricsResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { resourceGroupId := id.RootScope().(*armid.ResourceGroup) - client, err := b.NewSiteRecoveryReplicationFabricsClient(resourceGroupId.SubscriptionId, resourceGroupId.Name, id.Names()[0]) + client, err := b.NewSiteRecoveryReplicationFabricsClient(resourceGroupId.SubscriptionId) if err != nil { return "", err } - resp, err := client.Get(context.Background(), id.Names()[1], nil) + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], id.Names()[1], nil) if err != nil { return "", fmt.Errorf("retrieving %q: %v", id, err) } diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_network_mapping.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_network_mapping.go index 98e38c53..2d68633a 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_network_mapping.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_network_mapping.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) @@ -17,11 +17,11 @@ func (siteRecoveryReplicationNetworkMappingResolver) ResourceTypes() []string { func (siteRecoveryReplicationNetworkMappingResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { resourceGroupId := id.RootScope().(*armid.ResourceGroup) - client, err := b.NewSiteRecoveryReplicationNetworkMappingsClient(resourceGroupId.SubscriptionId, resourceGroupId.Name, id.Names()[0]) + client, err := b.NewSiteRecoveryReplicationNetworkMappingsClient(resourceGroupId.SubscriptionId) if err != nil { return "", err } - resp, err := client.Get(context.Background(), id.Names()[1], id.Names()[2], id.Names()[3], nil) + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], id.Names()[1], id.Names()[2], id.Names()[3], nil) if err != nil { return "", fmt.Errorf("retrieving %q: %v", id, err) } diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_policy.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_policy.go index 22d3b305..d7944578 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_policy.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_policy.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) @@ -21,11 +21,11 @@ func (siteRecoveryReplicationPoliciesResolver) ResourceTypes() []string { func (siteRecoveryReplicationPoliciesResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { resourceGroupId := id.RootScope().(*armid.ResourceGroup) - client, err := b.NewSiteRecoveryReplicationPoliciesClient(resourceGroupId.SubscriptionId, resourceGroupId.Name, id.Names()[0]) + client, err := b.NewSiteRecoveryReplicationPoliciesClient(resourceGroupId.SubscriptionId) if err != nil { return "", err } - resp, err := client.Get(context.Background(), id.Names()[1], nil) + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], id.Names()[1], nil) if err != nil { return "", fmt.Errorf("retrieving %q: %v", id, err) } diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_protection_container_mapping.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_protection_container_mapping.go index 9cc0c4c7..b583b887 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_protection_container_mapping.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_site_recovery_replication_protection_container_mapping.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) @@ -23,11 +23,11 @@ func (siteRecoveryReplicationProtectionContainerMappingResolver) ResourceTypes() func (siteRecoveryReplicationProtectionContainerMappingResolver) Resolve(b *client.ClientBuilder, id armid.ResourceId) (string, error) { resourceGroupId := id.RootScope().(*armid.ResourceGroup) - client, err := b.NewSiteRecoveryReplicationProtectionContainerMappingsClient(resourceGroupId.SubscriptionId, resourceGroupId.Name, id.Names()[0]) + client, err := b.NewSiteRecoveryReplicationProtectionContainerMappingsClient(resourceGroupId.SubscriptionId) if err != nil { return "", err } - resp, err := client.Get(context.Background(), id.Names()[1], id.Names()[2], id.Names()[3], nil) + resp, err := client.Get(context.Background(), resourceGroupId.Name, id.Names()[0], id.Names()[1], id.Names()[2], id.Names()[3], nil) if err != nil { return "", fmt.Errorf("retrieving %q: %v", id, err) } diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_storage_cache_target.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_storage_cache_target.go index 42ba7765..a2058c9b 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_storage_cache_target.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_storage_cache_target.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/resolve/resolve_storage_mover_endpoint.go b/vendor/github.com/magodo/aztft/internal/resolve/resolve_storage_mover_endpoint.go index 8fbb5b50..281881f9 100644 --- a/vendor/github.com/magodo/aztft/internal/resolve/resolve_storage_mover_endpoint.go +++ b/vendor/github.com/magodo/aztft/internal/resolve/resolve_storage_mover_endpoint.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2" "github.com/magodo/armid" "github.com/magodo/aztft/internal/client" ) diff --git a/vendor/github.com/magodo/aztft/internal/tfid/tfid.go b/vendor/github.com/magodo/aztft/internal/tfid/tfid.go index 753d0755..fec62894 100644 --- a/vendor/github.com/magodo/aztft/internal/tfid/tfid.go +++ b/vendor/github.com/magodo/aztft/internal/tfid/tfid.go @@ -102,6 +102,13 @@ func StaticBuild(id armid.ResourceId, rt string) (string, error) { return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", managerId.String(), rt, importSpec, err) } return managerId.String() + "/commit|" + id.Names()[1] + "|" + id.Names()[2], nil + case "azurerm_postgresql_flexible_server_virtual_endpoint": + if err := id.Normalize(importSpec); err != nil { + return "", fmt.Errorf("normalizing id %q for %q with import spec %q: %v", id.String(), rt, importSpec, err) + } + // It is fine to simply combine the same id twice, instead of getting the review replica id. + // That is because the Azure resource id is provided by the user and we can guarantee it is not failovered. + return fmt.Sprintf("%[1]s|%[1]s", id.String()), nil // Porperty-like resources case "azurerm_nat_gateway_public_ip_association": @@ -163,6 +170,10 @@ func StaticBuild(id armid.ResourceId, rt string) (string, error) { "azurerm_mssql_job_schedule", "azurerm_stream_analytics_job_storage_account": id = id.Parent() + + // Parent Scope + case "azurerm_eventgrid_partner_configuration": + id = id.ParentScope() } if importSpec != "" { diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go index a4ea5d14..cfafed5b 100644 --- a/vendor/golang.org/x/sync/errgroup/errgroup.go +++ b/vendor/golang.org/x/sync/errgroup/errgroup.go @@ -12,13 +12,15 @@ package errgroup import ( "context" "fmt" + "runtime" + "runtime/debug" "sync" ) type token struct{} // A Group is a collection of goroutines working on subtasks that are part of -// the same overall task. +// the same overall task. A Group should not be reused for different tasks. // // A zero Group is valid, has no limit on the number of active goroutines, // and does not cancel on error. @@ -31,6 +33,10 @@ type Group struct { errOnce sync.Once err error + + mu sync.Mutex + panicValue any // = PanicError | PanicValue; non-nil if some Group.Go goroutine panicked. + abnormal bool // some Group.Go goroutine terminated abnormally (panic or goexit). } func (g *Group) done() { @@ -50,32 +56,80 @@ func WithContext(ctx context.Context) (*Group, context.Context) { return &Group{cancel: cancel}, ctx } -// Wait blocks until all function calls from the Go method have returned, then -// returns the first non-nil error (if any) from them. +// Wait blocks until all function calls from the Go method have returned +// normally, then returns the first non-nil error (if any) from them. +// +// If any of the calls panics, Wait panics with a [PanicValue]; +// and if any of them calls [runtime.Goexit], Wait calls runtime.Goexit. func (g *Group) Wait() error { g.wg.Wait() if g.cancel != nil { g.cancel(g.err) } + if g.panicValue != nil { + panic(g.panicValue) + } + if g.abnormal { + runtime.Goexit() + } return g.err } // Go calls the given function in a new goroutine. +// The first call to Go must happen before a Wait. // It blocks until the new goroutine can be added without the number of // active goroutines in the group exceeding the configured limit. // -// The first call to return a non-nil error cancels the group's context, if the -// group was created by calling WithContext. The error will be returned by Wait. +// It blocks until the new goroutine can be added without the number of +// goroutines in the group exceeding the configured limit. +// +// The first goroutine in the group that returns a non-nil error, panics, or +// invokes [runtime.Goexit] will cancel the associated Context, if any. func (g *Group) Go(f func() error) { if g.sem != nil { g.sem <- token{} } + g.add(f) +} + +func (g *Group) add(f func() error) { g.wg.Add(1) go func() { defer g.done() + normalReturn := false + defer func() { + if normalReturn { + return + } + v := recover() + g.mu.Lock() + defer g.mu.Unlock() + if !g.abnormal { + if g.cancel != nil { + g.cancel(g.err) + } + g.abnormal = true + } + if v != nil && g.panicValue == nil { + switch v := v.(type) { + case error: + g.panicValue = PanicError{ + Recovered: v, + Stack: debug.Stack(), + } + default: + g.panicValue = PanicValue{ + Recovered: v, + Stack: debug.Stack(), + } + } + } + }() - if err := f(); err != nil { + err := f() + normalReturn = true + if err != nil { g.errOnce.Do(func() { g.err = err if g.cancel != nil { @@ -100,19 +154,7 @@ func (g *Group) TryGo(f func() error) bool { } } - g.wg.Add(1) - go func() { - defer g.done() - - if err := f(); err != nil { - g.errOnce.Do(func() { - g.err = err - if g.cancel != nil { - g.cancel(g.err) - } - }) - } - }() + g.add(f) return true } @@ -134,3 +176,33 @@ func (g *Group) SetLimit(n int) { } g.sem = make(chan token, n) } + +// PanicError wraps an error recovered from an unhandled panic +// when calling a function passed to Go or TryGo. +type PanicError struct { + Recovered error + Stack []byte // result of call to [debug.Stack] +} + +func (p PanicError) Error() string { + // A Go Error method conventionally does not include a stack dump, so omit it + // here. (Callers who care can extract it from the Stack field.) + return fmt.Sprintf("recovered from errgroup.Group: %v", p.Recovered) +} + +func (p PanicError) Unwrap() error { return p.Recovered } + +// PanicValue wraps a value that does not implement the error interface, +// recovered from an unhandled panic when calling a function passed to Go or +// TryGo. +type PanicValue struct { + Recovered any + Stack []byte // result of call to [debug.Stack] +} + +func (p PanicValue) String() string { + if len(p.Stack) > 0 { + return fmt.Sprintf("recovered from errgroup.Group: %v\n%s", p.Recovered, p.Stack) + } + return fmt.Sprintf("recovered from errgroup.Group: %v", p.Recovered) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 099867de..798f61ad 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -602,7 +602,150 @@ func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocI return } -//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) +// sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) +const minIovec = 8 + +func Readv(fd int, iovs [][]byte) (n int, err error) { + if !darwinKernelVersionMin(11, 0, 0) { + return 0, ENOSYS + } + + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) + n, err = readv(fd, iovecs) + readvRacedetect(iovecs, n, err) + return n, err +} + +func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { + if !darwinKernelVersionMin(11, 0, 0) { + return 0, ENOSYS + } + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) + n, err = preadv(fd, iovecs, offset) + readvRacedetect(iovecs, n, err) + return n, err +} + +func Writev(fd int, iovs [][]byte) (n int, err error) { + if !darwinKernelVersionMin(11, 0, 0) { + return 0, ENOSYS + } + + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + n, err = writev(fd, iovecs) + writevRacedetect(iovecs, n) + return n, err +} + +func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { + if !darwinKernelVersionMin(11, 0, 0) { + return 0, ENOSYS + } + + iovecs := make([]Iovec, 0, minIovec) + iovecs = appendBytes(iovecs, iovs) + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + n, err = pwritev(fd, iovecs, offset) + writevRacedetect(iovecs, n) + return n, err +} + +func appendBytes(vecs []Iovec, bs [][]byte) []Iovec { + for _, b := range bs { + var v Iovec + v.SetLen(len(b)) + if len(b) > 0 { + v.Base = &b[0] + } else { + v.Base = (*byte)(unsafe.Pointer(&_zero)) + } + vecs = append(vecs, v) + } + return vecs +} + +func writevRacedetect(iovecs []Iovec, n int) { + if !raceenabled { + return + } + for i := 0; n > 0 && i < len(iovecs); i++ { + m := int(iovecs[i].Len) + if m > n { + m = n + } + n -= m + if m > 0 { + raceReadRange(unsafe.Pointer(iovecs[i].Base), m) + } + } +} + +func readvRacedetect(iovecs []Iovec, n int, err error) { + if !raceenabled { + return + } + for i := 0; n > 0 && i < len(iovecs); i++ { + m := int(iovecs[i].Len) + if m > n { + m = n + } + n -= m + if m > 0 { + raceWriteRange(unsafe.Pointer(iovecs[i].Base), m) + } + } + if err == nil { + raceAcquire(unsafe.Pointer(&ioSync)) + } +} + +func darwinMajorMinPatch() (maj, min, patch int, err error) { + var un Utsname + err = Uname(&un) + if err != nil { + return + } + + var mmp [3]int + c := 0 +Loop: + for _, b := range un.Release[:] { + switch { + case b >= '0' && b <= '9': + mmp[c] = 10*mmp[c] + int(b-'0') + case b == '.': + c++ + if c > 2 { + return 0, 0, 0, ENOTSUP + } + case b == 0: + break Loop + default: + return 0, 0, 0, ENOTSUP + } + } + if c != 2 { + return 0, 0, 0, ENOTSUP + } + return mmp[0], mmp[1], mmp[2], nil +} + +func darwinKernelVersionMin(maj, min, patch int) bool { + actualMaj, actualMin, actualPatch, err := darwinMajorMinPatch() + if err != nil { + return false + } + return actualMaj > maj || actualMaj == maj && (actualMin > min || actualMin == min && actualPatch >= patch) +} + //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) @@ -705,3 +848,7 @@ func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocI //sys write(fd int, p []byte) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) //sys munmap(addr uintptr, length uintptr) (err error) +//sys readv(fd int, iovecs []Iovec) (n int, err error) +//sys preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) +//sys writev(fd int, iovecs []Iovec) (n int, err error) +//sys pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 230a9454..4958a657 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -13,6 +13,7 @@ package unix import ( "encoding/binary" + "slices" "strconv" "syscall" "time" @@ -417,7 +418,7 @@ func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { return nil, 0, EINVAL } sa.raw.Family = AF_UNIX - for i := 0; i < n; i++ { + for i := range n { sa.raw.Path[i] = int8(name[i]) } // length is family (uint16), name, NUL. @@ -507,7 +508,7 @@ func (sa *SockaddrL2) sockaddr() (unsafe.Pointer, _Socklen, error) { psm := (*[2]byte)(unsafe.Pointer(&sa.raw.Psm)) psm[0] = byte(sa.PSM) psm[1] = byte(sa.PSM >> 8) - for i := 0; i < len(sa.Addr); i++ { + for i := range len(sa.Addr) { sa.raw.Bdaddr[i] = sa.Addr[len(sa.Addr)-1-i] } cid := (*[2]byte)(unsafe.Pointer(&sa.raw.Cid)) @@ -589,11 +590,11 @@ func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Family = AF_CAN sa.raw.Ifindex = int32(sa.Ifindex) rx := (*[4]byte)(unsafe.Pointer(&sa.RxID)) - for i := 0; i < 4; i++ { + for i := range 4 { sa.raw.Addr[i] = rx[i] } tx := (*[4]byte)(unsafe.Pointer(&sa.TxID)) - for i := 0; i < 4; i++ { + for i := range 4 { sa.raw.Addr[i+4] = tx[i] } return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil @@ -618,11 +619,11 @@ func (sa *SockaddrCANJ1939) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Family = AF_CAN sa.raw.Ifindex = int32(sa.Ifindex) n := (*[8]byte)(unsafe.Pointer(&sa.Name)) - for i := 0; i < 8; i++ { + for i := range 8 { sa.raw.Addr[i] = n[i] } p := (*[4]byte)(unsafe.Pointer(&sa.PGN)) - for i := 0; i < 4; i++ { + for i := range 4 { sa.raw.Addr[i+8] = p[i] } sa.raw.Addr[12] = sa.Addr @@ -911,7 +912,7 @@ func (sa *SockaddrIUCV) sockaddr() (unsafe.Pointer, _Socklen, error) { // These are EBCDIC encoded by the kernel, but we still need to pad them // with blanks. Initializing with blanks allows the caller to feed in either // a padded or an unpadded string. - for i := 0; i < 8; i++ { + for i := range 8 { sa.raw.Nodeid[i] = ' ' sa.raw.User_id[i] = ' ' sa.raw.Name[i] = ' ' @@ -1148,7 +1149,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { var user [8]byte var name [8]byte - for i := 0; i < 8; i++ { + for i := range 8 { user[i] = byte(pp.User_id[i]) name[i] = byte(pp.Name[i]) } @@ -1173,11 +1174,11 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { Ifindex: int(pp.Ifindex), } name := (*[8]byte)(unsafe.Pointer(&sa.Name)) - for i := 0; i < 8; i++ { + for i := range 8 { name[i] = pp.Addr[i] } pgn := (*[4]byte)(unsafe.Pointer(&sa.PGN)) - for i := 0; i < 4; i++ { + for i := range 4 { pgn[i] = pp.Addr[i+8] } addr := (*[1]byte)(unsafe.Pointer(&sa.Addr)) @@ -1188,11 +1189,11 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { Ifindex: int(pp.Ifindex), } rx := (*[4]byte)(unsafe.Pointer(&sa.RxID)) - for i := 0; i < 4; i++ { + for i := range 4 { rx[i] = pp.Addr[i] } tx := (*[4]byte)(unsafe.Pointer(&sa.TxID)) - for i := 0; i < 4; i++ { + for i := range 4 { tx[i] = pp.Addr[i+4] } return sa, nil @@ -2216,10 +2217,7 @@ func readvRacedetect(iovecs []Iovec, n int, err error) { return } for i := 0; n > 0 && i < len(iovecs); i++ { - m := int(iovecs[i].Len) - if m > n { - m = n - } + m := min(int(iovecs[i].Len), n) n -= m if m > 0 { raceWriteRange(unsafe.Pointer(iovecs[i].Base), m) @@ -2270,10 +2268,7 @@ func writevRacedetect(iovecs []Iovec, n int) { return } for i := 0; n > 0 && i < len(iovecs); i++ { - m := int(iovecs[i].Len) - if m > n { - m = n - } + m := min(int(iovecs[i].Len), n) n -= m if m > 0 { raceReadRange(unsafe.Pointer(iovecs[i].Base), m) @@ -2320,12 +2315,7 @@ func isGroupMember(gid int) bool { return false } - for _, g := range groups { - if g == gid { - return true - } - } - return false + return slices.Contains(groups, gid) } func isCapDacOverrideSet() bool { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index 24b346e1..813c05b6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -2512,6 +2512,90 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func readv(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_readv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readv readv "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_preadv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_preadv preadv "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writev(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_writev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_writev writev "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pwritev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwritev pwritev "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s index ebd21310..fda32858 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s @@ -738,6 +738,26 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readv(SB) +GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB) + +TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_preadv(SB) +GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB) + +TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_writev(SB) +GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB) + +TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pwritev(SB) +GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB) + TEXT libc_fstat64_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat64(SB) GLOBL ·libc_fstat64_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index 824b9c2d..e6f58f3c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -2512,6 +2512,90 @@ var libc_munmap_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func readv(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_readv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_readv readv "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_preadv_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_preadv preadv "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writev(fd int, iovecs []Iovec) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_writev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_writev writev "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(iovecs) > 0 { + _p0 = unsafe.Pointer(&iovecs[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pwritev_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pwritev pwritev "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s index 4f178a22..7f8998b9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s @@ -738,6 +738,26 @@ TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) +TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_readv(SB) +GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB) + +TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_preadv(SB) +GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8 +DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB) + +TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_writev(SB) +GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB) + +TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pwritev(SB) +GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB) + TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index b6e1ab76..a8b0364c 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -1303,7 +1303,10 @@ func (selfRelativeSD *SECURITY_DESCRIPTOR) ToAbsolute() (absoluteSD *SECURITY_DE return nil, err } if absoluteSDSize > 0 { - absoluteSD = (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&make([]byte, absoluteSDSize)[0])) + absoluteSD = new(SECURITY_DESCRIPTOR) + if unsafe.Sizeof(*absoluteSD) < uintptr(absoluteSDSize) { + panic("sizeof(SECURITY_DESCRIPTOR) too small") + } } var ( dacl *ACL @@ -1312,19 +1315,55 @@ func (selfRelativeSD *SECURITY_DESCRIPTOR) ToAbsolute() (absoluteSD *SECURITY_DE group *SID ) if daclSize > 0 { - dacl = (*ACL)(unsafe.Pointer(&make([]byte, daclSize)[0])) + dacl = (*ACL)(unsafe.Pointer(unsafe.SliceData(make([]byte, daclSize)))) } if saclSize > 0 { - sacl = (*ACL)(unsafe.Pointer(&make([]byte, saclSize)[0])) + sacl = (*ACL)(unsafe.Pointer(unsafe.SliceData(make([]byte, saclSize)))) } if ownerSize > 0 { - owner = (*SID)(unsafe.Pointer(&make([]byte, ownerSize)[0])) + owner = (*SID)(unsafe.Pointer(unsafe.SliceData(make([]byte, ownerSize)))) } if groupSize > 0 { - group = (*SID)(unsafe.Pointer(&make([]byte, groupSize)[0])) + group = (*SID)(unsafe.Pointer(unsafe.SliceData(make([]byte, groupSize)))) } + // We call into Windows via makeAbsoluteSD, which sets up + // pointers within absoluteSD that point to other chunks of memory + // we pass into makeAbsoluteSD, and that happens outside the view of the GC. + // We therefore take some care here to then verify the pointers are as we expect + // and set them explicitly in view of the GC. See https://go.dev/issue/73199. + // TODO: consider weak pointers once Go 1.24 is appropriate. See suggestion in https://go.dev/cl/663575. err = makeAbsoluteSD(selfRelativeSD, absoluteSD, &absoluteSDSize, dacl, &daclSize, sacl, &saclSize, owner, &ownerSize, group, &groupSize) + if err != nil { + // Don't return absoluteSD, which might be partially initialized. + return nil, err + } + // Before using any fields, verify absoluteSD is in the format we expect according to Windows. + // See https://learn.microsoft.com/en-us/windows/win32/secauthz/absolute-and-self-relative-security-descriptors + absControl, _, err := absoluteSD.Control() + if err != nil { + panic("absoluteSD: " + err.Error()) + } + if absControl&SE_SELF_RELATIVE != 0 { + panic("absoluteSD not in absolute format") + } + if absoluteSD.dacl != dacl { + panic("dacl pointer mismatch") + } + if absoluteSD.sacl != sacl { + panic("sacl pointer mismatch") + } + if absoluteSD.owner != owner { + panic("owner pointer mismatch") + } + if absoluteSD.group != group { + panic("group pointer mismatch") + } + absoluteSD.dacl = dacl + absoluteSD.sacl = sacl + absoluteSD.owner = owner + absoluteSD.group = group + return } diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 4a325438..640f6b15 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -870,6 +870,7 @@ const socket_error = uintptr(^uint32(0)) //sys WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom //sys WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo //sys WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.WSASocketW +//sys WSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err error) [failretval!=0] = ws2_32.WSADuplicateSocketW //sys GetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname //sys GetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname //sys Ntohs(netshort uint16) (u uint16) = ws2_32.ntohs @@ -1698,8 +1699,9 @@ func NewNTUnicodeString(s string) (*NTUnicodeString, error) { // Slice returns a uint16 slice that aliases the data in the NTUnicodeString. func (s *NTUnicodeString) Slice() []uint16 { - slice := unsafe.Slice(s.Buffer, s.MaximumLength) - return slice[:s.Length] + // Note: this rounds the length down, if it happens + // to (incorrectly) be odd. Probably safer than rounding up. + return unsafe.Slice(s.Buffer, s.MaximumLength/2)[:s.Length/2] } func (s *NTUnicodeString) String() string { diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index 9d138de5..958bcf47 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -1074,6 +1074,7 @@ const ( IP_ADD_MEMBERSHIP = 0xc IP_DROP_MEMBERSHIP = 0xd IP_PKTINFO = 0x13 + IP_MTU_DISCOVER = 0x47 IPV6_V6ONLY = 0x1b IPV6_UNICAST_HOPS = 0x4 @@ -1083,6 +1084,7 @@ const ( IPV6_JOIN_GROUP = 0xc IPV6_LEAVE_GROUP = 0xd IPV6_PKTINFO = 0x13 + IPV6_MTU_DISCOVER = 0x47 MSG_OOB = 0x1 MSG_PEEK = 0x2 @@ -1132,6 +1134,15 @@ const ( WSASYS_STATUS_LEN = 128 ) +// enum PMTUD_STATE from ws2ipdef.h +const ( + IP_PMTUDISC_NOT_SET = 0 + IP_PMTUDISC_DO = 1 + IP_PMTUDISC_DONT = 2 + IP_PMTUDISC_PROBE = 3 + IP_PMTUDISC_MAX = 4 +) + type WSABuf struct { Len uint32 Buf *byte @@ -1146,6 +1157,22 @@ type WSAMsg struct { Flags uint32 } +type WSACMSGHDR struct { + Len uintptr + Level int32 + Type int32 +} + +type IN_PKTINFO struct { + Addr [4]byte + Ifindex uint32 +} + +type IN6_PKTINFO struct { + Addr [16]byte + Ifindex uint32 +} + // Flags for WSASocket const ( WSA_FLAG_OVERLAPPED = 0x01 @@ -2673,6 +2700,8 @@ type CommTimeouts struct { // NTUnicodeString is a UTF-16 string for NT native APIs, corresponding to UNICODE_STRING. type NTUnicodeString struct { + // Note: Length and MaximumLength are in *bytes*, not uint16s. + // They should always be even. Length uint16 MaximumLength uint16 Buffer *uint16 @@ -3601,3 +3630,213 @@ const ( KLF_NOTELLSHELL = 0x00000080 KLF_SETFORPROCESS = 0x00000100 ) + +// Virtual Key codes +// https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes +const ( + VK_LBUTTON = 0x01 + VK_RBUTTON = 0x02 + VK_CANCEL = 0x03 + VK_MBUTTON = 0x04 + VK_XBUTTON1 = 0x05 + VK_XBUTTON2 = 0x06 + VK_BACK = 0x08 + VK_TAB = 0x09 + VK_CLEAR = 0x0C + VK_RETURN = 0x0D + VK_SHIFT = 0x10 + VK_CONTROL = 0x11 + VK_MENU = 0x12 + VK_PAUSE = 0x13 + VK_CAPITAL = 0x14 + VK_KANA = 0x15 + VK_HANGEUL = 0x15 + VK_HANGUL = 0x15 + VK_IME_ON = 0x16 + VK_JUNJA = 0x17 + VK_FINAL = 0x18 + VK_HANJA = 0x19 + VK_KANJI = 0x19 + VK_IME_OFF = 0x1A + VK_ESCAPE = 0x1B + VK_CONVERT = 0x1C + VK_NONCONVERT = 0x1D + VK_ACCEPT = 0x1E + VK_MODECHANGE = 0x1F + VK_SPACE = 0x20 + VK_PRIOR = 0x21 + VK_NEXT = 0x22 + VK_END = 0x23 + VK_HOME = 0x24 + VK_LEFT = 0x25 + VK_UP = 0x26 + VK_RIGHT = 0x27 + VK_DOWN = 0x28 + VK_SELECT = 0x29 + VK_PRINT = 0x2A + VK_EXECUTE = 0x2B + VK_SNAPSHOT = 0x2C + VK_INSERT = 0x2D + VK_DELETE = 0x2E + VK_HELP = 0x2F + VK_LWIN = 0x5B + VK_RWIN = 0x5C + VK_APPS = 0x5D + VK_SLEEP = 0x5F + VK_NUMPAD0 = 0x60 + VK_NUMPAD1 = 0x61 + VK_NUMPAD2 = 0x62 + VK_NUMPAD3 = 0x63 + VK_NUMPAD4 = 0x64 + VK_NUMPAD5 = 0x65 + VK_NUMPAD6 = 0x66 + VK_NUMPAD7 = 0x67 + VK_NUMPAD8 = 0x68 + VK_NUMPAD9 = 0x69 + VK_MULTIPLY = 0x6A + VK_ADD = 0x6B + VK_SEPARATOR = 0x6C + VK_SUBTRACT = 0x6D + VK_DECIMAL = 0x6E + VK_DIVIDE = 0x6F + VK_F1 = 0x70 + VK_F2 = 0x71 + VK_F3 = 0x72 + VK_F4 = 0x73 + VK_F5 = 0x74 + VK_F6 = 0x75 + VK_F7 = 0x76 + VK_F8 = 0x77 + VK_F9 = 0x78 + VK_F10 = 0x79 + VK_F11 = 0x7A + VK_F12 = 0x7B + VK_F13 = 0x7C + VK_F14 = 0x7D + VK_F15 = 0x7E + VK_F16 = 0x7F + VK_F17 = 0x80 + VK_F18 = 0x81 + VK_F19 = 0x82 + VK_F20 = 0x83 + VK_F21 = 0x84 + VK_F22 = 0x85 + VK_F23 = 0x86 + VK_F24 = 0x87 + VK_NUMLOCK = 0x90 + VK_SCROLL = 0x91 + VK_OEM_NEC_EQUAL = 0x92 + VK_OEM_FJ_JISHO = 0x92 + VK_OEM_FJ_MASSHOU = 0x93 + VK_OEM_FJ_TOUROKU = 0x94 + VK_OEM_FJ_LOYA = 0x95 + VK_OEM_FJ_ROYA = 0x96 + VK_LSHIFT = 0xA0 + VK_RSHIFT = 0xA1 + VK_LCONTROL = 0xA2 + VK_RCONTROL = 0xA3 + VK_LMENU = 0xA4 + VK_RMENU = 0xA5 + VK_BROWSER_BACK = 0xA6 + VK_BROWSER_FORWARD = 0xA7 + VK_BROWSER_REFRESH = 0xA8 + VK_BROWSER_STOP = 0xA9 + VK_BROWSER_SEARCH = 0xAA + VK_BROWSER_FAVORITES = 0xAB + VK_BROWSER_HOME = 0xAC + VK_VOLUME_MUTE = 0xAD + VK_VOLUME_DOWN = 0xAE + VK_VOLUME_UP = 0xAF + VK_MEDIA_NEXT_TRACK = 0xB0 + VK_MEDIA_PREV_TRACK = 0xB1 + VK_MEDIA_STOP = 0xB2 + VK_MEDIA_PLAY_PAUSE = 0xB3 + VK_LAUNCH_MAIL = 0xB4 + VK_LAUNCH_MEDIA_SELECT = 0xB5 + VK_LAUNCH_APP1 = 0xB6 + VK_LAUNCH_APP2 = 0xB7 + VK_OEM_1 = 0xBA + VK_OEM_PLUS = 0xBB + VK_OEM_COMMA = 0xBC + VK_OEM_MINUS = 0xBD + VK_OEM_PERIOD = 0xBE + VK_OEM_2 = 0xBF + VK_OEM_3 = 0xC0 + VK_OEM_4 = 0xDB + VK_OEM_5 = 0xDC + VK_OEM_6 = 0xDD + VK_OEM_7 = 0xDE + VK_OEM_8 = 0xDF + VK_OEM_AX = 0xE1 + VK_OEM_102 = 0xE2 + VK_ICO_HELP = 0xE3 + VK_ICO_00 = 0xE4 + VK_PROCESSKEY = 0xE5 + VK_ICO_CLEAR = 0xE6 + VK_OEM_RESET = 0xE9 + VK_OEM_JUMP = 0xEA + VK_OEM_PA1 = 0xEB + VK_OEM_PA2 = 0xEC + VK_OEM_PA3 = 0xED + VK_OEM_WSCTRL = 0xEE + VK_OEM_CUSEL = 0xEF + VK_OEM_ATTN = 0xF0 + VK_OEM_FINISH = 0xF1 + VK_OEM_COPY = 0xF2 + VK_OEM_AUTO = 0xF3 + VK_OEM_ENLW = 0xF4 + VK_OEM_BACKTAB = 0xF5 + VK_ATTN = 0xF6 + VK_CRSEL = 0xF7 + VK_EXSEL = 0xF8 + VK_EREOF = 0xF9 + VK_PLAY = 0xFA + VK_ZOOM = 0xFB + VK_NONAME = 0xFC + VK_PA1 = 0xFD + VK_OEM_CLEAR = 0xFE +) + +// Mouse button constants. +// https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str +const ( + FROM_LEFT_1ST_BUTTON_PRESSED = 0x0001 + RIGHTMOST_BUTTON_PRESSED = 0x0002 + FROM_LEFT_2ND_BUTTON_PRESSED = 0x0004 + FROM_LEFT_3RD_BUTTON_PRESSED = 0x0008 + FROM_LEFT_4TH_BUTTON_PRESSED = 0x0010 +) + +// Control key state constaints. +// https://docs.microsoft.com/en-us/windows/console/key-event-record-str +// https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str +const ( + CAPSLOCK_ON = 0x0080 + ENHANCED_KEY = 0x0100 + LEFT_ALT_PRESSED = 0x0002 + LEFT_CTRL_PRESSED = 0x0008 + NUMLOCK_ON = 0x0020 + RIGHT_ALT_PRESSED = 0x0001 + RIGHT_CTRL_PRESSED = 0x0004 + SCROLLLOCK_ON = 0x0040 + SHIFT_PRESSED = 0x0010 +) + +// Mouse event record event flags. +// https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str +const ( + MOUSE_MOVED = 0x0001 + DOUBLE_CLICK = 0x0002 + MOUSE_WHEELED = 0x0004 + MOUSE_HWHEELED = 0x0008 +) + +// Input Record Event Types +// https://learn.microsoft.com/en-us/windows/console/input-record-str +const ( + FOCUS_EVENT = 0x0010 + KEY_EVENT = 0x0001 + MENU_EVENT = 0x0008 + MOUSE_EVENT = 0x0002 + WINDOW_BUFFER_SIZE_EVENT = 0x0004 +) diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 01c0716c..a58bc48b 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -511,6 +511,7 @@ var ( procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW") procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW") procWSACleanup = modws2_32.NewProc("WSACleanup") + procWSADuplicateSocketW = modws2_32.NewProc("WSADuplicateSocketW") procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW") procWSAGetOverlappedResult = modws2_32.NewProc("WSAGetOverlappedResult") procWSAIoctl = modws2_32.NewProc("WSAIoctl") @@ -4391,6 +4392,14 @@ func WSACleanup() (err error) { return } +func WSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err error) { + r1, _, e1 := syscall.Syscall(procWSADuplicateSocketW.Addr(), 3, uintptr(s), uintptr(processID), uintptr(unsafe.Pointer(info))) + if r1 != 0 { + err = errnoErr(e1) + } + return +} + func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) { r0, _, e1 := syscall.Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength))) n = int32(r0) diff --git a/vendor/modules.txt b/vendor/modules.txt index 9c198a52..9c13f636 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,7 +1,7 @@ # dario.cat/mergo v1.0.1 ## explicit; go 1.13 dario.cat/mergo -# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1 +# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 ## explicit; go 1.23.0 github.com/Azure/azure-sdk-for-go/sdk/azcore github.com/Azure/azure-sdk-for-go/sdk/azcore/arm @@ -24,7 +24,7 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming github.com/Azure/azure-sdk-for-go/sdk/azcore/to github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing -# github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0 +# github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 ## explicit; go 1.23.0 github.com/Azure/azure-sdk-for-go/sdk/internal/diag github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo @@ -36,30 +36,30 @@ github.com/Azure/azure-sdk-for-go/sdk/internal/uuid # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement v0.10.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/alertsmanagement/armalertsmanagement -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement v1.1.1 -## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.0.0 -## explicit; go 1.18 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3 v3.0.0 +## explicit; go 1.23.0 +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/apimanagement/armapimanagement/v3 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 v3.1.0 +## explicit; go 1.23.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v3 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform v1.1.0-beta.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2 v2.0.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice v1.0.0 +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4 v4.1.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v4 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.9.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/botservice/armbotservice -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2 v2.2.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn/v2 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.7.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices @@ -72,15 +72,15 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmana # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 v7.0.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v7 -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection v1.0.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3 v3.1.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dataprotection/armdataprotection/v3 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datashare/armdatashare -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization v1.0.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2 v2.3.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/desktopvirtualization/armdesktopvirtualization/v2 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devtestlabs/armdevtestlabs @@ -105,54 +105,51 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.5.0 ## explicit; go 1.23.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto v1.3.1 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2 v2.3.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kusto/armkusto/v2 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/logic/armlogic # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 v4.0.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4 -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.7.0 -## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp v1.0.0 -## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7 v7.5.0 +## explicit; go 1.23.0 +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/netapp/armnetapp/v7 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 v6.2.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/operationalinsights/armoperationalinsights # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw v1.1.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/paloaltonetworksngfw/armpanngfw -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup v1.0.0 -## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery v1.1.0 -## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts v1.0.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4 v4.2.0 +## explicit; go 1.23.0 +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2 v2.4.0 +## explicit; go 1.23.0 +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicessiterecovery/v2 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2 v2.1.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armdeploymentscripts/v2 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 v2.0.0-beta.4 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.7.0 -## explicit; go 1.18 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.0 +## explicit; go 1.23.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache v1.0.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4 v4.0.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover v1.1.1 +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache/v4 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2 v2.2.0 ## explicit; go 1.18 -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagemover/armstoragemover/v2 # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagepool/armstoragepool @@ -306,8 +303,8 @@ github.com/huandu/xstrings # github.com/magodo/armid v0.0.0-20240524082432-7ce06ae46c33 ## explicit; go 1.18 github.com/magodo/armid -# github.com/magodo/aztft v0.3.1-0.20250331004505-d5aff7c777d4 -## explicit; go 1.19 +# github.com/magodo/aztft v0.3.1-0.20250512012628-bf61e7a7a744 +## explicit; go 1.23.0 github.com/magodo/aztft/aztft github.com/magodo/aztft/internal/client github.com/magodo/aztft/internal/populate @@ -391,7 +388,7 @@ github.com/zclconf/go-cty/cty/function/stdlib github.com/zclconf/go-cty/cty/gocty github.com/zclconf/go-cty/cty/json github.com/zclconf/go-cty/cty/set -# golang.org/x/crypto v0.36.0 +# golang.org/x/crypto v0.38.0 ## explicit; go 1.23.0 golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish @@ -403,21 +400,21 @@ golang.org/x/mod/internal/lazyregexp golang.org/x/mod/modfile golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.38.0 +# golang.org/x/net v0.40.0 ## explicit; go 1.23.0 golang.org/x/net/http/httpguts golang.org/x/net/http2 golang.org/x/net/http2/hpack golang.org/x/net/idna golang.org/x/net/internal/httpcommon -# golang.org/x/sync v0.12.0 +# golang.org/x/sync v0.14.0 ## explicit; go 1.23.0 golang.org/x/sync/errgroup -# golang.org/x/sys v0.31.0 +# golang.org/x/sys v0.33.0 ## explicit; go 1.23.0 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/text v0.23.0 +# golang.org/x/text v0.25.0 ## explicit; go 1.23.0 golang.org/x/text/secure/bidirule golang.org/x/text/transform